diff --git a/1 b/1 new file mode 100644 index 0000000000000000000000000000000000000000..5c7c1c387eb6b296baa084f7ceee57ba7163d07f --- /dev/null +++ b/1 @@ -0,0 +1,8 @@ +4e5ff3911664c3535659c83e05c05d6d809e57d5 $ add README821d31e4f75848ca30bf5b5bede06256907b09f0 $ init +d8b5fe4e7673b03007c243172537bc84b7d7c558 $ refactor: add rust framework for builtins. +9edf0cde85de2eb55837061e75b2cf882cc11e55 $ refactor: move builtins_org to builtins +d337102476240db1552c114113fb8316a0b9770f $ 添加jobs rust code +59f05227deab020a56c870c2b7792104413ad4c7 $ builtins_rust: add read plugin +b33fe3ce7039944a5a18aefcc51c214a174bb25e $ 优化指针传参问题 +7e248b9bceea2cb5a53fa8267db60951966f0d8d $ Merge "优化指针传参问题" into rustdev +ec052778560599039fdbc50419d367acaa63b00a $ refactor: add r_execute_cmd function diff --git a/2 b/2 new file mode 100644 index 0000000000000000000000000000000000000000..b8a941307455708565b1b8f215e3bc0924103d3b --- /dev/null +++ b/2 @@ -0,0 +1,136 @@ +a9f5a77741d8d425cadab98626379c37045958e3 $ generate header.rs from .h header files +c74756216fafb31404717cacfef813637b43d1f3 $ delete command_h.re test +7cf4c921dd95788697bd1f0ec49b6d918359b410 $ add print_cmd reconstruction +6cad4846183d77119319c2236c5c337e8f632c9a $ Merge "fixed declare command brackets's format" into rustdev +f9f38431efe992eb9e7a0928968303643a6f0807 $ fixed declare command brackets's format +7e07d17473de10c94e37a2fddb63c39c00702be2 $ Merge "fixed 193557 declare 命令变量输出异常,和用例中预期不一致" into rustdev +97c737d22ff3adf518655aa848b6531a548b7779 $ fixed 193557 declare 命令变量输出异常,和用例中预期不一致 +5e7f126369b7c5be332ea82cae8534f4499b3a90 $ fix:193581 utshell环境,未执行kill -CONT 恢复进程时,执行ctrl+C无法结束wait -f 进程 +1a86263c1c045c8c0bf59faa61de8897ba71082e $ fix:193535.history -p mount和用例中预期不符 +bc1080dd99fbc11c1f3c80131c776878523c30c2 $ fix:193533 utshell环境,Ctrl+D退出会话时,提示exit_builtin +ac5c53099a6515a85e977ccf9afbf4e35c46a5ad $ change translate file +6d72fd0a3ccc1063c57467015616ee923d2ff7e2 $ Merge "add safe protocol for alias and hash" into rustdev +eb8b0dd7ddd7e11f78b6528ea50925b04eb3ab7d $ add u_src dir +2e2ae9165d48c3b7dd2e1a6cb86fd035591060cf $ add safe protocol for alias and hash +9b92233e6e928cb06a7c13d57aa15e0185bd3791 $ fix mapfile -d +87f5bc0f673ea1d7ceb8de404a3fd3621b4c17ff $ modify enable -n commind +77228f3e3692f3aae400c6ad37d795fe3fe24bf2 $ changed function location +3ba426b53b2c4bf27c12eb98c4de176df471c46d $ add translation for let kill bind +aedfa436429724000dfdbc042e5ec6cf149b5fc3 $ Merge "fix enable -n" into rustdev +f49cd3a3cbdb079d4f9aa09b178f6024dabca168 $ fix enable -n +eab505fb31093598e39e6e7d3e39448e279923f2 $ fix memery err +ada589369c646185763a8c5253df5955a77e5d61 $ fix complete and compgen bug +3b850c3821bdc84882ef7ed8b779555e179afd25 $ add traslations for type +90a00b5509b085d1439800dff068bd96a26d277a $ Merge "fix typeset -f function" into rustdev +af506d1a9f0e9542545f613db3c06887929d6d12 $ fix typeset -f function +da17d91645784496a5edcdde6f882389397127e1 $ Merge "fixed declare -a err" into rustdev +e5b99f66029850a11f429c19fce3f614368a2748 $ Merge "fix enable -a" into rustdev +3788e0451fcd072fabf44cf96de23d723676c13b $ Merge "change en-US translztion format" into rustdev +690d56a0f3209fdd4559d855674e78d8107920b8 $ fix enable -a +fea9649b3799f2e6de35ebca49b4c771f73d1c92 $ fix type -a +204c0925c7d148257a8d6102e82e4e8dccf53cb3 $ fixed declare -a err +ad9027e057c5a227be8159b9a6eb31d5e8641309 $ change en-US translztion format +d9ed5098a46ac6bcd9addc2c1e97a3195ac022bd $ fix printf %f +e76865581185412bd15fb89ef5e7e36258212150 $ Merge "fixed ulimit cmd print format err" into rustdev +13556a85f76698547e08c7fa46b8a88301dc73a5 $ fixed ulimit cmd print format err +a06caded61b6a43bb89159be04a0eb9af738e711 $ Merge "fix pushd -l, popd -l, dirs command" into rustdev +fb327d67a0e9cad54228b940a895d4d1c9ab5ad0 $ chage ptr move as offset +d0537a70467845b4caf25863006bbd142c2241dd $ fixed declare -p error +1d30a26ae0817569e83d69e84a08e7999dbecc68 $ modify project name rash->utshell +06d456ee7b52becc2e77875c9a0a5d4308bd1828 $ change help longdoc format +102dae472a96e7c811f5e99b3c756887da4253a4 $ fix typeseterror:exec_cmd: typeset to declare +972471884b58c115f9c611a84107aa938c058a32 $ fixed declare error +5dc4c4767ea225b5270f998a9cb06bd2b368118c $ fixed declare -i err +7c1d6e6eaaa602936c960663bacaf80e3dcf3965 $ fix pushd -l, popd -l, dirs command +8e0d9c53896edd0eb62c6e0ba4e424c1fc925230 $ realize translation command --help +68e37bbcc3d58e84df4b4854f69d0673f7cc7d58 $ Merge "fix fc command" into rustdev +808801d81756188f841510017dbaeace519da23c $ fix fc command +c750605cf5c673b50183671f79858ae154c407a0 $ change opt variant to mut +06ca889c4860d1e4e25d2dce77d991d11919a307 $ fix: disown -r option error +2d8cdcf350720956b0fda3c64f93d013d2ee17e2 $ fix :160145 alias fmt error +a545f8fd3b81d3e6b19b4a868f1d8ee0d2e5ed73 $ Merge "fix 160413 umask fmt error" into rustdev +f1567e0f82b3ca20388da8d412e5957acf64d5b0 $ fixed help -m err +fe184ac9ef5882c2c4fffc0912bb7ab62ffaeb93 $ fix 160413 umask fmt error +e890c4eb63ebcc754f1669b1445b448db96a4da9 $ Merge "change LANGUAGE to LANG" into rustdev +42cc1a5b57a384c6f9028251078e72ed7a7beafd $ Merge "realize some command translation" into rustdev +0b339314d05ca826831e071b3405abe09c463765 $ change LANGUAGE to LANG +e64650fdabf3b511d482b687399f5b0f50464a1d $ realize some command translation +20b615f01c67efa857592872ce48134d2e9af5f2 $ fix: 160365 rash disown execute error without parameter +1887d5377ba409fb3692805654de96165cc85161 $ Merge "modify transfile path" into rustdev +72069ebbbfd134eec710ab17660e4d67b9f307ac $ modify transfile path +3d84851489913216c57bad0a471725f167308cee $ fix kill -l and trap -l +8417230f57e8eaea155ab6809bf88c4ee91c0aff $ sync from rpmbuild,remove doc and other file +89b6ba202761304458c7faffc9ad1a7c5de0172f $ remove print msg +f688c1d7c41fe6ae6d27f5b82251402bde322339 $ modify execute retrun error call read: factory:read->return +038c321f2f28a1b8688c68c86974d912b38a5803 $ add translation file 3 +cb394fcaa843187d6d24ad5fe33998e78c6c9527 $ add translatins file 2 +1194dc2c7d5ca8f0ec096a25faccd066ae1c57bc $ add translations file +b92d42bd77ba782f7c5546c41278e1665f7783f5 $ git add cargo vendor files +97b2b53031602fe0a6ab639a2078a399d12f96d4 $ convert i8 to c_char +b10fbeaa6b641b3e83d3144fb6e0de0253be7ec1 $ add usage for ulimit +e361ba0cbb7a4f819b96ef05329cb9b63e3c7642 $ fixed cmd --help error +5055706c68c1b5a574e8c345acde65b9c490306f $ fixed source error +552bc4a75c9b905a950c2ca699435452b65f9d45 $ fixed test suspend shift error +5b352d9f227a436170d90cd861b576a27de649c4 $ fixed readonly and export cannot jump loop +e7be711a2d3501268fe1db0171885580480894c7 $ fixed some command segmentation fault +0f7a654ee1022599fcb37478283b6734f83016ac $ modify exec +79c007027d5a17e7c6a3183f6e7c0f38381bbb6b $ succeed called factory +724977750ec2acaf542bbec602e06c49d73a217c $ use static mut var +e51b65d434a34e8cc56cb94b65acdc339020207c $ modify read -t -d -e -n +9222a0d2cec8bfa43152b8a1da12b51046128068 $ fix history can not -d error +10cd55321a7387a9ff00915920b884d5717372ae $ Unified Interface parameter type and Implement factory patterns +82d6bb32c9bf058106dafec13d81fd61faeb01b3 $ check mapfile printf read suspend test time trap and merge refact common +f045dbbd795ae6c0e35c694ce5bbc670e45e3cc0 $ refact exec exit +717301e3070467f19d156bc01c1b46c8aa6b9905 $ merge common from alias to eval +95a4108faf4b7093700e2d9abf43798fc8f1aa35 $ refact bind +0e0395002a236f4e1c8397579b79954e0dc2a3f5 $ modify jobs +70b4faaf74e318d95e30c697592f84b571a0fe24 $ fix build error +df7984f479c17805e976634718c63b5034cdd517 $ fix shopt error +070aa64329ebfbdec61bd04e36f69cbbfcdbcd48 $ fix shopt setflag error +1fb55c5ecf5576943ba3643c2b76f8a04a5fe152 $ fix coredump +411367dd7a0a2b40c7b921dd6c47dcf5e9059158 $ modify command.rs file +554f7a914ed1a53c820a1e94d00726b3253d7903 $ fix compile error +6466675c76bcbc771c5939410065d97ddda05ca4 $ add set command +f04d51713bffbeee31aee689b08fd0220c8ca75d $ modify common +36dcb3a95e6d2ad7ba1b53796d6f1051002c42f0 $ double commit, cause error Revert "Refactoring code" +341c12df35c6343148d264c59f61661684f1555a $ Refactoring code +fd5373f3df3ce757400685b243c3d38e413312be $ Refactoring code +38143b58456407750e4f0563dfcfebf27f641bd4 $ add exec and common, modify cd +fee860b67d05e315e66d3507480e4eb22cb4e2ca $ add break ulimit type +460e1f5130d8bb2a75d770296996fb35fa911592 $ add wait umask printf history eval caller bind alias +925106ec5a9c695052d0ed4e96e7684f09d325e0 $ builtins_rust: add setattr plugin +c9e34358dc4d3932d4f9a02f97493d622431fc11 $ rm doc +c7d273a9a8614cd0b4cf9fe6ddddd1690df7f3a0 $ builtins_rust:add alias exit help +f702f18ebda6077ab396597a807b742ff42f9718 $ builtins_rust: add trap plugin +0dc6bb5a20af927e7c0048dcb97b89ee878de9e2 $ rust: add colon and builtin +5987ab26e969a62593146afaef3f6180fa566c42 $ rust: modify dylib to staticlib +caecab0a8c31785080b688f615abe40042ef3d81 $ rush: build with rust so +e7d0c3856c9b028da878a4f0fac38b3e828da2e5 $ builtins_rust: add shift plugin builtins_rust: add times plugin builtins_rust: add suspend plugin builtins_rust: add test plugin +040c3852e88aced0f9bedf6ad35cf4ca24ba20b4 $ builtins_rust: add return plugin +13af07fe9741f6b2db3c85ca4ead4b684fe1ba76 $ builtins_rust: add printf plugin +39e06294409d398e050d328f3fd09eaf395087e9 $ 1 添加bash rust重构complete命令 +af476a9df7f9d589fcca6aa83ca9a57b39a2a8f6 $ builtins_rust: add mapfile plugin +99fc02b24c9c7eb3afef7387233e5fddf9c6cf11 $ builtins_rust: add let plugin +ecff8a6bde802a83b39715d2081706049bc403c8 $ Merge "builtins_rust: add kill plugin" into rustdev +d89ed9d3662658da4ff61a5e98d4623f9c791598 $ 1 添加bash rust重构pushd 命令源码 +cb7247d1cf0deff99be280bc5675b1e3376fda6a $ builtins_rust: add kill plugin +7edb13a39895925afb2a0b1d3864470aeed94485 $ builtins_rust: add history plugin +ddff45d647b3214c0bbb0c2a26dfffbe1ab4d6e1 $ 1 declare 命令 rust 源码 +ea1d13cf401ea9f93ebe5f4a232c828ed39ffb3b $ builtins_rust: update read plugin +ca56a5df9aec33adeb75143077d781d5a807593e $ 1 添加source rust源码 2 纠正STREQN 的实现 +f86f4f2bf1290c6874e817b94ab3a5cdb767b12a $ 1 添加getsopts 命令 rust 源码 2 优化二级指针偏移 +8370b614793b54261b1ef08bdeb0aa36eb8f01a2 $ 1 添加fc命令源码 2 优化代码规范,去掉多余的空格 3 添加注册函数 +31346f4ffaae817b3242928f473619b7d06d94bd $ 添加cd rust 源码,并优化指针判空写法 +5a92722cbfd79d4f44b53d29c644de9449d9a9b5 $ Merge "refactor: modify execute_cmd function,part 1" into rustdev +1efade178d50e6e98946958ab076d1e1cc3d4676 $ 添加fg_bg 命令 rust 代码 +9b18ec1b6383bea95912c78856c0442e5185304c $ refactor: modify execute_cmd function,part 1 +ec052778560599039fdbc50419d367acaa63b00a $ refactor: add r_execute_cmd function +7e248b9bceea2cb5a53fa8267db60951966f0d8d $ Merge "优化指针传参问题" into rustdev +b33fe3ce7039944a5a18aefcc51c214a174bb25e $ 优化指针传参问题 +59f05227deab020a56c870c2b7792104413ad4c7 $ builtins_rust: add read plugin +d337102476240db1552c114113fb8316a0b9770f $ 添加jobs rust code +9edf0cde85de2eb55837061e75b2cf882cc11e55 $ refactor: move builtins_org to builtins +d8b5fe4e7673b03007c243172537bc84b7d7c558 $ refactor: add rust framework for builtins. +821d31e4f75848ca30bf5b5bede06256907b09f0 $ init +4e5ff3911664c3535659c83e05c05d6d809e57d5 $ add README + diff --git a/README.md b/README.md index 007997973d627ea406dda4492b484f5ad3ca74ec..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/README.md +++ b/README.md @@ -1,57 +0,0 @@ -# utshell - -#### 介绍 -utshell is use rust rewrote bash. and enhanced security. -now it is base on bash. and we will gradually remove dependence on bash. - -The GNU Bourne Again shell (Bash) is a shell or command language interpreter that is compatible with the Bourne shell (sh). Bash incorporates useful features from the Korn shell (ksh) and the C shell (csh). Most sh scripts can be run by utshell without modification. - - -#### 软件架构 -x64 - - -### Dependencies -glibc, bash - - -### 编译和安装教程 -./configure -make -make install - - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -## Getting help - -- [Official Forum](https://bbs.deepin.org/) for generic discussion and help. -- [Developer Center](https://github.com/linuxdeepin/developer-center) for BUG report and suggestions. -- [Wiki](https://wiki.deepin.org/) -(按照项目实际情况放帮助链接) - -## Getting involved - -We encourage you to report issues and contribute changes - -- [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en) (English) -- [Translate for your language on Transifex](#) *please update to the actual Transifex link of this project* -(按照项目实际情况放贡献指南链接) - -## License - -License description here. The license name is suggested to use the same one as [SPDX license identifier](https://spdx.org/licenses). Following is an example: - -utshell is licensed under [GPL-3.0-or-later](LICENSE) diff --git a/a.sh b/a.sh new file mode 100644 index 0000000000000000000000000000000000000000..84a8a7fe69e5fb29317ef5d47a76899a725062d1 --- /dev/null +++ b/a.sh @@ -0,0 +1,3 @@ +cd /home/tong/src/openeuler/utshell/ +git pull +git checkout -b 4e5ff3911664c3535659c83e05c05d6d809e57d5 diff --git a/bash b/bash new file mode 160000 index 0000000000000000000000000000000000000000..821d31e4f75848ca30bf5b5bede06256907b09f0 --- /dev/null +++ b/bash @@ -0,0 +1 @@ +Subproject commit 821d31e4f75848ca30bf5b5bede06256907b09f0 diff --git a/bash-5.1/ABOUT-NLS b/bash-5.1/ABOUT-NLS new file mode 100644 index 0000000000000000000000000000000000000000..3cc828658cb4e15936879ef318fb7b9150b9be3e --- /dev/null +++ b/bash-5.1/ABOUT-NLS @@ -0,0 +1,1379 @@ +1 Notes on the Free Translation Project +*************************************** + +Free software is going international! The Free Translation Project is a +way to get maintainers of free software, translators, and users all +together, so that free software will gradually become able to speak many +languages. A few packages already provide translations for their +messages. + + If you found this 'ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU 'gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU 'gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work on translations can contact the appropriate team. + +1.1 INSTALL Matters +=================== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU 'gettext'. Other packages have their own ways to +internationalization, predating GNU 'gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU 'gettext' functions. Installers may use special +options at configuration time for changing the default behaviour. The +command: + + ./configure --disable-nls + +will _totally_ disable translation of messages. + + When you already have GNU 'gettext' installed on your system and run +configure without an option for your new package, 'configure' will +probably detect the previously built and installed 'libintl' library and +will decide to use it. If not, you may have to to use the +'--with-libintl-prefix' option to tell 'configure' where to look for it. + + Internationalized packages usually have many 'po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at 'configure' time by using the +'--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable 'LINGUAS' +may be set, prior to configuration, to limit the installed set. +'LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +1.2 Using This Package +====================== + +As a user, if your language has been installed for this package, you +only have to set the 'LANG' environment variable to the appropriate +'LL_CC' combination. If you happen to have the 'LC_ALL' or some other +'LC_xxx' environment variables set, you should unset them before setting +'LANG', otherwise the setting of 'LANG' will not have the desired +effect. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is +an ISO 3166 two-letter country code. For example, let's suppose that +you speak German and live in Germany. At the shell prompt, merely +execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in +'sh') or 'export LANG=de_DE' (in 'bash'). This can be done from your +'.login' or '.profile' file, once and for all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of 'LL_CC', with 'LL' denoting the +language and 'CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are used, +such as 'LL' or 'LL_CC.ENCODING'. You can get the list of locales +supported by your system for your language by running the command +'locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +'LANGUAGE'. GNU 'gettext' gives preference to 'LANGUAGE' over 'LANG' +for the purpose of message handling, but you still need to have 'LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather read +translations in German than English for when Swedish is not available, +set 'LANGUAGE' to 'sv:de' while leaving 'LANG' to 'sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from 'no' to 'nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under 'nb' and some older ones under 'no', it's recommended +for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and +older translations are used. + + In the 'LANGUAGE' environment variable, but not in the 'LANG' +environment variable, 'LL_CC' combinations can be abbreviated as 'LL' to +denote the language's main dialect. For example, 'de' is equivalent to +'de_DE' (German as spoken in Germany), and 'pt' to 'pt_PT' (Portuguese +as spoken in Portugal) in this context. + +1.3 Translating Teams +===================== + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +'http://translationproject.org/', in the "Teams" area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +'-request' appended. For example, speakers of Swedish can send a +message to 'sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate _actively_ +in translations, or at solving translational difficulties, rather than +merely lurking around. If your team does not exist yet and you want to +start one, or if you are unsure about what to do or how to get started, +please write to 'coordinator@translationproject.org' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skills are praised more than +programming skills, here. + +1.4 Available Packages +====================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of Jun 2014. +The matrix shows, in regard of each package, for which languages PO +files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am an ar as ast az be bg bn bn_IN bs ca crh cs + +---------------------------------------------------+ + a2ps | [] [] [] | + aegis | | + anubis | | + aspell | [] [] [] | + bash | [] [] [] | + bfd | | + binutils | [] | + bison | | + bison-runtime | [] | + buzztrax | [] | + ccd2cue | | + ccide | | + cflow | | + clisp | | + coreutils | [] [] | + cpio | | + cppi | | + cpplib | [] | + cryptsetup | [] | + datamash | | + denemo | [] [] | + dfarc | [] | + dialog | [] [] [] | + dico | | + diffutils | [] | + dink | [] | + direvent | | + doodle | [] | + dos2unix | | + dos2unix-man | | + e2fsprogs | [] [] | + enscript | [] | + exif | [] | + fetchmail | [] [] | + findutils | [] | + flex | [] | + freedink | [] [] | + fusionforge | | + gas | | + gawk | [] | + gcal | [] | + gcc | | + gdbm | | + gettext-examples | [] [] [] [] [] | + gettext-runtime | [] [] [] | + gettext-tools | [] [] | + gjay | | + glunarclock | [] [] [] | + gnubiff | [] | + gnubik | [] | + gnucash | () () [] | + gnuchess | | + gnulib | [] | + gnunet | | + gnunet-gtk | | + gold | | + gphoto2 | [] | + gprof | [] | + gramadoir | | + grep | [] [] [] | + grub | [] | + gsasl | | + gss | | + gst-plugins-bad | [] [] | + gst-plugins-base | [] [] [] | + gst-plugins-good | [] [] [] | + gst-plugins-ugly | [] [] [] | + gstreamer | [] [] [] [] | + gtick | [] | + gtkam | [] [] | + gtkspell | [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] | + hello | [] | + help2man | | + help2man-texi | | + hylafax | | + idutils | | + iso_15924 | [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | [] | + iso_639 | [] [] [] [] [] [] [] [] [] | + iso_639_3 | [] [] | + iso_639_5 | | + jwhois | | + kbd | [] | + klavaro | [] [] [] [] [] | + ld | [] | + leafpad | [] [] [] [] | + libc | [] [] [] | + libexif | () | + libextractor | | + libgnutls | [] | + libgphoto2 | [] | + libgphoto2_port | [] | + libgsasl | | + libiconv | [] [] | + libidn | [] | + liferea | [] [] [] [] | + lilypond | [] [] | + lordsawar | [] | + lprng | | + lynx | [] [] | + m4 | [] | + mailfromd | | + mailutils | | + make | [] | + man-db | [] [] | + man-db-manpages | | + midi-instruments | [] [] [] | + minicom | [] | + mkisofs | [] | + myserver | [] | + nano | [] [] [] | + opcodes | | + parted | [] | + pies | | + pnmixer | | + popt | [] | + procps-ng | | + procps-ng-man | | + psmisc | [] | + pspp | [] | + pushover | [] | + pwdutils | | + pyspread | | + radius | [] | + recode | [] [] [] | + recutils | | + rpm | | + rush | | + sarg | | + sed | [] [] [] [] | + sharutils | [] | + shishi | | + skribilo | | + solfege | [] [] | + solfege-manual | | + spotmachine | | + sudo | [] [] | + sudoers | [] [] | + sysstat | [] | + tar | [] [] [] | + texinfo | [] [] | + texinfo_document | [] [] | + tigervnc | [] | + tin | | + tin-man | | + tracgoogleappsa... | | + trader | | + util-linux | [] | + ve | | + vice | | + vmm | | + vorbis-tools | [] | + wastesedge | | + wcd | | + wcd-man | | + wdiff | [] [] | + wget | [] | + wyslij-po | | + xboard | | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +---------------------------------------------------+ + af am an ar as ast az be bg bn bn_IN bs ca crh cs + 4 0 2 5 3 11 0 8 25 3 3 1 55 4 74 + + da de el en en_GB en_ZA eo es et eu fa fi fr + +--------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] [] [] | + aegis | [] [] [] [] | + anubis | [] [] [] [] [] | + aspell | [] [] [] [] [] [] [] | + bash | [] [] [] | + bfd | [] [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] [] [] [] [] | + bison-runtime | [] [] [] [] [] [] [] [] | + buzztrax | [] [] [] [] | + ccd2cue | [] [] [] [] | + ccide | [] [] [] [] [] [] | + cflow | [] [] [] [] [] | + clisp | [] [] [] [] [] | + coreutils | [] [] [] [] [] | + cpio | [] [] [] [] [] | + cppi | [] [] [] [] [] | + cpplib | [] [] [] [] [] [] | + cryptsetup | [] [] [] [] [] | + datamash | [] [] [] [] | + denemo | [] | + dfarc | [] [] [] [] [] [] | + dialog | [] [] [] [] [] [] [] [] [] | + dico | [] [] [] [] | + diffutils | [] [] [] [] [] [] | + dink | [] [] [] [] [] [] | + direvent | [] [] [] [] | + doodle | [] [] [] [] | + dos2unix | [] [] [] [] [] | + dos2unix-man | [] [] [] | + e2fsprogs | [] [] [] [] [] | + enscript | [] [] [] [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] () [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] | + flex | [] [] [] [] [] [] | + freedink | [] [] [] [] [] [] [] [] | + fusionforge | [] [] [] | + gas | [] [] [] | + gawk | [] [] [] [] [] | + gcal | [] [] [] [] | + gcc | [] | + gdbm | [] [] [] [] [] | + gettext-examples | [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] | + gjay | [] [] [] [] | + glunarclock | [] [] [] [] [] | + gnubiff | () [] [] () | + gnubik | [] [] [] [] [] | + gnucash | [] () () () () () () | + gnuchess | [] [] [] [] | + gnulib | [] [] [] [] [] [] [] | + gnunet | [] | + gnunet-gtk | [] | + gold | [] [] [] | + gphoto2 | [] () [] [] | + gprof | [] [] [] [] [] [] | + gramadoir | [] [] [] [] [] | + grep | [] [] [] [] [] [] [] | + grub | [] [] [] [] [] | + gsasl | [] [] [] [] [] | + gss | [] [] [] [] [] | + gst-plugins-bad | [] [] [] | + gst-plugins-base | [] [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] [] [] | + gtick | [] () [] [] [] | + gtkam | [] () [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] | + guix | [] [] | + guix-packages | | + gutenprint | [] [] [] [] | + hello | [] [] [] [] [] [] [] [] | + help2man | [] [] [] [] [] [] [] | + help2man-texi | [] [] [] | + hylafax | [] [] | + idutils | [] [] [] [] [] | + iso_15924 | [] () [] [] () [] () | + iso_3166 | [] () [] [] [] [] () [] () | + iso_3166_2 | [] () () () | + iso_4217 | [] () [] [] [] () [] () | + iso_639 | [] () [] [] () [] () | + iso_639_3 | () () () | + iso_639_5 | () () () | + jwhois | [] [] [] [] [] | + kbd | [] [] [] [] [] [] | + klavaro | [] [] [] [] [] [] [] | + ld | [] [] [] [] | + leafpad | [] [] [] [] [] [] [] [] | + libc | [] [] [] [] [] | + libexif | [] [] () [] [] | + libextractor | [] | + libgnutls | [] [] [] [] | + libgphoto2 | [] () [] | + libgphoto2_port | [] () [] [] [] [] | + libgsasl | [] [] [] [] [] | + libiconv | [] [] [] [] [] [] [] | + libidn | [] [] [] [] [] | + liferea | [] () [] [] [] [] [] | + lilypond | [] [] [] [] [] [] | + lordsawar | [] [] | + lprng | | + lynx | [] [] [] [] [] [] | + m4 | [] [] [] [] [] [] | + mailfromd | [] | + mailutils | [] [] [] [] | + make | [] [] [] [] [] | + man-db | [] [] [] [] | + man-db-manpages | [] [] | + midi-instruments | [] [] [] [] [] [] [] [] [] | + minicom | [] [] [] [] [] | + mkisofs | [] [] [] | + myserver | [] [] [] [] | + nano | [] [] [] [] [] [] [] | + opcodes | [] [] [] [] [] | + parted | [] [] [] | + pies | [] | + pnmixer | [] [] | + popt | [] [] [] [] [] [] | + procps-ng | [] [] | + procps-ng-man | [] [] | + psmisc | [] [] [] [] [] [] [] | + pspp | [] [] [] | + pushover | () [] [] [] | + pwdutils | [] [] [] | + pyspread | [] [] [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] | + recutils | [] [] [] [] | + rpm | [] [] [] [] [] | + rush | [] [] [] | + sarg | [] [] | + sed | [] [] [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | [] [] [] | + skribilo | [] [] [] | + solfege | [] [] [] [] [] [] [] [] | + solfege-manual | [] [] [] [] [] | + spotmachine | [] [] [] [] [] | + sudo | [] [] [] [] [] [] | + sudoers | [] [] [] [] [] [] | + sysstat | [] [] [] [] [] [] | + tar | [] [] [] [] [] [] [] | + texinfo | [] [] [] [] [] | + texinfo_document | [] [] [] [] | + tigervnc | [] [] [] [] [] [] | + tin | [] [] [] [] | + tin-man | [] | + tracgoogleappsa... | [] [] [] [] [] | + trader | [] [] [] [] [] [] | + util-linux | [] [] [] [] | + ve | [] [] [] [] [] | + vice | () () () | + vmm | [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | [] | + wcd | [] [] [] [] | + wcd-man | [] | + wdiff | [] [] [] [] [] [] [] | + wget | [] [] [] [] [] [] | + wyslij-po | [] [] [] [] | + xboard | [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] [] [] | + +--------------------------------------------------+ + da de el en en_GB en_ZA eo es et eu fa fi fr + 119 131 32 1 6 0 94 95 22 13 4 102 139 + + ga gd gl gu he hi hr hu hy ia id is it ja ka kk + +-------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | [] | + anubis | [] [] [] [] | + aspell | [] [] [] [] [] | + bash | [] [] [] [] | + bfd | [] [] | + binutils | [] [] [] | + bison | [] | + bison-runtime | [] [] [] [] [] [] [] [] | + buzztrax | | + ccd2cue | [] | + ccide | [] [] | + cflow | [] [] [] | + clisp | | + coreutils | [] [] | + cpio | [] [] [] [] [] [] | + cppi | [] [] [] [] [] | + cpplib | [] [] | + cryptsetup | [] | + datamash | | + denemo | [] | + dfarc | [] [] [] | + dialog | [] [] [] [] [] [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] | + dink | [] | + direvent | [] | + doodle | [] [] | + dos2unix | [] [] | + dos2unix-man | | + e2fsprogs | [] [] | + enscript | [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] [] [] | + findutils | [] [] [] [] [] [] [] | + flex | [] | + freedink | [] [] [] [] | + fusionforge | | + gas | [] | + gawk | [] () [] | + gcal | | + gcc | | + gdbm | | + gettext-examples | [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] | + gettext-tools | [] [] [] | + gjay | [] | + glunarclock | [] [] [] [] [] [] | + gnubiff | [] [] () | + gnubik | [] [] [] | + gnucash | () () () () () | + gnuchess | | + gnulib | [] [] [] [] [] | + gnunet | | + gnunet-gtk | | + gold | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] [] | + gramadoir | [] [] [] | + grep | [] [] [] [] [] [] [] | + grub | [] [] [] | + gsasl | [] [] [] [] [] | + gss | [] [] [] [] [] | + gst-plugins-bad | [] [] [] | + gst-plugins-base | [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] [] [] | + gtkam | [] [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] [] [] | + hello | [] [] [] [] [] | + help2man | [] [] [] | + help2man-texi | | + hylafax | [] | + idutils | [] [] | + iso_15924 | [] [] [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | [] [] | + iso_4217 | [] [] [] [] [] [] | + iso_639 | [] [] [] [] [] [] [] [] [] | + iso_639_3 | [] [] | + iso_639_5 | | + jwhois | [] [] [] [] | + kbd | [] [] [] | + klavaro | [] [] [] [] [] | + ld | [] [] [] [] | + leafpad | [] [] [] [] [] [] [] () | + libc | [] [] [] [] [] | + libexif | [] | + libextractor | | + libgnutls | [] | + libgphoto2 | [] [] | + libgphoto2_port | [] [] | + libgsasl | [] [] [] [] | + libiconv | [] [] [] [] [] [] [] | + libidn | [] [] [] [] | + liferea | [] [] [] [] [] | + lilypond | [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] [] | + m4 | [] [] [] [] [] | + mailfromd | | + mailutils | | + make | [] [] [] [] | + man-db | [] [] | + man-db-manpages | [] [] | + midi-instruments | [] [] [] [] [] [] [] [] [] | + minicom | [] [] [] | + mkisofs | [] [] | + myserver | [] | + nano | [] [] [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] [] [] | + pies | | + pnmixer | [] [] | + popt | [] [] [] [] [] [] [] [] [] [] | + procps-ng | | + procps-ng-man | | + psmisc | [] [] [] [] | + pspp | [] [] | + pushover | [] | + pwdutils | [] | + pyspread | | + radius | [] | + recode | [] [] [] [] [] [] [] | + recutils | | + rpm | [] | + rush | [] | + sarg | | + sed | [] [] [] [] [] [] [] | + sharutils | | + shishi | | + skribilo | [] | + solfege | [] [] | + solfege-manual | | + spotmachine | | + sudo | [] [] [] [] | + sudoers | [] [] [] | + sysstat | [] [] [] [] | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] | + texinfo_document | [] [] [] | + tigervnc | | + tin | | + tin-man | | + tracgoogleappsa... | [] [] [] [] | + trader | [] [] | + util-linux | [] | + ve | [] | + vice | () () | + vmm | | + vorbis-tools | [] [] | + wastesedge | [] | + wcd | | + wcd-man | | + wdiff | [] [] [] | + wget | [] [] [] [] | + wyslij-po | [] [] [] | + xboard | | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] [] | + +-------------------------------------------------+ + ga gd gl gu he hi hr hu hy ia id is it ja ka kk + 35 2 47 4 8 2 60 71 2 6 81 11 87 57 0 3 + + kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl + +--------------------------------------------------+ + a2ps | [] [] | + aegis | [] | + anubis | [] [] [] | + aspell | [] [] | + bash | [] [] | + bfd | | + binutils | | + bison | [] | + bison-runtime | [] [] [] [] [] [] | + buzztrax | | + ccd2cue | | + ccide | [] [] | + cflow | [] | + clisp | [] | + coreutils | [] [] | + cpio | [] | + cppi | | + cpplib | [] | + cryptsetup | [] | + datamash | [] [] | + denemo | | + dfarc | [] [] | + dialog | [] [] [] [] [] [] | + dico | | + diffutils | [] [] [] | + dink | [] | + direvent | [] | + doodle | [] | + dos2unix | [] [] | + dos2unix-man | [] | + e2fsprogs | [] | + enscript | [] | + exif | [] [] [] | + fetchmail | [] | + findutils | [] [] | + flex | [] | + freedink | [] [] | + fusionforge | | + gas | | + gawk | [] | + gcal | | + gcc | | + gdbm | | + gettext-examples | [] [] [] [] [] [] | + gettext-runtime | [] [] [] | + gettext-tools | [] | + gjay | | + glunarclock | [] [] | + gnubiff | [] | + gnubik | [] [] | + gnucash | () () () () () () () [] | + gnuchess | [] [] | + gnulib | [] | + gnunet | | + gnunet-gtk | | + gold | | + gphoto2 | [] | + gprof | [] [] | + gramadoir | [] | + grep | [] [] | + grub | [] [] [] | + gsasl | [] | + gss | | + gst-plugins-bad | [] [] [] | + gst-plugins-base | [] [] [] | + gst-plugins-good | [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] | + gstreamer | [] [] [] | + gtick | [] | + gtkam | [] [] | + gtkspell | [] [] [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] | + hello | [] [] [] | + help2man | [] | + help2man-texi | | + hylafax | [] | + idutils | [] | + iso_15924 | () [] [] | + iso_3166 | [] [] [] () [] [] [] [] [] [] | + iso_3166_2 | () [] | + iso_4217 | () [] [] [] | + iso_639 | [] [] () [] [] [] [] | + iso_639_3 | [] () [] | + iso_639_5 | () | + jwhois | [] [] | + kbd | [] | + klavaro | [] [] | + ld | | + leafpad | [] [] [] [] [] | + libc | [] [] | + libexif | [] | + libextractor | [] | + libgnutls | [] [] | + libgphoto2 | [] | + libgphoto2_port | [] | + libgsasl | [] | + libiconv | [] [] | + libidn | [] | + liferea | [] [] [] | + lilypond | [] | + lordsawar | | + lprng | | + lynx | [] | + m4 | [] | + mailfromd | | + mailutils | | + make | [] [] | + man-db | [] | + man-db-manpages | [] | + midi-instruments | [] [] [] [] [] [] [] | + minicom | [] | + mkisofs | [] | + myserver | | + nano | [] [] [] | + opcodes | [] | + parted | [] [] | + pies | | + pnmixer | [] | + popt | [] [] [] [] [] | + procps-ng | | + procps-ng-man | | + psmisc | [] | + pspp | [] [] | + pushover | | + pwdutils | [] | + pyspread | | + radius | [] | + recode | [] [] | + recutils | [] | + rpm | [] | + rush | [] | + sarg | | + sed | [] [] | + sharutils | [] | + shishi | | + skribilo | | + solfege | [] [] | + solfege-manual | [] | + spotmachine | [] | + sudo | [] [] [] | + sudoers | [] [] [] | + sysstat | [] [] | + tar | [] [] [] | + texinfo | [] | + texinfo_document | [] | + tigervnc | [] | + tin | | + tin-man | | + tracgoogleappsa... | [] [] [] | + trader | [] | + util-linux | [] | + ve | [] | + vice | [] | + vmm | [] | + vorbis-tools | [] | + wastesedge | [] | + wcd | [] | + wcd-man | [] | + wdiff | [] | + wget | [] [] | + wyslij-po | [] | + xboard | [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +--------------------------------------------------+ + kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl + 5 15 4 6 0 13 23 3 3 3 4 11 2 42 1 125 + + nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + +------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] | + aegis | [] [] | + anubis | [] [] [] | + aspell | [] [] [] [] [] [] [] | + bash | [] [] [] [] [] [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bison-runtime | [] [] [] [] [] [] [] [] | + buzztrax | [] | + ccd2cue | [] [] | + ccide | [] [] [] | + cflow | [] [] [] | + clisp | [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + cppi | [] [] [] | + cpplib | [] [] [] | + cryptsetup | [] [] [] | + datamash | [] [] | + denemo | | + dfarc | [] [] [] | + dialog | [] [] [] [] [] [] [] | + dico | [] | + diffutils | [] [] [] | + dink | | + direvent | [] [] [] | + doodle | [] [] | + dos2unix | [] [] [] [] | + dos2unix-man | [] [] | + e2fsprogs | [] | + enscript | [] [] [] [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] [] | + freedink | [] [] [] [] [] | + fusionforge | | + gas | | + gawk | [] | + gcal | | + gcc | | + gdbm | [] [] [] | + gettext-examples | [] [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] [] [] | + gjay | [] | + glunarclock | [] [] [] [] [] [] | + gnubiff | [] | + gnubik | [] [] [] [] | + gnucash | () () () () () [] | + gnuchess | [] [] | + gnulib | [] [] [] [] [] | + gnunet | | + gnunet-gtk | | + gold | | + gphoto2 | [] [] [] [] [] | + gprof | [] [] [] [] | + gramadoir | [] [] | + grep | [] [] [] [] [] [] | + grub | [] [] [] [] [] | + gsasl | [] [] [] | + gss | [] [] [] [] | + gst-plugins-bad | [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] [] [] | + gtick | [] [] [] [] [] | + gtkam | [] [] [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] [] | + hello | [] [] [] [] [] [] | + help2man | [] [] [] [] | + help2man-texi | [] | + hylafax | | + idutils | [] [] [] | + iso_15924 | [] () [] [] [] [] | + iso_3166 | [] [] [] [] () [] [] [] [] [] [] [] [] | + iso_3166_2 | [] () [] | + iso_4217 | [] [] () [] [] [] [] [] | + iso_639 | [] [] [] () [] [] [] [] [] [] | + iso_639_3 | [] () | + iso_639_5 | () [] | + jwhois | [] [] [] [] | + kbd | [] [] | + klavaro | [] [] [] [] [] | + ld | | + leafpad | [] [] [] [] [] [] [] [] | + libc | [] [] [] | + libexif | [] () [] | + libextractor | [] | + libgnutls | [] | + libgphoto2 | [] | + libgphoto2_port | [] [] [] [] [] | + libgsasl | [] [] [] [] | + libiconv | [] [] [] [] [] | + libidn | [] [] [] | + liferea | [] [] [] [] () [] [] | + lilypond | | + lordsawar | | + lprng | [] | + lynx | [] [] | + m4 | [] [] [] [] [] | + mailfromd | [] | + mailutils | [] | + make | [] [] [] | + man-db | [] [] [] | + man-db-manpages | [] [] [] | + midi-instruments | [] [] [] [] [] [] [] [] | + minicom | [] [] [] [] | + mkisofs | [] [] [] | + myserver | [] [] | + nano | [] [] [] [] [] [] | + opcodes | | + parted | [] [] [] [] [] [] | + pies | [] | + pnmixer | [] | + popt | [] [] [] [] [] [] | + procps-ng | [] | + procps-ng-man | [] | + psmisc | [] [] [] [] | + pspp | [] [] | + pushover | | + pwdutils | [] | + pyspread | [] [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] [] | + recutils | [] [] | + rpm | [] | + rush | [] [] [] | + sarg | [] [] | + sed | [] [] [] [] [] [] [] [] | + sharutils | [] [] [] | + shishi | [] [] | + skribilo | [] | + solfege | [] [] [] | + solfege-manual | [] [] | + spotmachine | [] [] | + sudo | [] [] [] [] [] [] | + sudoers | [] [] [] [] | + sysstat | [] [] [] [] [] | + tar | [] [] [] [] [] | + texinfo | [] [] [] | + texinfo_document | [] [] | + tigervnc | [] [] [] | + tin | [] | + tin-man | | + tracgoogleappsa... | [] [] [] [] | + trader | [] [] | + util-linux | [] [] | + ve | [] [] [] | + vice | | + vmm | | + vorbis-tools | [] [] [] | + wastesedge | | + wcd | | + wcd-man | | + wdiff | [] [] [] [] [] | + wget | [] [] [] [] [] | + wyslij-po | [] [] [] [] | + xboard | [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] | + +------------------------------------------------+ + nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + 7 3 6 114 1 12 88 32 82 3 40 45 7 101 + + sv sw ta te tg th tr uk ur vi wa wo zh_CN + +----------------------------------------------+ + a2ps | [] [] [] [] [] | + aegis | [] | + anubis | [] [] [] [] | + aspell | [] [] [] [] [] | + bash | [] [] [] [] | + bfd | [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] | + bison-runtime | [] [] [] [] [] [] | + buzztrax | [] [] [] | + ccd2cue | [] [] [] | + ccide | [] [] [] [] | + cflow | [] [] [] [] | + clisp | | + coreutils | [] [] [] | + cpio | [] [] [] [] [] | + cppi | [] [] [] [] | + cpplib | [] [] [] [] [] | + cryptsetup | [] [] [] | + datamash | [] [] [] | + denemo | [] | + dfarc | [] [] | + dialog | [] [] [] [] [] [] | + dico | [] | + diffutils | [] [] [] [] [] | + dink | [] | + direvent | [] [] | + doodle | [] [] | + dos2unix | [] [] [] [] | + dos2unix-man | [] [] [] | + e2fsprogs | [] [] [] [] | + enscript | [] [] [] [] | + exif | [] [] [] [] [] | + fetchmail | [] [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] | + freedink | [] [] [] | + fusionforge | | + gas | [] | + gawk | [] [] [] | + gcal | [] [] [] | + gcc | [] | + gdbm | [] [] | + gettext-examples | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] [] [] | + gjay | [] [] [] | + glunarclock | [] [] [] [] | + gnubiff | [] [] | + gnubik | [] [] [] [] | + gnucash | () () () () [] | + gnuchess | [] [] [] | + gnulib | [] [] [] [] | + gnunet | | + gnunet-gtk | | + gold | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] [] | + gramadoir | [] [] [] | + grep | [] [] [] [] [] | + grub | [] [] [] [] | + gsasl | [] [] [] [] | + gss | [] [] [] | + gst-plugins-bad | [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] | + gtkam | [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] [] [] [] | + hello | [] [] [] [] [] [] | + help2man | [] [] [] | + help2man-texi | [] | + hylafax | [] | + idutils | [] [] [] | + iso_15924 | [] () [] [] () [] | + iso_3166 | [] [] () [] [] () [] [] | + iso_3166_2 | () [] [] () [] | + iso_4217 | [] () [] [] () [] | + iso_639 | [] [] [] () [] [] () [] [] | + iso_639_3 | [] () [] [] () | + iso_639_5 | () [] () | + jwhois | [] [] [] [] | + kbd | [] [] [] [] | + klavaro | [] [] [] [] [] [] | + ld | [] [] [] [] [] | + leafpad | [] [] [] [] [] [] | + libc | [] [] [] [] [] | + libexif | [] [] () | + libextractor | [] [] | + libgnutls | [] [] [] [] | + libgphoto2 | [] [] [] | + libgphoto2_port | [] [] [] [] | + libgsasl | [] [] [] [] | + libiconv | [] [] [] [] [] | + libidn | () [] [] [] | + liferea | [] [] [] [] [] | + lilypond | [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] [] | + m4 | [] [] [] | + mailfromd | [] [] | + mailutils | [] | + make | [] [] [] [] | + man-db | [] [] [] | + man-db-manpages | [] [] | + midi-instruments | [] [] [] [] [] [] | + minicom | [] [] | + mkisofs | [] [] [] | + myserver | [] | + nano | [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] [] [] | + pies | [] [] | + pnmixer | [] [] [] | + popt | [] [] [] [] [] [] [] | + procps-ng | [] [] | + procps-ng-man | [] | + psmisc | [] [] [] [] | + pspp | [] [] [] | + pushover | [] | + pwdutils | [] [] | + pyspread | [] | + radius | [] [] | + recode | [] [] [] [] | + recutils | [] [] [] | + rpm | [] [] [] [] | + rush | [] [] | + sarg | | + sed | [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | [] [] | + skribilo | [] [] | + solfege | [] [] [] [] | + solfege-manual | [] | + spotmachine | [] [] [] | + sudo | [] [] [] [] [] | + sudoers | [] [] [] [] | + sysstat | [] [] [] [] [] | + tar | [] [] [] [] [] | + texinfo | [] [] [] | + texinfo_document | [] | + tigervnc | [] [] [] | + tin | [] | + tin-man | | + tracgoogleappsa... | [] [] [] [] [] | + trader | [] | + util-linux | [] [] [] [] | + ve | [] [] [] [] | + vice | () () | + vmm | | + vorbis-tools | [] [] | + wastesedge | | + wcd | [] [] [] | + wcd-man | [] | + wdiff | [] [] [] [] | + wget | [] [] [] | + wyslij-po | [] [] | + xboard | [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] | + +----------------------------------------------+ + sv sw ta te tg th tr uk ur vi wa wo zh_CN + 106 1 4 3 0 13 51 115 1 125 7 1 100 + + zh_HK zh_TW + +-------------+ + a2ps | | 30 + aegis | | 9 + anubis | | 19 + aspell | | 29 + bash | [] | 23 + bfd | | 11 + binutils | | 12 + bison | [] | 18 + bison-runtime | [] | 38 + buzztrax | | 9 + ccd2cue | | 10 + ccide | | 17 + cflow | | 16 + clisp | | 10 + coreutils | | 18 + cpio | | 20 + cppi | | 17 + cpplib | [] | 19 + cryptsetup | | 14 + datamash | | 11 + denemo | | 5 + dfarc | | 17 + dialog | [] | 42 + dico | | 6 + diffutils | | 22 + dink | | 10 + direvent | | 11 + doodle | | 12 + dos2unix | [] | 18 + dos2unix-man | | 9 + e2fsprogs | | 15 + enscript | | 21 + exif | | 27 + fetchmail | | 19 + findutils | | 29 + flex | [] | 19 + freedink | | 24 + fusionforge | | 3 + gas | | 5 + gawk | | 13 + gcal | | 8 + gcc | | 2 + gdbm | | 10 + gettext-examples | [] [] | 40 + gettext-runtime | [] [] | 35 + gettext-tools | [] | 24 + gjay | | 9 + glunarclock | [] | 27 + gnubiff | | 9 + gnubik | | 19 + gnucash | () | 6 + gnuchess | | 11 + gnulib | | 23 + gnunet | | 1 + gnunet-gtk | | 1 + gold | | 7 + gphoto2 | [] | 19 + gprof | | 21 + gramadoir | | 14 + grep | [] | 31 + grub | | 21 + gsasl | [] | 19 + gss | | 17 + gst-plugins-bad | | 21 + gst-plugins-base | | 27 + gst-plugins-good | | 32 + gst-plugins-ugly | | 34 + gstreamer | [] | 32 + gtick | | 19 + gtkam | | 24 + gtkspell | [] [] | 48 + guix | | 2 + guix-packages | | 0 + gutenprint | | 15 + hello | [] | 30 + help2man | | 18 + help2man-texi | | 5 + hylafax | | 5 + idutils | | 14 + iso_15924 | [] | 23 + iso_3166 | [] [] | 58 + iso_3166_2 | | 9 + iso_4217 | [] [] | 28 + iso_639 | [] [] | 46 + iso_639_3 | | 10 + iso_639_5 | | 2 + jwhois | [] | 20 + kbd | | 17 + klavaro | | 30 + ld | [] | 15 + leafpad | [] | 39 + libc | [] | 24 + libexif | | 10 + libextractor | | 5 + libgnutls | | 13 + libgphoto2 | | 10 + libgphoto2_port | [] | 19 + libgsasl | | 18 + libiconv | [] | 29 + libidn | | 17 + liferea | | 29 + lilypond | | 11 + lordsawar | | 3 + lprng | | 3 + lynx | | 19 + m4 | [] | 22 + mailfromd | | 4 + mailutils | | 6 + make | | 19 + man-db | | 15 + man-db-manpages | | 10 + midi-instruments | [] | 43 + minicom | [] | 17 + mkisofs | | 13 + myserver | | 9 + nano | [] | 30 + opcodes | | 12 + parted | [] | 23 + pies | | 4 + pnmixer | | 9 + popt | [] | 36 + procps-ng | | 5 + procps-ng-man | | 4 + psmisc | [] | 22 + pspp | | 13 + pushover | | 6 + pwdutils | | 8 + pyspread | | 6 + radius | | 9 + recode | | 31 + recutils | | 10 + rpm | [] | 13 + rush | | 10 + sarg | | 4 + sed | [] | 35 + sharutils | | 13 + shishi | | 7 + skribilo | | 7 + solfege | | 21 + solfege-manual | | 9 + spotmachine | | 11 + sudo | | 26 + sudoers | | 22 + sysstat | | 23 + tar | [] | 30 + texinfo | | 17 + texinfo_document | | 13 + tigervnc | | 14 + tin | [] | 7 + tin-man | | 1 + tracgoogleappsa... | [] | 22 + trader | | 12 + util-linux | | 13 + ve | | 14 + vice | | 1 + vmm | | 3 + vorbis-tools | | 13 + wastesedge | | 3 + wcd | | 8 + wcd-man | | 3 + wdiff | [] | 23 + wget | | 21 + wyslij-po | | 14 + xboard | | 10 + xdg-user-dirs | [] [] | 68 + xkeyboard-config | [] | 28 + +-------------+ + 89 teams zh_HK zh_TW + 166 domains 7 42 2809 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and distributed +as such by its maintainer. There might be an observable lag between the +mere existence a PO file and its wide availability in a distribution. + + If Jun 2014 seems to be old, you may fetch a more recent copy of this +'ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix +with full percentage details can be found at +'http://translationproject.org/extra/matrix.html'. + +1.5 Using 'gettext' in new packages +=================================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU 'gettext' in your +package. Of course you have to respect the GNU Lesser General Public +License which covers the use of the GNU 'gettext' library. This means +in particular that even non-free programs can use 'libintl' as a shared +library, whereas only free software can use 'libintl' as a static +library or use modified versions of 'libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of 'gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +'coordinator@translationproject.org' to make the '.pot' files available +to the translation teams. diff --git a/bash-5.1/AUTHORS b/bash-5.1/AUTHORS new file mode 100644 index 0000000000000000000000000000000000000000..9ad0ba282bfd350469bf07f9c403820f7b9e0e15 --- /dev/null +++ b/bash-5.1/AUTHORS @@ -0,0 +1,466 @@ +# +# Master author manifest for bash +# +# The files in lib/intl were taken from the GNU gettext distribution. +# +# Any files appearing in the bash distribution not listed in this file +# were created by Chet Ramey. +# +# Filename authors (first is original author) +# +README Brian Fox, Chet Ramey +INSTALL Brian Fox, Chet Ramey +COPYING Brian Fox, Chet Ramey +MANIFEST Brian Fox, Chet Ramey +configure Chet Ramey +Makefile.in Brian Fox, Chet Ramey +configure.in Chet Ramey +aclocal.m4 Chet Ramey +config.h.top Chet Ramey +config.h.bot Chet Ramey +config.h.in Chet Ramey +array.c Chet Ramey +print_cmd.c Brian Fox, Chet Ramey +general.c Brian Fox, Chet Ramey +variables.c Brian Fox, Chet Ramey +make_cmd.c Brian Fox, Chet Ramey +copy_cmd.c Brian Fox, Chet Ramey +unwind_prot.c Brian Fox, Chet Ramey +dispose_cmd.c Brian Fox, Chet Ramey +getcwd.c Roland McGrath, Brian Fox, Chet Ramey +bashhist.c Chet Ramey +hash.c Brian Fox, Chet Ramey +parse.y Brian Fox, Chet Ramey +subst.c Brian Fox, Chet Ramey +shell.c Brian Fox, Chet Ramey +sig.c Chet Ramey +trap.c Brian Fox, Chet Ramey +siglist.c Brian Fox, Chet Ramey +version.c Brian Fox, Chet Ramey +flags.c Brian Fox, Chet Ramey +jobs.c Brian Fox, Chet Ramey +input.c Chet Ramey +mailcheck.c Brian Fox, Chet Ramey +pathexp.c Chet Ramey +test.c Brian Fox, Chet Ramey +expr.c Chet Ramey, Brian Fox +alias.c Brian Fox, Chet Ramey +execute_cmd.c Brian Fox, Chet Ramey +bashline.c Brian Fox, Chet Ramey +braces.c Brian Fox, Chet Ramey +bracecomp.c Brian Fox, Chet Ramey, Tom Tromey +nojobs.c Brian Fox, Chet Ramey +vprint.c Chet Ramey +oslib.c Chet Ramey +error.c Brian Fox, Chet Ramey +xmalloc.c Brian Fox, Chet Ramey +alias.h Brian Fox, Chet Ramey +array.h Chet Ramey +builtins.h Brian Fox, Chet Ramey +parser.h Brian Fox, Chet Ramey +variables.h Brian Fox, Chet Ramey +machines.h Brian Fox, Chet Ramey +jobs.h Brian Fox, Chet Ramey +maxpath.h Brian Fox, Chet Ramey +pathexp.h Chet Ramey +mailcheck.h Chet Ramey +filecntl.h Brian Fox, Chet Ramey +hash.h Brian Fox, Chet Ramey +quit.h Brian Fox, Chet Ramey +flags.h Brian Fox, Chet Ramey +shell.h Brian Fox, Chet Ramey +bashjmp.h Chet Ramey +sig.h Chet Ramey +trap.h Brian Fox, Chet Ramey +general.h Brian Fox, Chet Ramey +unwind_prot.h Brian Fox, Chet Ramey +input.h Brian Fox, Chet Ramey +error.h Brian Fox, Chet Ramey +command.h Brian Fox, Chet Ramey +externs.h Chet Ramey +siglist.h Chet Ramey +subst.h Brian Fox, Chet Ramey +dispose_cmd.h Brian Fox, Chet Ramey +bashansi.h Brian Fox, Chet Ramey +make_cmd.h Brian Fox, Chet Ramey +bashhist.h Chet Ramey +bashline.h Chet Ramey +execute_cmd.h Chet Ramey +bashtypes.h Chet Ramey +bashtty.h Chet Ramey +pathnames.h Chet Ramey +y.tab.c Brian Fox, Chet Ramey +y.tab.h Brian Fox, Chet Ramey +parser-built Brian Fox, Chet Ramey +posixstat.h Brian Fox, Chet Ramey +stdc.h Chet Ramey +ansi_stdlib.h Brian Fox, Chet Ramey +memalloc.h Chet Ramey +builtins/ChangeLog Brian Fox, Chet Ramey +builtins/Makefile.in Brian Fox, Chet Ramey +builtins/alias.def Brian Fox, Chet Ramey +builtins/bind.def Brian Fox, Chet Ramey +builtins/break.def Brian Fox, Chet Ramey +builtins/builtin.def Brian Fox, Chet Ramey +builtins/caller.def Rocky Bernstein, Chet Ramey +builtins/cd.def Brian Fox, Chet Ramey +builtins/colon.def Brian Fox, Chet Ramey +builtins/command.def Brian Fox, Chet Ramey +builtins/common.c Brian Fox, Chet Ramey +builtins/declare.def Brian Fox, Chet Ramey +builtins/echo.def Brian Fox, Chet Ramey +builtins/enable.def Brian Fox, Chet Ramey +builtins/eval.def Brian Fox, Chet Ramey +builtins/exec.def Brian Fox, Chet Ramey +builtins/exit.def Brian Fox, Chet Ramey +builtins/fc.def Brian Fox, Chet Ramey +builtins/fg_bg.def Brian Fox, Chet Ramey +builtins/getopt.c Roland McGrath, Brian Fox, Chet Ramey +builtins/getopt.h Roland McGrath, Brian Fox, Chet Ramey +builtins/getopts.def Brian Fox, Chet Ramey +builtins/hash.def Brian Fox, Chet Ramey +builtins/hashcom.h Brian Fox, Chet Ramey +builtins/help.def Brian Fox, Chet Ramey +builtins/let.def Chet Ramey, Brian Fox +builtins/history.def Brian Fox, Chet Ramey +builtins/jobs.def Brian Fox, Chet Ramey +builtins/kill.def Brian Fox, Chet Ramey +builtins/mapfile.def Rocky Bernstein +builtins/mkbuiltins.c Brian Fox, Chet Ramey +builtins/pushd.def Brian Fox, Chet Ramey +builtins/read.def Brian Fox, Chet Ramey +builtins/reserved.def Brian Fox, Chet Ramey +builtins/return.def Brian Fox, Chet Ramey +builtins/set.def Brian Fox, Chet Ramey +builtins/setattr.def Brian Fox, Chet Ramey +builtins/shift.def Brian Fox, Chet Ramey +builtins/shopt.def Chet Ramey +builtins/source.def Brian Fox, Chet Ramey +builtins/suspend.def Brian Fox, Chet Ramey +builtins/test.def Brian Fox, Chet Ramey +builtins/times.def Brian Fox, Chet Ramey +builtins/trap.def Brian Fox, Chet Ramey +builtins/type.def Brian Fox, Chet Ramey +builtins/ulimit.def Chet Ramey, Brian Fox +builtins/umask.def Brian Fox, Chet Ramey +builtins/wait.def Brian Fox, Chet Ramey +builtins/psize.c Chet Ramey, Brian Fox +builtins/psize.sh Chet Ramey, Brian Fox +builtins/inlib.def Chet Ramey +builtins/bashgetopt.c Chet Ramey +builtins/common.h Chet Ramey +builtins/bashgetopt.h Chet Ramey +lib/doc-support/texindex.c bug-texinfo@prep.ai.mit.edu, Chet Ramey +lib/doc-support/Makefile.in Chet Ramey +lib/doc-support/getopt.h Roland McGrath +lib/doc-support/getopt.c Roland McGrath +lib/doc-support/getopt1.c Roland McGrath +lib/glob/ChangeLog Brian Fox, Chet Ramey +lib/glob/Makefile.in Brian Fox, Chet Ramey +lib/glob/strmatch.c Roland McGrath, Brian Fox, Chet Ramey +lib/glob/strmatch.h Roland McGrath, Brian Fox, Chet Ramey +lib/glob/glob.c Richard Stallman, Roland McGrath, Brian Fox, Chet Ramey +lib/glob/glob.h Chet Ramey +lib/glob/ndir.h Doug Gwyn, Richard Stallman +lib/glob/doc/Makefile.in Brian Fox, Chet Ramey +lib/glob/doc/glob.texi Brian Fox, Chet Ramey +lib/malloc/Makefile.in Chet Ramey +lib/malloc/alloca.c Doug Gwyn, Richard Stallman, Brian Fox, Chet Ramey +lib/malloc/getpagesize.h Brian Fox, Chet Ramey +lib/malloc/malloc.c Chris Kingsley, Mike Muuss, Richard Stallman, Brian Fox, Chet Ramey +lib/malloc/gmalloc.c Mike Haertel, Roland McGrath +lib/malloc/stub.c Chet Ramey +lib/malloc/i386-alloca.s Richard Stallman +lib/malloc/x386-alloca.s Chip Salzenberg, Richard Stallman +lib/malloc/xmalloc.c Brian Fox, Chet Ramey +lib/posixheaders/posixstat.h Brian Fox, Chet Ramey +lib/posixheaders/ansi_stdlib.h Brian Fox, Chet Ramey +lib/posixheaders/stdc.h Chet Ramey +lib/posixheaders/memalloc.h Chet Ramey +lib/posixheaders/filecntl.h Brian Fox, Chet Ramey +lib/readline/Makefile.in Brian Fox, Chet Ramey +lib/readline/COPYING Brian Fox, Chet Ramey +lib/readline/ChangeLog Brian Fox, Chet Ramey +lib/readline/readline.c Brian Fox, Chet Ramey +lib/readline/vi_mode.c Brian Fox, Chet Ramey +lib/readline/emacs_keymap.c Brian Fox, Chet Ramey +lib/readline/vi_keymap.c Brian Fox, Chet Ramey +lib/readline/funmap.c Brian Fox, Chet Ramey +lib/readline/keymaps.c Brian Fox, Chet Ramey +lib/readline/xmalloc.c Brian Fox, Chet Ramey +lib/readline/search.c Brian Fox, Chet Ramey +lib/readline/isearch.c Brian Fox, Chet Ramey +lib/readline/parens.c Brian Fox, Chet Ramey +lib/readline/rltty.c Brian Fox, Chet Ramey +lib/readline/complete.c Brian Fox, Chet Ramey +lib/readline/bind.c Brian Fox, Chet Ramey +lib/readline/display.c Brian Fox, Chet Ramey +lib/readline/signals.c Brian Fox, Chet Ramey +lib/readline/kill.c Brian Fox, Chet Ramey +lib/readline/undo.c Brian Fox, Chet Ramey +lib/readline/input.c Brian Fox, Chet Ramey +lib/readline/macro.c Brian Fox, Chet Ramey +lib/readline/util.c Brian Fox, Chet Ramey +lib/readline/callback.c Chet Ramey +lib/readline/readline.h Brian Fox, Chet Ramey +lib/readline/chardefs.h Brian Fox, Chet Ramey +lib/readline/keymaps.h Brian Fox, Chet Ramey +lib/readline/rldefs.h Brian Fox, Chet Ramey +lib/readline/posixstat.h Brian Fox, Chet Ramey +lib/readline/ansi_stdlib.h Brian Fox, Chet Ramey +lib/readline/memalloc.h Chet Ramey +lib/readline/rlconf.h Chet Ramey +lib/readline/rltty.h Chet Ramey +lib/readline/history.c Brian Fox, Chet Ramey +lib/readline/histexpand.c Brian Fox, Chet Ramey +lib/readline/histfile.c Brian Fox, Chet Ramey +lib/readline/histsearch.c Brian Fox, Chet Ramey +lib/readline/history.h Brian Fox, Chet Ramey +lib/readline/histlib.h Brian Fox, Chet Ramey +lib/readline/tilde.c Brian Fox, Chet Ramey +lib/readline/tilde.h Brian Fox, Chet Ramey +lib/readline/doc/texindex.c bug-texinfo@prep.ai.mit.edu, Chet Ramey +lib/readline/doc/Makefile Brian Fox, Chet Ramey +lib/readline/doc/rlman.texinfo Brian Fox, Chet Ramey +lib/readline/doc/rltech.texinfo Brian Fox, Chet Ramey +lib/readline/doc/rluser.texinfo Brian Fox, Chet Ramey +lib/readline/doc/hist.texinfo Brian Fox, Chet Ramey +lib/readline/doc/hstech.texinfo Brian Fox, Chet Ramey +lib/readline/doc/hsuser.texinfo Brian Fox, Chet Ramey +lib/readline/examples/Makefile Brian Fox +lib/readline/examples/fileman.c Brian Fox +lib/readline/examples/manexamp.c Brian Fox +lib/readline/examples/histexamp.c Brian Fox, Chet Ramey +lib/readline/examples/rltest.c Brian Fox, Chet Ramey +lib/readline/examples/Inputrc Brian Fox, Chet Ramey +lib/termcap/Makefile.in David MacKenzie, Chet Ramey +lib/termcap/termcap.c David MacKenzie +lib/termcap/termcap.h David MacKenzie +lib/termcap/tparam.c David MacKenzie +lib/termcap/version.c David MacKenzie +lib/termcap/grot/termcap.info David MacKenzie +lib/termcap/grot/termcap.info-1 David MacKenzie +lib/termcap/grot/termcap.info-2 David MacKenzie +lib/termcap/grot/termcap.info-3 David MacKenzie +lib/termcap/grot/termcap.info-4 David MacKenzie +lib/termcap/grot/NEWS David MacKenzie +lib/termcap/grot/INSTALL David MacKenzie +lib/termcap/grot/ChangeLog David MacKenzie +lib/termcap/grot/texinfo.tex David MacKenzie +lib/termcap/grot/termcap.texi David MacKenzie +lib/termcap/grot/Makefile.in David MacKenzie +lib/termcap/grot/configure David MacKenzie +lib/termcap/grot/configure.in David MacKenzie +lib/termcap/grot/COPYING David MacKenzie +lib/termcap/grot/README David MacKenzie +lib/tilde/ChangeLog Brian Fox, Chet Ramey +lib/tilde/Makefile.in Brian Fox, Chet Ramey +lib/tilde/doc/tilde.texi Brian Fox, Chet Ramey +lib/tilde/doc/Makefile Brian Fox, Chet Ramey +lib/tilde/tilde.c Brian Fox, Chet Ramey +lib/tilde/tilde.h Brian Fox, Chet Ramey +lib/tilde/memalloc.h Brian Fox, Chet Ramey +CWRU/misc/open-files.c Chet Ramey +CWRU/misc/sigs.c Chet Ramey +CWRU/misc/pid.c Chet Ramey +CWRU/misc/sigstat.c Chet Ramey +CWRU/misc/bison Chet Ramey +CWRU/misc/aux-machine-desc Chet Ramey +CWRU/PLATFORMS Chet Ramey +CWRU/README Chet Ramey +CWRU/CWRU.CHANGES.051093 Chet Ramey +CWRU/POSIX.NOTES Chet Ramey +CWRU/CWRU.CHANGES.071193 Chet Ramey +CWRU/CWRU.CHANGES.090393 Chet Ramey +doc/Makefile.in Brian Fox, Chet Ramey +doc/bash.1 Chet Ramey +doc/builtins.1 Chet Ramey +doc/bash.ps Chet Ramey +doc/bash.txt Chet Ramey +doc/readline.3 Chet Ramey +doc/readline.ps Chet Ramey +doc/readline.txt Chet Ramey +doc/texinfo.tex Richard Stallman +doc/features.texi Brian Fox, Chet Ramey +doc/features.ps Brian Fox, Chet Ramey +doc/features.info Brian Fox, Chet Ramey +doc/features.dvi Brian Fox, Chet Ramey +doc/bash_builtins.1 Chet Ramey +doc/bash_builtins.ps Chet Ramey +doc/bash_builtins.txt Chet Ramey +doc/bash_builtins.readme Chet Ramey +doc/article.ms Chet Ramey +doc/FAQ Chet Ramey +support/cat-s Brian Fox, Chet Ramey +support/mksysdefs Brian Fox, Chet Ramey +support/mkversion.c Brian Fox, Chet Ramey +support/mksignames.c Brian Fox, Chet Ramey +support/getcppsyms.c Brian Fox, Chet Ramey +support/cppmagic Brian Fox, Chet Ramey +support/pagesize.sh Chet Ramey, Brian Fox +support/pagesize.c Chet Ramey, Brian Fox +support/bash.xbm Brian Fox +support/FAQ Brian Fox +support/PORTING Brian Fox +support/mklinks Brian Fox +support/fixlinks Chet Ramey +support/mkdirs Chet Ramey +support/clone-bash Chet Ramey +support/bashbug.sh Chet Ramey +support/mkmachtype Chet Ramey +support/recho.c Chet Ramey +support/config.guess Per Bothner, Chet Ramey +support/config.sub Richard Stallman, Chet Ramey +support/install.sh MIT X Consortium (X11R5) +support/endian.c Chet Ramey +support/printenv Chet Ramey +examples/precedence-tester Brian Fox, Chet Ramey +examples/functions/substr Brian Fox, Chet Ramey +examples/functions/kshenv Chet Ramey +examples/functions/autoload Chet Ramey +examples/functions/csh-compat Brian Fox, Chet Ramey +examples/functions/shcat Chet Ramey +examples/functions/substr2 Chet Ramey +examples/functions/term Chet Ramey +examples/functions/whatis Chet Ramey +examples/functions/whence Chet Ramey +examples/functions/func Chet Ramey +examples/functions/dirname Brian Fox, Noah Friedman +examples/functions/basename Brian Fox, Noah Friedman +examples/functions/exitstat Noah Friedman, Roland McGrath +examples/functions/external Noah Friedman +examples/functions/fact Brian Fox +examples/functions/manpage Tom Tromey +examples/functions/fstty Chet Ramey +examples/functions/jj.bash Chet Ramey +examples/functions/notify.bash Chet Ramey +examples/loadables/getconf.c J.T. Conklin +examples/scripts/shprompt Chet Ramey +examples/scripts/adventure.sh Chet Ramey, Doug Gwyn +examples/scripts/bcsh.sh Chris Robertson, Chet Ramey +examples/startup-files/Bashrc Brian Fox +examples/startup-files/Bash_aliases Brian Fox +examples/startup-files/Bash_profile Brian Fox +examples/startup-files/bash-profile Brian Fox +examples/startup-files/bashrc Chet Ramey +examples/suncmd.termcap Brian Fox, Chet Ramey +examples/alias-conv.sh Brian Fox, Chet Ramey +tests/README Chet Ramey +tests/arith.tests Chet Ramey +tests/arith.right Chet Ramey +tests/array.tests Chet Ramey +tests/array.right Chet Ramey +tests/dollar-at.sh Chet Ramey +tests/dollar-star.sh Chet Ramey +tests/dollar.right Chet Ramey +tests/exp-tests Chet Ramey +tests/exp.right Chet Ramey +tests/glob-test Chet Ramey +tests/glob.right Chet Ramey +tests/ifs-test-1.sh Chet Ramey +tests/ifs-test-2.sh Chet Ramey +tests/ifs-test-3.sh Chet Ramey +tests/ifs.1.right Chet Ramey +tests/ifs.2.right Chet Ramey +tests/ifs.3.right Chet Ramey +tests/input-line.sh Chet Ramey +tests/input-line.sub Chet Ramey +tests/input.right Chet Ramey +tests/minus-e Chet Ramey +tests/minus-e.right Chet Ramey +tests/new-exp.tests Chet Ramey +tests/new-exp.right Chet Ramey +tests/prec.right Chet Ramey +tests/precedence Chet Ramey +tests/run-all Chet Ramey +tests/run-dollars Chet Ramey +tests/run-exp-tests Chet Ramey +tests/run-glob-test Chet Ramey +tests/run-ifs-tests Chet Ramey +tests/run-input-test Chet Ramey +tests/run-minus-e Chet Ramey +tests/run-new-exp Chet Ramey +tests/run-precedence Chet Ramey +tests/run-set-e-test Chet Ramey +tests/run-strip Chet Ramey +tests/run-varenv Chet Ramey +tests/set-e-test Chet Ramey +tests/set-e.right Chet Ramey +tests/strip.tests Chet Ramey +tests/strip.right Chet Ramey +tests/tilde-tests Chet Ramey +tests/tilde.right Chet Ramey +tests/unicode1.sub Chet Ramey, John Kearney +tests/varenv.right Chet Ramey +tests/varenv.sh Chet Ramey +tests/misc/chld-trap.sh Chet Ramey +tests/misc/dot-test-1.sh Chet Ramey +tests/misc/dot-test-1.sub Chet Ramey +tests/misc/gotest Chet Ramey +tests/misc/perf-script Chet Ramey +tests/misc/redir.t1.sh Chet Ramey +tests/misc/redir.t2.sh Chet Ramey +tests/misc/redir.t3.sh Chet Ramey +tests/misc/redir.t3.sub Chet Ramey +tests/misc/redir.t4.sh Chet Ramey +tests/misc/run.r1.sh Chet Ramey +tests/misc/run.r2.sh Chet Ramey +tests/misc/run.r3.sh Chet Ramey +tests/misc/sigint.t1.sh Chet Ramey +tests/misc/sigint.t2.sh Chet Ramey +tests/misc/sigint.t3.sh Chet Ramey +tests/misc/sigint.t4.sh Chet Ramey +tests/misc/test-minus-e.1 Chet Ramey +tests/misc/test-minus-e.2 Chet Ramey +lib/sh/Makefile.in Chet Ramey +lib/sh/clktck.c Chet Ramey +lib/sh/clock.c Chet Ramey +lib/sh/fmtullong.c Chet Ramey +lib/sh/fmtulong.c Chet Ramey +lib/sh/getcwd.c Chet Ramey, Roland McGrath +lib/sh/getenv.c Chet Ramey, Brian Fox +lib/sh/inet_aton.c Chet Ramey, Ulrich Drepper, Paul Vixie +lib/sh/itos.c Chet Ramey +lib/sh/mailstat.c Chet Ramey +lib/sh/makepath.c Chet Ramey +lib/sh/mktime.c Chet Ramey, Paul Eggert +lib/sh/netconn.c Chet Ramey +lib/sh/netopen.c Chet Ramey +lib/sh/oslib.c Chet Ramey, Brian Fox +lib/sh/pathcanon.c Chet Ramey +lib/sh/pathphys.c Chet Ramey +lib/sh/rename.c Chet Ramey +lib/sh/setlinebuf.c Chet Ramey, Brian Fox +lib/sh/shquote.c Chet Ramey +lib/sh/shtty.c Chet Ramey +lib/sh/snprintf.c Chet Ramey, Unknown +lib/sh/spell.c Chet Ramey +lib/sh/strcasecmp.c Chet Ramey, Brian Fox +lib/sh/strerror.c Chet Ramey, Brian Fox +lib/sh/strftime.c Arnold Robbins +lib/sh/strindex.c Chet Ramey +lib/sh/stringlist.c Chet Ramey +lib/sh/stringvec.c Chet Ramey +lib/sh/strpbrk.c Roland McGrath +lib/sh/strtod.c Chet Ramey, Roland McGrath +lib/sh/strtoimax.c Chet Ramey, Paul Eggert +lib/sh/strtol.c Chet Ramey, Paul Eggert +lib/sh/strtoll.c Chet Ramey, Paul Eggert +lib/sh/strtoul.c Chet Ramey, Paul Eggert +lib/sh/strtoull.c Chet Ramey, Paul Eggert +lib/sh/strtoumax.c Chet Ramey, Paul Eggert +lib/sh/strtrans.c Chet Ramey +lib/sh/times.c Chet Ramey, Brian Fox +lib/sh/timeval.c Chet Ramey +lib/sh/tmpfile.c Chet Ramey +lib/sh/vprint.c Chet Ramey, Brian Fox +lib/sh/xstrchr.c Chet Ramey, Mitsuru Chinen +lib/sh/zread.c Chet Ramey +lib/sh/zwrite.c Chet Ramey + +tests/posix-ifs.sh Glenn Fowler + +support/checkbashisms Julian Gilbey, Debian Linux team + +lib/readline/colors.c Richard Stallman, David MacKenzie +lib/readline/parse-colors.c Richard Stallman, David MacKenzie diff --git a/bash-5.1/CHANGES b/bash-5.1/CHANGES new file mode 100644 index 0000000000000000000000000000000000000000..7a47c7c57a8899e55d57204791d247a2a041f5bc --- /dev/null +++ b/bash-5.1/CHANGES @@ -0,0 +1,10312 @@ +This document details the changes between this version, bash-5.1-rc3, and +the previous version, bash-5.1-rc2. + +1. Changes to Bash + +a. The `assoc_expand_once' option now affects the evaluation of the -v primary + to test and the [[ compound command. + +2. Changes to Readline + +a. Fixed a bug that could cause point to be set beyond the end of the line + buffer when aborting an incremental search. + +3. New Features in Bash + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-rc2, and +the previous version, bash-5.1-rc1. + +1. Changes to Bash + +a. Process substitutions started from an interactive shell no longer have their + standard input implicitly redirected from /dev/null. + +b. Fixed an issue with setting the SIGINT trap handler in an interactive shell + when temporarily running $PROMPT_COMMAND non-interactively. + +2. Changes to Readline + +a. Terminals that are named "dumb" or unknown do not enable bracketed paste + by default. + +b. Ensure that disabling bracketed paste turns off highlighting the incremental + search string when the search is successful. + +3. New Features in Bash + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-rc1, and +the previous version, bash-5.1-beta. + +1. Changes to Bash + +a. Fixed an inconsistency in the way HISTCMD is calculated when it's expanded + during a multi-line command. + +b. Modified the change to here-document expansion containing backslash-quoted + double quotes. + +c. Fixed a case where the shells's exit status could be greater than 255. + +d. Modified changed to process substitution so the executed command has its + stdin redirected from /dev/null if it was previously interactive and + reading commands from the terminal. + +2. New Features in Bash + +a. There is a new contributed loadable builtin: asort. + +3. Changes to Readline + +a. Fixed a bug that could cause an application with an application-specific + redisplay function to crash if the line data structures had not been + initialized. + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-beta, and +the previous version, bash-5.1-alpha. + +1. Changes to Bash + +a. Fixed a bug that caused name references to variables to not update the + referenced variable's assignment side effects. + +b. Tightened up the parameter transformation error checking for invalid + transformation operators. + +c. System-specific changes for: FreeBSD + +d. A few minor changes to move potential uses of stdio functions out of signal + handling paths. + +e. Make sure SIGCHLD is blocked in all cases where waitchld() is not called + from a signal handler. + +f. Changed `command' builtin processing so it no longer starts an extra process + when run asynchronously (command x &). + +g. Avoid performing tilde expansion after `:' in words that look like assignment + statements when in posix mode. + +h. Slight changes to how the `complete' builtin prints out options and actions + for completion specifications. + +i. Several changes to how `local -' restores the values of options and + $SHELLOPTS. + +j. Don't treat a word in a compound assignment as an assignment statement + unless it has a valid subscript before the `='. + +k. Fixed a bug with the DEBUG trap and process substitution that caused the + terminal's process group to be set incorrectly. + +l. Fixed a bug that left readline's signal handlers installed while running a + shell command from a bindable readline command. + +m. Fixed the `fc' builtin to clamp out of range history specifications at the + boundaries of the history list for POSIX conformance. + +n. Fixed a bug that caused ${foo@a} to treat foo as an unset variable if it + was an array without a value for subscript 0/"0" but had other set + elements. + +o. Fixed a bug that caused the history code to attempt to parse command + substitutions looking for shell comments before adding them to the history, + even while parsing here-documents. + +p. Fixed a bug that could cause a syntax error in a command read by `eval' to + exit an interactive shell. + +2. New Features in Bash + +a. If the hash builtin is listing hashed filenames portably, don't print + anything if the table is empty. + +b. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component. + +c. Bash attempts to optimize away forks in the last command in a function body + under appropriate circumstances. + +d. The globbing code now uses fnmatch(3) to check collation elements (if + available) even in cases without multibyte characters. + +e. The `fg' and `bg' builtins now return an error in a command substitution + when asked to restart a job inherited from the parent shell. + +f. The shell now attempts to unlink all FIFOs on exit, whether a consuming + process has finished with them or not. + +3. Changes to Readline + +a. Make sure that all undo groups are closed when leaving vi insertion mode. + +b. Make sure that the vi-mode `C' and `c' commands enter insert mode even if + the motion command doesn't have any effect. + +c. Fixed several potential memory leaks in the callback mode context handling. + +d. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while + executing the terminal cleanup code, since it's no longer run in a signal + handling context. + +4. New Features in Readline + +a. The signal cleanup code now blocks SIGINT while processing after a SIGINT. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-alpha, and +the previous version, bash-5.0-release. + +1. Changes to Bash + +a. Fixed a bug that caused a posix-mode shell to not exit if the return builtin + was executed outside a function or dot script. + +b. Fixed a bug where `declare +f' could potentially turn off the function + attribute. + +c. Restored bash-4.4 pathname expansion behavior when a word to be expanded had + only backslashes, not any of the other globbing characters. This came after + an extensive POSIX group discussion (interp #1234). + +d. There are more changes to avoid performing word expansions multiple times on + arithmetic expressions. + +e. Fixed a bug with alias expansion when the alias ends with a TAB. + +f. Fixed a bug that caused programmable completion to return an error if the + shell function name supplied as an argument to `complete -F' was invalid. + +g. There are several fixes to buffer overflows found as the result of fuzzing + with random input. + +h. Fixed a bug that caused the edit-and-execute-command editing command to + start with the previous history line if invoked on an empty line. + +i. Fixed a bug that potentially caused `bind --help' to change readline's + output stream. + +j. Turning off posix mode now restores the vi-insertion mode binding for TAB + that was in effect when posix mode was enabled. + +k. Restore the previous state of job control being enabled if `exec' fails in + an interactive shell. + +l. Fixed a bug that caused the terminal's process group to be set incorrectly + if job control was turned off before starting an interactive shell. + +m. Fixed a bug that caused a crash when HISTSIZE=0. + +n. Fixed a word expansion bug that caused null strings on the rhs of expansions + to be discarded incorrectly. + +o. History list management does a better job of handling the situation where + the number of history entries from the current shell session is greater than + the number of entries in the history list. + +p. Fixed a bug that caused the `fc' builtin to attempt to dereference a newly- + freed history entry. + +q. Fixed a bug that made the `Q' variable transformation not work well with + `set -u'. + +r. There are several word expansion fixes for expanding $* and $@ in contexts + where word splitting is not going to be performed, since each positional + parameter must expand to a separate word. + +s. Fixed a bug that could cause ^D to exit bash immediately even if there were + stopped jobs. + +t. Fixed a bug with double-quoting and backslash-quoting strings containing + multibyte characters for reuse. + +u. Fixed a bug that caused the line number to be reported incorrectly if the + shell executed a (command) subshell. + +v. Fixed a bug that caused the shell to fail to reap process substitutions + when they went out of scope, which had unpredictable results. + +w. Fixed a bug that caused null strings in arguments to [[ conditional command + operators to compare incorrectly. + +x. Changed the behavior of `wait' without arguments to only wait for background + processes the current shell instance started, not background children it may + have inherited. + +y. Fixed a bug that could cause command substitution to leave file descriptors + open if the shell received many SIGINTs. + +z. Bash now behaves better if the `**' filename expansion operator encounters a + symbolic link to a directory, avoiding more cases where it might return + duplicate pathnames. + +aa. Programmable completion now canonicalizes directory names in the same way + as bash word completion, so `..' is handled consistently. + +bb. Fixed a bug when using RETURN as the delimiter to the read builtin; it + caused readline to set the binding for RETURN incorrectly. + +cc. Fixed a bug that caused `history -d' to delay printing an out-of-range + error message. + +dd. Fixed a bug with `bash -c command' where `command' ends with an expanded + alias. + +ee. Fixed a bug that could result in `history -n' adding spurious line feeds to + commands in the history list. + +ff. The $RANDOM random number generator now XORs the top and bottom halves of + the internal 32-bit value to introduce more randomness. Setting the shell + compatibility level to 50 or lower undoes this. + +gg. Fixed several problems caused by running the DEBUG trap on simple commands + executed as part of a pipeline. + +ii. Fixed a bug that didn't allow `bind -r' to remove the binding for \C-@. + +jj. Several fixes to the bash-backward-shellword bindable readline command to + behave better when at the last character on the line. + +kk. If `set -x' is enabled, bash doesn't print a command twice if it's run by + the `command' builtin. + +ll. Fixed a bug with printing function definitions containing here documents. + +mm. Fixed a bug that could cause the `bind' builtin to set $? to -1. + +nn. Fixed a bug that didn't reset the timezone information correctly when the + TZ variable was unset. + +oo. Fixed several issues with assigning an associative array variable using a + compound assignment that expands the value of the same variable. + +pp. Fixed several places where the shell set $? without setting PIPESTATUS. + +qq. Fixed a problem with glob bracket expressions containing invalid character + classes, collating symbols, or equivalence classes -- they should not + require a closing right bracket. + +rr. Fixed a bug where running a builtin in a subshell did not run the EXIT trap. + +ss. Fixed several problems with posix-mode variable assignments preceding + shell function calls and posix special builtins, so that they create and + modify variables at the current scope. + +tt. Fix history initialization so `bash +o history' works as expected. + +uu. Fixed a bug in the bindable edit-and-execute-command command that could + interfere with the shell's parsing state. + +vv. Fixed an issue with nested traps running command substitutions in command + lines with command substitutions. + +ww. Fixed a bug with globbing pathnames that contain invalid multibyte + characters (sequences that don't correspond to a character in the current + locale). + +xx. Fixed a bug that caused the shell not to exit if a function definition + failed while errexit was enabled. + +yy. Process substitution processes now get their input from /dev/null, since + they are asynchronous, not interactive, and not jobs. + +zz. Setting nocaseglob no longer turns on case-insensitive regexp matching. + +aaa. Fixed a bug that resulted in extra blank lines being added to some history + entries containing here-documents. + +bbb. Fixed a bug that resulted in incorrect matching of some patterns in word + expansion if they expanded to the empty string. + +ccc. Fixed here-string expansion so it behaves the same as expansion of the + rhs of an assignment statement. + +ddd. Changed here-document parsing to no longer allow the end of the here + document to delimit a command substitution. + +eee. Several fixes to history expansion: multiple :p modifiers work, a ^ word + designator works as part of a range, and a `-' is treated as part of a + search string if it immediately follows a `!'. + +fff. Fixed a bug in pattern substitution with null matches in a string + containing multibyte characters. + +ggg. Unbinding a key sequence bound with `bind -x' now removes the key sequence + from the additional keymap `bind -x' uses. + +hhh. Fixed a bug with command start detection for completion so that it doesn't + mistake brace expansion for the start of a command. + +iii. Fixed a bug that caused local variables with the same name as variables + appearing in a function's temporary environment to not be marked as local. + +jjj. Fixed a bug that could cause SIGCHLD to be blocked when executing return + or exec in the rightmost pipeline element with lastpipe enabled. + +kkk. Fixed a bug that could result in commands without the execute bit set + being added to the command hash table. + +lll. Fixed a bug that allowed non-digits to follow the `#' in a `base#number' + integer constant. + +mmm. Fixed a bug that made `time -- command' attempt to execute `--'. + +nnn. Fixed a couple of bugs with variable transformation using arrays + subscripted with `*' or `@'. + +ooo. A failure to create a variable using `declare' in a function no longer + causes the function to return immediately. + +ppp. Fixed a bug that could cause the := word expansion to add a non-null + value if attempting to assign a null string when double-quoted. + +qqq. Fixed a bug that could cause backslashes quoting double quotes in here + document bodies to not be removed when expanding the body. + +rrr. Fixed a bug that caused commands following a subshell while the shell is + reading input from stdin but not interactive, while job control is + enabled, to be executed twice. + +sss. Fixed a bug where receiving SIGTERM from a different process while + readline was active could cause the shell to terminate. + +ttt. In posix mode, running a trap after the read builtin now sees the exit + status of the read builtin (e.g., 130 after a SIGINT) in $?. + +uuu. Fixed a bug with nameref variables referencing array subscripts used in + arithmetic expressions. + +vvv. Fixed a bug that caused the pipeline process group id to be reset in the + middle of a command list run by a shell started to run a command + substitution. + +www. Restricted shells can no longer read and write history files with pathnames + containing slashes. + +xxx. Fixed a couple of problems with 0 and -0 used as arguments to `fc' when + not listing commands from the history. + +yyy. When `test' is supplied four or more arguments, treat an argument that + looks like an operator (e.g., -e), but is in a place where only a string + is valid, as a string, as it would be when using the POSIX rules, instead + of an operator with a missing argument. + +zzz. There is no `compat50' shopt option. Changes to the shell compatibility + level should use the BASH_COMPAT variable. + +aaaa. Redirection failures with compound commands are now treated as errors + that cause the shell to exit if `errexit' is enabled. + +bbbb. Redirection failure error messages no longer expand the word in the + redirection again. + +cccc. History expansion is no longer performed while parsing a here-document + inside a command substitution. + +2. Changes to Readline + +a. There are a number of fixes that were found as the result of fuzzing with + random input. + +b. Changed the revert-all-at-newline behavior to make sure to start at the end + of the history list when doing it, instead of the line where the user hit + return. + +c. When parsing `set' commands from the inputrc file or an application, readline + now allows trailing whitespace. + +d. Fixed a bug that left a file descriptor open to the history file if the + file size was 0. + +e. Fixed a problem with binding key sequences containing meta characters. + +f. Fixed a bug that caused the wrong line to be displayed if the user tried to + move back beyond the beginning of the history list, or forward past the end + of the history list. + +g. If readline catches SIGTSTP, it now sets a hook that allows the calling + application to handle it if it desires. + +h. Fixed a redisplay problem with a prompt string containing embedded newlines. + +i. Fixed a problem with completing filenames containing invalid multibyte + sequences when case-insensitive comparisons are enabled. + +j. Fixed a redisplay problem with prompt strings containing invisible multibyte + characters. + +k. Fixed a problem with multibyte characters mapped to editing commands that + modify the search string in incremental search. + +l. Fixed a bug with maintaining the key sequence while resolving a bound + command in the presence of ambiguous sequences (sequences with a common + prefix), in most cases while attempting to unbind it. + +m. Fixed several buffer overflows found as the result of fuzzing. + +n. Reworked backslash handling when translating key sequences for key binding + to be more uniform and consistent, which introduces a slight backwards + incompatibility. + +o. Fixed a bug with saving the history that resulted in errors not being + propagated to the calling application when the history file is not writable. + +p. Readline only calls chown(2) on a newly-written history file if it really + needs to, instead of having it be a no-op. + +q. Readline now behaves better when operate-and-get-next is used when the + history list is `full': when there are already $HISTSIZE entries. + +r. Fixed a bug that could cause vi redo (`.') of a replace command not to work + correctly in the C or POSIX locale. + +s. Fixed a bug with vi-mode digit arguments that caused the last command to be + set incorrectly. This prevents yank-last-arg from working as intended, for + example. + +3. New Features in Bash + +a. `bind -x' now supports different bindings for different editing modes and + keymaps. + +b. Bash attempts to optimize the number of times it forks when executing + commands in subshells and from `bash -c'. + +c. Here documents and here strings now use pipes for the expanded document if + it's smaller than the pipe buffer size, reverting to temporary files if it's + larger. + +d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut + +e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL + and those that were SIG_IGN when the shell starts. + +f. The shell now expands the history number (e.g., in PS1) even if it is not + currently saving commands to the history list. + +g. `read -e' may now be used with arbitrary file descriptors (`read -u N'). + +h. The `select' builtin now runs traps if its internal call to the read builtin + is interrupted by a signal. + +i. SRANDOM: a new variable that expands to a 32-bit random number that is not + produced by an LCRNG, and uses getrandom/getentropy, falling back to + /dev/urandom or arc4random if available. There is a fallback generator if + none of these are available. + +j. shell-transpose-words: a new bindable readline command that uses the same + definition of word as shell-forward-word, etc. + +k. The shell now adds default bindings for shell-forward-word, + shell-backward-word, shell-transpose-words, and shell-kill-word. + +l. Bash now allows ARGV0 appearing in the initial shell environment to set $0. + +m. If `unset' is executed without option arguments, bash tries to unset a shell + function if a name argument cannot be a shell variable name because it's not + an identifier. + +n. The `test -N' operator uses nanosecond timestamp granularity if it's + available. + +o. Bash posix mode now treats assignment statements preceding shell function + definitions the same as in its default mode, since POSIX has changed and + no longer requires those assignments to persist after the function returns + (POSIX interp 654). + +p. BASH_REMATCH is no longer readonly. + +q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n' + or `wait' without arguments. + +r. Sorting the results of pathname expansion now uses byte-by-byte comparisons + if two strings collate equally to impose a total order; the result of a + POSIX interpretation (#963 and #1070). + +s. Bash now allows SIGINT trap handlers to execute recursively. + +t. Bash now saves and restores state around setting and unsetting posix mode, + instead of having unsetting posix mode set a known state. + +u. Process substitution is now available in posix mode. + +v. READLINE_MARK: a new variable available while executing commands bound with + `bind -x', contains the value of the mark. + +w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell + startup. + +x. `test -v N' can now test whether or not positional parameter N is set. + +y. `local' now honors the `-p' option to display all local variables at the + current context. + +z. The `@a' variable transformation now prints attributes for unset array + variables. + +aa. The `@A' variable transformation now prints a declare command that sets a + variable's attributes if the variable has attributes but is unset. + +bb. `declare' and `local' now have a -I option that inherits attributes and + value from a variable with the same name at a previous scope. + +cc. When run from a -c command, `jobs' now reports the status of completed jobs. + +dd. New `U', `u', and `L' parameter transformations to convert to uppercase, + convert first character to uppercase, and convert to lowercase, + respectively. + +ee. PROMPT_COMMAND: can now be an array variable, each element of which can + contain a command to be executed like a string PROMPT_COMMAND variable. + +ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource. + +gg. Associative arrays may be assigned using a list of key-value pairs within + a compound assignment. Compound assignments where the words are not of + the form [key]=value are assumed to be key-value assignments. A missing or + empty key is an error; a missing value is treated as NULL. Assignments may + not mix the two forms. + +hh. New `K' parameter transformation to display associative arrays as key- + value pairs. + +ii. Writing history to syslog now handles messages longer than the syslog max + length by writing multiple messages with a sequence number. + +jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since + they are nominally integer variables. LINENO is not an integer variable. + +kk. Bash temporarily suppresses the verbose option when running the DEBUG trap + while running a command from the `fc' builtin. + +ll. `wait -n' now accepts a list of job specifications as arguments and will + wait for the first one in the list to change state. + +mm. The associative array implementation can now dynamically increase the + size of the hash table based on insertion patterns. + +nn. HISTFILE is now readonly in a restricted shell. + +oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit + systems. + +4. New Features in Readline + +a. If a second consecutive completion attempt produces matches where the first + did not, treat it as a new completion attempt and insert a match as + appropriate. + +b. Bracketed paste mode works in more places: incremental search strings, vi + overstrike mode, character search, and reading numeric arguments. + +c. Readline automatically switches to horizontal scrolling if the terminal has + only one line. + +d. Unbinding all key sequences bound to a particular readline function now + descends into keymaps for multi-key sequences. + +e. rl-clear-display: new bindable command that clears the screen and, if + possible, the scrollback buffer (bound to emacs mode M-C-l by default). + +f. New active mark and face feature: when enabled, it will highlight the text + inserted by a bracketed paste (the `active region') and the text found by + incremental and non-incremental history searches. This is tied to bracketed + paste and can be disabled by turning off bracketed paste. + +g. Readline sets the mark in several additional commands. + +h. Bracketed paste mode is enabled by default. + +i. Readline tries to take advantage of the more regular structure of UTF-8 + characters to identify the beginning and end of characters when moving + through the line buffer. + +j. The bindable operate-and-get-next command (and its default bindings) are + now part of readline instead of a bash-specific addition. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-release, and +the previous version, bash-5.0-rc1. + +1. Changes to Bash + +a. Tilde expansion isn't performed on indexed array subscripts, even for + backwards compatibility. + +b. The shell doesn't exit in posix mode if the eval builtin gets a parse + error when run by the command builtin. + +c. Fixed a bug that caused a shell comment in an alias to not find the end + of the alias properly. + +d. Reverted a change from April, 2018 that caused strings containing + backslashes to be flagged as glob patterns. + +2. Changes to Readline + +3. New Features in Bash + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-rc1, and +the previous version, bash-5.0-beta2. + +1. Changes to Bash + +a. Fix to initial word completion detection code. + +b. Fixed a bug that caused issues with assignment statements containing ^A in + the value assigned when IFS contains ^A. + +c. Added a fallback to fnmatch() when strcoll can't correctly deal with + bracket expression character equivalence classes. + +d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command + when running a trap handler containing [[ or (( commands. + +e. Fixed a bug that caused nameref assignments in the temporary environment + to potentially create variables with invalid names. + +f. Fixed a bug that caused `local -' to turn off alias expansion in scripts. + +g. Fixed a parser issue with a command string containing EOF after an invalid + command as an argument to a special builtin not causing a posix-mode shell + to exit. + +h. Made a slight change to the FNV-1 string hash algorithm used for associative + arrays (corrected the initial seed). + +2. Changes to Readline + +3. New Features in Bash + +a. The `select' command now supports command forms without a word list + following `in'. + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-beta2, and +the previous version, bash-5.0-beta. + +1. Changes to Bash + +a. Fixed a bug that could cause a seg fault while parsing a subshell command + inside a command substitution. + +b. Fixed several small memory leaks uncovered by coverity. + +c. Fixed a problem with command substitution inside an interactive shell that + could cause the parent to receive a SIGHUP. + +d. Fixed a problem with using `*' and `@' as subscripts when assigning values + to an associative array with assoc_expand_once enabled. + +e. Fixed a bug that could cause a huge memory allocation when completing a + word beginning with an invalid tilde expansion. + +f. Cleaned up some incompatibilities with bash-4.4 when expanding indexed array + subscripts used in arithmetic expansions when assoc_expand_once is enabled. + +g. The ${parameter@a} expansion will display attributes even if `parameter' is + unset. + +h. Fixed a bug that caused the output of `set' to cut off some variables before + printing the value. + +i. Treat a failure to assign a variable when using the ${x:=value} expansion + as an expansion error, so non-interactive posix-mode shells exit + +j. Fixed a problem when expanding $* in a context where word splitting is not + performed when IFS is NULL. + +k. Temp files used to store here documents are forced readable, no matter what + the user's umask says. + +l. Fixed a problem where an interrupted brace expansion could cause the shell + to attempt to free an invalid memory location. + +m. Make sure to check for any terminating signals after running a trap + handler; don't wait until the next time we process traps. + +n. Fixed a bug that caused "return" to act like a special builtin with respect + to variable assignments even when preceded by "command". + +o. POSIX-mode shells now return failure if the cd builtin fails due to the + absolute directory name being longer than PATH_MAX, instead of trying + again with a relative pathname. + +p. Fixed a problem with FUNCNAME occasionally being visible when not executing + a shell function. + +q. Fixed a problem with the expansions performed on the WORD in the case + command. + +r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during + word splitting and the read builtin. + +s. Fixed a problem with expanding an array with subscript `*' when all the + elements expand to the empty string, and making sure the expansion honors + the `:' specifier. + +2. Changes to Readline + +a. Fixed a bug with adding multibyte characters to an incremental search string. + +b. Fixed a bug with redoing text insertions in vi mode. + +c. Fixed a bug with pasting text into an incremental search string if bracketed + paste mode is enabled. ESC cannot be one of the incremental search + terminator characters for this to work. + +d. Fixed a bug with anchored search patterns when performing searches in vi + mode. + +3. New Features in Bash + +a. Associative and indexed arrays now allow subscripts consisting solely of + whitespace. + +b. `checkwinsize' is now enabled by default. + +c. The `localvar_unset' shopt option is now visible and documented. + +d. The `progcomp_alias' shopt option is now visible and documented. + +e. The signal name processing code now understands `SIGRTMIN+n' all the way + up to SIGRTMAX. + +f. There is a new `seq' loadable builtin. + +g. Trap execution now honors the (internal) max invocations of `eval', since + traps are supposed to be executed as if using `eval'. + +h. The $_ variable doesn't change when the shell executes a command that forks. + +i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though + conforming applications aren't supposed to use them. + +j. POSIX mode now enables the `shift_verbose' option. + +4. New Features in Readline + +a. Readline now allows application-defined keymap names; there is a new public + function, rl_set_keymap_name(), to do that. + +b. The "Insert" keypad key, if available, now puts readline into overwrite + mode. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-beta, and +the previous version, bash-5.0-alpha. + +1. Changes to Bash + +a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this + is where POSIX says the subshell is not "enclosed" by the loop. + +b. Added more UTF-8-specific versions of multibyte functions, and optimized + existing functions if the current locale uses UTF-8 encoding. + +c. In POSIX mode, assignments preceding regular builtins should not persist + when the builtin completes. + +d. Added additional checks to special array assignment (e.g., BASH_ALIASES) + so it can't be used to bypass validity checks performed in other places. + +e. The `!!' history expansion now refers to the previous history entry as + expected, even if used on the second or subsequent line of a multi-line + history entry. + +f. Fixed a bug that could cause the shell to dereference a NULL pointer if + the environment (`environ') is set to NULL. + +g. Bash uses slightly better integer overflow handling for brace sequence + expansion on systems where ints are 32 bits and intmax_t is 64 bits. + +h. Fixed a bug setting attributes for a variable named as an argument to + `declare' that also appears as a nameref in the temporary environment. + +i. Fixed several bugs that could cause assignments to namerefs to create + variables with invalid names. + +j. Fixed a bug that could result in the SIGINT handler being set incorrectly + in asynchronous subshells. + +k. Fixed a bug that could cause `bash -t' to not execute the specified command. + +l. Fixed several bugs that caused the shell to operate on the wrong variable + when using namerefs with the same name as a global variable in shell + functions. + +m. Internal changes to how the shell handles variables with invalid names in + the initial environment and to prevent variables with invalid names from + being added to the environment instead of passing them on to children. + +n. Changes to make sure that an expansion that results in a quoted null string + is reflected in the expansion, even if the word expands to nothing. + +o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand + the same way after the recent changes for POSIX interpretation 888. + +p. Saving and restoring the positional parameters at function entry and exit + is considerably more efficient; noticeably so when there are large numbers + of positional parameters. + +q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect + status for the pipeline if there was more than one external command in a + loop body appearing in the last pipeline element. + +r. Fixed a bug that caused value conversion errors with the printf builtin's + %u and %f conversion specifications and invalid constants. + +2. Changes to Readline + +a. Added more UTF-8-specific versions of multibyte functions, and optimized + existing functions if the current locale uses UTF-8 encoding. + +b. Fixed a problem with bracketed-paste inserting more than one character and + interacting with other readline functions. + +c. Fixed a bug that caused the history library to attempt to append a history + line to a non-existent history entry. + +d. If using bracketed paste mode, output a newline after the \r that is the + last character of the mode disable string to avoid overwriting output. + +e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better + handle multibyte characters. + +f. Fixed a redisplay problem that caused an extra newline to be generated on + accept-line when the line length is exactly the screenwidth. + +3. New Features in Bash + +a. Bash no longer allows variable assignments preceding a special builtin that + changes variable attributes to propagate back to the calling environment + unless the compatibility level is 44 or lower. + +b. You can set the default value for $HISTSIZE at build time in config-top.h. + +c. The `complete' builtin now accepts a -I option that applies the completion + to the initial word on the line. + +d. The internal bash malloc now uses mmap (if available) to satisfy requests + greater than 128K bytes, so free can use mfree to return the pages to the + kernel. + +e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup + unless it's in debugging mode, as the documentation has always said, but + will dynamically create them if a script references them at the top level + without having enabled debugging mode. + +f. The localvar_inherit option will not attempt to inherit a value from a + variable of an incompatible type (indexed vs. associative arrays, for + example). + +g. The `globasciiranges' option is now enabled by default; it can be set to + off by default at configuration time. + +4. New Features in Readline + +a. The history expansion library now understands command and process + substitution and extended globbing and allows them to appear anywhere in a + word. + +b. The history library has a new variable that allows applications to set the + initial quoting state, so quoting state can be inherited from a previous + line. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-alpha, and +the previous version, bash-4.4-release. + +1. Changes to Bash + +a. Fixed a bug that could cause traps in background jobs to give the terminal + to the wrong process group. + +b. Fixed a bug that caused `kill -l 0' to print an out-of-range error. + +c. Fixed a problem that could result in here-documents being displayed in + the wrong order. + +d. Fixed a number of out-of-bounds and free memory read errors found via + fuzzing. + +e. Fixed a subshell inheritance problem that could cause a subshell to wait for + the wrong process. + +f. Fixed a bug that caused SHLVL to be incremented one too many times when + creating subshells. + +g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with + job control enabled. + +h. Fixed a spurious warning about unterminated ${ or $( constructs during + word completion. + +i. The shell no longer runs traps if a signal arrives while reading command + substitution output. + +j. Fixed an arithmetic expansion error that could allow ++var++ as valid + syntax. + +k. Fixed an error that allowed out-of-bounds references to the directory stack. + +l. The shell does a better job of saving multi-line history entries with + embedded comments. + +m. Fixed a bug that could cause quoted bracket expressions in regular expression + arguments to `[[' to not match correctly. + +n. Fixed a bug that could cause an IFS character in a word to result in an + extra '\001' character in the expansion. + +o. A trailing backslash in a glob pattern can match a trailing backslash in the + string. + +p. Fixed a memory leak in the process creation code path when job control is + enabled. + +q. Fixed a bug that caused `printf' to output broken surrogate pairs for + Japanese locales. + +r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to + kill an interactive shell. + +s. Fixed a bug that could cause the `read' builtin to not fully read a + multibyte character. + +t. Fixed a bug that could cause identifiers to be evaluated in conditional + arithmetic expressions even when evaluation is suppressed. + +u. Fixed a bug that could result in command substitution, when executed in a + context where word splitting is not performed, to leave a stray '\001' + character in the string. + +v. Fixed a bug that could cause history expansion to be disabled in a non- + interactive shell even if `-o histexpand' is supplied at startup. + +w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters. + +x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions. + +y. If indirect expansion attempts to indirectly reference through an unset + variable, report an error. + +z. Added a guard to prevent the shell from looping while receiving an endless + stream of SIGTTIN at shell startup. + +aa. Fixed a bug with parsing here documents inside a command substitution when + looking for the closing delimiter. + +bb. Fixed a bug that caused printf to not quote all characters in the + current locale when using the `%q' format specifier. + +cc. Fixed a bug with bash's internal buffered I/O system that caused the input + pointer to not be reset when read(2) returned an EOF. + +dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will + not interrupt open/read/write system calls. + +ee. The ERR trap now reports line numbers more reliably. + +ff. The shell no longer tries to manipulate the terminal process group if a + command or process substitution is killed by SIGTERM when job control is + enabled. + +gg. Fixed a bug that caused extglob patterns to match filenames beginning with + a period. + +hh. File descriptors open for writing to here documents are no longer available + to subshells. + +ii. Make sure word completion doesn't perform command or process substitution. + +jj. Fixed a bug with parsing $$'...' inside a command substitution. + +kk. Fixed a bug that caused bash to remove backslash-newline pairs from the + body of a here-document with a quoted delimiter inside a command + substitution. + +ll. Fixed a bug that could cause the shell to hang when adding a pid to the + table of background process exit statuses. + +mm. Fixed a bug that could cause 0x01 characters to be doubled in the output + of process substitution. + +nn. Restricted shells now clear the hash table before making the PATH variable + read-only. + +oo. There are a number of changes to the expansion of $* and $@ in contexts + where word splitting does not occur (quoted and unquoted), with IFS set + to NULL or a non-standard value, mostly to deal with the consequences of + the behavior defined in Posix interpretation 888. + +pp. There are a number of changes to nameref variable handling to avoid + creating variables with invalid names. + +qq. A non-interactive posix mode shell no longer exits when an assignment + statement fails if the assignment is utimately being performed by the + `command' builtin. + +rr. When using character class names for globbing, don't allow case + insensitivity, even if nocaseglob is enabled. + +ss. Fixed a bug that allowed some redirections to stay in place if a later + redirection failed. + +tt. Fixed a bug in how command and process substitutions are recognized within + other parameter expansions. + +uu. Fixed a bug that caused bash to loop under certain circumstances when + performing arithmetic expansion on a variable whose value is an invalid + expression. + +vv. Fixed a bug that could cause bash to expand aliases inappropriately while + parsing compound commands like `case'. + +ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte + characters, even when the sequences are incomplete or invalid, with or + without readline. + +xx. Fixed a bug that could cause `case' to fail to match patterns containing + 0x01 characters. + +yy. Fixed a bug that caused exported functions to contain stray 0x01 characters. + +zz. Fixed some inconsistencies with how the history number is handled in the + various prompt strings. + +aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset + inside a shell function bound to a key sequence with `bind -x'. + +bbb. Fixed a bug that could cause bash to not read a token terminator correctly + if a command substitution was used inside an arithmetic `for' command. + +ccc. Fixed problems that could occur with a fatal arithmetic expansion error + in a context (like prompt expansion) where you can't jump back to the + top level. + +ddd. Expression errors in arithmetic `for' commands are treated more like + shell syntax errors. + +eee. Fixed a parser synchronization error resulting from a syntax error + followed immediately by an EOF. + +fff. When executing a shell function, the first line in the function ($LINENO) + is line 1 instead of line 0, as Posix requires. + +ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from + the environment and use that to set its idea of the current directory. + +hhh. If LINENO is exported, bash needs to regenerate its value each time it + constructs the environment. + +iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'. + +jjj. Make sure the `coproc' command returns an appropriate status if the NAME + argument is invalid. + +kkk. Fixed a problem with arithmetic expressions containing array references + that contain arithmetic expressions with syntax errors. + +lll. The `select' command and help builtin will use $COLUMNS before the window + size returned from the kernel as the terminal width. + +mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to + detect file descriptor errors. + +nnn. The `read' builtin now does a better job of acting on signals that don't + interrupt read(2). + +ooo. Fixed some cases where `printf -v' did not return failure status on a + variable assignment error. + +ppp. Fixed temporary environment propagation back to the current environment + so that it doesn't happen for special builtins run by the `command' + builtin. + +qqq. Fixed a bug when searching for the end of a here-document delimiter in a + command substitution. + +rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail. + +sss. Fixed a bug that could cause reserved words to not be recognized in a + for statement without the `in' inside a command substitution. + +ttt. Fixed a bug that could cause a double-free in a timed command with an + expansion error. + +uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8 + locale to a different locale after displaying a lone surrogate character. + +vvv. Fixed cases where bash prematurely removed FIFOs attached to process + substitutions. + +www. Fixed a problem with calculating the size of the table that stores exit + statuses from background processes when the child process resource limit + is very large. + +xxx. Fixed a memory leak with functions using `return' when using FIFOs for + standard input. + +yyy. `wait' without arguments attempts to wait for all active process + substitution processes. + +zzz. Fixed a bug where an indirect parameter was subjected to word splitting + when trying to find the indirected variable name. + +aaaa. Fixed a bug that could allow restricted shell users to add commands to + the hash table. + +bbbb. When using the `!(patlist)' extended globbing operator, a filename + beginning with a `.' that doesn't match any of the patterns is not + returned as a match if leading dots must be matched explicitly. + +cccc. Fixed a bug that could cause line number and source file information for + a function definition to be incorrect if there are multiple definitions. + +dddd. Fixed a bug that could cause builtins like `readonly' to behave + differently when applied to arrays and scalar variables within functions. + +eeee. Fixed a bug that could cause alias expansion to add an extra space to + a quoted string that begins outside the alias expansion. + +ffff. Fixed a bug that could result in unwanted alias expansion after timing + the null command. + +gggg. Fixed a bug that could cause a core dump if a timestamp in a history + file overflowed a time_t. + +hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since + the kernel calls make those file descriptors read-write. + +iiii. Fixed a problem with splitting double-quoted words for programmable + completion when the double quote immediately follows another word + delimiter. + +jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share + the same input buffer. + +kkkk. The error message resulting from ${x:?} and ${x?} now differs depending + on whether the variable is null or unset. + +llll. In Posix mode, the shell exits if a variable assignment fails and precedes + an empty simple command (after expansion). + +mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to + drop characters. + +nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal + due to Linux pid namespace peculiarities. + +oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for + `bind -x' commands. + +pppp. Fixed a bug that could cause SIGINT recursion when running an external + command in a trap the shell takes after a command exits due to SIGINT. + +qqqq. Make sure the shell turns off job control before running the command- + not-found handle, so the command doesn't try to manipulate process + groups. + +rrrr. Fixed a problem with timing process substitutions that caused the shell + to print timing information for the calling command. + +ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark + the delimiter as quoted (inhibiting expansion of the here-document + contents). + +tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and + conditional command pattern matches. + +uuuu. Fixed a bug that could cause the pattern matching engine to not recognize + locale-specific character classes. + +vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently. + +wwww. The `globstar' code now skips over symbolic links to directories, + preventing them from being scanned twice. + +xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on + the number of characters in the readline line buffer, not the number of + bytes. + +yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN + trap when using `eval return'. + +zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document. + +aaaaa. The process substitution code now closes and unlinks FIFOs when the + process on the other side exits, in order to prevent SIGPIPE or + waiting until a FIFO opened for read has a writer. + +bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in + an {id}>foo construct. + +ccccc. After a Posix discussion, the pattern matching engine just skips over + invalid character classes in bracket expressions, instead of matching + them like individual characters in the expression. + +ddddd. Fixed a posix-mode problem with variable scoping when creating variables + from assignment statements preceding special builtins. + +eeeee. Fixed a bug that could cause patterns containing backslashes to not be + run through the pattern matching engine. + +fffff. Fixed a bug that could cause redirections to compound commands to not + be `undone' if the file descriptor in the redirection was closed when + the redirection was initially processed. + +ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in + a command execute as a result of a key binding installed by `bind -x'. + +2. Changes to Readline + +a. Added a guard to prevent nested macros from causing an infinite expansion + loop. + +b. Instead of allocating enough history list entries to hold the maximum list + size, cap the number allocated initially. + +c. Added a strategy to avoid allocating huge amounts of memory if a block of + history entries without timestamps occurs after a block with timestamps. + +d. Added support for keyboard timeouts when an ESC character is the last + character in a macro. + +e. There are several performance improvements when in a UTF-8 locale. + +f. Readline does a better job of preserving the original set of blocked + signals when using pselect() to wait for input. + +g. Fixed a bug that caused multibyte characters in macros to be mishandled. + +h. Fixed several bugs in the code that calculates line breaks when expanding + prompts that span several lines, contain multibyte characters, and contain + invisible character seqeuences. + +i. Fixed several bugs in cursor positioning when displaying lines with prompts + containing invisible characters and multibyte characters. + +j. When performing case-insensitive completion, Readline no longer sorts the + list of matches unless directed to do so. + +k. Fixed a problem with key sequences ending with a backslash. + +l. Fixed out-of-bounds and free memory read errors found via fuzzing. + +m. Fixed several cases where the mark was set to an invalid value. + +n. Fixed a problem with the case-changing operators in the case where the + lower and upper case versions of a character do not have the same number + of bytes. + +o. Handle incremental and non-incremental search character reads returning EOF. + +p. Handle the case where a failing readline command at the end of a multi-key + sequence could be misinterpreted. + +q. The history library now prints a meaningful error message if the history + file isn't a regular file. + +r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace + a multibyte character. + +s. The key binding code now attempts to remove a keymap if a key unbinding + leaves it empty. + +t. Fixed a line-wrapping issue that caused problems for some terminal + emulators. + +u. If there is a key bound to the tty's VDISCARD special character, readline + disables VDISCARD while it is active. + +v. Fixed a problem with exiting bracketed paste mode on terminals that assume + the bracketed paste mode character sequence contains visible characters. + +w. Fixed a bug that could cause a key binding command to refer to an + uninitialized variable. + +3. New Features in Bash + +a. The `wait' builtin can now wait for the last process substitution created. + +b. There is an EPOCHSECONDS variable, which expands to the time in seconds + since the Unix epoch. + +c. There is an EPOCHREALTIME variable, which expands to the time in seconds + since the Unix epoch with microsecond granularity. + +d. New loadable builtins: rm, stat, fdflags. + +e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment. + +f. When supplied a numeric argument, the shell-expand-line bindable readline + command does not perform quote removal and suppresses command and process + substitution. + +g. `history -d' understands negative arguments: negative arguments offset from + the end of the history list. + +h. The `name' argument to the `coproc' reserved word now undergoes word + expansion, so unique coprocs can be created in loops. + +i. A nameref name resolution loop in a function now resolves to a variable by + that name in the global scope. + +j. The `wait' builtin now has a `-f' option, which signifies to wait until the + specified job or process terminates, instead of waiting until it changes + state. + +k. There is a define in config-top.h that allows the shell to use a static + value for $PATH, overriding whatever is in the environment at startup, for + use by the restricted shell. + +l. Process substitution does not inherit the `v' option, like command + substitution. + +m. If a non-interactive shell with job control enabled detects that a foreground + job died due to SIGINT, it acts as if it received the SIGINT. + +n. The SIGCHLD trap is run once for each exiting child process even if job + control is not enabled when the shell is in Posix mode. + +o. A new shopt option: localvar_inherit; if set, a local variable inherits the + value of a variable with the same name at the nearest preceding scope. + +p. `bind -r' now checks whether a key sequence is bound before binding it to + NULL, to avoid creating keymaps for a multi-key sequence. + +q. A numeric argument to the line editing `operate-and-get-next' command + specifies which history entry to use. + +r. The positional parameters are now assigned before running the shell startup + files, so startup files can use $@. + +s. There is a compile-time option that forces the shell to disable the check + for an inherited OLDPWD being a directory. + +t. The `history' builtin can now delete ranges of history entries using + `-d start-end'. + +u. The `vi-edit-and-execute-command' bindable readline command now puts readline + back in vi insertion mode after executing commands from the edited file. + +v. The command completion code now matches aliases and shell function names + case-insensitively if the readline completion-ignore-case variable is set. + +w. There is a new `assoc_expand_once' shell option that attempts to expand + associative array subscripts only once. + +x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended + debugging mode is active. The old behavior of unconditionally setting them + is available as part of the shell compatibility options. + +y. The `umask' builtin now allows modes and masks greater than octal 777. + +z. The `times' builtin now honors the current locale when printing a decimal + point. + +aa. There is a new (disabled by default, undocumented) shell option to enable + and disable sending history to syslog at runtime. + +4. New Features in Readline + +a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as + Posix specifies (uses fnmatch(3) if available). + +b. There are new `next-screen-line' and `previous-screen-line' bindable + commands, which move the cursor to the same column in the next, or previous, + physical line, respectively. + +c. There are default key bindings for control-arrow-key key combinations. + +d. A negative argument (-N) to `quoted-insert' means to insert the next N + characters using quoted-insert. + +e. New public function: rl_check_signals(), which allows applications to + respond to signals that readline catches while waiting for input using + a custom read function. + +f. There is new support for conditionally testing the readline version in an + inputrc file, with a full set of arithmetic comparison operators available. + +g. There is a simple variable comparison facility available for use within an + inputrc file. Allowable operators are equality and inequality; string + variables may be compared to a value; boolean variables must be compared to + either `on' or `off'; variable names are separated from the operator by + whitespace. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-release, and +the previous version, bash-4.4-rc2. + +1. Changes to Bash + +a. Fixed a bug that could potentially result in a crash due to an integer + overflow. + +b. Fixed a bug in where commands printed due to `set -x' could be incorrectly + quoted if being printed in contexts where they haven't yet been expanded. + +c. Fixed several memory leaks. + +d. Fixed a bug that could potentially cause the terminal attributes to be + set incorrectly by a command run from a programmable completion. + +e. Fixed several potential buffer overflow issues in the word expansion code. + +2. Changes to Readline + +3. New Features in Bash + +4. New Features in Readline +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-rc2, and +the previous version, bash-4.4-beta2. + +1. Changes to Bash + +a. Fixed an out-of-bounds read in the redirection operator completion code. + +b. Fixed execution context so `until continue' doesn't disable execution for + subsequent commands. + +c. Fixed trap handling code so traps don't inherit a command's temporary + environment. + +d. Fixed a bug that resulted in incorrect line numbers when a function is + defined as part of another function's execution. + +e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting + is not performed and $IFS is not the default. + +f. Fixed a bug that caused ''"$@" to not expand to an empty argument when + there are no positional parameters. + +g. Fixed a bug that caused a shell compiled without job control to use the + incorrect exit status for builtin commands preceded by a command executed + from the file system that causes the shell to call waitpid(). + +h. Improved word completion for quoted strings containing unterminated command + substitutions with embedded double quotes. + +2. Changes to Readline + +a. Fixed a bug that caused mode strings to be displayed incorrectly if the + prompt was shorter than the mode string. + +3. New Features in Bash + +a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when + the nounset option is enabled no longer throws an unbound variable error. + +4. New Features in Readline + +a. New application-callable function: rl_pending_signal(): returns the signal + number of any signal readline has caught but not yet handled. + +b. New application-settable variable: rl_persistent_signal_handlers: if set + to a non-zero value, readline will enable the readline-6.2 signal handler + behavior in callback mode: handlers are installed when + rl_callback_handler_install is called and removed removed when a complete + line has been read. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-beta2, and +the previous version, bash-4.4-rc1. + +1. Changes to Bash + +a. Fixed a memory leak when processing ${!var[@]}. + +b. Fixed a bug that caused subshells to free trap strings associated with + inherited signals. + +c. Inheriting BASHOPTS from the environment now works to force actions + associated with enabling an option, instead of just marking the option + as enabled. + +d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in + restricted mode. + +e. Fixed a bug caused by an accidental omission of part of the original patch + for EXECIGNORE. + +e. Prompt expansion now quotes the results of the \s, \h, and \H expansions. + +f. Fixed a bug that caused parsing errors in command substitutions with + consecutive case statements separated by newlines. + +g. Updated logic used to decide whether bash is running inside an emacs + terminal emulator to work with future emacs versions. + +h. Fixed two extended pattern matching bugs caused by premature short- + circuiting. + +i. Fixed a memory leak in the code that removes duplicate history entries. + +j. There are a number of bug fixes to coproc, mapfile, declare, unset, + and assignment statements that prevent nameref variables from creating + and unsetting variables with invalid names. + +k. Fixed a bug that caused variables to be inadvertently marked as both an + associative and an indexed array. + +l. Fixed a bug that caused `bash -c' to not run a trap specified in the + command string. + +j. There are a number of bug fixes to coproc, mapfile, declare, and assignment + statements that prevent nameref variables from overwriting or modifying + attributes of readonly variables. + +k. Fixed a bug that caused command substitution to attempt to set the + terminal's process group incorrectly. + +l. Fixed a bug that could cause prompt string expansion to display error + messages when the `nounset' shell option is set. + +m. Fixed a bug that caused "$@" to not expand to an empty string under the + circumstances when Posix says it should ("${@-${@-$@}}"). + +n. Fixed several bugs caused by referencing nameref variables whose values + are names of unset variables (or names that are valid for referencing + but not assignment), including creating variables in the temporary + environment. + +o. Function tracing and error tracing are disabled if --debugger is supplied + at startup but the shell can't find the debugger start file. + +p. Fixed a bug when IFS is used as the control variable in a for statement. + +q. Fixed a bug with SIGINT received by a command substitution in an interactive + shell. + +r. The checks for nameref variable self-references are more thorough. + +s. Fixed several bugs with multi-line aliases. + +t. Fixed `test' to handle the four-argument case where $1 == '(' and + $4 == ')'. + +u. Fixed a bug in the expansion of $* in the cases where word splitting is + not performed. + +v. Fixed a bug in execution of case statements where IFS includes the + pattern matching characters. + +2. Changes to Readline + +a. When refreshing the line as the result of a key sequence, Readline attempts + to redraw only the last line of a multiline prompt. + +b. Fixed an issue that caused completion of git commands to display + incorrectly when using colored-completion-prefix. + +c. Fixed several redisplay bugs having to do with multibyte characters and + invisible characters in prompt strings. + +3. New Features in Bash + +a. Value conversions (arithmetic expansions, case modification, etc.) now + happen when assigning elements of an array using compound assignment. + +b. There is a new option settable in config-top.h that makes multiple + directory arguments to `cd' a fatal error. + +c. Bash now uses mktemp() when creating internal temporary files; it produces + a warning at build time on many Linux systems. + +4. New Features in Readline + +a. The default binding for ^W in vi mode now uses word boundaries specified + by Posix (vi-unix-word-rubout is bindable command name). + +b. rl_clear_visible_line: new application-callable function; clears all + screen lines occupied by the current visible readline line. + +c. rl_tty_set_echoing: application-callable function that controls whether + or not readline thinks it is echoing terminal output. + +d. Handle >| and strings of digits preceding and following redirection + specifications as single tokens when tokenizing the line for history + expansion. + +e. Fixed a bug with displaying completions when the prefix display length + is greater than the length of the completions to be displayed. + +f. The :p history modifier now applies to the entire line, so any expansion + specifying :p causes the line to be printed instead of expanded. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-rc1, and +the previous version, bash-4.4-beta. + +1. Changes to Bash + +a. Fixed several problems with bash completion not special-casing bash syntax + constructs. + +b. Fixed a bug that caused the mapfile builtin to not create array variables + when a variable of the same name appears in the temporary environment. + +c. Fixed a bug that caused prompt expansion to loop when PS1 contained a + syntax error. + +d. Fixed a bug that caused the ${array[@]@A} expansion to split the results + even when double-quoted. + +e. There is a new implementation of the code that saves the last CHILD_MAX + exited background pids so their status can be queried later. + +f. Bash-4.4 can now be configured and built on very old versions of Solaris 2. + +g. Fixed problems with --help support for several builtins. + +h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited + from the environment. + +i. Fixed a bug that caused background processes run from non-interactive shells + with job control enabled to place the terminal in the wrong process group + under certain circumstances. + +j. Fixed a bug that caused `fc' to return an incorrect exit status when + executing commands from the history list. + +k. Fixed a bug that caused the shell to exit when a process substitution + received a SIGINT when run in certain terminal emulators. + +l. EXECIGNORE now honors the setting of `extglob' when attempting to match + executable names. + +m. Fixed a bug where `return' used the wrong exit status when executed in a + DEBUG trap. + +n. Fixed a bug that caused a command containing a here-document and an escaped + newline to be stored in the history list incorrectly. + +o. Fixed a bug that caused set -e to be honored in cases of builtins invoking + other builtins when it should be ignored. + +p. Fixed a bug that caused `readonly' and `export' to create local array + variables when used within shell functions. + +q. Fixed a bug that allowed subshells begun to execute process substitutions + to have access to the command's temporary environment. + +r. Fixed a bug that could cause the shell to dump core when receiving a + SIGCHLD for which a trap has been set while running in posix mode. + +s. Fixed a bug that caused bash to not restore BASH_ARGC, BASH_ARGV, + BASH_SOURCE, BASH_LINENO, and FUNCNAME if the shell received a SIGINT + while reading commands from a file while executing `.'. + +t. Fixed a bug that caused the `-o history' option to have no effect when + supplied on the command line when starting a new shell. + +u. Fixed a bug that caused history expansions occurring in command + substitutions to not be performed. + +v. Fixed a bug that caused `eval' run in a non-interactive shell to disable + history expansion for the remainder of the shell script, even if the script + had previously enabled it. + +w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set + to the empty string. + +x. Fixed a bug that caused process and command substitution to inherit output + buffered in the stdio library but not written. + +y. Fixed a bug that caused a terminating signal received during `echo' to run + an exit trap in a signal handler context. + +z. Fixed a bug that caused a builtin command containing a process substitution + to return the wrong exit status. + +aa. Fixed a bug that caused `()' subshells with piped input to incorrectly + redirect the standard input of some of the commands in the subshell from + /dev/null. + +bb. The history builtin now uses more descriptive error messages for missing or + invalid timestamps. + +2. Changes to Readline + +a. The history file writing functions only attempt to create and use a backup + history file if the history file exists and is a regular file. + +b. Fixed an out-of-bounds read in readline's internal tilde expansion + interface. + +c. Fixed several redisplay bugs with prompt strings containing multibyte + and non-visible characters whose physical length is longer than the screen + width. + +d. Fixed a redisplay bug with prompt strings containing invisible characters + whose physical length exceeds the screen width and using incremental search. + +e. Readline prints more descriptive error messages when it encounters errors + while reading an inputrc file. + +f. Fixed a bug in the character insertion code that attempts to optimize + typeahead when it reads a character that is not bound to self-insert and + resets the key sequence state. + +3. New Features in Bash + +a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial + environment. + +b. inherit_errexit: a new `shopt' option that, when set, causes command + substitutions to inherit the -e option. By default, those subshells disable + -e. It's enabled as part of turning on posix mode. + +c. New prompt string: PS0. Expanded and displayed by interactive shells after + reading a complete command but before executing it. + +d. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to + SIG_DFL when the shell is started, so they are set to SIG_DFL in child + processes. + +e. Posix-mode shells now allow double quotes to quote the history expansion + character. + +f. OLDPWD can be inherited from the environment if it names a directory. + +g. Shells running as root no longer inherit PS4 from the environment, closing + a security hole involving PS4 expansion performing command substitution. + +h. If executing an implicit `cd' when the `autocd' option is set, bash will + now invoke a function named `cd' if one exists before executing the `cd' + builtin. + +4. New Features in Readline + +a. If an incremental search string has its last character removed with DEL, + the resulting empty search string no longer matches the previous line. + +b. If readline reads a history file that begins with `#' (or the value of + the history comment character) and has enabled history timestamps, the + history entries are assumed to be delimited by timestamps. This allows + multi-line history entries. + +c. Readline now throws an error if it parses a key binding without a + terminating `:' or whitespace. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-beta, and +the previous version, bash-4.4-alpha. + +1. Changes to Bash + +a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment + statements while finding the word on which to perform programmable + completion. + +b. Fixed a memory leak in programmable completion. + +c. Fixed a bug that could cause the shell to crash when interrupting the + wait builtin. + +d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new + `@' operator. + +e. Fixed a bug that caused the && and || operators to be incorrectly optimized. + +f. The shell now undoes redirections before exiting the shell when the `-e' + option is enabled, and a shell function fails. + +g. History expansion now skips over the history expansion character in command + and process substitution. + +h. Fixed a bug that caused stray '\001' characters to be added to the output + of `declare -p'. + +i. Fixed a memory leak when processing declare commands that perform compound + array assignments. + +j. Fixed a bug that could cause the shell to crash when reading input from a + file and the limit on open file descriptors is high. + +k. Fixed a bug that caused the ERR and RETURN traps to be unset if they were + set in a shell function but unset previously. + +l. Fixed a bug that caused several signals to be ignored if `exec' failed in + an interactive shell. + +m. A posix-mode non-interactive shell now considers a parameter expansion error + to be a fatal error. + +n. The `time' command now prints timing statistics for failed commands when + the -e option is enabled. + +o. Fixed a bug that caused the shell to crash when attempting to indirectly + expand a shell variable with an invalid name. + +p. Fixed a bug that caused the shell to crash when running a trap containing + a process substitution. + +q. Bash now prints the keyword `function' before a function with the same name + as a reserved word when using `declare -f' to avoid parse errors when + reusing the output as input. + +r. Fixed a bug that caused the shell to crash when using declare -g to attempt + to redefine an existing global indexed array variable as an associative + array. + +s. Fixed a memory leak that occurred when interrupting brace expansions + generating a sequence. + +t. Fixed a bug that resulted in alias expansion in redirections. + +u. The `declare -a' and `declare -A' commands now print fewer warnings when + attempting to create and initialize an array at the same time, but + relying on word expansions to construct the compound assignment. + +v. The `help' builtin now behaves better in locales where each wide + character occupies more than one display column. + +w. The `read' builtin no longer has a possible race condition when a timeout + occurs. + +x. Fixed several expansion problems encountered when IFS="'". + +y. Fixed a problem with the expansion of $'\c?'. + +z. Bash no longer splits the expansion of here-strings, as the documentation + has always said. + +aa. Bash now puts `s' in the value of $- if the shell is reading from standard + input, as Posix requires. + +bb. Fixed a bug that caused the shell to crash if invoked with a NULL + environment. + +cc. The shell now only trusts an inherited value for $PWD if it begins with a + `/'. + +dd. Fixed a memory leak when creating local array variables and assigning to + them using compound assignment with the `declare' builtin. + +ee. Fixed a bug that could cause the shell to crash when processing nested here + documents inside a command substitution. + +ff. Array keys and values are now displayed using $'...' quoting where + appropriate. + +gg. Fixed a bug that could cause the shell to crash if the replacement string + in pattern substitution was NULL. + +hh. Fixed a bug that could cause the shell to crash if a command substitution + contained a non-fatal syntax error. + +ii. Fixed a bug that could cause the shell to crash if variable indirection + resulted in a NULL variable. + +jj. Fixed a bug that could cause the shell to crash if a long string contained + multiple unterminated parameter expansion constructs. + +kk. Improved the code that acts on SIGINT received while waiting for a child + process only if the child exits due to SIGINT. + +ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple + commands. + +2. Changes to Readline + +a. Colored completion prefixes are now displayed using a different color, less + likely to collide with files. + +b. Fixed a bug that caused vi-mode character search to misbehave when + running in callback mode. + +c. Fixed a bug that caused output to be delayed when input is coming from a + macro in vi-mode. + +d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing + a multi-key key sequence via a macro. + +e. Fixed a bug that caused problems with applications that supply their own + input function when performing completion. + +f. When read returns -1/EIO when attempting to read a key, return an error + instead of line termination back to the caller. + +g. Updated tty auditing feature based on patch from Red Hat. + +h. Fixed a bug that could cause the history library to crash on overflows + introduced by malicious editing of timestamps in the history file. + +3. New Features in Bash + +a. `make install' now installs the example loadable builtins and a set of + bash headers to use when developing new loadable builtins. + +b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when + loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows + loadable builtins to run initialization and cleanup code. + +c. There is a new BASH_LOADABLES_PATH variable containing a list of directories + where the `enable -f' command looks for shared objects containing loadable + builtins. + +d. The `complete_fullquote' option to `shopt' changes filename completion to + quote all shell metacharacters in filenames and directory names. + +e. The `kill' builtin now has a `-L' option, equivalent to `-l', for + compatibility with Linux standalone versions of kill. + +4. New Features in Readline +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-alpha, and +the previous version, bash-4.3-release. + +1. Changes to Bash + +a. A bug that caused pipelines to be corrupted while running the DEBUG trap + was fixed. + +b. A bug that accidentally omitted the `-R' unary operator from `test' was + fixed. + +c. A bug that could cause the shell to not restore the terminal's process + group on shell exit was fixed. + +d. Several changes were made to programmable completion to accommodate + assumptions made by the bash-completion package. + +e. Bash no longer inhibits C-style escape processing ($'...') while performing + pattern substitution word expansions. + +f. Fixed a bug that caused `return' executed from a trap handler to use the + wrong return status when one was not supplied as an argument. + +g. In Posix mode, defining a function with the same name as a special + builtin is now an error, fatal only when the shell is not interactive. + +h. Fixed a bug that caused compound array assignments to discard unset or null + variables used as subscripts, thereby making it appear as if the index was + not present. + +i. Fixed a bug that caused extended glob patterns to incorrectly match + filenames with a leading `.'. + +j. Fixed a bug involving sign extension when reallocating the input line + after a history expansion, causing segmentation faults. + +k. Bash now does a better job at identifying syntax errors during word + completion and tailoring completion appropriately. + +l. Bash now uses the current locale's decimal point in command timing output. + +m. Fixed a bug that caused segmentation faults while reading here documents if + PS2 contains a command substitution. + +n. There are several changes to how $@ is expanded when unquoted but in a + context where word splitting is not performed (e.g., on the rhs of an + assignment or in a conditional command). + +o. Bash now quotes command hash table entries that contain shell metacharacters + when displaying hash table contents. + +p. Fixed a potential file descriptor leak when dup2() fails while performing a + redirection. + +q. Fixed a bug that caused directory names evaluated during word completion to + be dequoted twice. + +r. Fixed several bugs which could result in indirect variable expansion and + namerefs creating variables with invalid names or referencing variables + set to the empty string. + +s. Fixed a bug that caused bash to not expand $0 in word expansions where it + should. + +t. Fixed a bug that caused bash to perform process substitution if <( + appeared inside an arithmetic context. + +u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern + to be confused as directory names. + +v. Fixed several bugs with treatment of invisible variables (variables with + attributes that are unset because they have never been assigned values). + +w. Fixed a bug that caused the `read' builtin to not clean up readline's + state when using the -e and -t options together and the read timed out. + +x. Fixed a bug that caused the shell to exit with the wrong (but non-zero) + value if a command was not found or was not executable. + +y. Fixed a bug that caused the `time' reserved word to not be recognized as + such in all contexts where it should have been. + +z. Fixed a bug that caused the shell to close process substitution file + descriptors when executing a script without the `#!' leading line. + +aa. Fixed a typo that caused the `compat42' shell option to set the wrong + compatibility level. + +bb. The shell now handles process substitution commands with embedded + parentheses the same way as it does when parsing command substitution. + +cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option + to produce core dumps. + +dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases + where slashes must be matched explicitly. + +ee. Fixed a problem with patterns containing `:' in colon-separated variables + like GLOBIGNORE. + +ff. Fixed a bug that caused indirect variable expansion using indexed arrays to + always use index 0. + +gg. Fixed a parsing problem that caused quoted newlines immediately following a + command substitution to be mishandled in certain cases. + +hh. Fixed a potential buffer overflow on systems without locale_charset or the + bash replacement. + +ii. Fixed a bug that caused background processes to modify the terminal's + process group under certain circumstances. + +jj. Asynchronous commands now always set $? to 0 and are not affected by + whether or not the command's exit status is being inverted. + +kk. Fixed a problem that caused a line ending with an escaped newline and + containingh a prior `eval' to be incorrectly parsed. + +ll. Fixed an issue with programmable completion and `!' in extglob patterns + used as arguments to `compgen -X'. + +mm. Word completion now treats the two-character token `>|' as requiring + filename expansion. + +nn. Bash no longer expands tildes in $PATH elements while in Posix mode. + +oo. Fixed a bug that caused bash to not clean up readline's state, including + the terminal settings, if it received a fatal signal while in a readline() + call (including `read -e' and `read -s'). + +pp. Fixed bug that caused importing shell functions from the environment to + execute additional commands following the function. + +qq. Fixed a bug that caused the parser to return a lookahead character pushed + back by a previous call, even when on another line. + +rr. Fixed a bug that caused many here-documents or many nested case statements + to overflow an internal stack. + +ss. Changed the way bash encodes exported functions for inclusion in the + environment to avoid name collisions with valid variable names and to + indicate that they are exported functions. + +tt. Fixed a bug that could result in an invalid memory access when processing + a here document delimited by end of file or end of string. + +uu. Fixed a bug that could cause an invalid memory access if a command was run + before initializing the job control framework. + +vv. When in Posix mode, bash prints shell function definitions as Posix + specifies them, without the leading `function' keyword. + +ww. The variable attribute display builtins no longer display variables with + invalid names that were imported from the environment. + +xx. Fixed a bug that could allow `break' or `continue' executed from shell + functions to affect loops running outside of the function. + +yy. Fixed a bug that could cause a restricted shell to attempt to import shell + functions from the environment. + +zz. The shell now allows double-quoted identifiers in arithmetic expressions. + +aaa. Fixed a bug that could allow scalar variables subscripted using [@] in + word expansions to be incorrectly quoted. + +bbb. The shell now makes sure to ignore SIGTSTP/SIGTTIN/SIGTTOU in child + processes if they were ignored at shell startup, even if job control is + in effect. + +ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to + the empty string. + +ddd. Posix says that expanding $* in a pattern context where the expansion is + double-quoted should not treat $* as if it were double quoted. + +eee. Bash now restores getopts' internal state between calls to getopts even if + a shell function declares a local copy of OPTIND. + +fff. Fixed a bug that could cause `history -r' or `history -n' to read identical + lines from the history file more than once. + +ggg. The commands executed by `bind -x' now redisplay at most the final line + of a multi-line prompt, and those commands may return 124 to indicate that + the entire prompt should be redrawn. + +hhh. Fixed a bug that could cause `mapfile' to create variables with invalid + names. + +iii. The shell only goes into debugging mode when --debugger is supplied if + the debugger initialization file is present. + +jjj. Fixed a bug that disallowed an assignment to (implicit) subscript 0 of an + existing array in a declare command that set the readonly attribute. + +kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable + its special status. + +lll. Appending to an existing array variable using the compound assignment + syntax (var+=(aaa)) should not affect assignments to existing subscripts + appearing in the compound assignment. + +mmm. Fixed a bug that could cause the shell to crash when a variable with a + null value was passed in the temporary environment and the variable's + attributes are modified using `declare' while performing a redirection. + +nnn. Fixed a bug in printf so that a missing precision specifier after a `.' + is treated as 0. + +ooo. Fixed a bug that attempted to use the internal command timing to time + pipeline components if the pipeline elements are separated by newlines. + +ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase + the values on assignment. + +qqq. Bash does a better job of determining whether or not files are executable + when running on Windows, since the X_OK flag to access(2) is not supported. + +rrr. Fixed a bug that caused some of the shell's internal traps (e.g., ERR) to + be interrupted (and leave incorrect state) by pending SIGINTs. + +sss. Fixed a bug in the bash interface to history expansion to avoid attempting + expansion if the history expansion character occurs in a command + substitution. + +ttt. Fixed a bug that caused the select command to crash if the REPLY variable + ends up empty (e.g., if it's made readonly) + +uuu. Bash handles backslash-quoting of multibyte characters better when quoting + output that is intended to be reused. + +vvv. System-specific changes for: Windows, Cygwin. + +www. Fixes for upper and lower-casing multibyte characters, some locales have + characters whose upper and lowercase versions have different numbers of + bytes. + +xxx. Fixed a bug that caused the ERR trap in a shell function to have the + wrong value for $LINENO. + +yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~ + operator when an open brace appears without a close brace. + +zzz. Fixed a bug in the array unset operation that caused it to attempt to + parse embedded single and double quotes. + +aaaa. Fixed a bug that caused $* to not expand with the first character of + $IFS as a separator in a context where word splitting will not take + place. + +bbbb. Fixed two bugs that could cause the shell to dereference a null pointer + while attempting to print an error message from arithmetic expansion. + +cccc. Fixed a bug that resulted in short-circuited evaluation when reading + commands from a string ending in an unquoted backslash, or when sourcing + a file that ends with an unquoted backslash. + +dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up + any FIFOs created by process substitution. + +eeee. If the -T option is not set, allow the source builtin and shell functions + to set a DEBUG trap that persists after the sourced file or function + returns, instead of restoring the old (unset) value unconditionally. + +ffff. Fixed a bug that caused redirections to not be undone on some syntax + errors, e.g., when parsing a command substitution. + +gggg. Bash only adds asynchronous commands to the table of background pids + whose status it remembers, to avoid it growing too large during scripts + that create and reap large numbers of child processes. This means that + `wait' no longer works on synchronous jobs, but $? can be used to get + the exit status in those cases. + +hhhh. Bash now checks whether or not a shell script argument is a directory + before trying to open it; Posix says implementations may allow open(2) + on a directory. + +iiii. Fixed a bug that could cause the shell to set the terminal's process + group to a background process group when running as part of a pipeline. + +jjjj. Made a few changes to strings to avoid possible potential negative effects + caused by malicious translations. + +kkkk. Fixed a bug that caused the `unset' builtin to continue to treat its + arguments as functions after unsetting a function when invoked with no + options. + +llll. Fixed a bug that would not replace empty strings using pattern + substitution even if the pattern matched the empty string. + +mmmm. Fixed a bug with word completion that prevented some characters from + being backslash-quoted (backquote, dollar sign). + +nnnn. Fixed a bug that prevented a command from the history re-executed by the + `fc' builtin from setting verbose mode. + +oooo. Fixed a bug that caused the shell to not enable and disable function + tracing with changes to the `extdebug' shell option. + +pppp. Fixed a bug that caused assignments to nameref variables pointing to + unset variables with attributes but no values to create variables with + incorrect names. + +qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to + unset the wrong variable under certain circumstances. + +rrrr. Fixed a bug that caused close braces occurring in brace expansions within + command substitutions to incorrectly terminate parameter expansions. + +ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH. + +tttt. Fixed a bug that caused interactive shells compiled without job control + to return incorrect status values for child processes when running a + single command that creates enough children to use the entire PID space. + +uuuu. `esac' should not be recognized as a reserved word when it appears as the + second or later pattern in a case statement pattern list. + +vvvv. Fixed a bug that caused the completion code to read past the end of the + readline line buffer while skipping assignment statements to find the + command name. + +wwww. Fixed a bug that caused case statements within loops contained in a + command substitution to be parsed incorrectly. + +xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after + running `wait' with no arguments and interrupting it with ^C without + a trap handler installed. + +2. Changes to Readline + +a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y' + commands with modifiers was fixed. + +b. Fixed a bug that caused callback mode to dump core when reading a + multiple-key sequence (e.g., arrow keys). + +c. Fixed a bug that caused the redisplay code to erase some of the line when + using horizontal scrolling with incremental search. + +d. Readline's input handler now performs signal processing if read(2) is + interrupted by SIGALRM or SIGVTALRM. + +e. Fixed a problem with revert-all-at-newline freeing freed memory. + +f. Clarified the documentation for the history_quotes_inhibit_expansion + variable to note that it inhibits scanning for the history comment + character and that it only affects double-quoted strings. + +g. Fixed an off-by-one error in the prompt printed when performing searches. + +h. Use pselect(2), if available, to wait for input before calling read(2), so + a SIGWINCH can interrupt it, since it doesn't interrupt read(2). + +i. Some memory leaks caused by signals interrupting filename completion have + been fixed. + +j. Reading EOF twice on a non-empty line causes EOF to be returned, rather + than the partial line. This can cause partial lines to be executed on + SIGHUP, for example. + +k. Fixed a bug concerning deleting multibyte characters from the search + string while performing an incremental search. + +l. Fixed a bug with tilde expanding directory names in filename completion. + +m. Fixed a bug that did not allow binding sequences beginning with a `\'. + +n. Fixed a redisplay bug involving incorrect line wrapping when the prompt + contains a multibyte character in the last screen column. + +o. Fixed a bug that caused history expansion to disregard characters that are + documented to delimit a history event specifier without requiring `:'. + +p. Fixed a bug that could cause reading past the end of a string when reading + the value when binding the set of isearch terminators. + +q. Fixed a bug that caused readline commands that depend on knowing which + key invoked them to misbehave when dispatching key sequences that are + prefixes of other key bindings. + +r. Paren matching now works in vi insert mode. + +3. New Features in Bash + +a. There is now a settable configuration #define that will cause the shell + to exit if the shell is running setuid without the -p option and setuid + to the real uid fails. + +b. Command and process substitutions now turn off the `-v' option when + executing, as other shells seem to do. + +c. The default value for the `checkhash' shell option may now be set at + compile time with a #define. + +d. The `mapfile' builtin now has a -d option to use an arbitrary character + as the record delimiter, and a -t option to strip the delimiter as + supplied with -d. + +e. The maximum number of nested recursive calls to `eval' is now settable in + config-top.h; the default is no limit. + +f. The `-p' option to declare and similar builtins will display attributes for + named variables even when those variables have not been assigned values + (which are technically unset). + +g. The maximum number of nested recursive calls to `source' is now settable + in config-top.h; the default is no limit. + +h. All builtin commands recognize the `--help' option and print a usage + summary. + +i. Bash does not allow function names containing `/' and `=' to be exported. + +j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options. + +k. The shell now allows `time ; othercommand' to time null commands. + +l. There is a new `--enable-function-import' configuration option to allow + importing shell functions from the environment; import is enabled by + default. + +m. `printf -v var ""' will now set `var' to the empty string, as if `var=""' + had been executed. + +n. GLOBIGNORE, the pattern substitution word expansion, and programmable + completion match filtering now honor the value of the `nocasematch' option. + +o. There is a new ${parameter@spec} family of operators to transform the + value of `parameter'. + +p. Bash no longer attempts to perform compound assignment if a variable on the + rhs of an assignment statement argument to `declare' has the form of a + compound assignment (e.g., w='(word)' ; declare foo=$w); compound + assignments are accepted if the variable was already declared as an array, + but with a warning. + +q. The declare builtin no longer displays array variables using the compound + assignment syntax with quotes; that will generate warnings when re-used as + input, and isn't necessary. + +r. Executing the rhs of && and || will no longer cause the shell to fork if + it's not necessary. + +s. The `local' builtin takes a new argument: `-', which will cause it to save + the single-letter shell options and restore their previous values at + function return. + +t. `complete' and `compgen' have a new `-o nosort' option, which forces + readline to not sort the completion matches. + +u. Bash now allows waiting for the most recent process substitution, since it + appears as $!. + +v. The `unset' builtin now unsets a scalar variable if it is subscripted with + a `0', analogous to the ${var[0]} expansion. + +w. `set -i' is no longer valid, as in other shells. + +x. BASH_SUBSHELL is now updated for process substitution and group commands + in pipelines, and is available with the same value when running any exit + trap. + +y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or + not bash is being run in a GNU Emacs shell window. + +z. Bash now treats SIGINT received when running a non-builtin command in a + loop the way it has traditionally treated running a builtin command: + running any trap handler and breaking out of the loop. + +aa. New variable: EXECIGNORE; a colon-separate list of patterns that will + cause matching filenames to be ignored when searching for commands. + +bb. Aliases whose value ends in a shell metacharacter now expand in a way to + allow them to be `pasted' to the next token, which can potentially change + the meaning of a command (e.g., turning `&' into `&&'). + +4. New Features in Readline + +a. The history truncation code now uses the same error recovery mechanism as + the history writing code, and restores the old version of the history file + on error. The error recovery mechanism handles symlinked history files. + +b. There is a new bindable variable, `enable-bracketed-paste', which enables + support for a terminal's bracketed paste mode. + +c. The editing mode indicators can now be strings and are user-settable + (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' + variables). Mode strings can contain invisible character sequences. + Setting mode strings to null strings restores the defaults. + +d. Prompt expansion adds the mode string to the last line of a multi-line + prompt (one with embedded newlines). + +e. There is a new bindable variable, `colored-completion-prefix', which, if + set, causes the common prefix of a set of possible completions to be + displayed in color. + +f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- + mode yank-pop. + +g. The redisplay code underwent several efficiency improvements for multibyte + locales. + +h. The insert-char function attempts to batch-insert all pending typeahead + that maps to self-insert, as long as it is coming from the terminal. + +i. rl_callback_sigcleanup: a new application function that can clean up and + unset any state set by readline's callback mode. Intended to be used + after a signal. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-release, and +the previous version, bash-4.3-rc2. + +1. Changes to Bash + +a. Only Posix-mode shells should exit on an assignment failure in the + temporary environment preceding a special builtin. This is how it's been + documented. + +b. Fixed a bug that caused a failed special builtin to not exit a posix-mode + shell if the failing builtin was on the LHS of a && or ||. + +c. Changed the handling of unquoted backslashes in regular expressions to be + closer to bash-4.2. + +d. globstar (**) no longer traverses symbolic links that resolve to + directories. This eliminates some duplicate entries. + +e. Fixed a bug that caused a SIGCHLD trap handler to not be able to change the + SIGCHLD disposition. + +f. Fixed a bug that caused a crash when -x was enabled and a command + contained a printable multibyte (wide) character. + +g. Fixed a bug that caused an interactive shell without line editing enabled + to read invalid data after receiving a SIGINT. + +h. Fixed a bug that caused command word completion to fail if the directory in + $PATH where the completion would be found contained single or double quotes. + +i. Fixed a bug that caused a shell with -v enabled to print commands in $() + multiple times. + +2. Changes to Readline + +a. Fixed a bug that caused `undo' to reference freed memory or null pointers. + +3. New Features in Bash + +a. The [[ -v ]] option now understands array references (foo[1]) and returns + success if the referenced element has a value. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-rc2, and the +previous version, bash-4.3-rc1. + +1. Changes to Bash + +a. Fixed a bug that left variables set by printf -v marked as invisible. + +b. Fixed an off-by-one error in a job control warning message. + +c. Fixed a bug that caused the shell to crash after declaring a nameref variable + without a value. + +d. Fixed a bug that caused asynchronous commands to not set $? correctly. + +e. Fixed a bug that caused out-of-order execution when executing aliases with + embedded newlines containing `.' commands. + +f. Fixed a bug that caused error messages generated by expansion errors in + `for' commands to have the wrong line number. + +g. Fixed a bug that caused the `wait' builtin to not be interruptible in an + interactive shell with job control enabled. + +h. Fixed a bug that caused SIGINT and SIGQUIT to not be trappable in + asynchronous subshell commands. + +i. Bash now requires that the value assigned to a nameref variable be a valid + shell identifier (variable name or array reference). + +j. Converting an existing variable to a nameref variable now turns off the + -i/-l/-u/-c attributes. + +k. Displaying a nameref variable with `declare -p' now displays the nameref + variable and its value rather than following the nameref chain. + +l. Fixed a problem with interrupt handling that caused a second and subsequent + SIGINT to be ignored by interactive shells. + +m. Fixed a bug that caused certain positional parameter and array expansions + to mishandle (discard) null positional parameters and array elements. + +n. The shell no longer blocks receipt of signals while running trap handlers + for those signals, and allows most trap handlers to be run recursively + (running trap handlers while a trap handler is executing). + +o. The shell now handles backslashes in regular expression arguments to the + [[ command's =~ operator slightly differently, resulting in more + consistent behavior. + +2. Changes to Readline + +a. Fixed a bug that could cause readline to crash and seg fault attempting to + expand an empty history entry. + +b. Fixed a bug that caused a bad entry in the $LS_COLORS variable to abort all + color processing but leave color enabled. + +c. Fixed a bug that caused display problems with multi-line prompts containing + invisible characters on multiple lines. + +d. Fixed a bug that caused effects made by undoing changes to a history line to + be discarded. + +3. New Features in Bash + +4. New Features in Readline + +a. When creating shared libraries on Mac OS X, the pathname written into the + library (install_name) no longer includes the minor version number. +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-rc1, and the +previous version, bash-4.3-beta2. + +1. Changes to Bash + +a. Fixed a bug in bash completion that caused a tilde to be expanded even if + the `direxpand' option was not enabled. + +b. Fixed a potential bug that could cause corrupted input in interactive shells + running without line editing and with `ignoreeof' enabled. + +c. Fixed a bug that could cause failures when opening pipes back to shells + created to run process substitutions. + +d. Fixed a bug that caused an assignment to TEXTDOMAIN to require TEXTDOMAINDIR + to be set in order to actually change the current text domain. + +e. Changed the way redirections are printed to avoid confusion when the target + of an output redirection is a process substitution beginning with `>'. + +2. Changes to Readline + +a. Shared library building is now supported on Mac OS X 10.9 (Darwin 13). + +3. New Features in Bash + +a. `cd' has a new `-@' option to browse a file's extended attributes on + systems that support O_XATTR. + +4. New Features in Readline + +a. There are additional default key bindings for MinGW32 + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-beta2, and the +previous version, bash-4.3-beta. + +1. Changes to Bash + +a. Fixed a bug that caused assignment to an unset variable using a negative + subscript to result in a segmentation fault. + +b. Fixed a bug that caused assignment to a string variable using a negative + subscript to use the incorrect index. + +c. Fixed a bug that caused some strings to be interpreted as invalid + extended globbing expressions when used with the help builtin. + +d. Fixed a bug that caused an attempt to trap a signal whose disposition + cannot be changed to reference uninitialized memory. + +e. Command completion now skips assignment statements preceding a command + name and completes the command. + +f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump + core under certain circumstances. + +g. Fixed a bug that caused the `read -N' to misbehave when the input stream + contains 0xff. + +2. Changes to Readline + +a. Changed message when an incremental search fails to include "failed" in + the prompt and display the entire search string instead of just the last + matching portion. + +b. Fixed a bug that caused an arrow key typed to an incremental search prompt + to process the key sequence incorrectly. + +c. Additional key bindings for arrow keys on MinGW. + +3. New Features in Bash + +a. The help builtin now attempts substring matching (as it did through + bash-4.2) if exact string matching fails. + +b. The fc builtin now interprets -0 as the current command line. + +c. Completing directory names containing shell variables now adds a trailing + slash if the expanded result is a directory. + +4. New Features in Readline + +a. rl_change_environment: new application-settable variable that controls + whether or not Readline modifies the environment (currently readline + modifies only LINES and COLUMNS). + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-beta, and the +previous version, bash-4.3-alpha. + +1. Changes to Bash + +a. Fixed a bug in the prompt directory name "trimming" code that caused + memory corruption and garbled the results. + +b. Fixed a bug that caused single quotes that resulted from $'...' quoting + in the replacement portion of a double-quoted ${word/pat/rep} expansion + to be treated as quote characters. + +c. Fixed a bug that caused assignment statements preceding a command word to + result in assignment statements following a declaration command to not be + expanded like assignment statements. + +d. Fixed a bug with variable search order in the presence of local variables + with the same name as variables in the temporary environment supplied to + a shell function. + +e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process + substitutions even in an arithmetic context. + +f. Fixed several cases where `invisible' variables (variables with attributes + but no values, which are technically unset) were treated incorrectly. + +g. Fixed a bug that caused group commands in pipelines that were not the + last element to not run the EXIT trap. + +h. Fixed a bug that caused `unset -n' to not unset a nameref variable in + certain cases. + +i. Fixed the nameref circular reference checking to be less strict and only + disallow a nameref variable with the same value as its name at the global + scope. + +j. Fixed a bug that caused trap handlers to be executed recursively, + corrupting internal data structures. + +k. Fixed a bug that could result in bash not compiling if certain options were + not enabled. + +l. Fixed a bug that caused the arithmetic expansion code to attempt variable + assignments when operator precedence prohibited them. + +m. Word expansions like ${foo##bar} now understand indirect variable references. + +n. Fixed a bug that caused `declare -fp name' to not display a function + definition. + +o. Fixed a bug that caused asynchronous child processes to modify the stdin + file pointer when bash was using it to read a script, which modified the + parent's value as well. + +2. Changes to Readline + +a. Fixed a bug in vi mode that caused the arrow keys to set the saved last + vi-mode command to the wrong value. + +b. Fixed a bug that caused double-quoted strings to be scanned incorrectly + when being used as the value of a readline variable assignment. + +c. Fixed a bug with vi mode that prevented `.' from repeating a command + entered on a previous line (command). + +d. Fixed a bug that could cause completion to core dump if it was interrupted + by a signal. + +e. Readline now sends the meta-key enable string to the terminal if the + terminal has been successfully initialized. + +f. Readline now calls the signal hook after resizing the terminal when it + receives a SIGWINCH. + +g. Fixed a bug that could cause the history list code to perform an out-of- + bounds array reference if the history list is empty. + +3. New Features in Bash + +a. Shells started to run process substitutions now run any trap set on EXIT. + +b. There is now a configure-time option to enable the globasciiranges option + by default. + +c. The read builtin now checks its first variable argument for validity before + trying to read any input. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-alpha, +and the previous version, bash-4.2-release. + +1. Changes to Bash + +a. Fixed several bugs concerning incomplete bracket expressions in filename + generation (globbing) patterns. + +b. Fixed a bug with single quotes and WORD in ${param op WORD} when running + in Posix mode. + +c. Fixed a bug that caused the pattern removal and pattern substitution word + expansions and case statement word expansion to not match the empty string. + +d. Fixed a bug that caused the tzset() function to not work after changing + the TZ environment variable. + +e. Fixed a bug that caused the RHS of an assignment statement to undergo + word splitting when it contained an unquoted $@. + +f. Fixed bugs that caused the shell to not react to a SIGINT sent while + waiting for a child process to exit. + +g. Bash doesn't try to run things in a signal handler context when it gets a + signal (SIGINT/SIGHUP/etc) while reading input using readline but still + be responsive to terminating signals. + +h. Fixed a bug that caused bash to go into an infinite loop if a filename + to be matched contained an invalid multibyte character. + +i. Fixed a bug that caused PS4 to end up being truncated if it is longer + than 128 bytes. + +j. Fixed a bug that caused brace expansion to not skip over double-quoted + command substitution. + +k. System-specific updates for: DJGPP, HP/UX, Mac OS X + +l. Fixed a bug in displaying commands that caused redirections to be associated + with the wrong part of the command. + +m. Fixed the coproc cleanup to unset the appropriate shell variables when a + coproc terminates. + +n. Fixed a bug that caused `fc' to dump core due to incorrect calculation of + the last history entry. + +o. Added workarounds for FreeBSD's implementation of faccessat/eaccess and + `test -x'. + +p. Fixed a bug that caused the shell to not match patterns containing + control-A. + +q. Fixed a bug that could result in doubled error messages when the `printf' + builtin got a write error. + +r. Fixed a bug that caused the shell to not correctly expand words containing + multiple consecutive quoted empty strings (""""""aa). + +s. Fixed a bug that caused the shell to not correctly parse multi-line + process substitutions containing comments and quoted strings. + +t. Fixed a problem with the bash malloc's internal idea of the top of the + memory heap that resulted in incorrect decisions to try to reduce the + break and give memory back to the kernel. + +u. There are changes to the expansions performed on compound array assignments, + in an effort to make foo=( [ind1]=bar [ind2]=baz ) identical to + foo[ind1]=bar foo[ind2]=baz. + +v. Bash now reports an error if `read -a name' is used when `name' is an + existing associative array. + +w. Fixed a bug that allowed an attempted assignment to a readonly variable + in an arithmetic expression to not return failure. + +x. Fixed several bugs that caused completion functions to be invoked even when + the cursor was before the first word in the command. + +y. Fixed a bug that caused parsing a command substitution to overwrite the + parsing state associated with the complete input line. + +z. Fixed several bugs with the built-in snprintf replacement and field widths + and floating point. + +aa. Fixed a bug that caused incorrect offset calculations and input buffer + corruption when reading files longer than 2^31 bytes. + +bb. Fixed several bugs where bash performed arithmetic evaluation in contexts + where evaluation is suppressed. + +cc. Fixed a bug that caused bash to close FIFOs used for process substitution + too early when a shell function was executing, but protect against using + all file descriptors when the shell functions are invoked inside loops. + +dd. Added checks for printable (and non-printable) multibyte characters for + use in error messages. + +ee. Fixed a bug that caused ^O (operate-and-get-next) to not work correctly + at the end of the history list. + +ff. Fixed a bug that caused command-oriented history to incorrectly combine + here documents into one line. + +gg. Fixed a bug that caused importing SHELLOPTS from the environment into a + Posix-mode shell to print an error message and refuse to parse it. + +hh. Fixed a bug that caused the shell to delete an extra history entry when + using `history -s'. + +ii. Fixed a bug that caused floating-point exceptions and overflow errors + for the / and % arithmetic operators when using INTMAX_MIN and -1. + +jj. Fixed a bug that caused parsing errors when reading an arithmetic for + loop inside a command substitution. + +kk. Fixed a bug that caused a readonly function to be unset when unset was + called without the -f or -v option. + +ll. Fixed several bugs in the code that quotes characters special to regular + expressions when used in a quoted string on the RHS of the =~ operator + to the [[ command. + +mm. Fixed a bug that caused redirections to fail because the file descriptor + limit was set to a value less than 10. + +nn. Fixed a bug that caused the `read' builtin to execute code in a signal + handler context if read timed out. + +oo. Fixed a bug that caused extended globbing patterns to not match files + beginning with `.' correctly when a `.' was explicitly supplied in the + pattern. + +pp. Fixed a bug that caused key sequences longer than two characters to not + work when used with `bind -x'. + +qq. Fixed a bug that resulted in redefined functions having the wrong source + file names in BASH_SOURCE. + +rr. Fixed a bug that caused the read builtin to assign null strings to variables + when using `read -N', which caused core dumps when referenced + +ss. Fixed a bug that caused `bash -m script' to not enable job control while + running the script. + +tt. Fixed a bug that caused `printf -v var' to dump core when used with the + %b format code. + +uu. Fixed a bug that caused the shell to exit with the wrong status if -e was + active and the shell exited on a substitution error. + +vv. Fixed a bug that caused the shell to seg fault if an array variable with + the same name as an existing associative array was implicitly created by + an assignment (declare a[n]=b). + +ww. Fixed a bug that caused a redirection to misbehave if the number specified + for a file descriptor overflows an intmax_t. + +xx. Fixed several bugs with the handling of valid and invalid unicode character + values when used with the \u and \U escape sequences to printf and $'...'. + +yy. Fixed a bug that caused tildes to not be escaped in expanded filenames, + making them subject to later expansion. + +zz. When using the pattern substitution word expansion, bash now runs the + replacement string through quote removal, since it allows quotes in that + string to act as escape characters. This is not backwards compatible, so + it can be disabled by setting the bash compatibility mode to 4.2. + +aaa. Fixed the rest of the cases where the shell runs non-allowed code in a + signal handler context. + +bbb. Fixed a bug that caused spurious DEL characters (\177) to appear in + double-quoted expansion where the RHS is evaluated to the empty string. + +ccc. Fixed a bug that caused the use of the shell's internal random number + generator for temporary file names to perturb the random number + sequence. + +ddd. Fixed several bugs that caused `declare -g' to not set the right global + variables or to misbehave when declaring global indexed arrays. + +eee. Fixed a logic bug that caused extended globbing in a multibyte locale to + cause failures when using the pattern substititution word expansions. + +fff. Fixed a bug that caused the `lastpipe' option to corrupt the file + descriptor used to read the script. + +ggg. Fixed a bug that causes the shell to delete DEL characters in the + expanded value of variables used in the same quoted string as variables + that expand to nothing. + +hhh. Fixed a bug that caused the shell to assign the wrong value from an + assignment like (( x=7 )) when `x' was an existing array variable. + +iii. Fixed a bug that caused the shell to misbehave when generating sequences + and the boundary values overflow an intmax_t. + +jjj. Fixed a bug caused expansion errors if an expansion of "$@" appeared + next to another expansion (e.g.. "${@}${x}"). + +kkk. Fixed a potential buffer overflow bug when performing /dev/fd expansion. + +lll. Fixed a bug that resulted in an extra semicolon being added to compound + assignments when they were added to the history list. + +mmm. Fixed a bug that caused mapfile to read one extra line from the input. + +nnn. Fixed a bug that caused the mail checking code to use uninitialized + values. + +ooo. Fixed a bug that prevented history timestamps from being saved if the + history comment character is unset. + +ppp. Fixed a bug that caused the case-modifying expansions to not work with + multibyte characters. + +qqq. Fixed a bug that caused the edit-and-execute bindable readline command + to see the wrong data if invoked in the middle of a multi-line quoted + string. + +rrr. Fixed a bug that resulted in the shell returning the wrong exit status + for a background command on systems that recycle PIDs very quickly. + +sss. Fixed a bug that caused asynchronous group commands to not run any EXIT + trap defined in the body of the command. + +ttt. Fixed a bug that caused `eval "... ; return"' to not clean up properly. + +uuu. Fixed a bug that caused the shell to dump core if `read' reads an escaped + IFS whitespace character. + +vvv. Fixed a bug that caused BASH_COMMAND to be set to an incorrect value when + executing a (...) subshell. + +www. Fixed a couple of pointer aliasing bugs with the token string in arithmetic + evaluation. + +xxx. Fixed a bug with parsing multi-line command substitutions when reading + the `do' keyword followed by whitespace. + +yyy. Fixed a bug that caused the shell to seg fault if the time given to the + printf %(...)T format overflowed the value accepted by localtime(3). + +zzz. Fixed a problem with displaying help topics in two columns when the + translated text contained multibyte characters. + +aaaa. Fixed a bug with the extended globbing pattern matcher where a `*' was + followed by a negated extended glob pattern. + +bbbb. Fixed a race condition with short-lived coproc creation and reaping that + caused the child process to be reaped before the various coproc shell + variables were initialized. + +cccc. Fixed a bug where turning off `errexit' in command substitution subshells + was not reflected in $SHELLOPTS. + +dddd. Partially fixed an inconsistency in how the shell treated shell + functions run from an EXIT trap. + +eeee. Fixed a bug in how the shell invalidated FIFOs used for process + substitution when executing a pipeline (once rather than in every child). + +ffff. Fixed a bug that occurred when expanding a special variable ($@, $*) + within double quotes and the expansion resulted in an empty string. + +gggg. Fixed bugs with executing a SIGCHLD trap handler to make sure that it's + executed once per exited child. + +hhhh. Fixed a bug that caused `declare' and `test' to find variables that + had been given attributes but not assigned values. Such variables are + not set. + +iiii. Fixed a bug that caused commands in process substitutions to not look in + the local temporary environment when performing word expansions. + +jjjj. Fixed several problems with globstar expansions (**/**) returning null + filenames and multiple instances of the same pathname. + +kkkk. Fixed an oversight that did not allow the exit status of `coproc' to + be inverted using `!'. + +llll. Fixed a bug that caused the -e option to be re-enabled using `set -e' + even when executing in a context where -e is ignored. + +mmmm. Fixed a (mostly theoretical) bug with input lines longer than SIZE_MAX. + +nnnn. Fixed a bug that could result in double evaluation of command + substitutions when they appear in failed redirections. + +oooo. Fixed a bug that could cause seg faults during `mapfile' callbacks if + the callback unsets the array variable mapfile is using. + +pppp. Fixed several problems with variable assignments using ${var:=value} + when the variable assignment is supposed to have side effects. + +qqqq. Fixed a bug that caused a failure of an assignment statement preceding a + builtin caused the next invocation of a special builtin to exit the shell. + +rrrr. Fixed several problems with IFS when it appears in the temporary environment + and is used in redirections. + +ssss. Fixed a problem that caused IFS changes using ${IFS:=value} to modify + how preceding expansions were split. + +tttt. Fixed a problem that caused subshells to not run an EXIT trap they set. + +uuuu. Fixed a problem that caused shells started in posix mode to attempt to + import shell functions with invalid names from the environment. We now + print a warning. + +vvvv. Worked around a kernel problem that caused SIGCHLD to interrupt open(2) + on a FIFO used for process substitution, even if the SIGCHLD handler was + installed with the SA_RESTART flag. + +wwww. Fixed a problem that resulted in inconsistent expansion of $* and ${a[*]}. + +xxxx. Fixed a problem that caused `read -t' to crash when interrupted by + SIGINT. + +yyyy. Fixed a problem that caused pattern removal to fail randomly because the + pattern matcher read beyond the end of a string. + +zzzz. Fixed a bug that caused core dumps when shell functions tried to create + local shadow copies of special variables like GROUPS. + +aaaaa. Fixed a bug that caused SIGTERM to be occasionally lost by children of + interactive shells when it arrived before the child process reset the + handler from SIG_DFL. + +bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor + n closed if executed with a builtin command. + +ccccc. Fixed a bug that caused incorrect completion quoting when completing a + word containing a globbing character with `show-all-if-ambiguous' set. + +ddddd. Fixed a bug that caused printf's %q format specifier not to quote a + tilde even if it appeared in a location where it would be subject to + tilde expansion. + +2. Changes to Readline + +a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode + commands to work on the entire line. + +b. Fixed a bug that caused redisplay problems with prompts longer than 128 + characters and history searches. + +c. Fixed a bug that caused readline to try and run code to modify its idea + of the screen size in a signal handler context upon receiving a SIGWINCH. + +d. Fixed a bug that caused the `meta' key to be enabled beyond the duration + of an individual call top readline(). + +e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's + redisplay to mishandle zero-width combining characters. + +f. Fixed a bug that caused readline to `forget' part of a key sequence when + a multiple-key sequence caused it to break out of an incremental search. + +g. Fixed bugs that caused readline to execute code in a signal handler + context if interrupted while reading from the file system during completion. + +h. Fixed a bug that caused readline to `forget' part of a key sequence when + reading an unbound multi-character key sequence. + +i. Fixed a bug that caused Readline's signal handlers to be installed beyond + the bounds of a single call to readline(). + +j. Fixed a bug that caused the `.' command to not redo the most recent `R' + command in vi mode. + +k. Fixed a bug that caused ignoring case in completion matches to result in + readline using the wrong match. + +l. Paren matching now works in vi insert mode. + +m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix + work together. + +n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone + in vi editing mode. + +o. Fixed a bug that caused the filename comparison code to not compare + multibyte characters correctly when using case-sensitive or case-mapping + comparisons. + +p. Fixed the input reading loop to call the input hook function only when there + is no terminal input available. + +q. Fixed a bug that caused binding a macro to a multi-character key sequence + where the sequence and macro value share a common prefix to not perform + the macro replacement. + +r. Fixed several redisplay errors with multibyte characters and prompts + containing invisible characters when using horizontal scrolling. + +s. Fixed a bug that caused redisplay errors when trying to overwrite + existing characters using multibyte characters. + +3. New Features in Bash + +a. The `helptopic' completion action now maps to all the help topics, not just + the shell builtins. + +b. The `help' builtin no longer does prefix substring matching, so `help read' + does not match `readonly'. + +c. The shell can be compiled to not display a message about processes that + terminate due to SIGTERM. + +d. Non-interactive shells now react to the setting of checkwinsize and set + LINES and COLUMNS after a foreground job exits. + +e. There is a new shell option, `globasciiranges', which, when set to on, + forces globbing range comparisons to use character ordering as if they + were run in the C locale. + +f. There is a new shell option, `direxpand', which makes filename completion + expand variables in directory names in the way bash-4.1 did. + +g. In Posix mode, the `command' builtin does not change whether or not a + builtin it shadows is treated as an assignment builtin. + +h. The `return' and `exit' builtins accept negative exit status arguments. + +i. The word completion code checks whether or not a filename containing a + shell variable expands to a directory name and appends `/' to the word + as appropriate. The same code expands shell variables in command names + when performing command completion. + +j. In Posix mode, it is now an error to attempt to define a shell function + with the same name as a Posix special builtin. + +k. When compiled for strict Posix conformance, history expansion is disabled + by default. + +l. The history expansion character (!) does not cause history expansion when + followed by the closing quote in a double-quoted string. + +m. `complete' and its siblings compgen/compopt now takes a new `-o noquote' + option to inhibit quoting of the completions. + +n. Setting HISTSIZE to a value less than zero causes the history list to be + unlimited (setting it 0 zero disables the history list). + +o. Setting HISTFILESIZE to a value less than zero causes the history file size + to be unlimited (setting it to 0 causes the history file to be truncated + to zero size). + +p. The `read' builtin now skips NUL bytes in the input. + +q. There is a new `bind -X' option to print all key sequences bound to Unix + commands. + +r. When in Posix mode, `read' is interruptible by a trapped signal. After + running the trap handler, read returns 128+signal and throws away any + partially-read input. + +s. The command completion code skips whitespace and assignment statements + before looking for the command name word to be completed. + +t. The build process has a new mechanism for constructing separate help files + that better reflects the current set of compilation options. + +u. The -nt and -ot options to test now work with files with nanosecond + timestamp resolution. + +v. The shell saves the command history in any shell for which history is + enabled and HISTFILE is set, not just interactive shells. + +w. The shell has `nameref' variables and new -n(/+n) options to declare and + unset to use them, and a `test -R' option to test for them. + +x. The shell now allows assigning, referencing, and unsetting elements of + indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which + count back from the last element of the array. + +y. The {x} operators to [[ do string comparisons using the current locale + only if the compatibility level is greater than 40 (set to 41 by default). + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.1-alpha, +and the previous version, bash-4.0-release. + +1. Changes to Bash + +a. Fixed bugs in the parser involving new parsing of the commands contained + in command substitution when the substitution is read. + +b. Fixed a bug that caused the shell to dump core when performing programmable + completion using a shell function. + +c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong + time. + +d. Fixed a bug that caused the shell to dump core when listing jobs in the + `exit' builtin. + +e. Fixed several bugs encountered when reading subscripts in associative + array assignments and expansions. + +f. Fixed a bug that under some circumstances caused an associative array to + be converted to an indexed array. + +g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set + $? to a value > 128. + +h. Fixed a bug that caused the shell to remove FIFOs associated with process + substitution inside shell functions. + +i. Fixed a bug that caused terminal attributes to not be reset when the + `read' builtin timed out. + +j. Fixed a bug in brace expansion that caused unwanted zero padding of the + expanded terms. + +k. Fixed a bug that prevented the |& construct from working as intended when + used with a simple command with additional redirections. + +l. Fixed a bug with the case statement ;& terminator that caused the shell to + dereference a NULL pointer. + +m. Fixed a bug that caused assignment statements or redirections preceding + a simple command name to inhibit alias expansion. + +n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation: + every expansion of an unset variable except $@ and $* will cause the + shell to exit. + +o. Fixed a bug that caused double-quoted expansions of $* inside word + expansions like ${x#$*} to not expand properly when $IFS is empty. + +p. Fixed a bug that caused traps to set $LINENO to the wrong value when they + execute. + +q. Fixed a bug that caused off-by-one errors when computing history lines in + the `fc' builtin. + +r. Fixed a bug that caused some terminating signals to not exit the shell + quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV) + multiple times. + +s. Fixed a bug that caused the shell to attempt to add empty lines to the + history list when reading here documents. + +t. Made some internal changes that dramatically speeds up sequential indexed + array access. + +u. Fixed a bug that caused the shell to write past the end of a string when + completing a double-quoted string ending in a backslash. + +v. Fixed a bug that caused the shell to replace too many characters when a + pattern match was null in a ${foo//bar} expansion. + +w. Fixed bugs in the expansion of ** that caused duplicate directory names + and the contents of the current directory to be omitted. + +x. Fixed a bug that caused $? to not be set correctly when referencing an + unset variable with set -u and set -e enabled. + +y. Fixed a bug caused by executing an external program from the DEBUG trap + while a pipeline was running. The effect was to disturb the pipeline + state, occasionally causing it to hang. + +z. Fixed a bug that caused the ** glob expansion to dump core if it + encountered an unsearchable directory. + +aa. Fixed a bug that caused `command -v' and `command -V' to not honor the + path set by the -p option. + +bb. Fixed a bug that caused brace expansion to take place too soon in some + compound array assignments. + +cc. Fixed a bug that caused programmable completion functions' changes to + READLINE_POINT to not be reflected back to readline. + +dd. Fixed a bug that caused the shell to dump core if a trap was executed + during a shell assignment statement. + +ee. Fixed an off-by-one error when computing the number of positional + parameters for the ${@:0:n} expansion. + +ff. Fixed a problem with setting COMP_CWORD for programmable completion + functions that could leave it set to -1. + +gg. Fixed a bug that caused the ERR trap to be triggered in some cases where + `set -e' would not have caused the shell to exit. + +hh. Fixed a bug that caused changes made by `compopt' to not persist past the + completion function in which compopt was executed. + +ii. Fixed a bug that caused the list of hostname completions to not be cleared + when HOSTNAME was unset. + +jj. Fixed a bug that caused variable expansion in here documents to look in + any temporary environment. + +kk. Bash and readline can now convert file names between precomposed and + decomposed Unicode on Mac OS X ("keyboard" and file system forms, + respectively). This affects filename completion (using new + rl_filename_rewrite_hook), globbing, and readline redisplay. + +ll. The ERR and EXIT traps now see a non-zero value for $? when a parser + error after set -e has been enabled causes the shell to exit. + +mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to + not contain the correct number of digits. + +nn. Fixed a bug that caused the shell to free non-allocated memory when + unsetting an associative array which had had a value implicitly assigned + to index "0". + +oo. Fixed a memory leak in the ${!prefix@} expansion. + +pp. Fixed a bug that caused printf to not correctly report all write errors. + +qq. Fixed a bug that caused single and double quotes to act as delimiters + when splitting a command line into words for programmable completion. + +rr. Fixed a bug that caused ** globbing that caused **/path/* to match every + directory, not just those matching `path'. + +ss. Fixed a bug that caused the shell to dump core when running `help' without + arguments if the terminal width was fewer than 7 characters. + +2. Changes to Readline + +a. The SIGWINCH signal handler now avoids calling the redisplay code if + one arrives while in the middle of redisplay. + +b. Changes to the timeout code to make sure that timeout values greater + than one second are handled better. + +c. Fixed a bug in the redisplay code that was triggered by a prompt + containing invisible characters exactly the width of the screen. + +d. Fixed a bug in the redisplay code encountered when running in horizontal + scroll mode. + +e. Fixed a bug that prevented menu completion from properly completing + filenames. + +f. Fixed a redisplay bug caused by a multibyte character causing a line to + wrap. + +g. Fixed a bug that caused key sequences of two characters to not be + recognized when a longer sequence identical in the first two characters + was bound. + +h. Fixed a bug that caused history expansion to be attempted on $'...' + single-quoted strings. + +i. Fixed a bug that caused incorrect redisplay when the prompt contained + multibyte characters in an `invisible' sequence bracketed by \[ and + \]. + +j. Fixed a bug that caused history expansion to short-circuit after + encountering a multibyte character. + +3. New Features in Bash + +a. Here-documents within $(...) command substitutions may once more be + delimited by the closing right paren, instead of requiring a newline. + +b. Bash's file status checks (executable, readable, etc.) now take file + system ACLs into account on file systems that support them. + +c. Bash now passes environment variables with names that are not valid + shell variable names through into the environment passed to child + processes. + +d. The `execute-unix-command' readline function now attempts to clear and + reuse the current line rather than move to a new one after the command + executes. + +e. `printf -v' can now assign values to array indices. + +f. New `complete -E' and `compopt -E' options that work on the "empty" + completion: completion attempted on an empty command line. + +g. New complete/compgen/compopt -D option to define a `default' completion: + a completion to be invoked on command for which no completion has been + defined. If this function returns 124, programmable completion is + attempted again, allowing a user to dynamically build a set of completions + as completion is attempted by having the default completion function + install individual completion functions each time it is invoked. + +h. When displaying associative arrays, subscripts are now quoted. + +i. Changes to dabbrev-expand to make it more `emacs-like': no space appended + after matches, completions are not sorted, and most recent history entries + are presented first. + +j. The [[ and (( commands are now subject to the setting of `set -e' and the + ERR trap. + +k. The source/. builtin now removes NUL bytes from the file before attempting + to parse commands. + +l. There is a new configuration option (in config-top.h) that forces bash to + forward all history entries to syslog. + +m. A new variable $BASHOPTS to export shell options settable using `shopt' to + child processes. + +n. There is a new confgure option that forces the extglob option to be + enabled by default. + +o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace + output to that file descriptor. + +p. If the optional left-hand-side of a redirection is of the form {var}, the + shell assigns the file descriptor used to $var or uses $var as the file + descriptor to move or close, depending on the redirection operator. + +q. The < and > operators to the [[ conditional command now do string + comparison according to the current locale. + +r. Programmable completion now uses the completion for `b' instead of `a' + when completion is attempted on a line like: a $(b c. + +s. Force extglob on temporarily when parsing the pattern argument to + the == and != operators to the [[ command, for compatibility. + +t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is + received and a trap on SIGCHLD is set to be Posix-mode only. + +u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS + characters, ignoring delimiters like newline. + +4. New Features in Readline + +a. New bindable function: menu-complete-backward. + +b. In the vi insertion keymap, C-n is now bound to menu-complete by default, + and C-p to menu-complete-backward. + +c. When in vi command mode, repeatedly hitting ESC now does nothing, even + when ESC introduces a bound key sequence. This is closer to how + historical vi behaves. + +d. New bindable function: skip-csi-sequence. Can be used as a default to + consume key sequences generated by keys like Home and End without having + to bind all keys. + +e. New application-settable function: rl_filename_rewrite_hook. Can be used + to rewite or modify filenames read from the file system before they are + compared to the word to be completed. + +f. New bindable variable: skip-completed-text, active when completing in the + middle of a word. If enabled, it means that characters in the completion + that match characters in the remainder of the word are "skipped" rather + than inserted into the line. + +g. The pre-readline-6.0 version of menu completion is available as + "old-menu-complete" for users who do not like the readline-6.0 version. + +h. New bindable variable: echo-control-characters. If enabled, and the + tty ECHOCTL bit is set, controls the echoing of characters corresponding + to keyboard-generated signals. + +i. New bindable variable: enable-meta-key. Controls whether or not readline + sends the smm/rmm sequences if the terminal indicates it has a meta key + that enables eight-bit characters. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.0-release, +and the previous version, bash-4.0-rc1. + +1. Changes to Bash + +a. Changed the message printed when setlocale(3) fails to only include the + strerror error text if the call changes errno. + +b. Changed trap command execution to reset the line number before running a + trap (except DEBUG and RETURN traps). + +c. Fixed behavior of case-modifiying word expansions to not work on + individual words within a variable's value. + +d. Fixed a bug that caused mapfile to not be interruptible when run in an + interactive shell. + +e. Fixed a bug that caused mapfile to not run callbacks for the first line + read. + +f. Fixed a bug that caused mapfile to not honor EOF typed in an interactive + shell. + +g. Fixed the coprocess reaping code to not run straight from a signal handler. + +h. Fixed a bug that caused printf -b to ignore the first % conversion specifier + in the format string on 64-bit systems. + +i. Fixed a bug that caused incorrect word splitting when `:', `=', or `~' + appeared in $IFS. + +j. Fixed a bug that caused data corruption in the programmable completion code + when a shell function called from a completion aborted execution. + +k. Fixed a bug that caused the CPU usage reported by the `time' builtin to be + capped at 100%. + +l. Changed behavior of shell when -e option is in effect to reflect consensus + of Posix shell standardization working group. + +m. Fixed a bug introduced in bash-4.0-alpha that caused redirections to not + be displayed by `type' or `declare' when appearing in functions under + certain circumstances. + +2. Changes to Readline + +a. Fixed a bug that caused !(...) extended glob patterns to inhibit later + history expansion. + +b. Reworked the signal handling to avoid calling disallowed functions from a + signal handler. + +3. New Features in Bash + +a. `readarray' is now a synonym for `mapfile'. +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.0-rc1, +and the previous version, bash-4.0-beta2. + +1. Changes to Bash + +a. Fixed a bug that caused parsing errors when a $()-style command + substitution was follwed immediately by a quoted newline. + +b. Fixed a bug that caused extended shell globbing patterns beginning with + `*(' to not work when used with pattern substitution word expansions. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.0-beta2, +and the previous version, bash-4.0-beta. + +1. Changes to Bash + +a. Fixed a bug that caused failed word expansions to set $? but not + PIPESTATUS. + +b. Changed filename completion to quote the tilde in a filename with a + leading tilde that exists in the current directory. + +c. Fixed a bug that caused a file descriptor leak when performing + redirections attached to a compound command. + +d. Fixed a bug that caused expansions of $@ and $* to not exit the shell if + the -u option was enabled and there were no posititional parameters. + +e. Fixed a bug that resulted in bash not terminating immediately if a + terminating signal was received while performing output. + +f. Fixed a bug that caused the shell to crash after creating 256 process + substitutions during word completion. + +2. Changes to Readline + +a. Fixed a bug that caused redisplay errors when using prompts with invisible + characters and numeric arguments to a command in a multibyte locale. + +b. Fixed a bug that caused redisplay errors when using prompts with invisible + characters spanning more than two physical screen lines. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.0-beta, +and the previous version, bash-4.0-alpha. + +1. Changes to Bash + +a. Fixed a typo that caused a variable to be used before initialization + while parsing Posix-style command substitutions. + +b. Fixed a bug that caused stray ^? when the expansion of a parameter used + as part of a pattern removal expansion is empty, but part of a non- + empty string. + +c. Fixed a bug that could cause strings not converted to numbers by strtol + to be treated as if the conversion had been successful. + +d. The `return' builtin now accepts no options and requires a `--' before + a negative return value, as Posix requires. + +e. Fixed a bug that caused local variables to be created with the empty + string for a value rather than no value. + +f. Changed behavior so the shell now acts as if it received an interrupt + when a pipeline is killed by SIGINT while executing a list. + +g. Fixed a bug that caused `declare var' and `typeset var' to initialize + `var' to the empty string. + +h. Changed `bind' builtin to print a warning but proceed if invoked when + line editing is not active. + +i. Fixed a bug that caused the shell to exit when the `errexit' option is + set and a command in a pipeline returns a non-zero exit status. + +j. Fixed a bug that caused the shell to not run the exit trap in a command + run with `bash -c' under some circumstances. + +k. Fixed a bug that caused parser errors to occasionally not set $? when + running commands with `eval'. + +l. Fixed a bug that caused stray control characters when evaluating compound + array assignments containing $'\x7f' escapes. + +m. Fixed a bug that caused redirections involving file descriptor 10 as the + target to behave incorrectly. + +n. Fixed a bug that could cause memory to be freed multiple times when + assigning to COMP_WORDBREAKS. + +o. Fixed a bug that could cause NULL pointer dereferences when COMP_WORDBREAKS + was unset. + +2. Changes to Readline + +3. New Features in Bash + +a. A value of 0 for the -t option to `read' now returns success if there is + input available to be read from the specified file descriptor. + +b. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged + mode. + +c. New bindable readline functions shell-forward-word and shell-backward-word, + which move forward and backward words delimited by shell metacharacters + and honor shell quoting. + +d. New bindable readline functions shell-backward-kill-word and shell-kill-word + which kill words backward and forward, but use the same word boundaries + as shell-forward-word and shell-backward-word. + +4. New Features in Readline + +a. If the kernel supports it, readline displays special characters + corresponding to a keyboard-generated signal when the signal is received. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.0-alpha, +and the previous version, bash-3.2-release. + +1. Changes to Bash + +a. Fixed several bugs in old-style `` command substitution parsing, including + comment parsing and quoted string handling. + +b. Fixed problems parsing arguments to the [[ command's =~ regular expression + matching operator: metacharacter and whitespace parsing. + +c. Fixed a bug that caused the shell to inappropriately reuse high-numbered + file descriptors it used internally. + +d. Fixed a bug in pattern replacement word expansions that caused a `/' as + the first character of an expanded pattern to be mistaken for a global + replacement specifier. + +e. Fixed several problems with the asprintf and snprintf replacement functions + that caused hangs and crashes. + +f. Fixed a bug in the calculation of the current and previous job that caused + it to refer to incorrect jobs. + +g. Fixed a bug in the check for the validity of a hashed command pathname that + caused unnecessary hash table deletions and additions. + +h. Fixed a bug that caused child processes to inherit the wrong value for $!. + +i. Fixed a bug that caused `.' to fail to read and execute commands from non- + regular files such as devices or named pipes. + +j. Fixed a bug in printf formatting for the %x and %X expansions that occurred + on some systems. + +k. Fixed a bug that caused the shell to crash when creating temporary files if + $TMPDIR named a non-writable directory. + +l. Fixed a bug that caused the shell to ignore $TMPDIR when creating temporary + files under some circumstances. + +m. Fixed a bug that caused named pipes created by process substitution to not + be cleaned up. + +n. Fixed a bug that caused HISTTIMEFORMAT to not be honored when it appeared + in the initial shell environment. + +o. Fixed several bugs in the expansion of $* and $@ (quoted and unquoted) + when IFS is null or contains non-whitespace characters; the same changes + apply to arrays subscripted with * or @. + +p. Fixed several problems with pattern substitution expansions on the + positional parameters and arrays subscripted with * or @ that occurred + when $IFS was set to the empty string. + +q. Made a change to the default locale initialization code that should + result in better behavior from the locale-aware library functions. + +r. Fixed a bug that caused compacting the jobs list to drop jobs. + +s. Fixed a bug that caused jumps back to the top-level processing loop from + a builtin command to leave the shell in an inconsistent state. + +t. Fixed a bug that caused characters that would be escaped internally to be + doubled when escaped with a backslash. + +u. Fixed the initialization of mailboxes to not cause maildirs to be read + (and stat(2) called for every message file) at shell startup. + +v. Fixed a bug that caused the shell to not display $PS2 when the read builtin + reads a line continued with a backslash. + +w. Fixed a bug that caused errors in word splitting when $IFS contained + characters used for internal quoting. + +x. Fixed bugs that caused problems with output from shell builtins not being + completely displayed on some systems. + +y. Fixed a bug that caused output to be lost when a redirection is acting on + the shell's output file descriptor. + +z. Fixed bugs caused by shell builtins not checking for all write errors. + +aa. Fixed a problem that caused the shell to dump core if expansions on the + pattern passed to the pattern removal word expansions resulted in expansion + errors. + +bb. Fixed a bug that caused bash to loop infinitely after creating and + waiting for 4096 jobs. + +cc. Fixed a bug that caused bash to lose the status of a background job under + certain circumstances. + +dd. Fixed a bug that caused bash to not look in the temporary environment + when performing variable lookup under certain circumstances. + +ee. Fixed a bug that caused bash to close file descriptors greater than 10 + when they were used in redirections. + +ff. Fixed a problem that caused the shell to attempt to read from the standard + input when called as `bash -i script'. + +gg. Fixed a memory leak and variable initialization problems when the -v option + was supplied to `printf' that could cause incorrect results. + +hh. Fixed a bug that caused the `read' builtin to count bytes when the -n option + was supplied, rather than (possibly multibyte) characters. + +ii. Fixed a bug when displaying a function due to not converting the function + to an external form. + +jj. Changed job control initialization to ensure that the shell has a tty + as its controlling terminal before enabling job control. + +kk. Fixed a bug with the `test' builtin that caused it to misinterpret + arguments beginning with `-' but containing more than one character. + +ll. Fixed bug that could cause the shell to dump core in certain cases where + a command sets the SIGINT disposition to the default. + +mm. Fixed a bug in the pattern replacement (affecting both word expansion + and the `fc' builtin) that occurred when the pattern and replacement + strings were empty. + +nn. Fixed a bug that caused an arithmetic evaluation error to disable all + further evaluation. + +oo. Fixed a bug in pathname expansion that caused it to interpret backslashes + in the pathname as quoting characters. + +pp. Fixed a bug in the replacement getcwd() implementation that could cause + memory to be overwritten. + +qq. When in Posix mode, the `ulimit' builtin now uses a block size of 512 for + the `-c' and `-f' options. + +rr. Brace expansion now allows process substitutions to pass through unchanged. + +ss. Fixed a problem in the command name completion code to avoid quoting + escaped special characters twice when the command name begins with a tilde. + +tt. Fixed a problem in the printf builtin that resulted in single-byte + output for the "'" escape, even when using multibyte characters. + +uu. Fixed a bug that caused the failure exit status to be lost when redirections + attached to a compound command failed. + +vv. Fixed a bug that caused the internal random number generator to not be + re-seeded correctly when creating a subshell. + +ww. Fixed a bug that could cause the bash replacement getcwd to overwrite + memory. + +xx. Fixed a bug that caused the shell to not receive SIGINT if it was sent + while the shell was waiting for a command substitution to terminate, and + make sure the exit status is correct when it does. + +yy. Fixed a bug that resulted in the second and subsequent children spawned + by a shell begun to run a command substitution being placed into the + wrong process group. + +zz. Fixed a bug that caused the results of successful tilde expansion to be + subject to pathname expansion and word splitting. + +aaa. Fixed a bug that could cause the shell to hang if it encountered an + error that caused it to jump back to the top processing loop during a + command substitution or `eval' command. + +bbb. Fixed a bug that caused the `read' builtin to use the tty's attributes + instead of those of the file descriptor passed with the -u option when + processing the -n and -d options. + +ccc. Fixed a bug that caused incorrect expansion of ${array[@]:foo} if the + first character of $IFS was not whitespace. + +ddd. Fixed a bug that occurred when scanning for the ending delimiter of a + ${parameter/pat/sub} expansion. + +eee. Fixed a bug that caused the shell to inappropriately expand command + substitutions in words when expanding directory names for completion. + +fff. Fixed a bug that caused the `fc' builtin to look too far back in the + history list under certain circumstances. + +ggg. Fixed a bug that caused a shell running in Posix mode to search $PWD for + a file specified as an argument to source/. when the file was not found + in $PATH. + +hhh. Fixed a bug that caused the shell to modify the case of a command word + found via command completion when the shell was performing case- + insensitive completion. + +iii. Fixed a bug that caused the shell to search $PATH for an argument to + source/. even when it contained a `/'. + +jjj. Fixed a bug that caused brace expansion to misorder expansions when the + locale did not have a collating order like aAbBcC...zZ. + +kkk. Fixed a bug that did not allow `set +o history' to have any effect when + run in a startup file or from a sourced file. + +lll. Fixed a bug with the precedence of the ?: conditional arithmetic operator. + +mmm. Fixed a bug that caused side effects of temporary variable assignments + to persist in the shell environment. + +nnn. Fixed a bug that caused the terminal to be left in non-canonical mode + when using editing commands that invoke the an editor on the current + command line. + +ooo. Fixed a bug that caused globbing characters and characters in $IFS to not + be quoted appropriately when displaying assignment statements. + +ppp. Fixed a bug that caused the `-e' option to be inherited when sourcing a + file or evaluating a command with `eval' even if the return value of the + command was supposed to be ignored. + +qqq. Fixed a bug that caused the shell to attempt to created variables with + invalid names if such names appeared in the initial environment. + +rrr. Fixed a bug with quote removal in strings where the final character is a + backslash. + +sss. Fixed a bug that caused the effects of special variables to persist even + when the variables were unset as part of the shell reinitializing itself + to execute a shell script. + +ttt. Fixed a bug that caused the history to not be saved after `history -c' or + `history -d' was executed until a sufficient number of commands had been + saved to the history. + +uuu. Bash now parses command substitutions according to Posix rules: parsing + the command contained in $() to find the closing delimiter. + +vvv. Fixed a bug that caused traps on SIGCHLD set in a SIGCHLD handler to + not persist. + +www. Fixed a bug that didn't allow SIGCHLD to interrupt the `wait' builtin + as Posix specifies. + +xxx. Invalid numeric arguments to shell builtins no longer cause the shell to + short-circuit any executing compound command. + +yyy. Fixed a bug that caused the exit status to be lost when `break' was + used to short-circuit a loop's execution. + +zzz. Fixed a bug that caused stray ^? characters to be left in expansions of + "${array[*]}". + +aaaa. Bash now prints better error messages for here documents terminated by + EOF and for identifying the incorrect token in an invalid arithmetic + expression. + +bbbb. Fixed a bug in the variable length word expansion that caused it to + incorrectly calculate the number of multibyte characters. + +cccc. Fixed a race condition that could result in the top-level shell setting + the terminal's process group to an incorrect value if the process + group was changed by a child of a child of the shell. + +dddd. Fixed a bug that caused here documents belonging to commands within a + compound command to be displayed in a syntactially-incorrect form, which + prevented them from being re-read as input. + +eeee. The shell displays more warnings about failures to set the locale. + +ffff. Fixed a bug that caused the body of a here-document to not be saved to + the history list. + +gggg. Fixed a bug that caused configure to incorrectly conclude that FreeBSD + had /dev/fd available, resulting in problems with process substitution. + +2. Changes to Readline + +a. Fixed a number of redisplay errors in environments supporting multibyte + characters. + +b. Fixed bugs in vi command mode that caused motion commands to inappropriately + set the mark. + +c. When using the arrow keys in vi insertion mode, readline allows movement + beyond the current end of the line (unlike command mode). + +d. Fixed bugs that caused readline to loop when the terminal has been taken + away and reads return -1/EIO. + +e. Fixed bugs in redisplay occurring when displaying prompts containing + invisible characters. + +f. Fixed a bug that caused the completion append character to not be reset to + the default after an application-specified completion function changed it. + +g. Fixed a problem that caused incorrect positioning of the cursor while in + emacs editing mode when moving forward at the end of a line while using + a locale supporting multibyte characters. + +h. Fixed an off-by-one error that caused readline to drop every 511th + character of buffered input. + +i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up. + +j. Fixed redisplay bugs caused by multiline prompts with invisible characters + or no characters following the final newline. + +k. Fixed redisplay bug caused by prompts consisting solely of invisible + characters. + +l. Fixed a bug in the code that buffers characters received very quickly in + succession which caused characters to be dropped. + +m. Fixed a bug that caused readline to reference uninitialized data structures + if it received a SIGWINCH before completing initialization. + +n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly + and therefore unrepeatable. + +o. Fixed a bug that caused readline to disable echoing when it was being used + with an output file descriptor that was not a terminal. + +p. Readline now blocks SIGINT while manipulating internal data structures + during redisplay. + +q. Fixed a bug in redisplay that caused readline to segfault when pasting a + very long line (over 130,000 characters). + +r. Fixed bugs in redisplay when using prompts with no visible printing + characters. + +3. New Features in Bash + +a. When using substring expansion on the positional parameters, a starting + index of 0 now causes $0 to be prefixed to the list. + +b. The `help' builtin now prints its columns with entries sorted vertically + rather than horizontally. + +c. There is a new variable, $BASHPID, which always returns the process id of + the current shell. + +d. There is a new `autocd' option that, when enabled, causes bash to attempt + to `cd' to a directory name that is supplied as the first word of a + simple command. + +e. There is a new `checkjobs' option that causes the shell to check for and + report any running or stopped jobs at exit. + +f. The programmable completion code exports a new COMP_TYPE variable, set to + a character describing the type of completion being attempted. + +g. The programmable completion code exports a new COMP_KEY variable, set to + the character that caused the completion to be invoked (e.g., TAB). + +h. If creation of a child process fails due to insufficient resources, bash + will try again several times before reporting failure. + +i. The programmable completion code now uses the same set of characters as + readline when breaking the command line into a list of words. + +j. The block multiplier for the ulimit -c and -f options is now 512 when in + Posix mode, as Posix specifies. + +k. Changed the behavior of the read builtin to save any partial input received + in the specified variable when the read builtin times out. This also + results in variables specified as arguments to read to be set to the empty + string when there is no input available. When the read builtin times out, + it returns an exit status greater than 128. + +l. The shell now has the notion of a `compatibility level', controlled by + new variables settable by `shopt'. Setting this variable currently + restores the bash-3.1 behavior when processing quoted strings on the rhs + of the `=~' operator to the `[[' command. + +m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number + of threads) options. + +n. The -p option to `declare' now displays all variable values and attributes + (or function values and attributes if used with -f). + +o. There is a new `compopt' builtin that allows completion functions to modify + completion options for existing completions or the completion currently + being executed. + +p. The `read' builtin has a new -i option which inserts text into the reply + buffer when using readline. + +q. A new `-E' option to the complete builtin allows control of the default + behavior for completion on an empty line. + +r. There is now limited support for completing command name words containing + globbing characters. + +s. Changed format of internal help documentation for all builtins to roughly + follow man page format. + +t. The `help' builtin now has a new -d option, to display a short description, + and a -m option, to print help information in a man page-like format. + +u. There is a new `mapfile' builtin to populate an array with lines from a + given file. + +v. If a command is not found, the shell attempts to execute a shell function + named `command_not_found_handle', supplying the command words as the + function arguments. + +w. There is a new shell option: `globstar'. When enabled, the globbing code + treats `**' specially -- it matches all directories (and files within + them, when appropriate) recursively. + +x. There is a new shell option: `dirspell'. When enabled, the filename + completion code performs spelling correction on directory names during + completion. + +y. The `-t' option to the `read' builtin now supports fractional timeout + values. + +z. Brace expansion now allows zero-padding of expanded numeric values and + will add the proper number of zeroes to make sure all values contain the + same number of digits. + +aa. There is a new bash-specific bindable readline function: `dabbrev-expand'. + It uses menu completion on a set of words taken from the history list. + +bb. The command assigned to a key sequence with `bind -x' now sets two new + variables in the environment of the executed command: READLINE_LINE_BUFFER + and READLINE_POINT. The command can change the current readline line + and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT, + respectively. + +cc. There is a new &>> redirection operator, which appends the standard output + and standard error to the named file. + +dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects + the standard error for a command through a pipe. + +ee. The new `;&' case statement action list terminator causes execution to + continue with the action associated with the next pattern in the + statement rather than terminating the command. + +ff. The new `;;&' case statement action list terminator causes the shell to + test the next set of patterns after completing execution of the current + action, rather than terminating the command. + +gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an + integer value greater than zero, prompt expansion of \w and \W will + retain only that number of trailing pathname components and replace + the intervening characters with `...'. + +hh. There are new case-modifying word expansions: uppercase (^[^]) and + lowercase (,[,]). They can work on either the first character or + array element, or globally. They accept an optional shell pattern + that determines which characters to modify. There is an optionally- + configured feature to include capitalization operators. + +ii. The shell provides associative array variables, with the appropriate + support to create, delete, assign values to, and expand them. + +jj. The `declare' builtin now has new -l (convert value to lowercase upon + assignment) and -u (convert value to uppercase upon assignment) options. + There is an optionally-configurable -c option to capitalize a value at + assignment. + +kk. There is a new `coproc' reserved word that specifies a coprocess: an + asynchronous command run with two pipes connected to the creating shell. + Coprocs can be named. The input and output file descriptors and the + PID of the coprocess are available to the calling shell in variables + with coproc-specific names. + +4. New Features in Readline + +a. A new variable, rl_sort_completion_matches; allows applications to inhibit + match list sorting (but beware: some things don't work right if + applications do this). + +b. A new variable, rl_completion_invoking_key; allows applications to discover + the key that invoked rl_complete or rl_menu_complete. + +c. The functions rl_block_sigint and rl_release_sigint are now public and + available to calling applications who want to protect critical sections + (like redisplay). + +d. The functions rl_save_state and rl_restore_state are now public and + available to calling applications; documented rest of readline's state + flag values. + +e. A new user-settable variable, `history-size', allows setting the maximum + number of entries in the history list. + +f. There is a new implementation of menu completion, with several improvements + over the old; the most notable improvement is a better `completions + browsing' mode. + +g. The menu completion code now uses the rl_menu_completion_entry_function + variable, allowing applications to provide their own menu completion + generators. + +h. There is support for replacing a prefix of a pathname with a `...' when + displaying possible completions. This is controllable by setting the + `completion-prefix-display-length' variable. Matches with a common prefix + longer than this value have the common prefix replaced with `...'. + +i. There is a new `revert-all-at-newline' variable. If enabled, readline will + undo all outstanding changes to all history lines when `accept-line' is + executed. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.2-release, +and the previous version, bash-3.2-beta. + +1. Changes to Bash + +a. Fixed a bug that caused the temporary environment passed to a command to + affect the shell's environment under certain circumstances. + +b. Fixed a bug in the printf builtin that caused the %q format specifier to + ignore empty string arguments. + +c. Improved multibyte character environment detection at configuration time. + +d. Fixed a bug in the read builtin that left spurious escape characters in the + input after processing backslashes when assigning to an array variable. + +2. Changes to Readline + +a. Fixed a redisplay bug that occurred in multibyte-capable locales when the + prompt was one character longer than the screen width. +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.2-beta, +and the previous version, bash-3.2-alpha. + +1. Changes to Bash + +a. Changed the lexical analyzer to treat locale-specific blank characters as + white space. + +b. Fixed a bug in command printing to avoid confusion between redirections and + process substitution. + +c. Fixed problems with cross-compiling originating from inherited environment + variables. + +d. Added write error reporting to printf builtin. + +e. Fixed a bug in the variable expansion code that could cause a core dump in + a multi-byte locale. + +f. Fixed a bug that caused substring expansion of a null string to return + incorrect results. + +g. BASH_COMMAND now retains its previous value while executing commands as the + result of a trap, as the documentation states. + +2. Changes to Readline + +a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing + the prompt and input line multiple times. + +b. Fixed history expansion to not be confused by here-string redirection. + +c. Readline no longer treats read errors by converting them to newlines, as + it does with EOF. This caused partial lines to be returned from readline(). + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.2-alpha, +and the previous version, bash-3.1-release. + +1. Changes to Bash + +a. Fixed a source bug that caused the minimal configuration to not compile. + +b. Fixed memory leaks in error handling for the `read' builtin. + +c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit + status. + +d. Fixed some parsing problems with compound array assignments. + +e. Added additional configuration changes for: NetBSD (incomplete multibyte + character support) + +f. Fixed two bugs with local array variable creation when shadowing a variable + of the same name from a previous context. + +g. Fixed the `read' builtin to restore the correct set of completion functions + if a timeout occurs. + +h. Added code to defer the initialization of HISTSIZE (and its stifling of the + history list) until the history file is loaded, allowing a startup file to + override the default value. + +i. Tightened up the arithmetic expression parsing to produce better error + messages when presented with invalid operators. + +j. Fixed the cross-compilation support to build the signal list at shell + invocation rather than compile time if cross-compiling. + +k. Fixed multibyte support for non-gcc compilers (or compilers that do not + allow automatic array variable sizing based on a non-constant value). + +l. Several fixes to the code that manages the list of terminated jobs and + their exit statuses, and the list of active and recently-terminated jobs + to avoid pid aliasing/wraparound and allocation errors. + +m. Fixed a problem that allowed scripts to die due to SIGINT while waiting + for children, even when started in the background or otherwise ignoring + SIGINT. + +n. Fixed a bug that caused shells invoked as -/bin/bash from not being + recognized as login shells. + +o. Fixed a problem that caused shells in the background to give the terminal + to a process group other than the foreground shell process group. + +p. Fixed a problem with extracting the `varname' in ${#varname}. + +q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby + calling functions that may not be called in a signal handler context -- + but set a flag and exit afterward (like SIGINT). + +r. Changed the brace expansion code to skip over braces that don't begin a + valid matched brace expansion construct. + +s. Fixed `typeset' and `declare' to not require that their shell function + operands to be valid shell identifiers. + +t. Changed `test' to use access(2) with a temporary uid/euid swap when testing + file attributes and running setuid, and access(2) in most other cases. + +u. Changed completion code to not attempt command name completion on a line + consisting solely of whitespace when no_empty_command_completion is set. + +v. The `hash' builtin now prints nothing in posix mode when the hash table is + empty, and prints a message to that effect to stdout instead of stderr + when not in posix mode. + +w. Fixed a bug in the extended pattern matching code that caused it to fail to + match periods with certain patterns. + +x. Fixed a bug that caused the shell to dump core when performing filename + generation in directories with thousands of files. + +y. Returned to the original Bourne shell rules for parsing ``: no recursive + parsing of embedded quoted strings or ${...} constructs. + +z. The inheritance of the DEBUG, RETURN, and ERR traps is now dependent only + on the settings of the `functrace' and `errtrace' shell options, rather + than whether or not the shell is in debugging mode. + +aa. Fixed a problem with $HOME being converted to ~ in the expansion of + members of the DIRSTACK array. + +bb. Fixed a problem with quoted arguments to arithmetic expansions in certain + constructs. + +cc. The command word completion code now no longer returns matching directories + while searching $PATH. + +dd. Fixed a bug with zero-padding and precision handling in snprintf() + replacement. + +ee. Fixed a bug that caused the command substitution code not to take embedded + shell comments into account. + +ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an + arithmetic substitution. + +gg. Fixed a bug in the prompt expansion code that inappropriately added a + \001 before a \002 under certain circumstances. + +hh. Fixed a bug that caused `unset LANG' to not properly reset the locale + (previous versions would set the locale back to what it was when bash + was started rather than the system's "native" locale). + +ii. Fixed a bug that could cause file descriptors > 10 to not be closed even + when closed explicitly by a script. + +jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting + inside double-quoted command substitutions. + +kk. Fixed a bug that could cause core dumps when `return' was executed as the + last element of a pipeline inside a shell function. + +ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in + the jobs list. + +2. Changes to Readline + +a. Fixed a problem that caused segmentation faults when using readline in + callback mode and typing consecutive DEL characters on an empty line. + +b. Fixed several redisplay problems with multibyte characters, all having to + do with the different code paths and variable meanings between single-byte + and multibyte character redisplay. + +c. Fixed a problem with key sequence translation when presented with the + sequence \M-\C-x. + +d. Fixed a problem that prevented the `a' command in vi mode from being + undone and redone properly. + +e. Fixed a problem that prevented empty inserts in vi mode from being undone + properly. + +f. Fixed a problem that caused readline to initialize with an incorrect idea + of whether or not the terminal can autowrap. + +g. Fixed output of key bindings (like bash `bind -p') to honor the setting of + convert-meta and use \e where appropriate. + +h. Changed the default filename completion function to call the filename + dequoting function if the directory completion hook isn't set. This means + that any directory completion hooks need to dequote the directory name, + since application-specific hooks need to know how the word was quoted, + even if no other changes are made. + +i. Fixed a bug with creating the prompt for a non-interactive search string + when there are non-printing characters in the primary prompt. + +j. Fixed a bug that caused prompts with invisible characters to be redrawn + multiple times in a multibyte locale. + +k. Fixed a bug that could cause the key sequence scanning code to return the + wrong function. + +l. Fixed a problem with the callback interface that caused it to fail when + using multi-character keyboard macros. + +m. Fixed a bug that could cause a core dump when an edited history entry was + re-executed under certain conditions. + +n. Fixed a bug that caused readline to reference freed memory when attmpting + to display a portion of the prompt. + +3. New Features in Bash + +a. Changed the parameter pattern replacement functions to not anchor the + pattern at the beginning of the string if doing global replacement - that + combination doesn't make any sense. + +b. When running in `word expansion only' mode (--wordexp option), inhibit + process substitution. + +c. Loadable builtins now work on MacOS X 10.[34]. + +d. Shells running in posix mode no longer set $HOME, as POSIX requires. + +e. The code that checks for binary files being executed as shell scripts now + checks only for NUL rather than any non-printing character. + +f. Quoting the string argument to the [[ command's =~ operator now forces + string matching, as with the other pattern-matching operators. + +4. New Features in Readline + +a. Calling applications can now set the keyboard timeout to 0, allowing + poll-like behavior. + +b. The value of SYS_INPUTRC (configurable at compilation time) is now used as + the default last-ditch startup file. + +c. The history file reading functions now allow windows-like \r\n line + terminators. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.1-release, +and the previous version, bash-3.1-rc2. + +1. Changes to Readline + +a. Several changes to the multibyte redisplay code to fix problems with + prompts containing invisible characters. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.1-rc2, +and the previous version, bash-3.1-rc1. + +1. Changes to Bash + +a. Fixed a bug that caused a DEBUG trap to overwrite a command string that's + eventually attached to a background job. + +b. Changed some code so that filenames with leading tildes with spaces in the + name aren't tilde-expanded by the bash completion code. + +c. Fixed a bug that caused the pushd builtin to fail to change to + directories with leading `-'. + +d. Fixed a small memory leak in the programmable completion code. + +2. Changes to Readline + +a. Fixed a redisplay bug caused by moving the cursor vertically to a line + with invisible characters in the prompt in a multibyte locale. + +b. Fixed a bug that could cause the terminal special chars to be bound in the + wrong keymap in vi mode. + +3. New Features in Bash + +a. If compiled for strict POSIX conformance, LINES and COLUMNS may now + override the true terminal size. + +4. New Features in Readline + +a. A new external application-controllable variable that allows the LINES + and COLUMNS environment variables to set the window size regardless of + what the kernel returns. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.1-rc1, +and the previous version, bash-3.1-beta1. + +1. Changes to Bash + +a. Fixed a bug that could cause core dumps due to accessing the current + pipeline while in the middle of modifying it. + +b. Fixed a bug that caused pathnames with backslashes still quoting characters + to be passed to opendir(). + +c. Command word completion now obeys the setting of completion-ignore-case. + +d. Fixed a problem with redirection that caused file descriptors greater than + 2 to be inappropriately marked as close-on-exec. + +e. In Posix mode, after `wait' is called to wait for a particular process + explicitly, that process is removed from the list of processes known to + the shell, and subsequent attempts to wait for it return errors. + +f. Fixed a bug that caused extended pattern matching to incorrectly scan + backslash-escaped pattern characters. + +g. Fixed a synchronization problem that could cause core dumps when handling + a SIGWINCH. + +h. Fixed a bug that caused an unmatched backquote to be accepted without an + error when processing here documents. + +i. Fixed a small memory leak in the `cd' builtin. + +j. Fix for MacOS X so it gets the values for the HOSTTYPE, MACHTYPE, and + OSTYPE variables at build time, to support universal binaries. + +k. Fixed a bug that could cause an exit trap to return the exit status of + the trap command rather than the status as it was before the trap was + run as the shell's exit status. + +2. New Features in Bash + +3. Changes to Readline + +a. Fixed a bug that caused reversing the incremental search direction to + not work correctly. + +b. Fixed the vi-mode `U' command to only undo up to the first time insert mode + was entered, as Posix specifies. + +c. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong + place. + +4. New Features in Readline + +a. New application-callable auxiliary function, rl_variable_value, returns + a string corresponding to a readline variable's value. + +b. When parsing inputrc files and variable binding commands, the parser + strips trailing whitespace from values assigned to boolean variables + before checking them. + + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.1-beta1, +and the previous version, bash-3.1-alpha1. + +1. Changes to Bash + +a. Added some system-specific signal names. + +b. Fixed a typo in the ulimit builtin to make `x' the right option to + manipulate the limit on file locks. + +c. Fixed a problem with using += to append to index 0 of an array variable + when not using subscript syntax. + +d. A few changes to configure.in to remove calls to obsolete or outdated + macros. + +e. Make sure changes to variables bash handles specially (e.g., LC_ALL) are + made when the variable is set in the temporary environment to a command. + +f. Make sure changes to variables bash handles specially (e.g., LC_ALL) are + made when the variable is modified using `printf -v'. + +g. The export environment is now remade on cygwin when HOME is changed, so + DLLs bash is linked against pick up the new value. This fixes problems + with tilde expansion when linking against and already-installed readline. + +h. Small fix to the logic for performing tilde expansion in posix mode, so + expansion on the right-hand side of an assignment statement takes place. + +i. Fixed a bug that prevented redirections associated with a shell function + from being executed when in a subshell. + +j. Fixed `source' and `.' builtins to not require an executable file when + searching $PATH for a file to source. + +k. Fixed a bug that caused incorrect word splitting in a function when IFS + was declared local, then unset. + +l. Fixed a problem with the `kill' builtin that prevented sending signals + to a process group under certain circumstances when providing a pid < 0. + +m. When in POSIX mode, `pwd' now checks that the value it prints is the same + directory as `.', even when displaying $PWD. + +n. Fixed a problem with the `read' builtin when reading a script from standard + input and reading data from the same file. + +o. Fixed a problem with the `type' and `command' builtins that caused absolute + pathnames to be displayed incorrectly. + +p. Some changes to the `bg' builtin for POSIX conformance. + +q. The `fc' builtin now removes the `fc' command that caused it to invoke an + editor on specified history entries from the history entirely, rather than + simply ignoring it. + +r. When in POSIX mode, the `v' command in vi editing mode simply invokes vi + on the current command, rather than checking $FCEDIT and $EDITOR. + +s. Fixed a small memory leak in the pathname canonicalization code. + +t. Fixed a bug that caused the expanded value of a $'...' string to be + incorrectly re-quoted if it occurred within a double-quoted ${...} + parameter expansion. + +u. Restored default emacs-mode key binding of M-TAB to dynamic-complete-history. + +v. Fixed a bug that caused core dumps when interrupting loops running builtins + on some systems. + +w. Make sure that some of the functions bash provides replacements for are + not cpp defines. + +x. The code that scans embedded commands for the parser (`...` and $(...)) is + now more aware of embedded comments and their effect on quoted strings. + +y. Changed the `-n' option to the `history' builtin to not reset the number of + history lines read in the current session after reading the new lines from + the history file if the history is being appended when it is written to + the file, since the appending takes care of the problem that the adjustment + was intended to solve. + +z. Improved the error message displayed when a shell script fails to execute + because the environment and size of command line arguments are too large. + +aa. A small fix to make sure that $HISTCMD is evaluated whenever the shell is + saving commands to the history list, not just when HISTSIZE is defined. + +2. Changes to Readline + +a. The `change-case' command now correctly changes the case of multibyte + characters. + +b. Changes to the shared library construction scripts to deal with Windows + DLL naming conventions for Cygwin. + +c. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed + SIGWINCH. + +d. Fixed the non-incremental search code in vi mode to dispose of any current + undo list when copying a line from the history into the current editing + buffer. + +e. The variable assignment code now ignores whitespace at the end of lines + when assigning to boolean variables. + +f. The `C-w' binding in incremental search now understands multibyte + characters. + +3. New Features in Bash + +a. A new configuration option, `--enable-strict-posix-default', which will + build bash to be POSIX conforming by default. + +4. New Features in Readline + +a. If the rl_completion_query_items is set to a value < 0, readline never + asks the user whether or not to view the possible completions. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.1-alpha1, +and the previous version, bash-3.0-release. + +1. Changes to Bash + +a. Fixed a bug that caused bash to crash if referencing an unset local array. + +b. Fixed a problem that caused tilde expansion to not be performed before + attempting globbing word completion. + +c. Fixed an incompatibility so that a first argument to trap that's a valid + signal number will be trated as a signal rather than a command to execute. + +d. Fixed ${#word} expansion to correctly compute the length of a string + containing multibyte characters. + +e. Fixed a bug that caused bash to not pass the correct flags for signal + disposition to child processes. + +f. Fixed a bug that caused `fc -l' to list one too many history entries. + +g. Some fixes to `fc' for POSIX conformance. + +h. Some fixes to job status display for POSIX conformance. + +i. Fixed a bug that caused `command -v' to display output if a command was not + found -- it should be silent. + +j. In POSIX mode, `type' and `command -[vV]' do not report non-executable + files, even if the shell will attempt to execute them. + +k. Fixed a bug that caused the `==' operator to the [[ command to not attempt + extended pattern matching. + +l. Fixed the brace expansion code to handle characters whose value exceeds 128. + +m. Fixed `printf' to handle strings with a leading `\0' whose length is + non-zero. + +n. Fixed a couple of problems with brace expansion where `${' was handled + incorrectly. + +o. Fixed off-by-one error when calculating the upper bound of `offset' when + processing the ${array[@]:offset:length} expansion. + +p. System-specific configuration changes for: FreeBSD 5.x, Interix, MacOS X + 10.4, Linux 2.4+ kernels, Linux 3.x kernels, Dragonfly BSD, QNX 6.x, + Cygwin + +q. Fixed a bug that caused the shell to ignore the status of the rightmost + command in a pipeline when the `pipefail' option was enabled. + +r. Fixed a completion bug that caused core dumps when expanding a directory + name. + +s. Fixed a bug that prevented `hash -d' from removing commands from the hash + table. + +t. Fixed word splitting to avoid really bad quadratic performance when + expanding long lists. + +u. Fixed a bug that caused negative offsets in substring expansion to use the + wrong values. + +v. Fixed a bug in printf that caused it to not return failure on write errors. + +w. Fixed a bug that caused commands in subshells to not be properly timed. + +x. The shell parser no longer attempts to parse a compound assignment specially + unless in a position where an assignment statement is acceptable or parsing + arguments to a builtin that accepts assignment statements. + +y. Fixed a problem that caused a `case' statement to be added to the history + incorrectly as a single command if the `case word' was on one line and the + `in' on another. + +z. Fixed a problem that caused internal shell quoting characters to be + incorrectly quoted with backslashes under some circumstances. + +aa. The shell now performs correct word splitting when IFS contains multibyte + characters. + +bb. The mail checking code now resets the cached file information if the size + drops to 0, even if the times don't change. + +cc. A completed command name that is found in $PATH as well as the name of a + directory in the current directory no longer has a slash appended in certain + circumstances: a single instance found in $PATH when `.' is not in $PATH, + and multiple instances found in $PATH, even when `.' is in $PATH. + +dd. Incorporated tilde expansion into the word expansion code rather than as a + separately-called function, fixing some cases where it was performed + inappropriately (e.g., after the second `=' in an assignment statement or + in a double-quoted parameter expansion). + +ee. Fixed several bugs encountered when parsing compound assignment statements, + so that compound assignments appearing as arguments to builtins are no + longer double-expanded. + +ff. Fixed a bug in the command execution code that caused asynchronous commands + containing command substitutions to not put the terminal in the wrong + process group. + +gg. Bash now handles the case where the WCONTINUED flag causes waitpid() to + return -1/EINVAL at runtime as well as configuration time. + +hh. Fixed parser to generate an error when the pipeline `argument' to `!' or + `time' is NULL. + +ii. The shell now takes a little more care when manipulating file descriptors + greater than 9 with the `exec' builtin. + +jj. Fixed a bug that caused variable assignments preceding the `command' builtin + preceding a special builtin to be preserved after the command completed in + POSIX mode. + +kk. Fixed a bug that allowed variables beginning with a digit to be created. + +ll. Fixed a bug that caused a \ to be removed when parsing a $'...' + construct. + +mm. A shell whose name begins with `-' will now be a restricted shell if the + remainder of the name indicates it should be restricted. + +nn. Fixed a bug that could cause a core dump if FUNCNAME were changed or unset + during a function's execution. + +oo. Fixed a bug that caused executing a `return' in a function to not execute + a RETURN trap. The RETURN trap is inherited by shell functions only if + function tracing is globally enabled or has been enabled for that function. + +pp. Fixed cases where var[@] was not handled exactly like var, when var is a + scalar variable. + +qq. Fixed a bug that caused the first character after a SIGINT to be discarded + under certain circumstances. + +rr. Fixed exit status code so that a suspended job returns 128+signal as its + exit status (preventing commands after it in `&&' lists from being + executed). + +ss. Fixed a bug that caused the shell parser state to be changed by executing + a shell function as a result of word completion. + +tt. Fixed a long-standing bug that caused '\177' characters in variable + values to be discarded when expanded in double-quoted strings. + +uu. Fixed a bug that caused $RANDOM to be re-seeded multiple times in a + subshell environment. + +vv. Extensive changes to the job management code to avoid the pid-reuse and + pid-aliasing problems caused by retaining the exit status of too many jobs, + but still retain as many background job statuses as POSIX requires. + +ww. Fixed a parser bug in processing \ that caused things like + + ((echo 5) \ + (echo 6)) + + to not work correctly. + +xx. `pwd -P' now sets $PWD to a directory name containing no symbolic links + when in posix mode, as POSIX requires. + +yy. In posix mode, bash no longer sets $PWD to a name containing no symbolic + links if a directory is chosen from $CDPATH. + +zz. The word splitting code now treats an IFS character that is not space, + tab, or newline and any adjacent IFS white space as a single delimiter, as + SUSv3/XPG6 require. + +aaa. The `read' builtin now checks whether or not the number of fields read is + exactly the same as the number of variables instead of just assigning the + rest of the line (minus any trailing IFS white space) to the last + variable. This is what POSIX/SUS/XPG all require. + +bbb. Fixed a bug that caused `read' to always check whether or not fd 0 was a + pipe, even when reading from another file descriptor. + +ccc. Fixed a bug that caused short-circuiting of execution even if the return + value was being inverted. + +ddd. Fixed a bug that caused a core dump while decoding \W escapes in PS1 if + PWD was unset. + +eee. Fixed a bug in `read' that counted internal quoting characters for the + purposes of `read -n'. + +fff. Fixed a bug so that a function definition in a pipeline causes a child + process to be forked at the right time. + +ggg. Bash will not attempt to link against a readline library that doesn't + have rl_gnu_readline_p == 1. + +hhh. Fixed a bug that caused `read' to consume one too many characters when + reading a fixed number of characters and the Nth character is a backslash. + +iii. Fixed a bug that caused `unset' on variables in the temporary environment + to leave them set when `unset' completed. + +jjj. Fixed a bug that caused bash to close fd 2 if an `exec' failed and the + shell didn't exit. + +kkk. The completion code is more careful to not turn `/' or `///' into `//', + for those systems on which `//' has special meaning. + +lll. Fixed a bug that caused command substitution in asynchronous commands to + close the wrong file descriptors. + +mmm. The shell no longer prints status messages about terminated background + processes unless job control is active. + +nnn. Fixed a bug that prevented multiple consecutive invocations of `history -s' + from adding all the commands to the history list. + +ooo. Added a couple of changes to make arithmetic expansion more consistent in + all its contexts (still not perfect). + +ppp. Fixed a bug that caused the parser to occasionally not find the right + terminating "`" in an old-style command substitution. + +qqq. Fixed a bug that caused core dumps when the shell was reading its non- + interactive input from fd 0 and fd 0 was duplicated and restored using a + combination of `exec' (to save) and redirection (to restore). + +rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned + up properly when a `return' is executed. + +sss. Change internal command substitution completion function to append a slash + to directory names in the command. + +2. Changes to Readline + +a. Fixed a bug that caused multiliine prompts to be wrapped and displayed + incorrectly. + +b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current + line correctly. + +c. Fixed a problem in computing the number of invisible characters on the first + line of a prompt whose length exceeds the screen width. + +d. Fixed vi-mode searching so that failure preserves the current line rather + than the last line in the history list. + +e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at + end-of-line when manipulating multibyte characters. + +f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at + end-of-line when manipulating multibyte characters. + +g. Fixed multiple bugs in the redisplay of multibyte characters: displaying + prompts longer than the screen width containing multibyte characters, + +h. Fix the calculation of the number of physical characters in the prompt + string when it contains multibyte characters. + +i. A non-zero value for the `rl_complete_suppress_append' variable now causes + no `/' to be appended to a directory name. + +j. Fixed forward-word and backward-word to work when words contained + multibyte characters. + +k. Fixed a bug in finding the delimiter of a `?' substring when performing + history expansion in a locale that supports multibyte characters. + +l. Fixed a memory leak caused by not freeing the timestamp in a history entry. + +m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting + of the `convert-meta' variable. + +n. Fixed saving and restoring primary prompt when prompting for incremental + and non-incremental searches; search prompts now display multibyte + characters correctly. + +o. Fixed a bug that caused keys originally bound to self-insert but shadowed + by a multi-character key sequence to not be inserted. + +p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't + dereferenced if NULL (matching the documentation). + +q. Extensive changes to readline to add enough state so that commands + requiring additional characters (searches, multi-key sequences, numeric + arguments, commands requiring an additional specifier character like + vi-mode change-char, etc.) work without synchronously waiting for + additional input. + +r. Lots of changes so readline builds and runs on MinGW. + +s. Readline no longer tries to modify the terminal settings when running in + callback mode. + +t. The Readline display code no longer sets the location of the last invisible + character in the prompt if the \[\] sequence is empty. + +3. New Features in Bash + +a. Bash now understands LC_TIME as a special variable so that time display + tracks the current locale. + +b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created + as `invisible' variables and may not be unset. + +c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't + try to interpret any options at all, as POSIX requires. + +d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify. + +e. Fixed vi-mode word completion and glob expansion to perform tilde + expansion. + +f. The `**' mathematic exponentiation operator is now right-associative. + +g. The `ulimit' builtin has new options: -i (max number of pending signals), + -q (max size of POSIX message queues), and -x (max number of file locks). + +h. A bare `%' once again expands to the current job when used as a job + specifier. + +i. The `+=' assignment operator (append to the value of a string or array) is + now supported for assignment statements and arguments to builtin commands + that accept assignment statements. + +j. BASH_COMMAND now preserves its value when a DEBUG trap is executed. + +k. The `gnu_errfmt' option is enabled automatically if the shell is running + in an emacs terminal window. + +l. New configuration option: --single-help-strings. Causes long help text + to be written as a single string; intended to ease translation. + +m. The COMP_WORDBREAKS variable now causes the list of word break characters + to be emptied when the variable is unset. + +n. An unquoted expansion of $* when $IFS is empty now causes the positional + parameters to be concatenated if the expansion doesn't undergo word + splitting. + +o. Bash now inherits $_ from the environment if it appears there at startup. + +p. New shell option: nocasematch. If non-zero, shell pattern matching ignores + case when used by `case' and `[[' commands. + +q. The `printf' builtin takes a new option: -v var. That causes the output + to be placed into var instead of on stdout. + +r. By default, the shell no longer reports processes dying from SIGPIPE. + +s. Bash now sets the extern variable `environ' to the export environment it + creates, so C library functions that call getenv() (and can't use the + shell-provided replacement) get current values of environment variables. + +4. New Features in Readline + +a. The key sequence sent by the keypad `delete' key is now automatically + bound to delete-char. + +b. A negative argument to menu-complete now cycles backward through the + completion list. + +c. A new bindable readline variable: bind-tty-special-chars. If non-zero, + readline will bind the terminal special characters to their readline + equivalents when it's called (on by default). + +d. New bindable command: vi-rubout. Saves deleted text for possible + reinsertion, as with any vi-mode `text modification' command; `X' is bound + to this in vi command mode. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.0-release, +and the previous version, bash-3.0-rc1. + +1. Changes to Bash + +a. Fixed a boundary overrun that could cause segmentation faults when the + completion code hands an incomplete construct to the word expansion + functions. + +b. Changed posix mode behavior so that an error in a variable assignment + preceding a special builtin causes a non-interactive shell to exit. + +c. Change the directory expansion portion of the completion code to not + expand embedded command substitutions if the directory name appears in + the file system. + +d. Fixed a problem that caused `bash -r' to turn on restrictions before + reading the startup files. + +e. Fixed a problem with the default operation of the `umask' builtin. + +2. Changes to Readline + +a. Fixed a problem with readline saving the contents of the current line + before beginning a non-interactive search. + +b. Fixed a problem with EOF detection when using rl_event_hook. + +c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric + arguments. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.0-rc1, +and the previous version, bash-3.0-beta1. + +1. Changes to Bash + +a. Fixed a bug that caused incorrect behavior when referecing element 0 of + an array using $array, element 0 was unset, and `set -u' was enabled. + +b. System-specific changes for: SCO Unix 3.2, Tandem. + +c. Fixed a bug that caused inappropriate word splitting when a variable was + expanded within a double-quoted string that also included $@. + +d. Fixed a bug that caused `pwd' to not display anything in physical mode + when the file system had changed underneath the shell. + +e. Fixed a bug in the pre- and post- increment and decrement parsing in the + expression evaluator that caused errors when the operands and corresponding + operators were separated by whitespace. + +f. Fixed a bug that caused `history -p' to add an entry to the history list, + counter to the documentation. (Keeps the history expansions invoked by + emacs-mode command line editing from doing that as well.) + +g. Fixed a bug that could cause a core dump if `cd' is asked to print out a + pathname longer than PATH_MAX characters. + +h. Fixed a bug that caused jobs to be put into the wrong process group under + some circumstances after enabling job control with `set -m'. + +i. `unalias' now returns failure if no alias name arguments are supplied. + +j. Documented the characters not allowed to appear in an alias name. + +k. $* is no longer expanded as if in double quotes when it appears in the + body of a here document, as the SUS seems to require. + +l. The `bashbug' script now uses a directory in $TMPDIR for exclusive + access rather than trying to guess how the underlying OS provides for + secure temporary file creation. + +m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames + longer than PATH_MAX characters. + +n. Fixed a memory leak caused when creating multiple local array variables + with identical names. + +o. Fixed a problem with calls to getcwd() so that bash now operates better + when the full pathname to the current directory is longer than PATH_MAX + bytes. + +p. The `trap' builtin now reports an error if a single non-signal argument + is specified. + +q. Fixed a bug that caused `umask' to not work correctly when presented + with a mask of all 0s. + +r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX + appears to specify. + +s. Interactive mode now depends on whether or not stdin and stderr are + connected to a tty; formerly it was stdin and stdout. POSIX requires + this. + +t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the + right kind of filename generation). + +2. Changes to Readline + +a. Fixed a problem that could cause readline to refer to freed memory when + moving between history lines while doing searches. + +b. Improvements to the code that expands and displays prompt strings + containing multibyte characters. + +c. Fixed a problem with vi-mode not correctly remembering the numeric argument + to the last `c'hange command for later use with `.'. + +d. Fixed a bug in vi-mode that caused multi-digit count arguments to work + incorrectly. + +e. Fixed a problem in vi-mode that caused the last text modification command + to not be remembered across different command lines. + +f. Fixed problems with changing characters and changing case at the end of + the line. + +3. New Features in Bash + +a. The `jobs', `kill', and `wait' builtins now accept job control notation + even if job control is not enabled. + +b. The historical behavior of `trap' that allows a missing `action' argument + to cause each specified signal's handling to be reset to its default is + now only supported when `trap' is given a single non-option argument. + +4. New Features in Readline + +a. When listing completions, directories have a `/' appended if the + `mark-directories' option has been enabled. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.0-beta1, +and the previous version, bash-3.0-alpha. + +1. Changes to Bash + +a. Fixes to build correctly when arrays are not compiled into the shell. + +b. Fixed command substitution to run any exit trap defined in the command + substitution before returning; the exit trap is not inherited from the + calling shell. + +c. Fixes to process group synchronization code so that every child process + attempts to set the terminal's process group; fixes some synchronization + problems on Linux kernels that schedule the child to always run before + the parent. + +d. Fixed processing of octal and hex constants in printf builtin for POSIX.2 + compliance. + +e. Fixed a couple of core dumps in the pattern removal code. + +f. Fixes to the array subrange extraction code to deal better with sparse + arrays. + +g. Parser errors and other errors that result in the shell exiting now cause + the exit trap to be run. + +h. Change the command substitution completion functions to not append any + closing quote, because it would be inserted a closing "`" or ")". + +i. Fix history initialization so assignments to $histchars made in startup + files are honored. + +j. If an exit trap does not contain a call to `exit', the shell now uses + the exit status of the last command executed before the trap as the exit + status of the shell. + +k. The parser now prompts with $PS2 if it reads a newline while parsing a + compound array assignment statement. + +l. When performing a compound array assignment, the parser doesn't treat + words of the form [index]=value as assignments if they're the result of + expansions. + +m. Fixed a bug that caused `return' executed in a trap command to make the + shell think it was still running the trap. + +n. Fixed the value of errno set by the pathname canonicalization functions. + +o. Changed the grammar so that `time' alone on a line times a null command + rather than being a syntax error. + +p. The pattern substitution code no longer performs quote removal on the + pattern before trying to match it, as the pattern removal functions do. + +q. Fixed a bug that could cause core dumps when checking whether a quoted + command name was being completed. + +r. Fixes to the pattern removal and pattern replacement expansions to deal + with multibyte characters better (and faster). + +s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly + multibyte) characters instead of raw bytes. + +t. Fixed a bug that caused some key bindings set in an inputrc to be ignored + at shell startup. + +u. Fixed a bug that caused unsetting a local variable within a function to + not work correctly. + +v. Fixed a bug that caused invalid variables to be created when using + `read -a'. + +w. Fixed a bug that caused "$@" to expand incorrectly when used as the right + hand side of a parameter expansion such as ${word:="$@"} if the first + character of $IFS was not a space. + +x. Fixed a slight cosmetic problem when printing commands containing a + `>&word' redirection. + +y. Fixed a problem that could cause here documents to not be created correctly + if the system temporary directory did not allow writing. + +2. Changes to Readline + +a. Change to history expansion functions to treat `^' as equivalent to word + one, as the documentation states. + +b. Some changes to the display code to improve display and redisplay of + multibyte characters. + +c. Changes to speed up the multibyte character redisplay code. + +d. Fixed a bug in the vi-mode `E' command that caused it to skip over the + last character of a word if invoked while point was on the word's + next-to-last character. + +e. Fixed a bug that could cause incorrect filename quoting when + case-insensitive completion was enabled and the word being completed + contained backslashes quoting word break characters. + +f. Fixed a bug in redisplay triggered when the prompt string contains + invisible characters. + +g. Fixed some display (and other) bugs encountered in multibyte locales + when a non-ascii character was the last character on a line. + +h. Fixed some display bugs caused by multibyte characters in prompt strings. + +i. Fixed a problem with history expansion caused by non-whitespace characters + used as history word delimiters. + +3. New Features in Bash + +a. printf builtin understands two new escape sequences: \" and \?. + +b. `echo -e' understands two new escape sequences: \" and \?. + +c. The GNU `gettext' package and libintl have been integrated; the shell's + messages can be translated into different languages. + +d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'. + +e. The error message printed when bash cannot open a shell script supplied + as argument 1 now includes the name of the shell, to better identify + the error as coming from bash. + +4. New Features in Readline + +a. New application variable, rl_completion_quote_character, set to any + quote character readline finds before it calls the application completion + function. + +b. New application variable, rl_completion_suppress_quote, settable by an + application completion function. If set to non-zero, readline does not + attempt to append a closing quote to a completed word. + +c. New application variable, rl_completion_found_quote, set to a non-zero + value if readline determines that the word to be completed is quoted. + Set before readline calls any application completion function. + +d. New function hook, rl_completion_word_break_hook, called when readline + needs to break a line into words when completion is attempted. Allows + the word break characters to vary based on position in the line. + +e. New bindable command: unix-filename-rubout. Does the same thing as + unix-word-rubout, but adds `/' to the set of word delimiters. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.0-alpha, +and the previous version, bash-2.05b-release. + +1. Changes to Bash + +a. Fixes so that the shell will compile without some of the default options + defined. + +b. Fixed an error message that did not pass enough arguments to printf. + +c. Fixed a bug that caused input redirection to a builtin inside a script + being read from standard input to result in the rest of the already- + read and buffered script to be discarded. + +d. Fixed a bug that caused subshell initialization to close the file + descriptor from which the shell was reading a script under certain + circumstances. + +e. Fixed a bug that caused the shell to not advance a string pointer over + a null wide character when doing string operations. + +f. Fixed the internal logout code so that shells that time out waiting for + input (using $TMOUT) run ~/.bash_logout. + +g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD. + +h. The parser no longer adds implicit double quotes to ((...)) arithmetic + commands. + +i. The ((...)) arithmetic command evaluation code was fixed to not dump core + when the expanded string is null. + +j. The ((...)) arithmetic command evaluation code was fixed to not perform + variable assignments while expanding the expression. + +k. Fixed a bug that caused word splitting to be performed incorrectly when + IFS is set, but null. + +l. Fixed a bug in brace expansion that caused a quoted `$' preceding an + open brace to inhibit brace expansion. + +m. Fixed a bug that caused a leading `-' in the shell's name to cause it to + not be recognized as a restricted shell. + +n. Fixed a bug in the arithmetic evaluation code that could cause longjmps + to an invalid location and result in a core dump. + +o. Fixed a bug in the calculation of how many history lines are new in a + single shell session when reading new history lines from a file with + `history -n'. + +p. Fixed a bug in pathname canonicalization that caused the shell to dump + core when presented with a pathname longer than PATH_MAX. + +q. Fixed the parser so that it doesn't try to compare a char variable to + EOF, which fails when chars are unsigned. + +r. Fixed a bug in the simple command execution code that caused occasional + core dumps. + +s. The shell does a better job of saving any partial parsing state during + operations which cause a command to be executed while a line is being + entered and parsed. + +t. The completion code now splits words more like the expansion code when + $IFS is used to split. + +u. The locale code does a better job of recomputing the various locale + variable values when LC_ALL is unset. + +v. The programmable completion code does a better job of dequoting expanded + word lists before comparing them against the word to be matched. + +w. The shell no longer seg faults if the expanded value of $PS4 is null + and `set -x' is enabled. + +x. Fixed a bug that caused core dumps when a here string expanded to NULL. + +y. The mail checking code now makes sure the mailbox is bigger before + reporting the existence of new mail. + +z. The parser does not try to expand $'...' and $"..." when the appear + within double quotes unless the `extquote' option has been enabled with + `shopt'. For backwards compatibility, it is enabled by default. + +aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use + $@ instead of "$@" for the implicit list of arguments. + +bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one + spawned to execute a pipeline) to not exit immediately if attempting + to use a command containing a slash. + +cc. Fixed a problem with empty replacements for a pattern that doesn't match + when performing ${param/word/} expansion. + +dd. Word expansions performed while expanding redirections no longer search + a command's temporary environment to expand variable values. + +ee. Improvements to the alias expansion code when expanding subsequent words + because an aliase's value ends with a space. + +ff. `cd -' now prints the current working directory after a successful chdir + even when the shell is not interactive, as the standard requires. + +gg. The shell does a better job of ensuring a child process dies of SIGINT + before resending SIGINT to itself. + +hh. The arithmetic expansion variable assignment code now does the right + thing when assigning to `special' variables like OPTIND. + +ii. When history expansion verification is enabled, the bash readline helper + functions that do history expansion on the current line don't print + the results. + +jj. Fixed bugs with multiple consecutive alias expansion when one of the + expansions ends with a space. + +kk. Fixed a problem in the programmable completion code that could cause core + dumps when trying to initialize a set of possible completions from a + list of variables. + +ll. The \[ and \] escape characters are now ignored when decoding the prompt + string if the shell is started with editing disabled. + +mm. Fixed a bug that could leave extra characters in a string when doing + quoted null character removal. + +nn. Command substitution and other subshell operations no longer reset the + line number (aids the bash debugger). + +oo. Better line number management when executing simple commands, conditional + commands, for commands, and select commands. + +pp. The globbing code now uses malloc, with its better failure properties, + rather than alloca(). + +qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the + appropriate array element instead of a variable named `a[2]'. + +rr. Fixed a bug in the handling of a `?(...)' pattern immediately following + a `*' when extglob is enabled. + +ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is + invoked in a function to misbehave. + +tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped + by the internal shell string quoting functions. + +uu. Fixed a bug that caused quoted null characters in an expanded word list + to be inappropriately assigned to an array variable when using `read -a'. + +vv. Fixed a bug that caused redirections accompanying a null command to persist + in the current shell. + +ww. Fixed a bug that caused the prompt to be printed when the shell was + expanding a multiline alias. + +xx. Fixed a bug that resulted in core dumps when the completion for a command + changed the compspec. + +yy. Fixed a bug that caused evaluation of programmable completions to print + notifications of completed jobs. + +zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb' + (which is what emacs shell windows do). + +aaa. In posix mode, `kill -l' causes signal names to be displayed without + a leading `SIG'. + +bbb. Clear error flag on standard output so it doesn't persist across multiple + builtin commands. + +ccc. In posix mode, `alias' displays alias values without the leading `alias', + so the output cannot be used as subsequent input. + +ddd. In posix mode, the `trap' builtin doesn't check whether or not its + first argument is a signal specification and revert the signal handling + to its original disposition if it is. + +eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the + pattern substitution and removal expansions. + +fff. Fixed several problems with the handling of ${array[@]}, ${array[*]}, + $@, and $* by the indirect variable expansion code. + +ggg. Fixed a bug that did not allow `time' to be aliased. + +hhh. Improved the mail checking code so it won't check (and possibly cause an + NFS file system mount) until MAILPATH or MAIL is given a value -- there + is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time. + (It is computed by configure, but can be #undef'd in config-bot.h.) + +iii. If the `chkwinsize' option is enabled, the shell checks for window size + changes if a child process exits due to a signal. + +jjj. Removed the attempts to avoid adding a slash at the end of a completed + executable name if there was a directory with the same name in the + current directory. + +kkk. Fixed PATH lookup code so it treats the permission bits separately for + owner, group, and other, rather than checking them all. + +lll. Fixed the locale code to reset the parser's idea of the character class + , which controls how it splits tokens, when the locale changes. + +mmm. The shell now binds its special readline functions and key bindings only + if the user's inputrc file has not already bound them. + +nnn. The shell now reports on processes that dump core due to signals when + invoked as `-c command'. + +2. Changes to Readline + +a. Fixes to avoid core dumps because of null pointer references in the + multibyte character code. + +b. Fix to avoid infinite recursion caused by certain key combinations. + +c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly. + +d. Readline no longer tries to read ahead more than one line of input, even + when more is available. + +e. Fixed the code that adjusts the point to not mishandle null wide + characters. + +f. Fixed a bug in the history expansion `g' modifier that caused it to skip + every other match. + +g. Fixed a bug that caused the prompt to overwrite previous output when the + output doesn't contain a newline and the locale supports multibyte + characters. This same change fixes the problem of readline redisplay + slowing down dramatically as the line gets longer in multibyte locales. + +h. History traversal with arrow keys in vi insertion mode causes the cursor + to be placed at the end of the new line, like in emacs mode. + +i. The locale initialization code does a better job of using the right + precedence and defaulting when checking the appropriate environment + variables. + +j. Fixed the history word tokenizer to handle <( and >( better when used as + part of bash. + +k. The overwrite mode code received several bug fixes to improve undo. + +l. Many speedups to the multibyte character redisplay code. + +m. The callback character reading interface should not hang waiting to read + keyboard input. + +n. Fixed a bug with redoing vi-mode `s' command. + +o. The code that initializes the terminal tracks changes made to the terminal + special characters with stty(1) (or equivalent), so that these changes + are reflected in the readline bindings. New application-callable function + to make it work: rl_tty_unset_default_bindings(). + +p. Fixed a bug that could cause garbage to be inserted in the buffer when + changing character case in vi mode when using a multibyte locale. + +q. Fixed a bug in the redisplay code that caused problems on systems + supporting multibyte characters when moving between history lines when the + new line has more glyphs but fewer bytes. + +r. Undo and redo now work better after exiting vi insertion mode. + +s. Make sure system calls are restarted after a SIGWINCH is received using + SA_RESTART. + +t. Improvements to the code that displays possible completions when using + multibyte characters. + +u. Fixed a problem when parsing nested if statements in inputrc files. + +v. The completer now takes multibyte characters into account when looking for + quoted substrings on which to perform completion. + +w. The history search functions now perform better bounds checking on the + history list. + +3. New Features in Bash + +a. ANSI string expansion now implements the \x{hexdigits} escape. + +b. There is a new loadable `strftime' builtin. + +c. New variable, COMP_WORDBREAKS, which controls the readline completer's + idea of word break characters. + +d. The `type' builtin no longer reports on aliases unless alias expansion + will actually be performed. + +e. HISTCONTROL is now a colon-separated list of values, which permits + more extensibility and backwards compatibility. + +f. HISTCONTROL may now include the `erasedups' option, which causes all lines + matching a line being added to be removed from the history list. + +g. `configure' has a new `--enable-multibyte' argument that permits multibyte + character support to be disabled even on systems that support it. + +h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV, + BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING, + BASH_COMMAND + +i. FUNCNAME has been changed to support the debugger: it's now an array + variable. + +j. for, case, select, arithmetic commands now keep line number information + for the debugger. + +k. There is a new `RETURN' trap executed when a function or sourced script + returns (not inherited child processes; inherited by command substitution + if function tracing is enabled and the debugger is active). + +l. New invocation option: --debugger. Enables debugging and turns on new + `extdebug' shell option. + +m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR + traps, respectively, to be inherited by shell functions. Equivalent to + `set -T' and `set -E' respectively. The `functrace' option also controls + whether or not the DEBUG trap is inherited by sourced scripts. + +n. The DEBUG trap is run before binding the variable and running the action + list in a `for' command, binding the selection variable and running the + query in a `select' command, and before attempting a match in a `case' + command. + +o. New `--enable-debugger' option to `configure' to compile in the debugger + support code. + +p. `declare -F' now prints out extra line number and source file information + if the `extdebug' option is set. + +q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes + the next command to be skipped, and a return value of 2 while in a + function or sourced script forces a `return'. + +r. New `caller' builtin to provide a call stack for the bash debugger. + +s. The DEBUG trap is run just before the first command in a function body is + executed, for the debugger. + +t. `for', `select', and `case' command heads are printed when `set -x' is + enabled. + +u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1, + x+2,...,y}. x and y can be integers or single characters; the sequence + may ascend or descend; the increment is always 1. + +v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices) + of array. + +w. New `force_fignore' shopt option; if enabled, suffixes specified by + FIGNORE cause words to be ignored when performing word completion even + if they're the only possibilities. + +x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu + style' (filename:lineno:message) format. + +y. New `-o bashdefault' option to complete and compgen; if set, causes the + whole set of bash completions to be performed if the compspec doesn't + result in a match. + +z. New `-o plusdirs' option to complete and compgen; if set, causes directory + name completion to be performed and the results added to the rest of the + possible completions. + +aa. `kill' is available as a builtin even when the shell is built without + job control. + +bb. New HISTTIMEFORMAT variable; value is a format string to pass to + strftime(3). If set and not null, the `history' builtin prints out + timestamp information according to the specified format when displaying + history entries. If set, bash tells the history library to write out + timestamp information when the history file is written. + +cc. The [[ ... ]] command has a new binary `=~' operator that performs + extended regular expression (egrep-like) matching. + +dd. `configure' has a new `--enable-cond-regexp' option (enabled by default) + to enable the =~ operator and regexp matching in [[ ... ]]. + +ee. Subexpressions matched by the =~ operator are placed in the new + BASH_REMATCH array variable. + +ff. New `failglob' option that causes an expansion error when pathname + expansion fails to produce a match. + +gg. New `set -o pipefail' option that causes a pipeline to return a failure + status if any of the processes in the pipeline fail, not just the last + one. + +4. New Features in Readline + +a. History expansion has a new `a' modifier equivalent to the `g' modifier + for compatibility with the BSD csh. + +b. History expansion has a new `G' modifier equivalent to the BSD csh `g' + modifier, which performs a substitution once per word. + +c. All non-incremental search operations may now undo the operation of + replacing the current line with the history line. + +d. The text inserted by an `a' command in vi mode can be reinserted with + `.'. + +e. New bindable variable, `show-all-if-unmodified'. If set, the readline + completer will list possible completions immediately if there is more + than one completion and partial completion cannot be performed. + +f. There is a new application-callable `free_history_entry()' function. + +g. History list entries now contain timestamp information; the history file + functions know how to read and write timestamp information associated + with each entry. + +h. Four new key binding functions have been added: + + rl_bind_key_if_unbound() + rl_bind_key_if_unbound_in_map() + rl_bind_keyseq_if_unbound() + rl_bind_keyseq_if_unbound_in_map() + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05b-release, +and the previous version, bash-2.05b-beta2. + +1. Changes to Bash + +a. Fixed an off-by-one error in the function that translates job + specifications. + +b. Note that we're running under Emacs and disable line editing if + $EMACS == `t'. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05b-beta2, +and the previous version, bash-2.05b-beta1. + +1. Changes to Bash + +a. Fixed the /= and %= arithmetic operators to catch division by zero. + +b. Added putenv, setenv, unsetenv to getenv replacement for completeness. + +c. Fixed a bug that could cause the -O expand_aliases invocation option + to not take effect. + +d. Fixed a problem with process substitution that resulted in incorrect + behavior when the number of process substitutions in an individual + command approached 64. + +2. Changes to Readline + +a. Fixed a problem with backward-char-search when on a system with support + for multibyte characters when running in a locale without any multibyte + characters. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05b-beta1, +and the previous version, bash-2.05b-alpha1. + +1. Changes to Bash + +a. Fixed a problem when parsing a POSIX.2 character class name while + evaluating a bracket expression containing multibyte characters. + +b. Changed the help text for `bind' to make it clear that any command + that may be placed in ~/.inputrc is a valid argument to `bind'. + +c. Added `help' builtin entries for `((', `[[', and arithmetic for. + +d. malloc updated again: + o slightly better overflow and underflow detection by putting the + chunk size at the beginning and end of the chunk and making + sure they match in free/realloc + o partial page allocated to make things page-aligned no longer + completely wasted + o block coalescing now enabled by default + o splitting and coalescing enabled for 32-byte chunks, the most + common size requested + o fixed a problem that resulted in spurious underflow messages and + aborts + o bin sizes are precomputed and stored in an array rather than + being computed at run time + o malloc will return memory blocks back to the system if the block + being freed is at the top of the heap and of sufficient size to + make it worthwhile + o malloc/free/realloc now inline memset instead of calling the + libc function; uses Duff's device for good performance + +e. Check for getservent(); make the service name completion code dependent + on its presence. + +f. Changed the readline callback that executes a command bound to a key + sequence to not save the executed command on the history list and to + save and restore the parsing state. + +g. Changes to lib/sh/snprintf.c: fixed some bugs in the `g' and `G' + floating point format display; implemented the "'" flag character + that turns on thousands' grouping; fixed behavior on systems where + MB_CUR_MAX does not evaluate to a constant. + +h. The `unset' builtin no longer returns a failure status when asked to + unset a previously-unset variable or function. + +i. Changes to the build system to make it easier to cross-compile bash + for different systems. + +j. Added `,' to the characters that are backslash-escaped during filename + completion, to avoid problems with complete-into-braces and RCS filenames + containing commas. + +k. Some changes to the multibyte character support code to avoid many calls + to strlen(). + +l. Bash now correctly honors setting LANG to some value when LC_ALL does not + already have a value. + +m. Fixed a bug that could cause SIGSEGV when processing nested traps with + trap handlers. + +n. The `source/.' builtin now restores the positional parameters when it + returns unless they were changed using the `set' builtin during the file's + execution. + +o. Fixed a bug that caused a syntax error when a command was terminated by + EOF. + +2. New Features in Bash + +a. There is now support for placing the long help text into separate files + installed into ${datadir}/bash. Not enabled by default; can be turned + on with `--enable-separate-helpfiles' option to configure. + +b. All builtins that take operands accept a `--' pseudo-option, except + `echo'. + +c. The `echo' builtin now accepts \0xxx (zero to three octal digits following + the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/ + POSIX.1-2001 compliance. + +3. Changes to Readline + +a. Fixed a small problem in _rl_insert_char with multibyte characters. + +b. Fixes from IBM for line wrapping problems when using multibyte characters. + +c. Fixed a problem which caused the display to be messed up when the last + line of a multi-line prompt (possibly containing invisible characters) + was longer than the screen width. + +d. Fixed a problem with the vi-mode `r' command that occurred on systems with + support for multibyte characters when running in a locale without any + multibyte characters. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05b-alpha1, +and the previous version, bash-2.05a-release. + +1. Changes to Bash + +a. Some changes to work around inlining differences between compilers. + +b. Added more prototypes for internal shell typedefs, to catch argument + passing errors when using pointers to functions. + +c. The `cd' builtin now fails in posix mode when a valid directory cannot be + constructed from a relative pathname argument and the $PWD using pathname + canonicalization, and the -P option has not been supplied. Previously, + the shell would attempt to use what the user typed, leading to weird + values for $PWD and discrepancies between the value of $PWD and the + actual working directory. + +d. The `cd' builtin now resets $PWD when canonicalization fails but a chdir + to the pathname passed as an argument succeeds (when not in posix mode). + +e. The `fc' builtin has been fixed, as POSIX requires, to use the closest + history position in range when given an out-of-range argument. + +f. The history file loading code was changed to allow lines to be saved in + the history list from the shell startup files. + +g. `history -s args' now works better in compound commands. + +h. The tilde expansion code was fixed to better recognize when it's being + invoked in an assignment context, which enables expansion after `=' + and `:'. + +i. Fixed the command name completion code so a slash is no longer appended + to a single match if there happens to be a directory with that name in + $PWD. + +j. Fixed compound array assignment to no longer perform alias expansion, to + allow reserved words as array members, and to not produce extra output + when the `-v' option had been enabled. + +k. Fixed the programmable completion code to better handle newlines in lists + of possible completions (e.g., `complete -W'). + +l. Removed the reserved words from the `bash-builtins' manual page. + +m. Parser error reporting now attempts to do a better job of identifying the + token in error rather than doing straight textual analysis. + +n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length + arguments in the library snprintf(3) replacement. + +o. `read -e' no longer does command name completion on the first word on + the line being read. + +p. `select' now returns failure if the read of the user's selection fails. + +q. Fixed a bug that could cause a core dump when setting $PIPESTATUS. + +r. Fixes to not allocate so many job slots when the shell is running a loop + with job control enabled in a subshell of an interactive shell. + +s. Fixed a bug in the trap code that caused traps to be inherited by + command substitutions in some cases. + +t. Fixed a bug that could cause alias expansion to inappropriately expand + the word following the alias. + +u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments. + +v. The parser is less lenient when parsing assignment statements where the + characters before the `=' don't comprise a valid identifier. + +w. The arithmetic expression evaluation code now honors the setting of the + `-u' option when expanding variable names. + +x. Fixed the arithmetic evaluation code to allow array subscripts to be + assigned (`let b[7]=42') and auto-incremented and auto-decremented + (e.g., b[7]++). + +y. Reimplemented the existing prompt string date and time expansions using + strftime(3), which changed the output of \@ in some locales. + +z. Fixed a bug that could cause a core dump when a special shell variable + (like RANDOM) was converted to an array with a variable assignment. + +aa. Fixed a bug that would reset the handler for a signal the user had + trapped to a function that would exit the shell when setting the exit + trap in a non-interactive shell. + +bb. Changed the execve(2) wrapper code to check whether or not a failing + command is a directory before looking at whether a `#!' interpreter + failed for some reason. + +cc. Fixed a bug in the command printing code so it no longer inserts a `;' + after a newline, which produces a syntax error when reused as input. + +dd. The code that expands $PS4 no longer inherits the `-x' flag. + +ee. The bash-specific completion functions may now take advantage of the + double-TAB and M-? features of the standard readline completion + functions. + +ff. The mail checking code no longer prints a message if the checked file's + size has not increased, even if the access time is less than the modification time. + +gg. Rewrote the variable symbol table code: there is now a stack of + contexts, each possibly including a separate symbol table; there can + be more than one temporary environment supplied to nested invocations + of `./source'; the temporary environments no longer require so much + special-case code; shell functions now handle the temporary environment + and local variables more consistently; function scope exit is faster now + that the entire symbol table does not have to be traversed to dispose of + local variables; it is now easier to push vars from the temporary + environment to the shell's variable table in posix mode; some duplicated + code has been removed. + +hh. Regularized the error message printing code; builtin_error is now called + more consistently, and common error message strings are handled by small + functions. This should make eventual message translation easier. + +ii. Error messages now include the line number in a script when the shell + is not interactive. + +jj. Array subscript expansion now takes place even when the array variable is + unset, so side effects will take place. + +kk. Fixed a bug in the SICGHLD child-reaping code so that it won't find + jobs already marked as terminated if the OS reuses pids quickly enough. + +ll. Fixed a bug that could cause a signal to not interrupt the `wait' + builtin while it was waiting for a background process to terminate. + +mm. A couple of changes to make it easier for multiple shells to share history + files using `history -n', `history -r', and `history -w'. + +nn. The `getopts' builtin always increments OPTIND to point to the next + option to be handled when an option is returned, whether it's valid + or not, as POSIX 1003.x-2001 requires. + +oo. Changed some parts of the expansion code to avoid allocating and + immediately freeing memory without using the results for anything. + +pp. The shell now keeps track of $IFS internally, updating its internal map + each time the variable is assigned a new value (or at local scope exit). + This saves thousands of hash lookups for IFS, which, while individually + cheap, add up. + +qq. Rewrote the hash table code: searching and insertion are much faster now, + and it uses a better string hashing function; augmented the function + interface to simplify other parts of the code and remove duplicated code + +rr. The shell now uses a simple, generic `object cache' for allocating and + caching words and word lists, which were the major users of + malloc/free. + +ss. Fixed the assignment statement parsing code to allow whitespace and + newlines in subscripts when performing array element assignment. + +tt. The shell now issues many fewer calls to sigprocmask and other signal + masking system calls. + +uu. Fixed the `test' and conditional command file comparison operators to + work right when one file has a non-positive timestamp and the other + does not exist. + +vv. Fixed some cases where the special characters '\001' and '\177' in the + values of variables or positional parameters caused incorrect expansion + results. + +2. Changes to Readline + +a. Fixed output of comment-begin character when listing variable values. + +b. Added some default key bindings for common escape sequences produced by + HOME and END keys. + +c. Fixed the mark handling code to be more emacs-compatible. + +d. A bug was fixed in the code that prints possible completions to keep it + from printing empty strings in certain circumstances. + +e. Change the key sequence printing code to print ESC as M\- if ESC is a + meta-prefix character -- it's easier for users to understand than \e. + +f. Fixed unstifle_history() to return values that match the documentation. + +g. Fixed the event loop (rl_event_hook) to handle the case where the input + file descriptor is invalidated. + +h. Fixed the prompt display code to work better when the application has a + custom redisplay function. + +i. Changes to make reading and writing the history file a little faster, and + to cope with huge history files without calling abort(3) from xmalloc. + +j. The vi-mode `S' and `s' commands are now undone correctly. + +3. New Features in Bash + +a. If set, TMOUT is the default timeout for the `read' builtin. + +b. `type' has two new options: `-f' suppresses shell function lookup, and + `-P' forces a $PATH search. + +c. New code to handle multibyte characters. + +d. `select' was changed to be more ksh-compatible, in that the menu is + reprinted each time through the loop only if REPLY is set to NULL. + The previous behavior is available as a compile-time option. + +e. `complete -d' and `complete -o dirnames' now force a slash to be + appended to names which are symlinks to directories. + +f. There is now a bindable edit-and-execute-command readline command, + like the vi-mode `v' command, bound to C-xC-e in emacs mode. + +g. Added support for ksh93-like [:word:] character class in pattern matching. + +h. The $'...' quoting construct now expands \cX to Control-X. + +i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts + the result into the expanded prompt. + +j. The shell now performs arithmetic in the largest integer size the + machine supports (intmax_t), instead of long. + +k. If a numeric argument is supplied to one of the bash globbing completion + functions, a `*' is appended to the word before expansion is attempted. + +l. The bash globbing completion functions now allow completions to be listed + with double tabs or if `show-all-if-ambiguous' is set. + +m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses + readline's appending a space to the completed word. + +n. New `here-string' redirection operator: <<< word. + +o. When displaying variables, function attributes and definitions are shown + separately, allowing them to be re-used as input (attempting to re-use + the old output would result in syntax errors). + +p. There is a new configuration option `--enable-mem-scramble', controls + bash malloc behavior of writing garbage characters into memory at + allocation and free time. + +q. The `complete' and `compgen' builtins now have a new `-s/-A service' + option to complete on names from /etc/services. + +r. `read' has a new `-u fd' option to read from a specified file descriptor. + +s. Fix the completion code so that expansion errors in a directory name + don't cause a longjmp back to the command loop. + +t. Fixed word completion inside command substitution to work a little more + intuitively. + +u. The `printf' %q format specifier now uses $'...' quoting to print the + argument if it contains non-printing characters. + +v. The `declare' and `typeset' builtins have a new `-t' option. When applied + to functions, it causes the DEBUG trap to be inherited by the named + function. Currently has no effect on variables. + +w. The DEBUG trap is now run *before* simple commands, ((...)) commands, + [[...]] conditional commands, and for ((...)) loops. + +x. The expansion of $LINENO inside a shell function is only relative to the + function start if the shell is interactive -- if the shell is running a + script, $LINENO expands to the line number in the script. This is as + POSIX-2001 requires. + +y. The bash debugger in examples/bashdb has been modified to work with the + new DEBUG trap semantics, the command set has been made more gdb-like, + and the changes to $LINENO make debugging functions work better. Code + from Gary Vaughan. + +z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup + and close). + +aa. There is a new `-l' invocation option, equivalent to `--login'. + +bb. The `hash' builtin has a new `-l' option to list contents in a reusable + format, and a `-d' option to remove a name from the hash table. + +4. New Features in Readline + +a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both + be bound to readline functions. Now the arrow keys may be used in vi + insert mode. + +b. When listing completions, and the number of lines displayed is more than + the screen length, readline uses an internal pager to display the results. + This is controlled by the `page-completions' variable (default on). + +c. New code to handle editing and displaying multibyte characters. + +d. The behavior introduced in bash-2.05a of deciding whether or not to + append a slash to a completed name that is a symlink to a directory has + been made optional, controlled by the `mark-symlinked-directories' + variable (default is the 2.05a behavior). + +e. The `insert-comment' command now acts as a toggle if given a numeric + argument: if the first characters on the line don't specify a + comment, insert one; if they do, delete the comment text + +f. New application-settable completion variable: + rl_completion_mark_symlink_dirs, allows an application's completion + function to temporarily override the user's preference for appending + slashes to names which are symlinks to directories. + +g. New function available to application completion functions: + rl_completion_mode, to tell how the completion function was invoked + and decide which argument to supply to rl_complete_internal (to list + completions, etc.). + +h. Readline now has an overwrite mode, toggled by the `overwrite-mode' + bindable command, which could be bound to `Insert'. + +i. New application-settable completion variable: + rl_completion_suppress_append, inhibits appending of + rl_completion_append_character to completed words. + +j. New key bindings when reading an incremental search string: ^W yanks + the currently-matched word out of the current line into the search + string; ^Y yanks the rest of the current line into the search string, + DEL or ^H deletes characters from the search string. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05a-release, +and the previous version, bash-2.05a-rc1. + +1. Changes to Bash + +a. Fixed the `printf' builtin so that the variable name supplied as an + argument to a %n conversion must be a valid shell identifier. + +b. Improved the random number generator slightly. + +c. Changes to configuration to not put -I/usr/include into $CFLAGS, since + it messes up some includes. + +d. Corrected description of POSIXLY_CORRECT in man page and info manual. + +e. Fixed a couple of cases of incorrect function prototypes that sneaked + through and caused compilation problems. + +f. A few changes to avoid potential core dumps in the programmable completion + code. + +g. Fixed a configure problem that could cause a non-existent file to show + up in LIBOBJS. + +h. Fixed a configure problem that could cause siglist.o to not be built when + required. + +i. Changes to the strtoimax and strtoumax replacement functions to work + around buggy compilers. + +j. Fixed a problem with the snprintf replacement function that could + potentially cause a core dump. + +2. Changes to Readline + +a. Fixed a locale-specific problem in the vi-mode `goto mark' command. + +b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause + include file problems. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05a-rc1, +and the previous version, bash-2.05a-beta1. + +1. Changes to Bash + +a. Fixed the snprintf replacement to correctly implement the `alternate form' + of the %g and %G conversions. + +b. Fixed snprintf to correctly handle the optional precision with the %g and + %G conversions. + +c. Fixed the arithmetic evaluation code to correct the values of `@' and `_' + when translating base-64 constants (they were backwards). + +d. New library functions for formatting long and long long ints. + +e. Fixed a few places where negative array subscripts could have occurred, + mostly as the result of systems using signed characters. + +f. Fixed a few places that assumed a pid_t was no wider than an int. + +g. Fixed the `maildir' mail checking code to work on systems where a + `struct stat' doesn't include an `st_blocks' member. + +h. Fixed snprintf to make `unsigned long long' conversion formats (%llu) + work better. + +i. Fixed snprintf to not print a sign when asked to do an unsigned conversion. + +j. Made configure changes to avoid compiling empty source files in lib/sh. + +k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax, + strtoumax. + +l. The `printf' builtin now handles the `ll' and `j' length modifiers + directly, since they can affect the type and width of the argument + passed to printf(3). + +m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to + have more systematic naming, with accompanying changes to configure.in. + +n. Fixed snprintf to handle long doubles and the %a/%A conversions by + falling back to sprintf, as long as sprintf supports them. + +o. Fixed return value from vsnprintf/snprintf to be the number of characters + that would have been printed, even if that number exceeds the buffer + size passed as an argument. + +p. Bash no longer attempts to define its own versions of some ctype macros + if they are implemented as functions in libc but not as macros in + . + +q. Changed the variable printing code (used by `set', `export', etc.) to + not use the $'...' syntax when in posix mode, since that caused + interoperability problems with other shells (most notably with autoconf). + When not in posix mode, it uses $'...' if the string to be printed + contains non-printing characters and regular single quotes otherwise. + +r. snprintf now recognizes the %F conversion. + +s. Fixed a bug that could cause the wrong status to be returned by a shell + function when the shell is compiled without job control and a null + command containing a command substutition was executed in the function. + +t. When in posix mode, the default value for MAILCHECK is 600. + +u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables + if they're not in the initial environment. + +v. If SECONDS appears in the initial environment with a valid integer value, + bash uses that as the starting value, as if an assignment had been + performed. + +w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it + gives them default values if they don't appear in the initial environment. + +x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE, + even if it assigns them default values. + +y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT + if they appear in the initial environment. + +z. Bash no longer attempts to discover if it's being run by sshd in order to + run the startup files. If the SSH_SOURCE_BASHRC is uncommented in + config-top.h it will attempt to do so as previously, but that's commented + out in the distributed version. + +aa. Fixed a typo in the code that tests for LC_NUMERIC. + +bb. The POSIXLY_CORRECT shell variable and its effects are now documented. + +cc. Some changes to several of the support shell scripts included in the + definitions to try to avoid race conditions and attacks. + +dd. Several changes to avoid warnings from `gcc -Wall'. + +ee. Fixed a problem with the `unset' builtin that could cause incorrect + results if asked to unset a variable and an array subscript in the + same command. + +ff. A few changes to the shell's temporary file creation code to avoid + potential file descriptor leaks and to prefer the system's idea of + the temporary directory to use. + +gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system + requires it but the shell has been configured --without-bash-malloc. + +hh. Updated the documentation to note that only interactive shells resend + SIGHUP to all jobs before exiting. + +ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than + rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x + will remove backslashes in any login name passed to getpwnam(3)). + +jj. Small change from Paul Eggert to make LINENO right in commands run with + `bash -c'. + +2. New Features in Bash + +a. The `printf' builtin now handles the %a and %A conversions if they're + implemented by printf(3). + +b. The `printf' builtin now handles the %F conversion (just about like %f). + +c. The `printf' builtin now handles the %n conversion like printf(3). The + corresponding argument is the name of a shell variable to which the + value is assigned. + +3. Changes to Readline + +a. Fixed a few places where negative array subscripts could have occurred. + +b. Fixed the vi-mode code to use a better method to determine the bounds of + the array used to hold the marks. + +c. Fixed the defines in chardefs.h to work better when chars are signed. + +d. Fixed configure.in to use the new names for bash autoconf macros. + +e. Readline no longer attempts to define its own versions of some ctype + macros if they are implemented as functions in libc but not as macros in + . + +f. Fixed a problem where rl_backward could possibly set point to before + the beginning of the line. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05a-beta1, +and the previous version, bash-2.05a-alpha1. + +1. Changes to Bash + +a. Fixed a bug in the evaluation of arithmetic `for' statements when the + expanded expression is NULL. + +b. Fixed an unassigned variable problem in the redirection printing code. + +c. Added more prototypes to extern function declarations in the header + files and to static function declarations in C source files. + +d. Make sure called functions have a prototype in scope, to get the arguments + and return values right instead of casting. Removed extern function + declarations from C source files that were already included in header + files. + +e. Changed some function arguments to use function typedefs in general.h so + the prototypes can be checked. The only use of Function and VFunction + now is for unwind-protects. + +f. More const changes to function arguments and appropriate variables. + +g. Changed the mail checking support to handle `maildir'-style mail + directories. + +h. Augmented the bash malloc to pass in the file and line number information + for each malloc, realloc, and free. This should result in better error + messages. + +i. The `old' gnu malloc is no longer a configuration option. + +j. Augmented the bash malloc with optional tracing and registering allocated + and freed memory. + +k. Prompt string decoding now saves and restores the value of $? when it + expands the prompt string, so command substitutions don't change $?. + +i. Array indices are now `long', since shell arithmetic is performed as long, + and the internal arrayind_t type is used consistently. + +j. Some more `unsigned char *' fixes from Paul Eggert. + +k. Fixed a bad call to builtin_error that could cause core dumps when making + local variables. + +l. `return' may no longer be used to terminate a `select' command, for + compatibility with ksh. + +m. Changed code that reads octal numbers to do a better job of detecting + overflows. + +n. The time formatting code no longer uses absolute indices into a buffer, + because the buffer size changes depending on the size of a `time_t'. + +o. `umask' now prints four digits when printing in octal mode, for + compatibility with other shells. + +p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L' + formats and long doubles better, and internal functions have been + simplified where appropriate. + +q. Some `time_t' fixes for machines were a time_t is bigger than a long. + +r. Replaced some bash-specific autoconf macros with standard equivalents. + +s. Improvmed the code that constructs temporary filenames to make the + generated names a bit more random. + +t. Added code that checks for ascii before calling any of the is* ctype + functions. + +u. Changed some places where a `char' was used as an array subscript to use + `unsigned char', since a `char' can be negative if it's signed by default. + +v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support + for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and + simplify the code. + +w. `ulimit' now prints the description of a resource in any error message + relating to fetching or setting that resource's limits. + +x. The `snprintf' replacement now computes maximum values at compile + time rather than using huge constants for things like long long. + +y. Interactive shells now ignore `set -n'. + +z. Changed the malloc bookkeeping information so that it's now 8 bytes + instead of 12 on most 32-bit machines (saving 4 bytes per allocation), + restoring 8-byte alignment. + +aa. The malloc error reporting code now attempts to print the file and line + number of the call that caused the error. + +bb. Changed the redirection error reporting code to catch EBADF errors and + report the file descriptor number rather than the file being redirected + to or from (e.g., things like `exec 4242&word' redirection now works in POSIX mode as it does by default, + since POSIX.2 leaves it unspecified. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05-beta2, +and the previous version, bash-2.05-beta1. + +1. Changes to Bash + +a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported. + +b. Fixed startup so posixly_correct is retained across subshells begun to + execute scripts without a leading `#!'. + +c. Fixed a bug that caused $(< file) to not work in a (...) subshell. + +d. Added config support for Linux running on the IBM S390. + +e. Fixed a bug that caused bash to get its input pointer out of sync when + reading commands through a pipe and running a command with standard + input redirected from a file. + +f. Made a change so that command completion now makes about half as many + stat(2) calls when searching the $PATH. + +g. Fixed a bug that caused variable assignments preceding `return' to not + be propagated to the shell environment in POSIX mode. + +h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed + on `word'. + +i. In POSIX mode, `break' and `continue' do not complain and return success + if called when the shell is not executing a loop. + +j. Fixed `bash -o posix' to work the same as `bash --posix'. + +k. Fixed a bug where variable assignments preceding `eval' or `source/.' + would not show up in the environment exported to subshells run by the + commands. + +l. In POSIX mode, shells started to execute command substitutions inherit + the value of the `-e' option from their parent shell. + +m. In POSIX mode, aliases are expanded even in non-interactive shells. + +n. Changed some of the job control messages to display the text required by + POSIX.2 when the shell is in POSIX mode. + +o. Fixed a bug in `test' that caused it to occasionally return incorrect + results when non-numeric arguments were supplied to `-t'. + +2. Changes to Readline + +a. Some changes were made to avoid gcc warnings with -Wall. + +b. rl_get_keymap_by_name now finds keymaps case-insensitively, so + `set keymap EMACS' works. + +c. The history file writing and truncation functions now return a useful + status on error. + +d. Fixed a bug that could cause applications to dereference a NULL pointer + if a NULL second argument was passed to history_expand(). + +3. New Features in Bash + +a. doc/readline.3 has been moved to the readline distribution. + +4. New Features in Readline + +a. New function, rl_get_screen_size (int *rows, int *columns), returns + readline's idea of the screen dimensions. + +b. The timeout in rl_gather_tyi (readline keyboard input polling function) + is now settable via a function (rl_set_keyboard_input_timeout()). + +c. Renamed the max_input_history variable to history_max_entries; the old + variable is maintained for backwards compatibility. + +d. The list of characters that separate words for the history tokenizer is + now settable with a variable: history_word_delimiters. The default + value is as before. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05-beta1, +and the previous version, bash-2.05-alpha1. + +1. Changes to Bash + +a. Changes to allow shared library and object building on the GNU Hurd. + +b. Fixes to the way exported functions are placed into the environment and + cached. + +c. The globbing library once again respects locales when processing ranges + in bracket expressions while doing pattern matching. + +d. System-specific configuration changes for: Tru 64, Interix + +e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and + will use mktemp(1) or tempfile(1), if present, for temporary file creation. + +f. Bash no longer performs a binary file check on a script argument that's + really a tty (like /dev/fd/0 or /dev/stdin). + +g. Fixed a bug in the execution of shell scripts that caused the effects of + $BASH_ENV to be undone in some cases. + +h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly. + +i. Several changes to the job control code to avoid some signal state + manipulation. + +j. The Bash malloc no longer blocks signals as often, which should make it + faster. + +k. Fixed a parsing bug that did not allow backslash to escape a single quote + inside a $'...' construct. + +l. Fixed a bug that caused things like ${var:=$'value'} to be parsed + incorrectly. This showed up in newer versions of autoconf. + +m. Fixed a bug in the bash-specific readline initialization that caused + key bindings to bash-specific function names appearing in .inputrc to + not be honored. + +n. Bash now sets the file descriptor it uses to save the file descriptor + opened on a shell script to close on exec. + +o. Fixed a bug in the prompt string decoding that caused it to misbehave + when presented an octal sequence of fewer than three characters. + +p. Fixed the `test' builtin to return an error if `[' is supplied a single + argument that is not `]'. + +q. Fixed a bug that caused subshells started to run executable shell scripts + without a leading `#!' to incorrectly inherit an argument list preceding + a shell builtin (like such a script called from a script sourced with `.', + where there were variable assignments preceding the `.' command) + +r. Fixed a bug that caused changes to variables supplied in an assignment + statement preceding a shell builtin to not be honored (like a script + run with `.'). + +s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values + when the shell is started. + +t. Fixed a bug that caused SIGINT to kill shell scripts after the script + called `wait'. + +u. The `fc' builtin now tries to create its temporary files in the directory + named by $TMPDIR. + +v. Bash no longer calls any Readline functions or uses any Readline variables + not declared in readline.h. + +w. Fixed a bug that caused some substitutions involving $@ to not be split + correctly, especially expansions of the form ${paramterOPword}. + +x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it + appears in the initial environment. + +y. Fixed a couple of problems with shell scripts without a leading `#!' + being executed out of shell functions that could cause core dumps if + such a script attempted to execute `return'. + +z. Fixed a problem with the `-nt' and `-ot' binary operators for the + `test/[' builtin and the `[[' conditional command that caused wrong + return values if one of the file arguments did not exist. + +aa. Fixed a bug that caused non-interactive shells which had previously + executed `shopt -s expand_aliases' to fail to expand aliases in a + command like `(command) &'. + +2. Changes to Readline + +a. Changes to make most (but not yet all -- there is still crlf()) of the + exported readline functions declared in readline.h have an rl_ prefix. + +b. More `const' changes in function arguments, mostly for completion + functions. + +c. Fixed a bug in rl_forward that could cause the point to be set to before + the beginning of the line in vi mode. + +d. Fixed a bug in the callback read-char interface to make it work when a + readline function pushes some input onto the input stream with + rl_execute_next (like the incremental search functions). + +e. Fixed a file descriptor leak in the history file manipulation code that + was tripped when attempting to truncate a non-regular file (like + /dev/null). + +f. Some existing variables are now documented and part of the public + interface (declared in readline.h): rl_explict_arg, rl_numeric_arg, + rl_editing_mode, rl_last_func. + +g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and + crlf to rl_crlf, so there are no public functions declared in readline.h + without an `rl_' prefix. The old functions still exist for backwards + compatibility. + +3. New Features in Bash + +a. A new loadable builtin, realpath, which canonicalizes and expands symlinks + in pathname arguments. + +b. When `set' is called without options, it prints function definitions in a + way that allows them to be reused as input. This affects `declare' and + `declare -p' as well. + +4. New Features in Readline + +a. New application-callable function rl_set_prompt(const char *prompt): + expands its prompt string argument and sets rl_prompt to the result. + +b. New application-callable function rl_set_screen_size(int rows, int cols): + public method for applications to set readline's idea of the screen + dimensions. + +c. The history example program (examples/histexamp.c) is now built as one + of the examples. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.05-alpha1, +and the previous version, bash-2.04-release. + +1. Changes to Bash + +a. A fix was made to allow newlines in compond array assignments. + +b. configure now checks for real-time signals with unusable values. + +c. Interactive shells no longer exit if a substitution fails because of an + unset variable within a sourced file. + +d. Fixed a problem with incorrect matching of extended glob patterns when + doing pattern substitution. + +e. `{' is now quoted by the completion code when it appears in a filename. + +f. Fixed an error in pattern matching that caused the matcher to not + correctly skip the rest of a bracket expression after a character + matched. + +g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS + character preceded by IFS whitespace part of the current delimiter rather + than generating a separate field. + +h. The {!prefix@} expansion now generates separate words, analogous to $@, + when double-quoted. + +i. Command substitution now ignores NUL bytes in the command output, and the + parser ignores them on input. + +j. A fix was made to the job control code to prevent hanging processes when + the shell thinks background processes are running but the kernel returns + -1/ECHILD from waitpid(). + +k. `pwd' now prints an error message if the write fails when displaying the + current directory. + +l. When in POSIX mode, the shell prints trap dispostions without a leading + `SIG' in the signal specification. + +m. Fixed a parser bug that caused the current command's line count to be + messed up by a compound array assignment. + +n. Fixed a bug in the unwind-protect code that caused bad behavior on machines + where ints and pointers are not the same size. + +o. System-specific configure changes for: MacOS X. + +p. Changes for Cygwin to translate \r\n and \r to \n and to set file + descriptors used for reading input to text mode in various places. + +q. Fixed a bug that caused `!' to occasionally not be honored when in + a (...) subshell. + +r. Bash no longer assumes that getcwd() will return any useful error message + in the buffer passed as an argument if the call fails. + +s. The `source', `.', and `fc' builtins no longer check whether a file is + binary before reading commands from it. + +t. Subshells no longer turn off job control when they exit, since that + sometimes resulted in the terminal being reset to the wrong process + group. + +u. The history code no longer tries to save the second and subsequent lines + of a multi-line command if the first line was not saved. + +v. The history saving code now does a better job of saving blank lines in a + multi-line command. + +w. Removed a `feature' that made `ulimit' silently translate `unlimited' to + the current hard limit, which obscured some kernel error returns. + +x. Fixed the grammar so that `}' is recognized as a reserved word after + another reserved word, rather than requiring a `;' or newline. This + means that constructs like + + { { echo a b c ; } } + + work as expected. + +y. Conditional commands ([[...]]) now perform tilde expansion on their + arguments. + +z. Noted in the documentation that `set -a' will cause functions to be + exported if they are defined after `set -a' is executed. + +aa. When an interactive login shell starts, if $PWD and $HOME refer to the + same directory but are not the same string, $PWD is set to $HOME. + +bb. Fixed `printf' to handle invalid floating point numbers better. + +cc. Temporary files are now created with random filenames, to improve security. + +dd. The readline initialization code now binds the custom bash functions and + key bindings after the readline defaults are set up. + +ee. Fixed the `source' builtin to no longer overwrite a shell function's + argument list, even if the sourced file changes the positional parameters. + +ff. A bug fix was made in the expansion of `$*' in contexts where it should + not be split, like assignment statements. + +gg. Fixed a bug in the parameter substring expansion to handle conditional + arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression + off at the wrong `:'. + +hh. The `<>' redirection is no longer subject to the current setting of + `noclobber', as POSIX.2 specifies. + +ii. Fixed a bug in the conditional command parsing code that caused expressions + in parentheses to occasionally be parsed incorrectly. + +jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or + {...} to follow the )) without an intervening list terminator. + +kk. `printf' now treats `\E' the same as `\e' when performing backslash escape + expansion for the `%b' format specifier. + +ll. When in POSIX mode, the shell no longer searches the current directory for + a file to be sourced with `.' or `source' if `.' is not in $PATH. + +mm. Interactive comments are no longer turned off when POSIX mode is disabled. + +nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's + environment when it starts up. + +oo. Fixed a bug in the `command' builtin so the effect of a command like + `command exec 4(...) + expansions to defer removal until after any current shell function has + finished executing. + +f. Fixed a bug in `select' which caused it to not handle the `continue' + builtin correctly. + +g. Autoconf tests added for cygwin32 and mingw32. + +2. New Features in Bash + +a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc' + (which is still there for backwards compatibility). + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.04-beta1, +and the previous version, bash-2.04-alpha1. + +1. Changes to Bash + +a. Fixed a bug in the programmable completion code that occurred when + trying to complete command lines containing a `;' or `@'. + +b. The file descriptor from which the shell is reading a script is now + moved to a file descriptor above the user-addressible range. + +c. Changes to `printf' so that it can handle integers beginning with 0 + or 0x as octal and hex, respectively. + +d. Fixes to the programmable completion code so it handles nonsense like + `compgen -C xyz' gracefully. + +e. The shell no longer modifies the signal handler for SIGPROF, allowing + profiling again on certain systems. + +f. The shell checks for a new window size, if the user has requested it, + after a process exits due to a signal. + +g. Fixed a bug with variables with null values in a program's temporary + environment and the bash getenv() replacement. + +h. `declare' and the other builtins that take variable assignments as + arguments now honor `set -a' and mark modified variables for export. + +i. Some changes were made for --dump-po-strings mode when writing strings + with embedded newlines. + +j. The code that caches export strings from the initial environment now + duplicates the string rather than just pointing into the environment. + +k. The filename completion quoting code now uses single quotes by default + if the filename being completed contains newlines, since \ + has a special meaning to the parser. + +l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and + u_int32_t, respectively to avoid conflicts on certain Unix versions. + +m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x. + +n. Fixed a problem with hostname-to-ip-address translation in the + /dev/(tcp|udp)/hostname/port redirection code. + +o. The texinfo manual has been reorganized slightly. + +p. Filename generation (globbing) range comparisons in bracket expressions + no longer use strcoll(3) even if it is available, since it has unwanted + effects in certain locales. + +q. Fixed a cosmetic problem in the source that caused the shell to not + compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was. + +r. Fixed a bug in the here-document code tripped when the file descriptor + opened to the file containing the text of the here document was the + same as a redirector specified by the user. + +s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline' + in `time ! pipeline'. + +t. Fixed a bug with the `wait' builtin which manifested itself when an + interrupt was received while the shell was waiting for asynchronous + processes in a shell script. + +u. Fixed the DEBUG trap code so that it has the correct value of $?. + +v. Fixed a bug in the parameter pattern substitution code that could cause + the shell to attempt to free unallocated memory if the pattern started + with `/' and an expansion error occurs. + +w. Fixed a bug in the positional parameter substring code that could + cause the shell to loop freeing freed memory. + +x. Fixed a bug in the positional parameter pattern substitution code so + that it correctly handles null replacement strings with a pattern + string prefixed with `%' or `#'. + +y. The shell no longer attempts to import functions from the environment if + started with `-n'. + +z. Fixed a bug that caused `return' in a command substitution executed in + a shell function to return from the function in a subshell and continue + execution. + +aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell + is restricted. + +bb. The wait* job control functions now behave better if called when there + are no unwaited-for children. + +cc. Command substitution no longer unconditionally disables job control in + the subshell started to run the command. + +dd. A bug was fixed that occasionally caused traps to mess up the parser + state. + +ee. `bashbug' now honors user headers in the mail message it sends. + +ff. A bug was fixed that caused the `:p' history modifier to not print the + history expansion if the `histverify' option was set. + +2. Changes to Readline + +a. Fixed a bug in the redisplay code for lines with more than 256 line + breaks. + +b. A bug was fixed which caused invisible character markers to not be + stripped from the prompt string if the terminal was in no-echo mode. + +c. Readline no longer tries to get the variables it needs for redisplay + from the termcap entry if the calling application has specified its + own redisplay function. Readline treats the terminal as `dumb' in + this case. + +d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape + sequences is redrawn correctly. + +3. New Features in Bash + +a. `bashbug' now accepts `--help' and `--version' options. + +b. There is a new `xpg_echo' option to `shopt' that controls the behavior + of echo with respect to backslash-escaped characters at runtime. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.04-alpha1, +and the previous version, bash-2.04-devel. + +1. Changes to Bash + +a. Fixed a bug that could cause core dumps when performing substring + expansion. + +b. Shared object configuration changes for: Solaris, OSF/1 + +c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities + for pathname expansion now understands GLOBIGNORE. + +d. The code that implements `eval' was changed to save the value of the + current prompt, so an eval in a shell function called by the programmable + completion code will not change the prompt to $PS2. + +e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to + config-top.h. If this is defined, all login shells will read the + startup files, not just interactive and non-interactive started with + the `--login' option. + +f. Fixed a bug that caused the expansion code to occasionally dump core if + IFS contained characters > 128. + +g. Fixed a problem with the grammar so that a newline is not required + after the `))' in the new-style arithmetic for statement; a semicolon + may be used as expected. + +h. Variable indirection may now reference the shell's special variables. + +i. The $'...' and $"..." constructs are now added to the history correctly + if they contain newlines and command-oriented history is enabled. + +j. It is now an error to try to assign a value to a function-local copy + of a readonly shell variable (declared with the `local' builtin). + +2. Changes to Readline + +a. The history file code now uses O_BINARY mode when reading and writing + the history file on cygwin32. + +3. New Features in Bash + +a. A new programmable completion facility, with two new builtin commands: + complete and compgen. + +b. configure has a new option, `--enable-progcomp', to compile in the + programmable completion features (enabled by default). + +c. `shopt' has a new option, `progcomp', to enable and disable programmable + completion at runtime. + +d. Unsetting HOSTFILE now clears the list of hostnames used for completion. + +4. New Features in Readline + +a. A new variable, rl_gnu_readline_p, always 1. The intent is that an + application can verify whether or not it is linked with the `real' + readline library or some substitute. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.04-devel, +and the previous version, bash-2.03-release. + +1. Changes to Bash + +a. System-specific configuration and source changes for: Interix, Rhapsody + +b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if + JOB_CONTROL was not defined. + +c. An obscure race condition in the trap code was fixed. + +d. The string resulting from $'...' is now requoted to avoid any further + expansion. + +e. The $'...' quoting syntax now allows backslash to escape a single quote, + for ksh-93 compatibility. + +f. The $"..." quoting syntax now escapes backslashes and double quotes in + the translated string when displaying them with the --dump-po-strings + option. + +g. `echo -e' no longer converts \' to '. + +h. Fixes were made to the extended globbing code to handle embedded (...) + patterns better. + +i. Some improvements were made to the code that unsets `nodelay' mode on + the file descriptor from which bash is reading input. + +j. Some changes were made to the replacement termcap library for better + operation on MS-DOS. + +k. Some changes were made to the tilde expansion code to handle backslash + as a pathname separator on MS-DOS. + +l. The source has been reorganized a little bit -- there is now an `include' + subdirectory, and lib/posixheaders has been removed. + +m. Improvements were made to the `read' builtin so that it makes many + fewer read(2) system calls. + +n. The expansion of $- will include `c' and `s' when those options are + supplied at shell invocation. + +o. Several improvements were made to the completion code: variable completion + now works better when there are unterminated expansions, command + completion understands quotes better, and completion now works in certain + unclosed $(... constructs. + +p. The arithmetic expansion code was fixed to not need the value of a + variable being assigned a value (fixes the "ss=09; let ss=10" bug). + +q. Some changes were made to make exported environment creation faster. + +r. The html documentation will be installed into $(htmldir) if that variable + has a value when `make install' is run. + +s. Fixed a bug that would cause the bashrc file to be sourced inappropriately + when bash is started by sshd. + +t. The SSH_CLIENT environment variable is no longer auto-exported. + +u. A bug that caused redirections with (...) subshells to be performed in + the wrong order was fixed. + +v. A bug that occasionally caused inappropriate expansion of assignment + statements in compound array assignments was fixed. + +w. The code that parses the words in a compound array assignment was + simplified considerably and should work better now. + +x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant + when a user attempts to retrieve the status of a terminated background + process. + +y. Fixes to the `printf' builtin so that it doesn't try to expand all + backslash escape sequences in the format string before parsing it for + % format specifiers. + +2. Changes to Readline + +a. The history library tries to truncate the history file only if it is a + regular file. + +b. A bug that caused _rl_dispatch to address negative array indices on + systems with signed chars was fixed. + +c. rl-yank-nth-arg now leaves the history position the same as when it was + called. + +d. Changes to the completion code to handle MS-DOS drive-letter:pathname + filenames. + +e. Completion is now case-insensitive by default on MS-DOS. + +f. Fixes to the history file manipulation code for MS-DOS. + +g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS. + +h. Some fixes were made to the redisplay code for better operation on MS-DOS. + +i. The quoted-insert code will now insert tty special chars like ^C. + +j. A bug was fixed that caused the display code to reference memory before + the start of the prompt string. + +k. More support for __EMX__ (OS/2). + +l. A bug was fixed in readline's signal handling that could cause infinite + recursion in signal handlers. + +m. A bug was fixed that caused the point to be less than zero when rl_forward + was given a very large numeric argument. + +n. The vi-mode code now gets characters via the application-settable value + of rl_getc_function rather than calling rl_getc directly. + +3. New Features in Bash + +a. The history builtin has a `-d offset' option to delete the history entry + at position `offset'. + +b. The prompt expansion code has two new escape sequences: \j, the number of + active jobs; and \l, the basename of the shell's tty device name. + +c. The `bind' builtin has a new `-x' option to bind key sequences to shell + commands. + +d. There is a new shell option, no_empty_command_completion, which, when + enabled, disables command completion when TAB is typed on an empty line. + +e. The `help' builtin has a `-s' option to just print a builtin's usage + synopsis. + +f. There are several new arithmetic operators: id++, id-- (variable + post-increment/decrement), ++id, --id (variabl pre-increment/decrement), + expr1 , expr2 (comma operator). + +g. There is a new ksh-93 style arithmetic for command: + for ((expr1 ; expr2; expr3 )); do list; done + +h. The `read' builtin has a number of new options: + -t timeout only wait timeout seconds for input + -n nchars only read nchars from input instead of a full line + -d delim read until delim rather than newline + -s don't echo input chars as they are read + +i. The redirection code now handles several filenames specially: + /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or + not they are present in the file system. + +j. The redirection code now recognizes pathnames of the form + /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket + of the appropriate type to the specified port on the specified host. + +k. The ksh-93 ${!prefix*} expansion, which expands to the names of all + shell variables whose names start with prefix, has been implemented. + +l. There is a new dynamic variable, FUNCNAME, which expands to the name of + a currently-executing function. Assignments to FUNCNAME have no effect. + +m. The GROUPS variable is no longer readonly; assignments to it are silently + discarded. This means it can be unset. + +4. New Features in Readline + +a. Parentheses matching is now always compiled into readline, and enabled + or disabled when the value of the `blink-matching-paren' variable is + changed. + +b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename. + +c. MS-DOS systems now use ~/_history as the default history file. + +d. history-search-{forward,backward} now leave the point at the end of the + line when the string to search for is empty, like + {reverse,forward}-search-history. + +e. history-search-{forward,backward} now leave the last history line found + in the readline buffer if the second or subsequent search fails. + +f. New function for use by applications: rl_on_new_line_with_prompt, used + when an application displays the prompt itself before calling readline(). + +g. New variable for use by applications: rl_already_prompted. An application + that displays the prompt itself before calling readline() must set this to + a non-zero value. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.03-release, +and the previous version, bash-2.03-beta2. + +1. Changes to Bash + +a. A file descriptor leak in the `fc' builtin was fixed. + +b. A bug was fixed in the `read' builtin that caused occasional spurious + failures when using `read -e'. + +c. The version code needed to use the value of the cpp variable + CONF_MACHTYPE rather than MACHTYPE. + +d. A new test was added to exercise the command printing and copying code. + +e. A bug was fixed that caused `time' to be recognized as a reserved word + if it was the first pattern in a `case' statement pattern list. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.03-beta2, +and the previous version, bash-2.03-beta1. + +1. Changes to Bash + +a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2. + +b. config.{guess,sub} support added for the NEC SX4. + +c. Changed some of the cross-compiling sections of the configure macros in + aclocal.m4 so that configure won't abort. + +d. Slight changes to how the HTML versions of the bash and readline manuals + are generated. + +e. Fixed conditional command printing to avoid interpreting printf `%'-escapes + in arguments to [[. + +f. Don't include the bash malloc on all variants of the alpha processor. + +g. Changes to configure to make --enable-profiling work on Solaris 2.x. + +h. Fixed a bug that manifested itself when shell functions were called + between calls to `getopts'. + +i. Fixed pattern substitution so that a bare `#'as a pattern causes the + replacement string to be prefixed to the search string, and a bare + `%' causes the replacement string to be appended to the search string. + +j. Fixed a bug in the command execution code that caused child processes + to occasionally have the wrong value for $!. + +2. Changes to Readline + +a. Added code to the history library to catch history substitutions using + `&' without a previous history substitution or search having been + performed. + +3. New Features in Bash + +4. New Features in Readline + +a. New bindable variable: `isearch-terminators'. + +b. New bindable function: `forward-backward-delete-char' (unbound by default). + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.03-beta1, +and the previous version, bash-2.03-alpha. + +1. Changes to Bash + +a. A change was made to the help text for `{...}' to make it clear that a + semicolon is required before the closing brace. + +b. A fix was made to the `test' builtin so that syntax errors cause test + to return an exit status > 1. + +c. Globbing is no longer performed on assignment statements that appear as + arguments to `assignment builtins' such as `export'. + +d. System-specific configuration changes were made for: Rhapsody, + AIX 4.2/gcc, BSD/OS 4.0. + +e. New loadable builtins: ln, unlink. + +f. Some fixes were made to the globbing code to handle extended glob patterns + which immediately follow a `*'. + +g. A fix was made to the command printing code to ensure that redirections + following compound commands have a space separating them from the rest + of the command. + +h. The pathname canonicalization code was changed to produce fewer leading + `//' sequences, since those are interpreted as network file system + pathnames on some systems. + +i. A fix was made so that loops containing `eval' commands in commands passed + to `bash -c' would not exit prematurely. + +j. Some changes were made to the job reaping code when the shell is not + interactive, so the shell will retain exit statuses longer for examination + by `wait'. + +k. A fix was made so that `jobs | command' works again. + +l. The erroneous compound array assignment var=((...)) is now a syntax error. + +m. A change was made to the dynamic loading code in `enable' to support + Tenon's MachTen. + +n. A fix was made to the globbing code so that extended globbing patterns + will correctly match `.' in a bracket expression. + +2. Changes to Readline + +a. A fix was made to the completion code in which a typo caused the wrong + value to be passed to the function that computed the longest common + prefix of the list of matches. + +b. The completion code now checks the value of rl_filename_completion_desired, + which is set by application-supplied completion functions to indicate + that filename completion is being performed, to decide whether or not to + call an application-supplied `ignore completions' function. + +3. New Features in Bash + +a. A change was made to the startup file code so that any shell begun with + the `--login' option, even non-interactive shells, will source the login + shell startup files. + +4. New Features in Readline + +a. A new variable, rl_erase_empty_line, which, if set by an application using + readline, will cause readline to erase, prompt and all, lines on which the + only thing typed was a newline. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.03-alpha, +and the previous version, bash-2.02.1-release. + +1. Changes to Bash + +a. System-specific configuration changes were made for: Irix 6.x, Unixware 7. + +b. The texi2dvi and texi2html scripts were updated to the latest versions + from the net. + +c. The configure tests that determine which native type is 32 bits were + changed to not require a compiled program. + +d. Fixed a bug in shell_execve that could cause memory to be freed twice + after a failed exec. + +e. The `printf' test uses `diff -a' if it's available to prevent confusion + due to the non-ascii output. + +f. Shared object configuration is now performed by a shell script, + support/shobj-conf, which generates values to be substituted into + makefiles by configure. + +g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a + return value. + +h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar + handling of RLIMIT_FILESIZE. + +i. Some new loadable builtins were added: id, printenv, sync, whoami, push, + mkdir. `pushd', `popd', and `dirs' can now be built as regular or + loadable builtins from the same source file. + +j. Changes were made to `printf' to handle NUL bytes in the expanded format + string. + +k. The various `make clean' Makefile targets now descend into lib/sh. + +l. The `type' builtin was changed to use the internal `getopt' so that things + like `type -ap' work as expected. + +m. There is a new configuration option, --with-installed-readline, to link + bash with a locally-installed version of readline. Only readline version + 4.0 and later releases can support this. Shared and static libraries + are supported. The installed include files are used. + +n. There is a new autoconf macro used to find which basic type is 64 bits. + +o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*, + AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where + the `-shared' options works correctly. + +p. A bug was fixed in the bash filename completion code that caused memory to + be freed twice if a directory name containing an unset variable was + completed and the -u option was set. + +q. The prompt expansion code now quotes the `$' in the `\$' expansion so it + is not processed by subsequent parameter expansion. + +r. Fixed a parsing bug that caused a single or double quote after a `$$' to + trigger ANSI C expansion or locale translation. + +s. Fixed a bug in the globbing code that caused quoted filenames containing + no globbing characters to sometimes be incorrectly expanded. + +t. Changes to the default prompt strings if prompt string decoding is not + compiled into the shell. + +u. Added `do', `then', `else', `{', and `(' to the list of keywords that may + precede the `time' reserved word. + +v. The shell may now be cross-built for BeOS as well as cygwin32. + +w. The conditional command execution code now treats `=' the same as `==' + for deciding when to perform pattern matching. + +x. The `-e' option no longer causes the shell to exit if a command exits + with a non-zero status while running the startup files. + +y. The `printf' builtin no longer dumps core if a modifier is supplied in + the format string without a conversion character (e.g. `%h'). + +z. Array assignments of the form a=(...) no longer show up in the history + list. + +aa. The parser was fixed to obey the POSIX.2 rules for finding the closing + `}' in a ${...} expression. + +bb. The history file is now opened with mode 0600 rather than 0666, so bash + no longer relies on the user's umask being set appropriately. + +cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now + relies on proper behavior from the C library. + +dd. Minor changes were made to allow quoted variable expansions using + ${...} to be completed correctly if there is no closing `"'. + +ee. Changes were made to builtins/Makefile.in so that configuring the shell + with `--enable-profiling' works right and builtins/mkbuiltins is + generated. + +2. Changes to Readline + +a. The version number is now 4.0. + +b. There is no longer any #ifdef SHELL code in the source files. + +c. Some changes were made to the key binding code to fix memory leaks and + better support Win32 systems. + +d. Fixed a silly typo in the paren matching code -- it's microseconds, not + milliseconds. + +e. The readline library should be compilable by C++ compilers. + +f. The readline.h public header file now includes function prototypes for + all readline functions, and some changes were made to fix errors in the + source files uncovered by the use of prototypes. + +g. The maximum numeric argument is now clamped at 1000000. + +h. Fixes to rl_yank_last_arg to make it behave better. + +i. Fixed a bug in the display code that caused core dumps if the prompt + string length exceeded 1024 characters. + +j. The menu completion code was fixed to properly insert a single completion + if there is only one match. + +k. A bug was fixed that caused the display code to improperly display tabs + after newlines. + +3. New Features in Bash + +a. New `shopt' option, `restricted_shell', indicating whether or not the + shell was started in restricted mode, for use in startup files. + +b. Filename generation is now performed on the words between ( and ) in + array assignments (which it probably should have done all along). + +c. OLDPWD is now auto-exported, as POSIX.2 seems to require. + +d. ENV and BASH_ENV are read-only variables in a restricted shell. + +4. New Features in Readline + +a. Many changes to the signal handling: + o Readline now catches SIGQUIT and cleans up the tty before returning; + o A new variable, rl_catch_signals, is available to application writers + to indicate to readline whether or not it should install its own + signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, + SIGTTIN, and SIGTTOU; + o A new variable, rl_catch_sigwinch, is available to application + writers to indicate to readline whether or not it should install its + own signal handler for SIGWINCH, which will chain to the calling + applications's SIGWINCH handler, if one is installed; + o There is a new function, rl_free_line_state, for application signal + handlers to call to free up the state associated with the current + line after receiving a signal; + o There is a new function, rl_cleanup_after_signal, to clean up the + display and terminal state after receiving a signal; + o There is a new function, rl_reset_after_signal, to reinitialize the + terminal and display state after an application signal handler + returns and readline continues + +b. There is a new function, rl_resize_terminal, to reset readline's idea of + the screen size after a SIGWINCH. + +c. New public functions: rl_save_prompt and rl_restore_prompt. These were + previously private functions with a `_' prefix. + +d. New function hook: rl_pre_input_hook, called just before readline starts + reading input, after initialization. + +e. New function hook: rl_display_matches_hook, called when readline would + display the list of completion matches. The new function + rl_display_match_list is what readline uses internally, and is available + for use by application functions called via this hook. + +f. New bindable function, delete-char-or-list, like tcsh. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.02.1-release, +and the previous version, bash-2.02-release. + +1. Changes to Bash + +a. A bug that caused the bash readline support to not compile unless aliases + and csh-style history were configured into the shell was fixed. + +b. Fixed a bug that could cause a core dump when here documents contained + more than 1000 characters. + +c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same + as the current directory when in POSIX mode. + +d. Fixed an alignment problem with the memory returned by the bash malloc, + so returned memory is now 64-bit aligned. + +e. Fixed a bug that caused command substitutions executed within pipelines + to put the terminal in the wrong process group. + +f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop, + Unixware 2, and Unixware 7. + +g. Fixes to the pattern matching code to make it work correctly for eight-bit + characters. + +h. Fixed a problem that occasionally caused the shell to display the wrong + value for the new working directory when changing to a directory found + in $CDPATH when in physical mode. + +i. Fixed a bug that caused core dumps when using conditional commands in + shell functions. + +j. Fixed a bug that caused the printf builtin to loop forever if the format + string did not consume any of the arguments. + +k. Fixed a bug in the parameter expansion code that caused "$@" to be + incorrectly split if $IFS did not contain a space character. + +l. Fixed a bug that could cause a core dump when completing hostnames if + the number of matching hostnames was an exact multiple of 16. + +m. Fixed a bug that caused the shell to fork too early when a command + such as `%2 &' was given. + +2. Changes to Readline + +a. Fixed a problem with redisplay that showed up when the prompt string was + longer than the screen width and the prompt contained invisible characters. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.02-release, +and the previous version, bash-2.02-beta2. + +1. Changes to Bash + +a. A bug was fixed that caused the terminal process group to be set + incorrectly when performing command substitution of builtins in a + pipeline. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.02-beta2, +and the previous version, bash-2.02-beta1. + +1. Changes to Bash + +a. Attempting to `wait' for stopped jobs now generates a warning message. + +b. Pipelines which exit due to SIGPIPE in non-interactive shells are now + not reported if the shell is compiled -DDONT_REPORT_SIGPIPE. + +c. Some changes were made to builtins/psize.sh and support/bashbug.sh to + attempt to avoid some /tmp file races and surreptitious file + substitutions. + +d. Fixed a bug that caused the shell not to compile if configured with + dparen arithmetic but without aliases. + +e. Fixed a bug that caused the input stream to be switched when assigning + empty arrays with `bash -c'. + +f. A bug was fixed in the readline expansion glue code that caused bash to + dump core when expanding lines with an unclosed single quote. + +g. A fix was made to the `cd' builtin so that using a non-empty directory + from $CDPATH results in an absolute pathname of the new current working + directory to be displayed after the current directory is changed. + +h. Fixed a bug in the variable assignment code that caused the shell to + dump core when referencing an unset variable with `set -u' enabled in + an assignment statement preceding a command. + +i. Fixed a bug in the exit trap code that caused reserved words to not be + recognized under certain circumstances. + +j. Fixed a bug in the parameter pattern substitution code so that quote + removal is performed. + +k. The shell should now configure correctly on Apple Rhapsody systems. + +l. The `kill' builtin now prints a usage message if it is not passed any + arguments. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.02-beta1, +and the previous version, bash-2.02-alpha1. + +1. Changes to Bash + +a. A few compilation bugs were fixed in the new extended globbing code. + +b. Executing arithmetic commands now sets the command name to `((' so + error messages look right. + +c. Fixed some build problems with various configuration options. + +d. The `printf' builtin now aborts immediately if an illegal format + character is encountered. + +e. The code that creates here-documents now behaves better if the file it's + trying to create already exists for some reason. + +f. Fixed a problem with the extended globbing code that made patterns like + `x+*' expand incorrectly. + +g. The prompt string expansion code no longer quotes tildes with backslashes. + +h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in + the presence of lstat(2) failures. + +i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'. + +j. The mail checking code now ensures that it has a valid default mailpath. + +k. A bug was fixed that caused local variables to be unset inappropriately + when sourcing a script from within another sourced script. + +l. A bug was fixed in the history saving code so that functions are saved + in the history list correctly if `cmdhist' is enabled, but `lithist' + is not. + +m. A bug was fixed that caused printf overflows when displaying error + messages. + +n. It should be easier to build the loadble builtins in examples/loadables, + though some manual editing of the generated Makefile is still required. + +o. The user's primary group is now always ${GROUPS[0]}. + +p. Some updates were made to support/config.guess from the GNU master copy. + +q. Some changes were made to the autoconf support for Solaris 2.6 large + files. + +r. The `command' builtins now does the right thing when confstr(3) cannot + find a value for _CS_PATH. + +s. Extended globbing expressions like `*.!(c)' are not history expanded if + `extglob' is enabled. + +t. Using the `-P' option to `cd' will force the value that is assigned to + PWD to not contain any symbolic links. + +2. Changes to Readline + +a. The code that prints completion listings now behaves better if one or + more of the filenames contains non-printable characters. + +b. The time delay when showing matching parentheses is now 0.5 seconds. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.02-alpha1, +and the previous version, bash-2.01.1-release. + +1. Changes to Bash + +a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x, + Solaris 2.6, SINIX SVR4. + +b. Changes were made to the generated `info' files so that `install-info' + works correctly. + +c. PWD is now auto-exported. + +d. A fix was made to the pipeline code to make sure that the shell forks + to execute simple commands consisting solely of assignment statements. + +e. Changes to the test suite for systems with 14-character filenames. + +f. The default sizes of some internal hash tables have been made smaller + to reduce the shell's memory footprint. + +g. The `((...))' arithmetic command is now executed directly instead of + being translated into `let "..."'. + +h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}", + and "${array[@]}" expand correctly when IFS does not contain a space + character, is unset, or is set to NULL. + +i. The indirect expansion code (${!var}) was changed so that the only + valid values of `var' are variable names, positional parameters, `#', + `@', and `*'. + +j. An arithmetic expression error in a $((...)) expansion now causes a + non-interactive shell running in posix mode to exit. + +k. Compound array assignment now splits the words within the parentheses + on shell metacharacters like the parser would before expansing them + and performing the assignment. This is for compatibility with ksh-93. + +l. The internal shell backslash-quoting code (used in the output of `set' + and completion) now quotes tildes if they appear at the start of the + string or after a `=' or `:'. + +m. A couple of bugs with `shopt -o' were fixed. + +n. `bash +o' now displays the same output as `set +o' before starting an + interactive shell. + +o. A bug that caused command substitution and the `eval' builtin to + occasionally free memory twice when an error was encountered was fixed. + +p. The filename globbing code no longer requires read permission for a + directory when the filename to be matched does not contain any globbing + characters, as POSIX.2 specifies. + +q. A bug was fixed so that the job containing the last asynchronous + process is not removed from the job table until a `wait' is executed + for that process or another asynchronous process is started. This + satisfies a POSIX.2 requirement. + +r. A `select' bug was fixed so that a non-numeric user response is treated + the same as a numeric response that is out of range. + +s. The shell no longer parses the value of SHELLOPTS from the environment + if it is restricted, running setuid, or running in `privileged mode'. + +t. Fixes were made to enable large file support on systems such as + Solaris 2.6, where the size of a file may be larger than can be held + in an `int'. + +u. The filename hashing code was fixed to not add `./' to the beginning of + filenames which already begin with `./'. + +v. The configure script was changed so that the GNU termcap library is not + compiled in if `prefer-curses' has been specified. + +w. HISTCONTROL and HISTIGNORE are no longer applied to the second and + subsequent lines of a multi-line command. + +x. A fix was made to `disown' so that it does a better job of catching + out-of-range jobs. + +y. Non-interactive shells no longer report the status of processes terminated + due to SIGINT, even if the standard output is a terminal. + +z. A bug that caused the output of `jobs' to have extra carriage returns + was fixed. + +aa. A bug that caused PIPESTATUS to not be set when builtins or shell + functions were executed in the foreground was fixed. + +bb. Bash now attempts to detect when it is being run by sshd, and treats + that case identically to being run by rshd. + +cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell + options was changed was fixed. + +dd. The `kill' builtin now disallows empty or missing process id arguments + instead of treating them as identical to `0', which means the current + process. + +ee. `var=value declare -x var' now behaves identically to + `var=value export var'. Similarly for `var=value declare -r var' and + `var=value readonly var'. + +ff. A few memory leaks were fixed. + +gg. `alias' and `unalias' now print error messages when passed an argument + that is not an alias for printing or deletion, even when the shell is + not interactive, as POSIX.2 specifies. + +hh. `alias' and `alias -p' now return a status of 0 when no aliases are + defined, as POSIX.2 specifes. + +ii. `cd -' now prints the pathname of the new working directory if the shell + is interactive. + +jj. A fix was made so that the code that binds $PWD now copes with getcwd() + returning NULL. + +kk. `unset' now checks whether or not a function name it's trying to unset + is a valid shell identifier only when the shell is running in posix mode. + +ll. A change was made to the code that generates filenames for here documents + to make them less prone to name collisions. + +mm. The parser was changed so that `time' is recognized as a reserved word + only at the beginning of a pipeline. + +nn. The pathname canonicalization code was changed so that `//' is converted + into `/', but all other pathnames beginning with `//' are left alone, as + POSIX.2 specifies. + +oo. The `logout' builtin will no longer exit a non-interactive non-login + shell. + +2. Changes to Readline + +a. Fixed a problem in the readline test program rltest.c that caused a core + dump. + +b. The code that handles parser directives in inputrc files now displays + more error messages. + +c. The history expansion code was fixed so that the appearance of the + history comment character at the beginning of a word inhibits history + expansion for that word and the rest of the input line. + +3. New Features in Bash + +a. A new version of malloc, based on the older GNU malloc, that has many + changes, is more page-based, is more conservative with memory usage, + and does not `orphan' large blocks when they are freed. + +b. A new version of gmalloc, based on the old GLIBC malloc, with many + changes and range checking included by default. + +c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic + Regular Expression matching, including character classes, collating + symbols, equivalence classes, and support for case-insensitive pattern + matching. + +d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been + implemented, controlled by a new `shopt' option, `extglob'. + +e. There is a new ksh-like `[[' compound command, which implements + extended `test' functionality. + +f. There is a new `printf' builtin, implemented according to the POSIX.2 + specification. + +g. There is a new feature for command substitution: $(< filename) now expands + to the contents of `filename', with any trailing newlines removed + (equivalent to $(cat filename)). + +h. There are new tilde prefixes which expand to directories from the + directory stack. + +i. There is a new `**' arithmetic operator to do exponentiation. + +j. There are new configuration options to control how bash is linked: + `--enable-profiling', to allow bash to be profiled with gprof, and + `--enable-static-link', to allow bash to be linked statically. + +k. There is a new configuration option, `--enable-cond-command', which + controls whether or not the `[[' command is included. It is on by + default. + +l. There is a new configuration option, `--enable-extended-glob', which + controls whether or not the ksh extended globbing feature is included. + It is enabled by default. + +m. There is a new configuration #define in config.h.top that, when enabled, + will cause all login shells to source /etc/profile and one of the user- + specific login shell startup files, whether or not the shell is + interactive. + +n. There is a new invocation option, `--dump-po-strings', to dump + a shell script's translatable strings ($"...") in GNU `po' format. + +o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive + pattern matching when globbing filenames and using the `case' construct. + +p. There is a new `shopt' option, `huponexit', which, when enabled, causes + the shell to send SIGHUP to all jobs when an interactive login shell + exits. + +q. `bind' has a new `-u' option, which takes a readline function name as an + argument and unbinds all key sequences bound to that function in a + specified keymap. + +r. `disown' now has `-a' and `-r' options, to limit operation to all jobs + and running jobs, respectively. + +s. The `shopt' `-p' option now causes output to be displayed in a reusable + format. + +t. `test' has a new `-N' option, which returns true if the filename argument + has been modified since it was last accessed. + +u. `umask' now has a `-p' option to print output in a reusable format. + +v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...' + translation code. It expands to the character whose ascii code is NNN + in hexadecimal. + +w. The prompt string expansion code has a new `\r' escape sequence. + +x. The shell may now be cross-compiled for the CYGWIN32 environment on + a Unix machine. + +4. New Features in Readline + +a. There is now an option for `iterative' yank-last-arg handline, so a user + can keep entering `M-.', yanking the last argument of successive history + lines. + +b. New variable, `print-completions-horizontally', which causes completion + matches to be displayed across the screen (like `ls -x') rather than up + and down the screen (like `ls'). + +c. New variable, `completion-ignore-case', which causes filename completion + and matching to be performed case-insensitively. + +d. There is a new bindable command, `magic-space', which causes history + expansion to be performed on the current readline buffer and a space to + be inserted into the result. + +e. There is a new bindable command, `menu-complete', which enables tcsh-like + menu completion (successive executions of menu-complete insert a single + completion match, cycling through the list of possible completions). + +f. There is a new bindable command, `paste-from-clipboard', for use on Win32 + systems, to insert the text from the Win32 clipboard into the editing + buffer. + +g. The key sequence translation code now understands printf-style backslash + escape sequences, including \NNN octal escapes. These escape sequences + may be used in key sequence definitions or macro values. + +h. An `$include' inputrc file parser directive has been added. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.01.1-release, +and the previous version, bash-2.01-release. + +1. Changes to Bash + +a. The select command was fixed to check the validity of the user's + input more strenuously. + +b. A bug was fixed that prevented `time' from timing commands correctly + when supplied as an argument to `bash -c'. + +c. A fix was made to the mail checking code to keep from adding the same + mail file to the list of files to check multiple times when parsing + $MAILPATH. + +d. Fixed an off-by-one error in the tilde expansion library. + +e. When using the compound array assignment syntax, the old value of + the array is cleared before assigning the new value. + +f. Fixed a bug that could cause a core dump when a trap handler was reset + to the default in the trap command associated with that signal. + +g. Fixed a bug in the locale code that occurred when assigning a value + to LC_ALL. + +h. A change was made to the parser so that words of the form xxx=(...) + are not considered compound assignment statements unless there are + characters before the `='. + +i. A fix was made to the command tracing code to correctly quote each + word of output. + +j. Some changes were made to the bash-specific autoconf tests to make them + more portable. + +k. Completion of words with globbing characters now correctly quotes the + result. + +l. The directory /var/spool/mail is now preferred to /usr/spool/mail when + configure is deciding on the default mail directory. + +m. The brace completion code was fixed to not quote the `{' and `}'. + +n. Some fixes were made to make $RANDOM more random in subshells. + +o. System-specific changes were made to configure for: SVR4.2 + +p. Changes were made so that completion of words containing globbing chars + substitutes the result only if a single filename was matched. + +q. The window size is now recomputed after a job is stopped with SIGTSTP if + the user has set `checkwinsize' with `shopt'. + +r. When doing substring expansion, out-of-range substring specifiers now + cause nothing to be substituted rather than an expansion error. + +s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' -- + only `EXIT' and `DEBUG' are accepted. + +t. The display of trapped signals now uses the signal number if signals + for which bash does not know the name are trapped. + +u. A fix was made so that `bash -r' does not turn on restricted mode until + after the startup files are executed. + +v. A bug was fixed that occasionally caused a core dump when a variable + found in the temporary environment of export/declare/readonly had a + null value. + +w. A bug that occasionally caused unallocated memory to be passed to free() + when doing arithmetic substitution was fixed. + +x. A bug that caused a buffer overrun when expanding a prompt string + containing `\w' and ${#PWD} exceeded PATH_MAX was fixed. + +y. A problem with the completion code that occasionally caused it to + refer to a character before the beginning of the readline line buffer + was fixed. + +z. A bug was fixed so that the `read' builtin restarts reads when + interrupted by signals other than SIGINT. + +aa. Fixed a bug that caused a command to be freed twice when there was + an evaluation error in the `eval' command. + +2. Changes to Readline + +a. Added a missing `extern' to a declaration in readline.h that kept + readline from compiling cleanly on some systems. + +b. The history file is now opened with mode 0600 when it is written for + better security. + +c. Changes were made to the SIGWINCH handling code so that prompt redisplay + is done better. + +d. ^G now interrupts incremental searches correctly. + +e. A bug that caused a core dump when the set of characters to be quoted + when completing words was empty was fixed. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.01-release, +and the previous version, bash-2.01-beta2. + +1. Changes to Bash + +a. The `distclean' target should remove the `printenv' executable if it + has been created. + +b. The test suite was changed slightly to ensure that the error messages + are printed in English. + +c. A bug that caused the shell to dump core when a filename containing a + `/' was passed to `hash' was fixed. + +d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1 + requires. + +e. A memory leak when completing commands was fixed. + +f. A memory leak that occurred when checking the hash table for commands + with relative paths was fixed. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.01-beta2, +and the previous version, bash-2.01-beta1. + +1. Changes to Bash + +a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if + the current (soft) limit is less than or equal to the hard limit. + +b. Fixed a bug that caused the bash emulation of strcasecmp to produce + incorrect results. + +c. A bug that caused memory to be freed twice when a trap handler resets + the trap more than once was fixed. + +d. A bug that caused machines where sizeof (pointer) > sizeof (int) to + fail (and possibly dump core) when trying to unwind-protect a null + pointer was fixed. + +e. The startup files should not be run with job control enabled. This fix + allows SIGINT to once again interrupt startup file execution. + +f. Bash should not change the SIGPROF handler if it is set to something + other than SIG_DFL. + +g. The completion code that provides bash-specific completions for readline + now quotes characters that the readline code would treat as word break + characters if they appear in a file name. + +h. The completion code now correctly quotes filenames containing a `!', + even if the user attempted to use double quotes when attempting + completion. + +i. A bug that caused the shell to dump core when `disown' was called without + arguments and there was no current job was fixed. + +j. A construct like $((foo);bar) is now processed as a command substitution + rather than as a bad arithmetic substitution. + +k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist' + shell options when editing and re-executing a series of commands were + fixed. + +l. A fix was made to the grammar -- the list of commands between `do' and + `done' in the body of a `for' command should be treated the same as a + while loop. + +2. Changes to Readline + +a. A couple of bugs that caused the history search functions to attempt to + free a NULL pointer were fixed. + +b. If the C library provides setlocale(3), readline does not need to look + at various environment variables to decide whether or not to go into + eight-bit mode automatically -- just check whether the current locale + is not `C' or `POSIX'. + +c. If the filename completion function finds that a directory was not closed + by a previous (interrupted) completion, it closes the directory with + closedir(). + +3. New Features in Bash + +a. New bindable readline commands: history-and-alias-expand-line and + alias-expand-line. The code was always in there, there was just no + way to execute it. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.01-beta1, +and the previous version, bash-2.01-alpha1. + +1. Changes to Bash + +a. Fixed a problem that could cause file descriptors used for process + substitution to conflict with those used explicitly in redirections. + +b. Made it easier to regenerate configure if the user changes configure.in. + +c. ${GROUPS[0]} should always be the primary group, even on systems without + multiple groups. + +d. Spelling correction is no longer enabled by default. + +e. Fixes to quoting problems in `bashbug'. + +f. OS-specific configuration changes were made for: Irix 6. + +g. OS-specific code changes were made for: QNX. + +h. A more meaningful message is now printed when the file in /tmp for a + here document cannot be created. + +i. Many changes to the shell's variable initialization code to speed + non-interactive startup. + +j. Changes to the non-job-control code so that it does not try to open + /dev/tty. + +k. The output of `set' and `export' is once again sorted, as POSIX wants. + +l. Fixed a problem caused by a recursive call reparsing the value of + $SHELLOPTS. + +m. The tilde code no longer calls getenv() when it's compiled as part of + the shell, which should eliminate problems on systems that cannot + redefine getenv(), like the NeXT OS. + +n. Fixed a problem that caused `bash -o' or `bash +o' to not list all + the shell options. + +o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit + only if the hard limit is greater than the current (soft) limit. + +p. Fixed a problem that arose when building bash in a different directory + than the source and y.tab.[ch] were remade with something other than + bison. This came up most often on NetBSD. + +q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated + an unfinished command completion (`/), which generated errors. + +r. The bash special tilde expansions (~-, ~+) are now attempted before + calling the standard tilde expansion code, which should eliminate the + problems people have been seeing with this on Solaris 2.5.1. + +s. Added support for to places where it was missing. + +t. Changed the code that reads the output of a command substitution to not + go through stdio. This reduces the memory requirements and is faster. + +u. A number of changes to speed up export environment creation were made. + +v. A number of memory leaks were fixed as the result of running the test + scripts through Purify. + +w. Fixed a bug that caused subshells forked to interpret executable + scripts without a leading `#!' to not reinitialize the values of + the shell options. + +2. Changes to Readline + +a. History library has less `#ifdef SHELL' code -- abstracted stuff out + into application-specific function hooks. + +b. Readline no longer calls getenv() if it's compiled as part of the shell, + which should eliminate problems on systems that cannot redefine getenv(), + like the NeXT OS. + +c. Fixed translation of ESC when `untranslating' macro values. + +d. The region kill operation now fixes the mark if it ends up beyond the + boundaries of the line after the region is deleted. + +3. New Features in Bash + +a. New argument for `configure': `--with-curses'. This can be used to + override the selection of the termcap library on systems where it is + deficient. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.01-alpha1, +and the previous version, bash-2.0-release. + +1. Changes to Bash + +a. System-specific configuration changes for: FreeBSD, SunOS4, Irix, + MachTen, QNX 4.2, Harris Night Hawk, SunOS5. + +b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2, + HP-UX, AIX 4.2. + +c. A bug that caused the exec builtin to fail because the full pathname of + the command could not be found was fixed. + +d. The code that performs output redirections is now more resistant to + race conditions and possible security exploits. + +e. A bug that caused the shell to dump core when performing pattern + substitutions on variable values was fixed. + +f. More hosts are now recognized by the auto-configuration mechanism + (OpenBSD, QNX, others). + +g. Assignments to read-only variables that attempt to convert them to + arrays are now errors. + +h. A bug that caused shell scripts using array assignments in POSIX mode + to exit after the assignment was performed was fixed. + +i. The substring expansion code is now more careful about running off the + ends of the expanded variable value. + +j. A bug that caused completion to fail if a backquoted command substitution + appeared anywhere on the line was fixed. + +k. The `source' builtin no longer turns off history if it has been enabled + in a non-interactive shell. + +l. A bug that caused the shell to crash when `disown' was given a pid + instead of a job number was fixed. + +m. The `cd' spelling correction code will not try to change to `.' if no + directory entries match a single-character argument. + +n. A bad variable name supplied to `declare', `export', or `readonly' no + longer causes a non-interactive shell in POSIX mode to exit. + +o. Some fixes were made to the test suite to handle peculiarities of + various Unix versions. + +p. The bash completion code now quotes characters that readline would + treat as word breaks for completion but are not shell metacharacters. + +q. Bad options supplied at invocation now cause a usage message to be + displayed. + +r. Fixes were made to the code that handles DEBUG traps so that the trap + string is not freed inappropriately. + +s. Some changes were made to the bash debugger in examples/bashdb -- it + should be closer to working now. + +t. A problem that caused the default filename used for mail checking to be + wrong was fixed. + +u. A fix was made to the `echo' builtin so that NUL characters printed with + `echo -e' do not cause the output to be truncated. + +v. A fix was made to the job control code so that the shell behaves better + when monitor mode is enabled in a non-interactive shell. + +w. Bash no longer catches all of the terminating signals in a non- + interactive shell until a trap is set on EXIT, which should result in + quicker startup. + +x. A fix was made to the command timing code so that `time' can be used in + a loop. + +y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as + a nested subshell rather than strictly as an (erroneous) arithmetic + command. + +z. A fix was made to the globbing code so that it correctly matches quoted + filenames beginning with a `.'. + +aa. A bug in `fc' that caused some multi-line commands to not be stored as + one command in the history when they were re-executed after editing + (with `fc -e') was fixed. + +bb. The `ulimit' builtin now attempts to catch some classes of integer + overflows. + +cc. The command-oriented-history code no longer attempts to add `;' + inappropriately when a newline appears while reading a $(...) command + substitution. + +dd. A bug that caused the shell to dump core when `help --' was executed + was fixed. + +ee. A bug that caused the shell to crash when an unset variable appeared + in the body of a here document after `set -u' had been executed was + fixed. + +ff. Implicit input redirections from /dev/null for asynchronous commands + are now handled better. + +gg. A bug that caused the shell to fail to compile when configured with + `--disable-readline' was fixed. + +hh. The globbing code should now be interruptible. + +ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a + stopped job and adjusts the data structures accordingly, as if `bg' had + been executed instead. + +jj. A bug that caused the shell to crash when mixing calls to `getopts' + and `shift' on the same set of positional parameters was fixed. + +kk. The command printing code now preserves the `-p' flag to `time'. + +ll. The command printing code now handles here documents better when there + are other redirections associated with the command. + +mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_) + is no longer placed into the environment of executed commands -- users + of glibc had too many problems with it. + +nn. Reorganized the code that generates signames.h. The signal_names list + is now more complete but may be slightly different (SIGABRT is favored + over SIGIOT, for example). The preferred signal names are those + listed in the POSIX.2 standard. + +oo. `bashbug' now uses a filename shorter than 14 characters for its + temporary file, and asks for confirmation before sending the bug + report. + +pp. A bug that caused TAB completion in vi editing mode to not be turned + off when `set -o posix' was executed or back on when `set +o posix' + was executed was fixed. + +qq. A bug in the brace expansion code that caused brace expansions appearing + in new-style $(...) command substitutions to be inappropriately expanded + was fixed. + +rr. A bug in the readline hook shell-expand-line that could cause memory to + be inappropriately freed was fixed. + +ss. A bug that caused some arithmetic expressions containing `&&' and `||' + to be parsed with the wrong precedence has been fixed. + +tt. References to unbound variables after `set -u' has been executed now + cause the shell to exit immediately, as they should. + +uu. A bug that caused the shell to exit inappropriately when `set -e' had + been executed and a command's return status was being inverted with the + `!' reserved word was fixed. + +vv. A bug that could occasionally cause the shell to crash with a + divide-by-zero error when timing a command was fixed. + +ww. A bug that caused parameter pattern substitution to leave stray + backslashes in the replacement string when the expression is in + double quotes was fixed. + +xx. The `break' and `continue' builtins now break out of all loops when an + invalid count argument is supplied. + +yy. Fixed a bug that caused PATH to be set to the empty string if + `command -p' is executed with PATH unset. + +zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix, + as POSIX specifies. + +aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS + if there were no shell options set. + +bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX + mode, their output is as POSIX.2 specifies. + +ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually + creates an array variable. + +ddd. Fixed a bug that prevented `time' from correctly timing background + pipelines. + +2. Changes to Readline + +a. A bug that caused an extra newline to be printed when the cursor was on + an otherwise empty line was fixed. + +b. An instance of memory being used after it was freed was corrected. + +c. The redisplay code now works when the prompt is longer than the screen + width. + +d. `dump-macros' is now a bindable name, as it should have been all along. + +e. Non-printable characters are now expanded when displaying macros and + their values. + +f. The `dump-variables' and `dump-macros' commands now output a leading + newline if they're called as the result of a key sequence, rather + than directly by an application. + +3. New Features in Bash + +a. There is a new builtin array variable: GROUPS, the set of groups to which + the user belongs. This is used by the test suite. + +4. New Features in Readline + +a. If a key sequence bound to `universal-argument' is read while reading a + numeric argument started with `universal-argument', it terminates the + argument but is otherwise ignored. This provides a way to insert multiple + instances of a digit string, and is how GNU emacs does it. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.0-release, +and the previous version, bash-2.0-beta3. + +1. Changes to Bash + +a. Fix to the `getopts' builtin so that it does the right thing when a + required option argument is not present. + +b. The completion code now updates the common prefix of matched names + after FIGNORE processing is done, since any names that were removed + may have changed the common prefix. + +c. Fixed a bug that made messages in MAILPATH entries not work correctly. + +d. Fixed a serious documentation error in the description of the new + ${parameter:offset[:length]} expansion. + +e. Fixes to make parameter substring expansion ({$param:offset[:length]}) + work when within double quotes. + +f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional + parameters. + +g. Corrected a misspelling of `unlimited' in the output of `ulimit'. + +h. Fixed a bug that caused executable scripts without a leading `#!' to + occasionally pick up the wrong set of positional parameters. + +i. Linux systems now have a working `ulimit -v', using RLIMIT_AS. + +j. Updated config.guess so that many more machine types are recognized. + +k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]} + expansion. + +l. If the shell is named `-su', and `-c command' is supplied, read and + execute the login shell startup files even though the shell is not + interactive. This is to support the `-' option to `su'. + +m. Fixed a bug that caused core dumps when the DEBUG trap was ignored + with `trap "" DEBUG' and a shell function was subsequently executed. + +n. Fixed a bug that caused core dumps in the read builtin when IFS was + set to the null string and the input had leading whitespace. + +2. Changes to Readline + +a. Fixed a bug that caused a numeric argument of 1024 to be ignored when + inserting text. + +b. Fixed the display code so that the numeric argument is displayed as it's + being entered. + +c. Fixed the numeric argument reading code so that `M-- command' is + equivalent to `M--1 command', as the prompt implies. + +3. New Features in Bash + +a. `ulimit' now sets both hard and soft limits and reports the soft limit + by default (when neither -H nor -S is specified). This is compatible + with versions of sh and ksh that implement `ulimit'. + +b. Integer constants have been extended to base 64. + +4. New Features in Readline + +a. The `home' and `end' keys are now bound to beginning-of-line and + end-of-line, respectively, if the corresponding termcap capabilities + are present. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.0-beta3, +and the previous version, bash-2.0-beta2. + +1. Changes to Bash + +a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX. + +b. When in POSIX mode, variable assignments preceding a special builtin + persist in the shell environment after the builtin completes. + +c. Changed all calls to getwd() to getcwd(). Improved check for systems + where the libc getcwd() calls popen(), since that breaks on some + systems when job control is being used. + +d. Fixed a bug that caused seg faults when executing scripts with the + execute bit set but without a leading `#!'. + +e. The environment passed to executed commands is never sorted. + +f. A bug was fixed in the code that expands ${name[@]} to the number of + elements in an array variable. + +g. A bug was fixed in the array compound assignment code ( A=( ... ) ). + +h. Window size changes now correctly propagate down to readline if + the shopt `checkwinsize' option is enabled. + +i. A fix was made in the code that expands to the length of a variable + value (${#var}). + +j. A fix was made to the command builtin so that it did not turn on the + `no fork' flag inappropriately. + +k. A fix was made to make `set -n' work more reliably. + +l. A fix was made to the job control initialization code so that the + terminal process group is set to the shell's process group if the + shell changes its own process group. + +2. Changes to Readline + +a. System-specific changes for: SCO 3.2v[45]. + +b. The behavior of the vi-mode `.' when redoing an `i' command was changed + to insert the text previously inserted by the `i' command rather than + simply entering insert mode. + +3. New features in Bash + +a. There is a new version of the autoload function package, in + examples/functions/autoload.v2, that uses arrays and provides more + functionality. + +b. Support for LC_COLLATE and locale-specific sorting of the results of + pathname expansion if strcoll() is available. + +4. New Features in Readline + +a. Support for locale-specific sorting of completion possibilities if + strcoll() is available. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.0-beta2, +and the previous version, bash-2.0-beta1. + +1. Changes to Bash + +a. `pushd -' is once again equivalent to `pushd $OLDPWD'. + +b. OS-specific changes for: SCO 3.2v[45]. + +c. A change was made to the fix for the recently-reported security hole + when reading characters with octal value 255 to make it work better on + systems with restartable system calls when not using readline. + +d. Some changes were made to the test suite so that it works if you + configure bash with --enable-usg-echo-default. + +e. A fix was made to the parsing of conditional arithmetic expressions. + +f. Illegal arithmetic bases now cause an arithmetic evaluation error rather + than being silently reset. + +g. Multiple arithmetic bases now cause an arithmetic evaluation error + instead of being ignored. + +h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2. + +i. A bug that sometimes caused array indices to be evaluated twice (which + would cause errors when they contained assignment statements) was fixed. + +j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning + unsigned values and to simplify the code. + +k. A bug in the command-oriented-history code that caused it to sometimes + put semicolons after right parens inappropriately was fixed. + +l. The values inserted into the prompt by the \w and \W escape sequences + are now quoted to prevent further expansion. + +m. An interactive shell invoked as `sh' now reads and executes commands + from the file named by $ENV when it starts up. If it's a login shell, + it does this after reading /etc/profile and ~/.profile. + +n. The file named by $ENV is never read by non-interactive shells. + +2. Changes to Readline + +a. A few changes were made to hide some macros and functions that should not + be public. + +b. An off-by-one error that caused seg faults in the history expansion code + was fixed. + +3. New Features in Bash + +a. The ksh-style ((...)) arithmetic command was implemented. It is exactly + identical to let "...". This is controlled by a new option to configure, + `--enable-dparen-arithmetic', which is on by default. + +b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If + defined to a filename, bash reads and executes commands from that file + when a login shell exits. It's commented out by default. + +c. `ulimit' has a `-l' option that reports the maximum amount of data that + may be locked into memory on 4.4BSD-based systems. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.0-beta1, +and the previous version, bash-2.0-alpha4. + +1. Changes to Bash + +a. A bug that sometimes caused traps to be ignored on signals the + shell treats specially was fixed. + +b. The internationalization code was changed to track the values of + LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN + and TEXTDOMAINDIR variables are also tracked; changes cause calls + to textdomain() and bindtextdomain(), if available. + +c. A bug was fixed that sometimes caused double-quoted strings to be + parsed incorrectly. + +d. Changes were made so that the siglist code compiles correctly on + Solaris 2.5. + +e. Added `:' to the set of characters that cause word breaks for the + completion code so that pathnames in assignments to $PATH can be + completed. + +f. The `select' command was fixed to print $PS3 to stderr. + +g. Fixed an error in the manual page section describing the effect that + setting and unsetting GLOBIGNORE has on the setting of the `dotglob' + option. + +h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC + on systems without gettimeofday() and resources. + +i. The getopt static variables are now initialized each time a subshell + is started, so subshells using `getopts' work right. + +j. A sign-extension bug that caused a possible security hole was fixed. + +k. The parser now reads characters between backquotes within a double- + quoted string as a single word, so double quotes in the backquoted + string don't terminate the enclosing double-quoted string. + +l. A bug that caused `^O' to work incorrectly when typed as the first + thing to an interactive shell was fixed. + +m. A rarely-exercised off-by-one error in the code that quotes variable + values was fixed. + +n. Some memory and file descriptor leaks encountered when running a + shell script that is executable but does not have a leading `#!' + were plugged. + +2. Changes to Readline + +a. A bug that sometimes caused incorrect results when trying to read + typeahead on systems without FIONREAD was fixed. + +3. New Features in Bash + +a. The command timing code now uses the value of the TIMEFORMAT variable + to format and display timing statistics. + +b. The `time' reserved word now accepts a `-p' option to force the + POSIX.2 output format. + +c. There are a couple of new and updated scripts to convert csh startup + files to bash format. + +d. There is a new builtin array variable: BASH_VERSINFO. The various + members hold the parts of the version information in BASH_VERSION, + plus the value of MACHTYPE. + +4. New Features in Readline + +a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter + eight-bit mode. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.0-alpha4, +and the previous version, bash-2.0-alpha3. + +1. Changes to Bash + +a. There is better detection of rsh connections on Solaris 2. + +b. Assignments to read-only variables preceding a command name are now + variable assignment errors. Variable assignment errors cause + non-interactive shells running in posix mode to exit. + +c. The word tokenizer was rewritten to handle nested quotes and pairs + ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...)) + correctly. Some of the parameter expansion code was updated as a + consequence. + +d. A fix was made to `test' when given three arguments so that a binary + operator is checked for first, before checking that the first argument + is `!'. + +e. 2''>/dev/null is no longer equivalent to 2>/dev/null. + +f. Parser error messages were regularized, and in most cases the name of + the shell script being read by a non-interactive shell is not printed + twice. + +g. A fix was made to the completion code so that it no longer removes the + text the user typed in some cases. + +h. The special glibc `getopt' environment variable is no longer put into + the environment on machines with small values of ARG_MAX. + +i. The expansion of ${...} now follows the POSIX.2 rules for finding the + closing `}'. + +j. The shell no longer displays spurious status messages for background + jobs in shell scripts that complete successfully when the script is + run from a terminal. + +k. `shopt -o' now correctly updates $SHELLOPTS. + +l. A bug that caused the $PATH searching code to return a non-executable + file even when an executable file with the same name appeared later in + $PATH was fixed. + +m. The shell now does tilde expansions on unquoted `:~' in assignment + statements when not in posix mode. + +n. Variable assignment errors when a command consists only of assignments + now cause non-interactive shells to exit when in posix mode. + +o. If the variable in a `for' or `select' command is read-only, or not a + legal shell identifier, a variable assignment error occurs. + +p. `test' now handles `-a' and `-o' as binary operators when three arguments + are supplied, and correctly parses `( word )' as equivalent to `word'. + +q. `test' was fixed so that file names of the form /dev/fd/NN mean the same + thing on all systems, even Linux. + +r. Fixed a bug in the globbing code that caused patterns with multiple + consecutive `*'s to not be matched correctly. + +s. Fixed a bug that caused $PS2 to not be printed when an interactive shell + not using readline is reading a here document. + +t. Fixed a bug that caused history expansion to be performed inappropriately + when a single-quoted string spanned more than one line. + +u. `getopts' now checks that the variable name passed by the user as the + second argument is a legal shell identifier and that the variable is + not read-only. + +v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it + encounters an error. + +w. Fixed `set' to display variable values in a form that can be re-read. + +x. Fixed a bug in the code that keeps track of whether or not local variables + have been declared at the current level of function nesting. + +y. Non-interactive shells in posix mode now exit if the name in a function + declaration is not a legal identifier. + +z. The job control code now ignores stopped children when the shell is not + interactive. + +aa. The `cd' builtin no longer attempts spelling correction on the directory + name if the shell is not interactive, regardless of the setting of the + `cdspell' option. + +bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2. + +cc. `time' now prints its output to stderr, as POSIX.2 specifies. + +2. Fixes to Readline + +a. After printing possible completions, all lines of a multi-line prompt + are redisplayed. + +b. Some changes were made to the terminal handling code in rltty.c to + work around AIX 4.2 bugs. + +3. New Features in Bash + +a. There is a new loadable builtin: sprintf, with calling syntax + sprintf var format [args] + This provides an easy way to simulate ksh left- and right-justified + variable values. + +b. The expansions of \h and \H in prompt strings were swapped. \h now + expands to the hostname up to the first `.', as in bash-1.14. + +4. New Features in Readline + +a. The bash-1.14 behavior when ^M is typed while doing an incremental + search was restored. ^J may now be used to terminate the search without + accepting the line. + +b. There is a new bindable variable: disable-completion. This inhibits + word completion and causes the completion character to be inserted as + if it had been bound to self-insert. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-2.0-alpha3, +and the previous version, bash-2.0-alpha2. + +There is now a file `COMPAT' included in the distribution that lists the +user-visible incompatibilities between 1.14 and 2.0. + +1. Changes to Bash + +a. Some work was done so that word splitting of the rhs of assignment + statements conforms more closely to historical practice. + +b. A couple of errant memory frees were fixed. + +c. A fix was made to the test builtin so it recognizes `<' and `>' as + binary operators. + +d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's + allocated and freed. This is to catch callers that refer to freed + memory or assume something about newly-allocated memory. + +e. Fixed a problem with conversion to 12-hour time in the prompt + expansion code. + +f. Fixed a problem with configure's argument parsing order. Now you can + correctly turn on specific options after using --enable-minimal-config. + +g. The configure script now automatically disables the use of GNU malloc + on systems where it's appropriate (better than having people read the + NOTES file and do it manually). + +h. There are new prompt expansions (\v and \V) to insert version information + into the prompt strings. + +i. The default prompt string now includes the version number. + +j. Most of the builtins that take no options were changed to use the + internal getopt so they can produce proper error messages for -? + and incorrect options. + +k. Some system-specific changes were made for SVR4.2 and Solaris 2.5. + +l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of + MAXNAMLEN. + +m. A couple of problems caused by uninitialized variables were fixed. + +n. There are a number of new loadable builtin examples: logname, basename, + dirname, tty, pathchk, tee, head, and rmdir. All of these conform to + POSIX.2. + +o. Bash now notices changes in TZ and calls tzset() if present, so + changing TZ will alter the time printed by prompt expansions. + +p. The source was reorganized a bit so I don't have to wait so long for + some files to compile, and to facilitate the creation of a `shell + library' at some future point. + +q. Bash no longer turns off job control if called as `sh', since the + POSIX.2 spec includes job control as a standard feature. + +r. `bash -o posix' now works as intended. + +s. Fixed a problem with the completion code: when completing a filename + that contained globbing characters, if show-all-if-ambiguous was set, + the completion code would remove the user's text. + +t. Fixed ulimit so that (hopefully) the full range of limits is available + on HPUX systems. + +u. A new `shopt' option (`hostcomplete') enables and disables hostname + completion. + +v. The shell no longer attempts to save the history on an abort(), + which is usually called by programming_error(). + +w. The `-s' option to `fc' was changed to echo the command to be executed + to stderr instead of stdout. + +x. If the editor invoked by `fc -e' exits with a non-zero status, no + commands are executed. + +y. Fixed a bug that made the shopt `histverify' option work incorrectly. + +z. There is a new variable `MACHTYPE' whose value is the GNU-style + `cpu-company-system' system description as set by configure. (The + values of MACHTYPE and HOSTTYPE should really be swapped.) + +aa. The `ulimit' builtin now allows the maximum virtual memory size to be + set via setrlimit(2) if RLIMIT_VMEM is defined. + +bb. `bash -nc 'command'' no longer runs `command'. + +2. Changes to Readline + +a. Fixed a typo in the code that checked for FIONREAD in input.c. + +b. Fixed a bug in the code that outputs keybindings, so things like C-\ + are quoted properly. + +c. Fixed a bug in the inputrc file parsing code to handle the problems + caused by inputrc files created from the output of `bind -p' in + previous versions of bash. The problem was due to the bug fixed + in item b above. + +d. Readline no longer turns off the terminal's meta key, and turns it on + once the first time it's called. + +------------------------------------------------------------------------------ +This file documents the changes between this version, bash-2.0-alpha2, +and the previous version, bash-2.0-alpha. + +1. Changes to Bash + +a. The shell no longer thinks directories are executable. + +b. `disown' has a new option, `h', which inhibits the resending of SIGHUP + but does not remove the job from the jobs table. + +c. The varargs functions in error.c now use ANSI-C `stdarg' if available. + +d. The build process now treats the `build version' in .build as local to + the build directory, so different versions built from the same source + tree have different `build versions'. + +e. Some problems with the grammar have been fixed. (It used `list' in a few + productions where `compound_list' was needed. A `list' must be terminated + with a newline or semicolon; a `compound_list' need not be.) + +f. A fix was made to keep `wait' from hanging when waiting for all background + jobs. + +g. `bash --help' now writes its output to stdout, like the GNU Coding Standards + specify, and includes the machine type (the value of MACHTYPE). + +h. `bash --version' now prints more information and exits successfully, like + the GNU Coding Standards specify. + +i. The output of `time' and `times' now prints fractional seconds with three + places after the decimal point. + +j. A bug that caused process substitutions to screw up the pipeline printed + by `jobs' was fixed. + +k. Fixes were made to the code that implements $'...' and $"..." so they + work as documented. + +l. The process substitution code now opens named pipes for reading with + O_NONBLOCK to avoid hanging. + +m. Fixes were made to the trap code so the shell cleans up correctly if the + trap command contains a `return' and we're executing a function or + sourcing a script with `.'. + +n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the + documentation (ps, dvi, etc.) on a `make install'. + +o. Fixed an auto-increment error that caused bash -c args to sometimes dump + core. + +p. Fixed a bug that caused $HISTIGNORE to fail when the history line + contained globbing characters. + +2. Changes to Readline + +a. There is a new string variable, rl_library_version, available for use by + applications. The current value is "2.1". + +b. A bug encountered when expand-tilde was enabled and file completion was + attempted on a word beginning with `~/' was fixed. + +c. A slight change was made to the incremental search termination behavior. + ESC still terminates the search, but if input is pending or arrives + within 0.1 seconds (on systems with select(2)), it is used as a prefix + character. This is intended to allow users to terminate searches with + the arrow keys and get the behavior they expect. diff --git a/bash-5.1/COMPAT b/bash-5.1/COMPAT new file mode 100644 index 0000000000000000000000000000000000000000..5cfb83600c51a93ce58ec5ef4974028645427c73 --- /dev/null +++ b/bash-5.1/COMPAT @@ -0,0 +1,552 @@ +Compatibility with previous versions +==================================== + +This document details the incompatibilities between this version of bash, +bash-5.1, and the previous widely-available versions, bash-3.2 (which is +still the `standard' version for Mac OS X), 4.2/4.3 (which are still +standard on a few Linux distributions), and bash-4.4/bash-5.0, the current +widely-available versions. These were discovered by users of bash-2.x +through 5.x, so this list is not comprehensive. Some of these +incompatibilities occur between the current version and versions 2.0 and +above. + +1. Bash uses a new quoting syntax, $"...", to do locale-specific + string translation. Users who have relied on the (undocumented) + behavior of bash-1.14 will have to change their scripts. For + instance, if you are doing something like this to get the value of + a variable whose name is the value of a second variable: + + eval var2=$"$var1" + + you will have to change to a different syntax. + + This capability is directly supported by bash-2.0: + + var2=${!var1} + + This alternate syntax will work portably between bash-1.14 and bash-2.0: + + eval var2=\$${var1} + +2. One of the bugs fixed in the YACC grammar tightens up the rules + concerning group commands ( {...} ). The `list' that composes the + body of the group command must be terminated by a newline or + semicolon. That's because the braces are reserved words, and are + recognized as such only when a reserved word is legal. This means + that while bash-1.14 accepted shell function definitions like this: + + foo() { : } + + bash-2.0 requires this: + + foo() { :; } + + This is also an issue for commands like this: + + mkdir dir || { echo 'could not mkdir' ; exit 1; } + + The syntax required by bash-2.0 is also accepted by bash-1.14. + +3. The options to `bind' have changed to make them more consistent with + the rest of the bash builtins. If you are using `bind -d' to list + the readline key bindings in a form that can be re-read, use `bind -p' + instead. If you were using `bind -v' to list the key bindings, use + `bind -P' instead. + +4. The `long' invocation options must now be prefixed by `--' instead + of `-'. (The old form is still accepted, for the time being.) + +5. There was a bug in the version of readline distributed with bash-1.14 + that caused it to write badly-formatted key bindings when using + `bind -d'. The only key sequences that were affected are C-\ (which + should appear as \C-\\ in a key binding) and C-" (which should appear + as \C-\"). If these key sequences appear in your inputrc, as, for + example, + + "\C-\": self-insert + + they will need to be changed to something like the following: + + "\C-\\": self-insert + +6. A number of people complained about having to use ESC to terminate an + incremental search, and asked for an alternate mechanism. Bash-2.03 + uses the value of the settable readline variable `isearch-terminators' + to decide which characters should terminate an incremental search. If + that variable has not been set, ESC and Control-J will terminate a + search. + +7. Some variables have been removed: MAIL_WARNING, notify, history_control, + command_oriented_history, glob_dot_filenames, allow_null_glob_expansion, + nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and + cdable_vars. Most of them are now implemented with the new `shopt' + builtin; others were already implemented by `set'. Here is a list of + correspondences: + + MAIL_WARNING shopt mailwarn + notify set -o notify + history_control HISTCONTROL + command_oriented_history shopt cmdhist + glob_dot_filenames shopt dotglob + allow_null_glob_expansion shopt nullglob + nolinks set -o physical + hostname_completion_file HOSTFILE + noclobber set -o noclobber + no_exit_on_failed_exec shopt execfail + cdable_vars shopt cdable_vars + +8. `ulimit' now sets both hard and soft limits and reports the soft limit + by default (when neither -H nor -S is specified). This is compatible + with versions of sh and ksh that implement `ulimit'. The bash-1.14 + behavior of, for example, + + ulimit -c 0 + + can be obtained with + + ulimit -S -c 0 + + It may be useful to define an alias: + + alias ulimit="ulimit -S" + +9. Bash-2.01 uses a new quoting syntax, $'...' to do ANSI-C string + translation. Backslash-escaped characters in ... are expanded and + replaced as specified by the ANSI C standard. + +10. The sourcing of startup files has changed somewhat. This is explained + more completely in the INVOCATION section of the manual page. + + A non-interactive shell not named `sh' and not in posix mode reads + and executes commands from the file named by $BASH_ENV. A + non-interactive shell started by `su' and not in posix mode will read + startup files. No other non-interactive shells read any startup files. + + An interactive shell started in posix mode reads and executes commands + from the file named by $ENV. + +11. The <> redirection operator was changed to conform to the POSIX.2 spec. + In the absence of any file descriptor specification preceding the `<>', + file descriptor 0 is used. In bash-1.14, this was the behavior only + when in POSIX mode. The bash-1.14 behavior may be obtained with + + <>filename 1>&0 + +12. The `alias' builtin now checks for invalid options and takes a `-p' + option to display output in POSIX mode. If you have old aliases beginning + with `-' or `+', you will have to add the `--' to the alias command + that declares them: + + alias -x='chmod a-x' --> alias -- -x='chmod a-x' + +13. The behavior of range specificiers within bracket matching expressions + in the pattern matcher (e.g., [A-Z]) depends on the current locale, + specifically the value of the LC_COLLATE environment variable. Setting + this variable to C or POSIX will result in the traditional ASCII behavior + for range comparisons. If the locale is set to something else, e.g., + en_US (specified by the LANG or LC_ALL variables), collation order is + locale-dependent. For example, the en_US locale sorts the upper and + lower case letters like this: + + AaBb...Zz + + so a range specification like [A-Z] will match every letter except `z'. + Other locales collate like + + aAbBcC...zZ + + which means that [A-Z] matches every letter except `a'. + + The portable way to specify upper case letters is [:upper:] instead of + A-Z; lower case may be specified as [:lower:] instead of a-z. + + Look at the manual pages for setlocale(3), strcoll(3), and, if it is + present, locale(1). + + You can find your current locale information by running locale(1): + + caleb.ins.cwru.edu(2)$ locale + LANG=en_US + LC_CTYPE="en_US" + LC_NUMERIC="en_US" + LC_TIME="en_US" + LC_COLLATE="en_US" + LC_MONETARY="en_US" + LC_MESSAGES="en_US" + LC_ALL=en_US + + My advice is to put + + export LC_COLLATE=C + + into /etc/profile and inspect any shell scripts run from cron for + constructs like [A-Z]. This will prevent things like + + rm [A-Z]* + + from removing every file in the current directory except those beginning + with `z' and still allow individual users to change the collation order. + Users may put the above command into their own profiles as well, of course. + +14. Bash versions up to 1.14.7 included an undocumented `-l' operator to + the `test/[' builtin. It was a unary operator that expanded to the + length of its string argument. This let you do things like + + test -l $variable -lt 20 + + for example. + + This was included for backwards compatibility with old versions of the + Bourne shell, which did not provide an easy way to obtain the length of + the value of a shell variable. + + This operator is not part of the POSIX standard, because one can (and + should) use ${#variable} to get the length of a variable's value. + Bash-2.x does not support it. + +15. Bash no longer auto-exports the HOME, PATH, SHELL, TERM, HOSTNAME, + HOSTTYPE, MACHTYPE, or OSTYPE variables. If they appear in the initial + environment, the export attribute will be set, but if bash provides a + default value, they will remain local to the current shell. + +16. Bash no longer initializes the FUNCNAME, GROUPS, or DIRSTACK variables + to have special behavior if they appear in the initial environment. + +17. Bash no longer removes the export attribute from the SSH_CLIENT or + SSH2_CLIENT variables, and no longer attempts to discover whether or + not it has been invoked by sshd in order to run the startup files. + +18. Bash no longer requires that the body of a function be a group command; + any compound command is accepted. + +19. As of bash-3.0, the pattern substitution operators no longer perform + quote removal on the pattern before attempting the match. This is the + way the pattern removal functions behave, and is more consistent. + +20. After bash-3.0 was released, I reimplemented tilde expansion, incorporating + it into the mainline word expansion code. This fixes the bug that caused + the results of tilde expansion to be re-expanded. There is one + incompatibility: a ${paramOPword} expansion within double quotes will not + perform tilde expansion on WORD. This is consistent with the other + expansions, and what POSIX specifies. + +21. A number of variables have the integer attribute by default, so the += + assignment operator returns expected results: RANDOM, LINENO, MAILCHECK, + HISTCMD, OPTIND. + +22. Bash-3.x is much stricter about $LINENO correctly reflecting the line + number in a script; assignments to LINENO have little effect. + +23. By default, readline binds the terminal special characters to their + readline equivalents. As of bash-3.1/readline-5.1, this is optional and + controlled by the bind-tty-special-chars readline variable. + +24. The \W prompt string expansion abbreviates $HOME as `~'. The previous + behavior is available with ${PWD##/*/}. + +25. The arithmetic exponentiation operator is right-associative as of bash-3.1. + +26. The rules concerning valid alias names are stricter, as per POSIX.2. + +27. The Readline key binding functions now obey the convert-meta setting active + when the binding takes place, as the dispatch code does when characters + are read and processed. + +28. The historical behavior of `trap' reverting signal disposition to the + original handling in the absence of a valid first argument is implemented + only if the first argument is a valid signal number. + +29. In versions of bash after 3.1, the ${parameter//pattern/replacement} + expansion does not interpret `%' or `#' specially. Those anchors don't + have any real meaning when replacing every match. + +30. Beginning with bash-3.1, the combination of posix mode and enabling the + `xpg_echo' option causes echo to ignore all options, not looking for `-n' + +31. Beginning with bash-3.2, bash follows the Bourne-shell-style (and POSIX- + style) rules for parsing the contents of old-style backquoted command + substitutions. Previous versions of bash attempted to recursively parse + embedded quoted strings and shell constructs; bash-3.2 uses strict POSIX + rules to find the closing backquote and simply passes the contents of the + command substitution to a subshell for parsing and execution. + +32. Beginning with bash-3.2, bash uses access(2) when executing primaries for + the test builtin and the [[ compound command, rather than looking at the + file permission bits obtained with stat(2). This obeys restrictions of + the file system (e.g., read-only or noexec mounts) not available via stat. + +33. Bash-3.2 adopts the convention used by other string and pattern matching + operators for the `[[' compound command, and matches any quoted portion + of the right-hand-side argument to the =~ operator as a string rather + than a regular expression. + +34. Bash-4.0 allows the behavior in the previous item to be modified using + the notion of a shell `compatibility level'. If the compat31 shopt + option is set, quoting the pattern has no special effect. + +35. Bash-3.2 (patched) and Bash-4.0 fix a bug that leaves the shell in an + inconsistent internal state following an assignment error. One of the + changes means that compound commands or { ... } grouping commands are + aborted under some circumstances in which they previously were not. + This is what Posix specifies. + +36. Bash-4.0 now allows process substitution constructs to pass unchanged + through brace expansion, so any expansion of the contents will have to be + separately specified, and each process substitution will have to be + separately entered. + +37. Bash-4.0 now allows SIGCHLD to interrupt the wait builtin, as Posix + specifies, so the SIGCHLD trap is no longer always invoked once per + exiting child if you are using `wait' to wait for all children. As + of bash-4.2, this is the status quo only when in posix mode. + +38. Since bash-4.0 now follows Posix rules for finding the closing delimiter + of a $() command substitution, it will not behave as previous versions + did, but will catch more syntax and parsing errors before spawning a + subshell to evaluate the command substitution. + +39. The programmable completion code uses the same set of delimiting characters + as readline when breaking the command line into words, rather than the + set of shell metacharacters, so programmable completion and readline + should be more consistent. + +40. When the read builtin times out, it attempts to assign any input read to + specified variables, which also causes variables to be set to the empty + string if there is not enough input. Previous versions discarded the + characters read. + +41. Beginning with bash-4.0, when one of the commands in a pipeline is killed + by a SIGINT while executing a command list, the shell acts as if it + received the interrupt. This can be disabled by setting the compat31 or + compat32 shell options. + +42. Bash-4.0 changes the handling of the set -e option so that the shell exits + if a pipeline fails (and not just if the last command in the failing + pipeline is a simple command). This is not as Posix specifies. There is + work underway to update this portion of the standard; the bash-4.0 + behavior attempts to capture the consensus at the time of release. + +43. Bash-4.0 fixes a Posix mode bug that caused the . (source) builtin to + search the current directory for its filename argument, even if "." is + not in $PATH. Posix says that the shell shouldn't look in $PWD in this + case. + +44. Bash-4.1 uses the current locale when comparing strings using the < and + > operators to the `[[' command. This can be reverted to the previous + behavior (ASCII collating and strcmp(3)) by setting one of the + `compatNN' shopt options, where NN is less than 41. + +45. Bash-4.1 conforms to the current Posix specification for `set -u': + expansions of $@ and $* when there are no positional parameters do not + cause the shell to exit. + +46. Bash-4.1 implements the current Posix specification for `set -e' and + exits when any command fails, not just a simple command or pipeline. + +47. Command substitutions now remove the caller's trap strings when trap is + run to set a new trap in the subshell. Previous to bash-4.2, the old + trap strings persisted even though the actual signal handlers were reset. + +48. When in Posix mode, a single quote is not treated specially in a + double-quoted ${...} expansion, unless the expansion operator is + # or % or the new `//', `^', or `,' expansions. In particular, it + does not define a new quoting context. This is from Posix interpretation + 221. + +49. Posix mode shells no longer exit if a variable assignment error occurs + with an assignment preceding a command that is not a special builtin. + +50. Bash-4.2 attempts to preserve what the user typed when performing word + completion, instead of, for instance, expanding shell variable + references to their value. + +51. When in Posix mode, bash-4.2 exits if the filename supplied as an argument + to `.' is not found and the shell is not interactive. + +52. When compiled for strict Posix compatibility, bash-4.3 does not enable + history expansion by default in interactive shells, since it results in + a non-conforming environment. + +53. Bash-4.3 runs the replacement string in the pattern substitution word + expansion through quote removal. The code already treats quote + characters in the replacement string as special; if it treats them as + special, then quote removal should remove them. + +54. Bash-4.4 no longer considers a reference to ${a[@]} or ${a[*]}, where `a' + is an array without any elements set, to be a reference to an unset + variable. This means that such a reference will not cause the shell to + exit when the `-u' option is enabled. + +55. Bash-4.4 allows double quotes to quote the history expansion character (!) + when in Posix mode, since Posix specifies the effects of double quotes. + +56. Bash-4.4 does not inherit $PS4 from the environment if running as root. + +57. Bash-4.4 doesn't allow a `break' or `continue' in a function to affect + loop execution in the calling context. + +58. Bash-4.4 no longer expands tildes in $PATH elements when in Posix mode. + +59. Bash-4.4 does not attempt to perform a compound array assignment if an + argument to `declare' or a similar builtin expands to a word that looks + like a compound array assignment (e.g. declare w=$x where x='(foo)'). + +60. Bash-5.0 only sets up BASH_ARGV and BASH_ARGC at startup if extended + debugging mode is active. The old behavior of unconditionally setting + BASH_ARGC and BASH_ARGV is available at compatibility levels less than + or equal to 44. + +61. Bash-5.0 doesn't allow a `break' or `continue' in a subshell to attempt + to break or continue loop execution inherited from the calling context. + +62. Bash-5.0 doesn't allow variable assignments preceding builtins like + export and readonly to modify variables with the same name in preceding + contexts (including the global context) unless the shell is in posix + mode, since export and readonly are special builtins. + +63. Bash-5.1 changes the way posix-mode shells handle assignment statements + preceding shell function calls. Previous versions of POSIX specified that + such assignments would persist after the function returned; subsequent + versions of the standard removed that requirement (interpretation #654). + Bash-5.1 posix mode assignment statements preceding shell function calls + do not persist after the function returns. + +64. Bash-5.1 reverts to the bash-4.4 treatment of pathname expansion of words + containing backslashes but no other special globbing characters. This comes + after a protracted discussion and a POSIX interpretation (#1234). + +65. In bash-5.1, disabling posix mode attempts to restore the state of several + options that posix mode modifies to the state they had before enabling + posix mode. Previous versions restored these options to default values. + + +Shell Compatibility Level +========================= + +Bash-4.0 introduced the concept of a `shell compatibility level', specified +as a set of options to the shopt builtin (compat31, compat32, compat40, +compat41, and so on). There is only one current compatibility level -- +each option is mutually exclusive. The compatibility level is intended to +allow users to select behavior from previous versions that is incompatible +with newer versions while they migrate scripts to use current features and +behavior. It's intended to be a temporary solution. + +This section does not mention behavior that is standard for a particular +version (e.g., setting compat32 means that quoting the rhs of the regexp +matching operator quotes special regexp characters in the word, which is +default behavior in bash-3.2 and above). + +If a user enables, say, compat32, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed in +that version of bash, but that behavior may have been present in earlier +versions. For instance, the change to use locale-based comparisons with +the `[[' command came in bash-4.1, and earlier versions used ASCII-based +comparisons, so enabling compat32 will enable ASCII-based comparisons as +well. That granularity may not be sufficient for all uses, and as a result +users should employ compatibility levels carefully. Read the documentation +for a particular feature to find out the current behavior. + +Bash-4.3 introduced a new shell variable: BASH_COMPAT. The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the compatNN option, like 42) determines the compatibility +level. + +Starting with bash-4.4, bash has begun deprecating older compatibility +levels. Eventually, the options will be removed in favor of the +BASH_COMPAT variable. + +Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use the BASH_COMPAT variable +on bash-5.0 and later versions. + +The following table describes the behavior changes controlled by each +compatibility level setting. The `compatNN' tag is used as shorthand for +setting the compatibility level to NN using one of the following +mechanisms. For versions prior to bash-5.0, the compatibility level may be +set using the corresponding compatNN shopt option. For bash-4.3 and later +versions, the BASH_COMPAT variable is preferred, and it is required for +bash-5.1 and later versions. + +compat31 + - the < and > operators to the [[ command do not consider the current + locale when comparing strings; they use ASCII ordering + - quoting the rhs of the [[ command's regexp matching operator (=~) + has no special effect + +compat32 + - the < and > operators to the [[ command do not consider the current + locale when comparing strings; they use ASCII ordering + - interrupting a command list such as "a ; b ; c" causes the execution + of the next command in the list (in bash-4.0 and later versions, + the shell acts as if it received the interrupt, so interrupting + one command in a list aborts the execution of the entire list) + +compat40 + - the < and > operators to the [[ command do not consider the current + locale when comparing strings; they use ASCII ordering. + Bash versions prior to bash-4.1 use ASCII collation and strcmp(3); + bash-4.1 and later use the current locale's collation sequence and + strcoll(3). + +compat41 + - in posix mode, `time' may be followed by options and still be + recognized as a reserved word (this is POSIX interpretation 267) + - in posix mode, the parser requires that an even number of single + quotes occur in the `word' portion of a double-quoted ${...} + parameter expansion and treats them specially, so that characters + within the single quotes are considered quoted (this is POSIX + interpretation 221) + +compat42 + - the replacement string in double-quoted pattern substitution is not + run through quote removal, as it is in versions after bash-4.2 + - in posix mode, single quotes are considered special when expanding + the `word' portion of a double-quoted ${...} parameter expansion + and can be used to quote a closing brace or other special character + (this is part of POSIX interpretation 221); in later versions, + single quotes are not special within double-quoted word expansions + +compat43 + - the shell does not print a warning message if an attempt is made to + use a quoted compound assignment as an argument to declare + (declare -a foo='(1 2)'). Later versions warn that this usage is + deprecated. + - word expansion errors are considered non-fatal errors that cause the + current command to fail, even in posix mode (the default behavior is + to make them fatal errors that cause the shell to exit) + - when executing a shell function, the loop state (while/until/etc.) + is not reset, so `break' or `continue' in that function will break + or continue loops in the calling context. Bash-4.4 and later reset + the loop state to prevent this + +compat44 + - the shell sets up the values used by BASH_ARGV and BASH_ARGC so + they can expand to the shell's positional parameters even if extended + debug mode is not enabled + - a subshell inherits loops from its parent context, so `break' + or `continue' will cause the subshell to exit. Bash-5.0 and later + reset the loop state to prevent the exit + - variable assignments preceding builtins like export and readonly + that set attributes continue to affect variables with the same + name in the calling environment even if the shell is not in posix + mode + +compat50 (set using BASH_COMPAT) + - Bash-5.1 changed the way $RANDOM is generated to introduce slightly + more randomness. If the shell compatibility level is set to 50 or + lower, it reverts to the method from bash-5.0 and previous versions, + so seeding the random number generator by assigning a value to + RANDOM will produce the same sequence as in bash-5.0 + - If the command hash table is empty, bash versions prior to bash-5.1 + printed an informational message to that effect even when writing + output in a format that can be reused as input (-l). Bash-5.1 + suppresses that message if -l is supplied + + +------------------------------------------------------------------------------- + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. diff --git a/bash-5.1/COPYING b/bash-5.1/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..94a9ed024d3859793618152ea559a168bbcbb5e2 --- /dev/null +++ b/bash-5.1/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/bash-5.1/CWRU/PLATFORMS b/bash-5.1/CWRU/PLATFORMS new file mode 100644 index 0000000000000000000000000000000000000000..f05caff56835f1912f9af5e16d84078d2a116171 --- /dev/null +++ b/bash-5.1/CWRU/PLATFORMS @@ -0,0 +1,31 @@ +The version of bash in this directory has been compiled on the +following systems: + +By chet: + +SunOS 4.1.4 +SunOS 5.5 +BSDI BSD/OS 2.1 +FreeBSD 2.2 +NetBSD 1.2 +AIX 4.2 +AIX 4.1.4 +HP/UX 9.05, 10.01, 10.10, 10.20 +Linux 2.0.29 (libc 5.3.12) +Linux 2.0.4 (libc 5.3.12) + +By other testers: + +SCO ODT 2.0 +SCO 3.2v5.0, 3.2v4.2 +SunOS 5.3 +SunOS 5.5 +BSD/OS 2.1 +FreeBSD 2.2 +SunOS 4.1.3 +Irix 5.3 +Irix 6.2 +Linux 2.0 (unknown distribution) +Digital OSF/1 3.2 +GNU Hurd 0.1 +SVR4.2 diff --git a/bash-5.1/CWRU/README b/bash-5.1/CWRU/README new file mode 100644 index 0000000000000000000000000000000000000000..7d7ca1ab39e1b06b4cd7e34d444c282a81b6c06e --- /dev/null +++ b/bash-5.1/CWRU/README @@ -0,0 +1,20 @@ +Contents of this directory: + +changelog - my change log since the last release + +POSIX.NOTES - list of what changes for `posix mode' + +README - this file + +misc - directory with some useful tools + +The following are distributed `as-is'. They will not apply without some +modification. + +sh-redir-hack - diff to parse.y to get redirections before + compound commands + +empty-for-wordlist - diff to parse.y to allow an empty wordlist after + the `in' keyword in a `for' statement + +mh-folder-comp - diffs that reportedly add MH folder completion diff --git a/bash-5.1/CWRU/changelog b/bash-5.1/CWRU/changelog new file mode 100755 index 0000000000000000000000000000000000000000..27f62c0260202a37836372757fe86bd5f8109472 --- /dev/null +++ b/bash-5.1/CWRU/changelog @@ -0,0 +1,9182 @@ + + 9/15/2016 + --------- +[bash-4.4 released] + + 9/17 + ---- +builtins/common.c + - display_signal_list: if 0 is supplied as an argument to kill -l, + display a signal-out-of-range error. Fixes bug reported by + Martijn Dekker + + 9/18 + ---- +print_cmd.c + - print_heredoc_bodies: take a list of redirections, all here documents, + and print the here-document bodies including the ending delimiter, + followed by a newline + - print_redirection_list: print the heredoc headers the first time + through the list of redirections so we print them in the same left- + to-right order they're supplied; print the bodies and delimiters with + print_heredoc_bodies after we print all the redirections if we're + not printing a list of commands (printing_connection == 0). Fix for + problem reported by Isabella Parakiss + - print_deferred_heredocs: don't print heredoc headers, since they're + now printed in print_redirection_list + - print_deferred_heredocs: use print_heredoc_bodies + + 9/20 + ---- +builtins/mapfile.def + - readarray: update usage synopsis to include -d delim. Report and + fix from jhankins@homewood.k12.al.us + +test.c + - test_binop: if op[0] == '-', make sure op[1] != 0 before checking + op[2] or op[3]. Fixes out-of-bounds read reported by Franco + Costantini + +parse.y + - cond_term: if yylval.word->word[0] == '-' make sure word[1] != 0 + before checking word[2] and calling test_unop. Fixes out-of-bounds + read reported by Franco Costantini + - make sure to check all instances of the return value of the + simple_command production before trying to hook redirections onto it, + since it can potentially return NULL. + Reported by Franco Costantini + + 9/21 + ---- +parse.y + - token_is_assignment: make sure to check that the return value from + assignment() finds the `=' we just added at index I to avoid false + positives from g=g=g=g=g=g=(). Reported by Franco Costantini + + + 9/22 + ---- +parse.y + - token_is_assignment: if we're not using the bash malloc (which has + guard bytes after the requested allocation size), use a new + buffer so we can make sure it's big enough to hold the current + token and at least two additional characters. Reported by + Franco Costantini + + 9/23 + ---- +execute_cmd.c + - execute_in_subshell: call without_job_control for both job control + and non-job-control builds to avoid waiting for last_made_pid + inherited from parent shell. Related to fix from 8/4 to + initialize_subshell. Fixes bug reported by Martijn Dekker + + +builtins/declare.def + - local_builtin: allow `local --help' to work even when not executing + a function. Suggestion from Norm Abramovitz + + 9/25 + ---- +builtins/printf.def + - bexpand: if passed a null or empty string, return a newly-allocated + empty string (so the return value can always be freed) instead of + NULL. + - printstr: if passed a null string, treat it as if it were an empty + string so any precision or fieldwidth arguments are handled + correctly. Report from isabella parakiss + +subst.c + - skip_matched_pair: make the flags argument of 1 affect whether or + not backslash can quote characters in the string, so it affects + all quoting mechanisms + +arrayfunc.c + - unbind_array_element: now takes a third (flags) argument; flags&1 + means to not expand an associative array index. This is only called + from a shell builtin context, which means the argument should have + already undergone word expansion, so it should be ok. Will still + be a problem for uses like "unset -v 'var[$ind]'", quoted to avoid + globbing + - valid_array_reference: pass second flags argument to skipsubscript; + still set to 0 by all callers + +arrayfunc.h + - unbind_array_element: updated prototype + +builtins/set.def + - unset_builtin: add third argument of 1 to unbind_array_element calls + [TEMPORARILY DISABLED] + - unset_builtin: call valid_array_reference with second arg of 1 to + handle unmatched pairs of quotes and [/] + +array.c + - array_reference: optimize access locality as well as sequential + access by adding ability to start from last-accessed element and move + backwards or forwards depending on the desired index. Inspired by + report from Tom McCurdy and followup from + Christian Franke + +variables.c + - all_array_variables: include associative arrays, not just indexed + arrays. Reported by Grisha Levit + +execute_cmd.c + - execute_disk_command: if we're optimizing out the fork (CMD_NO_FORK), + decrement the shell level so we don't end up incrementing it twice. + We should decrement the shell level for an implicit exec like an + explicit one. Reported by Stephane Chazelas + + +builtins/exec.def + - exec_builtin: don't bother to decrement the shell level if we are + already in a `(command)' subshell. Reported by Stephane Chazelas + + +lib/readline/macro.c + - macro_level: count of macro nesting level, maintained by + _rl_push_executing_macro and _rl_pop_executing macro + - _rl_with_macro_input: if current nesting level exceeds + MAX_MACRO_LEVEL, abort the current command line with _rl_abort_internal + and return to the top level. Reported by Christian Klomp + + +lib/readine/history.c + - add_history: if allocating the history list for the first time, + make sure the max history list size isn't so large that it will + cause allocation errors. Cap it at MAX_HISTORY_INITIAL_SIZE + (8192). Reported by Sean Zha + +jobs.c + - wait_for: if a foreground job with job control enabled is killed by a + SIGINT and sourcelevel != 0, act as if we received the SIGINT so the + file sourcing can be terminated. Reported by PePa + + + 9/26 + ---- +subst.c + - read_comsub: only warn once for null bytes in command substitution + output, instead of once for every null byte + +arrayfunc.c + - array_variable_part: now takes a `flags' argument; changed all callers + to initially pass 0 + - array_variable_name: now takes a `flags' argument; changed all callers + to initially pass 0 + - array_variable_name: pass `flags' argument to skipsubscript instead + of just passing 0 + +arrayfunc.h + - array_variable_{name,part}: added new argument to prototypes + + 9/29 + ---- +bashline.c + - bash_directory_completion_hook: don't bother to try and expand a + ${ or $( that isn't complete; expand_prompt_string will complain. + Fixes reports from John Passaro and + Valentin Bajrami + +lib/readline/history.c + - _hs_append_history_line: use a strategy that attempts to avoid + realloc copying memory to a newly-allocated block if the history + line we're appending to gets `too long' (currently 256 bytes). + We reallocate in powers of 2 starting at 512, and rely on realloc + not allocating a new block and copying into it if the size is the + same as the last call to realloc. Addresses issue raised by + Hubert Schmid + +trap.h + - check_signals: new extern declaration + - trapped_signal_received: new extern declaration + +builtins/read.def + - read_builtin: if one of the zread* functions returns < 0 (which + usually only happens in Posix mode), make sure we call check_signals() + before eventually calling run_pending_traps() because zread() isn't + going to call it + - include trap.h for correct extern functions and variable declarations + +lib/sh/zread.c + - zread: if executing a builtin, call check_signals_and_traps() for + backwards compatibility. If not, call check_signals() only, because + we don't want to run traps during, for instance, reading command + substitution output. Fixes race condition bug reported by Luiz Angelo + Daros de Luca + + 9/30 + ---- +subst.c + - command_substitute: reset parse_and_execute_level to 0 in the child + process, since it's independent of the other parse_and_execute + calls. Adds command substitution inside other parse_and_execute + calls optimizations to suppress forks, as suggested by + Martijn Dekker + + 10/3 + ---- +configure.ac + - SHOBJ_STATUS: make sure it defaults to unsupported and is substituted + if the shobj-conf script isn't run. Fixes `make install' bug with + a minimal config reported by Andrew Tomazos + + 10/5 + ---- +support/shobj-conf + - darwin: set compatibility_version for a shared build of the readline + library (the standalone readline distribution shares this file) to + $(SHLIB_MAJOR)$(SHLIB_MINOR). Recommendation from Max Horn + + + 10/6 + ---- +array.h + - array_first_index: new convenience define + +array.c + - ADD_AFTER: new define, complement of ADD_BEFORE + - UNSET_LASTREF: now takes an array as an argument, prepping for move + of lastref pointer into the array struct + - array_insert: check whether we are adding at the beginning of the + array and take a fast path if so + - array_insert: use same strategy as array_reference to find the place + to insert, starting from the last-referenced element and moving + forward or back from there; use ADD_AFTER if moving backward + - array_insert: if replacing an existing element, just replace the + value with new->value instead of the entire element + - array_reference: short-circuit quickly if looking for an element + before the first assigned index + - array_reference: if we don't find the element, leave lastref pointing + to the closest element under the assumption we will be assigning or + looking for something close + - array_reference: take advantage of ordered indexes to short-circuit + when looking for element that is not set + + 10/7 + ---- +array.c + - array_remove: short-circuit if asked to remove index after max + index or before first index + + 10/10 + ----- +lib/malloc/malloc.c + - internal_realloc: if we are requesting reallocation to the same size + as the block's current size, short-circuit and return `mem' right + after doing bounds check + - internal_realloc: if we are reducing the size of an allocation, and + the new size fits in the next lower bin, just keep the same block + and adjust the size, so we can avoid some copies + +parse.y + - set_line_mbstate: keep track of the allocated size of + shell_input_line_property, only request reallocation if the size + increases, but don't let it get too big + + 10/11 + ----- +jobs.c + - wait_for_background_pids: make sure we wait for pid in + last_procsub_child since it's not found in any job -- still needs + more work to wait for multiple process substitutions + +subst.c + - process_substitute: if make_child fails, make sure we call + restore_pipeline to undo the previous save_pipeline() + + 10/15 + ----- +subst.c + - process_substitute,command_substitute: leave subshell_level (reflected + as $BASH_SUBSHELL) intact for any exit trap instead of decrementing + it. Suggested by Martijn Dekker + +builtins/evalstring.c + - optimize_subshell_command: new function, framework for optimizing + out forks for command that have already forked and are executing + in a subshell. Not used yet + +expr.c + - readtok: if we have a post-increment or post-decrement, and the + previous token is not a string, check whether the previous token is + a number that results from a pre-increment or pre-decrement, and + make that an error. Report from Conrad Hoffmann + + 10/16 + ----- +aclocal.m4 + - BASH_JOB_CONTROL_MISSING: convert from AC_TRY_RUN to AC_TRY_COMPILE + with existing set of preprocessor defines, so it can work when + cross-compiling. Suggested by Felix Janda + + 10/19 + ----- +variables.c + - get_bashpid: BASHPID is no longer readonly; assignments to it are + just ignored. + +doc/{bash.1,bashref.texi} + - BASHPID: note that assignments are ignored and unsetting BASHPID + causes it to lose its special properties + + 10/28 + ----- +builtins/pushd.def + - popd_builtin: make sure to check the normalized stack offset + (i.e., negatives counting back from the end of the stack) is within + bounds before trying to free that stack entry. Report from + Fernando Muñoz + +lib/readline/histfile.c + - chown: protect calls with HAVE_CHOWN. Fixes for MinGW{64,32} from + J. Peter Mugaas + +lib/readline/colors.c + - S_ISDIR: add define if missing + - S_ISUID, S_ISGID, S_ISLNK, S_ISSOCK: don't use unless defined. + Fixes for MinGW{64,32} from J. Peter Mugaas + +bashhist.c + - current_command_line_comment: set to the most recent line in a + possibly multi-line command that contains a shell comment; set in + maybe_add_history and bash_add_history to either the current + command number or -2 + - maybe_add_history: set current_command_line_comment for first line + of command + - bash_add_history: chars_to_add set to "\n" if the current command line + is one greater than the previous line containing a comment + (current_command_line_comment). Fixes complaint from back in + January, 2016 from Dave Rutherford + +array.h + - lastref: move last-referenced pointer into each array struct, so all + arrays can have reference locality + +array.c + - array_create: set lastref element to 0 + - array_copy: if copying the lastref in array a, set the new lastref + in the copy to the same element + - IS_LASTREF, LASTREF_START, LASTREF, INVALIDATE_LASTREF, SET_LASTREF, + UNSET_LASTREF: change to use new array `lastref' member + +pathexp.c + - quote_string_for_globbing: if quoting for a regexp, make sure to + skip and copy a leading `^' in a bracket expression, and skip and + copy a subsequent `]' (after an optional `^'), so that leading + bracket doesn't close the bracket expression. Report from + Stephane Chazelas + + 10/29 + ----- +subst.c + - extract_delimited_string: add calls to CHECK_STRING_OVERRUN for + $( inside $((, nested OPENERs, nested ALT_OPENERs, and backquotes + - skip_to_delim: add calls to CHECK_STRING_OVERRUN for $(, ${, + process substitution + - extract_dollar_brace_string: add calls to CHECK_STRING_OVERRUN for + $( + - extract_dollar_brace_string: use skipsubscript to skip over the + array subscript in ${var[sub]} (non-quoted case uses string_extract, + which already uses skipsubscript). Tagged for bash-5.0 + + 10/30 + ----- +variables.c + - EPOCHSECONDS: new dynamic variable, time in seconds since Unix + epoch; assignments are ignored. Can be used on systems where + strftime() doesn't support '%s' + - EPOCHREALTIME: new dynamic variable, time in seconds since Unix + epoch with microsecond granularity + +doc/{bash.1,bashref.texi} + - EPOCHSECONDS documentation + - EPOCHREALTIME documentation + +execute_cmd.c + - decpoint: moved to locale.c, renamed locale_decpoint; changed callers + +{bashintl,externs}.h + - locale_decpoint: extern declaration or #define if support for + localeconv() not there + + 10/31 + ----- +lib/malloc/malloc.c + - posix_memalign: add new posix-mandated interface + +examples/loadables/rm.c + - rm: minimal loadable builtin, removes files and directories, only + handles -r and -f options. Original from Tim Ruehsen + , heavily rewritten for inclusion as loadable + +examples/loadables/Makefile.in + - rm: add rules to build rm as one of the `other' targets + +examples/loadables/stat.c + - stat: new loadable builtin that takes a filename and loads the info + returned by stat(2) into an associative array specified by the -A + argument (default STAT) + + 11/1 + ---- +variables.c + - BASH_ARGV0: new dynamic variable, returns $0 on reference and sets + $0 on assignment. From a suggestion from Rocky Bernstein + a few years ago + +doc/{bash.1,bashref.texi} + - BASH_ARGV0: document + + 11/2 + ---- +lib/glob/sm_loop.c + - parse_collsym: make sure to not return an out-of-bounds read if a + collating symbol is unterminated. Fixes OOB read reported by + Jerzy Kramarz + - brackmatch: after incrementing p, before checking whether it's a + character range, check whether *p was NULL before the increment + and short-circuit the bracket expression if it is + +jobs.c + - discard_last_procsub_child: new function, safely discards + last_procsub_child and sets it to NULL + +subst.c + - process_substitute: call discard_last_procsub_child instead of + calling discard_pipeline directly. Fixes bug reported by + Christian Weisgerber + + 11/3 + ---- +shell.h + - EX_DISKFALLBACK: new special return status available to builtins; + means to attempt to execute a disk command with the same name as + the builtin + +examples/loadables/rm.c + - if we see the -i option, return EX_DISKFALLBACK + +execute_cmd.c + - execute_simple_command: if executing a builtin returns EX_DISKFALLBACK, + try running execute_disk_command instead + +bashline.c + - shell_expand_line: use expand_word to expand the readline line + buffer, which allows us to pass flags with the word. If a numeric + argument is supplied, do not perform quote removal (pass + Q_HERE_DOCUMENT since here-doc quoting does the right thing) and + do not perform command or process subsitution. From a suggestion + by Dabrien 'Dabe' Murphy based on an old bug-bash + discussion + +subst.c + - expand_word_internal: note that we have added a quoted IFS char to + istring by setting sentinel has_quoted_ifs. Usually we only add + one if we are not going to be performing word splitting, but we + will not perform word splitting if there's no expansion, so we need + to take care of that case + - expand_word_internal: when performing final word split, if there are + no expansions but has_quoted_ifs is non-zero, call remove_quoted_ifs() + to remove any quoted ifs characters we added while processing + - remove_quoted_ifs: new function, removes CTLESC chars preceding + (single-byte) chars in IFS. Used when we are not performing word + splitting. Fixes bug reported by Martijn Dekker + + 11/4 + ---- +lib/readline/macro.c + - _rl_peek_macro_key: return the next character from the current + keyboard macro; the next character from the `next' keyboard macro, + if there is one, if at the end of the current macro; or 0 to + indicate that we are at the end of a keyboard macro sequence + +lib/readline/rlprivate.h + - _rl_peek_macro_key: extern declaration + +lib/readline/readline.c + - _rl_dispatch_subseq: add test for ESC at the end of a keyboard macro, + which should cause the keyboard timeout for ESC to kick in. The + previous test didn't run the timeout code if executing from a macro, + even if we had read the last character of the macro. Fixes bug + reported by Clark Wang + +lib/glob/sm_loop.c + - GMATCH: allow trailing backslash in pattern to explicitly match a + backslash that is the last character in the string. Bug report from + Stephane Chazelas + + 11/5 + ---- +builtins/common.c + - display_signal_list: if displaying a signal name corresponding to an + exit status > 128, don't display the SIG prefix at all. Old code + made displaying the SIG prefix dependent on JOB_CONTROL define. + Report and fix from Martijn Dekker + +execute_cmd.c + - execute_subshell_builtin_or_function: call without_job_control even + if JOB_CONTROL is not defined. Similar to fix from 9/23. + Report from Martijn Dekker + +execute_cmd.c + - execute_simple_command: free memory allocated and passed to + make_child in the child process if JOB_CONTROL is defined + - execute_command_internal: free memory allocated and passed to + make_child in the child process created to run a () subshell or a + compound command within a pipeline if JOB_CONTROL is defined + - execute_coproc: free memory allocated and passed to make_child in + the child process if JOB_CONTROL is defined + - execute_disk_command: free memory allocated and passed to + make_child in the child process if JOB_CONTROL is defined. This + series of fixes is the result of reports from + Eduardo A. Bustamante López + + 11/6 + ---- +lib/sh/unicode.c + - u32toutf16: fix to prevent outputting broken surrogate pairs for + Japanese locales (ja_JP.UTF-8) on cygwin (which uses UTF-16 natively). + Report and fix from Koichi MURASE + +builtins/trap.def + - trap_builtin: if OP is `-' (revert), set the SIGINT signal handler + to sigint_sighandler if the shell is interactive and sourcing a + file (interactive_shell && sourcelevel) or running a trap + (interactive_shell && running_trap) even if it's not currently + interactive. Report from Martijn Dekker + +builtins/read.def + - check for and read multibyte characters in all cases, not just when + we are reading a specific number of characters, as long as + mb_cur_max > 1 + +subst.c + - expand_word_internal: some improvements to code that converts istring + into a WORD_LIST * to avoid multiple allocations and copies of + istring, which is already malloc'ed memory -- reduce number of malloc + and free calls + +test.c + - unary_test: make sure if we test -v array[@] or array[*] that we + free the return value from array_value + + 11/8 + ---- +expr.c + - expcond: make sure to set `noeval' before reading tokens depending on + the result of the conditional test, since readtok() can evaluate + identifiers (and recursively those containing expressions). Report + and fix from Koichi MURASE + +builtins/evalstring.c + - should_suppress_fork: make sure to check for traps on EXIT and + ERR, since any_signals_trapped() only checks for `real' signals, + not the fake shell ones. Fixes bug reported by Werner Fink + + - optimize_subshell_command: ditto + + 11/9 + ---- +eval.c + - reader_loop: change so that we don't reset the SIGINT handler every + time through the command loop in an interactive shell if the signal + is trapped (as the comment noted). Reported by Report from Martijn + Dekker + +subst.c + - parameter_brace_{patsub,remove_pattern,transform,casemod}: save and + restore this_command_name while temporarily setting it for use in + error messages. Fixes use-after-free error reported by + Jerzy Kramarz + - string_extract_verbatim: make sure when we increment i by 2 due to + a CTLESC or CTLESC-CTLNUL that we don't read past the end of the + string. This can happen if the string ends with an odd number of + CTLESC chars. Fixes oob-read error reported by + Jerzy Kramarz + + 11/11 + ----- +configure.ac,aclocal.m4 + - BASH_FUNC_SBRK: make sure sbrk actually works, instead of being just + a stub function like on several Linux distributions + +lib/malloc/malloc.c + - malloc_usable_size: return the maximum number of bytes available for + a particular memory allocation (size of block allocated for it) + + 11/12 + ----- +configure.ac + - changes to make --enable-profiling work on Linux (-pg, no static link, + no -static in LDFLAGS) + +Makefile.in + - changes to make --enable-profiling work on Linux (take + ${PROFILE_FLAGS} out of BASE_CCFLAGS, add to CCFLAGS instead; add + BASE_LDFLAGS define that doesn't include -pg or -static; use + BASE_LDFLAGS in LDFLAGS; move ${PROFILE_FLAGS} and ${STATIC_LD} to + LDFLAGS) + +tests/run-gprof + - changes to make profiling test suite with gprof work on Linux (set + GMON_OUT_PREFIX to handle multiple profiled processes per test; + change default filename to gmon.out from bash.gmon; look for + gprof output files in ${TMPDIR} instead of /tmp; handle multiple + profiling files starting with $GMON_OUT_PREFIX) + +locale.c + - locale_isutf8: use locale_charset() if it's available and nl_langinfo + isn't + - locale_isutf8: add code to parse a locale specification and determine + whether the encoding is UTF-8 (or utf8) in the absence of + nl_langinfo and locale_charset + - set_default_locale: make sure to set locale_utf8locale early on + - locale_utf8locale: set via call to locale_isutf8 wherever LANG, + LC_ALL, or LC_CTYPE is set + + 11/13 + ----- +lib/readline/display.c + - rl_redisplay: handle report of potential integer overflow in + horizontal display mode from Mateusz Lenik + +lib/sh/mbschr.c + - mbschr: if in a UTF-8 locale (locale_utf8locale) and we are looking + for an ASCII character, use (essentially) strchr as a shortcut + +lib/sh/shmbchar.c + - utf8_{mbstrlen,mblen,mbsmbchar,mbsnlen}: UTF-8-specific replacement + functions (should also be able to use utf8_mblen in subst.c: + string_extract_verbatim) + - mbsmbchar: if locale_utf8locale is true, call utf8_mbsmbchar + - mbsmbchar: in UTF-8 locale, use utf8_mblen instead of mbrlen (not + used if earlier shortcut taken) + +lib/sh/unicode.c + - u32cconv: don't use nl_langinfo early to call u32toutf8() + - u32cconv: use locale_utf8locale to set utf8locale + - u32cconv: when initializing (u32init == 0), use locale_charset, then + nl_langinfo, then stub_charset to determine the charset + - u32cconv: even if we don't have iconv, if locale_utf8locale is non- + zero, return u32toutf8 + + 11/15 + ----- +lib/readline/nls.c + - _rl_init_locale: new function, split off code that determines current + locale from _rl_init_eightbit, use it to set _rl_utf8locale + +lib/readiline/rlprivate.h + - _rl_init_locale: new extern declaration + +lib/readline/readline.c + - rl_initialize: if not initializing everything the first time, call + _rl_init_locale to check current locale and set _rl_utf8locale + +lib/readline/text.c + - _rl_insert_char: optimize cases where we are inserting a single-byte + character in a locale with multibyte characters + - _rl_insert_char: check whether character is single byte if we know + we are in a UTF-8 locale, optimize single-byte case to avoid calls + to mbrtowc and memmove/memcpy + +lib/readline/mbutil.c + - _rl_char_value: if we are in a UTF-8 locale (_rl_utf8locale) and the + current character does not have the eighth bit set ((c & 0x80) == 0), + return that char without bothering to call mbrtowc + - _rl_adjust_point: don't bother calling mbrlen if we are in a UTF-8 + locale and the current character is not a multibyte character + - _rl_find_next_mbchar_internal: if we are in a UTF-8 locale, use that + to avoid calls to mbrtowc + +lib/readline/display.c + - _rl_col_width: if in a UTF-8 locale, take advantage of that to avoid + calls to mbrlen and mbrtowc + - rl_redisplay: if in a UTF-8 locale, take advantage of that to avoid + calls to mbrtowc + + 11/17 + ----- +lib/readline/histlib.h + - PATTERN_SEARCH: new flag for history search interfaces, means to + search for a pattern as Posix specifies + +lib/readline/histsearch.c + - history_search_internal: now takes a `flags' argument instead of just + an `anchored' argument to accommodate PATTERN_SEARCH + - _hs_history_patsearch: new internal interface to use when flags + specify PATTERN_SEARCH + +lib/readline/rlprivate.h + - SF_PATTERN: new flag for non-incremental search contexts, means to + treat search string as a pattern (maps to PATTERN_SEARCH) + +lib/readline/search.c + - noninc_dosearch: takes an additional `flags' argument for SF_PATTERN + - noninc_search_from_pos: takes an additional `flags' argument for + SF_PATTERN + - noninc_dosearch: pass flags argument through to noninc_search_from_pos + - _rl_nsearch_init: if we are in vi command mode, and `pchar' (key used + to invoke the search) is `?' or `/', add SF_PATTERN to the flags + to conform to Posix spec for vi-mode editing + - _rl_nsearch_dosearch: if cxt->sflags indicates that we should do a + pattern search, pass SF_PATTERN to noninc_search_from_pos + - rl_noninc_forward_search_again: if in vi command mode and key == `N', + make sure flags arg passed to noninc_dosearch includes SF_PATTERN + - rl_noninc_reverse_search_again: if in vi command mode and key == `n', + make sure flags arg passed to noninc_dosearch includes SF_PATTERN + - rl_history_search_internal: pass extra flags arg to noninc_search_from_pos + + 11/18 + ----- +lib/readline/search.c + - noninc_search_from_pos: takes a new argument, a pointer to int where + it stores the offset of the match in the history line (if non-NULL), + modified callers + - rl_history_search_internal: pass newcol pointer to + noninc_search_from_pos to avoid having to recompute the match offset + in the matching history entry + +config.h.in + - define HAVE_FNMATCH if we have the fnmatch function (configure was + already checking for it) + +lib/readline/histsearch.c + - _hs_history_patsearch: transform the pattern into one ending in a + `*' to avoid having to perform multiple match attempts from each + index in the history line + - history_search_internal: changes to handle pattern matching if + PATTERN_SEARCH is in the flags and HAVE_FNMATCH is defined. This + makes vi-mode history searching treat the user-specified search + string as an fnmatch pattern, as Posix requires. Fixes issue + reported by + + 11/19 + ----- +builtins/shopt.def + - shopt_enable_hostname_completion: only declare this if READLINE + defined, since that's the only time it's used. Reported by + isabella parakiss + + 11/20 + ----- +builtins/common.c + - display_signal_list: make `kill -l 0' print `EXIT', modifying change + from 9/17 + + 11/21 + ----- +subst.c + - expand_word_internal: when the shell encounters a backslash as the + last character of the string, don't try to add a '\'0' to the end + of the string if the string is quoted, just add a <\> and + skip to the end of string processing. Fixes oob-read error + reported by Jerzy Kramarz + +test.c + - two_arguments: check argv[pos][1] before checking argv[pos][2] when + looking for a unary argument. Fixes oob-read error on single `-' + in unary operator position reported by Jerzy Kramarz + + - ANDOR: check s[1] before checking s[2] in case s[1] == end of string. + Fixes oob-read error reported by Jerzy Kramarz + +subst.c + - command_substitute: now takes additional flags argument, changed one + caller (param_expand) to pass through PF_ASSIGNRHS flag; other callers + pass 0 + - command_substitute: pass through flags argument to read_comsub + - read_comsub: now takes additional new flags argument to indicate + whether or not the word is in a context where word splitting will + eventually be performed + - read_comsub: if we are running in a context where word splitting + will not take place (PF_ASSIGNRHS), we read a CTLESC, and CTLESC is + in $IFS, add a CTLESC to make sure it gets through a round of + dequoting + + 11/23 + ----- +parse.y + - xparse_dolparen: since reset_parser frees the pushed string list, + and this is supposed to be a separate parsing context, we need to + save and restore pushed_string_list around the call to parse_string + and reset_parser. Fixes bug reported by Dan Douglas + + +bashhist.h + - HISTEXPAND_DEFAULT: default value of history_expansion, moved here + from flags.c + +flags.[ch] + - histexp_flag: new variable, this is what set -H/set -o histexpand + sets; history_expansion set to value of this variable; defaults to 0 + - history_expansion: now set to HISTEXPAND_DEFAULT + +bashhist.c + - bash_history_reinit: if interact == 0, set history_expansion to the + value of histexp_flag, to allow -H option to enable history + expansion + - bash_history_reinit: if interact == 0, make sure + history_expansion_inhibited is set opposite of histexp_flag, so + enabling history expansion with -H invocation option turns off + inhibited expansion. If interactive shell, we turn it off so + history_expansion controls whether or not history expansion takes + place. In practice, this function is always called with interact == 0, + and -c command still doesn't perform history expansion + +shell.c + - init_interactive: make sure histexp_flag and history_expansion are + identical in an interactive shell; allows both -H/+H option and + default compilation options (HISTEXPAND_DEFAULT) to work + + 11/24 + ----- +subst.c + - get_word_from_string: take advantage of the fact that SEPARATORS is + always a (possibly local) copy of IFS, so build a local charmap of + separators and use it instead of the (cached and possibly stale) + ifs_cmap map and isifs macro. Fixes bug with -N stripping leading + whitespace reported by Clark Wang + + 11/25 + ----- +builtins/read.def + - read_builtin: make `i' volatile, since auto variables are technically + undefined after a longjmp, and a timeout on SIGALRM causes one. + Fix suggested by Dmitry Goncharov + + 11/27 + ----- +parse.y + - shell_getc: if we are reading input from a string, and we get the + ending '\0', and we are not expanding an alias, return EOF right + away. It might be an eval'ed string that has a syntax error. + Fixes bug reported by Dan Douglas + + 11/28 + ----- +subst.c + - expand_word_internal: if we're expanding a quoted string containing + a tilde as the first character of a word, only expand the tilde if + we're expanding an array subscript (Q_ARRAYSUB), not if we're + expanding any arithmetic expression (Q_ARITH). This fixes a + backwards compatibility issue with expressions like ~0 reported by + Bize Ma + +subst.c + - parameter_brace_expand_indir: if the variable is not special and + the indirect variable is unset (!variable where variable is unset), + report an error. This is a slight incompatibility with previous + versions, which did not differentiate between indirecting an unset + variable and an indirect expansion resulting in an unset variable. + Fixes omission reported by otenba@protonmail.com + + 11/30 + ----- +lib/readline/doc/{rluser.texi,readline.3},doc/bash.1 + - do-uppercase-version: since this doesn't actually exist, replace it + with do-lowercase-version, with the caveat that do-lowercase-version + results in undefined behavior if bound to a character that's + already lowercase. Suggested by Branden Robinson + + +lib/readline/doc/rluser.texi + - history-substring-search-forward: was misspelled as "substr-search"; + ditto for search-backward + +doc/bash.1 + - history-substring-search-{backward,forward}: add documentation, text + straight from readline.3 + +jobs.c + - initialize_job_control: if the terminal's process group is valid, + but the shell is not the foreground process, check for terminating + signals (like SIGHUP, which the kernel would send if the process + group were orphaned) during the loop where we try to stop the shell + if it's not in the foreground. Not a perfect solution; the kernel + might not send SIGHUP + + 12/1 + ---- +jobs.c + - initialize_job_control: only go through the SIGTTIN loop 16 times at + most before deciding we're in the background and probably a member of + an orphaned process group; set original_pgrp to the terminal's pgrp + (so the eventual give_terminal_to doesn't leave the terminal in the + wrong pgrp); and bail on job control initialization + +tests/run-all + - unset SHELLOPTS to avoid its options `polluting' the test + environment. Suggestion from Vladimir Marek + + +tests/execscript + - use $PWD/exec8.sub to protect against someone who has a cd command + in his bashrc. Report from Vladimir Marek + + + 12/2 + ---- +shell.c + - open_shell_script: call end_job_control before exiting the shell in + case we were run as `bash -i script' and there is a problem with + executing `script'. If we don't, the terminal ends up in the wrong + process group. Fix from Clark Wang + + 12/3 + ---- +parse.y + - read_comsub: if we look for a character following a `<' and it's + not `<' (indicating that we don't have to read a here-document), + make sure we push that character back and go through the loop again + so we note the right word start location. Fixes bug reported by + parasite parasite <42parasite@gmail.com> + +subst.c + - parameter_brace_expand_indir: clean up checks for unset variables to + minimize incompatibilities with previous versions + + 12/5 + ---- +lib/readline/history.c + - add_history: don't update history_length until all of the updates to + the_history are complete, so history_length is always consistent. + Report and fix from Hong Cho + +bashline.c + - bash_backward_shellword: fix to work better at the end of the line, + with multiple trailing whitespace characters. Inspired by report + from Kirill Timofeev + +Makefile.in + - bashbug: use `^' as the sed delimiter instead of `%'; some compilers + use `%' in CFLAGS. Report from Vladimir Marek + + + 12/6 + ---- +test.c + - test_unop: make sure op[1] != 0 before testing op[2] + - term: make sure argv[pos][1] != 0 before testing argv[pos][2]. Fixes + oob-read reported by Jerzy Kramarz + + 12/7 + ---- +lib/glob/glob.c + - glob_filename: assign the return value of realloc (results, ...) to + a temp pointer, so if realloc returns NULL, we make sure we free + results. Report from Kirill Timofeev + + 12/12 + ----- +lib/sh/shquote.c + - sh_backslash_quote: if FLAGS&2, backslash-quote other single-byte + characters that are in the current locale's character class + +builtins/printf.def + - printf_builtin: when processing the `%q' format, make sure to + backslash quote all characters by making sure that FLAGS + passed to sh_backslash_quote includes 2. Fixes issue for certain + iso-8859-1 locales where character 160 (octal 240, hex 0xa0) is a + non-breaking space. Report from Stephane Chazelas + + +lib/sh/eaccess.c + - sh_stat: if DEV_FD_STAT_BROKEN is defined, take /dev/fd/N and turn + it into a stat on file descriptor N, as if /dev/fd were not + available. This is the case on some old versions of SunOS. Report + and patch from Dmitry Goncharov + +config.h.in + - DEV_FD_STAT_BROKEN: add define + +configure.ac + - --enable-dev-fd-stat-broken: new command-line option, defines + DEV_FD_STAT_BROKEN if supplied at configure time + +doc/bashref.texi + - --enable-dev-fd-stat-broken: document new command-line option for + configure + +arrayfunc.c + - assoc_expand_once: new variable, declared here just because + +arrayfunc.h + - assoc_expand_once: extern declaration + - AV_NOEXPAND: new flag value for the array_value family of functions: + means to not run associative array subscripts through word expansion + +builtins/set.def + - unset_builtin: call unbind_array_element with assoc_expand_once as + third arg, controls whether we expand associative array subscripts + (if 1, we suppress the usual expansion). With accompanying shopt, + provides backwards compatible option to solve problem with quotes + and other characters in associative array subscripts pointed out + most recently by Mingye Wang (Arthur2e5) + +builtins/shopt.def + - assoc_expand_once: new option, controls value of internal variable + with the same name. Currently undocumented because I'm not completely + sold on the name + +expr.c + - evalexp: now takes a second argument, flags. Changed all callers in + multiple other files (builtins/let.def,execute_cmd.c,arrayfunc.c, + subst.c,test.c,variables.c) + +externs.h + - EXP_EXPANDED, new flag for second argument to evalexp + +builtins/let.def + - let_builtin: add EXP_EXPANDED to flags passed to evalexp + +execute_cmd.c + - execute_arith_command: add EXP_EXPANDED to flags passed to evalexp, + since the command string is run through expand_words_no_vars before + being evaluated + +expr.c + - set expression-global variable already_expanded if flags arg to + evalexp contains EXP_EXPANDED + - if assoc_expand_once option set and already_expanded flag set, pass + 1 in flags to array_variable_part to skip over quotes and expansions + in the subscript + - if those two variables set, pass AV_NOEXPAND as flag to + get_array_value to prevent word expansions on the subscript + +arrayfunc.c + - if flags passed to unbind_array_element includes 1, pass flag on to + skipsubscript so we don't expect matched quotes or process + expansions in the subscript + - if flags to array_value_internal include AV_NOEXPAND, pass 1 as flag + to array_variable_part to pass along to skipsubscript + - if flags to array_value_internal include AV_NOEXPAND, don't call + expand_assignment_string_to_string; just use the unexpanded subscript + to produce the key [THIS IS A WORK IN PROGRESS] + + 12/14 + ----- +subst.h + - ASS_NOEXPAND: assignment flag that inhibits expansion of associative + array subscripts + +variables.c + - bind_int_variable: takes new flags arg; flags are taken from the + ASS_ set of assignment flags, changed callers (bashline.c, expr.c, + pcomplete.c) + - bind_int_variable: if flags includes ASS_NOEXPAND, pass 1 as flag to + valid_array_reference and array_variable_part to pass along to + skipsubscript, so we don't try to skip over quoted strings in the + subscript + - bind_int_variable: pass flags along to assign_array_element + +variables.h + - bind_int_variable: updated extern declaration with new flags arg + +expr.c + - expr_bind_variable: if the assoc_expand_once option is enabled, and + the flags to evalexp indicate that we have already run the expression + through word expansion, pass ASS_NOEXPAND as flag to bind_int_variable + +arrayfunc.c + - assign_array_element: if flags includes ASS_NOEXPAND, pass 1 as flag + to array_variable_name to pass along to skipsubscript + - assign_array_element: if flags includes ASS_NOEXPAND, don't run an + associative array subscript through word expansion, just use as-is + +subst.c + - param_expand: call evalexp with EXP_EXPANDED flag for arithmetic + substitution because the string has already been expanded with + expand_arith_string + + 12/15 + ----- +builtins/read.def + - read_builtin: use value of assoc_expand_once for valid_array_reference + as with other uses + - bind_read_variable: if assoc_expand_once is set, pass ASS_NOEXPAND + to assign_array_element + +general.c + - assignment: instead of checking whether flags == 0 to allow a `[', + explicitly check for (flags&1) to disallow it. This leaves the door + open for additional flag values + +builtins/printf.def + - printf_builtin: use value of assoc_expand_once for + valid_array_reference as with other uses + - bind_printf_variable: if assoc_expand_once is set, pass ASS_NOEXPAND + to assign_array_element + + 12/16 + ----- +builtins/history.def + - change history -d option to handle negative arguments; negative + arguments offset from the end of the history list (last_position + 1 + so history -d -1 deletes the history -d command that just got + added). Original patch from Piotr Grzybowski + +doc/bash.1,lib/readline/doc/hsuser.texi + - documented new behavior of negative offsets for `history -d' + + 12/17 + ----- +lib/readline/history.c + - remove_history: use memmove to move the history list around instead + of a loop that copies pointers one at a time, similar to add_history + + 12/19 + ----- +configure.ac + - linux: make sure PGRP_PIPE is defined unconditionally for all kernel + versions greater than 2.3.* + +lib/readline/history.c + - clear_history: when clearing the history, reset history_base to 1 + (its default) + - remove_history_range: new function, removes a set of history entries + and returns them all for deallocation + +lib/readline/history.h + - remove_history_range: extern declaration + + 12/20 + ----- +execute_cmd.c + - eval_arith_for_expr: pass EXP_EXPANDED to evalexp, since we run the + expression through expand_words_no_vars + + 12/21 + ----- +input.c + - b_fill_buffer: when read returns EOF or error, and we reset the + buffer and pointers, reset the input pointer to 0. Fixes issue + reported by Stephane Chazelas + + 12/22 + ----- +arrayfunc.[ch],subst.c + - array_expand_index: added new FLAGS argument, reserved for future use, + changed callers + + + 12/24 + ----- +variables.c + - can_optimize_assignment,optimized_assignment: see if we can detect + whether or not we're trying to append a string to a string variable, + and optimize that using realloc/strcpy. Based on a log-ago + suggestion from Aharon Robbins + + 12/27 + ----- +builtins/help.def + - help_builtin: don't pass return value from ngettext() directly to + printf + + 12/28 + ----- +sig.c + - set_signal_handler: set SA_RESTART for SIGWINCH, so window size + changes don't interrupt open/read/write. Suggested by + Andriy Prystupa back in 10/2016 + + 12/30 + ----- +execute_cmd.c + - coproc_pidchk: if MULTIPLE_COPROCS, call cpl_search to find coproc + associated with pid, don't remove it from the list with cpl_delete. + Just mark as dead and wait for coproc_reap/cpl_reap to take care + of disposing it + - execute_coproc: NEW FEATURE: run the coproc name through word + expansion before creating the coproc; this allows unique coprocs + to be created in loops. Originally requested way back in 2012 by + Erik Brandsberg + +command.h + - subshell_com: now has a line number member: line + +make_cmd.c + - make_subshell_command: assign current line number (line number of the + ending right paren) to `line' member + +copy_cmd.c + - copy_subshell_command: copy the `line' member + +execute_command.c + - execute_command_internal: when executing a user subshell (`(command)'), + set the line number and line number for the ERR trap from the line + number saved in the subshell command struct. Fix from + Eduardo A. Bustamante López + - execute_arith_command: set line number for ERR trap from line number + saved in the arith command struct. Fix from + Eduardo A. Bustamante López + - execute_cond_command: set line number for ERR trap from line number + saved in the cond command struct. Fix from + Eduardo A. Bustamante López + +variables.c + - bind_variable_internal: move can_optimize_assignment call to the + right place + + 12/31 + ----- +variables.c + - find_variable_nameref: treat a circular variable reference as + referring to a variable of that name in the global scope (for now), + if one exists. PROVISIONAL change: inspired by suggestion back in + 6/2016 by Grisha Levit + + 1/2/2017 + -------- +{expr,general,hashcmd}.c + - include flags.h for flag values + +make_cmd.c + - include shell.h instead of the files it includes + +flags.h + - new extern declarations for want_pending_command, read_from_stdin + +subst.h + - add extern declaration for expanding_redir, assigning_in_environment + +trap.h + - add extern declaration for running_trap + +execute_cmd.h + - added extern declarations for variables declared in execute_cmd.c, + changed files that declare lots of extern variables + +shell.h + - added extern declarations for variables declared in shell.c, + changed files that declare lots of extern variables + +parser.h + - added extern declarations for variables declared in parse.y, + changed files that declare lots of extern variables + +[lots of changes to reduce the number of extern declarations in C and DEF files] + +parse.y + - xparse_dolparen: need ALIAS or DPAREN_ARITHMETIC to be defined to + use STRING_SAVER + + 1/3 + --- +sig.c + - termsig_handler: don't call end_job_control if subshell_environment + indicates that we're in a command or process substitution. + Provisional fix for bug reported by Russell King + +jobs.c + - end_job_control: only attempt to give the terminal back to + original_pgrp if job_control != 0; don't test interactive_shell + +execute_cmd.c + - execute_disk_command: call QUIT after search_for_command, since + the only time QUIT gets called is when the path is actually + searched. It doesn't happen for an absolute pathname. Fix for + bug reported by Russell King + + 1/16 + ---- +lib/glob/glob.c + - extglob_skipname,wextglob_skipname: if we don't find a reason to + not skip the name in any subpattern (r returns 0 for any subpattern), + return 1 because we should skip the name + - extglob_skipname,wextglob_skipname: if we don't find a reason to + not skip the name in any subpattern, but the first part of the extglob + pattern is a wildcard (`*(pat)'), check the rest of the pattern, if + any, to decide whether or not to skip the name. Fixes bug reported + by Grisha Levit + +lib/glob/glob_loop.c + - CHAR -> GCHAR (unsigned char); change uses of CHAR to GCHAR + +lib/glob/glob.c + - wchkname -> wskipname + - wskipname: now takes a third `flags' argument, like the other variants + of skipname + + 1/17 + ---- +redir.c + - here_document_to_fd: set the file descriptor open for writing to the + here document to be close-on-exec. Fixes bug reported by + Siteshwar Vashisht + + 1/18 + ---- +{gmisc,gm_loop}.c + - match_pattern_char,match_pattern_wchar: moved to gm_loop.c (new file), + compile twice for single and wide characters as with the rest of + the functions + - umatchlen,wmatchlen: ditto + - extglob_pattern_p: move to gm_loop.c, generalize for regular and + wide-char versions + + 1/19 + ---- +lib/readline/complete.c + - stat_char: fix small memory leak if stat/lstat returns -1 + +bashline.c + - bash_filename_stat_hook,bash_directory_completion_hook: make sure + expand_prompt_string is caled wth W_NOPROCSUB flag + - directory_exists: don't dequote the filename passed as an argument; + this function should never get quoted pathnames + +subst.c + - expand_word_internal: when calling expand_word_internal recursively + after reading a double-quoted string, make sure the W_NOCOMSUB and + W_NOPROCSUB flags make it to the recursive invocation. Fixes bug + reported by Jens Heyens + + 1/23 + ---- +lib/readline/signals.c + - _rl_orig_sigset: original signal mask, set and restored by + rl_set_signals (rl_clear_signals doesn't block signals). If we + are not installing signal handlers, just save signal mask each + time rl_set_signals is called + +lib/readline/input.c + - rl_getc: use _rl_orig_sigmask in the call to pselect(), so we block + the set of signals originally blocked by the calling application. + Fixes bug reported by Frédéric Brière + +parse.y + - yy_readline_get: try to unset NONBLOCK mode on readline's input + file descriptor before calling readline(). Inspired by report from + Siteshwar Vashisht + + 1/30 + ---- +parse.y + - parse_comsub: don't unconditionally set the LEX_WASDOL flag when we + see a `$'; we should toggle it to accommodate things like $$. + Fixes bug reported by Christian Weisgerber + - parse_matched_pair: do the same thing with LEX_WASDOL + + 2/1 + --- +jobs.h + - JWAIT_PERROR,JWAIT_FORCE: new defines for the wait_for_ family of + functions + +jobs.c + - wait_for_job, wait_for_any_job: take new flags argument for use by + the wait builtin + - wait_for_job: if JWAIT_FORCE flag supplied, loop waiting for job to + terminate instead of change state + - wait_for_single_pid: if JWAIT_FORCE flag supplied, loop waiting for + child process to terminate instead of change state + +builtins/wait.def + - takes a new `-f' option, signifying to wait until the specified job + or process terminates, instead of changes state + +doc/{bash.1,bashref.texi} + - wait: document the new -f option and its behavior when job control + is enabled + - job control: add a paragraph describing how the wait builtin changes + behavior when job control is enabled: it returns when a job changes + state + + 2/2 + --- +examples/loadables/fdflags.c + - fdflags: new loadable builtin to set and unset file descriptor flags + (such as non-blocking, though bash undoes that) for descriptors bash + has open. Developed in consultation with Christos Zoulas + + + 2/3 + --- + +lib/readline/text.c + - rl_previous_screen_line: attempt to move to the same column on the + previous screen line of the current readline buffer by moving back + a number of characters equal to the screen width + - rl_next_screen_line: attempt to move to the same column on the + next screen line of the current readline buffer by moving forward + a number of characters equal to the screen width. Both originally + suggested by Hans Ginzel + +lib/readline/readline.h + - rl_{next,previous}_screen_line: extern declarations + +lib/readline/funmap.c + - {next,previous}-screen-line: new bindable command names + +lib/readline/doc/{rluser.texi,readline.3} + - {next,previous}-screen-line: document behavior, including limitations + + 2/5 + --- +lib/readline/input.c + - rl_read_key: when reading input from a macro, make sure to return + the next character as an unsigned char, so we handle multibyte + character sequences correctly. Report and fix from Grisha Levit + + + 2/6 + --- +shell.c + - --pretty-print: new invocation option, currently undocumented, dumps + a pretty-printed version of a shell script given as an argument to + stdout + - main: call pretty_print_loop() if we're in pretty-printing mode in + a non-interactive shell + +eval.c + - pretty_print_loop: new function, similar to reader_loop, reads + commands and prints them by displaying the result from + make_command_string() + +externs.h + - pretty_print_loop: new extern declaration + + 2/9 + --- +doc/{bash.1,bashref.texi} + - here strings: correct documentation to note they do not undergo + brace expansion. Report from Conor McCarthy + + 2/9 + --- +lib/readline/display.c + - expand_prompt: instead of recomputing the line break offsets for + prompts that span multiple screen lines on every call to rl_redisplay, + do it here. Manage a local array local_prompt_newlines; set an offset + every time `physchars' hits a multiple of the screen width. Inspired + by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843819 + - rl_redisplay: don't calculate multi-line prompt line break indices + here; use the values calculated by expand_prompt + - rl_{save,restore}_prompt: save and restore local_prompt_newlines + + 2/11 + ---- +lib/readline/mbutil.c + - _rl_find_prev_mbchar_internal: since we're traversing the string + from the beginning, shortcut non-multibyte characters in a UTF-8 + locale + +parse.y + - parse_comsub: if we are parsing a here document with a quoted + delimiter (LEX_QUOTEDDOC), we should not remove + pairs from the body of the here document. Need to add LEX_QUOTEDDOC + to the values in tflags when calling shell_getc. Fixes bug reported + by Michael Homer , patch was originally + contributed by Geir Hauge + + 2/15 + ---- +jobs.c + - bgp_add: if hashed pid collides with bgpids.head index, print a + warning and move to the next index. Attempt to avoid collision + problem reported by Graham Northup + + 2/17 + ---- +subst.c + - process_substitute: call remove_quoted_escapes on the command string + like command substitution does, since the string will be run through + the parser again. Fixes bug reported by David Simmons + + +config-top.h + - STATIC_PATH_VALUE: new config variable, undefined by default + +variables.c + - shell_initialize: if STATIC_PATH_VALUE is defined, use it to set the + PATH variable at shell startup, overriding the environment and any + value for DEFAULT_PATH_VALUE. Based on a suggestion from + Lonnie Abelbeck + + 2/18 + ---- +shell.c + - maybe_make_restricted: clear the hash table before making the PATH + variable read-only by calling stupidly_hack_special_variables. + Suggestion from Lonnie Abelbeck + +subst.c + - expand_string_for_pat: change expansion of WORD in ${param[%[%]][#[#]]word} + to use this new function, initially identical to + expand_string_for_rhs + - getpattern: use expand_string_for_pat to expand the pattern + + 2/19 + ---- +subst.c + - expand_string_for_rhs: now that this is only used to expand the RHS + of the various non-pattern ${paramOPword} expansions, set + expand_no_split_dollar_star depending on whether or not the entire + brace expansion is going to be subjected to word splitting: if it's + quoted or if IFS is set but null, we will not be splitting so we set + this to 1 and let $* expand to separate fields separated by a space. + This was heavily debated back in October 2014 and resulted in Posix + interp 888. Reported by Martijn Dekker + + 2/20 + ---- +subst.c + - expand_string_for_rhs: now takes `op' (brace expansion operator) as + an additional argument; changed call in parameter_brace_expand_rhs + - expand_string_for_rhs: make sure to set expand_no_split_dollar_star + if `op' is `=', since we are supposed to preserve the assignment + statement expansion semantics on the RHS of ${param=word} + +jobs.c + - bgp_delindex: make sure to set ps->pid to NO_PID so we more + effectively remove it from the hash table. It shouldn't matter as + long as nothing in pidstat_table points to it, but better to be safe + - bgp_delete,bgp_search: generalize previous collision detection to + loop detection: abort search if we are going to go back to the + first index we tried + + 2/21 + ---- +lib/readline/vi_mode.c + - rl_vi_bword: if we're trying to move backward to non-whitespace + in a line that begins with whitespace, make sure we don't move + point to 0 and test memory locations before the start of the + buffer. Report and fix from Jason Hood + +lib/readline/display.c + - expand_prompt: if _rl_screenwith == 0, call rl_reset_screen_size to + initialize it. If it's still 0 after that, guess that the screen + width is 80 and use that to guess how many screen lines the prompt + consumes + +lib/readline/readline.c + - readline_internal_setup: if in emacs editing mode, and we are + showing the editing mode in the prompt, call _rl_reset_prompt() to + make sure that the updated setting of _rl_show_mode_in_prompt + (presumably set in an inputrc file) is reflected in the redisplay + performed by rl_callback_newline via readline_internal_setup. + Fix from Jason Hood + + 2/22 + ---- +builtins/complete.def + - print_one_completion,print_compopts: make sure to display the + `nosort' and `noquote' options if they've been set for a particular + compspec. Fix from Grisha Levit + +builtins/read.def + - read_builtin: if -e is supplied, read needs to free rlbuf before + returning, since it uses discard_unwind_frame at that point. Bug + and fix from ZhangXiao + +execute_cmd.c + - execute_for_command: when using a nameref as the for loop control + variable, make sure we check for readonly namerefs and make sure + that we force bind_variable to enforce restrictions on nameref + assignments. Fix from Grisha Levit + + 2/23 + ---- +general.c + - make_absolute: convert deprecated cygwin_conv_to_full_posix_path + to cygwin_conv_path (CCP_WIN_A_TO_POSIX, ...) + +{shell,variables}.c,config-top.h + - modify change from 2/17: rename STATIC_PATH_VALUE to RBASH_STATIC_PATH_VALUE; + don't use it in shell_initialize; set PATH to it just before + imposing restricted shell restrictions + + 2/24 + ---- +subst.c + - expand_string_for_rhs: revert change from 2/19 concerning setting + expand_no_split_dollar_star so we are consistent with the Posix + examples. This anticipates Martijn Dekker initiating an austin + group discussion about this case + + 2/25 + ---- +pcomplete.c + - gen_shell_function_matches: if COMPREPLY is an associative array, + don't coerce it to an indexed array, which will fail to produce any + matches anyway. Report from Grisha Levit + - bind_comp_words: if COMP_WORDS exists as a nameref variable, ignore + the nameref attribute. Report from Grisha Levit + + +subst.c + - parameter_brace_expand: if expand_no_split_dollar_star is set, make + sure chk_atstar treats ${var[*]} as quoted by passing Q_DOUBLE_QUOTES + as the second argument. Fixes differing treatment of $* and ${v[*]} + reported by Grisha Levit , because otherwise + *contains_dollar_at gets set to 1 and the word is inappropriately + split + + 3/1 + --- +subst.c + - expand_word_list_internal: if a variable assignment fails (e.g., due + to a readonly variable) in a non-interactive posix mode shell, don't + abort the shell if the assignment is being performed by the command + builtin, even if it's something like `command eval v=1'. Fixes + RedHat bug https://bugzilla.redhat.com/show_bug.cgi?id=1389838 + (reported by Denys Vlasenko) + + 3/3 + --- +builtins/shopt.def + - set_compatibility_level: make sure that changing the compatibility + level sets or modifies BASH_COMPAT. Fixes bug reported by + Stephane Chazelas + +lib/glob/smatch.c + - is_cclass: broke into two functions: is_valid_cclass and cclass_test, + for future expansion. No functionality change + +lib/glob/sm_loop.c + - BRACKMATCH: when testing a character against a character class name, + use the unfolded (original) character, since we're not performing a + comparison. This is what glibc does. Fixes bug reported by + Lukáš Bainka + + 3/4 + --- +doc/{bash.1,bashref.texi} + - note that the arguments to -eq and the rest of the arithmetic + operators are evaluated as expressions when using [[. Report from + Rob la Lau + + + 3/7 + --- +lib/readline/display.c + - update_line: completely rewrote the code that handles line wrapping + in the presence of multibyte/double-width characters; punts to a + dumb update in cases where the number of screen positions doesn't + match + - update_line: in one case, where we are deleting characters from the + line, if we are writing a non-space into the last screen character + position, note that we are no longer using a space as a placeholder + for a line wrap where there is a multi-width character that won't + fit on the screen line (wrapped_line[current_line+1] = 0) + + 3/10 + ---- +lib/readline/readline.c + - bind_arrow_keys_internal: add default key bindings for control- + arrow keys, suggested by Per Bothner + + 3/13 + ---- +doc/{bash.1,bashref.texi} + - clarify the prompt strings the undergo expansion (PS0, PS1, PS2, and + PS4) before being displayed. Based on a report from Grisha Levit + + + 3/14 + ---- +input.c + - bufstream_ungetc: return EOF if being asked to unget a character to + a NULL buffer + - buffered_getchar: check buffered_fd is valid and buffers[buffered_fd] + is non-NULL before trying to dereference. Fixes bug reported by + floyd + +execute_cmd.c + - execute_null_command: if we fork to execute the command, the subshell + is not interactive + - execute_null_command: for safety's sake, if a redirection attached + to a null command affects fd 0 or the fd the shell is reading for + input, and the redirection can potentially change or close that file + descriptor, force a fork so the redirection is done in a subshell + + 3/15 + ---- +lib/readline/display.c + - update_line: if we have to output some bytes, and we are outputting + the prompt string, make sure we correct _rl_last_c_pos if we are + at the wrap offset -- what if all of the characters in the prompt + are invisible, so the visible length is 0? Fixes display bug + reported by Grisha Levit + +execute_cmd.c + - undo_partial_redirects: new function, performs redirections specified + in redirection_undo_list and disposes of them. Intended to be used + to unwind redirections performed before a redirection error + - dispose_partial_redirects: new function, disposes of + redirection_undo_list and nulls the list + - execute_command_internal: use undo_partial_redirects + +execute_cmd.h + - undo_partial_redirects: extern declaration + - dispose_partial_redirects: extern declaration + +subst.c + - exp_jump_to_top_level: if we are throwing an expansion error while + expanding a redirection (expanding_redir != 0), undo any undoable + redirections by calling undo_partial_redirects() so we don't leave + any in place + +variables.c + - initialize_shell_variables: if SHELLOPTS is in the environment, + unset the readonly attribute on any existing variable with that + name. It may have been created by processing a -o option on the + command line. Fixes issue reported by Stephane Chazelas + + + 3/16 + ---- +lib/readline/histfile.c + - read_history_range: short-circuit and do nothing if the history file + is of 0 size + - read_history_range: make sure the buffer is zero-terminated so the + timestamp tests work right for history files of 1 character. Report + and recommended fix from Denis Martinez + +lib/readline/complete.c + - compute_lcd_of_matches: when trying to compute the common prefix + of a set of matches while performing case-insensitive completion + matching, don't sort the match list unless rl_sort_completion_matches + is non-zero. Fixes problem reported by Roee Bar + + 3/18 + ---- +subst.c + - extract_dollar_brace_string: handle process substitution embedded in + a ${...} expansion in the same way as command substitution. Reported + by D630 + +parse.y + - LEX_GTLT: new flag, set by parse_matched_pair when a `<' or '>' is + read + - parse_matched_pair: handle an embedded process substitution like an + embedded command substitution if we are parsing an array index or + a dollar-brace expansion. Reported by D630 + + 3/21 + ---- +subst.h + - ASS_NOEVAL, ASS_NOLONGJMP: new values for assignments, used by + make_variable_value + +variables.c + - make_variable_value: ASS_NOEVAL: if this is set, don't attempt + arithmetic evaluation or case modification, just produce the value + (still honor ASS_APPEND) + - make_variable_value: ASS_NOLONGJMP: don't longjmp back to top_level + if arithmetic evaluation fails due to a syntax error + - bind_variable_internal: make sure aflags is passed to all calls to + make_variable_value + - push_temp_var: add ASS_NOLONGJMP to the flags passed to + bind_variable_internal. Fixes bug reported by D630 + +bashline.c + - bash_execute_unix_command: don't bother to attempt optimization by + checking whether the call to parse_and_execute changes $READLINE_LINE; + it can be defeated by the new code that optimizes appends to string + variables. Bug reported by Grisha Levit + + 3/22 + ---- +subst.c + - expand_string_for_rhs: re-apply change from 2/19 based on discussion + on the austin-group mailing list about how unquoted ${var-$*} + expands when IFS is null. Originally reported by Martijn Dekker + + + 3/25 + ---- +parse.y + - read_token_word: if we read a WORD immediately after a CASE, FOR, or + SELECT, increment `expecting_in_token' to note that we're going to + be reading IN as the next non-newline token + - special_case_tokens: if we're expecting an IN (expecting_in_token > 0) + and we have an "in", return IN and decrement expecting_in_token. This + is a better implementation of Posix grammar rule 6 than the previous + code in that function (which is still there for posterity, but should + eventually be removed). Fixes bug reported by Torka Noda + + +subst.c + - string_list_pos_params: if the expansion is not quoted, and IFS is + null, return a string containing the quoted positional parameters + separated by spaces. Callers know what to do with the string + - parameter_brace_substring,parameter_brace_remove_pattern, + parameter_brace_transform,parameter_brace_patsub,parameter_brace_casemod: + for the VT_POSPARMS case, after calling the operator-specific + expansion function, which eventually calls string_list_pos_params, + leave the returned string alone, since it's already quoted properly + - parameter_brace_expand: after calling the above functions to perform + expansions, if the expansion is being performed on an unquoted $* + when IFS is null, set the W_SPLITSPACE flag in the return WORD_DESC + so that splitting on spaces is performed on the already-quoted word. + Fixes bug reported by Grisha Levit + + 3/28 + ---- +subst.c + - process_substitute: change so the subshell doesn't inherit the 'v' + option, like command substitution now does (as of bash-4.4). + Suggested by Grisha Levit + + 3/30 + ---- +subst.c + - parameter_brace_casemod: now takes a pflags parameter, like + parameter_brace_patsub; changed callers + - parameter_brace_transform: now takes a pflags parameter, like + parameter_brace_patsub; changed callers + - pos_params_pat_subst,pos_params_modcase: if mflags indicates we're + on the rhs of an assignment statement and not going to perform + word splitting, we're expanding $*, and $IFS is null, make sure + string_list_pos_params treats the expansion as double-quoted, so + the positional parameters will be concatenated. Fixes bug reported + by Grisha Levit + + 3/31 + ---- +doc/{bash.1,bashref.texi} + - add notes to the description of pipelines emphasizing that each + element of a pipeline is executed in a subshell, referring to the + description of a command execution environment, and that the + lastpipe option can modify that behavior. From a discussion with + Jean Delvare + + 4/1 + --- +subst.c + - expand_word_internal: set had_quoted_null to note for later if we + expand '', "", or "$x" when x is unset + - expand_word_internal: if we expand "$param" (or "${param}") and we + come back with a single word with the W_HAVEQUOTEDNULL flag set, + make sure we set had_quoted_null to remember it for later. In this + case, if we already have seen a quoted null and we expanded $@ in + this (sub)string expansion, we don't want to do any of the special + $@ handling. In particular, we don't want to set *expanded_something, + because that will result in word splitting and quoted null removal. + Fixes bug reported by Grisha Levit + - parameter_brace_patsub: when expanding ${*/pat/sub} in the case + where ifs_is_null != 0 and (pflags & PF_NOSPLIT2) (meaning we aren't + going to be doing word splitting), pass MATCH_ASSIGNRHS so we do + the right thing in this case. Part of a set of cases inspired by + Grisha Levit + - param_expand: case '*': if we are on the rhs of an assignment + (PF_ASSIGNRHS) and ifs is unset, and $1 == " ", we need to make sure + string_list_dollar_at gets called with Q_DOUBLE_QUOTES so it quotes + the positional parameters before joining them into a string with + string_list_internal. Otherwise, that first space gets removed by + the implicit word splitting that gets performed. Reported by + Grisha Levit + +array.c + - array_patsub,array_modcase: handle ${A[*]} identically to $* when + not quoted and IFS is null (separate with spaces). Makes things + like ${A[*]/x/y} behave the same as ${*/x/y} when IFS is null + +subst.c + - parameter_brace_patsub,parameter_brace_casemod: if expanding ${A[*]} + when the match is on the rhs of an assignment statement (PF_ASSIGNRHS) + and ifs is null, make sure the match is performed as if it were + quoted + - parameter_brace_substring: now takes a PFLAGS argument + - parameter_brace_substring: if expanding $* in a context where we + don't want to do word splitting (expand_no_split_dollar_star && + PF_NOSPLIT2), make sure we expand $* as if it were quoted + - parameter_brace_substring: if expanding an unquoted $* on the rhs of + an assignment statement when IFS is null, make sure we expand the $* + as if it were quoted + + 4/4 + --- +doc/{bash.1,bashref.texi} + - read: document that a delim argument of '' terminates each line when + a NUL character appears + + 4/5 + --- +subst.c + - parameter_brace_expand_word: handle case where unquoted $@ is + expanded in a context where word splitting is not performed (PF_NOSPLIT2) + and IFS is not equal to the standard value + - param_expand: handle case where unquoted $@ is expanded in a context + where word splitting is not performed (PF_NOSPLIT2) and IFS is not + equal to the standard value. Fixes bug with IFS == $1 when expanding + unquoted $@ reported by Grisha Levit + + 4/7 + --- +subst.c + - pos_params_pat_subst: if MATCH_ASSIGNRHS is set, don't expand $* + as quoted unless expand_no_split_dollar_star is also set. Fixes + expansion bug reported on 4/4 by Grisha Levit + - parameter_brace_transform: if we transform unquoted A[@] or A[*] + when IFS is null, don't quote the result of array_transform in the + same way we don't quote the result of parameter_list_transform, + since it will come back quoted. Fixes bug reported by + Grisha Levit + - list_transform: if we transform unquoted $* or ${a[*]} when IFS is + null and expand_no_split_dollar_star is non-zero, call + string_list_pos_params with Q_DOUBLE_QUOTES to inhibit splitting. + We do this in all cases except @Q, which is inconsistent but more + intuitive. + Fixes bug reported by Grisha Levit + + 4/8 + --- +builtins/read.def + - read_mbchar: if unbuffered == 2, we are running read -N and need to + use zreadn to read the rest of the multibyte char, since the + previous call to zreadn may have buffered characters. Fixes bug + reported by Stephane Chazelas + +pathexp.h + - QGLOB_CTLESC: new flag for quote_string_for_globbing: means to turn + CTLESC CTLESC (quoted CTLESC that's usually removed as part of + word splitting or quote removal) into CTLESC + +pathexp.c + - quote_string_for_globbing: if QGLOB_CTLESC is present in flags, + turn CTLESC CTLESC into CTLESC, even if the first CTLESC is preceded + by a backslash. Callers can't do this because the remaining CTLESC + will be treated as a quoting character and turned into a backslash + +execute_cmd.c + - execute_case_command: if the pattern is not quoted, make sure to tell + quote_string_for_globbing to turn CTLESC CTLESC into CTLESC by + passing QGLOB_CTLESC. Fixes bug reported 4/2 by Martijn Dekker + + + 4/9 + --- +subst.c + - string_transform: after calling ansiexpand for the `E' transformation, + need to call dequote_escapes because ansiexpand assumes it is being + called by the parser and arranges for ansicstr to quote CTLESC and + CTLNUL with CTLESC. Reported by Grisha Levit + +variables.c + - mk_env_string: when exporting functions, run them through + dequote_escapes because any strings containing CTLESC or CTLNUL are + still quoted with CTLESC. Reported by Grisha Levit + + +subst.[ch] + - quote_escapes,dequote_escapes: now take const char * argument + +execute_cmd.c + - execute_intern_function: if the function name contains CTLESC, run + it through dequote_escapes just in case it got CTLESC quoting + CTLESC or CTLNUL from the parser + + 4/11 + ---- +eval.c + - reader_loop: make sure PS0 is expanded and displayed before + incrementing the command number + +parse.y + - prompt_history_number: function to make history number as reported + by \!, or posix mode !!, be the same index that the (possibly multi- + line) command will be stored with. The history library increments + history_offset as soon as a new line is entered, and it's up to the + history code to store the second and subsequent lines of a command + in the same history entry. If we are expanding PS0 or PS4, or + a ${var@P} expansion, we're already past the history entry no + matter what. Inspired by patch from Grisha Levit + + - decode_prompt_string: call prompt_history_number + - decode_prompt_string: if expanding PS4 or ${var@P}, make the + command number the same as reported by PS0/PS1/PS2 + + 4/12 + ---- +support/Makefile.in + - clean: remove man2html.o as part of this production instead of + waiting until `distclean'. Reported by chrlis + +subst.c + - string_list_pos_params: if we are expanding $* in a context where + IFS is null and expand_no_split_dollar_star is set (no word + splitting), use string_list_dollar_star to force the positional + parameters to be joined without first separating them into a list + and attempting to join them later. Fixes problem with constructs + like ${var=${*:1}}, pointed out by Grisha Levit + . This undoes change to @Q from 4/7, so + list_transform change reverted + + 4/19 + ---- +builtins.h + - added BUILTINS_H include guard + +examples/loadables/Makefile.in + - install loadables.h as sample include file, along with Makefile.inc + + 4/23 + ---- +bashline.c + - maybe_make_readline_line: don't try to do anything if the passed + NEW_LINE is NULL. Report from Jaren Stangret , + fix from Eduardo Bustamante + + 4/24 + ---- +parse.y + - xparse_dolparen: if the current token (the last thing read_token + returned to yylex) is shell_eof_token, assume that it is the new + bison lookahead token and clear it. Fixes bug reported by + Werner Fink + + 4/25 + ---- +doc/{bash.1,bashref.texi} + - cmdhist: clarify that this option only has an effect if history is + enabled. Suggested by Matthew Braun + + 4/26 + ---- +jobs.c + - wait_for: if a non-interactive shell with job control enabled (set -m) + detects that a foreground job died due to SIGINT, act as if the shell + also received the SIGINT. Prompted by an austin-group-l discussion + - waitchld: run SIGCHLD trap for each child exited even if job control + is not enabled when in Posix mode. Prompted by an austin-group-l + discussion + + 4/27 + ---- +lib/readline/histfile.c + - read_history_range: if the history file is empty, free the history + filename before returning. Report and fix from Eduardo Bustamante + + +lib/readline/bind.c + - rl_parse_and_bind: make sure there is something, even if it's a + quoted empty string, before the `:' in a key binding. Report from + Eduardo Bustamante + - rl_parse_and_bind: if the right side of a key binding starts with a + quote, make sure there's a matching close quote before treating it + as a macro definition + - rl_translate_keyseq: if a key sequence ends with \C- or \M- (or + \C-\M-) make sure we break out of the loop if moving to the character + to be translated is a NUL. Old code did this only in the \C-\M- + case. Report from Eduardo Bustamante + + 4/28 + ---- +lib/glob/sm_loop.c + - GMATCH: implement a clever technique from glibc that avoids + backtracking past a `*' if we've already chosen to use it and need + matches beyond it. Look at https://research.swtch.com/glob for a + longer explanation. This results in a significant speedup for globs + with multiple instances of `*', especially with more than 4. + + 5/2 + --- +lib/readline/bind.c + - rl_translate_keyseq: make sure a trailing backslash in the key + sequence is preserved. Report from Eduardo Bustamante + + + 5/3 + --- +builtins/builtin.def + - builtin_builtin: make sure to set this_shell_builtin to the builtin + command being executed, overwriting `builtin'. Leave + last_shell_builtin alone. Fixes bug reported by Luiz Angelo Daros + de Luca + +jobs.c + - waitchld: modify change of 4/26 to run SIGCHLD traps even if job + control is not enabled + +lib/readline/misc.c + - rl_get_previous_history: if we didn't find a previous history entry + to use, call rl_maybe_unsave_line before returning because we + aren't going to use the saved line, and it has the same undo list + as rl_undo_list. Fixes fuzzing bug reported by Eduardo Bustamante + + - rl_get_{next,previous}_history: if there is no history list, don't + bother doing anything + + 5/4 + --- +expr.c + - popexp: if we error out due to stack underflow, make sure to zero out + expression and lasttp; they may contain undefined values we don't + want evalerror to print + - expr_unwind: handle expr_depth decrementing below zero + - evalexp: restore the old value of evalbuf even if we error and + longjmp; we may have called evalexp recursively + - evalerror: make sure expression is non-NULL before trying to print it. + These fix fuzzing bug reported by Eduardo Bustamante + , happens only in cases where we don't longjmp on + a fatal expansion error + + 5/5 + --- +parse.y + - read_token_word: when checking for a word that's a target of a + redirection, we can potentially call valid_array_reference, which + can end up calling the parser recursively. If it does that, we + need to make sure that yylval.word doesn't change, so we set it back + to the_word. Fixes another fuzzing bug + +parse.y + - arith_for_command: make syntax errors in the arithmetic for command + (signaled by make_arith_for_command returning NULL) more like + language syntax errors by calling YYERROR. Avoids complicated + attempts at error recovery and dealing with NULL returns from + command productions. Pointed out by Eduardo Bustamante + + +lib/readline/kill.c + - _rl_copy_to_kill_ring: make sure the current slot in the kill ring + has something in it, even if the last command was a kill, before + trying to modify it. Another fuzzing bug + + 5/6 + --- +builtins/read.def + - read_builtin: if we see a backslash when not in raw mode (not -r), + only back up `i' when we read the next character if we know we added + a CTLESC the last time through the loop (skip_ctlesc == 0), + especially if i == 0. Another fuzzing bug from Eduardo Bustamante + + + 5/8 + --- +builtins/read.def + - read_mbchar: handle zreadn/zreadc/zread returning EOF in the middle + of an incomplete multibyte sequence. Fixes another fuzzing bug + - read_builtin: use mb_cur_max instead of constant 4 when deciding + whether the next character can exceed the number of bytes available + in input_string + +lib/readline/input.c + - MinGW: include before . Fix from Eli Zaretskii + + +builtins/read.def + - read_builtin: if we get input from readline, we need to get the + remainder of a multibyte character from rlbuf instead of calling + read_mbchar. Bug reported by Eduardo Bustamante + + 5/9 + --- +parse.y + - token_is_assignment: use the allocated buffer approach in all cases, + not just if we're not using bash malloc. This avoids the assignment + to t[i+1] writing beyond the end of the allocated token if + i == token_buffer_size - 1. Another fuzzing bug + - xparse_dolparen: if parse_string returns < 0, we clear out the + current shell_input_line before performing a longjmp, since we're + abandoning parsing of this command. This is consistent with how + the parser resynchronizes after other syntax errors + - GRAMMAR: add 'error yacc_EOF' production to handle a syntax error + that's immediately followed by an EOF after resynchronization. + Fixes another fuzzing bug + + 5/10 + ---- +lib/readline/text.c + - _rl_set_mark_at_pos: don't let the mark be set to a position < 0. + Fixes a fuzzing bug + - rl_exchange_point_and_mark: don't do anything if the mark is already + less than 0 + + 5/12 + ---- +lib/readline/rlmbutil.h + - wchar_t: make sure this is defined as int if multibyte characters + aren't supported + +lib/readline/text.c + - _rl_change_case: don't force use of ascii toupper and tolower if + isascii returns true; it's not defined to work on characters outside + the 0..255 (really 0..127) range. Bug reported by + Eduardo Bustamante + + 5/14 + ---- +lib/readline/text.c + - rl_change_case: handle case where the old and new characters (after + the case change) are not the same number of bytes. Pointed out in + http://lists.gnu.org/archive/html/bug-bash/2015-01/msg00091.html + +lib/readline/display.c + - expand_prompt: use `ret' as first parameter to _rl_find_prev_mbchar + since that needs the base of the array. Bug from fuzzing reported by + Eduardo Bustamante + + 5/15 + ---- +execute_cmd.c + - execute_simple_command, execute_arith_command, execute_cond_command, + execute_arith_for_command: adjust the line number when executing a + function interactively so that the first command in the function is + line 1, not line 0, as Posix requires. Reported by Robert Elz + + - execute_simple_command, execute_arith_command, execute_cond_command, + execute_arith_for_command: ony adjust the line number when executing + a function interactively if we are not sourcing a file + (sourcelevel == 0), so this is consistent everywhere we adjust the + line number + + 5/16 + ---- +bashline.c + - bash_directory_completion_hook: when calling split_at_delims to see + whether a ${ or $( is closed, use the right value for `start' relative + to the substring beginning at `$'. Bug from fuzzing reported by + Eduardo Bustamante + +expr.c + - expassign: if the call to expcond generates a syntax error in a + context when the shell won't longjmp (like when evaluating $PS1), + it will end up NULL and we need to catch it before calling strlen. + Bug from fuzzing reported by Eduardo Bustamante + +examples/bash-completion/ + - new place to include a current or recent version of the + bash-completion package + + 5/19 + ---- +lib/readline/display.c + - CHECK_INV_LBREAKS: new versions for multibyte and single-byte chars, + so the multibyte version can check and increase the size of + line_state_invisible->wbsize and line_state_invisible->wrapped_line, + callers who call CHECK_INV_LBREAKS must update + wrapped_line[newlines] when in HANDLE_MULTIBYTE mode. Fuzzing bug + reported by Eduardo Bustamante + + 5/24 + ---- +lib/readline/search.c + - _rl_nsearch_callback,noninc_search: handle _rl_search_getchar + returning -1 (EOF or read error) by aborting the search. + Fuzzing bug reported by Eduardo Bustamante + + 5/25 + ---- +variables.c + - localvar_inherit: new variable, controlled by shopt localvar_inherit + option + - make_local_variable: if localvar_inherit is set, the new local + variable inherits a previous scope's variable's value, attributes + (except nameref), and dynamic variable information. If a local + variable inherits a value, the local is not invisible + +builtins/shopt.def + - localvar_inherit: new option + +doc/{bash.1,bashref.texi} + - localvar_inherit: document new shopt option + + 5/29 + ---- +lib/readline/readline.c + - _rl_subseq_result: only return -1 and back up the chain if we are + dealing with a result (r) that's already < 0 and we are at the end + of a multi-key sequence. Otherwise, a failing readline command (e.g., + delete-char at the end of a line) could cause this code to be + executed. Report from Nuzhna Pomoshch + +lib/readline/histfile.c + - read_history_range: if the file isn't a regular file, return an + error. Bug report from Eduardo Bustamante , + relaying from IRC + + 5/30 + ---- +variables.c + - set_pwd: if in Posix mode, and PWD appears in initial environment as + an absolute pathname to the current directory, set PWD to the result + of canonicalizing the environment value, or to the physical path if + canonicalization fails. From a suggestion by Eduardo Bustamante + + + 5/31 + ---- +builtins/read.def + - read_builtin: if -n or -N option is supplied with a 0 argument, + don't attempt to read any characters; bail out right away. Reported + by Eduardo Bustamante , relaying from IRC + + 6/3 + --- +config.h.in + - HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC: add define, used by stat-time.h + to construct a timespec from struct stat. Report and fix from + Siteshwar Vashisht + +variables.h + - att_regenerate: new internal variable attribute: if set, regenerate + dynamic variable's value when it's exported and we are creating the + export environment + +variables.c + - init_dynamic_variables: LINENO, EPOCHSECONDS, EPOCHREALTIME: set + internal regenerate attribute for these dynamic variables + - make_env_array_from_var_list: if a dynamic variable has the + regenerate attribute set, call the dynamic value function to generate + an updated value before placing it in the environment. From a report + about exporting LINENO from Robert Elz + + 6/4 + --- +lib/glob/sm_loop.c + - BRACKMATCH: at the matched: label, make sure we get the bracket + character we're looking for (char class, collating symbol. etc.) + before we decrement the count of braces we're looking for. Eventually + we could do something about badly-formed bracket expressions + + 6/7 + --- +lib/readline/histlib.h + - strchr: only declare if __STDC__ is not defined, since we already + include . Report from Chi-Hsuan Yen + + 6/9 + --- +lib/readline/display.c + - update_line: when wrapping lines with multibyte chars at the end of + the new line being wrapped, make sure we copy the NULL byte in old + when moving the contents of old around. Fuzzing bug reported by + Eduardo Bustamante + +lib/readline/mbutil.c + - _rl_get_char_len: use MB_CUR_MAX in the call to mbrlen; there's no + need to look at the rest of the string when we're just interested in + the length of a single character + + 6/12 + ---- +jobs.c + - wait_for: when waiting for the next child to exit (ANY_PID), make + sure to restore the old SIGINT handler before returning. Fixes + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864649 + + 6/14 + ---- +lib/readline/display.c + - expand_prompt: make sure `ret' is NULL-terminated before calling + _rl_prev_mbchar_internal, since that calls strlen, which requires + the passed string to be NULL-terminated. Another fuzzing bug. + + 6/15 + ---- +lib/readline/isearch.c + - _rl_isearch_fini: use rl_replace_line instead of strcpy so rl_end + gets set right + - _rl_isearch_fini: after restoring rl_point, call _rl_fix_point so + we don't set rl_point > rl_end. Fixes a fuzzing bug + +lib/readline/mbutil.c + - _rl_find_next_mbchar_internal: if _rl_adjust_point returns < 0, + just punt, treat the value as a byte, and advance point by 1 + +lib/readline/util.c + - rl_tilde_expand: rearrange code in the whitespace loop so that + `start' gets tested first and we don't try to dereference + rl_line_buffer[-1]. Another fuzzing bug from dualbus@gmail.com + +bashline.c + - bash_dequote_filename: make sure that pointers that are used as + indices into sh_syntaxtab are cast to unsigned char first, to + avoid problems with signed chars > 128. Fixes a fuzzing bug. + +lib/readline/kill.c + - _rl_copy_to_kill_ring: when reallocating the kill ring, make sure to + allocate one more than the max number of kills so the loop that + copies the kill ring entries down runs right (and to mirror the + initial allocation). Fixes a fuzzing bug. + +lib/readline/isearch.c + - _rl_isearch_dispatch: make sure that cxt->sline_index never goes < 0 + even when searching a line in reverse. Fixes a fuzzing bug + + 6/16 + ---- +parse.y + - xparse_dolparen: short-circuit immediately if passed a empty string + +lib/readline/display.c + - update_line: when wrapping multibyte characters, make sure we deal + with WCWIDTH returning -1. Fixes a fuzzing bug + + 6/17 + ---- +execute_cmd.c + - execute_coproc: make sure `invert' is set before trying to use it + when returning failure on invalid coproc name. Report and fix from + Eduardo Bustamante + - execute_command_internal: make sure execute_coproc sets + last_command_exit_value if it returns failure, so an invalid name + can set $? = 1. Report and fix from Eduardo Bustamante + + +lib/readline/display.c + - update_line: make sure all references to `wrapped_line' are wrapped + with #ifdef HANDLE_MULTIBYTE. Report and fix from Eduardo Bustamante + + +lib/readline/vi_mode.c + - _rl_vi_change_char: don't use rl_point++ when you mean to move + forward a character; use _rl_vi_append_forward to account for + multibyte characters and take vi end of line handling into account + - _rl_vi_last_replacement: now an array of chars whether we are + using multibyte chars or not. If we're not, the character we read + to use as the replacement is saved as the first element of the array + - rl_vi_change_char,_rl_vi_callback_change_char: changes to deal with + _rl_vi_last_replacement being an array. Fixes bug reported by + Eduardo Bustamante + +lib/readline/mbutil.c + - _rl_get_char_len: look at at most MB_CUR_MAX characters, but maybe + fewer if the length of the string is less + +builtins/bind.def + - unbind_keyseq: new function for the -r option; checks whether the + key sequence is actually bound before trying to bind it to NULL. + Partial fix for https://savannah.gnu.org/support/?109329 + +parse.y + - augment `error yacc_EOF' production to call YYABORT in non-interactive + shells or calls to parse_and_execute (eval, command substitution, + etc.) Fixes bug reported by Martijn Dekker + + 6/19 + ---- +bashline.c + - edit_and_execute_command: don't add rl_line_buffer to the history + list if it's empty; consistent with how other code treats an empty + line + +execute_cmd.c + - execute_builtin: make sure to preserve the temporary env across the + execution of the `read' builtin or `fc' builtin if HISTORY is + defined, in case `read -e' calls edit-and-execute-command. Should + have no side effects. Reported by Eduardo Bustamante + + +general.c + - line_isblank: new function: returns true if passed string is composed + entirely of blanks + +general.h + - line_isblank: new extern declaration + +parse.y + - history_delimiting_chars: return "" for a blank line, since there's + nothing to delimit with `;' + + 6/21 + ---- +jobs.c + - wait_for: make sure to call restore_sigint_handler before returning + if we return out of the loop due to no children. Report from + Eduardo Bustamante + +subst.c + - expand_word_internal: if split_on_spaces is set, and the word is + unquoted, and IFS is null, split the results of the previous steps + on $' \t\n' instead of just ' '. This relies on the previous steps + quoting the portions of the word that should not be split. Fixes + bug reported by Kevin Brodsky + +expr.c + - evalexp: after running expr_unwind, make sure we reset expr_depth + to 0 for the next call + - expr_streval: if after a call to get_array_value (which can call + the expression evaluator recursively) we discover that expr_depth + is less than it was before we called it, we assume there has been + some kind of error and an expr_unwind, so we treat it as an + error and either longjmp back to the expression top level or return + 0 immediately. Fixes bug reported by Eduardo Bustamante + + + 6/23 + ---- +doc/{bash.1,bashref.texi} + - add text noting that $* and ${array[*]} (unquoted) can also expand + to multiple words + + 6/29 + ---- +general.[ch] + - default_columns: new function, returns the value of COLUMNS, or + refreshes it if check_window_size is set and COLUMNS is unset. By + default, it returns 80 + +execute_cmd.c + - select_query: use default_columns() instead of fetching value of + COLUMNS directly + +builtins/help.def + - show_builtin_command_help: use default_columns() instead of fetching + value of COLUMNS directly + + 6/30 + ---- +builtins/read.def + - read_builtin: call QUIT during the read loop, just in case we get a + signal we should act on that didn't cause read to be interrupted. + Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1466737 + - read_builtin: if -n or -N is supplied with a 0 argument, try a zero- + length read to detect errors and return failure if that read returns + a value < 0. Suggested by dualbus@gmail.com + + 7/4 + --- +bashhist.c + - maybe_add_history: keep track of whether the current line is a shell + comment, even if we're not adding it because it's in a multi-line + command, so we use appropriate delimiters between it and any + subsequent lines. Fixes bug reported by Grisha Levit + back on 2/28/2017 + +bashline.c + - operate_and_get_next: if given an explicit argument, use that to + choose which line in the history to use. + +lib/readline/doc/rluser.texi,doc/bash.1 + - operate-and-get-next: document new effect of explicit numeric arg + +lib/readline/complete.c + - fnprint: make sure print_len is initialized before using it on + systems without multibyte character support. Report and fix from + Juan Manuel Guerrero + + 7/6 + --- +builtins/printf.def + - PRETURN,printf_builtin: check variable returned by bind_printf_variable, + return failure if that indicates we can't perform an assignment + because the variable is marked readonly or noassign. Fixes bug + reported by Arnaud Gaillard + + 7/7 + --- +lib/readline/text.c + - rl_quoted_insert: new feature: a negative argument means to insert + the next -COUNT characters using quoted-insert. Original feature + from Jason Hood . Still needs work on + redisplay + - _rl_insert_next_callback: implement support for negative arguments + similar to rl_quoted_insert: we just insert one at a time and keep + increasing the count until it hits 0 + +lib/readline/misc.c + - _rl_arg_callback: if the return value from _rl_arg_dispatch indicates + we should keep reading a numeric argument, update the message with + the new arg value + + 7/8 + --- +lib/readline/signals.c + - _rl_handle_signal: make sure all uses of any of the job control + signals are protected by a check for SIGTSTP being defined. Report + from Juan Manuel Guerrero + + 7/11 + ---- +lib/readline/vi_mode.c + - rl_vi_replace: when making the new keymap for vi replacement mode, + make sure that ANYOTHERKEY is set correctly, otherwise some input + will cause _rl_dispatch to return -2 to the top level. Fixes fuzzing + bug reported by Ben Wong + + 7/19 + ---- +builtins/read.def + - struct ttsave: make the attrs member a struct, not a pointer, to force + a structure copy that will survive a longjmp to another context. + Leaving it as a pointer to a local struct is not portable + + 9/10 + ---- +execute_cmd.c + - execute_builtin: make sure that we set up the unwind-protect for + pop_scope (temporary_env is non-zero) so that the temporary env + is propagated to the current environment only for special builtins + (source/eval/unset) not run by the command builtin + (flags & CMD_COMMAND_BUILTIN == 0). Fixes bug reported by + Martijn Dekker + + 9/17 + ---- +builtins/printf.def + - asciicode: don't use mblen to check whether or not a character is a + valid multibyte character; use mbtowc right away and then inspect + the return value. Fixes bug reported by Stephane Chazelas + + + 9/27 + ---- +{jobs,subst}.h + - move declaration of last_command_subst_pid to subst.h, since it's + declared in subst.c and doesn't depend on job control. Reported by + Martijn Dekker + +builtins/read.def,variables.c + - fixed a couple of problems (READLINE, ARRAY_VARS) that prevented + the minimal config from building + + 10/1 + ---- +parse.y + - special_case_tokens: if we are returning DO in a case where the last + two tokens read are `FOR' and `WORD' make sure we decrement + expecting_in_token. Fixes bug reported by Martijn Dekker + + + 10/4 + ---- +subst.c + - expand_string_for_rhs: now takes an additional PFLAGS argument from + its caller (one so far); passes that through to call_expand_word_internal + as W_ASSIGNRHS. Fixes bug reported by Martijn Dekker + + - expand_string_for_rhs: expanding b in ${a[:]=b} is now done as if + b were the rhs of an assignment statement. This means that splitting + isn't done, but tilde expansion is performed as if the statement + were `a=b'. Fixes splitting bug with $* reported by Martijn Dekker + + +command.h + - W_NOASSNTILDE: new word flag, means to not perform tilde expansion + following a `:' even if the word has the W_ASSIGNRHS flag enabled + +subst.c + - expand_word_internal: if we see a `:' with the W_NOASSNTILDE flag + set, just add the character and inhibit any subsequent tilde + expansion. Currently not set anywhere, but it could be set in + expand_string_for_rhs to satisfy its peculiar semantics + + 10/6 + ---- +lib/sh/casemod.c + - sh_modcase: convert even single-byte wide characters to wide upper + or lowercase equivalents to accommodate locales where single-byte + characters have multibyte upper and lower case conversions. Bug + reported by Stephane Chazelas + + 10/7 + ---- +doc/{bash.1,bashref.texi} + - slight changes to the description of command_not_found_handle to + clarify that it's executed in a separate execution environment, + just like if the command was found. Reported by Martijn Dekker + + + 10/8 + ---- +lib/readline/doc/{history.3,hstech.texi} + - history_get: clarify the range of valid values for the OFFSET + argument. From a report by Kevin Ryde + + 10/21 + ----- +subst.c + - expand_string_for_rhs: set W_NOASSNTILDE if the operator is `=' + for backwards compatibility with bash-4.4 + +shell.c + - main: set positional parameters before running the startup files, + so the startup files can inspect $@. Often-requested feature, + most recently from Stephane Chazelas + + 10/27 + ----- +doc/{bash.1,bashref.texi} + - Arrays: add some clarifying language to make it clear that array + references that don't use the ${a[s]} syntax are subject to + globbing when passed as arguments to commands such as unset, and + should be quoted for safety. Change prompted by a report from + Eli Barzilay + +parse.y + - parse_comsub: make sure we don't run off the end of the `ret' + buffer when checking for the here doc delimiter. Report from + Jakub Wilk , the result of a fuzzing test. Pointer + to place for the fix from Eduardo Bustamante + + 10/30 + ----- +builtins/pushd.def + - get_directory_stack: make sure the current directory (element 0 of + the stack) is passed to polite_directory_format under the same + conditions as the rest of the stack entries (flags & 1). Otherwise + something like `cd ${DIRSTACK[0]}' will fail. Fixes bug reported + by Steve Jones + +builtins/declare.def + - declare_internal: when checking for a `[' to see whether or not this + is an array variable declaration (declare -a foo[12]), make sure + we don't do the check if we're just dealing with shell functions. + Bug and pointer to fix from PJ Eby + + 11/1 + ---- +parse.y + - parse_comsub: if we read a four-character word followed by a break + character, and that word is not one of the reserved words, set + lex_rwlen to 0 since we are no longer in a reserved word. It only + hurts if another break character immediately follows, so that test + succeeds again. Turn off the RESWDOK flag only if it's not a shell + metacharacter, too. Fixes bug reported by Kjetil Torgrim Homme + + + 11/3 + ---- +lib/readline/isearch.c + - _rl_isearch_dispatch: if we are searching in reverse order, let + sline_index go to -1 to avoid searching the same line twice. It + gets reset right after that, so there's no danger of indexing into + the history line with a negative index. + + 11/7 + ---- +execute_cmd.c + - time_command: only restore command->flags if CODE indicates we didn't + perform a longjmp back to top_level. If we did, `command' has already + been freed. Fixes bug reported on savannah by + ukuvbu oibws + https://savannah.gnu.org/support/?109403 + + 11/10 + ----- +lib/sh/unicode.c + - u32cconv: make sure to initialize localconv to -1 (error) in case + we switch from a utf-8 locale to something else and call + iconv_close. Report from Egmont Koblinger ; fix + from Eduardo Bustamante + + 11/16 + ----- +subst.c + - parse_comsub: istring_index should be a size_t to avoid integer + overflow when allocating large pieces of memory. Report and fix + from Siteshwar Vashisht , originally based on + http://lists.gnu.org/archive/html/bug-bash/2017-11/msg00047.html + + 11/24 + ----- +lib/readline/bind.c + - rl_empty_keymap: new public function, returns non-zero if there are + no keys bound in the keymap passed as an argument + +lib/readline/readline.h + - rl_empty_keymap: new public extern declaration + +lib/readline/doc/rltech.texi + - rl_empty_keymap: document new function + +lib/readline/bind.c + - rl_generic_bind: keep track of the previous keymap and previous + index in a multi-key key sequence so we can remove an empty terminal + keymap and remove a previous override to ANYOTHERKEY. Right now, + this only works for one previous keymap level. Inspired by a report + from Clark Wang + + 11/25 + ----- +lib/readline/display.c + - _rl_update_final: make sure that computing the length of the visible + bottom line (botline_length) takes any invisible characters in the + prompt into account (woff). This value is used as part of the check + whether or not we want to remove the line-wrapping indicator on + terminals like xterm + - _rl_update_final: when removing the line-wrapping indicator on xterm, + make sure we take invisible characters in the prompt (woff) into + account when computing the character in the rightmost physical + screen position. Fixes cosmetic line-wrapping issue reported by + Egmont Koblinger + + 11/27 + ----- +lib/sh/ufuncs.c + - fsleep: if using select to implement sleep, use restart after + a signal interrupts the select and handle pending signals. If + pselect is available, use that instead and block SIGCHLD while + pselect is executing. + Fixes report from Thiruvadi Rajaraman + + 11/28 + ----- +lib/readline/signals.c + - rl_check_signals: new public function: a wrapper for RL_CHECK_SIGNALS + that can be used by applications that install a wrapper for + rl_getc (rl_getc_function) so they can respond to signals that + arrive while waiting for input in the same way as rl_getc. The app + can use rl_pending_signal() to get the most recently-received + signal. From a discussion about Gnuplot initiated by + Rin Okuyama + +lib/readline/readline.h + - rl_check_signals: new extern declaration + +lib/readline/doc/rltech.texi + - rl_check_signals: document new public function + +variables.c + - set_pwd: test for and force an inherited OLDPWD to be a directory + if OLDPWD_CHECK_DIRECTORY is defined in config-top.h (it is by + default). Issue raised by Mikulas Patocka + +config-top.h + - OLDPWD_CHECK_DIRECTORY: new define, defined to 1 by default + + 11/29 + ----- +Makefile.in + - pathexp.o: add dependencies on libintl.h. Reported by + Ross Burton + + 12/1 + ---- +lib/sh/ufuncs.c + - fsleep: add blocking and releasing SIGCHLD using sigprocmask + around call to select(2) even if pselect(2) is not available + + 12/3 + ---- +execute_cmd.c + - coproc_setstatus: new utility function, take a pointer to a coproc + and a status and mark the coproc as dead and having been reaped + with that status. Used by child processes who want to invalidate + the coproc's pid + + 12/5 + ---- +subst.c + - process_substitute: instead of just having a flag to denote that a + file descriptor is connected to a process substitution, store the + pid of the child process (still needs work) + - find_procsub_child,set_procsub_status,reap_procsubs: utility + functions to allow the job control code to detect that a process + substitution child has died and deallocate the file descriptors + or pathname + +subst.h + - find_procsub_child,set_procsub_status,reap_procsubs: extern + declarations + +nojobs.c + - set_pid_status: if we are reaping a process substitution, call + set_procsub_status to record the fact + +jobs.c + - waitchld: if we are reaping a process substitution, call + set_procsub_status to record the fact. Doesn't really do anything + yet + + 12/6 + ---- +execute_cmd.c + - execute_command: don't call unlink_fifo_list if we're in the + middle of executing a list of commands (executing_list != 0). + Partial fix for bug reported by Stephane Chazelas + + - execute_simple_command: don't close process substitution file + descriptors in the parent after forking children in a pipeline; + defer until pipeline completes, since parent may have inherited + fds from a calling scope (e.g., via `.'). EXPERIMENTAL + - execute_disk_command: don't close process substitution file + descriptors in the parent after forking the child. EXPERIMENTAL + + 12/7 + ---- +doc/bash.1,lib/readline/doc/{readline.3,rluser.texi} + - show-mode-in-prompt: clarify that this must be enabled before the + vi and emacs mode strings are prefixed to the prompt. Report from + Rob Foehl + + 12/8 + ---- +execute_cmd.c + - execute_coproc: don't warn about an existing coproc if the write and + read file descriptors are unusable (-1), as they will be after a + call to coproc_closeall in a subshell. Fixes spurious warning + reported by Tobias Hoffmann + +jobs.c + - bgp_resize: avoid overflow when calculating the new size if the + child process limit is something ridiculously large. Report and + fix from Natanael Copa + +execute_cmd.c + - execute_builtin_or_function: if we return via the return builtin, we + don't get a chance to free the saved fifo list, so add an unwind- + protect to make sure it happens. Part of fix for leak reported by + Oyvind Hvidsten + - execute_command_internal: if we unwind via the return builtin (e.g., + we execute a function which then returns via the return builtin to + a previous function), we don't free the saved fifo list, so add an + unwind-protect to make sure the free happens. Rest of fix for leak + reported by Oyvind Hvidsten + +subst.c + - add_fifo_list: for the FIFO case (no /dev/fd), make sure we + initialize the new members of the fifo list after xrealloc + + 12/9 + ---- +subst.c + - dev_fd_list: now a list of type `pid_t' so we can store process + associated with the pipe fd into the right element; change all + necessary functions (copy_fifo_list, add_fifo_list) + - process_substitute: store pid of child process into the right + index in dev_fd_list after opening the pipe. Process ID of -1 means + process has been reaped and fd needs to be closed (or FIFO needs to + be unlinked); value of 0 means slot is unused + +jobs.c + - wait_for_background_pids: call reap_procsubs to make sure we clean + up all reaped process substitutions before trying to wait for + everything (still needs work) + +tests/{run-procsub,procsub.{tests,right}} + - new file, tests of process substitution that have failed in the past + + 12/10 + ----- +jobs.c + - wait_for_background_pids: warn if one of the jobs is stopped + +subst.c + - wait_procsubs: new function, call wait_for for every "live" process + substitution + +jobs.c + - wait_for_background_pids: call wait_procsubs to reap any living + process subsitutions + + 12/13 + ----- +lib/readline/bind.c + - parser_if: add support for testing the readline version, using the + full set of arithmetic comparison operators (and supporting both + = and ==), using version numbers of the form major[.[minor]] + + 12/14 + ----- +subst.[ch] + - string_list_dollar_star: now takes QUOTED and PFLAGS arguments like + string_list_dollar_at, changed all callers. Not used yet. + + 12/16 + ----- +subst.c + - param_expand: broke out cases of expanding unquoted (quoted == 0) + $* on the rhs of an assignment statement (pflags & PF_ASSIGNRHS) + with various values of IFS (unset, null, set to non-null value) to + capture the expansion subtleties. From a report back on 11/24 by + Martijn Dekker + + 12/17 + ----- +array.h + - set_element_value: new define, sets array element AE to VALUE + +variables.c + - set_pipestatus_array: use set_element_value where appropriate + + 12/18 + ----- +subst.c + - parameter_brace_find_indir: when expanding the indirect parameter + to find the eventual variable name, we don't perform word splitting. + Make sure this does the right thing for * and @. Fixes bug + reported by isabella parakiss + + 12/19 + ----- +doc/{bash.1,bashref.texi} + - indirect expansion: make sure to note that the value of the indirect + variable does not undergo word splitting as one of its expansions, + as in fix from 12/18 + + 12/22 + ----- +subst.c + - parameter_brace_expand_rhs: make sure the value this function returns + when OP is `=' is quoted appropriately, as the callers expect. More + changes from Posix interp 221. Fixes report from Martijn Dekker + + +variables.c + - assign_hashcmd: if running in a restricted shell, make sure the + target of the hash assignment can be found via a $PATH search, to + prevent users assigning commands to the hash table they would not + ordinarily have access to. Fixes issue raised by Drew Parker + + +builtins/hash.def + - hash_builtin: if running in a restricted shell, make sure the + pathname target of `hash -p' can be found via a $PATH search, to + prevent users assigning commands to the hash table they would not + ordinarily have access to. + + 12/27 + ----- +array.c,arrayfunc.c,... + - many changes to clean up unused variables and functions. From a + report from Siteshwar Vashisht + + 12/28 + ----- +lib/readline/terminal.c + - _rl_term_clrscroll: save the `E3' termcap capability, which clears + the scrollback buffer where supported. Unused right now + +lib/readline/rlprivate.h + - _rl_term_clrscroll: extern declaration + +lib/readline/bind.c + - parser_if: added simple variable comparison capability. Allowable + operators are `=', `==', and `!='; boolean variables must be + compared to either `on' or `off'; variable names must be separated + from the operator by whitespace + +doc/bash.1,lib/readline/doc/{rluser.texi,readline.3} + - document new `if variable comparison value' construct + + 1/2/2018 + -------- +lib/glob/sm_loop.c + - EXTMATCH: when matching against !(patlist), if a filename beginning + with a `.' does not match any of the patterns in patlist, don't + return it as a match if leading dots need to be matched explicitly + (flags & FNM_PERIOD). Report from Eric Cook + + 1/3 + --- +variables.[ch] + - bind_function_def: takes an additional flags argument. If FLAGS&1, + overwrite any existing function_def hash table entry; if FLAGS==0, + leave any existing function_def alone. + +make_cmd.c + - make_function_def: call bind_function_def with flags == 0 + +execute_cmd.c + - execute_intern_function: call bind_function_def with flags == 1 so + we have function_def information that's correct for where the + function is defined, not just where it's last parsed. Fixes report + from Bruno Vasselle ; final piece of + fix from 12/15/2011 + + 1/4 + --- +subst.c + - param_expand: deal with string_list_dollar_star returning NULL. + Fixes bug reported by Martijn Dekker + +builtins/history.def + - history_builtin: enabled code that performs range deletion + + 1/5 + --- +subst.c + - do_assignment_internal: if performing a compound assignment, make + sure to pass ASS_CHKLOCAL flag to do_compound_assignment if the + assignment word has the W_CHKLOCAL flag set + - do_compound_assignment: honor ASS_CHKLOCAL flag and check for an + existing local variable before creating or modifying a global + variable + +builtins/declare.def + - declare_internal: new (undocumented so far) option: -G. Means to + act on global variables (create, modify) if no local variable is + found with the specified name + - declare_find_variable: new declare-specific wrapper functon for + declare builtin; obeys -g and -G options in one place + - declare_internal: if no variable is found after following any nameref + chain, look up the variable using declare_find_variable to honor the + -G option. XXX - so far, this is the only place that function is used + +subst.c + - shell_expand_word_list: before calling make_internal_declare, add + 'G' to the options list if W_CHKLOCAL is set in the word's flags. + This makes builtins like `readonly' that modify local variables in + a function behave the same for scalar and array variables + + 1/11 + ---- +parse.y + - shell_getc: move code that decides whether to append a space to an + alias expansion here from mk_alexpansion, so we can inhibit adding + a space if we're currently parsing a single or double quoted string + + 1/12 + ---- + +parse.y + - clear_string_list_expander: take a pointer to an alias that's about + to be freed and make sure there aren't any pointers to it in the + list of pushed strings. If there are, zero it out in the pushed + string list to avoid referencing freed memory in pop_string() + +alias.c + - free_alias_data: if an alias being freed is currently being expanded, + call clear_string_list_expander to remove references to it from the + list of pushed strings + + 1/14 + ---- +pcomplib.c + - progcomp_search: add code to look up an alias for the CMD argument + and return the completions for the first word of that alias if one + is found. Just a start at completing aliases, a much-requested + feature + +pcomplete.h + - COPT_LASTUSER: last flag value used by user-settable completion + options + - PCOMP_RETRYFAIL, PCOMP_NOTFOUND: new #defines, possible return values + from programmable_completions in FOUNDP argument. Moved RETRYFAIL + define here from pcomplete.c to avoid collisions with user-settable + option values (COPT_*) + + 1/15 + ---- +pcomplete.c + - programmable_completions: if we don't find any completions for a + command, and RETRY is 0, see if the command is a defined alias, + expand it, and try to expand the first word of the value as a + command, and find any programmable completions for it. Here right + now, could be moved to attempt_shell_completion later if we need + to do more analysis of the expanded line. We'll see how it works + in practice. (Disabled for now.) + + 1/16 + ---- +parse.y + - grammar: when timing the null command, make sure to turn off the + flags in parser_state (PST_REDIRLIST) that make_simple_command sets + when given a NULL second argument, since it assumes that it's going + to turn those off when it gets the next word of the simple command + (which it never gets in this case). Fixes bug reported by + Anti Räis + + 1/19 + ---- +lib/readline/rltty.c + - prepare_terminal_settings (termios/termio): if there is a function + bound to the VDISCARD character in the current keymap, set VDISCARD + to _POSIX_VDISABLE while readline is active. From a report from + Rhialto + + 1/22 + ---- +builtins/history.def + - histtime: check whether or not localtime() returns NULL, and make + sure we only call strftime() with a valid struct tm. This can happen + when the timestamps in the history file overflow a time_t. Fixes bug + reported by Luke Dashjr + +bashline.c + - edit_and_execute_command: if we're in vi editing mode, make sure + we end up in insert mode after executing the commands from the + edited file. This seems to be what other shells do. Report from + Stan Marsh + + 1/26 + ---- +bashline.c + - command_word_completion_function: match alias and shell function + names case-insensitively if the readline completion-ignore-case + variable is set. Inspired by report from + +lib/readline/display.c + - update_line: when performing a dumb update after wrapping the line + (usually due to printing the prompt), make sure we adjust + _rl_last_c_pos if there are invisible characters in prompt lines + other than the first (we assume those invisible characters are in + the last line, which is nearly always the case). We adjust by the + total number of invisible chars less the number of invisible chars + in the first prompt line. From a report in + https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1745273 + +execute_cmd.c + - execute_command_internal: if redirections attached to a compound + command fail, make sure we discard the `internal_fifos' unwind- + protect frame after freeing the copied fifo_list and before returning + + 1/30 + ---- +lib/readline/rlprivate.h + - BRACK_PASTE_FINI: add \r to the end of the string to avoid problems + with the tty driver thinking the cursor was in the wrong position. + Fixes issue reported by Egmont Koblinger + + 1/31 + ---- +lib/sh/zread.c + - zread,zreadintr: call check_signals() before calling read() to + minimize the race window between signal delivery, signal handling, + and a blocking read(2). Partial fix for FIFO read issue reported by + Oyvind Hvidsten + +doc/{bash.1,bashref.texi} + - shopt: document `assoc_expand_once' shell option + + 2/1 + --- +config-top.h + - DONT_REPORT_SIGTERM: define, so non-interactive shells will no + longer print termination messages for child processes killed by + SIGTERM + + 2/6 + --- +lib/readline/text.c + - rl_insert: don't attempt to optimize typeahead if we are only reading + a fixed number of characters (rl_num_chars_to_read > 0) + +redir.c + - redir_special_open: if the shell is restricted, return a + RESTRICTED_REDIRECT error for attempts to open /dev/tcp and /dev/udp + sockets. Inspired by report from Blake Burkhart + - do_redirection_internal: if redir_open returns RESTRICTED_REDIRECT, + return that right away (instead of errno) so we can print a better + error message + + 2/11 + ---- +jobs.c + - bgp_resize: fix problems with (pid_t) overflow when calculating new + size for table when js.c_childmax is near the limit of a pid_t + (e.g., 2**31 - 1 on a 32-bit system, or 2**63-1 on a system with + 32-bit pid_t). Fixes hang reported by Natanael Copa + based on his patch from 12/8. + - bgp_resize: cap max table size for bgpids at MAX_CHILD_MAX (32768) + +include/typemax.h + - TYPE_MINIMUM, TYPE_MAXIMUM: updated definitions from coreutils-8.29, + silences some compiler warnings + + 2/14 + ---- +Makefile.in + - maybe-clean: use cd and pwd -P to test whether or not two directory + names identical, since topdir = '.' and BUILD_DIR = full pathname + when you use something like `bash ./configure'. Problem reported by + Michael Felt + +subst.c + - split_at_delims: if SD_NOQUOTEDELIM is in the flags argument, don't + treat `'' and `"' as candidates for possible sequences of delimiters, + even if they're part of the delimiter set (the delims argument). + Fixes problem with completing lines like `foo --bar='quux baz' xx' + reported by Nick Patavalis + + 2/15 + ---- +copy_cmd.c + - copy_word_list: build the list in the right order, avoiding having + to reverse it at the end. Helps with long argument lists + +shell.c + - bind_args: build the argument list in the right order, avoiding + having to reverse it at the end. + - bind_args: only call push_args to save argc and argv as BASH_ARGC + and BASH_ARGV if debugging mode is enabled (debugging_mode != 0). + Inspired by report from Ambrose Feinstein + - bind_args: note that we've saved BASH_ARGC and BASH_ARGV by setting + bash_argv_initialized + - shell_reinitialize: reset bash_argv_initialized back to 0 so + BASH_ARGV and BASH_ARGC will be recreated if we're in debugging mode + +variables.c + - save_bash_argv: new function, initializes BASH_ARGV and BASH_ARGC + from the saved positional parameters + - init_bash_argv: initialize BASH_ARGV and BASH_ARGC if + bash_argv_initialized == 0 + +builtins/shopt.def + - shopt_set_debug_mode: if we're turning on debug mode, initialize + BASH_ARGC and BASH_ARGV if bash_argv_initialized == 0 + + 2/16 + ---- +execute_cmd.c + - execute_function: make sure BASH_ARGV and BASH_ARGC are initialized + before calling push_args (and before calling remember_args) + +builtins/source.def + - source_builtin: make sure BASH_ARGV and BASH_ARGC are initialized + before calling push_args (and before calling remember_args) + +builtins/evalfile.c + - _evalfile: if the shell compatibility level is 44 or lower, make + sure BASH_ARGV and BASH_ARGC are initialized before calling + array_push + +builtins/shopt.def + - compat44: new shell option. This will be the last compatXX option + +doc/{bash.1,bashref.texi} + - compat44: document new shell option + + 2/21 + ---- +builtins/common.h + - ISOPTION: check s[1] before s[2] to avoid out of bound reads. Fixes + bug reported by jeremy@feusi.co + +input.h + - B_SHAREDBUF: new flag for buffered input fds, indicates that this + fd shares its b_buffer with another fd + +input.c + - duplicate_buffered_stream: when duplicating *from* the buffer + corresponding to bash input, make sure the new buffer has B_SHAREDBUF + in the flags, because copy_buffered_stream copies pointers + - duplicate_buffered_stream: if the buffer being copied to has the + B_SHAREDBUF flag set, make sure the b_buffer doesn't get freed. + Fixes use-after-free bug reported by jeremy@feusi.co + - save_bash_input,close_buffered_stream: make sure a buffer with + B_SHAREDBUF set has its b_buffer set to NULL before calling + free_buffered_stream + + 2/24 + ---- +subst.c + - parameter_brace_expand_error: add parameter saying whether or not + we are checking whether value is null, so we can have different + error messages for ${x:?} and ${x?}. Report and fix from + don fong + + 3/5 + --- +lib/readline/bind.c + - _rl_read_file: instead of calling stat/open on the passed filename, + use open/fstat to avoid one possible filename translation and close + a small (benign) race condition. Report and fix from Roy Ivy + + + 3/11 + ---- +variables.c + - makunbound: if new variable localvar_unset is non-zero, mark local + vars in previous scopes as invisible and unset so they will show + up as unset until that previous scope returns (similar to how local + variables in the current local scope are handled). localvar_unset + is currently set to 0 with no way for a script to change its value. + Eventually there will be an option to modify it. From a bug-bash + discussion started by Nikolai Kondrashov back + on 2/11/2018 + + 3/13 + ---- +subst.c + - expand_word_list_internal: short-circuit and exit right away if a + variable assignment preceding a special builtin fails in posix mode + - expand_word_list_internal: if a variable assignment precedes an + empty command name (after expansion), fix to exit right away when + the shell is in posix mode + + 3/15 + ---- +doc/{bash.1,bashref.texi} + - Add text to Pathname Expansion clarifying that a slash must be + matched by a slash in the pattern when matching pathnames, but + not in other matching contexts. Suggested by + +builtins/common.c + - read_octal: allow octal numbers greater than 777 to accommodate + modes and umasks that include sticky/setuid/setgid bits. Report + and fix from Martijn Dekker + + 3/19 + ---- +lib/readline/bind.c + - rl_generic_bind: make sure we only assign to prevkey in the loop + if the key sequence index is > 0, so ic is valid. Fixes bug + reported by Koichi Murase + +builtins/read.def + - read_builtin: be slightly less aggressive checking for timeouts and + SIGALRM: if we successfully read a character, don't check for a + timeout until we store or process it. Fixes timing problem + reported by Rob Foehl + + 3/22 + ---- +sig.c + - termsig_handler: add a call to exit(1) after the kill, just in case + there are circumstances where the SIG_DFL signal handler is + ignored. Report from Andrei Vagin + + 3/25 + ---- +lib/readline/bind.c + - _rl_function_of_keyseq_internal: new internal function that takes a + length parameter to accommodate NUL in the key sequence. Patch from + Koichi Murase + - rl_function_of_keyseq_len: new application-callable function that + takes a length parameter; otherwise equivalent to rl_function_of_keyseq. + +lib/readline/readline.h + - rl_function_of_keyseq_len: add extern declaration for new function + +lib/readline/doc/rltech.texi + - rl_function_of_keyseq_len: document new function interface + +bashline.c + - bash_execute_unix_command: use rl_function_of_keyseq_len to handle + key sequences with embedded NULs (\C-@). Fix from Koichi Murase + + +lib/readline/bind.c + - rl_bind_key_if_unbound,rl_bind_key_if_unbound_in_map: run the KEY + argument through rl_untranslate_keyseq to produce a symbolic sequence + that can encode \C-@. + - rl_bind_keyseq_if_unbound_in_map: translate the key sequence in order + to accommodate symbolic key sequences; should be a no-op for `raw' + key sequences such as the arrow key seqeunces from terminfo. Change + from Koichi Murase + + 4/2 + --- +jobs.c + - wait_for: when setting the SIGINT signal handler to wait_sigint_handler + make sure we're not setting old_sigint_handler recursively, as we + can when running an external command in a trap we took after a + command exited due to SIGINT. We don't want to overwrite + old_sigint_handler here. Fixes bug reported by Dr. Werner Fink + + +execute_cmd.c + - execute_disk_command: when there is a command_not_found_hook, make + sure the subshell turns off job control before running it, in case + it runs processes. We don't want it to manipulate process groups. + Fixes bug reported by ииллов има + - execute_command_internal: make sure the command run by the `command' + builtin doesn't cause the ERR trap to be executed; wait for the + status to be returned by the command builtin. Fixes bug reported by + Martijn Dekker + + 4/4 + --- +subst.c + - process_substitute: handle longjmp back to top_level and function + returns (return_catch) in the child process, like command + substitution, so we don't longjmp back to some arbitrary spot from + the `exit' or `return' builtins, or on an expansion error, like + the command timing code. Fixes bug reported by Basin Ilya + + + 4/6 + --- +parse.y + - read_token_word: when reading a matched pair of backquotes as part + of a word, treat it as quoted so the characters are read as a single + word, but do not let the presence of the backquote mark the word as + quoted. Fixes here-document delimiter bug reported by Denys Vlasenko + + + 4/7 + --- +execute_cmd.c + - execute_case_command: call quote_string_for_globbing with the + QGLOB_CTLESC flag for both quoted and unquoted words, so it will + remove CTLESC/CTLESC in all cases while converting other quoted + characters to use a preceding backslash. Bug reported by + Martijn Dekker + + 4/9 + --- +smatch.c + - posix_cclass_only: helper function that checks whether a pattern has + only posix single-byte character classes ([:alpha:], etc.) or has + none at all + - xstrmatch: if running in a multibyte locale, make sure to short- + circuit to the single-byte matching code only if there are no + unrecognized character class names, since the wide character ctype + functions allow locales to define their own character class names + (e.g., "hyphen"). Fixes issue reported by yangyajing + + 4/10 + ---- +configure.ac,cross-build/qnx.cache + - qnx: add a configure cache file for cross-building, treat qnx 7 like + qnx 6 in terms of cpp options. Fix from Brian Carnes + + +aclocal.m4 + - BASH_CHECK_DEV_STDIN: experimental change to test for /dev/stdin + independently of /dev/fd or /proc/self/fd. Suggested for QNX by + Brian Carnes + + + 4/11 + ---- +lib/glob/glob.c + - glob_testdir: return -2 if DIR is a symlink, to differentiate it from + any other kind of non-directory file + - glob_vector: if we have GX_ALLDIRS (globstar), we want to skip over + symlinks to directories, since we will pick up the real directory + later. Fixes incompatibility reported by Murukesh Mohanan + + +bashline.c + - bash_execute_unix_command: changes to make READLINE_POINT apply to + characters instead of bytes when in a multibyte locale. Report and + fix from Koichi Murase + + 4/12 + ---- +builtins/evalstring.c + - parse_and_execute_cleanup: now takes an argument which is the value + of running_trap at some point before parse_and_execute was called; + changed callers in sig.c, builtins/evalfile.c + +builtins/common.h + - parse_and_execute_cleanup: changed prototype + + 4/13 + ---- +builtins/evalstring.c + - parse_and_execute_cleanup: if the argument holding the previous state + of running_trap is the same value as the current running_trap state, + don't call run_trap_cleanup: assume that there is a caller who will + take care of the cleanup after this returns. Fixes recursive trap + call on "eval return" reported by Martijn Dekker + +parse.y + - read_a_line: if remove_quoted_newline is non-zero, indicating the + here-document delimiter is unquoted, we will be running the contents + of the here-document through word expansion and need to quote CTLESC + and CTLNUL in the input. Fixes bug with ^A in here document reported + by Jorge Alberto Baca Garcia + + 4/18 + ---- +pathexp.c + - quote_string_for_globbing: make sure the QGLOB_CTLESC code handles + both CTLESC CTLESC and CTLESC CTLNUL in the same way. Fixes bug + reported by Martijn Dekker + + 4/19 + ---- +execute_cmd.c + - execute_command_internal: before executing any command in the current + shell, and before copying any existing FIFO list, call + reap_procsubs to unlink or close any process substitution pipes + associated with processes that have exited. Fixes hang in test suite + when trying to open a FIFO with no process having it open for + reading + + 4/26 + ---- +parse.y + - read_token_word: if returning REDIR_WORD for a {id}>foo construct, + for example, make sure to assign the_word to yylval.word before + returning, in case a recursive call to the parser overwrites it + (e.g., when evaluating array indexes). From a message to + austin-group-l from Stephane Chazelas + +lib/glob/sm_loop.c + - BRACKMATCH: if we have an invalid character class in an otherwise + well-formed bracket expression, don't try to match each character + of the (invalid) class individually; just skip over the class and + move on. From a message on the austin-group list from + Stephane Chazelas + + 4/27 + ---- +variables.c + - push_exported_var,push_func_var,push_temp_var: make sure to set the + context correctly in the variable we bind in the previous (non-temp) + scope. Report from Martijn Dekker + +pathexp.c + - unquoted_glob_pattern_p: a pattern that contains a backslash can + have it removed by the matching engine (since backslash is special + in pattern matching), so if the pattern contains a backslash, and + does not end in a backslash, we need to return true. Fixes bug + reported by Robert Elz + +lib/glob/glob_loop.c + - INTERNAL_GLOB_PATTERN_P: same change to return TRUE for a backslash + that doesn't end the pattern + +lib/sh/timeval.c + - print_timeval: use locale_decpoint() instead of fixed `.' to print + decimal point. Bug report in austin-group email from Joerg Schilling + + +lib/sh/clock.c + - print_clock_t: use locale_depoint() in the same way as print_timeval + + 4/29 + ---- +subst.c + - expand_cond_node: if special != 0, make sure to add QGLOB_CTLESC + to the flags passed to quote_string_for_globbing. Same issue as the + one with `case' fixed on 4/7, report from Martijn Dekker + + + 4/30 + ---- +redir.c + - do_redirection_internal: r_close_this: if the file descriptor is + already closed before the shell is asked to close it, make sure to + add an undo list redirect to make sure it stays closed. Report from + Martijn Dekker + + 5/2 + --- +variables.c + - push_posix_temp_var: new function, takes the SHELL_VAR * passed as + an argument and uses the name and value to create a global variable + - merge_temporary_env: if posixly_correct is set, call + push_posix_temp_var to create global variables, otherwise call + push_temp_var to preserve the old behavior. Right now, it's only + called when in posix mode, but that might change. This undoes the + change from 4/27 when in posix mode + + 5/3 + --- +sig.c + - struct that holds the terminating signal information has a new + field: whether that signal is expected to cause a core dump + - termsig_handler: if the call to kill(2) doesn't kill the process, + we have a problem. If our pid is not 1, we just exit with status + 128+sig (fake the sig exit status). If the pid is 1, we assume + we're in a Linux pid namespace and aren't allowed to send a signal + to ourselves. If we need to generate a core dump, we try to get + the kernel to SIGSEGV us by dereferencing location 0. If not, we + just exit with 128+sig. From a report and patch from Andrei Vagin + + + 5/4 + --- +bashline.c + - bash_execute_unix_command: make sure that parse_and_execute is called + with newly-allocated memory to avoid prematurely freeing the + command. Report and fix from Koichi Murase + + 5/7 + --- +builtins/shopt.def + - syslog_history: a shell option to control whether history is logged + to syslog; can be modified at runtime. Original patch from + Siteshwar Vashisht + +config-top.h + - SYSLOG_SHOPT: new configurable option, determines whether there is a + shell option to control syslogging history lines at runtime and sets + the default value of the option + +bashline.c + - syslog_history: new variable to control whether history lines are + sent to syslog; default value is the value of SYSLOG_SHOPT (or 1 + if that's not defined) + - bash_add_history: send history lines to syslog if syslog_history is + non-zero + + 5/10 + ---- + +variables.c + - push_var_context: if we are in Posix mode and manipulating the + temporary environment (temporary_env), implement behavior specified + in Posix interp 1009 and make sure that temporary assignments + preceding function calls modify the current environment *before* + the function is executed. + +[bash-5.0-alpha frozen] + + 5/12 + ---- +execute_cmd.c + - execute_in_subshell: subshells should set loop_level == 0, since + they are no longer "enclosed" by the loop, according to posix. + Report from Aeron.E. Wang + + 5/24 + ---- +Makefile.in + - pkgconfigdir: don't fail installing bash.pc if this directory doesn't + exist or isn't writable -- there's no error in failing to install + something nothing will use + - install-headers-dirs: creat $(pkgconfigdir) if it doesn't exist + +lib/sh/shmbchar.c + - utf8_mblen: replace with version from gnulib + - utf8_mbstrlen: reimplement using utf8_mblen so it handles invalid + multibyte sequences in the same way as mbstrlen + +lib/readline/mbutil.c + - _rl_utf8_mblen: utf-8 specific version of mblen from gnulib + +include/shmbutil.h + - ADVANCE_CHAR,COPY_CHAR_P: do better job detecting end of string in + UTF-8 locales (should not be called with an empty string, but to + be safe) + + 5/25 + ---- +lib/sh/utf8.c + - new file, utf-8-specific functions collected from other files + +externs.h + - extern declarations moved around for utf8.c + +include/shmbutil.h + - SADD_MBCHAR, SADD_MBQCHAR_BODY, ADVANCE_CHAR_P: if the locale is a + UTF-8 locale, don't bother with a call to mbrlen if the current + character cannot start a multibyte character + +variables.c + - push_var_context: only merge the temporary environment in posix mode + if we are executing a shell function (flags & VC_FUNCENV). Report + from Martijn Dekker + +lib/readline/mbutil.c + - _rl_get_char_len: don't call mbrlen if we are in a UTF-8 locale and + the character cannot start a multibyte sequence + +builtins/read.def + - read_builtin: if mb_cur_max > 1, call read_mbchar only if we're not + in a utf-8 locale or, if we are, the character we just read indicates + the start of a multibyte sequence + +subst.c + - string_extract_verbatim: don't call MBRLEN if we're in a utf-8 + locale and the current character can't start a multibyte sequence + - setifs: don't call MBRLEN if we're in a utf-8 locale and the first + character of $IFS can't start a multibyte sequence + +lib/readline/kill.c + - rl_bracketed_paste_begin: make sure we return 0 here if rl_insert_text + returns the right number of characters inserted to be consistent + with other functions. Returns 1 otherwise. Report and fix from + Gabe Krabbe back in March, 2018 + +lib/readline/readline.c + - rl_subseq_result: make sure r is < 0 before checking map[ANYOTHERKEY] + to see if we shadowed a key that should now be tried + + 5/27 + ---- +variables.c + - assign_aliasvar: perform same validity check on subscript assignment + as alias builtin performs on name argument. Bug report from + Mike Jonkmans + + 5/29 + ---- +builtins/setattr.def + - set_var_attribute: we should not propagate a variable assignment + preceding a builtin back to the calling environment unless the + shell is in posix mode. Since previous versions of the shell do + this, setting the shell compatibility level to 44 or less will + continue the propagation behavior + + 6/1 + --- +lib/readline/histexpand.c + - history_tokenize_word: as part of teaching history tokenization more + and more about shell syntax, allow command and process subsitution + and extended globbing patterns to appear within a word being + tokenized and not just at the beginning. Fixes bug reported back in + 2/2017 by ecki@tofex.de + +bashhist.c + - load_history: use HISTSIZE_DEFAULT (still defaults to "500") to set + the initial value of $HISTSIZE. HISTSIZE_DEFAULT can be overridden + in config-top.h + + 6/4 + --- +configure.ac + - make sure we link against an external readline library that's at + least version 8 + + 6/8 + --- +pcomplete.h + - INITIALWORD: internal compspec name for programmable completion on + the initial (usually the command) word + +bashline.c + - attempt_shell_completion: if we are in a command position and the + user has defined a compspec for INITIALWORD, use programmable + completion to complete command words. Original patch from + Luca Boccassi + +lib/readline/doc/rluser.texi,builtins/complete.def,doc/bash.1 + - make it clearer that -D takes precedence over -E when supplied as + options to `complete', not when they are applied during completion + +builtins/complete.def + - complete_builtin,compgen_builtin: add support for -I option + - print_one_completion,print_compopts: display -I when appropriate + +lib/readline/doc/rluser.texi,doc/bash.1 + - complete,compgen: document new -I option and its effect + + 6/10 + ---- +lib/readline/histfile.c + - read_history_range: don't apply the heuristic and try to append a + history line to an existing history entry if we don't have any + history entries. Bug and fix from Edward Huff + + 6/12 + ---- +bashline.c + - attempt_shell_completion: don't all the programmable completion for + INITIALWORD if programmable completion is disabled + - attempt_shell_completion: make sure in_command_position remains set + for an empty command word on an otherwise blank line, making the + presence of assignment statements optional. Report from + Luca Boccassi + + 6/20 + ---- +lib/malloc/malloc.c + - morecore,internal_malloc,internal_free: requests for more than + 128K bytes (defined as MMAP_THRESHOLD and saved in the new + malloc_mmap_threshold variable) are now satisfied via mmap and + freed via munmap. We only use mmap if we have mmap and MAP_ANON + (or MAP_ANONYMOUS). These blocks are not available for splitting + or coalescing, so every request for 128K bytes or smaller is + satisfied via sbrk(). We don't use mremap for realloc yet, but + we could in the future + +lib/malloc/mstats.h + - malloc_stats: the malloc stats now include the number of calls to + mmap and the total number of bytes requested via mmap. The number + of calls to munmap is captured in each bucket's lesscore count + +lib/malloc/stats.c + - print_malloc_stats: now prints an indication of where the change from + sbrk to mmap takes place, and prints number of mmap calls and total + number of bytes allocated using mmap + + 6/22 + ---- +variables.c + - get_bashargcv: new dynamic "fetch" variable for BASH_ARGV and + BASH_ARGC, for backwards compatibility: if a script makes a + reference to either variable at the top level (not in a shell + function) without enabling debugging mode and not having initialized + the variable previously (using a simple semaphore), create the + variables + + 6/25 + ---- +configure.ac + - opt_bash_malloc: bash malloc no longer disabled for systems that + require eight-bit alignment; the bash malloc has had this for a + long time + + 7/4 + --- +bashline.c + - pre_process_line: if command-oriented history is enabled, and the + line being expanded is the second or later in a multi-line command, + and we know the command is being saved as the current history entry, + decrease history_length before calling history_expand so references + like !! refer to the previous history entry as usual + +lib/readline/histexpand.c + - history_quoting_state: new variable, can be set by calling + application before calling history_expand to note that the string + being expanded is part of a quoted string. Can be set to a single + quote, a double quote, or 0 (no quoting) + - history_expand: look at history_quoting_state and honor the + single-quote setting by not expanding any initial portion of the + line before the closing single quote. This allows history expansions + to be performed on a line containing a closing single quote if they + appear after the single quote + +lib/readline/history.h + - history_quoting_state: extern declaration + +bashhist.c + - bash_history_inhibit_expansion: if history_quoting_state indicates + that this string is single-quoted, skip over the single-quoted + portion and determine whether or not the portion after the + quoted string needs to be inhibited from history expansion + +parse.y + - shell_getc: set history_quoting_state based on the contents of the + current delimiter before calling pre_process_line + + 7/6 + --- +lib/readline/doc/hsuser.texi + - describe the default behavior of backslash and single and double + quotes + +lib/readline/doc/hstech.texi + - history_quoting_state: describe effect of setting this variable + - history_quotes_inihibit_expansion: expand the description to include + the default quoting behavior that setting this variable enables + + 7/9 + --- +support/man2html.c + - unescape: use memmove instead of strcpy to handle overlapping strings + Report and fix from Bernhard M. Wiedemann + +lib/sh/getenv.c + - getenv: check that environ is non-NULL before looking through it. + Report and fix from Keeley Hoek + + 7/12 + ---- +braces.c + - mkseq: use better integer overflow handling for systems with 32-bit + ints and 64-bit intmax_ts. Bug reported by Simon Wörner + as the result of fuzzing + +builtins/declare.def + - declare_internal: make sure bind_variable returns non-NULL when + setting attributes for a variable named as an argument to declare + that also appears in the temporary environment (and is a nameref). + Bug reported by Simon Wörner + +parse.y,externs.h + - reset_readahead_token: new convenience function for the rest of + the shell, resets token_to_read if it's a newline (as it will be + after reset_parser is called) + +eval.c + - reader_loop: if we're just going to execute one command, make sure + the read-ahead token isn't set to something that will result in a + NULL command (by calling reset_readahead_token), since the code + will take that as the one command and set EOF_Reached + + 7/15 + ---- +doc/{bash.1,bashref.texi} + - indirect expansion: clarify that the expansion works on parameters, + not just variables (NAMEs). Suggested by konsolebox + + + 7/16 + ---- +doc/{bash.1,bashref.texi} + - INSIDE_EMACS: document its effect on line editing + + 7/17 + ---- +lib/readline/{readline.c,rlprivate.h} + - _rl_eof_found: new variable, private to the readline library, that + indicates whether the current call to readline() will return NULL + because we read EOF + +lib/readline/rltty.c + - rl_deprep_terminal: if bracketed paste mode is active, the last + character of the string to disable it is \r (to avoid confusing + the terminal driver about where the cursor is). In this case, + output a newline before returning so subsequent text (like the + `exit' bash prints) doesn't overwrite the prompt. Bug from + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903936 + +variables.c + - make_local_assoc_variable: add second argument like corresponding + local array function, to allow this function to return an existing + local array variable to the caller for the caller to handle + +variables.h + - make_local_assoc_variable: change function prototype to add second + arg + +{subst.c,variables.c} + - make_local_assoc_variable: change callers + +builtins/declare.def + - declare_internal: call make_local_assoc_variable with a non-zero + second arg to have it return an existing local array variable to be + flagged as an error. Fixes bug reported by Grisha Levit + + - declare_internal: call make_local_array_variable with unconditional + second argument of 1 for the same reason as above + + 7/18 + ---- +variables.c + - bind_invalid_envvar: new function, takes invalid names from the + initial environment (names that are not valid shell identifiers) and + stores them in a separate hash table (invalid_env) + - maybe_make_export_env: make sure to add names from invalid_env to + the export env + - assign_in_env: for now, prevent variable names that aren't shell + identifiers from being added to the temporary environment. Addresses + issue raised by Grisha Levit + +test.c + - unary_test: rearrange code slightly to avoid a wasted variable lookup + if the argument to -v is a subscripted array reference + + 7/19 + ---- +variables.c + - nameref_transform_name: if a name doesn't resolve to a shell variable, + this function will check whether it resolves to a nameref that + points to a variable that hasn't been created yet + +variables.h + - nameref_transform_name: extern declaration + +subst.c + - do_compound_assignment: make sure that we follow any nameref chain + if the name passed resolves to a nameref that points to a variable + that doesn't exist. Fixes issue raised by Grisha Levit + + +builtins/declare.def + - declare_internal: before calling any variant of make_local_variable, + make sure to perform any transformation of the name indicated by an + existing nameref. Fixes issue raised by Grisha Levit + + + 7/20 + ---- +builtins/declare.def + - declare_internal: if we are creating a global variable with -g, even + if we're not giving it a value, check for namerefs at the global + scope to avoid confusion with namerefs at the local (function) scope. + +subst.c + - expand_word_internal: if a double-quoted string expands to nothing, + make sure we note that for later by setting had_quoted_null, just + as we do for single-quoted empty strings + +subst.[ch] + - W_SAWQUOTEDNULL: new flag (replaces W_HASCTLESC, which is unused), + means that we saw a possibly-discarded quoted null while expanding + this word + +subst.c + - expand_word_internal: if expansion results in a non-empty word but + we saw a quoted null during expansion (had_quoted_null == 1), set + W_SAWQUOTED_NULL in the returned word + - expand_word_internal: if a recursive call to param_expand comes back + with W_SAWQUOTEDNULL set in the resulting word, set had_quoted_null + to note it + - parameter_brace_expand_rhs: if a recursive call to expand_word_internal + returns a non-quoted-null string (after an optional call to + string_list) make sure we pass the W_SAWQUOTEDNULL flag back to the + caller + - word_list_split: if a word expands to nothing after expansion and + splitting, but we saw a quoted null during the expansion + (W_SAWQUOTEDNULL), return an empty word + + 7/25 + ---- + +subst.c + - do_compound_assignment: if creating a local variable, make sure to + set `newname' to the name of the variable returned from find_variable, + since that follows namerefs. Fixes issue raised by Grisha Levit + + + 7/29 + ---- +subst.c + - get_var_and_type: if VALUE is NULL, check before calling dequote_string. + Report and fix from Grisha Levit + + 7/30 + ---- +variables.c + - make_local_{array,assoc}_variable: make sure we're not trying to + inherit a value from an incompatible array type. Fixes issue raised + by Grisha Levit + - nameref_transform_name: if we're trying to resolve a nameref that + will be used to create a local variable, make sure the nameref is + at the same variable scope. Report from Grisha Levit + + + 8/2 + --- +array.c + - array_subrange: change to use string_list_pos_params after creating a + WORD_LIST from the array slice, like assoc_subrange does + +subst.c + - parameter_brace_substring: since assoc_subrange and array_subrange + both call string_list_pos_params now, treat the results the same as + the VT_POSPARAMS case (pos_params also calls string_list_pos_params). + Fixes behavior difference between ${a[@]:sub} and ${@:sub} reported + by Ilkka Virta + + 8/3 + --- +array.c + - array_patsub: rewrite to work in terms of a WORD_LIST * and call + string_list_pos_params on the result to be consistent with the + expansions of ${@/pat/rep} and ${*/pat/rep} + +assoc.c + - assoc_patsub: rewrite to work in terms of a WORD_LIST * and call + string_list_pos_params on the result to be consistent with the + expansions of ${@/pat/rep} and ${*/pat/rep} + +subst.c + - parameter_brace_patsub: change how return value of {array,assoc}_patsub + is treated to make it identical to pos_params_pat_subst, since they + all call string_list_pos_params now + - expand_string_for_pat: make sure we preserve the value of + expand_no_split_dollar_star instead of just unconditionally setting + it back to 0 in case it was 1 before this function was called + + 8/6 + --- +array.c + - array_modcase: rewrite to work in terms of a WORD_LIST * and call + string_list_pos_params on the result to be consistent with the + expansions of ${@,,} and ${*,,} + +assoc.c + - assoc_modcase: rewrite to work in terms of a WORD_LIST * and call + string_list_pos_params on the result to be consistent with the + expansions of ${@,,} and ${*,,} + +subst.c + - parameter_brace_casemod: change how return value of {array,assoc}_modcase + is treated to make it identical to pos_params_modcase, since they + all call string_list_pos_params now + + 8/8 + --- +builtins/declare.def + - declare_internal: if we are making local variables, and not dealing + with the nameref attribute, make sure that any nameref variable we + followed when resolving the name given was at the same variable + context. If not, we just want to make or use a local variable with + the name passed; if so, we want to use the nameref value as the + variable name. Report from Grisha Levit + + 8/9 + --- +configure.ac + - globasciiranges: RRI now on by default, must be turned off explicitly + at configure time or runtime with `shopt -u globasciiranges' + + 8/14 + ---- +variables.c + - dispose_saved_dollar_vars: decrement stack pointer before looking + for saved positional parameters to dispose; stack pointer always + points to the first unused slot + + 8/15 + ---- +variables.c + - dollar_arg_stack: now a stack of struct saved_dollar_vars, which has + an array for the first ten (dollar_vars) and a WORD_LIST * for the + remaining (rest_of_args). Fixes performance issue with function calls + and large numbers of positional parameters raised by + Bize Ma + - {save,restore,free,free_saved}_dollar_vars: new functions to manage + dollar_vars and dollar_arg_stack members. Need to keep these in sync + with whatever remember_args does + - push_dollar_vars: use save_dollar_vars, which just copies pointers, + and directly assign rest_of_args, without copying the words, to the + dollar_arg_stack entry. Have to clear dollar_vars and rest_of_args + with the assumption that callers will call remember_args(args, 1) + immediately following + - pop_dollar_vars: free current positional parameters and restore old + ones from pointers saved in dollar_arg_stack, making sure to + invalidate any cached value for "$@" + - dispose_saved_dollar_vars: free saved pointers from current index + into dollar_arg_stack + +doc/{bash.1,bashref.texi} + - POSIXLY_CORRECT: make sure to note that bash makes sure this variable + is set when posix mode is enabled + + 8/17 + ---- +{jobs,nojobs}.c + - set_jobs_list_frozen: set jobs_list_frozen to a particular value. + Intended to save and restore the value around code sections instead + of unconditionally unfreezing it. + +jobs.h + - set_jobs_list_frozen: extern declaration + +execute_cmd.c + - execute_pipeline: if lastpipe is enabled, save and restore the + value of jobs_list_frozen using freeze_jobs_list/set_jobs_list_frozen + to avoid problems with race conditions and nested pipelines + causing jobs to be removed from the jobs table. Fixes savannah issue + https://savannah.gnu.org/support/index.php?109541 reported by + Björn Kautler + + 8/24 + ---- +execute_cmd.c + - lastpipe_cleanup: call set_jobs_list_frozen instead of + unfreeze_jobs_list + - execute_pipeline: set up lastpipe_cleanup with old value of + jobs_list_frozen + + 9/3 + --- +builtins/printf.def + - getuintmax,getfloatmax: on a conversion error, return as much of the + value as we were able to convert instead of 0. Fixes bug reported + by Robert Elz + + 9/4 + --- +lib/readline/text.c,lib/readline/rlprivate.h + - _rl_backward_char_internal: new function, guts of rl_backward_char + and rl_backward_byte, not currently used there + +lib/readline/vi_mode.c + - _rl_vi_advance_point: new function, move point forward by one + character, handling multibyte locales and characters and the end + of line semantics + - _rl_vi_backup_point: new function, move point backward by one + character, handling multibyte locales and characters + - rl_vi_eword,rl_vi_eWord: use rl_vi_advance_point instead of a simple + increment to handle multibyte characters. Fixes bug reported by + Enrico Maria De Angelis + + 9/5 + --- +lib/readline/vi_mode.c + - rl_vi_fword,rl_vi_fWord: use rl_vi_advance_point instead of a simple + increment to handle multibyte characters + - rl_vi_bword,rl_vi_bWord: use rl_vi_backup_point instead of a simple + decrement (and _rl_vi_advance_point where necessary) to handle + multibyte characters + - rl_vi_complete,_rl_vi_change_mbchar_case,_rl_vi_domove_motion_cleanup: + use _rl_vi_advance_point instead of simple rl_point increment + - vi_delete_dispatch,vi_change_dispatch,vi_yank_dispatch: use + INCREMENT_POS instead of a simple increment to rl_mark to handle + multibyte characters + - rl_vi_column: use _rl_forward_char_internal, starting with + rl_point == 0, to handle multibyte characters (Posix says `character + position', not index) + + 9/7 + --- +configure.ac + - changed release status to `beta' + + 9/9 + --- +lib/readline/display.c + - _rl_update_final: if the bottom line has zero characters and we are + on that line at column 0, don't bother with an additional \r\n. + Fixes redisplay nit reported by Per Bothner + + +configure.ac + - openbsd needs DEV_FD_STAT_BROKEN defined + +[bash-5.0-beta frozen] + + 9/11 + ---- +builtins/exec.def + - exec_builtin: make sure to sync the buffered stream where bash is + reading input (especially if it's fd 0) so a command exec'd by the + script can read the rest of stdin after the exec + + 9/15 + ---- +lib/readline/histexpand.c + - history_tokenize_internal: if the event contains embedded newlines + (e.g., bash with command-oriented history and lithist), use them as + word delimiters, equivalent to space and tab, so they don't end up + as separate words. Fixes issue pointed out by Viktor Dukhovni + + - history_tokenize_word: don't break if we get a newline (though we + shouldn't get one due to the loop in history_tokenize_internal + - history_expand_internal: use newline as a whitespace character when + expanding by words, as we do with history_tokenize_internal + +jobs.h + - J_PIPEFAIL: new flag for `flags' element of job struct + +jobs.c + - stop_pipeline: if pipefail_opt set, newjob gets J_PIPEFAIL in its + flags word + - raw_job_exit_status: use J_PIPEFAIL (setting of pipefail when job + created) instead of current setting of pipefail status to determine + how to compute exit status of pipeline. Tentative implementation of + Posix proposal + +expr.c + - exp0: don't call expr_bind_variable with a NULL string. Fixes + fuzzing bug reported by Eduardo Bustamante + - expr_bind_variable: don't try to do anything with a NULL or empty + LHS + + 9/16 + ---- +lib/readline/undo.c + - rl_do_undo: before we release the undo list entry we've just + processed, make sure we avoid any pointer aliasing issues caused + by having the entry being removed as part of the undo list in + _rl_saved_line_for_history. Fixes fuzzing bug reported by + Eduardo Bustamante + + 9/17 + ---- +[bash-5.0-beta released] + + 9/18 + ---- +lib/readline/bind.c + - name_and_keymap: new struct for keymap names and maps + - builtin_keymap_names: static array of builtin keymap names and + maps; preparing for allowing applications to set the names of + keymaps they create; keymap_names is initially a pointer to + this array + - _rl_get_keymap_by_name,_rl_get_keymap_by_map: new functions for + searching the keymap_names array and returning an index + - rl_get_keymap_by_name, rl_get_keymap_name: rewritten in terms of + new functions above + - rl_set_keymap_name (char *name, Keymap map): new function, set + name of MAP to NAME. NAME must not be builtin; MAP must not be one + of the builtin keymaps. Request and initial implementation from + Tom Tromey + +lib/readline/readline.h + - rl_set_keymap_name: new extern declaration for new public function + +lib/readline/doc/rltech.texi + - rl_set_keymap_name: add documentation + +lib/readline/doc/rluser.texi + - add text to `set keymap' description to note that applications + can add keymap names that can be used there + + 9/20 + ---- +parse.y + - shell_getc: don't execute the alias hack (returning a space at the + end of the string) if we are parsing a command substitution that + starts with a double paren (subshell inside a comsub), in which + case the flags are PSH_DPAREN. Fixes fuzzing bug reported by + Eduardo Bustamante + +lib/readline/isearch.c + - _rl_isearch_dispatch: default case: make sure we check multibyte + char length when deciding whether to enlarge the search string + buffer, instead of using the old assumption. Fixes fuzzing bug + reported by Eduardo Bustamante + +builtins/fc.def,execute_cmd.c + - fixed some missing free()s uncovered by coverity. Report from + Siteshwar Vashisht + +lib/glob/glob.c + - glob_vector: make sure name_vector is initialized to NULL + +lib/sh/{pathcanon,pathphys}.c + - {pathcanon,pathphys}: use memmove instead of strcpy on a possibly- + overlapping region of memory + +subst.c + - parameter_list_transform: make sure to dispose the word list in all + cases before returning + - parameter_brace_expand_rhs: make sure t1 is freed before returning + due to an invalid name resulting from an indirect expansion + +support/man2html.c + - fixed a couple of memory leaks + + 9/21 + ---- +subst.c + - process_substitute: if we are part of a job control process chain + (pipeline_pgrp != shell_pgrp), have the child shell forked to run + the process substitution set pipeline_pgrp to its own PID, + effectively becoming a process group leader without changing + its own process group. Fixes stray SIGHUP issue reported by + Jeremy Townshend + + 9/23 + ---- +arrayfunc.c + - assign_array_element: if we are assigning to an existing associative + array, and assoc_expand_once is set, allow `*' and `@' as subscripts. + Partial fix for report from Grisha Levit + +variables.c + - bind_int_variable: if valid_array_reference (lhs) is not true, + make sure that the lhs is a valid identifier before assigning the + value + +arrayfunc.c + - valid_array_reference: allow blank subscripts. They are treated as + `normal' keys for associative arrays and evaluate to 0 for indexed + arrays. More of fix for report from Grisha Levit + + + 9/24 + ---- +bashline.c + - restore_tilde: if the expanded length (xl) is longer than vl + we end up requesting a negative amount of memory (an extremely + large unsigned number). Just punt and return val in this case. + Fuzzing bug reported by Eduardo Bustamante + - restore_tilde: make sure we return what the user typed if tilde + expansion fails + + 9/29 + ---- +builtins/shopt.def + - uncomment `localvar_unset' option definition + +doc/{bash.1,bashref.texi} + - document `localvar_unset' shell option + +arrayfunc.c + - valid_array_reference: if we are parsing a subscript for an existing + associative array, the `assoc_expand_once' option is set, and the + VA_ONEWORD flag is set in FLAGS (meaning there should be nothing + following the closing `]'), don't call skipsubscript to find the + closing `]', use one that is at the end of the word. Part of fix for + issue reported by Grisha Levit + +builtins/{printf,set}.def + - pass VA_ONEWORD as part of flags value everywhere valid_array_reference + is used + +config-top.h + - CHECKWINSIZE_DEFAULT: now 1, so check_window_size is on by default + - HISTEXPAND_DEFAULT: new define, allows builder to enable or disable + history expansion by default at build time + +doc/{bash.1,bashref.texi} + - checkwinsize: document new default value + +bashhist.h + - HISTEXPAND_DEFAULT: don't define if it's already defined. Strict + POSIX mode continues to default to off + + 9/30 + ---- +lib/readline/input.c + - win32_isatty: win32-specific changes from GDB. Patch submitted by + Tom Tromey , originally from Eli Zaretskii + + + 10/1 + ---- +lib/readline/vi_mode.c + - rl_vi_start_inserting: start an undo group so we can grab the text + inserted here as a single unit, avoiding any insert coalescing + performed by rl_insert_text. Report and fix from Richard Todd + + + 10/3 + ---- +subst.c + - parameter_brace_transform: if we're asked to display the attributes + of an unset variable, check that the variable exists even if + get_var_and_type returns NULL (it checks invisible_p). Requested by + Michal Pesa + +lib/readline/kill.c + - _rl_bracketed_text: new function, collects the text pasted in + bracketed paste mode and consumes the bracketed paste end marker; + returns the pasted text and its length + - rl_bracketed_paste_begin: call _rl_bracketed_text to collect the + text + +lib/readline/isearch.c + - _rl_isearch_dispatch: set cxt->lastc to -7 if the input resolves to + rl_bracketed_paste_begin + - _rl_isearch_dispatch: if cxt->lastc == -7, call _rl_bracketed_text + to collect the pasted text and add it to the accumulating search + string. Only works if ESC is not one of the isearch terminators. + Fixes issue reported in Debian bug report 891780, + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891780 + + 10/5 + ---- +variables.c + - push_posix_tempvar_internal: new function, body of push_func_var + with additional argument saying whether it's being called from a + function or (special) builtin code path + - push_builtin_var: new function, calls push_posix_tempvar_internal + with second argument indicating builtin code path + - push_func_var: now a stub that calls push_posix_tempvar_internal + with second argument indicating function code path + - pop_scope: if called from a special builtin, call push_builtin_var + instead of push_func_var to do the right variable propagation + +builtins/shopt.def + - progcomp_alias: uncomment, make available to users + +doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi + - progcomp_alias: document shopt option, describe its use in + the section on programmable completion + +trap.c + - decode_signal: handle SIGRTMIN+n at runtime, with the `SIG' prefix + or without, case-insensitively if requested, and return SIGRTMIN+n. + These values could be different than what was available at compile + time. Report and patch from Rasmus Villemoes + + 10/8 + ---- +execute_cmd.c + - execute_command_internal: only set line_number from command->value.Subshell + if the type == cm_subshell; otherwise defer and set later + + 10/10 + ----- +examples/loadables/seq.c + - seq: new loadable builtin, derived originally from coreutils:seq.c + but with very little of that code remaining + + 10/12 + ----- +trap.c + - run_pending_traps,_run_trap_internal: honor evalnest_max and + increment/decrement evalnest accordingly, since trap actions + are processed as if run by `eval'. Feature suggsted by Mike + Gerwitz + + 10/16 + ----- +expr.c + - expr_skipsubscript: new function, calls skipsubscript with flags + similar to arrayfunc.c:valid_array_subscript if assoc_expand_once + is set and it looks like we've already expanded the subscript of + an associative array. Reported back on 8/27 by Grisha Levit + + - readtok: call expr_skipsubscript instead of skipsubscript + +arrayfunc.c + - valid_array_reference: call skipsubscript with a third arg computed + from the VA_NOEXPAND flag only if we're expanding an associative + array subscript -- we already figure out whether or not we are + +[bumped release status to beta2] + + 10/20 + ----- +builtins/setattr.def + - set_or_show_attributes: after isolating NAME, make sure to restore + the "[+]=" in case we need the word later. Issue pointed out by + Grisha Levit + + 10/21 + ----- +lib/readline/search.c + - noninc_search_from_pos: if we are supposed to be searching for a + pattern (vi mode), make sure to pass S to _hs_history_patsearch, + since that has any leading `^' stripped + +lib/readline/histsearch.c + - _hs_history_patsearch: if the search isn't anchored, put a `*' at + the beginning to force fnmatch to match anywhere in the line (could + look at this later to make a change to history_search_internal that + would avoid the need to add the leading `*') + +subst.c + - parameter_brace_expand_rhs: treat a failure to assign a variable with + a ${param:=value} expansion as an expansion error, and, in a non- + interactive posix-mode shell, exit the shell + - param_expand: don't set W_SPLITSPACE for $* unless IFS is NULL; + consistent with other uses of W_SPLITSPACE + + 10/22 + ----- +doc/{bash.1,bashref.texi} + - tweak description of bash conditional expressions to note that the + test and [ commands determine their behavior based on the number of + arguments. Suggested by Ilkka Virta + + 10/24 + ----- +execute_cmd.c + - execute_simple_command: don't set $_ to NULL when executing a + command that forks; just leave it unchanged. Tweaked the documentation + slightly as a result. Inspired by report from Ricky Tigg + + + 10/28 + ----- +redir.c + - here_document_to_fd: make sure the temp files used to store here + documents are readable (and writable, where necessary) by the user. + This can happen in the unlikely case that someone decides to shoot + himself in the foot by setting the umask to 400. Issue originally + raised back in March by Stephane Chazelas + ; fix inspired by Martijn Dekker + + + 10/29 + ----- +lib/readline/terminal.c + - bind_termcap_arrow_keys: bind the "kI" capability (what the Insert + keypad key outputs) to overwrite mode. Patch from Xose Vazquez Perez + + + 10/30 + ----- +braces.c + - mkseq: make sure to terminate result array before passing it to + strvec_dispose on an interrupt. Report and fix from Corbin Souffrant + + + 11/6 + ---- +trap.c + - _run_trap_internal: if the signal shows up as SIG_CHANGED after + running the trap handler, check for terminating signals and run any + terminating signal handler indicates. Fixes issue reported by + Owen Stephens + + 11/7 + ---- +execute_cmd.c + - execute_builtin: don't merge the temporary environment when the + `return' builtin is being executed if it's being executed by the + `command' builtin, since that's supposed to inhibit the special + builtin properties. Part of POSIX conformance problems reported + by Martin Rehak + +builtins/cd.def + - bindpwd: if canonicalization fails when -P is specified (e.g. if the + directory name length exceeds PATH_MAX), reset dirname ($PWD value) = + to the_current_working_directory (Posix cd description, step 10.) + Part of POSIX conformance problems reported by Martin Rehak + + +builtins/kill.def + - kill_builtin: support -sSIG and -nSIG without requiring them to be + separate arguments. POSIX says a "conforming implementation" should + accept them. + Part of POSIX conformance problems reported by Martin Rehak + + + 11/8 + ---- +arrayfunc.c + - array_value_internal: return NULL for invisible array variables. + Fixes issue with FUNCNAME sometimes returning invalid value reported + by Great Big Dot + +builtins/cd.def + - change_to_directory: if we are in posix mode, and the chdir to the + absolute pathname ($PWD/dirname) fails, return an error without + trying to use just `dirname' (posix cd step 10). + Part of POSIX conformance problems reported by Martin Rehak + + +execute_cmd.c + - execute_case_command: use expand_word_leave_quoted to expand the + word, then dequote the resulting string. This performs the + expansions in the order posix specifies. + Part of POSIX conformance problems reported by Martin Rehak + + +subst.c + - expand_word_unsplit: rewrite in terms of expand_word_leave_quoted + - ifs_whitespace: new macro, Posix ifs whitespace (ISSPACE; member + of current locale's space char class) + - ifs_whitesep: new macro, whitespace that is a member of $IFS; used + by list_string and get_word_from_string + - list_string: use ifs_whitesep instead of spctabnl in case $IFS + contains whitespace characters that are not space, tab, or newline + - get_word_from_string: use ifs_whitesep instead of spctabnl in case + $IFS contains whitespace characters that are not space, tab, or + newline. + Part of POSIX conformance problems reported by Martin Rehak + + + 11/9 + ---- +general.c + - posix_initialize: enable the shift_verbose option when turning on + posix mode, and disable it when posix mode is disabled. From a + report by Eric Blake + +doc/bashref.texi + - posix mode: note the effect of posix mode on shift_verbose + + 11/12 + ----- +subst.c + - parameter_brace_expand: if parameter_brace_expand_word returns an + error, make sure to set TEMP = 0 (to note that the variable is unset). + From a report by Grisha Levit + - param_expand: if expanding $! when set -u is enabled, honor the + PF_IGNUNBOUND flag and just return NULL, relying on the caller to + take care of understanding that the variable is unset + From a report by Grisha Levit + - parameter_brace_expand: if we are checking nullness, and we have a + valid array expansion, a quoted null string resulting from the array + expansion of a * or @ subscript satisfies the nullness check. + From a report by Grisha Levit + + 11/14 + ----- +aclocal.m4 + - BASH_CHECK_LIB_TERMCAP: add last-ditch check for libncursesw, since + it's apparently the only curses library on some distributions. + Report from John Frankish + + 11/16 + ----- +bashline.c + - attempt_shell_completion: allow an initial word completion to + complete a partial first word (point appears in the middle of + the word) before resorting to command completion. Report and fix + from Luca Boccassi + +[bash-5.0-beta2 frozen] + + 11/27 + ----- +bashline.c + - attempt_shell_completion: better fix for problems with fix from + 11/16. Report and fix from Tom Ryder + +expr.c + - expr_skipsubscript: fix return type. Report and fix from + Andreas Schwab + + 11/29 + ----- +subst.c + - quote_escapes_internal: refactored quote_escapes into a function + that takes an additional flag saying whether or not we are going + to split the result. If we are not, and CTLESC is in IFS, we quote + the CTLESC (ditto for CTLNUL) to prevent it being removed when the + string is dequoted. + - quote_escapes: call quote_escapes_internal with FLAGS == 0 + - quote_rhs: new function, calls quote_escapes with FLAGS == PF_NOSPLIT2 + so that a CTLESC will be quoted if CTLESC is in $IFS + - parameter_brace_expand_word: call quote_rhs on the value of a variable + if PFLAGS includes PF_ASSIGNRHS, indicating that we will not be + splitting the word, but we will be dequoting it. Fixes bug reported + by Martijn Dekker + - param_expand: same change as for parameter_brace_expand_word + +execute_cmd.c + - execute_in_subshell: if we are running a trap (running_trap > 0), + turn off the SIG_INPROGRESS and SIG_CHANGED flags for that signal + by calling run_trap_cleanup and reset running_trap to 0 (watch the + second part!). Tagged for bash-5.1. + + 11/30 + ----- +lib/readline/doc/rltech.texi + - rl_set_keymap_name: correct typo in the name; some updates to the + description that clarify usage. Report from + + 12/4 + ---- +aclocal.m4 + - BASH_FUNC_FNMATCH_EQUIV_FALLBACK: a test of whether fnmatch(3) + understands bracket equivalence classes ([=c=]) for characters + that collate with equal weights but are not identical + +configure.ac,config.h.in + - call BASH_FUNC_FNMATCH_EQUIV_FALLBACK and define + FNMATCH_EQUIV_FALLBACK to 1 if it can be used for equivalence + classes + + 12/5 + ---- +execute_cmd.c + - eval_arith_for_expr,execute_arith_command,execute_cond_command: make + sure running_trap == 0 before we reset the_printed_command_except_trap + Report from Peng Yu + +lib/glob/smatch.c + - _fnmatch_fallback_wc: new function, takes two wide characters c1 and + c2, converts them to a pattern ([[=c2=]]) and a string (c1) for + fnmatch to determine whether or not they are members of the same + equivalence class + - collequiv_wc: call _fnmatch_fallback_wc if rangecmp_wc returns + non-zero if FNMATCH_EQUIV_FALLBACK is defined, so we know that + fnmatch understands equivalence classes. Another Posix test suite + issue from Martin Rehak + + 12/6 + ---- +redir.c + - add missing cases to switch statements to shut up gcc + + 12/7 + ---- +builtins/set.def + - find_minus_o_option: new helper function, returns index into + o_options given option name + - minus_o_option_value,set_minus_o_option: use find_minus_o_option + +general.c + - new table of variables (currently all shopt options) that are + modified by going into and out of posix mode; num_posix_options() + returns the number of variables + - get_posix_options: fill in a bitmap passed as an argument (or return + a new one) of values of posix-mode-modified variables in the table + - set_posix_options: set values of posix-mode-modified variables from + the table using the passed bitmap for values + +builtins/set.def + - get_current_options: make the bitmap large enough to hold the options + in the set table and the table of posix-mode-modified variables; call + get_posix_options to fill in those values after the values from the + o_options table + - set_current_options: call set_posix_options to reset the values of + the posix-mode-modified variables at the end of the bitmap, after + the o_options values. Fixes issue reported by PJ Eby + + + 12/9 + ---- +parse.y + - select_command: add two additional productions to support select + commands without a word_list following the `in'. Fixes omission + reported by Martijn Dekker + + 12/11 + ----- +variables.c + - assign_in_env: don't allow namerefs in temporary environment + assignments to create variables with invalid names for export. Fixes + bug reported by Grisha Levit + + 12/14 + ----- +parse.y + - don't change last_command_exit_value in the 'error yacc_EOF' production + if the parser sets it to something non-zero; just make sure it + indicates an error. Fixes problem with unexpected EOF in eval + reported by Martijn Dekker + + 12/17 + ----- +expr.c + - exp2 -> expmuldiv + +lib/sh/smatch.c + - fnmatch: add extern declaration if FNMATCH_EQUIV_FALLBACK is being + used + +hashlib.c + - hash_string: add FNV offset as initial value for hash instead of + starting at 0, changes hash for associative arrays and requires a + bunch of changes to the "right" test suite files + +variables.c + - rseed: make it explicitly 32 bits; that's all we're interested in + anyway + + 12/18 + ----- + +variables.c + - brand: add some comments, make the constants explicitly 32 bits; + use signed 32-bit values for the intermediate calculations. The + algorithm is still minstd + +[bash-5.0-rc1 frozen] + + 12/21 + ----- +doc/bash.1 + - }1: remove macro definition; it's outlived its bugfix purpose. + Report from Derek Schrock + + 12/22 + ----- +subst.c + - expand_arith_string: set W_NOTILDE in the flags so we don't perform + tilde expansion at all, even for the previously-special-case array + subscript expansion. Report from Bize Ma + - expand_word_internal: take out Q_ARRAYSUB check for tilde expansion + + 12/26 + ----- +builtins/evalstring.c + - parse_and_execute: if the eval builtin gets a parser error while + parsing a string in posix mode, don't exit the shell if the eval + was run by the command builtin. report from Martijn Dekker + + +examples/loadables/{basename,dirname}.c + - dirname_builtin: skip over any `--' ending the options. Report from + Peng Yu + + 12/27 + ----- +examples/loadables/mkdir.c + - make_path: add argument noting whether or not the user specified -m; + only attempt the chmod on an existing directory if the user did so + - make_path: when creating intermediate directories, perform the + mkdir (path, 0) and chmod separately as the posix text recommends + + 12/28 + ----- +parser.h + - PST_COMMENT: new state, set when the shell is reading characters + until newline as part of comment processing + +parse.y + - shell_getc: don't return a space at the end of a token if the parser + is consuming a comment. Fixes bug reported by Harald van Dijk + + + 12/31 + ----- +lib/glob/glob_loop.c + - INTERNAL_GLOB_PATTERN_P: revert change from 4/27 that makes this + function return non-zero for a backslash in the string. Based on a + report from Tom Ryder + +[bash-5.0 frozen] + +[bash-5.0 released] + + 1/6/2019 + -------- + +examples/loadables/basename.c + - make sure to include bashgetopt.h. Reported by Angel + + +lib/malloc/malloc.c + - stdlib.h: include if botch isn't defined to provide a declaration + for abort() + +hashlib.c,Makefile.in + - fixes to make hash library testing work for others from + Eduardo Bustamante + +lib/readline/unicode.c + - u32toutf16: correct the second argument to be wchar_t *, and treat + it as such, even though it doesn't make a difference in practice. + Report and fix from Eduardo Bustamante + + 1/8 + --- + +builtins/return.def + - return_builtin: return EX_USAGE if we're not executing a shell + function or sourcing a script, so a posix-mode shell exits. Fixes + bug reported by Robert Hailey + +builtins/declare.def + - declare_internal: don't let `declare -f +f' turn off the function + attribute. Fix from Grisha Levit + - declare_internal: reject attempts to add the -A or -a attributes + to functions. Report from Grisha Levit + + 1/9 + --- +bashline.c + - completion_glob_pattern: new function, returns true if the passed + string contains a glob pattern that should be process by the glob + completion code. Completion glob patterns don't pay attention to + backslashes unless they're the last character in the string. This + is a different, more self-contained, fix for the problem reported + by Tom Ryder + +lib/glob/glob_loop.c + - INTERNAL_GLOB_PATTERN_P: restore change from 4/27 and make this + function return non-zero if it encounters a backslash in the string. + It needs to match pathexp.c:unquoted_glob_pattern_p(). Adds fix + back for issue reported by axel@freakout.de + +test.c + - arithcomp: when calling evalexp, make sure to call it with the + EXP_EXPANDED flag, since all arguments here have been evaluated + already + +arrayfunc.c + - array_expand_index: call evalexp with EXP_EXPANDED flag, since we + have run the string through expand_arith_string already + + 1/11 + ---- +parser.h + - PST_ENDALIAS: new state, means we just consumed the last character + of an alias expansion and returned the fake space + +parse.y + - shell_getc: add PST_ENDALIAS to parser_state before returning the + fake space that marks the end of the alias, making sure to do it + only once. With that set, fall through to the pop_string(), making + sure to unset PST_ENDALIAS. Fixes alias bug reported by + Ante Peric + + 1/12 + ---- +lib/glob/glob.c + - {extglob,wextglob}_skipname: make sure we check the rest of the + pattern if the extglob pattern is null, and therefore won't match + anything. If that is followed by a `.', quoted or unquoted, we can + match a leading `.' in the pathname. This code is currently not + active. + +builtins/hash.def + - hash_builtin: if -d is supplied without an argument, print an error + message and return failure, just like -t without an argument. Fixes + inconsistency reported by Dan Jacobson + + 1/13 + ---- +parse.y + - shell_getc: use shellblank when testing the last character of an + alias to determine whether or not to add a trailing space instead + of testing against a space only. These are the non-shell-metacharacters + that can delimit words. Used together with PST_ENDALIAS + + 1/17 + ---- +parse.y + - shell_getc: keep track of whether the last character read from + shell_input_line is an unquoted backslash and don't add a space to + the end of an alias if the alias value ends in an unquoted backslash. + From an austin-group mailing list discussion message from + Harald van Dijk + + 1/20 + ---- +general.c + - check_identifier: make sure CHECK_WORD is non-zero before we check + whether or not the word consists of all digits. This allows function + names to consist solely of digits when not in posix mode. From a + report by Andrey Butirsky + + 1/22 + ---- +bashline.c + - initialize_readline: only unbind ^E in vi_movement_keymap if it's + still bound to the default rl_emacs_editing_mode. Fixes bug + reported by Greg Bell + + 1/23 + ---- +builtins/shopt.def + - we need the extern declaration for syslog_history if SYSLOG_HISTORY + is defined, since it's used even if SYSLOG_SHOPT is not defined. + From a Gentoo Linux bug report, eventually reported to bug-bash by + Tomas Mozes + + 1/25 + ---- +command.h + - CMD_TRY_OPTIMIZING: new command flag, means this (simple) command is + a candidate for fork optimization (suppression) + +builtins/evalstring.c + - can_optimize_connection: new function, takes an AND_OR list (&& or + ||) from parse_and_execute, makes sure it's the last in a possibly + multi-command list, and returns non-zero if it's a simple command, + indicating that it's a candidate for fork optimization. + - parse_and_execute: if we have a cm_connection command, call + can_optimize_connection to determine if it's a suitable candidate + and set CMD_TRY_OPTIMIZING if that returns non-zero + - optimize_fork: don't bother unless the rhs of the && or || command + has the CMD_TRY_OPTIMIZING flag set. These fix the bug reported by + Brad Spencer + +execute_cmd.c + - execute_connection: case AND_AND and OR_OR: call optimize_fork on + the right side of the command before executing `second'. This will + safely restore the fork optimization we removed from + parse_and_execute() + +builtins/complete.def + - build_actions: make sure the function name argument to -F is a + valid shell function name: it doesn't contain any invalid posix- + mode characters and doesn't contain any shell break characters that + would need to be quoted when defining a function. Fixes issue + reported by Great Big Dot + + 1/28 + ---- +variables.c + - dispose_temporary_env: make sure to save temporary_env to a temp + pointer and set temporary_env to NULL before trying to dispose it, + so no flush function ever tries to add a temporary variable back + into the table (e.g., bind_variable()) + + 1/29 + ---- +builtins/evalstring.c + - can_optimize_connection,optimize_fork: add the last command in lists + separated by `;' to the list of candidates for fork optimization + + 1/30 + ---- +examples/loadables/strftime.c + - strftime_builtin: try to extend the buffer longer than tbsize*3, + which is a minimum of 24 characters, in case some of the formats + (e.g., %c) expand to something longer than that. Fixes bug + reported by Stan Marsh + + 1/31 + ---- +lib/readline/undo.c + - rl_do_undo: before inserting text while undoing UNDO_DELETE, or + performing a deletion while undoing UNDO_INSERT, make sure that + rl_point is valid by calling _rl_fix_point. Fuzzing bug and fix + from Eduardo Bustamante + +lib/readline/search.c + - _rl_nsearch_abort: validate new values for rl_point and rl_mark by + calling _rl_fix_point(). Fuzzing bug and fix from + Eduardo Bustamante + +subst.c + - string_extract_double_quoted: if we parse a syntactically-incorrect + $( expression while extracting a double-quoted string, si will + appear to go `backward'. Just skip over the rest of the string and + continue. Fuzzing bug from Eduardo Bustamante + +lib/readline/text.c + - rl_change_case: if towupper or towlower returns a valid wide char + that can't be converted back to a valid multibyte character, use + the original character and go on. Fuzzing bug from + Eduardo Bustamante + +lib/glob/glob.c + - wdequote_pathname: if there are no multibyte characters in pathname, + just call udequote_pathname and don't bother converting it to wide + characters + - glob_pattern_p: if there are no multibyte characters in the pattern, + just call internal_glob_pattern_p right away + +lib/glob/glob_loop.c + - INTERNAL_GLOB_PATTERN_P: return 2 if we see only backslash-quoted + characters without any other unquoted glob pattern characters, so + interested callers can shortcut and just dequote the pathname + +pathexp.c + - unquoted_glob_pattern_p: return 2 if we see only backslash-quoted + characters without any other unquoted glob pattern characters, + consistent with the glob library + - unquoted_glob_pattern_p: don't count a backslash quoting a slash as + a backslash that will trigger a call to shell_glob_filename, since + backslashes at the end of patterns (pathname components) will always + fail to match. XXX - this is provisional + +lib/glob/glob.c + - glob_filename: if we have a directory name that has no unquoted + special glob chars, but has backslashes, just dequote it and return + it without going through the rest of the glob expansions. Partial + fix for issue with unreadable directories reported by + Andrew Church + + 2/2 + --- +lib/readline/readline.c + - readline_internal_teardown: if revert-all-at-newline is set, make + sure that the history position is at the end of the history before + calling _rl_revert_all_lines(). Fixes bug reported by + johnlinp@gmail.com and frederik@ofb.net + + 2/4 + --- +builtins/complete.def + - complete_builtin: fix check for argument to -F to use strpbrk + instead of incomplete use of strcspn. Fix from Grisha Levit + + + 2/5 + --- +lib/readline/readline.c + - rl_parse_and_bind: change parsing of boolean variable values to + look for and consume an optional whitespace-delimited word. This + allows trailing spaces and everything that follows to work. Idea + from Bize Ma + - rl_parse_and_bind: print error message about unknown variable names + instead of calling rl_variable_bind to do it + - rl_variable_bind: report error if setting string variable returns + non-zero + + 2/6 + --- +lib/readline/histfile.c + - read_history_range: close FILE before returning if the history file + size is 0 + + 2/11 + ---- +bashline.c + - edit_and_execute_command: add the current line buffer to the history + list even if it's empty and rely on other code in bash_add_history + to take care to not add multiple semicolons with multiple blank + lines and command_oriented_history. Live with the blank lines as + history entries for now. Fixes problem reported by + Johannes Hielscher + +lib/readline/misc.c + - _rl_revert_all_lines: renamed to _rl_revert_previous_lines, since + that is basically what it does + - _rl_revert_all_lines: now just makes sure the history offset is at + the end of the history and calls _rl_revert_previous_lines. Inspired + by a suggestion from johnlinp@gmail.com + +lib/readline/readline.c + - readline_internal_teardown: revert change of 2/2, moved that code + into the (new) _rl_revert_all_lines + +lib/readline/rlprivate.h + - _rl_revert_previous_lines: new extern declaration + +builtins/bind.def + - bind_builtin: make sure the unwind-protect gets run when the --help + option is used, so use `case GETOPT_HELP:' instead of `CASE_HELPOPT;'. + Report and fix from Koichi Murase + + 2/12 + ---- +lib/readline/util.c + - _rl_abort_internal: don't just turn off the MACRODEF state, call + _rl_kill_kbd_macro to delete any traces of an in-progress macro + definition before turning it off. Fixes fuzzing bug. + + 2/13 + ---- +examples/loadables/Makefile.in + - CCFLAGS: add $(CPPFLAGS) to value, based on a report from + Christian Weisgerber + + 2/15 + ---- +bashline.c + - posix_readline_initialize: keep track of the vi insertion keymap + binding for TAB, since we change it in this function. Save the + old binding before we change it when turning posix mode on, and + restore that old binding when turning posix mode off, as long as + the current binding is still rl_insert. Suggested by a report from + Koichi Murase + + 2/17 + ---- +builtins/exec.def + - exec_builtin: save value of job_control; use it to restore the value + of job_control if an exec fails in an interactive shell instead of + enabling it by default in an interactive shell. Report from + Grisha Levit + +lib/readline/bind.c + - _rl_function_of_keyseq_internal: make sure to use checks against LEN + instead of a NULL character in KEYSEQ to determine the length of the + key sequence. + Report and fix from Koichi Murase + - rl_bind_key: make sure the KEY argument is not larger than the + largest unsigned character. + Report and fix from Koichi Murase + - rl_translate_keyseq: make sure that M-x correctly adds "\ex" to the + key sequence array when convert-meta is set. + Report and fix from Koichi Murase + - rl_translate_keyseq: now unconditionally converts meta characters to + ESC-prefixed key sequences when processing \0nnn \Xnnn and \[char] + escape sequences that resolve to meta characters and for `normal' + characters that have the meta bit set + Report and fix from Koichi Murase + +jobs.c + - end_job_control: if the terminal pgrp (terminal_pgrp) is not the same + as the original pgrp (original_pgrp), set the terminal's pgrp to the + original pgrp so when we reset the shell's pgrp to original_pgrp, + we'll continue to be able to read from the terminal if the shell is + interactive. Fixes bug with turning off job control before starting + an interactive shell reported by Grisha Levit + + + 2/19 + ---- + +jobs.c + - end_job_control: if the setpgid(0, ...) succeeds, reset the value of + shell_pgrp. Fixes pgrp mismatch after failed exec in an interactive + login shell reported by Grisha Levit + + 2/20 + ---- +bashhist.c + - pre_process_line: save history_length before calling history_expand, + and after possibly decrementing history_length, just restore the old + value instead of incrementing it. Fixes bug reported by + Michael Albinus + - bash_add_history: don't bother calling really_add_history if the + history is stifled and the max number of entries is 0 + +aclocal.m4,configure.ac,m4/*.m4 + - replace the old set of gettext m4 macros with the latest m4 files + from the gnulib and gettext distributions + + 2/21 + ---- +builtins/cd.def + - bindpwd: initialize canon_failed to 0 to prevent `cd -e' from always + failing + +command.h + - W_EXPANDRHS: new flag, set when expanding WORD in ${paramOPword} + +subst.c + - expand_string_for_rhs: set W_EXPANDRHS in word to be expanded + +subst.c + - expand_word_internal: when encountering a single or double quoted + string that expands to nothing, add a CTLNUL if the W_EXPANDRHS + flag is set and the word isn't quoted, indicating that the word + will eventually be split and we need to preserve the null to + produce an empty word. From a discussion on bug-bash started by + sunnycemetery@gmail.com + + 2/22 + ---- +bashline.c + - completion_glob_pattern: make sure to skip over a character quoted + by a backslash. Fixes bug reported by John Van Sickle + + + 2/23 + ---- +lib/readline/complete.c + - last_completion_failed: keep track of whether the last completion + attempt generated any matches + - rl_complete: if the last readline command was completion, but the + completion attempt didn't generate any matches, don't regenerate + and display the match list. Treat it as a new completion attempt. + Suggested by Richard Stallman + +bashhist.c + - maybe_append_history: try to handle the case where the number of + history entries in the current shell session is greater than the + number of entries in the history list. Based on a report from + + + 2/25 + ---- +aclocal.m4 + - BASH_FUNC_FNMATCH_EQUIV_FALLBACK: use en_US.UTF-8 instead of + de_DE.UTF-8; it's more likely to be installed + + 2/26 + ---- +doc/{bash.1,bashref.texi} + - extdebug: make sure to note that setting this option in a startup + file causes an attempt to start the debugger. Noted by Linda + Walsh + +builtins/fc.def + - fc_builtin: if we are not listing, and delete the last history entry, + make sure that histbeg or histend, whichever is greater, is clamped + at the value of last_hist to avoid dereferencing the just-removed + history index. Fixes bug reported by Chris King-Parra + + + 2/27 + ---- +shell.c + - init_interactive: assignment to histexp_flag should be protected by + #ifdef BANG_HISTORY. https://savannah.gnu.org/patch/?9759 + +subst.c + - list_string: if we have a non-null string, but quoted null character + removal leaves an empty string, set W_SAWQUOTEDNULL in the returned + word flags so the caller can deal with it + - parameter_brace_expand_rhs: deal with word with null or empty word + and W_SAWQUOTEDNULL in the flags coming back from expand_string_for_rhs + by turning it into a quoted null word and modifying the flags. Part + of fix for bug report from Grisha Levit + - expand_word_internal: if a double-quoted string comes back with a + quoted null as the expansion of "$@", note that we saw it, but still + add a quoted null into the result string instead of short-circuiting. + Part of fix for bug report from Grisha Levit + + 3/1 + --- +examples/loadables/fdflags.c + - O_CLOEXEC: instead of not using it, synthesize a definition for it + from unused bits in the file status word. It's only used as a + placeholder anyway. Fix from code by Robert Elz + +execute_cmd.c + - execute_connection: call optimize_fork on the rhs of a `;' connection + to attempt to optimize the last simple command in a list + + 3/4 + --- +subst.c + - parameter_brace_expand: add `@' to the list of operators that cause + unbound parameter errors. Fixes oversight bug reported by + Martin Schulte + + 3/5 + --- +subst.c + - expand_word_internal: update to fix from 2/21 and 2/27 to accommodate + contexts when word splitting will not take place (W_ASSIGNRHS). Fix + from Grisha Levit + - param_expand: if IFS is unset, and we are expanding $* in a context + where we're not going to be performing word splitting, just treat it + as if IFS=" " and don't set W_SPLITSPACE. Report and hint at fix + from Grisha Levit + - param_expand: if IFS is not null, and we are expanding $* in a + context where we're not going to be performing word splitting, and + we quote a null string (resulting in a quoted null), make sure we + set W_SAWQUOTEDNULL to note this for the caller + - parameter_brace_expand_rhs: make sure to remove any W_SAWQUOTEDNULL + flag for a the word on the rhs of the `=' operator if the original + string is null or the original string is not null and the returned + string (after dequoting) is not null. For instance ${v= ''} should + not have the SAWQUOTEDNULL flag set because it is " " after + expansion and dequoting, even though we saw a quoted null there + + 3/6 + --- +lib/sh/eaccess.c + - sh_eaccess: AIX needs the same kind of additional checks as FreeBSD + and Solaris when running as root and checking whether or not a file + is executable. Report and fix from REIX, Tony + + 3/7 + --- +lib/glob/glob.h + - GX_RECURSE: new flag, indicates internal call to glob_filename + +lib/glob/glob.c + - glob_filename: add GX_RECURSE to recursive call to glob_filename + - glob_filename: dequote a directory name (in the absence of a + filename) only if this is not a recursive call to glob_filename + ((flags & GX_RECURSE) == 0). Fixes bug reported by Dr. Werner Fink + + + 3/8 + --- +parse.y + - handle_eof_input_unit: before calling exit_builtin, set + last_shell_builtin and this_shell_builtin appropriately, since the + exit builtin uses them to determine whether or not to exit + immediately. Fixes bug reported by Tom Levy + +lib/sh/shquote.c + - sh_double_quote,sh_mkdoublequoted,sh_backslash_quote_for_double_quotes: + make sure to handle multibyte characters that may contain characters + that need to be quoted in double quotes; adding a spurious double + quote may turn them into different characters or uncover characters + that are special in double quotes. Fixes bug reported by + Stephane Chazelas + - sh_backslash_quote: don't call COPY_CHAR_P if we're in a UTF-8 + locale and the current character doesn't have its eighth bit set; + only check mb_cur_max and is_basic if we're not in a UTF-8 character + set + + 3/9 + --- +subst.c + - read_comsub: if it looks like we're starting a multibyte character, + read a whole multibyte character from buf and add it all at once, + so we don't quote each byte in a multibyte character sequence. Fixes + bug uncovered by shquote changes from 3/8 + + 3/11 + ---- +subst.c + - expand_word_internal: if we are in a context where word splitting + will not occur, but one where we need to make sure we eventually + expand "$@" to multiple words, add a space as quoted so we can still + split on the space separator in $@. Fixes bug reported by + Grisha Levit + + 3/13 + ---- +subst.c + - parameter_brace_substring, parameter_brace_patsub: treat the case + where pflags includes PF_ASSIGNRHS the same as if IFS is null, since + word splitting will not take place + +{subst,array,assoc}.c,subst.h + - string_list_pos_params: add a fourth argument: pflags; change all + callers to initially pass 0 as fourth arg + + 3/14 + ---- +subst.c + - expand_word_internal: split words with W_ASSIGNRHS flag set specially. + These and subsequent changes fix expansion bugs reported by + Grisha Levit + +subst.c + - string_list_pos_params: if we are expanding `@', make sure we honor + PFLAGS including PF_ASSIGNRHS and use string_list_dollar_at to make + sure the positional parameters are separated by spaces + - string_list_pos_params: if we are expanding `*', make sure we honor + PFLAGS including PF_ASSIGNRHS and separate the positional parameters + with the first character of $IFS + - pos_params_pat_subst,pos_params_modcase: calculate appropriate value + for PFLAGS depending on match flags value, and pass right value to + string_list_pos_params (affects @, * expansion) + - pos_params: now takes PFLAGS as argument to pass to string_list_pos_params; + changed caller + +array.c + - array_pat_subst,array_modcase: calculate appropriate value for + PFLAGS depending on match flags value, and pass right value to + string_list_pos_params (affects @, * subscript expansion) + +array.[ch] + - array_subrange: now takes additional PFLAGS argument to pass to + string_list_pos_params + +assoc.c + - assoc_pat_subst,assoc_modcase: calculate appropriate value for + PFLAGS depending on match flags value, and pass right value to + string_list_pos_params (affects @, * subscript expansion) + STILL NEED TO DO SUBRANGE + +subst.c + - parameter_brace_substring: add PFLAGS argument to array_subrange + +arrayfunc.c + - array_keys: use string_list_pos_params instead of calling + string_list_dollar_{star,at} directly. + +arrayfunc.[ch] + - array_keys: now takes a PFLAGS argument, passes to string_list_pos_params + +subst.c + - parameter_brace_expand: add PFLAGS argument to call to array_keys + +subst.c + - parameter_brace_expand_indir: now takes a PFLAGS argument and uses it + in the call to parameter_brace_expand_word + - parameter_brace_expand: add PFLAGS argument to call to + parameter_brace_expand_indir + + 3/15 + ---- +subst.c + - chk_atstar: now takes a PFLAGS parameter, changed callers. Will + eventually affect whether or not we saw $@ + - chk_atstar: if we see "$*" don't note that we saw $@ unless + expand_no_split_dollar_star is unset. This is what param_expand + does + + 3/18 + ---- +lib/readline/misc.c + - rl_get_previous_history: if we are trying to go back from the + beginning of the history, or if we are trying to go back before the + beginning of the history, call _rl_free_saved_history_line to just + get rid of the history line we saved instead of using + rl_maybe_unsave_line, which modifies the current line buffer. + Fixes bug reported by lessbug + + 3/20 + ---- +execute_cmd.c + - execute_command_internal: save and restore line_number around + user_subshell setting it to the line number saved in the command. + Fixes bug reported in https://bugzilla.novell.com/show_bug.cgi?id=1128936 + + 3/21 + ---- +lib/sh/strtrans.c + - ansicstr: handle multibyte characters that are not preceded by a + backslash so we skip over potential escapes in characters whose + multibyte representation contains a backslash. Fixes issue reported by + Stephane Chazelas + +subst.c + - reap_some_procsubs: reap_procsubs, but parameterized to take the + max index to check -- general function for future use + - reap_procsubs: now just calls reap_some_procsubs with the right arg + +execute_cmd.c + - execute_command_internal: if we are using /dev/fd for process + substitution, reap the procsubs at the end of this function (FIFOs + do it at the beginning -- look at this more closely). Only do it + for loops to avoid fd exhaustion. Fixes bug reported by + sunnycemetery@gmail.com + + 3/22 + ---- +lib/readline/{rlprivate.h,signals.c} + - _rl_interrupt_immediately: removed as no longer used + +redir.c + - heredoc_expand: new function, called for both here-documents and + here-strings, takes care of expanding the document and returns a + string + - write_here_document: use heredoc_expand, call write(2) once on the + entire document; structure is now very similar to write_here_string + + 3/23 + ---- +redir.c + - here_document_to_fd: expand the here document/here string first, + using heredoc_expand, then decide what to do; remove calls to + write_here_document/write_here_string in favor of calling + heredoc_write directly + - here_document_to_fd: if the expanded document is of zero length, + just open /dev/null right away and return it -- idea from yash + - here_document_to_fd: if the length of the expanded document is + between 1 and PIPESIZE (pipe capacity, computed by builtins/psize.aux + and stored in builtins/pipesize.h), try to use a pipe: write + the document to the write end and return the read end. Prompted by a + report from Daniel Kahn Gillmor + +builtins/enable.def + - dyn_load_builtin: add warning if dynamic builtin with a load function + is loaded more than once, before running the load function a second + time. From a suggestion by Stan Marsh + + 3/25 + ---- +jobs.[ch] + - wait_for_any_job: takes a new argument, a struct procstat * that + gets the PID of the exited job's process leader (the one that + contributes the status) and the same status we return from the + function + +builtins/wait.def + - wait_builtin: pass a struct procstat * to wait_for_any_job to get + the pid of the job's process leader (and the same status the + function returns). We don't do anything with it yet + + 3/28 + ---- +variable.c + - seedrand: add a couple more variables to the random seed + +lib/sh/tmpfile.c + - sh_mktmpdir: new function, makes a temporary directory using + mkdtemp if it's available, and generates a filename using + sh_mktmpname (which uses mktemp, if available) and makes a + directory with it if not + +config-{top,bot}.h + - set up to use mkdtemp if available + +externs.h + - sh_mktmpdir: extern declaration + - MT_TEMPFILE: new flag for the tempfile functions; means to use the + value in the NAMEROOT argument as a template for the mktemp/mkstemp/ + mkdtemp functions. Not used in mainline shell code + +examples/loadables/mktemp.c + - mktemp: new loadable builtin, with BSD options and basic semantics + + 3/29 + ---- +builtins/common.c,builtins/printf.def + - builtin_bind_variable: moved bind_printf_variable to common.c from + printf.def, renamed to builtin_bind_variable, made global for other + builtins to use + +builtins/read.def + - bind_read_variable: now uses builtin_bind_variable + + 4/4 + --- +lib/readline/histfile.c + - history_rename: wrapper function for rename(2) to deal with the Win32 + refusal to rename over an existing file; changed callers. Bug and fix + from + + 4/8 + --- +builtins/trap.def + - display_traps,showtrap: take an additional int argument, that, if + non-zero, means to print a trap command for a signal whose disposition + is SIG_DFL + - trap_builtin: if the -p option is given, and posix mode is enabled, + pass the `show every signal' flag to display_traps so SIG_DFL signals + are displayed as `trap -- - '. From an austin-group + interpretation (1212) initiated by Robert Elz . + Tagged for bash-5.1 + + 4/9 + --- +jobs.c + - list_one_job: printing one job counts as notifying the user about + it, so add a call to cleanup_dead_jobs like in the other job display + functions. Fixes https://savannah.gnu.org/support/?109667 reported + by "Brian K. White" + + 4/10 + ---- +redir.c + - HEREDOC_PIPESIZE: define to PIPESIZE if not defined, allow it to be + specified at build time; used in here_document_to_fd to determine + whether or not a pipe is used + - HEREDOC_PIPEMAX: allow build-time definition of the max heredoc size + that will be written to a pipe + - here_document_to_fd: if F_GETPIPE_SZ is defined (Linux), ensure that + the document is shorter than the possibly-dynamic max pipe size, + and fall back to the tempfile implementation if it is not + - HEREDOC_PARANOID: if this is defined to a non-zero value, + here_document_to_fd ensures that both file descriptors opened on + the temporary file refer to the same file + +lib/sh/zmapfd.c + - zmapfd: increased the default allocation sizes + +lib/sh/zcatfd.c + - zcatfd: increased the default allocation sizes + +input.c + - localbuf: increased the default buffer size for reads + + 4/11 + ---- +subst.c + - cond_expand_word: like expand_word_unsplit, we need to peform + quoted null character removal on both the LHS and RHS of the + operator, since we are not performing word splitting. Fixes bug + reported by Matt Whitlock in https://savannah.gnu.org/support/?109671 + + 4/12 + ---- +jobs.c + - wait_for_background_pids: don't bother with the loop that waits for + and reaps all children of the shell in the case that it's inherited + some children it doesn't care about. Report from Daniel Kahn Gillmor + + + 4/14 + ---- +subst.c + - command_substitute: add an unwind-protect to make sure the read end + of the pipe gets closed in the parent on a SIGINT that interrupts + the zread. Fixes fast SIGINT fd leak reported by Tycho Kirchner + + +bashhist.c + - history_number: if enable_history_list is set (`set -o history' has + been executed), return the current history number even if we're + not currently saving commands in the history list + (remember_on_history == 0). Prompted by report from Paul Wise + + + 4/20 + ---- +doc/bash.1,lib/readline/doc/rluser.texi + - make it clear that the `bind' builtin can be used to set readline + keybindings and variables. Suggestion from Dan Jacobson + + + 4/22 + ---- +lib/glob/glob.h + - GX_SYMLINK: new internal flag denoting we are processing a symlink to + a directory. If GX_GLOBSTAR is active, we should not `descend' into + that directory + +lib/glob/glob.c + - glob_filename: if the directory portion of the pattern is `**' + (all_starstar), we have globbed all of the directories corresponding + to that pattern, and we encounter a name that is a symlink to a + directory, don't descend into it: if the filename portion is null, + return that name only; if the filename portion is non-null, skip over + it because we will pick it up when we process the `real' directory. + This is a better fix for the issue originally reported by + Murukesh Mohanan back in 4/2018 and + addresses the issue raised by Eli Schwartz + - glob_dir_to_array: slight optimization: if array[i] is the empty + string, don't bother to strcpy it or check the result for a directory + for GX_MARKDIRS support + + 4/23 + ---- +bashline.c + - test_for_canon_directory: test a pathname for a directory, but + expand and canonicalize it first using bash_filename_stat_hook() + before calling stat(2) + - bash_progcomp_ignore_filenames: strip non-directories out of a match + list, but use the function above that canonicalizes the pathname to + expand the name before testing + - bash_directory_completion_matches: use bash_progcomp_ignore_filenames + to strip out non-directories so we get consistent results between + programmable completion and tab completion. Fixes bug reported by + Ville Skyttä + +builtins/read.def + - read_builtin: allow read -e and read -u N to be used together, by + calling fdopen(fd) if fd != 0. Save and restore rl_instream. Fixes + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=927768 + + 4/24 + ---- +lib/readline/input.c + - rl_getc: if readline catches SIGTSTP, the calling application must + not have had it ignored. Run the signal handler and set the signal + hook in case the application wants to handle it. Report from + Robert Elz + + 4/26 + ---- +parse.y + - parser_will_prompt: check and return true if we have consumed the + entire readline line buffer and will have to go back to readline for + more input, printing a prompt as a consequence + +eval.c + - parse_command: if parser_will_prompt() returns 0, indicating that we + still have unconsumed input in the readline line buffer, don't + execute PROMPT_COMMAND. TENTATIVE fix prompted by report from + Matteo Landi + +builtins/read.def + - set_eol_delim: save the old values before changing the bindings for + RETURN and the delimiter character, in case the delimiter is RETURN. + Fixes bug report from Stephane Chazelas + - read_builtin: if the delimiter is '\0' and we are using readline, + don't terminate the buffer and go back to read another character; + allow the NULL to pass through and terminate the read. + Fixes bug report from Stephane Chazelas + + 5/9 + --- +bashhist.c + - bash_delete_histent: decrement history_lines_this_session only if + remove_history returns a non-null history entry, and return failure + if it does return a null entry + +builtins/history.def + - history_builtin: when checking the argument to -d, display an error + if the argument is >= history_base + history_length, since that's + what history_get and remove_history check. Fixes issue reported by + + +support/shobj-conf + - hpux11: change stanza to create shared libraries on later versions of + HPUX 11. Contributed by Michael Osipov + +lib/readline/terminal.c + - _rl_init_terminal_io: assume TGETENT_BROKEN defined means that tgetent + returns 0 on success, as on HPUX 11. Bug reported by Michael Osipov + + +configure.ac + - hpux: add -DTGETENT_BROKEN to LOCAL_CFLAGS + +execute_cmd.c + - select_builtin: set executing_builtin around the call to read_builtin + so we can run traps if the read call is interrupted. From a report + from Andreas Kusalananda Kähäri + + 5/12 + ---- +doc/bashref.texi + - The Restricted Shell: add some language detailing the weaknesses of + the restricted shell mode in isolation, inspired by a discussion on + the zsh mailing list + + 5/15 + ---- +xmalloc.h + - malloc: define to sh_malloc to get file and line information from + malloc (not xmalloc) calls. From a suggestion by achurch@achurch.org + (Andrew Church) + +builtins/evalstring.c + - parse_and_execute: make sure the parser is not expanding an alias + before terminating the loop that processes characters in the string. + Fixes problem with -c commands that end with an alias reported by + Yu Kou + - should_suppress_fork: make sure that we don't try to optimize out a + fork if the parser is still expanding an alias + + 5/16 + ---- +lib/readline/misc.c + - rl_get_previous_history: if previous_history() returns NULL, only + free the saved history if we were the ones who saved it; leave any + existing saved history entry alone. Fixes problem with ^N not working + at the end of the history if we previously moved back to the start + of history + +lib/readline/histfile.c + - read_history_range: when reading until FROM lines with a history + file that has timestamps, make sure to skip to the end of the command + line corresponding to the FROMth line instead of leaving line_start + pointing to it, and keep track of the start of the last timestamp in + last_ts for use by the loop below. Fix for history -n bug reported + by HIROSE Masaaki + +lib/readline/display.c + - init_line_structures: if, for some reason, _rl_screenwidth ends up + bigger than the line_size default of 1024 (e.g., gdb's setting the + terminal width to 0), make sure line_size is at least _rl_screenwidth. + From a report by Tom de Vries + + 5/17 + ---- +variables.c + - brand: split the code into a function that generates a 32-bit value + given the last value in the sequence (intrand32) and a function that + returns a 16-bit random number (brand) + - seedrand: small change in hopes of adding slightly more entropy + - brand: modify the 16-bit version to XOR the top 16 bits of the 32-bit + seed with the bottom 16 bits and return the lower 15 bits of that + result as before. Based on an analysis by Andrew Church + + + 5/18 + ---- +variables.c + - genseed: break code that generates the 32-bit seed for the RNG into + a separate function; call from seedrand + - {brand32,sbrand32,seedrand32}: new 32-bit versions of the random + number generator functions that use the entire 32-bit internal value. + Prep for systems that don't have /dev/urandom or arc4random() + - perturb_rand32: shake up the 32-bit LCRNG in subshells + + 5/19 + ---- +variables.c + - get_urandom32: get a 32-bit random number by using the first one of + these that succeeds: reading from /dev/urandom (if available), + calling arc4random (if available), and using the internal 32-bit + RNG (always available) + - SRANDOM: expand to a 32-bit random number. This is not a LCRNG, so + the numbers shouldn't have any relationship to previous returned + values. Assignments are accepted but have no effect on the sequence. + Not documented yet + + 5/20 + ---- +doc/{bash.1,bashref.texi} + - SRANDOM: document new special variable + + 5/22 + ---- +jobs.c + - find_pid_in_pipeline: abstract some code from find_pipeline to look + for a PID in a specific pipline passed as an argument + - find_pipeline: if we have some saved pipeline(s), look there to find + the PID instead of returning failure. This process could have been + started from a DEBUG trap that saved the_pipeline. Fixes Linux bug + reported by Hengyang Zhao + +builtins/bind.def + - unbind_keyseq: use rl_function_of_keyseq_len so you can unbind ^@ + (which translates to 0). Fixes bug reported by + Dennis Williamson + + 5/23 + ---- +lib/readline/display.c + - rl_redisplay: make sure that the line structures can hold up to + _rl_screenwidth characters, to support applications like gdb that + set the screen width to huge values. Report and fix from + Tom de Vries + + 5/24 + ---- +lib/readline/bind.c + - rl_generic_bind: move `ic' from block scope to function scope to + avoid problems with compilers that destroy and recreate it every + time through the loop. Report and fix from Adam Richter + + + 5/30 + ---- +jobs.c + - wait_for_job: now takes an additional struct procstat * argument, + and returns the pid and status of the job's `controlling process' + to the caller + +{jobs,nojobs}.c + - wait_for_background_pids: take a struct proctstat * argument and fill + it in with pid and status of the last process to terminate + +jobs.h + - wait_for_job, wait_for_background_pids: add additional argument to + declaration + +builtins/wait.def + - wait_builtin: set pstat.{pid,status} each time through the pid-or-job + loop and for wait without arguments + + 6/4 + --- +sig.c + - termsig_handler: clean up last_procsub_child before exiting, after + unlinking all FIFOs or closing FDs to all the pipes. Might need to + send it a SIGTERM too. Fixes issue reported by mwnx + +config-top.h + - CASEMOD_CAPCASE: no longer defined by default + + 6/5 + --- +lib/glob/glob.c + - glob_always_skip_dot_and_dotdot: new global variable, if set to + a non-zero value, no glob pattern will ever match `.' or `..'. + Disabled by default + + 6/7 + --- +bashline.c + - cmd_xmap: changes to support multiple cmd_xmaps, one per editing + mode keymap (one each for vi insert and command modes). Changes from + Koichi Murase + +execute_cmd.c + - execute_arith_command: change from expanding the expression using + expand_words_no_vars to use expand_arith_string, with the accompanying + conversion from a WORD_LIST into a string. This makes it more + consistent with other arithmetic expansions. Inspired by a + discussion begun by Nils Emmerich + + 6/10 + ---- +jobs.c + - waitchld: since process substitutions are asynchronous, save the + status of one that exits (that we still know about) in the bgpids + list + + 6/12 + ---- +jobs.c + - wait_for_background_pids: wait for the last procsub only if it's the + same as last_asynchronous_pid + +bashline.c + - bash_backward_shellword: changes to behave better when at the + beginning of the last character on the line and to leave point at + the beginning of the shellword, like backward-word. Fixes from + Andrew Gaylard + + 6/13 + ---- +bashline.c + - __P: Replaced with PARAMS. First of many + - bash_transpose_shellwords: transpose-words, but using `shellword' + word boundaries like shell-forward-word and shell-backward-word. + Contributed by Andrew Gaylard + - "shell-transpose-words": new name binding for bash_transpose_shellwords + - bash_readline_initialize: add default bindings for shell-forward-word, + shell-backward-word, shell-transpose-words, and shell-kill-word. + Suggested by Andrew Gaylard + +lib/readline/doc/rluser.texi + - shell-transpose-words: document + - {shell-forward-word,shell-backward-word,shell-kill-word,shell-transpose-words}: + document new default bindings bash now adds + +variables.c + - set_argv0: function to assign argv0 if it's found in the initial + shell environment. Suggested by Cuong Manh Le + + - initialize_shell_variables: call set_argv0() as part of shell + initialization + + 6/14 + ---- +execute_cmd.c + - execute_for_command: make sure to call stupidly_hack_special_variables + on the index variable each time bind_variable is called on it. If + someone does something nonsensical like `for OPTIND in ...' we want + the side effects to happen. Reported by Stephane Chazelas + + - execute_select_command: do the same thing for the selection variable + after calling bind_variable + + 6/15 + ---- +builtins/set.def + - unset_builtin: if neither -f nor -v is supplied, and a NAME cannot + be a shell variable because it's not a shell identifier, try to + unset a shell function whether we're in posix mode or not. Suggested + back in 1/2019 by PePa65 and Robert Elz + + +execute_cmd.c + - execute_simple_command: if this is being executed by the command + builtin (flags&CMD_COMMAND_BUILTIN), don't bother to print the + command words if set -x is enabled. From a report by Martijn Dekker + back in 4/2018 + + 6/19 + ---- +lib/glob/glob.c + - glob_filename: if we are not being called recursively, and there is + only a directory name, dequote the passed pathname and see if it + names an existing directory. If it does, return it; otherwise return + failure ((char **)&glob_error_return). This is what makes backslash + escaped-characters in pathnames in shell variables work the same as + the same value passed directly. From an anonymous comment on + https://savannah.gnu.org/support/?109629 and a discussion on the + austin-group list. + + 6/20 + ---- +pathexp.c,lib/glob/glob.c + - posix_glob_backslash: variable to control whether or not pathname + expansion handles backslashes in the pattern the way Posix says it + should. Enabled by default + +pathexp.h + - posix_glob_backslash: new extern declaration + +builtins/shopt.def + - posixglob: new option, reflects the value of posix_glob_backslash + +general.c + - posix_vars: add posix_glob_backslash to the table + - posix_initialize: set posix_glob_backslash to 1 when turning on + posix mode + + 6/21 + ---- +doc/{bash.1,bashref.texi} + - pathname expansion: note that under some circumstances the shell + will invoke the matching engine for words with unquoted backslashes + - posixglob: document the new shell option and its effects + + 6/27 + ---- +{config.h.in,configure.ac} + - setresuid,setresgid: check and set HAVE_{DECL,}_SETRES[UG]ID as + appropriate + +shell.c + - disable_priv_mode: if we have setres[ug]id, use them over + set[ug]id, which only set the save user-id and group-id if the + process is running as root. From Ian Eldred Pudney + in https://savannah.gnu.org/patch/?9822 + + 6/28 + ---- +lib/glob/glob.c + - glob_vector: don't bother trying to read the directory if the filename + pattern doesn't have any globbing characters except backslash; just + dequote the pattern and try to lstat(2) it as if there were no + globbing characters at all. From an austingroup-bugs discussion + message from Stephane Chazelas + +bashline.c + - completion_glob_pattern: just call glob_pattern_p and make sure it + returns 1 (non-backslash globbing characters) + +builtins/help.def + - help_builtin: don't try pattern matching the help topic argument + unless glob_pattern_p returns 1 + +pathexp.c + - unquoted_glob_pattern_p: when in a bracket expression (open > 0), + don't allow an unquoted slash as part of the bracket expression. + Report from Stephane Chazelas + + 7/1 + --- +print_cmd.c + - print_function_def,named_function_string: make sure to call + PRINT_DEFERRED_HEREDOCS to finish printing any here documents and + delimiters before printing the function closing brace. Fixes bug + reported by Denis McKeon + +execute_cmd.c + - execute_command_internal: call reap_procsubs at the end of executing + a group command on systems that have /dev/fd. Fixes bug reported by + kfm@plushkava.net + + 7/3 + --- +jobs.c + - waitchld: this is in the potential SIGCHLD path, so don't call + bgp_add, which can potentially call malloc. The glibc malloc doesn't + handle that well. Report from howaboutsynergy@protonmail.com + + 7/5 + --- +builtins/bind.def + - bind_builtin: make sure return_code is >= 0 before returning it. + Fixes bug with bind -x and invalid key sequences reported by + bashbug@jonkmans.nl + + 7/8 + --- +doc/{bash.1,bashref.texi} + - unset: fixed up list of special variables that lose their special + properties if they are unset. Report and fix from Edward Huff + + + 7/9 + --- +test.c + - unary_test: update the `-N' test to use timespecs and nanosecond + granularity if available, and use mtime > atime instead of the + old mtime >= atime. Fixes bug reported by kfm@plushkava.net + +lib/sh/strtod.c + - strtod: make sure to use locale_decpoint() to determine the radix + character + + 7/11 + ---- +lib/sh/utf8.c + - utf8_mblen: return -2 if the UTF-8 sequence is incomplete + - utf8_mblen: 4-byte UTF-8 characters start with a byte <= 0xf4; limit + to 4-byte UTF-8 (since 5- and 6-byte code points were removed in 2003) + + 7/12 + ---- +parse.y,shell.h + - sh_input_line_state_t: if HANDLE_MULTIBYTE is defined, add members + for saving shell_input_line_property and its associated size; let + save_line_state and restore_line_state manage it. This means + restore_line_state no longer calls set_line_mbstate. From a report + from astian + +parse.y + - set_line_mbstate: if the current locale is not multibyte, just set + everything in the property array to 1 + - set_line_mbstate: use locale_utf8locale to optimize away calls to + mbrlen; just use utf8_mblen + + 7/14 + ---- +variables.c + - sv_tz: remake the export env if TZ is being unset. Fixes bug + reported by Travis Everett + +lib/readline/display.c + - rl_expand_prompt: if the prompt contains embedded newlines, compute + local_prompt_prefix before local_prompt because each call sets + local_prompt_newlines, and we want the values computed in the call + that uses local_prompt to be the ones that we use. Fixes prompt + wrapping bug reported by Tianon Gravi + + 7/16 + ---- +Makefile.in + - added a number of dependencies from Vemake Vemake + as reported in + http://savannah.gnu.org/patch/download.php?file_id=47219 + + 7/19 + ---- +lib/sh/utf8.c + - utf8_mblen: changes to handle invalid multibyte sequences better, + even when N means that the sequence would be too short anyway + +arrayfunc.c + - bind_assoc_var_internal: new convenience function to assign a + key-value pair to an associative array. It gets the SHELL_VAR * AND + a HASH_TABLE *, which may or may not correspond to the assoc_cell + of the variable, and performs the insertion into the hash table. + Callers take care of passing the right values. + - bind_assoc_variable: call bind_assoc_var_internal to do the real + work + - assign_compound_array_list: change to assign associative array + key-value pairs into a new hash table (NHASH), so we can still use + the old value for expansion. We do this in place of clearing out + the contents of the associative array before performing the expansion + and assignments. After doing all the assignments into NHASH, we swap + NHASH into the variable as its value and dispose of the old value. + Fixes inconsistency reported by Darren 'Tadgy' Austin + + + 7/20 + ---- +aclocal.m4 + - include bashansi.h in a bunch of AC_TRY_RUN recipies to avoid + exit() being flagged as an implicit declaration. Report and fix + from Chris Yungmann + +shell.c + - set_exit_status: set last_command_exit_value to the argument and make + sure to set PIPESTATUS from that exit value + +shell.h + - set_exit_status: extern declaration + +parse.y + - report_syntax_error: make sure to set PIPESTATUS if we set + last_command_exit_value on a syntax error + - parse_string_to_word_list,parse_compound_assignment: set PIPESTATUS + when we set last_command_exit_value + +sig.c + - throw_to_top_level,sigint_sighandler: set PIPESTATUS when we set + last_command_exit_value + +variables.c + - sv_locale: call set_exit_status to set PIPESTATUS and last_command_exit_value + +arrayfunc.c + - find_or_make_array_variable,array_expand_index,assign_compound_array_list: + call set_exit_status to set PIPESTATUS and last_command_exit_value + +builtins/evalstring.c + - parse_and_execute: set PIPESTATUS when we set last_command_exit_value + +braces.c + - brace_expand: call set_exit_status to set PIPESTATUS and last_command_exit_value + +eval.c + - reader_loop: call set_exit_status to set PIPESTATUS and last_command_exit_value + +make_cmd.c + - set PIPESTATUS when setting $? due to syntax errors or constructs + not being available + +expr.c + - expr_streval: set PIPESTATUS when setting $? due to syntax errors + +subst.c + - extract_delimited_string,extract_dollar_brace_string,do_assignment_internal, + call_expand_word_internal,array_length_reference,param_expand, + parameter_brace_expand_word,parameter_brace_expand_rhs, + parameter_brace_expand_error,parameter_brace_expand,err_unboundvar: + set PIPESTATUS when setting last_command_exit_value on error + conditions + +redir.c + - REDIRECTION_ERROR: set PIPESTATUS when setting last_command_exit_value + on error conditions + +subst.c + - match_upattern,match_wpattern: if the match length is greater than the + string length, short-circuit and return failure. Fixes bug + reported by Eduardo Bustamante + + 7/22 + ---- +lib/glob/sm_loop.c + - BRACKMATCH: if we think we've matched, tighten up the rules for + the closing right bracket in the bracket expression to be correct + in the presence of invalid character classes, collating symbols, + and equivalence classes. If they're invalid, they shouldn't require + additional right brackets to close them + + 7/25 + ---- +builtins/colon.def + - add the right includes so colon_builtin and false_builtin can take + a WORD_LIST * argument like the prototype says they do + + 7/29 + ---- +lib/readline/kill.c + - _rl_read_bracketed_paste_prefix: read the character prefix that + indicates a pasted string in bracketed paste mode. If we don't + read a valid bracketed paste prefix, push the other characters + back onto the input stack with _rl_unget_char + - _rl_bracketed_read_key: handle reading pasted input when bracketed + paste mode is enabled, including reading multibyte characters; push + anything beyond a single byte back onto the input stack where it + can be read by _rl_read_mbstring or subsequent input + - _rl_bracketed_read_mbstring: handle reading pasted input in bracketed + paste mode, using _rl_bracketed_read_key to get the pasted text, + then call _rl_read_mbstring to get the rest of any multibyte char + + +lib/readline/vi_mode.c + - _rl_vi_callback_getchar: call _rl_bracketed_read_mbstring to handle + bracketed paste mode input. Fixes issue with vi-change-char reported + by + - rl_vi_domove_getchar: just call _rl_bracketed_read_key and return + the result -- we're not interested in multibyte-character input here + yet + - rl_vi_replace: bind BRACK_PASTE_PREF key sequence if bracketed paste + mode has been enabled + - _rl_overstrike_bracketed_paste: key binding function for the bracketed + paste prefix key sequence in overwrite mode; reads the pasted text + and uses rl_vi_overstrike to add each character in overwrite mode. + Fixes issue reported by + + 7/31 + ---- +lib/readline/input.c + - _rl_read_mbchar: the first time through the loop (mb_len == 0), call + _rl_bracketed_read_key to process any bracketed paste characters + +lib/readline/text.c + - _rl_char_search: use _rl_bracketed_read_key in the non-multibyte + character case + +lib/readline/misc.c + - _rl_arg_dispatch: use _rl_bracketed_read_key in place of rl_read_key + +subst.c + - list_string: if string_extract_verbatim returns something, just make + a WORD_DESC * and add current_word directly to it, noting that we + don't want to free current_word (free_word = 0) + - string_extract_verbatim: if the separator string is the empty + string, don't bother with the loop -- just savestring the string, + update *sindex, and return the copy + - read_comsub: make the string we use to save the output from the pipe + 512 bytes instead of 128 (same size as the buffer used to read from + the pipe); fewer calls to xrealloc in the worst case + - parameter_brace_expand_length: optimize the common case (non-dynamic + scalar variable without `set -u' in effect) and just call MB_STRLEN + on the variable value in that case. From a report from + Alkis Georgopoulos + + 8/13 + ---- +execute_cmd.c + - execute_subshell_builtin_or_function: call subshell_exit() instead of + sh_exit() or exit() so the exit trap gets run. Fixes issue reported + in https://savannah.gnu.org/support/?109840 + - replace __P with PARAMS + +lib/readline/colors.c + - _rl_print_color_indicator: eliminate one use of S_ISLNK. + Report and fix from Christian Biesinger + + 8/22 + ---- +variables.c + - push_posix_temp_var: change to use bind_variable and modify variables + at the current local scope or create and modify variables at the + global scope, as if a standalone assignment statement had been + executed. This restores some bash-4.4 backwards compatibility with + respect to posix-mode assignment statements preceding special + builtins and shell functions. The bash-5.0 behavior, while perhaps + defensible, caused too many compatibility problems. Originally + prompted by several discussions with Martijn Dekker; the current + incarnation and tests based on a report to Debian BTS from + Thorsten Glaser + + 8/26 + ---- +shell.c,bashhist.c + - __P -> PARAMS + +shell.c + - set_option_defaults,reset_option_defaults: before calling + list_minus_o_options at invocation, call set_option_defaults to + set the options that are initialized to -1 to either 1 or 0, as + appropriate; then call reset_option_defaults to set them back to -1 + after list_minus_o_options returns + - init_interactive: if enable_history_list == -1, set it to 1, then + set remember_on_history to enable_history_list. Fixes bug reported + by Alex Kerzner + - init_noninteractive: if enable_history_list == -1, set it to 0, let + bash_history_reinit take care of setting remember_on_history + - init_interactive_script: if enable_history_list == -1, set it to 1, + then set remember_on_history to enable_history_list + +bashhist.c + - enable_history_list: initialize to -1 to note when it gets changed + by -o history or +o history at invocation + + 8/28 + ---- +lib/readline/terminal.c + - TGETENT_SUCCESS, TGETFLAG_SUCCESS: defines to represent successful + returns from tgetent and tgetflag, since HPUX manages to get them + wrong. New patch from Osipov, Michael + - TGETFLAG: new define, make sure tgetflag returns TGETENT_SUCCESS + - _rl_init_terminal_io: use TGETENT_SUCCESS and TGETFLAG + +configure.ac + - hpux: make sure to define TGETFLAG_BROKEN + + 8/30 + ---- +tests + - add copyright notices to all scripts longer than 15 lines at the + request of the FSF + + 9/1 + --- +lib/readline/complete.c + - _rl_complete_internal: move logic that checks whether the last + completion attempt failed and the current attempt returned a single + match and insert the single completion here. A better implementation + of Richard Stallman's suggestion of 2/23. + + 9/3 + --- +bashline.c + - edit_and_execute_command: reset the readahead token after calling + restore_parser_state, in case some call to reset_parser set + token_to_read. Fixes bug reported by null + + 9/9 + --- +execute_cmd.c + - execute_command_internal: if we're executing a command list + (executing_list != 0), save the old fifo list and close any new + FIFOs that the command opens. Fixes bug reported by + Kamil Cukrowski + + 9/10 + ---- +aclocal.m4,m4/intdiv0.m4 + - make sure `exit' is used consistently with included + - make sure `main' isn't declared to implicitly return int + - include before using ulimit + - include before testing string functions + - fixes from Florian Weimer + +configure.ac + - setresuid,setresgid: use AC_CHECK_FUNCS instead of AC_CHECK_DECL, + which always fails + +shell.c + - disable_priv_mode: use HAVE_SETRESUID and HAVE_SETRESGID instead of + the HAVE_DECL variants, which always fail configure tests + +m4/intl.m4 + - gt_INTL_SUBDIR_CORE: add back check for localeconv, removed in + newer gettext releases + + 9/16 + ---- +builtins/help.def + - help_builtin: make the closing quote printed after the argument list + for a glob pattern argument a translatable string to ease translation + for certain languages. Report from Roland Illig + +builtins/{reserved,complete,exec,getopts}.def + - minor typographical fixes from Roland Illig + +siglist.c + - include general.h for INT_STRLEN_BOUND + - initialize_siglist: use the same string for the strlen and xmalloc + for the message about an unknown signal number; use INT_STRLEN_BOUND + instead of a fixed 10 for the number + +builtins/getopts.def,doc/{bash.1,bashref.texi} + - getopts: minor changes to the description of the effect of supplying + additional arguments. Report from Roland Illig + + 9/17 + ---- +jobs.[ch] + - save_proc_status: external interface to bgp_add, takes care of + blocking and unblocking SIGCHLD + - __P -> PARAMS + + 9/18 + ---- +jobs.[ch] + - procsub_{free,add,search,delete,waitpid,waitall,clear,prune}: new + functions to keep track of the list of active process substitutions + and their statuses. Implementation is currently a singly-linked list + of PROCESS *, so functions that expect a PROCESS * to manipulate + continue to work. Inspired by report from leo.dalecki@ntymail.com + - find_pipeline,cleanup_dead_jobs,wait_for_background_pids: call new + procsub_* functions to manage procsub list; don't call the functions + in subst.c any more + +subst.c + - process_substitute: call procsub_add with the PROCESS * returned + from make_child; let the functions in jobs.c manage the list. + waitchld continues to set the pid field in the fifo list as a hint + that a particular fd or FIFO is no longer used and can be reaped + - process_substitute: let the child process clear out any existing + procsub pid list + - wait_procsubs: no longer compiled in + +sig.c + - termsig_handler: replace discard_last_procsub_child with call to + procsub_clear + +lib/readline/display.c + - init_line_structures: fix a problem which results in references to + uninitialized memory when gdb sets the number of columns to 32767 + (their `unlimited'). Modification of change from 5/23. Report and + fix from Andrew Burgess + + 9/19 + ---- +parse.y + - xparse_dolparen: after calling parse_string to consume input, make + sure to reset the parser (reset_parser()) before restoring the EOF + token and the parser_state variable. Fixes issue with nested traps + running command substitutions in command lines with command + substitutions reported by Travis Everett + + 9/20 + ---- +doc/{bashref.texi,bash.1} + - fixed a typo in the example for the =~ operator: the ? should follow + the (a), not precede it. Report from hk + - some changes to the text describing regular expression matching for + the =~ operator + + 9/25 + ---- +general.c,builtins/shopt.def + - posix_glob_backslash: remove references to this variable and the + `posixglob' shell option + +doc/{bash.1,bashref.texi} + - remove references to the `posixglob' shell option + + 9/26 + ---- +{jobs,nojobs}.c + - DEFAULT_MAX_CHILD: bump this up to 4096 + - set_maxchild: set lmaxchild to MAX_CHILD_MAX if getmaxchild returns + -1 without changing errno (assume that sysconf returns -1 meaning + unlimited) + - initialize_job_control: call set_maxchild instead of inline code + - mark_dead_jobs_as_notified: call set_maxchild to set js.c_childmax + if it hasn't been set yet + + 9/30 + ---- +lib/glob/xmbsrtowcs.c + - xwcsrtombs: implementation of wcsrtombs from gnulib, modified to + treat invalid wide characters (or wide characters that can't be + converted to multibyte character sequences) as bytes. Should be + used only in unusual circumstances where wcsrtombs fails. + +lib/glob/glob.c + - wdequote_pathname: if wcsrtombs fails to convert the dequoted wide + character pathname back to a sequence of multibyte characters, call + xwcsrtombs to try to treat the invalid wide characters as bytes -- + the call to xdupmbstowcs treats bytes that don't convert to wide + characters as just bytes, which kind of causes this problem in the + first place. Inspired by report from Geoff Kuenning + +lib/readline/complete.c + - compute_lcd_of_matches: use the case-folding code (which performs + character-by-character checking and compares invalid multibyte + sequences as bytes) instead of the old case-sensitive code (which + used _rl_compare_chars), converting characters to lowercase as + needed. Fixes bug with invalid sequences in common filename prefixes + reported by Grisha Levit + + 10/1 + ---- +builtins/shopt.def + - reset_shopt_options: add in resets for some missing shopt options. + Report and fix from Grisha Levit + +execute_cmd.c + - execute_command_internal: make sure a failed attempt to define a + shell function causes the shell to exit if -e is enabled. Report + from Andreas Kusalananda Kähäri + - execute_command_internal: combine cm_function_def, cm_arith, and + cm_cond cases into one switch case, since the code is virtually + identical across all three + + 10/3 + ---- +pathexp.[ch],lib/glob/glob.c,lib/glob/glob_loop.c + - remove all references to posix_glob_backslash in preparation for + implementing austin group interpretation #1234 + +pathexp.c + - unquoted_glob_pattern_p: revert to bash-4.4 behavior of returning 1 + only if there is an unquoted `*', `?', or bracket expression, as + per austin group interpretation #1234 + +lib/glob/glob_loop.c + - INTERNAL_GLOB_PATTERN_P: revert to bash-4.4 behavior of returning 1 + only if there is an unquoted `*', `?', or bracket expression, as + per austin group interpretation #1234 + + 10/4 + ---- +variables.c + - assign_seconds,get_seconds: use the tv_sec value returned from + gettimeofday() instead of time() to get a better approximation of + the number of seconds since the epoch for future calculations. + From a report by Stephane Chazelas + +pathexp.[ch],{bashline,subst}.c + - shell_glob_filename: now takes an additional flags argument to pass + to quote_string_for_globbing + + 10/6 + ---- +subst.c + - glob_expand_word_list: call shell_glob_filename with QGLOB_CTLESC + because quote removal hasn't been performed yet + + 10/7 + ---- +pathexp.c + - quote_string_for_globbing: if we have an unquoted backslash followed + by a CTLESC-quoted character (not CTLESC-CTLESC), just perform the + usual CTLESC-to-backslash conversion instead of skipping over it. + Fixes issue raised in austin-group discussion about globbing by + Geoff Clare (austin-group issue 1234), though + it's still inherently ambiguous + + 10/8 + ---- +include/shmbutil.h + - xwcsrtombs: extern declaration, to match other functions in that file + +lib/glob/glob.c + - wcdequote_pathname: new function, actual backslash quote removal code + from wdequote_pathname; wdequote_pathname calls it + +lib/glob/glob.c + - {udequote,wcdequote}_pathname: now public void functions + +lib/glob/smatch.c + - DEQUOTE_PATHNAME: defined appropriately to udequote_pathname or + wcdequote_pathname + +lib/glob/sm_loop.c + - DEQUOTE_PATHNAME: appropriate extern declaration + - BRACKMATCH: call DEQUOTE_PATHNAME to dequote a character class name + in a bracket expression. This is the result of a discussion on the + austin-group mailing list, from Geoff Clare and + Robert Elz + + 10/10 + ----- +execute_cmd.[ch] + - async_redirect_stdin: now a global function + +subst.c + - process_substitute: call async_redirect_stdin in the child to keep + it from having stdin connected to the terminal, since it's not a + job control process + + 10/11 + ----- +subst.c + - process_substitute: in the child process, set interactive = 0, since + an asynchronous process substitution process is not interactive. + Seems to fix issue reported by Grisha Levit + +lib/sh/shmatch.c + - sh_regmatch: implement a suggestion from Grisha Levit + and don't allow nocaseglob to enable case- + insensitive regexp matching. It hasn't been documented that way + in years + + 10/30 + ----- +bashhist.c + - bash_add_history: fix a couple of problems with adding extra blank + lines to history entries containing here-documents. Fixes bug + reported by Oguz + +lib/sh/shmatch.c + - BASH_REMATCH: no longer set to readonly. From a suggestion from + Rocky Bernstein + +doc/{bash.1,bashref.texi} + - BASH_REMATCH: document that it's no longer set to readonly + +subst.c + - getpattern: since expand_string_for_pat leaves the pattern quoted, + we need to remove quoted nulls before running the string through + string_list (and then quote_string_for_globbing, since QGLOB_CVTNULL + only handles pat[0] == CTLNUL). Fixes bug reported by Oguz + + + 11/4 + ---- +configure.ac,config.h.in + - AC_HEADER_MAJOR: look for `major' and `minor' in various header files + and define MAJOR_IN_MAKEDEV or MAJOR_IN_SYSMACROS as appropriate. + From a patch from Eli Schwartz + +examples/loadables/finfo.c + - include and as appropriate for + definitions of major/minor + + 11/6 + ---- +redir.c + - heredoc_expand: if we are expanding the WORD in a here-string, use + expand_assignment_string_to_string so the expansions are consistent + in contexts where word splitting is not performed. From a bug report + by Robin A. Meade + + 11/7 + ---- +parse.y + - xparse_dolparen: if the command substitution is incomplete or doesn't + end in `)', print an error message instead of allowing EOS to + terminate the comsub. From a bug report from + Oguz + + 11/11 + ----- +lib/sh/unicode.c + - u32toutf8: fix a typo that assigned the wrong value to the first + byte of a six-byte UTF-8 character. Report and fix from + István Pásztor + + 11/15 + ----- +doc/bash.1,lib/readline/doc/{history.3,hsuser.texi} + - quick substitution: make it clear that ^s1^s2^ is equivalent to + !!:s^s1^s2^, since that's the internal transformation we perform. + Reported by Jim Monte + - note that the `q' and `x' modifiers are mutually exclusive; last + one wins. Reported by Jim Monte + - note that the `G' modifier can work with `&' as well as `s'. + Reported by Jim Monte + - note that a word designator of `-' is equivalent to `0-'. + Reported by Jim Monte + - note that a missing `new' in a substitution modifier causes + instances of `old' to be deleted + +lib/readline/histexpand.c + - history_expand_internal: make multiple :p modifiers work to suppress + execution. Reported by Jim Monte + - get_history_word_specifier: fix so a `^' word designator works as + the second part of a range. + Reported by Jim Monte + - hist_error: make sure we don't blindly copy a null character into + the error string (e.g., if there is a missing word designator + following `:'). Reported by Jim Monte + - get_history_event: if the history event specifier (!) is followed + immediately by a `-' and a non-digit (e.g. !-a), make sure the - is + treated as part of a search string instead of making it an offset of + 0. Reported by Jim Monte + + 11/19 + ----- +lib/readline/{colors,complete,histfile,input}.c,support/shobj-conf + - fixes to make readline compile on the latest HPE Nonstop (Tandem) + releases. From Randall S. Becker + +subst.c + - pat_subst: if we have a null match, make sure we advance by one + character, not one byte. Bug reported by Chris Carlen + + + 11/22 + ----- +jobs.[ch],nojobs.c,builtins/jobs.def + - get_job_by_pid: now takes a PROCESS ** third argument; if non-null, + it gets a pointer to the PROCESS struct corresponding to the PID + argument. A convenience, not used by any caller yet + +builtins/wait.def + - interrupt_immediately: remove any uses, no longer used anywheren + +variables.c + - check_unbind_variable: return -2 if the variable name is readonly + (change) or non-unsettable (new) to differentiate the return value + from -1 from makunbound (which means variable not found) + +builtins/common.[ch] + - builtin_unbind_variable: identical to check_unbind_variable but calls + builtin_error; for use by builtin commands + +buitins/wait.def + - wait_builtin: now has -p VARNAME option, which takes the pid + returned by `wait -n' or wait without arguments and assigns it to + VARNAME, unsetting VARNAME first. Requested by Robert Elz + after a similar feature in netbsd sh (not + completely compatible yet) + +doc/{bash.1,bashref.texi} + - wait: document new -p option + + 11/25 + ----- +lib/readline/display.c + - rl_redisplay: auto-set horizontal scrolling if the terminal has + only one line; disable it if we auto-set it if the terminal grows + to more than one line. Fix from Sören Tempel + + +lib/readline/doc/{readline.3,rluser.texi},doc/bash.1 + - horizontal-scroll-mode: document auto-setting behavior + +builtins/set.def + - set_posix_mode: make setting posix mode when it's already set, or + unsetting it when it's not set, a no-op. Inspired by a report + from Ulrich Mueller + + 11/26 + ----- +doc/{bash.1,bashref.texi} + - functions: clarify that when in default mode, function names are not + limited to shell identifiers. + Suggested by Reuti + + 11/27 + ----- +lib/readline/display.c + - _rl_optimize_redisplay: tell the redisplay routines to not worry + about calculating differences between the lines and just draw the + new one. Right now, it just sets the _rl_quick_redisplay flag + - rl_redisplay: if _rl_quick_redisplay is set, just draw NEW onto + the screen at column 0 with a dumb update and clear the rest of + the line. Intended to be used when the caller knows the new line is + sufficiently different from the old one (e.g., when drawing the + i-search prompt for the first time) that it doesn't pay off to do + the calculations. As a side effect, fixes the bug reported by + лекей Шилин + +lib/readline/isearch.c + - rl_display_search: if there isn't a search string, assume this is + the first time this is called and call _rl_optimize_redisplay to + give the redisplay code a hint + + 12/2 + ---- +builtins/wait.def + - wait_builtin: allow argument to -p to be a valid array subscript + + 12/3 + ---- +lib/readline/isearch.c + - _rl_isearch_fini: add call to _rl_optimize_redisplay because we are + switching the prompt back again and it's safer to redraw everything + (even though part of the line is the same) to deal with differences + in the prompt strings. Fixes additional problem reported by + лекей Шилин + +lib/readline/display.c + - update_line: quick redisplay no longer sets cpos_adjusted before + the dumb update + - update_line: adjust _rl_last_c_pos in the case of a dumb update if we + are redrawing the prompt that includes invisible characters, since + _rl_col_width does not. We adjust by the count of invisible chars in + the first line of the prompt + - update_line: make sure to clear the rest of the line if it looks like + the number of visible characters on the new line is less than the + number of visible characters on the current line; the old calculation + does that just for the number of bytes (which is also useful) + + 12/4 + ---- +lib/readline/display.c + - rl_redisplay: if we are changing from one line to multiple lines, + don't try quick redisplay + - update_line: changes to quick redisplay to take advantage of knowing + the physical length of the prompt to avoid having to compute column + widths of the prompt string again; moved code to call clear screen + to the quick update section; no longer performs `goto dumb_update' + - update_line: try to take advantage of prompt_physical_chars when we + know we have written the prompt string (several places) to set + _rl_last_c_pos and calculate column widths + - update_line: if the spot where the old and new lines are the same is + before the end of the prompt string, adjust NLS and OLS so we write + the entire prompt string (as long as it's all on one line) and can + take advantage of already knowing prompt_physical_chars so we don't + have to compute column widths + - update_line: when copying chars from first diff to last match, adjust + _rl_last_c_pos by prompt_invis_chars_first_line, not wrap offset, + since we are on the first line, and only do this if we inserted more + bytes than wrap_offset (old code checked _rl_last_c_pos, which is + wrong in the presence of multibyte characters) + + 12/5 + ---- +lib/readline/display.c + - ADJUST_CPOS: define macro and use it in places where _rl_last_c_pos + is changed + + 12/12 + ----- +lib/readline/isearch.c + - _rl_isearch_dispatch: check for multibyte characters mapped to one + of the editing functions we treat specially to modify the search + string + + 12/13 + ----- +support/shobj-conf + - FreeBSD and Dragonfly are ELF-only and can use the same code as + Linux, so add those to the linux stanza and remove the old FreeBSD + version-specific sections. Report and fix from Baptiste Daroussin + + +bashline.[ch] + - bash_execute_unix_command: no longer static, available for other + parts of the shell to use + +bashline.c + - unbind_unix_command: take a key sequence as an argument, and unbind + it in the appropriate unix command keymap + +builtins/bind.def + - unbind_keyseq: if we are unbinding a key sequence bound to + bash_execute_unix_command, which means it was added by `bind -x', + call unbind_unix_command() to remove it from the appropriate unix + command keymap. Fixes issue originally raised by + Koichi Murase and recently by + Šimon Let + - bind_builtin: check the number of bindings to bash_execute_unix_command + before and after a call to rl_parse_and_bind and if there are fewer + after binding, we know that the bind has re-bound one of the key + sequences that was bound to execute a shell command. We unbind any + key sequences from the list before the call to rl_parse_and_bind that + don't appear in the list after the call using unbind_unix_command + + 12/19 + ----- +include/posixstat.h + - added some definitions for MinGW. Report and patch from + Eli Zaretskii + + 12/20 + ----- +lib/readline/display.c + - update_line: when wrapping lines containing multibyte characters at + the wrap point, and the number of screen positions consumed by the + first character on the new line isn't the same as the old line, + make sure we set OE before the `goto dumb_update;' since clearing + the rest of the line may use it. Tentative fix for bug reported by + Kirill Chibisov + +lib/readline/signals.c + - _rl_signal_handler: set RL_STATE_SIGHANDLER around SIGWINCH code, + like _rl_handle_signal does + + 12/26 + ----- +lib/sh/stringvec.c + - strvec_posixcmp: new function that conforms to posix requirement for + sorting globs: perform a bytewise comparison if the two strings + collate equally. Posix interp 963 and 1070 + - strvec_sort: take a new flags argument, if non-zero use the posix + string comparison function + +pathexp.c + - shell_glob_filename: call strvec_sort with the flag value to be + posix conformant + +lib/sh/stringlist.c + - strvec_sort: change callers + + 12/29 + ----- +sig.c + - throw_to_top_level: set running_trap to 0 after calling run_trap_cleanup. + This avoids spurious (in non-release versions) warnings from + run_pending_traps the next time a trap handler for that signal + runs. Bug report from Martijn Dekker + + 1/14/2020 + --------- +bashline.c + - find_cmd_start: don't treat the open brace in brace expansion as a + command start character; only treat open brace specially if it can + be a reserved word. Fixes bug reported back in October, 2019 in + https://savannah.gnu.org/support/index.php?110063 + + 1/15 + ---- +lib/readline/readline.c + - _rl_dispatch_subseq,_rl_subseq_result: if we push back a character + with _rl_unget_char or otherwise go back up the chain without a + sequence match, make sure we back up in rl_executing_keyseq. + Report and fix from Koichi Murase + +builtins/bind.def + - unbind_keyseq: if we unbind something that ends up pointing to a + shadow keymap, restore the ANYOTHERKEY binding that we used when + binding it. + Report and fix from Koichi Murase + +bashline.c + - bash_execute_unix_command: if we walked cmd_xmap for rl_executing_keyseq + and ended up pointing to a keymap (type == ISKMAP) we want the + binding for ANYOTHERKEY instead. + Report and fix from Koichi Murase + +lib/readline/bind.c + - rl_bind_key: if we're trying to bind a key sequence containing '\0' + using the old-style binding syntax (C-SPC), make sure we quote the + NULL so it will make it through rl_translate_keyseq(). + Report and fix from Koichi Murase + - rl_bind_key: if we're overwriting a binding for a macro, make sure to + free the old macro value. + Report and fix from Koichi Murase + - rl_generic_bind: if we're overwriting a macro saved to ANYOTHERKEY in + a shadow keymap created by rl_generic_bind, make sure to free the + macro data. + Report and fix from Koichi Murase + +trap.c + - run_pending_traps: save and restore the value of running_trap around + cycle through pending signals so recursive trap handler calls don't + set running_trap to 0 + - _run_trap_internal: allow some signals the shell treats specially + (e.g., SIGINT) to run recursive handlers + - _run_trap_internal: don't turn off SIG_INPROGRESS flag if it was on + for this signal when _run_trap_internal was called + - _run_trap_internal: save and restore the value of running_trap around + running the trap handler, except for SIGCHLD. Fixes bug reported by + Martijn Dekker + + 1/16 + ---- +general.c + - posix_initialize: if turning posix mode off, restore settings from + any saved set, if one exists, instead of setting a default environment + + 1/17 + ---- +parse.y,subst.c + - process_substitution: now available in POSIX mode. Most recently + requested by Martijn Dekker ; requested several + times in the past + +doc/bashref.texi + - posix mode: remove restriction that posix mode is not available + +lib/readline/vi_mode.c + - rl_domove_motion_callback: make sure to extend rl_line_buffer so it + can hold the dummy blank character we're appending. From a fuzzing + report by Tillmann Osswald + - vi_yank_dispatch: after we do an undo, make sure to fix point to be + less than the (new) rl_end + +lib/readline/text.c + - rl_forward_word: make sure that MB_NEXTCHAR doesn't go past rl_end on + invalid multibyte sequences + + 1/18 + ---- +test.c + - for the `-v' operator, use a clever trick from Martijn Dekker and + just test whether N is between 0 and $#. + + 1/21 + ---- +lib/readline/text.c + - rl_change_case: fix argument to rl_extend_line_buffer; make sure to + reset s and e after call in case rl_line_buffer was reallocated + +lib/readline/vi_mode.c + - _rl_vi_save_replace: if start ends up being less than zero, make + sure we don't read before the start of rl_line_buffer + - rl_vi_overstrike_kill_line,rl_vi_overstrike_kill_word: replacement + functions for ^U and ^W in vi overstrike mode, to keep right value + for vi_replace_count. + - rl_vi_overstrike_yank: similar for ^Y and rl_yank + + 1/22 + ---- +lib/readline/display.c + - update_line: if we're trying to wrap lines on an autowrap terminal, + punt and do a dumb update if the number of bytes in the first char + on the new line is greater than the number of bytes in the first char + of the old line. There's no guarantee we'll be able to extend the + old line buffer enough to accommodate the new bytes + - update_line: try to avoid some operations when wrapping lines if the + number of bytes in the first characters of the old and new lines is + the same + - update_line: when updating vis_lbreaks after fixing up the lines when + wrapping, make sure we don't exceed an index of _rl_vis_botlin when + updating the line break offsets + +lib/readline/text.c + - rl_delete_text: if deleting text leaves the mark past rl_end, adjust + it to rl_end + +lib/readline/vi_mode.c + - _rl_vi_goto_mark: make sure to call _rl_fix_point after setting + rl_point to rl_mark + + 1/23 + ---- +lib/readline/kill.c + - rl_kill_region,region_kill_internal: call _rl_fix_point + +lib/readline/text.c,lib/readline/rlprivate.h + - _rl_fix_mark: new function to clamp rl_mark between 0 and rl_end + + 1/24 + ---- +lib/readline/bind.c + - rl_translate_keyseq: rework how key sequences are translated with + the intent of normalizing backslash treatment. Since the current + behavior of, e.g., \C-\\, is inconsistent, this change chooses to + effectively treat and display \\ as \\ instead of \C-\. This is not + completely backwards compatible, but it seems like the most reasonable + choice. This allows things like \M-\a but is not compatible with + pre-bash-4.4 (readline 7.0) handling of \C-\, which is now treated + like \C-\0. If that proves to be a problem, we can add code to + understand \C-\ as equivalent to \C-\\. Since attempting to bind + "\C-\" has generated an error for a long time, it doesn't seem like + it will be too much of a problem. + Fixes from Koichi Murase + - rl_invoking_keyseqs_in_map: make sure to consistently output + backslash as `\\' instead of producing `\C-\' + Fixes from Koichi Murase + + 1/29 + ---- +bashline.c + - readline_get_char_offset: translate a readline buffer offset + (rl_point, rl_mark, rl_end) into a number of (possibly multibyte) + characters + - readline_set_char_offset: translate a number of (possibly multibyte) + characters into a buffer offset in rl_line_buffer. Uses a private + readline function to do it, which is bad + - bash_execute_unix_command: use readline_{get,set}_char_offset to + translate the rl_point to a character offset + - bash_execute_unix_command: bind READLINE_MARK variable, exposing + the value of rl_mark to `bind -x' functions + +doc/{bash.1,bashref.texi} + - READLINE_MARK: document new variable set by the shell + + 1/31 + ---- +examples/loadables/accept.c + - accept: new loadable builtin that will accept a TCP connection on a + specified port. Inspired by Stan Marsh + + 2/1 + --- +lib/readline/histfile.c + - history_do_write,history_truncate_file: translate the return value rv + to errno when histfile_restore returns -1 (e.g., if rename() fails). + Report and fix from A + + 2/3 + --- +lib/sh/ufuncs.c + - fsleep: if pselect/select is interrupted by a signal, return -1 and + let the caller deal with it + +lib/sh/timeval.c + - multimeval: new function, multiply a timeval by a constant integer + - divtimeval: new function, divide a timeval by a constant integer + +lib/sh/uconvert.c + - uconvert: new additional argument: EP. If non-null, it gets the + address of the first non-digit that ends conversion (like strtod); + we try to do as much of the conversion as possible if EP is set so + the caller can clean up + + 2/4 + --- +examples/loadables/mkfifo.c + - mkfifo: new loadable builtin + + 2/6 + --- +variables.c + - make_local_variable: make sure local variables that have the same + names as variables found in the temporary environment are marked as + local. From Grisha Levit back in 12/2018 + + 2/7 + --- +sig.[ch] + - restore_sigmask: function to restore top-level signal mask using + sigprocmask + +{sig,eval,jobs,nojobs}.c + - replace calls to sigprocmask with restore_sigmask(); remove extern + declarations of top_level_mask + +sig.c + - initialize_shell_signals: if SIGCHLD is blocked at shell startup, + not only remove it from top_level_mask but make sure it's unblocked + +execute_cmd.c + - execute_pipeline: if lastpipe is enabled and we're executing the + rightmost pipeline element in the current shell, make sure to unblock + SIGCHLD before calling execute_command, in case `return' or `exec' + is run and that call doesn't return. From a report by + Harald van Dijk following up to a report + by Martijn Dekker + + 2/10 + ---- +builtins/trap.def + - trap_builtin: in posix mode, when trap is run with -p, show + the disposition of all signals, even those that are still in the + default state, including signals that were ignored when the shell + starts up and haven't been reset. Don't do it in default mode. + From an austin-group discussion back in April, 2019 (interp 1211) + +findcmd.c + - search_for_command: don't add commands without the execute bit set + to the command hash table. From https://savannah.gnu.org/patch/?9789 + contributed by michaeljs1990 + + 2/11 + ---- +expr.c + - strlong: require `base#' to be followed by an integer constant; + otherwise throw an error. From a report from Jeremy Townshend + back in June, 2019 + +test.c + - unary_test: allow -v N to test whether or not positional parameter + N is set. Most recently suggested by Peng Yu + and Martijn Dekker + +builtins/getopts.def + - dogetopts: use number_of_args() to compute the number of positional + parameters + +{findcmd,variables,subst,trap,sig}.h,builtins/common.h + - __P --> PARAMS + +builtins/shift.def,builtins/common.c + - shift_builtin: moved code that modifies dollar_vars and rest_of_args + to common.c:shift_args(int times), part of move to localize changes + to positional parameters + +builtins/common.c,variables.c + - posparam_count: keep a running count of the number of posititional + parameters when dollar_vars and rest_of_args are set + + 2/12 + ---- +subst.c + - number_of_args: just return posparam_count + +builtins/shift.def + - shift_builtin: if asked to clear the positional parameters with + something like `shift $#', just call clear_dollar_vars instead of + iterating through them, unsetting them one by one + +subst.[ch],builtins/common.[ch] + - number_of_args: moved to builtins/common.c + + 2/14 + ---- +subst.c + - clear_fifo_list: when using named pipes, clear out the FIFO list + without unlinking anything and set NFIFO to 0 + +execute_cmd.c + - execute_disk_command: in the child, clear out the FIFO list, since + we haven't created any FIFOs yet + - execute_in_subshell: clear out the FIFO list, since we haven't + created any FIFOs yet + +parse.y + - special_case_tokens: allow `time -- command' + + 2/21 + ---- +subst.c + - get_var_and_type: if an unset variable (not an array) is supplied + with the `[@]' subscript, don't return "". Fix to bug reported by + Arfrever Frehtes Taifersar Arahesis ; + original bug introduced 7/29/2018 + - array_transform: take a STARSUB argument instead of VARNAME, since + we've already computed what kind of index the array reference uses + in get_var_and_type, and passing VARNAME to figure out the index + type doesn't do the right thing when we're using indirect variable + expansion. Fixes bug reported by + Arfrever Frehtes Taifersar Arahesis + - array_remove_pattern: take the same new STARSUB argument for the + same reason + - parameter_brace_transform,parameter_brace_remove_pattern: change + callers to pass STARSUB instead of VARNAME + + 2/22 + ---- +execute_cmd.c + - fix_assignment_words: if an assignment is supplied to a builtin that + creates or modifies local variables while a function is executing, + set the W_FORCELOCAL flag for that word in addition to any of the + various assignment flags + +subst.c + - shell_expand_word_list: while processing a list of assignments that + are arguments to a builtin that creates or modifies local variables, + if make_internal_declare fails while attempting to create the local + variable (or give it attributes), skip attempting the assignment but + otherwise do not make this a fatal error. This results in two error + messages: one to create the variable or modify its attributes, and + one while attempting to assign the value, but the errors to not + cause the function to return immediately. Fixes inconsistency + reported by Arfrever Frehtes Taifersar Arahesis + + + 2/23 + ---- +trap.c + - first_pending_trap: generalize into first_pending_trap and + next_pending_trap + +wait.def + - wait_builtin: close up the trapped-signal-arrives hole a little more + by looking for a signal that arrived between the last check for + pending traps and setting wait_intr_flag and behaving as if it + arrived while wait was executing. Use first_pending_trap and + next_pending_trap to find a pending trap that is not SIGCHLD + +trap.c + - trap_handler: longjmp to wait_intr_buf unconditionally if + wait_intr_flag is set; don't bother with interrupt_immediately any + more + +variables.c + - all_local_variables: now takes an arg saying whether to restrict + return value to visible variables or return all local variables, + even those that are unset (the new default) + - visible_variable_in_context: new function, restricts return values + to set local variables in the current context; variable_in_context + now returns all local variables in the current context, even the + unset ones + +variables.h + - all_local_variables: change extern function declaration + +builtins/setattr.def + - show_local_var_attributes: show all local variables at the current + variable context, including unset ones, and their attributes + - show_localname_attributes: show attributes for NAME as long as NAME + resolves to a local variable at the current variable context, even + if NAME is unset + +builtins/common.h + - show_local_var_attributes, show_localname_attributes: new extern + declarations + +builtins/declare.def + - declare_internal: allow `-p' option for `local' builtin + - declare_internal: if `local' is supplied without options, or with + the `-p' option, but no variable name arguments, display all local + variables at the current variable context by calling + show_local_var_attributes + - declare_internal: if `local -p' is supplied with variable name + arguments, call show_localname_attributes to display the attributes + for that name if it resolves to a local variable at the current + variable context. Fixes issue reported by + pepa65 + +subst.c + - array_var_assignment: if VAR is unset, print the declare command + without the assignment statement, just with the attributes + - array_transform: special-case the 'a' attribute and return the + attribute string even if the array variable is unset. Feature request + from Arfrever Frehtes Taifersar Arahesis + - parameter_brace_transform: if asked to display the attributes and + value ('A') of an unset variable, make sure we pass the variable, if + it exists with attributes but without a value, to string_transform + - string_transform: if we don't have a value but the operator is 'A', + pass the variable through to string_var_assignment + - string_var_assignment: if we have an unset variable with attributes, + return a declare command that just sets the attributes. Feature request + from Arfrever Frehtes Taifersar Arahesis + + 2/24 + ---- +locale.c + - mblen: don't try to use unless HANDLE_MULITBYTE is defined. From + https://savannah.gnu.org/support/?110200 + - set_default_locale: if HAVE_SETLOCALE isn't defined, set the default + locale to "C" + + 2/25 + ---- +general.c + - interrupt_immediately: remove all references to this that are + already commented out + + 3/2 + --- +variables.c + - push_var_context,push_posix_tempvar_internal: assignment statements + preceding shell functions no longer persist after the function + completes in posix mode. POSIX interp #654, was in P1003.1-2017 + - push_posix_temp_var: variable assignments preceding special builtins + now act as if an assignment statement had been executed in posix mode + (the Posix `current execution environment') instead of unconditionally + creating a global variable + +trap.c + - clear_pending_traps: new function, just clears the pending traps flag + for all signals + + 3/6 + --- +execute_cmd.c + - execute_in_subshell: check for interrupts and terminating signals + before resetting the terminating signal handlers, and clear all + pending traps -- they're not pending for us and we should not run a + trap handler for them + - execute_in_subshell: enable bash-5.1 change from 11/29/2018 that + resets the signal-in-progress flag if we're running a command in + a subshell, since we're not running the trap command (we are the + trap command) + + 3/10 + ---- +subst.c + - parameter_brace_expand: if we assign the empty string to a variable + using the [:]= expansion in a quoted expansion, make sure we note + we are returning a quoted null string to the caller by setting + W_HASQUOTEDNULL. Fixes bug reported by Martin Castillo + + + 3/17 + ---- +lib/readline/histfile.c + - history_truncate_file: only chown the file if we really need to. From + alex@lisas.de via https://savannah.gnu.org/support/?110207 + +lib/readline/bind.c + - rl_unbind_function_in_map: since we are looking for functions, not + key sequences, descend into keymaps attached to the keymap passed + as an argument. From a report from lockywolf@gmail.com back on 2/27, + TENTATIVE CHANGE + +variables.h + - MKLOC_ARRAYOK,MKLOC_ASSOCOK: new flags values for + make_local_{array,assoc}_variable so we can avoid hard-coded values + of 1 and make it possible to eventually pass in additional flags + +builtins/declare.def + - declare_internal: make_local_array_variable: pass MKLOC_ASSOCOK + - declare_internal: make_local_assoc_variable: pass MKLOC_ARRAYOK + +variables.c + - make_local_{array,assoc}_variable: understand new flags, pass + MKLOC_INHERIT to make_local_variable if it appears in the flags + argument + +builtins/declare.def + - declare_internal: add a new -I option for local and declare that + inherits attributes and value from a variable with the same name + at a previous scope. Inspired by netbsd sh + - if -I option is supplied, pass MKLOC_INHERIT to make_local_variable + and its array counterparts make_local_{array,assoc}_variable + +subst.c + - shell_expand_word_list: pass -I to declare if constructing a declare + command with make_local_declare, meaning we have an array or assoc + compound assignment. (Slighty unsatisfactory, but ok for now) Fix + for bug report from Kevin Locke , + https://savannah.gnu.org/support/index.php?109669 + + 3/18 + ---- +examples/loadables/basename.c + - basename_builtin: handle -- option without crashing. Report by Peng Yu + + +jobs.c + - notify_of_job_status: if in posix-mode shell is started with -c, + jobs should print the status of completed jobs. From a report by + Robert Elz back in 12/18 + + 3/19 + ---- +variables.c + - assign_in_env: if we're assigning POSIXLY_CORRECT or POSIX_PEDANTIC + in the temporary environment, save the values of the options + affected by posix mode so we can restore them when we restore the + old value of the variable after the command executes. Suggested by + Martijn Dekker + + 3/20 + ---- +syntax.h + - slashify_in_here_document: add `"' to this list, since POSIX says + that backslashes in here documents behave like backslashes in + double quotes, and backslash can quote a double quote in a double- + quoted string. This means that given P=A, + + cat < back in 1/2019. + + 3/23 + ---- +subst.c + - string_transform: add `U' (convert to uppercase), `u' (convert + first character to uppercase), and `L' (convert to lowercase) + transformations. Inspired by a discussion with Phil Smith + back in May, 2019 + - parameter_brace_transform: make sure `u', `U', and `L' are valid + transform operators + +doc/{bash.1,bashref.texi} + - parameter transformation: document new `U', `u', and `L' operators + +eval.c + - execute_prompt_command: if an array variable PROMPT_COMMANDS exists, + prefer it to PROMPT_COMMAND and execute all of the commands contained + as array elements in index order. From a proposal by Daniel + Colascione back in 1/2018 + - execute_array_command: function for array_walk to use when executing + commands in PROMPT_COMMANDS + +doc/{bash.1,bashref.texi} + - PROMPT_COMMANDS: new array variable + + 3/24 + ---- +builtins/ulimit.def + - new -R option, for RLIMIT_RTTIME (max time a real-time process can + run without blocking). Patch from Maciej Wolny + back in 7/2017 + +doc/{bash.1,bashref.texi} + - ulimit: document new -R option + +lib/readline/{display.c,rlprivate.h} + - _rl_clear_screen: now takes an argument saying whether to attempt to + clear the terminal scrollback buffer if the right termcap capability + exists + +lib/readline/{text.c,readline.h} + - rl_clear_display: new bindable command that clears the screen and + scrollback buffer + +lib/readline/funmap.c + - clear-display: new bindable command name + +lib/readline/emacs_keymap.c + - emacs mode M-C-l now bound to clear-display + +doc/bash.1,lib/readline/doc/{readline.3,rluser.texi} + - clear-display: document new function and default emacs mode binding + +arrayfunc.c + - assign_assoc_from_kvlist: allow compound assignments to associative + arrays that do not contain words of the form `[key]=value', assume + such lists are of the form (key1 value1 key2 value2). A missing or + empty key is an error; a missing value is treated as NULL. You + cannot mix the two forms. Inspired by a suggestion from Sebastian + Gniazdowski back in 7/2019 + +doc/{bash.1,bashref.texi} + - documented new associative array assignment syntax + +assoc.[ch] + - assoc_to_kvpair: new function that returns a string with quoted + key/value pairs from given associative array + +array.[ch] + - array_to_kvpair: new function that returns a string with quoted + key/value pairs from given indexed array (for completeness) + +subst.c + - parameter_brace_transform: new operator `K': produces the (possibly + quoted) value of a variable, except for arrays, where it expands to + indexed or associative array assignments in key/value pair form + - string_transform,parameter_list_transform: expand `K' to (possibly + quoted) values + - array_var_assignment: take a new fourth argument saying which kind + of assoc assignment statement to produce; calls array_to_kvpair or + assoc_to_kvpair as appropriate and just returns that value if + necessary without creating a declare command + - array_transform: if the operator is `K', call array_var_assignment + with new argument that will produce a list of key/value pairs + +doc/{bash.1,bashref.texi} + - document new 'K' parameter transformation operator + + 3/25 + ---- +doc/bash.1,lib/readline/doc/{history.3,readline.3} + - some text and formatting cleanups from Bjarni Ingi Gislason + + +bashhist.c + - SYSLOG_MAXLEN: increase to 1024, since that seems to be what most + syslog daemons handle + - bash_syslog_history: if the line is longer than SYSLOG_MAXLEN minus + the header length, log it in multiple message with a sequence number + instead of truncating. Inspired by a report from + back in 7/2018 + +lib/readline/text.c + - rl_activate_mark,rl_deactivate_mark,rl_mark_is_active_p, + rl_keep_mark_active: new functions to manage an active region. We + don't do anything with an active region yet. Part of a large patch + for active regions from Daniel Colascione + originally back in 3/2018 + - rl_clear_screen: call rl_keep_mark_active to keep the region active + across the screen refresh + - rl_newline: make sure to deactivate the region even though we don't + do any redisplay with it yet + +lib/readline/readline.h + - rl_activate_mark,rl_deactivate_mark,rl_mark_is_active_p, + rl_keep_mark_active: new extern function declarations. They are + public functions for now + +lib/readline/readline.c + - readline_internal_setup: make sure the region starts out as not + active + - readline_internal_charloop: make sure to deactivate the mark after + a command, unless the command calls rl_keep_mark_active keep it + active + +lib/readline/kill.c + - rl_bracketed_paste_begin: set rl_mark before inserting the pasted + text, so the pasted text defines the region + - rl_bracketed_paste_begin: set the region as active after inserting + the pasted text + +lib/readline/util.c + - _rl_abort_internal: make sure we deactivate the region + +lib/readline/{terminal.c,rlprivate.h} + - _rl_cr: new function to just output the term_cr (or '\r'). Part of + the active region patch + +lib/readline/display.c + - _rl_cr: use where appropriate to replace MSDOS-dependent code and + calls to tputs + +lib/readline/terminal.c + - get and store the terminal sequences to enter and exit standout + (usually some background color) mode + + 3/26 + ---- +subst.[ch] + - copy_fifo_list: now returns void * + - close_new_fifos: now takes a void * as the first argument, since it's + usually the return value from copy_fifo_list + - close_new_fifos: (named pipes): cast first argument to a char *, + since copy_fifo_list will (someday) return a bitmap + - close_new_fifos: (HAVE_DEV_FD): cast first argument to a pid_t *, + since it takes a copy of dev_fd_list; use that in the loop to + determine whether or not to close file descriptors. First half of + fix for bug reported by Valentin Lab + - unlink_fifo_list: (named pipes): when compacting the list, make sure + to avoid the copy if i == j, and, after copying fifo_list[i] to + fifo_list[j], null out fifo_list[i] so we don't try to access it + later + +execute_cmd.c + - execute_command_internal: don't call reap_procsubs after executing + the command. Rest of fix for bug reported by Valentin Lab + + - execute_command_internal,execute_builtin_or_function: ofifo_list is + now a void * instead of a char * + + 3/30 + ---- +lib/readline/{terminal.c,rlprivate.h} + - _rl_standout_{on,off}: new functions, to enter and exit terminal + standout mode + +lib/readline/rlprivate.h + - _rl_refresh_line: new extern declaration + +lib/readline/display.c + - visible and invisible lines: added members to deal with tracking the + `current face' + - realloc_line: broke code to manage visible_line and invisible_line + allocation out of init_line_structures, added code to manage arrays + of visible and invisible line face info per character + - invis_{addc,adds,nul}: new functions to add characters to the + invisible line and keep the invisible face data updated with whatever + the current face is + - set_active_region: keep track of the display region that should be + in standout mode + - rl_redisplay: use invis_addc/adds/nul to update the invisible line + buffer instead of modifying invisible_line directly + - _rl_refresh_line: moved body of function here from text.c + +lib/readline/text.c + - rl_refresh_line: now just calls _rl_refresh_line and marks the display + as fixed + + 3/31 + ---- +variables.c + - bind_variable_internal: dynamic variables with assignment functions + now honor the readonly attribute by giving an error. Fixes issue + reported by Rob Landley + - assign_seconds: allow seconds to be assigned using an arithmetic + expression + - assign_random: allow RANDOM to be assigned using an arithmetic + expression + +doc/{bash.1,bashref.texi} + - HISTCMD: note that assignments to HISTCMD have no effect + + 4/2 + --- +execute_cmd.c + - execute_in_subshell: make sure we note that we're not reading our + command input from a buffered stream any more, so we don't + sync the buffered stream backwards in subsequent commands this + subshell runs. Fixes bug reported by Ouz + + 4/3 + --- +builtins/read.def + - read_builtin: if a read in posix mode is interrupted by a signal, + make sure to preserve the value of errno around calls to + check_signals and run_pending_traps so any error message isn't quite + as confusing. Issue reported by Stan Marsh + +lib/sh/zread.c + - zread: preserve value of errno (always EINTR) around calls to + check_signals or check_signals_and_traps + +trap.c + - run_debug_trap: allow suppress_debug_trap_verbose being set to + turn off `set -v' temporarily while executing the DEBUG trap (if + it's set) + +builtins/fc.def + - set suppress_debug_trap_verbose so set -v won't be in effect while + the DEBUG trap runs. Most recently reported by Ami Fischman + ; originally raised by Boruch Baum + back in 10/2017 + + 4/6 + --- +lib/readline/display.c + - puts_face,putc_face: new functions to write strings or characters to + the display while handling standout mode + - update_line,_rl_move_cursor_relative: take additional argument(s) + describing the visible and invisible faces corresponding to the + visible and invisible lines, respectively + +lib/readline/readline.c + - _rl_enable_bracketed_paste: for the time being, initialize to 1 (on + by default) + +trap.c + - run_interrupt_trap: set pending_sigs[SIGINT] and catch_flag to 0 + since run_pending_trap usually does these things + +sig.c + - throw_to_top_level: only call the SIGINT trap if there is a SIGINT + trap pending (shouldn't matter, just a check) + +bashline.c + - bash_event_hook: try to identify the signal of interest we've + received + - bash_event_hook: if in posix mode running the read builtin, and we + get a (trappped) SIGINT, throw to top level so we can interrupt + the read. From a report by Robert Elz + + 4/7 + --- +lib/readline/display.c + - update_line: make sure to update and compare face data at the same + time as comparing old and new line data: the lines are only the same + if the face information and character information are identical + (ofd, ols, etc.) + - update_line: make sure to copy face data along with line data + - update_line: use puts_face in place of _rl_output_some_chars to + output face data along with line data + - _rl_move_cursor_relative: when we write characters, make sure to take + the face data into account using puts_face + [END OF INTEGRATION OF ACTIVE MARK AND FACE PATCHES from + Daniel Colascione ] + +{jobs,nojobs}.c + - make_child: to avoid installing a handler for SIGTERM in interactive + shells, and avoid race conditions with child processes resetting the + SIGTERM signal handler to the default, block SIGTERM and then + reset the SIGTERM handler to SIG_DFL before fork, then reset the + handler to SIG_IGN and unblock it in the parent after fork() returns. + Fix for readline and SIGTERM handling reported by Chris Down + (original change was back in 2/2013) that + allows a bash waiting in readline() for input to be killed with a + SIGTERM sent by another process + - take out calls to RESET_SIGTERM, no longer needed + +execute_cmd.c + - execute_in_subshell,execute_simple_command,execute_disk_command: + remove calls to CHECK_SIGTERM, since we don't install a handler + any more + +lib/readline/readline.c + - _rl_enable_bracketed_paste: enabled by default for the time being + + 4/9 + --- +jobs.h + - JWAIT_WAITING: new flag for wait functions; means only wait for jobs + with the J_WAITING flag set + - J_WAITING: new job flag, part of arg list to `wait -n' + - IS_WAITING(i): job i has the J_WAITING flag set + +jobs.c + - wait_for_any_job: if the flags includes JWAIT_WAITING, we only return + jobs with the J_WAITING flag already set; otherwise we skip them. + For `wait -n args' support + +builtins/wait.def + - set_waitlist: take a list of jobspecs and set the J_WAITING flag in + each valid job from the list + - unset_waitlist: turn off the J_WAITING flag for all jobs where it's + set + - wait_builtin: if -n is supplied with a list of arguments, set the + J_WAITING flag in each job in the list, call wait_for_any_job with + the JWAIT_WAITING flag, and clean up by calling unset_waitlist(). + From a suggestion from Robert Elz back in 3/2019 + (originally in 10/2017) + + 4/11 + ---- +lib/readline/display.c + - update_line: in step 5b of the line wrapping prompt code, make sure + OFDF and NFDF are set before performing a dumb update + + 4/12 + ---- +sig.c + - termsig_handler: make sure to restore TOP_LEVEL_SIGMASK before + resending a terminating signal to ourselves, in the event that this + is called in a signal handler context with the terminating signal + blocked. Inspired by a report from + + 4/13 + ---- + +lib/readline/text.c + - rl_newline: if the region is active, call rl_redisplay to clear + standout mode before returning + +lib/readline/display.c + - norm_face: new function to mark a portion of the invisible face + buffer as normal text (no standout) + - rl_redisplay: if the line consumes more than a screen's worth of + lines, mark the lines that are off the top of the display as having + a `normal' face + + 4/14 + ---- +variables.c + - LINENO: no longer has the integer attribute, since it does not take + arithmetic expressions on assignment (use $((expr)) instead) + +lib/readline/mbutil.c + - _rl_find_prev_utf8char: new function, uses the structure of UTF-8 + characters to find the start of the previous one no matter where we + start: at the beginning of the next character, at the end of a + multibyte character, or in the middle of a multibyte character. + EXPERIMENTAL + - _rl_find_prev_mbchar_internal: for now, call _rl_find_prev_utf8char + if we are in a UTF-8 locale. EXPERIMENTAL + + 4/15 + ---- +lib/readline/mbutil.c + - _rl_utf8_mblen: changes to handle invalid multibyte sequences better, + even when N means that the sequence would be too short anyway + +examples/loadables/csv.c + - csv: new loadable builtin to parse a line of csv data and store it + into an array supplied as an argument + + 4/16 + ---- +examples/loadables/cut.c + - cut: new loadable builtin + - lcut: new builtin that does what cut does but on a string supplied + as an argument (only one string for now) + + 4/17 + ---- +jobs.h + - FORK_SYNC,FORK_ASYNC,FORK_NOJOB: new flag values for the second + argument to make_child + +jobs.c + - make_child: now takes a set of flags as the second argument + +execute_cmd.c + - make_child: change callers to pass FORK_ASYNC instead of a non-zero + value as the second argument + +subst.c + - make_child: change callers to pass FORK_ASYNC instead of a non-zero + value as the second argument + +doc/{bash.1,bashref.texi} + - document that the words in a compound array assignment undergo all + the shell word expansions, including filename generation and word + splitting. From a report from E. Choroba + + 4/18 + ---- +subst.c + - command_substitute: use JOB_CONTROL instead of INTERACTIVE in the + test to determine whether or not to give the terminal back to + pipeline_pgrp + +jobs.c + - make_child: if FORK_NOTERM is set in the flags argument, don't call + give_terminal_to + +{jobs,nojobs}.c,jobs.h + - wait_for: now takes a second argument, a flags word + +{execute_cmd,subst}.c + - wait_for: change all callers to add second argument to wait_for + +jobs.c + - wait_for: if JWAIT_NOTERM is set in the flags argument, don't call + give_terminal_to + + 4/19 + ---- +subst.c + - command_substitute: block SIGINT around call to read_comsub, so we + let any interrupts affect the command substitution. Fixes issue + reported by DALECKI Léo + +hashcmd.h + - FILENAME_HASH_BUCKETS: increase to 256 + +assoc.h + - ASSOC_HASH_BUCKETS: new define, set to 1024 + +variables.c + - make_new_assoc_variable,make_local_assoc_variable: call assoc_create + with ASSOC_HASH_BUCKETS as argument. This changes the hash function + and how the array keys are ordered (which is not guaranteed) + +builtins/read.def + - read_builtin: in posix mode, or if the read call returns -1/EINTR, + don't call run_pending_traps until the read command returns. This + allows a trap action to see the same exit status that the read + builtin would return when it exits on a signal (e.g., SIGINT == 130). + From a suggestion by + + 4/20 + ---- +hashlib.c + - hash_rehash: function to rehash a table, after increasing or decreasing + the number of buckets. From patches from Thomas Kremer + (https://savannah.gnu.org/patch/?9850) and Koichi Murase + + - hash_grow,hash_shrink: grow or shrink a hash table by a factor of + HASH_REHASH_MULTIPLIER (4) + - hash_insert,hash_search: call hash_grow if necessary + +arrayfunc.c + - convert_var_to_{array,assoc}: if the original variable had no value + (it was unset), the array variable should be unset as well. Reported + by andrej@podzimek.org + + 4/21 + ---- +bashline.c + - set_saved_history: change logic used to decide where in the history + operate_and_get_next should start by using a logical offset into the + history list that is an offset from history_base. This avoids having + to take whether or not the history is stifled and full into account. + Report and fix from Greg Price + - operate_and_get_next: just calculate the logical offset of where we + should be in the history instead of an absolute offset + +lib/readline/input.c + - _rl_nchars_available: new function, returns the number of characters + available to be read if FIONREAD is available + + 4/22 + ---- +lib/readline/{readline.c,rlprivate.h} + - _rl_pending_command: new struct to hold information about a pending + command for readline to execute when the current command completes. + A command can set this up so that it gets executed like a + continuation before redisplay + +lib/readline/readline.c + - readline_internal_charloop: after _rl_dispatch returns, check + _rl_command_to_execute, and, if it's non-zero, redisplay and then + execute it as a command + - added a small set of library-private functions for managing the + executing key sequence (not used yet) + +lib/readline/isearch.c + - _rl_isearch_dispatch: if we have found an opcode or have added a + character to the search string and searched for it, reset the keymap + and okeymap members of the search context in preparation for reading + another key sequence/opcode + - _rl_isearch_dispatch: if we read a key sequence bound to an editing + command that is not an `opcode', set up _rl_command_to_execute to + execute it after the searching returns and arrange to break out of + the search + - _rl_isearch_dispatch: if we paste in text from bracketed paste, set + the mark as active so we can highlight it when we display the search + string + - _rl_isearch_dispatch: if we've found the search string, activate the + mark and set rl_point and rl_mark so the search string is highlighted + when we display the search results + - _rl_isearch_dispatch: do translation for keys that map to + rl_do_lowercase_version like we do when dispatching while reading a + key sequence + + 4/23 + ---- +lib/readline/isearch.c + - _rl_isearch_dispatch: if bracketed paste mode is enabled and there are + enough characters waiting in the terminal's input queue, try to read + the bracketed paste prefix and jump straight to the opcode execution + if we read it. Otherwise, just go on with the ESC. Inspired by report + from + +parse.y + - parse_comsub: posix-mode shells don't allow a closing right paren to + delimit a pending here-document -- it requires the newline + +doc/bashref.texi + - POSIX mode: updated posix mode description with the new here-document + delimiter requirement + +lib/readline/search.c + - _rl_nsearch_dispatch: if bracketed paste mode is enabled, and we read + an ESC, try to see if we have a bracketed paste op and insert the + pasted next. If we don't, go on with the ESC + - _rl_nsearch_dosearch: experimental code to highlight the search string + when displaying the line found in the history. Only done when we are + not searching for a pattern, since we don't have information on the + end of the matching portion of the line. Experimental because it + changes where we put point and mark if searching is successful + +expr.c + - expr_streval: if find_variable for the case where the string is not + an array reference doesn't find anything, see if we can find + something by using find_variable_last_nameref and use the value + from there in the call to expr_streval, kind of using the expression + recursion to complement the nameref recursion. Report from + Daniel Molina + + 4/24 + ---- +jobs.c + - {start,stop}_pipeline: don't reset pipeline_pgrp to 0 if it's already + the same as shell_pgrp, since we don't want to reset it in the middle + of a shell started to run a command or process substitution (after + forking a child to run one command, but before forking another, for + instance). Reported by Rob Landley + + 4/27 + ---- +parse.y + - function_def: break the productions starting with `function' without + `()' into two productions to avoid a shift-reduce conflict. Report + and patch from Dale R. Worley + +variables.h + - localvar_inherit: add extern declaration here + +subst.c + - shell_expand_word_list: take out change from 3/17 to pass -I to + make_internal_declare; it generates errors the user will find + confusing if there is a variable with the same name but a different + type at a previous scope + - shell_expand_word_list: check for and note whether or not -I is + supplied to the declaration command, since it changes the default + behavior of a compound assignment without -a or -A + - shell_expand_word_list: if we have a compound assignment that is an + argument to a declaration command, but there are no options supplied + to the command that determine the type of the array, make sure we + call make_internal_declare with either -a (no localvar_inherit or -I) + or at least -- (if we are inheriting), because we don't want the + declare to get skipped before we perform the word assignment. Fixes + bug reported by Ross Goldberg + + 4/28 + ---- +subst.c + - expand_declaration_argument: new function, broke code that handles + compound assignments that are arguments to declaration commands out + of shell_expand_word_list into this function. No functional change + yet + + 4/29 + ---- +subst.c + - expand_compound_assignment_word: helper function for + expand_declaration_argument: takes NAME[+]=( VALUE ), converts VALUE + to a list of words, then single-quotes each word and reconstructs + the original word. This assumes the result will go to + do_word_assignment, which will remove the single quotes + - expand_oneword: helper function for expand_compound_assignment_word, + takes VALUE and performs the splitting into words, and then the + expansion and single-quoting of each individual word. Indexed and + associative arrays take different code paths, because they undergo + different expansions and associative arrays need special handling to + avoid having to scan for the end of the subscript multiple times + - expand_declaration_argument: call expand_compound_assignment_word to + get the expansion-before-calling-builtins word expansion sequence + correct. Better fix for for bug report from Kevin Locke + , + https://savannah.gnu.org/support/index.php?109669 + +arrayfunc.c + - quote_array_compound_word: take [IND]=VALUE and convert it to + ['IND']='VALUE'. Called by quote_compound_array_list for each word + in the list + - expand_and_quote_assoc_qword: take [KEY]=VALUE and convert it to + ['expanded-key']='expanded-value' (or VALUE to 'expanded-value'). + Called by subst.c:expand_oneword() for each word in the list + - quote_compound_array_list: take a list of words and convert each + [IND]=VALUE to ['IND']='VALUE' (or just 'VALUE' if there is no + [IND]=). Used for indexed arrays + +arrayfunc.h + - expand_and_quote_assoc_word,quote_compound_array_list: new extern + declarations + + 4/30 + ---- +doc/{bashref.texi,bash.1} + - rework description of reserved words a little; add a reserved words + node to bashref.texi. Based on a report from Dale R. Worley + + +builtins/history.def + - history_builtin: if the shell is restricted, don't allow pathnames + with slashes to be read or written. From a report from + Diffie + +shell.c + - maybe_make_restricted: add HISTFILE to the list of readonly variables + +doc/{bashref.texi,bash.1} + - document new restricted shell restrictions + + 5/1 + --- +jobs.c + - wait_for: don't try to give the terminal to shell_pgrp if JWAIT_NOTERM + is set in the flags argument + +subst.c + - command_substitute: call make_child with FORK_NOTERM flag so it + doesn't try to set the terminal's process group + - command_substitute: call wait_for with JWAIT_NOTERM so it doesn't + try to set the terminal's process group + - command_substitute: now that wait_for doesn't try to reset the + terminal's process group, remove the code that tries to clean up + after that + + 5/4 + --- +doc/bash.1 + - make sure to mention /etc/inputrc as the ultimate default readline + init file, like other documentation does. Update from + Greg Price + +lib/readline/readline.c + - if the private startup hook function variable _rl_internal_startup_hook + is set, execute that after any user-specified startup hook + +lib/readline/rlprivate.h + - _rl_internal_startup_hook: new extern declaration + +bashline.c,lib/readline/{misc.c,readline.h} + - operate_and_get_next: moved to rl_operate_and_get_next so it's + available to all readline programs, uses _rl_internal_startup_hook. + Based on patch from Greg Price + +lib/readline/funmap.c + - "operate-and-get-next": now a bindable readline command + +lib/readline/emacs_keymap.c + - rl_operate_and_get_next: bound to ^O in emacs mode by default + +doc/bash.1,lib/readline/{readline.3,rluser.texi} + - operate-and-get-next: move to readline section of the manuals, out of + bash-specific functions section + + 5/5 + --- +hashlib.c + - hash_string: use a series of shifts and adds to avoid a multiply by + FNV_PRIME. From Landon Curt Noll's FNV web page + +builtins/fc.def + - fc_gethist,fc_gethnum: now take an additional argument indicating the + operating mode: if the arg is 1, fc is listing commands; if it is 0, + fc is executing commands. Affects how -0 is handled (fc_gethnum + returns -1). Changed callers to handle the return value appropriately. + Report from Jason Franklin about + seg fault and core dump + - fc_builtin: if fc_gethnum returns < 0 when setting histbeg or histend, + report a range error + +doc/bash.1,lib/readline/doc/hsuser.texi + - fc: document how 0 and -0 are treated for listing and executing + +shell.c + - run_one_command: call parse_and_execute with SEVAL_RESETLINE so the + line number gets set to 1. Reported by Rob Landley + + 5/8 + --- +support/config.{guess,sub} + - update to latest versions + +configure.ac + - add support for `genode' from Emery Hemingway + + 5/14 + ---- +test.c + - term: fix case where an argument that looks like a unary operator, + but doesn't have enough tokens left to have an argument to that + operator, was not being treated as a one-argument test. Affects + only uses of test with four and greater arguments, which posix says + are unspecified. This is a bug, or at least an incompatibility, at + least 30 years old. + - test_command: if there are unconsumed arguments, call test_syntax_error + with a `syntax error' argument if the first remaining argument starts + with a `-'. Better than a generic `too many arguments' error + + 5/19 + ---- +configure.ac,config.h.in + - getrandom: add test, define HAVE_GETRANDOM + - getentropy: add test, define HAVE_GETENTROPY + +variables.c + - get_urand32: use getrandom; provide imperfect emulation that uses + getentropy if available, and falls back to reading /dev/urandom if + that's not available. The idea is to use /dev/urandom as little as + possible + + 5/20 + ---- +configure.ac + - updated version to 5.1-alpha + +lib/readline/readline.h + - updated defines to readline version 8.1 + +variables.c + - brand: if shell_compatibility_level is 50 or below, don't xor the + top and bottom halves of the 32-bit random number together, since + previous versions did not + + 5/21 + ---- +COMPAT + - overhauled and updated the descriptions of the various shopt compatNN + options + +doc/bashref.texi + - Shell Compatibility Mode: new section, describes compatibility levels, + BASH_COMPAT, and the various compatNN shopt options + + 5/23 + ---- +doc/bash.1 + - added Shell Compatibility mode section + +doc/{bash.1,bashref.texi} + - changed shopt section to list the compatibility options and refer + to Shell Compatibility Mode section + - BASH_COMPAT: overhauled the text, refers to Shell Compatibility Mode + section + + 5/27 + ---- +variables.c,/lib/sh/random.c + - moved functions that manage 16-bit and 32-bit random values to + lib/sh/random.c + +alias.c + - add_alias: don't bother checking null alias values for ending in + space or tab + +braces.c,include/typemax.h + - move sh_imaxabs and overflow and underflow detection to typemax.h + so the expression evaluation code can use it in the future + + 5/28 + ---- +lib/readline/kill.c + - _rl_bracketed_read_mbstring: make sure to fill in mb[0] even if + the locale says MB_CUR_MAX == 1 in case a caller uses it. Partial + fix for bug reported by Phi Debian + +lib/readline/vi_mode.c + - rl_vi_change_char: make sure _rl_vi_last_replacement gets filled in + in the case where MB_CUR_MAX == 1. Rest of fix for bug reported by + Phi Debian + - _rl_vi_callback_change_char: same fix for _rl_vi_last_replacement + + 5/29 + ---- +lib/malloc/malloc.c + - __P -> PARAMS + - union mhead: now 16 bytes to force 16-byte alignment; extra 8 bytes + at the end of struct minfo to use for guard bytes. Enabled if + pointers are 64 bits (SIZEOF_CHAR_P == 8) + - if we have 64-bit pointers, prepopulate the 64-byte bin first instead + of the 32-byte bin (pointers and WORD_DESCs still fit into 32 bytes, + but WORD_LISTs are now 36 bytes with malloc overhead). We can still + split 64-byte blocks to satisfy 32-byte requests + - internal_malloc: fill in the new 8 mh_magic8 bytes with MAGIC1 guard + bytes + - internal_malloc: print a warning message if the returned pointer is + not aligned according to MALIGN_MASK + - internal_free: detect underflow by checking that mh_magic8 is full + of MAGIC1 bytes + - internal_realloc: detect underflow by checking that mh_magic8 is full + of MAGIC1 bytes + +lib/malloc/stats.c + - _print_malloc_stats: slight adjustment for better column alignment + + 6/1 + --- +execute_cmd.c + - execute_command_internal: treat a redirection failure with errexit + set as a command failure that exits the shell. Bug report from + Hyunho Cho + + 6/3 + --- +redir.c + - redirection_error: takes a new argument, FN, which if non-NULL is + the filename to be used in the error message. + +redir.[ch],builtins/evalstring.c + - redirection_error: changed extern declaration and callers + +redir.c + - do_redirection_internal: takes a new third parameter, FNP, a char ** + to use (*FNP, if non-NULL) to store and return the expanded filename + for those redirections that take one + - do_redirections: pass a char ** (&fn) to do_redirection_internal to + get a pointer to the expanded filename; pass it to redirection_error + if appropriate. Free FN in any case, since do_redirection_internal + won't. Fix for double expansion of filename in certain redirections + reported by Ouz + + 6/4 + --- +parse.y + - parse_comsub: while we're reading a here-document, don't perform any + history expansion (set history_expansion_inhibited). Fixes issue + reported by "ladyrick" + +general.h,parse.y + - __P -> PARAMS + +shell.c + - shellstart: struct timeval used to initialize shell starting time; + shell_start_time now initialized from shellstart.tv_sec + +variables.c + - assign_seconds: reset shellstart to set shell starting time + +pcomplete.c + - include posixtime.h instead of + +lib/sh/{ufuncs,uconvert}.c + - include posixtime.h instead of the inline conditional includes + +aclocal.m4 + - BASH_STRUCT_TIMEVAL: convert to use AC_COMPILE_IFELSE instead of the + deprecated AC_HEADER_EGREP + +posixtime.h + - struct timeval: if HAVE_TIMEVAL is not defined, provide a replacement + definition + +lib/sh/gettimeofday.c + - gettimeofday: replacement function, so we don't have to use + HAVE_GETTIMEOFDAY in the rest of the code + + 6/5 + --- +{lots of files}.[ch] +builtins/{lots of files}.{c,h,def} +lib/glob/{lots of files}.[ch] +lib/malloc/{lots of files}.[ch] +lib/sh/{lots of files}.c +include/{lots of files}.h +examples/loadables/{lots of files}.c + - __P -> PARAMS + +doc/{bash.1,bashref.texi} + - SECONDS: clarify that the number of seconds is always determined by + querying the system clock + + 6/8 + --- +configure.ac + - if CFLAGS is not supplied in the environment or on the command line, + add the gcc options that suppress warnings about parens and print + formats in a slightly different way that will avoid some collisions + +lib/readline/readline.c + - _rl_dispatch_subseq: don't set rl_last_func to rl_vi_arg_digit, just + the same as if it were rl_digit_argument. This allows functions like + rl_yank_last_arg, which behave differently when called multiple times + in a row, to work closer to what is expected. This allows what + Leo Alekseyev reported to work, with caveats + +lib/readline/vi_mode.c + - rl_vi_yank_arg: make sure to pass `key' to rl_yank_nth_arg, in case + it needs to use it later + - rl_vi_redo: suppress attempts to redo `.' when the current keymap is + vi_movement_keymap, since that will recursively call vi_redo + + 6/11 + ---- +redir.c + - limit HEREDOC_PIPESIZE to 4096 on FreeBSD; that is where it can + handle atomic writes without hanging. Tested on FreeBSD 13 + +[bash-5.1-alpha frozen] + + 6/15 + ---- +subst.c + - do_assignment_internal: call stupidly_hack_special_variables on the + name returned from the variable assignment, in case there was a + nameref expansion, and on the original name only if the assignment + returned NULL. Fixes bug reported by James D. Lin + + 6/16 + ---- +builtins/hash.def + - hash_builtin: don't print anything if the hash table is empty when + listing portably (-l) unless the shell compatibility level is <= 50 + Issue originally raised by + + 6/17 + ---- +pathexp.c + - glob_name_is_acceptable: extend GLOBIGNORE to ignore `.' and `..' + as a terminal pathname component instead of just ignoring filenames + that are `.' or `..'. From a suggestion by Ilkka Virta + + + 6/18 + ---- +po/Makefile.in.in + - MKINSTALLDIRS: deprecated, no longer in AM_INTL_SUBDIR, so we have + to create the variable manually + +lib/readline/doc/rltech.texi + - add descriptions of the active mark functions that are available to + applications. I guess they will remain public + +subst.c + - valid_parameter_transform: new function, reject transformations + longer than a single character or invalid transformation operators + - parameter_brace_transform: call valid_parameter_transform + + 6/22 + ---- +lib/sh/zread.c + - lbuf: bump size up to ZBUFSIZ (default 4096). From a report by + Jason A. Donenfeld + +lib/sh/zcatfd.c + - zcatfd: lbuf: bump size up to ZBUFSIZ (default 4096) + +lib/sh/zmapfd.c + - zmapfd: lbuf: bump size up to ZBUFSIZ (default 4096) + + 6/29 + ---- +aclocal.m4 + - BASH_FUNC_SBRK: changes for cross-compiling on FreeBSD variants, + from Jessica Clarke + +xmalloc.c + - HAVE_SBRK: use #if instead of #ifdef so we only use it if we think + it works + +examples/loadables/finfo.c + - st_dev,st_nlink: cast to unsigned long, report from Jessica Clarke + + +unwind_prot.c + - unwind_protect_mem_internal: make sure we allocate at least as many + bytes for an entire UNWIND_ELT. Fix from Jessica Clarke + + + 7/1 + --- +eval.c + - alrm_catcher: use write(2) instead of fprintf to print the + auto-logout message to the terminal + +jobs.c + - UNQUEUE_SIGCHLD: set queue_sigchld to 1 around call to waitchld(), + since it is not being called from a signal handler and so SIGCHLD is + not blocked. Fixes report by Godmar Back + + 7/2 + --- +doc/{bash.1,bashref.texi} + - read: clarify that without any name arguments, the line assigned to + REPLY is not modified. From a question by M. Nejat AYDIN + with input from Eli Schwartz + + + 7/5 + --- +lib/readline/vi_mode.c + - _rl_vi_done_inserting: make sure to close out all undo groups when + leaving insert mode, so we don't have anything dangling. + Report and fix from David Fries + + 7/6 + --- +lib/readline/vi_mode.c + - _rl_vi_domove_motion_cleanup: the `c' and `C' commands should enter + insert mode even if the motion command doesn't delete any text. + From a report by David Fries + - _rl_vi_done_inserting: add a missing rl_end_undo_group when + _rl_vi_doing_insert is set: there should be one begun by + rl_vi_start_inserting and one begun by the command (change or replace). + From a report by David Fries + - rl_vi_replace: set _rl_vi_last_key_before_insert to 'R' explicitly, + since other code checks that and we want to allow users to rebind + this function + + 7/7 + --- +lib/readline/vi_mode.c + - rl_vi_{delete,change,yank}_to: if we have a non-null _rl_vimvcxt, + just reinitialize it so we don't have to allocate a new one. This is + a change primarily for callback mode, and fixes a memory leak + +builtins/evalstring.c + - optimize_shell_function: try to optimize away the fork in the last + command in a shell function body, under certain conditions + +execute_cmd.c + - execute_function: attempt to optimize away forks in a shell function + that is already marked NO_FORK and being executed in a command + substitution + + 7/8 + --- +{jobs,nojobs,trap,unwind_prot}.c,lib/malloc/{malloc,table}.c + - interrupt_immediately: remove, no longer used + +jobs.c + - waitchld: don't perform asynchronous notification if we are currently + executing a builtin (executing_builtin != 0). Inspired by a report + from Godmar Back + + 7/9 + --- +lib/readline/signals.c + - _rl_handle_signal: block SIGTTOU while handling a SIGTTOU, since we + no longer run this in a signal handling context where SIGTTOIU would + be blocked + + 7/14 + ---- +execute_cmd.c + - execute_simple_command: use new variable `cmdflags' instead of using + simple_command->flags directly; initialize from simple_command->flags + - check_command_builtin: take a simple command list of words starting + with `command' and including a command_word argument, and peel off + the `command' and any instances of `-p' and `--' and return the + updated list + - execute_simple_command: if the first word of the simple command is + `command', call check_command_builtin to peel off any `command' and + `-p' and `--' and go on to execute the rest of the words as a simple + command. If we're in posix mode, we've got the special builtins + handled before this runs. Fixes complaint about `command' in the + background running an extra bash process from Dmitry Alexandrov + + + 7/17 + ---- +doc/bash.1 +lib/readline/doc/{rltech,hstech,rluser}.texi +lib/readline/doc/{readline,history}.3 + - a few small tweaks to make the language gender-neutral + + 7/18 + ---- +subst.c + - expand_word_internal: case `:' make sure the shell is either not in + posix mode or W_TILDEEXP is set before turning on W_ITILDE. The old + code would turn it on unconditionally if the W_ASSIGNMENT flag was + set. Fixes bug reported by Ouz + + 7/20 + ---- +builtins/complete.def + - replace macros used to print compspec actions, options, and other + info with a small set of functions that traverse the structs used + to hold that information and print everything instead of eumerating + each option and action separately. From a patch submitted by + Martin Kealey + + 7/27 + ---- +variables.c + - push_posix_tempvar_internal: restore $SHELLOPTS after restoring the + values of shell options saved by `local -' by calling set_shellopts(). + Report from Grisha Levit + +flags.c + - reset_shell_flags: set histexp_flag to 0 and let bash_history_reinit + take care of setting history_expansion appropriately. Report and fix + from Grisha Levit + + 7/28 + ---- +general.c + - assignment: if (FLAGS & 1), we are parsing the contents of a compound + assignment, and a word must begin with a `[' and have a valid + subscript terminated by `]' before the `=' to be considered an + assignment statemen and subsequently expanded like one. Report from + Alexey Izbyshev + + 7/30 + ---- +lib/glob/sm_loop.c + - BRACKMATCH: if the bracket expression is matching simple characters + and not a range, compare the character from the string and the + pattern directly, as required by Posix interp 948 + +lib/glob/smatch.c + - charcmp_wc: split off code that calls wcscoll from rangecmp_wc, + just return the results of wcscoll + - rangecmp_wc: call charcmp_wc and impose a total ordering + by performing a byte comparison (or wint_t comparison) of C1 and C2 + as required by Posix interp 948 (charcmp_wc takes care of the + behavior of FORCECOLL) + - collequiv_wc: call charcmp_wc instead of rangecmp_wc + - charcmp: character comparison code from rangecmp + - rangecmp: call charcmp and impose total ordering as required by + Posix interp 948 + - collequiv: call charcmp instead of rangecmp + - _fnmatch_fallback: ASCII version of fallback for equivalence classes + when there are no multibyte characters in the pattern; just calls + fnmatch with a reconstructed equivalence class pattern + - collequiv: call _fnmatch_fallback if charcmp returns non-zero and + the configure check indicates fnmatch has character class support. + Fixes issue reported by Harald van Dijk + + 8/2 + --- +lib/readline/signals.c + - _rl_handle_signal: since we're not called in a signal handler context + any more, we don't need to explicitly unblock the signal we received + so the application's signal handler will get it when we resend the + signal to ourselves. It doesn't hurt anything to do it, but we don't + have to + - _rl_handle_signal: Set up a framework for any signals that need to + be blocked during cleanup: add the signal to SET (initialized to the + existing set of blocked signals) and set BLOCK_SIG to 1. We block + that set around the call to rl_cleanup_after_signal(). + - _rl_handle_signal: on AIX, if the signal is SIGHUP, make sure we + block SIGHUP while running rl_cleanup_after_signal() + + 8/3 + --- +jobs.c + - start_job: don't allow `fg' or `bg' in a command substitution to + attempt to start a parent's jobs. Suggested by Ouz + + +builtins/set.def + - set_current_options: only call change_flag or SET_BINARY_O_OPTION_VALUE + if the value has changed from what is stored in the bitmap, to avoid + any side effects from setting the options and save time on any + unnecessary function calls. Inspired by report from Grisha Levit + + +parse.y + - xparse_dolparen: before we jump to top level, check whether we are + still reading from the string (we might have run all the unwind- + protects) and turn off PST_CMDSUBST if we are not. Fixes fuzzing + bug reported by Jakub Wilk + + 8/4 + --- +subst.c + - process_substitute: set subshell_environment to include SUBSHELL_ASYNC + in the child process, since we passed FORK_ASYNC to make_child. Fixes + DEBUG trap problem reported by Jonathan Rascher + +subst.c + - unlink_all_fifos: new function, just unconditionally closes and + unlinks (if using FIFOs) each pipe used for process substitution. + There is an open to unblock any child processes sleeping on the + FIFO first. Inspired by a suggestion from "CHIGOT, CLEMENT" + + +shell.c + - exit_shell: call unlink_all_fifos() instead of unlink_fifo_list() + +sig.c + - termsig_handler: call unlink_all_fifos() instead of + unlink_fifo_list() + + 8/5 + --- +arrayfunc.c + - quote_compound_array_list: turn empty strings into '' instead of + leaving them unmodified. Fixes bug in changes from 4/29 reported + by andy_bash + + 8/10 + ---- +bashline.c + - edit_and_execute_command,bash_execute_unix_command: restore the bash + signal handlers before running parse_and_execute() so bash will catch + and handle signals, instead of letting readline catch them without + any opportunity to run _rl_handle_signal(). Fixes bug reported by + Stan Marsh + + 8/11 + ---- +builtins/fc.def + - fc_gethnum: return HIST_INVALID for -0 if not in listing mode + - fc_builtin: throw an out-of-range error if histbeg or histend gets + set to HIST_INVALID + - fc_builtin: don't throw errors for other out-of-range history + specifications, clamp them at the beginning or end of the history + list, as appropriate, per POSIX. Report and fix from Martijn Dekker + + + 8/12 + ---- +builtins/fc.def + - fc_gethnum: return HIST_NOTFOUND (new error) if the string is not a + number and doesn't correspond to any command in the history list + - fc_builtin: print a "no command found" error message if fc_gethnum + returns HIST_NOTFOUND + + 8/14 + ---- +flags.c + - no_invisible_vars: removed undocumented `-I' flag + +{flags,variables}.c,flags.h,builtins/{declare,setattr.def} + - no_invisible_vars: remove all references + +command.h + - PF_ALLINDS: new flag, means to expand an array variable name without + a subscript as if it were subscripted by `@' instead of `0' + +subst.c + - parameter_brace_expand_word: if PFLAGS contains PF_ALLINDS, expand + an array variable name as if it were subscripted by "@" instead of + 0/"0": a string with the element values separated by " ". Little + nuance; we're just interested in whether or not there are any + values at all + - parameter_brace_expand: if we are expanding something like ${foo@a}, + pass PF_ALLINDS to parameter_brace_expand_word and + parameter_brace_expand_indir so we don't get tripped up on `nounset' + if foo has an assigned subscript other than 0/"0". Inspired by a + report from Andrew Neff + + 8/17 + ---- +bashhist.c + - bash_add_history,maybe_add_history: don't need to call shell_comment + if we are in the middle of adding a here-document, since it may + call the parser recursively on data that is not guaranteed to be + valid input. From a report by Hyunho Cho + + 8/24 + ---- +lib/readline/complete.c + - compare_match: compare TEXT from the line buffer and MATCH, a + possible completion for TEXT, after dequoting TEXT if necessary + - rl_complete_internal,rl_menu_complete : if show-all-if-unmodified is + set, use compare_match instead of a straight strcmp to determine if + the match has changed the text to complete, so we can use it for + filenames that require quoting. Report and pointer to fix from + Abon B + + 8/25 + ---- +eval.c + - execute_prompt_command: PROMPT_COMMAND can now be an array, subsuming + PROMPT_COMMANDS, which bash no longer looks for. Prompted by a + suggestion from Martijn Dekker + + 8/26 + ---- +builtins/fc.def + - fc_gethnum: now takes a flags word as the third argument, with two + current flag values: HN_LISTING, which means we are listing history + entries, and HN_FIRST, which means we are parsing the first in a + first,last range of history entries + - fc_gethnum: if we have a number >= 0, and it's out of range, return + different values (0 or last history) depending on whether we are + parsing the first or last in a range argument. Based on a report from + Martijn Dekker + + 8/31 + ---- +parse.y + - grammar: call handle_eof_input_unit from the eof-after-error + production only from interactive top-level shells, so a syntax error + in `eval' doesn't exit an interactive shell. Report and fix from + Koichi Murase + +bashline.c + - bash_execute_unix_command: if we call parse_and_execute with allocated + memory, make sure not to include SEVAL_NOFREE in the flags so it will + free that command string before returning. Report and fix from + Koichi Murase + +array.[ch] + - array_to_argv: now takes a second argument: COUNTP; returns the number + of elements stored in the strvec + - array_to_argv: don't store array elements with null values; it makes + it hard for callers to walk the whole array reliably + +pcomplete.c + - gen_shell_function_matches: change call to array_to_argv + +array.h + - execute_array_command: now takes the entire ARRAY * as the first + parameter + +eval.c + - execute_array_command: now takes the entire array, puts the elements + into a strvec, and executes each element of the strvevc as a command. + This protects against a command from PROMPT_COMMAND[n] unsetting the + corresponding element of PROMPT_COMMAND. + From a report from Koichi Murase + + 9/7 + --- +[bash-5.1-beta frozen] + + 9/8 + --- +lib/readline/display.c + - _rl_update_final: don't bother doing anything if the line structures + have not been initialized. Report and fix from gary@catalyst.net.nz + +variables.c + - get_histcmd: perform the same adjustment as in prompt_history_number; + make sure to subtract one if we're doing this while executing a + command that has already been saved to the history list. Inspired + by a report from L A Walsh + + 9/14 + ---- +aclocal.m4 + - BASH_STRUCT_WEXITSTATUS_OFFSET: fix typo in loop condition reported + by Andreas K. Hüttel + +syntax.h + - slashify_in_here_document: restore previous value that doesn't + include double quote, since it's only special in certain cases + +subst.c + - expand_word_internal: when processing backslash-double quote inside + a ${...} construct inside a here documemt, treat it the same as if + it were double-quoted, as posix says. Fixes report from + Andreas Schwab + + 9/15 + ---- +support/signames.c + - added a number of more esoteric signal names from AIX and Solaris + +parse.y + - report_syntax_error: make sure that the exit status is only set to + one of the special builtin exit statuses if we are really executing + a builtin here, not just if parse_and_execute_level > 0. Reported by + Rob Landley + +execute_cmd.c + - EX_BADSYNTAX: make sure that gets translated into EX_BADUSAGE (2) + - execute_simple_command: if a function returns a value greater than + EX_SHERRBASE, use builtin_status to translate it, as if a builtin + were being executed + - builtin_status: make sure a status > EX_SHERRBASE gets translated to + EXECUTION_FAILURE + + 9/21 + ---- +subst.c + - process_substitute: set up input from /dev/null (standard for an + asynchronous process) only if the shell is interactive and reading + input from the terminal. This allows scripts to use process + substitution to filter stdin. From a report from + Andreas Schwab + + 9/23 + ---- +doc/{bash.1,bashref.texi} + - ENV: a couple of changes clarifying that it's only used when an + interactive shell is started in posix mode. Report from + Reuben Thomas + +examples/loadables/asort.c + - asort: loadable builtin to sort an array. Contributed by + Geir Hauge + + 10/1 + ---- + +[bash-5.1-rc1 frozen] + + 10/7 + ---- +subst.c + - process_substitute: try it without setting the stdin for a process + substitution started from an interactive shell to /dev/null. We will + have to see if this causes problems like those reported back in + 9/2019 by Grisha Levit. From a report by Hyunho Cho + +lib/readline/terminal.c + - _rl_init_terminal_io: if the terminal is unknown, disable bracketed + paste on the assumption it can't handle the enable/disable escape + sequences + + 10/8 + ---- +lib/readline/terminal.c + - _rl_init_terminal_io: if the terminal name is "dumb", disable + bracketed paste mode. Suggested by + Andreas Schwab + + 10/13 + ----- +trap.[ch] + - set_trap_state: new function to allow other signal handlers to set + the internal state that trap_handler would set to note that the + shell received a trapped signal. Used by sigint_sighandler(). + +sig.c + - sigint_sighandler: call set_trap_state to set the pending trap state + for SIGINT if trap_handler is not called. Needed because + throw_to_top_level now checks whether a signal is pending before + running the trap (change from 4/2020) + +builtins/trap.def + - trap_builtin: if the shell is interactive (interactive_shell != 0) + but running something like PROMPT_COMMAND that sets + parse_and_execute_level > 0 but interactive == 0, make sure to set + the signal handler to the default interactive shell SIGINT handler + (sigint_sighandler) instead of the default non-interactive one. + Fixes bug reported by Daniel Farina with a hint + from felix + + 10/26 + ----- + +lib/readline/{readline.c,rlprivate.h} + - _rl_enable_active_region: new variable, mirrors value of + _rl_enable_bracketed_paste + - BRACKETED_PASTE_DEFAULT: new define, default initial value of + _rl_enable_bracketed_paste and _rl_enable_active_region + +lib/readline/bind.c + - hack_special_boolean_var: make sure that _rl_enable_active_region + is set appropriately when "enable-bracketed-paste" is modified + +lib/readline/isearch.c + - _rl_isearch_dispatch: make sure that we activate the mark on finding + the search string only if _rl_enable_active_region is non-zero, even + if bracketed paste is enabled + +lib/readline/search.c + - noninc_dosearch: make sure that we activate the mark on finding + the search string only if _rl_enable_active_region is non-zero, even + if bracketed paste is enabled + +lib/readline/kill.c + - rl_bracketed_paste_begin: make sure we activate the mark only if + _rl_enable_active_region is enabled + +lib/readline/isearch.c + - _rl_isearch_dispatch: the requirement for number of available unread + characters (bytes) to trigger the bracketed paste test is now + BRACK_PASTE_SLEN-1, like for non-incremental searches + + 10/29 + ----- + +doc/bash.1,lib/readline/rluser.texi + - enable-bracketed-paste: change to note the the current default is `On' + + 10/30 + ----- +lib/glob/glob.c + - wdequote_pathname: if wcsrtombs fails, make sure to check whether it + leaves wpathname set to a non-NULL value before checking whether or + not *wpathname is a null character (indicating an incomplete + conversion). Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972286 + with an assist from Bernhard Übelacker + + 11/1 + ---- +lib/readline/isearch.c + - _rl_isearch_dispatch: when checking whether the current character is + one of the isearch `opcodes', only check the multibyte character + member of CXT if we're currently running in a multibyte locale. Don't + assume that other parts of the code will set mb[0] = c and mb[1] = 0. + Report from Detlef Vollmann + +[bash-5.1-rc2 frozen] + + 11/10 + ----- +lib/readline/isearch.c + - _rl_isearch_dispatch: if we are aborting the search, make sure to + call _rl_fix_point and to make sure the point and mark are less + than the new rl_end, in case they got out of sync. Report and fix + from Tillmann Osswald + +test.c + - unary_test: assume the argument has already been expanded (the code + paths for [[ and [ expand it) and add AV_NOEXPAND to the flags passed + to array_value if assoc_expand_once is enabled. Prompted by a report + from Greg Wooledge + +[bash-5.1-rc3 frozen] + + 11/18 + ----- +doc/{bash.1,bashref.texi} + - small tweaks to the ulimit description to make it more consistent with + the Posix standard's terminology + + 12/4 + ---- + +[bash-5.1-release frozen] diff --git a/bash-5.1/CWRU/misc/bison b/bash-5.1/CWRU/misc/bison new file mode 100755 index 0000000000000000000000000000000000000000..58aae79ed0f49ec504aa8ce09d1aa790a2085b25 --- /dev/null +++ b/bash-5.1/CWRU/misc/bison @@ -0,0 +1,26 @@ +#! /bin/sh +# +# bison -- just call yacc +# + +# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# +# 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 . +# + +if [ "$1" = '-y' ]; then + shift +fi + +exec /usr/bin/yacc ${1+"$@"} diff --git a/bash-5.1/CWRU/misc/errlist.c b/bash-5.1/CWRU/misc/errlist.c new file mode 100644 index 0000000000000000000000000000000000000000..53c368d36c894a6869a6442569e372110656d552 --- /dev/null +++ b/bash-5.1/CWRU/misc/errlist.c @@ -0,0 +1,57 @@ +/* + * If necessary, link with lib/sh/libsh.a + */ + +/* Copyright (C) 1998-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include + +extern char *strerror(); + +extern int sys_nerr; + +int +main(c, v) +int c; +char **v; +{ + int i, n; + + if (c == 1) { + for (i = 1; i < sys_nerr; i++) + printf("%d --> %s\n", i, strerror(i)); + } else { + for (i = 1; i < c; i++) { + n = atoi(v[i]); + printf("%d --> %s\n", n, strerror(n)); + } + } + exit (0); +} + +programming_error(a, b) +char *a; +int b; +{ +} + +fatal_error() +{ +} diff --git a/bash-5.1/CWRU/misc/hpux10-dlfcn.h b/bash-5.1/CWRU/misc/hpux10-dlfcn.h new file mode 100644 index 0000000000000000000000000000000000000000..49d442810a064f66b107c9dab1bc339652834ac0 --- /dev/null +++ b/bash-5.1/CWRU/misc/hpux10-dlfcn.h @@ -0,0 +1,63 @@ +/* + * HPUX 10.x stubs to implement dl* in terms of shl* + * + * Not needed for later versions; HPUX 11.x has dlopen() and friends. + * + * configure also needs to be faked out. You can create a dummy libdl.a + * with stub entries for dlopen, dlclose, dlsym, and dlerror: + * + * int dlopen() { return(0);} + * int dlclose() { return(0);} + * int dlsym() { return(0);} + * int dlerror() { return(0);} + * + * This has not been tested; I just read the manual page and coded this up. + * + * According to the ld manual page, you need to link bash with -dld and add + * the -E flag to LOCAL_LDFLAGS. + */ + +/* Copyright (C) 1998-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (__HPUX10_DLFCN_H__) + +#define __HPUX10_DLFCN_H__ + +#include +#include + +#ifndef errno +extern int errno; +#endif + +#define RTLD_LAZY BIND_DEFERRED +#define RTLD_NOW BIND_IMMEDIATE +#define RTLD_GLOBAL DYNAMIC_PATH + +char *bash_global_sym_addr; + +#define dlopen(file,mode) (void *)shl_load((file), (mode), 0L) + +#define dlclose(handle) shl_unload((shl_t)(handle)) + +#define dlsym(handle,name) (bash_global_sym_addr=0,shl_findsym((shl_t *)&(handle),name,TYPE_UNDEFINED,&bash_global_sym_addr), (void *)bash_global_sym_addr) + +#define dlerror() strerror(errno) + +#endif /* __HPUX10_DLFCN_H__ */ diff --git a/bash-5.1/CWRU/misc/open-files.c b/bash-5.1/CWRU/misc/open-files.c new file mode 100644 index 0000000000000000000000000000000000000000..6a5557769f3621d3bca25a7d2dbab417a320e6c7 --- /dev/null +++ b/bash-5.1/CWRU/misc/open-files.c @@ -0,0 +1,39 @@ +/* open-files -- report files a process has open */ + +/* Copyright (C) 1989-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include +#include + +#include +#include + +#include + +main() +{ + register int i; + + for (i = 0; i < getdtablesize(); i++) { + if (fcntl(i, F_GETFD, 0) != -1) + fprintf(stderr, "fd %d: open\n", i); + } + exit(0); +} diff --git a/bash-5.1/CWRU/misc/sigs.c b/bash-5.1/CWRU/misc/sigs.c new file mode 100644 index 0000000000000000000000000000000000000000..bae93f8adc2d56d645b91f71277f4e759f87b1e4 --- /dev/null +++ b/bash-5.1/CWRU/misc/sigs.c @@ -0,0 +1,47 @@ +/* sigs - print signal dispositions for a process */ + +/* Copyright (C) 1990-2010 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include + +extern const char * const sys_siglist[]; + +typedef void sighandler(); + +main(argc, argv) +int argc; +char **argv; +{ + register int i; + sighandler *h; + + for (i = 1; i < NSIG; i++) { + h = signal(i, SIG_DFL); + if (h != SIG_DFL) { + if (h == SIG_IGN) + fprintf(stderr, "%d: ignored (%s)\n", i, sys_siglist[i]); + else + fprintf(stderr, "%d: caught (%s)\n", i, sys_siglist[i]); + } + } + exit(0); +} + + diff --git a/bash-5.1/CWRU/misc/sigstat.c b/bash-5.1/CWRU/misc/sigstat.c new file mode 100644 index 0000000000000000000000000000000000000000..9135baa4aee8502fc74b27b0530f877076900376 --- /dev/null +++ b/bash-5.1/CWRU/misc/sigstat.c @@ -0,0 +1,226 @@ +/* + * sigstat - print out useful information about signal arguments + * + * Chet Ramey + * chet@po.cwru.edu + */ + +/* Copyright (C) 1991-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include +#include + +extern char *strrchr(); +static char *signames[NSIG]; + +char *progname; + +void sigstat(); + +main(argc, argv) +int argc; +char **argv; +{ + register int i; + char *t; + + if (t = strrchr(argv[0], '/')) + progname = ++t; + else + progname = argv[0]; + init_signames(); + if (argc == 1) { + for (i = 1; i < NSIG; i++) + sigstat(i); + exit(0); + } + for (i = 1; i < argc; i++) + sigstat(atoi(argv[i])); + exit(0); +} + +void +sigstat(sig) +int sig; +{ + struct sigaction oact; + char *signame; + sigset_t set, oset; + int blocked; + + if (sig < 0 || sig >= NSIG) { + fprintf(stderr, "%s: %d: signal out of range\n", progname, sig); + return; + } + signame = signames[sig]; + sigemptyset(&oset); + sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); + if (sigismember(&oset, sig)) + printf("%s: signal is blocked\n", signame); + sigaction(sig, (struct sigaction *)NULL, &oact); + if (oact.sa_handler == SIG_IGN) + printf("%s: signal is ignored\n", signame); + else if (oact.sa_handler == SIG_DFL) + printf("%s: signal is defaulted\n", signame); + else + printf("%s: signal is trapped (?)\n", signame); +} + +init_signames() +{ + register int i; + bzero(signames, sizeof(signames)); + +#if defined (SIGHUP) /* hangup */ + signames[SIGHUP] = "SIGHUP"; +#endif +#if defined (SIGINT) /* interrupt */ + signames[SIGINT] = "SIGINT"; +#endif +#if defined (SIGQUIT) /* quit */ + signames[SIGQUIT] = "SIGQUIT"; +#endif +#if defined (SIGILL) /* illegal instruction (not reset when caught) */ + signames[SIGILL] = "SIGILL"; +#endif +#if defined (SIGTRAP) /* trace trap (not reset when caught) */ + signames[SIGTRAP] = "SIGTRAP"; +#endif +#if defined (SIGABRT) /* */ + signames[SIGABRT] = "SIGABRT"; +#endif +#if defined (SIGIOT) /* IOT instruction */ + signames[SIGIOT] = "SIGIOT"; +#endif +#if defined (SIGEMT) /* EMT instruction */ + signames[SIGEMT] = "SIGEMT"; +#endif +#if defined (SIGFPE) /* floating point exception */ + signames[SIGFPE] = "SIGFPE"; +#endif +#if defined (SIGKILL) /* kill (cannot be caught or ignored) */ + signames[SIGKILL] = "SIGKILL"; +#endif +#if defined (SIGBUS) /* bus error */ + signames[SIGBUS] = "SIGBUS"; +#endif +#if defined (SIGSEGV) /* segmentation violation */ + signames[SIGSEGV] = "SIGSEGV"; +#endif +#if defined (SIGSYS) /* bad argument to system call */ + signames[SIGSYS] = "SIGSYS"; +#endif +#if defined (SIGPIPE) /* write on a pipe with no one to read it */ + signames[SIGPIPE] = "SIGPIPE"; +#endif +#if defined (SIGALRM) /* alarm clock */ + signames[SIGALRM] = "SIGALRM"; +#endif +#if defined (SIGTERM) /* software termination signal from kill */ + signames[SIGTERM] = "SIGTERM"; +#endif +#if defined (SIGCLD) /* Like SIGCHLD. */ + signames[SIGCLD] = "SIGCLD"; +#endif +#if defined (SIGPWR) /* Magic thing for some machines. */ + signames[SIGPWR] = "SIGPWR"; +#endif +#if defined (SIGPOLL) /* For keyboard input? */ + signames[SIGPOLL] = "SIGPOLL"; +#endif +#if defined (SIGURG) /* urgent condition on IO channel */ + signames[SIGURG] = "SIGURG"; +#endif +#if defined (SIGSTOP) /* sendable stop signal not from tty */ + signames[SIGSTOP] = "SIGSTOP"; +#endif +#if defined (SIGTSTP) /* stop signal from tty */ + signames[SIGTSTP] = "SIGTSTP"; +#endif +#if defined (SIGCONT) /* continue a stopped process */ + signames[SIGCONT] = "SIGCONT"; +#endif +#if defined (SIGCHLD) /* to parent on child stop or exit */ + signames[SIGCHLD] = "SIGCHLD"; +#endif +#if defined (SIGTTIN) /* to readers pgrp upon background tty read */ + signames[SIGTTIN] = "SIGTTIN"; +#endif +#if defined (SIGTTOU) /* like TTIN for output if (tp->t_local<OSTOP) */ + signames[SIGTTOU] = "SIGTTOU"; +#endif +#if defined (SIGIO) /* input/output possible signal */ + signames[SIGIO] = "SIGIO"; +#endif +#if defined (SIGXCPU) /* exceeded CPU time limit */ + signames[SIGXCPU] = "SIGXCPU"; +#endif +#if defined (SIGXFSZ) /* exceeded file size limit */ + signames[SIGXFSZ] = "SIGXFSZ"; +#endif +#if defined (SIGVTALRM) /* virtual time alarm */ + signames[SIGVTALRM] = "SIGVTALRM"; +#endif +#if defined (SIGPROF) /* profiling time alarm */ + signames[SIGPROF] = "SIGPROF"; +#endif +#if defined (SIGWINCH) /* window changed */ + signames[SIGWINCH] = "SIGWINCH"; +#endif +#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */ + signames[SIGLOST] = "SIGLOST"; +#endif +#if defined (SIGUSR1) /* user defined signal 1 */ + signames[SIGUSR1] = "SIGUSR1"; +#endif +#if defined (SIGUSR2) /* user defined signal 2 */ + signames[SIGUSR2] = "SIGUSR2"; +#endif +#if defined (SIGMSG) /* HFT input data pending */ + signames[SIGMSG] = "SIGMSG"; +#endif +#if defined (SIGPWR) /* power failure imminent (save your data) */ + signames[SIGPWR] = "SIGPWR"; +#endif +#if defined (SIGDANGER) /* system crash imminent */ + signames[SIGDANGER] = "SIGDANGER"; +#endif +#if defined (SIGMIGRATE) /* migrate process to another CPU */ + signames[SIGMIGRATE] = "SIGMIGRATE"; +#endif +#if defined (SIGPRE) /* programming error */ + signames[SIGPRE] = "SIGPRE"; +#endif +#if defined (SIGGRANT) /* HFT monitor mode granted */ + signames[SIGGRANT] = "SIGGRANT"; +#endif +#if defined (SIGRETRACT) /* HFT monitor mode retracted */ + signames[SIGRETRACT] = "SIGRETRACT"; +#endif +#if defined (SIGSOUND) /* HFT sound sequence has completed */ + signames[SIGSOUND] = "SIGSOUND"; +#endif + + for (i = 0; i < NSIG; i++) + if (signames[i] == (char *)NULL) { + signames[i] = (char *)malloc (16);; + sprintf (signames[i], "signal %d", i); + } +} diff --git a/bash-5.1/CWRU/sh-redir-hack b/bash-5.1/CWRU/sh-redir-hack new file mode 100644 index 0000000000000000000000000000000000000000..413b297964c1a15f65ce2370178901e955ec56b7 --- /dev/null +++ b/bash-5.1/CWRU/sh-redir-hack @@ -0,0 +1,15 @@ +Add to `subshell' production in parse.y and recompile -DREDIRECTION_HACK to +get `< xx (command)' sh compatibility. + + | redirections '(' list ')' + { +#if defined (REDIRECTION_HACK) + /* XXX - C News sh compatibility hack - XXX */ + $3->redirects = $1; + $3->flags |= CMD_WANT_SUBSHELL; + $$ = $3; +#else + yyerror (); + YYABORT; +#endif + } diff --git a/bash-5.1/ChangeLog b/bash-5.1/ChangeLog new file mode 120000 index 0000000000000000000000000000000000000000..12c9a285d48e0603776af5053538e41e4bcd9cae --- /dev/null +++ b/bash-5.1/ChangeLog @@ -0,0 +1 @@ +CWRU/changelog \ No newline at end of file diff --git a/bash-5.1/INSTALL b/bash-5.1/INSTALL new file mode 100644 index 0000000000000000000000000000000000000000..91f1dd9a7db5a066c90bd8311a089bd5dfa21eea --- /dev/null +++ b/bash-5.1/INSTALL @@ -0,0 +1,445 @@ +Basic Installation +================== + +These are installation instructions for Bash. + +The simplest way to compile Bash is: + + 1. 'cd' to the directory containing the source code and type + './configure' to configure Bash for your system. If you're using + 'csh' on an old version of System V, you might need to type 'sh + ./configure' instead to prevent 'csh' from trying to execute + 'configure' itself. + + Running 'configure' takes some time. While running, it prints + messages telling which features it is checking for. + + 2. Type 'make' to compile Bash and build the 'bashbug' bug reporting + script. + + 3. Optionally, type 'make tests' to run the Bash test suite. + + 4. Type 'make install' to install 'bash' and 'bashbug'. This will + also install the manual pages and Info file. + +The 'configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a 'Makefile' in each directory of the package +(the top directory, the 'builtins', 'doc', and 'support' directories, +each directory under 'lib', and several others). It also creates a +'config.h' file containing system-dependent definitions. Finally, it +creates a shell script named 'config.status' that you can run in the +future to recreate the current configuration, a file 'config.cache' that +saves the results of its tests to speed up reconfiguring, and a file +'config.log' containing compiler output (useful mainly for debugging +'configure'). If at some point 'config.cache' contains results you +don't want to keep, you may remove or edit it. + +To find out more about the options and arguments that the 'configure' +script understands, type + + bash-4.2$ ./configure --help + +at the Bash prompt in your Bash source directory. + +If you want to build Bash in a directory separate from the source +directory - to build for multiple architectures, for example - just use +the full path to the configure script. The following commands will +build bash in a directory under '/usr/local/build' from the source code +in '/usr/local/src/bash-4.4': + + mkdir /usr/local/build/bash-4.4 + cd /usr/local/build/bash-4.4 + bash /usr/local/src/bash-4.4/configure + make + +See *note Compiling For Multiple Architectures:: for more information +about building in a directory separate from the source. + +If you need to do unusual things to compile Bash, please try to figure +out how 'configure' could check whether or not to do them, and mail +diffs or instructions to so they can be +considered for the next release. + +The file 'configure.ac' is used to create 'configure' by a program +called Autoconf. You only need 'configure.ac' if you want to change it +or regenerate 'configure' using a newer version of Autoconf. If you do +this, make sure you are using Autoconf version 2.50 or newer. + +You can remove the program binaries and object files from the source +code directory by typing 'make clean'. To also remove the files that +'configure' created (so you can compile Bash for a different kind of +computer), type 'make distclean'. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +'configure' script does not know about. You can give 'configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +On systems that have the 'env' program, you can do it like this: + + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +The configuration process uses GCC to build Bash if it is available. + +Compiling For Multiple Architectures +==================================== + +You can compile Bash for more than one kind of computer at the same +time, by placing the object files for each architecture in their own +directory. To do this, you must use a version of 'make' that supports +the 'VPATH' variable, such as GNU 'make'. 'cd' to the directory where +you want the object files and executables to go and run the 'configure' +script from the source directory (*note Basic Installation::). You may +need to supply the '--srcdir=PATH' argument to tell 'configure' where +the source files are. 'configure' automatically checks for the source +code in the directory that 'configure' is in and in '..'. + +If you have to use a 'make' that does not supports the 'VPATH' variable, +you can compile Bash for one architecture at a time in the source code +directory. After you have installed Bash for one architecture, use +'make distclean' before reconfiguring for another architecture. + +Alternatively, if your system supports symbolic links, you can use the +'support/mkclone' script to create a build tree which has symbolic links +back to each file in the source directory. Here's an example that +creates a build directory in the current directory from a source +directory '/usr/gnu/src/bash-2.0': + + bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 . + +The 'mkclone' script requires Bash, so you must have already built Bash +for at least one architecture before you can create build directories +for other architectures. + +Installation Names +================== + +By default, 'make install' will install into '/usr/local/bin', +'/usr/local/man', etc. You can specify an installation prefix other +than '/usr/local' by giving 'configure' the option '--prefix=PATH', or +by specifying a value for the 'DESTDIR' 'make' variable when running +'make install'. + +You can specify separate installation prefixes for architecture-specific +files and architecture-independent files. If you give 'configure' the +option '--exec-prefix=PATH', 'make install' will use PATH as the prefix +for installing programs and libraries. Documentation and other data +files will still use the regular prefix. + +Specifying the System Type +========================== + +There may be some features 'configure' can not figure out automatically, +but need to determine by the type of host Bash will run on. Usually +'configure' can figure that out, but if it prints a message saying it +can not guess the host type, give it the '--host=TYPE' option. 'TYPE' +can either be a short name for the system type, such as 'sun4', or a +canonical name with three fields: 'CPU-COMPANY-SYSTEM' (e.g., +'i386-unknown-freebsd4.2'). + +See the file 'support/config.sub' for the possible values of each field. + +Sharing Defaults +================ + +If you want to set default values for 'configure' scripts to share, you +can create a site shell script called 'config.site' that gives default +values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' +looks for 'PREFIX/share/config.site' if it exists, then +'PREFIX/etc/config.site' if it exists. Or, you can set the +'CONFIG_SITE' environment variable to the location of the site script. +A warning: the Bash 'configure' looks for a site script, but not all +'configure' scripts do. + +Operation Controls +================== + +'configure' recognizes the following options to control how it operates. + +'--cache-file=FILE' + Use and save the results of the tests in FILE instead of + './config.cache'. Set FILE to '/dev/null' to disable caching, for + debugging 'configure'. + +'--help' + Print a summary of the options to 'configure', and exit. + +'--quiet' +'--silent' +'-q' + Do not print messages saying which checks are being made. + +'--srcdir=DIR' + Look for the Bash source code in directory DIR. Usually + 'configure' can determine that directory automatically. + +'--version' + Print the version of Autoconf used to generate the 'configure' + script, and exit. + +'configure' also accepts some other, not widely used, boilerplate +options. 'configure --help' prints the complete list. + +Optional Features +================= + +The Bash 'configure' has a number of '--enable-FEATURE' options, where +FEATURE indicates an optional part of Bash. There are also several +'--with-PACKAGE' options, where PACKAGE is something like 'bash-malloc' +or 'purify'. To turn off the default use of a package, use +'--without-PACKAGE'. To configure Bash without a feature that is +enabled by default, use '--disable-FEATURE'. + +Here is a complete list of the '--enable-' and '--with-' options that +the Bash 'configure' recognizes. + +'--with-afs' + Define if you are using the Andrew File System from Transarc. + +'--with-bash-malloc' + Use the Bash version of 'malloc' in the directory 'lib/malloc'. + This is not the same 'malloc' that appears in GNU libc, but an + older version originally derived from the 4.2 BSD 'malloc'. This + 'malloc' is very fast, but wastes some space on each allocation. + This option is enabled by default. The 'NOTES' file contains a + list of systems for which this should be turned off, and + 'configure' disables this option automatically for a number of + systems. + +'--with-curses' + Use the curses library instead of the termcap library. This should + be supplied if your system has an inadequate or incomplete termcap + database. + +'--with-gnu-malloc' + A synonym for '--with-bash-malloc'. + +'--with-installed-readline[=PREFIX]' + Define this to make Bash link with a locally-installed version of + Readline rather than the version in 'lib/readline'. This works + only with Readline 5.0 and later versions. If PREFIX is 'yes' or + not supplied, 'configure' uses the values of the make variables + 'includedir' and 'libdir', which are subdirectories of 'prefix' by + default, to find the installed version of Readline if it is not in + the standard system include and library directories. If PREFIX is + 'no', Bash links with the version in 'lib/readline'. If PREFIX is + set to any other value, 'configure' treats it as a directory + pathname and looks for the installed version of Readline in + subdirectories of that directory (include files in PREFIX/'include' + and the library in PREFIX/'lib'). + +'--with-purify' + Define this to use the Purify memory allocation checker from + Rational Software. + +'--enable-minimal-config' + This produces a shell with minimal features, close to the + historical Bourne shell. + +There are several '--enable-' options that alter how Bash is compiled +and linked, rather than changing run-time features. + +'--enable-largefile' + Enable support for large files + (http://www.unix.org/version2/whatsnew/lfs20mar.html) if the + operating system requires special compiler options to build + programs which can access large files. This is enabled by default, + if the operating system provides large file support. + +'--enable-profiling' + This builds a Bash binary that produces profiling information to be + processed by 'gprof' each time it is executed. + +'--enable-static-link' + This causes Bash to be linked statically, if 'gcc' is being used. + This could be used to build a version to use as root's shell. + +The 'minimal-config' option can be used to disable all of the following +options, but it is processed first, so individual options may be enabled +using 'enable-FEATURE'. + +All of the following options except for 'disabled-builtins', +'direxpand-default', and 'xpg-echo-default' are enabled by default, +unless the operating system does not provide the necessary support. + +'--enable-alias' + Allow alias expansion and include the 'alias' and 'unalias' + builtins (*note Aliases::). + +'--enable-arith-for-command' + Include support for the alternate form of the 'for' command that + behaves like the C language 'for' statement (*note Looping + Constructs::). + +'--enable-array-variables' + Include support for one-dimensional array shell variables (*note + Arrays::). + +'--enable-bang-history' + Include support for 'csh'-like history substitution (*note History + Interaction::). + +'--enable-brace-expansion' + Include 'csh'-like brace expansion ( 'b{a,b}c' ==> 'bac bbc' ). + See *note Brace Expansion::, for a complete description. + +'--enable-casemod-attributes' + Include support for case-modifying attributes in the 'declare' + builtin and assignment statements. Variables with the UPPERCASE + attribute, for example, will have their values converted to + uppercase upon assignment. + +'--enable-casemod-expansion' + Include support for case-modifying word expansions. + +'--enable-command-timing' + Include support for recognizing 'time' as a reserved word and for + displaying timing statistics for the pipeline following 'time' + (*note Pipelines::). This allows pipelines as well as shell + builtins and functions to be timed. + +'--enable-cond-command' + Include support for the '[[' conditional command. (*note + Conditional Constructs::). + +'--enable-cond-regexp' + Include support for matching POSIX regular expressions using the + '=~' binary operator in the '[[' conditional command. (*note + Conditional Constructs::). + +'--enable-coprocesses' + Include support for coprocesses and the 'coproc' reserved word + (*note Pipelines::). + +'--enable-debugger' + Include support for the bash debugger (distributed separately). + +'--enable-dev-fd-stat-broken' + If calling 'stat' on /dev/fd/N returns different results than + calling 'fstat' on file descriptor N, supply this option to enable + a workaround. This has implications for conditional commands that + test file attributes. + +'--enable-direxpand-default' + Cause the 'direxpand' shell option (*note The Shopt Builtin::) to + be enabled by default when the shell starts. It is normally + disabled by default. + +'--enable-directory-stack' + Include support for a 'csh'-like directory stack and the 'pushd', + 'popd', and 'dirs' builtins (*note The Directory Stack::). + +'--enable-disabled-builtins' + Allow builtin commands to be invoked via 'builtin xxx' even after + 'xxx' has been disabled using 'enable -n xxx'. See *note Bash + Builtins::, for details of the 'builtin' and 'enable' builtin + commands. + +'--enable-dparen-arithmetic' + Include support for the '((...))' command (*note Conditional + Constructs::). + +'--enable-extended-glob' + Include support for the extended pattern matching features + described above under *note Pattern Matching::. + +'--enable-extended-glob-default' + Set the default value of the EXTGLOB shell option described above + under *note The Shopt Builtin:: to be enabled. + +'--enable-function-import' + Include support for importing function definitions exported by + another instance of the shell from the environment. This option is + enabled by default. + +'--enable-glob-asciirange-default' + Set the default value of the GLOBASCIIRANGES shell option described + above under *note The Shopt Builtin:: to be enabled. This controls + the behavior of character ranges when used in pattern matching + bracket expressions. + +'--enable-help-builtin' + Include the 'help' builtin, which displays help on shell builtins + and variables (*note Bash Builtins::). + +'--enable-history' + Include command history and the 'fc' and 'history' builtin commands + (*note Bash History Facilities::). + +'--enable-job-control' + This enables the job control features (*note Job Control::), if the + operating system supports them. + +'--enable-multibyte' + This enables support for multibyte characters if the operating + system provides the necessary support. + +'--enable-net-redirections' + This enables the special handling of filenames of the form + '/dev/tcp/HOST/PORT' and '/dev/udp/HOST/PORT' when used in + redirections (*note Redirections::). + +'--enable-process-substitution' + This enables process substitution (*note Process Substitution::) if + the operating system provides the necessary support. + +'--enable-progcomp' + Enable the programmable completion facilities (*note Programmable + Completion::). If Readline is not enabled, this option has no + effect. + +'--enable-prompt-string-decoding' + Turn on the interpretation of a number of backslash-escaped + characters in the '$PS0', '$PS1', '$PS2', and '$PS4' prompt + strings. See *note Controlling the Prompt::, for a complete list + of prompt string escape sequences. + +'--enable-readline' + Include support for command-line editing and history with the Bash + version of the Readline library (*note Command Line Editing::). + +'--enable-restricted' + Include support for a "restricted shell". If this is enabled, + Bash, when called as 'rbash', enters a restricted mode. See *note + The Restricted Shell::, for a description of restricted mode. + +'--enable-select' + Include the 'select' compound command, which allows the generation + of simple menus (*note Conditional Constructs::). + +'--enable-separate-helpfiles' + Use external files for the documentation displayed by the 'help' + builtin instead of storing the text internally. + +'--enable-single-help-strings' + Store the text displayed by the 'help' builtin as a single string + for each help topic. This aids in translating the text to + different languages. You may need to disable this if your compiler + cannot handle very long string literals. + +'--enable-strict-posix-default' + Make Bash POSIX-conformant by default (*note Bash POSIX Mode::). + +'--enable-usg-echo-default' + A synonym for '--enable-xpg-echo-default'. + +'--enable-xpg-echo-default' + Make the 'echo' builtin expand backslash-escaped characters by + default, without requiring the '-e' option. This sets the default + value of the 'xpg_echo' shell option to 'on', which makes the Bash + 'echo' behave more like the version specified in the Single Unix + Specification, version 3. *Note Bash Builtins::, for a description + of the escape sequences that 'echo' recognizes. + +The file 'config-top.h' contains C Preprocessor '#define' statements for +options which are not settable from 'configure'. Some of these are not +meant to be changed; beware of the consequences if you do. Read the +comments associated with each definition for more information about its +effect. diff --git a/bash-5.1/MANIFEST b/bash-5.1/MANIFEST new file mode 100644 index 0000000000000000000000000000000000000000..54f327cf409eee5b1fc526bc62cea2beb78ad8c4 --- /dev/null +++ b/bash-5.1/MANIFEST @@ -0,0 +1,1531 @@ +# +# Master distribution manifest for bash +# +# +# Filename type +# +CWRU d +CWRU/misc d +builtins d +cross-build d +doc d +examples d +#examples/obashdb d +examples/bash-completion d +examples/complete d +examples/functions d +examples/scripts d +#examples/scripts.v2 d +#examples/scripts.noah d +examples/startup-files d +#examples/startup-files/apple d +examples/misc d +examples/loadables d +examples/loadables/perl d +include d +lib d +lib/glob d +lib/glob/doc d +lib/intl d +lib/malloc d +lib/readline d +lib/readline/doc d +lib/readline/examples d +lib/sh d +lib/termcap d +lib/tilde d +m4 d +po d +support d +tests d +tests/misc d +ABOUT-NLS f +ChangeLog s CWRU/changelog +CHANGES f +COMPAT f +COPYING f +INSTALL f +MANIFEST f +NEWS f +NOTES f +POSIX f +README f +RBASH f +AUTHORS f +Y2K f +configure.ac f +configure f 755 +Makefile.in f +config-top.h f +config-bot.h f +config.h.in f +aclocal.m4 f +array.c f +arrayfunc.c f +assoc.c f +eval.c f +print_cmd.c f +general.c f +list.c f +locale.c f +stringlib.c f +variables.c f +make_cmd.c f +copy_cmd.c f +unwind_prot.c f +dispose_cmd.c f +bashhist.c f +hashcmd.c f +hashlib.c f +parse.y f +pathexp.c f +subst.c f +shell.c f +trap.c f +sig.c f +siglist.c f +version.c f +flags.c f +jobs.c f +input.c f +mailcheck.c f +test.c f +expr.c f +alias.c f +execute_cmd.c f +findcmd.c f +redir.c f +bashline.c f +braces.c f +bracecomp.c f +nojobs.c f +error.c f +xmalloc.c f +pcomplete.c f +pcomplib.c f +mksyntax.c f +alias.h f +builtins.h f +bashhist.h f +bashline.h f +conftypes.h f +patchlevel.h f +variables.h f +array.h f +arrayfunc.h f +assoc.h f +jobs.h f +findcmd.h f +hashlib.h f +quit.h f +flags.h f +shell.h f +syntax.h f +pathexp.h f +parser.h f +pcomplete.h f +sig.h f +test.h f +trap.h f +general.h f +unwind_prot.h f +input.h f +error.h f +command.h f +externs.h f +siglist.h f +subst.h f +dispose_cmd.h f +hashcmd.h f +bashansi.h f +bashjmp.h f +bashintl.h f +make_cmd.h f +execute_cmd.h f +redir.h f +bashtypes.h f +mailcheck.h f +xmalloc.h f +y.tab.c f +y.tab.h f +parser-built f +pathnames.h.in f +builtins/Makefile.in f +builtins/alias.def f +builtins/bind.def f +builtins/break.def f +builtins/builtin.def f +builtins/caller.def f +builtins/cd.def f +builtins/colon.def f +builtins/command.def f +builtins/complete.def f +builtins/common.c f +builtins/declare.def f +builtins/echo.def f +builtins/enable.def f +builtins/eval.def f +builtins/evalfile.c f +builtins/evalstring.c f +builtins/exec.def f +builtins/exit.def f +builtins/fc.def f +builtins/fg_bg.def f +builtins/gen-helpfiles.c f +builtins/getopt.c f +builtins/getopt.h f +builtins/getopts.def f +builtins/hash.def f +builtins/help.def f +builtins/let.def f +builtins/history.def f +builtins/jobs.def f +builtins/kill.def f +builtins/mapfile.def f +builtins/mkbuiltins.c f +builtins/printf.def f +builtins/pushd.def f +builtins/read.def f +builtins/reserved.def f +builtins/return.def f +builtins/set.def f +builtins/setattr.def f +builtins/shift.def f +builtins/shopt.def f +builtins/source.def f +builtins/suspend.def f +builtins/test.def f +builtins/times.def f +builtins/trap.def f +builtins/type.def f +builtins/ulimit.def f +builtins/umask.def f +builtins/wait.def f +builtins/psize.c f +builtins/psize.sh f +builtins/inlib.def f +builtins/bashgetopt.c f +builtins/common.h f +builtins/bashgetopt.h f +cross-build/cygwin32.cache f +cross-build/x86-beos.cache f +cross-build/opennt.cache f +cross-build/qnx.cache f +include/ansi_stdlib.h f +include/chartypes.h f +include/filecntl.h f +include/gettext.h f +include/maxpath.h f +include/memalloc.h f +include/ocache.h f +include/posixdir.h f +include/posixjmp.h f +include/posixselect.h f +include/posixstat.h f +include/posixtime.h f +include/posixwait.h f +include/shmbchar.h f +include/shmbutil.h f +include/shtty.h f +include/stat-time.h f +include/stdc.h f +include/systimes.h f +include/typemax.h f +include/unionwait.h f +lib/glob/Makefile.in f +lib/glob/sm_loop.c f +lib/glob/smatch.c f +lib/glob/strmatch.c f +lib/glob/strmatch.h f +lib/glob/glob.c f +lib/glob/glob.h f +lib/glob/glob_loop.c f +lib/glob/gmisc.c f +lib/glob/gm_loop.c f +lib/glob/xmbsrtowcs.c f +lib/glob/collsyms.h f +lib/glob/doc/Makefile f +lib/glob/doc/glob.texi f +lib/glob/ndir.h f +lib/intl/ChangeLog f +lib/intl/Makefile.in f +lib/intl/VERSION f +lib/intl/bindtextdom.c f +lib/intl/config.charset f +lib/intl/dcgettext.c f +lib/intl/dcigettext.c f +lib/intl/dcngettext.c f +lib/intl/dgettext.c f +lib/intl/dngettext.c f +lib/intl/eval-plural.h f +lib/intl/explodename.c f +lib/intl/finddomain.c f +lib/intl/gettext.c f +lib/intl/gettextP.h f +lib/intl/gmo.h f +lib/intl/hash-string.h f +lib/intl/intl-compat.c f +lib/intl/l10nflist.c f +lib/intl/libgnuintl.h.in f +lib/intl/loadinfo.h f +lib/intl/loadmsgcat.c f +lib/intl/localcharset.c f +lib/intl/localcharset.h f +lib/intl/locale.alias f +lib/intl/localealias.c f +lib/intl/localename.c f +lib/intl/log.c f +lib/intl/ngettext.c f +lib/intl/os2compat.c f +lib/intl/os2compat.h f +lib/intl/osdep.c f +lib/intl/plural-exp.c f +lib/intl/plural-exp.h f +lib/intl/plural.c f +lib/intl/plural.y f +lib/intl/ref-add.sin f +lib/intl/ref-del.sin f +lib/intl/relocatable.c f +lib/intl/relocatable.h f +lib/intl/textdomain.c f +lib/malloc/Makefile.in f +lib/malloc/getpagesize.h f +lib/malloc/imalloc.h f +lib/malloc/mstats.h f +lib/malloc/shmalloc.h f +lib/malloc/table.h f +lib/malloc/watch.h f +lib/malloc/alloca.c f +lib/malloc/malloc.c f +lib/malloc/stats.c f +lib/malloc/table.c f +lib/malloc/trace.c f +lib/malloc/watch.c f +lib/malloc/xmalloc.c f +lib/malloc/xleaktrace f 755 +lib/malloc/stub.c f +lib/malloc/i386-alloca.s f +lib/malloc/x386-alloca.s f +lib/readline/COPYING f +lib/readline/Makefile.in f +lib/readline/ChangeLog f +lib/readline/README f +lib/readline/STANDALONE f +lib/readline/readline.c f +lib/readline/vi_mode.c f +lib/readline/emacs_keymap.c f +lib/readline/vi_keymap.c f +lib/readline/history.c f +lib/readline/histexpand.c f +lib/readline/histsearch.c f +lib/readline/histfile.c f +lib/readline/funmap.c f +lib/readline/keymaps.c f +lib/readline/util.c f +lib/readline/terminal.c f +lib/readline/xfree.c f +lib/readline/xmalloc.c f +lib/readline/search.c f +lib/readline/isearch.c f +lib/readline/parens.c f +lib/readline/rltty.c f +lib/readline/compat.c f +lib/readline/complete.c f +lib/readline/bind.c f +lib/readline/display.c f +lib/readline/signals.c f +lib/readline/kill.c f +lib/readline/text.c f +lib/readline/undo.c f +lib/readline/macro.c f +lib/readline/input.c f +lib/readline/callback.c f +lib/readline/mbutil.c f +lib/readline/misc.c f +lib/readline/nls.c f +lib/readline/shell.c f +lib/readline/colors.c f +lib/readline/parse-colors.c f +lib/readline/savestring.c f +lib/readline/tilde.c f +lib/readline/tilde.h f +lib/readline/rldefs.h f +lib/readline/rlconf.h f +lib/readline/rlmbutil.h f +lib/readline/rlshell.h f +lib/readline/rltty.h f +lib/readline/rltypedefs.h f +lib/readline/rlwinsize.h f +lib/readline/readline.h f +lib/readline/tcap.h f +lib/readline/keymaps.h f +lib/readline/history.h f +lib/readline/histlib.h f +lib/readline/chardefs.h f +lib/readline/posixdir.h f +lib/readline/posixjmp.h f +lib/readline/posixselect.h f +lib/readline/posixstat.h f +lib/readline/ansi_stdlib.h f +lib/readline/rlstdc.h f +lib/readline/rlprivate.h f +lib/readline/colors.h f +lib/readline/parse-colors.h f +lib/readline/xmalloc.h f +lib/readline/doc/Makefile f +lib/readline/doc/version.texi f +lib/readline/doc/rlman.texi f +lib/readline/doc/rltech.texi f +lib/readline/doc/rluser.texi f +lib/readline/doc/rluserman.texi f +lib/readline/doc/history.texi f +lib/readline/doc/hstech.texi f +lib/readline/doc/hsuser.texi f +lib/readline/doc/fdl.texi f +lib/readline/examples/Makefile f +lib/readline/examples/excallback.c f +lib/readline/examples/fileman.c f +lib/readline/examples/manexamp.c f +lib/readline/examples/histexamp.c f +lib/readline/examples/rltest.c f +lib/readline/examples/rl-callbacktest.c f +lib/readline/examples/rl.c f +lib/readline/examples/rlcat.c f +lib/readline/examples/Inputrc f +lib/sh/Makefile.in f +lib/sh/casemod.c f +lib/sh/clktck.c f +lib/sh/clock.c f +lib/sh/dprintf.c f +lib/sh/eaccess.c f +lib/sh/fmtullong.c f +lib/sh/fmtulong.c f +lib/sh/fmtumax.c f +lib/sh/fnxform.c f +lib/sh/fpurge.c f +lib/sh/getcwd.c f +lib/sh/getenv.c f +lib/sh/gettimeofday.c f +lib/sh/inet_aton.c f +lib/sh/input_avail.c f +lib/sh/itos.c f +lib/sh/mailstat.c f +lib/sh/makepath.c f +lib/sh/mbscasecmp.c f +lib/sh/mbschr.c f +lib/sh/mbscmp.c f +lib/sh/memset.c f +lib/sh/mktime.c f +lib/sh/netconn.c f +lib/sh/netopen.c f +lib/sh/oslib.c f +lib/sh/pathcanon.c f +lib/sh/pathphys.c f +lib/sh/random.c f +lib/sh/rename.c f +lib/sh/setlinebuf.c f +lib/sh/shmatch.c f +lib/sh/shmbchar.c f +lib/sh/shquote.c f +lib/sh/shtty.c f +lib/sh/snprintf.c f +lib/sh/spell.c f +lib/sh/strcasecmp.c f +lib/sh/strcasestr.c f +lib/sh/strchrnul.c f +lib/sh/strdup.c f +lib/sh/strerror.c f +lib/sh/strftime.c f +lib/sh/stringlist.c f +lib/sh/stringvec.c f +lib/sh/strnlen.c f +lib/sh/strpbrk.c f +lib/sh/strstr.c f +lib/sh/strtod.c f +lib/sh/strtoimax.c f +lib/sh/strtol.c f +lib/sh/strtoll.c f +lib/sh/strtoul.c f +lib/sh/strtoull.c f +lib/sh/strtoumax.c f +lib/sh/strtrans.c f +lib/sh/times.c f +lib/sh/timeval.c f +lib/sh/tmpfile.c f +lib/sh/uconvert.c f +lib/sh/ufuncs.c f +lib/sh/unicode.c f +lib/sh/utf8.c f +lib/sh/vprint.c f +lib/sh/wcsdup.c f +lib/sh/wcsnwidth.c f +lib/sh/wcswidth.c f +lib/sh/winsize.c f +lib/sh/zcatfd.c f +lib/sh/zgetline.c f +lib/sh/zmapfd.c f +lib/sh/zread.c f +lib/sh/zwrite.c f +lib/termcap/Makefile.in f +lib/termcap/ltcap.h f +lib/termcap/termcap.c f +lib/termcap/termcap.h f +lib/termcap/tparam.c f +lib/termcap/version.c f +lib/tilde/README f +lib/tilde/Makefile.in f +lib/tilde/tilde.c f +lib/tilde/tilde.h f +lib/tilde/shell.c f +m4/stat-time.m4 f +m4/timespec.m4 f +m4/codeset.m4 f +m4/extern-inline.m4 f +m4/fcntl-o.m4 f +m4/gettext.m4 f +m4/glibc2.m4 f +m4/glibc21.m4 f +m4/host-cpu-c-abi.m4 f +m4/iconv.m4 f +m4/intdiv0.m4 f +m4/intl-thread-locale.m4 f +m4/intl.m4 f +m4/intlmacosx.m4 f +m4/intmax.m4 f +m4/inttypes-pri.m4 f +m4/inttypes.m4 f +m4/inttypes_h.m4 f +m4/lcmessage.m4 f +m4/lib-ld.m4 f +m4/lib-link.m4 f +m4/lib-prefix.m4 f +m4/lock.m4 f +m4/nls.m4 f +m4/po.m4 f +m4/printf-posix.m4 f +m4/progtest.m4 f +m4/pthread_rwlock_rdlock.m4 f +m4/size_max.m4 f +m4/stdint_h.m4 f +m4/threadlib.m4 f +m4/uintmax_t.m4 f +m4/ulonglong.m4 f +m4/visibility.m4 f +m4/wchar_t.m4 f +m4/wint_t.m4 f +m4/xsize.m4 f +po/LINGUAS f +po/Makefile.in.in f +po/Makevars f +po/POTFILES.in f +po/README f +po/Rules-builtins f +po/Rules-quot f +po/bash.pot f +po/boldquot.sed f +po/en@boldquot.gmo f +po/en@boldquot.header f +po/en@boldquot.po f +po/en@quot.gmo f +po/en@quot.header f +po/en@quot.po f +po/af.gmo f +po/af.po f +po/bg.gmo f +po/bg.po f +po/ca.gmo f +po/ca.po f +po/cs.gmo f +po/cs.po f +po/da.gmo f +po/da.po f +po/de.gmo f +po/de.po f +po/el.gmo f +po/el.po f +po/eo.gmo f +po/eo.po f +po/es.gmo f +po/es.po f +po/et.gmo f +po/et.po f +po/fi.gmo f +po/fi.po f +po/fr.gmo f +po/fr.po f +po/ga.gmo f +po/ga.po f +po/gl.gmo f +po/gl.po f +po/hr.gmo f +po/hr.po f +po/hu.gmo f +po/hu.po f +po/id.gmo f +po/id.po f +po/it.gmo f +po/it.po f +po/ja.gmo f +po/ja.po f +po/ko.gmo f +po/ko.po f +po/lt.gmo f +po/lt.po f +po/nl.gmo f +po/nb.po f +po/nb.gmo f +po/nl.po f +po/pl.gmo f +po/pl.po f +po/pt.gmo f +po/pt.po f +po/pt_BR.gmo f +po/pt_BR.po f +po/ro.gmo f +po/ro.po f +po/ru.gmo f +po/ru.po f +po/sk.gmo f +po/sk.po f +po/sl.gmo f +po/sr.po f +po/sr.gmo f +po/sl.po f +po/sv.gmo f +po/sv.po f +po/tr.gmo f +po/tr.po f +po/uk.gmo f +po/uk.po f +po/vi.gmo f +po/vi.po f +po/zh_CN.gmo f +po/zh_CN.po f +po/zh_TW.gmo f +po/zh_TW.po f +po/insert-header.sin f +po/quot.sed f +po/remove-potcdate.sin f +CWRU/misc/open-files.c f +CWRU/misc/sigs.c f +CWRU/misc/sigstat.c f +CWRU/misc/bison f +CWRU/misc/errlist.c f +CWRU/misc/hpux10-dlfcn.h f +CWRU/PLATFORMS f +CWRU/README f +CWRU/changelog f +CWRU/sh-redir-hack f +doc/FAQ f +doc/Makefile.in f +doc/bash.1 f +doc/bashbug.1 f +doc/builtins.1 f +doc/rbash.1 f +doc/README f +doc/INTRO f +doc/texinfo.tex f +doc/bashref.texi f +doc/version.texi f +doc/bashref.info f +doc/bash.info f +doc/article.ms f +doc/htmlpost.sh f 755 +doc/infopost.sh f 755 +doc/fdl.texi f +doc/fdl.txt f +# +doc/article.ps f +doc/rose94.ps f +doc/bash.ps f +doc/bashbug.ps f +doc/builtins.ps f +doc/rbash.ps f +doc/bashref.ps f +doc/bashref.dvi f +doc/bash.0 f +doc/bashbug.0 f +doc/builtins.0 f +doc/rbash.0 f +doc/article.txt f +doc/bash.html f +doc/bashref.html f +doc/article.pdf f +doc/bash.pdf f +doc/bashref.pdf f +doc/rose94.pdf f +doc/aosa-bash.pdf f +doc/aosa-bash-full.pdf f +# +support/Makefile.in f +support/bash.pc.in f +support/bashversion.c f +support/checkbashisms f 755 +support/config.guess f +support/config.rpath f 755 +support/config.sub f +support/printenv.sh f 755 +support/printenv.c f +support/bash.xbm f +support/missing f 755 +support/mkclone f 755 +support/mkconffiles f 755 +support/mkdirs f 755 +support/mkinstalldirs f 755 +support/mkversion.sh f 755 +support/mksignames.c f +support/signames.c f +support/bashbug.sh f +support/bashbug.sh.in f +support/man2html.c f +support/recho.c f +support/zecho.c f +support/xcase.c f +support/SYMLINKS f +support/fixlinks f 755 +support/install.sh f 755 +support/texi2dvi f 755 +support/texi2html f 755 +support/xenix-link.sh f 755 +support/shobj-conf f 755 +support/rlvers.sh f 755 +examples/INDEX.txt f +examples/INDEX.html f +#examples/obashdb/PERMISSION f +#examples/obashdb/README f +#examples/obashdb/bashdb f +#examples/obashdb/bashdb.el f +examples/bash-completion/README f +examples/bash-completion/bash-completion-2.5.tar.xz f +examples/complete/bash_completion f +examples/complete/cdfunc f +examples/complete/complete-examples f +#examples/complete/complete.ianmac f +#examples/complete/complete2.ianmac f +#examples/complete/complete.freebsd f +#examples/complete/complete.gnu-longopt f +examples/complete/bashcc-1.0.1.tar.gz f +examples/loadables/README f +examples/loadables/template.c f +examples/loadables/loadables.h f +examples/loadables/Makefile.in f +examples/loadables/Makefile.inc.in f +examples/loadables/necho.c f +examples/loadables/hello.c f +examples/loadables/asort.c f +examples/loadables/accept.c f +examples/loadables/print.c f +examples/loadables/realpath.c f +examples/loadables/seq.c f +examples/loadables/setpgid.c f +examples/loadables/sleep.c f +examples/loadables/strftime.c f +examples/loadables/truefalse.c f +#examples/loadables/getconf.h f +#examples/loadables/getconf.c f +examples/loadables/fdflags.c f +examples/loadables/finfo.c f +examples/loadables/cat.c f +examples/loadables/csv.c f +examples/loadables/cut.c f +examples/loadables/logname.c f +examples/loadables/basename.c f +examples/loadables/dirname.c f +examples/loadables/tty.c f +examples/loadables/pathchk.c f +examples/loadables/tee.c f +examples/loadables/rm.c f +examples/loadables/rmdir.c f +examples/loadables/head.c f +examples/loadables/printenv.c f +examples/loadables/push.c f +examples/loadables/id.c f +examples/loadables/whoami.c f +examples/loadables/uname.c f +examples/loadables/sync.c f +examples/loadables/mkdir.c f +examples/loadables/mkfifo.c f +examples/loadables/mktemp.c f +examples/loadables/ln.c f +examples/loadables/mypid.c f +examples/loadables/unlink.c f +examples/loadables/stat.c f +examples/loadables/perl/Makefile.in f +examples/loadables/perl/README f +examples/loadables/perl/bperl.c f +examples/loadables/perl/iperl.c f +#examples/loadables/sprintf.c f +#examples/loadables/xtitle.c f +examples/functions/array-stuff f +examples/functions/array-to-string f +examples/functions/arrayops.bash f +examples/functions/autoload f +examples/functions/autoload.v2 f +examples/functions/autoload.v3 f +examples/functions/autoload.v4 f +examples/functions/autoload.v4.t f +examples/functions/basename f +#examples/functions/basename2 f +#examples/functions/coproc.bash f +#examples/functions/coshell.README f +#examples/functions/coshell.bash f +examples/functions/csh-compat f +#examples/functions/dirfuncs f +examples/functions/dirname f +examples/functions/dirstack f +#examples/functions/emptydir f +examples/functions/exitstat f +examples/functions/external f +examples/functions/fact f +examples/functions/fstty f +examples/functions/func f +#examples/functions/gethtml f +#examples/functions/getoptx.bash f +examples/functions/inetaddr f +examples/functions/inpath f +#examples/functions/isnum.bash f +examples/functions/isnum2 f +examples/functions/isvalidip f +#examples/functions/jdate.bash f +#examples/functions/jj.bash f +#examples/functions/keep f +examples/functions/ksh-cd f +examples/functions/ksh-compat-test f +examples/functions/kshenv f +examples/functions/login f +#examples/functions/lowercase f +#examples/functions/manpage f +#examples/functions/mhfold f +#examples/functions/newdirstack.bsh f +examples/functions/notify.bash f +#examples/functions/pathfuncs f +#examples/functions/recurse f +#examples/functions/repeat2 f +#examples/functions/repeat3 f +examples/functions/seq f +examples/functions/seq2 f +examples/functions/shcat f +examples/functions/shcat2 f +examples/functions/sort-pos-params f +#examples/functions/sqroot f +examples/functions/substr f +examples/functions/substr2 f +#examples/functions/term f +examples/functions/whatis f +examples/functions/whence f +examples/functions/which f +#examples/functions/xalias.bash f +#examples/functions/xfind.bash f +#examples/scripts/adventure.sh f +#examples/scripts/bash-hexdump.sh f +#examples/scripts/bcsh.sh f +examples/scripts/cat.sh f +examples/scripts/center f +#examples/scripts/dd-ex.sh f +#examples/scripts/fixfiles.bash f +#examples/scripts/hanoi.bash f +examples/scripts/inpath f +#examples/scripts/krand.bash f +#examples/scripts/line-input.bash f +#examples/scripts/nohup.bash f +#examples/scripts/precedence f +#examples/scripts/randomcard.bash f +#examples/scripts/scrollbar f +#examples/scripts/scrollbar2 f +#examples/scripts/self-repro f +#examples/scripts/showperm.bash f +examples/scripts/shprompt f +examples/scripts/spin.bash f +#examples/scripts/timeout f +#examples/scripts/timeout2 f +#examples/scripts/timeout3 f +#examples/scripts/vtree2 f +#examples/scripts/vtree3 f +#examples/scripts/vtree3a f +#examples/scripts/websrv.sh f +examples/scripts/xterm_title f +examples/scripts/zprintf f +examples/startup-files/README f +examples/startup-files/Bashrc.bfox f +examples/startup-files/Bash_aliases f +examples/startup-files/Bash_profile f +examples/startup-files/bash-profile f +examples/startup-files/bashrc f +#examples/startup-files/apple/README f +#examples/startup-files/apple/aliases f +#examples/startup-files/apple/bash.defaults f +#examples/startup-files/apple/environment f +#examples/startup-files/apple/login f +#examples/startup-files/apple/logout f +#examples/startup-files/apple/rc f +#examples/misc/suncmd.termcap f +examples/misc/aliasconv.sh f +examples/misc/aliasconv.bash f +examples/misc/cshtobash f +tests/README f +tests/COPYRIGHT f +tests/test-glue-functions f +tests/alias.tests f +tests/alias1.sub f +tests/alias2.sub f +tests/alias3.sub f +tests/alias4.sub f +tests/alias5.sub f +tests/alias.right f +tests/appendop.tests f +tests/appendop1.sub f +tests/appendop2.sub f +tests/appendop.right f +tests/arith-for.tests f +tests/arith-for.right f +tests/arith.tests f +tests/arith.right f +tests/arith1.sub f +tests/arith2.sub f +tests/arith3.sub f +tests/arith4.sub f +tests/arith5.sub f +tests/arith6.sub f +tests/arith7.sub f +tests/arith8.sub f +tests/array.tests f +tests/array.right f +tests/array1.sub f +tests/array2.sub f +tests/array3.sub f +tests/array4.sub f +tests/array5.sub f +tests/array6.sub f +tests/array7.sub f +tests/array8.sub f +tests/array9.sub f +tests/array10.sub f +tests/array11.sub f +tests/array12.sub f +tests/array13.sub f +tests/array14.sub f +tests/array15.sub f +tests/array16.sub f +tests/array17.sub f +tests/array18.sub f +tests/array19.sub f +tests/array20.sub f +tests/array21.sub f +tests/array22.sub f +tests/array23.sub f +tests/array24.sub f +tests/array25.sub f +tests/array26.sub f +tests/array27.sub f +tests/array28.sub f +tests/array-at-star f +tests/array2.right f +tests/assoc.tests f +tests/assoc.right f +tests/assoc1.sub f +tests/assoc2.sub f +tests/assoc3.sub f +tests/assoc4.sub f +tests/assoc5.sub f +tests/assoc6.sub f +tests/assoc7.sub f +tests/assoc8.sub f +tests/assoc9.sub f +tests/assoc10.sub f +tests/assoc11.sub f +tests/attr.tests f +tests/attr.right f +tests/attr1.sub f +tests/attr2.sub f +tests/braces.tests f +tests/braces.right f +tests/builtins.tests f +tests/builtins.right f +tests/builtins1.sub f +tests/builtins2.sub f +tests/builtins3.sub f +tests/builtins4.sub f +tests/builtins5.sub f +tests/builtins6.sub f +tests/builtins7.sub f +tests/source1.sub f +tests/source2.sub f +tests/source3.sub f +tests/source4.sub f +tests/source5.sub f +tests/source6.sub f +tests/source7.sub f +tests/case.tests f +tests/case.right f +tests/case1.sub f +tests/case2.sub f +tests/case3.sub f +tests/case4.sub f +tests/casemod.tests f +tests/casemod.right f +tests/complete.tests f +tests/complete.right f +tests/comsub.tests f +tests/comsub.right f +tests/comsub1.sub f +tests/comsub2.sub f +tests/comsub3.sub f +tests/comsub4.sub f +tests/comsub-eof.tests f +tests/comsub-eof0.sub f +tests/comsub-eof1.sub f +tests/comsub-eof2.sub f +tests/comsub-eof3.sub f +tests/comsub-eof4.sub f +tests/comsub-eof5.sub f +tests/comsub-eof6.sub f +tests/comsub-eof.right f +tests/comsub-posix.tests f +tests/comsub-posix.right f +tests/comsub-posix1.sub f +tests/comsub-posix2.sub f +tests/comsub-posix3.sub f +tests/cond.tests f +tests/cond.right f +tests/cond-regexp1.sub f +tests/cond-regexp2.sub f +tests/cond-regexp3.sub f +tests/coproc.tests f +tests/coproc.right f +tests/cprint.tests f +tests/cprint.right f +tests/dbg-support.right f +tests/dbg-support.sub f +tests/dbg-support.tests f +tests/dbg-support2.right f +tests/dbg-support2.tests f +tests/dbg-support3.sub f +tests/dollar-at-star f +tests/dollar-at-star1.sub f +tests/dollar-at-star2.sub f +tests/dollar-at-star3.sub f +tests/dollar-at-star4.sub f +tests/dollar-at-star5.sub f +tests/dollar-at-star6.sub f +tests/dollar-at-star7.sub f +tests/dollar-at-star8.sub f +tests/dollar-at-star9.sub f +tests/dollar-at1.sub f +tests/dollar-at2.sub f +tests/dollar-at3.sub f +tests/dollar-at4.sub f +tests/dollar-at5.sub f +tests/dollar-at6.sub f +tests/dollar-at7.sub f +tests/dollar-star1.sub f +tests/dollar-star2.sub f +tests/dollar-star3.sub f +tests/dollar-star4.sub f +tests/dollar-star5.sub f +tests/dollar-star6.sub f +tests/dollar-star7.sub f +tests/dollar-star8.sub f +tests/dollar-star9.sub f +tests/dollar-star10.sub f +tests/dollar.right f +tests/dstack.tests f +tests/dstack.right f +tests/dstack2.tests f +tests/dstack2.right f +tests/dynvar.tests f +tests/dynvar.right f +tests/errors.tests f +tests/errors.right f +tests/errors1.sub f +tests/errors2.sub f +tests/errors3.sub f +tests/errors4.sub f +tests/errors5.sub f +tests/errors6.sub f +tests/errors7.sub f +tests/errors8.sub f +tests/execscript f +tests/exec.right f +tests/exec1.sub f 755 +tests/exec2.sub f +tests/exec3.sub f +tests/exec4.sub f +tests/exec5.sub f +tests/exec6.sub f +tests/exec7.sub f +tests/exec8.sub f +tests/exec9.sub f +tests/exec10.sub f +tests/exec11.sub f +tests/exec12.sub f +tests/exec13.sub f +tests/exec14.sub f +tests/exp.tests f +tests/exp.right f +tests/exp1.sub f +tests/exp2.sub f +tests/exp3.sub f +tests/exp4.sub f +tests/exp5.sub f +tests/exp6.sub f +tests/exp7.sub f +tests/exp8.sub f +tests/exp9.sub f +tests/exp10.sub f +tests/exp11.sub f +tests/exp12.sub f +tests/exportfunc.tests f +tests/exportfunc.right f +tests/exportfunc1.sub f +tests/exportfunc2.sub f +tests/exportfunc3.sub f +tests/extglob.tests f +tests/extglob.right f +tests/extglob1.sub f +tests/extglob1a.sub f +tests/extglob2.sub f +tests/extglob2.tests f +tests/extglob2.right f +tests/extglob3.sub f +tests/extglob3.tests f +tests/extglob3.right f +tests/extglob4.sub f +tests/extglob5.sub f +tests/func.tests f +tests/func.right f +tests/func1.sub f +tests/func2.sub f +tests/func3.sub f +tests/func4.sub f +tests/getopts.tests f +tests/getopts.right f +tests/getopts1.sub f +tests/getopts2.sub f +tests/getopts3.sub f +tests/getopts4.sub f +tests/getopts5.sub f +tests/getopts6.sub f +tests/getopts7.sub f +tests/getopts8.sub f +tests/getopts9.sub f +tests/getopts10.sub f +tests/glob.tests f +tests/glob1.sub f +tests/glob2.sub f +tests/glob3.sub f +tests/glob4.sub f +tests/glob5.sub f +tests/glob6.sub f +tests/glob7.sub f +tests/glob8.sub f +tests/glob9.sub f +tests/glob.right f +tests/globstar.tests f +tests/globstar.right f +tests/globstar1.sub f +tests/globstar2.sub f +tests/globstar3.sub f +tests/heredoc.tests f +tests/heredoc.right f +tests/heredoc1.sub f +tests/heredoc2.sub f +tests/heredoc3.sub f +tests/heredoc4.sub f +tests/heredoc5.sub f +tests/herestr.tests f +tests/herestr.right f +tests/herestr1.sub f +tests/histexp.tests f +tests/histexp1.sub f +tests/histexp2.sub f +tests/histexp3.sub f +tests/histexp4.sub f +tests/histexp5.sub f +tests/histexp6.sub f +tests/histexp7.sub f +tests/histexp.right f +tests/history.tests f +tests/history.right f +tests/history.list f 444 +tests/history1.sub f +tests/history2.sub f +tests/history3.sub f +tests/history4.sub f +tests/history5.sub f +tests/ifs.tests f +tests/ifs.right f +tests/ifs1.sub f +tests/ifs-posix.tests f +tests/ifs-posix.right f +tests/input-line.sh f +tests/input-line.sub f +tests/input.right f +tests/intl.tests f +tests/intl1.sub f +tests/intl2.sub f +tests/intl3.sub f +tests/intl.right f +tests/iquote.tests f +tests/iquote.right f +tests/iquote1.sub f +tests/invert.tests f +tests/invert.right f +tests/jobs.tests f +tests/jobs1.sub f +tests/jobs2.sub f +tests/jobs3.sub f +tests/jobs4.sub f +tests/jobs5.sub f +tests/jobs6.sub f +tests/jobs7.sub f +tests/jobs.right f +tests/lastpipe.right f +tests/lastpipe.tests f +tests/lastpipe1.sub f +tests/lastpipe2.sub f +tests/mapfile.data f +tests/mapfile.right f +tests/mapfile.tests f +tests/mapfile1.sub f +tests/mapfile2.sub f +tests/more-exp.tests f +tests/more-exp.right f +tests/nameref.tests f +tests/nameref1.sub f +tests/nameref2.sub f +tests/nameref3.sub f +tests/nameref4.sub f +tests/nameref5.sub f +tests/nameref6.sub f +tests/nameref7.sub f +tests/nameref8.sub f +tests/nameref9.sub f +tests/nameref10.sub f +tests/nameref11.sub f +tests/nameref12.sub f +tests/nameref13.sub f +tests/nameref14.sub f +tests/nameref15.sub f +tests/nameref16.sub f +tests/nameref17.sub f +tests/nameref18.sub f +tests/nameref19.sub f +tests/nameref20.sub f +tests/nameref21.sub f +tests/nameref.right f +tests/new-exp.tests f +tests/new-exp1.sub f +tests/new-exp2.sub f +tests/new-exp3.sub f +tests/new-exp4.sub f +tests/new-exp5.sub f +tests/new-exp6.sub f +tests/new-exp7.sub f +tests/new-exp8.sub f +tests/new-exp9.sub f +tests/new-exp10.sub f +tests/new-exp11.sub f +tests/new-exp12.sub f +tests/new-exp13.sub f +tests/new-exp14.sub f +tests/new-exp15.sub f +tests/new-exp.right f +tests/nquote.tests f +tests/nquote.right f +tests/nquote1.sub f +tests/nquote2.sub f +tests/nquote3.sub f +tests/nquote1.tests f +tests/nquote1.right f +tests/nquote2.tests f +tests/nquote2.right f +tests/nquote3.tests f +tests/nquote3.right f +tests/nquote4.tests f +tests/nquote4.right f +tests/nquote5.tests f +tests/nquote5.right f +tests/parser.tests f +tests/parser.right f +tests/parser1.sub f +tests/posix2.tests f +tests/posix2.right f +tests/posix2syntax.sub f +tests/posixexp.tests f +tests/posixexp.right f +tests/posixexp1.sub f +tests/posixexp2.sub f +tests/posixexp3.sub f +tests/posixexp4.sub f +tests/posixexp5.sub f +tests/posixexp6.sub f +tests/posixexp7.sub f +tests/posixexp8.sub f +tests/posixexp2.tests f +tests/posixexp2.right f +tests/posixpat.tests f +tests/posixpat.right f +tests/posixpipe.tests f +tests/posixpipe.right f +tests/prec.right f +tests/precedence.tests f +tests/printf.tests f +tests/printf.right f +tests/printf1.sub f +tests/printf2.sub f +tests/printf3.sub f +tests/printf4.sub f +tests/procsub.tests f +tests/procsub.right f +tests/procsub1.sub f +tests/procsub2.sub f +tests/quote.tests f +tests/quote.right f +tests/quote1.sub f +tests/quote2.sub f +tests/quote3.sub f +tests/quote4.sub f +tests/read.tests f +tests/read.right f +tests/read1.sub f +tests/read2.sub f +tests/read3.sub f +tests/read4.sub f +tests/read5.sub f +tests/read6.sub f +tests/redir.tests f +tests/redir.right f +tests/redir1.sub f +tests/redir2.sub f +tests/redir3.sub f +tests/redir3.in1 f +tests/redir3.in2 f +tests/redir4.sub f +tests/redir4.in1 f +tests/redir5.sub f +tests/redir6.sub f +tests/redir7.sub f +tests/redir8.sub f +tests/redir9.sub f +tests/redir10.sub f +tests/redir11.sub f +tests/rhs-exp.tests f +tests/rhs-exp.right f +tests/rhs-exp1.sub f +tests/rsh.tests f +tests/rsh.right f +tests/rsh1.sub f +tests/rsh2.sub f +tests/run-all f +tests/run-minimal f +tests/run-alias f +tests/run-appendop f +tests/run-arith-for f +tests/run-arith f +tests/run-array f +tests/run-array2 f +tests/run-assoc f +tests/run-attr f +tests/run-braces f +tests/run-builtins f +tests/run-case f +tests/run-casemod f +tests/run-complete f +tests/run-comsub f +tests/run-comsub-eof f +tests/run-comsub-posix f +tests/run-cond f +tests/run-coproc f +tests/run-cprint f +tests/run-dbg-support f +tests/run-dbg-support2 f +tests/run-dirstack f +tests/run-dollars f +tests/run-dynvar f +tests/run-errors f +tests/run-execscript f +tests/run-exp-tests f +tests/run-exportfunc f +tests/run-extglob f +tests/run-extglob2 f +tests/run-extglob3 f +tests/run-func f +tests/run-getopts f +tests/run-glob-test f +tests/run-globstar f +tests/run-heredoc f +tests/run-herestr f +tests/run-histexpand f +tests/run-history f +tests/run-ifs f +tests/run-ifs-posix f +tests/run-input-test f +tests/run-intl f +tests/run-iquote f +tests/run-invert f +tests/run-jobs f +tests/run-lastpipe f +tests/run-mapfile f +tests/run-more-exp f +tests/run-nameref f +tests/run-new-exp f +tests/run-nquote f +tests/run-nquote1 f +tests/run-nquote2 f +tests/run-nquote3 f +tests/run-nquote4 f +tests/run-nquote5 f +tests/run-parser f +tests/run-posix2 f +tests/run-posixexp f +tests/run-posixexp2 f +tests/run-posixpat f +tests/run-posixpipe f +tests/run-precedence f +tests/run-printf f +tests/run-procsub f +tests/run-quote f +tests/run-read f +tests/run-redir f +tests/run-rhs-exp f +tests/run-rsh f +tests/run-set-e f +tests/run-set-x f +tests/run-shopt f +tests/run-strip f +tests/run-test f +tests/run-tilde f +tests/run-tilde2 f +tests/run-trap f +tests/run-type f +tests/run-varenv f +tests/run-vredir f +tests/set-e.tests f +tests/set-e1.sub f +tests/set-e2.sub f +tests/set-e3.sub f +tests/set-e3a.sub f +tests/set-e.right f +tests/set-x.tests f +tests/set-x1.sub f +tests/set-x.right f +tests/shopt.tests f +tests/shopt1.sub f +tests/shopt.right f +tests/strip.tests f +tests/strip.right f +tests/test.tests f +tests/test1.sub f +tests/test.right f +tests/tilde.tests f +tests/tilde.right f +tests/tilde2.tests f +tests/tilde2.right f +tests/trap.tests f +tests/trap.right f +tests/trap1.sub f 755 +tests/trap2.sub f 755 +tests/trap2a.sub f 755 +tests/trap3.sub f +tests/trap4.sub f +tests/trap5.sub f +tests/trap6.sub f +tests/type.tests f +tests/type.right f +tests/type1.sub f +tests/type2.sub f +tests/type3.sub f +tests/type4.sub f +tests/unicode1.sub f +tests/unicode2.sub f +tests/unicode3.sub f +tests/varenv.right f +tests/varenv.tests f +tests/varenv1.sub f +tests/varenv2.sub f +tests/varenv3.sub f +tests/varenv4.sub f +tests/varenv5.sub f +tests/varenv6.sub f +tests/varenv7.sub f +tests/varenv8.sub f +tests/varenv9.sub f +tests/varenv10.sub f +tests/varenv11.sub f +tests/varenv12.sub f +tests/varenv13.sub f +tests/varenv14.sub f +tests/varenv15.sub f +tests/varenv15.in f +tests/varenv16.sub f +tests/varenv17.sub f +tests/varenv18.sub f +tests/varenv19.sub f +tests/varenv20.sub f +tests/varenv21.sub f +tests/version f +tests/version.mini f +tests/vredir.tests f +tests/vredir.right f +tests/vredir1.sub f +tests/vredir2.sub f +tests/vredir3.sub f +tests/vredir4.sub f +tests/vredir5.sub f +tests/vredir6.sub f +tests/vredir7.sub f +tests/misc/dev-tcp.tests f +tests/misc/perf-script f +tests/misc/perftest f +tests/misc/read-nchars.tests f +tests/misc/redir-t2.sh f +tests/misc/run-r2.sh f +tests/misc/sigint-1.sh f +tests/misc/sigint-2.sh f +tests/misc/sigint-3.sh f +tests/misc/sigint-4.sh f +tests/misc/test-minus-e.1 f +tests/misc/test-minus-e.2 f +tests/misc/wait-bg.tests f +#examples/scripts.v2/PERMISSION f +#examples/scripts.v2/README f +#examples/scripts.v2/arc2tarz f +#examples/scripts.v2/bashrand f +#examples/scripts.v2/cal2day.bash f +#examples/scripts.v2/cdhist.bash f +#examples/scripts.v2/corename f +#examples/scripts.v2/fman f +#examples/scripts.v2/frcp f +#examples/scripts.v2/lowercase f +#examples/scripts.v2/ncp f +#examples/scripts.v2/newext f +#examples/scripts.v2/nmv f +#examples/scripts.v2/pages f +#examples/scripts.v2/pf f +#examples/scripts.v2/ren f +#examples/scripts.v2/rename f +#examples/scripts.v2/repeat f +#examples/scripts.v2/untar f +#examples/scripts.v2/uudec f +#examples/scripts.v2/uuenc f +#examples/scripts.v2/vtree f +#examples/scripts.v2/where f +#examples/scripts.v2/pmtop f +#examples/scripts.v2/shprof f +#examples/scripts.noah/PERMISSION f +#examples/scripts.noah/README f +#examples/scripts.noah/aref.bash f +#examples/scripts.noah/bash.sub.bash f +#examples/scripts.noah/bash_version.bash f +#examples/scripts.noah/meta.bash f +#examples/scripts.noah/mktmp.bash f +#examples/scripts.noah/number.bash f +#examples/scripts.noah/prompt.bash f +#examples/scripts.noah/remap_keys.bash f +#examples/scripts.noah/require.bash f +#examples/scripts.noah/send_mail.bash f +#examples/scripts.noah/shcat.bash f +#examples/scripts.noah/source.bash f +#examples/scripts.noah/string.bash f +#examples/scripts.noah/stty.bash f +#examples/scripts.noah/y_or_n_p.bash f diff --git a/bash-5.1/Makefile.in b/bash-5.1/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..3d5119a07e9b5f44c74e9837c994ebfe89062f96 --- /dev/null +++ b/bash-5.1/Makefile.in @@ -0,0 +1,1742 @@ +# Makefile for bash-5.0, version 4.30 +# +# Copyright (C) 1996-2018 Free Software Foundation, Inc. + +# 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 . + +# Make sure the first target in the makefile is the right one +all: .made + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_VERSION = @PACKAGE_VERSION@ + +PACKAGE_TARNAME = @PACKAGE_TARNAME@ + +# Include some boilerplate Gnu makefile definitions. +prefix = @prefix@ + +exec_prefix = @exec_prefix@ + +datarootdir = @datarootdir@ + +bindir = @bindir@ +libdir = @libdir@ +infodir = @infodir@ +includedir = @includedir@ +datadir = @datadir@ +localedir = @localedir@ +pkgconfigdir = ${libdir}/pkgconfig + +loadablesdir = @loadablesdir@ +headersdir = @headersdir@ + +docdir = @docdir@ + +mandir = @mandir@ +manpfx = man + +man1ext = .1 +man1dir = $(mandir)/$(manpfx)1 +man3ext = .3 +man3dir = $(mandir)/$(manpfx)3 + +htmldir = @htmldir@ + +# Support an alternate destination root directory for package building +DESTDIR = + +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ +top_builddir = @BUILD_DIR@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +@SET_MAKE@ +CC = @CC@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +YACC = @YACC@ +SHELL = @MAKE_SHELL@ +CP = cp +RM = rm -f +AR = @AR@ +ARFLAGS = @ARFLAGS@ +RANLIB = @RANLIB@ +SIZE = @SIZE@ +STRIP = strip + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALLMODE= -m 0755 +INSTALLMODE2 = -m 0555 + +TESTSCRIPT = @TESTSCRIPT@ + +DEBUGGER_START_FILE = @DEBUGGER_START_FILE@ + +#If you have purify, and want to use it, run the make as `make PURIFY=purify' +#PURIFY = @PURIFY@ + +# Here is a rule for making .o files from .c files that does not +# force the type of the machine (like -M_MACHINE) into the flags. +.c.o: + $(RM) $@ + $(CC) $(CCFLAGS) -c $< + +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ + +# The name of this program and some version information. +VERSPROG = bashversion$(EXEEXT) +VERSOBJ = bashversion.$(OBJEXT) + +Program = bash$(EXEEXT) +Version = @BASHVERS@ +PatchLevel = `$(BUILD_DIR)/$(VERSPROG) -p` +RELSTATUS = @RELSTATUS@ + +Machine = @host_cpu@ +OS = @host_os@ +VENDOR = @host_vendor@ +MACHTYPE = @host@ + +# comment out for release +DEBUG = @DEBUG@ +MALLOC_DEBUG = @MALLOC_DEBUG@ + +THIS_SH = $(BUILD_DIR)/$(Program) + +# PROFILE_FLAGS is either -pg, to generate profiling info for use +# with gprof, or nothing (the default). +PROFILE_FLAGS= @PROFILE_FLAGS@ + +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} ${MALLOC_DEBUG} +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +LOCALE_DEFS = -DLOCALEDIR='"$(localedir)"' -DPACKAGE='"$(PACKAGE)"' + +LOCAL_LIBS = @LOCAL_LIBS@ +LIBS = $(BUILTINS_LIB) $(LIBRARIES) @LIBS@ +LIBS_FOR_BUILD = + +STATIC_LD = @STATIC_LD@ +LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ + +SYSTEM_FLAGS = -DPROGRAM='"$(Program)"' -DCONF_HOSTTYPE='"$(Machine)"' -DCONF_OSTYPE='"$(OS)"' -DCONF_MACHTYPE='"$(MACHTYPE)"' -DCONF_VENDOR='"$(VENDOR)"' $(LOCALE_DEFS) + +BASE_CCFLAGS = $(SYSTEM_FLAGS) $(LOCAL_DEFS) \ + $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) + +CCFLAGS = $(ADDON_CFLAGS) $(BASE_CCFLAGS) ${PROFILE_FLAGS} $(CPPFLAGS) $(CFLAGS) + +CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) + +BASE_LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) +LDFLAGS = ${ADDON_LDFLAGS} ${BASE_LDFLAGS} ${PROFILE_FLAGS} ${STATIC_LD} +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) + +ASAN_XCFLAGS = -fsanitize=address -fno-omit-frame-pointer +ASAN_XLDFLAGS = -fsanitize=address + +GCOV_XCFLAGS = -fprofile-arcs -ftest-coverage +GCOV_XLDFLAGS = -fprofile-arcs -ftest-coverage + +INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC) + +# Maybe add: -Wextra +GCC_LINT_FLAGS = -O -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wno-parentheses \ + -Wcast-align -Wstrict-prototypes -Wconversion -Wformat \ + -Wformat-nonliteral -Wmissing-braces -Wuninitialized \ + -Wmissing-declarations -Winline \ + -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic + +GCC_LINT_CFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(GCC_LINT_FLAGS) + +# +# Support libraries +# + +dot = . + +LIBSUBDIR = lib +LIBSRC = $(srcdir)/$(LIBSUBDIR) + +LIBBUILD = ${BUILD_DIR}/${LIBSUBDIR} + +SUBDIR_INCLUDES = -I. @RL_INCLUDE@ -I$(topdir) -I$(topdir)/$(LIBSUBDIR) + +BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ + +# the bash library +# the library is a mix of functions that the C library does not provide on +# some platforms and general shell utility functions +SH_LIBSRC = $(LIBSRC)/sh +SH_LIBDIR = $(dot)/${LIBSUBDIR}/sh +SH_ABSSRC = ${topdir}/${SH_LIBSRC} + +SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \ + ${SH_LIBSRC}/getenv.c ${SH_LIBSRC}/oslib.c \ + ${SH_LIBSRC}/setlinebuf.c ${SH_LIBSRC}/strchrnul.c \ + ${SH_LIBSRC}/strcasecmp.c ${SH_LIBSRC}/strdup.c \ + ${SH_LIBSRC}/strerror.c \ + ${SH_LIBSRC}/strtod.c ${SH_LIBSRC}/strtol.c \ + ${SH_LIBSRC}/strtoul.c ${SH_LIBSRC}/vprint.c \ + ${SH_LIBSRC}/itos.c ${SH_LIBSRC}/rename.c \ + ${SH_LIBSRC}/zread.c ${SH_LIBSRC}/zwrite.c \ + ${SH_LIBSRC}/shtty.c ${SH_LIBSRC}/inet_aton.c \ + ${SH_LIBSRC}/netopen.c ${SH_LIBSRC}/strpbrk.c \ + ${SH_LIBSRC}/timeval.c ${SH_LIBSRC}/clock.c \ + ${SH_LIBSRC}/makepath.c ${SH_LIBSRC}/pathcanon.c \ + ${SH_LIBSRC}/pathphys.c ${SH_LIBSRC}/stringlist.c \ + ${SH_LIBSRC}/stringvec.c ${SH_LIBSRC}/tmpfile.c \ + ${SH_LIBSRC}/spell.c ${SH_LIBSRC}/strtrans.c \ + ${SH_LIBSRC}/strcasestr.c ${SH_LIBSRC}/shquote.c \ + ${SH_LIBSRC}/snprintf.c ${SH_LIBSRC}/mailstat.c \ + ${SH_LIBSRC}/fmtulong.c ${SH_LIBSRC}/fmtullong.c \ + ${SH_LIBSRC}/strtoll.c ${SH_LIBSRC}/strtoull.c \ + ${SH_LIBSRC}/strtoimax.c ${SH_LIBSRC}/strtoumax.c \ + ${SH_LIBSRC}/fmtumax.c ${SH_LIBSRC}/netconn.c \ + ${SH_LIBSRC}/mktime.c ${SH_LIBSRC}/strftime.c \ + ${SH_LIBSRC}/memset.c ${SH_LIBSRC}/mbschr.c \ + ${SH_LIBSRC}/zcatfd.c ${SH_LIBSRC}/shmatch.c \ + ${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c \ + ${SH_LIBSRC}/eaccess.c ${SH_LIBSRC}/wcsdup.c \ + ${SH_LIBSRC}/zmapfd.c ${SH_LIBSRC}/fpurge.c \ + ${SH_LIBSRC}/zgetline.c ${SH_LIBSRC}/mbscmp.c \ + ${SH_LIBSRC}/casemod.c ${SH_LIBSRC}/uconvert.c \ + ${SH_LIBSRC}/ufuncs.c ${SH_LIBSRC}/dprintf.c \ + ${SH_LIBSRC}/input_avail.c ${SH_LIBSRC}/mbscasecmp.c \ + ${SH_LIBSRC}/fnxform.c ${SH_LIBSRC}/unicode.c \ + ${SH_LIBSRC}/wcswidth.c ${SH_LIBSRC}/wcsnwidth.c \ + ${SH_LIBSRC}/shmbchar.c ${SH_LIBSRC}/utf8.c \ + ${SH_LIBSRC}/random.c ${SH_LIBSRC}/gettimeofday.c + +SHLIB_LIB = -lsh +SHLIB_LIBNAME = libsh.a +SHLIB_LIBRARY = ${SH_LIBDIR}/${SHLIB_LIBNAME} +SHLIB_LDFLAGS = -L${SH_LIBDIR} +SHLIB_DEP = ${SHLIB_LIBRARY} + +# we assume for now that readline source is being shipped with bash +RL_LIBSRC = $(LIBSRC)/readline +RL_LIBDOC = $(RL_LIBSRC)/doc +RL_LIBDIR = @RL_LIBDIR@ +RL_ABSSRC = ${topdir}/$(RL_LIBDIR) + +RL_INCLUDEDIR = @RL_INCLUDEDIR@ + +READLINE_LIB = @READLINE_LIB@ +READLINE_LIBRARY = $(RL_LIBDIR)/libreadline.a +READLINE_LDFLAGS = -L${RL_LIBDIR} +READLINE_DEP = @READLINE_DEP@ + +# The source, object and documentation of the GNU Readline library. +READLINE_SOURCE = $(RL_LIBSRC)/rldefs.h $(RL_LIBSRC)/rlconf.h \ + $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/tcap.h \ + $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/keymaps.h \ + $(RL_LIBSRC)/history.h $(RL_LIBSRC)/histlib.h \ + $(RL_LIBSRC)/posixstat.h $(RL_LIBSRC)/tilde.h \ + $(RL_LIBSRC)/rlstdc.h ${RL_LIBSRC}/xmalloc.h \ + $(RL_LIBSRC)/rlshell.h ${RL_LIBSRC}/rlprivate.h \ + $(RL_LIBSRC)/colors.h $(RL_LIBSRC)/parse-colors.h \ + $(RL_LIBSRC)/funmap.c $(RL_LIBSRC)/emacs_keymap.c \ + $(RL_LIBSRC)/search.c $(RL_LIBSRC)/vi_keymap.c \ + $(RL_LIBSRC)/keymaps.c $(RL_LIBSRC)/parens.c \ + $(RL_LIBSRC)/vi_mode.c $(RL_LIBSRC)/callback.c \ + $(RL_LIBSRC)/readline.c $(RL_LIBSRC)/tilde.c \ + $(RL_LIBSRC)/rltty.c $(RL_LIBSRC)/complete.c \ + $(RL_LIBSRC)/bind.c $(RL_LIBSRC)/isearch.c \ + $(RL_LIBSRC)/display.c $(RL_LIBSRC)/signals.c \ + $(RL_LIBSRC)/util.c $(RL_LIBSRC)/kill.c $(RL_LIBSRC)/text.c \ + $(RL_LIBSRC)/undo.c $(RL_LIBSRC)/macro.c \ + $(RL_LIBSRC)/terminal.c $(RL_LIBSRC)/nls.c \ + $(RL_LIBSRC)/input.c $(RL_LIBSRC)/xmalloc.c \ + $(RL_LIBSRC)/shell.c $(RL_LIBSRC)/savestring.c \ + $(RL_LIBSRC)/colors.c $(RL_LIBSRC)/parse-colors.c \ + $(RL_LIBSRC)/misc.c $(RL_LIBSRC)/mbutil.c $(RL_LIBSRC)/compat.c \ + $(RL_LIBSRC)/histexpand.c $(RL_LIBSRC)/history.c \ + $(RL_LIBSRC)/histsearch.c $(RL_LIBSRC)/histfile.c + +READLINE_OBJ = $(RL_LIBDIR)/readline.o $(RL_LIBDIR)/funmap.o \ + $(RL_LIBDIR)/parens.o $(RL_LIBDIR)/search.o \ + $(RL_LIBDIR)/keymaps.o $(RL_LIBDIR)/xmalloc.o \ + $(RL_LIBDIR)/rltty.o $(RL_LIBDIR)/complete.o \ + $(RL_LIBDIR)/bind.o $(RL_LIBDIR)/isearch.o \ + $(RL_LIBDIR)/display.o $(RL_LIBDIR)/signals.o \ + $(RL_LIBDIR)/tilde.o $(RL_LIBDIR)/util.o \ + $(RL_LIBDIR)/kill.o $(RL_LIBDIR)/undo.o $(RL_LIBDIR)/nls.o \ + $(RL_LIBDIR)/macro.o $(RL_LIBDIR)/input.o \ + $(RL_LIBDIR)/terminal.o $(RL_LIBDIR)/callback.o \ + $(RL_LIBDIR)/shell.o $(RL_LIBDIR)/savestring.o \ + $(RL_LIBDIR)/mbutil.o $(RL_LIBDIR)/compat.o \ + $(RL_LIBDIR)/history.o $(RL_LIBDIR)/histexpand.o \ + $(RL_LIBDIR)/histsearch.o $(RL_LIBDIR)/histfile.o \ + $(RL_LIBDIR)/colors.o $(RL_LIBDIR)/parse-colors.o + +HIST_LIBSRC = $(LIBSRC)/readline +HIST_LIBDIR = @HIST_LIBDIR@ +HIST_ABSSRC = ${topdir}/$(HIST_LIBDIR) + +HISTORY_LIB = @HISTORY_LIB@ +HISTORY_LIBRARY = $(HIST_LIBDIR)/libhistory.a +HISTORY_LDFLAGS = -L$(HIST_LIBDIR) +HISTORY_DEP = @HISTORY_DEP@ + +# The source, object and documentation of the history library. +HISTORY_SOURCE = $(HIST_LIBSRC)/history.c $(HIST_LIBSRC)/histexpand.c \ + $(HIST_LIBSRC)/histsearch.c $(HIST_LIBSRC)/histfile.c \ + $(HIST_LIBSRC)/shell.c \ + $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/histlib.h +HISTORY_OBJ = $(HIST_LIBDIR)/history.o $(HIST_LIBDIR)/histexpand.o \ + $(HIST_LIBDIR)/histsearch.o $(HIST_LIBDIR)/histfile.o \ + $(HIST_LIBDIR)/shell.o + +# You only need termcap (or curses) if you are linking with GNU Readline. +TERM_LIBSRC = $(LIBSRC)/termcap +TERM_LIBDIR = $(dot)/$(LIBSUBDIR)/termcap +TERM_ABSSRC = ${topdir}/$(TERM_LIBDIR) + +TERMCAP_LIB = @TERMCAP_LIB@ +TERMCAP_LIBRARY = $(TERM_LIBDIR)/libtermcap.a +TERMCAP_LDFLAGS = -L$(TERM_LIBDIR) +TERMCAP_DEP = @TERMCAP_DEP@ + +TERMCAP_SOURCE = $(TERM_LIBSRC)/termcap.c $(TERM_LIBSRC)/tparam.c +TERMCAP_OBJ = $(TERM_LIBDIR)/termcap.o $(TERM_LIBDIR)/tparam.o + +GLOB_LIBSRC = $(LIBSRC)/glob +GLOB_LIBDIR = $(dot)/$(LIBSUBDIR)/glob +GLOB_ABSSRC = ${topdir}/$(GLOB_LIBDIR) + +GLOB_LIB = -lglob +GLOB_LIBRARY = $(GLOB_LIBDIR)/libglob.a +GLOB_LDFLAGS = -L$(GLOB_LIBDIR) +GLOB_DEP = $(GLOB_LIBRARY) + +GLOB_SOURCE = $(GLOB_LIBSRC)/glob.c $(GLOB_LIBSRC)/strmatch.c \ + $(GLOB_LIBSRC)/smatch.c $(GLOB_LIBSRC)/xmbsrtowcs.c \ + $(GLOB_LIBSRC)/glob_loop.c $(GLOB_LIBSRC)/sm_loop.c \ + $(GLOB_LIBSRC)/gmisc.c \ + $(GLOB_LIBSRC)/glob.h $(GLOB_LIBSRC)/strmatch.h +GLOB_OBJ = $(GLOB_LIBDIR)/glob.o $(GLOB_LIBDIR)/strmatch.o \ + $(GLOB_LIBDIR)/smatch.o $(GLOB_LIBDIR)/xmbsrtowcs.o \ + $(GLOB_LIBDIR)/gmisc.o + +# The source, object and documentation for the GNU Tilde library. +TILDE_LIBSRC = $(LIBSRC)/tilde +TILDE_LIBDIR = $(dot)/$(LIBSUBDIR)/tilde +TILDE_ABSSRC = ${topdir}/$(TILDE_LIBDIR) + +TILDE_LIB = @TILDE_LIB@ +TILDE_LIBRARY = $(TILDE_LIBDIR)/libtilde.a +TILDE_LDFLAGS = -L$(TILDE_LIBDIR) +TILDE_DEP = $(TILDE_LIBRARY) + +TILDE_SOURCE = $(TILDE_LIBSRC)/tilde.c $(TILDE_LIBSRC)/tilde.h +TILDE_OBJ = $(TILDE_LIBDIR)/tilde.o + +# libintl +INTL_LIBSRC = $(LIBSRC)/intl +INTL_LIBDIR = $(dot)/$(LIBSUBDIR)/intl +INTL_ABSSRC = ${topdir}/$(INTL_LIB) +INTL_BUILDDIR = ${LIBBUILD}/intl + +INTL_LIB = @LIBINTL@ +INTL_LIBRARY = $(INTL_LIBDIR)/libintl.a +INTL_DEP = @INTL_DEP@ +INTL_INC = @INTL_INC@ + +LIBINTL_H = @LIBINTL_H@ + +# libiconv +LIBICONV = @LIBICONV@ + +# tests +LIBINTL = @LIBINTL@ +LTLIBINTL = @LTLIBINTL@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ + +# Our malloc. +MALLOC_TARGET = @MALLOC_TARGET@ + +# set to alloca.o if we are using the C alloca in lib/malloc +ALLOCA = @ALLOCA@ + +ALLOC_LIBSRC = $(LIBSRC)/malloc +ALLOC_LIBDIR = $(dot)/$(LIBSUBDIR)/malloc +ALLOC_ABSSRC = ${topdir}/$(ALLOC_LIBDIR) + +MALLOC_SRC = @MALLOC_SRC@ +MALLOC_OTHERSRC = ${ALLOC_LIBSRC}/trace.c ${ALLOC_LIBSRC}/stats.c \ + ${ALLOC_LIBSRC}/table.c ${ALLOC_LIBSRC}/watch.c +MALLOC_SOURCE = ${ALLOC_LIBSRC}/${MALLOC_SRC} ${MALLOC_OTHERSRC} +MALLOC_CFLAGS = -DRCHECK -Dbotch=programming_error ${MALLOC_DEBUG} + +MALLOC_LIB = @MALLOC_LIB@ +MALLOC_LIBRARY = @MALLOC_LIBRARY@ +MALLOC_LDFLAGS = @MALLOC_LDFLAGS@ +MALLOC_DEP = @MALLOC_DEP@ + +ALLOC_HEADERS = $(ALLOC_LIBSRC)/getpagesize.h $(ALLOC_LIBSRC)/shmalloc.h \ + $(ALLOC_LIBSRC)/imalloc.h $(ALLOC_LIBSRC)/mstats.h \ + $(ALLOC_LIBSRC)/table.h $(ALLOC_LIBSRC)/watch.h + +$(MALLOC_LIBRARY): ${MALLOC_SOURCE} ${ALLOC_HEADERS} config.h + @(cd $(ALLOC_LIBDIR) && \ + $(MAKE) $(MFLAGS) \ + MALLOC_CFLAGS="$(MALLOC_CFLAGS)" ${MALLOC_TARGET} ) || exit 1 + +BASHINCDIR = ${srcdir}/include +BASHINCFILES = $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/ansi_stdlib.h \ + $(BASHINCDIR)/filecntl.h $(BASHINCDIR)/posixdir.h \ + $(BASHINCDIR)/memalloc.h $(BASHINCDIR)/stdc.h \ + $(BASHINCDIR)/posixjmp.h $(BASHINCDIR)/posixwait.h \ + $(BASHINCDIR)/posixtime.h $(BASHINCDIR)/systimes.h \ + $(BASHINCDIR)/unionwait.h $(BASHINCDIR)/maxpath.h \ + $(BASHINCDIR)/shtty.h $(BASHINCDIR)/typemax.h \ + $(BASHINCDIR)/ocache.h + +LIBRARIES = $(GLOB_LIB) $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) \ + $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LIBICONV) $(LOCAL_LIBS) + +LIBDEP = $(GLOB_DEP) $(SHLIB_DEP) $(INTL_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) \ + $(TILDE_DEP) $(MALLOC_DEP) + +LIBRARY_LDFLAGS = $(READLINE_LDFLAGS) $(HISTORY_LDFLAGS) $(GLOB_LDFLAGS) \ + $(TILDE_LDFLAGS) $(MALLOC_LDFLAGS) $(SHLIB_LDFLAGS) + +# +# The shell itself +# + +# The main source code for the Bourne Again SHell. +CSOURCES = shell.c eval.c parse.y general.c make_cmd.c print_cmd.c y.tab.c \ + dispose_cmd.c execute_cmd.c variables.c $(GLOBC) version.c \ + expr.c copy_cmd.c flags.c subst.c hashcmd.c hashlib.c mailcheck.c \ + test.c trap.c alias.c jobs.c nojobs.c $(ALLOC_FILES) braces.c \ + input.c bashhist.c array.c arrayfunc.c assoc.c sig.c pathexp.c \ + unwind_prot.c siglist.c bashline.c bracecomp.c error.c \ + list.c stringlib.c locale.c findcmd.c redir.c \ + pcomplete.c pcomplib.c syntax.c xmalloc.c + +HSOURCES = shell.h flags.h trap.h hashcmd.h hashlib.h jobs.h builtins.h \ + general.h variables.h config.h $(ALLOC_HEADERS) alias.h \ + quit.h unwind_prot.h syntax.h ${GRAM_H} \ + command.h input.h error.h bashansi.h dispose_cmd.h make_cmd.h \ + subst.h externs.h siglist.h bashhist.h bashline.h bashtypes.h \ + array.h arrayfunc.h sig.h mailcheck.h bashintl.h bashjmp.h \ + execute_cmd.h parser.h pathexp.h pathnames.h pcomplete.h assoc.h \ + $(BASHINCFILES) + +SOURCES = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS) + +# headers in top-level source directory that get installed by install-headers +INSTALLED_HEADERS = shell.h bashjmp.h command.h syntax.h general.h error.h \ + variables.h array.h assoc.h arrayfunc.h quit.h dispose_cmd.h \ + make_cmd.h subst.h sig.h externs.h builtins.h \ + bashtypes.h xmalloc.h config-top.h config-bot.h \ + bashintl.h bashansi.h bashjmp.h alias.h hashlib.h \ + conftypes.h unwind_prot.h jobs.h siglist.h +INSTALLED_BUILTINS_HEADERS = bashgetopt.h common.h getopt.h +INSTALLED_INCFILES = posixstat.h ansi_stdlib.h filecntl.h posixdir.h \ + memalloc.h stdc.h posixjmp.h posixwait.h posixtime.h systimes.h \ + unionwait.h maxpath.h shtty.h typemax.h ocache.h chartypes.h gettext.h \ + posixstat.h shmbchar.h shmbutil.h stat-time.h + +# header files chosen based on running of configure +SIGNAMES_H = @SIGNAMES_H@ + +# object files chosen based on running of configure +JOBS_O = @JOBS_O@ +SIGLIST_O = @SIGLIST_O@ +SIGNAMES_O = @SIGNAMES_O@ + +# Matching object files. +OBJECTS = shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \ + dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o \ + expr.o flags.o $(JOBS_O) subst.o hashcmd.o hashlib.o mailcheck.o \ + trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o \ + alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o \ + bashline.o $(SIGLIST_O) list.o stringlib.o locale.o findcmd.o redir.o \ + pcomplete.o pcomplib.o syntax.o xmalloc.o $(SIGNAMES_O) + +# Where the source code of the shell builtins resides. +BUILTIN_SRCDIR=$(srcdir)/builtins +DEFSRC=$(BUILTIN_SRCDIR) +BUILTIN_ABSSRC=${topdir}/builtins +DEFDIR = $(dot)/builtins +DEBUGGER_DIR = $(dot)/debugger + +BUILTIN_DEFS = $(DEFSRC)/alias.def $(DEFSRC)/bind.def $(DEFSRC)/break.def \ + $(DEFSRC)/builtin.def $(DEFSRC)/cd.def $(DEFSRC)/colon.def \ + $(DEFSRC)/command.def ${DEFSRC}/complete.def \ + $(DEFSRC)/caller.def $(DEFSRC)/declare.def \ + $(DEFSRC)/echo.def $(DEFSRC)/enable.def $(DEFSRC)/eval.def \ + $(DEFSRC)/exec.def $(DEFSRC)/exit.def $(DEFSRC)/fc.def \ + $(DEFSRC)/fg_bg.def $(DEFSRC)/hash.def $(DEFSRC)/help.def \ + $(DEFSRC)/history.def $(DEFSRC)/jobs.def $(DEFSRC)/kill.def \ + $(DEFSRC)/let.def $(DEFSRC)/read.def $(DEFSRC)/return.def \ + $(DEFSRC)/set.def $(DEFSRC)/setattr.def $(DEFSRC)/shift.def \ + $(DEFSRC)/source.def $(DEFSRC)/suspend.def $(DEFSRC)/test.def \ + $(DEFSRC)/times.def $(DEFSRC)/trap.def $(DEFSRC)/type.def \ + $(DEFSRC)/ulimit.def $(DEFSRC)/umask.def $(DEFSRC)/wait.def \ + $(DEFSRC)/getopts.def $(DEFSRC)/reserved.def \ + $(DEFSRC)/pushd.def $(DEFSRC)/shopt.def $(DEFSRC)/printf.def \ + $(DEFSRC)/mapfile.def +BUILTIN_C_SRC = $(DEFSRC)/mkbuiltins.c $(DEFSRC)/common.c \ + $(DEFSRC)/evalstring.c $(DEFSRC)/evalfile.c \ + $(DEFSRC)/bashgetopt.c $(GETOPT_SOURCE) +BUILTIN_C_OBJ = $(DEFDIR)/common.o $(DEFDIR)/evalstring.o \ + $(DEFDIR)/evalfile.o $(DEFDIR)/bashgetopt.o +BUILTIN_OBJS = $(DEFDIR)/alias.o $(DEFDIR)/bind.o $(DEFDIR)/break.o \ + $(DEFDIR)/builtin.o $(DEFDIR)/cd.o $(DEFDIR)/colon.o \ + $(DEFDIR)/command.o $(DEFDIR)/caller.o $(DEFDIR)/declare.o \ + $(DEFDIR)/echo.o $(DEFDIR)/enable.o $(DEFDIR)/eval.o \ + $(DEFDIR)/exec.o $(DEFDIR)/exit.o $(DEFDIR)/fc.o \ + $(DEFDIR)/fg_bg.o $(DEFDIR)/hash.o $(DEFDIR)/help.o \ + $(DEFDIR)/history.o $(DEFDIR)/jobs.o $(DEFDIR)/kill.o \ + $(DEFDIR)/let.o $(DEFDIR)/pushd.o $(DEFDIR)/read.o \ + $(DEFDIR)/return.o $(DEFDIR)/shopt.o $(DEFDIR)/printf.o \ + $(DEFDIR)/set.o $(DEFDIR)/setattr.o $(DEFDIR)/shift.o \ + $(DEFDIR)/source.o $(DEFDIR)/suspend.o $(DEFDIR)/test.o \ + $(DEFDIR)/times.o $(DEFDIR)/trap.o $(DEFDIR)/type.o \ + $(DEFDIR)/ulimit.o $(DEFDIR)/umask.o $(DEFDIR)/wait.o \ + $(DEFDIR)/getopts.o $(DEFDIR)/mapfile.o $(BUILTIN_C_OBJ) +GETOPT_SOURCE = $(DEFSRC)/getopt.c $(DEFSRC)/getopt.h +PSIZE_SOURCE = $(DEFSRC)/psize.sh $(DEFSRC)/psize.c + +BUILTINS_LIBRARY = $(DEFDIR)/libbuiltins.a +BUILTINS_LIB = -lbuiltins +BUILTINS_LDFLAGS = -L$(DEFDIR) +BUILTINS_DEP = $(BUILTINS_LIBRARY) + +# Documentation for the shell. +DOCSRC = $(srcdir)/doc +DOCDIR = $(dot)/doc + +# Translations and other i18n support files +PO_SRC = $(srcdir)/po/ +PO_DIR = $(dot)/po/ + +SIGNAMES_SUPPORT = $(SUPPORT_SRC)mksignames.c + +SUPPORT_SRC = $(srcdir)/support/ +SDIR = $(dot)/support + +TESTS_SUPPORT = recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) xcase$(EXEEXT) +CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \ + tests/recho$(EXEEXT) tests/zecho$(EXEEXT) \ + tests/printenv$(EXEEXT) xcase$(EXEEXT) tests/xcase$(EXEEXT) \ + mksignames$(EXEEXT) lsignames.h \ + mksyntax${EXEEXT} syntax.c $(VERSPROG) $(VERSOBJ) \ + buildversion.o mksignames.o signames.o buildsignames.o +CREATED_CONFIGURE = config.h config.cache config.status config.log \ + stamp-h po/POTFILES config.status.lineno +CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \ + lib/readline/Makefile lib/glob/Makefile \ + lib/sh/Makefile lib/tilde/Makefile lib/malloc/Makefile \ + lib/termcap/Makefile examples/loadables/Makefile \ + examples/loadables/Makefile.inc \ + examples/loadables/perl/Makefile support/Makefile \ + lib/intl/Makefile po/Makefile po/Makefile.in +CREATED_HEADERS = signames.h config.h pathnames.h version.h y.tab.h \ + ${DEFDIR}/builtext.h + +OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/COMPAT $(srcdir)/NEWS $(srcdir)/POSIX \ + $(srcdir)/RBASH $(srcdir)/README +OTHER_INSTALLED_DOCS = CHANGES COMPAT NEWS POSIX RBASH README + +LOADABLES_DIR = ${top_builddir}/examples/loadables + +# Keep GNU Make from exporting the entire environment for small machines. +.NOEXPORT: + +.made: $(Program) bashbug $(SDIR)/man2html$(EXEEXT) + @echo "$(Program) last made for a $(Machine) running $(OS)" >.made + +$(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP) + $(RM) $@ + $(PURIFY) $(CC) $(BUILTINS_LDFLAGS) $(LIBRARY_LDFLAGS) $(LDFLAGS) -o $(Program) $(OBJECTS) $(LIBS) + ls -l $(Program) + -$(SIZE) $(Program) + +.build: $(SOURCES) config.h Makefile version.h $(VERSPROG) + @echo + @echo " ***********************************************************" + @echo " * *" + @echo " * `$(BUILD_DIR)/$(VERSPROG) -l`" + @echo " * *" + @echo " ***********************************************************" + @echo + +bashbug: $(SDIR)/bashbug.sh $(VERSPROG) + @sed -e "s%!PATCHLEVEL!%$(PatchLevel)%" \ + $(SDIR)/bashbug.sh > $@ + @chmod a+rx bashbug + +strip: $(Program) .made + $(STRIP) $(Program) + ls -l $(Program) + -$(SIZE) $(Program) + +lint: + ${MAKE} ${MFLAGS} CFLAGS='${GCC_LINT_FLAGS}' .made + +asan: + ${MAKE} ${MFLAGS} ADDON_CFLAGS='${ASAN_XCFLAGS}' ADDON_LDFLAGS='${ASAN_XLDFLAGS}' .made + +# cheating +gcov: + ${MAKE} ${MFLAGS} CFLAGS=-g ADDON_CFLAGS='${GCOV_XCFLAGS}' ADDON_LDFLAGS='${GCOV_XLDFLAGS}' .made + + +# have to make this separate because making tests depend on $(PROGRAM) +asan-tests: asan $(TESTS_SUPPORT) + @-test -d tests || mkdir tests + @cp $(TESTS_SUPPORT) tests + @( cd $(srcdir)/tests && \ + BUILD_DIR=$(BUILD_DIR) PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) + +profiling-tests: ${PROGRAM} + @test "X$$PROFILE_FLAGS" == "X" && { echo "profiling-tests: must be built with profiling enabled" >&2; exit 1; } + @${MAKE} ${MFLAGS} tests TESTSCRIPT=run-gprof + +version.h: $(SOURCES) config.h Makefile patchlevel.h + $(SHELL) $(SUPPORT_SRC)mkversion.sh -b -S ${topdir} -s $(RELSTATUS) -d $(Version) -o newversion.h \ + && mv newversion.h version.h + +bashversion$(EXEEXT): buildversion.o $(SUPPORT_SRC)bashversion.c + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)bashversion.c buildversion.o ${LIBS_FOR_BUILD} + +buildversion.o: $(srcdir)/version.c + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c -o $@ $(srcdir)/version.c + +buildversion.o: bashintl.h $(BASHINCDIR)/gettext.h +buildversion.o: version.h patchlevel.h conftypes.h + +# old rules +GRAM_H = parser-built +y.tab.o: y.tab.h y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h +${GRAM_H}: y.tab.h + @-if test -f y.tab.h ; then \ + cmp -s $@ y.tab.h 2>/dev/null || cp -p y.tab.h $@; \ + fi + +y.tab.c: parse.y +# -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi + $(YACC) -d $(srcdir)/parse.y + touch parser-built +# -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; else cp -p y.tab.h ${GRAM_H}; fi + +y.tab.h: y.tab.c + @true + + +# Subdirs will often times want version.h, so they'll change back up to +# the top level and try to create it. This causes parallel build issues +# so just force top level sanity before we descend. +$(LIBDEP): .build +#$(LIBDEP): version.h + +$(READLINE_LIBRARY): config.h $(READLINE_SOURCE) + @echo making $@ in ${RL_LIBDIR} + @( { test "${RL_LIBDIR}" = "${libdir}" && exit 0; } || \ + cd ${RL_LIBDIR} && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libreadline.a) || exit 1 + +$(HISTORY_LIBRARY): config.h $(HISTORY_SOURCE) $(READLINE_DEP) + @echo making $@ in ${HIST_LIBDIR} + @( { test "${HIST_LIBDIR}" = "${libdir}" && exit 0; } || \ + cd ${HIST_LIBDIR} && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libhistory.a) || exit 1 + +$(GLOB_LIBRARY): config.h $(GLOB_SOURCE) + @echo making $@ in ${GLOB_LIBDIR} + @(cd ${GLOB_LIBDIR} && \ + $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libglob.a) || exit 1 + +$(TILDE_LIBRARY): config.h $(TILDE_SOURCE) + @echo making $@ in ${TILDE_LIBDIR} + @(cd ${TILDE_LIBDIR} && \ + $(MAKE) $(MFLAGS) libtilde.a) || exit 1 + +$(TERMCAP_LIBRARY): config.h ${TERMCAP_SOURCE} + @echo making $@ in ${TERM_LIBDIR} + @(cd ${TERM_LIBDIR} && \ + $(MAKE) $(MFLAGS) libtermcap.a) || exit 1 + +$(SHLIB_LIBRARY): config.h ${SHLIB_SOURCE} + @echo making $@ in ${SH_LIBDIR} + @(cd ${SH_LIBDIR} && \ + $(MAKE) $(MFLAGS) DEBUG=${DEBUG} ${SHLIB_LIBNAME}) || exit 1 + +${INTL_LIBRARY}: config.h ${INTL_LIBDIR}/Makefile + @echo making $@ in ${INTL_LIBDIR} + @(cd ${INTL_LIBDIR} && \ + $(MAKE) $(MFLAGS) XCFLAGS="${LOCAL_CFLAGS}" all) || exit 1 + +${LIBINTL_H}: ${INTL_DEP} + +signames.o: $(SUPPORT_SRC)signames.c + $(RM) $@ + $(CC) $(CCFLAGS) -c $(SUPPORT_SRC)signames.c + +buildsignames.o: $(SUPPORT_SRC)signames.c + $(RM) $@ + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -o $@ -c $(SUPPORT_SRC)signames.c + +mksignames.o: $(SUPPORT_SRC)mksignames.c + $(RM) $@ + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c $(SUPPORT_SRC)mksignames.c + +mksignames$(EXEEXT): mksignames.o buildsignames.o + $(RM) $@ + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ mksignames.o buildsignames.o ${LIBS_FOR_BUILD} + +mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h bashansi.h + $(RM) $@ + ${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $@ ${srcdir}/mksyntax.c ${LIBS_FOR_BUILD} + +# make a list of signals for the local system -- this is done when we're +# *not* cross-compiling +lsignames.h: mksignames$(EXEEXT) + $(RM) $@ + ./mksignames$(EXEEXT) $@ + +# copy the correct signames header file to signames.h +signames.h: $(SIGNAMES_H) + -if cmp -s $(SIGNAMES_H) $@ ; then :; else $(RM) $@ ; $(CP) $(SIGNAMES_H) $@ ; fi + +syntax.c: mksyntax${EXEEXT} $(srcdir)/syntax.h + $(RM) $@ + ./mksyntax$(EXEEXT) -o $@ + +$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h $(DEFDIR)/builtext.h version.h + @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} targets ) || exit 1 + +# these require special rules to circumvent make builtin rules +${DEFDIR}/common.o: $(BUILTIN_SRCDIR)/common.c + @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} common.o) || exit 1 + +${DEFDIR}/bashgetopt.o: $(BUILTIN_SRCDIR)/bashgetopt.c + @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} bashgetopt.o) || exit 1 + +${DEFDIR}/builtext.h: $(BUILTIN_DEFS) + @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) builtext.h ) || exit 1 + +${DEFDIR}/pipesize.h: + @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) pipesize.h ) || exit 1 + +$(SDIR)/man2html$(EXEEXT): ${SUPPORT_SRC}/man2html.c + @(cd $(SDIR) && $(MAKE) $(MFLAGS) all ) || exit 1 + +# For the justification of the following Makefile rules, see node +# `Automatic Remaking' in GNU Autoconf documentation. + +Makefile makefile: config.status $(srcdir)/Makefile.in + CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status + +Makefiles makefiles: config.status $(srcdir)/Makefile.in + @for mf in $(CREATED_MAKEFILES); do \ + CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status || exit 1; \ + done + +config.h: stamp-h + +stamp-h: config.status $(srcdir)/config.h.in $(srcdir)/config-top.h $(srcdir)/config-bot.h + CONFIG_FILES= CONFIG_HEADERS=config.h $(SHELL) ./config.status + +config.status: $(srcdir)/configure + $(SHELL) ./config.status --recheck + +pathnames.h: Makefile $(srcdir)/pathnames.h.in + @sed -e 's|@DEBUGGER_START_FILE\@|${DEBUGGER_START_FILE}|g' $(srcdir)/pathnames.h.in > pathnames.tmp + @if test -f $@; then \ + cmp -s pathnames.tmp $@ || mv pathnames.tmp $@; \ + else \ + mv pathnames.tmp $@; \ + fi + @${RM} pathnames.tmp + +# comment out for distribution +$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4 $(srcdir)/config.h.in + cd $(srcdir) && autoconf + +# for chet +reconfig: force + sh $(srcdir)/configure -C + +loadables: + cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) all + +#newversion: mkversion +# $(RM) .build +# ./mkversion -dir $(srcdir) -dist +# mv -f newversion.h version.h +# $(MAKE) -f $(srcdir)/Makefile $(MFLAGS) srcdir=$(srcdir) + +doc documentation: force + @(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) ) + +info dvi ps: force + @(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) CFLAGS='$(CCFLAGS)' $@ ) + +force: + +# unused +TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) + etags $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) + +tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) + ctags -x $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@ + +# Targets that actually do things not part of the build + +installdirs: + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(bindir) + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(man1dir) + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(infodir) + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(docdir) + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + +install: .made installdirs + $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program) + $(INSTALL_SCRIPT) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/bashbug + $(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir) + -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \ + man1dir=$(man1dir) man1ext=$(man1ext) \ + man3dir=$(man3dir) man3ext=$(man3ext) \ + infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ ) + -( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + +install-strip: + $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ + prefix=${prefix} exec_prefix=${exec_prefix} \ + DESTDIR=$(DESTDIR) install + +install-headers-dirs: + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir) + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir)/builtins + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir)/include + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(pkgconfigdir) + +install-headers: install-headers-dirs + @for hf in $(INSTALLED_HEADERS) ; do \ + ${INSTALL_DATA} $(srcdir)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ + done + @for hf in $(INSTALLED_INCFILES) ; do \ + ${INSTALL_DATA} $(BASHINCDIR)/"$$hf" $(DESTDIR)$(headersdir)/include/$$hf || exit 1; \ + done + @for hf in $(INSTALLED_BUILTINS_HEADERS) ; do \ + ${INSTALL_DATA} $(BUILTIN_SRCDIR)/"$$hf" $(DESTDIR)$(headersdir)/builtins/$$hf || exit 1; \ + done + @for hf in $(CREATED_HEADERS) ; do \ + if test -f $(BUILD_DIR)/"$$hf" ; then \ + ${INSTALL_DATA} $(BUILD_DIR)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ + else \ + ${INSTALL_DATA} $(srcdir)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ + fi ; \ + done + -$(INSTALL_DATA) $(SDIR)/bash.pc $(DESTDIR)$(pkgconfigdir)/bash.pc + +uninstall-headers: + -( cd $(DESTDIR)$(headersdir) && $(RM) $(INSTALLED_HEADERS) ) + -( cd $(DESTDIR)$(headersdir)/include && $(RM) $(INSTALLED_INCFILES) ) + -( cd $(DESTDIR)$(headersdir)/builtins && $(RM) $(INSTALLED_BUILTINS_HEADERS) ) + -( cd $(DESTDIR)$(headersdir) && $(RM) $(CREATED_HEADERS) ) + -( $(RM) $(DESTDIR)$(pkgconfigdir)/bash.pc ) + +uninstall: .made + $(RM) $(DESTDIR)$(bindir)/$(Program) $(DESTDIR)$(bindir)/bashbug + -( cd $(DESTDIR)$(docdir) && ${RM} ${OTHER_INSTALLED_DOCS} ) + -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \ + man1dir=$(man1dir) man1ext=$(man1ext) \ + man3dir=$(man3dir) man3ext=$(man3ext) \ + infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ ) + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + +.PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean + +LIB_SUBDIRS = ${RL_LIBDIR} ${HIST_LIBDIR} ${TERM_LIBDIR} ${GLOB_LIBDIR} \ + ${INTL_LIBDIR} ${TILDE_LIBDIR} ${ALLOC_LIBDIR} ${SH_LIBDIR} + +basic-clean: + $(RM) $(OBJECTS) $(Program) bashbug + $(RM) .build .made version.h + +clean: basic-clean + ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) + ( cd builtins && $(MAKE) $(MFLAGS) $@ ) + -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) + -for libdir in ${LIB_SUBDIRS}; do \ + (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ + done + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + $(RM) $(CREATED_SUPPORT) + +mostlyclean: basic-clean + ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) + ( cd builtins && $(MAKE) $(MFLAGS) $@ ) + -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) + -for libdir in ${LIB_SUBDIRS}; do \ + (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ + done + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + +distclean: basic-clean maybe-clean + ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) + ( cd builtins && $(MAKE) $(MFLAGS) $@ ) + -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) + -for libdir in ${LIB_SUBDIRS}; do \ + (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ + done + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + $(RM) $(CREATED_CONFIGURE) tags TAGS + $(RM) $(CREATED_SUPPORT) Makefile $(CREATED_MAKEFILES) pathnames.h + +maintainer-clean: basic-clean + @echo This command is intended for maintainers to use. + @echo It deletes files that may require special tools to rebuild. + $(RM) y.tab.c y.tab.h parser-built tags TAGS + ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) + ( cd builtins && $(MAKE) $(MFLAGS) $@ ) + ( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) + -for libdir in ${LIB_SUBDIRS}; do \ + (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ + done + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + $(RM) $(CREATED_CONFIGURE) $(CREATED_MAKEFILES) + $(RM) $(CREATED_SUPPORT) Makefile pathnames.h + +maybe-clean: + -if test X"`cd $(topdir) && pwd -P`" != X"`cd $(BUILD_DIR) && pwd -P`" ; then \ + $(RM) parser-built y.tab.c y.tab.h ; \ + fi + +recho$(EXEEXT): $(SUPPORT_SRC)recho.c + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} + +zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} + +printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} + +xcase$(EXEEXT): $(SUPPORT_SRC)xcase.c + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)xcase.c ${LIBS_FOR_BUILD} + +test tests check: force $(Program) $(TESTS_SUPPORT) + @-test -d tests || mkdir tests + @cp $(TESTS_SUPPORT) tests + @( cd $(srcdir)/tests && \ + BUILD_DIR=$(BUILD_DIR) PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) + +symlinks: + $(SHELL) $(SUPPORT_SRC)fixlinks -s $(srcdir) + +dist: force + @echo Bash distributions are created using $(srcdir)/support/mkdist. + @echo Here is a sample of the necessary commands: + @echo $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${PACKAGE} -t $(PACKAGE_VERSION) + +xdist: force + ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) + ( cd po && $(MAKE) $(MFLAGS) $@ ) + +depend: depends + +depends: force + $(Program) $(SUPPORT_SRC)mkdep -c ${CC} -- ${CCFLAGS} ${CSOURCES} + +#### PRIVATE TARGETS #### +hashtest: hashlib.c + $(CC) -DTEST_HASHING $(CCFLAGS) $(TEST_NBUCKETS) -o $@ $(srcdir)/hashlib.c xmalloc.o $(INTL_LIB) $(MALLOC_LIBRARY) + +############################ DEPENDENCIES ############################### + +# Files that depend on the definitions in config-top.h, which are not meant +# to be changed +array.o: $(srcdir)/config-top.h +bashhist.o: $(srcdir)/config-top.h +shell.o: $(srcdir)/config-top.h +input.o: $(srcdir)/config-top.h +y.tab.o: $(srcdir)/config-top.h +jobs.o: $(srcdir)/config-top.h +nojobs.o: $(srcdir)/config-top.h +execute_cmd.o: $(srcdir)/config-top.h +variables.o: $(srcdir)/config-top.h +findcmd.o: $(srcdir)/config-top.h +subst.o: $(srcdir)/config-top.h +builtins/cd.o: $(srcdir)/config-top.h +builtins/command.o: $(srcdir)/config-top.h +builtins/common.o: $(srcdir)/config-top.h +builtins/declare.o: $(srcdir)/config-top.h +builtins/break.o: $(srcdir)/config-top.h +builtins/echo.o: $(srcdir)/config-top.h +builtins/evalstring.o: $(srcdir)/config-top.h +builtins/exit.o: $(srcdir)/config-top.h +builtins/kill.o: $(srcdir)/config-top.h +builtins/shopt.o: $(srcdir)/config-top.h + +# XXX +${SH_LIBDIR}/tmpfile.o: $(srcdir)/config-top.h + +# shell basics +copy_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +copy_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +copy_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +copy_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h +copy_cmd.o: bashansi.h assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h +dispose_cmd.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h +dispose_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h +dispose_cmd.o: error.h general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +dispose_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +dispose_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h +dispose_cmd.o: ${BASHINCDIR}/ocache.h +dispose_cmd.o: assoc.h ${BASHINCDIR}/chartypes.h +error.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h flags.h ${BASHINCDIR}/stdc.h error.h +error.o: command.h general.h xmalloc.h externs.h input.h bashhist.h +error.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +error.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +error.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +error.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h +error.o: input.h execute_cmd.h +error.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h assoc.h +eval.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h trap.h flags.h ${DEFSRC}/common.h +eval.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +eval.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +eval.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +eval.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h +eval.o: input.h execute_cmd.h +eval.o: bashhist.h assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h +execute_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +execute_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +execute_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +execute_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +execute_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h +execute_cmd.o: ${BASHINCDIR}/memalloc.h ${GRAM_H} flags.h builtins.h jobs.h quit.h siglist.h +execute_cmd.o: execute_cmd.h findcmd.h redir.h trap.h test.h pathexp.h +execute_cmd.o: $(DEFSRC)/common.h ${DEFDIR}/builtext.h ${GLOB_LIBSRC}/strmatch.h +execute_cmd.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/chartypes.h +execute_cmd.o: $(DEFSRC)/getopt.h +execute_cmd.o: bashhist.h input.h ${GRAM_H} assoc.h hashcmd.h alias.h +execute_cmd.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/posixwait.h +expr.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +expr.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +expr.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +expr.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +expr.o: make_cmd.h subst.h sig.h pathnames.h externs.h flags.h execute_cmd.h +expr.o: ${BASHINCDIR}/chartypes.h +expr.o: assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/typemax.h +findcmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h +findcmd.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h +findcmd.o: ${BASHINCDIR}/stdc.h error.h general.h xmalloc.h variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h +findcmd.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h +findcmd.o: flags.h hashlib.h pathexp.h hashcmd.h execute_cmd.h +findcmd.o: ${BASHINCDIR}/chartypes.h +flags.o: config.h flags.h +flags.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +flags.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +flags.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h execute_cmd.h +flags.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashhist.h +flags.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashansi.h assoc.h +general.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +general.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +general.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +general.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +general.o: make_cmd.h subst.h sig.h pathnames.h externs.h flags.h parser.h +general.o: pathexp.h +general.o: ${BASHINCDIR}/maxpath.h ${BASHINCDIR}/posixtime.h +general.o: ${BASHINCDIR}/chartypes.h +general.o: trap.h input.h assoc.h test.h findcmd.h +general.o: ${BASHINCDIR}/ocache.h $(DEFSRC)/common.h +hashcmd.o: config.h ${BASHINCDIR}/posixstat.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +hashcmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +hashcmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashcmd.h +hashcmd.o: execute_cmd.h findcmd.h ${BASHINCDIR}/stdc.h pathnames.h hashlib.h +hashcmd.o: quit.h sig.h flags.h +hashlib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +hashlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +hashlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +hashlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +hashlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h +hashlib.o: assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h +input.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +input.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h input.h error.h externs.h +input.o: quit.h shell.h pathnames.h +list.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +list.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +list.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +list.o: make_cmd.h subst.h sig.h pathnames.h externs.h +list.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashansi.h assoc.h +locale.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +locale.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +locale.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +locale.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +locale.o: make_cmd.h subst.h sig.h pathnames.h externs.h +locale.o: ${BASHINCDIR}/chartypes.h +locale.o: input.h assoc.h ${BASHINCDIR}/ocache.h +mailcheck.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +mailcheck.o: ${BASHINCDIR}/posixtime.h +mailcheck.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +mailcheck.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +mailcheck.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +mailcheck.o: make_cmd.h subst.h sig.h pathnames.h externs.h +mailcheck.o: execute_cmd.h mailcheck.h +mailcheck.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h +make_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashansi.h +make_cmd.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h flags.h make_cmd.h +make_cmd.o: variables.h arrayfunc.h conftypes.h array.h hashlib.h subst.h input.h externs.h +make_cmd.o: jobs.h quit.h sig.h siglist.h syntax.h dispose_cmd.h parser.h +make_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h ${BASHINCDIR}/ocache.h +make_cmd.o: shell.h execute_cmd.h pathnames.h +make_cmd.o: $(BASHINCDIR)/maxpath.h make_cmd.c assoc.h $(BASHINCDIR)/chartypes.h +make_cmd.o: unwind_prot.h $(BASHINCDIR)/posixjmp.h bashjmp.h $(BASHINCDIR)/posixwait.h +y.tab.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h +y.tab.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +y.tab.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +y.tab.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +y.tab.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h execute_cmd.o +y.tab.o: trap.h flags.h parser.h input.h mailcheck.h $(DEFSRC)/common.h +y.tab.o: $(DEFDIR)/builtext.h bashline.h bashhist.h jobs.h siglist.h alias.h +y.tab.o: ${BASHINCDIR}/typemax.h assoc.h ${BASHINCDIR}/ocache.h +y.tab.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h ${BASHINCDIR}/posixwait.h +pathexp.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +pathexp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +pathexp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +pathexp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +pathexp.o: make_cmd.h subst.h sig.h pathnames.h externs.h +pathexp.o: pathexp.h flags.h +pathexp.o: $(GLOB_LIBSRC)/glob.h $(GLOB_LIBSRC)/strmatch.h +pathexp.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +pathexp.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h +print_cmd.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +print_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +print_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +print_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +print_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h +print_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +print_cmd.o: ${GRAM_H} $(DEFSRC)/common.h +print_cmd.o: flags.h input.h assoc.h +print_cmd.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h +redir.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h +redir.o: ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +redir.o: general.h xmalloc.h variables.h arrayfunc.h conftypes.h array.h hashlib.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h +redir.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h +redir.o: flags.h execute_cmd.h redir.h input.h +redir.o: ${DEFDIR}/pipesize.h +redir.o: trap.h assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h +shell.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h +shell.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +shell.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +shell.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +shell.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h +shell.o: flags.h trap.h mailcheck.h builtins.h $(DEFSRC)/common.h +shell.o: jobs.h siglist.h input.h execute_cmd.h findcmd.h bashhist.h bashline.h +shell.o: ${GLOB_LIBSRC}/strmatch.h ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/posixwait.h +shell.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h alias.h +sig.o: config.h bashtypes.h +sig.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +sig.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +sig.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +sig.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h +sig.o: jobs.h siglist.h trap.h $(DEFSRC)/common.h bashline.h bashhist.h +sig.o: ${DEFDIR}/builtext.h +siglist.o: config.h bashtypes.h siglist.h trap.h +stringlib.o: bashtypes.h ${BASHINCDIR}/chartypes.h +stringlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +stringlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +stringlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +stringlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h +stringlib.o: bashansi.h pathexp.h assoc.h $(BASHINCDIR)/ocache.h +stringlib.o: ${GLOB_LIBSRC}/glob.h ${GLOB_LIBSRC}/strmatch.h +subst.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h +subst.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +subst.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +subst.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +subst.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h +subst.o: flags.h jobs.h siglist.h execute_cmd.h ${BASHINCDIR}/filecntl.h trap.h pathexp.h +subst.o: mailcheck.h input.h $(DEFSRC)/getopt.h $(DEFSRC)/common.h +subst.o: bashline.h bashhist.h ${GLOB_LIBSRC}/strmatch.h +subst.o: ${BASHINCDIR}/chartypes.h +subst.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +subst.o: ${DEFDIR}/builtext.h +test.o: bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h +test.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +test.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +test.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +test.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h +test.o: ${BASHINCDIR}/stat-time.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h +test.o: $(GLOB_LIBSRC)/strmatch.h bashansi.h pathexp.h assoc.h +test.o: ${DEFSRC}/common.h +trap.o: config.h bashtypes.h trap.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +trap.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +trap.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +trap.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h parser.h +trap.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h +trap.o: signames.h $(DEFSRC)/common.h +trap.o: ${DEFDIR}/builtext.h jobs.h +unwind_prot.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h +unwind_prot.o: general.h xmalloc.h unwind_prot.h quit.h sig.h +unwind_prot.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h error.h +variables.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +variables.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +variables.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +variables.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +variables.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h +variables.o: flags.h execute_cmd.h mailcheck.h input.h $(DEFSRC)/common.h +variables.o: findcmd.h bashhist.h hashcmd.h pathexp.h +variables.o: pcomplete.h ${BASHINCDIR}/chartypes.h +variables.o: ${BASHINCDIR}/posixtime.h assoc.h ${DEFSRC}/getopt.h +variables.o: version.h $(DEFDIR)/builtext.h +version.o: conftypes.h patchlevel.h version.h +xmalloc.o: config.h bashtypes.h ${BASHINCDIR}/ansi_stdlib.h error.h +xmalloc.o: ${BASHINCDIR}/stdc.h $(ALLOC_LIBSRC)/shmalloc.h + +# job control + +jobs.o: config.h bashtypes.h trap.h ${BASHINCDIR}/filecntl.h input.h ${BASHINCDIR}/shtty.h +jobs.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h assoc.h +jobs.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +jobs.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +jobs.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h parser.h +jobs.o: execute_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h +jobs.o: jobs.h flags.h $(DEFSRC)/common.h $(DEFDIR)/builtext.h +jobs.o: ${BASHINCDIR}/posixwait.h ${BASHINCDIR}/unionwait.h +jobs.o: ${BASHINCDIR}/posixtime.h +jobs.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h $(BASHINCDIR)/typemax.h +nojobs.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashjmp.h ${BASHINCDIR}/posixjmp.h +nojobs.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h jobs.h quit.h siglist.h externs.h +nojobs.o: sig.h error.h ${BASHINCDIR}/shtty.h input.h parser.h +nojobs.o: $(DEFDIR)/builtext.h +nojobs.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h $(BASHINCDIR)/typemax.h + +# shell features that may be compiled in + +array.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +array.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +array.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +array.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +array.o: make_cmd.h subst.h sig.h pathnames.h externs.h +array.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h +array.o: $(DEFSRC)/common.h +arrayfunc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +arrayfunc.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +arrayfunc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +arrayfunc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +arrayfunc.o: make_cmd.h subst.h sig.h pathnames.h externs.h pathexp.h +arrayfunc.o: execute_cmd.h +arrayfunc.o: assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h +arrayfunc.o: $(DEFSRC)/common.h +arrayfunc.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +assoc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +assoc.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h +assoc.o: command.h ${BASHINCDIR}/stdc.h error.h +assoc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h +assoc.o: assoc.h hashlib.h +assoc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +assoc.o: make_cmd.h subst.h sig.h pathnames.h externs.h +assoc.o: array.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h +assoc.o: $(DEFSRC)/common.h +braces.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +braces.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +braces.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +braces.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +braces.o: make_cmd.h subst.h sig.h pathnames.h externs.h +braces.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +braces.o: ${BASHINCDIR}/typemax.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h +alias.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h +alias.o: general.h xmalloc.h bashtypes.h externs.h alias.h +alias.o: pcomplete.h hashlib.h +alias.o: ${BASHINCDIR}/chartypes.h + +pcomplib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h +pcomplib.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h +pcomplib.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h arrayfunc.h conftypes.h quit.h +pcomplib.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h +pcomplib.o: externs.h ${BASHINCDIR}/maxpath.h assoc.h array.h +pcomplib.o: ${BASHINCDIR}/posixjmp.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h + +pcomplete.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h +pcomplete.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h +pcomplete.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h arrayfunc.h conftypes.h quit.h +pcomplete.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h +pcomplete.o: externs.h ${BASHINCDIR}/maxpath.h execute_cmd.h +pcomplete.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +pcomplete.o: ${DEFDIR}/builtext.h + +# library support files + +bashhist.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h +bashhist.o: ${BASHINCDIR}/filecntl.h +bashhist.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +bashhist.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +bashhist.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +bashhist.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h +bashhist.o: flags.h input.h parser.h pathexp.h $(DEFSRC)/common.h bashline.h +bashhist.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashhist.h assoc.h +bashhist.o: $(GLOB_LIBSRC)/strmatch.h ${GLOB_LIBSRC}/glob.h +bashline.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +bashline.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +bashline.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +bashline.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +bashline.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h +bashline.o: builtins.h bashhist.h bashline.h execute_cmd.h findcmd.h pathexp.h +bashline.o: trap.h flags.h assoc.h $(BASHINCDIR)/ocache.h +bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h +bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h +bashline.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +bashline.o: ${DEFDIR}/builtext.h +bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h +bracecomp.o: command.h ${BASHINCDIR}/stdc.h error.h +bracecomp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h +bracecomp.o: array.h hashlib.h alias.h builtins.h +bracecomp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +bracecomp.o: make_cmd.h subst.h sig.h pathnames.h externs.h +bracecomp.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashhist.h assoc.h +bracecomp.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h + +# library dependencies + +bashhist.o: $(RL_LIBSRC)/rltypedefs.h +bashline.o: $(RL_LIBSRC)/rlconf.h +bashline.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h +bashline.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h +bashline.o: $(RL_LIBSRC)/rltypedefs.h ${RL_LIBSRC}/rlmbutil.h +bracecomp.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +bracecomp.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +bracecomp.o: $(RL_LIBSRC)/rltypedefs.h +y.tab.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +y.tab.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +y.tab.o: $(RL_LIBSRC)/rltypedefs.h +subst.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +subst.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +shell.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +shell.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +shell.o: $(RL_LIBSRC)/rltypedefs.h +variables.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +variables.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +variables.o: $(RL_LIBSRC)/rltypedefs.h +jobs.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +jobs.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +jobs.o: $(RL_LIBSRC)/rltypedefs.h + +shell.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h +variables.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h +subst.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h +bashline.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h +bashhist.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h +y.tab.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h + +bashline.o: $(TILDE_LIBSRC)/tilde.h +bracecomp.o: $(TILDE_LIBSRC)/tilde.h +execute_cmd.o: $(TILDE_LIBSRC)/tilde.h +general.o: $(TILDE_LIBSRC)/tilde.h +mailcheck.o: $(TILDE_LIBSRC)/tilde.h +shell.o: $(TILDE_LIBSRC)/tilde.h +subst.o: $(TILDE_LIBSRC)/tilde.h +variables.o: $(TILDE_LIBSRC)/tilde.h +jobs.o: $(TILDE_LIBSRC)/tilde.h +y.tab.o: $(TILDE_LIBSRC)/tilde.h + +# libintl dependencies +arrayfunc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +bashhist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +bashline.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +braces.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +error.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +eval.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +execute_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +expr.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +general.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +input.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +jobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +locale.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +mailcheck.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +make_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +y.tab.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +pathexp.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +pcomplete.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +pcomplib.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +print_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +redir.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +shell.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +sig.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +siglist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +subst.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +test.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +trap.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +variables.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +version.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +xmalloc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + +# XXX +$(MALLOC_SOURCE): bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + +signames.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h + +# XXX - dependencies checked through here + +# builtin c sources +builtins/bashgetopt.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +builtins/bashgetopt.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h +builtins/bashgetopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +builtins/bashgetopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h +builtins/bashgetopt.o: $(DEFSRC)/common.h +builtins/bashgetopt.o: ${BASHINCDIR}/chartypes.h +builtins/common.o: bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +builtins/common.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h +builtins/common.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.h input.h siglist.h +builtins/common.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h builtins.h +builtins/common.o: dispose_cmd.h make_cmd.h subst.h externs.h bashhist.h +builtins/common.o: execute_cmd.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h pathnames.h +builtins/common.o: ${DEFDIR}/builtext.h parser.h +builtins/common.o: ${BASHINCDIR}/chartypes.h +builtins/evalfile.o: bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +builtins/evalfile.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h +builtins/evalfile.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +builtins/evalfile.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h +builtins/evalfile.o: jobs.h builtins.h flags.h input.h execute_cmd.h +builtins/evalfile.o: bashhist.h $(DEFSRC)/common.h +builtins/evalstring.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +builtins/evalstring.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h siglist.h +builtins/evalstring.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.h input.h +builtins/evalstring.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h builtins.h +builtins/evalstring.o: dispose_cmd.h make_cmd.h subst.h externs.h +builtins/evalstring.o: jobs.h builtins.h flags.h input.h execute_cmd.h +builtins/evalstring.o: bashhist.h $(DEFSRC)/common.h pathnames.h +builtins/evalstring.o: ${DEFDIR}/builtext.h +builtins/getopt.o: config.h ${BASHINCDIR}/memalloc.h +builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h +builtins/getopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +builtins/getopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h +builtins/getopt.o: $(DEFSRC)/getopt.h +builtins/mkbuiltins.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h +builtins/mkbuiltins.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h +builtins/mkbuiltins.o: $(BASHINCDIR)/stdc.h + +# builtin def files +builtins/alias.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/alias.o: quit.h $(DEFSRC)/common.h pathnames.h +builtins/alias.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h ${BASHINCDIR}/stdc.h unwind_prot.h +builtins/alias.o: dispose_cmd.h make_cmd.h subst.h externs.h variables.h arrayfunc.h conftypes.h +builtins/bind.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/bind.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/bind.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/bind.o: $(DEFSRC)/bashgetopt.h pathnames.h +builtins/break.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/break.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/break.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/break.o: pathnames.h execute_cmd.h +builtins/builtin.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/builtin.o: quit.h $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h +builtins/builtin.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/builtin.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/builtin.o: pathnames.h execute_cmd.h +builtins/caller.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/caller.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/caller.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/caller.o: $(DEFSRC)/common.h quit.h +builtins/caller.o: ${BASHINCDIR}/chartypes.h bashtypes.h +builtins/caller.o: ${DEFDIR}/builtext.h pathnames.h +builtins/cd.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/cd.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/cd.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/cd.o: $(DEFSRC)/common.h quit.h pathnames.h +builtins/colon.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/colon.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/colon.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/colon.o: pathnames.h +builtins/command.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/command.o: quit.h $(DEFSRC)/bashgetopt.h +builtins/command.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/command.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h pathnames.h +builtins/declare.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/declare.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/declare.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/declare.o: $(DEFSRC)/bashgetopt.h pathnames.h flags.h +builtins/echo.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/echo.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/echo.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/echo.o: pathnames.h +builtins/echo.o: $(DEFSRC)/common.h +builtins/enable.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/enable.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/enable.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/enable.o: pcomplete.h pathnames.h +builtins/eval.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/eval.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/eval.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/eval.o: pathnames.h +builtins/exec.o: bashtypes.h pathnames.h +builtins/exec.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/exec.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/exec.o: dispose_cmd.h make_cmd.h subst.h externs.h execute_cmd.h +builtins/exec.o: findcmd.h flags.h quit.h $(DEFSRC)/common.h ${BASHINCDIR}/stdc.h +builtins/exec.o: pathnames.h +builtins/exit.o: bashtypes.h +builtins/exit.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/exit.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/exit.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/exit.o: pathnames.h execute_cmd.h +builtins/fc.o: bashtypes.h ${BASHINCDIR}/posixstat.h +builtins/fc.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h builtins.h command.h ${BASHINCDIR}/stdc.h +builtins/fc.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/fc.o: flags.h unwind_prot.h variables.h arrayfunc.h conftypes.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h +builtins/fc.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h quit.h +builtins/fc.o: $(DEFSRC)/bashgetopt.h bashhist.h pathnames.h parser.h +builtins/fc.o: ${BASHINCDIR}/chartypes.h +builtins/fg_bg.o: bashtypes.h $(DEFSRC)/bashgetopt.h +builtins/fg_bg.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/fg_bg.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/fg_bg.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/fg_bg.o: pathnames.h execute_cmd.h +builtins/getopts.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/getopts.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/getopts.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/getopts.o: pathnames.h execute_cmd.h +builtins/hash.o: bashtypes.h execute_cmd.h +builtins/hash.o: builtins.h command.h findcmd.h ${BASHINCDIR}/stdc.h $(DEFSRC)/common.h +builtins/hash.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/hash.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/hash.o: pathnames.h +builtins/help.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/help.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/help.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h +builtins/help.o: conftypes.h quit.h execute_cmd.h +builtins/help.o: $(GLOB_LIBSRC)/glob.h pathnames.h +builtins/history.o: bashtypes.h pathnames.h parser.h +builtins/history.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/history.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/history.o: ${BASHINCDIR}/filecntl.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h +builtins/history.o: bashhist.h variables.h arrayfunc.h conftypes.h +builtins/inlib.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/inlib.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/inlib.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/inlib.o: pathnames.h +builtins/jobs.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/jobs.o: quit.h $(DEFSRC)/bashgetopt.h +builtins/jobs.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/jobs.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/jobs.o: pathnames.h +builtins/kill.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/kill.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/kill.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h trap.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/kill.o: pathnames.h +builtins/let.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/let.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/let.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/let.o: pathnames.h +builtins/printf.o: config.h ${BASHINCDIR}/memalloc.h bashjmp.h command.h error.h +builtins/printf.o: general.h xmalloc.h quit.h dispose_cmd.h make_cmd.h subst.h +builtins/printf.o: externs.h sig.h pathnames.h shell.h syntax.h unwind_prot.h +builtins/printf.o: variables.h arrayfunc.h conftypes.h ${BASHINCDIR}/stdc.h $(DEFSRC)/bashgetopt.h +builtins/printf.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +builtins/printf.o: ${BASHINCDIR}/chartypes.h +builtins/pushd.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/pushd.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/pushd.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/pushd.o: $(DEFSRC)/common.h pathnames.h +builtins/read.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/read.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/read.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/read.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +builtins/read.o: pathnames.h +builtins/return.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/return.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/return.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/return.o: pathnames.h execute_cmd.h +builtins/set.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/set.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/set.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h flags.h +builtins/set.o: pathnames.h parser.h +builtins/setattr.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/setattr.o: quit.h $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h +builtins/setattr.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/setattr.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/setattr.o: pathnames.h flags.h execute_cmd.h +builtins/shift.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/shift.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/shift.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/shift.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/shift.o: pathnames.h +builtins/shopt.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h +builtins/shopt.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h +builtins/shopt.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h unwind_prot.h variables.h arrayfunc.h conftypes.h ${BASHINCDIR}/maxpath.h +builtins/shopt.o: $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h pathnames.h +builtins/shopt.o: bashhist.h bashline.h +builtins/source.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/source.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/source.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/source.o: findcmd.h $(DEFSRC)/bashgetopt.h flags.h trap.h +builtins/source.o: pathnames.h execute_cmd.h +builtins/suspend.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/suspend.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/suspend.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/suspend.o: pathnames.h +builtins/test.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/test.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/test.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/test.o: execute_cmd.h test.h pathnames.h +builtins/times.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/times.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/times.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/times.o: pathnames.h +builtins/trap.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/trap.o: quit.h $(DEFSRC)/common.h +builtins/trap.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/trap.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/trap.o: pathnames.h +builtins/type.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/type.o: quit.h $(DEFSRC)/common.h findcmd.h +builtins/type.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/type.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/type.o: pathnames.h execute_cmd.h parser.h +builtins/ulimit.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/ulimit.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/ulimit.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/ulimit.o: pathnames.h +builtins/umask.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/umask.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/umask.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/umask.o: ${BASHINCDIR}/chartypes.h pathnames.h +builtins/wait.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/wait.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/wait.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/wait.o: execute_cmd.h +builtins/wait.o: ${BASHINCDIR}/chartypes.h pathnames.h + +builtins/complete.o: config.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h +builtins/complete.o: unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/complete.o: bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +builtins/complete.o: builtins.h pathnames.h general.h +builtins/complete.o: bashtypes.h ${BASHINCDIR}/chartypes.h xmalloc.h +builtins/complete.o: pcomplete.h +builtins/complete.o: ${DEFSRC}/common.h ${DEFSRC}/bashgetopt.h +builtins/mapfile.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/mapfile.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/mapfile.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h +builtins/mapfile.o: pathnames.h + +# libintl dependencies +builtins/bind.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/break.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/caller.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/cd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/common.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/complete.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/declare.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/enable.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/evalfile.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/exec.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/exit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/fc.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/fg_bg.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/getopt.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/hash.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/help.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/history.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/mapfile.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/mkbuiltins.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/return.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/set.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/setattr.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/shift.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/shopt.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/source.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/suspend.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/type.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/ulimit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +builtins/umask.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + +# builtin library dependencies +builtins/bind.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h +builtins/bind.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h + +builtins/bind.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h +builtins/fc.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h +builtins/history.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h + +builtins/common.o: $(TILDE_LIBSRC)/tilde.h +builtins/cd.o: $(TILDE_LIBSRC)/tilde.h + +builtins/alias.o: $(DEFSRC)/alias.def +builtins/bind.o: $(DEFSRC)/bind.def +builtins/break.o: $(DEFSRC)/break.def +builtins/builtin.o: $(DEFSRC)/builtin.def +builtins/caller.o: $(DEFSRC)/caller.def +builtins/cd.o: $(DEFSRC)/cd.def +builtins/colon.o: $(DEFSRC)/colon.def +builtins/command.o: $(DEFSRC)/command.def +builtins/complete.o: $(DEFSRC)/complete.def +builtins/declare.o: $(DEFSRC)/declare.def +builtins/echo.o: $(DEFSRC)/echo.def +builtins/enable.o: $(DEFSRC)/enable.def +builtins/eval.o: $(DEFSRC)/eval.def +builtins/exec.o: $(DEFSRC)/exec.def +builtins/exit.o: $(DEFSRC)/exit.def +builtins/fc.o: $(DEFSRC)/fc.def +builtins/fg_bg.o: $(DEFSRC)/fg_bg.def +builtins/getopts.o: $(DEFSRC)/getopts.def +builtins/hash.o: $(DEFSRC)/hash.def +builtins/help.o: $(DEFSRC)/help.def +builtins/history.o: $(DEFSRC)/history.def +builtins/inlib.o: $(DEFSRC)/inlib.def +builtins/jobs.o: $(DEFSRC)/jobs.def +builtins/kill.o: $(DEFSRC)/kill.def +builtins/let.o: $(DEFSRC)/let.def +builtins/mapfile.o: $(DEFSRC)/mapfile.def +builtins/pushd.o: $(DEFSRC)/pushd.def +builtins/read.o: $(DEFSRC)/read.def +builtins/reserved.o: $(DEFSRC)/reserved.def +builtins/return.o: $(DEFSRC)/return.def +builtins/set.o: $(DEFSRC)/set.def +builtins/setattr.o: $(DEFSRC)/setattr.def +builtins/shift.o: $(DEFSRC)/shift.def +builtins/shopt.o: $(DEFSRC)/shopt.def +builtins/source.o: $(DEFSRC)/source.def +builtins/suspend.o: $(DEFSRC)/suspend.def +builtins/test.o: $(DEFSRC)/test.def +builtins/times.o: $(DEFSRC)/times.def +builtins/trap.o: $(DEFSRC)/trap.def +builtins/type.o: $(DEFSRC)/type.def +builtins/ulimit.o: $(DEFSRC)/ulimit.def +builtins/umask.o: $(DEFSRC)/umask.def +builtins/wait.o: $(DEFSRC)/wait.def diff --git a/bash-5.1/NEWS b/bash-5.1/NEWS new file mode 100644 index 0000000000000000000000000000000000000000..a6170be85e271dcce97f3032dac1ce264c347c2d --- /dev/null +++ b/bash-5.1/NEWS @@ -0,0 +1,2403 @@ +This is a terse description of the new features added to bash-5.1 since +the release of bash-5.0. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. `bind -x' now supports different bindings for different editing modes and + keymaps. + +b. Bash attempts to optimize the number of times it forks when executing + commands in subshells and from `bash -c'. + +c. Here documents and here strings now use pipes for the expanded document if + it's smaller than the pipe buffer size, reverting to temporary files if it's + larger. + +d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut + +e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL + and those that were SIG_IGN when the shell starts. + +f. The shell now expands the history number (e.g., in PS1) even if it is not + currently saving commands to the history list. + +g. `read -e' may now be used with arbitrary file descriptors (`read -u N'). + +h. The `select' builtin now runs traps if its internal call to the read builtin + is interrupted by a signal. + +i. SRANDOM: a new variable that expands to a 32-bit random number that is not + produced by an LCRNG, and uses getrandom/getentropy, falling back to + /dev/urandom or arc4random if available. There is a fallback generator if + none of these are available. + +j. shell-transpose-words: a new bindable readline command that uses the same + definition of word as shell-forward-word, etc. + +k. The shell now adds default bindings for shell-forward-word, + shell-backward-word, shell-transpose-words, and shell-kill-word. + +l. Bash now allows ARGV0 appearing in the initial shell environment to set $0. + +m. If `unset' is executed without option arguments, bash tries to unset a shell + function if a name argument cannot be a shell variable name because it's not + an identifier. + +n. The `test -N' operator uses nanosecond timestamp granularity if it's + available. + +o. Bash posix mode now treats assignment statements preceding shell function + definitions the same as in its default mode, since POSIX has changed and + no longer requires those assignments to persist after the function returns + (POSIX interp 654). + +p. BASH_REMATCH is no longer readonly. + +q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n' + or `wait' without arguments. + +r. Sorting the results of pathname expansion now uses byte-by-byte comparisons + if two strings collate equally to impose a total order; the result of a + POSIX interpretation. + +s. Bash now allows SIGINT trap handlers to execute recursively. + +t. Bash now saves and restores state around setting and unsetting posix mode, + instead of having unsetting posix mode set a known state. + +u. Process substitution is now available in posix mode. + +v. READLINE_MARK: a new variable available while executing commands bound with + `bind -x', contains the value of the mark. + +w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell + startup. + +x. `test -v N' can now test whether or not positional parameter N is set. + +y. `local' now honors the `-p' option to display all local variables at the + current context. + +z. The `@a' variable transformation now prints attributes for unset array + variables. + +aa. The `@A' variable transformation now prints a declare command that sets a + variable's attributes if the variable has attributes but is unset. + +bb. `declare' and `local' now have a -I option that inherits attributes and + value from a variable with the same name at a previous scope. + +cc. When run from a -c command, `jobs' now reports the status of completed jobs. + +dd. New `U', `u', and `L' parameter transformations to convert to uppercase, + convert first character to uppercase, and convert to lowercase, + respectively. + +ee. PROMPT_COMMAND: can now be an array variable, each element of which can + contain a command to be executed like a string PROMPT_COMMAND variable. + +ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource. + +gg. Associative arrays may be assigned using a list of key-value pairs within + a compound assignment. Compound assignments where the words are not of + the form [key]=value are assumed to be key-value assignments. A missing or + empty key is an error; a missing value is treated as NULL. Assignments may + not mix the two forms. + +hh. New `K' parameter transformation to display associative arrays as key- + value pairs. + +ii. Writing history to syslog now handles messages longer than the syslog max + length by writing multiple messages with a sequence number. + +jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since + they are nominally integer variables. LINENO is not an integer variable. + +kk. Bash temporarily suppresses the verbose option when running the DEBUG trap + while running a command from the `fc' builtin. + +ll. `wait -n' now accepts a list of job specifications as arguments and will + wait for the first one in the list to change state. + +mm. The associative array implementation can now dynamically increase the + size of the hash table based on insertion patterns. + +nn. HISTFILE is now readonly in a restricted shell. + +oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit + systems. + +pp. If the hash builtin is listing hashed filenames portably, don't print + anything if the table is empty. + +qq. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component. + +rr. Bash attempts to optimize away forks in the last command in a function body + under appropriate circumstances. + +ss. The globbing code now uses fnmatch(3) to check collation elements (if + available) even in cases without multibyte characters. + +tt. The `fg' and `bg' builtins now return an error in a command substitution + when asked to restart a job inherited from the parent shell. + +uu. The shell now attempts to unlink all FIFOs on exit, whether a consuming + process has finished with them or not. + +vv. There is a new contributed loadable builtin: asort. + +2. New Features in Readline + +a. If a second consecutive completion attempt produces matches where the first + did not, treat it as a new completion attempt and insert a match as + appropriate. + +b. Bracketed paste mode works in more places: incremental search strings, vi + overstrike mode, character search, and reading numeric arguments. + +c. Readline automatically switches to horizontal scrolling if the terminal has + only one line. + +d. Unbinding all key sequences bound to a particular readline function now + descends into keymaps for multi-key sequences. + +e. rl-clear-display: new bindable command that clears the screen and, if + possible, the scrollback buffer (bound to emacs mode M-C-l by default). + +f. New active mark and face feature: when enabled, it will highlight the text + inserted by a bracketed paste (the `active region') and the text found by + incremental and non-incremental history searches. This is tied to bracketed + paste and can be disabled by turning off bracketed paste. + +g. Readline sets the mark in several additional commands. + +h. Bracketed paste mode is enabled by default. + +i. Readline tries to take advantage of the more regular structure of UTF-8 + characters to identify the beginning and end of characters when moving + through the line buffer. + +j. The bindable operate-and-get-next command (and its default bindings) are + now part of readline instead of a bash-specific addition. + +k. The signal cleanup code now blocks SIGINT while processing after a SIGINT. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-5.0 since +the release of bash-4.4. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. The `wait' builtin can now wait for the last process substitution created. + +b. There is an EPOCHSECONDS variable, which expands to the time in seconds + since the Unix epoch. + +c. There is an EPOCHREALTIME variable, which expands to the time in seconds + since the Unix epoch with microsecond granularity. + +d. New loadable builtins: rm, stat, fdflags. + +e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment. + +f. When supplied a numeric argument, the shell-expand-line bindable readline + command does not perform quote removal and suppresses command and process + substitution. + +g. `history -d' understands negative arguments: negative arguments offset from + the end of the history list. + +h. The `name' argument to the `coproc' reserved word now undergoes word + expansion, so unique coprocs can be created in loops. + +i. A nameref name resolution loop in a function now resolves to a variable by + that name in the global scope. + +j. The `wait' builtin now has a `-f' option, which signifies to wait until the + specified job or process terminates, instead of waiting until it changes + state. + +k. There is a define in config-top.h that allows the shell to use a static + value for $PATH, overriding whatever is in the environment at startup, for + use by the restricted shell. + +l. Process substitution does not inherit the `v' option, like command + substitution. + +m. If a non-interactive shell with job control enabled detects that a foreground + job died due to SIGINT, it acts as if it received the SIGINT. + +n. The SIGCHLD trap is run once for each exiting child process even if job + control is not enabled when the shell is in Posix mode. + +o. A new shopt option: localvar_inherit; if set, a local variable inherits the + value of a variable with the same name at the nearest preceding scope. + +p. `bind -r' now checks whether a key sequence is bound before binding it to + NULL, to avoid creating keymaps for a multi-key sequence. + +q. A numeric argument to the line editing `operate-and-get-next' command + specifies which history entry to use. + +r. The positional parameters are now assigned before running the shell startup + files, so startup files can use $@. + +s. There is a compile-time option that forces the shell to disable the check + for an inherited OLDPWD being a directory. + +t. The `history' builtin can now delete ranges of history entries using + `-d start-end'. + +u. The `vi-edit-and-execute-command' bindable readline command now puts readline + back in vi insertion mode after executing commands from the edited file. + +v. The command completion code now matches aliases and shell function names + case-insensitively if the readline completion-ignore-case variable is set. + +w. There is a new `assoc_expand_once' shell option that attempts to expand + associative array subscripts only once. + +x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended + debugging mode is active. The old behavior of unconditionally setting them + is available as part of the shell compatibility options. + +y. The `umask' builtin now allows modes and masks greater than octal 777. + +z. The `times' builtin now honors the current locale when printing a decimal + point. + +aa. There is a new (disabled by default, undocumented) shell option to enable + and disable sending history to syslog at runtime. + +bb. Bash no longer allows variable assignments preceding a special builtin that + changes variable attributes to propagate back to the calling environment + unless the compatibility level is 44 or lower. + +cc. You can set the default value for $HISTSIZE at build time in config-top.h. + +dd. The `complete' builtin now accepts a -I option that applies the completion + to the initial word on the line. + +ee. The internal bash malloc now uses mmap (if available) to satisfy requests + greater than 128K bytes, so free can use mfree to return the pages to the + kernel. + +ff. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup + unless it's in debugging mode, as the documentation has always said, but + will dynamically create them if a script references them at the top level + without having enabled debugging mode. + +gg. The localvar_inherit option will not attempt to inherit a value from a + variable of an incompatible type (indexed vs. associative arrays, for + example). + +hh. The `globasciiranges' option is now enabled by default; it can be set to + off by default at configuration time. + +ii. Associative and indexed arrays now allow subscripts consisting solely of + whitespace. + +jj. `checkwinsize' is now enabled by default. + +kk. The `localvar_unset' shopt option is now visible and documented. + +ll. The `progcomp_alias' shopt option is now visible and documented. + +mm. The signal name processing code now understands `SIGRTMIN+n' all the way + up to SIGRTMAX. + +nn. There is a new `seq' loadable builtin. + +oo. Trap execution now honors the (internal) max invocations of `eval', since + traps are supposed to be executed as if using `eval'. + +pp. The $_ variable doesn't change when the shell executes a command that forks. + +qq. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though + conforming applications aren't supposed to use them. + +rr. POSIX mode now enables the `shift_verbose' option. + +2. New Features in Readline + +a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as + Posix specifies (uses fnmatch(3) if available). + +b. There are new `next-screen-line' and `previous-screen-line' bindable + commands, which move the cursor to the same column in the next, or previous, + physical line, respectively. + +c. There are default key bindings for control-arrow-key key combinations. + +d. A negative argument (-N) to `quoted-insert' means to insert the next N + characters using quoted-insert. + +e. New public function: rl_check_signals(), which allows applications to + respond to signals that readline catches while waiting for input using + a custom read function. + +f. There is new support for conditionally testing the readline version in an + inputrc file, with a full set of arithmetic comparison operators available. + +g. There is a simple variable comparison facility available for use within an + inputrc file. Allowable operators are equality and inequality; string + variables may be compared to a value; boolean variables must be compared to + either `on' or `off'; variable names are separated from the operator by + whitespace. + +h. The history expansion library now understands command and process + substitution and extended globbing and allows them to appear anywhere in a + word. + +i. The history library has a new variable that allows applications to set the + initial quoting state, so quoting state can be inherited from a previous + line. + +j. Readline now allows application-defined keymap names; there is a new public + function, rl_set_keymap_name(), to do that. + +k. The "Insert" keypad key, if available, now puts readline into overwrite + mode. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-4.4 since +the release of bash-4.3. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. There is now a settable configuration #define that will cause the shell + to exit if the shell is running setuid without the -p option and setuid + to the real uid fails. + +b. Command and process substitutions now turn off the `-v' option when + executing, as other shells seem to do. + +c. The default value for the `checkhash' shell option may now be set at + compile time with a #define. + +d. The `mapfile' builtin now has a -d option to use an arbitrary character + as the record delimiter, and a -t option to strip the delimiter as + supplied with -d. + +e. The maximum number of nested recursive calls to `eval' is now settable in + config-top.h; the default is no limit. + +f. The `-p' option to declare and similar builtins will display attributes for + named variables even when those variables have not been assigned values + (which are technically unset). + +g. The maximum number of nested recursive calls to `source' is now settable + in config-top.h; the default is no limit. + +h. All builtin commands recognize the `--help' option and print a usage + summary. + +i. Bash does not allow function names containing `/' and `=' to be exported. + +j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options. + +k. The shell now allows `time ; othercommand' to time null commands. + +l. There is a new `--enable-function-import' configuration option to allow + importing shell functions from the environment; import is enabled by + default. + +m. `printf -v var ""' will now set `var' to the empty string, as if `var=""' + had been executed. + +n. GLOBIGNORE, the pattern substitution word expansion, and programmable + completion match filtering now honor the value of the `nocasematch' option. + +o. There is a new ${parameter@spec} family of operators to transform the + value of `parameter'. + +p. Bash no longer attempts to perform compound assignment if a variable on the + rhs of an assignment statement argument to `declare' has the form of a + compound assignment (e.g., w='(word)' ; declare foo=$w); compound + assignments are accepted if the variable was already declared as an array, + but with a warning. + +q. The declare builtin no longer displays array variables using the compound + assignment syntax with quotes; that will generate warnings when re-used as + input, and isn't necessary. + +r. Executing the rhs of && and || will no longer cause the shell to fork if + it's not necessary. + +s. The `local' builtin takes a new argument: `-', which will cause it to save + and the single-letter shell options and restore their previous values at + function return. + +t. `complete' and `compgen' have a new `-o nosort' option, which forces + readline to not sort the completion matches. + +u. Bash now allows waiting for the most recent process substitution, since it + appears as $!. + +v. The `unset' builtin now unsets a scalar variable if it is subscripted with + a `0', analogous to the ${var[0]} expansion. + +w. `set -i' is no longer valid, as in other shells. + +x. BASH_SUBSHELL is now updated for process substitution and group commands + in pipelines, and is available with the same value when running any exit + trap. + +y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or + not bash is being run in a GNU Emacs shell window. + +z. Bash now treats SIGINT received when running a non-builtin command in a + loop the way it has traditionally treated running a builtin command: + running any trap handler and breaking out of the loop. + +aa. New variable: EXECIGNORE; a colon-separate list of patterns that will + cause matching filenames to be ignored when searching for commands. + +bb. Aliases whose value ends in a shell metacharacter now expand in a way to + allow them to be `pasted' to the next token, which can potentially change + the meaning of a command (e.g., turning `&' into `&&'). + +cc. `make install' now installs the example loadable builtins and a set of + bash headers to use when developing new loadable builtins. + +dd. `enable -f' now attempts to call functions named BUILTIN_builtin_load when + loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows + loadable builtins to run initialization and cleanup code. + +ee. There is a new BASH_LOADABLES_PATH variable containing a list of directories + where the `enable -f' command looks for shared objects containing loadable + builtins. + +ff. The `complete_fullquote' option to `shopt' changes filename completion to + quote all shell metacharacters in filenames and directory names. + +gg. The `kill' builtin now has a `-L' option, equivalent to `-l', for + compatibility with Linux standalone versions of kill. + +hh. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial + environment. + +ii. inherit_errexit: a new `shopt' option that, when set, causes command + substitutions to inherit the -e option. By default, those subshells disable + -e. It's enabled as part of turning on posix mode. + +jj. New prompt string: PS0. Expanded and displayed by interactive shells after + reading a complete command but before executing it. + +kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to + SIG_DFL when the shell is started, so they are set to SIG_DFL in child + processes. + +ll. Posix-mode shells now allow double quotes to quote the history expansion + character. + +mm. OLDPWD can be inherited from the environment if it names a directory. + +nn. Shells running as root no longer inherit PS4 from the environment, closing + a security hole involving PS4 expansion performing command substitution. + +oo. If executing an implicit `cd' when the `autocd' option is set, bash will + now invoke a function named `cd' if one exists before executing the `cd' + builtin. + +pp. Value conversions (arithmetic expansions, case modification, etc.) now + happen when assigning elements of an array using compound assignment. + +qq. There is a new option settable in config-top.h that makes multiple + directory arguments to `cd' a fatal error. + +rr. Bash now uses mktemp() when creating internal temporary files; it produces + a warning at build time on many Linux systems. + +2. New Features in Readline + +a. The history truncation code now uses the same error recovery mechanism as + the history writing code, and restores the old version of the history file + on error. The error recovery mechanism handles symlinked history files. + +b. There is a new bindable variable, `enable-bracketed-paste', which enables + support for a terminal's bracketed paste mode. + +c. The editing mode indicators can now be strings and are user-settable + (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' + variables). Mode strings can contain invisible character sequences. + Setting mode strings to null strings restores the defaults. + +d. Prompt expansion adds the mode string to the last line of a multi-line + prompt (one with embedded newlines). + +e. There is a new bindable variable, `colored-completion-prefix', which, if + set, causes the common prefix of a set of possible completions to be + displayed in color. + +f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- + mode yank-pop. + +g. The redisplay code underwent several efficiency improvements for multibyte + locales. + +h. The insert-char function attempts to batch-insert all pending typeahead + that maps to self-insert, as long as it is coming from the terminal. + +i. rl_callback_sigcleanup: a new application function that can clean up and + unset any state set by readline's callback mode. Intended to be used + after a signal. + +j. If an incremental search string has its last character removed with DEL, the + resulting empty search string no longer matches the previous line. + +k. If readline reads a history file that begins with `#' (or the value of + the history comment character) and has enabled history timestamps, the + history entries are assumed to be delimited by timestamps. This allows + multi-line history entries. + +l. Readline now throws an error if it parses a key binding without a + terminating `:' or whitespace. + +m. The default binding for ^W in vi mode now uses word boundaries specified + by Posix (vi-unix-word-rubout is bindable command name). + +n. rl_clear_visible_line: new application-callable function; clears all + screen lines occupied by the current visible readline line. + +o. rl_tty_set_echoing: application-callable function that controls whether + or not readline thinks it is echoing terminal output. + +p. Handle >| and strings of digits preceding and following redirection + specifications as single tokens when tokenizing the line for history + expansion. + +q. Fixed a bug with displaying completions when the prefix display length + is greater than the length of the completions to be displayed. + +r. The :p history modifier now applies to the entire line, so any expansion + specifying :p causes the line to be printed instead of expanded. + +s. New application-callable function: rl_pending_signal(): returns the signal + number of any signal readline has caught but not yet handled. + +t. New application-settable variable: rl_persistent_signal_handlers: if set + to a non-zero value, readline will enable the readline-6.2 signal handler + behavior in callback mode: handlers are installed when + rl_callback_handler_install is called and removed removed when a complete + line has been read. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-4.3 since +the release of bash-4.2. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. The `helptopic' completion action now maps to all the help topics, not just + the shell builtins. + +b. The `help' builtin no longer does prefix substring matching first, so + `help read' does not match `readonly', but will do it if exact string + matching fails. + +c. The shell can be compiled to not display a message about processes that + terminate due to SIGTERM. + +d. Non-interactive shells now react to the setting of checkwinsize and set + LINES and COLUMNS after a foreground job exits. + +e. There is a new shell option, `globasciiranges', which, when set to on, + forces globbing range comparisons to use character ordering as if they + were run in the C locale. + +f. There is a new shell option, `direxpand', which makes filename completion + expand variables in directory names in the way bash-4.1 did. + +g. In Posix mode, the `command' builtin does not change whether or not a + builtin it shadows is treated as an assignment builtin. + +h. The `return' and `exit' builtins accept negative exit status arguments. + +i. The word completion code checks whether or not a filename containing a + shell variable expands to a directory name and appends `/' to the word + as appropriate. The same code expands shell variables in command names + when performing command completion. + +j. In Posix mode, it is now an error to attempt to define a shell function + with the same name as a Posix special builtin. + +k. When compiled for strict Posix conformance, history expansion is disabled + by default. + +l. The history expansion character (!) does not cause history expansion when + followed by the closing quote in a double-quoted string. + +m. `complete' and its siblings compgen/compopt now takes a new `-o noquote' + option to inhibit quoting of the completions. + +n. Setting HISTSIZE to a value less than zero causes the history list to be + unlimited (setting it 0 zero disables the history list). + +o. Setting HISTFILESIZE to a value less than zero causes the history file size + to be unlimited (setting it to 0 causes the history file to be truncated + to zero size). + +p. The `read' builtin now skips NUL bytes in the input. + +q. There is a new `bind -X' option to print all key sequences bound to Unix + commands. + +r. When in Posix mode, `read' is interruptible by a trapped signal. After + running the trap handler, read returns 128+signal and throws away any + partially-read input. + +s. The command completion code skips whitespace and assignment statements + before looking for the command name word to be completed. + +t. The build process has a new mechanism for constructing separate help files + that better reflects the current set of compilation options. + +u. The -nt and -ot options to test now work with files with nanosecond + timestamp resolution. + +v. The shell saves the command history in any shell for which history is + enabled and HISTFILE is set, not just interactive shells. + +w. The shell has `nameref' variables and new -n(/+n) options to declare and + unset to use them, and a `test -R' option to test for them. + +x. The shell now allows assigning, referencing, and unsetting elements of + indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which + count back from the last element of the array. + +y. The {x} operators to the [[ conditional command now do string + comparison according to the current locale if the compatibility level + is greater than 40. + +r. Programmable completion now uses the completion for `b' instead of `a' + when completion is attempted on a line like: a $(b c. + +s. Force extglob on temporarily when parsing the pattern argument to + the == and != operators to the [[ command, for compatibility. + +t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is + received and a trap on SIGCHLD is set to be Posix-mode only. + +u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS + characters, ignoring delimiters like newline. + +v. The mapfile/readarray builtin no longer stores the commands it invokes via + callbacks in the history list. + +w. There is a new `compat40' shopt option. + +2. New Features in Readline + +a. New bindable function: menu-complete-backward. + +b. In the vi insertion keymap, C-n is now bound to menu-complete by default, + and C-p to menu-complete-backward. + +c. When in vi command mode, repeatedly hitting ESC now does nothing, even + when ESC introduces a bound key sequence. This is closer to how + historical vi behaves. + +d. New bindable function: skip-csi-sequence. Can be used as a default to + consume key sequences generated by keys like Home and End without having + to bind all keys. + +e. New application-settable function: rl_filename_rewrite_hook. Can be used + to rewite or modify filenames read from the file system before they are + compared to the word to be completed. + +f. New bindable variable: skip-completed-text, active when completing in the + middle of a word. If enabled, it means that characters in the completion + that match characters in the remainder of the word are "skipped" rather + than inserted into the line. + +g. The pre-readline-6.0 version of menu completion is available as + "old-menu-complete" for users who do not like the readline-6.0 version. + +h. New bindable variable: echo-control-characters. If enabled, and the + tty ECHOCTL bit is set, controls the echoing of characters corresponding + to keyboard-generated signals. + +i. New bindable variable: enable-meta-key. Controls whether or not readline + sends the smm/rmm sequences if the terminal indicates it has a meta key + that enables eight-bit characters. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-4.0 since +the release of bash-3.2. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. When using substring expansion on the positional parameters, a starting + index of 0 now causes $0 to be prefixed to the list. + +b. The `help' builtin now prints its columns with entries sorted vertically + rather than horizontally. + +c. There is a new variable, $BASHPID, which always returns the process id of + the current shell. + +d. There is a new `autocd' option that, when enabled, causes bash to attempt + to `cd' to a directory name that is supplied as the first word of a + simple command. + +e. There is a new `checkjobs' option that causes the shell to check for and + report any running or stopped jobs at exit. + +f. The programmable completion code exports a new COMP_TYPE variable, set to + a character describing the type of completion being attempted. + +g. The programmable completion code exports a new COMP_KEY variable, set to + the character that caused the completion to be invoked (e.g., TAB). + +h. If creation of a child process fails due to insufficient resources, bash + will try again several times before reporting failure. + +i. The programmable completion code now uses the same set of characters as + readline when breaking the command line into a list of words. + +j. The block multiplier for the ulimit -c and -f options is now 512 when in + Posix mode, as Posix specifies. + +k. Changed the behavior of the read builtin to save any partial input received + in the specified variable when the read builtin times out. This also + results in variables specified as arguments to read to be set to the empty + string when there is no input available. When the read builtin times out, + it returns an exit status greater than 128. + +l. The shell now has the notion of a `compatibility level', controlled by + new variables settable by `shopt'. Setting this variable currently + restores the bash-3.1 behavior when processing quoted strings on the rhs + of the `=~' operator to the `[[' command. + +m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number + of threads) options. + +n. The -p option to `declare' now displays all variable values and attributes + (or function values and attributes if used with -f). + +o. There is a new `compopt' builtin that allows completion functions to modify + completion options for existing completions or the completion currently + being executed. + +p. The `read' builtin has a new -i option which inserts text into the reply + buffer when using readline. + +q. A new `-E' option to the complete builtin allows control of the default + behavior for completion on an empty line. + +r. There is now limited support for completing command name words containing + globbing characters. + +s. Changed format of internal help documentation for all builtins to roughly + follow man page format. + +t. The `help' builtin now has a new -d option, to display a short description, + and a -m option, to print help information in a man page-like format. + +u. There is a new `mapfile' builtin to populate an array with lines from a + given file. The name `readarray' is a synonym. + +v. If a command is not found, the shell attempts to execute a shell function + named `command_not_found_handle', supplying the command words as the + function arguments. + +w. There is a new shell option: `globstar'. When enabled, the globbing code + treats `**' specially -- it matches all directories (and files within + them, when appropriate) recursively. + +x. There is a new shell option: `dirspell'. When enabled, the filename + completion code performs spelling correction on directory names during + completion. + +y. The `-t' option to the `read' builtin now supports fractional timeout + values. + +z. Brace expansion now allows zero-padding of expanded numeric values and + will add the proper number of zeroes to make sure all values contain the + same number of digits. + +aa. There is a new bash-specific bindable readline function: `dabbrev-expand'. + It uses menu completion on a set of words taken from the history list. + +bb. The command assigned to a key sequence with `bind -x' now sets two new + variables in the environment of the executed command: READLINE_LINE_BUFFER + and READLINE_POINT. The command can change the current readline line + and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT, + respectively. + +cc. There is a new &>> redirection operator, which appends the standard output + and standard error to the named file. + +dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects + the standard error for a command through a pipe. + +ee. The new `;&' case statement action list terminator causes execution to + continue with the action associated with the next pattern in the + statement rather than terminating the command. + +ff. The new `;;&' case statement action list terminator causes the shell to + test the next set of patterns after completing execution of the current + action, rather than terminating the command. + +gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an + integer value greater than zero, prompt expansion of \w and \W will + retain only that number of trailing pathname components and replace + the intervening characters with `...'. + +hh. There are new case-modifying word expansions: uppercase (^[^]) and + lowercase (,[,]). They can work on either the first character or + array element, or globally. They accept an optional shell pattern + that determines which characters to modify. There is an optionally- + configured feature to include capitalization operators. + +ii. The shell provides associative array variables, with the appropriate + support to create, delete, assign values to, and expand them. + +jj. The `declare' builtin now has new -l (convert value to lowercase upon + assignment) and -u (convert value to uppercase upon assignment) options. + There is an optionally-configurable -c option to capitalize a value at + assignment. + +kk. There is a new `coproc' reserved word that specifies a coprocess: an + asynchronous command run with two pipes connected to the creating shell. + Coprocs can be named. The input and output file descriptors and the + PID of the coprocess are available to the calling shell in variables + with coproc-specific names. + +ll. A value of 0 for the -t option to `read' now returns success if there is + input available to be read from the specified file descriptor. + +mm. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged + mode. + +nn. New bindable readline functions shell-forward-word and shell-backward-word, + which move forward and backward words delimited by shell metacharacters + and honor shell quoting. + +oo. New bindable readline functions shell-backward-kill-word and shell-kill-word + which kill words backward and forward, but use the same word boundaries + as shell-forward-word and shell-backward-word. + +2. New Features in Readline + +a. A new variable, rl_sort_completion_matches; allows applications to inhibit + match list sorting (but beware: some things don't work right if + applications do this). + +b. A new variable, rl_completion_invoking_key; allows applications to discover + the key that invoked rl_complete or rl_menu_complete. + +c. The functions rl_block_sigint and rl_release_sigint are now public and + available to calling applications who want to protect critical sections + (like redisplay). + +d. The functions rl_save_state and rl_restore_state are now public and + available to calling applications; documented rest of readline's state + flag values. + +e. A new user-settable variable, `history-size', allows setting the maximum + number of entries in the history list. + +f. There is a new implementation of menu completion, with several improvements + over the old; the most notable improvement is a better `completions + browsing' mode. + +g. The menu completion code now uses the rl_menu_completion_entry_function + variable, allowing applications to provide their own menu completion + generators. + +h. There is support for replacing a prefix of a pathname with a `...' when + displaying possible completions. This is controllable by setting the + `completion-prefix-display-length' variable. Matches with a common prefix + longer than this value have the common prefix replaced with `...'. + +i. There is a new `revert-all-at-newline' variable. If enabled, readline will + undo all outstanding changes to all history lines when `accept-line' is + executed. + +j. If the kernel supports it, readline displays special characters + corresponding to a keyboard-generated signal when the signal is received. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-3.2 since +the release of bash-3.1. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. Changed the parameter pattern replacement functions to not anchor the + pattern at the beginning of the string if doing global replacement - that + combination doesn't make any sense. + +b. When running in `word expansion only' mode (--wordexp option), inhibit + process substitution. + +c. Loadable builtins now work on MacOS X 10.[34]. + +d. Shells running in posix mode no longer set $HOME, as POSIX requires. + +e. The code that checks for binary files being executed as shell scripts now + checks only for NUL rather than any non-printing character. + +f. Quoting the string argument to the [[ command's =~ operator now forces + string matching, as with the other pattern-matching operators. + +2. New Features in Readline + +a. Calling applications can now set the keyboard timeout to 0, allowing + poll-like behavior. + +b. The value of SYS_INPUTRC (configurable at compilation time) is now used as + the default last-ditch startup file. + +c. The history file reading functions now allow windows-like \r\n line + terminators. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-3.1 since +the release of bash-3.0. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. Bash now understands LC_TIME as a special variable so that time display + tracks the current locale. + +b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created + as `invisible' variables and may not be unset. + +c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't + try to interpret any options at all, as POSIX requires. + +d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify. + +e. Fixed vi-mode word completion and glob expansion to perform tilde + expansion. + +f. The `**' mathematic exponentiation operator is now right-associative. + +g. The `ulimit' builtin has new options: -i (max number of pending signals), + -q (max size of POSIX message queues), and -x (max number of file locks). + +h. A bare `%' once again expands to the current job when used as a job + specifier. + +i. The `+=' assignment operator (append to the value of a string or array) is + now supported for assignment statements and arguments to builtin commands + that accept assignment statements. + +j. BASH_COMMAND now preserves its value when a DEBUG trap is executed. + +k. The `gnu_errfmt' option is enabled automatically if the shell is running + in an emacs terminal window. + +l. New configuration option: --single-help-strings. Causes long help text + to be written as a single string; intended to ease translation. + +m. The COMP_WORDBREAKS variable now causes the list of word break characters + to be emptied when the variable is unset. + +n. An unquoted expansion of $* when $IFS is empty now causes the positional + parameters to be concatenated if the expansion doesn't undergo word + splitting. + +o. Bash now inherits $_ from the environment if it appears there at startup. + +p. New shell option: nocasematch. If non-zero, shell pattern matching ignores + case when used by `case' and `[[' commands. + +q. The `printf' builtin takes a new option: -v var. That causes the output + to be placed into var instead of on stdout. + +r. By default, the shell no longer reports processes dying from SIGPIPE. + +s. Bash now sets the extern variable `environ' to the export environment it + creates, so C library functions that call getenv() (and can't use the + shell-provided replacement) get current values of environment variables. + +t. A new configuration option, `--enable-strict-posix-default', which will + build bash to be POSIX conforming by default. + +u. If compiled for strict POSIX conformance, LINES and COLUMNS may now + override the true terminal size. + +2. New Features in Readline + +a. The key sequence sent by the keypad `delete' key is now automatically + bound to delete-char. + +b. A negative argument to menu-complete now cycles backward through the + completion list. + +c. A new bindable readline variable: bind-tty-special-chars. If non-zero, + readline will bind the terminal special characters to their readline + equivalents when it's called (on by default). + +d. New bindable command: vi-rubout. Saves deleted text for possible + reinsertion, as with any vi-mode `text modification' command; `X' is bound + to this in vi command mode. + +e. A new external application-controllable variable that allows the LINES + and COLUMNS environment variables to set the window size regardless of + what the kernel returns: rl_prefer_env_winsize + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-3.0 since +the release of bash-2.05b. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. ANSI string expansion now implements the \x{hexdigits} escape. + +b. There is a new loadable `strftime' builtin. + +c. New variable, COMP_WORDBREAKS, which controls the readline completer's + idea of word break characters. + +d. The `type' builtin no longer reports on aliases unless alias expansion + will actually be performed. + +e. HISTCONTROL is now a colon-separated list of values, which permits + more extensibility and backwards compatibility. + +f. HISTCONTROL may now include the `erasedups' option, which causes all lines + matching a line being added to be removed from the history list. + +g. `configure' has a new `--enable-multibyte' argument that permits multibyte + character support to be disabled even on systems that support it. + +h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV, + BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING, + BASH_COMMAND + +i. FUNCNAME has been changed to support the debugger: it's now an array + variable. + +j. for, case, select, arithmetic commands now keep line number information + for the debugger. + +k. There is a new `RETURN' trap executed when a function or sourced script + returns (not inherited child processes; inherited by command substitution + if function tracing is enabled and the debugger is active). + +l. New invocation option: --debugger. Enables debugging and turns on new + `extdebug' shell option. + +m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR + traps, respectively, to be inherited by shell functions. Equivalent to + `set -T' and `set -E' respectively. The `functrace' option also controls + whether or not the DEBUG trap is inherited by sourced scripts. + +n. The DEBUG trap is run before binding the variable and running the action + list in a `for' command, binding the selection variable and running the + query in a `select' command, and before attempting a match in a `case' + command. + +o. New `--enable-debugger' option to `configure' to compile in the debugger + support code. + +p. `declare -F' now prints out extra line number and source file information + if the `extdebug' option is set. + +q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes + the next command to be skipped, and a return value of 2 while in a + function or sourced script forces a `return'. + +r. New `caller' builtin to provide a call stack for the bash debugger. + +s. The DEBUG trap is run just before the first command in a function body is + executed, for the debugger. + +t. `for', `select', and `case' command heads are printed when `set -x' is + enabled. + +u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1, + x+2,...,y}. x and y can be integers or single characters; the sequence + may ascend or descend; the increment is always 1. + +v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices) + of array. + +w. New `force_fignore' shopt option; if enabled, suffixes specified by + FIGNORE cause words to be ignored when performing word completion even + if they're the only possibilities. + +x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu + style' (filename:lineno:message) format. + +y. New `-o bashdefault' option to complete and compgen; if set, causes the + whole set of bash completions to be performed if the compspec doesn't + result in a match. + +z. New `-o plusdirs' option to complete and compgen; if set, causes directory + name completion to be performed and the results added to the rest of the + possible completions. + +aa. `kill' is available as a builtin even when the shell is built without + job control. + +bb. New HISTTIMEFORMAT variable; value is a format string to pass to + strftime(3). If set and not null, the `history' builtin prints out + timestamp information according to the specified format when displaying + history entries. If set, bash tells the history library to write out + timestamp information when the history file is written. + +cc. The [[ ... ]] command has a new binary `=~' operator that performs + extended regular expression (egrep-like) matching. + +dd. `configure' has a new `--enable-cond-regexp' option (enabled by default) + to enable the =~ operator and regexp matching in [[ ... ]]. + +ee. Subexpressions matched by the =~ operator are placed in the new + BASH_REMATCH array variable. + +ff. New `failglob' option that causes an expansion error when pathname + expansion fails to produce a match. + +gg. New `set -o pipefail' option that causes a pipeline to return a failure + status if any of the processes in the pipeline fail, not just the last + one. + +hh. printf builtin understands two new escape sequences: \" and \?. + +ii. `echo -e' understands two new escape sequences: \" and \?. + +jj. The GNU `gettext' package and libintl have been integrated; the shell's + messages can be translated into different languages. + +kk. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'. + +ll. The error message printed when bash cannot open a shell script supplied + as argument 1 now includes the name of the shell, to better identify + the error as coming from bash. + +mm. The parameter pattern removal and substitution expansions are now much + faster and more efficient when using multibyte characters. + +nn. The `jobs', `kill', and `wait' builtins now accept job control notation + even if job control is not enabled. + +oo. The historical behavior of `trap' that allows a missing `action' argument + to cause each specified signal's handling to be reset to its default is + now only supported when `trap' is given a single non-option argument. + +2. New Features in Readline + +a. History expansion has a new `a' modifier equivalent to the `g' modifier + for compatibility with the BSD csh. + +b. History expansion has a new `G' modifier equivalent to the BSD csh `g' + modifier, which performs a substitution once per word. + +c. All non-incremental search operations may now undo the operation of + replacing the current line with the history line. + +d. The text inserted by an `a' command in vi mode can be reinserted with + `.'. + +e. New bindable variable, `show-all-if-unmodified'. If set, the readline + completer will list possible completions immediately if there is more + than one completion and partial completion cannot be performed. + +f. There is a new application-callable `free_history_entry()' function. + +g. History list entries now contain timestamp information; the history file + functions know how to read and write timestamp information associated + with each entry. + +h. Four new key binding functions have been added: + + rl_bind_key_if_unbound() + rl_bind_key_if_unbound_in_map() + rl_bind_keyseq_if_unbound() + rl_bind_keyseq_if_unbound_in_map() + +i. New application variable, rl_completion_quote_character, set to any + quote character readline finds before it calls the application completion + function. + +j. New application variable, rl_completion_suppress_quote, settable by an + application completion function. If set to non-zero, readline does not + attempt to append a closing quote to a completed word. + +k. New application variable, rl_completion_found_quote, set to a non-zero + value if readline determines that the word to be completed is quoted. + Set before readline calls any application completion function. + +l. New function hook, rl_completion_word_break_hook, called when readline + needs to break a line into words when completion is attempted. Allows + the word break characters to vary based on position in the line. + +m. New bindable command: unix-filename-rubout. Does the same thing as + unix-word-rubout, but adds `/' to the set of word delimiters. + +n. When listing completions, directories have a `/' appended if the + `mark-directories' option has been enabled. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-2.05b since +the release of bash-2.05a. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. If set, TMOUT is the default timeout for the `read' builtin. + +b. `type' has two new options: `-f' suppresses shell function lookup, and + `-P' forces a $PATH search. + +c. New code to handle multibyte characters. + +d. `select' was changed to be more ksh-compatible, in that the menu is + reprinted each time through the loop only if REPLY is set to NULL. + The previous behavior is available as a compile-time option. + +e. `complete -d' and `complete -o dirnames' now force a slash to be + appended to names which are symlinks to directories. + +f. There is now a bindable edit-and-execute-command readline command, + like the vi-mode `v' command, bound to C-xC-e in emacs mode. + +g. Added support for ksh93-like [:word:] character class in pattern matching. + +h. The $'...' quoting construct now expands \cX to Control-X. + +i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts + the result into the expanded prompt. + +j. The shell now performs arithmetic in the largest integer size the + machine supports (intmax_t), instead of long. + +k. If a numeric argument is supplied to one of the bash globbing completion + functions, a `*' is appended to the word before expansion is attempted. + +l. The bash globbing completion functions now allow completions to be listed + with double tabs or if `show-all-if-ambiguous' is set. + +m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses + readline's appending a space to the completed word. + +n. New `here-string' redirection operator: <<< word. + +o. When displaying variables, function attributes and definitions are shown + separately, allowing them to be re-used as input (attempting to re-use + the old output would result in syntax errors). + +p. There is a new configuration option `--enable-mem-scramble', controls + bash malloc behavior of writing garbage characters into memory at + allocation and free time. + +q. The `complete' and `compgen' builtins now have a new `-s/-A service' + option to complete on names from /etc/services. + +r. `read' has a new `-u fd' option to read from a specified file descriptor. + +s. Fix the completion code so that expansion errors in a directory name + don't cause a longjmp back to the command loop. + +t. Fixed word completion inside command substitution to work a little more + intuitively. + +u. The `printf' %q format specifier now uses $'...' quoting to print the + argument if it contains non-printing characters. + +v. The `declare' and `typeset' builtins have a new `-t' option. When applied + to functions, it causes the DEBUG trap to be inherited by the named + function. Currently has no effect on variables. + +w. The DEBUG trap is now run *before* simple commands, ((...)) commands, + [[...]] conditional commands, and for ((...)) loops. + +x. The expansion of $LINENO inside a shell function is only relative to the + function start if the shell is interactive -- if the shell is running a + script, $LINENO expands to the line number in the script. This is as + POSIX-2001 requires. + +y. The bash debugger in examples/bashdb has been modified to work with the + new DEBUG trap semantics, the command set has been made more gdb-like, + and the changes to $LINENO make debugging functions work better. Code + from Gary Vaughan. + +z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup + and close). + +aa. There is a new `-l' invocation option, equivalent to `--login'. + +bb. The `hash' builtin has a new `-l' option to list contents in a reusable + format, and a `-d' option to remove a name from the hash table. + +cc. There is now support for placing the long help text into separate files + installed into ${datadir}/bash. Not enabled by default; can be turned + on with `--enable-separate-helpfiles' option to configure. + +dd. All builtins that take operands accept a `--' pseudo-option, except + `echo'. + +ee. The `echo' builtin now accepts \0xxx (zero to three octal digits following + the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/ + POSIX.1-2001 compliance. + + +2. New Features in Readline + +a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both + be bound to readline functions. Now the arrow keys may be used in vi + insert mode. + +b. When listing completions, and the number of lines displayed is more than + the screen length, readline uses an internal pager to display the results. + This is controlled by the `page-completions' variable (default on). + +c. New code to handle editing and displaying multibyte characters. + +d. The behavior introduced in bash-2.05a of deciding whether or not to + append a slash to a completed name that is a symlink to a directory has + been made optional, controlled by the `mark-symlinked-directories' + variable (default is the 2.05a behavior). + +e. The `insert-comment' command now acts as a toggle if given a numeric + argument: if the first characters on the line don't specify a + comment, insert one; if they do, delete the comment text + +f. New application-settable completion variable: + rl_completion_mark_symlink_dirs, allows an application's completion + function to temporarily override the user's preference for appending + slashes to names which are symlinks to directories. + +g. New function available to application completion functions: + rl_completion_mode, to tell how the completion function was invoked + and decide which argument to supply to rl_complete_internal (to list + completions, etc.). + +h. Readline now has an overwrite mode, toggled by the `overwrite-mode' + bindable command, which could be bound to `Insert'. + +i. New application-settable completion variable: + rl_completion_suppress_append, inhibits appending of + rl_completion_append_character to completed words. + +j. New key bindings when reading an incremental search string: ^W yanks + the currently-matched word out of the current line into the search + string; ^Y yanks the rest of the current line into the search string, + DEL or ^H deletes characters from the search string. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-2.05a since +the release of bash-2.05. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. Added support for DESTDIR installation root prefix, so you can do a + `make install DESTDIR=bash-root' and do easier binary packaging. + +b. Added support for builtin printf "'" flag character as per latest POSIX + drafts. + +c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from + ISO C99). + +d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications + (bash doesn't use very much of what it returns). + +e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts, + but ignored. + +f. New read-only `shopt' option: login_shell. Set to non-zero value if the + shell is a login shell. + +g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format. + +h. New `-A group/-g' option to complete and compgen; does group name + completion. + +i. New `-t' option to `hash' to list hash values for each filename argument. + +j. New [-+]O invocation option to set and unset `shopt' options at startup. + +k. configure's `--with-installed-readline' option now takes an optional + `=PATH' suffix to set the root of the tree where readline is installed + to PATH. + +l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run + whenever the shell would have exited if the -e option were enabled. + It is not inherited by shell functions. + +m. `readonly', `export', and `declare' now print variables which have been + given attributes but not set by assigning a value as just a command and + a variable name (like `export foo') when listing, as the latest POSIX + drafts require. + +n. `bashbug' now requires that the subject be changed from the default. + +o. configure has a new `--enable-largefile' option, like other GNU utilities. + +p. `for' loops now allow empty word lists after `in', like the latest POSIX + drafts require. + +q. The builtin `ulimit' now takes two new non-numeric arguments: `hard', + meaning the current hard limit, and `soft', meaning the current soft + limit, in addition to `unlimited' + +r. `ulimit' now prints the option letter associated with a particular + resource when printing more than one limit. + +s. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is + one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively. + +t. The `printf' builtin now handles the %a and %A conversions if they're + implemented by printf(3). + +u. The `printf' builtin now handles the %F conversion (just about like %f). + +v. The `printf' builtin now handles the %n conversion like printf(3). The + corresponding argument is the name of a shell variable to which the + value is assigned. + +2. New Features in Readline + +a. Added extern declaration for rl_get_termcap to readline.h, making it a + public function (it was always there, just not in readline.h). + +b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402, + RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2. + +c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION. + +d. New bindable boolean readline variable: match-hidden-files. Controls + completion of files beginning with a `.' (on Unix). Enabled by default. + +e. The history expansion code now allows any character to terminate a + `:first-' modifier, like csh. + +f. New bindable variable `history-preserve-point'. If set, the history + code attempts to place the user at the same location on each history + line retrieved with previous-history or next-history. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-2.05 since +the release of bash-2.04. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. Added a new `--init-file' invocation argument as a synonym for `--rcfile', + per the new GNU coding standards. + +b. The /dev/tcp and /dev/udp redirections now accept service names as well as + port numbers. + +c. `complete' and `compgen' now take a `-o value' option, which controls some + of the aspects of that compspec. Valid values are: + + default - perform bash default completion if programmable + completion produces no matches + dirnames - perform directory name completion if programmable + completion produces no matches + filenames - tell readline that the compspec produces filenames, + so it can do things like append slashes to + directory names and suppress trailing spaces + +d. A new loadable builtin, realpath, which canonicalizes and expands symlinks + in pathname arguments. + +e. When `set' is called without options, it prints function definitions in a + way that allows them to be reused as input. This affects `declare' and + `declare -p' as well. This only happens when the shell is not in POSIX + mode, since POSIX.2 forbids this behavior. + +f. Bash-2.05 once again honors the current locale setting when processing + ranges within pattern matching bracket expressions (e.g., [A-Z]). + +2. New Features in Readline + +a. The blink timeout for paren matching is now settable by applications, + via the rl_set_paren_blink_timeout() function. + +b. _rl_executing_macro has been renamed to rl_executing_macro, which means + it's now part of the public interface. + +c. Readline has a new variable, rl_readline_state, which is a bitmap that + encapsulates the current state of the library; intended for use by + callbacks and hook functions. + +d. New application-callable function rl_set_prompt(const char *prompt): + expands its prompt string argument and sets rl_prompt to the result. + +e. New application-callable function rl_set_screen_size(int rows, int cols): + public method for applications to set readline's idea of the screen + dimensions. + +f. New function, rl_get_screen_size (int *rows, int *columns), returns + readline's idea of the screen dimensions. + +g. The timeout in rl_gather_tyi (readline keyboard input polling function) + is now settable via a function (rl_set_keyboard_input_timeout()). + +h. Renamed the max_input_history variable to history_max_entries; the old + variable is maintained for backwards compatibility. + +i. The list of characters that separate words for the history tokenizer is + now settable with a variable: history_word_delimiters. The default + value is as before. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-2.04 since +the release of bash-2.03. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. The history builtin has a `-d offset' option to delete the history entry + at position `offset'. + +b. The prompt expansion code has two new escape sequences: \j, the number of + active jobs; and \l, the basename of the shell's tty device name. + +c. The `bind' builtin has a new `-x' option to bind key sequences to shell + commands. + +d. There is a new shell option, no_empty_command_completion, which, when + enabled, disables command completion when TAB is typed on an empty line. + +e. The `help' builtin has a `-s' option to just print a builtin's usage + synopsis. + +f. There are several new arithmetic operators: id++, id-- (variable + post-increment/decrement), ++id, --id (variable pre-increment/decrement), + expr1 , expr2 (comma operator). + +g. There is a new ksh-93 style arithmetic for command: + for ((expr1 ; expr2; expr3 )); do list; done + +h. The `read' builtin has a number of new options: + -t timeout only wait timeout seconds for input + -n nchars only read nchars from input instead of a full line + -d delim read until delim rather than newline + -s don't echo input chars as they are read + +i. The redirection code now handles several filenames specially: + /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or + not they are present in the file system. + +j. The redirection code now recognizes pathnames of the form + /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket + of the appropriate type to the specified port on the specified host. + +k. The ksh-93 ${!prefix*} expansion, which expands to the names of all + shell variables with prefix PREFIX, has been implemented. + +l. There is a new dynamic variable, FUNCNAME, which expands to the name of + a currently-executing function. Assignments to FUNCNAME have no effect. + +m. The GROUPS variable is no longer readonly; assignments to it are silently + discarded. This means it can be unset. + +n. A new programmable completion facility, with two new builtin commands: + complete and compgen. + +o. configure has a new option, `--enable-progcomp', to compile in the + programmable completion features (enabled by default). + +p. `shopt' has a new option, `progcomp', to enable and disable programmable + completion at runtime. + +q. Unsetting HOSTFILE now clears the list of hostnames used for completion. + +r. configure has a new option, `--enable-bash-malloc', replacing the old + `--with-gnu-malloc' (which is still present for backwards compatibility). + +s. There is a new manual page describing rbash, the restricted shell. + +t. `bashbug' has new `--help' and `--version' options. + +u. `shopt' has a new `xpg_echo' option, which controls the behavior of + `echo' with respect to backslash-escaped characters at runtime. + +v. If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the + startup files, even if they are not interactive. + +w. The LC_NUMERIC variable is now treated specially, and used to set the + LC_NUMERIC locale category for number formatting, e.g., when `printf' + displays floating-point numbers. + +2. New features in Readline + +a. Parentheses matching is now always compiled into readline, and enabled + or disabled when the value of the `blink-matching-paren' variable is + changed. + +b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename. + +c. MS-DOS systems now use ~/_history as the default history file. + +d. history-search-{forward,backward} now leave the point at the end of the + line when the string to search for is empty, like + {reverse,forward}-search-history. + +e. history-search-{forward,backward} now leave the last history line found + in the readline buffer if the second or subsequent search fails. + +f. New function for use by applications: rl_on_new_line_with_prompt, used + when an application displays the prompt itself before calling readline(). + +g. New variable for use by applications: rl_already_prompted. An application + that displays the prompt itself before calling readline() must set this to + a non-zero value. + +h. A new variable, rl_gnu_readline_p, always 1. The intent is that an + application can verify whether or not it is linked with the `real' + readline library or some substitute. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-2.03 since +the release of bash-2.02. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. New `shopt' option, `restricted_shell', indicating whether or not the + shell was started in restricted mode, for use in startup files. + +b. Filename generation is now performed on the words between ( and ) in + array assignments (which it probably should have done all along). + +c. OLDPWD is now auto-exported, as POSIX.2 seems to require. + +d. ENV and BASH_ENV are read-only variables in a restricted shell. + +e. A change was made to the startup file code so that any shell begun with + the `--login' option, even non-interactive shells, will source the login + shell startup files. + +2. New Features in Readline + +a. Many changes to the signal handling: + o Readline now catches SIGQUIT and cleans up the tty before returning; + o A new variable, rl_catch_signals, is available to application writers + to indicate to readline whether or not it should install its own + signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, + SIGTTIN, and SIGTTOU; + o A new variable, rl_catch_sigwinch, is available to application + writers to indicate to readline whether or not it should install its + own signal handler for SIGWINCH, which will chain to the calling + applications's SIGWINCH handler, if one is installed; + o There is a new function, rl_free_line_state, for application signal + handlers to call to free up the state associated with the current + line after receiving a signal; + o There is a new function, rl_cleanup_after_signal, to clean up the + display and terminal state after receiving a signal; + o There is a new function, rl_reset_after_signal, to reinitialize the + terminal and display state after an application signal handler + returns and readline continues + +b. There is a new function, rl_resize_terminal, to reset readline's idea of + the screen size after a SIGWINCH. + +c. New public functions: rl_save_prompt and rl_restore_prompt. These were + previously private functions with a `_' prefix. + +d. New function hook: rl_pre_input_hook, called just before readline starts + reading input, after initialization. + +e. New function hook: rl_display_matches_hook, called when readline would + display the list of completion matches. The new function + rl_display_match_list is what readline uses internally, and is available + for use by application functions called via this hook. + +f. New bindable function, delete-char-or-list, like tcsh. + +g. A new variable, rl_erase_empty_line, which, if set by an application using + readline, will cause readline to erase, prompt and all, lines on which the + only thing typed was a newline. + +h. New bindable variable: `isearch-terminators'. + +i. New bindable function: `forward-backward-delete-char' (unbound by default). + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-2.02 since +the release of bash-2.01.1. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. A new version of malloc, based on the older GNU malloc, that has many + changes, is more page-based, is more conservative with memory usage, + and does not `orphan' large blocks when they are freed. + +b. A new version of gmalloc, based on the old GLIBC malloc, with many + changes and range checking included by default. + +c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic + Regular Expression matching, including character classes, collating + symbols, equivalence classes, and support for case-insensitive pattern + matching. + +d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been + implemented, controlled by a new `shopt' option, `extglob'. + +e. There is a new ksh-like `[[' compound command, which implements + extended `test' functionality. + +f. There is a new `printf' builtin, implemented according to the POSIX.2 + specification. + +g. There is a new feature for command substitution: $(< filename) now expands + to the contents of `filename', with any trailing newlines removed + (equivalent to $(cat filename)). + +h. There are new tilde prefixes which expand to directories from the + directory stack. + +i. There is a new `**' arithmetic operator to do exponentiation. + +j. There are new configuration options to control how bash is linked: + `--enable-profiling', to allow bash to be profiled with gprof, and + `--enable-static-link', to allow bash to be linked statically. + +k. There is a new configuration option, `--enable-cond-command', which + controls whether or not the `[[' command is included. It is on by + default. + +l. There is a new configuration option, `--enable-extended-glob', which + controls whether or not the ksh extended globbing feature is included. + It is enabled by default. + +m. There is a new configuration #define in config.h.top that, when enabled, + will cause all login shells to source /etc/profile and one of the user- + specific login shell startup files, whether or not the shell is + interactive. + +n. There is a new invocation option, `--dump-po-strings', to dump + a shell script's translatable strings ($"...") in GNU `po' format. + +o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive + pattern matching when globbing filenames and using the `case' construct. + +p. There is a new `shopt' option, `huponexit', which, when enabled, causes + the shell to send SIGHUP to all jobs when an interactive login shell + exits. + +q. `bind' has a new `-u' option, which takes a readline function name as an + argument and unbinds all key sequences bound to that function in a + specified keymap. + +r. `disown' now has `-a' and `-r' options, to limit operation to all jobs + and running jobs, respectively. + +s. The `shopt' `-p' option now causes output to be displayed in a reusable + format. + +t. `test' has a new `-N' option, which returns true if the filename argument + has been modified since it was last accessed. + +u. `umask' now has a `-p' option to print output in a reusable format. + +v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...' + translation code. It expands to the character whose ascii code is NNN + in hexadecimal. + +w. The prompt string expansion code has a new `\r' escape sequence. + +x. The shell may now be cross-compiled for the CYGWIN32 environment on + a Unix machine. + +2. New Features in Readline + +a. There is now an option for `iterative' yank-last-arg handline, so a user + can keep entering `M-.', yanking the last argument of successive history + lines. + +b. New variable, `print-completions-horizontally', which causes completion + matches to be displayed across the screen (like `ls -x') rather than up + and down the screen (like `ls'). + +c. New variable, `completion-ignore-case', which causes filename completion + and matching to be performed case-insensitively. + +d. There is a new bindable command, `magic-space', which causes history + expansion to be performed on the current readline buffer and a space to + be inserted into the result. + +e. There is a new bindable command, `menu-complete', which enables tcsh-like + menu completion (successive executions of menu-complete insert a single + completion match, cycling through the list of possible completions). + +f. There is a new bindable command, `paste-from-clipboard', for use on Win32 + systems, to insert the text from the Win32 clipboard into the editing + buffer. + +g. The key sequence translation code now understands printf-style backslash + escape sequences, including \NNN octal escapes. These escape sequences + may be used in key sequence definitions or macro values. + +h. An `$include' inputrc file parser directive has been added. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-2.01 since +the release of bash-2.0. As always, the manual page (doc/bash.1) is the +place to look for complete descriptions. + +1. New Features in Bash + +a. There is a new builtin array variable: GROUPS, the set of groups to which + the user belongs. This is used by the test suite. + +2. New Features in Readline + +a. If a key sequence bound to `universal-argument' is read while reading a + numeric argument started with `universal-argument', it terminates the + argument but is otherwise ignored. This provides a way to insert multiple + instances of a digit string, and is how GNU emacs does it. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-2.0 since +the release of bash-1.14.7. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. There is a new invocation option, -D, that dumps translatable strings + in a script. + +b. The `long' invocation options must now be prefixed with `--'. + +c. New long invocation options: --dump-strings, --help, --verbose + +d. The `nolineediting' invocation option was renamed to `noediting'. + +e. The `nobraceexpansion' and `quiet' long invocation options were removed. + +f. The `--help' and `--version' long options now work as the GNU coding + standards specify. + +g. If invoked as `sh', bash now enters posix mode after reading the + startup files, and reads and executes commands from the file named + by $ENV if interactive (as POSIX.2 specifies). A login shell invoked + as `sh' reads $ENV after /etc/profile and ~/.profile. + +h. There is a new reserved word, `time', for timing pipelines, builtin + commands, and shell functions. It uses the value of the TIMEFORMAT + variable as a format string describing how to print the timing + statistics. + +i. The $'...' quoting syntax expands ANSI-C escapes in ... and leaves the + result single-quoted. + +j. The $"..." quoting syntax performs locale-specific translation of ... + and leaves the result double-quoted. + +k. LINENO now works correctly in functions. + +l. New variables: DIRSTACK, PIPESTATUS, BASH_VERSINFO, HOSTNAME, SHELLOPTS, + MACHTYPE. The first three are array variables. + +m. The BASH_VERSION and BASH_VERSINFO variables now include the shell's + `release status' (alpha[N], beta[N], release). + +n. Some variables have been removed: MAIL_WARNING, notify, history_control, + command_oriented_history, glob_dot_filenames, allow_null_glob_expansion, + nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and + cdable_vars. Most of them are now implemented with the new `shopt' + builtin; others were already implemented by `set'. + +o. Bash now uses some new variables: LC_ALL, LC_MESSAGES, LC_CTYPE, + LC_COLLATE, LANG, GLOBIGNORE, HISTIGNORE. + +p. The shell now supports integer-indexed arrays of unlimited length, + with a new compound assignment syntax and changes to the appropriate + builtin commands (declare/typeset, read, readonly, etc.). The array + index may be an arithmetic expression. + +q. ${!var}: indirect variable expansion, equivalent to eval \${$var}. + +r. ${parameter:offset[:length]}: variable substring extraction. + +s. ${parameter/pattern[/[/]string]}: variable pattern substitution. + +t. The $[...] arithmetic expansion syntax is no longer supported, in + favor of $((...)). + +u. Aliases can now be expanded in shell scripts with a shell option + (shopt expand_aliases). + +v. History and history expansion can now be used in scripts with + set -o history and set -H. + +w. All builtins now return an exit status of 2 for incorrect usage. + +x. Interactive shells resend SIGHUP to all running or stopped children + if (and only if) they exit due to a SIGHUP. + +y. New prompting expansions: \a, \e, \H, \T, \@, \v, \V. + +z. Variable expansion in prompt strings is now controllable via a shell + option (shopt promptvars). + +aa. Bash now defaults to using command-oriented history. + +bb. The history file ($HISTFILE) is now truncated to $HISTFILESIZE after + being written. + +cc. The POSIX.2 conditional arithmetic evaluation syntax (expr ? expr : expr) + has been implemented. + +dd. Each builtin now accepts `--' to signify the end of the options, except + as documented (echo, etc.). + +ee. All builtins use -p to display values in a re-readable format where + appropriate, except as documented (echo, type, etc.). + +ff. The `alias' builtin has a new -p option. + +gg. Changes to the `bind' builtin: + o has new options: -psPSVr. + o the `-d' option was renamed to `-p' + o the `-v' option now dumps variables; the old `-v' is now `-P' + +hh. The `bye' synonym for `exit' was removed. + +ii. The -L and -P options to `cd' and `pwd' have been documented. + +jj. The `cd' builtin now does spelling correction on the directory name + by default. This is settable with a shell option (shopt cdspell). + +kk. The `declare' builtin has new options: -a, -F, -p. + +ll. The `dirs' builtin has new options: -c, -p, -v. + +mm. The new `disown' builtin removes jobs from the shell's jobs table + or inhibits the resending of SIGHUP when the shell receives a + SIGHUP. + +nn. The `echo' builtin has a new escape character: \e. + +oo. The `enable' builtin can now load new builtins dynamically from shared + objects on systems with the dlopen/dlsym interface. There are a number + of examples in the examples/loadables directory. There are also + new options: -d, -f, -s, -p. + +pp. The `-all' option to `enable' was removed in favor of `-a'. + +qq. The `exec' builtin has new options: -l, -c, -a. + +rr. The `hash' builtin has a new option: -p. + +ss. The `history' builtin has new options: -c, -p, -s. + +tt. The `jobs' builtin has new options: -r, -s. + +uu. The `kill' builtin has new options: -n signum, -l signame. + +vv. The `pushd' and `popd' builtins have a new option: -n. + +ww. The `read' builtin has new options: -p prompt, -e, -a. + +xx. The `readonly' builtin has a new -a option, and the -n option was removed. + +yy. Changes to the `set' builtin: + o new options: -B, -o keyword, -o onecmd, -o history + o options removed: -l, -d, -o nohash + o options changed: +o, -h, -o hashall + o now displays variables in a format that can be re-read as input + +zz. The new `shopt' builtin controls shell optional behavior previously + done by setting and unsetting certain shell variables. + +aaa. The `test' builtin has new operators: -o option, s1 == s2, s1 < s2, + and s1 > s2, where s1 and s2 are strings. + +bbb. There is a new trap, DEBUG, executed after every simple command. + +ccc. The `trap' builtin has a new -p option. + +ddd. The `ulimit' builtin has a new -l option on 4.4BSD-based systems. + +eee. The PS1, PS2, PATH, and IFS variables may now be unset. + +fff. The restricted shell mode has been expanded and is now documented. + +ggg. Security improvements: + o functions are not imported from the environment if running setuid + or with -p + o no startup files are sourced if running setuid or with -p + +hhh. The documentation has been overhauled: the texinfo manual was + expanded, and HTML versions of the man page and texinfo manual + are included. + +iii. Changes to Posix mode: + o Command lookup now finds special builtins before shell functions. + o Failure of a special builtin causes a non-interactive shell to + exit. Failures are defined in the POSIX.2 specification. + o If the `cd' builtin finds a directory to change to using $CDPATH, + the value assigned to PWD when `cd' completes does not contain + any symbolic links. + o A non-interactive shell exits if a variable assignment error + occurs when no command name follows the assignment statements. + o A non-interactive shell exits if the iteration variable in a + `for' statement or the selection variable in a `select' statement + is read-only or another variable assignment error occurs. + o The `<>' redirection operator now opens a file for both stdin and + stdout by default, not just when in posix mode. + o Assignment statements preceding special builtins now persist in + the shell's environment when the builtin completes. + + Posix mode is now completely POSIX.2-compliant (modulo bugs). When + invoked as sh, bash should be completely POSIX.2-compliant. + +jjj. The default value of PS1 is now "\s-\v\$ ". + +kkk. The ksh-like ((...)) arithmetic command syntax has been implemented. + This is exactly equivalent to `let "..."'. + +lll. Integer constants have been extended to base 64. + +mmm. The `ulimit' builtin now sets both hard and soft limits and reports the + soft limit by default. + +2. New Features in Readline + +a. New variables: enable-keypad, input-meta (new name for meta-flag), + mark-directories, visible-stats (now documented), disable-completion, + comment-begin. + +b. New bindable commands: kill-region, copy-region-as-kill, + copy-backward-word, copy-forward-word, set-mark, exchange-point-and-mark, + character-search, character-search-backward, insert-comment, + glob-expand-word, glob-list-expansions, dump-variables, dump-macros. + +c. New emacs keybindings: delete-horizontal-space (M-\), + insert-completions (M-*), possible-completions (M-=). + +d. The history-search-backward and history-search-forward commands were + modified to be the same as previous-line and next-line if point is at + the start of the line. + +e. More file types are available for the visible-stats mode. + +3. Changes of interest in the Bash implementation + +a. There is a new autoconf-based configuration mechanism. + +b. More things have been moved from Posix mode to standard shell behavior. + +c. The trace output (set -x) now inserts quotes where necessary so it can + be reused as input. + +d. There is a compile-time option for a system-wide interactive shell + startup file (disabled by default). + +e. The YACC grammar is smaller and tighter, and all 66 shift-reduce + conflicts are gone. Several parsing bugs have been fixed. + +f. Builtin option parsing has been regularized (using internal_getopt()), + with the exception of `echo', `type', and `set'. + +g. Builtins now return standard usage messages constructed from the + `short doc' used by the help builtin. + +h. Completion now quotes using backslashes by default, but honors + user-supplied quotes. + +i. The GNU libc malloc is available as a configure-time option. + +j. There are more internationalization features; bash uses gettext if + it is available. The $"..." translation syntax uses the current + locale and gettext. + +k. There is better reporting of job termination when the shell is not + interactive. + +l. The shell is somewhat more efficient: it uses a little less memory and + makes fewer system calls. + +4. Changes of interest in the Readline implementation + +a. There is now support for readline `callback' functions. + +b. There is now support for user-supplied input, redisplay, and terminal + preparation functions. + +c. Most of the shell-specific code in readline has been generalized or + removed. + +d. Most of the annoying redisplay bugs have been fixed, notably the problems + with incremental search and excessive redrawing when special characters + appear in the prompt string. + +e. There are new library functions and variables available to application + writers, most having to do with completion and quoting. + +f. The NEWLINE character (^J) is now treated as a search terminator by the + incremental search functions. +------------------------------------------------------------------------------- + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. diff --git a/bash-5.1/NOTES b/bash-5.1/NOTES new file mode 100644 index 0000000000000000000000000000000000000000..6fa019ae5aa5adabb4dadcfff029b6b9d788268a --- /dev/null +++ b/bash-5.1/NOTES @@ -0,0 +1,352 @@ +Platform-Specific Configuration and Operation Notes [very dated] +==================================================================== + +1. configure --without-gnu-malloc on: + + alpha running OSF/1, Linux, or NetBSD (malloc needs 8-byte alignment; + bash malloc has 8-byte alignment now, but I have no alphas to test on) + + next running NeXT/OS; machines running Openstep + + all machines running SunOS YP code: SunOS4, SunOS5, HP/UX, if you + have problems with username completion or tilde expansion for + usernames found via YP/NIS + + linux (optional, but don't do it if you're using Doug Lea's malloc) + + QNX 4.2 + other OSF/1 machines (KSR/1, HP, IBM AIX/ESA) + AIX + sparc SVR4, SVR4.2 (ICL reference port) + DG/UX + Cray + Haiku OS + + NetBSD/sparc (malloc needs 8-byte alignment; bash malloc has 8-byte + alignment now, but I have no NetBSD machines to test on) + + BSD/OS 2.1, 3.x if you want to use loadable builtins + + Motorola m68k machines running System V.3. There is a file descriptor + leak caused by using the bash malloc because closedir(3) needs to read + freed memory to find the file descriptor to close + +2. Configure using shlicc2 on BSD/OS 2.1 and BSD/OS 3.x to use loadable + builtins + +3. Bash cannot be built in a directory separate from the source directory + using configure --srcdir=... unless the version of `make' you're using + does $VPATH handling right. The script support/mkclone can be used to + create a `build tree' using symlinks to get around this. + +4. I've had reports that username completion (as well as tilde expansion + and \u prompt expansion) does not work on IRIX 5.3 when linking with + -lnsl. This is only a problem when you're running NIS, since + apparently -lnsl supports only /etc/passwd and not the NIS functions + for retrieving usernames and passwords. Editing the Makefile after + configure runs and removing the `-lnsl' from the assignment to `LIBS' + fixes the problem. + +5. There is a problem with the `makewhatis' script in older (pre-7.0) + versions of Red Hat Linux. Running `makewhatis' with bash-2.0 or + later versions results in error messages like this: + + /usr/sbin/makewhatis: cd: manpath: No such file or directory + /usr/sbin/makewhatis: manpath/whatis: No such file or directory + chmod: manpath/whatis: No such file or directory + /usr/sbin/makewhatis: cd: catpath: No such file or directory + /usr/sbin/makewhatis: catpath/whatis: No such file or directory + chmod: catpath/whatis: No such file or directory + + The problem is with `makewhatis'. Red Hat (and possibly other + Linux distributors) uses a construct like this in the code: + + eval path=$"$pages"path + + to do indirect variable expansion. This `happened to work' in + bash-1.14 and previous versions, but that was more an accident + of implementation than anything else -- it was never supported + and certainly is not portable. + + Bash-2.0 has a new feature that gives a new meaning to $"...". + This is explained more completely in item 1 in the COMPAT file. + + The three lines in the `makewhatis' script that need to be changed + look like this: + + eval $topath=$"$topath":$name + [...] + eval path=$"$pages"path + [...] + eval path=$"$pages"path + + The portable way to write this code is + + eval $topath="\$$topath":$name + eval path="\$$pages"path + eval path="\$$pages"path + + You could also experiment with another new bash feature: ${!var}. + This does indirect variable expansion, making the use of eval + unnecessary. + +6. There is a problem with syslogd on many Linux distributions (Red Hat + and Slackware are two that I have received reports about). syslogd + sends a SIGINT to its parent process, which is waiting for the daemon + to finish its initialization. The parent process then dies due to + the SIGINT, and bash reports it, causing unexpected console output + while the system is booting that looks something like + + starting daemons: syslogd/etc/rc.d/rc.M: line 29: 38 Interrupt ${NET}/syslogd + + Bash-2.0 reports events such as processes dying in scripts due to + signals when the standard output is a tty. Bash-1.14.x and previous + versions did not report such events. + + This should probably be reported as a bug to whatever Linux distributor + people see the problem on. In my opinion, syslogd should be changed to + use some other method of communication, or the wrapper function (which + appeared to be `daemon' when I looked at it some time ago) or script + (which appeared to be `syslog') should catch SIGINT, since it's an + expected event, and exit cleanly. + +7. Several people have reported that `dip' (a program for SLIP/PPP + on Linux) does not work with bash-2.0 installed as /bin/sh. + + I don't run any Linux boxes myself, and do not have the dip + code handy to look at, but the `problem' with bash-2.0, as + it has been related to me, is that bash requires the `-p' + option to be supplied at invocation if it is to run setuid + or setgid. + + This means, among other things, that setuid or setgid programs + which call system(3) (a horrendously bad practice in any case) + relinquish their setuid/setgid status in the child that's forked + to execute /bin/sh. + + The following is an *unofficial* patch to bash-2.0 that causes it + to not require `-p' to run setuid or setgid if invoked as `sh'. + It has been reported to work on Linux. It will make your system + vulnerable to bogus system(3) calls in setuid executables. + +--- ../bash-2.0.orig/shell.c Wed Dec 18 14:16:30 1996 ++++ shell.c Fri Mar 7 13:12:03 1997 +@@ -347,7 +347,7 @@ + if (posixly_correct) + posix_initialize (posixly_correct); + +- if (running_setuid && privileged_mode == 0) ++ if (running_setuid && privileged_mode == 0 && act_like_sh == 0) + disable_priv_mode (); + + /* Need to get the argument to a -c option processed in the + +8. Some people have asked about binding all of the keys in a PC-keyboard- + style numeric keypad to readline functions. Here's something I + received from the gnu-win32 list that may help. Insert the following + lines into ~/.inputrc: + +# home key +"\e[1~":beginning-of-line +# insert key +"\e[2~":kill-whole-line +# del key +"\e[3~":delete-char +# end key +"\e[4~":end-of-line +# pgup key +"\e[5~":history-search-forward +# pgdn key +"\e[6~":history-search-backward + +9. Hints for building under Minix 2.0 (Contributed by Terry R. McConnell, + ) + + The version of /bin/sh distributed with Minix is not up to the job of + running the configure script. The easiest solution is to swap /bin/sh + with /usr/bin/ash. Then use chmem(1) to increase the memory allocated + to /bin/sh. The following settings are known to work: + + text data bss stack memory + 63552 9440 3304 65536 141832 /bin/sh + + If you have problems with make or yacc it may be worthwhile first to + install the GNU versions of these utilities before attempting to build + bash. (As of this writing, all of these utilities are available for the + i386 as pre-built binaries via anonymous ftp at math.syr.edu in the + pub/mcconnell/minix directory. Note that the GNU version of yacc is called + bison.) + + Unless you want to see lots of warnings about old-style declarations, + do LOCAL_CFLAGS=-wo; export LOCAL_CFLAGS before running configure. + (These warnings are harmless, but annoying.) + + configure will insist that you supply a host type. For example, do + ./configure --host=i386-pc-minix. + + Minix does not support the system calls required for a proper + implementation of ulimit(). The `ulimit' builtin will not be available. + + Configure will fail to notice that many things like uid_t are indeed + typedef'd in , because it uses egrep for this purpose + and minix has no egrep. You could try making a link /usr/bin/egrep --> + /usr/bin/grep. Better is to install the GNU version of grep in + /usr/local/bin and make the link /usr/local/bin/egrep -->/usr/local/bin/grep. + (These must be hard links, of course, since Minix does not support + symbolic links.) + + You will see many warnings of the form: + warning: unknown s_type: 98 + I have no idea what this means, but it doesn't seem to matter. + +10. If you do not have /usr/ccs/bin in your PATH when building on SunOS 5.x + (Solaris 2), the configure script will be unable to find `ar' and + `ranlib' (of course, ranlib is unnecessary). Make sure your $PATH + includes /usr/ccs/bin on SunOS 5.x. This generally manifests itself + with libraries not being built and make reporting errors like + `cr: not found' when library construction is attempted. + +11. Building a statically-linked bash on Solaris 2.5.x, 2.6, 7, or 8 is + complicated. + + It's not possible to build a completely statically-linked binary, since + part of the C library depends on dynamic linking. The following recipe + assumes that you're using gcc and the Solaris ld (/usr/ccs/bin/ld) on + Solaris 2.5.x or 2.6: + + configure --enable-static-link + make STATIC_LD= LOCAL_LIBS='-Wl,-B,dynamic -ldl -Wl,-B,static' + + This should result in a bash binary that depends only on libdl.so: + + thor(2)$ ldd bash + libdl.so.1 => /usr/lib/libdl.so.1 + + If you're using the Sun C Compiler (Sun WorkShop C Compiler version + 4.2 was what I used), you should be able to get away with using + + configure --enable-static-link + make STATIC_LD= LOCAL_LIBS='-B dynamic -ldl -B static' + + If you want to completely remove any dependence on /usr, perhaps + to put a copy of bash in /sbin and have it available when /usr is + not mounted, force the build process to use the shared dl.so library + in /etc/lib. + + For gcc, this would be something like + + configure --enable-static-link + make STATIC_LD= LOCAL_LIBS='-Wl,-B,dynamic -Wl,-R/etc/lib -ldl -Wl,-B,static' + + For Sun's WS4.2 cc + + configure --enable-static-link + make STATIC_LD= LOCAL_LIBS='-B dynamic -R/etc/lib -ldl -B static' + + seems to work, at least on Solaris 2.5.1: + + thor(2)$ ldd bash + libdl.so.1 => /etc/lib/libdl.so.1 + + On Solaris 7 (Solaris 8, using the version of gcc on the free software + CD-ROM), the following recipe appears to work for gcc: + + configure --enable-static-link + make STATIC_LD='-Wl,-Bstatic' LOCAL_LIBS='-Wl,-Bdynamic -Wl,-R/etc/lib -ldl -Wl,-Bstatic' + + thor.ins.cwru.edu(2)$ ldd bash + libdl.so.1 => /etc/lib/libdl.so.1 + + Make the analogous changes if you are running Sun's C Compiler. + + I have received word that adding -L/etc/lib (or the equivalent + -Wl,-L/etc/lib) might also be necessary, in addition to the -R/etc/lib. + + On later versions of Solaris, it may be necessary to add -lnsl before + -ldl; statically-linked versions of bash using libnsl are not guaranteed + to work correctly on future versions of Solaris. + +12. Configuring bash to build it in a cross environment. Currently only + two native versions can be compiled this way, cygwin32 and x86 BeOS. + For BeOS, you would configure it like this: + + export RANLIB=i586-beos-ranlib + export AR=i586-beos-ar + export CC=i586-beos-gcc + configure i586-beos + + Similarly for cygwin32. + +13. Bash-2.05 has reverted to the bash-2.03 behavior of honoring the current + locale setting when processing ranges within pattern matching bracket + expressions ([A-Z]). This is what POSIX.2 and SUSv2 specify. + + The behavior of the matcher in bash-2.05 depends on the current LC_COLLATE + setting. Setting this variable to `C' or `POSIX' will result in the + traditional behavior ([A-Z] matches all uppercase ASCII characters). + Many other locales, including the en_US locale (the default on many US + versions of Linux) collate the upper and lower case letters like this: + + AaBb...Zz + + which means that [A-Z] matches every letter except `z'. + + The portable way to specify upper case letters is [:upper:] instead of + A-Z; lower case may be specified as [:lower:] instead of a-z. + + Look at the manual pages for setlocale(3), strcoll(3), and, if it is + present, locale(1). If you have locale(1), you can use it to find + your current locale information even if you do not have any of the + LC_ variables set. + + My advice is to put + + export LC_COLLATE=C + + into /etc/profile and inspect any shell scripts run from cron for + constructs like [A-Z]. This will prevent things like + + rm [A-Z]* + + from removing every file in the current directory except those beginning + with `z' and still allow individual users to change the collation order. + Users may put the above command into their own profiles as well, of course. + +14. Building on Interix (nee OpenNT), which Microsoft bought from Softway + Systems and has seemingly abandoned (thanks to Kevin Moore for this item). + + 1. cp cross-build/opennt.cache config.cache + + 2. If desired, edit pathnames.h to set the values of SYS_PROFILE and + DEFAULT_HOSTS_FILE appropriately. + + 3. export CONFIG_SHELL=$INTERIX_ROOT/bin/sh + + 4. ./configure --prefix=$INTERIX_ROOT/usr/local (or wherever you + want it). + + 5. make; make install; enjoy + +15. Configure with `CC=xlc' if you don't have gcc on AIX 4.2 and later + versions. `xlc' running in `cc' mode has trouble compiling error.c. + +16. Configure --disable-multibyte on NetBSD versions (1.4 through at least + 1.6.1) that include wctype.h but do not define wctype_t. + +17. Do NOT use bison-1.75. It builds a non-working parser. The most + obvious effect is that constructs like "for i; do echo $i; done" don't + loop over the positional parameters. + +18. I have received reports that using -O2 with the MIPSpro results in a + binary that fails in strange ways. Using -O1 seems to work. + +19. There is special handling to ensure the shell links against static + versions of the included readline and history libraries on Mac OS X; + Apple ships inadequate dynamic libreadline and libhistory "replacements" + as standard libraries. + +20. If you're on a system like SGI Irix, and you get an error about not + being able to refer to a dynamic symbol + (ld: non-dynamic relocations refer to dynamic symbol PC), add + -DNEED_EXTERN_PC to the LOCAL_CFLAGS variable in lib/readline/Makefile.in + and rebuild. diff --git a/bash-5.1/POSIX b/bash-5.1/POSIX new file mode 100644 index 0000000000000000000000000000000000000000..24114af144cc811ef999cd456fd4531a9df60d28 --- /dev/null +++ b/bash-5.1/POSIX @@ -0,0 +1,248 @@ +6.11 Bash POSIX Mode +==================== + +Starting Bash with the '--posix' command-line option or executing 'set +-o posix' while Bash is running will cause Bash to conform more closely +to the POSIX standard by changing the behavior to match that specified +by POSIX in areas where the Bash default differs. + +When invoked as 'sh', Bash enters POSIX mode after reading the startup +files. + +The following list is what's changed when 'POSIX mode' is in effect: + + 1. Bash ensures that the 'POSIXLY_CORRECT' variable is set. + + 2. When a command in the hash table no longer exists, Bash will + re-search '$PATH' to find the new location. This is also available + with 'shopt -s checkhash'. + + 3. Bash will not insert a command without the execute bit set into the + command hash table, even if it returns it as a (last-ditch) result + from a '$PATH' search. + + 4. The message printed by the job control code and builtins when a job + exits with a non-zero status is 'Done(status)'. + + 5. The message printed by the job control code and builtins when a job + is stopped is 'Stopped(SIGNAME)', where SIGNAME is, for example, + 'SIGTSTP'. + + 6. Alias expansion is always enabled, even in non-interactive shells. + + 7. Reserved words appearing in a context where reserved words are + recognized do not undergo alias expansion. + + 8. The POSIX 'PS1' and 'PS2' expansions of '!' to the history number + and '!!' to '!' are enabled, and parameter expansion is performed + on the values of 'PS1' and 'PS2' regardless of the setting of the + 'promptvars' option. + + 9. The POSIX startup files are executed ('$ENV') rather than the + normal Bash files. + + 10. Tilde expansion is only performed on assignments preceding a + command name, rather than on all assignment statements on the line. + + 11. The default history file is '~/.sh_history' (this is the default + value of '$HISTFILE'). + + 12. Redirection operators do not perform filename expansion on the + word in the redirection unless the shell is interactive. + + 13. Redirection operators do not perform word splitting on the word in + the redirection. + + 14. Function names must be valid shell 'name's. That is, they may not + contain characters other than letters, digits, and underscores, and + may not start with a digit. Declaring a function with an invalid + name causes a fatal syntax error in non-interactive shells. + + 15. Function names may not be the same as one of the POSIX special + builtins. + + 16. POSIX special builtins are found before shell functions during + command lookup. + + 17. When printing shell function definitions (e.g., by 'type'), Bash + does not print the 'function' keyword. + + 18. Literal tildes that appear as the first character in elements of + the 'PATH' variable are not expanded as described above under *note + Tilde Expansion::. + + 19. The 'time' reserved word may be used by itself as a command. When + used in this way, it displays timing statistics for the shell and + its completed children. The 'TIMEFORMAT' variable controls the + format of the timing information. + + 20. When parsing and expanding a ${...} expansion that appears within + double quotes, single quotes are no longer special and cannot be + used to quote a closing brace or other special character, unless + the operator is one of those defined to perform pattern removal. + In this case, they do not have to appear as matched pairs. + + 21. The parser does not recognize 'time' as a reserved word if the + next token begins with a '-'. + + 22. The '!' character does not introduce history expansion within a + double-quoted string, even if the 'histexpand' option is enabled. + + 23. If a POSIX special builtin returns an error status, a + non-interactive shell exits. The fatal errors are those listed in + the POSIX standard, and include things like passing incorrect + options, redirection errors, variable assignment errors for + assignments preceding the command name, and so on. + + 24. A non-interactive shell exits with an error status if a variable + assignment error occurs when no command name follows the assignment + statements. A variable assignment error occurs, for example, when + trying to assign a value to a readonly variable. + + 25. A non-interactive shell exits with an error status if a variable + assignment error occurs in an assignment statement preceding a + special builtin, but not with any other simple command. + + 26. A non-interactive shell exits with an error status if the + iteration variable in a 'for' statement or the selection variable + in a 'select' statement is a readonly variable. + + 27. Non-interactive shells exit if FILENAME in '.' FILENAME is not + found. + + 28. Non-interactive shells exit if a syntax error in an arithmetic + expansion results in an invalid expression. + + 29. Non-interactive shells exit if a parameter expansion error occurs. + + 30. Non-interactive shells exit if there is a syntax error in a script + read with the '.' or 'source' builtins, or in a string processed by + the 'eval' builtin. + + 31. While variable indirection is available, it may not be applied to + the '#' and '?' special parameters. + + 32. When expanding the '*' special parameter in a pattern context + where the expansion is double-quoted does not treat the '$*' as if + it were double-quoted. + + 33. Assignment statements preceding POSIX special builtins persist in + the shell environment after the builtin completes. + + 34. The 'command' builtin does not prevent builtins that take + assignment statements as arguments from expanding them as + assignment statements; when not in POSIX mode, assignment builtins + lose their assignment statement expansion properties when preceded + by 'command'. + + 35. The 'bg' builtin uses the required format to describe each job + placed in the background, which does not include an indication of + whether the job is the current or previous job. + + 36. The output of 'kill -l' prints all the signal names on a single + line, separated by spaces, without the 'SIG' prefix. + + 37. The 'kill' builtin does not accept signal names with a 'SIG' + prefix. + + 38. The 'export' and 'readonly' builtin commands display their output + in the format required by POSIX. + + 39. The 'trap' builtin displays signal names without the leading + 'SIG'. + + 40. The 'trap' builtin doesn't check the first argument for a possible + signal specification and revert the signal handling to the original + disposition if it is, unless that argument consists solely of + digits and is a valid signal number. If users want to reset the + handler for a given signal to the original disposition, they should + use '-' as the first argument. + + 41. 'trap -p' displays signals whose dispositions are set to SIG_DFL + and those that were ignored when the shell started. + + 42. The '.' and 'source' builtins do not search the current directory + for the filename argument if it is not found by searching 'PATH'. + + 43. Enabling POSIX mode has the effect of setting the + 'inherit_errexit' option, so subshells spawned to execute command + substitutions inherit the value of the '-e' option from the parent + shell. When the 'inherit_errexit' option is not enabled, Bash + clears the '-e' option in such subshells. + + 44. Enabling POSIX mode has the effect of setting the 'shift_verbose' + option, so numeric arguments to 'shift' that exceed the number of + positional parameters will result in an error message. + + 45. When the 'alias' builtin displays alias definitions, it does not + display them with a leading 'alias ' unless the '-p' option is + supplied. + + 46. When the 'set' builtin is invoked without options, it does not + display shell function names and definitions. + + 47. When the 'set' builtin is invoked without options, it displays + variable values without quotes, unless they contain shell + metacharacters, even if the result contains nonprinting characters. + + 48. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname + constructed from '$PWD' and the directory name supplied as an + argument does not refer to an existing directory, 'cd' will fail + instead of falling back to PHYSICAL mode. + + 49. When the 'cd' builtin cannot change a directory because the length + of the pathname constructed from '$PWD' and the directory name + supplied as an argument exceeds PATH_MAX when all symbolic links + are expanded, 'cd' will fail instead of attempting to use only the + supplied directory name. + + 50. The 'pwd' builtin verifies that the value it prints is the same as + the current directory, even if it is not asked to check the file + system with the '-P' option. + + 51. When listing the history, the 'fc' builtin does not include an + indication of whether or not a history entry has been modified. + + 52. The default editor used by 'fc' is 'ed'. + + 53. The 'type' and 'command' builtins will not report a non-executable + file as having been found, though the shell will attempt to execute + such a file if it is the only so-named file found in '$PATH'. + + 54. The 'vi' editing mode will invoke the 'vi' editor directly when + the 'v' command is run, instead of checking '$VISUAL' and + '$EDITOR'. + + 55. When the 'xpg_echo' option is enabled, Bash does not attempt to + interpret any arguments to 'echo' as options. Each argument is + displayed, after escape characters are converted. + + 56. The 'ulimit' builtin uses a block size of 512 bytes for the '-c' + and '-f' options. + + 57. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not + interrupt the 'wait' builtin and cause it to return immediately. + The trap command is run once for each child that exits. + + 58. The 'read' builtin may be interrupted by a signal for which a trap + has been set. If Bash receives a trapped signal while executing + 'read', the trap handler executes and 'read' returns an exit status + greater than 128. + + 59. Bash removes an exited background process's status from the list + of such statuses after the 'wait' builtin is used to obtain it. + +There is other POSIX behavior that Bash does not implement by default +even when in POSIX mode. Specifically: + + 1. The 'fc' builtin checks '$EDITOR' as a program to edit history + entries if 'FCEDIT' is unset, rather than defaulting directly to + 'ed'. 'fc' uses 'ed' if 'EDITOR' is unset. + + 2. As noted above, Bash requires the 'xpg_echo' option to be enabled + for the 'echo' builtin to be fully conformant. + +Bash can be configured to be POSIX-conformant by default, by specifying +the '--enable-strict-posix-default' to 'configure' when building (*note +Optional Features::). + diff --git a/bash-5.1/RBASH b/bash-5.1/RBASH new file mode 100644 index 0000000000000000000000000000000000000000..9732c769c3537afb9179a0d6886cd45fc56cf795 --- /dev/null +++ b/bash-5.1/RBASH @@ -0,0 +1,51 @@ +6.10 The Restricted Shell +========================= + +If Bash is started with the name 'rbash', or the '--restricted' or '-r' +option is supplied at invocation, the shell becomes restricted. A +restricted shell is used to set up an environment more controlled than +the standard shell. A restricted shell behaves identically to 'bash' +with the exception that the following are disallowed or not performed: + + * Changing directories with the 'cd' builtin. + * Setting or unsetting the values of the 'SHELL', 'PATH', 'HISTFILE', + 'ENV', or 'BASH_ENV' variables. + * Specifying command names containing slashes. + * Specifying a filename containing a slash as an argument to the '.' + builtin command. + * Specifying a filename containing a slash as an argument to the + 'history' builtin command. + * Specifying a filename containing a slash as an argument to the '-p' + option to the 'hash' builtin command. + * Importing function definitions from the shell environment at + startup. + * Parsing the value of 'SHELLOPTS' from the shell environment at + startup. + * Redirecting output using the '>', '>|', '<>', '>&', '&>', and '>>' + redirection operators. + * Using the 'exec' builtin to replace the shell with another command. + * Adding or deleting builtin commands with the '-f' and '-d' options + to the 'enable' builtin. + * Using the 'enable' builtin command to enable disabled shell + builtins. + * Specifying the '-p' option to the 'command' builtin. + * Turning off restricted mode with 'set +r' or 'set +o restricted'. + +These restrictions are enforced after any startup files are read. + +When a command that is found to be a shell script is executed (*note +Shell Scripts::), 'rbash' turns off any restrictions in the shell +spawned to execute the script. + +The restricted shell mode is only one component of a useful restricted +environment. It should be accompanied by setting 'PATH' to a value that +allows execution of only a few verified commands (commands that allow +shell escapes are particularly vulnerable), leaving the user in a +non-writable directory other than his home directory after login, not +allowing the restricted shell to execute shell scripts, and cleaning the +environment of variables that cause some commands to modify their +behavior (e.g., 'VISUAL' or 'PAGER'). + +Modern systems provide more secure ways to implement a restricted +environment, such as 'jails', 'zones', or 'containers'. + diff --git a/bash-5.1/README b/bash-5.1/README new file mode 100644 index 0000000000000000000000000000000000000000..70b7a8517415c2fcf324693ee33aca429fd99977 --- /dev/null +++ b/bash-5.1/README @@ -0,0 +1,111 @@ +Introduction +============ + +This is GNU Bash, version 5.1. Bash is the GNU Project's Bourne +Again SHell, a complete implementation of the POSIX shell spec, +but also with interactive command line editing, job control on +architectures that support it, csh-like features such as history +substitution and brace expansion, and a slew of other features. +For more information on the features of Bash that are new to this +type of shell, see the file `doc/bashref.texi'. There is also a +large Unix-style man page. The man page is the definitive description +of the shell's features. + +See the file POSIX for a discussion of how the Bash defaults differ +from the POSIX spec and a description of the Bash `posix mode'. + +There are some user-visible incompatibilities between this version +of Bash and previous widely-distributed versions, bash-4.4 and +bash-5.0. For details, see the file COMPAT. The NEWS file tersely +lists features that are new in this release. + +Bash is free software, distributed under the terms of the [GNU] General +Public License as published by the Free Software Foundation, +version 3 of the License (or any later version). For more information, +see the file COPYING. + +A number of frequently-asked questions are answered in the file +`doc/FAQ'. + +To compile Bash, type `./configure', then `make'. Bash auto-configures +the build process, so no further intervention should be necessary. Bash +builds with `gcc' by default if it is available. If you want to use `cc' +instead, type + + CC=cc ./configure + +if you are using a Bourne-style shell. If you are not, the following +may work: + + env CC=cc ./configure + +Read the file INSTALL in this directory for more information about how +to customize and control the build process. The file NOTES contains +platform-specific installation and configuration information. + +If you are a csh user and wish to convert your csh aliases to Bash +aliases, you may wish to use the script `examples/misc/alias-conv.sh' +as a starting point. The script `examples/misc/cshtobash' is a +more ambitious script that attempts to do a more complete job. + +Reporting Bugs +============== + +Bug reports for bash should be sent to: + + bug-bash@gnu.org + +using the `bashbug' program that is built and installed at the same +time as bash. + +The discussion list `bug-bash@gnu.org' often contains information +about new ports of Bash, or discussions of new features or behavior +changes that people would like. This mailing list is also available +as a usenet newsgroup: gnu.bash.bug. + +When you send a bug report, please use the `bashbug' program that is +built at the same time as bash. If bash fails to build, try building +bashbug directly with `make bashbug'. If you cannot build `bashbug', +please send mail to bug-bash@gnu.org with the following information: + + * the version number and release status of Bash (e.g., 2.05a-release) + * the machine and OS that it is running on (you may run + `bashversion -l' from the bash build directory for this information) + * a list of the compilation flags or the contents of `config.h', if + appropriate + * a description of the bug + * a recipe for recreating the bug reliably + * a fix for the bug if you have one! + +The `bashbug' program includes much of this automatically. + +Questions and requests for help with bash and bash programming may be +sent to the help-bash@gnu.org mailing list. + +If you would like to contact the Bash maintainers directly, send mail +to bash-maintainers@gnu.org. + +While the Bash maintainers do not promise to fix all bugs, we would +like this shell to be the best that we can make it. + +Other Packages +============== + +This distribution includes, in examples/bash-completion, a recent version +of the `bash-completion' package, which provides programmable completions +for a number of commands. It's available as a package in many distributions, +and that is the first place from which to obtain it. If it's not a package +from your vendor, you may install the included version. + +The latest version of bash-completion is always available from +https://github.com/scop/bash-completion. + +Enjoy! + +Chet Ramey +chet.ramey@case.edu + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. diff --git a/bash-5.1/Y2K b/bash-5.1/Y2K new file mode 100644 index 0000000000000000000000000000000000000000..d12e3525ddd04bce7805ae6bf21ff274d4a45327 --- /dev/null +++ b/bash-5.1/Y2K @@ -0,0 +1,4 @@ +Since Bash does not manipulate date strings, it is Y2K-safe. + +The only thing that Bash does with date strings is manipulate the string +returned by ctime(3) or strftime(3) in the prompt customization code. diff --git a/bash-5.1/_distribution b/bash-5.1/_distribution new file mode 100644 index 0000000000000000000000000000000000000000..76e9e619d633967075525c0a9191d24f652f1c4b --- /dev/null +++ b/bash-5.1/_distribution @@ -0,0 +1 @@ +5.1.4 diff --git a/bash-5.1/_patchlevel b/bash-5.1/_patchlevel new file mode 100644 index 0000000000000000000000000000000000000000..8445ef480577aab72d85b755fd6fd18f418f37a4 --- /dev/null +++ b/bash-5.1/_patchlevel @@ -0,0 +1 @@ +1.uelc20.1 diff --git a/bash-5.1/aclocal.m4 b/bash-5.1/aclocal.m4 new file mode 100644 index 0000000000000000000000000000000000000000..d131798ec2d4d6fab8ac29e126259d7bb9cf6942 --- /dev/null +++ b/bash-5.1/aclocal.m4 @@ -0,0 +1,2302 @@ +dnl +dnl Bash specific tests +dnl +dnl Some derived from PDKSH 5.1.3 autoconf tests +dnl + +AC_DEFUN(BASH_C_LONG_LONG, +[AC_CACHE_CHECK(for long long, ac_cv_c_long_long, +[if test "$GCC" = yes; then + ac_cv_c_long_long=yes +else +AC_TRY_RUN([ +#include +int +main() +{ +long long foo = 0; +exit(sizeof(long long) < sizeof(long)); +} +], ac_cv_c_long_long=yes, ac_cv_c_long_long=no) +fi]) +if test $ac_cv_c_long_long = yes; then + AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.]) +fi +]) + +dnl +dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX +dnl (< changed to <=) added. +dnl +AC_DEFUN(BASH_C_LONG_DOUBLE, +[AC_CACHE_CHECK(for long double, ac_cv_c_long_double, +[if test "$GCC" = yes; then + ac_cv_c_long_double=yes +else +AC_TRY_RUN([ +#include +int +main() +{ + /* The Stardent Vistra knows sizeof(long double), but does not + support it. */ + long double foo = 0.0; + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ + /* On IRIX 5.3, the compiler converts long double to double with a warning, + but compiles this successfully. */ + exit(sizeof(long double) <= sizeof(double)); +} +], ac_cv_c_long_double=yes, ac_cv_c_long_double=no) +fi]) +if test $ac_cv_c_long_double = yes; then + AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.]) +fi +]) + +dnl +dnl Check for . This is separated out so that it can be +dnl AC_REQUIREd. +dnl +dnl BASH_HEADER_INTTYPES +AC_DEFUN(BASH_HEADER_INTTYPES, +[ + AC_CHECK_HEADERS(inttypes.h) +]) + +dnl +dnl check for typedef'd symbols in header files, but allow the caller to +dnl specify the include files to be checked in addition to the default +dnl +dnl This could be changed to use AC_COMPILE_IFELSE instead of AC_EGREP_CPP +dnl +dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND]) +AC_DEFUN(BASH_CHECK_TYPE, +[ +AC_REQUIRE([AC_HEADER_STDC])dnl +AC_REQUIRE([BASH_HEADER_INTTYPES]) +AC_MSG_CHECKING(for $1) +AC_CACHE_VAL(bash_cv_type_$1, +[AC_EGREP_CPP($1, [#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +$2 +], bash_cv_type_$1=yes, bash_cv_type_$1=no)]) +AC_MSG_RESULT($bash_cv_type_$1) +ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then + AC_DEFINE($4) + fi]) +if test $bash_cv_type_$1 = no; then + AC_DEFINE_UNQUOTED($1, $3) +fi +]) + +dnl +dnl BASH_CHECK_DECL(FUNC) +dnl +dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like +dnl AC_CHECK_DECL +dnl +AC_DEFUN(BASH_CHECK_DECL, +[ +AC_REQUIRE([AC_HEADER_STDC]) +AC_REQUIRE([BASH_HEADER_INTTYPES]) +AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1, +[AC_TRY_LINK( +[ +#if STDC_HEADERS +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif +], +[return !$1;], +bash_cv_decl_$1=yes, bash_cv_decl_$1=no)]) +bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +if test $bash_cv_decl_$1 = yes; then + AC_DEFINE_UNQUOTED($bash_tr_func, 1) +else + AC_DEFINE_UNQUOTED($bash_tr_func, 0) +fi +]) + +AC_DEFUN(BASH_DECL_PRINTF, +[AC_MSG_CHECKING(for declaration of printf in ) +AC_CACHE_VAL(bash_cv_printf_declared, +[AC_TRY_RUN([ +#include +#ifdef __STDC__ +typedef int (*_bashfunc)(const char *, ...); +#else +typedef int (*_bashfunc)(); +#endif +#include +int +main() +{ +_bashfunc pf; +pf = (_bashfunc) printf; +exit(pf == 0); +} +], bash_cv_printf_declared=yes, bash_cv_printf_declared=no, + [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes) + bash_cv_printf_declared=yes] +)]) +AC_MSG_RESULT($bash_cv_printf_declared) +if test $bash_cv_printf_declared = yes; then +AC_DEFINE(PRINTF_DECLARED) +fi +]) + +AC_DEFUN(BASH_DECL_SBRK, +[AC_MSG_CHECKING(for declaration of sbrk in ) +AC_CACHE_VAL(bash_cv_sbrk_declared, +[AC_EGREP_HEADER(sbrk, unistd.h, + bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)]) +AC_MSG_RESULT($bash_cv_sbrk_declared) +if test $bash_cv_sbrk_declared = yes; then +AC_DEFINE(SBRK_DECLARED) +fi +]) + +dnl +dnl Check for sys_siglist[] or _sys_siglist[] +dnl +AC_DEFUN(BASH_DECL_UNDER_SYS_SIGLIST, +[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h]) +AC_CACHE_VAL(bash_cv_decl_under_sys_siglist, +[AC_TRY_COMPILE([ +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif], [ char *msg = _sys_siglist[2]; ], + bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no, + [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl +AC_MSG_RESULT($bash_cv_decl_under_sys_siglist) +if test $bash_cv_decl_under_sys_siglist = yes; then +AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED) +fi +]) + +AC_DEFUN(BASH_UNDER_SYS_SIGLIST, +[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST]) +AC_MSG_CHECKING([for _sys_siglist in system C library]) +AC_CACHE_VAL(bash_cv_under_sys_siglist, +[AC_TRY_RUN([ +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#ifndef UNDER_SYS_SIGLIST_DECLARED +extern char *_sys_siglist[]; +#endif +int +main() +{ +char *msg = (char *)_sys_siglist[2]; +exit(msg == 0); +}], + bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no, + [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no) + bash_cv_under_sys_siglist=no])]) +AC_MSG_RESULT($bash_cv_under_sys_siglist) +if test $bash_cv_under_sys_siglist = yes; then +AC_DEFINE(HAVE_UNDER_SYS_SIGLIST) +fi +]) + +AC_DEFUN(BASH_SYS_SIGLIST, +[AC_REQUIRE([AC_DECL_SYS_SIGLIST]) +AC_MSG_CHECKING([for sys_siglist in system C library]) +AC_CACHE_VAL(bash_cv_sys_siglist, +[AC_TRY_RUN([ +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#if !HAVE_DECL_SYS_SIGLIST +extern char *sys_siglist[]; +#endif +int +main() +{ +char *msg = sys_siglist[2]; +exit(msg == 0); +}], + bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no, + [AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no) + bash_cv_sys_siglist=no])]) +AC_MSG_RESULT($bash_cv_sys_siglist) +if test $bash_cv_sys_siglist = yes; then +AC_DEFINE(HAVE_SYS_SIGLIST) +fi +]) + +dnl Check for the various permutations of sys_siglist and make sure we +dnl compile in siglist.o if they're not defined +AC_DEFUN(BASH_CHECK_SYS_SIGLIST, [ +AC_REQUIRE([BASH_SYS_SIGLIST]) +AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST]) +AC_REQUIRE([BASH_FUNC_STRSIGNAL]) +if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then + SIGLIST_O=siglist.o +else + SIGLIST_O= +fi +AC_SUBST([SIGLIST_O]) +]) + +dnl Check for sys_errlist[] and sys_nerr, check for declaration +AC_DEFUN(BASH_SYS_ERRLIST, +[AC_MSG_CHECKING([for sys_errlist and sys_nerr]) +AC_CACHE_VAL(bash_cv_sys_errlist, +[AC_TRY_LINK([#include ], +[extern char *sys_errlist[]; + extern int sys_nerr; + char *msg = sys_errlist[sys_nerr - 1];], + bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl +AC_MSG_RESULT($bash_cv_sys_errlist) +if test $bash_cv_sys_errlist = yes; then +AC_DEFINE(HAVE_SYS_ERRLIST) +fi +]) + +dnl +dnl Check if dup2() does not clear the close on exec flag +dnl +AC_DEFUN(BASH_FUNC_DUP2_CLOEXEC_CHECK, +[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag) +AC_CACHE_VAL(bash_cv_dup2_broken, +[AC_TRY_RUN([ +#include +#include +#include +int +main() +{ + int fd1, fd2, fl; + fd1 = open("/dev/null", 2); + if (fcntl(fd1, 2, 1) < 0) + exit(1); + fd2 = dup2(fd1, 1); + if (fd2 < 0) + exit(2); + fl = fcntl(fd2, 1, 0); + /* fl will be 1 if dup2 did not reset the close-on-exec flag. */ + exit(fl != 1); +} +], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no, + [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no) + bash_cv_dup2_broken=no]) +]) +AC_MSG_RESULT($bash_cv_dup2_broken) +if test $bash_cv_dup2_broken = yes; then +AC_DEFINE(DUP2_BROKEN) +fi +]) + +AC_DEFUN(BASH_FUNC_STRSIGNAL, +[AC_MSG_CHECKING([for the existence of strsignal]) +AC_CACHE_VAL(bash_cv_have_strsignal, +[AC_TRY_LINK([#include +#include +#include ], +[char *s = (char *)strsignal(2);], + bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)]) +AC_MSG_RESULT($bash_cv_have_strsignal) +if test $bash_cv_have_strsignal = yes; then +AC_DEFINE(HAVE_STRSIGNAL) +fi +]) + +dnl Check to see if opendir will open non-directories (not a nice thing) +AC_DEFUN(BASH_FUNC_OPENDIR_CHECK, +[AC_REQUIRE([AC_HEADER_DIRENT])dnl +AC_MSG_CHECKING(if opendir() opens non-directories) +AC_CACHE_VAL(bash_cv_opendir_not_robust, +[AC_TRY_RUN([ +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#ifdef HAVE_SYS_STAT_H +#include +#endif +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ +#include +int +main() +{ +DIR *dir; +int fd, err; +err = mkdir("bash-aclocal", 0700); +if (err < 0) { + perror("mkdir"); + exit(1); +} +unlink("bash-aclocal/not_a_directory"); +fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666); +write(fd, "\n", 1); +close(fd); +dir = opendir("bash-aclocal/not_a_directory"); +unlink("bash-aclocal/not_a_directory"); +rmdir("bash-aclocal"); +exit (dir == 0); +}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no, + [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no) + bash_cv_opendir_not_robust=no] +)]) +AC_MSG_RESULT($bash_cv_opendir_not_robust) +if test $bash_cv_opendir_not_robust = yes; then +AC_DEFINE(OPENDIR_NOT_ROBUST) +fi +]) + +dnl +AC_DEFUN(BASH_TYPE_SIGHANDLER, +[AC_MSG_CHECKING([whether signal handlers are of type void]) +AC_CACHE_VAL(bash_cv_void_sighandler, +[AC_TRY_COMPILE([#include +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" +#endif +void (*signal ()) ();], +[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl +AC_MSG_RESULT($bash_cv_void_sighandler) +if test $bash_cv_void_sighandler = yes; then +AC_DEFINE(VOID_SIGHANDLER) +fi +]) + +dnl +dnl A signed 16-bit integer quantity +dnl +AC_DEFUN(BASH_TYPE_BITS16_T, +[ +if test "$ac_cv_sizeof_short" = 2; then + AC_CHECK_TYPE(bits16_t, short) +elif test "$ac_cv_sizeof_char" = 2; then + AC_CHECK_TYPE(bits16_t, char) +else + AC_CHECK_TYPE(bits16_t, short) +fi +]) + +dnl +dnl An unsigned 16-bit integer quantity +dnl +AC_DEFUN(BASH_TYPE_U_BITS16_T, +[ +if test "$ac_cv_sizeof_short" = 2; then + AC_CHECK_TYPE(u_bits16_t, unsigned short) +elif test "$ac_cv_sizeof_char" = 2; then + AC_CHECK_TYPE(u_bits16_t, unsigned char) +else + AC_CHECK_TYPE(u_bits16_t, unsigned short) +fi +]) + +dnl +dnl A signed 32-bit integer quantity +dnl +AC_DEFUN(BASH_TYPE_BITS32_T, +[ +if test "$ac_cv_sizeof_int" = 4; then + AC_CHECK_TYPE(bits32_t, int) +elif test "$ac_cv_sizeof_long" = 4; then + AC_CHECK_TYPE(bits32_t, long) +else + AC_CHECK_TYPE(bits32_t, int) +fi +]) + +dnl +dnl An unsigned 32-bit integer quantity +dnl +AC_DEFUN(BASH_TYPE_U_BITS32_T, +[ +if test "$ac_cv_sizeof_int" = 4; then + AC_CHECK_TYPE(u_bits32_t, unsigned int) +elif test "$ac_cv_sizeof_long" = 4; then + AC_CHECK_TYPE(u_bits32_t, unsigned long) +else + AC_CHECK_TYPE(u_bits32_t, unsigned int) +fi +]) + +AC_DEFUN(BASH_TYPE_PTRDIFF_T, +[ +if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then + AC_CHECK_TYPE(ptrdiff_t, int) +elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then + AC_CHECK_TYPE(ptrdiff_t, long) +elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then + AC_CHECK_TYPE(ptrdiff_t, [long long]) +else + AC_CHECK_TYPE(ptrdiff_t, int) +fi +]) + +dnl +dnl A signed 64-bit quantity +dnl +AC_DEFUN(BASH_TYPE_BITS64_T, +[ +if test "$ac_cv_sizeof_char_p" = 8; then + AC_CHECK_TYPE(bits64_t, char *) +elif test "$ac_cv_sizeof_double" = 8; then + AC_CHECK_TYPE(bits64_t, double) +elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then + AC_CHECK_TYPE(bits64_t, [long long]) +elif test "$ac_cv_sizeof_long" = 8; then + AC_CHECK_TYPE(bits64_t, long) +else + AC_CHECK_TYPE(bits64_t, double) +fi +]) + +AC_DEFUN(BASH_TYPE_LONG_LONG, +[ +AC_CACHE_CHECK([for long long], bash_cv_type_long_long, +[AC_TRY_LINK([ +long long ll = 1; int i = 63;], +[ +long long llm = (long long) -1; +return ll << i | ll >> i | llm / ll | llm % ll; +], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')]) +if test "$bash_cv_type_long_long" = 'long long'; then + AC_DEFINE(HAVE_LONG_LONG, 1) +fi +]) + +AC_DEFUN(BASH_TYPE_UNSIGNED_LONG_LONG, +[ +AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long, +[AC_TRY_LINK([ +unsigned long long ull = 1; int i = 63;], +[ +unsigned long long ullmax = (unsigned long long) -1; +return ull << i | ull >> i | ullmax / ull | ullmax % ull; +], bash_cv_type_unsigned_long_long='unsigned long long', + bash_cv_type_unsigned_long_long='unsigned long')]) +if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1) +fi +]) + +dnl +dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0) +dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use +dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify +dnl matters, this just checks for rlim_t, quad_t, or long. +dnl +AC_DEFUN(BASH_TYPE_RLIMIT, +[AC_MSG_CHECKING(for size and type of struct rlimit fields) +AC_CACHE_VAL(bash_cv_type_rlimit, +[AC_TRY_COMPILE([#include +#include ], +[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[ +AC_TRY_RUN([ +#include +#include +#include +#include +int +main() +{ +#ifdef HAVE_QUAD_T + struct rlimit rl; + if (sizeof(rl.rlim_cur) == sizeof(quad_t)) + exit(0); +#endif + exit(1); +}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long, + [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long) + bash_cv_type_rlimit=long])]) +]) +AC_MSG_RESULT($bash_cv_type_rlimit) +if test $bash_cv_type_rlimit = quad_t; then +AC_DEFINE(RLIMTYPE, quad_t) +elif test $bash_cv_type_rlimit = rlim_t; then +AC_DEFINE(RLIMTYPE, rlim_t) +fi +]) + +AC_DEFUN(BASH_TYPE_SIG_ATOMIC_T, +[AC_CACHE_CHECK([for sig_atomic_t in signal.h], ac_cv_have_sig_atomic_t, +[AC_TRY_LINK([ +#include +],[ sig_atomic_t x; ], +ac_cv_have_sig_atomic_t=yes, ac_cv_have_sig_atomic_t=no)]) +if test "$ac_cv_have_sig_atomic_t" = "no" +then + AC_CHECK_TYPE(sig_atomic_t,int) +fi +]) + +AC_DEFUN(BASH_FUNC_LSTAT, +[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an +dnl inline function in . +AC_CACHE_CHECK([for lstat], bash_cv_func_lstat, +[AC_TRY_LINK([ +#include +#include +],[ lstat(".",(struct stat *)0); ], +bash_cv_func_lstat=yes, bash_cv_func_lstat=no)]) +if test $bash_cv_func_lstat = yes; then + AC_DEFINE(HAVE_LSTAT) +fi +]) + +AC_DEFUN(BASH_FUNC_INET_ATON, +[ +AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton, +[AC_TRY_LINK([ +#include +#include +#include +struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ], +bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)]) +if test $bash_cv_func_inet_aton = yes; then + AC_DEFINE(HAVE_INET_ATON) +else + AC_LIBOBJ(inet_aton) +fi +]) + +AC_DEFUN(BASH_FUNC_GETENV, +[AC_MSG_CHECKING(to see if getenv can be redefined) +AC_CACHE_VAL(bash_cv_getenv_redef, +[AC_TRY_RUN([ +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif +char * +getenv (name) +#if defined (__linux__) || defined (__bsdi__) || defined (convex) + const char *name; +#else + char const *name; +#endif /* !__linux__ && !__bsdi__ && !convex */ +{ +return "42"; +} +int +main() +{ +char *s; +/* The next allows this program to run, but does not allow bash to link + when it redefines getenv. I'm not really interested in figuring out + why not. */ +#if defined (NeXT) +exit(1); +#endif +s = getenv("ABCDE"); +exit(s == 0); /* force optimizer to leave getenv in */ +} +], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no, + [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes) + bash_cv_getenv_redef=yes] +)]) +AC_MSG_RESULT($bash_cv_getenv_redef) +if test $bash_cv_getenv_redef = yes; then +AC_DEFINE(CAN_REDEFINE_GETENV) +fi +]) + +# We should check for putenv before calling this +AC_DEFUN(BASH_FUNC_STD_PUTENV, +[ +AC_REQUIRE([AC_HEADER_STDC]) +AC_REQUIRE([AC_C_PROTOTYPES]) +AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv, +[AC_TRY_LINK([ +#if STDC_HEADERS +#include +#include +#endif +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif +#ifdef PROTOTYPES +extern int putenv (char *); +#else +extern int putenv (); +#endif +], +[return (putenv == 0);], +bash_cv_std_putenv=yes, bash_cv_std_putenv=no +)]) +if test $bash_cv_std_putenv = yes; then +AC_DEFINE(HAVE_STD_PUTENV) +fi +]) + +# We should check for unsetenv before calling this +AC_DEFUN(BASH_FUNC_STD_UNSETENV, +[ +AC_REQUIRE([AC_HEADER_STDC]) +AC_REQUIRE([AC_C_PROTOTYPES]) +AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv, +[AC_TRY_LINK([ +#if STDC_HEADERS +#include +#include +#endif +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif +#ifdef PROTOTYPES +extern int unsetenv (const char *); +#else +extern int unsetenv (); +#endif +], +[return (unsetenv == 0);], +bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no +)]) +if test $bash_cv_std_unsetenv = yes; then +AC_DEFINE(HAVE_STD_UNSETENV) +fi +]) + +AC_DEFUN(BASH_FUNC_ULIMIT_MAXFDS, +[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize) +AC_CACHE_VAL(bash_cv_ulimit_maxfds, +[AC_TRY_RUN([ +#include +#ifdef HAVE_ULIMIT_H +#include +#endif +int +main() +{ +long maxfds = ulimit(4, 0L); +exit (maxfds == -1L); +} +], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no, + [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no) + bash_cv_ulimit_maxfds=no] +)]) +AC_MSG_RESULT($bash_cv_ulimit_maxfds) +if test $bash_cv_ulimit_maxfds = yes; then +AC_DEFINE(ULIMIT_MAXFDS) +fi +]) + +AC_DEFUN(BASH_FUNC_GETCWD, +[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory with 0 size]) +AC_CACHE_VAL(bash_cv_getcwd_malloc, +[AC_TRY_RUN([ +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +int +main() +{ + char *xpwd; + xpwd = getcwd(0, 0); + exit (xpwd == 0); +} +], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no, + [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no) + bash_cv_getcwd_malloc=no] +)]) +AC_MSG_RESULT($bash_cv_getcwd_malloc) +if test $bash_cv_getcwd_malloc = no; then +AC_DEFINE(GETCWD_BROKEN) +AC_LIBOBJ(getcwd) +fi +]) + +dnl +dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every +dnl system, we can't use AC_PREREQ +dnl +AC_DEFUN(BASH_FUNC_GETHOSTBYNAME, +[if test "X$bash_cv_have_gethostbyname" = "X"; then +_bash_needmsg=yes +else +AC_MSG_CHECKING(for gethostbyname in socket library) +_bash_needmsg= +fi +AC_CACHE_VAL(bash_cv_have_gethostbyname, +[AC_TRY_LINK([#include ], +[ struct hostent *hp; + hp = gethostbyname("localhost"); +], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)] +) +if test "X$_bash_needmsg" = Xyes; then + AC_MSG_CHECKING(for gethostbyname in socket library) +fi +AC_MSG_RESULT($bash_cv_have_gethostbyname) +if test "$bash_cv_have_gethostbyname" = yes; then +AC_DEFINE(HAVE_GETHOSTBYNAME) +fi +]) + +AC_DEFUN(BASH_FUNC_FNMATCH_EXTMATCH, +[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH) +AC_CACHE_VAL(bash_cv_fnm_extmatch, +[AC_TRY_RUN([ +#include + +int +main() +{ +#ifdef FNM_EXTMATCH + return (0); +#else + return (1); +#endif +} +], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no, + [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no) + bash_cv_fnm_extmatch=no]) +]) +AC_MSG_RESULT($bash_cv_fnm_extmatch) +if test $bash_cv_fnm_extmatch = yes; then +AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH) +fi +]) + +AC_DEFUN(BASH_FUNC_POSIX_SETJMP, +[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE]) +AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp) +AC_CACHE_VAL(bash_cv_func_sigsetjmp, +[AC_TRY_RUN([ +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include +#include + +int +main() +{ +#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) +exit (1); +#else + +int code; +sigset_t set, oset; +sigjmp_buf xx; + +/* get the mask */ +sigemptyset(&set); +sigemptyset(&oset); +sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); +sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); + +/* save it */ +code = sigsetjmp(xx, 1); +if (code) + exit(0); /* could get sigmask and compare to oset here. */ + +/* change it */ +sigaddset(&set, SIGINT); +sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); + +/* and siglongjmp */ +siglongjmp(xx, 10); +exit(1); +#endif +}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing, + [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing) + bash_cv_func_sigsetjmp=missing] +)]) +AC_MSG_RESULT($bash_cv_func_sigsetjmp) +if test $bash_cv_func_sigsetjmp = present; then +AC_DEFINE(HAVE_POSIX_SIGSETJMP) +fi +]) + +AC_DEFUN(BASH_FUNC_STRCOLL, +[ +AC_MSG_CHECKING(whether or not strcoll and strcmp differ) +AC_CACHE_VAL(bash_cv_func_strcoll_broken, +[AC_TRY_RUN([ +#include +#if defined (HAVE_LOCALE_H) +#include +#endif +#include +#include + +int +main(c, v) +int c; +char *v[]; +{ + int r1, r2; + char *deflocale, *defcoll; + +#ifdef HAVE_SETLOCALE + deflocale = setlocale(LC_ALL, ""); + defcoll = setlocale(LC_COLLATE, ""); +#endif + +#ifdef HAVE_STRCOLL + /* These two values are taken from tests/glob-test. */ + r1 = strcoll("abd", "aXd"); +#else + r1 = 0; +#endif + r2 = strcmp("abd", "aXd"); + + /* These two should both be greater than 0. It is permissible for + a system to return different values, as long as the sign is the + same. */ + + /* Exit with 1 (failure) if these two values are both > 0, since + this tests whether strcoll(3) is broken with respect to strcmp(3) + in the default locale. */ + exit (r1 > 0 && r2 > 0); +} +], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no, + [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no) + bash_cv_func_strcoll_broken=no] +)]) +AC_MSG_RESULT($bash_cv_func_strcoll_broken) +if test $bash_cv_func_strcoll_broken = yes; then +AC_DEFINE(STRCOLL_BROKEN) +fi +]) + +AC_DEFUN(BASH_FUNC_PRINTF_A_FORMAT, +[AC_MSG_CHECKING([for printf floating point output in hex notation]) +AC_CACHE_VAL(bash_cv_printf_a_format, +[AC_TRY_RUN([ +#include +#include +#include + +int +main() +{ + double y = 0.0; + char abuf[1024]; + + sprintf(abuf, "%A", y); + exit(strchr(abuf, 'P') == (char *)0); +} +], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no, + [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no) + bash_cv_printf_a_format=no] +)]) +AC_MSG_RESULT($bash_cv_printf_a_format) +if test $bash_cv_printf_a_format = yes; then +AC_DEFINE(HAVE_PRINTF_A_FORMAT) +fi +]) + +AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC, +[ +AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[ +#include +#include +]) +]) + +AC_DEFUN(BASH_STRUCT_TERMIO_LDISC, +[ +AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[ +#include +#include +]) +]) + +dnl +dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS +dnl +dnl sets bash_cv_struct_stat_st_blocks +dnl +dnl unused for now; we'll see how AC_CHECK_MEMBERS works +dnl +AC_DEFUN(BASH_STRUCT_ST_BLOCKS, +[ +AC_MSG_CHECKING([for struct stat.st_blocks]) +AC_CACHE_VAL(bash_cv_struct_stat_st_blocks, +[AC_TRY_COMPILE( +[ +#include +#include +], +[ +int +main() +{ +static struct stat a; +if (a.st_blocks) return 0; +return 0; +} +], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no) +]) +AC_MSG_RESULT($bash_cv_struct_stat_st_blocks) +if test "$bash_cv_struct_stat_st_blocks" = "yes"; then +AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS) +fi +]) + +AC_DEFUN([BASH_CHECK_LIB_TERMCAP], +[ +if test "X$bash_cv_termcap_lib" = "X"; then +_bash_needmsg=yes +else +AC_MSG_CHECKING(which library has the termcap functions) +_bash_needmsg= +fi +AC_CACHE_VAL(bash_cv_termcap_lib, +[AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc, + [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, + [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo, + [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, + [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, + [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw, + bash_cv_termcap_lib=gnutermcap)])])])])])]) +if test "X$_bash_needmsg" = "Xyes"; then +AC_MSG_CHECKING(which library has the termcap functions) +fi +AC_MSG_RESULT(using $bash_cv_termcap_lib) +if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then +LDFLAGS="$LDFLAGS -L./lib/termcap" +TERMCAP_LIB="./lib/termcap/libtermcap.a" +TERMCAP_DEP="./lib/termcap/libtermcap.a" +elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then +TERMCAP_LIB=-ltermcap +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libtinfo; then +TERMCAP_LIB=-ltinfo +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libncurses; then +TERMCAP_LIB=-lncurses +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libc; then +TERMCAP_LIB= +TERMCAP_DEP= +else +TERMCAP_LIB=-lcurses +TERMCAP_DEP= +fi +]) + +dnl +dnl Check for the presence of getpeername in libsocket. +dnl If libsocket is present, check for libnsl and add it to LIBS if +dnl it's there, since most systems with libsocket require linking +dnl with libnsl as well. This should only be called if getpeername +dnl was not found in libc. +dnl +dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT +dnl AS WELL +dnl +AC_DEFUN(BASH_CHECK_LIB_SOCKET, +[ +if test "X$bash_cv_have_socklib" = "X"; then +_bash_needmsg= +else +AC_MSG_CHECKING(for socket library) +_bash_needmsg=yes +fi +AC_CACHE_VAL(bash_cv_have_socklib, +[AC_CHECK_LIB(socket, getpeername, + bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)]) +if test "X$_bash_needmsg" = Xyes; then + AC_MSG_RESULT($bash_cv_have_socklib) + _bash_needmsg= +fi +if test $bash_cv_have_socklib = yes; then + # check for libnsl, add it to LIBS if present + if test "X$bash_cv_have_libnsl" = "X"; then + _bash_needmsg= + else + AC_MSG_CHECKING(for libnsl) + _bash_needmsg=yes + fi + AC_CACHE_VAL(bash_cv_have_libnsl, + [AC_CHECK_LIB(nsl, t_open, + bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)]) + if test "X$_bash_needmsg" = Xyes; then + AC_MSG_RESULT($bash_cv_have_libnsl) + _bash_needmsg= + fi + if test $bash_cv_have_libnsl = yes; then + LIBS="-lsocket -lnsl $LIBS" + else + LIBS="-lsocket $LIBS" + fi + AC_DEFINE(HAVE_LIBSOCKET) + AC_DEFINE(HAVE_GETPEERNAME) +fi +]) + +AC_DEFUN(BASH_STRUCT_DIRENT_D_INO, +[AC_REQUIRE([AC_HEADER_DIRENT]) +AC_MSG_CHECKING(for struct dirent.d_ino) +AC_CACHE_VAL(bash_cv_dirent_has_dino, +[AC_TRY_COMPILE([ +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ +],[ +struct dirent d; int z; z = d.d_ino; +], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)]) +AC_MSG_RESULT($bash_cv_dirent_has_dino) +if test $bash_cv_dirent_has_dino = yes; then +AC_DEFINE(HAVE_STRUCT_DIRENT_D_INO) +fi +]) + +AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO, +[AC_REQUIRE([AC_HEADER_DIRENT]) +AC_MSG_CHECKING(for struct dirent.d_fileno) +AC_CACHE_VAL(bash_cv_dirent_has_d_fileno, +[AC_TRY_COMPILE([ +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ +],[ +struct dirent d; int z; z = d.d_fileno; +], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)]) +AC_MSG_RESULT($bash_cv_dirent_has_d_fileno) +if test $bash_cv_dirent_has_d_fileno = yes; then +AC_DEFINE(HAVE_STRUCT_DIRENT_D_FILENO) +fi +]) + +AC_DEFUN(BASH_STRUCT_DIRENT_D_NAMLEN, +[AC_REQUIRE([AC_HEADER_DIRENT]) +AC_MSG_CHECKING(for struct dirent.d_namlen) +AC_CACHE_VAL(bash_cv_dirent_has_d_namlen, +[AC_TRY_COMPILE([ +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ +],[ +struct dirent d; int z; z = d.d_namlen; +], bash_cv_dirent_has_d_namlen=yes, bash_cv_dirent_has_d_namlen=no)]) +AC_MSG_RESULT($bash_cv_dirent_has_d_namlen) +if test $bash_cv_dirent_has_d_namlen = yes; then +AC_DEFINE(HAVE_STRUCT_DIRENT_D_NAMLEN) +fi +]) + +AC_DEFUN(BASH_STRUCT_TIMEVAL, +[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h) +AC_CACHE_VAL(bash_cv_struct_timeval, +[AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#if HAVE_SYS_TIME_H + #include + #endif + #include + ]], + [[static struct timeval x; x.tv_sec = x.tv_usec;]] + )], + bash_cv_struct_timeval=yes, + bash_cv_struct_timeval=no) +]) +AC_MSG_RESULT($bash_cv_struct_timeval) +if test $bash_cv_struct_timeval = yes; then + AC_DEFINE(HAVE_TIMEVAL) +fi +]) + +AC_DEFUN(BASH_STRUCT_TIMEZONE, +[AC_MSG_CHECKING(for struct timezone in sys/time.h and time.h) +AC_CACHE_VAL(bash_cv_struct_timezone, +[ +AC_EGREP_HEADER(struct timezone, sys/time.h, + bash_cv_struct_timezone=yes, + AC_EGREP_HEADER(struct timezone, time.h, + bash_cv_struct_timezone=yes, + bash_cv_struct_timezone=no)) +]) +AC_MSG_RESULT($bash_cv_struct_timezone) +if test $bash_cv_struct_timezone = yes; then + AC_DEFINE(HAVE_STRUCT_TIMEZONE) +fi +]) + +AC_DEFUN(BASH_STRUCT_WINSIZE, +[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h) +AC_CACHE_VAL(bash_cv_struct_winsize_header, +[AC_TRY_COMPILE([#include +#include ], [struct winsize x;], + bash_cv_struct_winsize_header=ioctl_h, + [AC_TRY_COMPILE([#include +#include ], [struct winsize x;], + bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other) +])]) +if test $bash_cv_struct_winsize_header = ioctl_h; then + AC_MSG_RESULT(sys/ioctl.h) + AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL) +elif test $bash_cv_struct_winsize_header = termios_h; then + AC_MSG_RESULT(termios.h) + AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS) +else + AC_MSG_RESULT(not found) +fi +]) + +dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) +AC_DEFUN(BASH_SYS_SIGNAL_VINTAGE, +[AC_REQUIRE([AC_TYPE_SIGNAL]) +AC_MSG_CHECKING(for type of signal functions) +AC_CACHE_VAL(bash_cv_signal_vintage, +[ + AC_TRY_LINK([#include ],[ + sigset_t ss; + struct sigaction sa; + sigemptyset(&ss); sigsuspend(&ss); + sigaction(SIGINT, &sa, (struct sigaction *) 0); + sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); + ], bash_cv_signal_vintage=posix, + [ + AC_TRY_LINK([#include ], [ + int mask = sigmask(SIGINT); + sigsetmask(mask); sigblock(mask); sigpause(mask); + ], bash_cv_signal_vintage=4.2bsd, + [ + AC_TRY_LINK([ + #include + RETSIGTYPE foo() { }], [ + int mask = sigmask(SIGINT); + sigset(SIGINT, foo); sigrelse(SIGINT); + sighold(SIGINT); sigpause(SIGINT); + ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7 + )] + )] +) +]) +AC_MSG_RESULT($bash_cv_signal_vintage) +if test "$bash_cv_signal_vintage" = posix; then +AC_DEFINE(HAVE_POSIX_SIGNALS) +elif test "$bash_cv_signal_vintage" = "4.2bsd"; then +AC_DEFINE(HAVE_BSD_SIGNALS) +elif test "$bash_cv_signal_vintage" = svr3; then +AC_DEFINE(HAVE_USG_SIGHOLD) +fi +]) + +dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process. +AC_DEFUN(BASH_SYS_PGRP_SYNC, +[AC_REQUIRE([AC_FUNC_GETPGRP]) +AC_MSG_CHECKING(whether pgrps need synchronization) +AC_CACHE_VAL(bash_cv_pgrp_pipe, +[AC_TRY_RUN([ +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_WAIT_H +# include +#endif +#include +int +main() +{ +# ifdef GETPGRP_VOID +# define getpgID() getpgrp() +# else +# define getpgID() getpgrp(0) +# define setpgid(x,y) setpgrp(x,y) +# endif + int pid1, pid2, fds[2]; + int status; + char ok; + + switch (pid1 = fork()) { + case -1: + exit(1); + case 0: + setpgid(0, getpid()); + exit(0); + } + setpgid(pid1, pid1); + + sleep(2); /* let first child die */ + + if (pipe(fds) < 0) + exit(2); + + switch (pid2 = fork()) { + case -1: + exit(3); + case 0: + setpgid(0, pid1); + ok = getpgID() == pid1; + write(fds[1], &ok, 1); + exit(0); + } + setpgid(pid2, pid1); + + close(fds[1]); + if (read(fds[0], &ok, 1) != 1) + exit(4); + wait(&status); + wait(&status); + exit(ok ? 0 : 5); +} +], bash_cv_pgrp_pipe=yes,bash_cv_pgrp_pipe=yes, + [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no) + bash_cv_pgrp_pipe=no]) +]) +AC_MSG_RESULT($bash_cv_pgrp_pipe) +if test $bash_cv_pgrp_pipe = yes; then +AC_DEFINE(PGRP_PIPE) +fi +]) + +AC_DEFUN(BASH_SYS_REINSTALL_SIGHANDLERS, +[AC_REQUIRE([AC_TYPE_SIGNAL]) +AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE]) +AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) +AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers, +[AC_TRY_RUN([ +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +typedef RETSIGTYPE sigfunc(); + +volatile int nsigint; + +#ifdef HAVE_POSIX_SIGNALS +sigfunc * +set_signal_handler(sig, handler) + int sig; + sigfunc *handler; +{ + struct sigaction act, oact; + act.sa_handler = handler; + act.sa_flags = 0; + sigemptyset (&act.sa_mask); + sigemptyset (&oact.sa_mask); + sigaction (sig, &act, &oact); + return (oact.sa_handler); +} +#else +#define set_signal_handler(s, h) signal(s, h) +#endif + +RETSIGTYPE +sigint(s) +int s; +{ + nsigint++; +} + +int +main() +{ + nsigint = 0; + set_signal_handler(SIGINT, sigint); + kill((int)getpid(), SIGINT); + kill((int)getpid(), SIGINT); + exit(nsigint != 2); +} +], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes, + [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no) + bash_cv_must_reinstall_sighandlers=no] +)]) +AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers) +if test $bash_cv_must_reinstall_sighandlers = yes; then +AC_DEFINE(MUST_REINSTALL_SIGHANDLERS) +fi +]) + +dnl check that some necessary job control definitions are present +AC_DEFUN(BASH_SYS_JOB_CONTROL_MISSING, +[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE]) +AC_MSG_CHECKING(for presence of necessary job control definitions) +AC_CACHE_VAL(bash_cv_job_control_missing, +[AC_TRY_COMPILE([ +#include +#ifdef HAVE_SYS_WAIT_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +/* add more tests in here as appropriate */ + +/* signal type */ +#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS) +#error +#endif + +/* signals and tty control. */ +#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT) +#error +#endif + +/* process control */ +#if !defined (WNOHANG) || !defined (WUNTRACED) +#error +#endif + +/* Posix systems have tcgetpgrp and waitpid. */ +#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP) +#error +#endif + +#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID) +#error +#endif + +/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */ +#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3) +#error +#endif + +], , bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing +)]) +AC_MSG_RESULT($bash_cv_job_control_missing) +if test $bash_cv_job_control_missing = missing; then +AC_DEFINE(JOB_CONTROL_MISSING) +fi +]) + +dnl check whether named pipes are present +dnl this requires a previous check for mkfifo, but that is awkward to specify +AC_DEFUN(BASH_SYS_NAMED_PIPES, +[AC_MSG_CHECKING(for presence of named pipes) +AC_CACHE_VAL(bash_cv_sys_named_pipes, +[AC_TRY_RUN([ +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include + +/* Add more tests in here as appropriate. */ +int +main() +{ +int fd, err; + +#if defined (HAVE_MKFIFO) +exit (0); +#endif + +#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO)) +exit (1); +#endif + +#if defined (NeXT) +exit (1); +#endif +err = mkdir("bash-aclocal", 0700); +if (err < 0) { + perror ("mkdir"); + exit(1); +} +fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0); +if (fd == -1) { + rmdir ("bash-aclocal"); + exit (1); +} +close(fd); +unlink ("bash-aclocal/sh-np-autoconf"); +rmdir ("bash-aclocal"); +exit(0); +}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing, + [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing) + bash_cv_sys_named_pipes=missing] +)]) +AC_MSG_RESULT($bash_cv_sys_named_pipes) +if test $bash_cv_sys_named_pipes = missing; then +AC_DEFINE(NAMED_PIPES_MISSING) +fi +]) + +AC_DEFUN(BASH_SYS_DEFAULT_MAIL_DIR, +[AC_MSG_CHECKING(for default mail directory) +AC_CACHE_VAL(bash_cv_mail_dir, +[if test -d /var/mail; then + bash_cv_mail_dir=/var/mail + elif test -d /var/spool/mail; then + bash_cv_mail_dir=/var/spool/mail + elif test -d /usr/mail; then + bash_cv_mail_dir=/usr/mail + elif test -d /usr/spool/mail; then + bash_cv_mail_dir=/usr/spool/mail + else + bash_cv_mail_dir=unknown + fi +]) +AC_MSG_RESULT($bash_cv_mail_dir) +AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir") +]) + +AC_DEFUN(BASH_HAVE_TIOCGWINSZ, +[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h) +AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl, +[AC_TRY_COMPILE([#include +#include ], [int x = TIOCGWINSZ;], + bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)]) +AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl) +if test $bash_cv_tiocgwinsz_in_ioctl = yes; then +AC_DEFINE(GWINSZ_IN_SYS_IOCTL) +fi +]) + +AC_DEFUN(BASH_HAVE_TIOCSTAT, +[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h) +AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl, +[AC_TRY_COMPILE([#include +#include ], [int x = TIOCSTAT;], + bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)]) +AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl) +if test $bash_cv_tiocstat_in_ioctl = yes; then +AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL) +fi +]) + +AC_DEFUN(BASH_HAVE_FIONREAD, +[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h) +AC_CACHE_VAL(bash_cv_fionread_in_ioctl, +[AC_TRY_COMPILE([#include +#include ], [int x = FIONREAD;], + bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)]) +AC_MSG_RESULT($bash_cv_fionread_in_ioctl) +if test $bash_cv_fionread_in_ioctl = yes; then +AC_DEFINE(FIONREAD_IN_SYS_IOCTL) +fi +]) + +dnl +dnl See if speed_t is declared in . Some versions of linux +dnl require a definition of speed_t each time is included, +dnl but you can only get speed_t if you include (on some +dnl versions) or (on others). +dnl +AC_DEFUN(BASH_CHECK_SPEED_T, +[AC_MSG_CHECKING(for speed_t in sys/types.h) +AC_CACHE_VAL(bash_cv_speed_t_in_sys_types, +[AC_TRY_COMPILE([#include ], [speed_t x;], + bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)]) +AC_MSG_RESULT($bash_cv_speed_t_in_sys_types) +if test $bash_cv_speed_t_in_sys_types = yes; then +AC_DEFINE(SPEED_T_IN_SYS_TYPES) +fi +]) + +AC_DEFUN(BASH_CHECK_GETPW_FUNCS, +[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h) +AC_CACHE_VAL(bash_cv_getpw_declared, +[AC_EGREP_CPP(getpwuid, +[ +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include +], +bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)]) +AC_MSG_RESULT($bash_cv_getpw_declared) +if test $bash_cv_getpw_declared = yes; then +AC_DEFINE(HAVE_GETPW_DECLS) +fi +]) + +AC_DEFUN(BASH_CHECK_DEV_FD, +[AC_MSG_CHECKING(whether /dev/fd is available) +AC_CACHE_VAL(bash_cv_dev_fd, +[bash_cv_dev_fd="" +if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then +# check for systems like FreeBSD 5 that only provide /dev/fd/[012] + if (exec test -r /dev/fd/3 3 +#include +], +[ + int f; + f = RLIMIT_DATA; +], bash_cv_kernel_rlimit=no, +[AC_TRY_COMPILE([ +#include +#define _KERNEL +#include +#undef _KERNEL +], +[ + int f; + f = RLIMIT_DATA; +], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)] +)]) +AC_MSG_RESULT($bash_cv_kernel_rlimit) +if test $bash_cv_kernel_rlimit = yes; then +AC_DEFINE(RLIMIT_NEEDS_KERNEL) +fi +]) + +dnl +dnl Check for 64-bit off_t -- used for malloc alignment +dnl +dnl C does not allow duplicate case labels, so the compile will fail if +dnl sizeof(off_t) is > 4. +dnl +AC_DEFUN(BASH_CHECK_OFF_T_64, +[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64, +AC_TRY_COMPILE([ +#ifdef HAVE_UNISTD_H +#include +#endif +#include +],[ +switch (0) case 0: case (sizeof (off_t) <= 4):; +], bash_cv_off_t_64=no, bash_cv_off_t_64=yes)) +if test $bash_cv_off_t_64 = yes; then + AC_DEFINE(HAVE_OFF_T_64) +fi]) + +AC_DEFUN(BASH_CHECK_RTSIGS, +[AC_MSG_CHECKING(for unusable real-time signals due to large values) +AC_CACHE_VAL(bash_cv_unusable_rtsigs, +[AC_TRY_RUN([ +#include +#include +#include + +#ifndef NSIG +# define NSIG 64 +#endif + +int +main () +{ + int n_sigs = 2 * NSIG; +#ifdef SIGRTMIN + int rtmin = SIGRTMIN; +#else + int rtmin = 0; +#endif + + exit(rtmin < n_sigs); +}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no, + [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes) + bash_cv_unusable_rtsigs=yes] +)]) +AC_MSG_RESULT($bash_cv_unusable_rtsigs) +if test $bash_cv_unusable_rtsigs = yes; then +AC_DEFINE(UNUSABLE_RT_SIGNALS) +fi +]) + +dnl +dnl check for availability of multibyte characters and functions +dnl +dnl geez, I wish I didn't have to check for all of this stuff separately +dnl +AC_DEFUN(BASH_CHECK_MULTIBYTE, +[ +AC_CHECK_HEADERS(wctype.h) +AC_CHECK_HEADERS(wchar.h) +AC_CHECK_HEADERS(langinfo.h) + +AC_CHECK_HEADERS(mbstr.h) + +AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN)) +AC_CHECK_FUNC(mbscasecmp, AC_DEFINE(HAVE_MBSCMP)) +AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP)) +AC_CHECK_FUNC(mbsnrtowcs, AC_DEFINE(HAVE_MBSNRTOWCS)) +AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) + +AC_REPLACE_FUNCS(mbschr) + +AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB)) +AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL)) +AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP)) +AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) +AC_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE)) + +AC_REPLACE_FUNCS(wcswidth) + +dnl checks for both mbrtowc and mbstate_t +AC_FUNC_MBRTOWC +if test $ac_cv_func_mbrtowc = yes; then + AC_DEFINE(HAVE_MBSTATE_T) +fi + +AC_CHECK_FUNCS(iswlower iswupper towlower towupper iswctype) + +AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset, +[AC_TRY_LINK( +[#include ], +[char* cs = nl_langinfo(CODESET);], +bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)]) +if test $bash_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET) +fi + +dnl check for wchar_t in +AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t, +[AC_TRY_COMPILE( +[#include +], +[ + wchar_t foo; + foo = 0; +], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)]) +if test $bash_cv_type_wchar_t = yes; then + AC_DEFINE(HAVE_WCHAR_T, 1, [systems should define this type here]) +fi + +dnl check for wctype_t in +AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t, +[AC_TRY_COMPILE( +[#include ], +[ + wctype_t foo; + foo = 0; +], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)]) +if test $bash_cv_type_wctype_t = yes; then + AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here]) +fi + +dnl check for wint_t in +AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t, +[AC_TRY_COMPILE( +[#include ], +[ + wint_t foo; + foo = 0; +], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)]) +if test $bash_cv_type_wint_t = yes; then + AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here]) +fi + +dnl check for broken wcwidth +AC_CACHE_CHECK([for wcwidth broken with unicode combining characters], +bash_cv_wcwidth_broken, +[AC_TRY_RUN([ +#include +#include +#include + +#include +#include + +int +main(c, v) +int c; +char **v; +{ + int w; + + setlocale(LC_ALL, "en_US.UTF-8"); + w = wcwidth (0x0301); + exit (w == 0); /* exit 0 if wcwidth broken */ +} +], +bash_cv_wcwidth_broken=yes, bash_cv_wcwidth_broken=no, bash_cv_wcwidth_broken=no)]) +if test "$bash_cv_wcwidth_broken" = yes; then + AC_DEFINE(WCWIDTH_BROKEN, 1, [wcwidth is usually not broken]) +fi + +if test "$am_cv_func_iconv" = yes; then + OLDLIBS="$LIBS" + LIBS="$LIBS $LIBINTL $LIBICONV" + AC_CHECK_FUNCS(locale_charset) + LIBS="$OLDLIBS" +fi + +AC_CHECK_SIZEOF(wchar_t, 4) + +]) + +dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB +dnl require: +dnl AC_PROG_CC +dnl BASH_CHECK_LIB_TERMCAP + +AC_DEFUN([RL_LIB_READLINE_VERSION], +[ +AC_REQUIRE([BASH_CHECK_LIB_TERMCAP]) + +AC_MSG_CHECKING([version of installed readline library]) + +# What a pain in the ass this is. + +# save cpp and ld options +_save_CFLAGS="$CFLAGS" +_save_LDFLAGS="$LDFLAGS" +_save_LIBS="$LIBS" + +# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This +# allows the caller to do something like $_rl_prefix=$withval if the user +# specifies --with-installed-readline=PREFIX as an argument to configure + +if test -z "$ac_cv_rl_prefix"; then +test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix} +fi + +eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include +eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib + +LIBS="$LIBS -lreadline ${TERMCAP_LIB}" +CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}" +LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" + +AC_CACHE_VAL(ac_cv_rl_version, +[AC_TRY_RUN([ +#include +#include +#include + +extern int rl_gnu_readline_p; + +int +main() +{ + FILE *fp; + fp = fopen("conftest.rlv", "w"); + if (fp == 0) + exit(1); + if (rl_gnu_readline_p != 1) + fprintf(fp, "0.0\n"); + else + fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0"); + fclose(fp); + exit(0); +} +], +ac_cv_rl_version=`cat conftest.rlv`, +ac_cv_rl_version='0.0', +ac_cv_rl_version='8.0')]) + +CFLAGS="$_save_CFLAGS" +LDFLAGS="$_save_LDFLAGS" +LIBS="$_save_LIBS" + +RL_MAJOR=0 +RL_MINOR=0 + +# ( +case "$ac_cv_rl_version" in +2*|3*|4*|5*|6*|7*|8*|9*) + RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'` + RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'` + ;; +esac + +# ((( +case $RL_MAJOR in +[[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;; +[[0-9]]) _RL_MAJOR=0$RL_MAJOR ;; +*) _RL_MAJOR=00 ;; +esac + +# ((( +case $RL_MINOR in +[[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;; +[[0-9]]) _RL_MINOR=0$RL_MINOR ;; +*) _RL_MINOR=00 ;; +esac + +RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}" + +# Readline versions greater than 4.2 have these defines in readline.h + +if test $ac_cv_rl_version = '0.0' ; then + AC_MSG_WARN([Could not test version of installed readline library.]) +elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then + # set these for use by the caller + RL_PREFIX=$ac_cv_rl_prefix + RL_LIBDIR=$ac_cv_rl_libdir + RL_INCLUDEDIR=$ac_cv_rl_includedir + AC_MSG_RESULT($ac_cv_rl_version) +else + +AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library]) +AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library]) +AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library]) + +AC_SUBST(RL_VERSION) +AC_SUBST(RL_MAJOR) +AC_SUBST(RL_MINOR) + +# set these for use by the caller +RL_PREFIX=$ac_cv_rl_prefix +RL_LIBDIR=$ac_cv_rl_libdir +RL_INCLUDEDIR=$ac_cv_rl_includedir + +AC_MSG_RESULT($ac_cv_rl_version) + +fi +]) + +AC_DEFUN(BASH_FUNC_CTYPE_NONASCII, +[ +AC_MSG_CHECKING(whether the ctype macros accept non-ascii characters) +AC_CACHE_VAL(bash_cv_func_ctype_nonascii, +[AC_TRY_RUN([ +#ifdef HAVE_LOCALE_H +#include +#endif +#include +#include +#include + +int +main(c, v) +int c; +char *v[]; +{ + char *deflocale; + unsigned char x; + int r1, r2; + +#ifdef HAVE_SETLOCALE + /* We take a shot here. If that locale is not known, try the + system default. We try this one because '\342' (226) is + known to be a printable character in that locale. */ + deflocale = setlocale(LC_ALL, "en_US.ISO8859-1"); + if (deflocale == 0) + deflocale = setlocale(LC_ALL, ""); +#endif + + x = '\342'; + r1 = isprint(x); + x -= 128; + r2 = isprint(x); + exit (r1 == 0 || r2 == 0); +} +], bash_cv_func_ctype_nonascii=yes, bash_cv_func_ctype_nonascii=no, + [AC_MSG_WARN(cannot check ctype macros if cross compiling -- defaulting to no) + bash_cv_func_ctype_nonascii=no] +)]) +AC_MSG_RESULT($bash_cv_func_ctype_nonascii) +if test $bash_cv_func_ctype_nonascii = yes; then +AC_DEFINE(CTYPE_NON_ASCII) +fi +]) + +AC_DEFUN(BASH_CHECK_WCONTINUED, +[ +AC_MSG_CHECKING(whether WCONTINUED flag to waitpid is unavailable or available but broken) +AC_CACHE_VAL(bash_cv_wcontinued_broken, +[AC_TRY_RUN([ +#include +#include +#include +#include +#include + +#ifndef errno +extern int errno; +#endif +int +main() +{ + int x; + + x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED); + if (x == -1 && errno == EINVAL) + exit (1); + else + exit (0); +} +], bash_cv_wcontinued_broken=no,bash_cv_wcontinued_broken=yes, + [AC_MSG_WARN(cannot check WCONTINUED if cross compiling -- defaulting to no) + bash_cv_wcontinued_broken=no] +)]) +AC_MSG_RESULT($bash_cv_wcontinued_broken) +if test $bash_cv_wcontinued_broken = yes; then +AC_DEFINE(WCONTINUED_BROKEN) +fi +]) + +dnl +dnl tests added for bashdb +dnl + + +AC_DEFUN([AM_PATH_LISPDIR], + [AC_ARG_WITH(lispdir, AC_HELP_STRING([--with-lispdir], [override the default lisp directory]), + [ lispdir="$withval" + AC_MSG_CHECKING([where .elc files should go]) + AC_MSG_RESULT([$lispdir])], + [ + # If set to t, that means we are running in a shell under Emacs. + # If you have an Emacs named "t", then use the full path. + test x"$EMACS" = xt && EMACS= + AC_CHECK_PROGS(EMACS, emacs xemacs, no) + if test $EMACS != "no"; then + if test x${lispdir+set} != xset; then + AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [dnl + am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'` + if test -z "$am_cv_lispdir"; then + am_cv_lispdir='${datadir}/emacs/site-lisp' + fi + ]) + lispdir="$am_cv_lispdir" + fi + fi + ]) + AC_SUBST(lispdir) +]) + +dnl From gnulib +AC_DEFUN([BASH_FUNC_FPURGE], +[ + AC_CHECK_FUNCS_ONCE([fpurge]) + AC_CHECK_FUNCS_ONCE([__fpurge]) + AC_CHECK_DECLS([fpurge], , , [#include ]) +]) + +AC_DEFUN([BASH_FUNC_SNPRINTF], +[ + AC_CHECK_FUNCS_ONCE([snprintf]) + if test X$ac_cv_func_snprintf = Xyes; then + AC_CACHE_CHECK([for standard-conformant snprintf], [bash_cv_func_snprintf], + [AC_TRY_RUN([ +#include +#include + +int +main() +{ + int n; + n = snprintf (0, 0, "%s", "0123456"); + exit(n != 7); +} +], bash_cv_func_snprintf=yes, bash_cv_func_snprintf=no, + [AC_MSG_WARN([cannot check standard snprintf if cross-compiling]) + bash_cv_func_snprintf=yes] +)]) + if test $bash_cv_func_snprintf = no; then + ac_cv_func_snprintf=no + fi + fi + if test $ac_cv_func_snprintf = no; then + AC_DEFINE(HAVE_SNPRINTF, 0, + [Define if you have a standard-conformant snprintf function.]) + fi +]) + +AC_DEFUN([BASH_FUNC_VSNPRINTF], +[ + AC_CHECK_FUNCS_ONCE([vsnprintf]) + if test X$ac_cv_func_vsnprintf = Xyes; then + AC_CACHE_CHECK([for standard-conformant vsnprintf], [bash_cv_func_vsnprintf], + [AC_TRY_RUN([ +#if HAVE_STDARG_H +#include +#else +#include +#endif +#include +#include + +static int +#if HAVE_STDARG_H +foo(const char *fmt, ...) +#else +foo(format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + int n; + +#if HAVE_STDARG_H + va_start(args, fmt); +#else + va_start(args); +#endif + n = vsnprintf(0, 0, fmt, args); + va_end (args); + return n; +} + +int +main() +{ + int n; + n = foo("%s", "0123456"); + exit(n != 7); +} +], bash_cv_func_vsnprintf=yes, bash_cv_func_vsnprintf=no, + [AC_MSG_WARN([cannot check standard vsnprintf if cross-compiling]) + bash_cv_func_vsnprintf=yes] +)]) + if test $bash_cv_func_vsnprintf = no; then + ac_cv_func_vsnprintf=no + fi + fi + if test $ac_cv_func_vsnprintf = no; then + AC_DEFINE(HAVE_VSNPRINTF, 0, + [Define if you have a standard-conformant vsnprintf function.]) + fi +]) + +AC_DEFUN(BASH_STRUCT_WEXITSTATUS_OFFSET, +[AC_MSG_CHECKING(for offset of exit status in return status from wait) +AC_CACHE_VAL(bash_cv_wexitstatus_offset, +[AC_TRY_RUN([ +#include +#include + +#include + +int +main(c, v) + int c; + char **v; +{ + pid_t pid, p; + int s, i, n; + + s = 0; + pid = fork(); + if (pid == 0) + exit (42); + + /* wait for the process */ + p = wait(&s); + if (p != pid) + exit (255); + + /* crack s */ + for (i = 0; i < (sizeof(s) * 8); i++) + { + n = (s >> i) & 0xff; + if (n == 42) + exit (i); + } + + exit (254); +} +], bash_cv_wexitstatus_offset=0, bash_cv_wexitstatus_offset=$?, + [AC_MSG_WARN(cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0) + bash_cv_wexitstatus_offset=0] +)]) +if test "$bash_cv_wexitstatus_offset" -gt 32 ; then + AC_MSG_WARN(bad exit status from test program -- defaulting to 0) + bash_cv_wexitstatus_offset=0 +fi +AC_MSG_RESULT($bash_cv_wexitstatus_offset) +AC_DEFINE_UNQUOTED([WEXITSTATUS_OFFSET], [$bash_cv_wexitstatus_offset], [Offset of exit status in wait status word]) +]) + +AC_DEFUN([BASH_FUNC_SBRK], +[ + AC_MSG_CHECKING([for sbrk]) + AC_CACHE_VAL(ac_cv_func_sbrk, + [AC_TRY_LINK([#include ], + [ void *x = sbrk (4096); ], + ac_cv_func_sbrk=yes, ac_cv_func_sbrk=no)]) + AC_MSG_RESULT($ac_cv_func_sbrk) + if test X$ac_cv_func_sbrk = Xyes; then + AC_CACHE_CHECK([for working sbrk], [bash_cv_func_sbrk], + [AC_TRY_RUN([ +#include +#include + +int +main(int c, char **v) +{ + void *x; + + x = sbrk (4096); + exit ((x == (void *)-1) ? 1 : 0); +} +], bash_cv_func_sbrk=yes, bash_cv_func_snprintf=sbrk, + [AC_MSG_WARN([cannot check working sbrk if cross-compiling]) + bash_cv_func_sbrk=yes] +)]) + if test $bash_cv_func_sbrk = no; then + ac_cv_func_sbrk=no + fi + fi + if test $ac_cv_func_sbrk = yes; then + AC_DEFINE(HAVE_SBRK, 1, + [Define if you have a working sbrk function.]) + fi +]) + +AC_DEFUN(BASH_FUNC_FNMATCH_EQUIV_FALLBACK, +[AC_MSG_CHECKING(whether fnmatch can be used to check bracket equivalence classes) +AC_CACHE_VAL(bash_cv_fnmatch_equiv_fallback, +[AC_TRY_RUN([ +#include +#include +#include +#include +#include + +char *pattern = "[[=a=]]"; + +/* char *string = "ä"; */ +unsigned char string[4] = { '\xc3', '\xa4', '\0' }; + +int +main (int c, char **v) +{ + setlocale (LC_ALL, "en_US.UTF-8"); + if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH) + exit (0); + exit (1); +} + +], bash_cv_fnmatch_equiv_fallback=yes, bash_cv_fnmatch_equiv_fallback=no, + [AC_MSG_WARN(cannot check fnmatch if cross compiling -- defaulting to no) + bash_cv_fnmatch_equiv_fallback=no] +)]) +AC_MSG_RESULT($bash_cv_fnmatch_equiv_fallback) +if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then + bash_cv_fnmatch_equiv_value=1 +else + bash_cv_fnmatch_equiv_value=0 +fi +AC_DEFINE_UNQUOTED([FNMATCH_EQUIV_FALLBACK], [$bash_cv_fnmatch_equiv_value], [Whether fnmatch can be used for bracket equivalence classes]) +]) diff --git a/bash-5.1/alias.c b/bash-5.1/alias.c new file mode 100644 index 0000000000000000000000000000000000000000..cd5e99b7e04e54b9b303b10f4e59e780b1fd869a --- /dev/null +++ b/bash-5.1/alias.c @@ -0,0 +1,594 @@ +/* alias.c -- Not a full alias, but just the kind that we use in the + shell. Csh style alias is somewhere else (`over there, in a box'). */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (ALIAS) + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "chartypes.h" +#include "bashansi.h" +#include "command.h" +#include "general.h" +#include "externs.h" +#include "alias.h" + +#if defined (PROGRAMMABLE_COMPLETION) +# include "pcomplete.h" +#endif + +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif + +#define ALIAS_HASH_BUCKETS 64 /* must be power of two */ + +typedef int sh_alias_map_func_t PARAMS((alias_t *)); + +static void free_alias_data PARAMS((PTR_T)); +static alias_t **map_over_aliases PARAMS((sh_alias_map_func_t *)); +static void sort_aliases PARAMS((alias_t **)); +static int qsort_alias_compare PARAMS((alias_t **, alias_t **)); + +#if defined (READLINE) +static int skipquotes PARAMS((char *, int)); +static int skipws PARAMS((char *, int)); +static int rd_token PARAMS((char *, int)); +#endif + +/* Non-zero means expand all words on the line. Otherwise, expand + after first expansion if the expansion ends in a space. */ +int alias_expand_all = 0; + +/* The list of aliases that we have. */ +HASH_TABLE *aliases = (HASH_TABLE *)NULL; + +void +initialize_aliases () +{ + if (aliases == 0) + aliases = hash_create (ALIAS_HASH_BUCKETS); +} + +/* Scan the list of aliases looking for one with NAME. Return NULL + if the alias doesn't exist, else a pointer to the alias_t. */ +alias_t * +find_alias (name) + char *name; +{ + BUCKET_CONTENTS *al; + + if (aliases == 0) + return ((alias_t *)NULL); + + al = hash_search (name, aliases, 0); + return (al ? (alias_t *)al->data : (alias_t *)NULL); +} + +/* Return the value of the alias for NAME, or NULL if there is none. */ +char * +get_alias_value (name) + char *name; +{ + alias_t *alias; + + if (aliases == 0) + return ((char *)NULL); + + alias = find_alias (name); + return (alias ? alias->value : (char *)NULL); +} + +/* Make a new alias from NAME and VALUE. If NAME can be found, + then replace its value. */ +void +add_alias (name, value) + char *name, *value; +{ + BUCKET_CONTENTS *elt; + alias_t *temp; + int n; + + if (aliases == 0) + { + initialize_aliases (); + temp = (alias_t *)NULL; + } + else + temp = find_alias (name); + + if (temp) + { + free (temp->value); + temp->value = savestring (value); + temp->flags &= ~AL_EXPANDNEXT; + if (value[0]) + { + n = value[strlen (value) - 1]; + if (n == ' ' || n == '\t') + temp->flags |= AL_EXPANDNEXT; + } + } + else + { + temp = (alias_t *)xmalloc (sizeof (alias_t)); + temp->name = savestring (name); + temp->value = savestring (value); + temp->flags = 0; + + if (value[0]) + { + n = value[strlen (value) - 1]; + if (n == ' ' || n == '\t') + temp->flags |= AL_EXPANDNEXT; + } + + elt = hash_insert (savestring (name), aliases, HASH_NOSRCH); + elt->data = temp; +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_aliases); +#endif + } +} + +/* Delete a single alias structure. */ +static void +free_alias_data (data) + PTR_T data; +{ + register alias_t *a; + + a = (alias_t *)data; + + if (a->flags & AL_BEINGEXPANDED) + clear_string_list_expander (a); /* call back to the parser */ + + free (a->value); + free (a->name); + free (data); +} + +/* Remove the alias with name NAME from the alias table. Returns + the number of aliases left in the table, or -1 if the alias didn't + exist. */ +int +remove_alias (name) + char *name; +{ + BUCKET_CONTENTS *elt; + + if (aliases == 0) + return (-1); + + elt = hash_remove (name, aliases, 0); + if (elt) + { + free_alias_data (elt->data); + free (elt->key); /* alias name */ + free (elt); /* XXX */ +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_aliases); +#endif + return (aliases->nentries); + } + return (-1); +} + +/* Delete all aliases. */ +void +delete_all_aliases () +{ + if (aliases == 0) + return; + + hash_flush (aliases, free_alias_data); + hash_dispose (aliases); + aliases = (HASH_TABLE *)NULL; +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_aliases); +#endif +} + +/* Return an array of aliases that satisfy the conditions tested by FUNCTION. + If FUNCTION is NULL, return all aliases. */ +static alias_t ** +map_over_aliases (function) + sh_alias_map_func_t *function; +{ + register int i; + register BUCKET_CONTENTS *tlist; + alias_t *alias, **list; + int list_index; + + i = HASH_ENTRIES (aliases); + if (i == 0) + return ((alias_t **)NULL); + + list = (alias_t **)xmalloc ((i + 1) * sizeof (alias_t *)); + for (i = list_index = 0; i < aliases->nbuckets; i++) + { + for (tlist = hash_items (i, aliases); tlist; tlist = tlist->next) + { + alias = (alias_t *)tlist->data; + + if (!function || (*function) (alias)) + { + list[list_index++] = alias; + list[list_index] = (alias_t *)NULL; + } + } + } + return (list); +} + +static void +sort_aliases (array) + alias_t **array; +{ + qsort (array, strvec_len ((char **)array), sizeof (alias_t *), (QSFUNC *)qsort_alias_compare); +} + +static int +qsort_alias_compare (as1, as2) + alias_t **as1, **as2; +{ + int result; + + if ((result = (*as1)->name[0] - (*as2)->name[0]) == 0) + result = strcmp ((*as1)->name, (*as2)->name); + + return (result); +} + +/* Return a sorted list of all defined aliases */ +alias_t ** +all_aliases () +{ + alias_t **list; + + if (aliases == 0 || HASH_ENTRIES (aliases) == 0) + return ((alias_t **)NULL); + + list = map_over_aliases ((sh_alias_map_func_t *)NULL); + if (list) + sort_aliases (list); + return (list); +} + +char * +alias_expand_word (s) + char *s; +{ + alias_t *r; + + r = find_alias (s); + return (r ? savestring (r->value) : (char *)NULL); +} + +/* Readline support functions -- expand all aliases in a line. */ + +#if defined (READLINE) + +/* Return non-zero if CHARACTER is a member of the class of characters + that are self-delimiting in the shell (this really means that these + characters delimit tokens). */ +#define self_delimiting(character) (member ((character), " \t\n\r;|&()")) + +/* Return non-zero if CHARACTER is a member of the class of characters + that delimit commands in the shell. */ +#define command_separator(character) (member ((character), "\r\n;|&(")) + +/* If this is 1, we are checking the next token read for alias expansion + because it is the first word in a command. */ +static int command_word; + +/* This is for skipping quoted strings in alias expansions. */ +#define quote_char(c) (((c) == '\'') || ((c) == '"')) + +/* Consume a quoted string from STRING, starting at string[START] (so + string[START] is the opening quote character), and return the index + of the closing quote character matching the opening quote character. + This handles single matching pairs of unquoted quotes; it could afford + to be a little smarter... This skips words between balanced pairs of + quotes, words where the first character is quoted with a `\', and other + backslash-escaped characters. */ + +static int +skipquotes (string, start) + char *string; + int start; +{ + register int i; + int delimiter = string[start]; + + /* i starts at START + 1 because string[START] is the opening quote + character. */ + for (i = start + 1 ; string[i] ; i++) + { + if (string[i] == '\\') + { + i++; /* skip backslash-quoted quote characters, too */ + if (string[i] == 0) + break; + continue; + } + + if (string[i] == delimiter) + return i; + } + return (i); +} + +/* Skip the white space and any quoted characters in STRING, starting at + START. Return the new index into STRING, after zero or more characters + have been skipped. */ +static int +skipws (string, start) + char *string; + int start; +{ + register int i; + int pass_next, backslash_quoted_word; + unsigned char peekc; + + /* skip quoted strings, in ' or ", and words in which a character is quoted + with a `\'. */ + i = backslash_quoted_word = pass_next = 0; + + /* Skip leading whitespace (or separator characters), and quoted words. + But save it in the output. */ + + for (i = start; string[i]; i++) + { + if (pass_next) + { + pass_next = 0; + continue; + } + + if (whitespace (string[i])) + { + backslash_quoted_word = 0; /* we are no longer in a backslash-quoted word */ + continue; + } + + if (string[i] == '\\') + { + peekc = string[i+1]; + if (peekc == 0) + break; + if (ISLETTER (peekc)) + backslash_quoted_word++; /* this is a backslash-quoted word */ + else + pass_next++; + continue; + } + + /* This only handles single pairs of non-escaped quotes. This + overloads backslash_quoted_word to also mean that a word like + ""f is being scanned, so that the quotes will inhibit any expansion + of the word. */ + if (quote_char(string[i])) + { + i = skipquotes (string, i); + /* This could be a line that contains a single quote character, + in which case skipquotes () terminates with string[i] == '\0' + (the end of the string). Check for that here. */ + if (string[i] == '\0') + break; + + peekc = string[i + 1]; + if (ISLETTER (peekc)) + backslash_quoted_word++; + continue; + } + + /* If we're in the middle of some kind of quoted word, let it + pass through. */ + if (backslash_quoted_word) + continue; + + /* If this character is a shell command separator, then set a hint for + alias_expand that the next token is the first word in a command. */ + + if (command_separator (string[i])) + { + command_word++; + continue; + } + break; + } + return (i); +} + +/* Characters that may appear in a token. Basically, anything except white + space and a token separator. */ +#define token_char(c) (!((whitespace (string[i]) || self_delimiting (string[i])))) + +/* Read from START in STRING until the next separator character, and return + the index of that separator. Skip backslash-quoted characters. Call + skipquotes () for quoted strings in the middle or at the end of tokens, + so all characters show up (e.g. foo'' and foo""bar) */ +static int +rd_token (string, start) + char *string; + int start; +{ + register int i; + + /* From here to next separator character is a token. */ + for (i = start; string[i] && token_char (string[i]); i++) + { + if (string[i] == '\\') + { + i++; /* skip backslash-escaped character */ + if (string[i] == 0) + break; + continue; + } + + /* If this character is a quote character, we want to call skipquotes + to get the whole quoted portion as part of this word. That word + will not generally match an alias, even if te unquoted word would + have. The presence of the quotes in the token serves then to + inhibit expansion. */ + if (quote_char (string[i])) + { + i = skipquotes (string, i); + /* This could be a line that contains a single quote character, + in which case skipquotes () terminates with string[i] == '\0' + (the end of the string). Check for that here. */ + if (string[i] == '\0') + break; + + /* Now string[i] is the matching quote character, and the + quoted portion of the token has been scanned. */ + continue; + } + } + return (i); +} + +/* Return a new line, with any aliases substituted. */ +char * +alias_expand (string) + char *string; +{ + register int i, j, start; + char *line, *token; + int line_len, tl, real_start, expand_next, expand_this_token; + alias_t *alias; + + line_len = strlen (string) + 1; + line = (char *)xmalloc (line_len); + token = (char *)xmalloc (line_len); + + line[0] = i = 0; + expand_next = 0; + command_word = 1; /* initialized to expand the first word on the line */ + + /* Each time through the loop we find the next word in line. If it + has an alias, substitute the alias value. If the value ends in ` ', + then try again with the next word. Else, if there is no value, or if + the value does not end in space, we are done. */ + + for (;;) + { + + token[0] = 0; + start = i; + + /* Skip white space and quoted characters */ + i = skipws (string, start); + + if (start == i && string[i] == '\0') + { + free (token); + return (line); + } + + /* copy the just-skipped characters into the output string, + expanding it if there is not enough room. */ + j = strlen (line); + tl = i - start; /* number of characters just skipped */ + RESIZE_MALLOCED_BUFFER (line, j, (tl + 1), line_len, (tl + 50)); + strncpy (line + j, string + start, tl); + line[j + tl] = '\0'; + + real_start = i; + + command_word = command_word || (command_separator (string[i])); + expand_this_token = (command_word || expand_next); + expand_next = 0; + + /* Read the next token, and copy it into TOKEN. */ + start = i; + i = rd_token (string, start); + + tl = i - start; /* token length */ + + /* If tl == 0, but we're not at the end of the string, then we have a + single-character token, probably a delimiter */ + if (tl == 0 && string[i] != '\0') + { + tl = 1; + i++; /* move past it */ + } + + strncpy (token, string + start, tl); + token [tl] = '\0'; + + /* If there is a backslash-escaped character quoted in TOKEN, + then we don't do alias expansion. This should check for all + other quoting characters, too. */ + if (mbschr (token, '\\')) + expand_this_token = 0; + + /* If we should be expanding here, if we are expanding all words, or if + we are in a location in the string where an expansion is supposed to + take place, see if this word has a substitution. If it does, then do + the expansion. Note that we defer the alias value lookup until we + are sure we are expanding this token. */ + + if ((token[0]) && + (expand_this_token || alias_expand_all) && + (alias = find_alias (token))) + { + char *v; + int vlen, llen; + + v = alias->value; + vlen = strlen (v); + llen = strlen (line); + + /* +3 because we possibly add one more character below. */ + RESIZE_MALLOCED_BUFFER (line, llen, (vlen + 3), line_len, (vlen + 50)); + + strcpy (line + llen, v); + + if ((expand_this_token && vlen && whitespace (v[vlen - 1])) || + alias_expand_all) + expand_next = 1; + } + else + { + int llen, tlen; + + llen = strlen (line); + tlen = i - real_start; /* tlen == strlen(token) */ + + RESIZE_MALLOCED_BUFFER (line, llen, (tlen + 1), line_len, (llen + tlen + 50)); + + strncpy (line + llen, string + real_start, tlen); + line[llen + tlen] = '\0'; + } + command_word = 0; + } +} +#endif /* READLINE */ +#endif /* ALIAS */ diff --git a/bash-5.1/alias.h b/bash-5.1/alias.h new file mode 100644 index 0000000000000000000000000000000000000000..4e2d67c0fc738bf73adef563b1a054c00fe3d33f --- /dev/null +++ b/bash-5.1/alias.h @@ -0,0 +1,73 @@ +/* alias.h -- structure definitions. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_ALIAS_H_) +#define _ALIAS_H_ + +#include "stdc.h" + +#include "hashlib.h" + +typedef struct alias { + char *name; + char *value; + char flags; +} alias_t; + +/* Values for `flags' member of struct alias. */ +#define AL_EXPANDNEXT 0x1 +#define AL_BEINGEXPANDED 0x2 + +/* The list of known aliases. */ +extern HASH_TABLE *aliases; + +extern void initialize_aliases PARAMS((void)); + +/* Scan the list of aliases looking for one with NAME. Return NULL + if the alias doesn't exist, else a pointer to the alias. */ +extern alias_t *find_alias PARAMS((char *)); + +/* Return the value of the alias for NAME, or NULL if there is none. */ +extern char *get_alias_value PARAMS((char *)); + +/* Make a new alias from NAME and VALUE. If NAME can be found, + then replace its value. */ +extern void add_alias PARAMS((char *, char *)); + +/* Remove the alias with name NAME from the alias list. Returns + the index of the removed alias, or -1 if the alias didn't exist. */ +extern int remove_alias PARAMS((char *)); + +/* Remove all aliases. */ +extern void delete_all_aliases PARAMS((void)); + +/* Return an array of all defined aliases. */ +extern alias_t **all_aliases PARAMS((void)); + +/* Expand a single word for aliases. */ +extern char *alias_expand_word PARAMS((char *)); + +/* Return a new line, with any aliases expanded. */ +extern char *alias_expand PARAMS((char *)); + +/* Helper definition for the parser */ +extern void clear_string_list_expander PARAMS((alias_t *)); + +#endif /* _ALIAS_H_ */ diff --git a/bash-5.1/array.c b/bash-5.1/array.c new file mode 100644 index 0000000000000000000000000000000000000000..6d3554bf4cc5c4ef303fe402fe0dc3ea442b1c83 --- /dev/null +++ b/bash-5.1/array.c @@ -0,0 +1,1236 @@ +/* + * array.c - functions to create, destroy, access, and manipulate arrays + * of strings. + * + * Arrays are sparse doubly-linked lists. An element's index is stored + * with it. + * + * Chet Ramey + * chet@ins.cwru.edu + */ + +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (ARRAY_VARS) + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "bashansi.h" + +#include "shell.h" +#include "array.h" +#include "builtins/common.h" + +#define ADD_BEFORE(ae, new) \ + do { \ + ae->prev->next = new; \ + new->prev = ae->prev; \ + ae->prev = new; \ + new->next = ae; \ + } while(0) + +#define ADD_AFTER(ae, new) \ + do { \ + ae->next->prev = new; \ + new->next = ae->next; \ + new->prev = ae; \ + ae->next = new; \ + } while (0) + +static char *array_to_string_internal PARAMS((ARRAY_ELEMENT *, ARRAY_ELEMENT *, char *, int)); + +static char *spacesep = " "; + +#define IS_LASTREF(a) (a->lastref) + +#define LASTREF_START(a, i) \ + (IS_LASTREF(a) && i >= element_index(a->lastref)) ? a->lastref \ + : element_forw(a->head) + +#define LASTREF(a) (a->lastref ? a->lastref : element_forw(a->head)) + +#define INVALIDATE_LASTREF(a) a->lastref = 0 +#define SET_LASTREF(a, e) a->lastref = (e) +#define UNSET_LASTREF(a) a->lastref = 0; + +ARRAY * +array_create() +{ + ARRAY *r; + ARRAY_ELEMENT *head; + + r = (ARRAY *)xmalloc(sizeof(ARRAY)); + r->type = array_indexed; + r->max_index = -1; + r->num_elements = 0; + r->lastref = (ARRAY_ELEMENT *)0; + head = array_create_element(-1, (char *)NULL); /* dummy head */ + head->prev = head->next = head; + r->head = head; + return(r); +} + +void +array_flush (a) +ARRAY *a; +{ + register ARRAY_ELEMENT *r, *r1; + + if (a == 0) + return; + for (r = element_forw(a->head); r != a->head; ) { + r1 = element_forw(r); + array_dispose_element(r); + r = r1; + } + a->head->next = a->head->prev = a->head; + a->max_index = -1; + a->num_elements = 0; + INVALIDATE_LASTREF(a); +} + +void +array_dispose(a) +ARRAY *a; +{ + if (a == 0) + return; + array_flush (a); + array_dispose_element(a->head); + free(a); +} + +ARRAY * +array_copy(a) +ARRAY *a; +{ + ARRAY *a1; + ARRAY_ELEMENT *ae, *new; + + if (a == 0) + return((ARRAY *) NULL); + a1 = array_create(); + a1->type = a->type; + a1->max_index = a->max_index; + a1->num_elements = a->num_elements; + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + new = array_create_element(element_index(ae), element_value(ae)); + ADD_BEFORE(a1->head, new); + if (ae == LASTREF(a)) + SET_LASTREF(a1, new); + } + return(a1); +} + +/* + * Make and return a new array composed of the elements in array A from + * S to E, inclusive. + */ +ARRAY * +array_slice(array, s, e) +ARRAY *array; +ARRAY_ELEMENT *s, *e; +{ + ARRAY *a; + ARRAY_ELEMENT *p, *n; + int i; + arrayind_t mi; + + a = array_create (); + a->type = array->type; + + for (mi = 0, p = s, i = 0; p != e; p = element_forw(p), i++) { + n = array_create_element (element_index(p), element_value(p)); + ADD_BEFORE(a->head, n); + mi = element_index(n); + } + a->num_elements = i; + a->max_index = mi; + return a; +} + +/* + * Walk the array, calling FUNC once for each element, with the array + * element as the argument. + */ +void +array_walk(a, func, udata) +ARRAY *a; +sh_ae_map_func_t *func; +void *udata; +{ + register ARRAY_ELEMENT *ae; + + if (a == 0 || array_empty(a)) + return; + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) + if ((*func)(ae, udata) < 0) + return; +} + +/* + * Shift the array A N elements to the left. Delete the first N elements + * and subtract N from the indices of the remaining elements. If FLAGS + * does not include AS_DISPOSE, this returns a singly-linked null-terminated + * list of elements so the caller can dispose of the chain. If FLAGS + * includes AS_DISPOSE, this function disposes of the shifted-out elements + * and returns NULL. + */ +ARRAY_ELEMENT * +array_shift(a, n, flags) +ARRAY *a; +int n, flags; +{ + register ARRAY_ELEMENT *ae, *ret; + register int i; + + if (a == 0 || array_empty(a) || n <= 0) + return ((ARRAY_ELEMENT *)NULL); + + INVALIDATE_LASTREF(a); + for (i = 0, ret = ae = element_forw(a->head); ae != a->head && i < n; ae = element_forw(ae), i++) + ; + if (ae == a->head) { + /* Easy case; shifting out all of the elements */ + if (flags & AS_DISPOSE) { + array_flush (a); + return ((ARRAY_ELEMENT *)NULL); + } + for (ae = ret; element_forw(ae) != a->head; ae = element_forw(ae)) + ; + element_forw(ae) = (ARRAY_ELEMENT *)NULL; + a->head->next = a->head->prev = a->head; + a->max_index = -1; + a->num_elements = 0; + return ret; + } + /* + * ae now points to the list of elements we want to retain. + * ret points to the list we want to either destroy or return. + */ + ae->prev->next = (ARRAY_ELEMENT *)NULL; /* null-terminate RET */ + + a->head->next = ae; /* slice RET out of the array */ + ae->prev = a->head; + + for ( ; ae != a->head; ae = element_forw(ae)) + element_index(ae) -= n; /* renumber retained indices */ + + a->num_elements -= n; /* modify bookkeeping information */ + a->max_index = element_index(a->head->prev); + + if (flags & AS_DISPOSE) { + for (ae = ret; ae; ) { + ret = element_forw(ae); + array_dispose_element(ae); + ae = ret; + } + return ((ARRAY_ELEMENT *)NULL); + } + + return ret; +} + +/* + * Shift array A right N indices. If S is non-null, it becomes the value of + * the new element 0. Returns the number of elements in the array after the + * shift. + */ +int +array_rshift (a, n, s) +ARRAY *a; +int n; +char *s; +{ + register ARRAY_ELEMENT *ae, *new; + + if (a == 0 || (array_empty(a) && s == 0)) + return 0; + else if (n <= 0) + return (a->num_elements); + + ae = element_forw(a->head); + if (s) { + new = array_create_element(0, s); + ADD_BEFORE(ae, new); + a->num_elements++; + if (array_num_elements(a) == 1) { /* array was empty */ + a->max_index = 0; + return 1; + } + } + + /* + * Renumber all elements in the array except the one we just added. + */ + for ( ; ae != a->head; ae = element_forw(ae)) + element_index(ae) += n; + + a->max_index = element_index(a->head->prev); + + INVALIDATE_LASTREF(a); + return (a->num_elements); +} + +ARRAY_ELEMENT * +array_unshift_element(a) +ARRAY *a; +{ + return (array_shift (a, 1, 0)); +} + +int +array_shift_element(a, v) +ARRAY *a; +char *v; +{ + return (array_rshift (a, 1, v)); +} + +ARRAY * +array_quote(array) +ARRAY *array; +{ + ARRAY_ELEMENT *a; + char *t; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (a = element_forw(array->head); a != array->head; a = element_forw(a)) { + t = quote_string (a->value); + FREE(a->value); + a->value = t; + } + return array; +} + +ARRAY * +array_quote_escapes(array) +ARRAY *array; +{ + ARRAY_ELEMENT *a; + char *t; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (a = element_forw(array->head); a != array->head; a = element_forw(a)) { + t = quote_escapes (a->value); + FREE(a->value); + a->value = t; + } + return array; +} + +ARRAY * +array_dequote(array) +ARRAY *array; +{ + ARRAY_ELEMENT *a; + char *t; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (a = element_forw(array->head); a != array->head; a = element_forw(a)) { + t = dequote_string (a->value); + FREE(a->value); + a->value = t; + } + return array; +} + +ARRAY * +array_dequote_escapes(array) +ARRAY *array; +{ + ARRAY_ELEMENT *a; + char *t; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (a = element_forw(array->head); a != array->head; a = element_forw(a)) { + t = dequote_escapes (a->value); + FREE(a->value); + a->value = t; + } + return array; +} + +ARRAY * +array_remove_quoted_nulls(array) +ARRAY *array; +{ + ARRAY_ELEMENT *a; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (a = element_forw(array->head); a != array->head; a = element_forw(a)) + a->value = remove_quoted_nulls (a->value); + return array; +} + +/* + * Return a string whose elements are the members of array A beginning at + * index START and spanning NELEM members. Null elements are counted. + * Since arrays are sparse, unset array elements are not counted. + */ +char * +array_subrange (a, start, nelem, starsub, quoted, pflags) +ARRAY *a; +arrayind_t start, nelem; +int starsub, quoted, pflags; +{ + ARRAY *a2; + ARRAY_ELEMENT *h, *p; + arrayind_t i; + char *t; + WORD_LIST *wl; + + p = a ? array_head (a) : 0; + if (p == 0 || array_empty (a) || start > array_max_index(a)) + return ((char *)NULL); + + /* + * Find element with index START. If START corresponds to an unset + * element (arrays can be sparse), use the first element whose index + * is >= START. If START is < 0, we count START indices back from + * the end of A (not elements, even with sparse arrays -- START is an + * index). + */ + for (p = element_forw(p); p != array_head(a) && start > element_index(p); p = element_forw(p)) + ; + + if (p == a->head) + return ((char *)NULL); + + /* Starting at P, take NELEM elements, inclusive. */ + for (i = 0, h = p; p != a->head && i < nelem; i++, p = element_forw(p)) + ; + + a2 = array_slice(a, h, p); + + wl = array_to_word_list(a2); + array_dispose(a2); + if (wl == 0) + return (char *)NULL; + t = string_list_pos_params(starsub ? '*' : '@', wl, quoted, pflags); /* XXX */ + dispose_words(wl); + + return t; +} + +char * +array_patsub (a, pat, rep, mflags) +ARRAY *a; +char *pat, *rep; +int mflags; +{ + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; + + if (a == 0 || array_head(a) == 0 || array_empty(a)) + return ((char *)NULL); + + wl = array_to_word_list(a); + if (wl == 0) + return (char *)NULL; + + for (save = wl; wl; wl = wl->next) { + t = pat_subst (wl->word->word, pat, rep, mflags); + FREE (wl->word->word); + wl->word->word = t; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words(save); + + return t; +} + +char * +array_modcase (a, pat, modop, mflags) +ARRAY *a; +char *pat; +int modop; +int mflags; +{ + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; + + if (a == 0 || array_head(a) == 0 || array_empty(a)) + return ((char *)NULL); + + wl = array_to_word_list(a); + if (wl == 0) + return ((char *)NULL); + + for (save = wl; wl; wl = wl->next) { + t = sh_modcase(wl->word->word, pat, modop); + FREE(wl->word->word); + wl->word->word = t; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words(save); + + return t; +} + +/* + * Allocate and return a new array element with index INDEX and value + * VALUE. + */ +ARRAY_ELEMENT * +array_create_element(indx, value) +arrayind_t indx; +char *value; +{ + ARRAY_ELEMENT *r; + + r = (ARRAY_ELEMENT *)xmalloc(sizeof(ARRAY_ELEMENT)); + r->ind = indx; + r->value = value ? savestring(value) : (char *)NULL; + r->next = r->prev = (ARRAY_ELEMENT *) NULL; + return(r); +} + +#ifdef INCLUDE_UNUSED +ARRAY_ELEMENT * +array_copy_element(ae) +ARRAY_ELEMENT *ae; +{ + return(ae ? array_create_element(element_index(ae), element_value(ae)) + : (ARRAY_ELEMENT *) NULL); +} +#endif + +void +array_dispose_element(ae) +ARRAY_ELEMENT *ae; +{ + if (ae) { + FREE(ae->value); + free(ae); + } +} + +/* + * Add a new element with index I and value V to array A (a[i] = v). + */ +int +array_insert(a, i, v) +ARRAY *a; +arrayind_t i; +char *v; +{ + register ARRAY_ELEMENT *new, *ae, *start; + arrayind_t startind; + int direction; + + if (a == 0) + return(-1); + new = array_create_element(i, v); + if (i > array_max_index(a)) { + /* + * Hook onto the end. This also works for an empty array. + * Fast path for the common case of allocating arrays + * sequentially. + */ + ADD_BEFORE(a->head, new); + a->max_index = i; + a->num_elements++; + SET_LASTREF(a, new); + return(0); + } else if (i < array_first_index(a)) { + /* Hook at the beginning */ + ADD_AFTER(a->head, new); + a->num_elements++; + SET_LASTREF(a, new); + return(0); + } +#if OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT + /* + * Otherwise we search for the spot to insert it. The lastref + * handle optimizes the case of sequential or almost-sequential + * assignments that are not at the end of the array. + */ + start = LASTREF(a); + /* Use same strategy as array_reference to avoid paying large penalty + for semi-random assignment pattern. */ + startind = element_index(start); + if (i < startind/2) { + start = element_forw(a->head); + startind = element_index(start); + direction = 1; + } else if (i >= startind) { + direction = 1; + } else { + direction = -1; + } +#else + start = element_forw(ae->head); + startind = element_index(start); + direction = 1; +#endif + for (ae = start; ae != a->head; ) { + if (element_index(ae) == i) { + /* + * Replacing an existing element. + */ + free(element_value(ae)); + /* Just swap in the new value */ + ae->value = new->value; + new->value = 0; + array_dispose_element(new); + SET_LASTREF(a, ae); + return(0); + } else if (direction == 1 && element_index(ae) > i) { + ADD_BEFORE(ae, new); + a->num_elements++; + SET_LASTREF(a, new); + return(0); + } else if (direction == -1 && element_index(ae) < i) { + ADD_AFTER(ae, new); + a->num_elements++; + SET_LASTREF(a, new); + return(0); + } + ae = direction == 1 ? element_forw(ae) : element_back(ae); + } + array_dispose_element(new); + INVALIDATE_LASTREF(a); + return (-1); /* problem */ +} + +/* + * Delete the element with index I from array A and return it so the + * caller can dispose of it. + */ +ARRAY_ELEMENT * +array_remove(a, i) +ARRAY *a; +arrayind_t i; +{ + register ARRAY_ELEMENT *ae, *start; + arrayind_t startind; + int direction; + + if (a == 0 || array_empty(a)) + return((ARRAY_ELEMENT *) NULL); + if (i > array_max_index(a) || i < array_first_index(a)) + return((ARRAY_ELEMENT *)NULL); /* Keep roving pointer into array to optimize sequential access */ + start = LASTREF(a); + /* Use same strategy as array_reference to avoid paying large penalty + for semi-random assignment pattern. */ + startind = element_index(start); + if (i < startind/2) { + start = element_forw(a->head); + startind = element_index(start); + direction = 1; + } else if (i >= startind) { + direction = 1; + } else { + direction = -1; + } + for (ae = start; ae != a->head; ) { + if (element_index(ae) == i) { + ae->next->prev = ae->prev; + ae->prev->next = ae->next; + a->num_elements--; + if (i == array_max_index(a)) + a->max_index = element_index(ae->prev); +#if 0 + INVALIDATE_LASTREF(a); +#else + if (ae->next != a->head) + SET_LASTREF(a, ae->next); + else if (ae->prev != a->head) + SET_LASTREF(a, ae->prev); + else + INVALIDATE_LASTREF(a); +#endif + return(ae); + } + ae = (direction == 1) ? element_forw(ae) : element_back(ae); + if (direction == 1 && element_index(ae) > i) + break; + else if (direction == -1 && element_index(ae) < i) + break; + } + return((ARRAY_ELEMENT *) NULL); +} + +/* + * Return the value of a[i]. + */ +char * +array_reference(a, i) +ARRAY *a; +arrayind_t i; +{ + register ARRAY_ELEMENT *ae, *start; + arrayind_t startind; + int direction; + + if (a == 0 || array_empty(a)) + return((char *) NULL); + if (i > array_max_index(a) || i < array_first_index(a)) + return((char *)NULL); /* Keep roving pointer into array to optimize sequential access */ + start = LASTREF(a); /* lastref pointer */ + startind = element_index(start); + if (i < startind/2) { /* XXX - guess */ + start = element_forw(a->head); + startind = element_index(start); + direction = 1; + } else if (i >= startind) { + direction = 1; + } else { + direction = -1; + } + for (ae = start; ae != a->head; ) { + if (element_index(ae) == i) { + SET_LASTREF(a, ae); + return(element_value(ae)); + } + ae = (direction == 1) ? element_forw(ae) : element_back(ae); + /* Take advantage of index ordering to short-circuit */ + /* If we don't find it, set the lastref pointer to the element + that's `closest', assuming that the unsuccessful reference + will quickly be followed by an assignment. No worse than + not changing it from the previous value or resetting it. */ + if (direction == 1 && element_index(ae) > i) { + start = ae; /* use for SET_LASTREF below */ + break; + } else if (direction == -1 && element_index(ae) < i) { + start = ae; /* use for SET_LASTREF below */ + break; + } + } +#if 0 + UNSET_LASTREF(a); +#else + SET_LASTREF(a, start); +#endif + return((char *) NULL); +} + +/* Convenience routines for the shell to translate to and from the form used + by the rest of the code. */ + +WORD_LIST * +array_to_word_list(a) +ARRAY *a; +{ + WORD_LIST *list; + ARRAY_ELEMENT *ae; + + if (a == 0 || array_empty(a)) + return((WORD_LIST *)NULL); + list = (WORD_LIST *)NULL; + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) + list = make_word_list (make_bare_word(element_value(ae)), list); + return (REVERSE_LIST(list, WORD_LIST *)); +} + +ARRAY * +array_from_word_list (list) +WORD_LIST *list; +{ + ARRAY *a; + + if (list == 0) + return((ARRAY *)NULL); + a = array_create(); + return (array_assign_list (a, list)); +} + +WORD_LIST * +array_keys_to_word_list(a) +ARRAY *a; +{ + WORD_LIST *list; + ARRAY_ELEMENT *ae; + char *t; + + if (a == 0 || array_empty(a)) + return((WORD_LIST *)NULL); + list = (WORD_LIST *)NULL; + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + t = itos(element_index(ae)); + list = make_word_list (make_bare_word(t), list); + free(t); + } + return (REVERSE_LIST(list, WORD_LIST *)); +} + +ARRAY * +array_assign_list (array, list) +ARRAY *array; +WORD_LIST *list; +{ + register WORD_LIST *l; + register arrayind_t i; + + for (l = list, i = 0; l; l = l->next, i++) + array_insert(array, i, l->word->word); + return array; +} + +char ** +array_to_argv (a, countp) +ARRAY *a; +int *countp; +{ + char **ret, *t; + int i; + ARRAY_ELEMENT *ae; + + if (a == 0 || array_empty(a)) { + if (countp) + *countp = 0; + return ((char **)NULL); + } + ret = strvec_create (array_num_elements (a) + 1); + i = 0; + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + t = element_value (ae); + if (t) + ret[i++] = savestring (t); + } + ret[i] = (char *)NULL; + if (countp) + *countp = i; + return (ret); +} + +/* + * Return a string that is the concatenation of the elements in A from START + * to END, separated by SEP. + */ +static char * +array_to_string_internal (start, end, sep, quoted) +ARRAY_ELEMENT *start, *end; +char *sep; +int quoted; +{ + char *result, *t; + ARRAY_ELEMENT *ae; + int slen, rsize, rlen, reg; + + if (start == end) /* XXX - should not happen */ + return ((char *)NULL); + + slen = strlen(sep); + result = NULL; + for (rsize = rlen = 0, ae = start; ae != end; ae = element_forw(ae)) { + if (rsize == 0) + result = (char *)xmalloc (rsize = 64); + if (element_value(ae)) { + t = quoted ? quote_string(element_value(ae)) : element_value(ae); + reg = strlen(t); + RESIZE_MALLOCED_BUFFER (result, rlen, (reg + slen + 2), + rsize, rsize); + strcpy(result + rlen, t); + rlen += reg; + if (quoted) + free(t); + /* + * Add a separator only after non-null elements. + */ + if (element_forw(ae) != end) { + strcpy(result + rlen, sep); + rlen += slen; + } + } + } + if (result) + result[rlen] = '\0'; /* XXX */ + return(result); +} + +char * +array_to_kvpair (a, quoted) +ARRAY *a; +int quoted; +{ + char *result, *valstr, *is; + char indstr[INT_STRLEN_BOUND(intmax_t) + 1]; + ARRAY_ELEMENT *ae; + int rsize, rlen, elen; + + if (a == 0 || array_empty (a)) + return((char *)NULL); + + result = (char *)xmalloc (rsize = 128); + result[rlen = 0] = '\0'; + + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + is = inttostr (element_index(ae), indstr, sizeof(indstr)); + valstr = element_value (ae) ? + (ansic_shouldquote (element_value (ae)) ? + ansic_quote (element_value(ae), 0, (int *)0) : + sh_double_quote (element_value (ae))) + : (char *)NULL; + elen = STRLEN (is) + 8 + STRLEN (valstr); + RESIZE_MALLOCED_BUFFER (result, rlen, (elen + 1), rsize, rsize); + + strcpy (result + rlen, is); + rlen += STRLEN (is); + result[rlen++] = ' '; + if (valstr) { + strcpy (result + rlen, valstr); + rlen += STRLEN (valstr); + } else { + strcpy (result + rlen, "\"\""); + rlen += 2; + } + + if (element_forw(ae) != a->head) + result[rlen++] = ' '; + + FREE (valstr); + } + RESIZE_MALLOCED_BUFFER (result, rlen, 1, rsize, 8); + result[rlen] = '\0'; + + if (quoted) { + /* This is not as efficient as it could be... */ + valstr = sh_single_quote (result); + free (result); + result = valstr; + } + return(result); +} + +char * +array_to_assign (a, quoted) +ARRAY *a; +int quoted; +{ + char *result, *valstr, *is; + char indstr[INT_STRLEN_BOUND(intmax_t) + 1]; + ARRAY_ELEMENT *ae; + int rsize, rlen, elen; + + if (a == 0 || array_empty (a)) + return((char *)NULL); + + result = (char *)xmalloc (rsize = 128); + result[0] = '('; + rlen = 1; + + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + is = inttostr (element_index(ae), indstr, sizeof(indstr)); + valstr = element_value (ae) ? + (ansic_shouldquote (element_value (ae)) ? + ansic_quote (element_value(ae), 0, (int *)0) : + sh_double_quote (element_value (ae))) + : (char *)NULL; + elen = STRLEN (is) + 8 + STRLEN (valstr); + RESIZE_MALLOCED_BUFFER (result, rlen, (elen + 1), rsize, rsize); + + result[rlen++] = '['; + strcpy (result + rlen, is); + rlen += STRLEN (is); + result[rlen++] = ']'; + result[rlen++] = '='; + if (valstr) { + strcpy (result + rlen, valstr); + rlen += STRLEN (valstr); + } + + if (element_forw(ae) != a->head) + result[rlen++] = ' '; + + FREE (valstr); + } + RESIZE_MALLOCED_BUFFER (result, rlen, 1, rsize, 8); + result[rlen++] = ')'; + result[rlen] = '\0'; + if (quoted) { + /* This is not as efficient as it could be... */ + valstr = sh_single_quote (result); + free (result); + result = valstr; + } + return(result); +} + +char * +array_to_string (a, sep, quoted) +ARRAY *a; +char *sep; +int quoted; +{ + if (a == 0) + return((char *)NULL); + if (array_empty(a)) + return(savestring("")); + return (array_to_string_internal (element_forw(a->head), a->head, sep, quoted)); +} + +#if defined (INCLUDE_UNUSED) || defined (TEST_ARRAY) +/* + * Return an array consisting of elements in S, separated by SEP + */ +ARRAY * +array_from_string(s, sep) +char *s, *sep; +{ + ARRAY *a; + WORD_LIST *w; + + if (s == 0) + return((ARRAY *)NULL); + w = list_string (s, sep, 0); + if (w == 0) + return((ARRAY *)NULL); + a = array_from_word_list (w); + return (a); +} +#endif + +#if defined (TEST_ARRAY) +/* + * To make a running version, compile -DTEST_ARRAY and link with: + * xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a + */ +int interrupt_immediately = 0; + +int +signal_is_trapped(s) +int s; +{ + return 0; +} + +void +fatal_error(const char *s, ...) +{ + fprintf(stderr, "array_test: fatal memory error\n"); + abort(); +} + +void +programming_error(const char *s, ...) +{ + fprintf(stderr, "array_test: fatal programming error\n"); + abort(); +} + +WORD_DESC * +make_bare_word (s) +const char *s; +{ + WORD_DESC *w; + + w = (WORD_DESC *)xmalloc(sizeof(WORD_DESC)); + w->word = s ? savestring(s) : savestring (""); + w->flags = 0; + return w; +} + +WORD_LIST * +make_word_list(x, l) +WORD_DESC *x; +WORD_LIST *l; +{ + WORD_LIST *w; + + w = (WORD_LIST *)xmalloc(sizeof(WORD_LIST)); + w->word = x; + w->next = l; + return w; +} + +WORD_LIST * +list_string(s, t, i) +char *s, *t; +int i; +{ + char *r, *a; + WORD_LIST *wl; + + if (s == 0) + return (WORD_LIST *)NULL; + r = savestring(s); + wl = (WORD_LIST *)NULL; + a = strtok(r, t); + while (a) { + wl = make_word_list (make_bare_word(a), wl); + a = strtok((char *)NULL, t); + } + return (REVERSE_LIST (wl, WORD_LIST *)); +} + +GENERIC_LIST * +list_reverse (list) +GENERIC_LIST *list; +{ + register GENERIC_LIST *next, *prev; + + for (prev = 0; list; ) { + next = list->next; + list->next = prev; + prev = list; + list = next; + } + return prev; +} + +char * +pat_subst(s, t, u, i) +char *s, *t, *u; +int i; +{ + return ((char *)NULL); +} + +char * +quote_string(s) +char *s; +{ + return savestring(s); +} + +print_element(ae) +ARRAY_ELEMENT *ae; +{ + char lbuf[INT_STRLEN_BOUND (intmax_t) + 1]; + + printf("array[%s] = %s\n", + inttostr (element_index(ae), lbuf, sizeof (lbuf)), + element_value(ae)); +} + +print_array(a) +ARRAY *a; +{ + printf("\n"); + array_walk(a, print_element, (void *)NULL); +} + +main() +{ + ARRAY *a, *new_a, *copy_of_a; + ARRAY_ELEMENT *ae, *aew; + char *s; + + a = array_create(); + array_insert(a, 1, "one"); + array_insert(a, 7, "seven"); + array_insert(a, 4, "four"); + array_insert(a, 1029, "one thousand twenty-nine"); + array_insert(a, 12, "twelve"); + array_insert(a, 42, "forty-two"); + print_array(a); + s = array_to_string (a, " ", 0); + printf("s = %s\n", s); + copy_of_a = array_from_string(s, " "); + printf("copy_of_a:"); + print_array(copy_of_a); + array_dispose(copy_of_a); + printf("\n"); + free(s); + ae = array_remove(a, 4); + array_dispose_element(ae); + ae = array_remove(a, 1029); + array_dispose_element(ae); + array_insert(a, 16, "sixteen"); + print_array(a); + s = array_to_string (a, " ", 0); + printf("s = %s\n", s); + copy_of_a = array_from_string(s, " "); + printf("copy_of_a:"); + print_array(copy_of_a); + array_dispose(copy_of_a); + printf("\n"); + free(s); + array_insert(a, 2, "two"); + array_insert(a, 1029, "new one thousand twenty-nine"); + array_insert(a, 0, "zero"); + array_insert(a, 134, ""); + print_array(a); + s = array_to_string (a, ":", 0); + printf("s = %s\n", s); + copy_of_a = array_from_string(s, ":"); + printf("copy_of_a:"); + print_array(copy_of_a); + array_dispose(copy_of_a); + printf("\n"); + free(s); + new_a = array_copy(a); + print_array(new_a); + s = array_to_string (new_a, ":", 0); + printf("s = %s\n", s); + copy_of_a = array_from_string(s, ":"); + free(s); + printf("copy_of_a:"); + print_array(copy_of_a); + array_shift(copy_of_a, 2, AS_DISPOSE); + printf("copy_of_a shifted by two:"); + print_array(copy_of_a); + ae = array_shift(copy_of_a, 2, 0); + printf("copy_of_a shifted by two:"); + print_array(copy_of_a); + for ( ; ae; ) { + aew = element_forw(ae); + array_dispose_element(ae); + ae = aew; + } + array_rshift(copy_of_a, 1, (char *)0); + printf("copy_of_a rshift by 1:"); + print_array(copy_of_a); + array_rshift(copy_of_a, 2, "new element zero"); + printf("copy_of_a rshift again by 2 with new element zero:"); + print_array(copy_of_a); + s = array_to_assign(copy_of_a, 0); + printf("copy_of_a=%s\n", s); + free(s); + ae = array_shift(copy_of_a, array_num_elements(copy_of_a), 0); + for ( ; ae; ) { + aew = element_forw(ae); + array_dispose_element(ae); + ae = aew; + } + array_dispose(copy_of_a); + printf("\n"); + array_dispose(a); + array_dispose(new_a); +} + +#endif /* TEST_ARRAY */ +#endif /* ARRAY_VARS */ diff --git a/bash-5.1/array.h b/bash-5.1/array.h new file mode 100644 index 0000000000000000000000000000000000000000..189d646f2b012bc66986a2b7824b9dd305d05103 --- /dev/null +++ b/bash-5.1/array.h @@ -0,0 +1,127 @@ +/* array.h -- definitions for the interface exported by array.c that allows + the rest of the shell to manipulate array variables. */ + +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + + +#ifndef _ARRAY_H_ +#define _ARRAY_H_ + +#include "stdc.h" + +typedef intmax_t arrayind_t; + +enum atype {array_indexed, array_assoc}; /* only array_indexed used */ + +typedef struct array { + enum atype type; + arrayind_t max_index; + int num_elements; + struct array_element *head; + struct array_element *lastref; +} ARRAY; + +typedef struct array_element { + arrayind_t ind; + char *value; + struct array_element *next, *prev; +} ARRAY_ELEMENT; + +typedef int sh_ae_map_func_t PARAMS((ARRAY_ELEMENT *, void *)); + +/* Basic operations on entire arrays */ +extern ARRAY *array_create PARAMS((void)); +extern void array_flush PARAMS((ARRAY *)); +extern void array_dispose PARAMS((ARRAY *)); +extern ARRAY *array_copy PARAMS((ARRAY *)); +extern ARRAY *array_slice PARAMS((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *)); +extern void array_walk PARAMS((ARRAY *, sh_ae_map_func_t *, void *)); + +extern ARRAY_ELEMENT *array_shift PARAMS((ARRAY *, int, int)); +extern int array_rshift PARAMS((ARRAY *, int, char *)); +extern ARRAY_ELEMENT *array_unshift_element PARAMS((ARRAY *)); +extern int array_shift_element PARAMS((ARRAY *, char *)); + +extern ARRAY *array_quote PARAMS((ARRAY *)); +extern ARRAY *array_quote_escapes PARAMS((ARRAY *)); +extern ARRAY *array_dequote PARAMS((ARRAY *)); +extern ARRAY *array_dequote_escapes PARAMS((ARRAY *)); +extern ARRAY *array_remove_quoted_nulls PARAMS((ARRAY *)); + +extern char *array_subrange PARAMS((ARRAY *, arrayind_t, arrayind_t, int, int, int)); +extern char *array_patsub PARAMS((ARRAY *, char *, char *, int)); +extern char *array_modcase PARAMS((ARRAY *, char *, int, int)); + +/* Basic operations on array elements. */ +extern ARRAY_ELEMENT *array_create_element PARAMS((arrayind_t, char *)); +extern ARRAY_ELEMENT *array_copy_element PARAMS((ARRAY_ELEMENT *)); +extern void array_dispose_element PARAMS((ARRAY_ELEMENT *)); + +extern int array_insert PARAMS((ARRAY *, arrayind_t, char *)); +extern ARRAY_ELEMENT *array_remove PARAMS((ARRAY *, arrayind_t)); +extern char *array_reference PARAMS((ARRAY *, arrayind_t)); + +/* Converting to and from arrays */ +extern WORD_LIST *array_to_word_list PARAMS((ARRAY *)); +extern ARRAY *array_from_word_list PARAMS((WORD_LIST *)); +extern WORD_LIST *array_keys_to_word_list PARAMS((ARRAY *)); + +extern ARRAY *array_assign_list PARAMS((ARRAY *, WORD_LIST *)); + +extern char **array_to_argv PARAMS((ARRAY *, int *)); + +extern char *array_to_kvpair PARAMS((ARRAY *, int)); +extern char *array_to_assign PARAMS((ARRAY *, int)); +extern char *array_to_string PARAMS((ARRAY *, char *, int)); +extern ARRAY *array_from_string PARAMS((char *, char *)); + +/* Flags for array_shift */ +#define AS_DISPOSE 0x01 + +#define array_num_elements(a) ((a)->num_elements) +#define array_max_index(a) ((a)->max_index) +#define array_first_index(a) ((a)->head->next->ind) +#define array_head(a) ((a)->head) +#define array_empty(a) ((a)->num_elements == 0) + +#define element_value(ae) ((ae)->value) +#define element_index(ae) ((ae)->ind) +#define element_forw(ae) ((ae)->next) +#define element_back(ae) ((ae)->prev) + +#define set_element_value(ae, val) ((ae)->value = (val)) + +/* Convenience */ +#define array_push(a,v) \ + do { array_rshift ((a), 1, (v)); } while (0) +#define array_pop(a) \ + do { array_dispose_element (array_shift ((a), 1, 0)); } while (0) + +#define GET_ARRAY_FROM_VAR(n, v, a) \ + do { \ + (v) = find_variable (n); \ + (a) = ((v) && array_p ((v))) ? array_cell (v) : (ARRAY *)0; \ + } while (0) + +#define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*') + +/* In eval.c, but uses ARRAY * */ +extern int execute_array_command PARAMS((ARRAY *, void *)); + +#endif /* _ARRAY_H_ */ diff --git a/bash-5.1/arrayfunc.c b/bash-5.1/arrayfunc.c new file mode 100644 index 0000000000000000000000000000000000000000..8231ba1eded7d704a4fc2067c24d9af4b59d07e4 --- /dev/null +++ b/bash-5.1/arrayfunc.c @@ -0,0 +1,1517 @@ +/* arrayfunc.c -- High-level array functions used by other parts of the shell. */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (ARRAY_VARS) + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include + +#include "bashintl.h" + +#include "shell.h" +#include "execute_cmd.h" +#include "pathexp.h" + +#include "shmbutil.h" +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif + +#include "builtins/common.h" + +#ifndef LBRACK +# define LBRACK '[' +# define RBRACK ']' +#endif + +/* This variable means to not expand associative array subscripts more than + once, when performing variable expansion. */ +int assoc_expand_once = 0; + +/* Ditto for indexed array subscripts -- currently unused */ +int array_expand_once = 0; + +static SHELL_VAR *bind_array_var_internal PARAMS((SHELL_VAR *, arrayind_t, char *, char *, int)); +static SHELL_VAR *assign_array_element_internal PARAMS((SHELL_VAR *, char *, char *, char *, int, char *, int)); + +static void assign_assoc_from_kvlist PARAMS((SHELL_VAR *, WORD_LIST *, HASH_TABLE *, int)); + +static char *quote_assign PARAMS((const char *)); +static void quote_array_assignment_chars PARAMS((WORD_LIST *)); +static char *quote_compound_array_word PARAMS((char *, int)); +static char *array_value_internal PARAMS((const char *, int, int, int *, arrayind_t *)); + +/* Standard error message to use when encountering an invalid array subscript */ +const char * const bash_badsub_errmsg = N_("bad array subscript"); + +/* **************************************************************** */ +/* */ +/* Functions to manipulate array variables and perform assignments */ +/* */ +/* **************************************************************** */ + +/* Convert a shell variable to an array variable. The original value is + saved as array[0]. */ +SHELL_VAR * +convert_var_to_array (var) + SHELL_VAR *var; +{ + char *oldval; + ARRAY *array; + + oldval = value_cell (var); + array = array_create (); + if (oldval) + array_insert (array, 0, oldval); + + FREE (value_cell (var)); + var_setarray (var, array); + + /* these aren't valid anymore */ + var->dynamic_value = (sh_var_value_func_t *)NULL; + var->assign_func = (sh_var_assign_func_t *)NULL; + + INVALIDATE_EXPORTSTR (var); + if (exported_p (var)) + array_needs_making++; + + VSETATTR (var, att_array); + if (oldval) + VUNSETATTR (var, att_invisible); + + /* Make sure it's not marked as an associative array any more */ + VUNSETATTR (var, att_assoc); + + /* Since namerefs can't be array variables, turn off nameref attribute */ + VUNSETATTR (var, att_nameref); + + return var; +} + +/* Convert a shell variable to an array variable. The original value is + saved as array[0]. */ +SHELL_VAR * +convert_var_to_assoc (var) + SHELL_VAR *var; +{ + char *oldval; + HASH_TABLE *hash; + + oldval = value_cell (var); + hash = assoc_create (0); + if (oldval) + assoc_insert (hash, savestring ("0"), oldval); + + FREE (value_cell (var)); + var_setassoc (var, hash); + + /* these aren't valid anymore */ + var->dynamic_value = (sh_var_value_func_t *)NULL; + var->assign_func = (sh_var_assign_func_t *)NULL; + + INVALIDATE_EXPORTSTR (var); + if (exported_p (var)) + array_needs_making++; + + VSETATTR (var, att_assoc); + if (oldval) + VUNSETATTR (var, att_invisible); + + /* Make sure it's not marked as an indexed array any more */ + VUNSETATTR (var, att_array); + + /* Since namerefs can't be array variables, turn off nameref attribute */ + VUNSETATTR (var, att_nameref); + + return var; +} + +char * +make_array_variable_value (entry, ind, key, value, flags) + SHELL_VAR *entry; + arrayind_t ind; + char *key; + char *value; + int flags; +{ + SHELL_VAR *dentry; + char *newval; + + /* If we're appending, we need the old value of the array reference, so + fake out make_variable_value with a dummy SHELL_VAR */ + if (flags & ASS_APPEND) + { + dentry = (SHELL_VAR *)xmalloc (sizeof (SHELL_VAR)); + dentry->name = savestring (entry->name); + if (assoc_p (entry)) + newval = assoc_reference (assoc_cell (entry), key); + else + newval = array_reference (array_cell (entry), ind); + if (newval) + dentry->value = savestring (newval); + else + { + dentry->value = (char *)xmalloc (1); + dentry->value[0] = '\0'; + } + dentry->exportstr = 0; + dentry->attributes = entry->attributes & ~(att_array|att_assoc|att_exported); + /* Leave the rest of the members uninitialized; the code doesn't look + at them. */ + newval = make_variable_value (dentry, value, flags); + dispose_variable (dentry); + } + else + newval = make_variable_value (entry, value, flags); + + return newval; +} + +/* Assign HASH[KEY]=VALUE according to FLAGS. ENTRY is an associative array + variable; HASH is the hash table to assign into. HASH may or may not be + the hash table associated with ENTRY; if it's not, the caller takes care + of it. + XXX - make sure that any dynamic associative array variables recreate the + hash table on each assignment. BASH_CMDS and BASH_ALIASES already do this */ +static SHELL_VAR * +bind_assoc_var_internal (entry, hash, key, value, flags) + SHELL_VAR *entry; + HASH_TABLE *hash; + char *key; + char *value; + int flags; +{ + char *newval; + + /* Use the existing array contents to expand the value */ + newval = make_array_variable_value (entry, 0, key, value, flags); + + if (entry->assign_func) + (*entry->assign_func) (entry, newval, 0, key); + else + assoc_insert (hash, key, newval); + + FREE (newval); + + VUNSETATTR (entry, att_invisible); /* no longer invisible */ + + /* check mark_modified_variables if we ever want to export array vars */ + return (entry); +} + +/* Perform ENTRY[IND]=VALUE or ENTRY[KEY]=VALUE. This is not called for every + assignment to an associative array; see assign_compound_array_list below. */ +static SHELL_VAR * +bind_array_var_internal (entry, ind, key, value, flags) + SHELL_VAR *entry; + arrayind_t ind; + char *key; + char *value; + int flags; +{ + char *newval; + + newval = make_array_variable_value (entry, ind, key, value, flags); + + if (entry->assign_func) + (*entry->assign_func) (entry, newval, ind, key); + else if (assoc_p (entry)) + assoc_insert (assoc_cell (entry), key, newval); + else + array_insert (array_cell (entry), ind, newval); + FREE (newval); + + VUNSETATTR (entry, att_invisible); /* no longer invisible */ + + /* check mark_modified_variables if we ever want to export array vars */ + return (entry); +} + +/* Perform an array assignment name[ind]=value. If NAME already exists and + is not an array, and IND is 0, perform name=value instead. If NAME exists + and is not an array, and IND is not 0, convert it into an array with the + existing value as name[0]. + + If NAME does not exist, just create an array variable, no matter what + IND's value may be. */ +SHELL_VAR * +bind_array_variable (name, ind, value, flags) + char *name; + arrayind_t ind; + char *value; + int flags; +{ + SHELL_VAR *entry; + + entry = find_shell_variable (name); + + if (entry == (SHELL_VAR *) 0) + { + /* Is NAME a nameref variable that points to an unset variable? */ + entry = find_variable_nameref_for_create (name, 0); + if (entry == INVALID_NAMEREF_VALUE) + return ((SHELL_VAR *)0); + if (entry && nameref_p (entry)) + entry = make_new_array_variable (nameref_cell (entry)); + } + if (entry == (SHELL_VAR *) 0) + entry = make_new_array_variable (name); + else if ((readonly_p (entry) && (flags&ASS_FORCE) == 0) || noassign_p (entry)) + { + if (readonly_p (entry)) + err_readonly (name); + return (entry); + } + else if (array_p (entry) == 0) + entry = convert_var_to_array (entry); + + /* ENTRY is an array variable, and ARRAY points to the value. */ + return (bind_array_var_internal (entry, ind, 0, value, flags)); +} + +SHELL_VAR * +bind_array_element (entry, ind, value, flags) + SHELL_VAR *entry; + arrayind_t ind; + char *value; + int flags; +{ + return (bind_array_var_internal (entry, ind, 0, value, flags)); +} + +SHELL_VAR * +bind_assoc_variable (entry, name, key, value, flags) + SHELL_VAR *entry; + char *name; + char *key; + char *value; + int flags; +{ + if ((readonly_p (entry) && (flags&ASS_FORCE) == 0) || noassign_p (entry)) + { + if (readonly_p (entry)) + err_readonly (name); + return (entry); + } + + return (bind_assoc_var_internal (entry, assoc_cell (entry), key, value, flags)); +} + +/* Parse NAME, a lhs of an assignment statement of the form v[s], and + assign VALUE to that array element by calling bind_array_variable(). + Flags are ASS_ assignment flags */ +SHELL_VAR * +assign_array_element (name, value, flags) + char *name, *value; + int flags; +{ + char *sub, *vname; + int sublen, isassoc; + SHELL_VAR *entry; + + vname = array_variable_name (name, (flags & ASS_NOEXPAND) != 0, &sub, &sublen); + + if (vname == 0) + return ((SHELL_VAR *)NULL); + + entry = find_variable (vname); + isassoc = entry && assoc_p (entry); + + if (((isassoc == 0 || (flags & ASS_NOEXPAND) == 0) && (ALL_ELEMENT_SUB (sub[0]) && sub[1] == ']')) || (sublen <= 1)) + { + free (vname); + err_badarraysub (name); + return ((SHELL_VAR *)NULL); + } + + entry = assign_array_element_internal (entry, name, vname, sub, sublen, value, flags); + + free (vname); + return entry; +} + +static SHELL_VAR * +assign_array_element_internal (entry, name, vname, sub, sublen, value, flags) + SHELL_VAR *entry; + char *name; /* only used for error messages */ + char *vname; + char *sub; + int sublen; + char *value; + int flags; +{ + char *akey; + arrayind_t ind; + + if (entry && assoc_p (entry)) + { + sub[sublen-1] = '\0'; + if ((flags & ASS_NOEXPAND) == 0) + akey = expand_assignment_string_to_string (sub, 0); /* [ */ + else + akey = savestring (sub); + sub[sublen-1] = ']'; + if (akey == 0 || *akey == 0) + { + err_badarraysub (name); + FREE (akey); + return ((SHELL_VAR *)NULL); + } + entry = bind_assoc_variable (entry, vname, akey, value, flags); + } + else + { + ind = array_expand_index (entry, sub, sublen, 0); + /* negative subscripts to indexed arrays count back from end */ + if (entry && ind < 0) + ind = (array_p (entry) ? array_max_index (array_cell (entry)) : 0) + 1 + ind; + if (ind < 0) + { + err_badarraysub (name); + return ((SHELL_VAR *)NULL); + } + entry = bind_array_variable (vname, ind, value, flags); + } + + return (entry); +} + +/* Find the array variable corresponding to NAME. If there is no variable, + create a new array variable. If the variable exists but is not an array, + convert it to an indexed array. If FLAGS&1 is non-zero, an existing + variable is checked for the readonly or noassign attribute in preparation + for assignment (e.g., by the `read' builtin). If FLAGS&2 is non-zero, we + create an associative array. */ +SHELL_VAR * +find_or_make_array_variable (name, flags) + char *name; + int flags; +{ + SHELL_VAR *var; + + var = find_variable (name); + if (var == 0) + { + /* See if we have a nameref pointing to a variable that hasn't been + created yet. */ + var = find_variable_last_nameref (name, 1); + if (var && nameref_p (var) && invisible_p (var)) + { + internal_warning (_("%s: removing nameref attribute"), name); + VUNSETATTR (var, att_nameref); + } + if (var && nameref_p (var)) + { + if (valid_nameref_value (nameref_cell (var), 2) == 0) + { + sh_invalidid (nameref_cell (var)); + return ((SHELL_VAR *)NULL); + } + var = (flags & 2) ? make_new_assoc_variable (nameref_cell (var)) : make_new_array_variable (nameref_cell (var)); + } + } + + if (var == 0) + var = (flags & 2) ? make_new_assoc_variable (name) : make_new_array_variable (name); + else if ((flags & 1) && (readonly_p (var) || noassign_p (var))) + { + if (readonly_p (var)) + err_readonly (name); + return ((SHELL_VAR *)NULL); + } + else if ((flags & 2) && array_p (var)) + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: cannot convert indexed to associative array"), name); + return ((SHELL_VAR *)NULL); + } + else if (array_p (var) == 0 && assoc_p (var) == 0) + var = convert_var_to_array (var); + + return (var); +} + +/* Perform a compound assignment statement for array NAME, where VALUE is + the text between the parens: NAME=( VALUE ) */ +SHELL_VAR * +assign_array_from_string (name, value, flags) + char *name, *value; + int flags; +{ + SHELL_VAR *var; + int vflags; + + vflags = 1; + if (flags & ASS_MKASSOC) + vflags |= 2; + + var = find_or_make_array_variable (name, vflags); + if (var == 0) + return ((SHELL_VAR *)NULL); + + return (assign_array_var_from_string (var, value, flags)); +} + +/* Sequentially assign the indices of indexed array variable VAR from the + words in LIST. */ +SHELL_VAR * +assign_array_var_from_word_list (var, list, flags) + SHELL_VAR *var; + WORD_LIST *list; + int flags; +{ + register arrayind_t i; + register WORD_LIST *l; + ARRAY *a; + + a = array_cell (var); + i = (flags & ASS_APPEND) ? array_max_index (a) + 1 : 0; + + for (l = list; l; l = l->next, i++) + bind_array_var_internal (var, i, 0, l->word->word, flags & ~ASS_APPEND); + + VUNSETATTR (var, att_invisible); /* no longer invisible */ + + return var; +} + +WORD_LIST * +expand_compound_array_assignment (var, value, flags) + SHELL_VAR *var; + char *value; + int flags; +{ + WORD_LIST *list, *nlist; + char *val; + int ni; + + /* This condition is true when invoked from the declare builtin with a + command like + declare -a d='([1]="" [2]="bdef" [5]="hello world" "test")' */ + if (*value == '(') /*)*/ + { + ni = 1; + val = extract_array_assignment_list (value, &ni); + if (val == 0) + return (WORD_LIST *)NULL; + } + else + val = value; + + /* Expand the value string into a list of words, performing all the + shell expansions including pathname generation and word splitting. */ + /* First we split the string on whitespace, using the shell parser + (ksh93 seems to do this). */ + list = parse_string_to_word_list (val, 1, "array assign"); + + /* Note that we defer expansion of the assignment statements for associative + arrays here, so we don't have to scan the subscript and find the ending + bracket twice. See the caller below. */ + if (var && assoc_p (var)) + { + if (val != value) + free (val); + return list; + } + + /* If we're using [subscript]=value, we need to quote each [ and ] to + prevent unwanted filename expansion. This doesn't need to be done + for associative array expansion, since that uses a different expansion + function (see assign_compound_array_list below). */ + if (list) + quote_array_assignment_chars (list); + + /* Now that we've split it, perform the shell expansions on each + word in the list. */ + nlist = list ? expand_words_no_vars (list) : (WORD_LIST *)NULL; + + dispose_words (list); + + if (val != value) + free (val); + + return nlist; +} + +#if ASSOC_KVPAIR_ASSIGNMENT +static void +assign_assoc_from_kvlist (var, nlist, h, flags) + SHELL_VAR *var; + WORD_LIST *nlist; + HASH_TABLE *h; + int flags; +{ + WORD_LIST *list; + char *akey, *aval, *k, *v; + int free_aval; + + for (list = nlist; list; list = list->next) + { + free_aval = 0; + + k = list->word->word; + v = list->next ? list->next->word->word : 0; + + if (list->next) + list = list->next; + + akey = expand_assignment_string_to_string (k, 0); + aval = expand_assignment_string_to_string (v, 0); + + if (akey == 0 || *akey == 0) + { + err_badarraysub (k); + FREE (akey); + continue; + } + if (aval == 0) + { + aval = (char *)xmalloc (1); + aval[0] = '\0'; /* like do_assignment_internal */ + free_aval = 1; + } + + bind_assoc_var_internal (var, h, akey, aval, flags); + if (free_aval) + free (aval); + } +} + +/* Return non-zero if L appears to be a key-value pair associative array + compound assignment. */ +int +kvpair_assignment_p (l) + WORD_LIST *l; +{ + return (l && (l->word->flags & W_ASSIGNMENT) == 0 && l->word->word[0] != '['); /*]*/ +} + +char * +expand_and_quote_kvpair_word (w) + char *w; +{ + char *t, *r; + + t = w ? expand_assignment_string_to_string (w, 0) : 0; + r = sh_single_quote (t ? t : ""); + free (t); + return r; +} +#endif + +/* Callers ensure that VAR is not NULL. Associative array assignments have not + been expanded when this is called, or have been expanded once and single- + quoted, so we don't have to scan through an unquoted expanded subscript to + find the ending bracket; indexed array assignments have been expanded and + possibly single-quoted to prevent further expansion. + + If this is an associative array, we perform the assignments into NHASH and + set NHASH to be the value of VAR after processing the assignments in NLIST */ +void +assign_compound_array_list (var, nlist, flags) + SHELL_VAR *var; + WORD_LIST *nlist; + int flags; +{ + ARRAY *a; + HASH_TABLE *h, *nhash; + WORD_LIST *list; + char *w, *val, *nval, *savecmd; + int len, iflags, free_val; + arrayind_t ind, last_ind; + char *akey; + + a = (var && array_p (var)) ? array_cell (var) : (ARRAY *)0; + nhash = h = (var && assoc_p (var)) ? assoc_cell (var) : (HASH_TABLE *)0; + + akey = (char *)0; + ind = 0; + + /* Now that we are ready to assign values to the array, kill the existing + value. */ + if ((flags & ASS_APPEND) == 0) + { + if (a && array_p (var)) + array_flush (a); + else if (h && assoc_p (var)) + nhash = assoc_create (h->nbuckets); + } + + last_ind = (a && (flags & ASS_APPEND)) ? array_max_index (a) + 1 : 0; + +#if ASSOC_KVPAIR_ASSIGNMENT + if (assoc_p (var) && kvpair_assignment_p (nlist)) + { + iflags = flags & ~ASS_APPEND; + assign_assoc_from_kvlist (var, nlist, nhash, iflags); + if (nhash && nhash != h) + { + h = assoc_cell (var); + var_setassoc (var, nhash); + assoc_dispose (h); + } + return; + } +#endif + + for (list = nlist; list; list = list->next) + { + /* Don't allow var+=(values) to make assignments in VALUES append to + existing values by default. */ + iflags = flags & ~ASS_APPEND; + w = list->word->word; + + /* We have a word of the form [ind]=value */ + if ((list->word->flags & W_ASSIGNMENT) && w[0] == '[') + { + /* Don't have to handle embedded quotes specially any more, since + associative array subscripts have not been expanded yet (see + above). */ + len = skipsubscript (w, 0, 0); + + /* XXX - changes for `+=' */ + if (w[len] != ']' || (w[len+1] != '=' && (w[len+1] != '+' || w[len+2] != '='))) + { + if (assoc_p (var)) + { + err_badarraysub (w); + continue; + } + nval = make_variable_value (var, w, flags); + if (var->assign_func) + (*var->assign_func) (var, nval, last_ind, 0); + else + array_insert (a, last_ind, nval); + FREE (nval); + last_ind++; + continue; + } + + if (len == 1) + { + err_badarraysub (w); + continue; + } + + if (ALL_ELEMENT_SUB (w[1]) && len == 2) + { + set_exit_status (EXECUTION_FAILURE); + if (assoc_p (var)) + report_error (_("%s: invalid associative array key"), w); + else + report_error (_("%s: cannot assign to non-numeric index"), w); + continue; + } + + if (array_p (var)) + { + ind = array_expand_index (var, w + 1, len, 0); + /* negative subscripts to indexed arrays count back from end */ + if (ind < 0) + ind = array_max_index (array_cell (var)) + 1 + ind; + if (ind < 0) + { + err_badarraysub (w); + continue; + } + + last_ind = ind; + } + else if (assoc_p (var)) + { + /* This is not performed above, see expand_compound_array_assignment */ + w[len] = '\0'; /*[*/ + akey = expand_assignment_string_to_string (w+1, 0); + w[len] = ']'; + /* And we need to expand the value also, see below */ + if (akey == 0 || *akey == 0) + { + err_badarraysub (w); + FREE (akey); + continue; + } + } + + /* XXX - changes for `+=' -- just accept the syntax. ksh93 doesn't do this */ + if (w[len + 1] == '+' && w[len + 2] == '=') + { + iflags |= ASS_APPEND; + val = w + len + 3; + } + else + val = w + len + 2; + } + else if (assoc_p (var)) + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: %s: must use subscript when assigning associative array"), var->name, w); + continue; + } + else /* No [ind]=value, just a stray `=' */ + { + ind = last_ind; + val = w; + } + + free_val = 0; + /* See above; we need to expand the value here */ + if (assoc_p (var)) + { + val = expand_assignment_string_to_string (val, 0); + if (val == 0) + { + val = (char *)xmalloc (1); + val[0] = '\0'; /* like do_assignment_internal */ + } + free_val = 1; + } + + savecmd = this_command_name; + if (integer_p (var)) + this_command_name = (char *)NULL; /* no command name for errors */ + if (assoc_p (var)) + bind_assoc_var_internal (var, nhash, akey, val, iflags); + else + bind_array_var_internal (var, ind, akey, val, iflags); + last_ind++; + this_command_name = savecmd; + + if (free_val) + free (val); + } + + if (assoc_p (var) && nhash && nhash != h) + { + h = assoc_cell (var); + var_setassoc (var, nhash); + assoc_dispose (h); + } +} + +/* Perform a compound array assignment: VAR->name=( VALUE ). The + VALUE has already had the parentheses stripped. */ +SHELL_VAR * +assign_array_var_from_string (var, value, flags) + SHELL_VAR *var; + char *value; + int flags; +{ + WORD_LIST *nlist; + + if (value == 0) + return var; + + nlist = expand_compound_array_assignment (var, value, flags); + assign_compound_array_list (var, nlist, flags); + + if (nlist) + dispose_words (nlist); + + if (var) + VUNSETATTR (var, att_invisible); /* no longer invisible */ + + return (var); +} + +/* Quote globbing chars and characters in $IFS before the `=' in an assignment + statement (usually a compound array assignment) to protect them from + unwanted filename expansion or word splitting. */ +static char * +quote_assign (string) + const char *string; +{ + size_t slen; + int saw_eq; + char *temp, *t, *subs; + const char *s, *send; + int ss, se; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + + t = temp = (char *)xmalloc (slen * 2 + 1); + saw_eq = 0; + for (s = string; *s; ) + { + if (*s == '=') + saw_eq = 1; + if (saw_eq == 0 && *s == '[') /* looks like a subscript */ + { + ss = s - string; + se = skipsubscript (string, ss, 0); + subs = substring (s, ss, se); + *t++ = '\\'; + strcpy (t, subs); + t += se - ss; + *t++ = '\\'; + *t++ = ']'; + s += se + 1; + free (subs); + continue; + } + if (saw_eq == 0 && (glob_char_p (s) || isifs (*s))) + *t++ = '\\'; + + COPY_CHAR_P (t, s, send); + } + *t = '\0'; + return temp; +} + +/* Take a word W of the form [IND]=VALUE and transform it to ['IND']='VALUE' + to prevent further expansion. This is called for compound assignments to + indexed arrays. W has already undergone word expansions. If W has no [IND]=, + just single-quote and return it. */ +static char * +quote_compound_array_word (w, type) + char *w; + int type; +{ + char *nword, *sub, *value, *t; + int ind, wlen, i; + + if (w[0] != LBRACK) + return (sh_single_quote (w)); + ind = skipsubscript (w, 0, 0); + if (w[ind] != RBRACK) + return (sh_single_quote (w)); + + wlen = strlen (w); + w[ind] = '\0'; + sub = sh_single_quote (w+1); + w[ind] = RBRACK; + + nword = xmalloc (wlen * 4 + 5); /* wlen*4 is max single quoted length */ + nword[0] = LBRACK; + i = STRLEN (sub); + memcpy (nword+1, sub, i); + i++; /* accommodate the opening LBRACK */ + nword[i++] = w[ind++]; /* RBRACK */ + if (w[ind] == '+') + nword[i++] = w[ind++]; + nword[i++] = w[ind++]; + value = sh_single_quote (w + ind); + strcpy (nword + i, value); + + return nword; +} + +/* Expand the key and value in W, which is of the form [KEY]=VALUE, and + reconstruct W with the expanded and single-quoted version: + ['expanded-key']='expanded-value'. If there is no [KEY]=, single-quote the + word and return it. Very similar to previous function, but does not assume + W has already been expanded, and expands the KEY and VALUE separately. + Used for compound assignments to associative arrays that are arguments to + declaration builtins (declare -A a=( list )). */ +char * +expand_and_quote_assoc_word (w, type) + char *w; + int type; +{ + char *nword, *key, *value, *t; + int ind, wlen, i; + + if (w[0] != LBRACK) + return (sh_single_quote (w)); + ind = skipsubscript (w, 0, 0); + if (w[ind] != RBRACK) + return (sh_single_quote (w)); + + w[ind] = '\0'; + t = expand_assignment_string_to_string (w+1, 0); + w[ind] = RBRACK; + key = sh_single_quote (t ? t : ""); + free (t); + + wlen = STRLEN (key); + nword = xmalloc (wlen + 5); + nword[0] = LBRACK; + memcpy (nword+1, key, wlen); + i = wlen + 1; /* accommodate the opening LBRACK */ + + nword[i++] = w[ind++]; /* RBRACK */ + if (w[ind] == '+') + nword[i++] = w[ind++]; + nword[i++] = w[ind++]; + + t = expand_assignment_string_to_string (w+ind, 0); + value = sh_single_quote (t ? t : ""); + free (t); + nword = xrealloc (nword, wlen + 5 + STRLEN (value)); + strcpy (nword + i, value); + + free (key); + free (value); + + return nword; +} + +/* For each word in a compound array assignment, if the word looks like + [ind]=value, single-quote ind and value, but leave the brackets and + the = sign (and any `+') alone. If it's not an assignment, just single- + quote the word. This is used for indexed arrays. */ +void +quote_compound_array_list (list, type) + WORD_LIST *list; + int type; +{ + char *t; + WORD_LIST *l; + + for (l = list; l; l = l->next) + { + if (l->word == 0 || l->word->word == 0) + continue; /* should not happen, but just in case... */ + if ((l->word->flags & W_ASSIGNMENT) == 0) + t = sh_single_quote (l->word->word); + else + t = quote_compound_array_word (l->word->word, type); + free (l->word->word); + l->word->word = t; + } +} + +/* For each word in a compound array assignment, if the word looks like + [ind]=value, quote globbing chars and characters in $IFS before the `='. */ +static void +quote_array_assignment_chars (list) + WORD_LIST *list; +{ + char *nword; + WORD_LIST *l; + + for (l = list; l; l = l->next) + { + if (l->word == 0 || l->word->word == 0 || l->word->word[0] == '\0') + continue; /* should not happen, but just in case... */ + /* Don't bother if it hasn't been recognized as an assignment or + doesn't look like [ind]=value */ + if ((l->word->flags & W_ASSIGNMENT) == 0) + continue; + if (l->word->word[0] != '[' || mbschr (l->word->word, '=') == 0) /* ] */ + continue; + + nword = quote_assign (l->word->word); + free (l->word->word); + l->word->word = nword; + l->word->flags |= W_NOGLOB; /* XXX - W_NOSPLIT also? */ + } +} + +/* skipsubscript moved to subst.c to use private functions. 2009/02/24. */ + +/* This function is called with SUB pointing to just after the beginning + `[' of an array subscript and removes the array element to which SUB + expands from array VAR. A subscript of `*' or `@' unsets the array. */ +/* If FLAGS&1 we don't expand the subscript; we just use it as-is. */ +int +unbind_array_element (var, sub, flags) + SHELL_VAR *var; + char *sub; + int flags; +{ + int len; + arrayind_t ind; + char *akey; + ARRAY_ELEMENT *ae; + + len = skipsubscript (sub, 0, (flags&1) || (var && assoc_p(var))); /* XXX */ + if (sub[len] != ']' || len == 0) + { + builtin_error ("%s[%s: %s", var->name, sub, _(bash_badsub_errmsg)); + return -1; + } + sub[len] = '\0'; + + if (ALL_ELEMENT_SUB (sub[0]) && sub[1] == 0) + { + if (array_p (var) || assoc_p (var)) + { + unbind_variable (var->name); /* XXX -- {array,assoc}_flush ? */ + return (0); + } + else + return -2; /* don't allow this to unset scalar variables */ + } + + if (assoc_p (var)) + { + akey = (flags & 1) ? sub : expand_assignment_string_to_string (sub, 0); + if (akey == 0 || *akey == 0) + { + builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg)); + FREE (akey); + return -1; + } + assoc_remove (assoc_cell (var), akey); + if (akey != sub) + free (akey); + } + else if (array_p (var)) + { + ind = array_expand_index (var, sub, len+1, 0); + /* negative subscripts to indexed arrays count back from end */ + if (ind < 0) + ind = array_max_index (array_cell (var)) + 1 + ind; + if (ind < 0) + { + builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg)); + return -1; + } + ae = array_remove (array_cell (var), ind); + if (ae) + array_dispose_element (ae); + } + else /* array_p (var) == 0 && assoc_p (var) == 0 */ + { + akey = this_command_name; + ind = array_expand_index (var, sub, len+1, 0); + this_command_name = akey; + if (ind == 0) + { + unbind_variable (var->name); + return (0); + } + else + return -2; /* any subscript other than 0 is invalid with scalar variables */ + } + + return 0; +} + +/* Format and output an array assignment in compound form VAR=(VALUES), + suitable for re-use as input. */ +void +print_array_assignment (var, quoted) + SHELL_VAR *var; + int quoted; +{ + char *vstr; + + vstr = array_to_assign (array_cell (var), quoted); + + if (vstr == 0) + printf ("%s=%s\n", var->name, quoted ? "'()'" : "()"); + else + { + printf ("%s=%s\n", var->name, vstr); + free (vstr); + } +} + +/* Format and output an associative array assignment in compound form + VAR=(VALUES), suitable for re-use as input. */ +void +print_assoc_assignment (var, quoted) + SHELL_VAR *var; + int quoted; +{ + char *vstr; + + vstr = assoc_to_assign (assoc_cell (var), quoted); + + if (vstr == 0) + printf ("%s=%s\n", var->name, quoted ? "'()'" : "()"); + else + { + printf ("%s=%s\n", var->name, vstr); + free (vstr); + } +} + +/***********************************************************************/ +/* */ +/* Utility functions to manage arrays and their contents for expansion */ +/* */ +/***********************************************************************/ + +/* Return 1 if NAME is a properly-formed array reference v[sub]. */ + +/* We need to reserve 1 for FLAGS, which we pass to skipsubscript. */ +int +valid_array_reference (name, flags) + const char *name; + int flags; +{ + char *t; + int r, len, isassoc; + SHELL_VAR *entry; + + t = mbschr (name, '['); /* ] */ + isassoc = 0; + if (t) + { + *t = '\0'; + r = legal_identifier (name); + if (flags & VA_NOEXPAND) /* Don't waste a lookup if we don't need one */ + isassoc = (entry = find_variable (name)) && assoc_p (entry); + *t = '['; + if (r == 0) + return 0; + + if (isassoc && ((flags & (VA_NOEXPAND|VA_ONEWORD)) == (VA_NOEXPAND|VA_ONEWORD))) + len = strlen (t) - 1; + else if (isassoc) + len = skipsubscript (t, 0, flags&VA_NOEXPAND); /* VA_NOEXPAND must be 1 */ + else + /* Check for a properly-terminated non-null subscript. */ + len = skipsubscript (t, 0, 0); /* arithmetic expression */ + + if (t[len] != ']' || len == 1 || t[len+1] != '\0') + return 0; + +#if 0 + /* Could check and allow subscripts consisting only of whitespace for + existing associative arrays, using isassoc */ + for (r = 1; r < len; r++) + if (whitespace (t[r]) == 0) + return 1; + return 0; +#else + /* This allows blank subscripts */ + return 1; +#endif + } + return 0; +} + +/* Expand the array index beginning at S and extending LEN characters. */ +arrayind_t +array_expand_index (var, s, len, flags) + SHELL_VAR *var; + char *s; + int len; + int flags; +{ + char *exp, *t, *savecmd; + int expok; + arrayind_t val; + + exp = (char *)xmalloc (len); + strncpy (exp, s, len - 1); + exp[len - 1] = '\0'; +#if 0 /* TAG: maybe bash-5.2 */ + if ((flags & AV_NOEXPAND) == 0) + t = expand_arith_string (exp, Q_DOUBLE_QUOTES|Q_ARITH|Q_ARRAYSUB); /* XXX - Q_ARRAYSUB for future use */ + else + t = exp; +#endif + t = expand_arith_string (exp, Q_DOUBLE_QUOTES|Q_ARITH|Q_ARRAYSUB); /* XXX - Q_ARRAYSUB for future use */ + savecmd = this_command_name; + this_command_name = (char *)NULL; + val = evalexp (t, EXP_EXPANDED, &expok); /* XXX - was 0 but we expanded exp already */ + this_command_name = savecmd; + if (t != exp) + free (t); + free (exp); + if (expok == 0) + { + set_exit_status (EXECUTION_FAILURE); + + if (no_longjmp_on_fatal_error) + return 0; + top_level_cleanup (); + jump_to_top_level (DISCARD); + } + return val; +} + +/* Return the name of the variable specified by S without any subscript. + If SUBP is non-null, return a pointer to the start of the subscript + in *SUBP. If LENP is non-null, the length of the subscript is returned + in *LENP. This returns newly-allocated memory. */ +char * +array_variable_name (s, flags, subp, lenp) + const char *s; + int flags; + char **subp; + int *lenp; +{ + char *t, *ret; + int ind, ni; + + t = mbschr (s, '['); + if (t == 0) + { + if (subp) + *subp = t; + if (lenp) + *lenp = 0; + return ((char *)NULL); + } + ind = t - s; + ni = skipsubscript (s, ind, flags); /* XXX - was 0 not flags */ + if (ni <= ind + 1 || s[ni] != ']') + { + err_badarraysub (s); + if (subp) + *subp = t; + if (lenp) + *lenp = 0; + return ((char *)NULL); + } + + *t = '\0'; + ret = savestring (s); + *t++ = '['; /* ] */ + + if (subp) + *subp = t; + if (lenp) + *lenp = ni - ind; + + return ret; +} + +/* Return the variable specified by S without any subscript. If SUBP is + non-null, return a pointer to the start of the subscript in *SUBP. + If LENP is non-null, the length of the subscript is returned in *LENP. */ +SHELL_VAR * +array_variable_part (s, flags, subp, lenp) + const char *s; + int flags; + char **subp; + int *lenp; +{ + char *t; + SHELL_VAR *var; + + t = array_variable_name (s, flags, subp, lenp); + if (t == 0) + return ((SHELL_VAR *)NULL); + var = find_variable (t); /* XXX - handle namerefs here? */ + + free (t); + return var; /* now return invisible variables; caller must handle */ +} + +#define INDEX_ERROR() \ + do \ + { \ + if (var) \ + err_badarraysub (var->name); \ + else \ + { \ + t[-1] = '\0'; \ + err_badarraysub (s); \ + t[-1] = '['; /* ] */\ + } \ + return ((char *)NULL); \ + } \ + while (0) + +/* Return a string containing the elements in the array and subscript + described by S. If the subscript is * or @, obeys quoting rules akin + to the expansion of $* and $@ including double quoting. If RTYPE + is non-null it gets 1 if the array reference is name[*], 2 if the + reference is name[@], and 0 otherwise. */ +static char * +array_value_internal (s, quoted, flags, rtype, indp) + const char *s; + int quoted, flags, *rtype; + arrayind_t *indp; +{ + int len; + arrayind_t ind; + char *akey; + char *retval, *t, *temp; + WORD_LIST *l; + SHELL_VAR *var; + + var = array_variable_part (s, (flags&AV_NOEXPAND) ? 1 : 0, &t, &len); /* XXX */ + + /* Expand the index, even if the variable doesn't exist, in case side + effects are needed, like ${w[i++]} where w is unset. */ +#if 0 + if (var == 0) + return (char *)NULL; +#endif + + if (len == 0) + return ((char *)NULL); /* error message already printed */ + + /* [ */ + akey = 0; + if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']') + { + if (rtype) + *rtype = (t[0] == '*') ? 1 : 2; + if ((flags & AV_ALLOWALL) == 0) + { + err_badarraysub (s); + return ((char *)NULL); + } + else if (var == 0 || value_cell (var) == 0) /* XXX - check for invisible_p(var) ? */ + return ((char *)NULL); + else if (invisible_p (var)) + return ((char *)NULL); + else if (array_p (var) == 0 && assoc_p (var) == 0) + l = add_string_to_list (value_cell (var), (WORD_LIST *)NULL); + else if (assoc_p (var)) + { + l = assoc_to_word_list (assoc_cell (var)); + if (l == (WORD_LIST *)NULL) + return ((char *)NULL); + } + else + { + l = array_to_word_list (array_cell (var)); + if (l == (WORD_LIST *)NULL) + return ((char *) NULL); + } + + /* Caller of array_value takes care of inspecting rtype and duplicating + retval if rtype == 0, so this is not a memory leak */ + if (t[0] == '*' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + { + temp = string_list_dollar_star (l, quoted, (flags & AV_ASSIGNRHS) ? PF_ASSIGNRHS : 0); + retval = quote_string (temp); + free (temp); + } + else /* ${name[@]} or unquoted ${name[*]} */ + retval = string_list_dollar_at (l, quoted, (flags & AV_ASSIGNRHS) ? PF_ASSIGNRHS : 0); + + dispose_words (l); + } + else + { + if (rtype) + *rtype = 0; + if (var == 0 || array_p (var) || assoc_p (var) == 0) + { + if ((flags & AV_USEIND) == 0 || indp == 0) + { + ind = array_expand_index (var, t, len, flags); + if (ind < 0) + { + /* negative subscripts to indexed arrays count back from end */ + if (var && array_p (var)) + ind = array_max_index (array_cell (var)) + 1 + ind; + if (ind < 0) + INDEX_ERROR(); + } + if (indp) + *indp = ind; + } + else if (indp) + ind = *indp; + } + else if (assoc_p (var)) + { + t[len - 1] = '\0'; + if ((flags & AV_NOEXPAND) == 0) + akey = expand_assignment_string_to_string (t, 0); /* [ */ + else + akey = savestring (t); + t[len - 1] = ']'; + if (akey == 0 || *akey == 0) + { + FREE (akey); + INDEX_ERROR(); + } + } + + if (var == 0 || value_cell (var) == 0) /* XXX - check invisible_p(var) ? */ + { + FREE (akey); + return ((char *)NULL); + } + else if (invisible_p (var)) + { + FREE (akey); + return ((char *)NULL); + } + if (array_p (var) == 0 && assoc_p (var) == 0) + return (ind == 0 ? value_cell (var) : (char *)NULL); + else if (assoc_p (var)) + { + retval = assoc_reference (assoc_cell (var), akey); + free (akey); + } + else + retval = array_reference (array_cell (var), ind); + } + + return retval; +} + +/* Return a string containing the elements described by the array and + subscript contained in S, obeying quoting for subscripts * and @. */ +char * +array_value (s, quoted, flags, rtype, indp) + const char *s; + int quoted, flags, *rtype; + arrayind_t *indp; +{ + return (array_value_internal (s, quoted, flags|AV_ALLOWALL, rtype, indp)); +} + +/* Return the value of the array indexing expression S as a single string. + If (FLAGS & AV_ALLOWALL) is 0, do not allow `@' and `*' subscripts. This + is used by other parts of the shell such as the arithmetic expression + evaluator in expr.c. */ +char * +get_array_value (s, flags, rtype, indp) + const char *s; + int flags, *rtype; + arrayind_t *indp; +{ + return (array_value_internal (s, 0, flags, rtype, indp)); +} + +char * +array_keys (s, quoted, pflags) + char *s; + int quoted, pflags; +{ + int len; + char *retval, *t, *temp; + WORD_LIST *l; + SHELL_VAR *var; + + var = array_variable_part (s, 0, &t, &len); + + /* [ */ + if (var == 0 || ALL_ELEMENT_SUB (t[0]) == 0 || t[1] != ']') + return (char *)NULL; + + if (var_isset (var) == 0 || invisible_p (var)) + return (char *)NULL; + + if (array_p (var) == 0 && assoc_p (var) == 0) + l = add_string_to_list ("0", (WORD_LIST *)NULL); + else if (assoc_p (var)) + l = assoc_keys_to_word_list (assoc_cell (var)); + else + l = array_keys_to_word_list (array_cell (var)); + if (l == (WORD_LIST *)NULL) + return ((char *) NULL); + + retval = string_list_pos_params (t[0], l, quoted, pflags); + + dispose_words (l); + return retval; +} +#endif /* ARRAY_VARS */ diff --git a/bash-5.1/arrayfunc.h b/bash-5.1/arrayfunc.h new file mode 100644 index 0000000000000000000000000000000000000000..838e76d2d484a08322f6544fa5d8462e0f2eb0b1 --- /dev/null +++ b/bash-5.1/arrayfunc.h @@ -0,0 +1,100 @@ +/* arrayfunc.h -- declarations for miscellaneous array functions in arrayfunc.c */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_ARRAYFUNC_H_) +#define _ARRAYFUNC_H_ + +/* Must include variables.h before including this file. */ + +#if defined (ARRAY_VARS) + +/* This variable means to not expand associative array subscripts more than + once, when performing variable expansion. */ +extern int assoc_expand_once; + +/* The analog for indexed array subscripts */ +extern int array_expand_once; + +/* Flags for array_value_internal and callers array_value/get_array_value */ +#define AV_ALLOWALL 0x001 +#define AV_QUOTED 0x002 +#define AV_USEIND 0x004 +#define AV_USEVAL 0x008 /* XXX - should move this */ +#define AV_ASSIGNRHS 0x010 /* no splitting, special case ${a[@]} */ +#define AV_NOEXPAND 0x020 /* don't run assoc subscripts through word expansion */ + +/* Flags for valid_array_reference. Value 1 is reserved for skipsubscript() */ +#define VA_NOEXPAND 0x001 +#define VA_ONEWORD 0x002 + +extern SHELL_VAR *convert_var_to_array PARAMS((SHELL_VAR *)); +extern SHELL_VAR *convert_var_to_assoc PARAMS((SHELL_VAR *)); + +extern char *make_array_variable_value PARAMS((SHELL_VAR *, arrayind_t, char *, char *, int)); + +extern SHELL_VAR *bind_array_variable PARAMS((char *, arrayind_t, char *, int)); +extern SHELL_VAR *bind_array_element PARAMS((SHELL_VAR *, arrayind_t, char *, int)); +extern SHELL_VAR *assign_array_element PARAMS((char *, char *, int)); + +extern SHELL_VAR *bind_assoc_variable PARAMS((SHELL_VAR *, char *, char *, char *, int)); + +extern SHELL_VAR *find_or_make_array_variable PARAMS((char *, int)); + +extern SHELL_VAR *assign_array_from_string PARAMS((char *, char *, int)); +extern SHELL_VAR *assign_array_var_from_word_list PARAMS((SHELL_VAR *, WORD_LIST *, int)); + +extern WORD_LIST *expand_compound_array_assignment PARAMS((SHELL_VAR *, char *, int)); +extern void assign_compound_array_list PARAMS((SHELL_VAR *, WORD_LIST *, int)); +extern SHELL_VAR *assign_array_var_from_string PARAMS((SHELL_VAR *, char *, int)); + +extern char *expand_and_quote_assoc_word PARAMS((char *, int)); +extern void quote_compound_array_list PARAMS((WORD_LIST *, int)); + +extern int kvpair_assignment_p PARAMS((WORD_LIST *)); +extern char *expand_and_quote_kvpair_word PARAMS((char *)); + +extern int unbind_array_element PARAMS((SHELL_VAR *, char *, int)); +extern int skipsubscript PARAMS((const char *, int, int)); + +extern void print_array_assignment PARAMS((SHELL_VAR *, int)); +extern void print_assoc_assignment PARAMS((SHELL_VAR *, int)); + +extern arrayind_t array_expand_index PARAMS((SHELL_VAR *, char *, int, int)); +extern int valid_array_reference PARAMS((const char *, int)); +extern char *array_value PARAMS((const char *, int, int, int *, arrayind_t *)); +extern char *get_array_value PARAMS((const char *, int, int *, arrayind_t *)); + +extern char *array_keys PARAMS((char *, int, int)); + +extern char *array_variable_name PARAMS((const char *, int, char **, int *)); +extern SHELL_VAR *array_variable_part PARAMS((const char *, int, char **, int *)); + +#else + +#define AV_ALLOWALL 0 +#define AV_QUOTED 0 +#define AV_USEIND 0 +#define AV_ASSIGNRHS 0 + +#define VA_ONEWORD 0 + +#endif + +#endif /* !_ARRAYFUNC_H_ */ diff --git a/bash-5.1/assoc.c b/bash-5.1/assoc.c new file mode 100644 index 0000000000000000000000000000000000000000..5782e8567b65e0ff5ff6335fa4b0210bcad44daa --- /dev/null +++ b/bash-5.1/assoc.c @@ -0,0 +1,587 @@ +/* + * assoc.c - functions to manipulate associative arrays + * + * Associative arrays are standard shell hash tables. + * + * Chet Ramey + * chet@ins.cwru.edu + */ + +/* Copyright (C) 2008,2009,2011-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (ARRAY_VARS) + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "bashansi.h" + +#include "shell.h" +#include "array.h" +#include "assoc.h" +#include "builtins/common.h" + +static WORD_LIST *assoc_to_word_list_internal PARAMS((HASH_TABLE *, int)); + +/* assoc_create == hash_create */ + +void +assoc_dispose (hash) + HASH_TABLE *hash; +{ + if (hash) + { + hash_flush (hash, 0); + hash_dispose (hash); + } +} + +void +assoc_flush (hash) + HASH_TABLE *hash; +{ + hash_flush (hash, 0); +} + +int +assoc_insert (hash, key, value) + HASH_TABLE *hash; + char *key; + char *value; +{ + BUCKET_CONTENTS *b; + + b = hash_search (key, hash, HASH_CREATE); + if (b == 0) + return -1; + /* If we are overwriting an existing element's value, we're not going to + use the key. Nothing in the array assignment code path frees the key + string, so we can free it here to avoid a memory leak. */ + if (b->key != key) + free (key); + FREE (b->data); + b->data = value ? savestring (value) : (char *)0; + return (0); +} + +/* Like assoc_insert, but returns b->data instead of freeing it */ +PTR_T +assoc_replace (hash, key, value) + HASH_TABLE *hash; + char *key; + char *value; +{ + BUCKET_CONTENTS *b; + PTR_T t; + + b = hash_search (key, hash, HASH_CREATE); + if (b == 0) + return (PTR_T)0; + /* If we are overwriting an existing element's value, we're not going to + use the key. Nothing in the array assignment code path frees the key + string, so we can free it here to avoid a memory leak. */ + if (b->key != key) + free (key); + t = b->data; + b->data = value ? savestring (value) : (char *)0; + return t; +} + +void +assoc_remove (hash, string) + HASH_TABLE *hash; + char *string; +{ + BUCKET_CONTENTS *b; + + b = hash_remove (string, hash, 0); + if (b) + { + free ((char *)b->data); + free (b->key); + free (b); + } +} + +char * +assoc_reference (hash, string) + HASH_TABLE *hash; + char *string; +{ + BUCKET_CONTENTS *b; + + if (hash == 0) + return (char *)0; + + b = hash_search (string, hash, 0); + return (b ? (char *)b->data : 0); +} + +/* Quote the data associated with each element of the hash table ASSOC, + using quote_string */ +HASH_TABLE * +assoc_quote (h) + HASH_TABLE *h; +{ + int i; + BUCKET_CONTENTS *tlist; + char *t; + + if (h == 0 || assoc_empty (h)) + return ((HASH_TABLE *)NULL); + + for (i = 0; i < h->nbuckets; i++) + for (tlist = hash_items (i, h); tlist; tlist = tlist->next) + { + t = quote_string ((char *)tlist->data); + FREE (tlist->data); + tlist->data = t; + } + + return h; +} + +/* Quote escape characters in the data associated with each element + of the hash table ASSOC, using quote_escapes */ +HASH_TABLE * +assoc_quote_escapes (h) + HASH_TABLE *h; +{ + int i; + BUCKET_CONTENTS *tlist; + char *t; + + if (h == 0 || assoc_empty (h)) + return ((HASH_TABLE *)NULL); + + for (i = 0; i < h->nbuckets; i++) + for (tlist = hash_items (i, h); tlist; tlist = tlist->next) + { + t = quote_escapes ((char *)tlist->data); + FREE (tlist->data); + tlist->data = t; + } + + return h; +} + +HASH_TABLE * +assoc_dequote (h) + HASH_TABLE *h; +{ + int i; + BUCKET_CONTENTS *tlist; + char *t; + + if (h == 0 || assoc_empty (h)) + return ((HASH_TABLE *)NULL); + + for (i = 0; i < h->nbuckets; i++) + for (tlist = hash_items (i, h); tlist; tlist = tlist->next) + { + t = dequote_string ((char *)tlist->data); + FREE (tlist->data); + tlist->data = t; + } + + return h; +} + +HASH_TABLE * +assoc_dequote_escapes (h) + HASH_TABLE *h; +{ + int i; + BUCKET_CONTENTS *tlist; + char *t; + + if (h == 0 || assoc_empty (h)) + return ((HASH_TABLE *)NULL); + + for (i = 0; i < h->nbuckets; i++) + for (tlist = hash_items (i, h); tlist; tlist = tlist->next) + { + t = dequote_escapes ((char *)tlist->data); + FREE (tlist->data); + tlist->data = t; + } + + return h; +} + +HASH_TABLE * +assoc_remove_quoted_nulls (h) + HASH_TABLE *h; +{ + int i; + BUCKET_CONTENTS *tlist; + char *t; + + if (h == 0 || assoc_empty (h)) + return ((HASH_TABLE *)NULL); + + for (i = 0; i < h->nbuckets; i++) + for (tlist = hash_items (i, h); tlist; tlist = tlist->next) + { + t = remove_quoted_nulls ((char *)tlist->data); + tlist->data = t; + } + + return h; +} + +/* + * Return a string whose elements are the members of array H beginning at + * the STARTth element and spanning NELEM members. Null elements are counted. + */ +char * +assoc_subrange (hash, start, nelem, starsub, quoted, pflags) + HASH_TABLE *hash; + arrayind_t start, nelem; + int starsub, quoted, pflags; +{ + WORD_LIST *l, *save, *h, *t; + int i, j; + char *ret; + + if (assoc_empty (hash)) + return ((char *)NULL); + + save = l = assoc_to_word_list (hash); + if (save == 0) + return ((char *)NULL); + + for (i = 1; l && i < start; i++) + l = l->next; + if (l == 0) + { + dispose_words (save); + return ((char *)NULL); + } + for (j = 0,h = t = l; l && j < nelem; j++) + { + t = l; + l = l->next; + } + + t->next = (WORD_LIST *)NULL; + + ret = string_list_pos_params (starsub ? '*' : '@', h, quoted, pflags); + + if (t != l) + t->next = l; + + dispose_words (save); + return (ret); + +} + +char * +assoc_patsub (h, pat, rep, mflags) + HASH_TABLE *h; + char *pat, *rep; + int mflags; +{ + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; + + if (h == 0 || assoc_empty (h)) + return ((char *)NULL); + + wl = assoc_to_word_list (h); + if (wl == 0) + return (char *)NULL; + + for (save = wl; wl; wl = wl->next) + { + t = pat_subst (wl->word->word, pat, rep, mflags); + FREE (wl->word->word); + wl->word->word = t; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) == MATCH_ASSIGNRHS ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words (save); + + return t; +} + +char * +assoc_modcase (h, pat, modop, mflags) + HASH_TABLE *h; + char *pat; + int modop; + int mflags; +{ + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; + + if (h == 0 || assoc_empty (h)) + return ((char *)NULL); + + wl = assoc_to_word_list (h); + if (wl == 0) + return ((char *)NULL); + + for (save = wl; wl; wl = wl->next) + { + t = sh_modcase (wl->word->word, pat, modop); + FREE (wl->word->word); + wl->word->word = t; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) == MATCH_ASSIGNRHS ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words (save); + + return t; +} + +char * +assoc_to_kvpair (hash, quoted) + HASH_TABLE *hash; + int quoted; +{ + char *ret; + char *istr, *vstr; + int i, rsize, rlen, elen; + BUCKET_CONTENTS *tlist; + + if (hash == 0 || assoc_empty (hash)) + return (char *)0; + + ret = xmalloc (rsize = 128); + ret[rlen = 0] = '\0'; + + for (i = 0; i < hash->nbuckets; i++) + for (tlist = hash_items (i, hash); tlist; tlist = tlist->next) + { + if (ansic_shouldquote (tlist->key)) + istr = ansic_quote (tlist->key, 0, (int *)0); + else if (sh_contains_shell_metas (tlist->key)) + istr = sh_double_quote (tlist->key); + else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0') + istr = sh_double_quote (tlist->key); + else + istr = tlist->key; + + vstr = tlist->data ? (ansic_shouldquote ((char *)tlist->data) ? + ansic_quote ((char *)tlist->data, 0, (int *)0) : + sh_double_quote ((char *)tlist->data)) + : (char *)0; + + elen = STRLEN (istr) + 4 + STRLEN (vstr); + RESIZE_MALLOCED_BUFFER (ret, rlen, (elen+1), rsize, rsize); + + strcpy (ret+rlen, istr); + rlen += STRLEN (istr); + ret[rlen++] = ' '; + if (vstr) + { + strcpy (ret + rlen, vstr); + rlen += STRLEN (vstr); + } + else + { + strcpy (ret + rlen, "\"\""); + rlen += 2; + } + ret[rlen++] = ' '; + + if (istr != tlist->key) + FREE (istr); + + FREE (vstr); + } + + RESIZE_MALLOCED_BUFFER (ret, rlen, 1, rsize, 8); + ret[rlen] = '\0'; + + if (quoted) + { + vstr = sh_single_quote (ret); + free (ret); + ret = vstr; + } + + return ret; +} + +char * +assoc_to_assign (hash, quoted) + HASH_TABLE *hash; + int quoted; +{ + char *ret; + char *istr, *vstr; + int i, rsize, rlen, elen; + BUCKET_CONTENTS *tlist; + + if (hash == 0 || assoc_empty (hash)) + return (char *)0; + + ret = xmalloc (rsize = 128); + ret[0] = '('; + rlen = 1; + + for (i = 0; i < hash->nbuckets; i++) + for (tlist = hash_items (i, hash); tlist; tlist = tlist->next) + { + if (ansic_shouldquote (tlist->key)) + istr = ansic_quote (tlist->key, 0, (int *)0); + else if (sh_contains_shell_metas (tlist->key)) + istr = sh_double_quote (tlist->key); + else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0') + istr = sh_double_quote (tlist->key); + else + istr = tlist->key; + + vstr = tlist->data ? (ansic_shouldquote ((char *)tlist->data) ? + ansic_quote ((char *)tlist->data, 0, (int *)0) : + sh_double_quote ((char *)tlist->data)) + : (char *)0; + + elen = STRLEN (istr) + 8 + STRLEN (vstr); + RESIZE_MALLOCED_BUFFER (ret, rlen, (elen+1), rsize, rsize); + + ret[rlen++] = '['; + strcpy (ret+rlen, istr); + rlen += STRLEN (istr); + ret[rlen++] = ']'; + ret[rlen++] = '='; + if (vstr) + { + strcpy (ret + rlen, vstr); + rlen += STRLEN (vstr); + } + ret[rlen++] = ' '; + + if (istr != tlist->key) + FREE (istr); + + FREE (vstr); + } + + RESIZE_MALLOCED_BUFFER (ret, rlen, 1, rsize, 8); + ret[rlen++] = ')'; + ret[rlen] = '\0'; + + if (quoted) + { + vstr = sh_single_quote (ret); + free (ret); + ret = vstr; + } + + return ret; +} + +static WORD_LIST * +assoc_to_word_list_internal (h, t) + HASH_TABLE *h; + int t; +{ + WORD_LIST *list; + int i; + BUCKET_CONTENTS *tlist; + char *w; + + if (h == 0 || assoc_empty (h)) + return((WORD_LIST *)NULL); + list = (WORD_LIST *)NULL; + + for (i = 0; i < h->nbuckets; i++) + for (tlist = hash_items (i, h); tlist; tlist = tlist->next) + { + w = (t == 0) ? (char *)tlist->data : (char *)tlist->key; + list = make_word_list (make_bare_word(w), list); + } + return (REVERSE_LIST(list, WORD_LIST *)); +} + +WORD_LIST * +assoc_to_word_list (h) + HASH_TABLE *h; +{ + return (assoc_to_word_list_internal (h, 0)); +} + +WORD_LIST * +assoc_keys_to_word_list (h) + HASH_TABLE *h; +{ + return (assoc_to_word_list_internal (h, 1)); +} + +char * +assoc_to_string (h, sep, quoted) + HASH_TABLE *h; + char *sep; + int quoted; +{ + BUCKET_CONTENTS *tlist; + int i; + char *result, *t, *w; + WORD_LIST *list, *l; + + if (h == 0) + return ((char *)NULL); + if (assoc_empty (h)) + return (savestring ("")); + + result = NULL; + l = list = NULL; + /* This might be better implemented directly, but it's simple to implement + by converting to a word list first, possibly quoting the data, then + using list_string */ + for (i = 0; i < h->nbuckets; i++) + for (tlist = hash_items (i, h); tlist; tlist = tlist->next) + { + w = (char *)tlist->data; + if (w == 0) + continue; + t = quoted ? quote_string (w) : savestring (w); + list = make_word_list (make_bare_word(t), list); + FREE (t); + } + + l = REVERSE_LIST(list, WORD_LIST *); + + result = l ? string_list_internal (l, sep) : savestring (""); + dispose_words (l); + + return result; +} + +#endif /* ARRAY_VARS */ diff --git a/bash-5.1/assoc.h b/bash-5.1/assoc.h new file mode 100644 index 0000000000000000000000000000000000000000..78ec07386d0576d1f67c76648c3def445c2e0240 --- /dev/null +++ b/bash-5.1/assoc.h @@ -0,0 +1,65 @@ +/* assoc.h -- definitions for the interface exported by assoc.c that allows + the rest of the shell to manipulate associative array variables. */ + +/* Copyright (C) 2008,2009-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _ASSOC_H_ +#define _ASSOC_H_ + +#include "stdc.h" +#include "hashlib.h" + +#define ASSOC_HASH_BUCKETS 1024 + +#define assoc_empty(h) ((h)->nentries == 0) +#define assoc_num_elements(h) ((h)->nentries) + +#define assoc_create(n) (hash_create((n))) + +#define assoc_copy(h) (hash_copy((h), 0)) + +#define assoc_walk(h, f) (hash_walk((h), (f)) + +extern void assoc_dispose PARAMS((HASH_TABLE *)); +extern void assoc_flush PARAMS((HASH_TABLE *)); + +extern int assoc_insert PARAMS((HASH_TABLE *, char *, char *)); +extern PTR_T assoc_replace PARAMS((HASH_TABLE *, char *, char *)); +extern void assoc_remove PARAMS((HASH_TABLE *, char *)); + +extern char *assoc_reference PARAMS((HASH_TABLE *, char *)); + +extern char *assoc_subrange PARAMS((HASH_TABLE *, arrayind_t, arrayind_t, int, int, int)); +extern char *assoc_patsub PARAMS((HASH_TABLE *, char *, char *, int)); +extern char *assoc_modcase PARAMS((HASH_TABLE *, char *, int, int)); + +extern HASH_TABLE *assoc_quote PARAMS((HASH_TABLE *)); +extern HASH_TABLE *assoc_quote_escapes PARAMS((HASH_TABLE *)); +extern HASH_TABLE *assoc_dequote PARAMS((HASH_TABLE *)); +extern HASH_TABLE *assoc_dequote_escapes PARAMS((HASH_TABLE *)); +extern HASH_TABLE *assoc_remove_quoted_nulls PARAMS((HASH_TABLE *)); + +extern char *assoc_to_kvpair PARAMS((HASH_TABLE *, int)); +extern char *assoc_to_assign PARAMS((HASH_TABLE *, int)); + +extern WORD_LIST *assoc_to_word_list PARAMS((HASH_TABLE *)); +extern WORD_LIST *assoc_keys_to_word_list PARAMS((HASH_TABLE *)); + +extern char *assoc_to_string PARAMS((HASH_TABLE *, char *, int)); +#endif /* _ASSOC_H_ */ diff --git a/bash-5.1/bashansi.h b/bash-5.1/bashansi.h new file mode 100644 index 0000000000000000000000000000000000000000..2c33937d0d5cacfef8fd8cb72a1c32eab2633e86 --- /dev/null +++ b/bash-5.1/bashansi.h @@ -0,0 +1,41 @@ +/* bashansi.h -- Typically included information required by picky compilers. */ + +/* Copyright (C) 1993-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_BASHANSI_H_) +#define _BASHANSI_H_ + +#if defined (HAVE_STRING_H) +# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) +# include +# endif +# include +#endif /* !HAVE_STRING_H */ + +#if defined (HAVE_STRINGS_H) +# include +#endif /* !HAVE_STRINGS_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* !HAVE_STDLIB_H */ + +#endif /* !_BASHANSI_H_ */ diff --git a/bash-5.1/bashhist.c b/bash-5.1/bashhist.c new file mode 100644 index 0000000000000000000000000000000000000000..2a05a53fa89d3af3ba250e3523d4545830fe0eaf --- /dev/null +++ b/bash-5.1/bashhist.c @@ -0,0 +1,1074 @@ +/* bashhist.c -- bash interface to the GNU history library. */ + +/* Copyright (C) 1993-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (HISTORY) + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX + # include +# endif +# include +#endif + +#include "bashtypes.h" +#include +#include +#include "bashansi.h" +#include "posixstat.h" +#include "filecntl.h" + +#include "bashintl.h" + +#if defined (SYSLOG_HISTORY) +# include +#endif + +#include "shell.h" +#include "flags.h" +#include "parser.h" +#include "input.h" +#include "parser.h" /* for the struct dstack stuff. */ +#include "pathexp.h" /* for the struct ignorevar stuff */ +#include "bashhist.h" /* matching prototypes and declarations */ +#include "builtins/common.h" + +#include +#include +#include + +#if defined (READLINE) +# include "bashline.h" +extern int rl_done, rl_dispatching; /* should really include readline.h */ +#endif + +#ifndef HISTSIZE_DEFAULT +# define HISTSIZE_DEFAULT "500" +#endif + +#if !defined (errno) +extern int errno; +#endif + +static int histignore_item_func PARAMS((struct ign *)); +static int check_history_control PARAMS((char *)); +static void hc_erasedups PARAMS((char *)); +static void really_add_history PARAMS((char *)); + +static struct ignorevar histignore = +{ + "HISTIGNORE", + (struct ign *)0, + 0, + (char *)0, + (sh_iv_item_func_t *)histignore_item_func, +}; + +#define HIGN_EXPAND 0x01 + +/* Declarations of bash history variables. */ +/* Non-zero means to remember lines typed to the shell on the history + list. This is different than the user-controlled behaviour; this + becomes zero when we read lines from a file, for example. */ +int remember_on_history = 0; +int enable_history_list = -1; /* value for `set -o history' */ + +/* The number of lines that Bash has added to this history session. The + difference between the number of the top element in the history list + (offset from history_base) and the number of lines in the history file. + Appending this session's history to the history file resets this to 0. */ +int history_lines_this_session; + +/* The number of lines that Bash has read from the history file. */ +int history_lines_in_file; + +#if defined (BANG_HISTORY) +/* Non-zero means do no history expansion on this line, regardless + of what history_expansion says. */ +int history_expansion_inhibited; +/* If non-zero, double quotes can quote the history expansion character. */ +int double_quotes_inhibit_history_expansion = 0; +#endif + +/* With the old default, every line was saved in the history individually. + I.e., if the user enters: + bash$ for i in a b c + > do + > echo $i + > done + Each line will be individually saved in the history. + bash$ history + 10 for i in a b c + 11 do + 12 echo $i + 13 done + 14 history + If the variable command_oriented_history is set, multiple lines + which form one command will be saved as one history entry. + bash$ for i in a b c + > do + > echo $i + > done + bash$ history + 10 for i in a b c + do + echo $i + done + 11 history + The user can then recall the whole command all at once instead + of just being able to recall one line at a time. + + This is now enabled by default. + */ +int command_oriented_history = 1; + +/* Set to 1 if the first line of a possibly-multi-line command was saved + in the history list. Managed by maybe_add_history(), but global so + the history-manipluating builtins can see it. */ +int current_command_first_line_saved = 0; + +/* Set to the number of the most recent line of a possibly-multi-line command + that contains a shell comment. Used by bash_add_history() to determine + whether to add a newline or a semicolon. */ +int current_command_line_comment = 0; + +/* Non-zero means to store newlines in the history list when using + command_oriented_history rather than trying to use semicolons. */ +int literal_history; + +/* Non-zero means to append the history to the history file at shell + exit, even if the history has been stifled. */ +int force_append_history; + +/* A nit for picking at history saving. Flags have the following values: + + Value == 0 means save all lines parsed by the shell on the history. + Value & HC_IGNSPACE means save all lines that do not start with a space. + Value & HC_IGNDUPS means save all lines that do not match the last + line saved. + Value & HC_ERASEDUPS means to remove all other matching lines from the + history list before saving the latest line. */ +int history_control; + +/* Set to 1 if the last command was added to the history list successfully + as a separate history entry; set to 0 if the line was ignored or added + to a previous entry as part of command-oriented-history processing. */ +int hist_last_line_added; + +/* Set to 1 if builtins/history.def:push_history added the last history + entry. */ +int hist_last_line_pushed; + +#if defined (READLINE) +/* If non-zero, and readline is being used, the user is offered the + chance to re-edit a failed history expansion. */ +int history_reediting; + +/* If non-zero, and readline is being used, don't directly execute a + line with history substitution. Reload it into the editing buffer + instead and let the user further edit and confirm with a newline. */ +int hist_verify; + +#endif /* READLINE */ + +/* Non-zero means to not save function definitions in the history list. */ +int dont_save_function_defs; + +#if defined (BANG_HISTORY) +static int bash_history_inhibit_expansion PARAMS((char *, int)); +#endif +#if defined (READLINE) +static void re_edit PARAMS((char *)); +#endif +static int history_expansion_p PARAMS((char *)); +static int shell_comment PARAMS((char *)); +static int should_expand PARAMS((char *)); +static HIST_ENTRY *last_history_entry PARAMS((void)); +static char *expand_histignore_pattern PARAMS((char *)); +static int history_should_ignore PARAMS((char *)); + +#if defined (BANG_HISTORY) +/* Is the history expansion starting at string[i] one that should not + be expanded? */ +static int +bash_history_inhibit_expansion (string, i) + char *string; + int i; +{ + int t, si; + char hx[2]; + + hx[0] = history_expansion_char; + hx[1] = '\0'; + + /* The shell uses ! as a pattern negation character in globbing [...] + expressions, so let those pass without expansion. */ + if (i > 0 && (string[i - 1] == '[') && member (']', string + i + 1)) + return (1); + /* The shell uses ! as the indirect expansion character, so let those + expansions pass as well. */ + else if (i > 1 && string[i - 1] == '{' && string[i - 2] == '$' && + member ('}', string + i + 1)) + return (1); + /* The shell uses $! as a defined parameter expansion. */ + else if (i > 1 && string[i - 1] == '$' && string[i] == '!') + return (1); +#if defined (EXTENDED_GLOB) + else if (extended_glob && i > 1 && string[i+1] == '(' && member (')', string + i + 2)) + return (1); +#endif + + si = 0; + /* If we're supposed to be in single-quoted string, skip over the + single-quoted part and then look at what's left. */ + if (history_quoting_state == '\'') + { + si = skip_to_delim (string, 0, "'", SD_NOJMP|SD_HISTEXP); + if (string[si] == 0 || si >= i) + return (1); + si++; + } + + /* Make sure the history expansion should not be skipped by quoting or + command/process substitution. */ + if ((t = skip_to_histexp (string, si, hx, SD_NOJMP|SD_HISTEXP)) > 0) + { + /* Skip instances of history expansion appearing on the line before + this one. */ + while (t < i) + { + t = skip_to_histexp (string, t+1, hx, SD_NOJMP|SD_HISTEXP); + if (t <= 0) + return 0; + } + return (t > i); + } + else + return (0); +} +#endif + +void +bash_initialize_history () +{ + history_quotes_inhibit_expansion = 1; + history_search_delimiter_chars = ";&()|<>"; +#if defined (BANG_HISTORY) + history_inhibit_expansion_function = bash_history_inhibit_expansion; + sv_histchars ("histchars"); +#endif +} + +void +bash_history_reinit (interact) + int interact; +{ +#if defined (BANG_HISTORY) + history_expansion = (interact == 0) ? histexp_flag : HISTEXPAND_DEFAULT; + history_expansion_inhibited = (interact == 0) ? 1 - histexp_flag : 0; /* changed in bash_history_enable() */ + history_inhibit_expansion_function = bash_history_inhibit_expansion; +#endif + remember_on_history = enable_history_list; +} + +void +bash_history_disable () +{ + remember_on_history = 0; +#if defined (BANG_HISTORY) + history_expansion_inhibited = 1; +#endif +} + +void +bash_history_enable () +{ + remember_on_history = enable_history_list = 1; +#if defined (BANG_HISTORY) + history_expansion_inhibited = 0; + history_inhibit_expansion_function = bash_history_inhibit_expansion; +#endif + sv_history_control ("HISTCONTROL"); + sv_histignore ("HISTIGNORE"); +} + +/* Load the history list from the history file. */ +void +load_history () +{ + char *hf; + + /* Truncate history file for interactive shells which desire it. + Note that the history file is automatically truncated to the + size of HISTSIZE if the user does not explicitly set the size + differently. */ + set_if_not ("HISTSIZE", HISTSIZE_DEFAULT); + sv_histsize ("HISTSIZE"); + + set_if_not ("HISTFILESIZE", get_string_value ("HISTSIZE")); + sv_histsize ("HISTFILESIZE"); + + /* Read the history in HISTFILE into the history list. */ + hf = get_string_value ("HISTFILE"); + + if (hf && *hf && file_exists (hf)) + { + read_history (hf); + /* We have read all of the lines from the history file, even if we + read more lines than $HISTSIZE. Remember the total number of lines + we read so we don't count the last N lines as new over and over + again. */ + history_lines_in_file = history_lines_read_from_file; + using_history (); + /* history_lines_in_file = where_history () + history_base - 1; */ + } +} + +void +bash_clear_history () +{ + clear_history (); + history_lines_this_session = 0; + /* XXX - reset history_lines_read_from_file? */ +} + +/* Delete and free the history list entry at offset I. */ +int +bash_delete_histent (i) + int i; +{ + HIST_ENTRY *discard; + + discard = remove_history (i); + if (discard) + { + free_history_entry (discard); + history_lines_this_session--; + } + return discard != 0; +} + +int +bash_delete_history_range (first, last) + int first, last; +{ + register int i; + HIST_ENTRY **discard_list; + + discard_list = remove_history_range (first, last); + for (i = 0; discard_list && discard_list[i]; i++) + free_history_entry (discard_list[i]); + history_lines_this_session -= i; + + return 1; +} + +int +bash_delete_last_history () +{ + register int i; + HIST_ENTRY **hlist, *histent; + int r; + + hlist = history_list (); + if (hlist == NULL) + return 0; + + for (i = 0; hlist[i]; i++) + ; + i--; + + /* History_get () takes a parameter that must be offset by history_base. */ + histent = history_get (history_base + i); /* Don't free this */ + if (histent == NULL) + return 0; + + r = bash_delete_histent (i); + + if (where_history () > history_length) + history_set_pos (history_length); + + return r; +} + +#ifdef INCLUDE_UNUSED +/* Write the existing history out to the history file. */ +void +save_history () +{ + char *hf; + int r; + + hf = get_string_value ("HISTFILE"); + if (hf && *hf && file_exists (hf)) + { + /* Append only the lines that occurred this session to + the history file. */ + using_history (); + + if (history_lines_this_session <= where_history () || force_append_history) + r = append_history (history_lines_this_session, hf); + else + r = write_history (hf); + sv_histsize ("HISTFILESIZE"); + } +} +#endif + +int +maybe_append_history (filename) + char *filename; +{ + int fd, result, histlen; + struct stat buf; + + result = EXECUTION_SUCCESS; + if (history_lines_this_session > 0) + { + /* If the filename was supplied, then create it if necessary. */ + if (stat (filename, &buf) == -1 && errno == ENOENT) + { + fd = open (filename, O_WRONLY|O_CREAT, 0600); + if (fd < 0) + { + builtin_error (_("%s: cannot create: %s"), filename, strerror (errno)); + return (EXECUTION_FAILURE); + } + close (fd); + } + /* cap the number of lines we write at the length of the history list */ + histlen = where_history (); + if (histlen > 0 && history_lines_this_session > histlen) + history_lines_this_session = histlen; /* reset below anyway */ + result = append_history (history_lines_this_session, filename); + /* Pretend we already read these lines from the file because we just + added them */ + history_lines_in_file += history_lines_this_session; + history_lines_this_session = 0; + } + else + history_lines_this_session = 0; /* reset if > where_history() */ + + return (result); +} + +/* If this is an interactive shell, then append the lines executed + this session to the history file. */ +int +maybe_save_shell_history () +{ + int result; + char *hf; + + result = 0; + if (history_lines_this_session > 0) + { + hf = get_string_value ("HISTFILE"); + + if (hf && *hf) + { + /* If the file doesn't exist, then create it. */ + if (file_exists (hf) == 0) + { + int file; + file = open (hf, O_CREAT | O_TRUNC | O_WRONLY, 0600); + if (file != -1) + close (file); + } + + /* Now actually append the lines if the history hasn't been + stifled. If the history has been stifled, rewrite the + history file. */ + using_history (); + if (history_lines_this_session <= where_history () || force_append_history) + { + result = append_history (history_lines_this_session, hf); + history_lines_in_file += history_lines_this_session; + } + else + { + result = write_history (hf); + history_lines_in_file = history_lines_written_to_file; + /* history_lines_in_file = where_history () + history_base - 1; */ + } + history_lines_this_session = 0; + + sv_histsize ("HISTFILESIZE"); + } + } + return (result); +} + +#if defined (READLINE) +/* Tell readline () that we have some text for it to edit. */ +static void +re_edit (text) + char *text; +{ + if (bash_input.type == st_stdin) + bash_re_edit (text); +} +#endif /* READLINE */ + +/* Return 1 if this line needs history expansion. */ +static int +history_expansion_p (line) + char *line; +{ + register char *s; + + for (s = line; *s; s++) + if (*s == history_expansion_char || *s == history_subst_char) + return 1; + return 0; +} + +/* Do pre-processing on LINE. If PRINT_CHANGES is non-zero, then + print the results of expanding the line if there were any changes. + If there is an error, return NULL, otherwise the expanded line is + returned. If ADDIT is non-zero the line is added to the history + list after history expansion. ADDIT is just a suggestion; + REMEMBER_ON_HISTORY can veto, and does. + Right now this does history expansion. */ +char * +pre_process_line (line, print_changes, addit) + char *line; + int print_changes, addit; +{ + char *history_value; + char *return_value; + int expanded; + + return_value = line; + expanded = 0; + +# if defined (BANG_HISTORY) + /* History expand the line. If this results in no errors, then + add that line to the history if ADDIT is non-zero. */ + if (!history_expansion_inhibited && history_expansion && history_expansion_p (line)) + { + int old_len; + + /* If we are expanding the second or later line of a multi-line + command, decrease history_length so references to history expansions + in these lines refer to the previous history entry and not the + current command. */ + old_len = history_length; + if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1) + history_length--; + expanded = history_expand (line, &history_value); + if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1) + history_length = old_len; + + if (expanded) + { + if (print_changes) + { + if (expanded < 0) + internal_error ("%s", history_value); +#if defined (READLINE) + else if (hist_verify == 0 || expanded == 2) +#else + else +#endif + fprintf (stderr, "%s\n", history_value); + } + + /* If there was an error, return NULL. */ + if (expanded < 0 || expanded == 2) /* 2 == print only */ + { +# if defined (READLINE) + if (expanded == 2 && rl_dispatching == 0 && *history_value) +# else + if (expanded == 2 && *history_value) +# endif /* !READLINE */ + maybe_add_history (history_value); + + free (history_value); + +# if defined (READLINE) + /* New hack. We can allow the user to edit the + failed history expansion. */ + if (history_reediting && expanded < 0 && rl_done) + re_edit (line); +# endif /* READLINE */ + return ((char *)NULL); + } + +# if defined (READLINE) + if (hist_verify && expanded == 1) + { + re_edit (history_value); + free (history_value); + return ((char *)NULL); + } +# endif + } + + /* Let other expansions know that return_value can be free'ed, + and that a line has been added to the history list. Note + that we only add lines that have something in them. */ + expanded = 1; + return_value = history_value; + } +# endif /* BANG_HISTORY */ + + if (addit && remember_on_history && *return_value) + maybe_add_history (return_value); + +#if 0 + if (expanded == 0) + return_value = savestring (line); +#endif + + return (return_value); +} + +/* Return 1 if the first non-whitespace character in LINE is a `#', indicating + that the line is a shell comment. Return 2 if there is a comment after the + first non-whitespace character. Return 0 if the line does not contain a + comment. */ +static int +shell_comment (line) + char *line; +{ + char *p; + int n; + + if (line == 0) + return 0; + for (p = line; p && *p && whitespace (*p); p++) + ; + if (p && *p == '#') + return 1; + n = skip_to_delim (line, p - line, "#", SD_NOJMP|SD_GLOB|SD_EXTGLOB|SD_COMPLETE); + return (line[n] == '#') ? 2 : 0; +} + +#ifdef INCLUDE_UNUSED +/* Remove shell comments from LINE. A `#' and anything after it is a comment. + This isn't really useful yet, since it doesn't handle quoting. */ +static char * +filter_comments (line) + char *line; +{ + char *p; + + for (p = line; p && *p && *p != '#'; p++) + ; + if (p && *p == '#') + *p = '\0'; + return (line); +} +#endif + +/* Check LINE against what HISTCONTROL says to do. Returns 1 if the line + should be saved; 0 if it should be discarded. */ +static int +check_history_control (line) + char *line; +{ + HIST_ENTRY *temp; + int r; + + if (history_control == 0) + return 1; + + /* ignorespace or ignoreboth */ + if ((history_control & HC_IGNSPACE) && *line == ' ') + return 0; + + /* ignoredups or ignoreboth */ + if (history_control & HC_IGNDUPS) + { + using_history (); + temp = previous_history (); + + r = (temp == 0 || STREQ (temp->line, line) == 0); + + using_history (); + + if (r == 0) + return r; + } + + return 1; +} + +/* Remove all entries matching LINE from the history list. Triggered when + HISTCONTROL includes `erasedups'. */ +static void +hc_erasedups (line) + char *line; +{ + HIST_ENTRY *temp; + int r; + + using_history (); + while (temp = previous_history ()) + { + if (STREQ (temp->line, line)) + { + r = where_history (); + temp = remove_history (r); + if (temp) + free_history_entry (temp); + } + } + using_history (); +} + +/* Add LINE to the history list, handling possibly multi-line compound + commands. We note whether or not we save the first line of each command + (which is usually the entire command and history entry), and don't add + the second and subsequent lines of a multi-line compound command if we + didn't save the first line. We don't usually save shell comment lines in + compound commands in the history, because they could have the effect of + commenting out the rest of the command when the entire command is saved as + a single history entry (when COMMAND_ORIENTED_HISTORY is enabled). If + LITERAL_HISTORY is set, we're saving lines in the history with embedded + newlines, so it's OK to save comment lines. If we're collecting the body + of a here-document, we should act as if literal_history is enabled, because + we want to save the entire contents of the here-document as it was + entered. We also make sure to save multiple-line quoted strings or other + constructs. */ +void +maybe_add_history (line) + char *line; +{ + int is_comment; + + hist_last_line_added = 0; + is_comment = (parser_state & PST_HEREDOC) ? 0 : shell_comment (line); + + /* Don't use the value of history_control to affect the second + and subsequent lines of a multi-line command (old code did + this only when command_oriented_history is enabled). */ + if (current_command_line_count > 1) + { + if (current_command_first_line_saved && + ((parser_state & PST_HEREDOC) || literal_history || dstack.delimiter_depth != 0 || is_comment != 1)) + bash_add_history (line); + current_command_line_comment = is_comment ? current_command_line_count : -2; + return; + } + + /* This is the first line of a (possible multi-line) command. Note whether + or not we should save the first line and remember it. */ + current_command_line_comment = is_comment ? current_command_line_count : -2; + current_command_first_line_saved = check_add_history (line, 0); +} + +/* Just check LINE against HISTCONTROL and HISTIGNORE and add it to the + history if it's OK. Used by `history -s' as well as maybe_add_history(). + Returns 1 if the line was saved in the history, 0 otherwise. */ +int +check_add_history (line, force) + char *line; + int force; +{ + if (check_history_control (line) && history_should_ignore (line) == 0) + { + /* We're committed to saving the line. If the user has requested it, + remove other matching lines from the history. */ + if (history_control & HC_ERASEDUPS) + hc_erasedups (line); + + if (force) + { + really_add_history (line); + using_history (); + } + else + bash_add_history (line); + return 1; + } + return 0; +} + +#if defined (SYSLOG_HISTORY) +#define SYSLOG_MAXMSG 1024 +#define SYSLOG_MAXLEN SYSLOG_MAXMSG +#define SYSLOG_MAXHDR 256 + +#ifndef OPENLOG_OPTS +#define OPENLOG_OPTS 0 +#endif + +#if defined (SYSLOG_SHOPT) +int syslog_history = SYSLOG_SHOPT; +#else +int syslog_history = 1; +#endif + +void +bash_syslog_history (line) + const char *line; +{ + char trunc[SYSLOG_MAXLEN], *msg; + char loghdr[SYSLOG_MAXHDR]; + char seqbuf[32], *seqnum; + int hdrlen, msglen, seqlen, chunks, i; + static int first = 1; + + if (first) + { + openlog (shell_name, OPENLOG_OPTS, SYSLOG_FACILITY); + first = 0; + } + + hdrlen = snprintf (loghdr, sizeof(loghdr), "HISTORY: PID=%d UID=%d", getpid(), current_user.uid); + msglen = strlen (line); + + if ((msglen + hdrlen + 1) < SYSLOG_MAXLEN) + syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "%s %s", loghdr, line); + else + { + chunks = ((msglen + hdrlen) / SYSLOG_MAXLEN) + 1; + for (msg = line, i = 0; i < chunks; i++) + { + seqnum = inttostr (i + 1, seqbuf, sizeof (seqbuf)); + seqlen = STRLEN (seqnum); + + /* 7 == "(seq=) " */ + strncpy (trunc, msg, SYSLOG_MAXLEN - hdrlen - seqlen - 7 - 1); + trunc[SYSLOG_MAXLEN - 1] = '\0'; + syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "%s (seq=%s) %s", loghdr, seqnum, trunc); + msg += SYSLOG_MAXLEN - hdrlen - seqlen - 8; + } + } +} +#endif + +/* Add a line to the history list. + The variable COMMAND_ORIENTED_HISTORY controls the style of history + remembering; when non-zero, and LINE is not the first line of a + complete parser construct, append LINE to the last history line instead + of adding it as a new line. */ +void +bash_add_history (line) + char *line; +{ + int add_it, offset, curlen, is_comment; + HIST_ENTRY *current, *old; + char *chars_to_add, *new_line; + + add_it = 1; + if (command_oriented_history && current_command_line_count > 1) + { + is_comment = (parser_state & PST_HEREDOC) ? 0 : shell_comment (line); + + /* The second and subsequent lines of a here document have the trailing + newline preserved. We don't want to add extra newlines here, but we + do want to add one after the first line (which is the command that + contains the here-doc specifier). parse.y:history_delimiting_chars() + does the right thing to take care of this for us. We don't want to + add extra newlines if the user chooses to enable literal_history, + so we have to duplicate some of what that function does here. */ + /* If we're in a here document and past the first line, + (current_command_line_count > 2) + don't add a newline here. This will also take care of the literal_history + case if the other conditions are met. */ + if ((parser_state & PST_HEREDOC) && current_command_line_count > 2 && line[strlen (line) - 1] == '\n') + chars_to_add = ""; + else if (current_command_line_count == current_command_line_comment+1) + chars_to_add = "\n"; + else if (literal_history) + chars_to_add = "\n"; + else + chars_to_add = history_delimiting_chars (line); + + using_history (); + current = previous_history (); + + current_command_line_comment = is_comment ? current_command_line_count : -2; + + if (current) + { + /* If the previous line ended with an escaped newline (escaped + with backslash, but otherwise unquoted), then remove the quoted + newline, since that is what happens when the line is parsed. */ + curlen = strlen (current->line); + + if (dstack.delimiter_depth == 0 && current->line[curlen - 1] == '\\' && + current->line[curlen - 2] != '\\') + { + current->line[curlen - 1] = '\0'; + curlen--; + chars_to_add = ""; + } + + /* If we're not in some kind of quoted construct, the current history + entry ends with a newline, and we're going to add a semicolon, + don't. In some cases, it results in a syntax error (e.g., before + a close brace), and it should not be needed. */ + if (dstack.delimiter_depth == 0 && current->line[curlen - 1] == '\n' && *chars_to_add == ';') + chars_to_add++; + + new_line = (char *)xmalloc (1 + + curlen + + strlen (line) + + strlen (chars_to_add)); + sprintf (new_line, "%s%s%s", current->line, chars_to_add, line); + offset = where_history (); + old = replace_history_entry (offset, new_line, current->data); + free (new_line); + + if (old) + free_history_entry (old); + + add_it = 0; + } + } + + if (add_it && history_is_stifled() && history_length == 0 && history_length == history_max_entries) + add_it = 0; + + if (add_it) + really_add_history (line); + +#if defined (SYSLOG_HISTORY) + if (syslog_history) + bash_syslog_history (line); +#endif + + using_history (); +} + +static void +really_add_history (line) + char *line; +{ + hist_last_line_added = 1; + hist_last_line_pushed = 0; + add_history (line); + history_lines_this_session++; +} + +int +history_number () +{ + using_history (); + return ((remember_on_history || enable_history_list) ? history_base + where_history () : 1); +} + +static int +should_expand (s) + char *s; +{ + char *p; + + for (p = s; p && *p; p++) + { + if (*p == '\\') + p++; + else if (*p == '&') + return 1; + } + return 0; +} + +static int +histignore_item_func (ign) + struct ign *ign; +{ + if (should_expand (ign->val)) + ign->flags |= HIGN_EXPAND; + return (0); +} + +void +setup_history_ignore (varname) + char *varname; +{ + setup_ignore_patterns (&histignore); +} + +static HIST_ENTRY * +last_history_entry () +{ + HIST_ENTRY *he; + + using_history (); + he = previous_history (); + using_history (); + return he; +} + +char * +last_history_line () +{ + HIST_ENTRY *he; + + he = last_history_entry (); + if (he == 0) + return ((char *)NULL); + return he->line; +} + +static char * +expand_histignore_pattern (pat) + char *pat; +{ + HIST_ENTRY *phe; + char *ret; + + phe = last_history_entry (); + + if (phe == (HIST_ENTRY *)0) + return (savestring (pat)); + + ret = strcreplace (pat, '&', phe->line, 1); + + return ret; +} + +/* Return 1 if we should not put LINE into the history according to the + patterns in HISTIGNORE. */ +static int +history_should_ignore (line) + char *line; +{ + register int i, match; + char *npat; + + if (histignore.num_ignores == 0) + return 0; + + for (i = match = 0; i < histignore.num_ignores; i++) + { + if (histignore.ignores[i].flags & HIGN_EXPAND) + npat = expand_histignore_pattern (histignore.ignores[i].val); + else + npat = histignore.ignores[i].val; + + match = strmatch (npat, line, FNMATCH_EXTFLAG) != FNM_NOMATCH; + + if (histignore.ignores[i].flags & HIGN_EXPAND) + free (npat); + + if (match) + break; + } + + return match; +} +#endif /* HISTORY */ diff --git a/bash-5.1/bashhist.h b/bash-5.1/bashhist.h new file mode 100644 index 0000000000000000000000000000000000000000..615f5d25692bd5569eeadfa7f494164687668b81 --- /dev/null +++ b/bash-5.1/bashhist.h @@ -0,0 +1,89 @@ +/* bashhist.h -- interface to the bash history functions in bashhist.c. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_BASHHIST_H_) +#define _BASHHIST_H_ + +#include "stdc.h" + +/* Flag values for history_control */ +#define HC_IGNSPACE 0x01 +#define HC_IGNDUPS 0x02 +#define HC_ERASEDUPS 0x04 + +#define HC_IGNBOTH (HC_IGNSPACE|HC_IGNDUPS) + +#if defined (STRICT_POSIX) +# undef HISTEXPAND_DEFAULT +# define HISTEXPAND_DEFAULT 0 +#else +# if !defined (HISTEXPAND_DEFAULT) +# define HISTEXPAND_DEFAULT 1 +# endif /* !HISTEXPAND_DEFAULT */ +#endif + +extern int remember_on_history; +extern int enable_history_list; /* value for `set -o history' */ +extern int literal_history; /* controlled by `shopt lithist' */ +extern int force_append_history; +extern int history_lines_this_session; +extern int history_lines_in_file; +extern int history_expansion; +extern int history_control; +extern int command_oriented_history; +extern int current_command_first_line_saved; +extern int current_command_first_line_comment; +extern int hist_last_line_added; +extern int hist_last_line_pushed; + +extern int dont_save_function_defs; + +# if defined (READLINE) +extern int hist_verify; +# endif + +# if defined (BANG_HISTORY) +extern int history_expansion_inhibited; +extern int double_quotes_inhibit_history_expansion; +# endif /* BANG_HISTORY */ + +extern void bash_initialize_history PARAMS((void)); +extern void bash_history_reinit PARAMS((int)); +extern void bash_history_disable PARAMS((void)); +extern void bash_history_enable PARAMS((void)); +extern void bash_clear_history PARAMS((void)); +extern int bash_delete_histent PARAMS((int)); +extern int bash_delete_history_range PARAMS((int, int)); +extern int bash_delete_last_history PARAMS((void)); +extern void load_history PARAMS((void)); +extern void save_history PARAMS((void)); +extern int maybe_append_history PARAMS((char *)); +extern int maybe_save_shell_history PARAMS((void)); +extern char *pre_process_line PARAMS((char *, int, int)); +extern void maybe_add_history PARAMS((char *)); +extern void bash_add_history PARAMS((char *)); +extern int check_add_history PARAMS((char *, int)); +extern int history_number PARAMS((void)); + +extern void setup_history_ignore PARAMS((char *)); + +extern char *last_history_line PARAMS((void)); + +#endif /* _BASHHIST_H_ */ diff --git a/bash-5.1/bashintl.h b/bash-5.1/bashintl.h new file mode 100644 index 0000000000000000000000000000000000000000..dd3268331937a7943622a76e168f9ca08dc9d527 --- /dev/null +++ b/bash-5.1/bashintl.h @@ -0,0 +1,54 @@ +/* bashintl.h -- Internationalization functions and defines. */ + +/* Copyright (C) 1996-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_BASHINTL_H_) +#define _BASHINTL_H_ + +#if defined (BUILDTOOL) +# undef ENABLE_NLS +# define ENABLE_NLS 0 +#endif + +/* Include this *after* config.h */ +#include "gettext.h" + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#define _(msgid) gettext(msgid) +#define N_(msgid) msgid +#define D_(d, msgid) dgettext(d, msgid) + +#define P_(m1, m2, n) ngettext(m1, m2, n) + +#if defined (HAVE_SETLOCALE) && !defined (LC_ALL) +# undef HAVE_SETLOCALE +#endif + +#if !defined (HAVE_SETLOCALE) +# define setlocale(cat, loc) +#endif + +#if !defined (HAVE_LOCALE_H) || !defined (HAVE_LOCALECONV) +# define locale_decpoint() '.' +#endif + +#endif /* !_BASHINTL_H_ */ diff --git a/bash-5.1/bashjmp.h b/bash-5.1/bashjmp.h new file mode 100644 index 0000000000000000000000000000000000000000..8ed1ac47237d71af51272017734db69b785013e0 --- /dev/null +++ b/bash-5.1/bashjmp.h @@ -0,0 +1,46 @@ +/* bashjmp.h -- wrapper for setjmp.h with necessary bash definitions. */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _BASHJMP_H_ +#define _BASHJMP_H_ + +#include "posixjmp.h" + +extern procenv_t top_level; +extern procenv_t subshell_top_level; +extern procenv_t return_catch; /* used by `return' builtin */ +extern procenv_t wait_intr_buf; + +extern int no_longjmp_on_fatal_error; + +#define SHFUNC_RETURN() sh_longjmp (return_catch, 1) + +#define COPY_PROCENV(old, save) \ + xbcopy ((char *)old, (char *)save, sizeof (procenv_t)); + +/* Values for the second argument to longjmp/siglongjmp. */ +#define NOT_JUMPED 0 /* Not returning from a longjmp. */ +#define FORCE_EOF 1 /* We want to stop parsing. */ +#define DISCARD 2 /* Discard current command. */ +#define EXITPROG 3 /* Unconditionally exit the program now. */ +#define ERREXIT 4 /* Exit due to error condition */ +#define SIGEXIT 5 /* Exit due to fatal terminating signal */ + +#endif /* _BASHJMP_H_ */ diff --git a/bash-5.1/bashline.c b/bash-5.1/bashline.c new file mode 100644 index 0000000000000000000000000000000000000000..c69c0c5ee5ccfdb94b97e22a9a432d435e8e0359 --- /dev/null +++ b/bash-5.1/bashline.c @@ -0,0 +1,4652 @@ +/* bashline.c -- Bash's interface to the readline library. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (READLINE) + +#include "bashtypes.h" +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_GRP_H) +# include +#endif + +#if defined (HAVE_NETDB_H) +# include +#endif + +#include + +#include +#include "chartypes.h" +#include "bashansi.h" +#include "bashintl.h" + +#include "shell.h" +#include "input.h" +#include "parser.h" +#include "builtins.h" +#include "bashhist.h" +#include "bashline.h" +#include "execute_cmd.h" +#include "findcmd.h" +#include "pathexp.h" +#include "shmbutil.h" +#include "trap.h" +#include "flags.h" + +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif + +#include "builtins/common.h" +#include "builtins/builtext.h" /* for read_builtin */ + +#include +#include +#include +#include + +#include + +#if defined (ALIAS) +# include "alias.h" +#endif + +#if defined (PROGRAMMABLE_COMPLETION) +# include "pcomplete.h" +#endif + +/* These should agree with the defines for emacs_mode and vi_mode in + rldefs.h, even though that's not a public readline header file. */ +#ifndef EMACS_EDITING_MODE +# define NO_EDITING_MODE -1 +# define EMACS_EDITING_MODE 1 +# define VI_EDITING_MODE 0 +#endif + +/* Copied from rldefs.h, since that's not a public readline header file. */ +#ifndef FUNCTION_TO_KEYMAP + +#if defined (CRAY) +# define FUNCTION_TO_KEYMAP(map, key) (Keymap)((int)map[key].function) +# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)((int)(data)) +#else +# define FUNCTION_TO_KEYMAP(map, key) (Keymap)(map[key].function) +# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)(data) +#endif + +#endif + +#define RL_BOOLEAN_VARIABLE_VALUE(s) ((s)[0] == 'o' && (s)[1] == 'n' && (s)[2] == '\0') + +#if defined (BRACE_COMPLETION) +extern int bash_brace_completion PARAMS((int, int)); +#endif /* BRACE_COMPLETION */ + +/* To avoid including curses.h/term.h/termcap.h and that whole mess. */ +#ifdef _MINIX +extern int tputs PARAMS((const char *string, int nlines, void (*outx)(int))); +#else +extern int tputs PARAMS((const char *string, int nlines, int (*outx)(int))); +#endif + +/* Forward declarations */ + +/* Functions bound to keys in Readline for Bash users. */ +static int shell_expand_line PARAMS((int, int)); +static int display_shell_version PARAMS((int, int)); + +static int bash_ignore_filenames PARAMS((char **)); +static int bash_ignore_everything PARAMS((char **)); +static int bash_progcomp_ignore_filenames PARAMS((char **)); + +#if defined (BANG_HISTORY) +static char *history_expand_line_internal PARAMS((char *)); +static int history_expand_line PARAMS((int, int)); +static int tcsh_magic_space PARAMS((int, int)); +#endif /* BANG_HISTORY */ +#ifdef ALIAS +static int alias_expand_line PARAMS((int, int)); +#endif +#if defined (BANG_HISTORY) && defined (ALIAS) +static int history_and_alias_expand_line PARAMS((int, int)); +#endif + +static int bash_forward_shellword PARAMS((int, int)); +static int bash_backward_shellword PARAMS((int, int)); +static int bash_kill_shellword PARAMS((int, int)); +static int bash_backward_kill_shellword PARAMS((int, int)); +static int bash_transpose_shellwords PARAMS((int, int)); + +/* Helper functions for Readline. */ +static char *restore_tilde PARAMS((char *, char *)); +static char *maybe_restore_tilde PARAMS((char *, char *)); + +static char *bash_filename_rewrite_hook PARAMS((char *, int)); + +static void bash_directory_expansion PARAMS((char **)); +static int bash_filename_stat_hook PARAMS((char **)); +static int bash_command_name_stat_hook PARAMS((char **)); +static int bash_directory_completion_hook PARAMS((char **)); +static int filename_completion_ignore PARAMS((char **)); +static int bash_push_line PARAMS((void)); + +static int executable_completion PARAMS((const char *, int)); + +static rl_icppfunc_t *save_directory_hook PARAMS((void)); +static void restore_directory_hook PARAMS((rl_icppfunc_t)); + +static int directory_exists PARAMS((const char *, int)); + +static void cleanup_expansion_error PARAMS((void)); +static void maybe_make_readline_line PARAMS((char *)); +static void set_up_new_line PARAMS((char *)); + +static int check_redir PARAMS((int)); +static char **attempt_shell_completion PARAMS((const char *, int, int)); +static char *variable_completion_function PARAMS((const char *, int)); +static char *hostname_completion_function PARAMS((const char *, int)); +static char *command_subst_completion_function PARAMS((const char *, int)); + +static void build_history_completion_array PARAMS((void)); +static char *history_completion_generator PARAMS((const char *, int)); +static int dynamic_complete_history PARAMS((int, int)); +static int bash_dabbrev_expand PARAMS((int, int)); + +static void initialize_hostname_list PARAMS((void)); +static void add_host_name PARAMS((char *)); +static void snarf_hosts_from_file PARAMS((char *)); +static char **hostnames_matching PARAMS((char *)); + +static void _ignore_completion_names PARAMS((char **, sh_ignore_func_t *)); +static int name_is_acceptable PARAMS((const char *)); +static int test_for_directory PARAMS((const char *)); +static int test_for_canon_directory PARAMS((const char *)); +static int return_zero PARAMS((const char *)); + +static char *bash_dequote_filename PARAMS((char *, int)); +static char *quote_word_break_chars PARAMS((char *)); +static void set_filename_bstab PARAMS((const char *)); +static char *bash_quote_filename PARAMS((char *, int, char *)); + +#ifdef _MINIX +static void putx PARAMS((int)); +#else +static int putx PARAMS((int)); +#endif +static int readline_get_char_offset PARAMS((int)); +static void readline_set_char_offset PARAMS((int, int *)); + +static Keymap get_cmd_xmap_from_edit_mode PARAMS((void)); +static Keymap get_cmd_xmap_from_keymap PARAMS((Keymap)); + +static void init_unix_command_map PARAMS((void)); +static int isolate_sequence PARAMS((char *, int, int, int *)); + +static int set_saved_history PARAMS((void)); + +#if defined (ALIAS) +static int posix_edit_macros PARAMS((int, int)); +#endif + +static int bash_event_hook PARAMS((void)); + +#if defined (PROGRAMMABLE_COMPLETION) +static int find_cmd_start PARAMS((int)); +static int find_cmd_end PARAMS((int)); +static char *find_cmd_name PARAMS((int, int *, int *)); +static char *prog_complete_return PARAMS((const char *, int)); + +static char **prog_complete_matches; +#endif + +extern int no_symbolic_links; +extern STRING_INT_ALIST word_token_alist[]; + +/* SPECIFIC_COMPLETION_FUNCTIONS specifies that we have individual + completion functions which indicate what type of completion should be + done (at or before point) that can be bound to key sequences with + the readline library. */ +#define SPECIFIC_COMPLETION_FUNCTIONS + +#if defined (SPECIFIC_COMPLETION_FUNCTIONS) +static int bash_specific_completion PARAMS((int, rl_compentry_func_t *)); + +static int bash_complete_filename_internal PARAMS((int)); +static int bash_complete_username_internal PARAMS((int)); +static int bash_complete_hostname_internal PARAMS((int)); +static int bash_complete_variable_internal PARAMS((int)); +static int bash_complete_command_internal PARAMS((int)); + +static int bash_complete_filename PARAMS((int, int)); +static int bash_possible_filename_completions PARAMS((int, int)); +static int bash_complete_username PARAMS((int, int)); +static int bash_possible_username_completions PARAMS((int, int)); +static int bash_complete_hostname PARAMS((int, int)); +static int bash_possible_hostname_completions PARAMS((int, int)); +static int bash_complete_variable PARAMS((int, int)); +static int bash_possible_variable_completions PARAMS((int, int)); +static int bash_complete_command PARAMS((int, int)); +static int bash_possible_command_completions PARAMS((int, int)); + +static int completion_glob_pattern PARAMS((char *)); +static char *glob_complete_word PARAMS((const char *, int)); +static int bash_glob_completion_internal PARAMS((int)); +static int bash_glob_complete_word PARAMS((int, int)); +static int bash_glob_expand_word PARAMS((int, int)); +static int bash_glob_list_expansions PARAMS((int, int)); + +#endif /* SPECIFIC_COMPLETION_FUNCTIONS */ + +static int edit_and_execute_command PARAMS((int, int, int, char *)); +#if defined (VI_MODE) +static int vi_edit_and_execute_command PARAMS((int, int)); +static int bash_vi_complete PARAMS((int, int)); +#endif +static int emacs_edit_and_execute_command PARAMS((int, int)); + +/* Non-zero once initialize_readline () has been called. */ +int bash_readline_initialized = 0; + +/* If non-zero, we do hostname completion, breaking words at `@' and + trying to complete the stuff after the `@' from our own internal + host list. */ +int perform_hostname_completion = 1; + +/* If non-zero, we don't do command completion on an empty line. */ +int no_empty_command_completion; + +/* Set FORCE_FIGNORE if you want to honor FIGNORE even if it ignores the + only possible matches. Set to 0 if you want to match filenames if they + are the only possible matches, even if FIGNORE says to. */ +int force_fignore = 1; + +/* Perform spelling correction on directory names during word completion */ +int dircomplete_spelling = 0; + +/* Expand directory names during word/filename completion. */ +#if DIRCOMPLETE_EXPAND_DEFAULT +int dircomplete_expand = 1; +int dircomplete_expand_relpath = 1; +#else +int dircomplete_expand = 0; +int dircomplete_expand_relpath = 0; +#endif + +/* When non-zero, perform `normal' shell quoting on completed filenames + even when the completed name contains a directory name with a shell + variable reference, so dollar signs in a filename get quoted appropriately. + Set to zero to remove dollar sign (and braces or parens as needed) from + the set of characters that will be quoted. */ +int complete_fullquote = 1; + +static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:"; +static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:"; +/* )) */ + +static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/ +static char *custom_filename_quote_characters = 0; +static char filename_bstab[256]; + +static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL; + +static int dot_in_path = 0; + +/* Set to non-zero when dabbrev-expand is running */ +static int dabbrev_expand_active = 0; + +/* What kind of quoting is performed by bash_quote_filename: + COMPLETE_DQUOTE = double-quoting the filename + COMPLETE_SQUOTE = single_quoting the filename + COMPLETE_BSQUOTE = backslash-quoting special chars in the filename +*/ +#define COMPLETE_DQUOTE 1 +#define COMPLETE_SQUOTE 2 +#define COMPLETE_BSQUOTE 3 +static int completion_quoting_style = COMPLETE_BSQUOTE; + +/* Flag values for the final argument to bash_default_completion */ +#define DEFCOMP_CMDPOS 1 + +static rl_command_func_t *vi_tab_binding = rl_complete; + +/* Change the readline VI-mode keymaps into or out of Posix.2 compliance. + Called when the shell is put into or out of `posix' mode. */ +void +posix_readline_initialize (on_or_off) + int on_or_off; +{ + static char kseq[2] = { CTRL ('I'), 0 }; /* TAB */ + + if (on_or_off) + rl_variable_bind ("comment-begin", "#"); +#if defined (VI_MODE) + if (on_or_off) + { + vi_tab_binding = rl_function_of_keyseq (kseq, vi_insertion_keymap, (int *)NULL); + rl_bind_key_in_map (CTRL ('I'), rl_insert, vi_insertion_keymap); + } + else + { + if (rl_function_of_keyseq (kseq, vi_insertion_keymap, (int *)NULL) == rl_insert) + rl_bind_key_in_map (CTRL ('I'), vi_tab_binding, vi_insertion_keymap); + } +#endif +} + +void +reset_completer_word_break_chars () +{ + rl_completer_word_break_characters = perform_hostname_completion ? savestring (bash_completer_word_break_characters) : savestring (bash_nohostname_word_break_characters); +} + +/* When this function returns, rl_completer_word_break_characters points to + dynamically allocated memory. */ +int +enable_hostname_completion (on_or_off) + int on_or_off; +{ + int old_value; + char *at, *nv, *nval; + + old_value = perform_hostname_completion; + + if (on_or_off) + { + perform_hostname_completion = 1; + rl_special_prefixes = "$@"; + } + else + { + perform_hostname_completion = 0; + rl_special_prefixes = "$"; + } + + /* Now we need to figure out how to appropriately modify and assign + rl_completer_word_break_characters depending on whether we want + hostname completion on or off. */ + + /* If this is the first time this has been called + (bash_readline_initialized == 0), use the sames values as before, but + allocate new memory for rl_completer_word_break_characters. */ + + if (bash_readline_initialized == 0 && + (rl_completer_word_break_characters == 0 || + rl_completer_word_break_characters == rl_basic_word_break_characters)) + { + if (on_or_off) + rl_completer_word_break_characters = savestring (bash_completer_word_break_characters); + else + rl_completer_word_break_characters = savestring (bash_nohostname_word_break_characters); + } + else + { + /* See if we have anything to do. */ + at = strchr (rl_completer_word_break_characters, '@'); + if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0)) + return old_value; + + /* We have something to do. Do it. */ + nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 + on_or_off); + + if (on_or_off == 0) + { + /* Turn it off -- just remove `@' from word break chars. We want + to remove all occurrences of `@' from the char list, so we loop + rather than just copy the rest of the list over AT. */ + for (nv = nval, at = rl_completer_word_break_characters; *at; ) + if (*at != '@') + *nv++ = *at++; + else + at++; + *nv = '\0'; + } + else + { + nval[0] = '@'; + strcpy (nval + 1, rl_completer_word_break_characters); + } + + free (rl_completer_word_break_characters); + rl_completer_word_break_characters = nval; + } + + return (old_value); +} + +/* Called once from parse.y if we are going to use readline. */ +void +initialize_readline () +{ + rl_command_func_t *func; + char kseq[2]; + + if (bash_readline_initialized) + return; + + rl_terminal_name = get_string_value ("TERM"); + rl_instream = stdin; + rl_outstream = stderr; + + /* Allow conditional parsing of the ~/.inputrc file. */ + rl_readline_name = "Bash"; + + /* Add bindable names before calling rl_initialize so they may be + referenced in the various inputrc files. */ + rl_add_defun ("shell-expand-line", shell_expand_line, -1); +#ifdef BANG_HISTORY + rl_add_defun ("history-expand-line", history_expand_line, -1); + rl_add_defun ("magic-space", tcsh_magic_space, -1); +#endif + + rl_add_defun ("shell-forward-word", bash_forward_shellword, -1); + rl_add_defun ("shell-backward-word", bash_backward_shellword, -1); + rl_add_defun ("shell-kill-word", bash_kill_shellword, -1); + rl_add_defun ("shell-backward-kill-word", bash_backward_kill_shellword, -1); + rl_add_defun ("shell-transpose-words", bash_transpose_shellwords, -1); + +#ifdef ALIAS + rl_add_defun ("alias-expand-line", alias_expand_line, -1); +# ifdef BANG_HISTORY + rl_add_defun ("history-and-alias-expand-line", history_and_alias_expand_line, -1); +# endif +#endif + + /* Backwards compatibility. */ + rl_add_defun ("insert-last-argument", rl_yank_last_arg, -1); + + rl_add_defun ("display-shell-version", display_shell_version, -1); + rl_add_defun ("edit-and-execute-command", emacs_edit_and_execute_command, -1); + +#if defined (BRACE_COMPLETION) + rl_add_defun ("complete-into-braces", bash_brace_completion, -1); +#endif + +#if defined (SPECIFIC_COMPLETION_FUNCTIONS) + rl_add_defun ("complete-filename", bash_complete_filename, -1); + rl_add_defun ("possible-filename-completions", bash_possible_filename_completions, -1); + rl_add_defun ("complete-username", bash_complete_username, -1); + rl_add_defun ("possible-username-completions", bash_possible_username_completions, -1); + rl_add_defun ("complete-hostname", bash_complete_hostname, -1); + rl_add_defun ("possible-hostname-completions", bash_possible_hostname_completions, -1); + rl_add_defun ("complete-variable", bash_complete_variable, -1); + rl_add_defun ("possible-variable-completions", bash_possible_variable_completions, -1); + rl_add_defun ("complete-command", bash_complete_command, -1); + rl_add_defun ("possible-command-completions", bash_possible_command_completions, -1); + rl_add_defun ("glob-complete-word", bash_glob_complete_word, -1); + rl_add_defun ("glob-expand-word", bash_glob_expand_word, -1); + rl_add_defun ("glob-list-expansions", bash_glob_list_expansions, -1); +#endif + + rl_add_defun ("dynamic-complete-history", dynamic_complete_history, -1); + rl_add_defun ("dabbrev-expand", bash_dabbrev_expand, -1); + + /* Bind defaults before binding our custom shell keybindings. */ + if (RL_ISSTATE(RL_STATE_INITIALIZED) == 0) + rl_initialize (); + + /* Bind up our special shell functions. */ + rl_bind_key_if_unbound_in_map (CTRL('E'), shell_expand_line, emacs_meta_keymap); + +#ifdef BANG_HISTORY + rl_bind_key_if_unbound_in_map ('^', history_expand_line, emacs_meta_keymap); +#endif + + rl_bind_key_if_unbound_in_map (CTRL ('V'), display_shell_version, emacs_ctlx_keymap); + + /* In Bash, the user can switch editing modes with "set -o [vi emacs]", + so it is not necessary to allow C-M-j for context switching. Turn + off this occasionally confusing behaviour. */ + kseq[0] = CTRL('J'); + kseq[1] = '\0'; + func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL); + if (func == rl_vi_editing_mode) + rl_unbind_key_in_map (CTRL('J'), emacs_meta_keymap); + kseq[0] = CTRL('M'); + func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL); + if (func == rl_vi_editing_mode) + rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap); +#if defined (VI_MODE) + kseq[0] = CTRL('E'); + func = rl_function_of_keyseq (kseq, vi_movement_keymap, (int *)NULL); + if (func == rl_emacs_editing_mode) + rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap); +#endif + +#if defined (BRACE_COMPLETION) + rl_bind_key_if_unbound_in_map ('{', bash_brace_completion, emacs_meta_keymap); /*}*/ +#endif /* BRACE_COMPLETION */ + +#if defined (SPECIFIC_COMPLETION_FUNCTIONS) + rl_bind_key_if_unbound_in_map ('/', bash_complete_filename, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map ('/', bash_possible_filename_completions, emacs_ctlx_keymap); + + /* Have to jump through hoops here because there is a default binding for + M-~ (rl_tilde_expand) */ + kseq[0] = '~'; + kseq[1] = '\0'; + func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL); + if (func == 0 || func == rl_tilde_expand) + rl_bind_keyseq_in_map (kseq, bash_complete_username, emacs_meta_keymap); + + rl_bind_key_if_unbound_in_map ('~', bash_possible_username_completions, emacs_ctlx_keymap); + + rl_bind_key_if_unbound_in_map ('@', bash_complete_hostname, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map ('@', bash_possible_hostname_completions, emacs_ctlx_keymap); + + rl_bind_key_if_unbound_in_map ('$', bash_complete_variable, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map ('$', bash_possible_variable_completions, emacs_ctlx_keymap); + + rl_bind_key_if_unbound_in_map ('!', bash_complete_command, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map ('!', bash_possible_command_completions, emacs_ctlx_keymap); + + rl_bind_key_if_unbound_in_map ('g', bash_glob_complete_word, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map ('*', bash_glob_expand_word, emacs_ctlx_keymap); + rl_bind_key_if_unbound_in_map ('g', bash_glob_list_expansions, emacs_ctlx_keymap); + +#endif /* SPECIFIC_COMPLETION_FUNCTIONS */ + + kseq[0] = TAB; + kseq[1] = '\0'; + func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL); + if (func == 0 || func == rl_tab_insert) + rl_bind_key_in_map (TAB, dynamic_complete_history, emacs_meta_keymap); + + /* Tell the completer that we want a crack first. */ + rl_attempted_completion_function = attempt_shell_completion; + + /* Tell the completer that we might want to follow symbolic links or + do other expansion on directory names. */ + set_directory_hook (); + + rl_filename_rewrite_hook = bash_filename_rewrite_hook; + + rl_filename_stat_hook = bash_filename_stat_hook; + + /* Tell the filename completer we want a chance to ignore some names. */ + rl_ignore_some_completions_function = filename_completion_ignore; + + /* Bind C-xC-e to invoke emacs and run result as commands. */ + rl_bind_key_if_unbound_in_map (CTRL ('E'), emacs_edit_and_execute_command, emacs_ctlx_keymap); +#if defined (VI_MODE) + rl_bind_key_if_unbound_in_map ('v', vi_edit_and_execute_command, vi_movement_keymap); +# if defined (ALIAS) + rl_bind_key_if_unbound_in_map ('@', posix_edit_macros, vi_movement_keymap); +# endif + + rl_bind_key_in_map ('\\', bash_vi_complete, vi_movement_keymap); + rl_bind_key_in_map ('*', bash_vi_complete, vi_movement_keymap); + rl_bind_key_in_map ('=', bash_vi_complete, vi_movement_keymap); +#endif + + rl_completer_quote_characters = "'\""; + + /* This sets rl_completer_word_break_characters and rl_special_prefixes + to the appropriate values, depending on whether or not hostname + completion is enabled. */ + enable_hostname_completion (perform_hostname_completion); + + /* characters that need to be quoted when appearing in filenames. */ + rl_filename_quote_characters = default_filename_quote_characters; + set_filename_bstab (rl_filename_quote_characters); + + rl_filename_quoting_function = bash_quote_filename; + rl_filename_dequoting_function = bash_dequote_filename; + rl_char_is_quoted_p = char_is_quoted; + + /* Add some default bindings for the "shellwords" functions, roughly + parallelling the default word bindings in emacs mode. */ + rl_bind_key_if_unbound_in_map (CTRL('B'), bash_backward_shellword, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map (CTRL('D'), bash_kill_shellword, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map (CTRL('F'), bash_forward_shellword, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map (CTRL('T'), bash_transpose_shellwords, emacs_meta_keymap); + +#if 0 + /* This is superfluous and makes it impossible to use tab completion in + vi mode even when explicitly binding it in ~/.inputrc. sv_strict_posix() + should already have called posix_readline_initialize() when + posixly_correct was set. */ + if (posixly_correct) + posix_readline_initialize (1); +#endif + + bash_readline_initialized = 1; +} + +void +bashline_reinitialize () +{ + bash_readline_initialized = 0; +} + +void +bashline_set_event_hook () +{ + rl_signal_event_hook = bash_event_hook; +} + +void +bashline_reset_event_hook () +{ + rl_signal_event_hook = 0; +} + +/* On Sun systems at least, rl_attempted_completion_function can end up + getting set to NULL, and rl_completion_entry_function set to do command + word completion if Bash is interrupted while trying to complete a command + word. This just resets all the completion functions to the right thing. + It's called from throw_to_top_level(). */ +void +bashline_reset () +{ + tilde_initialize (); + rl_attempted_completion_function = attempt_shell_completion; + rl_completion_entry_function = NULL; + rl_ignore_some_completions_function = filename_completion_ignore; + rl_filename_quote_characters = default_filename_quote_characters; + set_filename_bstab (rl_filename_quote_characters); + + set_directory_hook (); + rl_filename_stat_hook = bash_filename_stat_hook; + + bashline_reset_event_hook (); + + rl_sort_completion_matches = 1; +} + +/* Contains the line to push into readline. */ +static char *push_to_readline = (char *)NULL; + +/* Push the contents of push_to_readline into the + readline buffer. */ +static int +bash_push_line () +{ + if (push_to_readline) + { + rl_insert_text (push_to_readline); + free (push_to_readline); + push_to_readline = (char *)NULL; + rl_startup_hook = old_rl_startup_hook; + } + return 0; +} + +/* Call this to set the initial text for the next line to read + from readline. */ +int +bash_re_edit (line) + char *line; +{ + FREE (push_to_readline); + + push_to_readline = savestring (line); + old_rl_startup_hook = rl_startup_hook; + rl_startup_hook = bash_push_line; + + return (0); +} + +static int +display_shell_version (count, c) + int count, c; +{ + rl_crlf (); + show_shell_version (0); + putc ('\r', rl_outstream); + fflush (rl_outstream); + rl_on_new_line (); + rl_redisplay (); + return 0; +} + +/* **************************************************************** */ +/* */ +/* Readline Stuff */ +/* */ +/* **************************************************************** */ + +/* If the user requests hostname completion, then simply build a list + of hosts, and complete from that forever more, or at least until + HOSTFILE is unset. */ + +/* THIS SHOULD BE A STRINGLIST. */ +/* The kept list of hostnames. */ +static char **hostname_list = (char **)NULL; + +/* The physical size of the above list. */ +static int hostname_list_size; + +/* The number of hostnames in the above list. */ +static int hostname_list_length; + +/* Whether or not HOSTNAME_LIST has been initialized. */ +int hostname_list_initialized = 0; + +/* Initialize the hostname completion table. */ +static void +initialize_hostname_list () +{ + char *temp; + + temp = get_string_value ("HOSTFILE"); + if (temp == 0) + temp = get_string_value ("hostname_completion_file"); + if (temp == 0) + temp = DEFAULT_HOSTS_FILE; + + snarf_hosts_from_file (temp); + + if (hostname_list) + hostname_list_initialized++; +} + +/* Add NAME to the list of hosts. */ +static void +add_host_name (name) + char *name; +{ + if (hostname_list_length + 2 > hostname_list_size) + { + hostname_list_size = (hostname_list_size + 32) - (hostname_list_size % 32); + hostname_list = strvec_resize (hostname_list, hostname_list_size); + } + + hostname_list[hostname_list_length++] = savestring (name); + hostname_list[hostname_list_length] = (char *)NULL; +} + +#define cr_whitespace(c) ((c) == '\r' || (c) == '\n' || whitespace(c)) + +static void +snarf_hosts_from_file (filename) + char *filename; +{ + FILE *file; + char *temp, buffer[256], name[256]; + register int i, start; + + file = fopen (filename, "r"); + if (file == 0) + return; + + while (temp = fgets (buffer, 255, file)) + { + /* Skip to first character. */ + for (i = 0; buffer[i] && cr_whitespace (buffer[i]); i++) + ; + + /* If comment or blank line, ignore. */ + if (buffer[i] == '\0' || buffer[i] == '#') + continue; + + /* If `preprocessor' directive, do the include. */ + if (strncmp (buffer + i, "$include ", 9) == 0) + { + char *incfile, *t; + + /* Find start of filename. */ + for (incfile = buffer + i + 9; *incfile && whitespace (*incfile); incfile++) + ; + + /* Find end of filename. */ + for (t = incfile; *t && cr_whitespace (*t) == 0; t++) + ; + + *t = '\0'; + + snarf_hosts_from_file (incfile); + continue; + } + + /* Skip internet address if present. */ + if (DIGIT (buffer[i])) + for (; buffer[i] && cr_whitespace (buffer[i]) == 0; i++); + + /* Gobble up names. Each name is separated with whitespace. */ + while (buffer[i]) + { + for (; cr_whitespace (buffer[i]); i++) + ; + if (buffer[i] == '\0' || buffer[i] == '#') + break; + + /* Isolate the current word. */ + for (start = i; buffer[i] && cr_whitespace (buffer[i]) == 0; i++) + ; + if (i == start) + continue; + strncpy (name, buffer + start, i - start); + name[i - start] = '\0'; + add_host_name (name); + } + } + fclose (file); +} + +/* Return the hostname list. */ +char ** +get_hostname_list () +{ + if (hostname_list_initialized == 0) + initialize_hostname_list (); + return (hostname_list); +} + +void +clear_hostname_list () +{ + register int i; + + if (hostname_list_initialized == 0) + return; + for (i = 0; i < hostname_list_length; i++) + free (hostname_list[i]); + hostname_list_length = hostname_list_initialized = 0; +} + +/* Return a NULL terminated list of hostnames which begin with TEXT. + Initialize the hostname list the first time if necessary. + The array is malloc ()'ed, but not the individual strings. */ +static char ** +hostnames_matching (text) + char *text; +{ + register int i, len, nmatch, rsize; + char **result; + + if (hostname_list_initialized == 0) + initialize_hostname_list (); + + if (hostname_list_initialized == 0) + return ((char **)NULL); + + /* Special case. If TEXT consists of nothing, then the whole list is + what is desired. */ + if (*text == '\0') + { + result = strvec_create (1 + hostname_list_length); + for (i = 0; i < hostname_list_length; i++) + result[i] = hostname_list[i]; + result[i] = (char *)NULL; + return (result); + } + + /* Scan until found, or failure. */ + len = strlen (text); + result = (char **)NULL; + for (i = nmatch = rsize = 0; i < hostname_list_length; i++) + { + if (STREQN (text, hostname_list[i], len) == 0) + continue; + + /* OK, it matches. Add it to the list. */ + if (nmatch >= (rsize - 1)) + { + rsize = (rsize + 16) - (rsize % 16); + result = strvec_resize (result, rsize); + } + + result[nmatch++] = hostname_list[i]; + } + if (nmatch) + result[nmatch] = (char *)NULL; + return (result); +} + +/* This vi mode command causes VI_EDIT_COMMAND to be run on the current + command being entered (if no explicit argument is given), otherwise on + a command from the history file. */ + +#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-vi}}\"" +#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-emacs}}\"" +#define POSIX_VI_EDIT_COMMAND "fc -e vi" + +static int +edit_and_execute_command (count, c, editing_mode, edit_command) + int count, c, editing_mode; + char *edit_command; +{ + char *command, *metaval; + int r, rrs, metaflag; + sh_parser_state_t ps; + + rrs = rl_readline_state; + saved_command_line_count = current_command_line_count; + + /* Accept the current line. */ + rl_newline (1, c); + + if (rl_explicit_arg) + { + command = (char *)xmalloc (strlen (edit_command) + 8); + sprintf (command, "%s %d", edit_command, count); + } + else + { + /* Take the command we were just editing, add it to the history file, + then call fc to operate on it. We have to add a dummy command to + the end of the history because fc ignores the last command (assumes + it's supposed to deal with the command before the `fc'). */ + /* This breaks down when using command-oriented history and are not + finished with the command, so we should not ignore the last command */ + using_history (); + current_command_line_count++; /* for rl_newline above */ + bash_add_history (rl_line_buffer); + current_command_line_count = 0; /* for dummy history entry */ + bash_add_history (""); + history_lines_this_session++; + using_history (); + command = savestring (edit_command); + } + + metaval = rl_variable_value ("input-meta"); + metaflag = RL_BOOLEAN_VARIABLE_VALUE (metaval); + + if (rl_deprep_term_function) + (*rl_deprep_term_function) (); + rl_clear_signals (); + save_parser_state (&ps); + r = parse_and_execute (command, (editing_mode == VI_EDITING_MODE) ? "v" : "C-xC-e", SEVAL_NOHIST); + restore_parser_state (&ps); + + /* if some kind of reset_parser was called, undo it. */ + reset_readahead_token (); + + if (rl_prep_term_function) + (*rl_prep_term_function) (metaflag); + rl_set_signals (); + + current_command_line_count = saved_command_line_count; + + /* Now erase the contents of the current line and undo the effects of the + rl_accept_line() above. We don't even want to make the text we just + executed available for undoing. */ + rl_line_buffer[0] = '\0'; /* XXX */ + rl_point = rl_end = 0; + rl_done = 0; + rl_readline_state = rrs; + +#if defined (VI_MODE) + if (editing_mode == VI_EDITING_MODE) + rl_vi_insertion_mode (1, c); +#endif + + rl_forced_update_display (); + + return r; +} + +#if defined (VI_MODE) +static int +vi_edit_and_execute_command (count, c) + int count, c; +{ + if (posixly_correct) + return (edit_and_execute_command (count, c, VI_EDITING_MODE, POSIX_VI_EDIT_COMMAND)); + else + return (edit_and_execute_command (count, c, VI_EDITING_MODE, VI_EDIT_COMMAND)); +} +#endif /* VI_MODE */ + +static int +emacs_edit_and_execute_command (count, c) + int count, c; +{ + return (edit_and_execute_command (count, c, EMACS_EDITING_MODE, EMACS_EDIT_COMMAND)); +} + +#if defined (ALIAS) +static int +posix_edit_macros (count, key) + int count, key; +{ + int c; + char alias_name[3], *alias_value, *macro; + + c = rl_read_key (); + alias_name[0] = '_'; + alias_name[1] = c; + alias_name[2] = '\0'; + + alias_value = get_alias_value (alias_name); + if (alias_value && *alias_value) + { + macro = savestring (alias_value); + rl_push_macro_input (macro); + } + return 0; +} +#endif + +/* Bindable commands that move `shell-words': that is, sequences of + non-unquoted-metacharacters. */ + +#define WORDDELIM(c) (shellmeta(c) || shellblank(c)) + +static int +bash_forward_shellword (count, key) + int count, key; +{ + size_t slen; + int c, p; + DECLARE_MBSTATE; + + if (count < 0) + return (bash_backward_shellword (-count, key)); + + /* The tricky part of this is deciding whether or not the first character + we're on is an unquoted metacharacter. Not completely handled yet. */ + /* XXX - need to test this stuff with backslash-escaped shell + metacharacters and unclosed single- and double-quoted strings. */ + + p = rl_point; + slen = rl_end; + + while (count) + { + if (p == rl_end) + { + rl_point = rl_end; + return 0; + } + + /* Are we in a quoted string? If we are, move to the end of the quoted + string and continue the outer loop. We only want quoted strings, not + backslash-escaped characters, but char_is_quoted doesn't + differentiate. */ + if (char_is_quoted (rl_line_buffer, p) && p > 0 && rl_line_buffer[p-1] != '\\') + { + do + ADVANCE_CHAR (rl_line_buffer, slen, p); + while (p < rl_end && char_is_quoted (rl_line_buffer, p)); + count--; + continue; + } + + /* Rest of code assumes we are not in a quoted string. */ + /* Move forward until we hit a non-metacharacter. */ + while (p < rl_end && (c = rl_line_buffer[p]) && WORDDELIM (c)) + { + switch (c) + { + default: + ADVANCE_CHAR (rl_line_buffer, slen, p); + continue; /* straight back to loop, don't increment p */ + case '\\': + if (p < rl_end && rl_line_buffer[p]) + ADVANCE_CHAR (rl_line_buffer, slen, p); + break; + case '\'': + p = skip_to_delim (rl_line_buffer, ++p, "'", SD_NOJMP); + break; + case '"': + p = skip_to_delim (rl_line_buffer, ++p, "\"", SD_NOJMP); + break; + } + + if (p < rl_end) + p++; + } + + if (rl_line_buffer[p] == 0 || p == rl_end) + { + rl_point = rl_end; + rl_ding (); + return 0; + } + + /* Now move forward until we hit a non-quoted metacharacter or EOL */ + while (p < rl_end && (c = rl_line_buffer[p]) && WORDDELIM (c) == 0) + { + switch (c) + { + default: + ADVANCE_CHAR (rl_line_buffer, slen, p); + continue; /* straight back to loop, don't increment p */ + case '\\': + if (p < rl_end && rl_line_buffer[p]) + ADVANCE_CHAR (rl_line_buffer, slen, p); + break; + case '\'': + p = skip_to_delim (rl_line_buffer, ++p, "'", SD_NOJMP); + break; + case '"': + p = skip_to_delim (rl_line_buffer, ++p, "\"", SD_NOJMP); + break; + } + + if (p < rl_end) + p++; + } + + if (p == rl_end || rl_line_buffer[p] == 0) + { + rl_point = rl_end; + return (0); + } + + count--; + } + + rl_point = p; + return (0); +} + +static int +bash_backward_shellword (count, key) + int count, key; +{ + size_t slen; + int c, p, prev_p; + DECLARE_MBSTATE; + + if (count < 0) + return (bash_forward_shellword (-count, key)); + + p = rl_point; + slen = rl_end; + + while (count) + { + if (p == 0) + { + rl_point = 0; + return 0; + } + + /* Move backward until we hit a non-metacharacter. We want to deal + with the characters before point, so we move off a word if we're + at its first character. */ + BACKUP_CHAR (rl_line_buffer, slen, p); + while (p > 0) + { + c = rl_line_buffer[p]; + if (WORDDELIM (c) == 0 || char_is_quoted (rl_line_buffer, p)) + break; + BACKUP_CHAR (rl_line_buffer, slen, p); + } + + if (p == 0) + { + rl_point = 0; + return 0; + } + + /* Now move backward until we hit a metacharacter or BOL. Leave point + at the start of the shellword or at BOL. */ + prev_p = p; + while (p > 0) + { + c = rl_line_buffer[p]; + if (WORDDELIM (c) && char_is_quoted (rl_line_buffer, p) == 0) + { + p = prev_p; + break; + } + prev_p = p; + BACKUP_CHAR (rl_line_buffer, slen, p); + } + + count--; + } + + rl_point = p; + return 0; +} + +static int +bash_kill_shellword (count, key) + int count, key; +{ + int p; + + if (count < 0) + return (bash_backward_kill_shellword (-count, key)); + + p = rl_point; + bash_forward_shellword (count, key); + + if (rl_point != p) + rl_kill_text (p, rl_point); + + rl_point = p; + if (rl_editing_mode == EMACS_EDITING_MODE) /* 1 == emacs_mode */ + rl_mark = rl_point; + + return 0; +} + +static int +bash_backward_kill_shellword (count, key) + int count, key; +{ + int p; + + if (count < 0) + return (bash_kill_shellword (-count, key)); + + p = rl_point; + bash_backward_shellword (count, key); + + if (rl_point != p) + rl_kill_text (p, rl_point); + + if (rl_editing_mode == EMACS_EDITING_MODE) /* 1 == emacs_mode */ + rl_mark = rl_point; + + return 0; +} + +static int +bash_transpose_shellwords (count, key) + int count, key; +{ + char *word1, *word2; + int w1_beg, w1_end, w2_beg, w2_end; + int orig_point = rl_point; + + if (count == 0) + return 0; + + /* Find the two shell words. */ + bash_forward_shellword (count, key); + w2_end = rl_point; + bash_backward_shellword (1, key); + w2_beg = rl_point; + bash_backward_shellword (count, key); + w1_beg = rl_point; + bash_forward_shellword (1, key); + w1_end = rl_point; + + /* check that there really are two words. */ + if ((w1_beg == w2_beg) || (w2_beg < w1_end)) + { + rl_ding (); + rl_point = orig_point; + return 1; + } + + /* Get the text of the words. */ + word1 = rl_copy_text (w1_beg, w1_end); + word2 = rl_copy_text (w2_beg, w2_end); + + /* We are about to do many insertions and deletions. Remember them + as one operation. */ + rl_begin_undo_group (); + + /* Do the stuff at word2 first, so that we don't have to worry + about word1 moving. */ + rl_point = w2_beg; + rl_delete_text (w2_beg, w2_end); + rl_insert_text (word1); + + rl_point = w1_beg; + rl_delete_text (w1_beg, w1_end); + rl_insert_text (word2); + + /* This is exactly correct since the text before this point has not + changed in length. */ + rl_point = w2_end; + + /* I think that does it. */ + rl_end_undo_group (); + xfree (word1); + xfree (word2); + + return 0; +} + +/* **************************************************************** */ +/* */ +/* How To Do Shell Completion */ +/* */ +/* **************************************************************** */ + +#define COMMAND_SEPARATORS ";|&{(`" +/* )} */ +#define COMMAND_SEPARATORS_PLUS_WS ";|&{(` \t" +/* )} */ + +/* check for redirections and other character combinations that are not + command separators */ +static int +check_redir (ti) + int ti; +{ + register int this_char, prev_char; + + /* Handle the two character tokens `>&', `<&', and `>|'. + We are not in a command position after one of these. */ + this_char = rl_line_buffer[ti]; + prev_char = (ti > 0) ? rl_line_buffer[ti - 1] : 0; + + if ((this_char == '&' && (prev_char == '<' || prev_char == '>')) || + (this_char == '|' && prev_char == '>')) + return (1); + else if (this_char == '{' && prev_char == '$') /*}*/ + return (1); +#if 0 /* Not yet */ + else if (this_char == '(' && prev_char == '$') /*)*/ + return (1); + else if (this_char == '(' && prev_char == '<') /*)*/ + return (1); +#if defined (EXTENDED_GLOB) + else if (extended_glob && this_char == '(' && prev_char == '!') /*)*/ + return (1); +#endif +#endif + else if (char_is_quoted (rl_line_buffer, ti)) + return (1); + return (0); +} + +#if defined (PROGRAMMABLE_COMPLETION) +/* + * XXX - because of the <= start test, and setting os = s+1, this can + * potentially return os > start. This is probably not what we want to + * happen, but fix later after 2.05a-release. + */ +static int +find_cmd_start (start) + int start; +{ + register int s, os, ns; + + os = 0; + /* Flags == SD_NOJMP only because we want to skip over command substitutions + in assignment statements. Have to test whether this affects `standalone' + command substitutions as individual words. */ + while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP|SD_COMPLETE/*|SD_NOSKIPCMD*/)) <= start) && + rl_line_buffer[s]) + { + /* Handle >| token crudely; treat as > not | */ + if (s > 0 && rl_line_buffer[s] == '|' && rl_line_buffer[s-1] == '>') + { + ns = skip_to_delim (rl_line_buffer, s+1, COMMAND_SEPARATORS, SD_NOJMP|SD_COMPLETE/*|SD_NOSKIPCMD*/); + if (ns > start || rl_line_buffer[ns] == 0) + return os; + os = ns+1; + continue; + } + /* The only reserved word in COMMAND_SEPARATORS is `{', so handle that + specially, making sure it's in a spot acceptable for reserved words */ + if (s >= os && rl_line_buffer[s] == '{') + { + int pc, nc; /* index of previous non-whitespace, next char */ + for (pc = (s > os) ? s - 1 : os; pc > os && whitespace(rl_line_buffer[pc]); pc--) + ; + nc = rl_line_buffer[s+1]; + /* must be preceded by a command separator or be the first non- + whitespace character since the last command separator, and + followed by a shell break character (not another `{') to be a reserved word. */ + if ((pc > os && (rl_line_buffer[s-1] == '{' || strchr (COMMAND_SEPARATORS, rl_line_buffer[pc]) == 0)) || + (shellbreak(nc) == 0)) /* }} */ + { + /* Not a reserved word, look for another delim */ + ns = skip_to_delim (rl_line_buffer, s+1, COMMAND_SEPARATORS, SD_NOJMP|SD_COMPLETE/*|SD_NOSKIPCMD*/); + if (ns > start || rl_line_buffer[ns] == 0) + return os; + os = ns+1; + continue; + } + } + os = s+1; + } + return os; +} + +static int +find_cmd_end (end) + int end; +{ + register int e; + + e = skip_to_delim (rl_line_buffer, end, COMMAND_SEPARATORS, SD_NOJMP|SD_COMPLETE); + return e; +} + +static char * +find_cmd_name (start, sp, ep) + int start; + int *sp, *ep; +{ + char *name; + register int s, e; + + for (s = start; whitespace (rl_line_buffer[s]); s++) + ; + + /* skip until a shell break character */ + e = skip_to_delim (rl_line_buffer, s, "()<>;&| \t\n", SD_NOJMP|SD_COMPLETE); + + name = substring (rl_line_buffer, s, e); + + if (sp) + *sp = s; + if (ep) + *ep = e; + + return (name); +} + +static char * +prog_complete_return (text, matchnum) + const char *text; + int matchnum; +{ + static int ind; + + if (matchnum == 0) + ind = 0; + + if (prog_complete_matches == 0 || prog_complete_matches[ind] == 0) + return (char *)NULL; + return (prog_complete_matches[ind++]); +} + +#endif /* PROGRAMMABLE_COMPLETION */ + +/* Try and catch completion attempts that are syntax errors or otherwise + invalid. */ +static int +invalid_completion (text, ind) + const char *text; + int ind; +{ + int pind; + + /* If we don't catch these here, the next clause will */ + if (ind > 0 && rl_line_buffer[ind] == '(' && /*)*/ + member (rl_line_buffer[ind-1], "$<>")) + return 0; + + pind = ind - 1; + while (pind > 0 && whitespace (rl_line_buffer[pind])) + pind--; + /* If we have only whitespace preceding a paren, it's valid */ + if (ind >= 0 && pind <= 0 && rl_line_buffer[ind] == '(') /*)*/ + return 0; + /* Flag the invalid completions, which are mostly syntax errors */ + if (ind > 0 && rl_line_buffer[ind] == '(' && /*)*/ + member (rl_line_buffer[pind], COMMAND_SEPARATORS) == 0) + return 1; + + return 0; +} + +/* Do some completion on TEXT. The indices of TEXT in RL_LINE_BUFFER are + at START and END. Return an array of matches, or NULL if none. */ +static char ** +attempt_shell_completion (text, start, end) + const char *text; + int start, end; +{ + int in_command_position, ti, qc, dflags; + char **matches, *command_separator_chars; +#if defined (PROGRAMMABLE_COMPLETION) + int have_progcomps, was_assignment; + COMPSPEC *iw_compspec; +#endif + + command_separator_chars = COMMAND_SEPARATORS; + matches = (char **)NULL; + rl_ignore_some_completions_function = filename_completion_ignore; + + rl_filename_quote_characters = default_filename_quote_characters; + set_filename_bstab (rl_filename_quote_characters); + set_directory_hook (); + rl_filename_stat_hook = bash_filename_stat_hook; + + rl_sort_completion_matches = 1; /* sort by default */ + + /* Determine if this could be a command word. It is if it appears at + the start of the line (ignoring preceding whitespace), or if it + appears after a character that separates commands. It cannot be a + command word if we aren't at the top-level prompt. */ + ti = start - 1; + qc = -1; + + while ((ti > -1) && (whitespace (rl_line_buffer[ti]))) + ti--; + +#if 1 + /* If this is an open quote, maybe we're trying to complete a quoted + command name. */ + if (ti >= 0 && (rl_line_buffer[ti] == '"' || rl_line_buffer[ti] == '\'')) + { + qc = rl_line_buffer[ti]; + ti--; + while (ti > -1 && (whitespace (rl_line_buffer[ti]))) + ti--; + } +#endif + + in_command_position = 0; + if (ti < 0) + { + /* Only do command completion at the start of a line when we + are prompting at the top level. */ + if (current_prompt_string == ps1_prompt) + in_command_position++; + else if (parser_in_command_position ()) + in_command_position++; + } + else if (member (rl_line_buffer[ti], command_separator_chars)) + { + in_command_position++; + + if (check_redir (ti) == 1) + in_command_position = 0; + } + else + { + /* This still could be in command position. It is possible + that all of the previous words on the line are variable + assignments. */ + } + + if (in_command_position && invalid_completion (text, ti)) + { + rl_attempted_completion_over = 1; + return ((char **)NULL); + } + + /* Check that we haven't incorrectly flagged a closed command substitution + as indicating we're in a command position. */ + if (in_command_position && ti >= 0 && rl_line_buffer[ti] == '`' && + *text != '`' && unclosed_pair (rl_line_buffer, end, "`") == 0) + in_command_position = 0; + + /* Special handling for command substitution. If *TEXT is a backquote, + it can be the start or end of an old-style command substitution, or + unmatched. If it's unmatched, both calls to unclosed_pair will + succeed. Don't bother if readline found a single quote and we are + completing on the substring. */ + if (*text == '`' && rl_completion_quote_character != '\'' && + (in_command_position || (unclosed_pair (rl_line_buffer, start, "`") && + unclosed_pair (rl_line_buffer, end, "`")))) + matches = rl_completion_matches (text, command_subst_completion_function); + +#if defined (PROGRAMMABLE_COMPLETION) + /* Attempt programmable completion. */ + have_progcomps = prog_completion_enabled && (progcomp_size () > 0); + iw_compspec = progcomp_search (INITIALWORD); + if (matches == 0 && + (in_command_position == 0 || text[0] == '\0' || (in_command_position && iw_compspec)) && + current_prompt_string == ps1_prompt) + { + int s, e, s1, e1, os, foundcs; + char *n; + + /* XXX - don't free the members */ + if (prog_complete_matches) + free (prog_complete_matches); + prog_complete_matches = (char **)NULL; + + os = start; + n = 0; + was_assignment = 0; + s = find_cmd_start (os); + e = find_cmd_end (end); + do + { + /* Don't read past the end of rl_line_buffer */ + if (s > rl_end) + { + s1 = s = e1; + break; + } + /* Or past point if point is within an assignment statement */ + else if (was_assignment && s > rl_point) + { + s1 = s = e1; + break; + } + /* Skip over assignment statements preceding a command name. If we + don't find a command name at all, we can perform command name + completion. If we find a partial command name, we should perform + command name completion on it. */ + FREE (n); + n = find_cmd_name (s, &s1, &e1); + s = e1 + 1; + } + while (was_assignment = assignment (n, 0)); + s = s1; /* reset to index where name begins */ + + /* s == index of where command name begins (reset above) + e == end of current command, may be end of line + s1 = index of where command name begins + e1 == index of where command name ends + start == index of where word to be completed begins + end == index of where word to be completed ends + if (s == start) we are doing command word completion for sure + if (e1 == end) we are at the end of the command name and completing it */ + if (start == 0 && end == 0 && e != 0 && text[0] == '\0') /* beginning of non-empty line */ + foundcs = 0; + else if (start == end && start == s1 && e != 0 && e1 > end) /* beginning of command name, leading whitespace */ + foundcs = 0; + else if (e == 0 && e == s && text[0] == '\0' && have_progcomps) /* beginning of empty line */ + prog_complete_matches = programmable_completions (EMPTYCMD, text, s, e, &foundcs); + else if (start == end && text[0] == '\0' && s1 > start && whitespace (rl_line_buffer[start])) + foundcs = 0; /* whitespace before command name */ + else if (e > s && was_assignment == 0 && e1 == end && rl_line_buffer[e] == 0 && whitespace (rl_line_buffer[e-1]) == 0) + { + /* not assignment statement, but still want to perform command + completion if we are composing command word. */ + foundcs = 0; + in_command_position = s == start && STREQ (n, text); /* XXX */ + } + else if (e > s && was_assignment == 0 && have_progcomps) + { + prog_complete_matches = programmable_completions (n, text, s, e, &foundcs); + /* command completion if programmable completion fails */ + /* If we have a completion for the initial word, we can prefer that */ + in_command_position = s == start && (iw_compspec || STREQ (n, text)); /* XXX */ + if (iw_compspec && in_command_position) + foundcs = 0; + } + /* empty command name following command separator */ + else if (s >= e && n[0] == '\0' && text[0] == '\0' && start > 0 && + was_assignment == 0 && member (rl_line_buffer[start-1], COMMAND_SEPARATORS)) + { + foundcs = 0; + in_command_position = 1; + } + else if (s >= e && n[0] == '\0' && text[0] == '\0' && start > 0) + { + foundcs = 0; /* empty command name following optional assignments */ + in_command_position += was_assignment; + } + else if (s == start && e == end && STREQ (n, text) && start > 0) + { + foundcs = 0; /* partial command name following assignments */ + in_command_position = 1; + } + else + foundcs = 0; + + /* If we have defined a compspec for the initial (command) word, call + it and process the results like any other programmable completion. */ + if (in_command_position && have_progcomps && foundcs == 0 && iw_compspec) + prog_complete_matches = programmable_completions (INITIALWORD, text, s, e, &foundcs); + + FREE (n); + /* XXX - if we found a COMPSPEC for the command, just return whatever + the programmable completion code returns, and disable the default + filename completion that readline will do unless the COPT_DEFAULT + option has been set with the `-o default' option to complete or + compopt. */ + if (foundcs) + { + pcomp_set_readline_variables (foundcs, 1); + /* Turn what the programmable completion code returns into what + readline wants. I should have made compute_lcd_of_matches + external... */ + matches = rl_completion_matches (text, prog_complete_return); + if ((foundcs & COPT_DEFAULT) == 0) + rl_attempted_completion_over = 1; /* no default */ + if (matches || ((foundcs & COPT_BASHDEFAULT) == 0)) + return (matches); + } + } +#endif + + if (matches == 0) + { + dflags = 0; + if (in_command_position) + dflags |= DEFCOMP_CMDPOS; + matches = bash_default_completion (text, start, end, qc, dflags); + } + + return matches; +} + +char ** +bash_default_completion (text, start, end, qc, compflags) + const char *text; + int start, end, qc, compflags; +{ + char **matches, *t; + + matches = (char **)NULL; + + /* New posix-style command substitution or variable name? */ + if (*text == '$') + { + if (qc != '\'' && text[1] == '(') /* ) */ + matches = rl_completion_matches (text, command_subst_completion_function); + else + { + matches = rl_completion_matches (text, variable_completion_function); + /* If a single match, see if it expands to a directory name and append + a slash if it does. This requires us to expand the variable name, + so we don't want to display errors if the variable is unset. This + can happen with dynamic variables whose value has never been + requested. */ + if (matches && matches[0] && matches[1] == 0) + { + t = savestring (matches[0]); + bash_filename_stat_hook (&t); + /* doesn't use test_for_directory because that performs tilde + expansion */ + if (file_isdir (t)) + rl_completion_append_character = '/'; + free (t); + } + } + } + + /* If the word starts in `~', and there is no slash in the word, then + try completing this word as a username. */ + if (matches == 0 && *text == '~' && mbschr (text, '/') == 0) + matches = rl_completion_matches (text, rl_username_completion_function); + + /* Another one. Why not? If the word starts in '@', then look through + the world of known hostnames for completion first. */ + if (matches == 0 && perform_hostname_completion && *text == '@') + matches = rl_completion_matches (text, hostname_completion_function); + + /* And last, (but not least) if this word is in a command position, then + complete over possible command names, including aliases, functions, + and command names. */ + if (matches == 0 && (compflags & DEFCOMP_CMDPOS)) + { + /* If END == START and text[0] == 0, we are trying to complete an empty + command word. */ + if (no_empty_command_completion && end == start && text[0] == '\0') + { + matches = (char **)NULL; + rl_ignore_some_completions_function = bash_ignore_everything; + } + else + { +#define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && absolute_program(x) == 0 && *(x) != '~' && test_for_directory (x)) + + dot_in_path = 0; + matches = rl_completion_matches (text, command_word_completion_function); + + /* If we are attempting command completion and nothing matches, we + do not want readline to perform filename completion for us. We + still want to be able to complete partial pathnames, so set the + completion ignore function to something which will remove + filenames and leave directories in the match list. */ + if (matches == (char **)NULL) + rl_ignore_some_completions_function = bash_ignore_filenames; + else if (matches[1] == 0 && CMD_IS_DIR(matches[0]) && dot_in_path == 0) + /* If we found a single match, without looking in the current + directory (because it's not in $PATH), but the found name is + also a command in the current directory, suppress appending any + terminating character, since it's ambiguous. */ + { + rl_completion_suppress_append = 1; + rl_filename_completion_desired = 0; + } + else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0])) + /* There are multiple instances of the same match (duplicate + completions haven't yet been removed). In this case, all of + the matches will be the same, and the duplicate removal code + will distill them all down to one. We turn on + rl_completion_suppress_append for the same reason as above. + Remember: we only care if there's eventually a single unique + completion. If there are multiple completions this won't + make a difference and the problem won't occur. */ + { + rl_completion_suppress_append = 1; + rl_filename_completion_desired = 0; + } + } + } + + /* This could be a globbing pattern, so try to expand it using pathname + expansion. */ + if (!matches && completion_glob_pattern ((char *)text)) + { + matches = rl_completion_matches (text, glob_complete_word); + /* A glob expression that matches more than one filename is problematic. + If we match more than one filename, punt. */ + if (matches && matches[1] && rl_completion_type == TAB) + { + strvec_dispose (matches); + matches = (char **)0; + } + else if (matches && matches[1] && rl_completion_type == '!') + { + rl_completion_suppress_append = 1; + rl_filename_completion_desired = 0; + } + } + + return (matches); +} + +static int +bash_command_name_stat_hook (name) + char **name; +{ + char *cname, *result; + + /* If it's not something we're going to look up in $PATH, just call the + normal filename stat hook. */ + if (absolute_program (*name)) + return (bash_filename_stat_hook (name)); + + cname = *name; + /* XXX - we could do something here with converting aliases, builtins, + and functions into something that came out as executable, but we don't. */ + result = search_for_command (cname, 0); + if (result) + { + *name = result; + return 1; + } + return 0; +} + +static int +executable_completion (filename, searching_path) + const char *filename; + int searching_path; +{ + char *f; + int r; + + f = savestring (filename); + bash_directory_completion_hook (&f); + + r = searching_path ? executable_file (f) : executable_or_directory (f); + free (f); + return r; +} + +/* This is the function to call when the word to complete is in a position + where a command word can be found. It grovels $PATH, looking for commands + that match. It also scans aliases, function names, and the shell_builtin + table. */ +char * +command_word_completion_function (hint_text, state) + const char *hint_text; + int state; +{ + static char *hint = (char *)NULL; + static char *path = (char *)NULL; + static char *val = (char *)NULL; + static char *filename_hint = (char *)NULL; + static char *fnhint = (char *)NULL; + static char *dequoted_hint = (char *)NULL; + static char *directory_part = (char *)NULL; + static char **glob_matches = (char **)NULL; + static int path_index, hint_len, istate, igncase; + static int mapping_over, local_index, searching_path, hint_is_dir; + static int old_glob_ignore_case, globpat; + static SHELL_VAR **varlist = (SHELL_VAR **)NULL; +#if defined (ALIAS) + static alias_t **alias_list = (alias_t **)NULL; +#endif /* ALIAS */ + char *temp, *cval; + + /* We have to map over the possibilities for command words. If we have + no state, then make one just for that purpose. */ + if (state == 0) + { + rl_filename_stat_hook = bash_command_name_stat_hook; + + if (dequoted_hint && dequoted_hint != hint) + free (dequoted_hint); + if (hint) + free (hint); + + mapping_over = searching_path = 0; + hint_is_dir = CMD_IS_DIR (hint_text); + val = (char *)NULL; + + temp = rl_variable_value ("completion-ignore-case"); + igncase = RL_BOOLEAN_VARIABLE_VALUE (temp); + + if (glob_matches) + { + free (glob_matches); + glob_matches = (char **)NULL; + } + + globpat = completion_glob_pattern ((char *)hint_text); + + /* If this is an absolute program name, do not check it against + aliases, reserved words, functions or builtins. We must check + whether or not it is unique, and, if so, whether that filename + is executable. */ + if (globpat || absolute_program (hint_text)) + { + /* Perform tilde expansion on what's passed, so we don't end up + passing filenames with tildes directly to stat(). The rest of + the shell doesn't do variable expansion on the word following + the tilde, so we don't do it here even if direxpand is set. */ + if (*hint_text == '~') + { + hint = bash_tilde_expand (hint_text, 0); + directory_part = savestring (hint_text); + temp = strchr (directory_part, '/'); + if (temp) + *temp = 0; + else + { + free (directory_part); + directory_part = (char *)NULL; + } + } + else if (dircomplete_expand) + { + hint = savestring (hint_text); + bash_directory_completion_hook (&hint); + } + else + hint = savestring (hint_text); + + dequoted_hint = hint; + /* If readline's completer found a quote character somewhere, but + didn't set the quote character, there must have been a quote + character embedded in the filename. It can't be at the start of + the filename, so we need to dequote the filename before we look + in the file system for it. */ + if (rl_completion_found_quote && rl_completion_quote_character == 0) + { + dequoted_hint = bash_dequote_filename (hint, 0); + free (hint); + hint = dequoted_hint; + } + hint_len = strlen (hint); + + if (filename_hint) + free (filename_hint); + + fnhint = filename_hint = savestring (hint); + + istate = 0; + + if (globpat) + { + mapping_over = 5; + goto globword; + } + else + { + if (dircomplete_expand && path_dot_or_dotdot (filename_hint)) + { + dircomplete_expand = 0; + set_directory_hook (); + dircomplete_expand = 1; + } + mapping_over = 4; + goto inner; + } + } + + dequoted_hint = hint = savestring (hint_text); + hint_len = strlen (hint); + + if (rl_completion_found_quote && rl_completion_quote_character == 0) + dequoted_hint = bash_dequote_filename (hint, 0); + + path = get_string_value ("PATH"); + path_index = dot_in_path = 0; + + /* Initialize the variables for each type of command word. */ + local_index = 0; + + if (varlist) + free (varlist); + + varlist = all_visible_functions (); + +#if defined (ALIAS) + if (alias_list) + free (alias_list); + + alias_list = all_aliases (); +#endif /* ALIAS */ + } + + /* mapping_over says what we are currently hacking. Note that every case + in this list must fall through when there are no more possibilities. */ + + switch (mapping_over) + { + case 0: /* Aliases come first. */ +#if defined (ALIAS) + while (alias_list && alias_list[local_index]) + { + register char *alias; + + alias = alias_list[local_index++]->name; + + if (igncase == 0 && (STREQN (alias, hint, hint_len))) + return (savestring (alias)); + else if (igncase && strncasecmp (alias, hint, hint_len) == 0) + return (savestring (alias)); + } +#endif /* ALIAS */ + local_index = 0; + mapping_over++; + + case 1: /* Then shell reserved words. */ + { + while (word_token_alist[local_index].word) + { + register char *reserved_word; + + reserved_word = word_token_alist[local_index++].word; + + if (STREQN (reserved_word, hint, hint_len)) + return (savestring (reserved_word)); + } + local_index = 0; + mapping_over++; + } + + case 2: /* Then function names. */ + while (varlist && varlist[local_index]) + { + register char *varname; + + varname = varlist[local_index++]->name; + + /* Honor completion-ignore-case for shell function names. */ + if (igncase == 0 && (STREQN (varname, hint, hint_len))) + return (savestring (varname)); + else if (igncase && strncasecmp (varname, hint, hint_len) == 0) + return (savestring (varname)); + } + local_index = 0; + mapping_over++; + + case 3: /* Then shell builtins. */ + for (; local_index < num_shell_builtins; local_index++) + { + /* Ignore it if it doesn't have a function pointer or if it + is not currently enabled. */ + if (!shell_builtins[local_index].function || + (shell_builtins[local_index].flags & BUILTIN_ENABLED) == 0) + continue; + + if (STREQN (shell_builtins[local_index].name, hint, hint_len)) + { + int i = local_index++; + + return (savestring (shell_builtins[i].name)); + } + } + local_index = 0; + mapping_over++; + } + +globword: + /* Limited support for completing command words with globbing chars. Only + a single match (multiple matches that end up reducing the number of + characters in the common prefix are bad) will ever be returned on + regular completion. */ + if (globpat) + { + if (state == 0) + { + glob_ignore_case = igncase; + glob_matches = shell_glob_filename (hint, 0); + glob_ignore_case = old_glob_ignore_case; + + if (GLOB_FAILED (glob_matches) || glob_matches == 0) + { + glob_matches = (char **)NULL; + return ((char *)NULL); + } + + local_index = 0; + + if (glob_matches[1] && rl_completion_type == TAB) /* multiple matches are bad */ + return ((char *)NULL); + } + + while (val = glob_matches[local_index++]) + { + if (executable_or_directory (val)) + { + if (*hint_text == '~' && directory_part) + { + temp = maybe_restore_tilde (val, directory_part); + free (val); + val = temp; + } + return (val); + } + free (val); + } + + glob_ignore_case = old_glob_ignore_case; + return ((char *)NULL); + } + + /* If the text passed is a directory in the current directory, return it + as a possible match. Executables in directories in the current + directory can be specified using relative pathnames and successfully + executed even when `.' is not in $PATH. */ + if (hint_is_dir) + { + hint_is_dir = 0; /* only return the hint text once */ + return (savestring (hint_text)); + } + + /* Repeatedly call filename_completion_function while we have + members of PATH left. Question: should we stat each file? + Answer: we call executable_file () on each file. */ + outer: + + istate = (val != (char *)NULL); + + if (istate == 0) + { + char *current_path; + + /* Get the next directory from the path. If there is none, then we + are all done. */ + if (path == 0 || path[path_index] == 0 || + (current_path = extract_colon_unit (path, &path_index)) == 0) + return ((char *)NULL); + + searching_path = 1; + if (*current_path == 0) + { + free (current_path); + current_path = savestring ("."); + } + + if (*current_path == '~') + { + char *t; + + t = bash_tilde_expand (current_path, 0); + free (current_path); + current_path = t; + } + + if (current_path[0] == '.' && current_path[1] == '\0') + dot_in_path = 1; + + if (fnhint && fnhint != filename_hint) + free (fnhint); + if (filename_hint) + free (filename_hint); + + filename_hint = sh_makepath (current_path, hint, 0); + /* Need a quoted version (though it doesn't matter much in most + cases) because rl_filename_completion_function dequotes the + filename it gets, assuming that it's been quoted as part of + the input line buffer. */ + if (strpbrk (filename_hint, "\"'\\")) + fnhint = sh_backslash_quote (filename_hint, filename_bstab, 0); + else + fnhint = filename_hint; + free (current_path); /* XXX */ + } + + inner: + val = rl_filename_completion_function (fnhint, istate); + if (mapping_over == 4 && dircomplete_expand) + set_directory_hook (); + + istate = 1; + + if (val == 0) + { + /* If the hint text is an absolute program, then don't bother + searching through PATH. */ + if (absolute_program (hint)) + return ((char *)NULL); + + goto outer; + } + else + { + int match, freetemp; + + if (absolute_program (hint)) + { + if (igncase == 0) + match = strncmp (val, hint, hint_len) == 0; + else + match = strncasecmp (val, hint, hint_len) == 0; + + /* If we performed tilde expansion, restore the original + filename. */ + if (*hint_text == '~') + temp = maybe_restore_tilde (val, directory_part); + else + temp = savestring (val); + freetemp = 1; + } + else + { + temp = strrchr (val, '/'); + + if (temp) + { + temp++; + if (igncase == 0) + freetemp = match = strncmp (temp, hint, hint_len) == 0; + else + freetemp = match = strncasecmp (temp, hint, hint_len) == 0; + if (match) + temp = savestring (temp); + } + else + freetemp = match = 0; + } + + /* If we have found a match, and it is an executable file, return it. + We don't return directory names when searching $PATH, since the + bash execution code won't find executables in directories which + appear in directories in $PATH when they're specified using + relative pathnames. */ +#if 0 + /* If we're not searching $PATH and we have a relative pathname, we + need to re-canonicalize it before testing whether or not it's an + executable or a directory so the shell treats .. relative to $PWD + according to the physical/logical option. The shell already + canonicalizes the directory name in order to tell readline where + to look, so not doing it here will be inconsistent. */ + /* XXX -- currently not used -- will introduce more inconsistency, + since shell does not canonicalize ../foo before passing it to + shell_execve(). */ + if (match && searching_path == 0 && *val == '.') + { + char *t, *t1; + + t = get_working_directory ("command-word-completion"); + t1 = make_absolute (val, t); + free (t); + cval = sh_canonpath (t1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + } + else +#endif + cval = val; + + if (match && executable_completion ((searching_path ? val : cval), searching_path)) + { + if (cval != val) + free (cval); + free (val); + val = ""; /* So it won't be NULL. */ + return (temp); + } + else + { + if (freetemp) + free (temp); + if (cval != val) + free (cval); + free (val); + goto inner; + } + } +} + +/* Completion inside an unterminated command substitution. */ +static char * +command_subst_completion_function (text, state) + const char *text; + int state; +{ + static char **matches = (char **)NULL; + static const char *orig_start; + static char *filename_text = (char *)NULL; + static int cmd_index, start_len; + char *value; + + if (state == 0) + { + if (filename_text) + free (filename_text); + orig_start = text; + if (*text == '`') + text++; + else if (*text == '$' && text[1] == '(') /* ) */ + text += 2; + /* If the text was quoted, suppress any quote character that the + readline completion code would insert. */ + rl_completion_suppress_quote = 1; + start_len = text - orig_start; + filename_text = savestring (text); + if (matches) + free (matches); + + /* + * At this point we can entertain the idea of re-parsing + * `filename_text' into a (possibly incomplete) command name and + * arguments, and doing completion based on that. This is + * currently very rudimentary, but it is a small improvement. + */ + for (value = filename_text + strlen (filename_text) - 1; value > filename_text; value--) + if (whitespace (*value) || member (*value, COMMAND_SEPARATORS)) + break; + if (value <= filename_text) + matches = rl_completion_matches (filename_text, command_word_completion_function); + else + { + value++; + start_len += value - filename_text; + if (whitespace (value[-1])) + matches = rl_completion_matches (value, rl_filename_completion_function); + else + matches = rl_completion_matches (value, command_word_completion_function); + } + + /* If there is more than one match, rl_completion_matches has already + put the lcd in matches[0]. Skip over it. */ + cmd_index = matches && matches[0] && matches[1]; + + /* If there's a single match and it's a directory, set the append char + to the expected `/'. Otherwise, don't append anything. */ + if (matches && matches[0] && matches[1] == 0 && test_for_directory (matches[0])) + rl_completion_append_character = '/'; + else + rl_completion_suppress_append = 1; + } + + if (matches == 0 || matches[cmd_index] == 0) + { + rl_filename_quoting_desired = 0; /* disable quoting */ + return ((char *)NULL); + } + else + { + value = (char *)xmalloc (1 + start_len + strlen (matches[cmd_index])); + + if (start_len == 1) + value[0] = *orig_start; + else + strncpy (value, orig_start, start_len); + + strcpy (value + start_len, matches[cmd_index]); + + cmd_index++; + return (value); + } +} + +/* Okay, now we write the entry_function for variable completion. */ +static char * +variable_completion_function (text, state) + const char *text; + int state; +{ + static char **varlist = (char **)NULL; + static int varlist_index; + static char *varname = (char *)NULL; + static int first_char, first_char_loc; + + if (!state) + { + if (varname) + free (varname); + + first_char_loc = 0; + first_char = text[0]; + + if (first_char == '$') + first_char_loc++; + + if (text[first_char_loc] == '{') + first_char_loc++; + + varname = savestring (text + first_char_loc); + + if (varlist) + strvec_dispose (varlist); + + varlist = all_variables_matching_prefix (varname); + varlist_index = 0; + } + + if (!varlist || !varlist[varlist_index]) + { + return ((char *)NULL); + } + else + { + char *value; + + value = (char *)xmalloc (4 + strlen (varlist[varlist_index])); + + if (first_char_loc) + { + value[0] = first_char; + if (first_char_loc == 2) + value[1] = '{'; + } + + strcpy (value + first_char_loc, varlist[varlist_index]); + if (first_char_loc == 2) + strcat (value, "}"); + + varlist_index++; + return (value); + } +} + +/* How about a completion function for hostnames? */ +static char * +hostname_completion_function (text, state) + const char *text; + int state; +{ + static char **list = (char **)NULL; + static int list_index = 0; + static int first_char, first_char_loc; + + /* If we don't have any state, make some. */ + if (state == 0) + { + FREE (list); + + list = (char **)NULL; + + first_char_loc = 0; + first_char = *text; + + if (first_char == '@') + first_char_loc++; + + list = hostnames_matching ((char *)text+first_char_loc); + list_index = 0; + } + + if (list && list[list_index]) + { + char *t; + + t = (char *)xmalloc (2 + strlen (list[list_index])); + *t = first_char; + strcpy (t + first_char_loc, list[list_index]); + list_index++; + return (t); + } + + return ((char *)NULL); +} + +/* + * A completion function for service names from /etc/services (or wherever). + */ +char * +bash_servicename_completion_function (text, state) + const char *text; + int state; +{ +#if defined (__WIN32__) || defined (__OPENNT) || !defined (HAVE_GETSERVENT) + return ((char *)NULL); +#else + static char *sname = (char *)NULL; + static struct servent *srvent; + static int snamelen; + char *value; + char **alist, *aentry; + int afound; + + if (state == 0) + { + FREE (sname); + + sname = savestring (text); + snamelen = strlen (sname); + setservent (0); + } + + while (srvent = getservent ()) + { + afound = 0; + if (snamelen == 0 || (STREQN (sname, srvent->s_name, snamelen))) + break; + /* Not primary, check aliases */ + for (alist = srvent->s_aliases; *alist; alist++) + { + aentry = *alist; + if (STREQN (sname, aentry, snamelen)) + { + afound = 1; + break; + } + } + + if (afound) + break; + } + + if (srvent == 0) + { + endservent (); + return ((char *)NULL); + } + + value = afound ? savestring (aentry) : savestring (srvent->s_name); + return value; +#endif +} + +/* + * A completion function for group names from /etc/group (or wherever). + */ +char * +bash_groupname_completion_function (text, state) + const char *text; + int state; +{ +#if defined (__WIN32__) || defined (__OPENNT) || !defined (HAVE_GRP_H) + return ((char *)NULL); +#else + static char *gname = (char *)NULL; + static struct group *grent; + static int gnamelen; + char *value; + + if (state == 0) + { + FREE (gname); + gname = savestring (text); + gnamelen = strlen (gname); + + setgrent (); + } + + while (grent = getgrent ()) + { + if (gnamelen == 0 || (STREQN (gname, grent->gr_name, gnamelen))) + break; + } + + if (grent == 0) + { + endgrent (); + return ((char *)NULL); + } + + value = savestring (grent->gr_name); + return (value); +#endif +} + +/* Functions to perform history and alias expansions on the current line. */ + +#if defined (BANG_HISTORY) +/* Perform history expansion on the current line. If no history expansion + is done, pre_process_line() returns what it was passed, so we need to + allocate a new line here. */ +static char * +history_expand_line_internal (line) + char *line; +{ + char *new_line; + int old_verify; + + old_verify = hist_verify; + hist_verify = 0; + new_line = pre_process_line (line, 0, 0); + hist_verify = old_verify; + + return (new_line == line) ? savestring (line) : new_line; +} +#endif + +/* There was an error in expansion. Let the preprocessor print + the error here. */ +static void +cleanup_expansion_error () +{ + char *to_free; +#if defined (BANG_HISTORY) + int old_verify; + + old_verify = hist_verify; + hist_verify = 0; +#endif + + fprintf (rl_outstream, "\r\n"); + to_free = pre_process_line (rl_line_buffer, 1, 0); +#if defined (BANG_HISTORY) + hist_verify = old_verify; +#endif + if (to_free != rl_line_buffer) + FREE (to_free); + putc ('\r', rl_outstream); + rl_forced_update_display (); +} + +/* If NEW_LINE differs from what is in the readline line buffer, add an + undo record to get from the readline line buffer contents to the new + line and make NEW_LINE the current readline line. */ +static void +maybe_make_readline_line (new_line) + char *new_line; +{ + if (new_line && strcmp (new_line, rl_line_buffer) != 0) + { + rl_point = rl_end; + + rl_add_undo (UNDO_BEGIN, 0, 0, 0); + rl_delete_text (0, rl_point); + rl_point = rl_end = rl_mark = 0; + rl_insert_text (new_line); + rl_add_undo (UNDO_END, 0, 0, 0); + } +} + +/* Make NEW_LINE be the current readline line. This frees NEW_LINE. */ +static void +set_up_new_line (new_line) + char *new_line; +{ + int old_point, at_end; + + old_point = rl_point; + at_end = rl_point == rl_end; + + /* If the line was history and alias expanded, then make that + be one thing to undo. */ + maybe_make_readline_line (new_line); + free (new_line); + + /* Place rl_point where we think it should go. */ + if (at_end) + rl_point = rl_end; + else if (old_point < rl_end) + { + rl_point = old_point; + if (!whitespace (rl_line_buffer[rl_point])) + rl_forward_word (1, 0); + } +} + +#if defined (ALIAS) +/* Expand aliases in the current readline line. */ +static int +alias_expand_line (count, ignore) + int count, ignore; +{ + char *new_line; + + new_line = alias_expand (rl_line_buffer); + + if (new_line) + { + set_up_new_line (new_line); + return (0); + } + else + { + cleanup_expansion_error (); + return (1); + } +} +#endif + +#if defined (BANG_HISTORY) +/* History expand the line. */ +static int +history_expand_line (count, ignore) + int count, ignore; +{ + char *new_line; + + new_line = history_expand_line_internal (rl_line_buffer); + + if (new_line) + { + set_up_new_line (new_line); + return (0); + } + else + { + cleanup_expansion_error (); + return (1); + } +} + +/* Expand history substitutions in the current line and then insert a + space (hopefully close to where we were before). */ +static int +tcsh_magic_space (count, ignore) + int count, ignore; +{ + int dist_from_end, old_point; + + old_point = rl_point; + dist_from_end = rl_end - rl_point; + if (history_expand_line (count, ignore) == 0) + { + /* Try a simple heuristic from Stephen Gildea . + This works if all expansions were before rl_point or if no expansions + were performed. */ + rl_point = (old_point == 0) ? old_point : rl_end - dist_from_end; + rl_insert (1, ' '); + return (0); + } + else + return (1); +} +#endif /* BANG_HISTORY */ + +/* History and alias expand the line. */ +static int +history_and_alias_expand_line (count, ignore) + int count, ignore; +{ + char *new_line; + + new_line = 0; +#if defined (BANG_HISTORY) + new_line = history_expand_line_internal (rl_line_buffer); +#endif + +#if defined (ALIAS) + if (new_line) + { + char *alias_line; + + alias_line = alias_expand (new_line); + free (new_line); + new_line = alias_line; + } +#endif /* ALIAS */ + + if (new_line) + { + set_up_new_line (new_line); + return (0); + } + else + { + cleanup_expansion_error (); + return (1); + } +} + +/* History and alias expand the line, then perform the shell word + expansions by calling expand_string. This can't use set_up_new_line() + because we want the variable expansions as a separate undo'able + set of operations. */ +static int +shell_expand_line (count, ignore) + int count, ignore; +{ + char *new_line; + WORD_LIST *expanded_string; + WORD_DESC *w; + + new_line = 0; +#if defined (BANG_HISTORY) + new_line = history_expand_line_internal (rl_line_buffer); +#endif + +#if defined (ALIAS) + if (new_line) + { + char *alias_line; + + alias_line = alias_expand (new_line); + free (new_line); + new_line = alias_line; + } +#endif /* ALIAS */ + + if (new_line) + { + int old_point = rl_point; + int at_end = rl_point == rl_end; + + /* If the line was history and alias expanded, then make that + be one thing to undo. */ + maybe_make_readline_line (new_line); + free (new_line); + + /* If there is variable expansion to perform, do that as a separate + operation to be undone. */ + +#if 1 + w = alloc_word_desc (); + w->word = savestring (rl_line_buffer); + w->flags = rl_explicit_arg ? (W_NOPROCSUB|W_NOCOMSUB) : 0; + expanded_string = expand_word (w, rl_explicit_arg ? Q_HERE_DOCUMENT : 0); + dispose_word (w); +#else + new_line = savestring (rl_line_buffer); + expanded_string = expand_string (new_line, 0); + FREE (new_line); +#endif + + if (expanded_string == 0) + { + new_line = (char *)xmalloc (1); + new_line[0] = '\0'; + } + else + { + new_line = string_list (expanded_string); + dispose_words (expanded_string); + } + + maybe_make_readline_line (new_line); + free (new_line); + + /* Place rl_point where we think it should go. */ + if (at_end) + rl_point = rl_end; + else if (old_point < rl_end) + { + rl_point = old_point; + if (!whitespace (rl_line_buffer[rl_point])) + rl_forward_word (1, 0); + } + return 0; + } + else + { + cleanup_expansion_error (); + return 1; + } +} + +/* If FIGNORE is set, then don't match files with the given suffixes when + completing filenames. If only one of the possibilities has an acceptable + suffix, delete the others, else just return and let the completer + signal an error. It is called by the completer when real + completions are done on filenames by the completer's internal + function, not for completion lists (M-?) and not on "other" + completion types, such as hostnames or commands. */ + +static struct ignorevar fignore = +{ + "FIGNORE", + (struct ign *)0, + 0, + (char *)0, + (sh_iv_item_func_t *) 0, +}; + +static void +_ignore_completion_names (names, name_func) + char **names; + sh_ignore_func_t *name_func; +{ + char **newnames; + int idx, nidx; + char **oldnames; + int oidx; + + /* If there is only one completion, see if it is acceptable. If it is + not, free it up. In any case, short-circuit and return. This is a + special case because names[0] is not the prefix of the list of names + if there is only one completion; it is the completion itself. */ + if (names[1] == (char *)0) + { + if (force_fignore) + if ((*name_func) (names[0]) == 0) + { + free (names[0]); + names[0] = (char *)NULL; + } + + return; + } + + /* Allocate space for array to hold list of pointers to matching + filenames. The pointers are copied back to NAMES when done. */ + for (nidx = 1; names[nidx]; nidx++) + ; + newnames = strvec_create (nidx + 1); + + if (force_fignore == 0) + { + oldnames = strvec_create (nidx - 1); + oidx = 0; + } + + newnames[0] = names[0]; + for (idx = nidx = 1; names[idx]; idx++) + { + if ((*name_func) (names[idx])) + newnames[nidx++] = names[idx]; + else if (force_fignore == 0) + oldnames[oidx++] = names[idx]; + else + free (names[idx]); + } + + newnames[nidx] = (char *)NULL; + + /* If none are acceptable then let the completer handle it. */ + if (nidx == 1) + { + if (force_fignore) + { + free (names[0]); + names[0] = (char *)NULL; + } + else + free (oldnames); + + free (newnames); + return; + } + + if (force_fignore == 0) + { + while (oidx) + free (oldnames[--oidx]); + free (oldnames); + } + + /* If only one is acceptable, copy it to names[0] and return. */ + if (nidx == 2) + { + free (names[0]); + names[0] = newnames[1]; + names[1] = (char *)NULL; + free (newnames); + return; + } + + /* Copy the acceptable names back to NAMES, set the new array end, + and return. */ + for (nidx = 1; newnames[nidx]; nidx++) + names[nidx] = newnames[nidx]; + names[nidx] = (char *)NULL; + free (newnames); +} + +static int +name_is_acceptable (name) + const char *name; +{ + struct ign *p; + int nlen; + + for (nlen = strlen (name), p = fignore.ignores; p->val; p++) + { + if (nlen > p->len && p->len > 0 && STREQ (p->val, &name[nlen - p->len])) + return (0); + } + + return (1); +} + +#if 0 +static int +ignore_dot_names (name) + char *name; +{ + return (name[0] != '.'); +} +#endif + +static int +filename_completion_ignore (names) + char **names; +{ +#if 0 + if (glob_dot_filenames == 0) + _ignore_completion_names (names, ignore_dot_names); +#endif + + setup_ignore_patterns (&fignore); + + if (fignore.num_ignores == 0) + return 0; + + _ignore_completion_names (names, name_is_acceptable); + + return 0; +} + +/* Return 1 if NAME is a directory. NAME undergoes tilde expansion. */ +static int +test_for_directory (name) + const char *name; +{ + char *fn; + int r; + + fn = bash_tilde_expand (name, 0); + r = file_isdir (fn); + free (fn); + + return (r); +} + +static int +test_for_canon_directory (name) + const char *name; +{ + char *fn; + int r; + + fn = (*name == '~') ? bash_tilde_expand (name, 0) : savestring (name); + bash_filename_stat_hook (&fn); + r = file_isdir (fn); + free (fn); + + return (r); +} + +/* Remove files from NAMES, leaving directories. */ +static int +bash_ignore_filenames (names) + char **names; +{ + _ignore_completion_names (names, test_for_directory); + return 0; +} + +static int +bash_progcomp_ignore_filenames (names) + char **names; +{ + _ignore_completion_names (names, test_for_canon_directory); + return 0; +} + +static int +return_zero (name) + const char *name; +{ + return 0; +} + +static int +bash_ignore_everything (names) + char **names; +{ + _ignore_completion_names (names, return_zero); + return 0; +} + +/* Replace a tilde-prefix in VAL with a `~', assuming the user typed it. VAL + is an expanded filename. DIRECTORY_PART is the tilde-prefix portion + of the un-tilde-expanded version of VAL (what the user typed). */ +static char * +restore_tilde (val, directory_part) + char *val, *directory_part; +{ + int l, vl, dl2, xl; + char *dh2, *expdir, *ret, *v; + + vl = strlen (val); + + /* We need to duplicate the expansions readline performs on the directory + portion before passing it to our completion function. */ + dh2 = directory_part ? bash_dequote_filename (directory_part, 0) : 0; + bash_directory_expansion (&dh2); + dl2 = strlen (dh2); + + expdir = bash_tilde_expand (directory_part, 0); + xl = strlen (expdir); + if (*directory_part == '~' && STREQ (directory_part, expdir)) + { + /* tilde expansion failed, so what should we return? we use what the + user typed. */ + v = mbschr (val, '/'); + vl = STRLEN (v); + ret = (char *)xmalloc (xl + vl + 2); + strcpy (ret, directory_part); + if (v && *v) + strcpy (ret + xl, v); + + free (dh2); + free (expdir); + + return ret; + } + free (expdir); + + /* + dh2 = unexpanded but dequoted tilde-prefix + dl2 = length of tilde-prefix + expdir = tilde-expanded tilde-prefix + xl = length of expanded tilde-prefix + l = length of remainder after tilde-prefix + */ + l = (vl - xl) + 1; + if (l <= 0) + { + free (dh2); + return (savestring (val)); /* XXX - just punt */ + } + + ret = (char *)xmalloc (dl2 + 2 + l); + strcpy (ret, dh2); + strcpy (ret + dl2, val + xl); + + free (dh2); + return (ret); +} + +static char * +maybe_restore_tilde (val, directory_part) + char *val, *directory_part; +{ + rl_icppfunc_t *save; + char *ret; + + save = (dircomplete_expand == 0) ? save_directory_hook () : (rl_icppfunc_t *)0; + ret = restore_tilde (val, directory_part); + if (save) + restore_directory_hook (save); + return ret; +} + +/* Simulate the expansions that will be performed by + rl_filename_completion_function. This must be called with the address of + a pointer to malloc'd memory. */ +static void +bash_directory_expansion (dirname) + char **dirname; +{ + char *d, *nd; + + d = savestring (*dirname); + + if ((rl_directory_rewrite_hook) && (*rl_directory_rewrite_hook) (&d)) + { + free (*dirname); + *dirname = d; + } + else if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d)) + { + free (*dirname); + *dirname = d; + } + else if (rl_completion_found_quote) + { + nd = bash_dequote_filename (d, rl_completion_quote_character); + free (*dirname); + free (d); + *dirname = nd; + } +} + +/* If necessary, rewrite directory entry */ +static char * +bash_filename_rewrite_hook (fname, fnlen) + char *fname; + int fnlen; +{ + char *conv; + + conv = fnx_fromfs (fname, fnlen); + if (conv != fname) + conv = savestring (conv); + return conv; +} + +/* Functions to save and restore the appropriate directory hook */ +/* This is not static so the shopt code can call it */ +void +set_directory_hook () +{ + if (dircomplete_expand) + { + rl_directory_completion_hook = bash_directory_completion_hook; + rl_directory_rewrite_hook = (rl_icppfunc_t *)0; + } + else + { + rl_directory_rewrite_hook = bash_directory_completion_hook; + rl_directory_completion_hook = (rl_icppfunc_t *)0; + } +} + +static rl_icppfunc_t * +save_directory_hook () +{ + rl_icppfunc_t *ret; + + if (dircomplete_expand) + { + ret = rl_directory_completion_hook; + rl_directory_completion_hook = (rl_icppfunc_t *)NULL; + } + else + { + ret = rl_directory_rewrite_hook; + rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; + } + + return ret; +} + +static void +restore_directory_hook (hookf) + rl_icppfunc_t *hookf; +{ + if (dircomplete_expand) + rl_directory_completion_hook = hookf; + else + rl_directory_rewrite_hook = hookf; +} + +/* Check whether not DIRNAME, with any trailing slash removed, exists. If + SHOULD_DEQUOTE is non-zero, we dequote the directory name first. */ +static int +directory_exists (dirname, should_dequote) + const char *dirname; + int should_dequote; +{ + char *new_dirname; + int dirlen, r; + struct stat sb; + + /* We save the string and chop the trailing slash because stat/lstat behave + inconsistently if one is present. */ + new_dirname = should_dequote ? bash_dequote_filename ((char *)dirname, rl_completion_quote_character) : savestring (dirname); + dirlen = STRLEN (new_dirname); + if (new_dirname[dirlen - 1] == '/') + new_dirname[dirlen - 1] = '\0'; +#if defined (HAVE_LSTAT) + r = lstat (new_dirname, &sb) == 0; +#else + r = stat (new_dirname, &sb) == 0; +#endif + free (new_dirname); + return (r); +} + +/* Expand a filename before the readline completion code passes it to stat(2). + The filename will already have had tilde expansion performed. */ +static int +bash_filename_stat_hook (dirname) + char **dirname; +{ + char *local_dirname, *new_dirname, *t; + int should_expand_dirname, return_value; + int global_nounset; + WORD_LIST *wl; + + local_dirname = *dirname; + should_expand_dirname = return_value = 0; + if (t = mbschr (local_dirname, '$')) + should_expand_dirname = '$'; + else if (t = mbschr (local_dirname, '`')) /* XXX */ + should_expand_dirname = '`'; + + if (should_expand_dirname && directory_exists (local_dirname, 0)) + should_expand_dirname = 0; + + if (should_expand_dirname) + { + new_dirname = savestring (local_dirname); + /* no error messages, and expand_prompt_string doesn't longjmp so we don't + have to worry about restoring this setting. */ + global_nounset = unbound_vars_is_error; + unbound_vars_is_error = 0; + wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_NOPROCSUB|W_COMPLETE); /* does the right thing */ + unbound_vars_is_error = global_nounset; + if (wl) + { + free (new_dirname); + new_dirname = string_list (wl); + /* Tell the completer we actually expanded something and change + *dirname only if we expanded to something non-null -- stat + behaves unpredictably when passed null or empty strings */ + if (new_dirname && *new_dirname) + { + free (local_dirname); /* XXX */ + local_dirname = *dirname = new_dirname; + return_value = STREQ (local_dirname, *dirname) == 0; + } + else + free (new_dirname); + dispose_words (wl); + } + else + free (new_dirname); + } + + /* This is very similar to the code in bash_directory_completion_hook below, + but without spelling correction and not worrying about whether or not + we change relative pathnames. */ + if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1])) + { + char *temp1, *temp2; + + t = get_working_directory ("symlink-hook"); + temp1 = make_absolute (local_dirname, t); + free (t); + temp2 = sh_canonpath (temp1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + + /* If we can't canonicalize, bail. */ + if (temp2 == 0) + { + free (temp1); + return return_value; + } + + free (local_dirname); + *dirname = temp2; + free (temp1); + } + + return (return_value); +} + +/* Handle symbolic link references and other directory name + expansions while hacking completion. This should return 1 if it modifies + the DIRNAME argument, 0 otherwise. It should make sure not to modify + DIRNAME if it returns 0. */ +static int +bash_directory_completion_hook (dirname) + char **dirname; +{ + char *local_dirname, *new_dirname, *t; + int return_value, should_expand_dirname, nextch, closer; + WORD_LIST *wl; + + return_value = should_expand_dirname = nextch = closer = 0; + local_dirname = *dirname; + + if (t = mbschr (local_dirname, '$')) + { + should_expand_dirname = '$'; + nextch = t[1]; + /* Deliberately does not handle the deprecated $[...] arithmetic + expansion syntax */ + if (nextch == '(') + closer = ')'; + else if (nextch == '{') + closer = '}'; + else + nextch = 0; + + if (closer) + { + int p; + char delims[2]; + + delims[0] = closer; delims[1] = 0; + p = skip_to_delim (t, 1, delims, SD_NOJMP|SD_COMPLETE); + if (t[p] != closer) + should_expand_dirname = 0; + } + } + else if (local_dirname[0] == '~') + should_expand_dirname = '~'; + else + { + t = mbschr (local_dirname, '`'); + if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0) + should_expand_dirname = '`'; + } + + if (should_expand_dirname && directory_exists (local_dirname, 1)) + should_expand_dirname = 0; + + if (should_expand_dirname) + { + new_dirname = savestring (local_dirname); + wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_NOPROCSUB|W_COMPLETE); /* does the right thing */ + if (wl) + { + *dirname = string_list (wl); + /* Tell the completer to replace the directory name only if we + actually expanded something. */ + return_value = STREQ (local_dirname, *dirname) == 0; + free (local_dirname); + free (new_dirname); + dispose_words (wl); + local_dirname = *dirname; + /* XXX - change rl_filename_quote_characters here based on + should_expand_dirname/nextch/closer. This is the only place + custom_filename_quote_characters is modified. */ + if (rl_filename_quote_characters && *rl_filename_quote_characters) + { + int i, j, c; + i = strlen (default_filename_quote_characters); + custom_filename_quote_characters = xrealloc (custom_filename_quote_characters, i+1); + for (i = j = 0; c = default_filename_quote_characters[i]; i++) + { + if (c == should_expand_dirname || c == nextch || c == closer) + continue; + custom_filename_quote_characters[j++] = c; + } + custom_filename_quote_characters[j] = '\0'; + rl_filename_quote_characters = custom_filename_quote_characters; + set_filename_bstab (rl_filename_quote_characters); + } + } + else + { + free (new_dirname); + free (local_dirname); + *dirname = (char *)xmalloc (1); + **dirname = '\0'; + return 1; + } + } + else + { + /* Dequote the filename even if we don't expand it. */ + new_dirname = bash_dequote_filename (local_dirname, rl_completion_quote_character); + return_value = STREQ (local_dirname, new_dirname) == 0; + free (local_dirname); + local_dirname = *dirname = new_dirname; + } + + /* no_symbolic_links == 0 -> use (default) logical view of the file system. + local_dirname[0] == '.' && local_dirname[1] == '/' means files in the + current directory (./). + local_dirname[0] == '.' && local_dirname[1] == 0 means relative pathnames + in the current directory (e.g., lib/sh). + XXX - should we do spelling correction on these? */ + + /* This is test as it was in bash-4.2: skip relative pathnames in current + directory. Change test to + (local_dirname[0] != '.' || (local_dirname[1] && local_dirname[1] != '/')) + if we want to skip paths beginning with ./ also. */ + if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1])) + { + char *temp1, *temp2; + int len1, len2; + + /* If we have a relative path + (local_dirname[0] != '/' && local_dirname[0] != '.') + that is canonical after appending it to the current directory, then + temp1 = temp2+'/' + That is, + strcmp (temp1, temp2) == 0 + after adding a slash to temp2 below. It should be safe to not + change those. + */ + t = get_working_directory ("symlink-hook"); + temp1 = make_absolute (local_dirname, t); + free (t); + temp2 = sh_canonpath (temp1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + + /* Try spelling correction if initial canonicalization fails. Make + sure we are set to replace the directory name with the results so + subsequent directory checks don't fail. */ + if (temp2 == 0 && dircomplete_spelling && dircomplete_expand) + { + temp2 = dirspell (temp1); + if (temp2) + { + free (temp1); + temp1 = temp2; + temp2 = sh_canonpath (temp1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + return_value |= temp2 != 0; + } + } + /* If we can't canonicalize, bail. */ + if (temp2 == 0) + { + free (temp1); + return return_value; + } + len1 = strlen (temp1); + if (temp1[len1 - 1] == '/') + { + len2 = strlen (temp2); + if (len2 > 2) /* don't append `/' to `/' or `//' */ + { + temp2 = (char *)xrealloc (temp2, len2 + 2); + temp2[len2] = '/'; + temp2[len2 + 1] = '\0'; + } + } + + /* dircomplete_expand_relpath == 0 means we want to leave relative + pathnames that are unchanged by canonicalization alone. + *local_dirname != '/' && *local_dirname != '.' == relative pathname + (consistent with general.c:absolute_pathname()) + temp1 == temp2 (after appending a slash to temp2) means the pathname + is not changed by canonicalization as described above. */ + if (dircomplete_expand_relpath || ((local_dirname[0] != '/' && local_dirname[0] != '.') && STREQ (temp1, temp2) == 0)) + return_value |= STREQ (local_dirname, temp2) == 0; + free (local_dirname); + *dirname = temp2; + free (temp1); + } + + return (return_value); +} + +static char **history_completion_array = (char **)NULL; +static int harry_size; +static int harry_len; + +static void +build_history_completion_array () +{ + register int i, j; + HIST_ENTRY **hlist; + char **tokens; + + /* First, clear out the current dynamic history completion list. */ + if (harry_size) + { + strvec_dispose (history_completion_array); + history_completion_array = (char **)NULL; + harry_size = 0; + harry_len = 0; + } + + /* Next, grovel each line of history, making each shell-sized token + a separate entry in the history_completion_array. */ + hlist = history_list (); + + if (hlist) + { + for (i = 0; hlist[i]; i++) + ; + for ( --i; i >= 0; i--) + { + /* Separate each token, and place into an array. */ + tokens = history_tokenize (hlist[i]->line); + + for (j = 0; tokens && tokens[j]; j++) + { + if (harry_len + 2 > harry_size) + history_completion_array = strvec_resize (history_completion_array, harry_size += 10); + + history_completion_array[harry_len++] = tokens[j]; + history_completion_array[harry_len] = (char *)NULL; + } + free (tokens); + } + + /* Sort the complete list of tokens. */ + if (dabbrev_expand_active == 0) + qsort (history_completion_array, harry_len, sizeof (char *), (QSFUNC *)strvec_strcmp); + } +} + +static char * +history_completion_generator (hint_text, state) + const char *hint_text; + int state; +{ + static int local_index, len; + static const char *text; + + /* If this is the first call to the generator, then initialize the + list of strings to complete over. */ + if (state == 0) + { + if (dabbrev_expand_active) /* This is kind of messy */ + rl_completion_suppress_append = 1; + local_index = 0; + build_history_completion_array (); + text = hint_text; + len = strlen (text); + } + + while (history_completion_array && history_completion_array[local_index]) + { + /* XXX - should this use completion-ignore-case? */ + if (strncmp (text, history_completion_array[local_index++], len) == 0) + return (savestring (history_completion_array[local_index - 1])); + } + return ((char *)NULL); +} + +static int +dynamic_complete_history (count, key) + int count, key; +{ + int r; + rl_compentry_func_t *orig_func; + rl_completion_func_t *orig_attempt_func; + rl_compignore_func_t *orig_ignore_func; + + orig_func = rl_completion_entry_function; + orig_attempt_func = rl_attempted_completion_function; + orig_ignore_func = rl_ignore_some_completions_function; + + rl_completion_entry_function = history_completion_generator; + rl_attempted_completion_function = (rl_completion_func_t *)NULL; + rl_ignore_some_completions_function = filename_completion_ignore; + + /* XXX - use rl_completion_mode here? */ + if (rl_last_func == dynamic_complete_history) + r = rl_complete_internal ('?'); + else + r = rl_complete_internal (TAB); + + rl_completion_entry_function = orig_func; + rl_attempted_completion_function = orig_attempt_func; + rl_ignore_some_completions_function = orig_ignore_func; + + return r; +} + +static int +bash_dabbrev_expand (count, key) + int count, key; +{ + int r, orig_suppress, orig_sort; + rl_compentry_func_t *orig_func; + rl_completion_func_t *orig_attempt_func; + rl_compignore_func_t *orig_ignore_func; + + orig_func = rl_menu_completion_entry_function; + orig_attempt_func = rl_attempted_completion_function; + orig_ignore_func = rl_ignore_some_completions_function; + orig_suppress = rl_completion_suppress_append; + orig_sort = rl_sort_completion_matches; + + rl_menu_completion_entry_function = history_completion_generator; + rl_attempted_completion_function = (rl_completion_func_t *)NULL; + rl_ignore_some_completions_function = filename_completion_ignore; + rl_filename_completion_desired = 0; + rl_completion_suppress_append = 1; + rl_sort_completion_matches = 0; + + /* XXX - use rl_completion_mode here? */ + dabbrev_expand_active = 1; + if (rl_last_func == bash_dabbrev_expand) + rl_last_func = rl_menu_complete; + r = rl_menu_complete (count, key); + dabbrev_expand_active = 0; + + rl_last_func = bash_dabbrev_expand; + rl_menu_completion_entry_function = orig_func; + rl_attempted_completion_function = orig_attempt_func; + rl_ignore_some_completions_function = orig_ignore_func; + rl_completion_suppress_append = orig_suppress; + rl_sort_completion_matches = orig_sort; + + return r; +} + +#if defined (SPECIFIC_COMPLETION_FUNCTIONS) +static int +bash_complete_username (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_username_internal (rl_completion_mode (bash_complete_username)); +} + +static int +bash_possible_username_completions (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_username_internal ('?'); +} + +static int +bash_complete_username_internal (what_to_do) + int what_to_do; +{ + return bash_specific_completion (what_to_do, rl_username_completion_function); +} + +static int +bash_complete_filename (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_filename_internal (rl_completion_mode (bash_complete_filename)); +} + +static int +bash_possible_filename_completions (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_filename_internal ('?'); +} + +static int +bash_complete_filename_internal (what_to_do) + int what_to_do; +{ + rl_compentry_func_t *orig_func; + rl_completion_func_t *orig_attempt_func; + rl_icppfunc_t *orig_dir_func; + rl_compignore_func_t *orig_ignore_func; + /*const*/ char *orig_rl_completer_word_break_characters; + int r; + + orig_func = rl_completion_entry_function; + orig_attempt_func = rl_attempted_completion_function; + orig_ignore_func = rl_ignore_some_completions_function; + orig_rl_completer_word_break_characters = rl_completer_word_break_characters; + + orig_dir_func = save_directory_hook (); + + rl_completion_entry_function = rl_filename_completion_function; + rl_attempted_completion_function = (rl_completion_func_t *)NULL; + rl_ignore_some_completions_function = filename_completion_ignore; + rl_completer_word_break_characters = " \t\n\"\'"; + + r = rl_complete_internal (what_to_do); + + rl_completion_entry_function = orig_func; + rl_attempted_completion_function = orig_attempt_func; + rl_ignore_some_completions_function = orig_ignore_func; + rl_completer_word_break_characters = orig_rl_completer_word_break_characters; + + restore_directory_hook (orig_dir_func); + + return r; +} + +static int +bash_complete_hostname (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_hostname_internal (rl_completion_mode (bash_complete_hostname)); +} + +static int +bash_possible_hostname_completions (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_hostname_internal ('?'); +} + +static int +bash_complete_variable (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_variable_internal (rl_completion_mode (bash_complete_variable)); +} + +static int +bash_possible_variable_completions (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_variable_internal ('?'); +} + +static int +bash_complete_command (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_command_internal (rl_completion_mode (bash_complete_command)); +} + +static int +bash_possible_command_completions (ignore, ignore2) + int ignore, ignore2; +{ + return bash_complete_command_internal ('?'); +} + +static int +bash_complete_hostname_internal (what_to_do) + int what_to_do; +{ + return bash_specific_completion (what_to_do, hostname_completion_function); +} + +static int +bash_complete_variable_internal (what_to_do) + int what_to_do; +{ + return bash_specific_completion (what_to_do, variable_completion_function); +} + +static int +bash_complete_command_internal (what_to_do) + int what_to_do; +{ + return bash_specific_completion (what_to_do, command_word_completion_function); +} + +static int +completion_glob_pattern (string) + char *string; +{ + return (glob_pattern_p (string) == 1); +} + +static char *globtext; +static char *globorig; + +static char * +glob_complete_word (text, state) + const char *text; + int state; +{ + static char **matches = (char **)NULL; + static int ind; + int glen; + char *ret, *ttext; + + if (state == 0) + { + rl_filename_completion_desired = 1; + FREE (matches); + if (globorig != globtext) + FREE (globorig); + FREE (globtext); + + ttext = bash_tilde_expand (text, 0); + + if (rl_explicit_arg) + { + globorig = savestring (ttext); + glen = strlen (ttext); + globtext = (char *)xmalloc (glen + 2); + strcpy (globtext, ttext); + globtext[glen] = '*'; + globtext[glen+1] = '\0'; + } + else + globtext = globorig = savestring (ttext); + + if (ttext != text) + free (ttext); + + matches = shell_glob_filename (globtext, 0); + if (GLOB_FAILED (matches)) + matches = (char **)NULL; + ind = 0; + } + + ret = matches ? matches[ind] : (char *)NULL; + ind++; + return ret; +} + +static int +bash_glob_completion_internal (what_to_do) + int what_to_do; +{ + return bash_specific_completion (what_to_do, glob_complete_word); +} + +/* A special quoting function so we don't end up quoting globbing characters + in the word if there are no matches or multiple matches. */ +static char * +bash_glob_quote_filename (s, rtype, qcp) + char *s; + int rtype; + char *qcp; +{ + if (globorig && qcp && *qcp == '\0' && STREQ (s, globorig)) + return (savestring (s)); + else + return (bash_quote_filename (s, rtype, qcp)); +} + +static int +bash_glob_complete_word (count, key) + int count, key; +{ + int r; + rl_quote_func_t *orig_quoting_function; + + if (rl_editing_mode == EMACS_EDITING_MODE) + rl_explicit_arg = 1; /* force `*' append */ + orig_quoting_function = rl_filename_quoting_function; + rl_filename_quoting_function = bash_glob_quote_filename; + + r = bash_glob_completion_internal (rl_completion_mode (bash_glob_complete_word)); + + rl_filename_quoting_function = orig_quoting_function; + return r; +} + +static int +bash_glob_expand_word (count, key) + int count, key; +{ + return bash_glob_completion_internal ('*'); +} + +static int +bash_glob_list_expansions (count, key) + int count, key; +{ + return bash_glob_completion_internal ('?'); +} + +static int +bash_specific_completion (what_to_do, generator) + int what_to_do; + rl_compentry_func_t *generator; +{ + rl_compentry_func_t *orig_func; + rl_completion_func_t *orig_attempt_func; + rl_compignore_func_t *orig_ignore_func; + int r; + + orig_func = rl_completion_entry_function; + orig_attempt_func = rl_attempted_completion_function; + orig_ignore_func = rl_ignore_some_completions_function; + rl_completion_entry_function = generator; + rl_attempted_completion_function = NULL; + rl_ignore_some_completions_function = orig_ignore_func; + + r = rl_complete_internal (what_to_do); + + rl_completion_entry_function = orig_func; + rl_attempted_completion_function = orig_attempt_func; + rl_ignore_some_completions_function = orig_ignore_func; + + return r; +} + +#endif /* SPECIFIC_COMPLETION_FUNCTIONS */ + +#if defined (VI_MODE) +/* Completion, from vi mode's point of view. This is a modified version of + rl_vi_complete which uses the bash globbing code to implement what POSIX + specifies, which is to append a `*' and attempt filename generation (which + has the side effect of expanding any globbing characters in the word). */ +static int +bash_vi_complete (count, key) + int count, key; +{ +#if defined (SPECIFIC_COMPLETION_FUNCTIONS) + int p, r; + char *t; + + if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point]))) + { + if (!whitespace (rl_line_buffer[rl_point + 1])) + rl_vi_end_word (1, 'E'); + rl_point++; + } + + /* Find boundaries of current word, according to vi definition of a + `bigword'. */ + t = 0; + if (rl_point > 0) + { + p = rl_point; + rl_vi_bWord (1, 'B'); + r = rl_point; + rl_point = p; + p = r; + + t = substring (rl_line_buffer, p, rl_point); + } + + if (t && completion_glob_pattern (t) == 0) + rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' */ + FREE (t); + + if (key == '*') /* Expansion and replacement. */ + r = bash_glob_expand_word (count, key); + else if (key == '=') /* List possible completions. */ + r = bash_glob_list_expansions (count, key); + else if (key == '\\') /* Standard completion */ + r = bash_glob_complete_word (count, key); + else + r = rl_complete (0, key); + + if (key == '*' || key == '\\') + rl_vi_start_inserting (key, 1, 1); + + return (r); +#else + return rl_vi_complete (count, key); +#endif /* !SPECIFIC_COMPLETION_FUNCTIONS */ +} +#endif /* VI_MODE */ + +/* Filename quoting for completion. */ +/* A function to strip unquoted quote characters (single quotes, double + quotes, and backslashes). It allows single quotes to appear + within double quotes, and vice versa. It should be smarter. */ +static char * +bash_dequote_filename (text, quote_char) + char *text; + int quote_char; +{ + char *ret, *p, *r; + int l, quoted; + + l = strlen (text); + ret = (char *)xmalloc (l + 1); + for (quoted = quote_char, p = text, r = ret; p && *p; p++) + { + /* Allow backslash-escaped characters to pass through unscathed. */ + if (*p == '\\') + { + /* Backslashes are preserved within single quotes. */ + if (quoted == '\'') + *r++ = *p; + /* Backslashes are preserved within double quotes unless the + character is one that is defined to be escaped */ + else if (quoted == '"' && ((sh_syntaxtab[(unsigned char)p[1]] & CBSDQUOTE) == 0)) + *r++ = *p; + + *r++ = *++p; + if (*p == '\0') + return ret; /* XXX - was break; */ + continue; + } + /* Close quote. */ + if (quoted && *p == quoted) + { + quoted = 0; + continue; + } + /* Open quote. */ + if (quoted == 0 && (*p == '\'' || *p == '"')) + { + quoted = *p; + continue; + } + *r++ = *p; + } + *r = '\0'; + return ret; +} + +/* Quote characters that the readline completion code would treat as + word break characters with backslashes. Pass backslash-quoted + characters through without examination. */ +static char * +quote_word_break_chars (text) + char *text; +{ + char *ret, *r, *s; + int l; + + l = strlen (text); + ret = (char *)xmalloc ((2 * l) + 1); + for (s = text, r = ret; *s; s++) + { + /* Pass backslash-quoted characters through, including the backslash. */ + if (*s == '\\') + { + *r++ = '\\'; + *r++ = *++s; + if (*s == '\0') + break; + continue; + } + /* OK, we have an unquoted character. Check its presence in + rl_completer_word_break_characters. */ + if (mbschr (rl_completer_word_break_characters, *s)) + *r++ = '\\'; + /* XXX -- check for standalone tildes here and backslash-quote them */ + if (s == text && *s == '~' && file_exists (text)) + *r++ = '\\'; + *r++ = *s; + } + *r = '\0'; + return ret; +} + +/* Use characters in STRING to populate the table of characters that should + be backslash-quoted. The table will be used for sh_backslash_quote from + this file. */ +static void +set_filename_bstab (string) + const char *string; +{ + const char *s; + + memset (filename_bstab, 0, sizeof (filename_bstab)); + for (s = string; s && *s; s++) + filename_bstab[(unsigned char)*s] = 1; +} + +/* Quote a filename using double quotes, single quotes, or backslashes + depending on the value of completion_quoting_style. If we're + completing using backslashes, we need to quote some additional + characters (those that readline treats as word breaks), so we call + quote_word_break_chars on the result. This returns newly-allocated + memory. */ +static char * +bash_quote_filename (s, rtype, qcp) + char *s; + int rtype; + char *qcp; +{ + char *rtext, *mtext, *ret; + int rlen, cs; + + rtext = (char *)NULL; + + /* If RTYPE == MULT_MATCH, it means that there is + more than one match. In this case, we do not add + the closing quote or attempt to perform tilde + expansion. If RTYPE == SINGLE_MATCH, we try + to perform tilde expansion, because single and double + quotes inhibit tilde expansion by the shell. */ + + cs = completion_quoting_style; + /* Might need to modify the default completion style based on *qcp, + since it's set to any user-provided opening quote. We also change + to single-quoting if there is no user-provided opening quote and + the word being completed contains newlines, since those are not + quoted correctly using backslashes (a backslash-newline pair is + special to the shell parser). */ + if (*qcp == '\0' && cs == COMPLETE_BSQUOTE && mbschr (s, '\n')) + cs = COMPLETE_SQUOTE; + else if (*qcp == '"') + cs = COMPLETE_DQUOTE; + else if (*qcp == '\'') + cs = COMPLETE_SQUOTE; +#if defined (BANG_HISTORY) + else if (*qcp == '\0' && history_expansion && cs == COMPLETE_DQUOTE && + history_expansion_inhibited == 0 && mbschr (s, '!')) + cs = COMPLETE_BSQUOTE; + + if (*qcp == '"' && history_expansion && cs == COMPLETE_DQUOTE && + history_expansion_inhibited == 0 && mbschr (s, '!')) + { + cs = COMPLETE_BSQUOTE; + *qcp = '\0'; + } +#endif + + /* Don't tilde-expand backslash-quoted filenames, since only single and + double quotes inhibit tilde expansion. */ + mtext = s; + if (mtext[0] == '~' && rtype == SINGLE_MATCH && cs != COMPLETE_BSQUOTE) + mtext = bash_tilde_expand (s, 0); + + switch (cs) + { + case COMPLETE_DQUOTE: + rtext = sh_double_quote (mtext); + break; + case COMPLETE_SQUOTE: + rtext = sh_single_quote (mtext); + break; + case COMPLETE_BSQUOTE: + rtext = sh_backslash_quote (mtext, complete_fullquote ? 0 : filename_bstab, 0); + break; + } + + if (mtext != s) + free (mtext); + + /* We may need to quote additional characters: those that readline treats + as word breaks that are not quoted by backslash_quote. */ + if (rtext && cs == COMPLETE_BSQUOTE) + { + mtext = quote_word_break_chars (rtext); + free (rtext); + rtext = mtext; + } + + /* Leave the opening quote intact. The readline completion code takes + care of avoiding doubled opening quotes. */ + if (rtext) + { + rlen = strlen (rtext); + ret = (char *)xmalloc (rlen + 1); + strcpy (ret, rtext); + } + else + { + ret = (char *)xmalloc (rlen = 1); + ret[0] = '\0'; + } + + /* If there are multiple matches, cut off the closing quote. */ + if (rtype == MULT_MATCH && cs != COMPLETE_BSQUOTE) + ret[rlen - 1] = '\0'; + free (rtext); + return ret; +} + +/* Support for binding readline key sequences to Unix commands. Each editing + mode has a separate Unix command keymap. */ + +static Keymap emacs_std_cmd_xmap; +#if defined (VI_MODE) +static Keymap vi_insert_cmd_xmap; +static Keymap vi_movement_cmd_xmap; +#endif + +#ifdef _MINIX +static void +#else +static int +#endif +putx(c) + int c; +{ + int x; + x = putc (c, rl_outstream); +#ifndef _MINIX + return x; +#endif +} + +static int +readline_get_char_offset (ind) + int ind; +{ + int r, old_ch; + + r = ind; +#if defined (HANDLE_MULTIBYTE) + if (locale_mb_cur_max > 1) + { + old_ch = rl_line_buffer[ind]; + rl_line_buffer[ind] = '\0'; + r = MB_STRLEN (rl_line_buffer); + rl_line_buffer[ind] = old_ch; + } +#endif + return r; +} + +static void +readline_set_char_offset (ind, varp) + int ind; + int *varp; +{ + int i; + + i = ind; + +#if defined (HANDLE_MULTIBYTE) + if (i > 0 && locale_mb_cur_max > 1) + i = _rl_find_next_mbchar (rl_line_buffer, 0, i, 0); /* XXX */ +#endif + if (i != *varp) + { + if (i > rl_end) + i = rl_end; + else if (i < 0) + i = 0; + *varp = i; + } +} + +int +bash_execute_unix_command (count, key) + int count; /* ignored */ + int key; +{ + int type; + register int i, r; + intmax_t mi; + sh_parser_state_t ps; + char *cmd, *value, *ce, old_ch; + SHELL_VAR *v; + char ibuf[INT_STRLEN_BOUND(int) + 1]; + Keymap cmd_xmap; + + /* First, we need to find the right command to execute. This is tricky, + because we might have already indirected into another keymap, so we + have to walk cmd_xmap using the entire key sequence. */ + cmd_xmap = get_cmd_xmap_from_keymap (rl_get_keymap ()); + cmd = (char *)rl_function_of_keyseq_len (rl_executing_keyseq, rl_key_sequence_length, cmd_xmap, &type); + + if (type == ISKMAP && (type = ((Keymap) cmd)[ANYOTHERKEY].type) == ISMACR) + cmd = (char*)((Keymap) cmd)[ANYOTHERKEY].function; + + if (cmd == 0 || type != ISMACR) + { + rl_crlf (); + internal_error (_("bash_execute_unix_command: cannot find keymap for command")); + rl_forced_update_display (); + return 1; + } + + ce = rl_get_termcap ("ce"); + if (ce) /* clear current line */ + { + rl_clear_visible_line (); + fflush (rl_outstream); + } + else + rl_crlf (); /* move to a new line */ + + v = bind_variable ("READLINE_LINE", rl_line_buffer, 0); + if (v) + VSETATTR (v, att_exported); + + i = readline_get_char_offset (rl_point); + value = inttostr (i, ibuf, sizeof (ibuf)); + v = bind_int_variable ("READLINE_POINT", value, 0); + if (v) + VSETATTR (v, att_exported); + + i = readline_get_char_offset (rl_mark); + value = inttostr (i, ibuf, sizeof (ibuf)); + v = bind_int_variable ("READLINE_MARK", value, 0); + if (v) + VSETATTR (v, att_exported); + array_needs_making = 1; + + save_parser_state (&ps); + rl_clear_signals (); + r = parse_and_execute (savestring (cmd), "bash_execute_unix_command", SEVAL_NOHIST); + rl_set_signals (); + restore_parser_state (&ps); + + v = find_variable ("READLINE_LINE"); + maybe_make_readline_line (v ? value_cell (v) : 0); + + v = find_variable ("READLINE_POINT"); + if (v && legal_number (value_cell (v), &mi)) + readline_set_char_offset (mi, &rl_point); + + v = find_variable ("READLINE_MARK"); + if (v && legal_number (value_cell (v), &mi)) + readline_set_char_offset (mi, &rl_mark); + + check_unbind_variable ("READLINE_LINE"); + check_unbind_variable ("READLINE_POINT"); + check_unbind_variable ("READLINE_MARK"); + array_needs_making = 1; + + /* and restore the readline buffer and display after command execution. */ + /* If we clear the last line of the prompt above, redraw only that last + line. If the command returns 124, we redraw unconditionally as in + previous versions. */ + if (ce && r != 124) + rl_redraw_prompt_last_line (); + else + rl_forced_update_display (); + + return 0; +} + +int +print_unix_command_map () +{ + Keymap save, cmd_xmap; + + save = rl_get_keymap (); + cmd_xmap = get_cmd_xmap_from_keymap (save); + rl_set_keymap (cmd_xmap); + rl_macro_dumper (1); + rl_set_keymap (save); + return 0; +} + +static void +init_unix_command_map () +{ + emacs_std_cmd_xmap = rl_make_bare_keymap (); + + emacs_std_cmd_xmap[CTRL('X')].type = ISKMAP; + emacs_std_cmd_xmap[CTRL('X')].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap ()); + emacs_std_cmd_xmap[ESC].type = ISKMAP; + emacs_std_cmd_xmap[ESC].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap ()); + +#if defined (VI_MODE) + vi_insert_cmd_xmap = rl_make_bare_keymap (); + vi_movement_cmd_xmap = rl_make_bare_keymap (); +#endif +} + +static Keymap +get_cmd_xmap_from_edit_mode () +{ + if (emacs_std_cmd_xmap == 0) + init_unix_command_map (); + + switch (rl_editing_mode) + { + case EMACS_EDITING_MODE: + return emacs_std_cmd_xmap; +#if defined (VI_MODE) + case VI_EDITING_MODE: + return (get_cmd_xmap_from_keymap (rl_get_keymap ())); +#endif + default: + return (Keymap)NULL; + } +} + +static Keymap +get_cmd_xmap_from_keymap (kmap) + Keymap kmap; +{ + if (emacs_std_cmd_xmap == 0) + init_unix_command_map (); + + if (kmap == emacs_standard_keymap) + return emacs_std_cmd_xmap; + else if (kmap == emacs_meta_keymap) + return (FUNCTION_TO_KEYMAP (emacs_std_cmd_xmap, ESC)); + else if (kmap == emacs_ctlx_keymap) + return (FUNCTION_TO_KEYMAP (emacs_std_cmd_xmap, CTRL('X'))); +#if defined (VI_MODE) + else if (kmap == vi_insertion_keymap) + return vi_insert_cmd_xmap; + else if (kmap == vi_movement_keymap) + return vi_movement_cmd_xmap; +#endif + else + return (Keymap)NULL; +} + +static int +isolate_sequence (string, ind, need_dquote, startp) + char *string; + int ind, need_dquote, *startp; +{ + register int i; + int c, passc, delim; + + for (i = ind; string[i] && whitespace (string[i]); i++) + ; + /* NEED_DQUOTE means that the first non-white character *must* be `"'. */ + if (need_dquote && string[i] != '"') + { + builtin_error (_("%s: first non-whitespace character is not `\"'"), string); + return -1; + } + + /* We can have delimited strings even if NEED_DQUOTE == 0, like the command + string to bind the key sequence to. */ + delim = (string[i] == '"' || string[i] == '\'') ? string[i] : 0; + + if (startp) + *startp = delim ? ++i : i; + + for (passc = 0; c = string[i]; i++) + { + if (passc) + { + passc = 0; + continue; + } + if (c == '\\') + { + passc++; + continue; + } + if (c == delim) + break; + } + + if (delim && string[i] != delim) + { + builtin_error (_("no closing `%c' in %s"), delim, string); + return -1; + } + + return i; +} + +int +bind_keyseq_to_unix_command (line) + char *line; +{ + Keymap kmap, cmd_xmap; + char *kseq, *value; + int i, kstart; + + kmap = rl_get_keymap (); + + /* We duplicate some of the work done by rl_parse_and_bind here, but + this code only has to handle `"keyseq": ["]command["]' and can + generate an error for anything else. */ + i = isolate_sequence (line, 0, 1, &kstart); + if (i < 0) + return -1; + + /* Create the key sequence string to pass to rl_generic_bind */ + kseq = substring (line, kstart, i); + + for ( ; line[i] && line[i] != ':'; i++) + ; + if (line[i] != ':') + { + builtin_error (_("%s: missing colon separator"), line); + FREE (kseq); + return -1; + } + + i = isolate_sequence (line, i + 1, 0, &kstart); + if (i < 0) + { + FREE (kseq); + return -1; + } + + /* Create the value string containing the command to execute. */ + value = substring (line, kstart, i); + + /* Save the command to execute and the key sequence in the CMD_XMAP */ + cmd_xmap = get_cmd_xmap_from_keymap (kmap); + rl_generic_bind (ISMACR, kseq, value, cmd_xmap); + + /* and bind the key sequence in the current keymap to a function that + understands how to execute from CMD_XMAP */ + rl_bind_keyseq_in_map (kseq, bash_execute_unix_command, kmap); + + free (kseq); + return 0; +} + +int +unbind_unix_command (kseq) + char *kseq; +{ + Keymap cmd_xmap; + + cmd_xmap = get_cmd_xmap_from_keymap (rl_get_keymap ()); + if (rl_bind_keyseq_in_map (kseq, (rl_command_func_t *)NULL, cmd_xmap) != 0) + { + builtin_error (_("`%s': cannot unbind in command keymap"), kseq); + return 0; + } + return 1; +} + +/* Used by the programmable completion code. Complete TEXT as a filename, + but return only directories as matches. Dequotes the filename before + attempting to find matches. */ +char ** +bash_directory_completion_matches (text) + const char *text; +{ + char **m1; + char *dfn; + int qc; + + qc = rl_dispatching ? rl_completion_quote_character : 0; + /* If rl_completion_found_quote != 0, rl_completion_matches will call the + filename dequoting function, causing the directory name to be dequoted + twice. */ + if (rl_dispatching && rl_completion_found_quote == 0) + dfn = bash_dequote_filename ((char *)text, qc); + else + dfn = (char *)text; + m1 = rl_completion_matches (dfn, rl_filename_completion_function); + if (dfn != text) + free (dfn); + + if (m1 == 0 || m1[0] == 0) + return m1; + /* We don't bother recomputing the lcd of the matches, because it will just + get thrown away by the programmable completion code and recomputed + later. */ + (void)bash_progcomp_ignore_filenames (m1); + return m1; +} + +char * +bash_dequote_text (text) + const char *text; +{ + char *dtxt; + int qc; + + qc = (text[0] == '"' || text[0] == '\'') ? text[0] : 0; + dtxt = bash_dequote_filename ((char *)text, qc); + return (dtxt); +} + +/* This event hook is designed to be called after readline receives a signal + that interrupts read(2). It gives reasonable responsiveness to interrupts + and fatal signals without executing too much code in a signal handler + context. */ +static int +bash_event_hook () +{ + int sig; + + /* XXX - see if we need to do anything here if sigterm_received == 1, + we probably don't want to reset the event hook since we will not be + jumping to the top level */ + if (sigterm_received) + { + /* RESET_SIGTERM; */ + return 0; + } + + sig = 0; + if (terminating_signal) + sig = terminating_signal; + else if (interrupt_state) + sig = SIGINT; + else if (sigalrm_seen) + sig = SIGALRM; + else + sig = first_pending_trap (); + + /* If we're going to longjmp to top_level, make sure we clean up readline. + check_signals will call QUIT, which will eventually longjmp to top_level, + calling run_interrupt_trap along the way. The check for sigalrm_seen is + to clean up the read builtin's state. */ + if (terminating_signal || interrupt_state || sigalrm_seen) + rl_cleanup_after_signal (); + bashline_reset_event_hook (); + + /* posix mode SIGINT during read -e. We only get here if SIGINT is trapped. */ + if (posixly_correct && this_shell_builtin == read_builtin && sig == 2) + { + last_command_exit_value = 128|SIGINT; + throw_to_top_level (); + } + + check_signals_and_traps (); /* XXX */ + return 0; +} + +#endif /* READLINE */ diff --git a/bash-5.1/bashline.h b/bash-5.1/bashline.h new file mode 100644 index 0000000000000000000000000000000000000000..48c9fecfb64bce51c202034673276c0937512cd8 --- /dev/null +++ b/bash-5.1/bashline.h @@ -0,0 +1,69 @@ +/* bashline.h -- interface to the bash readline functions in bashline.c. */ + +/* Copyright (C) 1993-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_BASHLINE_H_) +#define _BASHLINE_H_ + +#include "stdc.h" + +extern int bash_readline_initialized; +extern int hostname_list_initialized; + +/* these are controlled via shopt */ +extern int perform_hostname_completion; +extern int no_empty_command_completion; +extern int force_fignore; +extern int dircomplete_spelling; +extern int dircomplete_expand; +extern int dircomplete_expand_relpath; +extern int complete_fullquote; + +extern void posix_readline_initialize PARAMS((int)); +extern void reset_completer_word_break_chars PARAMS((void)); +extern int enable_hostname_completion PARAMS((int)); +extern void initialize_readline PARAMS((void)); +extern void bashline_reset PARAMS((void)); +extern void bashline_reinitialize PARAMS((void)); +extern int bash_re_edit PARAMS((char *)); + +extern void bashline_set_event_hook PARAMS((void)); +extern void bashline_reset_event_hook PARAMS((void)); + +extern int bind_keyseq_to_unix_command PARAMS((char *)); +extern int bash_execute_unix_command PARAMS((int, int)); +extern int print_unix_command_map PARAMS((void)); +extern int unbind_unix_command PARAMS((char *)); + +extern char **bash_default_completion PARAMS((const char *, int, int, int, int)); + +void set_directory_hook PARAMS((void)); + +/* Used by programmable completion code. */ +extern char *command_word_completion_function PARAMS((const char *, int)); +extern char *bash_groupname_completion_function PARAMS((const char *, int)); +extern char *bash_servicename_completion_function PARAMS((const char *, int)); + +extern char **get_hostname_list PARAMS((void)); +extern void clear_hostname_list PARAMS((void)); + +extern char **bash_directory_completion_matches PARAMS((const char *)); +extern char *bash_dequote_text PARAMS((const char *)); + +#endif /* _BASHLINE_H_ */ diff --git a/bash-5.1/bashtypes.h b/bash-5.1/bashtypes.h new file mode 100644 index 0000000000000000000000000000000000000000..01afef4b4df22bbe4cb8bd460fafd01da601625f --- /dev/null +++ b/bash-5.1/bashtypes.h @@ -0,0 +1,42 @@ +/* bashtypes.h -- Bash system types. */ + +/* Copyright (C) 1993-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_BASHTYPES_H_) +# define _BASHTYPES_H_ + +#if defined (CRAY) +# define word __word +#endif + +#include + +#if defined (CRAY) +# undef word +#endif + +#if defined (HAVE_INTTYPES_H) +# include +#endif + +#if HAVE_STDINT_H +# include +#endif + +#endif /* _BASHTYPES_H_ */ diff --git a/bash-5.1/bracecomp.c b/bash-5.1/bracecomp.c new file mode 100644 index 0000000000000000000000000000000000000000..2ea8ba971aad9409d48c15ec90f3745a71692cfd --- /dev/null +++ b/bash-5.1/bracecomp.c @@ -0,0 +1,221 @@ +/* bracecomp.c -- Complete a filename with the possible completions enclosed + in csh-style braces such that the list of completions is available to the + shell. */ + +/* Original version by tromey@cns.caltech.edu, Fri Feb 7 1992. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (BRACE_EXPANSION) && defined (READLINE) + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "bashansi.h" +#include "shmbutil.h" + +#include "shell.h" +#include + +static int _strcompare PARAMS((char **, char **)); + +/* Find greatest common prefix of two strings. */ +static int +string_gcd (s1, s2) + char *s1, *s2; +{ + register int i; + + if (s1 == NULL || s2 == NULL) + return (0); + + for (i = 0; *s1 && *s2; ++s1, ++s2, ++i) + { + if (*s1 != *s2) + break; + } + + return (i); +} + +static char * +really_munge_braces (array, real_start, real_end, gcd_zero) + char **array; + int real_start, real_end, gcd_zero; +{ + int start, end, gcd; + char *result, *subterm, *x; + int result_size, flag, tlen; + + flag = 0; + + if (real_start == real_end) + { + x = array[real_start] ? sh_backslash_quote (array[real_start] + gcd_zero, 0, 0) + : sh_backslash_quote (array[0], 0, 0); + return x; + } + + result = (char *)xmalloc (result_size = 16); + *result = '\0'; + + for (start = real_start; start < real_end; start = end + 1) + { + gcd = strlen (array[start]); + for (end = start + 1; end < real_end; end++) + { + int temp; + + temp = string_gcd (array[start], array[end]); + + if (temp <= gcd_zero) + break; + + gcd = temp; + } + end--; + + if (gcd_zero == 0 && start == real_start && end != (real_end - 1)) + { + /* In this case, add in a leading '{', because we are at + top level, and there isn't a consistent prefix. */ + result_size += 1; + result = (char *)xrealloc (result, result_size); + result[0] = '{'; result[1] = '\0'; + flag++; + } + + /* Make sure we backslash quote every substring we insert into the + resultant brace expression. This is so the default filename + quoting function won't inappropriately quote the braces. */ + if (start == end) + { + x = savestring (array[start] + gcd_zero); + subterm = sh_backslash_quote (x, 0, 0); + free (x); + } + else + { + /* If there is more than one element in the subarray, + insert the (quoted) prefix and an opening brace. */ + tlen = gcd - gcd_zero; + x = (char *)xmalloc (tlen + 1); + strncpy (x, array[start] + gcd_zero, tlen); + x[tlen] = '\0'; + subterm = sh_backslash_quote (x, 0, 0); + free (x); + result_size += strlen (subterm) + 1; + result = (char *)xrealloc (result, result_size); + strcat (result, subterm); + free (subterm); + strcat (result, "{"); + subterm = really_munge_braces (array, start, end + 1, gcd); + subterm[strlen (subterm) - 1] = '}'; + } + + result_size += strlen (subterm) + 1; + result = (char *)xrealloc (result, result_size); + strcat (result, subterm); + strcat (result, ","); + free (subterm); + } + + if (gcd_zero == 0) + result[strlen (result) - 1] = flag ? '}' : '\0'; + return (result); +} + +static int +_strcompare (s1, s2) + char **s1, **s2; +{ + int result; + + result = **s1 - **s2; + if (result == 0) + result = strcmp (*s1, *s2); + + return result; +} + +static int +hack_braces_completion (names) + char **names; +{ + register int i; + char *temp; + + i = strvec_len (names); + if (MB_CUR_MAX > 1 && i > 2) + qsort (names+1, i-1, sizeof (char *), (QSFUNC *)_strcompare); + + temp = really_munge_braces (names, 1, i, 0); + + for (i = 0; names[i]; ++i) + { + free (names[i]); + names[i] = NULL; + } + names[0] = temp; + return 0; +} + +/* We handle quoting ourselves within hack_braces_completion, so we turn off + rl_filename_quoting_desired and rl_filename_quoting_function. */ +int +bash_brace_completion (count, ignore) + int count, ignore; +{ + rl_compignore_func_t *orig_ignore_func; + rl_compentry_func_t *orig_entry_func; + rl_quote_func_t *orig_quoting_func; + rl_completion_func_t *orig_attempt_func; + int orig_quoting_desired, r; + + orig_ignore_func = rl_ignore_some_completions_function; + orig_attempt_func = rl_attempted_completion_function; + orig_entry_func = rl_completion_entry_function; + orig_quoting_func = rl_filename_quoting_function; + orig_quoting_desired = rl_filename_quoting_desired; + + rl_completion_entry_function = rl_filename_completion_function; + rl_attempted_completion_function = (rl_completion_func_t *)NULL; + rl_ignore_some_completions_function = hack_braces_completion; + rl_filename_quoting_function = (rl_quote_func_t *)NULL; + rl_filename_quoting_desired = 0; + + r = rl_complete_internal (TAB); + + rl_ignore_some_completions_function = orig_ignore_func; + rl_attempted_completion_function = orig_attempt_func; + rl_completion_entry_function = orig_entry_func; + rl_filename_quoting_function = orig_quoting_func; + rl_filename_quoting_desired = orig_quoting_desired; + + return r; +} +#endif /* BRACE_EXPANSION && READLINE */ diff --git a/bash-5.1/braces.c b/bash-5.1/braces.c new file mode 100644 index 0000000000000000000000000000000000000000..e91d326ea42d39b3f0cabc9dd0e21d7c597e62a0 --- /dev/null +++ b/bash-5.1/braces.c @@ -0,0 +1,843 @@ +/* braces.c -- code for doing word expansion in curly braces. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Stuff in curly braces gets expanded before all other shell expansions. */ + +#include "config.h" + +#if defined (BRACE_EXPANSION) + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include + +#include "bashansi.h" +#include "bashintl.h" + +#if defined (SHELL) +# include "shell.h" +#else +# if defined (TEST) +typedef char *WORD_DESC; +typedef char **WORD_LIST; +#define _(X) X +# endif /* TEST */ +#endif /* SHELL */ + +#include "typemax.h" /* INTMAX_MIN, INTMAX_MAX */ +#include "general.h" +#include "shmbutil.h" +#include "chartypes.h" + +#ifndef errno +extern int errno; +#endif + +#define brace_whitespace(c) (!(c) || (c) == ' ' || (c) == '\t' || (c) == '\n') + +#define BRACE_SEQ_SPECIFIER ".." + +extern int asprintf PARAMS((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); + +/* Basic idea: + + Segregate the text into 3 sections: preamble (stuff before an open brace), + postamble (stuff after the matching close brace) and amble (stuff after + preamble, and before postamble). Expand amble, and then tack on the + expansions to preamble. Expand postamble, and tack on the expansions to + the result so far. + */ + +/* The character which is used to separate arguments. */ +static const int brace_arg_separator = ','; + +#if defined (PARAMS) +static int brace_gobbler PARAMS((char *, size_t, int *, int)); +static char **expand_amble PARAMS((char *, size_t, int)); +static char **expand_seqterm PARAMS((char *, size_t)); +static char **mkseq PARAMS((intmax_t, intmax_t, intmax_t, int, int)); +static char **array_concat PARAMS((char **, char **)); +#else +static int brace_gobbler (); +static char **expand_amble (); +static char **expand_seqterm (); +static char **mkseq(); +static char **array_concat (); +#endif + +#if 0 +static void +dump_result (a) + char **a; +{ + int i; + + for (i = 0; a[i]; i++) + printf ("dump_result: a[%d] = -%s-\n", i, a[i]); +} +#endif + +/* Return an array of strings; the brace expansion of TEXT. */ +char ** +brace_expand (text) + char *text; +{ + register int start; + size_t tlen; + char *preamble, *postamble, *amble; + size_t alen; + char **tack, **result; + int i, j, c, c1; + + DECLARE_MBSTATE; + + /* Find the text of the preamble. */ + tlen = strlen (text); + i = 0; +#if defined (CSH_BRACE_COMPAT) + c = brace_gobbler (text, tlen, &i, '{'); /* } */ +#else + /* Make sure that when we exit this loop, c == 0 or text[i] begins a + valid brace expansion sequence. */ + do + { + c = brace_gobbler (text, tlen, &i, '{'); /* } */ + c1 = c; + /* Verify that c begins a valid brace expansion word. If it doesn't, we + go on. Loop stops when there are no more open braces in the word. */ + if (c) + { + start = j = i + 1; /* { */ + c = brace_gobbler (text, tlen, &j, '}'); + if (c == 0) /* it's not */ + { + i++; + c = c1; + continue; + } + else /* it is */ + { + c = c1; + break; + } + } + else + break; + } + while (c); +#endif /* !CSH_BRACE_COMPAT */ + + preamble = (char *)xmalloc (i + 1); + if (i > 0) + strncpy (preamble, text, i); + preamble[i] = '\0'; + + result = (char **)xmalloc (2 * sizeof (char *)); + result[0] = preamble; + result[1] = (char *)NULL; + + /* Special case. If we never found an exciting character, then + the preamble is all of the text, so just return that. */ + if (c != '{') + return (result); + + /* Find the amble. This is the stuff inside this set of braces. */ + start = ++i; + c = brace_gobbler (text, tlen, &i, '}'); + + /* What if there isn't a matching close brace? */ + if (c == 0) + { +#if defined (NOTDEF) + /* Well, if we found an unquoted BRACE_ARG_SEPARATOR between START + and I, then this should be an error. Otherwise, it isn't. */ + j = start; + while (j < i) + { + if (text[j] == '\\') + { + j++; + ADVANCE_CHAR (text, tlen, j); + continue; + } + + if (text[j] == brace_arg_separator) + { /* { */ + strvec_dispose (result); + set_exit_status (EXECUTION_FAILURE); + report_error ("no closing `%c' in %s", '}', text); + throw_to_top_level (); + } + ADVANCE_CHAR (text, tlen, j); + } +#endif + free (preamble); /* Same as result[0]; see initialization. */ + result[0] = savestring (text); + return (result); + } + +#if defined (SHELL) + amble = substring (text, start, i); + alen = i - start; +#else + amble = (char *)xmalloc (1 + (i - start)); + strncpy (amble, &text[start], (i - start)); + alen = i - start; + amble[alen] = '\0'; +#endif + +#if defined (SHELL) + INITIALIZE_MBSTATE; + + /* If the amble does not contain an unquoted BRACE_ARG_SEPARATOR, then + just return without doing any expansion. */ + j = 0; + while (amble[j]) + { + if (amble[j] == '\\') + { + j++; + ADVANCE_CHAR (amble, alen, j); + continue; + } + + if (amble[j] == brace_arg_separator) + break; + + ADVANCE_CHAR (amble, alen, j); + } + + if (amble[j] == 0) + { + tack = expand_seqterm (amble, alen); + if (tack) + goto add_tack; + else if (text[i + 1]) + { + /* If the sequence expansion fails (e.g., because the integers + overflow), but there is more in the string, try and process + the rest of the string, which may contain additional brace + expansions. Treat the unexpanded sequence term as a simple + string (including the braces). */ + tack = strvec_create (2); + tack[0] = savestring (text+start-1); + tack[0][i-start+2] = '\0'; + tack[1] = (char *)0; + goto add_tack; + } + else + { + free (amble); + free (preamble); + result[0] = savestring (text); + return (result); + } + } +#endif /* SHELL */ + + tack = expand_amble (amble, alen, 0); +add_tack: + result = array_concat (result, tack); + free (amble); + if (tack != result) + strvec_dispose (tack); + + postamble = text + i + 1; + + if (postamble && *postamble) + { + tack = brace_expand (postamble); + result = array_concat (result, tack); + if (tack != result) + strvec_dispose (tack); + } + + return (result); +} + +/* Expand the text found inside of braces. We simply try to split the + text at BRACE_ARG_SEPARATORs into separate strings. We then brace + expand each slot which needs it, until there are no more slots which + need it. */ +static char ** +expand_amble (text, tlen, flags) + char *text; + size_t tlen; + int flags; +{ + char **result, **partial, **tresult; + char *tem; + int start, i, c; + +#if defined (SHELL) + DECLARE_MBSTATE; +#endif + + result = (char **)NULL; + + start = i = 0; + c = 1; + while (c) + { + c = brace_gobbler (text, tlen, &i, brace_arg_separator); +#if defined (SHELL) + tem = substring (text, start, i); +#else + tem = (char *)xmalloc (1 + (i - start)); + strncpy (tem, &text[start], (i - start)); + tem[i - start] = '\0'; +#endif + + partial = brace_expand (tem); + + if (!result) + result = partial; + else + { + register int lr, lp, j; + + lr = strvec_len (result); + lp = strvec_len (partial); + + tresult = strvec_mresize (result, lp + lr + 1); + if (tresult == 0) + { + internal_error (_("brace expansion: cannot allocate memory for %s"), tem); + free (tem); + strvec_dispose (partial); + strvec_dispose (result); + result = (char **)NULL; + return result; + } + else + result = tresult; + + for (j = 0; j < lp; j++) + result[lr + j] = partial[j]; + + result[lr + j] = (char *)NULL; + free (partial); + } + free (tem); +#if defined (SHELL) + ADVANCE_CHAR (text, tlen, i); +#else + i++; +#endif + start = i; + } + return (result); +} + +#define ST_BAD 0 +#define ST_INT 1 +#define ST_CHAR 2 +#define ST_ZINT 3 + +static char ** +mkseq (start, end, incr, type, width) + intmax_t start, end, incr; + int type, width; +{ + intmax_t n, prevn; + int i, nelem; + char **result, *t; + + if (incr == 0) + incr = 1; + + if (start > end && incr > 0) + incr = -incr; + else if (start < end && incr < 0) + { + if (incr == INTMAX_MIN) /* Don't use -INTMAX_MIN */ + return ((char **)NULL); + incr = -incr; + } + + /* Check that end-start will not overflow INTMAX_MIN, INTMAX_MAX. The +3 + and -2, not strictly necessary, are there because of the way the number + of elements and value passed to strvec_create() are calculated below. */ + if (SUBOVERFLOW (end, start, INTMAX_MIN+3, INTMAX_MAX-2)) + return ((char **)NULL); + + prevn = sh_imaxabs (end - start); + /* Need to check this way in case INT_MAX == INTMAX_MAX */ + if (INT_MAX == INTMAX_MAX && (ADDOVERFLOW (prevn, 2, INT_MIN, INT_MAX))) + return ((char **)NULL); + /* Make sure the assignment to nelem below doesn't end up <= 0 due to + intmax_t overflow */ + else if (ADDOVERFLOW ((prevn/sh_imaxabs(incr)), 1, INTMAX_MIN, INTMAX_MAX)) + return ((char **)NULL); + + /* XXX - TOFIX: potentially allocating a lot of extra memory if + imaxabs(incr) != 1 */ + /* Instead of a simple nelem = prevn + 1, something like: + nelem = (prevn / imaxabs(incr)) + 1; + would work */ + if ((prevn / sh_imaxabs (incr)) > INT_MAX - 3) /* check int overflow */ + return ((char **)NULL); + nelem = (prevn / sh_imaxabs(incr)) + 1; + result = strvec_mcreate (nelem + 1); + if (result == 0) + { + internal_error (_("brace expansion: failed to allocate memory for %u elements"), (unsigned int)nelem); + return ((char **)NULL); + } + + /* Make sure we go through the loop at least once, so {3..3} prints `3' */ + i = 0; + n = start; + do + { +#if defined (SHELL) + if (ISINTERRUPT) + { + result[i] = (char *)NULL; + strvec_dispose (result); + result = (char **)NULL; + } + QUIT; +#endif + if (type == ST_INT) + result[i++] = t = itos (n); + else if (type == ST_ZINT) + { + int len, arg; + arg = n; + len = asprintf (&t, "%0*d", width, arg); + result[i++] = t; + } + else + { + if (t = (char *)malloc (2)) + { + t[0] = n; + t[1] = '\0'; + } + result[i++] = t; + } + + /* We failed to allocate memory for this number, so we bail. */ + if (t == 0) + { + char *p, lbuf[INT_STRLEN_BOUND(intmax_t) + 1]; + + /* Easier to do this than mess around with various intmax_t printf + formats (%ld? %lld? %jd?) and PRIdMAX. */ + p = inttostr (n, lbuf, sizeof (lbuf)); + internal_error (_("brace expansion: failed to allocate memory for `%s'"), p); + strvec_dispose (result); + return ((char **)NULL); + } + + /* Handle overflow and underflow of n+incr */ + if (ADDOVERFLOW (n, incr, INTMAX_MIN, INTMAX_MAX)) + break; + + n += incr; + + if ((incr < 0 && n < end) || (incr > 0 && n > end)) + break; + } + while (1); + + result[i] = (char *)0; + return (result); +} + +static char ** +expand_seqterm (text, tlen) + char *text; + size_t tlen; +{ + char *t, *lhs, *rhs; + int lhs_t, rhs_t, lhs_l, rhs_l, width; + intmax_t lhs_v, rhs_v, incr; + intmax_t tl, tr; + char **result, *ep, *oep; + + t = strstr (text, BRACE_SEQ_SPECIFIER); + if (t == 0) + return ((char **)NULL); + + lhs_l = t - text; /* index of start of BRACE_SEQ_SPECIFIER */ + lhs = substring (text, 0, lhs_l); + rhs = substring (text, lhs_l + sizeof(BRACE_SEQ_SPECIFIER) - 1, tlen); + + if (lhs[0] == 0 || rhs[0] == 0) + { + free (lhs); + free (rhs); + return ((char **)NULL); + } + + /* Now figure out whether LHS and RHS are integers or letters. Both + sides have to match. */ + lhs_t = (legal_number (lhs, &tl)) ? ST_INT : + ((ISALPHA (lhs[0]) && lhs[1] == 0) ? ST_CHAR : ST_BAD); + + /* Decide on rhs and whether or not it looks like the user specified + an increment */ + ep = 0; + if (ISDIGIT (rhs[0]) || ((rhs[0] == '+' || rhs[0] == '-') && ISDIGIT (rhs[1]))) + { + rhs_t = ST_INT; + errno = 0; + tr = strtoimax (rhs, &ep, 10); + if (errno == ERANGE || (ep && *ep != 0 && *ep != '.')) + rhs_t = ST_BAD; /* invalid */ + } + else if (ISALPHA (rhs[0]) && (rhs[1] == 0 || rhs[1] == '.')) + { + rhs_t = ST_CHAR; + ep = rhs + 1; + } + else + { + rhs_t = ST_BAD; + ep = 0; + } + + incr = 1; + if (rhs_t != ST_BAD) + { + oep = ep; + errno = 0; + if (ep && *ep == '.' && ep[1] == '.' && ep[2]) + incr = strtoimax (ep + 2, &ep, 10); + if (*ep != 0 || errno == ERANGE) + rhs_t = ST_BAD; /* invalid incr or overflow */ + tlen -= ep - oep; + } + + if (lhs_t != rhs_t || lhs_t == ST_BAD || rhs_t == ST_BAD) + { + free (lhs); + free (rhs); + return ((char **)NULL); + } + + /* OK, we have something. It's either a sequence of integers, ascending + or descending, or a sequence or letters, ditto. Generate the sequence, + put it into a string vector, and return it. */ + + if (lhs_t == ST_CHAR) + { + lhs_v = (unsigned char)lhs[0]; + rhs_v = (unsigned char)rhs[0]; + width = 1; + } + else + { + lhs_v = tl; /* integer truncation */ + rhs_v = tr; + + /* Decide whether or not the terms need zero-padding */ + rhs_l = tlen - lhs_l - sizeof (BRACE_SEQ_SPECIFIER) + 1; + width = 0; + if (lhs_l > 1 && lhs[0] == '0') + width = lhs_l, lhs_t = ST_ZINT; + if (lhs_l > 2 && lhs[0] == '-' && lhs[1] == '0') + width = lhs_l, lhs_t = ST_ZINT; + if (rhs_l > 1 && rhs[0] == '0' && width < rhs_l) + width = rhs_l, lhs_t = ST_ZINT; + if (rhs_l > 2 && rhs[0] == '-' && rhs[1] == '0' && width < rhs_l) + width = rhs_l, lhs_t = ST_ZINT; + + if (width < lhs_l && lhs_t == ST_ZINT) + width = lhs_l; + if (width < rhs_l && lhs_t == ST_ZINT) + width = rhs_l; + } + + result = mkseq (lhs_v, rhs_v, incr, lhs_t, width); + + free (lhs); + free (rhs); + + return (result); +} + +/* Start at INDEX, and skip characters in TEXT. Set INDEX to the + index of the character matching SATISFY. This understands about + quoting. Return the character that caused us to stop searching; + this is either the same as SATISFY, or 0. */ +/* If SATISFY is `}', we are looking for a brace expression, so we + should enforce the rules that govern valid brace expansions: + 1) to count as an arg separator, a comma or `..' has to be outside + an inner set of braces. +*/ +static int +brace_gobbler (text, tlen, indx, satisfy) + char *text; + size_t tlen; + int *indx; + int satisfy; +{ + register int i, c, quoted, level, commas, pass_next; +#if defined (SHELL) + int si; + char *t; +#endif + DECLARE_MBSTATE; + + level = quoted = pass_next = 0; +#if defined (CSH_BRACE_COMPAT) + commas = 1; +#else + commas = (satisfy == '}') ? 0 : 1; +#endif + + i = *indx; + while (c = text[i]) + { + if (pass_next) + { + pass_next = 0; +#if defined (SHELL) + ADVANCE_CHAR (text, tlen, i); +#else + i++; +#endif + continue; + } + + /* A backslash escapes the next character. This allows backslash to + escape the quote character in a double-quoted string. */ + if (c == '\\' && (quoted == 0 || quoted == '"' || quoted == '`')) + { + pass_next = 1; + i++; + continue; + } + +#if defined (SHELL) + /* If compiling for the shell, treat ${...} like \{...} */ + if (c == '$' && text[i+1] == '{' && quoted != '\'') /* } */ + { + pass_next = 1; + i++; + if (quoted == 0) + level++; + continue; + } +#endif + + if (quoted) + { + if (c == quoted) + quoted = 0; +#if defined (SHELL) + /* The shell allows quoted command substitutions */ + if (quoted == '"' && c == '$' && text[i+1] == '(') /*)*/ + goto comsub; +#endif +#if defined (SHELL) + ADVANCE_CHAR (text, tlen, i); +#else + i++; +#endif + continue; + } + + if (c == '"' || c == '\'' || c == '`') + { + quoted = c; + i++; + continue; + } + +#if defined (SHELL) + /* Pass new-style command and process substitutions through unchanged. */ + if ((c == '$' || c == '<' || c == '>') && text[i+1] == '(') /* ) */ + { +comsub: + si = i + 2; + t = extract_command_subst (text, &si, 0); + i = si; + free (t); + i++; + continue; + } +#endif + + if (c == satisfy && level == 0 && quoted == 0 && commas > 0) + { + /* We ignore an open brace surrounded by whitespace, and also + an open brace followed immediately by a close brace preceded + by whitespace. */ + if (c == '{' && + ((!i || brace_whitespace (text[i - 1])) && + (brace_whitespace (text[i + 1]) || text[i + 1] == '}'))) + { + i++; + continue; + } + + break; + } + + if (c == '{') + level++; + else if (c == '}' && level) + level--; +#if !defined (CSH_BRACE_COMPAT) + else if (satisfy == '}' && c == brace_arg_separator && level == 0) + commas++; + else if (satisfy == '}' && STREQN (text+i, BRACE_SEQ_SPECIFIER, 2) && + text[i+2] != satisfy && level == 0) + commas++; +#endif + +#if defined (SHELL) + ADVANCE_CHAR (text, tlen, i); +#else + i++; +#endif + } + + *indx = i; + return (c); +} + +/* Return a new array of strings which is the result of appending each + string in ARR2 to each string in ARR1. The resultant array is + len (arr1) * len (arr2) long. For convenience, ARR1 (and its contents) + are free ()'ed. ARR1 can be NULL, in that case, a new version of ARR2 + is returned. */ +static char ** +array_concat (arr1, arr2) + char **arr1, **arr2; +{ + register int i, j, len, len1, len2; + register char **result; + + if (arr1 == 0) + return (arr2); /* XXX - see if we can get away without copying? */ + + if (arr2 == 0) + return (arr1); /* XXX - caller expects us to free arr1 */ + + /* We can only short-circuit if the array consists of a single null element; + otherwise we need to replicate the contents of the other array and + prefix (or append, below) an empty element to each one. */ + if (arr1[0] && arr1[0][0] == 0 && arr1[1] == 0) + { + strvec_dispose (arr1); + return (arr2); /* XXX - use flags to see if we can avoid copying here */ + } + + if (arr2[0] && arr2[0][0] == 0 && arr2[1] == 0) + return (arr1); /* XXX - rather than copying and freeing it */ + + len1 = strvec_len (arr1); + len2 = strvec_len (arr2); + + result = (char **)malloc ((1 + (len1 * len2)) * sizeof (char *)); + if (result == 0) + return (result); + + len = 0; + for (i = 0; i < len1; i++) + { + int strlen_1 = strlen (arr1[i]); + + for (j = 0; j < len2; j++) + { + result[len] = (char *)xmalloc (1 + strlen_1 + strlen (arr2[j])); + strcpy (result[len], arr1[i]); + strcpy (result[len] + strlen_1, arr2[j]); + len++; + } + free (arr1[i]); + } + free (arr1); + + result[len] = (char *)NULL; + return (result); +} + +#if defined (TEST) +#include + +void * +xmalloc(n) + size_t n; +{ + return (malloc (n)); +} + +void * +xrealloc(p, n) + void *p; + size_t n; +{ + return (realloc (p, n)); +} + +int +internal_error (format, arg1, arg2) + char *format, *arg1, *arg2; +{ + fprintf (stderr, format, arg1, arg2); + fprintf (stderr, "\n"); +} + +main () +{ + char example[256]; + + for (;;) + { + char **result; + int i; + + fprintf (stderr, "brace_expand> "); + + if ((!fgets (example, 256, stdin)) || + (strncmp (example, "quit", 4) == 0)) + break; + + if (strlen (example)) + example[strlen (example) - 1] = '\0'; + + result = brace_expand (example); + + for (i = 0; result[i]; i++) + printf ("%s\n", result[i]); + + strvec_dispose (result); + } +} + +/* + * Local variables: + * compile-command: "gcc -g -Bstatic -DTEST -o brace_expand braces.c general.o" + * end: + */ + +#endif /* TEST */ +#endif /* BRACE_EXPANSION */ diff --git a/bash-5.1/builtins.h b/bash-5.1/builtins.h new file mode 100644 index 0000000000000000000000000000000000000000..5b7e8116f8df1b414537f09c5b7b79cfa083648f --- /dev/null +++ b/bash-5.1/builtins.h @@ -0,0 +1,68 @@ +/* builtins.h -- What a builtin looks like, and where to find them. */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef BUILTINS_H +#define BUILTINS_H + +#include "config.h" + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "command.h" +#include "general.h" + +#if defined (ALIAS) +#include "alias.h" +#endif + +/* Flags describing various things about a builtin. */ +#define BUILTIN_ENABLED 0x01 /* This builtin is enabled. */ +#define BUILTIN_DELETED 0x02 /* This has been deleted with enable -d. */ +#define STATIC_BUILTIN 0x04 /* This builtin is not dynamically loaded. */ +#define SPECIAL_BUILTIN 0x08 /* This is a Posix `special' builtin. */ +#define ASSIGNMENT_BUILTIN 0x10 /* This builtin takes assignment statements. */ +#define POSIX_BUILTIN 0x20 /* This builtins is special in the Posix command search order. */ +#define LOCALVAR_BUILTIN 0x40 /* This builtin creates local variables */ +#define REQUIRES_BUILTIN 0x80 /* This builtin requires other files. */ + +#define BASE_INDENT 4 + +/* The thing that we build the array of builtins out of. */ +struct builtin { + char *name; /* The name that the user types. */ + sh_builtin_func_t *function; /* The address of the invoked function. */ + int flags; /* One of the #defines above. */ + char * const *long_doc; /* NULL terminated array of strings. */ + const char *short_doc; /* Short version of documentation. */ + char *handle; /* for future use */ +}; + +/* Found in builtins.c, created by builtins/mkbuiltins. */ +extern int num_shell_builtins; /* Number of shell builtins. */ +extern struct builtin static_shell_builtins[]; +extern struct builtin *shell_builtins; +extern struct builtin *current_builtin; + +#endif /* BUILTINS_H */ diff --git a/bash-5.1/builtins_org/Makefile.in b/bash-5.1/builtins_org/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..e87150fe3cb47e3a95bbad0bbeda2ebe67937f90 --- /dev/null +++ b/bash-5.1/builtins_org/Makefile.in @@ -0,0 +1,708 @@ +# This Makefile for building libbuiltins.a is in -*- text -*- for Emacs. +# +# Copyright (C) 1996-2017 Free Software Foundation, Inc. + +# 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 . + +PACKAGE = @PACKAGE_NAME@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_VERSION = @PACKAGE_VERSION@ + +# +SHELL = @MAKE_SHELL@ +RANLIB = @RANLIB@ +CC = @CC@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +RM = rm -f +CP = cp + +EXEEXT = @EXEEXT@ + +prefix = @prefix@ + +srcdir = @srcdir@ +VPATH = @srcdir@ +topdir = @top_srcdir@ + +datarootdir = @datarootdir@ + +includedir = @includedir@ +datadir = @datadir@ +localedir = @localedir@ + +loadablesdir = @loadablesdir@ + +# Support an alternate destination root directory for package building +DESTDIR = + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +BUILD_DIR = @BUILD_DIR@ + +LIBBUILD = ${BUILD_DIR}/lib + +PROFILE_FLAGS = @PROFILE_FLAGS@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +LIBS = @LIBS@ +LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) +LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ +LIBS_FOR_BUILD = @LIBS_FOR_BUILD@ +#LIBS_FOR_BUILD = $(LIBS) + +BASHINCDIR = ${topdir}/include + +RL_INCLUDEDIR = @RL_INCLUDEDIR@ + +INTL_LIBSRC = ${topdir}/lib/intl +INTL_BUILDDIR = ${LIBBUILD}/intl +INTL_LIBDIR = ${INTL_BUILDDIR} +INTL_LIBRARY = ${INTL_BUILDDIR}/libintl.a +INTL_INC = @INTL_INC@ +INTL_DEP = @INTL_DEP@ +LIBINTL_H = @LIBINTL_H@ + +HELPDIR = @HELPDIR@ +MKDIRS = ${topdir}/support/mkdirs + +HELPFILES_TARGET = @HELPFILES_TARGET@ + +INCLUDES = -I. -I.. @RL_INCLUDE@ -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib -I$(srcdir) ${INTL_INC} + +BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \ + ${INCLUDES} $(LOCAL_CFLAGS) + +CCFLAGS = ${ADDON_CFLAGS} $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS) + +CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) + +GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ + -Wcast-align -Wstrict-prototypes -Wconversion \ + -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic + +MKBUILTINS = mkbuiltins$(EXEEXT) +DIRECTDEFINE = -D $(srcdir) +HELPDIRDEFINE = @HELPDIRDEFINE@ +HELPSTRINGS = @HELPSTRINGS@ + +# xxx this is bad style +RL_LIBSRC = $(topdir)/lib/readline + +.SUFFIXES: +.SUFFIXES: .def .c .o +# How to make a .o file from a .def file. +.def.o: + $(RM) $@ + ./$(MKBUILTINS) $(DIRECTDEFINE) $< + $(CC) -c $(CCFLAGS) $*.c || ( $(RM) $*.c ; exit 1 ) + +# How to make a .c file from a .def file. +.def.c: + $(RM) $@ + ./$(MKBUILTINS) $(DIRECTDEFINE) $< + +# default rule for making a .o file from a .c file +.c.o: + $(RM) $@ + $(CC) -c $(CCFLAGS) $< + +DEFSRC = $(srcdir)/alias.def $(srcdir)/bind.def $(srcdir)/break.def \ + $(srcdir)/builtin.def $(srcdir)/caller.def \ + $(srcdir)/cd.def $(srcdir)/colon.def \ + $(srcdir)/command.def $(srcdir)/declare.def $(srcdir)/echo.def \ + $(srcdir)/enable.def $(srcdir)/eval.def $(srcdir)/getopts.def \ + $(srcdir)/exec.def $(srcdir)/exit.def $(srcdir)/fc.def \ + $(srcdir)/fg_bg.def $(srcdir)/hash.def $(srcdir)/help.def \ + $(srcdir)/history.def $(srcdir)/jobs.def $(srcdir)/kill.def \ + $(srcdir)/let.def $(srcdir)/read.def $(srcdir)/return.def \ + $(srcdir)/set.def $(srcdir)/setattr.def $(srcdir)/shift.def \ + $(srcdir)/source.def $(srcdir)/suspend.def $(srcdir)/test.def \ + $(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \ + $(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \ + $(srcdir)/reserved.def $(srcdir)/pushd.def $(srcdir)/shopt.def \ + $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/mapfile.def + +STATIC_SOURCE = common.c evalstring.c evalfile.c getopt.c bashgetopt.c \ + getopt.h + +OFILES = builtins.o \ + alias.o bind.o break.o builtin.o caller.o cd.o colon.o command.o \ + common.o declare.o echo.o enable.o eval.o evalfile.o \ + evalstring.o exec.o exit.o fc.o fg_bg.o hash.o help.o history.o \ + jobs.o kill.o let.o mapfile.o \ + pushd.o read.o return.o set.o setattr.o shift.o source.o \ + suspend.o test.o times.o trap.o type.o ulimit.o umask.o \ + wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o + +CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h tmpbuiltins.c \ + tmpbuiltins.h +CREATED_OBJECTS = tmpbuiltins.o gen-helpfiles.o mkbuiltins.o + +all: $(MKBUILTINS) libbuiltins.a $(HELPFILES_TARGET) +targets: libbuiltins.a $(HELPFILES_TARGET) + +libbuiltins.a: $(MKBUILTINS) $(OFILES) builtins.o + $(RM) $@ + $(AR) $(ARFLAGS) $@ $(OFILES) + -$(RANLIB) $@ + +tmpbuiltins.c: $(MKBUILTINS) $(DEFSRC) + ./$(MKBUILTINS) -externfile tmpbuiltins.h -structfile $@ \ + -noproduction -nofunctions \ + $(DIRECTDEFINE) $(HELPSTRINGS) $(DEFSRC) + +tmpbuiltins.h: tmpbuiltins.c + +gen-helpfiles.o: ../config.h +gen-helpfiles.o: gen-helpfiles.c + $(RM) $@ + $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $< + +gen-helpfiles: tmpbuiltins.o gen-helpfiles.o + $(CC_FOR_BUILD) ${CCFLAGS_FOR_BUILD} $(LDFLAGS_FOR_BUILD) -o $@ gen-helpfiles.o tmpbuiltins.o $(LIBS_FOR_BUILD) + +builtext.h builtins.c: $(MKBUILTINS) $(DEFSRC) + @-if test -f builtins.c; then mv -f builtins.c old-builtins.c; fi + @-if test -f builtext.h; then mv -f builtext.h old-builtext.h; fi + ./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \ + -noproduction $(DIRECTDEFINE) $(HELPDIRDEFINE) $(HELPSTRINGS) $(DEFSRC) + @-if cmp -s old-builtext.h builtext.h 2>/dev/null; then \ + mv old-builtext.h builtext.h; \ + else \ + $(RM) old-builtext.h; \ + fi + @-if cmp -s old-builtins.c builtins.c 2>/dev/null; then \ + mv old-builtins.c builtins.c; \ + else \ + $(RM) old-builtins.c; \ + fi + +helpdoc: gen-helpfiles + ./gen-helpfiles ${HELPDIRDEFINE} + +install-help: + @-if test -n "${HELPDIR}" && test -d helpfiles ; then \ + test -d $(DESTDIR)${HELPDIR} || ${SHELL} ${MKDIRS} $(DESTDIR)$(HELPDIR) ;\ + ( for f in helpfiles/*; do \ + echo installing $$f; \ + ${INSTALL_DATA} $$f $(DESTDIR)$(HELPDIR); \ + done; ) ; \ + fi + +install: @HELPINSTALL@ + +mkbuiltins.o: ../config.h +mkbuiltins.o: mkbuiltins.c + $(RM) $@ + $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $< + +mkbuiltins$(EXEEXT): mkbuiltins.o + $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $(MKBUILTINS) mkbuiltins.o $(LIBS_FOR_BUILD) + +# rules for deficient makes, like SunOS +mkbuiltins.o: mkbuiltins.c +builtins.o: builtins.c +common.o: common.c +bashgetopt.o: bashgetopt.c +getopt.o: getopt.c +evalstring.o: evalstring.c +evalfile.o: evalfile.c + +tmpbuiltins.o: tmpbuiltins.c +gen-helpfiles.o: gen-helpfiles.c + +ulimit.o: pipesize.h + +pipesize.h: psize.aux + $(SHELL) $(srcdir)/psize.sh > $@ + +# Technically this is wrong; the pipe size should be for the target system, +# not the build host. +psize.aux: psize.c + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(srcdir)/psize.c + +documentation: builtins.texi + +builtins.texi: $(MKBUILTINS) + ./$(MKBUILTINS) -documentonly $(DEFSRC) + +clean: + $(RM) $(OFILES) $(CREATED_FILES) libbuiltins.a + $(RM) $(MKBUILTINS) gen-helpfiles $(CREATED_OBJECTS) + -test -d helpfiles && $(RM) -r helpfiles + +mostlyclean: + $(RM) $(OFILES) libbuiltins.a + +distclean maintainer-clean: clean + $(RM) Makefile + +$(OFILES): $(MKBUILTINS) ../config.h + +../version.h: ../config.h ../Makefile Makefile + -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h ) + +# maintainer special - for now +po: builtins.c + xgettext -L C -o $(topdir)/po/builtins.pot --keyword='N_' builtins.c 2>/dev/null + +${LIBINTL_H}: + @echo making $@ in ${INTL_BUILDDIR} + @(cd ${INTL_BUILDDIR} && \ + $(MAKE) $(MFLAGS) libintl.h) || exit 1 + +# dependencies + +alias.o: alias.def +bind.o: bind.def +break.o: break.def +builtin.o: builtin.def +caller.o: caller.def +cd.o: cd.def +colon.o: colon.def +command.o: command.def +declare.o: declare.def +echo.o: echo.def +enable.o: enable.def +eval.o: eval.def +exec.o: exec.def +exit.o: exit.def +fc.o: fc.def +fg_bg.o: fg_bg.def +hash.o: hash.def +help.o: help.def +history.o: history.def +jobs.o: jobs.def +kill.o: kill.def +let.o: let.def +mapfile.o: mapfile.def +printf.o: printf.def +pushd.o: pushd.def +read.o: read.def +return.o: return.def +set.o: set.def +setattr.o: setattr.def +shift.o: shift.def +shopt.o: shopt.def +source.o: source.def +suspend.o: suspend.def +test.o: test.def +times.o: times.def +trap.o: trap.def +type.o: type.def +ulimit.o: ulimit.def +umask.o: umask.def +wait.o: wait.def +getopts.o: getopts.def +reserved.o: reserved.def +complete.o: complete.def + +# C files +bashgetopt.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h +bashgetopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h +bashgetopt.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h +bashgetopt.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/quit.h $(BASHINCDIR)/maxpath.h +bashgetopt.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h +bashgetopt.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h +bashgetopt.o: ../pathnames.h $(topdir)/externs.h $(srcdir)/common.h +bashgetopt.o: $(BASHINCDIR)/chartypes.h +common.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h +common.o: $(topdir)/shell.h $(topdir)/syntax.h ../config.h $(topdir)/bashjmp.h $(BASHINCDIR)/posixjmp.h +common.o: $(topdir)/sig.h $(topdir)/command.h $(topdir)/parser.h +common.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/stdc.h $(BASHINCDIR)/memalloc.h +common.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/input.h +common.o: $(topdir)/siglist.h $(topdir)/bashhist.h $(topdir)/quit.h +common.o: $(topdir)/unwind_prot.h $(BASHINCDIR)/maxpath.h $(topdir)/jobs.h +common.o: $(topdir)/builtins.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +common.o: $(topdir)/subst.h $(topdir)/execute_cmd.h $(topdir)/error.h +common.o: $(topdir)/externs.h ../pathnames.h ./builtext.h +common.o: $(BASHINCDIR)/chartypes.h +evalfile.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h ${BASHINCDIR}/filecntl.h +evalfile.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h +evalfile.o: $(topdir)/shell.h $(topdir)/syntax.h ../config.h $(topdir)/bashjmp.h +evalfile.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h +evalfile.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/quit.h $(BASHINCDIR)/maxpath.h +evalfile.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h +evalfile.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h +evalfile.o: ../pathnames.h $(topdir)/externs.h $(topdir)/parser.h +evalfile.o: $(topdir)/jobs.h $(topdir)/builtins.h $(topdir)/flags.h +evalfile.o: $(topdir)/input.h $(topdir)/execute_cmd.h +evalfile.o: $(topdir)/bashhist.h $(srcdir)/common.h +evalstring.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h +evalstring.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(BASHINCDIR)/posixjmp.h +evalstring.o: $(topdir)/sig.h $(topdir)/command.h $(topdir)/siglist.h +evalstring.o: $(BASHINCDIR)/memalloc.h $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/input.h +evalstring.o: $(topdir)/quit.h $(topdir)/unwind_prot.h +evalstring.o: $(BASHINCDIR)/maxpath.h $(topdir)/jobs.h $(topdir)/builtins.h +evalstring.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +evalstring.o: $(topdir)/externs.h $(topdir)/jobs.h $(topdir)/builtins.h +evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h +evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h +evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h ./builtext.h +#evalstring.o: $(topdir)/y.tab.h +getopt.o: ../config.h $(BASHINCDIR)/memalloc.h +getopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(topdir)/command.h +getopt.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h $(topdir)/variables.h $(topdir)/conftypes.h +getopt.o: $(topdir)/quit.h $(BASHINCDIR)/maxpath.h $(topdir)/unwind_prot.h +getopt.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +getopt.o: $(topdir)/sig.h ../pathnames.h $(topdir)/externs.h +getopt.o: $(srcdir)/getopt.h +mkbuiltins.o: ../config.h $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h +mkbuiltins.o: ${BASHINCDIR}/filecntl.h +mkbuiltins.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h + +# def files +alias.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +alias.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h +alias.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +alias.o: $(topdir)/subst.h $(topdir)/externs.h $(srcdir)/common.h +alias.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +alias.o: ../pathnames.h +bind.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +bind.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +bind.o: $(topdir)/subst.h $(topdir)/externs.h $(srcdir)/bashgetopt.h +bind.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h $(topdir)/bashline.h +bind.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +break.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +break.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +break.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +break.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +break.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +break.o: ../pathnames.h $(topdir)/execute_cmd.h +builtin.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +builtin.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h +builtin.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.h +builtin.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +builtin.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +builtin.o: $(srcdir)/bashgetopt.h ../pathnames.h $(topdir)/execute_cmd.h +caller.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +caller.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose_cmd.h +caller.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h +caller.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +caller.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ./builtext.h +caller.o: ${BASHINCDIR}/chartypes.h $(topdir)/bashtypes.h ../pathnames.h +cd.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +cd.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose_cmd.h +cd.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h +cd.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +cd.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ../pathnames.h +cd.o: $(topdir)/sig.h +colon.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +colon.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h +colon.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +colon.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +colon.o: $(BASHINCDIR)/maxpath.h ../pathnames.h +colon.o: $(srcdir)/common.h +command.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +command.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h +command.o: $(topdir)/quit.h $(srcdir)/bashgetopt.h $(BASHINCDIR)/maxpath.h +command.o: $(topdir)/sig.h +command.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +command.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +command.o: ../pathnames.h +declare.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +declare.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +declare.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +declare.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +declare.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +declare.o: $(topdir)/arrayfunc.h $(srcdir)/bashgetopt.h $(topdir)/flags.h +declare.o: ./builtext.h ../pathnames.h +echo.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +echo.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h +echo.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +echo.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +echo.o: $(BASHINCDIR)/maxpath.h ../pathnames.h +echo.o: $(srcdir)/common.h +enable.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +enable.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +enable.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +enable.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h +enable.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +enable.o: $(BASHINCDIR)/maxpath.h ../pathnames.h +enable.o: $(topdir)/pcomplete.h +eval.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +eval.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +eval.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +eval.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h +eval.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +eval.o: $(BASHINCDIR)/maxpath.h ../pathnames.h +exec.o: $(topdir)/bashtypes.h +exec.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +exec.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +exec.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +exec.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/flags.h +exec.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +exec.o: $(srcdir)/common.h $(topdir)/execute_cmd.h $(BASHINCDIR)/maxpath.h +exec.o: $(topdir)/findcmd.h $(topdir)/jobs.h ../pathnames.h +exit.o: $(topdir)/bashtypes.h +exit.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +exit.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +exit.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +exit.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/jobs.h +exit.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +exit.o: $(topdir)/execute_cmd.h +exit.o: $(BASHINCDIR)/maxpath.h ./builtext.h ../pathnames.h +fc.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h +fc.o: $(topdir)/builtins.h $(topdir)/command.h $(srcdir)/bashgetopt.h +fc.o: $(topdir)/bashhist.h $(topdir)/parser.h +fc.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +fc.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h +fc.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +fc.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/shell.h $(topdir)/syntax.h +fc.o: $(topdir)/flags.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +fc.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h $(BASHINCDIR)/chartypes.h +fc.o: ../pathnames.h +fg_bg.o: $(topdir)/bashtypes.h $(srcdir)/bashgetopt.h +fg_bg.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +fg_bg.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +fg_bg.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +fg_bg.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +fg_bg.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +fg_bg.o: $(topdir)/execute_cmd.h +fg_bg.o: $(topdir)/jobs.h ../pathnames.h +getopts.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +getopts.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +getopts.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +getopts.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +getopts.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +getopts.o: $(topdir)/execute_cmd.h +getopts.o: ../pathnames.h +hash.o: $(topdir)/builtins.h $(topdir)/command.h $(topdir)/quit.h +hash.o: $(topdir)/findcmd.h $(topdir)/hashlib.h $(topdir)/sig.h +hash.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +hash.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +hash.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h +hash.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h +hash.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ../pathnames.h +help.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +help.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +help.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +help.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +help.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h +help.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h +help.o: ${srcdir}/common.h $(topdir)/sig.h ../pathnames.h +history.o: $(topdir)/bashtypes.h +history.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +history.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +history.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +history.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h $(topdir)/parser.h +history.o: ${BASHINCDIR}/filecntl.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h +history.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/bashhist.h $(BASHINCDIR)/maxpath.h +history.o: ../pathnames.h +inlib.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +inlib.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +inlib.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +inlib.o: $(BASHINCDIR)/maxpath.h $(topdir)/subst.h $(topdir)/externs.h +inlib.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ../pathnames.h +jobs.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +jobs.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(srcdir)/bashgetopt.h +jobs.o: $(BASHINCDIR)/maxpath.h $(topdir)/externs.h $(topdir)/jobs.h +jobs.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +jobs.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +jobs.o: $(topdir)/sig.h ../pathnames.h +kill.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +kill.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h +kill.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +kill.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/trap.h $(topdir)/unwind_prot.h +kill.o: $(topdir)/variables.h $(topdir)/conftypes.h $(BASHINCDIR)/maxpath.h +kill.o: $(topdir)/jobs.h ../pathnames.h +let.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +let.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +let.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +let.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +let.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +let.o: ../pathnames.h +printf.o: ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/bashjmp.h +printf.o: $(topdir)/command.h $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +printf.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +printf.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h +printf.o: ../pathnames.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h +printf.o: $(topdir)/variables.h $(topdir)/conftypes.h $(BASHINCDIR)/stdc.h $(srcdir)/bashgetopt.h +printf.o: $(topdir)/bashtypes.h ${srcdir}/common.h $(BASHINCDIR)/chartypes.h +printf.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +printf.o: ../pathnames.h +pushd.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +pushd.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +pushd.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +pushd.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h +pushd.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +pushd.o: $(BASHINCDIR)/maxpath.h $(srcdir)/common.h ./builtext.h +pushd.o: ../pathnames.h +read.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +read.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +read.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +read.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +read.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +read.o: $(BASHINCDIR)/shtty.h $(topdir)/sig.h +read.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +read.o: $(topdir)/arrayfunc.h ../pathnames.h +return.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +return.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +return.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +return.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +return.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h +return.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h +return.o: ../pathnames.h +set.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +set.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h +set.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +set.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +set.o: $(BASHINCDIR)/maxpath.h $(topdir)/error.h $(topdir)/sig.h +set.o: $(topdir)/arrayfunc.h ../pathnames.h $(topdir)/parser.h +setattr.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +setattr.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h +setattr.o: $(topdir)/quit.h $(srcdir)/common.h $(srcdir)/bashgetopt.h +setattr.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +setattr.o: $(topdir)/externs.h $(topdir)/flags.h $(topdir)/sig.h +setattr.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h +setattr.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h +setattr.o: $(topdir)/arrayfunc.h ../pathnames.h +shift.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +shift.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +shift.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +shift.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +shift.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +shift.o: ../pathnames.h +shopt.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +shopt.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +shopt.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +shopt.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +shopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +shopt.o: $(srcdir)/common.h $(srcdir)/bashgetopt.h ../pathnames.h +shopt.o: $(topdir)/bashhist.h $(topdir)/bashline.h $(topdir)/sig.h +source.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +source.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/findcmd.h +source.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +source.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +source.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +source.o: $(srcdir)/bashgetopt.h $(topdir)/flags.h $(topdir)/trap.h +source.o: $(topdir)/execute_cmd.h +source.o: ../pathnames.h +suspend.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +suspend.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +suspend.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +suspend.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +suspend.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +suspend.o: $(topdir)/jobs.h ../pathnames.h +test.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +test.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +test.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +test.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +test.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +test.o: $(topdir)/execute_cmd.h $(topdir)/test.h ../pathnames.h +times.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +times.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +times.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +times.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +times.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +times.o: $(BASHINCDIR)/posixtime.h ../pathnames.h +trap.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +trap.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h +trap.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.h +trap.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +trap.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +trap.o: $(topdir)/findcmd.h ../pathnames.h +type.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +type.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +type.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.h +type.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +type.o: $(topdir)/execute_cmd.h $(topdir)/parser.h +type.o: $(topdir)/externs.h $(topdir)/hashcmd.h ../pathnames.h +type.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +ulimit.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +ulimit.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +ulimit.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +ulimit.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +ulimit.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +ulimit.o: ../pathnames.h +umask.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +umask.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +umask.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +umask.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +umask.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +umask.o: $(BASHINCDIR)/chartypes.h ../pathnames.h +wait.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +wait.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +wait.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h +wait.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +wait.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +wait.o: $(topdir)/jobs.h $(topdir)/sig.h $(topdir)/execute_cmd.h +wait.o: $(BASHINCDIR)/chartypes.h ../pathnames.h + +complete.o: ../config.h ../pathnames.h +complete.o: ${topdir}/shell.h $(topdir)/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h ${topdir}/sig.h +complete.o: ${topdir}/unwind_prot.h ${topdir}/variables.h +complete.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +complete.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +complete.o: ${topdir}/builtins.h ${topdir}/general.h +complete.o: ${topdir}/bashtypes.h ${BASHINCDIR}/chartypes.h ${topdir}/xmalloc.h +complete.o: ${topdir}/pcomplete.h +complete.o: ${srcdir}/common.h ${srcdir}/bashgetopt.h +mapfile.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h +mapfile.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h +mapfile.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +mapfile.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h +mapfile.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/variables.h $(topdir)/conftypes.h +mapfile.o: $(topdir)/arrayfunc.h ../pathnames.h + +#bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h + +# libintl dependencies +bind.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +break.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +caller.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +cd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +common.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +complete.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +declare.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +enable.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +evalfile.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +exec.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +exit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +fc.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +fg_bg.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +getopt.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +hash.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +help.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +history.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +mapfile.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +mkbuiltins.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +return.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +set.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +setattr.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +shift.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +shopt.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +source.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +suspend.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +type.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +ulimit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +umask.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h diff --git a/bash-5.1/builtins_org/alias.def b/bash-5.1/builtins_org/alias.def new file mode 100644 index 0000000000000000000000000000000000000000..0ab906964687aee01701813c8ba4a01a25ce3472 --- /dev/null +++ b/bash-5.1/builtins_org/alias.def @@ -0,0 +1,241 @@ +This file is alias.def, from which is created alias.c +It implements the builtins "alias" and "unalias" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$BUILTIN alias +$FUNCTION alias_builtin +$DEPENDS_ON ALIAS +$PRODUCES alias.c +$SHORT_DOC alias [-p] [name[=value] ... ] +Define or display aliases. + +Without arguments, `alias' prints the list of aliases in the reusable +form `alias NAME=VALUE' on standard output. + +Otherwise, an alias is defined for each NAME whose VALUE is given. +A trailing space in VALUE causes the next word to be checked for +alias substitution when the alias is expanded. + +Options: + -p print all defined aliases in a reusable format + +Exit Status: +alias returns true unless a NAME is supplied for which no alias has been +defined. +$END + +#include + +#if defined (ALIAS) + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +# include "../bashansi.h" +# include "../bashintl.h" + +# include +# include "../shell.h" +# include "../alias.h" +# include "common.h" +# include "bashgetopt.h" + +/* Flags for print_alias */ +#define AL_REUSABLE 0x01 + +static void print_alias PARAMS((alias_t *, int)); + +/* Hack the alias command in a Korn shell way. */ +int +alias_builtin (list) + WORD_LIST *list; +{ + int any_failed, offset, pflag, dflags; + alias_t **alias_list, *t; + char *name, *value; + + dflags = posixly_correct ? 0 : AL_REUSABLE; + pflag = 0; + reset_internal_getopt (); + while ((offset = internal_getopt (list, "p")) != -1) + { + switch (offset) + { + case 'p': + pflag = 1; + dflags |= AL_REUSABLE; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + if (list == 0 || pflag) + { + if (aliases == 0) + return (EXECUTION_SUCCESS); + + alias_list = all_aliases (); + + if (alias_list == 0) + return (EXECUTION_SUCCESS); + + for (offset = 0; alias_list[offset]; offset++) + print_alias (alias_list[offset], dflags); + + free (alias_list); /* XXX - Do not free the strings. */ + + if (list == 0) + return (sh_chkwrite (EXECUTION_SUCCESS)); + } + + any_failed = 0; + while (list) + { + name = list->word->word; + + for (offset = 0; name[offset] && name[offset] != '='; offset++) + ; + + if (offset && name[offset] == '=') + { + name[offset] = '\0'; + value = name + offset + 1; + + if (legal_alias_name (name, 0) == 0) + { + builtin_error (_("`%s': invalid alias name"), name); + any_failed++; + } + else + add_alias (name, value); + } + else + { + t = find_alias (name); + if (t) + print_alias (t, dflags); + else + { + sh_notfound (name); + any_failed++; + } + } + list = list->next; + } + + return (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} +#endif /* ALIAS */ + +$BUILTIN unalias +$FUNCTION unalias_builtin +$DEPENDS_ON ALIAS +$SHORT_DOC unalias [-a] name [name ...] +Remove each NAME from the list of defined aliases. + +Options: + -a remove all alias definitions + +Return success unless a NAME is not an existing alias. +$END + +#if defined (ALIAS) +/* Remove aliases named in LIST from the aliases database. */ +int +unalias_builtin (list) + register WORD_LIST *list; +{ + register alias_t *alias; + int opt, aflag; + + aflag = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "a")) != -1) + { + switch (opt) + { + case 'a': + aflag = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + if (aflag) + { + delete_all_aliases (); + return (EXECUTION_SUCCESS); + } + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + aflag = 0; + while (list) + { + alias = find_alias (list->word->word); + + if (alias) + remove_alias (alias->name); + else + { + sh_notfound (list->word->word); + aflag++; + } + + list = list->next; + } + + return (aflag ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} + +/* Output ALIAS in such a way as to allow it to be read back in. */ +static void +print_alias (alias, flags) + alias_t *alias; + int flags; +{ + char *value; + + value = sh_single_quote (alias->value); + if (flags & AL_REUSABLE) + printf ("alias %s", (alias->name && alias->name[0] == '-') ? "-- " : ""); + printf ("%s=%s\n", alias->name, value); + free (value); + + fflush (stdout); +} +#endif /* ALIAS */ diff --git a/bash-5.1/builtins_org/bashgetopt.c b/bash-5.1/builtins_org/bashgetopt.c new file mode 100644 index 0000000000000000000000000000000000000000..405ced437319a5ef671bcd765e028189d67eb325 --- /dev/null +++ b/bash-5.1/builtins_org/bashgetopt.c @@ -0,0 +1,181 @@ +/* bashgetopt.c -- `getopt' for use by the builtins. */ + +/* Copyright (C) 1992-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashansi.h" +#include +#include + +#include "../shell.h" +#include "common.h" + +#include "bashgetopt.h" + +#define ISOPT(s) (((*(s) == '-') || (plus && *(s) == '+')) && (s)[1]) +#define NOTOPT(s) (((*(s) != '-') && (!plus || *(s) != '+')) || (s)[1] == '\0') + +static int sp; + +char *list_optarg; +int list_optopt; +int list_opttype; + +static WORD_LIST *lhead = (WORD_LIST *)NULL; +WORD_LIST *lcurrent = (WORD_LIST *)NULL; +WORD_LIST *loptend; /* Points to the first non-option argument in the list */ + +int +internal_getopt(list, opts) +WORD_LIST *list; +char *opts; +{ + register int c; + register char *cp; + int plus; /* nonzero means to handle +option */ + static char errstr[3] = { '-', '\0', '\0' }; + + plus = *opts == '+'; + if (plus) + opts++; + + if (list == 0) { + list_optarg = (char *)NULL; + loptend = (WORD_LIST *)NULL; /* No non-option arguments */ + return -1; + } + + if (list != lhead || lhead == 0) { + /* Hmmm.... called with a different word list. Reset. */ + sp = 1; + lcurrent = lhead = list; + loptend = (WORD_LIST *)NULL; + } + + if (sp == 1) { + if (lcurrent == 0 || NOTOPT(lcurrent->word->word)) { + lhead = (WORD_LIST *)NULL; + loptend = lcurrent; + return(-1); + } else if (ISHELP (lcurrent->word->word)) { + lhead = (WORD_LIST *)NULL; + loptend = lcurrent; + return (GETOPT_HELP); + } else if (lcurrent->word->word[0] == '-' && + lcurrent->word->word[1] == '-' && + lcurrent->word->word[2] == 0) { + lhead = (WORD_LIST *)NULL; + loptend = lcurrent->next; + return(-1); + } + errstr[0] = list_opttype = lcurrent->word->word[0]; + } + + list_optopt = c = lcurrent->word->word[sp]; + + if (c == ':' || (cp = strchr(opts, c)) == NULL) { + errstr[1] = c; + sh_invalidopt (errstr); + if (lcurrent->word->word[++sp] == '\0') { + lcurrent = lcurrent->next; + sp = 1; + } + list_optarg = NULL; + if (lcurrent) + loptend = lcurrent->next; + return('?'); + } + + if (*++cp == ':' || *cp == ';') { + /* `:': Option requires an argument. */ + /* `;': option argument may be missing */ + /* We allow -l2 as equivalent to -l 2 */ + if (lcurrent->word->word[sp+1]) { + list_optarg = lcurrent->word->word + sp + 1; + lcurrent = lcurrent->next; + /* If the specifier is `;', don't set optarg if the next + argument looks like another option. */ +#if 0 + } else if (lcurrent->next && (*cp == ':' || lcurrent->next->word->word[0] != '-')) { +#else + } else if (lcurrent->next && (*cp == ':' || NOTOPT(lcurrent->next->word->word))) { +#endif + lcurrent = lcurrent->next; + list_optarg = lcurrent->word->word; + lcurrent = lcurrent->next; + } else if (*cp == ';') { + list_optarg = (char *)NULL; + lcurrent = lcurrent->next; + } else { /* lcurrent->next == NULL */ + errstr[1] = c; + sh_needarg (errstr); + sp = 1; + list_optarg = (char *)NULL; + return('?'); + } + sp = 1; + } else if (*cp == '#') { + /* option requires a numeric argument */ + if (lcurrent->word->word[sp+1]) { + if (DIGIT(lcurrent->word->word[sp+1])) { + list_optarg = lcurrent->word->word + sp + 1; + lcurrent = lcurrent->next; + } else + list_optarg = (char *)NULL; + } else { + if (lcurrent->next && legal_number(lcurrent->next->word->word, (intmax_t *)0)) { + lcurrent = lcurrent->next; + list_optarg = lcurrent->word->word; + lcurrent = lcurrent->next; + } else { + errstr[1] = c; + sh_neednumarg (errstr); + sp = 1; + list_optarg = (char *)NULL; + return ('?'); + } + } + + } else { + /* No argument, just return the option. */ + if (lcurrent->word->word[++sp] == '\0') { + sp = 1; + lcurrent = lcurrent->next; + } + list_optarg = (char *)NULL; + } + + return(c); +} + +/* + * reset_internal_getopt -- force the in[ft]ernal getopt to reset + */ + +void +reset_internal_getopt () +{ + lhead = lcurrent = loptend = (WORD_LIST *)NULL; + sp = 1; +} diff --git a/bash-5.1/builtins_org/bashgetopt.h b/bash-5.1/builtins_org/bashgetopt.h new file mode 100644 index 0000000000000000000000000000000000000000..dcdaa48aa5faa1735edbd19d6602d65e2d1f6b51 --- /dev/null +++ b/bash-5.1/builtins_org/bashgetopt.h @@ -0,0 +1,42 @@ +/* bashgetopt.h -- extern declarations for stuff defined in bashgetopt.c. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* See getopt.h for the explanation of these variables. */ + +#if !defined (__BASH_GETOPT_H) +# define __BASH_GETOPT_H + +#include + +#define GETOPT_EOF -1 +#define GETOPT_HELP -99 + +extern char *list_optarg; + +extern int list_optopt; +extern int list_opttype; + +extern WORD_LIST *lcurrent; +extern WORD_LIST *loptend; + +extern int internal_getopt PARAMS((WORD_LIST *, char *)); +extern void reset_internal_getopt PARAMS((void)); + +#endif /* !__BASH_GETOPT_H */ diff --git a/bash-5.1/builtins_org/bind.def b/bash-5.1/builtins_org/bind.def new file mode 100644 index 0000000000000000000000000000000000000000..ccfc08dcd7b1b8862d3e1297dfc44d66454e9edb --- /dev/null +++ b/bash-5.1/builtins_org/bind.def @@ -0,0 +1,405 @@ +This file is bind.def, from which is created bind.c. +It implements the builtin "bind" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES bind.c + +#include + +$BUILTIN bind +$DEPENDS_ON READLINE +$FUNCTION bind_builtin +$SHORT_DOC bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command] +Set Readline key bindings and variables. + +Bind a key sequence to a Readline function or a macro, or set a +Readline variable. The non-option argument syntax is equivalent to +that found in ~/.inputrc, but must be passed as a single argument: +e.g., bind '"\C-x\C-r": re-read-init-file'. + +Options: + -m keymap Use KEYMAP as the keymap for the duration of this + command. Acceptable keymap names are emacs, + emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, + vi-command, and vi-insert. + -l List names of functions. + -P List function names and bindings. + -p List functions and bindings in a form that can be + reused as input. + -S List key sequences that invoke macros and their values + -s List key sequences that invoke macros and their values + in a form that can be reused as input. + -V List variable names and values + -v List variable names and values in a form that can + be reused as input. + -q function-name Query about which keys invoke the named function. + -u function-name Unbind all keys which are bound to the named function. + -r keyseq Remove the binding for KEYSEQ. + -f filename Read key bindings from FILENAME. + -x keyseq:shell-command Cause SHELL-COMMAND to be executed when + KEYSEQ is entered. + -X List key sequences bound with -x and associated commands + in a form that can be reused as input. + +Exit Status: +bind returns 0 unless an unrecognized option is given or an error occurs. +$END + +#if defined (READLINE) + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#include +#include + +#include "../bashintl.h" + +#include "../shell.h" +#include "../bashline.h" +#include "bashgetopt.h" +#include "common.h" + +static int query_bindings PARAMS((char *)); +static int unbind_command PARAMS((char *)); +static int unbind_keyseq PARAMS((char *)); + +#define BIND_RETURN(x) do { return_code = x; goto bind_exit; } while (0) + +#define LFLAG 0x0001 +#define PFLAG 0x0002 +#define FFLAG 0x0004 +#define VFLAG 0x0008 +#define QFLAG 0x0010 +#define MFLAG 0x0020 +#define RFLAG 0x0040 +#define PPFLAG 0x0080 +#define VVFLAG 0x0100 +#define SFLAG 0x0200 +#define SSFLAG 0x0400 +#define UFLAG 0x0800 +#define XFLAG 0x1000 +#define XXFLAG 0x2000 + +int +bind_builtin (list) + WORD_LIST *list; +{ + int return_code; + Keymap kmap, saved_keymap; + int flags, opt; + char *initfile, *map_name, *fun_name, *unbind_name, *remove_seq, *cmd_seq, *t; + + if (no_line_editing) + { +#if 0 + builtin_error (_("line editing not enabled")); + return (EXECUTION_FAILURE); +#else + builtin_warning (_("line editing not enabled")); +#endif + } + + kmap = saved_keymap = (Keymap) NULL; + flags = 0; + initfile = map_name = fun_name = unbind_name = remove_seq = cmd_seq = (char *)NULL; + return_code = EXECUTION_SUCCESS; + + if (bash_readline_initialized == 0) + initialize_readline (); + + begin_unwind_frame ("bind_builtin"); + unwind_protect_var (rl_outstream); + + rl_outstream = stdout; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "lvpVPsSXf:q:u:m:r:x:")) != -1) + { + switch (opt) + { + case 'l': + flags |= LFLAG; + break; + case 'v': + flags |= VFLAG; + break; + case 'p': + flags |= PFLAG; + break; + case 'f': + flags |= FFLAG; + initfile = list_optarg; + break; + case 'm': + flags |= MFLAG; + map_name = list_optarg; + break; + case 'q': + flags |= QFLAG; + fun_name = list_optarg; + break; + case 'u': + flags |= UFLAG; + unbind_name = list_optarg; + break; + case 'r': + flags |= RFLAG; + remove_seq = list_optarg; + break; + case 'V': + flags |= VVFLAG; + break; + case 'P': + flags |= PPFLAG; + break; + case 's': + flags |= SFLAG; + break; + case 'S': + flags |= SSFLAG; + break; + case 'x': + flags |= XFLAG; + cmd_seq = list_optarg; + break; + case 'X': + flags |= XXFLAG; + break; + case GETOPT_HELP: + default: + builtin_usage (); + BIND_RETURN (EX_USAGE); + } + } + + list = loptend; + + /* First, see if we need to install a special keymap for this + command. Then start on the arguments. */ + + if ((flags & MFLAG) && map_name) + { + kmap = rl_get_keymap_by_name (map_name); + if (kmap == 0) + { + builtin_error (_("`%s': invalid keymap name"), map_name); + BIND_RETURN (EXECUTION_FAILURE); + } + } + + if (kmap) + { + saved_keymap = rl_get_keymap (); + rl_set_keymap (kmap); + } + + /* XXX - we need to add exclusive use tests here. It doesn't make sense + to use some of these options together. */ + /* Now hack the option arguments */ + if (flags & LFLAG) + rl_list_funmap_names (); + + if (flags & PFLAG) + rl_function_dumper (1); + + if (flags & PPFLAG) + rl_function_dumper (0); + + if (flags & SFLAG) + rl_macro_dumper (1); + + if (flags & SSFLAG) + rl_macro_dumper (0); + + if (flags & VFLAG) + rl_variable_dumper (1); + + if (flags & VVFLAG) + rl_variable_dumper (0); + + if ((flags & FFLAG) && initfile) + { + if (rl_read_init_file (initfile) != 0) + { + t = printable_filename (initfile, 0); + builtin_error (_("%s: cannot read: %s"), t, strerror (errno)); + if (t != initfile) + free (t); + BIND_RETURN (EXECUTION_FAILURE); + } + } + + if ((flags & QFLAG) && fun_name) + return_code = query_bindings (fun_name); + + if ((flags & UFLAG) && unbind_name) + return_code = unbind_command (unbind_name); + + if ((flags & RFLAG) && remove_seq) + { + opt = unbind_keyseq (remove_seq); + BIND_RETURN (opt); + } + + if (flags & XFLAG) + return_code = bind_keyseq_to_unix_command (cmd_seq); + + if (flags & XXFLAG) + return_code = print_unix_command_map (); + + /* Process the rest of the arguments as binding specifications. */ + while (list) + { + int olen, nlen, d, i; + char **obindings, **nbindings; + + obindings = rl_invoking_keyseqs (bash_execute_unix_command); + olen = obindings ? strvec_len (obindings) : 0; + + rl_parse_and_bind (list->word->word); + + nbindings = rl_invoking_keyseqs (bash_execute_unix_command); + nlen = nbindings ? strvec_len (nbindings) : 0; + + if (nlen < olen) /* fewer bind -x bindings */ + for (d = olen - nlen, i = 0; i < olen && d > 0; i++) + if (nlen == 0 || strvec_search (nbindings, obindings[i]) >= 0) + { + unbind_unix_command (obindings[i]); + d--; + } + + strvec_dispose (obindings); + strvec_dispose (nbindings); + + list = list->next; + } + + bind_exit: + if (saved_keymap) + rl_set_keymap (saved_keymap); + + run_unwind_frame ("bind_builtin"); + + if (return_code < 0) + return_code = EXECUTION_FAILURE; + + return (sh_chkwrite (return_code)); +} + +static int +query_bindings (name) + char *name; +{ + rl_command_func_t *function; + char **keyseqs; + int j; + + function = rl_named_function (name); + if (function == 0) + { + builtin_error (_("`%s': unknown function name"), name); + return EXECUTION_FAILURE; + } + + keyseqs = rl_invoking_keyseqs (function); + + if (!keyseqs) + { + printf (_("%s is not bound to any keys.\n"), name); + return EXECUTION_FAILURE; + } + + printf (_("%s can be invoked via "), name); + for (j = 0; j < 5 && keyseqs[j]; j++) + printf ("\"%s\"%s", keyseqs[j], keyseqs[j + 1] ? ", " : ".\n"); + if (keyseqs[j]) + printf ("...\n"); + strvec_dispose (keyseqs); + return EXECUTION_SUCCESS; +} + +static int +unbind_command (name) + char *name; +{ + rl_command_func_t *function; + + function = rl_named_function (name); + if (function == 0) + { + builtin_error (_("`%s': unknown function name"), name); + return EXECUTION_FAILURE; + } + + rl_unbind_function_in_map (function, rl_get_keymap ()); + return EXECUTION_SUCCESS; +} + +static int +unbind_keyseq (seq) + char *seq; +{ + char *kseq; + int kslen, type; + rl_command_func_t *f; + + kseq = (char *)xmalloc ((2 * strlen (seq)) + 1); + if (rl_translate_keyseq (seq, kseq, &kslen)) + { + free (kseq); + builtin_error (_("`%s': cannot unbind"), seq); + return EXECUTION_FAILURE; + } + if ((f = rl_function_of_keyseq_len (kseq, kslen, (Keymap)0, &type)) == 0) + { + free (kseq); + return (EXECUTION_SUCCESS); + } + if (type == ISKMAP) + f = ((Keymap) f)[ANYOTHERKEY].function; + + /* I wish this didn't have to translate the key sequence again, but readline + doesn't have a binding function that takes a translated key sequence as + an argument. */ + if (rl_bind_keyseq (seq, (rl_command_func_t *)NULL) != 0) + { + free (kseq); + builtin_error (_("`%s': cannot unbind"), seq); + return (EXECUTION_FAILURE); + } + + if (f == bash_execute_unix_command) + unbind_unix_command (seq); + + free (kseq); + return (EXECUTION_SUCCESS); +} +#endif /* READLINE */ diff --git a/bash-5.1/builtins_org/break.def b/bash-5.1/builtins_org/break.def new file mode 100644 index 0000000000000000000000000000000000000000..b73ed5e5bdf1097d2427cb05192b02a905847c5f --- /dev/null +++ b/bash-5.1/builtins_org/break.def @@ -0,0 +1,143 @@ +This file is break.def, from which is created break.c. +It implements the builtins "break" and "continue" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES break.c + +$BUILTIN break +$FUNCTION break_builtin +$SHORT_DOC break [n] +Exit for, while, or until loops. + +Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing +loops. + +Exit Status: +The exit status is 0 unless N is not greater than or equal to 1. +$END +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "common.h" + +static int check_loop_level PARAMS((void)); + +/* The depth of while's and until's. */ +int loop_level = 0; + +/* Non-zero when a "break" instruction is encountered. */ +int breaking = 0; + +/* Non-zero when we have encountered a continue instruction. */ +int continuing = 0; + +/* Set up to break x levels, where x defaults to 1, but can be specified + as the first argument. */ +int +break_builtin (list) + WORD_LIST *list; +{ + intmax_t newbreak; + + CHECK_HELPOPT (list); + + if (check_loop_level () == 0) + return (EXECUTION_SUCCESS); + + (void)get_numeric_arg (list, 1, &newbreak); + + if (newbreak <= 0) + { + sh_erange (list->word->word, _("loop count")); + breaking = loop_level; + return (EXECUTION_FAILURE); + } + + if (newbreak > loop_level) + newbreak = loop_level; + + breaking = newbreak; + + return (EXECUTION_SUCCESS); +} + +$BUILTIN continue +$FUNCTION continue_builtin +$SHORT_DOC continue [n] +Resume for, while, or until loops. + +Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop. +If N is specified, resumes the Nth enclosing loop. + +Exit Status: +The exit status is 0 unless N is not greater than or equal to 1. +$END + +/* Set up to continue x levels, where x defaults to 1, but can be specified + as the first argument. */ +int +continue_builtin (list) + WORD_LIST *list; +{ + intmax_t newcont; + + CHECK_HELPOPT (list); + + if (check_loop_level () == 0) + return (EXECUTION_SUCCESS); + + (void)get_numeric_arg (list, 1, &newcont); + + if (newcont <= 0) + { + sh_erange (list->word->word, _("loop count")); + breaking = loop_level; + return (EXECUTION_FAILURE); + } + + if (newcont > loop_level) + newcont = loop_level; + + continuing = newcont; + + return (EXECUTION_SUCCESS); +} + +/* Return non-zero if a break or continue command would be okay. + Print an error message if break or continue is meaningless here. */ +static int +check_loop_level () +{ +#if defined (BREAK_COMPLAINS) + if (loop_level == 0 && posixly_correct == 0) + builtin_error (_("only meaningful in a `for', `while', or `until' loop")); +#endif /* BREAK_COMPLAINS */ + + return (loop_level); +} diff --git a/bash-5.1/builtins_org/builtin.def b/bash-5.1/builtins_org/builtin.def new file mode 100644 index 0000000000000000000000000000000000000000..74060ee09f00a4108f5fb358c7706d5a1e1083fa --- /dev/null +++ b/bash-5.1/builtins_org/builtin.def @@ -0,0 +1,85 @@ +This file is builtin.def, from which is created builtin.c. +It implements the builtin "builtin" in Bash. + +Copyright (C) 1987-2017 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES builtin.c + +$BUILTIN builtin +$FUNCTION builtin_builtin +$SHORT_DOC builtin [shell-builtin [arg ...]] +Execute shell builtins. + +Execute SHELL-BUILTIN with arguments ARGs without performing command +lookup. This is useful when you wish to reimplement a shell builtin +as a shell function, but need to execute the builtin within the function. + +Exit Status: +Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is +not a shell builtin. +$END +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../shell.h" +#include "../execute_cmd.h" +#include "common.h" +#include "bashgetopt.h" + +/* Run the command mentioned in list directly, without going through the + normal alias/function/builtin/filename lookup process. */ +int +builtin_builtin (list) + WORD_LIST *list; +{ + sh_builtin_func_t *function; + register char *command; + + if (no_options (list)) + return (EX_USAGE); + list = loptend; /* skip over possible `--' */ + + if (list == 0) + return (EXECUTION_SUCCESS); + + command = list->word->word; +#if defined (DISABLED_BUILTINS) + function = builtin_address (command); +#else /* !DISABLED_BUILTINS */ + function = find_shell_builtin (command); +#endif /* !DISABLED_BUILTINS */ + + if (function == 0) + { + sh_notbuiltin (command); + return (EXECUTION_FAILURE); + } + else + { + this_command_name = command; + this_shell_builtin = function; /* overwrite "builtin" as this builtin */ + list = list->next; + return ((*function) (list)); + } +} diff --git a/bash-5.1/builtins_org/caller.def b/bash-5.1/builtins_org/caller.def new file mode 100644 index 0000000000000000000000000000000000000000..1000979dd90b60aba6e6ce83dc8962edcb57f881 --- /dev/null +++ b/bash-5.1/builtins_org/caller.def @@ -0,0 +1,156 @@ +This file is caller.def, from which is created caller.c. It implements the +builtin "caller" in Bash. + +Copyright (C) 2002-2008 Rocky Bernstein for Free Software Foundation, Inc. +Copyright (C) 2008-2019 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES caller.c + +$BUILTIN caller +$FUNCTION caller_builtin +$DEPENDS_ON DEBUGGER +$SHORT_DOC caller [expr] +Return the context of the current subroutine call. + +Without EXPR, returns "$line $filename". With EXPR, returns +"$line $subroutine $filename"; this extra information can be used to +provide a stack trace. + +The value of EXPR indicates how many call frames to go back before the +current one; the top frame is frame 0. + +Exit Status: +Returns 0 unless the shell is not executing a shell function or EXPR +is invalid. +$END + +#include +#include +#include "chartypes.h" +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include + +#include "../bashintl.h" + +#include "../shell.h" +#include "common.h" +#include "builtext.h" +#include "bashgetopt.h" + +#ifdef LOADABLE_BUILTIN +# include "builtins.h" +#endif + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +int +caller_builtin (list) + WORD_LIST *list; +{ +#if !defined (ARRAY_VARS) + printf ("1 NULL\n"); + return (EXECUTION_FAILURE); +#else + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; + ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; + char *funcname_s, *source_s, *lineno_s; + intmax_t num; + + CHECK_HELPOPT (list); + + GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a); + + if (bash_lineno_a == 0 || array_empty (bash_lineno_a)) + return (EXECUTION_FAILURE); + + if (bash_source_a == 0 || array_empty (bash_source_a)) + return (EXECUTION_FAILURE); + + if (no_options (list)) + return (EX_USAGE); + list = loptend; /* skip over possible `--' */ + + /* If there is no argument list, then give short form: line filename. */ + if (list == 0) + { + lineno_s = array_reference (bash_lineno_a, 0); + source_s = array_reference (bash_source_a, 1); + printf("%s %s\n", lineno_s ? lineno_s : "NULL", source_s ? source_s : "NULL"); + return (EXECUTION_SUCCESS); + } + + if (funcname_a == 0 || array_empty (funcname_a)) + return (EXECUTION_FAILURE); + + if (legal_number (list->word->word, &num)) + { + lineno_s = array_reference (bash_lineno_a, num); + source_s = array_reference (bash_source_a, num+1); + funcname_s = array_reference (funcname_a, num+1); + + if (lineno_s == NULL|| source_s == NULL || funcname_s == NULL) + return (EXECUTION_FAILURE); + + printf("%s %s %s\n", lineno_s, funcname_s, source_s); + } + else + { + sh_invalidnum (list->word->word); + builtin_usage (); + return (EX_USAGE); + } + + return (EXECUTION_SUCCESS); +#endif +} + +#ifdef LOADABLE_BUILTIN +static char *caller_doc[] = { +N_("Returns the context of the current subroutine call.\n\ + \n\ + Without EXPR, returns \"$line $filename\". With EXPR, returns\n\ + \"$line $subroutine $filename\"; this extra information can be used to\n\ + provide a stack trace.\n\ + \n\ + The value of EXPR indicates how many call frames to go back before the\n\ + current one; the top frame is frame 0."), + (char *)NULL +}; + +struct builtin caller_struct = { + "caller", + caller_builtin, + BUILTIN_ENABLED, + caller_doc, + "caller [EXPR]", + 0 +}; + +#endif /* LOADABLE_BUILTIN */ diff --git a/bash-5.1/builtins_org/cd.def b/bash-5.1/builtins_org/cd.def new file mode 100644 index 0000000000000000000000000000000000000000..7205608c672239ba4119a5b6b0252212f2130360 --- /dev/null +++ b/bash-5.1/builtins_org/cd.def @@ -0,0 +1,685 @@ +This file is cd.def, from which is created cd.c. It implements the +builtins "cd" and "pwd" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES cd.c +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashtypes.h" +#include "posixdir.h" +#include "posixstat.h" +#if defined (HAVE_SYS_PARAM_H) +#include +#endif +#include + +#include + +#include "../bashansi.h" +#include "../bashintl.h" + +#include +#include + +#include "../shell.h" +#include "../flags.h" +#include "maxpath.h" +#include "common.h" +#include "bashgetopt.h" + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +extern const char * const bash_getcwd_errstr; + +static int bindpwd PARAMS((int)); +static int setpwd PARAMS((char *)); +static char *resetpwd PARAMS((char *)); +static int change_to_directory PARAMS((char *, int, int)); + +static int cdxattr PARAMS((char *, char **)); +static void resetxattr PARAMS((void)); + +/* Change this to 1 to get cd spelling correction by default. */ +int cdspelling = 0; + +int cdable_vars; + +static int eflag; /* file scope so bindpwd() can see it */ +static int xattrflag; /* O_XATTR support for openat */ +static int xattrfd = -1; + +$BUILTIN cd +$FUNCTION cd_builtin +$SHORT_DOC cd [-L|[-P [-e]] [-@]] [dir] +Change the shell working directory. + +Change the current directory to DIR. The default DIR is the value of the +HOME shell variable. + +The variable CDPATH defines the search path for the directory containing +DIR. Alternative directory names in CDPATH are separated by a colon (:). +A null directory name is the same as the current directory. If DIR begins +with a slash (/), then CDPATH is not used. + +If the directory is not found, and the shell option `cdable_vars' is set, +the word is assumed to be a variable name. If that variable has a value, +its value is used for DIR. + +Options: + -L force symbolic links to be followed: resolve symbolic + links in DIR after processing instances of `..' + -P use the physical directory structure without following + symbolic links: resolve symbolic links in DIR before + processing instances of `..' + -e if the -P option is supplied, and the current working + directory cannot be determined successfully, exit with + a non-zero status +#if defined (O_XATTR) + -@ on systems that support it, present a file with extended + attributes as a directory containing the file attributes +#endif + +The default is to follow symbolic links, as if `-L' were specified. +`..' is processed by removing the immediately previous pathname component +back to a slash or the beginning of DIR. + +Exit Status: +Returns 0 if the directory is changed, and if $PWD is set successfully when +-P is used; non-zero otherwise. +$END + +/* Just set $PWD, don't change OLDPWD. Used by `pwd -P' in posix mode. */ +static int +setpwd (dirname) + char *dirname; +{ + int old_anm; + SHELL_VAR *tvar; + + old_anm = array_needs_making; + tvar = bind_variable ("PWD", dirname ? dirname : "", 0); + if (tvar && readonly_p (tvar)) + return EXECUTION_FAILURE; + if (tvar && old_anm == 0 && array_needs_making && exported_p (tvar)) + { + update_export_env_inplace ("PWD=", 4, dirname ? dirname : ""); + array_needs_making = 0; + } + return EXECUTION_SUCCESS; +} + +static int +bindpwd (no_symlinks) + int no_symlinks; +{ + char *dirname, *pwdvar; + int old_anm, r, canon_failed; + SHELL_VAR *tvar; + + r = sh_chkwrite (EXECUTION_SUCCESS); + +#define tcwd the_current_working_directory + dirname = tcwd ? (no_symlinks ? sh_physpath (tcwd, 0) : tcwd) + : get_working_directory ("cd"); +#undef tcwd + + /* If canonicalization fails, reset dirname to the_current_working_directory */ + canon_failed = 0; + if (dirname == 0) + { + canon_failed = 1; + dirname = the_current_working_directory; + } + + old_anm = array_needs_making; + pwdvar = get_string_value ("PWD"); + + tvar = bind_variable ("OLDPWD", pwdvar, 0); + if (tvar && readonly_p (tvar)) + r = EXECUTION_FAILURE; + + if (old_anm == 0 && array_needs_making && exported_p (tvar)) + { + update_export_env_inplace ("OLDPWD=", 7, pwdvar); + array_needs_making = 0; + } + + if (setpwd (dirname) == EXECUTION_FAILURE) + r = EXECUTION_FAILURE; + if (canon_failed && eflag) + r = EXECUTION_FAILURE; + + if (dirname && dirname != the_current_working_directory) + free (dirname); + + return (r); +} + +/* Call get_working_directory to reset the value of + the_current_working_directory () */ +static char * +resetpwd (caller) + char *caller; +{ + char *tdir; + + FREE (the_current_working_directory); + the_current_working_directory = (char *)NULL; + tdir = get_working_directory (caller); + return (tdir); +} + +static int +cdxattr (dir, ndirp) + char *dir; /* don't assume we can always free DIR */ + char **ndirp; /* return new constructed directory name */ +{ +#if defined (O_XATTR) + int apfd, fd, r, e; + char buf[11+40+40]; /* construct new `fake' path for pwd */ + + apfd = openat (AT_FDCWD, dir, O_RDONLY|O_NONBLOCK); + if (apfd < 0) + return -1; + fd = openat (apfd, ".", O_XATTR); + e = errno; + close (apfd); /* ignore close error for now */ + errno = e; + if (fd < 0) + return -1; + r = fchdir (fd); /* assume fchdir exists everywhere with O_XATTR */ + if (r < 0) + { + close (fd); + return -1; + } + /* NFSv4 and ZFS extended attribute directories do not have names which are + visible in the standard Unix directory tree structure. To ensure we have + a valid name for $PWD, we synthesize one under /proc, but to keep that + path valid, we need to keep the file descriptor open as long as we are in + this directory. This imposes a certain structure on /proc. */ + if (ndirp) + { + sprintf (buf, "/proc/%d/fd/%d", getpid(), fd); + *ndirp = savestring (buf); + } + + if (xattrfd >= 0) + close (xattrfd); + xattrfd = fd; + + return r; +#else + return -1; +#endif +} + +/* Clean up the O_XATTR baggage. Currently only closes xattrfd */ +static void +resetxattr () +{ +#if defined (O_XATTR) + if (xattrfd >= 0) + { + close (xattrfd); + xattrfd = -1; + } +#else + xattrfd = -1; /* not strictly necessary */ +#endif +} + +#define LCD_DOVARS 0x001 +#define LCD_DOSPELL 0x002 +#define LCD_PRINTPATH 0x004 +#define LCD_FREEDIRNAME 0x008 + +/* This builtin is ultimately the way that all user-visible commands should + change the current working directory. It is called by cd_to_string (), + so the programming interface is simple, and it handles errors and + restrictions properly. */ +int +cd_builtin (list) + WORD_LIST *list; +{ + char *dirname, *cdpath, *path, *temp; + int path_index, no_symlinks, opt, lflag, e; + +#if defined (RESTRICTED_SHELL) + if (restricted) + { + sh_restricted ((char *)NULL); + return (EXECUTION_FAILURE); + } +#endif /* RESTRICTED_SHELL */ + + eflag = 0; + no_symlinks = no_symbolic_links; + xattrflag = 0; + reset_internal_getopt (); +#if defined (O_XATTR) + while ((opt = internal_getopt (list, "eLP@")) != -1) +#else + while ((opt = internal_getopt (list, "eLP")) != -1) +#endif + { + switch (opt) + { + case 'P': + no_symlinks = 1; + break; + case 'L': + no_symlinks = 0; + break; + case 'e': + eflag = 1; + break; +#if defined (O_XATTR) + case '@': + xattrflag = 1; + break; +#endif + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + lflag = (cdable_vars ? LCD_DOVARS : 0) | + ((interactive && cdspelling) ? LCD_DOSPELL : 0); + if (eflag && no_symlinks == 0) + eflag = 0; + + if (list == 0) + { + /* `cd' without arguments is equivalent to `cd $HOME' */ + dirname = get_string_value ("HOME"); + + if (dirname == 0) + { + builtin_error (_("HOME not set")); + return (EXECUTION_FAILURE); + } + lflag = 0; + } +#if defined (CD_COMPLAINS) + else if (list->next) + { + builtin_error (_("too many arguments")); + return (EXECUTION_FAILURE); + } +#endif +#if 0 + else if (list->word->word[0] == '\0') + { + builtin_error (_("null directory")); + return (EXECUTION_FAILURE); + } +#endif + else if (list->word->word[0] == '-' && list->word->word[1] == '\0') + { + /* This is `cd -', equivalent to `cd $OLDPWD' */ + dirname = get_string_value ("OLDPWD"); + + if (dirname == 0) + { + builtin_error (_("OLDPWD not set")); + return (EXECUTION_FAILURE); + } +#if 0 + lflag = interactive ? LCD_PRINTPATH : 0; +#else + lflag = LCD_PRINTPATH; /* According to SUSv3 */ +#endif + } + else if (absolute_pathname (list->word->word)) + dirname = list->word->word; + else if (privileged_mode == 0 && (cdpath = get_string_value ("CDPATH"))) + { + dirname = list->word->word; + + /* Find directory in $CDPATH. */ + path_index = 0; + while (path = extract_colon_unit (cdpath, &path_index)) + { + /* OPT is 1 if the path element is non-empty */ + opt = path[0] != '\0'; + temp = sh_makepath (path, dirname, MP_DOTILDE); + free (path); + + if (change_to_directory (temp, no_symlinks, xattrflag)) + { + /* POSIX.2 says that if a nonempty directory from CDPATH + is used to find the directory to change to, the new + directory name is echoed to stdout, whether or not + the shell is interactive. */ + if (opt && (path = no_symlinks ? temp : the_current_working_directory)) + printf ("%s\n", path); + + free (temp); +#if 0 + /* Posix.2 says that after using CDPATH, the resultant + value of $PWD will not contain `.' or `..'. */ + return (bindpwd (posixly_correct || no_symlinks)); +#else + return (bindpwd (no_symlinks)); +#endif + } + else + free (temp); + } + +#if 0 + /* changed for bash-4.2 Posix cd description steps 5-6 */ + /* POSIX.2 says that if `.' does not appear in $CDPATH, we don't + try the current directory, so we just punt now with an error + message if POSIXLY_CORRECT is non-zero. The check for cdpath[0] + is so we don't mistakenly treat a CDPATH value of "" as not + specifying the current directory. */ + if (posixly_correct && cdpath[0]) + { + builtin_error ("%s: %s", dirname, strerror (ENOENT)); + return (EXECUTION_FAILURE); + } +#endif + } + else + dirname = list->word->word; + + /* When we get here, DIRNAME is the directory to change to. If we + chdir successfully, just return. */ + if (change_to_directory (dirname, no_symlinks, xattrflag)) + { + if (lflag & LCD_PRINTPATH) + printf ("%s\n", dirname); + return (bindpwd (no_symlinks)); + } + + /* If the user requests it, then perhaps this is the name of + a shell variable, whose value contains the directory to + change to. */ + if (lflag & LCD_DOVARS) + { + temp = get_string_value (dirname); + if (temp && change_to_directory (temp, no_symlinks, xattrflag)) + { + printf ("%s\n", temp); + return (bindpwd (no_symlinks)); + } + } + + /* If the user requests it, try to find a directory name similar in + spelling to the one requested, in case the user made a simple + typo. This is similar to the UNIX 8th and 9th Edition shells. */ + if (lflag & LCD_DOSPELL) + { + temp = dirspell (dirname); + if (temp && change_to_directory (temp, no_symlinks, xattrflag)) + { + printf ("%s\n", temp); + free (temp); + return (bindpwd (no_symlinks)); + } + else + FREE (temp); + } + + e = errno; + temp = printable_filename (dirname, 0); + builtin_error ("%s: %s", temp, strerror (e)); + if (temp != dirname) + free (temp); + return (EXECUTION_FAILURE); +} + +$BUILTIN pwd +$FUNCTION pwd_builtin +$SHORT_DOC pwd [-LP] +Print the name of the current working directory. + +Options: + -L print the value of $PWD if it names the current working + directory + -P print the physical directory, without any symbolic links + +By default, `pwd' behaves as if `-L' were specified. + +Exit Status: +Returns 0 unless an invalid option is given or the current directory +cannot be read. +$END + +/* Non-zero means that pwd always prints the physical directory, without + symbolic links. */ +static int verbatim_pwd; + +/* Print the name of the current working directory. */ +int +pwd_builtin (list) + WORD_LIST *list; +{ + char *directory; + int opt, pflag; + + verbatim_pwd = no_symbolic_links; + pflag = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "LP")) != -1) + { + switch (opt) + { + case 'P': + verbatim_pwd = pflag = 1; + break; + case 'L': + verbatim_pwd = 0; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + +#define tcwd the_current_working_directory + + directory = tcwd ? (verbatim_pwd ? sh_physpath (tcwd, 0) : tcwd) + : get_working_directory ("pwd"); + + /* Try again using getcwd() if canonicalization fails (for instance, if + the file system has changed state underneath bash). */ + if ((tcwd && directory == 0) || + (posixly_correct && same_file (".", tcwd, (struct stat *)0, (struct stat *)0) == 0)) + { + if (directory && directory != tcwd) + free (directory); + directory = resetpwd ("pwd"); + } + +#undef tcwd + + if (directory) + { + opt = EXECUTION_SUCCESS; + printf ("%s\n", directory); + /* This is dumb but posix-mandated. */ + if (posixly_correct && pflag) + opt = setpwd (directory); + if (directory != the_current_working_directory) + free (directory); + return (sh_chkwrite (opt)); + } + else + return (EXECUTION_FAILURE); +} + +/* Do the work of changing to the directory NEWDIR. Handle symbolic + link following, etc. This function *must* return with + the_current_working_directory either set to NULL (in which case + getcwd() will eventually be called), or set to a string corresponding + to the working directory. Return 1 on success, 0 on failure. */ + +static int +change_to_directory (newdir, nolinks, xattr) + char *newdir; + int nolinks, xattr; +{ + char *t, *tdir, *ndir; + int err, canon_failed, r, ndlen; + + tdir = (char *)NULL; + + if (the_current_working_directory == 0) + { + t = get_working_directory ("chdir"); + FREE (t); + } + + t = make_absolute (newdir, the_current_working_directory); + + /* TDIR is either the canonicalized absolute pathname of NEWDIR + (nolinks == 0) or the absolute physical pathname of NEWDIR + (nolinks != 0). */ + tdir = nolinks ? sh_physpath (t, 0) + : sh_canonpath (t, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + + ndlen = strlen (newdir); + + /* Use the canonicalized version of NEWDIR, or, if canonicalization + failed, use the non-canonical form. */ + canon_failed = 0; + if (tdir && *tdir) + free (t); + else + { + FREE (tdir); + tdir = t; + canon_failed = 1; + } + + /* In POSIX mode, if we're resolving symlinks logically and sh_canonpath + returns NULL (because it checks the path, it will return NULL if the + resolved path doesn't exist), fail immediately. */ +#if defined (ENAMETOOLONG) + if (posixly_correct && nolinks == 0 && canon_failed && (errno != ENAMETOOLONG || ndlen > PATH_MAX)) +#else + if (posixly_correct && nolinks == 0 && canon_failed && ndlen > PATH_MAX) +#endif + { +#if defined ENAMETOOLONG + if (errno != ENOENT && errno != ENAMETOOLONG) +#else + if (errno != ENOENT) +#endif + errno = ENOTDIR; + free (tdir); + return (0); + } + +#if defined (O_XATTR) + if (xattrflag) + { + r = cdxattr (nolinks ? newdir : tdir, &ndir); + if (r >= 0) + { + canon_failed = 0; + free (tdir); + tdir = ndir; + } + else + { + err = errno; + free (tdir); + errno = err; + return (0); /* no xattr */ + } + } + else +#endif + { + r = chdir (nolinks ? newdir : tdir); + if (r >= 0) + resetxattr (); + } + + /* If the chdir succeeds, update the_current_working_directory. */ + if (r == 0) + { + /* If canonicalization failed, but the chdir succeeded, reset the + shell's idea of the_current_working_directory. */ + if (canon_failed) + { + t = resetpwd ("cd"); + if (t == 0) + set_working_directory (tdir); + else + free (t); + } + else + set_working_directory (tdir); + + free (tdir); + return (1); + } + + /* We failed to change to the appropriate directory name. If we tried + what the user passed (nolinks != 0), punt now. */ + if (nolinks) + { + free (tdir); + return (0); + } + + err = errno; + + /* We're not in physical mode (nolinks == 0), but we failed to change to + the canonicalized directory name (TDIR). Try what the user passed + verbatim. If we succeed, reinitialize the_current_working_directory. + POSIX requires that we just fail here, so we do in posix mode. */ + if (posixly_correct == 0 && chdir (newdir) == 0) + { + t = resetpwd ("cd"); + if (t == 0) + set_working_directory (tdir); + else + free (t); + + r = 1; + } + else + { + errno = err; + r = 0; + } + + free (tdir); + return r; +} diff --git a/bash-5.1/builtins_org/colon.def b/bash-5.1/builtins_org/colon.def new file mode 100644 index 0000000000000000000000000000000000000000..6891b0799f14a74ebb195916f55c617a5632b03c --- /dev/null +++ b/bash-5.1/builtins_org/colon.def @@ -0,0 +1,76 @@ +This file is colon.def, from which is created colon.c. +It implements the builtin ":" in Bash. + +Copyright (C) 1987-2019 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES colon.c + +$BUILTIN : +$DOCNAME colon +$FUNCTION colon_builtin +$SHORT_DOC : +Null command. + +No effect; the command does nothing. + +Exit Status: +Always succeeds. +$END + +$BUILTIN true +$FUNCTION colon_builtin +$SHORT_DOC true +Return a successful result. + +Exit Status: +Always succeeds. +$END + +$BUILTIN false +$FUNCTION false_builtin +$SHORT_DOC false +Return an unsuccessful result. + +Exit Status: +Always fails. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashansi.h" +#include "../shell.h" + +/* Return a successful result. */ +int +colon_builtin (ignore) + WORD_LIST *ignore; +{ + return (0); +} + +/* Return an unsuccessful result. */ +int +false_builtin (ignore) + WORD_LIST *ignore; +{ + return (1); +} diff --git a/bash-5.1/builtins_org/command.def b/bash-5.1/builtins_org/command.def new file mode 100644 index 0000000000000000000000000000000000000000..acd46cc1be0062d1ca15777821e1b309645bdb3e --- /dev/null +++ b/bash-5.1/builtins_org/command.def @@ -0,0 +1,145 @@ +This file is command.def, from which is created command.c. +It implements the builtin "command" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES command.c + +$BUILTIN command +$FUNCTION command_builtin +$SHORT_DOC command [-pVv] command [arg ...] +Execute a simple command or display information about commands. + +Runs COMMAND with ARGS suppressing shell function lookup, or display +information about the specified COMMANDs. Can be used to invoke commands +on disk when a function with the same name exists. + +Options: + -p use a default value for PATH that is guaranteed to find all of + the standard utilities + -v print a description of COMMAND similar to the `type' builtin + -V print a more verbose description of each COMMAND + +Exit Status: +Returns exit status of COMMAND, or failure if COMMAND is not found. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashansi.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "../flags.h" +#include "bashgetopt.h" +#include "common.h" + +#if defined (_CS_PATH) && defined (HAVE_CONFSTR) && !HAVE_DECL_CONFSTR +extern size_t confstr PARAMS((int, char *, size_t)); +#endif + +/* Run the commands mentioned in LIST without paying attention to shell + functions. */ +int +command_builtin (list) + WORD_LIST *list; +{ + int result, verbose, use_standard_path, opt; + COMMAND *command; + + verbose = use_standard_path = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "pvV")) != -1) + { + switch (opt) + { + case 'p': + use_standard_path = CDESC_STDPATH; + break; + case 'V': + verbose = CDESC_SHORTDESC|CDESC_ABSPATH; /* look in common.h for constants */ + break; + case 'v': + verbose = CDESC_REUSABLE; /* ditto */ + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + return (EXECUTION_SUCCESS); + +#if defined (RESTRICTED_SHELL) + if (use_standard_path && restricted) + { + sh_restricted ("-p"); + return (EXECUTION_FAILURE); + } +#endif + + if (verbose) + { + int found, any_found; + + for (any_found = 0; list; list = list->next) + { + found = describe_command (list->word->word, verbose|use_standard_path); + + if (found == 0 && verbose != CDESC_REUSABLE) + sh_notfound (list->word->word); + + any_found += found; + } + + return (any_found ? EXECUTION_SUCCESS : EXECUTION_FAILURE); + } + + begin_unwind_frame ("command_builtin"); + +#define COMMAND_BUILTIN_FLAGS (CMD_NO_FUNCTIONS | CMD_INHIBIT_EXPANSION | CMD_COMMAND_BUILTIN | (use_standard_path ? CMD_STDPATH : 0)) + +#ifdef DEBUG + itrace("command_builtin: running execute_command for `%s'", list->word->word); +#endif + + /* We don't want this to be reparsed (consider command echo 'foo &'), so + just make a simple_command structure and call execute_command with it. */ + command = make_bare_simple_command (); + command->value.Simple->words = (WORD_LIST *)copy_word_list (list); + command->value.Simple->redirects = (REDIRECT *)NULL; + command->flags |= COMMAND_BUILTIN_FLAGS; + command->value.Simple->flags |= COMMAND_BUILTIN_FLAGS; + + add_unwind_protect ((char *)dispose_command, command); + result = execute_command (command); + + run_unwind_frame ("command_builtin"); + + return (result); +} diff --git a/bash-5.1/builtins_org/common.c b/bash-5.1/builtins_org/common.c new file mode 100644 index 0000000000000000000000000000000000000000..3c9ac49de174891d6e79b68e04077ec134ee5b64 --- /dev/null +++ b/bash-5.1/builtins_org/common.c @@ -0,0 +1,1017 @@ +/* common.c - utility functions for all builtins */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include +#include "../bashtypes.h" +#include "posixstat.h" +#include + +#include + +#if defined (PREFER_STDARG) +# include +#else +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#define NEED_FPURGE_DECL + +#include "../shell.h" +#include "maxpath.h" +#include "../flags.h" +#include "../parser.h" +#include "../jobs.h" +#include "../builtins.h" +#include "../input.h" +#include "../execute_cmd.h" +#include "../trap.h" +#include "bashgetopt.h" +#include "common.h" +#include "builtext.h" +#include + +#if defined (HISTORY) +# include "../bashhist.h" +#endif + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +extern const char * const bash_getcwd_errstr; + +/* Used by some builtins and the mainline code. */ +sh_builtin_func_t *last_shell_builtin = (sh_builtin_func_t *)NULL; +sh_builtin_func_t *this_shell_builtin = (sh_builtin_func_t *)NULL; + +/* **************************************************************** */ +/* */ +/* Error reporting, usage, and option processing */ +/* */ +/* **************************************************************** */ + +/* This is a lot like report_error (), but it is for shell builtins + instead of shell control structures, and it won't ever exit the + shell. */ + +static void +builtin_error_prolog () +{ + char *name; + + name = get_name_for_error (); + fprintf (stderr, "%s: ", name); + + if (interactive_shell == 0) + fprintf (stderr, _("line %d: "), executing_line_number ()); + + if (this_command_name && *this_command_name) + fprintf (stderr, "%s: ", this_command_name); +} + +void +#if defined (PREFER_STDARG) +builtin_error (const char *format, ...) +#else +builtin_error (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + builtin_error_prolog (); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + va_end (args); + fprintf (stderr, "\n"); +} + +void +#if defined (PREFER_STDARG) +builtin_warning (const char *format, ...) +#else +builtin_warning (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + builtin_error_prolog (); + fprintf (stderr, _("warning: ")); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + va_end (args); + fprintf (stderr, "\n"); +} + +/* Print a usage summary for the currently-executing builtin command. */ +void +builtin_usage () +{ + if (this_command_name && *this_command_name) + fprintf (stderr, _("%s: usage: "), this_command_name); + fprintf (stderr, "%s\n", _(current_builtin->short_doc)); + fflush (stderr); +} + +/* Return if LIST is NULL else barf and jump to top_level. Used by some + builtins that do not accept arguments. */ +void +no_args (list) + WORD_LIST *list; +{ + if (list) + { + builtin_error (_("too many arguments")); + top_level_cleanup (); + jump_to_top_level (DISCARD); + } +} + +/* Check that no options were given to the currently-executing builtin, + and return 0 if there were options. */ +int +no_options (list) + WORD_LIST *list; +{ + int opt; + + reset_internal_getopt (); + if ((opt = internal_getopt (list, "")) != -1) + { + if (opt == GETOPT_HELP) + { + builtin_help (); + return (2); + } + builtin_usage (); + return (1); + } + return (0); +} + +void +sh_needarg (s) + char *s; +{ + builtin_error (_("%s: option requires an argument"), s); +} + +void +sh_neednumarg (s) + char *s; +{ + builtin_error (_("%s: numeric argument required"), s); +} + +void +sh_notfound (s) + char *s; +{ + builtin_error (_("%s: not found"), s); +} + +/* Function called when one of the builtin commands detects an invalid + option. */ +void +sh_invalidopt (s) + char *s; +{ + builtin_error (_("%s: invalid option"), s); +} + +void +sh_invalidoptname (s) + char *s; +{ + builtin_error (_("%s: invalid option name"), s); +} + +void +sh_invalidid (s) + char *s; +{ + builtin_error (_("`%s': not a valid identifier"), s); +} + +void +sh_invalidnum (s) + char *s; +{ + char *msg; + + if (*s == '0' && isdigit ((unsigned char)s[1])) + msg = _("invalid octal number"); + else if (*s == '0' && s[1] == 'x') + msg = _("invalid hex number"); + else + msg = _("invalid number"); + builtin_error ("%s: %s", s, msg); +} + +void +sh_invalidsig (s) + char *s; +{ + builtin_error (_("%s: invalid signal specification"), s); +} + +void +sh_badpid (s) + char *s; +{ + builtin_error (_("`%s': not a pid or valid job spec"), s); +} + +void +sh_readonly (s) + const char *s; +{ + builtin_error (_("%s: readonly variable"), s); +} + +void +sh_erange (s, desc) + char *s, *desc; +{ + if (s) + builtin_error (_("%s: %s out of range"), s, desc ? desc : _("argument")); + else + builtin_error (_("%s out of range"), desc ? desc : _("argument")); +} + +#if defined (JOB_CONTROL) +void +sh_badjob (s) + char *s; +{ + builtin_error (_("%s: no such job"), s); +} + +void +sh_nojobs (s) + char *s; +{ + if (s) + builtin_error (_("%s: no job control"), s); + else + builtin_error (_("no job control")); +} +#endif + +#if defined (RESTRICTED_SHELL) +void +sh_restricted (s) + char *s; +{ + if (s) + builtin_error (_("%s: restricted"), s); + else + builtin_error (_("restricted")); +} +#endif + +void +sh_notbuiltin (s) + char *s; +{ + builtin_error (_("%s: not a shell builtin"), s); +} + +void +sh_wrerror () +{ +#if defined (DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS) && defined (EPIPE) + if (errno != EPIPE) +#endif /* DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS && EPIPE */ + builtin_error (_("write error: %s"), strerror (errno)); +} + +void +sh_ttyerror (set) + int set; +{ + if (set) + builtin_error (_("error setting terminal attributes: %s"), strerror (errno)); + else + builtin_error (_("error getting terminal attributes: %s"), strerror (errno)); +} + +int +sh_chkwrite (s) + int s; +{ + QUIT; + fflush (stdout); + QUIT; + if (ferror (stdout)) + { + sh_wrerror (); + fpurge (stdout); + clearerr (stdout); + return (EXECUTION_FAILURE); + } + return (s); +} + +/* **************************************************************** */ +/* */ +/* Shell positional parameter manipulation */ +/* */ +/* **************************************************************** */ + +/* Convert a WORD_LIST into a C-style argv. Return the number of elements + in the list in *IP, if IP is non-null. A convenience function for + loadable builtins; also used by `test'. */ +char ** +make_builtin_argv (list, ip) + WORD_LIST *list; + int *ip; +{ + char **argv; + + argv = strvec_from_word_list (list, 0, 1, ip); + argv[0] = this_command_name; + return argv; +} + +/* Remember LIST in $1 ... $9, and REST_OF_ARGS. If DESTRUCTIVE is + non-zero, then discard whatever the existing arguments are, else + only discard the ones that are to be replaced. Set POSPARAM_COUNT + to the number of args assigned (length of LIST). */ +void +remember_args (list, destructive) + WORD_LIST *list; + int destructive; +{ + register int i; + + posparam_count = 0; + + for (i = 1; i < 10; i++) + { + if ((destructive || list) && dollar_vars[i]) + { + free (dollar_vars[i]); + dollar_vars[i] = (char *)NULL; + } + + if (list) + { + dollar_vars[posparam_count = i] = savestring (list->word->word); + list = list->next; + } + } + + /* If arguments remain, assign them to REST_OF_ARGS. + Note that copy_word_list (NULL) returns NULL, and + that dispose_words (NULL) does nothing. */ + if (destructive || list) + { + dispose_words (rest_of_args); + rest_of_args = copy_word_list (list); + posparam_count += list_length (list); + } + + if (destructive) + set_dollar_vars_changed (); + + invalidate_cached_quoted_dollar_at (); +} + +void +shift_args (times) + int times; +{ + WORD_LIST *temp; + int count; + + if (times <= 0) /* caller should check */ + return; + + while (times-- > 0) + { + if (dollar_vars[1]) + free (dollar_vars[1]); + + for (count = 1; count < 9; count++) + dollar_vars[count] = dollar_vars[count + 1]; + + if (rest_of_args) + { + temp = rest_of_args; + dollar_vars[9] = savestring (temp->word->word); + rest_of_args = rest_of_args->next; + temp->next = (WORD_LIST *)NULL; + dispose_words (temp); + } + else + dollar_vars[9] = (char *)NULL; + + posparam_count--; + } +} + +int +number_of_args () +{ +#ifdef DEBUG + register WORD_LIST *list; + int n; + + for (n = 0; n < 9 && dollar_vars[n+1]; n++) + ; + for (list = rest_of_args; list; list = list->next) + n++; + +if (n != posparam_count) + itrace("number_of_args: n (%d) != posparam_count (%d)", n, posparam_count); +#endif + + return posparam_count; +} + +static int changed_dollar_vars; + +/* Have the dollar variables been reset to new values since we last + checked? */ +int +dollar_vars_changed () +{ + return (changed_dollar_vars); +} + +void +set_dollar_vars_unchanged () +{ + changed_dollar_vars = 0; +} + +void +set_dollar_vars_changed () +{ + if (variable_context) + changed_dollar_vars |= ARGS_FUNC; + else if (this_shell_builtin == set_builtin) + changed_dollar_vars |= ARGS_SETBLTIN; + else + changed_dollar_vars |= ARGS_INVOC; +} + +/* **************************************************************** */ +/* */ +/* Validating numeric input and arguments */ +/* */ +/* **************************************************************** */ + +/* Read a numeric arg for this_command_name, the name of the shell builtin + that wants it. LIST is the word list that the arg is to come from. + Accept only the numeric argument; report an error if other arguments + follow. If FATAL is 1, call throw_to_top_level, which exits the + shell; if it's 2, call jump_to_top_level (DISCARD), which aborts the + current command; if FATAL is 0, return an indication of an invalid + number by setting *NUMOK == 0 and return -1. */ +int +get_numeric_arg (list, fatal, count) + WORD_LIST *list; + int fatal; + intmax_t *count; +{ + char *arg; + + if (count) + *count = 1; + + if (list && list->word && ISOPTION (list->word->word, '-')) + list = list->next; + + if (list) + { + arg = list->word->word; + if (arg == 0 || (legal_number (arg, count) == 0)) + { + sh_neednumarg (list->word->word ? list->word->word : "`'"); + if (fatal == 0) + return 0; + else if (fatal == 1) /* fatal == 1; abort */ + throw_to_top_level (); + else /* fatal == 2; discard current command */ + { + top_level_cleanup (); + jump_to_top_level (DISCARD); + } + } + no_args (list->next); + } + + return (1); +} + +/* Get an eight-bit status value from LIST */ +int +get_exitstat (list) + WORD_LIST *list; +{ + int status; + intmax_t sval; + char *arg; + + if (list && list->word && ISOPTION (list->word->word, '-')) + list = list->next; + + if (list == 0) + { + /* If we're not running the DEBUG trap, the return builtin, when not + given any arguments, uses the value of $? before the trap ran. If + given an argument, return uses it. This means that the trap can't + change $?. The DEBUG trap gets to change $?, though, since that is + part of its reason for existing, and because the extended debug mode + does things with the return value. */ + if (this_shell_builtin == return_builtin && running_trap > 0 && running_trap != DEBUG_TRAP+1) + return (trap_saved_exit_value); + return (last_command_exit_value); + } + + arg = list->word->word; + if (arg == 0 || legal_number (arg, &sval) == 0) + { + sh_neednumarg (list->word->word ? list->word->word : "`'"); + return EX_BADUSAGE; + } + no_args (list->next); + + status = sval & 255; + return status; +} + +/* Return the octal number parsed from STRING, or -1 to indicate + that the string contained a bad number. */ +int +read_octal (string) + char *string; +{ + int result, digits; + + result = digits = 0; + while (*string && ISOCTAL (*string)) + { + digits++; + result = (result * 8) + (*string++ - '0'); + if (result > 07777) + return -1; + } + + if (digits == 0 || *string) + result = -1; + + return (result); +} + +/* **************************************************************** */ +/* */ +/* Manipulating the current working directory */ +/* */ +/* **************************************************************** */ + +/* Return a consed string which is the current working directory. + FOR_WHOM is the name of the caller for error printing. */ +char *the_current_working_directory = (char *)NULL; + +char * +get_working_directory (for_whom) + char *for_whom; +{ + if (no_symbolic_links) + { + FREE (the_current_working_directory); + the_current_working_directory = (char *)NULL; + } + + if (the_current_working_directory == 0) + { +#if defined (GETCWD_BROKEN) + the_current_working_directory = getcwd (0, PATH_MAX); +#else + the_current_working_directory = getcwd (0, 0); +#endif + if (the_current_working_directory == 0) + { + fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"), + (for_whom && *for_whom) ? for_whom : get_name_for_error (), + _(bash_getcwd_errstr), strerror (errno)); + return (char *)NULL; + } + } + + return (savestring (the_current_working_directory)); +} + +/* Make NAME our internal idea of the current working directory. */ +void +set_working_directory (name) + char *name; +{ + FREE (the_current_working_directory); + the_current_working_directory = savestring (name); +} + +/* **************************************************************** */ +/* */ +/* Job control support functions */ +/* */ +/* **************************************************************** */ + +#if defined (JOB_CONTROL) +int +get_job_by_name (name, flags) + const char *name; + int flags; +{ + register int i, wl, cl, match, job; + register PROCESS *p; + register JOB *j; + + job = NO_JOB; + wl = strlen (name); + for (i = js.j_jobslots - 1; i >= 0; i--) + { + j = get_job_by_jid (i); + if (j == 0 || ((flags & JM_STOPPED) && J_JOBSTATE(j) != JSTOPPED)) + continue; + + p = j->pipe; + do + { + if (flags & JM_EXACT) + { + cl = strlen (p->command); + match = STREQN (p->command, name, cl); + } + else if (flags & JM_SUBSTRING) + match = strcasestr (p->command, name) != (char *)0; + else + match = STREQN (p->command, name, wl); + + if (match == 0) + { + p = p->next; + continue; + } + else if (flags & JM_FIRSTMATCH) + return i; /* return first match */ + else if (job != NO_JOB) + { + if (this_shell_builtin) + builtin_error (_("%s: ambiguous job spec"), name); + else + internal_error (_("%s: ambiguous job spec"), name); + return (DUP_JOB); + } + else + job = i; + } + while (p != j->pipe); + } + + return (job); +} + +/* Return the job spec found in LIST. */ +int +get_job_spec (list) + WORD_LIST *list; +{ + register char *word; + int job, jflags; + + if (list == 0) + return (js.j_current); + + word = list->word->word; + + if (*word == '\0') + return (NO_JOB); + + if (*word == '%') + word++; + + if (DIGIT (*word) && all_digits (word)) + { + job = atoi (word); + return ((job < 0 || job > js.j_jobslots) ? NO_JOB : job - 1); + } + + jflags = 0; + switch (*word) + { + case 0: + case '%': + case '+': + return (js.j_current); + + case '-': + return (js.j_previous); + + case '?': /* Substring search requested. */ + jflags |= JM_SUBSTRING; + word++; + /* FALLTHROUGH */ + + default: + return get_job_by_name (word, jflags); + } +} +#endif /* JOB_CONTROL */ + +/* + * NOTE: `kill' calls this function with forcecols == 0 + */ +int +display_signal_list (list, forcecols) + WORD_LIST *list; + int forcecols; +{ + register int i, column; + char *name; + int result, signum, dflags; + intmax_t lsignum; + + result = EXECUTION_SUCCESS; + if (!list) + { + for (i = 1, column = 0; i < NSIG; i++) + { + name = signal_name (i); + if (STREQN (name, "SIGJUNK", 7) || STREQN (name, "Unknown", 7)) + continue; + + if (posixly_correct && !forcecols) + { + /* This is for the kill builtin. POSIX.2 says the signal names + are displayed without the `SIG' prefix. */ + if (STREQN (name, "SIG", 3)) + name += 3; + printf ("%s%s", name, (i == NSIG - 1) ? "" : " "); + } + else + { + printf ("%2d) %s", i, name); + + if (++column < 5) + printf ("\t"); + else + { + printf ("\n"); + column = 0; + } + } + } + + if ((posixly_correct && !forcecols) || column != 0) + printf ("\n"); + return result; + } + + /* List individual signal names or numbers. */ + while (list) + { + if (legal_number (list->word->word, &lsignum)) + { + /* This is specified by Posix.2 so that exit statuses can be + mapped into signal numbers. */ + if (lsignum > 128) + lsignum -= 128; + if (lsignum < 0 || lsignum >= NSIG) + { + sh_invalidsig (list->word->word); + result = EXECUTION_FAILURE; + list = list->next; + continue; + } + + signum = lsignum; + name = signal_name (signum); + if (STREQN (name, "SIGJUNK", 7) || STREQN (name, "Unknown", 7)) + { + list = list->next; + continue; + } + /* POSIX.2 says that `kill -l signum' prints the signal name without + the `SIG' prefix. */ + printf ("%s\n", (this_shell_builtin == kill_builtin && signum > 0) ? name + 3 : name); + } + else + { + dflags = DSIG_NOCASE; + if (posixly_correct == 0 || this_shell_builtin != kill_builtin) + dflags |= DSIG_SIGPREFIX; + signum = decode_signal (list->word->word, dflags); + if (signum == NO_SIG) + { + sh_invalidsig (list->word->word); + result = EXECUTION_FAILURE; + list = list->next; + continue; + } + printf ("%d\n", signum); + } + list = list->next; + } + return (result); +} + +/* **************************************************************** */ +/* */ +/* Finding builtin commands and their functions */ +/* */ +/* **************************************************************** */ + +/* Perform a binary search and return the address of the builtin function + whose name is NAME. If the function couldn't be found, or the builtin + is disabled or has no function associated with it, return NULL. + Return the address of the builtin. + DISABLED_OKAY means find it even if the builtin is disabled. */ +struct builtin * +builtin_address_internal (name, disabled_okay) + char *name; + int disabled_okay; +{ + int hi, lo, mid, j; + + hi = num_shell_builtins - 1; + lo = 0; + + while (lo <= hi) + { + mid = (lo + hi) / 2; + + j = shell_builtins[mid].name[0] - name[0]; + + if (j == 0) + j = strcmp (shell_builtins[mid].name, name); + + if (j == 0) + { + /* It must have a function pointer. It must be enabled, or we + must have explicitly allowed disabled functions to be found, + and it must not have been deleted. */ + if (shell_builtins[mid].function && + ((shell_builtins[mid].flags & BUILTIN_DELETED) == 0) && + ((shell_builtins[mid].flags & BUILTIN_ENABLED) || disabled_okay)) + return (&shell_builtins[mid]); + else + return ((struct builtin *)NULL); + } + if (j > 0) + hi = mid - 1; + else + lo = mid + 1; + } + return ((struct builtin *)NULL); +} + +/* Return the pointer to the function implementing builtin command NAME. */ +sh_builtin_func_t * +find_shell_builtin (name) + char *name; +{ + current_builtin = builtin_address_internal (name, 0); + return (current_builtin ? current_builtin->function : (sh_builtin_func_t *)NULL); +} + +/* Return the address of builtin with NAME, whether it is enabled or not. */ +sh_builtin_func_t * +builtin_address (name) + char *name; +{ + current_builtin = builtin_address_internal (name, 1); + return (current_builtin ? current_builtin->function : (sh_builtin_func_t *)NULL); +} + +/* Return the function implementing the builtin NAME, but only if it is a + POSIX.2 special builtin. */ +sh_builtin_func_t * +find_special_builtin (name) + char *name; +{ + current_builtin = builtin_address_internal (name, 0); + return ((current_builtin && (current_builtin->flags & SPECIAL_BUILTIN)) ? + current_builtin->function : + (sh_builtin_func_t *)NULL); +} + +static int +shell_builtin_compare (sbp1, sbp2) + struct builtin *sbp1, *sbp2; +{ + int result; + + if ((result = sbp1->name[0] - sbp2->name[0]) == 0) + result = strcmp (sbp1->name, sbp2->name); + + return (result); +} + +/* Sort the table of shell builtins so that the binary search will work + in find_shell_builtin. */ +void +initialize_shell_builtins () +{ + qsort (shell_builtins, num_shell_builtins, sizeof (struct builtin), + (QSFUNC *)shell_builtin_compare); +} + +#if !defined (HELP_BUILTIN) +void +builtin_help () +{ + printf ("%s: %s\n", this_command_name, _("help not available in this version")); +} +#endif + +/* **************************************************************** */ +/* */ +/* Variable assignments during builtin commands */ +/* */ +/* **************************************************************** */ + +SHELL_VAR * +builtin_bind_variable (name, value, flags) + char *name; + char *value; + int flags; +{ + SHELL_VAR *v; + +#if defined (ARRAY_VARS) + if (valid_array_reference (name, assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0) == 0) + v = bind_variable (name, value, flags); + else + v = assign_array_element (name, value, flags | (assoc_expand_once ? ASS_NOEXPAND : 0)); +#else /* !ARRAY_VARS */ + v = bind_variable (name, value, flags); +#endif /* !ARRAY_VARS */ + + if (v && readonly_p (v) == 0 && noassign_p (v) == 0) + VUNSETATTR (v, att_invisible); + + return v; +} + +/* Like check_unbind_variable, but for use by builtins (only matters for + error messages). */ +int +builtin_unbind_variable (vname) + const char *vname; +{ + SHELL_VAR *v; + + v = find_variable (vname); + if (v && readonly_p (v)) + { + builtin_error (_("%s: cannot unset: readonly %s"), vname, "variable"); + return -2; + } + else if (v && non_unsettable_p (v)) + { + builtin_error (_("%s: cannot unset"), vname); + return -2; + } + return (unbind_variable (vname)); +} diff --git a/bash-5.1/builtins_org/common.h b/bash-5.1/builtins_org/common.h new file mode 100644 index 0000000000000000000000000000000000000000..a4f9275d8eb39b7e492296a777eab4b96f3fb651 --- /dev/null +++ b/bash-5.1/builtins_org/common.h @@ -0,0 +1,252 @@ +/* common.h -- extern declarations for functions defined in common.c. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (__COMMON_H) +# define __COMMON_H + +#include "stdc.h" + +#define ISOPTION(s, c) (s[0] == '-' && s[1] == c && !s[2]) +#define ISHELP(s) (STREQ ((s), "--help")) + +#define CHECK_HELPOPT(l) \ +do { \ + if ((l) && (l)->word && ISHELP((l)->word->word)) \ + { \ + builtin_help (); \ + return (EX_USAGE); \ + } \ +} while (0) + +#define CASE_HELPOPT \ + case GETOPT_HELP: \ + builtin_help (); \ + return (EX_USAGE) + +/* Flag values for parse_and_execute () */ +#define SEVAL_NONINT 0x001 +#define SEVAL_INTERACT 0x002 +#define SEVAL_NOHIST 0x004 +#define SEVAL_NOFREE 0x008 +#define SEVAL_RESETLINE 0x010 +#define SEVAL_PARSEONLY 0x020 +#define SEVAL_NOLONGJMP 0x040 +#define SEVAL_FUNCDEF 0x080 /* only allow function definitions */ +#define SEVAL_ONECMD 0x100 /* only allow a single command */ +#define SEVAL_NOHISTEXP 0x200 /* inhibit history expansion */ + +/* Flags for describe_command, shared between type.def and command.def */ +#define CDESC_ALL 0x001 /* type -a */ +#define CDESC_SHORTDESC 0x002 /* command -V */ +#define CDESC_REUSABLE 0x004 /* command -v */ +#define CDESC_TYPE 0x008 /* type -t */ +#define CDESC_PATH_ONLY 0x010 /* type -p */ +#define CDESC_FORCE_PATH 0x020 /* type -ap or type -P */ +#define CDESC_NOFUNCS 0x040 /* type -f */ +#define CDESC_ABSPATH 0x080 /* convert to absolute path, no ./ */ +#define CDESC_STDPATH 0x100 /* command -p */ + +/* Flags for get_job_by_name */ +#define JM_PREFIX 0x01 /* prefix of job name */ +#define JM_SUBSTRING 0x02 /* substring of job name */ +#define JM_EXACT 0x04 /* match job name exactly */ +#define JM_STOPPED 0x08 /* match stopped jobs only */ +#define JM_FIRSTMATCH 0x10 /* return first matching job */ + +/* Flags for remember_args and value of changed_dollar_vars */ +#define ARGS_NONE 0x0 +#define ARGS_INVOC 0x01 +#define ARGS_FUNC 0x02 +#define ARGS_SETBLTIN 0x04 + +/* Maximum number of attribute letters */ +#define MAX_ATTRIBUTES 16 + +/* Functions from common.c */ +extern void builtin_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void builtin_warning PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void builtin_usage PARAMS((void)); +extern void no_args PARAMS((WORD_LIST *)); +extern int no_options PARAMS((WORD_LIST *)); + +/* common error message functions */ +extern void sh_needarg PARAMS((char *)); +extern void sh_neednumarg PARAMS((char *)); +extern void sh_notfound PARAMS((char *)); +extern void sh_invalidopt PARAMS((char *)); +extern void sh_invalidoptname PARAMS((char *)); +extern void sh_invalidid PARAMS((char *)); +extern void sh_invalidnum PARAMS((char *)); +extern void sh_invalidsig PARAMS((char *)); +extern void sh_erange PARAMS((char *, char *)); +extern void sh_badpid PARAMS((char *)); +extern void sh_badjob PARAMS((char *)); +extern void sh_readonly PARAMS((const char *)); +extern void sh_nojobs PARAMS((char *)); +extern void sh_restricted PARAMS((char *)); +extern void sh_notbuiltin PARAMS((char *)); +extern void sh_wrerror PARAMS((void)); +extern void sh_ttyerror PARAMS((int)); +extern int sh_chkwrite PARAMS((int)); + +extern char **make_builtin_argv PARAMS((WORD_LIST *, int *)); +extern void remember_args PARAMS((WORD_LIST *, int)); +extern void shift_args PARAMS((int)); +extern int number_of_args PARAMS((void)); + +extern int dollar_vars_changed PARAMS((void)); +extern void set_dollar_vars_unchanged PARAMS((void)); +extern void set_dollar_vars_changed PARAMS((void)); + +extern int get_numeric_arg PARAMS((WORD_LIST *, int, intmax_t *)); +extern int get_exitstat PARAMS((WORD_LIST *)); +extern int read_octal PARAMS((char *)); + +/* Keeps track of the current working directory. */ +extern char *the_current_working_directory; +extern char *get_working_directory PARAMS((char *)); +extern void set_working_directory PARAMS((char *)); + +#if defined (JOB_CONTROL) +extern int get_job_by_name PARAMS((const char *, int)); +extern int get_job_spec PARAMS((WORD_LIST *)); +#endif +extern int display_signal_list PARAMS((WORD_LIST *, int)); + +/* It's OK to declare a function as returning a Function * without + providing a definition of what a `Function' is. */ +extern struct builtin *builtin_address_internal PARAMS((char *, int)); +extern sh_builtin_func_t *find_shell_builtin PARAMS((char *)); +extern sh_builtin_func_t *builtin_address PARAMS((char *)); +extern sh_builtin_func_t *find_special_builtin PARAMS((char *)); +extern void initialize_shell_builtins PARAMS((void)); + +/* Functions from exit.def */ +extern void bash_logout PARAMS((void)); + +/* Functions from getopts.def */ +extern void getopts_reset PARAMS((int)); + +/* Functions from help.def */ +extern void builtin_help PARAMS((void)); + +/* Functions from read.def */ +extern void read_tty_cleanup PARAMS((void)); +extern int read_tty_modified PARAMS((void)); + +/* Functions from set.def */ +extern int minus_o_option_value PARAMS((char *)); +extern void list_minus_o_opts PARAMS((int, int)); +extern char **get_minus_o_opts PARAMS((void)); +extern int set_minus_o_option PARAMS((int, char *)); + +extern void set_shellopts PARAMS((void)); +extern void parse_shellopts PARAMS((char *)); +extern void initialize_shell_options PARAMS((int)); + +extern void reset_shell_options PARAMS((void)); + +extern char *get_current_options PARAMS((void)); +extern void set_current_options PARAMS((const char *)); + +/* Functions from shopt.def */ +extern void reset_shopt_options PARAMS((void)); +extern char **get_shopt_options PARAMS((void)); + +extern int shopt_setopt PARAMS((char *, int)); +extern int shopt_listopt PARAMS((char *, int)); + +extern int set_login_shell PARAMS((char *, int)); + +extern void set_bashopts PARAMS((void)); +extern void parse_bashopts PARAMS((char *)); +extern void initialize_bashopts PARAMS((int)); + +extern void set_compatibility_opts PARAMS((void)); + +/* Functions from type.def */ +extern int describe_command PARAMS((char *, int)); + +/* Functions from setattr.def */ +extern int set_or_show_attributes PARAMS((WORD_LIST *, int, int)); +extern int show_all_var_attributes PARAMS((int, int)); +extern int show_local_var_attributes PARAMS((int, int)); +extern int show_var_attributes PARAMS((SHELL_VAR *, int, int)); +extern int show_name_attributes PARAMS((char *, int)); +extern int show_localname_attributes PARAMS((char *, int)); +extern int show_func_attributes PARAMS((char *, int)); +extern void set_var_attribute PARAMS((char *, int, int)); +extern int var_attribute_string PARAMS((SHELL_VAR *, int, char *)); + +/* Functions from pushd.def */ +extern char *get_dirstack_from_string PARAMS((char *)); +extern char *get_dirstack_element PARAMS((intmax_t, int)); +extern void set_dirstack_element PARAMS((intmax_t, int, char *)); +extern WORD_LIST *get_directory_stack PARAMS((int)); + +/* Functions from evalstring.c */ +extern int parse_and_execute PARAMS((char *, const char *, int)); +extern int evalstring PARAMS((char *, const char *, int)); +extern void parse_and_execute_cleanup PARAMS((int)); +extern int parse_string PARAMS((char *, const char *, int, char **)); +extern int should_suppress_fork PARAMS((COMMAND *)); +extern int can_optimize_connection PARAMS((COMMAND *)); +extern void optimize_fork PARAMS((COMMAND *)); +extern void optimize_subshell_command PARAMS((COMMAND *)); +extern void optimize_shell_function PARAMS((COMMAND *)); + +/* Functions from evalfile.c */ +extern int maybe_execute_file PARAMS((const char *, int)); +extern int force_execute_file PARAMS((const char *, int)); +extern int source_file PARAMS((const char *, int)); +extern int fc_execute_file PARAMS((const char *)); + +/* variables from common.c */ +extern sh_builtin_func_t *this_shell_builtin; +extern sh_builtin_func_t *last_shell_builtin; + +extern SHELL_VAR *builtin_bind_variable PARAMS((char *, char *, int)); +extern int builtin_unbind_variable PARAMS((const char *)); + +/* variables from evalfile.c */ +extern int sourcelevel; + +/* variables from evalstring.c */ +extern int parse_and_execute_level; + +/* variables from break.def/continue.def */ +extern int breaking; +extern int continuing; +extern int loop_level; + +/* variables from read.def */ +extern int sigalrm_seen; + +/* variables from shift.def */ +extern int print_shift_error; + +/* variables from source.def */ +extern int source_searches_cwd; +extern int source_uses_path; + +/* variables from wait.def */ +extern int wait_intr_flag; + +#endif /* !__COMMON_H */ diff --git a/bash-5.1/builtins_org/complete.def b/bash-5.1/builtins_org/complete.def new file mode 100644 index 0000000000000000000000000000000000000000..28a9ec2f9a5ee9869056016a3a1543fed025f293 --- /dev/null +++ b/bash-5.1/builtins_org/complete.def @@ -0,0 +1,884 @@ +This file is complete.def, from which is created complete.c. +It implements the builtins "complete", "compgen", and "compopt" in Bash. + +Copyright (C) 1999-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES complete.c + +$BUILTIN complete +$DEPENDS_ON PROGRAMMABLE_COMPLETION +$FUNCTION complete_builtin +$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...] +Specify how arguments are to be completed by Readline. + +For each NAME, specify how arguments are to be completed. If no options +are supplied, existing completion specifications are printed in a way that +allows them to be reused as input. + +Options: + -p print existing completion specifications in a reusable format + -r remove a completion specification for each NAME, or, if no + NAMEs are supplied, all completion specifications + -D apply the completions and actions as the default for commands + without any specific completion defined + -E apply the completions and actions to "empty" commands -- + completion attempted on a blank line + -I apply the completions and actions to the initial (usually the + command) word + +When completion is attempted, the actions are applied in the order the +uppercase-letter options are listed above. If multiple options are supplied, +the -D option takes precedence over -E, and both take precedence over -I. + +Exit Status: +Returns success unless an invalid option is supplied or an error occurs. +$END + +#include + +#include + +#include "../bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../builtins.h" +#include "../pcomplete.h" +#include "../bashline.h" + +#include "common.h" +#include "bashgetopt.h" + +#include + +#define STRDUP(x) ((x) ? savestring (x) : (char *)NULL) + +/* Structure containing all the non-action (binary) options; filled in by + build_actions(). */ +struct _optflags { + int pflag; + int rflag; + int Dflag; + int Eflag; + int Iflag; +}; + +static int find_compact PARAMS((char *)); +static int find_compopt PARAMS((char *)); + +static int build_actions PARAMS((WORD_LIST *, struct _optflags *, unsigned long *, unsigned long *)); + +static int remove_cmd_completions PARAMS((WORD_LIST *)); + +static int print_one_completion PARAMS((char *, COMPSPEC *)); +static int print_compitem PARAMS((BUCKET_CONTENTS *)); +static void print_compopts PARAMS((const char *, COMPSPEC *, int)); +static void print_all_completions PARAMS((void)); +static int print_cmd_completions PARAMS((WORD_LIST *)); + +static void print_compoptions PARAMS((unsigned long, int)); +static void print_compactions PARAMS((unsigned long)); +static void print_arg PARAMS((const char *, const char *, int)); +static void print_cmd_name PARAMS((const char *)); + +static char *Garg, *Warg, *Parg, *Sarg, *Xarg, *Farg, *Carg; + +static const struct _compacts { + const char * const actname; + unsigned long actflag; + int actopt; +} compacts[] = { + { "alias", CA_ALIAS, 'a' }, + { "arrayvar", CA_ARRAYVAR, 0 }, + { "binding", CA_BINDING, 0 }, + { "builtin", CA_BUILTIN, 'b' }, + { "command", CA_COMMAND, 'c' }, + { "directory", CA_DIRECTORY, 'd' }, + { "disabled", CA_DISABLED, 0 }, + { "enabled", CA_ENABLED, 0 }, + { "export", CA_EXPORT, 'e' }, + { "file", CA_FILE, 'f' }, + { "function", CA_FUNCTION, 0 }, + { "helptopic", CA_HELPTOPIC, 0 }, + { "hostname", CA_HOSTNAME, 0 }, + { "group", CA_GROUP, 'g' }, + { "job", CA_JOB, 'j' }, + { "keyword", CA_KEYWORD, 'k' }, + { "running", CA_RUNNING, 0 }, + { "service", CA_SERVICE, 's' }, + { "setopt", CA_SETOPT, 0 }, + { "shopt", CA_SHOPT, 0 }, + { "signal", CA_SIGNAL, 0 }, + { "stopped", CA_STOPPED, 0 }, + { "user", CA_USER, 'u' }, + { "variable", CA_VARIABLE, 'v' }, + { (char *)NULL, 0, 0 }, +}; + +/* This should be a STRING_INT_ALIST */ +static const struct _compopt { + const char * const optname; + unsigned long optflag; +} compopts[] = { + { "bashdefault", COPT_BASHDEFAULT }, + { "default", COPT_DEFAULT }, + { "dirnames", COPT_DIRNAMES }, + { "filenames",COPT_FILENAMES}, + { "noquote", COPT_NOQUOTE }, + { "nosort", COPT_NOSORT }, + { "nospace", COPT_NOSPACE }, + { "plusdirs", COPT_PLUSDIRS }, + { (char *)NULL, 0 }, +}; + +static int +find_compact (name) + char *name; +{ + register int i; + + for (i = 0; compacts[i].actname; i++) + if (STREQ (name, compacts[i].actname)) + return i; + return -1; +} + +static int +find_compopt (name) + char *name; +{ + register int i; + + for (i = 0; compopts[i].optname; i++) + if (STREQ (name, compopts[i].optname)) + return i; + return -1; +} + +/* Build the actions and compspec options from the options specified in LIST. + ACTP is a pointer to an unsigned long in which to place the bitmap of + actions. OPTP is a pointer to an unsigned long in which to place the + bitmap of compspec options (arguments to `-o'). PP, if non-null, gets 1 + if -p is supplied; RP, if non-null, gets 1 if -r is supplied. + If either is null, the corresponding option generates an error. + This also sets variables corresponding to options that take arguments as + a side effect; the caller should ensure that those variables are set to + NULL before calling build_actions. Return value: + EX_USAGE = bad option + EXECUTION_SUCCESS = some options supplied + EXECUTION_FAILURE = no options supplied +*/ + +static int +build_actions (list, flagp, actp, optp) + WORD_LIST *list; + struct _optflags *flagp; + unsigned long *actp, *optp; +{ + int opt, ind, opt_given; + unsigned long acts, copts; + WORD_DESC w; + + acts = copts = (unsigned long)0L; + opt_given = 0; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "abcdefgjko:prsuvA:G:W:P:S:X:F:C:DEI")) != -1) + { + opt_given = 1; + switch (opt) + { + case 'r': + if (flagp) + { + flagp->rflag = 1; + break; + } + else + { + sh_invalidopt ("-r"); + builtin_usage (); + return (EX_USAGE); + } + + case 'p': + if (flagp) + { + flagp->pflag = 1; + break; + } + else + { + sh_invalidopt ("-p"); + builtin_usage (); + return (EX_USAGE); + } + + case 'a': + acts |= CA_ALIAS; + break; + case 'b': + acts |= CA_BUILTIN; + break; + case 'c': + acts |= CA_COMMAND; + break; + case 'd': + acts |= CA_DIRECTORY; + break; + case 'e': + acts |= CA_EXPORT; + break; + case 'f': + acts |= CA_FILE; + break; + case 'g': + acts |= CA_GROUP; + break; + case 'j': + acts |= CA_JOB; + break; + case 'k': + acts |= CA_KEYWORD; + break; + case 's': + acts |= CA_SERVICE; + break; + case 'u': + acts |= CA_USER; + break; + case 'v': + acts |= CA_VARIABLE; + break; + case 'o': + ind = find_compopt (list_optarg); + if (ind < 0) + { + sh_invalidoptname (list_optarg); + return (EX_USAGE); + } + copts |= compopts[ind].optflag; + break; + case 'A': + ind = find_compact (list_optarg); + if (ind < 0) + { + builtin_error (_("%s: invalid action name"), list_optarg); + return (EX_USAGE); + } + acts |= compacts[ind].actflag; + break; + case 'C': + Carg = list_optarg; + break; + case 'D': + if (flagp) + { + flagp->Dflag = 1; + break; + } + else + { + sh_invalidopt ("-D"); + builtin_usage (); + return (EX_USAGE); + } + case 'E': + if (flagp) + { + flagp->Eflag = 1; + break; + } + else + { + sh_invalidopt ("-E"); + builtin_usage (); + return (EX_USAGE); + } + case 'I': + if (flagp) + { + flagp->Iflag = 1; + break; + } + else + { + sh_invalidopt ("-I"); + builtin_usage (); + return (EX_USAGE); + } + case 'F': + w.word = Farg = list_optarg; + w.flags = 0; + if (check_identifier (&w, posixly_correct) == 0 || strpbrk (Farg, shell_break_chars) != 0) + { + sh_invalidid (Farg); + return (EX_USAGE); + } + break; + case 'G': + Garg = list_optarg; + break; + case 'P': + Parg = list_optarg; + break; + case 'S': + Sarg = list_optarg; + break; + case 'W': + Warg = list_optarg; + break; + case 'X': + Xarg = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + *actp = acts; + *optp = copts; + + return (opt_given ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +} + +/* Add, remove, and display completion specifiers. */ +int +complete_builtin (list) + WORD_LIST *list; +{ + int opt_given, rval; + unsigned long acts, copts; + COMPSPEC *cs; + struct _optflags oflags; + WORD_LIST *l, *wl; + + if (list == 0) + { + print_all_completions (); + return (EXECUTION_SUCCESS); + } + + opt_given = oflags.pflag = oflags.rflag = 0; + oflags.Dflag = oflags.Eflag = oflags.Iflag = 0; + + acts = copts = (unsigned long)0L; + Garg = Warg = Parg = Sarg = Xarg = Farg = Carg = (char *)NULL; + cs = (COMPSPEC *)NULL; + + /* Build the actions from the arguments. Also sets the [A-Z]arg variables + as a side effect if they are supplied as options. */ + rval = build_actions (list, &oflags, &acts, &copts); + if (rval == EX_USAGE) + return (rval); + opt_given = rval != EXECUTION_FAILURE; + + list = loptend; + + if (oflags.Dflag) + wl = make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL); + else if (oflags.Eflag) + wl = make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL); + else if (oflags.Iflag) + wl = make_word_list (make_bare_word (INITIALWORD), (WORD_LIST *)NULL); + else + wl = (WORD_LIST *)NULL; + + /* -p overrides everything else */ + if (oflags.pflag || (list == 0 && opt_given == 0)) + { + if (wl) + { + rval = print_cmd_completions (wl); + dispose_words (wl); + return rval; + } + else if (list == 0) + { + print_all_completions (); + return (EXECUTION_SUCCESS); + } + return (print_cmd_completions (list)); + } + + /* next, -r overrides everything else. */ + if (oflags.rflag) + { + if (wl) + { + rval = remove_cmd_completions (wl); + dispose_words (wl); + return rval; + } + else if (list == 0) + { + progcomp_flush (); + return (EXECUTION_SUCCESS); + } + return (remove_cmd_completions (list)); + } + + if (wl == 0 && list == 0 && opt_given) + { + builtin_usage (); + return (EX_USAGE); + } + + /* If we get here, we need to build a compspec and add it for each + remaining argument. */ + cs = compspec_create (); + cs->actions = acts; + cs->options = copts; + + cs->globpat = STRDUP (Garg); + cs->words = STRDUP (Warg); + cs->prefix = STRDUP (Parg); + cs->suffix = STRDUP (Sarg); + cs->funcname = STRDUP (Farg); + cs->command = STRDUP (Carg); + cs->filterpat = STRDUP (Xarg); + + for (rval = EXECUTION_SUCCESS, l = wl ? wl : list ; l; l = l->next) + { + /* Add CS as the compspec for the specified commands. */ + if (progcomp_insert (l->word->word, cs) == 0) + rval = EXECUTION_FAILURE; + } + + dispose_words (wl); + return (rval); +} + +static int +remove_cmd_completions (list) + WORD_LIST *list; +{ + WORD_LIST *l; + int ret; + + for (ret = EXECUTION_SUCCESS, l = list; l; l = l->next) + { + if (progcomp_remove (l->word->word) == 0) + { + builtin_error (_("%s: no completion specification"), l->word->word); + ret = EXECUTION_FAILURE; + } + } + return ret; +} + +static void +print_compoptions (copts, full) + unsigned long copts; + int full; +{ + const struct _compopt *co; + + for (co = compopts; co->optname; co++) + if (copts & co->optflag) + printf ("-o %s ", co->optname); + else if (full) + printf ("+o %s ", co->optname); +} + +static void +print_compactions (acts) + unsigned long acts; +{ + const struct _compacts *ca; + + /* simple flags first */ + for (ca = compacts; ca->actname; ca++) + if (ca->actopt && (acts & ca->actflag)) + printf ("-%c ", ca->actopt); + + /* then the rest of the actions */ + for (ca = compacts; ca->actname; ca++) + if (ca->actopt == 0 && (acts & ca->actflag)) + printf ("-A %s ", ca->actname); +} + +static void +print_arg (arg, flag, quote) + const char *arg, *flag; + int quote; +{ + char *x; + + if (arg) + { + x = quote ? sh_single_quote (arg) : (char *)arg; + printf ("%s %s ", flag, x); + if (x != arg) + free (x); + } +} + +static void +print_cmd_name (cmd) + const char *cmd; +{ + if (STREQ (cmd, DEFAULTCMD)) + printf ("-D"); + else if (STREQ (cmd, EMPTYCMD)) + printf ("-E"); + else if (STREQ (cmd, INITIALWORD)) + printf ("-I"); + else if (*cmd == 0) /* XXX - can this happen? */ + printf ("''"); + else + printf ("%s", cmd); +} + +static int +print_one_completion (cmd, cs) + char *cmd; + COMPSPEC *cs; +{ + printf ("complete "); + + print_compoptions (cs->options, 0); + print_compactions (cs->actions); + + /* now the rest of the arguments */ + + /* arguments that require quoting */ + print_arg (cs->globpat, "-G", 1); + print_arg (cs->words, "-W", 1); + print_arg (cs->prefix, "-P", 1); + print_arg (cs->suffix, "-S", 1); + print_arg (cs->filterpat, "-X", 1); + + print_arg (cs->command, "-C", 1); + + /* simple arguments that don't require quoting */ + print_arg (cs->funcname, "-F", 0); + + print_cmd_name (cmd); + printf ("\n"); + + return (0); +} + +static void +print_compopts (cmd, cs, full) + const char *cmd; + COMPSPEC *cs; + int full; +{ + printf ("compopt "); + + print_compoptions (cs->options, full); + print_cmd_name (cmd); + + printf ("\n"); +} + +static int +print_compitem (item) + BUCKET_CONTENTS *item; +{ + COMPSPEC *cs; + char *cmd; + + cmd = item->key; + cs = (COMPSPEC *)item->data; + + return (print_one_completion (cmd, cs)); +} + +static void +print_all_completions () +{ + progcomp_walk (print_compitem); +} + +static int +print_cmd_completions (list) + WORD_LIST *list; +{ + WORD_LIST *l; + COMPSPEC *cs; + int ret; + + for (ret = EXECUTION_SUCCESS, l = list; l; l = l->next) + { + cs = progcomp_search (l->word->word); + if (cs) + print_one_completion (l->word->word, cs); + else + { + builtin_error (_("%s: no completion specification"), l->word->word); + ret = EXECUTION_FAILURE; + } + } + + return (sh_chkwrite (ret)); +} + +$BUILTIN compgen +$DEPENDS_ON PROGRAMMABLE_COMPLETION +$FUNCTION compgen_builtin +$SHORT_DOC compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word] +Display possible completions depending on the options. + +Intended to be used from within a shell function generating possible +completions. If the optional WORD argument is supplied, matches against +WORD are generated. + +Exit Status: +Returns success unless an invalid option is supplied or an error occurs. +$END + +int +compgen_builtin (list) + WORD_LIST *list; +{ + int rval; + unsigned long acts, copts; + COMPSPEC *cs; + STRINGLIST *sl; + char *word, **matches; + char *old_line; + int old_ind; + + if (list == 0) + return (EXECUTION_SUCCESS); + + acts = copts = (unsigned long)0L; + Garg = Warg = Parg = Sarg = Xarg = Farg = Carg = (char *)NULL; + cs = (COMPSPEC *)NULL; + + /* Build the actions from the arguments. Also sets the [A-Z]arg variables + as a side effect if they are supplied as options. */ + rval = build_actions (list, (struct _optflags *)NULL, &acts, &copts); + if (rval == EX_USAGE) + return (rval); + if (rval == EXECUTION_FAILURE) + return (EXECUTION_SUCCESS); + + list = loptend; + + word = (list && list->word) ? list->word->word : ""; + + if (Farg) + builtin_error (_("warning: -F option may not work as you expect")); + if (Carg) + builtin_error (_("warning: -C option may not work as you expect")); + + /* If we get here, we need to build a compspec and evaluate it. */ + cs = compspec_create (); + cs->actions = acts; + cs->options = copts; + cs->refcount = 1; + + cs->globpat = STRDUP (Garg); + cs->words = STRDUP (Warg); + cs->prefix = STRDUP (Parg); + cs->suffix = STRDUP (Sarg); + cs->funcname = STRDUP (Farg); + cs->command = STRDUP (Carg); + cs->filterpat = STRDUP (Xarg); + + rval = EXECUTION_FAILURE; + + /* probably don't have to save these, just being safe */ + old_line = pcomp_line; + old_ind = pcomp_ind; + pcomp_line = (char *)NULL; + pcomp_ind = 0; + sl = gen_compspec_completions (cs, "compgen", word, 0, 0, 0); + pcomp_line = old_line; + pcomp_ind = old_ind; + + /* If the compspec wants the bash default completions, temporarily + turn off programmable completion and call the bash completion code. */ + if ((sl == 0 || sl->list_len == 0) && (copts & COPT_BASHDEFAULT)) + { + matches = bash_default_completion (word, 0, 0, 0, 0); + sl = completions_to_stringlist (matches); + strvec_dispose (matches); + } + + /* This isn't perfect, but it's the best we can do, given what readline + exports from its set of completion utility functions. */ + if ((sl == 0 || sl->list_len == 0) && (copts & COPT_DEFAULT)) + { + matches = rl_completion_matches (word, rl_filename_completion_function); + strlist_dispose (sl); + sl = completions_to_stringlist (matches); + strvec_dispose (matches); + } + + if (sl) + { + if (sl->list && sl->list_len) + { + rval = EXECUTION_SUCCESS; + strlist_print (sl, (char *)NULL); + } + strlist_dispose (sl); + } + + compspec_dispose (cs); + return (rval); +} + +$BUILTIN compopt +$DEPENDS_ON PROGRAMMABLE_COMPLETION +$FUNCTION compopt_builtin +$SHORT_DOC compopt [-o|+o option] [-DEI] [name ...] +Modify or display completion options. + +Modify the completion options for each NAME, or, if no NAMEs are supplied, +the completion currently being executed. If no OPTIONs are given, print +the completion options for each NAME or the current completion specification. + +Options: + -o option Set completion option OPTION for each NAME + -D Change options for the "default" command completion + -E Change options for the "empty" command completion + -I Change options for completion on the initial word + +Using `+o' instead of `-o' turns off the specified option. + +Arguments: + +Each NAME refers to a command for which a completion specification must +have previously been defined using the `complete' builtin. If no NAMEs +are supplied, compopt must be called by a function currently generating +completions, and the options for that currently-executing completion +generator are modified. + +Exit Status: +Returns success unless an invalid option is supplied or NAME does not +have a completion specification defined. +$END + +int +compopt_builtin (list) + WORD_LIST *list; +{ + int opts_on, opts_off, *opts, opt, oind, ret, Dflag, Eflag, Iflag; + WORD_LIST *l, *wl; + COMPSPEC *cs; + + opts_on = opts_off = Eflag = Dflag = Iflag = 0; + ret = EXECUTION_SUCCESS; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "+o:DEI")) != -1) + { + opts = (list_opttype == '-') ? &opts_on : &opts_off; + + switch (opt) + { + case 'o': + oind = find_compopt (list_optarg); + if (oind < 0) + { + sh_invalidoptname (list_optarg); + return (EX_USAGE); + } + *opts |= compopts[oind].optflag; + break; + case 'D': + Dflag = 1; + break; + case 'E': + Eflag = 1; + break; + case 'I': + Iflag = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (Dflag) + wl = make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL); + else if (Eflag) + wl = make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL); + else if (Iflag) + wl = make_word_list (make_bare_word (INITIALWORD), (WORD_LIST *)NULL); + else + wl = (WORD_LIST *)NULL; + + if (list == 0 && wl == 0) + { + if (RL_ISSTATE (RL_STATE_COMPLETING) == 0 || pcomp_curcs == 0) + { + builtin_error (_("not currently executing completion function")); + return (EXECUTION_FAILURE); + } + cs = pcomp_curcs; + + if (opts_on == 0 && opts_off == 0) + { + print_compopts (pcomp_curcmd, cs, 1); + return (sh_chkwrite (ret)); + } + + /* Set the compspec options */ + pcomp_set_compspec_options (cs, opts_on, 1); + pcomp_set_compspec_options (cs, opts_off, 0); + + /* And change the readline variables the options control */ + pcomp_set_readline_variables (opts_on, 1); + pcomp_set_readline_variables (opts_off, 0); + + return (ret); + } + + for (l = wl ? wl : list; l; l = l->next) + { + cs = progcomp_search (l->word->word); + if (cs == 0) + { + builtin_error (_("%s: no completion specification"), l->word->word); + ret = EXECUTION_FAILURE; + continue; + } + if (opts_on == 0 && opts_off == 0) + { + print_compopts (l->word->word, cs, 1); + continue; /* XXX -- fill in later */ + } + + /* Set the compspec options */ + pcomp_set_compspec_options (cs, opts_on, 1); + pcomp_set_compspec_options (cs, opts_off, 0); + } + + if (wl) + dispose_words (wl); + + return (ret); +} diff --git a/bash-5.1/builtins_org/declare.def b/bash-5.1/builtins_org/declare.def new file mode 100644 index 0000000000000000000000000000000000000000..21e4516d194abbc5eb4b0abdd01c4f3858b300e1 --- /dev/null +++ b/bash-5.1/builtins_org/declare.def @@ -0,0 +1,1000 @@ +This file is declare.def, from which is created declare.c. +It implements the builtins "declare" and "local" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES declare.c + +$BUILTIN declare +$FUNCTION declare_builtin +$SHORT_DOC declare [-aAfFgiIlnrtux] [-p] [name[=value] ...] +Set variable values and attributes. + +Declare variables and give them attributes. If no NAMEs are given, +display the attributes and values of all variables. + +Options: + -f restrict action or display to function names and definitions + -F restrict display to function names only (plus line number and + source file when debugging) + -g create global variables when used in a shell function; otherwise + ignored + -I if creating a local variable, inherit the attributes and value + of a variable with the same name at a previous scope + -p display the attributes and value of each NAME + +Options which set attributes: + -a to make NAMEs indexed arrays (if supported) + -A to make NAMEs associative arrays (if supported) + -i to make NAMEs have the `integer' attribute + -l to convert the value of each NAME to lower case on assignment + -n make NAME a reference to the variable named by its value + -r to make NAMEs readonly + -t to make NAMEs have the `trace' attribute + -u to convert the value of each NAME to upper case on assignment + -x to make NAMEs export + +Using `+' instead of `-' turns off the given attribute. + +Variables with the integer attribute have arithmetic evaluation (see +the `let' command) performed when the variable is assigned a value. + +When used in a function, `declare' makes NAMEs local, as with the `local' +command. The `-g' option suppresses this behavior. + +Exit Status: +Returns success unless an invalid option is supplied or a variable +assignment error occurs. +$END + +$BUILTIN typeset +$FUNCTION declare_builtin +$SHORT_DOC typeset [-aAfFgiIlnrtux] [-p] name[=value] ... +Set variable values and attributes. + +A synonym for `declare'. See `help declare'. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../flags.h" +#include "common.h" +#include "builtext.h" +#include "bashgetopt.h" + +static SHELL_VAR *declare_find_variable PARAMS((const char *, int, int)); +static int declare_internal PARAMS((register WORD_LIST *, int)); + +/* Declare or change variable attributes. */ +int +declare_builtin (list) + register WORD_LIST *list; +{ + return (declare_internal (list, 0)); +} + +$BUILTIN local +$FUNCTION local_builtin +$SHORT_DOC local [option] name[=value] ... +Define local variables. + +Create a local variable called NAME, and give it VALUE. OPTION can +be any option accepted by `declare'. + +Local variables can only be used within a function; they are visible +only to the function where they are defined and its children. + +Exit Status: +Returns success unless an invalid option is supplied, a variable +assignment error occurs, or the shell is not executing a function. +$END +int +local_builtin (list) + register WORD_LIST *list; +{ + /* Catch a straight `local --help' before checking function context */ + if (list && list->word && STREQ (list->word->word, "--help")) + { + builtin_help (); + return (EX_USAGE); + } + + if (variable_context) + return (declare_internal (list, 1)); + else + { + builtin_error (_("can only be used in a function")); + return (EXECUTION_FAILURE); + } +} + +#if defined (ARRAY_VARS) +# define DECLARE_OPTS "+acfgilnprtuxAFGI" +#else +# define DECLARE_OPTS "+cfgilnprtuxFGI" +#endif + +static SHELL_VAR * +declare_find_variable (name, mkglobal, chklocal) + const char *name; + int mkglobal, chklocal; +{ + SHELL_VAR *var; + + if (mkglobal == 0) + return (find_variable (name)); + else if (chklocal) + { + var = find_variable (name); + if (var && local_p (var) && var->context == variable_context) + return var; + return (find_global_variable (name)); + } + else + return (find_global_variable (name)); +} + +/* The workhorse function. */ +static int +declare_internal (list, local_var) + register WORD_LIST *list; + int local_var; +{ + int flags_on, flags_off, *flags; + int any_failed, assign_error, pflag, nodefs, opt, onref, offref; + int mkglobal, chklocal, inherit_flag; + char *t, *subscript_start; + SHELL_VAR *var, *refvar, *v; + FUNCTION_DEF *shell_fn; + + flags_on = flags_off = any_failed = assign_error = pflag = nodefs = 0; + mkglobal = chklocal = inherit_flag = 0; + refvar = (SHELL_VAR *)NULL; + reset_internal_getopt (); + while ((opt = internal_getopt (list, DECLARE_OPTS)) != -1) + { + flags = list_opttype == '+' ? &flags_off : &flags_on; + + /* If you add options here, see whether or not they need to be added to + the loop in subst.c:shell_expand_word_list() */ + switch (opt) + { + case 'a': +#if defined (ARRAY_VARS) + *flags |= att_array; + break; +#else + builtin_usage (); + return (EX_USAGE); +#endif + case 'A': +#if defined (ARRAY_VARS) + *flags |= att_assoc; + break; +#else + builtin_usage (); + return (EX_USAGE); +#endif + case 'p': +/* if (local_var == 0) */ + pflag++; + break; + case 'F': + nodefs++; + *flags |= att_function; + break; + case 'f': + *flags |= att_function; + break; + case 'G': + if (flags == &flags_on) + chklocal = 1; + /*FALLTHROUGH*/ + case 'g': + if (flags == &flags_on) + mkglobal = 1; + break; + case 'i': + *flags |= att_integer; + break; + case 'n': + *flags |= att_nameref; + break; + case 'r': + *flags |= att_readonly; + break; + case 't': + *flags |= att_trace; + break; + case 'x': + *flags |= att_exported; + array_needs_making = 1; + break; +#if defined (CASEMOD_ATTRS) +# if defined (CASEMOD_CAPCASE) + case 'c': + *flags |= att_capcase; + if (flags == &flags_on) + flags_off |= att_uppercase|att_lowercase; + break; +# endif + case 'l': + *flags |= att_lowercase; + if (flags == &flags_on) + flags_off |= att_capcase|att_uppercase; + break; + case 'u': + *flags |= att_uppercase; + if (flags == &flags_on) + flags_off |= att_capcase|att_lowercase; + break; +#endif /* CASEMOD_ATTRS */ + case 'I': + inherit_flag = MKLOC_INHERIT; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + /* If there are no more arguments left, then we just want to show + some variables. */ + if (list == 0) /* declare -[aAfFirtx] */ + { + /* Show local variables defined at this context level if this is + the `local' builtin. */ + if (local_var) + show_local_var_attributes (0, nodefs); /* XXX - fix up args later */ + else if (pflag && (flags_on == 0 || flags_on == att_function)) + show_all_var_attributes (flags_on == 0, nodefs); + else if (flags_on == 0) + return (set_builtin ((WORD_LIST *)NULL)); + else + set_or_show_attributes ((WORD_LIST *)NULL, flags_on, nodefs); + + return (sh_chkwrite (EXECUTION_SUCCESS)); + } + + if (pflag) /* declare -p [-aAfFirtx] name [name...] */ + { + for (any_failed = 0; list; list = list->next) + { + if (flags_on & att_function) + pflag = show_func_attributes (list->word->word, nodefs); + else if (local_var) + pflag = show_localname_attributes (list->word->word, nodefs); + else + pflag = show_name_attributes (list->word->word, nodefs); + if (pflag) + { + sh_notfound (list->word->word); + any_failed++; + } + } + return (sh_chkwrite (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS)); + } + +#define NEXT_VARIABLE() free (name); list = list->next; continue + + /* There are arguments left, so we are making variables. */ + while (list) /* declare [-aAfFirx] name [name ...] */ + { + char *value, *name, *oldname; + int offset, aflags, wflags, created_var, namelen; + int assoc_noexpand; +#if defined (ARRAY_VARS) + int making_array_special, compound_array_assign, simple_array_assign; + int var_exists, array_exists, creating_array, array_subscript_assignment; +#endif + + name = savestring (list->word->word); + wflags = list->word->flags; +#if defined (ARRAY_VARS) + assoc_noexpand = assoc_expand_once && (wflags & W_ASSIGNMENT); +#else + assoc_noexpand = 0; +#endif + offset = assignment (name, assoc_noexpand ? 2 : 0); + aflags = 0; + created_var = 0; + + if (local_var && variable_context && STREQ (name, "-")) + { + var = make_local_variable ("-", 0); + FREE (value_cell (var)); /* just in case */ + value = get_current_options (); + var_setvalue (var, value); + VSETATTR (var, att_invisible); + NEXT_VARIABLE (); + } + + if (offset) /* declare [-aAfFirx] name=value */ + { + name[offset] = '\0'; + value = name + offset + 1; + if (name[offset - 1] == '+') + { + aflags |= ASS_APPEND; + name[offset - 1] = '\0'; + } + } + else + value = ""; + + /* Do some lexical error checking on the LHS and RHS of the assignment + that is specific to nameref variables. */ + if (flags_on & att_nameref) + { +#if defined (ARRAY_VARS) + if (valid_array_reference (name, 0)) + { + builtin_error (_("%s: reference variable cannot be an array"), name); + assign_error++; + NEXT_VARIABLE (); + } + else +#endif + /* disallow self references at global scope, warn at function scope */ + if (check_selfref (name, value, 0)) + { + if (variable_context == 0) + { + builtin_error (_("%s: nameref variable self references not allowed"), name); + assign_error++; + NEXT_VARIABLE (); + } + else + builtin_warning (_("%s: circular name reference"), name); + } +#if 1 + if (value && *value && (aflags & ASS_APPEND) == 0 && valid_nameref_value (value, 1) == 0) + { + builtin_error (_("`%s': invalid variable name for name reference"), value); + assign_error++; + NEXT_VARIABLE (); + } +#endif + } + +restart_new_var_name: +#if defined (ARRAY_VARS) + var_exists = array_exists = creating_array = 0; + compound_array_assign = simple_array_assign = 0; + array_subscript_assignment = 0; + subscript_start = (char *)NULL; + if ((t = strchr (name, '[')) && (flags_on & att_function) == 0) /* ] */ + { + /* If offset != 0 we have already validated any array reference + because assignment() calls skipsubscript() */ + if (offset == 0 && valid_array_reference (name, 0) == 0) + { + sh_invalidid (name); + assign_error++; + NEXT_VARIABLE (); + } + subscript_start = t; + *t = '\0'; + making_array_special = 1; /* XXX - should this check offset? */ + array_subscript_assignment = offset != 0; + } + else + making_array_special = 0; +#endif + + /* If we're in posix mode or not looking for a shell function (since + shell function names don't have to be valid identifiers when the + shell's not in posix mode), check whether or not the argument is a + valid, well-formed shell identifier. */ + if ((posixly_correct || (flags_on & att_function) == 0) && legal_identifier (name) == 0) + { + sh_invalidid (name); + assign_error++; + NEXT_VARIABLE (); + } + + /* If VARIABLE_CONTEXT has a non-zero value, then we are executing + inside of a function. This means we should make local variables, + not global ones. */ + + /* XXX - this has consequences when we're making a local copy of a + variable that was in the temporary environment. Watch out + for this. */ + refvar = (SHELL_VAR *)NULL; + if (variable_context && mkglobal == 0 && ((flags_on & att_function) == 0)) + { + char *newname; + + /* check name for validity here? */ + var = find_variable (name); + if (var == 0) + newname = nameref_transform_name (name, ASS_MKLOCAL); + else if ((flags_on & att_nameref) == 0 && (flags_off & att_nameref) == 0) + { + /* Ok, we're following namerefs here, so let's make sure that if + we followed one, it was at the same context (see below for + more details). */ + refvar = find_variable_last_nameref (name, 1); + newname = (refvar && refvar->context != variable_context) ? name : var->name; + refvar = (SHELL_VAR *)NULL; + } + else + newname = name; /* dealing with nameref attribute */ + +#if defined (ARRAY_VARS) + /* Pass 1 as second argument to make_local_{assoc,array}_variable + return an existing {array,assoc} variable to be flagged as an + error below. */ + if (flags_on & att_assoc) + var = make_local_assoc_variable (newname, MKLOC_ARRAYOK|inherit_flag); + else if ((flags_on & att_array) || making_array_special) + var = make_local_array_variable (newname, MKLOC_ASSOCOK|inherit_flag); + else +#endif + if (offset == 0 && (flags_on & att_nameref)) + { + /* First look for refvar at current scope */ + refvar = find_variable_last_nameref (name, 1); + /* VARIABLE_CONTEXT != 0, so we are attempting to create or modify + the attributes for a local variable at the same scope. If we've + used a reference from a previous context to resolve VAR, we + want to throw REFVAR and VAR away and create a new local var. */ + if (refvar && refvar->context != variable_context) + { + refvar = 0; + var = make_local_variable (name, inherit_flag); + } + else if (refvar && refvar->context == variable_context) + var = refvar; + /* Maybe we just want to create a new local variable */ + else if (var == 0 || var->context != variable_context) + var = make_local_variable (name, inherit_flag); + /* otherwise we have a var at the right context */ + } + else + /* XXX - check name for validity here with valid_nameref_value */ + var = make_local_variable ((flags_on & att_nameref) ? name : newname, inherit_flag); /* sets att_invisible for new vars */ + + if (var == 0) + { + any_failed++; + NEXT_VARIABLE (); + } + if (var && nameref_p (var) && readonly_p (var) && nameref_cell (var) && (flags_off & att_nameref)) + { + sh_readonly (name); + any_failed++; + NEXT_VARIABLE (); + } + } + else + var = (SHELL_VAR *)NULL; + + /* If we are declaring a function, then complain about it in some way. + We don't let people make functions by saying `typeset -f foo=bar'. */ + + /* There should be a way, however, to let people look at a particular + function definition by saying `typeset -f foo'. */ + + if (flags_on & att_function) + { + if (offset) /* declare -f [-rix] foo=bar */ + { + builtin_error (_("cannot use `-f' to make functions")); + free (name); + return (EXECUTION_FAILURE); + } + else /* declare -f [-rx] name [name...] */ + { + var = find_function (name); + + if (var) + { + if (readonly_p (var) && (flags_off & att_readonly)) + { + builtin_error (_("%s: readonly function"), name); + any_failed++; + NEXT_VARIABLE (); + } + else if (flags_on & (att_array|att_assoc)) + { + sh_invalidopt ((flags_on & att_array) ? "-a" : "-A"); + any_failed++; + NEXT_VARIABLE (); + } + /* declare -[Ff] name [name...] */ + if (flags_on == att_function && flags_off == 0) + { +#if defined (DEBUGGER) + if (nodefs && debugging_mode) + { + shell_fn = find_function_def (var->name); + if (shell_fn) + printf ("%s %d %s\n", var->name, shell_fn->line, shell_fn->source_file); + else + printf ("%s\n", var->name); + } + else +#endif /* DEBUGGER */ + { + t = nodefs ? var->name + : named_function_string (name, function_cell (var), FUNC_MULTILINE|FUNC_EXTERNAL); + printf ("%s\n", t); + any_failed = sh_chkwrite (any_failed); + } + } + else /* declare -[fF] -[rx] name [name...] */ + { + VSETATTR (var, flags_on); + flags_off &= ~att_function; /* makes no sense */ + VUNSETATTR (var, flags_off); + } + } + else + any_failed++; + NEXT_VARIABLE (); + } + } + else /* declare -[aAinrx] name [name...] */ + { + /* Non-null if we just created or fetched a local variable. */ +#if 0 + /* This is bash-4.3 code. */ + /* Here's what ksh93 seems to do. If we are modifying an existing + nameref variable, we don't follow the nameref chain past the last + nameref, and we set the nameref variable's value so future + references to that variable will return the value of the variable + we're assigning right now. */ +#else + /* Here's what ksh93 seems to do as of the 2012 version: if we are + using declare -n to modify the value of an existing nameref + variable, don't follow the nameref chain at all and just search + for a nameref at the current context. If we have a nameref, + modify its value (changing which variable it references). */ +#endif + if (var == 0 && (flags_on & att_nameref)) + { + /* See if we are trying to modify an existing nameref variable, + but don't follow the nameref chain. */ + var = mkglobal ? find_global_variable_noref (name) : find_variable_noref (name); + if (var && nameref_p (var) == 0) + var = 0; + } + /* However, if we're turning off the nameref attribute on an existing + nameref variable, we first follow the nameref chain to the end, + modify the value of the variable this nameref variable references + if there is an assignment statement argument, + *CHANGING ITS VALUE AS A SIDE EFFECT*, then turn off the nameref + flag *LEAVING THE NAMEREF VARIABLE'S VALUE UNCHANGED* */ + else if (var == 0 && (flags_off & att_nameref)) + { + /* See if we are trying to modify an existing nameref variable */ + refvar = mkglobal ? find_global_variable_last_nameref (name, 0) : find_variable_last_nameref (name, 0); + if (refvar && nameref_p (refvar) == 0) + refvar = 0; + /* If the nameref is readonly but doesn't have a value, ksh93 + allows the nameref attribute to be removed. If it's readonly + and has a value, even if the value doesn't reference an + existing variable, we disallow the modification */ + if (refvar && nameref_cell (refvar) && readonly_p (refvar)) + { + sh_readonly (name); + any_failed++; + NEXT_VARIABLE (); + } + + /* If all we're doing is turning off the nameref attribute, don't + bother with VAR at all, whether it exists or not. Just turn it + off and go on. */ + if (refvar && flags_on == 0 && offset == 0 && (flags_off & ~att_nameref) == 0) + { + VUNSETATTR (refvar, att_nameref); + NEXT_VARIABLE (); + } + + if (refvar) + /* XXX - use declare_find_variable here? */ + var = mkglobal ? find_global_variable (nameref_cell (refvar)) : find_variable (nameref_cell (refvar)); + } +#if defined (ARRAY_VARS) + /* If we have an array assignment to a nameref, remove the nameref + attribute and go on. */ + else if (var == 0 && offset && array_subscript_assignment) + { + var = mkglobal ? find_global_variable_noref (name) : find_variable_noref (name); + if (var && nameref_p (var)) + { + internal_warning (_("%s: removing nameref attribute"), name); + FREE (value_cell (var)); /* XXX - bash-4.3 compat */ + var_setvalue (var, (char *)NULL); + VUNSETATTR (var, att_nameref); + } + } +#endif + + /* See if we are trying to set flags or value (or create) for an + existing nameref that points to a non-existent variable: e.g., + declare -n foo=bar + unset foo # unsets bar + declare -i foo + foo=4+4 + declare -p foo */ + if (var == 0 && (mkglobal || flags_on || flags_off || offset)) + { + refvar = mkglobal ? find_global_variable_last_nameref (name, 0) : find_variable_last_nameref (name, 0); + if (refvar && nameref_p (refvar) == 0) + refvar = 0; + if (refvar) + /* XXX - use declare_find_variable here? */ + var = mkglobal ? find_global_variable (nameref_cell (refvar)) : find_variable (nameref_cell (refvar)); + if (refvar && var == 0) + { + oldname = name; /* need to free this */ + + namelen = strlen (nameref_cell (refvar)); +#if defined (ARRAY_VARS) + if (subscript_start) + { + *subscript_start = '['; /*]*/ + namelen += strlen (subscript_start); + } +#endif + name = xmalloc (namelen + 2 + strlen (value) + 1); + strcpy (name, nameref_cell (refvar)); +#if defined (ARRAY_VARS) + if (subscript_start) + strcpy (name + strlen (nameref_cell (refvar)), subscript_start); +#endif + /* We are committed to using the new name, so reset */ + if (offset) + { + /* Rebuild assignment and restore offset and value */ + if (aflags & ASS_APPEND) + name[namelen++] = '+'; + name[namelen++] = '='; + if (value && *value) + strcpy (name + namelen, value); + else + name[namelen] = '\0'; + offset = assignment (name, 0); + /* if offset was valid previously, but the substituting + of the nameref value results in an invalid assignment, + throw an invalid identifier error */ + if (offset == 0) + { + free (oldname); + sh_invalidid (name); + assign_error++; + NEXT_VARIABLE (); + } + name[offset] = '\0'; + value = name + namelen; + } + free (oldname); + + /* OK, let's turn off the nameref attribute. + Now everything else applies to VAR. */ + if (flags_off & att_nameref) + VUNSETATTR (refvar, att_nameref); + + goto restart_new_var_name; + /* NOTREACHED */ + } + } + if (var == 0) + var = declare_find_variable (name, mkglobal, chklocal); + +#if defined (ARRAY_VARS) + var_exists = var != 0; + array_exists = var && (array_p (var) || assoc_p (var)); + creating_array = flags_on & (att_array|att_assoc); +#endif + + if (var == 0) + { +#if defined (ARRAY_VARS) + if (flags_on & att_assoc) + { + var = make_new_assoc_variable (name); + if (var && offset == 0) + VSETATTR (var, att_invisible); + } + else if ((flags_on & att_array) || making_array_special) + { + var = make_new_array_variable (name); + if (var && offset == 0) + VSETATTR (var, att_invisible); + } + else +#endif + { + var = mkglobal ? bind_global_variable (name, (char *)NULL, ASS_FORCE) : bind_variable (name, (char *)NULL, ASS_FORCE); + if (var && offset == 0) + VSETATTR (var, att_invisible); + } + if (var == 0) + { + /* Has to appear in brackets */ + NEXT_VARIABLE (); + } + created_var = 1; + } + /* Can't take an existing array variable and make it a nameref */ + else if ((array_p (var) || assoc_p (var)) && (flags_on & att_nameref)) + { + builtin_error (_("%s: reference variable cannot be an array"), name); + assign_error++; + NEXT_VARIABLE (); + } + else if (nameref_p (var) && (flags_on & att_nameref) == 0 && (flags_off & att_nameref) == 0 && offset && valid_nameref_value (value, 1) == 0) + { + builtin_error (_("`%s': invalid variable name for name reference"), value); + any_failed++; + NEXT_VARIABLE (); + } + else if (flags_on & att_nameref) + { +#if 1 + /* Check of offset is to allow an assignment to a nameref var as + part of the declare word to override existing value */ + if (nameref_p (var) == 0 && var_isset (var) && offset == 0 && valid_nameref_value (value_cell (var), 0) == 0) + { + builtin_error (_("`%s': invalid variable name for name reference"), value_cell (var)); + any_failed++; + NEXT_VARIABLE (); + } +#endif + if (readonly_p (var)) + { + sh_readonly (name); + any_failed++; + NEXT_VARIABLE (); + } + /* ksh93 compat: turning on nameref attribute turns off -ilu */ + VUNSETATTR (var, att_integer|att_uppercase|att_lowercase|att_capcase); + } + + /* Cannot use declare +r to turn off readonly attribute. */ + if (readonly_p (var) && (flags_off & att_readonly)) + { + sh_readonly (name_cell (var)); + any_failed++; + NEXT_VARIABLE (); + } + + /* Cannot use declare to assign value to readonly or noassign + variable. */ + if ((readonly_p (var) || noassign_p (var)) && offset) + { + if (readonly_p (var)) + sh_readonly (name); + assign_error++; + NEXT_VARIABLE (); + } + +#if defined (ARRAY_VARS) + /* make declare a[2]=foo as similar to a[2]=foo as possible if + a is already an array or assoc variable. */ + if (array_subscript_assignment && array_exists && creating_array == 0) + simple_array_assign = 1; + else if ((making_array_special || creating_array || array_exists) && offset) + { + int vlen; + vlen = STRLEN (value); +/*itrace("declare_builtin: name = %s value = %s flags = %d", name, value, wflags);*/ + if (shell_compatibility_level > 43 && (wflags & W_COMPASSIGN) == 0 && + value[0] == '(' && value[vlen-1] == ')') + { + /* The warning is only printed when using compound assignment + to an array variable that doesn't already exist. We use + creating_array to allow things like + declare -a foo$bar='(abc)' to work. */ + if (array_exists == 0 && creating_array == 0) + internal_warning (_("%s: quoted compound array assignment deprecated"), list->word->word); + compound_array_assign = array_exists || creating_array; + simple_array_assign = making_array_special; + } + else if (value[0] == '(' && value[vlen-1] == ')' && (shell_compatibility_level < 44 || (wflags & W_COMPASSIGN))) + compound_array_assign = 1; + else + simple_array_assign = 1; + } + + /* Cannot use declare +a name or declare +A name to remove an + array variable. */ + if (((flags_off & att_array) && array_p (var)) || ((flags_off & att_assoc) && assoc_p (var))) + { + builtin_error (_("%s: cannot destroy array variables in this way"), name); + any_failed++; + NEXT_VARIABLE (); + } + + if ((flags_on & att_array) && assoc_p (var)) + { + builtin_error (_("%s: cannot convert associative to indexed array"), name); + any_failed++; + NEXT_VARIABLE (); + } + if ((flags_on & att_assoc) && array_p (var)) + { + builtin_error (_("%s: cannot convert indexed to associative array"), name); + any_failed++; + NEXT_VARIABLE (); + } + + /* declare -A name[[n]] makes name an associative array variable. */ + if (flags_on & att_assoc) + { + if (assoc_p (var) == 0) + var = convert_var_to_assoc (var); + } + /* declare -a name[[n]] or declare name[n] makes name an indexed + array variable. */ + else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0 && assoc_p (var) == 0) + var = convert_var_to_array (var); +#endif /* ARRAY_VARS */ + + /* XXX - we note that we are turning on nameref attribute and defer + setting it until the assignment has been made so we don't do an + inadvertent nameref lookup. Might have to do the same thing for + flags_off&att_nameref. */ + /* XXX - ksh93 makes it an error to set a readonly nameref variable + using a single typeset command. */ + onref = (flags_on & att_nameref); + flags_on &= ~att_nameref; +#if defined (ARRAY_VARS) + if (array_p (var) || assoc_p (var) + || (offset && compound_array_assign) + || simple_array_assign) + onref = 0; /* array variables may not be namerefs */ +#endif + + /* ksh93 seems to do this */ + offref = (flags_off & att_nameref); + flags_off &= ~att_nameref; + + VSETATTR (var, flags_on); + VUNSETATTR (var, flags_off); + +#if defined (ARRAY_VARS) + if (offset && compound_array_assign) + assign_array_var_from_string (var, value, aflags|ASS_FORCE); + else if (simple_array_assign && subscript_start) + { + int local_aflags; + /* declare [-aA] name[N]=value */ + *subscript_start = '['; /* ] */ + /* XXX - problem here with appending */ + local_aflags = aflags&ASS_APPEND; + local_aflags |= assoc_noexpand ? ASS_NOEXPAND : 0; + var = assign_array_element (name, value, local_aflags); /* XXX - not aflags */ + *subscript_start = '\0'; + if (var == 0) /* some kind of assignment error */ + { + assign_error++; + flags_on |= onref; + flags_off |= offref; + NEXT_VARIABLE (); + } + } + else if (simple_array_assign) + { + /* let bind_{array,assoc}_variable take care of this. */ + if (assoc_p (var)) + bind_assoc_variable (var, name, savestring ("0"), value, aflags|ASS_FORCE); + else + bind_array_variable (name, 0, value, aflags|ASS_FORCE); + } + else +#endif + /* XXX - no ASS_FORCE here */ + /* bind_variable_value duplicates the essential internals of + bind_variable() */ + if (offset) + { + if (onref || nameref_p (var)) + aflags |= ASS_NAMEREF; + v = bind_variable_value (var, value, aflags); + if (v == 0 && (onref || nameref_p (var))) + { + if (valid_nameref_value (value, 1) == 0) + sh_invalidid (value); + assign_error++; + /* XXX - unset this variable? or leave it as normal var? */ + if (created_var) + delete_var (var->name, mkglobal ? global_variables : shell_variables); + flags_on |= onref; /* undo change from above */ + flags_off |= offref; + NEXT_VARIABLE (); + } + } + + /* If we found this variable in the temporary environment, as with + `var=value declare -x var', make sure it is treated identically + to `var=value export var'. Do the same for `declare -r' and + `readonly'. Preserve the attributes, except for att_tempvar. */ + /* XXX -- should this create a variable in the global scope, or + modify the local variable flags? ksh93 has it modify the + global scope. + Need to handle case like in set_var_attribute where a temporary + variable is in the same table as the function local vars. */ + if ((flags_on & (att_exported|att_readonly)) && tempvar_p (var)) + { + SHELL_VAR *tv; + char *tvalue; + + tv = find_tempenv_variable (var->name); + if (tv) + { + tvalue = var_isset (var) ? savestring (value_cell (var)) : savestring (""); + tv = bind_variable (var->name, tvalue, 0); + if (tv) + { + tv->attributes |= var->attributes & ~att_tempvar; + if (tv->context > 0) + VSETATTR (tv, att_propagate); + } + free (tvalue); + } + VSETATTR (var, att_propagate); + } + } + + /* Turn on nameref attribute we deferred above. */ + /* XXX - should we turn on the noassign attribute for consistency with + ksh93 when we turn on the nameref attribute? */ + VSETATTR (var, onref); + flags_on |= onref; + VUNSETATTR (var, offref); + flags_off |= offref; + /* Yuck. ksh93 compatibility. XXX - need to investigate more but + definitely happens when turning off nameref attribute on nameref + (see comments above). Under no circumstances allow this to turn + off readonly attribute on readonly nameref variable. */ + if (refvar) + { + if (flags_off & att_readonly) + flags_off &= ~att_readonly; + VUNSETATTR (refvar, flags_off); + } + + stupidly_hack_special_variables (name); + + NEXT_VARIABLE (); + } + + return (assign_error ? EX_BADASSIGN + : ((any_failed == 0) ? EXECUTION_SUCCESS + : EXECUTION_FAILURE)); +} diff --git a/bash-5.1/builtins_org/echo.def b/bash-5.1/builtins_org/echo.def new file mode 100644 index 0000000000000000000000000000000000000000..4e2243dbee4598b29c8566afe25d7a2d66430d0f --- /dev/null +++ b/bash-5.1/builtins_org/echo.def @@ -0,0 +1,202 @@ +This file is echo.def, from which is created echo.c. +It implements the builtin "echo" in Bash. + +Copyright (C) 1987-2018 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES echo.c +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashansi.h" + +#include +#include "../shell.h" + +#include "common.h" + +$BUILTIN echo +$FUNCTION echo_builtin +$DEPENDS_ON V9_ECHO +$SHORT_DOC echo [-neE] [arg ...] +Write arguments to the standard output. + +Display the ARGs, separated by a single space character and followed by a +newline, on the standard output. + +Options: + -n do not append a newline + -e enable interpretation of the following backslash escapes + -E explicitly suppress interpretation of backslash escapes + +`echo' interprets the following backslash-escaped characters: + \a alert (bell) + \b backspace + \c suppress further output + \e escape character + \E escape character + \f form feed + \n new line + \r carriage return + \t horizontal tab + \v vertical tab + \\ backslash + \0nnn the character whose ASCII code is NNN (octal). NNN can be + 0 to 3 octal digits + \xHH the eight-bit character whose value is HH (hexadecimal). HH + can be one or two hex digits + \uHHHH the Unicode character whose value is the hexadecimal value HHHH. + HHHH can be one to four hex digits. + \UHHHHHHHH the Unicode character whose value is the hexadecimal value + HHHHHHHH. HHHHHHHH can be one to eight hex digits. + +Exit Status: +Returns success unless a write error occurs. +$END + +$BUILTIN echo +$FUNCTION echo_builtin +$DEPENDS_ON !V9_ECHO +$SHORT_DOC echo [-n] [arg ...] +Write arguments to the standard output. + +Display the ARGs on the standard output followed by a newline. + +Options: + -n do not append a newline + +Exit Status: +Returns success unless a write error occurs. +$END + +#if defined (V9_ECHO) +# define VALID_ECHO_OPTIONS "neE" +#else /* !V9_ECHO */ +# define VALID_ECHO_OPTIONS "n" +#endif /* !V9_ECHO */ + +/* System V machines already have a /bin/sh with a v9 behaviour. We + give Bash the identical behaviour for these machines so that the + existing system shells won't barf. Regrettably, the SUS v2 has + standardized the Sys V echo behavior. This variable is external + so that we can have a `shopt' variable to control it at runtime. */ +#if defined (DEFAULT_ECHO_TO_XPG) || defined (STRICT_POSIX) +int xpg_echo = 1; +#else +int xpg_echo = 0; +#endif /* DEFAULT_ECHO_TO_XPG */ + +/* Print the words in LIST to standard output. If the first word is + `-n', then don't print a trailing newline. We also support the + echo syntax from Version 9 Unix systems. */ +int +echo_builtin (list) + WORD_LIST *list; +{ + int display_return, do_v9, i, len; + char *temp, *s; + + do_v9 = xpg_echo; + display_return = 1; + + if (posixly_correct && xpg_echo) + goto just_echo; + + for (; list && (temp = list->word->word) && *temp == '-'; list = list->next) + { + /* If it appears that we are handling options, then make sure that + all of the options specified are actually valid. Otherwise, the + string should just be echoed. */ + temp++; + + for (i = 0; temp[i]; i++) + { + if (strchr (VALID_ECHO_OPTIONS, temp[i]) == 0) + break; + } + + /* echo - and echo - both mean to just echo the arguments. */ + if (*temp == 0 || temp[i]) + break; + + /* All of the options in TEMP are valid options to ECHO. + Handle them. */ + while (i = *temp++) + { + switch (i) + { + case 'n': + display_return = 0; + break; +#if defined (V9_ECHO) + case 'e': + do_v9 = 1; + break; + case 'E': + do_v9 = 0; + break; +#endif /* V9_ECHO */ + default: + goto just_echo; /* XXX */ + } + } + } + +just_echo: + + clearerr (stdout); /* clear error before writing and testing success */ + + while (list) + { + i = len = 0; + temp = do_v9 ? ansicstr (list->word->word, STRLEN (list->word->word), 1, &i, &len) + : list->word->word; + if (temp) + { + if (do_v9) + { + for (s = temp; len > 0; len--) + putchar (*s++); + } + else + printf ("%s", temp); +#if defined (SunOS5) + fflush (stdout); /* Fix for bug in SunOS 5.5 printf(3) */ +#endif + } + QUIT; + if (do_v9 && temp) + free (temp); + list = list->next; + if (i) + { + display_return = 0; + break; + } + if (list) + putchar(' '); + QUIT; + } + + if (display_return) + putchar ('\n'); + + return (sh_chkwrite (EXECUTION_SUCCESS)); +} diff --git a/bash-5.1/builtins_org/enable.def b/bash-5.1/builtins_org/enable.def new file mode 100644 index 0000000000000000000000000000000000000000..9d9010b78ddc431f1091334e196f8008bda28946 --- /dev/null +++ b/bash-5.1/builtins_org/enable.def @@ -0,0 +1,552 @@ +This file is enable.def, from which is created enable.c. +It implements the builtin "enable" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES enable.c + +$BUILTIN enable +$FUNCTION enable_builtin +$SHORT_DOC enable [-a] [-dnps] [-f filename] [name ...] +Enable and disable shell builtins. + +Enables and disables builtin shell commands. Disabling allows you to +execute a disk command which has the same name as a shell builtin +without using a full pathname. + +Options: + -a print a list of builtins showing whether or not each is enabled + -n disable each NAME or display a list of disabled builtins + -p print the list of builtins in a reusable format + -s print only the names of Posix `special' builtins + +Options controlling dynamic loading: + -f Load builtin NAME from shared object FILENAME + -d Remove a builtin loaded with -f + +Without options, each NAME is enabled. + +To use the `test' found in $PATH instead of the shell builtin +version, type `enable -n test'. + +Exit Status: +Returns success unless NAME is not a shell builtin or an error occurs. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../builtins.h" +#include "../flags.h" +#include "common.h" +#include "bashgetopt.h" +#include "findcmd.h" + +#if defined (PROGRAMMABLE_COMPLETION) +# include "../pcomplete.h" +#endif + +#define ENABLED 1 +#define DISABLED 2 +#define SPECIAL 4 + +#define AFLAG 0x01 +#define DFLAG 0x02 +#define FFLAG 0x04 +#define NFLAG 0x08 +#define PFLAG 0x10 +#define SFLAG 0x20 + +#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) +static int dyn_load_builtin PARAMS((WORD_LIST *, int, char *)); +#endif + +#if defined (HAVE_DLCLOSE) +static int dyn_unload_builtin PARAMS((char *)); +static void delete_builtin PARAMS((struct builtin *)); +static int local_dlclose PARAMS((void *)); +#endif + +#define STRUCT_SUFFIX "_struct" +/* for now */ +#define LOAD_SUFFIX "_builtin_load" +#define UNLOAD_SUFFIX "_builtin_unload" + +static void list_some_builtins PARAMS((int)); +static int enable_shell_command PARAMS((char *, int)); + +/* Enable/disable shell commands present in LIST. If list is not specified, + then print out a list of shell commands showing which are enabled and + which are disabled. */ +int +enable_builtin (list) + WORD_LIST *list; +{ + int result, flags; + int opt, filter; +#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) + char *filename; +#endif + + result = EXECUTION_SUCCESS; + flags = 0; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "adnpsf:")) != -1) + { + switch (opt) + { + case 'a': + flags |= AFLAG; + break; + case 'n': + flags |= NFLAG; + break; + case 'p': + flags |= PFLAG; + break; + case 's': + flags |= SFLAG; + break; + case 'f': +#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) + flags |= FFLAG; + filename = list_optarg; + break; +#else + builtin_error (_("dynamic loading not available")); + return (EX_USAGE); +#endif +#if defined (HAVE_DLCLOSE) + case 'd': + flags |= DFLAG; + break; +#else + builtin_error (_("dynamic loading not available")); + return (EX_USAGE); +#endif /* HAVE_DLCLOSE */ + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + +#if defined (RESTRICTED_SHELL) + /* Restricted shells cannot load new builtins. */ + if (restricted && (flags & (FFLAG|DFLAG))) + { + sh_restricted ((char *)NULL); + return (EXECUTION_FAILURE); + } +#endif + + if (list == 0 || (flags & PFLAG)) + { + filter = (flags & AFLAG) ? (ENABLED | DISABLED) + : (flags & NFLAG) ? DISABLED : ENABLED; + + if (flags & SFLAG) + filter |= SPECIAL; + + list_some_builtins (filter); + } +#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) + else if (flags & FFLAG) + { + filter = (flags & NFLAG) ? DISABLED : ENABLED; + if (flags & SFLAG) + filter |= SPECIAL; + + result = dyn_load_builtin (list, filter, filename); +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_builtins); +#endif + } +#endif +#if defined (HAVE_DLCLOSE) + else if (flags & DFLAG) + { + while (list) + { + opt = dyn_unload_builtin (list->word->word); + if (opt == EXECUTION_FAILURE) + result = EXECUTION_FAILURE; + list = list->next; + } +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_builtins); +#endif + } +#endif + else + { + while (list) + { + opt = enable_shell_command (list->word->word, flags & NFLAG); + + if (opt == EXECUTION_FAILURE) + { + sh_notbuiltin (list->word->word); + result = EXECUTION_FAILURE; + } + list = list->next; + } + } + return (result); +} + +/* List some builtins. + FILTER is a mask with two slots: ENABLED and DISABLED. */ +static void +list_some_builtins (filter) + int filter; +{ + register int i; + + for (i = 0; i < num_shell_builtins; i++) + { + if (shell_builtins[i].function == 0 || (shell_builtins[i].flags & BUILTIN_DELETED)) + continue; + + if ((filter & SPECIAL) && + (shell_builtins[i].flags & SPECIAL_BUILTIN) == 0) + continue; + + if ((filter & ENABLED) && (shell_builtins[i].flags & BUILTIN_ENABLED)) + printf ("enable %s\n", shell_builtins[i].name); + else if ((filter & DISABLED) && + ((shell_builtins[i].flags & BUILTIN_ENABLED) == 0)) + printf ("enable -n %s\n", shell_builtins[i].name); + } +} + +/* Enable the shell command NAME. If DISABLE_P is non-zero, then + disable NAME instead. */ +static int +enable_shell_command (name, disable_p) + char *name; + int disable_p; +{ + struct builtin *b; + + b = builtin_address_internal (name, 1); + if (b == 0) + return (EXECUTION_FAILURE); + + if (disable_p) + b->flags &= ~BUILTIN_ENABLED; +#if defined (RESTRICTED_SHELL) + else if (restricted && ((b->flags & BUILTIN_ENABLED) == 0)) + { + sh_restricted ((char *)NULL); + return (EXECUTION_FAILURE); + } +#endif + else + b->flags |= BUILTIN_ENABLED; + +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_enabled); + set_itemlist_dirty (&it_disabled); +#endif + + return (EXECUTION_SUCCESS); +} + +#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) + +#if defined (HAVE_DLFCN_H) +# include +#endif + +static int +dyn_load_builtin (list, flags, filename) + WORD_LIST *list; + int flags; + char *filename; +{ + WORD_LIST *l; + void *handle; + + int total, size, new, replaced, r; + char *struct_name, *name, *funcname; + sh_load_func_t *loadfunc; + struct builtin **new_builtins, *b, *new_shell_builtins, *old_builtin; + char *loadables_path, *load_path; + + if (list == 0) + return (EXECUTION_FAILURE); + +#ifndef RTLD_LAZY +#define RTLD_LAZY 1 +#endif + + handle = 0; + if (absolute_program (filename) == 0) + { + loadables_path = get_string_value ("BASH_LOADABLES_PATH"); + if (loadables_path) + { + load_path = find_in_path (filename, loadables_path, FS_NODIRS|FS_EXEC_PREFERRED); + if (load_path) + { +#if defined (_AIX) + handle = dlopen (load_path, RTLD_NOW|RTLD_GLOBAL); +#else + handle = dlopen (load_path, RTLD_LAZY); +#endif /* !_AIX */ + free (load_path); + } + } + } + + /* Fall back to current directory for now */ + if (handle == 0) +#if defined (_AIX) + handle = dlopen (filename, RTLD_NOW|RTLD_GLOBAL); +#else + handle = dlopen (filename, RTLD_LAZY); +#endif /* !_AIX */ + + if (handle == 0) + { + name = printable_filename (filename, 0); + builtin_error (_("cannot open shared object %s: %s"), name, dlerror ()); + if (name != filename) + free (name); + return (EXECUTION_FAILURE); + } + + for (new = 0, l = list; l; l = l->next, new++) + ; + new_builtins = (struct builtin **)xmalloc (new * sizeof (struct builtin *)); + + /* For each new builtin in the shared object, find it and its describing + structure. If this is overwriting an existing builtin, do so, otherwise + save the loaded struct for creating the new list of builtins. */ + for (replaced = new = 0; list; list = list->next) + { + name = list->word->word; + + size = strlen (name); + struct_name = (char *)xmalloc (size + 8); + strcpy (struct_name, name); + strcpy (struct_name + size, STRUCT_SUFFIX); + + old_builtin = builtin_address_internal (name, 1); + + b = (struct builtin *)dlsym (handle, struct_name); + if (b == 0) + { + name = printable_filename (filename, 0); + builtin_error (_("cannot find %s in shared object %s: %s"), + struct_name, name, dlerror ()); + if (name != filename) + free (name); + free (struct_name); + continue; + } + + funcname = xrealloc (struct_name, size + sizeof (LOAD_SUFFIX) + 1); + strcpy (funcname, name); + strcpy (funcname + size, LOAD_SUFFIX); + + loadfunc = (sh_load_func_t *)dlsym (handle, funcname); + if (loadfunc) + { + /* Add warning if running an init function more than once */ + if (old_builtin && (old_builtin->flags & STATIC_BUILTIN) == 0) + builtin_warning (_("%s: dynamic builtin already loaded"), name); + r = (*loadfunc) (name); + if (r == 0) + { + builtin_error (_("load function for %s returns failure (%d): not loaded"), name, r); + free (funcname); + continue; + } + } + free (funcname); + + b->flags &= ~STATIC_BUILTIN; + if (flags & SPECIAL) + b->flags |= SPECIAL_BUILTIN; + b->handle = handle; + + if (old_builtin) + { + replaced++; + FASTCOPY ((char *)b, (char *)old_builtin, sizeof (struct builtin)); + } + else + new_builtins[new++] = b; + } + + if (replaced == 0 && new == 0) + { + free (new_builtins); + dlclose (handle); + return (EXECUTION_FAILURE); + } + + if (new) + { + total = num_shell_builtins + new; + size = (total + 1) * sizeof (struct builtin); + + new_shell_builtins = (struct builtin *)xmalloc (size); + FASTCOPY ((char *)shell_builtins, (char *)new_shell_builtins, + num_shell_builtins * sizeof (struct builtin)); + for (replaced = 0; replaced < new; replaced++) + FASTCOPY ((char *)new_builtins[replaced], + (char *)&new_shell_builtins[num_shell_builtins + replaced], + sizeof (struct builtin)); + + new_shell_builtins[total].name = (char *)0; + new_shell_builtins[total].function = (sh_builtin_func_t *)0; + new_shell_builtins[total].flags = 0; + + if (shell_builtins != static_shell_builtins) + free (shell_builtins); + + shell_builtins = new_shell_builtins; + num_shell_builtins = total; + initialize_shell_builtins (); + } + + free (new_builtins); + return (EXECUTION_SUCCESS); +} +#endif + +#if defined (HAVE_DLCLOSE) +static void +delete_builtin (b) + struct builtin *b; +{ + int ind, size; + struct builtin *new_shell_builtins; + + /* XXX - funky pointer arithmetic - XXX */ +#ifdef __STDC__ + ind = b - shell_builtins; +#else + ind = ((int)b - (int)shell_builtins) / sizeof (struct builtin); +#endif + size = num_shell_builtins * sizeof (struct builtin); + new_shell_builtins = (struct builtin *)xmalloc (size); + + /* Copy shell_builtins[0]...shell_builtins[ind - 1] to new_shell_builtins */ + if (ind) + FASTCOPY ((char *)shell_builtins, (char *)new_shell_builtins, + ind * sizeof (struct builtin)); + /* Copy shell_builtins[ind+1]...shell_builtins[num_shell_builtins to + new_shell_builtins, starting at ind. */ + FASTCOPY ((char *)(&shell_builtins[ind+1]), + (char *)(&new_shell_builtins[ind]), + (num_shell_builtins - ind) * sizeof (struct builtin)); + + if (shell_builtins != static_shell_builtins) + free (shell_builtins); + + /* The result is still sorted. */ + num_shell_builtins--; + shell_builtins = new_shell_builtins; +} + +/* Tenon's MachTen has a dlclose that doesn't return a value, so we + finesse it with a local wrapper. */ +static int +local_dlclose (handle) + void *handle; +{ +#if !defined (__MACHTEN__) + return (dlclose (handle)); +#else /* __MACHTEN__ */ + dlclose (handle); + return ((dlerror () != NULL) ? -1 : 0); +#endif /* __MACHTEN__ */ +} + +static int +dyn_unload_builtin (name) + char *name; +{ + struct builtin *b; + void *handle; + char *funcname; + sh_unload_func_t *unloadfunc; + int ref, i, size; + + b = builtin_address_internal (name, 1); + if (b == 0) + { + sh_notbuiltin (name); + return (EXECUTION_FAILURE); + } + if (b->flags & STATIC_BUILTIN) + { + builtin_error (_("%s: not dynamically loaded"), name); + return (EXECUTION_FAILURE); + } + + handle = (void *)b->handle; + for (ref = i = 0; i < num_shell_builtins; i++) + { + if (shell_builtins[i].handle == b->handle) + ref++; + } + + /* Call any unload function */ + size = strlen (name); + funcname = xmalloc (size + sizeof (UNLOAD_SUFFIX) + 1); + strcpy (funcname, name); + strcpy (funcname + size, UNLOAD_SUFFIX); + + unloadfunc = (sh_unload_func_t *)dlsym (handle, funcname); + if (unloadfunc) + (*unloadfunc) (name); /* void function */ + free (funcname); + + /* Don't remove the shared object unless the reference count of builtins + using it drops to zero. */ + if (ref == 1 && local_dlclose (handle) != 0) + { + builtin_error (_("%s: cannot delete: %s"), name, dlerror ()); + return (EXECUTION_FAILURE); + } + + /* Now remove this entry from the builtin table and reinitialize. */ + delete_builtin (b); + + return (EXECUTION_SUCCESS); +} +#endif diff --git a/bash-5.1/builtins_org/eval.def b/bash-5.1/builtins_org/eval.def new file mode 100644 index 0000000000000000000000000000000000000000..a92b538f26bd8f01bfbbceb369a173dfce3f9c7f --- /dev/null +++ b/bash-5.1/builtins_org/eval.def @@ -0,0 +1,57 @@ +This file is eval.def, from which is created eval.c. +It implements the builtin "eval" in Bash. + +Copyright (C) 1987-2016 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES eval.c + +$BUILTIN eval +$FUNCTION eval_builtin +$SHORT_DOC eval [arg ...] +Execute arguments as a shell command. + +Combine ARGs into a single string, use the result as input to the shell, +and execute the resulting commands. + +Exit Status: +Returns exit status of command or success if command is null. +$END + +#include +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../shell.h" +#include "bashgetopt.h" +#include "common.h" + +/* Parse the string that these words make, and execute the command found. */ +int +eval_builtin (list) + WORD_LIST *list; +{ + if (no_options (list)) + return (EX_USAGE); + list = loptend; /* skip over possible `--' */ + + return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS); +} diff --git a/bash-5.1/builtins_org/evalfile.c b/bash-5.1/builtins_org/evalfile.c new file mode 100644 index 0000000000000000000000000000000000000000..fc3975ec82cb6fe970ca81e98a05e6c41bd76abf --- /dev/null +++ b/bash-5.1/builtins_org/evalfile.c @@ -0,0 +1,384 @@ +/* evalfile.c - read and evaluate commands from a file or file descriptor */ + +/* Copyright (C) 1996-2017 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashtypes.h" +#include "posixstat.h" +#include "filecntl.h" + +#include +#include +#include + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../parser.h" +#include "../jobs.h" +#include "../builtins.h" +#include "../flags.h" +#include "../input.h" +#include "../execute_cmd.h" +#include "../trap.h" + +#include + +#if defined (HISTORY) +# include "../bashhist.h" +#endif + +#include + +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +/* Flags for _evalfile() */ +#define FEVAL_ENOENTOK 0x001 +#define FEVAL_BUILTIN 0x002 +#define FEVAL_UNWINDPROT 0x004 +#define FEVAL_NONINT 0x008 +#define FEVAL_LONGJMP 0x010 +#define FEVAL_HISTORY 0x020 +#define FEVAL_CHECKBINARY 0x040 +#define FEVAL_REGFILE 0x080 +#define FEVAL_NOPUSHARGS 0x100 + +/* How many `levels' of sourced files we have. */ +int sourcelevel = 0; + +static int +_evalfile (filename, flags) + const char *filename; + int flags; +{ + volatile int old_interactive; + procenv_t old_return_catch; + int return_val, fd, result, pflags, i, nnull; + ssize_t nr; /* return value from read(2) */ + char *string; + struct stat finfo; + size_t file_size; + sh_vmsg_func_t *errfunc; +#if defined (ARRAY_VARS) + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; + ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; + struct func_array_state *fa; +# if defined (DEBUGGER) + SHELL_VAR *bash_argv_v, *bash_argc_v; + ARRAY *bash_argv_a, *bash_argc_a; +# endif + char *t, tt[2]; +#endif + + USE_VAR(pflags); + +#if defined (ARRAY_VARS) + GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a); +# if defined (DEBUGGER) + GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a); + GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a); +# endif +#endif + + fd = open (filename, O_RDONLY); + + if (fd < 0 || (fstat (fd, &finfo) == -1)) + { + i = errno; + if (fd >= 0) + close (fd); + errno = i; + +file_error_and_exit: + if (((flags & FEVAL_ENOENTOK) == 0) || errno != ENOENT) + file_error (filename); + + if (flags & FEVAL_LONGJMP) + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (EXITPROG); + } + + return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE + : ((errno == ENOENT && (flags & FEVAL_ENOENTOK) != 0) ? 0 : -1)); + } + + errfunc = ((flags & FEVAL_BUILTIN) ? builtin_error : internal_error); + + if (S_ISDIR (finfo.st_mode)) + { + (*errfunc) (_("%s: is a directory"), filename); + close (fd); + return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); + } + else if ((flags & FEVAL_REGFILE) && S_ISREG (finfo.st_mode) == 0) + { + (*errfunc) (_("%s: not a regular file"), filename); + close (fd); + return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); + } + + file_size = (size_t)finfo.st_size; + /* Check for overflow with large files. */ + if (file_size != finfo.st_size || file_size + 1 < file_size) + { + (*errfunc) (_("%s: file is too large"), filename); + close (fd); + return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); + } + + if (S_ISREG (finfo.st_mode) && file_size <= SSIZE_MAX) + { + string = (char *)xmalloc (1 + file_size); + nr = read (fd, string, file_size); + if (nr >= 0) + string[nr] = '\0'; + } + else + nr = zmapfd (fd, &string, 0); + + return_val = errno; + close (fd); + errno = return_val; + + if (nr < 0) /* XXX was != file_size, not < 0 */ + { + free (string); + goto file_error_and_exit; + } + + if (nr == 0) + { + free (string); + return ((flags & FEVAL_BUILTIN) ? EXECUTION_SUCCESS : 1); + } + + if ((flags & FEVAL_CHECKBINARY) && + check_binary_file (string, (nr > 80) ? 80 : nr)) + { + free (string); + (*errfunc) (_("%s: cannot execute binary file"), filename); + return ((flags & FEVAL_BUILTIN) ? EX_BINARY_FILE : -1); + } + + i = strlen (string); + if (i < nr) + { + for (nnull = i = 0; i < nr; i++) + if (string[i] == '\0') + { + memmove (string+i, string+i+1, nr - i); + nr--; + /* Even if the `check binary' flag is not set, we want to avoid + sourcing files with more than 256 null characters -- that + probably indicates a binary file. */ + if ((flags & FEVAL_BUILTIN) && ++nnull > 256) + { + free (string); + (*errfunc) (_("%s: cannot execute binary file"), filename); + return ((flags & FEVAL_BUILTIN) ? EX_BINARY_FILE : -1); + } + } + } + + if (flags & FEVAL_UNWINDPROT) + { + begin_unwind_frame ("_evalfile"); + + unwind_protect_int (return_catch_flag); + unwind_protect_jmp_buf (return_catch); + if (flags & FEVAL_NONINT) + unwind_protect_int (interactive); + unwind_protect_int (sourcelevel); + } + else + { + COPY_PROCENV (return_catch, old_return_catch); + if (flags & FEVAL_NONINT) + old_interactive = interactive; + } + + if (flags & FEVAL_NONINT) + interactive = 0; + + return_catch_flag++; + sourcelevel++; + +#if defined (ARRAY_VARS) + array_push (bash_source_a, (char *)filename); + t = itos (executing_line_number ()); + array_push (bash_lineno_a, t); + free (t); + array_push (funcname_a, "source"); /* not exactly right */ + + fa = (struct func_array_state *)xmalloc (sizeof (struct func_array_state)); + fa->source_a = bash_source_a; + fa->source_v = bash_source_v; + fa->lineno_a = bash_lineno_a; + fa->lineno_v = bash_lineno_v; + fa->funcname_a = funcname_a; + fa->funcname_v = funcname_v; + if (flags & FEVAL_UNWINDPROT) + add_unwind_protect (restore_funcarray_state, fa); + +# if defined (DEBUGGER) + /* Have to figure out a better way to do this when `source' is supplied + arguments */ + if ((flags & FEVAL_NOPUSHARGS) == 0) + { + if (shell_compatibility_level <= 44) + init_bash_argv (); + array_push (bash_argv_a, (char *)filename); /* XXX - unconditionally? */ + tt[0] = '1'; tt[1] = '\0'; + array_push (bash_argc_a, tt); + if (flags & FEVAL_UNWINDPROT) + add_unwind_protect (pop_args, 0); + } +# endif +#endif + + /* set the flags to be passed to parse_and_execute */ + pflags = SEVAL_RESETLINE; + pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST; + + if (flags & FEVAL_BUILTIN) + result = EXECUTION_SUCCESS; + + return_val = setjmp_nosigs (return_catch); + + /* If `return' was seen outside of a function, but in the script, then + force parse_and_execute () to clean up. */ + if (return_val) + { + parse_and_execute_cleanup (-1); + result = return_catch_value; + } + else + result = parse_and_execute (string, filename, pflags); + + if (flags & FEVAL_UNWINDPROT) + run_unwind_frame ("_evalfile"); + else + { + if (flags & FEVAL_NONINT) + interactive = old_interactive; +#if defined (ARRAY_VARS) + restore_funcarray_state (fa); +# if defined (DEBUGGER) + if ((flags & FEVAL_NOPUSHARGS) == 0) + { + /* Don't need to call pop_args here until we do something better + when source is passed arguments (see above). */ + array_pop (bash_argc_a); + array_pop (bash_argv_a); + } +# endif +#endif + return_catch_flag--; + sourcelevel--; + COPY_PROCENV (old_return_catch, return_catch); + } + + /* If we end up with EOF after sourcing a file, which can happen when the file + doesn't end with a newline, pretend that it did. */ + if (current_token == yacc_EOF) + push_token ('\n'); /* XXX */ + + return ((flags & FEVAL_BUILTIN) ? result : 1); +} + +int +maybe_execute_file (fname, force_noninteractive) + const char *fname; + int force_noninteractive; +{ + char *filename; + int result, flags; + + filename = bash_tilde_expand (fname, 0); + flags = FEVAL_ENOENTOK; + if (force_noninteractive) + flags |= FEVAL_NONINT; + result = _evalfile (filename, flags); + free (filename); + return result; +} + +int +force_execute_file (fname, force_noninteractive) + const char *fname; + int force_noninteractive; +{ + char *filename; + int result, flags; + + filename = bash_tilde_expand (fname, 0); + flags = 0; + if (force_noninteractive) + flags |= FEVAL_NONINT; + result = _evalfile (filename, flags); + free (filename); + return result; +} + +#if defined (HISTORY) +int +fc_execute_file (filename) + const char *filename; +{ + int flags; + + /* We want these commands to show up in the history list if + remember_on_history is set. We use FEVAL_BUILTIN to return + the result of parse_and_execute. */ + flags = FEVAL_ENOENTOK|FEVAL_HISTORY|FEVAL_REGFILE|FEVAL_BUILTIN; + return (_evalfile (filename, flags)); +} +#endif /* HISTORY */ + +int +source_file (filename, sflags) + const char *filename; + int sflags; +{ + int flags, rval; + + flags = FEVAL_BUILTIN|FEVAL_UNWINDPROT|FEVAL_NONINT; + if (sflags) + flags |= FEVAL_NOPUSHARGS; + /* POSIX shells exit if non-interactive and file error. */ + if (posixly_correct && interactive_shell == 0 && executing_command_builtin == 0) + flags |= FEVAL_LONGJMP; + rval = _evalfile (filename, flags); + + run_return_trap (); + return rval; +} diff --git a/bash-5.1/builtins_org/evalstring.c b/bash-5.1/builtins_org/evalstring.c new file mode 100644 index 0000000000000000000000000000000000000000..18928a17edb9126fd378023756f49b2f263573ef --- /dev/null +++ b/bash-5.1/builtins_org/evalstring.c @@ -0,0 +1,758 @@ +/* evalstring.c - evaluate a string as one or more shell commands. */ + +/* Copyright (C) 1996-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include + +#include + +#include "filecntl.h" +#include "../bashansi.h" + +#include "../shell.h" +#include "../jobs.h" +#include "../builtins.h" +#include "../flags.h" +#include "../parser.h" +#include "../input.h" +#include "../execute_cmd.h" +#include "../redir.h" +#include "../trap.h" +#include "../bashintl.h" + +#include + +#if defined (HISTORY) +# include "../bashhist.h" +#endif + +#include "common.h" +#include "builtext.h" + +#if !defined (errno) +extern int errno; +#endif + +#define IS_BUILTIN(s) (builtin_address_internal(s, 0) != (struct builtin *)NULL) + +int parse_and_execute_level = 0; + +static int cat_file PARAMS((REDIRECT *)); + +#define PE_TAG "parse_and_execute top" +#define PS_TAG "parse_string top" + +#if defined (HISTORY) +static void +set_history_remembering () +{ + remember_on_history = enable_history_list; +} +#endif + +static void +restore_lastcom (x) + char *x; +{ + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = x; +} + +int +should_suppress_fork (command) + COMMAND *command; +{ +#if 0 /* TAG: bash-5.2 */ + int subshell; + + subshell = subshell_environment & SUBSHELL_PROCSUB; /* salt to taste */ +#endif + return (startup_state == 2 && parse_and_execute_level == 1 && + running_trap == 0 && + *bash_input.location.string == '\0' && + parser_expanding_alias () == 0 && + command->type == cm_simple && + signal_is_trapped (EXIT_TRAP) == 0 && + signal_is_trapped (ERROR_TRAP) == 0 && + any_signals_trapped () < 0 && +#if 0 /* TAG: bash-5.2 */ + (subshell || (command->redirects == 0 && command->value.Simple->redirects == 0)) && +#else + command->redirects == 0 && command->value.Simple->redirects == 0 && +#endif + ((command->flags & CMD_TIME_PIPELINE) == 0) && + ((command->flags & CMD_INVERT_RETURN) == 0)); +} + +int +can_optimize_connection (command) + COMMAND *command; +{ + return (*bash_input.location.string == '\0' && + parser_expanding_alias () == 0 && + (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && + command->value.Connection->second->type == cm_simple); +} + +void +optimize_fork (command) + COMMAND *command; +{ + if (command->type == cm_connection && + (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && + (command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) && + should_suppress_fork (command->value.Connection->second)) + { + command->value.Connection->second->flags |= CMD_NO_FORK; + command->value.Connection->second->value.Simple->flags |= CMD_NO_FORK; + } +} + +void +optimize_subshell_command (command) + COMMAND *command; +{ + if (running_trap == 0 && + command->type == cm_simple && + signal_is_trapped (EXIT_TRAP) == 0 && + signal_is_trapped (ERROR_TRAP) == 0 && + any_signals_trapped () < 0 && + command->redirects == 0 && command->value.Simple->redirects == 0 && + ((command->flags & CMD_TIME_PIPELINE) == 0) && + ((command->flags & CMD_INVERT_RETURN) == 0)) + { + command->flags |= CMD_NO_FORK; + command->value.Simple->flags |= CMD_NO_FORK; + } + else if (command->type == cm_connection && + (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR)) + optimize_subshell_command (command->value.Connection->second); +} + +void +optimize_shell_function (command) + COMMAND *command; +{ + COMMAND *fc; + + fc = (command->type == cm_group) ? command->value.Group->command : command; + + if (fc->type == cm_simple && should_suppress_fork (fc)) + { + fc->flags |= CMD_NO_FORK; + fc->value.Simple->flags |= CMD_NO_FORK; + } + else if (fc->type == cm_connection && can_optimize_connection (fc) && should_suppress_fork (fc->value.Connection->second)) + { + fc->value.Connection->second->flags |= CMD_NO_FORK; + fc->value.Connection->second->value.Simple->flags |= CMD_NO_FORK; + } +} + +/* How to force parse_and_execute () to clean up after itself. */ +void +parse_and_execute_cleanup (old_running_trap) + int old_running_trap; +{ + if (running_trap > 0) + { + /* We assume if we have a different value for running_trap than when + we started (the only caller that cares is evalstring()), the + original caller will perform the cleanup, and we should not step + on them. */ + if (running_trap != old_running_trap) + run_trap_cleanup (running_trap - 1); + unfreeze_jobs_list (); + } + + if (have_unwind_protects ()) + run_unwind_frame (PE_TAG); + else + parse_and_execute_level = 0; /* XXX */ +} + +static void +parse_prologue (string, flags, tag) + char *string; + int flags; + char *tag; +{ + char *orig_string, *lastcom; + int x; + + orig_string = string; + /* Unwind protect this invocation of parse_and_execute (). */ + begin_unwind_frame (tag); + unwind_protect_int (parse_and_execute_level); + unwind_protect_jmp_buf (top_level); + unwind_protect_int (indirection_level); + unwind_protect_int (line_number); + unwind_protect_int (line_number_for_err_trap); + unwind_protect_int (loop_level); + unwind_protect_int (executing_list); + unwind_protect_int (comsub_ignore_return); + if (flags & (SEVAL_NONINT|SEVAL_INTERACT)) + unwind_protect_int (interactive); + +#if defined (HISTORY) + if (parse_and_execute_level == 0) + add_unwind_protect (set_history_remembering, (char *)NULL); + else + unwind_protect_int (remember_on_history); /* can be used in scripts */ +# if defined (BANG_HISTORY) + unwind_protect_int (history_expansion_inhibited); +# endif /* BANG_HISTORY */ +#endif /* HISTORY */ + + if (interactive_shell) + { + x = get_current_prompt_level (); + add_unwind_protect (set_current_prompt_level, x); + } + + if (the_printed_command_except_trap) + { + lastcom = savestring (the_printed_command_except_trap); + add_unwind_protect (restore_lastcom, lastcom); + } + + add_unwind_protect (pop_stream, (char *)NULL); + if (parser_expanding_alias ()) + add_unwind_protect (parser_restore_alias, (char *)NULL); + + if (orig_string && ((flags & SEVAL_NOFREE) == 0)) + add_unwind_protect (xfree, orig_string); + end_unwind_frame (); + + if (flags & (SEVAL_NONINT|SEVAL_INTERACT)) + interactive = (flags & SEVAL_NONINT) ? 0 : 1; + +#if defined (HISTORY) + if (flags & SEVAL_NOHIST) + bash_history_disable (); +# if defined (BANG_HISTORY) + if (flags & SEVAL_NOHISTEXP) + history_expansion_inhibited = 1; +# endif /* BANG_HISTORY */ +#endif /* HISTORY */ +} + +/* Parse and execute the commands in STRING. Returns whatever + execute_command () returns. This frees STRING. FLAGS is a + flags word; look in common.h for the possible values. Actions + are: + (flags & SEVAL_NONINT) -> interactive = 0; + (flags & SEVAL_INTERACT) -> interactive = 1; + (flags & SEVAL_NOHIST) -> call bash_history_disable () + (flags & SEVAL_NOFREE) -> don't free STRING when finished + (flags & SEVAL_RESETLINE) -> reset line_number to 1 + (flags & SEVAL_NOHISTEXP) -> history_expansion_inhibited -> 1 +*/ + +int +parse_and_execute (string, from_file, flags) + char *string; + const char *from_file; + int flags; +{ + int code, lreset; + volatile int should_jump_to_top_level, last_result; + COMMAND *volatile command; + volatile sigset_t pe_sigmask; + + parse_prologue (string, flags, PE_TAG); + + parse_and_execute_level++; + + lreset = flags & SEVAL_RESETLINE; + +#if defined (HAVE_POSIX_SIGNALS) + /* If we longjmp and are going to go on, use this to restore signal mask */ + sigemptyset ((sigset_t *)&pe_sigmask); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, (sigset_t *)&pe_sigmask); +#endif + + /* Reset the line number if the caller wants us to. If we don't reset the + line number, we have to subtract one, because we will add one just + before executing the next command (resetting the line number sets it to + 0; the first line number is 1). */ + push_stream (lreset); + if (parser_expanding_alias ()) + /* push current shell_input_line */ + parser_save_alias (); + + if (lreset == 0) + line_number--; + + indirection_level++; + + code = should_jump_to_top_level = 0; + last_result = EXECUTION_SUCCESS; + + /* We need to reset enough of the token state so we can start fresh. */ + if (current_token == yacc_EOF) + current_token = '\n'; /* reset_parser() ? */ + + with_input_from_string (string, from_file); + clear_shell_input_line (); + while (*(bash_input.location.string) || parser_expanding_alias ()) + { + command = (COMMAND *)NULL; + + if (interrupt_state) + { + last_result = EXECUTION_FAILURE; + break; + } + + /* Provide a location for functions which `longjmp (top_level)' to + jump to. This prevents errors in substitution from restarting + the reader loop directly, for example. */ + code = setjmp_nosigs (top_level); + + if (code) + { + should_jump_to_top_level = 0; + switch (code) + { + case ERREXIT: + /* variable_context -> 0 is what eval.c:reader_loop() does in + these circumstances. Don't bother with cleanup here because + we don't want to run the function execution cleanup stuff + that will cause pop_context and other functions to run. + XXX - change that if we want the function context to be + unwound. */ + if (exit_immediately_on_error && variable_context) + { + discard_unwind_frame ("pe_dispose"); + variable_context = 0; /* not in a function */ + } + should_jump_to_top_level = 1; + goto out; + case FORCE_EOF: + case EXITPROG: + if (command) + run_unwind_frame ("pe_dispose"); + /* Remember to call longjmp (top_level) after the old + value for it is restored. */ + should_jump_to_top_level = 1; + goto out; + + case DISCARD: + if (command) + run_unwind_frame ("pe_dispose"); + last_result = last_command_exit_value = EXECUTION_FAILURE; /* XXX */ + set_pipestatus_from_exit (last_command_exit_value); + if (subshell_environment) + { + should_jump_to_top_level = 1; + goto out; + } + else + { +#if 0 + dispose_command (command); /* pe_dispose does this */ +#endif +#if defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, (sigset_t *)&pe_sigmask, (sigset_t *)NULL); +#endif + continue; + } + + default: + command_error ("parse_and_execute", CMDERR_BADJUMP, code, 0); + break; + } + } + + if (parse_command () == 0) + { + if ((flags & SEVAL_PARSEONLY) || (interactive_shell == 0 && read_but_dont_execute)) + { + last_result = EXECUTION_SUCCESS; + dispose_command (global_command); + global_command = (COMMAND *)NULL; + } + else if (command = global_command) + { + struct fd_bitmap *bitmap; + + if (flags & SEVAL_FUNCDEF) + { + char *x; + + /* If the command parses to something other than a straight + function definition, or if we have not consumed the entire + string, or if the parser has transformed the function + name (as parsing will if it begins or ends with shell + whitespace, for example), reject the attempt */ + if (command->type != cm_function_def || + ((x = parser_remaining_input ()) && *x) || + (STREQ (from_file, command->value.Function_def->name->word) == 0)) + { + internal_warning (_("%s: ignoring function definition attempt"), from_file); + should_jump_to_top_level = 0; + last_result = last_command_exit_value = EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); + reset_parser (); + break; + } + } + + bitmap = new_fd_bitmap (FD_BITMAP_SIZE); + begin_unwind_frame ("pe_dispose"); + add_unwind_protect (dispose_fd_bitmap, bitmap); + add_unwind_protect (dispose_command, command); /* XXX */ + + global_command = (COMMAND *)NULL; + + if ((subshell_environment & SUBSHELL_COMSUB) && comsub_ignore_return) + command->flags |= CMD_IGNORE_RETURN; + +#if defined (ONESHOT) + /* + * IF + * we were invoked as `bash -c' (startup_state == 2) AND + * parse_and_execute has not been called recursively AND + * we're not running a trap AND + * we have parsed the full command (string == '\0') AND + * we're not going to run the exit trap AND + * we have a simple command without redirections AND + * the command is not being timed AND + * the command's return status is not being inverted AND + * there aren't any traps in effect + * THEN + * tell the execution code that we don't need to fork + */ + if (should_suppress_fork (command)) + { + command->flags |= CMD_NO_FORK; + command->value.Simple->flags |= CMD_NO_FORK; + } + + /* Can't optimize forks out here execept for simple commands. + This knows that the parser sets up commands as left-side heavy + (&& and || are left-associative) and after the single parse, + if we are at the end of the command string, the last in a + series of connection commands is + command->value.Connection->second. */ + else if (command->type == cm_connection && can_optimize_connection (command)) + { + command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING; + command->value.Connection->second->value.Simple->flags |= CMD_TRY_OPTIMIZING; + } +#endif /* ONESHOT */ + + /* See if this is a candidate for $( type == cm_simple && !command->redirects && + (command->flags & CMD_TIME_PIPELINE) == 0 && + command->value.Simple->words == 0 && + command->value.Simple->redirects && + command->value.Simple->redirects->next == 0 && + command->value.Simple->redirects->instruction == r_input_direction && + command->value.Simple->redirects->redirector.dest == 0) + { + int r; + r = cat_file (command->value.Simple->redirects); + last_result = (r < 0) ? EXECUTION_FAILURE : EXECUTION_SUCCESS; + } + else + last_result = execute_command_internal + (command, 0, NO_PIPE, NO_PIPE, bitmap); + dispose_command (command); + dispose_fd_bitmap (bitmap); + discard_unwind_frame ("pe_dispose"); + + if (flags & SEVAL_ONECMD) + { + reset_parser (); + break; + } + } + } + else + { + last_result = EX_BADUSAGE; /* was EXECUTION_FAILURE */ + + if (interactive_shell == 0 && this_shell_builtin && + (this_shell_builtin == source_builtin || this_shell_builtin == eval_builtin) && + last_command_exit_value == EX_BADSYNTAX && posixly_correct && executing_command_builtin == 0) + { + should_jump_to_top_level = 1; + code = ERREXIT; + last_command_exit_value = EX_BADUSAGE; + } + + /* Since we are shell compatible, syntax errors in a script + abort the execution of the script. Right? */ + break; + } + } + + out: + + run_unwind_frame (PE_TAG); + + if (interrupt_state && parse_and_execute_level == 0) + { + /* An interrupt during non-interactive execution in an + interactive shell (e.g. via $PROMPT_COMMAND) should + not cause the shell to exit. */ + interactive = interactive_shell; + throw_to_top_level (); + } + + if (should_jump_to_top_level) + jump_to_top_level (code); + + return (last_result); +} + +/* Parse a command contained in STRING according to FLAGS and return the + number of characters consumed from the string. If non-NULL, set *ENDP + to the position in the string where the parse ended. Used to validate + command substitutions during parsing to obey Posix rules about finding + the end of the command and balancing parens. */ +int +parse_string (string, from_file, flags, endp) + char *string; + const char *from_file; + int flags; + char **endp; +{ + int code, nc; + volatile int should_jump_to_top_level; + COMMAND *volatile command, *oglobal; + char *ostring; + volatile sigset_t ps_sigmask; + + parse_prologue (string, flags, PS_TAG); + +#if defined (HAVE_POSIX_SIGNALS) + /* If we longjmp and are going to go on, use this to restore signal mask */ + sigemptyset ((sigset_t *)&ps_sigmask); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, (sigset_t *)&ps_sigmask); +#endif + +/*itrace("parse_string: `%s'", string);*/ + /* Reset the line number if the caller wants us to. If we don't reset the + line number, we have to subtract one, because we will add one just + before executing the next command (resetting the line number sets it to + 0; the first line number is 1). */ + push_stream (0); + if (parser_expanding_alias ()) + /* push current shell_input_line */ + parser_save_alias (); + + code = should_jump_to_top_level = 0; + oglobal = global_command; + ostring = string; + + with_input_from_string (string, from_file); + while (*(bash_input.location.string)) /* XXX - parser_expanding_alias () ? */ + { + command = (COMMAND *)NULL; + +#if 0 + if (interrupt_state) + break; +#endif + + /* Provide a location for functions which `longjmp (top_level)' to + jump to. */ + code = setjmp_nosigs (top_level); + + if (code) + { +#if defined (DEBUG) +itrace("parse_string: longjmp executed: code = %d", code); +#endif + should_jump_to_top_level = 0; + switch (code) + { + case FORCE_EOF: + case ERREXIT: + case EXITPROG: + case DISCARD: /* XXX */ + if (command) + dispose_command (command); + /* Remember to call longjmp (top_level) after the old + value for it is restored. */ + should_jump_to_top_level = 1; + goto out; + + default: +#if defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, (sigset_t *)&ps_sigmask, (sigset_t *)NULL); +#endif + command_error ("parse_string", CMDERR_BADJUMP, code, 0); + break; + } + } + + if (parse_command () == 0) + { + dispose_command (global_command); + global_command = (COMMAND *)NULL; + } + else + { + if ((flags & SEVAL_NOLONGJMP) == 0) + { + should_jump_to_top_level = 1; + code = DISCARD; + } + else + reset_parser (); /* XXX - sets token_to_read */ + break; + } + + if (current_token == yacc_EOF || current_token == shell_eof_token) + break; + } + +out: + + global_command = oglobal; + nc = bash_input.location.string - ostring; + if (endp) + *endp = bash_input.location.string; + + run_unwind_frame (PS_TAG); + + /* If we return < 0, the caller (xparse_dolparen) will jump_to_top_level for + us, after doing cleanup */ + if (should_jump_to_top_level) + { + if (parse_and_execute_level == 0) + top_level_cleanup (); + if (code == DISCARD) + return -DISCARD; + jump_to_top_level (code); + } + + return (nc); +} + +/* Handle a $( < file ) command substitution. This expands the filename, + returning errors as appropriate, then just cats the file to the standard + output. */ +static int +cat_file (r) + REDIRECT *r; +{ + char *fn; + int fd, rval; + + if (r->instruction != r_input_direction) + return -1; + + /* Get the filename. */ + if (posixly_correct && !interactive_shell) + disallow_filename_globbing++; + fn = redirection_expand (r->redirectee.filename); + if (posixly_correct && !interactive_shell) + disallow_filename_globbing--; + + if (fn == 0) + { + redirection_error (r, AMBIGUOUS_REDIRECT, fn); + return -1; + } + + fd = open(fn, O_RDONLY); + if (fd < 0) + { + file_error (fn); + free (fn); + return -1; + } + + rval = zcatfd (fd, 1, fn); + + free (fn); + close (fd); + + return (rval); +} + +int +evalstring (string, from_file, flags) + char *string; + const char *from_file; + int flags; +{ + volatile int r, rflag, rcatch; + volatile int was_trap; + + /* Are we running a trap when we execute this function? */ + was_trap = running_trap; + + rcatch = 0; + rflag = return_catch_flag; + /* If we are in a place where `return' is valid, we have to catch + `eval "... return"' and make sure parse_and_execute cleans up. Then + we can trampoline to the previous saved return_catch location. */ + if (rflag) + { + begin_unwind_frame ("evalstring"); + + unwind_protect_int (return_catch_flag); + unwind_protect_jmp_buf (return_catch); + + return_catch_flag++; /* increment so we have a counter */ + rcatch = setjmp_nosigs (return_catch); + } + + if (rcatch) + { + /* We care about whether or not we are running the same trap we were + when we entered this function. */ + parse_and_execute_cleanup (was_trap); + r = return_catch_value; + } + else + /* Note that parse_and_execute () frees the string it is passed. */ + r = parse_and_execute (string, from_file, flags); + + if (rflag) + { + run_unwind_frame ("evalstring"); + if (rcatch && return_catch_flag) + { + return_catch_value = r; + sh_longjmp (return_catch, 1); + } + } + + return (r); +} diff --git a/bash-5.1/builtins_org/exec.def b/bash-5.1/builtins_org/exec.def new file mode 100644 index 0000000000000000000000000000000000000000..cbcb641a68ad2cc847f4244885ceb1cc06ef327e --- /dev/null +++ b/bash-5.1/builtins_org/exec.def @@ -0,0 +1,273 @@ +This file is exec.def, from which is created exec.c. +It implements the builtin "exec" in Bash. + +Copyright (C) 1987-2019 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES exec.c + +$BUILTIN exec +$FUNCTION exec_builtin +$SHORT_DOC exec [-cl] [-a name] [command [argument ...]] [redirection ...] +Replace the shell with the given command. + +Execute COMMAND, replacing this shell with the specified program. +ARGUMENTS become the arguments to COMMAND. If COMMAND is not specified, +any redirections take effect in the current shell. + +Options: + -a name pass NAME as the zeroth argument to COMMAND + -c execute COMMAND with an empty environment + -l place a dash in the zeroth argument to COMMAND + +If the command cannot be executed, a non-interactive shell exits, unless +the shell option `execfail' is set. + +Exit Status: +Returns success unless COMMAND is not found or a redirection error occurs. +$END + +#include + +#include "../bashtypes.h" +#include "posixstat.h" +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "../findcmd.h" +#if defined (JOB_CONTROL) +# include "../jobs.h" +#endif +#include "../flags.h" +#include "../trap.h" +#if defined (HISTORY) +# include "../bashhist.h" +#endif +#include "common.h" +#include "bashgetopt.h" +#include "input.h" + +/* Not all systems declare ERRNO in errno.h... and some systems #define it! */ +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +extern REDIRECT *redirection_undo_list; +extern char *exec_argv0; + +int no_exit_on_failed_exec; + +/* If the user wants this to look like a login shell, then + prepend a `-' onto NAME and return the new name. */ +static char * +mkdashname (name) + char *name; +{ + char *ret; + + ret = (char *)xmalloc (2 + strlen (name)); + ret[0] = '-'; + strcpy (ret + 1, name); + return ret; +} + +int +exec_builtin (list) + WORD_LIST *list; +{ + int exit_value = EXECUTION_FAILURE; + int cleanenv, login, opt, orig_job_control; + char *argv0, *command, **args, **env, *newname, *com2; + + cleanenv = login = 0; + exec_argv0 = argv0 = (char *)NULL; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "cla:")) != -1) + { + switch (opt) + { + case 'c': + cleanenv = 1; + break; + case 'l': + login = 1; + break; + case 'a': + argv0 = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + /* First, let the redirections remain. */ + dispose_redirects (redirection_undo_list); + redirection_undo_list = (REDIRECT *)NULL; + + if (list == 0) + return (EXECUTION_SUCCESS); + +#if defined (RESTRICTED_SHELL) + if (restricted) + { + sh_restricted ((char *)NULL); + return (EXECUTION_FAILURE); + } +#endif /* RESTRICTED_SHELL */ + + args = strvec_from_word_list (list, 1, 0, (int *)NULL); + env = (char **)0; + + /* A command with a slash anywhere in its name is not looked up in $PATH. */ + command = absolute_program (args[0]) ? args[0] : search_for_command (args[0], 1); + + if (command == 0) + { + if (file_isdir (args[0])) + { +#if defined (EISDIR) + builtin_error (_("%s: cannot execute: %s"), args[0], strerror (EISDIR)); +#else + builtin_error (_("%s: cannot execute: %s"), args[0], strerror (errno)); +#endif + exit_value = EX_NOEXEC; + } + else + { + sh_notfound (args[0]); + exit_value = EX_NOTFOUND; /* As per Posix.2, 3.14.6 */ + } + goto failed_exec; + } + + com2 = full_pathname (command); + if (com2) + { + if (command != args[0]) + free (command); + command = com2; + } + + if (argv0) + { + free (args[0]); + args[0] = login ? mkdashname (argv0) : savestring (argv0); + exec_argv0 = savestring (args[0]); + } + else if (login) + { + newname = mkdashname (args[0]); + free (args[0]); + args[0] = newname; + } + + /* Decrement SHLVL by 1 so a new shell started here has the same value, + preserving the appearance. After we do that, we need to change the + exported environment to include the new value. If we've already forked + and are in a subshell, we don't want to decrement the shell level, + since we are `increasing' the level */ + + if (cleanenv == 0 && (subshell_environment & SUBSHELL_PAREN) == 0) + adjust_shell_level (-1); + + if (cleanenv) + { + env = strvec_create (1); + env[0] = (char *)0; + } + else + { + maybe_make_export_env (); + env = export_env; + } + +#if defined (HISTORY) + if (interactive_shell && subshell_environment == 0) + maybe_save_shell_history (); +#endif /* HISTORY */ + + restore_original_signals (); + +#if defined (JOB_CONTROL) + orig_job_control = job_control; /* XXX - was also interactive_shell */ + if (subshell_environment == 0) + end_job_control (); + if (interactive || job_control) + default_tty_job_signals (); /* undo initialize_job_signals */ +#endif /* JOB_CONTROL */ + +#if defined (BUFFERED_INPUT) + if (default_buffered_input >= 0) + sync_buffered_stream (default_buffered_input); +#endif + + exit_value = shell_execve (command, args, env); + + /* We have to set this to NULL because shell_execve has called realloc() + to stuff more items at the front of the array, which may have caused + the memory to be freed by realloc(). We don't want to free it twice. */ + args = (char **)NULL; + if (cleanenv == 0) + adjust_shell_level (1); + + if (exit_value == EX_NOTFOUND) /* no duplicate error message */ + goto failed_exec; + else if (executable_file (command) == 0) + { + builtin_error (_("%s: cannot execute: %s"), command, strerror (errno)); + exit_value = EX_NOEXEC; /* As per Posix.2, 3.14.6 */ + } + else + file_error (command); + +failed_exec: + FREE (command); + + if (subshell_environment || (interactive == 0 && no_exit_on_failed_exec == 0)) + exit_shell (exit_value); + + if (args) + strvec_dispose (args); + + if (env && env != export_env) + strvec_dispose (env); + + initialize_traps (); + initialize_signals (1); + +#if defined (JOB_CONTROL) + if (orig_job_control) + restart_job_control (); +#endif /* JOB_CONTROL */ + + return (exit_value); +} diff --git a/bash-5.1/builtins_org/exit.def b/bash-5.1/builtins_org/exit.def new file mode 100644 index 0000000000000000000000000000000000000000..dc6f3d5b66e1f5f4a104ed0a915fed0bbc2426c7 --- /dev/null +++ b/bash-5.1/builtins_org/exit.def @@ -0,0 +1,169 @@ +This file is exit.def, from which is created exit.c. +It implements the builtins "exit", and "logout" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES exit.c + +$BUILTIN exit +$FUNCTION exit_builtin +$SHORT_DOC exit [n] +Exit the shell. + +Exits the shell with a status of N. If N is omitted, the exit status +is that of the last command executed. +$END + +#include + +#include "../bashtypes.h" +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "../jobs.h" +#include "../trap.h" + +#include "common.h" +#include "builtext.h" /* for jobs_builtin */ + +extern int check_jobs_at_exit; + +static int exit_or_logout PARAMS((WORD_LIST *)); +static int sourced_logout; + +int +exit_builtin (list) + WORD_LIST *list; +{ + CHECK_HELPOPT (list); + + if (interactive) + { + fprintf (stderr, login_shell ? _("logout\n") : "exit\n"); + fflush (stderr); + } + + return (exit_or_logout (list)); +} + +$BUILTIN logout +$FUNCTION logout_builtin +$SHORT_DOC logout [n] +Exit a login shell. + +Exits a login shell with exit status N. Returns an error if not executed +in a login shell. +$END + +/* How to logout. */ +int +logout_builtin (list) + WORD_LIST *list; +{ + CHECK_HELPOPT (list); + + if (login_shell == 0 /* && interactive */) + { + builtin_error (_("not login shell: use `exit'")); + return (EXECUTION_FAILURE); + } + else + return (exit_or_logout (list)); +} + +static int +exit_or_logout (list) + WORD_LIST *list; +{ + int exit_value; + +#if defined (JOB_CONTROL) + int exit_immediate_okay, stopmsg; + + exit_immediate_okay = (interactive == 0 || + last_shell_builtin == exit_builtin || + last_shell_builtin == logout_builtin || + last_shell_builtin == jobs_builtin); + + /* Check for stopped jobs if the user wants to. */ + if (exit_immediate_okay == 0) + { + register int i; + for (i = stopmsg = 0; i < js.j_jobslots; i++) + if (jobs[i] && STOPPED (i)) + stopmsg = JSTOPPED; + else if (check_jobs_at_exit && stopmsg == 0 && jobs[i] && RUNNING (i)) + stopmsg = JRUNNING; + + if (stopmsg == JSTOPPED) + fprintf (stderr, _("There are stopped jobs.\n")); + else if (stopmsg == JRUNNING) + fprintf (stderr, _("There are running jobs.\n")); + + if (stopmsg && check_jobs_at_exit) + list_all_jobs (JLIST_STANDARD); + + if (stopmsg) + { + /* This is NOT superfluous because EOF can get here without + going through the command parser. Set both last and this + so that either `exit', `logout', or ^D will work to exit + immediately if nothing intervenes. */ + this_shell_builtin = last_shell_builtin = exit_builtin; + return (EXECUTION_FAILURE); + } + } +#endif /* JOB_CONTROL */ + + /* Get return value if present. This means that you can type + `logout 5' to a shell, and it returns 5. */ + + /* If we're running the exit trap (running_trap == 1, since running_trap + gets set to SIG+1), and we don't have a argument given to `exit' + (list == 0), use the exit status we saved before running the trap + commands (trap_saved_exit_value). */ + exit_value = (running_trap == 1 && list == 0) ? trap_saved_exit_value : get_exitstat (list); + + bash_logout (); + + last_command_exit_value = exit_value; + + /* Exit the program. */ + jump_to_top_level (EXITPROG); + /*NOTREACHED*/ +} + +void +bash_logout () +{ + /* Run our `~/.bash_logout' file if it exists, and this is a login shell. */ + if (login_shell && sourced_logout++ == 0 && subshell_environment == 0) + { + maybe_execute_file ("~/.bash_logout", 1); +#ifdef SYS_BASH_LOGOUT + maybe_execute_file (SYS_BASH_LOGOUT, 1); +#endif + } +} diff --git a/bash-5.1/builtins_org/fc.def b/bash-5.1/builtins_org/fc.def new file mode 100644 index 0000000000000000000000000000000000000000..467dbcbcc33a89b02e228dd442f5c221a02b22bf --- /dev/null +++ b/bash-5.1/builtins_org/fc.def @@ -0,0 +1,782 @@ +This file is fc.def, from which is created fc.c. +It implements the builtin "fc" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES fc.c + +$BUILTIN fc +$FUNCTION fc_builtin +$DEPENDS_ON HISTORY +$SHORT_DOC fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command] +Display or execute commands from the history list. + +fc is used to list or edit and re-execute commands from the history list. +FIRST and LAST can be numbers specifying the range, or FIRST can be a +string, which means the most recent command beginning with that +string. + +Options: + -e ENAME select which editor to use. Default is FCEDIT, then EDITOR, + then vi + -l list lines instead of editing + -n omit line numbers when listing + -r reverse the order of the lines (newest listed first) + +With the `fc -s [pat=rep ...] [command]' format, COMMAND is +re-executed after the substitution OLD=NEW is performed. + +A useful alias to use with this is r='fc -s', so that typing `r cc' +runs the last command beginning with `cc' and typing `r' re-executes +the last command. + +Exit Status: +Returns success or status of executed command; non-zero if an error occurs. +$END + +#include + +#if defined (HISTORY) +#if defined (HAVE_SYS_PARAM_H) +# include +#endif +#include "../bashtypes.h" +#include "posixstat.h" +#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include + +#include "../bashansi.h" +#include "../bashintl.h" +#include + +#include "../shell.h" +#include "../builtins.h" +#include "../flags.h" +#include "../parser.h" +#include "../bashhist.h" +#include "maxpath.h" +#include +#include "bashgetopt.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#define HIST_INVALID INT_MIN +#define HIST_ERANGE INT_MIN+1 +#define HIST_NOTFOUND INT_MIN+2 + +/* Values for the flags argument to fc_gethnum */ +#define HN_LISTING 0x01 +#define HN_FIRST 0x02 + +extern int unlink PARAMS((const char *)); + +extern FILE *sh_mktmpfp PARAMS((char *, int, char **)); + +extern int suppress_debug_trap_verbose; + +/* **************************************************************** */ +/* */ +/* The K*rn shell style fc command (Fix Command) */ +/* */ +/* **************************************************************** */ + +/* fc builtin command (fix command) for Bash for those who + like K*rn-style history better than csh-style. + + fc [-e ename] [-nlr] [first] [last] + + FIRST and LAST can be numbers specifying the range, or FIRST can be + a string, which means the most recent command beginning with that + string. + + -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR, + then the editor which corresponds to the current readline editing + mode, then vi. + + -l means list lines instead of editing. + -n means no line numbers listed. + -r means reverse the order of the lines (making it newest listed first). + + fc -e - [pat=rep ...] [command] + fc -s [pat=rep ...] [command] + + Equivalent to !command:sg/pat/rep execpt there can be multiple PAT=REP's. +*/ + +/* Data structure describing a list of global replacements to perform. */ +typedef struct repl { + struct repl *next; + char *pat; + char *rep; +} REPL; + +/* Accessors for HIST_ENTRY lists that are called HLIST. */ +#define histline(i) (hlist[(i)]->line) +#define histdata(i) (hlist[(i)]->data) + +#define FREE_RLIST() \ + do { \ + for (rl = rlist; rl; ) { \ + REPL *r; \ + r = rl->next; \ + if (rl->pat) \ + free (rl->pat); \ + if (rl->rep) \ + free (rl->rep); \ + free (rl); \ + rl = r; \ + } \ + } while (0) + +static char *fc_dosubs PARAMS((char *, REPL *)); +static char *fc_gethist PARAMS((char *, HIST_ENTRY **, int)); +static int fc_gethnum PARAMS((char *, HIST_ENTRY **, int)); +static int fc_number PARAMS((WORD_LIST *)); +static void fc_replhist PARAMS((char *)); +#ifdef INCLUDE_UNUSED +static char *fc_readline PARAMS((FILE *)); +static void fc_addhist PARAMS((char *)); +#endif + +static void +set_verbose_flag () +{ + echo_input_at_read = verbose_flag; +} + +/* String to execute on a file that we want to edit. */ +#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}" +#if defined (STRICT_POSIX) +# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-ed}" +#else +# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-ed}}" +#endif + +int +fc_builtin (list) + WORD_LIST *list; +{ + register int i; + register char *sep; + int numbering, reverse, listing, execute; + int histbeg, histend, last_hist, retval, opt, rh, real_last; + FILE *stream; + REPL *rlist, *rl; + char *ename, *command, *newcom, *fcedit; + HIST_ENTRY **hlist; + char *fn; + + numbering = 1; + reverse = listing = execute = 0; + ename = (char *)NULL; + + /* Parse out the options and set which of the two forms we're in. */ + reset_internal_getopt (); + lcurrent = list; /* XXX */ + while (fc_number (loptend = lcurrent) == 0 && + (opt = internal_getopt (list, ":e:lnrs")) != -1) + { + switch (opt) + { + case 'n': + numbering = 0; + break; + + case 'l': + listing = HN_LISTING; /* for fc_gethnum */ + break; + + case 'r': + reverse = 1; + break; + + case 's': + execute = 1; + break; + + case 'e': + ename = list_optarg; + break; + + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + if (ename && (*ename == '-') && (ename[1] == '\0')) + execute = 1; + + /* The "execute" form of the command (re-run, with possible string + substitutions). */ + if (execute) + { + rlist = (REPL *)NULL; + while (list && ((sep = (char *)strchr (list->word->word, '=')) != NULL)) + { + *sep++ = '\0'; + rl = (REPL *)xmalloc (sizeof (REPL)); + rl->next = (REPL *)NULL; + rl->pat = savestring (list->word->word); + rl->rep = savestring (sep); + + if (rlist == NULL) + rlist = rl; + else + { + rl->next = rlist; + rlist = rl; + } + list = list->next; + } + + /* If we have a list of substitutions to do, then reverse it + to get the replacements in the proper order. */ + + rlist = REVERSE_LIST (rlist, REPL *); + + hlist = history_list (); + + /* If we still have something in list, it is a command spec. + Otherwise, we use the most recent command in time. */ + command = fc_gethist (list ? list->word->word : (char *)NULL, hlist, 0); + + if (command == NULL) + { + builtin_error (_("no command found")); + if (rlist) + FREE_RLIST (); + + return (EXECUTION_FAILURE); + } + + if (rlist) + { + newcom = fc_dosubs (command, rlist); + free (command); + FREE_RLIST (); + command = newcom; + } + + fprintf (stderr, "%s\n", command); + fc_replhist (command); /* replace `fc -s' with command */ + /* Posix says that the re-executed commands should be entered into the + history. */ + return (parse_and_execute (command, "fc", SEVAL_NOHIST)); + } + + /* This is the second form of the command (the list-or-edit-and-rerun + form). */ + hlist = history_list (); + if (hlist == 0) + return (EXECUTION_SUCCESS); + for (i = 0; hlist[i]; i++); + + /* With the Bash implementation of history, the current command line + ("fc blah..." and so on) is already part of the history list by + the time we get to this point. This just skips over that command + and makes the last command that this deals with be the last command + the user entered before the fc. We need to check whether the + line was actually added (HISTIGNORE may have caused it to not be), + so we check hist_last_line_added. */ + + /* Even though command substitution through parse_and_execute turns off + remember_on_history, command substitution in a shell when set -o history + has been enabled (interactive or not) should use it in the last_hist + calculation as if it were on. */ + rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list); + last_hist = i - rh - hist_last_line_added; + + /* Make sure that real_last is calculated the same way here and in + fc_gethnum. The return value from fc_gethnum is treated specially if + it is == real_last and we are listing commands. */ + real_last = i; + /* back up from the end to the last non-null history entry */ + while (hlist[real_last] == 0 && real_last > 0) + real_last--; + + /* XXX */ + if (i == last_hist && hlist[last_hist] == 0) + while (last_hist >= 0 && hlist[last_hist] == 0) + last_hist--; + if (last_hist < 0) + last_hist = 0; /* per POSIX */ + + if (list) + { + histbeg = fc_gethnum (list->word->word, hlist, listing|HN_FIRST); + list = list->next; + + if (list) + histend = fc_gethnum (list->word->word, hlist, listing); + else if (histbeg == real_last) + histend = listing ? real_last : histbeg; + else + histend = listing ? last_hist : histbeg; + } + else + { + /* The default for listing is the last 16 history items. */ + if (listing) + { + histend = last_hist; + histbeg = histend - 16 + 1; /* +1 because loop below uses >= */ + if (histbeg < 0) + histbeg = 0; + } + else + /* For editing, it is the last history command. */ + histbeg = histend = last_hist; + } + + if (histbeg == HIST_INVALID || histend == HIST_INVALID) + { + sh_erange ((char *)NULL, _("history specification")); + return (EXECUTION_FAILURE); + } + else if (histbeg == HIST_ERANGE || histend == HIST_ERANGE) + { + sh_erange ((char *)NULL, _("history specification")); + return (EXECUTION_FAILURE); + } + else if (histbeg == HIST_NOTFOUND || histend == HIST_NOTFOUND) + { + builtin_error (_("no command found")); + return (EXECUTION_FAILURE); + } + + /* We don't throw an error for line specifications out of range, per POSIX */ + if (histbeg < 0) + histbeg = 0; + if (histend < 0) + histend = 0; + + /* "When not listing, the fc command that caused the editing shall not be + entered into the history list." */ + if (listing == 0 && hist_last_line_added) + { + bash_delete_last_history (); + /* If we're editing a single command -- the last command in the + history -- and we just removed the dummy command added by + edit_and_execute_command (), we need to check whether or not we + just removed the last command in the history and need to back + the pointer up. remember_on_history is off because we're running + in parse_and_execute(). */ + if (histbeg == histend && histend == last_hist && hlist[last_hist] == 0) + last_hist = histbeg = --histend; + + if (hlist[last_hist] == 0) + last_hist--; + if (histend >= last_hist) + histend = last_hist; + else if (histbeg >= last_hist) + histbeg = last_hist; + } + + if (histbeg == HIST_INVALID || histend == HIST_INVALID) + { + sh_erange ((char *)NULL, _("history specification")); + return (EXECUTION_FAILURE); + } + else if (histbeg == HIST_ERANGE || histend == HIST_ERANGE) + { + sh_erange ((char *)NULL, _("history specification")); + return (EXECUTION_FAILURE); + } + else if (histbeg == HIST_NOTFOUND || histend == HIST_NOTFOUND) + { + builtin_error (_("no command found")); + return (EXECUTION_FAILURE); + } + + /* We don't throw an error for line specifications out of range, per POSIX */ + if (histbeg < 0) + histbeg = 0; + if (histend < 0) + histend = 0; + + if (histend < histbeg) + { + i = histend; + histend = histbeg; + histbeg = i; + + reverse = 1; + } + + if (listing) + stream = stdout; + else + { + numbering = 0; + stream = sh_mktmpfp ("bash-fc", MT_USERANDOM|MT_USETMPDIR, &fn); + if (stream == 0) + { + builtin_error (_("%s: cannot open temp file: %s"), fn ? fn : "", strerror (errno)); + FREE (fn); + return (EXECUTION_FAILURE); + } + } + + for (i = reverse ? histend : histbeg; reverse ? i >= histbeg : i <= histend; reverse ? i-- : i++) + { + QUIT; + if (numbering) + fprintf (stream, "%d", i + history_base); + if (listing) + { + if (posixly_correct) + fputs ("\t", stream); + else + fprintf (stream, "\t%c", histdata (i) ? '*' : ' '); + } + fprintf (stream, "%s\n", histline (i)); + } + + if (listing) + return (sh_chkwrite (EXECUTION_SUCCESS)); + + fflush (stream); + if (ferror (stream)) + { + sh_wrerror (); + fclose (stream); + FREE (fn); + return (EXECUTION_FAILURE); + } + fclose (stream); + + /* Now edit the file of commands. */ + if (ename) + { + command = (char *)xmalloc (strlen (ename) + strlen (fn) + 2); + sprintf (command, "%s %s", ename, fn); + } + else + { + fcedit = posixly_correct ? POSIX_FC_EDIT_COMMAND : FC_EDIT_COMMAND; + command = (char *)xmalloc (3 + strlen (fcedit) + strlen (fn)); + sprintf (command, "%s %s", fcedit, fn); + } + retval = parse_and_execute (command, "fc", SEVAL_NOHIST); + if (retval != EXECUTION_SUCCESS) + { + unlink (fn); + free (fn); + return (EXECUTION_FAILURE); + } + +#if defined (READLINE) + /* If we're executing as part of a dispatched readline command like + {emacs,vi}_edit_and_execute_command, the readline state will indicate it. + We could remove the partial command from the history, but ksh93 doesn't + so we stay compatible. */ +#endif + + /* Make sure parse_and_execute doesn't turn this off, even though a + call to parse_and_execute farther up the function call stack (e.g., + if this is called by vi_edit_and_execute_command) may have already + called bash_history_disable. */ + remember_on_history = 1; + + /* Turn on the `v' flag while fc_execute_file runs so the commands + will be echoed as they are read by the parser. */ + begin_unwind_frame ("fc builtin"); + add_unwind_protect (xfree, fn); + add_unwind_protect (unlink, fn); + add_unwind_protect (set_verbose_flag, (char *)NULL); + unwind_protect_int (suppress_debug_trap_verbose); + echo_input_at_read = 1; + suppress_debug_trap_verbose = 1; + + retval = fc_execute_file (fn); + run_unwind_frame ("fc builtin"); + + return (retval); +} + +/* Return 1 if LIST->word->word is a legal number for fc's use. */ +static int +fc_number (list) + WORD_LIST *list; +{ + char *s; + + if (list == 0) + return 0; + s = list->word->word; + if (*s == '-') + s++; + return (legal_number (s, (intmax_t *)NULL)); +} + +/* Return an absolute index into HLIST which corresponds to COMMAND. If + COMMAND is a number, then it was specified in relative terms. If it + is a string, then it is the start of a command line present in HLIST. + MODE includes HN_LISTING if we are listing commands, and does not if we + are executing them. If MODE includes HN_FIRST we are looking for the + first history number specification. */ +static int +fc_gethnum (command, hlist, mode) + char *command; + HIST_ENTRY **hlist; + int mode; +{ + int sign, n, clen, rh; + register int i, j, last_hist, real_last, listing; + register char *s; + + listing = mode & HN_LISTING; + sign = 1; + /* Count history elements. */ + for (i = 0; hlist[i]; i++); + + /* With the Bash implementation of history, the current command line + ("fc blah..." and so on) is already part of the history list by + the time we get to this point. This just skips over that command + and makes the last command that this deals with be the last command + the user entered before the fc. We need to check whether the + line was actually added (HISTIGNORE may have caused it to not be), + so we check hist_last_line_added. This needs to agree with the + calculation of last_hist in fc_builtin above. */ + /* Even though command substitution through parse_and_execute turns off + remember_on_history, command substitution in a shell when set -o history + has been enabled (interactive or not) should use it in the last_hist + calculation as if it were on. */ + rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list); + last_hist = i - rh - hist_last_line_added; + + if (i == last_hist && hlist[last_hist] == 0) + while (last_hist >= 0 && hlist[last_hist] == 0) + last_hist--; + if (last_hist < 0) + return (-1); + + real_last = i; + i = last_hist; + + /* No specification defaults to most recent command. */ + if (command == NULL) + return (i); + + /* back up from the end to the last non-null history entry */ + while (hlist[real_last] == 0 && real_last > 0) + real_last--; + + /* Otherwise, there is a specification. It can be a number relative to + the current position, or an absolute history number. */ + s = command; + + /* Handle possible leading minus sign. */ + if (s && (*s == '-')) + { + sign = -1; + s++; + } + + if (s && DIGIT(*s)) + { + n = atoi (s); + n *= sign; + + /* We want to return something that is an offset to HISTORY_BASE. */ + + /* If the value is negative or zero, then it is an offset from + the current history item. */ + /* We don't use HN_FIRST here, so we don't return different values + depending on whether we're looking for the first or last in a + pair of range arguments, but nobody else does, either. */ + if (n < 0) + { + n += i + 1; + return (n < 0 ? 0 : n); + } + else if (n == 0) + return ((sign == -1) ? (listing ? real_last : HIST_INVALID) : i); + else + { + /* If we're out of range (greater than I (last history entry) or + less than HISTORY_BASE, we want to return different values + based on whether or not we are looking for the first or last + value in a desired range of history entries. */ + n -= history_base; + if (n < 0) + return (mode & HN_FIRST ? 0 : i); + else if (n >= i) + return (mode & HN_FIRST ? 0 : i); + else + return n; + } + } + + clen = strlen (command); + for (j = i; j >= 0; j--) + { + if (STREQN (command, histline (j), clen)) + return (j); + } + return (HIST_NOTFOUND); +} + +/* Locate the most recent history line which begins with + COMMAND in HLIST, and return a malloc()'ed copy of it. + MODE is 1 if we are listing commands, 0 if we are executing them. */ +static char * +fc_gethist (command, hlist, mode) + char *command; + HIST_ENTRY **hlist; + int mode; +{ + int i; + + if (hlist == 0) + return ((char *)NULL); + + i = fc_gethnum (command, hlist, mode); + + if (i >= 0) + return (savestring (histline (i))); + else + return ((char *)NULL); +} + +#ifdef INCLUDE_UNUSED +/* Read the edited history lines from STREAM and return them + one at a time. This can read unlimited length lines. The + caller should free the storage. */ +static char * +fc_readline (stream) + FILE *stream; +{ + register int c; + int line_len = 0, lindex = 0; + char *line = (char *)NULL; + + while ((c = getc (stream)) != EOF) + { + if ((lindex + 2) >= line_len) + line = (char *)xrealloc (line, (line_len += 128)); + + if (c == '\n') + { + line[lindex++] = '\n'; + line[lindex++] = '\0'; + return (line); + } + else + line[lindex++] = c; + } + + if (!lindex) + { + if (line) + free (line); + + return ((char *)NULL); + } + + if (lindex + 2 >= line_len) + line = (char *)xrealloc (line, lindex + 3); + + line[lindex++] = '\n'; /* Finish with newline if none in file */ + line[lindex++] = '\0'; + return (line); +} +#endif + +/* Perform the SUBS on COMMAND. + SUBS is a list of substitutions, and COMMAND is a simple string. + Return a pointer to a malloc'ed string which contains the substituted + command. */ +static char * +fc_dosubs (command, subs) + char *command; + REPL *subs; +{ + register char *new, *t; + register REPL *r; + + for (new = savestring (command), r = subs; r; r = r->next) + { + t = strsub (new, r->pat, r->rep, 1); + free (new); + new = t; + } + return (new); +} + +/* Use `command' to replace the last entry in the history list, which, + by this time, is `fc blah...'. The intent is that the new command + become the history entry, and that `fc' should never appear in the + history list. This way you can do `r' to your heart's content. */ +static void +fc_replhist (command) + char *command; +{ + int n; + + if (command == 0 || *command == '\0') + return; + + n = strlen (command); + if (command[n - 1] == '\n') + command[n - 1] = '\0'; + + if (command && *command) + { + bash_delete_last_history (); + maybe_add_history (command); /* Obeys HISTCONTROL setting. */ + } +} + +#ifdef INCLUDE_UNUSED +/* Add LINE to the history, after removing a single trailing newline. */ +static void +fc_addhist (line) + char *line; +{ + register int n; + + if (line == 0 || *line == 0) + return; + + n = strlen (line); + + if (line[n - 1] == '\n') + line[n - 1] = '\0'; + + if (line && *line) + maybe_add_history (line); /* Obeys HISTCONTROL setting. */ +} +#endif + +#endif /* HISTORY */ diff --git a/bash-5.1/builtins_org/fg_bg.def b/bash-5.1/builtins_org/fg_bg.def new file mode 100644 index 0000000000000000000000000000000000000000..0fb53223d447cbc93328337ec5b4e8809c2d4e7d --- /dev/null +++ b/bash-5.1/builtins_org/fg_bg.def @@ -0,0 +1,189 @@ +This file is fg_bg.def, from which is created fg_bg.c. +It implements the builtins "bg" and "fg" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES fg_bg.c + +$BUILTIN fg +$FUNCTION fg_builtin +$DEPENDS_ON JOB_CONTROL +$SHORT_DOC fg [job_spec] +Move job to the foreground. + +Place the job identified by JOB_SPEC in the foreground, making it the +current job. If JOB_SPEC is not present, the shell's notion of the +current job is used. + +Exit Status: +Status of command placed in foreground, or failure if an error occurs. +$END + +#include + +#include "../bashtypes.h" +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "../jobs.h" +#include "common.h" +#include "bashgetopt.h" + +#if defined (JOB_CONTROL) +static int fg_bg PARAMS((WORD_LIST *, int)); + +/* How to bring a job into the foreground. */ +int +fg_builtin (list) + WORD_LIST *list; +{ + int fg_bit; + register WORD_LIST *t; + + CHECK_HELPOPT (list); + + if (job_control == 0) + { + sh_nojobs ((char *)NULL); + return (EXECUTION_FAILURE); + } + + if (no_options (list)) + return (EX_USAGE); + list = loptend; + + /* If the last arg on the line is '&', then start this job in the + background. Else, fg the job. */ + for (t = list; t && t->next; t = t->next) + ; + fg_bit = (t && t->word->word[0] == '&' && t->word->word[1] == '\0') == 0; + + return (fg_bg (list, fg_bit)); +} +#endif /* JOB_CONTROL */ + +$BUILTIN bg +$FUNCTION bg_builtin +$DEPENDS_ON JOB_CONTROL +$SHORT_DOC bg [job_spec ...] +Move jobs to the background. + +Place the jobs identified by each JOB_SPEC in the background, as if they +had been started with `&'. If JOB_SPEC is not present, the shell's notion +of the current job is used. + +Exit Status: +Returns success unless job control is not enabled or an error occurs. +$END + +#if defined (JOB_CONTROL) +/* How to put a job into the background. */ +int +bg_builtin (list) + WORD_LIST *list; +{ + int r; + + CHECK_HELPOPT (list); + + if (job_control == 0) + { + sh_nojobs ((char *)NULL); + return (EXECUTION_FAILURE); + } + + if (no_options (list)) + return (EX_USAGE); + list = loptend; + + /* This relies on the fact that fg_bg() takes a WORD_LIST *, but only acts + on the first member (if any) of that list. */ + r = EXECUTION_SUCCESS; + do + { + if (fg_bg (list, 0) == EXECUTION_FAILURE) + r = EXECUTION_FAILURE; + if (list) + list = list->next; + } + while (list); + + return r; +} + +/* How to put a job into the foreground/background. */ +static int +fg_bg (list, foreground) + WORD_LIST *list; + int foreground; +{ + sigset_t set, oset; + int job, status, old_async_pid; + JOB *j; + + BLOCK_CHILD (set, oset); + job = get_job_spec (list); + + if (INVALID_JOB (job)) + { + if (job != DUP_JOB) + sh_badjob (list ? list->word->word : _("current")); + + goto failure; + } + + j = get_job_by_jid (job); + /* Or if j->pgrp == shell_pgrp. */ + if (IS_JOBCONTROL (job) == 0) + { + builtin_error (_("job %d started without job control"), job + 1); + goto failure; + } + + if (foreground == 0) + { + old_async_pid = last_asynchronous_pid; + last_asynchronous_pid = j->pgrp; /* As per Posix.2 5.4.2 */ + } + + status = start_job (job, foreground); + + if (status >= 0) + { + /* win: */ + UNBLOCK_CHILD (oset); + return (foreground ? status : EXECUTION_SUCCESS); + } + else + { + if (foreground == 0) + last_asynchronous_pid = old_async_pid; + + failure: + UNBLOCK_CHILD (oset); + return (EXECUTION_FAILURE); + } +} +#endif /* JOB_CONTROL */ diff --git a/bash-5.1/builtins_org/gen-helpfiles.c b/bash-5.1/builtins_org/gen-helpfiles.c new file mode 100644 index 0000000000000000000000000000000000000000..6bed44745827f3cc7938c510cc9f71473a3c201c --- /dev/null +++ b/bash-5.1/builtins_org/gen-helpfiles.c @@ -0,0 +1,197 @@ +/* gen-helpfiles - create files containing builtin help text */ + +/* Copyright (C) 2012-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* This links with a specially-generated version of builtins.c and takes + the long_doc members of each struct builtin element and writes those to + the file named by the `handle' member of the struct builtin element. */ + +#if !defined (CROSS_COMPILING) +# include +#else /* CROSS_COMPILING */ +/* A conservative set of defines based on POSIX/SUS3/XPG6 */ +# define HAVE_UNISTD_H +# define HAVE_STRING_H +# define HAVE_STDLIB_H + +# define HAVE_RENAME +#endif /* CROSS_COMPILING */ + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#ifndef _MINIX +# include "../bashtypes.h" +# if defined (HAVE_SYS_FILE_H) +# include +# endif +#endif + +#include "posixstat.h" +#include "filecntl.h" + +#include "../bashansi.h" +#include +#include + +#include "stdc.h" + +#include "../builtins.h" +#include "tmpbuiltins.h" + +#if defined (USING_BASH_MALLOC) +#undef xmalloc +#undef xrealloc +#undef xfree + +#undef free /* defined in xmalloc.h */ +#endif + +#ifndef errno +extern int errno; +#endif + +#if !defined (__STDC__) && !defined (strcpy) +extern char *strcpy (); +#endif /* !__STDC__ && !strcpy */ + +#define whitespace(c) (((c) == ' ') || ((c) == '\t')) + +/* Flag values that builtins can have. */ +#define BUILTIN_FLAG_SPECIAL 0x01 +#define BUILTIN_FLAG_ASSIGNMENT 0x02 +#define BUILTIN_FLAG_POSIX_BUILTIN 0x04 + +#define BASE_INDENT 4 + +/* Non-zero means to produce separate help files for each builtin, named by + the builtin name, in `./helpfiles'. */ +int separate_helpfiles = 0; + +/* Non-zero means to create single C strings for each `longdoc', with + embedded newlines, for ease of translation. */ +int single_longdoc_strings = 1; + +/* The name of a directory into which the separate external help files will + eventually be installed. */ +char *helpfile_directory; + +/* Forward declarations. */ + +int write_helpfiles PARAMS((struct builtin *)); + +/* For each file mentioned on the command line, process it and + write the information to STRUCTFILE and EXTERNFILE, while + creating the production file if necessary. */ +int +main (argc, argv) + int argc; + char **argv; +{ + int arg_index = 1; + + while (arg_index < argc && argv[arg_index][0] == '-') + { + char *arg = argv[arg_index++]; + + if (strcmp (arg, "-noproduction") == 0) + ; + else if (strcmp (arg, "-H") == 0) + helpfile_directory = argv[arg_index++]; + else if (strcmp (arg, "-S") == 0) + single_longdoc_strings = 0; + else + { + fprintf (stderr, "%s: Unknown flag %s.\n", argv[0], arg); + exit (2); + } + } + + write_helpfiles(shell_builtins); + + exit (0); +} + +/* Write DOCUMENTATION to STREAM, perhaps surrounding it with double-quotes + and quoting special characters in the string. Handle special things for + internationalization (gettext) and the single-string vs. multiple-strings + issues. */ +void +write_documentation (stream, documentation, indentation) + FILE *stream; + char *documentation; + int indentation; +{ + if (stream == 0) + return; + + if (documentation) + fprintf (stream, "%*s%s\n", indentation, " ", documentation); +} + +int +write_helpfiles (builtins) + struct builtin *builtins; +{ + char *helpfile, *bname, *fname; + FILE *helpfp; + int i, hdlen; + struct builtin b; + + i = mkdir ("helpfiles", 0777); + if (i < 0 && errno != EEXIST) + { + fprintf (stderr, "write_helpfiles: helpfiles: cannot create directory\n"); + return -1; + } + + hdlen = strlen ("helpfiles/"); + for (i = 0; i < num_shell_builtins; i++) + { + b = builtins[i]; + + fname = (char *)b.handle; + helpfile = (char *)malloc (hdlen + strlen (fname) + 1); + if (helpfile == 0) + { + fprintf (stderr, "gen-helpfiles: cannot allocate memory\n"); + exit (1); + } + sprintf (helpfile, "helpfiles/%s", fname); + + helpfp = fopen (helpfile, "w"); + if (helpfp == 0) + { + fprintf (stderr, "write_helpfiles: cannot open %s\n", helpfile); + free (helpfile); + continue; + } + + write_documentation (helpfp, b.long_doc[0], 4); + + fflush (helpfp); + fclose (helpfp); + free (helpfile); + } + return 0; +} diff --git a/bash-5.1/builtins_org/getopt.c b/bash-5.1/builtins_org/getopt.c new file mode 100644 index 0000000000000000000000000000000000000000..9529bc37d97c33e17a203fc2d3ab9f2cd97b1052 --- /dev/null +++ b/bash-5.1/builtins_org/getopt.c @@ -0,0 +1,355 @@ +/* getopt.c - getopt for Bash. Used by the getopt builtin. */ + +/* Copyright (C) 1993-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "memalloc.h" +#include "../bashintl.h" +#include "../shell.h" +#include "getopt.h" + +/* For communication from `sh_getopt' to the caller. + When `sh_getopt' finds an option that takes an argument, + the argument value is returned here. */ +char *sh_optarg = 0; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `sh_getopt'. + + On entry to `sh_getopt', zero means this is the first call; initialize. + + When `sh_getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `sh_optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* XXX 1003.2 says this must be 1 before any call. */ +int sh_optind = 0; + +/* Index of the current argument. */ +static int sh_curopt; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; +static int sh_charindex; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int sh_opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int sh_optopt = '?'; + +/* Set to 1 when we see an invalid option; public so getopts can reset it. */ +int sh_badopt = 0; + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `sh_getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `sh_getopt' finds another option character, it returns that character, + updating `sh_optind' and `nextchar' so that the next call to `sh_getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `sh_getopt' returns `EOF'. + Then `sh_optind' is the index in ARGV of the first ARGV-element + that is not an option. + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `sh_opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `sh_optarg'. */ + +/* 1003.2 specifies the format of this message. */ +#define BADOPT(x) fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], x) +#define NEEDARG(x) fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], x) + +int +sh_getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + char c, *temp; + + sh_optarg = 0; + + if (sh_optind >= argc || sh_optind < 0) /* XXX was sh_optind > argc */ + { + sh_optind = argc; + return (EOF); + } + + /* Initialize the internal data when the first call is made. + Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + if (sh_optind == 0) + { + sh_optind = 1; + nextchar = (char *)NULL; + } + + if (nextchar == 0 || *nextchar == '\0') + { + /* If we have done all the ARGV-elements, stop the scan. */ + if (sh_optind >= argc) + return EOF; + + temp = argv[sh_optind]; + + /* Special ARGV-element `--' means premature end of options. + Skip it like a null option, and return EOF. */ + if (temp[0] == '-' && temp[1] == '-' && temp[2] == '\0') + { + sh_optind++; + return EOF; + } + + /* If we have come to a non-option, either stop the scan or describe + it to the caller and pass it by. This makes the pseudo-option + `-' mean the end of options, but does not skip over it. */ + if (temp[0] != '-' || temp[1] == '\0') + return EOF; + + /* We have found another option-ARGV-element. + Start decoding its characters. */ + nextchar = argv[sh_curopt = sh_optind] + 1; + sh_charindex = 1; + } + + /* Look at and handle the next option-character. */ + + c = *nextchar++; sh_charindex++; + temp = strchr (optstring, c); + + sh_optopt = c; + + /* Increment `sh_optind' when we start to process its last character. */ + if (nextchar == 0 || *nextchar == '\0') + { + sh_optind++; + nextchar = (char *)NULL; + } + + if (sh_badopt = (temp == NULL || c == ':')) + { + if (sh_opterr) + BADOPT (c); + + return '?'; + } + + if (temp[1] == ':') + { + if (nextchar && *nextchar) + { + /* This is an option that requires an argument. */ + sh_optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + sh_optind++; + } + else if (sh_optind == argc) + { + if (sh_opterr) + NEEDARG (c); + + sh_optopt = c; + sh_optarg = ""; /* Needed by getopts. */ + c = (optstring[0] == ':') ? ':' : '?'; + } + else + /* We already incremented `sh_optind' once; + increment it again when taking next ARGV-elt as argument. */ + sh_optarg = argv[sh_optind++]; + nextchar = (char *)NULL; + } + return c; +} + +void +sh_getopt_restore_state (argv) + char **argv; +{ + if (nextchar) + nextchar = argv[sh_curopt] + sh_charindex; +} + +sh_getopt_state_t * +sh_getopt_alloc_istate () +{ + sh_getopt_state_t *ret; + + ret = (sh_getopt_state_t *)xmalloc (sizeof (sh_getopt_state_t)); + return ret; +} + +void +sh_getopt_dispose_istate (gs) + sh_getopt_state_t *gs; +{ + free (gs); +} + +sh_getopt_state_t * +sh_getopt_save_istate () +{ + sh_getopt_state_t *ret; + + ret = sh_getopt_alloc_istate (); + + ret->gs_optarg = sh_optarg; + ret->gs_optind = sh_optind; + ret->gs_curopt = sh_curopt; + ret->gs_nextchar = nextchar; /* XXX */ + ret->gs_charindex = sh_charindex; + ret->gs_flags = 0; /* XXX for later use */ + + return ret; +} + +void +sh_getopt_restore_istate (state) + sh_getopt_state_t *state; +{ + sh_optarg = state->gs_optarg; + sh_optind = state->gs_optind; + sh_curopt = state->gs_curopt; + nextchar = state->gs_nextchar; /* XXX - probably not usable */ + sh_charindex = state->gs_charindex; + + sh_getopt_dispose_istate (state); +} + +#if 0 +void +sh_getopt_debug_restore_state (argv) + char **argv; +{ + if (nextchar && nextchar != argv[sh_curopt] + sh_charindex) + { + itrace("sh_getopt_debug_restore_state: resetting nextchar"); + nextchar = argv[sh_curopt] + sh_charindex; + } +} +#endif + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `sh_getopt'. */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_sh_optind = 0; + + while (1) + { + int this_option_sh_optind = sh_optind ? sh_optind : 1; + + c = sh_getopt (argc, argv, "abc:d:0123456789"); + if (c == EOF) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_sh_optind != 0 && digit_sh_optind != this_option_sh_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_sh_optind = this_option_sh_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", sh_optarg); + break; + + case '?': + break; + + default: + printf ("?? sh_getopt returned character code 0%o ??\n", c); + } + } + + if (sh_optind < argc) + { + printf ("non-option ARGV-elements: "); + while (sh_optind < argc) + printf ("%s ", argv[sh_optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/bash-5.1/builtins_org/getopt.h b/bash-5.1/builtins_org/getopt.h new file mode 100644 index 0000000000000000000000000000000000000000..fd978597594e7c08bceda2219d67223855fe6379 --- /dev/null +++ b/bash-5.1/builtins_org/getopt.h @@ -0,0 +1,82 @@ +/* getopt.h - declarations for getopt. */ + +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* XXX THIS HAS BEEN MODIFIED FOR INCORPORATION INTO BASH XXX */ + +#ifndef _SH_GETOPT_H +#define _SH_GETOPT_H 1 + +#include "stdc.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *sh_optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `sh_optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int sh_optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int sh_opterr; + +/* Set to an option character which was unrecognized. */ + +extern int sh_optopt; + +/* Set to 1 when an unrecognized option is encountered. */ +extern int sh_badopt; + +extern int sh_getopt PARAMS((int, char *const *, const char *)); + +typedef struct sh_getopt_state +{ + char *gs_optarg; + int gs_optind; + int gs_curopt; + char *gs_nextchar; + int gs_charindex; + int gs_flags; +} sh_getopt_state_t; + +extern void sh_getopt_restore_state PARAMS((char **)); + +extern sh_getopt_state_t *sh_getopt_alloc_istate PARAMS((void)); +extern void sh_getopt_dispose_istate PARAMS((sh_getopt_state_t *)); + +extern sh_getopt_state_t *sh_getopt_save_istate PARAMS((void)); +extern void sh_getopt_restore_istate PARAMS((sh_getopt_state_t *)); + +#endif /* _SH_GETOPT_H */ diff --git a/bash-5.1/builtins_org/getopts.def b/bash-5.1/builtins_org/getopts.def new file mode 100644 index 0000000000000000000000000000000000000000..4c39c474cca04c679f93ff143d51fef6eea14300 --- /dev/null +++ b/bash-5.1/builtins_org/getopts.def @@ -0,0 +1,343 @@ +This file is getopts.def, from which is created getopts.c. +It implements the builtin "getopts" in Bash. + +Copyright (C) 1987-2019 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES getopts.c + +$BUILTIN getopts +$FUNCTION getopts_builtin +$SHORT_DOC getopts optstring name [arg ...] +Parse option arguments. + +Getopts is used by shell procedures to parse positional parameters +as options. + +OPTSTRING contains the option letters to be recognized; if a letter +is followed by a colon, the option is expected to have an argument, +which should be separated from it by white space. + +Each time it is invoked, getopts will place the next option in the +shell variable $name, initializing name if it does not exist, and +the index of the next argument to be processed into the shell +variable OPTIND. OPTIND is initialized to 1 each time the shell or +a shell script is invoked. When an option requires an argument, +getopts places that argument into the shell variable OPTARG. + +getopts reports errors in one of two ways. If the first character +of OPTSTRING is a colon, getopts uses silent error reporting. In +this mode, no error messages are printed. If an invalid option is +seen, getopts places the option character found into OPTARG. If a +required argument is not found, getopts places a ':' into NAME and +sets OPTARG to the option character found. If getopts is not in +silent mode, and an invalid option is seen, getopts places '?' into +NAME and unsets OPTARG. If a required argument is not found, a '?' +is placed in NAME, OPTARG is unset, and a diagnostic message is +printed. + +If the shell variable OPTERR has the value 0, getopts disables the +printing of error messages, even if the first character of +OPTSTRING is not a colon. OPTERR has the value 1 by default. + +Getopts normally parses the positional parameters, but if arguments +are supplied as ARG values, they are parsed instead. + +Exit Status: +Returns success if an option is found; fails if the end of options is +encountered or an error occurs. +$END + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "common.h" +#include "bashgetopt.h" +#include "getopt.h" + +#define G_EOF -1 +#define G_INVALID_OPT -2 +#define G_ARG_MISSING -3 + +static int getopts_unbind_variable PARAMS((char *)); +static int getopts_bind_variable PARAMS((char *, char *)); +static int dogetopts PARAMS((int, char **)); + +/* getopts_reset is magic code for when OPTIND is reset. N is the + value that has just been assigned to OPTIND. */ +void +getopts_reset (newind) + int newind; +{ + sh_optind = newind; + sh_badopt = 0; +} + +static int +getopts_unbind_variable (name) + char *name; +{ +#if 0 + return (unbind_variable (name)); +#else + return (unbind_variable_noref (name)); +#endif +} + +static int +getopts_bind_variable (name, value) + char *name, *value; +{ + SHELL_VAR *v; + + if (legal_identifier (name)) + { + v = bind_variable (name, value, 0); + if (v && (readonly_p (v) || noassign_p (v))) + return (EX_MISCERROR); + return (v ? EXECUTION_SUCCESS : EXECUTION_FAILURE); + } + else + { + sh_invalidid (name); + return (EXECUTION_FAILURE); + } +} + +/* Error handling is now performed as specified by Posix.2, draft 11 + (identical to that of ksh-88). The special handling is enabled if + the first character of the option string is a colon; this handling + disables diagnostic messages concerning missing option arguments + and invalid option characters. The handling is as follows. + + INVALID OPTIONS: + name -> "?" + if (special_error) then + OPTARG = option character found + no error output + else + OPTARG unset + diagnostic message + fi + + MISSING OPTION ARGUMENT; + if (special_error) then + name -> ":" + OPTARG = option character found + else + name -> "?" + OPTARG unset + diagnostic message + fi + */ + +static int +dogetopts (argc, argv) + int argc; + char **argv; +{ + int ret, special_error, old_opterr, i, n; + char strval[2], numval[16]; + char *optstr; /* list of options */ + char *name; /* variable to get flag val */ + char *t; + + if (argc < 3) + { + builtin_usage (); + return (EX_USAGE); + } + + /* argv[0] is "getopts". */ + + optstr = argv[1]; + name = argv[2]; + argc -= 2; + argv += 2; + + special_error = optstr[0] == ':'; + + if (special_error) + { + old_opterr = sh_opterr; + optstr++; + sh_opterr = 0; /* suppress diagnostic messages */ + } + + if (argc > 1) + { + sh_getopt_restore_state (argv); + t = argv[0]; + argv[0] = dollar_vars[0]; + ret = sh_getopt (argc, argv, optstr); + argv[0] = t; + } + else if (rest_of_args == (WORD_LIST *)NULL) + { + for (i = 0; i < 10 && dollar_vars[i]; i++) + ; + + sh_getopt_restore_state (dollar_vars); + ret = sh_getopt (i, dollar_vars, optstr); + } + else + { + register WORD_LIST *words; + char **v; + + i = number_of_args () + 1; /* +1 for $0 */ + v = strvec_create (i + 1); + for (i = 0; i < 10 && dollar_vars[i]; i++) + v[i] = dollar_vars[i]; + for (words = rest_of_args; words; words = words->next, i++) + v[i] = words->word->word; + v[i] = (char *)NULL; + sh_getopt_restore_state (v); + ret = sh_getopt (i, v, optstr); + free (v); + } + + if (special_error) + sh_opterr = old_opterr; + + /* Set the OPTIND variable in any case, to handle "--" skipping. It's + highly unlikely that 14 digits will be too few. */ + if (sh_optind < 10) + { + numval[14] = sh_optind + '0'; + numval[15] = '\0'; + i = 14; + } + else + { + numval[i = 15] = '\0'; + n = sh_optind; + do + { + numval[--i] = (n % 10) + '0'; + } + while (n /= 10); + } + bind_variable ("OPTIND", numval + i, 0); + + /* If an error occurred, decide which one it is and set the return + code appropriately. In all cases, the option character in error + is in OPTOPT. If an invalid option was encountered, OPTARG is + NULL. If a required option argument was missing, OPTARG points + to a NULL string (that is, sh_optarg[0] == 0). */ + if (ret == '?') + { + if (sh_optarg == NULL) + ret = G_INVALID_OPT; + else if (sh_optarg[0] == '\0') + ret = G_ARG_MISSING; + } + + if (ret == G_EOF) + { + getopts_unbind_variable ("OPTARG"); + getopts_bind_variable (name, "?"); + return (EXECUTION_FAILURE); + } + + if (ret == G_INVALID_OPT) + { + /* Invalid option encountered. */ + ret = getopts_bind_variable (name, "?"); + + if (special_error) + { + strval[0] = (char)sh_optopt; + strval[1] = '\0'; + bind_variable ("OPTARG", strval, 0); + } + else + getopts_unbind_variable ("OPTARG"); + + return (ret); + } + + if (ret == G_ARG_MISSING) + { + /* Required argument missing. */ + if (special_error) + { + ret = getopts_bind_variable (name, ":"); + + strval[0] = (char)sh_optopt; + strval[1] = '\0'; + bind_variable ("OPTARG", strval, 0); + } + else + { + ret = getopts_bind_variable (name, "?"); + getopts_unbind_variable ("OPTARG"); + } + return (ret); + } + + bind_variable ("OPTARG", sh_optarg, 0); + + strval[0] = (char) ret; + strval[1] = '\0'; + return (getopts_bind_variable (name, strval)); +} + +/* The getopts builtin. Build an argv, and call dogetopts with it. */ +int +getopts_builtin (list) + WORD_LIST *list; +{ + char **av; + int ac, ret; + + if (list == 0) + { + builtin_usage (); + return EX_USAGE; + } + + reset_internal_getopt (); + if ((ret = internal_getopt (list, "")) != -1) + { + if (ret == GETOPT_HELP) + builtin_help (); + else + builtin_usage (); + return (EX_USAGE); + } + list = loptend; + + av = make_builtin_argv (list, &ac); + ret = dogetopts (ac, av); + free ((char *)av); + + return (ret); +} diff --git a/bash-5.1/builtins_org/hash.def b/bash-5.1/builtins_org/hash.def new file mode 100644 index 0000000000000000000000000000000000000000..c58e91c4fc66a64b37e1d8d891a4ffc522a608d7 --- /dev/null +++ b/bash-5.1/builtins_org/hash.def @@ -0,0 +1,305 @@ +This file is hash.def, from which is created hash.c. +It implements the builtin "hash" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES hash.c + +$BUILTIN hash +$FUNCTION hash_builtin +$SHORT_DOC hash [-lr] [-p pathname] [-dt] [name ...] +Remember or display program locations. + +Determine and remember the full pathname of each command NAME. If +no arguments are given, information about remembered commands is displayed. + +Options: + -d forget the remembered location of each NAME + -l display in a format that may be reused as input + -p pathname use PATHNAME as the full pathname of NAME + -r forget all remembered locations + -t print the remembered location of each NAME, preceding + each location with the corresponding NAME if multiple + NAMEs are given +Arguments: + NAME Each NAME is searched for in $PATH and added to the list + of remembered commands. + +Exit Status: +Returns success unless NAME is not found or an invalid option is given. +$END + +#include + +#include + +#include "../bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../builtins.h" +#include "../execute_cmd.h" +#include "../flags.h" +#include "../findcmd.h" +#include "../hashcmd.h" +#include "common.h" +#include "bashgetopt.h" + +extern int dot_found_in_search; + +static int add_hashed_command PARAMS((char *, int)); +static int print_hash_info PARAMS((BUCKET_CONTENTS *)); +static int print_portable_hash_info PARAMS((BUCKET_CONTENTS *)); +static int print_hashed_commands PARAMS((int)); +static int list_hashed_filename_targets PARAMS((WORD_LIST *, int)); + +/* Print statistics on the current state of hashed commands. If LIST is + not empty, then rehash (or hash in the first place) the specified + commands. */ +int +hash_builtin (list) + WORD_LIST *list; +{ + int expunge_hash_table, list_targets, list_portably, delete, opt; + char *w, *pathname; + + if (hashing_enabled == 0) + { + builtin_error (_("hashing disabled")); + return (EXECUTION_FAILURE); + } + + expunge_hash_table = list_targets = list_portably = delete = 0; + pathname = (char *)NULL; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "dlp:rt")) != -1) + { + switch (opt) + { + case 'd': + delete = 1; + break; + case 'l': + list_portably = 1; + break; + case 'p': + pathname = list_optarg; + break; + case 'r': + expunge_hash_table = 1; + break; + case 't': + list_targets = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + /* hash -t requires at least one argument. */ + if (list == 0 && (delete || list_targets)) + { + sh_needarg (delete ? "-d" : "-t"); + return (EXECUTION_FAILURE); + } + + /* We want hash -r to be silent, but hash -- to print hashing info, so + we test expunge_hash_table. */ + if (list == 0 && expunge_hash_table == 0) + { + opt = print_hashed_commands (list_portably); + if (opt == 0 && posixly_correct == 0 && + (list_portably == 0 || shell_compatibility_level <= 50)) + printf (_("%s: hash table empty\n"), this_command_name); + + return (EXECUTION_SUCCESS); + } + + if (expunge_hash_table) + phash_flush (); + + /* If someone runs `hash -r -t xyz' he will be disappointed. */ + if (list_targets) + return (list_hashed_filename_targets (list, list_portably)); + +#if defined (RESTRICTED_SHELL) + if (restricted && pathname) + { + if (strchr (pathname, '/')) + { + sh_restricted (pathname); + return (EXECUTION_FAILURE); + } + /* If we are changing the hash table in a restricted shell, make sure the + target pathname can be found using a $PATH search. */ + w = find_user_command (pathname); + if (w == 0 || *w == 0 || executable_file (w) == 0) + { + sh_notfound (pathname); + free (w); + return (EXECUTION_FAILURE); + } + free (w); + } +#endif + + for (opt = EXECUTION_SUCCESS; list; list = list->next) + { + /* Add, remove or rehash the specified commands. */ + w = list->word->word; + if (absolute_program (w)) + continue; + else if (pathname) + { + if (is_directory (pathname)) + { +#ifdef EISDIR + builtin_error ("%s: %s", pathname, strerror (EISDIR)); +#else + builtin_error (_("%s: is a directory"), pathname); +#endif + opt = EXECUTION_FAILURE; + } + else + phash_insert (w, pathname, 0, 0); + } + else if (delete) + { + if (phash_remove (w)) + { + sh_notfound (w); + opt = EXECUTION_FAILURE; + } + } + else if (add_hashed_command (w, 0)) + opt = EXECUTION_FAILURE; + } + + fflush (stdout); + return (opt); +} + +static int +add_hashed_command (w, quiet) + char *w; + int quiet; +{ + int rv; + char *full_path; + + rv = 0; + if (find_function (w) == 0 && find_shell_builtin (w) == 0) + { + phash_remove (w); + full_path = find_user_command (w); + if (full_path && executable_file (full_path)) + phash_insert (w, full_path, dot_found_in_search, 0); + else + { + if (quiet == 0) + sh_notfound (w); + rv++; + } + FREE (full_path); + } + return (rv); +} + +/* Print information about current hashed info. */ +static int +print_hash_info (item) + BUCKET_CONTENTS *item; +{ + printf ("%4d\t%s\n", item->times_found, pathdata(item)->path); + return 0; +} + +static int +print_portable_hash_info (item) + BUCKET_CONTENTS *item; +{ + char *fp, *fn; + + fp = printable_filename (pathdata(item)->path, 1); + fn = printable_filename (item->key, 1); + printf ("builtin hash -p %s %s\n", fp, fn); + if (fp != pathdata(item)->path) + free (fp); + if (fn != item->key) + free (fn); + return 0; +} + +static int +print_hashed_commands (fmt) + int fmt; +{ + if (hashed_filenames == 0 || HASH_ENTRIES (hashed_filenames) == 0) + return (0); + + if (fmt == 0) + printf (_("hits\tcommand\n")); + hash_walk (hashed_filenames, fmt ? print_portable_hash_info : print_hash_info); + return (1); +} + +static int +list_hashed_filename_targets (list, fmt) + WORD_LIST *list; + int fmt; +{ + int all_found, multiple; + char *target; + WORD_LIST *l; + + all_found = 1; + multiple = list->next != 0; + + for (l = list; l; l = l->next) + { + target = phash_search (l->word->word); + if (target == 0) + { + all_found = 0; + sh_notfound (l->word->word); + continue; + } + if (fmt) + printf ("builtin hash -p %s %s\n", target, l->word->word); + else + { + if (multiple) + printf ("%s\t", l->word->word); + printf ("%s\n", target); + } + free (target); + } + + return (all_found ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +} diff --git a/bash-5.1/builtins_org/help.def b/bash-5.1/builtins_org/help.def new file mode 100644 index 0000000000000000000000000000000000000000..f33b2b9352189a3cbb7bad692d3fe0929d490826 --- /dev/null +++ b/bash-5.1/builtins_org/help.def @@ -0,0 +1,553 @@ +This file is help.def, from which is created help.c. +It implements the builtin "help" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES help.c + +$BUILTIN help +$FUNCTION help_builtin +$DEPENDS_ON HELP_BUILTIN +$SHORT_DOC help [-dms] [pattern ...] +Display information about builtin commands. + +Displays brief summaries of builtin commands. If PATTERN is +specified, gives detailed help on all commands matching PATTERN, +otherwise the list of help topics is printed. + +Options: + -d output short description for each topic + -m display usage in pseudo-manpage format + -s output only a short usage synopsis for each topic matching + PATTERN + +Arguments: + PATTERN Pattern specifying a help topic + +Exit Status: +Returns success unless PATTERN is not found or an invalid option is given. +$END + +#include + +#if defined (HELP_BUILTIN) +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include + +#include +#include + +#include "../bashintl.h" + +#include "../shell.h" +#include "../builtins.h" +#include "../execute_cmd.h" +#include "../pathexp.h" +#include "common.h" +#include "bashgetopt.h" + +#include +#include + +#ifndef errno +extern int errno; +#endif + +extern const char * const bash_copyright; +extern const char * const bash_license; + +static void show_builtin_command_help PARAMS((void)); +static int open_helpfile PARAMS((char *)); +static void show_desc PARAMS((char *, int)); +static void show_manpage PARAMS((char *, int)); +static void show_longdoc PARAMS((int)); + +/* Print out a list of the known functions in the shell, and what they do. + If LIST is supplied, print out the list which matches for each pattern + specified. */ +int +help_builtin (list) + WORD_LIST *list; +{ + register int i; + char *pattern, *name; + int plen, match_found, sflag, dflag, mflag, m, pass, this_found; + + dflag = sflag = mflag = 0; + reset_internal_getopt (); + while ((i = internal_getopt (list, "dms")) != -1) + { + switch (i) + { + case 'd': + dflag = 1; + break; + case 'm': + mflag = 1; + break; + case 's': + sflag = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + { + show_shell_version (0); + show_builtin_command_help (); + return (EXECUTION_SUCCESS); + } + + /* We should consider making `help bash' do something. */ + + if (glob_pattern_p (list->word->word) == 1) + { + printf ("%s", ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1))); + print_word_list (list, ", "); + printf ("%s", _("'\n\n")); + } + + for (match_found = 0, pattern = ""; list; list = list->next) + { + pattern = list->word->word; + plen = strlen (pattern); + + for (pass = 1, this_found = 0; pass < 3; pass++) + { + for (i = 0; name = shell_builtins[i].name; i++) + { + QUIT; + + /* First pass: look for exact string or pattern matches. + Second pass: look for prefix matches like bash-4.2 */ + if (pass == 1) + m = (strcmp (pattern, name) == 0) || + (strmatch (pattern, name, FNMATCH_EXTFLAG) != FNM_NOMATCH); + else + m = strncmp (pattern, name, plen) == 0; + + if (m) + { + this_found = 1; + match_found++; + if (dflag) + { + show_desc (name, i); + continue; + } + else if (mflag) + { + show_manpage (name, i); + continue; + } + + printf ("%s: %s\n", name, _(shell_builtins[i].short_doc)); + + if (sflag == 0) + show_longdoc (i); + } + } + if (pass == 1 && this_found == 1) + break; + } + } + + if (match_found == 0) + { + builtin_error (_("no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."), pattern, pattern, pattern); + return (EXECUTION_FAILURE); + } + + fflush (stdout); + return (EXECUTION_SUCCESS); +} + +void +builtin_help () +{ + int ind; + ptrdiff_t d; + + current_builtin = builtin_address_internal (this_command_name, 0); + if (current_builtin == 0) + return; + + d = current_builtin - shell_builtins; + +#if defined (__STDC__) + ind = (int)d; +#else + ind = (int)d / sizeof (struct builtin); +#endif + + printf ("%s: %s\n", this_command_name, _(shell_builtins[ind].short_doc)); + show_longdoc (ind); +} + +static int +open_helpfile (name) + char *name; +{ + int fd; + + fd = open (name, O_RDONLY); + if (fd == -1) + { + builtin_error (_("%s: cannot open: %s"), name, strerror (errno)); + return -1; + } + return fd; +} + +/* By convention, enforced by mkbuiltins.c, if separate help files are being + used, the long_doc array contains one string -- the full pathname of the + help file for this builtin. */ +static void +show_longdoc (i) + int i; +{ + register int j; + char * const *doc; + int fd; + + doc = shell_builtins[i].long_doc; + + if (doc && doc[0] && *doc[0] == '/' && doc[1] == (char *)NULL) + { + fd = open_helpfile (doc[0]); + if (fd < 0) + return; + zcatfd (fd, 1, doc[0]); + close (fd); + } + else if (doc) + for (j = 0; doc[j]; j++) + printf ("%*s%s\n", BASE_INDENT, " ", _(doc[j])); +} + +static void +show_desc (name, i) + char *name; + int i; +{ + register int j, r; + char **doc, *line; + int fd, usefile; + + doc = (char **)shell_builtins[i].long_doc; + + usefile = (doc && doc[0] && *doc[0] == '/' && doc[1] == (char *)NULL); + if (usefile) + { + fd = open_helpfile (doc[0]); + if (fd < 0) + return; + r = zmapfd (fd, &line, doc[0]); + close (fd); + /* XXX - handle errors if zmapfd returns < 0 */ + } + else + line = doc ? doc[0] : (char *)NULL; + + printf ("%s - ", name); + for (j = 0; line && line[j]; j++) + { + putchar (line[j]); + if (line[j] == '\n') + break; + } + + fflush (stdout); + + if (usefile) + free (line); +} + +/* Print builtin help in pseudo-manpage format. */ +static void +show_manpage (name, i) + char *name; + int i; +{ + register int j; + char **doc, *line; + int fd, usefile; + + doc = (char **)shell_builtins[i].long_doc; + + usefile = (doc && doc[0] && *doc[0] == '/' && doc[1] == (char *)NULL); + if (usefile) + { + fd = open_helpfile (doc[0]); + if (fd < 0) + return; + zmapfd (fd, &line, doc[0]); + close (fd); + } + else + line = doc ? _(doc[0]) : (char *)NULL; + + /* NAME */ + printf ("NAME\n"); + printf ("%*s%s - ", BASE_INDENT, " ", name); + for (j = 0; line && line[j]; j++) + { + putchar (line[j]); + if (line[j] == '\n') + break; + } + printf ("\n"); + + /* SYNOPSIS */ + printf ("SYNOPSIS\n"); + printf ("%*s%s\n\n", BASE_INDENT, " ", _(shell_builtins[i].short_doc)); + + /* DESCRIPTION */ + printf ("DESCRIPTION\n"); + if (usefile == 0) + { + for (j = 0; doc[j]; j++) + printf ("%*s%s\n", BASE_INDENT, " ", _(doc[j])); + } + else + { + for (j = 0; line && line[j]; j++) + { + putchar (line[j]); + if (line[j] == '\n') + printf ("%*s", BASE_INDENT, " "); + } + } + putchar ('\n'); + + /* SEE ALSO */ + printf ("SEE ALSO\n"); + printf ("%*sbash(1)\n\n", BASE_INDENT, " "); + + /* IMPLEMENTATION */ + printf ("IMPLEMENTATION\n"); + printf ("%*s", BASE_INDENT, " "); + show_shell_version (0); + printf ("%*s", BASE_INDENT, " "); + printf ("%s\n", _(bash_copyright)); + printf ("%*s", BASE_INDENT, " "); + printf ("%s\n", _(bash_license)); + + fflush (stdout); + if (usefile) + free (line); +} + +static void +dispcolumn (i, buf, bufsize, width, height) + int i; + char *buf; + size_t bufsize; + int width, height; +{ + int j; + int dispcols; + char *helpdoc; + + /* first column */ + helpdoc = _(shell_builtins[i].short_doc); + + buf[0] = (shell_builtins[i].flags & BUILTIN_ENABLED) ? ' ' : '*'; + strncpy (buf + 1, helpdoc, width - 2); + buf[width - 2] = '>'; /* indicate truncation */ + buf[width - 1] = '\0'; + printf ("%s", buf); + if (((i << 1) >= num_shell_builtins) || (i+height >= num_shell_builtins)) + { + printf ("\n"); + return; + } + + dispcols = strlen (buf); + /* two spaces */ + for (j = dispcols; j < width; j++) + putc (' ', stdout); + + /* second column */ + helpdoc = _(shell_builtins[i+height].short_doc); + + buf[0] = (shell_builtins[i+height].flags & BUILTIN_ENABLED) ? ' ' : '*'; + strncpy (buf + 1, helpdoc, width - 3); + buf[width - 3] = '>'; /* indicate truncation */ + buf[width - 2] = '\0'; + + printf ("%s\n", buf); +} + +#if defined (HANDLE_MULTIBYTE) +static void +wdispcolumn (i, buf, bufsize, width, height) + int i; + char *buf; + size_t bufsize; + int width, height; +{ + int j; + int dispcols, dispchars; + char *helpdoc; + wchar_t *wcstr; + size_t slen, n; + + /* first column */ + helpdoc = _(shell_builtins[i].short_doc); + + wcstr = 0; + slen = mbstowcs ((wchar_t *)0, helpdoc, 0); + if (slen == -1) + { + dispcolumn (i, buf, bufsize, width, height); + return; + } + + /* No bigger than the passed max width */ + if (slen >= width) + slen = width - 2; + wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (width + 2)); + n = mbstowcs (wcstr+1, helpdoc, slen + 1); + wcstr[n+1] = L'\0'; + + /* Turn tabs and newlines into spaces for column display, since wcwidth + returns -1 for them */ + for (j = 1; j < n; j++) + if (wcstr[j] == L'\n' || wcstr[j] == L'\t') + wcstr[j] = L' '; + + /* dispchars == number of characters that will be displayed */ + dispchars = wcsnwidth (wcstr+1, slen, width - 2); + /* dispcols == number of columns required to display DISPCHARS */ + dispcols = wcswidth (wcstr+1, dispchars) + 1; /* +1 for ' ' or '*' */ + + wcstr[0] = (shell_builtins[i].flags & BUILTIN_ENABLED) ? L' ' : L'*'; + + if (dispcols >= width-2) + { + wcstr[dispchars] = L'>'; /* indicate truncation */ + wcstr[dispchars+1] = L'\0'; + } + + printf ("%ls", wcstr); + if (((i << 1) >= num_shell_builtins) || (i+height >= num_shell_builtins)) + { + printf ("\n"); + free (wcstr); + return; + } + + /* at least one space */ + for (j = dispcols; j < width; j++) + putc (' ', stdout); + + /* second column */ + helpdoc = _(shell_builtins[i+height].short_doc); + slen = mbstowcs ((wchar_t *)0, helpdoc, 0); + if (slen == -1) + { + /* for now */ + printf ("%c%s\n", (shell_builtins[i+height].flags & BUILTIN_ENABLED) ? ' ' : '*', helpdoc); + free (wcstr); + return; + } + + /* Reuse wcstr since it is already width wide chars long */ + if (slen >= width) + slen = width - 2; + n = mbstowcs (wcstr+1, helpdoc, slen + 1); + wcstr[n+1] = L'\0'; /* make sure null-terminated */ + + /* Turn tabs and newlines into spaces for column display */ + for (j = 1; j < n; j++) + if (wcstr[j] == L'\n' || wcstr[j] == L'\t') + wcstr[j] = L' '; + + /* dispchars == number of characters that will be displayed */ + dispchars = wcsnwidth (wcstr+1, slen, width - 2); + dispcols = wcswidth (wcstr+1, dispchars) + 1; /* +1 for ' ' or '*' */ + + wcstr[0] = (shell_builtins[i+height].flags & BUILTIN_ENABLED) ? L' ' : L'*'; + + /* The dispchars-1 is there for terminals that behave strangely when you + have \n in the nth column for terminal width n; this is what bash-4.3 + did. */ + if (dispcols >= width - 2) + { + wcstr[dispchars-1] = L'>'; /* indicate truncation */ + wcstr[dispchars] = L'\0'; + } + + printf ("%ls\n", wcstr); + + free (wcstr); +} +#endif /* HANDLE_MULTIBYTE */ + +static void +show_builtin_command_help () +{ + int i, j; + int height, width; + char *t, blurb[128]; + + printf ( +_("These shell commands are defined internally. Type `help' to see this list.\n\ +Type `help name' to find out more about the function `name'.\n\ +Use `info bash' to find out more about the shell in general.\n\ +Use `man -k' or `info' to find out more about commands not in this list.\n\ +\n\ +A star (*) next to a name means that the command is disabled.\n\ +\n")); + + width = default_columns (); + + width /= 2; + if (width > sizeof (blurb)) + width = sizeof (blurb); + if (width <= 3) + width = 40; + height = (num_shell_builtins + 1) / 2; /* number of rows */ + + for (i = 0; i < height; i++) + { + QUIT; + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1) + wdispcolumn (i, blurb, sizeof (blurb), width, height); + else +#endif + dispcolumn (i, blurb, sizeof (blurb), width, height); + } +} +#endif /* HELP_BUILTIN */ diff --git a/bash-5.1/builtins_org/history.def b/bash-5.1/builtins_org/history.def new file mode 100644 index 0000000000000000000000000000000000000000..5db44c2c2906e6e76df17af781c545f362e1967f --- /dev/null +++ b/bash-5.1/builtins_org/history.def @@ -0,0 +1,466 @@ +This file is history.def, from which is created history.c. +It implements the builtin "history" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES history.c + +$BUILTIN history +$FUNCTION history_builtin +$DEPENDS_ON HISTORY +$SHORT_DOC history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...] +Display or manipulate the history list. + +Display the history list with line numbers, prefixing each modified +entry with a `*'. An argument of N lists only the last N entries. + +Options: + -c clear the history list by deleting all of the entries + -d offset delete the history entry at position OFFSET. Negative + offsets count back from the end of the history list + + -a append history lines from this session to the history file + -n read all history lines not already read from the history file + and append them to the history list + -r read the history file and append the contents to the history + list + -w write the current history to the history file + + -p perform history expansion on each ARG and display the result + without storing it in the history list + -s append the ARGs to the history list as a single entry + +If FILENAME is given, it is used as the history file. Otherwise, +if HISTFILE has a value, that is used, else ~/.bash_history. + +If the HISTTIMEFORMAT variable is set and not null, its value is used +as a format string for strftime(3) to print the time stamp associated +with each displayed history entry. No time stamps are printed otherwise. + +Exit Status: +Returns success unless an invalid option is given or an error occurs. +$END + +#include + +#if defined (HISTORY) +#include "../bashtypes.h" +#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include "posixstat.h" +#include "filecntl.h" +#include +#include +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../flags.h" +#include "../parser.h" +#include "../bashhist.h" +#include +#include "bashgetopt.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +static char *histtime PARAMS((HIST_ENTRY *, const char *)); +static int display_history PARAMS((WORD_LIST *)); +static void push_history PARAMS((WORD_LIST *)); +static int expand_and_print_history PARAMS((WORD_LIST *)); + +#define AFLAG 0x01 +#define RFLAG 0x02 +#define WFLAG 0x04 +#define NFLAG 0x08 +#define SFLAG 0x10 +#define PFLAG 0x20 +#define CFLAG 0x40 +#define DFLAG 0x80 + +int +history_builtin (list) + WORD_LIST *list; +{ + int flags, opt, result, old_history_lines, obase, ind; + char *filename, *delete_arg, *range; + intmax_t delete_offset; + + flags = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "acd:npsrw")) != -1) + { + switch (opt) + { + case 'a': + flags |= AFLAG; + break; + case 'c': + flags |= CFLAG; + break; + case 'n': + flags |= NFLAG; + break; + case 'r': + flags |= RFLAG; + break; + case 'w': + flags |= WFLAG; + break; + case 's': + flags |= SFLAG; + break; + case 'd': + flags |= DFLAG; + delete_arg = list_optarg; + break; + case 'p': +#if defined (BANG_HISTORY) + flags |= PFLAG; +#endif + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + opt = flags & (AFLAG|RFLAG|WFLAG|NFLAG); + if (opt && opt != AFLAG && opt != RFLAG && opt != WFLAG && opt != NFLAG) + { + builtin_error (_("cannot use more than one of -anrw")); + return (EXECUTION_FAILURE); + } + + /* clear the history, but allow other arguments to add to it again. */ + if (flags & CFLAG) + { + bash_clear_history (); + if (list == 0) + return (EXECUTION_SUCCESS); + } + + if (flags & SFLAG) + { + if (list) + push_history (list); + return (EXECUTION_SUCCESS); + } +#if defined (BANG_HISTORY) + else if (flags & PFLAG) + { + if (list) + return (expand_and_print_history (list)); + return (sh_chkwrite (EXECUTION_SUCCESS)); + } +#endif + else if ((flags & DFLAG) && (range = strchr ((delete_arg[0] == '-') ? delete_arg + 1 : delete_arg, '-'))) + { + intmax_t delete_start, delete_end; + *range++ = '\0'; + if (legal_number (delete_arg, &delete_start) == 0 || legal_number (range, &delete_end) == 0) + { + range[-1] = '-'; + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + if (delete_arg[0] == '-' && delete_start < 0) + { + /* the_history[history_length] == 0x0, so this is correct */ + delete_start += history_length; + if (delete_start < history_base) + { +start_error: + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + } + /* numbers as displayed by display_history are offset by history_base */ + else if (delete_start > 0) + delete_start -= history_base; + if (delete_start < 0 || delete_start >= history_length) + goto start_error; + if (range[0] == '-' && delete_end < 0) + { + delete_end += history_length; + if (delete_end < history_base) + { +range_error: + sh_erange (range, _("history position")); + return (EXECUTION_FAILURE); + } + } + else if (delete_end > 0) + delete_end -= history_base; + if (delete_end < 0 || delete_end >= history_length) + goto range_error; + result = bash_delete_history_range (delete_start, delete_end); + if (where_history () > history_length) + history_set_pos (history_length); + return (result ? EXECUTION_SUCCESS : EXECUTION_FAILURE); + } + else if (flags & DFLAG) + { + if (legal_number (delete_arg, &delete_offset) == 0) + { + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + /* check for negative offsets, count back from end of list */ + if (delete_arg[0] == '-' && delete_offset < 0) + { + /* since the_history[history_length] == 0x0, this calculation means + that history -d -1 will delete the last history entry, which at + this point is the history -d -1 we just added. */ + ind = history_length + delete_offset; + if (ind < history_base) + { + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + opt = ind + history_base; /* compensate for opt - history_base below */ + } + else if ((delete_offset < history_base) || (delete_offset >= (history_base + history_length))) + { + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + else + opt = delete_offset; + + /* Positive arguments from numbers as displayed by display_history need + to be offset by history_base */ + result = bash_delete_histent (opt - history_base); + /* Since remove_history changes history_length, this can happen if + we delete the last history entry. */ + if (where_history () > history_length) + history_set_pos (history_length); + return (result ? EXECUTION_SUCCESS : EXECUTION_FAILURE); + } + else if ((flags & (AFLAG|RFLAG|NFLAG|WFLAG|CFLAG)) == 0) + { + result = display_history (list); + return (sh_chkwrite (result)); + } + + filename = list ? list->word->word : get_string_value ("HISTFILE"); + result = EXECUTION_SUCCESS; + +#if defined (RESTRICTED_SHELL) + if (restricted && strchr (filename, '/')) + { + sh_restricted (filename); + return (EXECUTION_FAILURE); + } +#endif + + if (flags & AFLAG) /* Append session's history to file. */ + result = maybe_append_history (filename); + else if (flags & WFLAG) /* Write entire history. */ + result = write_history (filename); + else if (flags & RFLAG) /* Read entire file. */ + { + result = read_history (filename); + history_lines_in_file = history_lines_read_from_file; + /* history_lines_in_file = where_history () + history_base - 1; */ + } + else if (flags & NFLAG) /* Read `new' history from file. */ + { + /* Read all of the lines in the file that we haven't already read. */ + old_history_lines = history_lines_in_file; + obase = history_base; + + using_history (); + result = read_history_range (filename, history_lines_in_file, -1); + using_history (); + + history_lines_in_file = history_lines_read_from_file; + /* history_lines_in_file = where_history () + history_base - 1; */ + + /* If we're rewriting the history file at shell exit rather than just + appending the lines from this session to it, the question is whether + we reset history_lines_this_session to 0, losing any history entries + we had before we read the new entries from the history file, or + whether we count the new entries we just read from the file as + history lines added during this session. + Right now, we do the latter. This will cause these history entries + to be written to the history file along with any intermediate entries + we add when we do a `history -a', but the alternative is losing + them altogether. */ + if (force_append_history == 0) + history_lines_this_session += history_lines_in_file - old_history_lines + + history_base - obase; + } + + return (result ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} + +/* Accessors for HIST_ENTRY lists that are called HLIST. */ +#define histline(i) (hlist[(i)]->line) +#define histdata(i) (hlist[(i)]->data) + +static char * +histtime (hlist, histtimefmt) + HIST_ENTRY *hlist; + const char *histtimefmt; +{ + static char timestr[128]; + time_t t; + struct tm *tm; + + t = history_get_time (hlist); + tm = t ? localtime (&t) : 0; + if (t && tm) + strftime (timestr, sizeof (timestr), histtimefmt, tm); + else if (hlist->timestamp && hlist->timestamp[0]) + snprintf (timestr, sizeof (timestr), _("%s: invalid timestamp"), + (hlist->timestamp[0] == '#') ? hlist->timestamp + 1: hlist->timestamp); + else + strcpy (timestr, "??"); + return timestr; +} + +static int +display_history (list) + WORD_LIST *list; +{ + register int i; + intmax_t limit; + HIST_ENTRY **hlist; + char *histtimefmt, *timestr; + + if (list) + { + if (get_numeric_arg (list, 0, &limit) == 0) + return (EXECUTION_FAILURE); + + if (limit < 0) + limit = -limit; + } + else + limit = -1; + + hlist = history_list (); + + if (hlist) + { + for (i = 0; hlist[i]; i++) + ; + + if (0 <= limit && limit < i) + i -= limit; + else + i = 0; + + histtimefmt = get_string_value ("HISTTIMEFORMAT"); + + while (hlist[i]) + { + QUIT; + + timestr = (histtimefmt && *histtimefmt) ? histtime (hlist[i], histtimefmt) : (char *)NULL; + printf ("%5d%c %s%s\n", i + history_base, + histdata(i) ? '*' : ' ', + ((timestr && *timestr) ? timestr : ""), + histline(i)); + i++; + } + } + + return (EXECUTION_SUCCESS); +} + +/* Remove the last entry in the history list and add each argument in + LIST to the history. */ +static void +push_history (list) + WORD_LIST *list; +{ + char *s; + + /* Delete the last history entry if it was a single entry added to the + history list (generally the `history -s' itself), or if `history -s' + is being used in a compound command and the compound command was + added to the history as a single element (command-oriented history). + If you don't want history -s to remove the compound command from the + history, change #if 0 to #if 1 below. */ +#if 0 + if (remember_on_history && hist_last_line_pushed == 0 && + hist_last_line_added && bash_delete_last_history () == 0) +#else + if (remember_on_history && hist_last_line_pushed == 0 && + (hist_last_line_added || + (current_command_line_count > 0 && current_command_first_line_saved && command_oriented_history)) + && bash_delete_last_history () == 0) +#endif + return; + + s = string_list (list); + /* Call check_add_history with FORCE set to 1 to skip the check against + current_command_line_count. If history -s is used in a compound + command, the above code will delete the compound command's history + entry and this call will add the line to the history as a separate + entry. Without FORCE=1, if current_command_line_count were > 1, the + line would be appended to the entry before the just-deleted entry. */ + check_add_history (s, 1); /* obeys HISTCONTROL, HISTIGNORE */ + + hist_last_line_pushed = 1; /* XXX */ + free (s); +} + +#if defined (BANG_HISTORY) +static int +expand_and_print_history (list) + WORD_LIST *list; +{ + char *s; + int r, result; + + if (hist_last_line_pushed == 0 && hist_last_line_added && bash_delete_last_history () == 0) + return EXECUTION_FAILURE; + result = EXECUTION_SUCCESS; + while (list) + { + r = history_expand (list->word->word, &s); + if (r < 0) + { + builtin_error (_("%s: history expansion failed"), list->word->word); + result = EXECUTION_FAILURE; + } + else + { + fputs (s, stdout); + putchar ('\n'); + } + FREE (s); + list = list->next; + } + fflush (stdout); + return result; +} +#endif /* BANG_HISTORY */ +#endif /* HISTORY */ diff --git a/bash-5.1/builtins_org/inlib.def b/bash-5.1/builtins_org/inlib.def new file mode 100644 index 0000000000000000000000000000000000000000..c4faf0d537eaf757eb2e91018d377beef4bd7ecc --- /dev/null +++ b/bash-5.1/builtins_org/inlib.def @@ -0,0 +1,80 @@ +This file is inlib.def, from which is created inlib.c. +It implements the Apollo-specific builtin "inlib" in Bash. + +Copyright (C) 1987-2002 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES inlib.c +#include + +#include +#include "../shell.h" + +$BUILTIN inlib +$FUNCTION inlib_builtin +$DEPENDS_ON apollo +$SHORT_DOC inlib pathname [pathname...] +Install user-supplied library. + +Install a user-supplied library specified by pathname in the current +shell process. The library is used to resolve external references +in programs and libraries loaded after its installation. Note +that the library is not loaded into the address space unless it is +needed to resolve an external reference. The list of inlibed +libraries is passed to all children of the current shell. + +Exit Status: +Returns success unless PATHNAME is not found or an error occurs. +$END + +#if defined (apollo) + +#include +#include + +inlib_builtin (list) + WORD_LIST *list; +{ + status_$t status; + int return_value; + short len; + + if (!list) + { + builtin_usage (); + return (EX_USAGE); + } + + return_value = EXECUTION_SUCCESS; + + while (list) + { + len = (short)strlen (list->word->word); + loader_$inlib (list->word->word, len, &status); + + if (status.all != status_$ok) + { + builtin_error (_("%s: inlib failed"), list->word->word); + return_value = EXECUTION_FAILURE; + } + + list = list->next; + } + + return (return_value); +} +#endif /* apollo */ diff --git a/bash-5.1/builtins_org/jobs.def b/bash-5.1/builtins_org/jobs.def new file mode 100644 index 0000000000000000000000000000000000000000..1ce098d08be2b1a72b1f89284bcad48021778df0 --- /dev/null +++ b/bash-5.1/builtins_org/jobs.def @@ -0,0 +1,300 @@ +This file is jobs.def, from which is created jobs.c. +It implements the builtins "jobs" and "disown" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES jobs.c + +$BUILTIN jobs +$FUNCTION jobs_builtin +$DEPENDS_ON JOB_CONTROL +$SHORT_DOC jobs [-lnprs] [jobspec ...] or jobs -x command [args] +Display status of jobs. + +Lists the active jobs. JOBSPEC restricts output to that job. +Without options, the status of all active jobs is displayed. + +Options: + -l lists process IDs in addition to the normal information + -n lists only processes that have changed status since the last + notification + -p lists process IDs only + -r restrict output to running jobs + -s restrict output to stopped jobs + +If -x is supplied, COMMAND is run after all job specifications that +appear in ARGS have been replaced with the process ID of that job's +process group leader. + +Exit Status: +Returns success unless an invalid option is given or an error occurs. +If -x is used, returns the exit status of COMMAND. +$END + +#include + +#if defined (JOB_CONTROL) +#include "../bashtypes.h" +#include +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../jobs.h" +#include "../execute_cmd.h" +#include "bashgetopt.h" +#include "common.h" + +#define JSTATE_ANY 0x0 +#define JSTATE_RUNNING 0x1 +#define JSTATE_STOPPED 0x2 + +static int execute_list_with_replacements PARAMS((WORD_LIST *)); + +/* The `jobs' command. Prints outs a list of active jobs. If the + argument `-l' is given, then the process id's are printed also. + If the argument `-p' is given, print the process group leader's + pid only. If `-n' is given, only processes that have changed + status since the last notification are printed. If -x is given, + replace all job specs with the pid of the appropriate process + group leader and execute the command. The -r and -s options mean + to print info about running and stopped jobs only, respectively. */ +int +jobs_builtin (list) + WORD_LIST *list; +{ + int form, execute, state, opt, any_failed, job; + sigset_t set, oset; + + execute = any_failed = 0; + form = JLIST_STANDARD; + state = JSTATE_ANY; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "lpnxrs")) != -1) + { + switch (opt) + { + case 'l': + form = JLIST_LONG; + break; + case 'p': + form = JLIST_PID_ONLY; + break; + case 'n': + form = JLIST_CHANGED_ONLY; + break; + case 'x': + if (form != JLIST_STANDARD) + { + builtin_error (_("no other options allowed with `-x'")); + return (EXECUTION_FAILURE); + } + execute++; + break; + case 'r': + state = JSTATE_RUNNING; + break; + case 's': + state = JSTATE_STOPPED; + break; + + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + if (execute) + return (execute_list_with_replacements (list)); + + if (!list) + { + switch (state) + { + case JSTATE_ANY: + list_all_jobs (form); + break; + case JSTATE_RUNNING: + list_running_jobs (form); + break; + case JSTATE_STOPPED: + list_stopped_jobs (form); + break; + } + return (EXECUTION_SUCCESS); + } + + while (list) + { + BLOCK_CHILD (set, oset); + job = get_job_spec (list); + + if ((job == NO_JOB) || jobs == 0 || get_job_by_jid (job) == 0) + { + sh_badjob (list->word->word); + any_failed++; + } + else if (job != DUP_JOB) + list_one_job ((JOB *)NULL, form, 0, job); + + UNBLOCK_CHILD (oset); + list = list->next; + } + return (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} + +static int +execute_list_with_replacements (list) + WORD_LIST *list; +{ + register WORD_LIST *l; + int job, result; + COMMAND *command; + JOB *j; + + /* First do the replacement of job specifications with pids. */ + for (l = list; l; l = l->next) + { + if (l->word->word[0] == '%') /* we have a winner */ + { + job = get_job_spec (l); + + /* A bad job spec is not really a job spec! Pass it through. */ + if (INVALID_JOB (job)) + continue; + + j = get_job_by_jid (job); + free (l->word->word); + l->word->word = itos (j->pgrp); + } + } + + /* Next make a new simple command and execute it. */ + begin_unwind_frame ("jobs_builtin"); + + command = make_bare_simple_command (); + command->value.Simple->words = copy_word_list (list); + command->value.Simple->redirects = (REDIRECT *)NULL; + command->flags |= CMD_INHIBIT_EXPANSION; + command->value.Simple->flags |= CMD_INHIBIT_EXPANSION; + + add_unwind_protect (dispose_command, command); + result = execute_command (command); + dispose_command (command); + + discard_unwind_frame ("jobs_builtin"); + return (result); +} +#endif /* JOB_CONTROL */ + +$BUILTIN disown +$FUNCTION disown_builtin +$DEPENDS_ON JOB_CONTROL +$SHORT_DOC disown [-h] [-ar] [jobspec ... | pid ...] +Remove jobs from current shell. + +Removes each JOBSPEC argument from the table of active jobs. Without +any JOBSPECs, the shell uses its notion of the current job. + +Options: + -a remove all jobs if JOBSPEC is not supplied + -h mark each JOBSPEC so that SIGHUP is not sent to the job if the + shell receives a SIGHUP + -r remove only running jobs + +Exit Status: +Returns success unless an invalid option or JOBSPEC is given. +$END + +#if defined (JOB_CONTROL) +int +disown_builtin (list) + WORD_LIST *list; +{ + int opt, job, retval, nohup_only, running_jobs, all_jobs; + sigset_t set, oset; + intmax_t pid_value; + + nohup_only = running_jobs = all_jobs = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "ahr")) != -1) + { + switch (opt) + { + case 'a': + all_jobs = 1; + break; + case 'h': + nohup_only = 1; + break; + case 'r': + running_jobs = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + retval = EXECUTION_SUCCESS; + + /* `disown -a' or `disown -r' */ + if (list == 0 && (all_jobs || running_jobs)) + { + if (nohup_only) + nohup_all_jobs (running_jobs); + else + delete_all_jobs (running_jobs); + return (EXECUTION_SUCCESS); + } + + do + { + BLOCK_CHILD (set, oset); + job = (list && legal_number (list->word->word, &pid_value) && pid_value == (pid_t) pid_value) + ? get_job_by_pid ((pid_t) pid_value, 0, 0) + : get_job_spec (list); + + if (job == NO_JOB || jobs == 0 || INVALID_JOB (job)) + { + sh_badjob (list ? list->word->word : _("current")); + retval = EXECUTION_FAILURE; + } + else if (nohup_only) + nohup_job (job); + else + delete_job (job, 1); + UNBLOCK_CHILD (oset); + + if (list) + list = list->next; + } + while (list); + + return (retval); +} +#endif /* JOB_CONTROL */ diff --git a/bash-5.1/builtins_org/kill.def b/bash-5.1/builtins_org/kill.def new file mode 100644 index 0000000000000000000000000000000000000000..c655092e7be3e418d12a252f99317bb17372223d --- /dev/null +++ b/bash-5.1/builtins_org/kill.def @@ -0,0 +1,276 @@ +This file is kill.def, from which is created kill.c. +It implements the builtin "kill" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES kill.c + +$BUILTIN kill +$FUNCTION kill_builtin +$SHORT_DOC kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] +Send a signal to a job. + +Send the processes identified by PID or JOBSPEC the signal named by +SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then +SIGTERM is assumed. + +Options: + -s sig SIG is a signal name + -n sig SIG is a signal number + -l list the signal names; if arguments follow `-l' they are + assumed to be signal numbers for which names should be listed + -L synonym for -l + +Kill is a shell builtin for two reasons: it allows job IDs to be used +instead of process IDs, and allows processes to be killed if the limit +on processes that you can create is reached. + +Exit Status: +Returns success unless an invalid option is given or an error occurs. +$END + +#include + +#include +#include +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include + +#include "../shell.h" +#include "../trap.h" +#include "../jobs.h" +#include "common.h" + +/* Not all systems declare ERRNO in errno.h... and some systems #define it! */ +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +static void kill_error PARAMS((pid_t, int)); + +#if !defined (CONTINUE_AFTER_KILL_ERROR) +# define CONTINUE_OR_FAIL return (EXECUTION_FAILURE) +#else +# define CONTINUE_OR_FAIL goto continue_killing +#endif /* CONTINUE_AFTER_KILL_ERROR */ + +/* Here is the kill builtin. We only have it so that people can type + kill -KILL %1? No, if you fill up the process table this way you + can still kill some. */ +int +kill_builtin (list) + WORD_LIST *list; +{ + int sig, any_succeeded, listing, saw_signal, dflags; + char *sigspec, *word; + pid_t pid; + intmax_t pid_value; + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + CHECK_HELPOPT (list); + + any_succeeded = listing = saw_signal = 0; + sig = SIGTERM; + sigspec = "TERM"; + + dflags = DSIG_NOCASE | ((posixly_correct == 0) ? DSIG_SIGPREFIX : 0); + /* Process options. */ + while (list) + { + word = list->word->word; + + if (ISOPTION (word, 'l') || ISOPTION (word, 'L')) + { + listing++; + list = list->next; + } + else if (ISOPTION (word, 's') || ISOPTION (word, 'n')) + { + list = list->next; + if (list) + { + sigspec = list->word->word; +use_sigspec: + if (sigspec[0] == '0' && sigspec[1] == '\0') + sig = 0; + else + sig = decode_signal (sigspec, dflags); + list = list->next; + saw_signal++; + } + else + { + sh_needarg (word); + return (EXECUTION_FAILURE); + } + } + else if (word[0] == '-' && word[1] == 's' && ISALPHA (word[2])) + { + sigspec = word + 2; + goto use_sigspec; + } + else if (word[0] == '-' && word[1] == 'n' && ISDIGIT (word[2])) + { + sigspec = word + 2; + goto use_sigspec; + } + else if (ISOPTION (word, '-')) + { + list = list->next; + break; + } + else if (ISOPTION (word, '?')) + { + builtin_usage (); + return (EX_USAGE); + } + /* If this is a signal specification then process it. We only process + the first one seen; other arguments may signify process groups (e.g, + -num == process group num). */ + else if (*word == '-' && saw_signal == 0) + { + sigspec = word + 1; + sig = decode_signal (sigspec, dflags); + saw_signal++; + list = list->next; + } + else + break; + } + + if (listing) + return (display_signal_list (list, 0)); + + /* OK, we are killing processes. */ + if (sig == NO_SIG) + { + sh_invalidsig (sigspec); + return (EXECUTION_FAILURE); + } + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + while (list) + { + word = list->word->word; + + if (*word == '-') + word++; + + /* Use the entire argument in case of minus sign presence. */ + if (*word && legal_number (list->word->word, &pid_value) && (pid_value == (pid_t)pid_value)) + { + pid = (pid_t) pid_value; + + if (kill_pid (pid, sig, pid < -1) < 0) + { + if (errno == EINVAL) + sh_invalidsig (sigspec); + else + kill_error (pid, errno); + CONTINUE_OR_FAIL; + } + else + any_succeeded++; + } +#if defined (JOB_CONTROL) + else if (*list->word->word && *list->word->word != '%') + { + builtin_error (_("%s: arguments must be process or job IDs"), list->word->word); + CONTINUE_OR_FAIL; + } + else if (*word) + /* Posix.2 says you can kill without job control active (4.32.4) */ + { /* Must be a job spec. Check it out. */ + int job; + sigset_t set, oset; + JOB *j; + + BLOCK_CHILD (set, oset); + job = get_job_spec (list); + + if (INVALID_JOB (job)) + { + if (job != DUP_JOB) + sh_badjob (list->word->word); + UNBLOCK_CHILD (oset); + CONTINUE_OR_FAIL; + } + + j = get_job_by_jid (job); + /* Job spec used. Kill the process group. If the job was started + without job control, then its pgrp == shell_pgrp, so we have + to be careful. We take the pid of the first job in the pipeline + in that case. */ + pid = IS_JOBCONTROL (job) ? j->pgrp : j->pipe->pid; + + UNBLOCK_CHILD (oset); + + if (kill_pid (pid, sig, 1) < 0) + { + if (errno == EINVAL) + sh_invalidsig (sigspec); + else + kill_error (pid, errno); + CONTINUE_OR_FAIL; + } + else + any_succeeded++; + } +#endif /* !JOB_CONTROL */ + else + { + sh_badpid (list->word->word); + CONTINUE_OR_FAIL; + } + continue_killing: + list = list->next; + } + + return (any_succeeded ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +} + +static void +kill_error (pid, e) + pid_t pid; + int e; +{ + char *x; + + x = strerror (e); + if (x == 0) + x = _("Unknown error"); + builtin_error ("(%ld) - %s", (long)pid, x); +} diff --git a/bash-5.1/builtins_org/let.def b/bash-5.1/builtins_org/let.def new file mode 100644 index 0000000000000000000000000000000000000000..d090a45bc51f2f1e032413a9e0a3a049407bb85d --- /dev/null +++ b/bash-5.1/builtins_org/let.def @@ -0,0 +1,131 @@ +This file is let.def, from which is created let.c. +It implements the builtin "let" in Bash. + +Copyright (C) 1987-2009 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$BUILTIN let +$FUNCTION let_builtin +$PRODUCES let.c +$SHORT_DOC let arg [arg ...] +Evaluate arithmetic expressions. + +Evaluate each ARG as an arithmetic expression. Evaluation is done in +fixed-width integers with no check for overflow, though division by 0 +is trapped and flagged as an error. The following list of operators is +grouped into levels of equal-precedence operators. The levels are listed +in order of decreasing precedence. + + id++, id-- variable post-increment, post-decrement + ++id, --id variable pre-increment, pre-decrement + -, + unary minus, plus + !, ~ logical and bitwise negation + ** exponentiation + *, /, % multiplication, division, remainder + +, - addition, subtraction + <<, >> left and right bitwise shifts + <=, >=, <, > comparison + ==, != equality, inequality + & bitwise AND + ^ bitwise XOR + | bitwise OR + && logical AND + || logical OR + expr ? expr : expr + conditional operator + =, *=, /=, %=, + +=, -=, <<=, >>=, + &=, ^=, |= assignment + +Shell variables are allowed as operands. The name of the variable +is replaced by its value (coerced to a fixed-width integer) within +an expression. The variable need not have its integer attribute +turned on to be used in an expression. + +Operators are evaluated in order of precedence. Sub-expressions in +parentheses are evaluated first and may override the precedence +rules above. + +Exit Status: +If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashintl.h" + +#include "../shell.h" +#include "common.h" + +/* Arithmetic LET function. */ +int +let_builtin (list) + WORD_LIST *list; +{ + intmax_t ret; + int expok; + + CHECK_HELPOPT (list); + + /* Skip over leading `--' argument. */ + if (list && list->word && ISOPTION (list->word->word, '-')) + list = list->next; + + if (list == 0) + { + builtin_error (_("expression expected")); + return (EXECUTION_FAILURE); + } + + for (; list; list = list->next) + { + ret = evalexp (list->word->word, EXP_EXPANDED, &expok); + if (expok == 0) + return (EXECUTION_FAILURE); + } + + return ((ret == 0) ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} + +#ifdef INCLUDE_UNUSED +int +exp_builtin (list) + WORD_LIST *list; +{ + char *exp; + intmax_t ret; + int expok; + + if (list == 0) + { + builtin_error (_("expression expected")); + return (EXECUTION_FAILURE); + } + + exp = string_list (list); + ret = evalexp (exp, EXP_EXPANDED, &expok); + (void)free (exp); + return (((ret == 0) || (expok == 0)) ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} +#endif diff --git a/bash-5.1/builtins_org/mapfile.def b/bash-5.1/builtins_org/mapfile.def new file mode 100644 index 0000000000000000000000000000000000000000..65c3cb4f35ea9076f5373f085a743355b9d7565f --- /dev/null +++ b/bash-5.1/builtins_org/mapfile.def @@ -0,0 +1,374 @@ +This file is mapfile.def, from which is created mapfile.c. +It implements the builtin "mapfile" in Bash. + +Copyright (C) 2005-2006 Rocky Bernstein for Free Software Foundation, Inc. +Copyright (C) 2008-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES mapfile.c + +$BUILTIN mapfile +$FUNCTION mapfile_builtin +$SHORT_DOC mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array] +Read lines from the standard input into an indexed array variable. + +Read lines from the standard input into the indexed array variable ARRAY, or +from file descriptor FD if the -u option is supplied. The variable MAPFILE +is the default ARRAY. + +Options: + -d delim Use DELIM to terminate lines, instead of newline + -n count Copy at most COUNT lines. If COUNT is 0, all lines are copied + -O origin Begin assigning to ARRAY at index ORIGIN. The default index is 0 + -s count Discard the first COUNT lines read + -t Remove a trailing DELIM from each line read (default newline) + -u fd Read lines from file descriptor FD instead of the standard input + -C callback Evaluate CALLBACK each time QUANTUM lines are read + -c quantum Specify the number of lines read between each call to + CALLBACK + +Arguments: + ARRAY Array variable name to use for file data + +If -C is supplied without -c, the default quantum is 5000. When +CALLBACK is evaluated, it is supplied the index of the next array +element to be assigned and the line to be assigned to that element +as additional arguments. + +If not supplied with an explicit origin, mapfile will clear ARRAY before +assigning to it. + +Exit Status: +Returns success unless an invalid option is given or ARRAY is readonly or +not an indexed array. +$END + +$BUILTIN readarray +$FUNCTION mapfile_builtin +$SHORT_DOC readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array] +Read lines from a file into an array variable. + +A synonym for `mapfile'. +$END + +#include + +#include "builtins.h" +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" +#include "bashintl.h" + +#include +#include + +#include "../bashintl.h" +#include "../shell.h" +#include "common.h" +#include "bashgetopt.h" + +#if !defined (errno) +extern int errno; +#endif + +#if defined (ARRAY_VARS) + +static int run_callback PARAMS((const char *, unsigned int, const char *)); + +#define DEFAULT_ARRAY_NAME "MAPFILE" +#define DEFAULT_VARIABLE_NAME "MAPLINE" /* not used right now */ + +/* The value specifying how frequently `mapfile' calls the callback. */ +#define DEFAULT_QUANTUM 5000 + +/* Values for FLAGS */ +#define MAPF_CLEARARRAY 0x01 +#define MAPF_CHOP 0x02 + +static int delim; + +static int +run_callback (callback, curindex, curline) + const char *callback; + unsigned int curindex; + const char *curline; +{ + unsigned int execlen; + char *execstr, *qline; + int flags; + + qline = sh_single_quote (curline); + execlen = strlen (callback) + strlen (qline) + 10; + /* 1 for each space between %s and %d, + another 1 for the last nul char for C string. */ + execlen += 3; + execstr = xmalloc (execlen); + + flags = SEVAL_NOHIST; +#if 0 + if (interactive) + flags |= SEVAL_INTERACT; +#endif + snprintf (execstr, execlen, "%s %d %s", callback, curindex, qline); + free (qline); + return evalstring (execstr, NULL, flags); +} + +static void +do_chop(line, delim) + char *line; + unsigned char delim; +{ + int length; + + length = strlen (line); + if (length && line[length-1] == delim) + line[length-1] = '\0'; +} + +static int +mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_name, delim, flags) + int fd; + long line_count_goal, origin, nskip, callback_quantum; + char *callback, *array_name; + int delim; + int flags; +{ + char *line; + size_t line_length; + unsigned int array_index, line_count; + SHELL_VAR *entry; + int unbuffered_read; + + line = NULL; + line_length = 0; + unbuffered_read = 0; + + /* The following check should be done before reading any lines. Doing it + here allows us to call bind_array_element instead of bind_array_variable + and skip the variable lookup on every call. */ + entry = find_or_make_array_variable (array_name, 1); + if (entry == 0 || readonly_p (entry) || noassign_p (entry)) + { + if (entry && readonly_p (entry)) + err_readonly (array_name); + + return (EXECUTION_FAILURE); + } + else if (array_p (entry) == 0) + { + builtin_error (_("%s: not an indexed array"), array_name); + return (EXECUTION_FAILURE); + } + else if (invisible_p (entry)) + VUNSETATTR (entry, att_invisible); /* no longer invisible */ + + if (flags & MAPF_CLEARARRAY) + array_flush (array_cell (entry)); + +#ifndef __CYGWIN__ + unbuffered_read = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); +#else + unbuffered_read = 1; +#endif + + if (delim != '\n') + unbuffered_read = 1; + + zreset (); + + /* Skip any lines at beginning of file? */ + for (line_count = 0; line_count < nskip; line_count++) + if (zgetline (fd, &line, &line_length, delim, unbuffered_read) < 0) + break; + + line = 0; + line_length = 0; + + /* Reset the buffer for bash own stream */ + for (array_index = origin, line_count = 1; + zgetline (fd, &line, &line_length, delim, unbuffered_read) != -1; + array_index++) + { + /* Remove trailing newlines? */ + if (flags & MAPF_CHOP) + do_chop (line, delim); + + /* Has a callback been registered and if so is it time to call it? */ + if (callback && line_count && (line_count % callback_quantum) == 0) + { + run_callback (callback, array_index, line); + + /* Reset the buffer for bash own stream. */ + if (unbuffered_read == 0) + zsyncfd (fd); + } + + /* XXX - bad things can happen if the callback modifies ENTRY, e.g., + unsetting it or changing it to a non-indexed-array type. */ + bind_array_element (entry, array_index, line, 0); + + /* Have we exceeded # of lines to store? */ + line_count++; + if (line_count_goal != 0 && line_count > line_count_goal) + break; + } + + free (line); + + if (unbuffered_read == 0) + zsyncfd (fd); + + return EXECUTION_SUCCESS; +} + +int +mapfile_builtin (list) + WORD_LIST *list; +{ + int opt, code, fd, flags; + intmax_t intval; + long lines, origin, nskip, callback_quantum; + char *array_name, *callback; + + fd = 0; + lines = origin = nskip = 0; + flags = MAPF_CLEARARRAY; + callback_quantum = DEFAULT_QUANTUM; + callback = 0; + delim = '\n'; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "d:u:n:O:tC:c:s:")) != -1) + { + switch (opt) + { + case 'd': + delim = *list_optarg; + break; + case 'u': + code = legal_number (list_optarg, &intval); + if (code == 0 || intval < 0 || intval != (int)intval) + { + builtin_error (_("%s: invalid file descriptor specification"), list_optarg); + return (EXECUTION_FAILURE); + } + else + fd = intval; + + if (sh_validfd (fd) == 0) + { + builtin_error (_("%d: invalid file descriptor: %s"), fd, strerror (errno)); + return (EXECUTION_FAILURE); + } + break; + + case 'n': + code = legal_number (list_optarg, &intval); + if (code == 0 || intval < 0 || intval != (unsigned)intval) + { + builtin_error (_("%s: invalid line count"), list_optarg); + return (EXECUTION_FAILURE); + } + else + lines = intval; + break; + + case 'O': + code = legal_number (list_optarg, &intval); + if (code == 0 || intval < 0 || intval != (unsigned)intval) + { + builtin_error (_("%s: invalid array origin"), list_optarg); + return (EXECUTION_FAILURE); + } + else + origin = intval; + flags &= ~MAPF_CLEARARRAY; + break; + case 't': + flags |= MAPF_CHOP; + break; + case 'C': + callback = list_optarg; + break; + case 'c': + code = legal_number (list_optarg, &intval); + if (code == 0 || intval <= 0 || intval != (unsigned)intval) + { + builtin_error (_("%s: invalid callback quantum"), list_optarg); + return (EXECUTION_FAILURE); + } + else + callback_quantum = intval; + break; + case 's': + code = legal_number (list_optarg, &intval); + if (code == 0 || intval < 0 || intval != (unsigned)intval) + { + builtin_error (_("%s: invalid line count"), list_optarg); + return (EXECUTION_FAILURE); + } + else + nskip = intval; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + array_name = DEFAULT_ARRAY_NAME; + else if (list->word == 0 || list->word->word == 0) + { + builtin_error ("internal error: getting variable name"); + return (EXECUTION_FAILURE); + } + else if (list->word->word[0] == '\0') + { + builtin_error (_("empty array variable name")); + return (EX_USAGE); + } + else + array_name = list->word->word; + + if (legal_identifier (array_name) == 0) + { + sh_invalidid (array_name); + return (EXECUTION_FAILURE); + } + + return mapfile (fd, lines, origin, nskip, callback_quantum, callback, array_name, delim, flags); +} + +#else + +int +mapfile_builtin (list) + WORD_LIST *list; +{ + builtin_error (_("array variable support required")); + return (EXECUTION_FAILURE); +} + +#endif /* ARRAY_VARS */ diff --git a/bash-5.1/builtins_org/mkbuiltins.c b/bash-5.1/builtins_org/mkbuiltins.c new file mode 100644 index 0000000000000000000000000000000000000000..0a7a0e57fc0f58c6574226c73b4acea76e4bc898 --- /dev/null +++ b/bash-5.1/builtins_org/mkbuiltins.c @@ -0,0 +1,1682 @@ +/* mkbuiltins.c - Create builtins.c, builtext.h, and builtdoc.c from + a single source file called builtins.def. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (CROSS_COMPILING) +# include +#else /* CROSS_COMPILING */ +/* A conservative set of defines based on POSIX/SUS3/XPG6 */ +# define HAVE_UNISTD_H +# define HAVE_STRING_H +# define HAVE_STDLIB_H + +# define HAVE_RENAME +#endif /* CROSS_COMPILING */ + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#ifndef _MINIX +# include "../bashtypes.h" +# if defined (HAVE_SYS_FILE_H) +# include +# endif +#endif + +#include "posixstat.h" +#include "filecntl.h" + +#include "../bashansi.h" +#include +#include + +#include "stdc.h" + +#define DOCFILE "builtins.texi" + +#ifndef errno +extern int errno; +#endif + +static char *xmalloc (), *xrealloc (); + +#if !defined (__STDC__) && !defined (strcpy) +extern char *strcpy (); +#endif /* !__STDC__ && !strcpy */ + +#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) +#define whitespace(c) (((c) == ' ') || ((c) == '\t')) + +/* Flag values that builtins can have. */ +/* These flags are for the C code generator, + the C which is produced (./builtin.c) + includes the flags definitions found + in ../builtins.h */ +#define BUILTIN_FLAG_SPECIAL 0x01 +#define BUILTIN_FLAG_ASSIGNMENT 0x02 +#define BUILTIN_FLAG_LOCALVAR 0x04 +#define BUILTIN_FLAG_POSIX_BUILTIN 0x08 +#define BUILTIN_FLAG_REQUIRES 0x10 + +#define BASE_INDENT 4 + +/* If this stream descriptor is non-zero, then write + texinfo documentation to it. */ +FILE *documentation_file = (FILE *)NULL; + +/* Non-zero means to only produce documentation. */ +int only_documentation = 0; + +/* Non-zero means to not do any productions. */ +int inhibit_production = 0; + +/* Non-zero means to not add functions (xxx_builtin) to the members of the + produced `struct builtin []' */ +int inhibit_functions = 0; + +/* Non-zero means to produce separate help files for each builtin, named by + the builtin name, in `./helpfiles'. */ +int separate_helpfiles = 0; + +/* Non-zero means to create single C strings for each `longdoc', with + embedded newlines, for ease of translation. */ +int single_longdoc_strings = 1; + +/* The name of a directory into which the separate external help files will + eventually be installed. */ +char *helpfile_directory; + +/* The name of a directory to precede the filename when reporting + errors. */ +char *error_directory = (char *)NULL; + +/* The name of the structure file. */ +char *struct_filename = (char *)NULL; + +/* The name of the external declaration file. */ +char *extern_filename = (char *)NULL; + +/* Here is a structure for manipulating arrays of data. */ +typedef struct { + int size; /* Number of slots allocated to array. */ + int sindex; /* Current location in array. */ + int width; /* Size of each element. */ + int growth_rate; /* How fast to grow. */ + char **array; /* The array itself. */ +} ARRAY; + +/* Here is a structure defining a single BUILTIN. */ +typedef struct { + char *name; /* The name of this builtin. */ + char *function; /* The name of the function to call. */ + char *shortdoc; /* The short documentation for this builtin. */ + char *docname; /* Possible name for documentation string. */ + ARRAY *longdoc; /* The long documentation for this builtin. */ + ARRAY *dependencies; /* Null terminated array of #define names. */ + int flags; /* Flags for this builtin. */ +} BUILTIN_DESC; + +/* Here is a structure which defines a DEF file. */ +typedef struct { + char *filename; /* The name of the input def file. */ + ARRAY *lines; /* The contents of the file. */ + int line_number; /* The current line number. */ + char *production; /* The name of the production file. */ + FILE *output; /* Open file stream for PRODUCTION. */ + ARRAY *builtins; /* Null terminated array of BUILTIN_DESC *. */ +} DEF_FILE; + +/* The array of all builtins encountered during execution of this code. */ +ARRAY *saved_builtins = (ARRAY *)NULL; + +/* The Posix.2 so-called `special' builtins. */ +char *special_builtins[] = +{ + ":", ".", "source", "break", "continue", "eval", "exec", "exit", + "export", "readonly", "return", "set", "shift", "times", "trap", "unset", + (char *)NULL +}; + +/* The builtin commands that take assignment statements as arguments. */ +char *assignment_builtins[] = +{ + "alias", "declare", "export", "local", "readonly", "typeset", + (char *)NULL +}; + +char *localvar_builtins[] = +{ + "declare", "local", "typeset", (char *)NULL +}; + +/* The builtin commands that are special to the POSIX search order. */ +char *posix_builtins[] = +{ + "alias", "bg", "cd", "command", "false", "fc", "fg", "getopts", "jobs", + "kill", "newgrp", "pwd", "read", "true", "umask", "unalias", "wait", + (char *)NULL +}; + +/* The builtin commands that cause requirements on other files. */ +static char *requires_builtins[] = +{ + ".", "command", "exec", "source", "inlib", + (char *)NULL +}; + +/* Forward declarations. */ +static int is_special_builtin (); +static int is_assignment_builtin (); +static int is_localvar_builtin (); +static int is_posix_builtin (); +static int is_requires_builtin (); + +#if !defined (HAVE_RENAME) +static int rename (); +#endif + +void extract_info (); + +void file_error (); +void line_error (); + +void write_file_headers (); +void write_file_footers (); +void write_ifdefs (); +void write_endifs (); +void write_documentation (); +void write_longdocs (); +void write_builtins (); + +int write_helpfiles (); + +void free_defs (); +void add_documentation (); + +void must_be_building (); +void remove_trailing_whitespace (); + +#define document_name(b) ((b)->docname ? (b)->docname : (b)->name) + + +/* For each file mentioned on the command line, process it and + write the information to STRUCTFILE and EXTERNFILE, while + creating the production file if necessary. */ +int +main (argc, argv) + int argc; + char **argv; +{ + int arg_index = 1; + FILE *structfile, *externfile; + char *documentation_filename, *temp_struct_filename; + + structfile = externfile = (FILE *)NULL; + documentation_filename = DOCFILE; + temp_struct_filename = (char *)NULL; + + while (arg_index < argc && argv[arg_index][0] == '-') + { + char *arg = argv[arg_index++]; + + if (strcmp (arg, "-externfile") == 0) + extern_filename = argv[arg_index++]; + else if (strcmp (arg, "-structfile") == 0) + struct_filename = argv[arg_index++]; + else if (strcmp (arg, "-noproduction") == 0) + inhibit_production = 1; + else if (strcmp (arg, "-nofunctions") == 0) + inhibit_functions = 1; + else if (strcmp (arg, "-document") == 0) + documentation_file = fopen (documentation_filename, "w"); + else if (strcmp (arg, "-D") == 0) + { + int len; + + if (error_directory) + free (error_directory); + + error_directory = xmalloc (2 + strlen (argv[arg_index])); + strcpy (error_directory, argv[arg_index]); + len = strlen (error_directory); + + if (len && error_directory[len - 1] != '/') + strcat (error_directory, "/"); + + arg_index++; + } + else if (strcmp (arg, "-documentonly") == 0) + { + only_documentation = 1; + documentation_file = fopen (documentation_filename, "w"); + } + else if (strcmp (arg, "-H") == 0) + { + separate_helpfiles = 1; + helpfile_directory = argv[arg_index++]; + } + else if (strcmp (arg, "-S") == 0) + single_longdoc_strings = 0; + else + { + fprintf (stderr, "%s: Unknown flag %s.\n", argv[0], arg); + exit (2); + } + } + + /* If there are no files to process, just quit now. */ + if (arg_index == argc) + exit (0); + + if (!only_documentation) + { + /* Open the files. */ + if (struct_filename) + { + temp_struct_filename = xmalloc (15); + sprintf (temp_struct_filename, "mk-%ld", (long) getpid ()); + structfile = fopen (temp_struct_filename, "w"); + + if (!structfile) + file_error (temp_struct_filename); + } + + if (extern_filename) + { + externfile = fopen (extern_filename, "w"); + + if (!externfile) + file_error (extern_filename); + } + + /* Write out the headers. */ + write_file_headers (structfile, externfile); + } + + if (documentation_file) + { + fprintf (documentation_file, "@c Table of builtins created with %s.\n", + argv[0]); + fprintf (documentation_file, "@ftable @asis\n"); + } + + /* Process the .def files. */ + while (arg_index < argc) + { + register char *arg; + + arg = argv[arg_index++]; + + extract_info (arg, structfile, externfile); + } + + /* Close the files. */ + if (!only_documentation) + { + /* Write the footers. */ + write_file_footers (structfile, externfile); + + if (structfile) + { + write_longdocs (structfile, saved_builtins); + fclose (structfile); + rename (temp_struct_filename, struct_filename); + } + + if (externfile) + fclose (externfile); + } + +#if 0 + /* This is now done by a different program */ + if (separate_helpfiles) + { + write_helpfiles (saved_builtins); + } +#endif + + if (documentation_file) + { + fprintf (documentation_file, "@end ftable\n"); + fclose (documentation_file); + } + + exit (0); +} + +/* **************************************************************** */ +/* */ +/* Array Functions and Manipulators */ +/* */ +/* **************************************************************** */ + +/* Make a new array, and return a pointer to it. The array will + contain elements of size WIDTH, and is initialized to no elements. */ +ARRAY * +array_create (width) + int width; +{ + ARRAY *array; + + array = (ARRAY *)xmalloc (sizeof (ARRAY)); + array->size = 0; + array->sindex = 0; + array->width = width; + + /* Default to increasing size in units of 20. */ + array->growth_rate = 20; + + array->array = (char **)NULL; + + return (array); +} + +/* Copy the array of strings in ARRAY. */ +ARRAY * +copy_string_array (array) + ARRAY *array; +{ + register int i; + ARRAY *copy; + + if (!array) + return (ARRAY *)NULL; + + copy = array_create (sizeof (char *)); + + copy->size = array->size; + copy->sindex = array->sindex; + copy->width = array->width; + + copy->array = (char **)xmalloc ((1 + array->sindex) * sizeof (char *)); + + for (i = 0; i < array->sindex; i++) + copy->array[i] = savestring (array->array[i]); + + copy->array[i] = (char *)NULL; + + return (copy); +} + +/* Add ELEMENT to ARRAY, growing the array if necessary. */ +void +array_add (element, array) + char *element; + ARRAY *array; +{ + if (array->sindex + 2 > array->size) + array->array = (char **)xrealloc + (array->array, (array->size += array->growth_rate) * array->width); + + array->array[array->sindex++] = element; + array->array[array->sindex] = (char *)NULL; +} + +/* Free an allocated array and data pointer. */ +void +array_free (array) + ARRAY *array; +{ + if (array->array) + free (array->array); + + free (array); +} + +/* **************************************************************** */ +/* */ +/* Processing a DEF File */ +/* */ +/* **************************************************************** */ + +/* The definition of a function. */ +typedef int Function (); +typedef int mk_handler_func_t PARAMS((char *, DEF_FILE *, char *)); + +/* Structure handles processor directives. */ +typedef struct { + char *directive; + mk_handler_func_t *function; +} HANDLER_ENTRY; + +extern int builtin_handler PARAMS((char *, DEF_FILE *, char *)); +extern int function_handler PARAMS((char *, DEF_FILE *, char *)); +extern int short_doc_handler PARAMS((char *, DEF_FILE *, char *)); +extern int comment_handler PARAMS((char *, DEF_FILE *, char *)); +extern int depends_on_handler PARAMS((char *, DEF_FILE *, char *)); +extern int produces_handler PARAMS((char *, DEF_FILE *, char *)); +extern int end_handler PARAMS((char *, DEF_FILE *, char *)); +extern int docname_handler PARAMS((char *, DEF_FILE *, char *)); + +HANDLER_ENTRY handlers[] = { + { "BUILTIN", builtin_handler }, + { "DOCNAME", docname_handler }, + { "FUNCTION", function_handler }, + { "SHORT_DOC", short_doc_handler }, + { "$", comment_handler }, + { "COMMENT", comment_handler }, + { "DEPENDS_ON", depends_on_handler }, + { "PRODUCES", produces_handler }, + { "END", end_handler }, + { (char *)NULL, (mk_handler_func_t *)NULL } +}; + +/* Return the entry in the table of handlers for NAME. */ +HANDLER_ENTRY * +find_directive (directive) + char *directive; +{ + register int i; + + for (i = 0; handlers[i].directive; i++) + if (strcmp (handlers[i].directive, directive) == 0) + return (&handlers[i]); + + return ((HANDLER_ENTRY *)NULL); +} + +/* Non-zero indicates that a $BUILTIN has been seen, but not + the corresponding $END. */ +static int building_builtin = 0; + +/* Non-zero means to output cpp line and file information before + printing the current line to the production file. */ +int output_cpp_line_info = 0; + +/* The main function of this program. Read FILENAME and act on what is + found. Lines not starting with a dollar sign are copied to the + $PRODUCES target, if one is present. Lines starting with a dollar sign + are directives to this program, specifying the name of the builtin, the + function to call, the short documentation and the long documentation + strings. FILENAME can contain multiple $BUILTINs, but only one $PRODUCES + target. After the file has been processed, write out the names of + builtins found in each $BUILTIN. Plain text found before the $PRODUCES + is ignored, as is "$$ comment text". */ +void +extract_info (filename, structfile, externfile) + char *filename; + FILE *structfile, *externfile; +{ + register int i; + DEF_FILE *defs; + struct stat finfo; + size_t file_size; + char *buffer, *line; + int fd, nr; + + if (stat (filename, &finfo) == -1) + file_error (filename); + + fd = open (filename, O_RDONLY, 0666); + + if (fd == -1) + file_error (filename); + + file_size = (size_t)finfo.st_size; + buffer = xmalloc (1 + file_size); + + if ((nr = read (fd, buffer, file_size)) < 0) + file_error (filename); + + /* This is needed on WIN32, and does not hurt on Unix. */ + if (nr < file_size) + file_size = nr; + + close (fd); + + if (nr == 0) + { + fprintf (stderr, "mkbuiltins: %s: skipping zero-length file\n", filename); + free (buffer); + return; + } + + /* Create and fill in the initial structure describing this file. */ + defs = (DEF_FILE *)xmalloc (sizeof (DEF_FILE)); + defs->filename = filename; + defs->lines = array_create (sizeof (char *)); + defs->line_number = 0; + defs->production = (char *)NULL; + defs->output = (FILE *)NULL; + defs->builtins = (ARRAY *)NULL; + + /* Build the array of lines. */ + i = 0; + while (i < file_size) + { + array_add (&buffer[i], defs->lines); + + while (i < file_size && buffer[i] != '\n') + i++; + buffer[i++] = '\0'; + } + + /* Begin processing the input file. We don't write any output + until we have a file to write output to. */ + output_cpp_line_info = 1; + + /* Process each line in the array. */ + for (i = 0; line = defs->lines->array[i]; i++) + { + defs->line_number = i; + + if (*line == '$') + { + register int j; + char *directive; + HANDLER_ENTRY *handler; + + /* Isolate the directive. */ + for (j = 0; line[j] && !whitespace (line[j]); j++); + + directive = xmalloc (j); + strncpy (directive, line + 1, j - 1); + directive[j -1] = '\0'; + + /* Get the function handler and call it. */ + handler = find_directive (directive); + + if (!handler) + { + line_error (defs, "Unknown directive `%s'", directive); + free (directive); + continue; + } + else + { + /* Advance to the first non-whitespace character. */ + while (whitespace (line[j])) + j++; + + /* Call the directive handler with the FILE, and ARGS. */ + (*(handler->function)) (directive, defs, line + j); + } + free (directive); + } + else + { + if (building_builtin) + add_documentation (defs, line); + else if (defs->output) + { + if (output_cpp_line_info) + { + /* If we're handed an absolute pathname, don't prepend + the directory name. */ + if (defs->filename[0] == '/') + fprintf (defs->output, "#line %d \"%s\"\n", + defs->line_number + 1, defs->filename); + else + fprintf (defs->output, "#line %d \"%s%s\"\n", + defs->line_number + 1, + error_directory ? error_directory : "./", + defs->filename); + output_cpp_line_info = 0; + } + + fprintf (defs->output, "%s\n", line); + } + } + } + + /* Close the production file. */ + if (defs->output) + fclose (defs->output); + + /* The file has been processed. Write the accumulated builtins to + the builtins.c file, and write the extern definitions to the + builtext.h file. */ + write_builtins (defs, structfile, externfile); + + free (buffer); + free_defs (defs); +} + +#define free_safely(x) if (x) free (x) + +static void +free_builtin (builtin) + BUILTIN_DESC *builtin; +{ + register int i; + + free_safely (builtin->name); + free_safely (builtin->function); + free_safely (builtin->shortdoc); + free_safely (builtin->docname); + + if (builtin->longdoc) + array_free (builtin->longdoc); + + if (builtin->dependencies) + { + for (i = 0; builtin->dependencies->array[i]; i++) + free (builtin->dependencies->array[i]); + array_free (builtin->dependencies); + } +} + +/* Free all of the memory allocated to a DEF_FILE. */ +void +free_defs (defs) + DEF_FILE *defs; +{ + register int i; + register BUILTIN_DESC *builtin; + + if (defs->production) + free (defs->production); + + if (defs->lines) + array_free (defs->lines); + + if (defs->builtins) + { + for (i = 0; builtin = (BUILTIN_DESC *)defs->builtins->array[i]; i++) + { + free_builtin (builtin); + free (builtin); + } + array_free (defs->builtins); + } + free (defs); +} + +/* **************************************************************** */ +/* */ +/* The Handler Functions Themselves */ +/* */ +/* **************************************************************** */ + +/* Strip surrounding whitespace from STRING, and + return a pointer to the start of it. */ +char * +strip_whitespace (string) + char *string; +{ + while (whitespace (*string)) + string++; + + remove_trailing_whitespace (string); + return (string); +} + +/* Remove only the trailing whitespace from STRING. */ +void +remove_trailing_whitespace (string) + char *string; +{ + register int i; + + i = strlen (string) - 1; + + while (i > 0 && whitespace (string[i])) + i--; + + string[++i] = '\0'; +} + +/* Ensure that there is a argument in STRING and return it. + FOR_WHOM is the name of the directive which needs the argument. + DEFS is the DEF_FILE in which the directive is found. + If there is no argument, produce an error. */ +char * +get_arg (for_whom, defs, string) + char *for_whom, *string; + DEF_FILE *defs; +{ + char *new; + + new = strip_whitespace (string); + + if (!*new) + line_error (defs, "%s requires an argument", for_whom); + + return (savestring (new)); +} + +/* Error if not building a builtin. */ +void +must_be_building (directive, defs) + char *directive; + DEF_FILE *defs; +{ + if (!building_builtin) + line_error (defs, "%s must be inside of a $BUILTIN block", directive); +} + +/* Return the current builtin. */ +BUILTIN_DESC * +current_builtin (directive, defs) + char *directive; + DEF_FILE *defs; +{ + must_be_building (directive, defs); + if (defs->builtins) + return ((BUILTIN_DESC *)defs->builtins->array[defs->builtins->sindex - 1]); + else + return ((BUILTIN_DESC *)NULL); +} + +/* Add LINE to the long documentation for the current builtin. + Ignore blank lines until the first non-blank line has been seen. */ +void +add_documentation (defs, line) + DEF_FILE *defs; + char *line; +{ + register BUILTIN_DESC *builtin; + + builtin = current_builtin ("(implied LONGDOC)", defs); + + remove_trailing_whitespace (line); + + if (!*line && !builtin->longdoc) + return; + + if (!builtin->longdoc) + builtin->longdoc = array_create (sizeof (char *)); + + array_add (line, builtin->longdoc); +} + +/* How to handle the $BUILTIN directive. */ +int +builtin_handler (self, defs, arg) + char *self; + DEF_FILE *defs; + char *arg; +{ + BUILTIN_DESC *new; + char *name; + + /* If we are already building a builtin, we cannot start a new one. */ + if (building_builtin) + { + line_error (defs, "%s found before $END", self); + return (-1); + } + + output_cpp_line_info++; + + /* Get the name of this builtin, and stick it in the array. */ + name = get_arg (self, defs, arg); + + /* If this is the first builtin, create the array to hold them. */ + if (!defs->builtins) + defs->builtins = array_create (sizeof (BUILTIN_DESC *)); + + new = (BUILTIN_DESC *)xmalloc (sizeof (BUILTIN_DESC)); + new->name = name; + new->function = (char *)NULL; + new->shortdoc = (char *)NULL; + new->docname = (char *)NULL; + new->longdoc = (ARRAY *)NULL; + new->dependencies = (ARRAY *)NULL; + new->flags = 0; + + if (is_special_builtin (name)) + new->flags |= BUILTIN_FLAG_SPECIAL; + if (is_assignment_builtin (name)) + new->flags |= BUILTIN_FLAG_ASSIGNMENT; + if (is_localvar_builtin (name)) + new->flags |= BUILTIN_FLAG_LOCALVAR; + if (is_posix_builtin (name)) + new->flags |= BUILTIN_FLAG_POSIX_BUILTIN; + if (is_requires_builtin (name)) + new->flags |= BUILTIN_FLAG_REQUIRES; + + array_add ((char *)new, defs->builtins); + building_builtin = 1; + + return (0); +} + +/* How to handle the $FUNCTION directive. */ +int +function_handler (self, defs, arg) + char *self; + DEF_FILE *defs; + char *arg; +{ + register BUILTIN_DESC *builtin; + + builtin = current_builtin (self, defs); + + if (builtin == 0) + { + line_error (defs, "syntax error: no current builtin for $FUNCTION directive"); + exit (1); + } + if (builtin->function) + line_error (defs, "%s already has a function (%s)", + builtin->name, builtin->function); + else + builtin->function = get_arg (self, defs, arg); + + return (0); +} + +/* How to handle the $DOCNAME directive. */ +int +docname_handler (self, defs, arg) + char *self; + DEF_FILE *defs; + char *arg; +{ + register BUILTIN_DESC *builtin; + + builtin = current_builtin (self, defs); + + if (builtin->docname) + line_error (defs, "%s already had a docname (%s)", + builtin->name, builtin->docname); + else + builtin->docname = get_arg (self, defs, arg); + + return (0); +} + +/* How to handle the $SHORT_DOC directive. */ +int +short_doc_handler (self, defs, arg) + char *self; + DEF_FILE *defs; + char *arg; +{ + register BUILTIN_DESC *builtin; + + builtin = current_builtin (self, defs); + + if (builtin->shortdoc) + line_error (defs, "%s already has short documentation (%s)", + builtin->name, builtin->shortdoc); + else + builtin->shortdoc = get_arg (self, defs, arg); + + return (0); +} + +/* How to handle the $COMMENT directive. */ +int +comment_handler (self, defs, arg) + char *self; + DEF_FILE *defs; + char *arg; +{ + return (0); +} + +/* How to handle the $DEPENDS_ON directive. */ +int +depends_on_handler (self, defs, arg) + char *self; + DEF_FILE *defs; + char *arg; +{ + register BUILTIN_DESC *builtin; + char *dependent; + + builtin = current_builtin (self, defs); + dependent = get_arg (self, defs, arg); + + if (!builtin->dependencies) + builtin->dependencies = array_create (sizeof (char *)); + + array_add (dependent, builtin->dependencies); + + return (0); +} + +/* How to handle the $PRODUCES directive. */ +int +produces_handler (self, defs, arg) + char *self; + DEF_FILE *defs; + char *arg; +{ + /* If just hacking documentation, don't change any of the production + files. */ + if (only_documentation) + return (0); + + output_cpp_line_info++; + + if (defs->production) + line_error (defs, "%s already has a %s definition", defs->filename, self); + else + { + defs->production = get_arg (self, defs, arg); + + if (inhibit_production) + return (0); + + defs->output = fopen (defs->production, "w"); + + if (!defs->output) + file_error (defs->production); + + fprintf (defs->output, "/* %s, created from %s. */\n", + defs->production, defs->filename); + } + return (0); +} + +/* How to handle the $END directive. */ +int +end_handler (self, defs, arg) + char *self; + DEF_FILE *defs; + char *arg; +{ + must_be_building (self, defs); + building_builtin = 0; + return (0); +} + +/* **************************************************************** */ +/* */ +/* Error Handling Functions */ +/* */ +/* **************************************************************** */ + +/* Produce an error for DEFS with FORMAT and ARGS. */ +void +line_error (defs, format, arg1, arg2) + DEF_FILE *defs; + char *format, *arg1, *arg2; +{ + if (defs->filename[0] != '/') + fprintf (stderr, "%s", error_directory ? error_directory : "./"); + fprintf (stderr, "%s:%d:", defs->filename, defs->line_number + 1); + fprintf (stderr, format, arg1, arg2); + fprintf (stderr, "\n"); + fflush (stderr); +} + +/* Print error message for FILENAME. */ +void +file_error (filename) + char *filename; +{ + perror (filename); + exit (2); +} + +/* **************************************************************** */ +/* */ +/* xmalloc and xrealloc () */ +/* */ +/* **************************************************************** */ + +static void memory_error_and_abort (); + +static char * +xmalloc (bytes) + int bytes; +{ + char *temp = (char *)malloc (bytes); + + if (!temp) + memory_error_and_abort (); + return (temp); +} + +static char * +xrealloc (pointer, bytes) + char *pointer; + int bytes; +{ + char *temp; + + if (!pointer) + temp = (char *)malloc (bytes); + else + temp = (char *)realloc (pointer, bytes); + + if (!temp) + memory_error_and_abort (); + + return (temp); +} + +static void +memory_error_and_abort () +{ + fprintf (stderr, "mkbuiltins: out of virtual memory\n"); + abort (); +} + +/* **************************************************************** */ +/* */ +/* Creating the Struct and Extern Files */ +/* */ +/* **************************************************************** */ + +/* Return a pointer to a newly allocated builtin which is + an exact copy of BUILTIN. */ +BUILTIN_DESC * +copy_builtin (builtin) + BUILTIN_DESC *builtin; +{ + BUILTIN_DESC *new; + + new = (BUILTIN_DESC *)xmalloc (sizeof (BUILTIN_DESC)); + + new->name = savestring (builtin->name); + new->shortdoc = savestring (builtin->shortdoc); + new->longdoc = copy_string_array (builtin->longdoc); + new->dependencies = copy_string_array (builtin->dependencies); + + new->function = + builtin->function ? savestring (builtin->function) : (char *)NULL; + new->docname = + builtin->docname ? savestring (builtin->docname) : (char *)NULL; + + return (new); +} + +/* How to save away a builtin. */ +void +save_builtin (builtin) + BUILTIN_DESC *builtin; +{ + BUILTIN_DESC *newbuiltin; + + newbuiltin = copy_builtin (builtin); + + /* If this is the first builtin to be saved, create the array + to hold it. */ + if (!saved_builtins) + saved_builtins = array_create (sizeof (BUILTIN_DESC *)); + + array_add ((char *)newbuiltin, saved_builtins); +} + +/* Flags that mean something to write_documentation (). */ +#define STRING_ARRAY 0x01 +#define TEXINFO 0x02 +#define PLAINTEXT 0x04 +#define HELPFILE 0x08 + +char *structfile_header[] = { + "/* builtins.c -- the built in shell commands. */", + "", + "/* This file is manufactured by ./mkbuiltins, and should not be", + " edited by hand. See the source to mkbuiltins for details. */", + "", + "/* Copyright (C) 1987-2015 Free Software Foundation, Inc.", + "", + " This file is part of GNU Bash, the Bourne Again SHell.", + "", + " Bash 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.", + "", + " Bash 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 Bash. If not, see .", + "*/", + "", + "/* The list of shell builtins. Each element is name, function, flags,", + " long-doc, short-doc. The long-doc field contains a pointer to an array", + " of help lines. The function takes a WORD_LIST *; the first word in the", + " list is the first arg to the command. The list has already had word", + " expansion performed.", + "", + " Functions which need to look at only the simple commands (e.g.", + " the enable_builtin ()), should ignore entries where", + " (array[i].function == (sh_builtin_func_t *)NULL). Such entries are for", + " the list of shell reserved control structures, like `if' and `while'.", + " The end of the list is denoted with a NULL name field. */", + "", + "/* TRANSLATORS: Please do not translate command names in descriptions */", + "", + "#include \"../builtins.h\"", + (char *)NULL + }; + +char *structfile_footer[] = { + " { (char *)0x0, (sh_builtin_func_t *)0x0, 0, (char **)0x0, (char *)0x0, (char *)0x0 }", + "};", + "", + "struct builtin *shell_builtins = static_shell_builtins;", + "struct builtin *current_builtin;", + "", + "int num_shell_builtins =", + "\tsizeof (static_shell_builtins) / sizeof (struct builtin) - 1;", + (char *)NULL +}; + +/* Write out any necessary opening information for + STRUCTFILE and EXTERNFILE. */ +void +write_file_headers (structfile, externfile) + FILE *structfile, *externfile; +{ + register int i; + + if (structfile) + { + for (i = 0; structfile_header[i]; i++) + fprintf (structfile, "%s\n", structfile_header[i]); + + fprintf (structfile, "#include \"%s\"\n", + extern_filename ? extern_filename : "builtext.h"); + + fprintf (structfile, "#include \"bashintl.h\"\n"); + + fprintf (structfile, "\nstruct builtin static_shell_builtins[] = {\n"); + } + + if (externfile) + fprintf (externfile, + "/* %s - The list of builtins found in libbuiltins.a. */\n", + extern_filename ? extern_filename : "builtext.h"); +} + +/* Write out any necessary closing information for + STRUCTFILE and EXTERNFILE. */ +void +write_file_footers (structfile, externfile) + FILE *structfile, *externfile; +{ + register int i; + + /* Write out the footers. */ + if (structfile) + { + for (i = 0; structfile_footer[i]; i++) + fprintf (structfile, "%s\n", structfile_footer[i]); + } +} + +/* Write out the information accumulated in DEFS to + STRUCTFILE and EXTERNFILE. */ +void +write_builtins (defs, structfile, externfile) + DEF_FILE *defs; + FILE *structfile, *externfile; +{ + register int i; + + /* Write out the information. */ + if (defs->builtins) + { + register BUILTIN_DESC *builtin; + + for (i = 0; i < defs->builtins->sindex; i++) + { + builtin = (BUILTIN_DESC *)defs->builtins->array[i]; + + /* Write out any #ifdefs that may be there. */ + if (!only_documentation) + { + if (builtin->dependencies) + { + write_ifdefs (externfile, builtin->dependencies->array); + write_ifdefs (structfile, builtin->dependencies->array); + } + + /* Write the extern definition. */ + if (externfile) + { + if (builtin->function) + fprintf (externfile, "extern int %s PARAMS((WORD_LIST *));\n", + builtin->function); + + fprintf (externfile, "extern char * const %s_doc[];\n", + document_name (builtin)); + } + + /* Write the structure definition. */ + if (structfile) + { + fprintf (structfile, " { \"%s\", ", builtin->name); + + if (builtin->function && inhibit_functions == 0) + fprintf (structfile, "%s, ", builtin->function); + else + fprintf (structfile, "(sh_builtin_func_t *)0x0, "); + + fprintf (structfile, "%s%s%s%s%s%s, %s_doc,\n", + "BUILTIN_ENABLED | STATIC_BUILTIN", + (builtin->flags & BUILTIN_FLAG_SPECIAL) ? " | SPECIAL_BUILTIN" : "", + (builtin->flags & BUILTIN_FLAG_ASSIGNMENT) ? " | ASSIGNMENT_BUILTIN" : "", + (builtin->flags & BUILTIN_FLAG_LOCALVAR) ? " | LOCALVAR_BUILTIN" : "", + (builtin->flags & BUILTIN_FLAG_POSIX_BUILTIN) ? " | POSIX_BUILTIN" : "", + (builtin->flags & BUILTIN_FLAG_REQUIRES) ? " | REQUIRES_BUILTIN" : "", + document_name (builtin)); + + /* Don't translate short document summaries that are identical + to command names */ + if (builtin->shortdoc && strcmp (builtin->name, builtin->shortdoc) == 0) + { + if (inhibit_functions) + fprintf (structfile, " \"%s\", \"%s\" },\n", + builtin->shortdoc ? builtin->shortdoc : builtin->name, + document_name (builtin)); + else + fprintf (structfile, " \"%s\", (char *)NULL },\n", + builtin->shortdoc ? builtin->shortdoc : builtin->name); + } + else + { + if (inhibit_functions) + fprintf (structfile, " N_(\"%s\"), \"%s\" },\n", + builtin->shortdoc ? builtin->shortdoc : builtin->name, + document_name (builtin)); + else + fprintf (structfile, " N_(\"%s\"), (char *)NULL },\n", + builtin->shortdoc ? builtin->shortdoc : builtin->name); + } + } + + if (structfile || separate_helpfiles) + /* Save away this builtin for later writing of the + long documentation strings. */ + save_builtin (builtin); + + /* Write out the matching #endif, if necessary. */ + if (builtin->dependencies) + { + if (externfile) + write_endifs (externfile, builtin->dependencies->array); + + if (structfile) + write_endifs (structfile, builtin->dependencies->array); + } + } + + if (documentation_file) + { + fprintf (documentation_file, "@item %s\n", builtin->name); + write_documentation + (documentation_file, builtin->longdoc->array, 0, TEXINFO); + } + } + } +} + +/* Write out the long documentation strings in BUILTINS to STREAM. */ +void +write_longdocs (stream, builtins) + FILE *stream; + ARRAY *builtins; +{ + register int i; + register BUILTIN_DESC *builtin; + char *dname; + char *sarray[2]; + + for (i = 0; i < builtins->sindex; i++) + { + builtin = (BUILTIN_DESC *)builtins->array[i]; + + if (builtin->dependencies) + write_ifdefs (stream, builtin->dependencies->array); + + /* Write the long documentation strings. */ + dname = document_name (builtin); + fprintf (stream, "char * const %s_doc[] =", dname); + + if (separate_helpfiles) + { + int l = strlen (helpfile_directory) + strlen (dname) + 1; + sarray[0] = (char *)xmalloc (l + 1); + sprintf (sarray[0], "%s/%s", helpfile_directory, dname); + sarray[1] = (char *)NULL; + write_documentation (stream, sarray, 0, STRING_ARRAY|HELPFILE); + free (sarray[0]); + } + else + write_documentation (stream, builtin->longdoc->array, 0, STRING_ARRAY); + + if (builtin->dependencies) + write_endifs (stream, builtin->dependencies->array); + + } +} + +void +write_dummy_declarations (stream, builtins) + FILE *stream; + ARRAY *builtins; +{ + register int i; + BUILTIN_DESC *builtin; + + for (i = 0; structfile_header[i]; i++) + fprintf (stream, "%s\n", structfile_header[i]); + + for (i = 0; i < builtins->sindex; i++) + { + builtin = (BUILTIN_DESC *)builtins->array[i]; + + /* How to guarantee that no builtin is written more than once? */ + fprintf (stream, "int %s () { return (0); }\n", builtin->function); + } +} + +/* Write an #ifdef string saying what needs to be defined (or not defined) + in order to allow compilation of the code that will follow. + STREAM is the stream to write the information to, + DEFINES is a null terminated array of define names. + If a define is preceded by an `!', then the sense of the test is + reversed. */ +void +write_ifdefs (stream, defines) + FILE *stream; + char **defines; +{ + register int i; + + if (!stream) + return; + + fprintf (stream, "#if "); + + for (i = 0; defines[i]; i++) + { + char *def = defines[i]; + + if (*def == '!') + fprintf (stream, "!defined (%s)", def + 1); + else + fprintf (stream, "defined (%s)", def); + + if (defines[i + 1]) + fprintf (stream, " && "); + } + fprintf (stream, "\n"); +} + +/* Write an #endif string saying what defines controlled the compilation + of the immediately preceding code. + STREAM is the stream to write the information to. + DEFINES is a null terminated array of define names. */ +void +write_endifs (stream, defines) + FILE *stream; + char **defines; +{ + register int i; + + if (!stream) + return; + + fprintf (stream, "#endif /* "); + + for (i = 0; defines[i]; i++) + { + fprintf (stream, "%s", defines[i]); + + if (defines[i + 1]) + fprintf (stream, " && "); + } + + fprintf (stream, " */\n"); +} + +/* Write DOCUMENTATION to STREAM, perhaps surrounding it with double-quotes + and quoting special characters in the string. Handle special things for + internationalization (gettext) and the single-string vs. multiple-strings + issues. */ +void +write_documentation (stream, documentation, indentation, flags) + FILE *stream; + char **documentation; + int indentation, flags; +{ + register int i, j; + register char *line; + int string_array, texinfo, base_indent, filename_p; + + if (stream == 0) + return; + + string_array = flags & STRING_ARRAY; + filename_p = flags & HELPFILE; + + if (string_array) + { + fprintf (stream, " {\n#if defined (HELP_BUILTIN)\n"); /* } */ + if (single_longdoc_strings) + { + if (filename_p == 0) + { + if (documentation && documentation[0] && documentation[0][0]) + fprintf (stream, "N_(\""); + else + fprintf (stream, "N_(\" "); /* the empty string translates specially. */ + } + else + fprintf (stream, "\""); + } + } + + base_indent = (string_array && single_longdoc_strings && filename_p == 0) ? BASE_INDENT : 0; + + for (i = 0, texinfo = (flags & TEXINFO); documentation && (line = documentation[i]); i++) + { + /* Allow #ifdef's to be written out verbatim, but don't put them into + separate help files. */ + if (*line == '#') + { + if (string_array && filename_p == 0 && single_longdoc_strings == 0) + fprintf (stream, "%s\n", line); + continue; + } + + /* prefix with N_( for gettext */ + if (string_array && single_longdoc_strings == 0) + { + if (filename_p == 0) + { + if (line[0]) + fprintf (stream, " N_(\""); + else + fprintf (stream, " N_(\" "); /* the empty string translates specially. */ + } + else + fprintf (stream, " \""); + } + + if (indentation) + for (j = 0; j < indentation; j++) + fprintf (stream, " "); + + /* Don't indent the first line, because of how the help builtin works. */ + if (i == 0) + indentation += base_indent; + + if (string_array) + { + for (j = 0; line[j]; j++) + { + switch (line[j]) + { + case '\\': + case '"': + fprintf (stream, "\\%c", line[j]); + break; + + default: + fprintf (stream, "%c", line[j]); + } + } + + /* closing right paren for gettext */ + if (single_longdoc_strings == 0) + { + if (filename_p == 0) + fprintf (stream, "\"),\n"); + else + fprintf (stream, "\",\n"); + } + else if (documentation[i+1]) + /* don't add extra newline after last line */ + fprintf (stream, "\\n\\\n"); + } + else if (texinfo) + { + for (j = 0; line[j]; j++) + { + switch (line[j]) + { + case '@': + case '{': + case '}': + fprintf (stream, "@%c", line[j]); + break; + + default: + fprintf (stream, "%c", line[j]); + } + } + fprintf (stream, "\n"); + } + else + fprintf (stream, "%s\n", line); + } + + /* closing right paren for gettext */ + if (string_array && single_longdoc_strings) + { + if (filename_p == 0) + fprintf (stream, "\"),\n"); + else + fprintf (stream, "\",\n"); + } + + if (string_array) + fprintf (stream, "#endif /* HELP_BUILTIN */\n (char *)NULL\n};\n"); +} + +int +write_helpfiles (builtins) + ARRAY *builtins; +{ + char *helpfile, *bname; + FILE *helpfp; + int i, hdlen; + BUILTIN_DESC *builtin; + + i = mkdir ("helpfiles", 0777); + if (i < 0 && errno != EEXIST) + { + fprintf (stderr, "write_helpfiles: helpfiles: cannot create directory\n"); + return -1; + } + + hdlen = strlen ("helpfiles/"); + for (i = 0; i < builtins->sindex; i++) + { + builtin = (BUILTIN_DESC *)builtins->array[i]; + + bname = document_name (builtin); + helpfile = (char *)xmalloc (hdlen + strlen (bname) + 1); + sprintf (helpfile, "helpfiles/%s", bname); + + helpfp = fopen (helpfile, "w"); + if (helpfp == 0) + { + fprintf (stderr, "write_helpfiles: cannot open %s\n", helpfile); + free (helpfile); + continue; + } + + write_documentation (helpfp, builtin->longdoc->array, 4, PLAINTEXT); + + fflush (helpfp); + fclose (helpfp); + free (helpfile); + } + return 0; +} + +static int +_find_in_table (name, name_table) + char *name, *name_table[]; +{ + register int i; + + for (i = 0; name_table[i]; i++) + if (strcmp (name, name_table[i]) == 0) + return 1; + return 0; +} + +static int +is_special_builtin (name) + char *name; +{ + return (_find_in_table (name, special_builtins)); +} + +static int +is_assignment_builtin (name) + char *name; +{ + return (_find_in_table (name, assignment_builtins)); +} + +static int +is_localvar_builtin (name) + char *name; +{ + return (_find_in_table (name, localvar_builtins)); +} + +static int +is_posix_builtin (name) + char *name; +{ + return (_find_in_table (name, posix_builtins)); +} + +static int +is_requires_builtin (name) + char *name; +{ + return (_find_in_table (name, requires_builtins)); +} + +#if !defined (HAVE_RENAME) +static int +rename (from, to) + char *from, *to; +{ + unlink (to); + if (link (from, to) < 0) + return (-1); + unlink (from); + return (0); +} +#endif /* !HAVE_RENAME */ diff --git a/bash-5.1/builtins_org/printf.def b/bash-5.1/builtins_org/printf.def new file mode 100644 index 0000000000000000000000000000000000000000..0a5f4897f34ca1819b64413fe937bbdb120ec802 --- /dev/null +++ b/bash-5.1/builtins_org/printf.def @@ -0,0 +1,1272 @@ +This file is printf.def, from which is created printf.c. +It implements the builtin "printf" in Bash. + +Copyright (C) 1997-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES printf.c + +$BUILTIN printf +$FUNCTION printf_builtin +$SHORT_DOC printf [-v var] format [arguments] +Formats and prints ARGUMENTS under control of the FORMAT. + +Options: + -v var assign the output to shell variable VAR rather than + display it on the standard output + +FORMAT is a character string which contains three types of objects: plain +characters, which are simply copied to standard output; character escape +sequences, which are converted and copied to the standard output; and +format specifications, each of which causes printing of the next successive +argument. + +In addition to the standard format specifications described in printf(1), +printf interprets: + + %b expand backslash escape sequences in the corresponding argument + %q quote the argument in a way that can be reused as shell input + %(fmt)T output the date-time string resulting from using FMT as a format + string for strftime(3) + +The format is re-used as necessary to consume all of the arguments. If +there are fewer arguments than the format requires, extra format +specifications behave as if a zero value or null string, as appropriate, +had been supplied. + +Exit Status: +Returns success unless an invalid option is given or a write or assignment +error occurs. +$END + +#include + +#include "../bashtypes.h" + +#include +#if defined (HAVE_LIMITS_H) +# include +#else + /* Assume 32-bit ints. */ +# define INT_MAX 2147483647 +# define INT_MIN (-2147483647-1) +#endif + +#if defined (PREFER_STDARG) +# include +#else +# include +#endif + +#include +#include + +#ifdef HAVE_INTTYPES_H +# include +#endif + +#include "posixtime.h" +#include "../bashansi.h" +#include "../bashintl.h" + +#define NEED_STRFTIME_DECL + +#include "../shell.h" +#include "shmbutil.h" +#include "stdc.h" +#include "bashgetopt.h" +#include "common.h" + +#if defined (PRI_MACROS_BROKEN) +# undef PRIdMAX +#endif + +#if !defined (PRIdMAX) +# if HAVE_LONG_LONG +# define PRIdMAX "lld" +# else +# define PRIdMAX "ld" +# endif +#endif + +#if !defined (errno) +extern int errno; +#endif + +#define PC(c) \ + do { \ + char b[2]; \ + tw++; \ + b[0] = c; b[1] = '\0'; \ + if (vflag) \ + vbadd (b, 1); \ + else \ + putchar (c); \ + QUIT; \ + } while (0) + +#define PF(f, func) \ + do { \ + int nw; \ + clearerr (stdout); \ + if (have_fieldwidth && have_precision) \ + nw = vflag ? vbprintf (f, fieldwidth, precision, func) : printf (f, fieldwidth, precision, func); \ + else if (have_fieldwidth) \ + nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \ + else if (have_precision) \ + nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \ + else \ + nw = vflag ? vbprintf (f, func) : printf (f, func); \ + tw += nw; \ + QUIT; \ + if (ferror (stdout)) \ + { \ + sh_wrerror (); \ + clearerr (stdout); \ + return (EXECUTION_FAILURE); \ + } \ + } while (0) + +/* We free the buffer used by mklong() if it's `too big'. */ +#define PRETURN(value) \ + do \ + { \ + QUIT; \ + if (vflag) \ + { \ + SHELL_VAR *v; \ + v = builtin_bind_variable (vname, vbuf, 0); \ + stupidly_hack_special_variables (vname); \ + if (v == 0 || readonly_p (v) || noassign_p (v)) \ + return (EXECUTION_FAILURE); \ + } \ + if (conv_bufsize > 4096 ) \ + { \ + free (conv_buf); \ + conv_bufsize = 0; \ + conv_buf = 0; \ + } \ + if (vbsize > 4096) \ + { \ + free (vbuf); \ + vbsize = 0; \ + vbuf = 0; \ + } \ + else if (vbuf) \ + vbuf[0] = 0; \ + if (ferror (stdout) == 0) \ + fflush (stdout); \ + QUIT; \ + if (ferror (stdout)) \ + { \ + sh_wrerror (); \ + clearerr (stdout); \ + return (EXECUTION_FAILURE); \ + } \ + return (value); \ + } \ + while (0) + +#define SKIP1 "#'-+ 0" +#define LENMODS "hjlLtz" + +extern time_t shell_start_time; + +#if !HAVE_ASPRINTF +extern int asprintf PARAMS((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); +#endif + +#if !HAVE_VSNPRINTF +extern int vsnprintf PARAMS((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0))); +#endif + +static void printf_erange PARAMS((char *)); +static int printstr PARAMS((char *, char *, int, int, int)); +static int tescape PARAMS((char *, char *, int *, int *)); +static char *bexpand PARAMS((char *, int, int *, int *)); +static char *vbadd PARAMS((char *, int)); +static int vbprintf PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +static char *mklong PARAMS((char *, char *, size_t)); +static int getchr PARAMS((void)); +static char *getstr PARAMS((void)); +static int getint PARAMS((void)); +static intmax_t getintmax PARAMS((void)); +static uintmax_t getuintmax PARAMS((void)); + +#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN) +typedef long double floatmax_t; +# define FLOATMAX_CONV "L" +# define strtofltmax strtold +#else +typedef double floatmax_t; +# define FLOATMAX_CONV "" +# define strtofltmax strtod +#endif +static floatmax_t getfloatmax PARAMS((void)); + +static intmax_t asciicode PARAMS((void)); + +static WORD_LIST *garglist, *orig_arglist; +static int retval; +static int conversion_error; + +/* printf -v var support */ +static int vflag = 0; +static char *vbuf, *vname; +static size_t vbsize; +static int vblen; + +static intmax_t tw; + +static char *conv_buf; +static size_t conv_bufsize; + +int +printf_builtin (list) + WORD_LIST *list; +{ + int ch, fieldwidth, precision; + int have_fieldwidth, have_precision; + char convch, thisch, nextch, *format, *modstart, *fmt, *start; +#if defined (HANDLE_MULTIBYTE) + char mbch[25]; /* 25 > MB_LEN_MAX, plus can handle 4-byte UTF-8 and large Unicode characters*/ + int mbind, mblen; +#endif +#if defined (ARRAY_VARS) + int arrayflags; +#endif + + conversion_error = 0; + retval = EXECUTION_SUCCESS; + + vflag = 0; + + reset_internal_getopt (); + while ((ch = internal_getopt (list, "v:")) != -1) + { + switch (ch) + { + case 'v': + vname = list_optarg; +#if defined (ARRAY_VARS) + arrayflags = assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0; + if (legal_identifier (vname) || valid_array_reference (vname, arrayflags)) +#else + if (legal_identifier (vname)) +#endif + { + vflag = 1; + if (vbsize == 0) + vbuf = xmalloc (vbsize = 16); + vblen = 0; + if (vbuf) + vbuf[0] = 0; + } + else + { + sh_invalidid (vname); + return (EX_USAGE); + } + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; /* skip over possible `--' */ + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + /* Allow printf -v var "" to act like var="" */ + if (vflag && list->word->word && list->word->word[0] == '\0') + { + SHELL_VAR *v; + v = builtin_bind_variable (vname, "", 0); + stupidly_hack_special_variables (vname); + return ((v == 0 || readonly_p (v) || noassign_p (v)) ? EXECUTION_FAILURE : EXECUTION_SUCCESS); + } + + if (list->word->word == 0 || list->word->word[0] == '\0') + return (EXECUTION_SUCCESS); + + format = list->word->word; + tw = 0; + + garglist = orig_arglist = list->next; + + /* If the format string is empty after preprocessing, return immediately. */ + if (format == 0 || *format == 0) + return (EXECUTION_SUCCESS); + + /* Basic algorithm is to scan the format string for conversion + specifications -- once one is found, find out if the field + width or precision is a '*'; if it is, gather up value. Note, + format strings are reused as necessary to use up the provided + arguments, arguments of zero/null string are provided to use + up the format string. */ + do + { + tw = 0; + /* find next format specification */ + for (fmt = format; *fmt; fmt++) + { + precision = fieldwidth = 0; + have_fieldwidth = have_precision = 0; + + if (*fmt == '\\') + { + fmt++; + /* A NULL third argument to tescape means to bypass the + special processing for arguments to %b. */ +#if defined (HANDLE_MULTIBYTE) + /* Accommodate possible use of \u or \U, which can result in + multibyte characters */ + memset (mbch, '\0', sizeof (mbch)); + fmt += tescape (fmt, mbch, &mblen, (int *)NULL); + for (mbind = 0; mbind < mblen; mbind++) + PC (mbch[mbind]); +#else + fmt += tescape (fmt, &nextch, (int *)NULL, (int *)NULL); + PC (nextch); +#endif + fmt--; /* for loop will increment it for us again */ + continue; + } + + if (*fmt != '%') + { + PC (*fmt); + continue; + } + + /* ASSERT(*fmt == '%') */ + start = fmt++; + + if (*fmt == '%') /* %% prints a % */ + { + PC ('%'); + continue; + } + + /* found format specification, skip to field width */ + for (; *fmt && strchr(SKIP1, *fmt); ++fmt) + ; + + /* Skip optional field width. */ + if (*fmt == '*') + { + fmt++; + have_fieldwidth = 1; + fieldwidth = getint (); + } + else + while (DIGIT (*fmt)) + fmt++; + + /* Skip optional '.' and precision */ + if (*fmt == '.') + { + ++fmt; + if (*fmt == '*') + { + fmt++; + have_precision = 1; + precision = getint (); + } + else + { + /* Negative precisions are allowed but treated as if the + precision were missing; I would like to allow a leading + `+' in the precision number as an extension, but lots + of asprintf/fprintf implementations get this wrong. */ +#if 0 + if (*fmt == '-' || *fmt == '+') +#else + if (*fmt == '-') +#endif + fmt++; + while (DIGIT (*fmt)) + fmt++; + } + } + + /* skip possible format modifiers */ + modstart = fmt; + while (*fmt && strchr (LENMODS, *fmt)) + fmt++; + + if (*fmt == 0) + { + builtin_error (_("`%s': missing format character"), start); + PRETURN (EXECUTION_FAILURE); + } + + convch = *fmt; + thisch = modstart[0]; + nextch = modstart[1]; + modstart[0] = convch; + modstart[1] = '\0'; + + QUIT; + switch(convch) + { + case 'c': + { + char p; + + p = getchr (); + PF(start, p); + break; + } + + case 's': + { + char *p; + + p = getstr (); + PF(start, p); + break; + } + + case '(': + { + char *timefmt, timebuf[128], *t; + int n; + intmax_t arg; + time_t secs; + struct tm *tm; + + modstart[1] = nextch; /* restore char after left paren */ + timefmt = xmalloc (strlen (fmt) + 3); + fmt++; /* skip over left paren */ + for (t = timefmt, n = 1; *fmt; ) + { + if (*fmt == '(') + n++; + else if (*fmt == ')') + n--; + if (n == 0) + break; + *t++ = *fmt++; + } + *t = '\0'; + if (*++fmt != 'T') + { + builtin_warning (_("`%c': invalid time format specification"), *fmt); + fmt = start; + free (timefmt); + PC (*fmt); + continue; + } + if (timefmt[0] == '\0') + { + timefmt[0] = '%'; + timefmt[1] = 'X'; /* locale-specific current time - should we use `+'? */ + timefmt[2] = '\0'; + } + /* argument is seconds since the epoch with special -1 and -2 */ + /* default argument is equivalent to -1; special case */ + arg = garglist ? getintmax () : -1; + if (arg == -1) + secs = NOW; /* roughly date +%s */ + else if (arg == -2) + secs = shell_start_time; /* roughly $SECONDS */ + else + secs = arg; +#if defined (HAVE_TZSET) + sv_tz ("TZ"); /* XXX -- just make sure */ +#endif + tm = localtime (&secs); + if (tm == 0) + { + secs = 0; + tm = localtime (&secs); + } + n = tm ? strftime (timebuf, sizeof (timebuf), timefmt, tm) : 0; + free (timefmt); + if (n == 0) + timebuf[0] = '\0'; + else + timebuf[sizeof(timebuf) - 1] = '\0'; + /* convert to %s format that preserves fieldwidth and precision */ + modstart[0] = 's'; + modstart[1] = '\0'; + n = printstr (start, timebuf, strlen (timebuf), fieldwidth, precision); /* XXX - %s for now */ + if (n < 0) + { + if (ferror (stdout) == 0) + { + sh_wrerror (); + clearerr (stdout); + } + PRETURN (EXECUTION_FAILURE); + } + break; + } + + case 'n': + { + char *var; + + var = getstr (); + if (var && *var) + { + if (legal_identifier (var)) + bind_var_to_int (var, tw); + else + { + sh_invalidid (var); + PRETURN (EXECUTION_FAILURE); + } + } + break; + } + + case 'b': /* expand escapes in argument */ + { + char *p, *xp; + int rlen, r; + + p = getstr (); + ch = rlen = r = 0; + xp = bexpand (p, strlen (p), &ch, &rlen); + + if (xp) + { + /* Have to use printstr because of possible NUL bytes + in XP -- printf does not handle that well. */ + r = printstr (start, xp, rlen, fieldwidth, precision); + if (r < 0) + { + if (ferror (stdout) == 0) + { + sh_wrerror (); + clearerr (stdout); + } + retval = EXECUTION_FAILURE; + } + free (xp); + } + + if (ch || r < 0) + PRETURN (retval); + break; + } + + case 'q': /* print with shell quoting */ + { + char *p, *xp; + int r; + + r = 0; + p = getstr (); + if (p && *p == 0) /* XXX - getstr never returns null */ + xp = savestring ("''"); + else if (ansic_shouldquote (p)) + xp = ansic_quote (p, 0, (int *)0); + else + xp = sh_backslash_quote (p, 0, 3); + if (xp) + { + /* Use printstr to get fieldwidth and precision right. */ + r = printstr (start, xp, strlen (xp), fieldwidth, precision); + if (r < 0) + { + sh_wrerror (); + clearerr (stdout); + } + free (xp); + } + + if (r < 0) + PRETURN (EXECUTION_FAILURE); + break; + } + + case 'd': + case 'i': + { + char *f; + long p; + intmax_t pp; + + p = pp = getintmax (); + if (p != pp) + { + f = mklong (start, PRIdMAX, sizeof (PRIdMAX) - 2); + PF (f, pp); + } + else + { + /* Optimize the common case where the integer fits + in "long". This also works around some long + long and/or intmax_t library bugs in the common + case, e.g. glibc 2.2 x86. */ + f = mklong (start, "l", 1); + PF (f, p); + } + break; + } + + case 'o': + case 'u': + case 'x': + case 'X': + { + char *f; + unsigned long p; + uintmax_t pp; + + p = pp = getuintmax (); + if (p != pp) + { + f = mklong (start, PRIdMAX, sizeof (PRIdMAX) - 2); + PF (f, pp); + } + else + { + f = mklong (start, "l", 1); + PF (f, p); + } + break; + } + + case 'e': + case 'E': + case 'f': + case 'F': + case 'g': + case 'G': +#if defined (HAVE_PRINTF_A_FORMAT) + case 'a': + case 'A': +#endif + { + char *f; + floatmax_t p; + + p = getfloatmax (); + f = mklong (start, FLOATMAX_CONV, sizeof(FLOATMAX_CONV) - 1); + PF (f, p); + break; + } + + /* We don't output unrecognized format characters; we print an + error message and return a failure exit status. */ + default: + builtin_error (_("`%c': invalid format character"), convch); + PRETURN (EXECUTION_FAILURE); + } + + modstart[0] = thisch; + modstart[1] = nextch; + } + + if (ferror (stdout)) + { + /* PRETURN will print error message. */ + PRETURN (EXECUTION_FAILURE); + } + } + while (garglist && garglist != list->next); + + if (conversion_error) + retval = EXECUTION_FAILURE; + + PRETURN (retval); +} + +static void +printf_erange (s) + char *s; +{ + builtin_error (_("warning: %s: %s"), s, strerror(ERANGE)); +} + +/* We duplicate a lot of what printf(3) does here. */ +static int +printstr (fmt, string, len, fieldwidth, precision) + char *fmt; /* format */ + char *string; /* expanded string argument */ + int len; /* length of expanded string */ + int fieldwidth; /* argument for width of `*' */ + int precision; /* argument for precision of `*' */ +{ +#if 0 + char *s; +#endif + int padlen, nc, ljust, i; + int fw, pr; /* fieldwidth and precision */ + intmax_t mfw, mpr; + + if (string == 0) + string = ""; + +#if 0 + s = fmt; +#endif + if (*fmt == '%') + fmt++; + + ljust = fw = 0; + pr = -1; + mfw = 0; + mpr = -1; + + /* skip flags */ + while (strchr (SKIP1, *fmt)) + { + if (*fmt == '-') + ljust = 1; + fmt++; + } + + /* get fieldwidth, if present. rely on caller to clamp fieldwidth at INT_MAX */ + if (*fmt == '*') + { + fmt++; + fw = fieldwidth; + if (fw < 0) + { + fw = -fw; + ljust = 1; + } + } + else if (DIGIT (*fmt)) + { + mfw = *fmt++ - '0'; + while (DIGIT (*fmt)) + mfw = (mfw * 10) + (*fmt++ - '0'); + /* Error if fieldwidth > INT_MAX here? */ + fw = (mfw < 0 || mfw > INT_MAX) ? INT_MAX : mfw; + } + + /* get precision, if present */ + if (*fmt == '.') + { + fmt++; + if (*fmt == '*') + { + fmt++; + pr = precision; + } + else if (DIGIT (*fmt)) + { + mpr = *fmt++ - '0'; + while (DIGIT (*fmt)) + mpr = (mpr * 10) + (*fmt++ - '0'); + /* Error if precision > INT_MAX here? */ + pr = (mpr < 0 || mpr > INT_MAX) ? INT_MAX : mpr; + } + else + pr = 0; /* "a null digit string is treated as zero" */ + } + +#if 0 + /* If we remove this, get rid of `s'. */ + if (*fmt != 'b' && *fmt != 'q') + { + internal_error (_("format parsing problem: %s"), s); + fw = pr = 0; + } +#endif + + /* chars from string to print */ + nc = (pr >= 0 && pr <= len) ? pr : len; + + padlen = fw - nc; + if (padlen < 0) + padlen = 0; + if (ljust) + padlen = -padlen; + + /* leading pad characters */ + for (; padlen > 0; padlen--) + PC (' '); + + /* output NC characters from STRING */ + for (i = 0; i < nc; i++) + PC (string[i]); + + /* output any necessary trailing padding */ + for (; padlen < 0; padlen++) + PC (' '); + + return (ferror (stdout) ? -1 : 0); +} + +/* Convert STRING by expanding the escape sequences specified by the + POSIX standard for printf's `%b' format string. If SAWC is non-null, + perform the processing appropriate for %b arguments. In particular, + recognize `\c' and use that as a string terminator. If we see \c, set + *SAWC to 1 before returning. LEN is the length of STRING. */ + +/* Translate a single backslash-escape sequence starting at ESTART (the + character after the backslash) and return the number of characters + consumed by the sequence. CP is the place to return the translated + value. *SAWC is set to 1 if the escape sequence was \c, since that means + to short-circuit the rest of the processing. If SAWC is null, we don't + do the \c short-circuiting, and \c is treated as an unrecognized escape + sequence; we also bypass the other processing specific to %b arguments. */ +static int +tescape (estart, cp, lenp, sawc) + char *estart; + char *cp; + int *lenp, *sawc; +{ + register char *p; + int temp, c, evalue; + unsigned long uvalue; + + p = estart; + if (lenp) + *lenp = 1; + + switch (c = *p++) + { +#if defined (__STDC__) + case 'a': *cp = '\a'; break; +#else + case 'a': *cp = '\007'; break; +#endif + + case 'b': *cp = '\b'; break; + + case 'e': + case 'E': *cp = '\033'; break; /* ESC -- non-ANSI */ + + case 'f': *cp = '\f'; break; + + case 'n': *cp = '\n'; break; + + case 'r': *cp = '\r'; break; + + case 't': *cp = '\t'; break; + + case 'v': *cp = '\v'; break; + + /* The octal escape sequences are `\0' followed by up to three octal + digits (if SAWC), or `\' followed by up to three octal digits (if + !SAWC). As an extension, we allow the latter form even if SAWC. */ + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + evalue = OCTVALUE (c); + for (temp = 2 + (!evalue && !!sawc); ISOCTAL (*p) && temp--; p++) + evalue = (evalue * 8) + OCTVALUE (*p); + *cp = evalue & 0xFF; + break; + + /* And, as another extension, we allow \xNN, where each N is a + hex digit. */ + case 'x': + for (temp = 2, evalue = 0; ISXDIGIT ((unsigned char)*p) && temp--; p++) + evalue = (evalue * 16) + HEXVALUE (*p); + if (p == estart + 1) + { + builtin_error (_("missing hex digit for \\x")); + *cp = '\\'; + return 0; + } + *cp = evalue & 0xFF; + break; + +#if defined (HANDLE_MULTIBYTE) + case 'u': + case 'U': + temp = (c == 'u') ? 4 : 8; /* \uNNNN \UNNNNNNNN */ + for (uvalue = 0; ISXDIGIT ((unsigned char)*p) && temp--; p++) + uvalue = (uvalue * 16) + HEXVALUE (*p); + if (p == estart + 1) + { + builtin_error (_("missing unicode digit for \\%c"), c); + *cp = '\\'; + return 0; + } + if (uvalue <= 0x7f) /* <= 0x7f translates directly */ + *cp = uvalue; + else + { + temp = u32cconv (uvalue, cp); + cp[temp] = '\0'; + if (lenp) + *lenp = temp; + } + break; +#endif + + case '\\': /* \\ -> \ */ + *cp = c; + break; + + /* SAWC == 0 means that \', \", and \? are recognized as escape + sequences, though the only processing performed is backslash + removal. */ + case '\'': case '"': case '?': + if (!sawc) + *cp = c; + else + { + *cp = '\\'; + return 0; + } + break; + + case 'c': + if (sawc) + { + *sawc = 1; + break; + } + /* other backslash escapes are passed through unaltered */ + default: + *cp = '\\'; + return 0; + } + return (p - estart); +} + +static char * +bexpand (string, len, sawc, lenp) + char *string; + int len, *sawc, *lenp; +{ + int temp; + char *ret, *r, *s, c; +#if defined (HANDLE_MULTIBYTE) + char mbch[25]; + int mbind, mblen; +#endif + + if (string == 0 || len == 0) + { + if (sawc) + *sawc = 0; + if (lenp) + *lenp = 0; + ret = (char *)xmalloc (1); + ret[0] = '\0'; + return (ret); + } + + ret = (char *)xmalloc (len + 1); + for (r = ret, s = string; s && *s; ) + { + c = *s++; + if (c != '\\' || *s == '\0') + { + *r++ = c; + continue; + } + temp = 0; +#if defined (HANDLE_MULTIBYTE) + memset (mbch, '\0', sizeof (mbch)); + s += tescape (s, mbch, &mblen, &temp); +#else + s += tescape (s, &c, (int *)NULL, &temp); +#endif + if (temp) + { + if (sawc) + *sawc = 1; + break; + } + +#if defined (HANDLE_MULTIBYTE) + for (mbind = 0; mbind < mblen; mbind++) + *r++ = mbch[mbind]; +#else + *r++ = c; +#endif + } + + *r = '\0'; + if (lenp) + *lenp = r - ret; + return ret; +} + +static char * +vbadd (buf, blen) + char *buf; + int blen; +{ + size_t nlen; + + nlen = vblen + blen + 1; + if (nlen >= vbsize) + { + vbsize = ((nlen + 63) >> 6) << 6; + vbuf = (char *)xrealloc (vbuf, vbsize); + } + + if (blen == 1) + vbuf[vblen++] = buf[0]; + else if (blen > 1) + { + FASTCOPY (buf, vbuf + vblen, blen); + vblen += blen; + } + vbuf[vblen] = '\0'; + +#ifdef DEBUG + if (strlen (vbuf) != vblen) + internal_error ("printf:vbadd: vblen (%d) != strlen (vbuf) (%d)", vblen, (int)strlen (vbuf)); +#endif + + return vbuf; +} + +static int +#if defined (PREFER_STDARG) +vbprintf (const char *format, ...) +#else +vbprintf (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + size_t nlen; + int blen; + + SH_VA_START (args, format); + blen = vsnprintf (vbuf + vblen, vbsize - vblen, format, args); + va_end (args); + + nlen = vblen + blen + 1; + if (nlen >= vbsize) + { + vbsize = ((nlen + 63) >> 6) << 6; + vbuf = (char *)xrealloc (vbuf, vbsize); + SH_VA_START (args, format); + blen = vsnprintf (vbuf + vblen, vbsize - vblen, format, args); + va_end (args); + } + + vblen += blen; + vbuf[vblen] = '\0'; + +#ifdef DEBUG + if (strlen (vbuf) != vblen) + internal_error ("printf:vbprintf: vblen (%d) != strlen (vbuf) (%d)", vblen, (int)strlen (vbuf)); +#endif + + return (blen); +} + +static char * +mklong (str, modifiers, mlen) + char *str; + char *modifiers; + size_t mlen; +{ + size_t len, slen; + + slen = strlen (str); + len = slen + mlen + 1; + + if (len > conv_bufsize) + { + conv_bufsize = (((len + 1023) >> 10) << 10); + conv_buf = (char *)xrealloc (conv_buf, conv_bufsize); + } + + FASTCOPY (str, conv_buf, slen - 1); + FASTCOPY (modifiers, conv_buf + slen - 1, mlen); + + conv_buf[len - 2] = str[slen - 1]; + conv_buf[len - 1] = '\0'; + return (conv_buf); +} + +static int +getchr () +{ + int ret; + + if (garglist == 0) + return ('\0'); + + ret = (int)garglist->word->word[0]; + garglist = garglist->next; + return ret; +} + +static char * +getstr () +{ + char *ret; + + if (garglist == 0) + return (""); + + ret = garglist->word->word; + garglist = garglist->next; + return ret; +} + +static int +getint () +{ + intmax_t ret; + + ret = getintmax (); + + if (garglist == 0) + return ret; + + if (ret > INT_MAX) + { + printf_erange (garglist->word->word); + ret = INT_MAX; + } + else if (ret < INT_MIN) + { + printf_erange (garglist->word->word); + ret = INT_MIN; + } + + return ((int)ret); +} + +static intmax_t +getintmax () +{ + intmax_t ret; + char *ep; + + if (garglist == 0) + return (0); + + if (garglist->word->word[0] == '\'' || garglist->word->word[0] == '"') + return asciicode (); + + errno = 0; + ret = strtoimax (garglist->word->word, &ep, 0); + + if (*ep) + { + sh_invalidnum (garglist->word->word); + /* POSIX.2 says ``...a diagnostic message shall be written to standard + error, and the utility shall not exit with a zero exit status, but + shall continue processing any remaining operands and shall write the + value accumulated at the time the error was detected to standard + output.'' Yecch. */ +#if 0 + ret = 0; /* return partially-converted value from strtoimax */ +#endif + conversion_error = 1; + } + else if (errno == ERANGE) + printf_erange (garglist->word->word); + + garglist = garglist->next; + return (ret); +} + +static uintmax_t +getuintmax () +{ + uintmax_t ret; + char *ep; + + if (garglist == 0) + return (0); + + if (garglist->word->word[0] == '\'' || garglist->word->word[0] == '"') + return asciicode (); + + errno = 0; + ret = strtoumax (garglist->word->word, &ep, 0); + + if (*ep) + { + sh_invalidnum (garglist->word->word); +#if 0 + /* Same POSIX.2 conversion error requirements as getintmax(). */ + ret = 0; +#endif + conversion_error = 1; + } + else if (errno == ERANGE) + printf_erange (garglist->word->word); + + garglist = garglist->next; + return (ret); +} + +static floatmax_t +getfloatmax () +{ + floatmax_t ret; + char *ep; + + if (garglist == 0) + return (0); + + if (garglist->word->word[0] == '\'' || garglist->word->word[0] == '"') + return asciicode (); + + errno = 0; + ret = strtofltmax (garglist->word->word, &ep); + + if (*ep) + { + sh_invalidnum (garglist->word->word); +#if 0 + /* Same thing about POSIX.2 conversion error requirements. */ + ret = 0; +#endif + conversion_error = 1; + } + else if (errno == ERANGE) + printf_erange (garglist->word->word); + + garglist = garglist->next; + return (ret); +} + +/* NO check is needed for garglist here. */ +static intmax_t +asciicode () +{ + register intmax_t ch; +#if defined (HANDLE_MULTIBYTE) + wchar_t wc; + size_t slen; + int mblength; +#endif + DECLARE_MBSTATE; + +#if defined (HANDLE_MULTIBYTE) + slen = strlen (garglist->word->word+1); + wc = 0; + mblength = mbtowc (&wc, garglist->word->word+1, slen); + if (mblength > 0) + ch = wc; /* XXX */ + else +#endif + ch = (unsigned char)garglist->word->word[1]; + + garglist = garglist->next; + return (ch); +} diff --git a/bash-5.1/builtins_org/psize.c b/bash-5.1/builtins_org/psize.c new file mode 100644 index 0000000000000000000000000000000000000000..30881fb3f6b3c83045f714857787eb8d75d9a7b9 --- /dev/null +++ b/bash-5.1/builtins_org/psize.c @@ -0,0 +1,79 @@ +/* psize.c - Find pipe size. */ + +/* Copyright (C) 1987, 1991 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Write output in 128-byte chunks until we get a sigpipe or write gets an + EPIPE. Then report how many bytes we wrote. We assume that this is the + pipe size. */ +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#ifndef _MINIX +#include "../bashtypes.h" +#endif +#include +#include + +#include "../command.h" +#include "../general.h" +#include "../sig.h" + +#ifndef errno +extern int errno; +#endif + +int nw; + +sighandler +sigpipe (sig) + int sig; +{ + fprintf (stderr, "%d\n", nw); + exit (0); +} + +int +main (argc, argv) + int argc; + char **argv; +{ + char buf[128]; + register int i; + + for (i = 0; i < 128; i++) + buf[i] = ' '; + + signal (SIGPIPE, sigpipe); + + nw = 0; + for (;;) + { + int n; + n = write (1, buf, 128); + nw += n; + } + return (0); +} diff --git a/bash-5.1/builtins_org/psize.sh b/bash-5.1/builtins_org/psize.sh new file mode 100644 index 0000000000000000000000000000000000000000..29bc115f9840c1a3575967cc6ce154071ae23dad --- /dev/null +++ b/bash-5.1/builtins_org/psize.sh @@ -0,0 +1,45 @@ +#! /bin/sh +# +# psize.sh -- determine this system's pipe size, and write a define to +# pipesize.h so ulimit.c can use it. + +: ${TMPDIR:=/tmp} +# try to use mktemp(1) if the system supports it +{ TMPFILE="`mktemp $TMPDIR/pipsize.XXXXXX 2>/dev/null`"; } 2>/dev/null +used_mktemp=true + +if [ -z "$TMPFILE" ]; then + TMPNAME=pipsize.$$ + TMPFILE=$TMPDIR/$TMPNAME + used_mktemp=false +fi + +trap 'rm -f "$TMPFILE" ; exit 1' 1 2 3 6 15 +trap 'rm -f "$TMPFILE"' 0 + +echo "/*" +echo " * pipesize.h" +echo " *" +echo " * This file is automatically generated by psize.sh" +echo " * Do not edit!" +echo " */" +echo "" + +# +# Try to avoid tempfile races. We can't really check for the file's +# existence before we run psize.aux, because `test -e' is not portable, +# `test -h' (test for symlinks) is not portable, and `test -f' only +# checks for regular files. If we used mktemp(1), we're ahead of the +# game. +# +$used_mktemp || rm -f "$TMPFILE" + +./psize.aux 2>"$TMPFILE" | sleep 3 + +if [ -s "$TMPFILE" ]; then + echo "#define PIPESIZE `cat "$TMPFILE"`" +else + echo "#define PIPESIZE 512" +fi + +exit 0 diff --git a/bash-5.1/builtins_org/pushd.def b/bash-5.1/builtins_org/pushd.def new file mode 100644 index 0000000000000000000000000000000000000000..829f827d5dc7c3d2e2cd7852e6e0b5224b9f6d49 --- /dev/null +++ b/bash-5.1/builtins_org/pushd.def @@ -0,0 +1,796 @@ +This file is pushd.def, from which is created pushd.c. It implements the +builtins "pushd", "popd", and "dirs" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES pushd.c + +$BUILTIN pushd +$FUNCTION pushd_builtin +$DEPENDS_ON PUSHD_AND_POPD +$SHORT_DOC pushd [-n] [+N | -N | dir] +Add directories to stack. + +Adds a directory to the top of the directory stack, or rotates +the stack, making the new top of the stack the current working +directory. With no arguments, exchanges the top two directories. + +Options: + -n Suppresses the normal change of directory when adding + directories to the stack, so only the stack is manipulated. + +Arguments: + +N Rotates the stack so that the Nth directory (counting + from the left of the list shown by `dirs', starting with + zero) is at the top. + + -N Rotates the stack so that the Nth directory (counting + from the right of the list shown by `dirs', starting with + zero) is at the top. + + dir Adds DIR to the directory stack at the top, making it the + new current working directory. + +The `dirs' builtin displays the directory stack. + +Exit Status: +Returns success unless an invalid argument is supplied or the directory +change fails. +$END + +$BUILTIN popd +$FUNCTION popd_builtin +$DEPENDS_ON PUSHD_AND_POPD +$SHORT_DOC popd [-n] [+N | -N] +Remove directories from stack. + +Removes entries from the directory stack. With no arguments, removes +the top directory from the stack, and changes to the new top directory. + +Options: + -n Suppresses the normal change of directory when removing + directories from the stack, so only the stack is manipulated. + +Arguments: + +N Removes the Nth entry counting from the left of the list + shown by `dirs', starting with zero. For example: `popd +0' + removes the first directory, `popd +1' the second. + + -N Removes the Nth entry counting from the right of the list + shown by `dirs', starting with zero. For example: `popd -0' + removes the last directory, `popd -1' the next to last. + +The `dirs' builtin displays the directory stack. + +Exit Status: +Returns success unless an invalid argument is supplied or the directory +change fails. +$END + +$BUILTIN dirs +$FUNCTION dirs_builtin +$DEPENDS_ON PUSHD_AND_POPD +$SHORT_DOC dirs [-clpv] [+N] [-N] +Display directory stack. + +Display the list of currently remembered directories. Directories +find their way onto the list with the `pushd' command; you can get +back up through the list with the `popd' command. + +Options: + -c clear the directory stack by deleting all of the elements + -l do not print tilde-prefixed versions of directories relative + to your home directory + -p print the directory stack with one entry per line + -v print the directory stack with one entry per line prefixed + with its position in the stack + +Arguments: + +N Displays the Nth entry counting from the left of the list + shown by dirs when invoked without options, starting with + zero. + + -N Displays the Nth entry counting from the right of the list + shown by dirs when invoked without options, starting with + zero. + +Exit Status: +Returns success unless an invalid option is supplied or an error occurs. +$END + +#include + +#if defined (PUSHD_AND_POPD) +#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include + +#include + +#include "../shell.h" +#include "maxpath.h" +#include "common.h" +#include "builtext.h" + +#ifdef LOADABLE_BUILTIN +# include "builtins.h" +#endif + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +/* The list of remembered directories. */ +static char **pushd_directory_list = (char **)NULL; + +/* Number of existing slots in this list. */ +static int directory_list_size; + +/* Offset to the end of the list. */ +static int directory_list_offset; + +static void pushd_error PARAMS((int, char *)); +static void clear_directory_stack PARAMS((void)); +static int cd_to_string PARAMS((char *)); +static int change_to_temp PARAMS((char *)); +static void add_dirstack_element PARAMS((char *)); +static int get_dirstack_index PARAMS((intmax_t, int, int *)); + +#define NOCD 0x01 +#define ROTATE 0x02 +#define LONGFORM 0x04 +#define CLEARSTAK 0x08 + +int +pushd_builtin (list) + WORD_LIST *list; +{ + WORD_LIST *orig_list; + char *temp, *current_directory, *top; + int j, flags, skipopt; + intmax_t num; + char direction; + + orig_list = list; + + CHECK_HELPOPT (list); + if (list && list->word && ISOPTION (list->word->word, '-')) + { + list = list->next; + skipopt = 1; + } + else + skipopt = 0; + + /* If there is no argument list then switch current and + top of list. */ + if (list == 0) + { + if (directory_list_offset == 0) + { + builtin_error (_("no other directory")); + return (EXECUTION_FAILURE); + } + + current_directory = get_working_directory ("pushd"); + if (current_directory == 0) + return (EXECUTION_FAILURE); + + j = directory_list_offset - 1; + temp = pushd_directory_list[j]; + pushd_directory_list[j] = current_directory; + j = change_to_temp (temp); + free (temp); + return j; + } + + for (flags = 0; skipopt == 0 && list; list = list->next) + { + if (ISOPTION (list->word->word, 'n')) + { + flags |= NOCD; + } + else if (ISOPTION (list->word->word, '-')) + { + list = list->next; + break; + } + else if (list->word->word[0] == '-' && list->word->word[1] == '\0') + /* Let `pushd -' work like it used to. */ + break; + else if (((direction = list->word->word[0]) == '+') || direction == '-') + { + if (legal_number (list->word->word + 1, &num) == 0) + { + sh_invalidnum (list->word->word); + builtin_usage (); + return (EX_USAGE); + } + + if (direction == '-') + num = directory_list_offset - num; + + if (num > directory_list_offset || num < 0) + { + pushd_error (directory_list_offset, list->word->word); + return (EXECUTION_FAILURE); + } + flags |= ROTATE; + } + else if (*list->word->word == '-') + { + sh_invalidopt (list->word->word); + builtin_usage (); + return (EX_USAGE); + } + else + break; + } + + if (flags & ROTATE) + { + /* Rotate the stack num times. Remember, the current + directory acts like it is part of the stack. */ + temp = get_working_directory ("pushd"); + + if (num == 0) + { + j = ((flags & NOCD) == 0) ? change_to_temp (temp) : EXECUTION_SUCCESS; + free (temp); + return j; + } + + do + { + top = pushd_directory_list[directory_list_offset - 1]; + + for (j = directory_list_offset - 2; j > -1; j--) + pushd_directory_list[j + 1] = pushd_directory_list[j]; + + pushd_directory_list[j + 1] = temp; + + temp = top; + num--; + } + while (num); + + j = ((flags & NOCD) == 0) ? change_to_temp (temp) : EXECUTION_SUCCESS; + free (temp); + return j; + } + + if (list == 0) + return (EXECUTION_SUCCESS); + + /* Change to the directory in list->word->word. Save the current + directory on the top of the stack. */ + current_directory = get_working_directory ("pushd"); + if (current_directory == 0) + return (EXECUTION_FAILURE); + + j = ((flags & NOCD) == 0) ? cd_builtin (skipopt ? orig_list : list) : EXECUTION_SUCCESS; + if (j == EXECUTION_SUCCESS) + { + add_dirstack_element ((flags & NOCD) ? savestring (list->word->word) : current_directory); + dirs_builtin ((WORD_LIST *)NULL); + if (flags & NOCD) + free (current_directory); + return (EXECUTION_SUCCESS); + } + else + { + free (current_directory); + return (EXECUTION_FAILURE); + } +} + +/* Pop the directory stack, and then change to the new top of the stack. + If LIST is non-null it should consist of a word +N or -N, which says + what element to delete from the stack. The default is the top one. */ +int +popd_builtin (list) + WORD_LIST *list; +{ + register int i; + intmax_t which; + int flags; + char direction; + char *which_word; + + CHECK_HELPOPT (list); + + which_word = (char *)NULL; + for (flags = 0, which = 0, direction = '+'; list; list = list->next) + { + if (ISOPTION (list->word->word, 'n')) + { + flags |= NOCD; + } + else if (ISOPTION (list->word->word, '-')) + { + list = list->next; + break; + } + else if (((direction = list->word->word[0]) == '+') || direction == '-') + { + if (legal_number (list->word->word + 1, &which) == 0) + { + sh_invalidnum (list->word->word); + builtin_usage (); + return (EX_USAGE); + } + which_word = list->word->word; + } + else if (*list->word->word == '-') + { + sh_invalidopt (list->word->word); + builtin_usage (); + return (EX_USAGE); + } + else if (*list->word->word) + { + builtin_error (_("%s: invalid argument"), list->word->word); + builtin_usage (); + return (EX_USAGE); + } + else + break; + } + + if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0)) + { + pushd_error (directory_list_offset, which_word ? which_word : ""); + return (EXECUTION_FAILURE); + } + + /* Handle case of no specification, or top of stack specification. */ + if ((direction == '+' && which == 0) || + (direction == '-' && which == directory_list_offset)) + { + i = ((flags & NOCD) == 0) ? cd_to_string (pushd_directory_list[directory_list_offset - 1]) + : EXECUTION_SUCCESS; + if (i != EXECUTION_SUCCESS) + return (i); + free (pushd_directory_list[--directory_list_offset]); + } + else + { + /* Since an offset other than the top directory was specified, + remove that directory from the list and shift the remainder + of the list into place. */ + i = (direction == '+') ? directory_list_offset - which : which; + if (i < 0 || i > directory_list_offset) + { + pushd_error (directory_list_offset, which_word ? which_word : ""); + return (EXECUTION_FAILURE); + } + free (pushd_directory_list[i]); + directory_list_offset--; + + /* Shift the remainder of the list into place. */ + for (; i < directory_list_offset; i++) + pushd_directory_list[i] = pushd_directory_list[i + 1]; + } + + dirs_builtin ((WORD_LIST *)NULL); + return (EXECUTION_SUCCESS); +} + +/* Print the current list of directories on the directory stack. */ +int +dirs_builtin (list) + WORD_LIST *list; +{ + int flags, desired_index, index_flag, vflag; + intmax_t i; + char *temp, *w; + + CHECK_HELPOPT (list); + for (flags = vflag = index_flag = 0, desired_index = -1, w = ""; list; list = list->next) + { + if (ISOPTION (list->word->word, 'l')) + { + flags |= LONGFORM; + } + else if (ISOPTION (list->word->word, 'c')) + { + flags |= CLEARSTAK; + } + else if (ISOPTION (list->word->word, 'v')) + { + vflag |= 2; + } + else if (ISOPTION (list->word->word, 'p')) + { + vflag |= 1; + } + else if (ISOPTION (list->word->word, '-')) + { + list = list->next; + break; + } + else if (*list->word->word == '+' || *list->word->word == '-') + { + int sign; + if (legal_number (w = list->word->word + 1, &i) == 0) + { + sh_invalidnum (list->word->word); + builtin_usage (); + return (EX_USAGE); + } + sign = (*list->word->word == '+') ? 1 : -1; + desired_index = get_dirstack_index (i, sign, &index_flag); + } + else + { + sh_invalidopt (list->word->word); + builtin_usage (); + return (EX_USAGE); + } + } + + if (flags & CLEARSTAK) + { + clear_directory_stack (); + return (EXECUTION_SUCCESS); + } + + if (index_flag && (desired_index < 0 || desired_index > directory_list_offset)) + { + pushd_error (directory_list_offset, w); + return (EXECUTION_FAILURE); + } + +#define DIRSTACK_FORMAT(temp) \ + (flags & LONGFORM) ? temp : polite_directory_format (temp) + + /* The first directory printed is always the current working directory. */ + if (index_flag == 0 || (index_flag == 1 && desired_index == 0)) + { + temp = get_working_directory ("dirs"); + if (temp == 0) + temp = savestring (_("")); + if (vflag & 2) + printf ("%2d %s", 0, DIRSTACK_FORMAT (temp)); + else + printf ("%s", DIRSTACK_FORMAT (temp)); + free (temp); + if (index_flag) + { + putchar ('\n'); + return (sh_chkwrite (EXECUTION_SUCCESS)); + } + } + +#define DIRSTACK_ENTRY(i) \ + (flags & LONGFORM) ? pushd_directory_list[i] \ + : polite_directory_format (pushd_directory_list[i]) + + /* Now print the requested directory stack entries. */ + if (index_flag) + { + if (vflag & 2) + printf ("%2d %s", directory_list_offset - desired_index, + DIRSTACK_ENTRY (desired_index)); + else + printf ("%s", DIRSTACK_ENTRY (desired_index)); + } + else + for (i = directory_list_offset - 1; i >= 0; i--) + if (vflag >= 2) + printf ("\n%2d %s", directory_list_offset - (int)i, DIRSTACK_ENTRY (i)); + else + printf ("%s%s", (vflag & 1) ? "\n" : " ", DIRSTACK_ENTRY (i)); + + putchar ('\n'); + + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +static void +pushd_error (offset, arg) + int offset; + char *arg; +{ + if (offset == 0) + builtin_error (_("directory stack empty")); + else + sh_erange (arg, _("directory stack index")); +} + +static void +clear_directory_stack () +{ + register int i; + + for (i = 0; i < directory_list_offset; i++) + free (pushd_directory_list[i]); + directory_list_offset = 0; +} + +/* Switch to the directory in NAME. This uses the cd_builtin to do the work, + so if the result is EXECUTION_FAILURE then an error message has already + been printed. */ +static int +cd_to_string (name) + char *name; +{ + WORD_LIST *tlist; + WORD_LIST *dir; + int result; + + dir = make_word_list (make_word (name), NULL); + tlist = make_word_list (make_word ("--"), dir); + result = cd_builtin (tlist); + dispose_words (tlist); + return (result); +} + +static int +change_to_temp (temp) + char *temp; +{ + int tt; + + tt = temp ? cd_to_string (temp) : EXECUTION_FAILURE; + + if (tt == EXECUTION_SUCCESS) + dirs_builtin ((WORD_LIST *)NULL); + + return (tt); +} + +static void +add_dirstack_element (dir) + char *dir; +{ + if (directory_list_offset == directory_list_size) + pushd_directory_list = strvec_resize (pushd_directory_list, directory_list_size += 10); + pushd_directory_list[directory_list_offset++] = dir; +} + +static int +get_dirstack_index (ind, sign, indexp) + intmax_t ind; + int sign, *indexp; +{ + if (indexp) + *indexp = sign > 0 ? 1 : 2; + + /* dirs +0 prints the current working directory. */ + /* dirs -0 prints last element in directory stack */ + if (ind == 0 && sign > 0) + return 0; + else if (ind == directory_list_offset) + { + if (indexp) + *indexp = sign > 0 ? 2 : 1; + return 0; + } + else if (ind >= 0 && ind <= directory_list_offset) + return (sign > 0 ? directory_list_offset - ind : ind); + else + return -1; +} + +/* Used by the tilde expansion code. */ +char * +get_dirstack_from_string (string) + char *string; +{ + int ind, sign, index_flag; + intmax_t i; + + sign = 1; + if (*string == '-' || *string == '+') + { + sign = (*string == '-') ? -1 : 1; + string++; + } + if (legal_number (string, &i) == 0) + return ((char *)NULL); + + index_flag = 0; + ind = get_dirstack_index (i, sign, &index_flag); + if (index_flag && (ind < 0 || ind > directory_list_offset)) + return ((char *)NULL); + if (index_flag == 0 || (index_flag == 1 && ind == 0)) + return (get_string_value ("PWD")); + else + return (pushd_directory_list[ind]); +} + +#ifdef INCLUDE_UNUSED +char * +get_dirstack_element (ind, sign) + intmax_t ind; + int sign; +{ + int i; + + i = get_dirstack_index (ind, sign, (int *)NULL); + return (i < 0 || i > directory_list_offset) ? (char *)NULL + : pushd_directory_list[i]; +} +#endif + +void +set_dirstack_element (ind, sign, value) + intmax_t ind; + int sign; + char *value; +{ + int i; + + i = get_dirstack_index (ind, sign, (int *)NULL); + if (ind == 0 || i < 0 || i > directory_list_offset) + return; + free (pushd_directory_list[i]); + pushd_directory_list[i] = savestring (value); +} + +WORD_LIST * +get_directory_stack (flags) + int flags; +{ + register int i; + WORD_LIST *ret; + char *d, *t; + + for (ret = (WORD_LIST *)NULL, i = 0; i < directory_list_offset; i++) + { + d = (flags&1) ? polite_directory_format (pushd_directory_list[i]) + : pushd_directory_list[i]; + ret = make_word_list (make_word (d), ret); + } + /* Now the current directory. */ + d = get_working_directory ("dirstack"); + i = 0; /* sentinel to decide whether or not to free d */ + if (d == 0) + d = "."; + else + { + t = (flags&1) ? polite_directory_format (d) : d; + /* polite_directory_format sometimes returns its argument unchanged. + If it does not, we can free d right away. If it does, we need to + mark d to be deleted later. */ + if (t != d) + { + free (d); + d = t; + } + else /* t == d, so d is what we want */ + i = 1; + } + ret = make_word_list (make_word (d), ret); + if (i) + free (d); + return ret; /* was (REVERSE_LIST (ret, (WORD_LIST *)); */ +} + +#ifdef LOADABLE_BUILTIN +char * const dirs_doc[] = { +N_("Display the list of currently remembered directories. Directories\n\ + find their way onto the list with the `pushd' command; you can get\n\ + back up through the list with the `popd' command.\n\ + \n\ + Options:\n\ + -c clear the directory stack by deleting all of the elements\n\ + -l do not print tilde-prefixed versions of directories relative\n\ + to your home directory\n\ + -p print the directory stack with one entry per line\n\ + -v print the directory stack with one entry per line prefixed\n\ + with its position in the stack\n\ + \n\ + Arguments:\n\ + +N Displays the Nth entry counting from the left of the list shown by\n\ + dirs when invoked without options, starting with zero.\n\ + \n\ + -N Displays the Nth entry counting from the right of the list shown by\n\ + dirs when invoked without options, starting with zero."), + (char *)NULL +}; + +char * const pushd_doc[] = { +N_("Adds a directory to the top of the directory stack, or rotates\n\ + the stack, making the new top of the stack the current working\n\ + directory. With no arguments, exchanges the top two directories.\n\ + \n\ + Options:\n\ + -n Suppresses the normal change of directory when adding\n\ + directories to the stack, so only the stack is manipulated.\n\ + \n\ + Arguments:\n\ + +N Rotates the stack so that the Nth directory (counting\n\ + from the left of the list shown by `dirs', starting with\n\ + zero) is at the top.\n\ + \n\ + -N Rotates the stack so that the Nth directory (counting\n\ + from the right of the list shown by `dirs', starting with\n\ + zero) is at the top.\n\ + \n\ + dir Adds DIR to the directory stack at the top, making it the\n\ + new current working directory.\n\ + \n\ + The `dirs' builtin displays the directory stack."), + (char *)NULL +}; + +char * const popd_doc[] = { +N_("Removes entries from the directory stack. With no arguments, removes\n\ + the top directory from the stack, and changes to the new top directory.\n\ + \n\ + Options:\n\ + -n Suppresses the normal change of directory when removing\n\ + directories from the stack, so only the stack is manipulated.\n\ + \n\ + Arguments:\n\ + +N Removes the Nth entry counting from the left of the list\n\ + shown by `dirs', starting with zero. For example: `popd +0'\n\ + removes the first directory, `popd +1' the second.\n\ + \n\ + -N Removes the Nth entry counting from the right of the list\n\ + shown by `dirs', starting with zero. For example: `popd -0'\n\ + removes the last directory, `popd -1' the next to last.\n\ + \n\ + The `dirs' builtin displays the directory stack."), + (char *)NULL +}; + +struct builtin pushd_struct = { + "pushd", + pushd_builtin, + BUILTIN_ENABLED, + pushd_doc, + "pushd [+N | -N] [-n] [dir]", + 0 +}; + +struct builtin popd_struct = { + "popd", + popd_builtin, + BUILTIN_ENABLED, + popd_doc, + "popd [+N | -N] [-n]", + 0 +}; + +struct builtin dirs_struct = { + "dirs", + dirs_builtin, + BUILTIN_ENABLED, + dirs_doc, + "dirs [-clpv] [+N] [-N]", + 0 +}; +#endif /* LOADABLE_BUILTIN */ + +#endif /* PUSHD_AND_POPD */ diff --git a/bash-5.1/builtins_org/read.def b/bash-5.1/builtins_org/read.def new file mode 100644 index 0000000000000000000000000000000000000000..39e16e844bb0a96c6c28322a62b95e63a0a8d4f5 --- /dev/null +++ b/bash-5.1/builtins_org/read.def @@ -0,0 +1,1190 @@ +This file is read.def, from which is created read.c. +It implements the builtin "read" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES read.c + +$BUILTIN read +$FUNCTION read_builtin +$SHORT_DOC read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...] +Read a line from the standard input and split it into fields. + +Reads a single line from the standard input, or from file descriptor FD +if the -u option is supplied. The line is split into fields as with word +splitting, and the first word is assigned to the first NAME, the second +word to the second NAME, and so on, with any leftover words assigned to +the last NAME. Only the characters found in $IFS are recognized as word +delimiters. + +If no NAMEs are supplied, the line read is stored in the REPLY variable. + +Options: + -a array assign the words read to sequential indices of the array + variable ARRAY, starting at zero + -d delim continue until the first character of DELIM is read, rather + than newline + -e use Readline to obtain the line + -i text use TEXT as the initial text for Readline + -n nchars return after reading NCHARS characters rather than waiting + for a newline, but honor a delimiter if fewer than + NCHARS characters are read before the delimiter + -N nchars return only after reading exactly NCHARS characters, unless + EOF is encountered or read times out, ignoring any + delimiter + -p prompt output the string PROMPT without a trailing newline before + attempting to read + -r do not allow backslashes to escape any characters + -s do not echo input coming from a terminal + -t timeout time out and return failure if a complete line of + input is not read within TIMEOUT seconds. The value of the + TMOUT variable is the default timeout. TIMEOUT may be a + fractional number. If TIMEOUT is 0, read returns + immediately, without trying to read any data, returning + success only if input is available on the specified + file descriptor. The exit status is greater than 128 + if the timeout is exceeded + -u fd read from file descriptor FD instead of the standard input + +Exit Status: +The return code is zero, unless end-of-file is encountered, read times out +(in which case it's greater than 128), a variable assignment error occurs, +or an invalid file descriptor is supplied as the argument to -u. +$END + +#include + +#include "bashtypes.h" +#include "posixstat.h" + +#include + +#include "bashansi.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include + +#ifdef __CYGWIN__ +# include +# include +#endif + +#include "../bashintl.h" + +#include "../shell.h" +#include "common.h" +#include "bashgetopt.h" +#include "trap.h" + +#include + +#if defined (READLINE) +#include "../bashline.h" +#include +#endif + +#if defined (BUFFERED_INPUT) +# include "input.h" +#endif + +#include "shmbutil.h" + +#if !defined(errno) +extern int errno; +#endif + +struct ttsave +{ + int fd; + TTYSTRUCT attrs; +}; + +#if defined (READLINE) +static void reset_attempted_completion_function PARAMS((char *)); +static int set_itext PARAMS((void)); +static char *edit_line PARAMS((char *, char *)); +static void set_eol_delim PARAMS((int)); +static void reset_eol_delim PARAMS((char *)); +#endif +static SHELL_VAR *bind_read_variable PARAMS((char *, char *)); +#if defined (HANDLE_MULTIBYTE) +static int read_mbchar PARAMS((int, char *, int, int, int)); +#endif +static void ttyrestore PARAMS((struct ttsave *)); + +static sighandler sigalrm PARAMS((int)); +static void reset_alarm PARAMS((void)); + +/* Try this to see what the rest of the shell can do with the information. */ +procenv_t alrmbuf; +int sigalrm_seen; + +static int reading, tty_modified; +static SigHandler *old_alrm; +static unsigned char delim; + +static struct ttsave termsave; + +/* In all cases, SIGALRM just sets a flag that we check periodically. This + avoids problems with the semi-tricky stuff we do with the xfree of + input_string at the top of the unwind-protect list (see below). */ + +/* Set a flag that CHECK_ALRM can check. This relies on zread or read_builtin + calling trap.c:check_signals(), which knows about sigalrm_seen and alrmbuf. */ +static sighandler +sigalrm (s) + int s; +{ + sigalrm_seen = 1; +} + +static void +reset_alarm () +{ + /* Cancel alarm before restoring signal handler. */ + falarm (0, 0); + set_signal_handler (SIGALRM, old_alrm); +} + +/* Read the value of the shell variables whose names follow. + The reading is done from the current input stream, whatever + that may be. Successive words of the input line are assigned + to the variables mentioned in LIST. The last variable in LIST + gets the remainder of the words on the line. If no variables + are mentioned in LIST, then the default variable is $REPLY. */ +int +read_builtin (list) + WORD_LIST *list; +{ + register char *varname; + int size, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2, nflag; + volatile int i; + int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul; + int raw, edit, nchars, silent, have_timeout, ignore_delim, fd; + int lastsig, t_errno; + int mb_cur_max; + unsigned int tmsec, tmusec; + long ival, uval; + intmax_t intval; + char c; + char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname; + char *e, *t, *t1, *ps2, *tofree; + struct stat tsb; + SHELL_VAR *var; + TTYSTRUCT ttattrs, ttset; +#if defined (ARRAY_VARS) + WORD_LIST *alist; + int vflags; +#endif +#if defined (READLINE) + char *rlbuf, *itext; + int rlind; + FILE *save_instream; +#endif + + USE_VAR(size); + USE_VAR(i); + USE_VAR(pass_next); + USE_VAR(print_ps2); + USE_VAR(saw_escape); + USE_VAR(input_is_pipe); +/* USE_VAR(raw); */ + USE_VAR(edit); + USE_VAR(tmsec); + USE_VAR(tmusec); + USE_VAR(nchars); + USE_VAR(silent); + USE_VAR(ifs_chars); + USE_VAR(prompt); + USE_VAR(arrayname); +#if defined (READLINE) + USE_VAR(rlbuf); + USE_VAR(rlind); + USE_VAR(itext); +#endif + USE_VAR(list); + USE_VAR(ps2); + USE_VAR(lastsig); + + sigalrm_seen = reading = tty_modified = 0; + + i = 0; /* Index into the string that we are reading. */ + raw = edit = 0; /* Not reading raw input by default. */ + silent = 0; + arrayname = prompt = (char *)NULL; + fd = 0; /* file descriptor to read from */ + +#if defined (READLINE) + rlbuf = itext = (char *)0; + rlind = 0; +#endif + + mb_cur_max = MB_CUR_MAX; + tmsec = tmusec = 0; /* no timeout */ + nr = nchars = input_is_tty = input_is_pipe = unbuffered_read = have_timeout = 0; + delim = '\n'; /* read until newline */ + ignore_delim = nflag = 0; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "ersa:d:i:n:p:t:u:N:")) != -1) + { + switch (opt) + { + case 'r': + raw = 1; + break; + case 'p': + prompt = list_optarg; + break; + case 's': + silent = 1; + break; + case 'e': +#if defined (READLINE) + edit = 1; +#endif + break; + case 'i': +#if defined (READLINE) + itext = list_optarg; +#endif + break; +#if defined (ARRAY_VARS) + case 'a': + arrayname = list_optarg; + break; +#endif + case 't': + code = uconvert (list_optarg, &ival, &uval, (char **)NULL); + if (code == 0 || ival < 0 || uval < 0) + { + builtin_error (_("%s: invalid timeout specification"), list_optarg); + return (EXECUTION_FAILURE); + } + else + { + have_timeout = 1; + tmsec = ival; + tmusec = uval; + } + break; + case 'N': + ignore_delim = 1; + delim = -1; + case 'n': + nflag = 1; + code = legal_number (list_optarg, &intval); + if (code == 0 || intval < 0 || intval != (int)intval) + { + sh_invalidnum (list_optarg); + return (EXECUTION_FAILURE); + } + else + nchars = intval; + break; + case 'u': + code = legal_number (list_optarg, &intval); + if (code == 0 || intval < 0 || intval != (int)intval) + { + builtin_error (_("%s: invalid file descriptor specification"), list_optarg); + return (EXECUTION_FAILURE); + } + else + fd = intval; + if (sh_validfd (fd) == 0) + { + builtin_error (_("%d: invalid file descriptor: %s"), fd, strerror (errno)); + return (EXECUTION_FAILURE); + } + break; + case 'd': + delim = *list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + /* `read -t 0 var' tests whether input is available with select/FIONREAD, + and fails if those are unavailable */ + if (have_timeout && tmsec == 0 && tmusec == 0) +#if 0 + return (EXECUTION_FAILURE); +#else + return (input_avail (fd) ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +#endif + + /* Convenience: check early whether or not the first of possibly several + variable names is a valid identifier, and bail early if so. */ +#if defined (ARRAY_VARS) + vflags = assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0; + if (list && legal_identifier (list->word->word) == 0 && valid_array_reference (list->word->word, vflags) == 0) +#else + if (list && legal_identifier (list->word->word) == 0) +#endif + { + sh_invalidid (list->word->word); + return (EXECUTION_FAILURE); + } + + /* If we're asked to ignore the delimiter, make sure we do. */ + if (ignore_delim) + delim = -1; + + /* IF IFS is unset, we use the default of " \t\n". */ + ifs_chars = getifs (); + if (ifs_chars == 0) /* XXX - shouldn't happen */ + ifs_chars = ""; + /* If we want to read exactly NCHARS chars, don't split on IFS */ + if (ignore_delim) + ifs_chars = ""; + for (skip_ctlesc = skip_ctlnul = 0, e = ifs_chars; *e; e++) + skip_ctlesc |= *e == CTLESC, skip_ctlnul |= *e == CTLNUL; + + input_string = (char *)xmalloc (size = 112); /* XXX was 128 */ + input_string[0] = '\0'; + + /* More input and options validation */ + if (nflag == 1 && nchars == 0) + { + retval = read (fd, &c, 0); + retval = (retval >= 0) ? EXECUTION_SUCCESS : EXECUTION_FAILURE; + goto assign_vars; /* bail early if asked to read 0 chars */ + } + + /* $TMOUT, if set, is the default timeout for read. */ + if (have_timeout == 0 && (e = get_string_value ("TMOUT"))) + { + code = uconvert (e, &ival, &uval, (char **)NULL); + if (code == 0 || ival < 0 || uval < 0) + tmsec = tmusec = 0; + else + { + tmsec = ival; + tmusec = uval; + } + } + + begin_unwind_frame ("read_builtin"); + +#if defined (BUFFERED_INPUT) + if (interactive == 0 && default_buffered_input >= 0 && fd_is_bash_input (fd)) + sync_buffered_stream (default_buffered_input); +#endif + +#if 1 + input_is_tty = isatty (fd); +#else + input_is_tty = 1; +#endif + if (input_is_tty == 0) +#ifndef __CYGWIN__ + input_is_pipe = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); +#else + input_is_pipe = 1; +#endif + + /* If the -p, -e or -s flags were given, but input is not coming from the + terminal, turn them off. */ + if ((prompt || edit || silent) && input_is_tty == 0) + { + prompt = (char *)NULL; +#if defined (READLINE) + itext = (char *)NULL; +#endif + edit = silent = 0; + } + +#if defined (READLINE) + if (edit) + add_unwind_protect (xfree, rlbuf); +#endif + + pass_next = 0; /* Non-zero signifies last char was backslash. */ + saw_escape = 0; /* Non-zero signifies that we saw an escape char */ + + if (tmsec > 0 || tmusec > 0) + { + /* Turn off the timeout if stdin is a regular file (e.g. from + input redirection). */ + if ((fstat (fd, &tsb) < 0) || S_ISREG (tsb.st_mode)) + tmsec = tmusec = 0; + } + + if (tmsec > 0 || tmusec > 0) + { + code = setjmp_nosigs (alrmbuf); + if (code) + { + sigalrm_seen = 0; + /* Tricky. The top of the unwind-protect stack is the free of + input_string. We want to run all the rest and use input_string, + so we have to save input_string temporarily, run the unwind- + protects, then restore input_string so we can use it later */ + orig_input_string = 0; + input_string[i] = '\0'; /* make sure it's terminated */ + if (i == 0) + { + t = (char *)xmalloc (1); + t[0] = 0; + } + else + t = savestring (input_string); + + run_unwind_frame ("read_builtin"); + input_string = t; + retval = 128+SIGALRM; + goto assign_vars; + } + if (interactive_shell == 0) + initialize_terminating_signals (); + old_alrm = set_signal_handler (SIGALRM, sigalrm); + add_unwind_protect (reset_alarm, (char *)NULL); +#if defined (READLINE) + if (edit) + { + add_unwind_protect (reset_attempted_completion_function, (char *)NULL); + add_unwind_protect (bashline_reset_event_hook, (char *)NULL); + } +#endif + falarm (tmsec, tmusec); + } + + /* If we've been asked to read only NCHARS chars, or we're using some + character other than newline to terminate the line, do the right + thing to readline or the tty. */ + if (nchars > 0 || delim != '\n') + { +#if defined (READLINE) + if (edit) + { + if (nchars > 0) + { + unwind_protect_int (rl_num_chars_to_read); + rl_num_chars_to_read = nchars; + } + if (delim != '\n') + { + set_eol_delim (delim); + add_unwind_protect (reset_eol_delim, (char *)NULL); + } + } + else +#endif + if (input_is_tty) + { + /* ttsave() */ + termsave.fd = fd; + ttgetattr (fd, &ttattrs); + termsave.attrs = ttattrs; + + ttset = ttattrs; + i = silent ? ttfd_cbreak (fd, &ttset) : ttfd_onechar (fd, &ttset); + if (i < 0) + sh_ttyerror (1); + tty_modified = 1; + add_unwind_protect ((Function *)ttyrestore, (char *)&termsave); + if (interactive_shell == 0) + initialize_terminating_signals (); + } + } + else if (silent) /* turn off echo but leave term in canonical mode */ + { + /* ttsave (); */ + termsave.fd = fd; + ttgetattr (fd, &ttattrs); + termsave.attrs = ttattrs; + + ttset = ttattrs; + i = ttfd_noecho (fd, &ttset); /* ttnoecho (); */ + if (i < 0) + sh_ttyerror (1); + + tty_modified = 1; + add_unwind_protect ((Function *)ttyrestore, (char *)&termsave); + if (interactive_shell == 0) + initialize_terminating_signals (); + } + +#if defined (READLINE) + save_instream = 0; + if (edit && fd != 0) + { + if (bash_readline_initialized == 0) + initialize_readline (); + + unwind_protect_var (rl_instream); + save_instream = rl_instream; + rl_instream = fdopen (fd, "r"); + } +#endif + + /* This *must* be the top unwind-protect on the stack, so the manipulation + of the unwind-protect stack after the realloc() works right. */ + add_unwind_protect (xfree, input_string); + + CHECK_ALRM; + if ((nchars > 0) && (input_is_tty == 0) && ignore_delim) /* read -N */ + unbuffered_read = 2; + else if ((nchars > 0) || (delim != '\n') || input_is_pipe) + unbuffered_read = 1; + + if (prompt && edit == 0) + { + fprintf (stderr, "%s", prompt); + fflush (stderr); + } + +#if defined (__CYGWIN__) && defined (O_TEXT) + setmode (0, O_TEXT); +#endif + + ps2 = 0; + for (print_ps2 = eof = retval = 0;;) + { + CHECK_ALRM; + +#if defined (READLINE) + if (edit) + { + /* If we have a null delimiter, don't treat NULL as ending the line */ + if (rlbuf && rlbuf[rlind] == '\0' && delim != '\0') + { + free (rlbuf); + rlbuf = (char *)0; + } + if (rlbuf == 0) + { + reading = 1; + rlbuf = edit_line (prompt ? prompt : "", itext); + reading = 0; + rlind = 0; + } + if (rlbuf == 0) + { + eof = 1; + break; + } + c = rlbuf[rlind++]; + } + else + { +#endif + + if (print_ps2) + { + if (ps2 == 0) + ps2 = get_string_value ("PS2"); + fprintf (stderr, "%s", ps2 ? ps2 : ""); + fflush (stderr); + print_ps2 = 0; + } + + reading = 1; + CHECK_ALRM; + errno = 0; + if (unbuffered_read == 2) + retval = posixly_correct ? zreadintr (fd, &c, 1) : zreadn (fd, &c, nchars - nr); + else if (unbuffered_read) + retval = posixly_correct ? zreadintr (fd, &c, 1) : zread (fd, &c, 1); + else + retval = posixly_correct ? zreadcintr (fd, &c) : zreadc (fd, &c); + reading = 0; + + if (retval <= 0) + { + int t; + + t = errno; + if (retval < 0 && errno == EINTR) + { + check_signals (); /* in case we didn't call zread via zreadc */ + lastsig = LASTSIG(); + if (lastsig == 0) + lastsig = trapped_signal_received; +#if 0 + run_pending_traps (); /* because interrupt_immediately is not set */ +#endif + } + else + lastsig = 0; + if (terminating_signal && tty_modified) + ttyrestore (&termsave); /* fix terminal before exiting */ + CHECK_TERMSIG; + eof = 1; + errno = t; /* preserve it for the error message below */ + break; + } + + QUIT; /* in case we didn't call check_signals() */ +#if defined (READLINE) + } +#endif + + if (retval <= 0) /* XXX shouldn't happen */ + CHECK_ALRM; + + /* XXX -- use i + mb_cur_max (at least 4) for multibyte/read_mbchar */ + if (i + (mb_cur_max > 4 ? mb_cur_max : 4) >= size) + { + char *t; + t = (char *)xrealloc (input_string, size += 128); + + /* Only need to change unwind-protect if input_string changes */ + if (t != input_string) + { + input_string = t; + remove_unwind_protect (); + add_unwind_protect (xfree, input_string); + } + } + + /* If the next character is to be accepted verbatim, a backslash + newline pair still disappears from the input. */ + if (pass_next) + { + pass_next = 0; + if (c == '\n') + { + if (skip_ctlesc == 0 && i > 0) + i--; /* back up over the CTLESC */ + if (interactive && input_is_tty && raw == 0) + print_ps2 = 1; + } + else + goto add_char; + continue; + } + + /* This may cause problems if IFS contains CTLESC */ + if (c == '\\' && raw == 0) + { + pass_next++; + if (skip_ctlesc == 0) + { + saw_escape++; + input_string[i++] = CTLESC; + } + continue; + } + + if (ignore_delim == 0 && (unsigned char)c == delim) + break; + + if (c == '\0' && delim != '\0') + continue; /* skip NUL bytes in input */ + + if ((skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL)) + { + saw_escape++; + input_string[i++] = CTLESC; + } + +add_char: + input_string[i++] = c; + CHECK_ALRM; + +#if defined (HANDLE_MULTIBYTE) + /* XXX - what if C == 127? Can DEL introduce a multibyte sequence? */ + if (mb_cur_max > 1 && is_basic (c) == 0) + { + input_string[i] = '\0'; /* for simplicity and debugging */ + /* If we got input from readline, grab the next multibyte char from + rlbuf. */ +# if defined (READLINE) + if (edit) + { + size_t clen; + clen = mbrlen (rlbuf + rlind - 1, mb_cur_max, (mbstate_t *)NULL); + /* We only deal with valid multibyte sequences longer than one + byte. If we get anything else, we leave the one character + copied and move on to the next. */ + if ((int)clen > 1) + { + memcpy (input_string+i, rlbuf+rlind, clen-1); + i += clen - 1; + rlind += clen - 1; + } + } + else +# endif + if (locale_utf8locale == 0 || ((c & 0x80) != 0)) + i += read_mbchar (fd, input_string, i, c, unbuffered_read); + } +#endif + + nr++; + + if (nchars > 0 && nr >= nchars) + break; + } + input_string[i] = '\0'; + CHECK_ALRM; + +#if defined (READLINE) + if (edit) + free (rlbuf); +#endif + + if (retval < 0) + { + t_errno = errno; + if (errno != EINTR) + builtin_error (_("read error: %d: %s"), fd, strerror (errno)); + run_unwind_frame ("read_builtin"); + return ((t_errno != EINTR) ? EXECUTION_FAILURE : 128+lastsig); + } + + if (tmsec > 0 || tmusec > 0) + reset_alarm (); + + if (nchars > 0 || delim != '\n') + { +#if defined (READLINE) + if (edit) + { + if (nchars > 0) + rl_num_chars_to_read = 0; + if (delim != '\n') + reset_eol_delim ((char *)NULL); + } + else +#endif + if (input_is_tty) + ttyrestore (&termsave); + } + else if (silent) + ttyrestore (&termsave); + + if (unbuffered_read == 0) + zsyncfd (fd); + +#if defined (READLINE) + if (save_instream) + rl_instream = save_instream; /* can't portably free it */ +#endif + + discard_unwind_frame ("read_builtin"); + + retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS; + +assign_vars: + +#if defined (ARRAY_VARS) + /* If -a was given, take the string read, break it into a list of words, + an assign them to `arrayname' in turn. */ + if (arrayname) + { + if (legal_identifier (arrayname) == 0) + { + sh_invalidid (arrayname); + free (input_string); + return (EXECUTION_FAILURE); + } + + var = find_or_make_array_variable (arrayname, 1); + if (var == 0) + { + free (input_string); + return EXECUTION_FAILURE; /* readonly or noassign */ + } + if (assoc_p (var)) + { + builtin_error (_("%s: cannot convert associative to indexed array"), arrayname); + free (input_string); + return EXECUTION_FAILURE; /* existing associative array */ + } + else if (invisible_p (var)) + VUNSETATTR (var, att_invisible); + array_flush (array_cell (var)); + + alist = list_string (input_string, ifs_chars, 0); + if (alist) + { + if (saw_escape) + dequote_list (alist); + else + word_list_remove_quoted_nulls (alist); + assign_array_var_from_word_list (var, alist, 0); + dispose_words (alist); + } + free (input_string); + return (retval); + } +#endif /* ARRAY_VARS */ + + /* If there are no variables, save the text of the line read to the + variable $REPLY. ksh93 strips leading and trailing IFS whitespace, + so that `read x ; echo "$x"' and `read ; echo "$REPLY"' behave the + same way, but I believe that the difference in behaviors is useful + enough to not do it. Without the bash behavior, there is no way + to read a line completely without interpretation or modification + unless you mess with $IFS (e.g., setting it to the empty string). + If you disagree, change the occurrences of `#if 0' to `#if 1' below. */ + if (list == 0) + { +#if 0 + orig_input_string = input_string; + for (t = input_string; ifs_chars && *ifs_chars && spctabnl(*t) && isifs(*t); t++) + ; + input_string = t; + input_string = strip_trailing_ifs_whitespace (input_string, ifs_chars, saw_escape); +#endif + + if (saw_escape) + { + t = dequote_string (input_string); + var = bind_variable ("REPLY", t, 0); + free (t); + } + else + var = bind_variable ("REPLY", input_string, 0); + if (var == 0 || readonly_p (var) || noassign_p (var)) + retval = EXECUTION_FAILURE; + else + VUNSETATTR (var, att_invisible); + + free (input_string); + return (retval); + } + + /* This code implements the Posix.2 spec for splitting the words + read and assigning them to variables. */ + orig_input_string = input_string; + + /* Remove IFS white space at the beginning of the input string. If + $IFS is null, no field splitting is performed. */ + for (t = input_string; ifs_chars && *ifs_chars && spctabnl(*t) && isifs(*t); t++) + ; + input_string = t; + for (; list->next; list = list->next) + { + varname = list->word->word; +#if defined (ARRAY_VARS) + if (legal_identifier (varname) == 0 && valid_array_reference (varname, vflags) == 0) +#else + if (legal_identifier (varname) == 0) +#endif + { + sh_invalidid (varname); + free (orig_input_string); + return (EXECUTION_FAILURE); + } + + /* If there are more variables than words read from the input, + the remaining variables are set to the empty string. */ + if (*input_string) + { + /* This call updates INPUT_STRING. */ + t = get_word_from_string (&input_string, ifs_chars, &e); + if (t) + *e = '\0'; + /* Don't bother to remove the CTLESC unless we added one + somewhere while reading the string. */ + if (t && saw_escape) + { + t1 = dequote_string (t); + var = bind_read_variable (varname, t1); + free (t1); + } + else + var = bind_read_variable (varname, t ? t : ""); + } + else + { + t = (char *)0; + var = bind_read_variable (varname, ""); + } + + FREE (t); + if (var == 0) + { + free (orig_input_string); + return (EXECUTION_FAILURE); + } + + stupidly_hack_special_variables (varname); + VUNSETATTR (var, att_invisible); + } + + /* Now assign the rest of the line to the last variable argument. */ +#if defined (ARRAY_VARS) + if (legal_identifier (list->word->word) == 0 && valid_array_reference (list->word->word, vflags) == 0) +#else + if (legal_identifier (list->word->word) == 0) +#endif + { + sh_invalidid (list->word->word); + free (orig_input_string); + return (EXECUTION_FAILURE); + } + +#if 0 + /* This has to be done this way rather than using string_list + and list_string because Posix.2 says that the last variable gets the + remaining words and their intervening separators. */ + input_string = strip_trailing_ifs_whitespace (input_string, ifs_chars, saw_escape); +#else + /* Check whether or not the number of fields is exactly the same as the + number of variables. */ + tofree = NULL; + if (*input_string) + { + t1 = input_string; + t = get_word_from_string (&input_string, ifs_chars, &e); + if (*input_string == 0) + tofree = input_string = t; + else + { + input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape); + tofree = t; + } + } +#endif + + if (saw_escape && input_string && *input_string) + { + t = dequote_string (input_string); + var = bind_read_variable (list->word->word, t); + free (t); + } + else + var = bind_read_variable (list->word->word, input_string ? input_string : ""); + + if (var) + { + stupidly_hack_special_variables (list->word->word); + VUNSETATTR (var, att_invisible); + } + else + retval = EXECUTION_FAILURE; + + FREE (tofree); + free (orig_input_string); + + return (retval); +} + +static SHELL_VAR * +bind_read_variable (name, value) + char *name, *value; +{ + SHELL_VAR *v; + + v = builtin_bind_variable (name, value, 0); + return (v == 0 ? v + : ((readonly_p (v) || noassign_p (v)) ? (SHELL_VAR *)NULL : v)); +} + +#if defined (HANDLE_MULTIBYTE) +static int +read_mbchar (fd, string, ind, ch, unbuffered) + int fd; + char *string; + int ind, ch, unbuffered; +{ + char mbchar[MB_LEN_MAX + 1]; + int i, n, r; + char c; + size_t ret; + mbstate_t ps, ps_back; + wchar_t wc; + + memset (&ps, '\0', sizeof (mbstate_t)); + memset (&ps_back, '\0', sizeof (mbstate_t)); + + mbchar[0] = ch; + i = 1; + for (n = 0; n <= MB_LEN_MAX; n++) + { + ps_back = ps; + ret = mbrtowc (&wc, mbchar, i, &ps); + if (ret == (size_t)-2) + { + ps = ps_back; + + /* We don't want to be interrupted during a multibyte char read */ + if (unbuffered == 2) + r = zreadn (fd, &c, 1); + else if (unbuffered) + r = zread (fd, &c, 1); + else + r = zreadc (fd, &c); + if (r <= 0) + goto mbchar_return; + mbchar[i++] = c; + continue; + } + else if (ret == (size_t)-1 || ret == (size_t)0 || ret > (size_t)0) + break; + } + +mbchar_return: + if (i > 1) /* read a multibyte char */ + /* mbchar[0] is already string[ind-1] */ + for (r = 1; r < i; r++) + string[ind+r-1] = mbchar[r]; + return i - 1; +} +#endif + + +static void +ttyrestore (ttp) + struct ttsave *ttp; +{ + ttsetattr (ttp->fd, &(ttp->attrs)); + tty_modified = 0; +} + +void +read_tty_cleanup () +{ + if (tty_modified) + ttyrestore (&termsave); +} + +int +read_tty_modified () +{ + return (tty_modified); +} + +#if defined (READLINE) +static rl_completion_func_t *old_attempted_completion_function = 0; +static rl_hook_func_t *old_startup_hook; +static char *deftext; + +static void +reset_attempted_completion_function (cp) + char *cp; +{ + if (rl_attempted_completion_function == 0 && old_attempted_completion_function) + rl_attempted_completion_function = old_attempted_completion_function; +} + +static int +set_itext () +{ + int r1, r2; + + r1 = r2 = 0; + if (old_startup_hook) + r1 = (*old_startup_hook) (); + if (deftext) + { + r2 = rl_insert_text (deftext); + deftext = (char *)NULL; + rl_startup_hook = old_startup_hook; + old_startup_hook = (rl_hook_func_t *)NULL; + } + return (r1 || r2); +} + +static char * +edit_line (p, itext) + char *p; + char *itext; +{ + char *ret; + int len; + + if (bash_readline_initialized == 0) + initialize_readline (); + + old_attempted_completion_function = rl_attempted_completion_function; + rl_attempted_completion_function = (rl_completion_func_t *)NULL; + bashline_set_event_hook (); + if (itext) + { + old_startup_hook = rl_startup_hook; + rl_startup_hook = set_itext; + deftext = itext; + } + + ret = readline (p); + + rl_attempted_completion_function = old_attempted_completion_function; + old_attempted_completion_function = (rl_completion_func_t *)NULL; + bashline_reset_event_hook (); + + if (ret == 0) + return ret; + len = strlen (ret); + ret = (char *)xrealloc (ret, len + 2); + ret[len++] = delim; + ret[len] = '\0'; + return ret; +} + +static int old_delim_ctype; +static rl_command_func_t *old_delim_func; +static int old_newline_ctype; +static rl_command_func_t *old_newline_func; + +static unsigned char delim_char; + +static void +set_eol_delim (c) + int c; +{ + Keymap cmap; + + if (bash_readline_initialized == 0) + initialize_readline (); + cmap = rl_get_keymap (); + + /* Save the old delimiter char binding */ + old_newline_ctype = cmap[RETURN].type; + old_newline_func = cmap[RETURN].function; + old_delim_ctype = cmap[c].type; + old_delim_func = cmap[c].function; + + /* Change newline to self-insert */ + cmap[RETURN].type = ISFUNC; + cmap[RETURN].function = rl_insert; + + /* Bind the delimiter character to accept-line. */ + cmap[c].type = ISFUNC; + cmap[c].function = rl_newline; + + delim_char = c; +} + +static void +reset_eol_delim (cp) + char *cp; +{ + Keymap cmap; + + cmap = rl_get_keymap (); + + cmap[RETURN].type = old_newline_ctype; + cmap[RETURN].function = old_newline_func; + + cmap[delim_char].type = old_delim_ctype; + cmap[delim_char].function = old_delim_func; +} +#endif diff --git a/bash-5.1/builtins_org/reserved.def b/bash-5.1/builtins_org/reserved.def new file mode 100644 index 0000000000000000000000000000000000000000..33184b0291f07b3914798fad8ae5341fe3469ae3 --- /dev/null +++ b/bash-5.1/builtins_org/reserved.def @@ -0,0 +1,288 @@ +This file is reserved.def, in which the shell reserved words are defined. +It has no direct C file production, but defines builtins for the Bash +builtin help command. + +Copyright (C) 1987-2019 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$BUILTIN for +$SHORT_DOC for NAME [in WORDS ... ] ; do COMMANDS; done +Execute commands for each member in a list. + +The `for' loop executes a sequence of commands for each member in a +list of items. If `in WORDS ...;' is not present, then `in "$@"' is +assumed. For each element in WORDS, NAME is set to that element, and +the COMMANDS are executed. + +Exit Status: +Returns the status of the last command executed. +$END + +$BUILTIN for (( +$DOCNAME arith_for +$SHORT_DOC for (( exp1; exp2; exp3 )); do COMMANDS; done +Arithmetic for loop. + +Equivalent to + (( EXP1 )) + while (( EXP2 )); do + COMMANDS + (( EXP3 )) + done +EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is +omitted, it behaves as if it evaluates to 1. + +Exit Status: +Returns the status of the last command executed. +$END + +$BUILTIN select +$SHORT_DOC select NAME [in WORDS ... ;] do COMMANDS; done +Select words from a list and execute commands. + +The WORDS are expanded, generating a list of words. The +set of expanded words is printed on the standard error, each +preceded by a number. If `in WORDS' is not present, `in "$@"' +is assumed. The PS3 prompt is then displayed and a line read +from the standard input. If the line consists of the number +corresponding to one of the displayed words, then NAME is set +to that word. If the line is empty, WORDS and the prompt are +redisplayed. If EOF is read, the command completes. Any other +value read causes NAME to be set to null. The line read is saved +in the variable REPLY. COMMANDS are executed after each selection +until a break command is executed. + +Exit Status: +Returns the status of the last command executed. +$END + +$BUILTIN time +$SHORT_DOC time [-p] pipeline +Report time consumed by pipeline's execution. + +Execute PIPELINE and print a summary of the real time, user CPU time, +and system CPU time spent executing PIPELINE when it terminates. + +Options: + -p print the timing summary in the portable Posix format + +The value of the TIMEFORMAT variable is used as the output format. + +Exit Status: +The return status is the return status of PIPELINE. +$END + +$BUILTIN case +$SHORT_DOC case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac +Execute commands based on pattern matching. + +Selectively execute COMMANDS based upon WORD matching PATTERN. The +`|' is used to separate multiple patterns. + +Exit Status: +Returns the status of the last command executed. +$END + +$BUILTIN if +$SHORT_DOC if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi +Execute commands based on conditional. + +The `if COMMANDS' list is executed. If its exit status is zero, then the +`then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list is +executed in turn, and if its exit status is zero, the corresponding +`then COMMANDS' list is executed and the if command completes. Otherwise, +the `else COMMANDS' list is executed, if present. The exit status of the +entire construct is the exit status of the last command executed, or zero +if no condition tested true. + +Exit Status: +Returns the status of the last command executed. +$END + +$BUILTIN while +$SHORT_DOC while COMMANDS; do COMMANDS; done +Execute commands as long as a test succeeds. + +Expand and execute COMMANDS as long as the final command in the +`while' COMMANDS has an exit status of zero. + +Exit Status: +Returns the status of the last command executed. +$END + +$BUILTIN until +$SHORT_DOC until COMMANDS; do COMMANDS; done +Execute commands as long as a test does not succeed. + +Expand and execute COMMANDS as long as the final command in the +`until' COMMANDS has an exit status which is not zero. + +Exit Status: +Returns the status of the last command executed. +$END + +$BUILTIN coproc +$SHORT_DOC coproc [NAME] command [redirections] +Create a coprocess named NAME. + +Execute COMMAND asynchronously, with the standard output and standard +input of the command connected via a pipe to file descriptors assigned +to indices 0 and 1 of an array variable NAME in the executing shell. +The default NAME is "COPROC". + +Exit Status: +The coproc command returns an exit status of 0. +$END + +$BUILTIN function +$SHORT_DOC function name { COMMANDS ; } or name () { COMMANDS ; } +Define shell function. + +Create a shell function named NAME. When invoked as a simple command, +NAME runs COMMANDs in the calling shell's context. When NAME is invoked, +the arguments are passed to the function as $1...$n, and the function's +name is in $FUNCNAME. + +Exit Status: +Returns success unless NAME is readonly. +$END + +$BUILTIN { ... } +$DOCNAME grouping_braces +$SHORT_DOC { COMMANDS ; } +Group commands as a unit. + +Run a set of commands in a group. This is one way to redirect an +entire set of commands. + +Exit Status: +Returns the status of the last command executed. +$END + +$BUILTIN % +$DOCNAME fg_percent +$SHORT_DOC job_spec [&] +Resume job in foreground. + +Equivalent to the JOB_SPEC argument to the `fg' command. Resume a +stopped or background job. JOB_SPEC can specify either a job name +or a job number. Following JOB_SPEC with a `&' places the job in +the background, as if the job specification had been supplied as an +argument to `bg'. + +Exit Status: +Returns the status of the resumed job. +$END + +$BUILTIN (( ... )) +$DOCNAME arith +$SHORT_DOC (( expression )) +Evaluate arithmetic expression. + +The EXPRESSION is evaluated according to the rules for arithmetic +evaluation. Equivalent to `let "EXPRESSION"'. + +Exit Status: +Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise. +$END + +$BUILTIN [[ ... ]] +$DOCNAME conditional +$SHORT_DOC [[ expression ]] +Execute conditional command. + +Returns a status of 0 or 1 depending on the evaluation of the conditional +expression EXPRESSION. Expressions are composed of the same primaries used +by the `test' builtin, and may be combined using the following operators: + + ( EXPRESSION ) Returns the value of EXPRESSION + ! EXPRESSION True if EXPRESSION is false; else false + EXPR1 && EXPR2 True if both EXPR1 and EXPR2 are true; else false + EXPR1 || EXPR2 True if either EXPR1 or EXPR2 is true; else false + +When the `==' and `!=' operators are used, the string to the right of +the operator is used as a pattern and pattern matching is performed. +When the `=~' operator is used, the string to the right of the operator +is matched as a regular expression. + +The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to +determine the expression's value. + +Exit Status: +0 or 1 depending on value of EXPRESSION. +$END + +$BUILTIN variables +$DOCNAME variable_help +$SHORT_DOC variables - Names and meanings of some shell variables +Common shell variable names and usage. + +BASH_VERSION Version information for this Bash. +CDPATH A colon-separated list of directories to search + for directories given as arguments to `cd'. +GLOBIGNORE A colon-separated list of patterns describing filenames to + be ignored by pathname expansion. +#if defined (HISTORY) +HISTFILE The name of the file where your command history is stored. +HISTFILESIZE The maximum number of lines this file can contain. +HISTSIZE The maximum number of history lines that a running + shell can access. +#endif /* HISTORY */ +HOME The complete pathname to your login directory. +HOSTNAME The name of the current host. +HOSTTYPE The type of CPU this version of Bash is running under. +IGNOREEOF Controls the action of the shell on receipt of an EOF + character as the sole input. If set, then the value + of it is the number of EOF characters that can be seen + in a row on an empty line before the shell will exit + (default 10). When unset, EOF signifies the end of input. +MACHTYPE A string describing the current system Bash is running on. +MAILCHECK How often, in seconds, Bash checks for new mail. +MAILPATH A colon-separated list of filenames which Bash checks + for new mail. +OSTYPE The version of Unix this version of Bash is running on. +PATH A colon-separated list of directories to search when + looking for commands. +PROMPT_COMMAND A command to be executed before the printing of each + primary prompt. +PS1 The primary prompt string. +PS2 The secondary prompt string. +PWD The full pathname of the current directory. +SHELLOPTS A colon-separated list of enabled shell options. +TERM The name of the current terminal type. +TIMEFORMAT The output format for timing statistics displayed by the + `time' reserved word. +auto_resume Non-null means a command word appearing on a line by + itself is first looked for in the list of currently + stopped jobs. If found there, that job is foregrounded. + A value of `exact' means that the command word must + exactly match a command in the list of stopped jobs. A + value of `substring' means that the command word must + match a substring of the job. Any other value means that + the command must be a prefix of a stopped job. +#if defined (HISTORY) +# if defined (BANG_HISTORY) +histchars Characters controlling history expansion and quick + substitution. The first character is the history + substitution character, usually `!'. The second is + the `quick substitution' character, usually `^'. The + third is the `history comment' character, usually `#'. +# endif /* BANG_HISTORY */ +HISTIGNORE A colon-separated list of patterns used to decide which + commands should be saved on the history list. +#endif /* HISTORY */ +$END diff --git a/bash-5.1/builtins_org/return.def b/bash-5.1/builtins_org/return.def new file mode 100644 index 0000000000000000000000000000000000000000..03c98eb11a5d4aabe237b0156d7569a458b53978 --- /dev/null +++ b/bash-5.1/builtins_org/return.def @@ -0,0 +1,71 @@ +This file is return.def, from which is created return.c. +It implements the builtin "return" in Bash. + +Copyright (C) 1987-2015 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES return.c + +$BUILTIN return + +$FUNCTION return_builtin +$SHORT_DOC return [n] +Return from a shell function. + +Causes a function or sourced script to exit with the return value +specified by N. If N is omitted, the return status is that of the +last command executed within the function or script. + +Exit Status: +Returns N, or failure if the shell is not executing a function or script. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "common.h" +#include "bashgetopt.h" + +/* If we are executing a user-defined function then exit with the value + specified as an argument. if no argument is given, then the last + exit status is used. */ +int +return_builtin (list) + WORD_LIST *list; +{ + CHECK_HELPOPT (list); + + return_catch_value = get_exitstat (list); + + if (return_catch_flag) + sh_longjmp (return_catch, 1); + else + { + builtin_error (_("can only `return' from a function or sourced script")); + return (EX_USAGE); + } +} diff --git a/bash-5.1/builtins_org/set.def b/bash-5.1/builtins_org/set.def new file mode 100644 index 0000000000000000000000000000000000000000..8ee01657925c128908e56a7025efaa6914757f16 --- /dev/null +++ b/bash-5.1/builtins_org/set.def @@ -0,0 +1,1018 @@ +This file is set.def, from which is created set.c. +It implements the "set" and "unset" builtins in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES set.c + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../parser.h" +#include "../flags.h" +#include "common.h" +#include "bashgetopt.h" + +#if defined (READLINE) +# include "../input.h" +# include "../bashline.h" +# include +#endif + +#if defined (HISTORY) +# include "../bashhist.h" +#endif + +$BUILTIN set +$FUNCTION set_builtin +$SHORT_DOC set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] +Set or unset values of shell options and positional parameters. + +Change the value of shell attributes and positional parameters, or +display the names and values of shell variables. + +Options: + -a Mark variables which are modified or created for export. + -b Notify of job termination immediately. + -e Exit immediately if a command exits with a non-zero status. + -f Disable file name generation (globbing). + -h Remember the location of commands as they are looked up. + -k All assignment arguments are placed in the environment for a + command, not just those that precede the command name. + -m Job control is enabled. + -n Read commands but do not execute them. + -o option-name + Set the variable corresponding to option-name: + allexport same as -a + braceexpand same as -B +#if defined (READLINE) + emacs use an emacs-style line editing interface +#endif /* READLINE */ + errexit same as -e + errtrace same as -E + functrace same as -T + hashall same as -h +#if defined (BANG_HISTORY) + histexpand same as -H +#endif /* BANG_HISTORY */ +#if defined (HISTORY) + history enable command history +#endif + ignoreeof the shell will not exit upon reading EOF + interactive-comments + allow comments to appear in interactive commands + keyword same as -k +#if defined (JOB_CONTROL) + monitor same as -m +#endif + noclobber same as -C + noexec same as -n + noglob same as -f + nolog currently accepted but ignored +#if defined (JOB_CONTROL) + notify same as -b +#endif + nounset same as -u + onecmd same as -t + physical same as -P + pipefail the return value of a pipeline is the status of + the last command to exit with a non-zero status, + or zero if no command exited with a non-zero status + posix change the behavior of bash where the default + operation differs from the Posix standard to + match the standard + privileged same as -p + verbose same as -v +#if defined (READLINE) + vi use a vi-style line editing interface +#endif /* READLINE */ + xtrace same as -x + -p Turned on whenever the real and effective user ids do not match. + Disables processing of the $ENV file and importing of shell + functions. Turning this option off causes the effective uid and + gid to be set to the real uid and gid. + -t Exit after reading and executing one command. + -u Treat unset variables as an error when substituting. + -v Print shell input lines as they are read. + -x Print commands and their arguments as they are executed. +#if defined (BRACE_EXPANSION) + -B the shell will perform brace expansion +#endif /* BRACE_EXPANSION */ + -C If set, disallow existing regular files to be overwritten + by redirection of output. + -E If set, the ERR trap is inherited by shell functions. +#if defined (BANG_HISTORY) + -H Enable ! style history substitution. This flag is on + by default when the shell is interactive. +#endif /* BANG_HISTORY */ + -P If set, do not resolve symbolic links when executing commands + such as cd which change the current directory. + -T If set, the DEBUG and RETURN traps are inherited by shell functions. + -- Assign any remaining arguments to the positional parameters. + If there are no remaining arguments, the positional parameters + are unset. + - Assign any remaining arguments to the positional parameters. + The -x and -v options are turned off. + +Using + rather than - causes these flags to be turned off. The +flags can also be used upon invocation of the shell. The current +set of flags may be found in $-. The remaining n ARGs are positional +parameters and are assigned, in order, to $1, $2, .. $n. If no +ARGs are given, all shell variables are printed. + +Exit Status: +Returns success unless an invalid option is given. +$END + +typedef int setopt_set_func_t PARAMS((int, char *)); +typedef int setopt_get_func_t PARAMS((char *)); + +static int find_minus_o_option PARAMS((char *)); + +static void print_minus_o_option PARAMS((char *, int, int)); +static void print_all_shell_variables PARAMS((void)); + +static int set_ignoreeof PARAMS((int, char *)); +static int set_posix_mode PARAMS((int, char *)); + +#if defined (READLINE) +static int set_edit_mode PARAMS((int, char *)); +static int get_edit_mode PARAMS((char *)); +#endif + +#if defined (HISTORY) +static int bash_set_history PARAMS((int, char *)); +#endif + +static const char * const on = "on"; +static const char * const off = "off"; + +static int previous_option_value; + +/* A struct used to match long options for set -o to the corresponding + option letter or internal variable. The functions can be called to + dynamically generate values. If you add a new variable name here + that doesn't have a corresponding single-character option letter, make + sure to set the value appropriately in reset_shell_options. */ +const struct { + char *name; + int letter; + int *variable; + setopt_set_func_t *set_func; + setopt_get_func_t *get_func; +} o_options[] = { + { "allexport", 'a', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#if defined (BRACE_EXPANSION) + { "braceexpand",'B', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#endif +#if defined (READLINE) + { "emacs", '\0', (int *)NULL, set_edit_mode, get_edit_mode }, +#endif + { "errexit", 'e', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "errtrace", 'E', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "functrace", 'T', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "hashall", 'h', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#if defined (BANG_HISTORY) + { "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#endif /* BANG_HISTORY */ +#if defined (HISTORY) + { "history", '\0', &enable_history_list, bash_set_history, (setopt_get_func_t *)NULL }, +#endif + { "ignoreeof", '\0', &ignoreeof, set_ignoreeof, (setopt_get_func_t *)NULL }, + { "interactive-comments", '\0', &interactive_comments, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "keyword", 'k', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#if defined (JOB_CONTROL) + { "monitor", 'm', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#endif + { "noclobber", 'C', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "noexec", 'n', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "noglob", 'f', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#if defined (HISTORY) + { "nolog", '\0', &dont_save_function_defs, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#endif +#if defined (JOB_CONTROL) + { "notify", 'b', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#endif /* JOB_CONTROL */ + { "nounset", 'u', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "onecmd", 't', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "physical", 'P', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "pipefail", '\0', &pipefail_opt, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "posix", '\0', &posixly_correct, set_posix_mode, (setopt_get_func_t *)NULL }, + { "privileged", 'p', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "verbose", 'v', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#if defined (READLINE) + { "vi", '\0', (int *)NULL, set_edit_mode, get_edit_mode }, +#endif + { "xtrace", 'x', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + {(char *)NULL, 0 , (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +}; + +#define N_O_OPTIONS (sizeof (o_options) / sizeof (o_options[0])) + +#define GET_BINARY_O_OPTION_VALUE(i, name) \ + ((o_options[i].get_func) ? (*o_options[i].get_func) (name) \ + : (*o_options[i].variable)) + +#define SET_BINARY_O_OPTION_VALUE(i, onoff, name) \ + ((o_options[i].set_func) ? (*o_options[i].set_func) (onoff, name) \ + : (*o_options[i].variable = (onoff == FLAG_ON))) + +static int +find_minus_o_option (name) + char *name; +{ + register int i; + + for (i = 0; o_options[i].name; i++) + if (STREQ (name, o_options[i].name)) + return i; + return -1; +} + +int +minus_o_option_value (name) + char *name; +{ + register int i; + int *on_or_off; + + i = find_minus_o_option (name); + if (i < 0) + return (-1); + + if (o_options[i].letter) + { + on_or_off = find_flag (o_options[i].letter); + return ((on_or_off == FLAG_UNKNOWN) ? -1 : *on_or_off); + } + else + return (GET_BINARY_O_OPTION_VALUE (i, name)); +} + +#define MINUS_O_FORMAT "%-15s\t%s\n" + +static void +print_minus_o_option (name, value, pflag) + char *name; + int value, pflag; +{ + if (pflag == 0) + printf (MINUS_O_FORMAT, name, value ? on : off); + else + printf ("set %co %s\n", value ? '-' : '+', name); +} + +void +list_minus_o_opts (mode, reusable) + int mode, reusable; +{ + register int i; + int *on_or_off, value; + + for (i = 0; o_options[i].name; i++) + { + if (o_options[i].letter) + { + value = 0; + on_or_off = find_flag (o_options[i].letter); + if (on_or_off == FLAG_UNKNOWN) + on_or_off = &value; + if (mode == -1 || mode == *on_or_off) + print_minus_o_option (o_options[i].name, *on_or_off, reusable); + } + else + { + value = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); + if (mode == -1 || mode == value) + print_minus_o_option (o_options[i].name, value, reusable); + } + } +} + +char ** +get_minus_o_opts () +{ + char **ret; + int i; + + ret = strvec_create (N_O_OPTIONS + 1); + for (i = 0; o_options[i].name; i++) + ret[i] = o_options[i].name; + ret[i] = (char *)NULL; + return ret; +} + +char * +get_current_options () +{ + char *temp; + int i, posixopts; + + posixopts = num_posix_options (); /* shopts modified by posix mode */ + /* Make the buffer big enough to hold the set -o options and the shopt + options modified by posix mode. */ + temp = (char *)xmalloc (1 + N_O_OPTIONS + posixopts); + for (i = 0; o_options[i].name; i++) + { + if (o_options[i].letter) + temp[i] = *(find_flag (o_options[i].letter)); + else + temp[i] = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); + } + + /* Add the shell options that are modified by posix mode to the end of the + bitmap. They will be handled in set_current_options() */ + get_posix_options (temp+i); + temp[i+posixopts] = '\0'; + return (temp); +} + +void +set_current_options (bitmap) + const char *bitmap; +{ + int i, v, cv, *on_or_off; + + if (bitmap == 0) + return; + + for (i = 0; o_options[i].name; i++) + { + v = bitmap[i] ? FLAG_ON : FLAG_OFF; + if (o_options[i].letter) + { + /* We should not get FLAG_UNKNOWN here */ + on_or_off = find_flag (o_options[i].letter); + cv = *on_or_off ? FLAG_ON : FLAG_OFF; + if (v != cv) + change_flag (o_options[i].letter, v); + } + else + { + cv = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); + cv = cv ? FLAG_ON : FLAG_OFF; + if (v != cv) + SET_BINARY_O_OPTION_VALUE (i, v, o_options[i].name); + } + } + + /* Now reset the variables changed by posix mode */ + set_posix_options (bitmap+i); +} + +static int +set_ignoreeof (on_or_off, option_name) + int on_or_off; + char *option_name; +{ + ignoreeof = on_or_off == FLAG_ON; + unbind_variable_noref ("ignoreeof"); + if (ignoreeof) + bind_variable ("IGNOREEOF", "10", 0); + else + unbind_variable_noref ("IGNOREEOF"); + sv_ignoreeof ("IGNOREEOF"); + return 0; +} + +static int +set_posix_mode (on_or_off, option_name) + int on_or_off; + char *option_name; +{ + /* short-circuit on no-op */ + if ((on_or_off == FLAG_ON && posixly_correct) || + (on_or_off == FLAG_OFF && posixly_correct == 0)) + return 0; + + posixly_correct = on_or_off == FLAG_ON; + if (posixly_correct == 0) + unbind_variable_noref ("POSIXLY_CORRECT"); + else + bind_variable ("POSIXLY_CORRECT", "y", 0); + sv_strict_posix ("POSIXLY_CORRECT"); + return (0); +} + +#if defined (READLINE) +/* Magic. This code `knows' how readline handles rl_editing_mode. */ +static int +set_edit_mode (on_or_off, option_name) + int on_or_off; + char *option_name; +{ + int isemacs; + + if (on_or_off == FLAG_ON) + { + rl_variable_bind ("editing-mode", option_name); + + if (interactive) + with_input_from_stdin (); + no_line_editing = 0; + } + else + { + isemacs = rl_editing_mode == 1; + if ((isemacs && *option_name == 'e') || (!isemacs && *option_name == 'v')) + { + if (interactive) + with_input_from_stream (stdin, "stdin"); + no_line_editing = 1; + } + } + return 1-no_line_editing; +} + +static int +get_edit_mode (name) + char *name; +{ + return (*name == 'e' ? no_line_editing == 0 && rl_editing_mode == 1 + : no_line_editing == 0 && rl_editing_mode == 0); +} +#endif /* READLINE */ + +#if defined (HISTORY) +static int +bash_set_history (on_or_off, option_name) + int on_or_off; + char *option_name; +{ + if (on_or_off == FLAG_ON) + { + enable_history_list = 1; + bash_history_enable (); + if (history_lines_this_session == 0) + load_history (); + } + else + { + enable_history_list = 0; + bash_history_disable (); + } + return (1 - enable_history_list); +} +#endif + +int +set_minus_o_option (on_or_off, option_name) + int on_or_off; + char *option_name; +{ + register int i; + + i = find_minus_o_option (option_name); + if (i < 0) + { + sh_invalidoptname (option_name); + return (EX_USAGE); + } + + if (o_options[i].letter == 0) + { + previous_option_value = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); + SET_BINARY_O_OPTION_VALUE (i, on_or_off, option_name); + return (EXECUTION_SUCCESS); + } + else + { + if ((previous_option_value = change_flag (o_options[i].letter, on_or_off)) == FLAG_ERROR) + { + sh_invalidoptname (option_name); + return (EXECUTION_FAILURE); + } + else + return (EXECUTION_SUCCESS); + } +} + +static void +print_all_shell_variables () +{ + SHELL_VAR **vars; + + vars = all_shell_variables (); + if (vars) + { + print_var_list (vars); + free (vars); + } + + /* POSIX.2 does not allow function names and definitions to be output when + `set' is invoked without options (PASC Interp #202). */ + if (posixly_correct == 0) + { + vars = all_shell_functions (); + if (vars) + { + print_func_list (vars); + free (vars); + } + } +} + +void +set_shellopts () +{ + char *value; + char tflag[N_O_OPTIONS]; + int vsize, i, vptr, *ip, exported; + SHELL_VAR *v; + + for (vsize = i = 0; o_options[i].name; i++) + { + tflag[i] = 0; + if (o_options[i].letter) + { + ip = find_flag (o_options[i].letter); + if (ip && *ip) + { + vsize += strlen (o_options[i].name) + 1; + tflag[i] = 1; + } + } + else if (GET_BINARY_O_OPTION_VALUE (i, o_options[i].name)) + { + vsize += strlen (o_options[i].name) + 1; + tflag[i] = 1; + } + } + + value = (char *)xmalloc (vsize + 1); + + for (i = vptr = 0; o_options[i].name; i++) + { + if (tflag[i]) + { + strcpy (value + vptr, o_options[i].name); + vptr += strlen (o_options[i].name); + value[vptr++] = ':'; + } + } + + if (vptr) + vptr--; /* cut off trailing colon */ + value[vptr] = '\0'; + + v = find_variable ("SHELLOPTS"); + + /* Turn off the read-only attribute so we can bind the new value, and + note whether or not the variable was exported. */ + if (v) + { + VUNSETATTR (v, att_readonly); + exported = exported_p (v); + } + else + exported = 0; + + v = bind_variable ("SHELLOPTS", value, 0); + + /* Turn the read-only attribute back on, and turn off the export attribute + if it was set implicitly by mark_modified_vars and SHELLOPTS was not + exported before we bound the new value. */ + VSETATTR (v, att_readonly); + if (mark_modified_vars && exported == 0 && exported_p (v)) + VUNSETATTR (v, att_exported); + + free (value); +} + +void +parse_shellopts (value) + char *value; +{ + char *vname; + int vptr; + + vptr = 0; + while (vname = extract_colon_unit (value, &vptr)) + { + set_minus_o_option (FLAG_ON, vname); + free (vname); + } +} + +void +initialize_shell_options (no_shellopts) + int no_shellopts; +{ + char *temp; + SHELL_VAR *var; + + if (no_shellopts == 0) + { + var = find_variable ("SHELLOPTS"); + /* set up any shell options we may have inherited. */ + if (var && imported_p (var)) + { + temp = (array_p (var) || assoc_p (var)) ? (char *)NULL : savestring (value_cell (var)); + if (temp) + { + parse_shellopts (temp); + free (temp); + } + } + } + + /* Set up the $SHELLOPTS variable. */ + set_shellopts (); +} + +/* Reset the values of the -o options that are not also shell flags. This is + called from execute_cmd.c:initialize_subshell() when setting up a subshell + to run an executable shell script without a leading `#!'. */ +void +reset_shell_options () +{ + pipefail_opt = 0; + ignoreeof = 0; + +#if defined (STRICT_POSIX) + posixly_correct = 1; +#else + posixly_correct = 0; +#endif +#if defined (HISTORY) + dont_save_function_defs = 0; + remember_on_history = enable_history_list = 1; /* XXX */ +#endif +} + +/* Set some flags from the word values in the input list. If LIST is empty, + then print out the values of the variables instead. If LIST contains + non-flags, then set $1 - $9 to the successive words of LIST. */ +int +set_builtin (list) + WORD_LIST *list; +{ + int on_or_off, flag_name, force_assignment, opts_changed, rv, r; + register char *arg; + char s[3]; + + if (list == 0) + { + print_all_shell_variables (); + return (sh_chkwrite (EXECUTION_SUCCESS)); + } + + /* Check validity of flag arguments. */ + rv = EXECUTION_SUCCESS; + reset_internal_getopt (); + while ((flag_name = internal_getopt (list, optflags)) != -1) + { + switch (flag_name) + { + case 'i': /* don't allow set -i */ + s[0] = list_opttype; + s[1] = 'i'; + s[2] = '\0'; + sh_invalidopt (s); + builtin_usage (); + return (EX_USAGE); + CASE_HELPOPT; + case '?': + builtin_usage (); + return (list_optopt == '?' ? EXECUTION_SUCCESS : EX_USAGE); + default: + break; + } + } + + /* Do the set command. While the list consists of words starting with + '-' or '+' treat them as flags, otherwise, start assigning them to + $1 ... $n. */ + for (force_assignment = opts_changed = 0; list; ) + { + arg = list->word->word; + + /* If the argument is `--' or `-' then signal the end of the list + and remember the remaining arguments. */ + if (arg[0] == '-' && (!arg[1] || (arg[1] == '-' && !arg[2]))) + { + list = list->next; + + /* `set --' unsets the positional parameters. */ + if (arg[1] == '-') + force_assignment = 1; + + /* Until told differently, the old shell behaviour of + `set - [arg ...]' being equivalent to `set +xv [arg ...]' + stands. Posix.2 says the behaviour is marked as obsolescent. */ + else + { + change_flag ('x', '+'); + change_flag ('v', '+'); + opts_changed = 1; + } + + break; + } + + if ((on_or_off = *arg) && (on_or_off == '-' || on_or_off == '+')) + { + while (flag_name = *++arg) + { + if (flag_name == '?') + { + builtin_usage (); + return (EXECUTION_SUCCESS); + } + else if (flag_name == 'o') /* -+o option-name */ + { + char *option_name; + WORD_LIST *opt; + + opt = list->next; + + if (opt == 0) + { + list_minus_o_opts (-1, (on_or_off == '+')); + rv = sh_chkwrite (rv); + continue; + } + + option_name = opt->word->word; + + if (option_name == 0 || *option_name == '\0' || + *option_name == '-' || *option_name == '+') + { + list_minus_o_opts (-1, (on_or_off == '+')); + continue; + } + list = list->next; /* Skip over option name. */ + + opts_changed = 1; + if ((r = set_minus_o_option (on_or_off, option_name)) != EXECUTION_SUCCESS) + { + set_shellopts (); + return (r); + } + } + else if (change_flag (flag_name, on_or_off) == FLAG_ERROR) + { + s[0] = on_or_off; + s[1] = flag_name; + s[2] = '\0'; + sh_invalidopt (s); + builtin_usage (); + set_shellopts (); + return (EXECUTION_FAILURE); + } + opts_changed = 1; + } + } + else + { + break; + } + list = list->next; + } + + /* Assigning $1 ... $n */ + if (list || force_assignment) + remember_args (list, 1); + /* Set up new value of $SHELLOPTS */ + if (opts_changed) + set_shellopts (); + return (rv); +} + +$BUILTIN unset +$FUNCTION unset_builtin +$SHORT_DOC unset [-f] [-v] [-n] [name ...] +Unset values and attributes of shell variables and functions. + +For each NAME, remove the corresponding variable or function. + +Options: + -f treat each NAME as a shell function + -v treat each NAME as a shell variable + -n treat each NAME as a name reference and unset the variable itself + rather than the variable it references + +Without options, unset first tries to unset a variable, and if that fails, +tries to unset a function. + +Some variables cannot be unset; also see `readonly'. + +Exit Status: +Returns success unless an invalid option is given or a NAME is read-only. +$END + +#define NEXT_VARIABLE() any_failed++; list = list->next; continue; + +int +unset_builtin (list) + WORD_LIST *list; +{ + int unset_function, unset_variable, unset_array, opt, nameref, any_failed; + int global_unset_func, global_unset_var, vflags, valid_id; + char *name, *tname; + + unset_function = unset_variable = unset_array = nameref = any_failed = 0; + global_unset_func = global_unset_var = 0; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "fnv")) != -1) + { + switch (opt) + { + case 'f': + global_unset_func = 1; + break; + case 'v': + global_unset_var = 1; + break; + case 'n': + nameref = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + if (global_unset_func && global_unset_var) + { + builtin_error (_("cannot simultaneously unset a function and a variable")); + return (EXECUTION_FAILURE); + } + else if (unset_function && nameref) + nameref = 0; + +#if defined (ARRAY_VARS) + vflags = assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0; +#endif + + while (list) + { + SHELL_VAR *var; + int tem; +#if defined (ARRAY_VARS) + char *t; +#endif + + name = list->word->word; + + unset_function = global_unset_func; + unset_variable = global_unset_var; + +#if defined (ARRAY_VARS) + unset_array = 0; + /* XXX valid array reference second arg was 0 */ + if (!unset_function && nameref == 0 && valid_array_reference (name, vflags)) + { + t = strchr (name, '['); + *t++ = '\0'; + unset_array++; + } +#endif + /* Get error checking out of the way first. The low-level functions + just perform the unset, relying on the caller to verify. */ + valid_id = legal_identifier (name); + + /* Whether or not we are in posix mode, if neither -f nor -v appears, + skip over trying to unset variables with invalid names and just + treat them as potential shell function names. */ + if (global_unset_func == 0 && global_unset_var == 0 && valid_id == 0) + { + unset_variable = unset_array = 0; + unset_function = 1; + } + + /* Bash allows functions with names which are not valid identifiers + to be created when not in posix mode, so check only when in posix + mode when unsetting a function. */ + if (unset_function == 0 && valid_id == 0) + { + sh_invalidid (name); + NEXT_VARIABLE (); + } + + /* Search for functions here if -f supplied or if NAME cannot be a + variable name. */ + var = unset_function ? find_function (name) + : (nameref ? find_variable_last_nameref (name, 0) : find_variable (name)); + + /* Some variables (but not functions yet) cannot be unset, period. */ + if (var && unset_function == 0 && non_unsettable_p (var)) + { + builtin_error (_("%s: cannot unset"), name); + NEXT_VARIABLE (); + } + + /* if we have a nameref we want to use it */ + if (var && unset_function == 0 && nameref == 0 && STREQ (name, name_cell(var)) == 0) + name = name_cell (var); + + /* Posix.2 says try variables first, then functions. If we would + find a function after unsuccessfully searching for a variable, + note that we're acting on a function now as if -f were + supplied. The readonly check below takes care of it. */ + if (var == 0 && nameref == 0 && unset_variable == 0 && unset_function == 0) + { + if (var = find_function (name)) + unset_function = 1; + } + + /* Posix.2 says that unsetting readonly variables is an error. */ + if (var && readonly_p (var)) + { + builtin_error (_("%s: cannot unset: readonly %s"), + var->name, unset_function ? "function" : "variable"); + NEXT_VARIABLE (); + } + + /* Unless the -f option is supplied, the name refers to a variable. */ +#if defined (ARRAY_VARS) + if (var && unset_array) + { + /* Let unbind_array_element decide what to do with non-array vars */ + tem = unbind_array_element (var, t, vflags); /* XXX new third arg */ + if (tem == -2 && array_p (var) == 0 && assoc_p (var) == 0) + { + builtin_error (_("%s: not an array variable"), var->name); + NEXT_VARIABLE (); + } + else if (tem < 0) + any_failed++; + } + else +#endif /* ARRAY_VARS */ + /* If we're trying to unset a nameref variable whose value isn't a set + variable, make sure we still try to unset the nameref's value */ + if (var == 0 && nameref == 0 && unset_function == 0) + { + var = find_variable_last_nameref (name, 0); + if (var && nameref_p (var)) + { +#if defined (ARRAY_VARS) + if (valid_array_reference (nameref_cell (var), 0)) + { + tname = savestring (nameref_cell (var)); + if (var = array_variable_part (tname, 0, &t, (int *)0)) + tem = unbind_array_element (var, t, vflags); /* XXX new third arg */ + free (tname); + } + else +#endif + tem = unbind_variable (nameref_cell (var)); + } + else + tem = unbind_variable (name); + } + else + tem = unset_function ? unbind_func (name) : (nameref ? unbind_nameref (name) : unbind_variable (name)); + + /* This is what Posix.2 says: ``If neither -f nor -v + is specified, the name refers to a variable; if a variable by + that name does not exist, a function by that name, if any, + shall be unset.'' */ + if (tem == -1 && nameref == 0 && unset_function == 0 && unset_variable == 0) + tem = unbind_func (name); + + name = list->word->word; /* reset above for namerefs */ + + /* SUSv3, POSIX.1-2001 say: ``Unsetting a variable or function that + was not previously set shall not be considered an error.'' */ + + if (unset_function == 0) + stupidly_hack_special_variables (name); + + list = list->next; + } + + return (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} diff --git a/bash-5.1/builtins_org/setattr.def b/bash-5.1/builtins_org/setattr.def new file mode 100644 index 0000000000000000000000000000000000000000..33bef4c38f8123eae07ac4922f34b2501b78bd63 --- /dev/null +++ b/bash-5.1/builtins_org/setattr.def @@ -0,0 +1,664 @@ +This file is setattr.def, from which is created setattr.c. +It implements the builtins "export" and "readonly", in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES setattr.c + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "../flags.h" +#include "common.h" +#include "bashgetopt.h" + +extern sh_builtin_func_t *this_shell_builtin; + +#ifdef ARRAY_VARS +extern int declare_builtin PARAMS((WORD_LIST *)); +#endif + +#define READONLY_OR_EXPORT \ + (this_shell_builtin == readonly_builtin || this_shell_builtin == export_builtin) + +$BUILTIN export +$FUNCTION export_builtin +$SHORT_DOC export [-fn] [name[=value] ...] or export -p +Set export attribute for shell variables. + +Marks each NAME for automatic export to the environment of subsequently +executed commands. If VALUE is supplied, assign VALUE before exporting. + +Options: + -f refer to shell functions + -n remove the export property from each NAME + -p display a list of all exported variables and functions + +An argument of `--' disables further option processing. + +Exit Status: +Returns success unless an invalid option is given or NAME is invalid. +$END + +/* For each variable name in LIST, make that variable appear in the + environment passed to simple commands. If there is no LIST, then + print all such variables. An argument of `-n' says to remove the + exported attribute from variables named in LIST. An argument of + -f indicates that the names present in LIST refer to functions. */ +int +export_builtin (list) + register WORD_LIST *list; +{ + return (set_or_show_attributes (list, att_exported, 0)); +} + +$BUILTIN readonly +$FUNCTION readonly_builtin +$SHORT_DOC readonly [-aAf] [name[=value] ...] or readonly -p +Mark shell variables as unchangeable. + +Mark each NAME as read-only; the values of these NAMEs may not be +changed by subsequent assignment. If VALUE is supplied, assign VALUE +before marking as read-only. + +Options: + -a refer to indexed array variables + -A refer to associative array variables + -f refer to shell functions + -p display a list of all readonly variables or functions, + depending on whether or not the -f option is given + +An argument of `--' disables further option processing. + +Exit Status: +Returns success unless an invalid option is given or NAME is invalid. +$END + +/* For each variable name in LIST, make that variable readonly. Given an + empty LIST, print out all existing readonly variables. */ +int +readonly_builtin (list) + register WORD_LIST *list; +{ + return (set_or_show_attributes (list, att_readonly, 0)); +} + +#if defined (ARRAY_VARS) +# define ATTROPTS "aAfnp" +#else +# define ATTROPTS "fnp" +#endif + +/* For each variable name in LIST, make that variable have the specified + ATTRIBUTE. An arg of `-n' says to remove the attribute from the the + remaining names in LIST (doesn't work for readonly). */ +int +set_or_show_attributes (list, attribute, nodefs) + register WORD_LIST *list; + int attribute, nodefs; +{ + register SHELL_VAR *var; + int assign, undo, any_failed, assign_error, opt; + int functions_only, arrays_only, assoc_only; + int aflags; + char *name; +#if defined (ARRAY_VARS) + WORD_LIST *nlist, *tlist; + WORD_DESC *w; + char optw[8]; + int opti; +#endif + + functions_only = arrays_only = assoc_only = 0; + undo = any_failed = assign_error = 0; + /* Read arguments from the front of the list. */ + reset_internal_getopt (); + while ((opt = internal_getopt (list, ATTROPTS)) != -1) + { + switch (opt) + { + case 'n': + undo = 1; + break; + case 'f': + functions_only = 1; + break; +#if defined (ARRAY_VARS) + case 'a': + arrays_only = 1; + break; + case 'A': + assoc_only = 1; + break; +#endif + case 'p': + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list) + { + if (attribute & att_exported) + array_needs_making = 1; + + /* Cannot undo readonly status, silently disallowed. */ + if (undo && (attribute & att_readonly)) + attribute &= ~att_readonly; + + while (list) + { + name = list->word->word; + + if (functions_only) /* xxx -f name */ + { + var = find_function (name); + if (var == 0) + { + builtin_error (_("%s: not a function"), name); + any_failed++; + } + else if ((attribute & att_exported) && undo == 0 && exportable_function_name (name) == 0) + { + builtin_error (_("%s: cannot export"), name); + any_failed++; + } + else + SETVARATTR (var, attribute, undo); + + list = list->next; + continue; + } + + /* xxx [-np] name[=value] */ + assign = assignment (name, 0); + + aflags = 0; + if (assign) + { + name[assign] = '\0'; + if (name[assign - 1] == '+') + { + aflags |= ASS_APPEND; + name[assign - 1] = '\0'; + } + } + + if (legal_identifier (name) == 0) + { + sh_invalidid (name); + if (assign) + assign_error++; + else + any_failed++; + list = list->next; + continue; + } + + if (assign) /* xxx [-np] name=value */ + { + name[assign] = '='; + if (aflags & ASS_APPEND) + name[assign - 1] = '+'; +#if defined (ARRAY_VARS) + /* Let's try something here. Turn readonly -a xxx=yyy into + declare -ra xxx=yyy and see what that gets us. */ + if (arrays_only || assoc_only) + { + tlist = list->next; + list->next = (WORD_LIST *)NULL; + /* Add -g to avoid readonly/export creating local variables: + only local/declare/typeset create local variables */ + opti = 0; + optw[opti++] = '-'; + optw[opti++] = 'g'; + if (attribute & att_readonly) + optw[opti++] = 'r'; + if (attribute & att_exported) + optw[opti++] = 'x'; + if (arrays_only) + optw[opti++] = 'a'; + else + optw[opti++] = 'A'; + optw[opti] = '\0'; + + w = make_word (optw); + nlist = make_word_list (w, list); + + opt = declare_builtin (nlist); + if (opt != EXECUTION_SUCCESS) + assign_error++; + list->next = tlist; + dispose_word (w); + free (nlist); + } + else +#endif + /* This word has already been expanded once with command + and parameter expansion. Call do_assignment_no_expand (), + which does not do command or parameter substitution. If + the assignment is not performed correctly, flag an error. */ + if (do_assignment_no_expand (name) == 0) + assign_error++; + name[assign] = '\0'; + if (aflags & ASS_APPEND) + name[assign - 1] = '\0'; + } + + set_var_attribute (name, attribute, undo); + if (assign) /* restore word */ + { + name[assign] = '='; + if (aflags & ASS_APPEND) + name[assign-1] = '+'; + } + list = list->next; + } + } + else + { + SHELL_VAR **variable_list; + register int i; + + if ((attribute & att_function) || functions_only) + { + variable_list = all_shell_functions (); + if (attribute != att_function) + attribute &= ~att_function; /* so declare -xf works, for example */ + } + else + variable_list = all_shell_variables (); + +#if defined (ARRAY_VARS) + if (attribute & att_array) + { + arrays_only++; + if (attribute != att_array) + attribute &= ~att_array; + } + else if (attribute & att_assoc) + { + assoc_only++; + if (attribute != att_assoc) + attribute &= ~att_assoc; + } +#endif + + if (variable_list) + { + for (i = 0; var = variable_list[i]; i++) + { +#if defined (ARRAY_VARS) + if (arrays_only && array_p (var) == 0) + continue; + else if (assoc_only && assoc_p (var) == 0) + continue; +#endif + + /* If we imported a variable that's not a valid identifier, don't + show it in any lists. */ + if ((var->attributes & (att_invisible|att_imported)) == (att_invisible|att_imported)) + continue; + + if ((var->attributes & attribute)) + { + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + if (any_failed = sh_chkwrite (any_failed)) + break; + } + } + free (variable_list); + } + } + + return (assign_error ? EX_BADASSIGN + : ((any_failed == 0) ? EXECUTION_SUCCESS + : EXECUTION_FAILURE)); +} + +/* Show all variable variables (v == 1) or functions (v == 0) with + attributes. */ +int +show_all_var_attributes (v, nodefs) + int v, nodefs; +{ + SHELL_VAR **variable_list, *var; + int any_failed; + register int i; + + variable_list = v ? all_shell_variables () : all_shell_functions (); + if (variable_list == 0) + return (EXECUTION_SUCCESS); + + for (i = any_failed = 0; var = variable_list[i]; i++) + { + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + if (any_failed = sh_chkwrite (any_failed)) + break; + } + free (variable_list); + return (any_failed == 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +} + +/* Show all local variable variables with their attributes. This shows unset + local variables (all_local_variables called with 0 argment). */ +int +show_local_var_attributes (v, nodefs) + int v, nodefs; +{ + SHELL_VAR **variable_list, *var; + int any_failed; + register int i; + + variable_list = all_local_variables (0); + if (variable_list == 0) + return (EXECUTION_SUCCESS); + + for (i = any_failed = 0; var = variable_list[i]; i++) + { + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + if (any_failed = sh_chkwrite (any_failed)) + break; + } + free (variable_list); + return (any_failed == 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +} + +int +var_attribute_string (var, pattr, flags) + SHELL_VAR *var; + int pattr; + char *flags; /* filled in with attributes */ +{ + int i; + + i = 0; + + /* pattr == 0 means we are called from `declare'. */ + if (pattr == 0 || posixly_correct == 0) + { +#if defined (ARRAY_VARS) + if (array_p (var)) + flags[i++] = 'a'; + + if (assoc_p (var)) + flags[i++] = 'A'; +#endif + + if (function_p (var)) + flags[i++] = 'f'; + + if (integer_p (var)) + flags[i++] = 'i'; + + if (nameref_p (var)) + flags[i++] = 'n'; + + if (readonly_p (var)) + flags[i++] = 'r'; + + if (trace_p (var)) + flags[i++] = 't'; + + if (exported_p (var)) + flags[i++] = 'x'; + + if (capcase_p (var)) + flags[i++] = 'c'; + + if (lowercase_p (var)) + flags[i++] = 'l'; + + if (uppercase_p (var)) + flags[i++] = 'u'; + } + else + { +#if defined (ARRAY_VARS) + if (array_p (var)) + flags[i++] = 'a'; + + if (assoc_p (var)) + flags[i++] = 'A'; +#endif + + if (function_p (var)) + flags[i++] = 'f'; + } + + flags[i] = '\0'; + return i; +} + +/* Show the attributes for shell variable VAR. If NODEFS is non-zero, + don't show function definitions along with the name. If PATTR is + non-zero, it indicates we're being called from `export' or `readonly'. + In POSIX mode, this prints the name of the calling builtin (`export' + or `readonly') instead of `declare', and doesn't print function defs + when called by `export' or `readonly'. */ +int +show_var_attributes (var, pattr, nodefs) + SHELL_VAR *var; + int pattr, nodefs; +{ + char flags[MAX_ATTRIBUTES], *x; + int i; + + i = var_attribute_string (var, pattr, flags); + + /* If we're printing functions with definitions, print the function def + first, then the attributes, instead of printing output that can't be + reused as input to recreate the current state. */ + if (function_p (var) && nodefs == 0 && (pattr == 0 || posixly_correct == 0)) + { + printf ("%s\n", named_function_string (var->name, function_cell (var), FUNC_MULTILINE|FUNC_EXTERNAL)); + nodefs++; + if (pattr == 0 && i == 1 && flags[0] == 'f') + return 0; /* don't print `declare -f name' */ + } + + if (pattr == 0 || posixly_correct == 0) + printf ("declare -%s ", i ? flags : "-"); + else if (i) + printf ("%s -%s ", this_command_name, flags); + else + printf ("%s ", this_command_name); + +#if defined (ARRAY_VARS) + if (invisible_p (var) && (array_p (var) || assoc_p (var))) + printf ("%s\n", var->name); + else if (array_p (var)) + print_array_assignment (var, 0); + else if (assoc_p (var)) + print_assoc_assignment (var, 0); + else +#endif + /* force `readonly' and `export' to not print out function definitions + when in POSIX mode. */ + if (nodefs || (function_p (var) && pattr != 0 && posixly_correct)) + printf ("%s\n", var->name); + else if (function_p (var)) + printf ("%s\n", named_function_string (var->name, function_cell (var), FUNC_MULTILINE|FUNC_EXTERNAL)); + else if (invisible_p (var) || var_isset (var) == 0) + printf ("%s\n", var->name); + else + { + x = sh_double_quote (value_cell (var)); + printf ("%s=%s\n", var->name, x); + free (x); + } + return (0); +} + +int +show_name_attributes (name, nodefs) + char *name; + int nodefs; +{ + SHELL_VAR *var; + + var = find_variable_noref (name); + + if (var) /* show every variable with attributes, even unset ones */ + { + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + return (0); + } + else + return (1); +} + +int +show_localname_attributes (name, nodefs) + char *name; + int nodefs; +{ + SHELL_VAR *var; + + var = find_variable_noref (name); + + if (var && local_p (var) && var->context == variable_context) /* show every variable with attributes, even unset ones */ + { + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + return (0); + } + else + return (1); +} + +int +show_func_attributes (name, nodefs) + char *name; + int nodefs; +{ + SHELL_VAR *var; + + var = find_function (name); + + if (var) + { + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + return (0); + } + else + return (1); +} + +void +set_var_attribute (name, attribute, undo) + char *name; + int attribute, undo; +{ + SHELL_VAR *var, *tv, *v, *refvar; + char *tvalue; + + if (undo) + var = find_variable (name); + else + { + tv = find_tempenv_variable (name); + /* XXX -- need to handle case where tv is a temp variable in a + function-scope context, since function_env has been merged into + the local variables table. */ + if (tv && tempvar_p (tv)) + { + tvalue = var_isset (tv) ? savestring (value_cell (tv)) : savestring (""); + + var = bind_variable (tv->name, tvalue, 0); + if (var == 0) + { + free (tvalue); + return; /* XXX - no error message here */ + } + var->attributes |= tv->attributes & ~att_tempvar; + /* This avoids an error message when propagating a read-only var + later on. */ + if (posixly_correct || shell_compatibility_level <= 44) + { + if (var->context == 0 && (attribute & att_readonly)) + { + /* Don't bother to set the `propagate to the global variables + table' flag if we've just bound the variable in that + table */ + v = find_global_variable (tv->name); + if (v != var) + VSETATTR (tv, att_propagate); + } + else + VSETATTR (tv, att_propagate); + if (var->context != 0) + VSETATTR (var, att_propagate); + } + + SETVARATTR (tv, attribute, undo); /* XXX */ + + stupidly_hack_special_variables (tv->name); + + free (tvalue); + } + else + { + var = find_variable_notempenv (name); + if (var == 0) + { + /* We might have a nameref pointing to something that we can't + resolve to a shell variable. If we do, skip it. We do a little + checking just so we can print an error message. */ + refvar = find_variable_nameref_for_create (name, 0); + if (refvar == INVALID_NAMEREF_VALUE) + return; + /* Otherwise we probably have a nameref pointing to a variable + that hasn't been created yet. bind_variable will take care + of that. */ + } + if (var == 0) + { + var = bind_variable (name, (char *)NULL, 0); + if (var) + VSETATTR (var, att_invisible); + } + else if (var->context != 0) + VSETATTR (var, att_propagate); + } + } + + if (var) + SETVARATTR (var, attribute, undo); + + if (var && (exported_p (var) || (attribute & att_exported))) + array_needs_making++; /* XXX */ + + if (var) + stupidly_hack_special_variables (name); +} diff --git a/bash-5.1/builtins_org/shift.def b/bash-5.1/builtins_org/shift.def new file mode 100644 index 0000000000000000000000000000000000000000..bb9af01b51342fd002083123f843364087c23285 --- /dev/null +++ b/bash-5.1/builtins_org/shift.def @@ -0,0 +1,90 @@ +This file is shift.def, from which is created shift.c. +It implements the builtin "shift" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES shift.c + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "common.h" + +$BUILTIN shift +$FUNCTION shift_builtin +$SHORT_DOC shift [n] +Shift positional parameters. + +Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is +not given, it is assumed to be 1. + +Exit Status: +Returns success unless N is negative or greater than $#. +$END + +int print_shift_error; + +/* Shift the arguments ``left''. Shift DOLLAR_VARS down then take one + off of REST_OF_ARGS and place it into DOLLAR_VARS[9]. If LIST has + anything in it, it is a number which says where to start the + shifting. Return > 0 if `times' > $#, otherwise 0. */ +int +shift_builtin (list) + WORD_LIST *list; +{ + intmax_t times; + int itimes, nargs; + + CHECK_HELPOPT (list); + + if (get_numeric_arg (list, 0, ×) == 0) + return (EXECUTION_FAILURE); + + if (times == 0) + return (EXECUTION_SUCCESS); + else if (times < 0) + { + sh_erange (list ? list->word->word : NULL, _("shift count")); + return (EXECUTION_FAILURE); + } + nargs = number_of_args (); + if (times > nargs) + { + if (print_shift_error) + sh_erange (list ? list->word->word : NULL, _("shift count")); + return (EXECUTION_FAILURE); + } + else if (times == nargs) + clear_dollar_vars (); + else + shift_args (itimes = times); + + invalidate_cached_quoted_dollar_at (); + + return (EXECUTION_SUCCESS); +} diff --git a/bash-5.1/builtins_org/shopt.def b/bash-5.1/builtins_org/shopt.def new file mode 100644 index 0000000000000000000000000000000000000000..6dca22421c0d3bb9cdc289a9f802520349a5f7b1 --- /dev/null +++ b/bash-5.1/builtins_org/shopt.def @@ -0,0 +1,899 @@ +This file is shopt.def, from which is created shopt.c. +It implements the Bash `shopt' builtin. + +Copyright (C) 1994-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES shopt.c + +$BUILTIN shopt +$FUNCTION shopt_builtin +$SHORT_DOC shopt [-pqsu] [-o] [optname ...] +Set and unset shell options. + +Change the setting of each shell option OPTNAME. Without any option +arguments, list each supplied OPTNAME, or all shell options if no +OPTNAMEs are given, with an indication of whether or not each is set. + +Options: + -o restrict OPTNAMEs to those defined for use with `set -o' + -p print each shell option with an indication of its status + -q suppress output + -s enable (set) each OPTNAME + -u disable (unset) each OPTNAME + +Exit Status: +Returns success if OPTNAME is enabled; fails if an invalid option is +given or OPTNAME is disabled. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include + +#include "version.h" + +#include "../bashintl.h" + +#include "../shell.h" +#include "../flags.h" +#include "common.h" +#include "bashgetopt.h" + +#if defined (READLINE) +# include "../bashline.h" +#endif + +#if defined (HISTORY) +# include "../bashhist.h" +#endif + +#define UNSETOPT 0 +#define SETOPT 1 + +#define OPTFMT "%-15s\t%s\n" + +extern int allow_null_glob_expansion, fail_glob_expansion, glob_dot_filenames; +extern int cdable_vars, mail_warning, source_uses_path; +extern int no_exit_on_failed_exec, print_shift_error; +extern int check_hashed_filenames, promptvars; +extern int cdspelling, expand_aliases; +extern int extended_quote; +extern int check_window_size; +extern int glob_ignore_case, match_ignore_case; +extern int hup_on_exit; +extern int xpg_echo; +extern int gnu_error_format; +extern int check_jobs_at_exit; +extern int autocd; +extern int glob_star; +extern int glob_asciirange; +extern int lastpipe_opt; +extern int inherit_errexit; +extern int localvar_inherit; +extern int localvar_unset; + +#if defined (EXTENDED_GLOB) +extern int extended_glob; +#endif + +#if defined (READLINE) +extern int hist_verify, history_reediting, perform_hostname_completion; +extern int no_empty_command_completion; +extern int force_fignore; +extern int dircomplete_spelling, dircomplete_expand; +extern int complete_fullquote; + +extern int enable_hostname_completion PARAMS((int)); +#endif + +#if defined (PROGRAMMABLE_COMPLETION) +extern int prog_completion_enabled; +extern int progcomp_alias; +#endif + +#if defined (DEBUGGER) +extern int debugging_mode; +#endif + +#if defined (ARRAY_VARS) +extern int assoc_expand_once; +extern int array_expand_once; +#endif + +#if defined (SYSLOG_HISTORY) +extern int syslog_history; +#endif + +static void shopt_error PARAMS((char *)); + +static int set_shellopts_after_change PARAMS((char *, int)); +static int set_compatibility_level PARAMS((char *, int)); + +#if defined (RESTRICTED_SHELL) +static int set_restricted_shell PARAMS((char *, int)); +#endif + +#if defined (READLINE) +static int shopt_enable_hostname_completion PARAMS((char *, int)); +static int shopt_set_complete_direxpand PARAMS((char *, int)); +#endif + +static int shopt_set_debug_mode PARAMS((char *, int)); + +static int shopt_login_shell; +static int shopt_compat31; +static int shopt_compat32; +static int shopt_compat40; +static int shopt_compat41; +static int shopt_compat42; +static int shopt_compat43; +static int shopt_compat44; + +typedef int shopt_set_func_t PARAMS((char *, int)); + +/* If you add a new variable name here, make sure to set the default value + appropriately in reset_shopt_options. */ + +static struct { + char *name; + int *value; + shopt_set_func_t *set_func; +} shopt_vars[] = { + { "autocd", &autocd, (shopt_set_func_t *)NULL }, +#if defined (ARRAY_VARS) + { "assoc_expand_once", &assoc_expand_once, (shopt_set_func_t *)NULL }, +#endif + { "cdable_vars", &cdable_vars, (shopt_set_func_t *)NULL }, + { "cdspell", &cdspelling, (shopt_set_func_t *)NULL }, + { "checkhash", &check_hashed_filenames, (shopt_set_func_t *)NULL }, +#if defined (JOB_CONTROL) + { "checkjobs", &check_jobs_at_exit, (shopt_set_func_t *)NULL }, +#endif + { "checkwinsize", &check_window_size, (shopt_set_func_t *)NULL }, +#if defined (HISTORY) + { "cmdhist", &command_oriented_history, (shopt_set_func_t *)NULL }, +#endif + { "compat31", &shopt_compat31, set_compatibility_level }, + { "compat32", &shopt_compat32, set_compatibility_level }, + { "compat40", &shopt_compat40, set_compatibility_level }, + { "compat41", &shopt_compat41, set_compatibility_level }, + { "compat42", &shopt_compat42, set_compatibility_level }, + { "compat43", &shopt_compat43, set_compatibility_level }, + { "compat44", &shopt_compat44, set_compatibility_level }, +#if defined (READLINE) + { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL}, + { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand }, + { "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL }, +#endif + { "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL }, + { "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL }, + { "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL }, +#if defined (DEBUGGER) + { "extdebug", &debugging_mode, shopt_set_debug_mode }, +#endif +#if defined (EXTENDED_GLOB) + { "extglob", &extended_glob, (shopt_set_func_t *)NULL }, +#endif + { "extquote", &extended_quote, (shopt_set_func_t *)NULL }, + { "failglob", &fail_glob_expansion, (shopt_set_func_t *)NULL }, +#if defined (READLINE) + { "force_fignore", &force_fignore, (shopt_set_func_t *)NULL }, +#endif + { "globasciiranges", &glob_asciirange, (shopt_set_func_t *)NULL }, + { "globstar", &glob_star, (shopt_set_func_t *)NULL }, + { "gnu_errfmt", &gnu_error_format, (shopt_set_func_t *)NULL }, +#if defined (HISTORY) + { "histappend", &force_append_history, (shopt_set_func_t *)NULL }, +#endif +#if defined (READLINE) + { "histreedit", &history_reediting, (shopt_set_func_t *)NULL }, + { "histverify", &hist_verify, (shopt_set_func_t *)NULL }, + { "hostcomplete", &perform_hostname_completion, shopt_enable_hostname_completion }, +#endif + { "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL }, + { "inherit_errexit", &inherit_errexit, (shopt_set_func_t *)NULL }, + { "interactive_comments", &interactive_comments, set_shellopts_after_change }, + { "lastpipe", &lastpipe_opt, (shopt_set_func_t *)NULL }, +#if defined (HISTORY) + { "lithist", &literal_history, (shopt_set_func_t *)NULL }, +#endif + { "localvar_inherit", &localvar_inherit, (shopt_set_func_t *)NULL }, + { "localvar_unset", &localvar_unset, (shopt_set_func_t *)NULL }, + { "login_shell", &shopt_login_shell, set_login_shell }, + { "mailwarn", &mail_warning, (shopt_set_func_t *)NULL }, +#if defined (READLINE) + { "no_empty_cmd_completion", &no_empty_command_completion, (shopt_set_func_t *)NULL }, +#endif + { "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL }, + { "nocasematch", &match_ignore_case, (shopt_set_func_t *)NULL }, + { "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL }, +#if defined (PROGRAMMABLE_COMPLETION) + { "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL }, +# if defined (ALIAS) + { "progcomp_alias", &progcomp_alias, (shopt_set_func_t *)NULL }, +# endif +#endif + { "promptvars", &promptvars, (shopt_set_func_t *)NULL }, +#if defined (RESTRICTED_SHELL) + { "restricted_shell", &restricted_shell, set_restricted_shell }, +#endif + { "shift_verbose", &print_shift_error, (shopt_set_func_t *)NULL }, + { "sourcepath", &source_uses_path, (shopt_set_func_t *)NULL }, +#if defined (SYSLOG_HISTORY) && defined (SYSLOG_SHOPT) + { "syslog_history", &syslog_history, (shopt_set_func_t *)NULL }, +#endif + { "xpg_echo", &xpg_echo, (shopt_set_func_t *)NULL }, + { (char *)0, (int *)0, (shopt_set_func_t *)NULL } +}; + +#define N_SHOPT_OPTIONS (sizeof (shopt_vars) / sizeof (shopt_vars[0])) + +#define GET_SHOPT_OPTION_VALUE(i) (*shopt_vars[i].value) + +static const char * const on = "on"; +static const char * const off = "off"; + +static int find_shopt PARAMS((char *)); +static int toggle_shopts PARAMS((int, WORD_LIST *, int)); +static void print_shopt PARAMS((char *, int, int)); +static int list_shopts PARAMS((WORD_LIST *, int)); +static int list_some_shopts PARAMS((int, int)); +static int list_shopt_o_options PARAMS((WORD_LIST *, int)); +static int list_some_o_options PARAMS((int, int)); +static int set_shopt_o_options PARAMS((int, WORD_LIST *, int)); + +#define SFLAG 0x01 +#define UFLAG 0x02 +#define QFLAG 0x04 +#define OFLAG 0x08 +#define PFLAG 0x10 + +int +shopt_builtin (list) + WORD_LIST *list; +{ + int opt, flags, rval; + + flags = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "psuoq")) != -1) + { + switch (opt) + { + case 's': + flags |= SFLAG; + break; + case 'u': + flags |= UFLAG; + break; + case 'q': + flags |= QFLAG; + break; + case 'o': + flags |= OFLAG; + break; + case 'p': + flags |= PFLAG; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if ((flags & (SFLAG|UFLAG)) == (SFLAG|UFLAG)) + { + builtin_error (_("cannot set and unset shell options simultaneously")); + return (EXECUTION_FAILURE); + } + + rval = EXECUTION_SUCCESS; + if ((flags & OFLAG) && ((flags & (SFLAG|UFLAG)) == 0)) /* shopt -o */ + rval = list_shopt_o_options (list, flags); + else if (list && (flags & OFLAG)) /* shopt -so args */ + rval = set_shopt_o_options ((flags & SFLAG) ? FLAG_ON : FLAG_OFF, list, flags & QFLAG); + else if (flags & OFLAG) /* shopt -so */ + rval = list_some_o_options ((flags & SFLAG) ? 1 : 0, flags); + else if (list && (flags & (SFLAG|UFLAG))) /* shopt -su args */ + rval = toggle_shopts ((flags & SFLAG) ? SETOPT : UNSETOPT, list, flags & QFLAG); + else if ((flags & (SFLAG|UFLAG)) == 0) /* shopt [args] */ + rval = list_shopts (list, flags); + else /* shopt -su */ + rval = list_some_shopts ((flags & SFLAG) ? SETOPT : UNSETOPT, flags); + return (rval); +} + +/* Reset the options managed by `shopt' to the values they would have at + shell startup. Variables from shopt_vars. */ +void +reset_shopt_options () +{ + autocd = cdable_vars = cdspelling = 0; + check_hashed_filenames = CHECKHASH_DEFAULT; + check_window_size = CHECKWINSIZE_DEFAULT; + allow_null_glob_expansion = glob_dot_filenames = 0; + no_exit_on_failed_exec = 0; + expand_aliases = 0; + extended_quote = 1; + fail_glob_expansion = 0; + glob_asciirange = GLOBASCII_DEFAULT; + glob_star = 0; + gnu_error_format = 0; + hup_on_exit = 0; + inherit_errexit = 0; + interactive_comments = 1; + lastpipe_opt = 0; + localvar_inherit = localvar_unset = 0; + mail_warning = 0; + glob_ignore_case = match_ignore_case = 0; + print_shift_error = 0; + source_uses_path = promptvars = 1; + +#if defined (JOB_CONTROL) + check_jobs_at_exit = 0; +#endif + +#if defined (EXTENDED_GLOB) + extended_glob = EXTGLOB_DEFAULT; +#endif + +#if defined (ARRAY_VARS) + assoc_expand_once = 0; +#endif + +#if defined (HISTORY) + literal_history = 0; + force_append_history = 0; + command_oriented_history = 1; +#endif + +#if defined (SYSLOG_HISTORY) +# if defined (SYSLOG_SHOPT) + syslog_history = SYSLOG_SHOPT; +# else + syslog_history = 1; +# endif /* SYSLOG_SHOPT */ +#endif + +#if defined (READLINE) + complete_fullquote = 1; + force_fignore = 1; + hist_verify = history_reediting = 0; + perform_hostname_completion = 1; +# if DIRCOMPLETE_EXPAND_DEFAULT + dircomplete_expand = 1; +# else + dircomplete_expand = 0; +#endif + dircomplete_spelling = 0; + no_empty_command_completion = 0; +#endif + +#if defined (PROGRAMMABLE_COMPLETION) + prog_completion_enabled = 1; +# if defined (ALIAS) + progcomp_alias = 0; +# endif +#endif + +#if defined (DEFAULT_ECHO_TO_XPG) || defined (STRICT_POSIX) + xpg_echo = 1; +#else + xpg_echo = 0; +#endif /* DEFAULT_ECHO_TO_XPG */ + + shopt_login_shell = login_shell; +} + +static int +find_shopt (name) + char *name; +{ + int i; + + for (i = 0; shopt_vars[i].name; i++) + if (STREQ (name, shopt_vars[i].name)) + return i; + return -1; +} + +static void +shopt_error (s) + char *s; +{ + builtin_error (_("%s: invalid shell option name"), s); +} + +static int +toggle_shopts (mode, list, quiet) + int mode; + WORD_LIST *list; + int quiet; +{ + WORD_LIST *l; + int ind, rval; + SHELL_VAR *v; + + for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next) + { + ind = find_shopt (l->word->word); + if (ind < 0) + { + shopt_error (l->word->word); + rval = EXECUTION_FAILURE; + } + else + { + *shopt_vars[ind].value = mode; /* 1 for set, 0 for unset */ + if (shopt_vars[ind].set_func) + (*shopt_vars[ind].set_func) (shopt_vars[ind].name, mode); + } + } + + /* Don't set $BASHOPTS here if it hasn't already been initialized */ + if (v = find_variable ("BASHOPTS")) + set_bashopts (); + return (rval); +} + +static void +print_shopt (name, val, flags) + char *name; + int val, flags; +{ + if (flags & PFLAG) + printf ("shopt %s %s\n", val ? "-s" : "-u", name); + else + printf (OPTFMT, name, val ? on : off); +} + +/* List the values of all or any of the `shopt' options. Returns 0 if + all were listed or all variables queried were on; 1 otherwise. */ +static int +list_shopts (list, flags) + WORD_LIST *list; + int flags; +{ + WORD_LIST *l; + int i, val, rval; + + if (list == 0) + { + for (i = 0; shopt_vars[i].name; i++) + { + val = *shopt_vars[i].value; + if ((flags & QFLAG) == 0) + print_shopt (shopt_vars[i].name, val, flags); + } + return (sh_chkwrite (EXECUTION_SUCCESS)); + } + + for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next) + { + i = find_shopt (l->word->word); + if (i < 0) + { + shopt_error (l->word->word); + rval = EXECUTION_FAILURE; + continue; + } + val = *shopt_vars[i].value; + if (val == 0) + rval = EXECUTION_FAILURE; + if ((flags & QFLAG) == 0) + print_shopt (l->word->word, val, flags); + } + + return (sh_chkwrite (rval)); +} + +static int +list_some_shopts (mode, flags) + int mode, flags; +{ + int val, i; + + for (i = 0; shopt_vars[i].name; i++) + { + val = *shopt_vars[i].value; + if (((flags & QFLAG) == 0) && mode == val) + print_shopt (shopt_vars[i].name, val, flags); + } + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +static int +list_shopt_o_options (list, flags) + WORD_LIST *list; + int flags; +{ + WORD_LIST *l; + int val, rval; + + if (list == 0) + { + if ((flags & QFLAG) == 0) + list_minus_o_opts (-1, (flags & PFLAG)); + return (sh_chkwrite (EXECUTION_SUCCESS)); + } + + for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next) + { + val = minus_o_option_value (l->word->word); + if (val == -1) + { + sh_invalidoptname (l->word->word); + rval = EXECUTION_FAILURE; + continue; + } + if (val == 0) + rval = EXECUTION_FAILURE; + if ((flags & QFLAG) == 0) + { + if (flags & PFLAG) + printf ("set %co %s\n", val ? '-' : '+', l->word->word); + else + printf (OPTFMT, l->word->word, val ? on : off); + } + } + return (sh_chkwrite (rval)); +} + +static int +list_some_o_options (mode, flags) + int mode, flags; +{ + if ((flags & QFLAG) == 0) + list_minus_o_opts (mode, (flags & PFLAG)); + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +static int +set_shopt_o_options (mode, list, quiet) + int mode; + WORD_LIST *list; + int quiet; +{ + WORD_LIST *l; + int rval; + + for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next) + { + if (set_minus_o_option (mode, l->word->word) == EXECUTION_FAILURE) + rval = EXECUTION_FAILURE; + } + set_shellopts (); + return rval; +} + +/* If we set or unset interactive_comments with shopt, make sure the + change is reflected in $SHELLOPTS. */ +static int +set_shellopts_after_change (option_name, mode) + char *option_name; + int mode; +{ + set_shellopts (); + return (0); +} + +static int +shopt_set_debug_mode (option_name, mode) + char *option_name; + int mode; +{ +#if defined (DEBUGGER) + error_trace_mode = function_trace_mode = debugging_mode; + set_shellopts (); + if (debugging_mode) + init_bash_argv (); +#endif + return (0); +} + +#if defined (READLINE) +static int +shopt_enable_hostname_completion (option_name, mode) + char *option_name; + int mode; +{ + return (enable_hostname_completion (mode)); +} +#endif + +static int +set_compatibility_level (option_name, mode) + char *option_name; + int mode; +{ + int ind; + char *rhs; + + /* If we're setting something, redo some of the work we did above in + toggle_shopt(). Unset everything and reset the appropriate option + based on OPTION_NAME. */ + if (mode) + { + shopt_compat31 = shopt_compat32 = 0; + shopt_compat40 = shopt_compat41 = shopt_compat42 = shopt_compat43 = 0; + shopt_compat44 = 0; + ind = find_shopt (option_name); + *shopt_vars[ind].value = mode; + } + + /* Then set shell_compatibility_level based on what remains */ + if (shopt_compat31) + shell_compatibility_level = 31; + else if (shopt_compat32) + shell_compatibility_level = 32; + else if (shopt_compat40) + shell_compatibility_level = 40; + else if (shopt_compat41) + shell_compatibility_level = 41; + else if (shopt_compat42) + shell_compatibility_level = 42; + else if (shopt_compat43) + shell_compatibility_level = 43; + else if (shopt_compat44) + shell_compatibility_level = 44; + else + shell_compatibility_level = DEFAULT_COMPAT_LEVEL; + + /* Make sure the current compatibility level is reflected in BASH_COMPAT */ + rhs = itos (shell_compatibility_level); + bind_variable ("BASH_COMPAT", rhs, 0); + free (rhs); + + return 0; +} + +/* Set and unset the various compatibility options from the value of + shell_compatibility_level; used by sv_shcompat */ +void +set_compatibility_opts () +{ + shopt_compat31 = shopt_compat32 = 0; + shopt_compat40 = shopt_compat41 = shopt_compat42 = shopt_compat43 = 0; + shopt_compat44 = 0; + switch (shell_compatibility_level) + { + case DEFAULT_COMPAT_LEVEL: + break; + case 44: + shopt_compat44 = 1; break; + case 43: + shopt_compat43 = 1; break; + case 42: + shopt_compat42 = 1; break; + case 41: + shopt_compat41 = 1; break; + case 40: + shopt_compat40 = 1; break; + case 32: + shopt_compat32 = 1; break; + case 31: + shopt_compat31 = 1; break; + } +} + +#if defined (READLINE) +static int +shopt_set_complete_direxpand (option_name, mode) + char *option_name; + int mode; +{ + set_directory_hook (); + return 0; +} +#endif + +#if defined (RESTRICTED_SHELL) +/* Don't allow the value of restricted_shell to be modified. */ + +static int +set_restricted_shell (option_name, mode) + char *option_name; + int mode; +{ + static int save_restricted = -1; + + if (save_restricted == -1) + save_restricted = shell_is_restricted (shell_name); + + restricted_shell = save_restricted; + return (0); +} +#endif /* RESTRICTED_SHELL */ + +/* Not static so shell.c can call it to initialize shopt_login_shell */ +int +set_login_shell (option_name, mode) + char *option_name; + int mode; +{ + shopt_login_shell = login_shell != 0; + return (0); +} + +char ** +get_shopt_options () +{ + char **ret; + int n, i; + + n = sizeof (shopt_vars) / sizeof (shopt_vars[0]); + ret = strvec_create (n + 1); + for (i = 0; shopt_vars[i].name; i++) + ret[i] = savestring (shopt_vars[i].name); + ret[i] = (char *)NULL; + return ret; +} + +/* + * External interface for other parts of the shell. NAME is a string option; + * MODE is 0 if we want to unset an option; 1 if we want to set an option. + * REUSABLE is 1 if we want to print output in a form that may be reused. + */ +int +shopt_setopt (name, mode) + char *name; + int mode; +{ + WORD_LIST *wl; + int r; + + wl = add_string_to_list (name, (WORD_LIST *)NULL); + r = toggle_shopts (mode, wl, 0); + dispose_words (wl); + return r; +} + +int +shopt_listopt (name, reusable) + char *name; + int reusable; +{ + int i; + + if (name == 0) + return (list_shopts ((WORD_LIST *)NULL, reusable ? PFLAG : 0)); + + i = find_shopt (name); + if (i < 0) + { + shopt_error (name); + return (EXECUTION_FAILURE); + } + + print_shopt (name, *shopt_vars[i].value, reusable ? PFLAG : 0); + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +void +set_bashopts () +{ + char *value; + char tflag[N_SHOPT_OPTIONS]; + int vsize, i, vptr, *ip, exported; + SHELL_VAR *v; + + for (vsize = i = 0; shopt_vars[i].name; i++) + { + tflag[i] = 0; + if (GET_SHOPT_OPTION_VALUE (i)) + { + vsize += strlen (shopt_vars[i].name) + 1; + tflag[i] = 1; + } + } + + value = (char *)xmalloc (vsize + 1); + + for (i = vptr = 0; shopt_vars[i].name; i++) + { + if (tflag[i]) + { + strcpy (value + vptr, shopt_vars[i].name); + vptr += strlen (shopt_vars[i].name); + value[vptr++] = ':'; + } + } + + if (vptr) + vptr--; /* cut off trailing colon */ + value[vptr] = '\0'; + + v = find_variable ("BASHOPTS"); + + /* Turn off the read-only attribute so we can bind the new value, and + note whether or not the variable was exported. */ + if (v) + { + VUNSETATTR (v, att_readonly); + exported = exported_p (v); + } + else + exported = 0; + + v = bind_variable ("BASHOPTS", value, 0); + + /* Turn the read-only attribute back on, and turn off the export attribute + if it was set implicitly by mark_modified_vars and SHELLOPTS was not + exported before we bound the new value. */ + VSETATTR (v, att_readonly); + if (mark_modified_vars && exported == 0 && exported_p (v)) + VUNSETATTR (v, att_exported); + + free (value); +} + +void +parse_bashopts (value) + char *value; +{ + char *vname; + int vptr, ind; + + vptr = 0; + while (vname = extract_colon_unit (value, &vptr)) + { + ind = find_shopt (vname); + if (ind >= 0) + { + *shopt_vars[ind].value = 1; + if (shopt_vars[ind].set_func) + (*shopt_vars[ind].set_func) (shopt_vars[ind].name, 1); + } + free (vname); + } +} + +void +initialize_bashopts (no_bashopts) + int no_bashopts; +{ + char *temp; + SHELL_VAR *var; + + if (no_bashopts == 0) + { + var = find_variable ("BASHOPTS"); + /* set up any shell options we may have inherited. */ + if (var && imported_p (var)) + { + temp = (array_p (var) || assoc_p (var)) ? (char *)NULL : savestring (value_cell (var)); + if (temp) + { + parse_bashopts (temp); + free (temp); + } + } + } + + /* Set up the $BASHOPTS variable. */ + set_bashopts (); +} diff --git a/bash-5.1/builtins_org/source.def b/bash-5.1/builtins_org/source.def new file mode 100644 index 0000000000000000000000000000000000000000..5b2f994db414d08a87cc64e5e0f706f4ee9e3d48 --- /dev/null +++ b/bash-5.1/builtins_org/source.def @@ -0,0 +1,200 @@ +This file is source.def, from which is created source.c. +It implements the builtins "." and "source" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES source.c + +$BUILTIN source +$FUNCTION source_builtin +$SHORT_DOC source filename [arguments] +Execute commands from a file in the current shell. + +Read and execute commands from FILENAME in the current shell. The +entries in $PATH are used to find the directory containing FILENAME. +If any ARGUMENTS are supplied, they become the positional parameters +when FILENAME is executed. + +Exit Status: +Returns the status of the last command executed in FILENAME; fails if +FILENAME cannot be read. +$END + +$BUILTIN . +$DOCNAME dot +$FUNCTION source_builtin +$SHORT_DOC . filename [arguments] +Execute commands from a file in the current shell. + +Read and execute commands from FILENAME in the current shell. The +entries in $PATH are used to find the directory containing FILENAME. +If any ARGUMENTS are supplied, they become the positional parameters +when FILENAME is executed. + +Exit Status: +Returns the status of the last command executed in FILENAME; fails if +FILENAME cannot be read. +$END + +#include + +#include "../bashtypes.h" +#include "posixstat.h" +#include "filecntl.h" +#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "../flags.h" +#include "../findcmd.h" +#include "common.h" +#include "bashgetopt.h" +#include "../trap.h" + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +static void maybe_pop_dollar_vars PARAMS((void)); + +/* If non-zero, `.' uses $PATH to look up the script to be sourced. */ +int source_uses_path = 1; + +/* If non-zero, `.' looks in the current directory if the filename argument + is not found in the $PATH. */ +int source_searches_cwd = 1; + +/* If this . script is supplied arguments, we save the dollar vars and + replace them with the script arguments for the duration of the script's + execution. If the script does not change the dollar vars, we restore + what we saved. If the dollar vars are changed in the script, and we are + not executing a shell function, we leave the new values alone and free + the saved values. */ +static void +maybe_pop_dollar_vars () +{ + if (variable_context == 0 && (dollar_vars_changed () & ARGS_SETBLTIN)) + dispose_saved_dollar_vars (); + else + pop_dollar_vars (); + if (debugging_mode) + pop_args (); /* restore BASH_ARGC and BASH_ARGV */ + set_dollar_vars_unchanged (); + invalidate_cached_quoted_dollar_at (); /* just invalidate to be safe */ +} + +/* Read and execute commands from the file passed as argument. Guess what. + This cannot be done in a subshell, since things like variable assignments + take place in there. So, I open the file, place it into a large string, + close the file, and then execute the string. */ +int +source_builtin (list) + WORD_LIST *list; +{ + int result; + char *filename, *debug_trap, *x; + + if (no_options (list)) + return (EX_USAGE); + list = loptend; + + if (list == 0) + { + builtin_error (_("filename argument required")); + builtin_usage (); + return (EX_USAGE); + } + +#if defined (RESTRICTED_SHELL) + if (restricted && strchr (list->word->word, '/')) + { + sh_restricted (list->word->word); + return (EXECUTION_FAILURE); + } +#endif + + filename = (char *)NULL; + /* XXX -- should this be absolute_pathname? */ + if (posixly_correct && strchr (list->word->word, '/')) + filename = savestring (list->word->word); + else if (absolute_pathname (list->word->word)) + filename = savestring (list->word->word); + else if (source_uses_path) + filename = find_path_file (list->word->word); + if (filename == 0) + { + if (source_searches_cwd == 0) + { + x = printable_filename (list->word->word, 0); + builtin_error (_("%s: file not found"), x); + if (x != list->word->word) + free (x); + if (posixly_correct && interactive_shell == 0 && executing_command_builtin == 0) + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (EXITPROG); + } + return (EXECUTION_FAILURE); + } + else + filename = savestring (list->word->word); + } + + begin_unwind_frame ("source"); + add_unwind_protect (xfree, filename); + + if (list->next) + { + push_dollar_vars (); + add_unwind_protect ((Function *)maybe_pop_dollar_vars, (char *)NULL); + if (debugging_mode || shell_compatibility_level <= 44) + init_bash_argv (); /* Initialize BASH_ARGV and BASH_ARGC */ + remember_args (list->next, 1); + if (debugging_mode) + push_args (list->next); /* Update BASH_ARGV and BASH_ARGC */ + } + set_dollar_vars_unchanged (); + + /* Don't inherit the DEBUG trap unless function_trace_mode (overloaded) + is set. XXX - should sourced files inherit the RETURN trap? Functions + don't. */ + debug_trap = TRAP_STRING (DEBUG_TRAP); + if (debug_trap && function_trace_mode == 0) + { + debug_trap = savestring (debug_trap); + add_unwind_protect (xfree, debug_trap); + add_unwind_protect (maybe_set_debug_trap, debug_trap); + restore_default_signal (DEBUG_TRAP); + } + + result = source_file (filename, (list && list->next)); + + run_unwind_frame ("source"); + + return (result); +} diff --git a/bash-5.1/builtins_org/suspend.def b/bash-5.1/builtins_org/suspend.def new file mode 100644 index 0000000000000000000000000000000000000000..e99fd26b571e9c7e25611049460e47c7c07cc10b --- /dev/null +++ b/bash-5.1/builtins_org/suspend.def @@ -0,0 +1,128 @@ +This file is suspend.def, from which is created suspend.c. +It implements the builtin "suspend" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES suspend.c + +$BUILTIN suspend +$DEPENDS_ON JOB_CONTROL +$FUNCTION suspend_builtin +$SHORT_DOC suspend [-f] +Suspend shell execution. + +Suspend the execution of this shell until it receives a SIGCONT signal. +Unless forced, login shells cannot be suspended. + +Options: + -f force the suspend, even if the shell is a login shell + +Exit Status: +Returns success unless job control is not enabled or an error occurs. +$END + +#include + +#if defined (JOB_CONTROL) +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashtypes.h" +#include +#include "../bashintl.h" +#include "../shell.h" +#include "../jobs.h" +#include "common.h" +#include "bashgetopt.h" + +static sighandler suspend_continue PARAMS((int)); + +static SigHandler *old_cont; +#if 0 +static SigHandler *old_stop; +#endif + +/* Continue handler. */ +static sighandler +suspend_continue (sig) + int sig; +{ + set_signal_handler (SIGCONT, old_cont); +#if 0 + set_signal_handler (SIGSTOP, old_stop); +#endif + SIGRETURN (0); +} + +/* Suspending the shell. If -f is the arg, then do the suspend + no matter what. Otherwise, complain if a login shell. */ +int +suspend_builtin (list) + WORD_LIST *list; +{ + int opt, force; + + reset_internal_getopt (); + force = 0; + while ((opt = internal_getopt (list, "f")) != -1) + switch (opt) + { + case 'f': + force++; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + + list = loptend; + + if (job_control == 0) + { + sh_nojobs (_("cannot suspend")); + return (EXECUTION_FAILURE); + } + + if (force == 0) + { + no_args (list); + + if (login_shell) + { + builtin_error (_("cannot suspend a login shell")); + return (EXECUTION_FAILURE); + } + } + + /* XXX - should we put ourselves back into the original pgrp now? If so, + call end_job_control() here and do the right thing in suspend_continue + (that is, call restart_job_control()). */ + old_cont = (SigHandler *)set_signal_handler (SIGCONT, suspend_continue); +#if 0 + old_stop = (SigHandler *)set_signal_handler (SIGSTOP, SIG_DFL); +#endif + killpg (shell_pgrp, SIGSTOP); + return (EXECUTION_SUCCESS); +} + +#endif /* JOB_CONTROL */ diff --git a/bash-5.1/builtins_org/test.def b/bash-5.1/builtins_org/test.def new file mode 100644 index 0000000000000000000000000000000000000000..bd9a203b656800f28854f766d2755f6a78d7f1a3 --- /dev/null +++ b/bash-5.1/builtins_org/test.def @@ -0,0 +1,159 @@ +This file is test.def, from which is created test.c. +It implements the builtin "test" in Bash. + +Copyright (C) 1987-2015 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES test.c + +$BUILTIN test +$FUNCTION test_builtin +$SHORT_DOC test [expr] +Evaluate conditional expression. + +Exits with a status of 0 (true) or 1 (false) depending on +the evaluation of EXPR. Expressions may be unary or binary. Unary +expressions are often used to examine the status of a file. There +are string operators and numeric comparison operators as well. + +The behavior of test depends on the number of arguments. Read the +bash manual page for the complete specification. + +File operators: + + -a FILE True if file exists. + -b FILE True if file is block special. + -c FILE True if file is character special. + -d FILE True if file is a directory. + -e FILE True if file exists. + -f FILE True if file exists and is a regular file. + -g FILE True if file is set-group-id. + -h FILE True if file is a symbolic link. + -L FILE True if file is a symbolic link. + -k FILE True if file has its `sticky' bit set. + -p FILE True if file is a named pipe. + -r FILE True if file is readable by you. + -s FILE True if file exists and is not empty. + -S FILE True if file is a socket. + -t FD True if FD is opened on a terminal. + -u FILE True if the file is set-user-id. + -w FILE True if the file is writable by you. + -x FILE True if the file is executable by you. + -O FILE True if the file is effectively owned by you. + -G FILE True if the file is effectively owned by your group. + -N FILE True if the file has been modified since it was last read. + + FILE1 -nt FILE2 True if file1 is newer than file2 (according to + modification date). + + FILE1 -ot FILE2 True if file1 is older than file2. + + FILE1 -ef FILE2 True if file1 is a hard link to file2. + +String operators: + + -z STRING True if string is empty. + + -n STRING + STRING True if string is not empty. + + STRING1 = STRING2 + True if the strings are equal. + STRING1 != STRING2 + True if the strings are not equal. + STRING1 < STRING2 + True if STRING1 sorts before STRING2 lexicographically. + STRING1 > STRING2 + True if STRING1 sorts after STRING2 lexicographically. + +Other operators: + + -o OPTION True if the shell option OPTION is enabled. + -v VAR True if the shell variable VAR is set. + -R VAR True if the shell variable VAR is set and is a name + reference. + ! EXPR True if expr is false. + EXPR1 -a EXPR2 True if both expr1 AND expr2 are true. + EXPR1 -o EXPR2 True if either expr1 OR expr2 is true. + + arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne, + -lt, -le, -gt, or -ge. + +Arithmetic binary operators return true if ARG1 is equal, not-equal, +less-than, less-than-or-equal, greater-than, or greater-than-or-equal +than ARG2. + +Exit Status: +Returns success if EXPR evaluates to true; fails if EXPR evaluates to +false or an invalid argument is given. +$END + +$BUILTIN [ +$DOCNAME test_bracket +$FUNCTION test_builtin +$SHORT_DOC [ arg... ] +Evaluate conditional expression. + +This is a synonym for the "test" builtin, but the last argument must +be a literal `]', to match the opening `['. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "../test.h" +#include "common.h" + +/* TEST/[ builtin. */ +int +test_builtin (list) + WORD_LIST *list; +{ + char **argv; + int argc, result; + + /* We let Matthew Bradburn and Kevin Braunsdorf's code do the + actual test command. So turn the list of args into an array + of strings, since that is what their code wants. */ + if (list == 0) + { + if (this_command_name[0] == '[' && !this_command_name[1]) + { + builtin_error (_("missing `]'")); + return (EX_BADUSAGE); + } + + return (EXECUTION_FAILURE); + } + + argv = make_builtin_argv (list, &argc); + result = test_command (argc, argv); + free ((char *)argv); + + return (result); +} diff --git a/bash-5.1/builtins_org/times.def b/bash-5.1/builtins_org/times.def new file mode 100644 index 0000000000000000000000000000000000000000..f31f43331e96a8cb5a5961d75c4696ef0920e229 --- /dev/null +++ b/bash-5.1/builtins_org/times.def @@ -0,0 +1,119 @@ +This file is times.def, from which is created times.c. +It implements the builtin "times" in Bash. + +Copyright (C) 1987-2009 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES times.c + +$BUILTIN times +$FUNCTION times_builtin +$SHORT_DOC times +Display process times. + +Prints the accumulated user and system times for the shell and all of its +child processes. + +Exit Status: +Always succeeds. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "../bashtypes.h" +#include "../shell.h" + +#include + +#if defined (HAVE_SYS_TIMES_H) +# include +#endif /* HAVE_SYS_TIMES_H */ + +#if defined (HAVE_SYS_RESOURCE_H) && !defined (RLIMTYPE) +# include +#endif + +#include "common.h" + +/* Print the totals for system and user time used. */ +int +times_builtin (list) + WORD_LIST *list; +{ +#if defined (HAVE_GETRUSAGE) && defined (HAVE_TIMEVAL) && defined (RUSAGE_SELF) + struct rusage self, kids; + + USE_VAR(list); + + if (no_options (list)) + return (EX_USAGE); + + getrusage (RUSAGE_SELF, &self); + getrusage (RUSAGE_CHILDREN, &kids); /* terminated child processes */ + + print_timeval (stdout, &self.ru_utime); + putchar (' '); + print_timeval (stdout, &self.ru_stime); + putchar ('\n'); + print_timeval (stdout, &kids.ru_utime); + putchar (' '); + print_timeval (stdout, &kids.ru_stime); + putchar ('\n'); + +#else +# if defined (HAVE_TIMES) + /* This uses the POSIX.1/XPG5 times(2) interface, which fills in a + `struct tms' with values of type clock_t. */ + struct tms t; + + USE_VAR(list); + + if (no_options (list)) + return (EX_USAGE); + + times (&t); + + print_clock_t (stdout, t.tms_utime); + putchar (' '); + print_clock_t (stdout, t.tms_stime); + putchar ('\n'); + print_clock_t (stdout, t.tms_cutime); + putchar (' '); + print_clock_t (stdout, t.tms_cstime); + putchar ('\n'); + +# else /* !HAVE_TIMES */ + + USE_VAR(list); + + if (no_options (list)) + return (EX_USAGE); + printf ("0.00 0.00\n0.00 0.00\n"); + +# endif /* HAVE_TIMES */ +#endif /* !HAVE_TIMES */ + + return (sh_chkwrite (EXECUTION_SUCCESS)); +} diff --git a/bash-5.1/builtins_org/trap.def b/bash-5.1/builtins_org/trap.def new file mode 100644 index 0000000000000000000000000000000000000000..daeec9eafe809fef9a4632484965d6321c993337 --- /dev/null +++ b/bash-5.1/builtins_org/trap.def @@ -0,0 +1,313 @@ +This file is trap.def, from which is created trap.c. +It implements the builtin "trap" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES trap.c + +$BUILTIN trap +$FUNCTION trap_builtin +$SHORT_DOC trap [-lp] [[arg] signal_spec ...] +Trap signals and other events. + +Defines and activates handlers to be run when the shell receives signals +or other conditions. + +ARG is a command to be read and executed when the shell receives the +signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC +is supplied) or `-', each specified signal is reset to its original +value. If ARG is the null string each SIGNAL_SPEC is ignored by the +shell and by the commands it invokes. + +If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. If +a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. If +a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a +script run by the . or source builtins finishes executing. A SIGNAL_SPEC +of ERR means to execute ARG each time a command's failure would cause the +shell to exit when the -e option is enabled. + +If no arguments are supplied, trap prints the list of commands associated +with each signal. + +Options: + -l print a list of signal names and their corresponding numbers + -p display the trap commands associated with each SIGNAL_SPEC + +Each SIGNAL_SPEC is either a signal name in or a signal number. +Signal names are case insensitive and the SIG prefix is optional. A +signal may be sent to the shell with "kill -signal $$". + +Exit Status: +Returns success unless a SIGSPEC is invalid or an invalid option is given. +$END + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "../bashtypes.h" +#include +#include +#include "../bashansi.h" + +#include "../shell.h" +#include "../trap.h" +#include "common.h" +#include "bashgetopt.h" + +static void showtrap PARAMS((int, int)); +static int display_traps PARAMS((WORD_LIST *, int)); + +/* The trap command: + + trap + trap + trap -l + trap -p [sigspec ...] + trap [--] + + Set things up so that ARG is executed when SIGNAL(s) N is received. + If ARG is the empty string, then ignore the SIGNAL(s). If there is + no ARG, then set the trap for SIGNAL(s) to its original value. Just + plain "trap" means to print out the list of commands associated with + each signal number. Single arg of "-l" means list the signal names. */ + +/* Possible operations to perform on the list of signals.*/ +#define SET 0 /* Set this signal to first_arg. */ +#define REVERT 1 /* Revert to this signals original value. */ +#define IGNORE 2 /* Ignore this signal. */ + +int +trap_builtin (list) + WORD_LIST *list; +{ + int list_signal_names, display, result, opt; + + list_signal_names = display = 0; + result = EXECUTION_SUCCESS; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "lp")) != -1) + { + switch (opt) + { + case 'l': + list_signal_names++; + break; + case 'p': + display++; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + opt = DSIG_NOCASE|DSIG_SIGPREFIX; /* flags for decode_signal */ + + if (list_signal_names) + return (sh_chkwrite (display_signal_list ((WORD_LIST *)NULL, 1))); + else if (display || list == 0) + { + initialize_terminating_signals (); + get_all_original_signals (); + return (sh_chkwrite (display_traps (list, display && posixly_correct))); + } + else + { + char *first_arg; + int operation, sig, first_signal; + + operation = SET; + first_arg = list->word->word; + first_signal = first_arg && *first_arg && all_digits (first_arg) && signal_object_p (first_arg, opt); + + /* Backwards compatibility. XXX - question about whether or not we + should throw an error if an all-digit argument doesn't correspond + to a valid signal number (e.g., if it's `50' on a system with only + 32 signals). */ + if (first_signal) + operation = REVERT; + /* When in posix mode, the historical behavior of looking for a + missing first argument is disabled. To revert to the original + signal handling disposition, use `-' as the first argument. */ + else if (posixly_correct == 0 && first_arg && *first_arg && + (*first_arg != '-' || first_arg[1]) && + signal_object_p (first_arg, opt) && list->next == 0) + operation = REVERT; + else + { + list = list->next; + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + else if (*first_arg == '\0') + operation = IGNORE; + else if (first_arg[0] == '-' && !first_arg[1]) + operation = REVERT; + } + + /* If we're in a command substitution, we haven't freed the trap strings + (though we reset the signal handlers). If we're setting a trap to + handle a signal here, free the rest of the trap strings since they + don't apply any more. */ + if (subshell_environment & SUBSHELL_RESETTRAP) + { + free_trap_strings (); + subshell_environment &= ~SUBSHELL_RESETTRAP; + } + + while (list) + { + sig = decode_signal (list->word->word, opt); + + if (sig == NO_SIG) + { + sh_invalidsig (list->word->word); + result = EXECUTION_FAILURE; + } + else + { + switch (operation) + { + case SET: + set_signal (sig, first_arg); + break; + + case REVERT: + restore_default_signal (sig); + + /* Signals that the shell treats specially need special + handling. */ + switch (sig) + { + case SIGINT: + /* XXX - should we do this if original disposition + was SIG_IGN? */ + if (interactive) + set_signal_handler (SIGINT, sigint_sighandler); + /* special cases for interactive == 0 */ + else if (interactive_shell && (sourcelevel||running_trap||parse_and_execute_level)) + set_signal_handler (SIGINT, sigint_sighandler); + else + set_signal_handler (SIGINT, termsig_sighandler); + break; + + case SIGQUIT: + /* Always ignore SIGQUIT. */ + set_signal_handler (SIGQUIT, SIG_IGN); + break; + case SIGTERM: +#if defined (JOB_CONTROL) + case SIGTTIN: + case SIGTTOU: + case SIGTSTP: +#endif /* JOB_CONTROL */ + if (interactive) + set_signal_handler (sig, SIG_IGN); + break; + } + break; + + case IGNORE: + ignore_signal (sig); + break; + } + } + list = list->next; + } + } + + return (result); +} + +static void +showtrap (i, show_default) + int i, show_default; +{ + char *t, *p, *sn; + + p = trap_list[i]; + if (p == (char *)DEFAULT_SIG && signal_is_hard_ignored (i) == 0) + { + if (show_default) + t = "-"; + else + return; + } + else if (signal_is_hard_ignored (i)) + t = (char *)NULL; + else + t = (p == (char *)IGNORE_SIG) ? (char *)NULL : sh_single_quote (p); + + sn = signal_name (i); + /* Make sure that signals whose names are unknown (for whatever reason) + are printed as signal numbers. */ + if (STREQN (sn, "SIGJUNK", 7) || STREQN (sn, "unknown", 7)) + printf ("trap -- %s %d\n", t ? t : "''", i); + else if (posixly_correct) + { + if (STREQN (sn, "SIG", 3)) + printf ("trap -- %s %s\n", t ? t : "''", sn+3); + else + printf ("trap -- %s %s\n", t ? t : "''", sn); + } + else + printf ("trap -- %s %s\n", t ? t : "''", sn); + + if (show_default == 0) + FREE (t); +} + +static int +display_traps (list, show_all) + WORD_LIST *list; + int show_all; +{ + int result, i; + + if (list == 0) + { + for (i = 0; i < BASH_NSIG; i++) + showtrap (i, show_all); + return (EXECUTION_SUCCESS); + } + + for (result = EXECUTION_SUCCESS; list; list = list->next) + { + i = decode_signal (list->word->word, DSIG_NOCASE|DSIG_SIGPREFIX); + if (i == NO_SIG) + { + sh_invalidsig (list->word->word); + result = EXECUTION_FAILURE; + } + else + showtrap (i, show_all); + } + + return (result); +} diff --git a/bash-5.1/builtins_org/type.def b/bash-5.1/builtins_org/type.def new file mode 100644 index 0000000000000000000000000000000000000000..a8e47c0ac44dbffe102bc3dccee0d65298173f8c --- /dev/null +++ b/bash-5.1/builtins_org/type.def @@ -0,0 +1,420 @@ +This file is type.def, from which is created type.c. +It implements the builtin "type" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES type.c + +$BUILTIN type +$FUNCTION type_builtin +$SHORT_DOC type [-afptP] name [name ...] +Display information about command type. + +For each NAME, indicate how it would be interpreted if used as a +command name. + +Options: + -a display all locations containing an executable named NAME; + includes aliases, builtins, and functions, if and only if + the `-p' option is not also used + -f suppress shell function lookup + -P force a PATH search for each NAME, even if it is an alias, + builtin, or function, and returns the name of the disk file + that would be executed + -p returns either the name of the disk file that would be executed, + or nothing if `type -t NAME' would not return `file' + -t output a single word which is one of `alias', `keyword', + `function', `builtin', `file' or `', if NAME is an alias, + shell reserved word, shell function, shell builtin, disk file, + or not found, respectively + +Arguments: + NAME Command name to be interpreted. + +Exit Status: +Returns success if all of the NAMEs are found; fails if any are not found. +$END + +#include + +#include "../bashtypes.h" +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include "../bashansi.h" +#include "../bashintl.h" + +#include "../shell.h" +#include "../parser.h" +#include "../execute_cmd.h" +#include "../findcmd.h" +#include "../hashcmd.h" + +#if defined (ALIAS) +#include "../alias.h" +#endif /* ALIAS */ + +#include "common.h" +#include "bashgetopt.h" + +extern int find_reserved_word PARAMS((char *)); + +/* For each word in LIST, find out what the shell is going to do with + it as a simple command. i.e., which file would this shell use to + execve, or if it is a builtin command, or an alias. Possible flag + arguments: + -t Returns the "type" of the object, one of + `alias', `keyword', `function', `builtin', + or `file'. + + -p Returns the pathname of the file if -type is + a file. + + -a Returns all occurrences of words, whether they + be a filename in the path, alias, function, + or builtin. + + -f Suppress shell function lookup, like `command'. + + -P Force a path search even in the presence of other + definitions. + + Order of evaluation: + alias + keyword + function + builtin + file + */ + +int +type_builtin (list) + WORD_LIST *list; +{ + int dflags, any_failed, opt; + WORD_LIST *this; + + if (list == 0) + return (EXECUTION_SUCCESS); + + dflags = CDESC_SHORTDESC; /* default */ + any_failed = 0; + + /* Handle the obsolescent `-type', `-path', and `-all' by prescanning + the arguments and converting those options to the form that + internal_getopt recognizes. Converts `--type', `--path', and `--all' + also. THIS SHOULD REALLY GO AWAY. */ + for (this = list; this && this->word->word[0] == '-'; this = this->next) + { + char *flag = &(this->word->word[1]); + + if (STREQ (flag, "type") || STREQ (flag, "-type")) + { + this->word->word[1] = 't'; + this->word->word[2] = '\0'; + } + else if (STREQ (flag, "path") || STREQ (flag, "-path")) + { + this->word->word[1] = 'p'; + this->word->word[2] = '\0'; + } + else if (STREQ (flag, "all") || STREQ (flag, "-all")) + { + this->word->word[1] = 'a'; + this->word->word[2] = '\0'; + } + } + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "afptP")) != -1) + { + switch (opt) + { + case 'a': + dflags |= CDESC_ALL; + break; + case 'f': + dflags |= CDESC_NOFUNCS; + break; + case 'p': + dflags |= CDESC_PATH_ONLY; + dflags &= ~(CDESC_TYPE|CDESC_SHORTDESC); + break; + case 't': + dflags |= CDESC_TYPE; + dflags &= ~(CDESC_PATH_ONLY|CDESC_SHORTDESC); + break; + case 'P': /* shorthand for type -ap */ + dflags |= (CDESC_PATH_ONLY|CDESC_FORCE_PATH); + dflags &= ~(CDESC_TYPE|CDESC_SHORTDESC); + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + while (list) + { + int found; + + found = describe_command (list->word->word, dflags); + + if (!found && (dflags & (CDESC_PATH_ONLY|CDESC_TYPE)) == 0) + sh_notfound (list->word->word); + + any_failed += found == 0; + list = list->next; + } + + opt = (any_failed == 0) ? EXECUTION_SUCCESS : EXECUTION_FAILURE; + return (sh_chkwrite (opt)); +} + +/* + * Describe COMMAND as required by the type and command builtins. + * + * Behavior is controlled by DFLAGS. Flag values are + * CDESC_ALL print all descriptions of a command + * CDESC_SHORTDESC print the description for type and command -V + * CDESC_REUSABLE print in a format that may be reused as input + * CDESC_TYPE print the type for type -t + * CDESC_PATH_ONLY print the path for type -p + * CDESC_FORCE_PATH force a path search for type -P + * CDESC_NOFUNCS skip function lookup for type -f + * CDESC_ABSPATH convert to absolute path, no ./ prefix + * CDESC_STDPATH command -p standard path list + * + * CDESC_ALL says whether or not to look for all occurrences of COMMAND, or + * return after finding it once. + */ +int +describe_command (command, dflags) + char *command; + int dflags; +{ + int found, i, found_file, f, all; + char *full_path, *x, *pathlist; + SHELL_VAR *func; +#if defined (ALIAS) + alias_t *alias; +#endif + + all = (dflags & CDESC_ALL) != 0; + found = found_file = 0; + full_path = (char *)NULL; + +#if defined (ALIAS) + /* Command is an alias? */ + if (((dflags & CDESC_FORCE_PATH) == 0) && expand_aliases && (alias = find_alias (command))) + { + if (dflags & CDESC_TYPE) + puts ("alias"); + else if (dflags & CDESC_SHORTDESC) + printf (_("%s is aliased to `%s'\n"), command, alias->value); + else if (dflags & CDESC_REUSABLE) + { + x = sh_single_quote (alias->value); + printf ("alias %s=%s\n", command, x); + free (x); + } + + found = 1; + + if (all == 0) + return (1); + } +#endif /* ALIAS */ + + /* Command is a shell reserved word? */ + if (((dflags & CDESC_FORCE_PATH) == 0) && (i = find_reserved_word (command)) >= 0) + { + if (dflags & CDESC_TYPE) + puts ("keyword"); + else if (dflags & CDESC_SHORTDESC) + printf (_("%s is a shell keyword\n"), command); + else if (dflags & CDESC_REUSABLE) + printf ("%s\n", command); + + found = 1; + + if (all == 0) + return (1); + } + + /* Command is a function? */ + if (((dflags & (CDESC_FORCE_PATH|CDESC_NOFUNCS)) == 0) && (func = find_function (command))) + { + if (dflags & CDESC_TYPE) + puts ("function"); + else if (dflags & CDESC_SHORTDESC) + { + char *result; + + printf (_("%s is a function\n"), command); + + /* We're blowing away THE_PRINTED_COMMAND here... */ + + result = named_function_string (command, function_cell (func), FUNC_MULTILINE|FUNC_EXTERNAL); + printf ("%s\n", result); + } + else if (dflags & CDESC_REUSABLE) + printf ("%s\n", command); + + found = 1; + + if (all == 0) + return (1); + } + + /* Command is a builtin? */ + if (((dflags & CDESC_FORCE_PATH) == 0) && find_shell_builtin (command)) + { + if (dflags & CDESC_TYPE) + puts ("builtin"); + else if (dflags & CDESC_SHORTDESC) + { + if (posixly_correct && find_special_builtin (command) != 0) + printf (_("%s is a special shell builtin\n"), command); + else + printf (_("%s is a shell builtin\n"), command); + } + else if (dflags & CDESC_REUSABLE) + printf ("%s\n", command); + + found = 1; + + if (all == 0) + return (1); + } + + /* Command is a disk file? */ + /* If the command name given is already an absolute command, just + check to see if it is executable. */ + if (absolute_program (command)) + { + f = file_status (command); + if (f & FS_EXECABLE) + { + if (dflags & CDESC_TYPE) + puts ("file"); + else if (dflags & CDESC_SHORTDESC) + printf (_("%s is %s\n"), command, command); + else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) + printf ("%s\n", command); + + /* There's no use looking in the hash table or in $PATH, + because they're not consulted when an absolute program + name is supplied. */ + return (1); + } + } + + /* If the user isn't doing "-a", then we might care about + whether the file is present in our hash table. */ + if (all == 0 || (dflags & CDESC_FORCE_PATH)) + { + if (full_path = phash_search (command)) + { + if (dflags & CDESC_TYPE) + puts ("file"); + else if (dflags & CDESC_SHORTDESC) + printf (_("%s is hashed (%s)\n"), command, full_path); + else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) + printf ("%s\n", full_path); + + free (full_path); + return (1); + } + } + + /* Now search through $PATH. */ + while (1) + { + if (dflags & CDESC_STDPATH) /* command -p, all cannot be non-zero */ + { + pathlist = conf_standard_path (); + full_path = find_in_path (command, pathlist, FS_EXEC_PREFERRED|FS_NODIRS); + free (pathlist); + /* Will only go through this once, since all == 0 if STDPATH set */ + } + else if (all == 0) + full_path = find_user_command (command); + else + full_path = user_command_matches (command, FS_EXEC_ONLY, found_file); /* XXX - should that be FS_EXEC_PREFERRED? */ + + if (full_path == 0) + break; + + /* If we found the command as itself by looking through $PATH, it + probably doesn't exist. Check whether or not the command is an + executable file. If it's not, don't report a match. This is + the default posix mode behavior */ + if (STREQ (full_path, command) || posixly_correct) + { + f = file_status (full_path); + if ((f & FS_EXECABLE) == 0) + { + free (full_path); + full_path = (char *)NULL; + if (all == 0) + break; + } + else if (ABSPATH (full_path)) + ; /* placeholder; don't need to do anything yet */ + else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY|CDESC_SHORTDESC)) + { + f = MP_DOCWD | ((dflags & CDESC_ABSPATH) ? MP_RMDOT : 0); + x = sh_makepath ((char *)NULL, full_path, f); + free (full_path); + full_path = x; + } + } + /* If we require a full path and don't have one, make one */ + else if ((dflags & CDESC_ABSPATH) && ABSPATH (full_path) == 0) + { + x = sh_makepath ((char *)NULL, full_path, MP_DOCWD|MP_RMDOT); + free (full_path); + full_path = x; + } + + found_file++; + found = 1; + + if (dflags & CDESC_TYPE) + puts ("file"); + else if (dflags & CDESC_SHORTDESC) + printf (_("%s is %s\n"), command, full_path); + else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) + printf ("%s\n", full_path); + + free (full_path); + full_path = (char *)NULL; + + if (all == 0) + break; + } + + return (found); +} diff --git a/bash-5.1/builtins_org/ulimit.def b/bash-5.1/builtins_org/ulimit.def new file mode 100644 index 0000000000000000000000000000000000000000..a895c5e26de00a737a23a5b9173d83a8e5d08ca9 --- /dev/null +++ b/bash-5.1/builtins_org/ulimit.def @@ -0,0 +1,800 @@ +This file is ulimit.def, from which is created ulimit.c. +It implements the builtin "ulimit" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES ulimit.c + +$BUILTIN ulimit +$FUNCTION ulimit_builtin +$DEPENDS_ON !_MINIX +$SHORT_DOC ulimit [-SHabcdefiklmnpqrstuvxPT] [limit] +Modify shell resource limits. + +Provides control over the resources available to the shell and processes +it creates, on systems that allow such control. + +Options: + -S use the `soft' resource limit + -H use the `hard' resource limit + -a all current limits are reported + -b the socket buffer size + -c the maximum size of core files created + -d the maximum size of a process's data segment + -e the maximum scheduling priority (`nice') + -f the maximum size of files written by the shell and its children + -i the maximum number of pending signals + -k the maximum number of kqueues allocated for this process + -l the maximum size a process may lock into memory + -m the maximum resident set size + -n the maximum number of open file descriptors + -p the pipe buffer size + -q the maximum number of bytes in POSIX message queues + -r the maximum real-time scheduling priority + -s the maximum stack size + -t the maximum amount of cpu time in seconds + -u the maximum number of user processes + -v the size of virtual memory + -x the maximum number of file locks + -P the maximum number of pseudoterminals + -R the maximum time a real-time process can run before blocking + -T the maximum number of threads + +Not all options are available on all platforms. + +If LIMIT is given, it is the new value of the specified resource; the +special LIMIT values `soft', `hard', and `unlimited' stand for the +current soft limit, the current hard limit, and no limit, respectively. +Otherwise, the current value of the specified resource is printed. If +no option is given, then -f is assumed. + +Values are in 1024-byte increments, except for -t, which is in seconds, +-p, which is in increments of 512 bytes, and -u, which is an unscaled +number of processes. + +Exit Status: +Returns success unless an invalid option is supplied or an error occurs. +$END + +#if !defined (_MINIX) + +#include + +#include "../bashtypes.h" +#if defined (HAVE_SYS_PARAM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include + +#include "../bashintl.h" + +#include "../shell.h" +#include "common.h" +#include "bashgetopt.h" +#include "pipesize.h" + +#if !defined (errno) +extern int errno; +#endif + +/* For some reason, HPUX chose to make these definitions visible only if + _KERNEL is defined, so we define _KERNEL before including + and #undef it afterward. */ +#if defined (HAVE_RESOURCE) +# include +# if defined (HPUX) && defined (RLIMIT_NEEDS_KERNEL) +# define _KERNEL +# endif +# include +# if defined (HPUX) && defined (RLIMIT_NEEDS_KERNEL) +# undef _KERNEL +# endif +#elif defined (HAVE_SYS_TIMES_H) +# include +#endif + +#if defined (HAVE_LIMITS_H) +# include +#endif + +/* Check for the most basic symbols. If they aren't present, this + system's isn't very useful to us. */ +#if !defined (RLIMIT_FSIZE) || !defined (HAVE_GETRLIMIT) +# undef HAVE_RESOURCE +#endif + +#if !defined (HAVE_RESOURCE) && defined (HAVE_ULIMIT_H) +# include +#endif + +#if !defined (RLIMTYPE) +# define RLIMTYPE long +# define string_to_rlimtype(s) strtol(s, (char **)NULL, 10) +# define print_rlimtype(num, nl) printf ("%ld%s", num, nl ? "\n" : "") +#endif + +/* Alternate names */ + +/* Some systems use RLIMIT_NOFILE, others use RLIMIT_OFILE */ +#if defined (HAVE_RESOURCE) && defined (RLIMIT_OFILE) && !defined (RLIMIT_NOFILE) +# define RLIMIT_NOFILE RLIMIT_OFILE +#endif /* HAVE_RESOURCE && RLIMIT_OFILE && !RLIMIT_NOFILE */ + +#if defined (HAVE_RESOURCE) && defined (RLIMIT_POSIXLOCKS) && !defined (RLIMIT_LOCKS) +# define RLIMIT_LOCKS RLIMIT_POSIXLOCKS +#endif /* HAVE_RESOURCE && RLIMIT_POSIXLOCKS && !RLIMIT_LOCKS */ + +/* Some systems have these, some do not. */ +#ifdef RLIMIT_FSIZE +# define RLIMIT_FILESIZE RLIMIT_FSIZE +#else +# define RLIMIT_FILESIZE 256 +#endif + +#define RLIMIT_PIPESIZE 257 + +#ifdef RLIMIT_NOFILE +# define RLIMIT_OPENFILES RLIMIT_NOFILE +#else +# define RLIMIT_OPENFILES 258 +#endif + +#ifdef RLIMIT_VMEM +# define RLIMIT_VIRTMEM RLIMIT_VMEM +# define RLIMIT_VMBLKSZ 1024 +#else +# ifdef RLIMIT_AS +# define RLIMIT_VIRTMEM RLIMIT_AS +# define RLIMIT_VMBLKSZ 1024 +# else +# define RLIMIT_VIRTMEM 259 +# define RLIMIT_VMBLKSZ 1 +# endif +#endif + +#ifdef RLIMIT_NPROC +# define RLIMIT_MAXUPROC RLIMIT_NPROC +#else +# define RLIMIT_MAXUPROC 260 +#endif + +#if !defined (RLIMIT_PTHREAD) && defined (RLIMIT_NTHR) +# define RLIMIT_PTHREAD RLIMIT_NTHR +#endif + +#if !defined (RLIM_INFINITY) +# define RLIM_INFINITY 0x7fffffff +#endif + +#if !defined (RLIM_SAVED_CUR) +# define RLIM_SAVED_CUR RLIM_INFINITY +#endif + +#if !defined (RLIM_SAVED_MAX) +# define RLIM_SAVED_MAX RLIM_INFINITY +#endif + +#define LIMIT_HARD 0x01 +#define LIMIT_SOFT 0x02 + +/* "Blocks" are defined as 512 bytes when in Posix mode and 1024 bytes + otherwise. */ +#define POSIXBLK -2 + +#define BLOCKSIZE(x) (((x) == POSIXBLK) ? (posixly_correct ? 512 : 1024) : (x)) + +static int _findlim PARAMS((int)); + +static int ulimit_internal PARAMS((int, char *, int, int)); + +static int get_limit PARAMS((int, RLIMTYPE *, RLIMTYPE *)); +static int set_limit PARAMS((int, RLIMTYPE, int)); + +static void printone PARAMS((int, RLIMTYPE, int)); +static void print_all_limits PARAMS((int)); + +static int set_all_limits PARAMS((int, RLIMTYPE)); + +static int filesize PARAMS((RLIMTYPE *)); +static int pipesize PARAMS((RLIMTYPE *)); +static int getmaxuprc PARAMS((RLIMTYPE *)); +static int getmaxvm PARAMS((RLIMTYPE *, RLIMTYPE *)); + +typedef struct { + int option; /* The ulimit option for this limit. */ + int parameter; /* Parameter to pass to get_limit (). */ + int block_factor; /* Blocking factor for specific limit. */ + const char * const description; /* Descriptive string to output. */ + const char * const units; /* scale */ +} RESOURCE_LIMITS; + +static RESOURCE_LIMITS limits[] = { +#ifdef RLIMIT_NPTS + { 'P', RLIMIT_NPTS, 1, "number of pseudoterminals", (char *)NULL }, +#endif +#ifdef RLIMIT_RTTIME + { 'R', RLIMIT_RTTIME, 1, "real-time non-blocking time", "microseconds" }, +#endif +#ifdef RLIMIT_PTHREAD + { 'T', RLIMIT_PTHREAD, 1, "number of threads", (char *)NULL }, +#endif +#ifdef RLIMIT_SBSIZE + { 'b', RLIMIT_SBSIZE, 1, "socket buffer size", "bytes" }, +#endif +#ifdef RLIMIT_CORE + { 'c', RLIMIT_CORE, POSIXBLK, "core file size", "blocks" }, +#endif +#ifdef RLIMIT_DATA + { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" }, +#endif +#ifdef RLIMIT_NICE + { 'e', RLIMIT_NICE, 1, "scheduling priority", (char *)NULL }, +#endif + { 'f', RLIMIT_FILESIZE, POSIXBLK, "file size", "blocks" }, +#ifdef RLIMIT_SIGPENDING + { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL }, +#endif +#ifdef RLIMIT_KQUEUES + { 'k', RLIMIT_KQUEUES, 1, "max kqueues", (char *)NULL }, +#endif +#ifdef RLIMIT_MEMLOCK + { 'l', RLIMIT_MEMLOCK, 1024, "max locked memory", "kbytes" }, +#endif +#ifdef RLIMIT_RSS + { 'm', RLIMIT_RSS, 1024, "max memory size", "kbytes" }, +#endif /* RLIMIT_RSS */ + { 'n', RLIMIT_OPENFILES, 1, "open files", (char *)NULL}, + { 'p', RLIMIT_PIPESIZE, 512, "pipe size", "512 bytes" }, +#ifdef RLIMIT_MSGQUEUE + { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" }, +#endif +#ifdef RLIMIT_RTPRIO + { 'r', RLIMIT_RTPRIO, 1, "real-time priority", (char *)NULL }, +#endif +#ifdef RLIMIT_STACK + { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" }, +#endif +#ifdef RLIMIT_CPU + { 't', RLIMIT_CPU, 1, "cpu time", "seconds" }, +#endif /* RLIMIT_CPU */ + { 'u', RLIMIT_MAXUPROC, 1, "max user processes", (char *)NULL }, +#if defined (HAVE_RESOURCE) + { 'v', RLIMIT_VIRTMEM, RLIMIT_VMBLKSZ, "virtual memory", "kbytes" }, +#endif +#ifdef RLIMIT_SWAP + { 'w', RLIMIT_SWAP, 1024, "swap size", "kbytes" }, +#endif +#ifdef RLIMIT_LOCKS + { 'x', RLIMIT_LOCKS, 1, "file locks", (char *)NULL }, +#endif + { -1, -1, -1, (char *)NULL, (char *)NULL } +}; +#define NCMDS (sizeof(limits) / sizeof(limits[0])) + +typedef struct _cmd { + int cmd; + char *arg; +} ULCMD; + +static ULCMD *cmdlist; +static int ncmd; +static int cmdlistsz; + +#if !defined (HAVE_RESOURCE) && !defined (HAVE_ULIMIT) +long +ulimit (cmd, newlim) + int cmd; + long newlim; +{ + errno = EINVAL; + return -1; +} +#endif /* !HAVE_RESOURCE && !HAVE_ULIMIT */ + +static int +_findlim (opt) + int opt; +{ + register int i; + + for (i = 0; limits[i].option > 0; i++) + if (limits[i].option == opt) + return i; + return -1; +} + +static char optstring[4 + 2 * NCMDS]; + +/* Report or set limits associated with certain per-process resources. + See the help documentation in builtins.c for a full description. */ +int +ulimit_builtin (list) + register WORD_LIST *list; +{ + register char *s; + int c, limind, mode, opt, all_limits; + + mode = 0; + + all_limits = 0; + + /* Idea stolen from pdksh -- build option string the first time called. */ + if (optstring[0] == 0) + { + s = optstring; + *s++ = 'a'; *s++ = 'S'; *s++ = 'H'; + for (c = 0; limits[c].option > 0; c++) + { + *s++ = limits[c].option; + *s++ = ';'; + } + *s = '\0'; + } + + /* Initialize the command list. */ + if (cmdlistsz == 0) + cmdlist = (ULCMD *)xmalloc ((cmdlistsz = 16) * sizeof (ULCMD)); + ncmd = 0; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, optstring)) != -1) + { + switch (opt) + { + case 'a': + all_limits++; + break; + + /* -S and -H are modifiers, not real options. */ + case 'S': + mode |= LIMIT_SOFT; + break; + + case 'H': + mode |= LIMIT_HARD; + break; + + CASE_HELPOPT; + case '?': + builtin_usage (); + return (EX_USAGE); + + default: + if (ncmd >= cmdlistsz) + cmdlist = (ULCMD *)xrealloc (cmdlist, (cmdlistsz *= 2) * sizeof (ULCMD)); + cmdlist[ncmd].cmd = opt; + cmdlist[ncmd++].arg = list_optarg; + break; + } + } + list = loptend; + + if (all_limits) + { +#ifdef NOTYET + if (list) /* setting */ + { + if (STREQ (list->word->word, "unlimited") == 0) + { + builtin_error (_("%s: invalid limit argument"), list->word->word); + return (EXECUTION_FAILURE); + } + return (set_all_limits (mode == 0 ? LIMIT_SOFT|LIMIT_HARD : mode, RLIM_INFINITY)); + } +#endif + print_all_limits (mode == 0 ? LIMIT_SOFT : mode); + return (sh_chkwrite (EXECUTION_SUCCESS)); + } + + /* default is `ulimit -f' */ + if (ncmd == 0) + { + cmdlist[ncmd].cmd = 'f'; + /* `ulimit something' is same as `ulimit -f something' */ + cmdlist[ncmd++].arg = list ? list->word->word : (char *)NULL; + if (list) + list = list->next; + } + + /* verify each command in the list. */ + for (c = 0; c < ncmd; c++) + { + limind = _findlim (cmdlist[c].cmd); + if (limind == -1) + { + builtin_error (_("`%c': bad command"), cmdlist[c].cmd); + return (EX_USAGE); + } + } + + for (c = 0; c < ncmd; c++) + if (ulimit_internal (cmdlist[c].cmd, cmdlist[c].arg, mode, ncmd > 1) == EXECUTION_FAILURE) + return (EXECUTION_FAILURE); + + return (EXECUTION_SUCCESS); +} + +static int +ulimit_internal (cmd, cmdarg, mode, multiple) + int cmd; + char *cmdarg; + int mode, multiple; +{ + int opt, limind, setting; + int block_factor; + RLIMTYPE soft_limit, hard_limit, real_limit, limit; + + setting = cmdarg != 0; + limind = _findlim (cmd); + if (mode == 0) + mode = setting ? (LIMIT_HARD|LIMIT_SOFT) : LIMIT_SOFT; + opt = get_limit (limind, &soft_limit, &hard_limit); + if (opt < 0) + { + builtin_error (_("%s: cannot get limit: %s"), limits[limind].description, + strerror (errno)); + return (EXECUTION_FAILURE); + } + + if (setting == 0) /* print the value of the specified limit */ + { + printone (limind, (mode & LIMIT_SOFT) ? soft_limit : hard_limit, multiple); + return (EXECUTION_SUCCESS); + } + + /* Setting the limit. */ + if (STREQ (cmdarg, "hard")) + real_limit = hard_limit; + else if (STREQ (cmdarg, "soft")) + real_limit = soft_limit; + else if (STREQ (cmdarg, "unlimited")) + real_limit = RLIM_INFINITY; + else if (all_digits (cmdarg)) + { + limit = string_to_rlimtype (cmdarg); + block_factor = BLOCKSIZE(limits[limind].block_factor); + real_limit = limit * block_factor; + + if ((real_limit / block_factor) != limit) + { + sh_erange (cmdarg, _("limit")); + return (EXECUTION_FAILURE); + } + } + else + { + sh_invalidnum (cmdarg); + return (EXECUTION_FAILURE); + } + + if (set_limit (limind, real_limit, mode) < 0) + { + builtin_error (_("%s: cannot modify limit: %s"), limits[limind].description, + strerror (errno)); + return (EXECUTION_FAILURE); + } + + return (EXECUTION_SUCCESS); +} + +static int +get_limit (ind, softlim, hardlim) + int ind; + RLIMTYPE *softlim, *hardlim; +{ + RLIMTYPE value; +#if defined (HAVE_RESOURCE) + struct rlimit limit; +#endif + + if (limits[ind].parameter >= 256) + { + switch (limits[ind].parameter) + { + case RLIMIT_FILESIZE: + if (filesize (&value) < 0) + return -1; + break; + case RLIMIT_PIPESIZE: + if (pipesize (&value) < 0) + return -1; + break; + case RLIMIT_OPENFILES: + value = (RLIMTYPE)getdtablesize (); + break; + case RLIMIT_VIRTMEM: + return (getmaxvm (softlim, hardlim)); + case RLIMIT_MAXUPROC: + if (getmaxuprc (&value) < 0) + return -1; + break; + default: + errno = EINVAL; + return -1; + } + *softlim = *hardlim = value; + return (0); + } + else + { +#if defined (HAVE_RESOURCE) + if (getrlimit (limits[ind].parameter, &limit) < 0) + return -1; + *softlim = limit.rlim_cur; + *hardlim = limit.rlim_max; +# if defined (HPUX9) + if (limits[ind].parameter == RLIMIT_FILESIZE) + { + *softlim *= 512; + *hardlim *= 512; /* Ugh. */ + } + else +# endif /* HPUX9 */ + return 0; +#else + errno = EINVAL; + return -1; +#endif + } +} + +static int +set_limit (ind, newlim, mode) + int ind; + RLIMTYPE newlim; + int mode; +{ +#if defined (HAVE_RESOURCE) + struct rlimit limit; + RLIMTYPE val; +#endif + + if (limits[ind].parameter >= 256) + switch (limits[ind].parameter) + { + case RLIMIT_FILESIZE: +#if !defined (HAVE_RESOURCE) + return (ulimit (2, newlim / 512L)); +#else + errno = EINVAL; + return -1; +#endif + + case RLIMIT_OPENFILES: +#if defined (HAVE_SETDTABLESIZE) +# if defined (__CYGWIN__) + /* Grrr... Cygwin declares setdtablesize as void. */ + setdtablesize (newlim); + return 0; +# else + return (setdtablesize (newlim)); +# endif +#endif + case RLIMIT_PIPESIZE: + case RLIMIT_VIRTMEM: + case RLIMIT_MAXUPROC: + default: + errno = EINVAL; + return -1; + } + else + { +#if defined (HAVE_RESOURCE) + if (getrlimit (limits[ind].parameter, &limit) < 0) + return -1; +# if defined (HPUX9) + if (limits[ind].parameter == RLIMIT_FILESIZE) + newlim /= 512; /* Ugh. */ +# endif /* HPUX9 */ + val = (current_user.euid != 0 && newlim == RLIM_INFINITY && + (mode & LIMIT_HARD) == 0 && /* XXX -- test */ + (limit.rlim_cur <= limit.rlim_max)) + ? limit.rlim_max : newlim; + if (mode & LIMIT_SOFT) + limit.rlim_cur = val; + if (mode & LIMIT_HARD) + limit.rlim_max = val; + + return (setrlimit (limits[ind].parameter, &limit)); +#else + errno = EINVAL; + return -1; +#endif + } +} + +static int +getmaxvm (softlim, hardlim) + RLIMTYPE *softlim, *hardlim; +{ +#if defined (HAVE_RESOURCE) + struct rlimit datalim, stacklim; + + if (getrlimit (RLIMIT_DATA, &datalim) < 0) + return -1; + + if (getrlimit (RLIMIT_STACK, &stacklim) < 0) + return -1; + + /* Protect against overflow. */ + *softlim = (datalim.rlim_cur / 1024L) + (stacklim.rlim_cur / 1024L); + *hardlim = (datalim.rlim_max / 1024L) + (stacklim.rlim_max / 1024L); + return 0; +#else + errno = EINVAL; + return -1; +#endif /* HAVE_RESOURCE */ +} + +static int +filesize(valuep) + RLIMTYPE *valuep; +{ +#if !defined (HAVE_RESOURCE) + long result; + if ((result = ulimit (1, 0L)) < 0) + return -1; + else + *valuep = (RLIMTYPE) result * 512; + return 0; +#else + errno = EINVAL; + return -1; +#endif +} + +static int +pipesize (valuep) + RLIMTYPE *valuep; +{ +#if defined (PIPE_BUF) + /* This is defined on Posix systems. */ + *valuep = (RLIMTYPE) PIPE_BUF; + return 0; +#else +# if defined (_POSIX_PIPE_BUF) + *valuep = (RLIMTYPE) _POSIX_PIPE_BUF; + return 0; +# else +# if defined (PIPESIZE) + /* This is defined by running a program from the Makefile. */ + *valuep = (RLIMTYPE) PIPESIZE; + return 0; +# else + errno = EINVAL; + return -1; +# endif /* PIPESIZE */ +# endif /* _POSIX_PIPE_BUF */ +#endif /* PIPE_BUF */ +} + +static int +getmaxuprc (valuep) + RLIMTYPE *valuep; +{ + long maxchild; + + maxchild = getmaxchild (); + if (maxchild < 0) + { + errno = EINVAL; + return -1; + } + else + { + *valuep = (RLIMTYPE) maxchild; + return 0; + } +} + +static void +print_all_limits (mode) + int mode; +{ + register int i; + RLIMTYPE softlim, hardlim; + + if (mode == 0) + mode |= LIMIT_SOFT; + + for (i = 0; limits[i].option > 0; i++) + { + if (get_limit (i, &softlim, &hardlim) == 0) + printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1); + else if (errno != EINVAL) + builtin_error ("%s: cannot get limit: %s", limits[i].description, + strerror (errno)); + } +} + +static void +printone (limind, curlim, pdesc) + int limind; + RLIMTYPE curlim; + int pdesc; +{ + char unitstr[64]; + int factor; + + factor = BLOCKSIZE(limits[limind].block_factor); + if (pdesc) + { + if (limits[limind].units) + sprintf (unitstr, "(%s, -%c) ", limits[limind].units, limits[limind].option); + else + sprintf (unitstr, "(-%c) ", limits[limind].option); + + printf ("%-20s %20s", limits[limind].description, unitstr); + } + if (curlim == RLIM_INFINITY) + puts ("unlimited"); + else if (curlim == RLIM_SAVED_MAX) + puts ("hard"); + else if (curlim == RLIM_SAVED_CUR) + puts ("soft"); + else + print_rlimtype ((curlim / factor), 1); +} + +/* Set all limits to NEWLIM. NEWLIM currently must be RLIM_INFINITY, which + causes all limits to be set as high as possible depending on mode (like + csh `unlimit'). Returns -1 if NEWLIM is invalid, 0 if all limits + were set successfully, and 1 if at least one limit could not be set. + + To raise all soft limits to their corresponding hard limits, use + ulimit -S -a unlimited + To attempt to raise all hard limits to infinity (superuser-only), use + ulimit -H -a unlimited + To attempt to raise all soft and hard limits to infinity, use + ulimit -a unlimited +*/ + +static int +set_all_limits (mode, newlim) + int mode; + RLIMTYPE newlim; +{ + register int i; + int retval = 0; + + if (newlim != RLIM_INFINITY) + { + errno = EINVAL; + return -1; + } + + if (mode == 0) + mode = LIMIT_SOFT|LIMIT_HARD; + + for (retval = i = 0; limits[i].option > 0; i++) + if (set_limit (i, newlim, mode) < 0) + { + builtin_error (_("%s: cannot modify limit: %s"), limits[i].description, + strerror (errno)); + retval = 1; + } + return retval; +} + +#endif /* !_MINIX */ diff --git a/bash-5.1/builtins_org/umask.def b/bash-5.1/builtins_org/umask.def new file mode 100644 index 0000000000000000000000000000000000000000..8041d56b70832bc0f8cf91120e452423f274ea04 --- /dev/null +++ b/bash-5.1/builtins_org/umask.def @@ -0,0 +1,317 @@ +This file is umask.def, from which is created umask.c. +It implements the builtin "umask" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$PRODUCES umask.c + +$BUILTIN umask +$FUNCTION umask_builtin +$SHORT_DOC umask [-p] [-S] [mode] +Display or set file mode mask. + +Sets the user file-creation mask to MODE. If MODE is omitted, prints +the current value of the mask. + +If MODE begins with a digit, it is interpreted as an octal number; +otherwise it is a symbolic mode string like that accepted by chmod(1). + +Options: + -p if MODE is omitted, output in a form that may be reused as input + -S makes the output symbolic; otherwise an octal number is output + +Exit Status: +Returns success unless MODE is invalid or an invalid option is given. +$END + +#include + +#include "../bashtypes.h" +#include "filecntl.h" +#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +#include +#endif + +#include +#include + +#include "../bashintl.h" + +#include "../shell.h" +#include "posixstat.h" +#include "common.h" +#include "bashgetopt.h" + +/* **************************************************************** */ +/* */ +/* UMASK Builtin and Helpers */ +/* */ +/* **************************************************************** */ + +static void print_symbolic_umask PARAMS((mode_t)); +static int symbolic_umask PARAMS((WORD_LIST *)); + +/* Set or display the mask used by the system when creating files. Flag + of -S means display the umask in a symbolic mode. */ +int +umask_builtin (list) + WORD_LIST *list; +{ + int print_symbolically, opt, umask_value, pflag; + mode_t umask_arg; + + print_symbolically = pflag = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "Sp")) != -1) + { + switch (opt) + { + case 'S': + print_symbolically++; + break; + case 'p': + pflag++; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + if (list) + { + if (DIGIT (*list->word->word)) + { + umask_value = read_octal (list->word->word); + + /* Note that other shells just let you set the umask to zero + by specifying a number out of range. This is a problem + with those shells. We don't change the umask if the input + is lousy. */ + if (umask_value == -1) + { + sh_erange (list->word->word, _("octal number")); + return (EXECUTION_FAILURE); + } + } + else + { + umask_value = symbolic_umask (list); + if (umask_value == -1) + return (EXECUTION_FAILURE); + } + umask_arg = (mode_t)umask_value; + umask (umask_arg); + if (print_symbolically) + print_symbolic_umask (umask_arg); + } + else /* Display the UMASK for this user. */ + { + umask_arg = umask (022); + umask (umask_arg); + + if (pflag) + printf ("umask%s ", (print_symbolically ? " -S" : "")); + if (print_symbolically) + print_symbolic_umask (umask_arg); + else + printf ("%04lo\n", (unsigned long)umask_arg); + } + + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +/* Print the umask in a symbolic form. In the output, a letter is + printed if the corresponding bit is clear in the umask. */ +static void +#if defined (__STDC__) +print_symbolic_umask (mode_t um) +#else +print_symbolic_umask (um) + mode_t um; +#endif +{ + char ubits[4], gbits[4], obits[4]; /* u=rwx,g=rwx,o=rwx */ + int i; + + i = 0; + if ((um & S_IRUSR) == 0) + ubits[i++] = 'r'; + if ((um & S_IWUSR) == 0) + ubits[i++] = 'w'; + if ((um & S_IXUSR) == 0) + ubits[i++] = 'x'; + ubits[i] = '\0'; + + i = 0; + if ((um & S_IRGRP) == 0) + gbits[i++] = 'r'; + if ((um & S_IWGRP) == 0) + gbits[i++] = 'w'; + if ((um & S_IXGRP) == 0) + gbits[i++] = 'x'; + gbits[i] = '\0'; + + i = 0; + if ((um & S_IROTH) == 0) + obits[i++] = 'r'; + if ((um & S_IWOTH) == 0) + obits[i++] = 'w'; + if ((um & S_IXOTH) == 0) + obits[i++] = 'x'; + obits[i] = '\0'; + + printf ("u=%s,g=%s,o=%s\n", ubits, gbits, obits); +} + +int +parse_symbolic_mode (mode, initial_bits) + char *mode; + int initial_bits; +{ + int who, op, perm, bits, c; + char *s; + + for (s = mode, bits = initial_bits;;) + { + who = op = perm = 0; + + /* Parse the `who' portion of the symbolic mode clause. */ + while (member (*s, "agou")) + { + switch (c = *s++) + { + case 'u': + who |= S_IRWXU; + continue; + case 'g': + who |= S_IRWXG; + continue; + case 'o': + who |= S_IRWXO; + continue; + case 'a': + who |= S_IRWXU | S_IRWXG | S_IRWXO; + continue; + default: + break; + } + } + + /* The operation is now sitting in *s. */ + op = *s++; + switch (op) + { + case '+': + case '-': + case '=': + break; + default: + builtin_error (_("`%c': invalid symbolic mode operator"), op); + return (-1); + } + + /* Parse out the `perm' section of the symbolic mode clause. */ + while (member (*s, "rwx")) + { + c = *s++; + + switch (c) + { + case 'r': + perm |= S_IRUGO; + break; + case 'w': + perm |= S_IWUGO; + break; + case 'x': + perm |= S_IXUGO; + break; + } + } + + /* Now perform the operation or return an error for a + bad permission string. */ + if (!*s || *s == ',') + { + if (who) + perm &= who; + + switch (op) + { + case '+': + bits |= perm; + break; + case '-': + bits &= ~perm; + break; + case '=': + if (who == 0) + who = S_IRWXU | S_IRWXG | S_IRWXO; + bits &= ~who; + bits |= perm; + break; + + /* No other values are possible. */ + } + + if (*s == '\0') + break; + else + s++; /* skip past ',' */ + } + else + { + builtin_error (_("`%c': invalid symbolic mode character"), *s); + return (-1); + } + } + + return (bits); +} + +/* Set the umask from a symbolic mode string similar to that accepted + by chmod. If the -S argument is given, then print the umask in a + symbolic form. */ +static int +symbolic_umask (list) + WORD_LIST *list; +{ + int um, bits; + + /* Get the initial umask. Don't change it yet. */ + um = umask (022); + umask (um); + + /* All work is done with the complement of the umask -- it's + more intuitive and easier to deal with. It is complemented + again before being returned. */ + bits = parse_symbolic_mode (list->word->word, ~um & 0777); + if (bits == -1) + return (-1); + + um = ~bits & 0777; + return (um); +} diff --git a/bash-5.1/builtins_org/wait.def b/bash-5.1/builtins_org/wait.def new file mode 100644 index 0000000000000000000000000000000000000000..824c83fe1d330bccc75f06274c6dd002320f7cd9 --- /dev/null +++ b/bash-5.1/builtins_org/wait.def @@ -0,0 +1,364 @@ +This file is wait.def, from which is created wait.c. +It implements the builtin "wait" in Bash. + +Copyright (C) 1987-2020 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash 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. + +Bash 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 Bash. If not, see . + +$BUILTIN wait +$FUNCTION wait_builtin +$DEPENDS_ON JOB_CONTROL +$PRODUCES wait.c +$SHORT_DOC wait [-fn] [-p var] [id ...] +Wait for job completion and return exit status. + +Waits for each process identified by an ID, which may be a process ID or a +job specification, and reports its termination status. If ID is not +given, waits for all currently active child processes, and the return +status is zero. If ID is a job specification, waits for all processes +in that job's pipeline. + +If the -n option is supplied, waits for a single job from the list of IDs, +or, if no IDs are supplied, for the next job to complete and returns its +exit status. + +If the -p option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable VAR +named by the option argument. The variable will be unset initially, before +any assignment. This is useful only when the -n option is supplied. + +If the -f option is supplied, and job control is enabled, waits for the +specified ID to terminate, instead of waiting for it to change status. + +Exit Status: +Returns the status of the last ID; fails if ID is invalid or an invalid +option is given, or if -n is supplied and the shell has no unwaited-for +children. +$END + +$BUILTIN wait +$FUNCTION wait_builtin +$DEPENDS_ON !JOB_CONTROL +$SHORT_DOC wait [pid ...] +Wait for process completion and return exit status. + +Waits for each process specified by a PID and reports its termination status. +If PID is not given, waits for all currently active child processes, +and the return status is zero. PID must be a process ID. + +Exit Status: +Returns the status of the last PID; fails if PID is invalid or an invalid +option is given. +$END + +#include + +#include "../bashtypes.h" +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include "../bashansi.h" + +#include "../shell.h" +#include "../execute_cmd.h" +#include "../jobs.h" +#include "../trap.h" +#include "../sig.h" +#include "common.h" +#include "bashgetopt.h" + +extern int wait_signal_received; + +procenv_t wait_intr_buf; +int wait_intr_flag; + +static int set_waitlist PARAMS((WORD_LIST *)); +static void unset_waitlist PARAMS((void)); + +/* Wait for the pid in LIST to stop or die. If no arguments are given, then + wait for all of the active background processes of the shell and return + 0. If a list of pids or job specs are given, return the exit status of + the last one waited for. */ + +#define WAIT_RETURN(s) \ + do \ + { \ + wait_signal_received = 0; \ + wait_intr_flag = 0; \ + return (s);\ + } \ + while (0) + +int +wait_builtin (list) + WORD_LIST *list; +{ + int status, code, opt, nflag, wflags; + char *vname; + SHELL_VAR *pidvar; + struct procstat pstat; + + USE_VAR(list); + + nflag = wflags = 0; + vname = NULL; + pidvar = (SHELL_VAR *)NULL; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "fnp:")) != -1) + { + switch (opt) + { +#if defined (JOB_CONTROL) + case 'n': + nflag = 1; + break; + case 'f': + wflags |= JWAIT_FORCE; + break; + case 'p': + vname = list_optarg; + break; +#endif + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + /* Sanity-check variable name if -p supplied. */ + if (vname) + { +#if defined (ARRAY_VARS) + int arrayflags; + + arrayflags = assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0; + if (legal_identifier (vname) == 0 && valid_array_reference (vname, arrayflags) == 0) +#else + if (legal_identifier (vname) == 0) +#endif + { + sh_invalidid (vname); + WAIT_RETURN (EXECUTION_FAILURE); + } + if (builtin_unbind_variable (vname) == -2) + WAIT_RETURN (EXECUTION_FAILURE); + } + + /* POSIX.2 says: When the shell is waiting (by means of the wait utility) + for asynchronous commands to complete, the reception of a signal for + which a trap has been set shall cause the wait utility to return + immediately with an exit status greater than 128, after which the trap + associated with the signal shall be taken. + + We handle SIGINT here; it's the only one that needs to be treated + specially (I think), since it's handled specially in {no,}jobs.c. */ + wait_intr_flag = 1; + code = setjmp_sigs (wait_intr_buf); + + if (code) + { + last_command_exit_signal = wait_signal_received; + status = 128 + wait_signal_received; + wait_sigint_cleanup (); + WAIT_RETURN (status); + } + + opt = first_pending_trap (); +#if defined (SIGCHLD) + /* We special case SIGCHLD when not in posix mode because we don't break + out of the wait even when the signal is trapped; we run the trap after + the wait completes. See how it's handled in jobs.c:waitchld(). */ + if (opt == SIGCHLD && posixly_correct == 0) + opt = next_pending_trap (opt+1); +#endif + if (opt != -1) + { + last_command_exit_signal = wait_signal_received = opt; + status = opt + 128; + WAIT_RETURN (status); + } + + /* We support jobs or pids. + wait [pid-or-job ...] */ + +#if defined (JOB_CONTROL) + if (nflag) + { + if (list) + { + opt = set_waitlist (list); + if (opt == 0) + WAIT_RETURN (127); + wflags |= JWAIT_WAITING; + } + + status = wait_for_any_job (wflags, &pstat); + if (vname && status >= 0) + bind_var_to_int (vname, pstat.pid); + + if (status < 0) + status = 127; + if (list) + unset_waitlist (); + WAIT_RETURN (status); + } +#endif + + /* But wait without any arguments means to wait for all of the shell's + currently active background processes. */ + if (list == 0) + { + wait_for_background_pids (&pstat); + if (vname) + bind_var_to_int (vname, pstat.pid); + WAIT_RETURN (EXECUTION_SUCCESS); + } + + status = EXECUTION_SUCCESS; + while (list) + { + pid_t pid; + char *w; + intmax_t pid_value; + + w = list->word->word; + if (DIGIT (*w)) + { + if (legal_number (w, &pid_value) && pid_value == (pid_t)pid_value) + { + pid = (pid_t)pid_value; + status = wait_for_single_pid (pid, wflags|JWAIT_PERROR); + pstat.pid = pid; + pstat.status = status; + } + else + { + sh_badpid (w); + pstat.pid = NO_PID; + pstat.status = 127; + WAIT_RETURN (EXECUTION_FAILURE); + } + } +#if defined (JOB_CONTROL) + else if (*w && *w == '%') + /* Must be a job spec. Check it out. */ + { + int job; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + job = get_job_spec (list); + + if (INVALID_JOB (job)) + { + if (job != DUP_JOB) + sh_badjob (list->word->word); + UNBLOCK_CHILD (oset); + status = 127; /* As per Posix.2, section 4.70.2 */ + pstat.pid = NO_PID; + pstat.status = status; + list = list->next; + continue; + } + + /* Job spec used. Wait for the last pid in the pipeline. */ + UNBLOCK_CHILD (oset); + status = wait_for_job (job, wflags, &pstat); + } +#endif /* JOB_CONTROL */ + else + { + sh_badpid (w); + pstat.pid = NO_PID; + pstat.status = 127; + status = EXECUTION_FAILURE; + } + + /* Don't waste time with a longjmp. */ + if (wait_signal_received) + { + last_command_exit_signal = wait_signal_received; + status = 128 + wait_signal_received; + wait_sigint_cleanup (); + WAIT_RETURN (status); + } + + list = list->next; + } + + WAIT_RETURN (status); +} + +#if defined (JOB_CONTROL) +/* Take each valid pid or jobspec in LIST and mark the corresponding job as + J_WAITING, so wait -n knows which jobs to wait for. Return the number of + jobs we found. */ +static int +set_waitlist (list) + WORD_LIST *list; +{ + sigset_t set, oset; + int job, r, njob; + intmax_t pid; + WORD_LIST *l; + + BLOCK_CHILD (set, oset); + njob = 0; + for (l = list; l; l = l->next) + { + job = NO_JOB; + job = (l && legal_number (l->word->word, &pid) && pid == (pid_t) pid) + ? get_job_by_pid ((pid_t) pid, 0, 0) + : get_job_spec (l); + if (job == NO_JOB || jobs == 0 || INVALID_JOB (job)) + { + sh_badjob (l->word->word); + continue; + } + /* We don't check yet to see if one of the desired jobs has already + terminated, but we could. We wait until wait_for_any_job(). This + has the advantage of validating all the arguments. */ + if ((jobs[job]->flags & J_WAITING) == 0) + { + njob++; + jobs[job]->flags |= J_WAITING; + } + } + UNBLOCK_CHILD (oset); + return (njob); +} + +/* Clean up after a call to wait -n jobs */ +static void +unset_waitlist () +{ + int i; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + for (i = 0; i < js.j_jobslots; i++) + if (jobs[i] && (jobs[i]->flags & J_WAITING)) + jobs[i]->flags &= ~J_WAITING; + UNBLOCK_CHILD (oset); +} +#endif diff --git a/bash-5.1/command.h b/bash-5.1/command.h new file mode 100644 index 0000000000000000000000000000000000000000..914198f9d4da00993de9f02415d45fb9b0622b1f --- /dev/null +++ b/bash-5.1/command.h @@ -0,0 +1,408 @@ +/* command.h -- The structures used internally to represent commands, and + the extern declarations of the functions used to create them. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_COMMAND_H_) +#define _COMMAND_H_ + +#include "stdc.h" + +/* Instructions describing what kind of thing to do for a redirection. */ +enum r_instruction { + r_output_direction, r_input_direction, r_inputa_direction, + r_appending_to, r_reading_until, r_reading_string, + r_duplicating_input, r_duplicating_output, r_deblank_reading_until, + r_close_this, r_err_and_out, r_input_output, r_output_force, + r_duplicating_input_word, r_duplicating_output_word, + r_move_input, r_move_output, r_move_input_word, r_move_output_word, + r_append_err_and_out +}; + +/* Redirection flags; values for rflags */ +#define REDIR_VARASSIGN 0x01 + +/* Redirection errors. */ +#define AMBIGUOUS_REDIRECT -1 +#define NOCLOBBER_REDIRECT -2 +#define RESTRICTED_REDIRECT -3 /* can only happen in restricted shells. */ +#define HEREDOC_REDIRECT -4 /* here-doc temp file can't be created */ +#define BADVAR_REDIRECT -5 /* something wrong with {varname}redir */ + +#define CLOBBERING_REDIRECT(ri) \ + (ri == r_output_direction || ri == r_err_and_out) + +#define OUTPUT_REDIRECT(ri) \ + (ri == r_output_direction || ri == r_input_output || ri == r_err_and_out || ri == r_append_err_and_out) + +#define INPUT_REDIRECT(ri) \ + (ri == r_input_direction || ri == r_inputa_direction || ri == r_input_output) + +#define WRITE_REDIRECT(ri) \ + (ri == r_output_direction || \ + ri == r_input_output || \ + ri == r_err_and_out || \ + ri == r_appending_to || \ + ri == r_append_err_and_out || \ + ri == r_output_force) + +/* redirection needs translation */ +#define TRANSLATE_REDIRECT(ri) \ + (ri == r_duplicating_input_word || ri == r_duplicating_output_word || \ + ri == r_move_input_word || ri == r_move_output_word) + +/* Command Types: */ +enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, + cm_connection, cm_function_def, cm_until, cm_group, + cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc }; + +/* Possible values for the `flags' field of a WORD_DESC. */ +#define W_HASDOLLAR (1 << 0) /* Dollar sign present. */ +#define W_QUOTED (1 << 1) /* Some form of quote character is present. */ +#define W_ASSIGNMENT (1 << 2) /* This word is a variable assignment. */ +#define W_SPLITSPACE (1 << 3) /* Split this word on " " regardless of IFS */ +#define W_NOSPLIT (1 << 4) /* Do not perform word splitting on this word because ifs is empty string. */ +#define W_NOGLOB (1 << 5) /* Do not perform globbing on this word. */ +#define W_NOSPLIT2 (1 << 6) /* Don't split word except for $@ expansion (using spaces) because context does not allow it. */ +#define W_TILDEEXP (1 << 7) /* Tilde expand this assignment word */ +#define W_DOLLARAT (1 << 8) /* $@ and its special handling -- UNUSED */ +#define W_DOLLARSTAR (1 << 9) /* $* and its special handling -- UNUSED */ +#define W_NOCOMSUB (1 << 10) /* Don't perform command substitution on this word */ +#define W_ASSIGNRHS (1 << 11) /* Word is rhs of an assignment statement */ +#define W_NOTILDE (1 << 12) /* Don't perform tilde expansion on this word */ +#define W_ITILDE (1 << 13) /* Internal flag for word expansion */ +#define W_EXPANDRHS (1 << 14) /* Expanding word in ${paramOPword} */ +#define W_COMPASSIGN (1 << 15) /* Compound assignment */ +#define W_ASSNBLTIN (1 << 16) /* word is a builtin command that takes assignments */ +#define W_ASSIGNARG (1 << 17) /* word is assignment argument to command */ +#define W_HASQUOTEDNULL (1 << 18) /* word contains a quoted null character */ +#define W_DQUOTE (1 << 19) /* word should be treated as if double-quoted */ +#define W_NOPROCSUB (1 << 20) /* don't perform process substitution */ +#define W_SAWQUOTEDNULL (1 << 21) /* word contained a quoted null that was removed */ +#define W_ASSIGNASSOC (1 << 22) /* word looks like associative array assignment */ +#define W_ASSIGNARRAY (1 << 23) /* word looks like a compound indexed array assignment */ +#define W_ARRAYIND (1 << 24) /* word is an array index being expanded */ +#define W_ASSNGLOBAL (1 << 25) /* word is a global assignment to declare (declare/typeset -g) */ +#define W_NOBRACE (1 << 26) /* Don't perform brace expansion */ +#define W_COMPLETE (1 << 27) /* word is being expanded for completion */ +#define W_CHKLOCAL (1 << 28) /* check for local vars on assignment */ +#define W_NOASSNTILDE (1 << 29) /* don't do tilde expansion like an assignment statement */ +#define W_FORCELOCAL (1 << 30) /* force assignments to be to local variables, non-fatal on assignment errors */ + +/* Flags for the `pflags' argument to param_expand() and various + parameter_brace_expand_xxx functions; also used for string_list_dollar_at */ +#define PF_NOCOMSUB 0x01 /* Do not perform command substitution */ +#define PF_IGNUNBOUND 0x02 /* ignore unbound vars even if -u set */ +#define PF_NOSPLIT2 0x04 /* same as W_NOSPLIT2 */ +#define PF_ASSIGNRHS 0x08 /* same as W_ASSIGNRHS */ +#define PF_COMPLETE 0x10 /* same as W_COMPLETE, sets SX_COMPLETE */ +#define PF_EXPANDRHS 0x20 /* same as W_EXPANDRHS */ +#define PF_ALLINDS 0x40 /* array, act as if [@] was supplied */ + +/* Possible values for subshell_environment */ +#define SUBSHELL_ASYNC 0x01 /* subshell caused by `command &' */ +#define SUBSHELL_PAREN 0x02 /* subshell caused by ( ... ) */ +#define SUBSHELL_COMSUB 0x04 /* subshell caused by `command` or $(command) */ +#define SUBSHELL_FORK 0x08 /* subshell caused by executing a disk command */ +#define SUBSHELL_PIPE 0x10 /* subshell from a pipeline element */ +#define SUBSHELL_PROCSUB 0x20 /* subshell caused by <(command) or >(command) */ +#define SUBSHELL_COPROC 0x40 /* subshell from a coproc pipeline */ +#define SUBSHELL_RESETTRAP 0x80 /* subshell needs to reset trap strings on first call to trap */ + +/* A structure which represents a word. */ +typedef struct word_desc { + char *word; /* Zero terminated string. */ + int flags; /* Flags associated with this word. */ +} WORD_DESC; + +/* A linked list of words. */ +typedef struct word_list { + struct word_list *next; + WORD_DESC *word; +} WORD_LIST; + + +/* **************************************************************** */ +/* */ +/* Shell Command Structs */ +/* */ +/* **************************************************************** */ + +/* What a redirection descriptor looks like. If the redirection instruction + is ri_duplicating_input or ri_duplicating_output, use DEST, otherwise + use the file in FILENAME. Out-of-range descriptors are identified by a + negative DEST. */ + +typedef union { + int dest; /* Place to redirect REDIRECTOR to, or ... */ + WORD_DESC *filename; /* filename to redirect to. */ +} REDIRECTEE; + +/* Structure describing a redirection. If REDIRECTOR is negative, the parser + (or translator in redir.c) encountered an out-of-range file descriptor. */ +typedef struct redirect { + struct redirect *next; /* Next element, or NULL. */ + REDIRECTEE redirector; /* Descriptor or varname to be redirected. */ + int rflags; /* Private flags for this redirection */ + int flags; /* Flag value for `open'. */ + enum r_instruction instruction; /* What to do with the information. */ + REDIRECTEE redirectee; /* File descriptor or filename */ + char *here_doc_eof; /* The word that appeared in <flags. */ +#define CMD_WANT_SUBSHELL 0x01 /* User wants a subshell: ( command ) */ +#define CMD_FORCE_SUBSHELL 0x02 /* Shell needs to force a subshell. */ +#define CMD_INVERT_RETURN 0x04 /* Invert the exit value. */ +#define CMD_IGNORE_RETURN 0x08 /* Ignore the exit value. For set -e. */ +#define CMD_NO_FUNCTIONS 0x10 /* Ignore functions during command lookup. */ +#define CMD_INHIBIT_EXPANSION 0x20 /* Do not expand the command words. */ +#define CMD_NO_FORK 0x40 /* Don't fork; just call execve */ +#define CMD_TIME_PIPELINE 0x80 /* Time a pipeline */ +#define CMD_TIME_POSIX 0x100 /* time -p; use POSIX.2 time output spec. */ +#define CMD_AMPERSAND 0x200 /* command & */ +#define CMD_STDIN_REDIR 0x400 /* async command needs implicit . +*/ + +/*********************************************************/ +/* Modify or set defines based on the configure results. */ +/*********************************************************/ + +#if !defined (HAVE_VPRINTF) && defined (HAVE_DOPRNT) +# define USE_VFPRINTF_EMULATION +# define HAVE_VPRINTF +#endif + +#if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRLIMIT) +# define HAVE_RESOURCE +#endif + +#if !defined (GETPGRP_VOID) +# define HAVE_BSD_PGRP +#endif + +/* Try this without testing __STDC__ for the time being. */ +#if defined (HAVE_STDARG_H) +# define PREFER_STDARG +# define USE_VARARGS +#else +# if defined (HAVE_VARARGS_H) +# define PREFER_VARARGS +# define USE_VARARGS +# endif +#endif + +#if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && defined (HAVE_NETINET_IN_H) +# define HAVE_NETWORK +#endif + +#if defined (HAVE_REGEX_H) && defined (HAVE_REGCOMP) && defined (HAVE_REGEXEC) +# define HAVE_POSIX_REGEXP +#endif + +/* backwards compatibility between different autoconf versions */ +#if HAVE_DECL_SYS_SIGLIST && !defined (SYS_SIGLIST_DECLARED) +# define SYS_SIGLIST_DECLARED +#endif + +/***********************************************************************/ +/* Unset defines based on what configure reports as missing or broken. */ +/***********************************************************************/ + +/* Ultrix botches type-ahead when switching from canonical to + non-canonical mode, at least through version 4.3 */ +#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix) +# define TERMIOS_MISSING +#endif + +/* If we have a getcwd(3), but one that does not dynamically allocate memory, + #undef HAVE_GETCWD so the replacement in getcwd.c will be built. We do + not do this on Solaris, because their implementation of loopback mounts + breaks the traditional file system assumptions that getcwd uses. */ +#if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) && !defined (SOLARIS) +# undef HAVE_GETCWD +#endif + +#if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING) +# undef PROCESS_SUBSTITUTION +#endif + +#if defined (JOB_CONTROL_MISSING) +# undef JOB_CONTROL +#endif + +#if defined (STRCOLL_BROKEN) +# undef HAVE_STRCOLL +#endif + +#if !defined (HAVE_POSIX_REGEXP) +# undef COND_REGEXP +#endif + +#if !HAVE_MKSTEMP +# undef USE_MKSTEMP +#endif + +#if !HAVE_MKDTEMP +# undef USE_MKDTMP +#endif + +/* If the shell is called by this name, it will become restricted. */ +#if defined (RESTRICTED_SHELL) +# define RESTRICTED_SHELL_NAME "rbash" +#endif + +/***********************************************************/ +/* Make sure feature defines have necessary prerequisites. */ +/***********************************************************/ + +/* BANG_HISTORY requires HISTORY. */ +#if defined (BANG_HISTORY) && !defined (HISTORY) +# define HISTORY +#endif /* BANG_HISTORY && !HISTORY */ + +#if defined (READLINE) && !defined (HISTORY) +# define HISTORY +#endif + +#if defined (PROGRAMMABLE_COMPLETION) && !defined (READLINE) +# undef PROGRAMMABLE_COMPLETION +#endif + +#if !defined (V9_ECHO) +# undef DEFAULT_ECHO_TO_XPG +#endif + +#if !defined (PROMPT_STRING_DECODE) +# undef PPROMPT +# define PPROMPT "$ " +#endif + +#if !defined (HAVE_SYSLOG) || !defined (HAVE_SYSLOG_H) +# undef SYSLOG_HISTORY +#endif + +/************************************************/ +/* check multibyte capability for I18N code */ +/************************************************/ + +/* For platforms which support the ISO C amendment 1 functionality we + support user defined character classes. */ +/* Solaris 2.5 has a bug: must be included before . */ +#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) +# include +# include +# if defined (HAVE_ISWCTYPE) && \ + defined (HAVE_ISWLOWER) && \ + defined (HAVE_ISWUPPER) && \ + defined (HAVE_MBSRTOWCS) && \ + defined (HAVE_MBRTOWC) && \ + defined (HAVE_MBRLEN) && \ + defined (HAVE_TOWLOWER) && \ + defined (HAVE_TOWUPPER) && \ + defined (HAVE_WCHAR_T) && \ + defined (HAVE_WCTYPE_T) && \ + defined (HAVE_WINT_T) && \ + defined (HAVE_WCWIDTH) && \ + defined (HAVE_WCTYPE) + /* system is supposed to support XPG5 */ +# define HANDLE_MULTIBYTE 1 +# endif +#endif + +/* If we don't want multibyte chars even on a system that supports them, let + the configuring user turn multibyte support off. */ +#if defined (NO_MULTIBYTE_SUPPORT) +# undef HANDLE_MULTIBYTE +#endif + +/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ +#if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) +# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0) +# define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0) +# define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0) +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) +# define mbrlen(s, n, ps) (mbrlen) (s, n, 0) +# define mbstate_t int +#endif + +/* Make sure MB_LEN_MAX is at least 16 (some systems define + MB_LEN_MAX as 1) */ +#ifdef HANDLE_MULTIBYTE +# include +# if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16) +# undef MB_LEN_MAX +# endif +# if !defined (MB_LEN_MAX) +# define MB_LEN_MAX 16 +# endif +#endif + +/************************************************/ +/* end of multibyte capability checks for I18N */ +/************************************************/ + +/******************************************************************/ +/* Placeholder for builders to #undef any unwanted features from */ +/* config-top.h or created by configure (such as the default mail */ +/* file for mail checking). */ +/******************************************************************/ + +/* If you don't want bash to provide a default mail file to check. */ +/* #undef DEFAULT_MAIL_DIRECTORY */ diff --git a/bash-5.1/config-top.h b/bash-5.1/config-top.h new file mode 100644 index 0000000000000000000000000000000000000000..5149f51129ae31c39dbd2f3728a11f221f547efe --- /dev/null +++ b/bash-5.1/config-top.h @@ -0,0 +1,197 @@ +/* config-top.h - various user-settable options not under the control of autoconf. */ + +/* Copyright (C) 2002-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Define CONTINUE_AFTER_KILL_ERROR if you want the kill command to + continue processing arguments after one of them fails. This is + what POSIX.2 specifies. */ +#define CONTINUE_AFTER_KILL_ERROR + +#define NON_INTERACTIVE_LOGIN_SHELLS + +/* Define BREAK_COMPLAINS if you want the non-standard, but useful + error messages about `break' and `continue' out of context. */ +#define BREAK_COMPLAINS + +/* Define CD_COMPLAINS if you want the non-standard, but sometimes-desired + error messages about multiple directory arguments to `cd'. */ +#define CD_COMPLAINS + +/* Define BUFFERED_INPUT if you want the shell to do its own input + buffering, rather than using stdio. Do not undefine this; it's + required to preserve semantics required by POSIX. */ +#define BUFFERED_INPUT + +/* Define ONESHOT if you want sh -c 'command' to avoid forking to execute + `command' whenever possible. This is a big efficiency improvement. */ +#define ONESHOT + +/* Define V9_ECHO if you want to give the echo builtin backslash-escape + interpretation using the -e option, in the style of the Bell Labs 9th + Edition version of echo. You cannot emulate the System V echo behavior + without this option. */ +#define V9_ECHO + +/* Define DONT_REPORT_SIGPIPE if you don't want to see `Broken pipe' messages + when a job like `cat jobs.c | exit 1' terminates due to a SIGPIPE. */ +#define DONT_REPORT_SIGPIPE + +/* Define DONT_REPORT_SIGTERM if you don't want to see `Terminates' message + when a job exits due to SIGTERM, since that's the default signal sent + by the kill builtin. */ +#define DONT_REPORT_SIGTERM + +/* Define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS if you don't want builtins + like `echo' and `printf' to report errors when output does not succeed + due to EPIPE. */ +#define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS + +/* The default value of the PATH variable. */ +#ifndef DEFAULT_PATH_VALUE +#define DEFAULT_PATH_VALUE \ + "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:." +#endif + +/* If you want to unconditionally set a value for PATH in every restricted + shell, set this. */ +/* #define RBASH_STATIC_PATH_VALUE "/rbin:/usr/rbin" */ + +/* The value for PATH when invoking `command -p'. This is only used when + the Posix.2 confstr () function, or CS_PATH define are not present. */ +#ifndef STANDARD_UTILS_PATH +#define STANDARD_UTILS_PATH \ + "/bin:/usr/bin:/usr/sbin:/sbin" +#endif + +/* Default primary and secondary prompt strings. */ +#define PPROMPT "\\s-\\v\\$ " +#define SPROMPT "> " + +/* Undefine this if you don't want the ksh-compatible behavior of reprinting + the select menu after a valid choice is made only if REPLY is set to NULL + in the body of the select command. The menu is always reprinted if the + reply to the select query is an empty line. */ +#define KSH_COMPATIBLE_SELECT + +/* Default interactive shell startup file. */ +#define DEFAULT_BASHRC "~/.bashrc" + +/* System-wide .bashrc file for interactive shells. */ +/* #define SYS_BASHRC "/etc/bash.bashrc" */ + +/* System-wide .bash_logout for login shells. */ +#define SYS_BASH_LOGOUT "/etc/bash.bash_logout" + +/* Define this to make non-interactive shells begun with argv[0][0] == '-' + run the startup files when not in posix mode. */ +/* #define NON_INTERACTIVE_LOGIN_SHELLS */ + +/* Define this if you want bash to try to check whether it's being run by + sshd and source the .bashrc if so (like the rshd behavior). This checks + for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment, + which can be fooled under certain not-uncommon circumstances. */ +#define SSH_SOURCE_BASHRC + +/* Define if you want the case-toggling operators (~[~]) and the + `capcase' variable attribute (declare -c). */ +/* TAG: bash-5.2 disable */ +#define CASEMOD_TOGGLECASE +#define CASEMOD_CAPCASE + +/* This is used as the name of a shell function to call when a command + name is not found. If you want to name it something other than the + default ("command_not_found_handle"), change it here. */ +/* #define NOTFOUND_HOOK "command_not_found_handle" */ + +/* Define if you want each line saved to the history list in bashhist.c: + bash_add_history() to be sent to syslog(). */ +/* #define SYSLOG_HISTORY */ +#if defined (SYSLOG_HISTORY) +# define SYSLOG_FACILITY LOG_USER +# define SYSLOG_LEVEL LOG_INFO +# define OPENLOG_OPTS LOG_PID +#endif + +/* Define if you want syslogging history to be controllable at runtime via a + shell option; if defined, the value is the default for the syslog_history + shopt option */ +#if defined (SYSLOG_HISTORY) +/* #define SYSLOG_SHOPT 1 */ +#endif + +/* Define if you want to include code in shell.c to support wordexp(3) */ +/* #define WORDEXP_OPTION */ + +/* Define as 1 if you want to enable code that implements multiple coprocs + executing simultaneously */ +#ifndef MULTIPLE_COPROCS +# define MULTIPLE_COPROCS 0 +#endif + +/* Define to 0 if you want the checkwinsize option off by default, 1 if you + want it on. */ +#define CHECKWINSIZE_DEFAULT 1 + +/* Define to 1 if you want to optimize for sequential array assignment when + using indexed arrays, 0 if you want bash-4.2 behavior, which favors + random access but is O(N) for each array assignment. */ +#define OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT 1 + +/* Define to 1 if you want to be able to export indexed arrays to processes + using the foo=([0]=one [1]=two) and so on */ +/* #define ARRAY_EXPORT 1 */ + +/* Define to 1 if you want the shell to exit if it is running setuid and its + attempt to drop privilege using setuid(getuid()) fails with errno == EAGAIN */ +/* #define EXIT_ON_SETUID_FAILURE 1 */ + +/* Define to 1 if you want the shell to re-check $PATH if a hashed filename + no longer exists. This behavior is the default in Posix mode. */ +#define CHECKHASH_DEFAULT 0 + +/* Define to the maximum level of recursion you want for the eval builtin + and trap handlers (since traps are run as if run by eval). + 0 means the limit is not active. */ +#define EVALNEST_MAX 0 + +/* Define to the maximum level of recursion you want for the source/. builtin. + 0 means the limit is not active. */ +#define SOURCENEST_MAX 0 + +/* Define to use libc mktemp/mkstemp instead of replacements in lib/sh/tmpfile.c */ +#define USE_MKTEMP +#define USE_MKSTEMP +#define USE_MKDTEMP + +/* Define to force the value of OLDPWD inherited from the environment to be a + directory */ +#define OLDPWD_CHECK_DIRECTORY 1 + +/* Define to set the initial size of the history list ($HISTSIZE). This must + be a string. */ +/*#define HISTSIZE_DEFAULT "500"*/ + +/* Define to 0 if you want history expansion to be disabled by default in + interactive shells; define to 1 for the historical behavior of enabling + when the shell is interactive. */ +#define HISTEXPAND_DEFAULT 1 + +/* Undefine or define to 0 if you don't want to allow associative array + assignment using a compound list of key-value pairs. */ +#define ASSOC_KVPAIR_ASSIGNMENT 1 diff --git a/bash-5.1/config.h.in b/bash-5.1/config.h.in new file mode 100644 index 0000000000000000000000000000000000000000..369ab55fb1a7d84f1df288d33bd60b3fe802fe72 --- /dev/null +++ b/bash-5.1/config.h.in @@ -0,0 +1,1249 @@ +/* config.h -- Configuration file for bash. */ + +/* Copyright (C) 1987-2009,2011-2012,2013-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _CONFIG_H_ +#define _CONFIG_H_ + +/* Template settings for autoconf */ + +#undef __EXTENSIONS__ +#undef _ALL_SOURCE +#undef _GNU_SOURCE +#undef _POSIX_SOURCE +#undef _POSIX_1_SOURCE +#undef _POSIX_PTHREAD_SEMANTICS +#undef _TANDEM_SOURCE +#undef _MINIX + +/* Configuration feature settings controllable by autoconf. */ + +/* Define JOB_CONTROL if your operating system supports + BSD-like job control. */ +#undef JOB_CONTROL + +/* Define ALIAS if you want the alias features. */ +#undef ALIAS + +/* Define PUSHD_AND_POPD if you want those commands to be compiled in. + (Also the `dirs' commands.) */ +#undef PUSHD_AND_POPD + +/* Define BRACE_EXPANSION if you want curly brace expansion a la Csh: + foo{a,b} -> fooa foob. Even if this is compiled in (the default) you + can turn it off at shell startup with `-nobraceexpansion', or during + shell execution with `set +o braceexpand'. */ +#undef BRACE_EXPANSION + +/* Define READLINE to get the nifty/glitzy editing features. + This is on by default. You can turn it off interactively + with the -nolineediting flag. */ +#undef READLINE + +/* Define BANG_HISTORY if you want to have Csh style "!" history expansion. + This is unrelated to READLINE. */ +#undef BANG_HISTORY + +/* Define HISTORY if you want to have access to previously typed commands. + + If both HISTORY and READLINE are defined, you can get at the commands + with line editing commands, and you can directly manipulate the history + from the command line. + + If only HISTORY is defined, the `fc' and `history' builtins are + available. */ +#undef HISTORY + +/* Define this if you want completion that puts all alternatives into + a brace expansion shell expression. */ +#if defined (BRACE_EXPANSION) && defined (READLINE) +# define BRACE_COMPLETION +#endif /* BRACE_EXPANSION */ + +/* Define DEFAULT_ECHO_TO_XPG if you want the echo builtin to interpret + the backslash-escape characters by default, like the XPG Single Unix + Specification V2 for echo. + This requires that V9_ECHO be defined. */ +#undef DEFAULT_ECHO_TO_XPG + +/* Define HELP_BUILTIN if you want the `help' shell builtin and the long + documentation strings compiled into the shell. */ +#undef HELP_BUILTIN + +/* Define RESTRICTED_SHELL if you want the generated shell to have the + ability to be a restricted one. The shell thus generated can become + restricted by being run with the name "rbash", or by setting the -r + flag. */ +#undef RESTRICTED_SHELL + +/* Define DISABLED_BUILTINS if you want "builtin foo" to always run the + shell builtin "foo", even if it has been disabled with "enable -n foo". */ +#undef DISABLED_BUILTINS + +/* Define PROCESS_SUBSTITUTION if you want the K*rn shell-like process + substitution features "<(file)". */ +/* Right now, you cannot do this on machines without fully operational + FIFO support. This currently include NeXT and Alliant. */ +#undef PROCESS_SUBSTITUTION + +/* Define PROMPT_STRING_DECODE if you want the backslash-escaped special + characters in PS1 and PS2 expanded. Variable expansion will still be + performed. */ +#undef PROMPT_STRING_DECODE + +/* Define SELECT_COMMAND if you want the Korn-shell style `select' command: + select word in word_list; do command_list; done */ +#undef SELECT_COMMAND + +/* Define COMMAND_TIMING of you want the ksh-style `time' reserved word and + the ability to time pipelines, functions, and builtins. */ +#undef COMMAND_TIMING + +/* Define ARRAY_VARS if you want ksh-style one-dimensional array variables. */ +#undef ARRAY_VARS + +/* Define DPAREN_ARITHMETIC if you want the ksh-style ((...)) arithmetic + evaluation command. */ +#undef DPAREN_ARITHMETIC + +/* Define EXTENDED_GLOB if you want the ksh-style [*+@?!](patlist) extended + pattern matching. */ +#undef EXTENDED_GLOB + +/* Define EXTGLOB_DEFAULT to the value you'd like the extglob shell option + to have by default */ +#undef EXTGLOB_DEFAULT + +/* Define COND_COMMAND if you want the ksh-style [[...]] conditional + command. */ +#undef COND_COMMAND + +/* Define COND_REGEXP if you want extended regular expression matching and the + =~ binary operator in the [[...]] conditional command. */ +#define COND_REGEXP + +/* Define COPROCESS_SUPPORT if you want support for ksh-like coprocesses and + the `coproc' reserved word */ +#define COPROCESS_SUPPORT + +/* Define ARITH_FOR_COMMAND if you want the ksh93-style + for (( init; test; step )) do list; done + arithmetic for command. */ +#undef ARITH_FOR_COMMAND + +/* Define NETWORK_REDIRECTIONS if you want /dev/(tcp|udp)/host/port to open + socket connections when used in redirections */ +#undef NETWORK_REDIRECTIONS + +/* Define PROGRAMMABLE_COMPLETION for the programmable completion features + and the complete builtin. */ +#undef PROGRAMMABLE_COMPLETION + +/* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte + characters, even if the OS supports them. */ +#undef NO_MULTIBYTE_SUPPORT + +/* Define DEBUGGER if you want to compile in some features used only by the + bash debugger. */ +#undef DEBUGGER + +/* Define STRICT_POSIX if you want bash to be strictly posix.2 conformant by + default (except for echo; that is controlled separately). */ +#undef STRICT_POSIX + +/* Define MEMSCRAMBLE if you want the bash malloc and free to scramble + memory contents on malloc() and free(). */ +#undef MEMSCRAMBLE + +/* Define for case-modifying variable attributes; variables modified on + assignment */ +#undef CASEMOD_ATTRS + +/* Define for case-modifying word expansions */ +#undef CASEMOD_EXPANSIONS + +/* Define to make the `direxpand' shopt option enabled by default. */ +#undef DIRCOMPLETE_EXPAND_DEFAULT + +/* Define to make the `globasciiranges' shopt option enabled by default. */ +#undef GLOBASCII_DEFAULT + +/* Define to allow functions to be imported from the environment. */ +#undef FUNCTION_IMPORT + +/* Define AFS if you are using Transarc's AFS. */ +#undef AFS + +#undef ENABLE_NLS + +/* End of configuration settings controllable by autoconf. */ +/* Other settable options appear in config-top.h. */ + +#include "config-top.h" + +/* Beginning of autoconf additions. */ + +/* Characteristics of the C compiler */ +#undef const + +#undef inline + +#undef restrict + +#undef volatile + +/* Define if cpp supports the ANSI-C stringizing `#' operator */ +#undef HAVE_STRINGIZE + +/* Define if the compiler supports `long double' variables. */ +#undef HAVE_LONG_DOUBLE + +#undef PROTOTYPES +#undef __PROTOTYPES + +#undef __CHAR_UNSIGNED__ + +/* Define if the compiler supports `long long' variables. */ +#undef HAVE_LONG_LONG + +#undef HAVE_UNSIGNED_LONG_LONG + +/* The number of bytes in a int. */ +#undef SIZEOF_INT + +/* The number of bytes in a long. */ +#undef SIZEOF_LONG + +/* The number of bytes in a pointer to char. */ +#undef SIZEOF_CHAR_P + +/* The number of bytes in a double (hopefully 8). */ +#undef SIZEOF_DOUBLE + +/* The number of bytes in an `intmax_t'. */ +#undef SIZEOF_INTMAX_T + +/* The number of bytes in a `long long', if we have one. */ +#undef SIZEOF_LONG_LONG + +/* The number of bytes in a `wchar_t', if supported */ +#undef SIZEOF_WCHAR_T + +/* System paths */ + +#define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail" + +/* Characteristics of the system's header files and libraries that affect + the compilation environment. */ + +/* Define if the system does not provide POSIX.1 features except + with this defined. */ +#undef _POSIX_1_SOURCE + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to use GNU libc extensions */ +#undef _GNU_SOURCE + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Memory management functions. */ + +/* Define if using the bash version of malloc in lib/malloc/malloc.c */ +#undef USING_BASH_MALLOC + +#undef DISABLE_MALLOC_WRAPPERS + +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +#undef CRAY_STACKSEG_END + +/* Define if you have alloca, as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if major/minor/makedev is defined in */ +#undef MAJOR_IN_MAKEDEV + +/* Define if major/minor/makedev is defined in */ +#undef MAJOR_IN_SYSMACROS + +/* SYSTEM TYPES */ + +/* Define to `long' if doesn't define. */ +#undef off_t + +/* Define to `int' if doesn't define. */ +#undef mode_t + +/* Define to `int' if doesn't define. */ +#undef sigset_t + +/* Define to `int' if doesn't define. */ +#undef pid_t + +/* Define to `short' if doesn't define. */ +#undef bits16_t + +/* Define to `unsigned short' if doesn't define. */ +#undef u_bits16_t + +/* Define to `int' if doesn't define. */ +#undef bits32_t + +/* Define to `unsigned int' if doesn't define. */ +#undef u_bits32_t + +/* Define to `double' if doesn't define. */ +#undef bits64_t + +/* Define to `unsigned int' if doesn't define. */ +#undef u_int + +/* Define to `unsigned long' if doesn't define. */ +#undef u_long + +/* Define to `int' if doesn't define. */ +#undef ptrdiff_t + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* Define to `int' if doesn't define. */ +#undef ssize_t + +/* Define to `long' if doesn't define. */ +#undef intmax_t + +/* Define to `unsigned long' if doesn't define. */ +#undef uintmax_t + +/* Define to integer type wide enough to hold a pointer if doesn't define. */ +#undef uintptr_t + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* Define to `long' if doesn't define. */ +#undef clock_t + +/* Define to `long' if doesn't define. */ +#undef time_t + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define to `unsigned int' if doesn't define. */ +#undef socklen_t + +/* Define to `int' if doesn't define. */ +#undef sig_atomic_t + +#undef HAVE_MBSTATE_T + +/* Define if you have quad_t in . */ +#undef HAVE_QUAD_T + +/* Define if you have wchar_t in . */ +#undef HAVE_WCHAR_T + +/* Define if you have wctype_t in . */ +#undef HAVE_WCTYPE_T + +/* Define if you have wint_t in . */ +#undef HAVE_WINT_T + +#undef RLIMTYPE + +/* Define to the type of elements in the array set by `getgroups'. + Usually this is either `int' or `gid_t'. */ +#undef GETGROUPS_T + +/* Characteristics of the machine archictecture. */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + +/* Define if the machine architecture is big-endian. */ +#undef WORDS_BIGENDIAN + +/* Check for the presence of certain non-function symbols in the system + libraries. */ + +/* Define if `sys_siglist' is declared by or . */ +#undef HAVE_DECL_SYS_SIGLIST +#undef SYS_SIGLIST_DECLARED + +/* Define if `_sys_siglist' is declared by or . */ +#undef UNDER_SYS_SIGLIST_DECLARED + +#undef HAVE_SYS_SIGLIST + +#undef HAVE_UNDER_SYS_SIGLIST + +#undef HAVE_SYS_ERRLIST + +#undef HAVE_TZNAME +#undef HAVE_DECL_TZNAME + +/* Characteristics of some of the system structures. */ + +#undef HAVE_STRUCT_DIRENT_D_INO + +#undef HAVE_STRUCT_DIRENT_D_FILENO + +#undef HAVE_STRUCT_DIRENT_D_NAMLEN + +#undef TIOCSTAT_IN_SYS_IOCTL + +#undef FIONREAD_IN_SYS_IOCTL + +#undef GWINSZ_IN_SYS_IOCTL + +#undef STRUCT_WINSIZE_IN_SYS_IOCTL + +#undef TM_IN_SYS_TIME + +#undef STRUCT_WINSIZE_IN_TERMIOS + +#undef SPEED_T_IN_SYS_TYPES + +#undef TERMIOS_LDISC + +#undef TERMIO_LDISC + +#undef HAVE_STRUCT_STAT_ST_BLOCKS + +#undef HAVE_STRUCT_TM_TM_ZONE +#undef HAVE_TM_ZONE + +#undef HAVE_TIMEVAL + +#undef HAVE_STRUCT_TIMEZONE + +#undef WEXITSTATUS_OFFSET + +#undef HAVE_STRUCT_TIMESPEC +#undef TIME_H_DEFINES_STRUCT_TIMESPEC +#undef SYS_TIME_H_DEFINES_STRUCT_TIMESPEC +#undef PTHREAD_H_DEFINES_STRUCT_TIMESPEC + +#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC +#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC +#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC +#undef HAVE_STRUCT_STAT_ST_ATIMENSEC +#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC + +/* Characteristics of definitions in the system header files. */ + +#undef HAVE_GETPW_DECLS + +#undef HAVE_RESOURCE + +#undef HAVE_LIBC_FNM_EXTMATCH + +/* Define if you have and it defines AUDIT_USER_TTY */ +#undef HAVE_DECL_AUDIT_USER_TTY + +#undef HAVE_DECL_CONFSTR + +#undef HAVE_DECL_PRINTF + +#undef HAVE_DECL_SBRK + +#undef HAVE_DECL_STRCPY + +#undef HAVE_DECL_STRSIGNAL + +#undef HAVE_DECL_STRTOLD + +#undef PRI_MACROS_BROKEN + +#undef STRTOLD_BROKEN + +/* Define if WCONTINUED is defined in system headers, but rejected by waitpid */ +#undef WCONTINUED_BROKEN + +/* These are checked with BASH_CHECK_DECL */ + +#undef HAVE_DECL_STRTOIMAX +#undef HAVE_DECL_STRTOL +#undef HAVE_DECL_STRTOLL +#undef HAVE_DECL_STRTOUL +#undef HAVE_DECL_STRTOULL +#undef HAVE_DECL_STRTOUMAX + +/* Characteristics of system calls and C library functions. */ + +/* Define if the `getpgrp' function takes no argument. */ +#undef GETPGRP_VOID + +#undef NAMED_PIPES_MISSING + +#undef OPENDIR_NOT_ROBUST + +#undef PGRP_PIPE + +/* Define if the setvbuf function takes the buffering type as its second + argument and the buffer pointer as the third, as on System V + before release 3. */ +#undef SETVBUF_REVERSED + +#undef STAT_MACROS_BROKEN + +#undef ULIMIT_MAXFDS + +#undef CAN_REDEFINE_GETENV + +#undef HAVE_STD_PUTENV + +#undef HAVE_STD_UNSETENV + +#undef HAVE_PRINTF_A_FORMAT + +#undef CTYPE_NON_ASCII + +/* Define if you have and nl_langinfo(CODESET). */ +#undef HAVE_LANGINFO_CODESET + +/* Characteristics of properties exported by the kernel. */ + +/* Define if the kernel can exec files beginning with #! */ +#undef HAVE_HASH_BANG_EXEC + +/* Define if you have the /dev/fd devices to map open files into the file system. */ +#undef HAVE_DEV_FD + +/* Defined to /dev/fd or /proc/self/fd (linux). */ +#undef DEV_FD_PREFIX + +/* Define if you have the /dev/stdin device. */ +#undef HAVE_DEV_STDIN + +/* The type of iconv's `inbuf' argument */ +#undef ICONV_CONST + +/* Type and behavior of signal handling functions. */ + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define if return type of signal handlers is void */ +#undef VOID_SIGHANDLER + +#undef MUST_REINSTALL_SIGHANDLERS + +#undef HAVE_BSD_SIGNALS + +#undef HAVE_POSIX_SIGNALS + +#undef HAVE_USG_SIGHOLD + +#undef UNUSABLE_RT_SIGNALS + +/* Presence of system and C library functions. */ + +/* Define if you have the arc4random function. */ +#undef HAVE_ARC4RANDOM + +/* Define if you have the asprintf function. */ +#undef HAVE_ASPRINTF + +/* Define if you have the bcopy function. */ +#undef HAVE_BCOPY + +/* Define if you have the bzero function. */ +#undef HAVE_BZERO + +/* Define if you have the chown function. */ +#undef HAVE_CHOWN + +/* Define if you have the confstr function. */ +#undef HAVE_CONFSTR + +/* Define if you have the dlclose function. */ +#undef HAVE_DLCLOSE + +/* Define if you have the dlopen function. */ +#undef HAVE_DLOPEN + +/* Define if you have the dlsym function. */ +#undef HAVE_DLSYM + +/* Define if you don't have vprintf but do have _doprnt. */ +#undef HAVE_DOPRNT + +/* Define if you have the dprintf function. */ +#undef HAVE_DPRINTF + +/* Define if you have the dup2 function. */ +#undef HAVE_DUP2 + +/* Define if you have the eaccess function. */ +#undef HAVE_EACCESS + +/* Define if you have the faccessat function. */ +#undef HAVE_FACCESSAT + +/* Define if you have the fcntl function. */ +#undef HAVE_FCNTL + +/* Define if you have the fnmatch function. */ +#undef HAVE_FNMATCH + +/* Can fnmatch be used as a fallback to match [=equiv=] with collation weights? */ +#undef FNMATCH_EQUIV_FALLBACK + +/* Define if you have the fpurge/__fpurge function. */ +#undef HAVE_FPURGE +#undef HAVE___FPURGE +#undef HAVE_DECL_FPURGE + +/* Define if you have the getaddrinfo function. */ +#undef HAVE_GETADDRINFO + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getentropy function. */ +#undef HAVE_GETENTROPY + +/* Define if you have the getdtablesize function. */ +#undef HAVE_GETDTABLESIZE + +/* Define if you have the getgroups function. */ +#undef HAVE_GETGROUPS + +/* Define if you have the gethostbyname function. */ +#undef HAVE_GETHOSTBYNAME + +/* Define if you have the gethostname function. */ +#undef HAVE_GETHOSTNAME + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the getpeername function. */ +#undef HAVE_GETPEERNAME + +/* Define if you have the getpwent function. */ +#undef HAVE_GETPWENT + +/* Define if you have the getpwnam function. */ +#undef HAVE_GETPWNAM + +/* Define if you have the getpwuid function. */ +#undef HAVE_GETPWUID + +/* Define if you have the getrandom function. */ +#undef HAVE_GETRANDOM + +/* Define if you have the getrlimit function. */ +#undef HAVE_GETRLIMIT + +/* Define if you have the getrusage function. */ +#undef HAVE_GETRUSAGE + +/* Define if you have the getservbyname function. */ +#undef HAVE_GETSERVBYNAME + +/* Define if you have the getservent function. */ +#undef HAVE_GETSERVENT + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if you have the getwd function. */ +#undef HAVE_GETWD + +/* Define if you have the iconv function. */ +#undef HAVE_ICONV + +/* Define if you have the imaxdiv function. */ +#undef HAVE_IMAXDIV + +/* Define if you have the inet_aton function. */ +#undef HAVE_INET_ATON + +/* Define if you have the isascii function. */ +#undef HAVE_ISASCII + +/* Define if you have the isblank function. */ +#undef HAVE_ISBLANK + +/* Define if you have the isgraph function. */ +#undef HAVE_ISGRAPH + +/* Define if you have the isprint function. */ +#undef HAVE_ISPRINT + +/* Define if you have the isspace function. */ +#undef HAVE_ISSPACE + +/* Define if you have the iswctype function. */ +#undef HAVE_ISWCTYPE + +/* Define if you have the iswlower function. */ +#undef HAVE_ISWLOWER + +/* Define if you have the iswupper function. */ +#undef HAVE_ISWUPPER + +/* Define if you have the isxdigit function. */ +#undef HAVE_ISXDIGIT + +/* Define if you have the kill function. */ +#undef HAVE_KILL + +/* Define if you have the killpg function. */ +#undef HAVE_KILLPG + +/* Define if you have the lstat function. */ +#undef HAVE_LSTAT + +/* Define if you have the locale_charset function. */ +#undef HAVE_LOCALE_CHARSET + +/* Define if you have the mbrlen function. */ +#undef HAVE_MBRLEN + +/* Define if you have the mbrtowc function. */ +#undef HAVE_MBRTOWC + +/* Define if you have the mbscasecmp function. */ +#undef HAVE_MBSCASECMP + +/* Define if you have the mbschr function. */ +#undef HAVE_MBSCHR + +/* Define if you have the mbscmp function. */ +#undef HAVE_MBSCMP + +/* Define if you have the mbsnrtowcs function. */ +#undef HAVE_MBSNRTOWCS + +/* Define if you have the mbsrtowcs function. */ +#undef HAVE_MBSRTOWCS + +/* Define if you have the memmove function. */ +#undef HAVE_MEMMOVE + +/* Define if you have the memset function. */ +#undef HAVE_MEMSET + +/* Define if you have the mkdtemp function. */ +#undef HAVE_MKDTEMP + +/* Define if you have the mkfifo function. */ +#undef HAVE_MKFIFO + +/* Define if you have the mkstemp function. */ +#undef HAVE_MKSTEMP + +/* Define if you have the pathconf function. */ +#undef HAVE_PATHCONF + +/* Define if you have the pselect function. */ +#undef HAVE_PSELECT + +/* Define if you have the pread function. */ +#undef HAVE_PREAD + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the raise function. */ +#undef HAVE_RAISE + +/* Define if you have the random function. */ +#undef HAVE_RANDOM + +/* Define if you have the readlink function. */ +#undef HAVE_READLINK + +/* Define if you have the regcomp function. */ +#undef HAVE_REGCOMP + +/* Define if you have the regexec function. */ +#undef HAVE_REGEXEC + +/* Define if you have the rename function. */ +#undef HAVE_RENAME + +/* Define if you have the sbrk function. */ +#undef HAVE_SBRK + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the setdtablesize function. */ +#undef HAVE_SETDTABLESIZE + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setitimer function. */ +#undef HAVE_SETITIMER + +/* Define if you have the setlinebuf function. */ +#undef HAVE_SETLINEBUF + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + +/* Define if you have the setostype function. */ +#undef HAVE_SETOSTYPE + +/* Define if you have the setregid function. */ +#undef HAVE_SETREGID +#undef HAVE_DECL_SETREGID + +/* Define if you have the setregid function. */ +#undef HAVE_SETRESGID +#undef HAVE_DECL_SETRESGID + +/* Define if you have the setresuid function. */ +#undef HAVE_SETRESUID +#undef HAVE_DECL_SETRESUID + +/* Define if you have the setvbuf function. */ +#undef HAVE_SETVBUF + +/* Define if you have the siginterrupt function. */ +#undef HAVE_SIGINTERRUPT + +/* Define if you have the POSIX.1-style sigsetjmp function. */ +#undef HAVE_POSIX_SIGSETJMP + +/* Define if you have the snprintf function. */ +#undef HAVE_SNPRINTF + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strcasestr function. */ +#undef HAVE_STRCASESTR + +/* Define if you have the strchr function. */ +#undef HAVE_STRCHR + +/* Define if you have the strchrnul function. */ +#undef HAVE_STRCHRNUL + +/* Define if you have the strcoll function. */ +#undef HAVE_STRCOLL + +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + +/* Define if you have the strftime function. */ +#undef HAVE_STRFTIME + +/* Define if you have the strnlen function. */ +#undef HAVE_STRNLEN + +/* Define if you have the strpbrk function. */ +#undef HAVE_STRPBRK + +/* Define if you have the strstr function. */ +#undef HAVE_STRSTR + +/* Define if you have the strtod function. */ +#undef HAVE_STRTOD + +/* Define if you have the strtoimax function. */ +#undef HAVE_STRTOIMAX + +/* Define if you have the strtol function. */ +#undef HAVE_STRTOL + +/* Define if you have the strtoll function. */ +#undef HAVE_STRTOLL + +/* Define if you have the strtoul function. */ +#undef HAVE_STRTOUL + +/* Define if you have the strtoull function. */ +#undef HAVE_STRTOULL + +/* Define if you have the strtoumax function. */ +#undef HAVE_STRTOUMAX + +/* Define if you have the strsignal function or macro. */ +#undef HAVE_STRSIGNAL + +/* Define if you have the sysconf function. */ +#undef HAVE_SYSCONF + +/* Define if you have the syslog function. */ +#undef HAVE_SYSLOG + +/* Define if you have the tcgetattr function. */ +#undef HAVE_TCGETATTR + +/* Define if you have the tcgetpgrp function. */ +#undef HAVE_TCGETPGRP + +/* Define if you have the times function. */ +#undef HAVE_TIMES + +/* Define if you have the towlower function. */ +#undef HAVE_TOWLOWER + +/* Define if you have the towupper function. */ +#undef HAVE_TOWUPPER + +/* Define if you have the ttyname function. */ +#undef HAVE_TTYNAME + +/* Define if you have the tzset function. */ +#undef HAVE_TZSET + +/* Define if you have the ulimit function. */ +#undef HAVE_ULIMIT + +/* Define if you have the uname function. */ +#undef HAVE_UNAME + +/* Define if you have the unsetenv function. */ +#undef HAVE_UNSETENV + +/* Define if you have the vasprintf function. */ +#undef HAVE_VASPRINTF + +/* Define if you have the vprintf function. */ +#undef HAVE_VPRINTF + +/* Define if you have the vsnprintf function. */ +#undef HAVE_VSNPRINTF + +/* Define if you have the waitpid function. */ +#undef HAVE_WAITPID + +/* Define if you have the wait3 function. */ +#undef HAVE_WAIT3 + +/* Define if you have the wcrtomb function. */ +#undef HAVE_WCRTOMB + +/* Define if you have the wcscoll function. */ +#undef HAVE_WCSCOLL + +/* Define if you have the wcsdup function. */ +#undef HAVE_WCSDUP + +/* Define if you have the wctype function. */ +#undef HAVE_WCTYPE + +/* Define if you have the wcswidth function. */ +#undef HAVE_WCSWIDTH + +/* Define if you have the wcwidth function. */ +#undef HAVE_WCWIDTH + +/* and if it works */ +#undef WCWIDTH_BROKEN + +/* Presence of certain system include files. */ + +/* Define if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define if you have the header file. */ +#undef HAVE_ELF_H + +/* Define if you have the header file. */ +#undef HAVE_GRP_H + +/* Define if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define if you have the header file. */ +#undef HAVE_LANGINFO_H + +/* Define if you have the header file. */ +#undef HAVE_LIBAUDIT_H + +/* Define if you have the header file. */ +#undef HAVE_LIBINTL_H + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the header file. */ +#undef HAVE_MBSTR_H + +/* Define if you have the header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define if you have the header file. */ +#undef HAVE_PWD_H + +/* Define if you have the header file. */ +#undef HAVE_REGEX_H + +/* Define if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the header file. */ +#undef HAVE_STDARG_H + +/* Define if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define if you have the header file. */ +#undef HAVE_STDBOOL_H + +/* Define if you have the header file. */ +#undef HAVE_STDDEF_H + +/* Define if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_PTE_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_PTEM_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_RANDOM_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_STREAM_H + +/* Define if you have */ +#undef HAVE_SYS_TIME_H + +#undef TIME_WITH_SYS_TIME + +/* Define if you have */ +#undef HAVE_SYS_TIMES_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define if you have the header file. */ +#undef HAVE_TERMCAP_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIO_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the header file. */ +#undef HAVE_ULIMIT_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the header file. */ +#undef HAVE_VARARGS_H + +/* Define if you have the header file. */ +#undef HAVE_WCHAR_H + +/* Define if you have the header file. */ +#undef HAVE_WCTYPE_H + +/* Presence of certain system libraries. */ + +#undef HAVE_LIBDL + +#undef HAVE_LIBSUN + +#undef HAVE_LIBSOCKET + +/* Are we running the GNU C library, version 2.1 or later? */ +#undef GLIBC21 + +/* Are we running SVR5 (UnixWare 7)? */ +#undef SVR5 + +/* Are we running SVR4.2? */ +#undef SVR4_2 + +/* Are we running some version of SVR4? */ +#undef SVR4 + +/* Define if job control is unusable or unsupported. */ +#undef JOB_CONTROL_MISSING + +/* Do we need to define _KERNEL to get the RLIMIT_* defines from + ? */ +#undef RLIMIT_NEEDS_KERNEL + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Do strcoll(3) and strcmp(3) give different results in the default locale? */ +#undef STRCOLL_BROKEN + +#undef DUP2_BROKEN + +#undef GETCWD_BROKEN + +#undef DEV_FD_STAT_BROKEN + +/* Additional defines for configuring lib/intl, maintained by autoscan/autoheader */ + +/* Define if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define if you have the header file. */ +#undef HAVE_ERRNO_H + +/* Define if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the header file. */ +#undef HAVE_STDIO_EXT_H + +/* Define if you have the `dcgettext' function. */ +#undef HAVE_DCGETTEXT + +/* Define if you have the `localeconv' function. */ +#undef HAVE_LOCALECONV + +/* Define if your system has a working `malloc' function. */ +/* #undef HAVE_MALLOC */ + +/* Define if you have the `mempcpy' function. */ +#undef HAVE_MEMPCPY + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if you have the `mremap' function. */ +#undef HAVE_MREMAP + +/* Define if you have the `munmap' function. */ +#undef HAVE_MUNMAP + +/* Define if you have the `nl_langinfo' function. */ +#undef HAVE_NL_LANGINFO + +/* Define if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + +/* Define if you have the `strcspn' function. */ +#undef HAVE_STRCSPN + +/* Define if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define if you have the `__argz_count' function. */ +#undef HAVE___ARGZ_COUNT + +/* Define if you have the `__argz_next' function. */ +#undef HAVE___ARGZ_NEXT + +/* Define if you have the `__argz_stringify' function. */ +#undef HAVE___ARGZ_STRINGIFY + +/* End additions for lib/intl */ + + +/* Additions for lib/readline */ + +/* Define if you have and it defines AUDIT_USER_TTY */ +#undef HAVE_DECL_AUDIT_USER_TTY + +/* End additions for lib/readline */ + +#include "config-bot.h" + +#endif /* _CONFIG_H_ */ diff --git a/bash-5.1/configure b/bash-5.1/configure new file mode 100755 index 0000000000000000000000000000000000000000..0f1d3ed178f6339ad64abc93514065c467771d81 --- /dev/null +++ b/bash-5.1/configure @@ -0,0 +1,21992 @@ +#! /bin/sh +# From configure.ac for Bash 5.1, version 5.022. +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for bash 5.1-release. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-bash@gnu.org +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='bash' +PACKAGE_TARNAME='bash' +PACKAGE_VERSION='5.1-release' +PACKAGE_STRING='bash 5.1-release' +PACKAGE_BUGREPORT='bug-bash@gnu.org' +PACKAGE_URL='' + +ac_unique_file="shell.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +gt_needs= +ac_header_list= +gl_use_threads_default= +ac_func_list= +ac_subst_vars='LTLIBOBJS +LOCAL_DEFS +LOCAL_LDFLAGS +LOCAL_CFLAGS +LOCAL_LIBS +MALLOC_DEBUG +DEBUG +RELSTATUS +BASHVERS +headersdir +loadablesdir +BUILD_DIR +incdir +PROFILE_FLAGS +SHOBJ_STATUS +SHOBJ_LIBS +SHOBJ_XLDFLAGS +SHOBJ_LDFLAGS +SHOBJ_LD +SHOBJ_CFLAGS +SHOBJ_CC +JOBS_O +TERMCAP_DEP +TERMCAP_LIB +SIGLIST_O +PTHREAD_H_DEFINES_STRUCT_TIMESPEC +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC +TIME_H_DEFINES_STRUCT_TIMESPEC +LIBINTL_H +INTL_INC +INTL_DEP +LIBOBJS +POSUB +LTLIBINTL +LIBINTL +INTLLIBS +INTL_LIBTOOL_SUFFIX_PREFIX +INTLOBJS +GENCAT +INSTOBJEXT +DATADIRNAME +CATOBJEXT +USE_INCLUDED_LIBINTL +BUILD_INCLUDED_LIBINTL +WINDRES +WOE32 +WOE32DLL +HAVE_NAMELESS_LOCALES +HAVE_WPRINTF +HAVE_NEWLOCALE +HAVE_SNPRINTF +HAVE_ASPRINTF +HAVE_POSIX_PRINTF +INTL_DEFAULT_VERBOSITY +ARFLAGS +INTL_MACOSX_LIBS +GLIBC21 +GNULIB_OVERRIDES_WINT_T +INTLBISON +LTLIBICONV +LIBICONV +LTLIBMULTITHREAD +LIBMULTITHREAD +LTLIBTHREAD +LIBTHREAD +LIBPTH_PREFIX +LTLIBPTH +LIBPTH +PRI_MACROS_BROKEN +ALLOCA +HAVE_VISIBILITY +CFLAG_VISIBILITY +GLIBC2 +XGETTEXT_EXTRA_OPTIONS +MSGMERGE +XGETTEXT_015 +XGETTEXT +GMSGFMT_015 +MSGFMT_015 +GMSGFMT +MSGFMT +GETTEXT_MACRO_VERSION +USE_NLS +SED +MKDIR_P +SIZE +MAKE_SHELL +SET_MAKE +YFLAGS +YACC +RANLIB +AR +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +TILDE_LIB +HIST_LIBDIR +HISTORY_DEP +HISTORY_LIB +RL_INCLUDE +RL_INCLUDEDIR +RL_LIBDIR +READLINE_DEP +READLINE_LIB +RL_MINOR +RL_MAJOR +RL_VERSION +LIBS_FOR_BUILD +STATIC_LD +SIGNAMES_O +SIGNAMES_H +CROSS_COMPILE +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +HELPSTRINGS +HELPFILES_TARGET +HELPINSTALL +HELPDIRDEFINE +HELPDIR +MALLOC_DEP +MALLOC_LDFLAGS +MALLOC_LIBRARY +MALLOC_LIB +MALLOC_SRC +MALLOC_TARGET +TESTSCRIPT +CPPFLAGS_FOR_BUILD +LDFLAGS_FOR_BUILD +CFLAGS_FOR_BUILD +CC_FOR_BUILD +DEBUGGER_START_FILE +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_afs +with_bash_malloc +with_curses +with_gnu_malloc +with_installed_readline +enable_minimal_config +enable_alias +enable_arith_for_command +enable_array_variables +enable_bang_history +enable_brace_expansion +enable_casemod_attributes +enable_casemod_expansions +enable_command_timing +enable_cond_command +enable_cond_regexp +enable_coprocesses +enable_debugger +enable_dev_fd_stat_broken +enable_direxpand_default +enable_directory_stack +enable_disabled_builtins +enable_dparen_arithmetic +enable_extended_glob +enable_extended_glob_default +enable_function_import +enable_glob_asciiranges_default +enable_help_builtin +enable_history +enable_job_control +enable_multibyte +enable_net_redirections +enable_process_substitution +enable_progcomp +enable_prompt_string_decoding +enable_readline +enable_restricted +enable_select +enable_separate_helpfiles +enable_single_help_strings +enable_strict_posix_default +enable_usg_echo_default +enable_xpg_echo_default +enable_mem_scramble +enable_profiling +enable_static_link +enable_largefile +enable_nls +enable_threads +with_gnu_ld +enable_rpath +with_libpth_prefix +with_libiconv_prefix +with_included_gettext +with_libintl_prefix +' + ac_precious_vars='build_alias +host_alias +target_alias +DEBUGGER_START_FILE +CC_FOR_BUILD +CFLAGS_FOR_BUILD +LDFLAGS_FOR_BUILD +CPPFLAGS_FOR_BUILD +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +YACC +YFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures bash 5.1-release to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/bash] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of bash 5.1-release:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-minimal-config a minimal sh-like configuration + --enable-alias enable shell aliases + --enable-arith-for-command + enable arithmetic for command + --enable-array-variables + include shell array variables + --enable-bang-history turn on csh-style history substitution + --enable-brace-expansion + include brace expansion + --enable-casemod-attributes + include case-modifying variable attributes + --enable-casemod-expansions + include case-modifying word expansions + --enable-command-timing enable the time reserved word and command timing + --enable-cond-command enable the conditional command + --enable-cond-regexp enable extended regular expression matching in + conditional commands + --enable-coprocesses enable coprocess support and the coproc reserved + word + --enable-debugger enable support for bash debugger + --enable-dev-fd-stat-broken + enable this option if stat on /dev/fd/N and fstat on + file descriptor N don't return the same results + --enable-direxpand-default + enable the direxpand shell option by default + --enable-directory-stack + enable builtins pushd/popd/dirs + --enable-disabled-builtins + allow disabled builtins to still be invoked + --enable-dparen-arithmetic + include ((...)) command + --enable-extended-glob include ksh-style extended pattern matching + --enable-extended-glob-default + force extended pattern matching to be enabled by + default + --enable-function-import + allow bash to import exported function definitions + by default + --enable-glob-asciiranges-default + force bracket range expressions in pattern matching + to use the C locale by default + --enable-help-builtin include the help builtin + --enable-history turn on command history + --enable-job-control enable job control features + --enable-multibyte enable multibyte characters if OS supports them + --enable-net-redirections + enable /dev/tcp/host/port redirection + --enable-process-substitution + enable process substitution + --enable-progcomp enable programmable completion and the complete + builtin + --enable-prompt-string-decoding + turn on escape character decoding in prompts + --enable-readline turn on command line editing + --enable-restricted enable a restricted shell + --enable-select include select command + --enable-separate-helpfiles + use external files for help builtin documentation + --enable-single-help-strings + store help documentation as a single string to ease + translation + --enable-strict-posix-default + configure bash to be posix-conformant by default + --enable-usg-echo-default + a synonym for --enable-xpg-echo-default + --enable-xpg-echo-default + make the echo builtin expand escape sequences by + default + --enable-mem-scramble scramble memory on calls to malloc and free + --enable-profiling allow profiling with gprof + --enable-static-link link bash statically, for use as a root shell + --disable-largefile omit support for large files + --disable-nls do not use Native Language Support + --enable-threads={posix|solaris|pth|windows} + specify multithreading API + --disable-threads build without multithread safety + --disable-rpath do not hardcode runtime library paths + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-afs if you are running AFS + --with-bash-malloc use the Bash version of malloc + --with-curses use the curses library instead of the termcap + library + --with-gnu-malloc synonym for --with-bash-malloc + --with-installed-readline + use a version of the readline library that is + already installed + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib + --without-libpth-prefix don't search for libpth in includedir and libdir + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-included-gettext use the GNU gettext library included here + --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir + +Some influential environment variables: + DEBUGGER_START_FILE + location of bash debugger initialization file + CC_FOR_BUILD + C compiler used when compiling binaries used only at build time + CFLAGS_FOR_BUILD + Compilation options (CFLAGS) used when compiling binaries used + only at build time + LDFLAGS_FOR_BUILD + Linker options (LDFLAGS) used when compiling binaries used only + at build time + CPPFLAGS_FOR_BUILD + C preprocessor options (CPPFLAGS) used when compiling binaries + used only at build time + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +bash configure 5.1-release +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by bash $as_me 5.1-release, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +gt_needs="$gt_needs need-ngettext" +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" +as_fn_append ac_func_list " symlink" +as_fn_append ac_func_list " uselocale" +as_fn_append ac_header_list " xlocale.h" +as_fn_append ac_header_list " sys/time.h" +as_fn_append ac_func_list " alarm" +as_fn_append ac_func_list " fpurge" +as_fn_append ac_func_list " __fpurge" +as_fn_append ac_func_list " snprintf" +as_fn_append ac_func_list " vsnprintf" +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + +ac_aux_dir= +for ac_dir in ./support "$srcdir"/./support; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ./support \"$srcdir\"/./support" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +ac_config_headers="$ac_config_headers config.h" + + +BASHVERS=5.1 +RELSTATUS=release + +case "$RELSTATUS" in +alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;; +*) DEBUG= MALLOC_DEBUG= ;; +esac + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + +opt_bash_malloc=yes +opt_afs=no +opt_curses=no +opt_with_installed_readline=no + +#htmldir= + +case "${host_cpu}-${host_os}" in +# mostly obsolete platforms +alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux +*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays +*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines +*-dgux*) opt_bash_malloc=no ;; # DG/UX machines +sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 +m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir +*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins +*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft +*-beos*) opt_bash_malloc=no ;; # they say it's suitable +# These need additional investigation +sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF +*-aix*) opt_bash_malloc=no ;; # AIX machines +*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment +# These lack a working sbrk(2) +aarch64-freebsd*) opt_bash_malloc=no ;; +riscv*-freebsd*) opt_bash_malloc=no ;; +# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2) +*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep +*-macos*) opt_bash_malloc=no ;; # Apple MacOS X +*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X) +*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X) +*-machten4) opt_bash_malloc=no ;; # MachTen 4.x +# Niche or non-mainstream-shell-user systems +*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x +*-nsk*) opt_bash_malloc=no ;; # HP NonStop +*-haiku*) opt_bash_malloc=no ;; # Haiku OS +*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk +esac + +# memory scrambling on free() +case "${host_os}" in +sco3.2v5*|sco3.2v4*) opt_memscramble=no ;; +*) opt_memscramble=yes ;; +esac + + + + +# Check whether --with-afs was given. +if test "${with_afs+set}" = set; then : + withval=$with_afs; opt_afs=$withval +fi + + +# Check whether --with-bash-malloc was given. +if test "${with_bash_malloc+set}" = set; then : + withval=$with_bash_malloc; opt_bash_malloc=$withval +fi + + +# Check whether --with-curses was given. +if test "${with_curses+set}" = set; then : + withval=$with_curses; opt_curses=$withval +fi + + +# Check whether --with-gnu-malloc was given. +if test "${with_gnu_malloc+set}" = set; then : + withval=$with_gnu_malloc; opt_bash_malloc=$withval +fi + + +# Check whether --with-installed-readline was given. +if test "${with_installed_readline+set}" = set; then : + withval=$with_installed_readline; opt_with_installed_readline=$withval +fi + + +if test "$opt_bash_malloc" = yes; then + MALLOC_TARGET=malloc + MALLOC_SRC=malloc.c + + MALLOC_LIB='-lmalloc' + MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' + MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' + MALLOC_DEP='$(MALLOC_LIBRARY)' + + $as_echo "#define USING_BASH_MALLOC 1" >>confdefs.h + +else + MALLOC_LIB= + MALLOC_LIBRARY= + MALLOC_LDFLAGS= + MALLOC_DEP= +fi + +if test "$opt_afs" = yes; then + $as_echo "#define AFS 1" >>confdefs.h + +fi + +if test "$opt_curses" = yes; then + prefer_curses=yes +fi + +if test -z "${DEBUGGER_START_FILE}"; then + DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc' +fi + +opt_minimal_config=no + +opt_job_control=yes +opt_alias=yes +opt_readline=yes +opt_history=yes +opt_bang_history=yes +opt_dirstack=yes +opt_restricted=yes +opt_process_subst=yes +opt_prompt_decoding=yes +opt_select=yes +opt_help=yes +opt_array_variables=yes +opt_dparen_arith=yes +opt_extended_glob=yes +opt_brace_expansion=yes +opt_disabled_builtins=no +opt_command_timing=yes +opt_xpg_echo=no +opt_strict_posix=no +opt_cond_command=yes +opt_cond_regexp=yes +opt_coproc=yes +opt_arith_for_command=yes +opt_net_redirs=yes +opt_progcomp=yes +opt_separate_help=no +opt_multibyte=yes +opt_debugger=yes +opt_single_longdoc_strings=yes +opt_casemod_attrs=yes +opt_casemod_expansions=yes +opt_extglob_default=no +opt_dircomplete_expand_default=no +opt_globascii_default=yes +opt_function_import=yes +opt_dev_fd_stat_broken=no + +opt_static_link=no +opt_profiling=no + +# Check whether --enable-minimal-config was given. +if test "${enable_minimal_config+set}" = set; then : + enableval=$enable_minimal_config; opt_minimal_config=$enableval +fi + + +if test $opt_minimal_config = yes; then + opt_job_control=no opt_alias=no opt_readline=no + opt_history=no opt_bang_history=no opt_dirstack=no + opt_restricted=no opt_process_subst=no opt_prompt_decoding=no + opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no + opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no + opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no + opt_net_redirs=no opt_progcomp=no opt_separate_help=no + opt_multibyte=yes opt_cond_regexp=no opt_coproc=no + opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no + opt_globascii_default=yes +fi + +# Check whether --enable-alias was given. +if test "${enable_alias+set}" = set; then : + enableval=$enable_alias; opt_alias=$enableval +fi + +# Check whether --enable-arith-for-command was given. +if test "${enable_arith_for_command+set}" = set; then : + enableval=$enable_arith_for_command; opt_arith_for_command=$enableval +fi + +# Check whether --enable-array-variables was given. +if test "${enable_array_variables+set}" = set; then : + enableval=$enable_array_variables; opt_array_variables=$enableval +fi + +# Check whether --enable-bang-history was given. +if test "${enable_bang_history+set}" = set; then : + enableval=$enable_bang_history; opt_bang_history=$enableval +fi + +# Check whether --enable-brace-expansion was given. +if test "${enable_brace_expansion+set}" = set; then : + enableval=$enable_brace_expansion; opt_brace_expansion=$enableval +fi + +# Check whether --enable-casemod-attributes was given. +if test "${enable_casemod_attributes+set}" = set; then : + enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval +fi + +# Check whether --enable-casemod-expansions was given. +if test "${enable_casemod_expansions+set}" = set; then : + enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval +fi + +# Check whether --enable-command-timing was given. +if test "${enable_command_timing+set}" = set; then : + enableval=$enable_command_timing; opt_command_timing=$enableval +fi + +# Check whether --enable-cond-command was given. +if test "${enable_cond_command+set}" = set; then : + enableval=$enable_cond_command; opt_cond_command=$enableval +fi + +# Check whether --enable-cond-regexp was given. +if test "${enable_cond_regexp+set}" = set; then : + enableval=$enable_cond_regexp; opt_cond_regexp=$enableval +fi + +# Check whether --enable-coprocesses was given. +if test "${enable_coprocesses+set}" = set; then : + enableval=$enable_coprocesses; opt_coproc=$enableval +fi + +# Check whether --enable-debugger was given. +if test "${enable_debugger+set}" = set; then : + enableval=$enable_debugger; opt_debugger=$enableval +fi + +# Check whether --enable-dev-fd-stat-broken was given. +if test "${enable_dev_fd_stat_broken+set}" = set; then : + enableval=$enable_dev_fd_stat_broken; opt_dev_fd_stat_broken=$enableval +fi + +# Check whether --enable-direxpand-default was given. +if test "${enable_direxpand_default+set}" = set; then : + enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval +fi + +# Check whether --enable-directory-stack was given. +if test "${enable_directory_stack+set}" = set; then : + enableval=$enable_directory_stack; opt_dirstack=$enableval +fi + +# Check whether --enable-disabled-builtins was given. +if test "${enable_disabled_builtins+set}" = set; then : + enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval +fi + +# Check whether --enable-dparen-arithmetic was given. +if test "${enable_dparen_arithmetic+set}" = set; then : + enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval +fi + +# Check whether --enable-extended-glob was given. +if test "${enable_extended_glob+set}" = set; then : + enableval=$enable_extended_glob; opt_extended_glob=$enableval +fi + +# Check whether --enable-extended-glob-default was given. +if test "${enable_extended_glob_default+set}" = set; then : + enableval=$enable_extended_glob_default; opt_extglob_default=$enableval +fi + +# Check whether --enable-function-import was given. +if test "${enable_function_import+set}" = set; then : + enableval=$enable_function_import; opt_function_import=$enableval +fi + +# Check whether --enable-glob-asciiranges-default was given. +if test "${enable_glob_asciiranges_default+set}" = set; then : + enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval +fi + +# Check whether --enable-help-builtin was given. +if test "${enable_help_builtin+set}" = set; then : + enableval=$enable_help_builtin; opt_help=$enableval +fi + +# Check whether --enable-history was given. +if test "${enable_history+set}" = set; then : + enableval=$enable_history; opt_history=$enableval +fi + +# Check whether --enable-job-control was given. +if test "${enable_job_control+set}" = set; then : + enableval=$enable_job_control; opt_job_control=$enableval +fi + +# Check whether --enable-multibyte was given. +if test "${enable_multibyte+set}" = set; then : + enableval=$enable_multibyte; opt_multibyte=$enableval +fi + +# Check whether --enable-net-redirections was given. +if test "${enable_net_redirections+set}" = set; then : + enableval=$enable_net_redirections; opt_net_redirs=$enableval +fi + +# Check whether --enable-process-substitution was given. +if test "${enable_process_substitution+set}" = set; then : + enableval=$enable_process_substitution; opt_process_subst=$enableval +fi + +# Check whether --enable-progcomp was given. +if test "${enable_progcomp+set}" = set; then : + enableval=$enable_progcomp; opt_progcomp=$enableval +fi + +# Check whether --enable-prompt-string-decoding was given. +if test "${enable_prompt_string_decoding+set}" = set; then : + enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval +fi + +# Check whether --enable-readline was given. +if test "${enable_readline+set}" = set; then : + enableval=$enable_readline; opt_readline=$enableval +fi + +# Check whether --enable-restricted was given. +if test "${enable_restricted+set}" = set; then : + enableval=$enable_restricted; opt_restricted=$enableval +fi + +# Check whether --enable-select was given. +if test "${enable_select+set}" = set; then : + enableval=$enable_select; opt_select=$enableval +fi + +# Check whether --enable-separate-helpfiles was given. +if test "${enable_separate_helpfiles+set}" = set; then : + enableval=$enable_separate_helpfiles; opt_separate_help=$enableval +fi + +# Check whether --enable-single-help-strings was given. +if test "${enable_single_help_strings+set}" = set; then : + enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval +fi + +# Check whether --enable-strict-posix-default was given. +if test "${enable_strict_posix_default+set}" = set; then : + enableval=$enable_strict_posix_default; opt_strict_posix=$enableval +fi + +# Check whether --enable-usg-echo-default was given. +if test "${enable_usg_echo_default+set}" = set; then : + enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval +fi + +# Check whether --enable-xpg-echo-default was given. +if test "${enable_xpg_echo_default+set}" = set; then : + enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval +fi + + +# Check whether --enable-mem-scramble was given. +if test "${enable_mem_scramble+set}" = set; then : + enableval=$enable_mem_scramble; opt_memscramble=$enableval +fi + +# Check whether --enable-profiling was given. +if test "${enable_profiling+set}" = set; then : + enableval=$enable_profiling; opt_profiling=$enableval +fi + +# Check whether --enable-static-link was given. +if test "${enable_static_link+set}" = set; then : + enableval=$enable_static_link; opt_static_link=$enableval +fi + + + + + + + + + +if test $opt_alias = yes; then +$as_echo "#define ALIAS 1" >>confdefs.h + +fi +if test $opt_dirstack = yes; then +$as_echo "#define PUSHD_AND_POPD 1" >>confdefs.h + +fi +if test $opt_restricted = yes; then +$as_echo "#define RESTRICTED_SHELL 1" >>confdefs.h + +fi +if test $opt_process_subst = yes; then +$as_echo "#define PROCESS_SUBSTITUTION 1" >>confdefs.h + +fi +if test $opt_prompt_decoding = yes; then +$as_echo "#define PROMPT_STRING_DECODE 1" >>confdefs.h + +fi +if test $opt_select = yes; then +$as_echo "#define SELECT_COMMAND 1" >>confdefs.h + +fi +if test $opt_help = yes; then +$as_echo "#define HELP_BUILTIN 1" >>confdefs.h + +fi +if test $opt_array_variables = yes; then +$as_echo "#define ARRAY_VARS 1" >>confdefs.h + +fi +if test $opt_dparen_arith = yes; then +$as_echo "#define DPAREN_ARITHMETIC 1" >>confdefs.h + +fi +if test $opt_brace_expansion = yes; then +$as_echo "#define BRACE_EXPANSION 1" >>confdefs.h + +fi +if test $opt_disabled_builtins = yes; then +$as_echo "#define DISABLED_BUILTINS 1" >>confdefs.h + +fi +if test $opt_command_timing = yes; then +$as_echo "#define COMMAND_TIMING 1" >>confdefs.h + +fi +if test $opt_xpg_echo = yes ; then +$as_echo "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h + +fi +if test $opt_strict_posix = yes; then +$as_echo "#define STRICT_POSIX 1" >>confdefs.h + +fi +if test $opt_extended_glob = yes ; then +$as_echo "#define EXTENDED_GLOB 1" >>confdefs.h + +fi +if test $opt_extglob_default = yes; then +$as_echo "#define EXTGLOB_DEFAULT 1" >>confdefs.h + +else +$as_echo "#define EXTGLOB_DEFAULT 0" >>confdefs.h + +fi +if test $opt_cond_command = yes ; then +$as_echo "#define COND_COMMAND 1" >>confdefs.h + +fi +if test $opt_cond_regexp = yes ; then +$as_echo "#define COND_REGEXP 1" >>confdefs.h + +fi +if test $opt_coproc = yes; then +$as_echo "#define COPROCESS_SUPPORT 1" >>confdefs.h + +fi +if test $opt_arith_for_command = yes; then +$as_echo "#define ARITH_FOR_COMMAND 1" >>confdefs.h + +fi +if test $opt_net_redirs = yes; then +$as_echo "#define NETWORK_REDIRECTIONS 1" >>confdefs.h + +fi +if test $opt_progcomp = yes; then +$as_echo "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h + +fi +if test $opt_multibyte = no; then +$as_echo "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h + +fi +if test $opt_debugger = yes; then +$as_echo "#define DEBUGGER 1" >>confdefs.h + +fi +if test $opt_casemod_attrs = yes; then +$as_echo "#define CASEMOD_ATTRS 1" >>confdefs.h + +fi +if test $opt_casemod_expansions = yes; then +$as_echo "#define CASEMOD_EXPANSIONS 1" >>confdefs.h + +fi +if test $opt_dircomplete_expand_default = yes; then +$as_echo "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h + +fi +if test $opt_globascii_default = yes; then +$as_echo "#define GLOBASCII_DEFAULT 1" >>confdefs.h + +else +$as_echo "#define GLOBASCII_DEFAULT 0" >>confdefs.h + +fi +if test $opt_function_import = yes; then +$as_echo "#define FUNCTION_IMPORT 1" >>confdefs.h + +fi +if test $opt_dev_fd_stat_broken = yes; then +$as_echo "#define DEV_FD_STAT_BROKEN 1" >>confdefs.h + +fi + +if test $opt_memscramble = yes; then +$as_echo "#define MEMSCRAMBLE 1" >>confdefs.h + +fi + +if test "$opt_minimal_config" = yes; then + TESTSCRIPT=run-minimal +else + TESTSCRIPT=run-all +fi + +HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET= +if test "$opt_separate_help" != no; then + if test "$opt_separate_help" = "yes" ; then + HELPDIR='${datadir}/bash' + else + HELPDIR=$opt_separate_help + fi + HELPDIRDEFINE='-H ${HELPDIR}' + HELPINSTALL='install-help' + HELPFILES_TARGET='helpdoc' +fi +HELPSTRINGS= +if test "$opt_single_longdoc_strings" != "yes"; then + HELPSTRINGS='-S' +fi + + + + + + + + + + + + + + + + + + +if test -z "$CFLAGS"; then + want_auto_cflags=1 +fi + +echo "" +echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}" +echo "" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +if test -n "$want_auto_cflags"; then + AUTO_CFLAGS="-g ${GCC+-O2}" + AUTO_LDFLAGS="-g ${GCC+-O2}" + STYLE_CFLAGS="${GCC+-Wno-parentheses} ${GCC+-Wno-format-security}" +else + AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 +$as_echo_n "checking for library containing strerror... " >&6; } +if ${ac_cv_search_strerror+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char strerror (); +int +main () +{ +return strerror (); + ; + return 0; +} +_ACEOF +for ac_lib in '' cposix; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_strerror=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_strerror+:} false; then : + break +fi +done +if ${ac_cv_search_strerror+:} false; then : + +else + ac_cv_search_strerror=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 +$as_echo "$ac_cv_search_strerror" >&6; } +ac_res=$ac_cv_search_strerror +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + + + +SIGNAMES_O= +SIGNAMES_H=lsignames.h + + + +CROSS_COMPILE= +if test "x$cross_compiling" = "xyes"; then + case "${host}" in + *-cygwin*) + cross_cache=${srcdir}/cross-build/cygwin32.cache + ;; + *-mingw*) + cross_cache=${srcdir}/cross-build/cygwin32.cache + ;; + i[3456]86-*-beos*) + cross_cache=${srcdir}/cross-build/x86-beos.cache + ;; + *-qnx*) + cross_cache=${srcdir}/cross-build/qnx.cache + ;; + *) echo "configure: cross-compiling for $host is not supported" >&2 + ;; + esac + if test -n "${cross_cache}" && test -r "${cross_cache}"; then + echo "loading cross-build cache file ${cross_cache}" + . ${cross_cache} + fi + unset cross_cache + SIGNAMES_O='signames.o' + CROSS_COMPILE='-DCROSS_COMPILING' + +fi + + + + +CFLAGS=${CFLAGS-"$AUTO_CFLAGS"} +# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX + +if test "$opt_profiling" = "yes"; then + PROFILE_FLAGS=-pg + case "$host_os" in + solaris2*|linux*) ;; + *) opt_static_link=yes ;; + esac + DEBUG= MALLOC_DEBUG= +fi + +prefer_shared=yes +prefer_static=no + +if test "$opt_static_link" = yes; then + prefer_static=yes + prefer_shared=no + # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 + if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then + STATIC_LD="-static" + case "$host_os" in + solaris2*|linux*) ;; + *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental + esac + fi +fi + +# set the appropriate make variables for building the "build tools" +# modify defaults based on whether or not we are cross compiling, since the +# options for the target host may not be appropriate for the build host +if test "X$cross_compiling" = "Xno"; then + CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)' + if test X"$opt_profiling" = Xyes; then + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'} + else + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} + fi + # CFLAGS set above to default value if not passed in environment + if test -n "$want_auto_cflags" ; then + CFLAGS_FOR_BUILD="${CFLAGS} ${STYLE_CFLAGS}" + else + CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + fi + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} +else + CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"} + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""} +fi + + + + + + + + + + + + +if test $ac_cv_c_compiler_gnu = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +$as_echo_n "checking whether $CC needs -traditional... " >&6; } +if ${ac_cv_prog_gcc_traditional+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_pattern="Autoconf.*'x'" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then : + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then : + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +$as_echo "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + + + +if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no" +then + # If the user specified --with-installed-readline=PREFIX and PREFIX + # is not `yes', set ac_cv_rl_prefix to PREFIX + test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline + + +if test "X$bash_cv_termcap_lib" = "X"; then +_bash_needmsg=yes +else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +$as_echo_n "checking which library has the termcap functions... " >&6; } +_bash_needmsg= +fi +if ${bash_cv_termcap_lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" +if test "x$ac_cv_func_tgetent" = xyes; then : + bash_cv_termcap_lib=libc +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 +$as_echo_n "checking for tgetent in -ltermcap... " >&6; } +if ${ac_cv_lib_termcap_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltermcap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_termcap_tgetent=yes +else + ac_cv_lib_termcap_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 +$as_echo "$ac_cv_lib_termcap_tgetent" >&6; } +if test "x$ac_cv_lib_termcap_tgetent" = xyes; then : + bash_cv_termcap_lib=libtermcap +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 +$as_echo_n "checking for tgetent in -ltinfo... " >&6; } +if ${ac_cv_lib_tinfo_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltinfo $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_tinfo_tgetent=yes +else + ac_cv_lib_tinfo_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 +$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; } +if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then : + bash_cv_termcap_lib=libtinfo +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 +$as_echo_n "checking for tgetent in -lcurses... " >&6; } +if ${ac_cv_lib_curses_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_curses_tgetent=yes +else + ac_cv_lib_curses_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 +$as_echo "$ac_cv_lib_curses_tgetent" >&6; } +if test "x$ac_cv_lib_curses_tgetent" = xyes; then : + bash_cv_termcap_lib=libcurses +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 +$as_echo_n "checking for tgetent in -lncurses... " >&6; } +if ${ac_cv_lib_ncurses_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ncurses_tgetent=yes +else + ac_cv_lib_ncurses_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 +$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; } +if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then : + bash_cv_termcap_lib=libncurses +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5 +$as_echo_n "checking for tgetent in -lncursesw... " >&6; } +if ${ac_cv_lib_ncursesw_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncursesw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ncursesw_tgetent=yes +else + ac_cv_lib_ncursesw_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5 +$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; } +if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then : + bash_cv_termcap_lib=libncursesw +else + bash_cv_termcap_lib=gnutermcap +fi + +fi + +fi + +fi + +fi + +fi + +fi + +if test "X$_bash_needmsg" = "Xyes"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +$as_echo_n "checking which library has the termcap functions... " >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 +$as_echo "using $bash_cv_termcap_lib" >&6; } +if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then +LDFLAGS="$LDFLAGS -L./lib/termcap" +TERMCAP_LIB="./lib/termcap/libtermcap.a" +TERMCAP_DEP="./lib/termcap/libtermcap.a" +elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then +TERMCAP_LIB=-ltermcap +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libtinfo; then +TERMCAP_LIB=-ltinfo +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libncurses; then +TERMCAP_LIB=-lncurses +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libc; then +TERMCAP_LIB= +TERMCAP_DEP= +else +TERMCAP_LIB=-lcurses +TERMCAP_DEP= +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5 +$as_echo_n "checking version of installed readline library... " >&6; } + +# What a pain in the ass this is. + +# save cpp and ld options +_save_CFLAGS="$CFLAGS" +_save_LDFLAGS="$LDFLAGS" +_save_LIBS="$LIBS" + +# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This +# allows the caller to do something like $_rl_prefix=$withval if the user +# specifies --with-installed-readline=PREFIX as an argument to configure + +if test -z "$ac_cv_rl_prefix"; then +test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix} +fi + +eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include +eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib + +LIBS="$LIBS -lreadline ${TERMCAP_LIB}" +CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}" +LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" + +if ${ac_cv_rl_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_rl_version='8.0' +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +extern int rl_gnu_readline_p; + +int +main() +{ + FILE *fp; + fp = fopen("conftest.rlv", "w"); + if (fp == 0) + exit(1); + if (rl_gnu_readline_p != 1) + fprintf(fp, "0.0\n"); + else + fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0"); + fclose(fp); + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_rl_version=`cat conftest.rlv` +else + ac_cv_rl_version='0.0' +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + + +CFLAGS="$_save_CFLAGS" +LDFLAGS="$_save_LDFLAGS" +LIBS="$_save_LIBS" + +RL_MAJOR=0 +RL_MINOR=0 + +# ( +case "$ac_cv_rl_version" in +2*|3*|4*|5*|6*|7*|8*|9*) + RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'` + RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'` + ;; +esac + +# ((( +case $RL_MAJOR in +[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;; +[0-9]) _RL_MAJOR=0$RL_MAJOR ;; +*) _RL_MAJOR=00 ;; +esac + +# ((( +case $RL_MINOR in +[0-9][0-9]) _RL_MINOR=$RL_MINOR ;; +[0-9]) _RL_MINOR=0$RL_MINOR ;; +*) _RL_MINOR=00 ;; +esac + +RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}" + +# Readline versions greater than 4.2 have these defines in readline.h + +if test $ac_cv_rl_version = '0.0' ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5 +$as_echo "$as_me: WARNING: Could not test version of installed readline library." >&2;} +elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then + # set these for use by the caller + RL_PREFIX=$ac_cv_rl_prefix + RL_LIBDIR=$ac_cv_rl_libdir + RL_INCLUDEDIR=$ac_cv_rl_includedir + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 +$as_echo "$ac_cv_rl_version" >&6; } +else + + +cat >>confdefs.h <<_ACEOF +#define RL_READLINE_VERSION $RL_VERSION +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define RL_VERSION_MAJOR $RL_MAJOR +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define RL_VERSION_MINOR $RL_MINOR +_ACEOF + + + + + + +# set these for use by the caller +RL_PREFIX=$ac_cv_rl_prefix +RL_LIBDIR=$ac_cv_rl_libdir +RL_INCLUDEDIR=$ac_cv_rl_includedir + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 +$as_echo "$ac_cv_rl_version" >&6; } + +fi + + + case "$ac_cv_rl_version" in + 8*|9*) ;; + *) opt_with_installed_readline=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5 +$as_echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5 +$as_echo "$as_me: WARNING: using private bash version" >&2;} + ;; + esac +fi + +TILDE_LIB=-ltilde +if test $opt_readline = yes; then + $as_echo "#define READLINE 1" >>confdefs.h + + if test "$opt_with_installed_readline" != "no" ; then + case "$opt_with_installed_readline" in + yes) RL_INCLUDE= ;; + *) case "$RL_INCLUDEDIR" in + /usr/include) ;; + *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; + esac + ;; + esac + READLINE_DEP= + READLINE_LIB=-lreadline + # section for OS versions that don't allow unresolved symbols + # to be compiled into dynamic libraries. + case "$host_os" in + cygwin*) TILDE_LIB= ;; + esac + else + RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + READLINE_DEP='$(READLINE_LIBRARY)' + # section for OS versions that ship an older/broken version of + # readline as a standard dynamic library and don't allow a + # static version specified as -llibname to override the + # dynamic version + case "${host_os}" in + darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;; + *) READLINE_LIB=-lreadline ;; + esac + fi +else + RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + READLINE_LIB= READLINE_DEP= +fi +if test $opt_history = yes || test $opt_bang_history = yes; then + if test $opt_history = yes; then + $as_echo "#define HISTORY 1" >>confdefs.h + + fi + if test $opt_bang_history = yes; then + $as_echo "#define BANG_HISTORY 1" >>confdefs.h + + fi + if test "$opt_with_installed_readline" != "no"; then + HIST_LIBDIR=$RL_LIBDIR + HISTORY_DEP= + HISTORY_LIB=-lhistory + case "$opt_with_installed_readline" in + yes) RL_INCLUDE= ;; + *) case "$RL_INCLUDEDIR" in + /usr/include) ;; + *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; + esac + ;; + esac + else + HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + HISTORY_DEP='$(HISTORY_LIBRARY)' + # section for OS versions that ship an older version of + # readline as a standard dynamic library and don't allow a + # static version specified as -llibname to override the + # dynamic version + case "${host_os}" in + darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;; + *) HISTORY_LIB=-lhistory ;; + esac + fi +else + HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + HISTORY_LIB= HISTORY_DEP= +fi + + + + + + + + + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -n "$ARFLAGS" || ARFLAGS="cr" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_YACC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + +case "$ac_cv_prog_YACC" in +*bison*) ;; +*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5 +$as_echo "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;; +esac + +case "$host_os" in +opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; +*) MAKE_SHELL=/bin/sh ;; +esac + + +if test x$SIZE = x; then + if test x$ac_tool_prefix = x; then + SIZE=size + else + SIZE=${ac_tool_prefix}size + save_IFS=$IFS ; IFS=: + size_found=0 + for dir in $PATH; do + if test -x $dir/$SIZE ; then + size_found=1 + break + fi + done + if test $size_found -eq 0; then + SIZE=: + fi + IFS=$save_IFS + fi +fi + + +# Checks for stat-related time functions. + +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software +# Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + + + +# Configure checks for struct timespec + +# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Original written by Paul Eggert and Jim Meyering. +# Modified by Chet Ramey for bash + + + + + + +# codeset.m4 serial 5 (gettext-0.18.2) + + + + + + + + +# fcntl-o.m4 serial 6 + + + + +# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. +# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. +# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. + + +# gettext.m4 serial 69 (gettext-0.19.9) + + + + + + + + + + + + + + + + + +# glibc2.m4 serial 3 + +# Test for the GNU C Library, version 2.0 or newer. +# From Bruno Haible. + + + +# glibc21.m4 serial 5 + +# Test for the GNU C Library, version 2.1 or newer, or uClibc. +# From Bruno Haible. + + + +# host-cpu-c-abi.m4 serial 11 + + + + + + + +# iconv.m4 serial 21 + + + + + + + + + +# intdiv0.m4 serial 6 (gettext-0.18.2) + + + + +# intl.m4 serial 34 (gettext-0.19.9) + + + + + + + + + + + +# intlmacosx.m4 serial 6 (gettext-0.19.9) + + + +# intl-thread-locale.m4 serial 4 + + + + + +# intmax.m4 serial 6 (gettext-0.18.2) + + + + +# inttypes-pri.m4 serial 7 (gettext-0.18.2) + + + + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + + + +# inttypes.m4 serial 27 + + + + + + +# Ensure that the PRI* and SCN* macros are defined appropriately. + + +# Define the symbol $1 to be 1 if the condition is true, 0 otherwise. +# If $2 is true, the condition is $3; otherwise if long long int is supported +# approximate the condition with $4; otherwise, assume the condition is false. +# The condition should work on all C99 platforms; the approximations should be +# good enough to work on all practical pre-C99 platforms. +# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. + + + + + + +# inttypes_h.m4 serial 10 + + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + + + +# lcmessage.m4 serial 7 (gettext-0.18.2) + + +# Check whether LC_MESSAGES is available in . + + + +# lib-ld.m4 serial 9 + + + + + + +# lib-link.m4 serial 28 + + + + + + + + + + + + + + + + + + +# lib-prefix.m4 serial 14 + + + + + + + + + + +# lock.m4 serial 14 + + + + +# Prerequisites of lib/glthread/lock.c. + + +# nls.m4 serial 5 (gettext-0.18) + + + + + + +# po.m4 serial 24a + + + + + + + + + + + + +# printf-posix.m4 serial 6 (gettext-0.18.2) + + + + +# progtest.m4 serial 7 (gettext-0.18.2) + + + + +# Search path for a program which passes the given test. + + + +# pthread_rwlock_rdlock.m4 serial 2 + + + + +# size_max.m4 serial 11 + + + + + + +# stdint_h.m4 serial 9 + + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + + + +# threadlib.m4 serial 16 + + + + + + + + + + + + + + + + + + + + + +# uintmax_t.m4 serial 12 + + + + +# Define uintmax_t to 'unsigned long' or 'unsigned long long' +# if it is not already defined in or . + + + +# ulonglong.m4 serial 10 + +# visibility.m4 serial 6 + + + + + +# wchar_t.m4 serial 4 (gettext-0.18.2) + + + + +# wint_t.m4 serial 7 + + + + + + +# xsize.m4 serial 5 + + + + +$as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 +$as_echo_n "checking for preprocessor stringizing operator... " >&6; } +if ${ac_cv_c_stringize+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define x(y) #y + +char *s = x(teststring); +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "#teststring" >/dev/null 2>&1; then : + ac_cv_c_stringize=no +else + ac_cv_c_stringize=yes +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5 +$as_echo "$ac_cv_c_stringize" >&6; } +if test $ac_cv_c_stringize = yes; then + +$as_echo "#define HAVE_STRINGIZE 1" >>confdefs.h + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5 +$as_echo_n "checking for long double with more range or precision than double... " >&6; } +if ${ac_cv_type_long_double_wider+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + long double const a[] = + { + 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON, + LDBL_MIN, LDBL_MAX, LDBL_EPSILON + }; + long double + f (long double x) + { + return ((x + (unsigned long int) 10) * (-1 / x) + a[0] + + (x ? f (x) : 'c')); + } + +int +main () +{ +static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP) + + (DBL_MANT_DIG < LDBL_MANT_DIG) + - (LDBL_MAX_EXP < DBL_MAX_EXP) + - (LDBL_MANT_DIG < DBL_MANT_DIG))) + && (int) LDBL_EPSILON == 0 + )]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_long_double_wider=yes +else + ac_cv_type_long_double_wider=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5 +$as_echo "$ac_cv_type_long_double_wider" >&6; } + if test $ac_cv_type_long_double_wider = yes; then + +$as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h + + fi + + ac_cv_c_long_double=$ac_cv_type_long_double_wider + if test $ac_cv_c_long_double = yes; then + +$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h + + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 +$as_echo_n "checking for function prototypes... " >&6; } +if test "$ac_cv_prog_cc_c89" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define PROTOTYPES 1" >>confdefs.h + + +$as_echo "#define __PROTOTYPES 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } +if ${ac_cv_c_char_unsigned+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_char_unsigned=no +else + ac_cv_c_char_unsigned=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 +$as_echo_n "checking for working volatile... " >&6; } +if ${ac_cv_c_volatile+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +volatile int x; +int * volatile y = (int *) 0; +return !x && !y; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_volatile=yes +else + ac_cv_c_volatile=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 +$as_echo "$ac_cv_c_volatile" >&6; } +if test $ac_cv_c_volatile = no; then + +$as_echo "#define volatile /**/" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + + GETTEXT_MACRO_VERSION=0.19 + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + + + ac_config_commands="$ac_config_commands po-directories" + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5 +$as_echo_n "checking whether we are using the GNU C Library 2 or newer... " >&6; } +if ${ac_cv_gnu_library_2+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then : + ac_cv_gnu_library_2=yes +else + ac_cv_gnu_library_2=no +fi +rm -f conftest* + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2" >&5 +$as_echo "$ac_cv_gnu_library_2" >&6; } + + GLIBC2="$ac_cv_gnu_library_2" + + + + + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 +$as_echo_n "checking whether the -Werror option is usable... " >&6; } +if ${gl_cv_cc_vis_werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_vis_werror=yes +else + gl_cv_cc_vis_werror=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 +$as_echo "$gl_cv_cc_vis_werror" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 +$as_echo_n "checking for simple visibility declarations... " >&6; } +if ${gl_cv_cc_visibility+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_visibility=yes +else + gl_cv_cc_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 +$as_echo "$gl_cv_cc_visibility" >&6; } + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_VISIBILITY $HAVE_VISIBILITY +_ACEOF + + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 +$as_echo_n "checking for stdint.h... " >&6; } +if ${gl_cv_header_stdint_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_stdint_h=yes +else + gl_cv_header_stdint_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 +$as_echo "$gl_cv_header_stdint_h" >&6; } + if test $gl_cv_header_stdint_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF + + fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +void *alloca (size_t); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5 +$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; } +if ${gt_cv_int_divbyzero_sigfpe+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gt_cv_int_divbyzero_sigfpe= + case "$host_os" in + macos* | darwin[6-9]* | darwin[1-9][0-9]*) + # On Mac OS X 10.2 or newer, just assume the same as when cross- + # compiling. If we were to perform the real test, 1 Crash Report + # dialog window would pop up. + case "$host_cpu" in + i[34567]86 | x86_64) + gt_cv_int_divbyzero_sigfpe="guessing yes" ;; + esac + ;; + esac + if test -z "$gt_cv_int_divbyzero_sigfpe"; then + if test "$cross_compiling" = yes; then : + + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +static void +sigfpe_handler (int sig) +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int xnan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + xnan = y / y; + exit (2); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gt_cv_int_divbyzero_sigfpe=yes +else + gt_cv_int_divbyzero_sigfpe=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5 +$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; } + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + +cat >>confdefs.h <<_ACEOF +#define INTDIV0_RAISES_SIGFPE $value +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 +$as_echo_n "checking for inttypes.h... " >&6; } +if ${gl_cv_header_inttypes_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_inttypes_h=yes +else + gl_cv_header_inttypes_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 +$as_echo "$gl_cv_header_inttypes_h" >&6; } + if test $gl_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +cat >>confdefs.h <<_ACEOF +#define uintmax_t $ac_type +_ACEOF + + else + +$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h + + fi + + + for ac_header in inttypes.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + +fi + +done + + if test $ac_cv_header_inttypes_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 +$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } +if ${gt_cv_inttypes_pri_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef PRId32 +char *p = PRId32; +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_inttypes_pri_broken=no +else + gt_cv_inttypes_pri_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 +$as_echo "$gt_cv_inttypes_pri_broken" >&6; } + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + +cat >>confdefs.h <<_ACEOF +#define PRI_MACROS_BROKEN 1 +_ACEOF + + PRI_MACROS_BROKEN=1 + else + PRI_MACROS_BROKEN=0 + fi + + + + + + + + # Check whether --enable-threads was given. +if test "${enable_threads+set}" = set; then : + enableval=$enable_threads; gl_use_threads=$enableval +else + if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else + case "$host_os" in + osf*) gl_use_threads=no ;; + cygwin*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ;; + *) gl_use_threads=yes ;; + esac + fi + +fi + + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # For using : + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + fi + + + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +$as_echo_n "checking for ld... " >&6; } +elif test "$GCC" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + if ${acl_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + fi + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # The compiler produces 64-bit code. Add option '-b64' so that the + # linker groks 64-bit object files. + case "$acl_cv_path_LD " in + *" -b64 "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; + esac + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + sparc64-*-netbsd*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + # The compiler produces 32-bit code. Add option '-m elf32_sparc' + # so that the linker groks 32-bit object files. + case "$acl_cv_path_LD " in + *" -m elf32_sparc "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; + esac + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + esac + +fi + + LD="$acl_cv_path_LD" +fi +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${acl_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if ${acl_cv_rpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 +$as_echo_n "checking 32-bit host C ABI... " >&6; } +if ${gl_cv_host_cpu_c_abi_32bit+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$gl_cv_host_cpu_c_abi"; then + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + *) + gl_cv_host_cpu_c_abi_32bit=no ;; + esac + else + case "$host_cpu" in + + i[4567]86 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) \ + && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _ILP32 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=yes +else + gl_cv_host_cpu_c_abi_32bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + riscv32 | riscv64 ) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + *) + gl_cv_host_cpu_c_abi_32bit=no + ;; + esac + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +$as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; } + + HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" + + + + + + case "$host_os" in + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +$as_echo_n "checking for 64-bit host... " >&6; } +if ${gl_cv_solaris_64bit+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _LP64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_solaris_64bit=yes +else + gl_cv_solaris_64bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +$as_echo "$gl_cv_solaris_64bit" >&6; };; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; } +if ${acl_cv_libdirstems+:} false; then : + $as_echo_n "(cached) " >&6 +else + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + if test "$HOST_CPU_C_ABI_32BIT" != yes; then + searchpath=`(if test -f /usr/bin/gcc \ + && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ + LC_ALL=C /usr/bin/gcc -print-search-dirs; \ + else \ + LC_ALL=C $CC -print-search-dirs; \ + fi) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +$as_echo "$acl_cv_libdirstems" >&6; } + # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` + + + + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 +$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } +if ${gl_cv_have_weak+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_have_weak=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern void xyzzy (); +#pragma weak xyzzy +int +main () +{ +xyzzy(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_have_weak=maybe +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ELF__ + Extensible Linking Format + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : + gl_cv_have_weak="guessing yes" +else + gl_cv_have_weak="guessing no" +fi +rm -f conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_have_weak=yes +else + gl_cv_have_weak=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 +$as_echo "$gl_cv_have_weak" >&6; } + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes; then : + gl_have_pthread_h=yes +else + gl_have_pthread_h=no +fi + + + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + +int +main () +{ +pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_have_pthread=yes + LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread + LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$save_LIBS + test -n "$gl_have_pthread" && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_kill=yes +else + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + # On Solaris 10 or newer, this test is no longer needed, because + # libc contains the fully functional pthread functions. + case "$host_os" in + solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) + +$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h + + esac + +fi + + elif test -z "$gl_have_pthread"; then + # Some library is needed. Try libpthread and libc_r. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_kill=yes +else + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : + gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread +fi + + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 +$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } +if ${ac_cv_lib_c_r_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_r_pthread_kill=yes +else + ac_cv_lib_c_r_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } +if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : + gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r +fi + + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + +$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +thr_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_have_solaristhread=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + +$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h + + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 +$as_echo_n "checking how to link with libpth... " >&6; } +if ${ac_cv_libpth_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libpth-prefix was given. +if test "${with_libpth_prefix+set}" = set; then : + withval=$with_libpth_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBPTH= + LTLIBPTH= + INCPTH= + LIBPTH_PREFIX= + HAVE_LIBPTH= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='pth ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" + ;; + esac + done + fi + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" + done + fi + + + + + + ac_cv_libpth_libs="$LIBPTH" + ac_cv_libpth_ltlibs="$LTLIBPTH" + ac_cv_libpth_cppflags="$INCPTH" + ac_cv_libpth_prefix="$LIBPTH_PREFIX" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 +$as_echo "$ac_cv_libpth_libs" >&6; } + LIBPTH="$ac_cv_libpth_libs" + LTLIBPTH="$ac_cv_libpth_ltlibs" + INCPTH="$ac_cv_libpth_cppflags" + LIBPTH_PREFIX="$ac_cv_libpth_prefix" + + for element in $INCPTH; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + + + HAVE_LIBPTH=yes + + + + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +pth_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_have_pth=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + +$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + +$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h + + fi + ;; + esac + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 +$as_echo_n "checking for multithread API to use... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 +$as_echo "$gl_threads_api" >&6; } + + + + + + + + + + + + if test "$gl_threads_api" = posix; then + # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + has_rwlock=false + ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include +" +if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : + has_rwlock=true + +$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h + +fi + + if $has_rwlock; then + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 +$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } +if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + if test "$cross_compiling" = yes; then : + gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include + +#define SUCCEED() exit (0) +#define FAILURE() exit (1) +#define UNEXPECTED(n) (exit (10 + (n))) + +/* The main thread creates the waiting writer and the requesting reader threads + in the default way; this guarantees that they have the same priority. + We can reuse the main thread as first reader thread. */ + +static pthread_rwlock_t lock; +static pthread_t reader1; +static pthread_t writer; +static pthread_t reader2; +static pthread_t timer; +/* Used to pass control from writer to reader2 and from reader2 to timer, + as in a relay race. + Passing control from one running thread to another running thread + is most likely faster than to create the second thread. */ +static pthread_mutex_t baton; + +static void * +timer_func (void *ignored) +{ + /* Step 13 (can be before or after step 12): + The timer thread takes the baton, then waits a moment to make sure + it can tell whether the second reader thread is blocked at step 12. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (13); + usleep (100000); + /* By the time we get here, it's clear that the second reader thread is + blocked at step 12. This is the desired behaviour. */ + SUCCEED (); +} + +static void * +reader2_func (void *ignored) +{ + int err; + + /* Step 8 (can be before or after step 7): + The second reader thread takes the baton, then waits a moment to make sure + the writer thread has reached step 7. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (8); + usleep (100000); + /* Step 9: The second reader thread requests the lock. */ + err = pthread_rwlock_tryrdlock (&lock); + if (err == 0) + FAILURE (); + else if (err != EBUSY) + UNEXPECTED (9); + /* Step 10: Launch a timer, to test whether the next call blocks. */ + if (pthread_create (&timer, NULL, timer_func, NULL)) + UNEXPECTED (10); + /* Step 11: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (11); + /* Step 12: The second reader thread requests the lock. */ + err = pthread_rwlock_rdlock (&lock); + if (err == 0) + FAILURE (); + else + UNEXPECTED (12); +} + +static void * +writer_func (void *ignored) +{ + /* Step 4: Take the baton, so that the second reader thread does not go ahead + too early. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (4); + /* Step 5: Create the second reader thread. */ + if (pthread_create (&reader2, NULL, reader2_func, NULL)) + UNEXPECTED (5); + /* Step 6: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (6); + /* Step 7: The writer thread requests the lock. */ + if (pthread_rwlock_wrlock (&lock)) + UNEXPECTED (7); + return NULL; +} + +int +main () +{ + reader1 = pthread_self (); + + /* Step 1: The main thread initializes the lock and the baton. */ + if (pthread_rwlock_init (&lock, NULL)) + UNEXPECTED (1); + if (pthread_mutex_init (&baton, NULL)) + UNEXPECTED (1); + /* Step 2: The main thread acquires the lock as a reader. */ + if (pthread_rwlock_rdlock (&lock)) + UNEXPECTED (2); + /* Step 3: Create the writer thread. */ + if (pthread_create (&writer, NULL, writer_func, NULL)) + UNEXPECTED (3); + /* Job done. Go to sleep. */ + for (;;) + { + sleep (1); + } +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_pthread_rwlock_rdlock_prefer_writer=yes +else + gl_cv_pthread_rwlock_rdlock_prefer_writer=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LIBS="$save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 +$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } + case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in + *yes) + +$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h + + ;; + esac + + fi + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + +#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + : + + + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then : + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + HAVE_LIBICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if ${am_cv_func_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main () +{ +int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + am_cv_func_iconv_works=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + +$as_echo "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +$as_echo_n "checking for iconv declaration... " >&6; } + if ${am_cv_proto_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_cv_proto_iconv_arg1="" +else + am_cv_proto_iconv_arg1="const" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: + $am_cv_proto_iconv" >&5 +$as_echo " + $am_cv_proto_iconv" >&6; } + else + am_cv_proto_iconv_arg1="" + fi + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF + + + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +$as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + for ac_header in argz.h inttypes.h limits.h unistd.h sys/param.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + for ac_func in getcwd getegid geteuid getgid getuid mempcpy munmap \ + stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ + argz_next __fsetlocking +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + for ac_func in localeconv +do : + ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv" +if test "x$ac_cv_func_localeconv" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOCALECONV 1 +_ACEOF + +fi +done + + + ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "#include +" +if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "#include +" +if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl +_ACEOF + + + + + for ac_prog in bison +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_INTLBISON+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$INTLBISON"; then + ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_INTLBISON="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +INTLBISON=$ac_cv_prog_INTLBISON +if test -n "$INTLBISON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5 +$as_echo "$INTLBISON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$INTLBISON" && break +done + + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5 +$as_echo_n "checking version of bison... " >&6; } + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.[7-9]* | [3-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if ${ac_cv_type_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main () +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +$as_echo "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +$as_echo_n "checking for wchar_t... " >&6; } +if ${gt_cv_c_wchar_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wchar_t=yes +else + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +$as_echo "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 +$as_echo_n "checking for wint_t... " >&6; } +if ${gt_cv_c_wint_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include + wint_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wint_t=yes +else + gt_cv_c_wint_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 +$as_echo "$gt_cv_c_wint_t" >&6; } + if test $gt_cv_c_wint_t = yes; then + +$as_echo "#define HAVE_WINT_T 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5 +$as_echo_n "checking whether wint_t is too small... " >&6; } +if ${gl_cv_type_wint_t_too_small+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +#endif +#include + int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wint_t_too_small=no +else + gl_cv_type_wint_t_too_small=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5 +$as_echo "$gl_cv_type_wint_t_too_small" >&6; } + if test $gl_cv_type_wint_t_too_small = yes; then + GNULIB_OVERRIDES_WINT_T=1 + else + GNULIB_OVERRIDES_WINT_T=0 + fi + else + GNULIB_OVERRIDES_WINT_T=0 + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 +$as_echo_n "checking for intmax_t... " >&6; } +if ${gt_cv_c_intmax_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + +int +main () +{ +intmax_t x = -1; + return !x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_intmax_t=yes +else + gt_cv_c_intmax_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 +$as_echo "$gt_cv_c_intmax_t" >&6; } + if test $gt_cv_c_intmax_t = yes; then + +$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5 +$as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; } +if ${gt_cv_func_printf_posix+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "notposix" >/dev/null 2>&1; then : + gt_cv_func_printf_posix="guessing no" +else + gt_cv_func_printf_posix="guessing yes" +fi +rm -f conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gt_cv_func_printf_posix=yes +else + gt_cv_func_printf_posix=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5 +$as_echo "$gt_cv_func_printf_posix" >&6; } + case $gt_cv_func_printf_posix in + *yes) + +$as_echo "#define HAVE_POSIX_PRINTF 1" >>confdefs.h + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 +$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } +if ${ac_cv_gnu_library_2_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif +#ifdef __UCLIBC__ + Lucky user +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky" >/dev/null 2>&1; then : + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 +$as_echo "$ac_cv_gnu_library_2_1" >&6; } + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 +$as_echo_n "checking for SIZE_MAX... " >&6; } +if ${gl_cv_size_max+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_cv_size_max= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Found it" >/dev/null 2>&1; then : + gl_cv_size_max=yes +fi +rm -f conftest* + + if test -z "$gl_cv_size_max"; then + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include +#include "; then : + +else + size_t_bits_minus_1= +fi + + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include "; then : + +else + fits_in_uint= +fi + + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern size_t foo; + extern unsigned long foo; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + fits_in_uint=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + gl_cv_size_max='((size_t)~(size_t)0)' + fi + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 +$as_echo "$gl_cv_size_max" >&6; } + if test "$gl_cv_size_max" != yes; then + +cat >>confdefs.h <<_ACEOF +#define SIZE_MAX $gl_cv_size_max +_ACEOF + + fi + + + + + for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + +fi + +done + + + + + + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 +$as_echo_n "checking for working fcntl.h... " >&6; } +if ${gl_cv_header_working_fcntl_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + +int +main () +{ + + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_header_working_fcntl_h=yes +else + case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 +$as_echo "$gl_cv_header_working_fcntl_h" >&6; } + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +cat >>confdefs.h <<_ACEOF +#define HAVE_WORKING_O_NOATIME $ac_val +_ACEOF + + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +cat >>confdefs.h <<_ACEOF +#define HAVE_WORKING_O_NOFOLLOW $ac_val +_ACEOF + + + + + + + + + + + + + + + + + if test $ac_cv_func_uselocale = yes; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5 +$as_echo_n "checking whether uselocale works... " >&6; } +if ${gt_cv_func_uselocale_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + # Guess no on AIX, yes otherwise. + case "$host_os" in + aix*) gt_cv_func_uselocale_works="guessing no" ;; + *) gt_cv_func_uselocale_works="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + uselocale (NULL); + setlocale (LC_ALL, "en_US.UTF-8"); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gt_cv_func_uselocale_works=yes +else + gt_cv_func_uselocale_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5 +$as_echo "$gt_cv_func_uselocale_works" >&6; } + else + gt_cv_func_uselocale_works=no + fi + case "$gt_cv_func_uselocale_works" in + *yes) + +$as_echo "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h + + ;; + esac + + + case "$gt_cv_func_uselocale_works" in + *yes) + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5 +$as_echo_n "checking for fake locale system (OpenBSD)... " >&6; } +if ${gt_cv_locale_fake+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + openbsd*) gt_cv_locale_fake="guessing yes" ;; + *) gt_cv_locale_fake="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + locale_t loc1, loc2; + if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; + if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; + loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); + loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); + return !(loc1 == loc2); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gt_cv_locale_fake=yes +else + gt_cv_locale_fake=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5 +$as_echo "$gt_cv_locale_fake" >&6; } + ;; + *) gt_cv_locale_fake=no ;; + esac + case "$gt_cv_locale_fake" in + *yes) + +$as_echo "#define HAVE_FAKE_LOCALES 1" >>confdefs.h + + ;; + esac + + case "$gt_cv_func_uselocale_works" in + *yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5 +$as_echo_n "checking for Solaris 11.4 locale system... " >&6; } +if ${gt_cv_locale_solaris114+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + solaris*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + struct _LC_locale_t *x; + locale_t y; + +int +main () +{ +*y = x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_locale_solaris114=yes +else + gt_cv_locale_solaris114=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + *) gt_cv_locale_solaris114=no ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5 +$as_echo "$gt_cv_locale_solaris114" >&6; } + ;; + *) gt_cv_locale_solaris114=no ;; + esac + if test $gt_cv_locale_solaris114 = yes; then + +$as_echo "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h + + fi + + case "$gt_cv_func_uselocale_works" in + *yes) + for ac_func in getlocalename_l +do : + ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l" +if test "x$ac_cv_func_getlocalename_l" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETLOCALENAME_L 1 +_ACEOF + +fi +done + + ;; + esac + + gt_nameless_locales=no + if false; then + gt_nameless_locales=yes + +$as_echo "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyCurrent=yes +else + gt_cv_func_CFLocaleCopyCurrent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyPreferredLanguages(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else + gt_cv_func_CFLocaleCopyPreferredLanguages=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + +$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5 +$as_echo_n "checking for flexible array members... " >&6; } +if ${ac_cv_c_flexmember+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + struct s { int n; double d[]; }; +int +main () +{ +int m = getchar (); + struct s *p = malloc (offsetof (struct s, d) + + m * sizeof (double)); + p->d[0] = 0.0; + return p->d != (double *) NULL; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_flexmember=yes +else + ac_cv_c_flexmember=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 +$as_echo "$ac_cv_c_flexmember" >&6; } + if test $ac_cv_c_flexmember = yes; then + +$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h + + else + $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h + + fi + + + + + + + + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="ar" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + + if test -z "$ARFLAGS"; then + ARFLAGS='cr' + fi + + + + + case "$enable_silent_rules" in + yes) INTL_DEFAULT_VERBOSITY=0;; + no) INTL_DEFAULT_VERBOSITY=1;; + *) INTL_DEFAULT_VERBOSITY=1;; + esac + + + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : + +else + +$as_echo "#define ptrdiff_t long" >>confdefs.h + + +fi + + for ac_header in features.h stddef.h stdlib.h string.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + for ac_func in asprintf fwprintf newlocale putenv setenv setlocale \ + snprintf strnlen uselocale wcslen wcsnlen mbrtowc wcrtomb +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include +" +if test "x$ac_cv_have_decl__snprintf" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNPRINTF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "_snwprintf" "ac_cv_have_decl__snwprintf" "#include +" +if test "x$ac_cv_have_decl__snwprintf" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNWPRINTF $ac_have_decl +_ACEOF + + + ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "#include +" +if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl +_ACEOF + + + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac + + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi + + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi + + if test "$ac_cv_func_newlocale" = yes; then + HAVE_NEWLOCALE=1 + else + HAVE_NEWLOCALE=0 + fi + + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 +$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } +if ${am_cv_langinfo_codeset+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); return !cs; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_langinfo_codeset=yes +else + am_cv_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 +$as_echo "$am_cv_langinfo_codeset" >&6; } + if test $am_cv_langinfo_codeset = yes; then + +$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +$as_echo_n "checking for LC_MESSAGES... " >&6; } +if ${gt_cv_val_LC_MESSAGES+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_val_LC_MESSAGES=yes +else + gt_cv_val_LC_MESSAGES=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 +$as_echo "$gt_cv_val_LC_MESSAGES" >&6; } + if test $gt_cv_val_LC_MESSAGES = yes; then + +$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h + + fi + + + if test $gt_nameless_locales = yes; then + HAVE_NAMELESS_LOCALES=1 + else + HAVE_NAMELESS_LOCALES=0 + fi + + + if test "$enable_shared" = yes; then + case "$host_os" in + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac + else + is_woe32dll=no + fi + WOE32DLL=$is_woe32dll + + + case "$host_os" in + mingw* | cygwin*) is_woe32=yes ;; + *) is_woe32=no ;; + esac + WOE32=$is_woe32 + + if test $WOE32 = yes; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_WINDRES+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_WINDRES="windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + + fi + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyCurrent=yes +else + gt_cv_func_CFLocaleCopyCurrent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyPreferredLanguages(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else + gt_cv_func_CFLocaleCopyPreferredLanguages=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + +$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5 +$as_echo_n "checking whether included gettext is requested... " >&6; } + +# Check whether --with-included-gettext was given. +if test "${with_included_gettext+set}" = set; then : + withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5 +$as_echo "$nls_cv_force_use_gnu_gettext" >&6; } + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if eval \${$gt_func_gnugettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + +int +main () +{ + +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libc=yes" +else + eval "$gt_func_gnugettext_libc=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$gt_func_gnugettext_libc + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then : + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBINTL= + LTLIBINTL= + INCINTL= + LIBINTL_PREFIX= + HAVE_LIBINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if eval \${$gt_func_gnugettext_libintl+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + +int +main () +{ + +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libintl=yes" +else + eval "$gt_func_gnugettext_libintl=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + +int +main () +{ + +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +eval ac_res=\$$gt_func_gnugettext_libintl + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="lib/intl/libintl.a $LIBICONV $LIBTHREAD" + LTLIBINTL="lib/intl/libintl.a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + CATOBJEXT=.gmo + fi + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + else + USE_NLS=no + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h + + fi + + POSUB=po + fi + + + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + + + + + nls_cv_header_intl= + nls_cv_header_libgt= + + DATADIRNAME=share + + + INSTOBJEXT=.mo + + + GENCAT=gencat + + + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + + + INTL_LIBTOOL_SUFFIX_PREFIX= + + + + INTLLIBS="$LIBINTL" + + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if eval \${$as_ac_Header+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" +else + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 +$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } +if ${ac_cv_header_sys_types_h_makedev+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return makedev(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_header_sys_types_h_makedev=yes +else + ac_cv_header_sys_types_h_makedev=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 +$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } + +if test $ac_cv_header_sys_types_h_makedev = no; then +ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : + +$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h + +fi + + + + if test $ac_cv_header_sys_mkdev_h = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : + +$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h + +fi + + + fi +fi + + + + for ac_header in inttypes.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + +fi + +done + + + +for ac_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \ + memory.h locale.h termcap.h termio.h termios.h dlfcn.h \ + stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \ + regex.h syslog.h ulimit.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \ + sys/mman.h sys/param.h sys/random.h sys/socket.h sys/stat.h \ + sys/time.h sys/times.h sys/types.h sys/wait.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in netinet/in.h arpa/inet.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" " +#if HAVE_SYS_STREAM_H +# include +#endif + +" +if test "x$ac_cv_header_sys_ptem_h" = xyes; then : + +fi + + + +ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" " +#if HAVE_SYS_TIME_H +# include +#endif + +" +if test "x$ac_cv_header_sys_resource_h" = xyes; then : + $as_echo "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h + +fi + + + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +void *alloca (size_t); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +$as_echo "#define uid_t int" >>confdefs.h + + +$as_echo "#define gid_t int" >>confdefs.h + +fi + +for ac_header in unistd.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNISTD_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 +$as_echo_n "checking for working chown... " >&6; } +if ${ac_cv_func_chown_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_chown_works=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include + +int +main () +{ + char *f = "conftest.chown"; + struct stat before, after; + + if (creat (f, 0600) < 0) + return 1; + if (stat (f, &before) < 0) + return 1; + if (chown (f, (uid_t) -1, (gid_t) -1) == -1) + return 1; + if (stat (f, &after) < 0) + return 1; + return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_chown_works=yes +else + ac_cv_func_chown_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +rm -f conftest.chown + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5 +$as_echo "$ac_cv_func_chown_works" >&6; } +if test $ac_cv_func_chown_works = yes; then + +$as_echo "#define HAVE_CHOWN 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 +$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } +if ${ac_cv_func_getpgrp_void+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Use it with a single arg. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +getpgrp (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_func_getpgrp_void=no +else + ac_cv_func_getpgrp_void=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 +$as_echo "$ac_cv_func_getpgrp_void" >&6; } +if test $ac_cv_func_getpgrp_void = yes; then + +$as_echo "#define GETPGRP_VOID 1" >>confdefs.h + +fi + +if ${ac_cv_func_setvbuf_reversed+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_func_setvbuf_reversed=no +fi + + +for ac_func in vprintf +do : + ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" +if test "x$ac_cv_func_vprintf" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VPRINTF 1 +_ACEOF + +ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" +if test "x$ac_cv_func__doprnt" = xyes; then : + +$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h + +fi + +fi +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5 +$as_echo_n "checking for working strcoll... " >&6; } +if ${ac_cv_func_strcoll_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_strcoll_works=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +return (strcoll ("abc", "def") >= 0 || + strcoll ("ABC", "DEF") >= 0 || + strcoll ("123", "456") >= 0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strcoll_works=yes +else + ac_cv_func_strcoll_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5 +$as_echo "$ac_cv_func_strcoll_works" >&6; } +if test $ac_cv_func_strcoll_works = yes; then + +$as_echo "#define HAVE_STRCOLL 1" >>confdefs.h + +fi + + + +if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then + MALLOC_TARGET=alloca + MALLOC_SRC=alloca.c + + MALLOC_LIB='-lmalloc' + MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' + MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' + MALLOC_DEP='$(MALLOC_LIBRARY)' +fi + +if test "$ac_cv_func_vprintf" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5 +$as_echo_n "checking for declaration of vprintf in stdio.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then : + ac_cv_func_vprintf=yes +fi +rm -f conftest* + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5 +$as_echo "$ac_cv_func_vprintf" >&6; } + if test $ac_cv_func_vprintf = yes; then + $as_echo "#define HAVE_VPRINTF 1" >>confdefs.h + + fi +fi + +if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then + case " $LIBOBJS " in + *" vprint.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS vprint.$ac_objext" + ;; +esac + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if ${ac_cv_type_signal+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int +else + ac_cv_type_signal=void +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + +ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype" +if test "x$ac_cv_func___setostype" = xyes; then : + $as_echo "#define HAVE_SETOSTYPE 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3" +if test "x$ac_cv_func_wait3" = xyes; then : + $as_echo "#define HAVE_WAIT3 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" +if test "x$ac_cv_func_mkfifo" = xyes; then : + $as_echo "#define HAVE_MKFIFO 1" >>confdefs.h + +else + $as_echo "#define MKFIFO_MISSING 1" >>confdefs.h + +fi + + +for ac_func in dup2 eaccess fcntl getdtablesize getentropy getgroups \ + gethostname getpagesize getpeername getrandom getrlimit \ + getrusage gettimeofday kill killpg lstat pselect readlink \ + select setdtablesize setitimer tcgetpgrp uname ulimit waitpid +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename" +if test "x$ac_cv_func_rename" = xyes; then : + $as_echo "#define HAVE_RENAME 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" rename.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS rename.$ac_objext" + ;; +esac + +fi + + + +for ac_func in bcopy bzero confstr faccessat fnmatch \ + getaddrinfo gethostbyname getservbyname getservent inet_aton \ + imaxdiv memmove pathconf putenv raise random regcomp regexec \ + setenv setlinebuf setlocale setvbuf siginterrupt strchr \ + sysconf syslog tcgetattr times ttyname tzset unsetenv +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in vasprintf asprintf +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +for ac_func in isascii isblank isgraph isprint isspace isxdigit +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +for ac_func in getpwent getpwnam getpwuid +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +for ac_func in mkstemp mkdtemp +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +for ac_func in arc4random +do : + ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random" +if test "x$ac_cv_func_arc4random" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ARC4RANDOM 1 +_ACEOF + +fi +done + + +ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes; then : + $as_echo "#define HAVE_GETCWD 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" getcwd.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes; then : + $as_echo "#define HAVE_MEMSET 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" memset.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memset.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes; then : + $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strcasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" +if test "x$ac_cv_func_strcasestr" = xyes; then : + $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strcasestr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes; then : + $as_echo "#define HAVE_STRERROR 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strerror.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strerror.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" +if test "x$ac_cv_func_strftime" = xyes; then : + $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strftime.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strftime.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" +if test "x$ac_cv_func_strnlen" = xyes; then : + $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strnlen.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk" +if test "x$ac_cv_func_strpbrk" = xyes; then : + $as_echo "#define HAVE_STRPBRK 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strpbrk.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" +if test "x$ac_cv_func_strstr" = xyes; then : + $as_echo "#define HAVE_STRSTR 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strstr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" +if test "x$ac_cv_func_strtod" = xyes; then : + $as_echo "#define HAVE_STRTOD 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" +if test "x$ac_cv_func_strtol" = xyes; then : + $as_echo "#define HAVE_STRTOL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtol.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtol.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes; then : + $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtoul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" +if test "x$ac_cv_func_strtoll" = xyes; then : + $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtoll.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoll.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = xyes; then : + $as_echo "#define HAVE_STRTOULL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtoull.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoull.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" +if test "x$ac_cv_func_strtoimax" = xyes; then : + $as_echo "#define HAVE_STRTOIMAX 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtoimax.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" +if test "x$ac_cv_func_strtoumax" = xyes; then : + $as_echo "#define HAVE_STRTOUMAX 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtoumax.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf" +if test "x$ac_cv_func_dprintf" = xyes; then : + $as_echo "#define HAVE_DPRINTF 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" dprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS dprintf.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" +if test "x$ac_cv_func_strchrnul" = xyes; then : + $as_echo "#define HAVE_STRCHRNUL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strchrnul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes; then : + $as_echo "#define HAVE_STRDUP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strdup.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strdup.$ac_objext" + ;; +esac + +fi + + + +for ac_header in libaudit.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" +if test "x$ac_cv_header_libaudit_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBAUDIT_H 1 +_ACEOF + +fi + +done + +ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include +" +if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl +_ACEOF + + +ac_fn_c_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default" +if test "x$ac_cv_have_decl_confstr" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CONFSTR $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default" +if test "x$ac_cv_have_decl_printf" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PRINTF $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" +if test "x$ac_cv_have_decl_sbrk" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SBRK $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default" +if test "x$ac_cv_have_decl_setregid" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SETREGID $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default" +if test "x$ac_cv_have_decl_strcpy" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRCPY $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default" +if test "x$ac_cv_have_decl_strsignal" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRSIGNAL $ac_have_decl +_ACEOF + + +for ac_func in setresuid setresgid +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +ac_fn_c_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtold" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOLD $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5 +$as_echo_n "checking for broken strtold... " >&6; } + if ${bash_cv_strtold_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +long double r; char *foo, bar; r = strtold(foo, &bar); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_strtold_broken=no +else + bash_cv_strtold_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5 +$as_echo "$bash_cv_strtold_broken" >&6; } + if test "$bash_cv_strtold_broken" = "yes" ; then + $as_echo "#define STRTOLD_BROKEN 1" >>confdefs.h + + fi + +fi + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoimax" >&5 +$as_echo_n "checking for declaration of strtoimax... " >&6; } +if ${bash_cv_decl_strtoimax+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if STDC_HEADERS +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif + +int +main () +{ +return !strtoimax; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_decl_strtoimax=yes +else + bash_cv_decl_strtoimax=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoimax" >&5 +$as_echo "$bash_cv_decl_strtoimax" >&6; } +bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +if test $bash_cv_decl_strtoimax = yes; then + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 1 +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 0 +_ACEOF + +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtol" >&5 +$as_echo_n "checking for declaration of strtol... " >&6; } +if ${bash_cv_decl_strtol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if STDC_HEADERS +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif + +int +main () +{ +return !strtol; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_decl_strtol=yes +else + bash_cv_decl_strtol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtol" >&5 +$as_echo "$bash_cv_decl_strtol" >&6; } +bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +if test $bash_cv_decl_strtol = yes; then + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 1 +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 0 +_ACEOF + +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoll" >&5 +$as_echo_n "checking for declaration of strtoll... " >&6; } +if ${bash_cv_decl_strtoll+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if STDC_HEADERS +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif + +int +main () +{ +return !strtoll; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_decl_strtoll=yes +else + bash_cv_decl_strtoll=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoll" >&5 +$as_echo "$bash_cv_decl_strtoll" >&6; } +bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +if test $bash_cv_decl_strtoll = yes; then + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 1 +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 0 +_ACEOF + +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoul" >&5 +$as_echo_n "checking for declaration of strtoul... " >&6; } +if ${bash_cv_decl_strtoul+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if STDC_HEADERS +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif + +int +main () +{ +return !strtoul; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_decl_strtoul=yes +else + bash_cv_decl_strtoul=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoul" >&5 +$as_echo "$bash_cv_decl_strtoul" >&6; } +bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +if test $bash_cv_decl_strtoul = yes; then + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 1 +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 0 +_ACEOF + +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoull" >&5 +$as_echo_n "checking for declaration of strtoull... " >&6; } +if ${bash_cv_decl_strtoull+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if STDC_HEADERS +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif + +int +main () +{ +return !strtoull; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_decl_strtoull=yes +else + bash_cv_decl_strtoull=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoull" >&5 +$as_echo "$bash_cv_decl_strtoull" >&6; } +bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +if test $bash_cv_decl_strtoull = yes; then + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 1 +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 0 +_ACEOF + +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoumax" >&5 +$as_echo_n "checking for declaration of strtoumax... " >&6; } +if ${bash_cv_decl_strtoumax+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if STDC_HEADERS +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif + +int +main () +{ +return !strtoumax; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_decl_strtoumax=yes +else + bash_cv_decl_strtoumax=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoumax" >&5 +$as_echo "$bash_cv_decl_strtoumax" >&6; } +bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +if test $bash_cv_decl_strtoumax = yes; then + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 1 +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define $bash_tr_func 0 +_ACEOF + +fi + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 +$as_echo_n "checking for working mktime... " >&6; } +if ${ac_cv_func_working_mktime+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_working_mktime=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Test program from Paul Eggert and Tony Leneis. */ +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifndef HAVE_ALARM +# define alarm(X) /* empty */ +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static const char *tz_strings[] = { + (const char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (time_t now) +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (time_t now) +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (int j) +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} + +int +main () +{ + time_t t, delta; + int i, j; + + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + alarm (60); + + for (;;) + { + t = (time_t_max << 1) + 1; + if (t <= time_t_max) + break; + time_t_max = t; + } + time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; + + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv ((char*) tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) + return 1; + if (! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + return 1; + + for (j = 1; ; j <<= 1) + if (! bigtime_test (j)) + return 1; + else if (INT_MAX / 2 < j) + break; + if (! bigtime_test (INT_MAX)) + return 1; + } + return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_working_mktime=yes +else + ac_cv_func_working_mktime=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 +$as_echo "$ac_cv_func_working_mktime" >&6; } +if test $ac_cv_func_working_mktime = no; then + case " $LIBOBJS " in + *" mktime.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mktime.$ac_objext" + ;; +esac + +fi + + + +for ac_header in argz.h errno.h fcntl.h malloc.h stdio_ext.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + +for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \ + munmap mremap stpcpy strcspn +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +INTL_DEP= INTL_INC= LIBINTL_H= +if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then + INTL_DEP='${INTL_LIBDIR}/libintl.a' + INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}' + LIBINTL_H='${INTL_BUILDDIR}/libintl.h' +fi + + + + + + +for ac_header in wctype.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" +if test "x$ac_cv_header_wctype_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WCTYPE_H 1 +_ACEOF + +fi + +done + +for ac_header in wchar.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" +if test "x$ac_cv_header_wchar_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WCHAR_H 1 +_ACEOF + +fi + +done + +for ac_header in langinfo.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_langinfo_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LANGINFO_H 1 +_ACEOF + +fi + +done + + +for ac_header in mbstr.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default" +if test "x$ac_cv_header_mbstr_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MBSTR_H 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen" +if test "x$ac_cv_func_mbrlen" = xyes; then : + $as_echo "#define HAVE_MBRLEN 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp" +if test "x$ac_cv_func_mbscasecmp" = xyes; then : + $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp" +if test "x$ac_cv_func_mbscmp" = xyes; then : + $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs" +if test "x$ac_cv_func_mbsnrtowcs" = xyes; then : + $as_echo "#define HAVE_MBSNRTOWCS 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs" +if test "x$ac_cv_func_mbsrtowcs" = xyes; then : + $as_echo "#define HAVE_MBSRTOWCS 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr" +if test "x$ac_cv_func_mbschr" = xyes; then : + $as_echo "#define HAVE_MBSCHR 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" mbschr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mbschr.$ac_objext" + ;; +esac + +fi + + + +ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" +if test "x$ac_cv_func_wcrtomb" = xyes; then : + $as_echo "#define HAVE_WCRTOMB 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll" +if test "x$ac_cv_func_wcscoll" = xyes; then : + $as_echo "#define HAVE_WCSCOLL 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup" +if test "x$ac_cv_func_wcsdup" = xyes; then : + $as_echo "#define HAVE_WCSDUP 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth" +if test "x$ac_cv_func_wcwidth" = xyes; then : + $as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" +if test "x$ac_cv_func_wctype" = xyes; then : + $as_echo "#define HAVE_WCTYPE 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth" +if test "x$ac_cv_func_wcswidth" = xyes; then : + $as_echo "#define HAVE_WCSWIDTH 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" wcswidth.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext" + ;; +esac + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5 +$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; } +if ${ac_cv_func_mbrtowc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +wchar_t wc; + char const s[] = ""; + size_t n = 1; + mbstate_t state; + return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_mbrtowc=yes +else + ac_cv_func_mbrtowc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5 +$as_echo "$ac_cv_func_mbrtowc" >&6; } + if test $ac_cv_func_mbrtowc = yes; then + +$as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h + + fi + +if test $ac_cv_func_mbrtowc = yes; then + $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h + +fi + +for ac_func in iswlower iswupper towlower towupper iswctype +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 +$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } +if ${bash_cv_langinfo_codeset+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_langinfo_codeset=yes +else + bash_cv_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_langinfo_codeset" >&5 +$as_echo "$bash_cv_langinfo_codeset" >&6; } +if test $bash_cv_langinfo_codeset = yes; then + $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5 +$as_echo_n "checking for wchar_t in wchar.h... " >&6; } +if ${bash_cv_type_wchar_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ + + wchar_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_type_wchar_t=yes +else + bash_cv_type_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5 +$as_echo "$bash_cv_type_wchar_t" >&6; } +if test $bash_cv_type_wchar_t = yes; then + +$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5 +$as_echo_n "checking for wctype_t in wctype.h... " >&6; } +if ${bash_cv_type_wctype_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + wctype_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_type_wctype_t=yes +else + bash_cv_type_wctype_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5 +$as_echo "$bash_cv_type_wctype_t" >&6; } +if test $bash_cv_type_wctype_t = yes; then + +$as_echo "#define HAVE_WCTYPE_T 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5 +$as_echo_n "checking for wint_t in wctype.h... " >&6; } +if ${bash_cv_type_wint_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + wint_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_type_wint_t=yes +else + bash_cv_type_wint_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5 +$as_echo "$bash_cv_type_wint_t" >&6; } +if test $bash_cv_type_wint_t = yes; then + +$as_echo "#define HAVE_WINT_T 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5 +$as_echo_n "checking for wcwidth broken with unicode combining characters... " >&6; } +if ${bash_cv_wcwidth_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + bash_cv_wcwidth_broken=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +#include +#include + +int +main(c, v) +int c; +char **v; +{ + int w; + + setlocale(LC_ALL, "en_US.UTF-8"); + w = wcwidth (0x0301); + exit (w == 0); /* exit 0 if wcwidth broken */ +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_wcwidth_broken=yes +else + bash_cv_wcwidth_broken=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5 +$as_echo "$bash_cv_wcwidth_broken" >&6; } +if test "$bash_cv_wcwidth_broken" = yes; then + +$as_echo "#define WCWIDTH_BROKEN 1" >>confdefs.h + +fi + +if test "$am_cv_func_iconv" = yes; then + OLDLIBS="$LIBS" + LIBS="$LIBS $LIBINTL $LIBICONV" + for ac_func in locale_charset +do : + ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset" +if test "x$ac_cv_func_locale_charset" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOCALE_CHARSET 1 +_ACEOF + +fi +done + + LIBS="$OLDLIBS" +fi + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 +$as_echo_n "checking size of wchar_t... " >&6; } +if ${ac_cv_sizeof_wchar_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_wchar_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (wchar_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_wchar_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 +$as_echo "$ac_cv_sizeof_wchar_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t +_ACEOF + + + + + +if test "$opt_static_link" != yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + +for ac_func in dlopen dlclose dlsym +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +fi + +ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include +/* NetBSD declares sys_siglist in unistd.h. */ +#ifdef HAVE_UNISTD_H +# include +#endif + +" +if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST $ac_have_decl +_ACEOF + + + +if test "$ac_cv_func_inet_aton" != 'yes'; then + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 +$as_echo_n "checking for inet_aton... " >&6; } +if ${bash_cv_func_inet_aton+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +struct in_addr ap; +int +main () +{ + inet_aton("127.0.0.1", &ap); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_func_inet_aton=yes +else + bash_cv_func_inet_aton=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5 +$as_echo "$bash_cv_func_inet_aton" >&6; } +if test $bash_cv_func_inet_aton = yes; then + $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" inet_aton.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext" + ;; +esac + +fi + +fi + +case "$host_os" in +irix4*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5 +$as_echo_n "checking for getpwent in -lsun... " >&6; } +if ${ac_cv_lib_sun_getpwent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsun $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getpwent (); +int +main () +{ +return getpwent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sun_getpwent=yes +else + ac_cv_lib_sun_getpwent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5 +$as_echo "$ac_cv_lib_sun_getpwent" >&6; } +if test "x$ac_cv_lib_sun_getpwent" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSUN 1 +_ACEOF + + LIBS="-lsun $LIBS" + +fi + ;; +esac + +if test "$ac_cv_func_getpeername" = no; then + +if test "X$bash_cv_have_socklib" = "X"; then +_bash_needmsg= +else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5 +$as_echo_n "checking for socket library... " >&6; } +_bash_needmsg=yes +fi +if ${bash_cv_have_socklib+:} false; then : + $as_echo_n "(cached) " >&6 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5 +$as_echo_n "checking for getpeername in -lsocket... " >&6; } +if ${ac_cv_lib_socket_getpeername+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket -lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getpeername (); +int +main () +{ +return getpeername (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_getpeername=yes +else + ac_cv_lib_socket_getpeername=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5 +$as_echo "$ac_cv_lib_socket_getpeername" >&6; } +if test "x$ac_cv_lib_socket_getpeername" = xyes; then : + bash_cv_have_socklib=yes +else + bash_cv_have_socklib=no +fi + +fi + +if test "X$_bash_needmsg" = Xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5 +$as_echo "$bash_cv_have_socklib" >&6; } + _bash_needmsg= +fi +if test $bash_cv_have_socklib = yes; then + # check for libnsl, add it to LIBS if present + if test "X$bash_cv_have_libnsl" = "X"; then + _bash_needmsg= + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5 +$as_echo_n "checking for libnsl... " >&6; } + _bash_needmsg=yes + fi + if ${bash_cv_have_libnsl+:} false; then : + $as_echo_n "(cached) " >&6 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 +$as_echo_n "checking for t_open in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_t_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char t_open (); +int +main () +{ +return t_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_t_open=yes +else + ac_cv_lib_nsl_t_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 +$as_echo "$ac_cv_lib_nsl_t_open" >&6; } +if test "x$ac_cv_lib_nsl_t_open" = xyes; then : + bash_cv_have_libnsl=yes +else + bash_cv_have_libnsl=no +fi + +fi + + if test "X$_bash_needmsg" = Xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5 +$as_echo "$bash_cv_have_libnsl" >&6; } + _bash_needmsg= + fi + if test $bash_cv_have_libnsl = yes; then + LIBS="-lsocket -lnsl $LIBS" + else + LIBS="-lsocket $LIBS" + fi + $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h + + $as_echo "#define HAVE_GETPEERNAME 1" >>confdefs.h + +fi + +fi +if test "$ac_cv_func_gethostbyname" = no; then + if test "X$bash_cv_have_gethostbyname" = "X"; then +_bash_needmsg=yes +else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 +$as_echo_n "checking for gethostbyname in socket library... " >&6; } +_bash_needmsg= +fi +if ${bash_cv_have_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + struct hostent *hp; + hp = gethostbyname("localhost"); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_have_gethostbyname=yes +else + bash_cv_have_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + +if test "X$_bash_needmsg" = Xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 +$as_echo_n "checking for gethostbyname in socket library... " >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5 +$as_echo "$bash_cv_have_gethostbyname" >&6; } +if test "$bash_cv_have_gethostbyname" = yes; then +$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +$as_echo_n "checking type of array argument to getgroups... " >&6; } +if ${ac_cv_type_getgroups+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_type_getgroups=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Mike Rendell for this test. */ +$ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + +int +main () +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test $ac_cv_type_getgroups = cross; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +$as_echo "$ac_cv_type_getgroups" >&6; } + +cat >>confdefs.h <<_ACEOF +#define GETGROUPS_T $ac_cv_type_getgroups +_ACEOF + + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +$as_echo "#define uid_t int" >>confdefs.h + + +$as_echo "#define gid_t int" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + + + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +if test "x$ac_cv_type_uintptr_t" = xyes; then : + +$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h + +else + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default" +if test "x$ac_cv_type_time_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define time_t long +_ACEOF + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 +$as_echo_n "checking for long long... " >&6; } +if ${bash_cv_type_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +long long ll = 1; int i = 63; +int +main () +{ + +long long llm = (long long) -1; +return ll << i | ll >> i | llm / ll | llm % ll; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_type_long_long='long long' +else + bash_cv_type_long_long='long' +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_long_long" >&5 +$as_echo "$bash_cv_type_long_long" >&6; } +if test "$bash_cv_type_long_long" = 'long long'; then + $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5 +$as_echo_n "checking for unsigned long long... " >&6; } +if ${bash_cv_type_unsigned_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +unsigned long long ull = 1; int i = 63; +int +main () +{ + +unsigned long long ullmax = (unsigned long long) -1; +return ull << i | ull >> i | ullmax / ull | ullmax % ull; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_type_unsigned_long_long='unsigned long long' +else + bash_cv_type_unsigned_long_long='unsigned long' +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_unsigned_long_long" >&5 +$as_echo "$bash_cv_type_unsigned_long_long" >&6; } +if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then + $as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if ${ac_cv_type_signal+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int +else + ac_cv_type_signal=void +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5 +$as_echo_n "checking for sig_atomic_t in signal.h... " >&6; } +if ${ac_cv_have_sig_atomic_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ + sig_atomic_t x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_have_sig_atomic_t=yes +else + ac_cv_have_sig_atomic_t=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5 +$as_echo "$ac_cv_have_sig_atomic_t" >&6; } +if test "$ac_cv_have_sig_atomic_t" = "no" +then + ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default" +if test "x$ac_cv_type_sig_atomic_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define sig_atomic_t int +_ACEOF + +fi + +fi + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 +$as_echo_n "checking size of char... " >&6; } +if ${ac_cv_sizeof_char+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_char" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (char) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_char=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 +$as_echo "$ac_cv_sizeof_char" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CHAR $ac_cv_sizeof_char +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (short) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_short=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5 +$as_echo_n "checking size of char *... " >&6; } +if ${ac_cv_sizeof_char_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_char_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (char *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_char_p=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5 +$as_echo "$ac_cv_sizeof_char_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 +$as_echo_n "checking size of double... " >&6; } +if ${ac_cv_sizeof_double+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_double=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_DOUBLE $ac_cv_sizeof_double +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + + +ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default" +if test "x$ac_cv_type_u_int" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_int unsigned int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default" +if test "x$ac_cv_type_u_long" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_long unsigned long +_ACEOF + +fi + + + +if test "$ac_cv_sizeof_short" = 2; then + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits16_t short +_ACEOF + +fi + +elif test "$ac_cv_sizeof_char" = 2; then + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits16_t char +_ACEOF + +fi + +else + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits16_t short +_ACEOF + +fi + +fi + + +if test "$ac_cv_sizeof_short" = 2; then + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_bits16_t unsigned short +_ACEOF + +fi + +elif test "$ac_cv_sizeof_char" = 2; then + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_bits16_t unsigned char +_ACEOF + +fi + +else + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_bits16_t unsigned short +_ACEOF + +fi + +fi + + +if test "$ac_cv_sizeof_int" = 4; then + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits32_t int +_ACEOF + +fi + +elif test "$ac_cv_sizeof_long" = 4; then + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits32_t long +_ACEOF + +fi + +else + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits32_t int +_ACEOF + +fi + +fi + + +if test "$ac_cv_sizeof_int" = 4; then + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_bits32_t unsigned int +_ACEOF + +fi + +elif test "$ac_cv_sizeof_long" = 4; then + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_bits32_t unsigned long +_ACEOF + +fi + +else + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define u_bits32_t unsigned int +_ACEOF + +fi + +fi + + +if test "$ac_cv_sizeof_char_p" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits64_t char * +_ACEOF + +fi + +elif test "$ac_cv_sizeof_double" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits64_t double +_ACEOF + +fi + +elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits64_t long long +_ACEOF + +fi + +elif test "$ac_cv_sizeof_long" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits64_t long +_ACEOF + +fi + +else + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define bits64_t double +_ACEOF + +fi + +fi + + + +if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ptrdiff_t int +_ACEOF + +fi + +elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ptrdiff_t long +_ACEOF + +fi + +elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ptrdiff_t long long +_ACEOF + +fi + +else + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ptrdiff_t int +_ACEOF + +fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } +if ${ac_cv_header_stat_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +#if defined S_ISBLK && defined S_IFDIR +extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; +#endif + +#if defined S_ISBLK && defined S_IFCHR +extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; +#endif + +#if defined S_ISLNK && defined S_IFREG +extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; +#endif + +#if defined S_ISSOCK && defined S_IFREG +extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stat_broken=no +else + ac_cv_header_stat_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 +$as_echo "$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then + +$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5 +$as_echo_n "checking whether #! works in shell scripts... " >&6; } +if ${ac_cv_sys_interpreter+:} false; then : + $as_echo_n "(cached) " >&6 +else + echo '#! /bin/cat +exit 69 +' >conftest +chmod u+x conftest +(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1) +if test $? -ne 69; then + ac_cv_sys_interpreter=yes +else + ac_cv_sys_interpreter=no +fi +rm -f conftest +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 +$as_echo "$ac_cv_sys_interpreter" >&6; } +interpval=$ac_cv_sys_interpreter + +if test $ac_cv_sys_interpreter = yes; then +$as_echo "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h + +fi + +if test "$ac_cv_func_lstat" = "no"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5 +$as_echo_n "checking for lstat... " >&6; } +if ${bash_cv_func_lstat+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + lstat(".",(struct stat *)0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_func_lstat=yes +else + bash_cv_func_lstat=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5 +$as_echo "$bash_cv_func_lstat" >&6; } +if test $bash_cv_func_lstat = yes; then + $as_echo "#define HAVE_LSTAT 1" >>confdefs.h + +fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the ctype macros accept non-ascii characters" >&5 +$as_echo_n "checking whether the ctype macros accept non-ascii characters... " >&6; } +if ${bash_cv_func_ctype_nonascii+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;} + bash_cv_func_ctype_nonascii=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_LOCALE_H +#include +#endif +#include +#include +#include + +int +main(c, v) +int c; +char *v[]; +{ + char *deflocale; + unsigned char x; + int r1, r2; + +#ifdef HAVE_SETLOCALE + /* We take a shot here. If that locale is not known, try the + system default. We try this one because '\342' (226) is + known to be a printable character in that locale. */ + deflocale = setlocale(LC_ALL, "en_US.ISO8859-1"); + if (deflocale == 0) + deflocale = setlocale(LC_ALL, ""); +#endif + + x = '\342'; + r1 = isprint(x); + x -= 128; + r2 = isprint(x); + exit (r1 == 0 || r2 == 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_func_ctype_nonascii=yes +else + bash_cv_func_ctype_nonascii=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_ctype_nonascii" >&5 +$as_echo "$bash_cv_func_ctype_nonascii" >&6; } +if test $bash_cv_func_ctype_nonascii = yes; then +$as_echo "#define CTYPE_NON_ASCII 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5 +$as_echo_n "checking if dup2 fails to clear the close-on-exec flag... " >&6; } +if ${bash_cv_dup2_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;} + bash_cv_dup2_broken=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +int +main() +{ + int fd1, fd2, fl; + fd1 = open("/dev/null", 2); + if (fcntl(fd1, 2, 1) < 0) + exit(1); + fd2 = dup2(fd1, 1); + if (fd2 < 0) + exit(2); + fl = fcntl(fd2, 1, 0); + /* fl will be 1 if dup2 did not reset the close-on-exec flag. */ + exit(fl != 1); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_dup2_broken=yes +else + bash_cv_dup2_broken=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5 +$as_echo "$bash_cv_dup2_broken" >&6; } +if test $bash_cv_dup2_broken = yes; then +$as_echo "#define DUP2_BROKEN 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5 +$as_echo_n "checking whether pgrps need synchronization... " >&6; } +if ${bash_cv_pgrp_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;} + bash_cv_pgrp_pipe=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_WAIT_H +# include +#endif +#include +int +main() +{ +# ifdef GETPGRP_VOID +# define getpgID() getpgrp() +# else +# define getpgID() getpgrp(0) +# define setpgid(x,y) setpgrp(x,y) +# endif + int pid1, pid2, fds[2]; + int status; + char ok; + + switch (pid1 = fork()) { + case -1: + exit(1); + case 0: + setpgid(0, getpid()); + exit(0); + } + setpgid(pid1, pid1); + + sleep(2); /* let first child die */ + + if (pipe(fds) < 0) + exit(2); + + switch (pid2 = fork()) { + case -1: + exit(3); + case 0: + setpgid(0, pid1); + ok = getpgID() == pid1; + write(fds[1], &ok, 1); + exit(0); + } + setpgid(pid2, pid1); + + close(fds[1]); + if (read(fds[0], &ok, 1) != 1) + exit(4); + wait(&status); + wait(&status); + exit(ok ? 0 : 5); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_pgrp_pipe=no +else + bash_cv_pgrp_pipe=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5 +$as_echo "$bash_cv_pgrp_pipe" >&6; } +if test $bash_cv_pgrp_pipe = yes; then +$as_echo "#define PGRP_PIPE 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5 +$as_echo_n "checking for type of signal functions... " >&6; } +if ${bash_cv_signal_vintage+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + sigset_t ss; + struct sigaction sa; + sigemptyset(&ss); sigsuspend(&ss); + sigaction(SIGINT, &sa, (struct sigaction *) 0); + sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_signal_vintage=posix +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + int mask = sigmask(SIGINT); + sigsetmask(mask); sigblock(mask); sigpause(mask); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_signal_vintage=4.2bsd +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + RETSIGTYPE foo() { } +int +main () +{ + + int mask = sigmask(SIGINT); + sigset(SIGINT, foo); sigrelse(SIGINT); + sighold(SIGINT); sigpause(SIGINT); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_signal_vintage=svr3 +else + bash_cv_signal_vintage=v7 + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5 +$as_echo "$bash_cv_signal_vintage" >&6; } +if test "$bash_cv_signal_vintage" = posix; then +$as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h + +elif test "$bash_cv_signal_vintage" = "4.2bsd"; then +$as_echo "#define HAVE_BSD_SIGNALS 1" >>confdefs.h + +elif test "$bash_cv_signal_vintage" = svr3; then +$as_echo "#define HAVE_USG_SIGHOLD 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5 +$as_echo_n "checking for sys_errlist and sys_nerr... " >&6; } +if ${bash_cv_sys_errlist+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +extern char *sys_errlist[]; + extern int sys_nerr; + char *msg = sys_errlist[sys_nerr - 1]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_sys_errlist=yes +else + bash_cv_sys_errlist=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5 +$as_echo "$bash_cv_sys_errlist" >&6; } +if test $bash_cv_sys_errlist = yes; then +$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5 +$as_echo_n "checking for sys_siglist in system C library... " >&6; } +if ${bash_cv_sys_siglist+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;} + bash_cv_sys_siglist=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#if !HAVE_DECL_SYS_SIGLIST +extern char *sys_siglist[]; +#endif +int +main() +{ +char *msg = sys_siglist[2]; +exit(msg == 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_sys_siglist=yes +else + bash_cv_sys_siglist=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5 +$as_echo "$bash_cv_sys_siglist" >&6; } +if test $bash_cv_sys_siglist = yes; then +$as_echo "#define HAVE_SYS_SIGLIST 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5 +$as_echo_n "checking for _sys_siglist in signal.h or unistd.h... " >&6; } +if ${bash_cv_decl_under_sys_siglist+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +int +main () +{ + char *msg = _sys_siglist[2]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_decl_under_sys_siglist=yes +else + bash_cv_decl_under_sys_siglist=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5 +$as_echo "$bash_cv_decl_under_sys_siglist" >&6; } +if test $bash_cv_decl_under_sys_siglist = yes; then +$as_echo "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5 +$as_echo_n "checking for _sys_siglist in system C library... " >&6; } +if ${bash_cv_under_sys_siglist+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;} + bash_cv_under_sys_siglist=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#ifndef UNDER_SYS_SIGLIST_DECLARED +extern char *_sys_siglist[]; +#endif +int +main() +{ +char *msg = (char *)_sys_siglist[2]; +exit(msg == 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_under_sys_siglist=yes +else + bash_cv_under_sys_siglist=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5 +$as_echo "$bash_cv_under_sys_siglist" >&6; } +if test $bash_cv_under_sys_siglist = yes; then +$as_echo "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signal handlers are of type void" >&5 +$as_echo_n "checking whether signal handlers are of type void... " >&6; } +if ${bash_cv_void_sighandler+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" +#endif +void (*signal ()) (); +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_void_sighandler=yes +else + bash_cv_void_sighandler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_void_sighandler" >&5 +$as_echo "$bash_cv_void_sighandler" >&6; } +if test $bash_cv_void_sighandler = yes; then +$as_echo "#define VOID_SIGHANDLER 1" >>confdefs.h + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5 +$as_echo_n "checking for clock_t... " >&6; } +if ${bash_cv_type_clock_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "clock_t" >/dev/null 2>&1; then : + bash_cv_type_clock_t=yes +else + bash_cv_type_clock_t=no +fi +rm -f conftest* + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5 +$as_echo "$bash_cv_type_clock_t" >&6; } + +if test $bash_cv_type_clock_t = no; then + cat >>confdefs.h <<_ACEOF +#define clock_t long +_ACEOF + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5 +$as_echo_n "checking for sigset_t... " >&6; } +if ${bash_cv_type_sigset_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sigset_t" >/dev/null 2>&1; then : + bash_cv_type_sigset_t=yes +else + bash_cv_type_sigset_t=no +fi +rm -f conftest* + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5 +$as_echo "$bash_cv_type_sigset_t" >&6; } + +if test $bash_cv_type_sigset_t = no; then + cat >>confdefs.h <<_ACEOF +#define sigset_t int +_ACEOF + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5 +$as_echo_n "checking for sig_atomic_t... " >&6; } +if ${bash_cv_type_sig_atomic_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sig_atomic_t" >/dev/null 2>&1; then : + bash_cv_type_sig_atomic_t=yes +else + bash_cv_type_sig_atomic_t=no +fi +rm -f conftest* + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5 +$as_echo "$bash_cv_type_sig_atomic_t" >&6; } + +if test $bash_cv_type_sig_atomic_t = no; then + cat >>confdefs.h <<_ACEOF +#define sig_atomic_t int +_ACEOF + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for quad_t" >&5 +$as_echo_n "checking for quad_t... " >&6; } +if ${bash_cv_type_quad_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "quad_t" >/dev/null 2>&1; then : + bash_cv_type_quad_t=yes +else + bash_cv_type_quad_t=no +fi +rm -f conftest* + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_quad_t" >&5 +$as_echo "$bash_cv_type_quad_t" >&6; } +if test $bash_cv_type_quad_t = yes; then + $as_echo "#define HAVE_QUAD_T 1" >>confdefs.h + + fi +if test $bash_cv_type_quad_t = no; then + cat >>confdefs.h <<_ACEOF +#define quad_t long +_ACEOF + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 +$as_echo_n "checking for intmax_t... " >&6; } +if ${bash_cv_type_intmax_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "intmax_t" >/dev/null 2>&1; then : + bash_cv_type_intmax_t=yes +else + bash_cv_type_intmax_t=no +fi +rm -f conftest* + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_intmax_t" >&5 +$as_echo "$bash_cv_type_intmax_t" >&6; } + +if test $bash_cv_type_intmax_t = no; then + cat >>confdefs.h <<_ACEOF +#define intmax_t $bash_cv_type_long_long +_ACEOF + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintmax_t" >&5 +$as_echo_n "checking for uintmax_t... " >&6; } +if ${bash_cv_type_uintmax_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uintmax_t" >/dev/null 2>&1; then : + bash_cv_type_uintmax_t=yes +else + bash_cv_type_uintmax_t=no +fi +rm -f conftest* + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_uintmax_t" >&5 +$as_echo "$bash_cv_type_uintmax_t" >&6; } + +if test $bash_cv_type_uintmax_t = no; then + cat >>confdefs.h <<_ACEOF +#define uintmax_t $bash_cv_type_unsigned_long_long +_ACEOF + +fi + +if test "$ac_cv_header_sys_socket_h" = "yes"; then + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 +$as_echo_n "checking for socklen_t... " >&6; } +if ${bash_cv_type_socklen_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "socklen_t" >/dev/null 2>&1; then : + bash_cv_type_socklen_t=yes +else + bash_cv_type_socklen_t=no +fi +rm -f conftest* + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5 +$as_echo "$bash_cv_type_socklen_t" >&6; } +if test $bash_cv_type_socklen_t = yes; then + $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h + + fi +if test $bash_cv_type_socklen_t = no; then + cat >>confdefs.h <<_ACEOF +#define socklen_t unsigned int +_ACEOF + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size and type of struct rlimit fields" >&5 +$as_echo_n "checking for size and type of struct rlimit fields... " >&6; } +if ${bash_cv_type_rlimit+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +rlim_t xxx; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_type_rlimit=rlim_t +else + +if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5 +$as_echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;} + bash_cv_type_rlimit=long +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include +int +main() +{ +#ifdef HAVE_QUAD_T + struct rlimit rl; + if (sizeof(rl.rlim_cur) == sizeof(quad_t)) + exit(0); +#endif + exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_type_rlimit=quad_t +else + bash_cv_type_rlimit=long +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5 +$as_echo "$bash_cv_type_rlimit" >&6; } +if test $bash_cv_type_rlimit = quad_t; then +$as_echo "#define RLIMTYPE quad_t" >>confdefs.h + +elif test $bash_cv_type_rlimit = rlim_t; then +$as_echo "#define RLIMTYPE rlim_t" >>confdefs.h + +fi + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5 +$as_echo_n "checking size of intmax_t... " >&6; } +if ${ac_cv_sizeof_intmax_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_intmax_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (intmax_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_intmax_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 +$as_echo "$ac_cv_sizeof_intmax_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t +_ACEOF + + + + +ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" " +#include +#include + +" +if test "x$ac_cv_member_struct_termios_c_line" = xyes; then : + $as_echo "#define TERMIOS_LDISC 1" >>confdefs.h + +fi + + + +ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" " +#include +#include + +" +if test "x$ac_cv_member_struct_termio_c_line" = xyes; then : + $as_echo "#define TERMIO_LDISC 1" >>confdefs.h + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5 +$as_echo_n "checking for struct dirent.d_ino... " >&6; } +if ${bash_cv_dirent_has_dino+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ + +int +main () +{ + +struct dirent d; int z; z = d.d_ino; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_dirent_has_dino=yes +else + bash_cv_dirent_has_dino=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_dino" >&5 +$as_echo "$bash_cv_dirent_has_dino" >&6; } +if test $bash_cv_dirent_has_dino = yes; then +$as_echo "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5 +$as_echo_n "checking for struct dirent.d_fileno... " >&6; } +if ${bash_cv_dirent_has_d_fileno+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ + +int +main () +{ + +struct dirent d; int z; z = d.d_fileno; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_dirent_has_d_fileno=yes +else + bash_cv_dirent_has_d_fileno=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5 +$as_echo "$bash_cv_dirent_has_d_fileno" >&6; } +if test $bash_cv_dirent_has_d_fileno = yes; then +$as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5 +$as_echo_n "checking for struct dirent.d_namlen... " >&6; } +if ${bash_cv_dirent_has_d_namlen+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ + +int +main () +{ + +struct dirent d; int z; z = d.d_namlen; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_dirent_has_d_namlen=yes +else + bash_cv_dirent_has_d_namlen=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5 +$as_echo "$bash_cv_dirent_has_d_namlen" >&6; } +if test $bash_cv_dirent_has_d_namlen = yes; then +$as_echo "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5 +$as_echo_n "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; } +if ${bash_cv_struct_winsize_header+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +struct winsize x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_struct_winsize_header=ioctl_h +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +struct winsize x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_struct_winsize_header=termios_h +else + bash_cv_struct_winsize_header=other +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +if test $bash_cv_struct_winsize_header = ioctl_h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5 +$as_echo "sys/ioctl.h" >&6; } + $as_echo "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h + +elif test $bash_cv_struct_winsize_header = termios_h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5 +$as_echo "termios.h" >&6; } + $as_echo "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5 +$as_echo_n "checking for struct timeval in sys/time.h and time.h... " >&6; } +if ${bash_cv_struct_timeval+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + +int +main () +{ +static struct timeval x; x.tv_sec = x.tv_usec; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_struct_timeval=yes +else + bash_cv_struct_timeval=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5 +$as_echo "$bash_cv_struct_timeval" >&6; } +if test $bash_cv_struct_timeval = yes; then + $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h + +fi + +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if ${ac_cv_struct_tm+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_tm=time.h +else + ac_cv_struct_tm=sys/time.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h + +fi + +ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include +#include <$ac_cv_struct_tm> + +" +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF + + +fi + +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h + +else + ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include +" +if test "x$ac_cv_have_decl_tzname" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME $ac_have_decl +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } +if ${ac_cv_var_tzname+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main () +{ +return tzname[0][0]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_var_tzname=yes +else + ac_cv_var_tzname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +$as_echo "#define HAVE_TZNAME 1" >>confdefs.h + + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5 +$as_echo_n "checking for struct timezone in sys/time.h and time.h... " >&6; } +if ${bash_cv_struct_timezone+:} false; then : + $as_echo_n "(cached) " >&6 +else + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "struct timezone" >/dev/null 2>&1; then : + bash_cv_struct_timezone=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "struct timezone" >/dev/null 2>&1; then : + bash_cv_struct_timezone=yes +else + bash_cv_struct_timezone=no +fi +rm -f conftest* + +fi +rm -f conftest* + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5 +$as_echo "$bash_cv_struct_timezone" >&6; } +if test $bash_cv_struct_timezone = yes; then + $as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5 +$as_echo_n "checking for offset of exit status in return status from wait... " >&6; } +if ${bash_cv_wexitstatus_offset+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5 +$as_echo "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;} + bash_cv_wexitstatus_offset=0 + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +#include + +int +main(c, v) + int c; + char **v; +{ + pid_t pid, p; + int s, i, n; + + s = 0; + pid = fork(); + if (pid == 0) + exit (42); + + /* wait for the process */ + p = wait(&s); + if (p != pid) + exit (255); + + /* crack s */ + for (i = 0; i < (sizeof(s) * 8); i++) + { + n = (s >> i) & 0xff; + if (n == 42) + exit (i); + } + + exit (254); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_wexitstatus_offset=0 +else + bash_cv_wexitstatus_offset=$? +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +if test "$bash_cv_wexitstatus_offset" -gt 32 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5 +$as_echo "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;} + bash_cv_wexitstatus_offset=0 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5 +$as_echo "$bash_cv_wexitstatus_offset" >&6; } + +cat >>confdefs.h <<_ACEOF +#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset +_ACEOF + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if ${bash_cv_sys_struct_timespec_in_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_sys_struct_timespec_in_time_h=yes +else + bash_cv_sys_struct_timespec_in_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5 +$as_echo "$bash_cv_sys_struct_timespec_in_time_h" >&6; } + + HAVE_STRUCT_TIMESPEC=0 + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $bash_cv_sys_struct_timespec_in_time_h = yes; then + $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h + + $as_echo "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h + + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if ${bash_cv_sys_struct_timespec_in_sys_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_sys_struct_timespec_in_sys_time_h=yes +else + bash_cv_sys_struct_timespec_in_sys_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5 +$as_echo "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; } + if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h + + $as_echo "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if ${bash_cv_sys_struct_timespec_in_pthread_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_sys_struct_timespec_in_pthread_h=yes +else + bash_cv_sys_struct_timespec_in_pthread_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5 +$as_echo "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h + + $as_echo "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h + + fi + fi + fi + + + + + + + + + + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 +$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } +if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + +int +main () +{ + + st.st_atim = ts; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes +else + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 +$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + +$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h + + fi +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 +_ACEOF + + +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 +_ACEOF + + +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 +_ACEOF + + +fi + +fi + +fi + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5 +$as_echo_n "checking for sbrk... " >&6; } + if ${ac_cv_func_sbrk+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + void *x = sbrk (4096); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_sbrk=yes +else + ac_cv_func_sbrk=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sbrk" >&5 +$as_echo "$ac_cv_func_sbrk" >&6; } + if test X$ac_cv_func_sbrk = Xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sbrk" >&5 +$as_echo_n "checking for working sbrk... " >&6; } +if ${bash_cv_func_sbrk+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working sbrk if cross-compiling" >&5 +$as_echo "$as_me: WARNING: cannot check working sbrk if cross-compiling" >&2;} + bash_cv_func_sbrk=yes + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main(int c, char **v) +{ + void *x; + + x = sbrk (4096); + exit ((x == (void *)-1) ? 1 : 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_func_sbrk=yes +else + bash_cv_func_snprintf=sbrk +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sbrk" >&5 +$as_echo "$bash_cv_func_sbrk" >&6; } + if test $bash_cv_func_sbrk = no; then + ac_cv_func_sbrk=no + fi + fi + if test $ac_cv_func_sbrk = yes; then + +$as_echo "#define HAVE_SBRK 1" >>confdefs.h + + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5 +$as_echo_n "checking for the existence of strsignal... " >&6; } +if ${bash_cv_have_strsignal+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +char *s = (char *)strsignal(2); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_have_strsignal=yes +else + bash_cv_have_strsignal=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5 +$as_echo "$bash_cv_have_strsignal" >&6; } +if test $bash_cv_have_strsignal = yes; then +$as_echo "#define HAVE_STRSIGNAL 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5 +$as_echo_n "checking if opendir() opens non-directories... " >&6; } +if ${bash_cv_opendir_not_robust+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;} + bash_cv_opendir_not_robust=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#ifdef HAVE_SYS_STAT_H +#include +#endif +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ +#include +int +main() +{ +DIR *dir; +int fd, err; +err = mkdir("bash-aclocal", 0700); +if (err < 0) { + perror("mkdir"); + exit(1); +} +unlink("bash-aclocal/not_a_directory"); +fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666); +write(fd, "\n", 1); +close(fd); +dir = opendir("bash-aclocal/not_a_directory"); +unlink("bash-aclocal/not_a_directory"); +rmdir("bash-aclocal"); +exit (dir == 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_opendir_not_robust=yes +else + bash_cv_opendir_not_robust=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5 +$as_echo "$bash_cv_opendir_not_robust" >&6; } +if test $bash_cv_opendir_not_robust = yes; then +$as_echo "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5 +$as_echo_n "checking whether ulimit can substitute for getdtablesize... " >&6; } +if ${bash_cv_ulimit_maxfds+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;} + bash_cv_ulimit_maxfds=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_ULIMIT_H +#include +#endif +int +main() +{ +long maxfds = ulimit(4, 0L); +exit (maxfds == -1L); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_ulimit_maxfds=yes +else + bash_cv_ulimit_maxfds=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5 +$as_echo "$bash_cv_ulimit_maxfds" >&6; } +if test $bash_cv_ulimit_maxfds = yes; then +$as_echo "#define ULIMIT_MAXFDS 1" >>confdefs.h + +fi + + + + + + + + + ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include +" +if test "x$ac_cv_have_decl_fpurge" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FPURGE $ac_have_decl +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5 +$as_echo_n "checking to see if getenv can be redefined... " >&6; } +if ${bash_cv_getenv_redef+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5 +$as_echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;} + bash_cv_getenv_redef=yes + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif +char * +getenv (name) +#if defined (__linux__) || defined (__bsdi__) || defined (convex) + const char *name; +#else + char const *name; +#endif /* !__linux__ && !__bsdi__ && !convex */ +{ +return "42"; +} +int +main() +{ +char *s; +/* The next allows this program to run, but does not allow bash to link + when it redefines getenv. I'm not really interested in figuring out + why not. */ +#if defined (NeXT) +exit(1); +#endif +s = getenv("ABCDE"); +exit(s == 0); /* force optimizer to leave getenv in */ +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_getenv_redef=yes +else + bash_cv_getenv_redef=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5 +$as_echo "$bash_cv_getenv_redef" >&6; } +if test $bash_cv_getenv_redef = yes; then +$as_echo "#define CAN_REDEFINE_GETENV 1" >>confdefs.h + +fi + +if test "$ac_cv_func_getcwd" = "yes"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5 +$as_echo_n "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; } +if ${bash_cv_getcwd_malloc+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;} + bash_cv_getcwd_malloc=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +int +main() +{ + char *xpwd; + xpwd = getcwd(0, 0); + exit (xpwd == 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_getcwd_malloc=yes +else + bash_cv_getcwd_malloc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5 +$as_echo "$bash_cv_getcwd_malloc" >&6; } +if test $bash_cv_getcwd_malloc = no; then +$as_echo "#define GETCWD_BROKEN 1" >>confdefs.h + +case " $LIBOBJS " in + *" getcwd.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" + ;; +esac + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 +$as_echo_n "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; } +if ${bash_cv_func_sigsetjmp+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5 +$as_echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;} + bash_cv_func_sigsetjmp=missing + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include +#include + +int +main() +{ +#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) +exit (1); +#else + +int code; +sigset_t set, oset; +sigjmp_buf xx; + +/* get the mask */ +sigemptyset(&set); +sigemptyset(&oset); +sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); +sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); + +/* save it */ +code = sigsetjmp(xx, 1); +if (code) + exit(0); /* could get sigmask and compare to oset here. */ + +/* change it */ +sigaddset(&set, SIGINT); +sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); + +/* and siglongjmp */ +siglongjmp(xx, 10); +exit(1); +#endif +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_func_sigsetjmp=present +else + bash_cv_func_sigsetjmp=missing +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5 +$as_echo "$bash_cv_func_sigsetjmp" >&6; } +if test $bash_cv_func_sigsetjmp = present; then +$as_echo "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5 +$as_echo_n "checking whether or not strcoll and strcmp differ... " >&6; } +if ${bash_cv_func_strcoll_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} + bash_cv_func_strcoll_broken=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if defined (HAVE_LOCALE_H) +#include +#endif +#include +#include + +int +main(c, v) +int c; +char *v[]; +{ + int r1, r2; + char *deflocale, *defcoll; + +#ifdef HAVE_SETLOCALE + deflocale = setlocale(LC_ALL, ""); + defcoll = setlocale(LC_COLLATE, ""); +#endif + +#ifdef HAVE_STRCOLL + /* These two values are taken from tests/glob-test. */ + r1 = strcoll("abd", "aXd"); +#else + r1 = 0; +#endif + r2 = strcmp("abd", "aXd"); + + /* These two should both be greater than 0. It is permissible for + a system to return different values, as long as the sign is the + same. */ + + /* Exit with 1 (failure) if these two values are both > 0, since + this tests whether strcoll(3) is broken with respect to strcmp(3) + in the default locale. */ + exit (r1 > 0 && r2 > 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_func_strcoll_broken=yes +else + bash_cv_func_strcoll_broken=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5 +$as_echo "$bash_cv_func_strcoll_broken" >&6; } +if test $bash_cv_func_strcoll_broken = yes; then +$as_echo "#define STRCOLL_BROKEN 1" >>confdefs.h + +fi + + + + + + if test X$ac_cv_func_snprintf = Xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5 +$as_echo_n "checking for standard-conformant snprintf... " >&6; } +if ${bash_cv_func_snprintf+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5 +$as_echo "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;} + bash_cv_func_snprintf=yes + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main() +{ + int n; + n = snprintf (0, 0, "%s", "0123456"); + exit(n != 7); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_func_snprintf=yes +else + bash_cv_func_snprintf=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5 +$as_echo "$bash_cv_func_snprintf" >&6; } + if test $bash_cv_func_snprintf = no; then + ac_cv_func_snprintf=no + fi + fi + if test $ac_cv_func_snprintf = no; then + +$as_echo "#define HAVE_SNPRINTF 0" >>confdefs.h + + fi + + + + + + if test X$ac_cv_func_vsnprintf = Xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5 +$as_echo_n "checking for standard-conformant vsnprintf... " >&6; } +if ${bash_cv_func_vsnprintf+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5 +$as_echo "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;} + bash_cv_func_vsnprintf=yes + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_STDARG_H +#include +#else +#include +#endif +#include +#include + +static int +#if HAVE_STDARG_H +foo(const char *fmt, ...) +#else +foo(format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + int n; + +#if HAVE_STDARG_H + va_start(args, fmt); +#else + va_start(args); +#endif + n = vsnprintf(0, 0, fmt, args); + va_end (args); + return n; +} + +int +main() +{ + int n; + n = foo("%s", "0123456"); + exit(n != 7); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_func_vsnprintf=yes +else + bash_cv_func_vsnprintf=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5 +$as_echo "$bash_cv_func_vsnprintf" >&6; } + if test $bash_cv_func_vsnprintf = no; then + ac_cv_func_vsnprintf=no + fi + fi + if test $ac_cv_func_vsnprintf = no; then + +$as_echo "#define HAVE_VSNPRINTF 0" >>confdefs.h + + fi + + + +if test "$ac_cv_func_putenv" = "yes"; then + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5 +$as_echo_n "checking for standard-conformant putenv declaration... " >&6; } +if ${bash_cv_std_putenv+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if STDC_HEADERS +#include +#include +#endif +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif +#ifdef PROTOTYPES +extern int putenv (char *); +#else +extern int putenv (); +#endif + +int +main () +{ +return (putenv == 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_std_putenv=yes +else + bash_cv_std_putenv=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5 +$as_echo "$bash_cv_std_putenv" >&6; } +if test $bash_cv_std_putenv = yes; then +$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h + +fi + +else +$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h + +fi +if test "$ac_cv_func_unsetenv" = "yes"; then + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5 +$as_echo_n "checking for standard-conformant unsetenv declaration... " >&6; } +if ${bash_cv_std_unsetenv+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if STDC_HEADERS +#include +#include +#endif +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif +#ifdef PROTOTYPES +extern int unsetenv (const char *); +#else +extern int unsetenv (); +#endif + +int +main () +{ +return (unsetenv == 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bash_cv_std_unsetenv=yes +else + bash_cv_std_unsetenv=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5 +$as_echo "$bash_cv_std_unsetenv" >&6; } +if test $bash_cv_std_unsetenv = yes; then +$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h + +fi + +else +$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5 +$as_echo_n "checking for printf floating point output in hex notation... " >&6; } +if ${bash_cv_printf_a_format+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;} + bash_cv_printf_a_format=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +int +main() +{ + double y = 0.0; + char abuf[1024]; + + sprintf(abuf, "%A", y); + exit(strchr(abuf, 'P') == (char *)0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_printf_a_format=yes +else + bash_cv_printf_a_format=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5 +$as_echo "$bash_cv_printf_a_format" >&6; } +if test $bash_cv_printf_a_format = yes; then +$as_echo "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fnmatch can be used to check bracket equivalence classes" >&5 +$as_echo_n "checking whether fnmatch can be used to check bracket equivalence classes... " >&6; } +if ${bash_cv_fnmatch_equiv_fallback+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&2;} + bash_cv_fnmatch_equiv_fallback=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include +#include + +char *pattern = "[[=a=]]"; + +/* char *string = "ä"; */ +unsigned char string[4] = { '\xc3', '\xa4', '\0' }; + +int +main (int c, char **v) +{ + setlocale (LC_ALL, "en_US.UTF-8"); + if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH) + exit (0); + exit (1); +} + + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_fnmatch_equiv_fallback=yes +else + bash_cv_fnmatch_equiv_fallback=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fnmatch_equiv_fallback" >&5 +$as_echo "$bash_cv_fnmatch_equiv_fallback" >&6; } +if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then + bash_cv_fnmatch_equiv_value=1 +else + bash_cv_fnmatch_equiv_value=0 +fi + +cat >>confdefs.h <<_ACEOF +#define FNMATCH_EQUIV_FALLBACK $bash_cv_fnmatch_equiv_value +_ACEOF + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5 +$as_echo_n "checking if signal handlers must be reinstalled when invoked... " >&6; } +if ${bash_cv_must_reinstall_sighandlers+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} + bash_cv_must_reinstall_sighandlers=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +typedef RETSIGTYPE sigfunc(); + +volatile int nsigint; + +#ifdef HAVE_POSIX_SIGNALS +sigfunc * +set_signal_handler(sig, handler) + int sig; + sigfunc *handler; +{ + struct sigaction act, oact; + act.sa_handler = handler; + act.sa_flags = 0; + sigemptyset (&act.sa_mask); + sigemptyset (&oact.sa_mask); + sigaction (sig, &act, &oact); + return (oact.sa_handler); +} +#else +#define set_signal_handler(s, h) signal(s, h) +#endif + +RETSIGTYPE +sigint(s) +int s; +{ + nsigint++; +} + +int +main() +{ + nsigint = 0; + set_signal_handler(SIGINT, sigint); + kill((int)getpid(), SIGINT); + kill((int)getpid(), SIGINT); + exit(nsigint != 2); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_must_reinstall_sighandlers=no +else + bash_cv_must_reinstall_sighandlers=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5 +$as_echo "$bash_cv_must_reinstall_sighandlers" >&6; } +if test $bash_cv_must_reinstall_sighandlers = yes; then +$as_echo "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5 +$as_echo_n "checking for presence of necessary job control definitions... " >&6; } +if ${bash_cv_job_control_missing+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_SYS_WAIT_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +/* add more tests in here as appropriate */ + +/* signal type */ +#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS) +#error +#endif + +/* signals and tty control. */ +#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT) +#error +#endif + +/* process control */ +#if !defined (WNOHANG) || !defined (WUNTRACED) +#error +#endif + +/* Posix systems have tcgetpgrp and waitpid. */ +#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP) +#error +#endif + +#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID) +#error +#endif + +/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */ +#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3) +#error +#endif + + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_job_control_missing=present +else + bash_cv_job_control_missing=missing + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5 +$as_echo "$bash_cv_job_control_missing" >&6; } +if test $bash_cv_job_control_missing = missing; then +$as_echo "#define JOB_CONTROL_MISSING 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5 +$as_echo_n "checking for presence of named pipes... " >&6; } +if ${bash_cv_sys_named_pipes+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5 +$as_echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;} + bash_cv_sys_named_pipes=missing + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include + +/* Add more tests in here as appropriate. */ +int +main() +{ +int fd, err; + +#if defined (HAVE_MKFIFO) +exit (0); +#endif + +#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO)) +exit (1); +#endif + +#if defined (NeXT) +exit (1); +#endif +err = mkdir("bash-aclocal", 0700); +if (err < 0) { + perror ("mkdir"); + exit(1); +} +fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0); +if (fd == -1) { + rmdir ("bash-aclocal"); + exit (1); +} +close(fd); +unlink ("bash-aclocal/sh-np-autoconf"); +rmdir ("bash-aclocal"); +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_sys_named_pipes=present +else + bash_cv_sys_named_pipes=missing +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5 +$as_echo "$bash_cv_sys_named_pipes" >&6; } +if test $bash_cv_sys_named_pipes = missing; then +$as_echo "#define NAMED_PIPES_MISSING 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5 +$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; } +if ${ac_cv_sys_tiocgwinsz_in_termios_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifdef TIOCGWINSZ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + ac_cv_sys_tiocgwinsz_in_termios_h=yes +else + ac_cv_sys_tiocgwinsz_in_termios_h=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 +$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; } + +if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 +$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; } +if ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifdef TIOCGWINSZ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes +else + ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 +$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; } + + if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then + +$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h + + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5 +$as_echo_n "checking for TIOCSTAT in sys/ioctl.h... " >&6; } +if ${bash_cv_tiocstat_in_ioctl+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +int x = TIOCSTAT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_tiocstat_in_ioctl=yes +else + bash_cv_tiocstat_in_ioctl=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5 +$as_echo "$bash_cv_tiocstat_in_ioctl" >&6; } +if test $bash_cv_tiocstat_in_ioctl = yes; then +$as_echo "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5 +$as_echo_n "checking for FIONREAD in sys/ioctl.h... " >&6; } +if ${bash_cv_fionread_in_ioctl+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +int x = FIONREAD; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_fionread_in_ioctl=yes +else + bash_cv_fionread_in_ioctl=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5 +$as_echo "$bash_cv_fionread_in_ioctl" >&6; } +if test $bash_cv_fionread_in_ioctl = yes; then +$as_echo "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5 +$as_echo_n "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; } +if ${bash_cv_wcontinued_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5 +$as_echo "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;} + bash_cv_wcontinued_broken=no + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include +#include + +#ifndef errno +extern int errno; +#endif +int +main() +{ + int x; + + x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED); + if (x == -1 && errno == EINVAL) + exit (1); + else + exit (0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_wcontinued_broken=no +else + bash_cv_wcontinued_broken=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5 +$as_echo "$bash_cv_wcontinued_broken" >&6; } +if test $bash_cv_wcontinued_broken = yes; then +$as_echo "#define WCONTINUED_BROKEN 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5 +$as_echo_n "checking for speed_t in sys/types.h... " >&6; } +if ${bash_cv_speed_t_in_sys_types+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +speed_t x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_speed_t_in_sys_types=yes +else + bash_cv_speed_t_in_sys_types=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5 +$as_echo "$bash_cv_speed_t_in_sys_types" >&6; } +if test $bash_cv_speed_t_in_sys_types = yes; then +$as_echo "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5 +$as_echo_n "checking whether getpw functions are declared in pwd.h... " >&6; } +if ${bash_cv_getpw_declared+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getpwuid" >/dev/null 2>&1; then : + bash_cv_getpw_declared=yes +else + bash_cv_getpw_declared=no +fi +rm -f conftest* + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5 +$as_echo "$bash_cv_getpw_declared" >&6; } +if test $bash_cv_getpw_declared = yes; then +$as_echo "#define HAVE_GETPW_DECLS 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5 +$as_echo_n "checking for unusable real-time signals due to large values... " >&6; } +if ${bash_cv_unusable_rtsigs+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5 +$as_echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;} + bash_cv_unusable_rtsigs=yes + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +#ifndef NSIG +# define NSIG 64 +#endif + +int +main () +{ + int n_sigs = 2 * NSIG; +#ifdef SIGRTMIN + int rtmin = SIGRTMIN; +#else + int rtmin = 0; +#endif + + exit(rtmin < n_sigs); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + bash_cv_unusable_rtsigs=yes +else + bash_cv_unusable_rtsigs=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5 +$as_echo "$bash_cv_unusable_rtsigs" >&6; } +if test $bash_cv_unusable_rtsigs = yes; then +$as_echo "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h + +fi + + + + + +if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then + SIGLIST_O=siglist.o +else + SIGLIST_O= +fi + + + +case "$host_os" in +hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5 +$as_echo_n "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; } +if ${bash_cv_kernel_rlimit+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + + int f; + f = RLIMIT_DATA; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_kernel_rlimit=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#define _KERNEL +#include +#undef _KERNEL + +int +main () +{ + + int f; + f = RLIMIT_DATA; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bash_cv_kernel_rlimit=yes +else + bash_cv_kernel_rlimit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5 +$as_echo "$bash_cv_kernel_rlimit" >&6; } +if test $bash_cv_kernel_rlimit = yes; then +$as_echo "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h + +fi + ;; +esac + +if test "$opt_readline" = yes; then +case "$host_os" in +aix*) prefer_curses=yes ;; +esac + +if test "X$bash_cv_termcap_lib" = "X"; then +_bash_needmsg=yes +else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +$as_echo_n "checking which library has the termcap functions... " >&6; } +_bash_needmsg= +fi +if ${bash_cv_termcap_lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" +if test "x$ac_cv_func_tgetent" = xyes; then : + bash_cv_termcap_lib=libc +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 +$as_echo_n "checking for tgetent in -ltermcap... " >&6; } +if ${ac_cv_lib_termcap_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltermcap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_termcap_tgetent=yes +else + ac_cv_lib_termcap_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 +$as_echo "$ac_cv_lib_termcap_tgetent" >&6; } +if test "x$ac_cv_lib_termcap_tgetent" = xyes; then : + bash_cv_termcap_lib=libtermcap +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 +$as_echo_n "checking for tgetent in -ltinfo... " >&6; } +if ${ac_cv_lib_tinfo_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltinfo $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_tinfo_tgetent=yes +else + ac_cv_lib_tinfo_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 +$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; } +if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then : + bash_cv_termcap_lib=libtinfo +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 +$as_echo_n "checking for tgetent in -lcurses... " >&6; } +if ${ac_cv_lib_curses_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_curses_tgetent=yes +else + ac_cv_lib_curses_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 +$as_echo "$ac_cv_lib_curses_tgetent" >&6; } +if test "x$ac_cv_lib_curses_tgetent" = xyes; then : + bash_cv_termcap_lib=libcurses +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 +$as_echo_n "checking for tgetent in -lncurses... " >&6; } +if ${ac_cv_lib_ncurses_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ncurses_tgetent=yes +else + ac_cv_lib_ncurses_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 +$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; } +if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then : + bash_cv_termcap_lib=libncurses +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5 +$as_echo_n "checking for tgetent in -lncursesw... " >&6; } +if ${ac_cv_lib_ncursesw_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncursesw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ncursesw_tgetent=yes +else + ac_cv_lib_ncursesw_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5 +$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; } +if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then : + bash_cv_termcap_lib=libncursesw +else + bash_cv_termcap_lib=gnutermcap +fi + +fi + +fi + +fi + +fi + +fi + +fi + +if test "X$_bash_needmsg" = "Xyes"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +$as_echo_n "checking which library has the termcap functions... " >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 +$as_echo "using $bash_cv_termcap_lib" >&6; } +if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then +LDFLAGS="$LDFLAGS -L./lib/termcap" +TERMCAP_LIB="./lib/termcap/libtermcap.a" +TERMCAP_DEP="./lib/termcap/libtermcap.a" +elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then +TERMCAP_LIB=-ltermcap +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libtinfo; then +TERMCAP_LIB=-ltinfo +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libncurses; then +TERMCAP_LIB=-lncurses +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libc; then +TERMCAP_LIB= +TERMCAP_DEP= +else +TERMCAP_LIB=-lcurses +TERMCAP_DEP= +fi + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5 +$as_echo_n "checking whether /dev/fd is available... " >&6; } +if ${bash_cv_dev_fd+:} false; then : + $as_echo_n "(cached) " >&6 +else + bash_cv_dev_fd="" +if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then +# check for systems like FreeBSD 5 that only provide /dev/fd/[012] + if (exec test -r /dev/fd/3 3&5 +$as_echo "$bash_cv_dev_fd" >&6; } +if test $bash_cv_dev_fd = "standard"; then + $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h + + $as_echo "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h + +elif test $bash_cv_dev_fd = "whacky"; then + $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h + + $as_echo "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5 +$as_echo_n "checking whether /dev/stdin stdout stderr are available... " >&6; } +if ${bash_cv_dev_stdin+:} false; then : + $as_echo_n "(cached) " >&6 +else + if (exec test -r /dev/stdin < /dev/null) ; then + bash_cv_dev_stdin=present + else + bash_cv_dev_stdin=absent + fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5 +$as_echo "$bash_cv_dev_stdin" >&6; } +if test $bash_cv_dev_stdin = "present"; then + $as_echo "#define HAVE_DEV_STDIN 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5 +$as_echo_n "checking for default mail directory... " >&6; } +if ${bash_cv_mail_dir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -d /var/mail; then + bash_cv_mail_dir=/var/mail + elif test -d /var/spool/mail; then + bash_cv_mail_dir=/var/spool/mail + elif test -d /usr/mail; then + bash_cv_mail_dir=/usr/mail + elif test -d /usr/spool/mail; then + bash_cv_mail_dir=/usr/spool/mail + else + bash_cv_mail_dir=unknown + fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5 +$as_echo "$bash_cv_mail_dir" >&6; } +cat >>confdefs.h <<_ACEOF +#define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir" +_ACEOF + + + +if test "$bash_cv_job_control_missing" = missing; then + opt_job_control=no +fi + +if test "$opt_job_control" = yes; then +$as_echo "#define JOB_CONTROL 1" >>confdefs.h + +JOBS_O=jobs.o +else +JOBS_O=nojobs.o +fi + + + + +LOCAL_DEFS=-DSHELL + + +case "${host_os}" in +sysv4.2*) $as_echo "#define SVR4_2 1" >>confdefs.h + + $as_echo "#define SVR4 1" >>confdefs.h + ;; +sysv4*) $as_echo "#define SVR4 1" >>confdefs.h + ;; +sysv5*) $as_echo "#define SVR5 1" >>confdefs.h + ;; +hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;; +isc*) LOCAL_CFLAGS=-Disc386 ;; +rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; +darwin*) LOCAL_CFLAGS=-DMACOSX ;; +sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;; +sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;; +sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;; +sunos4*) LOCAL_CFLAGS=-DSunOS4 ;; +solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;; +solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;; +solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;; +solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;; +solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; +lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; +linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading + case "`uname -r`" in + 1.*|2.[0123]*) : ;; + *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h + ;; + esac ;; +netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; +freebsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; +*qnx[67]*) LOCAL_LIBS="-lncurses" ;; +*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; +powerux*) LOCAL_LIBS="-lgen" ;; +cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; +opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;; +*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; +esac + +case "${host_os}-${CC}" in +aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;; +aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;; +bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux +bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux +hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading +esac + +case "${host_os}" in +freebsd[3-9]*) + if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then + LOCAL_LDFLAGS=-rdynamic # allow dynamic loading + fi ;; +freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading +dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading +esac + +case "$host_cpu" in +*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it +esac + +case "$host_cpu-$host_os" in +ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;; +esac + +case "$host_cpu-$host_vendor-$host_os" in +m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;; +mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;; +esac + +# turn off paren warnings in gcc +CFLAGS="$CFLAGS ${STYLE_CFLAGS}" + +# +# Shared object configuration section. These values are generated by +# ${srcdir}/support/shobj-conf +# +if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5 +$as_echo_n "checking shared object configuration for loadable builtins... " >&6; } + eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"` + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5 +$as_echo "$SHOBJ_STATUS" >&6; } +else + SHOBJ_STATUS=unsupported + +fi + +# try to create a directory tree if the source is elsewhere +# this should be packaged into a script accessible via ${srcdir}/support +case "$srcdir" in +.) ;; +*) for d in doc tests support lib examples; do # dirs + test -d $d || mkdir $d + done + for ld in readline glob tilde malloc sh termcap; do # libdirs + test -d lib/$ld || mkdir lib/$ld + done + test -d examples/loadables || mkdir examples/loadables # loadable builtins + test -d examples/loadables/perl || mkdir examples/loadables/perl + ;; +esac + +BUILD_DIR=`pwd` +case "$BUILD_DIR" in +*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;; +*) ;; +esac + +if test -z "$localedir"; then + localedir='${datarootdir}/locale' +fi +if test -z "$datarootdir"; then + datarootdir='${prefix}/share' +fi + + + + + + +# Some versions of autoconf don't substitute these automatically + + + +# directory where we install dynamically loadable builtins +if test -z "$loadablesdir"; then + loadablesdir='${libdir}/bash' +fi + +if test -z "$headersdir"; then + headersdir='$(includedir)/$(PACKAGE_NAME)' +fi + + + + + + + + + + + + + + + + + + + + +#AC_SUBST(ALLOCA_SOURCE) +#AC_SUBST(ALLOCA_OBJECT) + +ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh" + +ac_config_commands="$ac_config_commands default" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by bash $as_me 5.1-release, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +bash config.status 5.1-release +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;; + "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;; + "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;; + "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;; + "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;; + "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;; + "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;; + "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;; + "examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;; + "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;; + "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;; + "support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;; + "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + "default":C) +# Makefile uses this timestamp file to record whether config.h is up to date. +echo timestamp > stamp-h + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/bash-5.1/configure.ac b/bash-5.1/configure.ac new file mode 100644 index 0000000000000000000000000000000000000000..aeb3d30bcbb0fd16acae0cfc11145a5e651d2f2e --- /dev/null +++ b/bash-5.1/configure.ac @@ -0,0 +1,1312 @@ +dnl +dnl Configure script for bash-5.1 +dnl +dnl report bugs to chet@po.cwru.edu +dnl +dnl Process this file with autoconf to produce a configure script. + +# Copyright (C) 1987-2020 Free Software Foundation, Inc. + +# +# 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 . + +AC_REVISION([for Bash 5.1, version 5.022])dnl + +define(bashvers, 5.1) +define(relstatus, release) + +AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org]) + +dnl make sure we are using a recent autoconf version +AC_PREREQ(2.61) + +AC_CONFIG_SRCDIR(shell.h) +dnl where to find install.sh, config.sub, and config.guess +AC_CONFIG_AUX_DIR(./support) +AC_CONFIG_HEADERS(config.h) + +dnl checks for version info +BASHVERS=bashvers +RELSTATUS=relstatus + +dnl defaults for debug settings +case "$RELSTATUS" in +alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;; +*) DEBUG= MALLOC_DEBUG= ;; +esac + +dnl canonicalize the host and os so we can do some tricky things before +dnl parsing options +AC_CANONICAL_HOST +AC_CANONICAL_BUILD + +dnl configure defaults +opt_bash_malloc=yes +opt_afs=no +opt_curses=no +opt_with_installed_readline=no + +#htmldir= + +dnl some systems should be configured without the bash malloc by default +dnl and some need a special compiler or loader +dnl look in the NOTES file for more +case "${host_cpu}-${host_os}" in +# mostly obsolete platforms +alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux +*[[Cc]]ray*-*) opt_bash_malloc=no ;; # Crays +*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines +*-dgux*) opt_bash_malloc=no ;; # DG/UX machines +sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 +m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir +*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins +*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft +*-beos*) opt_bash_malloc=no ;; # they say it's suitable +# These need additional investigation +sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF +*-aix*) opt_bash_malloc=no ;; # AIX machines +*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment +# These lack a working sbrk(2) +aarch64-freebsd*) opt_bash_malloc=no ;; +riscv*-freebsd*) opt_bash_malloc=no ;; +# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2) +*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep +*-macos*) opt_bash_malloc=no ;; # Apple MacOS X +*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X) +*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X) +*-machten4) opt_bash_malloc=no ;; # MachTen 4.x +# Niche or non-mainstream-shell-user systems +*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x +*-nsk*) opt_bash_malloc=no ;; # HP NonStop +*-haiku*) opt_bash_malloc=no ;; # Haiku OS +*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk +esac + +# memory scrambling on free() +case "${host_os}" in +sco3.2v5*|sco3.2v4*) opt_memscramble=no ;; +*) opt_memscramble=yes ;; +esac + +dnl +dnl macros for the bash debugger +dnl +dnl AM_PATH_LISPDIR +AC_ARG_VAR(DEBUGGER_START_FILE, [location of bash debugger initialization file]) + +dnl arguments to configure +dnl packages +AC_ARG_WITH(afs, AC_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval) +AC_ARG_WITH(bash-malloc, AC_HELP_STRING([--with-bash-malloc], [use the Bash version of malloc]), opt_bash_malloc=$withval) +AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) +AC_ARG_WITH(gnu-malloc, AC_HELP_STRING([--with-gnu-malloc], [synonym for --with-bash-malloc]), opt_bash_malloc=$withval) +AC_ARG_WITH(installed-readline, AC_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval) + +if test "$opt_bash_malloc" = yes; then + MALLOC_TARGET=malloc + MALLOC_SRC=malloc.c + + MALLOC_LIB='-lmalloc' + MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' + MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' + MALLOC_DEP='$(MALLOC_LIBRARY)' + + AC_DEFINE(USING_BASH_MALLOC) +else + MALLOC_LIB= + MALLOC_LIBRARY= + MALLOC_LDFLAGS= + MALLOC_DEP= +fi + +if test "$opt_afs" = yes; then + AC_DEFINE(AFS) +fi + +if test "$opt_curses" = yes; then + prefer_curses=yes +fi + +if test -z "${DEBUGGER_START_FILE}"; then + DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc' +fi + +dnl optional shell features in config.h.in +opt_minimal_config=no + +opt_job_control=yes +opt_alias=yes +opt_readline=yes +opt_history=yes +opt_bang_history=yes +opt_dirstack=yes +opt_restricted=yes +opt_process_subst=yes +opt_prompt_decoding=yes +opt_select=yes +opt_help=yes +opt_array_variables=yes +opt_dparen_arith=yes +opt_extended_glob=yes +opt_brace_expansion=yes +opt_disabled_builtins=no +opt_command_timing=yes +opt_xpg_echo=no +opt_strict_posix=no +opt_cond_command=yes +opt_cond_regexp=yes +opt_coproc=yes +opt_arith_for_command=yes +opt_net_redirs=yes +opt_progcomp=yes +opt_separate_help=no +opt_multibyte=yes +opt_debugger=yes +opt_single_longdoc_strings=yes +opt_casemod_attrs=yes +opt_casemod_expansions=yes +opt_extglob_default=no +opt_dircomplete_expand_default=no +opt_globascii_default=yes +opt_function_import=yes +opt_dev_fd_stat_broken=no + +dnl options that affect how bash is compiled and linked +opt_static_link=no +opt_profiling=no + +dnl argument parsing for optional features +AC_ARG_ENABLE(minimal-config, AC_HELP_STRING([--enable-minimal-config], [a minimal sh-like configuration]), opt_minimal_config=$enableval) + +dnl a minimal configuration turns everything off, but features can be +dnl added individually +if test $opt_minimal_config = yes; then + opt_job_control=no opt_alias=no opt_readline=no + opt_history=no opt_bang_history=no opt_dirstack=no + opt_restricted=no opt_process_subst=no opt_prompt_decoding=no + opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no + opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no + opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no + opt_net_redirs=no opt_progcomp=no opt_separate_help=no + opt_multibyte=yes opt_cond_regexp=no opt_coproc=no + opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no + opt_globascii_default=yes +fi + +AC_ARG_ENABLE(alias, AC_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval) +AC_ARG_ENABLE(arith-for-command, AC_HELP_STRING([--enable-arith-for-command], [enable arithmetic for command]), opt_arith_for_command=$enableval) +AC_ARG_ENABLE(array-variables, AC_HELP_STRING([--enable-array-variables], [include shell array variables]), opt_array_variables=$enableval) +AC_ARG_ENABLE(bang-history, AC_HELP_STRING([--enable-bang-history], [turn on csh-style history substitution]), opt_bang_history=$enableval) +AC_ARG_ENABLE(brace-expansion, AC_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval) +AC_ARG_ENABLE(casemod-attributes, AC_HELP_STRING([--enable-casemod-attributes], [include case-modifying variable attributes]), opt_casemod_attrs=$enableval) +AC_ARG_ENABLE(casemod-expansions, AC_HELP_STRING([--enable-casemod-expansions], [include case-modifying word expansions]), opt_casemod_expansions=$enableval) +AC_ARG_ENABLE(command-timing, AC_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval) +AC_ARG_ENABLE(cond-command, AC_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval) +AC_ARG_ENABLE(cond-regexp, AC_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval) +AC_ARG_ENABLE(coprocesses, AC_HELP_STRING([--enable-coprocesses], [enable coprocess support and the coproc reserved word]), opt_coproc=$enableval) +AC_ARG_ENABLE(debugger, AC_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval) +AC_ARG_ENABLE(dev-fd-stat-broken, AC_HELP_STRING([--enable-dev-fd-stat-broken], [enable this option if stat on /dev/fd/N and fstat on file descriptor N don't return the same results]), opt_dev_fd_stat_broken=$enableval) +AC_ARG_ENABLE(direxpand-default, AC_HELP_STRING([--enable-direxpand-default], [enable the direxpand shell option by default]), opt_dircomplete_expand_default=$enableval) +AC_ARG_ENABLE(directory-stack, AC_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval) +AC_ARG_ENABLE(disabled-builtins, AC_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval) +AC_ARG_ENABLE(dparen-arithmetic, AC_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval) +AC_ARG_ENABLE(extended-glob, AC_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval) +AC_ARG_ENABLE(extended-glob-default, AC_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval) +AC_ARG_ENABLE(function-import, AC_HELP_STRING([--enable-function-import], [allow bash to import exported function definitions by default]), opt_function_import=$enableval) +AC_ARG_ENABLE(glob-asciiranges-default, AC_HELP_STRING([--enable-glob-asciiranges-default], [force bracket range expressions in pattern matching to use the C locale by default]), opt_globascii_default=$enableval) +AC_ARG_ENABLE(help-builtin, AC_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval) +AC_ARG_ENABLE(history, AC_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval) +AC_ARG_ENABLE(job-control, AC_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval) +AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval) +AC_ARG_ENABLE(net-redirections, AC_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval) +AC_ARG_ENABLE(process-substitution, AC_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval) +AC_ARG_ENABLE(progcomp, AC_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval) +AC_ARG_ENABLE(prompt-string-decoding, AC_HELP_STRING([--enable-prompt-string-decoding], [turn on escape character decoding in prompts]), opt_prompt_decoding=$enableval) +AC_ARG_ENABLE(readline, AC_HELP_STRING([--enable-readline], [turn on command line editing]), opt_readline=$enableval) +AC_ARG_ENABLE(restricted, AC_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval) +AC_ARG_ENABLE(select, AC_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval) +AC_ARG_ENABLE(separate-helpfiles, AC_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval) +AC_ARG_ENABLE(single-help-strings, AC_HELP_STRING([--enable-single-help-strings], [store help documentation as a single string to ease translation]), opt_single_longdoc_strings=$enableval) +AC_ARG_ENABLE(strict-posix-default, AC_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval) +AC_ARG_ENABLE(usg-echo-default, AC_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval) +AC_ARG_ENABLE(xpg-echo-default, AC_HELP_STRING([--enable-xpg-echo-default], [make the echo builtin expand escape sequences by default]), opt_xpg_echo=$enableval) + +dnl options that alter how bash is compiled and linked +AC_ARG_ENABLE(mem-scramble, AC_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval) +AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval) +AC_ARG_ENABLE(static-link, AC_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval) + +dnl So-called `precious' variables +AC_ARG_VAR([CC_FOR_BUILD], [C compiler used when compiling binaries used only at build time]) +AC_ARG_VAR([CFLAGS_FOR_BUILD], [Compilation options (CFLAGS) used when compiling binaries used only at build time]) +AC_ARG_VAR([LDFLAGS_FOR_BUILD], [Linker options (LDFLAGS) used when compiling binaries used only at build time]) +AC_ARG_VAR([CPPFLAGS_FOR_BUILD], [C preprocessor options (CPPFLAGS) used when compiling binaries used only at build time]) + +dnl opt_job_control is handled later, after BASH_JOB_CONTROL_MISSING runs + +dnl opt_readline and opt_history are handled later, because AC_PROG_CC needs +dnl to be run before we can check the version of an already-installed readline +dnl library + +if test $opt_alias = yes; then +AC_DEFINE(ALIAS) +fi +if test $opt_dirstack = yes; then +AC_DEFINE(PUSHD_AND_POPD) +fi +if test $opt_restricted = yes; then +AC_DEFINE(RESTRICTED_SHELL) +fi +if test $opt_process_subst = yes; then +AC_DEFINE(PROCESS_SUBSTITUTION) +fi +if test $opt_prompt_decoding = yes; then +AC_DEFINE(PROMPT_STRING_DECODE) +fi +if test $opt_select = yes; then +AC_DEFINE(SELECT_COMMAND) +fi +if test $opt_help = yes; then +AC_DEFINE(HELP_BUILTIN) +fi +if test $opt_array_variables = yes; then +AC_DEFINE(ARRAY_VARS) +fi +if test $opt_dparen_arith = yes; then +AC_DEFINE(DPAREN_ARITHMETIC) +fi +if test $opt_brace_expansion = yes; then +AC_DEFINE(BRACE_EXPANSION) +fi +if test $opt_disabled_builtins = yes; then +AC_DEFINE(DISABLED_BUILTINS) +fi +if test $opt_command_timing = yes; then +AC_DEFINE(COMMAND_TIMING) +fi +if test $opt_xpg_echo = yes ; then +AC_DEFINE(DEFAULT_ECHO_TO_XPG) +fi +if test $opt_strict_posix = yes; then +AC_DEFINE(STRICT_POSIX) +fi +if test $opt_extended_glob = yes ; then +AC_DEFINE(EXTENDED_GLOB) +fi +if test $opt_extglob_default = yes; then +AC_DEFINE(EXTGLOB_DEFAULT, 1) +else +AC_DEFINE(EXTGLOB_DEFAULT, 0) +fi +if test $opt_cond_command = yes ; then +AC_DEFINE(COND_COMMAND) +fi +if test $opt_cond_regexp = yes ; then +AC_DEFINE(COND_REGEXP) +fi +if test $opt_coproc = yes; then +AC_DEFINE(COPROCESS_SUPPORT) +fi +if test $opt_arith_for_command = yes; then +AC_DEFINE(ARITH_FOR_COMMAND) +fi +if test $opt_net_redirs = yes; then +AC_DEFINE(NETWORK_REDIRECTIONS) +fi +if test $opt_progcomp = yes; then +AC_DEFINE(PROGRAMMABLE_COMPLETION) +fi +if test $opt_multibyte = no; then +AC_DEFINE(NO_MULTIBYTE_SUPPORT) +fi +if test $opt_debugger = yes; then +AC_DEFINE(DEBUGGER) +fi +if test $opt_casemod_attrs = yes; then +AC_DEFINE(CASEMOD_ATTRS) +fi +if test $opt_casemod_expansions = yes; then +AC_DEFINE(CASEMOD_EXPANSIONS) +fi +if test $opt_dircomplete_expand_default = yes; then +AC_DEFINE(DIRCOMPLETE_EXPAND_DEFAULT) +fi +if test $opt_globascii_default = yes; then +AC_DEFINE(GLOBASCII_DEFAULT, 1) +else +AC_DEFINE(GLOBASCII_DEFAULT, 0) +fi +if test $opt_function_import = yes; then +AC_DEFINE(FUNCTION_IMPORT) +fi +if test $opt_dev_fd_stat_broken = yes; then +AC_DEFINE(DEV_FD_STAT_BROKEN) +fi + +if test $opt_memscramble = yes; then +AC_DEFINE(MEMSCRAMBLE) +fi + +if test "$opt_minimal_config" = yes; then + TESTSCRIPT=run-minimal +else + TESTSCRIPT=run-all +fi + +HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET= +if test "$opt_separate_help" != no; then + if test "$opt_separate_help" = "yes" ; then + HELPDIR='${datadir}/bash' + else + HELPDIR=$opt_separate_help + fi + HELPDIRDEFINE='-H ${HELPDIR}' + HELPINSTALL='install-help' + HELPFILES_TARGET='helpdoc' +fi +HELPSTRINGS= +if test "$opt_single_longdoc_strings" != "yes"; then + HELPSTRINGS='-S' +fi + +dnl now substitute in the values generated by arguments +AC_SUBST(TESTSCRIPT) +AC_SUBST(MALLOC_TARGET) +AC_SUBST(MALLOC_SRC) + +AC_SUBST(MALLOC_LIB) +AC_SUBST(MALLOC_LIBRARY) +AC_SUBST(MALLOC_LDFLAGS) +AC_SUBST(MALLOC_DEP) + +AC_SUBST(htmldir) + +AC_SUBST(HELPDIR) +AC_SUBST(HELPDIRDEFINE) +AC_SUBST(HELPINSTALL) +AC_SUBST(HELPFILES_TARGET) +AC_SUBST(HELPSTRINGS) + +dnl We want these before the checks, so the checks can modify their values. +if test -z "$CFLAGS"; then + want_auto_cflags=1 +fi + +echo "" +echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}" +echo "" + +dnl compilation checks +dnl AC_PROG_CC sets $cross_compiling to `yes' if cross-compiling for a +dnl different environment +AC_PROG_CC + +if test -n "$want_auto_cflags"; then + AUTO_CFLAGS="-g ${GCC+-O2}" + AUTO_LDFLAGS="-g ${GCC+-O2}" + STYLE_CFLAGS="${GCC+-Wno-parentheses} ${GCC+-Wno-format-security}" +else + AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS= +fi + +dnl test for Unix variants +AC_ISC_POSIX +AC_MINIX + +AC_SYS_LARGEFILE + +dnl BEGIN changes for cross-building (currently cygwin, minGW, and +dnl (obsolete) BeOS) + +SIGNAMES_O= +SIGNAMES_H=lsignames.h + +dnl load up the cross-building cache file -- add more cases and cache +dnl files as necessary + +dnl Note that host and target machine are the same, and different than the +dnl build machine. +dnl Set SIGNAMES_H based on whether or not we're cross-compiling. + +CROSS_COMPILE= +if test "x$cross_compiling" = "xyes"; then + case "${host}" in + *-cygwin*) + cross_cache=${srcdir}/cross-build/cygwin32.cache + ;; + *-mingw*) + cross_cache=${srcdir}/cross-build/cygwin32.cache + ;; + i[[3456]]86-*-beos*) + cross_cache=${srcdir}/cross-build/x86-beos.cache + ;; + *-qnx*) + cross_cache=${srcdir}/cross-build/qnx.cache + ;; + *) echo "configure: cross-compiling for $host is not supported" >&2 + ;; + esac + if test -n "${cross_cache}" && test -r "${cross_cache}"; then + echo "loading cross-build cache file ${cross_cache}" + . ${cross_cache} + fi + unset cross_cache + SIGNAMES_O='signames.o' + CROSS_COMPILE='-DCROSS_COMPILING' + AC_SUBST(CROSS_COMPILE) +fi +AC_SUBST(SIGNAMES_H) +AC_SUBST(SIGNAMES_O) + +dnl END changes for cross-building + +dnl default values +CFLAGS=${CFLAGS-"$AUTO_CFLAGS"} +# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX + +dnl handle options that alter how bash is compiled and linked +dnl these must come after the test for cc/gcc +if test "$opt_profiling" = "yes"; then + PROFILE_FLAGS=-pg + case "$host_os" in + solaris2*|linux*) ;; + *) opt_static_link=yes ;; + esac + DEBUG= MALLOC_DEBUG= +fi + +prefer_shared=yes +prefer_static=no + +if test "$opt_static_link" = yes; then + prefer_static=yes + prefer_shared=no + # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 + if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then + STATIC_LD="-static" + case "$host_os" in + solaris2*|linux*) ;; + *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental + esac + fi +fi + +# set the appropriate make variables for building the "build tools" +# modify defaults based on whether or not we are cross compiling, since the +# options for the target host may not be appropriate for the build host +if test "X$cross_compiling" = "Xno"; then + CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)' + if test X"$opt_profiling" = Xyes; then + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'} + else + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} + fi + # CFLAGS set above to default value if not passed in environment + if test -n "$want_auto_cflags" ; then + CFLAGS_FOR_BUILD="${CFLAGS} ${STYLE_CFLAGS}" + else + CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + fi + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} +else + CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"} + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""} +fi + +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(STATIC_LD) + +AC_SUBST(CC_FOR_BUILD) +AC_SUBST(CFLAGS_FOR_BUILD) +AC_SUBST(CPPFLAGS_FOR_BUILD) +AC_SUBST(LDFLAGS_FOR_BUILD) +AC_SUBST(LIBS_FOR_BUILD) + +AC_PROG_GCC_TRADITIONAL + +dnl BEGIN READLINE and HISTORY LIBRARY SECTION +dnl prepare to allow bash to be linked against an already-installed readline + +dnl first test that the readline version is new enough to link bash against +if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no" +then + # If the user specified --with-installed-readline=PREFIX and PREFIX + # is not `yes', set ac_cv_rl_prefix to PREFIX + test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline + + RL_LIB_READLINE_VERSION + + case "$ac_cv_rl_version" in + 8*|9*) ;; + *) opt_with_installed_readline=no + AC_MSG_WARN([installed readline library is too old to be linked with bash]) + AC_MSG_WARN([using private bash version]) + ;; + esac +fi + +TILDE_LIB=-ltilde +if test $opt_readline = yes; then + AC_DEFINE(READLINE) + if test "$opt_with_installed_readline" != "no" ; then + case "$opt_with_installed_readline" in + yes) RL_INCLUDE= ;; + *) case "$RL_INCLUDEDIR" in + /usr/include) ;; + *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; + esac + ;; + esac + READLINE_DEP= + READLINE_LIB=-lreadline + # section for OS versions that don't allow unresolved symbols + # to be compiled into dynamic libraries. + case "$host_os" in + cygwin*) TILDE_LIB= ;; + esac + else + RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + READLINE_DEP='$(READLINE_LIBRARY)' + # section for OS versions that ship an older/broken version of + # readline as a standard dynamic library and don't allow a + # static version specified as -llibname to override the + # dynamic version + case "${host_os}" in + darwin[[89]]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;; + *) READLINE_LIB=-lreadline ;; + esac + fi +else + RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + READLINE_LIB= READLINE_DEP= +fi +if test $opt_history = yes || test $opt_bang_history = yes; then + if test $opt_history = yes; then + AC_DEFINE(HISTORY) + fi + if test $opt_bang_history = yes; then + AC_DEFINE(BANG_HISTORY) + fi + if test "$opt_with_installed_readline" != "no"; then + HIST_LIBDIR=$RL_LIBDIR + HISTORY_DEP= + HISTORY_LIB=-lhistory + case "$opt_with_installed_readline" in + yes) RL_INCLUDE= ;; + *) case "$RL_INCLUDEDIR" in + /usr/include) ;; + *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; + esac + ;; + esac + else + HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + HISTORY_DEP='$(HISTORY_LIBRARY)' + # section for OS versions that ship an older version of + # readline as a standard dynamic library and don't allow a + # static version specified as -llibname to override the + # dynamic version + case "${host_os}" in + darwin[[89]]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;; + *) HISTORY_LIB=-lhistory ;; + esac + fi +else + HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + HISTORY_LIB= HISTORY_DEP= +fi +AC_SUBST(READLINE_LIB) +AC_SUBST(READLINE_DEP) +AC_SUBST(RL_LIBDIR) +AC_SUBST(RL_INCLUDEDIR) +AC_SUBST(RL_INCLUDE) +AC_SUBST(HISTORY_LIB) +AC_SUBST(HISTORY_DEP) +AC_SUBST(HIST_LIBDIR) +AC_SUBST(TILDE_LIB) + +dnl END READLINE and HISTORY LIBRARY SECTION + +dnl programs needed by the build and install process +AC_PROG_INSTALL +AC_CHECK_TOOL(AR, ar) +dnl Set default for ARFLAGS, since autoconf does not have a macro for it. +dnl This allows people to set it when running configure or make +test -n "$ARFLAGS" || ARFLAGS="cr" +AC_PROG_RANLIB +AC_PROG_YACC +AC_PROG_MAKE_SET + +case "$ac_cv_prog_YACC" in +*bison*) ;; +*) AC_MSG_WARN([bison not available; needed to process parse.y]) ;; +esac + +case "$host_os" in +opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; +*) MAKE_SHELL=/bin/sh ;; +esac +AC_SUBST(MAKE_SHELL) + +dnl this is similar to the expanded AC_PROG_RANLIB +if test x$SIZE = x; then + if test x$ac_tool_prefix = x; then + SIZE=size + else + SIZE=${ac_tool_prefix}size + save_IFS=$IFS ; IFS=: + size_found=0 + for dir in $PATH; do + if test -x $dir/$SIZE ; then + size_found=1 + break + fi + done + if test $size_found -eq 0; then + SIZE=: + fi + IFS=$save_IFS + fi +fi +AC_SUBST(SIZE) + +m4_include([m4/stat-time.m4]) +m4_include([m4/timespec.m4]) + +dnl include files for gettext + +m4_include([m4/codeset.m4]) +m4_include([m4/extern-inline.m4]) +m4_include([m4/fcntl-o.m4]) +m4_include([m4/gettext.m4]) +m4_include([m4/glibc2.m4]) +m4_include([m4/glibc21.m4]) +m4_include([m4/host-cpu-c-abi.m4]) +m4_include([m4/iconv.m4]) +m4_include([m4/intdiv0.m4]) +m4_include([m4/intl.m4]) +m4_include([m4/intlmacosx.m4]) +m4_include([m4/intl-thread-locale.m4]) +m4_include([m4/intmax.m4]) +m4_include([m4/inttypes-pri.m4]) +m4_include([m4/inttypes.m4]) +m4_include([m4/inttypes_h.m4]) +m4_include([m4/lcmessage.m4]) +m4_include([m4/lib-ld.m4]) +m4_include([m4/lib-link.m4]) +m4_include([m4/lib-prefix.m4]) +m4_include([m4/lock.m4]) +m4_include([m4/nls.m4]) +m4_include([m4/po.m4]) +m4_include([m4/printf-posix.m4]) +m4_include([m4/progtest.m4]) +m4_include([m4/pthread_rwlock_rdlock.m4]) +m4_include([m4/size_max.m4]) +m4_include([m4/stdint_h.m4]) +m4_include([m4/threadlib.m4]) +m4_include([m4/uintmax_t.m4]) +m4_include([m4/ulonglong.m4]) +m4_include([m4/visibility.m4]) +m4_include([m4/wchar_t.m4]) +m4_include([m4/wint_t.m4]) +m4_include([m4/xsize.m4]) + +dnl Turn on any extensions available in the GNU C library. +AC_DEFINE(_GNU_SOURCE, 1) + +dnl C compiler characteristics +AC_C_CONST +AC_C_INLINE +AC_C_BIGENDIAN +AC_C_STRINGIZE +AC_C_LONG_DOUBLE +AC_C_PROTOTYPES +AC_C_CHAR_UNSIGNED +AC_C_VOLATILE +AC_C_RESTRICT + +dnl initialize GNU gettext +AM_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl]) + +dnl header files +AC_HEADER_DIRENT +AC_HEADER_TIME +AC_HEADER_MAJOR + +BASH_HEADER_INTTYPES + +AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \ + memory.h locale.h termcap.h termio.h termios.h dlfcn.h \ + stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \ + regex.h syslog.h ulimit.h) +AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \ + sys/mman.h sys/param.h sys/random.h sys/socket.h sys/stat.h \ + sys/time.h sys/times.h sys/types.h sys/wait.h) +AC_CHECK_HEADERS(netinet/in.h arpa/inet.h) + +dnl sys/ptem.h requires definitions from sys/stream.h on systems where it +dnl exists +AC_CHECK_HEADER(sys/ptem.h, , ,[[ +#if HAVE_SYS_STREAM_H +# include +#endif +]]) + +dnl SunOS 4 needs to include before to compile +dnl autoconf complains about presence but inability to compile +AC_CHECK_HEADER(sys/resource.h, AC_DEFINE(HAVE_SYS_RESOURCE_H), [], [[ +#if HAVE_SYS_TIME_H +# include +#endif +]]) + +dnl special checks for libc functions +AC_FUNC_ALLOCA +AC_FUNC_CHOWN +AC_FUNC_GETPGRP +AC_FUNC_SETVBUF_REVERSED +AC_FUNC_VPRINTF +AC_FUNC_STRCOLL + +dnl if we're not using the bash malloc but require the C alloca, set things +dnl up to build a libmalloc.a containing only alloca.o + +if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then + MALLOC_TARGET=alloca + MALLOC_SRC=alloca.c + + MALLOC_LIB='-lmalloc' + MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' + MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' + MALLOC_DEP='$(MALLOC_LIBRARY)' +fi + +dnl if vprintf is not in libc, see if it's defined in stdio.h +if test "$ac_cv_func_vprintf" = no; then + AC_MSG_CHECKING(for declaration of vprintf in stdio.h) + AC_EGREP_HEADER([[int[ ]*vprintf[^a-zA-Z0-9]]],stdio.h,ac_cv_func_vprintf=yes) + AC_MSG_RESULT($ac_cv_func_vprintf) + if test $ac_cv_func_vprintf = yes; then + AC_DEFINE(HAVE_VPRINTF) + fi +fi + +if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then + AC_LIBOBJ(vprint) +fi + +dnl signal stuff +AC_TYPE_SIGNAL + +dnl checks for certain version-specific system calls and libc functions +AC_CHECK_FUNC(__setostype, AC_DEFINE(HAVE_SETOSTYPE)) +AC_CHECK_FUNC(wait3, AC_DEFINE(HAVE_WAIT3)) + +dnl checks for missing libc functions +AC_CHECK_FUNC(mkfifo,AC_DEFINE(HAVE_MKFIFO),AC_DEFINE(MKFIFO_MISSING)) + +dnl checks for system calls +AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getentropy getgroups \ + gethostname getpagesize getpeername getrandom getrlimit \ + getrusage gettimeofday kill killpg lstat pselect readlink \ + select setdtablesize setitimer tcgetpgrp uname ulimit waitpid pread) +AC_REPLACE_FUNCS(rename) + +dnl checks for c library functions +AC_CHECK_FUNCS(bcopy bzero confstr faccessat fnmatch \ + getaddrinfo gethostbyname getservbyname getservent inet_aton \ + imaxdiv memmove pathconf putenv raise random regcomp regexec \ + setenv setlinebuf setlocale setvbuf siginterrupt strchr \ + sysconf syslog tcgetattr times ttyname tzset unsetenv) + +AC_CHECK_FUNCS(vasprintf asprintf) +AC_CHECK_FUNCS(isascii isblank isgraph isprint isspace isxdigit) +AC_CHECK_FUNCS(getpwent getpwnam getpwuid) +AC_CHECK_FUNCS(mkstemp mkdtemp) +AC_CHECK_FUNCS(arc4random) + +AC_REPLACE_FUNCS(getcwd memset) +AC_REPLACE_FUNCS(strcasecmp strcasestr strerror strftime strnlen strpbrk strstr) +AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoimax strtoumax) +AC_REPLACE_FUNCS(dprintf) +AC_REPLACE_FUNCS(strchrnul) +AC_REPLACE_FUNCS(strdup) + +AC_CHECK_HEADERS(libaudit.h) +AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]]) + +AC_CHECK_DECLS([confstr]) +AC_CHECK_DECLS([printf]) +AC_CHECK_DECLS([sbrk]) +AC_CHECK_DECLS([setregid]) +dnl AC_CHECK_DECLS[(setresuid]) +dnl AC_CHECK_DECLS[(setresgid]) +AC_CHECK_DECLS([strcpy]) +AC_CHECK_DECLS([strsignal]) + +AC_CHECK_FUNCS(setresuid setresgid) + +dnl Extra test to detect the horribly broken HP/UX 11.00 strtold(3) +AC_CHECK_DECLS([strtold], [ + AC_MSG_CHECKING([for broken strtold]) + AC_CACHE_VAL(bash_cv_strtold_broken, + [AC_TRY_COMPILE( + [#include ], + [long double r; char *foo, bar; r = strtold(foo, &bar);], + bash_cv_strtold_broken=no, bash_cv_strtold_broken=yes, + [AC_MSG_WARN(cannot check for broken strtold if cross-compiling, defaulting to no)]) + ] + ) + AC_MSG_RESULT($bash_cv_strtold_broken) + if test "$bash_cv_strtold_broken" = "yes" ; then + AC_DEFINE(STRTOLD_BROKEN) + fi +]) + +BASH_CHECK_DECL(strtoimax) +BASH_CHECK_DECL(strtol) +BASH_CHECK_DECL(strtoll) +BASH_CHECK_DECL(strtoul) +BASH_CHECK_DECL(strtoull) +BASH_CHECK_DECL(strtoumax) + +AC_FUNC_MKTIME + +dnl +dnl Checks for lib/intl and related code (uses some of the output from +dnl AM_GNU_GETTEXT) +dnl + +AC_CHECK_HEADERS([argz.h errno.h fcntl.h malloc.h stdio_ext.h]) + +dnl AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify dcgettext mempcpy \ + munmap mremap stpcpy strcspn]) + +INTL_DEP= INTL_INC= LIBINTL_H= +if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then + INTL_DEP='${INTL_LIBDIR}/libintl.a' + INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}' + LIBINTL_H='${INTL_BUILDDIR}/libintl.h' +fi +AC_SUBST(INTL_DEP) +AC_SUBST(INTL_INC) +AC_SUBST(LIBINTL_H) + +dnl +dnl End of checks needed by files in lib/intl +dnl + +BASH_CHECK_MULTIBYTE + +dnl checks for the dynamic loading library functions in libc and libdl +if test "$opt_static_link" != yes; then +AC_CHECK_LIB(dl, dlopen) +AC_CHECK_FUNCS(dlopen dlclose dlsym) +fi + +dnl this defines HAVE_DECL_SYS_SIGLIST +AC_DECL_SYS_SIGLIST + +dnl network functions -- check for inet_aton again +if test "$ac_cv_func_inet_aton" != 'yes'; then +BASH_FUNC_INET_ATON +fi + +dnl libraries +dnl this is reportedly no longer necessary for irix[56].? +case "$host_os" in +irix4*) AC_CHECK_LIB(sun, getpwent) ;; +esac + +dnl check for getpeername in the socket library only if it's not in libc +if test "$ac_cv_func_getpeername" = no; then + BASH_CHECK_LIB_SOCKET +fi +dnl check for gethostbyname in socket libraries if it's not in libc +if test "$ac_cv_func_gethostbyname" = no; then + BASH_FUNC_GETHOSTBYNAME +fi + +dnl system types +AC_TYPE_GETGROUPS +AC_TYPE_OFF_T +AC_TYPE_MODE_T +AC_TYPE_UID_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_UINTPTR_T + +AC_CHECK_TYPE(ssize_t, int) +AC_CHECK_TYPE(time_t, long) + +BASH_TYPE_LONG_LONG +BASH_TYPE_UNSIGNED_LONG_LONG + +AC_TYPE_SIGNAL +BASH_TYPE_SIG_ATOMIC_T + +AC_CHECK_SIZEOF(char, 1) +AC_CHECK_SIZEOF(short, 2) +AC_CHECK_SIZEOF(int, 4) +AC_CHECK_SIZEOF(long, 4) +AC_CHECK_SIZEOF(char *, 4) +AC_CHECK_SIZEOF(double, 8) +AC_CHECK_SIZEOF([long long], 8) + +AC_CHECK_TYPE(u_int, [unsigned int]) +AC_CHECK_TYPE(u_long, [unsigned long]) + +BASH_TYPE_BITS16_T +BASH_TYPE_U_BITS16_T +BASH_TYPE_BITS32_T +BASH_TYPE_U_BITS32_T +BASH_TYPE_BITS64_T + +BASH_TYPE_PTRDIFF_T + +dnl structures +AC_HEADER_STAT + +dnl system services +AC_SYS_INTERPRETER +if test $ac_cv_sys_interpreter = yes; then +AC_DEFINE(HAVE_HASH_BANG_EXEC) +fi + +dnl Miscellaneous Bash tests +if test "$ac_cv_func_lstat" = "no"; then +BASH_FUNC_LSTAT +fi + +dnl behavior of system calls and library functions +BASH_FUNC_CTYPE_NONASCII +BASH_FUNC_DUP2_CLOEXEC_CHECK +BASH_SYS_PGRP_SYNC +BASH_SYS_SIGNAL_VINTAGE + +AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]]) + +dnl checking for the presence of certain library symbols +BASH_SYS_ERRLIST +BASH_SYS_SIGLIST +BASH_UNDER_SYS_SIGLIST + +dnl various system types +BASH_TYPE_SIGHANDLER +BASH_CHECK_TYPE(clock_t, [#include ], long) +BASH_CHECK_TYPE(sigset_t, [#include ], int) +BASH_CHECK_TYPE(sig_atomic_t, [#include ], int) +BASH_CHECK_TYPE(quad_t, , long, HAVE_QUAD_T) +BASH_CHECK_TYPE(intmax_t, , $bash_cv_type_long_long) +BASH_CHECK_TYPE(uintmax_t, , $bash_cv_type_unsigned_long_long) +if test "$ac_cv_header_sys_socket_h" = "yes"; then +BASH_CHECK_TYPE(socklen_t, [#include ], [unsigned int], HAVE_SOCKLEN_T) +fi +BASH_TYPE_RLIMIT + +AC_CHECK_SIZEOF(intmax_t, 8) + +dnl presence and contents of structures used by system calls +BASH_STRUCT_TERMIOS_LDISC +BASH_STRUCT_TERMIO_LDISC +BASH_STRUCT_DIRENT_D_INO +BASH_STRUCT_DIRENT_D_FILENO +BASH_STRUCT_DIRENT_D_NAMLEN +BASH_STRUCT_WINSIZE +BASH_STRUCT_TIMEVAL +AC_CHECK_MEMBERS([struct stat.st_blocks]) +AC_STRUCT_TM +AC_STRUCT_TIMEZONE +BASH_STRUCT_TIMEZONE + +BASH_STRUCT_WEXITSTATUS_OFFSET + +BASH_CHECK_TYPE_STRUCT_TIMESPEC +BASH_STAT_TIME + +dnl checks for system calls +BASH_FUNC_SBRK + +dnl presence and behavior of C library functions +BASH_FUNC_STRSIGNAL +BASH_FUNC_OPENDIR_CHECK +BASH_FUNC_ULIMIT_MAXFDS +BASH_FUNC_FPURGE +BASH_FUNC_GETENV +if test "$ac_cv_func_getcwd" = "yes"; then +BASH_FUNC_GETCWD +fi +BASH_FUNC_POSIX_SETJMP +BASH_FUNC_STRCOLL +BASH_FUNC_SNPRINTF +BASH_FUNC_VSNPRINTF + +dnl If putenv or unsetenv is not present, set the right define so the +dnl prototype and declaration in lib/sh/getenv.c will be standard-conformant + +if test "$ac_cv_func_putenv" = "yes"; then +BASH_FUNC_STD_PUTENV +else +AC_DEFINE(HAVE_STD_PUTENV) +fi +if test "$ac_cv_func_unsetenv" = "yes"; then +BASH_FUNC_STD_UNSETENV +else +AC_DEFINE(HAVE_STD_UNSETENV) +fi + +BASH_FUNC_PRINTF_A_FORMAT + +BASH_FUNC_FNMATCH_EQUIV_FALLBACK + +dnl presence and behavior of OS functions +BASH_SYS_REINSTALL_SIGHANDLERS +BASH_SYS_JOB_CONTROL_MISSING +BASH_SYS_NAMED_PIPES + +dnl presence of certain CPP defines +AC_HEADER_TIOCGWINSZ +BASH_HAVE_TIOCSTAT +BASH_HAVE_FIONREAD + +BASH_CHECK_WCONTINUED + +dnl miscellaneous +BASH_CHECK_SPEED_T +BASH_CHECK_GETPW_FUNCS +BASH_CHECK_RTSIGS +BASH_CHECK_SYS_SIGLIST + +dnl special checks +case "$host_os" in +hpux*) BASH_CHECK_KERNEL_RLIMIT ;; +esac + +if test "$opt_readline" = yes; then +dnl yuck +case "$host_os" in +aix*) prefer_curses=yes ;; +esac +BASH_CHECK_LIB_TERMCAP +fi +AC_SUBST(TERMCAP_LIB) +AC_SUBST(TERMCAP_DEP) + +BASH_CHECK_DEV_FD +BASH_CHECK_DEV_STDIN +BASH_SYS_DEFAULT_MAIL_DIR + +if test "$bash_cv_job_control_missing" = missing; then + opt_job_control=no +fi + +if test "$opt_job_control" = yes; then +AC_DEFINE(JOB_CONTROL) +JOBS_O=jobs.o +else +JOBS_O=nojobs.o +fi + +AC_SUBST(JOBS_O) + +dnl Defines that we want to propagate to the Makefiles in subdirectories, +dnl like glob and readline + +LOCAL_DEFS=-DSHELL + +dnl use this section to possibly define more cpp variables, specify local +dnl libraries, and specify any additional local cc or ld flags +dnl +dnl most of these are really old; this should really go away someday + +case "${host_os}" in +sysv4.2*) AC_DEFINE(SVR4_2) + AC_DEFINE(SVR4) ;; +sysv4*) AC_DEFINE(SVR4) ;; +sysv5*) AC_DEFINE(SVR5) ;; +hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;; +isc*) LOCAL_CFLAGS=-Disc386 ;; +rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; +darwin*) LOCAL_CFLAGS=-DMACOSX ;; +sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;; +sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;; +sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;; +sunos4*) LOCAL_CFLAGS=-DSunOS4 ;; +solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;; +solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;; +solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;; +solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;; +solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; +lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; +linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading + case "`uname -r`" in + 1.*|2.[[0123]]*) : ;; + *) AC_DEFINE(PGRP_PIPE) ;; + esac ;; +netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; +freebsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; +*qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; +*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; +powerux*) LOCAL_LIBS="-lgen" ;; +cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; +opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;; +*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; +esac + +dnl Stanza for OS/compiler pair-specific flags +case "${host_os}-${CC}" in +aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;; +aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;; +bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux +bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux +hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading +esac + +dnl FreeBSD-3.x can have either a.out or ELF +case "${host_os}" in +freebsd[[3-9]]*) + if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then + LOCAL_LDFLAGS=-rdynamic # allow dynamic loading + fi ;; +freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading +dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading +esac + +case "$host_cpu" in +*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it +esac + +case "$host_cpu-$host_os" in +ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;; +esac + +case "$host_cpu-$host_vendor-$host_os" in +m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;; +mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;; +esac + +# turn off paren warnings in gcc +CFLAGS="$CFLAGS ${STYLE_CFLAGS}" + +# +# Shared object configuration section. These values are generated by +# ${srcdir}/support/shobj-conf +# +if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf +then + AC_MSG_CHECKING(shared object configuration for loadable builtins) + eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"` + AC_SUBST(SHOBJ_CC) + AC_SUBST(SHOBJ_CFLAGS) + AC_SUBST(SHOBJ_LD) + AC_SUBST(SHOBJ_LDFLAGS) + AC_SUBST(SHOBJ_XLDFLAGS) + AC_SUBST(SHOBJ_LIBS) + AC_SUBST(SHOBJ_STATUS) + AC_MSG_RESULT($SHOBJ_STATUS) +else + SHOBJ_STATUS=unsupported + AC_SUBST(SHOBJ_STATUS) +fi + +# try to create a directory tree if the source is elsewhere +# this should be packaged into a script accessible via ${srcdir}/support +case "$srcdir" in +.) ;; +*) for d in doc tests support lib examples; do # dirs + test -d $d || mkdir $d + done + for ld in readline glob tilde malloc sh termcap; do # libdirs + test -d lib/$ld || mkdir lib/$ld + done + test -d examples/loadables || mkdir examples/loadables # loadable builtins + test -d examples/loadables/perl || mkdir examples/loadables/perl + ;; +esac + +BUILD_DIR=`pwd` +case "$BUILD_DIR" in +*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;; +*) ;; +esac + +if test -z "$localedir"; then + localedir='${datarootdir}/locale' +fi +if test -z "$datarootdir"; then + datarootdir='${prefix}/share' +fi + +AC_SUBST(PROFILE_FLAGS) + +AC_SUBST(incdir) +AC_SUBST(BUILD_DIR) + +# Some versions of autoconf don't substitute these automatically +AC_SUBST(datarootdir) +AC_SUBST(localedir) + +# directory where we install dynamically loadable builtins +if test -z "$loadablesdir"; then + loadablesdir='${libdir}/bash' +fi +AC_SUBST(loadablesdir) +if test -z "$headersdir"; then + headersdir='$(includedir)/$(PACKAGE_NAME)' +fi +AC_SUBST(headersdir) + +AC_SUBST(YACC) +AC_SUBST(AR) +AC_SUBST(ARFLAGS) + +AC_SUBST(BASHVERS) +AC_SUBST(RELSTATUS) +AC_SUBST(DEBUG) +AC_SUBST(MALLOC_DEBUG) + +AC_SUBST(host_cpu) +AC_SUBST(host_vendor) +AC_SUBST(host_os) + +AC_SUBST(LOCAL_LIBS) +AC_SUBST(LOCAL_CFLAGS) +AC_SUBST(LOCAL_LDFLAGS) +AC_SUBST(LOCAL_DEFS) + +#AC_SUBST(ALLOCA_SOURCE) +#AC_SUBST(ALLOCA_OBJECT) + +AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \ + lib/intl/Makefile \ + lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \ + lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in \ + examples/loadables/Makefile examples/loadables/Makefile.inc \ + examples/loadables/perl/Makefile \ + support/bash.pc support/bashbug.sh], +[ +# Makefile uses this timestamp file to record whether config.h is up to date. +echo timestamp > stamp-h +]) diff --git a/bash-5.1/conftypes.h b/bash-5.1/conftypes.h new file mode 100644 index 0000000000000000000000000000000000000000..1c8c5480a4ce3aeb7c156df7fcd17aff562eac14 --- /dev/null +++ b/bash-5.1/conftypes.h @@ -0,0 +1,58 @@ +/* conftypes.h -- defines for build and host system. */ + +/* Copyright (C) 2001, 2005, 2008,2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_CONFTYPES_H_) +#define _CONFTYPES_H_ + +/* Placeholder for future modifications if cross-compiling or building a + `fat' binary, e.g. on Apple Rhapsody. These values are used in multiple + files, so they appear here. */ +#if !defined (RHAPSODY) && !defined (MACOSX) +# define HOSTTYPE CONF_HOSTTYPE +# define OSTYPE CONF_OSTYPE +# define MACHTYPE CONF_MACHTYPE +#else /* RHAPSODY */ +# if defined(__powerpc__) || defined(__ppc__) +# define HOSTTYPE "powerpc" +# elif defined(__i386__) +# define HOSTTYPE "i386" +# else +# define HOSTTYPE CONF_HOSTTYPE +# endif + +# define OSTYPE CONF_OSTYPE +# define VENDOR CONF_VENDOR + +# define MACHTYPE HOSTTYPE "-" VENDOR "-" OSTYPE +#endif /* RHAPSODY */ + +#ifndef HOSTTYPE +# define HOSTTYPE "unknown" +#endif + +#ifndef OSTYPE +# define OSTYPE "unknown" +#endif + +#ifndef MACHTYPE +# define MACHTYPE "unknown" +#endif + +#endif /* _CONFTYPES_H_ */ diff --git a/bash-5.1/copy_cmd.c b/bash-5.1/copy_cmd.c new file mode 100644 index 0000000000000000000000000000000000000000..758ff238a111a8db9ab3ffe902c0eabd11c72766 --- /dev/null +++ b/bash-5.1/copy_cmd.c @@ -0,0 +1,459 @@ +/* copy_command.c -- copy a COMMAND structure. This is needed + primarily for making function definitions, but I'm not sure + that anyone else will need it. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include "shell.h" + +static PATTERN_LIST *copy_case_clause PARAMS((PATTERN_LIST *)); +static PATTERN_LIST *copy_case_clauses PARAMS((PATTERN_LIST *)); +static FOR_COM *copy_for_command PARAMS((FOR_COM *)); +#if defined (ARITH_FOR_COMMAND) +static ARITH_FOR_COM *copy_arith_for_command PARAMS((ARITH_FOR_COM *)); +#endif +static GROUP_COM *copy_group_command PARAMS((GROUP_COM *)); +static SUBSHELL_COM *copy_subshell_command PARAMS((SUBSHELL_COM *)); +static COPROC_COM *copy_coproc_command PARAMS((COPROC_COM *)); +static CASE_COM *copy_case_command PARAMS((CASE_COM *)); +static WHILE_COM *copy_while_command PARAMS((WHILE_COM *)); +static IF_COM *copy_if_command PARAMS((IF_COM *)); +#if defined (DPAREN_ARITHMETIC) +static ARITH_COM *copy_arith_command PARAMS((ARITH_COM *)); +#endif +#if defined (COND_COMMAND) +static COND_COM *copy_cond_command PARAMS((COND_COM *)); +#endif +static SIMPLE_COM *copy_simple_command PARAMS((SIMPLE_COM *)); + +WORD_DESC * +copy_word (w) + WORD_DESC *w; +{ + WORD_DESC *new_word; + + new_word = make_bare_word (w->word); + new_word->flags = w->flags; + return (new_word); +} + +/* Copy the chain of words in LIST. Return a pointer to + the new chain. */ +WORD_LIST * +copy_word_list (list) + WORD_LIST *list; +{ + WORD_LIST *new_list, *tl; + + for (new_list = tl = (WORD_LIST *)NULL; list; list = list->next) + { + if (new_list == 0) + new_list = tl = make_word_list (copy_word (list->word), new_list); + else + { + tl->next = make_word_list (copy_word (list->word), (WORD_LIST *)NULL); + tl = tl->next; + } + } + + return (new_list); +} + +static PATTERN_LIST * +copy_case_clause (clause) + PATTERN_LIST *clause; +{ + PATTERN_LIST *new_clause; + + new_clause = (PATTERN_LIST *)xmalloc (sizeof (PATTERN_LIST)); + new_clause->patterns = copy_word_list (clause->patterns); + new_clause->action = copy_command (clause->action); + new_clause->flags = clause->flags; + return (new_clause); +} + +static PATTERN_LIST * +copy_case_clauses (clauses) + PATTERN_LIST *clauses; +{ + PATTERN_LIST *new_list, *new_clause; + + for (new_list = (PATTERN_LIST *)NULL; clauses; clauses = clauses->next) + { + new_clause = copy_case_clause (clauses); + new_clause->next = new_list; + new_list = new_clause; + } + return (REVERSE_LIST (new_list, PATTERN_LIST *)); +} + +/* Copy a single redirect. */ +REDIRECT * +copy_redirect (redirect) + REDIRECT *redirect; +{ + REDIRECT *new_redirect; + + new_redirect = (REDIRECT *)xmalloc (sizeof (REDIRECT)); +#if 0 + FASTCOPY ((char *)redirect, (char *)new_redirect, (sizeof (REDIRECT))); +#else + *new_redirect = *redirect; /* let the compiler do the fast structure copy */ +#endif + + if (redirect->rflags & REDIR_VARASSIGN) + new_redirect->redirector.filename = copy_word (redirect->redirector.filename); + + switch (redirect->instruction) + { + case r_reading_until: + case r_deblank_reading_until: + new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0; + /*FALLTHROUGH*/ + case r_reading_string: + case r_appending_to: + case r_output_direction: + case r_input_direction: + case r_inputa_direction: + case r_err_and_out: + case r_append_err_and_out: + case r_input_output: + case r_output_force: + case r_duplicating_input_word: + case r_duplicating_output_word: + case r_move_input_word: + case r_move_output_word: + new_redirect->redirectee.filename = copy_word (redirect->redirectee.filename); + break; + case r_duplicating_input: + case r_duplicating_output: + case r_move_input: + case r_move_output: + case r_close_this: + break; + } + return (new_redirect); +} + +REDIRECT * +copy_redirects (list) + REDIRECT *list; +{ + REDIRECT *new_list, *temp; + + for (new_list = (REDIRECT *)NULL; list; list = list->next) + { + temp = copy_redirect (list); + temp->next = new_list; + new_list = temp; + } + return (REVERSE_LIST (new_list, REDIRECT *)); +} + +static FOR_COM * +copy_for_command (com) + FOR_COM *com; +{ + FOR_COM *new_for; + + new_for = (FOR_COM *)xmalloc (sizeof (FOR_COM)); + new_for->flags = com->flags; + new_for->line = com->line; + new_for->name = copy_word (com->name); + new_for->map_list = copy_word_list (com->map_list); + new_for->action = copy_command (com->action); + return (new_for); +} + +#if defined (ARITH_FOR_COMMAND) +static ARITH_FOR_COM * +copy_arith_for_command (com) + ARITH_FOR_COM *com; +{ + ARITH_FOR_COM *new_arith_for; + + new_arith_for = (ARITH_FOR_COM *)xmalloc (sizeof (ARITH_FOR_COM)); + new_arith_for->flags = com->flags; + new_arith_for->line = com->line; + new_arith_for->init = copy_word_list (com->init); + new_arith_for->test = copy_word_list (com->test); + new_arith_for->step = copy_word_list (com->step); + new_arith_for->action = copy_command (com->action); + return (new_arith_for); +} +#endif /* ARITH_FOR_COMMAND */ + +static GROUP_COM * +copy_group_command (com) + GROUP_COM *com; +{ + GROUP_COM *new_group; + + new_group = (GROUP_COM *)xmalloc (sizeof (GROUP_COM)); + new_group->command = copy_command (com->command); + return (new_group); +} + +static SUBSHELL_COM * +copy_subshell_command (com) + SUBSHELL_COM *com; +{ + SUBSHELL_COM *new_subshell; + + new_subshell = (SUBSHELL_COM *)xmalloc (sizeof (SUBSHELL_COM)); + new_subshell->command = copy_command (com->command); + new_subshell->flags = com->flags; + new_subshell->line = com->line; + return (new_subshell); +} + +static COPROC_COM * +copy_coproc_command (com) + COPROC_COM *com; +{ + COPROC_COM *new_coproc; + + new_coproc = (COPROC_COM *)xmalloc (sizeof (COPROC_COM)); + new_coproc->name = savestring (com->name); + new_coproc->command = copy_command (com->command); + new_coproc->flags = com->flags; + return (new_coproc); +} + +static CASE_COM * +copy_case_command (com) + CASE_COM *com; +{ + CASE_COM *new_case; + + new_case = (CASE_COM *)xmalloc (sizeof (CASE_COM)); + new_case->flags = com->flags; + new_case->line = com->line; + new_case->word = copy_word (com->word); + new_case->clauses = copy_case_clauses (com->clauses); + return (new_case); +} + +static WHILE_COM * +copy_while_command (com) + WHILE_COM *com; +{ + WHILE_COM *new_while; + + new_while = (WHILE_COM *)xmalloc (sizeof (WHILE_COM)); + new_while->flags = com->flags; + new_while->test = copy_command (com->test); + new_while->action = copy_command (com->action); + return (new_while); +} + +static IF_COM * +copy_if_command (com) + IF_COM *com; +{ + IF_COM *new_if; + + new_if = (IF_COM *)xmalloc (sizeof (IF_COM)); + new_if->flags = com->flags; + new_if->test = copy_command (com->test); + new_if->true_case = copy_command (com->true_case); + new_if->false_case = com->false_case ? copy_command (com->false_case) : com->false_case; + return (new_if); +} + +#if defined (DPAREN_ARITHMETIC) +static ARITH_COM * +copy_arith_command (com) + ARITH_COM *com; +{ + ARITH_COM *new_arith; + + new_arith = (ARITH_COM *)xmalloc (sizeof (ARITH_COM)); + new_arith->flags = com->flags; + new_arith->exp = copy_word_list (com->exp); + new_arith->line = com->line; + + return (new_arith); +} +#endif + +#if defined (COND_COMMAND) +static COND_COM * +copy_cond_command (com) + COND_COM *com; +{ + COND_COM *new_cond; + + new_cond = (COND_COM *)xmalloc (sizeof (COND_COM)); + new_cond->flags = com->flags; + new_cond->line = com->line; + new_cond->type = com->type; + new_cond->op = com->op ? copy_word (com->op) : com->op; + new_cond->left = com->left ? copy_cond_command (com->left) : (COND_COM *)NULL; + new_cond->right = com->right ? copy_cond_command (com->right) : (COND_COM *)NULL; + + return (new_cond); +} +#endif + +static SIMPLE_COM * +copy_simple_command (com) + SIMPLE_COM *com; +{ + SIMPLE_COM *new_simple; + + new_simple = (SIMPLE_COM *)xmalloc (sizeof (SIMPLE_COM)); + new_simple->flags = com->flags; + new_simple->words = copy_word_list (com->words); + new_simple->redirects = com->redirects ? copy_redirects (com->redirects) : (REDIRECT *)NULL; + new_simple->line = com->line; + return (new_simple); +} + +FUNCTION_DEF * +copy_function_def_contents (old, new_def) + FUNCTION_DEF *old, *new_def; +{ + new_def->name = copy_word (old->name); + new_def->command = old->command ? copy_command (old->command) : old->command; + new_def->flags = old->flags; + new_def->line = old->line; + new_def->source_file = old->source_file ? savestring (old->source_file) : old->source_file; + return (new_def); +} + +FUNCTION_DEF * +copy_function_def (com) + FUNCTION_DEF *com; +{ + FUNCTION_DEF *new_def; + + new_def = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF)); + new_def = copy_function_def_contents (com, new_def); + return (new_def); +} + +/* Copy the command structure in COMMAND. Return a pointer to the + copy. Don't you forget to dispose_command () on this pointer + later! */ +COMMAND * +copy_command (command) + COMMAND *command; +{ + COMMAND *new_command; + + if (command == NULL) + return (command); + + new_command = (COMMAND *)xmalloc (sizeof (COMMAND)); + FASTCOPY ((char *)command, (char *)new_command, sizeof (COMMAND)); + new_command->flags = command->flags; + new_command->line = command->line; + + if (command->redirects) + new_command->redirects = copy_redirects (command->redirects); + + switch (command->type) + { + case cm_for: + new_command->value.For = copy_for_command (command->value.For); + break; + +#if defined (ARITH_FOR_COMMAND) + case cm_arith_for: + new_command->value.ArithFor = copy_arith_for_command (command->value.ArithFor); + break; +#endif + +#if defined (SELECT_COMMAND) + case cm_select: + new_command->value.Select = + (SELECT_COM *)copy_for_command ((FOR_COM *)command->value.Select); + break; +#endif + + case cm_group: + new_command->value.Group = copy_group_command (command->value.Group); + break; + + case cm_subshell: + new_command->value.Subshell = copy_subshell_command (command->value.Subshell); + break; + + case cm_coproc: + new_command->value.Coproc = copy_coproc_command (command->value.Coproc); + break; + + case cm_case: + new_command->value.Case = copy_case_command (command->value.Case); + break; + + case cm_until: + case cm_while: + new_command->value.While = copy_while_command (command->value.While); + break; + + case cm_if: + new_command->value.If = copy_if_command (command->value.If); + break; + +#if defined (DPAREN_ARITHMETIC) + case cm_arith: + new_command->value.Arith = copy_arith_command (command->value.Arith); + break; +#endif + +#if defined (COND_COMMAND) + case cm_cond: + new_command->value.Cond = copy_cond_command (command->value.Cond); + break; +#endif + + case cm_simple: + new_command->value.Simple = copy_simple_command (command->value.Simple); + break; + + case cm_connection: + { + CONNECTION *new_connection; + + new_connection = (CONNECTION *)xmalloc (sizeof (CONNECTION)); + new_connection->connector = command->value.Connection->connector; + new_connection->first = copy_command (command->value.Connection->first); + new_connection->second = copy_command (command->value.Connection->second); + new_command->value.Connection = new_connection; + break; + } + + case cm_function_def: + new_command->value.Function_def = copy_function_def (command->value.Function_def); + break; + } + return (new_command); +} diff --git a/bash-5.1/cross-build/cygwin32.cache b/bash-5.1/cross-build/cygwin32.cache new file mode 100644 index 0000000000000000000000000000000000000000..36948dae8cc252c56f97f862fee2629cd80e8d90 --- /dev/null +++ b/bash-5.1/cross-build/cygwin32.cache @@ -0,0 +1,251 @@ +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overriden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +ac_cv_build=${ac_cv_build='i686-pc-cygwin'} +ac_cv_build_alias=${ac_cv_build_alias='i686-pc-cygwin'} +ac_cv_c_bigendian=${ac_cv_c_bigendian='no'} +ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'} +ac_cv_c_compiler_gnu=${ac_cv_c_compiler_gnu='yes'} +ac_cv_c_const=${ac_cv_c_const='yes'} +ac_cv_c_inline=${ac_cv_c_inline='inline'} +ac_cv_c_long_double=${ac_cv_c_long_double='yes'} +ac_cv_c_stringize=${ac_cv_c_stringize='yes'} +ac_cv_decl_sys_siglist=${ac_cv_decl_sys_siglist='no'} +ac_cv_exeext=${ac_cv_exeext='.exe'} +ac_cv_func___setostype=${ac_cv_func___setostype='no'} +ac_cv_func__doprnt=${ac_cv_func__doprnt='no'} +ac_cv_func_alloca_works=${ac_cv_func_alloca_works='yes'} +ac_cv_func_asprintf=${ac_cv_func_asprintf='no'} +ac_cv_func_bcopy=${ac_cv_func_bcopy='yes'} +ac_cv_func_bindtextdomain=${ac_cv_func_bindtextdomain='no'} +ac_cv_func_bzero=${ac_cv_func_bzero='yes'} +ac_cv_func_confstr=${ac_cv_func_confstr='no'} +ac_cv_func_dlclose=${ac_cv_func_dlclose='yes'} +ac_cv_func_dlopen=${ac_cv_func_dlopen='yes'} +ac_cv_func_dlsym=${ac_cv_func_dlsym='yes'} +ac_cv_func_dup2=${ac_cv_func_dup2='yes'} +ac_cv_func_fnmatch=${ac_cv_func_fnmatch='no'} +ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo='no'} +ac_cv_func_getcwd=${ac_cv_func_getcwd='yes'} +ac_cv_func_getdtablesize=${ac_cv_func_getdtablesize='yes'} +ac_cv_func_getgroups=${ac_cv_func_getgroups='yes'} +ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname='yes'} +ac_cv_func_gethostname=${ac_cv_func_gethostname='yes'} +ac_cv_func_getpagesize=${ac_cv_func_getpagesize='yes'} +ac_cv_func_getpeername=${ac_cv_func_getpeername='yes'} +ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'} +ac_cv_func_getrlimit=${ac_cv_func_getrlimit='yes'} +ac_cv_func_getrusage=${ac_cv_func_getrusage='yes'} +ac_cv_func_getservbyname=${ac_cv_func_getservbyname='yes'} +ac_cv_func_gettext=${ac_cv_func_gettext='no'} +ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday='yes'} +ac_cv_func_inet_aton=${ac_cv_func_inet_aton='yes'} +ac_cv_func_isascii=${ac_cv_func_isascii='yes'} +ac_cv_func_isblank=${ac_cv_func_isblank='no'} +ac_cv_func_isgraph=${ac_cv_func_isgraph='yes'} +ac_cv_func_isprint=${ac_cv_func_isprint='yes'} +ac_cv_func_isspace=${ac_cv_func_isspace='yes'} +ac_cv_func_isxdigit=${ac_cv_func_isxdigit='yes'} +ac_cv_func_killpg=${ac_cv_func_killpg='yes'} +ac_cv_func_lstat=${ac_cv_func_lstat='yes'} +ac_cv_func_memmove=${ac_cv_func_memmove='yes'} +ac_cv_func_mkfifo=${ac_cv_func_mkfifo='yes'} +ac_cv_func_pathconf=${ac_cv_func_pathconf='yes'} +ac_cv_func_putenv=${ac_cv_func_putenv='yes'} +ac_cv_func_readlink=${ac_cv_func_readlink='yes'} +ac_cv_func_rename=${ac_cv_func_rename='yes'} +ac_cv_func_sbrk=${ac_cv_func_sbrk='yes'} +ac_cv_func_select=${ac_cv_func_select='yes'} +ac_cv_func_setdtablesize=${ac_cv_func_setdtablesize='yes'} +ac_cv_func_setenv=${ac_cv_func_setenv='yes'} +ac_cv_func_setlinebuf=${ac_cv_func_setlinebuf='no'} +ac_cv_func_setlocale=${ac_cv_func_setlocale='yes'} +ac_cv_func_setvbuf=${ac_cv_func_setvbuf='yes'} +ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'} +ac_cv_func_siginterrupt=${ac_cv_func_siginterrupt='no'} +ac_cv_func_snprintf=${ac_cv_func_snprintf='yes'} +ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp='yes'} +ac_cv_func_strchr=${ac_cv_func_strchr='yes'} +ac_cv_func_strcoll_works=${ac_cv_func_strcoll_works='yes'} +ac_cv_func_strerror=${ac_cv_func_strerror='yes'} +ac_cv_func_strpbrk=${ac_cv_func_strpbrk='yes'} +ac_cv_func_strtod=${ac_cv_func_strtod='yes'} +ac_cv_func_strtoimax=${ac_cv_func_strtoimax='no'} +ac_cv_func_strtol=${ac_cv_func_strtol='yes'} +ac_cv_func_strtoll=${ac_cv_func_strtoll='no'} +ac_cv_func_strtoul=${ac_cv_func_strtoul='yes'} +ac_cv_func_strtoull=${ac_cv_func_strtoull='no'} +ac_cv_func_strtoumax=${ac_cv_func_strtoumax='no'} +ac_cv_func_sysconf=${ac_cv_func_sysconf='yes'} +ac_cv_func_tcgetattr=${ac_cv_func_tcgetattr='yes'} +ac_cv_func_tcgetpgrp=${ac_cv_func_tcgetpgrp='yes'} +ac_cv_func_textdomain=${ac_cv_func_textdomain='no'} +ac_cv_func_times=${ac_cv_func_times='yes'} +ac_cv_func_ttyname=${ac_cv_func_ttyname='yes'} +ac_cv_func_tzset=${ac_cv_func_tzset='yes'} +ac_cv_func_ulimit=${ac_cv_func_ulimit='no'} +ac_cv_func_uname=${ac_cv_func_uname='yes'} +ac_cv_func_vasprintf=${ac_cv_func_vasprintf='no'} +ac_cv_func_vprintf=${ac_cv_func_vprintf='yes'} +ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf='yes'} +ac_cv_func_wait3=${ac_cv_func_wait3='yes'} +ac_cv_func_waitpid=${ac_cv_func_waitpid='yes'} +ac_cv_have_decl_confstr=${ac_cv_have_decl_confstr='no'} +ac_cv_have_decl_printf=${ac_cv_have_decl_printf='yes'} +ac_cv_have_decl_sbrk=${ac_cv_have_decl_sbrk='yes'} +ac_cv_have_decl_strsignal=${ac_cv_have_decl_strsignal='yes'} +ac_cv_have_decl_strtold=${ac_cv_have_decl_strtold='no'} +ac_cv_header_arpa_inet_h=${ac_cv_header_arpa_inet_h='yes'} +ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h='yes'} +ac_cv_header_dlfcn_h=${ac_cv_header_dlfcn_h='yes'} +ac_cv_header_grp_h=${ac_cv_header_grp_h='yes'} +ac_cv_header_inttypes_h=${ac_cv_header_inttypes_h='no'} +ac_cv_header_libintl_h=${ac_cv_header_libintl_h='yes'} +ac_cv_header_limits_h=${ac_cv_header_limits_h='yes'} +ac_cv_header_locale_h=${ac_cv_header_locale_h='yes'} +ac_cv_header_memory_h=${ac_cv_header_memory_h='yes'} +ac_cv_header_minix_config_h=${ac_cv_header_minix_config_h='no'} +ac_cv_header_netdb_h=${ac_cv_header_netdb_h='yes'} +ac_cv_header_netinet_in_h=${ac_cv_header_netinet_in_h='yes'} +ac_cv_header_stat_broken=${ac_cv_header_stat_broken='no'} +ac_cv_header_stdarg_h=${ac_cv_header_stdarg_h='yes'} +ac_cv_header_stdc=${ac_cv_header_stdc='yes'} +ac_cv_header_stddef_h=${ac_cv_header_stddef_h='yes'} +ac_cv_header_stdint_h=${ac_cv_header_stdint_h='no'} +ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h='yes'} +ac_cv_header_string_h=${ac_cv_header_string_h='yes'} +ac_cv_header_strings_h=${ac_cv_header_strings_h='yes'} +ac_cv_header_sys_file_h=${ac_cv_header_sys_file_h='yes'} +ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h='yes'} +ac_cv_header_sys_pte_h=${ac_cv_header_sys_pte_h='no'} +ac_cv_header_sys_ptem_h=${ac_cv_header_sys_ptem_h='no'} +ac_cv_header_sys_resource_h=${ac_cv_header_sys_resource_h='yes'} +ac_cv_header_sys_select_h=${ac_cv_header_sys_select_h='yes'} +ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h='yes'} +ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h='yes'} +ac_cv_header_sys_stream_h=${ac_cv_header_sys_stream_h='no'} +ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h='yes'} +ac_cv_header_sys_times_h=${ac_cv_header_sys_times_h='yes'} +ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h='yes'} +ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h='yes'} +ac_cv_header_termcap_h=${ac_cv_header_termcap_h='yes'} +ac_cv_header_termio_h=${ac_cv_header_termio_h='yes'} +ac_cv_header_termios_h=${ac_cv_header_termios_h='yes'} +ac_cv_header_time=${ac_cv_header_time='yes'} +ac_cv_header_unistd_h=${ac_cv_header_unistd_h='yes'} +ac_cv_header_varargs_h=${ac_cv_header_varargs_h='yes'} +ac_cv_host=${ac_cv_host='i686-pc-cygwin'} +ac_cv_host_alias=${ac_cv_host_alias='i686-pc-cygwin'} +ac_cv_lib_dir_opendir=${ac_cv_lib_dir_opendir='no'} +ac_cv_lib_dl_dlopen=${ac_cv_lib_dl_dlopen='no'} +ac_cv_lib_intl_bindtextdomain=${ac_cv_lib_intl_bindtextdomain='yes'} +ac_cv_lib_termcap_tgetent=${ac_cv_lib_termcap_tgetent='yes'} +ac_cv_member_struct_stat_st_blocks=${ac_cv_member_struct_stat_st_blocks='yes'} +ac_cv_member_struct_termio_c_line=${ac_cv_member_struct_termio_c_line='yes'} +ac_cv_member_struct_termios_c_line=${ac_cv_member_struct_termios_c_line='yes'} +ac_cv_objext=${ac_cv_objext='o'} +ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} +ac_cv_prog_AR=${ac_cv_prog_AR='ar'} +ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'} +ac_cv_prog_YACC=${ac_cv_prog_YACC='bison -y'} +ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC='gcc'} +ac_cv_prog_ac_ct_RANLIB=${ac_cv_prog_ac_ct_RANLIB='ranlib'} +ac_cv_prog_cc_g=${ac_cv_prog_cc_g='yes'} +ac_cv_prog_cc_stdc=${ac_cv_prog_cc_stdc=''} +ac_cv_prog_gcc_traditional=${ac_cv_prog_gcc_traditional='no'} +ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set='yes'} +ac_cv_sizeof_char=${ac_cv_sizeof_char='1'} +ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'} +ac_cv_sizeof_double=${ac_cv_sizeof_double='8'} +ac_cv_sizeof_int=${ac_cv_sizeof_int='4'} +ac_cv_sizeof_long=${ac_cv_sizeof_long='4'} +ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long='8'} +ac_cv_sizeof_short=${ac_cv_sizeof_short='2'} +ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits='no'} +ac_cv_sys_interpreter=${ac_cv_sys_interpreter='yes'} +ac_cv_sys_large_files=${ac_cv_sys_large_files='no'} +ac_cv_sys_largefile_CC=${ac_cv_sys_largefile_CC='no'} +ac_cv_sys_posix_termios=${ac_cv_sys_posix_termios='yes'} +ac_cv_sys_tiocgwinsz_in_termios_h=${ac_cv_sys_tiocgwinsz_in_termios_h='yes'} +ac_cv_type_bits16_t=${ac_cv_type_bits16_t='no'} +ac_cv_type_bits32_t=${ac_cv_type_bits32_t='no'} +ac_cv_type_bits64_t=${ac_cv_type_bits64_t='no'} +ac_cv_type_char=${ac_cv_type_char='yes'} +ac_cv_type_char_p=${ac_cv_type_char_p='yes'} +ac_cv_type_double=${ac_cv_type_double='yes'} +ac_cv_type_getgroups=${ac_cv_type_getgroups='gid_t'} +ac_cv_type_int=${ac_cv_type_int='yes'} +ac_cv_type_long=${ac_cv_type_long='yes'} +ac_cv_type_long_long=${ac_cv_type_long_long='yes'} +ac_cv_type_mode_t=${ac_cv_type_mode_t='yes'} +ac_cv_type_off_t=${ac_cv_type_off_t='yes'} +ac_cv_type_pid_t=${ac_cv_type_pid_t='yes'} +ac_cv_type_ptrdiff_t=${ac_cv_type_ptrdiff_t='yes'} +ac_cv_type_short=${ac_cv_type_short='yes'} +ac_cv_type_signal=${ac_cv_type_signal='void'} +ac_cv_type_size_t=${ac_cv_type_size_t='yes'} +ac_cv_type_ssize_t=${ac_cv_type_ssize_t='yes'} +ac_cv_type_time_t=${ac_cv_type_time_t='yes'} +ac_cv_type_u_bits16_t=${ac_cv_type_u_bits16_t='no'} +ac_cv_type_u_bits32_t=${ac_cv_type_u_bits32_t='no'} +ac_cv_type_u_int=${ac_cv_type_u_int='yes'} +ac_cv_type_u_long=${ac_cv_type_u_long='yes'} +ac_cv_type_uid_t=${ac_cv_type_uid_t='yes'} +ac_cv_working_alloca_h=${ac_cv_working_alloca_h='no'} + +bash_cv_decl_strtoimax=${bash_cv_decl_strtoimax='no'} +bash_cv_decl_strtol=${bash_cv_decl_strtol='yes'} +bash_cv_decl_strtoll=${bash_cv_decl_strtoll='no'} +bash_cv_decl_strtoul=${bash_cv_decl_strtoul='yes'} +bash_cv_decl_strtoull=${bash_cv_decl_strtoull='no'} +bash_cv_decl_strtoumax=${bash_cv_decl_strtoumax='no'} +bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'} +bash_cv_dev_fd=${bash_cv_dev_fd='absent'} +bash_cv_dev_stdin=${bash_cv_dev_stdin='absent'} +bash_cv_dirent_has_d_fileno=${bash_cv_dirent_has_d_fileno='no'} +bash_cv_dirent_has_dino=${bash_cv_dirent_has_dino='yes'} +bash_cv_dup2_broken=${bash_cv_dup2_broken='no'} +bash_cv_fionread_in_ioctl=${bash_cv_fionread_in_ioctl='no'} +bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='present'} +bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'} +bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'} +bash_cv_getpw_declared=${bash_cv_getpw_declared='yes'} +bash_cv_have_strsignal=${bash_cv_have_strsignal='yes'} +bash_cv_job_control_missing=${bash_cv_job_control_missing='present'} +bash_cv_mail_dir=${bash_cv_mail_dir='unknown'} +bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'} +bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'} +bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'} +bash_cv_printf_a_format=${bash_cv_printf_a_format='no'} +bash_cv_signal_vintage=${bash_cv_signal_vintage='posix'} +bash_cv_speed_t_in_sys_types=${bash_cv_speed_t_in_sys_types='no'} +bash_cv_struct_timeval=${bash_cv_struct_timeval='yes'} +bash_cv_struct_winsize_header=${bash_cv_struct_winsize_header='termios_h'} +bash_cv_sys_errlist=${bash_cv_sys_errlist='no'} +bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='present'} +bash_cv_sys_siglist=${bash_cv_sys_siglist='no'} +bash_cv_termcap_lib=${bash_cv_termcap_lib='libtermcap'} +bash_cv_tiocstat_in_ioctl=${bash_cv_tiocstat_in_ioctl='no'} +bash_cv_type_clock_t=${bash_cv_type_clock_t='yes'} +bash_cv_type_intmax_t=${bash_cv_type_intmax_t='no'} +bash_cv_type_long_long=${bash_cv_type_long_long='long long'} +bash_cv_type_quad_t=${bash_cv_type_quad_t='no'} +bash_cv_type_rlimit=${bash_cv_type_rlimit='rlim_t'} +bash_cv_type_sigset_t=${bash_cv_type_sigset_t='yes'} +bash_cv_type_socklen_t=${bash_cv_type_socklen_t='no'} +bash_cv_type_uintmax_t=${bash_cv_type_uintmax_t='no'} +bash_cv_type_unsigned_long_long=${bash_cv_type_unsigned_long_long='unsigned long long'} +bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'} +bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'} +bash_cv_unusable_rtsigs=${bash_cv_unusable_rtsigs='no'} +bash_cv_void_sighandler=${bash_cv_void_sighandler='yes'} diff --git a/bash-5.1/cross-build/opennt.cache b/bash-5.1/cross-build/opennt.cache new file mode 100644 index 0000000000000000000000000000000000000000..ca5e7cd709f4f3527a3e743858cf1d40bcd4a83b --- /dev/null +++ b/bash-5.1/cross-build/opennt.cache @@ -0,0 +1,169 @@ +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +ac_cv_c_bigendian=${ac_cv_c_bigendian=no} +ac_cv_decl_sys_siglist=${ac_cv_decl_sys_siglist=no} +ac_cv_func___setostype=${ac_cv_func___setostype=no} +ac_cv_func_alloca_works=${ac_cv_func_alloca_works=yes} +ac_cv_func_bcopy=${ac_cv_func_bcopy=yes} +ac_cv_func_bindtextdomain=${ac_cv_func_bindtextdomain=no} +ac_cv_func_bzero=${ac_cv_func_bzero=yes} +ac_cv_func_confstr=${ac_cv_func_confstr=yes} +ac_cv_func_dlclose=${ac_cv_func_dlclose=no} +ac_cv_func_dlopen=${ac_cv_func_dlopen=no} +ac_cv_func_dlsym=${ac_cv_func_dlsym=no} +ac_cv_func_dup2=${ac_cv_func_dup2=yes} +ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} +ac_cv_func_getdtablesize=${ac_cv_func_getdtablesize=no} +ac_cv_func_getgroups=${ac_cv_func_getgroups=yes} +ac_cv_func_gethostname=${ac_cv_func_gethostname=yes} +ac_cv_func_getpagesize=${ac_cv_func_getpagesize=yes} +ac_cv_func_getpeername=${ac_cv_func_getpeername=yes} +ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void=yes} +ac_cv_func_getrlimit=${ac_cv_func_getrlimit=no} +ac_cv_func_getrusage=${ac_cv_func_getrusage=no} +ac_cv_func_gettext=${ac_cv_func_gettext=no} +ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday=yes} +ac_cv_func_killpg=${ac_cv_func_killpg=yes} +ac_cv_func_lstat=${ac_cv_func_lstat=no} +ac_cv_func_memmove=${ac_cv_func_memmove=yes} +ac_cv_func_mkfifo=${ac_cv_func_mkfifo=yes} +ac_cv_func_putenv=${ac_cv_func_putenv=yes} +ac_cv_func_rename=${ac_cv_func_rename=yes} +ac_cv_func_sbrk=${ac_cv_func_sbrk=no} +ac_cv_func_select=${ac_cv_func_select=yes} +ac_cv_func_setdtablesize=${ac_cv_func_setdtablesize=no} +ac_cv_func_setenv=${ac_cv_func_setenv=yes} +ac_cv_func_setlinebuf=${ac_cv_func_setlinebuf=yes} +ac_cv_func_setlocale=${ac_cv_func_setlocale=yes} +ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no} +ac_cv_func_siginterrupt=${ac_cv_func_siginterrupt=no} +ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} +ac_cv_func_strchr=${ac_cv_func_strchr=yes} +ac_cv_func_strcoll_works=${ac_cv_func_strcoll_works=yes} +ac_cv_func_strerror=${ac_cv_func_strerror=yes} +ac_cv_func_strtod=${ac_cv_func_strtod=yes} +ac_cv_func_strtol=${ac_cv_func_strtol=yes} +ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} +ac_cv_func_sysconf=${ac_cv_func_sysconf=yes} +ac_cv_func_tcgetattr=${ac_cv_func_tcgetattr=yes} +ac_cv_func_tcgetpgrp=${ac_cv_func_tcgetpgrp=yes} +ac_cv_func_textdomain=${ac_cv_func_textdomain=no} +ac_cv_func_times=${ac_cv_func_times=yes} +ac_cv_func_tzset=${ac_cv_func_tzset=yes} +ac_cv_func_ulimit=${ac_cv_func_ulimit=no} +ac_cv_func_uname=${ac_cv_func_uname=yes} +ac_cv_func_vprintf=${ac_cv_func_vprintf=yes} +ac_cv_func_wait3=${ac_cv_func_wait3=no} +ac_cv_func_wait3_rusage=${ac_cv_func_wait3_rusage=no} +ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} +ac_cv_header_alloca_h=${ac_cv_header_alloca_h=no} +ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h=yes} +ac_cv_header_dlfcn_h=${ac_cv_header_dlfcn_h=no} +ac_cv_header_libintl_h=${ac_cv_header_libintl_h=no} +ac_cv_header_limits_h=${ac_cv_header_limits_h=yes} +ac_cv_header_locale_h=${ac_cv_header_locale_h=yes} +ac_cv_header_memory_h=${ac_cv_header_memory_h=yes} +ac_cv_header_minix_config_h=${ac_cv_header_minix_config_h=no} +ac_cv_header_stat_broken=${ac_cv_header_stat_broken=no} +ac_cv_header_stdarg_h=${ac_cv_header_stdarg_h=yes} +ac_cv_header_stdc=${ac_cv_header_stdc=yes} +ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h=yes} +ac_cv_header_string_h=${ac_cv_header_string_h=yes} +ac_cv_header_sys_file_h=${ac_cv_header_sys_file_h=yes} +ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h=yes} +ac_cv_header_sys_pte_h=${ac_cv_header_sys_pte_h=no} +ac_cv_header_sys_ptem_h=${ac_cv_header_sys_ptem_h=no} +ac_cv_header_sys_resource_h=${ac_cv_header_sys_resource_h=no} +ac_cv_header_sys_select_h=${ac_cv_header_sys_select_h=no} +ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes} +ac_cv_header_sys_stream_h=${ac_cv_header_sys_stream_h=no} +ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes} +ac_cv_header_sys_times_h=${ac_cv_header_sys_times_h=yes} +ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes} +ac_cv_header_termcap_h=${ac_cv_header_termcap_h=no} +ac_cv_header_termio_h=${ac_cv_header_termio_h=no} +ac_cv_header_termios_h=${ac_cv_header_termios_h=yes} +ac_cv_header_time=${ac_cv_header_time=yes} +ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes} +ac_cv_header_varargs_h=${ac_cv_header_varargs_h=no} +ac_cv_lib_dir_opendir=${ac_cv_lib_dir_opendir=no} +ac_cv_lib_dl_dlopen=${ac_cv_lib_dl_dlopen=no} +ac_cv_lib_intl_bindtextdomain=${ac_cv_lib_intl_bindtextdomain=no} +ac_cv_lib_termcap_tgetent=${ac_cv_lib_termcap_tgetent=yes} +ac_cv_path_install=${ac_cv_path_install='$INTERIX_ROOT/bin/install -c'} +ac_cv_prog_AR=${ac_cv_prog_AR=ar} +ac_cv_prog_CC=${ac_cv_prog_CC=gcc} +ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} +ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=:} +ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no} +ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes} +ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes} +ac_cv_prog_gcc=${ac_cv_prog_gcc=yes} +ac_cv_prog_gcc_traditional=${ac_cv_prog_gcc_traditional=no} +ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} +ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4} +ac_cv_sizeof_double=${ac_cv_sizeof_double=8} +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} +ac_cv_sizeof_long=${ac_cv_sizeof_long=4} +ac_cv_sys_interpreter=${ac_cv_sys_interpreter=yes} +ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=no} +ac_cv_type_getgroups=${ac_cv_type_getgroups=gid_t} +ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} +ac_cv_type_off_t=${ac_cv_type_off_t=yes} +ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} +ac_cv_type_signal=${ac_cv_type_signal=void} +ac_cv_type_size_t=${ac_cv_type_size_t=yes} +ac_cv_type_time_t=${ac_cv_type_time_t=yes} +ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} +bash_cv_can_redecl_getpw=${bash_cv_can_redecl_getpw=yes} +bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist=no} +bash_cv_dev_fd=${bash_cv_dev_fd=absent} +bash_cv_dirent_has_d_fileno=${bash_cv_dirent_has_d_fileno=no} +bash_cv_dirent_has_dino=${bash_cv_dirent_has_dino=yes} +bash_cv_dup2_broken=${bash_cv_dup2_broken=no} +bash_cv_fionread_in_ioctl=${bash_cv_fionread_in_ioctl=yes} +bash_cv_func_lstat=${bash_cv_func_lstat=no} +bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present} +bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken=no} +bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen=no} +bash_cv_getenv_redef=${bash_cv_getenv_redef=yes} +bash_cv_have_strsignal=${bash_cv_have_strsignal=yes} +bash_cv_job_control_missing=${bash_cv_job_control_missing=present} +bash_cv_mail_dir=${bash_cv_mail_dir=/usr/spool/mail} +bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers=no} +bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust=no} +bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe=no} +bash_cv_printf_declared=${bash_cv_printf_declared=yes} +bash_cv_sbrk_declared=${bash_cv_sbrk_declared=no} +bash_cv_signal_vintage=${bash_cv_signal_vintage=posix} +bash_cv_speed_t_in_sys_types=${bash_cv_speed_t_in_sys_types=no} +bash_cv_struct_timeval=${bash_cv_struct_timeval=yes} +bash_cv_struct_winsize_header=${bash_cv_struct_winsize_header=ioctl_h} +bash_cv_struct_winsize_in_ioctl=${bash_cv_struct_winsize_in_ioctl=yes} +bash_cv_sys_errlist=${bash_cv_sys_errlist=yes} +bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes=present} +bash_cv_sys_siglist=${bash_cv_sys_siglist=yes} +bash_cv_termcap_lib=${bash_cv_termcap_lib=libtermcap} +bash_cv_termio_ldisc=${bash_cv_termio_ldisc=no} +bash_cv_termios_ldisc=${bash_cv_termios_ldisc=no} +bash_cv_tiocgwinsz_in_ioctl=${bash_cv_tiocgwinsz_in_ioctl=yes} +bash_cv_tiocstat_in_ioctl=${bash_cv_tiocstat_in_ioctl=no} +bash_cv_type_clock_t=${bash_cv_type_clock_t=yes} +bash_cv_type_quad_t=${bash_cv_type_quad_t=yes} +bash_cv_type_rlimit=${bash_cv_type_rlimit=long} +bash_cv_type_sigset_t=${bash_cv_type_sigset_t=yes} +bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds=no} +bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist=no} +bash_cv_void_sighandler=${bash_cv_void_sighandler=yes} diff --git a/bash-5.1/cross-build/qnx.cache b/bash-5.1/cross-build/qnx.cache new file mode 100644 index 0000000000000000000000000000000000000000..3f630fd85ab3821a6a2bc199f982708c7350bc25 --- /dev/null +++ b/bash-5.1/cross-build/qnx.cache @@ -0,0 +1,66 @@ +bash_cv_decl_strtoimax=${bash_cv_decl_strtoimax=yes} +bash_cv_decl_strtol=${bash_cv_decl_strtol=yes} +bash_cv_decl_strtoll=${bash_cv_decl_strtoll=yes} +bash_cv_decl_strtoul=${bash_cv_decl_strtoul=yes} +bash_cv_decl_strtoull=${bash_cv_decl_strtoull=yes} +bash_cv_decl_strtoumax=${bash_cv_decl_strtoumax=yes} +bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist=no} +bash_cv_dev_fd=${bash_cv_dev_fd=absent} +bash_cv_dev_stdin=${bash_cv_dev_stdin=present} +bash_cv_dirent_has_d_fileno=${bash_cv_dirent_has_d_fileno=no} +bash_cv_dirent_has_d_namlen=${bash_cv_dirent_has_d_namlen=no} +bash_cv_dirent_has_dino=${bash_cv_dirent_has_dino=yes} +bash_cv_dup2_broken=${bash_cv_dup2_broken=no} +bash_cv_fionread_in_ioctl=${bash_cv_fionread_in_ioctl=yes} +bash_cv_func_ctype_nonascii=${bash_cv_func_ctype_nonascii=no} +bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present} +bash_cv_func_snprintf=${bash_cv_func_snprintf=yes} +bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken=no} +bash_cv_func_vsnprintf=${bash_cv_func_vsnprintf=yes} +bash_cv_getcwd_malloc=${bash_cv_getcwd_malloc=yes} +bash_cv_getenv_redef=${bash_cv_getenv_redef=yes} +bash_cv_getpw_declared=${bash_cv_getpw_declared=yes} +bash_cv_have_gethostbyname=${bash_cv_have_gethostbyname=no} +bash_cv_have_socklib=${bash_cv_have_socklib=no} +bash_cv_have_strsignal=${bash_cv_have_strsignal=yes} +bash_cv_job_control_missing=${bash_cv_job_control_missing=present} +bash_cv_langinfo_codeset=${bash_cv_langinfo_codeset=no} +bash_cv_mail_dir=${bash_cv_mail_dir=unknown} +bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers=no} +bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust=no} +bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe=no} +bash_cv_printf_a_format=${bash_cv_printf_a_format=yes} +bash_cv_signal_vintage=${bash_cv_signal_vintage=posix} +bash_cv_speed_t_in_sys_types=${bash_cv_speed_t_in_sys_types=no} +bash_cv_std_putenv=${bash_cv_std_putenv=yes} +bash_cv_std_unsetenv=${bash_cv_std_unsetenv=yes} +bash_cv_strtold_broken=${bash_cv_strtold_broken=no} +bash_cv_struct_timeval=${bash_cv_struct_timeval=yes} +bash_cv_struct_timezone=${bash_cv_struct_timezone=yes} +bash_cv_struct_winsize_header=${bash_cv_struct_winsize_header=ioctl_h} +bash_cv_sys_errlist=${bash_cv_sys_errlist=no} +bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes=present} +bash_cv_sys_siglist=${bash_cv_sys_siglist=yes} +bash_cv_sys_struct_timespec_in_time_h=${bash_cv_sys_struct_timespec_in_time_h=yes} +bash_cv_termcap_lib=${bash_cv_termcap_lib=libtermcap} +bash_cv_tiocstat_in_ioctl=${bash_cv_tiocstat_in_ioctl=no} +bash_cv_type_clock_t=${bash_cv_type_clock_t=yes} +bash_cv_type_intmax_t=${bash_cv_type_intmax_t=yes} +bash_cv_type_long_long=${bash_cv_type_long_long='long long'} +bash_cv_type_quad_t=${bash_cv_type_quad_t=no} +bash_cv_type_rlimit=${bash_cv_type_rlimit=rlim_t} +bash_cv_type_sig_atomic_t=${bash_cv_type_sig_atomic_t=yes} +bash_cv_type_sigset_t=${bash_cv_type_sigset_t=yes} +bash_cv_type_socklen_t=${bash_cv_type_socklen_t=yes} +bash_cv_type_uintmax_t=${bash_cv_type_uintmax_t=yes} +bash_cv_type_unsigned_long_long=${bash_cv_type_unsigned_long_long='unsigned long long'} +bash_cv_type_wchar_t=${bash_cv_type_wchar_t=yes} +bash_cv_type_wctype_t=${bash_cv_type_wctype_t=yes} +bash_cv_type_wint_t=${bash_cv_type_wint_t=yes} +bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds=no} +bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist=no} +bash_cv_unusable_rtsigs=${bash_cv_unusable_rtsigs=no} +bash_cv_void_sighandler=${bash_cv_void_sighandler=yes} +bash_cv_wcontinued_broken=${bash_cv_wcontinued_broken=no} +bash_cv_wcwidth_broken=${bash_cv_wcwidth_broken=no} +bash_cv_wexitstatus_offset=${bash_cv_wexitstatus_offset=8} diff --git a/bash-5.1/cross-build/x86-beos.cache b/bash-5.1/cross-build/x86-beos.cache new file mode 100644 index 0000000000000000000000000000000000000000..351aa219ab7756a55b6ca664713702863d21e22f --- /dev/null +++ b/bash-5.1/cross-build/x86-beos.cache @@ -0,0 +1,45 @@ +# This file is a shell script that caches the results of configure +# tests for x86 BeOS so they don't need to be done when cross-compiling. + +# AC_FUNC_GETPGRP should also define GETPGRP_VOID +ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'} +# AC_FUNC_SETVBUF_REVERSED should not define anything else +ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'} +# on BeOS, system calls do not restart +ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'} +bash_cv_sys_restartable_syscalls=${bash_cv_sys_restartable_syscalls='no'} + +ac_cv_func_tcgetattr=${ac_cv_func_tcgetattr='yes'} + +# x86 BeOS is little endian +ac_cv_c_bigendian=${ac_cv_c_bigendian='no'} +ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'} +ac_cv_sizeof_int=${ac_cv_sizeof_int='4'} +ac_cv_sizeof_long=${ac_cv_sizeof_long='4'} +ac_cv_sizeof_double=${ac_cv_sizeof_double='8'} + +bash_cv_dev_fd=${bash_cv_dev_fd='absent'} +bash_cv_dup2_broken=${bash_cv_dup2_broken='no'} +bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'} +bash_cv_type_rlimit=${bash_cv_type_rlimit='long'} +bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'} +bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'} +bash_cv_sys_siglist=${bash_cv_sys_siglist='yes'} +bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'} +bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'} +bash_cv_printf_declared=${bash_cv_printf_declared='yes'} +bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'} +bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen='no'} +bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'} +bash_cv_job_control_missing=${bash_cv_job_control_missing='present'} +bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='present'} +bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='missing'} +bash_cv_mail_dir=${bash_cv_mail_dir='unknown'} +bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'} + +bash_cv_type_int32_t=${bash_cv_type_int32_t='int'} +bash_cv_type_u_int32_t=${bash_cv_type_u_int32_t='int'} + +ac_cv_type_bits64_t=${ac_cv_type_bits64_t='no'} + +# end of cross-build/x86-beos.cache diff --git a/bash-5.1/dispose_cmd.c b/bash-5.1/dispose_cmd.c new file mode 100644 index 0000000000000000000000000000000000000000..c624605b5080a5ee144fe2747d72b7a3f5a59139 --- /dev/null +++ b/bash-5.1/dispose_cmd.c @@ -0,0 +1,342 @@ +/* dispose_command.c -- dispose of a COMMAND structure. */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" +#include "shell.h" + +extern sh_obj_cache_t wdcache, wlcache; + +/* Dispose of the command structure passed. */ +void +dispose_command (command) + COMMAND *command; +{ + if (command == 0) + return; + + if (command->redirects) + dispose_redirects (command->redirects); + + switch (command->type) + { + case cm_for: +#if defined (SELECT_COMMAND) + case cm_select: +#endif + { + register FOR_COM *c; +#if defined (SELECT_COMMAND) + if (command->type == cm_select) + c = (FOR_COM *)command->value.Select; + else +#endif + c = command->value.For; + dispose_word (c->name); + dispose_words (c->map_list); + dispose_command (c->action); + free (c); + break; + } + +#if defined (ARITH_FOR_COMMAND) + case cm_arith_for: + { + register ARITH_FOR_COM *c; + + c = command->value.ArithFor; + dispose_words (c->init); + dispose_words (c->test); + dispose_words (c->step); + dispose_command (c->action); + free (c); + break; + } +#endif /* ARITH_FOR_COMMAND */ + + case cm_group: + { + dispose_command (command->value.Group->command); + free (command->value.Group); + break; + } + + case cm_subshell: + { + dispose_command (command->value.Subshell->command); + free (command->value.Subshell); + break; + } + + case cm_coproc: + { + free (command->value.Coproc->name); + dispose_command (command->value.Coproc->command); + free (command->value.Coproc); + break; + } + + case cm_case: + { + register CASE_COM *c; + PATTERN_LIST *t, *p; + + c = command->value.Case; + dispose_word (c->word); + + for (p = c->clauses; p; ) + { + dispose_words (p->patterns); + dispose_command (p->action); + t = p; + p = p->next; + free (t); + } + free (c); + break; + } + + case cm_until: + case cm_while: + { + register WHILE_COM *c; + + c = command->value.While; + dispose_command (c->test); + dispose_command (c->action); + free (c); + break; + } + + case cm_if: + { + register IF_COM *c; + + c = command->value.If; + dispose_command (c->test); + dispose_command (c->true_case); + dispose_command (c->false_case); + free (c); + break; + } + + case cm_simple: + { + register SIMPLE_COM *c; + + c = command->value.Simple; + dispose_words (c->words); + dispose_redirects (c->redirects); + free (c); + break; + } + + case cm_connection: + { + register CONNECTION *c; + + c = command->value.Connection; + dispose_command (c->first); + dispose_command (c->second); + free (c); + break; + } + +#if defined (DPAREN_ARITHMETIC) + case cm_arith: + { + register ARITH_COM *c; + + c = command->value.Arith; + dispose_words (c->exp); + free (c); + break; + } +#endif /* DPAREN_ARITHMETIC */ + +#if defined (COND_COMMAND) + case cm_cond: + { + register COND_COM *c; + + c = command->value.Cond; + dispose_cond_node (c); + break; + } +#endif /* COND_COMMAND */ + + case cm_function_def: + { + register FUNCTION_DEF *c; + + c = command->value.Function_def; + dispose_function_def (c); + break; + } + + default: + command_error ("dispose_command", CMDERR_BADTYPE, command->type, 0); + break; + } + free (command); +} + +#if defined (COND_COMMAND) +/* How to free a node in a conditional command. */ +void +dispose_cond_node (cond) + COND_COM *cond; +{ + if (cond) + { + if (cond->left) + dispose_cond_node (cond->left); + if (cond->right) + dispose_cond_node (cond->right); + if (cond->op) + dispose_word (cond->op); + free (cond); + } +} +#endif /* COND_COMMAND */ + +void +dispose_function_def_contents (c) + FUNCTION_DEF *c; +{ + dispose_word (c->name); + dispose_command (c->command); + FREE (c->source_file); +} + +void +dispose_function_def (c) + FUNCTION_DEF *c; +{ + dispose_function_def_contents (c); + free (c); +} + +/* How to free a WORD_DESC. */ +void +dispose_word (w) + WORD_DESC *w; +{ + FREE (w->word); + ocache_free (wdcache, WORD_DESC, w); +} + +/* Free a WORD_DESC, but not the word contained within. */ +void +dispose_word_desc (w) + WORD_DESC *w; +{ + w->word = 0; + ocache_free (wdcache, WORD_DESC, w); +} + +/* How to get rid of a linked list of words. A WORD_LIST. */ +void +dispose_words (list) + WORD_LIST *list; +{ + WORD_LIST *t; + + while (list) + { + t = list; + list = list->next; + dispose_word (t->word); +#if 0 + free (t); +#else + ocache_free (wlcache, WORD_LIST, t); +#endif + } +} + +#ifdef INCLUDE_UNUSED +/* How to dispose of an array of pointers to char. This is identical to + free_array in stringlib.c. */ +void +dispose_word_array (array) + char **array; +{ + register int count; + + if (array == 0) + return; + + for (count = 0; array[count]; count++) + free (array[count]); + + free (array); +} +#endif + +/* How to dispose of an list of redirections. A REDIRECT. */ +void +dispose_redirects (list) + REDIRECT *list; +{ + register REDIRECT *t; + + while (list) + { + t = list; + list = list->next; + + if (t->rflags & REDIR_VARASSIGN) + dispose_word (t->redirector.filename); + + switch (t->instruction) + { + case r_reading_until: + case r_deblank_reading_until: + free (t->here_doc_eof); + /*FALLTHROUGH*/ + case r_reading_string: + case r_output_direction: + case r_input_direction: + case r_inputa_direction: + case r_appending_to: + case r_err_and_out: + case r_append_err_and_out: + case r_input_output: + case r_output_force: + case r_duplicating_input_word: + case r_duplicating_output_word: + case r_move_input_word: + case r_move_output_word: + dispose_word (t->redirectee.filename); + /* FALLTHROUGH */ + default: + break; + } + free (t); + } +} diff --git a/bash-5.1/dispose_cmd.h b/bash-5.1/dispose_cmd.h new file mode 100644 index 0000000000000000000000000000000000000000..6095d44a4161de881e10bf1f4fa85d3c3f4b6c6b --- /dev/null +++ b/bash-5.1/dispose_cmd.h @@ -0,0 +1,40 @@ +/* dispose_cmd.h -- Functions appearing in dispose_cmd.c. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_DISPOSE_CMD_H_) +#define _DISPOSE_CMD_H_ + +#include "stdc.h" + +extern void dispose_command PARAMS((COMMAND *)); +extern void dispose_word_desc PARAMS((WORD_DESC *)); +extern void dispose_word PARAMS((WORD_DESC *)); +extern void dispose_words PARAMS((WORD_LIST *)); +extern void dispose_word_array PARAMS((char **)); +extern void dispose_redirects PARAMS((REDIRECT *)); + +#if defined (COND_COMMAND) +extern void dispose_cond_node PARAMS((COND_COM *)); +#endif + +extern void dispose_function_def_contents PARAMS((FUNCTION_DEF *)); +extern void dispose_function_def PARAMS((FUNCTION_DEF *)); + +#endif /* !_DISPOSE_CMD_H_ */ diff --git a/bash-5.1/doc/FAQ b/bash-5.1/doc/FAQ new file mode 100644 index 0000000000000000000000000000000000000000..104d0bc1c322e55191b6d430af96cde3fdc2a073 --- /dev/null +++ b/bash-5.1/doc/FAQ @@ -0,0 +1,2412 @@ +This is the Bash FAQ, version 4.15, for Bash version 5.0. + +This document contains a set of frequently-asked questions concerning +Bash, the GNU Bourne-Again Shell. Bash is a freely-available command +interpreter with advanced features for both interactive use and shell +programming. + +Another good source of basic information about shells is the collection +of FAQ articles periodically posted to comp.unix.shell. + +Questions and comments concerning this document should be sent to +chet.ramey@case.edu. + +This document is available for anonymous FTP with the URL + +ftp://ftp.cwru.edu/pub/bash/FAQ + +The Bash home page is http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html + +---------- +Contents: + +Section A: The Basics + +A1) What is it? +A2) What's the latest version? +A3) Where can I get it? +A4) On what machines will bash run? +A5) Will bash run on operating systems other than Unix? +A6) How can I build bash with gcc? +A7) How can I make bash my login shell? +A8) I just changed my login shell to bash, and now I can't FTP into my + machine. Why not? +A9) What's the `POSIX Shell and Utilities standard'? +A10) What is the bash `posix mode'? + +Section B: The latest version + +B1) What's new in version 4.3? +B2) Are there any user-visible incompatibilities between bash-4.3 and + previous bash versions? + +Section C: Differences from other Unix shells + +C1) How does bash differ from sh, the Bourne shell? +C2) How does bash differ from the Korn shell, version ksh88? +C3) Which new features in ksh-93 are not in bash, and which are? + +Section D: Why does bash do some things differently than other Unix shells? + +D1) Why does bash run a different version of `command' than + `which command' says it will? +D2) Why doesn't bash treat brace expansions exactly like csh? +D3) Why doesn't bash have csh variable modifiers? +D4) How can I make my csh aliases work when I convert to bash? +D5) How can I pipe standard output and standard error from one command to + another, like csh does with `|&'? +D6) Now that I've converted from ksh to bash, are there equivalents to + ksh features like autoloaded functions and the `whence' command? + +Section E: Why does bash do certain things the way it does? + +E1) Why is the bash builtin `test' slightly different from /bin/test? +E2) Why does bash sometimes say `Broken pipe'? +E3) When I have terminal escape sequences in my prompt, why does bash + wrap lines at the wrong column? +E4) If I pipe the output of a command into `read variable', why doesn't + the output show up in $variable when the read command finishes? +E5) I have a bunch of shell scripts that use backslash-escaped characters + in arguments to `echo'. Bash doesn't interpret these characters. Why + not, and how can I make it understand them? +E6) Why doesn't a while or for loop get suspended when I type ^Z? +E7) What about empty for loops in Makefiles? +E8) Why does the arithmetic evaluation code complain about `08'? +E9) Why does the pattern matching expression [A-Z]* match files beginning + with every letter except `z'? +E10) Why does `cd //' leave $PWD as `//'? +E11) If I resize my xterm while another program is running, why doesn't bash + notice the change? +E12) Why don't negative offsets in substring expansion work like I expect? +E13) Why does filename completion misbehave if a colon appears in the filename? +E14) Why does quoting the pattern argument to the regular expression matching + conditional operator (=~) cause matching to stop working? +E15) Tell me more about the shell compatibility level. + +Section F: Things to watch out for on certain Unix versions + +F1) Why can't I use command line editing in my `cmdtool'? +F2) I built bash on Solaris 2. Why do globbing expansions and filename + completion chop off the first few characters of each filename? +F3) Why does bash dump core after I interrupt username completion or + `~user' tilde expansion on a machine running NIS? +F4) I'm running SVR4.2. Why is the line erased every time I type `@'? +F5) Why does bash report syntax errors when my C News scripts use a + redirection before a subshell command? +F6) Why can't I use vi-mode editing on Red Hat Linux 6.1? +F7) Why do bash-2.05a and bash-2.05b fail to compile `printf.def' on + HP/UX 11.x? + +Section G: How can I get bash to do certain common things? + +G1) How can I get bash to read and display eight-bit characters? +G2) How do I write a function `x' to replace builtin command `x', but + still invoke the command from within the function? +G3) How can I find the value of a shell variable whose name is the value + of another shell variable? +G4) How can I make the bash `time' reserved word print timing output that + looks like the output from my system's /usr/bin/time? +G5) How do I get the current directory into my prompt? +G6) How can I rename "*.foo" to "*.bar"? +G7) How can I translate a filename from uppercase to lowercase? +G8) How can I write a filename expansion (globbing) pattern that will match + all files in the current directory except "." and ".."? + +Section H: Where do I go from here? + +H1) How do I report bugs in bash, and where should I look for fixes and + advice? +H2) What kind of bash documentation is there? +H3) What's coming in future versions? +H4) What's on the bash `wish list'? +H5) When will the next release appear? + +---------- +Section A: The Basics + +A1) What is it? + +Bash is a Unix command interpreter (shell). It is an implementation of +the Posix 1003.2 shell standard, and resembles the Korn and System V +shells. + +Bash contains a number of enhancements over those shells, both +for interactive use and shell programming. Features geared +toward interactive use include command line editing, command +history, job control, aliases, and prompt expansion. Programming +features include additional variable expansions, shell +arithmetic, and a number of variables and options to control +shell behavior. + +Bash was originally written by Brian Fox of the Free Software +Foundation. The current developer and maintainer is Chet Ramey +of Case Western Reserve University. + +A2) What's the latest version? + +The latest version is 4.3, first made available on 26 February, 2014. + +A3) Where can I get it? + +Bash is the GNU project's shell, and so is available from the +master GNU archive site, ftp.gnu.org, and its mirrors. The +latest version is also available for FTP from ftp.cwru.edu. +The following URLs tell how to get version 4.3: + +ftp://ftp.gnu.org/pub/gnu/bash/bash-4.3.tar.gz +ftp://ftp.cwru.edu/pub/bash/bash-4.3.tar.gz + +Formatted versions of the documentation are available with the URLs: + +ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-4.3.tar.gz +ftp://ftp.cwru.edu/pub/bash/bash-doc-4.3.tar.gz + +Any patches for the current version are available with the URL: + +ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/ + +A4) On what machines will bash run? + +Bash has been ported to nearly every version of Unix. All you +should have to do to build it on a machine for which a port +exists is to type `configure' and then `make'. The build process +will attempt to discover the version of Unix you have and tailor +itself accordingly, using a script created by GNU autoconf. + +More information appears in the file `INSTALL' in the distribution. + +The Bash web page (http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html) +explains how to obtain binary versions of bash for most of the major +commercial Unix systems. + +A5) Will bash run on operating systems other than Unix? + +Configuration specifics for Unix-like systems such as QNX and +LynxOS are included in the distribution. Bash-2.05 and later +versions should compile and run on Minix 2.0 (patches were +contributed), but I don't believe anyone has built bash-2.x on +earlier Minix versions yet. + +Bash has been ported to versions of Windows implementing the Win32 +programming interface. This includes Windows 95 and Windows NT. +The port was done by Cygnus Solutions (now part of Red Hat) as part +of their CYGWIN project. For more information about the project, see +http://www.cygwin.com/. + +Cygnus originally ported bash-1.14.7, and that port was part of their +early GNU-Win32 (the original name) releases. Cygnus has also done +ports of bash-3.2 and bash-4.0 to the CYGWIN environment, and both +are available as part of their current release. + +Bash-2.05b and later versions should require no local Cygnus changes to +build and run under CYGWIN. + +DJ Delorie has a port of bash-2.x which runs under MS-DOS, as part +of the DJGPP project. For more information on the project, see + +http://www.delorie.com/djgpp/ + +I have been told that the original DJGPP port was done by Daisuke Aoyama. + +Mark Elbrecht has sent me notice that bash-2.04 +is available for DJGPP V2. The files are available as: + +ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204b.zip binary +ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204d.zip documentation +ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204s.zip source + +Mark began to work with bash-2.05, but I don't know the current status. + +Bash-3.0 compiles and runs with no modifications under Microsoft's Services +for Unix (SFU), once known as Interix. I do not anticipate any problems +with building bash-4.2 and later, but will gladly accept any patches that +are needed. + +A6) How can I build bash with gcc? + +Bash configures to use gcc by default if it is available. Read the +file INSTALL in the distribution for more information. + +A7) How can I make bash my login shell? + +Some machines let you use `chsh' to change your login shell. Other +systems use `passwd -s' or `passwd -e'. If one of these works for +you, that's all you need. Note that many systems require the full +pathname to a shell to appear in /etc/shells before you can make it +your login shell. For this, you may need the assistance of your +friendly local system administrator. + +If you cannot do this, you can still use bash as your login shell, but +you need to perform some tricks. The basic idea is to add a command +to your login shell's startup file to replace your login shell with +bash. + +For example, if your login shell is csh or tcsh, and you have installed +bash in /usr/gnu/bin/bash, add the following line to ~/.login: + + if ( -f /usr/gnu/bin/bash ) exec /usr/gnu/bin/bash --login + +(the `--login' tells bash that it is a login shell). + +It's not a good idea to put this command into ~/.cshrc, because every +csh you run without the `-f' option, even ones started to run csh scripts, +reads that file. If you must put the command in ~/.cshrc, use something +like + + if ( $?prompt ) exec /usr/gnu/bin/bash --login + +to ensure that bash is exec'd only when the csh is interactive. + +If your login shell is sh or ksh, you have to do two things. + +First, create an empty file in your home directory named `.bash_profile'. +The existence of this file will prevent the exec'd bash from trying to +read ~/.profile, and re-execing itself over and over again. ~/.bash_profile +is the first file bash tries to read initialization commands from when +it is invoked as a login shell. + +Next, add a line similar to the above to ~/.profile: + + [ -f /usr/gnu/bin/bash ] && [ -x /usr/gnu/bin/bash ] && \ + exec /usr/gnu/bin/bash --login + +This will cause login shells to replace themselves with bash running as +a login shell. Once you have this working, you can copy your initialization +code from ~/.profile to ~/.bash_profile. + +I have received word that the recipe supplied above is insufficient for +machines running CDE. CDE has a maze of twisty little startup files, all +slightly different. + +If you cannot change your login shell in the password file to bash, you +will have to (apparently) live with CDE using the shell in the password +file to run its startup scripts. If you have changed your shell to bash, +there is code in the CDE startup files (on Solaris, at least) that attempts +to do the right thing. It is, however, often broken, and may require that +you use the $BASH_ENV trick described below. + +`dtterm' claims to use $SHELL as the default program to start, so if you +can change $SHELL in the CDE startup files, you should be able to use bash +in your terminal windows. + +Setting DTSOURCEPROFILE in ~/.dtprofile will cause the `Xsession' program +to read your login shell's startup files. You may be able to use bash for +the rest of the CDE programs by setting SHELL to bash in ~/.dtprofile as +well, but I have not tried this. + +You can use the above `exec' recipe to start bash when not logging in with +CDE by testing the value of the DT variable: + + if [ -n "$DT" ]; then + [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login + fi + +If CDE starts its shells non-interactively during login, the login shell +startup files (~/.profile, ~/.bash_profile) will not be sourced at login. +To get around this problem, append a line similar to the following to your +~/.dtprofile: + + BASH_ENV=${HOME}/.bash_profile ; export BASH_ENV + +and add the following line to the beginning of ~/.bash_profile: + + unset BASH_ENV + +A8) I just changed my login shell to bash, and now I can't FTP into my + machine. Why not? + +You must add the full pathname to bash to the file /etc/shells. As +noted in the answer to the previous question, many systems require +this before you can make bash your login shell. + +Most versions of ftpd use this file to prohibit `special' users +such as `uucp' and `news' from using FTP. + +A9) What's the `POSIX Shell and Utilities standard'? + +POSIX is a name originally coined by Richard Stallman for a +family of open system standards based on UNIX. There are a +number of aspects of UNIX under consideration for +standardization, from the basic system services at the system +call and C library level to applications and tools to system +administration and management. Each area of standardization is +assigned to a working group in the 1003 series. + +The POSIX Shell and Utilities standard was originally developed by +IEEE Working Group 1003.2 (POSIX.2). Today it has been merged with +the original 1003.1 Working Group and is maintained by the Austin +Group (a joint working group of the IEEE, The Open Group and +ISO/IEC SC22/WG15). Today the Shell and Utilities are a volume +within the set of documents that make up IEEE Std 1003.1-2001, and +thus now the former POSIX.2 (from 1992) is now part of the current +POSIX.1 standard (POSIX 1003.1-2001). + +The Shell and Utilities volume concentrates on the command +interpreter interface and utility programs commonly executed from +the command line or by other programs. The standard is freely +available on the web at http://www.UNIX-systems.org/version3/ . +Work continues at the Austin Group on maintenance issues; see +http://www.opengroup.org/austin/ to join the discussions. + +Bash is concerned with the aspects of the shell's behavior defined +by the POSIX Shell and Utilities volume. The shell command +language has of course been standardized, including the basic flow +control and program execution constructs, I/O redirection and +pipelining, argument handling, variable expansion, and quoting. + +The `special' builtins, which must be implemented as part of the +shell to provide the desired functionality, are specified as +being part of the shell; examples of these are `eval' and +`export'. Other utilities appear in the sections of POSIX not +devoted to the shell which are commonly (and in some cases must +be) implemented as builtin commands, such as `read' and `test'. +POSIX also specifies aspects of the shell's interactive +behavior as part of the UPE, including job control and command +line editing. Only vi-style line editing commands have been +standardized; emacs editing commands were left out due to +objections. + +The latest version of the POSIX Shell and Utilities standard is +available (now updated to the 2004 Edition) as part of the Single +UNIX Specification Version 3 at + +http://www.UNIX-systems.org/version3/ + +A10) What is the bash `posix mode'? + +Although bash is an implementation of the POSIX shell +specification, there are areas where the bash default behavior +differs from that spec. The bash `posix mode' changes the bash +behavior in these areas so that it obeys the spec more closely. + +Posix mode is entered by starting bash with the --posix or +'-o posix' option or executing `set -o posix' after bash is running. + +The specific aspects of bash which change when posix mode is +active are listed in the file POSIX in the bash distribution. +They are also listed in a section in the Bash Reference Manual +(from which that file is generated). + +Section B: The latest version + +B1) What's new in version 4.3? + +Bash-4.3 is the third revision to the fourth major release of bash. + +Bash-4.3 contains the following new features (see the manual page for +complete descriptions and the CHANGES and NEWS files in the bash-4.3 +distribution): + +o The `helptopic' completion action now maps to all the help topics, not just + the shell builtins. + +o The `help' builtin no longer does prefix substring matching first, so + `help read' does not match `readonly', but will do it if exact string + matching fails. + +o The shell can be compiled to not display a message about processes that + terminate due to SIGTERM. + +o Non-interactive shells now react to the setting of checkwinsize and set + LINES and COLUMNS after a foreground job exits. + +o There is a new shell option, `globasciiranges', which, when set to on, + forces globbing range comparisons to use character ordering as if they + were run in the C locale. + +o There is a new shell option, `direxpand', which makes filename completion + expand variables in directory names in the way bash-4.1 did. + +o In Posix mode, the `command' builtin does not change whether or not a + builtin it shadows is treated as an assignment builtin. + +o The `return' and `exit' builtins accept negative exit status arguments. + +o The word completion code checks whether or not a filename containing a + shell variable expands to a directory name and appends `/' to the word + as appropriate. The same code expands shell variables in command names + when performing command completion. + +o In Posix mode, it is now an error to attempt to define a shell function + with the same name as a Posix special builtin. + +o When compiled for strict Posix conformance, history expansion is disabled + by default. + +o The history expansion character (!) does not cause history expansion when + followed by the closing quote in a double-quoted string. + +o `complete' and its siblings compgen/compopt now takes a new `-o noquote' + option to inhibit quoting of the completions. + +o Setting HISTSIZE to a value less than zero causes the history list to be + unlimited (setting it 0 zero disables the history list). + +o Setting HISTFILESIZE to a value less than zero causes the history file size + to be unlimited (setting it to 0 causes the history file to be truncated + to zero size). + +o The `read' builtin now skips NUL bytes in the input. + +o There is a new `bind -X' option to print all key sequences bound to Unix + commands. + +o When in Posix mode, `read' is interruptible by a trapped signal. After + running the trap handler, read returns 128+signal and throws away any + partially-read input. + +o The command completion code skips whitespace and assignment statements + before looking for the command name word to be completed. + +o The build process has a new mechanism for constructing separate help files + that better reflects the current set of compilation options. + +o The -nt and -ot options to test now work with files with nanosecond + timestamp resolution. + +o The shell saves the command history in any shell for which history is + enabled and HISTFILE is set, not just interactive shells. + +o The shell has `nameref' variables and new -n(/+n) options to declare and + unset to use them, and a `test -R' option to test for them. + +o The shell now allows assigning, referencing, and unsetting elements of + indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which + count back from the last element of the array. + +o The {x} operators to the [[ conditional command now do string + comparison according to the current locale. + +o Programmable completion now uses the completion for `b' instead of `a' + when completion is attempted on a line like: a $(b c. + +o Force extglob on temporarily when parsing the pattern argument to + the == and != operators to the [[ command, for compatibility. + +o Changed the behavior of interrupting the wait builtin when a SIGCHLD is + received and a trap on SIGCHLD is set to be Posix-mode only. + +o The read builtin has a new `-N nchars' option, which reads exactly NCHARS + characters, ignoring delimiters like newline. + +o The mapfile/readarray builtin no longer stores the commands it invokes via + callbacks in the history list. + +o There is a new `compat40' shopt option. + +o The < and > operators to [[ do string comparisons using the current locale + only if the compatibility level is greater than 40 (set to 41 by default). + +o New bindable readline function: menu-complete-backward. + +o In the readline vi-mode insertion keymap, C-n is now bound to menu-complete + by default, and C-p to menu-complete-backward. + +o When in readline vi command mode, repeatedly hitting ESC now does nothing, + even when ESC introduces a bound key sequence. This is closer to how + historical vi behaves. + +o New bindable readline function: skip-csi-sequence. Can be used as a + default to consume key sequences generated by keys like Home and End + without having to bind all keys. + +o New bindable readline variable: skip-completed-text, active when + completing in the middle of a word. If enabled, it means that characters + in the completion that match characters in the remainder of the word are + "skipped" rather than inserted into the line. + +o The pre-readline-6.0 version of menu completion is available as + "old-menu-complete" for users who do not like the readline-6.0 version. + +o New bindable readline variable: echo-control-characters. If enabled, and + the tty ECHOCTL bit is set, controls the echoing of characters + corresponding to keyboard-generated signals. + +o New bindable readline variable: enable-meta-key. Controls whether or not + readline sends the smm/rmm sequences if the terminal indicates it has a + meta key that enables eight-bit characters. + +Bash-4.0 contained the following new features: + +o When using substring expansion on the positional parameters, a starting + index of 0 now causes $0 to be prefixed to the list. + +o There is a new variable, $BASHPID, which always returns the process id of + the current shell. + +o There is a new `autocd' option that, when enabled, causes bash to attempt + to `cd' to a directory name that is supplied as the first word of a + simple command. + +o There is a new `checkjobs' option that causes the shell to check for and + report any running or stopped jobs at exit. + +o The programmable completion code exports a new COMP_TYPE variable, set to + a character describing the type of completion being attempted. + +o The programmable completion code exports a new COMP_KEY variable, set to + the character that caused the completion to be invoked (e.g., TAB). + +o The programmable completion code now uses the same set of characters as + readline when breaking the command line into a list of words. + +o The block multiplier for the ulimit -c and -f options is now 512 when in + Posix mode, as Posix specifies. + +o Changed the behavior of the read builtin to save any partial input received + in the specified variable when the read builtin times out. This also + results in variables specified as arguments to read to be set to the empty + string when there is no input available. When the read builtin times out, + it returns an exit status greater than 128. + +o The shell now has the notion of a `compatibility level', controlled by + new variables settable by `shopt'. Setting this variable currently + restores the bash-3.1 behavior when processing quoted strings on the rhs + of the `=~' operator to the `[[' command. + +o The `ulimit' builtin now has new -b (socket buffer size) and -T (number + of threads) options. + +o There is a new `compopt' builtin that allows completion functions to modify + completion options for existing completions or the completion currently + being executed. + +o The `read' builtin has a new -i option which inserts text into the reply + buffer when using readline. + +o A new `-E' option to the complete builtin allows control of the default + behavior for completion on an empty line. + +o There is now limited support for completing command name words containing + globbing characters. + +o The `help' builtin now has a new -d option, to display a short description, + and a -m option, to print help information in a man page-like format. + +o There is a new `mapfile' builtin to populate an array with lines from a + given file. + +o If a command is not found, the shell attempts to execute a shell function + named `command_not_found_handle', supplying the command words as the + function arguments. + +o There is a new shell option: `globstar'. When enabled, the globbing code + treats `**' specially -- it matches all directories (and files within + them, when appropriate) recursively. + +o There is a new shell option: `dirspell'. When enabled, the filename + completion code performs spelling correction on directory names during + completion. + +o The `-t' option to the `read' builtin now supports fractional timeout + values. + +o Brace expansion now allows zero-padding of expanded numeric values and + will add the proper number of zeroes to make sure all values contain the + same number of digits. + +o There is a new bash-specific bindable readline function: `dabbrev-expand'. + It uses menu completion on a set of words taken from the history list. + +o The command assigned to a key sequence with `bind -x' now sets two new + variables in the environment of the executed command: READLINE_LINE_BUFFER + and READLINE_POINT. The command can change the current readline line + and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT, + respectively. + +o There is a new >>& redirection operator, which appends the standard output + and standard error to the named file. + +o The parser now understands `|&' as a synonym for `2>&1 |', which redirects + the standard error for a command through a pipe. + +o The new `;&' case statement action list terminator causes execution to + continue with the action associated with the next pattern in the + statement rather than terminating the command. + +o The new `;;&' case statement action list terminator causes the shell to + test the next set of patterns after completing execution of the current + action, rather than terminating the command. + +o The shell understands a new variable: PROMPT_DIRTRIM. When set to an + integer value greater than zero, prompt expansion of \w and \W will + retain only that number of trailing pathname components and replace + the intervening characters with `...'. + +o There are new case-modifying word expansions: uppercase (^[^]) and + lowercase (,[,]). They can work on either the first character or + array element, or globally. They accept an optional shell pattern + that determines which characters to modify. There is an optionally- + configured feature to include capitalization operators. + +o The shell provides associative array variables, with the appropriate + support to create, delete, assign values to, and expand them. + +o The `declare' builtin now has new -l (convert value to lowercase upon + assignment) and -u (convert value to uppercase upon assignment) options. + There is an optionally-configurable -c option to capitalize a value at + assignment. + +o There is a new `coproc' reserved word that specifies a coprocess: an + asynchronous command run with two pipes connected to the creating shell. + Coprocs can be named. The input and output file descriptors and the + PID of the coprocess are available to the calling shell in variables + with coproc-specific names. + +o A value of 0 for the -t option to `read' now returns success if there is + input available to be read from the specified file descriptor. + +o CDPATH and GLOBIGNORE are ignored when the shell is running in privileged + mode. + +o New bindable readline functions shell-forward-word and shell-backward-word, + which move forward and backward words delimited by shell metacharacters + and honor shell quoting. + +o New bindable readline functions shell-backward-kill-word and shell-kill-word + which kill words backward and forward, but use the same word boundaries + as shell-forward-word and shell-backward-word. + +Bash-3.2 contained the following new features: + +o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing + characters when deciding whether or not a script is a binary file. + +o Quoting the string argument to the [[ command's =~ (regexp) operator now + forces string matching, as with the other pattern-matching operators. + +Bash-3.1 contained the following new features: + +o Bash-3.1 may now be configured and built in a mode that enforces strict + POSIX compliance. + +o The `+=' assignment operator, which appends to the value of a string or + array variable, has been implemented. + +o It is now possible to ignore case when matching in contexts other than + filename generation using the new `nocasematch' shell option. + +Bash-3.0 contained the following new features: + +o Features to support the bash debugger have been implemented, and there + is a new `extdebug' option to turn the non-default options on + +o HISTCONTROL is now a colon-separated list of options and has been + extended with a new `erasedups' option that will result in only one + copy of a command being kept in the history list + +o Brace expansion has been extended with a new {x..y} form, producing + sequences of digits or characters + +o Timestamps are now kept with history entries, with an option to save + and restore them from the history file; there is a new HISTTIMEFORMAT + variable describing how to display the timestamps when listing history + entries + +o The `[[' command can now perform extended regular expression (egrep-like) + matching, with matched subexpressions placed in the BASH_REMATCH array + variable + +o A new `pipefail' option causes a pipeline to return a failure status if + any command in it fails + +o The `jobs', `kill', and `wait' builtins now accept job control notation + in their arguments even if job control is not enabled + +o The `gettext' package and libintl have been integrated, and the shell + messages may be translated into other languages + +Bash-2.05b introduced the following new features: + +o support for multibyte characters has been added to both bash and readline + +o the DEBUG trap is now run *before* simple commands, ((...)) commands, + [[...]] conditional commands, and for ((...)) loops + +o the shell now performs arithmetic in the largest integer size the machine + supports (intmax_t) + +o there is a new \D{...} prompt expansion; passes the `...' to strftime(3) + and inserts the result into the expanded prompt + +o there is a new `here-string' redirection operator: <<< word + +o when displaying variables, function attributes and definitions are shown + separately, allowing them to be re-used as input (attempting to re-use + the old output would result in syntax errors). + +o `read' has a new `-u fd' option to read from a specified file descriptor + +o the bash debugger in examples/bashdb has been modified to work with the + new DEBUG trap semantics, the command set has been made more gdb-like, + and the changes to $LINENO make debugging functions work better + +o the expansion of $LINENO inside a shell function is only relative to the + function start if the shell is interactive -- if the shell is running a + script, $LINENO expands to the line number in the script. This is as + POSIX-2001 requires + +Bash-2.05a introduced the following new features: + +o The `printf' builtin has undergone major work + +o There is a new read-only `shopt' option: login_shell, which is set by + login shells and unset otherwise + +o New `\A' prompt string escape sequence; expanding to time in 24-hour + HH:MM format + +o New `-A group/-g' option to complete and compgen; goes group name + completion + +o New [+-]O invocation option to set and unset `shopt' options at startup + +o ksh-like `ERR' trap + +o `for' loops now allow empty word lists after the `in' reserved word + +o new `hard' and `soft' arguments for the `ulimit' builtin + +o Readline can be configured to place the user at the same point on the line + when retrieving commands from the history list + +o Readline can be configured to skip `hidden' files (filenames with a leading + `.' on Unix) when performing completion + +Bash-2.05 introduced the following new features: + +o This version has once again reverted to using locales and strcoll(3) when + processing pattern matching bracket expressions, as POSIX requires. +o Added a new `--init-file' invocation argument as a synonym for `--rcfile', + per the new GNU coding standards. +o The /dev/tcp and /dev/udp redirections now accept service names as well as + port numbers. +o `complete' and `compgen' now take a `-o value' option, which controls some + of the aspects of that compspec. Valid values are: + + default - perform bash default completion if programmable + completion produces no matches + dirnames - perform directory name completion if programmable + completion produces no matches + filenames - tell readline that the compspec produces filenames, + so it can do things like append slashes to + directory names and suppress trailing spaces +o A new loadable builtin, realpath, which canonicalizes and expands symlinks + in pathname arguments. +o When `set' is called without options, it prints function definitions in a + way that allows them to be reused as input. This affects `declare' and + `declare -p' as well. This only happens when the shell is not in POSIX + mode, since POSIX.2 forbids this behavior. + +Bash-2.04 introduced the following new features: + +o Programmable word completion with the new `complete' and `compgen' builtins; + examples are provided in examples/complete/complete-examples +o `history' has a new `-d' option to delete a history entry +o `bind' has a new `-x' option to bind key sequences to shell commands +o The prompt expansion code has new `\j' and `\l' escape sequences +o The `no_empty_cmd_completion' shell option, if enabled, inhibits + command completion when TAB is typed on an empty line +o `help' has a new `-s' option to print a usage synopsis +o New arithmetic operators: var++, var--, ++var, --var, expr1,expr2 (comma) +o New ksh93-style arithmetic for command: + for ((expr1 ; expr2; expr3 )); do list; done +o `read' has new options: `-t', `-n', `-d', `-s' +o The redirection code handles several filenames specially: /dev/fd/N, + /dev/stdin, /dev/stdout, /dev/stderr +o The redirection code now recognizes /dev/tcp/HOST/PORT and + /dev/udp/HOST/PORT and tries to open a TCP or UDP socket, respectively, + to the specified port on the specified host +o The ${!prefix*} expansion has been implemented +o A new FUNCNAME variable, which expands to the name of a currently-executing + function +o The GROUPS variable is no longer readonly +o A new shopt `xpg_echo' variable, to control the behavior of echo with + respect to backslash-escape sequences at runtime +o The NON_INTERACTIVE_LOGIN_SHELLS #define has returned + +The version of Readline released with Bash-2.04, Readline-4.1, had several +new features as well: + +o Parentheses matching is always compiled into readline, and controllable + with the new `blink-matching-paren' variable +o The history-search-forward and history-search-backward functions now leave + point at the end of the line when the search string is empty, like + reverse-search-history, and forward-search-history +o A new function for applications: rl_on_new_line_with_prompt() +o New variables for applications: rl_already_prompted, and rl_gnu_readline_p + + +Bash-2.03 had very few new features, in keeping with the convention +that odd-numbered releases provide mainly bug fixes. A number of new +features were added to Readline, mostly at the request of the Cygnus +folks. + +A new shopt option, `restricted_shell', so that startup files can test + whether or not the shell was started in restricted mode +Filename generation is now performed on the words between ( and ) in + compound array assignments (this is really a bug fix) +OLDPWD is now auto-exported, as POSIX.2 requires +ENV and BASH_ENV are read-only variables in a restricted shell +Bash may now be linked against an already-installed Readline library, + as long as the Readline library is version 4 or newer +All shells begun with the `--login' option will source the login shell + startup files, even if the shell is not interactive + +There were lots of changes to the version of the Readline library released +along with Bash-2.03. For a complete list of the changes, read the file +CHANGES in the Bash-2.03 distribution. + +Bash-2.02 contained the following new features: + +a new version of malloc (based on the old GNU malloc code in previous + bash versions) that is more page-oriented, more conservative + with memory usage, does not `orphan' large blocks when they + are freed, is usable on 64-bit machines, and has allocation + checking turned on unconditionally +POSIX.2-style globbing character classes ([:alpha:], [:alnum:], etc.) +POSIX.2-style globbing equivalence classes +POSIX.2-style globbing collating symbols +the ksh [[...]] extended conditional command +the ksh egrep-style extended pattern matching operators +a new `printf' builtin +the ksh-like $(, &>, >|, <<<, [n]<&word-, [n]>&word-, >>& + prompt string special char translation and variable expansion + auto-export of variables in initial environment + command search finds functions before builtins + bash return builtin will exit a file sourced with `.' + builtins: cd -/-L/-P/-@, exec -l/-c/-a, echo -e/-E, hash -d/-l/-p/-t. + export -n/-f/-p/name=value, pwd -L/-P, + read -e/-p/-a/-t/-n/-d/-s/-u/-i/-N, + readonly -a/-f/name=value, trap -l, set +o, + set -b/-m/-o option/-h/-p/-B/-C/-H/-P, + unset -f/-n/-v, ulimit -i/-m/-p/-q/-u/-x, + type -a/-p/-t/-f/-P, suspend -f, kill -n, + test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S/-R + bash reads ~/.bashrc for interactive shells, $ENV for non-interactive + bash restricted shell mode is more extensive + bash allows functions and variables with the same name + brace expansion + tilde expansion + arithmetic expansion with $((...)) and `let' builtin + the `[[...]]' extended conditional command + process substitution + aliases and alias/unalias builtins + local variables in functions and `local' builtin + readline and command-line editing with programmable completion + command history and history/fc builtins + csh-like history expansion + other new bash builtins: bind, command, compgen, complete, builtin, + declare/typeset, dirs, enable, fc, help, + history, logout, popd, pushd, disown, shopt, + printf, compopt, mapfile + exported functions + filename generation when using output redirection (command >a*) + POSIX.2-style globbing character classes + POSIX.2-style globbing equivalence classes + POSIX.2-style globbing collating symbols + egrep-like extended pattern matching operators + case-insensitive pattern matching and globbing + variable assignments preceding commands affect only that command, + even for builtins and functions + posix mode and strict posix conformance + redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr, + /dev/tcp/host/port, /dev/udp/host/port + debugger support, including `caller' builtin and new variables + RETURN trap + the `+=' assignment operator + autocd shell option and behavior + command-not-found hook with command_not_found_handle shell function + globstar shell option and `**' globbing behavior + |& synonym for `2>&1 |' + ;& and ;;& case action list terminators + case-modifying word expansions and variable attributes + associative arrays + coprocesses using the `coproc' reserved word and variables + shell assignment of a file descriptor used in a redirection to a variable + +Things sh has that bash does not: + uses variable SHACCT to do shell accounting + includes `stop' builtin (bash can use alias stop='kill -s STOP') + `newgrp' builtin + turns on job control if called as `jsh' + $TIMEOUT (like bash $TMOUT) + `^' is a synonym for `|' + new SVR4.2 sh builtins: mldmode, priv + +Implementation differences: + redirection to/from compound commands causes sh to create a subshell + bash does not allow unbalanced quotes; sh silently inserts them at EOF + bash does not mess with signal 11 + sh sets (euid, egid) to (uid, gid) if -p not supplied and uid < 100 + bash splits only the results of expansions on IFS, using POSIX.2 + field splitting rules; sh splits all words on IFS + sh does not allow MAILCHECK to be unset (?) + sh does not allow traps on SIGALRM or SIGCHLD + bash allows multiple option arguments when invoked (e.g. -x -v); + sh allows only a single option argument (`sh -x -v' attempts + to open a file named `-v', and, on SunOS 4.1.4, dumps core. + On Solaris 2.4 and earlier versions, sh goes into an infinite + loop.) + sh exits a script if any builtin fails; bash exits only if one of + the POSIX.2 `special' builtins fails + +C2) How does bash differ from the Korn shell, version ksh88? + +Things bash has or uses that ksh88 does not: + long invocation options + [-+]O invocation option + -l invocation option + `!' reserved word + arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done + arithmetic in largest machine-supported size (intmax_t) + posix mode and posix conformance + command hashing + tilde expansion for assignment statements that look like $PATH + process substitution with named pipes if /dev/fd is not available + the ${!param} indirect parameter expansion operator + the ${!param*} prefix expansion operator + the ${param:offset[:length]} parameter substring operator + the ${param/pat[/string]} parameter pattern substitution operator + variables: BASH, BASH_VERSION, BASH_VERSINFO, BASHPID, UID, EUID, SHLVL, + TIMEFORMAT, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE, + HISTFILESIZE, HISTIGNORE, HISTCONTROL, PROMPT_COMMAND, + IGNOREEOF, FIGNORE, INPUTRC, HOSTFILE, DIRSTACK, + PIPESTATUS, HOSTNAME, OPTERR, SHELLOPTS, GLOBIGNORE, + GROUPS, FUNCNAME, histchars, auto_resume, PROMPT_DIRTRIM + prompt expansion with backslash escapes and command substitution + redirection: &> (stdout and stderr), <<<, [n]<&word-, [n]>&word-, >>& + more extensive and extensible editing and programmable completion + builtins: bind, builtin, command, declare, dirs, echo -e/-E, enable, + exec -l/-c/-a, fc -s, export -n/-f/-p, hash, help, history, + jobs -x/-r/-s, kill -s/-n/-l, local, logout, popd, pushd, + read -e/-p/-a/-t/-n/-d/-s/-N, readonly -a/-n/-f/-p, + set -o braceexpand/-o histexpand/-o interactive-comments/ + -o notify/-o physical/-o posix/-o hashall/-o onecmd/ + -h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type, + typeset -a/-F/-p, ulimit -i/-q/-u/-x, umask -S, alias -p, + shopt, disown, printf, complete, compgen, compopt, mapfile + `!' csh-style history expansion + POSIX.2-style globbing character classes + POSIX.2-style globbing equivalence classes + POSIX.2-style globbing collating symbols + egrep-like extended pattern matching operators + case-insensitive pattern matching and globbing + `**' arithmetic operator to do exponentiation + redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr + arrays of unlimited size + TMOUT is default timeout for `read' and `select' + debugger support, including the `caller' builtin + RETURN trap + Timestamps in history entries + {x..y} brace expansion + The `+=' assignment operator + autocd shell option and behavior + command-not-found hook with command_not_found_handle shell function + globstar shell option and `**' globbing behavior + |& synonym for `2>&1 |' + ;& and ;;& case action list terminators + case-modifying word expansions and variable attributes + associative arrays + coprocesses using the `coproc' reserved word and variables + shell assignment of a file descriptor used in a redirection to a variable + +Things ksh88 has or uses that bash does not: + tracked aliases (alias -t) + variables: ERRNO, FPATH, EDITOR, VISUAL + co-processes (bash uses different syntax) + weirdly-scoped functions + typeset +f to list all function names without definitions + text of command history kept in a file, not memory + builtins: alias -x, cd old new, newgrp, print, + read -p/-s/var?prompt, set -A/-o gmacs/ + -o bgnice/-o markdirs/-o trackall/-o viraw/-s, + typeset -H/-L/-R/-Z/-A/-ft/-fu/-fx/-t, whence + using environment to pass attributes of exported variables + arithmetic evaluation done on arguments to some builtins + reads .profile from $PWD when invoked as login shell + +Implementation differences: + ksh runs last command of a pipeline in parent shell context + bash has brace expansion by default (ksh88 compile-time option) + bash has fixed startup file for all interactive shells; ksh reads $ENV + bash has exported functions + bash command search finds functions before builtins + bash waits for all commands in pipeline to exit before returning status + emacs-mode editing has some slightly different key bindings + +C3) Which new features in ksh-93 are not in bash, and which are? + +This list is current through ksh93v (10/08/2013) + +New things in ksh-93 not in bash-4.3: + floating point arithmetic, variables, and constants + math library functions, including user-defined math functions + ${!name[sub]} name of subscript for associative array + `.' is allowed in variable names to create a hierarchical namespace + more extensive compound assignment syntax + discipline functions + KEYBD trap + variables: .sh.edchar, .sh.edmode, .sh.edcol, .sh.edtext, .sh.version, + .sh.name, .sh.subscript, .sh.value, .sh.match, HISTEDIT, + .sh.sig, .sh.stats, .sh.siginfo, .sh.pwdfd, .sh.op_astbin, + .sh.pool + backreferences in pattern matching (\N) + `&' operator in pattern lists for matching (match all instead of any) + exit statuses between 0 and 255 + FPATH and PATH mixing + lexical scoping for local variables in `ksh' functions + no scoping for local variables in `POSIX' functions + $'' \C[.collating-element.] escape sequence + -C/-I invocation options + print -f (bash uses printf) and rest of print builtin options + printf %(type)q, %#q + `fc' has been renamed to `hist' + `.' can execute shell functions + getopts -a + printf %B, %H, %P, %R, %Z modifiers, output base for %d, `=' flag + read -n/-N differ/-v/-S + set -o showme/-o multiline (bash default) + set -K + kill -Q/-q/-L + trap -a + `sleep' and `getconf' builtins (bash has loadable versions) + [[ -R name ]] (checks whether or not name is a nameref) + typeset -C/-S/-T/-X/-h/-s/-c/-M + experimental `type' definitions (a la typedef) using typeset + array expansions ${array[sub1..sub2]} and ${!array[sub1..sub2]} + associative array assignments using `;' as element separator + command substitution $(n<#) expands to current byte offset for fd N + new '${ ' form of command substitution, executed in current shell + new >;/<>;/<#pat/<##pat/<#/># redirections + brace expansion printf-like formats + CHLD trap triggered by SIGSTOP and SIGCONT + ~{fd} expansion, which replaces fd with the corresponding path name + $"string" expanded when referenced rather than when first parsed + job "pools", which allow a collection of jobs to be managed as a unit + +New things in ksh-93 present in bash-4.3: + associative arrays + [n]<&word- and [n]>&word- redirections (combination dup and close) + for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command + ?:, ++, --, `expr1 , expr2' arithmetic operators + expansions: ${!param}, ${param:offset[:len]}, ${param/pat[/str]}, + ${!param*} + compound array assignment + negative subscripts for indexed array variables + the `!' reserved word + loadable builtins -- but ksh uses `builtin' while bash uses `enable' + new $'...' and $"..." quoting + FIGNORE (but bash uses GLOBIGNORE), HISTCMD + brace expansion and set -B + changes to kill builtin + `command', `builtin', `disown' builtins + echo -e + exec -c/-a + printf %T modifier + read -A (bash uses read -a) + read -t/-d + trap -p + `.' restores the positional parameters when it completes + set -o notify/-C + set -o pipefail + set -G (-o globstar) and ** + POSIX.2 `test' + umask -S + unalias -a + command and arithmetic substitution performed on PS1, PS4, and ENV + command name completion, TAB displaying possible completions + ENV processed only for interactive shells + The `+=' assignment operator + the `;&' case statement "fallthrough" pattern list terminator + csh-style history expansion and set -H + negative offsets in ${param:offset:length} + redirection operators preceded with {varname} to store fd number in varname + DEBUG can force skipping following command + [[ -v var ]] operator (checks whether or not var is set) + typeset -n and `nameref' variables + process substitutions work without /dev/fd + +Section D: Why does bash do some things differently than other Unix shells? + +D1) Why does bash run a different version of `command' than + `which command' says it will? + +On many systems, `which' is actually a csh script that assumes +you're running csh. In tcsh, `which' and its cousin `where' +are builtins. On other Unix systems, `which' is a perl script +that uses the PATH environment variable. Many Linux distributions +use GNU `which', which is a C program that can understand shell +aliases. + +The csh script version reads the csh startup files from your +home directory and uses those to determine which `command' will +be invoked. Since bash doesn't use any of those startup files, +there's a good chance that your bash environment differs from +your csh environment. The bash `type' builtin does everything +`which' does, and will report correct results for the running +shell. If you're really wedded to the name `which', try adding +the following function definition to your .bashrc: + + which() + { + builtin type "$@" + } + +If you're moving from tcsh and would like to bring `where' along +as well, use this function: + + where() + { + builtin type -a "$@" + } + +D2) Why doesn't bash treat brace expansions exactly like csh? + +The only difference between bash and csh brace expansion is that +bash requires a brace expression to contain at least one unquoted +comma if it is to be expanded. Any brace-surrounded word not +containing an unquoted comma is left unchanged by the brace +expansion code. This affords the greatest degree of sh +compatibility. + +Bash, ksh, zsh, and pd-ksh all implement brace expansion this way. + +D3) Why doesn't bash have csh variable modifiers? + +Posix has specified a more powerful, albeit somewhat more cryptic, +mechanism cribbed from ksh, and bash implements it. + +${parameter%word} + Remove smallest suffix pattern. The WORD is expanded to produce + a pattern. It then expands to the value of PARAMETER, with the + smallest portion of the suffix matched by the pattern deleted. + + x=file.c + echo ${x%.c}.o + -->file.o + +${parameter%%word} + + Remove largest suffix pattern. The WORD is expanded to produce + a pattern. It then expands to the value of PARAMETER, with the + largest portion of the suffix matched by the pattern deleted. + + x=posix/src/std + echo ${x%%/*} + -->posix + +${parameter#word} + Remove smallest prefix pattern. The WORD is expanded to produce + a pattern. It then expands to the value of PARAMETER, with the + smallest portion of the prefix matched by the pattern deleted. + + x=$HOME/src/cmd + echo ${x#$HOME} + -->/src/cmd + +${parameter##word} + Remove largest prefix pattern. The WORD is expanded to produce + a pattern. It then expands to the value of PARAMETER, with the + largest portion of the prefix matched by the pattern deleted. + + x=/one/two/three + echo ${x##*/} + -->three + + +Given + a=/a/b/c/d + b=b.xxx + + csh bash result + --- ---- ------ + $a:h ${a%/*} /a/b/c + $a:t ${a##*/} d + $b:r ${b%.*} b + $b:e ${b##*.} xxx + + +D4) How can I make my csh aliases work when I convert to bash? + +Bash uses a different syntax to support aliases than csh does. +The details can be found in the documentation. We have provided +a shell script which does most of the work of conversion for you; +this script can be found in ./examples/misc/aliasconv.sh. Here is +how you use it: + +Start csh in the normal way for you. (e.g., `csh') + +Pipe the output of `alias' through `aliasconv.sh', saving the +results into `bash_aliases': + + alias | bash aliasconv.sh >bash_aliases + +Edit `bash_aliases', carefully reading through any created +functions. You will need to change the names of some csh specific +variables to the bash equivalents. The script converts $cwd to +$PWD, $term to $TERM, $home to $HOME, $user to $USER, and $prompt +to $PS1. You may also have to add quotes to avoid unwanted +expansion. + +For example, the csh alias: + + alias cd 'cd \!*; echo $cwd' + +is converted to the bash function: + + cd () { command cd "$@"; echo $PWD ; } + +The only thing that needs to be done is to quote $PWD: + + cd () { command cd "$@"; echo "$PWD" ; } + +Merge the edited file into your ~/.bashrc. + +There is an additional, more ambitious, script in +examples/misc/cshtobash that attempts to convert your entire csh +environment to its bash equivalent. This script can be run as +simply `cshtobash' to convert your normal interactive +environment, or as `cshtobash ~/.login' to convert your login +environment. + +D5) How can I pipe standard output and standard error from one command to + another, like csh does with `|&'? + +Use + command 2>&1 | command2 + +The key is to remember that piping is performed before redirection, so +file descriptor 1 points to the pipe when it is duplicated onto file +descriptor 2. + +D6) Now that I've converted from ksh to bash, are there equivalents to + ksh features like autoloaded functions and the `whence' command? + +There are features in ksh-88 and ksh-93 that do not have direct bash +equivalents. Most, however, can be emulated with very little trouble. + +ksh-88 feature Bash equivalent +-------------- --------------- +compiled-in aliases set up aliases in .bashrc; some ksh aliases are + bash builtins (hash, history, type) +coprocesses named pipe pairs (one for read, one for write) +typeset +f declare -F +cd, print, whence function substitutes in examples/functions/kshenv +autoloaded functions examples/functions/autoload is the same as typeset -fu +read var?prompt read -p prompt var + +ksh-93 feature Bash equivalent +-------------- --------------- +sleep, getconf Bash has loadable versions in examples/loadables +${.sh.version} $BASH_VERSION +print -f printf +hist alias hist=fc +$HISTEDIT $FCEDIT + +Section E: How can I get bash to do certain things, and why does bash do + things the way it does? + +E1) Why is the bash builtin `test' slightly different from /bin/test? + +The specific example used here is [ ! x -o x ], which is false. + +Bash's builtin `test' implements the Posix.2 spec, which can be +summarized as follows (the wording is due to David Korn): + +Here is the set of rules for processing test arguments. + + 0 Args: False + 1 Arg: True iff argument is not null. + 2 Args: If first arg is !, True iff second argument is null. + If first argument is unary, then true if unary test is true + Otherwise error. + 3 Args: If second argument is a binary operator, do binary test of $1 $3 + If first argument is !, negate two argument test of $2 $3 + If first argument is `(' and third argument is `)', do the + one-argument test of the second argument. + Otherwise error. + 4 Args: If first argument is !, negate three argument test of $2 $3 $4. + Otherwise unspecified + 5 or more Args: unspecified. (Historical shells would use their + current algorithm). + +The operators -a and -o are considered binary operators for the purpose +of the 3 Arg case. + +As you can see, the test becomes (not (x or x)), which is false. + +E2) Why does bash sometimes say `Broken pipe'? + +If a sequence of commands appears in a pipeline, and one of the +reading commands finishes before the writer has finished, the +writer receives a SIGPIPE signal. Many other shells special-case +SIGPIPE as an exit status in the pipeline and do not report it. +For example, in: + + ps -aux | head + +`head' can finish before `ps' writes all of its output, and ps +will try to write on a pipe without a reader. In that case, bash +will print `Broken pipe' to stderr when ps is killed by a +SIGPIPE. + +As of bash-3.1, bash does not report SIGPIPE errors by default. You +can build a version of bash that will report such errors. + +E3) When I have terminal escape sequences in my prompt, why does bash + wrap lines at the wrong column? + +Readline, the line editing library that bash uses, does not know +that the terminal escape sequences do not take up space on the +screen. The redisplay code assumes, unless told otherwise, that +each character in the prompt is a `printable' character that +takes up one character position on the screen. + +You can use the bash prompt expansion facility (see the PROMPTING +section in the manual page) to tell readline that sequences of +characters in the prompt strings take up no screen space. + +Use the \[ escape to begin a sequence of non-printing characters, +and the \] escape to signal the end of such a sequence. + +E4) If I pipe the output of a command into `read variable', why doesn't + the output show up in $variable when the read command finishes? + +This has to do with the parent-child relationship between Unix +processes. It affects all commands run in pipelines, not just +simple calls to `read'. For example, piping a command's output +into a `while' loop that repeatedly calls `read' will result in +the same behavior. + +Each element of a pipeline, even a builtin or shell function, +runs in a separate process, a child of the shell running the +pipeline. A subprocess cannot affect its parent's environment. +When the `read' command sets the variable to the input, that +variable is set only in the subshell, not the parent shell. When +the subshell exits, the value of the variable is lost. + +Many pipelines that end with `read variable' can be converted +into command substitutions, which will capture the output of +a specified command. The output can then be assigned to a +variable: + + grep ^gnu /usr/lib/news/active | wc -l | read ngroup + +can be converted into + + ngroup=$(grep ^gnu /usr/lib/news/active | wc -l) + +This does not, unfortunately, work to split the text among +multiple variables, as read does when given multiple variable +arguments. If you need to do this, you can either use the +command substitution above to read the output into a variable +and chop up the variable using the bash pattern removal +expansion operators or use some variant of the following +approach. + +Say /usr/local/bin/ipaddr is the following shell script: + +#! /bin/sh +host `hostname` | awk '/address/ {print $NF}' + +Instead of using + + /usr/local/bin/ipaddr | read A B C D + +to break the local machine's IP address into separate octets, use + + OIFS="$IFS" + IFS=. + set -- $(/usr/local/bin/ipaddr) + IFS="$OIFS" + A="$1" B="$2" C="$3" D="$4" + +Beware, however, that this will change the shell's positional +parameters. If you need them, you should save them before doing +this. + +This is the general approach -- in most cases you will not need to +set $IFS to a different value. + +Some other user-supplied alternatives include: + +read A B C D << HERE + $(IFS=.; echo $(/usr/local/bin/ipaddr)) +HERE + +and, where process substitution is available, + +read A B C D < <(IFS=.; echo $(/usr/local/bin/ipaddr)) + +E5) I have a bunch of shell scripts that use backslash-escaped characters + in arguments to `echo'. Bash doesn't interpret these characters. Why + not, and how can I make it understand them? + +This is the behavior of echo on most Unix System V machines. + +The bash builtin `echo' is modeled after the 9th Edition +Research Unix version of `echo'. It does not interpret +backslash-escaped characters in its argument strings by default; +it requires the use of the -e option to enable the +interpretation. The System V echo provides no way to disable the +special characters; the bash echo has a -E option to disable +them. + +There is a configuration option that will make bash behave like +the System V echo and interpret things like `\t' by default. Run +configure with the --enable-xpg-echo-default option to turn this +on. Be aware that this will cause some of the tests run when you +type `make tests' to fail. + +There is a shell option, `xpg_echo', settable with `shopt', that will +change the behavior of echo at runtime. Enabling this option turns +on expansion of backslash-escape sequences. + +E6) Why doesn't a while or for loop get suspended when I type ^Z? + +This is a consequence of how job control works on Unix. The only +thing that can be suspended is the process group. This is a single +command or pipeline of commands that the shell forks and executes. + +When you run a while or for loop, the only thing that the shell forks +and executes are any commands in the while loop test and commands in +the loop bodies. These, therefore, are the only things that can be +suspended when you type ^Z. + +If you want to be able to stop the entire loop, you need to put it +within parentheses, which will force the loop into a subshell that +may be stopped (and subsequently restarted) as a single unit. + +E7) What about empty for loops in Makefiles? + +It's fairly common to see constructs like this in automatically-generated +Makefiles: + +SUBDIRS = @SUBDIRS@ + + ... + +subdirs-clean: + for d in ${SUBDIRS}; do \ + ( cd $$d && ${MAKE} ${MFLAGS} clean ) \ + done + +When SUBDIRS is empty, this results in a command like this being passed to +bash: + + for d in ; do + ( cd $d && ${MAKE} ${MFLAGS} clean ) + done + +In versions of bash before bash-2.05a, this was a syntax error. If the +reserved word `in' was present, a word must follow it before the semicolon +or newline. The language in the manual page referring to the list of words +being empty referred to the list after it is expanded. These versions of +bash required that there be at least one word following the `in' when the +construct was parsed. + +The idiomatic Makefile solution is something like: + +SUBDIRS = @SUBDIRS@ + +subdirs-clean: + subdirs=$SUBDIRS ; for d in $$subdirs; do \ + ( cd $$d && ${MAKE} ${MFLAGS} clean ) \ + done + +The latest updated POSIX standard has changed this: the word list +is no longer required. Bash versions 2.05a and later accept the +new syntax. + +E8) Why does the arithmetic evaluation code complain about `08'? + +The bash arithmetic evaluation code (used for `let', $(()), (()), and in +other places), interprets a leading `0' in numeric constants as denoting +an octal number, and a leading `0x' as denoting hexadecimal. This is +in accordance with the POSIX.2 spec, section 2.9.2.1, which states that +arithmetic constants should be handled as signed long integers as defined +by the ANSI/ISO C standard. + +The POSIX.2 interpretation committee has confirmed this: + +http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-173.html + +E9) Why does the pattern matching expression [A-Z]* match files beginning + with every letter except `z'? + +Bash-2.03, Bash-2.05 and later versions honor the current locale setting +when processing ranges within pattern matching bracket expressions ([A-Z]). +This is what POSIX.2 and SUSv3/XPG6 specify. + +The behavior of the matcher in bash-2.05 and later versions depends on the +current LC_COLLATE setting. Setting this variable to `C' or `POSIX' will +result in the traditional behavior ([A-Z] matches all uppercase ASCII +characters). Many other locales, including the en_US locale (the default +on many US versions of Linux) collate the upper and lower case letters like +this: + + AaBb...Zz + +which means that [A-Z] matches every letter except `z'. Others collate like + + aAbBcC...zZ + +which means that [A-Z] matches every letter except `a'. + +The portable way to specify upper case letters is [:upper:] instead of +A-Z; lower case may be specified as [:lower:] instead of a-z. + +Look at the manual pages for setlocale(3), strcoll(3), and, if it is +present, locale(1). If you have locale(1), you can use it to find +your current locale information even if you do not have any of the +LC_ variables set. + +My advice is to put + + export LC_COLLATE=C + +into /etc/profile and inspect any shell scripts run from cron for +constructs like [A-Z]. This will prevent things like + + rm [A-Z]* + +from removing every file in the current directory except those beginning +with `z' and still allow individual users to change the collation order. +Users may put the above command into their own profiles as well, of course. + +E10) Why does `cd //' leave $PWD as `//'? + +POSIX.2, in its description of `cd', says that *three* or more leading +slashes may be replaced with a single slash when canonicalizing the +current working directory. + +This is, I presume, for historical compatibility. Certain versions of +Unix, and early network file systems, used paths of the form +//hostname/path to access `path' on server `hostname'. + +E11) If I resize my xterm while another program is running, why doesn't bash + notice the change? + +This is another issue that deals with job control. + +The kernel maintains a notion of a current terminal process group. Members +of this process group (processes whose process group ID is equal to the +current terminal process group ID) receive terminal-generated signals like +SIGWINCH. (For more details, see the JOB CONTROL section of the bash +man page.) + +If a terminal is resized, the kernel sends SIGWINCH to each member of +the terminal's current process group (the `foreground' process group). + +When bash is running with job control enabled, each pipeline (which may be +a single command) is run in its own process group, different from bash's +process group. This foreground process group receives the SIGWINCH; bash +does not. Bash has no way of knowing that the terminal has been resized. + +There is a `checkwinsize' option, settable with the `shopt' builtin, that +will cause bash to check the window size and adjust its idea of the +terminal's dimensions each time a process stops or exits and returns control +of the terminal to bash. Enable it with `shopt -s checkwinsize'. + +E12) Why don't negative offsets in substring expansion work like I expect? + +When substring expansion of the form ${param:offset[:length} is used, +an `offset' that evaluates to a number less than zero counts back from +the end of the expanded value of $param. + +When a negative `offset' begins with a minus sign, however, unexpected things +can happen. Consider + + a=12345678 + echo ${a:-4} + +intending to print the last four characters of $a. The problem is that +${param:-word} already has a well-defined meaning: expand to word if the +expanded value of param is unset or null, and $param otherwise. + +To use negative offsets that begin with a minus sign, separate the +minus sign and the colon with a space. + +E13) Why does filename completion misbehave if a colon appears in the filename? + +Filename completion (and word completion in general) may appear to behave +improperly if there is a colon in the word to be completed. + +The colon is special to readline's word completion code: it is one of the +characters that breaks words for the completer. Readline uses these characters +in sort of the same way that bash uses $IFS: they break or separate the words +the completion code hands to the application-specific or default word +completion functions. The original intent was to make it easy to edit +colon-separated lists (such as $PATH in bash) in various applications using +readline for input. + +This is complicated by the fact that some versions of the popular +`bash-completion' programmable completion package have problems with the +default completion behavior in the presence of colons. + +The current set of completion word break characters is available in bash as +the value of the COMP_WORDBREAKS variable. Removing `:' from that value is +enough to make the colon not special to completion: + +COMP_WORDBREAKS=${COMP_WORDBREAKS//:} + +You can also quote the colon with a backslash to achieve the same result +temporarily. + +E14) Why does quoting the pattern argument to the regular expression matching + conditional operator (=~) cause regexp matching to stop working? + +In versions of bash prior to bash-3.2, the effect of quoting the regular +expression argument to the [[ command's =~ operator was not specified. +The practical effect was that double-quoting the pattern argument required +backslashes to quote special pattern characters, which interfered with the +backslash processing performed by double-quoted word expansion and was +inconsistent with how the == shell pattern matching operator treated +quoted characters. + +In bash-3.2, the shell was changed to internally quote characters in single- +and double-quoted string arguments to the =~ operator, which suppresses the +special meaning of the characters special to regular expression processing +(`.', `[', `\', `(', `), `*', `+', `?', `{', `|', `^', and `$') and forces +them to be matched literally. This is consistent with how the `==' pattern +matching operator treats quoted portions of its pattern argument. + +Since the treatment of quoted string arguments was changed, several issues +have arisen, chief among them the problem of white space in pattern arguments +and the differing treatment of quoted strings between bash-3.1 and bash-3.2. +Both problems may be solved by using a shell variable to hold the pattern. +Since word splitting is not performed when expanding shell variables in all +operands of the [[ command, this allows users to quote patterns as they wish +when assigning the variable, then expand the values to a single string that +may contain whitespace. The first problem may be solved by using backslashes +or any other quoting mechanism to escape the white space in the patterns. + +Bash-4.0 introduces the concept of a `compatibility level', controlled by +several options to the `shopt' builtin. If the `compat31' option is enabled, +bash reverts to the bash-3.1 behavior with respect to quoting the rhs of +the =~ operator. + +E15) Tell me more about the shell compatibility level. + +Bash-4.0 introduced the concept of a `shell compatibility level', specified +as a set of options to the shopt builtin (compat31, compat32, compat40 at +this writing). There is only one current compatibility level -- each +option is mutually exclusive. This list does not mention behavior that is +standard for a particular version (e.g., setting compat32 means that quoting +the rhs of the regexp matching operator quotes special regexp characters in +the word, which is default behavior in bash-3.2 and above). + +compat31 set + - the < and > operators to the [[ command do not consider the current + locale when comparing strings + - quoting the rhs of the regexp matching operator (=~) has no + special effect + +compat32 set + - the < and > operators to the [[ command do not consider the current + locale when comparing strings + +compat40 set + - the < and > operators to the [[ command do not consider the current + locale when comparing strings + - interrupting a command list such as "a ; b ; c" causes the execution + of the entire list to be aborted (in versions before bash-4.0, + interrupting one command in a list caused the next to be executed) + +compat41 set + - interrupting a command list such as "a ; b ; c" causes the execution + of the entire list to be aborted (in versions before bash-4.1, + interrupting one command in a list caused the next to be executed) + - when in posix mode, single quotes in the `word' portion of a + double-quoted parameter expansion define a new quoting context and + are treated specially + +compat42 set + - the replacement string in double-quoted pattern substitution is not + run through quote removal, as in previous versions + +Section F: Things to watch out for on certain Unix versions + +F1) Why can't I use command line editing in my `cmdtool'? + +The problem is `cmdtool' and bash fighting over the input. When +scrolling is enabled in a cmdtool window, cmdtool puts the tty in +`raw mode' to permit command-line editing using the mouse for +applications that cannot do it themselves. As a result, bash and +cmdtool each try to read keyboard input immediately, with neither +getting enough of it to be useful. + +This mode also causes cmdtool to not implement many of the +terminal functions and control sequences appearing in the +`sun-cmd' termcap entry. For a more complete explanation, see +that file examples/suncmd.termcap in the bash distribution. + +`xterm' is a better choice, and gets along with bash much more +smoothly. + +If you must use cmdtool, you can use the termcap description in +examples/suncmd.termcap. Set the TERMCAP variable to the terminal +description contained in that file, i.e. + +TERMCAP='Mu|sun-cmd:am:bs:km:pt:li#34:co#80:cl=^L:ce=\E[K:cd=\E[J:rs=\E[s:' + +Then export TERMCAP and start a new cmdtool window from that shell. +The bash command-line editing should behave better in the new +cmdtool. If this works, you can put the assignment to TERMCAP +in your bashrc file. + +F2) I built bash on Solaris 2. Why do globbing expansions and filename + completion chop off the first few characters of each filename? + +This is the consequence of building bash on SunOS 5 and linking +with the libraries in /usr/ucblib, but using the definitions +and structures from files in /usr/include. + +The actual conflict is between the dirent structure in +/usr/include/dirent.h and the struct returned by the version of +`readdir' in libucb.a (a 4.3-BSD style `struct direct'). + +Make sure you've got /usr/ccs/bin ahead of /usr/ucb in your $PATH +when configuring and building bash. This will ensure that you +use /usr/ccs/bin/cc or acc instead of /usr/ucb/cc and that you +link with libc before libucb. + +If you have installed the Sun C compiler, you may also need to +put /usr/ccs/bin and /opt/SUNWspro/bin into your $PATH before +/usr/ucb. + +F3) Why does bash dump core after I interrupt username completion or + `~user' tilde expansion on a machine running NIS? + +This is a famous and long-standing bug in the SunOS YP (sorry, NIS) +client library, which is part of libc. + +The YP library code keeps static state -- a pointer into the data +returned from the server. When YP initializes itself (setpwent), +it looks at this pointer and calls free on it if it's non-null. +So far, so good. + +If one of the YP functions is interrupted during getpwent (the +exact function is interpretwithsave()), and returns NULL, the +pointer is freed without being reset to NULL, and the function +returns. The next time getpwent is called, it sees that this +pointer is non-null, calls free, and the bash free() blows up +because it's being asked to free freed memory. + +The traditional Unix mallocs allow memory to be freed multiple +times; that's probably why this has never been fixed. You can +run configure with the `--without-gnu-malloc' option to use +the C library malloc and avoid the problem. + +F4) I'm running SVR4.2. Why is the line erased every time I type `@'? + +The `@' character is the default `line kill' character in most +versions of System V, including SVR4.2. You can change this +character to whatever you want using `stty'. For example, to +change the line kill character to control-u, type + + stty kill ^U + +where the `^' and `U' can be two separate characters. + +F5) Why does bash report syntax errors when my C News scripts use a + redirection before a subshell command? + +The actual command in question is something like + + < file ( command ) + +According to the grammar given in the POSIX.2 standard, this construct +is, in fact, a syntax error. Redirections may only precede `simple +commands'. A subshell construct such as the above is one of the shell's +`compound commands'. A redirection may only follow a compound command. + +This affects the mechanical transformation of commands that use `cat' +to pipe a file into a command (a favorite Useless-Use-Of-Cat topic on +comp.unix.shell). While most commands of the form + + cat file | command + +can be converted to `< file command', shell control structures such as +loops and subshells require `command < file'. + +The file CWRU/sh-redir-hack in the bash distribution is an +(unofficial) patch to parse.y that will modify the grammar to +support this construct. It will not apply with `patch'; you must +modify parse.y by hand. Note that if you apply this, you must +recompile with -DREDIRECTION_HACK. This introduces a large +number of reduce/reduce conflicts into the shell grammar. + +F6) Why can't I use vi-mode editing on Red Hat Linux 6.1? + +The short answer is that Red Hat screwed up. + +The long answer is that they shipped an /etc/inputrc that only works +for emacs mode editing, and then screwed all the vi users by setting +INPUTRC to /etc/inputrc in /etc/profile. + +The short fix is to do one of the following: remove or rename +/etc/inputrc, set INPUTRC=~/.inputrc in ~/.bashrc (or .bash_profile, +but make sure you export it if you do), remove the assignment to +INPUTRC from /etc/profile, add + + set keymap emacs + +to the beginning of /etc/inputrc, or bracket the key bindings in +/etc/inputrc with these lines + + $if mode=emacs + [...] + $endif + +F7) Why do bash-2.05a and bash-2.05b fail to compile `printf.def' on + HP/UX 11.x? + +HP/UX's support for long double is imperfect at best. + +GCC will support it without problems, but the HP C library functions +like strtold(3) and printf(3) don't actually work with long doubles. +HP implemented a `long_double' type as a 4-element array of 32-bit +ints, and that is what the library functions use. The ANSI C +`long double' type is a 128-bit floating point scalar. + +The easiest fix, until HP fixes things up, is to edit the generated +config.h and #undef the HAVE_LONG_DOUBLE line. After doing that, +the compilation should complete successfully. + +Section G: How can I get bash to do certain common things? + +G1) How can I get bash to read and display eight-bit characters? + +This is a process requiring several steps. + +First, you must ensure that the `physical' data path is a full eight +bits. For xterms, for example, the `vt100' resources `eightBitInput' +and `eightBitOutput' should be set to `true'. + +Once you have set up an eight-bit path, you must tell the kernel and +tty driver to leave the eighth bit of characters alone when processing +keyboard input. Use `stty' to do this: + + stty cs8 -istrip -parenb + +For old BSD-style systems, you can use + + stty pass8 + +You may also need + + stty even odd + +Finally, you need to tell readline that you will be inputting and +displaying eight-bit characters. You use readline variables to do +this. These variables can be set in your .inputrc or using the bash +`bind' builtin. Here's an example using `bind': + + bash$ bind 'set convert-meta off' + bash$ bind 'set meta-flag on' + bash$ bind 'set output-meta on' + +The `set' commands between the single quotes may also be placed +in ~/.inputrc. + +The script examples/scripts.noah/meta.bash encapsulates the bind +commands in a shell function. + +G2) How do I write a function `x' to replace builtin command `x', but + still invoke the command from within the function? + +This is why the `command' and `builtin' builtins exist. The +`command' builtin executes the command supplied as its first +argument, skipping over any function defined with that name. The +`builtin' builtin executes the builtin command given as its first +argument directly. + +For example, to write a function to replace `cd' that writes the +hostname and current directory to an xterm title bar, use +something like the following: + + cd() + { + builtin cd "$@" && xtitle "$HOST: $PWD" + } + +This could also be written using `command' instead of `builtin'; +the version above is marginally more efficient. + +G3) How can I find the value of a shell variable whose name is the value + of another shell variable? + +Versions of Bash newer than Bash-2.0 support this directly. You can use + + ${!var} + +For example, the following sequence of commands will echo `z': + + var1=var2 + var2=z + echo ${!var1} + +For sh compatibility, use the `eval' builtin. The important +thing to remember is that `eval' expands the arguments you give +it again, so you need to quote the parts of the arguments that +you want `eval' to act on. + +For example, this expression prints the value of the last positional +parameter: + + eval echo \"\$\{$#\}\" + +The expansion of the quoted portions of this expression will be +deferred until `eval' runs, while the `$#' will be expanded +before `eval' is executed. In versions of bash later than bash-2.0, + + echo ${!#} + +does the same thing. + +This is not the same thing as ksh93 `nameref' variables, though the syntax +is similar. Namerefs are available bash version 4.3, and work as in ksh93. + +G4) How can I make the bash `time' reserved word print timing output that + looks like the output from my system's /usr/bin/time? + +The bash command timing code looks for a variable `TIMEFORMAT' and +uses its value as a format string to decide how to display the +timing statistics. + +The value of TIMEFORMAT is a string with `%' escapes expanded in a +fashion similar in spirit to printf(3). The manual page explains +the meanings of the escape sequences in the format string. + +If TIMEFORMAT is not set, bash acts as if the following assignment had +been performed: + + TIMEFORMAT=$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS' + +The POSIX.2 default time format (used by `time -p command') is + + TIMEFORMAT=$'real %2R\nuser %2U\nsys %2S' + +The BSD /usr/bin/time format can be emulated with: + + TIMEFORMAT=$'\t%1R real\t%1U user\t%1S sys' + +The System V /usr/bin/time format can be emulated with: + + TIMEFORMAT=$'\nreal\t%1R\nuser\t%1U\nsys\t%1S' + +The ksh format can be emulated with: + + TIMEFORMAT=$'\nreal\t%2lR\nuser\t%2lU\nsys\t%2lS' + +G5) How do I get the current directory into my prompt? + +Bash provides a number of backslash-escape sequences which are expanded +when the prompt string (PS1 or PS2) is displayed. The full list is in +the manual page. + +The \w expansion gives the full pathname of the current directory, with +a tilde (`~') substituted for the current value of $HOME. The \W +expansion gives the basename of the current directory. To put the full +pathname of the current directory into the path without any tilde +substitution, use $PWD. Here are some examples: + + PS1='\w$ ' # current directory with tilde + PS1='\W$ ' # basename of current directory + PS1='$PWD$ ' # full pathname of current directory + +The single quotes are important in the final example to prevent $PWD from +being expanded when the assignment to PS1 is performed. + +G6) How can I rename "*.foo" to "*.bar"? + +Use the pattern removal functionality described in D3. The following `for' +loop will do the trick: + + for f in *.foo; do + mv $f ${f%foo}bar + done + +G7) How can I translate a filename from uppercase to lowercase? + +The script examples/functions/lowercase, originally written by John DuBois, +will do the trick. The converse is left as an exercise. + +G8) How can I write a filename expansion (globbing) pattern that will match + all files in the current directory except "." and ".."? + +You must have set the `extglob' shell option using `shopt -s extglob' to use +this: + + echo .!(.|) * + +A solution that works without extended globbing is given in the Unix Shell +FAQ, posted periodically to comp.unix.shell. It's a variant of + + echo .[!.]* ..?* * + +(The ..?* catches files with names of three or more characters beginning +with `..') + +Section H: Where do I go from here? + +H1) How do I report bugs in bash, and where should I look for fixes and + advice? + +Use the `bashbug' script to report bugs. It is built and +installed at the same time as bash. It provides a standard +template for reporting a problem and automatically includes +information about your configuration and build environment. + +`bashbug' sends its reports to bug-bash@gnu.org, which +is a large mailing list gatewayed to the usenet newsgroup gnu.bash.bug. + +Bug fixes, answers to questions, and announcements of new releases +are all posted to gnu.bash.bug. Discussions concerning bash features +and problems also take place there. + +To reach the bash maintainers directly, send mail to +bash-maintainers@gnu.org. + +H2) What kind of bash documentation is there? + +First, look in the doc directory in the bash distribution. It should +contain at least the following files: + +bash.1 an extensive, thorough Unix-style manual page +builtins.1 a manual page covering just bash builtin commands +bashref.texi a reference manual in GNU tex`info format +bashref.info an info version of the reference manual +FAQ this file +article.ms text of an article written for The Linux Journal +readline.3 a man page describing readline + +Postscript, HTML, and ASCII files created from the above source are +available in the documentation distribution. + +There is additional documentation available for anonymous FTP from host +ftp.cwru.edu in the `pub/bash' directory. + +Cameron Newham and Bill Rosenblatt have written a book on bash, published +by O'Reilly and Associates. The book is based on Bill Rosenblatt's Korn +Shell book. The title is ``Learning the Bash Shell'', and the ISBN number +of the third edition, published in March, 2005, is 0-596-00965-8. Look for +it in fine bookstores near you. This edition of the book has been updated +to cover bash-3.0. + +The GNU Bash Reference Manual has been published as a printed book by +Network Theory Ltd (Paperback, ISBN: 0-9541617-7-7, Nov. 2006). It covers +bash-3.2 and is available from most online bookstores (see +http://www.network-theory.co.uk/bash/manual/ for details). The publisher +will donate $1 to the Free Software Foundation for each copy sold. + +Arnold Robbins and Nelson Beebe have written ``Classic Shell Scripting'', +published by O'Reilly. The first edition, with ISBN number 0-596-00595-4, +was published in May, 2005. + +Chris F. A. Johnson, a frequent contributor to comp.unix.shell and +gnu.bash.bug, has written ``Shell Scripting Recipes: A Problem-Solution +Approach,'' a new book on shell scripting, concentrating on features of +the POSIX standard helpful to shell script writers. The first edition from +Apress, with ISBN number 1-59059-471-1, was published in May, 2005. + +H3) What's coming in future versions? + +These are features I hope to include in a future version of bash. + +Rocky Bernstein's bash debugger (support is included with bash-4.0) + +H4) What's on the bash `wish list' for future versions? + +These are features that may or may not appear in a future version of bash. + +breaking some of the shell functionality into embeddable libraries +a module system like zsh's, using dynamic loading like builtins +a bash programmer's guide with a chapter on creating loadable builtins +a better loadable interface to perl with access to the shell builtins and + variables (contributions gratefully accepted) +ksh93-like `xx.yy' variables (including some of the .sh.* variables) and + associated discipline functions +Some of the new ksh93 pattern matching operators, like backreferencing + +H5) When will the next release appear? + +The next version will appear sometime in 2015. Never make predictions. + +This document is Copyright 1995-2014 by Chester Ramey. + +Permission is hereby granted, without written agreement and +without license or royalty fees, to use, copy, and distribute +this document for any purpose, provided that the above copyright +notice appears in all copies of this document and that the +contents of this document remain unaltered. diff --git a/bash-5.1/doc/INTRO b/bash-5.1/doc/INTRO new file mode 100644 index 0000000000000000000000000000000000000000..29f208ace0e060e485bc932630069c905ea9b976 --- /dev/null +++ b/bash-5.1/doc/INTRO @@ -0,0 +1,187 @@ + BASH - The Bourne-Again Shell + +Bash is the shell, or command language interpreter, that will appear +in the GNU operating system. Bash is an sh-compatible shell that +incorporates useful features from the Korn shell (ksh) and 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. + +Bash is quite portable. It uses a configuration system that discovers +characteristics of the compilation platform at build time, and may +therefore be built on nearly every version of UNIX. Ports to +UNIX-like systems such as QNX and Minix and to non-UNIX systems such +as OS/2, Windows 95, and Windows NT are available. + +Bash includes the following features: + +Editing and Completion + +Bash offers a command-line editing facility which permits users to +edit command lines using familiar emacs or vi-style editing commands. +Editing allows corrections to be made without having to erase back +to the point of error or start the command line anew. The editing +facilities include a feature that allows users to complete command and +file names. + +The Bash line editing library is fully customizable. Users may define +their own key bindings -- the action taken when a key is pressed. A +number of variables to fine-tune editing behavior are also available. + +History and Command Re-entry + +The Bash history feature remembers commands entered to the shell and +allows them to be recalled and re-executed. The history list may be +of unlimited size. Bash allows users to search for previous commands +and reuse portions of those commands when composing new ones. The +history list may be saved across shell sessions. + +Bash allows users to control which commands are saved on the history +list. + +Job Control + +On systems that support it, Bash provides an interface to the +operating system's job control facilities, which allow processes +to be suspended and restarted, and moved between the foreground +and background. Bash allows users to selectively `forget' about +background jobs. + +Shell Functions and Aliases + +These mechanisms are available to bind a user-selected identifier to a +list of commands that will be executed when the identifier is used as +a command name. Functions allow local variables and recursion, and +have access to the environment of the calling shell. Aliases may be +used to create a mnemonic for a command name, expand a single word to +a complex command, or ensure that a command is called with a basic set +of options. + +Arrays + +Bash-2.0 supports indexed arrays of unlimited size. The subscript for +an array is an arithmetic expression. Arrays may be assigned to with +a new compound assignment syntax, and several builtins have options to +operate on array variables. Bash includes a number of built-in array +variables. + +Arithmetic + +Bash allows users to perform integer arithmetic in any base from two +to sixty-four. Nearly all of the C language arithmetic operators are +available with the same syntax and precedence as in C. Arithmetic +expansion allows an arithmetic expression to be evaluated and the +result substituted into the command line. Shell variables can be used +as operands, and the value of an expression may be assigned to a +variable. + +An arithmetic expression may be used as a command; the exit status of +the command is the value of the expression. + +ANSI-C Quoting + +There is a new quoting syntax that allows backslash-escaped characters +in strings to be expanded according to the ANSI C standard. + +Tilde Expansion + +Users' home directories may be expanded using this feature. Words +beginning with a tilde may also be expanded to the current or previous +working directory. + +Brace Expansion + +Brace expansion is a convenient way to generate a list of strings that +share a common prefix or suffix. + +Substring Capabilities + +Bash allows new strings to be created by removing leading or trailing +substrings from existing variable values, or by specifying a starting +offset and length. Portions of variable values may be matched against +shell patterns and the matching portion removed or a new value +substituted. + +Indirect Variable Expansion + +Bash makes it easy to find the value of a shell variable whose name is +the value of another variable. + +Expanded I/O Capabilities + +Bash provides several input and output features not available in sh, +including the ability to: + + o specify a file or file descriptor for both input and output + o read from or write to asynchronous processes using named pipes + o read lines ending in backslash + o display a prompt on the terminal before a read + o format menus and interpret responses to them + o echo lines exactly as input without escape processing + +Control of Builtin Commands + +Bash implements several builtin commands to give users more control +over which commands are executed. The enable builtin allows other +builtin commands to be selectively enabled or disabled. The command +and builtin builtins change the order in which the shell searches for +commands. + +On systems that provide dynamic loading, new builtins may be loaded +into a running shell from a shared object file. These new builtins +have access to all of the shell facilities. + +Help + +Bash includes a built-in help facility. + +Shell Optional Behavior + +There is a great deal of customizable shell behavior. The shopt +builtin command provides a unified interface that allows users to +alter shell defaults. + +Prompt Customization + +Bash allows the primary and secondary prompts to be customized by +interpreting a number of backslash-escaped special characters. +Parameter and variable expansion is also performed on the values of +the primary and secondary prompt strings before they are displayed. + +Security + +Bash provides a restricted shell environment. It is also possible to +control the execution of setuid/setgid scripts. + +Directory Stack + +Bash provides a `directory stack', to which directories may be added +and removed. The current directory may be changed to any directory in +the stack. It is easy to toggle between two directories in the stack. +The directory stack may be saved and restored across different shell +invocations. + +POSIX Mode + +Bash is nearly completely conformant to POSIX.2. POSIX mode changes +those few areas where the Bash default behavior differs from the +standard to match the standard. In POSIX mode, Bash is POSIX.2 +compliant. + +Internationalization + +Bash provides a new quoting syntax that allows strings to be +translated according to the current locale. The locale in which the +shell itself runs may also be changed, so that the shell messages +themselves may be language-specific. + +The command-line editing facilities allow the input of eight-bit +characters, so most of the ISO-8859 family of character sets are +supported. + +Command Timing + +Bash allows external commands, shell builtin commands and shell functions +to be timed. The format used to display the timing information may be +changed by the user. diff --git a/bash-5.1/doc/Makefile.in b/bash-5.1/doc/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..1e5c420eea4f17c00b145b9a8f74a75c009aa073 --- /dev/null +++ b/bash-5.1/doc/Makefile.in @@ -0,0 +1,340 @@ +# This Makefile is for the Bash/documentation directory -*- text -*-. +# +# Copyright (C) 2003-2015 Free Software Foundation, Inc. + +# 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 . + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_VERSION = @PACKAGE_VERSION@ + +PACKAGE_TARNAME = @PACKAGE_TARNAME@ + +# +SHELL = @MAKE_SHELL@ +RM = rm -f + +topdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +datarootdir = @datarootdir@ + +infodir = @infodir@ + +docdir = @docdir@ + +# set this to a directory name to have the HTML files installed +htmldir = @htmldir@ + +# Support an alternate destination root directory for package building +DESTDIR = + +mandir = @mandir@ +manpfx = man + +man1ext = .1 +man1dir = $(mandir)/$(manpfx)1 +man3ext = .3 +man3dir = $(mandir)/$(manpfx)3 + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +BUILD_DIR = @BUILD_DIR@ + +SUPPORT_SRCDIR = $(topdir)/support + +# bad style +RL_LIBDIR = $(topdir)/lib/readline + +# unused +TEXINDEX = texindex +TEX = tex + +MAKEINFO = makeinfo +TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi +TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html +MAN2HTML = ${BUILD_DIR}/support/man2html +HTMLPOST = ${srcdir}/htmlpost.sh +QUIETPS = #set this to -q to shut up dvips +PAPERSIZE = letter # change to a4 for A4-size paper +PSDPI = 600 # could be 300 if you like +DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky +# experimental; uses external texi2dvi for now; this needs pdftex to be present +TEXI2PDF = texi2dvi --pdf + +TEXINPUTDIR = $(RL_LIBDIR)/doc +SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS + +# These tools might not be available; they're not required +DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE} +PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ + +MKDIRS = ${SUPPORT_SRCDIR}/mkdirs + +# This should be a program that converts troff to an ascii-readable format +# added the -P -c for benefit of Mac OS X, which insists on adding colors if +# it's not present +NROFF = groff -Tascii -P -c + +# This should be a program that converts troff to postscript +GROFF = groff + +HSUSER = $(RL_LIBDIR)/doc/hsuser.texi +RLUSER = $(RL_LIBDIR)/doc/rluser.texi + +BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi + +.SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf + +.1.ps: + $(RM) $@ + -${GROFF} -man $< > $@ + +.1.0: + $(RM) $@ + -${NROFF} -man $< > $@ + +.1.html: + $(RM) $@ + -${MAN2HTML} $< | ${HTMLPOST} > $@ + +.ms.ps: + $(RM) $@ + -${GROFF} -ms $< > $@ + +.ms.txt: + $(RM) $@ + -${NROFF} -ms $< > $@ + +.3.ps: + $(RM) $@ + -${GROFF} -man $< > $@ + +.3.0: + $(RM) $@ + -${NROFF} -man $< > $@ + +.3.html: + $(RM) $@ + -${MAN2HTML} $< > $@ + +.ps.pdf: + $(RM) $@ + -${PSPDF} $< + +.dvi.pdf: + $(RM) $@ + -${DVIPDF} $< + +.dvi.ps: + ${RM} $@ + -${DVIPS} $< + +#.texi.pdf: +# $(RM) $@ +# -${TEXI2PDF} $< + +all: ps info dvi text html $(MAN2HTML) +nodvi: ps info text html +everything: all pdf + +PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps +DVIFILES = bashref.dvi bashref.ps +INFOFILES = bashref.info bash.info +MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0 +HTMLFILES = bashref.html bash.html +PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf + +ps: ${PSFILES} +dvi: ${DVIFILES} +info: ${INFOFILES} +text: ${MAN0FILES} +html: ${HTMLFILES} +pdf: ${PDFFILES} + +bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER) + ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; } + +bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER) + $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi + +# experimental +bashref.pdf: $(BASHREF_FILES) $(HSUSER) $(RLUSER) + ${SET_TEXINPUTS} $(TEXI2PDF) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; } + + +# can also use: +# $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi +bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER) + $(MAKEINFO) --html --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi + +bash.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER) + $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi -o $@ + +bash.txt: bash.1 +bash.ps: bash.1 +bash.html: bash.1 +bashbug.ps: bashbug.1 +builtins.ps: builtins.1 bash.1 +rbash.ps: rbash.1 bash.1 +bash.0: bash.1 +bashbug.0: bashbug.1 +builtins.0: builtins.1 bash.1 +rbash.0: rbash.1 bash.1 +article.ps: article.ms + +bashref.ps: bashref.dvi + +article.pdf: article.ps +#bashref.pdf: bashref.dvi +# experimental +bashref.pdf: bashref.texi +bash.pdf: bash.ps +rose94.pdf: rose94.ps + +OTHER_DOCS = $(srcdir)/FAQ $(srcdir)/INTRO +OTHER_INSTALLED_DOCS = FAQ INTRO + +$(MAN2HTML): ${topdir}/support/man2html.c + -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html) + +clean: + $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \ + *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o + ${RM} core *.core + +mostlyclean: clean + $(RM) Makefile + +distclean: clean maybe-clean + $(RM) Makefile + +maintainer-clean: clean + ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES} + ${RM} ${CREATED_FAQ} + $(RM) Makefile + +maybe-clean: + -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \ + $(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \ + fi + +installdirs: + -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir) + -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir) + -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(docdir) + -if test -n "$(htmldir)" ; then \ + $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \ + fi + +install: info installdirs + -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext} + -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext} + -$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir) +# uncomment the next lines to install the builtins man page +# sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1 +# -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext} +# -$(RM) $${TMPDIR:-/var/tmp}/builtins.1 + -if test -f bash.info; then d=.; else d=$(srcdir); fi; \ + $(INSTALL_DATA) $$d/bash.info $(DESTDIR)$(infodir)/bash.info +# run install-info if it is present to update the info directory + if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ + install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \ + else true; fi +# if htmldir is set, install the html files into that directory + -if test -n "${htmldir}" ; then \ + $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \ + $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \ + fi + +install_builtins: installdirs + sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1 + -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext} + -$(RM) $${TMPDIR:-/var/tmp}/builtins.1 + +install_everything: install install_builtins + +install-html: html + -if test -n "${htmldir}" ; then \ + $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \ + $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \ + fi + +uninstall: + -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext} + -$(RM) $(DESTDIR)$(man1dir)/bash_builtins${man1ext} + $(RM) $(DESTDIR)$(infodir)/bash.info +# run install-info if it is present to update the info directory + if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ + install-info --delete --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \ + else true; fi + -( cd $(DESTDIR)$(docdir) && $(RM) $(OTHER_INSTALLED_DOCS) ) + -if test -n "$(htmldir)" ; then \ + $(RM) $(DESTDIR)$(htmldir)/bash.html ; \ + $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \ + fi + +# for use by chet +CREATED_FAQ = faq.news faq.news2 faq.mail faq.version + +faq: ${CREATED_FAQ} + +faq.version: FAQ.version FAQ + sh mkfaqvers FAQ.version > $@ + +faq.headers.mail: FAQ.headers.mail FAQ + sh mkfaqvers FAQ.headers.mail > $@ + +faq.headers.news: FAQ.headers.news FAQ + sh mkfaqvers FAQ.headers.news > $@ + +faq.headers.news2: FAQ.headers.news2 FAQ + sh mkfaqvers FAQ.headers.news2 > $@ + +faq.news: FAQ faq.headers.news faq.version + $(RM) $@ + cat faq.headers.news faq.version FAQ > $@ + +faq.news2: FAQ faq.headers.news2 faq.version + $(RM) $@ + cat faq.headers.news2 faq.version FAQ > $@ + +faq.mail: FAQ faq.headers.mail faq.version + $(RM) $@ + cat faq.headers.mail faq.version FAQ > $@ + +inst: bashref.texi + $(SHELL) ./mkinstall + cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL + $(RM) INSTALL + +posix: bashref.texi + $(SHELL) ./mkposix + cmp -s POSIX ../POSIX || mv POSIX ../POSIX + $(RM) POSIX + +rbash: bashref.texi + $(SHELL) ./mkrbash + cmp -s RBASH ../RBASH || mv RBASH ../RBASH + $(RM) RBASH + +xdist: everything inst posix rbash diff --git a/bash-5.1/doc/README b/bash-5.1/doc/README new file mode 100644 index 0000000000000000000000000000000000000000..e3a1d248f375983b2023218445378d97a82db240 --- /dev/null +++ b/bash-5.1/doc/README @@ -0,0 +1,36 @@ +This directory contains the bash documentation. + +FAQ - a set of frequently-asked questions about Bash with answers +INTRO - a short introduction to bash +article.ms - an article I wrote about bash for The Linux Journal +bash.1 - the bash man page +builtins.1 - a man page that documents the builtins, extracted from bash.1 +bashref.texi - the `bash reference manual' +bashref.info - the `bash reference manual' processed by `makeinfo' +readline.3 - the readline man page + +The `.ps' files are postscript versions of the above. The `.html' +files are HTML versions of the man page and reference manual. The +`.0' files are formatted manual pages. The `.txt' versions are +ascii -- the output of `groff -Tascii'. + +The rest of this file explains how to use the `builtins.1' man page. + +For each command in the list of builtins create a file in man/man1 called: + +${command}.1 + +eg. +for.1 +type.1 +alias.1 +etc. + +All these files are identical as follows: + +jaws@jaws(264)$ cat alias.1 +.so man1/builtins.1 +jaws@jaws(265)$ + +Make sure you adjust the .so line in builtins.1 to reflect where you +put it. diff --git a/bash-5.1/doc/aosa-bash-full.pdf b/bash-5.1/doc/aosa-bash-full.pdf new file mode 100644 index 0000000000000000000000000000000000000000..01815492cc39e4c92cfecf6b0128f03542c34be6 Binary files /dev/null and b/bash-5.1/doc/aosa-bash-full.pdf differ diff --git a/bash-5.1/doc/aosa-bash.pdf b/bash-5.1/doc/aosa-bash.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4c8773a900aa5aa88f2f7bee86c1c5233d1f5d23 Binary files /dev/null and b/bash-5.1/doc/aosa-bash.pdf differ diff --git a/bash-5.1/doc/article.ms b/bash-5.1/doc/article.ms new file mode 100644 index 0000000000000000000000000000000000000000..d17bfa37decd7f221a366de6de62b59f4c100e4e --- /dev/null +++ b/bash-5.1/doc/article.ms @@ -0,0 +1,1114 @@ +.de SE \" start example +.sp .5 +.RS +.ft CR +.nf +.. +.de EE \" end example +.fi +.sp .5 +.RE +.ft R +.. +.TL +Bash \- The GNU shell* +.AU +Chet Ramey +Case Western Reserve University +chet@po.cwru.edu +.FS +*An earlier version of this article appeared in The Linux Journal. +.FE +.NH 1 +Introduction +.PP +.B Bash +is the shell, or command language interpreter, +that will appear in the GNU operating system. +The name is an acronym for +the \*QBourne-Again SHell\*U, a pun on Steve Bourne, the author +of the direct ancestor of the current +.UX +shell \fI/bin/sh\fP, +which appeared in the Seventh Edition Bell Labs Research version +of \s-1UNIX\s+1. +.PP +Bash is an \fBsh\fP\-compatible shell that incorporates useful +features from the Korn shell (\fBksh\fP) and the C shell (\fBcsh\fP), +described later in this article. It is ultimately intended to be a +conformant implementation of the IEEE POSIX Shell and Utilities +specification (IEEE Working Group 1003.2). It offers functional +improvements over sh for both interactive and programming use. +.PP +While the GNU operating system will most likely include a version +of the Berkeley shell csh, Bash will be the default shell. +Like other GNU software, Bash is quite portable. It currently runs +on nearly every version of +.UX +and a few other operating systems \- an independently-supported +port exists for OS/2, and there are rumors of ports to DOS and +Windows NT. Ports to \s-1UNIX\s+1-like systems such as QNX and Minix +are part of the distribution. +.PP +The original author of Bash +was Brian Fox, an employee of the Free Software Foundation. The +current developer and maintainer is Chet Ramey, a volunteer who +works at Case Western Reserve University. +.NH 1 +What's POSIX, anyway? +.PP +.I POSIX +is a name originally coined by Richard Stallman for a family of open +system standards based on \s-1UNIX\s+1. There are a number of aspects of \s-1UNIX\s+1 +under consideration for standardization, from the basic system services +at the system call and C library level to applications and tools to system +administration and management. Each area of standardization is +assigned to a working group in the 1003 series. +.PP +The POSIX Shell and Utilities standard has been developed by IEEE Working +Group 1003.2 (POSIX.2).\(dd +.FS +\(ddIEEE, \fIIEEE Standard for Information Technology -- Portable +Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, +1992. +.FE +It concentrates on the command interpreter +interface and utility programs +commonly executed from the command line or by other programs. +An initial version of the standard has been +approved and published by the IEEE, and work is currently underway to +update it. +There are four primary areas of work in the 1003.2 standard: +.IP \(bu +Aspects of the shell's syntax and command language. +A number of special builtins such as +.B cd +and +.B exec +are being specified as part of the shell, since their +functionality usually cannot be implemented by a separate executable; +.IP \(bu +A set of utilities to be called by shell scripts and applications. +Examples are programs like +.I sed, +.I tr, +and +.I awk. +Utilities commonly implemented as shell builtins +are described in this section, such as +.B test +and +.B kill . +An expansion of this section's scope, termed the User Portability +Extension, or UPE, has standardized interactive programs such as +.I vi +and +.I mailx; +.IP \(bu +A group of functional interfaces to services provided by the +shell, such as the traditional \f(CRsystem()\fP +C library function. There are functions to perform shell word +expansions, perform filename expansion (\fIglobbing\fP), obtain values +of POSIX.2 system configuration variables, retrieve values of +environment variables (\f(CRgetenv()\fP\^), and other services; +.IP \(bu +A suite of \*Qdevelopment\*U utilities such as +.I c89 +(the POSIX.2 version of \fIcc\fP), +and +.I yacc. +.PP +Bash is concerned with the aspects of the shell's behavior +defined by POSIX.2. The shell command language has of +course been standardized, including the basic flow control +and program execution constructs, I/O redirection and +pipelining, argument handling, variable expansion, and quoting. +The +.I special +builtins, which must be implemented as part of the shell to +provide the desired functionality, are specified as being +part of the shell; examples of these are +.B eval +and +.B export . +Other utilities appear in the sections of POSIX.2 not +devoted to the shell which are commonly (and in some +cases must be) implemented as builtin commands, such as +.B read +and +.B test . +POSIX.2 also specifies aspects of the shell's +interactive behavior as part of +the UPE, including job control and command line editing. +Interestingly enough, only \fIvi\fP-style line editing commands +have been standardized; \fIemacs\fP editing commands were left +out due to objections. +.PP +While POSIX.2 includes much of what the shell has traditionally +provided, some important things have been omitted as being +\*Qbeyond its scope.\*U There is, for instance, no mention of +a difference between a +.I login +shell and any other interactive shell (since POSIX.2 does not +specify a login program). No fixed startup files are defined, +either \- the standard does not mention +.I .profile . +.NH 1 +Basic Bash features +.PP +Since the Bourne shell +provides Bash with most of its philosophical underpinnings, +Bash inherits most of its features and functionality from sh. +Bash implements all of the traditional sh flow +control constructs (\fIfor\fP, \fIif\fP, \fIwhile\fP, etc.). +All of the Bourne shell builtins, including those not specified in +the POSIX.2 standard, appear in Bash. Shell \fIfunctions\fP, +introduced in the SVR2 version of the Bourne shell, +are similar to shell scripts, but are defined using a special +syntax and are executed in the same process as the calling shell. +Bash has shell functions +which behave in a fashion upward-compatible with sh functions. +There are certain shell +variables that Bash interprets in the same way as sh, such as +.B PS1 , +.B IFS , +and +.B PATH . +Bash implements essentially the same grammar, parameter and +variable expansion semantics, redirection, and quoting as the +Bourne shell. Where differences appear between the POSIX.2 +standard and traditional sh behavior, Bash follows POSIX. +.PP +The Korn Shell (\fBksh\fP) is a descendant of the Bourne shell written +at AT&T Bell Laboratories by David Korn\(dg. It provides a number of +useful features that POSIX and Bash have adopted. Many of the +interactive facilities in POSIX.2 have their roots in the ksh: +for example, the POSIX and ksh job control facilities are nearly +identical. Bash includes features from the Korn Shell for both +interactive use and shell programming. For programming, Bash provides +variables such as +.B RANDOM +and +.B REPLY , +the +.B typeset +builtin, +the ability to remove substrings from variables based on patterns, +and shell arithmetic. +.FS +\(dgMorris Bolsky and David Korn, \fIThe KornShell Command and +Programming Language\fP, Prentice Hall, 1989. +.FE +.B RANDOM +expands to a random number each time it is referenced; assigning a +value to +.B RANDOM +seeds the random number generator. +.B REPLY +is the default variable used by the +.B read +builtin when no variable names are supplied as arguments. +The +.B typeset +builtin is used to define variables and give them attributes +such as \fBreadonly\fP. +Bash arithmetic allows the evaluation of an expression and the +substitution of the result. Shell variables may be used as operands, +and the result of an expression may be assigned to a variable. +Nearly all of the operators from the C language are available, +with the same precedence rules: +.SE +$ echo $((3 + 5 * 32)) +163 +.EE +.LP +For interactive use, Bash implements ksh-style aliases and builtins +such as +.B fc +(discussed below) and +.B jobs . +Bash aliases allow a string to be substituted for a command name. +They can be used to create a mnemonic for a \s-1UNIX\s+1 command +name (\f(CRalias del=rm\fP), to expand a single word to a complex command +(\f(CRalias news='xterm -g 80x45 -title trn -e trn -e -S1 -N &'\fP), or to +ensure that a command is invoked with a basic set of options +(\f(CRalias ls="/bin/ls -F"\fP). +.PP +The C shell (\fBcsh\fP)\(dg, originally written by Bill Joy while at +Berkeley, is widely used and quite popular for its interactive +facilities. Bash includes a csh-compatible history expansion +mechanism (\*Q! history\*U), brace expansion, access to a stack +of directories via the +.B pushd , +.B popd , +and +.B dirs +builtins, and tilde expansion, to generate users' home directories. +Tilde expansion has also been adopted by both the Korn Shell and +POSIX.2. +.FS +\(dgBill Joy, An Introduction to the C Shell, \fIUNIX User's Supplementary +Documents\fP, University of California at Berkeley, 1986. +.FE +.PP +There were certain areas in which POSIX.2 felt standardization +was necessary, but no existing implementation provided the proper +behavior. The working group invented and standardized functionality +in these areas, which Bash implements. The +.B command +builtin was invented so that shell functions could be written to +replace builtins; it makes the capabilities of the builtin +available to the function. The reserved word \*Q!\*U was added +to negate the return value of a command or pipeline; it was nearly +impossible to express \*Qif not x\*U cleanly using the sh language. +There exist multiple incompatible implementations of the +.B test +builtin, which tests files for type and other attributes and performs +arithmetic and string comparisons. +POSIX considered none of these correct, so the standard +behavior was specified in terms of the number of arguments to the +command. POSIX.2 dictates exactly what will happen when four or +fewer arguments are given to +.B test , +and leaves the behavior undefined when more arguments are supplied. +Bash uses the POSIX.2 algorithm, which was conceived by David Korn. +.NH 2 +Features not in the Bourne Shell +.PP +There are a number of minor differences between Bash and the +version of sh present on most other versions of \s-1UNIX\s+1. The majority +of these are due to the POSIX standard, but some are the result of +Bash adopting features from other shells. For instance, Bash +includes the new \*Q!\*U reserved word, the +.B command +builtin, the ability of the +.B read +builtin to correctly return a line ending with a backslash, symbolic +arguments to the +.B umask +builtin, variable substring removal, a way to get the length of a variable, +and the new algorithm for the +.B test +builtin from the POSIX.2 standard, none of which appear in sh. +.PP +Bash also implements the \*Q$(...)\*U command substitution syntax, +which supersedes the sh `...` construct. +The \*Q$(...)\*U construct expands to the output of the command +contained within the +parentheses, with trailing newlines removed. The sh syntax is +accepted for backwards compatibility, but the \*Q$(...)\*U form +is preferred because its quoting rules are much simpler and it +is easier to nest. +.PP +The Bourne shell does not provide such features as brace expansion, +the ability +to define a variable and a function with the same name, local variables +in shell functions, the ability to enable and disable individual +builtins or write a function to replace a builtin, or a means to +export a shell function to a child process. +.PP +Bash has closed +a long-standing shell security hole by not using the +.B $IFS +variable to split each word read by the shell, but splitting only +the results of expansion (ksh and the 4.4 BSD sh have fixed this +as well). Useful behavior such as a means to abort +execution of a script read with the \*Q.\*U command using the +\fBreturn\fP builtin or automatically +exporting variables in the shell's environment to children is also +not present in the Bourne shell. Bash provides a much more powerful +environment for both interactive use and programming. +.NH 1 +Bash-specific Features +.PP +This section details a few of the features which make Bash unique. +Most of them provide improved interactive use, but a few programming +improvements are present as well. Full descriptions of these +features can be found in the Bash documentation. +.NH 2 +Startup Files +.PP +Bash executes startup files differently than other shells. The Bash +behavior is a compromise between the csh principle of startup files +with fixed names executed for each shell and the sh +\*Qminimalist\*U behavior. An interactive instance of Bash started +as a login shell reads and executes +.I ~/.bash_profile +(the file .bash_profile in the user's home directory), if it exists. +An interactive non-login shell reads and executes +.I ~/.bashrc . +A non-interactive shell (one begun to execute a shell script, for +example) reads no fixed startup file, but uses the value of the variable +.B $ENV , +if set, as the name of a startup file. The ksh practice of reading +.B $ENV +for every shell, with the accompanying difficulty of defining the +proper variables and functions for interactive and non-interactive +shells or having the file read only for interactive shells, was +considered too complex. Ease of use won out here. Interestingly, +the next release of ksh will change to reading +.B $ENV +only for interactive shells. +.NH 2 +New Builtin Commands +.PP +There are a few builtins which are new or have been extended in Bash. +The +.B enable +builtin allows builtin commands to be turned on and off arbitrarily. +To use the version of +.I echo +found in a user's search path rather than the Bash builtin, +\f(CRenable -n echo\fP suffices. The +.B help +builtin provides +quick synopses of the shell facilities without requiring +access to a manual page. +.B Builtin +is similar to +.B command +in that it bypasses shell functions and directly executes builtin +commands. Access to a csh-style stack of directories is provided +via the +.B pushd , +.B popd , +and +.B dirs +builtins. +.B Pushd +and +.B popd +insert and remove directories from the stack, respectively, and +.B dirs +lists the stack contents. On systems that allow fine-grained control +of resources, the +.B ulimit +builtin can be used to tune these settings. +.B Ulimit +allows a user to control, +among other things, whether core dumps are to be generated, +how much memory the shell or a child process is allowed to allocate, +and how large a file created by a child process can grow. The +.B suspend +command will stop the shell process when job control is active; most +other shells do not allow themselves to be stopped like that. +.B Type, +the Bash answer to +.B which +and +.B whence, +shows what will happen when a word is typed as a command: +.SE +$ type export +export is a shell builtin +$ type -t export +builtin +$ type bash +bash is /bin/bash +$ type cd +cd is a function +cd () +{ + builtin cd ${1+"$@"} && xtitle $HOST: $PWD +} +.EE +.LP +Various +modes tell what a command word is (reserved word, alias, function, builtin, +or file) or which version of a command will be executed based on +a user's search path. Some of this functionality has been adopted +by POSIX.2 and folded into the +.B command +utility. +.NH 2 +Editing and Completion +.PP +One area in which Bash shines is command line editing. Bash uses the +.I readline +library to read and edit lines when interactive. Readline is a +powerful and flexible input facility that a user can configure to +individual tastes. It allows lines to be edited using either emacs +or vi commands, where those commands are appropriate. The full +capability of emacs is not present \- there is no way to execute +a named command with M-x, for instance \- but the existing commands +are more than adequate. The vi mode is compliant with +the command line editing standardized by POSIX.2. +.PP +Readline is fully customizable. In addition to the basic commands +and key bindings, the library allows users to define additional +key bindings using a startup file. The +.I inputrc +file, which defaults to the file +.I ~/.inputrc , +is read each time readline initializes, permitting users to +maintain a consistent interface across a set of programs. Readline +includes an extensible interface, so each program using the +library can add its own bindable commands and program-specific +key bindings. Bash uses this facility to add bindings +that perform history expansion or shell word expansions on the current +input line. +.PP +Readline interprets a number of +variables which further tune its behavior. Variables +exist to control whether or not eight-bit characters are directly +read as input or converted to meta-prefixed key sequences (a +meta-prefixed key sequence consists of the character with the +eighth bit zeroed, preceded by the +.I meta-prefix +character, usually escape, which selects an alternate keymap), to +decide whether to output characters with the eighth bit set +directly or as a meta-prefixed key sequence, whether or not to +wrap to a new screen line when a line being edited is longer than +the screen width, the keymap to which subsequent key bindings should +apply, or even what happens when readline wants to +ring the terminal's bell. All of these variables can be set in +the inputrc file. +.PP +The startup file understands a set of C +preprocessor-like conditional constructs which allow variables or +key bindings to be assigned based on the application using readline, +the terminal currently being used, or the editing mode. Users can +add program-specific bindings to make their lives easier: I have +bindings that let me edit the value of +.B $PATH +and double-quote the current or previous word: +.SE +# Macros that are convenient for shell interaction +$if Bash +# edit the path +"\eC-xp": "PATH=${PATH}\ee\eC-e\eC-a\eef\eC-f" +# prepare to type a quoted word -- insert open and close double +# quotes and move to just after the open quote +"\eC-x\e"": "\e"\e"\eC-b" +# Quote the current or previous word +"\eC-xq": "\eeb\e"\eef\e"" +$endif +.EE +.LP +There is a readline +command to re-read the file, so users can edit the file, change +some bindings, and begin to use them almost immediately. +.PP +Bash implements the +.B bind +builtin for more dynamic control of readline than the startup file +permits. +.B Bind +is used in several ways. In +.I list +mode, it can display the current key bindings, list all the +readline editing directives available for binding, list which keys +invoke a given directive, or output the current set of key +bindings in a format that can be incorporated directly into an inputrc +file. In +.I batch +mode, it reads a series of key bindings directly from a file and +passes them to readline. In its most common usage, +.B bind +takes a single string and passes it directly to readline, which +interprets the line as if it had just been read from the inputrc file. +Both key bindings and variable assignments may appear in the +string given to +.B bind . +.PP +The readline library also provides an interface for \fIword completion\fP. +When the +.I completion +character (usually TAB) is typed, readline looks at the word currently +being entered and computes the set of filenames of which the current +word is a valid prefix. +If there is only one possible completion, the +rest of the characters are inserted directly, otherwise the +common prefix of the set of filenames is added to the current word. +A second TAB character entered immediately after a non-unique +completion causes readline to list the possible completions; there is +an option to have the list displayed immediately. +Readline provides hooks so that applications can provide specific types +of completion before the default filename completion is attempted. +This is quite flexible, though it is not completely user-programmable. +Bash, for example, can complete filenames, command names (including aliases, +builtins, shell reserved words, shell functions, and executables found +in the file system), shell variables, usernames, and hostnames. It +uses a set of heuristics that, while not perfect, is generally quite +good at determining what type of completion to attempt. +.NH 2 +History +.PP +Access to the list of commands previously entered (the \fIcommand history\fP) +is provided jointly by Bash and the readline library. Bash provides +variables (\fB$HISTFILE\fP, \fB$HISTSIZE\fP, and \fB$HISTCONTROL\fP) +and the +.B history +and +.B fc +builtins to manipulate the history list. +The value of +.B $HISTFILE +specifies the file where Bash writes the command history on exit and +reads it on startup. +.B $HISTSIZE +is used to limit the number of commands saved in the history. +.B $HISTCONTROL +provides a crude form of control over which commands are saved on +the history list: a value of +.I ignorespace +means to not save commands which begin with a space; a value of +.I ignoredups +means to not save commands identical to the last command saved. +\fB$HISTCONTROL\fP was named \fB$history_control\fP in earlier +versions of Bash; the old name is still accepted for backwards +compatibility. The +.B history +command can read or write files containing the history list +and display the current list contents. The +.B fc +builtin, adopted from POSIX.2 and the Korn Shell, allows display +and re-execution, with optional editing, +of commands from the history list. The readline +library offers a set of commands to search the history list for +a portion of the current input line or a string typed by the user. +Finally, the +.I history +library, generally incorporated directly into the readline library, +implements a facility for history recall, expansion, and re-execution +of previous commands very similar to csh +(\*Qbang history\*U, so called because the exclamation point +introduces a history substitution): +.SE +$ echo a b c d e +a b c d e +$ !! f g h i +echo a b c d e f g h i +a b c d e f g h i +$ !-2 +echo a b c d e +a b c d e +$ echo !-2:1-4 +echo a b c d +a b c d +.EE +.LP +The command history is only +saved when the shell is interactive, so it is not available for use +by shell scripts. +.NH 2 +New Shell Variables +.PP +There are a number of convenience variables that Bash interprets +to make life easier. These include +.B FIGNORE , +which is a set of filename suffixes identifying files to exclude when +completing filenames; +.B HOSTTYPE , +which is automatically set to a string describing the type of +hardware on which Bash is currently executing; +.B command_oriented_history , +which directs Bash to save all lines of a multiple-line +command such as a \fIwhile\fP or \fIfor\fP loop in a single +history entry, allowing easy re-editing; and +.B IGNOREEOF , +whose value indicates the number of consecutive EOF characters that +an interactive shell will read before exiting \- an easy way to keep +yourself from being logged out accidentally. The +.B auto_resume +variable alters the way the shell treats simple command names: +if job control is active, and this variable is set, single-word +simple commands without redirections cause the shell to first +look for and restart a suspended job with that name before +starting a new process. +.NH 2 +Brace Expansion +.PP +Since sh offers no convenient way to generate arbitrary strings that +share a common prefix or suffix (filename expansion requires that +the filenames exist), Bash implements \fIbrace expansion\fP, a +capability picked up from csh. +Brace expansion is similar to filename expansion, but the strings +generated need not correspond to existing files. A brace expression +consists of an optional +.I preamble , +followed by a pair of braces enclosing a series of comma-separated +strings, and an optional +.I postamble . +The preamble is prepended to each string within the braces, and the +postamble is then appended to each resulting string: +.SE +$ echo a{d,c,b}e +ade ace abe +.EE +.LP +As this example demonstrates, the results of brace expansion are not +sorted, as they are by filename expansion. +.NH 2 +Process Substitution +.PP +On systems that can support it, Bash provides a facility known as +\fIprocess substitution\fP. Process substitution is similar to command +substitution in that its specification includes a command to execute, +but the shell does not collect the command's output and insert it into +the command line. Rather, Bash opens a pipe to the command, which +is run in the background. The shell uses named pipes (FIFOs) or the +.I /dev/fd +method of naming open files to expand the process +substitution to a filename which connects to the pipe when opened. +This filename becomes the result of the expansion. Process substitution +can be used to compare the outputs of two different versions of an +application as part of a regression test: +.SE +$ cmp <(old_prog) <(new_prog) +.EE +.NH 2 +Prompt Customization +.PP +One of the more popular interactive features that Bash provides is +the ability to customize the prompt. Both +.B $PS1 +and +.B $PS2, +the primary and secondary prompts, are expanded before being +displayed. Parameter and variable expansion is performed when +the prompt string is expanded, so any shell variable can be +put into the prompt (e.g., +.B $SHLVL , +which indicates how deeply the current shell is nested). +Bash specially interprets characters in the prompt string +preceded by a backslash. Some of these backslash escapes are +replaced with +the current time, the date, the current working directory, +the username, and the command number or history number of the command +being entered. There is even a backslash escape to cause the shell +to change its prompt when running as root after an \fIsu\fP. +Before printing each primary prompt, Bash expands the variable +.B $PROMPT_COMMAND +and, if it has a value, executes the expanded value as a command, +allowing additional prompt customization. For example, this assignment +causes the current user, the current host, the time, the last +component of the current working directory, the level of shell +nesting, and the history number of the current command to be embedded +into the primary prompt: +.SE +$ PS1='\eu@\eh [\et] \eW($SHLVL:\e!)\e$ ' +chet@odin [21:03:44] documentation(2:636)$ cd .. +chet@odin [21:03:54] src(2:637)$ +.EE +.LP +The string being assigned is surrounded by single quotes so that if +it is exported, the value of +.B $SHLVL +will be updated by a child shell: +.SE +chet@odin [21:17:35] src(2:638)$ export PS1 +chet@odin [21:17:40] src(2:639)$ bash +chet@odin [21:17:46] src(3:696)$ +.EE +.LP +The \fP\e$\fP escape is displayed +as \*Q\fB$\fP\*U when running as a normal user, but as \*Q\fB#\fP\*U when +running as root. +.NH 2 +File System Views +.PP +Since Berkeley introduced symbolic links in 4.2 BSD, one of their most +annoying properties has been the \*Qwarping\*U to a completely +different area of the file system when using +.B cd , +and the resultant non-intuitive behavior of \*Q\fBcd ..\fP\*U. +The \s-1UNIX\s+1 kernel treats symbolic links +.I physically . +When the kernel is translating a pathname +in which one component is a symbolic link, it replaces all or part +of the pathname while processing the link. If the contents of the symbolic +link begin with a slash, the kernel replaces the +pathname entirely; if not, the link contents replace +the current component. In either case, the symbolic link +is visible. If the link value is an absolute pathname, +the user finds himself in a completely different part of the file +system. +.PP +Bash provides a +.I logical +view of the file system. In this default mode, command and filename +completion and builtin commands such as +.B cd +and +.B pushd +which change the current working directory transparently follow +symbolic links as if they were directories. +The +.B $PWD +variable, which holds the shell's idea of the current working directory, +depends on the path used to reach the directory rather than its +physical location in the local file system hierarchy. For example: +.SE +$ cd /usr/local/bin +$ echo $PWD +/usr/local/bin +$ pwd +/usr/local/bin +$ /bin/pwd +/net/share/sun4/local/bin +$ cd .. +$ pwd +/usr/local +$ /bin/pwd +/net/share/sun4/local +$ cd .. +$ pwd +/usr +$ /bin/pwd +/usr +.EE +.LP +One problem with this, of +course, arises when programs that do not understand the shell's logical +notion of the file system interpret \*Q..\*U differently. This generally +happens when Bash completes filenames containing \*Q..\*U according to a +logical hierarchy which does not correspond to their physical location. +For users who find this troublesome, a corresponding +.I physical +view of the file system is available: +.SE +$ cd /usr/local/bin +$ pwd +/usr/local/bin +$ set -o physical +$ pwd +/net/share/sun4/local/bin +.EE +.NH 2 +Internationalization +.PP +One of the most significant improvements in version 1.13 of Bash was the +change to \*Qeight-bit cleanliness\*U. Previous versions used the +eighth bit of characters to mark whether or not they were +quoted when performing word expansions. While this did not affect +the majority of users, most of whom used only seven-bit ASCII characters, +some found it confining. Beginning with version 1.13, Bash +implemented a different quoting mechanism that did not alter the +eighth bit of characters. This allowed Bash +to manipulate files with \*Qodd\*U characters in their names, but +did nothing to help users enter those names, so +version 1.13 introduced changes to readline that +made it eight-bit clean as well. Options exist that force readline to +attach no special significance to characters with the eighth bit set +(the default behavior is to convert these characters to meta-prefixed +key sequences) and to output these characters without conversion to +meta-prefixed sequences. These changes, along with the expansion of +keymaps to a full eight bits, enable readline to work with most of the +ISO-8859 family of character sets, used by many European countries. +.NH 2 +POSIX Mode +.PP +Although Bash is intended to be POSIX.2 conformant, there are areas in +which the default behavior is not compatible with the standard. For +users who wish to operate in a strict POSIX.2 environment, Bash +implements a \fIPOSIX mode\fP. When this mode is active, Bash modifies +its default operation where it differs from POSIX.2 to match the +standard. POSIX mode is entered when Bash is started with the +.B -posix +option. This feature is also available as an option to the +\fBset\fP builtin, \fBset -o posix\fP. +For compatibility with other GNU software that attempts to be POSIX.2 +compliant, Bash also enters POSIX mode if the variable +.B $POSIXLY_CORRECT +is set when Bash is started or assigned a value during execution. +.B $POSIX_PEDANTIC +is accepted as well, to be compatible with some older GNU utilities. +When Bash is started in POSIX mode, for example, it sources the +file named by the value of +.B $ENV +rather than the \*Qnormal\*U startup files, and does not allow +reserved words to be aliased. +.NH 1 +New Features and Future Plans +.PP +There are several features introduced in the current +version of Bash, version 1.14, and a number under consideration +for future releases. This section will briefly detail the new +features in version 1.14 and describe several features +that may appear in later versions. +.NH 2 +New Features in Bash-1.14 +.PP +The new features available in Bash-1.14 answer several of +the most common requests for enhancements. Most notably, there +is a mechanism +for including non-visible character sequences in prompts, such as +those which cause a terminal to print characters in different +colors or in standout mode. There was nothing preventing the use +of these sequences in earlier +versions, but the readline redisplay algorithm assumed each +character occupied physical screen space and would wrap lines +prematurely. +.PP +Readline has a few new +variables, several new bindable commands, and some additional +emacs mode default key bindings. A new history search +mode has been implemented: in this mode, readline searches the +history for lines beginning with the characters between the +beginning of the current line and the cursor. The existing readline +incremental search commands no longer match identical lines more +than once. +Filename completion now expands variables in directory names. +The history expansion facilities are now nearly +completely csh-compatible: missing modifiers have been added and +history substitution has been extended. +.PP +Several of the features described earlier, such as +.B "set -o posix" +and +.B $POSIX_PEDANTIC , +are new in version 1.14. +There is a new shell variable, +.B OSTYPE , +to which Bash assigns a value that identifies the +version of \s-1UNIX\s+1 it's +running on (great for putting architecture-specific binary directories +into the \fB$PATH\fP). +Two variables have been renamed: +.B $HISTCONTROL +replaces +.B $history_control , +and +.B $HOSTFILE +replaces +.B $hostname_completion_file . +In both cases, the old names are accepted for backwards +compatibility. The ksh +.I select +construct, which allows the generation of simple menus, +has been implemented. New capabilities have been added +to existing variables: +.B $auto_resume +can now take values of +.I exact +or +.I substring , +and +.B $HISTCONTROL +understands the value +.I ignoreboth , +which combines the two previously acceptable values. The +.B dirs +builtin has acquired options to print out specific members of the +directory stack. The +.B $nolinks +variable, which forces a physical view of the file system, +has been superseded by the +.B \-P +option to the +.B set +builtin (equivalent to \fBset -o physical\fP); the variable is retained +for backwards compatibility. The version string contained in +.B $BASH_VERSION +now includes an indication of the patch level as well as the +\*Qbuild version\*U. +Some little-used features have +been removed: the +.B bye +synonym for +.B exit +and the +.B $NO_PROMPT_VARS +variable are gone. There is now an organized test suite that can be +run as a regression test when building a new version of Bash. +.PP +The documentation has been thoroughly overhauled: +there is a new manual page on the readline library and the \fIinfo\fP +file has been updated to reflect the current version. +As always, as many bugs as possible have been fixed, although some +surely remain. +.NH 2 +Other Features +.PP +There are a few features that I hope to include in later Bash releases. +Some are based on work already done in other shells. +.PP +In addition to simple variables, a future release of Bash will include +one-dimensional arrays, using the ksh +implementation of arrays as a model. Additions to the ksh syntax, +such as \fIvarname\fP=( ... ) to assign a list of words directly to +an array and a mechanism to allow +the +.B read +builtin to read a list of values directly into an array, would be +desirable. Given those extensions, the ksh +.B "set \-A" +syntax may not be worth supporting (the +.B \-A +option assigns a list of values to an array, but is a rather +peculiar special case). +.PP +Some shells include a means of \fIprogrammable\fP word +completion, where the user specifies on a per-command basis how the +arguments of the command are to be treated when completion is attempted: +as filenames, hostnames, executable files, and so on. The other +aspects of the current Bash implementation could remain as-is; the +existing heuristics would still be valid. Only when completing the +arguments to a simple command would the programmable completion be +in effect. +.PP +It would also be nice to give the user finer-grained +control over which commands are saved onto the history list. One +proposal is for a variable, tentatively named +.B HISTIGNORE , +which would contain a colon-separated list of commands. Lines beginning +with these commands, after the restrictions of +.B $HISTCONTROL +have been applied, would not be placed onto the history list. The +shell pattern-matching capabilities could also be available when +specifying the contents of +.B $HISTIGNORE . +.PP +One thing that newer shells such as +.B wksh +(also known as +.B dtksh ) +provide is a command to dynamically load code +implementing additional builtin commands into a running shell. +This new builtin would take an object file or shared library +implementing the \*Qbody\*U of the +builtin (\fIxxx_builtin()\fP for those familiar with Bash internals) +and a structure containing the name of the new command, the function +to call when the new builtin is invoked (presumably defined in the +shared object specified as an argument), and the documentation to be +printed by the +.B help +command (possibly present in the shared object as well). It would +manage the details of extending the internal table of builtins. +.PP +A few other builtins would also be desirable: two are the POSIX.2 +.B getconf +command, which prints the values of system configuration variables +defined by POSIX.2, and a +.B disown +builtin, which causes a shell running +with job control active to \*Qforget about\*U one or more +background jobs in its internal jobs table. Using +.B getconf , +for example, a user could retrieve a value for +.B $PATH +guaranteed to find all of the POSIX standard utilities, or +find out how long filenames may be in the file system containing +a specified directory. +.PP +There are no implementation timetables for any of these features, nor +are there concrete plans to include them. If anyone has comments on +these proposals, feel free to send me electronic mail. +.NH 1 +Reflections and Lessons Learned +.PP +The lesson that has been repeated most often during Bash +development is that there are dark corners in the Bourne shell, +and people use all of them. In the original description of the +Bourne shell, quoting and the shell grammar are both poorly +specified and incomplete; subsequent descriptions have not helped +much. The grammar presented in Bourne's paper describing +the shell distributed with the Seventh Edition of \s-1UNIX\s+1\(dg +is so far off that it does not allow the command \f(CWwho|wc\fP. +In fact, as Tom Duff states: +.QP +Nobody really knows what the +Bourne shell's grammar is. Even examination of the source code is +little help.\(dd +.FS +\(dgS. R. Bourne, \*QUNIX Time-Sharing System: The UNIX Shell\*U, +\fIBell System Technical Journal\fP, 57(6), July-August, 1978, pp. 1971-1990. +.FE +.FS +\(ddTom Duff, \*QRc \- A Shell for Plan 9 and \s-1UNIX\s+1 systems\*U, +\fIProc. of the Summer 1990 EUUG Conference\fP, London, July, 1990, +pp. 21-33. +.FE +.LP +The POSIX.2 standard includes a \fIyacc\fP grammar that comes close +to capturing the Bourne shell's behavior, but it disallows some +constructs which sh accepts without complaint \- and there are +scripts out there that use them. It took a few versions and +several bug reports before Bash implemented sh-compatible quoting, +and there are still some \*Qlegal\*U sh constructs which Bash flags as +syntax errors. Complete sh compatibility is a tough nut. +.PP +The shell is bigger and slower than I would like, though the current +version is substantially faster than previously. The readline library +could stand a substantial rewrite. A hand-written parser to replace +the current \fIyacc\fP-generated one would probably result in a speedup, +and would solve one glaring problem: the shell could parse +commands in \*Q$(...)\*U constructs +as they are entered, rather than reporting errors when the construct +is expanded. +.PP +As always, there is some chaff to go with the wheat. +Areas of duplicated functionality need to be cleaned +up. There are several cases where Bash treats a variable specially to +enable functionality available another way (\fB$notify\fP vs. +\fBset -o notify\fP and \fB$nolinks\fP vs. \fBset -o physical\fP, for +instance); the special treatment of the variable name should probably +be removed. A few more things could stand removal; the +.B $allow_null_glob_expansion +and +.B $glob_dot_filenames +variables are of particularly questionable value. +The \fB$[...]\fP arithmetic evaluation syntax is redundant now that +the POSIX-mandated \fB$((...))\fP construct has been implemented, +and could be deleted. +It would be nice if the text output by the +.B help +builtin were external to the shell rather than compiled into it. +The behavior enabled by +.B $command_oriented_history , +which causes the shell to attempt to save all lines of a multi-line +command in a single history entry, should be made the default and +the variable removed. +.NH 1 +Availability +.PP +As with all other +GNU software, Bash is available for anonymous FTP from +.I prep.ai.mit.edu:/pub/gnu +and from other GNU software mirror sites. The current version is in +.I bash-1.14.1.tar.gz +in that directory. Use +.I archie +to find the nearest archive site. The +latest version is always available for FTP from +.I bash.CWRU.Edu:/pub/dist. +Bash documentation is available for FTP from +.I bash.CWRU.Edu:/pub/bash. +.PP +The Free Software Foundation sells tapes and CD-ROMs +containing Bash; send electronic mail to +\f(CRgnu@prep.ai.mit.edu\fP or call \f(CR+1-617-876-3296\fP +for more information. +.PP +Bash is also distributed with several versions of \s-1UNIX\s+1-compatible +systems. It is included as /bin/sh and /bin/bash on several Linux +distributions (more about the difference in a moment), and as contributed +software in BSDI's BSD/386* and FreeBSD. +.FS +*BSD/386 is a trademark of Berkeley Software Design, Inc. +.FE +.PP +The Linux distribution deserves special mention. There are two +configurations included in the standard Bash distribution: a +\*Qnormal\*U configuration, in which all of the standard features +are included, and a \*Qminimal\*U configuration, which omits job +control, aliases, history and command line editing, the directory +stack and +.B pushd/popd/dirs, +process substitution, prompt string special character decoding, and the +.I select +construct. This minimal version is designed to be a drop-in replacement +for the traditional \s-1UNIX\s+1 /bin/sh, and is included as the Linux +/bin/sh in several packagings. +.NH 1 +Conclusion +.PP +Bash is a worthy successor to sh. +It is sufficiently portable +to run on nearly every version of \s-1UNIX\s+1 from +4.3 BSD to SVR4.2, and several \s-1UNIX\s+1 workalikes. +It is robust enough to replace sh on most of those systems, +and provides more functionality. It has several thousand regular users, +and their feedback has helped to make it as good as it is today \- a +testament to the benefits of free software. diff --git a/bash-5.1/doc/article.pdf b/bash-5.1/doc/article.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1272a90ded7bf1cc2ff62b21fe23033cf839906f Binary files /dev/null and b/bash-5.1/doc/article.pdf differ diff --git a/bash-5.1/doc/article.ps b/bash-5.1/doc/article.ps new file mode 100644 index 0000000000000000000000000000000000000000..adbeba08bf4ce9538eea319c2a157f62dde68a26 --- /dev/null +++ b/bash-5.1/doc/article.ps @@ -0,0 +1,1442 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.19.2 +%%CreationDate: Tue Oct 22 11:07:52 2013 +%%DocumentNeededResources: font Times-Bold +%%+ font Times-Italic +%%+ font Times-Roman +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.19 2 +%%Pages: 11 +%%PageOrder: Ascend +%%DocumentMedia: Default 612 792 0 () () +%%Orientation: Portrait +%%EndComments +%%BeginDefaults +%%PageMedia: Default +%%EndDefaults +%%BeginProlog +%%BeginResource: procset grops 1.19 2 +%!PS-Adobe-3.0 Resource-ProcSet +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/setcmykcolor where{ +pop +/Fk{ +setcmykcolor fill +}bind def +}if +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/setcmykcolor where{ +pop +/Ck/setcmykcolor load def +}if +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +/setpagedevice{}def +}bind def +/PEND{ +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%EndProlog +%%BeginSetup +%%BeginFeature: *PageSize Default +<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice +%%EndFeature +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Times-Roman +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE +/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 12/Times-Bold@0 SF(Bash \255 The GNU shell*)227.904 123 Q/F1 10 +/Times-Italic@0 SF(Chet Rame)263.85 159 Q(y)-.3 E(Case W)221.72 171 Q +(estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 183 S +(et@po.cwru.edu).15 E/F2 10/Times-Bold@0 SF 2.5(1. Intr)72 219 R +(oduction)-.18 E(Bash)97 234.6 Q/F3 10/Times-Roman@0 SF .904 +(is the shell, or command language interpreter)3.404 F 3.404(,t)-.4 G +.904(hat will appear in the GNU operating system.)-3.404 F 1.075 +(The name is an acron)72 246.6 R 1.075(ym for the \231Bourne-Ag)-.15 F +1.075(ain SHell\232, a pun on Ste)-.05 F 1.375 -.15(ve B)-.25 H 1.075 +(ourne, the author of the direct).15 F .206(ancestor of the current)72 +258.6 R/F4 8/Times-Roman@0 SF(UNIX)2.706 E F3 2.706C(hell)-2.706 E +F1(/bin/sh)2.706 E F3 2.706(,w)C .205(hich appeared in the Se)-2.706 F +-.15(ve)-.25 G .205(nth Edition Bell Labs Research v).15 F(er)-.15 E(-) +-.2 E(sion of)72 270.6 Q/F5 9/Times-Roman@0 SF(UNIX)2.5 E F3(.)A .387 +(Bash is an)97 286.2 R F2(sh)2.887 E F3 .387 +(\255compatible shell that incorporates useful features from the K)B +.388(orn shell \()-.35 F F2(ksh)A F3 2.888(\)a)C .388(nd the C)-2.888 F +.023(shell \()72 298.2 R F2(csh)A F3 .023 +(\), described later in this article.)B .022 +(It is ultimately intended to be a conformant implementation of the) +5.022 F 3.568(IEEE POSIX Shell and Utilities speci\214cation \(IEEE W)72 +310.2 R 3.568(orking Group 1003.2\).)-.8 F 3.569(It of)8.569 F 3.569 +(fers functional)-.25 F(impro)72 322.2 Q -.15(ve)-.15 G(ments o).15 E +-.15(ve)-.15 G 2.5(rs).15 G 2.5(hf)-2.5 G(or both interacti)-2.5 E .3 +-.15(ve a)-.25 H(nd programming use.).15 E .697 +(While the GNU operating system will most lik)97 337.8 R .697 +(ely include a v)-.1 F .697(ersion of the Berk)-.15 F(ele)-.1 E 3.197 +(ys)-.15 G .696(hell csh, Bash)-3.197 F .015(will be the def)72 349.8 R +.015(ault shell.)-.1 F(Lik)5.015 E 2.515(eo)-.1 G .015(ther GNU softw) +-2.515 F .016(are, Bash is quite portable.)-.1 F .016 +(It currently runs on nearly e)5.016 F -.15(ve)-.25 G(ry).15 E -.15(ve) +72 361.8 S .523(rsion of).15 F F4(UNIX)3.023 E F3 .523(and a fe)3.023 F +3.023(wo)-.25 G .523 +(ther operating systems \255 an independently-supported port e)-3.023 F +.523(xists for OS/2, and)-.15 F .706 +(there are rumors of ports to DOS and W)72 373.8 R(indo)-.4 E .706 +(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)-5.706 F F5(UNIX)3.206 E F3 +(-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix)-3.206 F +(are part of the distrib)72 385.8 Q(ution.)-.2 E .405 +(The original author of Bash w)97 401.4 R .405(as Brian F)-.1 F .405 +(ox, an emplo)-.15 F .405(yee of the Free Softw)-.1 F .405(are F)-.1 F +2.905(oundation. The)-.15 F(cur)2.905 E(-)-.2 E(rent de)72 413.4 Q -.15 +(ve)-.25 G(loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15 +H(olunteer who w).45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU) +-.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(.)-.65 E F2 2.5(2. What')72 +437.4 R 2.5(sP)-.37 G(OSIX, anyway?)-2.5 E F1(POSIX)97 453 Q F3 .343 +(is a name originally coined by Richard Stallman for a f)2.843 F .343 +(amily of open system standards based)-.1 F(on)72 465 Q F5(UNIX)3.24 E +F3 5.74(.T)C .74(here are a number of aspects of)-5.74 F F5(UNIX)3.24 E +F3 .74(under consideration for standardization, from the basic)3.24 F +.192(system services at the system call and C library le)72 477 R -.15 +(ve)-.25 G 2.692(lt).15 G 2.692(oa)-2.692 G .192 +(pplications and tools to system administration and)-2.692 F 2.5 +(management. Each)72 489 R(area of standardization is assigned to a w) +2.5 E(orking group in the 1003 series.)-.1 E 2.814 +(The POSIX Shell and Utilities standard has been de)97 504.6 R -.15(ve) +-.25 G 2.814(loped by IEEE W).15 F 2.813(orking Group 1003.2)-.8 F .254 +(\(POSIX.2\).\210 It concentrates on the command interpreter interf)72 +516.6 R .253(ace and utility programs commonly e)-.1 F -.15(xe)-.15 G +(cuted).15 E 1.112(from the command line or by other programs.)72 528.6 +R 1.112(An initial v)6.112 F 1.113 +(ersion of the standard has been appro)-.15 F -.15(ve)-.15 G 3.613(da) +.15 G(nd)-3.613 E .365(published by the IEEE, and w)72 540.6 R .365 +(ork is currently underw)-.1 F .365(ay to update it.)-.1 F .365 +(There are four primary areas of w)5.365 F(ork)-.1 E +(in the 1003.2 standard:)72 552.6 Q 21.5<8341>72 568.2 S .835 +(spects of the shell')-21.5 F 3.335(ss)-.55 G .835 +(yntax and command language.)-3.335 F 3.335(An)5.835 G .835 +(umber of special b)-3.335 F .835(uiltins such as)-.2 F F2(cd)3.335 E F3 +(and)3.335 E F2(exec)97 580.2 Q F3 .545(are being speci\214ed as part o\ +f the shell, since their functionality usually cannot be implemented) +3.046 F(by a separate e)97 592.2 Q -.15(xe)-.15 G(cutable;).15 E 21.5 +<8341>72 607.8 S .926 +(set of utilities to be called by shell scripts and applications.) +-18.074 F .927(Examples are programs lik)5.927 F(e)-.1 E F1 .927 +(sed, tr)3.427 F(,)-1.11 E F3(and)97 619.8 Q F1(awk.)2.797 E F3 .297 +(Utilities commonly implemented as shell b)5.297 F .296 +(uiltins are described in this section, such as)-.2 F F2(test)2.796 E F3 +(and)97 631.8 Q F2(kill)3.422 E F3 5.922(.A)C 3.422(ne)-5.922 G .922 +(xpansion of this section')-3.572 F 3.423(ss)-.55 G .923 +(cope, termed the User Portability Extension, or UPE, has)-3.423 F +(standardized interacti)97 643.8 Q .3 -.15(ve p)-.25 H(rograms such as) +.15 E F1(vi)2.5 E F3(and)2.5 E F1(mailx;)2.5 E F3 21.5<8341>72 659.4 S +.288(group of functional interf)-18.712 F .287(aces to services pro)-.1 +F .287(vided by the shell, such as the traditional)-.15 F/F6 10 +/Courier@0 SF(system\(\))2.787 E F3 3.289(Cl)97 671.4 S .789 +(ibrary function.)-3.289 F .789(There are functions to perform shell w) +5.789 F .789(ord e)-.1 F .79(xpansions, perform \214lename e)-.15 F +(xpan-)-.15 E 3.624(sion \()97 683.4 R F1(globbing)A F3 3.624 +(\), obtain v)B 3.624(alues of POSIX.2 system con\214guration v)-.25 F +3.623(ariables, retrie)-.25 F 3.923 -.15(ve v)-.25 H 3.623(alues of)-.1 +F .32 LW 144 691.4 72 691.4 DL F4(*An earlier v)72 703.2 Q +(ersion of this article appeared in The Linux Journal.)-.12 E(\210IEEE,) +72 715 Q/F7 8/Times-Italic@0 SF 1.231(IEEE Standar)3.231 F 3.231(df) +-.296 G 1.231(or Information T)-3.231 F(ec)-.736 E(hnolo)-.12 E 1.231 +(gy -- P)-.08 F 1.231(ortable Oper)-.64 F 1.232 +(ating System Interface \(POSIX\) P)-.12 F 1.232(art 2:)-.64 F +(Shell and Utilities)72 725 Q F4 2(,1)C(992.)-2 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-2-)282.17 48 Q(en)97 84 Q(vironment v)-.4 E +(ariables \()-.25 E/F1 10/Courier@0 SF(getenv\(\))A F0 +(\), and other services;).833 E 21.5<8341>72 99.6 S(suite of \231de)-19 +E -.15(ve)-.25 G(lopment\232 utilities such as).15 E/F2 10 +/Times-Italic@0 SF(c89)2.5 E F0(\(the POSIX.2 v)2.5 E(ersion of)-.15 E +F2(cc)2.5 E F0(\), and)A F2(yacc.)2.5 E F0 .483 +(Bash is concerned with the aspects of the shell')97 115.2 R 2.983(sb) +-.55 G(eha)-2.983 E .484(vior de\214ned by POSIX.2.)-.2 F .484 +(The shell command)5.484 F 1.439 +(language has of course been standardized, including the basic \215o)72 +127.2 R 3.938(wc)-.25 G 1.438(ontrol and program e)-3.938 F -.15(xe)-.15 +G 1.438(cution con-).15 F 1.284 +(structs, I/O redirection and pipelining, ar)72 139.2 R 1.284 +(gument handling, v)-.18 F 1.284(ariable e)-.25 F 1.284 +(xpansion, and quoting.)-.15 F(The)6.285 E F2(special)3.785 E F0 -.2(bu) +72 151.2 S .676 +(iltins, which must be implemented as part of the shell to pro).2 F .676 +(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676 +(re speci\214ed)-3.176 F .7(as being part of the shell; e)72 163.2 R .7 +(xamples of these are)-.15 F/F3 10/Times-Bold@0 SF -2.3 -.15(ev a)3.201 +H(l).15 E F0(and)3.201 E F3(export)3.201 E F0 5.701(.O)C .701 +(ther utilities appear in the sections of)-5.701 F .256(POSIX.2 not de) +72 175.2 R -.2(vo)-.25 G .256(ted to the shell which are commonly \(and\ + in some cases must be\) implemented as b).2 F(uiltin)-.2 E .213 +(commands, such as)72 187.2 R F3 -.18(re)2.713 G(ad).18 E F0(and)2.713 E +F3(test)2.713 E F0 5.213(.P)C .213 +(OSIX.2 also speci\214es aspects of the shell')-5.213 F 2.713(si)-.55 G +(nteracti)-2.713 E .513 -.15(ve b)-.25 H(eha).15 E .214(vior as part)-.2 +F .598(of the UPE, including job control and command line editing.)72 +199.2 R .598(Interestingly enough, only)5.598 F F2(vi)3.098 E F0 .598 +(-style line edit-)B(ing commands ha)72 211.2 Q .3 -.15(ve b)-.2 H +(een standardized;).15 E F2(emacs)2.5 E F0 +(editing commands were left out due to objections.)2.5 E 1.128 +(While POSIX.2 includes much of what the shell has traditionally pro)97 +226.8 R 1.129(vided, some important things)-.15 F(ha)72 238.8 Q .344 +-.15(ve b)-.2 H .044(een omitted as being \231be).15 F .044 +(yond its scope.)-.15 F 5.043<9a54>-.7 G .043 +(here is, for instance, no mention of a dif)-5.043 F .043 +(ference between a)-.25 F F2(lo)72 250.8 Q(gin)-.1 E F0 1.445 +(shell and an)3.945 F 3.945(yo)-.15 G 1.445(ther interacti)-3.945 F +1.745 -.15(ve s)-.25 H 1.446 +(hell \(since POSIX.2 does not specify a login program\).).15 F 1.446 +(No \214x)6.446 F(ed)-.15 E(startup \214les are de\214ned, either \255 \ +the standard does not mention)72 262.8 Q F2(.pr)2.5 E(o\214le)-.45 E F0 +(.)A F3 2.5(3. Basic)72 286.8 R(Bash featur)2.5 E(es)-.18 E F0 1.448 +(Since the Bourne shell pro)97 302.4 R 1.448 +(vides Bash with most of its philosophical underpinnings, Bash inherits) +-.15 F .64(most of its features and functionality from sh.)72 314.4 R +.641(Bash implements all of the traditional sh \215o)5.641 F 3.141(wc) +-.25 G .641(ontrol con-)-3.141 F .8(structs \()72 326.4 R F2(for)A F0(,) +A F2(if)3.3 E F0(,)A F2(while)3.3 E F0 3.3(,e)C 3.3(tc.\). All)-3.3 F +.799(of the Bourne shell b)3.3 F .799 +(uiltins, including those not speci\214ed in the POSIX.2)-.2 F .536 +(standard, appear in Bash.)72 338.4 R(Shell)5.536 E F2(functions)3.036 E +F0 3.036(,i)C .536(ntroduced in the SVR2 v)-3.036 F .537 +(ersion of the Bourne shell, are similar)-.15 F .779 +(to shell scripts, b)72 350.4 R .779 +(ut are de\214ned using a special syntax and are e)-.2 F -.15(xe)-.15 G +.779(cuted in the same process as the calling).15 F 2.841(shell. Bash)72 +362.4 R .341(has shell functions which beha)2.841 F .641 -.15(ve i)-.2 H +2.841(naf).15 G .341(ashion upw)-2.941 F .342 +(ard-compatible with sh functions.)-.1 F .342(There are)5.342 F 1.447 +(certain shell v)72 374.4 R 1.446 +(ariables that Bash interprets in the same w)-.25 F 1.446 +(ay as sh, such as)-.1 F F3(PS1)3.946 E F0(,)A F3(IFS)3.946 E F0 3.946 +(,a)C(nd)-3.946 E F3 -.74(PA)3.946 G(TH)-.21 E F0 6.446(.B)C(ash)-6.446 +E 1.423(implements essentially the same grammar)72 386.4 R 3.924(,p)-.4 +G 1.424(arameter and v)-3.924 F 1.424(ariable e)-.25 F 1.424 +(xpansion semantics, redirection, and)-.15 F 1.06 +(quoting as the Bourne shell.)72 398.4 R 1.06(Where dif)6.06 F 1.06 +(ferences appear between the POSIX.2 standard and traditional sh)-.25 F +(beha)72 410.4 Q(vior)-.2 E 2.5(,B)-.4 G(ash follo)-2.5 E(ws POSIX.)-.25 +E 1.608(The K)97 426 R 1.608(orn Shell \()-.35 F F3(ksh)A F0 4.108(\)i)C +4.108(sad)-4.108 G 1.608(escendant of the Bourne shell written at A) +-4.108 F 1.609(T&T Bell Laboratories by)-1.11 F(Da)72 438 Q 1.059(vid K) +-.2 F 3.559(orn\207. It)-.35 F(pro)3.559 E 1.059 +(vides a number of useful features that POSIX and Bash ha)-.15 F 1.359 +-.15(ve a)-.2 H 3.558(dopted. Man).15 F 3.558(yo)-.15 G 3.558(ft)-3.558 +G(he)-3.558 E(interacti)72 450 Q 1.312 -.15(ve f)-.25 H 1.012 +(acilities in POSIX.2 ha).05 F 1.312 -.15(ve t)-.2 H 1.012 +(heir roots in the ksh: for e).15 F 1.013 +(xample, the POSIX and ksh job control)-.15 F -.1(fa)72 462 S .513 +(cilities are nearly identical. Bash includes features from the K).1 F +.513(orn Shell for both interacti)-.35 F .813 -.15(ve u)-.25 H .513 +(se and shell).15 F 3.905(programming. F)72 474 R 1.405 +(or programming, Bash pro)-.15 F 1.405(vides v)-.15 F 1.405 +(ariables such as)-.25 F F3(RANDOM)3.905 E F0(and)3.905 E F3(REPL)3.905 +E(Y)-.92 E F0 3.905(,t)C(he)-3.905 E F3(typeset)3.905 E F0 -.2(bu)72 486 +S .398(iltin, the ability to remo).2 F .698 -.15(ve s)-.15 H .398 +(ubstrings from v).15 F .398 +(ariables based on patterns, and shell arithmetic.)-.25 F F3(RANDOM) +5.397 E F0 -.15(ex)72 498 S .489 +(pands to a random number each time it is referenced; assigning a v).15 +F .49(alue to)-.25 F F3(RANDOM)2.99 E F0 .49(seeds the random)2.99 F +.055(number generator)72 510 R(.)-.55 E F3(REPL)5.055 E(Y)-.92 E F0 .054 +(is the def)2.554 F .054(ault v)-.1 F .054(ariable used by the)-.25 F F3 +-.18(re)2.554 G(ad).18 E F0 -.2(bu)2.554 G .054(iltin when no v).2 F +.054(ariable names are sup-)-.25 F .742(plied as ar)72 522 R 3.243 +(guments. The)-.18 F F3(typeset)3.243 E F0 -.2(bu)3.243 G .743 +(iltin is used to de\214ne v).2 F .743(ariables and gi)-.25 F 1.043 -.15 +(ve t)-.25 H .743(hem attrib).15 F .743(utes such as)-.2 F F3 -.18(re) +3.243 G(ad-).18 E(only)72 534 Q F0 5.512(.B)C .512(ash arithmetic allo) +-5.512 F .512(ws the e)-.25 F -.25(va)-.25 G .511(luation of an e).25 F +.511(xpression and the substitution of the result.)-.15 F .511(Shell v) +5.511 F(ari-)-.25 E .222 +(ables may be used as operands, and the result of an e)72 546 R .222 +(xpression may be assigned to a v)-.15 F 2.722(ariable. Nearly)-.25 F +.222(all of)2.722 F(the operators from the C language are a)72 558 Q +-.25(va)-.2 G(ilable, with the same precedence rules:).25 E F1 6($e)97 +576 S(cho $\(\(3 + 5 * 32\)\))-6 E(163)97 588 Q F0 -.15(Fo)72 609.6 S +3.24(ri).15 G(nteracti)-3.24 E 1.04 -.15(ve u)-.25 H .74 +(se, Bash implements ksh-style aliases and b).15 F .74(uiltins such as) +-.2 F F3(fc)3.24 E F0 .74(\(discussed belo)3.24 F .74(w\) and)-.25 F F3 +(jobs)3.24 E F0(.)A .291(Bash aliases allo)72 621.6 R 2.791(was)-.25 G +.291(tring to be substituted for a command name.)-2.791 F(The)5.291 E +2.791(yc)-.15 G .291(an be used to create a mnemonic)-2.791 F .568 +(for a)72 633.6 R/F4 9/Times-Roman@0 SF(UNIX)3.068 E F0 .568 +(command name \()3.068 F F1 .568(alias del=rm)B F0 .568(\), to e)B .567 +(xpand a single w)-.15 F .567(ord to a comple)-.1 F 3.067(xc)-.15 G .567 +(ommand \()-3.067 F F1(alias)A .255 +(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 645.6 R F0 .255 +(\), or to ensure that a command)B(is in)72 657.6 Q -.2(vo)-.4 G -.1(ke) +.2 G 2.5(dw).1 G(ith a basic set of options \()-2.5 E F1 +(alias ls="/bin/ls -F")A F0(\).)A .293(The C shell \()97 673.2 R F3(csh) +A F0 .293(\)\207, originally written by Bill Jo)B 2.792(yw)-.1 G .292 +(hile at Berk)-2.792 F(ele)-.1 E 1.592 -.65(y, i)-.15 H 2.792(sw).65 G +.292(idely used and quite popular)-2.792 F 1.499(for its interacti)72 +685.2 R 1.799 -.15(ve f)-.25 H 3.999(acilities. Bash).05 F 1.499 +(includes a csh-compatible history e)3.999 F 1.5 +(xpansion mechanism \(\231! history\232\),)-.15 F .019(brace e)72 697.2 +R .018(xpansion, access to a stack of directories via the)-.15 F F3 +(pushd)2.518 E F0(,)A F3(popd)2.518 E F0 2.518(,a)C(nd)-2.518 E F3(dirs) +2.518 E F0 -.2(bu)2.518 G .018(iltins, and tilde e).2 F(xpansion,)-.15 E +1.293(to generate users' home directories.)72 709.2 R -.35(Ti)6.294 G +1.294(lde e).35 F 1.294(xpansion has also been adopted by both the K) +-.15 F 1.294(orn Shell and)-.35 F .32 LW 144 717.2 72 717.2 DL/F5 8 +/Times-Roman@0 SF(\207Morris Bolsk)72 727.2 Q 2(ya)-.12 G(nd Da)-2 E +(vid K)-.16 E(orn,)-.28 E/F6 8/Times-Italic@0 SF(The K)2 E +(ornShell Command and Pr)-.32 E -.08(og)-.36 G -.12(ra).08 G +(mming Langua).12 E -.08(ge)-.08 G F5 2(,P).08 G(rentice Hall, 1989.)-2 +E 0 Cg EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-3-)282.17 48 Q(POSIX.2.)72 84 Q .148 +(There were certain areas in which POSIX.2 felt standardization w)97 +99.6 R .149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)-2.849 F +.149(xisting imple-)-.15 F 1.598(mentation pro)72 111.6 R 1.598 +(vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w) +-6.598 F 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597 +(nted and standardized functionality in).15 F .674 +(these areas, which Bash implements.)72 123.6 R(The)5.674 E/F1 10 +/Times-Bold@0 SF(command)3.174 E F0 -.2(bu)3.174 G .674(iltin w).2 F +.674(as in)-.1 F -.15(ve)-.4 G .674 +(nted so that shell functions could be).15 F .996(written to replace b) +72 135.6 R .996(uiltins; it mak)-.2 F .996(es the capabilities of the b) +-.1 F .995(uiltin a)-.2 F -.25(va)-.2 G .995(ilable to the function.).25 +F .995(The reserv)5.995 F(ed)-.15 E -.1(wo)72 147.6 S 1.731 +(rd \231!\232 w).1 F 1.731(as added to ne)-.1 F -.05(ga)-.15 G 1.731 +(te the return v).05 F 1.731(alue of a command or pipeline; it w)-.25 F +1.732(as nearly impossible to)-.1 F -.15(ex)72 159.6 S .286 +(press \231if not x\232 cleanly using the sh language.).15 F .286 +(There e)5.286 F .286(xist multiple incompatible implementations of the) +-.15 F F1(test)72 171.6 Q F0 -.2(bu)3.163 G .663 +(iltin, which tests \214les for type and other attrib).2 F .664 +(utes and performs arithmetic and string comparisons.)-.2 F .5 +(POSIX considered none of these correct, so the standard beha)72 183.6 R +.5(vior w)-.2 F .5(as speci\214ed in terms of the number of)-.1 F(ar)72 +195.6 Q .412(guments to the command.)-.18 F .412(POSIX.2 dictates e) +5.412 F .412(xactly what will happen when four or fe)-.15 F .412(wer ar) +-.25 F .412(guments are)-.18 F(gi)72 207.6 Q -.15(ve)-.25 G 5.01(nt).15 +G(o)-5.01 E F1(test)5.01 E F0 5.01(,a)C 2.51(nd lea)-5.01 F -.15(ve)-.2 +G 5.01(st).15 G 2.51(he beha)-5.01 F 2.51(vior unde\214ned when more ar) +-.2 F 2.51(guments are supplied.)-.18 F 2.51(Bash uses the)7.51 F +(POSIX.2 algorithm, which w)72 219.6 Q(as concei)-.1 E -.15(ve)-.25 G +2.5(db).15 G 2.5(yD)-2.5 G -.2(av)-2.5 G(id K).2 E(orn.)-.35 E F1 2.5 +(3.1. F)72 243.6 R(eatur)-.25 E(es not in the Bour)-.18 E(ne Shell)-.15 +E F0 .718(There are a number of minor dif)97 259.2 R .719 +(ferences between Bash and the v)-.25 F .719 +(ersion of sh present on most other)-.15 F -.15(ve)72 271.2 S .874 +(rsions of).15 F/F2 9/Times-Roman@0 SF(UNIX)3.374 E F0 5.873(.T)C .873 +(he majority of these are due to the POSIX standard, b)-5.873 F .873 +(ut some are the result of Bash)-.2 F .386 +(adopting features from other shells.)72 283.2 R -.15(Fo)5.386 G 2.886 +(ri).15 G .386(nstance, Bash includes the ne)-2.886 F 2.886<7799>-.25 G +.386(!\232 reserv)-2.886 F .386(ed w)-.15 F .386(ord, the)-.1 F F1 +(command)2.886 E F0 -.2(bu)72 295.2 S .116(iltin, the ability of the).2 +F F1 -.18(re)2.616 G(ad).18 E F0 -.2(bu)2.615 G .115 +(iltin to correctly return a line ending with a backslash, symbolic ar) +.2 F(guments)-.18 E .798(to the)72 307.2 R F1(umask)3.298 E F0 -.2(bu) +3.298 G .798(iltin, v).2 F .798(ariable substring remo)-.25 F -.25(va) +-.15 G .798(l, a w).25 F .799(ay to get the length of a v)-.1 F .799 +(ariable, and the ne)-.25 F 3.299(wa)-.25 G(lgo-)-3.299 E(rithm for the) +72 319.2 Q F1(test)2.5 E F0 -.2(bu)2.5 G +(iltin from the POSIX.2 standard, none of which appear in sh.).2 E 1.225 +(Bash also implements the \231$\(...\)\232 command substitution syntax,\ + which supersedes the sh `...` con-)97 334.8 R 2.851(struct. The)72 +346.8 R .351(\231$\(...\)\232 construct e)2.851 F .351(xpands to the ou\ +tput of the command contained within the parentheses, with)-.15 F .664 +(trailing ne)72 358.8 R .664(wlines remo)-.25 F -.15(ve)-.15 G 3.164 +(d. The).15 F .664(sh syntax is accepted for backw)3.164 F .664 +(ards compatibility)-.1 F 3.164(,b)-.65 G .664 +(ut the \231$\(...\)\232 form is)-3.364 F(preferred because its quoting\ + rules are much simpler and it is easier to nest.)72 370.8 Q .772 +(The Bourne shell does not pro)97 386.4 R .772 +(vide such features as brace e)-.15 F .772 +(xpansion, the ability to de\214ne a v)-.15 F(ariable)-.25 E .283 +(and a function with the same name, local v)72 398.4 R .282 +(ariables in shell functions, the ability to enable and disable indi-) +-.25 F 1.532(vidual b)72 410.4 R 1.532 +(uiltins or write a function to replace a b)-.2 F 1.533 +(uiltin, or a means to e)-.2 F 1.533(xport a shell function to a child) +-.15 F(process.)72 422.4 Q .32 +(Bash has closed a long-standing shell security hole by not using the)97 +438 R F1($IFS)2.82 E F0 -.25(va)2.82 G .32(riable to split each w).25 F +(ord)-.1 E 1.254(read by the shell, b)72 450 R 1.254 +(ut splitting only the results of e)-.2 F 1.255 +(xpansion \(ksh and the 4.4 BSD sh ha)-.15 F 1.555 -.15(ve \214)-.2 H +-.15(xe).15 G 3.755(dt).15 G 1.255(his as)-3.755 F 2.907(well\). Useful) +72 462 R(beha)2.907 E .407(vior such as a means to abort e)-.2 F -.15 +(xe)-.15 G .407(cution of a script read with the \231.).15 F 2.906<9a63> +-.7 G .406(ommand using the)-2.906 F F1 -.18(re)72 474 S(tur).18 E(n) +-.15 E F0 -.2(bu)2.742 G .242(iltin or automatically e).2 F .242 +(xporting v)-.15 F .243(ariables in the shell')-.25 F 2.743(se)-.55 G +-.4(nv)-2.743 G .243(ironment to children is also not present).4 F .969 +(in the Bourne shell.)72 486 R .968(Bash pro)5.968 F .968 +(vides a much more po)-.15 F .968(werful en)-.25 F .968 +(vironment for both interacti)-.4 F 1.268 -.15(ve u)-.25 H .968 +(se and pro-).15 F(gramming.)72 498 Q F1 2.5(4. Bash-speci\214c)72 522 R +-.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 .491(This section details a fe)97 +537.6 R 2.991(wo)-.25 G 2.991(ft)-2.991 G .491(he features which mak) +-2.991 F 2.991(eB)-.1 G .491(ash unique.)-2.991 F .492(Most of them pro) +5.491 F .492(vide impro)-.15 F -.15(ve)-.15 G(d).15 E(interacti)72 549.6 +Q 1.182 -.15(ve u)-.25 H .882(se, b).15 F .882(ut a fe)-.2 F 3.382(wp) +-.25 G .882(rogramming impro)-3.382 F -.15(ve)-.15 G .882 +(ments are present as well.).15 F .882(Full descriptions of these fea-) +5.882 F(tures can be found in the Bash documentation.)72 561.6 Q F1 2.5 +(4.1. Startup)72 585.6 R(Files)2.5 E F0 .161(Bash e)97 601.2 R -.15(xe) +-.15 G .161(cutes startup \214les dif).15 F .161 +(ferently than other shells.)-.25 F .162(The Bash beha)5.161 F .162 +(vior is a compromise between)-.2 F .29 +(the csh principle of startup \214les with \214x)72 613.2 R .29 +(ed names e)-.15 F -.15(xe)-.15 G .29 +(cuted for each shell and the sh \231minimalist\232 beha).15 F(vior)-.2 +E(.)-.55 E 2.955(An interacti)72 625.2 R 3.255 -.15(ve i)-.25 H 2.955 +(nstance of Bash started as a login shell reads and e).15 F -.15(xe)-.15 +G(cutes).15 E/F3 10/Times-Italic@0 SF(~/.bash_pr)5.456 E(o\214le)-.45 E +F0 2.956(\(the \214le)5.456 F .954(.bash_pro\214le in the user')72 637.2 +R 3.454(sh)-.55 G .953(ome directory\), if it e)-3.454 F 3.453 +(xists. An)-.15 F(interacti)3.453 E 1.253 -.15(ve n)-.25 H .953 +(on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E F3 +(~/.bashr)72 649.2 Q(c)-.37 E F0 5.641(.A)C(non-interacti)-2.5 E .942 +-.15(ve s)-.25 H .642(hell \(one be).15 F .642(gun to e)-.15 F -.15(xe) +-.15 G .642(cute a shell script, for e).15 F .642 +(xample\) reads no \214x)-.15 F .642(ed startup)-.15 F .342(\214le, b)72 +661.2 R .342(ut uses the v)-.2 F .342(alue of the v)-.25 F(ariable)-.25 +E F1($ENV)2.842 E F0 2.841(,i)C 2.841(fs)-2.841 G .341 +(et, as the name of a startup \214le.)-2.841 F .341 +(The ksh practice of read-)5.341 F(ing)72 673.2 Q F1($ENV)3.114 E F0 +.614(for e)3.114 F -.15(ve)-.25 G .614(ry shell, with the accompan).15 F +.615(ying dif)-.15 F .615(\214culty of de\214ning the proper v)-.25 F +.615(ariables and functions)-.25 F .721(for interacti)72 685.2 R 1.021 +-.15(ve a)-.25 H .721(nd non-interacti).15 F 1.021 -.15(ve s)-.25 H .721 +(hells or ha).15 F .721(ving the \214le read only for interacti)-.2 F +1.02 -.15(ve s)-.25 H .72(hells, w).15 F .72(as considered)-.1 F .158 +(too comple)72 697.2 R 2.658(x. Ease)-.15 F .158(of use w)2.658 F .158 +(on out here.)-.1 F(Interestingly)5.158 E 2.658(,t)-.65 G .158(he ne) +-2.658 F .159(xt release of ksh will change to reading)-.15 F F1($ENV) +2.659 E .32 LW 144 705.2 72 705.2 DL/F4 8/Times-Roman@0 SF .559 +(\207Bill Jo)72 715.2 R 1.599 -.52(y, A)-.08 H 2.559(nI).52 G .559 +(ntroduction to the C Shell,)-2.559 F/F5 8/Times-Italic@0 SF .558 +(UNIX User')2.558 F 2.558(sS)-.32 G .558(upplementary Documents)-2.558 F +F4 2.558(,U)C(ni)-2.558 E -.12(ve)-.2 G .558(rsity of California at).12 +F(Berk)72 725.2 Q(ele)-.08 E 1.04 -.52(y, 1)-.12 H(986.).52 E 0 Cg EP +%%Page: 4 4 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-4-)282.17 48 Q(only for interacti)72 84 Q .3 +-.15(ve s)-.25 H(hells.).15 E/F1 10/Times-Bold@0 SF 2.5(4.2. New)72 108 +R(Builtin Commands)2.5 E F0 1.02(There are a fe)97 123.6 R 3.52(wb)-.25 +G 1.02(uiltins which are ne)-3.72 F 3.52(wo)-.25 G 3.52(rh)-3.52 G -2.25 +-.2(av e)-3.52 H 1.02(been e)3.72 F 1.02(xtended in Bash.)-.15 F(The) +6.02 E F1(enable)3.52 E F0 -.2(bu)3.52 G 1.02(iltin allo).2 F(ws)-.25 E +-.2(bu)72 135.6 S .824(iltin commands to be turned on and of).2 F 3.324 +(fa)-.25 G(rbitrarily)-3.324 E 5.824(.T)-.65 G 3.324(ou)-6.624 G .824 +(se the v)-3.324 F .824(ersion of)-.15 F/F2 10/Times-Italic@0 SF(ec) +3.324 E(ho)-.15 E F0 .825(found in a user')3.324 F 3.325(ss)-.55 G +(earch)-3.325 E .625(path rather than the Bash b)72 147.6 R(uiltin,)-.2 +E/F3 10/Courier@0 SF .625(enable -n echo)3.125 F F0(suf)3.125 E 3.125 +(\214ces. The)-.25 F F1(help)3.124 E F0 -.2(bu)3.124 G .624(iltin pro).2 +F .624(vides quick synopses)-.15 F .703(of the shell f)72 159.6 R .704 +(acilities without requiring access to a manual page.)-.1 F F1(Builtin) +5.704 E F0 .704(is similar to)3.204 F F1(command)3.204 E F0 .704 +(in that it)3.204 F .342(bypasses shell functions and directly e)72 +171.6 R -.15(xe)-.15 G .342(cutes b).15 F .342(uiltin commands.)-.2 F +.342(Access to a csh-style stack of directories)5.342 F .072(is pro)72 +183.6 R .073(vided via the)-.15 F F1(pushd)2.573 E F0(,)A F1(popd)2.573 +E F0 2.573(,a)C(nd)-2.573 E F1(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2 +E F1(Pushd)5.073 E F0(and)2.573 E F1(popd)2.573 E F0 .073 +(insert and remo)2.573 F .373 -.15(ve d)-.15 H .073(irectories from the) +.15 F 2.858(stack, respecti)72 195.6 R -.15(ve)-.25 G(ly).15 E 5.358(,a) +-.65 G(nd)-5.358 E F1(dirs)5.358 E F0 2.858(lists the stack contents.) +5.358 F 2.858(On systems that allo)7.858 F 5.358<778c>-.25 G 2.857 +(ne-grained control of)-5.358 F 1.339(resources, the)72 207.6 R F1 +(ulimit)3.839 E F0 -.2(bu)3.839 G 1.339 +(iltin can be used to tune these settings.).2 F F1(Ulimit)6.34 E F0 +(allo)3.84 E 1.34(ws a user to control, among)-.25 F 1.086 +(other things, whether core dumps are to be generated, ho)72 219.6 R +3.586(wm)-.25 G 1.086(uch memory the shell or a child process is)-3.586 +F(allo)72 231.6 Q .496(wed to allocate, and ho)-.25 F 2.996(wl)-.25 G +(ar)-2.996 E .496(ge a \214le created by a child process can gro)-.18 F +4.296 -.65(w. T)-.25 H(he).65 E F1(suspend)2.996 E F0 .497(command will) +2.997 F .744(stop the shell process when job control is acti)72 243.6 R +-.15(ve)-.25 G 3.243(;m).15 G .743(ost other shells do not allo)-3.243 F +3.243(wt)-.25 G(hemselv)-3.243 E .743(es to be stopped)-.15 F(lik)72 +255.6 Q 2.717(et)-.1 G(hat.)-2.717 E F1 -.74(Ty)5.217 G(pe,).74 E F0 +.217(the Bash answer to)2.717 F F1(which)2.717 E F0(and)2.717 E F1 +(whence,)2.717 E F0(sho)2.717 E .218(ws what will happen when a w)-.25 F +.218(ord is typed as a)-.1 F(command:)72 267.6 Q F3 6($t)97 285.6 S +(ype export)-6 E(export is a shell builtin)97 297.6 Q 6($t)97 309.6 S +(ype -t export)-6 E(builtin)97 321.6 Q 6($t)97 333.6 S(ype bash)-6 E +(bash is /bin/bash)97 345.6 Q 6($t)97 357.6 S(ype cd)-6 E +(cd is a function)97 369.6 Q(cd \(\))97 381.6 Q({)97 393.6 Q +(builtin cd ${1+"$@"} && xtitle $HOST: $PWD)121 405.6 Q(})97 417.6 Q F0 +-1.11(Va)72 439.2 S .682(rious modes tell what a command w)1.11 F .681 +(ord is \(reserv)-.1 F .681(ed w)-.15 F .681(ord, alias, function, b)-.1 +F .681(uiltin, or \214le\) or which v)-.2 F(er)-.15 E(-)-.2 E 1.15 +(sion of a command will be e)72 451.2 R -.15(xe)-.15 G 1.15 +(cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)-3.65 F +1.15(Some of this functionality has been)6.15 F +(adopted by POSIX.2 and folded into the)72 463.2 Q F1(command)2.5 E F0 +(utility)2.5 E(.)-.65 E F1 2.5(4.3. Editing)72 487.2 R(and Completion) +2.5 E F0 .682(One area in which Bash shines is command line editing.)97 +502.8 R .682(Bash uses the)5.682 F F2 -.37(re)3.182 G(adline).37 E F0 +.681(library to read and)3.181 F .942(edit lines when interacti)72 514.8 +R -.15(ve)-.25 G 5.942(.R).15 G .942(eadline is a po)-5.942 F .942 +(werful and \215e)-.25 F .942(xible input f)-.15 F .943 +(acility that a user can con\214gure to)-.1 F(indi)72 526.8 Q .732 +(vidual tastes.)-.25 F .732(It allo)5.732 F .732(ws lines to be edited \ +using either emacs or vi commands, where those commands)-.25 F .2 +(are appropriate.)72 538.8 R .2 +(The full capability of emacs is not present \255 there is no w)5.2 F .2 +(ay to e)-.1 F -.15(xe)-.15 G .2(cute a named command).15 F 1.15 +(with M-x, for instance \255 b)72 550.8 R 1.15(ut the e)-.2 F 1.149 +(xisting commands are more than adequate.)-.15 F 1.149 +(The vi mode is compliant)6.149 F +(with the command line editing standardized by POSIX.2.)72 562.8 Q 1.69 +(Readline is fully customizable.)97 578.4 R 1.691 +(In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H +1.691(indings, the library).15 F(allo)72 590.4 Q .028 +(ws users to de\214ne additional k)-.25 F .327 -.15(ey b)-.1 H .027 +(indings using a startup \214le.).15 F(The)5.027 E F2(inputr)2.527 E(c) +-.37 E F0 .027(\214le, which def)2.527 F .027(aults to the \214le)-.1 F +F2(~/.inputr)72 602.4 Q(c)-.37 E F0 3.002(,i)C 3.002(sr)-3.002 G .503(e\ +ad each time readline initializes, permitting users to maintain a consi\ +stent interf)-3.002 F .503(ace across a)-.1 F .893(set of programs.)72 +614.4 R .893(Readline includes an e)5.893 F .893(xtensible interf)-.15 F +.892(ace, so each program using the library can add its)-.1 F -.25(ow)72 +626.4 S 3.56(nb).25 G 1.06(indable commands and program-speci\214c k) +-3.56 F 1.361 -.15(ey b)-.1 H 3.561(indings. Bash).15 F 1.061 +(uses this f)3.561 F 1.061(acility to add bindings that)-.1 F +(perform history e)72 638.4 Q(xpansion or shell w)-.15 E(ord e)-.1 E +(xpansions on the current input line.)-.15 E .707 +(Readline interprets a number of v)97 654 R .706 +(ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G +.706(ariables e)-6.816 F .706(xist to control)-.15 F .157 +(whether or not eight-bit characters are directly read as input or con) +72 666 R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F +.458 -.15(ey s)-.1 H .158(equences \(a).15 F(meta-pre\214x)72 678 Q .082 +(ed k)-.15 F .382 -.15(ey s)-.1 H .081(equence consists of the characte\ +r with the eighth bit zeroed, preceded by the).15 F F2(meta-pr)2.581 E +(e\214x)-.37 E F0(character)72 690 Q 3.233(,u)-.4 G .733 +(sually escape, which selects an alternate k)-3.233 F -.15(ey)-.1 G .734 +(map\), to decide whether to output characters with).15 F .624 +(the eighth bit set directly or as a meta-pre\214x)72 702 R .624(ed k) +-.15 F .924 -.15(ey s)-.1 H .623 +(equence, whether or not to wrap to a ne).15 F 3.123(ws)-.25 G .623 +(creen line)-3.123 F 1.196 +(when a line being edited is longer than the screen width, the k)72 714 +R -.15(ey)-.1 G 1.196(map to which subsequent k).15 F 1.496 -.15(ey b) +-.1 H(indings).15 E .531(should apply)72 726 R 3.031(,o)-.65 G 3.031(re) +-3.031 G -.15(ve)-3.281 G 3.031(nw).15 G .531 +(hat happens when readline w)-3.031 F .531(ants to ring the terminal') +-.1 F 3.03(sb)-.55 G 3.03(ell. All)-3.03 F .53(of these v)3.03 F +(ariables)-.25 E 0 Cg EP +%%Page: 5 5 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-5-)282.17 48 Q +(can be set in the inputrc \214le.)72 84 Q .284 +(The startup \214le understands a set of C preprocessor)97 99.6 R(-lik) +-.2 E 2.785(ec)-.1 G .285(onditional constructs which allo)-2.785 F +2.785(wv)-.25 G(ariables)-3.035 E .12(or k)72 111.6 R .42 -.15(ey b)-.1 +H .119(indings to be assigned based on the application using readline, \ +the terminal currently being used, or).15 F .338(the editing mode.)72 +123.6 R .338(Users can add program-speci\214c bindings to mak)5.338 F +2.838(et)-.1 G .338(heir li)-2.838 F -.15(ve)-.25 G 2.838(se).15 G 2.838 +(asier: I)-2.838 F(ha)2.838 E .639 -.15(ve b)-.2 H .339(indings that).15 +F(let me edit the v)72 135.6 Q(alue of)-.25 E/F1 10/Times-Bold@0 SF($P) +2.5 E -.95(AT)-.74 G(H).95 E F0(and double-quote the current or pre)2.5 +E(vious w)-.25 E(ord:)-.1 E/F2 10/Courier@0 SF 6(#M)97 153.6 S +(acros that are convenient for shell interaction)-6 E($if Bash)97 165.6 +Q 6(#e)97 177.6 S(dit the path)-6 E +("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 189.6 Q 6(#p)97 201.6 +S(repare to type a quoted word -- insert open and close double)-6 E 6 +(#q)97 213.6 S(uotes and move to just after the open quote)-6 E +("\\C-x\\"": "\\"\\"\\C-b")97 225.6 Q 6(#Q)97 237.6 S +(uote the current or previous word)-6 E("\\C-xq": "\\eb\\"\\ef\\"")97 +249.6 Q($endif)97 261.6 Q F0 .322(There is a readline command to re-rea\ +d the \214le, so users can edit the \214le, change some bindings, and b\ +e)72 283.2 R(gin)-.15 E(to use them almost immediately)72 295.2 Q(.)-.65 +E .518(Bash implements the)97 310.8 R F1(bind)3.018 E F0 -.2(bu)3.018 G +.518(iltin for more dynamic control of readline than the startup \214le\ + permits.).2 F F1(Bind)72 322.8 Q F0 .25(is used in se)2.75 F -.15(ve) +-.25 G .25(ral w).15 F 2.75(ays. In)-.1 F/F3 10/Times-Italic@0 SF(list) +2.75 E F0 .25(mode, it can display the current k)2.75 F .55 -.15(ey b) +-.1 H .25(indings, list all the readline edit-).15 F .149(ing directi)72 +334.8 R -.15(ve)-.25 G 2.649(sa).15 G -.25(va)-2.849 G .149 +(ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G +-1.9 -.4(nv o)-2.649 H .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65 +(nd).25 G(irecti)-2.65 E -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)-2.65 G +.15(utput the current set of k)-2.65 F -.15(ey)-.1 G .042(bindings in a\ + format that can be incorporated directly into an inputrc \214le.)72 +346.8 R(In)5.041 E F3(batc)2.541 E(h)-.15 E F0 .041 +(mode, it reads a series of)2.541 F -.1(ke)72 358.8 S 2.858(yb)-.05 G +.359(indings directly from a \214le and passes them to readline.)-2.858 +F .359(In its most common usage,)5.359 F F1(bind)2.859 E F0(tak)2.859 E +.359(es a sin-)-.1 F 1.117(gle string and passes it directly to readlin\ +e, which interprets the line as if it had just been read from the)72 +370.8 R(inputrc \214le.)72 382.8 Q(Both k)5 E .3 -.15(ey b)-.1 H +(indings and v).15 E(ariable assignments may appear in the string gi) +-.25 E -.15(ve)-.25 G 2.5(nt).15 G(o)-2.5 E F1(bind)2.5 E F0(.)A .53 +(The readline library also pro)97 398.4 R .53(vides an interf)-.15 F .53 +(ace for)-.1 F F3(wor)3.03 E 3.03(dc)-.37 G(ompletion)-3.03 E F0 5.53 +(.W)C .53(hen the)-5.53 F F3(completion)3.03 E F0(character)3.03 E 1.261 +(\(usually T)72 410.4 R 1.261(AB\) is typed, readline looks at the w) +-.93 F 1.26(ord currently being entered and computes the set of \214le-) +-.1 F .523(names of which the current w)72 422.4 R .523(ord is a v)-.1 F +.523(alid pre\214x.)-.25 F .524 +(If there is only one possible completion, the rest of the)5.523 F .358 +(characters are inserted directly)72 434.4 R 2.858(,o)-.65 G .358(therw\ +ise the common pre\214x of the set of \214lenames is added to the curre\ +nt)-2.858 F -.1(wo)72 446.4 S 3.199(rd. A).1 F .699(second T)3.199 F +.699(AB character entered immediately after a non-unique completion cau\ +ses readline to list)-.93 F 1.814 +(the possible completions; there is an option to ha)72 458.4 R 2.113 +-.15(ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65 +G 1.813(eadline pro)-6.813 F(vides)-.15 E .482 +(hooks so that applications can pro)72 470.4 R .482 +(vide speci\214c types of completion before the def)-.15 F .483 +(ault \214lename completion)-.1 F .132(is attempted.)72 482.4 R .132 +(This is quite \215e)5.132 F .132 +(xible, though it is not completely user)-.15 F 2.632 +(-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F +.37(complete \214lenames, command names \(including aliases, b)72 494.4 +R .37(uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37 +(ords, shell functions, and)-.1 F -.15(exe)72 506.4 S .424 +(cutables found in the \214le system\), shell v).15 F .424 +(ariables, usernames, and hostnames.)-.25 F .423 +(It uses a set of heuristics)5.424 F(that, while not perfect, is genera\ +lly quite good at determining what type of completion to attempt.)72 +518.4 Q F1 2.5(4.4. History)72 542.4 R F0 .144 +(Access to the list of commands pre)97 558 R .144(viously entered \(the) +-.25 F F3 .144(command history)2.644 F F0 2.644(\)i)C 2.644(sp)-2.644 G +(ro)-2.644 E .144(vided jointly by Bash)-.15 F .078 +(and the readline library)72 570 R 5.077(.B)-.65 G .077(ash pro)-5.077 F +.077(vides v)-.15 F .077(ariables \()-.25 F F1($HISTFILE)A F0(,)A F1 +($HISTSIZE)2.577 E F0 2.577(,a)C(nd)-2.577 E F1($HISTCONTR)2.577 E(OL) +-.3 E F0 2.577(\)a)C(nd)-2.577 E(the)72 582 Q F1(history)2.759 E F0(and) +2.759 E F1(fc)2.759 E F0 -.2(bu)2.759 G .259 +(iltins to manipulate the history list.).2 F .26(The v)5.259 F .26 +(alue of)-.25 F F1($HISTFILE)2.76 E F0 .26(speci\214es the \214le where) +2.76 F .49(Bash writes the command history on e)72 594 R .489 +(xit and reads it on startup.)-.15 F F1($HISTSIZE)5.489 E F0 .489 +(is used to limit the number)2.989 F .642(of commands sa)72 606 R -.15 +(ve)-.2 G 3.142(di).15 G 3.142(nt)-3.142 G .642(he history)-3.142 F(.) +-.65 E F1($HISTCONTR)5.642 E(OL)-.3 E F0(pro)3.142 E .642 +(vides a crude form of control o)-.15 F -.15(ve)-.15 G 3.142(rw).15 G +.642(hich com-)-3.142 F .025(mands are sa)72 618 R -.15(ve)-.2 G 2.525 +(do).15 G 2.525(nt)-2.525 G .025(he history list: a v)-2.525 F .025 +(alue of)-.25 F F3(ignor)2.525 E(espace)-.37 E F0 .025(means to not sa) +2.525 F .324 -.15(ve c)-.2 H .024(ommands which be).15 F .024 +(gin with a)-.15 F .927(space; a v)72 630 R .927(alue of)-.25 F F3 +(ignor)3.427 E(edups)-.37 E F0 .927(means to not sa)3.427 F 1.228 -.15 +(ve c)-.2 H .928(ommands identical to the last command sa).15 F -.15(ve) +-.2 G(d.).15 E F1($HIST)5.928 E(-)-.92 E(CONTR)72 642 Q(OL)-.3 E F0 -.1 +(wa)3.778 G 3.778(sn).1 G(amed)-3.778 E F1($history_contr)3.778 E(ol) +-.18 E F0 1.278(in earlier v)3.778 F 1.278 +(ersions of Bash; the old name is still accepted for)-.15 F(backw)72 654 +Q .575(ards compatibility)-.1 F 5.575(.T)-.65 G(he)-5.575 E F1(history) +3.075 E F0 .575 +(command can read or write \214les containing the history list and dis-) +3.075 F .167(play the current list contents.)72 666 R(The)5.167 E F1(fc) +2.667 E F0 -.2(bu)2.667 G .167(iltin, adopted from POSIX.2 and the K).2 +F .167(orn Shell, allo)-.35 F .167(ws display and)-.25 F(re-e)72 678 Q +-.15(xe)-.15 G .58 +(cution, with optional editing, of commands from the history list.).15 F +.58(The readline library of)5.58 F .58(fers a set of)-.25 F 1.255(comma\ +nds to search the history list for a portion of the current input line \ +or a string typed by the user)72 690 R(.)-.55 E(Finally)72 702 Q 2.535 +(,t)-.65 G(he)-2.535 E F3(history)2.535 E F0(library)2.535 E 2.535(,g) +-.65 G .036(enerally incorporated directly into the readline library) +-2.535 F 2.536(,i)-.65 G .036(mplements a f)-2.536 F .036(acility for) +-.1 F 1.023(history recall, e)72 714 R 1.022(xpansion, and re-e)-.15 F +-.15(xe)-.15 G 1.022(cution of pre).15 F 1.022(vious commands v)-.25 F +1.022(ery similar to csh \(\231bang history\232, so)-.15 F +(called because the e)72 726 Q +(xclamation point introduces a history substitution\):)-.15 E 0 Cg EP +%%Page: 6 6 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-6-)282.17 48 Q/F1 10/Courier@0 SF 6($e)97 84 S +(cho a b c d e)-6 E 6(abcde)97 96 S 6($!)97 108 S 6(!fghi)-6 G +(echo a b c d e f g h i)97 120 Q 6(abcdefghi)97 132 S 6($!)97 144 S(-2) +-6 E(echo a b c d e)97 156 Q 6(abcde)97 168 S 6($e)97 180 S(cho !-2:1-4) +-6 E(echo a b c d)97 192 Q 6(abcd)97 204 S F0 1.456 +(The command history is only sa)72 225.6 R -.15(ve)-.2 G 3.957(dw).15 G +1.457(hen the shell is interacti)-3.957 F -.15(ve)-.25 G 3.957(,s).15 G +3.957(oi)-3.957 G 3.957(ti)-3.957 G 3.957(sn)-3.957 G 1.457(ot a)-3.957 +F -.25(va)-.2 G 1.457(ilable for use by shell).25 F(scripts.)72 237.6 Q +/F2 10/Times-Bold@0 SF 2.5(4.5. New)72 261.6 R(Shell V)2.5 E(ariables) +-.92 E F0 .59(There are a number of con)97 277.2 R -.15(ve)-.4 G .589 +(nience v).15 F .589(ariables that Bash interprets to mak)-.25 F 3.089 +(el)-.1 G .589(ife easier)-3.089 F 5.589(.T)-.55 G .589(hese include) +-5.589 F F2(FIGNORE)72 289.2 Q F0 3.973(,w)C 1.473 +(hich is a set of \214lename suf)-3.973 F<8c78>-.25 E 1.474 +(es identifying \214les to e)-.15 F 1.474 +(xclude when completing \214lenames;)-.15 F F2(HOSTTYPE)72 301.2 Q F0 +2.932(,w)C .432 +(hich is automatically set to a string describing the type of hardw) +-2.932 F .431(are on which Bash is cur)-.1 F(-)-.2 E .335(rently e)72 +313.2 R -.15(xe)-.15 G(cuting;).15 E F2(command_oriented_history)2.835 E +F0 2.835(,w)C .335(hich directs Bash to sa)-2.835 F .635 -.15(ve a)-.2 H +.336(ll lines of a multiple-line com-).15 F 1.071(mand such as a)72 +325.2 R/F3 10/Times-Italic@0 SF(while)3.571 E F0(or)3.571 E F3(for)3.571 +E F0 1.071(loop in a single history entry)3.571 F 3.57(,a)-.65 G(llo) +-3.57 E 1.07(wing easy re-editing; and)-.25 F F2(IGNOREEOF)3.57 E F0(,)A +.747(whose v)72 337.2 R .747(alue indicates the number of consecuti)-.25 +F 1.047 -.15(ve E)-.25 H .747(OF characters that an interacti).15 F +1.048 -.15(ve s)-.25 H .748(hell will read before).15 F -.15(ex)72 349.2 +S 1.432(iting \255 an easy w).15 F 1.432(ay to k)-.1 F 1.432 +(eep yourself from being logged out accidentally)-.1 F 6.432(.T)-.65 G +(he)-6.432 E F2(auto_r)3.932 E(esume)-.18 E F0 -.25(va)3.932 G(riable) +.25 E .571(alters the w)72 361.2 R .571 +(ay the shell treats simple command names: if job control is acti)-.1 F +-.15(ve)-.25 G 3.071(,a).15 G .571(nd this v)-3.071 F .571 +(ariable is set, sin-)-.25 F(gle-w)72 373.2 Q .239(ord simple commands \ +without redirections cause the shell to \214rst look for and restart a \ +suspended job)-.1 F(with that name before starting a ne)72 385.2 Q 2.5 +(wp)-.25 G(rocess.)-2.5 E F2 2.5(4.6. Brace)72 409.2 R(Expansion)2.5 E +F0 .653(Since sh of)97 424.8 R .653(fers no con)-.25 F -.15(ve)-.4 G +.653(nient w).15 F .653 +(ay to generate arbitrary strings that share a common pre\214x or suf) +-.1 F<8c78>-.25 E 2.124(\(\214lename e)72 436.8 R 2.124 +(xpansion requires that the \214lenames e)-.15 F 2.123 +(xist\), Bash implements)-.15 F F3(br)4.623 E 2.123(ace e)-.15 F +(xpansion)-.2 E F0 4.623(,ac)C(apability)-4.623 E(pick)72 448.8 Q .773 +(ed up from csh.)-.1 F .774(Brace e)5.773 F .774 +(xpansion is similar to \214lename e)-.15 F .774(xpansion, b)-.15 F .774 +(ut the strings generated need not)-.2 F 1.211(correspond to e)72 460.8 +R 1.211(xisting \214les.)-.15 F 3.711(Ab)6.211 G 1.211(race e)-3.711 F +1.211(xpression consists of an optional)-.15 F F3(pr)3.71 E(eamble)-.37 +E F0 3.71(,f)C(ollo)-3.71 E 1.21(wed by a pair of)-.25 F 2.938 +(braces enclosing a series of comma-separated strings, and an optional) +72 472.8 R F3(postamble)5.438 E F0 7.938(.T)C 2.938(he preamble is) +-7.938 F(prepended to each string within the braces, and the postamble \ +is then appended to each resulting string:)72 484.8 Q F1 6($e)97 502.8 S +(cho a{d,c,b}e)-6 E(ade ace abe)97 514.8 Q F0 .306(As this e)72 536.4 R +.306(xample demonstrates, the results of brace e)-.15 F .305 +(xpansion are not sorted, as the)-.15 F 2.805(ya)-.15 G .305 +(re by \214lename e)-2.805 F(xpan-)-.15 E(sion.)72 548.4 Q F2 2.5 +(4.7. Pr)72 572.4 R(ocess Substitution)-.18 E F0 .457 +(On systems that can support it, Bash pro)97 588 R .457(vides a f)-.15 F +.457(acility kno)-.1 F .458(wn as)-.25 F F3(pr)2.958 E .458 +(ocess substitution)-.45 F F0 5.458(.P)C .458(rocess sub-)-5.458 F .347 +(stitution is similar to command substitution in that its speci\214cati\ +on includes a command to e)72 600 R -.15(xe)-.15 G .346(cute, b).15 F +.346(ut the)-.2 F .181(shell does not collect the command')72 612 R +2.681(so)-.55 G .181(utput and insert it into the command line.)-2.681 F +(Rather)5.181 E 2.681(,B)-.4 G .182(ash opens a pipe)-2.681 F 1.861 +(to the command, which is run in the background.)72 624 R 1.861 +(The shell uses named pipes \(FIFOs\) or the)6.861 F F3(/de)4.361 E +(v/fd)-.15 E F0 .961(method of naming open \214les to e)72 636 R .962(x\ +pand the process substitution to a \214lename which connects to the pip\ +e)-.15 F .104(when opened.)72 648 R .103 +(This \214lename becomes the result of the e)5.104 F 2.603 +(xpansion. Process)-.15 F .103(substitution can be used to com-)2.603 F +(pare the outputs of tw)72 660 Q 2.5(od)-.1 G(if)-2.5 E(ferent v)-.25 E +(ersions of an application as part of a re)-.15 E(gression test:)-.15 E +F1 6($c)97 678 S(mp <\(old_prog\) <\(new_prog\))-6 E 0 Cg EP +%%Page: 7 7 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-7-)282.17 48 Q/F1 10/Times-Bold@0 SF 2.5 +(4.8. Pr)72 84 R(ompt Customization)-.18 E F0 2.229 +(One of the more popular interacti)97 99.6 R 2.529 -.15(ve f)-.25 H +2.229(eatures that Bash pro).15 F 2.23 +(vides is the ability to customize the)-.15 F 3.234(prompt. Both)72 +111.6 R F1($PS1)3.234 E F0(and)3.234 E F1($PS2,)3.234 E F0 .734 +(the primary and secondary prompts, are e)3.234 F .733 +(xpanded before being displayed.)-.15 F -.15(Pa)72 123.6 S .804 +(rameter and v).15 F .804(ariable e)-.25 F .805 +(xpansion is performed when the prompt string is e)-.15 F .805 +(xpanded, so an)-.15 F 3.305(ys)-.15 G .805(hell v)-3.305 F(ariable)-.25 +E .729(can be put into the prompt \(e.g.,)72 135.6 R F1($SHL)3.228 E(VL) +-.92 E F0 3.228(,w)C .728(hich indicates ho)-3.228 F 3.228(wd)-.25 G +.728(eeply the current shell is nested\).)-3.228 F(Bash)5.728 E 1.895(s\ +pecially interprets characters in the prompt string preceded by a backs\ +lash.)72 147.6 R 1.895(Some of these backslash)6.895 F .874 +(escapes are replaced with the current time, the date, the current w)72 +159.6 R .874(orking directory)-.1 F 3.373(,t)-.65 G .873 +(he username, and the)-3.373 F .78 +(command number or history number of the command being entered.)72 171.6 +R .781(There is e)5.781 F -.15(ve)-.25 G 3.281(nab).15 G .781 +(ackslash escape to)-3.281 F .007 +(cause the shell to change its prompt when running as root after an)72 +183.6 R/F2 10/Times-Italic@0 SF(su)2.507 E F0 5.007(.B)C .007 +(efore printing each primary prompt,)-5.007 F .305(Bash e)72 195.6 R +.305(xpands the v)-.15 F(ariable)-.25 E F1($PR)2.805 E(OMPT_COMMAND)-.3 +E F0 .305(and, if it has a v)2.805 F .306(alue, e)-.25 F -.15(xe)-.15 G +.306(cutes the e).15 F .306(xpanded v)-.15 F .306(alue as)-.25 F 3.735 +(ac)72 207.6 S 1.235(ommand, allo)-3.735 F 1.234 +(wing additional prompt customization.)-.25 F -.15(Fo)6.234 G 3.734(re) +.15 G 1.234(xample, this assignment causes the current)-3.884 F(user)72 +219.6 Q 2.917(,t)-.4 G .417 +(he current host, the time, the last component of the current w)-2.917 F +.417(orking directory)-.1 F 2.917(,t)-.65 G .418(he le)-2.917 F -.15(ve) +-.25 G 2.918(lo).15 G 2.918(fs)-2.918 G .418(hell nest-)-2.918 F(ing, a\ +nd the history number of the current command to be embedded into the pr\ +imary prompt:)72 231.6 Q/F3 10/Courier@0 SF 6($P)97 249.6 S +(S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')-6 E +(chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 261.6 Q +(chet@odin [21:03:54] src\(2:637\)$)97 273.6 Q F0 .146(The string being\ + assigned is surrounded by single quotes so that if it is e)72 295.2 R +.146(xported, the v)-.15 F .146(alue of)-.25 F F1($SHL)2.646 E(VL)-.92 E +F0(will)2.646 E(be updated by a child shell:)72 307.2 Q F3 +(chet@odin [21:17:35] src\(2:638\)$ export PS1)97 325.2 Q +(chet@odin [21:17:40] src\(2:639\)$ bash)97 337.2 Q +(chet@odin [21:17:46] src\(3:696\)$)97 349.2 Q F0 +(The \\$ escape is displayed as \231)72 370.8 Q F1($)A F0 2.5<9a77>C +(hen running as a normal user)-2.5 E 2.5(,b)-.4 G(ut as \231)-2.7 E F1 +(#)A F0 2.5<9a77>C(hen running as root.)-2.5 E F1 2.5(4.9. File)72 394.8 +R(System V)2.5 E(iews)-.37 E F0 .029(Since Berk)97 410.4 R(ele)-.1 E +2.529(yi)-.15 G .029 +(ntroduced symbolic links in 4.2 BSD, one of their most anno)-2.529 F +.03(ying properties has been)-.1 F .764(the \231w)72 422.4 R .764 +(arping\232 to a completely dif)-.1 F .764 +(ferent area of the \214le system when using)-.25 F F1(cd)3.263 E F0 +3.263(,a)C .763(nd the resultant non-intu-)-3.263 F(iti)72 434.4 Q .704 +-.15(ve b)-.25 H(eha).15 E .405(vior of \231)-.2 F F1 .405(cd ..)B F0 +2.905(\232. The)B/F4 9/Times-Roman@0 SF(UNIX)2.905 E F0 -.1(ke)2.905 G +.405(rnel treats symbolic links).1 F F2(physically)2.905 E F0 5.405(.W)C +.405(hen the k)-5.405 F .405(ernel is translating)-.1 F 3.223(ap)72 +446.4 S .723(athname in which one component is a symbolic link, it repl\ +aces all or part of the pathname while pro-)-3.223 F .668 +(cessing the link.)72 458.4 R .668 +(If the contents of the symbolic link be)5.668 F .669 +(gin with a slash, the k)-.15 F .669(ernel replaces the pathname)-.1 F +.219(entirely; if not, the link contents replace the current component.) +72 470.4 R .219(In either case, the symbolic link is visible.)5.219 F +.058(If the link v)72 482.4 R .058(alue is an absolute pathname, the us\ +er \214nds himself in a completely dif)-.25 F .059 +(ferent part of the \214le sys-)-.25 F(tem.)72 494.4 Q .704(Bash pro)97 +510 R .704(vides a)-.15 F F2(lo)3.203 E(gical)-.1 E F0(vie)3.203 E 3.203 +(wo)-.25 G 3.203(ft)-3.203 G .703(he \214le system.)-3.203 F .703 +(In this def)5.703 F .703(ault mode, command and \214lename com-)-.1 F +.522(pletion and b)72 522 R .522(uiltin commands such as)-.2 F F1(cd) +3.022 E F0(and)3.022 E F1(pushd)3.022 E F0 .522 +(which change the current w)3.022 F .522(orking directory transpar)-.1 F +(-)-.2 E .127(ently follo)72 534 R 2.627(ws)-.25 G .127 +(ymbolic links as if the)-2.627 F 2.627(yw)-.15 G .127(ere directories.) +-2.627 F(The)5.126 E F1($PWD)2.626 E F0 -.25(va)2.626 G .126 +(riable, which holds the shell').25 F 2.626(si)-.55 G .126(dea of)-2.626 +F .366(the current w)72 546 R .366(orking directory)-.1 F 2.866(,d)-.65 +G .367 +(epends on the path used to reach the directory rather than its ph) +-2.866 F .367(ysical loca-)-.05 F +(tion in the local \214le system hierarch)72 558 Q 3.8 -.65(y. F)-.05 H +(or e).5 E(xample:)-.15 E F3 6($c)97 576 S 6(d/)-6 G(usr/local/bin)-6 E +6($e)97 588 S(cho $PWD)-6 E(/usr/local/bin)97 600 Q 6($p)97 612 S(wd)-6 +E(/usr/local/bin)97 624 Q 6($/)97 636 S(bin/pwd)-6 E +(/net/share/sun4/local/bin)97 648 Q 6($c)97 660 S 6(d.)-6 G(.)-6 E 6($p) +97 672 S(wd)-6 E(/usr/local)97 684 Q 6($/)97 696 S(bin/pwd)-6 E +(/net/share/sun4/local)97 708 Q 6($c)97 720 S 6(d.)-6 G(.)-6 E 0 Cg EP +%%Page: 8 8 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-8-)282.17 48 Q/F1 10/Courier@0 SF 6($p)97 84 S +(wd)-6 E(/usr)97 96 Q 6($/)97 108 S(bin/pwd)-6 E(/usr)97 120 Q F0 .3(On\ +e problem with this, of course, arises when programs that do not unders\ +tand the shell')72 141.6 R 2.8(sl)-.55 G .3(ogical notion of)-2.8 F .217 +(the \214le system interpret \231..)72 153.6 R 2.718<9a64>-.7 G(if) +-2.718 E(ferently)-.25 E 5.218(.T)-.65 G .218 +(his generally happens when Bash completes \214lenames containing)-5.218 +F(\231..)72 165.6 Q 3.384<9a61>-.7 G .884 +(ccording to a logical hierarch)-3.384 F 3.384(yw)-.05 G .884 +(hich does not correspond to their ph)-3.384 F .883(ysical location.) +-.05 F -.15(Fo)5.883 G 3.383(ru).15 G .883(sers who)-3.383 F +(\214nd this troublesome, a corresponding)72 177.6 Q/F2 10 +/Times-Italic@0 SF(physical)2.5 E F0(vie)2.5 E 2.5(wo)-.25 G 2.5(ft)-2.5 +G(he \214le system is a)-2.5 E -.25(va)-.2 G(ilable:).25 E F1 6($c)97 +195.6 S 6(d/)-6 G(usr/local/bin)-6 E 6($p)97 207.6 S(wd)-6 E +(/usr/local/bin)97 219.6 Q 6($s)97 231.6 S(et -o physical)-6 E 6($p)97 +243.6 S(wd)-6 E(/net/share/sun4/local/bin)97 255.6 Q/F3 10/Times-Bold@0 +SF 2.5(4.10. Inter)72 285.6 R(nationalization)-.15 E F0 .145 +(One of the most signi\214cant impro)97 301.2 R -.15(ve)-.15 G .145 +(ments in v).15 F .145(ersion 1.13 of Bash w)-.15 F .145 +(as the change to \231eight-bit clean-)-.1 F 2.933(liness\232. Pre)72 +313.2 R .433(vious v)-.25 F .432 +(ersions used the eighth bit of characters to mark whether or not the) +-.15 F 2.932(yw)-.15 G .432(ere quoted when)-2.932 F 1.495(performing w) +72 325.2 R 1.495(ord e)-.1 F 3.995(xpansions. While)-.15 F 1.495 +(this did not af)3.995 F 1.496 +(fect the majority of users, most of whom used only)-.25 F(se)72 337.2 Q +-.15(ve)-.25 G 1.236(n-bit ASCII characters, some found it con\214ning.) +.15 F(Be)6.236 E 1.236(ginning with v)-.15 F 1.236 +(ersion 1.13, Bash implemented a)-.15 F(dif)72 349.2 Q .02(ferent quoti\ +ng mechanism that did not alter the eighth bit of characters.)-.25 F +.021(This allo)5.021 F .021(wed Bash to manipulate)-.25 F .427 +(\214les with \231odd\232 characters in their names, b)72 361.2 R .427 +(ut did nothing to help users enter those names, so v)-.2 F .426 +(ersion 1.13)-.15 F 1.458 +(introduced changes to readline that made it eight-bit clean as well.)72 +373.2 R 1.458(Options e)6.458 F 1.458(xist that force readline to)-.15 F +.744(attach no special signi\214cance to characters with the eighth bit\ + set \(the def)72 385.2 R .744(ault beha)-.1 F .744(vior is to con)-.2 F +-.15(ve)-.4 G .744(rt these).15 F .641(characters to meta-pre\214x)72 +397.2 R .641(ed k)-.15 F .941 -.15(ey s)-.1 H .642 +(equences\) and to output these characters without con).15 F -.15(ve)-.4 +G .642(rsion to meta-pre-).15 F<8c78>72 409.2 Q .008(ed sequences.)-.15 +F .007(These changes, along with the e)5.007 F .007(xpansion of k)-.15 F +-.15(ey)-.1 G .007(maps to a full eight bits, enable readline to).15 F +-.1(wo)72 421.2 S(rk with most of the ISO-8859 f).1 E +(amily of character sets, used by man)-.1 E 2.5(yE)-.15 G +(uropean countries.)-2.5 E F3 2.5(4.11. POSIX)72 445.2 R(Mode)2.5 E F0 +.584(Although Bash is intended to be POSIX.2 conformant, there are area\ +s in which the def)97 460.8 R .584(ault beha)-.1 F(vior)-.2 E .463 +(is not compatible with the standard.)72 472.8 R -.15(Fo)5.463 G 2.962 +(ru).15 G .462(sers who wish to operate in a strict POSIX.2 en)-2.962 F +.462(vironment, Bash)-.4 F .505(implements a)72 484.8 R F2 .505 +(POSIX mode)3.005 F F0 5.505(.W)C .505(hen this mode is acti)-5.505 F +-.15(ve)-.25 G 3.005(,B).15 G .505(ash modi\214es its def)-3.005 F .505 +(ault operation where it dif)-.1 F(fers)-.25 E .267 +(from POSIX.2 to match the standard.)72 496.8 R .266 +(POSIX mode is entered when Bash is started with the)5.267 F F3(-posix) +2.766 E F0(option.)2.766 E .149(This feature is also a)72 508.8 R -.25 +(va)-.2 G .149(ilable as an option to the).25 F F3(set)2.649 E F0 -.2 +(bu)2.649 G(iltin,).2 E F3 .149(set -o posix)2.649 F F0 5.149(.F)C .149 +(or compatibility with other GNU)-5.299 F(softw)72 520.8 Q 4.02(are tha\ +t attempts to be POSIX.2 compliant, Bash also enters POSIX mode if the \ +v)-.1 F(ariable)-.25 E F3($POSIXL)72 532.8 Q(Y_CORRECT)-.92 E F0 5.824 +(is set when Bash is started or assigned a v)8.324 F 5.825 +(alue during e)-.25 F -.15(xe)-.15 G(cution.).15 E F3($POSIX_PED)72 +544.8 Q(ANTIC)-.35 E F0 .27 +(is accepted as well, to be compatible with some older GNU utilities.) +2.77 F .27(When Bash is)5.27 F .506(started in POSIX mode, for e)72 +556.8 R .506(xample, it sources the \214le named by the v)-.15 F .507 +(alue of)-.25 F F3($ENV)3.007 E F0 .507(rather than the \231nor)3.007 F +(-)-.2 E(mal\232 startup \214les, and does not allo)72 568.8 Q 2.5(wr) +-.25 G(eserv)-2.5 E(ed w)-.15 E(ords to be aliased.)-.1 E F3 2.5(5. New) +72 592.8 R -.25(Fe)2.5 G(atur).25 E(es and Futur)-.18 E 2.5(eP)-.18 G +(lans)-2.5 E F0 1.632(There are se)97 608.4 R -.15(ve)-.25 G 1.632 +(ral features introduced in the current v).15 F 1.631(ersion of Bash, v) +-.15 F 1.631(ersion 1.14, and a number)-.15 F .241 +(under consideration for future releases.)72 620.4 R .242 +(This section will brie\215y detail the ne)5.242 F 2.742(wf)-.25 G .242 +(eatures in v)-2.742 F .242(ersion 1.14 and)-.15 F(describe se)72 632.4 +Q -.15(ve)-.25 G(ral features that may appear in later v).15 E(ersions.) +-.15 E F3 2.5(5.1. New)72 656.4 R -.25(Fe)2.5 G(atur).25 E +(es in Bash-1.14)-.18 E F0 .884(The ne)97 672 R 3.384(wf)-.25 G .884 +(eatures a)-3.384 F -.25(va)-.2 G .884(ilable in Bash-1.14 answer se).25 +F -.15(ve)-.25 G .883(ral of the most common requests for enhance-).15 F +2.931(ments. Most)72 684 R(notably)2.931 E 2.931(,t)-.65 G .432(here is\ + a mechanism for including non-visible character sequences in prompts, \ +such)-2.931 F .136 +(as those which cause a terminal to print characters in dif)72 696 R +.135(ferent colors or in standout mode.)-.25 F .135(There w)5.135 F .135 +(as noth-)-.1 F .558(ing pre)72 708 R -.15(ve)-.25 G .558 +(nting the use of these sequences in earlier v).15 F .559(ersions, b) +-.15 F .559(ut the readline redisplay algorithm assumed)-.2 F +(each character occupied ph)72 720 Q(ysical screen space and w)-.05 E +(ould wrap lines prematurely)-.1 E(.)-.65 E 0 Cg EP +%%Page: 9 9 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-9-)282.17 48 Q .13(Readline has a fe)97 84 R +2.63(wn)-.25 G .63 -.25(ew va)-2.63 H .13(riables, se).25 F -.15(ve)-.25 +G .13(ral ne).15 F 2.63(wb)-.25 G .13 +(indable commands, and some additional emacs mode)-2.63 F(def)72 96 Q +.918(ault k)-.1 F 1.218 -.15(ey b)-.1 H 3.418(indings. A).15 F(ne)3.418 +E 3.418(wh)-.25 G .919(istory search mode has been implemented: in this\ + mode, readline searches)-3.418 F .336(the history for lines be)72 108 R +.336(ginning with the characters between the be)-.15 F .336 +(ginning of the current line and the cursor)-.15 F(.)-.55 E .555(The e) +72 120 R .556(xisting readline incremental search commands no longer ma\ +tch identical lines more than once.)-.15 F(File-)5.556 E 1.979 +(name completion no)72 132 R 4.479(we)-.25 G 1.979(xpands v)-4.629 F +1.979(ariables in directory names.)-.25 F 1.978(The history e)6.978 F +1.978(xpansion f)-.15 F 1.978(acilities are no)-.1 F(w)-.25 E 1.449 +(nearly completely csh-compatible: missing modi\214ers ha)72 144 R 1.749 +-.15(ve b)-.2 H 1.449(een added and history substitution has been).15 F +-.15(ex)72 156 S(tended.).15 E(Se)97 171.6 Q -.15(ve)-.25 G .474 +(ral of the features described earlier).15 F 2.973(,s)-.4 G .473(uch as) +-2.973 F/F1 10/Times-Bold@0 SF .473(set -o posix)2.973 F F0(and)2.973 E +F1($POSIX_PED)2.973 E(ANTIC)-.35 E F0 2.973(,a)C .473(re ne)-2.973 F +2.973(wi)-.25 G(n)-2.973 E -.15(ve)72 183.6 S .106(rsion 1.14.).15 F +.106(There is a ne)5.106 F 2.606(ws)-.25 G .106(hell v)-2.606 F +(ariable,)-.25 E F1(OSTYPE)2.606 E F0 2.606(,t)C 2.606(ow)-2.606 G .106 +(hich Bash assigns a v)-2.606 F .106(alue that identi\214es the v)-.25 F +(er)-.15 E(-)-.2 E 1.38(sion of)72 195.6 R/F2 9/Times-Roman@0 SF(UNIX) +3.88 E F0(it')3.88 E 3.879(sr)-.55 G 1.379(unning on \(great for puttin\ +g architecture-speci\214c binary directories into the)-3.879 F F1($P) +3.879 E -.95(AT)-.74 G(H).95 E F0(\).)A -1 -.8(Tw o)72 207.6 T -.25(va) +6.215 G 2.915(riables ha).25 F 3.215 -.15(ve b)-.2 H 2.915(een renamed:) +.15 F F1($HISTCONTR)5.416 E(OL)-.3 E F0(replaces)5.416 E F1 +($history_contr)5.416 E(ol)-.18 E F0 5.416(,a)C(nd)-5.416 E F1 +($HOSTFILE)5.416 E F0(replaces)72 219.6 Q F1 +($hostname_completion_\214le)2.521 E F0 5.021(.I)C 2.521(nb)-5.021 G +.021(oth cases, the old names are accepted for backw)-2.521 F .02 +(ards compatibil-)-.1 F(ity)72 231.6 Q 5.788(.T)-.65 G .788(he ksh) +-5.788 F/F3 10/Times-Italic@0 SF(select)3.288 E F0 .788 +(construct, which allo)3.288 F .788 +(ws the generation of simple menus, has been implemented.)-.25 F(Ne) +5.788 E(w)-.25 E 1.496(capabilities ha)72 243.6 R 1.796 -.15(ve b)-.2 H +1.496(een added to e).15 F 1.495(xisting v)-.15 F(ariables:)-.25 E F1 +($auto_r)3.995 E(esume)-.18 E F0 1.495(can no)3.995 F 3.995(wt)-.25 G +(ak)-3.995 E 3.995(ev)-.1 G 1.495(alues of)-4.245 F F3 -.2(ex)3.995 G +(act).2 E F0(or)3.995 E F3(sub-)3.995 E(string)72 255.6 Q F0 4.843(,a)C +(nd)-4.843 E F1($HISTCONTR)4.843 E(OL)-.3 E F0 2.343(understands the v) +4.843 F(alue)-.25 E F3(ignor)4.844 E(eboth)-.37 E F0 4.844(,w)C 2.344 +(hich combines the tw)-4.844 F 4.844(op)-.1 G(re)-4.844 E(viously)-.25 E +1.556(acceptable v)72 267.6 R 4.056(alues. The)-.25 F F1(dirs)4.056 E F0 +-.2(bu)4.056 G 1.556(iltin has acquired options to print out speci\214c\ + members of the directory).2 F 3.062(stack. The)72 279.6 R F1($nolinks) +3.062 E F0 -.25(va)3.062 G .562(riable, which forces a ph).25 F .562 +(ysical vie)-.05 F 3.062(wo)-.25 G 3.062(ft)-3.062 G .563 +(he \214le system, has been superseded by the)-3.062 F F172 291.6 +Q F0 .494(option to the)2.994 F F1(set)2.994 E F0 -.2(bu)2.994 G .494 +(iltin \(equi).2 F -.25(va)-.25 G .494(lent to).25 F F1 .494(set -o ph) +2.994 F(ysical)-.15 E F0 .493(\); the v)B .493 +(ariable is retained for backw)-.25 F .493(ards compati-)-.1 F(bility)72 +303.6 Q 5.196(.T)-.65 G .196(he v)-5.196 F .196 +(ersion string contained in)-.15 F F1($B)2.696 E(ASH_VERSION)-.3 E F0 +(no)2.696 E 2.696(wi)-.25 G .196(ncludes an indication of the patch le) +-2.696 F -.15(ve)-.25 G 2.696(la).15 G(s)-2.696 E .85(well as the \231b) +72 315.6 R .85(uild v)-.2 F 3.35(ersion\232. Some)-.15 F .85 +(little-used features ha)3.35 F 1.15 -.15(ve b)-.2 H .85(een remo).15 F +-.15(ve)-.15 G 3.35(d: the).15 F F1(by)3.35 E(e)-.1 E F0(synon)3.35 E +.85(ym for)-.15 F F1(exit)3.35 E F0(and)3.35 E(the)72 327.6 Q F1($NO_PR) +3.498 E(OMPT_V)-.3 E(ARS)-1.35 E F0 -.25(va)3.498 G .998 +(riable are gone.).25 F .998(There is no)5.998 F 3.498(wa)-.25 G 3.498 +(no)-3.498 G -2.19 -.18(rg a)-3.498 H .998 +(nized test suite that can be run as a).18 F(re)72 339.6 Q +(gression test when b)-.15 E(uilding a ne)-.2 E 2.5(wv)-.25 G +(ersion of Bash.)-2.65 E 1.696(The documentation has been thoroughly o) +97 355.2 R -.15(ve)-.15 G 1.696(rhauled: there is a ne).15 F 4.196(wm) +-.25 G 1.695(anual page on the readline)-4.196 F .467(library and the)72 +367.2 R F3(info)2.967 E F0 .467 +(\214le has been updated to re\215ect the current v)2.967 F 2.968 +(ersion. As)-.15 F(al)2.968 E -.1(wa)-.1 G .468(ys, as man).1 F 2.968 +(yb)-.15 G .468(ugs as possi-)-3.168 F(ble ha)72 379.2 Q .3 -.15(ve b) +-.2 H(een \214x).15 E(ed, although some surely remain.)-.15 E F1 2.5 +(5.2. Other)72 403.2 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 1.68 +(There are a fe)97 418.8 R 4.18(wf)-.25 G 1.68 +(eatures that I hope to include in later Bash releases.)-4.18 F 1.68 +(Some are based on w)6.68 F(ork)-.1 E(already done in other shells.)72 +430.8 Q .958(In addition to simple v)97 446.4 R .959(ariables, a future\ + release of Bash will include one-dimensional arrays, using)-.25 F .206 +(the ksh implementation of arrays as a model.)72 458.4 R .205 +(Additions to the ksh syntax, such as)5.205 F F3(varname)2.705 E F0 .205 +(=\( ... \) to assign)B 2.587(al)72 470.4 S .087(ist of w)-2.587 F .088 +(ords directly to an array and a mechanism to allo)-.1 F 2.588(wt)-.25 G +(he)-2.588 E F1 -.18(re)2.588 G(ad).18 E F0 -.2(bu)2.588 G .088 +(iltin to read a list of v).2 F .088(alues directly)-.25 F .092 +(into an array)72 482.4 R 2.592(,w)-.65 G .092(ould be desirable.)-2.692 +F(Gi)5.092 E -.15(ve)-.25 G 2.592(nt).15 G .092(hose e)-2.592 F .092 +(xtensions, the ksh)-.15 F F1 .092(set \255A)2.592 F F0 .091 +(syntax may not be w)2.591 F .091(orth support-)-.1 F(ing \(the)72 494.4 +Q F12.5 E F0(option assigns a list of v)2.5 E(alues to an array) +-.25 E 2.5(,b)-.65 G(ut is a rather peculiar special case\).)-2.7 E .76 +(Some shells include a means of)97 510 R F3(pr)3.26 E -.1(og)-.45 G -.15 +(ra).1 G(mmable).15 E F0 -.1(wo)3.26 G .76 +(rd completion, where the user speci\214es on a per).1 F(-)-.2 E .163 +(command basis ho)72 522 R 2.663(wt)-.25 G .163(he ar)-2.663 F .163(gum\ +ents of the command are to be treated when completion is attempted: as \ +\214le-)-.18 F .194(names, hostnames, e)72 534 R -.15(xe)-.15 G .194 +(cutable \214les, and so on.).15 F .195 +(The other aspects of the current Bash implementation could)5.195 F .482 +(remain as-is; the e)72 546 R .482(xisting heuristics w)-.15 F .481 +(ould still be v)-.1 F 2.981(alid. Only)-.25 F .481 +(when completing the ar)2.981 F .481(guments to a simple)-.18 F +(command w)72 558 Q(ould the programmable completion be in ef)-.1 E +(fect.)-.25 E .479(It w)97 573.6 R .479(ould also be nice to gi)-.1 F +.779 -.15(ve t)-.25 H .479(he user \214ner).15 F .479 +(-grained control o)-.2 F -.15(ve)-.15 G 2.98(rw).15 G .48 +(hich commands are sa)-2.98 F -.15(ve)-.2 G 2.98(do).15 G .48(nto the) +-2.98 F 1.786(history list.)72 585.6 R 1.786(One proposal is for a v) +6.786 F 1.786(ariable, tentati)-.25 F -.15(ve)-.25 G 1.786(ly named).15 +F F1(HISTIGNORE)4.286 E F0 4.285(,w)C 1.785(hich w)-4.285 F 1.785 +(ould contain a)-.1 F .496(colon-separated list of commands.)72 597.6 R +.496(Lines be)5.496 F .496 +(ginning with these commands, after the restrictions of)-.15 F F1($HIST) +2.997 E(-)-.92 E(CONTR)72 609.6 Q(OL)-.3 E F0(ha)2.65 E .45 -.15(ve b) +-.2 H .15(een applied, w).15 F .15 +(ould not be placed onto the history list.)-.1 F .15 +(The shell pattern-matching capa-)5.15 F(bilities could also be a)72 +621.6 Q -.25(va)-.2 G(ilable when specifying the contents of).25 E F1 +($HISTIGNORE)2.5 E F0(.)A .729(One thing that ne)97 637.2 R .729 +(wer shells such as)-.25 F F1(wksh)3.229 E F0 .729(\(also kno)3.229 F +.729(wn as)-.25 F F1(dtksh)3.23 E F0 3.23(\)p)C(ro)-3.23 E .73 +(vide is a command to dynami-)-.15 F 1.189 +(cally load code implementing additional b)72 649.2 R 1.189 +(uiltin commands into a running shell.)-.2 F 1.188(This ne)6.188 F 3.688 +(wb)-.25 G 1.188(uiltin w)-3.888 F(ould)-.1 E(tak)72 661.2 Q 2.875(ea) +-.1 G 2.875(no)-2.875 G .375 +(bject \214le or shared library implementing the \231body\232 of the b) +-2.875 F .375(uiltin \()-.2 F F3(xxx_b)A(uiltin\(\))-.2 E F0 .375 +(for those f)2.875 F(amiliar)-.1 E .052 +(with Bash internals\) and a structure containing the name of the ne)72 +673.2 R 2.552(wc)-.25 G .051(ommand, the function to call when the) +-2.552 F(ne)72 685.2 Q 3.458(wb)-.25 G .958(uiltin is in)-3.658 F -.2 +(vo)-.4 G -.1(ke).2 G 3.458(d\().1 G .959 +(presumably de\214ned in the shared object speci\214ed as an ar)-3.458 F +.959(gument\), and the docu-)-.18 F 1.352 +(mentation to be printed by the)72 697.2 R F1(help)3.851 E F0 1.351 +(command \(possibly present in the shared object as well\).)3.851 F +1.351(It w)6.351 F(ould)-.1 E(manage the details of e)72 709.2 Q +(xtending the internal table of b)-.15 E(uiltins.)-.2 E 0 Cg EP +%%Page: 10 10 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-10-)279.67 48 Q 3.291(Af)97 84 S 1.291 -.25 +(ew o)-3.291 H .791(ther b).25 F .791(uiltins w)-.2 F .791 +(ould also be desirable: tw)-.1 F 3.291(oa)-.1 G .791(re the POSIX.2) +-3.291 F/F1 10/Times-Bold@0 SF(getconf)3.292 E F0 .792 +(command, which prints)3.292 F 1.412(the v)72 96 R 1.412 +(alues of system con\214guration v)-.25 F 1.411 +(ariables de\214ned by POSIX.2, and a)-.25 F F1(diso)3.911 E(wn)-.1 E F0 +-.2(bu)3.911 G 1.411(iltin, which causes a).2 F .547 +(shell running with job control acti)72 108 R .847 -.15(ve t)-.25 H +3.047<6f99>.15 G(for)-3.047 E .547 +(get about\232 one or more background jobs in its internal jobs ta-)-.18 +F 3.866(ble. Using)72 120 R F1(getconf)3.866 E F0 3.866(,f)C 1.366(or e) +-3.866 F 1.366(xample, a user could retrie)-.15 F 1.666 -.15(ve a v)-.25 +H 1.365(alue for)-.1 F F1($P)3.865 E -.95(AT)-.74 G(H).95 E F0 1.365 +(guaranteed to \214nd all of the)3.865 F .884 +(POSIX standard utilities, or \214nd out ho)72 132 R 3.385(wl)-.25 G +.885 +(ong \214lenames may be in the \214le system containing a speci\214ed) +-3.385 F(directory)72 144 Q(.)-.65 E 1.521 +(There are no implementation timetables for an)97 159.6 R 4.021(yo)-.15 +G 4.021(ft)-4.021 G 1.52(hese features, nor are there concrete plans to) +-4.021 F(include them.)72 171.6 Q(If an)5 E(yone has comments on these \ +proposals, feel free to send me electronic mail.)-.15 E F1 2.5 +(6. Re\215ections)72 195.6 R(and Lessons Lear)2.5 E(ned)-.15 E F0 .433 +(The lesson that has been repeated most often during Bash de)97 211.2 R +-.15(ve)-.25 G .433(lopment is that there are dark corners).15 F .181 +(in the Bourne shell, and people use all of them.)72 223.2 R .18 +(In the original description of the Bourne shell, quoting and)5.181 F +.073(the shell grammar are both poorly speci\214ed and incomplete; subs\ +equent descriptions ha)72 235.2 R .373 -.15(ve n)-.2 H .073 +(ot helped much.).15 F 1.856(The grammar presented in Bourne')72 247.2 R +4.356(sp)-.55 G 1.856(aper describing the shell distrib)-4.356 F 1.855 +(uted with the Se)-.2 F -.15(ve)-.25 G 1.855(nth Edition of).15 F/F2 9 +/Times-Roman@0 SF(UNIX)72 259.2 Q F0 2.5<8769>C 2.5(ss)-2.5 G 2.5(of) +-2.5 G(ar of)-2.6 E 2.5(ft)-.25 G(hat it does not allo)-2.5 E 2.5(wt) +-.25 G(he command)-2.5 E/F3 10/Courier@0 SF(who|wc)2.5 E F0 5(.I)C 2.5 +(nf)-5 G(act, as T)-2.6 E(om Duf)-.8 E 2.5(fs)-.25 G(tates:)-2.5 E 1.375 +(Nobody really kno)97 274.8 R 1.375(ws what the Bourne shell')-.25 F +3.875(sg)-.55 G 1.375(rammar is.)-3.875 F(Ev)6.376 E 1.376(en e)-.15 F +1.376(xamination of the source)-.15 F(code is little help.\210)97 286.8 +Q .382(The POSIX.2 standard includes a)72 302.4 R/F4 10/Times-Italic@0 +SF(yacc)2.882 E F0 .382 +(grammar that comes close to capturing the Bourne shell')2.882 F 2.882 +(sb)-.55 G(eha)-2.882 E(vior)-.2 E(,)-.4 E -.2(bu)72 314.4 S 3.246(ti).2 +G 3.246(td)-3.246 G(isallo)-3.246 E .747(ws some constructs which sh ac\ +cepts without complaint \255 and there are scripts out there that)-.25 F +.501(use them.)72 326.4 R .501(It took a fe)5.501 F 3.001(wv)-.25 G .501 +(ersions and se)-3.151 F -.15(ve)-.25 G .501(ral b).15 F .5 +(ug reports before Bash implemented sh-compatible quoting,)-.2 F .279 +(and there are still some \231le)72 338.4 R -.05(ga)-.15 G .279 +(l\232 sh constructs which Bash \215ags as syntax errors.).05 F .28 +(Complete sh compatibility)5.28 F(is a tough nut.)72 350.4 Q 1.231 +(The shell is bigger and slo)97 366 R 1.231(wer than I w)-.25 F 1.231 +(ould lik)-.1 F 1.23(e, though the current v)-.1 F 1.23 +(ersion is substantially f)-.15 F(aster)-.1 E .086(than pre)72 378 R +(viously)-.25 E 5.086(.T)-.65 G .087 +(he readline library could stand a substantial re)-5.086 F 2.587 +(write. A)-.25 F .087(hand-written parser to replace the)2.587 F +(current)72 390 Q F4(yacc)2.978 E F0 .478(-generated one w)B .477 +(ould probably result in a speedup, and w)-.1 F .477(ould solv)-.1 F +2.977(eo)-.15 G .477(ne glaring problem:)-2.977 F(the)5.477 E .384 +(shell could parse commands in \231$\(...\)\232 constructs as the)72 402 +R 2.884(ya)-.15 G .385 +(re entered, rather than reporting errors when the)-2.884 F +(construct is e)72 414 Q(xpanded.)-.15 E 1.064(As al)97 429.6 R -.1(wa) +-.1 G 1.064(ys, there is some chaf).1 F 3.564(ft)-.25 G 3.564(og)-3.564 +G 3.564(ow)-3.564 G 1.064(ith the wheat.)-3.564 F 1.063 +(Areas of duplicated functionality need to be)6.063 F .382(cleaned up.) +72 441.6 R .382(There are se)5.382 F -.15(ve)-.25 G .382 +(ral cases where Bash treats a v).15 F .382 +(ariable specially to enable functionality a)-.25 F -.25(va)-.2 G +(ilable).25 E .185(another w)72 453.6 R .185(ay \()-.1 F F1($notify)A F0 +(vs.)2.684 E F1 .184(set -o notify)5.184 F F0(and)2.684 E F1($nolinks) +2.684 E F0(vs.)2.684 E F1 .184(set -o ph)2.684 F(ysical)-.15 E F0 2.684 +(,f)C .184(or instance\); the special treatment)-2.684 F 3.421(of the v) +72 465.6 R 3.421(ariable name should probably be remo)-.25 F -.15(ve) +-.15 G 5.921(d. A).15 F(fe)5.921 E 5.921(wm)-.25 G 3.422 +(ore things could stand remo)-5.921 F -.25(va)-.15 G 3.422(l; the).25 F +F1($allo)72 477.6 Q(w_null_glob_expansion)-.1 E F0(and)4.112 E F1 +($glob_dot_\214lenames)4.112 E F0 -.25(va)4.111 G 1.611 +(riables are of particularly questionable v).25 F(alue.)-.25 E(The)72 +489.6 Q F1($[...])3.977 E F0 1.477(arithmetic e)3.977 F -.25(va)-.25 G +1.478(luation syntax is redundant no).25 F 3.978(wt)-.25 G 1.478 +(hat the POSIX-mandated)-3.978 F F1($\(\(...\)\))3.978 E F0 1.478 +(construct has)3.978 F .326(been implemented, and could be deleted.)72 +501.6 R .326(It w)5.326 F .326(ould be nice if the te)-.1 F .326 +(xt output by the)-.15 F F1(help)2.825 E F0 -.2(bu)2.825 G .325 +(iltin were e).2 F(xter)-.15 E(-)-.2 E .061 +(nal to the shell rather than compiled into it.)72 513.6 R .062 +(The beha)5.062 F .062(vior enabled by)-.2 F F1 +($command_oriented_history)2.562 E F0 2.562(,w)C(hich)-2.562 E 1.125 +(causes the shell to attempt to sa)72 525.6 R 1.424 -.15(ve a)-.2 H +1.124(ll lines of a multi-line command in a single history entry).15 F +3.624(,s)-.65 G 1.124(hould be)-3.624 F(made the def)72 537.6 Q +(ault and the v)-.1 E(ariable remo)-.25 E -.15(ve)-.15 G(d.).15 E F1 2.5 +(7. A)72 561.6 R -.1(va)-1 G(ilability).1 E F0 .047 +(As with all other GNU softw)97 577.2 R .047(are, Bash is a)-.1 F -.25 +(va)-.2 G .047(ilable for anon).25 F .047(ymous FTP from)-.15 F F4(pr) +2.547 E(ep.ai.mit.edu:/pub/gnu)-.37 E F0 1.05(and from other GNU softw) +72 589.2 R 1.05(are mirror sites.)-.1 F 1.049(The current v)6.049 F +1.049(ersion is in)-.15 F F4(bash-1.14.1.tar)3.549 E(.gz)-1.11 E F0 +1.049(in that directory)3.549 F(.)-.65 E(Use)72 601.2 Q F4(ar)5.965 E +-.15(ch)-.37 G(ie).15 E F0 3.465(to \214nd the nearest archi)5.965 F +3.766 -.15(ve s)-.25 H 5.966(ite. The).15 F 3.466(latest v)5.966 F 3.466 +(ersion is al)-.15 F -.1(wa)-.1 G 3.466(ys a).1 F -.25(va)-.2 G 3.466 +(ilable for FTP from).25 F F4(bash.CWR)72 613.2 Q -.25(U.)-.4 G +(Edu:/pub/dist.).25 E F0(Bash documentation is a)5 E -.25(va)-.2 G +(ilable for FTP from).25 E F4(bash.CWR)2.5 E -.25(U.)-.4 G +(Edu:/pub/bash.).25 E F0 1.169(The Free Softw)97 628.8 R 1.169(are F)-.1 +F 1.169(oundation sells tapes and CD-R)-.15 F 1.168 +(OMs containing Bash; send electronic mail to)-.4 F F3 +(gnu@prep.ai.mit.edu)72 640.8 Q F0(or call)2.5 E F3(+1-617-876-3296)2.5 +E F0(for more information.)2.5 E .694(Bash is also distrib)97 656.4 R +.694(uted with se)-.2 F -.15(ve)-.25 G .694(ral v).15 F .694(ersions of) +-.15 F F2(UNIX)3.194 E F0 .694(-compatible systems.)B .695 +(It is included as /bin/sh)5.694 F .948(and /bin/bash on se)72 668.4 R +-.15(ve)-.25 G .948(ral Linux distrib).15 F .948 +(utions \(more about the dif)-.2 F .948 +(ference in a moment\), and as contrib)-.25 F(uted)-.2 E .32 LW 144 +678.2 72 678.2 DL/F5 8/Times-Roman@0 SF .781 +(\207S. R. Bourne, \231UNIX T)72 688.2 R .781(ime-Sharing System:)-.28 F +.781(The UNIX Shell\232,)4.781 F/F6 8/Times-Italic@0 SF .78 +(Bell System T)2.78 F(ec)-.736 E .78(hnical J)-.12 F(ournal)-.2 E F5 +2.78(,5)C .78(7\(6\), July-)-2.78 F(August, 1978, pp. 1971-1990.)72 +698.2 Q<8854>72 710 Q .431(om Duf)-.64 F .431 +(f, \231Rc \255 A Shell for Plan 9 and)-.2 F/F7 7/Times-Roman@0 SF(UNIX) +2.432 E F5(systems\232,)2.432 E F6(Pr)2.432 E .432 +(oc. of the Summer 1990 EUUG Confer)-.36 F(ence)-.296 E F5 2.432(,L)C +(on-)-2.432 E(don, July)72 720 Q 2(,1)-.52 G(990, pp. 21-33.)-2 E 0 Cg +EP +%%Page: 11 11 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-11-)279.67 48 Q(softw)72 84 Q(are in BSDI')-.1 +E 2.5(sB)-.55 G(SD/386* and FreeBSD.)-2.5 E .598(The Linux distrib)97 +99.6 R .598(ution deserv)-.2 F .598(es special mention.)-.15 F .598 +(There are tw)5.598 F 3.099(oc)-.1 G .599 +(on\214gurations included in the stan-)-3.099 F .733(dard Bash distrib) +72 111.6 R .732(ution: a \231normal\232 con\214guration, in which all o\ +f the standard features are included, and a)-.2 F .519(\231minimal\232 \ +con\214guration, which omits job control, aliases, history and command \ +line editing, the directory)72 123.6 R .886(stack and)72 135.6 R/F1 10 +/Times-Bold@0 SF(pushd/popd/dirs,)3.386 E F0 .886(process substitution,\ + prompt string special character decoding, and the)3.386 F/F2 10 +/Times-Italic@0 SF(select)3.385 E F0 3.368(construct. This)72 147.6 R +.868(minimal v)3.368 F .869 +(ersion is designed to be a drop-in replacement for the traditional)-.15 +F/F3 9/Times-Roman@0 SF(UNIX)3.369 E F0(/bin/sh,)3.369 E +(and is included as the Linux /bin/sh in se)72 159.6 Q -.15(ve)-.25 G +(ral packagings.).15 E F1 2.5(8. Conclusion)72 183.6 R F0 .8 +(Bash is a w)97 199.2 R(orth)-.1 E 3.3(ys)-.05 G .8(uccessor to sh.)-3.3 +F .8(It is suf)5.8 F .8(\214ciently portable to run on nearly e)-.25 F +-.15(ve)-.25 G .8(ry v).15 F .8(ersion of)-.15 F F3(UNIX)3.299 E F0 .31 +(from 4.3 BSD to SVR4.2, and se)72 211.2 R -.15(ve)-.25 G(ral).15 E F3 +(UNIX)2.81 E F0 -.1(wo)2.81 G(rkalik).1 E 2.81(es. It)-.1 F .311(is rob) +2.81 F .311(ust enough to replace sh on most of those)-.2 F 1.515 +(systems, and pro)72 223.2 R 1.515(vides more functionality)-.15 F 6.515 +(.I)-.65 G 4.015(th)-6.515 G 1.515(as se)-4.015 F -.15(ve)-.25 G 1.515 +(ral thousand re).15 F 1.515(gular users, and their feedback has)-.15 F +(helped to mak)72 235.2 Q 2.5(ei)-.1 G 2.5(ta)-2.5 G 2.5(sg)-2.5 G +(ood as it is today \255 a testament to the bene\214ts of free softw) +-2.5 E(are.)-.1 E .32 LW 144 710 72 710 DL/F4 8/Times-Roman@0 SF +(*BSD/386 is a trademark of Berk)72 720 Q(ele)-.08 E 2(yS)-.12 G(oftw)-2 +E(are Design, Inc.)-.08 E 0 Cg EP +%%Trailer +end +%%EOF diff --git a/bash-5.1/doc/article.txt b/bash-5.1/doc/article.txt new file mode 100644 index 0000000000000000000000000000000000000000..c19ff924856b4b4838a37a5b35aa294f76e8d6b3 --- /dev/null +++ b/bash-5.1/doc/article.txt @@ -0,0 +1,1111 @@ + + + + + + + + + + Bash - The GNU shell* + + + Chet Ramey + Case Western Reserve University + chet@po.cwru.edu + + + + + + +_1. _I_n_t_r_o_d_u_c_t_i_o_n + + _B_a_s_h is the shell, or command language interpreter, +that will appear in the GNU operating system. The name is +an acronym for the "Bourne-Again SHell", a pun on Steve +Bourne, the author of the direct ancestor of the current +UNIX|- shell /_b_i_n/_s_h, which appeared in the Seventh Edition +Bell Labs Research version of UNIX. + + Bash is an sh-compatible shell that incorporates useful +features from the Korn shell (ksh) and the C shell (csh), +described later in this article. It is ultimately intended +to be a conformant implementation of the IEEE POSIX Shell +and Utilities specification (IEEE Working Group 1003.2). It +offers functional improvements over sh for both interactive +and programming use. + + While the GNU operating system will most likely include +a version of the Berkeley shell csh, Bash will be the +default shell. Like other GNU software, Bash is quite port- +able. It currently runs on nearly every version of UNIX and +a few other operating systems - an independently-supported +port exists for OS/2, and there are rumors of ports to DOS +and Windows NT. Ports to UNIX-like systems such as QNX and +Minix are part of the distribution. + + The original author of Bash was Brian Fox, an employee +of the Free Software Foundation. The current developer and +maintainer is Chet Ramey, a volunteer who works at Case +Western Reserve University. + +_2. _W_h_a_t'_s _P_O_S_I_X, _a_n_y_w_a_y? + + _P_O_S_I_X is a name originally coined by Richard Stallman +_________________________ +*An earlier version of this article appeared in The +Linux Journal. +|- UNIX is a trademark of Bell Laboratories. + + + + + October 28, 1994 + + + + + + - 2 - + + +for a family of open system standards based on UNIX. There +are a number of aspects of UNIX under consideration for +standardization, from the basic system services at the sys- +tem call and C library level to applications and tools to +system administration and management. Each area of stan- +dardization is assigned to a working group in the 1003 +series. + + The POSIX Shell and Utilities standard has been +developed by IEEE Working Group 1003.2 (POSIX.2).|= It con- +centrates on the command interpreter interface and utility +programs commonly executed from the command line or by other +programs. An initial version of the standard has been +approved and published by the IEEE, and work is currently +underway to update it. There are four primary areas of work +in the 1003.2 standard: + +o+ Aspects of the shell's syntax and command language. A + number of special builtins such as _c_d and _e_x_e_c are + being specified as part of the shell, since their func- + tionality usually cannot be implemented by a separate + executable; + +o+ A set of utilities to be called by shell scripts and + applications. Examples are programs like _s_e_d, _t_r, and + _a_w_k. Utilities commonly implemented as shell builtins + are described in this section, such as _t_e_s_t and _k_i_l_l. + An expansion of this section's scope, termed the User + Portability Extension, or UPE, has standardized + interactive programs such as _v_i and _m_a_i_l_x; + +o+ A group of functional interfaces to services provided + by the shell, such as the traditional system() C + library function. There are functions to perform shell + word expansions, perform filename expansion (_g_l_o_b_b_i_n_g), + obtain values of POSIX.2 system configuration vari- + ables, retrieve values of environment variables + (getenv()), _a_n_d _o_t_h_e_r _s_e_r_v_i_c_e_s; + +o+ A suite of "development" utilities such as _c_8_9 (the + POSIX.2 version of _c_c), and _y_a_c_c. + + Bash is concerned with the aspects of the shell's +behavior defined by POSIX.2. The shell command language has +of course been standardized, including the basic flow con- +trol and program execution constructs, I/O redirection and +pipelining, argument handling, variable expansion, and quot- +ing. The _s_p_e_c_i_a_l builtins, which must be implemented as +part of the shell to provide the desired functionality, are +_________________________ +|=IEEE, _I_E_E_E _S_t_a_n_d_a_r_d _f_o_r _I_n_f_o_r_m_a_t_i_o_n _T_e_c_h_n_o_l_o_g_y -- +_P_o_r_t_a_b_l_e _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e (_P_O_S_I_X) _P_a_r_t _2: +_S_h_e_l_l _a_n_d _U_t_i_l_i_t_i_e_s, 1992. + + + + + October 28, 1994 + + + + + + - 3 - + + +specified as being part of the shell; examples of these are +_e_v_a_l and _e_x_p_o_r_t. Other utilities appear in the sections of +POSIX.2 not devoted to the shell which are commonly (and in +some cases must be) implemented as builtin commands, such as +_r_e_a_d and _t_e_s_t. POSIX.2 also specifies aspects of the +shell's interactive behavior as part of the UPE, including +job control and command line editing. Interestingly enough, +only _v_i-style line editing commands have been standardized; +_e_m_a_c_s editing commands were left out due to objections. + + While POSIX.2 includes much of what the shell has trad- +itionally provided, some important things have been omitted +as being "beyond its scope." There is, for instance, no +mention of a difference between a _l_o_g_i_n shell and any other +interactive shell (since POSIX.2 does not specify a login +program). No fixed startup files are defined, either - the +standard does not mention ._p_r_o_f_i_l_e. + +_3. _B_a_s_i_c _B_a_s_h _f_e_a_t_u_r_e_s + + Since the Bourne shell provides Bash with most of its +philosophical underpinnings, Bash inherits most of its +features and functionality from sh. Bash implements all of +the traditional sh flow control constructs (_f_o_r, _i_f, _w_h_i_l_e, +etc.). All of the Bourne shell builtins, including those +not specified in the POSIX.2 standard, appear in Bash. +Shell _f_u_n_c_t_i_o_n_s, introduced in the SVR2 version of the +Bourne shell, are similar to shell scripts, but are defined +using a special syntax and are executed in the same process +as the calling shell. Bash has shell functions which behave +in a fashion upward-compatible with sh functions. There are +certain shell variables that Bash interprets in the same way +as sh, such as _P_S_1, _I_F_S, and _P_A_T_H. Bash implements essen- +tially the same grammar, parameter and variable expansion +semantics, redirection, and quoting as the Bourne shell. +Where differences appear between the POSIX.2 standard and +traditional sh behavior, Bash follows POSIX. + + The Korn Shell (ksh) is a descendent of the Bourne +shell written at AT&T Bell Laboratories by David Korn|-. It +provides a number of useful features that POSIX and Bash +have adopted. Many of the interactive facilities in POSIX.2 +have their roots in the ksh: for example, the POSIX and ksh +job control facilities are nearly identical. Bash includes +features from the Korn Shell for both interactive use and +shell programming. For programming, Bash provides variables +such as _R_A_N_D_O_M and _R_E_P_L_Y, the _t_y_p_e_s_e_t builtin, the ability +to remove substrings from variables based on patterns, and +shell arithmetic. _R_A_N_D_O_M expands to a random number each +time it is referenced; assigning a value to _R_A_N_D_O_M seeds the +_________________________ +|-Morris Bolsky and David Korn, _T_h_e _K_o_r_n_S_h_e_l_l _C_o_m_m_a_n_d +_a_n_d _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, Prentice Hall, 1989. + + + + + October 28, 1994 + + + + + + - 4 - + + +random number generator. _R_E_P_L_Y is the default variable used +by the _r_e_a_d builtin when no variable names are supplied as +arguments. The _t_y_p_e_s_e_t builtin is used to define variables +and give them attributes such as readonly. Bash arithmetic +allows the evaluation of an expression and the substitution +of the result. Shell variables may be used as operands, and +the result of an expression may be assigned to a variable. +Nearly all of the operators from the C language are avail- +able, with the same precedence rules: +9 $ echo $((3 + 5 * 32)) + 163 +9 +For interactive use, Bash implements ksh-style aliases and +builtins such as _f_c (discussed below) and _j_o_b_s. Bash +aliases allow a string to be substituted for a command name. +They can be used to create a mnemonic for a UNIX command +name (alias del=rm), to expand a single word to a complex +command (alias news='xterm -g 80x45 -title trn -e trn -e -S1 +-N &'), or to ensure that a command is invoked with a basic +set of options (alias ls="/bin/ls -F"). + + The C shell (csh)|-, originally written by Bill Joy +while at Berkeley, is widely used and quite popular for its +interactive facilities. Bash includes a csh-compatible his- +tory expansion mechanism ("! history"), brace expansion, +access to a stack of directories via the _p_u_s_h_d, _p_o_p_d, and +_d_i_r_s builtins, and tilde expansion, to generate users' home +directories. Tilde expansion has also been adopted by both +the Korn Shell and POSIX.2. + + There were certain areas in which POSIX.2 felt stan- +dardization was necessary, but no existing implementation +provided the proper behavior. The working group invented +and standardized functionality in these areas, which Bash +implements. The _c_o_m_m_a_n_d builtin was invented so that shell +functions could be written to replace builtins; it makes the +capabilities of the builtin available to the function. The +reserved word "!" was added to negate the return value of a +command or pipeline; it was nearly impossible to express "if +not x" cleanly using the sh language. There exist multiple +incompatible implementations of the _t_e_s_t builtin, which +tests files for type and other attributes and performs +arithmetic and string comparisons. POSIX considered none of +these correct, so the standard behavior was specified in +terms of the number of arguments to the command. POSIX.2 +dictates exactly what will happen when four or fewer argu- +ments are given to _t_e_s_t, and leaves the behavior undefined +when more arguments are supplied. Bash uses the POSIX.2 +_________________________ +|-Bill Joy, An Introduction to the C Shell, _U_N_I_X _U_s_e_r'_s +_S_u_p_p_l_e_m_e_n_t_a_r_y _D_o_c_u_m_e_n_t_s, University of California at +Berkeley, 1986. + + + + + October 28, 1994 + + + + + + - 5 - + + +algorithm, which was conceived by David Korn. + +_3._1. _F_e_a_t_u_r_e_s _n_o_t _i_n _t_h_e _B_o_u_r_n_e _S_h_e_l_l + + There are a number of minor differences between Bash +and the version of sh present on most other versions of +UNIX. The majority of these are due to the POSIX standard, +but some are the result of Bash adopting features from other +shells. For instance, Bash includes the new "!" reserved +word, the _c_o_m_m_a_n_d builtin, the ability of the _r_e_a_d builtin +to correctly return a line ending with a backslash, symbolic +arguments to the _u_m_a_s_k builtin, variable substring removal, +a way to get the length of a variable, and the new algorithm +for the _t_e_s_t builtin from the POSIX.2 standard, none of +which appear in sh. + + Bash also implements the "$(...)" command substitution +syntax, which supersedes the sh `...` construct. The +"$(...)" construct expands to the output of the command con- +tained within the parentheses, with trailing newlines +removed. The sh syntax is accepted for backwards compati- +bility, but the "$(...)" form is preferred because its quot- +ing rules are much simpler and it is easier to nest. + + The Bourne shell does not provide such features as +brace expansion, the ability to define a variable and a +function with the same name, local variables in shell func- +tions, the ability to enable and disable individual builtins +or write a function to replace a builtin, or a means to +export a shell function to a child process. + + Bash has closed a long-standing shell security hole by +not using the $_I_F_S variable to split each word read by the +shell, but splitting only the results of expansion (ksh and +the 4.4 BSD sh have fixed this as well). Useful behavior +such as a means to abort execution of a script read with the +"." command using the return builtin or automatically +exporting variables in the shell's environment to children +is also not present in the Bourne shell. Bash provides a +much more powerful environment for both interactive use and +programming. + +_4. _B_a_s_h-_s_p_e_c_i_f_i_c _F_e_a_t_u_r_e_s + + This section details a few of the features which make +Bash unique. Most of them provide improved interactive use, +but a few programming improvements are present as well. +Full descriptions of these features can be found in the Bash +documentation. + +_4._1. _S_t_a_r_t_u_p _F_i_l_e_s + + Bash executes startup files differently than other +shells. The Bash behavior is a compromise between the csh + + + + October 28, 1994 + + + + + + - 6 - + + +principle of startup files with fixed names executed for +each shell and the sh "minimalist" behavior. An interactive +instance of Bash started as a login shell reads and executes +~/._b_a_s_h__p_r_o_f_i_l_e (the file .bash_profile in the user's home +directory), if it exists. An interactive non-login shell +reads and executes ~/._b_a_s_h_r_c. A non-interactive shell (one +begun to execute a shell script, for example) reads no fixed +startup file, but uses the value of the variable $_E_N_V, if +set, as the name of a startup file. The ksh practice of +reading $_E_N_V for every shell, with the accompanying diffi- +culty of defining the proper variables and functions for +interactive and non-interactive shells or having the file +read only for interactive shells, was considered too com- +plex. Ease of use won out here. Interestingly, the next +release of ksh will change to reading $_E_N_V only for interac- +tive shells. + +_4._2. _N_e_w _B_u_i_l_t_i_n _C_o_m_m_a_n_d_s + + There are a few builtins which are new or have been +extended in Bash. The _e_n_a_b_l_e builtin allows builtin com- +mands to be turned on and off arbitrarily. To use the ver- +sion of _e_c_h_o found in a user's search path rather than the +Bash builtin, enable -n echo suffices. The _h_e_l_p builtin +provides quick synopses of the shell facilities without +requiring access to a manual page. _B_u_i_l_t_i_n is similar to +_c_o_m_m_a_n_d in that it bypasses shell functions and directly +executes builtin commands. Access to a csh-style stack of +directories is provided via the _p_u_s_h_d, _p_o_p_d, and _d_i_r_s buil- +tins. _P_u_s_h_d and _p_o_p_d insert and remove directories from the +stack, respectively, and _d_i_r_s lists the stack contents. On +systems that allow fine-grained control of resources, the +_u_l_i_m_i_t builtin can be used to tune these settings. _U_l_i_m_i_t +allows a user to control, among other things, whether core +dumps are to be generated, how much memory the shell or a +child process is allowed to allocate, and how large a file +created by a child process can grow. The _s_u_s_p_e_n_d command +will stop the shell process when job control is active; most +other shells do not allow themselves to be stopped like +that. _T_y_p_e, the Bash answer to _w_h_i_c_h and _w_h_e_n_c_e, shows what +will happen when a word is typed as a command: +9 $ type export + export is a shell builtin + $ type -t export + builtin + $ type bash + bash is /bin/bash + $ type cd + cd is a function + cd () + { + builtin cd ${1+"$@"} && xtitle $HOST: $PWD + } +9 + + + October 28, 1994 + + + + + + - 7 - + + +Various modes tell what a command word is (reserved word, +alias, function, builtin, or file) or which version of a +command will be executed based on a user's search path. +Some of this functionality has been adopted by POSIX.2 and +folded into the _c_o_m_m_a_n_d utility. + +_4._3. _E_d_i_t_i_n_g _a_n_d _C_o_m_p_l_e_t_i_o_n + + One area in which Bash shines is command line editing. +Bash uses the _r_e_a_d_l_i_n_e library to read and edit lines when +interactive. Readline is a powerful and flexible input +facility that a user can configure to individual tastes. It +allows lines to be edited using either emacs or vi commands, +where those commands are appropriate. The full capability +of emacs is not present - there is no way to execute a named +command with M-x, for instance - but the existing commands +are more than adequate. The vi mode is compliant with the +command line editing standardized by POSIX.2. + + Readline is fully customizable. In addition to the +basic commands and key bindings, the library allows users to +define additional key bindings using a startup file. The +_i_n_p_u_t_r_c file, which defaults to the file ~/._i_n_p_u_t_r_c, is read +each time readline initializes, permitting users to maintain +a consistent interface across a set of programs. Readline +includes an extensible interface, so each program using the +library can add its own bindable commands and program- +specific key bindings. Bash uses this facility to add bind- +ings that perform history expansion or shell word expansions +on the current input line. + + Readline interprets a number of variables which further +tune its behavior. Variables exist to control whether or +not eight-bit characters are directly read as input or con- +verted to meta-prefixed key sequences (a meta-prefixed key +sequence consists of the character with the eighth bit +zeroed, preceded by the _m_e_t_a-_p_r_e_f_i_x character, usually +escape, which selects an alternate keymap), to decide +whether to output characters with the eighth bit set +directly or as a meta-prefixed key sequence, whether or not +to wrap to a new screen line when a line being edited is +longer than the screen width, the keymap to which subsequent +key bindings should apply, or even what happens when read- +line wants to ring the terminal's bell. All of these vari- +ables can be set in the inputrc file. + + The startup file understands a set of C preprocessor- +like conditional constructs which allow variables or key +bindings to be assigned based on the application using read- +line, the terminal currently being used, or the editing +mode. Users can add program-specific bindings to make their +lives easier: I have bindings that let me edit the value of +$_P_A_T_H and double-quote the current or previous word: +9 # Macros that are convenient for shell interaction + + +9 October 28, 1994 + + + + + + - 8 - + + + $if Bash + # edit the path + "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" + # prepare to type a quoted word -- insert open and close double + # quotes and move to just after the open quote + "\C-x\"": "\"\"\C-b" + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + $endif +9 +There is a readline command to re-read the file, so users +can edit the file, change some bindings, and begin to use +them almost immediately. + + Bash implements the _b_i_n_d builtin for more dyamic con- +trol of readline than the startup file permits. _B_i_n_d is +used in several ways. In _l_i_s_t mode, it can display the +current key bindings, list all the readline editing direc- +tives available for binding, list which keys invoke a given +directive, or output the current set of key bindings in a +format that can be incorporated directly into an inputrc +file. In _b_a_t_c_h mode, it reads a series of key bindings +directly from a file and passes them to readline. In its +most common usage, _b_i_n_d takes a single string and passes it +directly to readline, which interprets the line as if it had +just been read from the inputrc file. Both key bindings and +variable assignments may appear in the string given to _b_i_n_d. + + The readline library also provides an interface for +_w_o_r_d _c_o_m_p_l_e_t_i_o_n. When the _c_o_m_p_l_e_t_i_o_n character (usually +TAB) is typed, readline looks at the word currently being +entered and computes the set of filenames of which the +current word is a valid prefix. If there is only one possi- +ble completion, the rest of the characters are inserted +directly, otherwise the common prefix of the set of +filenames is added to the current word. A second TAB char- +acter entered immediately after a non-unique completion +causes readline to list the possible completions; there is +an option to have the list displayed immediately. Readline +provides hooks so that applications can provide specific +types of completion before the default filename completion +is attempted. This is quite flexible, though it is not com- +pletely user-programmable. Bash, for example, can complete +filenames, command names (including aliases, builtins, shell +reserved words, shell functions, and executables found in +the file system), shell variables, usernames, and hostnames. +It uses a set of heuristics that, while not perfect, is gen- +erally quite good at determining what type of completion to +attempt. + +_4._4. _H_i_s_t_o_r_y + + Access to the list of commands previously entered (the +_c_o_m_m_a_n_d _h_i_s_t_o_r_y) is provided jointly by Bash and the + + +9 October 28, 1994 + + + + + + - 9 - + + +readline library. Bash provides variables ($HISTFILE, +$HISTSIZE, and $HISTCONTROL) and the _h_i_s_t_o_r_y and _f_c builtins +to manipulate the history list. The value of $_H_I_S_T_F_I_L_E +specifes the file where Bash writes the command history on +exit and reads it on startup. $_H_I_S_T_S_I_Z_E is used to limit +the number of commands saved in the history. $_H_I_S_T_C_O_N_T_R_O_L +provides a crude form of control over which commands are +saved on the history list: a value of _i_g_n_o_r_e_s_p_a_c_e means to +not save commands which begin with a space; a value of +_i_g_n_o_r_e_d_u_p_s means to not save commands identical to the last +command saved. $HISTCONTROL was named $history_control in +earlier versions of Bash; the old name is still accepted for +backwards compatibility. The _h_i_s_t_o_r_y command can read or +write files containing the history list and display the +current list contents. The _f_c builtin, adopted from POSIX.2 +and the Korn Shell, allows display and re-execution, with +optional editing, of commands from the history list. The +readline library offers a set of commands to search the his- +tory list for a portion of the current input line or a +string typed by the user. Finally, the _h_i_s_t_o_r_y library, +generally incorporated directly into the readline library, +implements a facility for history recall, expansion, and +re-execution of previous commands very similar to csh ("bang +history", so called because the exclamation point introduces +a history substitution): +9 $ echo a b c d e + a b c d e + $ !! f g h i + echo a b c d e f g h i + a b c d e f g h i + $ !-2 + echo a b c d e + a b c d e + $ echo !-2:1-4 + echo a b c d + a b c d +9 +The command history is only saved when the shell is interac- +tive, so it is not available for use by shell scripts. + +_4._5. _N_e_w _S_h_e_l_l _V_a_r_i_a_b_l_e_s + + There are a number of convenience variables that Bash +interprets to make life easier. These include _F_I_G_N_O_R_E, +which is a set of filename suffixes identifying files to +exclude when completing filenames; _H_O_S_T_T_Y_P_E, which is +automatically set to a string describing the type of +hardware on which Bash is currently executing; +_c_o_m_m_a_n_d__o_r_i_e_n_t_e_d__h_i_s_t_o_r_y, which directs Bash to save all +lines of a multiple-line command such as a _w_h_i_l_e or _f_o_r loop +in a single history entry, allowing easy re-editing; and +_I_G_N_O_R_E_E_O_F, whose value indicates the number of consecutive +EOF characters that an interactive shell will read before + + + + October 28, 1994 + + + + + + - 10 - + + +exiting - an easy way to keep yourself from being logged out +accidentally. The _a_u_t_o__r_e_s_u_m_e variable alters the way the +shell treats simple command names: if job control is active, +and this variable is set, single-word simple commands +without redirections cause the shell to first look for and +restart a suspended job with that name before starting a new +process. + +_4._6. _B_r_a_c_e _E_x_p_a_n_s_i_o_n + + Since sh offers no convenient way to generate arbitrary +strings that share a common prefix or suffix (filename +expansion requires that the filenames exist), Bash imple- +ments _b_r_a_c_e _e_x_p_a_n_s_i_o_n, a capability picked up from csh. +Brace expansion is similar to filename expansion, but the +strings generated need not correspond to existing files. A +brace expression consists of an optional _p_r_e_a_m_b_l_e, followed +by a pair of braces enclosing a series of comma-separated +strings, and an optional _p_o_s_t_a_m_b_l_e. The preamble is +prepended to each string within the braces, and the postam- +ble is then appended to each resulting string: +9 $ echo a{d,c,b}e + ade ace abe +9 +As this example demonstrates, the results of brace expansion +are not sorted, as they are by filename expansion. + +_4._7. _P_r_o_c_e_s_s _S_u_b_s_t_i_t_u_t_i_o_n + + On systems that can support it, Bash provides a facil- +ity known as _p_r_o_c_e_s_s _s_u_b_s_t_i_t_u_t_i_o_n. Process substitution is +similar to command substitution in that its specification +includes a command to execute, but the shell does not col- +lect the command's output and insert it into the command +line. Rather, Bash opens a pipe to the command, which is +run in the background. The shell uses named pipes (FIFOs) +or the /_d_e_v/_f_d method of naming open files to expand the +process substitution to a filename which connects to the +pipe when opened. This filename becomes the result of the +expansion. Process substitution can be used to compare the +outputs of two different versions of an application as part +of a regression test: +9 $ cmp <(old_prog) <(new_prog) +9 +_4._8. _P_r_o_m_p_t _C_u_s_t_o_m_i_z_a_t_i_o_n + + One of the more popular interactive features that Bash +provides is the ability to customize the prompt. Both $_P_S_1 +and $_P_S_2, the primary and secondary prompts, are expanded +before being displayed. Parameter and variable expansion is +performed when the prompt string is expanded, so any shell +variable can be put into the prompt (e.g., $_S_H_L_V_L, which + + + + October 28, 1994 + + + + + + - 11 - + + +indicates how deeply the current shell is nested). Bash +specially interprets characters in the prompt string pre- +ceded by a backslash. Some of these backslash escapes are +replaced with the current time, the date, the current work- +ing directory, the username, and the command number or his- +tory number of the command being entered. There is even a +backslash escape to cause the shell to change its prompt +when running as root after an _s_u. Before printing each pri- +mary prompt, Bash expands the variable $_P_R_O_M_P_T__C_O_M_M_A_N_D and, +if it has a value, executes the expanded value as a command, +allowing additional prompt customization. For example, this +assignment causes the current user, the current host, the +time, the last component of the current working directory, +the level of shell nesting, and the history number of the +current command to be embedded into the primary prompt: +9 $ PS1='\u@\h [\t] \W($SHLVL:\!)\$ ' + chet@odin [21:03:44] documentation(2:636)$ cd .. + chet@odin [21:03:54] src(2:637)$ +9 +The string being assigned is surrounded by single quotes so +that if it is exported, the value of $_S_H_L_V_L will be updated +by a child shell: +9 chet@odin [21:17:35] src(2:638)$ export PS1 + chet@odin [21:17:40] src(2:639)$ bash + chet@odin [21:17:46] src(3:696)$ +9 +The \$ escape is displayed as "$" when running as a normal +user, but as "#" when running as root. + +_4._9. _F_i_l_e _S_y_s_t_e_m _V_i_e_w_s + + Since Berkeley introduced symbolic links in 4.2 BSD, +one of their most annoying properties has been the "warping" +to a completely different area of the file system when using +_c_d, and the resultant non-intuitive behavior of "cd ..". +The UNIX kernel treats symbolic links _p_h_y_s_i_c_a_l_l_y. When the +kernel is translating a pathname in which one component is a +symbolic link, it replaces all or part of the pathname while +processing the link. If the contents of the symbolic link +begin with a slash, the kernel replaces the pathname +entirely; if not, the link contents replace the current com- +ponent. In either case, the symbolic link is visible. If +the link value is an absolute pathname, the user finds him- +self in a completely different part of the file system. + + Bash provides a _l_o_g_i_c_a_l view of the file system. In +this default mode, command and filename completion and buil- +tin commands such as _c_d and _p_u_s_h_d which change the current +working directory transparently follow symbolic links as if +they were directories. The $_P_W_D variable, which holds the +shell's idea of the current working directory, depends on +the path used to reach the directory rather than its + + + + October 28, 1994 + + + + + + - 12 - + + +physical location in the local file system hierarchy. For +example: +9 $ cd /usr/local/bin + $ echo $PWD + /usr/local/bin + $ pwd + /usr/local/bin + $ /bin/pwd + /net/share/sun4/local/bin + $ cd .. + $ pwd + /usr/local + $ /bin/pwd + /net/share/sun4/local + $ cd .. + $ pwd + /usr + $ /bin/pwd + /usr +9 +One problem with this, of course, arises when programs that +do not understand the shell's logical notion of the file +system interpret ".." differently. This generally happens +when Bash completes filenames containing ".." according to a +logical hierarchy which does not correspond to their physi- +cal location. For users who find this troublesome, a +corresponding _p_h_y_s_i_c_a_l view of the file system is available: +9 $ cd /usr/local/bin + $ pwd + /usr/local/bin + $ set -o physical + $ pwd + /net/share/sun4/local/bin +9 +_4._1_0. _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n + + One of the most significant improvements in version +1.13 of Bash was the change to "eight-bit cleanliness". +Previous versions used the eighth bit of characters to mark +whether or not they were quoted when performing word expan- +sions. While this did not affect the majority of users, +most of whom used only seven-bit ASCII characters, some +found it confining. Beginning with version 1.13, Bash +implemented a different quoting mechanism that did not alter +the eighth bit of characters. This allowed Bash to manipu- +late files with "odd" characters in their names, but did +nothing to help users enter those names, so version 1.13 +introduced changes to readline that made it eight-bit clean +as well. Options exist that force readline to attach no +special significance to characters with the eighth bit set +(the default behavior is to convert these characters to +meta-prefixed key sequences) and to output these characters + + + + October 28, 1994 + + + + + + - 13 - + + +without conversion to meta-prefixed sequences. These +changes, along with the expansion of keymaps to a full eight +bits, enable readline to work with most of the ISO-8859 fam- +ily of character sets, used by many European countries. + +_4._1_1. _P_O_S_I_X _M_o_d_e + + Although Bash is intended to be POSIX.2 conformant, +there are areas in which the default behavior is not compa- +tible with the standard. For users who wish to operate in a +strict POSIX.2 environment, Bash implements a _P_O_S_I_X _m_o_d_e. +When this mode is active, Bash modifies its default opera- +tion where it differs from POSIX.2 to match the standard. +POSIX mode is entered when Bash is started with the -_p_o_s_i_x +option. This feature is also available as an option to the +set builtin, set -o posix. For compatibility with other GNU +software that attempts to be POSIX.2 compliant, Bash also +enters POSIX mode if the variable $_P_O_S_I_X_L_Y__C_O_R_R_E_C_T is set +when Bash is started or assigned a value during execution. +$_P_O_S_I_X__P_E_D_A_N_T_I_C is accepted as well, to be compatible with +some older GNU utilities. When Bash is started in POSIX +mode, for example, it sources the file named by the value of +$_E_N_V rather than the "normal" startup files, and does not +allow reserved words to be aliased. + +_5. _N_e_w _F_e_a_t_u_r_e_s _a_n_d _F_u_t_u_r_e _P_l_a_n_s + + There are several features introduced in the current +version of Bash, version 1.14, and a number under considera- +tion for future releases. This section will briefly detail +the new features in version 1.14 and describe several +features that may appear in later versions. + +_5._1. _N_e_w _F_e_a_t_u_r_e_s _i_n _B_a_s_h-_1._1_4 + + The new features available in Bash-1.14 answer several +of the most common requests for enhancements. Most notably, +there is a mechanism for including non-visible character +sequences in prompts, such as those which cause a terminal +to print characters in different colors or in standout mode. +There was nothing preventing the use of these sequences in +earlier versions, but the readline redisplay algorithm +assumed each character occupied physical screen space and +would wrap lines prematurely. + + Readline has a few new variables, several new bindable +commands, and some additional emacs mode default key bind- +ings. A new history search mode has been implemented: in +this mode, readline searches the history for lines beginning +with the characters between the beginning of the current +line and the cursor. The existing readline incremental +search commands no longer match identical lines more than +once. Filename completion now expands variables in direc- +tory names. The history expansion facilities are now nearly + + + + October 28, 1994 + + + + + + - 14 - + + +completely csh-compatible: missing modifiers have been added +and history substitution has been extended. + + Several of the features described earlier, such as _s_e_t +-_o _p_o_s_i_x and $_P_O_S_I_X__P_E_D_A_N_T_I_C, are new in version 1.14. +There is a new shell variable, _O_S_T_Y_P_E, to which Bash assigns +a value that identifies the version of UNIX it's running on +(great for putting architecture-specific binary directories +into the $PATH). Two variables have been renamed: $_H_I_S_T_C_O_N_- +_T_R_O_L replaces $_h_i_s_t_o_r_y__c_o_n_t_r_o_l, and $_H_O_S_T_F_I_L_E replaces +$_h_o_s_t_n_a_m_e__c_o_m_p_l_e_t_i_o_n__f_i_l_e. In both cases, the old names are +accepted for backwards compatibility. The ksh _s_e_l_e_c_t con- +struct, which allows the generation of simple menus, has +been implemented. New capabilities have been added to +existing variables: $_a_u_t_o__r_e_s_u_m_e can now take values of +_e_x_a_c_t or _s_u_b_s_t_r_i_n_g, and $_H_I_S_T_C_O_N_T_R_O_L understands the value +_i_g_n_o_r_e_b_o_t_h, which combines the two previously acceptable +values. The _d_i_r_s builtin has acquired options to print out +specific members of the directory stack. The $_n_o_l_i_n_k_s vari- +able, which forces a physical view of the file system, has +been superseded by the -_P option to the _s_e_t builtin +(equivalent to set -o physical); the variable is retained +for backwards compatibility. The version string contained +in $_B_A_S_H__V_E_R_S_I_O_N now includes an indication of the patch +level as well as the "build version". Some little-used +features have been removed: the _b_y_e synonym for _e_x_i_t and +the $_N_O__P_R_O_M_P_T__V_A_R_S variable are gone. There is now an +organized test suite that can be run as a regression test +when building a new version of Bash. + + The documentation has been thoroughly overhauled: there +is a new manual page on the readline library and the _i_n_f_o +file has been updated to reflect the current version. As +always, as many bugs as possible have been fixed, although +some surely remain. + +_5._2. _O_t_h_e_r _F_e_a_t_u_r_e_s + + There are a few features that I hope to include in +later Bash releases. Some are based on work already done in +other shells. + + In addition to simple variables, a future release of +Bash will include one-dimensional arrays, using the ksh +implementation of arrays as a model. Additions to the ksh +syntax, such as _v_a_r_n_a_m_e=( ... ) to assign a list of words +directly to an array and a mechanism to allow the _r_e_a_d buil- +tin to read a list of values directly into an array, would +be desirable. Given those extensions, the ksh _s_e_t -_A syntax +may not be worth supporting (the -_A option assigns a list of +values to an array, but is a rather peculiar special case). + + Some shells include a means of _p_r_o_g_r_a_m_m_a_b_l_e word com- +pletion, where the user specifies on a per-command basis how + + + + October 28, 1994 + + + + + + - 15 - + + +the arguments of the command are to be treated when comple- +tion is attempted: as filenames, hostnames, executable +files, and so on. The other aspects of the current Bash +implementation could remain as-is; the existing heuristics +would still be valid. Only when completing the arguments to +a simple command would the programmable completion be in +effect. + + It would also be nice to give the user finer-grained +control over which commands are saved onto the history list. +One proposal is for a variable, tentatively named _H_I_S_T_I_G_- +_N_O_R_E, which would contain a colon-separated list of com- +mands. Lines beginning with these commands, after the res- +trictions of $_H_I_S_T_C_O_N_T_R_O_L have been applied, would not be +placed onto the history list. The shell pattern-matching +capabilities could also be available when specifying the +contents of $_H_I_S_T_I_G_N_O_R_E. + + One thing that newer shells such as _w_k_s_h (also known as +_d_t_k_s_h) provide is a command to dynamically load code imple- +menting additional builtin commands into a running shell. +This new builtin would take an object file or shared library +implementing the "body" of the builtin (_x_x_x__b_u_i_l_t_i_n() for +those familiar with Bash internals) and a structure contain- +ing the name of the new command, the function to call when +the new builtin is invoked (presumably defined in the shared +object specified as an argument), and the documentation to +be printed by the _h_e_l_p command (possibly present in the +shared object as well). It would manage the details of +extending the internal table of builtins. + + A few other builtins would also be desirable: two are +the POSIX.2 _g_e_t_c_o_n_f command, which prints the values of sys- +tem configuration variables defined by POSIX.2, and a _d_i_s_o_w_n +builtin, which causes a shell running with job control +active to "forget about" one or more background jobs in its +internal jobs table. Using _g_e_t_c_o_n_f, for example, a user +could retrieve a value for $_P_A_T_H guaranteed to find all of +the POSIX standard utilities, or find out how long filenames +may be in the file system containing a specified directory. + + There are no implementation timetables for any of these +features, nor are there concrete plans to include them. If +anyone has comments on these proposals, feel free to send me +electronic mail. + +_6. _R_e_f_l_e_c_t_i_o_n_s _a_n_d _L_e_s_s_o_n_s _L_e_a_r_n_e_d + + The lesson that has been repeated most often during +Bash development is that there are dark corners in the +Bourne shell, and people use all of them. In the original +description of the Bourne shell, quoting and the shell gram- +mar are both poorly specified and incomplete; subsequent +descriptions have not helped much. The grammar presented in + + + + October 28, 1994 + + + + + + - 16 - + + +Bourne's paper describing the shell distributed with the +Seventh Edition of UNIX|- is so far off that it does not +allow the command who|wc. In fact, as Tom Duff states: + + Nobody really knows what the Bourne shell's gram- + mar is. Even examination of the source code is + little help.|= + +The POSIX.2 standard includes a _y_a_c_c grammar that comes +close to capturing the Bourne shell's behavior, but it +disallows some constructs which sh accepts without complaint +- and there are scripts out there that use them. It took a +few versions and several bug reports before Bash implemented +sh-compatible quoting, and there are still some "legal" sh +constructs which Bash flags as syntax errors. Complete sh +compatibility is a tough nut. + + The shell is bigger and slower than I would like, +though the current version is substantially faster than pre- +viously. The readline library could stand a substantial +rewrite. A hand-written parser to replace the current +_y_a_c_c-generated one would probably result in a speedup, and +would solve one glaring problem: the shell could parse com- +mands in "$(...)" constructs as they are entered, rather +than reporting errors when the construct is expanded. + + As always, there is some chaff to go with the wheat. +Areas of duplicated functionality need to be cleaned up. +There are several cases where Bash treats a variable spe- +cially to enable functionality available another way +($notify vs. set -o notify and $nolinks vs. set -o physi- +cal, for instance); the special treatment of the variable +name should probably be removed. A few more things could +stand removal; the $_a_l_l_o_w__n_u_l_l__g_l_o_b__e_x_p_a_n_s_i_o_n and +$_g_l_o_b__d_o_t__f_i_l_e_n_a_m_e_s variables are of particularly question- +able value. The $[...] arithmetic evaluation syntax is +redundant now that the POSIX-mandated $((...)) construct has +been implemented, and could be deleted. It would be nice if +the text output by the _h_e_l_p builtin were external to the +shell rather than compiled into it. The behavior enabled by +$_c_o_m_m_a_n_d__o_r_i_e_n_t_e_d__h_i_s_t_o_r_y, which causes the shell to attempt +to save all lines of a multi-line command in a single his- +tory entry, should be made the default and the variable +removed. + + +_________________________ +|-S. R. Bourne, "UNIX Time-Sharing System: The UNIX +Shell", _B_e_l_l _S_y_s_t_e_m _T_e_c_h_n_i_c_a_l _J_o_u_r_n_a_l, 57(6), July- +August, 1978, pp. 1971-1990. +|=Tom Duff, "Rc - A Shell for Plan 9 and UNIX systems", +_P_r_o_c. _o_f _t_h_e _S_u_m_m_e_r _1_9_9_0 _E_U_U_G _C_o_n_f_e_r_e_n_c_e, London, July, +1990, pp. 21-33. + + + + + October 28, 1994 + + + + + + - 17 - + + +_7. _A_v_a_i_l_a_b_i_l_i_t_y + + As with all other GNU software, Bash is available for +anonymous FTP from _p_r_e_p._a_i._m_i_t._e_d_u:/_p_u_b/_g_n_u and from other +GNU software mirror sites. The current version is in _b_a_s_h- +_1._1_4._1._t_a_r._g_z in that directory. Use _a_r_c_h_i_e to find the +nearest archive site. The latest version is always avail- +able for FTP from _b_a_s_h._C_W_R_U._E_d_u:/_p_u_b/_d_i_s_t. Bash documenta- +tion is available for FTP from _b_a_s_h._C_W_R_U._E_d_u:/_p_u_b/_b_a_s_h. + + The Free Software Foundation sells tapes and CD-ROMs +containing Bash; send electronic mail to gnu@prep.ai.mit.edu +or call +1-617-876-3296 for more information. + + Bash is also distributed with several versions of +UNIX-compatible systems. It is included as /bin/sh and +/bin/bash on several Linux distributions (more about the +difference in a moment), and as contributed software in +BSDI's BSD/386* and FreeBSD. + + The Linux distribution deserves special mention. There +are two configurations included in the standard Bash distri- +bution: a "normal" configuration, in which all of the stan- +dard features are included, and a "minimal" configuration, +which omits job control, aliases, history and command line +editing, the directory stack and _p_u_s_h_d/_p_o_p_d/_d_i_r_s, process +substitution, prompt string special character decoding, and +the _s_e_l_e_c_t construct. This minimal version is designed to +be a drop-in replacement for the traditional UNIX /bin/sh, +and is included as the Linux /bin/sh in several packagings. + +_8. _C_o_n_c_l_u_s_i_o_n + + Bash is a worthy successor to sh. It is sufficiently +portable to run on nearly every version of UNIX from 4.3 BSD +to SVR4.2, and several UNIX workalikes. It is robust enough +to replace sh on most of those systems, and provides more +functionality. It has several thousand regular users, and +their feedback has helped to make it as good as it is today +- a testament to the benefits of free software. + + + + + + + + + + +_________________________ +*BSD/386 is a trademark of Berkeley Software Design, +Inc. + + + + + October 28, 1994 + + diff --git a/bash-5.1/doc/bash.0 b/bash-5.1/doc/bash.0 new file mode 100644 index 0000000000000000000000000000000000000000..9160b097b001463692ca8a7072b73db307031b6a --- /dev/null +++ b/bash-5.1/doc/bash.0 @@ -0,0 +1,6405 @@ +BASH(1) General Commands Manual BASH(1) + + + +NNAAMMEE + bash - GNU Bourne-Again SHell + +SSYYNNOOPPSSIISS + bbaasshh [options] [command_string | file] + +CCOOPPYYRRIIGGHHTT + Bash is Copyright (C) 1989-2020 by the Free Software Foundation, Inc. + +DDEESSCCRRIIPPTTIIOONN + BBaasshh is an sshh-compatible command language interpreter that executes + commands read from the standard input or from a file. BBaasshh also incor- + porates useful features from the _K_o_r_n and _C shells (kksshh and ccsshh). + + BBaasshh is intended to be a conformant implementation of the Shell and + Utilities portion of the IEEE POSIX specification (IEEE Standard + 1003.1). BBaasshh can be configured to be POSIX-conformant by default. + +OOPPTTIIOONNSS + All of the single-character shell options documented in the description + of the sseett builtin command, including --oo, can be used as options when + the shell is invoked. In addition, bbaasshh interprets the following op- + tions when it is invoked: + + --cc If the --cc option is present, then commands are read from the + first non-option argument _c_o_m_m_a_n_d___s_t_r_i_n_g. If there are argu- + ments after the _c_o_m_m_a_n_d___s_t_r_i_n_g, the first argument is as- + signed to $$00 and any remaining arguments are assigned to the + positional parameters. The assignment to $$00 sets the name of + the shell, which is used in warning and error messages. + --ii If the --ii option is present, the shell is _i_n_t_e_r_a_c_t_i_v_e. + --ll Make bbaasshh act as if it had been invoked as a login shell (see + IINNVVOOCCAATTIIOONN below). + --rr If the --rr option is present, the shell becomes _r_e_s_t_r_i_c_t_e_d + (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). + --ss If the --ss option is present, or if no arguments remain after + option processing, then commands are read from the standard + input. This option allows the positional parameters to be + set when invoking an interactive shell or when reading input + through a pipe. + --DD A list of all double-quoted strings preceded by $$ is printed + on the standard output. These are the strings that are sub- + ject to language translation when the current locale is not CC + or PPOOSSIIXX. This implies the --nn option; no commands will be + executed. + [[--++]]OO [[_s_h_o_p_t___o_p_t_i_o_n]] + _s_h_o_p_t___o_p_t_i_o_n is one of the shell options accepted by the + sshhoopptt builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). If + _s_h_o_p_t___o_p_t_i_o_n is present, --OO sets the value of that option; ++OO + unsets it. If _s_h_o_p_t___o_p_t_i_o_n is not supplied, the names and + values of the shell options accepted by sshhoopptt are printed on + the standard output. If the invocation option is ++OO, the + output is displayed in a format that may be reused as input. + ---- A ---- signals the end of options and disables further option + processing. Any arguments after the ---- are treated as file- + names and arguments. An argument of -- is equivalent to ----. + + BBaasshh also interprets a number of multi-character options. These op- + tions must appear on the command line before the single-character op- + tions to be recognized. + + ----ddeebbuuggggeerr + Arrange for the debugger profile to be executed before the shell + starts. Turns on extended debugging mode (see the description + of the eexxttddeebbuugg option to the sshhoopptt builtin below). + ----dduummpp--ppoo--ssttrriinnggss + Equivalent to --DD, but the output is in the GNU _g_e_t_t_e_x_t ppoo (por- + table object) file format. + ----dduummpp--ssttrriinnggss + Equivalent to --DD. + ----hheellpp Display a usage message on standard output and exit success- + fully. + ----iinniitt--ffiillee _f_i_l_e + ----rrccffiillee _f_i_l_e + Execute commands from _f_i_l_e instead of the standard personal ini- + tialization file _~_/_._b_a_s_h_r_c if the shell is interactive (see IINN-- + VVOOCCAATTIIOONN below). + + ----llooggiinn + Equivalent to --ll. + + ----nnooeeddiittiinngg + Do not use the GNU rreeaaddlliinnee library to read command lines when + the shell is interactive. + + ----nnoopprrooffiillee + Do not read either the system-wide startup file _/_e_t_c_/_p_r_o_f_i_l_e or + any of the personal initialization files _~_/_._b_a_s_h___p_r_o_f_i_l_e, + _~_/_._b_a_s_h___l_o_g_i_n, or _~_/_._p_r_o_f_i_l_e. By default, bbaasshh reads these + files when it is invoked as a login shell (see IINNVVOOCCAATTIIOONN be- + low). + + ----nnoorrcc Do not read and execute the personal initialization file + _~_/_._b_a_s_h_r_c if the shell is interactive. This option is on by de- + fault if the shell is invoked as sshh. + + ----ppoossiixx + Change the behavior of bbaasshh where the default operation differs + from the POSIX standard to match the standard (_p_o_s_i_x _m_o_d_e). See + SSEEEE AALLSSOO below for a reference to a document that details how + posix mode affects bash's behavior. + + ----rreessttrriicctteedd + The shell becomes restricted (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). + + ----vveerrbboossee + Equivalent to --vv. + + ----vveerrssiioonn + Show version information for this instance of bbaasshh on the stan- + dard output and exit successfully. + +AARRGGUUMMEENNTTSS + If arguments remain after option processing, and neither the --cc nor the + --ss option has been supplied, the first argument is assumed to be the + name of a file containing shell commands. If bbaasshh is invoked in this + fashion, $$00 is set to the name of the file, and the positional parame- + ters are set to the remaining arguments. BBaasshh reads and executes com- + mands from this file, then exits. BBaasshh's exit status is the exit sta- + tus of the last command executed in the script. If no commands are ex- + ecuted, the exit status is 0. An attempt is first made to open the + file in the current directory, and, if no file is found, then the shell + searches the directories in PPAATTHH for the script. + +IINNVVOOCCAATTIIOONN + A _l_o_g_i_n _s_h_e_l_l is one whose first character of argument zero is a --, or + one started with the ----llooggiinn option. + + An _i_n_t_e_r_a_c_t_i_v_e shell is one started without non-option arguments (un- + less --ss is specified) and without the --cc option whose standard input + and error are both connected to terminals (as determined by _i_s_a_t_t_y(3)), + or one started with the --ii option. PPSS11 is set and $$-- includes ii if + bbaasshh is interactive, allowing a shell script or a startup file to test + this state. + + The following paragraphs describe how bbaasshh executes its startup files. + If any of the files exist but cannot be read, bbaasshh reports an error. + Tildes are expanded in filenames as described below under TTiillddee EExxppaann-- + ssiioonn in the EEXXPPAANNSSIIOONN section. + + When bbaasshh is invoked as an interactive login shell, or as a non-inter- + active shell with the ----llooggiinn option, it first reads and executes com- + mands from the file _/_e_t_c_/_p_r_o_f_i_l_e, if that file exists. After reading + that file, it looks for _~_/_._b_a_s_h___p_r_o_f_i_l_e, _~_/_._b_a_s_h___l_o_g_i_n, and _~_/_._p_r_o_f_i_l_e, + in that order, and reads and executes commands from the first one that + exists and is readable. The ----nnoopprrooffiillee option may be used when the + shell is started to inhibit this behavior. + + When an interactive login shell exits, or a non-interactive login shell + executes the eexxiitt builtin command, bbaasshh reads and executes commands + from the file _~_/_._b_a_s_h___l_o_g_o_u_t, if it exists. + + When an interactive shell that is not a login shell is started, bbaasshh + reads and executes commands from _~_/_._b_a_s_h_r_c, if that file exists. This + may be inhibited by using the ----nnoorrcc option. The ----rrccffiillee _f_i_l_e option + will force bbaasshh to read and execute commands from _f_i_l_e instead of + _~_/_._b_a_s_h_r_c. + + When bbaasshh is started non-interactively, to run a shell script, for ex- + ample, it looks for the variable BBAASSHH__EENNVV in the environment, expands + its value if it appears there, and uses the expanded value as the name + of a file to read and execute. BBaasshh behaves as if the following com- + mand were executed: + if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi + but the value of the PPAATTHH variable is not used to search for the file- + name. + + If bbaasshh is invoked with the name sshh, it tries to mimic the startup be- + havior of historical versions of sshh as closely as possible, while con- + forming to the POSIX standard as well. When invoked as an interactive + login shell, or a non-interactive shell with the ----llooggiinn option, it + first attempts to read and execute commands from _/_e_t_c_/_p_r_o_f_i_l_e and + _~_/_._p_r_o_f_i_l_e, in that order. The ----nnoopprrooffiillee option may be used to in- + hibit this behavior. When invoked as an interactive shell with the + name sshh, bbaasshh looks for the variable EENNVV, expands its value if it is + defined, and uses the expanded value as the name of a file to read and + execute. Since a shell invoked as sshh does not attempt to read and exe- + cute commands from any other startup files, the ----rrccffiillee option has no + effect. A non-interactive shell invoked with the name sshh does not at- + tempt to read any other startup files. When invoked as sshh, bbaasshh enters + _p_o_s_i_x mode after the startup files are read. + + When bbaasshh is started in _p_o_s_i_x mode, as with the ----ppoossiixx command line + option, it follows the POSIX standard for startup files. In this mode, + interactive shells expand the EENNVV variable and commands are read and + executed from the file whose name is the expanded value. No other + startup files are read. + + BBaasshh attempts to determine when it is being run with its standard input + connected to a network connection, as when executed by the remote shell + daemon, usually _r_s_h_d, or the secure shell daemon _s_s_h_d. If bbaasshh deter- + mines it is being run in this fashion, it reads and executes commands + from _~_/_._b_a_s_h_r_c, if that file exists and is readable. It will not do + this if invoked as sshh. The ----nnoorrcc option may be used to inhibit this + behavior, and the ----rrccffiillee option may be used to force another file to + be read, but neither _r_s_h_d nor _s_s_h_d generally invoke the shell with + those options or allow them to be specified. + + If the shell is started with the effective user (group) id not equal to + the real user (group) id, and the --pp option is not supplied, no startup + files are read, shell functions are not inherited from the environment, + the SSHHEELLLLOOPPTTSS, BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they ap- + pear in the environment, are ignored, and the effective user id is set + to the real user id. If the --pp option is supplied at invocation, the + startup behavior is the same, but the effective user id is not reset. + +DDEEFFIINNIITTIIOONNSS + The following definitions are used throughout the rest of this docu- + ment. + bbllaannkk A space or tab. + wwoorrdd A sequence of characters considered as a single unit by the + shell. Also known as a ttookkeenn. + nnaammee A _w_o_r_d consisting only of alphanumeric characters and under- + scores, and beginning with an alphabetic character or an under- + score. Also referred to as an iiddeennttiiffiieerr. + mmeettaacchhaarraacctteerr + A character that, when unquoted, separates words. One of the + following: + || && ;; (( )) << >> ssppaaccee ttaabb nneewwlliinnee + ccoonnttrrooll ooppeerraattoorr + A _t_o_k_e_n that performs a control function. It is one of the fol- + lowing symbols: + |||| && &&&& ;; ;;;; ;;&& ;;;;&& (( )) || ||&& <> + +RREESSEERRVVEEDD WWOORRDDSS + _R_e_s_e_r_v_e_d _w_o_r_d_s are words that have a special meaning to the shell. The + following words are recognized as reserved when unquoted and either the + first word of a command (see SSHHEELLLL GGRRAAMMMMAARR below), the third word of a + ccaassee or sseelleecctt command (only iinn is valid), or the third word of a ffoorr + command (only iinn and ddoo are valid): + + !! ccaassee ccoopprroocc ddoo ddoonnee eelliiff eellssee eessaacc ffii ffoorr ffuunnccttiioonn iiff iinn sseelleecctt + tthheenn uunnttiill wwhhiillee {{ }} ttiimmee [[[[ ]]]] + +SSHHEELLLL GGRRAAMMMMAARR + SSiimmppllee CCoommmmaannddss + A _s_i_m_p_l_e _c_o_m_m_a_n_d is a sequence of optional variable assignments fol- + lowed by bbllaannkk-separated words and redirections, and terminated by a + _c_o_n_t_r_o_l _o_p_e_r_a_t_o_r. The first word specifies the command to be executed, + and is passed as argument zero. The remaining words are passed as ar- + guments to the invoked command. + + The return value of a _s_i_m_p_l_e _c_o_m_m_a_n_d is its exit status, or 128+_n if + the command is terminated by signal _n. + + PPiippeelliinneess + A _p_i_p_e_l_i_n_e is a sequence of one or more commands separated by one of + the control operators || or ||&&. The format for a pipeline is: + + [ttiimmee [--pp]] [ ! ] _c_o_m_m_a_n_d [ [|||||&&] _c_o_m_m_a_n_d_2 ... ] + + The standard output of _c_o_m_m_a_n_d is connected via a pipe to the standard + input of _c_o_m_m_a_n_d_2. This connection is performed before any redirec- + tions specified by the command (see RREEDDIIRREECCTTIIOONN below). If ||&& is used, + _c_o_m_m_a_n_d's standard error, in addition to its standard output, is con- + nected to _c_o_m_m_a_n_d_2's standard input through the pipe; it is shorthand + for 22>>&&11 ||. This implicit redirection of the standard error to the + standard output is performed after any redirections specified by the + command. + + The return status of a pipeline is the exit status of the last command, + unless the ppiippeeffaaiill option is enabled. If ppiippeeffaaiill is enabled, the + pipeline's return status is the value of the last (rightmost) command + to exit with a non-zero status, or zero if all commands exit success- + fully. If the reserved word !! precedes a pipeline, the exit status of + that pipeline is the logical negation of the exit status as described + above. The shell waits for all commands in the pipeline to terminate + before returning a value. + + If the ttiimmee reserved word precedes a pipeline, the elapsed as well as + user and system time consumed by its execution are reported when the + pipeline terminates. The --pp option changes the output format to that + specified by POSIX. When the shell is in _p_o_s_i_x _m_o_d_e, it does not rec- + ognize ttiimmee as a reserved word if the next token begins with a `-'. + The TTIIMMEEFFOORRMMAATT variable may be set to a format string that specifies + how the timing information should be displayed; see the description of + TTIIMMEEFFOORRMMAATT under SShheellll VVaarriiaabblleess below. + + When the shell is in _p_o_s_i_x _m_o_d_e, ttiimmee may be followed by a newline. In + this case, the shell displays the total user and system time consumed + by the shell and its children. The TTIIMMEEFFOORRMMAATT variable may be used to + specify the format of the time information. + + Each command in a pipeline is executed as a separate process (i.e., in + a subshell). See CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT for a description of a + subshell environment. If the llaassttppiippee option is enabled using the + sshhoopptt builtin (see the description of sshhoopptt below), the last element of + a pipeline may be run by the shell process. + + LLiissttss + A _l_i_s_t is a sequence of one or more pipelines separated by one of the + operators ;;, &&, &&&&, or ||||, and optionally terminated by one of ;;, &&, or + <>. + + Of these list operators, &&&& and |||| have equal precedence, followed by ;; + and &&, which have equal precedence. + + A sequence of one or more newlines may appear in a _l_i_s_t instead of a + semicolon to delimit commands. + + If a command is terminated by the control operator &&, the shell exe- + cutes the command in the _b_a_c_k_g_r_o_u_n_d in a subshell. The shell does not + wait for the command to finish, and the return status is 0. These are + referred to as _a_s_y_n_c_h_r_o_n_o_u_s commands. Commands separated by a ;; are + executed sequentially; the shell waits for each command to terminate in + turn. The return status is the exit status of the last command exe- + cuted. + + AND and OR lists are sequences of one or more pipelines separated by + the &&&& and |||| control operators, respectively. AND and OR lists are + executed with left associativity. An AND list has the form + + _c_o_m_m_a_n_d_1 &&&& _c_o_m_m_a_n_d_2 + + _c_o_m_m_a_n_d_2 is executed if, and only if, _c_o_m_m_a_n_d_1 returns an exit status + of zero (success). + + An OR list has the form + + _c_o_m_m_a_n_d_1 |||| _c_o_m_m_a_n_d_2 + + _c_o_m_m_a_n_d_2 is executed if, and only if, _c_o_m_m_a_n_d_1 returns a non-zero exit + status. The return status of AND and OR lists is the exit status of + the last command executed in the list. + + CCoommppoouunndd CCoommmmaannddss + A _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d is one of the following. In most cases a _l_i_s_t in a + command's description may be separated from the rest of the command by + one or more newlines, and may be followed by a newline in place of a + semicolon. + + (_l_i_s_t) _l_i_s_t is executed in a subshell environment (see CCOOMMMMAANNDD EEXXEECCUU-- + TTIIOONN EENNVVIIRROONNMMEENNTT below). Variable assignments and builtin com- + mands that affect the shell's environment do not remain in ef- + fect after the command completes. The return status is the exit + status of _l_i_s_t. + + { _l_i_s_t; } + _l_i_s_t is simply executed in the current shell environment. _l_i_s_t + must be terminated with a newline or semicolon. This is known + as a _g_r_o_u_p _c_o_m_m_a_n_d. The return status is the exit status of + _l_i_s_t. Note that unlike the metacharacters (( and )), {{ and }} are + _r_e_s_e_r_v_e_d _w_o_r_d_s and must occur where a reserved word is permitted + to be recognized. Since they do not cause a word break, they + must be separated from _l_i_s_t by whitespace or another shell + metacharacter. + + ((_e_x_p_r_e_s_s_i_o_n)) + The _e_x_p_r_e_s_s_i_o_n is evaluated according to the rules described be- + low under AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN. If the value of the expression + is non-zero, the return status is 0; otherwise the return status + is 1. This is exactly equivalent to lleett ""_e_x_p_r_e_s_s_i_o_n"". + + [[[[ _e_x_p_r_e_s_s_i_o_n ]]]] + Return a status of 0 or 1 depending on the evaluation of the + conditional expression _e_x_p_r_e_s_s_i_o_n. Expressions are composed of + the primaries described below under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. + Word splitting and pathname expansion are not performed on the + words between the [[[[ and ]]]]; tilde expansion, parameter and + variable expansion, arithmetic expansion, command substitution, + process substitution, and quote removal are performed. Condi- + tional operators such as --ff must be unquoted to be recognized as + primaries. + + When used with [[[[, the << and >> operators sort lexicographically + using the current locale. + + When the ==== and !!== operators are used, the string to the right + of the operator is considered a pattern and matched according to + the rules described below under PPaatttteerrnn MMaattcchhiinngg, as if the eexxtt-- + gglloobb shell option were enabled. The == operator is equivalent to + ====. If the nnooccaasseemmaattcchh shell option is enabled, the match is + performed without regard to the case of alphabetic characters. + The return value is 0 if the string matches (====) or does not + match (!!==) the pattern, and 1 otherwise. Any part of the pat- + tern may be quoted to force the quoted portion to be matched as + a string. + + An additional binary operator, ==~~, is available, with the same + precedence as ==== and !!==. When it is used, the string to the + right of the operator is considered a POSIX extended regular ex- + pression and matched accordingly (using the POSIX _r_e_g_c_o_m_p and + _r_e_g_e_x_e_c interfaces usually described in _r_e_g_e_x(3)). The return + value is 0 if the string matches the pattern, and 1 otherwise. + If the regular expression is syntactically incorrect, the condi- + tional expression's return value is 2. If the nnooccaasseemmaattcchh shell + option is enabled, the match is performed without regard to the + case of alphabetic characters. Any part of the pattern may be + quoted to force the quoted portion to be matched as a string. + Bracket expressions in regular expressions must be treated care- + fully, since normal quoting characters lose their meanings be- + tween brackets. If the pattern is stored in a shell variable, + quoting the variable expansion forces the entire pattern to be + matched as a string. + + The pattern will match if it matches any part of the string. + Anchor the pattern using the ^^ and $$ regular expression opera- + tors to force it to match the entire string. The array variable + BBAASSHH__RREEMMAATTCCHH records which parts of the string matched the pat- + tern. The element of BBAASSHH__RREEMMAATTCCHH with index 0 contains the + portion of the string matching the entire regular expression. + Substrings matched by parenthesized subexpressions within the + regular expression are saved in the remaining BBAASSHH__RREEMMAATTCCHH in- + dices. The element of BBAASSHH__RREEMMAATTCCHH with index _n is the portion + of the string matching the _nth parenthesized subexpression. + + Expressions may be combined using the following operators, + listed in decreasing order of precedence: + + (( _e_x_p_r_e_s_s_i_o_n )) + Returns the value of _e_x_p_r_e_s_s_i_o_n. This may be used to + override the normal precedence of operators. + !! _e_x_p_r_e_s_s_i_o_n + True if _e_x_p_r_e_s_s_i_o_n is false. + _e_x_p_r_e_s_s_i_o_n_1 &&&& _e_x_p_r_e_s_s_i_o_n_2 + True if both _e_x_p_r_e_s_s_i_o_n_1 and _e_x_p_r_e_s_s_i_o_n_2 are true. + _e_x_p_r_e_s_s_i_o_n_1 |||| _e_x_p_r_e_s_s_i_o_n_2 + True if either _e_x_p_r_e_s_s_i_o_n_1 or _e_x_p_r_e_s_s_i_o_n_2 is true. + + The &&&& and |||| operators do not evaluate _e_x_p_r_e_s_s_i_o_n_2 if the value + of _e_x_p_r_e_s_s_i_o_n_1 is sufficient to determine the return value of + the entire conditional expression. + + ffoorr _n_a_m_e [ [ iinn [ _w_o_r_d _._._. ] ] ; ] ddoo _l_i_s_t ; ddoonnee + The list of words following iinn is expanded, generating a list of + items. The variable _n_a_m_e is set to each element of this list in + turn, and _l_i_s_t is executed each time. If the iinn _w_o_r_d is omit- + ted, the ffoorr command executes _l_i_s_t once for each positional pa- + rameter that is set (see PPAARRAAMMEETTEERRSS below). The return status + is the exit status of the last command that executes. If the + expansion of the items following iinn results in an empty list, no + commands are executed, and the return status is 0. + + ffoorr (( _e_x_p_r_1 ; _e_x_p_r_2 ; _e_x_p_r_3 )) ; ddoo _l_i_s_t ; ddoonnee + First, the arithmetic expression _e_x_p_r_1 is evaluated according to + the rules described below under AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN. The + arithmetic expression _e_x_p_r_2 is then evaluated repeatedly until + it evaluates to zero. Each time _e_x_p_r_2 evaluates to a non-zero + value, _l_i_s_t is executed and the arithmetic expression _e_x_p_r_3 is + evaluated. If any expression is omitted, it behaves as if it + evaluates to 1. The return value is the exit status of the last + command in _l_i_s_t that is executed, or false if any of the expres- + sions is invalid. + + sseelleecctt _n_a_m_e [ iinn _w_o_r_d ] ; ddoo _l_i_s_t ; ddoonnee + The list of words following iinn is expanded, generating a list of + items. The set of expanded words is printed on the standard er- + ror, each preceded by a number. If the iinn _w_o_r_d is omitted, the + positional parameters are printed (see PPAARRAAMMEETTEERRSS below). The + PPSS33 prompt is then displayed and a line read from the standard + input. If the line consists of a number corresponding to one of + the displayed words, then the value of _n_a_m_e is set to that word. + If the line is empty, the words and prompt are displayed again. + If EOF is read, the command completes. Any other value read + causes _n_a_m_e to be set to null. The line read is saved in the + variable RREEPPLLYY. The _l_i_s_t is executed after each selection until + a bbrreeaakk command is executed. The exit status of sseelleecctt is the + exit status of the last command executed in _l_i_s_t, or zero if no + commands were executed. + + ccaassee _w_o_r_d iinn [ [(] _p_a_t_t_e_r_n [ || _p_a_t_t_e_r_n ] ... ) _l_i_s_t ;; ] ... eessaacc + A ccaassee command first expands _w_o_r_d, and tries to match it against + each _p_a_t_t_e_r_n in turn, using the matching rules described under + PPaatttteerrnn MMaattcchhiinngg below. The _w_o_r_d is expanded using tilde expan- + sion, parameter and variable expansion, arithmetic expansion, + command substitution, process substitution and quote removal. + Each _p_a_t_t_e_r_n examined is expanded using tilde expansion, parame- + ter and variable expansion, arithmetic expansion, command sub- + stitution, and process substitution. If the nnooccaasseemmaattcchh shell + option is enabled, the match is performed without regard to the + case of alphabetic characters. When a match is found, the cor- + responding _l_i_s_t is executed. If the ;;;; operator is used, no + subsequent matches are attempted after the first pattern match. + Using ;;&& in place of ;;;; causes execution to continue with the + _l_i_s_t associated with the next set of patterns. Using ;;;;&& in + place of ;;;; causes the shell to test the next pattern list in + the statement, if any, and execute any associated _l_i_s_t on a suc- + cessful match, continuing the case statement execution as if the + pattern list had not matched. The exit status is zero if no + pattern matches. Otherwise, it is the exit status of the last + command executed in _l_i_s_t. + + iiff _l_i_s_t; tthheenn _l_i_s_t; [ eelliiff _l_i_s_t; tthheenn _l_i_s_t; ] ... [ eellssee _l_i_s_t; ] ffii + The iiff _l_i_s_t is executed. If its exit status is zero, the tthheenn + _l_i_s_t is executed. Otherwise, each eelliiff _l_i_s_t is executed in + turn, and if its exit status is zero, the corresponding tthheenn + _l_i_s_t is executed and the command completes. Otherwise, the eellssee + _l_i_s_t is executed, if present. The exit status is the exit sta- + tus of the last command executed, or zero if no condition tested + true. + + wwhhiillee _l_i_s_t_-_1; ddoo _l_i_s_t_-_2; ddoonnee + uunnttiill _l_i_s_t_-_1; ddoo _l_i_s_t_-_2; ddoonnee + The wwhhiillee command continuously executes the list _l_i_s_t_-_2 as long + as the last command in the list _l_i_s_t_-_1 returns an exit status of + zero. The uunnttiill command is identical to the wwhhiillee command, ex- + cept that the test is negated: _l_i_s_t_-_2 is executed as long as the + last command in _l_i_s_t_-_1 returns a non-zero exit status. The exit + status of the wwhhiillee and uunnttiill commands is the exit status of the + last command executed in _l_i_s_t_-_2, or zero if none was executed. + + CCoopprroocceesssseess + A _c_o_p_r_o_c_e_s_s is a shell command preceded by the ccoopprroocc reserved word. A + coprocess is executed asynchronously in a subshell, as if the command + had been terminated with the && control operator, with a two-way pipe + established between the executing shell and the coprocess. + + The format for a coprocess is: + + ccoopprroocc [_N_A_M_E] _c_o_m_m_a_n_d [_r_e_d_i_r_e_c_t_i_o_n_s] + + This creates a coprocess named _N_A_M_E. If _N_A_M_E is not supplied, the de- + fault name is CCOOPPRROOCC. _N_A_M_E must not be supplied if _c_o_m_m_a_n_d is a _s_i_m_p_l_e + _c_o_m_m_a_n_d (see above); otherwise, it is interpreted as the first word of + the simple command. When the coprocess is executed, the shell creates + an array variable (see AArrrraayyss below) named _N_A_M_E in the context of the + executing shell. The standard output of _c_o_m_m_a_n_d is connected via a + pipe to a file descriptor in the executing shell, and that file de- + scriptor is assigned to _N_A_M_E[0]. The standard input of _c_o_m_m_a_n_d is con- + nected via a pipe to a file descriptor in the executing shell, and that + file descriptor is assigned to _N_A_M_E[1]. This pipe is established be- + fore any redirections specified by the command (see RREEDDIIRREECCTTIIOONN below). + The file descriptors can be utilized as arguments to shell commands and + redirections using standard word expansions. Other than those created + to execute command and process substitutions, the file descriptors are + not available in subshells. The process ID of the shell spawned to ex- + ecute the coprocess is available as the value of the variable _N_A_M_E_PID. + The wwaaiitt builtin command may be used to wait for the coprocess to ter- + minate. + + Since the coprocess is created as an asynchronous command, the ccoopprroocc + command always returns success. The return status of a coprocess is + the exit status of _c_o_m_m_a_n_d. + + SShheellll FFuunnccttiioonn DDeeffiinniittiioonnss + A shell function is an object that is called like a simple command and + executes a compound command with a new set of positional parameters. + Shell functions are declared as follows: + + _f_n_a_m_e () _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d [_r_e_d_i_r_e_c_t_i_o_n] + ffuunnccttiioonn _f_n_a_m_e [()] _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d [_r_e_d_i_r_e_c_t_i_o_n] + This defines a function named _f_n_a_m_e. The reserved word ffuunnccttiioonn + is optional. If the ffuunnccttiioonn reserved word is supplied, the + parentheses are optional. The _b_o_d_y of the function is the com- + pound command _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d (see CCoommppoouunndd CCoommmmaannddss above). + That command is usually a _l_i_s_t of commands between { and }, but + may be any command listed under CCoommppoouunndd CCoommmmaannddss above, with + one exception: If the ffuunnccttiioonn reserved word is used, but the + parentheses are not supplied, the braces are required. _c_o_m_- + _p_o_u_n_d_-_c_o_m_m_a_n_d is executed whenever _f_n_a_m_e is specified as the + name of a simple command. When in _p_o_s_i_x _m_o_d_e, _f_n_a_m_e must be a + valid shell _n_a_m_e and may not be the name of one of the POSIX + _s_p_e_c_i_a_l _b_u_i_l_t_i_n_s. In default mode, a function name can be any + unquoted shell word that does not contain $$. Any redirections + (see RREEDDIIRREECCTTIIOONN below) specified when a function is defined are + performed when the function is executed. The exit status of a + function definition is zero unless a syntax error occurs or a + readonly function with the same name already exists. When exe- + cuted, the exit status of a function is the exit status of the + last command executed in the body. (See FFUUNNCCTTIIOONNSS below.) + +CCOOMMMMEENNTTSS + In a non-interactive shell, or an interactive shell in which the iinntteerr-- + aaccttiivvee__ccoommmmeennttss option to the sshhoopptt builtin is enabled (see SSHHEELLLL + BBUUIILLTTIINN CCOOMMMMAANNDDSS below), a word beginning with ## causes that word and + all remaining characters on that line to be ignored. An interactive + shell without the iinntteerraaccttiivvee__ccoommmmeennttss option enabled does not allow + comments. The iinntteerraaccttiivvee__ccoommmmeennttss option is on by default in interac- + tive shells. + +QQUUOOTTIINNGG + _Q_u_o_t_i_n_g is used to remove the special meaning of certain characters or + words to the shell. Quoting can be used to disable special treatment + for special characters, to prevent reserved words from being recognized + as such, and to prevent parameter expansion. + + Each of the _m_e_t_a_c_h_a_r_a_c_t_e_r_s listed above under DDEEFFIINNIITTIIOONNSS has special + meaning to the shell and must be quoted if it is to represent itself. + + When the command history expansion facilities are being used (see HHIISS-- + TTOORRYY EEXXPPAANNSSIIOONN below), the _h_i_s_t_o_r_y _e_x_p_a_n_s_i_o_n character, usually !!, must + be quoted to prevent history expansion. + + There are three quoting mechanisms: the _e_s_c_a_p_e _c_h_a_r_a_c_t_e_r, single + quotes, and double quotes. + + A non-quoted backslash (\\) is the _e_s_c_a_p_e _c_h_a_r_a_c_t_e_r. It preserves the + literal value of the next character that follows, with the exception of + . If a \\ pair appears, and the backslash is not it- + self quoted, the \\ is treated as a line continuation (that is, + it is removed from the input stream and effectively ignored). + + Enclosing characters in single quotes preserves the literal value of + each character within the quotes. A single quote may not occur between + single quotes, even when preceded by a backslash. + + Enclosing characters in double quotes preserves the literal value of + all characters within the quotes, with the exception of $$, ``, \\, and, + when history expansion is enabled, !!. When the shell is in _p_o_s_i_x _m_o_d_e, + the !! has no special meaning within double quotes, even when history + expansion is enabled. The characters $$ and `` retain their special + meaning within double quotes. The backslash retains its special mean- + ing only when followed by one of the following characters: $$, ``, "", \\, + or <>. A double quote may be quoted within double quotes by + preceding it with a backslash. If enabled, history expansion will be + performed unless an !! appearing in double quotes is escaped using a + backslash. The backslash preceding the !! is not removed. + + The special parameters ** and @@ have special meaning when in double + quotes (see PPAARRAAMMEETTEERRSS below). + + Words of the form $$'_s_t_r_i_n_g' are treated specially. The word expands to + _s_t_r_i_n_g, with backslash-escaped characters replaced as specified by the + ANSI C standard. Backslash escape sequences, if present, are decoded + as follows: + \\aa alert (bell) + \\bb backspace + \\ee + \\EE an escape character + \\ff form feed + \\nn new line + \\rr carriage return + \\tt horizontal tab + \\vv vertical tab + \\\\ backslash + \\'' single quote + \\"" double quote + \\?? question mark + \\_n_n_n the eight-bit character whose value is the octal value + _n_n_n (one to three octal digits) + \\xx_H_H the eight-bit character whose value is the hexadecimal + value _H_H (one or two hex digits) + \\uu_H_H_H_H the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H (one to four hex digits) + \\UU_H_H_H_H_H_H_H_H + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H_H_H_H_H (one to eight hex digits) + \\cc_x a control-_x character + + The expanded result is single-quoted, as if the dollar sign had not + been present. + + A double-quoted string preceded by a dollar sign ($$"_s_t_r_i_n_g") will cause + the string to be translated according to the current locale. The _g_e_t_- + _t_e_x_t infrastructure performs the message catalog lookup and transla- + tion, using the LLCC__MMEESSSSAAGGEESS and TTEEXXTTDDOOMMAAIINN shell variables. If the + current locale is CC or PPOOSSIIXX, or if there are no translations avail- + able, the dollar sign is ignored. If the string is translated and re- + placed, the replacement is double-quoted. + +PPAARRAAMMEETTEERRSS + A _p_a_r_a_m_e_t_e_r is an entity that stores values. It can be a _n_a_m_e, a num- + ber, or one of the special characters listed below under SSppeecciiaall PPaarraamm-- + eetteerrss. A _v_a_r_i_a_b_l_e is a parameter denoted by a _n_a_m_e. A variable has a + _v_a_l_u_e and zero or more _a_t_t_r_i_b_u_t_e_s. Attributes are assigned using the + ddeeccllaarree builtin command (see ddeeccllaarree below in SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS). + + A parameter is set if it has been assigned a value. The null string is + a valid value. Once a variable is set, it may be unset only by using + the uunnsseett builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + + A _v_a_r_i_a_b_l_e may be assigned to by a statement of the form + + _n_a_m_e=[_v_a_l_u_e] + + If _v_a_l_u_e is not given, the variable is assigned the null string. All + _v_a_l_u_e_s undergo tilde expansion, parameter and variable expansion, com- + mand substitution, arithmetic expansion, and quote removal (see EEXXPPAANN-- + SSIIOONN below). If the variable has its iinntteeggeerr attribute set, then _v_a_l_u_e + is evaluated as an arithmetic expression even if the $((...)) expansion + is not used (see AArriitthhmmeettiicc EExxppaannssiioonn below). Word splitting is not + performed, with the exception of ""$$@@"" as explained below under SSppeecciiaall + PPaarraammeetteerrss. Pathname expansion is not performed. Assignment state- + ments may also appear as arguments to the aalliiaass, ddeeccllaarree, ttyyppeesseett, eexx-- + ppoorrtt, rreeaaddoonnllyy, and llooccaall builtin commands (_d_e_c_l_a_r_a_t_i_o_n commands). + When in _p_o_s_i_x _m_o_d_e, these builtins may appear in a command after one or + more instances of the ccoommmmaanndd builtin and retain these assignment + statement properties. + + In the context where an assignment statement is assigning a value to a + shell variable or array index, the += operator can be used to append to + or add to the variable's previous value. This includes arguments to + builtin commands such as ddeeccllaarree that accept assignment statements + (_d_e_c_l_a_r_a_t_i_o_n commands). When += is applied to a variable for which the + _i_n_t_e_g_e_r attribute has been set, _v_a_l_u_e is evaluated as an arithmetic ex- + pression and added to the variable's current value, which is also eval- + uated. When += is applied to an array variable using compound assign- + ment (see AArrrraayyss below), the variable's value is not unset (as it is + when using =), and new values are appended to the array beginning at + one greater than the array's maximum index (for indexed arrays) or + added as additional key-value pairs in an associative array. When ap- + plied to a string-valued variable, _v_a_l_u_e is expanded and appended to + the variable's value. + + A variable can be assigned the _n_a_m_e_r_e_f attribute using the --nn option to + the ddeeccllaarree or llooccaall builtin commands (see the descriptions of ddeeccllaarree + and llooccaall below) to create a _n_a_m_e_r_e_f, or a reference to another vari- + able. This allows variables to be manipulated indirectly. Whenever + the nameref variable is referenced, assigned to, unset, or has its at- + tributes modified (other than using or changing the _n_a_m_e_r_e_f attribute + itself), the operation is actually performed on the variable specified + by the nameref variable's value. A nameref is commonly used within + shell functions to refer to a variable whose name is passed as an argu- + ment to the function. For instance, if a variable name is passed to a + shell function as its first argument, running + declare -n ref=$1 + inside the function creates a nameref variable rreeff whose value is the + variable name passed as the first argument. References and assignments + to rreeff, and changes to its attributes, are treated as references, as- + signments, and attribute modifications to the variable whose name was + passed as $$11. If the control variable in a ffoorr loop has the nameref + attribute, the list of words can be a list of shell variables, and a + name reference will be established for each word in the list, in turn, + when the loop is executed. Array variables cannot be given the nnaammeerreeff + attribute. However, nameref variables can reference array variables + and subscripted array variables. Namerefs can be unset using the --nn + option to the uunnsseett builtin. Otherwise, if uunnsseett is executed with the + name of a nameref variable as an argument, the variable referenced by + the nameref variable will be unset. + + PPoossiittiioonnaall PPaarraammeetteerrss + A _p_o_s_i_t_i_o_n_a_l _p_a_r_a_m_e_t_e_r is a parameter denoted by one or more digits, + other than the single digit 0. Positional parameters are assigned from + the shell's arguments when it is invoked, and may be reassigned using + the sseett builtin command. Positional parameters may not be assigned to + with assignment statements. The positional parameters are temporarily + replaced when a shell function is executed (see FFUUNNCCTTIIOONNSS below). + + When a positional parameter consisting of more than a single digit is + expanded, it must be enclosed in braces (see EEXXPPAANNSSIIOONN below). + + SSppeecciiaall PPaarraammeetteerrss + The shell treats several parameters specially. These parameters may + only be referenced; assignment to them is not allowed. + ** Expands to the positional parameters, starting from one. When + the expansion is not within double quotes, each positional pa- + rameter expands to a separate word. In contexts where it is + performed, those words are subject to further word splitting and + pathname expansion. When the expansion occurs within double + quotes, it expands to a single word with the value of each pa- + rameter separated by the first character of the IIFFSS special + variable. That is, "$$**" is equivalent to "$$11_c$$22_c......", where _c + is the first character of the value of the IIFFSS variable. If IIFFSS + is unset, the parameters are separated by spaces. If IIFFSS is + null, the parameters are joined without intervening separators. + @@ Expands to the positional parameters, starting from one. In + contexts where word splitting is performed, this expands each + positional parameter to a separate word; if not within double + quotes, these words are subject to word splitting. In contexts + where word splitting is not performed, this expands to a single + word with each positional parameter separated by a space. When + the expansion occurs within double quotes, each parameter ex- + pands to a separate word. That is, "$$@@" is equivalent to "$$11" + "$$22" ... If the double-quoted expansion occurs within a word, + the expansion of the first parameter is joined with the begin- + ning part of the original word, and the expansion of the last + parameter is joined with the last part of the original word. + When there are no positional parameters, "$$@@" and $$@@ expand to + nothing (i.e., they are removed). + ## Expands to the number of positional parameters in decimal. + ?? Expands to the exit status of the most recently executed fore- + ground pipeline. + -- Expands to the current option flags as specified upon invoca- + tion, by the sseett builtin command, or those set by the shell it- + self (such as the --ii option). + $$ Expands to the process ID of the shell. In a () subshell, it + expands to the process ID of the current shell, not the sub- + shell. + !! Expands to the process ID of the job most recently placed into + the background, whether executed as an asynchronous command or + using the bbgg builtin (see JJOOBB CCOONNTTRROOLL below). + 00 Expands to the name of the shell or shell script. This is set + at shell initialization. If bbaasshh is invoked with a file of com- + mands, $$00 is set to the name of that file. If bbaasshh is started + with the --cc option, then $$00 is set to the first argument after + the string to be executed, if one is present. Otherwise, it is + set to the filename used to invoke bbaasshh, as given by argument + zero. + + SShheellll VVaarriiaabblleess + The following variables are set by the shell: + + __ At shell startup, set to the pathname used to invoke the shell + or shell script being executed as passed in the environment or + argument list. Subsequently, expands to the last argument to + the previous simple command executed in the foreground, after + expansion. Also set to the full pathname used to invoke each + command executed and placed in the environment exported to that + command. When checking mail, this parameter holds the name of + the mail file currently being checked. + BBAASSHH Expands to the full filename used to invoke this instance of + bbaasshh. + BBAASSHHOOPPTTSS + A colon-separated list of enabled shell options. Each word in + the list is a valid argument for the --ss option to the sshhoopptt + builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). The options + appearing in BBAASSHHOOPPTTSS are those reported as _o_n by sshhoopptt. If + this variable is in the environment when bbaasshh starts up, each + shell option in the list will be enabled before reading any + startup files. This variable is read-only. + BBAASSHHPPIIDD + Expands to the process ID of the current bbaasshh process. This + differs from $$$$ under certain circumstances, such as subshells + that do not require bbaasshh to be re-initialized. Assignments to + BBAASSHHPPIIDD have no effect. If BBAASSHHPPIIDD is unset, it loses its spe- + cial properties, even if it is subsequently reset. + BBAASSHH__AALLIIAASSEESS + An associative array variable whose members correspond to the + internal list of aliases as maintained by the aalliiaass builtin. + Elements added to this array appear in the alias list; however, + unsetting array elements currently does not cause aliases to be + removed from the alias list. If BBAASSHH__AALLIIAASSEESS is unset, it loses + its special properties, even if it is subsequently reset. + BBAASSHH__AARRGGCC + An array variable whose values are the number of parameters in + each frame of the current bbaasshh execution call stack. The number + of parameters to the current subroutine (shell function or + script executed with .. or ssoouurrccee) is at the top of the stack. + When a subroutine is executed, the number of parameters passed + is pushed onto BBAASSHH__AARRGGCC. The shell sets BBAASSHH__AARRGGCC only when in + extended debugging mode (see the description of the eexxttddeebbuugg op- + tion to the sshhoopptt builtin below). Setting eexxttddeebbuugg after the + shell has started to execute a script, or referencing this vari- + able when eexxttddeebbuugg is not set, may result in inconsistent val- + ues. + BBAASSHH__AARRGGVV + An array variable containing all of the parameters in the cur- + rent bbaasshh execution call stack. The final parameter of the last + subroutine call is at the top of the stack; the first parameter + of the initial call is at the bottom. When a subroutine is exe- + cuted, the parameters supplied are pushed onto BBAASSHH__AARRGGVV. The + shell sets BBAASSHH__AARRGGVV only when in extended debugging mode (see + the description of the eexxttddeebbuugg option to the sshhoopptt builtin be- + low). Setting eexxttddeebbuugg after the shell has started to execute a + script, or referencing this variable when eexxttddeebbuugg is not set, + may result in inconsistent values. + BBAASSHH__AARRGGVV00 + When referenced, this variable expands to the name of the shell + or shell script (identical to $$00; see the description of special + parameter 0 above). Assignment to BBAASSHH__AARRGGVV00 causes the value + assigned to also be assigned to $$00. If BBAASSHH__AARRGGVV00 is unset, it + loses its special properties, even if it is subsequently reset. + BBAASSHH__CCMMDDSS + An associative array variable whose members correspond to the + internal hash table of commands as maintained by the hhaasshh + builtin. Elements added to this array appear in the hash table; + however, unsetting array elements currently does not cause com- + mand names to be removed from the hash table. If BBAASSHH__CCMMDDSS is + unset, it loses its special properties, even if it is subse- + quently reset. + BBAASSHH__CCOOMMMMAANNDD + The command currently being executed or about to be executed, + unless the shell is executing a command as the result of a trap, + in which case it is the command executing at the time of the + trap. If BBAASSHH__CCOOMMMMAANNDD is unset, it loses its special proper- + ties, even if it is subsequently reset. + BBAASSHH__EEXXEECCUUTTIIOONN__SSTTRRIINNGG + The command argument to the --cc invocation option. + BBAASSHH__LLIINNEENNOO + An array variable whose members are the line numbers in source + files where each corresponding member of FFUUNNCCNNAAMMEE was invoked. + $${{BBAASSHH__LLIINNEENNOO[[_$_i]]}} is the line number in the source file + ($${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}}) where $${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called (or + $${{BBAASSHH__LLIINNEENNOO[[_$_i_-_1]]}} if referenced within another shell func- + tion). Use LLIINNEENNOO to obtain the current line number. + BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH + A colon-separated list of directories in which the shell looks + for dynamically loadable builtins specified by the eennaabbllee com- + mand. + BBAASSHH__RREEMMAATTCCHH + An array variable whose members are assigned by the ==~~ binary + operator to the [[[[ conditional command. The element with index + 0 is the portion of the string matching the entire regular ex- + pression. The element with index _n is the portion of the string + matching the _nth parenthesized subexpression. + BBAASSHH__SSOOUURRCCEE + An array variable whose members are the source filenames where + the corresponding shell function names in the FFUUNNCCNNAAMMEE array + variable are defined. The shell function $${{FFUUNNCCNNAAMMEE[[_$_i]]}} is de- + fined in the file $${{BBAASSHH__SSOOUURRCCEE[[_$_i]]}} and called from + $${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}}. + BBAASSHH__SSUUBBSSHHEELLLL + Incremented by one within each subshell or subshell environment + when the shell begins executing in that environment. The ini- + tial value is 0. If BBAASSHH__SSUUBBSSHHEELLLL is unset, it loses its spe- + cial properties, even if it is subsequently reset. + BBAASSHH__VVEERRSSIINNFFOO + A readonly array variable whose members hold version information + for this instance of bbaasshh. The values assigned to the array + members are as follows: + BBAASSHH__VVEERRSSIINNFFOO[[0]] The major version number (the _r_e_l_e_a_s_e). + BBAASSHH__VVEERRSSIINNFFOO[[1]] The minor version number (the _v_e_r_s_i_o_n). + BBAASSHH__VVEERRSSIINNFFOO[[2]] The patch level. + BBAASSHH__VVEERRSSIINNFFOO[[3]] The build version. + BBAASSHH__VVEERRSSIINNFFOO[[4]] The release status (e.g., _b_e_t_a_1). + BBAASSHH__VVEERRSSIINNFFOO[[5]] The value of MMAACCHHTTYYPPEE. + BBAASSHH__VVEERRSSIIOONN + Expands to a string describing the version of this instance of + bbaasshh. + CCOOMMPP__CCWWOORRDD + An index into $${{CCOOMMPP__WWOORRDDSS}} of the word containing the current + cursor position. This variable is available only in shell func- + tions invoked by the programmable completion facilities (see + PPrrooggrraammmmaabbllee CCoommpplleettiioonn below). + CCOOMMPP__KKEEYY + The key (or final key of a key sequence) used to invoke the cur- + rent completion function. + CCOOMMPP__LLIINNEE + The current command line. This variable is available only in + shell functions and external commands invoked by the program- + mable completion facilities (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn below). + CCOOMMPP__PPOOIINNTT + The index of the current cursor position relative to the begin- + ning of the current command. If the current cursor position is + at the end of the current command, the value of this variable is + equal to $${{##CCOOMMPP__LLIINNEE}}. This variable is available only in + shell functions and external commands invoked by the program- + mable completion facilities (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn below). + CCOOMMPP__TTYYPPEE + Set to an integer value corresponding to the type of completion + attempted that caused a completion function to be called: _T_A_B, + for normal completion, _?, for listing completions after succes- + sive tabs, _!, for listing alternatives on partial word comple- + tion, _@, to list completions if the word is not unmodified, or + _%, for menu completion. This variable is available only in + shell functions and external commands invoked by the program- + mable completion facilities (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn below). + CCOOMMPP__WWOORRDDBBRREEAAKKSS + The set of characters that the rreeaaddlliinnee library treats as word + separators when performing word completion. If CCOOMMPP__WWOORRDDBBRREEAAKKSS + is unset, it loses its special properties, even if it is subse- + quently reset. + CCOOMMPP__WWOORRDDSS + An array variable (see AArrrraayyss below) consisting of the individ- + ual words in the current command line. The line is split into + words as rreeaaddlliinnee would split it, using CCOOMMPP__WWOORRDDBBRREEAAKKSS as de- + scribed above. This variable is available only in shell func- + tions invoked by the programmable completion facilities (see + PPrrooggrraammmmaabbllee CCoommpplleettiioonn below). + CCOOPPRROOCC An array variable (see AArrrraayyss below) created to hold the file + descriptors for output from and input to an unnamed coprocess + (see CCoopprroocceesssseess above). + DDIIRRSSTTAACCKK + An array variable (see AArrrraayyss below) containing the current con- + tents of the directory stack. Directories appear in the stack + in the order they are displayed by the ddiirrss builtin. Assigning + to members of this array variable may be used to modify directo- + ries already in the stack, but the ppuusshhdd and ppooppdd builtins must + be used to add and remove directories. Assignment to this vari- + able will not change the current directory. If DDIIRRSSTTAACCKK is un- + set, it loses its special properties, even if it is subsequently + reset. + EEPPOOCCHHRREEAALLTTIIMMEE + Each time this parameter is referenced, it expands to the number + of seconds since the Unix Epoch (see _t_i_m_e(3)) as a floating + point value with micro-second granularity. Assignments to + EEPPOOCCHHRREEAALLTTIIMMEE are ignored. If EEPPOOCCHHRREEAALLTTIIMMEE is unset, it loses + its special properties, even if it is subsequently reset. + EEPPOOCCHHSSEECCOONNDDSS + Each time this parameter is referenced, it expands to the number + of seconds since the Unix Epoch (see _t_i_m_e(3)). Assignments to + EEPPOOCCHHSSEECCOONNDDSS are ignored. If EEPPOOCCHHSSEECCOONNDDSS is unset, it loses + its special properties, even if it is subsequently reset. + EEUUIIDD Expands to the effective user ID of the current user, initial- + ized at shell startup. This variable is readonly. + FFUUNNCCNNAAMMEE + An array variable containing the names of all shell functions + currently in the execution call stack. The element with index 0 + is the name of any currently-executing shell function. The bot- + tom-most element (the one with the highest index) is "main". + This variable exists only when a shell function is executing. + Assignments to FFUUNNCCNNAAMMEE have no effect. If FFUUNNCCNNAAMMEE is unset, + it loses its special properties, even if it is subsequently re- + set. + + This variable can be used with BBAASSHH__LLIINNEENNOO and BBAASSHH__SSOOUURRCCEE. + Each element of FFUUNNCCNNAAMMEE has corresponding elements in + BBAASSHH__LLIINNEENNOO and BBAASSHH__SSOOUURRCCEE to describe the call stack. For in- + stance, $${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called from the file + $${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}} at line number $${{BBAASSHH__LLIINNEENNOO[[_$_i]]}}. The + ccaalllleerr builtin displays the current call stack using this infor- + mation. + GGRROOUUPPSS An array variable containing the list of groups of which the + current user is a member. Assignments to GGRROOUUPPSS have no effect. + If GGRROOUUPPSS is unset, it loses its special properties, even if it + is subsequently reset. + HHIISSTTCCMMDD + The history number, or index in the history list, of the current + command. Assignments to HHIISSTTCCMMDD are ignored. If HHIISSTTCCMMDD is un- + set, it loses its special properties, even if it is subsequently + reset. + HHOOSSTTNNAAMMEE + Automatically set to the name of the current host. + HHOOSSTTTTYYPPEE + Automatically set to a string that uniquely describes the type + of machine on which bbaasshh is executing. The default is system- + dependent. + LLIINNEENNOO Each time this parameter is referenced, the shell substitutes a + decimal number representing the current sequential line number + (starting with 1) within a script or function. When not in a + script or function, the value substituted is not guaranteed to + be meaningful. If LLIINNEENNOO is unset, it loses its special proper- + ties, even if it is subsequently reset. + MMAACCHHTTYYPPEE + Automatically set to a string that fully describes the system + type on which bbaasshh is executing, in the standard GNU _c_p_u_-_c_o_m_- + _p_a_n_y_-_s_y_s_t_e_m format. The default is system-dependent. + MMAAPPFFIILLEE + An array variable (see AArrrraayyss below) created to hold the text + read by the mmaappffiillee builtin when no variable name is supplied. + OOLLDDPPWWDD The previous working directory as set by the ccdd command. + OOPPTTAARRGG The value of the last option argument processed by the ggeettooppttss + builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + OOPPTTIINNDD The index of the next argument to be processed by the ggeettooppttss + builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + OOSSTTYYPPEE Automatically set to a string that describes the operating sys- + tem on which bbaasshh is executing. The default is system-depen- + dent. + PPIIPPEESSTTAATTUUSS + An array variable (see AArrrraayyss below) containing a list of exit + status values from the processes in the most-recently-executed + foreground pipeline (which may contain only a single command). + PPPPIIDD The process ID of the shell's parent. This variable is read- + only. + PPWWDD The current working directory as set by the ccdd command. + RRAANNDDOOMM Each time this parameter is referenced, it expands to a random + integer between 0 and 32767. Assigning a value to RRAANNDDOOMM ini- + tializes (seeds) the sequence of random numbers. If RRAANNDDOOMM is + unset, it loses its special properties, even if it is subse- + quently reset. + RREEAADDLLIINNEE__LLIINNEE + The contents of the rreeaaddlliinnee line buffer, for use with "bind -x" + (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + RREEAADDLLIINNEE__MMAARRKK + The position of the mark (saved insertion point) in the rreeaaddlliinnee + line buffer, for use with "bind -x" (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS + below). The characters between the insertion point and the mark + are often called the _r_e_g_i_o_n. + RREEAADDLLIINNEE__PPOOIINNTT + The position of the insertion point in the rreeaaddlliinnee line buffer, + for use with "bind -x" (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + RREEPPLLYY Set to the line of input read by the rreeaadd builtin command when + no arguments are supplied. + SSEECCOONNDDSS + Each time this parameter is referenced, the number of seconds + since shell invocation is returned. If a value is assigned to + SSEECCOONNDDSS, the value returned upon subsequent references is the + number of seconds since the assignment plus the value assigned. + The number of seconds at shell invocation and the current time + is always determined by querying the system clock. If SSEECCOONNDDSS + is unset, it loses its special properties, even if it is subse- + quently reset. + SSHHEELLLLOOPPTTSS + A colon-separated list of enabled shell options. Each word in + the list is a valid argument for the --oo option to the sseett + builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). The options + appearing in SSHHEELLLLOOPPTTSS are those reported as _o_n by sseett --oo. If + this variable is in the environment when bbaasshh starts up, each + shell option in the list will be enabled before reading any + startup files. This variable is read-only. + SSHHLLVVLL Incremented by one each time an instance of bbaasshh is started. + SSRRAANNDDOOMM + This variable expands to a 32-bit pseudo-random number each time + it is referenced. The random number generator is not linear on + systems that support /dev/urandom or _a_r_c_4_r_a_n_d_o_m, so each re- + turned number has no relationship to the numbers preceding it. + The random number generator cannot be seeded, so assignments to + this variable have no effect. If SSRRAANNDDOOMM is unset, it loses its + special properties, even if it is subsequently reset. + UUIIDD Expands to the user ID of the current user, initialized at shell + startup. This variable is readonly. + + The following variables are used by the shell. In some cases, bbaasshh as- + signs a default value to a variable; these cases are noted below. + + BBAASSHH__CCOOMMPPAATT + The value is used to set the shell's compatibility level. See + SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE below for a description of the various + compatibility levels and their effects. The value may be a dec- + imal number (e.g., 4.2) or an integer (e.g., 42) corresponding + to the desired compatibility level. If BBAASSHH__CCOOMMPPAATT is unset or + set to the empty string, the compatibility level is set to the + default for the current version. If BBAASSHH__CCOOMMPPAATT is set to a + value that is not one of the valid compatibility levels, the + shell prints an error message and sets the compatibility level + to the default for the current version. The valid values corre- + spond to the compatibility levels described below under BBSSHHEELLLL-- + COMPATIBILITYMMOODDEE. For example, 4.2 and 42 are valid values + that correspond to the ccoommppaatt4422 sshhoopptt option and set the compat- + ibility level to 42. The current version is also a valid value. + BBAASSHH__EENNVV + If this parameter is set when bbaasshh is executing a shell script, + its value is interpreted as a filename containing commands to + initialize the shell, as in _~_/_._b_a_s_h_r_c. The value of BBAASSHH__EENNVV is + subjected to parameter expansion, command substitution, and + arithmetic expansion before being interpreted as a filename. + PPAATTHH is not used to search for the resultant filename. + BBAASSHH__XXTTRRAACCEEFFDD + If set to an integer corresponding to a valid file descriptor, + bbaasshh will write the trace output generated when _s_e_t _-_x is en- + abled to that file descriptor. The file descriptor is closed + when BBAASSHH__XXTTRRAACCEEFFDD is unset or assigned a new value. Unsetting + BBAASSHH__XXTTRRAACCEEFFDD or assigning it the empty string causes the trace + output to be sent to the standard error. Note that setting + BBAASSHH__XXTTRRAACCEEFFDD to 2 (the standard error file descriptor) and then + unsetting it will result in the standard error being closed. + CCDDPPAATTHH The search path for the ccdd command. This is a colon-separated + list of directories in which the shell looks for destination di- + rectories specified by the ccdd command. A sample value is + ".:~:/usr". + CCHHIILLDD__MMAAXX + Set the number of exited child status values for the shell to + remember. Bash will not allow this value to be decreased below + a POSIX-mandated minimum, and there is a maximum value (cur- + rently 8192) that this may not exceed. The minimum value is + system-dependent. + CCOOLLUUMMNNSS + Used by the sseelleecctt compound command to determine the terminal + width when printing selection lists. Automatically set if the + cchheecckkwwiinnssiizzee option is enabled or in an interactive shell upon + receipt of a SSIIGGWWIINNCCHH. + CCOOMMPPRREEPPLLYY + An array variable from which bbaasshh reads the possible completions + generated by a shell function invoked by the programmable com- + pletion facility (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn below). Each ar- + ray element contains one possible completion. + EEMMAACCSS If bbaasshh finds this variable in the environment when the shell + starts with value "t", it assumes that the shell is running in + an Emacs shell buffer and disables line editing. + EENNVV Expanded and executed similarly to BBAASSHH__EENNVV (see IINNVVOOCCAATTIIOONN + above) when an interactive shell is invoked in _p_o_s_i_x _m_o_d_e. + EEXXEECCIIGGNNOORREE + A colon-separated list of shell patterns (see PPaatttteerrnn MMaattcchhiinngg) + defining the list of filenames to be ignored by command search + using PPAATTHH. Files whose full pathnames match one of these pat- + terns are not considered executable files for the purposes of + completion and command execution via PPAATTHH lookup. This does not + affect the behavior of the [[, tteesstt, and [[[[ commands. Full path- + names in the command hash table are not subject to EEXXEECCIIGGNNOORREE. + Use this variable to ignore shared library files that have the + executable bit set, but are not executable files. The pattern + matching honors the setting of the eexxttgglloobb shell option. + FFCCEEDDIITT The default editor for the ffcc builtin command. + FFIIGGNNOORREE + A colon-separated list of suffixes to ignore when performing + filename completion (see RREEAADDLLIINNEE below). A filename whose suf- + fix matches one of the entries in FFIIGGNNOORREE is excluded from the + list of matched filenames. A sample value is ".o:~". + FFUUNNCCNNEESSTT + If set to a numeric value greater than 0, defines a maximum + function nesting level. Function invocations that exceed this + nesting level will cause the current command to abort. + GGLLOOBBIIGGNNOORREE + A colon-separated list of patterns defining the set of file + names to be ignored by pathname expansion. If a file name + matched by a pathname expansion pattern also matches one of the + patterns in GGLLOOBBIIGGNNOORREE, it is removed from the list of matches. + HHIISSTTCCOONNTTRROOLL + A colon-separated list of values controlling how commands are + saved on the history list. If the list of values includes _i_g_- + _n_o_r_e_s_p_a_c_e, lines which begin with a ssppaaccee character are not + saved in the history list. A value of _i_g_n_o_r_e_d_u_p_s causes lines + matching the previous history entry to not be saved. A value of + _i_g_n_o_r_e_b_o_t_h is shorthand for _i_g_n_o_r_e_s_p_a_c_e and _i_g_n_o_r_e_d_u_p_s. A value + of _e_r_a_s_e_d_u_p_s causes all previous lines matching the current line + to be removed from the history list before that line is saved. + Any value not in the above list is ignored. If HHIISSTTCCOONNTTRROOLL is + unset, or does not include a valid value, all lines read by the + shell parser are saved on the history list, subject to the value + of HHIISSTTIIGGNNOORREE. The second and subsequent lines of a multi-line + compound command are not tested, and are added to the history + regardless of the value of HHIISSTTCCOONNTTRROOLL. + HHIISSTTFFIILLEE + The name of the file in which command history is saved (see HHIISS-- + TTOORRYY below). The default value is _~_/_._b_a_s_h___h_i_s_t_o_r_y. If unset, + the command history is not saved when a shell exits. + HHIISSTTFFIILLEESSIIZZEE + The maximum number of lines contained in the history file. When + this variable is assigned a value, the history file is trun- + cated, if necessary, to contain no more than that number of + lines by removing the oldest entries. The history file is also + truncated to this size after writing it when a shell exits. If + the value is 0, the history file is truncated to zero size. + Non-numeric values and numeric values less than zero inhibit + truncation. The shell sets the default value to the value of + HHIISSTTSSIIZZEE after reading any startup files. + HHIISSTTIIGGNNOORREE + A colon-separated list of patterns used to decide which command + lines should be saved on the history list. Each pattern is an- + chored at the beginning of the line and must match the complete + line (no implicit `**' is appended). Each pattern is tested + against the line after the checks specified by HHIISSTTCCOONNTTRROOLL are + applied. In addition to the normal shell pattern matching char- + acters, `&&' matches the previous history line. `&&' may be es- + caped using a backslash; the backslash is removed before at- + tempting a match. The second and subsequent lines of a multi- + line compound command are not tested, and are added to the his- + tory regardless of the value of HHIISSTTIIGGNNOORREE. The pattern match- + ing honors the setting of the eexxttgglloobb shell option. + HHIISSTTSSIIZZEE + The number of commands to remember in the command history (see + HHIISSTTOORRYY below). If the value is 0, commands are not saved in + the history list. Numeric values less than zero result in every + command being saved on the history list (there is no limit). + The shell sets the default value to 500 after reading any + startup files. + HHIISSTTTTIIMMEEFFOORRMMAATT + If this variable is set and not null, its value is used as a + format string for _s_t_r_f_t_i_m_e(3) to print the time stamp associated + with each history entry displayed by the hhiissttoorryy builtin. If + this variable is set, time stamps are written to the history + file so they may be preserved across shell sessions. This uses + the history comment character to distinguish timestamps from + other history lines. + HHOOMMEE The home directory of the current user; the default argument for + the ccdd builtin command. The value of this variable is also used + when performing tilde expansion. + HHOOSSTTFFIILLEE + Contains the name of a file in the same format as _/_e_t_c_/_h_o_s_t_s + that should be read when the shell needs to complete a hostname. + The list of possible hostname completions may be changed while + the shell is running; the next time hostname completion is at- + tempted after the value is changed, bbaasshh adds the contents of + the new file to the existing list. If HHOOSSTTFFIILLEE is set, but has + no value, or does not name a readable file, bbaasshh attempts to + read _/_e_t_c_/_h_o_s_t_s to obtain the list of possible hostname comple- + tions. When HHOOSSTTFFIILLEE is unset, the hostname list is cleared. + IIFFSS The _I_n_t_e_r_n_a_l _F_i_e_l_d _S_e_p_a_r_a_t_o_r that is used for word splitting af- + ter expansion and to split lines into words with the rreeaadd + builtin command. The default value is ``''. + IIGGNNOORREEEEOOFF + Controls the action of an interactive shell on receipt of an EEOOFF + character as the sole input. If set, the value is the number of + consecutive EEOOFF characters which must be typed as the first + characters on an input line before bbaasshh exits. If the variable + exists but does not have a numeric value, or has no value, the + default value is 10. If it does not exist, EEOOFF signifies the + end of input to the shell. + IINNPPUUTTRRCC + The filename for the rreeaaddlliinnee startup file, overriding the de- + fault of _~_/_._i_n_p_u_t_r_c (see RREEAADDLLIINNEE below). + IINNSSIIDDEE__EEMMAACCSS + If this variable appears in the environment when the shell + starts, bbaasshh assumes that it is running inside an Emacs shell + buffer and may disable line editing, depending on the value of + TTEERRMM. + LLAANNGG Used to determine the locale category for any category not + specifically selected with a variable starting with LLCC__. + LLCC__AALLLL This variable overrides the value of LLAANNGG and any other LLCC__ + variable specifying a locale category. + LLCC__CCOOLLLLAATTEE + This variable determines the collation order used when sorting + the results of pathname expansion, and determines the behavior + of range expressions, equivalence classes, and collating se- + quences within pathname expansion and pattern matching. + LLCC__CCTTYYPPEE + This variable determines the interpretation of characters and + the behavior of character classes within pathname expansion and + pattern matching. + LLCC__MMEESSSSAAGGEESS + This variable determines the locale used to translate double- + quoted strings preceded by a $$. + LLCC__NNUUMMEERRIICC + This variable determines the locale category used for number + formatting. + LLCC__TTIIMMEE + This variable determines the locale category used for data and + time formatting. + LLIINNEESS Used by the sseelleecctt compound command to determine the column + length for printing selection lists. Automatically set if the + cchheecckkwwiinnssiizzee option is enabled or in an interactive shell upon + receipt of a SSIIGGWWIINNCCHH. + MMAAIILL If this parameter is set to a file or directory name and the + MMAAIILLPPAATTHH variable is not set, bbaasshh informs the user of the ar- + rival of mail in the specified file or Maildir-format directory. + MMAAIILLCCHHEECCKK + Specifies how often (in seconds) bbaasshh checks for mail. The de- + fault is 60 seconds. When it is time to check for mail, the + shell does so before displaying the primary prompt. If this + variable is unset, or set to a value that is not a number + greater than or equal to zero, the shell disables mail checking. + MMAAIILLPPAATTHH + A colon-separated list of filenames to be checked for mail. The + message to be printed when mail arrives in a particular file may + be specified by separating the filename from the message with a + `?'. When used in the text of the message, $$__ expands to the + name of the current mailfile. Example: + MMAAIILLPPAATTHH='/var/mail/bfox?"You have mail":~/shell-mail?"$_ has + mail!"' + BBaasshh can be configured to supply a default value for this vari- + able (there is no value by default), but the location of the + user mail files that it uses is system dependent (e.g., + /var/mail/$$UUSSEERR). + OOPPTTEERRRR If set to the value 1, bbaasshh displays error messages generated by + the ggeettooppttss builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + OOPPTTEERRRR is initialized to 1 each time the shell is invoked or a + shell script is executed. + PPAATTHH The search path for commands. It is a colon-separated list of + directories in which the shell looks for commands (see CCOOMMMMAANNDD + EEXXEECCUUTTIIOONN below). A zero-length (null) directory name in the + value of PPAATTHH indicates the current directory. A null directory + name may appear as two adjacent colons, or as an initial or + trailing colon. The default path is system-dependent, and is + set by the administrator who installs bbaasshh. A common value is + ``/usr/local/bin:/usr/lo- + cal/sbin:/usr/bin:/usr/sbin:/bin:/sbin''. + PPOOSSIIXXLLYY__CCOORRRREECCTT + If this variable is in the environment when bbaasshh starts, the + shell enters _p_o_s_i_x _m_o_d_e before reading the startup files, as if + the ----ppoossiixx invocation option had been supplied. If it is set + while the shell is running, bbaasshh enables _p_o_s_i_x _m_o_d_e, as if the + command _s_e_t _-_o _p_o_s_i_x had been executed. When the shell enters + _p_o_s_i_x _m_o_d_e, it sets this variable if it was not already set. + PPRROOMMPPTT__CCOOMMMMAANNDD + If this variable is set, and is an array, the value of each set + element is executed as a command prior to issuing each primary + prompt. If this is set but not an array variable, its value is + used as a command to execute instead. + PPRROOMMPPTT__DDIIRRTTRRIIMM + If set to a number greater than zero, the value is used as the + number of trailing directory components to retain when expanding + the \\ww and \\WW prompt string escapes (see PPRROOMMPPTTIINNGG below). + Characters removed are replaced with an ellipsis. + PPSS00 The value of this parameter is expanded (see PPRROOMMPPTTIINNGG below) + and displayed by interactive shells after reading a command and + before the command is executed. + PPSS11 The value of this parameter is expanded (see PPRROOMMPPTTIINNGG below) + and used as the primary prompt string. The default value is + ``\\ss--\\vv\\$$ ''. + PPSS22 The value of this parameter is expanded as with PPSS11 and used as + the secondary prompt string. The default is ``>> ''. + PPSS33 The value of this parameter is used as the prompt for the sseelleecctt + command (see SSHHEELLLL GGRRAAMMMMAARR above). + PPSS44 The value of this parameter is expanded as with PPSS11 and the + value is printed before each command bbaasshh displays during an ex- + ecution trace. The first character of the expanded value of PPSS44 + is replicated multiple times, as necessary, to indicate multiple + levels of indirection. The default is ``++ ''. + SSHHEELLLL This variable expands to the full pathname to the shell. If it + is not set when the shell starts, bbaasshh assigns to it the full + pathname of the current user's login shell. + TTIIMMEEFFOORRMMAATT + The value of this parameter is used as a format string specify- + ing how the timing information for pipelines prefixed with the + ttiimmee reserved word should be displayed. The %% character intro- + duces an escape sequence that is expanded to a time value or + other information. The escape sequences and their meanings are + as follows; the braces denote optional portions. + %%%% A literal %%. + %%[[_p]][[ll]]RR The elapsed time in seconds. + %%[[_p]][[ll]]UU The number of CPU seconds spent in user mode. + %%[[_p]][[ll]]SS The number of CPU seconds spent in system mode. + %%PP The CPU percentage, computed as (%U + %S) / %R. + + The optional _p is a digit specifying the _p_r_e_c_i_s_i_o_n, the number + of fractional digits after a decimal point. A value of 0 causes + no decimal point or fraction to be output. At most three places + after the decimal point may be specified; values of _p greater + than 3 are changed to 3. If _p is not specified, the value 3 is + used. + + The optional ll specifies a longer format, including minutes, of + the form _M_Mm_S_S._F_Fs. The value of _p determines whether or not + the fraction is included. + + If this variable is not set, bbaasshh acts as if it had the value + $$''\\nnrreeaall\\tt%%33llRR\\nnuusseerr\\tt%%33llUU\\nnssyyss\\tt%%33llSS''. If the value is null, + no timing information is displayed. A trailing newline is added + when the format string is displayed. + TTMMOOUUTT If set to a value greater than zero, TTMMOOUUTT is treated as the de- + fault timeout for the rreeaadd builtin. The sseelleecctt command termi- + nates if input does not arrive after TTMMOOUUTT seconds when input is + coming from a terminal. In an interactive shell, the value is + interpreted as the number of seconds to wait for a line of input + after issuing the primary prompt. BBaasshh terminates after waiting + for that number of seconds if a complete line of input does not + arrive. + TTMMPPDDIIRR If set, bbaasshh uses its value as the name of a directory in which + bbaasshh creates temporary files for the shell's use. + aauuttoo__rreessuummee + This variable controls how the shell interacts with the user and + job control. If this variable is set, single word simple com- + mands without redirections are treated as candidates for resump- + tion of an existing stopped job. There is no ambiguity allowed; + if there is more than one job beginning with the string typed, + the job most recently accessed is selected. The _n_a_m_e of a + stopped job, in this context, is the command line used to start + it. If set to the value _e_x_a_c_t, the string supplied must match + the name of a stopped job exactly; if set to _s_u_b_s_t_r_i_n_g, the + string supplied needs to match a substring of the name of a + stopped job. The _s_u_b_s_t_r_i_n_g value provides functionality analo- + gous to the %%?? job identifier (see JJOOBB CCOONNTTRROOLL below). If set + to any other value, the supplied string must be a prefix of a + stopped job's name; this provides functionality analogous to the + %%_s_t_r_i_n_g job identifier. + hhiissttcchhaarrss + The two or three characters which control history expansion and + tokenization (see HHIISSTTOORRYY EEXXPPAANNSSIIOONN below). The first character + is the _h_i_s_t_o_r_y _e_x_p_a_n_s_i_o_n character, the character which signals + the start of a history expansion, normally `!!'. The second + character is the _q_u_i_c_k _s_u_b_s_t_i_t_u_t_i_o_n character, which is used as + shorthand for re-running the previous command entered, substi- + tuting one string for another in the command. The default is + `^^'. The optional third character is the character which indi- + cates that the remainder of the line is a comment when found as + the first character of a word, normally `##'. The history com- + ment character causes history substitution to be skipped for the + remaining words on the line. It does not necessarily cause the + shell parser to treat the rest of the line as a comment. + + AArrrraayyss + BBaasshh provides one-dimensional indexed and associative array variables. + Any variable may be used as an indexed array; the ddeeccllaarree builtin will + explicitly declare an array. There is no maximum limit on the size of + an array, nor any requirement that members be indexed or assigned con- + tiguously. Indexed arrays are referenced using integers (including + arithmetic expressions) and are zero-based; associative arrays are ref- + erenced using arbitrary strings. Unless otherwise noted, indexed array + indices must be non-negative integers. + + An indexed array is created automatically if any variable is assigned + to using the syntax _n_a_m_e[_s_u_b_s_c_r_i_p_t]=_v_a_l_u_e. The _s_u_b_s_c_r_i_p_t is treated as + an arithmetic expression that must evaluate to a number. To explicitly + declare an indexed array, use ddeeccllaarree --aa _n_a_m_e (see SSHHEELLLL BBUUIILLTTIINN CCOOMM-- + MMAANNDDSS below). ddeeccllaarree --aa _n_a_m_e[[_s_u_b_s_c_r_i_p_t]] is also accepted; the _s_u_b_- + _s_c_r_i_p_t is ignored. + + Associative arrays are created using ddeeccllaarree --AA _n_a_m_e. + + Attributes may be specified for an array variable using the ddeeccllaarree and + rreeaaddoonnllyy builtins. Each attribute applies to all members of an array. + + Arrays are assigned to using compound assignments of the form + _n_a_m_e=((value_1 ... value_n)), where each _v_a_l_u_e may be of the form [_s_u_b_- + _s_c_r_i_p_t]=_s_t_r_i_n_g. Indexed array assignments do not require anything but + _s_t_r_i_n_g. Each _v_a_l_u_e in the list is expanded using all the shell expan- + sions described below under EEXXPPAANNSSIIOONN. When assigning to indexed ar- + rays, if the optional brackets and subscript are supplied, that index + is assigned to; otherwise the index of the element assigned is the last + index assigned to by the statement plus one. Indexing starts at zero. + + When assigning to an associative array, the words in a compound assign- + ment may be either assignment statements, for which the subscript is + required, or a list of words that is interpreted as a sequence of al- + ternating keys and values: _n_a_m_e=(( _k_e_y_1 _v_a_l_u_e_1 _k_e_y_2 _v_a_l_u_e_2 ...)). These + are treated identically to _n_a_m_e=(( [_k_e_y_1]=_v_a_l_u_e_1 [_k_e_y_2]=_v_a_l_u_e_2 ...)). + The first word in the list determines how the remaining words are in- + terpreted; all assignments in a list must be of the same type. When + using key/value pairs, the keys may not be missing or empty; a final + missing value is treated like the empty string. + + This syntax is also accepted by the ddeeccllaarree builtin. Individual array + elements may be assigned to using the _n_a_m_e[_s_u_b_s_c_r_i_p_t]=_v_a_l_u_e syntax in- + troduced above. When assigning to an indexed array, if _n_a_m_e is sub- + scripted by a negative number, that number is interpreted as relative + to one greater than the maximum index of _n_a_m_e, so negative indices + count back from the end of the array, and an index of -1 references the + last element. + + Any element of an array may be referenced using ${_n_a_m_e[_s_u_b_s_c_r_i_p_t]}. + The braces are required to avoid conflicts with pathname expansion. If + _s_u_b_s_c_r_i_p_t is @@ or **, the word expands to all members of _n_a_m_e. These + subscripts differ only when the word appears within double quotes. If + the word is double-quoted, ${_n_a_m_e[*]} expands to a single word with the + value of each array member separated by the first character of the IIFFSS + special variable, and ${_n_a_m_e[@]} expands each element of _n_a_m_e to a sep- + arate word. When there are no array members, ${_n_a_m_e[@]} expands to + nothing. If the double-quoted expansion occurs within a word, the ex- + pansion of the first parameter is joined with the beginning part of the + original word, and the expansion of the last parameter is joined with + the last part of the original word. This is analogous to the expansion + of the special parameters ** and @@ (see SSppeecciiaall PPaarraammeetteerrss above). + ${#_n_a_m_e[_s_u_b_s_c_r_i_p_t]} expands to the length of ${_n_a_m_e[_s_u_b_s_c_r_i_p_t]}. If + _s_u_b_s_c_r_i_p_t is ** or @@, the expansion is the number of elements in the ar- + ray. If the _s_u_b_s_c_r_i_p_t used to reference an element of an indexed array + evaluates to a number less than zero, it is interpreted as relative to + one greater than the maximum index of the array, so negative indices + count back from the end of the array, and an index of -1 references the + last element. + + Referencing an array variable without a subscript is equivalent to ref- + erencing the array with a subscript of 0. Any reference to a variable + using a valid subscript is legal, and bbaasshh will create an array if nec- + essary. + + An array variable is considered set if a subscript has been assigned a + value. The null string is a valid value. + + It is possible to obtain the keys (indices) of an array as well as the + values. ${!!_n_a_m_e[_@]} and ${!!_n_a_m_e[_*]} expand to the indices assigned in + array variable _n_a_m_e. The treatment when in double quotes is similar to + the expansion of the special parameters _@ and _* within double quotes. + + The uunnsseett builtin is used to destroy arrays. uunnsseett _n_a_m_e[_s_u_b_s_c_r_i_p_t] de- + stroys the array element at index _s_u_b_s_c_r_i_p_t, for both indexed and asso- + ciative arrays. Negative subscripts to indexed arrays are interpreted + as described above. Unsetting the last element of an array variable + does not unset the variable. uunnsseett _n_a_m_e, where _n_a_m_e is an array, or + uunnsseett _n_a_m_e[_s_u_b_s_c_r_i_p_t], where _s_u_b_s_c_r_i_p_t is ** or @@, removes the entire + array. + + When using a variable name with a subscript as an argument to a com- + mand, such as with uunnsseett, without using the word expansion syntax de- + scribed above, the argument is subject to pathname expansion. If path- + name expansion is not desired, the argument should be quoted. + + The ddeeccllaarree, llooccaall, and rreeaaddoonnllyy builtins each accept a --aa option to + specify an indexed array and a --AA option to specify an associative ar- + ray. If both options are supplied, --AA takes precedence. The rreeaadd + builtin accepts a --aa option to assign a list of words read from the + standard input to an array. The sseett and ddeeccllaarree builtins display array + values in a way that allows them to be reused as assignments. + +EEXXPPAANNSSIIOONN + Expansion is performed on the command line after it has been split into + words. There are seven kinds of expansion performed: _b_r_a_c_e _e_x_p_a_n_s_i_o_n, + _t_i_l_d_e _e_x_p_a_n_s_i_o_n, _p_a_r_a_m_e_t_e_r _a_n_d _v_a_r_i_a_b_l_e _e_x_p_a_n_s_i_o_n, _c_o_m_m_a_n_d _s_u_b_s_t_i_t_u_- + _t_i_o_n, _a_r_i_t_h_m_e_t_i_c _e_x_p_a_n_s_i_o_n, _w_o_r_d _s_p_l_i_t_t_i_n_g, and _p_a_t_h_n_a_m_e _e_x_p_a_n_s_i_o_n. + + The order of expansions is: brace expansion; tilde expansion, parameter + and variable expansion, arithmetic expansion, and command substitution + (done in a left-to-right fashion); word splitting; and pathname expan- + sion. + + On systems that can support it, there is an additional expansion avail- + able: _p_r_o_c_e_s_s _s_u_b_s_t_i_t_u_t_i_o_n. This is performed at the same time as + tilde, parameter, variable, and arithmetic expansion and command sub- + stitution. + + After these expansions are performed, quote characters present in the + original word are removed unless they have been quoted themselves + (_q_u_o_t_e _r_e_m_o_v_a_l). + + Only brace expansion, word splitting, and pathname expansion can in- + crease the number of words of the expansion; other expansions expand a + single word to a single word. The only exceptions to this are the ex- + pansions of "$$@@" and "$${{_n_a_m_e[[@@]]}}", and, in most cases, $$** and + $${{_n_a_m_e[[**]]}} as explained above (see PPAARRAAMMEETTEERRSS). + + BBrraaccee EExxppaannssiioonn + _B_r_a_c_e _e_x_p_a_n_s_i_o_n is a mechanism by which arbitrary strings may be gener- + ated. This mechanism is similar to _p_a_t_h_n_a_m_e _e_x_p_a_n_s_i_o_n, but the file- + names generated need not exist. Patterns to be brace expanded take the + form of an optional _p_r_e_a_m_b_l_e, followed by either a series of comma-sep- + arated strings or a sequence expression between a pair of braces, fol- + lowed by an optional _p_o_s_t_s_c_r_i_p_t. The preamble is prefixed to each + string contained within the braces, and the postscript is then appended + to each resulting string, expanding left to right. + + Brace expansions may be nested. The results of each expanded string + are not sorted; left to right order is preserved. For example, + a{{d,c,b}}e expands into `ade ace abe'. + + A sequence expression takes the form {{_x...._y[[...._i_n_c_r]]}}, where _x and _y are + either integers or single characters, and _i_n_c_r, an optional increment, + is an integer. When integers are supplied, the expression expands to + each number between _x and _y, inclusive. Supplied integers may be pre- + fixed with _0 to force each term to have the same width. When either _x + or _y begins with a zero, the shell attempts to force all generated + terms to contain the same number of digits, zero-padding where neces- + sary. When characters are supplied, the expression expands to each + character lexicographically between _x and _y, inclusive, using the de- + fault C locale. Note that both _x and _y must be of the same type. When + the increment is supplied, it is used as the difference between each + term. The default increment is 1 or -1 as appropriate. + + Brace expansion is performed before any other expansions, and any char- + acters special to other expansions are preserved in the result. It is + strictly textual. BBaasshh does not apply any syntactic interpretation to + the context of the expansion or the text between the braces. + + A correctly-formed brace expansion must contain unquoted opening and + closing braces, and at least one unquoted comma or a valid sequence ex- + pression. Any incorrectly formed brace expansion is left unchanged. A + {{ or ,, may be quoted with a backslash to prevent its being considered + part of a brace expression. To avoid conflicts with parameter expan- + sion, the string $${{ is not considered eligible for brace expansion, and + inhibits brace expansion until the closing }}. + + This construct is typically used as shorthand when the common prefix of + the strings to be generated is longer than in the above example: + + mkdir /usr/local/src/bash/{old,new,dist,bugs} + or + chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}} + + Brace expansion introduces a slight incompatibility with historical + versions of sshh. sshh does not treat opening or closing braces specially + when they appear as part of a word, and preserves them in the output. + BBaasshh removes braces from words as a consequence of brace expansion. + For example, a word entered to sshh as _f_i_l_e_{_1_,_2_} appears identically in + the output. The same word is output as _f_i_l_e_1 _f_i_l_e_2 after expansion by + bbaasshh. If strict compatibility with sshh is desired, start bbaasshh with the + ++BB option or disable brace expansion with the ++BB option to the sseett com- + mand (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + + TTiillddee EExxppaannssiioonn + If a word begins with an unquoted tilde character (`~~'), all of the + characters preceding the first unquoted slash (or all characters, if + there is no unquoted slash) are considered a _t_i_l_d_e_-_p_r_e_f_i_x. If none of + the characters in the tilde-prefix are quoted, the characters in the + tilde-prefix following the tilde are treated as a possible _l_o_g_i_n _n_a_m_e. + If this login name is the null string, the tilde is replaced with the + value of the shell parameter HHOOMMEE. If HHOOMMEE is unset, the home direc- + tory of the user executing the shell is substituted instead. Other- + wise, the tilde-prefix is replaced with the home directory associated + with the specified login name. + + If the tilde-prefix is a `~+', the value of the shell variable PPWWDD re- + places the tilde-prefix. If the tilde-prefix is a `~-', the value of + the shell variable OOLLDDPPWWDD, if it is set, is substituted. If the char- + acters following the tilde in the tilde-prefix consist of a number _N, + optionally prefixed by a `+' or a `-', the tilde-prefix is replaced + with the corresponding element from the directory stack, as it would be + displayed by the ddiirrss builtin invoked with the tilde-prefix as an argu- + ment. If the characters following the tilde in the tilde-prefix con- + sist of a number without a leading `+' or `-', `+' is assumed. + + If the login name is invalid, or the tilde expansion fails, the word is + unchanged. + + Each variable assignment is checked for unquoted tilde-prefixes immedi- + ately following a :: or the first ==. In these cases, tilde expansion is + also performed. Consequently, one may use filenames with tildes in as- + signments to PPAATTHH, MMAAIILLPPAATTHH, and CCDDPPAATTHH, and the shell assigns the ex- + panded value. + + Bash also performs tilde expansion on words satisfying the conditions + of variable assignments (as described above under PPAARRAAMMEETTEERRSS) when they + appear as arguments to simple commands. Bash does not do this, except + for the _d_e_c_l_a_r_a_t_i_o_n commands listed above, when in _p_o_s_i_x _m_o_d_e. + + PPaarraammeetteerr EExxppaannssiioonn + The `$$' character introduces parameter expansion, command substitution, + or arithmetic expansion. The parameter name or symbol to be expanded + may be enclosed in braces, which are optional but serve to protect the + variable to be expanded from characters immediately following it which + could be interpreted as part of the name. + + When braces are used, the matching ending brace is the first `}}' not + escaped by a backslash or within a quoted string, and not within an em- + bedded arithmetic expansion, command substitution, or parameter expan- + sion. + + ${_p_a_r_a_m_e_t_e_r} + The value of _p_a_r_a_m_e_t_e_r is substituted. The braces are required + when _p_a_r_a_m_e_t_e_r is a positional parameter with more than one + digit, or when _p_a_r_a_m_e_t_e_r is followed by a character which is not + to be interpreted as part of its name. The _p_a_r_a_m_e_t_e_r is a shell + parameter as described above PPAARRAAMMEETTEERRSS) or an array reference + (AArrrraayyss). + + If the first character of _p_a_r_a_m_e_t_e_r is an exclamation point (!!), and + _p_a_r_a_m_e_t_e_r is not a _n_a_m_e_r_e_f, it introduces a level of indirection. BBaasshh + uses the value formed by expanding the rest of _p_a_r_a_m_e_t_e_r as the new _p_a_- + _r_a_m_e_t_e_r; this is then expanded and that value is used in the rest of + the expansion, rather than the expansion of the original _p_a_r_a_m_e_t_e_r. + This is known as _i_n_d_i_r_e_c_t _e_x_p_a_n_s_i_o_n. The value is subject to tilde ex- + pansion, parameter expansion, command substitution, and arithmetic ex- + pansion. If _p_a_r_a_m_e_t_e_r is a nameref, this expands to the name of the + parameter referenced by _p_a_r_a_m_e_t_e_r instead of performing the complete + indirect expansion. The exceptions to this are the expansions of + ${!!_p_r_e_f_i_x**} and ${!!_n_a_m_e[_@]} described below. The exclamation point + must immediately follow the left brace in order to introduce indirec- + tion. + + In each of the cases below, _w_o_r_d is subject to tilde expansion, parame- + ter expansion, command substitution, and arithmetic expansion. + + When not performing substring expansion, using the forms documented be- + low (e.g., ::--), bbaasshh tests for a parameter that is unset or null. + Omitting the colon results in a test only for a parameter that is un- + set. + + ${_p_a_r_a_m_e_t_e_r::--_w_o_r_d} + UUssee DDeeffaauulltt VVaalluueess. If _p_a_r_a_m_e_t_e_r is unset or null, the expan- + sion of _w_o_r_d is substituted. Otherwise, the value of _p_a_r_a_m_e_t_e_r + is substituted. + ${_p_a_r_a_m_e_t_e_r::==_w_o_r_d} + AAssssiiggnn DDeeffaauulltt VVaalluueess. If _p_a_r_a_m_e_t_e_r is unset or null, the ex- + pansion of _w_o_r_d is assigned to _p_a_r_a_m_e_t_e_r. The value of _p_a_r_a_m_e_- + _t_e_r is then substituted. Positional parameters and special pa- + rameters may not be assigned to in this way. + ${_p_a_r_a_m_e_t_e_r::??_w_o_r_d} + DDiissppllaayy EErrrroorr iiff NNuullll oorr UUnnsseett. If _p_a_r_a_m_e_t_e_r is null or unset, + the expansion of _w_o_r_d (or a message to that effect if _w_o_r_d is + not present) is written to the standard error and the shell, if + it is not interactive, exits. Otherwise, the value of _p_a_r_a_m_e_t_e_r + is substituted. + ${_p_a_r_a_m_e_t_e_r::++_w_o_r_d} + UUssee AAlltteerrnnaattee VVaalluuee. If _p_a_r_a_m_e_t_e_r is null or unset, nothing is + substituted, otherwise the expansion of _w_o_r_d is substituted. + ${_p_a_r_a_m_e_t_e_r::_o_f_f_s_e_t} + ${_p_a_r_a_m_e_t_e_r::_o_f_f_s_e_t::_l_e_n_g_t_h} + SSuubbssttrriinngg EExxppaannssiioonn. Expands to up to _l_e_n_g_t_h characters of the + value of _p_a_r_a_m_e_t_e_r starting at the character specified by _o_f_f_- + _s_e_t. If _p_a_r_a_m_e_t_e_r is @@, an indexed array subscripted by @@ or **, + or an associative array name, the results differ as described + below. If _l_e_n_g_t_h is omitted, expands to the substring of the + value of _p_a_r_a_m_e_t_e_r starting at the character specified by _o_f_f_s_e_t + and extending to the end of the value. _l_e_n_g_t_h and _o_f_f_s_e_t are + arithmetic expressions (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN below). + + If _o_f_f_s_e_t evaluates to a number less than zero, the value is + used as an offset in characters from the end of the value of _p_a_- + _r_a_m_e_t_e_r. If _l_e_n_g_t_h evaluates to a number less than zero, it is + interpreted as an offset in characters from the end of the value + of _p_a_r_a_m_e_t_e_r rather than a number of characters, and the expan- + sion is the characters between _o_f_f_s_e_t and that result. Note + that a negative offset must be separated from the colon by at + least one space to avoid being confused with the ::-- expansion. + + If _p_a_r_a_m_e_t_e_r is @@, the result is _l_e_n_g_t_h positional parameters + beginning at _o_f_f_s_e_t. A negative _o_f_f_s_e_t is taken relative to one + greater than the greatest positional parameter, so an offset of + -1 evaluates to the last positional parameter. It is an expan- + sion error if _l_e_n_g_t_h evaluates to a number less than zero. + + If _p_a_r_a_m_e_t_e_r is an indexed array name subscripted by @ or *, the + result is the _l_e_n_g_t_h members of the array beginning with ${_p_a_- + _r_a_m_e_t_e_r[_o_f_f_s_e_t]}. A negative _o_f_f_s_e_t is taken relative to one + greater than the maximum index of the specified array. It is an + expansion error if _l_e_n_g_t_h evaluates to a number less than zero. + + Substring expansion applied to an associative array produces un- + defined results. + + Substring indexing is zero-based unless the positional parame- + ters are used, in which case the indexing starts at 1 by de- + fault. If _o_f_f_s_e_t is 0, and the positional parameters are used, + $$00 is prefixed to the list. + + ${!!_p_r_e_f_i_x**} + ${!!_p_r_e_f_i_x@@} + NNaammeess mmaattcchhiinngg pprreeffiixx. Expands to the names of variables whose + names begin with _p_r_e_f_i_x, separated by the first character of the + IIFFSS special variable. When _@ is used and the expansion appears + within double quotes, each variable name expands to a separate + word. + + ${!!_n_a_m_e[_@]} + ${!!_n_a_m_e[_*]} + LLiisstt ooff aarrrraayy kkeeyyss. If _n_a_m_e is an array variable, expands to + the list of array indices (keys) assigned in _n_a_m_e. If _n_a_m_e is + not an array, expands to 0 if _n_a_m_e is set and null otherwise. + When _@ is used and the expansion appears within double quotes, + each key expands to a separate word. + + ${##_p_a_r_a_m_e_t_e_r} + PPaarraammeetteerr lleennggtthh. The length in characters of the value of _p_a_- + _r_a_m_e_t_e_r is substituted. If _p_a_r_a_m_e_t_e_r is ** or @@, the value sub- + stituted is the number of positional parameters. If _p_a_r_a_m_e_t_e_r + is an array name subscripted by ** or @@, the value substituted is + the number of elements in the array. If _p_a_r_a_m_e_t_e_r is an indexed + array name subscripted by a negative number, that number is in- + terpreted as relative to one greater than the maximum index of + _p_a_r_a_m_e_t_e_r, so negative indices count back from the end of the + array, and an index of -1 references the last element. + + ${_p_a_r_a_m_e_t_e_r##_w_o_r_d} + ${_p_a_r_a_m_e_t_e_r####_w_o_r_d} + RReemmoovvee mmaattcchhiinngg pprreeffiixx ppaatttteerrnn. The _w_o_r_d is expanded to produce + a pattern just as in pathname expansion, and matched against the + expanded value of _p_a_r_a_m_e_t_e_r using the rules described under PPaatt-- + tteerrnn MMaattcchhiinngg below. If the pattern matches the beginning of + the value of _p_a_r_a_m_e_t_e_r, then the result of the expansion is the + expanded value of _p_a_r_a_m_e_t_e_r with the shortest matching pattern + (the ``##'' case) or the longest matching pattern (the ``####'' + case) deleted. If _p_a_r_a_m_e_t_e_r is @@ or **, the pattern removal op- + eration is applied to each positional parameter in turn, and the + expansion is the resultant list. If _p_a_r_a_m_e_t_e_r is an array vari- + able subscripted with @@ or **, the pattern removal operation is + applied to each member of the array in turn, and the expansion + is the resultant list. + + ${_p_a_r_a_m_e_t_e_r%%_w_o_r_d} + ${_p_a_r_a_m_e_t_e_r%%%%_w_o_r_d} + RReemmoovvee mmaattcchhiinngg ssuuffffiixx ppaatttteerrnn. The _w_o_r_d is expanded to produce + a pattern just as in pathname expansion, and matched against the + expanded value of _p_a_r_a_m_e_t_e_r using the rules described under PPaatt-- + tteerrnn MMaattcchhiinngg below. If the pattern matches a trailing portion + of the expanded value of _p_a_r_a_m_e_t_e_r, then the result of the ex- + pansion is the expanded value of _p_a_r_a_m_e_t_e_r with the shortest + matching pattern (the ``%%'' case) or the longest matching pat- + tern (the ``%%%%'' case) deleted. If _p_a_r_a_m_e_t_e_r is @@ or **, the + pattern removal operation is applied to each positional parame- + ter in turn, and the expansion is the resultant list. If _p_a_r_a_m_- + _e_t_e_r is an array variable subscripted with @@ or **, the pattern + removal operation is applied to each member of the array in + turn, and the expansion is the resultant list. + + ${_p_a_r_a_m_e_t_e_r//_p_a_t_t_e_r_n//_s_t_r_i_n_g} + PPaatttteerrnn ssuubbssttiittuuttiioonn. The _p_a_t_t_e_r_n is expanded to produce a pat- + tern just as in pathname expansion, _P_a_r_a_m_e_t_e_r is expanded and + the longest match of _p_a_t_t_e_r_n against its value is replaced with + _s_t_r_i_n_g. The match is performed using the rules described under + PPaatttteerrnn MMaattcchhiinngg below. If _p_a_t_t_e_r_n begins with //, all matches + of _p_a_t_t_e_r_n are replaced with _s_t_r_i_n_g. Normally only the first + match is replaced. If _p_a_t_t_e_r_n begins with ##, it must match at + the beginning of the expanded value of _p_a_r_a_m_e_t_e_r. If _p_a_t_t_e_r_n + begins with %%, it must match at the end of the expanded value of + _p_a_r_a_m_e_t_e_r. If _s_t_r_i_n_g is null, matches of _p_a_t_t_e_r_n are deleted + and the // following _p_a_t_t_e_r_n may be omitted. If the nnooccaasseemmaattcchh + shell option is enabled, the match is performed without regard + to the case of alphabetic characters. If _p_a_r_a_m_e_t_e_r is @@ or **, + the substitution operation is applied to each positional parame- + ter in turn, and the expansion is the resultant list. If _p_a_r_a_m_- + _e_t_e_r is an array variable subscripted with @@ or **, the substitu- + tion operation is applied to each member of the array in turn, + and the expansion is the resultant list. + + ${_p_a_r_a_m_e_t_e_r^^_p_a_t_t_e_r_n} + ${_p_a_r_a_m_e_t_e_r^^^^_p_a_t_t_e_r_n} + ${_p_a_r_a_m_e_t_e_r,,_p_a_t_t_e_r_n} + ${_p_a_r_a_m_e_t_e_r,,,,_p_a_t_t_e_r_n} + CCaassee mmooddiiffiiccaattiioonn. This expansion modifies the case of alpha- + betic characters in _p_a_r_a_m_e_t_e_r. The _p_a_t_t_e_r_n is expanded to pro- + duce a pattern just as in pathname expansion. Each character in + the expanded value of _p_a_r_a_m_e_t_e_r is tested against _p_a_t_t_e_r_n, and, + if it matches the pattern, its case is converted. The pattern + should not attempt to match more than one character. The ^^ op- + erator converts lowercase letters matching _p_a_t_t_e_r_n to uppercase; + the ,, operator converts matching uppercase letters to lowercase. + The ^^^^ and ,,,, expansions convert each matched character in the + expanded value; the ^^ and ,, expansions match and convert only + the first character in the expanded value. If _p_a_t_t_e_r_n is omit- + ted, it is treated like a ??, which matches every character. If + _p_a_r_a_m_e_t_e_r is @@ or **, the case modification operation is applied + to each positional parameter in turn, and the expansion is the + resultant list. If _p_a_r_a_m_e_t_e_r is an array variable subscripted + with @@ or **, the case modification operation is applied to each + member of the array in turn, and the expansion is the resultant + list. + + ${_p_a_r_a_m_e_t_e_r@@_o_p_e_r_a_t_o_r} + PPaarraammeetteerr ttrraannssffoorrmmaattiioonn. The expansion is either a transforma- + tion of the value of _p_a_r_a_m_e_t_e_r or information about _p_a_r_a_m_e_t_e_r + itself, depending on the value of _o_p_e_r_a_t_o_r. Each _o_p_e_r_a_t_o_r is a + single letter: + + UU The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + with lowercase alphabetic characters converted to upper- + case. + uu The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + with the first character converted to uppercase, if it is + alphabetic. + LL The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + with uppercase alphabetic characters converted to lower- + case. + QQ The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + quoted in a format that can be reused as input. + EE The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + with backslash escape sequences expanded as with the + $$''......'' quoting mechanism. + PP The expansion is a string that is the result of expanding + the value of _p_a_r_a_m_e_t_e_r as if it were a prompt string (see + PPRROOMMPPTTIINNGG below). + AA The expansion is a string in the form of an assignment + statement or ddeeccllaarree command that, if evaluated, will + recreate _p_a_r_a_m_e_t_e_r with its attributes and value. + KK Produces a possibly-quoted version of the value of _p_a_r_a_m_- + _e_t_e_r, except that it prints the values of indexed and as- + sociative arrays as a sequence of quoted key-value pairs + (see AArrrraayyss above). + aa The expansion is a string consisting of flag values rep- + resenting _p_a_r_a_m_e_t_e_r's attributes. + + If _p_a_r_a_m_e_t_e_r is @@ or **, the operation is applied to each posi- + tional parameter in turn, and the expansion is the resultant + list. If _p_a_r_a_m_e_t_e_r is an array variable subscripted with @@ or + **, the operation is applied to each member of the array in turn, + and the expansion is the resultant list. + + The result of the expansion is subject to word splitting and + pathname expansion as described below. + + CCoommmmaanndd SSuubbssttiittuuttiioonn + _C_o_m_m_a_n_d _s_u_b_s_t_i_t_u_t_i_o_n allows the output of a command to replace the com- + mand name. There are two forms: + + $$((_c_o_m_m_a_n_d)) + or + ``_c_o_m_m_a_n_d`` + + BBaasshh performs the expansion by executing _c_o_m_m_a_n_d in a subshell environ- + ment and replacing the command substitution with the standard output of + the command, with any trailing newlines deleted. Embedded newlines are + not deleted, but they may be removed during word splitting. The com- + mand substitution $$((ccaatt _f_i_l_e)) can be replaced by the equivalent but + faster $$((<< _f_i_l_e)). + + When the old-style backquote form of substitution is used, backslash + retains its literal meaning except when followed by $$, ``, or \\. The + first backquote not preceded by a backslash terminates the command sub- + stitution. When using the $(_c_o_m_m_a_n_d) form, all characters between the + parentheses make up the command; none are treated specially. + + Command substitutions may be nested. To nest when using the backquoted + form, escape the inner backquotes with backslashes. + + If the substitution appears within double quotes, word splitting and + pathname expansion are not performed on the results. + + AArriitthhmmeettiicc EExxppaannssiioonn + Arithmetic expansion allows the evaluation of an arithmetic expression + and the substitution of the result. The format for arithmetic expan- + sion is: + + $$((((_e_x_p_r_e_s_s_i_o_n)))) + + The _e_x_p_r_e_s_s_i_o_n is treated as if it were within double quotes, but a + double quote inside the parentheses is not treated specially. All to- + kens in the expression undergo parameter and variable expansion, com- + mand substitution, and quote removal. The result is treated as the + arithmetic expression to be evaluated. Arithmetic expansions may be + nested. + + The evaluation is performed according to the rules listed below under + AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN. If _e_x_p_r_e_s_s_i_o_n is invalid, bbaasshh prints a message + indicating failure and no substitution occurs. + + PPrroocceessss SSuubbssttiittuuttiioonn + _P_r_o_c_e_s_s _s_u_b_s_t_i_t_u_t_i_o_n allows a process's input or output to be referred + to using a filename. It takes the form of <<((_l_i_s_t)) or >>((_l_i_s_t)). The + process _l_i_s_t is run asynchronously, and its input or output appears as + a filename. This filename is passed as an argument to the current com- + mand as the result of the expansion. If the >>((_l_i_s_t)) form is used, + writing to the file will provide input for _l_i_s_t. If the <<((_l_i_s_t)) form + is used, the file passed as an argument should be read to obtain the + output of _l_i_s_t. Process substitution is supported on systems that sup- + port named pipes (_F_I_F_O_s) or the //ddeevv//ffdd method of naming open files. + + When available, process substitution is performed simultaneously with + parameter and variable expansion, command substitution, and arithmetic + expansion. + + WWoorrdd SSpplliittttiinngg + The shell scans the results of parameter expansion, command substitu- + tion, and arithmetic expansion that did not occur within double quotes + for _w_o_r_d _s_p_l_i_t_t_i_n_g. + + The shell treats each character of IIFFSS as a delimiter, and splits the + results of the other expansions into words using these characters as + field terminators. If IIFFSS is unset, or its value is exactly + <><><>, the default, then sequences of <>, <>, + and <> at the beginning and end of the results of the previous + expansions are ignored, and any sequence of IIFFSS characters not at the + beginning or end serves to delimit words. If IIFFSS has a value other + than the default, then sequences of the whitespace characters ssppaaccee, + ttaabb, and nneewwlliinnee are ignored at the beginning and end of the word, as + long as the whitespace character is in the value of IIFFSS (an IIFFSS white- + space character). Any character in IIFFSS that is not IIFFSS whitespace, + along with any adjacent IIFFSS whitespace characters, delimits a field. A + sequence of IIFFSS whitespace characters is also treated as a delimiter. + If the value of IIFFSS is null, no word splitting occurs. + + Explicit null arguments ("""" or '''') are retained and passed to commands + as empty strings. Unquoted implicit null arguments, resulting from the + expansion of parameters that have no values, are removed. If a parame- + ter with no value is expanded within double quotes, a null argument re- + sults and is retained and passed to a command as an empty string. When + a quoted null argument appears as part of a word whose expansion is + non-null, the null argument is removed. That is, the word -d'' becomes + -d after word splitting and null argument removal. + + Note that if no expansion occurs, no splitting is performed. + + PPaatthhnnaammee EExxppaannssiioonn + After word splitting, unless the --ff option has been set, bbaasshh scans + each word for the characters **, ??, and [[. If one of these characters + appears, and is not quoted, then the word is regarded as a _p_a_t_t_e_r_n, and + replaced with an alphabetically sorted list of filenames matching the + pattern (see PPaatttteerrnn MMaattcchhiinngg below). If no matching filenames are + found, and the shell option nnuullllgglloobb is not enabled, the word is left + unchanged. If the nnuullllgglloobb option is set, and no matches are found, + the word is removed. If the ffaaiillgglloobb shell option is set, and no + matches are found, an error message is printed and the command is not + executed. If the shell option nnooccaasseegglloobb is enabled, the match is per- + formed without regard to the case of alphabetic characters. When a + pattern is used for pathname expansion, the character ````..'''' at the + start of a name or immediately following a slash must be matched ex- + plicitly, unless the shell option ddoottgglloobb is set. The filenames ````..'''' + and ````....'''' must always be matched explicitly, even if ddoottgglloobb is set. + In other cases, the ````..'''' character is not treated specially. When + matching a pathname, the slash character must always be matched explic- + itly by a slash in the pattern, but in other matching contexts it can + be matched by a special pattern character as described below under PPaatt-- + tteerrnn MMaattcchhiinngg. See the description of sshhoopptt below under SSHHEELLLL BBUUIILLTTIINN + CCOOMMMMAANNDDSS for a description of the nnooccaasseegglloobb, nnuullllgglloobb, ffaaiillgglloobb, and + ddoottgglloobb shell options. + + The GGLLOOBBIIGGNNOORREE shell variable may be used to restrict the set of file + names matching a _p_a_t_t_e_r_n. If GGLLOOBBIIGGNNOORREE is set, each matching file + name that also matches one of the patterns in GGLLOOBBIIGGNNOORREE is removed + from the list of matches. If the nnooccaasseegglloobb option is set, the match- + ing against the patterns in GGLLOOBBIIGGNNOORREE is performed without regard to + case. The filenames ````..'''' and ````....'''' are always ignored when GGLLOOBBIIGG-- + NNOORREE is set and not null. However, setting GGLLOOBBIIGGNNOORREE to a non-null + value has the effect of enabling the ddoottgglloobb shell option, so all other + filenames beginning with a ````..'''' will match. To get the old behavior + of ignoring filenames beginning with a ````..'''', make ````..**'''' one of the + patterns in GGLLOOBBIIGGNNOORREE. The ddoottgglloobb option is disabled when GGLLOOBBIIGGNNOORREE + is unset. The pattern matching honors the setting of the eexxttgglloobb shell + option. + + PPaatttteerrnn MMaattcchhiinngg + + Any character that appears in a pattern, other than the special pattern + characters described below, matches itself. The NUL character may not + occur in a pattern. A backslash escapes the following character; the + escaping backslash is discarded when matching. The special pattern + characters must be quoted if they are to be matched literally. + + The special pattern characters have the following meanings: + + ** Matches any string, including the null string. When the + gglloobbssttaarr shell option is enabled, and ** is used in a + pathname expansion context, two adjacent **s used as a + single pattern will match all files and zero or more di- + rectories and subdirectories. If followed by a //, two + adjacent **s will match only directories and subdirecto- + ries. + ?? Matches any single character. + [[......]] Matches any one of the enclosed characters. A pair of + characters separated by a hyphen denotes a _r_a_n_g_e _e_x_p_r_e_s_- + _s_i_o_n; any character that falls between those two charac- + ters, inclusive, using the current locale's collating se- + quence and character set, is matched. If the first char- + acter following the [[ is a !! or a ^^ then any character + not enclosed is matched. The sorting order of characters + in range expressions is determined by the current locale + and the values of the LLCC__CCOOLLLLAATTEE or LLCC__AALLLL shell vari- + ables, if set. To obtain the traditional interpretation + of range expressions, where [[aa--dd]] is equivalent to + [[aabbccdd]], set value of the LLCC__AALLLL shell variable to CC, or + enable the gglloobbaasscciiiirraannggeess shell option. A -- may be + matched by including it as the first or last character in + the set. A ]] may be matched by including it as the first + character in the set. + + Within [[ and ]], _c_h_a_r_a_c_t_e_r _c_l_a_s_s_e_s can be specified using + the syntax [[::_c_l_a_s_s::]], where _c_l_a_s_s is one of the following + classes defined in the POSIX standard: + aallnnuumm aallpphhaa aasscciiii bbllaannkk ccnnttrrll ddiiggiitt ggrraapphh lloowweerr pprriinntt + ppuunncctt ssppaaccee uuppppeerr wwoorrdd xxddiiggiitt + A character class matches any character belonging to that + class. The wwoorrdd character class matches letters, digits, + and the character _. + + Within [[ and ]], an _e_q_u_i_v_a_l_e_n_c_e _c_l_a_s_s can be specified us- + ing the syntax [[==_c==]], which matches all characters with + the same collation weight (as defined by the current lo- + cale) as the character _c. + + Within [[ and ]], the syntax [[.._s_y_m_b_o_l..]] matches the collat- + ing symbol _s_y_m_b_o_l. + + If the eexxttgglloobb shell option is enabled using the sshhoopptt builtin, several + extended pattern matching operators are recognized. In the following + description, a _p_a_t_t_e_r_n_-_l_i_s_t is a list of one or more patterns separated + by a ||. Composite patterns may be formed using one or more of the fol- + lowing sub-patterns: + + ??((_p_a_t_t_e_r_n_-_l_i_s_t)) + Matches zero or one occurrence of the given patterns + **((_p_a_t_t_e_r_n_-_l_i_s_t)) + Matches zero or more occurrences of the given patterns + ++((_p_a_t_t_e_r_n_-_l_i_s_t)) + Matches one or more occurrences of the given patterns + @@((_p_a_t_t_e_r_n_-_l_i_s_t)) + Matches one of the given patterns + !!((_p_a_t_t_e_r_n_-_l_i_s_t)) + Matches anything except one of the given patterns + + Complicated extended pattern matching against long strings is slow, es- + pecially when the patterns contain alternations and the strings contain + multiple matches. Using separate matches against shorter strings, or + using arrays of strings instead of a single long string, may be faster. + + QQuuoottee RReemmoovvaall + After the preceding expansions, all unquoted occurrences of the charac- + ters \\, '', and "" that did not result from one of the above expansions + are removed. + +RREEDDIIRREECCTTIIOONN + Before a command is executed, its input and output may be _r_e_d_i_r_e_c_t_e_d + using a special notation interpreted by the shell. Redirection allows + commands' file handles to be duplicated, opened, closed, made to refer + to different files, and can change the files the command reads from and + writes to. Redirection may also be used to modify file handles in the + current shell execution environment. The following redirection opera- + tors may precede or appear anywhere within a _s_i_m_p_l_e _c_o_m_m_a_n_d or may fol- + low a _c_o_m_m_a_n_d. Redirections are processed in the order they appear, + from left to right. + + Each redirection that may be preceded by a file descriptor number may + instead be preceded by a word of the form {_v_a_r_n_a_m_e}. In this case, for + each redirection operator except >&- and <&-, the shell will allocate a + file descriptor greater than or equal to 10 and assign it to _v_a_r_n_a_m_e. + If >&- or <&- is preceded by {_v_a_r_n_a_m_e}, the value of _v_a_r_n_a_m_e defines + the file descriptor to close. If {_v_a_r_n_a_m_e} is supplied, the redirect- + ion persists beyond the scope of the command, allowing the shell pro- + grammer to manage the file descriptor himself. + + In the following descriptions, if the file descriptor number is omit- + ted, and the first character of the redirection operator is <<, the re- + direction refers to the standard input (file descriptor 0). If the + first character of the redirection operator is >>, the redirection + refers to the standard output (file descriptor 1). + + The word following the redirection operator in the following descrip- + tions, unless otherwise noted, is subjected to brace expansion, tilde + expansion, parameter and variable expansion, command substitution, + arithmetic expansion, quote removal, pathname expansion, and word + splitting. If it expands to more than one word, bbaasshh reports an error. + + Note that the order of redirections is significant. For example, the + command + + ls >> dirlist 2>>&&1 + + directs both standard output and standard error to the file _d_i_r_l_i_s_t, + while the command + + ls 2>>&&1 >> dirlist + + directs only the standard output to file _d_i_r_l_i_s_t, because the standard + error was duplicated from the standard output before the standard out- + put was redirected to _d_i_r_l_i_s_t. + + BBaasshh handles several filenames specially when they are used in redirec- + tions, as described in the following table. If the operating system on + which bbaasshh is running provides these special files, bash will use them; + otherwise it will emulate them internally with the behavior described + below. + + //ddeevv//ffdd//_f_d + If _f_d is a valid integer, file descriptor _f_d is dupli- + cated. + //ddeevv//ssttddiinn + File descriptor 0 is duplicated. + //ddeevv//ssttddoouutt + File descriptor 1 is duplicated. + //ddeevv//ssttddeerrrr + File descriptor 2 is duplicated. + //ddeevv//ttccpp//_h_o_s_t//_p_o_r_t + If _h_o_s_t is a valid hostname or Internet address, and _p_o_r_t + is an integer port number or service name, bbaasshh attempts + to open the corresponding TCP socket. + //ddeevv//uuddpp//_h_o_s_t//_p_o_r_t + If _h_o_s_t is a valid hostname or Internet address, and _p_o_r_t + is an integer port number or service name, bbaasshh attempts + to open the corresponding UDP socket. + + A failure to open or create a file causes the redirection to fail. + + Redirections using file descriptors greater than 9 should be used with + care, as they may conflict with file descriptors the shell uses inter- + nally. + + RReeddiirreeccttiinngg IInnppuutt + Redirection of input causes the file whose name results from the expan- + sion of _w_o_r_d to be opened for reading on file descriptor _n, or the + standard input (file descriptor 0) if _n is not specified. + + The general format for redirecting input is: + + [_n]<<_w_o_r_d + + RReeddiirreeccttiinngg OOuuttppuutt + Redirection of output causes the file whose name results from the ex- + pansion of _w_o_r_d to be opened for writing on file descriptor _n, or the + standard output (file descriptor 1) if _n is not specified. If the file + does not exist it is created; if it does exist it is truncated to zero + size. + + The general format for redirecting output is: + + [_n]>>_w_o_r_d + + If the redirection operator is >>, and the nnoocclloobbbbeerr option to the sseett + builtin has been enabled, the redirection will fail if the file whose + name results from the expansion of _w_o_r_d exists and is a regular file. + If the redirection operator is >>||, or the redirection operator is >> and + the nnoocclloobbbbeerr option to the sseett builtin command is not enabled, the re- + direction is attempted even if the file named by _w_o_r_d exists. + + AAppppeennddiinngg RReeddiirreecctteedd OOuuttppuutt + Redirection of output in this fashion causes the file whose name re- + sults from the expansion of _w_o_r_d to be opened for appending on file de- + scriptor _n, or the standard output (file descriptor 1) if _n is not + specified. If the file does not exist it is created. + + The general format for appending output is: + + [_n]>>>>_w_o_r_d + + RReeddiirreeccttiinngg SSttaannddaarrdd OOuuttppuutt aanndd SSttaannddaarrdd EErrrroorr + This construct allows both the standard output (file descriptor 1) and + the standard error output (file descriptor 2) to be redirected to the + file whose name is the expansion of _w_o_r_d. + + There are two formats for redirecting standard output and standard er- + ror: + + &&>>_w_o_r_d + and + >>&&_w_o_r_d + + Of the two forms, the first is preferred. This is semantically equiva- + lent to + + >>_w_o_r_d 2>>&&1 + + When using the second form, _w_o_r_d may not expand to a number or --. If + it does, other redirection operators apply (see DDuupplliiccaattiinngg FFiillee DDee-- + ssccrriippttoorrss below) for compatibility reasons. + + AAppppeennddiinngg SSttaannddaarrdd OOuuttppuutt aanndd SSttaannddaarrdd EErrrroorr + This construct allows both the standard output (file descriptor 1) and + the standard error output (file descriptor 2) to be appended to the + file whose name is the expansion of _w_o_r_d. + + The format for appending standard output and standard error is: + + &&>>>>_w_o_r_d + + This is semantically equivalent to + + >>>>_w_o_r_d 2>>&&1 + + (see DDuupplliiccaattiinngg FFiillee DDeessccrriippttoorrss below). + + HHeerree DDooccuummeennttss + This type of redirection instructs the shell to read input from the + current source until a line containing only _d_e_l_i_m_i_t_e_r (with no trailing + blanks) is seen. All of the lines read up to that point are then used + as the standard input (or file descriptor _n if _n is specified) for a + command. + + The format of here-documents is: + + [_n]<<<<[--]_w_o_r_d + _h_e_r_e_-_d_o_c_u_m_e_n_t + _d_e_l_i_m_i_t_e_r + + No parameter and variable expansion, command substitution, arithmetic + expansion, or pathname expansion is performed on _w_o_r_d. If any part of + _w_o_r_d is quoted, the _d_e_l_i_m_i_t_e_r is the result of quote removal on _w_o_r_d, + and the lines in the here-document are not expanded. If _w_o_r_d is un- + quoted, all lines of the here-document are subjected to parameter ex- + pansion, command substitution, and arithmetic expansion, the character + sequence \\<> is ignored, and \\ must be used to quote the charac- + ters \\, $$, and ``. + + If the redirection operator is <<<<--, then all leading tab characters are + stripped from input lines and the line containing _d_e_l_i_m_i_t_e_r. This al- + lows here-documents within shell scripts to be indented in a natural + fashion. + + HHeerree SSttrriinnggss + A variant of here documents, the format is: + + [_n]<<<<<<_w_o_r_d + + The _w_o_r_d undergoes tilde expansion, parameter and variable expansion, + command substitution, arithmetic expansion, and quote removal. Path- + name expansion and word splitting are not performed. The result is + supplied as a single string, with a newline appended, to the command on + its standard input (or file descriptor _n if _n is specified). + + DDuupplliiccaattiinngg FFiillee DDeessccrriippttoorrss + The redirection operator + + [_n]<<&&_w_o_r_d + + is used to duplicate input file descriptors. If _w_o_r_d expands to one or + more digits, the file descriptor denoted by _n is made to be a copy of + that file descriptor. If the digits in _w_o_r_d do not specify a file de- + scriptor open for input, a redirection error occurs. If _w_o_r_d evaluates + to --, file descriptor _n is closed. If _n is not specified, the standard + input (file descriptor 0) is used. + + The operator + + [_n]>>&&_w_o_r_d + + is used similarly to duplicate output file descriptors. If _n is not + specified, the standard output (file descriptor 1) is used. If the + digits in _w_o_r_d do not specify a file descriptor open for output, a re- + direction error occurs. If _w_o_r_d evaluates to --, file descriptor _n is + closed. As a special case, if _n is omitted, and _w_o_r_d does not expand + to one or more digits or --, the standard output and standard error are + redirected as described previously. + + MMoovviinngg FFiillee DDeessccrriippttoorrss + The redirection operator + + [_n]<<&&_d_i_g_i_t-- + + moves the file descriptor _d_i_g_i_t to file descriptor _n, or the standard + input (file descriptor 0) if _n is not specified. _d_i_g_i_t is closed after + being duplicated to _n. + + Similarly, the redirection operator + + [_n]>>&&_d_i_g_i_t-- + + moves the file descriptor _d_i_g_i_t to file descriptor _n, or the standard + output (file descriptor 1) if _n is not specified. + + OOppeenniinngg FFiillee DDeessccrriippttoorrss ffoorr RReeaaddiinngg aanndd WWrriittiinngg + The redirection operator + + [_n]<<>>_w_o_r_d + + causes the file whose name is the expansion of _w_o_r_d to be opened for + both reading and writing on file descriptor _n, or on file descriptor 0 + if _n is not specified. If the file does not exist, it is created. + +AALLIIAASSEESS + _A_l_i_a_s_e_s allow a string to be substituted for a word when it is used as + the first word of a simple command. The shell maintains a list of + aliases that may be set and unset with the aalliiaass and uunnaalliiaass builtin + commands (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). The first word of each + simple command, if unquoted, is checked to see if it has an alias. If + so, that word is replaced by the text of the alias. The characters //, + $$, ``, and == and any of the shell _m_e_t_a_c_h_a_r_a_c_t_e_r_s or quoting characters + listed above may not appear in an alias name. The replacement text may + contain any valid shell input, including shell metacharacters. The + first word of the replacement text is tested for aliases, but a word + that is identical to an alias being expanded is not expanded a second + time. This means that one may alias llss to llss --FF, for instance, and + bbaasshh does not try to recursively expand the replacement text. If the + last character of the alias value is a _b_l_a_n_k, then the next command + word following the alias is also checked for alias expansion. + + Aliases are created and listed with the aalliiaass command, and removed with + the uunnaalliiaass command. + + There is no mechanism for using arguments in the replacement text. If + arguments are needed, a shell function should be used (see FFUUNNCCTTIIOONNSS + below). + + Aliases are not expanded when the shell is not interactive, unless the + eexxppaanndd__aalliiaasseess shell option is set using sshhoopptt (see the description of + sshhoopptt under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + + The rules concerning the definition and use of aliases are somewhat + confusing. BBaasshh always reads at least one complete line of input, and + all lines that make up a compound command, before executing any of the + commands on that line or the compound command. Aliases are expanded + when a command is read, not when it is executed. Therefore, an alias + definition appearing on the same line as another command does not take + effect until the next line of input is read. The commands following + the alias definition on that line are not affected by the new alias. + This behavior is also an issue when functions are executed. Aliases + are expanded when a function definition is read, not when the function + is executed, because a function definition is itself a command. As a + consequence, aliases defined in a function are not available until af- + ter that function is executed. To be safe, always put alias defini- + tions on a separate line, and do not use aalliiaass in compound commands. + + For almost every purpose, aliases are superseded by shell functions. + +FFUUNNCCTTIIOONNSS + A shell function, defined as described above under SSHHEELLLL GGRRAAMMMMAARR, + stores a series of commands for later execution. When the name of a + shell function is used as a simple command name, the list of commands + associated with that function name is executed. Functions are executed + in the context of the current shell; no new process is created to in- + terpret them (contrast this with the execution of a shell script). + When a function is executed, the arguments to the function become the + positional parameters during its execution. The special parameter ## is + updated to reflect the change. Special parameter 00 is unchanged. The + first element of the FFUUNNCCNNAAMMEE variable is set to the name of the func- + tion while the function is executing. + + All other aspects of the shell execution environment are identical be- + tween a function and its caller with these exceptions: the DDEEBBUUGG and + RREETTUURRNN traps (see the description of the ttrraapp builtin under SSHHEELLLL + BBUUIILLTTIINN CCOOMMMMAANNDDSS below) are not inherited unless the function has been + given the ttrraaccee attribute (see the description of the ddeeccllaarree builtin + below) or the --oo ffuunnccttrraaccee shell option has been enabled with the sseett + builtin (in which case all functions inherit the DDEEBBUUGG and RREETTUURRNN + traps), and the EERRRR trap is not inherited unless the --oo eerrrrttrraaccee shell + option has been enabled. + + Variables local to the function may be declared with the llooccaall builtin + command. Ordinarily, variables and their values are shared between the + function and its caller. If a variable is declared llooccaall, the vari- + able's visible scope is restricted to that function and its children + (including the functions it calls). Local variables "shadow" variables + with the same name declared at previous scopes. For instance, a local + variable declared in a function hides a global variable of the same + name: references and assignments refer to the local variable, leaving + the global variable unmodified. When the function returns, the global + variable is once again visible. + + The shell uses _d_y_n_a_m_i_c _s_c_o_p_i_n_g to control a variable's visibility + within functions. With dynamic scoping, visible variables and their + values are a result of the sequence of function calls that caused exe- + cution to reach the current function. The value of a variable that a + function sees depends on its value within its caller, if any, whether + that caller is the "global" scope or another shell function. This is + also the value that a local variable declaration "shadows", and the + value that is restored when the function returns. + + For example, if a variable _v_a_r is declared as local in function _f_u_n_c_1, + and _f_u_n_c_1 calls another function _f_u_n_c_2, references to _v_a_r made from + within _f_u_n_c_2 will resolve to the local variable _v_a_r from _f_u_n_c_1, shadow- + ing any global variable named _v_a_r. + + The uunnsseett builtin also acts using the same dynamic scope: if a variable + is local to the current scope, uunnsseett will unset it; otherwise the unset + will refer to the variable found in any calling scope as described + above. If a variable at the current local scope is unset, it will re- + main so until it is reset in that scope or until the function returns. + Once the function returns, any instance of the variable at a previous + scope will become visible. If the unset acts on a variable at a previ- + ous scope, any instance of a variable with that name that had been + shadowed will become visible. + + The FFUUNNCCNNEESSTT variable, if set to a numeric value greater than 0, de- + fines a maximum function nesting level. Function invocations that ex- + ceed the limit cause the entire command to abort. + + If the builtin command rreettuurrnn is executed in a function, the function + completes and execution resumes with the next command after the func- + tion call. Any command associated with the RREETTUURRNN trap is executed be- + fore execution resumes. When a function completes, the values of the + positional parameters and the special parameter ## are restored to the + values they had prior to the function's execution. + + Function names and definitions may be listed with the --ff option to the + ddeeccllaarree or ttyyppeesseett builtin commands. The --FF option to ddeeccllaarree or ttyyppee-- + sseett will list the function names only (and optionally the source file + and line number, if the eexxttddeebbuugg shell option is enabled). Functions + may be exported so that subshells automatically have them defined with + the --ff option to the eexxppoorrtt builtin. A function definition may be + deleted using the --ff option to the uunnsseett builtin. + + Functions may be recursive. The FFUUNNCCNNEESSTT variable may be used to limit + the depth of the function call stack and restrict the number of func- + tion invocations. By default, no limit is imposed on the number of re- + cursive calls. + +AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN + The shell allows arithmetic expressions to be evaluated, under certain + circumstances (see the lleett and ddeeccllaarree builtin commands, the (((( com- + pound command, and AArriitthhmmeettiicc EExxppaannssiioonn). Evaluation is done in fixed- + width integers with no check for overflow, though division by 0 is + trapped and flagged as an error. The operators and their precedence, + associativity, and values are the same as in the C language. The fol- + lowing list of operators is grouped into levels of equal-precedence op- + erators. The levels are listed in order of decreasing precedence. + + _i_d++++ _i_d---- + variable post-increment and post-decrement + -- ++ unary minus and plus + ++++_i_d ----_i_d + variable pre-increment and pre-decrement + !! ~~ logical and bitwise negation + **** exponentiation + ** // %% multiplication, division, remainder + ++ -- addition, subtraction + <<<< >>>> left and right bitwise shifts + <<== >>== << >> + comparison + ==== !!== equality and inequality + && bitwise AND + ^^ bitwise exclusive OR + || bitwise OR + &&&& logical AND + |||| logical OR + _e_x_p_r??_e_x_p_r::_e_x_p_r + conditional operator + == **== //== %%== ++== --== <<<<== >>>>== &&== ^^== ||== + assignment + _e_x_p_r_1 ,, _e_x_p_r_2 + comma + + Shell variables are allowed as operands; parameter expansion is per- + formed before the expression is evaluated. Within an expression, shell + variables may also be referenced by name without using the parameter + expansion syntax. A shell variable that is null or unset evaluates to + 0 when referenced by name without using the parameter expansion syntax. + The value of a variable is evaluated as an arithmetic expression when + it is referenced, or when a variable which has been given the _i_n_t_e_g_e_r + attribute using ddeeccllaarree --ii is assigned a value. A null value evaluates + to 0. A shell variable need not have its _i_n_t_e_g_e_r attribute turned on + to be used in an expression. + + Integer constants follow the C language definition, without suffixes or + character constants. Constants with a leading 0 are interpreted as oc- + tal numbers. A leading 0x or 0X denotes hexadecimal. Otherwise, num- + bers take the form [_b_a_s_e_#]n, where the optional _b_a_s_e is a decimal num- + ber between 2 and 64 representing the arithmetic base, and _n is a num- + ber in that base. If _b_a_s_e_# is omitted, then base 10 is used. When + specifying _n, if a non-digit is required, the digits greater than 9 are + represented by the lowercase letters, the uppercase letters, @, and _, + in that order. If _b_a_s_e is less than or equal to 36, lowercase and up- + percase letters may be used interchangeably to represent numbers be- + tween 10 and 35. + + Operators are evaluated in order of precedence. Sub-expressions in + parentheses are evaluated first and may override the precedence rules + above. + +CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS + Conditional expressions are used by the [[[[ compound command and the + tteesstt and [[ builtin commands to test file attributes and perform string + and arithmetic comparisons. The tteesstt and [[ commands determine their + behavior based on the number of arguments; see the descriptions of + those commands for any other command-specific actions. + + Expressions are formed from the following unary or binary primaries. + BBaasshh handles several filenames specially when they are used in expres- + sions. If the operating system on which bbaasshh is running provides these + special files, bash will use them; otherwise it will emulate them in- + ternally with this behavior: If any _f_i_l_e argument to one of the pri- + maries is of the form _/_d_e_v_/_f_d_/_n, then file descriptor _n is checked. If + the _f_i_l_e argument to one of the primaries is one of _/_d_e_v_/_s_t_d_i_n, + _/_d_e_v_/_s_t_d_o_u_t, or _/_d_e_v_/_s_t_d_e_r_r, file descriptor 0, 1, or 2, respectively, + is checked. + + Unless otherwise specified, primaries that operate on files follow sym- + bolic links and operate on the target of the link, rather than the link + itself. + + When used with [[[[, the << and >> operators sort lexicographically using + the current locale. The tteesstt command sorts using ASCII ordering. + + --aa _f_i_l_e + True if _f_i_l_e exists. + --bb _f_i_l_e + True if _f_i_l_e exists and is a block special file. + --cc _f_i_l_e + True if _f_i_l_e exists and is a character special file. + --dd _f_i_l_e + True if _f_i_l_e exists and is a directory. + --ee _f_i_l_e + True if _f_i_l_e exists. + --ff _f_i_l_e + True if _f_i_l_e exists and is a regular file. + --gg _f_i_l_e + True if _f_i_l_e exists and is set-group-id. + --hh _f_i_l_e + True if _f_i_l_e exists and is a symbolic link. + --kk _f_i_l_e + True if _f_i_l_e exists and its ``sticky'' bit is set. + --pp _f_i_l_e + True if _f_i_l_e exists and is a named pipe (FIFO). + --rr _f_i_l_e + True if _f_i_l_e exists and is readable. + --ss _f_i_l_e + True if _f_i_l_e exists and has a size greater than zero. + --tt _f_d True if file descriptor _f_d is open and refers to a terminal. + --uu _f_i_l_e + True if _f_i_l_e exists and its set-user-id bit is set. + --ww _f_i_l_e + True if _f_i_l_e exists and is writable. + --xx _f_i_l_e + True if _f_i_l_e exists and is executable. + --GG _f_i_l_e + True if _f_i_l_e exists and is owned by the effective group id. + --LL _f_i_l_e + True if _f_i_l_e exists and is a symbolic link. + --NN _f_i_l_e + True if _f_i_l_e exists and has been modified since it was last + read. + --OO _f_i_l_e + True if _f_i_l_e exists and is owned by the effective user id. + --SS _f_i_l_e + True if _f_i_l_e exists and is a socket. + _f_i_l_e_1 --eeff _f_i_l_e_2 + True if _f_i_l_e_1 and _f_i_l_e_2 refer to the same device and inode num- + bers. + _f_i_l_e_1 -nntt _f_i_l_e_2 + True if _f_i_l_e_1 is newer (according to modification date) than + _f_i_l_e_2, or if _f_i_l_e_1 exists and _f_i_l_e_2 does not. + _f_i_l_e_1 -oott _f_i_l_e_2 + True if _f_i_l_e_1 is older than _f_i_l_e_2, or if _f_i_l_e_2 exists and _f_i_l_e_1 + does not. + --oo _o_p_t_n_a_m_e + True if the shell option _o_p_t_n_a_m_e is enabled. See the list of + options under the description of the --oo option to the sseett + builtin below. + --vv _v_a_r_n_a_m_e + True if the shell variable _v_a_r_n_a_m_e is set (has been assigned a + value). + --RR _v_a_r_n_a_m_e + True if the shell variable _v_a_r_n_a_m_e is set and is a name refer- + ence. + --zz _s_t_r_i_n_g + True if the length of _s_t_r_i_n_g is zero. + _s_t_r_i_n_g + --nn _s_t_r_i_n_g + True if the length of _s_t_r_i_n_g is non-zero. + + _s_t_r_i_n_g_1 ==== _s_t_r_i_n_g_2 + _s_t_r_i_n_g_1 == _s_t_r_i_n_g_2 + True if the strings are equal. == should be used with the tteesstt + command for POSIX conformance. When used with the [[[[ command, + this performs pattern matching as described above (CCoommppoouunndd CCoomm-- + mmaannddss). + + _s_t_r_i_n_g_1 !!== _s_t_r_i_n_g_2 + True if the strings are not equal. + + _s_t_r_i_n_g_1 << _s_t_r_i_n_g_2 + True if _s_t_r_i_n_g_1 sorts before _s_t_r_i_n_g_2 lexicographically. + + _s_t_r_i_n_g_1 >> _s_t_r_i_n_g_2 + True if _s_t_r_i_n_g_1 sorts after _s_t_r_i_n_g_2 lexicographically. + + _a_r_g_1 OOPP _a_r_g_2 + OOPP is one of --eeqq, --nnee, --lltt, --llee, --ggtt, or --ggee. These arithmetic + binary operators return true if _a_r_g_1 is equal to, not equal to, + less than, less than or equal to, greater than, or greater than + or equal to _a_r_g_2, respectively. _A_r_g_1 and _a_r_g_2 may be positive + or negative integers. When used with the [[[[ command, _A_r_g_1 and + _A_r_g_2 are evaluated as arithmetic expressions (see AARRIITTHHMMEETTIICC + EEVVAALLUUAATTIIOONN above). + +SSIIMMPPLLEE CCOOMMMMAANNDD EEXXPPAANNSSIIOONN + When a simple command is executed, the shell performs the following ex- + pansions, assignments, and redirections, from left to right, in the + following order. + + 1. The words that the parser has marked as variable assignments + (those preceding the command name) and redirections are saved + for later processing. + + 2. The words that are not variable assignments or redirections are + expanded. If any words remain after expansion, the first word + is taken to be the name of the command and the remaining words + are the arguments. + + 3. Redirections are performed as described above under RREEDDIIRREECCTTIIOONN. + + 4. The text after the == in each variable assignment undergoes tilde + expansion, parameter expansion, command substitution, arithmetic + expansion, and quote removal before being assigned to the vari- + able. + + If no command name results, the variable assignments affect the current + shell environment. Otherwise, the variables are added to the environ- + ment of the executed command and do not affect the current shell envi- + ronment. If any of the assignments attempts to assign a value to a + readonly variable, an error occurs, and the command exits with a non- + zero status. + + If no command name results, redirections are performed, but do not af- + fect the current shell environment. A redirection error causes the + command to exit with a non-zero status. + + If there is a command name left after expansion, execution proceeds as + described below. Otherwise, the command exits. If one of the expan- + sions contained a command substitution, the exit status of the command + is the exit status of the last command substitution performed. If + there were no command substitutions, the command exits with a status of + zero. + +CCOOMMMMAANNDD EEXXEECCUUTTIIOONN + After a command has been split into words, if it results in a simple + command and an optional list of arguments, the following actions are + taken. + + If the command name contains no slashes, the shell attempts to locate + it. If there exists a shell function by that name, that function is + invoked as described above in FFUUNNCCTTIIOONNSS. If the name does not match a + function, the shell searches for it in the list of shell builtins. If + a match is found, that builtin is invoked. + + If the name is neither a shell function nor a builtin, and contains no + slashes, bbaasshh searches each element of the PPAATTHH for a directory con- + taining an executable file by that name. BBaasshh uses a hash table to re- + member the full pathnames of executable files (see hhaasshh under SSHHEELLLL + BBUUIILLTTIINN CCOOMMMMAANNDDSS below). A full search of the directories in PPAATTHH is + performed only if the command is not found in the hash table. If the + search is unsuccessful, the shell searches for a defined shell function + named ccoommmmaanndd__nnoott__ffoouunndd__hhaannddllee. If that function exists, it is invoked + in a separate execution environment with the original command and the + original command's arguments as its arguments, and the function's exit + status becomes the exit status of that subshell. If that function is + not defined, the shell prints an error message and returns an exit sta- + tus of 127. + + If the search is successful, or if the command name contains one or + more slashes, the shell executes the named program in a separate execu- + tion environment. Argument 0 is set to the name given, and the remain- + ing arguments to the command are set to the arguments given, if any. + + If this execution fails because the file is not in executable format, + and the file is not a directory, it is assumed to be a _s_h_e_l_l _s_c_r_i_p_t, a + file containing shell commands. A subshell is spawned to execute it. + This subshell reinitializes itself, so that the effect is as if a new + shell had been invoked to handle the script, with the exception that + the locations of commands remembered by the parent (see hhaasshh below un- + der SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS) are retained by the child. + + If the program is a file beginning with ##!!, the remainder of the first + line specifies an interpreter for the program. The shell executes the + specified interpreter on operating systems that do not handle this exe- + cutable format themselves. The arguments to the interpreter consist of + a single optional argument following the interpreter name on the first + line of the program, followed by the name of the program, followed by + the command arguments, if any. + +CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT + The shell has an _e_x_e_c_u_t_i_o_n _e_n_v_i_r_o_n_m_e_n_t, which consists of the follow- + ing: + + +o open files inherited by the shell at invocation, as modified by + redirections supplied to the eexxeecc builtin + + +o the current working directory as set by ccdd, ppuusshhdd, or ppooppdd, or + inherited by the shell at invocation + + +o the file creation mode mask as set by uummaasskk or inherited from + the shell's parent + + +o current traps set by ttrraapp + + +o shell parameters that are set by variable assignment or with sseett + or inherited from the shell's parent in the environment + + +o shell functions defined during execution or inherited from the + shell's parent in the environment + + +o options enabled at invocation (either by default or with com- + mand-line arguments) or by sseett + + +o options enabled by sshhoopptt + + +o shell aliases defined with aalliiaass + + +o various process IDs, including those of background jobs, the + value of $$$$, and the value of PPPPIIDD + + When a simple command other than a builtin or shell function is to be + executed, it is invoked in a separate execution environment that con- + sists of the following. Unless otherwise noted, the values are inher- + ited from the shell. + + + +o the shell's open files, plus any modifications and additions + specified by redirections to the command + + +o the current working directory + + +o the file creation mode mask + + +o shell variables and functions marked for export, along with + variables exported for the command, passed in the environment + + +o traps caught by the shell are reset to the values inherited from + the shell's parent, and traps ignored by the shell are ignored + + A command invoked in this separate environment cannot affect the + shell's execution environment. + + Command substitution, commands grouped with parentheses, and asynchro- + nous commands are invoked in a subshell environment that is a duplicate + of the shell environment, except that traps caught by the shell are re- + set to the values that the shell inherited from its parent at invoca- + tion. Builtin commands that are invoked as part of a pipeline are also + executed in a subshell environment. Changes made to the subshell envi- + ronment cannot affect the shell's execution environment. + + Subshells spawned to execute command substitutions inherit the value of + the --ee option from the parent shell. When not in _p_o_s_i_x _m_o_d_e, bbaasshh + clears the --ee option in such subshells. + + If a command is followed by a && and job control is not active, the de- + fault standard input for the command is the empty file _/_d_e_v_/_n_u_l_l. Oth- + erwise, the invoked command inherits the file descriptors of the call- + ing shell as modified by redirections. + +EENNVVIIRROONNMMEENNTT + When a program is invoked it is given an array of strings called the + _e_n_v_i_r_o_n_m_e_n_t. This is a list of _n_a_m_e-_v_a_l_u_e pairs, of the form + _n_a_m_e=_v_a_l_u_e. + + The shell provides several ways to manipulate the environment. On in- + vocation, the shell scans its own environment and creates a parameter + for each name found, automatically marking it for _e_x_p_o_r_t to child pro- + cesses. Executed commands inherit the environment. The eexxppoorrtt and ddee-- + ccllaarree --xx commands allow parameters and functions to be added to and + deleted from the environment. If the value of a parameter in the envi- + ronment is modified, the new value becomes part of the environment, re- + placing the old. The environment inherited by any executed command + consists of the shell's initial environment, whose values may be modi- + fied in the shell, less any pairs removed by the uunnsseett command, plus + any additions via the eexxppoorrtt and ddeeccllaarree --xx commands. + + The environment for any _s_i_m_p_l_e _c_o_m_m_a_n_d or function may be augmented + temporarily by prefixing it with parameter assignments, as described + above in PPAARRAAMMEETTEERRSS. These assignment statements affect only the envi- + ronment seen by that command. + + If the --kk option is set (see the sseett builtin command below), then _a_l_l + parameter assignments are placed in the environment for a command, not + just those that precede the command name. + + When bbaasshh invokes an external command, the variable __ is set to the + full filename of the command and passed to that command in its environ- + ment. + +EEXXIITT SSTTAATTUUSS + The exit status of an executed command is the value returned by the + _w_a_i_t_p_i_d system call or equivalent function. Exit statuses fall between + 0 and 255, though, as explained below, the shell may use values above + 125 specially. Exit statuses from shell builtins and compound commands + are also limited to this range. Under certain circumstances, the shell + will use special values to indicate specific failure modes. + + For the shell's purposes, a command which exits with a zero exit status + has succeeded. An exit status of zero indicates success. A non-zero + exit status indicates failure. When a command terminates on a fatal + signal _N, bbaasshh uses the value of 128+_N as the exit status. + + If a command is not found, the child process created to execute it re- + turns a status of 127. If a command is found but is not executable, + the return status is 126. + + If a command fails because of an error during expansion or redirection, + the exit status is greater than zero. + + Shell builtin commands return a status of 0 (_t_r_u_e) if successful, and + non-zero (_f_a_l_s_e) if an error occurs while they execute. All builtins + return an exit status of 2 to indicate incorrect usage, generally in- + valid options or missing arguments. + + BBaasshh itself returns the exit status of the last command executed, un- + less a syntax error occurs, in which case it exits with a non-zero + value. See also the eexxiitt builtin command below. + +SSIIGGNNAALLSS + When bbaasshh is interactive, in the absence of any traps, it ignores + SSIIGGTTEERRMM (so that kkiillll 00 does not kill an interactive shell), and SSIIGGIINNTT + is caught and handled (so that the wwaaiitt builtin is interruptible). In + all cases, bbaasshh ignores SSIIGGQQUUIITT. If job control is in effect, bbaasshh ig- + nores SSIIGGTTTTIINN, SSIIGGTTTTOOUU, and SSIIGGTTSSTTPP. + + Non-builtin commands run by bbaasshh have signal handlers set to the values + inherited by the shell from its parent. When job control is not in ef- + fect, asynchronous commands ignore SSIIGGIINNTT and SSIIGGQQUUIITT in addition to + these inherited handlers. Commands run as a result of command substi- + tution ignore the keyboard-generated job control signals SSIIGGTTTTIINN, SSIIGGTT-- + TTOOUU, and SSIIGGTTSSTTPP. + + The shell exits by default upon receipt of a SSIIGGHHUUPP. Before exiting, + an interactive shell resends the SSIIGGHHUUPP to all jobs, running or + stopped. Stopped jobs are sent SSIIGGCCOONNTT to ensure that they receive the + SSIIGGHHUUPP. To prevent the shell from sending the signal to a particular + job, it should be removed from the jobs table with the ddiissoowwnn builtin + (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below) or marked to not receive SSIIGGHHUUPP us- + ing ddiissoowwnn --hh. + + If the hhuuppoonneexxiitt shell option has been set with sshhoopptt, bbaasshh sends a + SSIIGGHHUUPP to all jobs when an interactive login shell exits. + + If bbaasshh is waiting for a command to complete and receives a signal for + which a trap has been set, the trap will not be executed until the com- + mand completes. When bbaasshh is waiting for an asynchronous command via + the wwaaiitt builtin, the reception of a signal for which a trap has been + set will cause the wwaaiitt builtin to return immediately with an exit sta- + tus greater than 128, immediately after which the trap is executed. + +JJOOBB CCOONNTTRROOLL + _J_o_b _c_o_n_t_r_o_l refers to the ability to selectively stop (_s_u_s_p_e_n_d) the ex- + ecution of processes and continue (_r_e_s_u_m_e) their execution at a later + point. A user typically employs this facility via an interactive in- + terface supplied jointly by the operating system kernel's terminal + driver and bbaasshh. + + The shell associates a _j_o_b with each pipeline. It keeps a table of + currently executing jobs, which may be listed with the jjoobbss command. + When bbaasshh starts a job asynchronously (in the _b_a_c_k_g_r_o_u_n_d), it prints a + line that looks like: + + [1] 25647 + + indicating that this job is job number 1 and that the process ID of the + last process in the pipeline associated with this job is 25647. All of + the processes in a single pipeline are members of the same job. BBaasshh + uses the _j_o_b abstraction as the basis for job control. + + To facilitate the implementation of the user interface to job control, + the operating system maintains the notion of a _c_u_r_r_e_n_t _t_e_r_m_i_n_a_l _p_r_o_c_e_s_s + _g_r_o_u_p _I_D. Members of this process group (processes whose process group + ID is equal to the current terminal process group ID) receive keyboard- + generated signals such as SSIIGGIINNTT. These processes are said to be in + the _f_o_r_e_g_r_o_u_n_d. _B_a_c_k_g_r_o_u_n_d processes are those whose process group ID + differs from the terminal's; such processes are immune to keyboard-gen- + erated signals. Only foreground processes are allowed to read from or, + if the user so specifies with stty tostop, write to the terminal. + Background processes which attempt to read from (write to when stty + tostop is in effect) the terminal are sent a SSIIGGTTTTIINN ((SSIIGGTTTTOOUU)) signal + by the kernel's terminal driver, which, unless caught, suspends the + process. + + If the operating system on which bbaasshh is running supports job control, + bbaasshh contains facilities to use it. Typing the _s_u_s_p_e_n_d character (typ- + ically ^^ZZ, Control-Z) while a process is running causes that process to + be stopped and returns control to bbaasshh. Typing the _d_e_l_a_y_e_d _s_u_s_p_e_n_d + character (typically ^^YY, Control-Y) causes the process to be stopped + when it attempts to read input from the terminal, and control to be re- + turned to bbaasshh. The user may then manipulate the state of this job, + using the bbgg command to continue it in the background, the ffgg command + to continue it in the foreground, or the kkiillll command to kill it. A ^^ZZ + takes effect immediately, and has the additional side effect of causing + pending output and typeahead to be discarded. + + There are a number of ways to refer to a job in the shell. The charac- + ter %% introduces a job specification (_j_o_b_s_p_e_c). Job number _n may be + referred to as %%nn. A job may also be referred to using a prefix of the + name used to start it, or using a substring that appears in its command + line. For example, %%ccee refers to a stopped job whose command name be- + gins with ccee. If a prefix matches more than one job, bbaasshh reports an + error. Using %%??ccee, on the other hand, refers to any job containing the + string ccee in its command line. If the substring matches more than one + job, bbaasshh reports an error. The symbols %%%% and %%++ refer to the shell's + notion of the _c_u_r_r_e_n_t _j_o_b, which is the last job stopped while it was + in the foreground or started in the background. The _p_r_e_v_i_o_u_s _j_o_b may + be referenced using %%--. If there is only a single job, %%++ and %%-- can + both be used to refer to that job. In output pertaining to jobs (e.g., + the output of the jjoobbss command), the current job is always flagged with + a ++, and the previous job with a --. A single % (with no accompanying + job specification) also refers to the current job. + + Simply naming a job can be used to bring it into the foreground: %%11 is + a synonym for ````ffgg %%11'''', bringing job 1 from the background into the + foreground. Similarly, ````%%11 &&'''' resumes job 1 in the background, + equivalent to ````bbgg %%11''''. + + The shell learns immediately whenever a job changes state. Normally, + bbaasshh waits until it is about to print a prompt before reporting changes + in a job's status so as to not interrupt any other output. If the --bb + option to the sseett builtin command is enabled, bbaasshh reports such changes + immediately. Any trap on SSIIGGCCHHLLDD is executed for each child that ex- + its. + + If an attempt to exit bbaasshh is made while jobs are stopped (or, if the + cchheecckkjjoobbss shell option has been enabled using the sshhoopptt builtin, run- + ning), the shell prints a warning message, and, if the cchheecckkjjoobbss option + is enabled, lists the jobs and their statuses. The jjoobbss command may + then be used to inspect their status. If a second attempt to exit is + made without an intervening command, the shell does not print another + warning, and any stopped jobs are terminated. + + When the shell is waiting for a job or process using the wwaaiitt builtin, + and job control is enabled, wwaaiitt will return when the job changes + state. The --ff option causes wwaaiitt to wait until the job or process ter- + minates before returning. + +PPRROOMMPPTTIINNGG + When executing interactively, bbaasshh displays the primary prompt PPSS11 when + it is ready to read a command, and the secondary prompt PPSS22 when it + needs more input to complete a command. BBaasshh displays PPSS00 after it + reads a command but before executing it. BBaasshh displays PPSS44 as de- + scribed above before tracing each command when the --xx option is en- + abled. BBaasshh allows these prompt strings to be customized by inserting + a number of backslash-escaped special characters that are decoded as + follows: + \\aa an ASCII bell character (07) + \\dd the date in "Weekday Month Date" format (e.g., "Tue May + 26") + \\DD{{_f_o_r_m_a_t}} + the _f_o_r_m_a_t is passed to _s_t_r_f_t_i_m_e(3) and the result is in- + serted into the prompt string; an empty _f_o_r_m_a_t results in + a locale-specific time representation. The braces are + required + \\ee an ASCII escape character (033) + \\hh the hostname up to the first `.' + \\HH the hostname + \\jj the number of jobs currently managed by the shell + \\ll the basename of the shell's terminal device name + \\nn newline + \\rr carriage return + \\ss the name of the shell, the basename of $$00 (the portion + following the final slash) + \\tt the current time in 24-hour HH:MM:SS format + \\TT the current time in 12-hour HH:MM:SS format + \\@@ the current time in 12-hour am/pm format + \\AA the current time in 24-hour HH:MM format + \\uu the username of the current user + \\vv the version of bbaasshh (e.g., 2.00) + \\VV the release of bbaasshh, version + patch level (e.g., 2.00.0) + \\ww the current working directory, with $$HHOOMMEE abbreviated + with a tilde (uses the value of the PPRROOMMPPTT__DDIIRRTTRRIIMM vari- + able) + \\WW the basename of the current working directory, with $$HHOOMMEE + abbreviated with a tilde + \\!! the history number of this command + \\## the command number of this command + \\$$ if the effective UID is 0, a ##, otherwise a $$ + \\_n_n_n the character corresponding to the octal number _n_n_n + \\\\ a backslash + \\[[ begin a sequence of non-printing characters, which could + be used to embed a terminal control sequence into the + prompt + \\]] end a sequence of non-printing characters + + The command number and the history number are usually different: the + history number of a command is its position in the history list, which + may include commands restored from the history file (see HHIISSTTOORRYY be- + low), while the command number is the position in the sequence of com- + mands executed during the current shell session. After the string is + decoded, it is expanded via parameter expansion, command substitution, + arithmetic expansion, and quote removal, subject to the value of the + pprroommppttvvaarrss shell option (see the description of the sshhoopptt command under + SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). This can have unwanted side effects if + escaped portions of the string appear within command substitution or + contain characters special to word expansion. + +RREEAADDLLIINNEE + This is the library that handles reading input when using an interac- + tive shell, unless the ----nnooeeddiittiinngg option is given at shell invocation. + Line editing is also used when using the --ee option to the rreeaadd builtin. + By default, the line editing commands are similar to those of Emacs. A + vi-style line editing interface is also available. Line editing can be + enabled at any time using the --oo eemmaaccss or --oo vvii options to the sseett + builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). To turn off line editing + after the shell is running, use the ++oo eemmaaccss or ++oo vvii options to the + sseett builtin. + + RReeaaddlliinnee NNoottaattiioonn + In this section, the Emacs-style notation is used to denote keystrokes. + Control keys are denoted by C-_k_e_y, e.g., C-n means Control-N. Simi- + larly, _m_e_t_a keys are denoted by M-_k_e_y, so M-x means Meta-X. (On key- + boards without a _m_e_t_a key, M-_x means ESC _x, i.e., press the Escape key + then the _x key. This makes ESC the _m_e_t_a _p_r_e_f_i_x. The combination M-C-_x + means ESC-Control-_x, or press the Escape key then hold the Control key + while pressing the _x key.) + + Readline commands may be given numeric _a_r_g_u_m_e_n_t_s, which normally act as + a repeat count. Sometimes, however, it is the sign of the argument + that is significant. Passing a negative argument to a command that + acts in the forward direction (e.g., kkiillll--lliinnee) causes that command to + act in a backward direction. Commands whose behavior with arguments + deviates from this are noted below. + + When a command is described as _k_i_l_l_i_n_g text, the text deleted is saved + for possible future retrieval (_y_a_n_k_i_n_g). The killed text is saved in a + _k_i_l_l _r_i_n_g. Consecutive kills cause the text to be accumulated into one + unit, which can be yanked all at once. Commands which do not kill text + separate the chunks of text on the kill ring. + + RReeaaddlliinnee IInniittiiaalliizzaattiioonn + Readline is customized by putting commands in an initialization file + (the _i_n_p_u_t_r_c file). The name of this file is taken from the value of + the IINNPPUUTTRRCC variable. If that variable is unset, the default is _~_/_._i_n_- + _p_u_t_r_c. If that file does not exist or cannot be read, the ultimate + default is _/_e_t_c_/_i_n_p_u_t_r_c. When a program which uses the readline li- + brary starts up, the initialization file is read, and the key bindings + and variables are set. There are only a few basic constructs allowed + in the readline initialization file. Blank lines are ignored. Lines + beginning with a ## are comments. Lines beginning with a $$ indicate + conditional constructs. Other lines denote key bindings and variable + settings. + + The default key-bindings may be changed with an _i_n_p_u_t_r_c file. Other + programs that use this library may add their own commands and bindings. + + For example, placing + + M-Control-u: universal-argument + or + C-Meta-u: universal-argument + into the _i_n_p_u_t_r_c would make M-C-u execute the readline command _u_n_i_v_e_r_- + _s_a_l_-_a_r_g_u_m_e_n_t. + + The following symbolic character names are recognized: _R_U_B_O_U_T, _D_E_L, + _E_S_C, _L_F_D, _N_E_W_L_I_N_E, _R_E_T, _R_E_T_U_R_N, _S_P_C, _S_P_A_C_E, and _T_A_B. + + In addition to command names, readline allows keys to be bound to a + string that is inserted when the key is pressed (a _m_a_c_r_o). + + RReeaaddlliinnee KKeeyy BBiinnddiinnggss + The syntax for controlling key bindings in the _i_n_p_u_t_r_c file is simple. + All that is required is the name of the command or the text of a macro + and a key sequence to which it should be bound. The name may be speci- + fied in one of two ways: as a symbolic key name, possibly with _M_e_t_a_- or + _C_o_n_t_r_o_l_- prefixes, or as a key sequence. + + When using the form kkeeyynnaammee:_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, _k_e_y_n_a_m_e is the name + of a key spelled out in English. For example: + + Control-u: universal-argument + Meta-Rubout: backward-kill-word + Control-o: "> output" + + In the above example, _C_-_u is bound to the function uunniivveerrssaall--aarrgguummeenntt, + _M_-_D_E_L is bound to the function bbaacckkwwaarrdd--kkiillll--wwoorrdd, and _C_-_o is bound to + run the macro expressed on the right hand side (that is, to insert the + text ``> output'' into the line). + + In the second form, ""kkeeyysseeqq"":_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, kkeeyysseeqq differs + from kkeeyynnaammee above in that strings denoting an entire key sequence may + be specified by placing the sequence within double quotes. Some GNU + Emacs style key escapes can be used, as in the following example, but + the symbolic character names are not recognized. + + "\C-u": universal-argument + "\C-x\C-r": re-read-init-file + "\e[11~": "Function Key 1" + + In this example, _C_-_u is again bound to the function uunniivveerrssaall--aarrgguummeenntt. + _C_-_x _C_-_r is bound to the function rree--rreeaadd--iinniitt--ffiillee, and _E_S_C _[ _1 _1 _~ is + bound to insert the text ``Function Key 1''. + + The full set of GNU Emacs style escape sequences is + \\CC-- control prefix + \\MM-- meta prefix + \\ee an escape character + \\\\ backslash + \\"" literal " + \\'' literal ' + + In addition to the GNU Emacs style escape sequences, a second set of + backslash escapes is available: + \\aa alert (bell) + \\bb backspace + \\dd delete + \\ff form feed + \\nn newline + \\rr carriage return + \\tt horizontal tab + \\vv vertical tab + \\_n_n_n the eight-bit character whose value is the octal value + _n_n_n (one to three digits) + \\xx_H_H the eight-bit character whose value is the hexadecimal + value _H_H (one or two hex digits) + + When entering the text of a macro, single or double quotes must be used + to indicate a macro definition. Unquoted text is assumed to be a func- + tion name. In the macro body, the backslash escapes described above + are expanded. Backslash will quote any other character in the macro + text, including " and '. + + BBaasshh allows the current readline key bindings to be displayed or modi- + fied with the bbiinndd builtin command. The editing mode may be switched + during interactive use by using the --oo option to the sseett builtin com- + mand (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + + RReeaaddlliinnee VVaarriiaabblleess + Readline has variables that can be used to further customize its behav- + ior. A variable may be set in the _i_n_p_u_t_r_c file with a statement of the + form + + sseett _v_a_r_i_a_b_l_e_-_n_a_m_e _v_a_l_u_e + or using the bbiinndd builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + + Except where noted, readline variables can take the values OOnn or OOffff + (without regard to case). Unrecognized variable names are ignored. + When a variable value is read, empty or null values, "on" (case-insen- + sitive), and "1" are equivalent to OOnn. All other values are equivalent + to OOffff. The variables and their default values are: + + bbeellll--ssttyyllee ((aauuddiibbllee)) + Controls what happens when readline wants to ring the terminal + bell. If set to nnoonnee, readline never rings the bell. If set to + vviissiibbllee, readline uses a visible bell if one is available. If + set to aauuddiibbllee, readline attempts to ring the terminal's bell. + bbiinndd--ttttyy--ssppeecciiaall--cchhaarrss ((OOnn)) + If set to OOnn, readline attempts to bind the control characters + treated specially by the kernel's terminal driver to their read- + line equivalents. + bblliinnkk--mmaattcchhiinngg--ppaarreenn ((OOffff)) + If set to OOnn, readline attempts to briefly move the cursor to an + opening parenthesis when a closing parenthesis is inserted. + ccoolloorreedd--ccoommpplleettiioonn--pprreeffiixx ((OOffff)) + If set to OOnn, when listing completions, readline displays the + common prefix of the set of possible completions using a differ- + ent color. The color definitions are taken from the value of + the LLSS__CCOOLLOORRSS environment variable. + ccoolloorreedd--ssttaattss ((OOffff)) + If set to OOnn, readline displays possible completions using dif- + ferent colors to indicate their file type. The color defini- + tions are taken from the value of the LLSS__CCOOLLOORRSS environment + variable. + ccoommmmeenntt--bbeeggiinn ((````##'''')) + The string that is inserted when the readline iinnsseerrtt--ccoommmmeenntt + command is executed. This command is bound to MM--## in emacs mode + and to ## in vi command mode. + ccoommpplleettiioonn--ddiissppllaayy--wwiiddtthh ((--11)) + The number of screen columns used to display possible matches + when performing completion. The value is ignored if it is less + than 0 or greater than the terminal screen width. A value of 0 + will cause matches to be displayed one per line. The default + value is -1. + ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff)) + If set to OOnn, readline performs filename matching and completion + in a case-insensitive fashion. + ccoommpplleettiioonn--mmaapp--ccaassee ((OOffff)) + If set to OOnn, and ccoommpplleettiioonn--iiggnnoorree--ccaassee is enabled, readline + treats hyphens (_-) and underscores (__) as equivalent when per- + forming case-insensitive filename matching and completion. + ccoommpplleettiioonn--pprreeffiixx--ddiissppllaayy--lleennggtthh ((00)) + The length in characters of the common prefix of a list of pos- + sible completions that is displayed without modification. When + set to a value greater than zero, common prefixes longer than + this value are replaced with an ellipsis when displaying possi- + ble completions. + ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000)) + This determines when the user is queried about viewing the num- + ber of possible completions generated by the ppoossssiibbllee--ccoommppllee-- + ttiioonnss command. It may be set to any integer value greater than + or equal to zero. If the number of possible completions is + greater than or equal to the value of this variable, readline + will ask whether or not the user wishes to view them; otherwise + they are simply listed on the terminal. + ccoonnvveerrtt--mmeettaa ((OOnn)) + If set to OOnn, readline will convert characters with the eighth + bit set to an ASCII key sequence by stripping the eighth bit and + prefixing an escape character (in effect, using escape as the + _m_e_t_a _p_r_e_f_i_x). The default is _O_n, but readline will set it to + _O_f_f if the locale contains eight-bit characters. + ddiissaabbllee--ccoommpplleettiioonn ((OOffff)) + If set to OOnn, readline will inhibit word completion. Completion + characters will be inserted into the line as if they had been + mapped to sseellff--iinnsseerrtt. + eecchhoo--ccoonnttrrooll--cchhaarraacctteerrss ((OOnn)) + When set to OOnn, on operating systems that indicate they support + it, readline echoes a character corresponding to a signal gener- + ated from the keyboard. + eeddiittiinngg--mmooddee ((eemmaaccss)) + Controls whether readline begins with a set of key bindings sim- + ilar to _E_m_a_c_s or _v_i. eeddiittiinngg--mmooddee can be set to either eemmaaccss or + vvii. + eemmaaccss--mmooddee--ssttrriinngg ((@@)) + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + displayed immediately before the last line of the primary prompt + when emacs editing mode is active. The value is expanded like a + key binding, so the standard set of meta- and control prefixes + and backslash escape sequences is available. Use the \1 and \2 + escapes to begin and end sequences of non-printing characters, + which can be used to embed a terminal control sequence into the + mode string. + eennaabbllee--bbrraacckkeetteedd--ppaassttee ((OOnn)) + When set to OOnn, readline will configure the terminal in a way + that will enable it to insert each paste into the editing buffer + as a single string of characters, instead of treating each char- + acter as if it had been read from the keyboard. This can pre- + vent pasted characters from being interpreted as editing com- + mands. + eennaabbllee--kkeeyyppaadd ((OOffff)) + When set to OOnn, readline will try to enable the application key- + pad when it is called. Some systems need this to enable the ar- + row keys. + eennaabbllee--mmeettaa--kkeeyy ((OOnn)) + When set to OOnn, readline will try to enable any meta modifier + key the terminal claims to support when it is called. On many + terminals, the meta key is used to send eight-bit characters. + eexxppaanndd--ttiillddee ((OOffff)) + If set to OOnn, tilde expansion is performed when readline at- + tempts word completion. + hhiissttoorryy--pprreesseerrvvee--ppooiinntt ((OOffff)) + If set to OOnn, the history code attempts to place point at the + same location on each history line retrieved with pprreevviioouuss--hhiiss-- + ttoorryy or nneexxtt--hhiissttoorryy. + hhiissttoorryy--ssiizzee ((uunnsseett)) + Set the maximum number of history entries saved in the history + list. If set to zero, any existing history entries are deleted + and no new entries are saved. If set to a value less than zero, + the number of history entries is not limited. By default, the + number of history entries is set to the value of the HHIISSTTSSIIZZEE + shell variable. If an attempt is made to set _h_i_s_t_o_r_y_-_s_i_z_e to a + non-numeric value, the maximum number of history entries will be + set to 500. + hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff)) + When set to OOnn, makes readline use a single line for display, + scrolling the input horizontally on a single screen line when it + becomes longer than the screen width rather than wrapping to a + new line. This setting is automatically enabled for terminals + of height 1. + iinnppuutt--mmeettaa ((OOffff)) + If set to OOnn, readline will enable eight-bit input (that is, it + will not strip the eighth bit from the characters it reads), re- + gardless of what the terminal claims it can support. The name + mmeettaa--ffllaagg is a synonym for this variable. The default is _O_f_f, + but readline will set it to _O_n if the locale contains eight-bit + characters. + iisseeaarrcchh--tteerrmmiinnaattoorrss ((````CC--[[CC--JJ'''')) + The string of characters that should terminate an incremental + search without subsequently executing the character as a com- + mand. If this variable has not been given a value, the charac- + ters _E_S_C and _C_-_J will terminate an incremental search. + kkeeyymmaapp ((eemmaaccss)) + Set the current readline keymap. The set of valid keymap names + is _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_c_o_m_- + _m_a_n_d, and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is + equivalent to _e_m_a_c_s_-_s_t_a_n_d_a_r_d. The default value is _e_m_a_c_s; the + value of eeddiittiinngg--mmooddee also affects the default keymap. + kkeeyysseeqq--ttiimmeeoouutt ((550000)) + Specifies the duration _r_e_a_d_l_i_n_e will wait for a character when + reading an ambiguous key sequence (one that can form a complete + key sequence using the input read so far, or can take additional + input to complete a longer key sequence). If no input is re- + ceived within the timeout, _r_e_a_d_l_i_n_e will use the shorter but + complete key sequence. The value is specified in milliseconds, + so a value of 1000 means that _r_e_a_d_l_i_n_e will wait one second for + additional input. If this variable is set to a value less than + or equal to zero, or to a non-numeric value, _r_e_a_d_l_i_n_e will wait + until another key is pressed to decide which key sequence to + complete. + mmaarrkk--ddiirreeccttoorriieess ((OOnn)) + If set to OOnn, completed directory names have a slash appended. + mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff)) + If set to OOnn, history lines that have been modified are dis- + played with a preceding asterisk (**). + mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess ((OOffff)) + If set to OOnn, completed names which are symbolic links to direc- + tories have a slash appended (subject to the value of mmaarrkk--ddii-- + rreeccttoorriieess). + mmaattcchh--hhiiddddeenn--ffiilleess ((OOnn)) + This variable, when set to OOnn, causes readline to match files + whose names begin with a `.' (hidden files) when performing + filename completion. If set to OOffff, the leading `.' must be + supplied by the user in the filename to be completed. + mmeennuu--ccoommpplleettee--ddiissppllaayy--pprreeffiixx ((OOffff)) + If set to OOnn, menu completion displays the common prefix of the + list of possible completions (which may be empty) before cycling + through the list. + oouuttppuutt--mmeettaa ((OOffff)) + If set to OOnn, readline will display characters with the eighth + bit set directly rather than as a meta-prefixed escape sequence. + The default is _O_f_f, but readline will set it to _O_n if the locale + contains eight-bit characters. + ppaaggee--ccoommpplleettiioonnss ((OOnn)) + If set to OOnn, readline uses an internal _m_o_r_e-like pager to dis- + play a screenful of possible completions at a time. + pprriinntt--ccoommpplleettiioonnss--hhoorriizzoonnttaallllyy ((OOffff)) + If set to OOnn, readline will display completions with matches + sorted horizontally in alphabetical order, rather than down the + screen. + rreevveerrtt--aallll--aatt--nneewwlliinnee ((OOffff)) + If set to OOnn, readline will undo all changes to history lines + before returning when aacccceepptt--lliinnee is executed. By default, his- + tory lines may be modified and retain individual undo lists + across calls to rreeaaddlliinnee. + sshhooww--aallll--iiff--aammbbiigguuoouuss ((OOffff)) + This alters the default behavior of the completion functions. + If set to OOnn, words which have more than one possible completion + cause the matches to be listed immediately instead of ringing + the bell. + sshhooww--aallll--iiff--uunnmmooddiiffiieedd ((OOffff)) + This alters the default behavior of the completion functions in + a fashion similar to sshhooww--aallll--iiff--aammbbiigguuoouuss. If set to OOnn, words + which have more than one possible completion without any possi- + ble partial completion (the possible completions don't share a + common prefix) cause the matches to be listed immediately in- + stead of ringing the bell. + sshhooww--mmooddee--iinn--pprroommpptt ((OOffff)) + If set to OOnn, add a string to the beginning of the prompt indi- + cating the editing mode: emacs, vi command, or vi insertion. + The mode strings are user-settable (e.g., _e_m_a_c_s_-_m_o_d_e_-_s_t_r_i_n_g). + sskkiipp--ccoommpplleetteedd--tteexxtt ((OOffff)) + If set to OOnn, this alters the default completion behavior when + inserting a single match into the line. It's only active when + performing completion in the middle of a word. If enabled, + readline does not insert characters from the completion that + match characters after point in the word being completed, so + portions of the word following the cursor are not duplicated. + vvii--ccmmdd--mmooddee--ssttrriinngg ((((ccmmdd)))) + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + displayed immediately before the last line of the primary prompt + when vi editing mode is active and in command mode. The value + is expanded like a key binding, so the standard set of meta- and + control prefixes and backslash escape sequences is available. + Use the \1 and \2 escapes to begin and end sequences of non- + printing characters, which can be used to embed a terminal con- + trol sequence into the mode string. + vvii--iinnss--mmooddee--ssttrriinngg ((((iinnss)))) + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + displayed immediately before the last line of the primary prompt + when vi editing mode is active and in insertion mode. The value + is expanded like a key binding, so the standard set of meta- and + control prefixes and backslash escape sequences is available. + Use the \1 and \2 escapes to begin and end sequences of non- + printing characters, which can be used to embed a terminal con- + trol sequence into the mode string. + vviissiibbllee--ssttaattss ((OOffff)) + If set to OOnn, a character denoting a file's type as reported by + _s_t_a_t(2) is appended to the filename when listing possible com- + pletions. + + RReeaaddlliinnee CCoonnddiittiioonnaall CCoonnssttrruuccttss + Readline implements a facility similar in spirit to the conditional + compilation features of the C preprocessor which allows key bindings + and variable settings to be performed as the result of tests. There + are four parser directives used. + + $$iiff The $$iiff construct allows bindings to be made based on the edit- + ing mode, the terminal being used, or the application using + readline. The text of the test, after any comparison operator, + extends to the end of the line; unless otherwise noted, no + characters are required to isolate it. + + mmooddee The mmooddee== form of the $$iiff directive is used to test + whether readline is in emacs or vi mode. This may be + used in conjunction with the sseett kkeeyymmaapp command, for in- + stance, to set bindings in the _e_m_a_c_s_-_s_t_a_n_d_a_r_d and + _e_m_a_c_s_-_c_t_l_x keymaps only if readline is starting out in + emacs mode. + + tteerrmm The tteerrmm== form may be used to include terminal-specific + key bindings, perhaps to bind the key sequences output by + the terminal's function keys. The word on the right side + of the == is tested against both the full name of the ter- + minal and the portion of the terminal name before the + first --. This allows _s_u_n to match both _s_u_n and _s_u_n_-_c_m_d, + for instance. + + vveerrssiioonn + The vveerrssiioonn test may be used to perform comparisons + against specific readline versions. The vveerrssiioonn expands + to the current readline version. The set of comparison + operators includes ==, (and ====), !!==, <<==, >>==, <<, and >>. + The version number supplied on the right side of the op- + erator consists of a major version number, an optional + decimal point, and an optional minor version (e.g., 77..11). + If the minor version is omitted, it is assumed to be 00. + The operator may be separated from the string vveerrssiioonn and + from the version number argument by whitespace. + + aapppplliiccaattiioonn + The aapppplliiccaattiioonn construct is used to include application- + specific settings. Each program using the readline li- + brary sets the _a_p_p_l_i_c_a_t_i_o_n _n_a_m_e, and an initialization + file can test for a particular value. This could be used + to bind key sequences to functions useful for a specific + program. For instance, the following command adds a key + sequence that quotes the current or previous word in + bbaasshh: + + $$iiff Bash + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + $$eennddiiff + + _v_a_r_i_a_b_l_e + The _v_a_r_i_a_b_l_e construct provides simple equality tests for + readline variables and values. The permitted comparison + operators are _=, _=_=, and _!_=. The variable name must be + separated from the comparison operator by whitespace; the + operator may be separated from the value on the right + hand side by whitespace. Both string and boolean vari- + ables may be tested. Boolean variables must be tested + against the values _o_n and _o_f_f. + + $$eennddiiff This command, as seen in the previous example, terminates an $$iiff + command. + + $$eellssee Commands in this branch of the $$iiff directive are executed if the + test fails. + + $$iinncclluuddee + This directive takes a single filename as an argument and reads + commands and bindings from that file. For example, the follow- + ing directive would read _/_e_t_c_/_i_n_p_u_t_r_c: + + $$iinncclluuddee _/_e_t_c_/_i_n_p_u_t_r_c + + SSeeaarrcchhiinngg + Readline provides commands for searching through the command history + (see HHIISSTTOORRYY below) for lines containing a specified string. There are + two search modes: _i_n_c_r_e_m_e_n_t_a_l and _n_o_n_-_i_n_c_r_e_m_e_n_t_a_l. + + Incremental searches begin before the user has finished typing the + search string. As each character of the search string is typed, read- + line displays the next entry from the history matching the string typed + so far. An incremental search requires only as many characters as + needed to find the desired history entry. The characters present in + the value of the iisseeaarrcchh--tteerrmmiinnaattoorrss variable are used to terminate an + incremental search. If that variable has not been assigned a value the + Escape and Control-J characters will terminate an incremental search. + Control-G will abort an incremental search and restore the original + line. When the search is terminated, the history entry containing the + search string becomes the current line. + + To find other matching entries in the history list, type Control-S or + Control-R as appropriate. This will search backward or forward in the + history for the next entry matching the search string typed so far. + Any other key sequence bound to a readline command will terminate the + search and execute that command. For instance, a _n_e_w_l_i_n_e will termi- + nate the search and accept the line, thereby executing the command from + the history list. + + Readline remembers the last incremental search string. If two Control- + Rs are typed without any intervening characters defining a new search + string, any remembered search string is used. + + Non-incremental searches read the entire search string before starting + to search for matching history lines. The search string may be typed + by the user or be part of the contents of the current line. + + RReeaaddlliinnee CCoommmmaanndd NNaammeess + The following is a list of the names of the commands and the default + key sequences to which they are bound. Command names without an accom- + panying key sequence are unbound by default. In the following descrip- + tions, _p_o_i_n_t refers to the current cursor position, and _m_a_r_k refers to + a cursor position saved by the sseett--mmaarrkk command. The text between the + point and mark is referred to as the _r_e_g_i_o_n. + + CCoommmmaannddss ffoorr MMoovviinngg + bbeeggiinnnniinngg--ooff--lliinnee ((CC--aa)) + Move to the start of the current line. + eenndd--ooff--lliinnee ((CC--ee)) + Move to the end of the line. + ffoorrwwaarrdd--cchhaarr ((CC--ff)) + Move forward a character. + bbaacckkwwaarrdd--cchhaarr ((CC--bb)) + Move back a character. + ffoorrwwaarrdd--wwoorrdd ((MM--ff)) + Move forward to the end of the next word. Words are composed of + alphanumeric characters (letters and digits). + bbaacckkwwaarrdd--wwoorrdd ((MM--bb)) + Move back to the start of the current or previous word. Words + are composed of alphanumeric characters (letters and digits). + sshheellll--ffoorrwwaarrdd--wwoorrdd + Move forward to the end of the next word. Words are delimited + by non-quoted shell metacharacters. + sshheellll--bbaacckkwwaarrdd--wwoorrdd + Move back to the start of the current or previous word. Words + are delimited by non-quoted shell metacharacters. + pprreevviioouuss--ssccrreeeenn--lliinnee + Attempt to move point to the same physical screen column on the + previous physical screen line. This will not have the desired + effect if the current Readline line does not take up more than + one physical line or if point is not greater than the length of + the prompt plus the screen width. + nneexxtt--ssccrreeeenn--lliinnee + Attempt to move point to the same physical screen column on the + next physical screen line. This will not have the desired effect + if the current Readline line does not take up more than one + physical line or if the length of the current Readline line is + not greater than the length of the prompt plus the screen width. + cclleeaarr--ddiissppllaayy ((MM--CC--ll)) + Clear the screen and, if possible, the terminal's scrollback + buffer, then redraw the current line, leaving the current line + at the top of the screen. + cclleeaarr--ssccrreeeenn ((CC--ll)) + Clear the screen, then redraw the current line, leaving the cur- + rent line at the top of the screen. With an argument, refresh + the current line without clearing the screen. + rreeddrraaww--ccuurrrreenntt--lliinnee + Refresh the current line. + + CCoommmmaannddss ffoorr MMaanniippuullaattiinngg tthhee HHiissttoorryy + aacccceepptt--lliinnee ((NNeewwlliinnee,, RReettuurrnn)) + Accept the line regardless of where the cursor is. If this line + is non-empty, add it to the history list according to the state + of the HHIISSTTCCOONNTTRROOLL variable. If the line is a modified history + line, then restore the history line to its original state. + pprreevviioouuss--hhiissttoorryy ((CC--pp)) + Fetch the previous command from the history list, moving back in + the list. + nneexxtt--hhiissttoorryy ((CC--nn)) + Fetch the next command from the history list, moving forward in + the list. + bbeeggiinnnniinngg--ooff--hhiissttoorryy ((MM--<<)) + Move to the first line in the history. + eenndd--ooff--hhiissttoorryy ((MM-->>)) + Move to the end of the input history, i.e., the line currently + being entered. + rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr)) + Search backward starting at the current line and moving `up' + through the history as necessary. This is an incremental + search. + ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss)) + Search forward starting at the current line and moving `down' + through the history as necessary. This is an incremental + search. + nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((MM--pp)) + Search backward through the history starting at the current line + using a non-incremental search for a string supplied by the + user. + nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((MM--nn)) + Search forward through the history using a non-incremental + search for a string supplied by the user. + hhiissttoorryy--sseeaarrcchh--ffoorrwwaarrdd + Search forward through the history for the string of characters + between the start of the current line and the point. This is a + non-incremental search. + hhiissttoorryy--sseeaarrcchh--bbaacckkwwaarrdd + Search backward through the history for the string of characters + between the start of the current line and the point. This is a + non-incremental search. + hhiissttoorryy--ssuubbssttrriinngg--sseeaarrcchh--bbaacckkwwaarrdd + Search backward through the history for the string of characters + between the start of the current line and the current cursor po- + sition (the _p_o_i_n_t). The search string may match anywhere in a + history line. This is a non-incremental search. + hhiissttoorryy--ssuubbssttrriinngg--sseeaarrcchh--ffoorrwwaarrdd + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. This is a non-in- + cremental search. + yyaannkk--nntthh--aarrgg ((MM--CC--yy)) + Insert the first argument to the previous command (usually the + second word on the previous line) at point. With an argument _n, + insert the _nth word from the previous command (the words in the + previous command begin with word 0). A negative argument in- + serts the _nth word from the end of the previous command. Once + the argument _n is computed, the argument is extracted as if the + "!_n" history expansion had been specified. + yyaannkk--llaasstt--aarrgg ((MM--..,, MM--__)) + Insert the last argument to the previous command (the last word + of the previous history entry). With a numeric argument, behave + exactly like yyaannkk--nntthh--aarrgg. Successive calls to yyaannkk--llaasstt--aarrgg + move back through the history list, inserting the last word (or + the word specified by the argument to the first call) of each + line in turn. Any numeric argument supplied to these successive + calls determines the direction to move through the history. A + negative argument switches the direction through the history + (back or forward). The history expansion facilities are used to + extract the last word, as if the "!$" history expansion had been + specified. + sshheellll--eexxppaanndd--lliinnee ((MM--CC--ee)) + Expand the line as the shell does. This performs alias and his- + tory expansion as well as all of the shell word expansions. See + HHIISSTTOORRYY EEXXPPAANNSSIIOONN below for a description of history expansion. + hhiissttoorryy--eexxppaanndd--lliinnee ((MM--^^)) + Perform history expansion on the current line. See HHIISSTTOORRYY EEXX-- + PPAANNSSIIOONN below for a description of history expansion. + mmaaggiicc--ssppaaccee + Perform history expansion on the current line and insert a + space. See HHIISSTTOORRYY EEXXPPAANNSSIIOONN below for a description of history + expansion. + aalliiaass--eexxppaanndd--lliinnee + Perform alias expansion on the current line. See AALLIIAASSEESS above + for a description of alias expansion. + hhiissttoorryy--aanndd--aalliiaass--eexxppaanndd--lliinnee + Perform history and alias expansion on the current line. + iinnsseerrtt--llaasstt--aarrgguummeenntt ((MM--..,, MM--__)) + A synonym for yyaannkk--llaasstt--aarrgg. + ooppeerraattee--aanndd--ggeett--nneexxtt ((CC--oo)) + Accept the current line for execution and fetch the next line + relative to the current line from the history for editing. A + numeric argument, if supplied, specifies the history entry to + use instead of the current line. + eeddiitt--aanndd--eexxeeccuuttee--ccoommmmaanndd ((CC--xx CC--ee)) + Invoke an editor on the current command line, and execute the + result as shell commands. BBaasshh attempts to invoke $$VVIISSUUAALL, $$EEDD-- + IITTOORR, and _e_m_a_c_s as the editor, in that order. + + CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt + _e_n_d_-_o_f_-_f_i_l_e ((uussuuaallllyy CC--dd)) + The character indicating end-of-file as set, for example, by + ``stty''. If this character is read when there are no charac- + ters on the line, and point is at the beginning of the line, + Readline interprets it as the end of input and returns EEOOFF. + ddeelleettee--cchhaarr ((CC--dd)) + Delete the character at point. If this function is bound to the + same character as the tty EEOOFF character, as CC--dd commonly is, see + above for the effects. + bbaacckkwwaarrdd--ddeelleettee--cchhaarr ((RRuubboouutt)) + Delete the character behind the cursor. When given a numeric + argument, save the deleted text on the kill ring. + ffoorrwwaarrdd--bbaacckkwwaarrdd--ddeelleettee--cchhaarr + Delete the character under the cursor, unless the cursor is at + the end of the line, in which case the character behind the cur- + sor is deleted. + qquuootteedd--iinnsseerrtt ((CC--qq,, CC--vv)) + Add the next character typed to the line verbatim. This is how + to insert characters like CC--qq, for example. + ttaabb--iinnsseerrtt ((CC--vv TTAABB)) + Insert a tab character. + sseellff--iinnsseerrtt ((aa,, bb,, AA,, 11,, !!,, ......)) + Insert the character typed. + ttrraannssppoossee--cchhaarrss ((CC--tt)) + Drag the character before point forward over the character at + point, moving point forward as well. If point is at the end of + the line, then this transposes the two characters before point. + Negative arguments have no effect. + ttrraannssppoossee--wwoorrddss ((MM--tt)) + Drag the word before point past the word after point, moving + point over that word as well. If point is at the end of the + line, this transposes the last two words on the line. + uuppccaassee--wwoorrdd ((MM--uu)) + Uppercase the current (or following) word. With a negative ar- + gument, uppercase the previous word, but do not move point. + ddoowwnnccaassee--wwoorrdd ((MM--ll)) + Lowercase the current (or following) word. With a negative ar- + gument, lowercase the previous word, but do not move point. + ccaappiittaalliizzee--wwoorrdd ((MM--cc)) + Capitalize the current (or following) word. With a negative ar- + gument, capitalize the previous word, but do not move point. + oovveerrwwrriittee--mmooddee + Toggle overwrite mode. With an explicit positive numeric argu- + ment, switches to overwrite mode. With an explicit non-positive + numeric argument, switches to insert mode. This command affects + only eemmaaccss mode; vvii mode does overwrite differently. Each call + to _r_e_a_d_l_i_n_e_(_) starts in insert mode. In overwrite mode, charac- + ters bound to sseellff--iinnsseerrtt replace the text at point rather than + pushing the text to the right. Characters bound to bbaacckk-- + wwaarrdd--ddeelleettee--cchhaarr replace the character before point with a + space. By default, this command is unbound. + + KKiilllliinngg aanndd YYaannkkiinngg + kkiillll--lliinnee ((CC--kk)) + Kill the text from point to the end of the line. + bbaacckkwwaarrdd--kkiillll--lliinnee ((CC--xx RRuubboouutt)) + Kill backward to the beginning of the line. + uunniixx--lliinnee--ddiissccaarrdd ((CC--uu)) + Kill backward from point to the beginning of the line. The + killed text is saved on the kill-ring. + kkiillll--wwhhoollee--lliinnee + Kill all characters on the current line, no matter where point + is. + kkiillll--wwoorrdd ((MM--dd)) + Kill from point to the end of the current word, or if between + words, to the end of the next word. Word boundaries are the + same as those used by ffoorrwwaarrdd--wwoorrdd. + bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt)) + Kill the word behind point. Word boundaries are the same as + those used by bbaacckkwwaarrdd--wwoorrdd. + sshheellll--kkiillll--wwoorrdd + Kill from point to the end of the current word, or if between + words, to the end of the next word. Word boundaries are the + same as those used by sshheellll--ffoorrwwaarrdd--wwoorrdd. + sshheellll--bbaacckkwwaarrdd--kkiillll--wwoorrdd + Kill the word behind point. Word boundaries are the same as + those used by sshheellll--bbaacckkwwaarrdd--wwoorrdd. + uunniixx--wwoorrdd--rruubboouutt ((CC--ww)) + Kill the word behind point, using white space as a word bound- + ary. The killed text is saved on the kill-ring. + uunniixx--ffiilleennaammee--rruubboouutt + Kill the word behind point, using white space and the slash + character as the word boundaries. The killed text is saved on + the kill-ring. + ddeelleettee--hhoorriizzoonnttaall--ssppaaccee ((MM--\\)) + Delete all spaces and tabs around point. + kkiillll--rreeggiioonn + Kill the text in the current region. + ccooppyy--rreeggiioonn--aass--kkiillll + Copy the text in the region to the kill buffer. + ccooppyy--bbaacckkwwaarrdd--wwoorrdd + Copy the word before point to the kill buffer. The word bound- + aries are the same as bbaacckkwwaarrdd--wwoorrdd. + ccooppyy--ffoorrwwaarrdd--wwoorrdd + Copy the word following point to the kill buffer. The word + boundaries are the same as ffoorrwwaarrdd--wwoorrdd. + yyaannkk ((CC--yy)) + Yank the top of the kill ring into the buffer at point. + yyaannkk--ppoopp ((MM--yy)) + Rotate the kill ring, and yank the new top. Only works follow- + ing yyaannkk or yyaannkk--ppoopp. + + NNuummeerriicc AArrgguummeennttss + ddiiggiitt--aarrgguummeenntt ((MM--00,, MM--11,, ......,, MM----)) + Add this digit to the argument already accumulating, or start a + new argument. M-- starts a negative argument. + uunniivveerrssaall--aarrgguummeenntt + This is another way to specify an argument. If this command is + followed by one or more digits, optionally with a leading minus + sign, those digits define the argument. If the command is fol- + lowed by digits, executing uunniivveerrssaall--aarrgguummeenntt again ends the nu- + meric argument, but is otherwise ignored. As a special case, if + this command is immediately followed by a character that is nei- + ther a digit nor minus sign, the argument count for the next + command is multiplied by four. The argument count is initially + one, so executing this function the first time makes the argu- + ment count four, a second time makes the argument count sixteen, + and so on. + + CCoommpplleettiinngg + ccoommpplleettee ((TTAABB)) + Attempt to perform completion on the text before point. BBaasshh + attempts completion treating the text as a variable (if the text + begins with $$), username (if the text begins with ~~), hostname + (if the text begins with @@), or command (including aliases and + functions) in turn. If none of these produces a match, filename + completion is attempted. + ppoossssiibbllee--ccoommpplleettiioonnss ((MM--??)) + List the possible completions of the text before point. + iinnsseerrtt--ccoommpplleettiioonnss ((MM--**)) + Insert all completions of the text before point that would have + been generated by ppoossssiibbllee--ccoommpplleettiioonnss. + mmeennuu--ccoommpplleettee + Similar to ccoommpplleettee, but replaces the word to be completed with + a single match from the list of possible completions. Repeated + execution of mmeennuu--ccoommpplleettee steps through the list of possible + completions, inserting each match in turn. At the end of the + list of completions, the bell is rung (subject to the setting of + bbeellll--ssttyyllee) and the original text is restored. An argument of _n + moves _n positions forward in the list of matches; a negative ar- + gument may be used to move backward through the list. This com- + mand is intended to be bound to TTAABB, but is unbound by default. + mmeennuu--ccoommpplleettee--bbaacckkwwaarrdd + Identical to mmeennuu--ccoommpplleettee, but moves backward through the list + of possible completions, as if mmeennuu--ccoommpplleettee had been given a + negative argument. This command is unbound by default. + ddeelleettee--cchhaarr--oorr--lliisstt + Deletes the character under the cursor if not at the beginning + or end of the line (like ddeelleettee--cchhaarr). If at the end of the + line, behaves identically to ppoossssiibbllee--ccoommpplleettiioonnss. This command + is unbound by default. + ccoommpplleettee--ffiilleennaammee ((MM--//)) + Attempt filename completion on the text before point. + ppoossssiibbllee--ffiilleennaammee--ccoommpplleettiioonnss ((CC--xx //)) + List the possible completions of the text before point, treating + it as a filename. + ccoommpplleettee--uusseerrnnaammee ((MM--~~)) + Attempt completion on the text before point, treating it as a + username. + ppoossssiibbllee--uusseerrnnaammee--ccoommpplleettiioonnss ((CC--xx ~~)) + List the possible completions of the text before point, treating + it as a username. + ccoommpplleettee--vvaarriiaabbllee ((MM--$$)) + Attempt completion on the text before point, treating it as a + shell variable. + ppoossssiibbllee--vvaarriiaabbllee--ccoommpplleettiioonnss ((CC--xx $$)) + List the possible completions of the text before point, treating + it as a shell variable. + ccoommpplleettee--hhoossttnnaammee ((MM--@@)) + Attempt completion on the text before point, treating it as a + hostname. + ppoossssiibbllee--hhoossttnnaammee--ccoommpplleettiioonnss ((CC--xx @@)) + List the possible completions of the text before point, treating + it as a hostname. + ccoommpplleettee--ccoommmmaanndd ((MM--!!)) + Attempt completion on the text before point, treating it as a + command name. Command completion attempts to match the text + against aliases, reserved words, shell functions, shell + builtins, and finally executable filenames, in that order. + ppoossssiibbllee--ccoommmmaanndd--ccoommpplleettiioonnss ((CC--xx !!)) + List the possible completions of the text before point, treating + it as a command name. + ddyynnaammiicc--ccoommpplleettee--hhiissttoorryy ((MM--TTAABB)) + Attempt completion on the text before point, comparing the text + against lines from the history list for possible completion + matches. + ddaabbbbrreevv--eexxppaanndd + Attempt menu completion on the text before point, comparing the + text against lines from the history list for possible completion + matches. + ccoommpplleettee--iinnttoo--bbrraacceess ((MM--{{)) + Perform filename completion and insert the list of possible com- + pletions enclosed within braces so the list is available to the + shell (see BBrraaccee EExxppaannssiioonn above). + + KKeeyybbooaarrdd MMaaccrrooss + ssttaarrtt--kkbbdd--mmaaccrroo ((CC--xx (()) + Begin saving the characters typed into the current keyboard + macro. + eenndd--kkbbdd--mmaaccrroo ((CC--xx )))) + Stop saving the characters typed into the current keyboard macro + and store the definition. + ccaallll--llaasstt--kkbbdd--mmaaccrroo ((CC--xx ee)) + Re-execute the last keyboard macro defined, by making the char- + acters in the macro appear as if typed at the keyboard. + pprriinntt--llaasstt--kkbbdd--mmaaccrroo (()) + Print the last keyboard macro defined in a format suitable for + the _i_n_p_u_t_r_c file. + + MMiisscceellllaanneeoouuss + rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr)) + Read in the contents of the _i_n_p_u_t_r_c file, and incorporate any + bindings or variable assignments found there. + aabboorrtt ((CC--gg)) + Abort the current editing command and ring the terminal's bell + (subject to the setting of bbeellll--ssttyyllee). + ddoo--lloowweerrccaassee--vveerrssiioonn ((MM--AA,, MM--BB,, MM--_x,, ......)) + If the metafied character _x is uppercase, run the command that + is bound to the corresponding metafied lowercase character. The + behavior is undefined if _x is already lowercase. + pprreeffiixx--mmeettaa ((EESSCC)) + Metafy the next character typed. EESSCC ff is equivalent to MMeettaa--ff. + uunnddoo ((CC--__,, CC--xx CC--uu)) + Incremental undo, separately remembered for each line. + rreevveerrtt--lliinnee ((MM--rr)) + Undo all changes made to this line. This is like executing the + uunnddoo command enough times to return the line to its initial + state. + ttiillddee--eexxppaanndd ((MM--&&)) + Perform tilde expansion on the current word. + sseett--mmaarrkk ((CC--@@,, MM--<>)) + Set the mark to the point. If a numeric argument is supplied, + the mark is set to that position. + eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx)) + Swap the point with the mark. The current cursor position is + set to the saved position, and the old cursor position is saved + as the mark. + cchhaarraacctteerr--sseeaarrcchh ((CC--]])) + A character is read and point is moved to the next occurrence of + that character. A negative count searches for previous occur- + rences. + cchhaarraacctteerr--sseeaarrcchh--bbaacckkwwaarrdd ((MM--CC--]])) + A character is read and point is moved to the previous occur- + rence of that character. A negative count searches for subse- + quent occurrences. + sskkiipp--ccssii--sseeqquueennccee + Read enough characters to consume a multi-key sequence such as + those defined for keys like Home and End. Such sequences begin + with a Control Sequence Indicator (CSI), usually ESC-[. If this + sequence is bound to "\[", keys producing such sequences will + have no effect unless explicitly bound to a readline command, + instead of inserting stray characters into the editing buffer. + This is unbound by default, but usually bound to ESC-[. + iinnsseerrtt--ccoommmmeenntt ((MM--##)) + Without a numeric argument, the value of the readline ccoomm-- + mmeenntt--bbeeggiinn variable is inserted at the beginning of the current + line. If a numeric argument is supplied, this command acts as a + toggle: if the characters at the beginning of the line do not + match the value of ccoommmmeenntt--bbeeggiinn, the value is inserted, other- + wise the characters in ccoommmmeenntt--bbeeggiinn are deleted from the begin- + ning of the line. In either case, the line is accepted as if a + newline had been typed. The default value of ccoommmmeenntt--bbeeggiinn + causes this command to make the current line a shell comment. + If a numeric argument causes the comment character to be re- + moved, the line will be executed by the shell. + gglloobb--ccoommpplleettee--wwoorrdd ((MM--gg)) + The word before point is treated as a pattern for pathname ex- + pansion, with an asterisk implicitly appended. This pattern is + used to generate a list of matching filenames for possible com- + pletions. + gglloobb--eexxppaanndd--wwoorrdd ((CC--xx **)) + The word before point is treated as a pattern for pathname ex- + pansion, and the list of matching filenames is inserted, replac- + ing the word. If a numeric argument is supplied, an asterisk is + appended before pathname expansion. + gglloobb--lliisstt--eexxppaannssiioonnss ((CC--xx gg)) + The list of expansions that would have been generated by + gglloobb--eexxppaanndd--wwoorrdd is displayed, and the line is redrawn. If a + numeric argument is supplied, an asterisk is appended before + pathname expansion. + dduummpp--ffuunnccttiioonnss + Print all of the functions and their key bindings to the read- + line output stream. If a numeric argument is supplied, the out- + put is formatted in such a way that it can be made part of an + _i_n_p_u_t_r_c file. + dduummpp--vvaarriiaabblleess + Print all of the settable readline variables and their values to + the readline output stream. If a numeric argument is supplied, + the output is formatted in such a way that it can be made part + of an _i_n_p_u_t_r_c file. + dduummpp--mmaaccrrooss + Print all of the readline key sequences bound to macros and the + strings they output. If a numeric argument is supplied, the + output is formatted in such a way that it can be made part of an + _i_n_p_u_t_r_c file. + ddiissppllaayy--sshheellll--vveerrssiioonn ((CC--xx CC--vv)) + Display version information about the current instance of bbaasshh. + + PPrrooggrraammmmaabbllee CCoommpplleettiioonn + When word completion is attempted for an argument to a command for + which a completion specification (a _c_o_m_p_s_p_e_c) has been defined using + the ccoommpplleettee builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below), the program- + mable completion facilities are invoked. + + First, the command name is identified. If the command word is the + empty string (completion attempted at the beginning of an empty line), + any compspec defined with the --EE option to ccoommpplleettee is used. If a + compspec has been defined for that command, the compspec is used to + generate the list of possible completions for the word. If the command + word is a full pathname, a compspec for the full pathname is searched + for first. If no compspec is found for the full pathname, an attempt + is made to find a compspec for the portion following the final slash. + If those searches do not result in a compspec, any compspec defined + with the --DD option to ccoommpplleettee is used as the default. If there is no + default compspec, bbaasshh attempts alias expansion on the command word as + a final resort, and attempts to find a compspec for the command word + from any successful expansion. + + Once a compspec has been found, it is used to generate the list of + matching words. If a compspec is not found, the default bbaasshh comple- + tion as described above under CCoommpplleettiinngg is performed. + + First, the actions specified by the compspec are used. Only matches + which are prefixed by the word being completed are returned. When the + --ff or --dd option is used for filename or directory name completion, the + shell variable FFIIGGNNOORREE is used to filter the matches. + + Any completions specified by a pathname expansion pattern to the --GG op- + tion are generated next. The words generated by the pattern need not + match the word being completed. The GGLLOOBBIIGGNNOORREE shell variable is not + used to filter the matches, but the FFIIGGNNOORREE variable is used. + + Next, the string specified as the argument to the --WW option is consid- + ered. The string is first split using the characters in the IIFFSS spe- + cial variable as delimiters. Shell quoting is honored. Each word is + then expanded using brace expansion, tilde expansion, parameter and + variable expansion, command substitution, and arithmetic expansion, as + described above under EEXXPPAANNSSIIOONN. The results are split using the rules + described above under WWoorrdd SSpplliittttiinngg. The results of the expansion are + prefix-matched against the word being completed, and the matching words + become the possible completions. + + After these matches have been generated, any shell function or command + specified with the --FF and --CC options is invoked. When the command or + function is invoked, the CCOOMMPP__LLIINNEE, CCOOMMPP__PPOOIINNTT, CCOOMMPP__KKEEYY, and CCOOMMPP__TTYYPPEE + variables are assigned values as described above under SShheellll VVaarriiaabblleess. + If a shell function is being invoked, the CCOOMMPP__WWOORRDDSS and CCOOMMPP__CCWWOORRDD + variables are also set. When the function or command is invoked, the + first argument ($$11) is the name of the command whose arguments are be- + ing completed, the second argument ($$22) is the word being completed, + and the third argument ($$33) is the word preceding the word being com- + pleted on the current command line. No filtering of the generated com- + pletions against the word being completed is performed; the function or + command has complete freedom in generating the matches. + + Any function specified with --FF is invoked first. The function may use + any of the shell facilities, including the ccoommppggeenn builtin described + below, to generate the matches. It must put the possible completions + in the CCOOMMPPRREEPPLLYY array variable, one per array element. + + Next, any command specified with the --CC option is invoked in an envi- + ronment equivalent to command substitution. It should print a list of + completions, one per line, to the standard output. Backslash may be + used to escape a newline, if necessary. + + After all of the possible completions are generated, any filter speci- + fied with the --XX option is applied to the list. The filter is a pat- + tern as used for pathname expansion; a && in the pattern is replaced + with the text of the word being completed. A literal && may be escaped + with a backslash; the backslash is removed before attempting a match. + Any completion that matches the pattern will be removed from the list. + A leading !! negates the pattern; in this case any completion not match- + ing the pattern will be removed. If the nnooccaasseemmaattcchh shell option is + enabled, the match is performed without regard to the case of alpha- + betic characters. + + Finally, any prefix and suffix specified with the --PP and --SS options are + added to each member of the completion list, and the result is returned + to the readline completion code as the list of possible completions. + + If the previously-applied actions do not generate any matches, and the + --oo ddiirrnnaammeess option was supplied to ccoommpplleettee when the compspec was de- + fined, directory name completion is attempted. + + If the --oo pplluussddiirrss option was supplied to ccoommpplleettee when the compspec + was defined, directory name completion is attempted and any matches are + added to the results of the other actions. + + By default, if a compspec is found, whatever it generates is returned + to the completion code as the full set of possible completions. The + default bbaasshh completions are not attempted, and the readline default of + filename completion is disabled. If the --oo bbaasshhddeeffaauulltt option was sup- + plied to ccoommpplleettee when the compspec was defined, the bbaasshh default com- + pletions are attempted if the compspec generates no matches. If the --oo + ddeeffaauulltt option was supplied to ccoommpplleettee when the compspec was defined, + readline's default completion will be performed if the compspec (and, + if attempted, the default bbaasshh completions) generate no matches. + + When a compspec indicates that directory name completion is desired, + the programmable completion functions force readline to append a slash + to completed names which are symbolic links to directories, subject to + the value of the mmaarrkk--ddiirreeccttoorriieess readline variable, regardless of the + setting of the mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess readline variable. + + There is some support for dynamically modifying completions. This is + most useful when used in combination with a default completion speci- + fied with ccoommpplleettee --DD. It's possible for shell functions executed as + completion handlers to indicate that completion should be retried by + returning an exit status of 124. If a shell function returns 124, and + changes the compspec associated with the command on which completion is + being attempted (supplied as the first argument when the function is + executed), programmable completion restarts from the beginning, with an + attempt to find a new compspec for that command. This allows a set of + completions to be built dynamically as completion is attempted, rather + than being loaded all at once. + + For instance, assuming that there is a library of compspecs, each kept + in a file corresponding to the name of the command, the following de- + fault completion function would load completions dynamically: + + _completion_loader() + { + . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 + } + complete -D -F _completion_loader -o bashdefault -o default + + +HHIISSTTOORRYY + When the --oo hhiissttoorryy option to the sseett builtin is enabled, the shell + provides access to the _c_o_m_m_a_n_d _h_i_s_t_o_r_y, the list of commands previously + typed. The value of the HHIISSTTSSIIZZEE variable is used as the number of + commands to save in a history list. The text of the last HHIISSTTSSIIZZEE com- + mands (default 500) is saved. The shell stores each command in the + history list prior to parameter and variable expansion (see EEXXPPAANNSSIIOONN + above) but after history expansion is performed, subject to the values + of the shell variables HHIISSTTIIGGNNOORREE and HHIISSTTCCOONNTTRROOLL. + + On startup, the history is initialized from the file named by the vari- + able HHIISSTTFFIILLEE (default _~_/_._b_a_s_h___h_i_s_t_o_r_y). The file named by the value + of HHIISSTTFFIILLEE is truncated, if necessary, to contain no more than the + number of lines specified by the value of HHIISSTTFFIILLEESSIIZZEE. If HHIISSTTFFIILLEE-- + SSIIZZEE is unset, or set to null, a non-numeric value, or a numeric value + less than zero, the history file is not truncated. When the history + file is read, lines beginning with the history comment character fol- + lowed immediately by a digit are interpreted as timestamps for the fol- + lowing history line. These timestamps are optionally displayed depend- + ing on the value of the HHIISSTTTTIIMMEEFFOORRMMAATT variable. When a shell with + history enabled exits, the last $$HHIISSTTSSIIZZEE lines are copied from the + history list to $$HHIISSTTFFIILLEE. If the hhiissttaappppeenndd shell option is enabled + (see the description of sshhoopptt under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below), the + lines are appended to the history file, otherwise the history file is + overwritten. If HHIISSTTFFIILLEE is unset, or if the history file is un- + writable, the history is not saved. If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is + set, time stamps are written to the history file, marked with the his- + tory comment character, so they may be preserved across shell sessions. + This uses the history comment character to distinguish timestamps from + other history lines. After saving the history, the history file is + truncated to contain no more than HHIISSTTFFIILLEESSIIZZEE lines. If HHIISSTTFFIILLEESSIIZZEE + is unset, or set to null, a non-numeric value, or a numeric value less + than zero, the history file is not truncated. + + The builtin command ffcc (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below) may be used + to list or edit and re-execute a portion of the history list. The hhiiss-- + ttoorryy builtin may be used to display or modify the history list and ma- + nipulate the history file. When using command-line editing, search + commands are available in each editing mode that provide access to the + history list. + + The shell allows control over which commands are saved on the history + list. The HHIISSTTCCOONNTTRROOLL and HHIISSTTIIGGNNOORREE variables may be set to cause the + shell to save only a subset of the commands entered. The ccmmddhhiisstt shell + option, if enabled, causes the shell to attempt to save each line of a + multi-line command in the same history entry, adding semicolons where + necessary to preserve syntactic correctness. The lliitthhiisstt shell option + causes the shell to save the command with embedded newlines instead of + semicolons. See the description of the sshhoopptt builtin below under SSHHEELLLL + BBUUIILLTTIINN CCOOMMMMAANNDDSS for information on setting and unsetting shell op- + tions. + +HHIISSTTOORRYY EEXXPPAANNSSIIOONN + The shell supports a history expansion feature that is similar to the + history expansion in ccsshh. This section describes what syntax features + are available. This feature is enabled by default for interactive + shells, and can be disabled using the ++HH option to the sseett builtin com- + mand (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). Non-interactive shells do not + perform history expansion by default. + + History expansions introduce words from the history list into the input + stream, making it easy to repeat commands, insert the arguments to a + previous command into the current input line, or fix errors in previous + commands quickly. + + History expansion is performed immediately after a complete line is + read, before the shell breaks it into words, and is performed on each + line individually without taking quoting on previous lines into ac- + count. It takes place in two parts. The first is to determine which + line from the history list to use during substitution. The second is + to select portions of that line for inclusion into the current one. + The line selected from the history is the _e_v_e_n_t, and the portions of + that line that are acted upon are _w_o_r_d_s. Various _m_o_d_i_f_i_e_r_s are avail- + able to manipulate the selected words. The line is broken into words + in the same fashion as when reading input, so that several _m_e_t_a_c_h_a_r_a_c_- + _t_e_r-separated words surrounded by quotes are considered one word. His- + tory expansions are introduced by the appearance of the history expan- + sion character, which is !! by default. Only backslash (\\) and single + quotes can quote the history expansion character, but the history ex- + pansion character is also treated as quoted if it immediately precedes + the closing double quote in a double-quoted string. + + Several characters inhibit history expansion if found immediately fol- + lowing the history expansion character, even if it is unquoted: space, + tab, newline, carriage return, and ==. If the eexxttgglloobb shell option is + enabled, (( will also inhibit expansion. + + Several shell options settable with the sshhoopptt builtin may be used to + tailor the behavior of history expansion. If the hhiissttvveerriiffyy shell op- + tion is enabled (see the description of the sshhoopptt builtin below), and + rreeaaddlliinnee is being used, history substitutions are not immediately + passed to the shell parser. Instead, the expanded line is reloaded + into the rreeaaddlliinnee editing buffer for further modification. If rreeaaddlliinnee + is being used, and the hhiissttrreeeeddiitt shell option is enabled, a failed + history substitution will be reloaded into the rreeaaddlliinnee editing buffer + for correction. The --pp option to the hhiissttoorryy builtin command may be + used to see what a history expansion will do before using it. The --ss + option to the hhiissttoorryy builtin may be used to add commands to the end of + the history list without actually executing them, so that they are + available for subsequent recall. + + The shell allows control of the various characters used by the history + expansion mechanism (see the description of hhiissttcchhaarrss above under SShheellll + VVaarriiaabblleess). The shell uses the history comment character to mark his- + tory timestamps when writing the history file. + + EEvveenntt DDeessiiggnnaattoorrss + An event designator is a reference to a command line entry in the his- + tory list. Unless the reference is absolute, events are relative to + the current position in the history list. + + !! Start a history substitution, except when followed by a bbllaannkk, + newline, carriage return, = or ( (when the eexxttgglloobb shell option + is enabled using the sshhoopptt builtin). + !!_n Refer to command line _n. + !!--_n Refer to the current command minus _n. + !!!! Refer to the previous command. This is a synonym for `!-1'. + !!_s_t_r_i_n_g + Refer to the most recent command preceding the current position + in the history list starting with _s_t_r_i_n_g. + !!??_s_t_r_i_n_g[[??]] + Refer to the most recent command preceding the current position + in the history list containing _s_t_r_i_n_g. The trailing ?? may be + omitted if _s_t_r_i_n_g is followed immediately by a newline. If + _s_t_r_i_n_g is missing, the string from the most recent search is + used; it is an error if there is no previous search string. + ^^_s_t_r_i_n_g_1^^_s_t_r_i_n_g_2^^ + Quick substitution. Repeat the previous command, replacing + _s_t_r_i_n_g_1 with _s_t_r_i_n_g_2. Equivalent to ``!!:s^_s_t_r_i_n_g_1^_s_t_r_i_n_g_2^'' + (see MMooddiiffiieerrss below). + !!## The entire command line typed so far. + + WWoorrdd DDeessiiggnnaattoorrss + Word designators are used to select desired words from the event. A :: + separates the event specification from the word designator. It may be + omitted if the word designator begins with a ^^, $$, **, --, or %%. Words + are numbered from the beginning of the line, with the first word being + denoted by 0 (zero). Words are inserted into the current line sepa- + rated by single spaces. + + 00 ((zzeerroo)) + The zeroth word. For the shell, this is the command word. + _n The _nth word. + ^^ The first argument. That is, word 1. + $$ The last word. This is usually the last argument, but will ex- + pand to the zeroth word if there is only one word in the line. + %% The first word matched by the most recent `?_s_t_r_i_n_g?' search, if + the search string begins with a character that is part of a + word. + _x--_y A range of words; `-_y' abbreviates `0-_y'. + ** All of the words but the zeroth. This is a synonym for `_1_-_$'. + It is not an error to use ** if there is just one word in the + event; the empty string is returned in that case. + xx** Abbreviates _x_-_$. + xx-- Abbreviates _x_-_$ like xx**, but omits the last word. If xx is miss- + ing, it defaults to 0. + + If a word designator is supplied without an event specification, the + previous command is used as the event. + + MMooddiiffiieerrss + After the optional word designator, there may appear a sequence of one + or more of the following modifiers, each preceded by a `:'. These mod- + ify, or edit, the word or words selected from the history event. + + hh Remove a trailing filename component, leaving only the head. + tt Remove all leading filename components, leaving the tail. + rr Remove a trailing suffix of the form _._x_x_x, leaving the basename. + ee Remove all but the trailing suffix. + pp Print the new command but do not execute it. + qq Quote the substituted words, escaping further substitutions. + xx Quote the substituted words as with qq, but break into words at + bbllaannkkss and newlines. The qq and xx modifiers are mutually exclu- + sive; the last one supplied is used. + ss//_o_l_d//_n_e_w// + Substitute _n_e_w for the first occurrence of _o_l_d in the event + line. Any character may be used as the delimiter in place of /. + The final delimiter is optional if it is the last character of + the event line. The delimiter may be quoted in _o_l_d and _n_e_w with + a single backslash. If & appears in _n_e_w, it is replaced by _o_l_d. + A single backslash will quote the &. If _o_l_d is null, it is set + to the last _o_l_d substituted, or, if no previous history substi- + tutions took place, the last _s_t_r_i_n_g in a !!??_s_t_r_i_n_g[[??]] search. + If _n_e_w is null, each matching _o_l_d is deleted. + && Repeat the previous substitution. + gg Cause changes to be applied over the entire event line. This is + used in conjunction with `::ss' (e.g., `::ggss//_o_l_d//_n_e_w//') or `::&&'. + If used with `::ss', any delimiter can be used in place of /, and + the final delimiter is optional if it is the last character of + the event line. An aa may be used as a synonym for gg. + GG Apply the following `ss' or `&&' modifier once to each word in the + event line. + +SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS + Unless otherwise noted, each builtin command documented in this section + as accepting options preceded by -- accepts ---- to signify the end of the + options. The ::, ttrruuee, ffaallssee, and tteesstt/[[ builtins do not accept options + and do not treat ---- specially. The eexxiitt, llooggoouutt, rreettuurrnn, bbrreeaakk, ccoonn-- + ttiinnuuee, lleett, and sshhiifftt builtins accept and process arguments beginning + with -- without requiring ----. Other builtins that accept arguments but + are not specified as accepting options interpret arguments beginning + with -- as invalid options and require ---- to prevent this interpreta- + tion. + :: [_a_r_g_u_m_e_n_t_s] + No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s + and performing any specified redirections. The return status is + zero. + + .. _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s] + ssoouurrccee _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s] + Read and execute commands from _f_i_l_e_n_a_m_e in the current shell en- + vironment and return the exit status of the last command exe- + cuted from _f_i_l_e_n_a_m_e. If _f_i_l_e_n_a_m_e does not contain a slash, + filenames in PPAATTHH are used to find the directory containing + _f_i_l_e_n_a_m_e. The file searched for in PPAATTHH need not be executable. + When bbaasshh is not in _p_o_s_i_x _m_o_d_e, the current directory is + searched if no file is found in PPAATTHH. If the ssoouurrcceeppaatthh option + to the sshhoopptt builtin command is turned off, the PPAATTHH is not + searched. If any _a_r_g_u_m_e_n_t_s are supplied, they become the posi- + tional parameters when _f_i_l_e_n_a_m_e is executed. Otherwise the po- + sitional parameters are unchanged. If the --TT option is enabled, + ssoouurrccee inherits any trap on DDEEBBUUGG; if it is not, any DDEEBBUUGG trap + string is saved and restored around the call to ssoouurrccee, and + ssoouurrccee unsets the DDEEBBUUGG trap while it executes. If --TT is not + set, and the sourced file changes the DDEEBBUUGG trap, the new value + is retained when ssoouurrccee completes. The return status is the + status of the last command exited within the script (0 if no + commands are executed), and false if _f_i_l_e_n_a_m_e is not found or + cannot be read. + + aalliiaass [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] + AAlliiaass with no arguments or with the --pp option prints the list of + aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When + arguments are supplied, an alias is defined for each _n_a_m_e whose + _v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word + to be checked for alias substitution when the alias is expanded. + For each _n_a_m_e in the argument list for which no _v_a_l_u_e is sup- + plied, the name and value of the alias is printed. AAlliiaass re- + turns true unless a _n_a_m_e is given for which no alias has been + defined. + + bbgg [_j_o_b_s_p_e_c ...] + Resume each suspended job _j_o_b_s_p_e_c in the background, as if it + had been started with &&. If _j_o_b_s_p_e_c is not present, the shell's + notion of the _c_u_r_r_e_n_t _j_o_b is used. bbgg _j_o_b_s_p_e_c returns 0 unless + run when job control is disabled or, when run with job control + enabled, any specified _j_o_b_s_p_e_c was not found or was started + without job control. + + bbiinndd [--mm _k_e_y_m_a_p] [--llppssvvPPSSVVXX] + bbiinndd [--mm _k_e_y_m_a_p] [--qq _f_u_n_c_t_i_o_n] [--uu _f_u_n_c_t_i_o_n] [--rr _k_e_y_s_e_q] + bbiinndd [--mm _k_e_y_m_a_p] --ff _f_i_l_e_n_a_m_e + bbiinndd [--mm _k_e_y_m_a_p] --xx _k_e_y_s_e_q:_s_h_e_l_l_-_c_o_m_m_a_n_d + bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_f_u_n_c_t_i_o_n_-_n_a_m_e + bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d + Display current rreeaaddlliinnee key and function bindings, bind a key + sequence to a rreeaaddlliinnee function or macro, or set a rreeaaddlliinnee + variable. Each non-option argument is a command as it would ap- + pear in _._i_n_p_u_t_r_c, but each binding or command must be passed as + a separate argument; e.g., '"\C-x\C-r": re-read-init-file'. Op- + tions, if supplied, have the following meanings: + --mm _k_e_y_m_a_p + Use _k_e_y_m_a_p as the keymap to be affected by the subsequent + bindings. Acceptable _k_e_y_m_a_p names are _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_- + _d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d, + and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d (_v_i_-_m_o_v_e + is also a synonym); _e_m_a_c_s is equivalent to _e_m_a_c_s_-_s_t_a_n_- + _d_a_r_d. + --ll List the names of all rreeaaddlliinnee functions. + --pp Display rreeaaddlliinnee function names and bindings in such a + way that they can be re-read. + --PP List current rreeaaddlliinnee function names and bindings. + --ss Display rreeaaddlliinnee key sequences bound to macros and the + strings they output in such a way that they can be re- + read. + --SS Display rreeaaddlliinnee key sequences bound to macros and the + strings they output. + --vv Display rreeaaddlliinnee variable names and values in such a way + that they can be re-read. + --VV List current rreeaaddlliinnee variable names and values. + --ff _f_i_l_e_n_a_m_e + Read key bindings from _f_i_l_e_n_a_m_e. + --qq _f_u_n_c_t_i_o_n + Query about which keys invoke the named _f_u_n_c_t_i_o_n. + --uu _f_u_n_c_t_i_o_n + Unbind all keys bound to the named _f_u_n_c_t_i_o_n. + --rr _k_e_y_s_e_q + Remove any current binding for _k_e_y_s_e_q. + --xx _k_e_y_s_e_q::_s_h_e_l_l_-_c_o_m_m_a_n_d + Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is en- + tered. When _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets + the RREEAADDLLIINNEE__LLIINNEE variable to the contents of the rreeaadd-- + lliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT and RREEAADDLLIINNEE__MMAARRKK + variables to the current location of the insertion point + and the saved insertion point (the mark), respectively. + If the executed command changes the value of any of RREEAADD-- + LLIINNEE__LLIINNEE, RREEAADDLLIINNEE__PPOOIINNTT, or RREEAADDLLIINNEE__MMAARRKK, those new + values will be reflected in the editing state. + --XX List all key sequences bound to shell commands and the + associated commands in a format that can be reused as in- + put. + + The return value is 0 unless an unrecognized option is given or + an error occurred. + + bbrreeaakk [_n] + Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is + specified, break _n levels. _n must be >= 1. If _n is greater + than the number of enclosing loops, all enclosing loops are ex- + ited. The return value is 0 unless _n is not greater than or + equal to 1. + + bbuuiillttiinn _s_h_e_l_l_-_b_u_i_l_t_i_n [_a_r_g_u_m_e_n_t_s] + Execute the specified shell builtin, passing it _a_r_g_u_m_e_n_t_s, and + return its exit status. This is useful when defining a function + whose name is the same as a shell builtin, retaining the func- + tionality of the builtin within the function. The ccdd builtin is + commonly redefined this way. The return status is false if + _s_h_e_l_l_-_b_u_i_l_t_i_n is not a shell builtin command. + + ccaalllleerr [_e_x_p_r] + Returns the context of any active subroutine call (a shell func- + tion or a script executed with the .. or ssoouurrccee builtins). With- + out _e_x_p_r, ccaalllleerr displays the line number and source filename of + the current subroutine call. If a non-negative integer is sup- + plied as _e_x_p_r, ccaalllleerr displays the line number, subroutine name, + and source file corresponding to that position in the current + execution call stack. This extra information may be used, for + example, to print a stack trace. The current frame is frame 0. + The return value is 0 unless the shell is not executing a sub- + routine call or _e_x_p_r does not correspond to a valid position in + the call stack. + + ccdd [--LL|[--PP [--ee]] [-@]] [_d_i_r] + Change the current directory to _d_i_r. if _d_i_r is not supplied, + the value of the HHOOMMEE shell variable is the default. Any addi- + tional arguments following _d_i_r are ignored. The variable CCDDPPAATTHH + defines the search path for the directory containing _d_i_r: each + directory name in CCDDPPAATTHH is searched for _d_i_r. Alternative di- + rectory names in CCDDPPAATTHH are separated by a colon (:). A null + directory name in CCDDPPAATTHH is the same as the current directory, + i.e., ``..''. If _d_i_r begins with a slash (/), then CCDDPPAATTHH is not + used. The --PP option causes ccdd to use the physical directory + structure by resolving symbolic links while traversing _d_i_r and + before processing instances of _._. in _d_i_r (see also the --PP option + to the sseett builtin command); the --LL option forces symbolic links + to be followed by resolving the link after processing instances + of _._. in _d_i_r. If _._. appears in _d_i_r, it is processed by removing + the immediately previous pathname component from _d_i_r, back to a + slash or the beginning of _d_i_r. If the --ee option is supplied + with --PP, and the current working directory cannot be success- + fully determined after a successful directory change, ccdd will + return an unsuccessful status. On systems that support it, the + --@@ option presents the extended attributes associated with a + file as a directory. An argument of -- is converted to $$OOLLDDPPWWDD + before the directory change is attempted. If a non-empty direc- + tory name from CCDDPPAATTHH is used, or if -- is the first argument, + and the directory change is successful, the absolute pathname of + the new working directory is written to the standard output. + The return value is true if the directory was successfully + changed; false otherwise. + + ccoommmmaanndd [--ppVVvv] _c_o_m_m_a_n_d [_a_r_g ...] + Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function + lookup. Only builtin commands or commands found in the PPAATTHH are + executed. If the --pp option is given, the search for _c_o_m_m_a_n_d is + performed using a default value for PPAATTHH that is guaranteed to + find all of the standard utilities. If either the --VV or --vv op- + tion is supplied, a description of _c_o_m_m_a_n_d is printed. The --vv + option causes a single word indicating the command or filename + used to invoke _c_o_m_m_a_n_d to be displayed; the --VV option produces a + more verbose description. If the --VV or --vv option is supplied, + the exit status is 0 if _c_o_m_m_a_n_d was found, and 1 if not. If + neither option is supplied and an error occurred or _c_o_m_m_a_n_d can- + not be found, the exit status is 127. Otherwise, the exit sta- + tus of the ccoommmmaanndd builtin is the exit status of _c_o_m_m_a_n_d. + + ccoommppggeenn [_o_p_t_i_o_n] [_w_o_r_d] + Generate possible completion matches for _w_o_r_d according to the + _o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee + builtin with the exception of --pp and --rr, and write the matches + to the standard output. When using the --FF or --CC options, the + various shell variables set by the programmable completion fa- + cilities, while available, will not have useful values. + + The matches will be generated in the same way as if the program- + mable completion code had generated them directly from a comple- + tion specification with the same flags. If _w_o_r_d is specified, + only those completions matching _w_o_r_d will be displayed. + + The return value is true unless an invalid option is supplied, + or no matches were generated. + + ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEEII] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_- + _p_a_t] [--WW _w_o_r_d_l_i_s_t] + [--FF _f_u_n_c_t_i_o_n] [--CC _c_o_m_m_a_n_d] [--XX _f_i_l_t_e_r_p_a_t] [--PP _p_r_e_f_i_x] [--SS _s_u_f_- + _f_i_x] _n_a_m_e [_n_a_m_e _._._.] + ccoommpplleettee --pprr [--DDEEII] [_n_a_m_e ...] + Specify how arguments to each _n_a_m_e should be completed. If the + --pp option is supplied, or if no options are supplied, existing + completion specifications are printed in a way that allows them + to be reused as input. The --rr option removes a completion spec- + ification for each _n_a_m_e, or, if no _n_a_m_es are supplied, all com- + pletion specifications. The --DD option indicates that other sup- + plied options and actions should apply to the ``default'' com- + mand completion; that is, completion attempted on a command for + which no completion has previously been defined. The --EE option + indicates that other supplied options and actions should apply + to ``empty'' command completion; that is, completion attempted + on a blank line. The --II option indicates that other supplied + options and actions should apply to completion on the initial + non-assignment word on the line, or after a command delimiter + such as ;; or ||, which is usually command name completion. If + multiple options are supplied, the --DD option takes precedence + over --EE, and both take precedence over --II. If any of --DD, --EE, or + --II are supplied, any other _n_a_m_e arguments are ignored; these + completions only apply to the case specified by the option. + + The process of applying these completion specifications when + word completion is attempted is described above under PPrrooggrraamm-- + mmaabbllee CCoommpplleettiioonn. + + Other options, if specified, have the following meanings. The + arguments to the --GG, --WW, and --XX options (and, if necessary, the + --PP and --SS options) should be quoted to protect them from expan- + sion before the ccoommpplleettee builtin is invoked. + --oo _c_o_m_p_-_o_p_t_i_o_n + The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp- + spec's behavior beyond the simple generation of comple- + tions. _c_o_m_p_-_o_p_t_i_o_n may be one of: + bbaasshhddeeffaauulltt + Perform the rest of the default bbaasshh completions + if the compspec generates no matches. + ddeeffaauulltt Use readline's default filename completion if + the compspec generates no matches. + ddiirrnnaammeess + Perform directory name completion if the comp- + spec generates no matches. + ffiilleennaammeess + Tell readline that the compspec generates file- + names, so it can perform any filename-specific + processing (like adding a slash to directory + names, quoting special characters, or suppress- + ing trailing spaces). Intended to be used with + shell functions. + nnooqquuoottee Tell readline not to quote the completed words + if they are filenames (quoting filenames is the + default). + nnoossoorrtt Tell readline not to sort the list of possible + completions alphabetically. + nnoossppaaccee Tell readline not to append a space (the de- + fault) to words completed at the end of the + line. + pplluussddiirrss + After any matches defined by the compspec are + generated, directory name completion is at- + tempted and any matches are added to the results + of the other actions. + --AA _a_c_t_i_o_n + The _a_c_t_i_o_n may be one of the following to generate a + list of possible completions: + aalliiaass Alias names. May also be specified as --aa. + aarrrraayyvvaarr + Array variable names. + bbiinnddiinngg RReeaaddlliinnee key binding names. + bbuuiillttiinn Names of shell builtin commands. May also be + specified as --bb. + ccoommmmaanndd Command names. May also be specified as --cc. + ddiirreeccttoorryy + Directory names. May also be specified as --dd. + ddiissaabblleedd + Names of disabled shell builtins. + eennaabblleedd Names of enabled shell builtins. + eexxppoorrtt Names of exported shell variables. May also be + specified as --ee. + ffiillee File names. May also be specified as --ff. + ffuunnccttiioonn + Names of shell functions. + ggrroouupp Group names. May also be specified as --gg. + hheellppttooppiicc + Help topics as accepted by the hheellpp builtin. + hhoossttnnaammee + Hostnames, as taken from the file specified by + the HHOOSSTTFFIILLEE shell variable. + jjoobb Job names, if job control is active. May also + be specified as --jj. + kkeeyywwoorrdd Shell reserved words. May also be specified as + --kk. + rruunnnniinngg Names of running jobs, if job control is active. + sseerrvviiccee Service names. May also be specified as --ss. + sseettoopptt Valid arguments for the --oo option to the sseett + builtin. + sshhoopptt Shell option names as accepted by the sshhoopptt + builtin. + ssiiggnnaall Signal names. + ssttooppppeedd Names of stopped jobs, if job control is active. + uusseerr User names. May also be specified as --uu. + vvaarriiaabbllee + Names of all shell variables. May also be spec- + ified as --vv. + --CC _c_o_m_m_a_n_d + _c_o_m_m_a_n_d is executed in a subshell environment, and its + output is used as the possible completions. + --FF _f_u_n_c_t_i_o_n + The shell function _f_u_n_c_t_i_o_n is executed in the current + shell environment. When the function is executed, the + first argument ($$11) is the name of the command whose ar- + guments are being completed, the second argument ($$22) is + the word being completed, and the third argument ($$33) is + the word preceding the word being completed on the cur- + rent command line. When it finishes, the possible com- + pletions are retrieved from the value of the CCOOMMPPRREEPPLLYY + array variable. + --GG _g_l_o_b_p_a_t + The pathname expansion pattern _g_l_o_b_p_a_t is expanded to + generate the possible completions. + --PP _p_r_e_f_i_x + _p_r_e_f_i_x is added at the beginning of each possible com- + pletion after all other options have been applied. + --SS _s_u_f_f_i_x + _s_u_f_f_i_x is appended to each possible completion after all + other options have been applied. + --WW _w_o_r_d_l_i_s_t + The _w_o_r_d_l_i_s_t is split using the characters in the IIFFSS + special variable as delimiters, and each resultant word + is expanded. Shell quoting is honored within _w_o_r_d_l_i_s_t, + in order to provide a mechanism for the words to contain + shell metacharacters or characters in the value of IIFFSS. + The possible completions are the members of the resul- + tant list which match the word being completed. + --XX _f_i_l_t_e_r_p_a_t + _f_i_l_t_e_r_p_a_t is a pattern as used for pathname expansion. + It is applied to the list of possible completions gener- + ated by the preceding options and arguments, and each + completion matching _f_i_l_t_e_r_p_a_t is removed from the list. + A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this + case, any completion not matching _f_i_l_t_e_r_p_a_t is removed. + + The return value is true unless an invalid option is supplied, + an option other than --pp or --rr is supplied without a _n_a_m_e argu- + ment, an attempt is made to remove a completion specification + for a _n_a_m_e for which no specification exists, or an error occurs + adding a completion specification. + + ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEEII] [++oo _o_p_t_i_o_n] [_n_a_m_e] + Modify completion options for each _n_a_m_e according to the _o_p_- + _t_i_o_ns, or for the currently-executing completion if no _n_a_m_es are + supplied. If no _o_p_t_i_o_ns are given, display the completion op- + tions for each _n_a_m_e or the current completion. The possible + values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin de- + scribed above. The --DD option indicates that other supplied op- + tions should apply to the ``default'' command completion; that + is, completion attempted on a command for which no completion + has previously been defined. The --EE option indicates that other + supplied options should apply to ``empty'' command completion; + that is, completion attempted on a blank line. The --II option + indicates that other supplied options should apply to completion + on the initial non-assignment word on the line, or after a com- + mand delimiter such as ;; or ||, which is usually command name + completion. + + The return value is true unless an invalid option is supplied, + an attempt is made to modify the options for a _n_a_m_e for which no + completion specification exists, or an output error occurs. + + ccoonnttiinnuuee [_n] + Resume the next iteration of the enclosing ffoorr, wwhhiillee, uunnttiill, or + sseelleecctt loop. If _n is specified, resume at the _nth enclosing + loop. _n must be >= 1. If _n is greater than the number of en- + closing loops, the last enclosing loop (the ``top-level'' loop) + is resumed. The return value is 0 unless _n is not greater than + or equal to 1. + + ddeeccllaarree [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] + ttyyppeesseett [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] + Declare variables and/or give them attributes. If no _n_a_m_es are + given then display the values of variables. The --pp option will + display the attributes and values of each _n_a_m_e. When --pp is used + with _n_a_m_e arguments, additional options, other than --ff and --FF, + are ignored. When --pp is supplied without _n_a_m_e arguments, it + will display the attributes and values of all variables having + the attributes specified by the additional options. If no other + options are supplied with --pp, ddeeccllaarree will display the at- + tributes and values of all shell variables. The --ff option will + restrict the display to shell functions. The --FF option inhibits + the display of function definitions; only the function name and + attributes are printed. If the eexxttddeebbuugg shell option is enabled + using sshhoopptt, the source file name and line number where each + _n_a_m_e is defined are displayed as well. The --FF option implies + --ff. The --gg option forces variables to be created or modified at + the global scope, even when ddeeccllaarree is executed in a shell func- + tion. It is ignored in all other cases. The --II option causes + local variables to inherit the attributes (except the _n_a_m_e_r_e_f + attribute) and value of any existing variable with the same _n_a_m_e + at a surrounding scope. If there is no existing variable, the + local variable is initially unset. The following options can be + used to restrict output to variables with the specified attri- + bute or to give variables attributes: + --aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss + above). + --AA Each _n_a_m_e is an associative array variable (see AArrrraayyss + above). + --ff Use function names only. + --ii The variable is treated as an integer; arithmetic evalua- + tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when + the variable is assigned a value. + --ll When the variable is assigned a value, all upper-case + characters are converted to lower-case. The upper-case + attribute is disabled. + --nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name + reference to another variable. That other variable is + defined by the value of _n_a_m_e. All references, assign- + ments, and attribute modifications to _n_a_m_e, except those + using or changing the --nn attribute itself, are performed + on the variable referenced by _n_a_m_e's value. The nameref + attribute cannot be applied to array variables. + --rr Make _n_a_m_es readonly. These names cannot then be assigned + values by subsequent assignment statements or unset. + --tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions in- + herit the DDEEBBUUGG and RREETTUURRNN traps from the calling shell. + The trace attribute has no special meaning for variables. + --uu When the variable is assigned a value, all lower-case + characters are converted to upper-case. The lower-case + attribute is disabled. + --xx Mark _n_a_m_es for export to subsequent commands via the en- + vironment. + + Using `+' instead of `-' turns off the attribute instead, with + the exceptions that ++aa and ++AA may not be used to destroy array + variables and ++rr will not remove the readonly attribute. When + used in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e local, as + with the llooccaall command, unless the --gg option is supplied. If a + variable name is followed by =_v_a_l_u_e, the value of the variable + is set to _v_a_l_u_e. When using --aa or --AA and the compound assign- + ment syntax to create array variables, additional attributes do + not take effect until subsequent assignments. The return value + is 0 unless an invalid option is encountered, an attempt is made + to define a function using ``-f foo=bar'', an attempt is made to + assign a value to a readonly variable, an attempt is made to as- + sign a value to an array variable without using the compound as- + signment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a + valid shell variable name, an attempt is made to turn off read- + only status for a readonly variable, an attempt is made to turn + off array status for an array variable, or an attempt is made to + display a non-existent function with --ff. + + ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]] + Without options, displays the list of currently remembered di- + rectories. The default display is on a single line with direc- + tory names separated by spaces. Directories are added to the + list with the ppuusshhdd command; the ppooppdd command removes entries + from the list. The current directory is always the first direc- + tory in the stack. + --cc Clears the directory stack by deleting all of the en- + tries. + --ll Produces a listing using full pathnames; the default + listing format uses a tilde to denote the home directory. + --pp Print the directory stack with one entry per line. + --vv Print the directory stack with one entry per line, pre- + fixing each entry with its index in the stack. + ++_n Displays the _nth entry counting from the left of the list + shown by ddiirrss when invoked without options, starting with + zero. + --_n Displays the _nth entry counting from the right of the + list shown by ddiirrss when invoked without options, starting + with zero. + + The return value is 0 unless an invalid option is supplied or _n + indexes beyond the end of the directory stack. + + ddiissoowwnn [--aarr] [--hh] [_j_o_b_s_p_e_c ... | _p_i_d ... ] + Without options, remove each _j_o_b_s_p_e_c from the table of active + jobs. If _j_o_b_s_p_e_c is not present, and neither the --aa nor the --rr + option is supplied, the _c_u_r_r_e_n_t _j_o_b is used. If the --hh option + is given, each _j_o_b_s_p_e_c is not removed from the table, but is + marked so that SSIIGGHHUUPP is not sent to the job if the shell re- + ceives a SSIIGGHHUUPP. If no _j_o_b_s_p_e_c is supplied, the --aa option means + to remove or mark all jobs; the --rr option without a _j_o_b_s_p_e_c ar- + gument restricts operation to running jobs. The return value is + 0 unless a _j_o_b_s_p_e_c does not specify a valid job. + + eecchhoo [--nneeEE] [_a_r_g ...] + Output the _a_r_gs, separated by spaces, followed by a newline. + The return status is 0 unless a write error occurs. If --nn is + specified, the trailing newline is suppressed. If the --ee option + is given, interpretation of the following backslash-escaped + characters is enabled. The --EE option disables the interpreta- + tion of these escape characters, even on systems where they are + interpreted by default. The xxppgg__eecchhoo shell option may be used + to dynamically determine whether or not eecchhoo expands these es- + cape characters by default. eecchhoo does not interpret ---- to mean + the end of options. eecchhoo interprets the following escape se- + quences: + \\aa alert (bell) + \\bb backspace + \\cc suppress further output + \\ee + \\EE an escape character + \\ff form feed + \\nn new line + \\rr carriage return + \\tt horizontal tab + \\vv vertical tab + \\\\ backslash + \\00_n_n_n the eight-bit character whose value is the octal value + _n_n_n (zero to three octal digits) + \\xx_H_H the eight-bit character whose value is the hexadecimal + value _H_H (one or two hex digits) + \\uu_H_H_H_H the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H (one to four hex digits) + \\UU_H_H_H_H_H_H_H_H + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H_H_H_H_H (one to eight hex digits) + + eennaabbllee [--aa] [--ddnnppss] [--ff _f_i_l_e_n_a_m_e] [_n_a_m_e ...] + Enable and disable builtin shell commands. Disabling a builtin + allows a disk command which has the same name as a shell builtin + to be executed without specifying a full pathname, even though + the shell normally searches for builtins before disk commands. + If --nn is used, each _n_a_m_e is disabled; otherwise, _n_a_m_e_s are en- + abled. For example, to use the tteesstt binary found via the PPAATTHH + instead of the shell builtin version, run ``enable -n test''. + The --ff option means to load the new builtin command _n_a_m_e from + shared object _f_i_l_e_n_a_m_e, on systems that support dynamic loading. + The --dd option will delete a builtin previously loaded with --ff. + If no _n_a_m_e arguments are given, or if the --pp option is supplied, + a list of shell builtins is printed. With no other option argu- + ments, the list consists of all enabled shell builtins. If --nn + is supplied, only disabled builtins are printed. If --aa is sup- + plied, the list printed includes all builtins, with an indica- + tion of whether or not each is enabled. If --ss is supplied, the + output is restricted to the POSIX _s_p_e_c_i_a_l builtins. The return + value is 0 unless a _n_a_m_e is not a shell builtin or there is an + error loading a new builtin from a shared object. + + eevvaall [_a_r_g ...] + The _a_r_gs are read and concatenated together into a single com- + mand. This command is then read and executed by the shell, and + its exit status is returned as the value of eevvaall. If there are + no _a_r_g_s, or only null arguments, eevvaall returns 0. + + eexxeecc [--ccll] [--aa _n_a_m_e] [_c_o_m_m_a_n_d [_a_r_g_u_m_e_n_t_s]] + If _c_o_m_m_a_n_d is specified, it replaces the shell. No new process + is created. The _a_r_g_u_m_e_n_t_s become the arguments to _c_o_m_m_a_n_d. If + the --ll option is supplied, the shell places a dash at the begin- + ning of the zeroth argument passed to _c_o_m_m_a_n_d. This is what _l_o_- + _g_i_n(1) does. The --cc option causes _c_o_m_m_a_n_d to be executed with + an empty environment. If --aa is supplied, the shell passes _n_a_m_e + as the zeroth argument to the executed command. If _c_o_m_m_a_n_d can- + not be executed for some reason, a non-interactive shell exits, + unless the eexxeeccffaaiill shell option is enabled. In that case, it + returns failure. An interactive shell returns failure if the + file cannot be executed. A subshell exits unconditionally if + eexxeecc fails. If _c_o_m_m_a_n_d is not specified, any redirections take + effect in the current shell, and the return status is 0. If + there is a redirection error, the return status is 1. + + eexxiitt [_n] + Cause the shell to exit with a status of _n. If _n is omitted, + the exit status is that of the last command executed. A trap on + EEXXIITT is executed before the shell terminates. + + eexxppoorrtt [--ffnn] [_n_a_m_e[=_w_o_r_d]] ... + eexxppoorrtt --pp + The supplied _n_a_m_e_s are marked for automatic export to the envi- + ronment of subsequently executed commands. If the --ff option is + given, the _n_a_m_e_s refer to functions. If no _n_a_m_e_s are given, or + if the --pp option is supplied, a list of names of all exported + variables is printed. The --nn option causes the export property + to be removed from each _n_a_m_e. If a variable name is followed by + =_w_o_r_d, the value of the variable is set to _w_o_r_d. eexxppoorrtt returns + an exit status of 0 unless an invalid option is encountered, one + of the _n_a_m_e_s is not a valid shell variable name, or --ff is sup- + plied with a _n_a_m_e that is not a function. + + ffcc [--ee _e_n_a_m_e] [--llnnrr] [_f_i_r_s_t] [_l_a_s_t] + ffcc --ss [_p_a_t=_r_e_p] [_c_m_d] + The first form selects a range of commands from _f_i_r_s_t to _l_a_s_t + from the history list and displays or edits and re-executes + them. _F_i_r_s_t and _l_a_s_t may be specified as a string (to locate + the last command beginning with that string) or as a number (an + index into the history list, where a negative number is used as + an offset from the current command number). When listing, a + _f_i_r_s_t or _l_a_s_t of 0 is equivalent to -1 and -0 is equivalent to + the current command (usually the ffcc command); otherwise 0 is + equivalent to -1 and -0 is invalid. If _l_a_s_t is not specified, + it is set to the current command for listing (so that ``fc -l + -10'' prints the last 10 commands) and to _f_i_r_s_t otherwise. If + _f_i_r_s_t is not specified, it is set to the previous command for + editing and -16 for listing. + + The --nn option suppresses the command numbers when listing. The + --rr option reverses the order of the commands. If the --ll option + is given, the commands are listed on standard output. Other- + wise, the editor given by _e_n_a_m_e is invoked on a file containing + those commands. If _e_n_a_m_e is not given, the value of the FFCCEEDDIITT + variable is used, and the value of EEDDIITTOORR if FFCCEEDDIITT is not set. + If neither variable is set, _v_i is used. When editing is com- + plete, the edited commands are echoed and executed. + + In the second form, _c_o_m_m_a_n_d is re-executed after each instance + of _p_a_t is replaced by _r_e_p. _C_o_m_m_a_n_d is interpreted the same as + _f_i_r_s_t above. A useful alias to use with this is ``r="fc -s"'', + so that typing ``r cc'' runs the last command beginning with + ``cc'' and typing ``r'' re-executes the last command. + + If the first form is used, the return value is 0 unless an in- + valid option is encountered or _f_i_r_s_t or _l_a_s_t specify history + lines out of range. If the --ee option is supplied, the return + value is the value of the last command executed or failure if an + error occurs with the temporary file of commands. If the second + form is used, the return status is that of the command re-exe- + cuted, unless _c_m_d does not specify a valid history line, in + which case ffcc returns failure. + + ffgg [_j_o_b_s_p_e_c] + Resume _j_o_b_s_p_e_c in the foreground, and make it the current job. + If _j_o_b_s_p_e_c is not present, the shell's notion of the _c_u_r_r_e_n_t _j_o_b + is used. The return value is that of the command placed into + the foreground, or failure if run when job control is disabled + or, when run with job control enabled, if _j_o_b_s_p_e_c does not spec- + ify a valid job or _j_o_b_s_p_e_c specifies a job that was started + without job control. + + ggeettooppttss _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g _._._.] + ggeettooppttss is used by shell procedures to parse positional parame- + ters. _o_p_t_s_t_r_i_n_g contains the option characters to be recog- + nized; if a character is followed by a colon, the option is ex- + pected to have an argument, which should be separated from it by + white space. The colon and question mark characters may not be + used as option characters. Each time it is invoked, ggeettooppttss + places the next option in the shell variable _n_a_m_e, initializing + _n_a_m_e if it does not exist, and the index of the next argument to + be processed into the variable OOPPTTIINNDD. OOPPTTIINNDD is initialized to + 1 each time the shell or a shell script is invoked. When an op- + tion requires an argument, ggeettooppttss places that argument into the + variable OOPPTTAARRGG. The shell does not reset OOPPTTIINNDD automatically; + it must be manually reset between multiple calls to ggeettooppttss + within the same shell invocation if a new set of parameters is + to be used. + + When the end of options is encountered, ggeettooppttss exits with a re- + turn value greater than zero. OOPPTTIINNDD is set to the index of the + first non-option argument, and _n_a_m_e is set to ?. + + ggeettooppttss normally parses the positional parameters, but if more + arguments are supplied as _a_r_g values, ggeettooppttss parses those in- + stead. + + ggeettooppttss can report errors in two ways. If the first character + of _o_p_t_s_t_r_i_n_g is a colon, _s_i_l_e_n_t error reporting is used. In + normal operation, diagnostic messages are printed when invalid + options or missing option arguments are encountered. If the + variable OOPPTTEERRRR is set to 0, no error messages will be dis- + played, even if the first character of _o_p_t_s_t_r_i_n_g is not a colon. + + If an invalid option is seen, ggeettooppttss places ? into _n_a_m_e and, if + not silent, prints an error message and unsets OOPPTTAARRGG. If + ggeettooppttss is silent, the option character found is placed in OOPP-- + TTAARRGG and no diagnostic message is printed. + + If a required argument is not found, and ggeettooppttss is not silent, + a question mark (??) is placed in _n_a_m_e, OOPPTTAARRGG is unset, and a + diagnostic message is printed. If ggeettooppttss is silent, then a + colon (::) is placed in _n_a_m_e and OOPPTTAARRGG is set to the option + character found. + + ggeettooppttss returns true if an option, specified or unspecified, is + found. It returns false if the end of options is encountered or + an error occurs. + + hhaasshh [--llrr] [--pp _f_i_l_e_n_a_m_e] [--ddtt] [_n_a_m_e] + Each time hhaasshh is invoked, the full pathname of the command _n_a_m_e + is determined by searching the directories in $$PPAATTHH and remem- + bered. Any previously-remembered pathname is discarded. If the + --pp option is supplied, no path search is performed, and _f_i_l_e_n_a_m_e + is used as the full filename of the command. The --rr option + causes the shell to forget all remembered locations. The --dd op- + tion causes the shell to forget the remembered location of each + _n_a_m_e. If the --tt option is supplied, the full pathname to which + each _n_a_m_e corresponds is printed. If multiple _n_a_m_e arguments + are supplied with --tt, the _n_a_m_e is printed before the hashed full + pathname. The --ll option causes output to be displayed in a for- + mat that may be reused as input. If no arguments are given, or + if only --ll is supplied, information about remembered commands is + printed. The return status is true unless a _n_a_m_e is not found + or an invalid option is supplied. + + hheellpp [--ddmmss] [_p_a_t_t_e_r_n] + Display helpful information about builtin commands. If _p_a_t_t_e_r_n + is specified, hheellpp gives detailed help on all commands matching + _p_a_t_t_e_r_n; otherwise help for all the builtins and shell control + structures is printed. + --dd Display a short description of each _p_a_t_t_e_r_n + --mm Display the description of each _p_a_t_t_e_r_n in a manpage-like + format + --ss Display only a short usage synopsis for each _p_a_t_t_e_r_n + + The return status is 0 unless no command matches _p_a_t_t_e_r_n. + + hhiissttoorryy [[_n]] + hhiissttoorryy --cc + hhiissttoorryy --dd _o_f_f_s_e_t + hhiissttoorryy --dd _s_t_a_r_t-_e_n_d + hhiissttoorryy --aannrrww [_f_i_l_e_n_a_m_e] + hhiissttoorryy --pp _a_r_g [_a_r_g _._._.] + hhiissttoorryy --ss _a_r_g [_a_r_g _._._.] + With no options, display the command history list with line num- + bers. Lines listed with a ** have been modified. An argument of + _n lists only the last _n lines. If the shell variable HHIISSTTTTIIMMEE-- + FFOORRMMAATT is set and not null, it is used as a format string for + _s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis- + played history entry. No intervening blank is printed between + the formatted time stamp and the history line. If _f_i_l_e_n_a_m_e is + supplied, it is used as the name of the history file; if not, + the value of HHIISSTTFFIILLEE is used. Options, if supplied, have the + following meanings: + --cc Clear the history list by deleting all the entries. + --dd _o_f_f_s_e_t + Delete the history entry at position _o_f_f_s_e_t. If _o_f_f_s_e_t + is negative, it is interpreted as relative to one greater + than the last history position, so negative indices count + back from the end of the history, and an index of -1 + refers to the current hhiissttoorryy --dd command. + --dd _s_t_a_r_t-_e_n_d + Delete the history entries between positions _s_t_a_r_t and + _e_n_d, inclusive. Positive and negative values for _s_t_a_r_t + and _e_n_d are interpreted as described above. + --aa Append the ``new'' history lines to the history file. + These are history lines entered since the beginning of + the current bbaasshh session, but not already appended to the + history file. + --nn Read the history lines not already read from the history + file into the current history list. These are lines ap- + pended to the history file since the beginning of the + current bbaasshh session. + --rr Read the contents of the history file and append them to + the current history list. + --ww Write the current history list to the history file, over- + writing the history file's contents. + --pp Perform history substitution on the following _a_r_g_s and + display the result on the standard output. Does not + store the results in the history list. Each _a_r_g must be + quoted to disable normal history expansion. + --ss Store the _a_r_g_s in the history list as a single entry. + The last command in the history list is removed before + the _a_r_g_s are added. + + If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, the time stamp informa- + tion associated with each history entry is written to the his- + tory file, marked with the history comment character. When the + history file is read, lines beginning with the history comment + character followed immediately by a digit are interpreted as + timestamps for the following history entry. The return value is + 0 unless an invalid option is encountered, an error occurs while + reading or writing the history file, an invalid _o_f_f_s_e_t is sup- + plied as an argument to --dd, or the history expansion supplied as + an argument to --pp fails. + + jjoobbss [--llnnpprrss] [ _j_o_b_s_p_e_c ... ] + jjoobbss --xx _c_o_m_m_a_n_d [ _a_r_g_s ... ] + The first form lists the active jobs. The options have the fol- + lowing meanings: + --ll List process IDs in addition to the normal information. + --nn Display information only about jobs that have changed + status since the user was last notified of their status. + --pp List only the process ID of the job's process group + leader. + --rr Display only running jobs. + --ss Display only stopped jobs. + + If _j_o_b_s_p_e_c is given, output is restricted to information about + that job. The return status is 0 unless an invalid option is + encountered or an invalid _j_o_b_s_p_e_c is supplied. + + If the --xx option is supplied, jjoobbss replaces any _j_o_b_s_p_e_c found in + _c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and ex- + ecutes _c_o_m_m_a_n_d passing it _a_r_g_s, returning its exit status. + + kkiillll [--ss _s_i_g_s_p_e_c | --nn _s_i_g_n_u_m | --_s_i_g_s_p_e_c] [_p_i_d | _j_o_b_s_p_e_c] ... + kkiillll --ll|--LL [_s_i_g_s_p_e_c | _e_x_i_t___s_t_a_t_u_s] + Send the signal named by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes + named by _p_i_d or _j_o_b_s_p_e_c. _s_i_g_s_p_e_c is either a case-insensitive + signal name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or + a signal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not + present, then SSIIGGTTEERRMM is assumed. An argument of --ll lists the + signal names. If any arguments are supplied when --ll is given, + the names of the signals corresponding to the arguments are + listed, and the return status is 0. The _e_x_i_t___s_t_a_t_u_s argument to + --ll is a number specifying either a signal number or the exit + status of a process terminated by a signal. The --LL option is + equivalent to --ll. kkiillll returns true if at least one signal was + successfully sent, or false if an error occurs or an invalid op- + tion is encountered. + + lleett _a_r_g [_a_r_g ...] + Each _a_r_g is an arithmetic expression to be evaluated (see AARRIITTHH-- + MMEETTIICC EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett + returns 1; 0 is returned otherwise. + + llooccaall [_o_p_t_i_o_n] [_n_a_m_e[=_v_a_l_u_e] ... | - ] + For each argument, a local variable named _n_a_m_e is created, and + assigned _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted + by ddeeccllaarree. When llooccaall is used within a function, it causes the + variable _n_a_m_e to have a visible scope restricted to that func- + tion and its children. If _n_a_m_e is -, the set of shell options + is made local to the function in which llooccaall is invoked: shell + options changed using the sseett builtin inside the function are + restored to their original values when the function returns. + The restore is effected as if a series of sseett commands were exe- + cuted to restore the values that were in place before the func- + tion. With no operands, llooccaall writes a list of local variables + to the standard output. It is an error to use llooccaall when not + within a function. The return status is 0 unless llooccaall is used + outside a function, an invalid _n_a_m_e is supplied, or _n_a_m_e is a + readonly variable. + + llooggoouutt Exit a login shell. + + mmaappffiillee [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC + _c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y] + rreeaaddaarrrraayy [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC + _c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y] + Read lines from the standard input into the indexed array vari- + able _a_r_r_a_y, or from file descriptor _f_d if the --uu option is sup- + plied. The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if + supplied, have the following meanings: + --dd The first character of _d_e_l_i_m is used to terminate each + input line, rather than newline. If _d_e_l_i_m is the empty + string, mmaappffiillee will terminate a line when it reads a NUL + character. + --nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are + copied. + --OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default + index is 0. + --ss Discard the first _c_o_u_n_t lines read. + --tt Remove a trailing _d_e_l_i_m (default newline) from each line + read. + --uu Read lines from file descriptor _f_d instead of the stan- + dard input. + --CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The + --cc option specifies _q_u_a_n_t_u_m. + --cc Specify the number of lines read between each call to + _c_a_l_l_b_a_c_k. + + If --CC is specified without --cc, the default quantum is 5000. + When _c_a_l_l_b_a_c_k is evaluated, it is supplied the index of the next + array element to be assigned and the line to be assigned to that + element as additional arguments. _c_a_l_l_b_a_c_k is evaluated after + the line is read but before the array element is assigned. + + If not supplied with an explicit origin, mmaappffiillee will clear _a_r_- + _r_a_y before assigning to it. + + mmaappffiillee returns successfully unless an invalid option or option + argument is supplied, _a_r_r_a_y is invalid or unassignable, or if + _a_r_r_a_y is not an indexed array. + + ppooppdd [-nn] [+_n] [-_n] + Removes entries from the directory stack. With no arguments, + removes the top directory from the stack, and performs a ccdd to + the new top directory. Arguments, if supplied, have the follow- + ing meanings: + --nn Suppresses the normal change of directory when removing + directories from the stack, so that only the stack is ma- + nipulated. + ++_n Removes the _nth entry counting from the left of the list + shown by ddiirrss, starting with zero. For example: ``popd + +0'' removes the first directory, ``popd +1'' the second. + --_n Removes the _nth entry counting from the right of the list + shown by ddiirrss, starting with zero. For example: ``popd + -0'' removes the last directory, ``popd -1'' the next to + last. + + If the ppooppdd command is successful, a ddiirrss is performed as well, + and the return status is 0. ppooppdd returns false if an invalid + option is encountered, the directory stack is empty, a non-exis- + tent directory stack entry is specified, or the directory change + fails. + + pprriinnttff [--vv _v_a_r] _f_o_r_m_a_t [_a_r_g_u_m_e_n_t_s] + Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the + control of the _f_o_r_m_a_t. The --vv option causes the output to be + assigned to the variable _v_a_r rather than being printed to the + standard output. + + The _f_o_r_m_a_t is a character string which contains three types of + objects: plain characters, which are simply copied to standard + output, character escape sequences, which are converted and + copied to the standard output, and format specifications, each + of which causes printing of the next successive _a_r_g_u_m_e_n_t. In + addition to the standard _p_r_i_n_t_f(1) format specifications, pprriinnttff + interprets the following extensions: + %%bb causes pprriinnttff to expand backslash escape sequences in the + corresponding _a_r_g_u_m_e_n_t in the same way as eecchhoo --ee. + %%qq causes pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a + format that can be reused as shell input. + %%((_d_a_t_e_f_m_t))TT + causes pprriinnttff to output the date-time string resulting + from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3). + The corresponding _a_r_g_u_m_e_n_t is an integer representing the + number of seconds since the epoch. Two special argument + values may be used: -1 represents the current time, and + -2 represents the time the shell was invoked. If no ar- + gument is specified, conversion behaves as if -1 had been + given. This is an exception to the usual pprriinnttff behav- + ior. + + The %b, %q, and %T directives all use the field width and preci- + sion arguments from the format specification and write that many + bytes from (or use that wide a field for) the expanded argument, + which usually contains more characters than the original. + + Arguments to non-string format specifiers are treated as C con- + stants, except that a leading plus or minus sign is allowed, and + if the leading character is a single or double quote, the value + is the ASCII value of the following character. + + The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_- + _m_e_n_t_s. If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied, + the extra format specifications behave as if a zero value or + null string, as appropriate, had been supplied. The return + value is zero on success, non-zero on failure. + + ppuusshhdd [--nn] [+_n] [-_n] + ppuusshhdd [--nn] [_d_i_r] + Adds a directory to the top of the directory stack, or rotates + the stack, making the new top of the stack the current working + directory. With no arguments, ppuusshhdd exchanges the top two di- + rectories and returns 0, unless the directory stack is empty. + Arguments, if supplied, have the following meanings: + --nn Suppresses the normal change of directory when rotating + or adding directories to the stack, so that only the + stack is manipulated. + ++_n Rotates the stack so that the _nth directory (counting + from the left of the list shown by ddiirrss, starting with + zero) is at the top. + --_n Rotates the stack so that the _nth directory (counting + from the right of the list shown by ddiirrss, starting with + zero) is at the top. + _d_i_r Adds _d_i_r to the directory stack at the top, making it the + new current working directory as if it had been supplied + as the argument to the ccdd builtin. + + If the ppuusshhdd command is successful, a ddiirrss is performed as well. + If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r + fails. With the second form, ppuusshhdd returns 0 unless the direc- + tory stack is empty, a non-existent directory stack element is + specified, or the directory change to the specified new current + directory fails. + + ppwwdd [--LLPP] + Print the absolute pathname of the current working directory. + The pathname printed contains no symbolic links if the --PP option + is supplied or the --oo pphhyyssiiccaall option to the sseett builtin command + is enabled. If the --LL option is used, the pathname printed may + contain symbolic links. The return status is 0 unless an error + occurs while reading the name of the current directory or an in- + valid option is supplied. + + rreeaadd [--eerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [--ii _t_e_x_t] [--nn _n_c_h_a_r_s] [--NN _n_c_h_a_r_s] [--pp + _p_r_o_m_p_t] [--tt _t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...] + One line is read from the standard input, or from the file de- + scriptor _f_d supplied as an argument to the --uu option, split into + words as described above under WWoorrdd SSpplliittttiinngg, and the first + word is assigned to the first _n_a_m_e, the second word to the sec- + ond _n_a_m_e, and so on. If there are more words than names, the + remaining words and their intervening delimiters are assigned to + the last _n_a_m_e. If there are fewer words read from the input + stream than names, the remaining names are assigned empty val- + ues. The characters in IIFFSS are used to split the line into + words using the same rules the shell uses for expansion (de- + scribed above under WWoorrdd SSpplliittttiinngg). The backslash character + (\\) may be used to remove any special meaning for the next char- + acter read and for line continuation. Options, if supplied, + have the following meanings: + --aa _a_n_a_m_e + The words are assigned to sequential indices of the array + variable _a_n_a_m_e, starting at 0. _a_n_a_m_e is unset before any + new values are assigned. Other _n_a_m_e arguments are ig- + nored. + --dd _d_e_l_i_m + The first character of _d_e_l_i_m is used to terminate the in- + put line, rather than newline. If _d_e_l_i_m is the empty + string, rreeaadd will terminate a line when it reads a NUL + character. + --ee If the standard input is coming from a terminal, rreeaaddlliinnee + (see RREEAADDLLIINNEE above) is used to obtain the line. Read- + line uses the current (or default, if line editing was + not previously active) editing settings, but uses Read- + line's default filename completion. + --ii _t_e_x_t + If rreeaaddlliinnee is being used to read the line, _t_e_x_t is + placed into the editing buffer before editing begins. + --nn _n_c_h_a_r_s + rreeaadd returns after reading _n_c_h_a_r_s characters rather than + waiting for a complete line of input, but honors a delim- + iter if fewer than _n_c_h_a_r_s characters are read before the + delimiter. + --NN _n_c_h_a_r_s + rreeaadd returns after reading exactly _n_c_h_a_r_s characters + rather than waiting for a complete line of input, unless + EOF is encountered or rreeaadd times out. Delimiter charac- + ters encountered in the input are not treated specially + and do not cause rreeaadd to return until _n_c_h_a_r_s characters + are read. The result is not split on the characters in + IIFFSS; the intent is that the variable is assigned exactly + the characters read (with the exception of backslash; see + the --rr option below). + --pp _p_r_o_m_p_t + Display _p_r_o_m_p_t on standard error, without a trailing new- + line, before attempting to read any input. The prompt is + displayed only if input is coming from a terminal. + --rr Backslash does not act as an escape character. The back- + slash is considered to be part of the line. In particu- + lar, a backslash-newline pair may not then be used as a + line continuation. + --ss Silent mode. If input is coming from a terminal, charac- + ters are not echoed. + --tt _t_i_m_e_o_u_t + Cause rreeaadd to time out and return failure if a complete + line of input (or a specified number of characters) is + not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a deci- + mal number with a fractional portion following the deci- + mal point. This option is only effective if rreeaadd is + reading input from a terminal, pipe, or other special + file; it has no effect when reading from regular files. + If rreeaadd times out, rreeaadd saves any partial input read into + the specified variable _n_a_m_e. If _t_i_m_e_o_u_t is 0, rreeaadd re- + turns immediately, without trying to read any data. The + exit status is 0 if input is available on the specified + file descriptor, non-zero otherwise. The exit status is + greater than 128 if the timeout is exceeded. + --uu _f_d Read input from file descriptor _f_d. + + If no _n_a_m_e_s are supplied, the line read, without the ending de- + limiter but otherwise unmodified, is assigned to the variable + RREEPPLLYY. The exit status is zero, unless end-of-file is encoun- + tered, rreeaadd times out (in which case the status is greater than + 128), a variable assignment error (such as assigning to a read- + only variable) occurs, or an invalid file descriptor is supplied + as the argument to --uu. + + rreeaaddoonnllyy [--aaAAff] [--pp] [_n_a_m_e[=_w_o_r_d] ...] + The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s + may not be changed by subsequent assignment. If the --ff option + is supplied, the functions corresponding to the _n_a_m_e_s are so + marked. The --aa option restricts the variables to indexed ar- + rays; the --AA option restricts the variables to associative ar- + rays. If both options are supplied, --AA takes precedence. If no + _n_a_m_e arguments are given, or if the --pp option is supplied, a + list of all readonly names is printed. The other options may be + used to restrict the output to a subset of the set of readonly + names. The --pp option causes output to be displayed in a format + that may be reused as input. If a variable name is followed by + =_w_o_r_d, the value of the variable is set to _w_o_r_d. The return + status is 0 unless an invalid option is encountered, one of the + _n_a_m_e_s is not a valid shell variable name, or --ff is supplied with + a _n_a_m_e that is not a function. + + rreettuurrnn [_n] + Causes a function to stop executing and return the value speci- + fied by _n to its caller. If _n is omitted, the return status is + that of the last command executed in the function body. If rree-- + ttuurrnn is executed by a trap handler, the last command used to de- + termine the status is the last command executed before the trap + handler. If rreettuurrnn is executed during a DDEEBBUUGG trap, the last + command used to determine the status is the last command exe- + cuted by the trap handler before rreettuurrnn was invoked. If rreettuurrnn + is used outside a function, but during execution of a script by + the .. (ssoouurrccee) command, it causes the shell to stop executing + that script and return either _n or the exit status of the last + command executed within the script as the exit status of the + script. If _n is supplied, the return value is its least signif- + icant 8 bits. The return status is non-zero if rreettuurrnn is sup- + plied a non-numeric argument, or is used outside a function and + not during execution of a script by .. or ssoouurrccee. Any command + associated with the RREETTUURRNN trap is executed before execution re- + sumes after the function or script. + + sseett [----aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [--oo _o_p_t_i_o_n_-_n_a_m_e] [_a_r_g ...] + sseett [++aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [++oo _o_p_t_i_o_n_-_n_a_m_e] [_a_r_g ...] + Without options, the name and value of each shell variable are + displayed in a format that can be reused as input for setting or + resetting the currently-set variables. Read-only variables can- + not be reset. In _p_o_s_i_x _m_o_d_e, only shell variables are listed. + The output is sorted according to the current locale. When op- + tions are specified, they set or unset shell attributes. Any + arguments remaining after option processing are treated as val- + ues for the positional parameters and are assigned, in order, to + $$11, $$22, ...... $$_n. Options, if specified, have the following + meanings: + --aa Each variable or function that is created or modified is + given the export attribute and marked for export to the + environment of subsequent commands. + --bb Report the status of terminated background jobs immedi- + ately, rather than before the next primary prompt. This + is effective only when job control is enabled. + --ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a + single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d + (see SSHHEELLLL GGRRAAMMMMAARR above), exits with a non-zero status. + The shell does not exit if the command that fails is + part of the command list immediately following a wwhhiillee + or uunnttiill keyword, part of the test following the iiff or + eelliiff reserved words, part of any command executed in a + &&&& or |||| list except the command following the final &&&& + or ||||, any command in a pipeline but the last, or if the + command's return value is being inverted with !!. If a + compound command other than a subshell returns a non- + zero status because a command failed while --ee was being + ignored, the shell does not exit. A trap on EERRRR, if + set, is executed before the shell exits. This option + applies to the shell environment and each subshell envi- + ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT + above), and may cause subshells to exit before executing + all the commands in the subshell. + + If a compound command or shell function executes in a + context where --ee is being ignored, none of the commands + executed within the compound command or function body + will be affected by the --ee setting, even if --ee is set + and a command returns a failure status. If a compound + command or shell function sets --ee while executing in a + context where --ee is ignored, that setting will not have + any effect until the compound command or the command + containing the function call completes. + --ff Disable pathname expansion. + --hh Remember the location of commands as they are looked up + for execution. This is enabled by default. + --kk All arguments in the form of assignment statements are + placed in the environment for a command, not just those + that precede the command name. + --mm Monitor mode. Job control is enabled. This option is + on by default for interactive shells on systems that + support it (see JJOOBB CCOONNTTRROOLL above). All processes run + in a separate process group. When a background job com- + pletes, the shell prints a line containing its exit sta- + tus. + --nn Read commands but do not execute them. This may be used + to check a shell script for syntax errors. This is ig- + nored by interactive shells. + --oo _o_p_t_i_o_n_-_n_a_m_e + The _o_p_t_i_o_n_-_n_a_m_e can be one of the following: + aalllleexxppoorrtt + Same as --aa. + bbrraacceeeexxppaanndd + Same as --BB. + eemmaaccss Use an emacs-style command line editing inter- + face. This is enabled by default when the shell + is interactive, unless the shell is started with + the ----nnooeeddiittiinngg option. This also affects the + editing interface used for rreeaadd --ee. + eerrrreexxiitt Same as --ee. + eerrrrttrraaccee + Same as --EE. + ffuunnccttrraaccee + Same as --TT. + hhaasshhaallll Same as --hh. + hhiisstteexxppaanndd + Same as --HH. + hhiissttoorryy Enable command history, as described above under + HHIISSTTOORRYY. This option is on by default in inter- + active shells. + iiggnnoorreeeeooff + The effect is as if the shell command ``IG- + NOREEOF=10'' had been executed (see SShheellll VVaarrii-- + aabblleess above). + kkeeyywwoorrdd Same as --kk. + mmoonniittoorr Same as --mm. + nnoocclloobbbbeerr + Same as --CC. + nnooeexxeecc Same as --nn. + nnoogglloobb Same as --ff. + nnoolloogg Currently ignored. + nnoottiiffyy Same as --bb. + nnoouunnsseett Same as --uu. + oonneeccmmdd Same as --tt. + pphhyyssiiccaall + Same as --PP. + ppiippeeffaaiill + If set, the return value of a pipeline is the + value of the last (rightmost) command to exit + with a non-zero status, or zero if all commands + in the pipeline exit successfully. This option + is disabled by default. + ppoossiixx Change the behavior of bbaasshh where the default + operation differs from the POSIX standard to + match the standard (_p_o_s_i_x _m_o_d_e). See SSEEEE AALLSSOO + below for a reference to a document that details + how posix mode affects bash's behavior. + pprriivviilleeggeedd + Same as --pp. + vveerrbboossee Same as --vv. + vvii Use a vi-style command line editing interface. + This also affects the editing interface used for + rreeaadd --ee. + xxttrraaccee Same as --xx. + If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, the values of the + current options are printed. If ++oo is supplied with no + _o_p_t_i_o_n_-_n_a_m_e, a series of sseett commands to recreate the + current option settings is displayed on the standard + output. + --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the $$EENNVV and + $$BBAASSHH__EENNVV files are not processed, shell functions are + not inherited from the environment, and the SSHHEELLLLOOPPTTSS, + BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they ap- + pear in the environment, are ignored. If the shell is + started with the effective user (group) id not equal to + the real user (group) id, and the --pp option is not sup- + plied, these actions are taken and the effective user id + is set to the real user id. If the --pp option is sup- + plied at startup, the effective user id is not reset. + Turning this option off causes the effective user and + group ids to be set to the real user and group ids. + --tt Exit after reading and executing one command. + --uu Treat unset variables and parameters other than the spe- + cial parameters "@" and "*" as an error when performing + parameter expansion. If expansion is attempted on an + unset variable or parameter, the shell prints an error + message, and, if not interactive, exits with a non-zero + status. + --vv Print shell input lines as they are read. + --xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee + command, sseelleecctt command, or arithmetic ffoorr command, dis- + play the expanded value of PPSS44, followed by the command + and its expanded arguments or associated word list. + --BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn + above). This is on by default. + --CC If set, bbaasshh does not overwrite an existing file with + the >>, >>&&, and <<>> redirection operators. This may be + overridden when creating output files by using the redi- + rection operator >>|| instead of >>. + --EE If set, any trap on EERRRR is inherited by shell functions, + command substitutions, and commands executed in a sub- + shell environment. The EERRRR trap is normally not inher- + ited in such cases. + --HH Enable !! style history substitution. This option is on + by default when the shell is interactive. + --PP If set, the shell does not resolve symbolic links when + executing commands such as ccdd that change the current + working directory. It uses the physical directory + structure instead. By default, bbaasshh follows the logical + chain of directories when performing commands which + change the current directory. + --TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by + shell functions, command substitutions, and commands ex- + ecuted in a subshell environment. The DDEEBBUUGG and RREETTUURRNN + traps are normally not inherited in such cases. + ---- If no arguments follow this option, then the positional + parameters are unset. Otherwise, the positional parame- + ters are set to the _a_r_gs, even if some of them begin + with a --. + -- Signal the end of options, cause all remaining _a_r_gs to + be assigned to the positional parameters. The --xx and --vv + options are turned off. If there are no _a_r_gs, the posi- + tional parameters remain unchanged. + + The options are off by default unless otherwise noted. Using + + rather than - causes these options to be turned off. The op- + tions can also be specified as arguments to an invocation of the + shell. The current set of options may be found in $$--. The re- + turn status is always true unless an invalid option is encoun- + tered. + + sshhiifftt [_n] + The positional parameters from _n+1 ... are renamed to $$11 ........ + Parameters represented by the numbers $$## down to $$##-_n+1 are un- + set. _n must be a non-negative number less than or equal to $$##. + If _n is 0, no parameters are changed. If _n is not given, it is + assumed to be 1. If _n is greater than $$##, the positional param- + eters are not changed. The return status is greater than zero + if _n is greater than $$## or less than zero; otherwise 0. + + sshhoopptt [--ppqqssuu] [--oo] [_o_p_t_n_a_m_e ...] + Toggle the values of settings controlling optional shell behav- + ior. The settings can be either those listed below, or, if the + --oo option is used, those available with the --oo option to the sseett + builtin command. With no options, or with the --pp option, a list + of all settable options is displayed, with an indication of + whether or not each is set; if _o_p_t_n_a_m_e_s are supplied, the output + is restricted to those options. The --pp option causes output to + be displayed in a form that may be reused as input. Other op- + tions have the following meanings: + --ss Enable (set) each _o_p_t_n_a_m_e. + --uu Disable (unset) each _o_p_t_n_a_m_e. + --qq Suppresses normal output (quiet mode); the return status + indicates whether the _o_p_t_n_a_m_e is set or unset. If multi- + ple _o_p_t_n_a_m_e arguments are given with --qq, the return sta- + tus is zero if all _o_p_t_n_a_m_e_s are enabled; non-zero other- + wise. + --oo Restricts the values of _o_p_t_n_a_m_e to be those defined for + the --oo option to the sseett builtin. + + If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, sshhoopptt + shows only those options which are set or unset, respectively. + Unless otherwise noted, the sshhoopptt options are disabled (unset) + by default. + + The return status when listing options is zero if all _o_p_t_n_a_m_e_s + are enabled, non-zero otherwise. When setting or unsetting op- + tions, the return status is zero unless an _o_p_t_n_a_m_e is not a + valid shell option. + + The list of sshhoopptt options is: + + aassssoocc__eexxppaanndd__oonnccee + If set, the shell suppresses multiple evaluation of as- + sociative array subscripts during arithmetic expression + evaluation, while executing builtins that can perform + variable assignments, and while executing builtins that + perform array dereferencing. + aauuttooccdd If set, a command name that is the name of a directory + is executed as if it were the argument to the ccdd com- + mand. This option is only used by interactive shells. + ccddaabbllee__vvaarrss + If set, an argument to the ccdd builtin command that is + not a directory is assumed to be the name of a variable + whose value is the directory to change to. + ccddssppeellll If set, minor errors in the spelling of a directory com- + ponent in a ccdd command will be corrected. The errors + checked for are transposed characters, a missing charac- + ter, and one character too many. If a correction is + found, the corrected filename is printed, and the com- + mand proceeds. This option is only used by interactive + shells. + cchheecckkhhaasshh + If set, bbaasshh checks that a command found in the hash ta- + ble exists before trying to execute it. If a hashed + command no longer exists, a normal path search is per- + formed. + cchheecckkjjoobbss + If set, bbaasshh lists the status of any stopped and running + jobs before exiting an interactive shell. If any jobs + are running, this causes the exit to be deferred until a + second exit is attempted without an intervening command + (see JJOOBB CCOONNTTRROOLL above). The shell always postpones ex- + iting if any jobs are stopped. + cchheecckkwwiinnssiizzee + If set, bbaasshh checks the window size after each external + (non-builtin) command and, if necessary, updates the + values of LLIINNEESS and CCOOLLUUMMNNSS. This option is enabled by + default. + ccmmddhhiisstt If set, bbaasshh attempts to save all lines of a multiple- + line command in the same history entry. This allows + easy re-editing of multi-line commands. This option is + enabled by default, but only has an effect if command + history is enabled, as described above under HHIISSTTOORRYY. + ccoommppaatt3311 + ccoommppaatt3322 + ccoommppaatt4400 + ccoommppaatt4411 + ccoommppaatt4422 + ccoommppaatt4433 + ccoommppaatt4444 + These control aspects of the shell's compatibility mode + (see SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE below). + + ccoommpplleettee__ffuullllqquuoottee + If set, bbaasshh quotes all shell metacharacters in file- + names and directory names when performing completion. + If not set, bbaasshh removes metacharacters such as the dol- + lar sign from the set of characters that will be quoted + in completed filenames when these metacharacters appear + in shell variable references in words to be completed. + This means that dollar signs in variable names that ex- + pand to directories will not be quoted; however, any + dollar signs appearing in filenames will not be quoted, + either. This is active only when bash is using back- + slashes to quote completed filenames. This variable is + set by default, which is the default bash behavior in + versions through 4.2. + + ddiirreexxppaanndd + If set, bbaasshh replaces directory names with the results + of word expansion when performing filename completion. + This changes the contents of the readline editing buf- + fer. If not set, bbaasshh attempts to preserve what the + user typed. + + ddiirrssppeellll + If set, bbaasshh attempts spelling correction on directory + names during word completion if the directory name ini- + tially supplied does not exist. + + ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in + the results of pathname expansion. The filenames ````..'''' + and ````....'''' must always be matched explicitly, even if + ddoottgglloobb is set. + + eexxeeccffaaiill + If set, a non-interactive shell will not exit if it can- + not execute the file specified as an argument to the + eexxeecc builtin command. An interactive shell does not + exit if eexxeecc fails. + + eexxppaanndd__aalliiaasseess + If set, aliases are expanded as described above under + AALLIIAASSEESS. This option is enabled by default for interac- + tive shells. + + eexxttddeebbuugg + If set at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the ----ddeebbuuggggeerr option. If set af- + ter invocation, behavior intended for use by debuggers + is enabled: + + 11.. The --FF option to the ddeeccllaarree builtin displays the + source file name and line number corresponding to + each function name supplied as an argument. + + 22.. If the command run by the DDEEBBUUGG trap returns a + non-zero value, the next command is skipped and + not executed. + + 33.. If the command run by the DDEEBBUUGG trap returns a + value of 2, and the shell is executing in a sub- + routine (a shell function or a shell script exe- + cuted by the .. or ssoouurrccee builtins), the shell + simulates a call to rreettuurrnn. + + 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described + in their descriptions above. + + 55.. Function tracing is enabled: command substitu- + tion, shell functions, and subshells invoked with + (( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps. + + 66.. Error tracing is enabled: command substitution, + shell functions, and subshells invoked with (( + _c_o_m_m_a_n_d )) inherit the EERRRR trap. + + eexxttgglloobb If set, the extended pattern matching features described + above under PPaatthhnnaammee EExxppaannssiioonn are enabled. + + eexxttqquuoottee + If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed + within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double + quotes. This option is enabled by default. + + ffaaiillgglloobb + If set, patterns which fail to match filenames during + pathname expansion result in an expansion error. + + ffoorrccee__ffiiggnnoorree + If set, the suffixes specified by the FFIIGGNNOORREE shell + variable cause words to be ignored when performing word + completion even if the ignored words are the only possi- + ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS above for a de- + scription of FFIIGGNNOORREE. This option is enabled by de- + fault. + + gglloobbaasscciiiirraannggeess + If set, range expressions used in pattern matching + bracket expressions (see PPaatttteerrnn MMaattcchhiinngg above) behave + as if in the traditional C locale when performing com- + parisons. That is, the current locale's collating se- + quence is not taken into account, so bb will not collate + between AA and BB, and upper-case and lower-case ASCII + characters will collate together. + + gglloobbssttaarr + If set, the pattern **** used in a pathname expansion con- + text will match all files and zero or more directories + and subdirectories. If the pattern is followed by a //, + only directories and subdirectories match. + + ggnnuu__eerrrrffmmtt + If set, shell error messages are written in the standard + GNU error message format. + + hhiissttaappppeenndd + If set, the history list is appended to the file named + by the value of the HHIISSTTFFIILLEE variable when the shell ex- + its, rather than overwriting the file. + + hhiissttrreeeeddiitt + If set, and rreeaaddlliinnee is being used, a user is given the + opportunity to re-edit a failed history substitution. + + hhiissttvveerriiffyy + If set, and rreeaaddlliinnee is being used, the results of his- + tory substitution are not immediately passed to the + shell parser. Instead, the resulting line is loaded + into the rreeaaddlliinnee editing buffer, allowing further modi- + fication. + + hhoossttccoommpplleettee + If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to + perform hostname completion when a word containing a @@ + is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE + above). This is enabled by default. + + hhuuppoonneexxiitt + If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter- + active login shell exits. + + iinnhheerriitt__eerrrreexxiitt + If set, command substitution inherits the value of the + eerrrreexxiitt option, instead of unsetting it in the subshell + environment. This option is enabled when _p_o_s_i_x _m_o_d_e is + enabled. + + iinntteerraaccttiivvee__ccoommmmeennttss + If set, allow a word beginning with ## to cause that word + and all remaining characters on that line to be ignored + in an interactive shell (see CCOOMMMMEENNTTSS above). This op- + tion is enabled by default. + + llaassttppiippee + If set, and job control is not active, the shell runs + the last command of a pipeline not executed in the back- + ground in the current shell environment. + + lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line + commands are saved to the history with embedded newlines + rather than using semicolon separators where possible. + + llooccaallvvaarr__iinnhheerriitt + If set, local variables inherit the value and attributes + of a variable of the same name that exists at a previous + scope before any new value is assigned. The nameref at- + tribute is not inherited. + + llooccaallvvaarr__uunnsseett + If set, calling uunnsseett on local variables in previous + function scopes marks them so subsequent lookups find + them unset until that function returns. This is identi- + cal to the behavior of unsetting local variables at the + current function scope. + + llooggiinn__sshheellll + The shell sets this option if it is started as a login + shell (see IINNVVOOCCAATTIIOONN above). The value may not be + changed. + + mmaaiillwwaarrnn + If set, and a file that bbaasshh is checking for mail has + been accessed since the last time it was checked, the + message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis- + played. + + nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn + If set, and rreeaaddlliinnee is being used, bbaasshh will not at- + tempt to search the PPAATTHH for possible completions when + completion is attempted on an empty line. + + nnooccaasseegglloobb + If set, bbaasshh matches filenames in a case-insensitive + fashion when performing pathname expansion (see PPaatthhnnaammee + EExxppaannssiioonn above). + + nnooccaasseemmaattcchh + If set, bbaasshh matches patterns in a case-insensitive + fashion when performing matching while executing ccaassee or + [[[[ conditional commands, when performing pattern substi- + tution word expansions, or when filtering possible com- + pletions as part of programmable completion. + + nnuullllgglloobb + If set, bbaasshh allows patterns which match no files (see + PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string, + rather than themselves. + + pprrooggccoommpp + If set, the programmable completion facilities (see PPrroo-- + ggrraammmmaabbllee CCoommpplleettiioonn above) are enabled. This option is + enabled by default. + + pprrooggccoommpp__aalliiaass + If set, and programmable completion is enabled, bbaasshh + treats a command name that doesn't have any completions + as a possible alias and attempts alias expansion. If it + has an alias, bbaasshh attempts programmable completion us- + ing the command word resulting from the expanded alias. + + pprroommppttvvaarrss + If set, prompt strings undergo parameter expansion, com- + mand substitution, arithmetic expansion, and quote re- + moval after being expanded as described in PPRROOMMPPTTIINNGG + above. This option is enabled by default. + + rreessttrriicctteedd__sshheellll + The shell sets this option if it is started in re- + stricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value + may not be changed. This is not reset when the startup + files are executed, allowing the startup files to dis- + cover whether or not a shell is restricted. + + sshhiifftt__vveerrbboossee + If set, the sshhiifftt builtin prints an error message when + the shift count exceeds the number of positional parame- + ters. + + ssoouurrcceeppaatthh + If set, the ssoouurrccee (..) builtin uses the value of PPAATTHH to + find the directory containing the file supplied as an + argument. This option is enabled by default. + + xxppgg__eecchhoo + If set, the eecchhoo builtin expands backslash-escape se- + quences by default. + + ssuussppeenndd [--ff] + Suspend the execution of this shell until it receives a SSIIGGCCOONNTT + signal. A login shell cannot be suspended; the --ff option can be + used to override this and force the suspension. The return sta- + tus is 0 unless the shell is a login shell and --ff is not sup- + plied, or if job control is not enabled. + + tteesstt _e_x_p_r + [[ _e_x_p_r ]] + Return a status of 0 (true) or 1 (false) depending on the evalu- + ation of the conditional expression _e_x_p_r. Each operator and op- + erand must be a separate argument. Expressions are composed of + the primaries described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. + tteesstt does not accept any options, nor does it accept and ignore + an argument of ---- as signifying the end of options. + + Expressions may be combined using the following operators, + listed in decreasing order of precedence. The evaluation de- + pends on the number of arguments; see below. Operator prece- + dence is used when there are five or more arguments. + !! _e_x_p_r True if _e_x_p_r is false. + (( _e_x_p_r )) + Returns the value of _e_x_p_r. This may be used to override + the normal precedence of operators. + _e_x_p_r_1 -aa _e_x_p_r_2 + True if both _e_x_p_r_1 and _e_x_p_r_2 are true. + _e_x_p_r_1 -oo _e_x_p_r_2 + True if either _e_x_p_r_1 or _e_x_p_r_2 is true. + + tteesstt and [[ evaluate conditional expressions using a set of rules + based on the number of arguments. + + 0 arguments + The expression is false. + 1 argument + The expression is true if and only if the argument is not + null. + 2 arguments + If the first argument is !!, the expression is true if and + only if the second argument is null. If the first argu- + ment is one of the unary conditional operators listed + above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is + true if the unary test is true. If the first argument is + not a valid unary conditional operator, the expression is + false. + 3 arguments + The following conditions are applied in the order listed. + If the second argument is one of the binary conditional + operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the + result of the expression is the result of the binary test + using the first and third arguments as operands. The --aa + and --oo operators are considered binary operators when + there are three arguments. If the first argument is !!, + the value is the negation of the two-argument test using + the second and third arguments. If the first argument is + exactly (( and the third argument is exactly )), the result + is the one-argument test of the second argument. Other- + wise, the expression is false. + 4 arguments + If the first argument is !!, the result is the negation of + the three-argument expression composed of the remaining + arguments. Otherwise, the expression is parsed and eval- + uated according to precedence using the rules listed + above. + 5 or more arguments + The expression is parsed and evaluated according to + precedence using the rules listed above. + + When used with tteesstt or [[, the << and >> operators sort lexico- + graphically using ASCII ordering. + + ttiimmeess Print the accumulated user and system times for the shell and + for processes run from the shell. The return status is 0. + + ttrraapp [--llpp] [[_a_r_g] _s_i_g_s_p_e_c ...] + The command _a_r_g is to be read and executed when the shell re- + ceives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a sin- + gle _s_i_g_s_p_e_c) or --, each specified signal is reset to its origi- + nal disposition (the value it had upon entrance to the shell). + If _a_r_g is the null string the signal specified by each _s_i_g_s_p_e_c + is ignored by the shell and by the commands it invokes. If _a_r_g + is not present and --pp has been supplied, then the trap commands + associated with each _s_i_g_s_p_e_c are displayed. If no arguments are + supplied or if only --pp is given, ttrraapp prints the list of com- + mands associated with each signal. The --ll option causes the + shell to print a list of signal names and their corresponding + numbers. Each _s_i_g_s_p_e_c is either a signal name defined in <_s_i_g_- + _n_a_l_._h>, or a signal number. Signal names are case insensitive + and the SSIIGG prefix is optional. + + If a _s_i_g_s_p_e_c is EEXXIITT (0) the command _a_r_g is executed on exit + from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe- + cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command, + _s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the + first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR + above). Refer to the description of the eexxttddeebbuugg option to the + sshhoopptt builtin for details of its effect on the DDEEBBUUGG trap. If a + _s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is executed each time a shell + function or a script executed with the .. or ssoouurrccee builtins fin- + ishes executing. + + If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a + pipeline (which may consist of a single simple command), a list, + or a compound command returns a non-zero exit status, subject to + the following conditions. The EERRRR trap is not executed if the + failed command is part of the command list immediately following + a wwhhiillee or uunnttiill keyword, part of the test in an _i_f statement, + part of a command executed in a &&&& or |||| list except the command + following the final &&&& or ||||, any command in a pipeline but the + last, or if the command's return value is being inverted using + !!. These are the same conditions obeyed by the eerrrreexxiitt (--ee) op- + tion. + + Signals ignored upon entry to the shell cannot be trapped or re- + set. Trapped signals that are not being ignored are reset to + their original values in a subshell or subshell environment when + one is created. The return status is false if any _s_i_g_s_p_e_c is + invalid; otherwise ttrraapp returns true. + + ttyyppee [--aaffttppPP] _n_a_m_e [_n_a_m_e ...] + With no options, indicate how each _n_a_m_e would be interpreted if + used as a command name. If the --tt option is used, ttyyppee prints a + string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or + _f_i_l_e if _n_a_m_e is an alias, shell reserved word, function, + builtin, or disk file, respectively. If the _n_a_m_e is not found, + then nothing is printed, and an exit status of false is re- + turned. If the --pp option is used, ttyyppee either returns the name + of the disk file that would be executed if _n_a_m_e were specified + as a command name, or nothing if ``type -t name'' would not re- + turn _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e, + even if ``type -t name'' would not return _f_i_l_e. If a command is + hashed, --pp and --PP print the hashed value, which is not necessar- + ily the file that appears first in PPAATTHH. If the --aa option is + used, ttyyppee prints all of the places that contain an executable + named _n_a_m_e. This includes aliases and functions, if and only if + the --pp option is not also used. The table of hashed commands is + not consulted when using --aa. The --ff option suppresses shell + function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true + if all of the arguments are found, false if any are not found. + + uulliimmiitt [--HHSS] --aa + uulliimmiitt [--HHSS] [--bbccddeeffiikkllmmnnppqqrrssttuuvvxxPPRRTT [_l_i_m_i_t]] + Provides control over the resources available to the shell and + to processes started by it, on systems that allow such control. + The --HH and --SS options specify that the hard or soft limit is set + for the given resource. A hard limit cannot be increased by a + non-root user once it is set; a soft limit may be increased up + to the value of the hard limit. If neither --HH nor --SS is speci- + fied, both the soft and hard limits are set. The value of _l_i_m_i_t + can be a number in the unit specified for the resource or one of + the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which stand for the + current hard limit, the current soft limit, and no limit, re- + spectively. If _l_i_m_i_t is omitted, the current value of the soft + limit of the resource is printed, unless the --HH option is given. + When more than one resource is specified, the limit name and + unit, if appropriate, are printed before the value. Other op- + tions are interpreted as follows: + --aa All current limits are reported; no limits are set + --bb The maximum socket buffer size + --cc The maximum size of core files created + --dd The maximum size of a process's data segment + --ee The maximum scheduling priority ("nice") + --ff The maximum size of files written by the shell and its + children + --ii The maximum number of pending signals + --kk The maximum number of kqueues that may be allocated + --ll The maximum size that may be locked into memory + --mm The maximum resident set size (many systems do not honor + this limit) + --nn The maximum number of open file descriptors (most systems + do not allow this value to be set) + --pp The pipe size in 512-byte blocks (this may not be set) + --qq The maximum number of bytes in POSIX message queues + --rr The maximum real-time scheduling priority + --ss The maximum stack size + --tt The maximum amount of cpu time in seconds + --uu The maximum number of processes available to a single + user + --vv The maximum amount of virtual memory available to the + shell and, on some systems, to its children + --xx The maximum number of file locks + --PP The maximum number of pseudoterminals + --RR The maximum time a real-time process can run before + blocking, in microseconds + --TT The maximum number of threads + + If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the + new value of the specified resource. If no option is given, + then --ff is assumed. Values are in 1024-byte increments, except + for --tt, which is in seconds; --RR, which is in microseconds; --pp, + which is in units of 512-byte blocks; --PP, --TT, --bb, --kk, --nn, and + --uu, which are unscaled values; and, when in posix mode, --cc and + --ff, which are in 512-byte increments. The return status is 0 + unless an invalid option or argument is supplied, or an error + occurs while setting a new limit. + + uummaasskk [--pp] [--SS] [_m_o_d_e] + The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with + a digit, it is interpreted as an octal number; otherwise it is + interpreted as a symbolic mode mask similar to that accepted by + _c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is + printed. The --SS option causes the mask to be printed in sym- + bolic form; the default output is an octal number. If the --pp + option is supplied, and _m_o_d_e is omitted, the output is in a form + that may be reused as input. The return status is 0 if the mode + was successfully changed or if no _m_o_d_e argument was supplied, + and false otherwise. + + uunnaalliiaass [-aa] [_n_a_m_e ...] + Remove each _n_a_m_e from the list of defined aliases. If --aa is + supplied, all alias definitions are removed. The return value + is true unless a supplied _n_a_m_e is not a defined alias. + + uunnsseett [-ffvv] [-nn] [_n_a_m_e ...] + For each _n_a_m_e, remove the corresponding variable or function. + If the --vv option is given, each _n_a_m_e refers to a shell variable, + and that variable is removed. Read-only variables may not be + unset. If --ff is specified, each _n_a_m_e refers to a shell func- + tion, and the function definition is removed. If the --nn option + is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f attribute, + _n_a_m_e will be unset rather than the variable it references. --nn + has no effect if the --ff option is supplied. If no options are + supplied, each _n_a_m_e refers to a variable; if there is no vari- + able by that name, a function with that name, if any, is unset. + Each unset variable or function is removed from the environment + passed to subsequent commands. If any of BBAASSHH__AALLIIAASSEESS, + BBAASSHH__AARRGGVV00, BBAASSHH__CCMMDDSS, BBAASSHH__CCOOMMMMAANNDD, BBAASSHH__SSUUBBSSHHEELLLL, BBAASSHHPPIIDD, + CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, EEPPOOCCHHSSEECCOONNDDSS, FFUUNNCC-- + NNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECCOONNDDSS, or SSRRAANNDDOOMM are + unset, they lose their special properties, even if they are sub- + sequently reset. The exit status is true unless a _n_a_m_e is read- + only. + + wwaaiitt [--ffnn] [--pp _v_a_r_n_a_m_e] [_i_d _._._.] + Wait for each specified child process and return its termination + status. Each _i_d may be a process ID or a job specification; if + a job spec is given, all processes in that job's pipeline are + waited for. If _i_d is not given, wwaaiitt waits for all running + background jobs and the last-executed process substitution, if + its process id is the same as $$!!, and the return status is zero. + If the --nn option is supplied, wwaaiitt waits for a single job from + the list of _i_ds or, if no _i_ds are supplied, any job, to complete + and returns its exit status. If none of the supplied arguments + is a child of the shell, or if no arguments are supplied and the + shell has no unwaited-for children, the exit status is 127. If + the --pp option is supplied, the process or job identifier of the + job for which the exit status is returned is assigned to the + variable _v_a_r_n_a_m_e named by the option argument. The variable + will be unset initially, before any assignment. This is useful + only when the --nn option is supplied. Supplying the --ff option, + when job control is enabled, forces wwaaiitt to wait for _i_d to ter- + minate before returning its status, instead of returning when it + changes status. If _i_d specifies a non-existent process or job, + the return status is 127. Otherwise, the return status is the + exit status of the last process or job waited for. + +SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE + Bash-4.0 introduced the concept of a `shell compatibility level', spec- + ified as a set of options to the shopt builtin ccoommppaatt3311, ccoommppaatt3322, ccoomm-- + ppaatt4400, ccoommppaatt4411, and so on). There is only one current compatibility + level -- each option is mutually exclusive. The compatibility level is + intended to allow users to select behavior from previous versions that + is incompatible with newer versions while they migrate scripts to use + current features and behavior. It's intended to be a temporary solu- + tion. + + This section does not mention behavior that is standard for a particu- + lar version (e.g., setting ccoommppaatt3322 means that quoting the rhs of the + regexp matching operator quotes special regexp characters in the word, + which is default behavior in bash-3.2 and above). + + If a user enables, say, ccoommppaatt3322, it may affect the behavior of other + compatibility levels up to and including the current compatibility + level. The idea is that each compatibility level controls behavior + that changed in that version of bbaasshh, but that behavior may have been + present in earlier versions. For instance, the change to use locale- + based comparisons with the [[[[ command came in bash-4.1, and earlier + versions used ASCII-based comparisons, so enabling ccoommppaatt3322 will enable + ASCII-based comparisons as well. That granularity may not be suffi- + cient for all uses, and as a result users should employ compatibility + levels carefully. Read the documentation for a particular feature to + find out the current behavior. + + Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value as- + signed to this variable (a decimal version number like 4.2, or an inte- + ger corresponding to the ccoommppaatt_N_N option, like 42) determines the com- + patibility level. + + Starting with bash-4.4, Bash has begun deprecating older compatibility + levels. Eventually, the options will be removed in favor of BBAASSHH__CCOOMM-- + PPAATT. + + Bash-5.0 is the final version for which there will be an individual + shopt option for the previous version. Users should use BBAASSHH__CCOOMMPPAATT on + bash-5.0 and later versions. + + The following table describes the behavior changes controlled by each + compatibility level setting. The ccoommppaatt_N_N tag is used as shorthand for + setting the compatibility level to _N_N using one of the following mecha- + nisms. For versions prior to bash-5.0, the compatibility level may be + set using the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and + later versions, the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is re- + quired for bash-5.1 and later versions. + + ccoommppaatt3311 + +o quoting the rhs of the [[[[ command's regexp matching oper- + ator (=~) has no special effect + + ccoommppaatt3322 + +o interrupting a command list such as "a ; b ; c" causes + the execution of the next command in the list (in + bash-4.0 and later versions, the shell acts as if it re- + ceived the interrupt, so interrupting one command in a + list aborts the execution of the entire list) + + ccoommppaatt4400 + +o the << and >> operators to the [[[[ command do not consider + the current locale when comparing strings; they use ASCII + ordering. Bash versions prior to bash-4.1 use ASCII col- + lation and _s_t_r_c_m_p(3); bash-4.1 and later use the current + locale's collation sequence and _s_t_r_c_o_l_l(3). + + ccoommppaatt4411 + +o in _p_o_s_i_x mode, ttiimmee may be followed by options and still + be recognized as a reserved word (this is POSIX interpre- + tation 267) + +o in _p_o_s_i_x mode, the parser requires that an even number of + single quotes occur in the _w_o_r_d portion of a double- + quoted parameter expansion and treats them specially, so + that characters within the single quotes are considered + quoted (this is POSIX interpretation 221) + + ccoommppaatt4422 + +o the replacement string in double-quoted pattern substitu- + tion does not undergo quote removal, as it does in ver- + sions after bash-4.2 + +o in posix mode, single quotes are considered special when + expanding the _w_o_r_d portion of a double-quoted parameter + expansion and can be used to quote a closing brace or + other special character (this is part of POSIX interpre- + tation 221); in later versions, single quotes are not + special within double-quoted word expansions + + ccoommppaatt4433 + +o the shell does not print a warning message if an attempt + is made to use a quoted compound assignment as an argu- + ment to declare (declare -a foo='(1 2)'). Later versions + warn that this usage is deprecated + +o word expansion errors are considered non-fatal errors + that cause the current command to fail, even in posix + mode (the default behavior is to make them fatal errors + that cause the shell to exit) + +o when executing a shell function, the loop state + (while/until/etc.) is not reset, so bbrreeaakk or ccoonnttiinnuuee in + that function will break or continue loops in the calling + context. Bash-4.4 and later reset the loop state to pre- + vent this + + ccoommppaatt4444 + +o the shell sets up the values used by BBAASSHH__AARRGGVV and + BBAASSHH__AARRGGCC so they can expand to the shell's positional + parameters even if extended debugging mode is not enabled + +o a subshell inherits loops from its parent context, so + bbrreeaakk or ccoonnttiinnuuee will cause the subshell to exit. + Bash-5.0 and later reset the loop state to prevent the + exit + +o variable assignments preceding builtins like eexxppoorrtt and + rreeaaddoonnllyy that set attributes continue to affect variables + with the same name in the calling environment even if the + shell is not in posix mode + + ccoommppaatt5500 + +o Bash-5.1 changed the way $$RRAANNDDOOMM is generated to intro- + duce slightly more randomness. If the shell compatibility + level is set to 50 or lower, it reverts to the method + from bash-5.0 and previous versions, so seeding the ran- + dom number generator by assigning a value to RRAANNDDOOMM will + produce the same sequence as in bash-5.0 + +o If the command hash table is empty, bash versions prior + to bash-5.1 printed an informational message to that ef- + fect, even when producing output that can be reused as + input. Bash-5.1 suppresses that message when the --ll op- + tion is supplied. + +RREESSTTRRIICCTTEEDD SSHHEELLLL + If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at + invocation, the shell becomes restricted. A restricted shell is used + to set up an environment more controlled than the standard shell. It + behaves identically to bbaasshh with the exception that the following are + disallowed or not performed: + + +o changing directories with ccdd + + +o setting or unsetting the values of SSHHEELLLL, PPAATTHH, HHIISSTTFFIILLEE, EENNVV, + or BBAASSHH__EENNVV + + +o specifying command names containing // + + +o specifying a filename containing a // as an argument to the .. + builtin command + + +o specifying a filename containing a slash as an argument to the + hhiissttoorryy builtin command + + +o specifying a filename containing a slash as an argument to the + --pp option to the hhaasshh builtin command + + +o importing function definitions from the shell environment at + startup + + +o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at + startup + + +o redirecting output using the >, >|, <>, >&, &>, and >> redirect- + ion operators + + +o using the eexxeecc builtin command to replace the shell with another + command + + +o adding or deleting builtin commands with the --ff and --dd options + to the eennaabbllee builtin command + + +o using the eennaabbllee builtin command to enable disabled shell + builtins + + +o specifying the --pp option to the ccoommmmaanndd builtin command + + +o turning off restricted mode with sseett ++rr or sseett ++oo rreessttrriicctteedd. + + These restrictions are enforced after any startup files are read. + + When a command that is found to be a shell script is executed (see CCOOMM-- + MMAANNDD EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell + spawned to execute the script. + +SSEEEE AALLSSOO + _B_a_s_h _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, Brian Fox and Chet Ramey + _T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox and Chet Ramey + _T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox and Chet Ramey + _P_o_r_t_a_b_l_e _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e _(_P_O_S_I_X_) _P_a_r_t _2_: _S_h_e_l_l _a_n_d _U_t_i_l_i_- + _t_i_e_s, IEEE -- + http://pubs.opengroup.org/onlinepubs/9699919799/ + http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode + _s_h(1), _k_s_h(1), _c_s_h(1) + _e_m_a_c_s(1), _v_i(1) + _r_e_a_d_l_i_n_e(3) + +FFIILLEESS + _/_b_i_n_/_b_a_s_h + The bbaasshh executable + _/_e_t_c_/_p_r_o_f_i_l_e + The systemwide initialization file, executed for login shells + _~_/_._b_a_s_h___p_r_o_f_i_l_e + The personal initialization file, executed for login shells + _~_/_._b_a_s_h_r_c + The individual per-interactive-shell startup file + _~_/_._b_a_s_h___l_o_g_o_u_t + The individual login shell cleanup file, executed when a login + shell exits + _~_/_._i_n_p_u_t_r_c + Individual _r_e_a_d_l_i_n_e initialization file + +AAUUTTHHOORRSS + Brian Fox, Free Software Foundation + bfox@gnu.org + + Chet Ramey, Case Western Reserve University + chet.ramey@case.edu + +BBUUGG RREEPPOORRTTSS + If you find a bug in bbaasshh,, you should report it. But first, you should + make sure that it really is a bug, and that it appears in the latest + version of bbaasshh. The latest version is always available from + _f_t_p_:_/_/_f_t_p_._g_n_u_._o_r_g_/_p_u_b_/_g_n_u_/_b_a_s_h_/. + + Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g + command to submit a bug report. If you have a fix, you are encouraged + to mail that as well! Suggestions and `philosophical' bug reports may + be mailed to _b_u_g_-_b_a_s_h_@_g_n_u_._o_r_g or posted to the Usenet newsgroup + ggnnuu..bbaasshh..bbuugg. + + ALL bug reports should include: + + The version number of bbaasshh + The hardware and operating system + The compiler used to compile + A description of the bug behaviour + A short script or `recipe' which exercises the bug + + _b_a_s_h_b_u_g inserts the first three items automatically into the template + it provides for filing a bug report. + + Comments and bug reports concerning this manual page should be directed + to _c_h_e_t_._r_a_m_e_y_@_c_a_s_e_._e_d_u. + +BBUUGGSS + It's too big and too slow. + + There are some subtle differences between bbaasshh and traditional versions + of sshh, mostly because of the PPOOSSIIXX specification. + + Aliases are confusing in some uses. + + Shell builtin commands and functions are not stoppable/restartable. + + Compound commands and command sequences of the form `a ; b ; c' are not + handled gracefully when process suspension is attempted. When a + process is stopped, the shell immediately executes the next command in + the sequence. It suffices to place the sequence of commands between + parentheses to force it into a subshell, which may be stopped as a + unit. + + Array variables may not (yet) be exported. + + There may be only one active coprocess at a time. + + + +GNU Bash 5.1 2020 October 29 BASH(1) diff --git a/bash-5.1/doc/bash.1 b/bash-5.1/doc/bash.1 new file mode 100644 index 0000000000000000000000000000000000000000..edd27917dae74ff662f8315fab0816fbc9d070a5 --- /dev/null +++ b/bash-5.1/doc/bash.1 @@ -0,0 +1,11309 @@ +.\" +.\" MAN PAGE COMMENTS to +.\" +.\" Chet Ramey +.\" Case Western Reserve University +.\" chet.ramey@case.edu +.\" +.\" Last Change: Wed Sep 23 09:28:31 EDT 2020 +.\" +.\" bash_builtins, strip all but Built-Ins section +.if \n(zZ=1 .ig zZ +.if \n(zY=1 .ig zY +.TH BASH 1 "2020 October 29" "GNU Bash 5.1" +.\" +.\" There's some problem with having a `@' +.\" in a tagged paragraph with the BSD man macros. +.\" It has to do with `@' appearing in the }1 macro. +.\" This is a problem on 4.3 BSD and Ultrix, but Sun +.\" appears to have fixed it. +.\" If you're seeing the characters +.\" `@u-3p' appearing before the lines reading +.\" `possible-hostname-completions +.\" and `complete-hostname' down in READLINE, +.\" then uncomment this redefinition. +.\" +.\" .de }1 +.\" .ds ]X \&\\*(]B\\ +.\" .nr )E 0 +.\" .if !"\\$1"" .nr )I \\$1n +.\" .}f +.\" .ll \\n(LLu +.\" .in \\n()Ru+\\n(INu+\\n()Iu +.\" .ti \\n(INu +.\" .ie !\\n()Iu+\\n()Ru-\w\\*(]Xu-3p \{\\*(]X +.\" .br\} +.\" .el \\*(]X\h|\\n()Iu+\\n()Ru\c +.\" .}f +.\" .. +.\" +.\" File Name macro. This used to be `.PN', for Path Name, +.\" but Sun doesn't seem to like that very much. +.\" +.de FN +\fI\|\\$1\|\fP +.. +.SH NAME +bash \- GNU Bourne-Again SHell +.SH SYNOPSIS +.B bash +[options] +[command_string | file] +.SH COPYRIGHT +.if n Bash is Copyright (C) 1989-2020 by the Free Software Foundation, Inc. +.if t Bash is Copyright \(co 1989-2020 by the Free Software Foundation, Inc. +.SH DESCRIPTION +.B Bash +is an \fBsh\fR-compatible command language interpreter that +executes commands read from the standard input or from a file. +.B Bash +also incorporates useful features from the \fIKorn\fP and \fIC\fP +shells (\fBksh\fP and \fBcsh\fP). +.PP +.B Bash +is intended to be a conformant implementation of the +Shell and Utilities portion of the IEEE POSIX specification +(IEEE Standard 1003.1). +.B Bash +can be configured to be POSIX-conformant by default. +.SH OPTIONS +All of the single-character shell options documented in the +description of the \fBset\fR builtin command, including \fB\-o\fP, +can be used as options when the shell is invoked. +In addition, \fBbash\fR +interprets the following options when it is invoked: +.PP +.PD 0 +.TP 10 +.B \-c +If the +.B \-c +option is present, then commands are read from the first non-option argument +.IR command_string . +If there are arguments after the +.IR command_string , +the first argument is assigned to +.B $0 +and any remaining arguments are assigned to the positional parameters. +The assignment to +.B $0 +sets the name of the shell, which is used in warning and error messages. +.TP +.B \-i +If the +.B \-i +option is present, the shell is +.IR interactive . +.TP +.B \-l +Make +.B bash +act as if it had been invoked as a login shell (see +.SM +.B INVOCATION +below). +.TP +.B \-r +If the +.B \-r +option is present, the shell becomes +.I restricted +(see +.SM +.B "RESTRICTED SHELL" +below). +.TP +.B \-s +If the +.B \-s +option is present, or if no arguments remain after option +processing, then commands are read from the standard input. +This option allows the positional parameters to be set +when invoking an interactive shell or when reading input +through a pipe. +.TP +.B \-D +A list of all double-quoted strings preceded by \fB$\fP +is printed on the standard output. +These are the strings that +are subject to language translation when the current locale +is not \fBC\fP or \fBPOSIX\fP. +This implies the \fB\-n\fP option; no commands will be executed. +.TP +.B [\-+]O [\fIshopt_option\fP] +\fIshopt_option\fP is one of the shell options accepted by the +\fBshopt\fP builtin (see +.SM +.B SHELL BUILTIN COMMANDS +below). +If \fIshopt_option\fP is present, \fB\-O\fP sets the value of that option; +\fB+O\fP unsets it. +If \fIshopt_option\fP is not supplied, the names and values of the shell +options accepted by \fBshopt\fP are printed on the standard output. +If the invocation option is \fB+O\fP, the output is displayed in a format +that may be reused as input. +.TP +.B \-\- +A +.B \-\- +signals the end of options and disables further option processing. +Any arguments after the +.B \-\- +are treated as filenames and arguments. An argument of +.B \- +is equivalent to \fB\-\-\fP. +.PD +.PP +.B Bash +also interprets a number of multi-character options. +These options must appear on the command line before the +single-character options to be recognized. +.PP +.PD 0 +.TP +.B \-\-debugger +Arrange for the debugger profile to be executed before the shell +starts. +Turns on extended debugging mode (see the description of the +.B extdebug +option to the +.B shopt +builtin below). +.TP +.B \-\-dump\-po\-strings +Equivalent to \fB\-D\fP, but the output is in the GNU \fIgettext\fP +\fBpo\fP (portable object) file format. +.TP +.B \-\-dump\-strings +Equivalent to \fB\-D\fP. +.TP +.B \-\-help +Display a usage message on standard output and exit successfully. +.TP +\fB\-\-init\-file\fP \fIfile\fP +.PD 0 +.TP +\fB\-\-rcfile\fP \fIfile\fP +.PD +Execute commands from +.I file +instead of the standard personal initialization file +.I ~/.bashrc +if the shell is interactive (see +.SM +.B INVOCATION +below). +.TP +.B \-\-login +Equivalent to \fB\-l\fP. +.TP +.B \-\-noediting +Do not use the GNU +.B readline +library to read command lines when the shell is interactive. +.TP +.B \-\-noprofile +Do not read either the system-wide startup file +.FN /etc/profile +or any of the personal initialization files +.IR ~/.bash_profile , +.IR ~/.bash_login , +or +.IR ~/.profile . +By default, +.B bash +reads these files when it is invoked as a login shell (see +.SM +.B INVOCATION +below). +.TP +.B \-\-norc +Do not read and execute the personal initialization file +.I ~/.bashrc +if the shell is interactive. +This option is on by default if the shell is invoked as +.BR sh . +.TP +.B \-\-posix +Change the behavior of \fBbash\fP where the default operation differs +from the POSIX standard to match the standard (\fIposix mode\fP). +See +.SM +.B "SEE ALSO" +below for a reference to a document that details how posix mode affects +bash's behavior. +.TP +.B \-\-restricted +The shell becomes restricted (see +.SM +.B "RESTRICTED SHELL" +below). +.TP +.B \-\-rpm-requires +Produce the list of files that are required for the +shell script to run. This implies '-n' and is subject +to the same limitations as compile time error checking checking; +Command substitutions, Conditional expressions and +.BR eval +builtin are not parsed so some dependencies may be missed. +.TP +.B \-\-verbose +Equivalent to \fB\-v\fP. +.TP +.B \-\-version +Show version information for this instance of +.B bash +on the standard output and exit successfully. +.PD +.SH ARGUMENTS +If arguments remain after option processing, and neither the +.B \-c +nor the +.B \-s +option has been supplied, the first argument is assumed to +be the name of a file containing shell commands. +If +.B bash +is invoked in this fashion, +.B $0 +is set to the name of the file, and the positional parameters +are set to the remaining arguments. +.B Bash +reads and executes commands from this file, then exits. +\fBBash\fP's exit status is the exit status of the last command +executed in the script. +If no commands are executed, the exit status is 0. +An attempt is first made to open the file in the current directory, and, +if no file is found, then the shell searches the directories in +.SM +.B PATH +for the script. +.SH INVOCATION +A \fIlogin shell\fP is one whose first character of argument zero is a +.BR \- , +or one started with the +.B \-\-login +option. +.PP +An \fIinteractive\fP shell is one started without non-option arguments +(unless \fB\-s\fP is specified) +and without the +.B \-c +option +whose standard input and error are +both connected to terminals (as determined by +.IR isatty (3)), +or one started with the +.B \-i +option. +.SM +.B PS1 +is set and +.B $\- +includes +.B i +if +.B bash +is interactive, +allowing a shell script or a startup file to test this state. +.PP +The following paragraphs describe how +.B bash +executes its startup files. +If any of the files exist but cannot be read, +.B bash +reports an error. +Tildes are expanded in filenames as described below under +.B "Tilde Expansion" +in the +.SM +.B EXPANSION +section. +.PP +When +.B bash +is invoked as an interactive login shell, or as a non-interactive shell +with the \fB\-\-login\fP option, it first reads and +executes commands from the file \fI/etc/profile\fP, if that +file exists. +After reading that file, it looks for \fI~/.bash_profile\fP, +\fI~/.bash_login\fP, and \fI~/.profile\fP, in that order, and reads +and executes commands from the first one that exists and is readable. +The +.B \-\-noprofile +option may be used when the shell is started to inhibit this behavior. +.PP +When an interactive login shell exits, +or a non-interactive login shell executes the \fBexit\fP builtin command, +.B bash +reads and executes commands from the files \fI~/.bash_logout\fP +and \fI/etc/bash.bash_logout\fP, if the files exists. +.PP +When an interactive shell that is not a login shell is started, +.B bash +reads and executes commands from \fI~/.bashrc\fP, if that file exists. +This may be inhibited by using the +.B \-\-norc +option. +The \fB\-\-rcfile\fP \fIfile\fP option will force +.B bash +to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP. +.PP +When +.B bash +is started non-interactively, to run a shell script, for example, it +looks for the variable +.SM +.B BASH_ENV +in the environment, expands its value if it appears there, and uses the +expanded value as the name of a file to read and execute. +.B Bash +behaves as if the following command were executed: +.sp .5 +.RS +.if t \f(CWif [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi\fP +.if n if [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi +.RE +.sp .5 +but the value of the +.SM +.B PATH +variable is not used to search for the filename. +.PP +If +.B bash +is invoked with the name +.BR sh , +it tries to mimic the startup behavior of historical versions of +.B sh +as closely as possible, +while conforming to the POSIX standard as well. +When invoked as an interactive login shell, or a non-interactive +shell with the \fB\-\-login\fP option, it first attempts to +read and execute commands from +.I /etc/profile +and +.IR ~/.profile , +in that order. +The +.B \-\-noprofile +option may be used to inhibit this behavior. +When invoked as an interactive shell with the name +.BR sh , +.B bash +looks for the variable +.SM +.BR ENV , +expands its value if it is defined, and uses the +expanded value as the name of a file to read and execute. +Since a shell invoked as +.B sh +does not attempt to read and execute commands from any other startup +files, the +.B \-\-rcfile +option has no effect. +A non-interactive shell invoked with the name +.B sh +does not attempt to read any other startup files. +When invoked as +.BR sh , +.B bash +enters +.I posix +mode after the startup files are read. +.PP +When +.B bash +is started in +.I posix +mode, as with the +.B \-\-posix +command line option, it follows the POSIX standard for startup files. +In this mode, interactive shells expand the +.SM +.B ENV +variable and commands are read and executed from the file +whose name is the expanded value. +No other startup files are read. +.PP +.B Bash +attempts to determine when it is being run with its standard input +connected to a network connection, as when executed by the remote shell +daemon, usually \fIrshd\fP, or the secure shell daemon \fIsshd\fP. +If +.B bash +determines it is being run in this fashion, it reads and executes +commands from \fI~/.bashrc\fP, if that file exists and is readable. +It will not do this if invoked as \fBsh\fP. +The +.B \-\-norc +option may be used to inhibit this behavior, and the +.B \-\-rcfile +option may be used to force another file to be read, but neither +\fIrshd\fP nor \fIsshd\fP generally invoke the shell with those options +or allow them to be specified. +.PP +If the shell is started with the effective user (group) id not equal to the +real user (group) id, and the \fB\-p\fP option is not supplied, no startup +files are read, shell functions are not inherited from the environment, the +.SM +.BR SHELLOPTS , +.SM +.BR BASHOPTS , +.SM +.BR CDPATH , +and +.SM +.B GLOBIGNORE +variables, if they appear in the environment, are ignored, +and the effective user id is set to the real user id. +If the \fB\-p\fP option is supplied at invocation, the startup behavior is +the same, but the effective user id is not reset. +.SH DEFINITIONS +The following definitions are used throughout the rest of this +document. +.PD 0 +.TP +.B blank +A space or tab. +.TP +.B word +A sequence of characters considered as a single unit by the shell. +Also known as a +.BR token . +.TP +.B name +A +.I word +consisting only of alphanumeric characters and underscores, and +beginning with an alphabetic character or an underscore. Also +referred to as an +.BR identifier . +.TP +.B metacharacter +A character that, when unquoted, separates words. One of the following: +.br +.RS +.PP +.if t \fB| & ; ( ) < > space tab newline\fP +.if n \fB| & ; ( ) < > space tab newline\fP +.RE +.TP +.B control operator +A \fItoken\fP that performs a control function. It is one of the following +symbols: +.RS +.PP +.if t \fB|| & && ; ;; ;& ;;& ( ) | |& \fP +.if n \fB|| & && ; ;; ;& ;;& ( ) | |& \fP +.RE +.PD +.SH "RESERVED WORDS" +\fIReserved words\fP are words that have a special meaning to the shell. +The following words are recognized as reserved when unquoted and either +the first word of a command (see +.SM +.B SHELL GRAMMAR +below), the third word of a +.B case +or +.B select +command +(only \fBin\fP is valid), or the third word of a +.B for +command (only \fBin\fP and \fBdo\fP are valid): +.if t .RS +.PP +.B +.if n ! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]] +.if t ! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]] +.if t .RE +.SH "SHELL GRAMMAR" +.SS Simple Commands +A \fIsimple command\fP is a sequence of optional variable assignments +followed by \fBblank\fP-separated words and redirections, and +terminated by a \fIcontrol operator\fP. The first word +specifies the command to be executed, and is passed as argument zero. +The remaining words are passed as arguments to the invoked command. +.PP +The return value of a \fIsimple command\fP is its exit status, or +128+\fIn\^\fP if the command is terminated by signal +.IR n . +.SS Pipelines +A \fIpipeline\fP is a sequence of one or more commands separated by +one of the control operators +.B | +or \fB|&\fP. +The format for a pipeline is: +.RS +.PP +[\fBtime\fP [\fB\-p\fP]] [ ! ] \fIcommand\fP [ [\fB|\fP\(bv\fB|&\fP] \fIcommand2\fP ... ] +.RE +.PP +The standard output of +.I command +is connected via a pipe to the standard input of +.IR command2 . +This connection is performed before any redirections specified by the +command (see +.SM +.B REDIRECTION +below). +If \fB|&\fP is used, \fIcommand\fP's standard error, in addition to its +standard output, is connected to +\fIcommand2\fP's standard input through the pipe; +it is shorthand for \fB2>&1 |\fP. +This implicit redirection of the standard error to the standard output is +performed after any redirections specified by the command. +.PP +The return status of a pipeline is the exit status of the last +command, unless the \fBpipefail\fP option is enabled. +If \fBpipefail\fP is enabled, the pipeline's return status is the +value of the last (rightmost) command to exit with a non-zero status, +or zero if all commands exit successfully. +If the reserved word +.B ! +precedes a pipeline, the exit status of that pipeline is the logical +negation of the exit status as described above. +The shell waits for all commands in the pipeline to +terminate before returning a value. +.PP +If the +.B time +reserved word precedes a pipeline, the elapsed as well as user and +system time consumed by its execution are reported when the pipeline +terminates. +The \fB\-p\fP option changes the output format to that specified by POSIX. +When the shell is in \fIposix mode\fP, it does not recognize +\fBtime\fP as a reserved word if the next token begins with a `-'. +The +.SM +.B TIMEFORMAT +variable may be set to a format string that specifies how the timing +information should be displayed; see the description of +.SM +.B TIMEFORMAT +under +.B "Shell Variables" +below. +.PP +When the shell is in \fIposix mode\fP, \fBtime\fP +may be followed by a newline. In this case, the shell displays the +total user and system time consumed by the shell and its children. +The +.SM +.B TIMEFORMAT +variable may be used to specify the format of +the time information. +.PP +Each command in a pipeline is executed as a separate process (i.e., in a +subshell). +See +.SM +\fBCOMMAND EXECUTION ENVIRONMENT\fP +for a description of a subshell environment. +If the \fBlastpipe\fP option is enabled using the \fBshopt\fP builtin +(see the description of \fBshopt\fP below), +the last element of a pipeline may be run by the shell process. +.SS Lists +A \fIlist\fP is a sequence of one or more pipelines separated by one +of the operators +.BR ; , +.BR & , +.BR && , +or +.BR || , +and optionally terminated by one of +.BR ; , +.BR & , +or +.BR . +.PP +Of these list operators, +.B && +and +.B || +have equal precedence, followed by +.B ; +and +.BR & , +which have equal precedence. +.PP +A sequence of one or more newlines may appear in a \fIlist\fP instead +of a semicolon to delimit commands. +.PP +If a command is terminated by the control operator +.BR & , +the shell executes the command in the \fIbackground\fP +in a subshell. +The shell does not wait for the command to +finish, and the return status is 0. +These are referred to as \fIasynchronous\fP commands. +Commands separated by a +.B ; +are executed sequentially; the shell waits for each +command to terminate in turn. The return status is the +exit status of the last command executed. +.PP +AND and OR lists are sequences of one or more pipelines separated by the +\fB&&\fP and \fB||\fP control operators, respectively. +AND and OR lists are executed with left associativity. +An AND list has the form +.RS +.PP +\fIcommand1\fP \fB&&\fP \fIcommand2\fP +.RE +.PP +.I command2 +is executed if, and only if, +.I command1 +returns an exit status of zero (success). +.PP +An OR list has the form +.RS +.PP +\fIcommand1\fP \fB||\fP \fIcommand2\fP +.RE +.PP +.I command2 +is executed if, and only if, +.I command1 +returns a non-zero exit status. +The return status of +AND and OR lists is the exit status of the last command +executed in the list. +.SS Compound Commands +A \fIcompound command\fP is one of the following. +In most cases a \fIlist\fP in a command's description may be separated from +the rest of the command by one or more newlines, and may be followed by a +newline in place of a semicolon. +.TP +(\fIlist\fP) +\fIlist\fP is executed in a subshell environment (see +.SM +\fBCOMMAND EXECUTION ENVIRONMENT\fP +below). +Variable assignments and builtin +commands that affect the shell's environment do not remain in effect +after the command completes. The return status is the exit status of +\fIlist\fP. +.TP +{ \fIlist\fP; } +\fIlist\fP is simply executed in the current shell environment. +\fIlist\fP must be terminated with a newline or semicolon. +This is known as a \fIgroup command\fP. +The return status is the exit status of +\fIlist\fP. +Note that unlike the metacharacters \fB(\fP and \fB)\fP, \fB{\fP and +\fB}\fP are \fIreserved words\fP and must occur where a reserved +word is permitted to be recognized. Since they do not cause a word +break, they must be separated from \fIlist\fP by whitespace or another +shell metacharacter. +.TP +((\fIexpression\fP)) +The \fIexpression\fP is evaluated according to the rules described +below under +.SM +.BR "ARITHMETIC EVALUATION" . +If the value of the expression is non-zero, the return status is 0; +otherwise the return status is 1. This is exactly equivalent to +\fBlet "\fIexpression\fP"\fR. +.TP +\fB[[\fP \fIexpression\fP \fB]]\fP +Return a status of 0 or 1 depending on the evaluation of +the conditional expression \fIexpression\fP. +Expressions are composed of the primaries described below under +.SM +.BR "CONDITIONAL EXPRESSIONS" . +Word splitting and pathname expansion are not performed on the words +between the \fB[[\fP and \fB]]\fP; tilde expansion, +parameter and variable expansion, +arithmetic expansion, command substitution, process +substitution, and quote removal are performed. +Conditional operators such as \fB\-f\fP must be unquoted to be recognized +as primaries. +.if t .sp 0.5 +.if n .sp 1 +When used with \fB[[\fP, the \fB<\fP and \fB>\fP operators sort +lexicographically using the current locale. +.if t .sp 0.5 +.if n .sp 1 +When the \fB==\fP and \fB!=\fP operators are used, the string to the +right of the operator is considered a pattern and matched according +to the rules described below under \fBPattern Matching\fP, +as if the \fBextglob\fP shell option were enabled. +The \fB=\fP operator is equivalent to \fB==\fP. +If the +.B nocasematch +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +The return value is 0 if the string matches (\fB==\fP) or does not match +(\fB!=\fP) the pattern, and 1 otherwise. +Any part of the pattern may be quoted to force the quoted portion +to be matched as a string. +.if t .sp 0.5 +.if n .sp 1 +An additional binary operator, \fB=~\fP, is available, with the same +precedence as \fB==\fP and \fB!=\fP. +When it is used, the string to the right of the operator is considered +a POSIX extended regular expression and matched accordingly +(using the POSIX \fIregcomp\fP and \fIregexec\fP interfaces +usually described in \fIregex\fP(3)). +The return value is 0 if the string matches +the pattern, and 1 otherwise. +If the regular expression is syntactically incorrect, the conditional +expression's return value is 2. +If the +.B nocasematch +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +Any part of the pattern may be quoted to force the quoted portion +to be matched as a string. +Bracket expressions in regular expressions must be treated carefully, +since normal quoting characters lose their meanings between brackets. +If the pattern is stored in a shell variable, quoting the variable +expansion forces the entire pattern to be matched as a string. +.if t .sp 0.5 +.if n .sp 1 +The pattern will match if it matches any part of the string. +Anchor the pattern using the \fB^\fP and \fB$\fP regular expression +operators to force it to match the entire string. +The array variable +.SM +.B BASH_REMATCH +records which parts of the string matched the pattern. +The element of +.SM +.B BASH_REMATCH +with index 0 contains the portion of +the string matching the entire regular expression. +Substrings matched by parenthesized subexpressions within the regular +expression are saved in the remaining +.SM +.B BASH_REMATCH +indices. The element of +.SM +.B BASH_REMATCH +with index \fIn\fP is the portion of the +string matching the \fIn\fPth parenthesized subexpression. +.if t .sp 0.5 +.if n .sp 1 +Expressions may be combined using the following operators, listed +in decreasing order of precedence: +.if t .sp 0.5 +.if n .sp 1 +.RS +.PD 0 +.TP +.B ( \fIexpression\fP ) +Returns the value of \fIexpression\fP. +This may be used to override the normal precedence of operators. +.TP +.B ! \fIexpression\fP +True if +.I expression +is false. +.TP +\fIexpression1\fP \fB&&\fP \fIexpression2\fP +True if both +.I expression1 +and +.I expression2 +are true. +.TP +\fIexpression1\fP \fB||\fP \fIexpression2\fP +True if either +.I expression1 +or +.I expression2 +is true. +.PD +.LP +The \fB&&\fP and \fB||\fP +operators do not evaluate \fIexpression2\fP if the value of +\fIexpression1\fP is sufficient to determine the return value of +the entire conditional expression. +.RE +.TP +\fBfor\fP \fIname\fP [ [ \fBin\fP [ \fIword ...\fP ] ] ; ] \fBdo\fP \fIlist\fP ; \fBdone\fP +The list of words following \fBin\fP is expanded, generating a list +of items. +The variable \fIname\fP is set to each element of this list +in turn, and \fIlist\fP is executed each time. +If the \fBin\fP \fIword\fP is omitted, the \fBfor\fP command executes +\fIlist\fP once for each positional parameter that is set (see +.SM +.B PARAMETERS +below). +The return status is the exit status of the last command that executes. +If the expansion of the items following \fBin\fP results in an empty +list, no commands are executed, and the return status is 0. +.TP +\fBfor\fP (( \fIexpr1\fP ; \fIexpr2\fP ; \fIexpr3\fP )) ; \fBdo\fP \fIlist\fP ; \fBdone\fP +First, the arithmetic expression \fIexpr1\fP is evaluated according +to the rules described below under +.SM +.BR "ARITHMETIC EVALUATION" . +The arithmetic expression \fIexpr2\fP is then evaluated repeatedly +until it evaluates to zero. +Each time \fIexpr2\fP evaluates to a non-zero value, \fIlist\fP is +executed and the arithmetic expression \fIexpr3\fP is evaluated. +If any expression is omitted, it behaves as if it evaluates to 1. +The return value is the exit status of the last command in \fIlist\fP +that is executed, or false if any of the expressions is invalid. +.TP +\fBselect\fP \fIname\fP [ \fBin\fP \fIword\fP ] ; \fBdo\fP \fIlist\fP ; \fBdone\fP +The list of words following \fBin\fP is expanded, generating a list +of items. The set of expanded words is printed on the standard +error, each preceded by a number. If the \fBin\fP +\fIword\fP is omitted, the positional parameters are printed (see +.SM +.B PARAMETERS +below). The +.SM +.B PS3 +prompt is then displayed and a line read from the standard input. +If the line consists of a number corresponding to one of +the displayed words, then the value of +.I name +is set to that word. If the line is empty, the words and prompt +are displayed again. If EOF is read, the command completes. Any +other value read causes +.I name +to be set to null. The line read is saved in the variable +.SM +.BR REPLY . +The +.I list +is executed after each selection until a +.B break +command is executed. +The exit status of +.B select +is the exit status of the last command executed in +.IR list , +or zero if no commands were executed. +.TP +\fBcase\fP \fIword\fP \fBin\fP [ [(] \fIpattern\fP [ \fB|\fP \fIpattern\fP ] \ +... ) \fIlist\fP ;; ] ... \fBesac\fP +A \fBcase\fP command first expands \fIword\fP, and tries to match +it against each \fIpattern\fP in turn, using the matching rules +described under +.B Pattern Matching +below. +The \fIword\fP is expanded using tilde +expansion, parameter and variable expansion, arithmetic expansion, +command substitution, process substitution and quote removal. +Each \fIpattern\fP examined is expanded using tilde +expansion, parameter and variable expansion, arithmetic expansion, +command substitution, and process substitution. +If the +.B nocasematch +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +When a match is found, the corresponding \fIlist\fP is executed. +If the \fB;;\fP operator is used, no subsequent matches are attempted after +the first pattern match. +Using \fB;&\fP in place of \fB;;\fP causes execution to continue with +the \fIlist\fP associated with the next set of patterns. +Using \fB;;&\fP in place of \fB;;\fP causes the shell to test the next +pattern list in the statement, if any, and execute any associated \fIlist\fP +on a successful match, +continuing the case statement execution as if the pattern list had not matched. +The exit status is zero if no +pattern matches. Otherwise, it is the exit status of the +last command executed in \fIlist\fP. +.TP +\fBif\fP \fIlist\fP; \fBthen\fP \fIlist\fP; \ +[ \fBelif\fP \fIlist\fP; \fBthen\fP \fIlist\fP; ] ... \ +[ \fBelse\fP \fIlist\fP; ] \fBfi\fP +The +.B if +.I list +is executed. If its exit status is zero, the +\fBthen\fP \fIlist\fP is executed. Otherwise, each \fBelif\fP +\fIlist\fP is executed in turn, and if its exit status is zero, +the corresponding \fBthen\fP \fIlist\fP is executed and the +command completes. Otherwise, the \fBelse\fP \fIlist\fP is +executed, if present. The exit status is the exit status of the +last command executed, or zero if no condition tested true. +.TP +\fBwhile\fP \fIlist-1\fP; \fBdo\fP \fIlist-2\fP; \fBdone\fP +.PD 0 +.TP +\fBuntil\fP \fIlist-1\fP; \fBdo\fP \fIlist-2\fP; \fBdone\fP +.PD +The \fBwhile\fP command continuously executes the list +\fIlist-2\fP as long as the last command in the list \fIlist-1\fP returns +an exit status of zero. The \fBuntil\fP command is identical +to the \fBwhile\fP command, except that the test is negated: +.I list-2 +is executed as long as the last command in +.I list-1 +returns a non-zero exit status. +The exit status of the \fBwhile\fP and \fBuntil\fP commands +is the exit status +of the last command executed in \fIlist-2\fP, or zero if +none was executed. +.SS Coprocesses +A \fIcoprocess\fP is a shell command preceded by the \fBcoproc\fP reserved +word. +A coprocess is executed asynchronously in a subshell, as if the command +had been terminated with the \fB&\fP control operator, with a two-way pipe +established between the executing shell and the coprocess. +.PP +The format for a coprocess is: +.RS +.PP +\fBcoproc\fP [\fINAME\fP] \fIcommand\fP [\fIredirections\fP] +.RE +.PP +This creates a coprocess named \fINAME\fP. +If \fINAME\fP is not supplied, the default name is \fBCOPROC\fP. +\fINAME\fP must not be supplied if \fIcommand\fP is a \fIsimple +command\fP (see above); otherwise, it is interpreted as the first word +of the simple command. +When the coprocess is executed, the shell creates an array variable (see +.B Arrays +below) named \fINAME\fP in the context of the executing shell. +The standard output of +.I command +is connected via a pipe to a file descriptor in the executing shell, +and that file descriptor is assigned to \fINAME\fP[0]. +The standard input of +.I command +is connected via a pipe to a file descriptor in the executing shell, +and that file descriptor is assigned to \fINAME\fP[1]. +This pipe is established before any redirections specified by the +command (see +.SM +.B REDIRECTION +below). +The file descriptors can be utilized as arguments to shell commands +and redirections using standard word expansions. +Other than those created to execute command and process substitutions, +the file descriptors are not available in subshells. +The process ID of the shell spawned to execute the coprocess is +available as the value of the variable \fINAME\fP_PID. +The \fBwait\fP +builtin command may be used to wait for the coprocess to terminate. +.PP +Since the coprocess is created as an asynchronous command, +the \fBcoproc\fP command always returns success. +The return status of a coprocess is the exit status of \fIcommand\fP. +.SS Shell Function Definitions +A shell function is an object that is called like a simple command and +executes a compound command with a new set of positional parameters. +Shell functions are declared as follows: +.TP +\fIfname\fP () \fIcompound\-command\fP [\fIredirection\fP] +.PD 0 +.TP +\fBfunction\fP \fIfname\fP [()] \fIcompound\-command\fP [\fIredirection\fP] +.PD +This defines a function named \fIfname\fP. +The reserved word \fBfunction\fP is optional. +If the \fBfunction\fP reserved word is supplied, the parentheses are optional. +The \fIbody\fP of the function is the compound command +.I compound\-command +(see \fBCompound Commands\fP above). +That command is usually a \fIlist\fP of commands between { and }, but +may be any command listed under \fBCompound Commands\fP above, +with one exception: If the \fBfunction\fP reserved word is used, but the +parentheses are not supplied, the braces are required. +\fIcompound\-command\fP is executed whenever \fIfname\fP is specified as the +name of a simple command. +When in \fIposix mode\fP, \fIfname\fP must be a valid shell \fIname\fP +and may not be the name of one of the +POSIX \fIspecial builtins\fP. +In default mode, a function name can be any unquoted shell word that does +not contain \fB$\fP. +Any redirections (see +.SM +.B REDIRECTION +below) specified when a function is defined are performed +when the function is executed. +The exit status of a function definition is zero unless a syntax error +occurs or a readonly function with the same name already exists. +When executed, the exit status of a function is the exit status of the +last command executed in the body. (See +.SM +.B FUNCTIONS +below.) +.SH COMMENTS +In a non-interactive shell, or an interactive shell in which the +.B interactive_comments +option to the +.B shopt +builtin is enabled (see +.SM +.B "SHELL BUILTIN COMMANDS" +below), a word beginning with +.B # +causes that word and all remaining characters on that line to +be ignored. An interactive shell without the +.B interactive_comments +option enabled does not allow comments. The +.B interactive_comments +option is on by default in interactive shells. +.SH QUOTING +\fIQuoting\fP is used to remove the special meaning of certain +characters or words to the shell. Quoting can be used to +disable special treatment for special characters, to prevent +reserved words from being recognized as such, and to prevent +parameter expansion. +.PP +Each of the \fImetacharacters\fP listed above under +.SM +.B DEFINITIONS +has special meaning to the shell and must be quoted if it is to +represent itself. +.PP +When the command history expansion facilities are being used +(see +.SM +.B HISTORY EXPANSION +below), the +\fIhistory expansion\fP character, usually \fB!\fP, must be quoted +to prevent history expansion. +.PP +There are three quoting mechanisms: the +.IR "escape character" , +single quotes, and double quotes. +.PP +A non-quoted backslash (\fB\e\fP) is the +.IR "escape character" . +It preserves the literal value of the next character that follows, +with the exception of . If a \fB\e\fP pair +appears, and the backslash is not itself quoted, the \fB\e\fP +is treated as a line continuation (that is, it is removed from the +input stream and effectively ignored). +.PP +Enclosing characters in single quotes preserves the literal value +of each character within the quotes. A single quote may not occur +between single quotes, even when preceded by a backslash. +.PP +Enclosing characters in double quotes preserves the literal value +of all characters within the quotes, with the exception of +.BR $ , +.BR \` , +.BR \e , +and, when history expansion is enabled, +.BR ! . +When the shell is in \fIposix mode\fP, the \fB!\fP has no special meaning +within double quotes, even when history expansion is enabled. +The characters +.B $ +and +.B \` +retain their special meaning within double quotes. The backslash +retains its special meaning only when followed by one of the following +characters: +.BR $ , +.BR \` , +\^\fB"\fP\^, +.BR \e , +or +.BR . +A double quote may be quoted within double quotes by preceding it with +a backslash. +If enabled, history expansion will be performed unless an +.B ! +appearing in double quotes is escaped using a backslash. +The backslash preceding the +.B ! +is not removed. +.PP +The special parameters +.B * +and +.B @ +have special meaning when in double +quotes (see +.SM +.B PARAMETERS +below). +.PP +Words of the form \fB$\fP\(aq\fIstring\fP\(aq are treated specially. The +word expands to \fIstring\fP, with backslash-escaped characters replaced +as specified by the ANSI C standard. Backslash escape sequences, if +present, are decoded as follows: +.RS +.PD 0 +.TP +.B \ea +alert (bell) +.TP +.B \eb +backspace +.TP +.B \ee +.TP +.B \eE +an escape character +.TP +.B \ef +form feed +.TP +.B \en +new line +.TP +.B \er +carriage return +.TP +.B \et +horizontal tab +.TP +.B \ev +vertical tab +.TP +.B \e\e +backslash +.TP +.B \e\(aq +single quote +.TP +.B \e\(dq +double quote +.TP +.B \e? +question mark +.TP +.B \e\fInnn\fP +the eight-bit character whose value is the octal value \fInnn\fP +(one to three octal digits) +.TP +.B \ex\fIHH\fP +the eight-bit character whose value is the hexadecimal value \fIHH\fP +(one or two hex digits) +.TP +.B \eu\fIHHHH\fP +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +\fIHHHH\fP (one to four hex digits) +.TP +.B \eU\fIHHHHHHHH\fP +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +\fIHHHHHHHH\fP (one to eight hex digits) +.TP +.B \ec\fIx\fP +a control-\fIx\fP character +.PD +.RE +.LP +The expanded result is single-quoted, as if the dollar sign had +not been present. +.PP +A double-quoted string preceded by a dollar sign (\fB$\fP\(dq\fIstring\fP\(dq) +will cause the string to be translated according to the current locale. +The \fIgettext\fP infrastructure performs the message catalog lookup and +translation, using the \fBLC_MESSAGES\fP and \fBTEXTDOMAIN\fP shell +variables. +If the current locale is \fBC\fP or \fBPOSIX\fP, +or if there are no translations available, +the dollar sign is ignored. +If the string is translated and replaced, the replacement is +double-quoted. +.SH PARAMETERS +A +.I parameter +is an entity that stores values. +It can be a +.IR name , +a number, or one of the special characters listed below under +.BR "Special Parameters" . +A +.I variable +is a parameter denoted by a +.IR name . +A variable has a \fIvalue\fP and zero or more \fIattributes\fP. +Attributes are assigned using the +.B declare +builtin command (see +.B declare +below in +.SM +.BR "SHELL BUILTIN COMMANDS" ). +.PP +A parameter is set if it has been assigned a value. The null string is +a valid value. Once a variable is set, it may be unset only by using +the +.B unset +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.PP +A +.I variable +may be assigned to by a statement of the form +.RS +.PP +\fIname\fP=[\fIvalue\fP] +.RE +.PP +If +.I value +is not given, the variable is assigned the null string. All +.I values +undergo tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote +removal (see +.SM +.B EXPANSION +below). If the variable has its +.B integer +attribute set, then +.I value +is evaluated as an arithmetic expression even if the $((...)) expansion is +not used (see +.B "Arithmetic Expansion" +below). +Word splitting is not performed, with the exception +of \fB"$@"\fP as explained below under +.BR "Special Parameters" . +Pathname expansion is not performed. +Assignment statements may also appear as arguments to the +.BR alias , +.BR declare , +.BR typeset , +.BR export , +.BR readonly , +and +.B local +builtin commands (\fIdeclaration\fP commands). +When in \fIposix mode\fP, these builtins may appear in a command after +one or more instances of the \fBcommand\fP builtin and retain these +assignment statement properties. +.PP +In the context where an assignment statement is assigning a value +to a shell variable or array index, the += operator can be used to +append to or add to the variable's previous value. +This includes arguments to builtin commands such as \fBdeclare\fP that +accept assignment statements (\fIdeclaration\fP commands). +When += is applied to a variable for which the \fIinteger\fP attribute has been +set, \fIvalue\fP is evaluated as an arithmetic expression and added to the +variable's current value, which is also evaluated. +When += is applied to an array variable using compound assignment (see +.B Arrays +below), the +variable's value is not unset (as it is when using =), and new values are +appended to the array beginning at one greater than the array's maximum index +(for indexed arrays) or added as additional key\-value pairs in an +associative array. +When applied to a string-valued variable, \fIvalue\fP is expanded and +appended to the variable's value. +.PP +A variable can be assigned the \fInameref\fP attribute using the +\fB\-n\fP option to the \fBdeclare\fP or \fBlocal\fP builtin commands +(see the descriptions of \fBdeclare\fP and \fBlocal\fP below) +to create a \fInameref\fP, or a reference to another variable. +This allows variables to be manipulated indirectly. +Whenever the nameref variable is referenced, assigned to, unset, or has +its attributes modified (other than using or changing the \fInameref\fP +attribute itself), the +operation is actually performed on the variable specified by the nameref +variable's value. +A nameref is commonly used within shell functions to refer to a variable +whose name is passed as an argument to the function. +For instance, if a variable name is passed to a shell function as its first +argument, running +.sp .5 +.RS +.if t \f(CWdeclare -n ref=$1\fP +.if n declare -n ref=$1 +.RE +.sp .5 +inside the function creates a nameref variable \fBref\fP whose value is +the variable name passed as the first argument. +References and assignments to \fBref\fP, and changes to its attributes, +are treated as references, assignments, and attribute modifications +to the variable whose name was passed as \fB$1\fP. +If the control variable in a \fBfor\fP loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. +Array variables cannot be given the \fBnameref\fP attribute. +However, nameref variables can reference array variables and subscripted +array variables. +Namerefs can be unset using the \fB\-n\fP option to the \fBunset\fP builtin. +Otherwise, if \fBunset\fP is executed with the name of a nameref variable +as an argument, the variable referenced by the nameref variable will be unset. +.SS Positional Parameters +A +.I positional parameter +is a parameter denoted by one or more +digits, other than the single digit 0. Positional parameters are +assigned from the shell's arguments when it is invoked, +and may be reassigned using the +.B set +builtin command. Positional parameters may not be assigned to +with assignment statements. The positional parameters are +temporarily replaced when a shell function is executed (see +.SM +.B FUNCTIONS +below). +.PP +When a positional parameter consisting of more than a single +digit is expanded, it must be enclosed in braces (see +.SM +.B EXPANSION +below). +.SS Special Parameters +The shell treats several parameters specially. These parameters may +only be referenced; assignment to them is not allowed. +.PD 0 +.TP +.B * +Expands to the positional parameters, starting from one. +When the expansion is not within double quotes, each positional parameter +expands to a separate word. +In contexts where it is performed, those words +are subject to further word splitting and pathname expansion. +When the expansion occurs within double quotes, it expands to a single word +with the value of each parameter separated by the first character of the +.SM +.B IFS +special variable. That is, "\fB$*\fP" is equivalent +to "\fB$1\fP\fIc\fP\fB$2\fP\fIc\fP\fB...\fP", where +.I c +is the first character of the value of the +.SM +.B IFS +variable. If +.SM +.B IFS +is unset, the parameters are separated by spaces. +If +.SM +.B IFS +is null, the parameters are joined without intervening separators. +.TP +.B @ +Expands to the positional parameters, starting from one. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +When the +expansion occurs within double quotes, each parameter expands to a +separate word. That is, "\fB$@\fP" is equivalent to +"\fB$1\fP" "\fB$2\fP" ... +If the double-quoted expansion occurs within a word, the expansion of +the first parameter is joined with the beginning part of the original +word, and the expansion of the last parameter is joined with the last +part of the original word. +When there are no positional parameters, "\fB$@\fP" and +.B $@ +expand to nothing (i.e., they are removed). +.TP +.B # +Expands to the number of positional parameters in decimal. +.TP +.B ? +Expands to the exit status of the most recently executed foreground +pipeline. +.TP +.B \- +Expands to the current option flags as specified upon invocation, +by the +.B set +builtin command, or those set by the shell itself +(such as the +.B \-i +option). +.TP +.B $ +Expands to the process ID of the shell. In a () subshell, it +expands to the process ID of the current shell, not the +subshell. +.TP +.B ! +Expands to the process ID of the job most recently placed into the +background, whether executed as an asynchronous command or using +the \fBbg\fP builtin (see +.SM +.B "JOB CONTROL" +below). +.TP +.B 0 +Expands to the name of the shell or shell script. This is set at +shell initialization. If +.B bash +is invoked with a file of commands, +.B $0 +is set to the name of that file. If +.B bash +is started with the +.B \-c +option, then +.B $0 +is set to the first argument after the string to be +executed, if one is present. Otherwise, it is set +to the filename used to invoke +.BR bash , +as given by argument zero. +.PD +.SS Shell Variables +The following variables are set by the shell: +.PP +.PD 0 +.TP +.B _ +At shell startup, set to the pathname used to invoke the +shell or shell script being executed as passed in the environment +or argument list. +Subsequently, expands to the last argument to the previous simple +command executed in the foreground, after expansion. +Also set to the full pathname used to invoke each command executed +and placed in the environment exported to that command. +When checking mail, this parameter holds the name of the mail file +currently being checked. +.TP +.B BASH +Expands to the full filename used to invoke this instance of +.BR bash . +.TP +.B BASHOPTS +A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the +.B \-s +option to the +.B shopt +builtin command (see +.SM +.B "SHELL BUILTIN COMMANDS" +below). The options appearing in +.SM +.B BASHOPTS +are those reported as +.I on +by \fBshopt\fP. +If this variable is in the environment when +.B bash +starts up, each shell option in the list will be enabled before +reading any startup files. +This variable is read-only. +.TP +.B BASHPID +Expands to the process ID of the current \fBbash\fP process. +This differs from \fB$$\fP under certain circumstances, such as subshells +that do not require \fBbash\fP to be re-initialized. +Assignments to +.SM +.B BASHPID +have no effect. +If +.B BASHPID +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B BASH_ALIASES +An associative array variable whose members correspond to the internal +list of aliases as maintained by the \fBalias\fP builtin. +Elements added to this array appear in the alias list; however, +unsetting array elements currently does not cause aliases to be removed +from the alias list. +If +.B BASH_ALIASES +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B BASH_ARGC +An array variable whose values are the number of parameters in each +frame of the current \fBbash\fP execution call stack. +The number of +parameters to the current subroutine (shell function or script executed +with \fB.\fP or \fBsource\fP) is at the top of the stack. +When a subroutine is executed, the number of parameters passed is pushed onto +.SM +.BR BASH_ARGC . +The shell sets +.SM +.B BASH_ARGC +only when in extended debugging mode (see the description of the +.B extdebug +option to the +.B shopt +builtin below). +Setting \fBextdebug\fP after the shell has started to execute a script, +or referencing this variable when \fBextdebug\fP is not set, +may result in inconsistent values. +.TP +.B BASH_ARGV +An array variable containing all of the parameters in the current \fBbash\fP +execution call stack. The final parameter of the last subroutine call +is at the top of the stack; the first parameter of the initial call is +at the bottom. When a subroutine is executed, the parameters supplied +are pushed onto +.SM +.BR BASH_ARGV . +The shell sets +.SM +.B BASH_ARGV +only when in extended debugging mode +(see the description of the +.B extdebug +option to the +.B shopt +builtin below). +Setting \fBextdebug\fP after the shell has started to execute a script, +or referencing this variable when \fBextdebug\fP is not set, +may result in inconsistent values. +.TP +.B BASH_ARGV0 +When referenced, this variable expands to the name of the shell or shell +script (identical to +.BR $0 ; +see the description of special parameter 0 above). +Assignment to +.B BASH_ARGV0 +causes the value assigned to also be assigned to \fB$0\fP. +If +.B BASH_ARGV0 +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B BASH_CMDS +An associative array variable whose members correspond to the internal +hash table of commands as maintained by the \fBhash\fP builtin. +Elements added to this array appear in the hash table; however, +unsetting array elements currently does not cause command names to be removed +from the hash table. +If +.B BASH_CMDS +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B BASH_COMMAND +The command currently being executed or about to be executed, unless the +shell is executing a command as the result of a trap, +in which case it is the command executing at the time of the trap. +If +.B BASH_COMMAND +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B BASH_EXECUTION_STRING +The command argument to the \fB\-c\fP invocation option. +.TP +.B BASH_LINENO +An array variable whose members are the line numbers in source files +where each corresponding member of +.SM +.B FUNCNAME +was invoked. +\fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP is the line number in the source +file (\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP) where +\fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called +(or \fB${BASH_LINENO[\fP\fI$i-1\fP\fB]}\fP if referenced within another +shell function). +Use +.SM +.B LINENO +to obtain the current line number. +.TP +.B BASH_LOADABLES_PATH +A colon-separated list of directories in which the shell looks for +dynamically loadable builtins specified by the +.B enable +command. +.TP +.B BASH_REMATCH +An array variable whose members are assigned by the \fB=~\fP binary +operator to the \fB[[\fP conditional command. +The element with index 0 is the portion of the string +matching the entire regular expression. +The element with index \fIn\fP is the portion of the +string matching the \fIn\fPth parenthesized subexpression. +.TP +.B BASH_SOURCE +An array variable whose members are the source filenames +where the corresponding shell function names in the +.SM +.B FUNCNAME +array variable are defined. +The shell function +\fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP is defined in the file +\fB${BASH_SOURCE[\fP\fI$i\fP\fB]}\fP and called from +\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP. +.TP +.B BASH_SUBSHELL +Incremented by one within each subshell or subshell environment when +the shell begins executing in that environment. +The initial value is 0. +If +.B BASH_SUBSHELL +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B BASH_VERSINFO +A readonly array variable whose members hold version information for +this instance of +.BR bash . +The values assigned to the array members are as follows: +.sp .5 +.RS +.TP 24 +.B BASH_VERSINFO[\fR0\fP] +The major version number (the \fIrelease\fP). +.TP +.B BASH_VERSINFO[\fR1\fP] +The minor version number (the \fIversion\fP). +.TP +.B BASH_VERSINFO[\fR2\fP] +The patch level. +.TP +.B BASH_VERSINFO[\fR3\fP] +The build version. +.TP +.B BASH_VERSINFO[\fR4\fP] +The release status (e.g., \fIbeta1\fP). +.TP +.B BASH_VERSINFO[\fR5\fP] +The value of +.SM +.BR MACHTYPE . +.RE +.TP +.B BASH_VERSION +Expands to a string describing the version of this instance of +.BR bash . +.TP +.B COMP_CWORD +An index into \fB${COMP_WORDS}\fP of the word containing the current +cursor position. +This variable is available only in shell functions invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B COMP_KEY +The key (or final key of a key sequence) used to invoke the current +completion function. +.TP +.B COMP_LINE +The current command line. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B COMP_POINT +The index of the current cursor position relative to the beginning of +the current command. +If the current cursor position is at the end of the current command, +the value of this variable is equal to \fB${#COMP_LINE}\fP. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B COMP_TYPE +Set to an integer value corresponding to the type of completion attempted +that caused a completion function to be called: +\fITAB\fP, for normal completion, +\fI?\fP, for listing completions after successive tabs, +\fI!\fP, for listing alternatives on partial word completion, +\fI@\fP, to list completions if the word is not unmodified, +or +\fI%\fP, for menu completion. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B COMP_WORDBREAKS +The set of characters that the \fBreadline\fP library treats as word +separators when performing word completion. +If +.SM +.B COMP_WORDBREAKS +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B COMP_WORDS +An array variable (see \fBArrays\fP below) consisting of the individual +words in the current command line. +The line is split into words as \fBreadline\fP would split it, using +.SM +.B COMP_WORDBREAKS +as described above. +This variable is available only in shell functions invoked by the +programmable completion facilities (see \fBProgrammable Completion\fP +below). +.TP +.B COPROC +An array variable (see \fBArrays\fP below) created to hold the file descriptors +for output from and input to an unnamed coprocess (see \fBCoprocesses\fP +above). +.TP +.B DIRSTACK +An array variable (see +.B Arrays +below) containing the current contents of the directory stack. +Directories appear in the stack in the order they are displayed by the +.B dirs +builtin. +Assigning to members of this array variable may be used to modify +directories already in the stack, but the +.B pushd +and +.B popd +builtins must be used to add and remove directories. +Assignment to this variable will not change the current directory. +If +.SM +.B DIRSTACK +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B EPOCHREALTIME +Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see \fItime\fP\fR(3)\fP) as a floating point value +with micro-second granularity. +Assignments to +.SM +.B EPOCHREALTIME +are ignored. +If +.SM +.B EPOCHREALTIME +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B EPOCHSECONDS +Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see \fItime\fP\fR(3)\fP). +Assignments to +.SM +.B EPOCHSECONDS +are ignored. +If +.SM +.B EPOCHSECONDS +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B EUID +Expands to the effective user ID of the current user, initialized at +shell startup. This variable is readonly. +.TP +.B FUNCNAME +An array variable containing the names of all shell functions +currently in the execution call stack. +The element with index 0 is the name of any currently-executing +shell function. +The bottom-most element (the one with the highest index) is +.if t \f(CW"main"\fP. +.if n "main". +This variable exists only when a shell function is executing. +Assignments to +.SM +.B FUNCNAME +have no effect. +If +.SM +.B FUNCNAME +is unset, it loses its special properties, even if it is +subsequently reset. +.if t .sp 0.5 +.if n .sp 1 +This variable can be used with \fBBASH_LINENO\fP and \fBBASH_SOURCE\fP. +Each element of \fBFUNCNAME\fP has corresponding elements in +\fBBASH_LINENO\fP and \fBBASH_SOURCE\fP to describe the call stack. +For instance, \fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called from the file +\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP at line number +\fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP. +The \fBcaller\fP builtin displays the current call stack using this +information. +.TP +.B GROUPS +An array variable containing the list of groups of which the current +user is a member. +Assignments to +.SM +.B GROUPS +have no effect. +If +.SM +.B GROUPS +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B HISTCMD +The history number, or index in the history list, of the current +command. +Assignments to +.SM +.B HISTCMD +are ignored. +If +.SM +.B HISTCMD +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B HOSTNAME +Automatically set to the name of the current host. +.TP +.B HOSTTYPE +Automatically set to a string that uniquely +describes the type of machine on which +.B bash +is executing. +The default is system-dependent. +.TP +.B LINENO +Each time this parameter is referenced, the shell substitutes +a decimal number representing the current sequential line number +(starting with 1) within a script or function. When not in a +script or function, the value substituted is not guaranteed to +be meaningful. +If +.SM +.B LINENO +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B MACHTYPE +Automatically set to a string that fully describes the system +type on which +.B bash +is executing, in the standard GNU \fIcpu-company-system\fP format. +The default is system-dependent. +.TP +.B MAPFILE +An array variable (see \fBArrays\fP below) created to hold the text +read by the \fBmapfile\fP builtin when no variable name is supplied. +.TP +.B OLDPWD +The previous working directory as set by the +.B cd +command. +.TP +.B OPTARG +The value of the last option argument processed by the +.B getopts +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.TP +.B OPTIND +The index of the next argument to be processed by the +.B getopts +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.TP +.B OSTYPE +Automatically set to a string that +describes the operating system on which +.B bash +is executing. +The default is system-dependent. +.TP +.B PIPESTATUS +An array variable (see +.B Arrays +below) containing a list of exit status values from the processes +in the most-recently-executed foreground pipeline (which may +contain only a single command). +.TP +.B PPID +The process ID of the shell's parent. This variable is readonly. +.TP +.B PWD +The current working directory as set by the +.B cd +command. +.TP +.B RANDOM +Each time this parameter is referenced, it expands to a random integer +between 0 and 32767. +Assigning +a value to +.SM +.BR RANDOM +initializes (seeds) the sequence of random numbers. +If +.SM +.B RANDOM +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B READLINE_LINE +The contents of the +.B readline +line buffer, for use with +.if t \f(CWbind -x\fP +.if n "bind -x" +(see +.SM +.B "SHELL BUILTIN COMMANDS" +below). +.TP +.B READLINE_MARK +The position of the mark (saved insertion point) in the +.B readline +line buffer, for use with +.if t \f(CWbind -x\fP +.if n "bind -x" +(see +.SM +.B "SHELL BUILTIN COMMANDS" +below). +The characters between the insertion point and the mark are often +called the \fIregion\fP. +.TP +.B READLINE_POINT +The position of the insertion point in the +.B readline +line buffer, for use with +.if t \f(CWbind -x\fP +.if n "bind -x" +(see +.SM +.B "SHELL BUILTIN COMMANDS" +below). +.TP +.B REPLY +Set to the line of input read by the +.B read +builtin command when no arguments are supplied. +.TP +.B SECONDS +Each time this parameter is +referenced, the number of seconds since shell invocation is returned. If a +value is assigned to +.SM +.BR SECONDS , +the value returned upon subsequent +references is +the number of seconds since the assignment plus the value assigned. +The number of seconds at shell invocation and the current time is always +determined by querying the system clock. +If +.SM +.B SECONDS +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B SHELLOPTS +A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the +.B \-o +option to the +.B set +builtin command (see +.SM +.B "SHELL BUILTIN COMMANDS" +below). The options appearing in +.SM +.B SHELLOPTS +are those reported as +.I on +by \fBset \-o\fP. +If this variable is in the environment when +.B bash +starts up, each shell option in the list will be enabled before +reading any startup files. +This variable is read-only. +.TP +.B SHLVL +Incremented by one each time an instance of +.B bash +is started. +.TP +.B SRANDOM +This variable expands to a 32-bit pseudo-random number each time it is +referenced. The random number generator is not linear on systems that +support \f(CW/dev/urandom\fP or \fIarc4random\fP, so each returned number +has no relationship to the numbers preceding it. +The random number generator cannot be seeded, so assignments to this +variable have no effect. +If +.SM +.B SRANDOM +is unset, it loses its special properties, +even if it is subsequently reset. +.TP +.B UID +Expands to the user ID of the current user, initialized at shell startup. +This variable is readonly. +.PD +.PP +The following variables are used by the shell. In some cases, +.B bash +assigns a default value to a variable; these cases are noted +below. +.PP +.PD 0 +.TP +.B BASH_COMPAT +The value is used to set the shell's compatibility level. +See +.SM +.B SHELL COMPATIBILITY MODE +below for a description of the various compatibility +levels and their effects. +The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) +corresponding to the desired compatibility level. +If \fBBASH_COMPAT\fP is unset or set to the empty string, the compatibility +level is set to the default for the current version. +If \fBBASH_COMPAT\fP is set to a value that is not one of the valid +compatibility levels, the shell prints an error message and sets the +compatibility level to the default for the current version. +The valid values correspond to the compatibility levels +described below under +.SM +.BR BSHELL COMPATIBILITY MODE . +For example, 4.2 and 42 are valid values that correspond +to the \fBcompat42\fP \fBshopt\fP option +and set the compatibility level to 42. +The current version is also a valid value. +.TP +.B BASH_ENV +If this parameter is set when \fBbash\fP is executing a shell script, +its value is interpreted as a filename containing commands to +initialize the shell, as in +.IR ~/.bashrc . +The value of +.SM +.B BASH_ENV +is subjected to parameter expansion, command substitution, and arithmetic +expansion before being interpreted as a filename. +.SM +.B PATH +is not used to search for the resultant filename. +.TP +.B BASH_XTRACEFD +If set to an integer corresponding to a valid file descriptor, \fBbash\fP +will write the trace output generated when +.if t \f(CWset -x\fP +.if n \fIset -x\fP +is enabled to that file descriptor. +The file descriptor is closed when +.SM +.B BASH_XTRACEFD +is unset or assigned a new value. +Unsetting +.SM +.B BASH_XTRACEFD +or assigning it the empty string causes the +trace output to be sent to the standard error. +Note that setting +.SM +.B BASH_XTRACEFD +to 2 (the standard error file +descriptor) and then unsetting it will result in the standard error +being closed. +.TP +.B CDPATH +The search path for the +.B cd +command. +This is a colon-separated list of directories in which the shell looks +for destination directories specified by the +.B cd +command. +A sample value is +.if t \f(CW".:~:/usr"\fP. +.if n ".:~:/usr". +.TP +.B CHILD_MAX +Set the number of exited child status values for the shell to remember. +Bash will not allow this value to be decreased below a POSIX-mandated +minimum, and there is a maximum value (currently 8192) that this may +not exceed. +The minimum value is system-dependent. +.TP +.B COLUMNS +Used by the \fBselect\fP compound command to determine the terminal width +when printing selection lists. +Automatically set if the +.B checkwinsize +option is enabled or in an interactive shell upon receipt of a +.SM +.BR SIGWINCH . +.TP +.B COMPREPLY +An array variable from which \fBbash\fP reads the possible completions +generated by a shell function invoked by the programmable completion +facility (see \fBProgrammable Completion\fP below). +Each array element contains one possible completion. +.TP +.B EMACS +If \fBbash\fP finds this variable in the environment when the shell starts +with value +.if t \f(CWt\fP, +.if n "t", +it assumes that the shell is running in an Emacs shell buffer and disables +line editing. +.TP +.B ENV +Expanded and executed similarly to +.SM +.B BASH_ENV +(see \fBINVOCATION\fP above) +when an interactive shell is invoked in \fIposix mode\fP. +.TP +.B EXECIGNORE +A colon-separated list of shell patterns (see \fBPattern Matching\fP) +defining the list of filenames to be ignored by command search using +\fBPATH\fP. +Files whose full pathnames match one of these patterns are not considered +executable files for the purposes of completion and command execution +via \fBPATH\fP lookup. +This does not affect the behavior of the \fB[\fP, \fBtest\fP, and \fB[[\fP +commands. +Full pathnames in the command hash table are not subject to \fBEXECIGNORE\fP. +Use this variable to ignore shared library files that have the executable +bit set, but are not executable files. +The pattern matching honors the setting of the \fBextglob\fP shell +option. +.TP +.B FCEDIT +The default editor for the +.B fc +builtin command. +.TP +.B FIGNORE +A colon-separated list of suffixes to ignore when performing +filename completion (see +.SM +.B READLINE +below). +A filename whose suffix matches one of the entries in +.SM +.B FIGNORE +is excluded from the list of matched filenames. +A sample value is +.if t \f(CW".o:~"\fP. +.if n ".o:~". +.TP +.B FUNCNEST +If set to a numeric value greater than 0, defines a maximum function +nesting level. Function invocations that exceed this nesting level +will cause the current command to abort. +.TP +.B GLOBIGNORE +A colon-separated list of patterns defining the set of file names to +be ignored by pathname expansion. +If a file name matched by a pathname expansion pattern also matches one +of the patterns in +.SM +.BR GLOBIGNORE , +it is removed from the list of matches. +.TP +.B HISTCONTROL +A colon-separated list of values controlling how commands are saved on +the history list. +If the list of values includes +.IR ignorespace , +lines which begin with a +.B space +character are not saved in the history list. +A value of +.I ignoredups +causes lines matching the previous history entry to not be saved. +A value of +.I ignoreboth +is shorthand for \fIignorespace\fP and \fIignoredups\fP. +A value of +.I erasedups +causes all previous lines matching the current line to be removed from +the history list before that line is saved. +Any value not in the above list is ignored. +If +.SM +.B HISTCONTROL +is unset, or does not include a valid value, +all lines read by the shell parser are saved on the history list, +subject to the value of +.SM +.BR HISTIGNORE . +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +.SM +.BR HISTCONTROL . +.TP +.B HISTFILE +The name of the file in which command history is saved (see +.SM +.B HISTORY +below). The default value is \fI~/.bash_history\fP. If unset, the +command history is not saved when a shell exits. +.TP +.B HISTFILESIZE +The maximum number of lines contained in the history file. When this +variable is assigned a value, the history file is truncated, if +necessary, +to contain no more than that number of lines by removing the oldest entries. +The history file is also truncated to this size after +writing it when a shell exits. +If the value is 0, the history file is truncated to zero size. +Non-numeric values and numeric values less than zero inhibit truncation. +The shell sets the default value to the value of \fBHISTSIZE\fP +after reading any startup files. +.TP +.B HISTIGNORE +A colon-separated list of patterns used to decide which command lines +should be saved on the history list. Each pattern is anchored at the +beginning of the line and must match the complete line (no implicit +`\fB*\fP' is appended). Each pattern is tested against the line +after the checks specified by +.SM +.B HISTCONTROL +are applied. +In addition to the normal shell pattern matching characters, `\fB&\fP' +matches the previous history line. `\fB&\fP' may be escaped using a +backslash; the backslash is removed before attempting a match. +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +.SM +.BR HISTIGNORE . +The pattern matching honors the setting of the \fBextglob\fP shell +option. +.TP +.B HISTSIZE +The number of commands to remember in the command history (see +.SM +.B HISTORY +below). +If the value is 0, commands are not saved in the history list. +Numeric values less than zero result in every command being saved +on the history list (there is no limit). +The shell sets the default value to 500 after reading any startup files. +.TP +.B HISTTIMEFORMAT +If this variable is set and not null, its value is used as a format string +for \fIstrftime\fP(3) to print the time stamp associated with each history +entry displayed by the \fBhistory\fP builtin. +If this variable is set, time stamps are written to the history file so +they may be preserved across shell sessions. +This uses the history comment character to distinguish timestamps from +other history lines. +.TP +.B HOME +The home directory of the current user; the default argument for the +\fBcd\fP builtin command. +The value of this variable is also used when performing tilde expansion. +.TP +.B HOSTFILE +Contains the name of a file in the same format as +.FN /etc/hosts +that should be read when the shell needs to complete a +hostname. +The list of possible hostname completions may be changed while the +shell is running; +the next time hostname completion is attempted after the +value is changed, +.B bash +adds the contents of the new file to the existing list. +If +.SM +.B HOSTFILE +is set, but has no value, or does not name a readable file, +\fBbash\fP attempts to read +.FN /etc/hosts +to obtain the list of possible hostname completions. +When +.SM +.B HOSTFILE +is unset, the hostname list is cleared. +.TP +.B IFS +The +.I Internal Field Separator +that is used +for word splitting after expansion and to +split lines into words with the +.B read +builtin command. The default value is +``''. +.TP +.B IGNOREEOF +Controls the +action of an interactive shell on receipt of an +.SM +.B EOF +character as the sole input. If set, the value is the number of +consecutive +.SM +.B EOF +characters which must be +typed as the first characters on an input line before +.B bash +exits. If the variable exists but does not have a numeric value, or +has no value, the default value is 10. If it does not exist, +.SM +.B EOF +signifies the end of input to the shell. +.TP +.B INPUTRC +The filename for the +.B readline +startup file, overriding the default of +.FN ~/.inputrc +(see +.SM +.B READLINE +below). +.TP +.B INSIDE_EMACS +If this variable appears in the environment when the shell starts, +\fBbash\fP assumes that it is running inside an Emacs shell buffer +and may disable line editing, depending on the value of \fBTERM\fP. +.TP +.B LANG +Used to determine the locale category for any category not specifically +selected with a variable starting with \fBLC_\fP. +.TP +.B LC_ALL +This variable overrides the value of +.SM +.B LANG +and any other +\fBLC_\fP variable specifying a locale category. +.TP +.B LC_COLLATE +This variable determines the collation order used when sorting the +results of pathname expansion, and determines the behavior of range +expressions, equivalence classes, and collating sequences within +pathname expansion and pattern matching. +.TP +.B LC_CTYPE +This variable determines the interpretation of characters and the +behavior of character classes within pathname expansion and pattern +matching. +.TP +.B LC_MESSAGES +This variable determines the locale used to translate double-quoted +strings preceded by a \fB$\fP. +.TP +.B LC_NUMERIC +This variable determines the locale category used for number formatting. +.TP +.B LC_TIME +This variable determines the locale category used for data and time +formatting. +.TP +.B LINES +Used by the \fBselect\fP compound command to determine the column length +for printing selection lists. +Automatically set if the +.B checkwinsize +option is enabled or in an interactive shell upon receipt of a +.SM +.BR SIGWINCH . +.TP +.B MAIL +If this parameter is set to a file or directory name and the +.SM +.B MAILPATH +variable is not set, +.B bash +informs the user of the arrival of mail in the specified file or +Maildir-format directory. +.TP +.B MAILCHECK +Specifies how +often (in seconds) +.B bash +checks for mail. The default is 60 seconds. When it is time to check +for mail, the shell does so before displaying the primary prompt. +If this variable is unset, or set to a value that is not a number +greater than or equal to zero, the shell disables mail checking. +.TP +.B MAILPATH +A colon-separated list of filenames to be checked for mail. +The message to be printed when mail arrives in a particular file +may be specified by separating the filename from the message with a `?'. +When used in the text of the message, \fB$_\fP expands to the name of +the current mailfile. +Example: +.RS +.PP +\fBMAILPATH\fP=\(aq/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"\(aq +.PP +.B Bash +can be configured to supply +a default value for this variable (there is no value by default), +but the location of the user +mail files that it uses is system dependent (e.g., /var/mail/\fB$USER\fP). +.RE +.TP +.B OPTERR +If set to the value 1, +.B bash +displays error messages generated by the +.B getopts +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.SM +.B OPTERR +is initialized to 1 each time the shell is invoked or a shell +script is executed. +.TP +.B PATH +The search path for commands. It +is a colon-separated list of directories in which +the shell looks for commands (see +.SM +.B COMMAND EXECUTION +below). +A zero-length (null) directory name in the value of +.SM +.B PATH +indicates the current directory. +A null directory name may appear as two adjacent colons, or as an initial +or trailing colon. +The default path is system-dependent, +and is set by the administrator who installs +.BR bash . +A common value is +.na +.if t \f(CW/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin\fP. +.if n ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''. +.ad +.TP +.B POSIXLY_CORRECT +If this variable is in the environment when \fBbash\fP starts, the shell +enters \fIposix mode\fP before reading the startup files, as if the +.B \-\-posix +invocation option had been supplied. If it is set while the shell is +running, \fBbash\fP enables \fIposix mode\fP, as if the command +.if t \f(CWset -o posix\fP +.if n \fIset -o posix\fP +had been executed. +When the shell enters \fIposix mode\fP, it sets this variable if it was +not already set. +.TP +.B PROMPT_COMMAND +If this variable is set, and is an array, +the value of each set element is executed as a command +prior to issuing each primary prompt. +If this is set but not an array variable, +its value is used as a command to execute instead. +.TP +.B PROMPT_DIRTRIM +If set to a number greater than zero, the value is used as the number of +trailing directory components to retain when expanding the \fB\ew\fP and +\fB\eW\fP prompt string escapes (see +.SM +.B PROMPTING +below). Characters removed are replaced with an ellipsis. +.TP +.B PS0 +The value of this parameter is expanded (see +.SM +.B PROMPTING +below) and displayed by interactive shells after reading a command +and before the command is executed. +.TP +.B PS1 +The value of this parameter is expanded (see +.SM +.B PROMPTING +below) and used as the primary prompt string. The default value is +``\fB\es\-\ev\e$ \fP''. +.TP +.B PS2 +The value of this parameter is expanded as with +.SM +.B PS1 +and used as the secondary prompt string. The default is +``\fB> \fP''. +.TP +.B PS3 +The value of this parameter is used as the prompt for the +.B select +command (see +.SM +.B SHELL GRAMMAR +above). +.TP +.B PS4 +The value of this parameter is expanded as with +.SM +.B PS1 +and the value is printed before each command +.B bash +displays during an execution trace. The first character of +the expanded value of +.SM +.B PS4 +is replicated multiple times, as necessary, to indicate multiple +levels of indirection. The default is ``\fB+ \fP''. +.TP +.B SHELL +This variable expands to the full pathname to the shell. +If it is not set when the shell starts, +.B bash +assigns to it the full pathname of the current user's login shell. +.TP +.B TIMEFORMAT +The value of this parameter is used as a format string specifying +how the timing information for pipelines prefixed with the +.B time +reserved word should be displayed. +The \fB%\fP character introduces an escape sequence that is +expanded to a time value or other information. +The escape sequences and their meanings are as follows; the +braces denote optional portions. +.sp .5 +.RS +.PD 0 +.TP 10 +.B %% +A literal \fB%\fP. +.TP +.B %[\fIp\fP][l]R +The elapsed time in seconds. +.TP +.B %[\fIp\fP][l]U +The number of CPU seconds spent in user mode. +.TP +.B %[\fIp\fP][l]S +The number of CPU seconds spent in system mode. +.TP +.B %P +The CPU percentage, computed as (%U + %S) / %R. +.PD +.RE +.IP +The optional \fIp\fP is a digit specifying the \fIprecision\fP, +the number of fractional digits after a decimal point. +A value of 0 causes no decimal point or fraction to be output. +At most three places after the decimal point may be specified; +values of \fIp\fP greater than 3 are changed to 3. +If \fIp\fP is not specified, the value 3 is used. +.IP +The optional \fBl\fP specifies a longer format, including +minutes, of the form \fIMM\fPm\fISS\fP.\fIFF\fPs. +The value of \fIp\fP determines whether or not the fraction is +included. +.IP +If this variable is not set, \fBbash\fP acts as if it had the +value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\et%3lS\(aq\fP. +If the value is null, no timing information is displayed. +A trailing newline is added when the format string is displayed. +.PD 0 +.TP +.B TMOUT +If set to a value greater than zero, +.SM +.B TMOUT +is treated as the +default timeout for the \fBread\fP builtin. +The \fBselect\fP command terminates if input does not arrive +after +.SM +.B TMOUT +seconds when input is coming from a terminal. +In an interactive shell, the value is interpreted as the +number of seconds to wait for a line of input after issuing the +primary prompt. +.B Bash +terminates after waiting for that number of seconds if a complete +line of input does not arrive. +.TP +.B TMPDIR +If set, \fBbash\fP uses its value as the name of a directory in which +\fBbash\fP creates temporary files for the shell's use. +.TP +.B auto_resume +This variable controls how the shell interacts with the user and +job control. If this variable is set, single word simple +commands without redirections are treated as candidates for resumption +of an existing stopped job. There is no ambiguity allowed; if there is +more than one job beginning with the string typed, the job most recently +accessed is selected. The +.I name +of a stopped job, in this context, is the command line used to +start it. +If set to the value +.IR exact , +the string supplied must match the name of a stopped job exactly; +if set to +.IR substring , +the string supplied needs to match a substring of the name of a +stopped job. The +.I substring +value provides functionality analogous to the +.B %? +job identifier (see +.SM +.B JOB CONTROL +below). If set to any other value, the supplied string must +be a prefix of a stopped job's name; this provides functionality +analogous to the \fB%\fP\fIstring\fP job identifier. +.TP +.B histchars +The two or three characters which control history expansion +and tokenization (see +.SM +.B HISTORY EXPANSION +below). The first character is the \fIhistory expansion\fP character, +the character which signals the start of a history +expansion, normally `\fB!\fP'. +The second character is the \fIquick substitution\fP +character, which is used as shorthand for re-running the previous +command entered, substituting one string for another in the command. +The default is `\fB^\fP'. +The optional third character is the character +which indicates that the remainder of the line is a comment when found +as the first character of a word, normally `\fB#\fP'. The history +comment character causes history substitution to be skipped for the +remaining words on the line. It does not necessarily cause the shell +parser to treat the rest of the line as a comment. +.PD +.SS Arrays +.B Bash +provides one-dimensional indexed and associative array variables. +Any variable may be used as an indexed array; the +.B declare +builtin will explicitly declare an array. +There is no maximum +limit on the size of an array, nor any requirement that members +be indexed or assigned contiguously. +Indexed arrays are referenced using integers (including arithmetic +expressions) and are zero-based; associative arrays are referenced +using arbitrary strings. +Unless otherwise noted, indexed array indices must be non-negative integers. +.PP +An indexed array is created automatically if any variable is assigned to +using the syntax \fIname\fP[\fIsubscript\fP]=\fIvalue\fP. The +.I subscript +is treated as an arithmetic expression that must evaluate to a number. +To explicitly declare an indexed array, use +.B declare \-a \fIname\fP +(see +.SM +.B SHELL BUILTIN COMMANDS +below). +.B declare \-a \fIname\fP[\fIsubscript\fP] +is also accepted; the \fIsubscript\fP is ignored. +.PP +Associative arrays are created using +.BR "declare \-A \fIname\fP" . +.PP +Attributes may be +specified for an array variable using the +.B declare +and +.B readonly +builtins. Each attribute applies to all members of an array. +.PP +Arrays are assigned to using compound assignments of the form +\fIname\fP=\fB(\fPvalue\fI1\fP ... value\fIn\fP\fB)\fP, where each +\fIvalue\fP may be of the form [\fIsubscript\fP]=\fIstring\fP. +Indexed array assignments do not require anything but \fIstring\fP. +Each \fIvalue\fP in the list is expanded using all the shell expansions +described below under +.SM +.BR EXPANSION . +When assigning to indexed arrays, if the optional brackets and subscript +are supplied, that index is assigned to; +otherwise the index of the element assigned is the last index assigned +to by the statement plus one. Indexing starts at zero. +.PP +When assigning to an associative array, the words in a compound assignment +may be either assignment statements, for which the subscript is required, +or a list of words that is interpreted as a sequence of alternating keys +and values: +\fIname\fP=\fB( \fP\fIkey1 value1 key2 value2\fP ...\fB)\fP. +These are treated identically to +\fIname\fP=\fB(\fP [\fIkey1\fP]=\fIvalue1\fP [\fIkey2\fP]=\fIvalue2\fP ...\fB)\fP. +The first word in the list determines how the remaining words +are interpreted; all assignments in a list must be of the same type. +When using key/value pairs, the keys may not be missing or empty; +a final missing value is treated like the empty string. +.PP +This syntax is also accepted by the +.B declare +builtin. Individual array elements may be assigned to using the +\fIname\fP[\fIsubscript\fP]=\fIvalue\fP syntax introduced above. +When assigning to an indexed array, if +.I name +is subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +\fIname\fP, so negative indices count back from the end of the +array, and an index of \-1 references the last element. +.PP +Any element of an array may be referenced using +${\fIname\fP[\fIsubscript\fP]}. The braces are required to avoid +conflicts with pathname expansion. If +\fIsubscript\fP is \fB@\fP or \fB*\fP, the word expands to +all members of \fIname\fP. These subscripts differ only when the +word appears within double quotes. If the word is double-quoted, +${\fIname\fP[*]} expands to a single +word with the value of each array member separated by the first +character of the +.SM +.B IFS +special variable, and ${\fIname\fP[@]} expands each element of +\fIname\fP to a separate word. When there are no array members, +${\fIname\fP[@]} expands to nothing. +If the double-quoted expansion occurs within a word, the expansion of +the first parameter is joined with the beginning part of the original +word, and the expansion of the last parameter is joined with the last +part of the original word. +This is analogous to the expansion +of the special parameters \fB*\fP and \fB@\fP (see +.B Special Parameters +above). ${#\fIname\fP[\fIsubscript\fP]} expands to the length of +${\fIname\fP[\fIsubscript\fP]}. If \fIsubscript\fP is \fB*\fP or +\fB@\fP, the expansion is the number of elements in the array. +If the +.I subscript +used to reference an element of an indexed array +evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the array, +so negative indices count back from the end of the +array, and an index of \-1 references the last element. +.PP +Referencing an array variable without a subscript is equivalent to +referencing the array with a subscript of 0. +Any reference to a variable using a valid subscript is legal, and +.B bash +will create an array if necessary. +.PP +An array variable is considered set if a subscript has been assigned a +value. The null string is a valid value. +.PP +It is possible to obtain the keys (indices) of an array as well as the values. +${\fB!\fP\fIname\fP[\fI@\fP]} and ${\fB!\fP\fIname\fP[\fI*\fP]} +expand to the indices assigned in array variable \fIname\fP. +The treatment when in double quotes is similar to the expansion of the +special parameters \fI@\fP and \fI*\fP within double quotes. +.PP +The +.B unset +builtin is used to destroy arrays. \fBunset\fP \fIname\fP[\fIsubscript\fP] +destroys the array element at index \fIsubscript\fP, +for both indexed and associative arrays. +Negative subscripts to indexed arrays are interpreted as described above. +Unsetting the last element of an array variable does not unset the variable. +\fBunset\fP \fIname\fP, where \fIname\fP is an array, or +\fBunset\fP \fIname\fP[\fIsubscript\fP], where +\fIsubscript\fP is \fB*\fP or \fB@\fP, removes the entire array. +.PP +When using a variable name with a subscript as an argument to a command, +such as with \fBunset\fP, without using the word expansion syntax +described above, the argument is subject to pathname expansion. +If pathname expansion is not desired, the argument should be quoted. +.PP +The +.BR declare , +.BR local , +and +.B readonly +builtins each accept a +.B \-a +option to specify an indexed array and a +.B \-A +option to specify an associative array. +If both options are supplied, +.B \-A +takes precedence. +The +.B read +builtin accepts a +.B \-a +option to assign a list of words read from the standard input +to an array. The +.B set +and +.B declare +builtins display array values in a way that allows them to be +reused as assignments. +.SH EXPANSION +Expansion is performed on the command line after it has been split into +words. There are seven kinds of expansion performed: +.IR "brace expansion" , +.IR "tilde expansion" , +.IR "parameter and variable expansion" , +.IR "command substitution" , +.IR "arithmetic expansion" , +.IR "word splitting" , +and +.IR "pathname expansion" . +.PP +The order of expansions is: +brace expansion; +tilde expansion, parameter and variable expansion, arithmetic expansion, +and command substitution (done in a left-to-right fashion); +word splitting; +and pathname expansion. +.PP +On systems that can support it, there is an additional expansion +available: \fIprocess substitution\fP. +This is performed at the +same time as tilde, parameter, variable, and arithmetic expansion and +command substitution. +.PP +After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +(\fIquote removal\fP). +.PP +Only brace expansion, word splitting, and pathname expansion +can increase the number of words of the expansion; other expansions +expand a single word to a single word. +The only exceptions to this are the expansions of +"\fB$@\fP" and "\fB${\fP\fIname\fP\fB[@]}\fP", +and, in most cases, \fB$*\fP and \fB${\fP\fIname\fP\fB[*]}\fP +as explained above (see +.SM +.BR PARAMETERS ). +.SS Brace Expansion +.I "Brace expansion" +is a mechanism by which arbitrary strings +may be generated. This mechanism is similar to +\fIpathname expansion\fP, but the filenames generated +need not exist. Patterns to be brace expanded take +the form of an optional +.IR preamble , +followed by either a series of comma-separated strings or +a sequence expression between a pair of braces, followed by +an optional +.IR postscript . +The preamble is prefixed to each string contained +within the braces, and the postscript is then appended +to each resulting string, expanding left to right. +.PP +Brace expansions may be nested. The results of each expanded +string are not sorted; left to right order is preserved. +For example, a\fB{\fPd,c,b\fB}\fPe expands into `ade ace abe'. +.PP +A sequence expression takes the form +\fB{\fP\fIx\fP\fB..\fP\fIy\fP\fB[..\fP\fIincr\fP\fB]}\fP, +where \fIx\fP and \fIy\fP are either integers or single characters, +and \fIincr\fP, an optional increment, is an integer. +When integers are supplied, the expression expands to each number between +\fIx\fP and \fIy\fP, inclusive. +Supplied integers may be prefixed with \fI0\fP to force each term to have the +same width. +When either \fIx\fP or \fPy\fP begins with a zero, the shell +attempts to force all generated terms to contain the same number of digits, +zero-padding where necessary. +When characters are supplied, the expression expands to each character +lexicographically between \fIx\fP and \fIy\fP, inclusive, +using the default C locale. +Note that both \fIx\fP and \fIy\fP must be of the same type. +When the increment is supplied, it is used as the difference between +each term. The default increment is 1 or \-1 as appropriate. +.PP +Brace expansion is performed before any other expansions, +and any characters special to other expansions are preserved +in the result. It is strictly textual. +.B Bash +does not apply any syntactic interpretation to the context of the +expansion or the text between the braces. +.PP +A correctly-formed brace expansion must contain unquoted opening +and closing braces, and at least one unquoted comma or a valid +sequence expression. +Any incorrectly formed brace expansion is left unchanged. +A \fB{\fP or \fB,\fP may be quoted with a backslash to prevent its +being considered part of a brace expression. +To avoid conflicts with parameter expansion, the string \fB${\fP +is not considered eligible for brace expansion, and inhibits brace +expansion until the closing \fB}\fP. +.PP +This construct is typically used as shorthand when the common +prefix of the strings to be generated is longer than in the +above example: +.RS +.PP +mkdir /usr/local/src/bash/{old,new,dist,bugs} +.RE +or +.RS +chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}} +.RE +.PP +Brace expansion introduces a slight incompatibility with +historical versions of +.BR sh . +.B sh +does not treat opening or closing braces specially when they +appear as part of a word, and preserves them in the output. +.B Bash +removes braces from words as a consequence of brace +expansion. For example, a word entered to +.B sh +as \fIfile{1,2}\fP +appears identically in the output. The same word is +output as +.I file1 file2 +after expansion by +.BR bash . +If strict compatibility with +.B sh +is desired, start +.B bash +with the +.B +B +option or disable brace expansion with the +.B +B +option to the +.B set +command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.SS Tilde Expansion +If a word begins with an unquoted tilde character (`\fB~\fP'), all of +the characters preceding the first unquoted slash (or all characters, +if there is no unquoted slash) are considered a \fItilde-prefix\fP. +If none of the characters in the tilde-prefix are quoted, the +characters in the tilde-prefix following the tilde are treated as a +possible \fIlogin name\fP. +If this login name is the null string, the tilde is replaced with the +value of the shell parameter +.SM +.BR HOME . +If +.SM +.B HOME +is unset, the home directory of the user executing the shell is +substituted instead. +Otherwise, the tilde-prefix is replaced with the home directory +associated with the specified login name. +.PP +If the tilde-prefix is a `~+', the value of the shell variable +.SM +.B PWD +replaces the tilde-prefix. +If the tilde-prefix is a `~\-', the value of the shell variable +.SM +.BR OLDPWD , +if it is set, is substituted. +If the characters following the tilde in the tilde-prefix consist +of a number \fIN\fP, optionally prefixed +by a `+' or a `\-', the tilde-prefix is replaced with the corresponding +element from the directory stack, as it would be displayed by the +.B dirs +builtin invoked with the tilde-prefix as an argument. +If the characters following the tilde in the tilde-prefix consist of a +number without a leading `+' or `\-', `+' is assumed. +.PP +If the login name is invalid, or the tilde expansion fails, the word +is unchanged. +.PP +Each variable assignment is checked for unquoted tilde-prefixes immediately +following a +.B : +or the first +.BR = . +In these cases, tilde expansion is also performed. +Consequently, one may use filenames with tildes in assignments to +.SM +.BR PATH , +.SM +.BR MAILPATH , +and +.SM +.BR CDPATH , +and the shell assigns the expanded value. +.PP +Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (as described above under +.SM +.BR PARAMETERS ) +when they appear as arguments to simple commands. +Bash does not do this, except for the \fIdeclaration\fP commands listed +above, when in \fIposix mode\fP. +.SS Parameter Expansion +The `\fB$\fP' character introduces parameter expansion, +command substitution, or arithmetic expansion. The parameter name +or symbol to be expanded may be enclosed in braces, which +are optional but serve to protect the variable to be expanded from +characters immediately following it which could be +interpreted as part of the name. +.PP +When braces are used, the matching ending brace is the first `\fB}\fP' +not escaped by a backslash or within a quoted string, and not within an +embedded arithmetic expansion, command substitution, or parameter +expansion. +.PP +.PD 0 +.TP +${\fIparameter\fP} +The value of \fIparameter\fP is substituted. The braces are required +when +.I parameter +is a positional parameter with more than one digit, +or when +.I parameter +is followed by a character which is not to be +interpreted as part of its name. +The \fIparameter\fP is a shell parameter as described above +\fBPARAMETERS\fP) or an array reference (\fBArrays\fP). +.PD +.PP +If the first character of \fIparameter\fP is an exclamation point (\fB!\fP), +and \fIparameter\fP is not a \fInameref\fP, +it introduces a level of indirection. +\fBBash\fP uses the value formed by expanding the rest of +\fIparameter\fP as the new \fIparameter\fP; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original \fIparameter\fP. +This is known as \fIindirect expansion\fP. +The value is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +If \fIparameter\fP is a nameref, this expands to the name of the +parameter referenced by \fIparameter\fP instead of performing the +complete indirect expansion. +The exceptions to this are the expansions of ${\fB!\fP\fIprefix\fP\fB*\fP} and +${\fB!\fP\fIname\fP[\fI@\fP]} described below. +The exclamation point must immediately follow the left brace in order to +introduce indirection. +.PP +In each of the cases below, \fIword\fP is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +.PP +When not performing substring expansion, using the forms documented below +(e.g., \fB:-\fP), +\fBbash\fP tests for a parameter that is unset or null. Omitting the colon +results in a test only for a parameter that is unset. +.PP +.PD 0 +.TP +${\fIparameter\fP\fB:\-\fP\fIword\fP} +\fBUse Default Values\fP. If +.I parameter +is unset or null, the expansion of +.I word +is substituted. Otherwise, the value of +.I parameter +is substituted. +.TP +${\fIparameter\fP\fB:=\fP\fIword\fP} +\fBAssign Default Values\fP. +If +.I parameter +is unset or null, the expansion of +.I word +is assigned to +.IR parameter . +The value of +.I parameter +is then substituted. Positional parameters and special parameters may +not be assigned to in this way. +.TP +${\fIparameter\fP\fB:?\fP\fIword\fP} +\fBDisplay Error if Null or Unset\fP. +If +.I parameter +is null or unset, the expansion of \fIword\fP (or a message to that effect +if +.I word +is not present) is written to the standard error and the shell, if it +is not interactive, exits. Otherwise, the value of \fIparameter\fP is +substituted. +.TP +${\fIparameter\fP\fB:+\fP\fIword\fP} +\fBUse Alternate Value\fP. +If +.I parameter +is null or unset, nothing is substituted, otherwise the expansion of +.I word +is substituted. +.TP +${\fIparameter\fP\fB:\fP\fIoffset\fP} +.PD 0 +.TP +${\fIparameter\fP\fB:\fP\fIoffset\fP\fB:\fP\fIlength\fP} +.PD +\fBSubstring Expansion\fP. +Expands to up to \fIlength\fP characters of the value of \fIparameter\fP +starting at the character specified by \fIoffset\fP. +If \fIparameter\fP is \fB@\fP, an indexed array subscripted by +\fB@\fP or \fB*\fP, or an associative array name, the results differ as +described below. +If \fIlength\fP is omitted, expands to the substring of the value of +\fIparameter\fP starting at the character specified by \fIoffset\fP +and extending to the end of the value. +\fIlength\fP and \fIoffset\fP are arithmetic expressions (see +.SM +.B +ARITHMETIC EVALUATION +below). +.sp 1 +If \fIoffset\fP evaluates to a number less than zero, the value +is used as an offset in characters +from the end of the value of \fIparameter\fP. +If \fIlength\fP evaluates to a number less than zero, +it is interpreted as an offset in characters +from the end of the value of \fIparameter\fP rather than +a number of characters, and the expansion is the characters between +\fIoffset\fP and that result. +Note that a negative offset must be separated from the colon by at least +one space to avoid being confused with the \fB:-\fP expansion. +.sp 1 +If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional +parameters beginning at \fIoffset\fP. +A negative \fIoffset\fP is taken relative to one greater than the greatest +positional parameter, so an offset of \-1 evaluates to the last positional +parameter. +It is an expansion error if \fIlength\fP evaluates to a number less than +zero. +.sp 1 +If \fIparameter\fP is an indexed array name subscripted by @ or *, +the result is the \fIlength\fP +members of the array beginning with ${\fIparameter\fP[\fIoffset\fP]}. +A negative \fIoffset\fP is taken relative to one greater than the maximum +index of the specified array. +It is an expansion error if \fIlength\fP evaluates to a number less than +zero. +.sp 1 +Substring expansion applied to an associative array produces undefined +results. +.sp 1 +Substring indexing is zero-based unless the positional parameters +are used, in which case the indexing starts at 1 by default. +If \fIoffset\fP is 0, and the positional parameters are used, \fB$0\fP is +prefixed to the list. +.TP +${\fB!\fP\fIprefix\fP\fB*\fP} +.PD 0 +.TP +${\fB!\fP\fIprefix\fP\fB@\fP} +.PD +\fBNames matching prefix\fP. +Expands to the names of variables whose names begin with \fIprefix\fP, +separated by the first character of the +.SM +.B IFS +special variable. +When \fI@\fP is used and the expansion appears within double quotes, each +variable name expands to a separate word. +.TP +${\fB!\fP\fIname\fP[\fI@\fP]} +.PD 0 +.TP +${\fB!\fP\fIname\fP[\fI*\fP]} +.PD +\fBList of array keys\fP. +If \fIname\fP is an array variable, expands to the list of array indices +(keys) assigned in \fIname\fP. +If \fIname\fP is not an array, expands to 0 if \fIname\fP is set and null +otherwise. +When \fI@\fP is used and the expansion appears within double quotes, each +key expands to a separate word. +.TP +${\fB#\fP\fIparameter\fP} +\fBParameter length\fP. +The length in characters of the value of \fIparameter\fP is substituted. +If +.I parameter +is +.B * +or +.BR @ , +the value substituted is the number of positional parameters. +If +.I parameter +is an array name subscripted by +.B * +or +.BR @ , +the value substituted is the number of elements in the array. +If +.I parameter +is an indexed array name subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +\fIparameter\fP, so negative indices count back from the end of the +array, and an index of \-1 references the last element. +.TP +${\fIparameter\fP\fB#\fP\fIword\fP} +.PD 0 +.TP +${\fIparameter\fP\fB##\fP\fIword\fP} +.PD +\fBRemove matching prefix pattern\fP. +The +.I word +is expanded to produce a pattern just as in pathname +expansion, and matched against the expanded value of +.I parameter +using the rules described under +.B Pattern Matching +below. +If the pattern matches the beginning of +the value of +.IR parameter , +then the result of the expansion is the expanded value of +.I parameter +with the shortest matching pattern (the ``\fB#\fP'' case) or the +longest matching pattern (the ``\fB##\fP'' case) deleted. +If +.I parameter +is +.B @ +or +.BR * , +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +.I parameter +is an array variable subscripted with +.B @ +or +.BR * , +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.TP +${\fIparameter\fP\fB%\fP\fIword\fP} +.PD 0 +.TP +${\fIparameter\fP\fB%%\fP\fIword\fP} +.PD +\fBRemove matching suffix pattern\fP. +The \fIword\fP is expanded to produce a pattern just as in +pathname expansion, and matched against the expanded value of +.I parameter +using the rules described under +.B Pattern Matching +below. +If the pattern matches a trailing portion of the expanded value of +.IR parameter , +then the result of the expansion is the expanded value of +.I parameter +with the shortest matching pattern (the ``\fB%\fP'' case) or the +longest matching pattern (the ``\fB%%\fP'' case) deleted. +If +.I parameter +is +.B @ +or +.BR * , +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +.I parameter +is an array variable subscripted with +.B @ +or +.BR * , +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.TP +${\fIparameter\fP\fB/\fP\fIpattern\fP\fB/\fP\fIstring\fP} +\fBPattern substitution\fP. +The \fIpattern\fP is expanded to produce a pattern just as in +pathname expansion, +\fIParameter\fP is expanded and the longest match of \fIpattern\fP +against its value is replaced with \fIstring\fP. +The match is performed using the rules described under +.B Pattern Matching +below. +If \fIpattern\fP begins with \fB/\fP, all matches of \fIpattern\fP are +replaced with \fIstring\fP. Normally only the first match is replaced. +If \fIpattern\fP begins with \fB#\fP, it must match at the beginning +of the expanded value of \fIparameter\fP. +If \fIpattern\fP begins with \fB%\fP, it must match at the end +of the expanded value of \fIparameter\fP. +If \fIstring\fP is null, matches of \fIpattern\fP are deleted +and the \fB/\fP following \fIpattern\fP may be omitted. +If the +.B nocasematch +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +If +.I parameter +is +.B @ +or +.BR * , +the substitution operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +.I parameter +is an array variable subscripted with +.B @ +or +.BR * , +the substitution operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.TP +${\fIparameter\fP\fB^\fP\fIpattern\fP} +.PD 0 +.TP +${\fIparameter\fP\fB^^\fP\fIpattern\fP} +.TP +${\fIparameter\fP\fB,\fP\fIpattern\fP} +.TP +${\fIparameter\fP\fB,,\fP\fIpattern\fP} +.PD +\fBCase modification\fP. +This expansion modifies the case of alphabetic characters in \fIparameter\fP. +The \fIpattern\fP is expanded to produce a pattern just as in +pathname expansion. +Each character in the expanded value of \fIparameter\fP is tested against +\fIpattern\fP, and, if it matches the pattern, its case is converted. +The pattern should not attempt to match more than one character. +The \fB^\fP operator converts lowercase letters matching \fIpattern\fP +to uppercase; the \fB,\fP operator converts matching uppercase letters +to lowercase. +The \fB^^\fP and \fB,,\fP expansions convert each matched character in the +expanded value; the \fB^\fP and \fB,\fP expansions match and convert only +the first character in the expanded value. +If \fIpattern\fP is omitted, it is treated like a \fB?\fP, which matches +every character. +If +.I parameter +is +.B @ +or +.BR * , +the case modification operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +.I parameter +is an array variable subscripted with +.B @ +or +.BR * , +the case modification operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.TP +${\fIparameter\fP\fB@\fP\fIoperator\fP} +\fBParameter transformation\fP. +The expansion is either a transformation of the value of \fIparameter\fP +or information about \fIparameter\fP itself, depending on the value of +\fIoperator\fP. Each \fIoperator\fP is a single letter: +.sp 1 +.RS +.PD 0 +.TP +.B U +The expansion is a string that is the value of \fIparameter\fP with lowercase +alphabetic characters converted to uppercase. +.TP +.B u +The expansion is a string that is the value of \fIparameter\fP with the first +character converted to uppercase, if it is alphabetic. +.TP +.B L +The expansion is a string that is the value of \fIparameter\fP with uppercase +alphabetic characters converted to lowercase. +.TP +.B Q +The expansion is a string that is the value of \fIparameter\fP quoted in a +format that can be reused as input. +.TP +.B E +The expansion is a string that is the value of \fIparameter\fP with backslash +escape sequences expanded as with the \fB$'...'\fP quoting mechanism. +.TP +.B P +The expansion is a string that is the result of expanding the value of +\fIparameter\fP as if it were a prompt string (see \fBPROMPTING\fP below). +.TP +.B A +The expansion is a string in the form of +an assignment statement or \fBdeclare\fP command that, if +evaluated, will recreate \fIparameter\fP with its attributes and value. +.TP +.B K +Produces a possibly-quoted version of the value of \fIparameter\fP, +except that it prints the values of +indexed and associative arrays as a sequence of quoted key-value pairs +(see \fBArrays\fP above). +.TP +.B a +The expansion is a string consisting of flag values representing +\fIparameter\fP's attributes. +.PD +.PP +If +.I parameter +is +.B @ +or +.BR * , +the operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +.I parameter +is an array variable subscripted with +.B @ +or +.BR * , +the operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.sp 1 +The result of the expansion is subject to word splitting and pathname +expansion as described below. +.RE +.SS Command Substitution +\fICommand substitution\fP allows the output of a command to replace +the command name. There are two forms: +.RS +.PP +\fB$(\fP\fIcommand\fP\|\fB)\fP +.RE +or +.RS +\fB\`\fP\fIcommand\fP\fB\`\fP +.RE +.PP +.B Bash +performs the expansion by executing \fIcommand\fP in a subshell environment +and replacing the command substitution with the standard output of the +command, with any trailing newlines deleted. +Embedded newlines are not deleted, but they may be removed during +word splitting. +The command substitution \fB$(cat \fIfile\fP)\fR can be replaced by +the equivalent but faster \fB$(< \fIfile\fP)\fR. +.PP +When the old-style backquote form of substitution is used, +backslash retains its literal meaning except when followed by +.BR $ , +.BR \` , +or +.BR \e . +The first backquote not preceded by a backslash terminates the +command substitution. +When using the $(\^\fIcommand\fP\|) form, all characters between the +parentheses make up the command; none are treated specially. +.PP +Command substitutions may be nested. To nest when using the backquoted form, +escape the inner backquotes with backslashes. +.PP +If the substitution appears within double quotes, word splitting and +pathname expansion are not performed on the results. +.SS Arithmetic Expansion +Arithmetic expansion allows the evaluation of an arithmetic expression +and the substitution of the result. The format for arithmetic expansion is: +.RS +.PP +\fB$((\fP\fIexpression\fP\fB))\fP +.RE +.PP +The +.I expression +is treated as if it were within double quotes, but a double quote +inside the parentheses is not treated specially. +All tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. +The result is treated as the arithmetic expression to be evaluated. +Arithmetic expansions may be nested. +.PP +The evaluation is performed according to the rules listed below under +.SM +.BR "ARITHMETIC EVALUATION" . +If +.I expression +is invalid, +.B bash +prints a message indicating failure and no substitution occurs. +.SS Process Substitution +\fIProcess substitution\fP allows a process's input or output to be +referred to using a filename. +It takes the form of +\fB<(\fP\fIlist\^\fP\fB)\fP +or +\fB>(\fP\fIlist\^\fP\fB)\fP. +The process \fIlist\fP is run asynchronously, and its input or output +appears as a filename. +This filename is +passed as an argument to the current command as the result of the +expansion. +If the \fB>(\fP\fIlist\^\fP\fB)\fP form is used, writing to +the file will provide input for \fIlist\fP. If the +\fB<(\fP\fIlist\^\fP\fB)\fP form is used, the file passed as an +argument should be read to obtain the output of \fIlist\fP. +Process substitution is supported on systems that support named +pipes (\fIFIFOs\fP) or the \fB/dev/fd\fP method of naming open files. +.PP +When available, process substitution is performed +simultaneously with parameter and variable expansion, +command substitution, +and arithmetic expansion. +.SS Word Splitting +The shell scans the results of +parameter expansion, +command substitution, +and +arithmetic expansion +that did not occur within double quotes for +.IR "word splitting" . +.PP +The shell treats each character of +.SM +.B IFS +as a delimiter, and splits the results of the other +expansions into words using these characters as field terminators. +If +.SM +.B IFS +is unset, or its +value is exactly +.BR , +the default, then +sequences of +.BR , +.BR , +and +.B +at the beginning and end of the results of the previous +expansions are ignored, and +any sequence of +.SM +.B IFS +characters not at the beginning or end serves to delimit words. +If +.SM +.B IFS +has a value other than the default, then sequences of +the whitespace characters +.BR space , +.BR tab , +and +.B newline +are ignored at the beginning and end of the +word, as long as the whitespace character is in the +value of +.SM +.B IFS +(an +.SM +.B IFS +whitespace character). +Any character in +.SM +.B IFS +that is not +.SM +.B IFS +whitespace, along with any adjacent +.SM +.B IFS +whitespace characters, delimits a field. +A sequence of +.SM +.B IFS +whitespace characters is also treated as a delimiter. +If the value of +.SM +.B IFS +is null, no word splitting occurs. +.PP +Explicit null arguments (\^\f3"\^"\fP or \^\f3\(aq\^\(aq\fP\^) are retained +and passed to commands as empty strings. +Unquoted implicit null arguments, resulting from the expansion of +parameters that have no values, are removed. +If a parameter with no value is expanded within double quotes, a +null argument results and is retained +and passed to a command as an empty string. +When a quoted null argument appears as part of a word whose expansion is +non-null, the null argument is removed. +That is, the word +\f(CW\-d\(aq\^\(aq\fP becomes \f(CW\-d\fP after word splitting and +null argument removal. +.PP +Note that if no expansion occurs, no splitting +is performed. +.SS Pathname Expansion +After word splitting, +unless the +.B \-f +option has been set, +.B bash +scans each word for the characters +.BR * , +.BR ? , +and +.BR [ . +If one of these characters appears, and is not quoted, then the word is +regarded as a +.IR pattern , +and replaced with an alphabetically sorted list of +filenames matching the pattern +(see +.SM +.B "Pattern Matching" +below). +If no matching filenames are found, +and the shell option +.B nullglob +is not enabled, the word is left unchanged. +If the +.B nullglob +option is set, and no matches are found, +the word is removed. +If the +.B failglob +shell option is set, and no matches are found, an error message +is printed and the command is not executed. +If the shell option +.B nocaseglob +is enabled, the match is performed without regard to the case +of alphabetic characters. +When a pattern is used for pathname expansion, +the character +.B ``.'' +at the start of a name or immediately following a slash +must be matched explicitly, unless the shell option +.B dotglob +is set. +The filenames +.B ``.'' +and +.B ``..'' +must always be matched explicitly, even if +.B dotglob +is set. +In other cases, the +.B ``.'' +character is not treated specially. +When matching a pathname, the slash character must always be +matched explicitly by a slash in the pattern, but in other matching +contexts it can be matched by a special pattern character as described +below under +.SM +.BR "Pattern Matching" . +See the description of +.B shopt +below under +.SM +.B SHELL BUILTIN COMMANDS +for a description of the +.BR nocaseglob , +.BR nullglob , +.BR failglob , +and +.B dotglob +shell options. +.PP +The +.SM +.B GLOBIGNORE +shell variable may be used to restrict the set of file names matching a +.IR pattern . +If +.SM +.B GLOBIGNORE +is set, each matching file name that also matches one of the patterns in +.SM +.B GLOBIGNORE +is removed from the list of matches. +If the \fBnocaseglob\fP option is set, the matching against the patterns in +.SM +.B GLOBIGNORE +is performed without regard to case. +The filenames +.B ``.'' +and +.B ``..'' +are always ignored when +.SM +.B GLOBIGNORE +is set and not null. However, setting +.SM +.B GLOBIGNORE +to a non-null value has the effect of enabling the +.B dotglob +shell option, so all other filenames beginning with a +.B ``.'' +will match. +To get the old behavior of ignoring filenames beginning with a +.BR ``.'' , +make +.B ``.*'' +one of the patterns in +.SM +.BR GLOBIGNORE . +The +.B dotglob +option is disabled when +.SM +.B GLOBIGNORE +is unset. +The pattern matching honors the setting of the \fBextglob\fP shell +option. +.PP +\fBPattern Matching\fP +.PP +Any character that appears in a pattern, other than the special pattern +characters described below, matches itself. The NUL character may not +occur in a pattern. A backslash escapes the following character; the +escaping backslash is discarded when matching. +The special pattern characters must be quoted if +they are to be matched literally. +.PP +The special pattern characters have the following meanings: +.PP +.PD 0 +.RS +.TP +.B * +Matches any string, including the null string. +When the \fBglobstar\fP shell option is enabled, and \fB*\fP is used in +a pathname expansion context, two adjacent \fB*\fPs used as a single +pattern will match all files and zero or more directories and +subdirectories. +If followed by a \fB/\fP, two adjacent \fB*\fPs will match only directories +and subdirectories. +.TP +.B ? +Matches any single character. +.TP +.B [...] +Matches any one of the enclosed characters. A pair of characters +separated by a hyphen denotes a +\fIrange expression\fP; +any character that falls between those two characters, inclusive, +using the current locale's collating sequence and character set, +is matched. If the first character following the +.B [ +is a +.B ! +or a +.B ^ +then any character not enclosed is matched. +The sorting order of characters in range expressions is determined by +the current locale and the values of the +.SM +.B LC_COLLATE +or +.SM +.B LC_ALL +shell variables, if set. +To obtain the traditional interpretation of range expressions, where +.B [a\-d] +is equivalent to +.BR [abcd] , +set value of the +.B LC_ALL +shell variable to +.BR C , +or enable the +.B globasciiranges +shell option. +A +.B \- +may be matched by including it as the first or last character +in the set. +A +.B ] +may be matched by including it as the first character +in the set. +.br +.if t .sp 0.5 +.if n .sp 1 +Within +.B [ +and +.BR ] , +\fIcharacter classes\fP can be specified using the syntax +\fB[:\fP\fIclass\fP\fB:]\fP, where \fIclass\fP is one of the +following classes defined in the POSIX standard: +.PP +.RS +.B +.if n alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit +.if t alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit +.br +A character class matches any character belonging to that class. +The \fBword\fP character class matches letters, digits, and the character _. +.br +.if t .sp 0.5 +.if n .sp 1 +Within +.B [ +and +.BR ] , +an \fIequivalence class\fP can be specified using the syntax +\fB[=\fP\fIc\fP\fB=]\fP, which matches all characters with the +same collation weight (as defined by the current locale) as +the character \fIc\fP. +.br +.if t .sp 0.5 +.if n .sp 1 +Within +.B [ +and +.BR ] , +the syntax \fB[.\fP\fIsymbol\fP\fB.]\fP matches the collating symbol +\fIsymbol\fP. +.RE +.RE +.PD +.PP +If the \fBextglob\fP shell option is enabled using the \fBshopt\fP +builtin, several extended pattern matching operators are recognized. +In the following description, a \fIpattern-list\fP is a list of one +or more patterns separated by a \fB|\fP. +Composite patterns may be formed using one or more of the following +sub-patterns: +.sp 1 +.PD 0 +.RS +.TP +\fB?(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches zero or one occurrence of the given patterns +.TP +\fB*(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches zero or more occurrences of the given patterns +.TP +\fB+(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches one or more occurrences of the given patterns +.TP +\fB@(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches one of the given patterns +.TP +\fB!(\fP\^\fIpattern-list\^\fP\fB)\fP +Matches anything except one of the given patterns +.RE +.PD +.PP +Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. +Using separate matches against shorter strings, or using arrays of +strings instead of a single long string, may be faster. +.SS Quote Removal +After the preceding expansions, all unquoted occurrences of the +characters +.BR \e , +.BR \(aq , +and \^\f3"\fP\^ that did not result from one of the above +expansions are removed. +.SH REDIRECTION +Before a command is executed, its input and output +may be +.I redirected +using a special notation interpreted by the shell. +Redirection allows commands' file handles to be +duplicated, opened, closed, +made to refer to different files, +and can change the files the command reads from and writes to. +Redirection may also be used to modify file handles in the +current shell execution environment. +The following redirection +operators may precede or appear anywhere within a +.I simple command +or may follow a +.IR command . +Redirections are processed in the order they appear, from +left to right. +.PP +Each redirection that may be preceded by a file descriptor number +may instead be preceded by a word of the form {\fIvarname\fP}. +In this case, for each redirection operator except +>&- and <&-, the shell will allocate a file descriptor greater +than or equal to 10 and assign it to \fIvarname\fP. +If >&- or <&- is preceded +by {\fIvarname\fP}, the value of \fIvarname\fP defines the file +descriptor to close. +If {\fIvarname\fP} is supplied, the redirection persists beyond +the scope of the command, allowing the shell programmer to manage +the file descriptor himself. +.PP +In the following descriptions, if the file descriptor number is +omitted, and the first character of the redirection operator is +.BR < , +the redirection refers to the standard input (file descriptor +0). If the first character of the redirection operator is +.BR > , +the redirection refers to the standard output (file descriptor +1). +.PP +The word following the redirection operator in the following +descriptions, unless otherwise noted, is subjected to +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, quote removal, +pathname expansion, and word splitting. +If it expands to more than one word, +.B bash +reports an error. +.PP +Note that the order of redirections is significant. For example, +the command +.RS +.PP +ls \fB>\fP dirlist 2\fB>&\fP1 +.RE +.PP +directs both standard output and standard error to the file +.IR dirlist , +while the command +.RS +.PP +ls 2\fB>&\fP1 \fB>\fP dirlist +.RE +.PP +directs only the standard output to file +.IR dirlist , +because the standard error was duplicated from the standard output +before the standard output was redirected to +.IR dirlist . +.PP +\fBBash\fP handles several filenames specially when they are used in +redirections, as described in the following table. +If the operating system on which \fBbash\fP is running provides these +special files, bash will use them; otherwise it will emulate them +internally with the behavior described below. +.RS +.PP +.PD 0 +.TP +.B /dev/fd/\fIfd\fP +If \fIfd\fP is a valid integer, file descriptor \fIfd\fP is duplicated. +.TP +.B /dev/stdin +File descriptor 0 is duplicated. +.TP +.B /dev/stdout +File descriptor 1 is duplicated. +.TP +.B /dev/stderr +File descriptor 2 is duplicated. +.TP +.B /dev/tcp/\fIhost\fP/\fIport\fP +If \fIhost\fP is a valid hostname or Internet address, and \fIport\fP +is an integer port number or service name, \fBbash\fP attempts to open +the corresponding TCP socket. +.TP +.B /dev/udp/\fIhost\fP/\fIport\fP +If \fIhost\fP is a valid hostname or Internet address, and \fIport\fP +is an integer port number or service name, \fBbash\fP attempts to open +the corresponding UDP socket. +.PD +.RE +.PP +A failure to open or create a file causes the redirection to fail. +.PP +Redirections using file descriptors greater than 9 should be used with +care, as they may conflict with file descriptors the shell uses +internally. +.SS Redirecting Input +Redirection of input causes the file whose name results from +the expansion of +.I word +to be opened for reading on file descriptor +.IR n , +or the standard input (file descriptor 0) if +.I n +is not specified. +.PP +The general format for redirecting input is: +.RS +.PP +[\fIn\fP]\fB<\fP\fIword\fP +.RE +.SS Redirecting Output +Redirection of output causes the file whose name results from +the expansion of +.I word +to be opened for writing on file descriptor +.IR n , +or the standard output (file descriptor 1) if +.I n +is not specified. If the file does not exist it is created; +if it does exist it is truncated to zero size. +.PP +The general format for redirecting output is: +.RS +.PP +[\fIn\fP]\fB>\fP\fIword\fP +.RE +.PP +If the redirection operator is +.BR > , +and the +.B noclobber +option to the +.B set +builtin has been enabled, the redirection will fail if the file +whose name results from the expansion of \fIword\fP exists and is +a regular file. +If the redirection operator is +.BR >| , +or the redirection operator is +.B > +and the +.B noclobber +option to the +.B set +builtin command is not enabled, the redirection is attempted even +if the file named by \fIword\fP exists. +.SS Appending Redirected Output +Redirection of output in this fashion +causes the file whose name results from +the expansion of +.I word +to be opened for appending on file descriptor +.IR n , +or the standard output (file descriptor 1) if +.I n +is not specified. If the file does not exist it is created. +.PP +The general format for appending output is: +.RS +.PP +[\fIn\fP]\fB>>\fP\fIword\fP +.RE +.SS Redirecting Standard Output and Standard Error +This construct allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be redirected to the file whose name is the +expansion of +.IR word . +.PP +There are two formats for redirecting standard output and +standard error: +.RS +.PP +\fB&>\fP\fIword\fP +.RE +and +.RS +\fB>&\fP\fIword\fP +.RE +.PP +Of the two forms, the first is preferred. +This is semantically equivalent to +.RS +.PP +\fB>\fP\fIword\fP 2\fB>&\fP1 +.RE +.PP +When using the second form, \fIword\fP may not expand to a number or +\fB\-\fP. If it does, other redirection operators apply +(see \fBDuplicating File Descriptors\fP below) for compatibility +reasons. +.SS Appending Standard Output and Standard Error +This construct allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be appended to the file whose name is the +expansion of +.IR word . +.PP +The format for appending standard output and standard error is: +.RS +.PP +\fB&>>\fP\fIword\fP +.RE +.PP +This is semantically equivalent to +.RS +.PP +\fB>>\fP\fIword\fP 2\fB>&\fP1 +.RE +.PP +(see \fBDuplicating File Descriptors\fP below). +.SS Here Documents +This type of redirection instructs the shell to read input from the +current source until a line containing only +.I delimiter +(with no trailing blanks) +is seen. All of +the lines read up to that point are then used as the standard +input (or file descriptor \fIn\fP if \fIn\fP is specified) for a command. +.PP +The format of here-documents is: +.RS +.PP +.nf +[\fIn\fP]\fB<<\fP[\fB\-\fP]\fIword\fP + \fIhere-document\fP +\fIdelimiter\fP +.fi +.RE +.PP +No parameter and variable expansion, command substitution, +arithmetic expansion, or pathname expansion is performed on +.IR word . +If any part of +.I word +is quoted, the +.I delimiter +is the result of quote removal on +.IR word , +and the lines in the here-document are not expanded. +If \fIword\fP is unquoted, +all lines of the here-document are subjected to +parameter expansion, command substitution, and arithmetic expansion, +the character sequence +.B \e +is ignored, and +.B \e +must be used to quote the characters +.BR \e , +.BR $ , +and +.BR \` . +.PP +If the redirection operator is +.BR <<\- , +then all leading tab characters are stripped from input lines and the +line containing +.IR delimiter . +This allows +here-documents within shell scripts to be indented in a +natural fashion. +.SS "Here Strings" +A variant of here documents, the format is: +.RS +.PP +.nf +[\fIn\fP]\fB<<<\fP\fIword\fP +.fi +.RE +.PP +The \fIword\fP undergoes +tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. +Pathname expansion and word splitting are not performed. +The result is supplied as a single string, with a newline appended, +to the command on its +standard input (or file descriptor \fIn\fP if \fIn\fP is specified). +.SS "Duplicating File Descriptors" +The redirection operator +.RS +.PP +[\fIn\fP]\fB<&\fP\fIword\fP +.RE +.PP +is used to duplicate input file descriptors. +If +.I word +expands to one or more digits, the file descriptor denoted by +.I n +is made to be a copy of that file descriptor. +If the digits in +.I word +do not specify a file descriptor open for input, a redirection error occurs. +If +.I word +evaluates to +.BR \- , +file descriptor +.I n +is closed. If +.I n +is not specified, the standard input (file descriptor 0) is used. +.PP +The operator +.RS +.PP +[\fIn\fP]\fB>&\fP\fIword\fP +.RE +.PP +is used similarly to duplicate output file descriptors. If +.I n +is not specified, the standard output (file descriptor 1) is used. +If the digits in +.I word +do not specify a file descriptor open for output, a redirection error occurs. +If +.I word +evaluates to +.BR \- , +file descriptor +.I n +is closed. +As a special case, if \fIn\fP is omitted, and \fIword\fP does not +expand to one or more digits or \fB\-\fP, the standard output and standard +error are redirected as described previously. +.SS "Moving File Descriptors" +The redirection operator +.RS +.PP +[\fIn\fP]\fB<&\fP\fIdigit\fP\fB\-\fP +.RE +.PP +moves the file descriptor \fIdigit\fP to file descriptor +.IR n , +or the standard input (file descriptor 0) if \fIn\fP is not specified. +\fIdigit\fP is closed after being duplicated to \fIn\fP. +.PP +Similarly, the redirection operator +.RS +.PP +[\fIn\fP]\fB>&\fP\fIdigit\fP\fB\-\fP +.RE +.PP +moves the file descriptor \fIdigit\fP to file descriptor +.IR n , +or the standard output (file descriptor 1) if \fIn\fP is not specified. +.SS "Opening File Descriptors for Reading and Writing" +The redirection operator +.RS +.PP +[\fIn\fP]\fB<>\fP\fIword\fP +.RE +.PP +causes the file whose name is the expansion of +.I word +to be opened for both reading and writing on file descriptor +.IR n , +or on file descriptor 0 if +.I n +is not specified. If the file does not exist, it is created. +.SH ALIASES +\fIAliases\fP allow a string to be substituted for a word when it is used +as the first word of a simple command. +The shell maintains a list of aliases that may be set and unset with the +.B alias +and +.B unalias +builtin commands (see +.SM +.B SHELL BUILTIN COMMANDS +below). +The first word of each simple command, if unquoted, +is checked to see if it has an +alias. If so, that word is replaced by the text of the alias. +The characters \fB/\fP, \fB$\fP, \fB\`\fP, and \fB=\fP and +any of the shell \fImetacharacters\fP or quoting characters +listed above may not appear in an alias name. +The replacement text may contain any valid shell input, +including shell metacharacters. +The first word of the replacement text is tested +for aliases, but a word that is identical to an alias being expanded +is not expanded a second time. +This means that one may alias +.B ls +to +.BR "ls \-F" , +for instance, and +.B bash +does not try to recursively expand the replacement text. +If the last character of the alias value is a +.IR blank , +then the next command +word following the alias is also checked for alias expansion. +.PP +Aliases are created and listed with the +.B alias +command, and removed with the +.B unalias +command. +.PP +There is no mechanism for using arguments in the replacement text. +If arguments are needed, a shell function should be used (see +.SM +.B FUNCTIONS +below). +.PP +Aliases are not expanded when the shell is not interactive, unless +the +.B expand_aliases +shell option is set using +.B shopt +(see the description of +.B shopt +under +.SM +\fBSHELL BUILTIN COMMANDS\fP +below). +.PP +The rules concerning the definition and use of aliases are +somewhat confusing. +.B Bash +always reads at least one complete line of input, +and all lines that make up a compound command, +before executing any of the commands on that line or the compound command. +Aliases are expanded when a +command is read, not when it is executed. Therefore, an +alias definition appearing on the same line as another +command does not take effect until the next line of input is read. +The commands following the alias definition +on that line are not affected by the new alias. +This behavior is also an issue when functions are executed. +Aliases are expanded when a function definition is read, +not when the function is executed, because a function definition +is itself a command. As a consequence, aliases +defined in a function are not available until after that +function is executed. To be safe, always put +alias definitions on a separate line, and do not use +.B alias +in compound commands. +.PP +For almost every purpose, aliases are superseded by +shell functions. +.SH FUNCTIONS +A shell function, defined as described above under +.SM +.BR "SHELL GRAMMAR" , +stores a series of commands for later execution. +When the name of a shell function is used as a simple command name, +the list of commands associated with that function name is executed. +Functions are executed in the context of the +current shell; no new process is created to interpret +them (contrast this with the execution of a shell script). +When a function is executed, the arguments to the +function become the positional parameters +during its execution. +The special parameter +.B # +is updated to reflect the change. Special parameter \fB0\fP +is unchanged. +The first element of the +.SM +.B FUNCNAME +variable is set to the name of the function while the function +is executing. +.PP +All other aspects of the shell execution +environment are identical between a function and its caller +with these exceptions: the +.SM +.B DEBUG +and +.B RETURN +traps (see the description of the +.B trap +builtin under +.SM +.B SHELL BUILTIN COMMANDS +below) are not inherited unless the function has been given the +\fBtrace\fP attribute (see the description of the +.SM +.B declare +builtin below) or the +\fB\-o functrace\fP shell option has been enabled with +the \fBset\fP builtin +(in which case all functions inherit the \fBDEBUG\fP and \fBRETURN\fP traps), +and the +.SM +.B ERR +trap is not inherited unless the \fB\-o errtrace\fP shell option has +been enabled. +.PP +Variables local to the function may be declared with the +.B local +builtin command. Ordinarily, variables and their values +are shared between the function and its caller. +If a variable is declared \fBlocal\fP, the variable's visible scope +is restricted to that function and its children (including the functions +it calls). +Local variables "shadow" variables with the same name declared at +previous scopes. +For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. +.PP +The shell uses \fIdynamic scoping\fP to control a variable's visibility +within functions. +With dynamic scoping, visible variables and their values +are a result of the sequence of function calls that caused execution +to reach the current function. +The value of a variable that a function sees depends +on its value within its caller, if any, whether that caller is +the "global" scope or another shell function. +This is also the value that a local variable +declaration "shadows", and the value that is restored when the function +returns. +.PP +For example, if a variable \fIvar\fP is declared as local in function +\fIfunc1\fP, and \fIfunc1\fP calls another function \fIfunc2\fP, +references to \fIvar\fP made from within \fIfunc2\fP will resolve to the +local variable \fIvar\fP from \fIfunc1\fP, shadowing any global variable +named \fIvar\fP. +.PP +The \fBunset\fP builtin also acts using the same dynamic scope: if a +variable is local to the current scope, \fBunset\fP will unset it; +otherwise the unset will refer to the variable found in any calling scope +as described above. +If a variable at the current local scope is unset, it will remain so +until it is reset in that scope or until the function returns. +Once the function returns, any instance of the variable at a previous +scope will become visible. +If the unset acts on a variable at a previous scope, any instance of a +variable with that name that had been shadowed will become visible. +.PP +The \fBFUNCNEST\fP variable, if set to a numeric value greater +than 0, defines a maximum function nesting level. Function +invocations that exceed the limit cause the entire command to +abort. +.PP +If the builtin command +.B return +is executed in a function, the function completes and +execution resumes with the next command after the function +call. +Any command associated with the \fBRETURN\fP trap is executed +before execution resumes. +When a function completes, the values of the +positional parameters and the special parameter +.B # +are restored to the values they had prior to the function's +execution. +.PP +Function names and definitions may be listed with the +.B \-f +option to the +.B declare +or +.B typeset +builtin commands. The +.B \-F +option to +.B declare +or +.B typeset +will list the function names only +(and optionally the source file and line number, if the \fBextdebug\fP +shell option is enabled). +Functions may be exported so that subshells +automatically have them defined with the +.B \-f +option to the +.B export +builtin. +A function definition may be deleted using the \fB\-f\fP option to +the +.B unset +builtin. +.PP +Functions may be recursive. +The \fBFUNCNEST\fP variable may be used to limit the depth of the +function call stack and restrict the number of function invocations. +By default, no limit is imposed on the number of recursive calls. +.SH "ARITHMETIC EVALUATION" +The shell allows arithmetic expressions to be evaluated, under +certain circumstances (see the \fBlet\fP and \fBdeclare\fP builtin +commands, the \fB((\fP compound command, and \fBArithmetic Expansion\fP). +Evaluation is done in fixed-width integers with no check for overflow, +though division by 0 is trapped and flagged as an error. +The operators and their precedence, associativity, and values +are the same as in the C language. +The following list of operators is grouped into levels of +equal-precedence operators. +The levels are listed in order of decreasing precedence. +.PP +.PD 0 +.TP +.B \fIid\fP++ \fIid\fP\-\- +variable post-increment and post-decrement +.TP +.B \- + +unary minus and plus +.TP +.B ++\fIid\fP \-\-\fIid\fP +variable pre-increment and pre-decrement +.TP +.B ! ~ +logical and bitwise negation +.TP +.B ** +exponentiation +.TP +.B * / % +multiplication, division, remainder +.TP +.B + \- +addition, subtraction +.TP +.B << >> +left and right bitwise shifts +.TP +.B <= >= < > +comparison +.TP +.B == != +equality and inequality +.TP +.B & +bitwise AND +.TP +.B ^ +bitwise exclusive OR +.TP +.B | +bitwise OR +.TP +.B && +logical AND +.TP +.B || +logical OR +.TP +.B \fIexpr\fP?\fIexpr\fP:\fIexpr\fP +conditional operator +.TP +.B = *= /= %= += \-= <<= >>= &= ^= |= +assignment +.TP +.B \fIexpr1\fP , \fIexpr2\fP +comma +.PD +.PP +Shell variables are allowed as operands; parameter expansion is +performed before the expression is evaluated. +Within an expression, shell variables may also be referenced by name +without using the parameter expansion syntax. +A shell variable that is null or unset evaluates to 0 when referenced +by name without using the parameter expansion syntax. +The value of a variable is evaluated as an arithmetic expression +when it is referenced, or when a variable which has been given the +\fIinteger\fP attribute using \fBdeclare \-i\fP is assigned a value. +A null value evaluates to 0. +A shell variable need not have its \fIinteger\fP attribute +turned on to be used in an expression. +.PP +Integer constants follow the C language definition, without suffixes or +character constants. +Constants with a leading 0 are interpreted as octal numbers. +A leading 0x or 0X denotes hexadecimal. +Otherwise, numbers take the form [\fIbase#\fP]n, where the optional \fIbase\fP +is a decimal number between 2 and 64 representing the arithmetic +base, and \fIn\fP is a number in that base. +If \fIbase#\fP is omitted, then base 10 is used. +When specifying \fIn\fP, +if a non-digit is required, +the digits greater than 9 are represented by the lowercase letters, +the uppercase letters, @, and _, in that order. +If \fIbase\fP is less than or equal to 36, lowercase and uppercase +letters may be used interchangeably to represent numbers between 10 +and 35. +.PP +Operators are evaluated in order of precedence. Sub-expressions in +parentheses are evaluated first and may override the precedence +rules above. +.SH "CONDITIONAL EXPRESSIONS" +Conditional expressions are used by the \fB[[\fP compound command and +the \fBtest\fP and \fB[\fP builtin commands to test file attributes +and perform string and arithmetic comparisons. +The \fBtest\fP and \fB[\fP commands determine their behavior based on +the number of arguments; see the descriptions of those commands for any +other command-specific actions. +.PP +Expressions are formed from the following unary or binary primaries. +\fBBash\fP handles several filenames specially when they are used in +expressions. +If the operating system on which \fBbash\fP is running provides these +special files, bash will use them; otherwise it will emulate them +internally with this behavior: +If any \fIfile\fP argument to one of the primaries is of the form +\fI/dev/fd/n\fP, then file descriptor \fIn\fP is checked. +If the \fIfile\fP argument to one of the primaries is one of +\fI/dev/stdin\fP, \fI/dev/stdout\fP, or \fI/dev/stderr\fP, file +descriptor 0, 1, or 2, respectively, is checked. +.PP +Unless otherwise specified, primaries that operate on files follow symbolic +links and operate on the target of the link, rather than the link itself. +.if t .sp 0.5 +.if n .sp 1 +When used with \fB[[\fP, the \fB<\fP and \fB>\fP operators sort +lexicographically using the current locale. +The \fBtest\fP command sorts using ASCII ordering. +.sp 1 +.PD 0 +.TP +.B \-a \fIfile\fP +True if \fIfile\fP exists. +.TP +.B \-b \fIfile\fP +True if \fIfile\fP exists and is a block special file. +.TP +.B \-c \fIfile\fP +True if \fIfile\fP exists and is a character special file. +.TP +.B \-d \fIfile\fP +True if \fIfile\fP exists and is a directory. +.TP +.B \-e \fIfile\fP +True if \fIfile\fP exists. +.TP +.B \-f \fIfile\fP +True if \fIfile\fP exists and is a regular file. +.TP +.B \-g \fIfile\fP +True if \fIfile\fP exists and is set-group-id. +.TP +.B \-h \fIfile\fP +True if \fIfile\fP exists and is a symbolic link. +.TP +.B \-k \fIfile\fP +True if \fIfile\fP exists and its ``sticky'' bit is set. +.TP +.B \-p \fIfile\fP +True if \fIfile\fP exists and is a named pipe (FIFO). +.TP +.B \-r \fIfile\fP +True if \fIfile\fP exists and is readable. +.TP +.B \-s \fIfile\fP +True if \fIfile\fP exists and has a size greater than zero. +.TP +.B \-t \fIfd\fP +True if file descriptor +.I fd +is open and refers to a terminal. +.TP +.B \-u \fIfile\fP +True if \fIfile\fP exists and its set-user-id bit is set. +.TP +.B \-w \fIfile\fP +True if \fIfile\fP exists and is writable. +.TP +.B \-x \fIfile\fP +True if \fIfile\fP exists and is executable. +.TP +.B \-G \fIfile\fP +True if \fIfile\fP exists and is owned by the effective group id. +.TP +.B \-L \fIfile\fP +True if \fIfile\fP exists and is a symbolic link. +.TP +.B \-N \fIfile\fP +True if \fIfile\fP exists and has been modified since it was last read. +.TP +.B \-O \fIfile\fP +True if \fIfile\fP exists and is owned by the effective user id. +.TP +.B \-S \fIfile\fP +True if \fIfile\fP exists and is a socket. +.TP +\fIfile1\fP \fB\-ef\fP \fIfile2\fP +True if \fIfile1\fP and \fIfile2\fP refer to the same device and +inode numbers. +.TP +\fIfile1\fP \-\fBnt\fP \fIfile2\fP +True if \fIfile1\fP is newer (according to modification date) than \fIfile2\fP, +or if \fIfile1\fP exists and \fPfile2\fP does not. +.TP +\fIfile1\fP \-\fBot\fP \fIfile2\fP +True if \fIfile1\fP is older than \fIfile2\fP, or if \fIfile2\fP exists +and \fIfile1\fP does not. +.TP +.B \-o \fIoptname\fP +True if the shell option +.I optname +is enabled. +See the list of options under the description of the +.B \-o +option to the +.B set +builtin below. +.TP +.B \-v \fIvarname\fP +True if the shell variable +.I varname +is set (has been assigned a value). +.TP +.B \-R \fIvarname\fP +True if the shell variable +.I varname +is set and is a name reference. +.TP +.B \-z \fIstring\fP +True if the length of \fIstring\fP is zero. +.TP +\fIstring\fP +.PD 0 +.TP +.B \-n \fIstring\fP +.PD +True if the length of +.I string +is non-zero. +.TP +\fIstring1\fP \fB==\fP \fIstring2\fP +.PD 0 +.TP +\fIstring1\fP \fB=\fP \fIstring2\fP +.PD +True if the strings are equal. \fB=\fP should be used +with the \fBtest\fP command for POSIX conformance. +When used with the \fB[[\fP command, this performs pattern matching as +described above (\fBCompound Commands\fP). +.TP +\fIstring1\fP \fB!=\fP \fIstring2\fP +True if the strings are not equal. +.TP +\fIstring1\fP \fB<\fP \fIstring2\fP +True if \fIstring1\fP sorts before \fIstring2\fP lexicographically. +.TP +\fIstring1\fP \fB>\fP \fIstring2\fP +True if \fIstring1\fP sorts after \fIstring2\fP lexicographically. +.TP +.I \fIarg1\fP \fBOP\fP \fIarg2\fP +.SM +.B OP +is one of +.BR \-eq , +.BR \-ne , +.BR \-lt , +.BR \-le , +.BR \-gt , +or +.BR \-ge . +These arithmetic binary operators return true if \fIarg1\fP +is equal to, not equal to, less than, less than or equal to, +greater than, or greater than or equal to \fIarg2\fP, respectively. +.I Arg1 +and +.I arg2 +may be positive or negative integers. +When used with the \fB[[\fP command, +.I Arg1 +and +.I Arg2 +are evaluated as arithmetic expressions (see +.SM +.B "ARITHMETIC EVALUATION" +above). +.PD +.SH "SIMPLE COMMAND EXPANSION" +When a simple command is executed, the shell performs the following +expansions, assignments, and redirections, from left to right, in +the following order. +.IP 1. +The words that the parser has marked as variable assignments (those +preceding the command name) and redirections are saved for later +processing. +.IP 2. +The words that are not variable assignments or redirections are +expanded. If any words remain after expansion, the first word +is taken to be the name of the command and the remaining words are +the arguments. +.IP 3. +Redirections are performed as described above under +.SM +.BR REDIRECTION . +.IP 4. +The text after the \fB=\fP in each variable assignment undergoes tilde +expansion, parameter expansion, command substitution, arithmetic expansion, +and quote removal before being assigned to the variable. +.PP +If no command name results, the variable assignments affect the current +shell environment. Otherwise, the variables are added to the environment +of the executed command and do not affect the current shell environment. +If any of the assignments attempts to assign a value to a readonly variable, +an error occurs, and the command exits with a non-zero status. +.PP +If no command name results, redirections are performed, but do not +affect the current shell environment. A redirection error causes the +command to exit with a non-zero status. +.PP +If there is a command name left after expansion, execution proceeds as +described below. Otherwise, the command exits. If one of the expansions +contained a command substitution, the exit status of the command is +the exit status of the last command substitution performed. If there +were no command substitutions, the command exits with a status of zero. +.SH "COMMAND EXECUTION" +After a command has been split into words, if it results in a +simple command and an optional list of arguments, the following +actions are taken. +.PP +If the command name contains no slashes, the shell attempts to +locate it. If there exists a shell function by that name, that +function is invoked as described above in +.SM +.BR FUNCTIONS . +If the name does not match a function, the shell searches for +it in the list of shell builtins. If a match is found, that +builtin is invoked. +.PP +If the name is neither a shell function nor a builtin, +and contains no slashes, +.B bash +searches each element of the +.SM +.B PATH +for a directory containing an executable file by that name. +.B Bash +uses a hash table to remember the full pathnames of executable +files (see +.B hash +under +.SM +.B "SHELL BUILTIN COMMANDS" +below). +A full search of the directories in +.SM +.B PATH +is performed only if the command is not found in the hash table. +If the search is unsuccessful, the shell searches for a defined shell +function named \fBcommand_not_found_handle\fP. +If that function exists, it is invoked in a separate execution environment +with the original command and +the original command's arguments as its arguments, and the function's +exit status becomes the exit status of that subshell. +If that function is not defined, the shell prints an error +message and returns an exit status of 127. +.PP +If the search is successful, or if the command name contains +one or more slashes, the shell executes the named program in a +separate execution environment. +Argument 0 is set to the name given, and the remaining arguments +to the command are set to the arguments given, if any. +.PP +If this execution fails because the file is not in executable +format, and the file is not a directory, it is assumed to be +a \fIshell script\fP, a file +containing shell commands. A subshell is spawned to execute +it. This subshell reinitializes itself, so +that the effect is as if a new shell had been invoked +to handle the script, with the exception that the locations of +commands remembered by the parent (see +.B hash +below under +.SM +\fBSHELL BUILTIN COMMANDS\fP) +are retained by the child. +.PP +If the program is a file beginning with +.BR #! , +the remainder of the first line specifies an interpreter +for the program. The shell executes the +specified interpreter on operating systems that do not +handle this executable format themselves. The arguments to the +interpreter consist of a single optional argument following the +interpreter name on the first line of the program, followed +by the name of the program, followed by the command +arguments, if any. +.SH COMMAND EXECUTION ENVIRONMENT +The shell has an \fIexecution environment\fP, which consists of the +following: +.IP \(bu +open files inherited by the shell at invocation, as modified by +redirections supplied to the \fBexec\fP builtin +.IP \(bu +the current working directory as set by \fBcd\fP, \fBpushd\fP, or +\fBpopd\fP, or inherited by the shell at invocation +.IP \(bu +the file creation mode mask as set by \fBumask\fP or inherited from +the shell's parent +.IP \(bu +current traps set by \fBtrap\fP +.IP \(bu +shell parameters that are set by variable assignment or with \fBset\fP +or inherited from the shell's parent in the environment +.IP \(bu +shell functions defined during execution or inherited from the shell's +parent in the environment +.IP \(bu +options enabled at invocation (either by default or with command-line +arguments) or by \fBset\fP +.IP \(bu +options enabled by \fBshopt\fP +.IP \(bu +shell aliases defined with \fBalias\fP +.IP \(bu +various process IDs, including those of background jobs, the value +of \fB$$\fP, and the value of +.SM +.B PPID +.PP +When a simple command other than a builtin or shell function +is to be executed, it +is invoked in a separate execution environment that consists of +the following. Unless otherwise noted, the values are inherited +from the shell. +.if n .sp 1 +.IP \(bu +the shell's open files, plus any modifications and additions specified +by redirections to the command +.IP \(bu +the current working directory +.IP \(bu +the file creation mode mask +.IP \(bu +shell variables and functions marked for export, along with variables +exported for the command, passed in the environment +.IP \(bu +traps caught by the shell are reset to the values inherited from the +shell's parent, and traps ignored by the shell are ignored +.PP +A command invoked in this separate environment cannot affect the +shell's execution environment. +.PP +Command substitution, commands grouped with parentheses, +and asynchronous commands are invoked in a +subshell environment that is a duplicate of the shell environment, +except that traps caught by the shell are reset to the values +that the shell inherited from its parent at invocation. Builtin +commands that are invoked as part of a pipeline are also executed in a +subshell environment. Changes made to the subshell environment +cannot affect the shell's execution environment. +.PP +Subshells spawned to execute command substitutions inherit the value of +the \fB\-e\fP option from the parent shell. When not in \fIposix mode\fP, +\fBbash\fP clears the \fB\-e\fP option in such subshells. +.PP +If a command is followed by a \fB&\fP and job control is not active, the +default standard input for the command is the empty file \fI/dev/null\fP. +Otherwise, the invoked command inherits the file descriptors of the calling +shell as modified by redirections. +.SH ENVIRONMENT +When a program is invoked it is given an array of strings +called the +.IR environment . +This is a list of +\fIname\fP\-\fIvalue\fP pairs, of the form +.IR "name\fR=\fPvalue" . +.PP +The shell provides several ways to manipulate the environment. +On invocation, the shell scans its own environment and +creates a parameter for each name found, automatically marking +it for +.I export +to child processes. Executed commands inherit the environment. +The +.B export +and +.B declare \-x +commands allow parameters and functions to be added to and +deleted from the environment. If the value of a parameter +in the environment is modified, the new value becomes part +of the environment, replacing the old. The environment +inherited by any executed command consists of the shell's +initial environment, whose values may be modified in the shell, +less any pairs removed by the +.B unset +command, plus any additions via the +.B export +and +.B declare \-x +commands. +.PP +The environment for any +.I simple command +or function may be augmented temporarily by prefixing it with +parameter assignments, as described above in +.SM +.BR PARAMETERS . +These assignment statements affect only the environment seen +by that command. +.PP +If the +.B \-k +option is set (see the +.B set +builtin command below), then +.I all +parameter assignments are placed in the environment for a command, +not just those that precede the command name. +.PP +When +.B bash +invokes an external command, the variable +.B _ +is set to the full filename of the command and passed to that +command in its environment. +.SH "EXIT STATUS" +The exit status of an executed command is the value returned by the +\fIwaitpid\fP system call or equivalent function. Exit statuses +fall between 0 and 255, though, as explained below, the shell may +use values above 125 specially. Exit statuses from shell builtins and +compound commands are also limited to this range. Under certain +circumstances, the shell will use special values to indicate specific +failure modes. +.PP +For the shell's purposes, a command which exits with a +zero exit status has succeeded. An exit status of zero +indicates success. A non-zero exit status indicates failure. +When a command terminates on a fatal signal \fIN\fP, \fBbash\fP uses +the value of 128+\fIN\fP as the exit status. +.PP +If a command is not found, the child process created to +execute it returns a status of 127. If a command is found +but is not executable, the return status is 126. +.PP +If a command fails because of an error during expansion or redirection, +the exit status is greater than zero. +.PP +Shell builtin commands return a status of 0 (\fItrue\fP) if +successful, and non-zero (\fIfalse\fP) if an error occurs +while they execute. +All builtins return an exit status of 2 to indicate incorrect usage, +generally invalid options or missing arguments. +.PP +\fBBash\fP itself returns the exit status of the last command +executed, unless a syntax error occurs, in which case it exits +with a non-zero value. See also the \fBexit\fP builtin +command below. +.SH SIGNALS +When \fBbash\fP is interactive, in the absence of any traps, it ignores +.SM +.B SIGTERM +(so that \fBkill 0\fP does not kill an interactive shell), +and +.SM +.B SIGINT +is caught and handled (so that the \fBwait\fP builtin is interruptible). +In all cases, \fBbash\fP ignores +.SM +.BR SIGQUIT . +If job control is in effect, +.B bash +ignores +.SM +.BR SIGTTIN , +.SM +.BR SIGTTOU , +and +.SM +.BR SIGTSTP . +.PP +Non-builtin commands run by \fBbash\fP have signal handlers +set to the values inherited by the shell from its parent. +When job control is not in effect, asynchronous commands +ignore +.SM +.B SIGINT +and +.SM +.B SIGQUIT +in addition to these inherited handlers. +Commands run as a result of command substitution ignore the +keyboard-generated job control signals +.SM +.BR SIGTTIN , +.SM +.BR SIGTTOU , +and +.SM +.BR SIGTSTP . +.PP +The shell exits by default upon receipt of a +.SM +.BR SIGHUP . +Before exiting, an interactive shell resends the +.SM +.B SIGHUP +to all jobs, running or stopped. +Stopped jobs are sent +.SM +.B SIGCONT +to ensure that they receive the +.SM +.BR SIGHUP . +To prevent the shell from +sending the signal to a particular job, it should be removed from the +jobs table with the +.B disown +builtin (see +.SM +.B "SHELL BUILTIN COMMANDS" +below) or marked +to not receive +.SM +.B SIGHUP +using +.BR "disown \-h" . +.PP +If the +.B huponexit +shell option has been set with +.BR shopt , +.B bash +sends a +.SM +.B SIGHUP +to all jobs when an interactive login shell exits. +.PP +If \fBbash\fP is waiting for a command to complete and receives a signal +for which a trap has been set, the trap will not be executed until +the command completes. +When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP +builtin, the reception of a signal for which a trap has been set will +cause the \fBwait\fP builtin to return immediately with an exit status +greater than 128, immediately after which the trap is executed. +.SH "JOB CONTROL" +.I Job control +refers to the ability to selectively stop (\fIsuspend\fP) +the execution of processes and continue (\fIresume\fP) +their execution at a later point. A user typically employs +this facility via an interactive interface supplied jointly +by the operating system kernel's terminal driver and +.BR bash . +.PP +The shell associates a +.I job +with each pipeline. It keeps a table of currently executing +jobs, which may be listed with the +.B jobs +command. When +.B bash +starts a job asynchronously (in the +.IR background ), +it prints a line that looks like: +.RS +.PP +[1] 25647 +.RE +.PP +indicating that this job is job number 1 and that the process ID +of the last process in the pipeline associated with this job is 25647. +All of the processes in a single pipeline are members of the same job. +.B Bash +uses the +.I job +abstraction as the basis for job control. +.PP +To facilitate the implementation of the user interface to job +control, the operating system maintains the notion of a \fIcurrent terminal +process group ID\fP. Members of this process group (processes whose +process group ID is equal to the current terminal process group ID) +receive keyboard-generated signals such as +.SM +.BR SIGINT . +These processes are said to be in the +.IR foreground . +.I Background +processes are those whose process group ID differs from the terminal's; +such processes are immune to keyboard-generated signals. +Only foreground processes are allowed to read from or, if the +user so specifies with \f(CWstty tostop\fP, write to the +terminal. +Background processes which attempt to read from (write to when +\f(CWstty tostop\fP is in effect) the +terminal are sent a +.SM +.B SIGTTIN (SIGTTOU) +signal by the kernel's terminal driver, +which, unless caught, suspends the process. +.PP +If the operating system on which +.B bash +is running supports +job control, +.B bash +contains facilities to use it. +Typing the +.I suspend +character (typically +.BR ^Z , +Control-Z) while a process is running +causes that process to be stopped and returns control to +.BR bash . +Typing the +.I "delayed suspend" +character (typically +.BR ^Y , +Control-Y) causes the process to be stopped when it +attempts to read input from the terminal, and control to +be returned to +.BR bash . +The user may then manipulate the state of this job, using the +.B bg +command to continue it in the background, the +.B fg +command to continue it in the foreground, or +the +.B kill +command to kill it. A \fB^Z\fP takes effect immediately, +and has the additional side effect of causing pending output +and typeahead to be discarded. +.PP +There are a number of ways to refer to a job in the shell. +The character +.B % +introduces a job specification (\fIjobspec\fP). Job number +.I n +may be referred to as +.BR %n . +A job may also be referred to using a prefix of the name used to +start it, or using a substring that appears in its command line. +For example, +.B %ce +refers to a stopped +job whose command name begins with +.BR ce . +If a prefix matches more than one job, +.B bash +reports an error. Using +.BR %?ce , +on the other hand, refers to any job containing the string +.B ce +in its command line. If the substring matches more than one job, +.B bash +reports an error. The symbols +.B %% +and +.B %+ +refer to the shell's notion of the +.IR "current job" , +which is the last job stopped while it was in +the foreground or started in the background. +The +.I "previous job" +may be referenced using +.BR %\- . +If there is only a single job, \fB%+\fP and \fB%\-\fP can both be used +to refer to that job. +In output pertaining to jobs (e.g., the output of the +.B jobs +command), the current job is always flagged with a +.BR + , +and the previous job with a +.BR \- . +A single % (with no accompanying job specification) also refers to the +current job. +.PP +Simply naming a job can be used to bring it into the +foreground: +.B %1 +is a synonym for +\fB``fg %1''\fP, +bringing job 1 from the background into the foreground. +Similarly, +.B ``%1 &'' +resumes job 1 in the background, equivalent to +\fB``bg %1''\fP. +.PP +The shell learns immediately whenever a job changes state. +Normally, +.B bash +waits until it is about to print a prompt before reporting +changes in a job's status so as to not interrupt +any other output. If the +.B \-b +option to the +.B set +builtin command +is enabled, +.B bash +reports such changes immediately. +Any trap on +.SM +.B SIGCHLD +is executed for each child that exits. +.PP +If an attempt to exit +.B bash +is made while jobs are stopped (or, if the \fBcheckjobs\fP shell option has +been enabled using the \fBshopt\fP builtin, running), the shell prints a +warning message, and, if the \fBcheckjobs\fP option is enabled, lists the +jobs and their statuses. +The +.B jobs +command may then be used to inspect their status. +If a second attempt to exit is made without an intervening command, +the shell does not print another warning, and any stopped +jobs are terminated. +.PP +When the shell is waiting for a job or process using the \fBwait\fP +builtin, and job control is enabled, \fBwait\fP will return when the +job changes state. The \fB\-f\fP option causes \fBwait\fP to wait +until the job or process terminates before returning. +.SH PROMPTING +When executing interactively, +.B bash +displays the primary prompt +.SM +.B PS1 +when it is ready to read a command, and the secondary prompt +.SM +.B PS2 +when it needs more input to complete a command. +.B Bash +displays +.SM +.B PS0 +after it reads a command but before executing it. +.B Bash +displays +.SM +.B PS4 +as described above +before tracing each command when the \fB\-x\fP option is enabled. +.B Bash +allows these prompt strings to be customized by inserting a number of +backslash-escaped special characters that are decoded as follows: +.RS +.PD 0 +.TP +.B \ea +an ASCII bell character (07) +.TP +.B \ed +the date in "Weekday Month Date" format (e.g., "Tue May 26") +.TP +.B \eD{\fIformat\fP} +the \fIformat\fP is passed to \fIstrftime\fP(3) and the result is inserted +into the prompt string; an empty \fIformat\fP results in a locale-specific +time representation. The braces are required +.TP +.B \ee +an ASCII escape character (033) +.TP +.B \eh +the hostname up to the first `.' +.TP +.B \eH +the hostname +.TP +.B \ej +the number of jobs currently managed by the shell +.TP +.B \el +the basename of the shell's terminal device name +.TP +.B \en +newline +.TP +.B \er +carriage return +.TP +.B \es +the name of the shell, the basename of +.B $0 +(the portion following the final slash) +.TP +.B \et +the current time in 24-hour HH:MM:SS format +.TP +.B \eT +the current time in 12-hour HH:MM:SS format +.TP +.B \e@ +the current time in 12-hour am/pm format +.TP +.B \eA +the current time in 24-hour HH:MM format +.TP +.B \eu +the username of the current user +.TP +.B \ev +the version of \fBbash\fP (e.g., 2.00) +.TP +.B \eV +the release of \fBbash\fP, version + patch level (e.g., 2.00.0) +.TP +.B \ew +the current working directory, with +.SM +.B $HOME +abbreviated with a tilde +(uses the value of the +.SM +.B PROMPT_DIRTRIM +variable) +.TP +.B \eW +the basename of the current working directory, with +.SM +.B $HOME +abbreviated with a tilde +.TP +.B \e! +the history number of this command +.TP +.B \e# +the command number of this command +.TP +.B \e$ +if the effective UID is 0, a +.BR # , +otherwise a +.B $ +.TP +.B \e\fInnn\fP +the character corresponding to the octal number \fInnn\fP +.TP +.B \e\e +a backslash +.TP +.B \e[ +begin a sequence of non-printing characters, which could be used to +embed a terminal control sequence into the prompt +.TP +.B \e] +end a sequence of non-printing characters +.PD +.RE +.PP +The command number and the history number are usually different: +the history number of a command is its position in the history +list, which may include commands restored from the history file +(see +.SM +.B HISTORY +below), while the command number is the position in the sequence +of commands executed during the current shell session. +After the string is decoded, it is expanded via +parameter expansion, command substitution, arithmetic +expansion, and quote removal, subject to the value of the +.B promptvars +shell option (see the description of the +.B shopt +command under +.SM +.B "SHELL BUILTIN COMMANDS" +below). +This can have unwanted side effects if escaped portions of the string +appear within command substitution or contain characters special to +word expansion. +.SH READLINE +This is the library that handles reading input when using an interactive +shell, unless the +.B \-\-noediting +option is given at shell invocation. +Line editing is also used when using the \fB\-e\fP option to the +\fBread\fP builtin. +By default, the line editing commands are similar to those of Emacs. +A vi-style line editing interface is also available. +Line editing can be enabled at any time using the +.B \-o emacs +or +.B \-o vi +options to the +.B set +builtin (see +.SM +.B SHELL BUILTIN COMMANDS +below). +To turn off line editing after the shell is running, use the +.B +o emacs +or +.B +o vi +options to the +.B set +builtin. +.SS "Readline Notation" +In this section, the Emacs-style notation is used to denote +keystrokes. Control keys are denoted by C\-\fIkey\fR, e.g., C\-n +means Control\-N. Similarly, +.I meta +keys are denoted by M\-\fIkey\fR, so M\-x means Meta\-X. (On keyboards +without a +.I meta +key, M\-\fIx\fP means ESC \fIx\fP, i.e., press the Escape key +then the +.I x +key. This makes ESC the \fImeta prefix\fP. +The combination M\-C\-\fIx\fP means ESC\-Control\-\fIx\fP, +or press the Escape key +then hold the Control key while pressing the +.I x +key.) +.PP +Readline commands may be given numeric +.IR arguments , +which normally act as a repeat count. +Sometimes, however, it is the sign of the argument that is significant. +Passing a negative argument to a command that acts in the forward +direction (e.g., \fBkill\-line\fP) causes that command to act in a +backward direction. +Commands whose behavior with arguments deviates from this are noted +below. +.PP +When a command is described as \fIkilling\fP text, the text +deleted is saved for possible future retrieval +(\fIyanking\fP). The killed text is saved in a +\fIkill ring\fP. Consecutive kills cause the text to be +accumulated into one unit, which can be yanked all at once. +Commands which do not kill text separate the chunks of text +on the kill ring. +.SS "Readline Initialization" +Readline is customized by putting commands in an initialization +file (the \fIinputrc\fP file). +The name of this file is taken from the value of the +.SM +.B INPUTRC +variable. If that variable is unset, the default is +.IR ~/.inputrc . +If that file does not exist or cannot be read, the ultimate default is +.IR /etc/inputrc . +When a program which uses the readline library starts up, the +initialization file is read, and the key bindings and variables +are set. +There are only a few basic constructs allowed in the +readline initialization file. +Blank lines are ignored. +Lines beginning with a \fB#\fP are comments. +Lines beginning with a \fB$\fP indicate conditional constructs. +Other lines denote key bindings and variable settings. +.PP +The default key-bindings may be changed with an +.I inputrc +file. +Other programs that use this library may add their own commands +and bindings. +.PP +For example, placing +.RS +.PP +M\-Control\-u: universal\-argument +.RE +or +.RS +C\-Meta\-u: universal\-argument +.RE +into the +.I inputrc +would make M\-C\-u execute the readline command +.IR universal\-argument . +.PP +The following symbolic character names are recognized: +.IR RUBOUT , +.IR DEL , +.IR ESC , +.IR LFD , +.IR NEWLINE , +.IR RET , +.IR RETURN , +.IR SPC , +.IR SPACE , +and +.IR TAB . +.PP +In addition to command names, readline allows keys to be bound +to a string that is inserted when the key is pressed (a \fImacro\fP). +.SS "Readline Key Bindings" +The syntax for controlling key bindings in the +.I inputrc +file is simple. All that is required is the name of the +command or the text of a macro and a key sequence to which +it should be bound. The name may be specified in one of two ways: +as a symbolic key name, possibly with \fIMeta\-\fP or \fIControl\-\fP +prefixes, or as a key sequence. +.PP +When using the form \fBkeyname\fP:\^\fIfunction\-name\fP or \fImacro\fP, +.I keyname +is the name of a key spelled out in English. For example: +.sp +.RS +Control-u: universal\-argument +.br +Meta-Rubout: backward-kill-word +.br +Control-o: "> output" +.RE +.LP +In the above example, +.I C\-u +is bound to the function +.BR universal\-argument , +.I M\-DEL +is bound to the function +.BR backward\-kill\-word , +and +.I C\-o +is bound to run the macro +expressed on the right hand side (that is, to insert the text +.if t \f(CW> output\fP +.if n ``> output'' +into the line). +.PP +In the second form, \fB"keyseq"\fP:\^\fIfunction\-name\fP or \fImacro\fP, +.B keyseq +differs from +.B keyname +above in that strings denoting +an entire key sequence may be specified by placing the sequence +within double quotes. Some GNU Emacs style key escapes can be +used, as in the following example, but the symbolic character names +are not recognized. +.sp +.RS +"\eC\-u": universal\-argument +.br +"\eC\-x\eC\-r": re\-read\-init\-file +.br +"\ee[11~": "Function Key 1" +.RE +.PP +In this example, +.I C\-u +is again bound to the function +.BR universal\-argument . +.I "C\-x C\-r" +is bound to the function +.BR re\-read\-init\-file , +and +.I "ESC [ 1 1 ~" +is bound to insert the text +.if t \f(CWFunction Key 1\fP. +.if n ``Function Key 1''. +.PP +The full set of GNU Emacs style escape sequences is +.RS +.PD 0 +.TP +.B \eC\- +control prefix +.TP +.B \eM\- +meta prefix +.TP +.B \ee +an escape character +.TP +.B \e\e +backslash +.TP +.B \e" +literal " +.TP +.B \e\(aq +literal \(aq +.RE +.PD +.PP +In addition to the GNU Emacs style escape sequences, a second +set of backslash escapes is available: +.RS +.PD 0 +.TP +.B \ea +alert (bell) +.TP +.B \eb +backspace +.TP +.B \ed +delete +.TP +.B \ef +form feed +.TP +.B \en +newline +.TP +.B \er +carriage return +.TP +.B \et +horizontal tab +.TP +.B \ev +vertical tab +.TP +.B \e\fInnn\fP +the eight-bit character whose value is the octal value \fInnn\fP +(one to three digits) +.TP +.B \ex\fIHH\fP +the eight-bit character whose value is the hexadecimal value \fIHH\fP +(one or two hex digits) +.RE +.PD +.PP +When entering the text of a macro, single or double quotes must +be used to indicate a macro definition. +Unquoted text is assumed to be a function name. +In the macro body, the backslash escapes described above are expanded. +Backslash will quote any other character in the macro text, +including " and \(aq. +.PP +.B Bash +allows the current readline key bindings to be displayed or modified +with the +.B bind +builtin command. The editing mode may be switched during interactive +use by using the +.B \-o +option to the +.B set +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.SS "Readline Variables" +Readline has variables that can be used to further customize its +behavior. A variable may be set in the +.I inputrc +file with a statement of the form +.RS +.PP +\fBset\fP \fIvariable\-name\fP \fIvalue\fP +.RE +or using the \fBbind\fP builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). +.PP +Except where noted, readline variables can take the values +.B On +or +.B Off +(without regard to case). +Unrecognized variable names are ignored. +When a variable value is read, empty or null values, "on" (case-insensitive), +and "1" are equivalent to \fBOn\fP. All other values are equivalent to +\fBOff\fP. +The variables and their default values are: +.PP +.PD 0 +.TP +.B bell\-style (audible) +Controls what happens when readline wants to ring the terminal bell. +If set to \fBnone\fP, readline never rings the bell. If set to +\fBvisible\fP, readline uses a visible bell if one is available. +If set to \fBaudible\fP, readline attempts to ring the terminal's bell. +.TP +.B bind\-tty\-special\-chars (On) +If set to \fBOn\fP, readline attempts to bind the control characters +treated specially by the kernel's terminal driver to their readline +equivalents. +.TP +.B blink\-matching\-paren (Off) +If set to \fBOn\fP, readline attempts to briefly move the cursor to an +opening parenthesis when a closing parenthesis is inserted. +.TP +.B colored\-completion\-prefix (Off) +If set to \fBOn\fP, when listing completions, readline displays the +common prefix of the set of possible completions using a different color. +The color definitions are taken from the value of the \fBLS_COLORS\fP +environment variable. +.TP +.B colored\-stats (Off) +If set to \fBOn\fP, readline displays possible completions using different +colors to indicate their file type. +The color definitions are taken from the value of the \fBLS_COLORS\fP +environment variable. +.TP +.B comment\-begin (``#'') +The string that is inserted when the readline +.B insert\-comment +command is executed. +This command is bound to +.B M\-# +in emacs mode and to +.B # +in vi command mode. +.TP +.B completion\-display\-width (\-1) +The number of screen columns used to display possible matches +when performing completion. +The value is ignored if it is less than 0 or greater than the terminal +screen width. +A value of 0 will cause matches to be displayed one per line. +The default value is \-1. +.TP +.B completion\-ignore\-case (Off) +If set to \fBOn\fP, readline performs filename matching and completion +in a case\-insensitive fashion. +.TP +.B completion\-map\-case (Off) +If set to \fBOn\fP, and \fBcompletion\-ignore\-case\fP is enabled, readline +treats hyphens (\fI\-\fP) and underscores (\fI_\fP) as equivalent when +performing case\-insensitive filename matching and completion. +.TP +.B completion\-prefix\-display\-length (0) +The length in characters of the common prefix of a list of possible +completions that is displayed without modification. When set to a +value greater than zero, common prefixes longer than this value are +replaced with an ellipsis when displaying possible completions. +.TP +.B completion\-query\-items (100) +This determines when the user is queried about viewing +the number of possible completions +generated by the \fBpossible\-completions\fP command. +It may be set to any integer value greater than or equal to zero. +If the number of possible completions is greater than +or equal to the value of this variable, +readline will ask whether or not the user wishes to view them; +otherwise they are simply listed on the terminal. +.TP +.B convert\-meta (On) +If set to \fBOn\fP, readline will convert characters with the +eighth bit set to an ASCII key sequence +by stripping the eighth bit and prefixing an +escape character (in effect, using escape as the \fImeta prefix\fP). +The default is \fIOn\fP, but readline will set it to \fIOff\fP if the +locale contains eight-bit characters. +.TP +.B disable\-completion (Off) +If set to \fBOn\fP, readline will inhibit word completion. Completion +characters will be inserted into the line as if they had been +mapped to \fBself-insert\fP. +.TP +.B echo\-control\-characters (On) +When set to \fBOn\fP, on operating systems that indicate they support it, +readline echoes a character corresponding to a signal generated from the +keyboard. +.TP +.B editing\-mode (emacs) +Controls whether readline begins with a set of key bindings similar +to \fIEmacs\fP or \fIvi\fP. +.B editing\-mode +can be set to either +.B emacs +or +.BR vi . +.TP +.B emacs\-mode\-string (@) +If the \fIshow\-mode\-in\-prompt\fP variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when emacs editing mode is active. The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \e1 and \e2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +.TP +.B enable\-bracketed\-paste (On) +When set to \fBOn\fP, readline will configure the terminal in a way +that will enable it to insert each paste into the editing buffer as a +single string of characters, instead of treating each character as if +it had been read from the keyboard. This can prevent pasted characters +from being interpreted as editing commands. +.TP +.B enable\-keypad (Off) +When set to \fBOn\fP, readline will try to enable the application +keypad when it is called. Some systems need this to enable the +arrow keys. +.TP +.B enable\-meta\-key (On) +When set to \fBOn\fP, readline will try to enable any meta modifier +key the terminal claims to support when it is called. On many terminals, +the meta key is used to send eight-bit characters. +.TP +.B expand\-tilde (Off) +If set to \fBOn\fP, tilde expansion is performed when readline +attempts word completion. +.TP +.B history\-preserve\-point (Off) +If set to \fBOn\fP, the history code attempts to place point at the +same location on each history line retrieved with \fBprevious-history\fP +or \fBnext-history\fP. +.TP +.B history\-size (unset) +Set the maximum number of history entries saved in the history list. +If set to zero, any existing history entries are deleted and no new entries +are saved. +If set to a value less than zero, the number of history entries is not +limited. +By default, the number of history entries is set to the value of the +\fBHISTSIZE\fP shell variable. +If an attempt is made to set \fIhistory\-size\fP to a non-numeric value, +the maximum number of history entries will be set to 500. +.TP +.B horizontal\-scroll\-mode (Off) +When set to \fBOn\fP, makes readline use a single line for display, +scrolling the input horizontally on a single screen line when it +becomes longer than the screen width rather than wrapping to a new line. +This setting is automatically enabled for terminals of height 1. +.TP +.B input\-meta (Off) +If set to \fBOn\fP, readline will enable eight-bit input (that is, +it will not strip the eighth bit from the characters it reads), +regardless of what the terminal claims it can support. The name +.B meta\-flag +is a synonym for this variable. +The default is \fIOff\fP, but readline will set it to \fIOn\fP if the +locale contains eight-bit characters. +.TP +.B isearch\-terminators (``C\-[C\-J'') +The string of characters that should terminate an incremental +search without subsequently executing the character as a command. +If this variable has not been given a value, the characters +\fIESC\fP and \fIC\-J\fP will terminate an incremental search. +.TP +.B keymap (emacs) +Set the current readline keymap. The set of valid keymap names is +\fIemacs, emacs\-standard, emacs\-meta, emacs\-ctlx, vi, +vi\-command\fP, and +.IR vi\-insert . +\fIvi\fP is equivalent to \fIvi\-command\fP; \fIemacs\fP is +equivalent to \fIemacs\-standard\fP. The default value is +.IR emacs ; +the value of +.B editing\-mode +also affects the default keymap. +.TP +.B keyseq\-timeout (500) +Specifies the duration \fIreadline\fP will wait for a character when reading an +ambiguous key sequence (one that can form a complete key sequence using +the input read so far, or can take additional input to complete a longer +key sequence). +If no input is received within the timeout, \fIreadline\fP will use the shorter +but complete key sequence. +The value is specified in milliseconds, so a value of 1000 means that +\fIreadline\fP will wait one second for additional input. +If this variable is set to a value less than or equal to zero, or to a +non-numeric value, \fIreadline\fP will wait until another key is pressed to +decide which key sequence to complete. +.TP +.B mark\-directories (On) +If set to \fBOn\fP, completed directory names have a slash +appended. +.TP +.B mark\-modified\-lines (Off) +If set to \fBOn\fP, history lines that have been modified are displayed +with a preceding asterisk (\fB*\fP). +.TP +.B mark\-symlinked\-directories (Off) +If set to \fBOn\fP, completed names which are symbolic links to directories +have a slash appended (subject to the value of +\fBmark\-directories\fP). +.TP +.B match\-hidden\-files (On) +This variable, when set to \fBOn\fP, causes readline to match files whose +names begin with a `.' (hidden files) when performing filename +completion. +If set to \fBOff\fP, the leading `.' must be +supplied by the user in the filename to be completed. +.TP +.B menu\-complete\-display\-prefix (Off) +If set to \fBOn\fP, menu completion displays the common prefix of the +list of possible completions (which may be empty) before cycling through +the list. +.TP +.B output\-meta (Off) +If set to \fBOn\fP, readline will display characters with the +eighth bit set directly rather than as a meta-prefixed escape +sequence. +The default is \fIOff\fP, but readline will set it to \fIOn\fP if the +locale contains eight-bit characters. +.TP +.B page\-completions (On) +If set to \fBOn\fP, readline uses an internal \fImore\fP-like pager +to display a screenful of possible completions at a time. +.TP +.B print\-completions\-horizontally (Off) +If set to \fBOn\fP, readline will display completions with matches +sorted horizontally in alphabetical order, rather than down the screen. +.TP +.B revert\-all\-at\-newline (Off) +If set to \fBOn\fP, readline will undo all changes to history lines +before returning when \fBaccept\-line\fP is executed. By default, +history lines may be modified and retain individual undo lists across +calls to \fBreadline\fP. +.TP +.B show\-all\-if\-ambiguous (Off) +This alters the default behavior of the completion functions. If +set to +.BR On , +words which have more than one possible completion cause the +matches to be listed immediately instead of ringing the bell. +.TP +.B show\-all\-if\-unmodified (Off) +This alters the default behavior of the completion functions in +a fashion similar to \fBshow\-all\-if\-ambiguous\fP. +If set to +.BR On , +words which have more than one possible completion without any +possible partial completion (the possible completions don't share +a common prefix) cause the matches to be listed immediately instead +of ringing the bell. +.TP +.B show\-mode\-in\-prompt (Off) +If set to \fBOn\fP, add a string to the beginning of the prompt +indicating the editing mode: emacs, vi command, or vi insertion. +The mode strings are user-settable (e.g., \fIemacs\-mode\-string\fP). +.TP +.B skip\-completed\-text (Off) +If set to \fBOn\fP, this alters the default completion behavior when +inserting a single match into the line. It's only active when +performing completion in the middle of a word. If enabled, readline +does not insert characters from the completion that match characters +after point in the word being completed, so portions of the word +following the cursor are not duplicated. +.TP +.B vi\-cmd\-mode\-string ((cmd)) +If the \fIshow\-mode\-in\-prompt\fP variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in command mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \e1 and \e2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +.TP +.B vi\-ins\-mode\-string ((ins)) +If the \fIshow\-mode\-in\-prompt\fP variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in insertion mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \e1 and \e2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +.TP +.B visible\-stats (Off) +If set to \fBOn\fP, a character denoting a file's type as reported +by \fIstat\fP(2) is appended to the filename when listing possible +completions. +.PD +.SS "Readline Conditional Constructs" +Readline implements a facility similar in spirit to the conditional +compilation features of the C preprocessor which allows key +bindings and variable settings to be performed as the result +of tests. There are four parser directives used. +.IP \fB$if\fP +The +.B $if +construct allows bindings to be made based on the +editing mode, the terminal being used, or the application using +readline. The text of the test, after any comparison operator, + extends to the end of the line; +unless otherwise noted, no characters are required to isolate it. +.RS +.IP \fBmode\fP +The \fBmode=\fP form of the \fB$if\fP directive is used to test +whether readline is in emacs or vi mode. +This may be used in conjunction +with the \fBset keymap\fP command, for instance, to set bindings in +the \fIemacs\-standard\fP and \fIemacs\-ctlx\fP keymaps only if +readline is starting out in emacs mode. +.IP \fBterm\fP +The \fBterm=\fP form may be used to include terminal-specific +key bindings, perhaps to bind the key sequences output by the +terminal's function keys. The word on the right side of the +.B = +is tested against both the full name of the terminal and the portion +of the terminal name before the first \fB\-\fP. This allows +.I sun +to match both +.I sun +and +.IR sun\-cmd , +for instance. +.IP \fBversion\fP +The \fBversion\fP test may be used to perform comparisons against +specific readline versions. +The \fBversion\fP expands to the current readline version. +The set of comparison operators includes +.BR = , +(and +.BR == ), +.BR != , +.BR <= , +.BR >= , +.BR < , +and +.BR > . +The version number supplied on the right side of the operator consists +of a major version number, an optional decimal point, and an optional +minor version (e.g., \fB7.1\fP). If the minor version is omitted, it +is assumed to be \fB0\fP. +The operator may be separated from the string \fBversion\fP +and from the version number argument by whitespace. +.IP \fBapplication\fP +The \fBapplication\fP construct is used to include +application-specific settings. Each program using the readline +library sets the \fIapplication name\fP, and an initialization +file can test for a particular value. +This could be used to bind key sequences to functions useful for +a specific program. For instance, the following command adds a +key sequence that quotes the current or previous word in \fBbash\fP: +.sp 1 +.RS +.nf +\fB$if\fP Bash +# Quote the current or previous word +"\eC\-xq": "\eeb\e"\eef\e"" +\fB$endif\fP +.fi +.RE +.IP \fIvariable\fP +The \fIvariable\fP construct provides simple equality tests for readline +variables and values. +The permitted comparison operators are \fI=\fP, \fI==\fP, and \fI!=\fP. +The variable name must be separated from the comparison operator by +whitespace; the operator may be separated from the value on the right hand +side by whitespace. +Both string and boolean variables may be tested. Boolean variables must be +tested against the values \fIon\fP and \fIoff\fP. +.RE +.IP \fB$endif\fP +This command, as seen in the previous example, terminates an +\fB$if\fP command. +.IP \fB$else\fP +Commands in this branch of the \fB$if\fP directive are executed if +the test fails. +.IP \fB$include\fP +This directive takes a single filename as an argument and reads commands +and bindings from that file. For example, the following directive +would read \fI/etc/inputrc\fP: +.sp 1 +.RS +.nf +\fB$include\fP \^ \fI/etc/inputrc\fP +.fi +.RE +.SS Searching +Readline provides commands for searching through the command history +(see +.SM +.B HISTORY +below) for lines containing a specified string. +There are two search modes: +.I incremental +and +.IR non-incremental . +.PP +Incremental searches begin before the user has finished typing the +search string. +As each character of the search string is typed, readline displays +the next entry from the history matching the string typed so far. +An incremental search requires only as many characters as needed to +find the desired history entry. +The characters present in the value of the \fBisearch-terminators\fP +variable are used to terminate an incremental search. +If that variable has not been assigned a value the Escape and +Control-J characters will terminate an incremental search. +Control-G will abort an incremental search and restore the original +line. +When the search is terminated, the history entry containing the +search string becomes the current line. +.PP +To find other matching entries in the history list, type Control-S or +Control-R as appropriate. +This will search backward or forward in the history for the next +entry matching the search string typed so far. +Any other key sequence bound to a readline command will terminate +the search and execute that command. +For instance, a \fInewline\fP will terminate the search and accept +the line, thereby executing the command from the history list. +.PP +Readline remembers the last incremental search string. If two +Control-Rs are typed without any intervening characters defining a +new search string, any remembered search string is used. +.PP +Non-incremental searches read the entire search string before starting +to search for matching history lines. The search string may be +typed by the user or be part of the contents of the current line. +.SS "Readline Command Names" +The following is a list of the names of the commands and the default +key sequences to which they are bound. +Command names without an accompanying key sequence are unbound by default. +In the following descriptions, \fIpoint\fP refers to the current cursor +position, and \fImark\fP refers to a cursor position saved by the +\fBset\-mark\fP command. +The text between the point and mark is referred to as the \fIregion\fP. +.SS Commands for Moving +.PD 0 +.TP +.B beginning\-of\-line (C\-a) +Move to the start of the current line. +.TP +.B end\-of\-line (C\-e) +Move to the end of the line. +.TP +.B forward\-char (C\-f) +Move forward a character. +.TP +.B backward\-char (C\-b) +Move back a character. +.TP +.B forward\-word (M\-f) +Move forward to the end of the next word. Words are composed of +alphanumeric characters (letters and digits). +.TP +.B backward\-word (M\-b) +Move back to the start of the current or previous word. +Words are composed of alphanumeric characters (letters and digits). +.TP +.B shell\-forward\-word +Move forward to the end of the next word. +Words are delimited by non-quoted shell metacharacters. +.TP +.B shell\-backward\-word +Move back to the start of the current or previous word. +Words are delimited by non-quoted shell metacharacters. +.TP +.B previous\-screen\-line +Attempt to move point to the same physical screen column on the previous +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if point is not +greater than the length of the prompt plus the screen width. +.TP +.B next\-screen\-line +Attempt to move point to the same physical screen column on the next +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if the length +of the current Readline line is not greater than the length of the prompt +plus the screen width. +.TP +.B clear\-display (M\-C\-l) +Clear the screen and, if possible, the terminal's scrollback buffer, +then redraw the current line, +leaving the current line at the top of the screen. +.TP +.B clear\-screen (C\-l) +Clear the screen, +then redraw the current line, +leaving the current line at the top of the screen. +With an argument, refresh the current line without clearing the +screen. +.TP +.B redraw\-current\-line +Refresh the current line. +.PD +.SS Commands for Manipulating the History +.PD 0 +.TP +.B accept\-line (Newline, Return) +Accept the line regardless of where the cursor is. If this line is +non-empty, add it to the history list according to the state of the +.SM +.B HISTCONTROL +variable. If the line is a modified history +line, then restore the history line to its original state. +.TP +.B previous\-history (C\-p) +Fetch the previous command from the history list, moving back in +the list. +.TP +.B next\-history (C\-n) +Fetch the next command from the history list, moving forward in the +list. +.TP +.B beginning\-of\-history (M\-<) +Move to the first line in the history. +.TP +.B end\-of\-history (M\->) +Move to the end of the input history, i.e., the line currently being +entered. +.TP +.B reverse\-search\-history (C\-r) +Search backward starting at the current line and moving `up' through +the history as necessary. This is an incremental search. +.TP +.B forward\-search\-history (C\-s) +Search forward starting at the current line and moving `down' through +the history as necessary. This is an incremental search. +.TP +.B non\-incremental\-reverse\-search\-history (M\-p) +Search backward through the history starting at the current line +using a non-incremental search for a string supplied by the user. +.TP +.B non\-incremental\-forward\-search\-history (M\-n) +Search forward through the history using a non-incremental search for +a string supplied by the user. +.TP +.B history\-search\-forward +Search forward through the history for the string of characters +between the start of the current line and the point. +This is a non-incremental search. +.TP +.B history\-search\-backward +Search backward through the history for the string of characters +between the start of the current line and the point. +This is a non-incremental search. +.TP +.B history\-substring\-search\-backward +Search backward through the history for the string of characters +between the start of the current line and the current cursor +position (the \fIpoint\fP). +The search string may match anywhere in a history line. +This is a non-incremental search. +.TP +.B history\-substring\-search\-forward +Search forward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search. +.TP +.B yank\-nth\-arg (M\-C\-y) +Insert the first argument to the previous command (usually +the second word on the previous line) at point. +With an argument +.IR n , +insert the \fIn\fPth word from the previous command (the words +in the previous command begin with word 0). A negative argument +inserts the \fIn\fPth word from the end of the previous command. +Once the argument \fIn\fP is computed, the argument is extracted +as if the "!\fIn\fP" history expansion had been specified. +.TP +.B +yank\-last\-arg (M\-.\^, M\-_\^) +Insert the last argument to the previous command (the last word of +the previous history entry). +With a numeric argument, behave exactly like \fByank\-nth\-arg\fP. +Successive calls to \fByank\-last\-arg\fP move back through the history +list, inserting the last word (or the word specified by the argument to +the first call) of each line in turn. +Any numeric argument supplied to these successive calls determines +the direction to move through the history. A negative argument switches +the direction through the history (back or forward). +The history expansion facilities are used to extract the last word, +as if the "!$" history expansion had been specified. +.TP +.B shell\-expand\-line (M\-C\-e) +Expand the line as the shell does. This +performs alias and history expansion as well as all of the shell +word expansions. See +.SM +.B HISTORY EXPANSION +below for a description of history expansion. +.TP +.B history\-expand\-line (M\-^) +Perform history expansion on the current line. +See +.SM +.B HISTORY EXPANSION +below for a description of history expansion. +.TP +.B magic\-space +Perform history expansion on the current line and insert a space. +See +.SM +.B HISTORY EXPANSION +below for a description of history expansion. +.TP +.B alias\-expand\-line +Perform alias expansion on the current line. +See +.SM +.B ALIASES +above for a description of alias expansion. +.TP +.B history\-and\-alias\-expand\-line +Perform history and alias expansion on the current line. +.TP +.B insert\-last\-argument (M\-.\^, M\-_\^) +A synonym for \fByank\-last\-arg\fP. +.TP +.B operate\-and\-get\-next (C\-o) +Accept the current line for execution and fetch the next line +relative to the current line from the history for editing. +A numeric argument, if supplied, specifies the history entry to use instead +of the current line. +.TP +.B edit\-and\-execute\-command (C\-x C\-e) +Invoke an editor on the current command line, and execute the result as shell +commands. +\fBBash\fP attempts to invoke +.SM +.BR $VISUAL , +.SM +.BR $EDITOR , +and \fIemacs\fP as the editor, in that order. +.PD +.SS Commands for Changing Text +.PD 0 +.TP +.B \fIend\-of\-file\fP (usually C\-d) +The character indicating end-of-file as set, for example, by +.if t \f(CWstty\fP. +.if n ``stty''. +If this character is read when there are no characters +on the line, and point is at the beginning of the line, Readline +interprets it as the end of input and returns +.SM +.BR EOF . +.TP +.B delete\-char (C\-d) +Delete the character at point. +If this function is bound to the +same character as the tty \fBEOF\fP character, as \fBC\-d\fP +commonly is, see above for the effects. +.TP +.B backward\-delete\-char (Rubout) +Delete the character behind the cursor. When given a numeric argument, +save the deleted text on the kill ring. +.TP +.B forward\-backward\-delete\-char +Delete the character under the cursor, unless the cursor is at the +end of the line, in which case the character behind the cursor is +deleted. +.TP +.B quoted\-insert (C\-q, C\-v) +Add the next character typed to the line verbatim. This is +how to insert characters like \fBC\-q\fP, for example. +.TP +.B tab\-insert (C\-v TAB) +Insert a tab character. +.TP +.B self\-insert (a,\ b,\ A,\ 1,\ !,\ ...) +Insert the character typed. +.TP +.B transpose\-chars (C\-t) +Drag the character before point forward over the character at point, +moving point forward as well. +If point is at the end of the line, then this transposes +the two characters before point. +Negative arguments have no effect. +.TP +.B transpose\-words (M\-t) +Drag the word before point past the word after point, +moving point over that word as well. +If point is at the end of the line, this transposes +the last two words on the line. +.TP +.B upcase\-word (M\-u) +Uppercase the current (or following) word. With a negative argument, +uppercase the previous word, but do not move point. +.TP +.B downcase\-word (M\-l) +Lowercase the current (or following) word. With a negative argument, +lowercase the previous word, but do not move point. +.TP +.B capitalize\-word (M\-c) +Capitalize the current (or following) word. With a negative argument, +capitalize the previous word, but do not move point. +.TP +.B overwrite\-mode +Toggle overwrite mode. With an explicit positive numeric argument, +switches to overwrite mode. With an explicit non-positive numeric +argument, switches to insert mode. This command affects only +\fBemacs\fP mode; \fBvi\fP mode does overwrite differently. +Each call to \fIreadline()\fP starts in insert mode. +In overwrite mode, characters bound to \fBself\-insert\fP replace +the text at point rather than pushing the text to the right. +Characters bound to \fBbackward\-delete\-char\fP replace the character +before point with a space. By default, this command is unbound. +.PD +.SS Killing and Yanking +.PD 0 +.TP +.B kill\-line (C\-k) +Kill the text from point to the end of the line. +.TP +.B backward\-kill\-line (C\-x Rubout) +Kill backward to the beginning of the line. +.TP +.B unix\-line\-discard (C\-u) +Kill backward from point to the beginning of the line. +The killed text is saved on the kill-ring. +.\" There is no real difference between this and backward-kill-line +.TP +.B kill\-whole\-line +Kill all characters on the current line, no matter where point is. +.TP +.B kill\-word (M\-d) +Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as those used by \fBforward\-word\fP. +.TP +.B backward\-kill\-word (M\-Rubout) +Kill the word behind point. +Word boundaries are the same as those used by \fBbackward\-word\fP. +.TP +.B shell\-kill\-word +Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as those used by \fBshell\-forward\-word\fP. +.TP +.B shell\-backward\-kill\-word +Kill the word behind point. +Word boundaries are the same as those used by \fBshell\-backward\-word\fP. +.TP +.B unix\-word\-rubout (C\-w) +Kill the word behind point, using white space as a word boundary. +The killed text is saved on the kill-ring. +.TP +.B unix\-filename\-rubout +Kill the word behind point, using white space and the slash character +as the word boundaries. +The killed text is saved on the kill-ring. +.TP +.B delete\-horizontal\-space (M\-\e) +Delete all spaces and tabs around point. +.TP +.B kill\-region +Kill the text in the current region. +.TP +.B copy\-region\-as\-kill +Copy the text in the region to the kill buffer. +.TP +.B copy\-backward\-word +Copy the word before point to the kill buffer. +The word boundaries are the same as \fBbackward\-word\fP. +.TP +.B copy\-forward\-word +Copy the word following point to the kill buffer. +The word boundaries are the same as \fBforward\-word\fP. +.TP +.B yank (C\-y) +Yank the top of the kill ring into the buffer at point. +.TP +.B yank\-pop (M\-y) +Rotate the kill ring, and yank the new top. Only works following +.B yank +or +.BR yank\-pop . +.PD +.SS Numeric Arguments +.PD 0 +.TP +.B digit\-argument (M\-0, M\-1, ..., M\-\-) +Add this digit to the argument already accumulating, or start a new +argument. M\-\- starts a negative argument. +.TP +.B universal\-argument +This is another way to specify an argument. +If this command is followed by one or more digits, optionally with a +leading minus sign, those digits define the argument. +If the command is followed by digits, executing +.B universal\-argument +again ends the numeric argument, but is otherwise ignored. +As a special case, if this command is immediately followed by a +character that is neither a digit nor minus sign, the argument count +for the next command is multiplied by four. +The argument count is initially one, so executing this function the +first time makes the argument count four, a second time makes the +argument count sixteen, and so on. +.PD +.SS Completing +.PD 0 +.TP +.B complete (TAB) +Attempt to perform completion on the text before point. +.B Bash +attempts completion treating the text as a variable (if the +text begins with \fB$\fP), username (if the text begins with +\fB~\fP), hostname (if the text begins with \fB@\fP), or +command (including aliases and functions) in turn. If none +of these produces a match, filename completion is attempted. +.TP +.B possible\-completions (M\-?) +List the possible completions of the text before point. +.TP +.B insert\-completions (M\-*) +Insert all completions of the text before point +that would have been generated by +\fBpossible\-completions\fP. +.TP +.B menu\-complete +Similar to \fBcomplete\fP, but replaces the word to be completed +with a single match from the list of possible completions. +Repeated execution of \fBmenu\-complete\fP steps through the list +of possible completions, inserting each match in turn. +At the end of the list of completions, the bell is rung +(subject to the setting of \fBbell\-style\fP) +and the original text is restored. +An argument of \fIn\fP moves \fIn\fP positions forward in the list +of matches; a negative argument may be used to move backward +through the list. +This command is intended to be bound to \fBTAB\fP, but is unbound +by default. +.TP +.B menu\-complete\-backward +Identical to \fBmenu\-complete\fP, but moves backward through the list +of possible completions, as if \fBmenu\-complete\fP had been given a +negative argument. This command is unbound by default. +.TP +.B delete\-char\-or\-list +Deletes the character under the cursor if not at the beginning or +end of the line (like \fBdelete\-char\fP). +If at the end of the line, behaves identically to +\fBpossible\-completions\fP. +This command is unbound by default. +.TP +.B complete\-filename (M\-/) +Attempt filename completion on the text before point. +.TP +.B possible\-filename\-completions (C\-x /) +List the possible completions of the text before point, +treating it as a filename. +.TP +.B complete\-username (M\-~) +Attempt completion on the text before point, treating +it as a username. +.TP +.B possible\-username\-completions (C\-x ~) +List the possible completions of the text before point, +treating it as a username. +.TP +.B complete\-variable (M\-$) +Attempt completion on the text before point, treating +it as a shell variable. +.TP +.B possible\-variable\-completions (C\-x $) +List the possible completions of the text before point, +treating it as a shell variable. +.TP +.B complete\-hostname (M\-@) +Attempt completion on the text before point, treating +it as a hostname. +.TP +.B possible\-hostname\-completions (C\-x @) +List the possible completions of the text before point, +treating it as a hostname. +.TP +.B complete\-command (M\-!) +Attempt completion on the text before point, treating +it as a command name. Command completion attempts to +match the text against aliases, reserved words, shell +functions, shell builtins, and finally executable filenames, +in that order. +.TP +.B possible\-command\-completions (C\-x !) +List the possible completions of the text before point, +treating it as a command name. +.TP +.B dynamic\-complete\-history (M\-TAB) +Attempt completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. +.TP +.B dabbrev\-expand +Attempt menu completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. +.TP +.B complete\-into\-braces (M\-{) +Perform filename completion and insert the list of possible completions +enclosed within braces so the list is available to the shell (see +.B Brace Expansion +above). +.PD +.SS Keyboard Macros +.PD 0 +.TP +.B start\-kbd\-macro (C\-x (\^) +Begin saving the characters typed into the current keyboard macro. +.TP +.B end\-kbd\-macro (C\-x )\^) +Stop saving the characters typed into the current keyboard macro +and store the definition. +.TP +.B call\-last\-kbd\-macro (C\-x e) +Re-execute the last keyboard macro defined, by making the characters +in the macro appear as if typed at the keyboard. +.TP +.B print\-last\-kbd\-macro () +Print the last keyboard macro defined in a format suitable for the +\fIinputrc\fP file. +.PD +.SS Miscellaneous +.PD 0 +.TP +.B re\-read\-init\-file (C\-x C\-r) +Read in the contents of the \fIinputrc\fP file, and incorporate +any bindings or variable assignments found there. +.TP +.B abort (C\-g) +Abort the current editing command and +ring the terminal's bell (subject to the setting of +.BR bell\-style ). +.TP +.B do\-lowercase\-version (M\-A, M\-B, M\-\fIx\fP, ...) +If the metafied character \fIx\fP is uppercase, run the command +that is bound to the corresponding metafied lowercase character. +The behavior is undefined if \fIx\fP is already lowercase. +.TP +.B prefix\-meta (ESC) +Metafy the next character typed. +.SM +.B ESC +.B f +is equivalent to +.BR Meta\-f . +.TP +.B undo (C\-_, C\-x C\-u) +Incremental undo, separately remembered for each line. +.TP +.B revert\-line (M\-r) +Undo all changes made to this line. This is like executing the +.B undo +command enough times to return the line to its initial state. +.TP +.B tilde\-expand (M\-&) +Perform tilde expansion on the current word. +.TP +.B set\-mark (C\-@, M\-) +Set the mark to the point. If a +numeric argument is supplied, the mark is set to that position. +.TP +.B exchange\-point\-and\-mark (C\-x C\-x) +Swap the point with the mark. The current cursor position is set to +the saved position, and the old cursor position is saved as the mark. +.TP +.B character\-search (C\-]) +A character is read and point is moved to the next occurrence of that +character. A negative count searches for previous occurrences. +.TP +.B character\-search\-backward (M\-C\-]) +A character is read and point is moved to the previous occurrence of that +character. A negative count searches for subsequent occurrences. +.TP +.B skip\-csi\-sequence +Read enough characters to consume a multi-key sequence such as those +defined for keys like Home and End. Such sequences begin with a +Control Sequence Indicator (CSI), usually ESC\-[. If this sequence is +bound to "\e[", keys producing such sequences will have no effect +unless explicitly bound to a readline command, instead of inserting +stray characters into the editing buffer. This is unbound by default, +but usually bound to ESC\-[. +.TP +.B insert\-comment (M\-#) +Without a numeric argument, the value of the readline +.B comment\-begin +variable is inserted at the beginning of the current line. +If a numeric argument is supplied, this command acts as a toggle: if +the characters at the beginning of the line do not match the value +of \fBcomment\-begin\fP, the value is inserted, otherwise +the characters in \fBcomment\-begin\fP are deleted from the beginning of +the line. +In either case, the line is accepted as if a newline had been typed. +The default value of +\fBcomment\-begin\fP causes this command to make the current line +a shell comment. +If a numeric argument causes the comment character to be removed, the line +will be executed by the shell. +.TP +.B glob\-complete\-word (M\-g) +The word before point is treated as a pattern for pathname expansion, +with an asterisk implicitly appended. This pattern is used to +generate a list of matching filenames for possible completions. +.TP +.B glob\-expand\-word (C\-x *) +The word before point is treated as a pattern for pathname expansion, +and the list of matching filenames is inserted, replacing the word. +If a numeric argument is supplied, an asterisk is appended before +pathname expansion. +.TP +.B glob\-list\-expansions (C\-x g) +The list of expansions that would have been generated by +.B glob\-expand\-word +is displayed, and the line is redrawn. +If a numeric argument is supplied, an asterisk is appended before +pathname expansion. +.TP +.B dump\-functions +Print all of the functions and their key bindings to the +readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an \fIinputrc\fP file. +.TP +.B dump\-variables +Print all of the settable readline variables and their values to the +readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an \fIinputrc\fP file. +.TP +.B dump\-macros +Print all of the readline key sequences bound to macros and the +strings they output. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an \fIinputrc\fP file. +.TP +.B display\-shell\-version (C\-x C\-v) +Display version information about the current instance of +.BR bash . +.PD +.SS Programmable Completion +When word completion is attempted for an argument to a command for +which a completion specification (a \fIcompspec\fP) has been defined +using the \fBcomplete\fP builtin (see +.SM +.B "SHELL BUILTIN COMMANDS" +below), the programmable completion facilities are invoked. +.PP +First, the command name is identified. +If the command word is the empty string (completion attempted at the +beginning of an empty line), any compspec defined with +the \fB\-E\fP option to \fBcomplete\fP is used. +If a compspec has been defined for that command, the +compspec is used to generate the list of possible completions for the word. +If the command word is a full pathname, a compspec for the full +pathname is searched for first. +If no compspec is found for the full pathname, an attempt is made to +find a compspec for the portion following the final slash. +If those searches do not result in a compspec, any compspec defined with +the \fB\-D\fP option to \fBcomplete\fP is used as the default. +If there is no default compspec, \fBbash\fP attempts alias expansion +on the command word as a final resort, and attempts to find a compspec +for the command word from any successful expansion. +.PP +Once a compspec has been found, it is used to generate the list of +matching words. +If a compspec is not found, the default \fBbash\fP completion as +described above under \fBCompleting\fP is performed. +.PP +First, the actions specified by the compspec are used. +Only matches which are prefixed by the word being completed are +returned. +When the +.B \-f +or +.B \-d +option is used for filename or directory name completion, the shell +variable +.SM +.B FIGNORE +is used to filter the matches. +.PP +Any completions specified by a pathname expansion pattern to the +\fB\-G\fP option are generated next. +The words generated by the pattern need not match the word +being completed. +The +.SM +.B GLOBIGNORE +shell variable is not used to filter the matches, but the +.SM +.B FIGNORE +variable is used. +.PP +Next, the string specified as the argument to the \fB\-W\fP option +is considered. +The string is first split using the characters in the +.SM +.B IFS +special variable as delimiters. +Shell quoting is honored. +Each word is then expanded using +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, and arithmetic expansion, +as described above under +.SM +.BR EXPANSION . +The results are split using the rules described above under +\fBWord Splitting\fP. +The results of the expansion are prefix-matched against the word being +completed, and the matching words become the possible completions. +.PP +After these matches have been generated, any shell function or command +specified with the \fB\-F\fP and \fB\-C\fP options is invoked. +When the command or function is invoked, the +.SM +.BR COMP_LINE , +.SM +.BR COMP_POINT , +.SM +.BR COMP_KEY , +and +.SM +.B COMP_TYPE +variables are assigned values as described above under +\fBShell Variables\fP. +If a shell function is being invoked, the +.SM +.B COMP_WORDS +and +.SM +.B COMP_CWORD +variables are also set. +When the function or command is invoked, +the first argument (\fB$1\fP) is the name of the command whose arguments are +being completed, +the second argument (\fB$2\fP) is the word being completed, +and the third argument (\fB$3\fP) is the word preceding the word being +completed on the current command line. +No filtering of the generated completions against the word being completed +is performed; the function or command has complete freedom in generating +the matches. +.PP +Any function specified with \fB\-F\fP is invoked first. +The function may use any of the shell facilities, including the +\fBcompgen\fP builtin described below, to generate the matches. +It must put the possible completions in the +.SM +.B COMPREPLY +array variable, one per array element. +.PP +Next, any command specified with the \fB\-C\fP option is invoked +in an environment equivalent to command substitution. +It should print a list of completions, one per line, to the +standard output. +Backslash may be used to escape a newline, if necessary. +.PP +After all of the possible completions are generated, any filter +specified with the \fB\-X\fP option is applied to the list. +The filter is a pattern as used for pathname expansion; a \fB&\fP +in the pattern is replaced with the text of the word being completed. +A literal \fB&\fP may be escaped with a backslash; the backslash +is removed before attempting a match. +Any completion that matches the pattern will be removed from the list. +A leading \fB!\fP negates the pattern; in this case any completion +not matching the pattern will be removed. +If the +.B nocasematch +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +.PP +Finally, any prefix and suffix specified with the \fB\-P\fP and \fB\-S\fP +options are added to each member of the completion list, and the result is +returned to the readline completion code as the list of possible +completions. +.PP +If the previously-applied actions do not generate any matches, and the +\fB\-o dirnames\fP option was supplied to \fBcomplete\fP when the +compspec was defined, directory name completion is attempted. +.PP +If the \fB\-o plusdirs\fP option was supplied to \fBcomplete\fP when the +compspec was defined, directory name completion is attempted and any +matches are added to the results of the other actions. +.PP +By default, if a compspec is found, whatever it generates is returned +to the completion code as the full set of possible completions. +The default \fBbash\fP completions are not attempted, and the readline +default of filename completion is disabled. +If the \fB\-o bashdefault\fP option was supplied to \fBcomplete\fP when +the compspec was defined, the \fBbash\fP default completions are attempted +if the compspec generates no matches. +If the \fB\-o default\fP option was supplied to \fBcomplete\fP when the +compspec was defined, readline's default completion will be performed +if the compspec (and, if attempted, the default \fBbash\fP completions) +generate no matches. +.PP +When a compspec indicates that directory name completion is desired, +the programmable completion functions force readline to append a slash +to completed names which are symbolic links to directories, subject to +the value of the \fBmark\-directories\fP readline variable, regardless +of the setting of the \fBmark-symlinked\-directories\fP readline variable. +.PP +There is some support for dynamically modifying completions. This is +most useful when used in combination with a default completion specified +with \fBcomplete \-D\fP. +It's possible for shell functions executed as completion +handlers to indicate that completion should be retried by returning an +exit status of 124. If a shell function returns 124, and changes +the compspec associated with the command on which completion is being +attempted (supplied as the first argument when the function is executed), +programmable completion restarts from the beginning, with an +attempt to find a new compspec for that command. This allows a set of +completions to be built dynamically as completion is attempted, rather than +being loaded all at once. +.PP +For instance, assuming that there is a library of compspecs, each kept in a +file corresponding to the name of the command, the following default +completion function would load completions dynamically: +.PP +\f(CW_completion_loader() +.br +{ +.br + . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 +.br +} +.br +complete -D -F _completion_loader -o bashdefault -o default +.br +\fP +.SH HISTORY +When the +.B \-o history +option to the +.B set +builtin is enabled, the shell provides access to the +\fIcommand history\fP, +the list of commands previously typed. +The value of the +.SM +.B HISTSIZE +variable is used as the +number of commands to save in a history list. +The text of the last +.SM +.B HISTSIZE +commands (default 500) is saved. The shell +stores each command in the history list prior to parameter and +variable expansion (see +.SM +.B EXPANSION +above) but after history expansion is performed, subject to the +values of the shell variables +.SM +.B HISTIGNORE +and +.SM +.BR HISTCONTROL . +.PP +On startup, the history is initialized from the file named by +the variable +.SM +.B HISTFILE +(default \fI~/.bash_history\fP). +The file named by the value of +.SM +.B HISTFILE +is truncated, if necessary, to contain no more than +the number of lines specified by the value of +.SM +.BR HISTFILESIZE . +If \fBHISTFILESIZE\fP is unset, or set to null, a non-numeric value, +or a numeric value less than zero, the history file is not truncated. +When the history file is read, +lines beginning with the history comment character followed immediately +by a digit are interpreted as timestamps for the following history line. +These timestamps are optionally displayed depending on the value of the +.SM +.B HISTTIMEFORMAT +variable. +When a shell with history enabled exits, the last +.SM +.B $HISTSIZE +lines are copied from the history list to +.SM +.BR $HISTFILE . +If the +.B histappend +shell option is enabled +(see the description of +.B shopt +under +.SM +.B "SHELL BUILTIN COMMANDS" +below), the lines are appended to the history file, +otherwise the history file is overwritten. +If +.SM +.B HISTFILE +is unset, or if the history file is unwritable, the history is +not saved. +If the +.SM +.B HISTTIMEFORMAT +variable is set, time stamps are written to the history file, marked +with the history comment character, so +they may be preserved across shell sessions. +This uses the history comment character to distinguish timestamps from +other history lines. +After saving the history, the history file is truncated +to contain no more than +.SM +.B HISTFILESIZE +lines. If +.SM +.B HISTFILESIZE +is unset, or set to null, a non-numeric value, +or a numeric value less than zero, the history file is not truncated. +.PP +The builtin command +.B fc +(see +.SM +.B SHELL BUILTIN COMMANDS +below) may be used to list or edit and re-execute a portion of +the history list. +The +.B history +builtin may be used to display or modify the history list and +manipulate the history file. +When using command-line editing, search commands +are available in each editing mode that provide access to the +history list. +.PP +The shell allows control over which commands are saved on the history +list. The +.SM +.B HISTCONTROL +and +.SM +.B HISTIGNORE +variables may be set to cause the shell to save only a subset of the +commands entered. +The +.B cmdhist +shell option, if enabled, causes the shell to attempt to save each +line of a multi-line command in the same history entry, adding +semicolons where necessary to preserve syntactic correctness. +The +.B lithist +shell option causes the shell to save the command with embedded newlines +instead of semicolons. See the description of the +.B shopt +builtin below under +.SM +.B "SHELL BUILTIN COMMANDS" +for information on setting and unsetting shell options. +.SH "HISTORY EXPANSION" +The shell supports a history expansion feature that +is similar to the history expansion in +.BR csh . +This section describes what syntax features are available. This +feature is enabled by default for interactive shells, and can be +disabled using the +.B +H +option to the +.B set +builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). Non-interactive shells do not perform history expansion +by default. +.PP +History expansions introduce words from the history list into +the input stream, making it easy to repeat commands, insert the +arguments to a previous command into the current input line, or +fix errors in previous commands quickly. +.PP +History expansion is performed immediately after a complete line +is read, before the shell breaks it into words, and is performed +on each line individually without taking quoting on previous lines into +account. +It takes place in two parts. +The first is to determine which line from the history list +to use during substitution. +The second is to select portions of that line for inclusion into +the current one. +The line selected from the history is the \fIevent\fP, +and the portions of that line that are acted upon are \fIwords\fP. +Various \fImodifiers\fP are available to manipulate the selected words. +The line is broken into words in the same fashion as when reading input, +so that several \fImetacharacter\fP-separated words surrounded by +quotes are considered one word. +History expansions are introduced by the appearance of the +history expansion character, which is \^\fB!\fP\^ by default. +Only backslash (\^\fB\e\fP\^) and single quotes can quote +the history expansion character, but the history expansion character is +also treated as quoted if it immediately precedes the closing double quote +in a double-quoted string. +.PP +Several characters inhibit history expansion if found immediately +following the history expansion character, even if it is unquoted: +space, tab, newline, carriage return, and \fB=\fP. +If the \fBextglob\fP shell option is enabled, \fB(\fP will also +inhibit expansion. +.PP +Several shell options settable with the +.B shopt +builtin may be used to tailor the behavior of history expansion. +If the +.B histverify +shell option is enabled (see the description of the +.B shopt +builtin below), and +.B readline +is being used, history substitutions are not immediately passed to +the shell parser. +Instead, the expanded line is reloaded into the +.B readline +editing buffer for further modification. +If +.B readline +is being used, and the +.B histreedit +shell option is enabled, a failed history substitution will be reloaded +into the +.B readline +editing buffer for correction. +The +.B \-p +option to the +.B history +builtin command may be used to see what a history expansion will +do before using it. +The +.B \-s +option to the +.B history +builtin may be used to add commands to the end of the history list +without actually executing them, so that they are available for +subsequent recall. +.PP +The shell allows control of the various characters used by the +history expansion mechanism (see the description of +.B histchars +above under +.BR "Shell Variables" ). +The shell uses +the history comment character to mark history timestamps when +writing the history file. +.SS Event Designators +An event designator is a reference to a command line entry in the +history list. +Unless the reference is absolute, events are relative to the current +position in the history list. +.PP +.PD 0 +.TP +.B ! +Start a history substitution, except when followed by a +.BR blank , +newline, carriage return, = +or ( (when the \fBextglob\fP shell option is enabled using +the \fBshopt\fP builtin). +.TP +.B !\fIn\fR +Refer to command line +.IR n . +.TP +.B !\-\fIn\fR +Refer to the current command minus +.IR n . +.TP +.B !! +Refer to the previous command. This is a synonym for `!\-1'. +.TP +.B !\fIstring\fR +Refer to the most recent command preceding the current position in the +history list starting with +.IR string . +.TP +.B !?\fIstring\fR\fB[?]\fR +Refer to the most recent command preceding the current position in the +history list containing +.IR string . +The trailing \fB?\fP may be omitted if +.I string +is followed immediately by a newline. +If \fIstring\fP is missing, the string from the most recent search is used; +it is an error if there is no previous search string. +.TP +.B \d\s+2^\s-2\u\fIstring1\fP\d\s+2^\s-2\u\fIstring2\fP\d\s+2^\s-2\u +Quick substitution. Repeat the previous command, replacing +.I string1 +with +.IR string2 . +Equivalent to +``!!:s\d\s+2^\s-2\u\fIstring1\fP\d\s+2^\s-2\u\fIstring2\fP\d\s+2^\s-2\u'' +(see \fBModifiers\fP below). +.TP +.B !# +The entire command line typed so far. +.PD +.SS Word Designators +Word designators are used to select desired words from the event. +A +.B : +separates the event specification from the word designator. +It may be omitted if the word designator begins with a +.BR ^ , +.BR $ , +.BR * , +.BR \- , +or +.BR % . +Words are numbered from the beginning of the line, +with the first word being denoted by 0 (zero). +Words are inserted into the current line separated by single spaces. +.PP +.PD 0 +.TP +.B 0 (zero) +The zeroth word. For the shell, this is the command +word. +.TP +.I n +The \fIn\fRth word. +.TP +.B ^ +The first argument. That is, word 1. +.TP +.B $ +The last word. This is usually the last argument, but will expand to the +zeroth word if there is only one word in the line. +.TP +.B % +The first word matched by the most recent `?\fIstring\fR?' search, +if the search string begins with a character that is part of a word. +.TP +.I x\fB\-\fPy +A range of words; `\-\fIy\fR' abbreviates `0\-\fIy\fR'. +.TP +.B * +All of the words but the zeroth. This is a synonym +for `\fI1\-$\fP'. It is not an error to use +.B * +if there is just one +word in the event; the empty string is returned in that case. +.TP +.B x* +Abbreviates \fIx\-$\fP. +.TP +.B x\- +Abbreviates \fIx\-$\fP like \fBx*\fP, but omits the last word. +If \fBx\fP is missing, it defaults to 0. +.PD +.PP +If a word designator is supplied without an event specification, the +previous command is used as the event. +.SS Modifiers +After the optional word designator, there may appear a sequence of +one or more of the following modifiers, each preceded by a `:'. +These modify, or edit, the word or words selected from the history event. +.PP +.PD 0 +.TP +.B h +Remove a trailing filename component, leaving only the head. +.TP +.B t +Remove all leading filename components, leaving the tail. +.TP +.B r +Remove a trailing suffix of the form \fI.xxx\fP, leaving the +basename. +.TP +.B e +Remove all but the trailing suffix. +.TP +.B p +Print the new command but do not execute it. +.TP +.B q +Quote the substituted words, escaping further substitutions. +.TP +.B x +Quote the substituted words as with +.BR q , +but break into words at +.B blanks +and newlines. +The \fBq\fP and \fBx\fP modifiers are mutually exclusive; the last one +supplied is used. +.TP +.B s/\fIold\fP/\fInew\fP/ +Substitute +.I new +for the first occurrence of +.I old +in the event line. +Any character may be used as the delimiter in place of /. +The final delimiter is optional if it is the last character of the +event line. +The delimiter may be quoted in +.I old +and +.I new +with a single backslash. If & appears in +.IR new , +it is replaced by +.IR old . +A single backslash will quote the &. +If +.I old +is null, it is set to the last +.I old +substituted, or, if no previous history substitutions took place, +the last +.I string +in a +.B !?\fIstring\fR\fB[?]\fR +search. +If +.I new +is null, each matching +.I old +is deleted. +.TP +.B & +Repeat the previous substitution. +.TP +.B g +Cause changes to be applied over the entire event line. This is +used in conjunction with `\fB:s\fP' (e.g., `\fB:gs/\fIold\fP/\fInew\fP/\fR') +or `\fB:&\fP'. If used with +`\fB:s\fP', any delimiter can be used +in place of /, and the final delimiter is optional +if it is the last character of the event line. +An \fBa\fP may be used as a synonym for \fBg\fP. +.TP +.B G +Apply the following `\fBs\fP' or `\fB&\fP' modifier once to each word +in the event line. +.PD +.SH "SHELL BUILTIN COMMANDS" +.\" start of bash_builtins +.zZ +.PP +Unless otherwise noted, each builtin command documented in this +section as accepting options preceded by +.B \- +accepts +.B \-\- +to signify the end of the options. +The \fB:\fP, \fBtrue\fP, \fBfalse\fP, and \fBtest\fP/\fB[\fP builtins +do not accept options and do not treat \fB\-\-\fP specially. +The \fBexit\fP, \fBlogout\fP, \fBreturn\fP, +\fBbreak\fP, \fBcontinue\fP, \fBlet\fP, +and \fBshift\fP builtins accept and process arguments beginning with +\fB\-\fP without requiring \fB\-\-\fP. +Other builtins that accept arguments but are not specified as accepting +options interpret arguments beginning with \fB\-\fP as invalid options and +require \fB\-\-\fP to prevent this interpretation. +.sp .5 +.PD 0 +.TP +\fB:\fP [\fIarguments\fP] +.PD +No effect; the command does nothing beyond expanding +.I arguments +and performing any specified +redirections. +The return status is zero. +.TP +\fB .\| \fP \fIfilename\fP [\fIarguments\fP] +.PD 0 +.TP +\fBsource\fP \fIfilename\fP [\fIarguments\fP] +.PD +Read and execute commands from +.I filename +in the current +shell environment and return the exit status of the last command +executed from +.IR filename . +If +.I filename +does not contain a slash, filenames in +.SM +.B PATH +are used to find the directory containing +.IR filename . +The file searched for in +.SM +.B PATH +need not be executable. +When \fBbash\fP is not in \fIposix mode\fP, the current directory is +searched if no file is found in +.SM +.BR PATH . +If the +.B sourcepath +option to the +.B shopt +builtin command is turned off, the +.SM +.B PATH +is not searched. +If any \fIarguments\fP are supplied, they become the positional +parameters when \fIfilename\fP is executed. Otherwise the positional +parameters are unchanged. +If the \fB\-T\fP option is enabled, \fBsource\fP inherits any trap on +\fBDEBUG\fP; if it is not, any \fBDEBUG\fP trap string is saved and +restored around the call to \fBsource\fP, and \fBsource\fP unsets the +\fBDEBUG\fP trap while it executes. +If \fB\-T\fP is not set, and the sourced file changes +the \fBDEBUG\fP trap, the new value is retained when \fBsource\fP completes. +The return status is the status of the last command exited within +the script (0 if no commands are executed), and false if +.I filename +is not found or cannot be read. +.TP +\fBalias\fP [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...] +\fBAlias\fP with no arguments or with the +.B \-p +option prints the list of aliases in the form +\fBalias\fP \fIname\fP=\fIvalue\fP on standard output. +When arguments are supplied, an alias is defined for +each \fIname\fP whose \fIvalue\fP is given. +A trailing space in \fIvalue\fP causes the next word to be +checked for alias substitution when the alias is expanded. +For each \fIname\fP in the argument list for which no \fIvalue\fP +is supplied, the name and value of the alias is printed. +\fBAlias\fP returns true unless a \fIname\fP is given for which +no alias has been defined. +.TP +\fBbg\fP [\fIjobspec\fP ...] +Resume each suspended job \fIjobspec\fP in the background, as if it +had been started with +.BR & . +If +.I jobspec +is not present, the shell's notion of the \fIcurrent job\fP is used. +.B bg +.I jobspec +returns 0 unless run when job control is disabled or, when run with +job control enabled, any specified \fIjobspec\fP was not found +or was started without job control. +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSVX\fP] +.PD 0 +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-q\fP \fIfunction\fP] [\fB\-u\fP \fIfunction\fP] [\fB\-r\fP \fIkeyseq\fP] +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fB\-f\fP \fIfilename\fP +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fB\-x\fP \fIkeyseq\fP:\fIshell\-command\fP +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fIkeyseq\fP:\fIfunction\-name\fP +.TP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fIkeyseq\fP:\fIreadline\-command\fP +.PD +Display current +.B readline +key and function bindings, bind a key sequence to a +.B readline +function or macro, or set a +.B readline +variable. +Each non-option argument is a command as it would appear in +.IR .inputrc , +but each binding or command must be passed as a separate argument; +e.g., '"\eC\-x\eC\-r": re\-read\-init\-file'. +Options, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-m \fIkeymap\fP +Use +.I keymap +as the keymap to be affected by the subsequent bindings. +Acceptable +.I keymap +names are +\fIemacs, emacs\-standard, emacs\-meta, emacs\-ctlx, vi, +vi\-move, vi\-command\fP, and +.IR vi\-insert . +\fIvi\fP is equivalent to \fIvi\-command\fP (\fIvi\-move\fP is also +a synonym); \fIemacs\fP is +equivalent to \fIemacs\-standard\fP. +.TP +.B \-l +List the names of all \fBreadline\fP functions. +.TP +.B \-p +Display \fBreadline\fP function names and bindings in such a way +that they can be re-read. +.TP +.B \-P +List current \fBreadline\fP function names and bindings. +.TP +.B \-s +Display \fBreadline\fP key sequences bound to macros and the strings +they output in such a way that they can be re-read. +.TP +.B \-S +Display \fBreadline\fP key sequences bound to macros and the strings +they output. +.TP +.B \-v +Display \fBreadline\fP variable names and values in such a way that they +can be re-read. +.TP +.B \-V +List current \fBreadline\fP variable names and values. +.TP +.B \-f \fIfilename\fP +Read key bindings from \fIfilename\fP. +.TP +.B \-q \fIfunction\fP +Query about which keys invoke the named \fIfunction\fP. +.TP +.B \-u \fIfunction\fP +Unbind all keys bound to the named \fIfunction\fP. +.TP +.B \-r \fIkeyseq\fP +Remove any current binding for \fIkeyseq\fP. +.TP +.B \-x \fIkeyseq\fP:\fIshell\-command\fP +Cause \fIshell\-command\fP to be executed whenever \fIkeyseq\fP is +entered. +When \fIshell\-command\fP is executed, the shell sets the +.SM +.B READLINE_LINE +variable to the contents of the \fBreadline\fP line buffer and the +.SM +.B READLINE_POINT +and +.SM +.B READLINE_MARK +variables to the current location of the insertion point and the saved +insertion point (the mark), respectively. +If the executed command changes the value of any of +.SM +.BR READLINE_LINE , +.SM +.BR READLINE_POINT , +or +.SM +.BR READLINE_MARK , +those new values will be reflected in the editing state. +.TP +.B \-X +List all key sequences bound to shell commands and the associated commands +in a format that can be reused as input. +.PD +.PP +The return value is 0 unless an unrecognized option is given or an +error occurred. +.RE +.TP +\fBbreak\fP [\fIn\fP] +Exit from within a +.BR for , +.BR while , +.BR until , +or +.B select +loop. If \fIn\fP is specified, break \fIn\fP levels. +.I n +must be \(>= 1. If +.I n +is greater than the number of enclosing loops, all enclosing loops +are exited. +The return value is 0 unless \fIn\fP is not greater than or equal to 1. +.TP +\fBbuiltin\fP \fIshell\-builtin\fP [\fIarguments\fP] +Execute the specified shell builtin, passing it +.IR arguments , +and return its exit status. +This is useful when defining a +function whose name is the same as a shell builtin, +retaining the functionality of the builtin within the function. +The \fBcd\fP builtin is commonly redefined this way. +The return status is false if +.I shell\-builtin +is not a shell builtin command. +.TP +\fBcaller\fP [\fIexpr\fP] +Returns the context of any active subroutine call (a shell function or +a script executed with the \fB.\fP or \fBsource\fP builtins). +Without \fIexpr\fP, \fBcaller\fP displays the line number and source +filename of the current subroutine call. +If a non-negative integer is supplied as \fIexpr\fP, \fBcaller\fP +displays the line number, subroutine name, and source file corresponding +to that position in the current execution call stack. This extra +information may be used, for example, to print a stack trace. The +current frame is frame 0. +The return value is 0 unless the shell is not executing a subroutine +call or \fIexpr\fP does not correspond to a valid position in the +call stack. +.TP +\fBcd\fP [\fB\-L\fP|[\fB\-P\fP [\fB\-e\fP]] [\-@]] [\fIdir\fP] +Change the current directory to \fIdir\fP. +if \fIdir\fP is not supplied, the value of the +.SM +.B HOME +shell variable is the default. +Any additional arguments following \fIdir\fP are ignored. +The variable +.SM +.B CDPATH +defines the search path for the directory containing +.IR dir : +each directory name in +.SM +.B CDPATH +is searched for \fIdir\fP. +Alternative directory names in +.SM +.B CDPATH +are separated by a colon (:). A null directory name in +.SM +.B CDPATH +is the same as the current directory, i.e., ``\fB.\fP''. If +.I dir +begins with a slash (/), +then +.SM +.B CDPATH +is not used. The +.B \-P +option causes \fBcd\fP to use the physical directory structure +by resolving symbolic links while traversing \fIdir\fP and +before processing instances of \fI..\fP in \fIdir\fP (see also the +.B \-P +option to the +.B set +builtin command); the +.B \-L +option forces symbolic links to be followed by resolving the link +after processing instances of \fI..\fP in \fIdir\fP. +If \fI..\fP appears in \fIdir\fP, it is processed by removing the +immediately previous pathname component from \fIdir\fP, back to a slash +or the beginning of \fIdir\fP. +If the +.B \-e +option is supplied with +.BR \-P , +and the current working directory cannot be successfully determined +after a successful directory change, \fBcd\fP will return an unsuccessful +status. +On systems that support it, the \fB\-@\fP option presents the extended +attributes associated with a file as a directory. +An argument of +.B \- +is converted to +.SM +.B $OLDPWD +before the directory change is attempted. +If a non-empty directory name from +.SM +.B CDPATH +is used, or if +\fB\-\fP is the first argument, and the directory change is +successful, the absolute pathname of the new working directory is +written to the standard output. +The return value is true if the directory was successfully changed; +false otherwise. +.TP +\fBcommand\fP [\fB\-pVv\fP] \fIcommand\fP [\fIarg\fP ...] +Run +.I command +with +.I args +suppressing the normal shell function lookup. +Only builtin commands or commands found in the +.SM +.B PATH +are executed. If the +.B \-p +option is given, the search for +.I command +is performed using a default value for +.SM +.B PATH +that is guaranteed to find all of the standard utilities. +If either the +.B \-V +or +.B \-v +option is supplied, a description of +.I command +is printed. The +.B \-v +option causes a single word indicating the command or filename +used to invoke +.I command +to be displayed; the +.B \-V +option produces a more verbose description. +If the +.B \-V +or +.B \-v +option is supplied, the exit status is 0 if +.I command +was found, and 1 if not. If neither option is supplied and +an error occurred or +.I command +cannot be found, the exit status is 127. Otherwise, the exit status of the +.B command +builtin is the exit status of +.IR command . +.TP +\fBcompgen\fP [\fIoption\fP] [\fIword\fP] +Generate possible completion matches for \fIword\fP according to +the \fIoption\fPs, which may be any option accepted by the +.B complete +builtin with the exception of \fB\-p\fP and \fB\-r\fP, and write +the matches to the standard output. +When using the \fB\-F\fP or \fB\-C\fP options, the various shell variables +set by the programmable completion facilities, while available, will not +have useful values. +.sp 1 +The matches will be generated in the same way as if the programmable +completion code had generated them directly from a completion specification +with the same flags. +If \fIword\fP is specified, only those completions matching \fIword\fP +will be displayed. +.sp 1 +The return value is true unless an invalid option is supplied, or no +matches were generated. +.TP +\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DEI\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] +.br +[\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP] [\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP] +.PD 0 +.TP +\fBcomplete\fP \fB\-pr\fP [\fB\-DEI\fP] [\fIname\fP ...] +.PD +Specify how arguments to each \fIname\fP should be completed. +If the \fB\-p\fP option is supplied, or if no options are supplied, +existing completion specifications are printed in a way that allows +them to be reused as input. +The \fB\-r\fP option removes a completion specification for +each \fIname\fP, or, if no \fIname\fPs are supplied, all +completion specifications. +The \fB\-D\fP option indicates that other supplied options and actions should +apply to the ``default'' command completion; that is, completion attempted +on a command for which no completion has previously been defined. +The \fB\-E\fP option indicates that other supplied options and actions should +apply to ``empty'' command completion; that is, completion attempted on a +blank line. +The \fB\-I\fP option indicates that other supplied options and actions should +apply to completion on the initial non-assignment word on the line, or after +a command delimiter such as \fB;\fP or \fB|\fP, which is usually command +name completion. +If multiple options are supplied, the \fB\-D\fP option takes precedence +over \fB\-E\fP, and both take precedence over \fB\-I\fP. +If any of \fB\-D\fP, \fB\-E\fP, or \fB\-I\fP are supplied, any other +\fIname\fP arguments are ignored; these completions only apply to the case +specified by the option. +.sp 1 +The process of applying these completion specifications when word completion +is attempted is described above under \fBProgrammable Completion\fP. +.sp 1 +Other options, if specified, have the following meanings. +The arguments to the \fB\-G\fP, \fB\-W\fP, and \fB\-X\fP options +(and, if necessary, the \fB\-P\fP and \fB\-S\fP options) +should be quoted to protect them from expansion before the +.B complete +builtin is invoked. +.RS +.PD 0 +.TP 8 +\fB\-o\fP \fIcomp-option\fP +The \fIcomp-option\fP controls several aspects of the compspec's behavior +beyond the simple generation of completions. +\fIcomp-option\fP may be one of: +.RS +.TP 8 +.B bashdefault +Perform the rest of the default \fBbash\fP completions if the compspec +generates no matches. +.TP 8 +.B default +Use readline's default filename completion if the compspec generates +no matches. +.TP 8 +.B dirnames +Perform directory name completion if the compspec generates no matches. +.TP 8 +.B filenames +Tell readline that the compspec generates filenames, so it can perform any +filename\-specific processing (like adding a slash to directory names, +quoting special characters, or suppressing trailing spaces). +Intended to be used with shell functions. +.TP 8 +.B noquote +Tell readline not to quote the completed words if they are filenames +(quoting filenames is the default). +.TP 8 +.B nosort +Tell readline not to sort the list of possible completions alphabetically. +.TP 8 +.B nospace +Tell readline not to append a space (the default) to words completed at +the end of the line. +.TP 8 +.B plusdirs +After any matches defined by the compspec are generated, +directory name completion is attempted and any +matches are added to the results of the other actions. +.RE +.TP 8 +\fB\-A\fP \fIaction\fP +The \fIaction\fP may be one of the following to generate a list of possible +completions: +.RS +.TP 8 +.B alias +Alias names. May also be specified as \fB\-a\fP. +.TP 8 +.B arrayvar +Array variable names. +.TP 8 +.B binding +\fBReadline\fP key binding names. +.TP 8 +.B builtin +Names of shell builtin commands. May also be specified as \fB\-b\fP. +.TP 8 +.B command +Command names. May also be specified as \fB\-c\fP. +.TP 8 +.B directory +Directory names. May also be specified as \fB\-d\fP. +.TP 8 +.B disabled +Names of disabled shell builtins. +.TP 8 +.B enabled +Names of enabled shell builtins. +.TP 8 +.B export +Names of exported shell variables. May also be specified as \fB\-e\fP. +.TP 8 +.B file +File names. May also be specified as \fB\-f\fP. +.TP 8 +.B function +Names of shell functions. +.TP 8 +.B group +Group names. May also be specified as \fB\-g\fP. +.TP 8 +.B helptopic +Help topics as accepted by the \fBhelp\fP builtin. +.TP 8 +.B hostname +Hostnames, as taken from the file specified by the +.SM +.B HOSTFILE +shell variable. +.TP 8 +.B job +Job names, if job control is active. May also be specified as \fB\-j\fP. +.TP 8 +.B keyword +Shell reserved words. May also be specified as \fB\-k\fP. +.TP 8 +.B running +Names of running jobs, if job control is active. +.TP 8 +.B service +Service names. May also be specified as \fB\-s\fP. +.TP 8 +.B setopt +Valid arguments for the \fB\-o\fP option to the \fBset\fP builtin. +.TP 8 +.B shopt +Shell option names as accepted by the \fBshopt\fP builtin. +.TP 8 +.B signal +Signal names. +.TP 8 +.B stopped +Names of stopped jobs, if job control is active. +.TP 8 +.B user +User names. May also be specified as \fB\-u\fP. +.TP 8 +.B variable +Names of all shell variables. May also be specified as \fB\-v\fP. +.RE +.TP 8 +\fB\-C\fP \fIcommand\fP +\fIcommand\fP is executed in a subshell environment, and its output is +used as the possible completions. +.TP 8 +\fB\-F\fP \fIfunction\fP +The shell function \fIfunction\fP is executed in the current shell +environment. +When the function is executed, +the first argument (\fB$1\fP) is the name of the command whose arguments are +being completed, +the second argument (\fB$2\fP) is the word being completed, +and the third argument (\fB$3\fP) is the word preceding the word being +completed on the current command line. +When it finishes, the possible completions are retrieved from the value +of the +.SM +.B COMPREPLY +array variable. +.TP 8 +\fB\-G\fP \fIglobpat\fP +The pathname expansion pattern \fIglobpat\fP is expanded to generate +the possible completions. +.TP 8 +\fB\-P\fP \fIprefix\fP +\fIprefix\fP is added at the beginning of each possible completion +after all other options have been applied. +.TP 8 +\fB\-S\fP \fIsuffix\fP +\fIsuffix\fP is appended to each possible completion +after all other options have been applied. +.TP 8 +\fB\-W\fP \fIwordlist\fP +The \fIwordlist\fP is split using the characters in the +.SM +.B IFS +special variable as delimiters, and each resultant word is expanded. +Shell quoting is honored within \fIwordlist\fP, +in order to provide a +mechanism for the words to contain shell metacharacters or characters +in the value of +.SM +.BR IFS . +The possible completions are the members of the resultant list which +match the word being completed. +.TP 8 +\fB\-X\fP \fIfilterpat\fP +\fIfilterpat\fP is a pattern as used for pathname expansion. +It is applied to the list of possible completions generated by the +preceding options and arguments, and each completion matching +\fIfilterpat\fP is removed from the list. +A leading \fB!\fP in \fIfilterpat\fP negates the pattern; in this +case, any completion not matching \fIfilterpat\fP is removed. +.PD +.PP +The return value is true unless an invalid option is supplied, an option +other than \fB\-p\fP or \fB\-r\fP is supplied without a \fIname\fP +argument, an attempt is made to remove a completion specification for +a \fIname\fP for which no specification exists, or +an error occurs adding a completion specification. +.RE +.TP +\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB\-DEI\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP] +Modify completion options for each \fIname\fP according to the +\fIoption\fPs, or for the +currently-executing completion if no \fIname\fPs are supplied. +If no \fIoption\fPs are given, display the completion options for each +\fIname\fP or the current completion. +The possible values of \fIoption\fP are those valid for the \fBcomplete\fP +builtin described above. +The \fB\-D\fP option indicates that other supplied options should +apply to the ``default'' command completion; that is, completion attempted +on a command for which no completion has previously been defined. +The \fB\-E\fP option indicates that other supplied options should +apply to ``empty'' command completion; that is, completion attempted on a +blank line. +The \fB\-I\fP option indicates that other supplied options should +apply to completion on the initial non-assignment word on the line, +or after a command delimiter such as \fB;\fP or \fB|\fP, which is usually +command name completion. +.sp 1 +The return value is true unless an invalid option is supplied, an attempt +is made to modify the options for a \fIname\fP for which no completion +specification exists, or an output error occurs. +.TP +\fBcontinue\fP [\fIn\fP] +Resume the next iteration of the enclosing +.BR for , +.BR while , +.BR until , +or +.B select +loop. +If +.I n +is specified, resume at the \fIn\fPth enclosing loop. +.I n +must be \(>= 1. If +.I n +is greater than the number of enclosing loops, the last enclosing loop +(the ``top-level'' loop) is resumed. +The return value is 0 unless \fIn\fP is not greater than or equal to 1. +.TP +\fBdeclare\fP [\fB\-aAfFgiIlnrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...] +.PD 0 +.TP +\fBtypeset\fP [\fB\-aAfFgiIlnrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...] +.PD +Declare variables and/or give them attributes. +If no \fIname\fPs are given then display the values of variables. +The +.B \-p +option will display the attributes and values of each +.IR name . +When +.B \-p +is used with \fIname\fP arguments, additional options, +other than \fB\-f\fP and \fB\-F\fP, are ignored. +When +.B \-p +is supplied without \fIname\fP arguments, it will display the attributes +and values of all variables having the attributes specified by the +additional options. +If no other options are supplied with \fB\-p\fP, \fBdeclare\fP will display +the attributes and values of all shell variables. The \fB\-f\fP option +will restrict the display to shell functions. +The +.B \-F +option inhibits the display of function definitions; only the +function name and attributes are printed. +If the \fBextdebug\fP shell option is enabled using \fBshopt\fP, +the source file name and line number where each \fIname\fP +is defined are displayed as well. The +.B \-F +option implies +.BR \-f . +The +.B \-g +option forces variables to be created or modified at the global scope, +even when \fBdeclare\fP is executed in a shell function. +It is ignored in all other cases. +The +.B \-I +option causes local variables to inherit the attributes +(except the \fInameref\fP attribute) +and value of any existing variable with the same +\fIname\fP at a surrounding scope. +If there is no existing variable, the local variable is initially unset. +The following options can +be used to restrict output to variables with the specified attribute or +to give variables attributes: +.RS +.PD 0 +.TP +.B \-a +Each \fIname\fP is an indexed array variable (see +.B Arrays +above). +.TP +.B \-A +Each \fIname\fP is an associative array variable (see +.B Arrays +above). +.TP +.B \-f +Use function names only. +.TP +.B \-i +The variable is treated as an integer; arithmetic evaluation (see +.SM +.B "ARITHMETIC EVALUATION" +above) is performed when the variable is assigned a value. +.TP +.B \-l +When the variable is assigned a value, all upper-case characters are +converted to lower-case. +The upper-case attribute is disabled. +.TP +.B \-n +Give each \fIname\fP the \fInameref\fP attribute, making +it a name reference to another variable. +That other variable is defined by the value of \fIname\fP. +All references, assignments, and attribute modifications +to \fIname\fP, except those using or changing the +\fB\-n\fP attribute itself, are performed on the variable referenced by +\fIname\fP's value. +The nameref attribute cannot be applied to array variables. +.TP +.B \-r +Make \fIname\fPs readonly. These names cannot then be assigned values +by subsequent assignment statements or unset. +.TP +.B \-t +Give each \fIname\fP the \fItrace\fP attribute. +Traced functions inherit the \fBDEBUG\fP and \fBRETURN\fP traps from +the calling shell. +The trace attribute has no special meaning for variables. +.TP +.B \-u +When the variable is assigned a value, all lower-case characters are +converted to upper-case. +The lower-case attribute is disabled. +.TP +.B \-x +Mark \fIname\fPs for export to subsequent commands via the environment. +.PD +.PP +Using `+' instead of `\-' +turns off the attribute instead, +with the exceptions that \fB+a\fP and \fB+A\fP +may not be used to destroy array variables and \fB+r\fP will not +remove the readonly attribute. +When used in a function, +.B declare +and +.B typeset +make each +\fIname\fP local, as with the +.B local +command, +unless the \fB\-g\fP option is supplied. +If a variable name is followed by =\fIvalue\fP, the value of +the variable is set to \fIvalue\fP. +When using \fB\-a\fP or \fB\-A\fP and the compound assignment syntax to +create array variables, additional attributes do not take effect until +subsequent assignments. +The return value is 0 unless an invalid option is encountered, +an attempt is made to define a function using +.if n ``\-f foo=bar'', +.if t \f(CW\-f foo=bar\fP, +an attempt is made to assign a value to a readonly variable, +an attempt is made to assign a value to an array variable without +using the compound assignment syntax (see +.B Arrays +above), one of the \fInames\fP is not a valid shell variable name, +an attempt is made to turn off readonly status for a readonly variable, +an attempt is made to turn off array status for an array variable, +or an attempt is made to display a non-existent function with \fB\-f\fP. +.RE +.TP +.B dirs [\fB\-clpv\fP] [+\fIn\fP] [\-\fIn\fP] +Without options, displays the list of currently remembered directories. +The default display is on a single line with directory names separated +by spaces. +Directories are added to the list with the +.B pushd +command; the +.B popd +command removes entries from the list. +The current directory is always the first directory in the stack. +.RS +.PD 0 +.TP +.B \-c +Clears the directory stack by deleting all of the entries. +.TP +.B \-l +Produces a listing using full pathnames; +the default listing format uses a tilde to denote the home directory. +.TP +.B \-p +Print the directory stack with one entry per line. +.TP +.B \-v +Print the directory stack with one entry per line, +prefixing each entry with its index in the stack. +.TP +\fB+\fP\fIn\fP +Displays the \fIn\fPth entry counting from the left of the list +shown by +.B dirs +when invoked without options, starting with zero. +.TP +\fB\-\fP\fIn\fP +Displays the \fIn\fPth entry counting from the right of the list +shown by +.B dirs +when invoked without options, starting with zero. +.PD +.PP +The return value is 0 unless an +invalid option is supplied or \fIn\fP indexes beyond the end +of the directory stack. +.RE +.TP +\fBdisown\fP [\fB\-ar\fP] [\fB\-h\fP] [\fIjobspec\fP ... | \fIpid\fP ... ] +Without options, remove each +.I jobspec +from the table of active jobs. +If +.I jobspec +is not present, and neither the \fB\-a\fP nor the \fB\-r\fP option +is supplied, the \fIcurrent job\fP is used. +If the \fB\-h\fP option is given, each +.I jobspec +is not removed from the table, but is marked so that +.SM +.B SIGHUP +is not sent to the job if the shell receives a +.SM +.BR SIGHUP . +If no +.I jobspec +is supplied, the +.B \-a +option means to remove or mark all jobs; the +.B \-r +option without a +.I jobspec +argument restricts operation to running jobs. +The return value is 0 unless a +.I jobspec +does not specify a valid job. +.TP +\fBecho\fP [\fB\-neE\fP] [\fIarg\fP ...] +Output the \fIarg\fPs, separated by spaces, followed by a newline. +The return status is 0 unless a write error occurs. +If \fB\-n\fP is specified, the trailing newline is +suppressed. If the \fB\-e\fP option is given, interpretation of +the following backslash-escaped characters is enabled. The +.B \-E +option disables the interpretation of these escape characters, +even on systems where they are interpreted by default. +The \fBxpg_echo\fP shell option may be used to +dynamically determine whether or not \fBecho\fP expands these +escape characters by default. +.B echo +does not interpret \fB\-\-\fP to mean the end of options. +.B echo +interprets the following escape sequences: +.RS +.PD 0 +.TP +.B \ea +alert (bell) +.TP +.B \eb +backspace +.TP +.B \ec +suppress further output +.TP +.B \ee +.TP +.B \eE +an escape character +.TP +.B \ef +form feed +.TP +.B \en +new line +.TP +.B \er +carriage return +.TP +.B \et +horizontal tab +.TP +.B \ev +vertical tab +.TP +.B \e\e +backslash +.TP +.B \e0\fInnn\fP +the eight-bit character whose value is the octal value \fInnn\fP +(zero to three octal digits) +.TP +.B \ex\fIHH\fP +the eight-bit character whose value is the hexadecimal value \fIHH\fP +(one or two hex digits) +.TP +.B \eu\fIHHHH\fP +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +\fIHHHH\fP (one to four hex digits) +.TP +.B \eU\fIHHHHHHHH\fP +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +\fIHHHHHHHH\fP (one to eight hex digits) +.PD +.RE +.TP +\fBenable\fP [\fB\-a\fP] [\fB\-dnps\fP] [\fB\-f\fP \fIfilename\fP] [\fIname\fP ...] +Enable and disable builtin shell commands. +Disabling a builtin allows a disk command which has the same name +as a shell builtin to be executed without specifying a full pathname, +even though the shell normally searches for builtins before disk commands. +If \fB\-n\fP is used, each \fIname\fP +is disabled; otherwise, +\fInames\fP are enabled. For example, to use the +.B test +binary found via the +.SM +.B PATH +instead of the shell builtin version, run +.if t \f(CWenable -n test\fP. +.if n ``enable -n test''. +The +.B \-f +option means to load the new builtin command +.I name +from shared object +.IR filename , +on systems that support dynamic loading. The +.B \-d +option will delete a builtin previously loaded with +.BR \-f . +If no \fIname\fP arguments are given, or if the +.B \-p +option is supplied, a list of shell builtins is printed. +With no other option arguments, the list consists of all enabled +shell builtins. +If \fB\-n\fP is supplied, only disabled builtins are printed. +If \fB\-a\fP is supplied, the list printed includes all builtins, with an +indication of whether or not each is enabled. +If \fB\-s\fP is supplied, the output is restricted to the POSIX +\fIspecial\fP builtins. +The return value is 0 unless a +.I name +is not a shell builtin or there is an error loading a new builtin +from a shared object. +.TP +\fBeval\fP [\fIarg\fP ...] +The \fIarg\fPs are read and concatenated together into a single +command. This command is then read and executed by the shell, and +its exit status is returned as the value of +.BR eval . +If there are no +.IR args , +or only null arguments, +.B eval +returns 0. +.TP +\fBexec\fP [\fB\-cl\fP] [\fB\-a\fP \fIname\fP] [\fIcommand\fP [\fIarguments\fP]] +If +.I command +is specified, it replaces the shell. +No new process is created. The +.I arguments +become the arguments to \fIcommand\fP. +If the +.B \-l +option is supplied, +the shell places a dash at the beginning of the zeroth argument passed to +.IR command . +This is what +.IR login (1) +does. The +.B \-c +option causes +.I command +to be executed with an empty environment. If +.B \-a +is supplied, the shell passes +.I name +as the zeroth argument to the executed command. +If +.I command +cannot be executed for some reason, a non-interactive shell exits, +unless the +.B execfail +shell option +is enabled. In that case, it returns failure. +An interactive shell returns failure if the file cannot be executed. +A subshell exits unconditionally if \fBexec\fP fails. +If +.I command +is not specified, any redirections take effect in the current shell, +and the return status is 0. If there is a redirection error, the +return status is 1. +.TP +\fBexit\fP [\fIn\fP] +Cause the shell to exit +with a status of \fIn\fP. If +.I n +is omitted, the exit status +is that of the last command executed. +A trap on +.SM +.B EXIT +is executed before the shell terminates. +.TP +\fBexport\fP [\fB\-fn\fP\^] [\fIname\fP[=\fIword\fP]] ... +.PD 0 +.TP +.B export \-p +.PD +The supplied +.I names +are marked for automatic export to the environment of +subsequently executed commands. If the +.B \-f +option is given, the +.I names +refer to functions. +If no +.I names +are given, or if the +.B \-p +option is supplied, a list +of names of all exported variables is printed. +The +.B \-n +option causes the export property to be removed from each +\fIname\fP. +If a variable name is followed by =\fIword\fP, the value of +the variable is set to \fIword\fP. +.B export +returns an exit status of 0 unless an invalid option is +encountered, +one of the \fInames\fP is not a valid shell variable name, or +.B \-f +is supplied with a +.I name +that is not a function. +.TP +\fBfc\fP [\fB\-e\fP \fIename\fP] [\fB\-lnr\fP] [\fIfirst\fP] [\fIlast\fP] +.PD 0 +.TP +\fBfc\fP \fB\-s\fP [\fIpat\fP=\fIrep\fP] [\fIcmd\fP] +.PD +The first form selects a range of commands from +.I first +to +.I last +from the history list and displays or edits and re-executes them. +.I First +and +.I last +may be specified as a string (to locate the last command beginning +with that string) or as a number (an index into the history list, +where a negative number is used as an offset from the current +command number). +When listing, a \fIfirst\fP or \fIlast\fP of +0 is equivalent to \-1 and \-0 is equivalent to the current +command (usually the \fBfc\fP command); otherwise 0 is equivalent to \-1 +and \-0 is invalid. +If +.I last +is not specified, it is set to +the current command for listing (so that +.if n ``fc \-l \-10'' +.if t \f(CWfc \-l \-10\fP +prints the last 10 commands) and to +.I first +otherwise. +If +.I first +is not specified, it is set to the previous +command for editing and \-16 for listing. +.sp 1 +The +.B \-n +option suppresses +the command numbers when listing. The +.B \-r +option reverses the order of +the commands. If the +.B \-l +option is given, +the commands are listed on +standard output. Otherwise, the editor given by +.I ename +is invoked +on a file containing those commands. If +.I ename +is not given, the +value of the +.SM +.B FCEDIT +variable is used, and +the value of +.SM +.B EDITOR +if +.SM +.B FCEDIT +is not set. If neither variable is set, +.FN vi +is used. When editing is complete, the edited commands are +echoed and executed. +.sp 1 +In the second form, \fIcommand\fP is re-executed after each instance +of \fIpat\fP is replaced by \fIrep\fP. +\fICommand\fP is interpreted the same as \fIfirst\fP above. +A useful alias to use with this is +.if n ``r="fc -s"'', +.if t \f(CWr='fc \-s'\fP, +so that typing +.if n ``r cc'' +.if t \f(CWr cc\fP +runs the last command beginning with +.if n ``cc'' +.if t \f(CWcc\fP +and typing +.if n ``r'' +.if t \f(CWr\fP +re-executes the last command. +.sp 1 +If the first form is used, the return value is 0 unless an invalid +option is encountered or +.I first +or +.I last +specify history lines out of range. +If the +.B \-e +option is supplied, the return value is the value of the last +command executed or failure if an error occurs with the temporary +file of commands. If the second form is used, the return status +is that of the command re-executed, unless +.I cmd +does not specify a valid history line, in which case +.B fc +returns failure. +.TP +\fBfg\fP [\fIjobspec\fP] +Resume +.I jobspec +in the foreground, and make it the current job. +If +.I jobspec +is not present, the shell's notion of the \fIcurrent job\fP is used. +The return value is that of the command placed into the foreground, +or failure if run when job control is disabled or, when run with +job control enabled, if +.I jobspec +does not specify a valid job or +.I jobspec +specifies a job that was started without job control. +.TP +\fBgetopts\fP \fIoptstring\fP \fIname\fP [\fIarg ...\fP] +.B getopts +is used by shell procedures to parse positional parameters. +.I optstring +contains the option characters to be recognized; if a character +is followed by a colon, the option is expected to have an +argument, which should be separated from it by white space. +The colon and question mark characters may not be used as +option characters. +Each time it is invoked, +.B getopts +places the next option in the shell variable +.IR name , +initializing +.I name +if it does not exist, +and the index of the next argument to be processed into the +variable +.SM +.BR OPTIND . +.SM +.B OPTIND +is initialized to 1 each time the shell or a shell script +is invoked. When an option requires an argument, +.B getopts +places that argument into the variable +.SM +.BR OPTARG . +The shell does not reset +.SM +.B OPTIND +automatically; it must be manually reset between multiple +calls to +.B getopts +within the same shell invocation if a new set of parameters +is to be used. +.sp 1 +When the end of options is encountered, \fBgetopts\fP exits with a +return value greater than zero. +.SM +.B OPTIND +is set to the index of the first non-option argument, +and \fIname\fP is set to ?. +.sp 1 +.B getopts +normally parses the positional parameters, but if more arguments are +supplied as +.I arg +values, +.B getopts +parses those instead. +.sp 1 +.B getopts +can report errors in two ways. If the first character of +.I optstring +is a colon, +.I silent +error reporting is used. In normal operation, diagnostic messages +are printed when invalid options or missing option arguments are +encountered. +If the variable +.SM +.B OPTERR +is set to 0, no error messages will be displayed, even if the first +character of +.I optstring +is not a colon. +.sp 1 +If an invalid option is seen, +.B getopts +places ? into +.I name +and, if not silent, +prints an error message and unsets +.SM +.BR OPTARG . +If +.B getopts +is silent, +the option character found is placed in +.SM +.B OPTARG +and no diagnostic message is printed. +.sp 1 +If a required argument is not found, and +.B getopts +is not silent, +a question mark (\^\fB?\fP\^) is placed in +.IR name , +.SM +.B OPTARG +is unset, and a diagnostic message is printed. +If +.B getopts +is silent, then a colon (\^\fB:\fP\^) is placed in +.I name +and +.SM +.B OPTARG +is set to the option character found. +.sp 1 +.B getopts +returns true if an option, specified or unspecified, is found. +It returns false if the end of options is encountered or an +error occurs. +.TP +\fBhash\fP [\fB\-lr\fP] [\fB\-p\fP \fIfilename\fP] [\fB\-dt\fP] [\fIname\fP] +Each time \fBhash\fP is invoked, +the full pathname of the command +.I name +is determined by searching +the directories in +.B $PATH +and remembered. Any previously-remembered pathname is discarded. +If the +.B \-p +option is supplied, no path search is performed, and +.I filename +is used as the full filename of the command. +The +.B \-r +option causes the shell to forget all +remembered locations. +The +.B \-d +option causes the shell to forget the remembered location of each \fIname\fP. +If the +.B \-t +option is supplied, the full pathname to which each \fIname\fP corresponds +is printed. If multiple \fIname\fP arguments are supplied with \fB\-t\fP, +the \fIname\fP is printed before the hashed full pathname. +The +.B \-l +option causes output to be displayed in a format that may be reused as input. +If no arguments are given, or if only \fB\-l\fP is supplied, +information about remembered commands is printed. +The return status is true unless a +.I name +is not found or an invalid option is supplied. +.TP +\fBhelp\fP [\fB\-dms\fP] [\fIpattern\fP] +Display helpful information about builtin commands. If +.I pattern +is specified, +.B help +gives detailed help on all commands matching +.IR pattern ; +otherwise help for all the builtins and shell control structures +is printed. +.RS +.PD 0 +.TP +.B \-d +Display a short description of each \fIpattern\fP +.TP +.B \-m +Display the description of each \fIpattern\fP in a manpage-like format +.TP +.B \-s +Display only a short usage synopsis for each \fIpattern\fP +.PD +.PP +The return status is 0 unless no command matches +.IR pattern . +.RE +.TP +\fBhistory [\fIn\fP] +.PD 0 +.TP +\fBhistory\fP \fB\-c\fP +.TP +\fBhistory \-d\fP \fIoffset\fP +.TP +\fBhistory \-d\fP \fIstart\fP\-\fIend\fP +.TP +\fBhistory\fP \fB\-anrw\fP [\fIfilename\fP] +.TP +\fBhistory\fP \fB\-p\fP \fIarg\fP [\fIarg ...\fP] +.TP +\fBhistory\fP \fB\-s\fP \fIarg\fP [\fIarg ...\fP] +.PD +With no options, display the command +history list with line numbers. Lines listed +with a +.B * +have been modified. An argument of +.I n +lists only the last +.I n +lines. +If the shell variable +.SM +.B HISTTIMEFORMAT +is set and not null, +it is used as a format string for \fIstrftime\fP(3) to display +the time stamp associated with each displayed history entry. +No intervening blank is printed between the formatted time stamp +and the history line. +If \fIfilename\fP is supplied, it is used as the +name of the history file; if not, the value of +.SM +.B HISTFILE +is used. Options, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-c +Clear the history list by deleting all the entries. +.TP +\fB\-d\fP \fIoffset\fP +Delete the history entry at position \fIoffset\fP. +If \fIoffset\fP is negative, it is interpreted as relative to one greater +than the last history position, so negative indices count back from the +end of the history, and an index of \-1 refers to the current +\fBhistory -d\fP command. +.TP +\fB\-d\fP \fIstart\fP\-\fIend\fP +Delete the history entries between positions \fIstart\fP and \fIend\fP, +inclusive. Positive and negative values for \fIstart\fP and \fIend\fP +are interpreted as described above. +.TP +.B \-a +Append the ``new'' history lines to the history file. +These are history lines entered since the beginning of the current +\fBbash\fP session, but not already appended to the history file. +.TP +.B \-n +Read the history lines not already read from the history +file into the current history list. These are lines +appended to the history file since the beginning of the +current \fBbash\fP session. +.TP +.B \-r +Read the contents of the history file +and append them to the current history list. +.TP +.B \-w +Write the current history list to the history file, overwriting the +history file's contents. +.TP +.B \-p +Perform history substitution on the following \fIargs\fP and display +the result on the standard output. +Does not store the results in the history list. +Each \fIarg\fP must be quoted to disable normal history expansion. +.TP +.B \-s +Store the +.I args +in the history list as a single entry. The last command in the +history list is removed before the +.I args +are added. +.PD +.PP +If the +.SM +.B HISTTIMEFORMAT +variable is set, the time stamp information +associated with each history entry is written to the history file, +marked with the history comment character. +When the history file is read, lines beginning with the history +comment character followed immediately by a digit are interpreted +as timestamps for the following history entry. +The return value is 0 unless an invalid option is encountered, an +error occurs while reading or writing the history file, an invalid +\fIoffset\fP is supplied as an argument to \fB\-d\fP, or the +history expansion supplied as an argument to \fB\-p\fP fails. +.RE +.TP +\fBjobs\fP [\fB\-lnprs\fP] [ \fIjobspec\fP ... ] +.PD 0 +.TP +\fBjobs\fP \fB\-x\fP \fIcommand\fP [ \fIargs\fP ... ] +.PD +The first form lists the active jobs. The options have the following +meanings: +.RS +.PD 0 +.TP +.B \-l +List process IDs +in addition to the normal information. +.TP +.B \-n +Display information only about jobs that have changed status since +the user was last notified of their status. +.TP +.B \-p +List only the process ID of the job's process group +leader. +.TP +.B \-r +Display only running jobs. +.TP +.B \-s +Display only stopped jobs. +.PD +.PP +If +.I jobspec +is given, output is restricted to information about that job. +The return status is 0 unless an invalid option is encountered +or an invalid +.I jobspec +is supplied. +.PP +If the +.B \-x +option is supplied, +.B jobs +replaces any +.I jobspec +found in +.I command +or +.I args +with the corresponding process group ID, and executes +.I command +passing it +.IR args , +returning its exit status. +.RE +.TP +\fBkill\fP [\fB\-s\fP \fIsigspec\fP | \fB\-n\fP \fIsignum\fP | \fB\-\fP\fIsigspec\fP] [\fIpid\fP | \fIjobspec\fP] ... +.PD 0 +.TP +\fBkill\fP \fB\-l\fP|\fB\-L\fP [\fIsigspec\fP | \fIexit_status\fP] +.PD +Send the signal named by +.I sigspec +or +.I signum +to the processes named by +.I pid +or +.IR jobspec . +.I sigspec +is either a case-insensitive signal name such as +.SM +.B SIGKILL +(with or without the +.SM +.B SIG +prefix) or a signal number; +.I signum +is a signal number. +If +.I sigspec +is not present, then +.SM +.B SIGTERM +is assumed. +An argument of +.B \-l +lists the signal names. +If any arguments are supplied when +.B \-l +is given, the names of the signals corresponding to the arguments are +listed, and the return status is 0. +The \fIexit_status\fP argument to +.B \-l +is a number specifying either a signal number or the exit status of +a process terminated by a signal. +The +.B \-L +option is equivalent to \fB\-l\fP. +.B kill +returns true if at least one signal was successfully sent, or false +if an error occurs or an invalid option is encountered. +.TP +\fBlet\fP \fIarg\fP [\fIarg\fP ...] +Each +.I arg +is an arithmetic expression to be evaluated (see +.SM +.B "ARITHMETIC EVALUATION" +above). +If the last +.I arg +evaluates to 0, +.B let +returns 1; 0 is returned otherwise. +.TP +\fBlocal\fP [\fIoption\fP] [\fIname\fP[=\fIvalue\fP] ... | \- ] +For each argument, a local variable named +.I name +is created, and assigned +.IR value . +The \fIoption\fP can be any of the options accepted by \fBdeclare\fP. +When +.B local +is used within a function, it causes the variable +.I name +to have a visible scope restricted to that function and its children. +If \fIname\fP is \-, the set of shell options is made local to the function +in which \fBlocal\fP is invoked: shell options changed using the +\fBset\fP builtin inside the function are restored to their original values +when the function returns. +The restore is effected as if a series of \fBset\fP commands were executed +to restore the values that were in place before the function. +With no operands, +.B local +writes a list of local variables to the standard output. It is +an error to use +.B local +when not within a function. The return status is 0 unless +.B local +is used outside a function, an invalid +.I name +is supplied, or +\fIname\fP is a readonly variable. +.TP +.B logout +Exit a login shell. +.TP +\fBmapfile\fP [\fB\-d\fP \fIdelim\fP] [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcount\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \fIquantum\fP] [\fIarray\fP] +.PD 0 +.TP +\fBreadarray\fP [\fB\-d\fP \fIdelim\fP] [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcount\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \fIquantum\fP] [\fIarray\fP] +.PD +Read lines from the standard input into the indexed array variable +.IR array , +or from file descriptor +.I fd +if the +.B \-u +option is supplied. +The variable +.SM +.B MAPFILE +is the default \fIarray\fP. +Options, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-d +The first character of \fIdelim\fP is used to terminate each input line, +rather than newline. +If \fIdelim\fP is the empty string, \fBmapfile\fP will terminate a line +when it reads a NUL character. +.TP +.B \-n +Copy at most +.I count +lines. If \fIcount\fP is 0, all lines are copied. +.TP +.B \-O +Begin assigning to +.I array +at index +.IR origin . +The default index is 0. +.TP +.B \-s +Discard the first \fIcount\fP lines read. +.TP +.B \-t +Remove a trailing \fIdelim\fP (default newline) from each line read. +.TP +.B \-u +Read lines from file descriptor \fIfd\fP instead of the standard input. +.TP +.B \-C +Evaluate +.I callback +each time \fIquantum\fP lines are read. The \fB\-c\fP option specifies +.IR quantum . +.TP +.B \-c +Specify the number of lines read between each call to +.IR callback . +.PD +.PP +If +.B \-C +is specified without +.BR \-c , +the default quantum is 5000. +When \fIcallback\fP is evaluated, it is supplied the index of the next +array element to be assigned and the line to be assigned to that element +as additional arguments. +\fIcallback\fP is evaluated after the line is read but before the +array element is assigned. +.PP +If not supplied with an explicit origin, \fBmapfile\fP will clear \fIarray\fP +before assigning to it. +.PP +\fBmapfile\fP returns successfully unless an invalid option or option +argument is supplied, \fIarray\fP is invalid or unassignable, or if +\fIarray\fP is not an indexed array. +.RE +.TP +\fBpopd\fP [\-\fBn\fP] [+\fIn\fP] [\-\fIn\fP] +Removes entries from the directory stack. With no arguments, +removes the top directory from the stack, and performs a +.B cd +to the new top directory. +Arguments, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-n +Suppresses the normal change of directory when removing directories +from the stack, so that only the stack is manipulated. +.TP +\fB+\fP\fIn\fP +Removes the \fIn\fPth entry counting from the left of the list +shown by +.BR dirs , +starting with zero. For example: +.if n ``popd +0'' +.if t \f(CWpopd +0\fP +removes the first directory, +.if n ``popd +1'' +.if t \f(CWpopd +1\fP +the second. +.TP +\fB\-\fP\fIn\fP +Removes the \fIn\fPth entry counting from the right of the list +shown by +.BR dirs , +starting with zero. For example: +.if n ``popd -0'' +.if t \f(CWpopd -0\fP +removes the last directory, +.if n ``popd -1'' +.if t \f(CWpopd -1\fP +the next to last. +.PD +.PP +If the +.B popd +command is successful, a +.B dirs +is performed as well, and the return status is 0. +.B popd +returns false if an invalid option is encountered, the directory stack +is empty, a non-existent directory stack entry is specified, or the +directory change fails. +.RE +.TP +\fBprintf\fP [\fB\-v\fP \fIvar\fP] \fIformat\fP [\fIarguments\fP] +Write the formatted \fIarguments\fP to the standard output under the +control of the \fIformat\fP. +The \fB\-v\fP option causes the output to be assigned to the variable +\fIvar\fP rather than being printed to the standard output. +.sp 1 +The \fIformat\fP is a character string which contains three types of objects: +plain characters, which are simply copied to standard output, character +escape sequences, which are converted and copied to the standard output, and +format specifications, each of which causes printing of the next successive +\fIargument\fP. +In addition to the standard \fIprintf\fP(1) format specifications, +\fBprintf\fP interprets the following extensions: +.RS +.PD 0 +.TP +.B %b +causes +\fBprintf\fP to expand backslash escape sequences in the corresponding +\fIargument\fP +in the same way as \fBecho \-e\fP. +.TP +.B %q +causes \fBprintf\fP to output the corresponding +\fIargument\fP in a format that can be reused as shell input. +.TP +.B %(\fIdatefmt\fP)T +causes \fBprintf\fP to output the date-time string resulting from using +\fIdatefmt\fP as a format string for \fIstrftime\fP(3). +The corresponding \fIargument\fP is an integer representing the number of +seconds since the epoch. +Two special argument values may be used: \-1 represents the current +time, and \-2 represents the time the shell was invoked. +If no argument is specified, conversion behaves as if \-1 had been given. +This is an exception to the usual \fBprintf\fP behavior. +.PD +.PP +The %b, %q, and %T directives all use the field width and precision +arguments from the format specification and write that many bytes from +(or use that wide a field for) the expanded argument, which usually +contains more characters than the original. +.PP +Arguments to non-string format specifiers are treated as C constants, +except that a leading plus or minus sign is allowed, and if the leading +character is a single or double quote, the value is the ASCII value of +the following character. +.PP +The \fIformat\fP is reused as necessary to consume all of the \fIarguments\fP. +If the \fIformat\fP requires more \fIarguments\fP than are supplied, the +extra format specifications behave as if a zero value or null string, as +appropriate, had been supplied. +The return value is zero on success, non-zero on failure. +.RE +.TP +\fBpushd\fP [\fB\-n\fP] [+\fIn\fP] [\-\fIn\fP] +.PD 0 +.TP +\fBpushd\fP [\fB\-n\fP] [\fIdir\fP] +.PD +Adds a directory to the top of the directory stack, or rotates +the stack, making the new top of the stack the current working +directory. With no arguments, \fBpushd\fP exchanges the top two directories +and returns 0, unless the directory stack is empty. +Arguments, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-n +Suppresses the normal change of directory when rotating or +adding directories to the stack, so that only the stack is manipulated. +.TP +\fB+\fP\fIn\fP +Rotates the stack so that the \fIn\fPth directory +(counting from the left of the list shown by +.BR dirs , +starting with zero) +is at the top. +.TP +\fB\-\fP\fIn\fP +Rotates the stack so that the \fIn\fPth directory +(counting from the right of the list shown by +.BR dirs , +starting with zero) is at the top. +.TP +.I dir +Adds +.I dir +to the directory stack at the top, making it the +new current working directory as if it had been supplied as the argument +to the \fBcd\fP builtin. +.PD +.PP +If the +.B pushd +command is successful, a +.B dirs +is performed as well. +If the first form is used, +.B pushd +returns 0 unless the cd to +.I dir +fails. With the second form, +.B pushd +returns 0 unless the directory stack is empty, +a non-existent directory stack element is specified, +or the directory change to the specified new current directory +fails. +.RE +.TP +\fBpwd\fP [\fB\-LP\fP] +Print the absolute pathname of the current working directory. +The pathname printed contains no symbolic links if the +.B \-P +option is supplied or the +.B \-o physical +option to the +.B set +builtin command is enabled. +If the +.B \-L +option is used, the pathname printed may contain symbolic links. +The return status is 0 unless an error occurs while +reading the name of the current directory or an +invalid option is supplied. +.TP +\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-N\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...] +One line is read from the standard input, or from the file descriptor +\fIfd\fP supplied as an argument to the \fB\-u\fP option, +split into words as described above under \fBWord Splitting\fP, +and the first word +is assigned to the first +.IR name , +the second word to the second +.IR name , +and so on. +If there are more words than names, the remaining words and their +intervening delimiters are assigned to the last +.IR name . +If there are fewer words read from the input stream than names, +the remaining names are assigned empty values. +The characters in +.SM +.B IFS +are used to split the line into words using the same rules the shell +uses for expansion (described above under \fBWord Splitting\fP). +The backslash character (\fB\e\fP) may be used to remove any special +meaning for the next character read and for line continuation. +Options, if supplied, have the following meanings: +.RS +.PD 0 +.TP +.B \-a \fIaname\fP +The words are assigned to sequential indices +of the array variable +.IR aname , +starting at 0. +.I aname +is unset before any new values are assigned. +Other \fIname\fP arguments are ignored. +.TP +.B \-d \fIdelim\fP +The first character of \fIdelim\fP is used to terminate the input line, +rather than newline. +If \fIdelim\fP is the empty string, \fBread\fP will terminate a line +when it reads a NUL character. +.TP +.B \-e +If the standard input +is coming from a terminal, +.B readline +(see +.SM +.B READLINE +above) is used to obtain the line. +Readline uses the current (or default, if line editing was not previously +active) editing settings, but uses Readline's default filename completion. +.TP +.B \-i \fItext\fP +If +.B readline +is being used to read the line, \fItext\fP is placed into the editing +buffer before editing begins. +.TP +.B \-n \fInchars\fP +\fBread\fP returns after reading \fInchars\fP characters rather than +waiting for a complete line of input, but honors a delimiter if fewer +than \fInchars\fP characters are read before the delimiter. +.TP +.B \-N \fInchars\fP +\fBread\fP returns after reading exactly \fInchars\fP characters rather +than waiting for a complete line of input, unless EOF is encountered or +\fBread\fP times out. +Delimiter characters encountered in the input are +not treated specially and do not cause \fBread\fP to return until +\fInchars\fP characters are read. +The result is not split on the characters in \fBIFS\fP; the intent is +that the variable is assigned exactly the characters read +(with the exception of backslash; see the \fB\-r\fP option below). +.TP +.B \-p \fIprompt\fP +Display \fIprompt\fP on standard error, without a +trailing newline, before attempting to read any input. The prompt +is displayed only if input is coming from a terminal. +.TP +.B \-r +Backslash does not act as an escape character. +The backslash is considered to be part of the line. +In particular, a backslash-newline pair may not then be used as a line +continuation. +.TP +.B \-s +Silent mode. If input is coming from a terminal, characters are +not echoed. +.TP +.B \-t \fItimeout\fP +Cause \fBread\fP to time out and return failure if a complete line of +input (or a specified number of characters) +is not read within \fItimeout\fP seconds. +\fItimeout\fP may be a decimal number with a fractional portion following +the decimal point. +This option is only effective if \fBread\fP is reading input from a +terminal, pipe, or other special file; it has no effect when reading +from regular files. +If \fBread\fP times out, \fBread\fP saves any partial input read into +the specified variable \fIname\fP. +If \fItimeout\fP is 0, \fBread\fP returns immediately, without trying to +read any data. The exit status is 0 if input is available on +the specified file descriptor, non-zero otherwise. +The exit status is greater than 128 if the timeout is exceeded. +.TP +.B \-u \fIfd\fP +Read input from file descriptor \fIfd\fP. +.PD +.PP +If no +.I names +are supplied, the line read, +without the ending delimiter but otherwise unmodified, +is assigned to the variable +.SM +.BR REPLY . +The exit status is zero, unless end-of-file is encountered, \fBread\fP +times out (in which case the status is greater than 128), +a variable assignment error (such as assigning to a readonly variable) occurs, +or an invalid file descriptor is supplied as the argument to \fB\-u\fP. +.RE +.TP +\fBreadonly\fP [\fB\-aAf\fP] [\fB\-p\fP] [\fIname\fP[=\fIword\fP] ...] +.PD +The given +\fInames\fP are marked readonly; the values of these +.I names +may not be changed by subsequent assignment. +If the +.B \-f +option is supplied, the functions corresponding to the +\fInames\fP are so +marked. +The +.B \-a +option restricts the variables to indexed arrays; the +.B \-A +option restricts the variables to associative arrays. +If both options are supplied, +.B \-A +takes precedence. +If no +.I name +arguments are given, or if the +.B \-p +option is supplied, a list of all readonly names is printed. +The other options may be used to restrict the output to a subset of +the set of readonly names. +The +.B \-p +option causes output to be displayed in a format that +may be reused as input. +If a variable name is followed by =\fIword\fP, the value of +the variable is set to \fIword\fP. +The return status is 0 unless an invalid option is encountered, +one of the +.I names +is not a valid shell variable name, or +.B \-f +is supplied with a +.I name +that is not a function. +.TP +\fBreturn\fP [\fIn\fP] +Causes a function to stop executing and return the value specified by +.I n +to its caller. +If +.I n +is omitted, the return status is that of the last command +executed in the function body. +If \fBreturn\fP is executed by a trap handler, the last command used to +determine the status is the last command executed before the trap handler. +If \fBreturn\fP is executed during a \fBDEBUG\fP trap, the last command +used to determine the status is the last command executed by the trap +handler before \fBreturn\fP was invoked. +If +.B return +is used outside a function, +but during execution of a script by the +.B . +(\fBsource\fP) command, it causes the shell to stop executing +that script and return either +.I n +or the exit status of the last command executed within the +script as the exit status of the script. +If \fIn\fP is supplied, the return value is its least significant +8 bits. +The return status is non-zero if +.B return +is supplied a non-numeric argument, or +is used outside a +function and not during execution of a script by \fB.\fP\^ or \fBsource\fP. +Any command associated with the \fBRETURN\fP trap is executed +before execution resumes after the function or script. +.TP +\fBset\fP [\fB\-\-abefhkmnptuvxBCEHPT\fP] [\fB\-o\fP \fIoption\-name\fP] [\fIarg\fP ...] +.PD 0 +.TP +\fBset\fP [\fB+abefhkmnptuvxBCEHPT\fP] [\fB+o\fP \fIoption\-name\fP] [\fIarg\fP ...] +.PD +Without options, the name and value of each shell variable are displayed +in a format that can be reused as input +for setting or resetting the currently-set variables. +Read-only variables cannot be reset. +In \fIposix mode\fP, only shell variables are listed. +The output is sorted according to the current locale. +When options are specified, they set or unset shell attributes. +Any arguments remaining after option processing are treated +as values for the positional parameters and are assigned, in order, to +.BR $1 , +.BR $2 , +.B ... +.BR $\fIn\fP . +Options, if specified, have the following meanings: +.RS +.PD 0 +.TP 8 +.B \-a +Each variable or function that is created or modified is given the +export attribute and marked for export to the environment of +subsequent commands. +.TP 8 +.B \-b +Report the status of terminated background jobs +immediately, rather than before the next primary prompt. This is +effective only when job control is enabled. +.TP 8 +.B \-e +Exit immediately if a +\fIpipeline\fP (which may consist of a single \fIsimple command\fP), +a \fIlist\fP, +or a \fIcompound command\fP +(see +.SM +.B SHELL GRAMMAR +above), exits with a non-zero status. +The shell does not exit if the +command that fails is part of the command list immediately following a +.B while +or +.B until +keyword, +part of the test following the +.B if +or +.B elif +reserved words, part of any command executed in a +.B && +or +.B || +list except the command following the final \fB&&\fP or \fB||\fP, +any command in a pipeline but the last, +or if the command's return value is +being inverted with +.BR ! . +If a compound command other than a subshell +returns a non-zero status because a command failed +while \fB\-e\fP was being ignored, the shell does not exit. +A trap on \fBERR\fP, if set, is executed before the shell exits. +This option applies to the shell environment and each subshell environment +separately (see +.SM +.B "COMMAND EXECUTION ENVIRONMENT" +above), and may cause +subshells to exit before executing all the commands in the subshell. +.if t .sp 0.5 +.if n .sp 1 +If a compound command or shell function executes in a context +where \fB\-e\fP is being ignored, +none of the commands executed within the compound command or function body +will be affected by the \fB\-e\fP setting, even if \fB\-e\fP is set +and a command returns a failure status. +If a compound command or shell function sets \fB\-e\fP while executing in +a context where \fB\-e\fP is ignored, that setting will not have any +effect until the compound command or the command containing the function +call completes. +.TP 8 +.B \-f +Disable pathname expansion. +.TP 8 +.B \-h +Remember the location of commands as they are looked up for execution. +This is enabled by default. +.TP 8 +.B \-k +All arguments in the form of assignment statements +are placed in the environment for a command, not just +those that precede the command name. +.TP 8 +.B \-m +Monitor mode. Job control is enabled. This option is on +by default for interactive shells on systems that support +it (see +.SM +.B JOB CONTROL +above). +All processes run in a separate process group. +When a background job completes, the shell prints a line +containing its exit status. +.TP 8 +.B \-n +Read commands but do not execute them. +This may be used to check a shell script for syntax errors. +This is ignored by interactive shells. +.TP 8 +.B \-o \fIoption\-name\fP +The \fIoption\-name\fP can be one of the following: +.RS +.TP 8 +.B allexport +Same as +.BR \-a . +.TP 8 +.B braceexpand +Same as +.BR \-B . +.TP 8 +.B emacs +Use an emacs-style command line editing interface. This is enabled +by default when the shell is interactive, unless the shell is started +with the +.B \-\-noediting +option. +This also affects the editing interface used for \fBread \-e\fP. +.TP 8 +.B errexit +Same as +.BR \-e . +.TP 8 +.B errtrace +Same as +.BR \-E . +.TP 8 +.B functrace +Same as +.BR \-T . +.TP 8 +.B hashall +Same as +.BR \-h . +.TP 8 +.B histexpand +Same as +.BR \-H . +.TP 8 +.B history +Enable command history, as described above under +.SM +.BR HISTORY . +This option is on by default in interactive shells. +.TP 8 +.B ignoreeof +The effect is as if the shell command +.if t \f(CWIGNOREEOF=10\fP +.if n ``IGNOREEOF=10'' +had been executed +(see +.B Shell Variables +above). +.TP 8 +.B keyword +Same as +.BR \-k . +.TP 8 +.B monitor +Same as +.BR \-m . +.TP 8 +.B noclobber +Same as +.BR \-C . +.TP 8 +.B noexec +Same as +.BR \-n . +.TP 8 +.B noglob +Same as +.BR \-f . +.TP 8 +.B nolog +Currently ignored. +.TP 8 +.B notify +Same as +.BR \-b . +.TP 8 +.B nounset +Same as +.BR \-u . +.TP 8 +.B onecmd +Same as +.BR \-t . +.TP 8 +.B physical +Same as +.BR \-P . +.TP 8 +.B pipefail +If set, the return value of a pipeline is the value of the last +(rightmost) command to exit with a non-zero status, or zero if all +commands in the pipeline exit successfully. +This option is disabled by default. +.TP 8 +.B posix +Change the behavior of +.B bash +where the default operation differs +from the POSIX standard to match the standard (\fIposix mode\fP). +See +.SM +.B "SEE ALSO" +below for a reference to a document that details how posix mode affects +bash's behavior. +.TP 8 +.B privileged +Same as +.BR \-p . +.TP 8 +.B verbose +Same as +.BR \-v . +.TP 8 +.B vi +Use a vi-style command line editing interface. +This also affects the editing interface used for \fBread \-e\fP. +.TP 8 +.B xtrace +Same as +.BR \-x . +.sp .5 +.PP +If +.B \-o +is supplied with no \fIoption\-name\fP, the values of the current options are +printed. +If +.B +o +is supplied with no \fIoption\-name\fP, a series of +.B set +commands to recreate the current option settings is displayed on +the standard output. +.RE +.TP 8 +.B \-p +Turn on +.I privileged +mode. In this mode, the +.SM +.B $ENV +and +.SM +.B $BASH_ENV +files are not processed, shell functions are not inherited from the +environment, and the +.SM +.BR SHELLOPTS , +.SM +.BR BASHOPTS , +.SM +.BR CDPATH , +and +.SM +.B GLOBIGNORE +variables, if they appear in the environment, are ignored. +If the shell is started with the effective user (group) id not equal to the +real user (group) id, and the \fB\-p\fP option is not supplied, these actions +are taken and the effective user id is set to the real user id. +If the \fB\-p\fP option is supplied at startup, the effective user id is +not reset. +Turning this option off causes the effective user +and group ids to be set to the real user and group ids. +.TP 8 +.B \-t +Exit after reading and executing one command. +.TP 8 +.B \-u +Treat unset variables and parameters other than the special +parameters "@" and "*" as an error when performing +parameter expansion. If expansion is attempted on an +unset variable or parameter, the shell prints an error message, and, +if not interactive, exits with a non-zero status. +.TP 8 +.B \-v +Print shell input lines as they are read. +.TP 8 +.B \-x +After expanding each \fIsimple command\fP, +\fBfor\fP command, \fBcase\fP command, \fBselect\fP command, or +arithmetic \fBfor\fP command, display the expanded value of +.SM +.BR PS4 , +followed by the command and its expanded arguments +or associated word list. +.TP 8 +.B \-B +The shell performs brace expansion (see +.B Brace Expansion +above). This is on by default. +.TP 8 +.B \-C +If set, +.B bash +does not overwrite an existing file with the +.BR > , +.BR >& , +and +.B <> +redirection operators. This may be overridden when +creating output files by using the redirection operator +.B >| +instead of +.BR > . +.TP 8 +.B \-E +If set, any trap on \fBERR\fP is inherited by shell functions, command +substitutions, and commands executed in a subshell environment. +The \fBERR\fP trap is normally not inherited in such cases. +.TP 8 +.B \-H +Enable +.B ! +style history substitution. This option is on by +default when the shell is interactive. +.TP 8 +.B \-P +If set, the shell does not resolve symbolic links when executing +commands such as +.B cd +that change the current working directory. It uses the +physical directory structure instead. By default, +.B bash +follows the logical chain of directories when performing commands +which change the current directory. +.TP 8 +.B \-T +If set, any traps on \fBDEBUG\fP and \fBRETURN\fP are inherited by shell +functions, command substitutions, and commands executed in a +subshell environment. +The \fBDEBUG\fP and \fBRETURN\fP traps are normally not inherited +in such cases. +.TP 8 +.B \-\- +If no arguments follow this option, then the positional parameters are +unset. Otherwise, the positional parameters are set to the +\fIarg\fPs, even if some of them begin with a +.BR \- . +.TP 8 +.B \- +Signal the end of options, cause all remaining \fIarg\fPs to be +assigned to the positional parameters. The +.B \-x +and +.B \-v +options are turned off. +If there are no \fIarg\fPs, +the positional parameters remain unchanged. +.PD +.PP +The options are off by default unless otherwise noted. +Using + rather than \- causes these options to be turned off. +The options can also be specified as arguments to an invocation of +the shell. +The current set of options may be found in +.BR $\- . +The return status is always true unless an invalid option is encountered. +.RE +.TP +\fBshift\fP [\fIn\fP] +The positional parameters from \fIn\fP+1 ... are renamed to +.B $1 +.B .... +Parameters represented by the numbers \fB$#\fP +down to \fB$#\fP\-\fIn\fP+1 are unset. +.I n +must be a non-negative number less than or equal to \fB$#\fP. +If +.I n +is 0, no parameters are changed. +If +.I n +is not given, it is assumed to be 1. +If +.I n +is greater than \fB$#\fP, the positional parameters are not changed. +The return status is greater than zero if +.I n +is greater than +.B $# +or less than zero; otherwise 0. +.TP +\fBshopt\fP [\fB\-pqsu\fP] [\fB\-o\fP] [\fIoptname\fP ...] +Toggle the values of settings controlling optional shell behavior. +The settings can be either those listed below, or, if the +.B \-o +option is used, those available with the +.B \-o +option to the \fBset\fP builtin command. +With no options, or with the +.B \-p +option, a list of all settable options is displayed, with +an indication of whether or not each is set; +if \fIoptnames\fP are supplied, the output is restricted to those options. +The \fB\-p\fP option causes output to be displayed in a form that +may be reused as input. +Other options have the following meanings: +.RS +.PD 0 +.TP +.B \-s +Enable (set) each \fIoptname\fP. +.TP +.B \-u +Disable (unset) each \fIoptname\fP. +.TP +.B \-q +Suppresses normal output (quiet mode); the return status indicates +whether the \fIoptname\fP is set or unset. +If multiple \fIoptname\fP arguments are given with +.BR \-q , +the return status is zero if all \fIoptnames\fP are enabled; non-zero +otherwise. +.TP +.B \-o +Restricts the values of \fIoptname\fP to be those defined for the +.B \-o +option to the +.B set +builtin. +.PD +.PP +If either +.B \-s +or +.B \-u +is used with no \fIoptname\fP arguments, +.B shopt +shows only those options which are set or unset, respectively. +Unless otherwise noted, the \fBshopt\fP options are disabled (unset) +by default. +.PP +The return status when listing options is zero if all \fIoptnames\fP +are enabled, non-zero otherwise. When setting or unsetting options, +the return status is zero unless an \fIoptname\fP is not a valid shell +option. +.PP +The list of \fBshopt\fP options is: +.if t .sp .5v +.if n .sp 1v +.PD 0 +.TP 8 +.B assoc_expand_once +If set, the shell suppresses multiple evaluation of associative array +subscripts during arithmetic expression evaluation, while executing +builtins that can perform variable assignments, +and while executing builtins that perform array dereferencing. +.TP 8 +.B autocd +If set, a command name that is the name of a directory is executed as if +it were the argument to the \fBcd\fP command. +This option is only used by interactive shells. +.TP 8 +.B cdable_vars +If set, an argument to the +.B cd +builtin command that +is not a directory is assumed to be the name of a variable whose +value is the directory to change to. +.TP 8 +.B cdspell +If set, minor errors in the spelling of a directory component in a +.B cd +command will be corrected. +The errors checked for are transposed characters, +a missing character, and one character too many. +If a correction is found, the corrected filename is printed, +and the command proceeds. +This option is only used by interactive shells. +.TP 8 +.B checkhash +If set, \fBbash\fP checks that a command found in the hash +table exists before trying to execute it. If a hashed command no +longer exists, a normal path search is performed. +.TP 8 +.B checkjobs +If set, \fBbash\fP lists the status of any stopped and running jobs before +exiting an interactive shell. If any jobs are running, this causes +the exit to be deferred until a second exit is attempted without an +intervening command (see +.SM +.B "JOB CONTROL" +above). The shell always +postpones exiting if any jobs are stopped. +.TP 8 +.B checkwinsize +If set, \fBbash\fP checks the window size after each external (non-builtin) +command and, if necessary, updates the values of +.SM +.B LINES +and +.SM +.BR COLUMNS . +This option is enabled by default. +.TP 8 +.B cmdhist +If set, +.B bash +attempts to save all lines of a multiple-line +command in the same history entry. This allows +easy re-editing of multi-line commands. +This option is enabled by default, but only has an effect if command +history is enabled, as described above under +.SM +.BR HISTORY . +.PD 0 +.TP 8 +.B compat31 +.TP 8 +.B compat32 +.TP 8 +.B compat40 +.TP 8 +.B compat41 +.TP 8 +.B compat42 +.TP 8 +.B compat43 +.TP 8 +.B compat44 +.PD +These control aspects of the shell's compatibility mode +(see +.SM +.B "SHELL COMPATIBILITY MODE" +below). +.TP 8 +.B complete_fullquote +If set, +.B bash +quotes all shell metacharacters in filenames and directory names when +performing completion. +If not set, +.B bash +removes metacharacters such as the dollar sign from the set of +characters that will be quoted in completed filenames +when these metacharacters appear in shell variable references in words to be +completed. +This means that dollar signs in variable names that expand to directories +will not be quoted; +however, any dollar signs appearing in filenames will not be quoted, either. +This is active only when bash is using backslashes to quote completed +filenames. +This variable is set by default, which is the default bash behavior in +versions through 4.2. +.TP 8 +.B direxpand +If set, +.B bash +replaces directory names with the results of word expansion when performing +filename completion. This changes the contents of the readline editing +buffer. +If not set, +.B bash +attempts to preserve what the user typed. +.TP 8 +.B dirspell +If set, +.B bash +attempts spelling correction on directory names during word completion +if the directory name initially supplied does not exist. +.TP 8 +.B dotglob +If set, +.B bash +includes filenames beginning with a `.' in the results of pathname +expansion. +The filenames +.B ``.'' +and +.B ``..'' +must always be matched explicitly, even if +.B dotglob +is set. +.TP 8 +.B execfail +If set, a non-interactive shell will not exit if +it cannot execute the file specified as an argument to the +.B exec +builtin command. An interactive shell does not exit if +.B exec +fails. +.TP 8 +.B expand_aliases +If set, aliases are expanded as described above under +.SM +.BR ALIASES . +This option is enabled by default for interactive shells. +.TP 8 +.B extdebug +If set at shell invocation, +or in a shell startup file, +arrange to execute the debugger profile +before the shell starts, identical to the \fB\-\-debugger\fP option. +If set after invocation, behavior intended for use by debuggers is enabled: +.RS +.TP +.B 1. +The \fB\-F\fP option to the \fBdeclare\fP builtin displays the source +file name and line number corresponding to each function name supplied +as an argument. +.TP +.B 2. +If the command run by the \fBDEBUG\fP trap returns a non-zero value, the +next command is skipped and not executed. +.TP +.B 3. +If the command run by the \fBDEBUG\fP trap returns a value of 2, and the +shell is executing in a subroutine (a shell function or a shell script +executed by the \fB.\fP or \fBsource\fP builtins), the shell simulates +a call to \fBreturn\fP. +.TP +.B 4. +.SM +.B BASH_ARGC +and +.SM +.B BASH_ARGV +are updated as described in their descriptions above. +.TP +.B 5. +Function tracing is enabled: command substitution, shell functions, and +subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the +\fBDEBUG\fP and \fBRETURN\fP traps. +.TP +.B 6. +Error tracing is enabled: command substitution, shell functions, and +subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the +\fBERR\fP trap. +.RE +.TP 8 +.B extglob +If set, the extended pattern matching features described above under +\fBPathname Expansion\fP are enabled. +.TP 8 +.B extquote +If set, \fB$\fP\(aq\fIstring\fP\(aq and \fB$\fP"\fIstring\fP" quoting is +performed within \fB${\fP\fIparameter\fP\fB}\fP expansions +enclosed in double quotes. This option is enabled by default. +.TP 8 +.B failglob +If set, patterns which fail to match filenames during pathname expansion +result in an expansion error. +.TP 8 +.B force_fignore +If set, the suffixes specified by the +.SM +.B FIGNORE +shell variable +cause words to be ignored when performing word completion even if +the ignored words are the only possible completions. +See +.SM +\fBSHELL VARIABLES\fP +above for a description of +.SM +.BR FIGNORE . +This option is enabled by default. +.TP 8 +.B globasciiranges +If set, range expressions used in pattern matching bracket expressions (see +.SM +.B Pattern Matching +above) behave as if in the traditional C locale when performing +comparisons. That is, the current locale's collating sequence +is not taken into account, so +.B b +will not collate between +.B A +and +.BR B , +and upper-case and lower-case ASCII characters will collate together. +.TP 8 +.B globstar +If set, the pattern \fB**\fP used in a pathname expansion context will +match all files and zero or more directories and subdirectories. +If the pattern is followed by a \fB/\fP, only directories and +subdirectories match. +.TP 8 +.B gnu_errfmt +If set, shell error messages are written in the standard GNU error +message format. +.TP 8 +.B histappend +If set, the history list is appended to the file named by the value +of the +.SM +.B HISTFILE +variable when the shell exits, rather than overwriting the file. +.TP 8 +.B histreedit +If set, and +.B readline +is being used, a user is given the opportunity to re-edit a +failed history substitution. +.TP 8 +.B histverify +If set, and +.B readline +is being used, the results of history substitution are not immediately +passed to the shell parser. Instead, the resulting line is loaded into +the \fBreadline\fP editing buffer, allowing further modification. +.TP 8 +.B hostcomplete +If set, and +.B readline +is being used, \fBbash\fP will attempt to perform hostname completion when a +word containing a \fB@\fP is being completed (see +.B Completing +under +.SM +.B READLINE +above). +This is enabled by default. +.TP 8 +.B huponexit +If set, \fBbash\fP will send +.SM +.B SIGHUP +to all jobs when an interactive login shell exits. +.TP 8 +.B inherit_errexit +If set, command substitution inherits the value of the \fBerrexit\fP option, +instead of unsetting it in the subshell environment. +This option is enabled when \fIposix mode\fP is enabled. +.TP 8 +.B interactive_comments +If set, allow a word beginning with +.B # +to cause that word and all remaining characters on that +line to be ignored in an interactive shell (see +.SM +.B COMMENTS +above). This option is enabled by default. +.TP 8 +.B lastpipe +If set, and job control is not active, the shell runs the last command of +a pipeline not executed in the background in the current shell environment. +.TP 8 +.B lithist +If set, and the +.B cmdhist +option is enabled, multi-line commands are saved to the history with +embedded newlines rather than using semicolon separators where possible. +.TP 8 +.B localvar_inherit +If set, local variables inherit the value and attributes of a variable of +the same name that exists at a previous scope before any new value is +assigned. The nameref attribute is not inherited. +.TP 8 +.B localvar_unset +If set, calling \fBunset\fP on local variables in previous function scopes +marks them so subsequent lookups find them unset until that function +returns. This is identical to the behavior of unsetting local variables +at the current function scope. +.TP 8 +.B login_shell +The shell sets this option if it is started as a login shell (see +.SM +.B "INVOCATION" +above). +The value may not be changed. +.TP 8 +.B mailwarn +If set, and a file that \fBbash\fP is checking for mail has been +accessed since the last time it was checked, the message ``The mail in +\fImailfile\fP has been read'' is displayed. +.TP 8 +.B no_empty_cmd_completion +If set, and +.B readline +is being used, +.B bash +will not attempt to search the +.SM +.B PATH +for possible completions when +completion is attempted on an empty line. +.TP 8 +.B nocaseglob +If set, +.B bash +matches filenames in a case\-insensitive fashion when performing pathname +expansion (see +.B Pathname Expansion +above). +.TP 8 +.B nocasematch +If set, +.B bash +matches patterns in a case\-insensitive fashion when performing matching +while executing \fBcase\fP or \fB[[\fP conditional commands, +when performing pattern substitution word expansions, +or when filtering possible completions as part of programmable completion. +.TP 8 +.B nullglob +If set, +.B bash +allows patterns which match no +files (see +.B Pathname Expansion +above) +to expand to a null string, rather than themselves. +.TP 8 +.B progcomp +If set, the programmable completion facilities (see +\fBProgrammable Completion\fP above) are enabled. +This option is enabled by default. +.TP 8 +.B progcomp_alias +If set, and programmable completion is enabled, \fBbash\fP treats a command +name that doesn't have any completions as a possible alias and attempts +alias expansion. If it has an alias, \fBbash\fP attempts programmable +completion using the command word resulting from the expanded alias. +.TP 8 +.B promptvars +If set, prompt strings undergo +parameter expansion, command substitution, arithmetic +expansion, and quote removal after being expanded as described in +.SM +.B PROMPTING +above. This option is enabled by default. +.TP 8 +.B restricted_shell +The shell sets this option if it is started in restricted mode (see +.SM +.B "RESTRICTED SHELL" +below). +The value may not be changed. +This is not reset when the startup files are executed, allowing +the startup files to discover whether or not a shell is restricted. +.TP 8 +.B shift_verbose +If set, the +.B shift +builtin prints an error message when the shift count exceeds the +number of positional parameters. +.TP 8 +.B sourcepath +If set, the +\fBsource\fP (\fB.\fP) builtin uses the value of +.SM +.B PATH +to find the directory containing the file supplied as an argument. +This option is enabled by default. +.TP 8 +.B xpg_echo +If set, the \fBecho\fP builtin expands backslash-escape sequences +by default. +.RE +.PD +.TP +\fBsuspend\fP [\fB\-f\fP] +Suspend the execution of this shell until it receives a +.SM +.B SIGCONT +signal. A login shell cannot be suspended; the +.B \-f +option can be used to override this and force the suspension. +The return status is 0 unless the shell is a login shell and +.B \-f +is not supplied, or if job control is not enabled. +.TP +\fBtest\fP \fIexpr\fP +.PD 0 +.TP +\fB[\fP \fIexpr\fP \fB]\fP +Return a status of 0 (true) or 1 (false) depending on +the evaluation of the conditional expression +.IR expr . +Each operator and operand must be a separate argument. +.if \n(zZ=0 Expressions are composed of the primaries described above under +.if \n(zZ=1 Expressions are composed of the primaries described in the \fBbash\fP manual page under +.SM +.BR "CONDITIONAL EXPRESSIONS" . +\fBtest\fP does not accept any options, nor does it accept and ignore +an argument of \fB\-\-\fP as signifying the end of options. +.if t .sp 0.5 +.if n .sp 1 +Expressions may be combined using the following operators, listed +in decreasing order of precedence. +The evaluation depends on the number of arguments; see below. +Operator precedence is used when there are five or more arguments. +.RS +.PD 0 +.TP +.B ! \fIexpr\fP +True if +.I expr +is false. +.TP +.B ( \fIexpr\fP ) +Returns the value of \fIexpr\fP. +This may be used to override the normal precedence of operators. +.TP +\fIexpr1\fP \-\fBa\fP \fIexpr2\fP +True if both +.I expr1 +and +.I expr2 +are true. +.TP +\fIexpr1\fP \-\fBo\fP \fIexpr2\fP +True if either +.I expr1 +or +.I expr2 +is true. +.PD +.PP +\fBtest\fP and \fB[\fP evaluate conditional +expressions using a set of rules based on the number of arguments. +.if t .sp 0.5 +.if n .sp 1 +.PD 0 +.TP +0 arguments +The expression is false. +.TP +1 argument +The expression is true if and only if the argument is not null. +.TP +2 arguments +If the first argument is \fB!\fP, the expression is true if and +only if the second argument is null. +If the first argument is one of the unary conditional operators listed above +under +.SM +.BR "CONDITIONAL EXPRESSIONS" , +the expression is true if the unary test is true. +If the first argument is not a valid unary conditional operator, the expression +is false. +.TP +3 arguments +The following conditions are applied in the order listed. +If the second argument is one of the binary conditional operators listed above +under +.SM +.BR "CONDITIONAL EXPRESSIONS" , +the result of the expression is the result of the binary test using +the first and third arguments as operands. +The \fB\-a\fP and \fB\-o\fP operators are considered binary operators +when there are three arguments. +If the first argument is \fB!\fP, the value is the negation of +the two-argument test using the second and third arguments. +If the first argument is exactly \fB(\fP and the third argument is +exactly \fB)\fP, the result is the one-argument test of the second +argument. +Otherwise, the expression is false. +.TP +4 arguments +If the first argument is \fB!\fP, the result is the negation of +the three-argument expression composed of the remaining arguments. +Otherwise, the expression is parsed and evaluated according to +precedence using the rules listed above. +.TP +5 or more arguments +The expression is parsed and evaluated according to precedence +using the rules listed above. +.if t .sp 0.5 +.if n .sp 1 +.LP +When used with \fBtest\fP or \fB[\fP, the \fB<\fP and \fB>\fP operators +sort lexicographically using ASCII ordering. +.RE +.PD +.TP +.B times +Print the accumulated user and system times for the shell and +for processes run from the shell. The return status is 0. +.TP +\fBtrap\fP [\fB\-lp\fP] [[\fIarg\fP] \fIsigspec\fP ...] +The command +.I arg +is to be read and executed when the shell receives +signal(s) +.IR sigspec . +If +.I arg +is absent (and there is a single \fIsigspec\fP) or +.BR \- , +each specified signal is +reset to its original disposition (the value it had +upon entrance to the shell). +If +.I arg +is the null string the signal specified by each +.I sigspec +is ignored by the shell and by the commands it invokes. +If +.I arg +is not present and +.B \-p +has been supplied, then the trap commands associated with each +.I sigspec +are displayed. +If no arguments are supplied or if only +.B \-p +is given, +.B trap +prints the list of commands associated with each signal. +The +.B \-l +option causes the shell to print a list of signal names and +their corresponding numbers. +Each +.I sigspec +is either +a signal name defined in <\fIsignal.h\fP>, or a signal number. +Signal names are case insensitive and the +.SM +.B SIG +prefix is optional. +.if t .sp 0.5 +.if n .sp 1 +If a +.I sigspec +is +.SM +.B EXIT +(0) the command +.I arg +is executed on exit from the shell. +If a +.I sigspec +is +.SM +.BR DEBUG , +the command +.I arg +is executed before every \fIsimple command\fP, \fIfor\fP command, +\fIcase\fP command, \fIselect\fP command, every arithmetic \fIfor\fP +command, and before the first command executes in a shell function (see +.SM +.B SHELL GRAMMAR +above). +Refer to the description of the \fBextdebug\fP option to the +\fBshopt\fP builtin for details of its effect on the \fBDEBUG\fP trap. +If a +.I sigspec +is +.SM +.BR RETURN , +the command +.I arg +is executed each time a shell function or a script executed with +the \fB.\fP or \fBsource\fP builtins finishes executing. +.if t .sp 0.5 +.if n .sp 1 +If a +.I sigspec +is +.SM +.BR ERR , +the command +.I arg +is executed whenever +a pipeline (which may consist of a single simple +command), a list, or a compound command returns a +non\-zero exit status, +subject to the following conditions. +The +.SM +.B ERR +trap is not executed if the failed +command is part of the command list immediately following a +.B while +or +.B until +keyword, +part of the test in an +.I if +statement, part of a command executed in a +.B && +or +.B || +list except the command following the final \fB&&\fP or \fB||\fP, +any command in a pipeline but the last, +or if the command's return value is +being inverted using +.BR ! . +These are the same conditions obeyed by the \fBerrexit\fP (\fB\-e\fP) option. +.if t .sp 0.5 +.if n .sp 1 +Signals ignored upon entry to the shell cannot be trapped, reset or listed. +Trapped signals that are not being ignored are reset to their original +values in a subshell or subshell environment when one is created. +The return status is false if any +.I sigspec +is invalid; otherwise +.B trap +returns true. +.TP +\fBtype\fP [\fB\-aftpP\fP] \fIname\fP [\fIname\fP ...] +With no options, +indicate how each +.I name +would be interpreted if used as a command name. +If the +.B \-t +option is used, +.B type +prints a string which is one of +.IR alias , +.IR keyword , +.IR function , +.IR builtin , +or +.I file +if +.I name +is an alias, shell reserved word, function, builtin, or disk file, +respectively. +If the +.I name +is not found, then nothing is printed, and an exit status of false +is returned. +If the +.B \-p +option is used, +.B type +either returns the name of the disk file +that would be executed if +.I name +were specified as a command name, +or nothing if +.if t \f(CWtype -t name\fP +.if n ``type -t name'' +would not return +.IR file . +The +.B \-P +option forces a +.SM +.B PATH +search for each \fIname\fP, even if +.if t \f(CWtype -t name\fP +.if n ``type -t name'' +would not return +.IR file . +If a command is hashed, +.B \-p +and +.B \-P +print the hashed value, which is not necessarily the file that appears +first in +.SM +.BR PATH . +If the +.B \-a +option is used, +.B type +prints all of the places that contain +an executable named +.IR name . +This includes aliases and functions, +if and only if the +.B \-p +option is not also used. +The table of hashed commands is not consulted +when using +.BR \-a . +The +.B \-f +option suppresses shell function lookup, as with the \fBcommand\fP builtin. +.B type +returns true if all of the arguments are found, false if +any are not found. +.TP +\fBulimit\fP [\fB\-HS\fP] \fB\-a\fP +.PD 0 +.TP +\fBulimit\fP [\fB\-HS\fP] [\fB\-bcdefiklmnpqrstuvxPRT\fP [\fIlimit\fP]] +.PD +Provides control over the resources available to the shell and to +processes started by it, on systems that allow such control. +The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is +set for the given resource. +A hard limit cannot be increased by a non-root user once it is set; +a soft limit may be increased up to the value of the hard limit. +If neither \fB\-H\fP nor \fB\-S\fP is specified, both the soft and hard +limits are set. +The value of +.I limit +can be a number in the unit specified for the resource +or one of the special values +.BR hard , +.BR soft , +or +.BR unlimited , +which stand for the current hard limit, the current soft limit, and +no limit, respectively. +If +.I limit +is omitted, the current value of the soft limit of the resource is +printed, unless the \fB\-H\fP option is given. When more than one +resource is specified, the limit name and unit, if appropriate, +are printed before the value. +Other options are interpreted as follows: +.RS +.PD 0 +.TP +.B \-a +All current limits are reported; no limits are set +.TP +.B \-b +The maximum socket buffer size +.TP +.B \-c +The maximum size of core files created +.TP +.B \-d +The maximum size of a process's data segment +.TP +.B \-e +The maximum scheduling priority ("nice") +.TP +.B \-f +The maximum size of files written by the shell and its children +.TP +.B \-i +The maximum number of pending signals +.TP +.B \-k +The maximum number of kqueues that may be allocated +.TP +.B \-l +The maximum size that may be locked into memory +.TP +.B \-m +The maximum resident set size (many systems do not honor this limit) +.TP +.B \-n +The maximum number of open file descriptors (most systems do not +allow this value to be set) +.TP +.B \-p +The pipe size in 512-byte blocks (this may not be set) +.TP +.B \-q +The maximum number of bytes in POSIX message queues +.TP +.B \-r +The maximum real-time scheduling priority +.TP +.B \-s +The maximum stack size +.TP +.B \-t +The maximum amount of cpu time in seconds +.TP +.B \-u +The maximum number of processes available to a single user +.TP +.B \-v +The maximum amount of virtual memory available to the shell and, on +some systems, to its children +.TP +.B \-x +The maximum number of file locks +.TP +.B \-P +The maximum number of pseudoterminals +.TP +.B \-R +The maximum time a real-time process can run before blocking, in microseconds +.TP +.B \-T +The maximum number of threads +.PD +.PP +If +.I limit +is given, and the +.B \-a +option is not used, +\fIlimit\fP is the new value of the specified resource. +If no option is given, then +.B \-f +is assumed. Values are in 1024-byte increments, except for +.BR \-t , +which is in seconds; +.BR \-R , +which is in microseconds; +.BR \-p , +which is in units of 512-byte blocks; +.BR \-P , +.BR \-T , +.BR \-b , +.BR \-k , +.BR \-n , +and +.BR \-u , +which are unscaled values; +and, when in posix mode, +.B \-c +and +.BR \-f , +which are in 512-byte increments. +The return status is 0 unless an invalid option or argument is supplied, +or an error occurs while setting a new limit. +In POSIX Mode 512-byte blocks are used for the `-c' and `-f' options. +.RE +.TP +\fBumask\fP [\fB\-p\fP] [\fB\-S\fP] [\fImode\fP] +The user file-creation mask is set to +.IR mode . +If +.I mode +begins with a digit, it +is interpreted as an octal number; otherwise +it is interpreted as a symbolic mode mask similar +to that accepted by +.IR chmod (1). +If +.I mode +is omitted, the current value of the mask is printed. +The +.B \-S +option causes the mask to be printed in symbolic form; the +default output is an octal number. +If the +.B \-p +option is supplied, and +.I mode +is omitted, the output is in a form that may be reused as input. +The return status is 0 if the mode was successfully changed or if +no \fImode\fP argument was supplied, and false otherwise. +.TP +\fBunalias\fP [\-\fBa\fP] [\fIname\fP ...] +Remove each \fIname\fP from the list of defined aliases. If +.B \-a +is supplied, all alias definitions are removed. The return +value is true unless a supplied +.I name +is not a defined alias. +.TP +\fBunset\fP [\-\fBfv\fP] [\-\fBn\fP] [\fIname\fP ...] +For each +.IR name , +remove the corresponding variable or function. +If the +.B \-v +option is given, each +.I name +refers to a shell variable, and that variable is removed. +Read-only variables may not be unset. +If +.B \-f +is specified, each +.I name +refers to a shell function, and the function definition +is removed. +If the +.B \-n +option is supplied, and \fIname\fP is a variable with the \fInameref\fP +attribute, \fIname\fP will be unset rather than the variable it +references. +\fB\-n\fP has no effect if the \fB\-f\fP option is supplied. +If no options are supplied, each \fIname\fP refers to a variable; if +there is no variable by that name, a function with that name, if any, is +unset. +Each unset variable or function is removed from the environment +passed to subsequent commands. +If any of +.SM +.BR BASH_ALIASES , +.SM +.BR BASH_ARGV0 , +.SM +.BR BASH_CMDS , +.SM +.BR BASH_COMMAND , +.SM +.BR BASH_SUBSHELL , +.SM +.BR BASHPID , +.SM +.BR COMP_WORDBREAKS , +.SM +.BR DIRSTACK , +.SM +.BR EPOCHREALTIME , +.SM +.BR EPOCHSECONDS , +.SM +.BR FUNCNAME , +.SM +.BR GROUPS , +.SM +.BR HISTCMD , +.SM +.BR LINENO , +.SM +.BR RANDOM , +.SM +.BR SECONDS , +or +.SM +.B SRANDOM +are unset, they lose their special properties, even if they are +subsequently reset. The exit status is true unless a +.I name +is readonly. +.TP +\fBwait\fP [\fB\-fn\fP] [\fP\-p\fP \fIvarname\fP] [\fIid ...\fP] +Wait for each specified child process and return its termination status. +Each +.I id +may be a process +ID or a job specification; if a job spec is given, all processes +in that job's pipeline are waited for. If +.I id +is not given, +\fBwait\fP waits for all running background jobs and +the last-executed process substitution, if its process id is the same as +\fB$!\fP, +and the return status is zero. +If the \fB\-n\fP option is supplied, +\fBwait\fP waits for a single job +from the list of \fIid\fPs or, if no \fIid\fPs are supplied, any job, +to complete and returns its exit status. +If none of the supplied arguments is a child of the shell, or if no arguments +are supplied and the shell has no unwaited-for children, the exit status +is 127. +If the \fB\-p\fP option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable +\fIvarname\fP named by the option argument. +The variable will be unset initially, before any assignment. +This is useful only when the \fB\-n\fP option is supplied. +Supplying the \fB\-f\fP option, when job control is enabled, +forces \fBwait\fP to wait for \fIid\fP to terminate before returning +its status, instead of returning when it changes status. +If +.I id +specifies a non-existent process or job, the return status is +127. Otherwise, the return status is the exit status of the last +process or job waited for. +.SH "SHELL COMPATIBILITY MODE" +Bash-4.0 introduced the concept of a `shell compatibility level', specified +as a set of options to the shopt builtin +.BR compat31 , +.BR compat32 , +.BR compat40 , +.BR compat41 , +and so on). +There is only one current +compatibility level -- each option is mutually exclusive. +The compatibility level is intended to allow users to select behavior +from previous versions that is incompatible with newer versions +while they migrate scripts to use current features and +behavior. It's intended to be a temporary solution. +.PP +This section does not mention behavior that is standard for a particular +version (e.g., setting \fBcompat32\fP means that quoting the rhs of the regexp +matching operator quotes special regexp characters in the word, which is +default behavior in bash-3.2 and above). +.PP +If a user enables, say, \fBcompat32\fP, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed +in that version of \fBbash\fP, +but that behavior may have been present in earlier versions. +For instance, the change to use locale-based comparisons with the \fB[[\fP +command came in bash-4.1, and earlier versions used ASCII-based comparisons, +so enabling \fBcompat32\fP will enable ASCII-based comparisons as well. +That granularity may not be sufficient for +all uses, and as a result users should employ compatibility levels carefully. +Read the documentation for a particular feature to find out the +current behavior. +.PP +Bash-4.3 introduced a new shell variable: +.SM +.BR BASH_COMPAT . +The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the \fBcompat\fP\fINN\fP option, like 42) determines the +compatibility level. +.PP +Starting with bash-4.4, Bash has begun deprecating older compatibility +levels. +Eventually, the options will be removed in favor of +.SM +.BR BASH_COMPAT . +.PP +Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use +.SM +.B BASH_COMPAT +on bash-5.0 and later versions. +.PP +The following table describes the behavior changes controlled by each +compatibility level setting. +The \fBcompat\fP\fINN\fP tag is used as shorthand for setting the +compatibility level +to \fINN\fP using one of the following mechanisms. +For versions prior to bash-5.0, the compatibility level may be set using +the corresponding \fBcompat\fP\fINN\fP shopt option. +For bash-4.3 and later versions, the +.SM +.B BASH_COMPAT +variable is preferred, +and it is required for bash-5.1 and later versions. +.TP +\fBcompat31\fP +.PD 0 +.RS +.IP \(bu +quoting the rhs of the \fB[[\fP command's regexp matching operator (=~) +has no special effect +.RE +.PD +.TP +\fBcompat32\fP +.PD 0 +.RS +.IP \(bu +interrupting a command list such as "a ; b ; c" causes the execution +of the next command in the list (in bash-4.0 and later versions, +the shell acts as if it received the interrupt, so +interrupting one command in a list aborts the execution of the +entire list) +.RE +.PD +.TP +\fBcompat40\fP +.PD 0 +.RS +.IP \(bu +the \fB<\fP and \fB>\fP operators to the \fB[[\fP command do not +consider the current locale when comparing strings; they use ASCII +ordering. +Bash versions prior to bash-4.1 use ASCII collation and +.IR strcmp (3); +bash-4.1 and later use the current locale's collation sequence and +.IR strcoll (3). +.RE +.PD +.TP +\fBcompat41\fP +.PD 0 +.RS +.IP \(bu +in \fIposix\fP mode, \fBtime\fP may be followed by options and still be +recognized as a reserved word (this is POSIX interpretation 267) +.IP \(bu +in \fIposix\fP mode, the parser requires that an even number of single +quotes occur in the \fIword\fP portion of a double-quoted +parameter expansion and treats them specially, so that characters within +the single quotes are considered quoted +(this is POSIX interpretation 221) +.RE +.PD +.TP +\fBcompat42\fP +.PD 0 +.RS +.IP \(bu +the replacement string in double-quoted pattern substitution does not +undergo quote removal, as it does in versions after bash-4.2 +.IP \(bu +in posix mode, single quotes are considered special when expanding +the \fIword\fP portion of a double-quoted parameter expansion +and can be used to quote a closing brace or other special character +(this is part of POSIX interpretation 221); +in later versions, single quotes +are not special within double-quoted word expansions +.RE +.PD +.TP +\fBcompat43\fP +.PD 0 +.RS +.IP \(bu +the shell does not print a warning message if an attempt is made to +use a quoted compound assignment as an argument to declare +(declare -a foo='(1 2)'). Later versions warn that this usage is +deprecated +.IP \(bu +word expansion errors are considered non-fatal errors that cause the +current command to fail, even in posix mode +(the default behavior is to make them fatal errors that cause the shell +to exit) +.IP \(bu +when executing a shell function, the loop state (while/until/etc.) +is not reset, so \fBbreak\fP or \fBcontinue\fP in that function will break +or continue loops in the calling context. Bash-4.4 and later reset +the loop state to prevent this +.RE +.PD +.TP +\fBcompat44\fP +.PD 0 +.RS +.IP \(bu +the shell sets up the values used by +.SM +.B BASH_ARGV +and +.SM +.B BASH_ARGC +so they can expand to the shell's positional parameters even if extended +debugging mode is not enabled +.IP \(bu +a subshell inherits loops from its parent context, so \fBbreak\fP +or \fBcontinue\fP will cause the subshell to exit. +Bash-5.0 and later reset the loop state to prevent the exit +.IP \(bu +variable assignments preceding builtins like \fBexport\fP and \fBreadonly\fP +that set attributes continue to affect variables with the same +name in the calling environment even if the shell is not in posix +mode +.RE +.PD +.TP +\fBcompat50\fP +.PD 0 +.RS +.IP \(bu +Bash-5.1 changed the way +.SM +.B $RANDOM +is generated to introduce slightly +more randomness. If the shell compatibility level is set to 50 or +lower, it reverts to the method from bash-5.0 and previous versions, +so seeding the random number generator by assigning a value to +.SM +.B RANDOM +will produce the same sequence as in bash-5.0 +.IP \(bu +If the command hash table is empty, bash versions prior to bash-5.1 +printed an informational message to that effect, even when producing +output that can be reused as input. Bash-5.1 suppresses that message +when the \fB\-l\fP option is supplied. +.RE +.PD +.\" bash_builtins +.if \n(zZ=1 .ig zZ +.SH "RESTRICTED SHELL" +.\" rbash.1 +.zY +.PP +If +.B bash +is started with the name +.BR rbash , +or the +.B \-r +option is supplied at invocation, +the shell becomes restricted. +A restricted shell is used to +set up an environment more controlled than the standard shell. +It behaves identically to +.B bash +with the exception that the following are disallowed or not performed: +.IP \(bu +changing directories with \fBcd\fP +.IP \(bu +setting or unsetting the values of +.SM +.BR SHELL , +.SM +.BR PATH , +.SM +.BR HISTFILE , +.SM +.BR ENV , +or +.SM +.B BASH_ENV +.IP \(bu +specifying command names containing +.B / +.IP \(bu +specifying a filename containing a +.B / +as an argument to the +.B . +builtin command +.IP \(bu +specifying a filename containing a slash as an argument to the +.B history +builtin command +.IP \(bu +specifying a filename containing a slash as an argument to the +.B \-p +option to the +.B hash +builtin command +.IP \(bu +importing function definitions from the shell environment at startup +.IP \(bu +parsing the value of +.SM +.B SHELLOPTS +from the shell environment at startup +.IP \(bu +redirecting output using the >, >|, <>, >&, &>, and >> redirection operators +.IP \(bu +using the +.B exec +builtin command to replace the shell with another command +.IP \(bu +adding or deleting builtin commands with the +.B \-f +and +.B \-d +options to the +.B enable +builtin command +.IP \(bu +using the \fBenable\fP builtin command to enable disabled shell builtins +.IP \(bu +specifying the +.B \-p +option to the +.B command +builtin command +.IP \(bu +turning off restricted mode with +\fBset +r\fP or \fBset +o restricted\fP. +.PP +These restrictions are enforced after any startup files are read. +.PP +.ie \n(zY=1 When a command that is found to be a shell script is executed, +.el \{ When a command that is found to be a shell script is executed +(see +.SM +.B "COMMAND EXECUTION" +above), +\} +.B rbash +turns off any restrictions in the shell spawned to execute the +script. +.\" end of rbash.1 +.if \n(zY=1 .ig zY +.SH "SEE ALSO" +.PD 0 +.TP +\fIBash Reference Manual\fP, Brian Fox and Chet Ramey +.TP +\fIThe Gnu Readline Library\fP, Brian Fox and Chet Ramey +.TP +\fIThe Gnu History Library\fP, Brian Fox and Chet Ramey +.TP +\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE -- +http://pubs.opengroup.org/onlinepubs/9699919799/ +.TP +http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode +.TP +\fIsh\fP(1), \fIksh\fP(1), \fIcsh\fP(1) +.TP +\fIemacs\fP(1), \fIvi\fP(1) +.TP +\fIreadline\fP(3) +.PD +.SH FILES +.PD 0 +.TP +.FN /bin/bash +The \fBbash\fP executable +.TP +.FN /etc/profile +The systemwide initialization file, executed for login shells +.TP +.FN /etc/bash.bash_logout +The systemwide login shell cleanup file, executed when a login shell exits +.TP +.FN ~/.bash_profile +The personal initialization file, executed for login shells +.TP +.FN ~/.bashrc +The individual per-interactive-shell startup file +.TP +.FN ~/.bash_logout +The individual login shell cleanup file, executed when a login shell exits +.TP +.FN ~/.inputrc +Individual \fIreadline\fP initialization file +.PD +.SH AUTHORS +Brian Fox, Free Software Foundation +.br +bfox@gnu.org +.PP +Chet Ramey, Case Western Reserve University +.br +chet.ramey@case.edu +.SH BUG REPORTS +If you find a bug in +.B bash, +you should report it. But first, you should +make sure that it really is a bug, and that it appears in the latest +version of +.BR bash . +The latest version is always available from +\fIftp://ftp.gnu.org/pub/gnu/bash/\fP. +.PP +Once you have determined that a bug actually exists, use the +.I bashbug +command to submit a bug report. +If you have a fix, you are encouraged to mail that as well! +Suggestions and `philosophical' bug reports may be mailed +to \fIbug-bash@gnu.org\fP or posted to the Usenet +newsgroup +.BR gnu.bash.bug . +.PP +ALL bug reports should include: +.PP +.PD 0 +.TP 20 +The version number of \fBbash\fR +.TP +The hardware and operating system +.TP +The compiler used to compile +.TP +A description of the bug behaviour +.TP +A short script or `recipe' which exercises the bug +.PD +.PP +.I bashbug +inserts the first three items automatically into the template +it provides for filing a bug report. +.PP +Comments and bug reports concerning +this manual page should be directed to +.IR chet.ramey@case.edu . +.SH BUGS +It's too big and too slow. +.PP +There are some subtle differences between +.B bash +and traditional versions of +.BR sh , +mostly because of the +.SM +.B POSIX +specification. +.PP +Aliases are confusing in some uses. +.PP +Shell builtin commands and functions are not stoppable/restartable. +.PP +Compound commands and command sequences of the form `a ; b ; c' +are not handled gracefully when process suspension is attempted. +When a process is stopped, the shell immediately executes the next +command in the sequence. +It suffices to place the sequence of commands between +parentheses to force it into a subshell, which may be stopped as +a unit. +.PP +Array variables may not (yet) be exported. +.PP +There may be only one active coprocess at a time. +.zZ +.zY diff --git a/bash-5.1/doc/bash.html b/bash-5.1/doc/bash.html new file mode 100644 index 0000000000000000000000000000000000000000..adb9e7607f1a52dd1b49bc8c3e895101155ffac2 --- /dev/null +++ b/bash-5.1/doc/bash.html @@ -0,0 +1,14369 @@ + +BASH(1) Manual Page + + + + +
BASH(1)2020 October 29BASH(1) +
+
Index +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  +

NAME

+ +bash - GNU Bourne-Again SHell +  +

SYNOPSIS

+ +bash + +[options] +[command_string | file] +  +

COPYRIGHT

+ + +Bash is Copyright © 1989-2020 by the Free Software Foundation, Inc. +  +

DESCRIPTION

+ +Bash + +is an sh-compatible command language interpreter that +executes commands read from the standard input or from a file. +Bash + +also incorporates useful features from the Korn and C +shells (ksh and csh). +

+ +Bash + +is intended to be a conformant implementation of the +Shell and Utilities portion of the IEEE POSIX specification +(IEEE Standard 1003.1). +Bash + +can be configured to be POSIX-conformant by default. +  +

OPTIONS

+ +All of the single-character shell options documented in the +description of the set builtin command, including -o, +can be used as options when the shell is invoked. +In addition, bash +interprets the following options when it is invoked: +

+ + +

+
-c + +
+If the +-c + +option is present, then commands are read from the first non-option argument +command_string. + +If there are arguments after the +command_string, + +the first argument is assigned to +$0 + +and any remaining arguments are assigned to the positional parameters. +The assignment to +$0 + +sets the name of the shell, which is used in warning and error messages. +
-i + +
+If the +-i + +option is present, the shell is +interactive. + +
-l + +
+Make +bash + +act as if it had been invoked as a login shell (see +INVOCATION + + +below). +
-r + +
+If the +-r + +option is present, the shell becomes +restricted + +(see +RESTRICTED SHELL + + +below). +
-s + +
+If the +-s + +option is present, or if no arguments remain after option +processing, then commands are read from the standard input. +This option allows the positional parameters to be set +when invoking an interactive shell or when reading input +through a pipe. +
-D + +
+A list of all double-quoted strings preceded by $ +is printed on the standard output. +These are the strings that +are subject to language translation when the current locale +is not C or POSIX. +This implies the -n option; no commands will be executed. +
[-+]O [shopt_option] + +
+shopt_option is one of the shell options accepted by the +shopt builtin (see +SHELL BUILTIN COMMANDS + + +below). +If shopt_option is present, -O sets the value of that option; ++O unsets it. +If shopt_option is not supplied, the names and values of the shell +options accepted by shopt are printed on the standard output. +If the invocation option is +O, the output is displayed in a format +that may be reused as input. +
-- + +
+A +-- + +signals the end of options and disables further option processing. +Any arguments after the +-- + +are treated as filenames and arguments. An argument of +- + +is equivalent to --. + +
+

+ +Bash + +also interprets a number of multi-character options. +These options must appear on the command line before the +single-character options to be recognized. +

+ + +

+
--debugger + +
+Arrange for the debugger profile to be executed before the shell +starts. +Turns on extended debugging mode (see the description of the +extdebug + +option to the +shopt + +builtin below). +
--dump-po-strings + +
+Equivalent to -D, but the output is in the GNU gettext +po (portable object) file format. +
--dump-strings + +
+Equivalent to -D. +
--help + +
+Display a usage message on standard output and exit successfully. +
--init-file file
+ +
--rcfile file
+ +Execute commands from +file + +instead of the standard personal initialization file +~/.bashrc + +if the shell is interactive (see +INVOCATION + + +below). +
--login + +
+Equivalent to -l. +
--noediting + +
+Do not use the GNU +readline + +library to read command lines when the shell is interactive. +
--noprofile + +
+Do not read either the system-wide startup file + +/etc/profile + +or any of the personal initialization files +~/.bash_profile, + +~/.bash_login, + +or +~/.profile. + +By default, +bash + +reads these files when it is invoked as a login shell (see +INVOCATION + + +below). +
--norc + +
+Do not read and execute the personal initialization file +~/.bashrc + +if the shell is interactive. +This option is on by default if the shell is invoked as +sh. + +
--posix + +
+Change the behavior of bash where the default operation differs +from the POSIX standard to match the standard (posix mode). +See +SEE ALSO + + +below for a reference to a document that details how posix mode affects +bash's behavior. +
--restricted + +
+The shell becomes restricted (see +RESTRICTED SHELL + + +below). +
--verbose + +
+Equivalent to -v. +
--version + +
+Show version information for this instance of +bash + +on the standard output and exit successfully. + +
+  +

ARGUMENTS

+ +If arguments remain after option processing, and neither the +-c + +nor the +-s + +option has been supplied, the first argument is assumed to +be the name of a file containing shell commands. +If +bash + +is invoked in this fashion, +$0 + +is set to the name of the file, and the positional parameters +are set to the remaining arguments. +Bash + +reads and executes commands from this file, then exits. +Bash's exit status is the exit status of the last command +executed in the script. +If no commands are executed, the exit status is 0. +An attempt is first made to open the file in the current directory, and, +if no file is found, then the shell searches the directories in +PATH + + +for the script. +  +

INVOCATION

+ +A login shell is one whose first character of argument zero is a +-, + +or one started with the +--login + +option. +

+ +An interactive shell is one started without non-option arguments +(unless -s is specified) +and without the +-c + +option +whose standard input and error are +both connected to terminals (as determined by +isatty(3)), + +or one started with the +-i + +option. +PS1 + + +is set and +$- + +includes +i + +if +bash + +is interactive, +allowing a shell script or a startup file to test this state. +

+ +The following paragraphs describe how +bash + +executes its startup files. +If any of the files exist but cannot be read, +bash + +reports an error. +Tildes are expanded in filenames as described below under +Tilde Expansion + +in the +EXPANSION + + +section. +

+ +When +bash + +is invoked as an interactive login shell, or as a non-interactive shell +with the --login option, it first reads and +executes commands from the file /etc/profile, if that +file exists. +After reading that file, it looks for ~/.bash_profile, +~/.bash_login, and ~/.profile, in that order, and reads +and executes commands from the first one that exists and is readable. +The +--noprofile + +option may be used when the shell is started to inhibit this behavior. +

+ +When an interactive login shell exits, +or a non-interactive login shell executes the exit builtin command, +bash + +reads and executes commands from the file ~/.bash_logout, if it +exists. +

+ +When an interactive shell that is not a login shell is started, +bash + +reads and executes commands from ~/.bashrc, if that file exists. +This may be inhibited by using the +--norc + +option. +The --rcfile file option will force +bash + +to read and execute commands from file instead of ~/.bashrc. +

+ +When +bash + +is started non-interactively, to run a shell script, for example, it +looks for the variable +BASH_ENV + + +in the environment, expands its value if it appears there, and uses the +expanded value as the name of a file to read and execute. +Bash + +behaves as if the following command were executed: +

+

+if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi + +
+ +

+but the value of the +PATH + + +variable is not used to search for the filename. +

+ +If +bash + +is invoked with the name +sh, + +it tries to mimic the startup behavior of historical versions of +sh + +as closely as possible, +while conforming to the POSIX standard as well. +When invoked as an interactive login shell, or a non-interactive +shell with the --login option, it first attempts to +read and execute commands from +/etc/profile + +and +~/.profile, + +in that order. +The +--noprofile + +option may be used to inhibit this behavior. +When invoked as an interactive shell with the name +sh, + +bash + +looks for the variable +ENV, + + +expands its value if it is defined, and uses the +expanded value as the name of a file to read and execute. +Since a shell invoked as +sh + +does not attempt to read and execute commands from any other startup +files, the +--rcfile + +option has no effect. +A non-interactive shell invoked with the name +sh + +does not attempt to read any other startup files. +When invoked as +sh, + +bash + +enters +posix + +mode after the startup files are read. +

+ +When +bash + +is started in +posix + +mode, as with the +--posix + +command line option, it follows the POSIX standard for startup files. +In this mode, interactive shells expand the +ENV + + +variable and commands are read and executed from the file +whose name is the expanded value. +No other startup files are read. +

+ +Bash + +attempts to determine when it is being run with its standard input +connected to a network connection, as when executed by the remote shell +daemon, usually rshd, or the secure shell daemon sshd. +If +bash + +determines it is being run in this fashion, it reads and executes +commands from ~/.bashrc, if that file exists and is readable. +It will not do this if invoked as sh. +The +--norc + +option may be used to inhibit this behavior, and the +--rcfile + +option may be used to force another file to be read, but neither +rshd nor sshd generally invoke the shell with those options +or allow them to be specified. +

+ +If the shell is started with the effective user (group) id not equal to the +real user (group) id, and the -p option is not supplied, no startup +files are read, shell functions are not inherited from the environment, the +SHELLOPTS, + + +BASHOPTS, + + +CDPATH, + + +and +GLOBIGNORE + + +variables, if they appear in the environment, are ignored, +and the effective user id is set to the real user id. +If the -p option is supplied at invocation, the startup behavior is +the same, but the effective user id is not reset. +  +

DEFINITIONS

+ +The following definitions are used throughout the rest of this +document. + +
+
blank + +
+A space or tab. +
word + +
+A sequence of characters considered as a single unit by the shell. +Also known as a +token. + +
name + +
+A +word + +consisting only of alphanumeric characters and underscores, and +beginning with an alphabetic character or an underscore. Also +referred to as an +identifier. + +
metacharacter + +
+A character that, when unquoted, separates words. One of the following: +
+ +
+

+ +| & ; ( ) < > space tab newline + +

+ +
control operator + +
+A token that performs a control function. It is one of the following +symbols: +
+

+ +|| & && ; ;; ;& ;;& ( ) | |& <newline> + +

+ + +
+  +

RESERVED WORDS

+ +Reserved words are words that have a special meaning to the shell. +The following words are recognized as reserved when unquoted and either +the first word of a command (see +SHELL GRAMMAR + + +below), the third word of a +case + +or +select + +command +(only in is valid), or the third word of a +for + +command (only in and do are valid): +
+ +

+ + + + +! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]] +

+ + +  +

SHELL GRAMMAR

+ +  +

Simple Commands

+ +A simple command is a sequence of optional variable assignments +followed by blank-separated words and redirections, and +terminated by a control operator. The first word +specifies the command to be executed, and is passed as argument zero. +The remaining words are passed as arguments to the invoked command. +

+ +The return value of a simple command is its exit status, or +128+n if the command is terminated by signal +n. + +  +

Pipelines

+ +A pipeline is a sequence of one or more commands separated by +one of the control operators +| + +or |&. +The format for a pipeline is: +
+

+ +[time [-p]] [ ! ] command [ [|||&] command2 ... ] +

+ +

+ +The standard output of +command + +is connected via a pipe to the standard input of +command2. + +This connection is performed before any redirections specified by the +command (see +REDIRECTION + + +below). +If |& is used, command's standard error, in addition to its +standard output, is connected to +command2's standard input through the pipe; +it is shorthand for 2>&1 |. +This implicit redirection of the standard error to the standard output is +performed after any redirections specified by the command. +

+ +The return status of a pipeline is the exit status of the last +command, unless the pipefail option is enabled. +If pipefail is enabled, the pipeline's return status is the +value of the last (rightmost) command to exit with a non-zero status, +or zero if all commands exit successfully. +If the reserved word +! + +precedes a pipeline, the exit status of that pipeline is the logical +negation of the exit status as described above. +The shell waits for all commands in the pipeline to +terminate before returning a value. +

+ +If the +time + +reserved word precedes a pipeline, the elapsed as well as user and +system time consumed by its execution are reported when the pipeline +terminates. +The -p option changes the output format to that specified by POSIX. +When the shell is in posix mode, it does not recognize +time as a reserved word if the next token begins with a `-'. +The +TIMEFORMAT + + +variable may be set to a format string that specifies how the timing +information should be displayed; see the description of +TIMEFORMAT + + +under +Shell Variables + +below. +

+ +When the shell is in posix mode, time +may be followed by a newline. In this case, the shell displays the +total user and system time consumed by the shell and its children. +The +TIMEFORMAT + + +variable may be used to specify the format of +the time information. +

+ +Each command in a pipeline is executed as a separate process (i.e., in a +subshell). +See +COMMAND EXECUTION ENVIRONMENT +for a description of a subshell environment. +If the lastpipe option is enabled using the shopt builtin +(see the description of shopt below), +the last element of a pipeline may be run by the shell process. +  +

Lists

+ +A list is a sequence of one or more pipelines separated by one +of the operators +;, + +&, + +&&, + +or +||, + +and optionally terminated by one of +;, + +&, + +or +<newline>. + +

+ +Of these list operators, +&& + +and +|| + +have equal precedence, followed by +; + +and +&, + +which have equal precedence. +

+ +A sequence of one or more newlines may appear in a list instead +of a semicolon to delimit commands. +

+ +If a command is terminated by the control operator +&, + +the shell executes the command in the background +in a subshell. +The shell does not wait for the command to +finish, and the return status is 0. +These are referred to as asynchronous commands. +Commands separated by a +; + +are executed sequentially; the shell waits for each +command to terminate in turn. The return status is the +exit status of the last command executed. +

+ +AND and OR lists are sequences of one or more pipelines separated by the +&& and || control operators, respectively. +AND and OR lists are executed with left associativity. +An AND list has the form +

+

+ +command1 && command2 +

+ +

+ +command2 + +is executed if, and only if, +command1 + +returns an exit status of zero (success). +

+ +An OR list has the form +

+

+ +command1 || command2 +

+ +

+ +command2 + +is executed if, and only if, +command1 + +returns a non-zero exit status. +The return status of +AND and OR lists is the exit status of the last command +executed in the list. +  +

Compound Commands

+ +A compound command is one of the following. +In most cases a list in a command's description may be separated from +the rest of the command by one or more newlines, and may be followed by a +newline in place of a semicolon. +
+
(list)
+list is executed in a subshell environment (see +COMMAND EXECUTION ENVIRONMENT +below). +Variable assignments and builtin +commands that affect the shell's environment do not remain in effect +after the command completes. The return status is the exit status of +list. +
{ list; }
+list is simply executed in the current shell environment. +list must be terminated with a newline or semicolon. +This is known as a group command. +The return status is the exit status of +list. +Note that unlike the metacharacters ( and ), { and +} are reserved words and must occur where a reserved +word is permitted to be recognized. Since they do not cause a word +break, they must be separated from list by whitespace or another +shell metacharacter. +
((expression))
+The expression is evaluated according to the rules described +below under +ARITHMETIC EVALUATION. + + +If the value of the expression is non-zero, the return status is 0; +otherwise the return status is 1. This is exactly equivalent to +let "expression". +
[[ expression ]]
+Return a status of 0 or 1 depending on the evaluation of +the conditional expression expression. +Expressions are composed of the primaries described below under +CONDITIONAL EXPRESSIONS. + + +Word splitting and pathname expansion are not performed on the words +between the [[ and ]]; tilde expansion, +parameter and variable expansion, +arithmetic expansion, command substitution, process +substitution, and quote removal are performed. +Conditional operators such as -f must be unquoted to be recognized +as primaries. +

+ + +When used with [[, the < and > operators sort +lexicographically using the current locale. +

+ + +When the == and != operators are used, the string to the +right of the operator is considered a pattern and matched according +to the rules described below under Pattern Matching, +as if the extglob shell option were enabled. +The = operator is equivalent to ==. +If the +nocasematch + +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +The return value is 0 if the string matches (==) or does not match +(!=) the pattern, and 1 otherwise. +Any part of the pattern may be quoted to force the quoted portion +to be matched as a string. +

+ + +An additional binary operator, =~, is available, with the same +precedence as == and !=. +When it is used, the string to the right of the operator is considered +a POSIX extended regular expression and matched accordingly +(using the POSIX regcomp and regexec interfaces +usually described in regex(3)). +The return value is 0 if the string matches +the pattern, and 1 otherwise. +If the regular expression is syntactically incorrect, the conditional +expression's return value is 2. +If the +nocasematch + +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +Any part of the pattern may be quoted to force the quoted portion +to be matched as a string. +Bracket expressions in regular expressions must be treated carefully, +since normal quoting characters lose their meanings between brackets. +If the pattern is stored in a shell variable, quoting the variable +expansion forces the entire pattern to be matched as a string. +

+ + +The pattern will match if it matches any part of the string. +Anchor the pattern using the ^ and $ regular expression +operators to force it to match the entire string. +The array variable +BASH_REMATCH + + +records which parts of the string matched the pattern. +The element of +BASH_REMATCH + + +with index 0 contains the portion of +the string matching the entire regular expression. +Substrings matched by parenthesized subexpressions within the regular +expression are saved in the remaining +BASH_REMATCH + + +indices. The element of +BASH_REMATCH + + +with index n is the portion of the +string matching the nth parenthesized subexpression. +

+ + +Expressions may be combined using the following operators, listed +in decreasing order of precedence: +

+ + +

+ +
+
( expression ) + +
+Returns the value of expression. +This may be used to override the normal precedence of operators. +
! expression + +
+True if +expression + +is false. +
expression1 && expression2
+True if both +expression1 + +and +expression2 + +are true. +
expression1 || expression2
+True if either +expression1 + +or +expression2 + +is true. + +
+

+ +The && and || +operators do not evaluate expression2 if the value of +expression1 is sufficient to determine the return value of +the entire conditional expression. +

+ +
for name [ [ in [ word ... ] ] ; ] do list ; done
+The list of words following in is expanded, generating a list +of items. +The variable name is set to each element of this list +in turn, and list is executed each time. +If the in word is omitted, the for command executes +list once for each positional parameter that is set (see +PARAMETERS + + +below). +The return status is the exit status of the last command that executes. +If the expansion of the items following in results in an empty +list, no commands are executed, and the return status is 0. +
for (( expr1 ; expr2 ; expr3 )) ; do list ; done
+First, the arithmetic expression expr1 is evaluated according +to the rules described below under +ARITHMETIC EVALUATION. + + +The arithmetic expression expr2 is then evaluated repeatedly +until it evaluates to zero. +Each time expr2 evaluates to a non-zero value, list is +executed and the arithmetic expression expr3 is evaluated. +If any expression is omitted, it behaves as if it evaluates to 1. +The return value is the exit status of the last command in list +that is executed, or false if any of the expressions is invalid. +
select name [ in word ] ; do list ; done
+The list of words following in is expanded, generating a list +of items. The set of expanded words is printed on the standard +error, each preceded by a number. If the in +word is omitted, the positional parameters are printed (see +PARAMETERS + + +below). The +PS3 + + +prompt is then displayed and a line read from the standard input. +If the line consists of a number corresponding to one of +the displayed words, then the value of +name + +is set to that word. If the line is empty, the words and prompt +are displayed again. If EOF is read, the command completes. Any +other value read causes +name + +to be set to null. The line read is saved in the variable +REPLY. + + +The +list + +is executed after each selection until a +break + +command is executed. +The exit status of +select + +is the exit status of the last command executed in +list, + +or zero if no commands were executed. +
case word in [ [(] pattern [ | pattern ] +
+A case command first expands word, and tries to match +it against each pattern in turn, using the matching rules +described under +Pattern Matching + +below. +The word is expanded using tilde +expansion, parameter and variable expansion, arithmetic expansion, +command substitution, process substitution and quote removal. +Each pattern examined is expanded using tilde +expansion, parameter and variable expansion, arithmetic expansion, +command substitution, and process substitution. +If the +nocasematch + +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +When a match is found, the corresponding list is executed. +If the ;; operator is used, no subsequent matches are attempted after +the first pattern match. +Using ;& in place of ;; causes execution to continue with +the list associated with the next set of patterns. +Using ;;& in place of ;; causes the shell to test the next +pattern list in the statement, if any, and execute any associated list +on a successful match, +continuing the case statement execution as if the pattern list had not matched. +The exit status is zero if no +pattern matches. Otherwise, it is the exit status of the +last command executed in list. +
if list; then list; [ elif list; then list; ] ... [ else list; ] fi
+The +if + +list + +is executed. If its exit status is zero, the +then list is executed. Otherwise, each elif +list is executed in turn, and if its exit status is zero, +the corresponding then list is executed and the +command completes. Otherwise, the else list is +executed, if present. The exit status is the exit status of the +last command executed, or zero if no condition tested true. +
while list-1; do list-2; done
+ +
until list-1; do list-2; done
+ +The while command continuously executes the list +list-2 as long as the last command in the list list-1 returns +an exit status of zero. The until command is identical +to the while command, except that the test is negated: +list-2 + +is executed as long as the last command in +list-1 + +returns a non-zero exit status. +The exit status of the while and until commands +is the exit status +of the last command executed in list-2, or zero if +none was executed. +
+  +

Coprocesses

+ +A coprocess is a shell command preceded by the coproc reserved +word. +A coprocess is executed asynchronously in a subshell, as if the command +had been terminated with the & control operator, with a two-way pipe +established between the executing shell and the coprocess. +

+ +The format for a coprocess is: +

+

+ +coproc [NAME] command [redirections] +

+ +

+ +This creates a coprocess named NAME. +If NAME is not supplied, the default name is COPROC. +NAME must not be supplied if command is a simple +command (see above); otherwise, it is interpreted as the first word +of the simple command. +When the coprocess is executed, the shell creates an array variable (see +Arrays + +below) named NAME in the context of the executing shell. +The standard output of +command + +is connected via a pipe to a file descriptor in the executing shell, +and that file descriptor is assigned to NAME[0]. +The standard input of +command + +is connected via a pipe to a file descriptor in the executing shell, +and that file descriptor is assigned to NAME[1]. +This pipe is established before any redirections specified by the +command (see +REDIRECTION + + +below). +The file descriptors can be utilized as arguments to shell commands +and redirections using standard word expansions. +Other than those created to execute command and process substitutions, +the file descriptors are not available in subshells. +The process ID of the shell spawned to execute the coprocess is +available as the value of the variable NAME_PID. +The wait +builtin command may be used to wait for the coprocess to terminate. +

+ +Since the coprocess is created as an asynchronous command, +the coproc command always returns success. +The return status of a coprocess is the exit status of command. +  +

Shell Function Definitions

+ +A shell function is an object that is called like a simple command and +executes a compound command with a new set of positional parameters. +Shell functions are declared as follows: +
+
fname () compound-command [redirection]
+ +
function fname [()] compound-command [redirection]
+ +This defines a function named fname. +The reserved word function is optional. +If the function reserved word is supplied, the parentheses are optional. +The body of the function is the compound command +compound-command + +(see Compound Commands above). +That command is usually a list of commands between { and }, but +may be any command listed under Compound Commands above, +with one exception: If the function reserved word is used, but the +parentheses are not supplied, the braces are required. +compound-command is executed whenever fname is specified as the +name of a simple command. +When in posix mode, fname must be a valid shell name +and may not be the name of one of the +POSIX special builtins. +In default mode, a function name can be any unquoted shell word that does +not contain $. +Any redirections (see +REDIRECTION + + +below) specified when a function is defined are performed +when the function is executed. +The exit status of a function definition is zero unless a syntax error +occurs or a readonly function with the same name already exists. +When executed, the exit status of a function is the exit status of the +last command executed in the body. (See +FUNCTIONS + + +below.) +
+  +

COMMENTS

+ +In a non-interactive shell, or an interactive shell in which the +interactive_comments + +option to the +shopt + +builtin is enabled (see +SHELL BUILTIN COMMANDS + + +below), a word beginning with +# + +causes that word and all remaining characters on that line to +be ignored. An interactive shell without the +interactive_comments + +option enabled does not allow comments. The +interactive_comments + +option is on by default in interactive shells. +  +

QUOTING

+ +Quoting is used to remove the special meaning of certain +characters or words to the shell. Quoting can be used to +disable special treatment for special characters, to prevent +reserved words from being recognized as such, and to prevent +parameter expansion. +

+ +Each of the metacharacters listed above under +DEFINITIONS + + +has special meaning to the shell and must be quoted if it is to +represent itself. +

+ +When the command history expansion facilities are being used +(see +HISTORY EXPANSION + + +below), the +history expansion character, usually !, must be quoted +to prevent history expansion. +

+ +There are three quoting mechanisms: the +escape character, + +single quotes, and double quotes. +

+ +A non-quoted backslash (\) is the +escape character. + +It preserves the literal value of the next character that follows, +with the exception of <newline>. If a \<newline> pair +appears, and the backslash is not itself quoted, the \<newline> +is treated as a line continuation (that is, it is removed from the +input stream and effectively ignored). +

+ +Enclosing characters in single quotes preserves the literal value +of each character within the quotes. A single quote may not occur +between single quotes, even when preceded by a backslash. +

+ +Enclosing characters in double quotes preserves the literal value +of all characters within the quotes, with the exception of +$, + +`, + +\, + +and, when history expansion is enabled, +!. + +When the shell is in posix mode, the ! has no special meaning +within double quotes, even when history expansion is enabled. +The characters +$ + +and +` + +retain their special meaning within double quotes. The backslash +retains its special meaning only when followed by one of the following +characters: +$, + +`, + +", +\, + +or +<newline>. + +A double quote may be quoted within double quotes by preceding it with +a backslash. +If enabled, history expansion will be performed unless an +! + +appearing in double quotes is escaped using a backslash. +The backslash preceding the +! + +is not removed. +

+ +The special parameters +* + +and +@ + +have special meaning when in double +quotes (see +PARAMETERS + + +below). +

+ +Words of the form $aqstringaq are treated specially. The +word expands to string, with backslash-escaped characters replaced +as specified by the ANSI C standard. Backslash escape sequences, if +present, are decoded as follows: +

+ +
+
\a + +
+alert (bell) +
\b + +
+backspace +
\e + +
+
\E + +
+an escape character +
\f + +
+form feed +
\n + +
+new line +
\r + +
+carriage return +
\t + +
+horizontal tab +
\v + +
+vertical tab +
\\ + +
+backslash +
\aq + +
+single quote +
\dq + +
+double quote +
\? + +
+question mark +
\nnn + +
+the eight-bit character whose value is the octal value nnn +(one to three octal digits) +
\xHH + +
+the eight-bit character whose value is the hexadecimal value HH +(one or two hex digits) +
\uHHHH + +
+the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHH (one to four hex digits) +
\UHHHHHHHH + +
+the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHHHHHH (one to eight hex digits) +
\cx + +
+a control-x character + +
+ +

+ +The expanded result is single-quoted, as if the dollar sign had +not been present. +

+ +A double-quoted string preceded by a dollar sign ($dqstringdq) +will cause the string to be translated according to the current locale. +The gettext infrastructure performs the message catalog lookup and +translation, using the LC_MESSAGES and TEXTDOMAIN shell +variables. +If the current locale is C or POSIX, +or if there are no translations available, +the dollar sign is ignored. +If the string is translated and replaced, the replacement is +double-quoted. +  +

PARAMETERS

+ +A +parameter + +is an entity that stores values. +It can be a +name, + +a number, or one of the special characters listed below under +Special Parameters. + +A +variable + +is a parameter denoted by a +name. + +A variable has a value and zero or more attributes. +Attributes are assigned using the +declare + +builtin command (see +declare + +below in +SHELL BUILTIN COMMANDS). + + +

+ +A parameter is set if it has been assigned a value. The null string is +a valid value. Once a variable is set, it may be unset only by using +the +unset + +builtin command (see +SHELL BUILTIN COMMANDS + + +below). +

+ +A +variable + +may be assigned to by a statement of the form +

+

+ +name=[value] +

+ +

+ +If +value + +is not given, the variable is assigned the null string. All +values + +undergo tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote +removal (see +EXPANSION + + +below). If the variable has its +integer + +attribute set, then +value + +is evaluated as an arithmetic expression even if the $((...)) expansion is +not used (see +Arithmetic Expansion + +below). +Word splitting is not performed, with the exception +of "$@" as explained below under +Special Parameters. + +Pathname expansion is not performed. +Assignment statements may also appear as arguments to the +alias, + +declare, + +typeset, + +export, + +readonly, + +and +local + +builtin commands (declaration commands). +When in posix mode, these builtins may appear in a command after +one or more instances of the command builtin and retain these +assignment statement properties. +

+ +In the context where an assignment statement is assigning a value +to a shell variable or array index, the += operator can be used to +append to or add to the variable's previous value. +This includes arguments to builtin commands such as declare that +accept assignment statements (declaration commands). +When += is applied to a variable for which the integer attribute has been +set, value is evaluated as an arithmetic expression and added to the +variable's current value, which is also evaluated. +When += is applied to an array variable using compound assignment (see +Arrays + +below), the +variable's value is not unset (as it is when using =), and new values are +appended to the array beginning at one greater than the array's maximum index +(for indexed arrays) or added as additional key-value pairs in an +associative array. +When applied to a string-valued variable, value is expanded and +appended to the variable's value. +

+ +A variable can be assigned the nameref attribute using the +-n option to the declare or local builtin commands +(see the descriptions of declare and local below) +to create a nameref, or a reference to another variable. +This allows variables to be manipulated indirectly. +Whenever the nameref variable is referenced, assigned to, unset, or has +its attributes modified (other than using or changing the nameref +attribute itself), the +operation is actually performed on the variable specified by the nameref +variable's value. +A nameref is commonly used within shell functions to refer to a variable +whose name is passed as an argument to the function. +For instance, if a variable name is passed to a shell function as its first +argument, running +

+

+declare -n ref=$1 + +
+ +

+inside the function creates a nameref variable ref whose value is +the variable name passed as the first argument. +References and assignments to ref, and changes to its attributes, +are treated as references, assignments, and attribute modifications +to the variable whose name was passed as $1. +If the control variable in a for loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. +Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. +Namerefs can be unset using the -n option to the unset builtin. +Otherwise, if unset is executed with the name of a nameref variable +as an argument, the variable referenced by the nameref variable will be unset. +  +

Positional Parameters

+ +A +positional parameter + +is a parameter denoted by one or more +digits, other than the single digit 0. Positional parameters are +assigned from the shell's arguments when it is invoked, +and may be reassigned using the +set + +builtin command. Positional parameters may not be assigned to +with assignment statements. The positional parameters are +temporarily replaced when a shell function is executed (see +FUNCTIONS + + +below). +

+ +When a positional parameter consisting of more than a single +digit is expanded, it must be enclosed in braces (see +EXPANSION + + +below). +  +

Special Parameters

+ +The shell treats several parameters specially. These parameters may +only be referenced; assignment to them is not allowed. + +
+
* + +
+Expands to the positional parameters, starting from one. +When the expansion is not within double quotes, each positional parameter +expands to a separate word. +In contexts where it is performed, those words +are subject to further word splitting and pathname expansion. +When the expansion occurs within double quotes, it expands to a single word +with the value of each parameter separated by the first character of the +IFS + + +special variable. That is, "$*" is equivalent +to "$1c$2c...", where +c + +is the first character of the value of the +IFS + + +variable. If +IFS + + +is unset, the parameters are separated by spaces. +If +IFS + + +is null, the parameters are joined without intervening separators. +
@ + +
+Expands to the positional parameters, starting from one. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +When the +expansion occurs within double quotes, each parameter expands to a +separate word. That is, "$@" is equivalent to +"$1" "$2" ... +If the double-quoted expansion occurs within a word, the expansion of +the first parameter is joined with the beginning part of the original +word, and the expansion of the last parameter is joined with the last +part of the original word. +When there are no positional parameters, "$@" and +$@ + +expand to nothing (i.e., they are removed). +
# + +
+Expands to the number of positional parameters in decimal. +
? + +
+Expands to the exit status of the most recently executed foreground +pipeline. +
- + +
+Expands to the current option flags as specified upon invocation, +by the +set + +builtin command, or those set by the shell itself +(such as the +-i + +option). +
$ + +
+Expands to the process ID of the shell. In a () subshell, it +expands to the process ID of the current shell, not the +subshell. +
! + +
+Expands to the process ID of the job most recently placed into the +background, whether executed as an asynchronous command or using +the bg builtin (see +JOB CONTROL + + +below). +
0 + +
+Expands to the name of the shell or shell script. This is set at +shell initialization. If +bash + +is invoked with a file of commands, +$0 + +is set to the name of that file. If +bash + +is started with the +-c + +option, then +$0 + +is set to the first argument after the string to be +executed, if one is present. Otherwise, it is set +to the filename used to invoke +bash, + +as given by argument zero. + +
+  +

Shell Variables

+ +The following variables are set by the shell: +

+ + +

+
_ + +
+At shell startup, set to the pathname used to invoke the +shell or shell script being executed as passed in the environment +or argument list. +Subsequently, expands to the last argument to the previous simple +command executed in the foreground, after expansion. +Also set to the full pathname used to invoke each command executed +and placed in the environment exported to that command. +When checking mail, this parameter holds the name of the mail file +currently being checked. +
BASH + +
+Expands to the full filename used to invoke this instance of +bash. + +
BASHOPTS + +
+A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the +-s + +option to the +shopt + +builtin command (see +SHELL BUILTIN COMMANDS + + +below). The options appearing in +BASHOPTS + + +are those reported as +on + +by shopt. +If this variable is in the environment when +bash + +starts up, each shell option in the list will be enabled before +reading any startup files. +This variable is read-only. +
BASHPID + +
+Expands to the process ID of the current bash process. +This differs from $$ under certain circumstances, such as subshells +that do not require bash to be re-initialized. +Assignments to +BASHPID + + +have no effect. +If +BASHPID + +is unset, it loses its special properties, even if it is +subsequently reset. +
BASH_ALIASES + +
+An associative array variable whose members correspond to the internal +list of aliases as maintained by the alias builtin. +Elements added to this array appear in the alias list; however, +unsetting array elements currently does not cause aliases to be removed +from the alias list. +If +BASH_ALIASES + +is unset, it loses its special properties, even if it is +subsequently reset. +
BASH_ARGC + +
+An array variable whose values are the number of parameters in each +frame of the current bash execution call stack. +The number of +parameters to the current subroutine (shell function or script executed +with . or source) is at the top of the stack. +When a subroutine is executed, the number of parameters passed is pushed onto +BASH_ARGC. + + +The shell sets +BASH_ARGC + + +only when in extended debugging mode (see the description of the +extdebug + +option to the +shopt + +builtin below). +Setting extdebug after the shell has started to execute a script, +or referencing this variable when extdebug is not set, +may result in inconsistent values. +
BASH_ARGV + +
+An array variable containing all of the parameters in the current bash +execution call stack. The final parameter of the last subroutine call +is at the top of the stack; the first parameter of the initial call is +at the bottom. When a subroutine is executed, the parameters supplied +are pushed onto +BASH_ARGV. + + +The shell sets +BASH_ARGV + + +only when in extended debugging mode +(see the description of the +extdebug + +option to the +shopt + +builtin below). +Setting extdebug after the shell has started to execute a script, +or referencing this variable when extdebug is not set, +may result in inconsistent values. +
BASH_ARGV0 + +
+When referenced, this variable expands to the name of the shell or shell +script (identical to +$0; + +see the description of special parameter 0 above). +Assignment to +BASH_ARGV0 + +causes the value assigned to also be assigned to $0. +If +BASH_ARGV0 + +is unset, it loses its special properties, even if it is +subsequently reset. +
BASH_CMDS + +
+An associative array variable whose members correspond to the internal +hash table of commands as maintained by the hash builtin. +Elements added to this array appear in the hash table; however, +unsetting array elements currently does not cause command names to be removed +from the hash table. +If +BASH_CMDS + +is unset, it loses its special properties, even if it is +subsequently reset. +
BASH_COMMAND + +
+The command currently being executed or about to be executed, unless the +shell is executing a command as the result of a trap, +in which case it is the command executing at the time of the trap. +If +BASH_COMMAND + +is unset, it loses its special properties, even if it is +subsequently reset. +
BASH_EXECUTION_STRING + +
+The command argument to the -c invocation option. +
BASH_LINENO + +
+An array variable whose members are the line numbers in source files +where each corresponding member of +FUNCNAME + + +was invoked. +${BASH_LINENO[$i]} is the line number in the source +file (${BASH_SOURCE[$i+1]}) where +${FUNCNAME[$i]} was called +(or ${BASH_LINENO[$i-1]} if referenced within another +shell function). +Use +LINENO + + +to obtain the current line number. +
BASH_LOADABLES_PATH + +
+A colon-separated list of directories in which the shell looks for +dynamically loadable builtins specified by the +enable + +command. +
BASH_REMATCH + +
+An array variable whose members are assigned by the =~ binary +operator to the [[ conditional command. +The element with index 0 is the portion of the string +matching the entire regular expression. +The element with index n is the portion of the +string matching the nth parenthesized subexpression. +
BASH_SOURCE + +
+An array variable whose members are the source filenames +where the corresponding shell function names in the +FUNCNAME + + +array variable are defined. +The shell function +${FUNCNAME[$i]} is defined in the file +${BASH_SOURCE[$i]} and called from +${BASH_SOURCE[$i+1]}. +
BASH_SUBSHELL + +
+Incremented by one within each subshell or subshell environment when +the shell begins executing in that environment. +The initial value is 0. +If +BASH_SUBSHELL + +is unset, it loses its special properties, even if it is +subsequently reset. +
BASH_VERSINFO + +
+A readonly array variable whose members hold version information for +this instance of +bash. + +The values assigned to the array members are as follows: +

+

+
+
BASH_VERSINFO[0] + +
+The major version number (the release). +
BASH_VERSINFO[1] + +
+The minor version number (the version). +
BASH_VERSINFO[2] + +
+The patch level. +
BASH_VERSINFO[3] + +
+The build version. +
BASH_VERSINFO[4] + +
+The release status (e.g., beta1). +
BASH_VERSINFO[5] + +
+The value of +MACHTYPE. + + +
+ +
BASH_VERSION + +
+Expands to a string describing the version of this instance of +bash. + +
COMP_CWORD + +
+An index into ${COMP_WORDS} of the word containing the current +cursor position. +This variable is available only in shell functions invoked by the +programmable completion facilities (see Programmable Completion +below). +
COMP_KEY + +
+The key (or final key of a key sequence) used to invoke the current +completion function. +
COMP_LINE + +
+The current command line. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see Programmable Completion +below). +
COMP_POINT + +
+The index of the current cursor position relative to the beginning of +the current command. +If the current cursor position is at the end of the current command, +the value of this variable is equal to ${#COMP_LINE}. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see Programmable Completion +below). +
COMP_TYPE + +
+Set to an integer value corresponding to the type of completion attempted +that caused a completion function to be called: +TAB, for normal completion, +?, for listing completions after successive tabs, +!, for listing alternatives on partial word completion, +@, to list completions if the word is not unmodified, +or +%, for menu completion. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see Programmable Completion +below). +
COMP_WORDBREAKS + +
+The set of characters that the readline library treats as word +separators when performing word completion. +If +COMP_WORDBREAKS + + +is unset, it loses its special properties, even if it is +subsequently reset. +
COMP_WORDS + +
+An array variable (see Arrays below) consisting of the individual +words in the current command line. +The line is split into words as readline would split it, using +COMP_WORDBREAKS + + +as described above. +This variable is available only in shell functions invoked by the +programmable completion facilities (see Programmable Completion +below). +
COPROC + +
+An array variable (see Arrays below) created to hold the file descriptors +for output from and input to an unnamed coprocess (see Coprocesses +above). +
DIRSTACK + +
+An array variable (see +Arrays + +below) containing the current contents of the directory stack. +Directories appear in the stack in the order they are displayed by the +dirs + +builtin. +Assigning to members of this array variable may be used to modify +directories already in the stack, but the +pushd + +and +popd + +builtins must be used to add and remove directories. +Assignment to this variable will not change the current directory. +If +DIRSTACK + + +is unset, it loses its special properties, even if it is +subsequently reset. +
EPOCHREALTIME + +
+Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see time(3)) as a floating point value +with micro-second granularity. +Assignments to +EPOCHREALTIME + + +are ignored. +If +EPOCHREALTIME + + +is unset, it loses its special properties, even if it is +subsequently reset. +
EPOCHSECONDS + +
+Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see time(3)). +Assignments to +EPOCHSECONDS + + +are ignored. +If +EPOCHSECONDS + + +is unset, it loses its special properties, even if it is +subsequently reset. +
EUID + +
+Expands to the effective user ID of the current user, initialized at +shell startup. This variable is readonly. +
FUNCNAME + +
+An array variable containing the names of all shell functions +currently in the execution call stack. +The element with index 0 is the name of any currently-executing +shell function. +The bottom-most element (the one with the highest index) is +"main". + +This variable exists only when a shell function is executing. +Assignments to +FUNCNAME + + +have no effect. +If +FUNCNAME + + +is unset, it loses its special properties, even if it is +subsequently reset. +

+ + +This variable can be used with BASH_LINENO and BASH_SOURCE. +Each element of FUNCNAME has corresponding elements in +BASH_LINENO and BASH_SOURCE to describe the call stack. +For instance, ${FUNCNAME[$i]} was called from the file +${BASH_SOURCE[$i+1]} at line number +${BASH_LINENO[$i]}. +The caller builtin displays the current call stack using this +information. +

GROUPS + +
+An array variable containing the list of groups of which the current +user is a member. +Assignments to +GROUPS + + +have no effect. +If +GROUPS + + +is unset, it loses its special properties, even if it is +subsequently reset. +
HISTCMD + +
+The history number, or index in the history list, of the current +command. +Assignments to +HISTCMD + + +are ignored. +If +HISTCMD + + +is unset, it loses its special properties, even if it is +subsequently reset. +
HOSTNAME + +
+Automatically set to the name of the current host. +
HOSTTYPE + +
+Automatically set to a string that uniquely +describes the type of machine on which +bash + +is executing. +The default is system-dependent. +
LINENO + +
+Each time this parameter is referenced, the shell substitutes +a decimal number representing the current sequential line number +(starting with 1) within a script or function. When not in a +script or function, the value substituted is not guaranteed to +be meaningful. +If +LINENO + + +is unset, it loses its special properties, even if it is +subsequently reset. +
MACHTYPE + +
+Automatically set to a string that fully describes the system +type on which +bash + +is executing, in the standard GNU cpu-company-system format. +The default is system-dependent. +
MAPFILE + +
+An array variable (see Arrays below) created to hold the text +read by the mapfile builtin when no variable name is supplied. +
OLDPWD + +
+The previous working directory as set by the +cd + +command. +
OPTARG + +
+The value of the last option argument processed by the +getopts + +builtin command (see +SHELL BUILTIN COMMANDS + + +below). +
OPTIND + +
+The index of the next argument to be processed by the +getopts + +builtin command (see +SHELL BUILTIN COMMANDS + + +below). +
OSTYPE + +
+Automatically set to a string that +describes the operating system on which +bash + +is executing. +The default is system-dependent. +
PIPESTATUS + +
+An array variable (see +Arrays + +below) containing a list of exit status values from the processes +in the most-recently-executed foreground pipeline (which may +contain only a single command). +
PPID + +
+The process ID of the shell's parent. This variable is readonly. +
PWD + +
+The current working directory as set by the +cd + +command. +
RANDOM + +
+Each time this parameter is referenced, it expands to a random integer +between 0 and 32767. +Assigning +a value to +RANDOM + + +initializes (seeds) the sequence of random numbers. +If +RANDOM + + +is unset, it loses its special properties, even if it is +subsequently reset. +
READLINE_LINE + +
+The contents of the +readline + +line buffer, for use with +bind -x + +(see +SHELL BUILTIN COMMANDS + + +below). +
READLINE_MARK + +
+The position of the mark (saved insertion point) in the +readline + +line buffer, for use with +bind -x + +(see +SHELL BUILTIN COMMANDS + + +below). +The characters between the insertion point and the mark are often +called the region. +
READLINE_POINT + +
+The position of the insertion point in the +readline + +line buffer, for use with +bind -x + +(see +SHELL BUILTIN COMMANDS + + +below). +
REPLY + +
+Set to the line of input read by the +read + +builtin command when no arguments are supplied. +
SECONDS + +
+Each time this parameter is +referenced, the number of seconds since shell invocation is returned. If a +value is assigned to +SECONDS, + + +the value returned upon subsequent +references is +the number of seconds since the assignment plus the value assigned. +The number of seconds at shell invocation and the current time is always +determined by querying the system clock. +If +SECONDS + + +is unset, it loses its special properties, even if it is +subsequently reset. +
SHELLOPTS + +
+A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the +-o + +option to the +set + +builtin command (see +SHELL BUILTIN COMMANDS + + +below). The options appearing in +SHELLOPTS + + +are those reported as +on + +by set -o. +If this variable is in the environment when +bash + +starts up, each shell option in the list will be enabled before +reading any startup files. +This variable is read-only. +
SHLVL + +
+Incremented by one each time an instance of +bash + +is started. +
SRANDOM + +
+This variable expands to a 32-bit pseudo-random number each time it is +referenced. The random number generator is not linear on systems that +support /dev/urandom or arc4random, so each returned number +has no relationship to the numbers preceding it. +The random number generator cannot be seeded, so assignments to this +variable have no effect. +If +SRANDOM + + +is unset, it loses its special properties, +even if it is subsequently reset. +
UID + +
+Expands to the user ID of the current user, initialized at shell startup. +This variable is readonly. + +
+

+ +The following variables are used by the shell. In some cases, +bash + +assigns a default value to a variable; these cases are noted +below. +

+ + +

+
BASH_COMPAT + +
+The value is used to set the shell's compatibility level. +See +SHELL COMPATIBILITY MODE + + +below for a description of the various compatibility +levels and their effects. +The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) +corresponding to the desired compatibility level. +If BASH_COMPAT is unset or set to the empty string, the compatibility +level is set to the default for the current version. +If BASH_COMPAT is set to a value that is not one of the valid +compatibility levels, the shell prints an error message and sets the +compatibility level to the default for the current version. +The valid values correspond to the compatibility levels +described below under +BSHELLCOMPATIBILITYMODE. + + +For example, 4.2 and 42 are valid values that correspond +to the compat42 shopt option +and set the compatibility level to 42. +The current version is also a valid value. +
BASH_ENV + +
+If this parameter is set when bash is executing a shell script, +its value is interpreted as a filename containing commands to +initialize the shell, as in +~/.bashrc. + +The value of +BASH_ENV + + +is subjected to parameter expansion, command substitution, and arithmetic +expansion before being interpreted as a filename. +PATH + + +is not used to search for the resultant filename. +
BASH_XTRACEFD + +
+If set to an integer corresponding to a valid file descriptor, bash +will write the trace output generated when +set -x + +is enabled to that file descriptor. +The file descriptor is closed when +BASH_XTRACEFD + + +is unset or assigned a new value. +Unsetting +BASH_XTRACEFD + + +or assigning it the empty string causes the +trace output to be sent to the standard error. +Note that setting +BASH_XTRACEFD + + +to 2 (the standard error file +descriptor) and then unsetting it will result in the standard error +being closed. +
CDPATH + +
+The search path for the +cd + +command. +This is a colon-separated list of directories in which the shell looks +for destination directories specified by the +cd + +command. +A sample value is +".:~:/usr". + +
CHILD_MAX + +
+Set the number of exited child status values for the shell to remember. +Bash will not allow this value to be decreased below a POSIX-mandated +minimum, and there is a maximum value (currently 8192) that this may +not exceed. +The minimum value is system-dependent. +
COLUMNS + +
+Used by the select compound command to determine the terminal width +when printing selection lists. +Automatically set if the +checkwinsize + +option is enabled or in an interactive shell upon receipt of a +SIGWINCH. + + +
COMPREPLY + +
+An array variable from which bash reads the possible completions +generated by a shell function invoked by the programmable completion +facility (see Programmable Completion below). +Each array element contains one possible completion. +
EMACS + +
+If bash finds this variable in the environment when the shell starts +with value +t, + +it assumes that the shell is running in an Emacs shell buffer and disables +line editing. +
ENV + +
+Expanded and executed similarly to +BASH_ENV + + +(see INVOCATION above) +when an interactive shell is invoked in posix mode. +
EXECIGNORE + +
+A colon-separated list of shell patterns (see Pattern Matching) +defining the list of filenames to be ignored by command search using +PATH. +Files whose full pathnames match one of these patterns are not considered +executable files for the purposes of completion and command execution +via PATH lookup. +This does not affect the behavior of the [, test, and [[ +commands. +Full pathnames in the command hash table are not subject to EXECIGNORE. +Use this variable to ignore shared library files that have the executable +bit set, but are not executable files. +The pattern matching honors the setting of the extglob shell +option. +
FCEDIT + +
+The default editor for the +fc + +builtin command. +
FIGNORE + +
+A colon-separated list of suffixes to ignore when performing +filename completion (see +READLINE + + +below). +A filename whose suffix matches one of the entries in +FIGNORE + + +is excluded from the list of matched filenames. +A sample value is +".o:~". + +
FUNCNEST + +
+If set to a numeric value greater than 0, defines a maximum function +nesting level. Function invocations that exceed this nesting level +will cause the current command to abort. +
GLOBIGNORE + +
+A colon-separated list of patterns defining the set of file names to +be ignored by pathname expansion. +If a file name matched by a pathname expansion pattern also matches one +of the patterns in +GLOBIGNORE, + + +it is removed from the list of matches. +
HISTCONTROL + +
+A colon-separated list of values controlling how commands are saved on +the history list. +If the list of values includes +ignorespace, + +lines which begin with a +space + +character are not saved in the history list. +A value of +ignoredups + +causes lines matching the previous history entry to not be saved. +A value of +ignoreboth + +is shorthand for ignorespace and ignoredups. +A value of +erasedups + +causes all previous lines matching the current line to be removed from +the history list before that line is saved. +Any value not in the above list is ignored. +If +HISTCONTROL + + +is unset, or does not include a valid value, +all lines read by the shell parser are saved on the history list, +subject to the value of +HISTIGNORE. + + +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +HISTCONTROL. + + +
HISTFILE + +
+The name of the file in which command history is saved (see +HISTORY + + +below). The default value is ~/.bash_history. If unset, the +command history is not saved when a shell exits. +
HISTFILESIZE + +
+The maximum number of lines contained in the history file. When this +variable is assigned a value, the history file is truncated, if +necessary, +to contain no more than that number of lines by removing the oldest entries. +The history file is also truncated to this size after +writing it when a shell exits. +If the value is 0, the history file is truncated to zero size. +Non-numeric values and numeric values less than zero inhibit truncation. +The shell sets the default value to the value of HISTSIZE +after reading any startup files. +
HISTIGNORE + +
+A colon-separated list of patterns used to decide which command lines +should be saved on the history list. Each pattern is anchored at the +beginning of the line and must match the complete line (no implicit +`*' is appended). Each pattern is tested against the line +after the checks specified by +HISTCONTROL + + +are applied. +In addition to the normal shell pattern matching characters, `&' +matches the previous history line. `&' may be escaped using a +backslash; the backslash is removed before attempting a match. +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +HISTIGNORE. + + +The pattern matching honors the setting of the extglob shell +option. +
HISTSIZE + +
+The number of commands to remember in the command history (see +HISTORY + + +below). +If the value is 0, commands are not saved in the history list. +Numeric values less than zero result in every command being saved +on the history list (there is no limit). +The shell sets the default value to 500 after reading any startup files. +
HISTTIMEFORMAT + +
+If this variable is set and not null, its value is used as a format string +for strftime(3) to print the time stamp associated with each history +entry displayed by the history builtin. +If this variable is set, time stamps are written to the history file so +they may be preserved across shell sessions. +This uses the history comment character to distinguish timestamps from +other history lines. +
HOME + +
+The home directory of the current user; the default argument for the +cd builtin command. +The value of this variable is also used when performing tilde expansion. +
HOSTFILE + +
+Contains the name of a file in the same format as + +/etc/hosts + +that should be read when the shell needs to complete a +hostname. +The list of possible hostname completions may be changed while the +shell is running; +the next time hostname completion is attempted after the +value is changed, +bash + +adds the contents of the new file to the existing list. +If +HOSTFILE + + +is set, but has no value, or does not name a readable file, +bash attempts to read + +/etc/hosts + +to obtain the list of possible hostname completions. +When +HOSTFILE + + +is unset, the hostname list is cleared. +
IFS + +
+The +Internal Field Separator + +that is used +for word splitting after expansion and to +split lines into words with the +read + +builtin command. The default value is +``<space><tab><newline>''. +
IGNOREEOF + +
+Controls the +action of an interactive shell on receipt of an +EOF + + +character as the sole input. If set, the value is the number of +consecutive +EOF + + +characters which must be +typed as the first characters on an input line before +bash + +exits. If the variable exists but does not have a numeric value, or +has no value, the default value is 10. If it does not exist, +EOF + + +signifies the end of input to the shell. +
INPUTRC + +
+The filename for the +readline + +startup file, overriding the default of + +~/.inputrc + +(see +READLINE + + +below). +
INSIDE_EMACS + +
+If this variable appears in the environment when the shell starts, +bash assumes that it is running inside an Emacs shell buffer +and may disable line editing, depending on the value of TERM. +
LANG + +
+Used to determine the locale category for any category not specifically +selected with a variable starting with LC_. +
LC_ALL + +
+This variable overrides the value of +LANG + + +and any other +LC_ variable specifying a locale category. +
LC_COLLATE + +
+This variable determines the collation order used when sorting the +results of pathname expansion, and determines the behavior of range +expressions, equivalence classes, and collating sequences within +pathname expansion and pattern matching. +
LC_CTYPE + +
+This variable determines the interpretation of characters and the +behavior of character classes within pathname expansion and pattern +matching. +
LC_MESSAGES + +
+This variable determines the locale used to translate double-quoted +strings preceded by a $. +
LC_NUMERIC + +
+This variable determines the locale category used for number formatting. +
LC_TIME + +
+This variable determines the locale category used for data and time +formatting. +
LINES + +
+Used by the select compound command to determine the column length +for printing selection lists. +Automatically set if the +checkwinsize + +option is enabled or in an interactive shell upon receipt of a +SIGWINCH. + + +
MAIL + +
+If this parameter is set to a file or directory name and the +MAILPATH + + +variable is not set, +bash + +informs the user of the arrival of mail in the specified file or +Maildir-format directory. +
MAILCHECK + +
+Specifies how +often (in seconds) +bash + +checks for mail. The default is 60 seconds. When it is time to check +for mail, the shell does so before displaying the primary prompt. +If this variable is unset, or set to a value that is not a number +greater than or equal to zero, the shell disables mail checking. +
MAILPATH + +
+A colon-separated list of filenames to be checked for mail. +The message to be printed when mail arrives in a particular file +may be specified by separating the filename from the message with a `?'. +When used in the text of the message, $_ expands to the name of +the current mailfile. +Example: +
+

+ +MAILPATH=aq/var/mail/bfox?"You have mail":~/shell-mail?"$_ has mail!"aq +

+ +Bash + +can be configured to supply +a default value for this variable (there is no value by default), +but the location of the user +mail files that it uses is system dependent (e.g., /var/mail/$USER). +

+ +
OPTERR + +
+If set to the value 1, +bash + +displays error messages generated by the +getopts + +builtin command (see +SHELL BUILTIN COMMANDS + + +below). +OPTERR + + +is initialized to 1 each time the shell is invoked or a shell +script is executed. +
PATH + +
+The search path for commands. It +is a colon-separated list of directories in which +the shell looks for commands (see +COMMAND EXECUTION + + +below). +A zero-length (null) directory name in the value of +PATH + + +indicates the current directory. +A null directory name may appear as two adjacent colons, or as an initial +or trailing colon. +The default path is system-dependent, +and is set by the administrator who installs +bash. + +A common value is + +/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin. + + +
POSIXLY_CORRECT + +
+If this variable is in the environment when bash starts, the shell +enters posix mode before reading the startup files, as if the +--posix + +invocation option had been supplied. If it is set while the shell is +running, bash enables posix mode, as if the command +set -o posix + +had been executed. +When the shell enters posix mode, it sets this variable if it was +not already set. +
PROMPT_COMMAND + +
+If this variable is set, and is an array, +the value of each set element is executed as a command +prior to issuing each primary prompt. +If this is set but not an array variable, +its value is used as a command to execute instead. +
PROMPT_DIRTRIM + +
+If set to a number greater than zero, the value is used as the number of +trailing directory components to retain when expanding the \w and +\W prompt string escapes (see +PROMPTING + + +below). Characters removed are replaced with an ellipsis. +
PS0 + +
+The value of this parameter is expanded (see +PROMPTING + + +below) and displayed by interactive shells after reading a command +and before the command is executed. +
PS1 + +
+The value of this parameter is expanded (see +PROMPTING + + +below) and used as the primary prompt string. The default value is +``\s-\v\$ ''. +
PS2 + +
+The value of this parameter is expanded as with +PS1 + + +and used as the secondary prompt string. The default is +``> ''. +
PS3 + +
+The value of this parameter is used as the prompt for the +select + +command (see +SHELL GRAMMAR + + +above). +
PS4 + +
+The value of this parameter is expanded as with +PS1 + + +and the value is printed before each command +bash + +displays during an execution trace. The first character of +the expanded value of +PS4 + + +is replicated multiple times, as necessary, to indicate multiple +levels of indirection. The default is ``+ ''. +
SHELL + +
+This variable expands to the full pathname to the shell. +If it is not set when the shell starts, +bash + +assigns to it the full pathname of the current user's login shell. +
TIMEFORMAT + +
+The value of this parameter is used as a format string specifying +how the timing information for pipelines prefixed with the +time + +reserved word should be displayed. +The % character introduces an escape sequence that is +expanded to a time value or other information. +The escape sequences and their meanings are as follows; the +braces denote optional portions. +

+

+ +
+
%% + +
+A literal %. +
%[p][l]R + +
+The elapsed time in seconds. +
%[p][l]U + +
+The number of CPU seconds spent in user mode. +
%[p][l]S + +
+The number of CPU seconds spent in system mode. +
%P + +
+The CPU percentage, computed as (%U + %S) / %R. + +
+ +
+The optional p is a digit specifying the precision, +the number of fractional digits after a decimal point. +A value of 0 causes no decimal point or fraction to be output. +At most three places after the decimal point may be specified; +values of p greater than 3 are changed to 3. +If p is not specified, the value 3 is used. +
+The optional l specifies a longer format, including +minutes, of the form MMmSS.FFs. +The value of p determines whether or not the fraction is +included. +
+If this variable is not set, bash acts as if it had the +value $aq\nreal\t%3lR\nuser\t%3lU\nsys\t%3lSaq. +If the value is null, no timing information is displayed. +A trailing newline is added when the format string is displayed. + +
TMOUT + +
+If set to a value greater than zero, +TMOUT + + +is treated as the +default timeout for the read builtin. +The select command terminates if input does not arrive +after +TMOUT + + +seconds when input is coming from a terminal. +In an interactive shell, the value is interpreted as the +number of seconds to wait for a line of input after issuing the +primary prompt. +Bash + +terminates after waiting for that number of seconds if a complete +line of input does not arrive. +
TMPDIR + +
+If set, bash uses its value as the name of a directory in which +bash creates temporary files for the shell's use. +
auto_resume + +
+This variable controls how the shell interacts with the user and +job control. If this variable is set, single word simple +commands without redirections are treated as candidates for resumption +of an existing stopped job. There is no ambiguity allowed; if there is +more than one job beginning with the string typed, the job most recently +accessed is selected. The +name + +of a stopped job, in this context, is the command line used to +start it. +If set to the value +exact, + +the string supplied must match the name of a stopped job exactly; +if set to +substring, + +the string supplied needs to match a substring of the name of a +stopped job. The +substring + +value provides functionality analogous to the +%? + +job identifier (see +JOB CONTROL + + +below). If set to any other value, the supplied string must +be a prefix of a stopped job's name; this provides functionality +analogous to the %string job identifier. +
histchars + +
+The two or three characters which control history expansion +and tokenization (see +HISTORY EXPANSION + + +below). The first character is the history expansion character, +the character which signals the start of a history +expansion, normally `!'. +The second character is the quick substitution +character, which is used as shorthand for re-running the previous +command entered, substituting one string for another in the command. +The default is `^'. +The optional third character is the character +which indicates that the remainder of the line is a comment when found +as the first character of a word, normally `#'. The history +comment character causes history substitution to be skipped for the +remaining words on the line. It does not necessarily cause the shell +parser to treat the rest of the line as a comment. + +
+  +

Arrays

+ +Bash + +provides one-dimensional indexed and associative array variables. +Any variable may be used as an indexed array; the +declare + +builtin will explicitly declare an array. +There is no maximum +limit on the size of an array, nor any requirement that members +be indexed or assigned contiguously. +Indexed arrays are referenced using integers (including arithmetic +expressions) and are zero-based; associative arrays are referenced +using arbitrary strings. +Unless otherwise noted, indexed array indices must be non-negative integers. +

+ +An indexed array is created automatically if any variable is assigned to +using the syntax name[subscript]=value. The +subscript + +is treated as an arithmetic expression that must evaluate to a number. +To explicitly declare an indexed array, use +declare -a name + +(see +SHELL BUILTIN COMMANDS + + +below). +declare -a name[subscript] + +is also accepted; the subscript is ignored. +

+ +Associative arrays are created using +declare -A name. + +

+ +Attributes may be +specified for an array variable using the +declare + +and +readonly + +builtins. Each attribute applies to all members of an array. +

+ +Arrays are assigned to using compound assignments of the form +name=(value1 ... valuen), where each +value may be of the form [subscript]=string. +Indexed array assignments do not require anything but string. +Each value in the list is expanded using all the shell expansions +described below under +EXPANSION. + + +When assigning to indexed arrays, if the optional brackets and subscript +are supplied, that index is assigned to; +otherwise the index of the element assigned is the last index assigned +to by the statement plus one. Indexing starts at zero. +

+ +When assigning to an associative array, the words in a compound assignment +may be either assignment statements, for which the subscript is required, +or a list of words that is interpreted as a sequence of alternating keys +and values: +name=( key1 value1 key2 value2 ...). +These are treated identically to +name=( [key1]=value1 [key2]=value2 ...). +The first word in the list determines how the remaining words +are interpreted; all assignments in a list must be of the same type. +When using key/value pairs, the keys may not be missing or empty; +a final missing value is treated like the empty string. +

+ +This syntax is also accepted by the +declare + +builtin. Individual array elements may be assigned to using the +name[subscript]=value syntax introduced above. +When assigning to an indexed array, if +name + +is subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +name, so negative indices count back from the end of the +array, and an index of -1 references the last element. +

+ +Any element of an array may be referenced using +${name[subscript]}. The braces are required to avoid +conflicts with pathname expansion. If +subscript is @ or *, the word expands to +all members of name. These subscripts differ only when the +word appears within double quotes. If the word is double-quoted, +${name[*]} expands to a single +word with the value of each array member separated by the first +character of the +IFS + + +special variable, and ${name[@]} expands each element of +name to a separate word. When there are no array members, +${name[@]} expands to nothing. +If the double-quoted expansion occurs within a word, the expansion of +the first parameter is joined with the beginning part of the original +word, and the expansion of the last parameter is joined with the last +part of the original word. +This is analogous to the expansion +of the special parameters * and @ (see +Special Parameters + +above). ${#name[subscript]} expands to the length of +${name[subscript]}. If subscript is * or +@, the expansion is the number of elements in the array. +If the +subscript + +used to reference an element of an indexed array +evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the array, +so negative indices count back from the end of the +array, and an index of -1 references the last element. +

+ +Referencing an array variable without a subscript is equivalent to +referencing the array with a subscript of 0. +Any reference to a variable using a valid subscript is legal, and +bash + +will create an array if necessary. +

+ +An array variable is considered set if a subscript has been assigned a +value. The null string is a valid value. +

+ +It is possible to obtain the keys (indices) of an array as well as the values. +${!name[@]} and ${!name[*]} +expand to the indices assigned in array variable name. +The treatment when in double quotes is similar to the expansion of the +special parameters @ and * within double quotes. +

+ +The +unset + +builtin is used to destroy arrays. unset name[subscript] +destroys the array element at index subscript, +for both indexed and associative arrays. +Negative subscripts to indexed arrays are interpreted as described above. +Unsetting the last element of an array variable does not unset the variable. +unset name, where name is an array, or +unset name[subscript], where +subscript is * or @, removes the entire array. +

+ +When using a variable name with a subscript as an argument to a command, +such as with unset, without using the word expansion syntax +described above, the argument is subject to pathname expansion. +If pathname expansion is not desired, the argument should be quoted. +

+ +The +declare, + +local, + +and +readonly + +builtins each accept a +-a + +option to specify an indexed array and a +-A + +option to specify an associative array. +If both options are supplied, +-A + +takes precedence. +The +read + +builtin accepts a +-a + +option to assign a list of words read from the standard input +to an array. The +set + +and +declare + +builtins display array values in a way that allows them to be +reused as assignments. +  +

EXPANSION

+ +Expansion is performed on the command line after it has been split into +words. There are seven kinds of expansion performed: +brace expansion, + +tilde expansion, + +parameter and variable expansion, + +command substitution, + +arithmetic expansion, + +word splitting, + +and +pathname expansion. + +

+ +The order of expansions is: +brace expansion; +tilde expansion, parameter and variable expansion, arithmetic expansion, +and command substitution (done in a left-to-right fashion); +word splitting; +and pathname expansion. +

+ +On systems that can support it, there is an additional expansion +available: process substitution. +This is performed at the +same time as tilde, parameter, variable, and arithmetic expansion and +command substitution. +

+ +After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +(quote removal). +

+ +Only brace expansion, word splitting, and pathname expansion +can increase the number of words of the expansion; other expansions +expand a single word to a single word. +The only exceptions to this are the expansions of +"$@" and "${name[@]}", +and, in most cases, $* and ${name[*]} +as explained above (see +PARAMETERS). + + +  +

Brace Expansion

+ +Brace expansion + +is a mechanism by which arbitrary strings +may be generated. This mechanism is similar to +pathname expansion, but the filenames generated +need not exist. Patterns to be brace expanded take +the form of an optional +preamble, + +followed by either a series of comma-separated strings or +a sequence expression between a pair of braces, followed by +an optional +postscript. + +The preamble is prefixed to each string contained +within the braces, and the postscript is then appended +to each resulting string, expanding left to right. +

+ +Brace expansions may be nested. The results of each expanded +string are not sorted; left to right order is preserved. +For example, a{d,c,b}e expands into `ade ace abe'. +

+ +A sequence expression takes the form +{x..y[..incr]}, +where x and y are either integers or single characters, +and incr, an optional increment, is an integer. +When integers are supplied, the expression expands to each number between +x and y, inclusive. +Supplied integers may be prefixed with 0 to force each term to have the +same width. +When either x or y begins with a zero, the shell +attempts to force all generated terms to contain the same number of digits, +zero-padding where necessary. +When characters are supplied, the expression expands to each character +lexicographically between x and y, inclusive, +using the default C locale. +Note that both x and y must be of the same type. +When the increment is supplied, it is used as the difference between +each term. The default increment is 1 or -1 as appropriate. +

+ +Brace expansion is performed before any other expansions, +and any characters special to other expansions are preserved +in the result. It is strictly textual. +Bash + +does not apply any syntactic interpretation to the context of the +expansion or the text between the braces. +

+ +A correctly-formed brace expansion must contain unquoted opening +and closing braces, and at least one unquoted comma or a valid +sequence expression. +Any incorrectly formed brace expansion is left unchanged. +A { or , may be quoted with a backslash to prevent its +being considered part of a brace expression. +To avoid conflicts with parameter expansion, the string ${ +is not considered eligible for brace expansion, and inhibits brace +expansion until the closing }. +

+ +This construct is typically used as shorthand when the common +prefix of the strings to be generated is longer than in the +above example: +

+

+ +mkdir /usr/local/src/bash/{old,new,dist,bugs} +

+ +or +
+chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}} +
+ +

+ +Brace expansion introduces a slight incompatibility with +historical versions of +sh. + +sh + +does not treat opening or closing braces specially when they +appear as part of a word, and preserves them in the output. +Bash + +removes braces from words as a consequence of brace +expansion. For example, a word entered to +sh + +as file{1,2} +appears identically in the output. The same word is +output as +file1 file2 + +after expansion by +bash. + +If strict compatibility with +sh + +is desired, start +bash + +with the ++B + +option or disable brace expansion with the ++B + +option to the +set + +command (see +SHELL BUILTIN COMMANDS + + +below). +  +

Tilde Expansion

+ +If a word begins with an unquoted tilde character (`~'), all of +the characters preceding the first unquoted slash (or all characters, +if there is no unquoted slash) are considered a tilde-prefix. +If none of the characters in the tilde-prefix are quoted, the +characters in the tilde-prefix following the tilde are treated as a +possible login name. +If this login name is the null string, the tilde is replaced with the +value of the shell parameter +HOME. + + +If +HOME + + +is unset, the home directory of the user executing the shell is +substituted instead. +Otherwise, the tilde-prefix is replaced with the home directory +associated with the specified login name. +

+ +If the tilde-prefix is a `~+', the value of the shell variable +PWD + + +replaces the tilde-prefix. +If the tilde-prefix is a `~-', the value of the shell variable +OLDPWD, + + +if it is set, is substituted. +If the characters following the tilde in the tilde-prefix consist +of a number N, optionally prefixed +by a `+' or a `-', the tilde-prefix is replaced with the corresponding +element from the directory stack, as it would be displayed by the +dirs + +builtin invoked with the tilde-prefix as an argument. +If the characters following the tilde in the tilde-prefix consist of a +number without a leading `+' or `-', `+' is assumed. +

+ +If the login name is invalid, or the tilde expansion fails, the word +is unchanged. +

+ +Each variable assignment is checked for unquoted tilde-prefixes immediately +following a +: + +or the first +=. + +In these cases, tilde expansion is also performed. +Consequently, one may use filenames with tildes in assignments to +PATH, + + +MAILPATH, + + +and +CDPATH, + + +and the shell assigns the expanded value. +

+ +Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (as described above under +PARAMETERS) + + +when they appear as arguments to simple commands. +Bash does not do this, except for the declaration commands listed +above, when in posix mode. +  +

Parameter Expansion

+ +The `$' character introduces parameter expansion, +command substitution, or arithmetic expansion. The parameter name +or symbol to be expanded may be enclosed in braces, which +are optional but serve to protect the variable to be expanded from +characters immediately following it which could be +interpreted as part of the name. +

+ +When braces are used, the matching ending brace is the first `}' +not escaped by a backslash or within a quoted string, and not within an +embedded arithmetic expansion, command substitution, or parameter +expansion. +

+ + +

+
${parameter}
+The value of parameter is substituted. The braces are required +when +parameter + +is a positional parameter with more than one digit, +or when +parameter + +is followed by a character which is not to be +interpreted as part of its name. +The parameter is a shell parameter as described above +PARAMETERS) or an array reference (Arrays). + +
+

+ +If the first character of parameter is an exclamation point (!), +and parameter is not a nameref, +it introduces a level of indirection. +Bash uses the value formed by expanding the rest of +parameter as the new parameter; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original parameter. +This is known as indirect expansion. +The value is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +If parameter is a nameref, this expands to the name of the +parameter referenced by parameter instead of performing the +complete indirect expansion. +The exceptions to this are the expansions of ${!prefix*} and +${!name[@]} described below. +The exclamation point must immediately follow the left brace in order to +introduce indirection. +

+ +In each of the cases below, word is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +

+ +When not performing substring expansion, using the forms documented below +(e.g., :-), +bash tests for a parameter that is unset or null. Omitting the colon +results in a test only for a parameter that is unset. +

+ + +

+
${parameter:-word}
+Use Default Values. If +parameter + +is unset or null, the expansion of +word + +is substituted. Otherwise, the value of +parameter + +is substituted. +
${parameter:=word}
+Assign Default Values. +If +parameter + +is unset or null, the expansion of +word + +is assigned to +parameter. + +The value of +parameter + +is then substituted. Positional parameters and special parameters may +not be assigned to in this way. +
${parameter:?word}
+Display Error if Null or Unset. +If +parameter + +is null or unset, the expansion of word (or a message to that effect +if +word + +is not present) is written to the standard error and the shell, if it +is not interactive, exits. Otherwise, the value of parameter is +substituted. +
${parameter:+word}
+Use Alternate Value. +If +parameter + +is null or unset, nothing is substituted, otherwise the expansion of +word + +is substituted. +
${parameter:offset}
+ +
${parameter:offset:length}
+ +Substring Expansion. +Expands to up to length characters of the value of parameter +starting at the character specified by offset. +If parameter is @, an indexed array subscripted by +@ or *, or an associative array name, the results differ as +described below. +If length is omitted, expands to the substring of the value of +parameter starting at the character specified by offset +and extending to the end of the value. +length and offset are arithmetic expressions (see +ARITHMETIC EVALUATION + + +below). +

+If offset evaluates to a number less than zero, the value +is used as an offset in characters +from the end of the value of parameter. +If length evaluates to a number less than zero, +it is interpreted as an offset in characters +from the end of the value of parameter rather than +a number of characters, and the expansion is the characters between +offset and that result. +Note that a negative offset must be separated from the colon by at least +one space to avoid being confused with the :- expansion. +

+If parameter is @, the result is length positional +parameters beginning at offset. +A negative offset is taken relative to one greater than the greatest +positional parameter, so an offset of -1 evaluates to the last positional +parameter. +It is an expansion error if length evaluates to a number less than +zero. +

+If parameter is an indexed array name subscripted by @ or *, +the result is the length +members of the array beginning with ${parameter[offset]}. +A negative offset is taken relative to one greater than the maximum +index of the specified array. +It is an expansion error if length evaluates to a number less than +zero. +

+Substring expansion applied to an associative array produces undefined +results. +

+Substring indexing is zero-based unless the positional parameters +are used, in which case the indexing starts at 1 by default. +If offset is 0, and the positional parameters are used, $0 is +prefixed to the list. +

${!prefix*}
+ +
${!prefix@}
+ +Names matching prefix. +Expands to the names of variables whose names begin with prefix, +separated by the first character of the +IFS + + +special variable. +When @ is used and the expansion appears within double quotes, each +variable name expands to a separate word. +
${!name[@]}
+ +
${!name[*]}
+ +List of array keys. +If name is an array variable, expands to the list of array indices +(keys) assigned in name. +If name is not an array, expands to 0 if name is set and null +otherwise. +When @ is used and the expansion appears within double quotes, each +key expands to a separate word. +
${#parameter}
+Parameter length. +The length in characters of the value of parameter is substituted. +If +parameter + +is +* + +or +@, + +the value substituted is the number of positional parameters. +If +parameter + +is an array name subscripted by +* + +or +@, + +the value substituted is the number of elements in the array. +If +parameter + +is an indexed array name subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +parameter, so negative indices count back from the end of the +array, and an index of -1 references the last element. +
${parameter#word}
+ +
${parameter##word}
+ +Remove matching prefix pattern. +The +word + +is expanded to produce a pattern just as in pathname +expansion, and matched against the expanded value of +parameter + +using the rules described under +Pattern Matching + +below. +If the pattern matches the beginning of +the value of +parameter, + +then the result of the expansion is the expanded value of +parameter + +with the shortest matching pattern (the ``#'' case) or the +longest matching pattern (the ``##'' case) deleted. +If +parameter + +is +@ + +or +*, + +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +parameter + +is an array variable subscripted with +@ + +or +*, + +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. +
${parameter%word}
+ +
${parameter%%word}
+ +Remove matching suffix pattern. +The word is expanded to produce a pattern just as in +pathname expansion, and matched against the expanded value of +parameter + +using the rules described under +Pattern Matching + +below. +If the pattern matches a trailing portion of the expanded value of +parameter, + +then the result of the expansion is the expanded value of +parameter + +with the shortest matching pattern (the ``%'' case) or the +longest matching pattern (the ``%%'' case) deleted. +If +parameter + +is +@ + +or +*, + +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +parameter + +is an array variable subscripted with +@ + +or +*, + +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. +
${parameter/pattern/string}
+Pattern substitution. +The pattern is expanded to produce a pattern just as in +pathname expansion, +Parameter is expanded and the longest match of pattern +against its value is replaced with string. +The match is performed using the rules described under +Pattern Matching + +below. +If pattern begins with /, all matches of pattern are +replaced with string. Normally only the first match is replaced. +If pattern begins with #, it must match at the beginning +of the expanded value of parameter. +If pattern begins with %, it must match at the end +of the expanded value of parameter. +If string is null, matches of pattern are deleted +and the / following pattern may be omitted. +If the +nocasematch + +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +If +parameter + +is +@ + +or +*, + +the substitution operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +parameter + +is an array variable subscripted with +@ + +or +*, + +the substitution operation is applied to each member of the +array in turn, and the expansion is the resultant list. +
${parameter^pattern}
+ +
${parameter^^pattern}
+
${parameter,pattern}
+
${parameter,,pattern}
+ +Case modification. +This expansion modifies the case of alphabetic characters in parameter. +The pattern is expanded to produce a pattern just as in +pathname expansion. +Each character in the expanded value of parameter is tested against +pattern, and, if it matches the pattern, its case is converted. +The pattern should not attempt to match more than one character. +The ^ operator converts lowercase letters matching pattern +to uppercase; the , operator converts matching uppercase letters +to lowercase. +The ^^ and ,, expansions convert each matched character in the +expanded value; the ^ and , expansions match and convert only +the first character in the expanded value. +If pattern is omitted, it is treated like a ?, which matches +every character. +If +parameter + +is +@ + +or +*, + +the case modification operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +parameter + +is an array variable subscripted with +@ + +or +*, + +the case modification operation is applied to each member of the +array in turn, and the expansion is the resultant list. +
${parameter@operator}
+Parameter transformation. +The expansion is either a transformation of the value of parameter +or information about parameter itself, depending on the value of +operator. Each operator is a single letter: +

+

+ +
+
U + +
+The expansion is a string that is the value of parameter with lowercase +alphabetic characters converted to uppercase. +
u + +
+The expansion is a string that is the value of parameter with the first +character converted to uppercase, if it is alphabetic. +
L + +
+The expansion is a string that is the value of parameter with uppercase +alphabetic characters converted to lowercase. +
Q + +
+The expansion is a string that is the value of parameter quoted in a +format that can be reused as input. +
E + +
+The expansion is a string that is the value of parameter with backslash +escape sequences expanded as with the $'...' quoting mechanism. +
P + +
+The expansion is a string that is the result of expanding the value of +parameter as if it were a prompt string (see PROMPTING below). +
A + +
+The expansion is a string in the form of +an assignment statement or declare command that, if +evaluated, will recreate parameter with its attributes and value. +
K + +
+Produces a possibly-quoted version of the value of parameter, +except that it prints the values of +indexed and associative arrays as a sequence of quoted key-value pairs +(see Arrays above). +
a + +
+The expansion is a string consisting of flag values representing +parameter's attributes. + +
+

+ +If +parameter + +is +@ + +or +*, + +the operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If +parameter + +is an array variable subscripted with +@ + +or +*, + +the operation is applied to each member of the +array in turn, and the expansion is the resultant list. +

+The result of the expansion is subject to word splitting and pathname +expansion as described below. +

+ +
+  +

Command Substitution

+ +Command substitution allows the output of a command to replace +the command name. There are two forms: +
+

+ +$(command) +

+ +or +
+`command` +
+ +

+ +Bash + +performs the expansion by executing command in a subshell environment +and replacing the command substitution with the standard output of the +command, with any trailing newlines deleted. +Embedded newlines are not deleted, but they may be removed during +word splitting. +The command substitution $(cat file) can be replaced by +the equivalent but faster $(< file). +

+ +When the old-style backquote form of substitution is used, +backslash retains its literal meaning except when followed by +$, + +`, + +or +\. + +The first backquote not preceded by a backslash terminates the +command substitution. +When using the $(command) form, all characters between the +parentheses make up the command; none are treated specially. +

+ +Command substitutions may be nested. To nest when using the backquoted form, +escape the inner backquotes with backslashes. +

+ +If the substitution appears within double quotes, word splitting and +pathname expansion are not performed on the results. +  +

Arithmetic Expansion

+ +Arithmetic expansion allows the evaluation of an arithmetic expression +and the substitution of the result. The format for arithmetic expansion is: +
+

+ +$((expression)) +

+ +

+ +The +expression + +is treated as if it were within double quotes, but a double quote +inside the parentheses is not treated specially. +All tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. +The result is treated as the arithmetic expression to be evaluated. +Arithmetic expansions may be nested. +

+ +The evaluation is performed according to the rules listed below under +ARITHMETIC EVALUATION. + + +If +expression + +is invalid, +bash + +prints a message indicating failure and no substitution occurs. +  +

Process Substitution

+ +Process substitution allows a process's input or output to be +referred to using a filename. +It takes the form of +<(list) +or +>(list). +The process list is run asynchronously, and its input or output +appears as a filename. +This filename is +passed as an argument to the current command as the result of the +expansion. +If the >(list) form is used, writing to +the file will provide input for list. If the +<(list) form is used, the file passed as an +argument should be read to obtain the output of list. +Process substitution is supported on systems that support named +pipes (FIFOs) or the /dev/fd method of naming open files. +

+ +When available, process substitution is performed +simultaneously with parameter and variable expansion, +command substitution, +and arithmetic expansion. +  +

Word Splitting

+ +The shell scans the results of +parameter expansion, +command substitution, +and +arithmetic expansion +that did not occur within double quotes for +word splitting. + +

+ +The shell treats each character of +IFS + + +as a delimiter, and splits the results of the other +expansions into words using these characters as field terminators. +If +IFS + + +is unset, or its +value is exactly +<space><tab><newline>, + +the default, then +sequences of +<space>, + +<tab>, + +and +<newline> + +at the beginning and end of the results of the previous +expansions are ignored, and +any sequence of +IFS + + +characters not at the beginning or end serves to delimit words. +If +IFS + + +has a value other than the default, then sequences of +the whitespace characters +space, + +tab, + +and +newline + +are ignored at the beginning and end of the +word, as long as the whitespace character is in the +value of +IFS + + +(an +IFS + + +whitespace character). +Any character in +IFS + + +that is not +IFS + + +whitespace, along with any adjacent +IFS + + +whitespace characters, delimits a field. +A sequence of +IFS + + +whitespace characters is also treated as a delimiter. +If the value of +IFS + + +is null, no word splitting occurs. +

+ +Explicit null arguments ("" or aqaq) are retained +and passed to commands as empty strings. +Unquoted implicit null arguments, resulting from the expansion of +parameters that have no values, are removed. +If a parameter with no value is expanded within double quotes, a +null argument results and is retained +and passed to a command as an empty string. +When a quoted null argument appears as part of a word whose expansion is +non-null, the null argument is removed. +That is, the word +-daqaq becomes -d after word splitting and +null argument removal. +

+ +Note that if no expansion occurs, no splitting +is performed. +  +

Pathname Expansion

+ +After word splitting, +unless the +-f + +option has been set, +bash + +scans each word for the characters +*, + +?, + +and +[. + +If one of these characters appears, and is not quoted, then the word is +regarded as a +pattern, + +and replaced with an alphabetically sorted list of +filenames matching the pattern +(see +Pattern Matching + + +below). +If no matching filenames are found, +and the shell option +nullglob + +is not enabled, the word is left unchanged. +If the +nullglob + +option is set, and no matches are found, +the word is removed. +If the +failglob + +shell option is set, and no matches are found, an error message +is printed and the command is not executed. +If the shell option +nocaseglob + +is enabled, the match is performed without regard to the case +of alphabetic characters. +When a pattern is used for pathname expansion, +the character +``.'' + +at the start of a name or immediately following a slash +must be matched explicitly, unless the shell option +dotglob + +is set. +The filenames +``.'' + +and +``..'' + +must always be matched explicitly, even if +dotglob + +is set. +In other cases, the +``.'' + +character is not treated specially. +When matching a pathname, the slash character must always be +matched explicitly by a slash in the pattern, but in other matching +contexts it can be matched by a special pattern character as described +below under +Pattern Matching. + + +See the description of +shopt + +below under +SHELL BUILTIN COMMANDS + + +for a description of the +nocaseglob, + +nullglob, + +failglob, + +and +dotglob + +shell options. +

+ +The +GLOBIGNORE + + +shell variable may be used to restrict the set of file names matching a +pattern. + +If +GLOBIGNORE + + +is set, each matching file name that also matches one of the patterns in +GLOBIGNORE + + +is removed from the list of matches. +If the nocaseglob option is set, the matching against the patterns in +GLOBIGNORE + + +is performed without regard to case. +The filenames +``.'' + +and +``..'' + +are always ignored when +GLOBIGNORE + + +is set and not null. However, setting +GLOBIGNORE + + +to a non-null value has the effect of enabling the +dotglob + +shell option, so all other filenames beginning with a +``.'' + +will match. +To get the old behavior of ignoring filenames beginning with a +``.'', + +make +``.*'' + +one of the patterns in +GLOBIGNORE. + + +The +dotglob + +option is disabled when +GLOBIGNORE + + +is unset. +The pattern matching honors the setting of the extglob shell +option. +

+ +Pattern Matching +

+ +Any character that appears in a pattern, other than the special pattern +characters described below, matches itself. The NUL character may not +occur in a pattern. A backslash escapes the following character; the +escaping backslash is discarded when matching. +The special pattern characters must be quoted if +they are to be matched literally. +

+ +The special pattern characters have the following meanings: +

+ + +

+
+
* + +
+Matches any string, including the null string. +When the globstar shell option is enabled, and * is used in +a pathname expansion context, two adjacent *s used as a single +pattern will match all files and zero or more directories and +subdirectories. +If followed by a /, two adjacent *s will match only directories +and subdirectories. +
? + +
+Matches any single character. +
[...] + +
+Matches any one of the enclosed characters. A pair of characters +separated by a hyphen denotes a +range expression; +any character that falls between those two characters, inclusive, +using the current locale's collating sequence and character set, +is matched. If the first character following the +[ + +is a +! + +or a +^ + +then any character not enclosed is matched. +The sorting order of characters in range expressions is determined by +the current locale and the values of the +LC_COLLATE + + +or +LC_ALL + + +shell variables, if set. +To obtain the traditional interpretation of range expressions, where +[a-d] + +is equivalent to +[abcd], + +set value of the +LC_ALL + +shell variable to +C, + +or enable the +globasciiranges + +shell option. +A +- + +may be matched by including it as the first or last character +in the set. +A +] + +may be matched by including it as the first character +in the set. +
+ +

+ + +Within +[ + +and +], + +character classes can be specified using the syntax +[:class:], where class is one of the +following classes defined in the POSIX standard: +

+

+ +

+ + + +alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit +
+ +A character class matches any character belonging to that class. +The word character class matches letters, digits, and the character _. +
+ +

+ + +Within +[ + +and +], + +an equivalence class can be specified using the syntax +[=c=], which matches all characters with the +same collation weight (as defined by the current locale) as +the character c. +
+ +

+ + +Within +[ + +and +], + +the syntax [.symbol.] matches the collating symbol +symbol. +

+ +
+ + +

+ +If the extglob shell option is enabled using the shopt +builtin, several extended pattern matching operators are recognized. +In the following description, a pattern-list is a list of one +or more patterns separated by a |. +Composite patterns may be formed using one or more of the following +sub-patterns: +

+ +

+
+
?(pattern-list)
+Matches zero or one occurrence of the given patterns +
*(pattern-list)
+Matches zero or more occurrences of the given patterns +
+(pattern-list)
+Matches one or more occurrences of the given patterns +
@(pattern-list)
+Matches one of the given patterns +
!(pattern-list)
+Matches anything except one of the given patterns +
+ + +

+ +Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. +Using separate matches against shorter strings, or using arrays of +strings instead of a single long string, may be faster. +  +

Quote Removal

+ +After the preceding expansions, all unquoted occurrences of the +characters +\, + +aq, + +and " that did not result from one of the above +expansions are removed. +  +

REDIRECTION

+ +Before a command is executed, its input and output +may be +redirected + +using a special notation interpreted by the shell. +Redirection allows commands' file handles to be +duplicated, opened, closed, +made to refer to different files, +and can change the files the command reads from and writes to. +Redirection may also be used to modify file handles in the +current shell execution environment. +The following redirection +operators may precede or appear anywhere within a +simple command + +or may follow a +command. + +Redirections are processed in the order they appear, from +left to right. +

+ +Each redirection that may be preceded by a file descriptor number +may instead be preceded by a word of the form {varname}. +In this case, for each redirection operator except +>&- and <&-, the shell will allocate a file descriptor greater +than or equal to 10 and assign it to varname. +If >&- or <&- is preceded +by {varname}, the value of varname defines the file +descriptor to close. +If {varname} is supplied, the redirection persists beyond +the scope of the command, allowing the shell programmer to manage +the file descriptor himself. +

+ +In the following descriptions, if the file descriptor number is +omitted, and the first character of the redirection operator is +<, + +the redirection refers to the standard input (file descriptor +0). If the first character of the redirection operator is +>, + +the redirection refers to the standard output (file descriptor +1). +

+ +The word following the redirection operator in the following +descriptions, unless otherwise noted, is subjected to +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, quote removal, +pathname expansion, and word splitting. +If it expands to more than one word, +bash + +reports an error. +

+ +Note that the order of redirections is significant. For example, +the command +

+

+ +ls > dirlist 2>&1 +

+ +

+ +directs both standard output and standard error to the file +dirlist, + +while the command +

+

+ +ls 2>&1 > dirlist +

+ +

+ +directs only the standard output to file +dirlist, + +because the standard error was duplicated from the standard output +before the standard output was redirected to +dirlist. + +

+ +Bash handles several filenames specially when they are used in +redirections, as described in the following table. +If the operating system on which bash is running provides these +special files, bash will use them; otherwise it will emulate them +internally with the behavior described below. +

+

+ + +

+
/dev/fd/fd + +
+If fd is a valid integer, file descriptor fd is duplicated. +
/dev/stdin + +
+File descriptor 0 is duplicated. +
/dev/stdout + +
+File descriptor 1 is duplicated. +
/dev/stderr + +
+File descriptor 2 is duplicated. +
/dev/tcp/host/port + +
+If host is a valid hostname or Internet address, and port +is an integer port number or service name, bash attempts to open +the corresponding TCP socket. +
/dev/udp/host/port + +
+If host is a valid hostname or Internet address, and port +is an integer port number or service name, bash attempts to open +the corresponding UDP socket. + +
+ +

+ +A failure to open or create a file causes the redirection to fail. +

+ +Redirections using file descriptors greater than 9 should be used with +care, as they may conflict with file descriptors the shell uses +internally. +  +

Redirecting Input

+ +Redirection of input causes the file whose name results from +the expansion of +word + +to be opened for reading on file descriptor +n, + +or the standard input (file descriptor 0) if +n + +is not specified. +

+ +The general format for redirecting input is: +

+

+ +[n]<word +

+ +  +

Redirecting Output

+ +Redirection of output causes the file whose name results from +the expansion of +word + +to be opened for writing on file descriptor +n, + +or the standard output (file descriptor 1) if +n + +is not specified. If the file does not exist it is created; +if it does exist it is truncated to zero size. +

+ +The general format for redirecting output is: +

+

+ +[n]>word +

+ +

+ +If the redirection operator is +>, + +and the +noclobber + +option to the +set + +builtin has been enabled, the redirection will fail if the file +whose name results from the expansion of word exists and is +a regular file. +If the redirection operator is +>|, + +or the redirection operator is +> + +and the +noclobber + +option to the +set + +builtin command is not enabled, the redirection is attempted even +if the file named by word exists. +  +

Appending Redirected Output

+ +Redirection of output in this fashion +causes the file whose name results from +the expansion of +word + +to be opened for appending on file descriptor +n, + +or the standard output (file descriptor 1) if +n + +is not specified. If the file does not exist it is created. +

+ +The general format for appending output is: +

+

+ +[n]>>word +

+ +  +

Redirecting Standard Output and Standard Error

+ +This construct allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be redirected to the file whose name is the +expansion of +word. + +

+ +There are two formats for redirecting standard output and +standard error: +

+

+ +&>word +

+ +and +
+>&word +
+ +

+ +Of the two forms, the first is preferred. +This is semantically equivalent to +

+

+ +>word 2>&1 +

+ +

+ +When using the second form, word may not expand to a number or +-. If it does, other redirection operators apply +(see Duplicating File Descriptors below) for compatibility +reasons. +  +

Appending Standard Output and Standard Error

+ +This construct allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be appended to the file whose name is the +expansion of +word. + +

+ +The format for appending standard output and standard error is: +

+

+ +&>>word +

+ +

+ +This is semantically equivalent to +

+

+ +>>word 2>&1 +

+ +

+ +(see Duplicating File Descriptors below). +  +

Here Documents

+ +This type of redirection instructs the shell to read input from the +current source until a line containing only +delimiter + +(with no trailing blanks) +is seen. All of +the lines read up to that point are then used as the standard +input (or file descriptor n if n is specified) for a command. +

+ +The format of here-documents is: +

+

+ +

+[n]<<[-]word
+        here-document
+delimiter
+
+ +
+ +

+ +No parameter and variable expansion, command substitution, +arithmetic expansion, or pathname expansion is performed on +word. + +If any part of +word + +is quoted, the +delimiter + +is the result of quote removal on +word, + +and the lines in the here-document are not expanded. +If word is unquoted, +all lines of the here-document are subjected to +parameter expansion, command substitution, and arithmetic expansion, +the character sequence +\<newline> + +is ignored, and +\ + +must be used to quote the characters +\, + +$, + +and +`. + +

+ +If the redirection operator is +<<-, + +then all leading tab characters are stripped from input lines and the +line containing +delimiter. + +This allows +here-documents within shell scripts to be indented in a +natural fashion. +  +

Here Strings

+ +A variant of here documents, the format is: +
+

+ +

+[n]<<<word
+
+ +
+ +

+ +The word undergoes +tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. +Pathname expansion and word splitting are not performed. +The result is supplied as a single string, with a newline appended, +to the command on its +standard input (or file descriptor n if n is specified). +  +

Duplicating File Descriptors

+ +The redirection operator +
+

+ +[n]<&word +

+ +

+ +is used to duplicate input file descriptors. +If +word + +expands to one or more digits, the file descriptor denoted by +n + +is made to be a copy of that file descriptor. +If the digits in +word + +do not specify a file descriptor open for input, a redirection error occurs. +If +word + +evaluates to +-, + +file descriptor +n + +is closed. If +n + +is not specified, the standard input (file descriptor 0) is used. +

+ +The operator +

+

+ +[n]>&word +

+ +

+ +is used similarly to duplicate output file descriptors. If +n + +is not specified, the standard output (file descriptor 1) is used. +If the digits in +word + +do not specify a file descriptor open for output, a redirection error occurs. +If +word + +evaluates to +-, + +file descriptor +n + +is closed. +As a special case, if n is omitted, and word does not +expand to one or more digits or -, the standard output and standard +error are redirected as described previously. +  +

Moving File Descriptors

+ +The redirection operator +
+

+ +[n]<&digit- +

+ +

+ +moves the file descriptor digit to file descriptor +n, + +or the standard input (file descriptor 0) if n is not specified. +digit is closed after being duplicated to n. +

+ +Similarly, the redirection operator +

+

+ +[n]>&digit- +

+ +

+ +moves the file descriptor digit to file descriptor +n, + +or the standard output (file descriptor 1) if n is not specified. +  +

Opening File Descriptors for Reading and Writing

+ +The redirection operator +
+

+ +[n]<>word +

+ +

+ +causes the file whose name is the expansion of +word + +to be opened for both reading and writing on file descriptor +n, + +or on file descriptor 0 if +n + +is not specified. If the file does not exist, it is created. +  +

ALIASES

+ +Aliases allow a string to be substituted for a word when it is used +as the first word of a simple command. +The shell maintains a list of aliases that may be set and unset with the +alias + +and +unalias + +builtin commands (see +SHELL BUILTIN COMMANDS + + +below). +The first word of each simple command, if unquoted, +is checked to see if it has an +alias. If so, that word is replaced by the text of the alias. +The characters /, $, `, and = and +any of the shell metacharacters or quoting characters +listed above may not appear in an alias name. +The replacement text may contain any valid shell input, +including shell metacharacters. +The first word of the replacement text is tested +for aliases, but a word that is identical to an alias being expanded +is not expanded a second time. +This means that one may alias +ls + +to +ls -F, + +for instance, and +bash + +does not try to recursively expand the replacement text. +If the last character of the alias value is a +blank, + +then the next command +word following the alias is also checked for alias expansion. +

+ +Aliases are created and listed with the +alias + +command, and removed with the +unalias + +command. +

+ +There is no mechanism for using arguments in the replacement text. +If arguments are needed, a shell function should be used (see +FUNCTIONS + + +below). +

+ +Aliases are not expanded when the shell is not interactive, unless +the +expand_aliases + +shell option is set using +shopt + +(see the description of +shopt + +under +SHELL BUILTIN COMMANDS +below). +

+ +The rules concerning the definition and use of aliases are +somewhat confusing. +Bash + +always reads at least one complete line of input, +and all lines that make up a compound command, +before executing any of the commands on that line or the compound command. +Aliases are expanded when a +command is read, not when it is executed. Therefore, an +alias definition appearing on the same line as another +command does not take effect until the next line of input is read. +The commands following the alias definition +on that line are not affected by the new alias. +This behavior is also an issue when functions are executed. +Aliases are expanded when a function definition is read, +not when the function is executed, because a function definition +is itself a command. As a consequence, aliases +defined in a function are not available until after that +function is executed. To be safe, always put +alias definitions on a separate line, and do not use +alias + +in compound commands. +

+ +For almost every purpose, aliases are superseded by +shell functions. +  +

FUNCTIONS

+ +A shell function, defined as described above under +SHELL GRAMMAR, + + +stores a series of commands for later execution. +When the name of a shell function is used as a simple command name, +the list of commands associated with that function name is executed. +Functions are executed in the context of the +current shell; no new process is created to interpret +them (contrast this with the execution of a shell script). +When a function is executed, the arguments to the +function become the positional parameters +during its execution. +The special parameter +# + +is updated to reflect the change. Special parameter 0 +is unchanged. +The first element of the +FUNCNAME + + +variable is set to the name of the function while the function +is executing. +

+ +All other aspects of the shell execution +environment are identical between a function and its caller +with these exceptions: the +DEBUG + + +and +RETURN + +traps (see the description of the +trap + +builtin under +SHELL BUILTIN COMMANDS + + +below) are not inherited unless the function has been given the +trace attribute (see the description of the +declare + + +builtin below) or the +-o functrace shell option has been enabled with +the set builtin +(in which case all functions inherit the DEBUG and RETURN traps), +and the +ERR + + +trap is not inherited unless the -o errtrace shell option has +been enabled. +

+ +Variables local to the function may be declared with the +local + +builtin command. Ordinarily, variables and their values +are shared between the function and its caller. +If a variable is declared local, the variable's visible scope +is restricted to that function and its children (including the functions +it calls). +Local variables "shadow" variables with the same name declared at +previous scopes. +For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. +

+ +The shell uses dynamic scoping to control a variable's visibility +within functions. +With dynamic scoping, visible variables and their values +are a result of the sequence of function calls that caused execution +to reach the current function. +The value of a variable that a function sees depends +on its value within its caller, if any, whether that caller is +the "global" scope or another shell function. +This is also the value that a local variable +declaration "shadows", and the value that is restored when the function +returns. +

+ +For example, if a variable var is declared as local in function +func1, and func1 calls another function func2, +references to var made from within func2 will resolve to the +local variable var from func1, shadowing any global variable +named var. +

+ +The unset builtin also acts using the same dynamic scope: if a +variable is local to the current scope, unset will unset it; +otherwise the unset will refer to the variable found in any calling scope +as described above. +If a variable at the current local scope is unset, it will remain so +until it is reset in that scope or until the function returns. +Once the function returns, any instance of the variable at a previous +scope will become visible. +If the unset acts on a variable at a previous scope, any instance of a +variable with that name that had been shadowed will become visible. +

+ +The FUNCNEST variable, if set to a numeric value greater +than 0, defines a maximum function nesting level. Function +invocations that exceed the limit cause the entire command to +abort. +

+ +If the builtin command +return + +is executed in a function, the function completes and +execution resumes with the next command after the function +call. +Any command associated with the RETURN trap is executed +before execution resumes. +When a function completes, the values of the +positional parameters and the special parameter +# + +are restored to the values they had prior to the function's +execution. +

+ +Function names and definitions may be listed with the +-f + +option to the +declare + +or +typeset + +builtin commands. The +-F + +option to +declare + +or +typeset + +will list the function names only +(and optionally the source file and line number, if the extdebug +shell option is enabled). +Functions may be exported so that subshells +automatically have them defined with the +-f + +option to the +export + +builtin. +A function definition may be deleted using the -f option to +the +unset + +builtin. +

+ +Functions may be recursive. +The FUNCNEST variable may be used to limit the depth of the +function call stack and restrict the number of function invocations. +By default, no limit is imposed on the number of recursive calls. +  +

ARITHMETIC EVALUATION

+ +The shell allows arithmetic expressions to be evaluated, under +certain circumstances (see the let and declare builtin +commands, the (( compound command, and Arithmetic Expansion). +Evaluation is done in fixed-width integers with no check for overflow, +though division by 0 is trapped and flagged as an error. +The operators and their precedence, associativity, and values +are the same as in the C language. +The following list of operators is grouped into levels of +equal-precedence operators. +The levels are listed in order of decreasing precedence. +

+ + +

+
id++ id-- + +
+variable post-increment and post-decrement +
- + + +
+unary minus and plus +
++id --id + +
+variable pre-increment and pre-decrement +
! ~ + +
+logical and bitwise negation +
** + +
+exponentiation +
* / % + +
+multiplication, division, remainder +
+ - + +
+addition, subtraction +
<< >> + +
+left and right bitwise shifts +
<= >= < > + +
+comparison +
== != + +
+equality and inequality +
& + +
+bitwise AND +
^ + +
+bitwise exclusive OR +
| + +
+bitwise OR +
&& + +
+logical AND +
|| + +
+logical OR +
expr?expr:expr + +
+conditional operator +
= *= /= %= += -= <<= >>= &= ^= |= + +
+assignment +
expr1 , expr2 + +
+comma + +
+

+ +Shell variables are allowed as operands; parameter expansion is +performed before the expression is evaluated. +Within an expression, shell variables may also be referenced by name +without using the parameter expansion syntax. +A shell variable that is null or unset evaluates to 0 when referenced +by name without using the parameter expansion syntax. +The value of a variable is evaluated as an arithmetic expression +when it is referenced, or when a variable which has been given the +integer attribute using declare -i is assigned a value. +A null value evaluates to 0. +A shell variable need not have its integer attribute +turned on to be used in an expression. +

+ +Integer constants follow the C language definition, without suffixes or +character constants. +Constants with a leading 0 are interpreted as octal numbers. +A leading 0x or 0X denotes hexadecimal. +Otherwise, numbers take the form [base#]n, where the optional base +is a decimal number between 2 and 64 representing the arithmetic +base, and n is a number in that base. +If base# is omitted, then base 10 is used. +When specifying n, +if a non-digit is required, +the digits greater than 9 are represented by the lowercase letters, +the uppercase letters, @, and _, in that order. +If base is less than or equal to 36, lowercase and uppercase +letters may be used interchangeably to represent numbers between 10 +and 35. +

+ +Operators are evaluated in order of precedence. Sub-expressions in +parentheses are evaluated first and may override the precedence +rules above. +  +

CONDITIONAL EXPRESSIONS

+ +Conditional expressions are used by the [[ compound command and +the test and [ builtin commands to test file attributes +and perform string and arithmetic comparisons. +The test and [ commands determine their behavior based on +the number of arguments; see the descriptions of those commands for any +other command-specific actions. +

+ +Expressions are formed from the following unary or binary primaries. +Bash handles several filenames specially when they are used in +expressions. +If the operating system on which bash is running provides these +special files, bash will use them; otherwise it will emulate them +internally with this behavior: +If any file argument to one of the primaries is of the form +/dev/fd/n, then file descriptor n is checked. +If the file argument to one of the primaries is one of +/dev/stdin, /dev/stdout, or /dev/stderr, file +descriptor 0, 1, or 2, respectively, is checked. +

+ +Unless otherwise specified, primaries that operate on files follow symbolic +links and operate on the target of the link, rather than the link itself. +

+ + +When used with [[, the < and > operators sort +lexicographically using the current locale. +The test command sorts using ASCII ordering. +

+ +

+
-a file + +
+True if file exists. +
-b file + +
+True if file exists and is a block special file. +
-c file + +
+True if file exists and is a character special file. +
-d file + +
+True if file exists and is a directory. +
-e file + +
+True if file exists. +
-f file + +
+True if file exists and is a regular file. +
-g file + +
+True if file exists and is set-group-id. +
-h file + +
+True if file exists and is a symbolic link. +
-k file + +
+True if file exists and its ``sticky'' bit is set. +
-p file + +
+True if file exists and is a named pipe (FIFO). +
-r file + +
+True if file exists and is readable. +
-s file + +
+True if file exists and has a size greater than zero. +
-t fd + +
+True if file descriptor +fd + +is open and refers to a terminal. +
-u file + +
+True if file exists and its set-user-id bit is set. +
-w file + +
+True if file exists and is writable. +
-x file + +
+True if file exists and is executable. +
-G file + +
+True if file exists and is owned by the effective group id. +
-L file + +
+True if file exists and is a symbolic link. +
-N file + +
+True if file exists and has been modified since it was last read. +
-O file + +
+True if file exists and is owned by the effective user id. +
-S file + +
+True if file exists and is a socket. +
file1 -ef file2
+True if file1 and file2 refer to the same device and +inode numbers. +
file1 -nt file2
+True if file1 is newer (according to modification date) than file2, +or if file1 exists and file2 does not. +
file1 -ot file2
+True if file1 is older than file2, or if file2 exists +and file1 does not. +
-o optname + +
+True if the shell option +optname + +is enabled. +See the list of options under the description of the +-o + +option to the +set + +builtin below. +
-v varname + +
+True if the shell variable +varname + +is set (has been assigned a value). +
-R varname + +
+True if the shell variable +varname + +is set and is a name reference. +
-z string + +
+True if the length of string is zero. +
string
+ +
-n string + +
+ +True if the length of +string + +is non-zero. +
string1 == string2
+ +
string1 = string2
+ +True if the strings are equal. = should be used +with the test command for POSIX conformance. +When used with the [[ command, this performs pattern matching as +described above (Compound Commands). +
string1 != string2
+True if the strings are not equal. +
string1 < string2
+True if string1 sorts before string2 lexicographically. +
string1 > string2
+True if string1 sorts after string2 lexicographically. +
arg1 OP arg2 + +
+OP + + +is one of +-eq, + +-ne, + +-lt, + +-le, + +-gt, + +or +-ge. + +These arithmetic binary operators return true if arg1 +is equal to, not equal to, less than, less than or equal to, +greater than, or greater than or equal to arg2, respectively. +Arg1 + +and +arg2 + +may be positive or negative integers. +When used with the [[ command, +Arg1 + +and +Arg2 + +are evaluated as arithmetic expressions (see +ARITHMETIC EVALUATION + + +above). + +
+  +

SIMPLE COMMAND EXPANSION

+ +When a simple command is executed, the shell performs the following +expansions, assignments, and redirections, from left to right, in +the following order. +
+
1.
+The words that the parser has marked as variable assignments (those +preceding the command name) and redirections are saved for later +processing. +
2.
+The words that are not variable assignments or redirections are +expanded. If any words remain after expansion, the first word +is taken to be the name of the command and the remaining words are +the arguments. +
3.
+Redirections are performed as described above under +REDIRECTION. + + +
4.
+The text after the = in each variable assignment undergoes tilde +expansion, parameter expansion, command substitution, arithmetic expansion, +and quote removal before being assigned to the variable. +
+

+ +If no command name results, the variable assignments affect the current +shell environment. Otherwise, the variables are added to the environment +of the executed command and do not affect the current shell environment. +If any of the assignments attempts to assign a value to a readonly variable, +an error occurs, and the command exits with a non-zero status. +

+ +If no command name results, redirections are performed, but do not +affect the current shell environment. A redirection error causes the +command to exit with a non-zero status. +

+ +If there is a command name left after expansion, execution proceeds as +described below. Otherwise, the command exits. If one of the expansions +contained a command substitution, the exit status of the command is +the exit status of the last command substitution performed. If there +were no command substitutions, the command exits with a status of zero. +  +

COMMAND EXECUTION

+ +After a command has been split into words, if it results in a +simple command and an optional list of arguments, the following +actions are taken. +

+ +If the command name contains no slashes, the shell attempts to +locate it. If there exists a shell function by that name, that +function is invoked as described above in +FUNCTIONS. + + +If the name does not match a function, the shell searches for +it in the list of shell builtins. If a match is found, that +builtin is invoked. +

+ +If the name is neither a shell function nor a builtin, +and contains no slashes, +bash + +searches each element of the +PATH + + +for a directory containing an executable file by that name. +Bash + +uses a hash table to remember the full pathnames of executable +files (see +hash + +under +SHELL BUILTIN COMMANDS + + +below). +A full search of the directories in +PATH + + +is performed only if the command is not found in the hash table. +If the search is unsuccessful, the shell searches for a defined shell +function named command_not_found_handle. +If that function exists, it is invoked in a separate execution environment +with the original command and +the original command's arguments as its arguments, and the function's +exit status becomes the exit status of that subshell. +If that function is not defined, the shell prints an error +message and returns an exit status of 127. +

+ +If the search is successful, or if the command name contains +one or more slashes, the shell executes the named program in a +separate execution environment. +Argument 0 is set to the name given, and the remaining arguments +to the command are set to the arguments given, if any. +

+ +If this execution fails because the file is not in executable +format, and the file is not a directory, it is assumed to be +a shell script, a file +containing shell commands. A subshell is spawned to execute +it. This subshell reinitializes itself, so +that the effect is as if a new shell had been invoked +to handle the script, with the exception that the locations of +commands remembered by the parent (see +hash + +below under +SHELL BUILTIN COMMANDS) +are retained by the child. +

+ +If the program is a file beginning with +#!, + +the remainder of the first line specifies an interpreter +for the program. The shell executes the +specified interpreter on operating systems that do not +handle this executable format themselves. The arguments to the +interpreter consist of a single optional argument following the +interpreter name on the first line of the program, followed +by the name of the program, followed by the command +arguments, if any. +  +

COMMAND EXECUTION ENVIRONMENT

+ +The shell has an execution environment, which consists of the +following: +
+
*
+open files inherited by the shell at invocation, as modified by +redirections supplied to the exec builtin +
*
+the current working directory as set by cd, pushd, or +popd, or inherited by the shell at invocation +
*
+the file creation mode mask as set by umask or inherited from +the shell's parent +
*
+current traps set by trap +
*
+shell parameters that are set by variable assignment or with set +or inherited from the shell's parent in the environment +
*
+shell functions defined during execution or inherited from the shell's +parent in the environment +
*
+options enabled at invocation (either by default or with command-line +arguments) or by set +
*
+options enabled by shopt +
*
+shell aliases defined with alias +
*
+various process IDs, including those of background jobs, the value +of $$, and the value of +PPID + + +
+

+ +When a simple command other than a builtin or shell function +is to be executed, it +is invoked in a separate execution environment that consists of +the following. Unless otherwise noted, the values are inherited +from the shell. + +

+
*
+the shell's open files, plus any modifications and additions specified +by redirections to the command +
*
+the current working directory +
*
+the file creation mode mask +
*
+shell variables and functions marked for export, along with variables +exported for the command, passed in the environment +
*
+traps caught by the shell are reset to the values inherited from the +shell's parent, and traps ignored by the shell are ignored +
+

+ +A command invoked in this separate environment cannot affect the +shell's execution environment. +

+ +Command substitution, commands grouped with parentheses, +and asynchronous commands are invoked in a +subshell environment that is a duplicate of the shell environment, +except that traps caught by the shell are reset to the values +that the shell inherited from its parent at invocation. Builtin +commands that are invoked as part of a pipeline are also executed in a +subshell environment. Changes made to the subshell environment +cannot affect the shell's execution environment. +

+ +Subshells spawned to execute command substitutions inherit the value of +the -e option from the parent shell. When not in posix mode, +bash clears the -e option in such subshells. +

+ +If a command is followed by a & and job control is not active, the +default standard input for the command is the empty file /dev/null. +Otherwise, the invoked command inherits the file descriptors of the calling +shell as modified by redirections. +  +

ENVIRONMENT

+ +When a program is invoked it is given an array of strings +called the +environment. + +This is a list of +name-value pairs, of the form +name=value. + +

+ +The shell provides several ways to manipulate the environment. +On invocation, the shell scans its own environment and +creates a parameter for each name found, automatically marking +it for +export + +to child processes. Executed commands inherit the environment. +The +export + +and +declare -x + +commands allow parameters and functions to be added to and +deleted from the environment. If the value of a parameter +in the environment is modified, the new value becomes part +of the environment, replacing the old. The environment +inherited by any executed command consists of the shell's +initial environment, whose values may be modified in the shell, +less any pairs removed by the +unset + +command, plus any additions via the +export + +and +declare -x + +commands. +

+ +The environment for any +simple command + +or function may be augmented temporarily by prefixing it with +parameter assignments, as described above in +PARAMETERS. + + +These assignment statements affect only the environment seen +by that command. +

+ +If the +-k + +option is set (see the +set + +builtin command below), then +all + +parameter assignments are placed in the environment for a command, +not just those that precede the command name. +

+ +When +bash + +invokes an external command, the variable +_ + +is set to the full filename of the command and passed to that +command in its environment. +  +

EXIT STATUS

+ +The exit status of an executed command is the value returned by the +waitpid system call or equivalent function. Exit statuses +fall between 0 and 255, though, as explained below, the shell may +use values above 125 specially. Exit statuses from shell builtins and +compound commands are also limited to this range. Under certain +circumstances, the shell will use special values to indicate specific +failure modes. +

+ +For the shell's purposes, a command which exits with a +zero exit status has succeeded. An exit status of zero +indicates success. A non-zero exit status indicates failure. +When a command terminates on a fatal signal N, bash uses +the value of 128+N as the exit status. +

+ +If a command is not found, the child process created to +execute it returns a status of 127. If a command is found +but is not executable, the return status is 126. +

+ +If a command fails because of an error during expansion or redirection, +the exit status is greater than zero. +

+ +Shell builtin commands return a status of 0 (true) if +successful, and non-zero (false) if an error occurs +while they execute. +All builtins return an exit status of 2 to indicate incorrect usage, +generally invalid options or missing arguments. +

+ +Bash itself returns the exit status of the last command +executed, unless a syntax error occurs, in which case it exits +with a non-zero value. See also the exit builtin +command below. +  +

SIGNALS

+ +When bash is interactive, in the absence of any traps, it ignores +SIGTERM + + +(so that kill 0 does not kill an interactive shell), +and +SIGINT + + +is caught and handled (so that the wait builtin is interruptible). +In all cases, bash ignores +SIGQUIT. + + +If job control is in effect, +bash + +ignores +SIGTTIN, + + +SIGTTOU, + + +and +SIGTSTP. + + +

+ +Non-builtin commands run by bash have signal handlers +set to the values inherited by the shell from its parent. +When job control is not in effect, asynchronous commands +ignore +SIGINT + + +and +SIGQUIT + + +in addition to these inherited handlers. +Commands run as a result of command substitution ignore the +keyboard-generated job control signals +SIGTTIN, + + +SIGTTOU, + + +and +SIGTSTP. + + +

+ +The shell exits by default upon receipt of a +SIGHUP. + + +Before exiting, an interactive shell resends the +SIGHUP + + +to all jobs, running or stopped. +Stopped jobs are sent +SIGCONT + + +to ensure that they receive the +SIGHUP. + + +To prevent the shell from +sending the signal to a particular job, it should be removed from the +jobs table with the +disown + +builtin (see +SHELL BUILTIN COMMANDS + + +below) or marked +to not receive +SIGHUP + + +using +disown -h. + +

+ +If the +huponexit + +shell option has been set with +shopt, + +bash + +sends a +SIGHUP + + +to all jobs when an interactive login shell exits. +

+ +If bash is waiting for a command to complete and receives a signal +for which a trap has been set, the trap will not be executed until +the command completes. +When bash is waiting for an asynchronous command via the wait +builtin, the reception of a signal for which a trap has been set will +cause the wait builtin to return immediately with an exit status +greater than 128, immediately after which the trap is executed. +  +

JOB CONTROL

+ +Job control + +refers to the ability to selectively stop (suspend) +the execution of processes and continue (resume) +their execution at a later point. A user typically employs +this facility via an interactive interface supplied jointly +by the operating system kernel's terminal driver and +bash. + +

+ +The shell associates a +job + +with each pipeline. It keeps a table of currently executing +jobs, which may be listed with the +jobs + +command. When +bash + +starts a job asynchronously (in the +background), + +it prints a line that looks like: +

+

+ +[1] 25647 +

+ +

+ +indicating that this job is job number 1 and that the process ID +of the last process in the pipeline associated with this job is 25647. +All of the processes in a single pipeline are members of the same job. +Bash + +uses the +job + +abstraction as the basis for job control. +

+ +To facilitate the implementation of the user interface to job +control, the operating system maintains the notion of a current terminal +process group ID. Members of this process group (processes whose +process group ID is equal to the current terminal process group ID) +receive keyboard-generated signals such as +SIGINT. + + +These processes are said to be in the +foreground. + +Background + +processes are those whose process group ID differs from the terminal's; +such processes are immune to keyboard-generated signals. +Only foreground processes are allowed to read from or, if the +user so specifies with stty tostop, write to the +terminal. +Background processes which attempt to read from (write to when +stty tostop is in effect) the +terminal are sent a +SIGTTIN (SIGTTOU) + + +signal by the kernel's terminal driver, +which, unless caught, suspends the process. +

+ +If the operating system on which +bash + +is running supports +job control, +bash + +contains facilities to use it. +Typing the +suspend + +character (typically +^Z, + +Control-Z) while a process is running +causes that process to be stopped and returns control to +bash. + +Typing the +delayed suspend + +character (typically +^Y, + +Control-Y) causes the process to be stopped when it +attempts to read input from the terminal, and control to +be returned to +bash. + +The user may then manipulate the state of this job, using the +bg + +command to continue it in the background, the +fg + +command to continue it in the foreground, or +the +kill + +command to kill it. A ^Z takes effect immediately, +and has the additional side effect of causing pending output +and typeahead to be discarded. +

+ +There are a number of ways to refer to a job in the shell. +The character +% + +introduces a job specification (jobspec). Job number +n + +may be referred to as +%n. + +A job may also be referred to using a prefix of the name used to +start it, or using a substring that appears in its command line. +For example, +%ce + +refers to a stopped +job whose command name begins with +ce. + +If a prefix matches more than one job, +bash + +reports an error. Using +%?ce, + +on the other hand, refers to any job containing the string +ce + +in its command line. If the substring matches more than one job, +bash + +reports an error. The symbols +%% + +and +%+ + +refer to the shell's notion of the +current job, + +which is the last job stopped while it was in +the foreground or started in the background. +The +previous job + +may be referenced using +%-. + +If there is only a single job, %+ and %- can both be used +to refer to that job. +In output pertaining to jobs (e.g., the output of the +jobs + +command), the current job is always flagged with a ++, + +and the previous job with a +-. + +A single % (with no accompanying job specification) also refers to the +current job. +

+ +Simply naming a job can be used to bring it into the +foreground: +%1 + +is a synonym for +``fg %1'', +bringing job 1 from the background into the foreground. +Similarly, +``%1 &'' + +resumes job 1 in the background, equivalent to +``bg %1''. +

+ +The shell learns immediately whenever a job changes state. +Normally, +bash + +waits until it is about to print a prompt before reporting +changes in a job's status so as to not interrupt +any other output. If the +-b + +option to the +set + +builtin command +is enabled, +bash + +reports such changes immediately. +Any trap on +SIGCHLD + + +is executed for each child that exits. +

+ +If an attempt to exit +bash + +is made while jobs are stopped (or, if the checkjobs shell option has +been enabled using the shopt builtin, running), the shell prints a +warning message, and, if the checkjobs option is enabled, lists the +jobs and their statuses. +The +jobs + +command may then be used to inspect their status. +If a second attempt to exit is made without an intervening command, +the shell does not print another warning, and any stopped +jobs are terminated. +

+ +When the shell is waiting for a job or process using the wait +builtin, and job control is enabled, wait will return when the +job changes state. The -f option causes wait to wait +until the job or process terminates before returning. +  +

PROMPTING

+ +When executing interactively, +bash + +displays the primary prompt +PS1 + + +when it is ready to read a command, and the secondary prompt +PS2 + + +when it needs more input to complete a command. +Bash + +displays +PS0 + + +after it reads a command but before executing it. +Bash + +displays +PS4 + + +as described above +before tracing each command when the -x option is enabled. +Bash + +allows these prompt strings to be customized by inserting a number of +backslash-escaped special characters that are decoded as follows: +
+ +
+
\a + +
+an ASCII bell character (07) +
\d + +
+the date in "Weekday Month Date" format (e.g., "Tue May 26") +
\D{format} + +
+the format is passed to strftime(3) and the result is inserted +into the prompt string; an empty format results in a locale-specific +time representation. The braces are required +
\e + +
+an ASCII escape character (033) +
\h + +
+the hostname up to the first `.' +
\H + +
+the hostname +
\j + +
+the number of jobs currently managed by the shell +
\l + +
+the basename of the shell's terminal device name +
\n + +
+newline +
\r + +
+carriage return +
\s + +
+the name of the shell, the basename of +$0 + +(the portion following the final slash) +
\t + +
+the current time in 24-hour HH:MM:SS format +
\T + +
+the current time in 12-hour HH:MM:SS format +
\@ + +
+the current time in 12-hour am/pm format +
\A + +
+the current time in 24-hour HH:MM format +
\u + +
+the username of the current user +
\v + +
+the version of bash (e.g., 2.00) +
\V + +
+the release of bash, version + patch level (e.g., 2.00.0) +
\w + +
+the current working directory, with +$HOME + + +abbreviated with a tilde +(uses the value of the +PROMPT_DIRTRIM + + +variable) +
\W + +
+the basename of the current working directory, with +$HOME + + +abbreviated with a tilde +
\! + +
+the history number of this command +
\# + +
+the command number of this command +
\$ + +
+if the effective UID is 0, a +#, + +otherwise a +$ + +
\nnn + +
+the character corresponding to the octal number nnn +
\\ + +
+a backslash +
\[ + +
+begin a sequence of non-printing characters, which could be used to +embed a terminal control sequence into the prompt +
\] + +
+end a sequence of non-printing characters + +
+ +

+ +The command number and the history number are usually different: +the history number of a command is its position in the history +list, which may include commands restored from the history file +(see +HISTORY + + +below), while the command number is the position in the sequence +of commands executed during the current shell session. +After the string is decoded, it is expanded via +parameter expansion, command substitution, arithmetic +expansion, and quote removal, subject to the value of the +promptvars + +shell option (see the description of the +shopt + +command under +SHELL BUILTIN COMMANDS + + +below). +This can have unwanted side effects if escaped portions of the string +appear within command substitution or contain characters special to +word expansion. +  +

READLINE

+ +This is the library that handles reading input when using an interactive +shell, unless the +--noediting + +option is given at shell invocation. +Line editing is also used when using the -e option to the +read builtin. +By default, the line editing commands are similar to those of Emacs. +A vi-style line editing interface is also available. +Line editing can be enabled at any time using the +-o emacs + +or +-o vi + +options to the +set + +builtin (see +SHELL BUILTIN COMMANDS + + +below). +To turn off line editing after the shell is running, use the ++o emacs + +or ++o vi + +options to the +set + +builtin. +  +

Readline Notation

+ +In this section, the Emacs-style notation is used to denote +keystrokes. Control keys are denoted by C-key, e.g., C-n +means Control-N. Similarly, +meta + +keys are denoted by M-key, so M-x means Meta-X. (On keyboards +without a +meta + +key, M-x means ESC x, i.e., press the Escape key +then the +x + +key. This makes ESC the meta prefix. +The combination M-C-x means ESC-Control-x, +or press the Escape key +then hold the Control key while pressing the +x + +key.) +

+ +Readline commands may be given numeric +arguments, + +which normally act as a repeat count. +Sometimes, however, it is the sign of the argument that is significant. +Passing a negative argument to a command that acts in the forward +direction (e.g., kill-line) causes that command to act in a +backward direction. +Commands whose behavior with arguments deviates from this are noted +below. +

+ +When a command is described as killing text, the text +deleted is saved for possible future retrieval +(yanking). The killed text is saved in a +kill ring. Consecutive kills cause the text to be +accumulated into one unit, which can be yanked all at once. +Commands which do not kill text separate the chunks of text +on the kill ring. +  +

Readline Initialization

+ +Readline is customized by putting commands in an initialization +file (the inputrc file). +The name of this file is taken from the value of the +INPUTRC + + +variable. If that variable is unset, the default is +~/.inputrc. + +If that file does not exist or cannot be read, the ultimate default is +/etc/inputrc. + +When a program which uses the readline library starts up, the +initialization file is read, and the key bindings and variables +are set. +There are only a few basic constructs allowed in the +readline initialization file. +Blank lines are ignored. +Lines beginning with a # are comments. +Lines beginning with a $ indicate conditional constructs. +Other lines denote key bindings and variable settings. +

+ +The default key-bindings may be changed with an +inputrc + +file. +Other programs that use this library may add their own commands +and bindings. +

+ +For example, placing +

+

+ +M-Control-u: universal-argument +

+ +or +
+C-Meta-u: universal-argument +
+ +into the +inputrc + +would make M-C-u execute the readline command +universal-argument. + +

+ +The following symbolic character names are recognized: +RUBOUT, + +DEL, + +ESC, + +LFD, + +NEWLINE, + +RET, + +RETURN, + +SPC, + +SPACE, + +and +TAB. + +

+ +In addition to command names, readline allows keys to be bound +to a string that is inserted when the key is pressed (a macro). +  +

Readline Key Bindings

+ +The syntax for controlling key bindings in the +inputrc + +file is simple. All that is required is the name of the +command or the text of a macro and a key sequence to which +it should be bound. The name may be specified in one of two ways: +as a symbolic key name, possibly with Meta- or Control- +prefixes, or as a key sequence. +

+ +When using the form keyname:function-name or macro, +keyname + +is the name of a key spelled out in English. For example: +

+

+Control-u: universal-argument +
+ +Meta-Rubout: backward-kill-word +
+ +Control-o: "> output" +
+ +

+ +In the above example, +C-u + +is bound to the function +universal-argument, + +M-DEL + +is bound to the function +backward-kill-word, + +and +C-o + +is bound to run the macro +expressed on the right hand side (that is, to insert the text +> output + +into the line). +

+ +In the second form, "keyseq":function-name or macro, +keyseq + +differs from +keyname + +above in that strings denoting +an entire key sequence may be specified by placing the sequence +within double quotes. Some GNU Emacs style key escapes can be +used, as in the following example, but the symbolic character names +are not recognized. +

+

+"\C-u": universal-argument +
+ +"\C-x\C-r": re-read-init-file +
+ +"\e[11~": "Function Key 1" +
+ +

+ +In this example, +C-u + +is again bound to the function +universal-argument. + +C-x C-r + +is bound to the function +re-read-init-file, + +and +ESC [ 1 1 ~ + +is bound to insert the text +Function Key 1. + +

+ +The full set of GNU Emacs style escape sequences is +

+ +
+
\C- + +
+control prefix +
\M- + +
+meta prefix +
\e + +
+an escape character +
\\ + +
+backslash +
\ + +
+literal " +
\aq + +
+literal aq +
+ + +

+ +In addition to the GNU Emacs style escape sequences, a second +set of backslash escapes is available: +

+ +
+
\a + +
+alert (bell) +
\b + +
+backspace +
\d + +
+delete +
\f + +
+form feed +
\n + +
+newline +
\r + +
+carriage return +
\t + +
+horizontal tab +
\v + +
+vertical tab +
\nnn + +
+the eight-bit character whose value is the octal value nnn +(one to three digits) +
\xHH + +
+the eight-bit character whose value is the hexadecimal value HH +(one or two hex digits) +
+ + +

+ +When entering the text of a macro, single or double quotes must +be used to indicate a macro definition. +Unquoted text is assumed to be a function name. +In the macro body, the backslash escapes described above are expanded. +Backslash will quote any other character in the macro text, +including " and aq. +

+ +Bash + +allows the current readline key bindings to be displayed or modified +with the +bind + +builtin command. The editing mode may be switched during interactive +use by using the +-o + +option to the +set + +builtin command (see +SHELL BUILTIN COMMANDS + + +below). +  +

Readline Variables

+ +Readline has variables that can be used to further customize its +behavior. A variable may be set in the +inputrc + +file with a statement of the form +
+

+ +set variable-name value +

+ +or using the bind builtin command (see +SHELL BUILTIN COMMANDS + + +below). +

+ +Except where noted, readline variables can take the values +On + +or +Off + +(without regard to case). +Unrecognized variable names are ignored. +When a variable value is read, empty or null values, "on" (case-insensitive), +and "1" are equivalent to On. All other values are equivalent to +Off. +The variables and their default values are: +

+ + +

+
bell-style (audible) + +
+Controls what happens when readline wants to ring the terminal bell. +If set to none, readline never rings the bell. If set to +visible, readline uses a visible bell if one is available. +If set to audible, readline attempts to ring the terminal's bell. +
bind-tty-special-chars (On) + +
+If set to On, readline attempts to bind the control characters +treated specially by the kernel's terminal driver to their readline +equivalents. +
blink-matching-paren (Off) + +
+If set to On, readline attempts to briefly move the cursor to an +opening parenthesis when a closing parenthesis is inserted. +
colored-completion-prefix (Off) + +
+If set to On, when listing completions, readline displays the +common prefix of the set of possible completions using a different color. +The color definitions are taken from the value of the LS_COLORS +environment variable. +
colored-stats (Off) + +
+If set to On, readline displays possible completions using different +colors to indicate their file type. +The color definitions are taken from the value of the LS_COLORS +environment variable. +
comment-begin (``#'') + +
+The string that is inserted when the readline +insert-comment + +command is executed. +This command is bound to +M-# + +in emacs mode and to +# + +in vi command mode. +
completion-display-width (-1) + +
+The number of screen columns used to display possible matches +when performing completion. +The value is ignored if it is less than 0 or greater than the terminal +screen width. +A value of 0 will cause matches to be displayed one per line. +The default value is -1. +
completion-ignore-case (Off) + +
+If set to On, readline performs filename matching and completion +in a case-insensitive fashion. +
completion-map-case (Off) + +
+If set to On, and completion-ignore-case is enabled, readline +treats hyphens (-) and underscores (_) as equivalent when +performing case-insensitive filename matching and completion. +
completion-prefix-display-length (0) + +
+The length in characters of the common prefix of a list of possible +completions that is displayed without modification. When set to a +value greater than zero, common prefixes longer than this value are +replaced with an ellipsis when displaying possible completions. +
completion-query-items (100) + +
+This determines when the user is queried about viewing +the number of possible completions +generated by the possible-completions command. +It may be set to any integer value greater than or equal to zero. +If the number of possible completions is greater than +or equal to the value of this variable, +readline will ask whether or not the user wishes to view them; +otherwise they are simply listed on the terminal. +
convert-meta (On) + +
+If set to On, readline will convert characters with the +eighth bit set to an ASCII key sequence +by stripping the eighth bit and prefixing an +escape character (in effect, using escape as the meta prefix). +The default is On, but readline will set it to Off if the +locale contains eight-bit characters. +
disable-completion (Off) + +
+If set to On, readline will inhibit word completion. Completion +characters will be inserted into the line as if they had been +mapped to self-insert. +
echo-control-characters (On) + +
+When set to On, on operating systems that indicate they support it, +readline echoes a character corresponding to a signal generated from the +keyboard. +
editing-mode (emacs) + +
+Controls whether readline begins with a set of key bindings similar +to Emacs or vi. +editing-mode + +can be set to either +emacs + +or +vi. + +
emacs-mode-string (@) + +
+If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when emacs editing mode is active. The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \1 and \2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +
enable-bracketed-paste (On) + +
+When set to On, readline will configure the terminal in a way +that will enable it to insert each paste into the editing buffer as a +single string of characters, instead of treating each character as if +it had been read from the keyboard. This can prevent pasted characters +from being interpreted as editing commands. +
enable-keypad (Off) + +
+When set to On, readline will try to enable the application +keypad when it is called. Some systems need this to enable the +arrow keys. +
enable-meta-key (On) + +
+When set to On, readline will try to enable any meta modifier +key the terminal claims to support when it is called. On many terminals, +the meta key is used to send eight-bit characters. +
expand-tilde (Off) + +
+If set to On, tilde expansion is performed when readline +attempts word completion. +
history-preserve-point (Off) + +
+If set to On, the history code attempts to place point at the +same location on each history line retrieved with previous-history +or next-history. +
history-size (unset) + +
+Set the maximum number of history entries saved in the history list. +If set to zero, any existing history entries are deleted and no new entries +are saved. +If set to a value less than zero, the number of history entries is not +limited. +By default, the number of history entries is set to the value of the +HISTSIZE shell variable. +If an attempt is made to set history-size to a non-numeric value, +the maximum number of history entries will be set to 500. +
horizontal-scroll-mode (Off) + +
+When set to On, makes readline use a single line for display, +scrolling the input horizontally on a single screen line when it +becomes longer than the screen width rather than wrapping to a new line. +This setting is automatically enabled for terminals of height 1. +
input-meta (Off) + +
+If set to On, readline will enable eight-bit input (that is, +it will not strip the eighth bit from the characters it reads), +regardless of what the terminal claims it can support. The name +meta-flag + +is a synonym for this variable. +The default is Off, but readline will set it to On if the +locale contains eight-bit characters. +
isearch-terminators (``C-[C-J'') + +
+The string of characters that should terminate an incremental +search without subsequently executing the character as a command. +If this variable has not been given a value, the characters +ESC and C-J will terminate an incremental search. +
keymap (emacs) + +
+Set the current readline keymap. The set of valid keymap names is +emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, +vi-command, and +vi-insert. + +vi is equivalent to vi-command; emacs is +equivalent to emacs-standard. The default value is +emacs; + +the value of +editing-mode + +also affects the default keymap. +
keyseq-timeout (500) + +
+Specifies the duration readline will wait for a character when reading an +ambiguous key sequence (one that can form a complete key sequence using +the input read so far, or can take additional input to complete a longer +key sequence). +If no input is received within the timeout, readline will use the shorter +but complete key sequence. +The value is specified in milliseconds, so a value of 1000 means that +readline will wait one second for additional input. +If this variable is set to a value less than or equal to zero, or to a +non-numeric value, readline will wait until another key is pressed to +decide which key sequence to complete. +
mark-directories (On) + +
+If set to On, completed directory names have a slash +appended. +
mark-modified-lines (Off) + +
+If set to On, history lines that have been modified are displayed +with a preceding asterisk (*). +
mark-symlinked-directories (Off) + +
+If set to On, completed names which are symbolic links to directories +have a slash appended (subject to the value of +mark-directories). +
match-hidden-files (On) + +
+This variable, when set to On, causes readline to match files whose +names begin with a `.' (hidden files) when performing filename +completion. +If set to Off, the leading `.' must be +supplied by the user in the filename to be completed. +
menu-complete-display-prefix (Off) + +
+If set to On, menu completion displays the common prefix of the +list of possible completions (which may be empty) before cycling through +the list. +
output-meta (Off) + +
+If set to On, readline will display characters with the +eighth bit set directly rather than as a meta-prefixed escape +sequence. +The default is Off, but readline will set it to On if the +locale contains eight-bit characters. +
page-completions (On) + +
+If set to On, readline uses an internal more-like pager +to display a screenful of possible completions at a time. +
print-completions-horizontally (Off) + +
+If set to On, readline will display completions with matches +sorted horizontally in alphabetical order, rather than down the screen. +
revert-all-at-newline (Off) + +
+If set to On, readline will undo all changes to history lines +before returning when accept-line is executed. By default, +history lines may be modified and retain individual undo lists across +calls to readline. +
show-all-if-ambiguous (Off) + +
+This alters the default behavior of the completion functions. If +set to +On, + +words which have more than one possible completion cause the +matches to be listed immediately instead of ringing the bell. +
show-all-if-unmodified (Off) + +
+This alters the default behavior of the completion functions in +a fashion similar to show-all-if-ambiguous. +If set to +On, + +words which have more than one possible completion without any +possible partial completion (the possible completions don't share +a common prefix) cause the matches to be listed immediately instead +of ringing the bell. +
show-mode-in-prompt (Off) + +
+If set to On, add a string to the beginning of the prompt +indicating the editing mode: emacs, vi command, or vi insertion. +The mode strings are user-settable (e.g., emacs-mode-string). +
skip-completed-text (Off) + +
+If set to On, this alters the default completion behavior when +inserting a single match into the line. It's only active when +performing completion in the middle of a word. If enabled, readline +does not insert characters from the completion that match characters +after point in the word being completed, so portions of the word +following the cursor are not duplicated. +
vi-cmd-mode-string ((cmd)) + +
+If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in command mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \1 and \2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +
vi-ins-mode-string ((ins)) + +
+If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in insertion mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \1 and \2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +
visible-stats (Off) + +
+If set to On, a character denoting a file's type as reported +by stat(2) is appended to the filename when listing possible +completions. + +
+  +

Readline Conditional Constructs

+ +Readline implements a facility similar in spirit to the conditional +compilation features of the C preprocessor which allows key +bindings and variable settings to be performed as the result +of tests. There are four parser directives used. +
+
$if
+The +$if + +construct allows bindings to be made based on the +editing mode, the terminal being used, or the application using +readline. The text of the test, after any comparison operator, +
 extends to the end of the line; +unless otherwise noted, no characters are required to isolate it. +
+
+
mode
+The mode= form of the $if directive is used to test +whether readline is in emacs or vi mode. +This may be used in conjunction +with the set keymap command, for instance, to set bindings in +the emacs-standard and emacs-ctlx keymaps only if +readline is starting out in emacs mode. +
term
+The term= form may be used to include terminal-specific +key bindings, perhaps to bind the key sequences output by the +terminal's function keys. The word on the right side of the += + +is tested against both the full name of the terminal and the portion +of the terminal name before the first -. This allows +sun + +to match both +sun + +and +sun-cmd, + +for instance. +
version
+The version test may be used to perform comparisons against +specific readline versions. +The version expands to the current readline version. +The set of comparison operators includes +=, + +(and +==), + +!=, + +<=, + +>=, + +<, + +and +>. + +The version number supplied on the right side of the operator consists +of a major version number, an optional decimal point, and an optional +minor version (e.g., 7.1). If the minor version is omitted, it +is assumed to be 0. +The operator may be separated from the string version +and from the version number argument by whitespace. +
application
+The application construct is used to include +application-specific settings. Each program using the readline +library sets the application name, and an initialization +file can test for a particular value. +This could be used to bind key sequences to functions useful for +a specific program. For instance, the following command adds a +key sequence that quotes the current or previous word in bash: +

+

+
+$if Bash
+# Quote the current or previous word
+"\C-xq": "\eb\"\ef\""
+$endif
+
+ +
+ +
variable
+The variable construct provides simple equality tests for readline +variables and values. +The permitted comparison operators are =, ==, and !=. +The variable name must be separated from the comparison operator by +whitespace; the operator may be separated from the value on the right hand +side by whitespace. +Both string and boolean variables may be tested. Boolean variables must be +tested against the values on and off. +
+ +
$endif
+This command, as seen in the previous example, terminates an +$if command. +
$else
+Commands in this branch of the $if directive are executed if +the test fails. +
$include
+This directive takes a single filename as an argument and reads commands +and bindings from that file. For example, the following directive +would read /etc/inputrc: +

+

+
+$include  /etc/inputrc
+
+ +
+ +
+  +

Searching

+ +Readline provides commands for searching through the command history +(see +HISTORY + + +below) for lines containing a specified string. +There are two search modes: +incremental + +and +non-incremental. + +

+ +Incremental searches begin before the user has finished typing the +search string. +As each character of the search string is typed, readline displays +the next entry from the history matching the string typed so far. +An incremental search requires only as many characters as needed to +find the desired history entry. +The characters present in the value of the isearch-terminators +variable are used to terminate an incremental search. +If that variable has not been assigned a value the Escape and +Control-J characters will terminate an incremental search. +Control-G will abort an incremental search and restore the original +line. +When the search is terminated, the history entry containing the +search string becomes the current line. +

+ +To find other matching entries in the history list, type Control-S or +Control-R as appropriate. +This will search backward or forward in the history for the next +entry matching the search string typed so far. +Any other key sequence bound to a readline command will terminate +the search and execute that command. +For instance, a newline will terminate the search and accept +the line, thereby executing the command from the history list. +

+ +Readline remembers the last incremental search string. If two +Control-Rs are typed without any intervening characters defining a +new search string, any remembered search string is used. +

+ +Non-incremental searches read the entire search string before starting +to search for matching history lines. The search string may be +typed by the user or be part of the contents of the current line. +  +

Readline Command Names

+ +The following is a list of the names of the commands and the default +key sequences to which they are bound. +Command names without an accompanying key sequence are unbound by default. +In the following descriptions, point refers to the current cursor +position, and mark refers to a cursor position saved by the +set-mark command. +The text between the point and mark is referred to as the region. +  +

Commands for Moving

+ + +
+
beginning-of-line (C-a) + +
+Move to the start of the current line. +
end-of-line (C-e) + +
+Move to the end of the line. +
forward-char (C-f) + +
+Move forward a character. +
backward-char (C-b) + +
+Move back a character. +
forward-word (M-f) + +
+Move forward to the end of the next word. Words are composed of +alphanumeric characters (letters and digits). +
backward-word (M-b) + +
+Move back to the start of the current or previous word. +Words are composed of alphanumeric characters (letters and digits). +
shell-forward-word + +
+Move forward to the end of the next word. +Words are delimited by non-quoted shell metacharacters. +
shell-backward-word + +
+Move back to the start of the current or previous word. +Words are delimited by non-quoted shell metacharacters. +
previous-screen-line + +
+Attempt to move point to the same physical screen column on the previous +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if point is not +greater than the length of the prompt plus the screen width. +
next-screen-line + +
+Attempt to move point to the same physical screen column on the next +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if the length +of the current Readline line is not greater than the length of the prompt +plus the screen width. +
clear-display (M-C-l) + +
+Clear the screen and, if possible, the terminal's scrollback buffer, +then redraw the current line, +leaving the current line at the top of the screen. +
clear-screen (C-l) + +
+Clear the screen, +then redraw the current line, +leaving the current line at the top of the screen. +With an argument, refresh the current line without clearing the +screen. +
redraw-current-line + +
+Refresh the current line. + +
+  +

Commands for Manipulating the History

+ + +
+
accept-line (Newline, Return) + +
+Accept the line regardless of where the cursor is. If this line is +non-empty, add it to the history list according to the state of the +HISTCONTROL + + +variable. If the line is a modified history +line, then restore the history line to its original state. +
previous-history (C-p) + +
+Fetch the previous command from the history list, moving back in +the list. +
next-history (C-n) + +
+Fetch the next command from the history list, moving forward in the +list. +
beginning-of-history (M-<) + +
+Move to the first line in the history. +
end-of-history (M->) + +
+Move to the end of the input history, i.e., the line currently being +entered. +
reverse-search-history (C-r) + +
+Search backward starting at the current line and moving `up' through +the history as necessary. This is an incremental search. +
forward-search-history (C-s) + +
+Search forward starting at the current line and moving `down' through +the history as necessary. This is an incremental search. +
non-incremental-reverse-search-history (M-p) + +
+Search backward through the history starting at the current line +using a non-incremental search for a string supplied by the user. +
non-incremental-forward-search-history (M-n) + +
+Search forward through the history using a non-incremental search for +a string supplied by the user. +
history-search-forward + +
+Search forward through the history for the string of characters +between the start of the current line and the point. +This is a non-incremental search. +
history-search-backward + +
+Search backward through the history for the string of characters +between the start of the current line and the point. +This is a non-incremental search. +
history-substring-search-backward + +
+Search backward through the history for the string of characters +between the start of the current line and the current cursor +position (the point). +The search string may match anywhere in a history line. +This is a non-incremental search. +
history-substring-search-forward + +
+Search forward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search. +
yank-nth-arg (M-C-y) + +
+Insert the first argument to the previous command (usually +the second word on the previous line) at point. +With an argument +n, + +insert the nth word from the previous command (the words +in the previous command begin with word 0). A negative argument +inserts the nth word from the end of the previous command. +Once the argument n is computed, the argument is extracted +as if the "!n" history expansion had been specified. +
yank-last-arg (M-., M-_) + +
+Insert the last argument to the previous command (the last word of +the previous history entry). +With a numeric argument, behave exactly like yank-nth-arg. +Successive calls to yank-last-arg move back through the history +list, inserting the last word (or the word specified by the argument to +the first call) of each line in turn. +Any numeric argument supplied to these successive calls determines +the direction to move through the history. A negative argument switches +the direction through the history (back or forward). +The history expansion facilities are used to extract the last word, +as if the "!$" history expansion had been specified. +
shell-expand-line (M-C-e) + +
+Expand the line as the shell does. This +performs alias and history expansion as well as all of the shell +word expansions. See +HISTORY EXPANSION + + +below for a description of history expansion. +
history-expand-line (M-^) + +
+Perform history expansion on the current line. +See +HISTORY EXPANSION + + +below for a description of history expansion. +
magic-space + +
+Perform history expansion on the current line and insert a space. +See +HISTORY EXPANSION + + +below for a description of history expansion. +
alias-expand-line + +
+Perform alias expansion on the current line. +See +ALIASES + + +above for a description of alias expansion. +
history-and-alias-expand-line + +
+Perform history and alias expansion on the current line. +
insert-last-argument (M-., M-_) + +
+A synonym for yank-last-arg. +
operate-and-get-next (C-o) + +
+Accept the current line for execution and fetch the next line +relative to the current line from the history for editing. +A numeric argument, if supplied, specifies the history entry to use instead +of the current line. +
edit-and-execute-command (C-x C-e) + +
+Invoke an editor on the current command line, and execute the result as shell +commands. +Bash attempts to invoke +$VISUAL, + + +$EDITOR, + + +and emacs as the editor, in that order. + +
+  +

Commands for Changing Text

+ + +
+
end-of-file (usually C-d) + +
+The character indicating end-of-file as set, for example, by +stty. + +If this character is read when there are no characters +on the line, and point is at the beginning of the line, Readline +interprets it as the end of input and returns +EOF. + + +
delete-char (C-d) + +
+Delete the character at point. +If this function is bound to the +same character as the tty EOF character, as C-d +commonly is, see above for the effects. +
backward-delete-char (Rubout) + +
+Delete the character behind the cursor. When given a numeric argument, +save the deleted text on the kill ring. +
forward-backward-delete-char + +
+Delete the character under the cursor, unless the cursor is at the +end of the line, in which case the character behind the cursor is +deleted. +
quoted-insert (C-q, C-v) + +
+Add the next character typed to the line verbatim. This is +how to insert characters like C-q, for example. +
tab-insert (C-v TAB) + +
+Insert a tab character. +
self-insert (a, b, A, 1, !, ...) + +
+Insert the character typed. +
transpose-chars (C-t) + +
+Drag the character before point forward over the character at point, +moving point forward as well. +If point is at the end of the line, then this transposes +the two characters before point. +Negative arguments have no effect. +
transpose-words (M-t) + +
+Drag the word before point past the word after point, +moving point over that word as well. +If point is at the end of the line, this transposes +the last two words on the line. +
upcase-word (M-u) + +
+Uppercase the current (or following) word. With a negative argument, +uppercase the previous word, but do not move point. +
downcase-word (M-l) + +
+Lowercase the current (or following) word. With a negative argument, +lowercase the previous word, but do not move point. +
capitalize-word (M-c) + +
+Capitalize the current (or following) word. With a negative argument, +capitalize the previous word, but do not move point. +
overwrite-mode + +
+Toggle overwrite mode. With an explicit positive numeric argument, +switches to overwrite mode. With an explicit non-positive numeric +argument, switches to insert mode. This command affects only +emacs mode; vi mode does overwrite differently. +Each call to readline() starts in insert mode. +In overwrite mode, characters bound to self-insert replace +the text at point rather than pushing the text to the right. +Characters bound to backward-delete-char replace the character +before point with a space. By default, this command is unbound. + +
+  +

Killing and Yanking

+ + +
+
kill-line (C-k) + +
+Kill the text from point to the end of the line. +
backward-kill-line (C-x Rubout) + +
+Kill backward to the beginning of the line. +
unix-line-discard (C-u) + +
+Kill backward from point to the beginning of the line. +The killed text is saved on the kill-ring. + +
kill-whole-line + +
+Kill all characters on the current line, no matter where point is. +
kill-word (M-d) + +
+Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as those used by forward-word. +
backward-kill-word (M-Rubout) + +
+Kill the word behind point. +Word boundaries are the same as those used by backward-word. +
shell-kill-word + +
+Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as those used by shell-forward-word. +
shell-backward-kill-word + +
+Kill the word behind point. +Word boundaries are the same as those used by shell-backward-word. +
unix-word-rubout (C-w) + +
+Kill the word behind point, using white space as a word boundary. +The killed text is saved on the kill-ring. +
unix-filename-rubout + +
+Kill the word behind point, using white space and the slash character +as the word boundaries. +The killed text is saved on the kill-ring. +
delete-horizontal-space (M-\) + +
+Delete all spaces and tabs around point. +
kill-region + +
+Kill the text in the current region. +
copy-region-as-kill + +
+Copy the text in the region to the kill buffer. +
copy-backward-word + +
+Copy the word before point to the kill buffer. +The word boundaries are the same as backward-word. +
copy-forward-word + +
+Copy the word following point to the kill buffer. +The word boundaries are the same as forward-word. +
yank (C-y) + +
+Yank the top of the kill ring into the buffer at point. +
yank-pop (M-y) + +
+Rotate the kill ring, and yank the new top. Only works following +yank + +or +yank-pop. + + +
+  +

Numeric Arguments

+ + +
+
digit-argument (M-0, M-1, ..., M--) + +
+Add this digit to the argument already accumulating, or start a new +argument. M-- starts a negative argument. +
universal-argument + +
+This is another way to specify an argument. +If this command is followed by one or more digits, optionally with a +leading minus sign, those digits define the argument. +If the command is followed by digits, executing +universal-argument + +again ends the numeric argument, but is otherwise ignored. +As a special case, if this command is immediately followed by a +character that is neither a digit nor minus sign, the argument count +for the next command is multiplied by four. +The argument count is initially one, so executing this function the +first time makes the argument count four, a second time makes the +argument count sixteen, and so on. + +
+  +

Completing

+ + +
+
complete (TAB) + +
+Attempt to perform completion on the text before point. +Bash + +attempts completion treating the text as a variable (if the +text begins with $), username (if the text begins with +~), hostname (if the text begins with @), or +command (including aliases and functions) in turn. If none +of these produces a match, filename completion is attempted. +
possible-completions (M-?) + +
+List the possible completions of the text before point. +
insert-completions (M-*) + +
+Insert all completions of the text before point +that would have been generated by +possible-completions. +
menu-complete + +
+Similar to complete, but replaces the word to be completed +with a single match from the list of possible completions. +Repeated execution of menu-complete steps through the list +of possible completions, inserting each match in turn. +At the end of the list of completions, the bell is rung +(subject to the setting of bell-style) +and the original text is restored. +An argument of n moves n positions forward in the list +of matches; a negative argument may be used to move backward +through the list. +This command is intended to be bound to TAB, but is unbound +by default. +
menu-complete-backward + +
+Identical to menu-complete, but moves backward through the list +of possible completions, as if menu-complete had been given a +negative argument. This command is unbound by default. +
delete-char-or-list + +
+Deletes the character under the cursor if not at the beginning or +end of the line (like delete-char). +If at the end of the line, behaves identically to +possible-completions. +This command is unbound by default. +
complete-filename (M-/) + +
+Attempt filename completion on the text before point. +
possible-filename-completions (C-x /) + +
+List the possible completions of the text before point, +treating it as a filename. +
complete-username (M-~) + +
+Attempt completion on the text before point, treating +it as a username. +
possible-username-completions (C-x ~) + +
+List the possible completions of the text before point, +treating it as a username. +
complete-variable (M-$) + +
+Attempt completion on the text before point, treating +it as a shell variable. +
possible-variable-completions (C-x $) + +
+List the possible completions of the text before point, +treating it as a shell variable. +
complete-hostname (M-@) + +
+Attempt completion on the text before point, treating +it as a hostname. +
possible-hostname-completions (C-x @) + +
+List the possible completions of the text before point, +treating it as a hostname. +
complete-command (M-!) + +
+Attempt completion on the text before point, treating +it as a command name. Command completion attempts to +match the text against aliases, reserved words, shell +functions, shell builtins, and finally executable filenames, +in that order. +
possible-command-completions (C-x !) + +
+List the possible completions of the text before point, +treating it as a command name. +
dynamic-complete-history (M-TAB) + +
+Attempt completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. +
dabbrev-expand + +
+Attempt menu completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. +
complete-into-braces (M-{) + +
+Perform filename completion and insert the list of possible completions +enclosed within braces so the list is available to the shell (see +Brace Expansion + +above). + +
+  +

Keyboard Macros

+ + +
+
start-kbd-macro (C-x () + +
+Begin saving the characters typed into the current keyboard macro. +
end-kbd-macro (C-x )) + +
+Stop saving the characters typed into the current keyboard macro +and store the definition. +
call-last-kbd-macro (C-x e) + +
+Re-execute the last keyboard macro defined, by making the characters +in the macro appear as if typed at the keyboard. +
print-last-kbd-macro () + +
+Print the last keyboard macro defined in a format suitable for the +inputrc file. + +
+  +

Miscellaneous

+ + +
+
re-read-init-file (C-x C-r) + +
+Read in the contents of the inputrc file, and incorporate +any bindings or variable assignments found there. +
abort (C-g) + +
+Abort the current editing command and +ring the terminal's bell (subject to the setting of +bell-style). + +
do-lowercase-version (M-A, M-B, M-x, ...) + +
+If the metafied character x is uppercase, run the command +that is bound to the corresponding metafied lowercase character. +The behavior is undefined if x is already lowercase. +
prefix-meta (ESC) + +
+Metafy the next character typed. +ESC + + +f + +is equivalent to +Meta-f. + +
undo (C-_, C-x C-u) + +
+Incremental undo, separately remembered for each line. +
revert-line (M-r) + +
+Undo all changes made to this line. This is like executing the +undo + +command enough times to return the line to its initial state. +
tilde-expand (M-&) + +
+Perform tilde expansion on the current word. +
set-mark (C-@, M-<space>) + +
+Set the mark to the point. If a +numeric argument is supplied, the mark is set to that position. +
exchange-point-and-mark (C-x C-x) + +
+Swap the point with the mark. The current cursor position is set to +the saved position, and the old cursor position is saved as the mark. +
character-search (C-]) + +
+A character is read and point is moved to the next occurrence of that +character. A negative count searches for previous occurrences. +
character-search-backward (M-C-]) + +
+A character is read and point is moved to the previous occurrence of that +character. A negative count searches for subsequent occurrences. +
skip-csi-sequence + +
+Read enough characters to consume a multi-key sequence such as those +defined for keys like Home and End. Such sequences begin with a +Control Sequence Indicator (CSI), usually ESC-[. If this sequence is +bound to "\[", keys producing such sequences will have no effect +unless explicitly bound to a readline command, instead of inserting +stray characters into the editing buffer. This is unbound by default, +but usually bound to ESC-[. +
insert-comment (M-#) + +
+Without a numeric argument, the value of the readline +comment-begin + +variable is inserted at the beginning of the current line. +If a numeric argument is supplied, this command acts as a toggle: if +the characters at the beginning of the line do not match the value +of comment-begin, the value is inserted, otherwise +the characters in comment-begin are deleted from the beginning of +the line. +In either case, the line is accepted as if a newline had been typed. +The default value of +comment-begin causes this command to make the current line +a shell comment. +If a numeric argument causes the comment character to be removed, the line +will be executed by the shell. +
glob-complete-word (M-g) + +
+The word before point is treated as a pattern for pathname expansion, +with an asterisk implicitly appended. This pattern is used to +generate a list of matching filenames for possible completions. +
glob-expand-word (C-x *) + +
+The word before point is treated as a pattern for pathname expansion, +and the list of matching filenames is inserted, replacing the word. +If a numeric argument is supplied, an asterisk is appended before +pathname expansion. +
glob-list-expansions (C-x g) + +
+The list of expansions that would have been generated by +glob-expand-word + +is displayed, and the line is redrawn. +If a numeric argument is supplied, an asterisk is appended before +pathname expansion. +
dump-functions + +
+Print all of the functions and their key bindings to the +readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an inputrc file. +
dump-variables + +
+Print all of the settable readline variables and their values to the +readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an inputrc file. +
dump-macros + +
+Print all of the readline key sequences bound to macros and the +strings they output. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an inputrc file. +
display-shell-version (C-x C-v) + +
+Display version information about the current instance of +bash. + + +
+  +

Programmable Completion

+ +When word completion is attempted for an argument to a command for +which a completion specification (a compspec) has been defined +using the complete builtin (see +SHELL BUILTIN COMMANDS + + +below), the programmable completion facilities are invoked. +

+ +First, the command name is identified. +If the command word is the empty string (completion attempted at the +beginning of an empty line), any compspec defined with +the -E option to complete is used. +If a compspec has been defined for that command, the +compspec is used to generate the list of possible completions for the word. +If the command word is a full pathname, a compspec for the full +pathname is searched for first. +If no compspec is found for the full pathname, an attempt is made to +find a compspec for the portion following the final slash. +If those searches do not result in a compspec, any compspec defined with +the -D option to complete is used as the default. +If there is no default compspec, bash attempts alias expansion +on the command word as a final resort, and attempts to find a compspec +for the command word from any successful expansion. +

+ +Once a compspec has been found, it is used to generate the list of +matching words. +If a compspec is not found, the default bash completion as +described above under Completing is performed. +

+ +First, the actions specified by the compspec are used. +Only matches which are prefixed by the word being completed are +returned. +When the +-f + +or +-d + +option is used for filename or directory name completion, the shell +variable +FIGNORE + + +is used to filter the matches. +

+ +Any completions specified by a pathname expansion pattern to the +-G option are generated next. +The words generated by the pattern need not match the word +being completed. +The +GLOBIGNORE + + +shell variable is not used to filter the matches, but the +FIGNORE + + +variable is used. +

+ +Next, the string specified as the argument to the -W option +is considered. +The string is first split using the characters in the +IFS + + +special variable as delimiters. +Shell quoting is honored. +Each word is then expanded using +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, and arithmetic expansion, +as described above under +EXPANSION. + + +The results are split using the rules described above under +Word Splitting. +The results of the expansion are prefix-matched against the word being +completed, and the matching words become the possible completions. +

+ +After these matches have been generated, any shell function or command +specified with the -F and -C options is invoked. +When the command or function is invoked, the +COMP_LINE, + + +COMP_POINT, + + +COMP_KEY, + + +and +COMP_TYPE + + +variables are assigned values as described above under +Shell Variables. +If a shell function is being invoked, the +COMP_WORDS + + +and +COMP_CWORD + + +variables are also set. +When the function or command is invoked, +the first argument ($1) is the name of the command whose arguments are +being completed, +the second argument ($2) is the word being completed, +and the third argument ($3) is the word preceding the word being +completed on the current command line. +No filtering of the generated completions against the word being completed +is performed; the function or command has complete freedom in generating +the matches. +

+ +Any function specified with -F is invoked first. +The function may use any of the shell facilities, including the +compgen builtin described below, to generate the matches. +It must put the possible completions in the +COMPREPLY + + +array variable, one per array element. +

+ +Next, any command specified with the -C option is invoked +in an environment equivalent to command substitution. +It should print a list of completions, one per line, to the +standard output. +Backslash may be used to escape a newline, if necessary. +

+ +After all of the possible completions are generated, any filter +specified with the -X option is applied to the list. +The filter is a pattern as used for pathname expansion; a & +in the pattern is replaced with the text of the word being completed. +A literal & may be escaped with a backslash; the backslash +is removed before attempting a match. +Any completion that matches the pattern will be removed from the list. +A leading ! negates the pattern; in this case any completion +not matching the pattern will be removed. +If the +nocasematch + +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. +

+ +Finally, any prefix and suffix specified with the -P and -S +options are added to each member of the completion list, and the result is +returned to the readline completion code as the list of possible +completions. +

+ +If the previously-applied actions do not generate any matches, and the +-o dirnames option was supplied to complete when the +compspec was defined, directory name completion is attempted. +

+ +If the -o plusdirs option was supplied to complete when the +compspec was defined, directory name completion is attempted and any +matches are added to the results of the other actions. +

+ +By default, if a compspec is found, whatever it generates is returned +to the completion code as the full set of possible completions. +The default bash completions are not attempted, and the readline +default of filename completion is disabled. +If the -o bashdefault option was supplied to complete when +the compspec was defined, the bash default completions are attempted +if the compspec generates no matches. +If the -o default option was supplied to complete when the +compspec was defined, readline's default completion will be performed +if the compspec (and, if attempted, the default bash completions) +generate no matches. +

+ +When a compspec indicates that directory name completion is desired, +the programmable completion functions force readline to append a slash +to completed names which are symbolic links to directories, subject to +the value of the mark-directories readline variable, regardless +of the setting of the mark-symlinked-directories readline variable. +

+ +There is some support for dynamically modifying completions. This is +most useful when used in combination with a default completion specified +with complete -D. +It's possible for shell functions executed as completion +handlers to indicate that completion should be retried by returning an +exit status of 124. If a shell function returns 124, and changes +the compspec associated with the command on which completion is being +attempted (supplied as the first argument when the function is executed), +programmable completion restarts from the beginning, with an +attempt to find a new compspec for that command. This allows a set of +completions to be built dynamically as completion is attempted, rather than +being loaded all at once. +

+ +For instance, assuming that there is a library of compspecs, each kept in a +file corresponding to the name of the command, the following default +completion function would load completions dynamically: +

+ +_completion_loader() +
+ +{ +
+ +       . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
+
+ +} +
+ +complete -D -F _completion_loader -o bashdefault -o default +
+ +
+  +

HISTORY

+ +When the +-o history + +option to the +set + +builtin is enabled, the shell provides access to the +command history, +the list of commands previously typed. +The value of the +HISTSIZE + + +variable is used as the +number of commands to save in a history list. +The text of the last +HISTSIZE + + +commands (default 500) is saved. The shell +stores each command in the history list prior to parameter and +variable expansion (see +EXPANSION + + +above) but after history expansion is performed, subject to the +values of the shell variables +HISTIGNORE + + +and +HISTCONTROL. + + +

+ +On startup, the history is initialized from the file named by +the variable +HISTFILE + + +(default ~/.bash_history). +The file named by the value of +HISTFILE + + +is truncated, if necessary, to contain no more than +the number of lines specified by the value of +HISTFILESIZE. + + +If HISTFILESIZE is unset, or set to null, a non-numeric value, +or a numeric value less than zero, the history file is not truncated. +When the history file is read, +lines beginning with the history comment character followed immediately +by a digit are interpreted as timestamps for the following history line. +These timestamps are optionally displayed depending on the value of the +HISTTIMEFORMAT + + +variable. +When a shell with history enabled exits, the last +$HISTSIZE + + +lines are copied from the history list to +$HISTFILE. + + +If the +histappend + +shell option is enabled +(see the description of +shopt + +under +SHELL BUILTIN COMMANDS + + +below), the lines are appended to the history file, +otherwise the history file is overwritten. +If +HISTFILE + + +is unset, or if the history file is unwritable, the history is +not saved. +If the +HISTTIMEFORMAT + + +variable is set, time stamps are written to the history file, marked +with the history comment character, so +they may be preserved across shell sessions. +This uses the history comment character to distinguish timestamps from +other history lines. +After saving the history, the history file is truncated +to contain no more than +HISTFILESIZE + + +lines. If +HISTFILESIZE + + +is unset, or set to null, a non-numeric value, +or a numeric value less than zero, the history file is not truncated. +

+ +The builtin command +fc + +(see +SHELL BUILTIN COMMANDS + + +below) may be used to list or edit and re-execute a portion of +the history list. +The +history + +builtin may be used to display or modify the history list and +manipulate the history file. +When using command-line editing, search commands +are available in each editing mode that provide access to the +history list. +

+ +The shell allows control over which commands are saved on the history +list. The +HISTCONTROL + + +and +HISTIGNORE + + +variables may be set to cause the shell to save only a subset of the +commands entered. +The +cmdhist + +shell option, if enabled, causes the shell to attempt to save each +line of a multi-line command in the same history entry, adding +semicolons where necessary to preserve syntactic correctness. +The +lithist + +shell option causes the shell to save the command with embedded newlines +instead of semicolons. See the description of the +shopt + +builtin below under +SHELL BUILTIN COMMANDS + + +for information on setting and unsetting shell options. +  +

HISTORY EXPANSION

+ +The shell supports a history expansion feature that +is similar to the history expansion in +csh. + +This section describes what syntax features are available. This +feature is enabled by default for interactive shells, and can be +disabled using the ++H + +option to the +set + +builtin command (see +SHELL BUILTIN COMMANDS + + +below). Non-interactive shells do not perform history expansion +by default. +

+ +History expansions introduce words from the history list into +the input stream, making it easy to repeat commands, insert the +arguments to a previous command into the current input line, or +fix errors in previous commands quickly. +

+ +History expansion is performed immediately after a complete line +is read, before the shell breaks it into words, and is performed +on each line individually without taking quoting on previous lines into +account. +It takes place in two parts. +The first is to determine which line from the history list +to use during substitution. +The second is to select portions of that line for inclusion into +the current one. +The line selected from the history is the event, +and the portions of that line that are acted upon are words. +Various modifiers are available to manipulate the selected words. +The line is broken into words in the same fashion as when reading input, +so that several metacharacter-separated words surrounded by +quotes are considered one word. +History expansions are introduced by the appearance of the +history expansion character, which is ! by default. +Only backslash (\) and single quotes can quote +the history expansion character, but the history expansion character is +also treated as quoted if it immediately precedes the closing double quote +in a double-quoted string. +

+ +Several characters inhibit history expansion if found immediately +following the history expansion character, even if it is unquoted: +space, tab, newline, carriage return, and =. +If the extglob shell option is enabled, ( will also +inhibit expansion. +

+ +Several shell options settable with the +shopt + +builtin may be used to tailor the behavior of history expansion. +If the +histverify + +shell option is enabled (see the description of the +shopt + +builtin below), and +readline + +is being used, history substitutions are not immediately passed to +the shell parser. +Instead, the expanded line is reloaded into the +readline + +editing buffer for further modification. +If +readline + +is being used, and the +histreedit + +shell option is enabled, a failed history substitution will be reloaded +into the +readline + +editing buffer for correction. +The +-p + +option to the +history + +builtin command may be used to see what a history expansion will +do before using it. +The +-s + +option to the +history + +builtin may be used to add commands to the end of the history list +without actually executing them, so that they are available for +subsequent recall. +

+ +The shell allows control of the various characters used by the +history expansion mechanism (see the description of +histchars + +above under +Shell Variables). + +The shell uses +the history comment character to mark history timestamps when +writing the history file. +  +

Event Designators

+ +An event designator is a reference to a command line entry in the +history list. +Unless the reference is absolute, events are relative to the current +position in the history list. +

+ + +

+
! + +
+Start a history substitution, except when followed by a +blank, + +newline, carriage return, = +or ( (when the extglob shell option is enabled using +the shopt builtin). +
!n + +
+Refer to command line +n. + +
!-n + +
+Refer to the current command minus +n. + +
!! + +
+Refer to the previous command. This is a synonym for `!-1'. +
!string + +
+Refer to the most recent command preceding the current position in the +history list starting with +string. + +
!?string[?] + +
+Refer to the most recent command preceding the current position in the +history list containing +string. + +The trailing ? may be omitted if +string + +is followed immediately by a newline. +If string is missing, the string from the most recent search is used; +it is an error if there is no previous search string. +
^string1^string2^ + +
+Quick substitution. Repeat the previous command, replacing +string1 + +with +string2. + +Equivalent to +``!!:s^string1^string2^'' +(see Modifiers below). +
!# + +
+The entire command line typed so far. + +
+  +

Word Designators

+ +Word designators are used to select desired words from the event. +A +: + +separates the event specification from the word designator. +It may be omitted if the word designator begins with a +^, + +$, + +*, + +-, + +or +%. + +Words are numbered from the beginning of the line, +with the first word being denoted by 0 (zero). +Words are inserted into the current line separated by single spaces. +

+ + +

+
0 (zero) + +
+The zeroth word. For the shell, this is the command +word. +
n + +
+The nth word. +
^ + +
+The first argument. That is, word 1. +
$ + +
+The last word. This is usually the last argument, but will expand to the +zeroth word if there is only one word in the line. +
% + +
+The first word matched by the most recent `?string?' search, +if the search string begins with a character that is part of a word. +
x-y + +
+A range of words; `-y' abbreviates `0-y'. +
* + +
+All of the words but the zeroth. This is a synonym +for `1-$'. It is not an error to use +* + +if there is just one +word in the event; the empty string is returned in that case. +
x* + +
+Abbreviates x-$. +
x- + +
+Abbreviates x-$ like x*, but omits the last word. +If x is missing, it defaults to 0. + +
+

+ +If a word designator is supplied without an event specification, the +previous command is used as the event. +  +

Modifiers

+ +After the optional word designator, there may appear a sequence of +one or more of the following modifiers, each preceded by a `:'. +These modify, or edit, the word or words selected from the history event. +

+ + +

+
h + +
+Remove a trailing filename component, leaving only the head. +
t + +
+Remove all leading filename components, leaving the tail. +
r + +
+Remove a trailing suffix of the form .xxx, leaving the +basename. +
e + +
+Remove all but the trailing suffix. +
p + +
+Print the new command but do not execute it. +
q + +
+Quote the substituted words, escaping further substitutions. +
x + +
+Quote the substituted words as with +q, + +but break into words at +blanks + +and newlines. +The q and x modifiers are mutually exclusive; the last one +supplied is used. +
s/old/new/ + +
+Substitute +new + +for the first occurrence of +old + +in the event line. +Any character may be used as the delimiter in place of /. +The final delimiter is optional if it is the last character of the +event line. +The delimiter may be quoted in +old + +and +new + +with a single backslash. If & appears in +new, + +it is replaced by +old. + +A single backslash will quote the &. +If +old + +is null, it is set to the last +old + +substituted, or, if no previous history substitutions took place, +the last +string + +in a +!?string[?] + +search. +If +new + +is null, each matching +old + +is deleted. +
& + +
+Repeat the previous substitution. +
g + +
+Cause changes to be applied over the entire event line. This is +used in conjunction with `:s' (e.g., `:gs/old/new/') +or `:&'. If used with +`:s', any delimiter can be used +in place of /, and the final delimiter is optional +if it is the last character of the event line. +An a may be used as a synonym for g. +
G + +
+Apply the following `s' or `&' modifier once to each word +in the event line. + +
+  +

SHELL BUILTIN COMMANDS

+ + + +

+ +Unless otherwise noted, each builtin command documented in this +section as accepting options preceded by +- + +accepts +-- + +to signify the end of the options. +The :, true, false, and test/[ builtins +do not accept options and do not treat -- specially. +The exit, logout, return, +break, continue, let, +and shift builtins accept and process arguments beginning with +- without requiring --. +Other builtins that accept arguments but are not specified as accepting +options interpret arguments beginning with - as invalid options and +require -- to prevent this interpretation. +

+ +

+
: [arguments]
+ +No effect; the command does nothing beyond expanding +arguments + +and performing any specified +redirections. +The return status is zero. +
. filename [arguments]
+ +
source filename [arguments]
+ +Read and execute commands from +filename + +in the current +shell environment and return the exit status of the last command +executed from +filename. + +If +filename + +does not contain a slash, filenames in +PATH + + +are used to find the directory containing +filename. + +The file searched for in +PATH + + +need not be executable. +When bash is not in posix mode, the current directory is +searched if no file is found in +PATH. + + +If the +sourcepath + +option to the +shopt + +builtin command is turned off, the +PATH + + +is not searched. +If any arguments are supplied, they become the positional +parameters when filename is executed. Otherwise the positional +parameters are unchanged. +If the -T option is enabled, source inherits any trap on +DEBUG; if it is not, any DEBUG trap string is saved and +restored around the call to source, and source unsets the +DEBUG trap while it executes. +If -T is not set, and the sourced file changes +the DEBUG trap, the new value is retained when source completes. +The return status is the status of the last command exited within +the script (0 if no commands are executed), and false if +filename + +is not found or cannot be read. +
alias [-p] [name[=value] ...]
+Alias with no arguments or with the +-p + +option prints the list of aliases in the form +alias name=value on standard output. +When arguments are supplied, an alias is defined for +each name whose value is given. +A trailing space in value causes the next word to be +checked for alias substitution when the alias is expanded. +For each name in the argument list for which no value +is supplied, the name and value of the alias is printed. +Alias returns true unless a name is given for which +no alias has been defined. +
bg [jobspec ...]
+Resume each suspended job jobspec in the background, as if it +had been started with +&. + +If +jobspec + +is not present, the shell's notion of the current job is used. +bg + +jobspec + +returns 0 unless run when job control is disabled or, when run with +job control enabled, any specified jobspec was not found +or was started without job control. +
bind [-m keymap] [-lpsvPSVX]
+ +
bind [-m keymap] [-q function] [-u function] [-r keyseq]
+
bind [-m keymap] -f filename
+
bind [-m keymap] -x keyseq:shell-command
+
bind [-m keymap] keyseq:function-name
+
bind [-m keymap] keyseq:readline-command
+ +Display current +readline + +key and function bindings, bind a key sequence to a +readline + +function or macro, or set a +readline + +variable. +Each non-option argument is a command as it would appear in +.inputrc, + +but each binding or command must be passed as a separate argument; +e.g., '"\C-x\C-r": re-read-init-file'. +Options, if supplied, have the following meanings: +
+ +
+
-m keymap + +
+Use +keymap + +as the keymap to be affected by the subsequent bindings. +Acceptable +keymap + +names are +emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, +vi-move, vi-command, and +vi-insert. + +vi is equivalent to vi-command (vi-move is also +a synonym); emacs is +equivalent to emacs-standard. +
-l + +
+List the names of all readline functions. +
-p + +
+Display readline function names and bindings in such a way +that they can be re-read. +
-P + +
+List current readline function names and bindings. +
-s + +
+Display readline key sequences bound to macros and the strings +they output in such a way that they can be re-read. +
-S + +
+Display readline key sequences bound to macros and the strings +they output. +
-v + +
+Display readline variable names and values in such a way that they +can be re-read. +
-V + +
+List current readline variable names and values. +
-f filename + +
+Read key bindings from filename. +
-q function + +
+Query about which keys invoke the named function. +
-u function + +
+Unbind all keys bound to the named function. +
-r keyseq + +
+Remove any current binding for keyseq. +
-x keyseq:shell-command + +
+Cause shell-command to be executed whenever keyseq is +entered. +When shell-command is executed, the shell sets the +READLINE_LINE + + +variable to the contents of the readline line buffer and the +READLINE_POINT + + +and +READLINE_MARK + + +variables to the current location of the insertion point and the saved +insertion point (the mark), respectively. +If the executed command changes the value of any of +READLINE_LINE, + + +READLINE_POINT, + + +or +READLINE_MARK, + + +those new values will be reflected in the editing state. +
-X + +
+List all key sequences bound to shell commands and the associated commands +in a format that can be reused as input. + +
+

+ +The return value is 0 unless an unrecognized option is given or an +error occurred. +

+ +
break [n]
+Exit from within a +for, + +while, + +until, + +or +select + +loop. If n is specified, break n levels. +n + +must be >= 1. If +n + +is greater than the number of enclosing loops, all enclosing loops +are exited. +The return value is 0 unless n is not greater than or equal to 1. +
builtin shell-builtin [arguments]
+Execute the specified shell builtin, passing it +arguments, + +and return its exit status. +This is useful when defining a +function whose name is the same as a shell builtin, +retaining the functionality of the builtin within the function. +The cd builtin is commonly redefined this way. +The return status is false if +shell-builtin + +is not a shell builtin command. +
caller [expr]
+Returns the context of any active subroutine call (a shell function or +a script executed with the . or source builtins). +Without expr, caller displays the line number and source +filename of the current subroutine call. +If a non-negative integer is supplied as expr, caller +displays the line number, subroutine name, and source file corresponding +to that position in the current execution call stack. This extra +information may be used, for example, to print a stack trace. The +current frame is frame 0. +The return value is 0 unless the shell is not executing a subroutine +call or expr does not correspond to a valid position in the +call stack. +
cd [-L|[-P [-e]] [-@]] [dir]
+Change the current directory to dir. +if dir is not supplied, the value of the +HOME + + +shell variable is the default. +Any additional arguments following dir are ignored. +The variable +CDPATH + + +defines the search path for the directory containing +dir: + +each directory name in +CDPATH + + +is searched for dir. +Alternative directory names in +CDPATH + + +are separated by a colon (:). A null directory name in +CDPATH + + +is the same as the current directory, i.e., ``.''. If +dir + +begins with a slash (/), +then +CDPATH + + +is not used. The +-P + +option causes cd to use the physical directory structure +by resolving symbolic links while traversing dir and +before processing instances of .. in dir (see also the +-P + +option to the +set + +builtin command); the +-L + +option forces symbolic links to be followed by resolving the link +after processing instances of .. in dir. +If .. appears in dir, it is processed by removing the +immediately previous pathname component from dir, back to a slash +or the beginning of dir. +If the +-e + +option is supplied with +-P, + +and the current working directory cannot be successfully determined +after a successful directory change, cd will return an unsuccessful +status. +On systems that support it, the -@ option presents the extended +attributes associated with a file as a directory. +An argument of +- + +is converted to +$OLDPWD + + +before the directory change is attempted. +If a non-empty directory name from +CDPATH + + +is used, or if +- is the first argument, and the directory change is +successful, the absolute pathname of the new working directory is +written to the standard output. +The return value is true if the directory was successfully changed; +false otherwise. +
command [-pVv] command [arg ...]
+Run +command + +with +args + +suppressing the normal shell function lookup. +Only builtin commands or commands found in the +PATH + + +are executed. If the +-p + +option is given, the search for +command + +is performed using a default value for +PATH + + +that is guaranteed to find all of the standard utilities. +If either the +-V + +or +-v + +option is supplied, a description of +command + +is printed. The +-v + +option causes a single word indicating the command or filename +used to invoke +command + +to be displayed; the +-V + +option produces a more verbose description. +If the +-V + +or +-v + +option is supplied, the exit status is 0 if +command + +was found, and 1 if not. If neither option is supplied and +an error occurred or +command + +cannot be found, the exit status is 127. Otherwise, the exit status of the +command + +builtin is the exit status of +command. + +
compgen [option] [word]
+Generate possible completion matches for word according to +the options, which may be any option accepted by the +complete + +builtin with the exception of -p and -r, and write +the matches to the standard output. +When using the -F or -C options, the various shell variables +set by the programmable completion facilities, while available, will not +have useful values. +

+The matches will be generated in the same way as if the programmable +completion code had generated them directly from a completion specification +with the same flags. +If word is specified, only those completions matching word +will be displayed. +

+The return value is true unless an invalid option is supplied, or no +matches were generated. +

complete [-abcdefgjksuv] [-o comp-option] [-DEI] [-A action] [-G globpat] [-W wordlist]
+
+ +[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] name [name ...] + +
complete -pr [-DEI] [name ...]
+ +Specify how arguments to each name should be completed. +If the -p option is supplied, or if no options are supplied, +existing completion specifications are printed in a way that allows +them to be reused as input. +The -r option removes a completion specification for +each name, or, if no names are supplied, all +completion specifications. +The -D option indicates that other supplied options and actions should +apply to the ``default'' command completion; that is, completion attempted +on a command for which no completion has previously been defined. +The -E option indicates that other supplied options and actions should +apply to ``empty'' command completion; that is, completion attempted on a +blank line. +The -I option indicates that other supplied options and actions should +apply to completion on the initial non-assignment word on the line, or after +a command delimiter such as ; or |, which is usually command +name completion. +If multiple options are supplied, the -D option takes precedence +over -E, and both take precedence over -I. +If any of -D, -E, or -I are supplied, any other +name arguments are ignored; these completions only apply to the case +specified by the option. +

+The process of applying these completion specifications when word completion +is attempted is described above under Programmable Completion. +

+Other options, if specified, have the following meanings. +The arguments to the -G, -W, and -X options +(and, if necessary, the -P and -S options) +should be quoted to protect them from expansion before the +complete + +builtin is invoked. +

+ +
+
-o comp-option
+The comp-option controls several aspects of the compspec's behavior +beyond the simple generation of completions. +comp-option may be one of: +
+
+
bashdefault + +
+Perform the rest of the default bash completions if the compspec +generates no matches. +
default + +
+Use readline's default filename completion if the compspec generates +no matches. +
dirnames + +
+Perform directory name completion if the compspec generates no matches. +
filenames + +
+Tell readline that the compspec generates filenames, so it can perform any +filename-specific processing (like adding a slash to directory names, +quoting special characters, or suppressing trailing spaces). +Intended to be used with shell functions. +
noquote + +
+Tell readline not to quote the completed words if they are filenames +(quoting filenames is the default). +
nosort + +
+Tell readline not to sort the list of possible completions alphabetically. +
nospace + +
+Tell readline not to append a space (the default) to words completed at +the end of the line. +
plusdirs + +
+After any matches defined by the compspec are generated, +directory name completion is attempted and any +matches are added to the results of the other actions. +
+ +
-A action
+The action may be one of the following to generate a list of possible +completions: +
+
+
alias + +
+Alias names. May also be specified as -a. +
arrayvar + +
+Array variable names. +
binding + +
+Readline key binding names. +
builtin + +
+Names of shell builtin commands. May also be specified as -b. +
command + +
+Command names. May also be specified as -c. +
directory + +
+Directory names. May also be specified as -d. +
disabled + +
+Names of disabled shell builtins. +
enabled + +
+Names of enabled shell builtins. +
export + +
+Names of exported shell variables. May also be specified as -e. +
file + +
+File names. May also be specified as -f. +
function + +
+Names of shell functions. +
group + +
+Group names. May also be specified as -g. +
helptopic + +
+Help topics as accepted by the help builtin. +
hostname + +
+Hostnames, as taken from the file specified by the +HOSTFILE + + +shell variable. +
job + +
+Job names, if job control is active. May also be specified as -j. +
keyword + +
+Shell reserved words. May also be specified as -k. +
running + +
+Names of running jobs, if job control is active. +
service + +
+Service names. May also be specified as -s. +
setopt + +
+Valid arguments for the -o option to the set builtin. +
shopt + +
+Shell option names as accepted by the shopt builtin. +
signal + +
+Signal names. +
stopped + +
+Names of stopped jobs, if job control is active. +
user + +
+User names. May also be specified as -u. +
variable + +
+Names of all shell variables. May also be specified as -v. +
+ +
-C command
+command is executed in a subshell environment, and its output is +used as the possible completions. +
-F function
+The shell function function is executed in the current shell +environment. +When the function is executed, +the first argument ($1) is the name of the command whose arguments are +being completed, +the second argument ($2) is the word being completed, +and the third argument ($3) is the word preceding the word being +completed on the current command line. +When it finishes, the possible completions are retrieved from the value +of the +COMPREPLY + + +array variable. +
-G globpat
+The pathname expansion pattern globpat is expanded to generate +the possible completions. +
-P prefix
+prefix is added at the beginning of each possible completion +after all other options have been applied. +
-S suffix
+suffix is appended to each possible completion +after all other options have been applied. +
-W wordlist
+The wordlist is split using the characters in the +IFS + + +special variable as delimiters, and each resultant word is expanded. +Shell quoting is honored within wordlist, +in order to provide a +mechanism for the words to contain shell metacharacters or characters +in the value of +IFS. + + +The possible completions are the members of the resultant list which +match the word being completed. +
-X filterpat
+filterpat is a pattern as used for pathname expansion. +It is applied to the list of possible completions generated by the +preceding options and arguments, and each completion matching +filterpat is removed from the list. +A leading ! in filterpat negates the pattern; in this +case, any completion not matching filterpat is removed. + +
+

+ +The return value is true unless an invalid option is supplied, an option +other than -p or -r is supplied without a name +argument, an attempt is made to remove a completion specification for +a name for which no specification exists, or +an error occurs adding a completion specification. +

+ +
compopt [-o option] [-DEI] [+o option] [name]
+Modify completion options for each name according to the +options, or for the +currently-executing completion if no names are supplied. +If no options are given, display the completion options for each +name or the current completion. +The possible values of option are those valid for the complete +builtin described above. +The -D option indicates that other supplied options should +apply to the ``default'' command completion; that is, completion attempted +on a command for which no completion has previously been defined. +The -E option indicates that other supplied options should +apply to ``empty'' command completion; that is, completion attempted on a +blank line. +The -I option indicates that other supplied options should +apply to completion on the initial non-assignment word on the line, +or after a command delimiter such as ; or |, which is usually +command name completion. +

+The return value is true unless an invalid option is supplied, an attempt +is made to modify the options for a name for which no completion +specification exists, or an output error occurs. +

continue [n]
+Resume the next iteration of the enclosing +for, + +while, + +until, + +or +select + +loop. +If +n + +is specified, resume at the nth enclosing loop. +n + +must be >= 1. If +n + +is greater than the number of enclosing loops, the last enclosing loop +(the ``top-level'' loop) is resumed. +The return value is 0 unless n is not greater than or equal to 1. +
declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]
+ +
typeset [-aAfFgiIlnrtux] [-p] [name[=value] ...]
+ +Declare variables and/or give them attributes. +If no names are given then display the values of variables. +The +-p + +option will display the attributes and values of each +name. + +When +-p + +is used with name arguments, additional options, +other than -f and -F, are ignored. +When +-p + +is supplied without name arguments, it will display the attributes +and values of all variables having the attributes specified by the +additional options. +If no other options are supplied with -p, declare will display +the attributes and values of all shell variables. The -f option +will restrict the display to shell functions. +The +-F + +option inhibits the display of function definitions; only the +function name and attributes are printed. +If the extdebug shell option is enabled using shopt, +the source file name and line number where each name +is defined are displayed as well. The +-F + +option implies +-f. + +The +-g + +option forces variables to be created or modified at the global scope, +even when declare is executed in a shell function. +It is ignored in all other cases. +The +-I + +option causes local variables to inherit the attributes +(except the nameref attribute) +and value of any existing variable with the same +name at a surrounding scope. +If there is no existing variable, the local variable is initially unset. +The following options can +be used to restrict output to variables with the specified attribute or +to give variables attributes: +
+ +
+
-a + +
+Each name is an indexed array variable (see +Arrays + +above). +
-A + +
+Each name is an associative array variable (see +Arrays + +above). +
-f + +
+Use function names only. +
-i + +
+The variable is treated as an integer; arithmetic evaluation (see +ARITHMETIC EVALUATION + + +above) is performed when the variable is assigned a value. +
-l + +
+When the variable is assigned a value, all upper-case characters are +converted to lower-case. +The upper-case attribute is disabled. +
-n + +
+Give each name the nameref attribute, making +it a name reference to another variable. +That other variable is defined by the value of name. +All references, assignments, and attribute modifications +to name, except those using or changing the +-n attribute itself, are performed on the variable referenced by +name's value. +The nameref attribute cannot be applied to array variables. +
-r + +
+Make names readonly. These names cannot then be assigned values +by subsequent assignment statements or unset. +
-t + +
+Give each name the trace attribute. +Traced functions inherit the DEBUG and RETURN traps from +the calling shell. +The trace attribute has no special meaning for variables. +
-u + +
+When the variable is assigned a value, all lower-case characters are +converted to upper-case. +The lower-case attribute is disabled. +
-x + +
+Mark names for export to subsequent commands via the environment. + +
+

+ +Using `+' instead of `-' +turns off the attribute instead, +with the exceptions that +a and +A +may not be used to destroy array variables and +r will not +remove the readonly attribute. +When used in a function, +declare + +and +typeset + +make each +name local, as with the +local + +command, +unless the -g option is supplied. +If a variable name is followed by =value, the value of +the variable is set to value. +When using -a or -A and the compound assignment syntax to +create array variables, additional attributes do not take effect until +subsequent assignments. +The return value is 0 unless an invalid option is encountered, +an attempt is made to define a function using + +-f foo=bar, +an attempt is made to assign a value to a readonly variable, +an attempt is made to assign a value to an array variable without +using the compound assignment syntax (see +Arrays + +above), one of the names is not a valid shell variable name, +an attempt is made to turn off readonly status for a readonly variable, +an attempt is made to turn off array status for an array variable, +or an attempt is made to display a non-existent function with -f. +

+ +
dirs [-clpv] [+n] [-n] + +
+Without options, displays the list of currently remembered directories. +The default display is on a single line with directory names separated +by spaces. +Directories are added to the list with the +pushd + +command; the +popd + +command removes entries from the list. +The current directory is always the first directory in the stack. +
+ +
+
-c + +
+Clears the directory stack by deleting all of the entries. +
-l + +
+Produces a listing using full pathnames; +the default listing format uses a tilde to denote the home directory. +
-p + +
+Print the directory stack with one entry per line. +
-v + +
+Print the directory stack with one entry per line, +prefixing each entry with its index in the stack. +
+n
+Displays the nth entry counting from the left of the list +shown by +dirs + +when invoked without options, starting with zero. +
-n
+Displays the nth entry counting from the right of the list +shown by +dirs + +when invoked without options, starting with zero. + +
+

+ +The return value is 0 unless an +invalid option is supplied or n indexes beyond the end +of the directory stack. +

+ +
disown [-ar] [-h] [jobspec ... | pid ... ]
+Without options, remove each +jobspec + +from the table of active jobs. +If +jobspec + +is not present, and neither the -a nor the -r option +is supplied, the current job is used. +If the -h option is given, each +jobspec + +is not removed from the table, but is marked so that +SIGHUP + + +is not sent to the job if the shell receives a +SIGHUP. + + +If no +jobspec + +is supplied, the +-a + +option means to remove or mark all jobs; the +-r + +option without a +jobspec + +argument restricts operation to running jobs. +The return value is 0 unless a +jobspec + +does not specify a valid job. +
echo [-neE] [arg ...]
+Output the args, separated by spaces, followed by a newline. +The return status is 0 unless a write error occurs. +If -n is specified, the trailing newline is +suppressed. If the -e option is given, interpretation of +the following backslash-escaped characters is enabled. The +-E + +option disables the interpretation of these escape characters, +even on systems where they are interpreted by default. +The xpg_echo shell option may be used to +dynamically determine whether or not echo expands these +escape characters by default. +echo + +does not interpret -- to mean the end of options. +echo + +interprets the following escape sequences: +
+ +
+
\a + +
+alert (bell) +
\b + +
+backspace +
\c + +
+suppress further output +
\e + +
+
\E + +
+an escape character +
\f + +
+form feed +
\n + +
+new line +
\r + +
+carriage return +
\t + +
+horizontal tab +
\v + +
+vertical tab +
\\ + +
+backslash +
\0nnn + +
+the eight-bit character whose value is the octal value nnn +(zero to three octal digits) +
\xHH + +
+the eight-bit character whose value is the hexadecimal value HH +(one or two hex digits) +
\uHHHH + +
+the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHH (one to four hex digits) +
\UHHHHHHHH + +
+the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHHHHHH (one to eight hex digits) + +
+ +
enable [-a] [-dnps] [-f filename] [name ...]
+Enable and disable builtin shell commands. +Disabling a builtin allows a disk command which has the same name +as a shell builtin to be executed without specifying a full pathname, +even though the shell normally searches for builtins before disk commands. +If -n is used, each name +is disabled; otherwise, +names are enabled. For example, to use the +test + +binary found via the +PATH + + +instead of the shell builtin version, run +enable -n test. + +The +-f + +option means to load the new builtin command +name + +from shared object +filename, + +on systems that support dynamic loading. The +-d + +option will delete a builtin previously loaded with +-f. + +If no name arguments are given, or if the +-p + +option is supplied, a list of shell builtins is printed. +With no other option arguments, the list consists of all enabled +shell builtins. +If -n is supplied, only disabled builtins are printed. +If -a is supplied, the list printed includes all builtins, with an +indication of whether or not each is enabled. +If -s is supplied, the output is restricted to the POSIX +special builtins. +The return value is 0 unless a +name + +is not a shell builtin or there is an error loading a new builtin +from a shared object. +
eval [arg ...]
+The args are read and concatenated together into a single +command. This command is then read and executed by the shell, and +its exit status is returned as the value of +eval. + +If there are no +args, + +or only null arguments, +eval + +returns 0. +
exec [-cl] [-a name] [command [arguments]]
+If +command + +is specified, it replaces the shell. +No new process is created. The +arguments + +become the arguments to command. +If the +-l + +option is supplied, +the shell places a dash at the beginning of the zeroth argument passed to +command. + +This is what +login(1) + +does. The +-c + +option causes +command + +to be executed with an empty environment. If +-a + +is supplied, the shell passes +name + +as the zeroth argument to the executed command. +If +command + +cannot be executed for some reason, a non-interactive shell exits, +unless the +execfail + +shell option +is enabled. In that case, it returns failure. +An interactive shell returns failure if the file cannot be executed. +A subshell exits unconditionally if exec fails. +If +command + +is not specified, any redirections take effect in the current shell, +and the return status is 0. If there is a redirection error, the +return status is 1. +
exit [n]
+Cause the shell to exit +with a status of n. If +n + +is omitted, the exit status +is that of the last command executed. +A trap on +EXIT + + +is executed before the shell terminates. +
export [-fn] [name[=word]] ...
+ +
export -p + +
+ +The supplied +names + +are marked for automatic export to the environment of +subsequently executed commands. If the +-f + +option is given, the +names + +refer to functions. +If no +names + +are given, or if the +-p + +option is supplied, a list +of names of all exported variables is printed. +The +-n + +option causes the export property to be removed from each +name. +If a variable name is followed by =word, the value of +the variable is set to word. +export + +returns an exit status of 0 unless an invalid option is +encountered, +one of the names is not a valid shell variable name, or +-f + +is supplied with a +name + +that is not a function. +
fc [-e ename] [-lnr] [first] [last]
+ +
fc -s [pat=rep] [cmd]
+ +The first form selects a range of commands from +first + +to +last + +from the history list and displays or edits and re-executes them. +First + +and +last + +may be specified as a string (to locate the last command beginning +with that string) or as a number (an index into the history list, +where a negative number is used as an offset from the current +command number). +When listing, a first or last of +0 is equivalent to -1 and -0 is equivalent to the current +command (usually the fc command); otherwise 0 is equivalent to -1 +and -0 is invalid. +If +last + +is not specified, it is set to +the current command for listing (so that + +fc -l -10 +prints the last 10 commands) and to +first + +otherwise. +If +first + +is not specified, it is set to the previous +command for editing and -16 for listing. +

+The +-n + +option suppresses +the command numbers when listing. The +-r + +option reverses the order of +the commands. If the +-l + +option is given, +the commands are listed on +standard output. Otherwise, the editor given by +ename + +is invoked +on a file containing those commands. If +ename + +is not given, the +value of the +FCEDIT + + +variable is used, and +the value of +EDITOR + + +if +FCEDIT + + +is not set. If neither variable is set, + +vi + +is used. When editing is complete, the edited commands are +echoed and executed. +

+In the second form, command is re-executed after each instance +of pat is replaced by rep. +Command is interpreted the same as first above. +A useful alias to use with this is + +r='fc -s', +so that typing + +r cc +runs the last command beginning with + +cc +and typing + +r +re-executes the last command. +

+If the first form is used, the return value is 0 unless an invalid +option is encountered or +first + +or +last + +specify history lines out of range. +If the +-e + +option is supplied, the return value is the value of the last +command executed or failure if an error occurs with the temporary +file of commands. If the second form is used, the return status +is that of the command re-executed, unless +cmd + +does not specify a valid history line, in which case +fc + +returns failure. +

fg [jobspec]
+Resume +jobspec + +in the foreground, and make it the current job. +If +jobspec + +is not present, the shell's notion of the current job is used. +The return value is that of the command placed into the foreground, +or failure if run when job control is disabled or, when run with +job control enabled, if +jobspec + +does not specify a valid job or +jobspec + +specifies a job that was started without job control. +
getopts optstring name [arg ...]
+getopts + +is used by shell procedures to parse positional parameters. +optstring + +contains the option characters to be recognized; if a character +is followed by a colon, the option is expected to have an +argument, which should be separated from it by white space. +The colon and question mark characters may not be used as +option characters. +Each time it is invoked, +getopts + +places the next option in the shell variable +name, + +initializing +name + +if it does not exist, +and the index of the next argument to be processed into the +variable +OPTIND. + + +OPTIND + + +is initialized to 1 each time the shell or a shell script +is invoked. When an option requires an argument, +getopts + +places that argument into the variable +OPTARG. + + +The shell does not reset +OPTIND + + +automatically; it must be manually reset between multiple +calls to +getopts + +within the same shell invocation if a new set of parameters +is to be used. +

+When the end of options is encountered, getopts exits with a +return value greater than zero. +OPTIND + + +is set to the index of the first non-option argument, +and name is set to ?. +

+getopts + +normally parses the positional parameters, but if more arguments are +supplied as +arg + +values, +getopts + +parses those instead. +

+getopts + +can report errors in two ways. If the first character of +optstring + +is a colon, +silent + +error reporting is used. In normal operation, diagnostic messages +are printed when invalid options or missing option arguments are +encountered. +If the variable +OPTERR + + +is set to 0, no error messages will be displayed, even if the first +character of +optstring + +is not a colon. +

+If an invalid option is seen, +getopts + +places ? into +name + +and, if not silent, +prints an error message and unsets +OPTARG. + + +If +getopts + +is silent, +the option character found is placed in +OPTARG + + +and no diagnostic message is printed. +

+If a required argument is not found, and +getopts + +is not silent, +a question mark (?) is placed in +name, + +OPTARG + + +is unset, and a diagnostic message is printed. +If +getopts + +is silent, then a colon (:) is placed in +name + +and +OPTARG + + +is set to the option character found. +

+getopts + +returns true if an option, specified or unspecified, is found. +It returns false if the end of options is encountered or an +error occurs. +

hash [-lr] [-p filename] [-dt] [name]
+Each time hash is invoked, +the full pathname of the command +name + +is determined by searching +the directories in +$PATH + +and remembered. Any previously-remembered pathname is discarded. +If the +-p + +option is supplied, no path search is performed, and +filename + +is used as the full filename of the command. +The +-r + +option causes the shell to forget all +remembered locations. +The +-d + +option causes the shell to forget the remembered location of each name. +If the +-t + +option is supplied, the full pathname to which each name corresponds +is printed. If multiple name arguments are supplied with -t, +the name is printed before the hashed full pathname. +The +-l + +option causes output to be displayed in a format that may be reused as input. +If no arguments are given, or if only -l is supplied, +information about remembered commands is printed. +The return status is true unless a +name + +is not found or an invalid option is supplied. +
help [-dms] [pattern]
+Display helpful information about builtin commands. If +pattern + +is specified, +help + +gives detailed help on all commands matching +pattern; + +otherwise help for all the builtins and shell control structures +is printed. +
+ +
+
-d + +
+Display a short description of each pattern +
-m + +
+Display the description of each pattern in a manpage-like format +
-s + +
+Display only a short usage synopsis for each pattern + +
+

+ +The return status is 0 unless no command matches +pattern. + +

+ +
history [n]
+ +
history -c
+
history -d offset
+
history -d start-end
+
history -anrw [filename]
+
history -p arg [arg ...]
+
history -s arg [arg ...]
+ +With no options, display the command +history list with line numbers. Lines listed +with a +* + +have been modified. An argument of +n + +lists only the last +n + +lines. +If the shell variable +HISTTIMEFORMAT + + +is set and not null, +it is used as a format string for strftime(3) to display +the time stamp associated with each displayed history entry. +No intervening blank is printed between the formatted time stamp +and the history line. +If filename is supplied, it is used as the +name of the history file; if not, the value of +HISTFILE + + +is used. Options, if supplied, have the following meanings: +
+ +
+
-c + +
+Clear the history list by deleting all the entries. +
-d offset
+Delete the history entry at position offset. +If offset is negative, it is interpreted as relative to one greater +than the last history position, so negative indices count back from the +end of the history, and an index of -1 refers to the current +history -d command. +
-d start-end
+Delete the history entries between positions start and end, +inclusive. Positive and negative values for start and end +are interpreted as described above. +
-a + +
+Append the ``new'' history lines to the history file. +These are history lines entered since the beginning of the current +bash session, but not already appended to the history file. +
-n + +
+Read the history lines not already read from the history +file into the current history list. These are lines +appended to the history file since the beginning of the +current bash session. +
-r + +
+Read the contents of the history file +and append them to the current history list. +
-w + +
+Write the current history list to the history file, overwriting the +history file's contents. +
-p + +
+Perform history substitution on the following args and display +the result on the standard output. +Does not store the results in the history list. +Each arg must be quoted to disable normal history expansion. +
-s + +
+Store the +args + +in the history list as a single entry. The last command in the +history list is removed before the +args + +are added. + +
+

+ +If the +HISTTIMEFORMAT + + +variable is set, the time stamp information +associated with each history entry is written to the history file, +marked with the history comment character. +When the history file is read, lines beginning with the history +comment character followed immediately by a digit are interpreted +as timestamps for the following history entry. +The return value is 0 unless an invalid option is encountered, an +error occurs while reading or writing the history file, an invalid +offset is supplied as an argument to -d, or the +history expansion supplied as an argument to -p fails. +

+ +
jobs [-lnprs] [ jobspec ... ]
+ +
jobs -x command [ args ... ]
+ +The first form lists the active jobs. The options have the following +meanings: +
+ +
+
-l + +
+List process IDs +in addition to the normal information. +
-n + +
+Display information only about jobs that have changed status since +the user was last notified of their status. +
-p + +
+List only the process ID of the job's process group +leader. +
-r + +
+Display only running jobs. +
-s + +
+Display only stopped jobs. + +
+

+ +If +jobspec + +is given, output is restricted to information about that job. +The return status is 0 unless an invalid option is encountered +or an invalid +jobspec + +is supplied. +

+ +If the +-x + +option is supplied, +jobs + +replaces any +jobspec + +found in +command + +or +args + +with the corresponding process group ID, and executes +command + +passing it +args, + +returning its exit status. +

+ +
kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ...
+ +
kill -l|-L [sigspec | exit_status]
+ +Send the signal named by +sigspec + +or +signum + +to the processes named by +pid + +or +jobspec. + +sigspec + +is either a case-insensitive signal name such as +SIGKILL + + +(with or without the +SIG + + +prefix) or a signal number; +signum + +is a signal number. +If +sigspec + +is not present, then +SIGTERM + + +is assumed. +An argument of +-l + +lists the signal names. +If any arguments are supplied when +-l + +is given, the names of the signals corresponding to the arguments are +listed, and the return status is 0. +The exit_status argument to +-l + +is a number specifying either a signal number or the exit status of +a process terminated by a signal. +The +-L + +option is equivalent to -l. +kill + +returns true if at least one signal was successfully sent, or false +if an error occurs or an invalid option is encountered. +
let arg [arg ...]
+Each +arg + +is an arithmetic expression to be evaluated (see +ARITHMETIC EVALUATION + + +above). +If the last +arg + +evaluates to 0, +let + +returns 1; 0 is returned otherwise. +
local [option] [name[=value] ... | - ]
+For each argument, a local variable named +name + +is created, and assigned +value. + +The option can be any of the options accepted by declare. +When +local + +is used within a function, it causes the variable +name + +to have a visible scope restricted to that function and its children. +If name is -, the set of shell options is made local to the function +in which local is invoked: shell options changed using the +set builtin inside the function are restored to their original values +when the function returns. +The restore is effected as if a series of set commands were executed +to restore the values that were in place before the function. +With no operands, +local + +writes a list of local variables to the standard output. It is +an error to use +local + +when not within a function. The return status is 0 unless +local + +is used outside a function, an invalid +name + +is supplied, or +name is a readonly variable. +
logout + +
+Exit a login shell. +
mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
+ +
readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
+ +Read lines from the standard input into the indexed array variable +array, + +or from file descriptor +fd + +if the +-u + +option is supplied. +The variable +MAPFILE + + +is the default array. +Options, if supplied, have the following meanings: +
+ +
+
-d + +
+The first character of delim is used to terminate each input line, +rather than newline. +If delim is the empty string, mapfile will terminate a line +when it reads a NUL character. +
-n + +
+Copy at most +count + +lines. If count is 0, all lines are copied. +
-O + +
+Begin assigning to +array + +at index +origin. + +The default index is 0. +
-s + +
+Discard the first count lines read. +
-t + +
+Remove a trailing delim (default newline) from each line read. +
-u + +
+Read lines from file descriptor fd instead of the standard input. +
-C + +
+Evaluate +callback + +each time quantum lines are read. The -c option specifies +quantum. + +
-c + +
+Specify the number of lines read between each call to +callback. + + +
+

+ +If +-C + +is specified without +-c, + +the default quantum is 5000. +When callback is evaluated, it is supplied the index of the next +array element to be assigned and the line to be assigned to that element +as additional arguments. +callback is evaluated after the line is read but before the +array element is assigned. +

+ +If not supplied with an explicit origin, mapfile will clear array +before assigning to it. +

+ +mapfile returns successfully unless an invalid option or option +argument is supplied, array is invalid or unassignable, or if +array is not an indexed array. +

+ +
popd [-n] [+n] [-n]
+Removes entries from the directory stack. With no arguments, +removes the top directory from the stack, and performs a +cd + +to the new top directory. +Arguments, if supplied, have the following meanings: +
+ +
+
-n + +
+Suppresses the normal change of directory when removing directories +from the stack, so that only the stack is manipulated. +
+n
+Removes the nth entry counting from the left of the list +shown by +dirs, + +starting with zero. For example: + +popd +0 +removes the first directory, + +popd +1 +the second. +
-n
+Removes the nth entry counting from the right of the list +shown by +dirs, + +starting with zero. For example: + +popd -0 +removes the last directory, + +popd -1 +the next to last. + +
+

+ +If the +popd + +command is successful, a +dirs + +is performed as well, and the return status is 0. +popd + +returns false if an invalid option is encountered, the directory stack +is empty, a non-existent directory stack entry is specified, or the +directory change fails. +

+ +
printf [-v var] format [arguments]
+Write the formatted arguments to the standard output under the +control of the format. +The -v option causes the output to be assigned to the variable +var rather than being printed to the standard output. +

+The format is a character string which contains three types of objects: +plain characters, which are simply copied to standard output, character +escape sequences, which are converted and copied to the standard output, and +format specifications, each of which causes printing of the next successive +argument. +In addition to the standard printf(1) format specifications, +printf interprets the following extensions: +

+ +
+
%b + +
+causes +printf to expand backslash escape sequences in the corresponding +argument +in the same way as echo -e. +
%q + +
+causes printf to output the corresponding +argument in a format that can be reused as shell input. +
%(datefmt)T + +
+causes printf to output the date-time string resulting from using +datefmt as a format string for strftime(3). +The corresponding argument is an integer representing the number of +seconds since the epoch. +Two special argument values may be used: -1 represents the current +time, and -2 represents the time the shell was invoked. +If no argument is specified, conversion behaves as if -1 had been given. +This is an exception to the usual printf behavior. + +
+

+ +The %b, %q, and %T directives all use the field width and precision +arguments from the format specification and write that many bytes from +(or use that wide a field for) the expanded argument, which usually +contains more characters than the original. +

+ +Arguments to non-string format specifiers are treated as C constants, +except that a leading plus or minus sign is allowed, and if the leading +character is a single or double quote, the value is the ASCII value of +the following character. +

+ +The format is reused as necessary to consume all of the arguments. +If the format requires more arguments than are supplied, the +extra format specifications behave as if a zero value or null string, as +appropriate, had been supplied. +The return value is zero on success, non-zero on failure. +

+ +
pushd [-n] [+n] [-n]
+ +
pushd [-n] [dir]
+ +Adds a directory to the top of the directory stack, or rotates +the stack, making the new top of the stack the current working +directory. With no arguments, pushd exchanges the top two directories +and returns 0, unless the directory stack is empty. +Arguments, if supplied, have the following meanings: +
+ +
+
-n + +
+Suppresses the normal change of directory when rotating or +adding directories to the stack, so that only the stack is manipulated. +
+n
+Rotates the stack so that the nth directory +(counting from the left of the list shown by +dirs, + +starting with zero) +is at the top. +
-n
+Rotates the stack so that the nth directory +(counting from the right of the list shown by +dirs, + +starting with zero) is at the top. +
dir + +
+Adds +dir + +to the directory stack at the top, making it the +new current working directory as if it had been supplied as the argument +to the cd builtin. + +
+

+ +If the +pushd + +command is successful, a +dirs + +is performed as well. +If the first form is used, +pushd + +returns 0 unless the cd to +dir + +fails. With the second form, +pushd + +returns 0 unless the directory stack is empty, +a non-existent directory stack element is specified, +or the directory change to the specified new current directory +fails. +

+ +
pwd [-LP]
+Print the absolute pathname of the current working directory. +The pathname printed contains no symbolic links if the +-P + +option is supplied or the +-o physical + +option to the +set + +builtin command is enabled. +If the +-L + +option is used, the pathname printed may contain symbolic links. +The return status is 0 unless an error occurs while +reading the name of the current directory or an +invalid option is supplied. +
read [-ers] [-a aname] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
+One line is read from the standard input, or from the file descriptor +fd supplied as an argument to the -u option, +split into words as described above under Word Splitting, +and the first word +is assigned to the first +name, + +the second word to the second +name, + +and so on. +If there are more words than names, the remaining words and their +intervening delimiters are assigned to the last +name. + +If there are fewer words read from the input stream than names, +the remaining names are assigned empty values. +The characters in +IFS + + +are used to split the line into words using the same rules the shell +uses for expansion (described above under Word Splitting). +The backslash character (\) may be used to remove any special +meaning for the next character read and for line continuation. +Options, if supplied, have the following meanings: +
+ +
+
-a aname + +
+The words are assigned to sequential indices +of the array variable +aname, + +starting at 0. +aname + +is unset before any new values are assigned. +Other name arguments are ignored. +
-d delim + +
+The first character of delim is used to terminate the input line, +rather than newline. +If delim is the empty string, read will terminate a line +when it reads a NUL character. +
-e + +
+If the standard input +is coming from a terminal, +readline + +(see +READLINE + + +above) is used to obtain the line. +Readline uses the current (or default, if line editing was not previously +active) editing settings, but uses Readline's default filename completion. +
-i text + +
+If +readline + +is being used to read the line, text is placed into the editing +buffer before editing begins. +
-n nchars + +
+read returns after reading nchars characters rather than +waiting for a complete line of input, but honors a delimiter if fewer +than nchars characters are read before the delimiter. +
-N nchars + +
+read returns after reading exactly nchars characters rather +than waiting for a complete line of input, unless EOF is encountered or +read times out. +Delimiter characters encountered in the input are +not treated specially and do not cause read to return until +nchars characters are read. +The result is not split on the characters in IFS; the intent is +that the variable is assigned exactly the characters read +(with the exception of backslash; see the -r option below). +
-p prompt + +
+Display prompt on standard error, without a +trailing newline, before attempting to read any input. The prompt +is displayed only if input is coming from a terminal. +
-r + +
+Backslash does not act as an escape character. +The backslash is considered to be part of the line. +In particular, a backslash-newline pair may not then be used as a line +continuation. +
-s + +
+Silent mode. If input is coming from a terminal, characters are +not echoed. +
-t timeout + +
+Cause read to time out and return failure if a complete line of +input (or a specified number of characters) +is not read within timeout seconds. +timeout may be a decimal number with a fractional portion following +the decimal point. +This option is only effective if read is reading input from a +terminal, pipe, or other special file; it has no effect when reading +from regular files. +If read times out, read saves any partial input read into +the specified variable name. +If timeout is 0, read returns immediately, without trying to +read any data. The exit status is 0 if input is available on +the specified file descriptor, non-zero otherwise. +The exit status is greater than 128 if the timeout is exceeded. +
-u fd + +
+Read input from file descriptor fd. + +
+

+ +If no +names + +are supplied, the line read, +without the ending delimiter but otherwise unmodified, +is assigned to the variable +REPLY. + + +The exit status is zero, unless end-of-file is encountered, read +times out (in which case the status is greater than 128), +a variable assignment error (such as assigning to a readonly variable) occurs, +or an invalid file descriptor is supplied as the argument to -u. +

+ +
readonly [-aAf] [-p] [name[=word] ...]
+ +The given +names are marked readonly; the values of these +names + +may not be changed by subsequent assignment. +If the +-f + +option is supplied, the functions corresponding to the +names are so +marked. +The +-a + +option restricts the variables to indexed arrays; the +-A + +option restricts the variables to associative arrays. +If both options are supplied, +-A + +takes precedence. +If no +name + +arguments are given, or if the +-p + +option is supplied, a list of all readonly names is printed. +The other options may be used to restrict the output to a subset of +the set of readonly names. +The +-p + +option causes output to be displayed in a format that +may be reused as input. +If a variable name is followed by =word, the value of +the variable is set to word. +The return status is 0 unless an invalid option is encountered, +one of the +names + +is not a valid shell variable name, or +-f + +is supplied with a +name + +that is not a function. +
return [n]
+Causes a function to stop executing and return the value specified by +n + +to its caller. +If +n + +is omitted, the return status is that of the last command +executed in the function body. +If return is executed by a trap handler, the last command used to +determine the status is the last command executed before the trap handler. +If return is executed during a DEBUG trap, the last command +used to determine the status is the last command executed by the trap +handler before return was invoked. +If +return + +is used outside a function, +but during execution of a script by the +. + +(source) command, it causes the shell to stop executing +that script and return either +n + +or the exit status of the last command executed within the +script as the exit status of the script. +If n is supplied, the return value is its least significant +8 bits. +The return status is non-zero if +return + +is supplied a non-numeric argument, or +is used outside a +function and not during execution of a script by . or source. +Any command associated with the RETURN trap is executed +before execution resumes after the function or script. +
set [--abefhkmnptuvxBCEHPT] [-o option-name] [arg ...]
+ +
set [+abefhkmnptuvxBCEHPT] [+o option-name] [arg ...]
+ +Without options, the name and value of each shell variable are displayed +in a format that can be reused as input +for setting or resetting the currently-set variables. +Read-only variables cannot be reset. +In posix mode, only shell variables are listed. +The output is sorted according to the current locale. +When options are specified, they set or unset shell attributes. +Any arguments remaining after option processing are treated +as values for the positional parameters and are assigned, in order, to +$1, + +$2, + +... + +$n. + +Options, if specified, have the following meanings: +
+ +
+
-a + +
+Each variable or function that is created or modified is given the +export attribute and marked for export to the environment of +subsequent commands. +
-b + +
+Report the status of terminated background jobs +immediately, rather than before the next primary prompt. This is +effective only when job control is enabled. +
-e + +
+Exit immediately if a +pipeline (which may consist of a single simple command), +a list, +or a compound command +(see +SHELL GRAMMAR + + +above), exits with a non-zero status. +The shell does not exit if the +command that fails is part of the command list immediately following a +while + +or +until + +keyword, +part of the test following the +if + +or +elif + +reserved words, part of any command executed in a +&& + +or +|| + +list except the command following the final && or ||, +any command in a pipeline but the last, +or if the command's return value is +being inverted with +!. + +If a compound command other than a subshell +returns a non-zero status because a command failed +while -e was being ignored, the shell does not exit. +A trap on ERR, if set, is executed before the shell exits. +This option applies to the shell environment and each subshell environment +separately (see +COMMAND EXECUTION ENVIRONMENT + + +above), and may cause +subshells to exit before executing all the commands in the subshell. +

+ + +If a compound command or shell function executes in a context +where -e is being ignored, +none of the commands executed within the compound command or function body +will be affected by the -e setting, even if -e is set +and a command returns a failure status. +If a compound command or shell function sets -e while executing in +a context where -e is ignored, that setting will not have any +effect until the compound command or the command containing the function +call completes. +

-f + +
+Disable pathname expansion. +
-h + +
+Remember the location of commands as they are looked up for execution. +This is enabled by default. +
-k + +
+All arguments in the form of assignment statements +are placed in the environment for a command, not just +those that precede the command name. +
-m + +
+Monitor mode. Job control is enabled. This option is on +by default for interactive shells on systems that support +it (see +JOB CONTROL + + +above). +All processes run in a separate process group. +When a background job completes, the shell prints a line +containing its exit status. +
-n + +
+Read commands but do not execute them. +This may be used to check a shell script for syntax errors. +This is ignored by interactive shells. +
-o option-name + +
+The option-name can be one of the following: +
+
+
allexport + +
+Same as +-a. + +
braceexpand + +
+Same as +-B. + +
emacs + +
+Use an emacs-style command line editing interface. This is enabled +by default when the shell is interactive, unless the shell is started +with the +--noediting + +option. +This also affects the editing interface used for read -e. +
errexit + +
+Same as +-e. + +
errtrace + +
+Same as +-E. + +
functrace + +
+Same as +-T. + +
hashall + +
+Same as +-h. + +
histexpand + +
+Same as +-H. + +
history + +
+Enable command history, as described above under +HISTORY. + + +This option is on by default in interactive shells. +
ignoreeof + +
+The effect is as if the shell command +IGNOREEOF=10 + +had been executed +(see +Shell Variables + +above). +
keyword + +
+Same as +-k. + +
monitor + +
+Same as +-m. + +
noclobber + +
+Same as +-C. + +
noexec + +
+Same as +-n. + +
noglob + +
+Same as +-f. + +
nolog + +
+Currently ignored. +
notify + +
+Same as +-b. + +
nounset + +
+Same as +-u. + +
onecmd + +
+Same as +-t. + +
physical + +
+Same as +-P. + +
pipefail + +
+If set, the return value of a pipeline is the value of the last +(rightmost) command to exit with a non-zero status, or zero if all +commands in the pipeline exit successfully. +This option is disabled by default. +
posix + +
+Change the behavior of +bash + +where the default operation differs +from the POSIX standard to match the standard (posix mode). +See +SEE ALSO + + +below for a reference to a document that details how posix mode affects +bash's behavior. +
privileged + +
+Same as +-p. + +
verbose + +
+Same as +-v. + +
vi + +
+Use a vi-style command line editing interface. +This also affects the editing interface used for read -e. +
xtrace + +
+Same as +-x. + +

+

+

+ +If +-o + +is supplied with no option-name, the values of the current options are +printed. +If ++o + +is supplied with no option-name, a series of +set + +commands to recreate the current option settings is displayed on +the standard output. +

+ +
-p + +
+Turn on +privileged + +mode. In this mode, the +$ENV + + +and +$BASH_ENV + + +files are not processed, shell functions are not inherited from the +environment, and the +SHELLOPTS, + + +BASHOPTS, + + +CDPATH, + + +and +GLOBIGNORE + + +variables, if they appear in the environment, are ignored. +If the shell is started with the effective user (group) id not equal to the +real user (group) id, and the -p option is not supplied, these actions +are taken and the effective user id is set to the real user id. +If the -p option is supplied at startup, the effective user id is +not reset. +Turning this option off causes the effective user +and group ids to be set to the real user and group ids. +
-t + +
+Exit after reading and executing one command. +
-u + +
+Treat unset variables and parameters other than the special +parameters "@" and "*" as an error when performing +parameter expansion. If expansion is attempted on an +unset variable or parameter, the shell prints an error message, and, +if not interactive, exits with a non-zero status. +
-v + +
+Print shell input lines as they are read. +
-x + +
+After expanding each simple command, +for command, case command, select command, or +arithmetic for command, display the expanded value of +PS4, + + +followed by the command and its expanded arguments +or associated word list. +
-B + +
+The shell performs brace expansion (see +Brace Expansion + +above). This is on by default. +
-C + +
+If set, +bash + +does not overwrite an existing file with the +>, + +>&, + +and +<> + +redirection operators. This may be overridden when +creating output files by using the redirection operator +>| + +instead of +>. + +
-E + +
+If set, any trap on ERR is inherited by shell functions, command +substitutions, and commands executed in a subshell environment. +The ERR trap is normally not inherited in such cases. +
-H + +
+Enable +! + +style history substitution. This option is on by +default when the shell is interactive. +
-P + +
+If set, the shell does not resolve symbolic links when executing +commands such as +cd + +that change the current working directory. It uses the +physical directory structure instead. By default, +bash + +follows the logical chain of directories when performing commands +which change the current directory. +
-T + +
+If set, any traps on DEBUG and RETURN are inherited by shell +functions, command substitutions, and commands executed in a +subshell environment. +The DEBUG and RETURN traps are normally not inherited +in such cases. +
-- + +
+If no arguments follow this option, then the positional parameters are +unset. Otherwise, the positional parameters are set to the +args, even if some of them begin with a +-. + +
- + +
+Signal the end of options, cause all remaining args to be +assigned to the positional parameters. The +-x + +and +-v + +options are turned off. +If there are no args, +the positional parameters remain unchanged. + +
+

+ +The options are off by default unless otherwise noted. +Using + rather than - causes these options to be turned off. +The options can also be specified as arguments to an invocation of +the shell. +The current set of options may be found in +$-. + +The return status is always true unless an invalid option is encountered. +

+ +
shift [n]
+The positional parameters from n+1 ... are renamed to +$1 + +.... + +Parameters represented by the numbers $# +down to $#-n+1 are unset. +n + +must be a non-negative number less than or equal to $#. +If +n + +is 0, no parameters are changed. +If +n + +is not given, it is assumed to be 1. +If +n + +is greater than $#, the positional parameters are not changed. +The return status is greater than zero if +n + +is greater than +$# + +or less than zero; otherwise 0. +
shopt [-pqsu] [-o] [optname ...]
+Toggle the values of settings controlling optional shell behavior. +The settings can be either those listed below, or, if the +-o + +option is used, those available with the +-o + +option to the set builtin command. +With no options, or with the +-p + +option, a list of all settable options is displayed, with +an indication of whether or not each is set; +if optnames are supplied, the output is restricted to those options. +The -p option causes output to be displayed in a form that +may be reused as input. +Other options have the following meanings: +
+ +
+
-s + +
+Enable (set) each optname. +
-u + +
+Disable (unset) each optname. +
-q + +
+Suppresses normal output (quiet mode); the return status indicates +whether the optname is set or unset. +If multiple optname arguments are given with +-q, + +the return status is zero if all optnames are enabled; non-zero +otherwise. +
-o + +
+Restricts the values of optname to be those defined for the +-o + +option to the +set + +builtin. + +
+

+ +If either +-s + +or +-u + +is used with no optname arguments, +shopt + +shows only those options which are set or unset, respectively. +Unless otherwise noted, the shopt options are disabled (unset) +by default. +

+ +The return status when listing options is zero if all optnames +are enabled, non-zero otherwise. When setting or unsetting options, +the return status is zero unless an optname is not a valid shell +option. +

+ +The list of shopt options is: +

+ + + +

+
assoc_expand_once + +
+If set, the shell suppresses multiple evaluation of associative array +subscripts during arithmetic expression evaluation, while executing +builtins that can perform variable assignments, +and while executing builtins that perform array dereferencing. +
autocd + +
+If set, a command name that is the name of a directory is executed as if +it were the argument to the cd command. +This option is only used by interactive shells. +
cdable_vars + +
+If set, an argument to the +cd + +builtin command that +is not a directory is assumed to be the name of a variable whose +value is the directory to change to. +
cdspell + +
+If set, minor errors in the spelling of a directory component in a +cd + +command will be corrected. +The errors checked for are transposed characters, +a missing character, and one character too many. +If a correction is found, the corrected filename is printed, +and the command proceeds. +This option is only used by interactive shells. +
checkhash + +
+If set, bash checks that a command found in the hash +table exists before trying to execute it. If a hashed command no +longer exists, a normal path search is performed. +
checkjobs + +
+If set, bash lists the status of any stopped and running jobs before +exiting an interactive shell. If any jobs are running, this causes +the exit to be deferred until a second exit is attempted without an +intervening command (see +JOB CONTROL + + +above). The shell always +postpones exiting if any jobs are stopped. +
checkwinsize + +
+If set, bash checks the window size after each external (non-builtin) +command and, if necessary, updates the values of +LINES + + +and +COLUMNS. + + +This option is enabled by default. +
cmdhist + +
+If set, +bash + +attempts to save all lines of a multiple-line +command in the same history entry. This allows +easy re-editing of multi-line commands. +This option is enabled by default, but only has an effect if command +history is enabled, as described above under +HISTORY. + + + +
compat31 + +
+
compat32 + +
+
compat40 + +
+
compat41 + +
+
compat42 + +
+
compat43 + +
+
compat44 + +
+ +These control aspects of the shell's compatibility mode +(see +SHELL COMPATIBILITY MODE + + +below). +
complete_fullquote + +
+If set, +bash + +quotes all shell metacharacters in filenames and directory names when +performing completion. +If not set, +bash + +removes metacharacters such as the dollar sign from the set of +characters that will be quoted in completed filenames +when these metacharacters appear in shell variable references in words to be +completed. +This means that dollar signs in variable names that expand to directories +will not be quoted; +however, any dollar signs appearing in filenames will not be quoted, either. +This is active only when bash is using backslashes to quote completed +filenames. +This variable is set by default, which is the default bash behavior in +versions through 4.2. +
direxpand + +
+If set, +bash + +replaces directory names with the results of word expansion when performing +filename completion. This changes the contents of the readline editing +buffer. +If not set, +bash + +attempts to preserve what the user typed. +
dirspell + +
+If set, +bash + +attempts spelling correction on directory names during word completion +if the directory name initially supplied does not exist. +
dotglob + +
+If set, +bash + +includes filenames beginning with a `.' in the results of pathname +expansion. +The filenames +``.'' + +and +``..'' + +must always be matched explicitly, even if +dotglob + +is set. +
execfail + +
+If set, a non-interactive shell will not exit if +it cannot execute the file specified as an argument to the +exec + +builtin command. An interactive shell does not exit if +exec + +fails. +
expand_aliases + +
+If set, aliases are expanded as described above under +ALIASES. + + +This option is enabled by default for interactive shells. +
extdebug + +
+If set at shell invocation, +or in a shell startup file, +arrange to execute the debugger profile +before the shell starts, identical to the --debugger option. +If set after invocation, behavior intended for use by debuggers is enabled: +
+
+
1. + +
+The -F option to the declare builtin displays the source +file name and line number corresponding to each function name supplied +as an argument. +
2. + +
+If the command run by the DEBUG trap returns a non-zero value, the +next command is skipped and not executed. +
3. + +
+If the command run by the DEBUG trap returns a value of 2, and the +shell is executing in a subroutine (a shell function or a shell script +executed by the . or source builtins), the shell simulates +a call to return. +
4. + +
+BASH_ARGC + + +and +BASH_ARGV + + +are updated as described in their descriptions above. +
5. + +
+Function tracing is enabled: command substitution, shell functions, and +subshells invoked with ( command ) inherit the +DEBUG and RETURN traps. +
6. + +
+Error tracing is enabled: command substitution, shell functions, and +subshells invoked with ( command ) inherit the +ERR trap. +
+ +
extglob + +
+If set, the extended pattern matching features described above under +Pathname Expansion are enabled. +
extquote + +
+If set, $aqstringaq and $"string" quoting is +performed within ${parameter} expansions +enclosed in double quotes. This option is enabled by default. +
failglob + +
+If set, patterns which fail to match filenames during pathname expansion +result in an expansion error. +
force_fignore + +
+If set, the suffixes specified by the +FIGNORE + + +shell variable +cause words to be ignored when performing word completion even if +the ignored words are the only possible completions. +See +SHELL VARIABLES +above for a description of +FIGNORE. + + +This option is enabled by default. +
globasciiranges + +
+If set, range expressions used in pattern matching bracket expressions (see +Pattern Matching + + +above) behave as if in the traditional C locale when performing +comparisons. That is, the current locale's collating sequence +is not taken into account, so +b + +will not collate between +A + +and +B, + +and upper-case and lower-case ASCII characters will collate together. +
globstar + +
+If set, the pattern ** used in a pathname expansion context will +match all files and zero or more directories and subdirectories. +If the pattern is followed by a /, only directories and +subdirectories match. +
gnu_errfmt + +
+If set, shell error messages are written in the standard GNU error +message format. +
histappend + +
+If set, the history list is appended to the file named by the value +of the +HISTFILE + + +variable when the shell exits, rather than overwriting the file. +
histreedit + +
+If set, and +readline + +is being used, a user is given the opportunity to re-edit a +failed history substitution. +
histverify + +
+If set, and +readline + +is being used, the results of history substitution are not immediately +passed to the shell parser. Instead, the resulting line is loaded into +the readline editing buffer, allowing further modification. +
hostcomplete + +
+If set, and +readline + +is being used, bash will attempt to perform hostname completion when a +word containing a @ is being completed (see +Completing + +under +READLINE + + +above). +This is enabled by default. +
huponexit + +
+If set, bash will send +SIGHUP + + +to all jobs when an interactive login shell exits. +
inherit_errexit + +
+If set, command substitution inherits the value of the errexit option, +instead of unsetting it in the subshell environment. +This option is enabled when posix mode is enabled. +
interactive_comments + +
+If set, allow a word beginning with +# + +to cause that word and all remaining characters on that +line to be ignored in an interactive shell (see +COMMENTS + + +above). This option is enabled by default. +
lastpipe + +
+If set, and job control is not active, the shell runs the last command of +a pipeline not executed in the background in the current shell environment. +
lithist + +
+If set, and the +cmdhist + +option is enabled, multi-line commands are saved to the history with +embedded newlines rather than using semicolon separators where possible. +
localvar_inherit + +
+If set, local variables inherit the value and attributes of a variable of +the same name that exists at a previous scope before any new value is +assigned. The nameref attribute is not inherited. +
localvar_unset + +
+If set, calling unset on local variables in previous function scopes +marks them so subsequent lookups find them unset until that function +returns. This is identical to the behavior of unsetting local variables +at the current function scope. +
login_shell + +
+The shell sets this option if it is started as a login shell (see +INVOCATION + + +above). +The value may not be changed. +
mailwarn + +
+If set, and a file that bash is checking for mail has been +accessed since the last time it was checked, the message ``The mail in +mailfile has been read'' is displayed. +
no_empty_cmd_completion + +
+If set, and +readline + +is being used, +bash + +will not attempt to search the +PATH + + +for possible completions when +completion is attempted on an empty line. +
nocaseglob + +
+If set, +bash + +matches filenames in a case-insensitive fashion when performing pathname +expansion (see +Pathname Expansion + +above). +
nocasematch + +
+If set, +bash + +matches patterns in a case-insensitive fashion when performing matching +while executing case or [[ conditional commands, +when performing pattern substitution word expansions, +or when filtering possible completions as part of programmable completion. +
nullglob + +
+If set, +bash + +allows patterns which match no +files (see +Pathname Expansion + +above) +to expand to a null string, rather than themselves. +
progcomp + +
+If set, the programmable completion facilities (see +Programmable Completion above) are enabled. +This option is enabled by default. +
progcomp_alias + +
+If set, and programmable completion is enabled, bash treats a command +name that doesn't have any completions as a possible alias and attempts +alias expansion. If it has an alias, bash attempts programmable +completion using the command word resulting from the expanded alias. +
promptvars + +
+If set, prompt strings undergo +parameter expansion, command substitution, arithmetic +expansion, and quote removal after being expanded as described in +PROMPTING + + +above. This option is enabled by default. +
restricted_shell + +
+The shell sets this option if it is started in restricted mode (see +RESTRICTED SHELL + + +below). +The value may not be changed. +This is not reset when the startup files are executed, allowing +the startup files to discover whether or not a shell is restricted. +
shift_verbose + +
+If set, the +shift + +builtin prints an error message when the shift count exceeds the +number of positional parameters. +
sourcepath + +
+If set, the +source (.) builtin uses the value of +PATH + + +to find the directory containing the file supplied as an argument. +This option is enabled by default. +
xpg_echo + +
+If set, the echo builtin expands backslash-escape sequences +by default. +
+ + +
suspend [-f]
+Suspend the execution of this shell until it receives a +SIGCONT + + +signal. A login shell cannot be suspended; the +-f + +option can be used to override this and force the suspension. +The return status is 0 unless the shell is a login shell and +-f + +is not supplied, or if job control is not enabled. +
test expr
+ +
[ expr ]
+Return a status of 0 (true) or 1 (false) depending on +the evaluation of the conditional expression +expr. + +Each operator and operand must be a separate argument. +Expressions are composed of the primaries described above under + +CONDITIONAL EXPRESSIONS. + + +test does not accept any options, nor does it accept and ignore +an argument of -- as signifying the end of options. +

+ + +Expressions may be combined using the following operators, listed +in decreasing order of precedence. +The evaluation depends on the number of arguments; see below. +Operator precedence is used when there are five or more arguments. +

+ +
+
! expr + +
+True if +expr + +is false. +
( expr ) + +
+Returns the value of expr. +This may be used to override the normal precedence of operators. +
expr1 -a expr2
+True if both +expr1 + +and +expr2 + +are true. +
expr1 -o expr2
+True if either +expr1 + +or +expr2 + +is true. + +
+

+ +test and [ evaluate conditional +expressions using a set of rules based on the number of arguments. +

+ + + +

+
0 arguments
+The expression is false. +
1 argument
+The expression is true if and only if the argument is not null. +
2 arguments
+If the first argument is !, the expression is true if and +only if the second argument is null. +If the first argument is one of the unary conditional operators listed above +under +CONDITIONAL EXPRESSIONS, + + +the expression is true if the unary test is true. +If the first argument is not a valid unary conditional operator, the expression +is false. +
3 arguments
+The following conditions are applied in the order listed. +If the second argument is one of the binary conditional operators listed above +under +CONDITIONAL EXPRESSIONS, + + +the result of the expression is the result of the binary test using +the first and third arguments as operands. +The -a and -o operators are considered binary operators +when there are three arguments. +If the first argument is !, the value is the negation of +the two-argument test using the second and third arguments. +If the first argument is exactly ( and the third argument is +exactly ), the result is the one-argument test of the second +argument. +Otherwise, the expression is false. +
4 arguments
+If the first argument is !, the result is the negation of +the three-argument expression composed of the remaining arguments. +Otherwise, the expression is parsed and evaluated according to +precedence using the rules listed above. +
5 or more arguments
+The expression is parsed and evaluated according to precedence +using the rules listed above. +

+ + +

+

+ +When used with test or [, the < and > operators +sort lexicographically using ASCII ordering. +

+ + +
times + +
+Print the accumulated user and system times for the shell and +for processes run from the shell. The return status is 0. +
trap [-lp] [[arg] sigspec ...]
+The command +arg + +is to be read and executed when the shell receives +signal(s) +sigspec. + +If +arg + +is absent (and there is a single sigspec) or +-, + +each specified signal is +reset to its original disposition (the value it had +upon entrance to the shell). +If +arg + +is the null string the signal specified by each +sigspec + +is ignored by the shell and by the commands it invokes. +If +arg + +is not present and +-p + +has been supplied, then the trap commands associated with each +sigspec + +are displayed. +If no arguments are supplied or if only +-p + +is given, +trap + +prints the list of commands associated with each signal. +The +-l + +option causes the shell to print a list of signal names and +their corresponding numbers. +Each +sigspec + +is either +a signal name defined in <signal.h>, or a signal number. +Signal names are case insensitive and the +SIG + + +prefix is optional. +

+ + +If a +sigspec + +is +EXIT + + +(0) the command +arg + +is executed on exit from the shell. +If a +sigspec + +is +DEBUG, + + +the command +arg + +is executed before every simple command, for command, +case command, select command, every arithmetic for +command, and before the first command executes in a shell function (see +SHELL GRAMMAR + + +above). +Refer to the description of the extdebug option to the +shopt builtin for details of its effect on the DEBUG trap. +If a +sigspec + +is +RETURN, + + +the command +arg + +is executed each time a shell function or a script executed with +the . or source builtins finishes executing. +

+ + +If a +sigspec + +is +ERR, + + +the command +arg + +is executed whenever +a pipeline (which may consist of a single simple +command), a list, or a compound command returns a +non-zero exit status, +subject to the following conditions. +The +ERR + + +trap is not executed if the failed +command is part of the command list immediately following a +while + +or +until + +keyword, +part of the test in an +if + +statement, part of a command executed in a +&& + +or +|| + +list except the command following the final && or ||, +any command in a pipeline but the last, +or if the command's return value is +being inverted using +!. + +These are the same conditions obeyed by the errexit (-e) option. +

+ + +Signals ignored upon entry to the shell cannot be trapped or reset. +Trapped signals that are not being ignored are reset to their original +values in a subshell or subshell environment when one is created. +The return status is false if any +sigspec + +is invalid; otherwise +trap + +returns true. +

type [-aftpP] name [name ...]
+With no options, +indicate how each +name + +would be interpreted if used as a command name. +If the +-t + +option is used, +type + +prints a string which is one of +alias, + +keyword, + +function, + +builtin, + +or +file + +if +name + +is an alias, shell reserved word, function, builtin, or disk file, +respectively. +If the +name + +is not found, then nothing is printed, and an exit status of false +is returned. +If the +-p + +option is used, +type + +either returns the name of the disk file +that would be executed if +name + +were specified as a command name, +or nothing if +type -t name + +would not return +file. + +The +-P + +option forces a +PATH + + +search for each name, even if +type -t name + +would not return +file. + +If a command is hashed, +-p + +and +-P + +print the hashed value, which is not necessarily the file that appears +first in +PATH. + + +If the +-a + +option is used, +type + +prints all of the places that contain +an executable named +name. + +This includes aliases and functions, +if and only if the +-p + +option is not also used. +The table of hashed commands is not consulted +when using +-a. + +The +-f + +option suppresses shell function lookup, as with the command builtin. +type + +returns true if all of the arguments are found, false if +any are not found. +
ulimit [-HS] -a
+ +
ulimit [-HS] [-bcdefiklmnpqrstuvxPRT [limit]]
+ +Provides control over the resources available to the shell and to +processes started by it, on systems that allow such control. +The -H and -S options specify that the hard or soft limit is +set for the given resource. +A hard limit cannot be increased by a non-root user once it is set; +a soft limit may be increased up to the value of the hard limit. +If neither -H nor -S is specified, both the soft and hard +limits are set. +The value of +limit + +can be a number in the unit specified for the resource +or one of the special values +hard, + +soft, + +or +unlimited, + +which stand for the current hard limit, the current soft limit, and +no limit, respectively. +If +limit + +is omitted, the current value of the soft limit of the resource is +printed, unless the -H option is given. When more than one +resource is specified, the limit name and unit, if appropriate, +are printed before the value. +Other options are interpreted as follows: +
+ +
+
-a + +
+All current limits are reported; no limits are set +
-b + +
+The maximum socket buffer size +
-c + +
+The maximum size of core files created +
-d + +
+The maximum size of a process's data segment +
-e + +
+The maximum scheduling priority ("nice") +
-f + +
+The maximum size of files written by the shell and its children +
-i + +
+The maximum number of pending signals +
-k + +
+The maximum number of kqueues that may be allocated +
-l + +
+The maximum size that may be locked into memory +
-m + +
+The maximum resident set size (many systems do not honor this limit) +
-n + +
+The maximum number of open file descriptors (most systems do not +allow this value to be set) +
-p + +
+The pipe size in 512-byte blocks (this may not be set) +
-q + +
+The maximum number of bytes in POSIX message queues +
-r + +
+The maximum real-time scheduling priority +
-s + +
+The maximum stack size +
-t + +
+The maximum amount of cpu time in seconds +
-u + +
+The maximum number of processes available to a single user +
-v + +
+The maximum amount of virtual memory available to the shell and, on +some systems, to its children +
-x + +
+The maximum number of file locks +
-P + +
+The maximum number of pseudoterminals +
-R + +
+The maximum time a real-time process can run before blocking, in microseconds +
-T + +
+The maximum number of threads + +
+

+ +If +limit + +is given, and the +-a + +option is not used, +limit is the new value of the specified resource. +If no option is given, then +-f + +is assumed. Values are in 1024-byte increments, except for +-t, + +which is in seconds; +-R, + +which is in microseconds; +-p, + +which is in units of 512-byte blocks; +-P, + +-T, + +-b, + +-k, + +-n, + +and +-u, + +which are unscaled values; +and, when in posix mode, +-c + +and +-f, + +which are in 512-byte increments. +The return status is 0 unless an invalid option or argument is supplied, +or an error occurs while setting a new limit. +

+ +
umask [-p] [-S] [mode]
+The user file-creation mask is set to +mode. + +If +mode + +begins with a digit, it +is interpreted as an octal number; otherwise +it is interpreted as a symbolic mode mask similar +to that accepted by +chmod(1). + +If +mode + +is omitted, the current value of the mask is printed. +The +-S + +option causes the mask to be printed in symbolic form; the +default output is an octal number. +If the +-p + +option is supplied, and +mode + +is omitted, the output is in a form that may be reused as input. +The return status is 0 if the mode was successfully changed or if +no mode argument was supplied, and false otherwise. +
unalias [-a] [name ...]
+Remove each name from the list of defined aliases. If +-a + +is supplied, all alias definitions are removed. The return +value is true unless a supplied +name + +is not a defined alias. +
unset [-fv] [-n] [name ...]
+For each +name, + +remove the corresponding variable or function. +If the +-v + +option is given, each +name + +refers to a shell variable, and that variable is removed. +Read-only variables may not be unset. +If +-f + +is specified, each +name + +refers to a shell function, and the function definition +is removed. +If the +-n + +option is supplied, and name is a variable with the nameref +attribute, name will be unset rather than the variable it +references. +-n has no effect if the -f option is supplied. +If no options are supplied, each name refers to a variable; if +there is no variable by that name, a function with that name, if any, is +unset. +Each unset variable or function is removed from the environment +passed to subsequent commands. +If any of +BASH_ALIASES, + + +BASH_ARGV0, + + +BASH_CMDS, + + +BASH_COMMAND, + + +BASH_SUBSHELL, + + +BASHPID, + + +COMP_WORDBREAKS, + + +DIRSTACK, + + +EPOCHREALTIME, + + +EPOCHSECONDS, + + +FUNCNAME, + + +GROUPS, + + +HISTCMD, + + +LINENO, + + +RANDOM, + + +SECONDS, + + +or +SRANDOM + + +are unset, they lose their special properties, even if they are +subsequently reset. The exit status is true unless a +name + +is readonly. +
wait [-fn] [-p varname] [id ...]
+Wait for each specified child process and return its termination status. +Each +id + +may be a process +ID or a job specification; if a job spec is given, all processes +in that job's pipeline are waited for. If +id + +is not given, +wait waits for all running background jobs and +the last-executed process substitution, if its process id is the same as +$!, +and the return status is zero. +If the -n option is supplied, +wait waits for a single job +from the list of ids or, if no ids are supplied, any job, +to complete and returns its exit status. +If none of the supplied arguments is a child of the shell, or if no arguments +are supplied and the shell has no unwaited-for children, the exit status +is 127. +If the -p option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable +varname named by the option argument. +The variable will be unset initially, before any assignment. +This is useful only when the -n option is supplied. +Supplying the -f option, when job control is enabled, +forces wait to wait for id to terminate before returning +its status, instead of returning when it changes status. +If +id + +specifies a non-existent process or job, the return status is +127. Otherwise, the return status is the exit status of the last +process or job waited for. +
+  +

SHELL COMPATIBILITY MODE

+ +Bash-4.0 introduced the concept of a `shell compatibility level', specified +as a set of options to the shopt builtin +compat31, + +compat32, + +compat40, + +compat41, + +and so on). +There is only one current +compatibility level -- each option is mutually exclusive. +The compatibility level is intended to allow users to select behavior +from previous versions that is incompatible with newer versions +while they migrate scripts to use current features and +behavior. It's intended to be a temporary solution. +

+ +This section does not mention behavior that is standard for a particular +version (e.g., setting compat32 means that quoting the rhs of the regexp +matching operator quotes special regexp characters in the word, which is +default behavior in bash-3.2 and above). +

+ +If a user enables, say, compat32, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed +in that version of bash, +but that behavior may have been present in earlier versions. +For instance, the change to use locale-based comparisons with the [[ +command came in bash-4.1, and earlier versions used ASCII-based comparisons, +so enabling compat32 will enable ASCII-based comparisons as well. +That granularity may not be sufficient for +all uses, and as a result users should employ compatibility levels carefully. +Read the documentation for a particular feature to find out the +current behavior. +

+ +Bash-4.3 introduced a new shell variable: +BASH_COMPAT. + + +The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the compatNN option, like 42) determines the +compatibility level. +

+ +Starting with bash-4.4, Bash has begun deprecating older compatibility +levels. +Eventually, the options will be removed in favor of +BASH_COMPAT. + + +

+ +Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use +BASH_COMPAT + + +on bash-5.0 and later versions. +

+ +The following table describes the behavior changes controlled by each +compatibility level setting. +The compatNN tag is used as shorthand for setting the +compatibility level +to NN using one of the following mechanisms. +For versions prior to bash-5.0, the compatibility level may be set using +the corresponding compatNN shopt option. +For bash-4.3 and later versions, the +BASH_COMPAT + + +variable is preferred, +and it is required for bash-5.1 and later versions. +

+
compat31
+ +
+
+
*
+quoting the rhs of the [[ command's regexp matching operator (=~) +has no special effect +
+ + +
compat32
+ +
+
+
*
+interrupting a command list such as "a ; b ; c" causes the execution +of the next command in the list (in bash-4.0 and later versions, +the shell acts as if it received the interrupt, so +interrupting one command in a list aborts the execution of the +entire list) +
+ + +
compat40
+ +
+
+
*
+the < and > operators to the [[ command do not +consider the current locale when comparing strings; they use ASCII +ordering. +Bash versions prior to bash-4.1 use ASCII collation and +strcmp(3); + +bash-4.1 and later use the current locale's collation sequence and +strcoll(3). + +
+ + +
compat41
+ +
+
+
*
+in posix mode, time may be followed by options and still be +recognized as a reserved word (this is POSIX interpretation 267) +
*
+in posix mode, the parser requires that an even number of single +quotes occur in the word portion of a double-quoted +parameter expansion and treats them specially, so that characters within +the single quotes are considered quoted +(this is POSIX interpretation 221) +
+ + +
compat42
+ +
+
+
*
+the replacement string in double-quoted pattern substitution does not +undergo quote removal, as it does in versions after bash-4.2 +
*
+in posix mode, single quotes are considered special when expanding +the word portion of a double-quoted parameter expansion +and can be used to quote a closing brace or other special character +(this is part of POSIX interpretation 221); +in later versions, single quotes +are not special within double-quoted word expansions +
+ + +
compat43
+ +
+
+
*
+the shell does not print a warning message if an attempt is made to +use a quoted compound assignment as an argument to declare +(declare -a foo='(1 2)'). Later versions warn that this usage is +deprecated +
*
+word expansion errors are considered non-fatal errors that cause the +current command to fail, even in posix mode +(the default behavior is to make them fatal errors that cause the shell +to exit) +
*
+when executing a shell function, the loop state (while/until/etc.) +is not reset, so break or continue in that function will break +or continue loops in the calling context. Bash-4.4 and later reset +the loop state to prevent this +
+ + +
compat44
+ +
+
+
*
+the shell sets up the values used by +BASH_ARGV + + +and +BASH_ARGC + + +so they can expand to the shell's positional parameters even if extended +debugging mode is not enabled +
*
+a subshell inherits loops from its parent context, so break +or continue will cause the subshell to exit. +Bash-5.0 and later reset the loop state to prevent the exit +
*
+variable assignments preceding builtins like export and readonly +that set attributes continue to affect variables with the same +name in the calling environment even if the shell is not in posix +mode +
+ + +
compat50
+ +
+
+
*
+Bash-5.1 changed the way +$RANDOM + + +is generated to introduce slightly +more randomness. If the shell compatibility level is set to 50 or +lower, it reverts to the method from bash-5.0 and previous versions, +so seeding the random number generator by assigning a value to +RANDOM + + +will produce the same sequence as in bash-5.0 +
*
+If the command hash table is empty, bash versions prior to bash-5.1 +printed an informational message to that effect, even when producing +output that can be reused as input. Bash-5.1 suppresses that message +when the -l option is supplied. +
+ + + + +
+  +

RESTRICTED SHELL

+ + + +

+ +If +bash + +is started with the name +rbash, + +or the +-r + +option is supplied at invocation, +the shell becomes restricted. +A restricted shell is used to +set up an environment more controlled than the standard shell. +It behaves identically to +bash + +with the exception that the following are disallowed or not performed: +

+
*
+changing directories with cd +
*
+setting or unsetting the values of +SHELL, + + +PATH, + + +HISTFILE, + + +ENV, + + +or +BASH_ENV + + +
*
+specifying command names containing +/ + +
*
+specifying a filename containing a +/ + +as an argument to the +. + +builtin command +
*
+specifying a filename containing a slash as an argument to the +history + +builtin command +
*
+specifying a filename containing a slash as an argument to the +-p + +option to the +hash + +builtin command +
*
+importing function definitions from the shell environment at startup +
*
+parsing the value of +SHELLOPTS + + +from the shell environment at startup +
*
+redirecting output using the >, >|, <>, >&, &>, and >> redirection operators +
*
+using the +exec + +builtin command to replace the shell with another command +
*
+adding or deleting builtin commands with the +-f + +and +-d + +options to the +enable + +builtin command +
*
+using the enable builtin command to enable disabled shell builtins +
*
+specifying the +-p + +option to the +command + +builtin command +
*
+turning off restricted mode with +set +r or set +o restricted. +
+

+ +These restrictions are enforced after any startup files are read. +

+ + + When a command that is found to be a shell script is executed +(see +COMMAND EXECUTION + + + +above), + +rbash + +turns off any restrictions in the shell spawned to execute the +script. + + +  +

SEE ALSO

+ + +
+
Bash Reference Manual, Brian Fox and Chet Ramey
+
The Gnu Readline Library, Brian Fox and Chet Ramey
+
The Gnu History Library, Brian Fox and Chet Ramey
+
Portable Operating System Interface (POSIX) Part 2: Shell and Utilities, IEEE --
+http://pubs.opengroup.org/onlinepubs/9699919799/ +
http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
+
sh(1), ksh(1), csh(1)
+
emacs(1), vi(1)
+
readline(3)
+ +
+  +

FILES

+ + +
+
+/bin/bash + +
+The bash executable +
+/etc/profile + +
+The systemwide initialization file, executed for login shells +
+~/.bash_profile + +
+The personal initialization file, executed for login shells +
+~/.bashrc + +
+The individual per-interactive-shell startup file +
+~/.bash_logout + +
+The individual login shell cleanup file, executed when a login shell exits +
+~/.inputrc + +
+Individual readline initialization file + +
+  +

AUTHORS

+ +Brian Fox, Free Software Foundation +
+ +bfox@gnu.org +

+ +Chet Ramey, Case Western Reserve University +
+ +chet.ramey@case.edu +  +

BUG REPORTS

+ +If you find a bug in +bash, + +you should report it. But first, you should +make sure that it really is a bug, and that it appears in the latest +version of +bash. + +The latest version is always available from +ftp://ftp.gnu.org/pub/gnu/bash/. +

+ +Once you have determined that a bug actually exists, use the +bashbug + +command to submit a bug report. +If you have a fix, you are encouraged to mail that as well! +Suggestions and `philosophical' bug reports may be mailed +to bug-bash@gnu.org or posted to the Usenet +newsgroup +gnu.bash.bug. + +

+ +ALL bug reports should include: +

+ + +

+
The version number of bash
+
The hardware and operating system
+
The compiler used to compile
+
A description of the bug behaviour
+
A short script or `recipe' which exercises the bug
+ +
+

+ +bashbug + +inserts the first three items automatically into the template +it provides for filing a bug report. +

+ +Comments and bug reports concerning +this manual page should be directed to +chet.ramey@case.edu. + +  +

BUGS

+ +It's too big and too slow. +

+ +There are some subtle differences between +bash + +and traditional versions of +sh, + +mostly because of the +POSIX + + +specification. +

+ +Aliases are confusing in some uses. +

+ +Shell builtin commands and functions are not stoppable/restartable. +

+ +Compound commands and command sequences of the form `a ; b ; c' +are not handled gracefully when process suspension is attempted. +When a process is stopped, the shell immediately executes the next +command in the sequence. +It suffices to place the sequence of commands between +parentheses to force it into a subshell, which may be stopped as +a unit. +

+ +Array variables may not (yet) be exported. +

+ +There may be only one active coprocess at a time. + + + +


+ + + +
GNU Bash 5.12020 October 29BASH(1) +
+
+ 

Index

+
+
NAME
+
SYNOPSIS
+
COPYRIGHT
+
DESCRIPTION
+
OPTIONS
+
ARGUMENTS
+
INVOCATION
+
DEFINITIONS
+
RESERVED WORDS
+
SHELL GRAMMAR
+
+
Simple Commands
+
Pipelines
+
Lists
+
Compound Commands
+
Coprocesses
+
Shell Function Definitions
+
+
COMMENTS
+
QUOTING
+
PARAMETERS
+
+
Positional Parameters
+
Special Parameters
+
Shell Variables
+
Arrays
+
+
EXPANSION
+
+
Brace Expansion
+
Tilde Expansion
+
Parameter Expansion
+
Command Substitution
+
Arithmetic Expansion
+
Process Substitution
+
Word Splitting
+
Pathname Expansion
+
Quote Removal
+
+
REDIRECTION
+
+
Redirecting Input
+
Redirecting Output
+
Appending Redirected Output
+
Redirecting Standard Output and Standard Error
+
Appending Standard Output and Standard Error
+
Here Documents
+
Here Strings
+
Duplicating File Descriptors
+
Moving File Descriptors
+
Opening File Descriptors for Reading and Writing
+
+
ALIASES
+
FUNCTIONS
+
ARITHMETIC EVALUATION
+
CONDITIONAL EXPRESSIONS
+
SIMPLE COMMAND EXPANSION
+
COMMAND EXECUTION
+
COMMAND EXECUTION ENVIRONMENT
+
ENVIRONMENT
+
EXIT STATUS
+
SIGNALS
+
JOB CONTROL
+
PROMPTING
+
READLINE
+
+
Readline Notation
+
Readline Initialization
+
Readline Key Bindings
+
Readline Variables
+
Readline Conditional Constructs
+
Searching
+
Readline Command Names
+
Commands for Moving
+
Commands for Manipulating the History
+
Commands for Changing Text
+
Killing and Yanking
+
Numeric Arguments
+
Completing
+
Keyboard Macros
+
Miscellaneous
+
Programmable Completion
+
+
HISTORY
+
HISTORY EXPANSION
+
+
Event Designators
+
Word Designators
+
Modifiers
+
+
SHELL BUILTIN COMMANDS
+
SHELL COMPATIBILITY MODE
+
RESTRICTED SHELL
+
SEE ALSO
+
FILES
+
AUTHORS
+
BUG REPORTS
+
BUGS
+
+
+This document was created by man2html from bash.1.
+Time: 18 November 2020 15:13:09 EST + + diff --git a/bash-5.1/doc/bash.info b/bash-5.1/doc/bash.info new file mode 100644 index 0000000000000000000000000000000000000000..2fd137a923e44fd3db85ff16acb44c6cf3ff8cbc --- /dev/null +++ b/bash-5.1/doc/bash.info @@ -0,0 +1,12123 @@ +This is bash.info, produced by makeinfo version 6.7 from +bashref.texi. + +This text is a brief description of the features that are present in the +Bash shell (version 5.1, 29 October 2020). + + This is Edition 5.1, last updated 29 October 2020, of 'The GNU Bash +Reference Manual', for 'Bash', Version 5.1. + + Copyright (C) 1988-2020 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts, and + no Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". +INFO-DIR-SECTION Basics +START-INFO-DIR-ENTRY +* Bash: (bash). The GNU Bourne-Again SHell. +END-INFO-DIR-ENTRY + + +File: bash.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) + +Bash Features +************* + +This text is a brief description of the features that are present in the +Bash shell (version 5.1, 29 October 2020). The Bash home page is +. + + This is Edition 5.1, last updated 29 October 2020, of 'The GNU Bash +Reference Manual', for 'Bash', Version 5.1. + + Bash contains features that appear in other popular shells, and some +features that only appear in Bash. Some of the shells that Bash has +borrowed concepts from are the Bourne Shell ('sh'), the Korn Shell +('ksh'), and the C-shell ('csh' and its successor, 'tcsh'). The +following menu breaks the features up into categories, noting which +features were inspired by other shells and which are specific to Bash. + + This manual is meant as a brief introduction to features found in +Bash. The Bash manual page should be used as the definitive reference +on shell behavior. + +* Menu: + +* Introduction:: An introduction to the shell. +* Definitions:: Some definitions used in the rest of this + manual. +* Basic Shell Features:: The shell "building blocks". +* Shell Builtin Commands:: Commands that are a part of the shell. +* Shell Variables:: Variables used or set by Bash. +* Bash Features:: Features found only in Bash. +* Job Control:: What job control is and how Bash allows you + to use it. +* Command Line Editing:: Chapter describing the command line + editing features. +* Using History Interactively:: Command History Expansion +* Installing Bash:: How to build and install Bash on your system. +* Reporting Bugs:: How to report bugs in Bash. +* Major Differences From The Bourne Shell:: A terse list of the differences + between Bash and historical + versions of /bin/sh. +* GNU Free Documentation License:: Copying and sharing this documentation. +* Indexes:: Various indexes for this manual. + + +File: bash.info, Node: Introduction, Next: Definitions, Up: Top + +1 Introduction +************** + +* Menu: + +* What is Bash?:: A short description of Bash. +* What is a shell?:: A brief introduction to shells. + + +File: bash.info, Node: What is Bash?, Next: What is a shell?, Up: Introduction + +1.1 What is Bash? +================= + +Bash is the shell, or command language interpreter, for the GNU +operating system. The name is an acronym for the 'Bourne-Again SHell', +a pun on Stephen Bourne, the author of the direct ancestor of the +current Unix shell 'sh', which appeared in the Seventh Edition Bell Labs +Research version of Unix. + + Bash is largely compatible with 'sh' and incorporates useful features +from the Korn shell 'ksh' and the C shell 'csh'. It is intended to be a +conformant implementation of the IEEE POSIX Shell and Tools portion of +the IEEE POSIX specification (IEEE Standard 1003.1). It offers +functional improvements over 'sh' for both interactive and programming +use. + + While the GNU operating system provides other shells, including a +version of 'csh', Bash is the default shell. Like other GNU software, +Bash is quite portable. It currently runs on nearly every version of +Unix and a few other operating systems - independently-supported ports +exist for MS-DOS, OS/2, and Windows platforms. + + +File: bash.info, Node: What is a shell?, Prev: What is Bash?, Up: Introduction + +1.2 What is a shell? +==================== + +At its base, a shell is simply a macro processor that executes commands. +The term macro processor means functionality where text and symbols are +expanded to create larger expressions. + + A Unix shell is both a command interpreter and a programming +language. As a command interpreter, the shell provides the user +interface to the rich set of GNU utilities. The programming language +features allow these utilities to be combined. Files containing +commands can be created, and become commands themselves. These new +commands have the same status as system commands in directories such as +'/bin', allowing users or groups to establish custom environments to +automate their common tasks. + + Shells may be used interactively or non-interactively. In +interactive mode, they accept input typed from the keyboard. When +executing non-interactively, shells execute commands read from a file. + + A shell allows execution of GNU commands, both synchronously and +asynchronously. The shell waits for synchronous commands to complete +before accepting more input; asynchronous commands continue to execute +in parallel with the shell while it reads and executes additional +commands. The "redirection" constructs permit fine-grained control of +the input and output of those commands. Moreover, the shell allows +control over the contents of commands' environments. + + Shells also provide a small set of built-in commands ("builtins") +implementing functionality impossible or inconvenient to obtain via +separate utilities. For example, 'cd', 'break', 'continue', and 'exec' +cannot be implemented outside of the shell because they directly +manipulate the shell itself. The 'history', 'getopts', 'kill', or 'pwd' +builtins, among others, could be implemented in separate utilities, but +they are more convenient to use as builtin commands. All of the shell +builtins are described in subsequent sections. + + While executing commands is essential, most of the power (and +complexity) of shells is due to their embedded programming languages. +Like any high-level language, the shell provides variables, flow control +constructs, quoting, and functions. + + Shells offer features geared specifically for interactive use rather +than to augment the programming language. These interactive features +include job control, command line editing, command history and aliases. +Each of these features is described in this manual. + + +File: bash.info, Node: Definitions, Next: Basic Shell Features, Prev: Introduction, Up: Top + +2 Definitions +************* + +These definitions are used throughout the remainder of this manual. + +'POSIX' + A family of open system standards based on Unix. Bash is primarily + concerned with the Shell and Utilities portion of the POSIX 1003.1 + standard. + +'blank' + A space or tab character. + +'builtin' + A command that is implemented internally by the shell itself, + rather than by an executable program somewhere in the file system. + +'control operator' + A 'token' that performs a control function. It is a 'newline' or + one of the following: '||', '&&', '&', ';', ';;', ';&', ';;&', '|', + '|&', '(', or ')'. + +'exit status' + The value returned by a command to its caller. The value is + restricted to eight bits, so the maximum value is 255. + +'field' + A unit of text that is the result of one of the shell expansions. + After expansion, when executing a command, the resulting fields are + used as the command name and arguments. + +'filename' + A string of characters used to identify a file. + +'job' + A set of processes comprising a pipeline, and any processes + descended from it, that are all in the same process group. + +'job control' + A mechanism by which users can selectively stop (suspend) and + restart (resume) execution of processes. + +'metacharacter' + A character that, when unquoted, separates words. A metacharacter + is a 'space', 'tab', 'newline', or one of the following characters: + '|', '&', ';', '(', ')', '<', or '>'. + +'name' + A 'word' consisting solely of letters, numbers, and underscores, + and beginning with a letter or underscore. 'Name's are used as + shell variable and function names. Also referred to as an + 'identifier'. + +'operator' + A 'control operator' or a 'redirection operator'. *Note + Redirections::, for a list of redirection operators. Operators + contain at least one unquoted 'metacharacter'. + +'process group' + A collection of related processes each having the same process + group ID. + +'process group ID' + A unique identifier that represents a 'process group' during its + lifetime. + +'reserved word' + A 'word' that has a special meaning to the shell. Most reserved + words introduce shell flow control constructs, such as 'for' and + 'while'. + +'return status' + A synonym for 'exit status'. + +'signal' + A mechanism by which a process may be notified by the kernel of an + event occurring in the system. + +'special builtin' + A shell builtin command that has been classified as special by the + POSIX standard. + +'token' + A sequence of characters considered a single unit by the shell. It + is either a 'word' or an 'operator'. + +'word' + A sequence of characters treated as a unit by the shell. Words may + not include unquoted 'metacharacters'. + + +File: bash.info, Node: Basic Shell Features, Next: Shell Builtin Commands, Prev: Definitions, Up: Top + +3 Basic Shell Features +********************** + +Bash is an acronym for 'Bourne-Again SHell'. The Bourne shell is the +traditional Unix shell originally written by Stephen Bourne. All of the +Bourne shell builtin commands are available in Bash, The rules for +evaluation and quoting are taken from the POSIX specification for the +'standard' Unix shell. + + This chapter briefly summarizes the shell's 'building blocks': +commands, control structures, shell functions, shell parameters, shell +expansions, redirections, which are a way to direct input and output +from and to named files, and how the shell executes commands. + +* Menu: + +* Shell Syntax:: What your input means to the shell. +* Shell Commands:: The types of commands you can use. +* Shell Functions:: Grouping commands by name. +* Shell Parameters:: How the shell stores values. +* Shell Expansions:: How Bash expands parameters and the various + expansions available. +* Redirections:: A way to control where input and output go. +* Executing Commands:: What happens when you run a command. +* Shell Scripts:: Executing files of shell commands. + + +File: bash.info, Node: Shell Syntax, Next: Shell Commands, Up: Basic Shell Features + +3.1 Shell Syntax +================ + +* Menu: + +* Shell Operation:: The basic operation of the shell. +* Quoting:: How to remove the special meaning from characters. +* Comments:: How to specify comments. + +When the shell reads input, it proceeds through a sequence of +operations. If the input indicates the beginning of a comment, the +shell ignores the comment symbol ('#'), and the rest of that line. + + Otherwise, roughly speaking, the shell reads its input and divides +the input into words and operators, employing the quoting rules to +select which meanings to assign various words and characters. + + The shell then parses these tokens into commands and other +constructs, removes the special meaning of certain words or characters, +expands others, redirects input and output as needed, executes the +specified command, waits for the command's exit status, and makes that +exit status available for further inspection or processing. + + +File: bash.info, Node: Shell Operation, Next: Quoting, Up: Shell Syntax + +3.1.1 Shell Operation +--------------------- + +The following is a brief description of the shell's operation when it +reads and executes a command. Basically, the shell does the following: + + 1. Reads its input from a file (*note Shell Scripts::), from a string + supplied as an argument to the '-c' invocation option (*note + Invoking Bash::), or from the user's terminal. + + 2. Breaks the input into words and operators, obeying the quoting + rules described in *note Quoting::. These tokens are separated by + 'metacharacters'. Alias expansion is performed by this step (*note + Aliases::). + + 3. Parses the tokens into simple and compound commands (*note Shell + Commands::). + + 4. Performs the various shell expansions (*note Shell Expansions::), + breaking the expanded tokens into lists of filenames (*note + Filename Expansion::) and commands and arguments. + + 5. Performs any necessary redirections (*note Redirections::) and + removes the redirection operators and their operands from the + argument list. + + 6. Executes the command (*note Executing Commands::). + + 7. Optionally waits for the command to complete and collects its exit + status (*note Exit Status::). + + +File: bash.info, Node: Quoting, Next: Comments, Prev: Shell Operation, Up: Shell Syntax + +3.1.2 Quoting +------------- + +* Menu: + +* Escape Character:: How to remove the special meaning from a single + character. +* Single Quotes:: How to inhibit all interpretation of a sequence + of characters. +* Double Quotes:: How to suppress most of the interpretation of a + sequence of characters. +* ANSI-C Quoting:: How to expand ANSI-C sequences in quoted strings. +* Locale Translation:: How to translate strings into different languages. + +Quoting is used to remove the special meaning of certain characters or +words to the shell. Quoting can be used to disable special treatment +for special characters, to prevent reserved words from being recognized +as such, and to prevent parameter expansion. + + Each of the shell metacharacters (*note Definitions::) has special +meaning to the shell and must be quoted if it is to represent itself. +When the command history expansion facilities are being used (*note +History Interaction::), the HISTORY EXPANSION character, usually '!', +must be quoted to prevent history expansion. *Note Bash History +Facilities::, for more details concerning history expansion. + + There are three quoting mechanisms: the ESCAPE CHARACTER, single +quotes, and double quotes. + + +File: bash.info, Node: Escape Character, Next: Single Quotes, Up: Quoting + +3.1.2.1 Escape Character +........................ + +A non-quoted backslash '\' is the Bash escape character. It preserves +the literal value of the next character that follows, with the exception +of 'newline'. If a '\newline' pair appears, and the backslash itself is +not quoted, the '\newline' is treated as a line continuation (that is, +it is removed from the input stream and effectively ignored). + + +File: bash.info, Node: Single Quotes, Next: Double Quotes, Prev: Escape Character, Up: Quoting + +3.1.2.2 Single Quotes +..................... + +Enclosing characters in single quotes (''') preserves the literal value +of each character within the quotes. A single quote may not occur +between single quotes, even when preceded by a backslash. + + +File: bash.info, Node: Double Quotes, Next: ANSI-C Quoting, Prev: Single Quotes, Up: Quoting + +3.1.2.3 Double Quotes +..................... + +Enclosing characters in double quotes ('"') preserves the literal value +of all characters within the quotes, with the exception of '$', '`', +'\', and, when history expansion is enabled, '!'. When the shell is in +POSIX mode (*note Bash POSIX Mode::), the '!' has no special meaning +within double quotes, even when history expansion is enabled. The +characters '$' and '`' retain their special meaning within double quotes +(*note Shell Expansions::). The backslash retains its special meaning +only when followed by one of the following characters: '$', '`', '"', +'\', or 'newline'. Within double quotes, backslashes that are followed +by one of these characters are removed. Backslashes preceding +characters without a special meaning are left unmodified. A double +quote may be quoted within double quotes by preceding it with a +backslash. If enabled, history expansion will be performed unless an +'!' appearing in double quotes is escaped using a backslash. The +backslash preceding the '!' is not removed. + + The special parameters '*' and '@' have special meaning when in +double quotes (*note Shell Parameter Expansion::). + + +File: bash.info, Node: ANSI-C Quoting, Next: Locale Translation, Prev: Double Quotes, Up: Quoting + +3.1.2.4 ANSI-C Quoting +...................... + +Words of the form '$'STRING'' are treated specially. The word expands +to STRING, with backslash-escaped characters replaced as specified by +the ANSI C standard. Backslash escape sequences, if present, are +decoded as follows: + +'\a' + alert (bell) +'\b' + backspace +'\e' +'\E' + an escape character (not ANSI C) +'\f' + form feed +'\n' + newline +'\r' + carriage return +'\t' + horizontal tab +'\v' + vertical tab +'\\' + backslash +'\'' + single quote +'\"' + double quote +'\?' + question mark +'\NNN' + the eight-bit character whose value is the octal value NNN (one to + three octal digits) +'\xHH' + the eight-bit character whose value is the hexadecimal value HH + (one or two hex digits) +'\uHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHH (one to four hex digits) +'\UHHHHHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHHHHHH (one to eight hex digits) +'\cX' + a control-X character + +The expanded result is single-quoted, as if the dollar sign had not been +present. + + +File: bash.info, Node: Locale Translation, Prev: ANSI-C Quoting, Up: Quoting + +3.1.2.5 Locale-Specific Translation +................................... + +A double-quoted string preceded by a dollar sign ('$') will cause the +string to be translated according to the current locale. The GETTEXT +infrastructure performs the message catalog lookup and translation, +using the 'LC_MESSAGES' and 'TEXTDOMAIN' shell variables, as explained +below. See the gettext documentation for additional details. If the +current locale is 'C' or 'POSIX', or if there are no translations +available, the dollar sign is ignored. If the string is translated and +replaced, the replacement is double-quoted. + + Some systems use the message catalog selected by the 'LC_MESSAGES' +shell variable. Others create the name of the message catalog from the +value of the 'TEXTDOMAIN' shell variable, possibly adding a suffix of +'.mo'. If you use the 'TEXTDOMAIN' variable, you may need to set the +'TEXTDOMAINDIR' variable to the location of the message catalog files. +Still others use both variables in this fashion: +'TEXTDOMAINDIR'/'LC_MESSAGES'/LC_MESSAGES/'TEXTDOMAIN'.mo. + + +File: bash.info, Node: Comments, Prev: Quoting, Up: Shell Syntax + +3.1.3 Comments +-------------- + +In a non-interactive shell, or an interactive shell in which the +'interactive_comments' option to the 'shopt' builtin is enabled (*note +The Shopt Builtin::), a word beginning with '#' causes that word and all +remaining characters on that line to be ignored. An interactive shell +without the 'interactive_comments' option enabled does not allow +comments. The 'interactive_comments' option is on by default in +interactive shells. *Note Interactive Shells::, for a description of +what makes a shell interactive. + + +File: bash.info, Node: Shell Commands, Next: Shell Functions, Prev: Shell Syntax, Up: Basic Shell Features + +3.2 Shell Commands +================== + +A simple shell command such as 'echo a b c' consists of the command +itself followed by arguments, separated by spaces. + + More complex shell commands are composed of simple commands arranged +together in a variety of ways: in a pipeline in which the output of one +command becomes the input of a second, in a loop or conditional +construct, or in some other grouping. + +* Menu: + +* Reserved Words:: Words that have special meaning to the shell. +* Simple Commands:: The most common type of command. +* Pipelines:: Connecting the input and output of several + commands. +* Lists:: How to execute commands sequentially. +* Compound Commands:: Shell commands for control flow. +* Coprocesses:: Two-way communication between commands. +* GNU Parallel:: Running commands in parallel. + + +File: bash.info, Node: Reserved Words, Next: Simple Commands, Up: Shell Commands + +3.2.1 Reserved Words +-------------------- + +Reserved words are words that have special meaning to the shell. They +are used to begin and end the shell's compound commands. + + The following words are recognized as reserved when unquoted and the +first word of a command (see below for exceptions): + +'if' 'then' 'elif' 'else' 'fi' 'time' +'for' 'in' 'until' 'while' 'do' 'done' +'case' 'esac' 'coproc''select''function' +'{' '}' '[[' ']]' '!' + +'in' is recognized as a reserved word if it is the third word of a +'case' or 'select' command. 'in' and 'do' are recognized as reserved +words if they are the third word in a 'for' command. + + +File: bash.info, Node: Simple Commands, Next: Pipelines, Prev: Reserved Words, Up: Shell Commands + +3.2.2 Simple Commands +--------------------- + +A simple command is the kind of command encountered most often. It's +just a sequence of words separated by 'blank's, terminated by one of the +shell's control operators (*note Definitions::). The first word +generally specifies a command to be executed, with the rest of the words +being that command's arguments. + + The return status (*note Exit Status::) of a simple command is its +exit status as provided by the POSIX 1003.1 'waitpid' function, or 128+N +if the command was terminated by signal N. + + +File: bash.info, Node: Pipelines, Next: Lists, Prev: Simple Commands, Up: Shell Commands + +3.2.3 Pipelines +--------------- + +A 'pipeline' is a sequence of one or more commands separated by one of +the control operators '|' or '|&'. + + The format for a pipeline is + [time [-p]] [!] COMMAND1 [ | or |& COMMAND2 ] ... + +The output of each command in the pipeline is connected via a pipe to +the input of the next command. That is, each command reads the previous +command's output. This connection is performed before any redirections +specified by the command. + + If '|&' is used, COMMAND1's standard error, in addition to its +standard output, is connected to COMMAND2's standard input through the +pipe; it is shorthand for '2>&1 |'. This implicit redirection of the +standard error to the standard output is performed after any +redirections specified by the command. + + The reserved word 'time' causes timing statistics to be printed for +the pipeline once it finishes. The statistics currently consist of +elapsed (wall-clock) time and user and system time consumed by the +command's execution. The '-p' option changes the output format to that +specified by POSIX. When the shell is in POSIX mode (*note Bash POSIX +Mode::), it does not recognize 'time' as a reserved word if the next +token begins with a '-'. The 'TIMEFORMAT' variable may be set to a +format string that specifies how the timing information should be +displayed. *Note Bash Variables::, for a description of the available +formats. The use of 'time' as a reserved word permits the timing of +shell builtins, shell functions, and pipelines. An external 'time' +command cannot time these easily. + + When the shell is in POSIX mode (*note Bash POSIX Mode::), 'time' may +be followed by a newline. In this case, the shell displays the total +user and system time consumed by the shell and its children. The +'TIMEFORMAT' variable may be used to specify the format of the time +information. + + If the pipeline is not executed asynchronously (*note Lists::), the +shell waits for all commands in the pipeline to complete. + + Each command in a pipeline is executed in its own subshell, which is +a separate process (*note Command Execution Environment::). If the +'lastpipe' option is enabled using the 'shopt' builtin (*note The Shopt +Builtin::), the last element of a pipeline may be run by the shell +process. + + The exit status of a pipeline is the exit status of the last command +in the pipeline, unless the 'pipefail' option is enabled (*note The Set +Builtin::). If 'pipefail' is enabled, the pipeline's return status is +the value of the last (rightmost) command to exit with a non-zero +status, or zero if all commands exit successfully. If the reserved word +'!' precedes the pipeline, the exit status is the logical negation of +the exit status as described above. The shell waits for all commands in +the pipeline to terminate before returning a value. + + +File: bash.info, Node: Lists, Next: Compound Commands, Prev: Pipelines, Up: Shell Commands + +3.2.4 Lists of Commands +----------------------- + +A 'list' is a sequence of one or more pipelines separated by one of the +operators ';', '&', '&&', or '||', and optionally terminated by one of +';', '&', or a 'newline'. + + Of these list operators, '&&' and '||' have equal precedence, +followed by ';' and '&', which have equal precedence. + + A sequence of one or more newlines may appear in a 'list' to delimit +commands, equivalent to a semicolon. + + If a command is terminated by the control operator '&', the shell +executes the command asynchronously in a subshell. This is known as +executing the command in the BACKGROUND, and these are referred to as +ASYNCHRONOUS commands. The shell does not wait for the command to +finish, and the return status is 0 (true). When job control is not +active (*note Job Control::), the standard input for asynchronous +commands, in the absence of any explicit redirections, is redirected +from '/dev/null'. + + Commands separated by a ';' are executed sequentially; the shell +waits for each command to terminate in turn. The return status is the +exit status of the last command executed. + + AND and OR lists are sequences of one or more pipelines separated by +the control operators '&&' and '||', respectively. AND and OR lists are +executed with left associativity. + + An AND list has the form + COMMAND1 && COMMAND2 + +COMMAND2 is executed if, and only if, COMMAND1 returns an exit status of +zero (success). + + An OR list has the form + COMMAND1 || COMMAND2 + +COMMAND2 is executed if, and only if, COMMAND1 returns a non-zero exit +status. + + The return status of AND and OR lists is the exit status of the last +command executed in the list. + + +File: bash.info, Node: Compound Commands, Next: Coprocesses, Prev: Lists, Up: Shell Commands + +3.2.5 Compound Commands +----------------------- + +* Menu: + +* Looping Constructs:: Shell commands for iterative action. +* Conditional Constructs:: Shell commands for conditional execution. +* Command Grouping:: Ways to group commands. + +Compound commands are the shell programming language constructs. Each +construct begins with a reserved word or control operator and is +terminated by a corresponding reserved word or operator. Any +redirections (*note Redirections::) associated with a compound command +apply to all commands within that compound command unless explicitly +overridden. + + In most cases a list of commands in a compound command's description +may be separated from the rest of the command by one or more newlines, +and may be followed by a newline in place of a semicolon. + + Bash provides looping constructs, conditional commands, and +mechanisms to group commands and execute them as a unit. + + +File: bash.info, Node: Looping Constructs, Next: Conditional Constructs, Up: Compound Commands + +3.2.5.1 Looping Constructs +.......................... + +Bash supports the following looping constructs. + + Note that wherever a ';' appears in the description of a command's +syntax, it may be replaced with one or more newlines. + +'until' + The syntax of the 'until' command is: + + until TEST-COMMANDS; do CONSEQUENT-COMMANDS; done + + Execute CONSEQUENT-COMMANDS as long as TEST-COMMANDS has an exit + status which is not zero. The return status is the exit status of + the last command executed in CONSEQUENT-COMMANDS, or zero if none + was executed. + +'while' + The syntax of the 'while' command is: + + while TEST-COMMANDS; do CONSEQUENT-COMMANDS; done + + Execute CONSEQUENT-COMMANDS as long as TEST-COMMANDS has an exit + status of zero. The return status is the exit status of the last + command executed in CONSEQUENT-COMMANDS, or zero if none was + executed. + +'for' + The syntax of the 'for' command is: + + for NAME [ [in [WORDS ...] ] ; ] do COMMANDS; done + + Expand WORDS (*note Shell Expansions::), and execute COMMANDS once + for each member in the resultant list, with NAME bound to the + current member. If 'in WORDS' is not present, the 'for' command + executes the COMMANDS once for each positional parameter that is + set, as if 'in "$@"' had been specified (*note Special + Parameters::). + + The return status is the exit status of the last command that + executes. If there are no items in the expansion of WORDS, no + commands are executed, and the return status is zero. + + An alternate form of the 'for' command is also supported: + + for (( EXPR1 ; EXPR2 ; EXPR3 )) ; do COMMANDS ; done + + First, the arithmetic expression EXPR1 is evaluated according to + the rules described below (*note Shell Arithmetic::). The + arithmetic expression EXPR2 is then evaluated repeatedly until it + evaluates to zero. Each time EXPR2 evaluates to a non-zero value, + COMMANDS are executed and the arithmetic expression EXPR3 is + evaluated. If any expression is omitted, it behaves as if it + evaluates to 1. The return value is the exit status of the last + command in COMMANDS that is executed, or false if any of the + expressions is invalid. + + The 'break' and 'continue' builtins (*note Bourne Shell Builtins::) +may be used to control loop execution. + + +File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev: Looping Constructs, Up: Compound Commands + +3.2.5.2 Conditional Constructs +.............................. + +'if' + The syntax of the 'if' command is: + + if TEST-COMMANDS; then + CONSEQUENT-COMMANDS; + [elif MORE-TEST-COMMANDS; then + MORE-CONSEQUENTS;] + [else ALTERNATE-CONSEQUENTS;] + fi + + The TEST-COMMANDS list is executed, and if its return status is + zero, the CONSEQUENT-COMMANDS list is executed. If TEST-COMMANDS + returns a non-zero status, each 'elif' list is executed in turn, + and if its exit status is zero, the corresponding MORE-CONSEQUENTS + is executed and the command completes. If 'else + ALTERNATE-CONSEQUENTS' is present, and the final command in the + final 'if' or 'elif' clause has a non-zero exit status, then + ALTERNATE-CONSEQUENTS is executed. The return status is the exit + status of the last command executed, or zero if no condition tested + true. + +'case' + The syntax of the 'case' command is: + + case WORD in + [ [(] PATTERN [| PATTERN]...) COMMAND-LIST ;;]... + esac + + 'case' will selectively execute the COMMAND-LIST corresponding to + the first PATTERN that matches WORD. The match is performed + according to the rules described below in *note Pattern Matching::. + If the 'nocasematch' shell option (see the description of 'shopt' + in *note The Shopt Builtin::) is enabled, the match is performed + without regard to the case of alphabetic characters. The '|' is + used to separate multiple patterns, and the ')' operator terminates + a pattern list. A list of patterns and an associated command-list + is known as a CLAUSE. + + Each clause must be terminated with ';;', ';&', or ';;&'. The WORD + undergoes tilde expansion, parameter expansion, command + substitution, arithmetic expansion, and quote removal (*note Shell + Parameter Expansion::) before matching is attempted. Each PATTERN + undergoes tilde expansion, parameter expansion, command + substitution, and arithmetic expansion. + + There may be an arbitrary number of 'case' clauses, each terminated + by a ';;', ';&', or ';;&'. The first pattern that matches + determines the command-list that is executed. It's a common idiom + to use '*' as the final pattern to define the default case, since + that pattern will always match. + + Here is an example using 'case' in a script that could be used to + describe one interesting feature of an animal: + + echo -n "Enter the name of an animal: " + read ANIMAL + echo -n "The $ANIMAL has " + case $ANIMAL in + horse | dog | cat) echo -n "four";; + man | kangaroo ) echo -n "two";; + *) echo -n "an unknown number of";; + esac + echo " legs." + + + If the ';;' operator is used, no subsequent matches are attempted + after the first pattern match. Using ';&' in place of ';;' causes + execution to continue with the COMMAND-LIST associated with the + next clause, if any. Using ';;&' in place of ';;' causes the shell + to test the patterns in the next clause, if any, and execute any + associated COMMAND-LIST on a successful match, continuing the case + statement execution as if the pattern list had not matched. + + The return status is zero if no PATTERN is matched. Otherwise, the + return status is the exit status of the COMMAND-LIST executed. + +'select' + + The 'select' construct allows the easy generation of menus. It has + almost the same syntax as the 'for' command: + + select NAME [in WORDS ...]; do COMMANDS; done + + The list of words following 'in' is expanded, generating a list of + items. The set of expanded words is printed on the standard error + output stream, each preceded by a number. If the 'in WORDS' is + omitted, the positional parameters are printed, as if 'in "$@"' had + been specified. The 'PS3' prompt is then displayed and a line is + read from the standard input. If the line consists of a number + corresponding to one of the displayed words, then the value of NAME + is set to that word. If the line is empty, the words and prompt + are displayed again. If 'EOF' is read, the 'select' command + completes. Any other value read causes NAME to be set to null. + The line read is saved in the variable 'REPLY'. + + The COMMANDS are executed after each selection until a 'break' + command is executed, at which point the 'select' command completes. + + Here is an example that allows the user to pick a filename from the + current directory, and displays the name and index of the file + selected. + + select fname in *; + do + echo you picked $fname \($REPLY\) + break; + done + +'((...))' + (( EXPRESSION )) + + The arithmetic EXPRESSION is evaluated according to the rules + described below (*note Shell Arithmetic::). If the value of the + expression is non-zero, the return status is 0; otherwise the + return status is 1. This is exactly equivalent to + let "EXPRESSION" + *Note Bash Builtins::, for a full description of the 'let' builtin. + +'[[...]]' + [[ EXPRESSION ]] + + Return a status of 0 or 1 depending on the evaluation of the + conditional expression EXPRESSION. Expressions are composed of the + primaries described below in *note Bash Conditional Expressions::. + Word splitting and filename expansion are not performed on the + words between the '[[' and ']]'; tilde expansion, parameter and + variable expansion, arithmetic expansion, command substitution, + process substitution, and quote removal are performed. Conditional + operators such as '-f' must be unquoted to be recognized as + primaries. + + When used with '[[', the '<' and '>' operators sort + lexicographically using the current locale. + + When the '==' and '!=' operators are used, the string to the right + of the operator is considered a pattern and matched according to + the rules described below in *note Pattern Matching::, as if the + 'extglob' shell option were enabled. The '=' operator is identical + to '=='. If the 'nocasematch' shell option (see the description of + 'shopt' in *note The Shopt Builtin::) is enabled, the match is + performed without regard to the case of alphabetic characters. The + return value is 0 if the string matches ('==') or does not match + ('!=') the pattern, and 1 otherwise. Any part of the pattern may + be quoted to force the quoted portion to be matched as a string. + + An additional binary operator, '=~', is available, with the same + precedence as '==' and '!='. When it is used, the string to the + right of the operator is considered a POSIX extended regular + expression and matched accordingly (using the POSIX 'regcomp' and + 'regexec' interfaces usually described in regex(3)). The return + value is 0 if the string matches the pattern, and 1 otherwise. If + the regular expression is syntactically incorrect, the conditional + expression's return value is 2. If the 'nocasematch' shell option + (see the description of 'shopt' in *note The Shopt Builtin::) is + enabled, the match is performed without regard to the case of + alphabetic characters. Any part of the pattern may be quoted to + force the quoted portion to be matched as a string. Bracket + expressions in regular expressions must be treated carefully, since + normal quoting characters lose their meanings between brackets. If + the pattern is stored in a shell variable, quoting the variable + expansion forces the entire pattern to be matched as a string. + + The pattern will match if it matches any part of the string. + Anchor the pattern using the '^' and '$' regular expression + operators to force it to match the entire string. The array + variable 'BASH_REMATCH' records which parts of the string matched + the pattern. The element of 'BASH_REMATCH' with index 0 contains + the portion of the string matching the entire regular expression. + Substrings matched by parenthesized subexpressions within the + regular expression are saved in the remaining 'BASH_REMATCH' + indices. The element of 'BASH_REMATCH' with index N is the portion + of the string matching the Nth parenthesized subexpression. + + For example, the following will match a line (stored in the shell + variable LINE) if there is a sequence of characters anywhere in the + value consisting of any number, including zero, of characters in + the 'space' character class, zero or one instances of 'a', then a + 'b': + [[ $line =~ [[:space:]]*(a)?b ]] + + That means values like 'aab' and ' aaaaaab' will match, as will a + line containing a 'b' anywhere in its value. + + Storing the regular expression in a shell variable is often a + useful way to avoid problems with quoting characters that are + special to the shell. It is sometimes difficult to specify a + regular expression literally without using quotes, or to keep track + of the quoting used by regular expressions while paying attention + to the shell's quote removal. Using a shell variable to store the + pattern decreases these problems. For example, the following is + equivalent to the above: + pattern='[[:space:]]*(a)?b' + [[ $line =~ $pattern ]] + + If you want to match a character that's special to the regular + expression grammar, it has to be quoted to remove its special + meaning. This means that in the pattern 'xxx.txt', the '.' matches + any character in the string (its usual regular expression meaning), + but in the pattern '"xxx.txt"' it can only match a literal '.'. + Shell programmers should take special care with backslashes, since + backslashes are used both by the shell and regular expressions to + remove the special meaning from the following character. The + following two sets of commands are _not_ equivalent: + pattern='\.' + + [[ . =~ $pattern ]] + [[ . =~ \. ]] + + [[ . =~ "$pattern" ]] + [[ . =~ '\.' ]] + + The first two matches will succeed, but the second two will not, + because in the second two the backslash will be part of the pattern + to be matched. In the first two examples, the backslash removes + the special meaning from '.', so the literal '.' matches. If the + string in the first examples were anything other than '.', say 'a', + the pattern would not match, because the quoted '.' in the pattern + loses its special meaning of matching any single character. + + Expressions may be combined using the following operators, listed + in decreasing order of precedence: + + '( EXPRESSION )' + Returns the value of EXPRESSION. This may be used to override + the normal precedence of operators. + + '! EXPRESSION' + True if EXPRESSION is false. + + 'EXPRESSION1 && EXPRESSION2' + True if both EXPRESSION1 and EXPRESSION2 are true. + + 'EXPRESSION1 || EXPRESSION2' + True if either EXPRESSION1 or EXPRESSION2 is true. + + The '&&' and '||' operators do not evaluate EXPRESSION2 if the + value of EXPRESSION1 is sufficient to determine the return value of + the entire conditional expression. + + +File: bash.info, Node: Command Grouping, Prev: Conditional Constructs, Up: Compound Commands + +3.2.5.3 Grouping Commands +......................... + +Bash provides two ways to group a list of commands to be executed as a +unit. When commands are grouped, redirections may be applied to the +entire command list. For example, the output of all the commands in the +list may be redirected to a single stream. + +'()' + ( LIST ) + + Placing a list of commands between parentheses causes a subshell + environment to be created (*note Command Execution Environment::), + and each of the commands in LIST to be executed in that subshell. + Since the LIST is executed in a subshell, variable assignments do + not remain in effect after the subshell completes. + +'{}' + { LIST; } + + Placing a list of commands between curly braces causes the list to + be executed in the current shell context. No subshell is created. + The semicolon (or newline) following LIST is required. + + In addition to the creation of a subshell, there is a subtle +difference between these two constructs due to historical reasons. The +braces are 'reserved words', so they must be separated from the LIST by +'blank's or other shell metacharacters. The parentheses are +'operators', and are recognized as separate tokens by the shell even if +they are not separated from the LIST by whitespace. + + The exit status of both of these constructs is the exit status of +LIST. + + +File: bash.info, Node: Coprocesses, Next: GNU Parallel, Prev: Compound Commands, Up: Shell Commands + +3.2.6 Coprocesses +----------------- + +A 'coprocess' is a shell command preceded by the 'coproc' reserved word. +A coprocess is executed asynchronously in a subshell, as if the command +had been terminated with the '&' control operator, with a two-way pipe +established between the executing shell and the coprocess. + + The format for a coprocess is: + coproc [NAME] COMMAND [REDIRECTIONS] + +This creates a coprocess named NAME. If NAME is not supplied, the +default name is COPROC. NAME must not be supplied if COMMAND is a +simple command (*note Simple Commands::); otherwise, it is interpreted +as the first word of the simple command. + + When the coprocess is executed, the shell creates an array variable +(*note Arrays::) named 'NAME' in the context of the executing shell. +The standard output of COMMAND is connected via a pipe to a file +descriptor in the executing shell, and that file descriptor is assigned +to 'NAME'[0]. The standard input of COMMAND is connected via a pipe to +a file descriptor in the executing shell, and that file descriptor is +assigned to 'NAME'[1]. This pipe is established before any redirections +specified by the command (*note Redirections::). The file descriptors +can be utilized as arguments to shell commands and redirections using +standard word expansions. Other than those created to execute command +and process substitutions, the file descriptors are not available in +subshells. + + The process ID of the shell spawned to execute the coprocess is +available as the value of the variable 'NAME'_PID. The 'wait' builtin +command may be used to wait for the coprocess to terminate. + + Since the coprocess is created as an asynchronous command, the +'coproc' command always returns success. The return status of a +coprocess is the exit status of COMMAND. + + +File: bash.info, Node: GNU Parallel, Prev: Coprocesses, Up: Shell Commands + +3.2.7 GNU Parallel +------------------ + +There are ways to run commands in parallel that are not built into Bash. +GNU Parallel is a tool to do just that. + + GNU Parallel, as its name suggests, can be used to build and run +commands in parallel. You may run the same command with different +arguments, whether they are filenames, usernames, hostnames, or lines +read from files. GNU Parallel provides shorthand references to many of +the most common operations (input lines, various portions of the input +line, different ways to specify the input source, and so on). Parallel +can replace 'xargs' or feed commands from its input sources to several +different instances of Bash. + + For a complete description, refer to the GNU Parallel documentation. +A few examples should provide a brief introduction to its use. + + For example, it is easy to replace 'xargs' to gzip all html files in +the current directory and its subdirectories: + find . -type f -name '*.html' -print | parallel gzip +If you need to protect special characters such as newlines in file +names, use find's '-print0' option and parallel's '-0' option. + + You can use Parallel to move files from the current directory when +the number of files is too large to process with one 'mv' invocation: + printf '%s\n' * | parallel mv {} destdir + + As you can see, the {} is replaced with each line read from standard +input. While using 'ls' will work in most instances, it is not +sufficient to deal with all filenames. 'printf' is a shell builtin, and +therefore is not subject to the kernel's limit on the number of +arguments to a program, so you can use '*' (but see below about the +'dotglob' shell option). If you need to accommodate special characters +in filenames, you can use + + printf '%s\0' * | parallel -0 mv {} destdir + +as alluded to above. + + This will run as many 'mv' commands as there are files in the current +directory. You can emulate a parallel 'xargs' by adding the '-X' +option: + printf '%s\0' * | parallel -0 -X mv {} destdir + + (You may have to modify the pattern if you have the 'dotglob' option +enabled.) + + GNU Parallel can replace certain common idioms that operate on lines +read from a file (in this case, filenames listed one per line): + while IFS= read -r x; do + do-something1 "$x" "config-$x" + do-something2 < "$x" + done < file | process-output + +with a more compact syntax reminiscent of lambdas: + cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" | + process-output + + Parallel provides a built-in mechanism to remove filename extensions, +which lends itself to batch file transformations or renaming: + ls *.gz | parallel -j+0 "zcat {} | bzip2 >{.}.bz2 && rm {}" +This will recompress all files in the current directory with names +ending in .gz using bzip2, running one job per CPU (-j+0) in parallel. +(We use 'ls' for brevity here; using 'find' as above is more robust in +the face of filenames containing unexpected characters.) Parallel can +take arguments from the command line; the above can also be written as + + parallel "zcat {} | bzip2 >{.}.bz2 && rm {}" ::: *.gz + + If a command generates output, you may want to preserve the input +order in the output. For instance, the following command + { + echo foss.org.my ; + echo debian.org ; + echo freenetproject.org ; + } | parallel traceroute +will display as output the traceroute invocation that finishes first. +Adding the '-k' option + { + echo foss.org.my ; + echo debian.org ; + echo freenetproject.org ; + } | parallel -k traceroute +will ensure that the output of 'traceroute foss.org.my' is displayed +first. + + Finally, Parallel can be used to run a sequence of shell commands in +parallel, similar to 'cat file | bash'. It is not uncommon to take a +list of filenames, create a series of shell commands to operate on them, +and feed that list of commands to a shell. Parallel can speed this up. +Assuming that 'file' contains a list of shell commands, one per line, + + parallel -j 10 < file + +will evaluate the commands using the shell (since no explicit command is +supplied as an argument), in blocks of ten shell jobs at a time. + + +File: bash.info, Node: Shell Functions, Next: Shell Parameters, Prev: Shell Commands, Up: Basic Shell Features + +3.3 Shell Functions +=================== + +Shell functions are a way to group commands for later execution using a +single name for the group. They are executed just like a "regular" +command. When the name of a shell function is used as a simple command +name, the list of commands associated with that function name is +executed. Shell functions are executed in the current shell context; no +new process is created to interpret them. + + Functions are declared using this syntax: + FNAME () COMPOUND-COMMAND [ REDIRECTIONS ] + + or + + function FNAME [()] COMPOUND-COMMAND [ REDIRECTIONS ] + + This defines a shell function named FNAME. The reserved word +'function' is optional. If the 'function' reserved word is supplied, +the parentheses are optional. The BODY of the function is the compound +command COMPOUND-COMMAND (*note Compound Commands::). That command is +usually a LIST enclosed between { and }, but may be any compound command +listed above, with one exception: If the 'function' reserved word is +used, but the parentheses are not supplied, the braces are required. +COMPOUND-COMMAND is executed whenever FNAME is specified as the name of +a command. When the shell is in POSIX mode (*note Bash POSIX Mode::), +FNAME must be a valid shell NAME and may not be the same as one of the +special builtins (*note Special Builtins::). In default mode, a +function name can be any unquoted shell word that does not contain '$'. +Any redirections (*note Redirections::) associated with the shell +function are performed when the function is executed. A function +definition may be deleted using the '-f' option to the 'unset' builtin +(*note Bourne Shell Builtins::). + + The exit status of a function definition is zero unless a syntax +error occurs or a readonly function with the same name already exists. +When executed, the exit status of a function is the exit status of the +last command executed in the body. + + Note that for historical reasons, in the most common usage the curly +braces that surround the body of the function must be separated from the +body by 'blank's or newlines. This is because the braces are reserved +words and are only recognized as such when they are separated from the +command list by whitespace or another shell metacharacter. Also, when +using the braces, the LIST must be terminated by a semicolon, a '&', or +a newline. + + When a function is executed, the arguments to the function become the +positional parameters during its execution (*note Positional +Parameters::). The special parameter '#' that expands to the number of +positional parameters is updated to reflect the change. Special +parameter '0' is unchanged. The first element of the 'FUNCNAME' +variable is set to the name of the function while the function is +executing. + + All other aspects of the shell execution environment are identical +between a function and its caller with these exceptions: the 'DEBUG' and +'RETURN' traps are not inherited unless the function has been given the +'trace' attribute using the 'declare' builtin or the '-o functrace' +option has been enabled with the 'set' builtin, (in which case all +functions inherit the 'DEBUG' and 'RETURN' traps), and the 'ERR' trap is +not inherited unless the '-o errtrace' shell option has been enabled. +*Note Bourne Shell Builtins::, for the description of the 'trap' +builtin. + + The 'FUNCNEST' variable, if set to a numeric value greater than 0, +defines a maximum function nesting level. Function invocations that +exceed the limit cause the entire command to abort. + + If the builtin command 'return' is executed in a function, the +function completes and execution resumes with the next command after the +function call. Any command associated with the 'RETURN' trap is +executed before execution resumes. When a function completes, the +values of the positional parameters and the special parameter '#' are +restored to the values they had prior to the function's execution. If a +numeric argument is given to 'return', that is the function's return +status; otherwise the function's return status is the exit status of the +last command executed before the 'return'. + + Variables local to the function may be declared with the 'local' +builtin. These variables are visible only to the function and the +commands it invokes. This is particularly important when a shell +function calls other functions. + + Local variables "shadow" variables with the same name declared at +previous scopes. For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. + + The shell uses DYNAMIC SCOPING to control a variable's visibility +within functions. With dynamic scoping, visible variables and their +values are a result of the sequence of function calls that caused +execution to reach the current function. The value of a variable that a +function sees depends on its value within its caller, if any, whether +that caller is the "global" scope or another shell function. This is +also the value that a local variable declaration "shadows", and the +value that is restored when the function returns. + + For example, if a variable VAR is declared as local in function +FUNC1, and FUNC1 calls another function FUNC2, references to VAR made +from within FUNC2 will resolve to the local variable VAR from FUNC1, +shadowing any global variable named VAR. + + The following script demonstrates this behavior. When executed, the +script displays + + In func2, var = func1 local + + func1() + { + local var='func1 local' + func2 + } + + func2() + { + echo "In func2, var = $var" + } + + var=global + func1 + + The 'unset' builtin also acts using the same dynamic scope: if a +variable is local to the current scope, 'unset' will unset it; otherwise +the unset will refer to the variable found in any calling scope as +described above. If a variable at the current local scope is unset, it +will remain so until it is reset in that scope or until the function +returns. Once the function returns, any instance of the variable at a +previous scope will become visible. If the unset acts on a variable at +a previous scope, any instance of a variable with that name that had +been shadowed will become visible. + + Function names and definitions may be listed with the '-f' option to +the 'declare' ('typeset') builtin command (*note Bash Builtins::). The +'-F' option to 'declare' or 'typeset' will list the function names only +(and optionally the source file and line number, if the 'extdebug' shell +option is enabled). Functions may be exported so that subshells +automatically have them defined with the '-f' option to the 'export' +builtin (*note Bourne Shell Builtins::). + + Functions may be recursive. The 'FUNCNEST' variable may be used to +limit the depth of the function call stack and restrict the number of +function invocations. By default, no limit is placed on the number of +recursive calls. + + +File: bash.info, Node: Shell Parameters, Next: Shell Expansions, Prev: Shell Functions, Up: Basic Shell Features + +3.4 Shell Parameters +==================== + +* Menu: + +* Positional Parameters:: The shell's command-line arguments. +* Special Parameters:: Parameters denoted by special characters. + +A PARAMETER is an entity that stores values. It can be a 'name', a +number, or one of the special characters listed below. A VARIABLE is a +parameter denoted by a 'name'. A variable has a VALUE and zero or more +ATTRIBUTES. Attributes are assigned using the 'declare' builtin command +(see the description of the 'declare' builtin in *note Bash Builtins::). + + A parameter is set if it has been assigned a value. The null string +is a valid value. Once a variable is set, it may be unset only by using +the 'unset' builtin command. + + A variable may be assigned to by a statement of the form + NAME=[VALUE] +If VALUE is not given, the variable is assigned the null string. All +VALUEs undergo tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal (detailed +below). If the variable has its 'integer' attribute set, then VALUE is +evaluated as an arithmetic expression even if the '$((...))' expansion +is not used (*note Arithmetic Expansion::). Word splitting is not +performed, with the exception of '"$@"' as explained below. Filename +expansion is not performed. Assignment statements may also appear as +arguments to the 'alias', 'declare', 'typeset', 'export', 'readonly', +and 'local' builtin commands (DECLARATION commands). When in POSIX mode +(*note Bash POSIX Mode::), these builtins may appear in a command after +one or more instances of the 'command' builtin and retain these +assignment statement properties. + + In the context where an assignment statement is assigning a value to +a shell variable or array index (*note Arrays::), the '+=' operator can +be used to append to or add to the variable's previous value. This +includes arguments to builtin commands such as 'declare' that accept +assignment statements (DECLARATION commands). When '+=' is applied to a +variable for which the INTEGER attribute has been set, VALUE is +evaluated as an arithmetic expression and added to the variable's +current value, which is also evaluated. When '+=' is applied to an +array variable using compound assignment (*note Arrays::), the +variable's value is not unset (as it is when using '='), and new values +are appended to the array beginning at one greater than the array's +maximum index (for indexed arrays), or added as additional key-value +pairs in an associative array. When applied to a string-valued +variable, VALUE is expanded and appended to the variable's value. + + A variable can be assigned the NAMEREF attribute using the '-n' +option to the 'declare' or 'local' builtin commands (*note Bash +Builtins::) to create a NAMEREF, or a reference to another variable. +This allows variables to be manipulated indirectly. Whenever the +nameref variable is referenced, assigned to, unset, or has its +attributes modified (other than using or changing the nameref attribute +itself), the operation is actually performed on the variable specified +by the nameref variable's value. A nameref is commonly used within +shell functions to refer to a variable whose name is passed as an +argument to the function. For instance, if a variable name is passed to +a shell function as its first argument, running + declare -n ref=$1 +inside the function creates a nameref variable REF whose value is the +variable name passed as the first argument. References and assignments +to REF, and changes to its attributes, are treated as references, +assignments, and attribute modifications to the variable whose name was +passed as '$1'. + + If the control variable in a 'for' loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. Namerefs can be unset using the '-n' option to the +'unset' builtin (*note Bourne Shell Builtins::). Otherwise, if 'unset' +is executed with the name of a nameref variable as an argument, the +variable referenced by the nameref variable will be unset. + + +File: bash.info, Node: Positional Parameters, Next: Special Parameters, Up: Shell Parameters + +3.4.1 Positional Parameters +--------------------------- + +A POSITIONAL PARAMETER is a parameter denoted by one or more digits, +other than the single digit '0'. Positional parameters are assigned +from the shell's arguments when it is invoked, and may be reassigned +using the 'set' builtin command. Positional parameter 'N' may be +referenced as '${N}', or as '$N' when 'N' consists of a single digit. +Positional parameters may not be assigned to with assignment statements. +The 'set' and 'shift' builtins are used to set and unset them (*note +Shell Builtin Commands::). The positional parameters are temporarily +replaced when a shell function is executed (*note Shell Functions::). + + When a positional parameter consisting of more than a single digit is +expanded, it must be enclosed in braces. + + +File: bash.info, Node: Special Parameters, Prev: Positional Parameters, Up: Shell Parameters + +3.4.2 Special Parameters +------------------------ + +The shell treats several parameters specially. These parameters may +only be referenced; assignment to them is not allowed. + +'*' + ($*) Expands to the positional parameters, starting from one. When + the expansion is not within double quotes, each positional + parameter expands to a separate word. In contexts where it is + performed, those words are subject to further word splitting and + filename expansion. When the expansion occurs within double + quotes, it expands to a single word with the value of each + parameter separated by the first character of the 'IFS' special + variable. That is, '"$*"' is equivalent to '"$1C$2C..."', where C + is the first character of the value of the 'IFS' variable. If + 'IFS' is unset, the parameters are separated by spaces. If 'IFS' + is null, the parameters are joined without intervening separators. + +'@' + ($@) Expands to the positional parameters, starting from one. In + contexts where word splitting is performed, this expands each + positional parameter to a separate word; if not within double + quotes, these words are subject to word splitting. In contexts + where word splitting is not performed, this expands to a single + word with each positional parameter separated by a space. When the + expansion occurs within double quotes, and word splitting is + performed, each parameter expands to a separate word. That is, + '"$@"' is equivalent to '"$1" "$2" ...'. If the double-quoted + expansion occurs within a word, the expansion of the first + parameter is joined with the beginning part of the original word, + and the expansion of the last parameter is joined with the last + part of the original word. When there are no positional + parameters, '"$@"' and '$@' expand to nothing (i.e., they are + removed). + +'#' + ($#) Expands to the number of positional parameters in decimal. + +'?' + ($?) Expands to the exit status of the most recently executed + foreground pipeline. + +'-' + ($-, a hyphen.) Expands to the current option flags as specified + upon invocation, by the 'set' builtin command, or those set by the + shell itself (such as the '-i' option). + +'$' + ($$) Expands to the process ID of the shell. In a '()' subshell, + it expands to the process ID of the invoking shell, not the + subshell. + +'!' + ($!) Expands to the process ID of the job most recently placed + into the background, whether executed as an asynchronous command or + using the 'bg' builtin (*note Job Control Builtins::). + +'0' + ($0) Expands to the name of the shell or shell script. This is set + at shell initialization. If Bash is invoked with a file of + commands (*note Shell Scripts::), '$0' is set to the name of that + file. If Bash is started with the '-c' option (*note Invoking + Bash::), then '$0' is set to the first argument after the string to + be executed, if one is present. Otherwise, it is set to the + filename used to invoke Bash, as given by argument zero. + + +File: bash.info, Node: Shell Expansions, Next: Redirections, Prev: Shell Parameters, Up: Basic Shell Features + +3.5 Shell Expansions +==================== + +Expansion is performed on the command line after it has been split into +'token's. There are seven kinds of expansion performed: + + * brace expansion + * tilde expansion + * parameter and variable expansion + * command substitution + * arithmetic expansion + * word splitting + * filename expansion + +* Menu: + +* Brace Expansion:: Expansion of expressions within braces. +* Tilde Expansion:: Expansion of the ~ character. +* Shell Parameter Expansion:: How Bash expands variables to their values. +* Command Substitution:: Using the output of a command as an argument. +* Arithmetic Expansion:: How to use arithmetic in shell expansions. +* Process Substitution:: A way to write and read to and from a + command. +* Word Splitting:: How the results of expansion are split into separate + arguments. +* Filename Expansion:: A shorthand for specifying filenames matching patterns. +* Quote Removal:: How and when quote characters are removed from + words. + + The order of expansions is: brace expansion; tilde expansion, +parameter and variable expansion, arithmetic expansion, and command +substitution (done in a left-to-right fashion); word splitting; and +filename expansion. + + On systems that can support it, there is an additional expansion +available: PROCESS SUBSTITUTION. This is performed at the same time as +tilde, parameter, variable, and arithmetic expansion and command +substitution. + + After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves (QUOTE +REMOVAL). + + Only brace expansion, word splitting, and filename expansion can +increase the number of words of the expansion; other expansions expand a +single word to a single word. The only exceptions to this are the +expansions of '"$@"' and '$*' (*note Special Parameters::), and +'"${NAME[@]}"' and '${NAME[*]}' (*note Arrays::). + + After all expansions, 'quote removal' (*note Quote Removal::) is +performed. + + +File: bash.info, Node: Brace Expansion, Next: Tilde Expansion, Up: Shell Expansions + +3.5.1 Brace Expansion +--------------------- + +Brace expansion is a mechanism by which arbitrary strings may be +generated. This mechanism is similar to FILENAME EXPANSION (*note +Filename Expansion::), but the filenames generated need not exist. +Patterns to be brace expanded take the form of an optional PREAMBLE, +followed by either a series of comma-separated strings or a sequence +expression between a pair of braces, followed by an optional POSTSCRIPT. +The preamble is prefixed to each string contained within the braces, and +the postscript is then appended to each resulting string, expanding left +to right. + + Brace expansions may be nested. The results of each expanded string +are not sorted; left to right order is preserved. For example, + bash$ echo a{d,c,b}e + ade ace abe + + A sequence expression takes the form '{X..Y[..INCR]}', where X and Y +are either integers or single characters, and INCR, an optional +increment, is an integer. When integers are supplied, the expression +expands to each number between X and Y, inclusive. Supplied integers +may be prefixed with '0' to force each term to have the same width. +When either X or Y begins with a zero, the shell attempts to force all +generated terms to contain the same number of digits, zero-padding where +necessary. When characters are supplied, the expression expands to each +character lexicographically between X and Y, inclusive, using the +default C locale. Note that both X and Y must be of the same type. +When the increment is supplied, it is used as the difference between +each term. The default increment is 1 or -1 as appropriate. + + Brace expansion is performed before any other expansions, and any +characters special to other expansions are preserved in the result. It +is strictly textual. Bash does not apply any syntactic interpretation +to the context of the expansion or the text between the braces. + + A correctly-formed brace expansion must contain unquoted opening and +closing braces, and at least one unquoted comma or a valid sequence +expression. Any incorrectly formed brace expansion is left unchanged. + + A { or ',' may be quoted with a backslash to prevent its being +considered part of a brace expression. To avoid conflicts with +parameter expansion, the string '${' is not considered eligible for +brace expansion, and inhibits brace expansion until the closing '}'. + + This construct is typically used as shorthand when the common prefix +of the strings to be generated is longer than in the above example: + mkdir /usr/local/src/bash/{old,new,dist,bugs} + or + chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}} + + +File: bash.info, Node: Tilde Expansion, Next: Shell Parameter Expansion, Prev: Brace Expansion, Up: Shell Expansions + +3.5.2 Tilde Expansion +--------------------- + +If a word begins with an unquoted tilde character ('~'), all of the +characters up to the first unquoted slash (or all characters, if there +is no unquoted slash) are considered a TILDE-PREFIX. If none of the +characters in the tilde-prefix are quoted, the characters in the +tilde-prefix following the tilde are treated as a possible LOGIN NAME. +If this login name is the null string, the tilde is replaced with the +value of the 'HOME' shell variable. If 'HOME' is unset, the home +directory of the user executing the shell is substituted instead. +Otherwise, the tilde-prefix is replaced with the home directory +associated with the specified login name. + + If the tilde-prefix is '~+', the value of the shell variable 'PWD' +replaces the tilde-prefix. If the tilde-prefix is '~-', the value of +the shell variable 'OLDPWD', if it is set, is substituted. + + If the characters following the tilde in the tilde-prefix consist of +a number N, optionally prefixed by a '+' or a '-', the tilde-prefix is +replaced with the corresponding element from the directory stack, as it +would be displayed by the 'dirs' builtin invoked with the characters +following tilde in the tilde-prefix as an argument (*note The Directory +Stack::). If the tilde-prefix, sans the tilde, consists of a number +without a leading '+' or '-', '+' is assumed. + + If the login name is invalid, or the tilde expansion fails, the word +is left unchanged. + + Each variable assignment is checked for unquoted tilde-prefixes +immediately following a ':' or the first '='. In these cases, tilde +expansion is also performed. Consequently, one may use filenames with +tildes in assignments to 'PATH', 'MAILPATH', and 'CDPATH', and the shell +assigns the expanded value. + + The following table shows how Bash treats unquoted tilde-prefixes: + +'~' + The value of '$HOME' +'~/foo' + '$HOME/foo' + +'~fred/foo' + The subdirectory 'foo' of the home directory of the user 'fred' + +'~+/foo' + '$PWD/foo' + +'~-/foo' + '${OLDPWD-'~-'}/foo' + +'~N' + The string that would be displayed by 'dirs +N' + +'~+N' + The string that would be displayed by 'dirs +N' + +'~-N' + The string that would be displayed by 'dirs -N' + + Bash also performs tilde expansion on words satisfying the conditions +of variable assignments (*note Shell Parameters::) when they appear as +arguments to simple commands. Bash does not do this, except for the +DECLARATION commands listed above, when in POSIX mode. + + +File: bash.info, Node: Shell Parameter Expansion, Next: Command Substitution, Prev: Tilde Expansion, Up: Shell Expansions + +3.5.3 Shell Parameter Expansion +------------------------------- + +The '$' character introduces parameter expansion, command substitution, +or arithmetic expansion. The parameter name or symbol to be expanded +may be enclosed in braces, which are optional but serve to protect the +variable to be expanded from characters immediately following it which +could be interpreted as part of the name. + + When braces are used, the matching ending brace is the first '}' not +escaped by a backslash or within a quoted string, and not within an +embedded arithmetic expansion, command substitution, or parameter +expansion. + + The basic form of parameter expansion is ${PARAMETER}. The value of +PARAMETER is substituted. The PARAMETER is a shell parameter as +described above (*note Shell Parameters::) or an array reference (*note +Arrays::). The braces are required when PARAMETER is a positional +parameter with more than one digit, or when PARAMETER is followed by a +character that is not to be interpreted as part of its name. + + If the first character of PARAMETER is an exclamation point (!), and +PARAMETER is not a NAMEREF, it introduces a level of indirection. Bash +uses the value formed by expanding the rest of PARAMETER as the new +PARAMETER; this is then expanded and that value is used in the rest of +the expansion, rather than the expansion of the original PARAMETER. +This is known as 'indirect expansion'. The value is subject to tilde +expansion, parameter expansion, command substitution, and arithmetic +expansion. If PARAMETER is a nameref, this expands to the name of the +variable referenced by PARAMETER instead of performing the complete +indirect expansion. The exceptions to this are the expansions of +${!PREFIX*} and ${!NAME[@]} described below. The exclamation point must +immediately follow the left brace in order to introduce indirection. + + In each of the cases below, WORD is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. + + When not performing substring expansion, using the form described +below (e.g., ':-'), Bash tests for a parameter that is unset or null. +Omitting the colon results in a test only for a parameter that is unset. +Put another way, if the colon is included, the operator tests for both +PARAMETER's existence and that its value is not null; if the colon is +omitted, the operator tests only for existence. + +'${PARAMETER:-WORD}' + If PARAMETER is unset or null, the expansion of WORD is + substituted. Otherwise, the value of PARAMETER is substituted. + +'${PARAMETER:=WORD}' + If PARAMETER is unset or null, the expansion of WORD is assigned to + PARAMETER. The value of PARAMETER is then substituted. Positional + parameters and special parameters may not be assigned to in this + way. + +'${PARAMETER:?WORD}' + If PARAMETER is null or unset, the expansion of WORD (or a message + to that effect if WORD is not present) is written to the standard + error and the shell, if it is not interactive, exits. Otherwise, + the value of PARAMETER is substituted. + +'${PARAMETER:+WORD}' + If PARAMETER is null or unset, nothing is substituted, otherwise + the expansion of WORD is substituted. + +'${PARAMETER:OFFSET}' +'${PARAMETER:OFFSET:LENGTH}' + This is referred to as Substring Expansion. It expands to up to + LENGTH characters of the value of PARAMETER starting at the + character specified by OFFSET. If PARAMETER is '@', an indexed + array subscripted by '@' or '*', or an associative array name, the + results differ as described below. If LENGTH is omitted, it + expands to the substring of the value of PARAMETER starting at the + character specified by OFFSET and extending to the end of the + value. LENGTH and OFFSET are arithmetic expressions (*note Shell + Arithmetic::). + + If OFFSET evaluates to a number less than zero, the value is used + as an offset in characters from the end of the value of PARAMETER. + If LENGTH evaluates to a number less than zero, it is interpreted + as an offset in characters from the end of the value of PARAMETER + rather than a number of characters, and the expansion is the + characters between OFFSET and that result. Note that a negative + offset must be separated from the colon by at least one space to + avoid being confused with the ':-' expansion. + + Here are some examples illustrating substring expansion on + parameters and subscripted arrays: + + $ string=01234567890abcdefgh + $ echo ${string:7} + 7890abcdefgh + $ echo ${string:7:0} + + $ echo ${string:7:2} + 78 + $ echo ${string:7:-2} + 7890abcdef + $ echo ${string: -7} + bcdefgh + $ echo ${string: -7:0} + + $ echo ${string: -7:2} + bc + $ echo ${string: -7:-2} + bcdef + $ set -- 01234567890abcdefgh + $ echo ${1:7} + 7890abcdefgh + $ echo ${1:7:0} + + $ echo ${1:7:2} + 78 + $ echo ${1:7:-2} + 7890abcdef + $ echo ${1: -7} + bcdefgh + $ echo ${1: -7:0} + + $ echo ${1: -7:2} + bc + $ echo ${1: -7:-2} + bcdef + $ array[0]=01234567890abcdefgh + $ echo ${array[0]:7} + 7890abcdefgh + $ echo ${array[0]:7:0} + + $ echo ${array[0]:7:2} + 78 + $ echo ${array[0]:7:-2} + 7890abcdef + $ echo ${array[0]: -7} + bcdefgh + $ echo ${array[0]: -7:0} + + $ echo ${array[0]: -7:2} + bc + $ echo ${array[0]: -7:-2} + bcdef + + If PARAMETER is '@', the result is LENGTH positional parameters + beginning at OFFSET. A negative OFFSET is taken relative to one + greater than the greatest positional parameter, so an offset of -1 + evaluates to the last positional parameter. It is an expansion + error if LENGTH evaluates to a number less than zero. + + The following examples illustrate substring expansion using + positional parameters: + + $ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${@:7} + 7 8 9 0 a b c d e f g h + $ echo ${@:7:0} + + $ echo ${@:7:2} + 7 8 + $ echo ${@:7:-2} + bash: -2: substring expression < 0 + $ echo ${@: -7:2} + b c + $ echo ${@:0} + ./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${@:0:2} + ./bash 1 + $ echo ${@: -7:0} + + + If PARAMETER is an indexed array name subscripted by '@' or '*', + the result is the LENGTH members of the array beginning with + '${PARAMETER[OFFSET]}'. A negative OFFSET is taken relative to one + greater than the maximum index of the specified array. It is an + expansion error if LENGTH evaluates to a number less than zero. + + These examples show how you can use substring expansion with + indexed arrays: + + $ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h) + $ echo ${array[@]:7} + 7 8 9 0 a b c d e f g h + $ echo ${array[@]:7:2} + 7 8 + $ echo ${array[@]: -7:2} + b c + $ echo ${array[@]: -7:-2} + bash: -2: substring expression < 0 + $ echo ${array[@]:0} + 0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${array[@]:0:2} + 0 1 + $ echo ${array[@]: -7:0} + + + Substring expansion applied to an associative array produces + undefined results. + + Substring indexing is zero-based unless the positional parameters + are used, in which case the indexing starts at 1 by default. If + OFFSET is 0, and the positional parameters are used, '$0' is + prefixed to the list. + +'${!PREFIX*}' +'${!PREFIX@}' + Expands to the names of variables whose names begin with PREFIX, + separated by the first character of the 'IFS' special variable. + When '@' is used and the expansion appears within double quotes, + each variable name expands to a separate word. + +'${!NAME[@]}' +'${!NAME[*]}' + If NAME is an array variable, expands to the list of array indices + (keys) assigned in NAME. If NAME is not an array, expands to 0 if + NAME is set and null otherwise. When '@' is used and the expansion + appears within double quotes, each key expands to a separate word. + +'${#PARAMETER}' + The length in characters of the expanded value of PARAMETER is + substituted. If PARAMETER is '*' or '@', the value substituted is + the number of positional parameters. If PARAMETER is an array name + subscripted by '*' or '@', the value substituted is the number of + elements in the array. If PARAMETER is an indexed array name + subscripted by a negative number, that number is interpreted as + relative to one greater than the maximum index of PARAMETER, so + negative indices count back from the end of the array, and an index + of -1 references the last element. + +'${PARAMETER#WORD}' +'${PARAMETER##WORD}' + The WORD is expanded to produce a pattern and matched according to + the rules described below (*note Pattern Matching::). If the + pattern matches the beginning of the expanded value of PARAMETER, + then the result of the expansion is the expanded value of PARAMETER + with the shortest matching pattern (the '#' case) or the longest + matching pattern (the '##' case) deleted. If PARAMETER is '@' or + '*', the pattern removal operation is applied to each positional + parameter in turn, and the expansion is the resultant list. If + PARAMETER is an array variable subscripted with '@' or '*', the + pattern removal operation is applied to each member of the array in + turn, and the expansion is the resultant list. + +'${PARAMETER%WORD}' +'${PARAMETER%%WORD}' + The WORD is expanded to produce a pattern and matched according to + the rules described below (*note Pattern Matching::). If the + pattern matches a trailing portion of the expanded value of + PARAMETER, then the result of the expansion is the value of + PARAMETER with the shortest matching pattern (the '%' case) or the + longest matching pattern (the '%%' case) deleted. If PARAMETER is + '@' or '*', the pattern removal operation is applied to each + positional parameter in turn, and the expansion is the resultant + list. If PARAMETER is an array variable subscripted with '@' or + '*', the pattern removal operation is applied to each member of the + array in turn, and the expansion is the resultant list. + +'${PARAMETER/PATTERN/STRING}' + + The PATTERN is expanded to produce a pattern just as in filename + expansion. PARAMETER is expanded and the longest match of PATTERN + against its value is replaced with STRING. The match is performed + according to the rules described below (*note Pattern Matching::). + If PATTERN begins with '/', all matches of PATTERN are replaced + with STRING. Normally only the first match is replaced. If + PATTERN begins with '#', it must match at the beginning of the + expanded value of PARAMETER. If PATTERN begins with '%', it must + match at the end of the expanded value of PARAMETER. If STRING is + null, matches of PATTERN are deleted and the '/' following PATTERN + may be omitted. If the 'nocasematch' shell option (see the + description of 'shopt' in *note The Shopt Builtin::) is enabled, + the match is performed without regard to the case of alphabetic + characters. If PARAMETER is '@' or '*', the substitution operation + is applied to each positional parameter in turn, and the expansion + is the resultant list. If PARAMETER is an array variable + subscripted with '@' or '*', the substitution operation is applied + to each member of the array in turn, and the expansion is the + resultant list. + +'${PARAMETER^PATTERN}' +'${PARAMETER^^PATTERN}' +'${PARAMETER,PATTERN}' +'${PARAMETER,,PATTERN}' + This expansion modifies the case of alphabetic characters in + PARAMETER. The PATTERN is expanded to produce a pattern just as in + filename expansion. Each character in the expanded value of + PARAMETER is tested against PATTERN, and, if it matches the + pattern, its case is converted. The pattern should not attempt to + match more than one character. The '^' operator converts lowercase + letters matching PATTERN to uppercase; the ',' operator converts + matching uppercase letters to lowercase. The '^^' and ',,' + expansions convert each matched character in the expanded value; + the '^' and ',' expansions match and convert only the first + character in the expanded value. If PATTERN is omitted, it is + treated like a '?', which matches every character. If PARAMETER is + '@' or '*', the case modification operation is applied to each + positional parameter in turn, and the expansion is the resultant + list. If PARAMETER is an array variable subscripted with '@' or + '*', the case modification operation is applied to each member of + the array in turn, and the expansion is the resultant list. + +'${PARAMETER@OPERATOR}' + The expansion is either a transformation of the value of PARAMETER + or information about PARAMETER itself, depending on the value of + OPERATOR. Each OPERATOR is a single letter: + + 'U' + The expansion is a string that is the value of PARAMETER with + lowercase alphabetic characters converted to uppercase. + 'u' + The expansion is a string that is the value of PARAMETER with + the first character converted to uppercase, if it is + alphabetic. + 'L' + The expansion is a string that is the value of PARAMETER with + uppercase alphabetic characters converted to lowercase. + 'Q' + The expansion is a string that is the value of PARAMETER + quoted in a format that can be reused as input. + 'E' + The expansion is a string that is the value of PARAMETER with + backslash escape sequences expanded as with the '$'...'' + quoting mechanism. + 'P' + The expansion is a string that is the result of expanding the + value of PARAMETER as if it were a prompt string (*note + Controlling the Prompt::). + 'A' + The expansion is a string in the form of an assignment + statement or 'declare' command that, if evaluated, will + recreate PARAMETER with its attributes and value. + 'K' + Produces a possibly-quoted version of the value of PARAMETER, + except that it prints the values of indexed and associative + arrays as a sequence of quoted key-value pairs (*note + Arrays::). + 'a' + The expansion is a string consisting of flag values + representing PARAMETER's attributes. + + If PARAMETER is '@' or '*', the operation is applied to each + positional parameter in turn, and the expansion is the resultant + list. If PARAMETER is an array variable subscripted with '@' or + '*', the operation is applied to each member of the array in turn, + and the expansion is the resultant list. + + The result of the expansion is subject to word splitting and + filename expansion as described below. + + +File: bash.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions + +3.5.4 Command Substitution +-------------------------- + +Command substitution allows the output of a command to replace the +command itself. Command substitution occurs when a command is enclosed +as follows: + $(COMMAND) +or + `COMMAND` + +Bash performs the expansion by executing COMMAND in a subshell +environment and replacing the command substitution with the standard +output of the command, with any trailing newlines deleted. Embedded +newlines are not deleted, but they may be removed during word splitting. +The command substitution '$(cat FILE)' can be replaced by the equivalent +but faster '$(< FILE)'. + + When the old-style backquote form of substitution is used, backslash +retains its literal meaning except when followed by '$', '`', or '\'. +The first backquote not preceded by a backslash terminates the command +substitution. When using the '$(COMMAND)' form, all characters between +the parentheses make up the command; none are treated specially. + + Command substitutions may be nested. To nest when using the +backquoted form, escape the inner backquotes with backslashes. + + If the substitution appears within double quotes, word splitting and +filename expansion are not performed on the results. + + +File: bash.info, Node: Arithmetic Expansion, Next: Process Substitution, Prev: Command Substitution, Up: Shell Expansions + +3.5.5 Arithmetic Expansion +-------------------------- + +Arithmetic expansion allows the evaluation of an arithmetic expression +and the substitution of the result. The format for arithmetic expansion +is: + + $(( EXPRESSION )) + + The expression is treated as if it were within double quotes, but a +double quote inside the parentheses is not treated specially. All +tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. The result is treated as the +arithmetic expression to be evaluated. Arithmetic expansions may be +nested. + + The evaluation is performed according to the rules listed below +(*note Shell Arithmetic::). If the expression is invalid, Bash prints a +message indicating failure to the standard error and no substitution +occurs. + + +File: bash.info, Node: Process Substitution, Next: Word Splitting, Prev: Arithmetic Expansion, Up: Shell Expansions + +3.5.6 Process Substitution +-------------------------- + +Process substitution allows a process's input or output to be referred +to using a filename. It takes the form of + <(LIST) +or + >(LIST) +The process LIST is run asynchronously, and its input or output appears +as a filename. This filename is passed as an argument to the current +command as the result of the expansion. If the '>(LIST)' form is used, +writing to the file will provide input for LIST. If the '<(LIST)' form +is used, the file passed as an argument should be read to obtain the +output of LIST. Note that no space may appear between the '<' or '>' +and the left parenthesis, otherwise the construct would be interpreted +as a redirection. Process substitution is supported on systems that +support named pipes (FIFOs) or the '/dev/fd' method of naming open +files. + + When available, process substitution is performed simultaneously with +parameter and variable expansion, command substitution, and arithmetic +expansion. + + +File: bash.info, Node: Word Splitting, Next: Filename Expansion, Prev: Process Substitution, Up: Shell Expansions + +3.5.7 Word Splitting +-------------------- + +The shell scans the results of parameter expansion, command +substitution, and arithmetic expansion that did not occur within double +quotes for word splitting. + + The shell treats each character of '$IFS' as a delimiter, and splits +the results of the other expansions into words using these characters as +field terminators. If 'IFS' is unset, or its value is exactly +'', the default, then sequences of ' ', +'', and '' at the beginning and end of the results of the +previous expansions are ignored, and any sequence of 'IFS' characters +not at the beginning or end serves to delimit words. If 'IFS' has a +value other than the default, then sequences of the whitespace +characters 'space', 'tab', and 'newline' are ignored at the beginning +and end of the word, as long as the whitespace character is in the value +of 'IFS' (an 'IFS' whitespace character). Any character in 'IFS' that +is not 'IFS' whitespace, along with any adjacent 'IFS' whitespace +characters, delimits a field. A sequence of 'IFS' whitespace characters +is also treated as a delimiter. If the value of 'IFS' is null, no word +splitting occurs. + + Explicit null arguments ('""' or '''') are retained and passed to +commands as empty strings. Unquoted implicit null arguments, resulting +from the expansion of parameters that have no values, are removed. If a +parameter with no value is expanded within double quotes, a null +argument results and is retained and passed to a command as an empty +string. When a quoted null argument appears as part of a word whose +expansion is non-null, the null argument is removed. That is, the word +'-d''' becomes '-d' after word splitting and null argument removal. + + Note that if no expansion occurs, no splitting is performed. + + +File: bash.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word Splitting, Up: Shell Expansions + +3.5.8 Filename Expansion +------------------------ + +* Menu: + +* Pattern Matching:: How the shell matches patterns. + +After word splitting, unless the '-f' option has been set (*note The Set +Builtin::), Bash scans each word for the characters '*', '?', and '['. +If one of these characters appears, and is not quoted, then the word is +regarded as a PATTERN, and replaced with an alphabetically sorted list +of filenames matching the pattern (*note Pattern Matching::). If no +matching filenames are found, and the shell option 'nullglob' is +disabled, the word is left unchanged. If the 'nullglob' option is set, +and no matches are found, the word is removed. If the 'failglob' shell +option is set, and no matches are found, an error message is printed and +the command is not executed. If the shell option 'nocaseglob' is +enabled, the match is performed without regard to the case of alphabetic +characters. + + When a pattern is used for filename expansion, the character '.' at +the start of a filename or immediately following a slash must be matched +explicitly, unless the shell option 'dotglob' is set. The filenames '.' +and '..' must always be matched explicitly, even if 'dotglob' is set. +In other cases, the '.' character is not treated specially. + + When matching a filename, the slash character must always be matched +explicitly by a slash in the pattern, but in other matching contexts it +can be matched by a special pattern character as described below (*note +Pattern Matching::). + + See the description of 'shopt' in *note The Shopt Builtin::, for a +description of the 'nocaseglob', 'nullglob', 'failglob', and 'dotglob' +options. + + The 'GLOBIGNORE' shell variable may be used to restrict the set of +file names matching a pattern. If 'GLOBIGNORE' is set, each matching +file name that also matches one of the patterns in 'GLOBIGNORE' is +removed from the list of matches. If the 'nocaseglob' option is set, +the matching against the patterns in 'GLOBIGNORE' is performed without +regard to case. The filenames '.' and '..' are always ignored when +'GLOBIGNORE' is set and not null. However, setting 'GLOBIGNORE' to a +non-null value has the effect of enabling the 'dotglob' shell option, so +all other filenames beginning with a '.' will match. To get the old +behavior of ignoring filenames beginning with a '.', make '.*' one of +the patterns in 'GLOBIGNORE'. The 'dotglob' option is disabled when +'GLOBIGNORE' is unset. + + +File: bash.info, Node: Pattern Matching, Up: Filename Expansion + +3.5.8.1 Pattern Matching +........................ + +Any character that appears in a pattern, other than the special pattern +characters described below, matches itself. The NUL character may not +occur in a pattern. A backslash escapes the following character; the +escaping backslash is discarded when matching. The special pattern +characters must be quoted if they are to be matched literally. + + The special pattern characters have the following meanings: +'*' + Matches any string, including the null string. When the 'globstar' + shell option is enabled, and '*' is used in a filename expansion + context, two adjacent '*'s used as a single pattern will match all + files and zero or more directories and subdirectories. If followed + by a '/', two adjacent '*'s will match only directories and + subdirectories. +'?' + Matches any single character. +'[...]' + Matches any one of the enclosed characters. A pair of characters + separated by a hyphen denotes a RANGE EXPRESSION; any character + that falls between those two characters, inclusive, using the + current locale's collating sequence and character set, is matched. + If the first character following the '[' is a '!' or a '^' then any + character not enclosed is matched. A '-' may be matched by + including it as the first or last character in the set. A ']' may + be matched by including it as the first character in the set. The + sorting order of characters in range expressions is determined by + the current locale and the values of the 'LC_COLLATE' and 'LC_ALL' + shell variables, if set. + + For example, in the default C locale, '[a-dx-z]' is equivalent to + '[abcdxyz]'. Many locales sort characters in dictionary order, and + in these locales '[a-dx-z]' is typically not equivalent to + '[abcdxyz]'; it might be equivalent to '[aBbCcDdxXyYz]', for + example. To obtain the traditional interpretation of ranges in + bracket expressions, you can force the use of the C locale by + setting the 'LC_COLLATE' or 'LC_ALL' environment variable to the + value 'C', or enable the 'globasciiranges' shell option. + + Within '[' and ']', CHARACTER CLASSES can be specified using the + syntax '[:'CLASS':]', where CLASS is one of the following classes + defined in the POSIX standard: + alnum alpha ascii blank cntrl digit graph lower + print punct space upper word xdigit + A character class matches any character belonging to that class. + The 'word' character class matches letters, digits, and the + character '_'. + + Within '[' and ']', an EQUIVALENCE CLASS can be specified using the + syntax '[='C'=]', which matches all characters with the same + collation weight (as defined by the current locale) as the + character C. + + Within '[' and ']', the syntax '[.'SYMBOL'.]' matches the collating + symbol SYMBOL. + + If the 'extglob' shell option is enabled using the 'shopt' builtin, +several extended pattern matching operators are recognized. In the +following description, a PATTERN-LIST is a list of one or more patterns +separated by a '|'. Composite patterns may be formed using one or more +of the following sub-patterns: + +'?(PATTERN-LIST)' + Matches zero or one occurrence of the given patterns. + +'*(PATTERN-LIST)' + Matches zero or more occurrences of the given patterns. + +'+(PATTERN-LIST)' + Matches one or more occurrences of the given patterns. + +'@(PATTERN-LIST)' + Matches one of the given patterns. + +'!(PATTERN-LIST)' + Matches anything except one of the given patterns. + + Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. Using separate matches against shorter +strings, or using arrays of strings instead of a single long string, may +be faster. + + +File: bash.info, Node: Quote Removal, Prev: Filename Expansion, Up: Shell Expansions + +3.5.9 Quote Removal +------------------- + +After the preceding expansions, all unquoted occurrences of the +characters '\', ''', and '"' that did not result from one of the above +expansions are removed. + + +File: bash.info, Node: Redirections, Next: Executing Commands, Prev: Shell Expansions, Up: Basic Shell Features + +3.6 Redirections +================ + +Before a command is executed, its input and output may be REDIRECTED +using a special notation interpreted by the shell. Redirection allows +commands' file handles to be duplicated, opened, closed, made to refer +to different files, and can change the files the command reads from and +writes to. Redirection may also be used to modify file handles in the +current shell execution environment. The following redirection +operators may precede or appear anywhere within a simple command or may +follow a command. Redirections are processed in the order they appear, +from left to right. + + Each redirection that may be preceded by a file descriptor number may +instead be preceded by a word of the form {VARNAME}. In this case, for +each redirection operator except >&- and <&-, the shell will allocate a +file descriptor greater than 10 and assign it to {VARNAME}. If >&- or +<&- is preceded by {VARNAME}, the value of VARNAME defines the file +descriptor to close. If {VARNAME} is supplied, the redirection persists +beyond the scope of the command, allowing the shell programmer to manage +the file descriptor's lifetime manually. + + In the following descriptions, if the file descriptor number is +omitted, and the first character of the redirection operator is '<', the +redirection refers to the standard input (file descriptor 0). If the +first character of the redirection operator is '>', the redirection +refers to the standard output (file descriptor 1). + + The word following the redirection operator in the following +descriptions, unless otherwise noted, is subjected to brace expansion, +tilde expansion, parameter expansion, command substitution, arithmetic +expansion, quote removal, filename expansion, and word splitting. If it +expands to more than one word, Bash reports an error. + + Note that the order of redirections is significant. For example, the +command + ls > DIRLIST 2>&1 +directs both standard output (file descriptor 1) and standard error +(file descriptor 2) to the file DIRLIST, while the command + ls 2>&1 > DIRLIST +directs only the standard output to file DIRLIST, because the standard +error was made a copy of the standard output before the standard output +was redirected to DIRLIST. + + Bash handles several filenames specially when they are used in +redirections, as described in the following table. If the operating +system on which Bash is running provides these special files, bash will +use them; otherwise it will emulate them internally with the behavior +described below. + +'/dev/fd/FD' + If FD is a valid integer, file descriptor FD is duplicated. + +'/dev/stdin' + File descriptor 0 is duplicated. + +'/dev/stdout' + File descriptor 1 is duplicated. + +'/dev/stderr' + File descriptor 2 is duplicated. + +'/dev/tcp/HOST/PORT' + If HOST is a valid hostname or Internet address, and PORT is an + integer port number or service name, Bash attempts to open the + corresponding TCP socket. + +'/dev/udp/HOST/PORT' + If HOST is a valid hostname or Internet address, and PORT is an + integer port number or service name, Bash attempts to open the + corresponding UDP socket. + + A failure to open or create a file causes the redirection to fail. + + Redirections using file descriptors greater than 9 should be used +with care, as they may conflict with file descriptors the shell uses +internally. + +3.6.1 Redirecting Input +----------------------- + +Redirection of input causes the file whose name results from the +expansion of WORD to be opened for reading on file descriptor 'n', or +the standard input (file descriptor 0) if 'n' is not specified. + + The general format for redirecting input is: + [N][|]WORD + + If the redirection operator is '>', and the 'noclobber' option to the +'set' builtin has been enabled, the redirection will fail if the file +whose name results from the expansion of WORD exists and is a regular +file. If the redirection operator is '>|', or the redirection operator +is '>' and the 'noclobber' option is not enabled, the redirection is +attempted even if the file named by WORD exists. + +3.6.3 Appending Redirected Output +--------------------------------- + +Redirection of output in this fashion causes the file whose name results +from the expansion of WORD to be opened for appending on file descriptor +N, or the standard output (file descriptor 1) if N is not specified. If +the file does not exist it is created. + + The general format for appending output is: + [N]>>WORD + +3.6.4 Redirecting Standard Output and Standard Error +---------------------------------------------------- + +This construct allows both the standard output (file descriptor 1) and +the standard error output (file descriptor 2) to be redirected to the +file whose name is the expansion of WORD. + + There are two formats for redirecting standard output and standard +error: + &>WORD +and + >&WORD +Of the two forms, the first is preferred. This is semantically +equivalent to + >WORD 2>&1 + When using the second form, WORD may not expand to a number or '-'. +If it does, other redirection operators apply (see Duplicating File +Descriptors below) for compatibility reasons. + +3.6.5 Appending Standard Output and Standard Error +-------------------------------------------------- + +This construct allows both the standard output (file descriptor 1) and +the standard error output (file descriptor 2) to be appended to the file +whose name is the expansion of WORD. + + The format for appending standard output and standard error is: + &>>WORD +This is semantically equivalent to + >>WORD 2>&1 + (see Duplicating File Descriptors below). + +3.6.6 Here Documents +-------------------- + +This type of redirection instructs the shell to read input from the +current source until a line containing only WORD (with no trailing +blanks) is seen. All of the lines read up to that point are then used +as the standard input (or file descriptor N if N is specified) for a +command. + + The format of here-documents is: + [N]<<[-]WORD + HERE-DOCUMENT + DELIMITER + + No parameter and variable expansion, command substitution, arithmetic +expansion, or filename expansion is performed on WORD. If any part of +WORD is quoted, the DELIMITER is the result of quote removal on WORD, +and the lines in the here-document are not expanded. If WORD is +unquoted, all lines of the here-document are subjected to parameter +expansion, command substitution, and arithmetic expansion, the character +sequence '\newline' is ignored, and '\' must be used to quote the +characters '\', '$', and '`'. + + If the redirection operator is '<<-', then all leading tab characters +are stripped from input lines and the line containing DELIMITER. This +allows here-documents within shell scripts to be indented in a natural +fashion. + +3.6.7 Here Strings +------------------ + +A variant of here documents, the format is: + [N]<<< WORD + + The WORD undergoes tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. Filename +expansion and word splitting are not performed. The result is supplied +as a single string, with a newline appended, to the command on its +standard input (or file descriptor N if N is specified). + +3.6.8 Duplicating File Descriptors +---------------------------------- + +The redirection operator + [N]<&WORD +is used to duplicate input file descriptors. If WORD expands to one or +more digits, the file descriptor denoted by N is made to be a copy of +that file descriptor. If the digits in WORD do not specify a file +descriptor open for input, a redirection error occurs. If WORD +evaluates to '-', file descriptor N is closed. If N is not specified, +the standard input (file descriptor 0) is used. + + The operator + [N]>&WORD +is used similarly to duplicate output file descriptors. If N is not +specified, the standard output (file descriptor 1) is used. If the +digits in WORD do not specify a file descriptor open for output, a +redirection error occurs. If WORD evaluates to '-', file descriptor N +is closed. As a special case, if N is omitted, and WORD does not expand +to one or more digits or '-', the standard output and standard error are +redirected as described previously. + +3.6.9 Moving File Descriptors +----------------------------- + +The redirection operator + [N]<&DIGIT- +moves the file descriptor DIGIT to file descriptor N, or the standard +input (file descriptor 0) if N is not specified. DIGIT is closed after +being duplicated to N. + + Similarly, the redirection operator + [N]>&DIGIT- +moves the file descriptor DIGIT to file descriptor N, or the standard +output (file descriptor 1) if N is not specified. + +3.6.10 Opening File Descriptors for Reading and Writing +------------------------------------------------------- + +The redirection operator + [N]<>WORD +causes the file whose name is the expansion of WORD to be opened for +both reading and writing on file descriptor N, or on file descriptor 0 +if N is not specified. If the file does not exist, it is created. + + +File: bash.info, Node: Executing Commands, Next: Shell Scripts, Prev: Redirections, Up: Basic Shell Features + +3.7 Executing Commands +====================== + +* Menu: + +* Simple Command Expansion:: How Bash expands simple commands before + executing them. +* Command Search and Execution:: How Bash finds commands and runs them. +* Command Execution Environment:: The environment in which Bash + executes commands that are not + shell builtins. +* Environment:: The environment given to a command. +* Exit Status:: The status returned by commands and how Bash + interprets it. +* Signals:: What happens when Bash or a command it runs + receives a signal. + + +File: bash.info, Node: Simple Command Expansion, Next: Command Search and Execution, Up: Executing Commands + +3.7.1 Simple Command Expansion +------------------------------ + +When a simple command is executed, the shell performs the following +expansions, assignments, and redirections, from left to right, in the +following order. + + 1. The words that the parser has marked as variable assignments (those + preceding the command name) and redirections are saved for later + processing. + + 2. The words that are not variable assignments or redirections are + expanded (*note Shell Expansions::). If any words remain after + expansion, the first word is taken to be the name of the command + and the remaining words are the arguments. + + 3. Redirections are performed as described above (*note + Redirections::). + + 4. The text after the '=' in each variable assignment undergoes tilde + expansion, parameter expansion, command substitution, arithmetic + expansion, and quote removal before being assigned to the variable. + + If no command name results, the variable assignments affect the +current shell environment. Otherwise, the variables are added to the +environment of the executed command and do not affect the current shell +environment. If any of the assignments attempts to assign a value to a +readonly variable, an error occurs, and the command exits with a +non-zero status. + + If no command name results, redirections are performed, but do not +affect the current shell environment. A redirection error causes the +command to exit with a non-zero status. + + If there is a command name left after expansion, execution proceeds +as described below. Otherwise, the command exits. If one of the +expansions contained a command substitution, the exit status of the +command is the exit status of the last command substitution performed. +If there were no command substitutions, the command exits with a status +of zero. + + +File: bash.info, Node: Command Search and Execution, Next: Command Execution Environment, Prev: Simple Command Expansion, Up: Executing Commands + +3.7.2 Command Search and Execution +---------------------------------- + +After a command has been split into words, if it results in a simple +command and an optional list of arguments, the following actions are +taken. + + 1. If the command name contains no slashes, the shell attempts to + locate it. If there exists a shell function by that name, that + function is invoked as described in *note Shell Functions::. + + 2. If the name does not match a function, the shell searches for it in + the list of shell builtins. If a match is found, that builtin is + invoked. + + 3. If the name is neither a shell function nor a builtin, and contains + no slashes, Bash searches each element of '$PATH' for a directory + containing an executable file by that name. Bash uses a hash table + to remember the full pathnames of executable files to avoid + multiple 'PATH' searches (see the description of 'hash' in *note + Bourne Shell Builtins::). A full search of the directories in + '$PATH' is performed only if the command is not found in the hash + table. If the search is unsuccessful, the shell searches for a + defined shell function named 'command_not_found_handle'. If that + function exists, it is invoked in a separate execution environment + with the original command and the original command's arguments as + its arguments, and the function's exit status becomes the exit + status of that subshell. If that function is not defined, the + shell prints an error message and returns an exit status of 127. + + 4. If the search is successful, or if the command name contains one or + more slashes, the shell executes the named program in a separate + execution environment. Argument 0 is set to the name given, and + the remaining arguments to the command are set to the arguments + supplied, if any. + + 5. If this execution fails because the file is not in executable + format, and the file is not a directory, it is assumed to be a + SHELL SCRIPT and the shell executes it as described in *note Shell + Scripts::. + + 6. If the command was not begun asynchronously, the shell waits for + the command to complete and collects its exit status. + + +File: bash.info, Node: Command Execution Environment, Next: Environment, Prev: Command Search and Execution, Up: Executing Commands + +3.7.3 Command Execution Environment +----------------------------------- + +The shell has an EXECUTION ENVIRONMENT, which consists of the following: + + * open files inherited by the shell at invocation, as modified by + redirections supplied to the 'exec' builtin + + * the current working directory as set by 'cd', 'pushd', or 'popd', + or inherited by the shell at invocation + + * the file creation mode mask as set by 'umask' or inherited from the + shell's parent + + * current traps set by 'trap' + + * shell parameters that are set by variable assignment or with 'set' + or inherited from the shell's parent in the environment + + * shell functions defined during execution or inherited from the + shell's parent in the environment + + * options enabled at invocation (either by default or with + command-line arguments) or by 'set' + + * options enabled by 'shopt' (*note The Shopt Builtin::) + + * shell aliases defined with 'alias' (*note Aliases::) + + * various process IDs, including those of background jobs (*note + Lists::), the value of '$$', and the value of '$PPID' + + When a simple command other than a builtin or shell function is to be +executed, it is invoked in a separate execution environment that +consists of the following. Unless otherwise noted, the values are +inherited from the shell. + + * the shell's open files, plus any modifications and additions + specified by redirections to the command + + * the current working directory + + * the file creation mode mask + + * shell variables and functions marked for export, along with + variables exported for the command, passed in the environment + (*note Environment::) + + * traps caught by the shell are reset to the values inherited from + the shell's parent, and traps ignored by the shell are ignored + + A command invoked in this separate environment cannot affect the +shell's execution environment. + + Command substitution, commands grouped with parentheses, and +asynchronous commands are invoked in a subshell environment that is a +duplicate of the shell environment, except that traps caught by the +shell are reset to the values that the shell inherited from its parent +at invocation. Builtin commands that are invoked as part of a pipeline +are also executed in a subshell environment. Changes made to the +subshell environment cannot affect the shell's execution environment. + + Subshells spawned to execute command substitutions inherit the value +of the '-e' option from the parent shell. When not in POSIX mode, Bash +clears the '-e' option in such subshells. + + If a command is followed by a '&' and job control is not active, the +default standard input for the command is the empty file '/dev/null'. +Otherwise, the invoked command inherits the file descriptors of the +calling shell as modified by redirections. + + +File: bash.info, Node: Environment, Next: Exit Status, Prev: Command Execution Environment, Up: Executing Commands + +3.7.4 Environment +----------------- + +When a program is invoked it is given an array of strings called the +ENVIRONMENT. This is a list of name-value pairs, of the form +'name=value'. + + Bash provides several ways to manipulate the environment. On +invocation, the shell scans its own environment and creates a parameter +for each name found, automatically marking it for EXPORT to child +processes. Executed commands inherit the environment. The 'export' and +'declare -x' commands allow parameters and functions to be added to and +deleted from the environment. If the value of a parameter in the +environment is modified, the new value becomes part of the environment, +replacing the old. The environment inherited by any executed command +consists of the shell's initial environment, whose values may be +modified in the shell, less any pairs removed by the 'unset' and 'export +-n' commands, plus any additions via the 'export' and 'declare -x' +commands. + + The environment for any simple command or function may be augmented +temporarily by prefixing it with parameter assignments, as described in +*note Shell Parameters::. These assignment statements affect only the +environment seen by that command. + + If the '-k' option is set (*note The Set Builtin::), then all +parameter assignments are placed in the environment for a command, not +just those that precede the command name. + + When Bash invokes an external command, the variable '$_' is set to +the full pathname of the command and passed to that command in its +environment. + + +File: bash.info, Node: Exit Status, Next: Signals, Prev: Environment, Up: Executing Commands + +3.7.5 Exit Status +----------------- + +The exit status of an executed command is the value returned by the +WAITPID system call or equivalent function. Exit statuses fall between +0 and 255, though, as explained below, the shell may use values above +125 specially. Exit statuses from shell builtins and compound commands +are also limited to this range. Under certain circumstances, the shell +will use special values to indicate specific failure modes. + + For the shell's purposes, a command which exits with a zero exit +status has succeeded. A non-zero exit status indicates failure. This +seemingly counter-intuitive scheme is used so there is one well-defined +way to indicate success and a variety of ways to indicate various +failure modes. When a command terminates on a fatal signal whose number +is N, Bash uses the value 128+N as the exit status. + + If a command is not found, the child process created to execute it +returns a status of 127. If a command is found but is not executable, +the return status is 126. + + If a command fails because of an error during expansion or +redirection, the exit status is greater than zero. + + The exit status is used by the Bash conditional commands (*note +Conditional Constructs::) and some of the list constructs (*note +Lists::). + + All of the Bash builtins return an exit status of zero if they +succeed and a non-zero status on failure, so they may be used by the +conditional and list constructs. All builtins return an exit status of +2 to indicate incorrect usage, generally invalid options or missing +arguments. + + +File: bash.info, Node: Signals, Prev: Exit Status, Up: Executing Commands + +3.7.6 Signals +------------- + +When Bash is interactive, in the absence of any traps, it ignores +'SIGTERM' (so that 'kill 0' does not kill an interactive shell), and +'SIGINT' is caught and handled (so that the 'wait' builtin is +interruptible). When Bash receives a 'SIGINT', it breaks out of any +executing loops. In all cases, Bash ignores 'SIGQUIT'. If job control +is in effect (*note Job Control::), Bash ignores 'SIGTTIN', 'SIGTTOU', +and 'SIGTSTP'. + + Non-builtin commands started by Bash have signal handlers set to the +values inherited by the shell from its parent. When job control is not +in effect, asynchronous commands ignore 'SIGINT' and 'SIGQUIT' in +addition to these inherited handlers. Commands run as a result of +command substitution ignore the keyboard-generated job control signals +'SIGTTIN', 'SIGTTOU', and 'SIGTSTP'. + + The shell exits by default upon receipt of a 'SIGHUP'. Before +exiting, an interactive shell resends the 'SIGHUP' to all jobs, running +or stopped. Stopped jobs are sent 'SIGCONT' to ensure that they receive +the 'SIGHUP'. To prevent the shell from sending the 'SIGHUP' signal to +a particular job, it should be removed from the jobs table with the +'disown' builtin (*note Job Control Builtins::) or marked to not receive +'SIGHUP' using 'disown -h'. + + If the 'huponexit' shell option has been set with 'shopt' (*note The +Shopt Builtin::), Bash sends a 'SIGHUP' to all jobs when an interactive +login shell exits. + + If Bash is waiting for a command to complete and receives a signal +for which a trap has been set, the trap will not be executed until the +command completes. When Bash is waiting for an asynchronous command via +the 'wait' builtin, the reception of a signal for which a trap has been +set will cause the 'wait' builtin to return immediately with an exit +status greater than 128, immediately after which the trap is executed. + + +File: bash.info, Node: Shell Scripts, Prev: Executing Commands, Up: Basic Shell Features + +3.8 Shell Scripts +================= + +A shell script is a text file containing shell commands. When such a +file is used as the first non-option argument when invoking Bash, and +neither the '-c' nor '-s' option is supplied (*note Invoking Bash::), +Bash reads and executes commands from the file, then exits. This mode +of operation creates a non-interactive shell. The shell first searches +for the file in the current directory, and looks in the directories in +'$PATH' if not found there. + + When Bash runs a shell script, it sets the special parameter '0' to +the name of the file, rather than the name of the shell, and the +positional parameters are set to the remaining arguments, if any are +given. If no additional arguments are supplied, the positional +parameters are unset. + + A shell script may be made executable by using the 'chmod' command to +turn on the execute bit. When Bash finds such a file while searching +the '$PATH' for a command, it spawns a subshell to execute it. In other +words, executing + filename ARGUMENTS +is equivalent to executing + bash filename ARGUMENTS + +if 'filename' is an executable shell script. This subshell +reinitializes itself, so that the effect is as if a new shell had been +invoked to interpret the script, with the exception that the locations +of commands remembered by the parent (see the description of 'hash' in +*note Bourne Shell Builtins::) are retained by the child. + + Most versions of Unix make this a part of the operating system's +command execution mechanism. If the first line of a script begins with +the two characters '#!', the remainder of the line specifies an +interpreter for the program and, depending on the operating system, one +or more optional arguments for that interpreter. Thus, you can specify +Bash, 'awk', Perl, or some other interpreter and write the rest of the +script file in that language. + + The arguments to the interpreter consist of one or more optional +arguments following the interpreter name on the first line of the script +file, followed by the name of the script file, followed by the rest of +the arguments supplied to the script. The details of how the +interpreter line is split into an interpreter name and a set of +arguments vary across systems. Bash will perform this action on +operating systems that do not handle it themselves. Note that some +older versions of Unix limit the interpreter name and a single argument +to a maximum of 32 characters, so it's not portable to assume that using +more than one argument will work. + + Bash scripts often begin with '#! /bin/bash' (assuming that Bash has +been installed in '/bin'), since this ensures that Bash will be used to +interpret the script, even if it is executed under another shell. It's +a common idiom to use 'env' to find 'bash' even if it's been installed +in another directory: '#!/usr/bin/env bash' will find the first +occurrence of 'bash' in '$PATH'. + + +File: bash.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev: Basic Shell Features, Up: Top + +4 Shell Builtin Commands +************************ + +* Menu: + +* Bourne Shell Builtins:: Builtin commands inherited from the Bourne + Shell. +* Bash Builtins:: Table of builtins specific to Bash. +* Modifying Shell Behavior:: Builtins to modify shell attributes and + optional behavior. +* Special Builtins:: Builtin commands classified specially by + POSIX. + +Builtin commands are contained within the shell itself. When the name +of a builtin command is used as the first word of a simple command +(*note Simple Commands::), the shell executes the command directly, +without invoking another program. Builtin commands are necessary to +implement functionality impossible or inconvenient to obtain with +separate utilities. + + This section briefly describes the builtins which Bash inherits from +the Bourne Shell, as well as the builtin commands which are unique to or +have been extended in Bash. + + Several builtin commands are described in other chapters: builtin +commands which provide the Bash interface to the job control facilities +(*note Job Control Builtins::), the directory stack (*note Directory +Stack Builtins::), the command history (*note Bash History Builtins::), +and the programmable completion facilities (*note Programmable +Completion Builtins::). + + Many of the builtins have been extended by POSIX or Bash. + + Unless otherwise noted, each builtin command documented as accepting +options preceded by '-' accepts '--' to signify the end of the options. +The ':', 'true', 'false', and 'test'/'[' builtins do not accept options +and do not treat '--' specially. The 'exit', 'logout', 'return', +'break', 'continue', 'let', and 'shift' builtins accept and process +arguments beginning with '-' without requiring '--'. Other builtins +that accept arguments but are not specified as accepting options +interpret arguments beginning with '-' as invalid options and require +'--' to prevent this interpretation. + + +File: bash.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: Shell Builtin Commands + +4.1 Bourne Shell Builtins +========================= + +The following shell builtin commands are inherited from the Bourne +Shell. These commands are implemented as specified by the POSIX +standard. + +': (a colon)' + : [ARGUMENTS] + + Do nothing beyond expanding ARGUMENTS and performing redirections. + The return status is zero. + +'. (a period)' + . FILENAME [ARGUMENTS] + + Read and execute commands from the FILENAME argument in the current + shell context. If FILENAME does not contain a slash, the 'PATH' + variable is used to find FILENAME. When Bash is not in POSIX mode, + the current directory is searched if FILENAME is not found in + '$PATH'. If any ARGUMENTS are supplied, they become the positional + parameters when FILENAME is executed. Otherwise the positional + parameters are unchanged. If the '-T' option is enabled, 'source' + inherits any trap on 'DEBUG'; if it is not, any 'DEBUG' trap string + is saved and restored around the call to 'source', and 'source' + unsets the 'DEBUG' trap while it executes. If '-T' is not set, and + the sourced file changes the 'DEBUG' trap, the new value is + retained when 'source' completes. The return status is the exit + status of the last command executed, or zero if no commands are + executed. If FILENAME is not found, or cannot be read, the return + status is non-zero. This builtin is equivalent to 'source'. + +'break' + break [N] + + Exit from a 'for', 'while', 'until', or 'select' loop. If N is + supplied, the Nth enclosing loop is exited. N must be greater than + or equal to 1. The return status is zero unless N is not greater + than or equal to 1. + +'cd' + cd [-L|[-P [-e]] [-@] [DIRECTORY] + + Change the current working directory to DIRECTORY. If DIRECTORY is + not supplied, the value of the 'HOME' shell variable is used. Any + additional arguments following DIRECTORY are ignored. If the shell + variable 'CDPATH' exists, it is used as a search path: each + directory name in 'CDPATH' is searched for DIRECTORY, with + alternative directory names in 'CDPATH' separated by a colon (':'). + If DIRECTORY begins with a slash, 'CDPATH' is not used. + + The '-P' option means to not follow symbolic links: symbolic links + are resolved while 'cd' is traversing DIRECTORY and before + processing an instance of '..' in DIRECTORY. + + By default, or when the '-L' option is supplied, symbolic links in + DIRECTORY are resolved after 'cd' processes an instance of '..' in + DIRECTORY. + + If '..' appears in DIRECTORY, it is processed by removing the + immediately preceding pathname component, back to a slash or the + beginning of DIRECTORY. + + If the '-e' option is supplied with '-P' and the current working + directory cannot be successfully determined after a successful + directory change, 'cd' will return an unsuccessful status. + + On systems that support it, the '-@' option presents the extended + attributes associated with a file as a directory. + + If DIRECTORY is '-', it is converted to '$OLDPWD' before the + directory change is attempted. + + If a non-empty directory name from 'CDPATH' is used, or if '-' is + the first argument, and the directory change is successful, the + absolute pathname of the new working directory is written to the + standard output. + + The return status is zero if the directory is successfully changed, + non-zero otherwise. + +'continue' + continue [N] + + Resume the next iteration of an enclosing 'for', 'while', 'until', + or 'select' loop. If N is supplied, the execution of the Nth + enclosing loop is resumed. N must be greater than or equal to 1. + The return status is zero unless N is not greater than or equal to + 1. + +'eval' + eval [ARGUMENTS] + + The arguments are concatenated together into a single command, + which is then read and executed, and its exit status returned as + the exit status of 'eval'. If there are no arguments or only empty + arguments, the return status is zero. + +'exec' + exec [-cl] [-a NAME] [COMMAND [ARGUMENTS]] + + If COMMAND is supplied, it replaces the shell without creating a + new process. If the '-l' option is supplied, the shell places a + dash at the beginning of the zeroth argument passed to COMMAND. + This is what the 'login' program does. The '-c' option causes + COMMAND to be executed with an empty environment. If '-a' is + supplied, the shell passes NAME as the zeroth argument to COMMAND. + If COMMAND cannot be executed for some reason, a non-interactive + shell exits, unless the 'execfail' shell option is enabled. In + that case, it returns failure. An interactive shell returns + failure if the file cannot be executed. A subshell exits + unconditionally if 'exec' fails. If no COMMAND is specified, + redirections may be used to affect the current shell environment. + If there are no redirection errors, the return status is zero; + otherwise the return status is non-zero. + +'exit' + exit [N] + + Exit the shell, returning a status of N to the shell's parent. If + N is omitted, the exit status is that of the last command executed. + Any trap on 'EXIT' is executed before the shell terminates. + +'export' + export [-fn] [-p] [NAME[=VALUE]] + + Mark each NAME to be passed to child processes in the environment. + If the '-f' option is supplied, the NAMEs refer to shell functions; + otherwise the names refer to shell variables. The '-n' option + means to no longer mark each NAME for export. If no NAMES are + supplied, or if the '-p' option is given, a list of names of all + exported variables is displayed. The '-p' option displays output + in a form that may be reused as input. If a variable name is + followed by =VALUE, the value of the variable is set to VALUE. + + The return status is zero unless an invalid option is supplied, one + of the names is not a valid shell variable name, or '-f' is + supplied with a name that is not a shell function. + +'getopts' + getopts OPTSTRING NAME [ARG ...] + + 'getopts' is used by shell scripts to parse positional parameters. + OPTSTRING contains the option characters to be recognized; if a + character is followed by a colon, the option is expected to have an + argument, which should be separated from it by whitespace. The + colon (':') and question mark ('?') may not be used as option + characters. Each time it is invoked, 'getopts' places the next + option in the shell variable NAME, initializing NAME if it does not + exist, and the index of the next argument to be processed into the + variable 'OPTIND'. 'OPTIND' is initialized to 1 each time the + shell or a shell script is invoked. When an option requires an + argument, 'getopts' places that argument into the variable + 'OPTARG'. The shell does not reset 'OPTIND' automatically; it must + be manually reset between multiple calls to 'getopts' within the + same shell invocation if a new set of parameters is to be used. + + When the end of options is encountered, 'getopts' exits with a + return value greater than zero. 'OPTIND' is set to the index of + the first non-option argument, and NAME is set to '?'. + + 'getopts' normally parses the positional parameters, but if more + arguments are supplied as ARG values, 'getopts' parses those + instead. + + 'getopts' can report errors in two ways. If the first character of + OPTSTRING is a colon, SILENT error reporting is used. In normal + operation, diagnostic messages are printed when invalid options or + missing option arguments are encountered. If the variable 'OPTERR' + is set to 0, no error messages will be displayed, even if the first + character of 'optstring' is not a colon. + + If an invalid option is seen, 'getopts' places '?' into NAME and, + if not silent, prints an error message and unsets 'OPTARG'. If + 'getopts' is silent, the option character found is placed in + 'OPTARG' and no diagnostic message is printed. + + If a required argument is not found, and 'getopts' is not silent, a + question mark ('?') is placed in NAME, 'OPTARG' is unset, and a + diagnostic message is printed. If 'getopts' is silent, then a + colon (':') is placed in NAME and 'OPTARG' is set to the option + character found. + +'hash' + hash [-r] [-p FILENAME] [-dt] [NAME] + + Each time 'hash' is invoked, it remembers the full pathnames of the + commands specified as NAME arguments, so they need not be searched + for on subsequent invocations. The commands are found by searching + through the directories listed in '$PATH'. Any + previously-remembered pathname is discarded. The '-p' option + inhibits the path search, and FILENAME is used as the location of + NAME. The '-r' option causes the shell to forget all remembered + locations. The '-d' option causes the shell to forget the + remembered location of each NAME. If the '-t' option is supplied, + the full pathname to which each NAME corresponds is printed. If + multiple NAME arguments are supplied with '-t', the NAME is printed + before the hashed full pathname. The '-l' option causes output to + be displayed in a format that may be reused as input. If no + arguments are given, or if only '-l' is supplied, information about + remembered commands is printed. The return status is zero unless a + NAME is not found or an invalid option is supplied. + +'pwd' + pwd [-LP] + + Print the absolute pathname of the current working directory. If + the '-P' option is supplied, the pathname printed will not contain + symbolic links. If the '-L' option is supplied, the pathname + printed may contain symbolic links. The return status is zero + unless an error is encountered while determining the name of the + current directory or an invalid option is supplied. + +'readonly' + readonly [-aAf] [-p] [NAME[=VALUE]] ... + + Mark each NAME as readonly. The values of these names may not be + changed by subsequent assignment. If the '-f' option is supplied, + each NAME refers to a shell function. The '-a' option means each + NAME refers to an indexed array variable; the '-A' option means + each NAME refers to an associative array variable. If both options + are supplied, '-A' takes precedence. If no NAME arguments are + given, or if the '-p' option is supplied, a list of all readonly + names is printed. The other options may be used to restrict the + output to a subset of the set of readonly names. The '-p' option + causes output to be displayed in a format that may be reused as + input. If a variable name is followed by =VALUE, the value of the + variable is set to VALUE. The return status is zero unless an + invalid option is supplied, one of the NAME arguments is not a + valid shell variable or function name, or the '-f' option is + supplied with a name that is not a shell function. + +'return' + return [N] + + Cause a shell function to stop executing and return the value N to + its caller. If N is not supplied, the return value is the exit + status of the last command executed in the function. If 'return' + is executed by a trap handler, the last command used to determine + the status is the last command executed before the trap handler. + If 'return' is executed during a 'DEBUG' trap, the last command + used to determine the status is the last command executed by the + trap handler before 'return' was invoked. 'return' may also be + used to terminate execution of a script being executed with the '.' + ('source') builtin, returning either N or the exit status of the + last command executed within the script as the exit status of the + script. If N is supplied, the return value is its least + significant 8 bits. Any command associated with the 'RETURN' trap + is executed before execution resumes after the function or script. + The return status is non-zero if 'return' is supplied a non-numeric + argument or is used outside a function and not during the execution + of a script by '.' or 'source'. + +'shift' + shift [N] + + Shift the positional parameters to the left by N. The positional + parameters from N+1 ... '$#' are renamed to '$1' ... '$#'-N. + Parameters represented by the numbers '$#' down to '$#'-N+1 are + unset. N must be a non-negative number less than or equal to '$#'. + If N is zero or greater than '$#', the positional parameters are + not changed. If N is not supplied, it is assumed to be 1. The + return status is zero unless N is greater than '$#' or less than + zero, non-zero otherwise. + +'test' +'[' + test EXPR + + Evaluate a conditional expression EXPR and return a status of 0 + (true) or 1 (false). Each operator and operand must be a separate + argument. Expressions are composed of the primaries described + below in *note Bash Conditional Expressions::. 'test' does not + accept any options, nor does it accept and ignore an argument of + '--' as signifying the end of options. + + When the '[' form is used, the last argument to the command must be + a ']'. + + Expressions may be combined using the following operators, listed + in decreasing order of precedence. The evaluation depends on the + number of arguments; see below. Operator precedence is used when + there are five or more arguments. + + '! EXPR' + True if EXPR is false. + + '( EXPR )' + Returns the value of EXPR. This may be used to override the + normal precedence of operators. + + 'EXPR1 -a EXPR2' + True if both EXPR1 and EXPR2 are true. + + 'EXPR1 -o EXPR2' + True if either EXPR1 or EXPR2 is true. + + The 'test' and '[' builtins evaluate conditional expressions using + a set of rules based on the number of arguments. + + 0 arguments + The expression is false. + + 1 argument + The expression is true if, and only if, the argument is not + null. + + 2 arguments + If the first argument is '!', the expression is true if and + only if the second argument is null. If the first argument is + one of the unary conditional operators (*note Bash Conditional + Expressions::), the expression is true if the unary test is + true. If the first argument is not a valid unary operator, + the expression is false. + + 3 arguments + The following conditions are applied in the order listed. + + 1. If the second argument is one of the binary conditional + operators (*note Bash Conditional Expressions::), the + result of the expression is the result of the binary test + using the first and third arguments as operands. The + '-a' and '-o' operators are considered binary operators + when there are three arguments. + 2. If the first argument is '!', the value is the negation + of the two-argument test using the second and third + arguments. + 3. If the first argument is exactly '(' and the third + argument is exactly ')', the result is the one-argument + test of the second argument. + 4. Otherwise, the expression is false. + + 4 arguments + If the first argument is '!', the result is the negation of + the three-argument expression composed of the remaining + arguments. Otherwise, the expression is parsed and evaluated + according to precedence using the rules listed above. + + 5 or more arguments + The expression is parsed and evaluated according to precedence + using the rules listed above. + + When used with 'test' or '[', the '<' and '>' operators sort + lexicographically using ASCII ordering. + +'times' + times + + Print out the user and system times used by the shell and its + children. The return status is zero. + +'trap' + trap [-lp] [ARG] [SIGSPEC ...] + + The commands in ARG are to be read and executed when the shell + receives signal SIGSPEC. If ARG is absent (and there is a single + SIGSPEC) or equal to '-', each specified signal's disposition is + reset to the value it had when the shell was started. If ARG is + the null string, then the signal specified by each SIGSPEC is + ignored by the shell and commands it invokes. If ARG is not + present and '-p' has been supplied, the shell displays the trap + commands associated with each SIGSPEC. If no arguments are + supplied, or only '-p' is given, 'trap' prints the list of commands + associated with each signal number in a form that may be reused as + shell input. The '-l' option causes the shell to print a list of + signal names and their corresponding numbers. Each SIGSPEC is + either a signal name or a signal number. Signal names are case + insensitive and the 'SIG' prefix is optional. + + If a SIGSPEC is '0' or 'EXIT', ARG is executed when the shell + exits. If a SIGSPEC is 'DEBUG', the command ARG is executed before + every simple command, 'for' command, 'case' command, 'select' + command, every arithmetic 'for' command, and before the first + command executes in a shell function. Refer to the description of + the 'extdebug' option to the 'shopt' builtin (*note The Shopt + Builtin::) for details of its effect on the 'DEBUG' trap. If a + SIGSPEC is 'RETURN', the command ARG is executed each time a shell + function or a script executed with the '.' or 'source' builtins + finishes executing. + + If a SIGSPEC is 'ERR', the command ARG is executed whenever a + pipeline (which may consist of a single simple command), a list, or + a compound command returns a non-zero exit status, subject to the + following conditions. The 'ERR' trap is not executed if the failed + command is part of the command list immediately following an + 'until' or 'while' keyword, part of the test following the 'if' or + 'elif' reserved words, part of a command executed in a '&&' or '||' + list except the command following the final '&&' or '||', any + command in a pipeline but the last, or if the command's return + status is being inverted using '!'. These are the same conditions + obeyed by the 'errexit' ('-e') option. + + Signals ignored upon entry to the shell cannot be trapped or reset. + Trapped signals that are not being ignored are reset to their + original values in a subshell or subshell environment when one is + created. + + The return status is zero unless a SIGSPEC does not specify a valid + signal. + +'umask' + umask [-p] [-S] [MODE] + + Set the shell process's file creation mask to MODE. If MODE begins + with a digit, it is interpreted as an octal number; if not, it is + interpreted as a symbolic mode mask similar to that accepted by the + 'chmod' command. If MODE is omitted, the current value of the mask + is printed. If the '-S' option is supplied without a MODE + argument, the mask is printed in a symbolic format. If the '-p' + option is supplied, and MODE is omitted, the output is in a form + that may be reused as input. The return status is zero if the mode + is successfully changed or if no MODE argument is supplied, and + non-zero otherwise. + + Note that when the mode is interpreted as an octal number, each + number of the umask is subtracted from '7'. Thus, a umask of '022' + results in permissions of '755'. + +'unset' + unset [-fnv] [NAME] + + Remove each variable or function NAME. If the '-v' option is + given, each NAME refers to a shell variable and that variable is + removed. If the '-f' option is given, the NAMEs refer to shell + functions, and the function definition is removed. If the '-n' + option is supplied, and NAME is a variable with the NAMEREF + attribute, NAME will be unset rather than the variable it + references. '-n' has no effect if the '-f' option is supplied. If + no options are supplied, each NAME refers to a variable; if there + is no variable by that name, a function with that name, if any, is + unset. Readonly variables and functions may not be unset. Some + shell variables lose their special behavior if they are unset; such + behavior is noted in the description of the individual variables. + The return status is zero unless a NAME is readonly. + + +File: bash.info, Node: Bash Builtins, Next: Modifying Shell Behavior, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands + +4.2 Bash Builtin Commands +========================= + +This section describes builtin commands which are unique to or have been +extended in Bash. Some of these commands are specified in the POSIX +standard. + +'alias' + alias [-p] [NAME[=VALUE] ...] + + Without arguments or with the '-p' option, 'alias' prints the list + of aliases on the standard output in a form that allows them to be + reused as input. If arguments are supplied, an alias is defined + for each NAME whose VALUE is given. If no VALUE is given, the name + and value of the alias is printed. Aliases are described in *note + Aliases::. + +'bind' + bind [-m KEYMAP] [-lpsvPSVX] + bind [-m KEYMAP] [-q FUNCTION] [-u FUNCTION] [-r KEYSEQ] + bind [-m KEYMAP] -f FILENAME + bind [-m KEYMAP] -x KEYSEQ:SHELL-COMMAND + bind [-m KEYMAP] KEYSEQ:FUNCTION-NAME + bind [-m KEYMAP] KEYSEQ:READLINE-COMMAND + + Display current Readline (*note Command Line Editing::) key and + function bindings, bind a key sequence to a Readline function or + macro, or set a Readline variable. Each non-option argument is a + command as it would appear in a Readline initialization file (*note + Readline Init File::), but each binding or command must be passed + as a separate argument; e.g., '"\C-x\C-r":re-read-init-file'. + + Options, if supplied, have the following meanings: + + '-m KEYMAP' + Use KEYMAP as the keymap to be affected by the subsequent + bindings. Acceptable KEYMAP names are 'emacs', + 'emacs-standard', 'emacs-meta', 'emacs-ctlx', 'vi', 'vi-move', + 'vi-command', and 'vi-insert'. 'vi' is equivalent to + 'vi-command' ('vi-move' is also a synonym); 'emacs' is + equivalent to 'emacs-standard'. + + '-l' + List the names of all Readline functions. + + '-p' + Display Readline function names and bindings in such a way + that they can be used as input or in a Readline initialization + file. + + '-P' + List current Readline function names and bindings. + + '-v' + Display Readline variable names and values in such a way that + they can be used as input or in a Readline initialization + file. + + '-V' + List current Readline variable names and values. + + '-s' + Display Readline key sequences bound to macros and the strings + they output in such a way that they can be used as input or in + a Readline initialization file. + + '-S' + Display Readline key sequences bound to macros and the strings + they output. + + '-f FILENAME' + Read key bindings from FILENAME. + + '-q FUNCTION' + Query about which keys invoke the named FUNCTION. + + '-u FUNCTION' + Unbind all keys bound to the named FUNCTION. + + '-r KEYSEQ' + Remove any current binding for KEYSEQ. + + '-x KEYSEQ:SHELL-COMMAND' + Cause SHELL-COMMAND to be executed whenever KEYSEQ is entered. + When SHELL-COMMAND is executed, the shell sets the + 'READLINE_LINE' variable to the contents of the Readline line + buffer and the 'READLINE_POINT' and 'READLINE_MARK' variables + to the current location of the insertion point and the saved + insertion point (the MARK), respectively. If the executed + command changes the value of any of 'READLINE_LINE', + 'READLINE_POINT', or 'READLINE_MARK', those new values will be + reflected in the editing state. + + '-X' + List all key sequences bound to shell commands and the + associated commands in a format that can be reused as input. + + The return status is zero unless an invalid option is supplied or + an error occurs. + +'builtin' + builtin [SHELL-BUILTIN [ARGS]] + + Run a shell builtin, passing it ARGS, and return its exit status. + This is useful when defining a shell function with the same name as + a shell builtin, retaining the functionality of the builtin within + the function. The return status is non-zero if SHELL-BUILTIN is + not a shell builtin command. + +'caller' + caller [EXPR] + + Returns the context of any active subroutine call (a shell function + or a script executed with the '.' or 'source' builtins). + + Without EXPR, 'caller' displays the line number and source filename + of the current subroutine call. If a non-negative integer is + supplied as EXPR, 'caller' displays the line number, subroutine + name, and source file corresponding to that position in the current + execution call stack. This extra information may be used, for + example, to print a stack trace. The current frame is frame 0. + + The return value is 0 unless the shell is not executing a + subroutine call or EXPR does not correspond to a valid position in + the call stack. + +'command' + command [-pVv] COMMAND [ARGUMENTS ...] + + Runs COMMAND with ARGUMENTS ignoring any shell function named + COMMAND. Only shell builtin commands or commands found by + searching the 'PATH' are executed. If there is a shell function + named 'ls', running 'command ls' within the function will execute + the external command 'ls' instead of calling the function + recursively. The '-p' option means to use a default value for + 'PATH' that is guaranteed to find all of the standard utilities. + The return status in this case is 127 if COMMAND cannot be found or + an error occurred, and the exit status of COMMAND otherwise. + + If either the '-V' or '-v' option is supplied, a description of + COMMAND is printed. The '-v' option causes a single word + indicating the command or file name used to invoke COMMAND to be + displayed; the '-V' option produces a more verbose description. In + this case, the return status is zero if COMMAND is found, and + non-zero if not. + +'declare' + declare [-aAfFgiIlnrtux] [-p] [NAME[=VALUE] ...] + + Declare variables and give them attributes. If no NAMEs are given, + then display the values of variables instead. + + The '-p' option will display the attributes and values of each + NAME. When '-p' is used with NAME arguments, additional options, + other than '-f' and '-F', are ignored. + + When '-p' is supplied without NAME arguments, 'declare' will + display the attributes and values of all variables having the + attributes specified by the additional options. If no other + options are supplied with '-p', 'declare' will display the + attributes and values of all shell variables. The '-f' option will + restrict the display to shell functions. + + The '-F' option inhibits the display of function definitions; only + the function name and attributes are printed. If the 'extdebug' + shell option is enabled using 'shopt' (*note The Shopt Builtin::), + the source file name and line number where each NAME is defined are + displayed as well. '-F' implies '-f'. + + The '-g' option forces variables to be created or modified at the + global scope, even when 'declare' is executed in a shell function. + It is ignored in all other cases. + + The '-I' option causes local variables to inherit the attributes + (except the NAMEREF attribute) and value of any existing variable + with the same NAME at a surrounding scope. If there is no existing + variable, the local variable is initially unset. + + The following options can be used to restrict output to variables + with the specified attributes or to give variables attributes: + + '-a' + Each NAME is an indexed array variable (*note Arrays::). + + '-A' + Each NAME is an associative array variable (*note Arrays::). + + '-f' + Use function names only. + + '-i' + The variable is to be treated as an integer; arithmetic + evaluation (*note Shell Arithmetic::) is performed when the + variable is assigned a value. + + '-l' + When the variable is assigned a value, all upper-case + characters are converted to lower-case. The upper-case + attribute is disabled. + + '-n' + Give each NAME the NAMEREF attribute, making it a name + reference to another variable. That other variable is defined + by the value of NAME. All references, assignments, and + attribute modifications to NAME, except for those using or + changing the '-n' attribute itself, are performed on the + variable referenced by NAME's value. The nameref attribute + cannot be applied to array variables. + + '-r' + Make NAMEs readonly. These names cannot then be assigned + values by subsequent assignment statements or unset. + + '-t' + Give each NAME the 'trace' attribute. Traced functions + inherit the 'DEBUG' and 'RETURN' traps from the calling shell. + The trace attribute has no special meaning for variables. + + '-u' + When the variable is assigned a value, all lower-case + characters are converted to upper-case. The lower-case + attribute is disabled. + + '-x' + Mark each NAME for export to subsequent commands via the + environment. + + Using '+' instead of '-' turns off the attribute instead, with the + exceptions that '+a' and '+A' may not be used to destroy array + variables and '+r' will not remove the readonly attribute. When + used in a function, 'declare' makes each NAME local, as with the + 'local' command, unless the '-g' option is used. If a variable + name is followed by =VALUE, the value of the variable is set to + VALUE. + + When using '-a' or '-A' and the compound assignment syntax to + create array variables, additional attributes do not take effect + until subsequent assignments. + + The return status is zero unless an invalid option is encountered, + an attempt is made to define a function using '-f foo=bar', an + attempt is made to assign a value to a readonly variable, an + attempt is made to assign a value to an array variable without + using the compound assignment syntax (*note Arrays::), one of the + NAMES is not a valid shell variable name, an attempt is made to + turn off readonly status for a readonly variable, an attempt is + made to turn off array status for an array variable, or an attempt + is made to display a non-existent function with '-f'. + +'echo' + echo [-neE] [ARG ...] + + Output the ARGs, separated by spaces, terminated with a newline. + The return status is 0 unless a write error occurs. If '-n' is + specified, the trailing newline is suppressed. If the '-e' option + is given, interpretation of the following backslash-escaped + characters is enabled. The '-E' option disables the interpretation + of these escape characters, even on systems where they are + interpreted by default. The 'xpg_echo' shell option may be used to + dynamically determine whether or not 'echo' expands these escape + characters by default. 'echo' does not interpret '--' to mean the + end of options. + + 'echo' interprets the following escape sequences: + '\a' + alert (bell) + '\b' + backspace + '\c' + suppress further output + '\e' + '\E' + escape + '\f' + form feed + '\n' + new line + '\r' + carriage return + '\t' + horizontal tab + '\v' + vertical tab + '\\' + backslash + '\0NNN' + the eight-bit character whose value is the octal value NNN + (zero to three octal digits) + '\xHH' + the eight-bit character whose value is the hexadecimal value + HH (one or two hex digits) + '\uHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHH (one to four hex digits) + '\UHHHHHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHHHHHH (one to eight hex digits) + +'enable' + enable [-a] [-dnps] [-f FILENAME] [NAME ...] + + Enable and disable builtin shell commands. Disabling a builtin + allows a disk command which has the same name as a shell builtin to + be executed without specifying a full pathname, even though the + shell normally searches for builtins before disk commands. If '-n' + is used, the NAMEs become disabled. Otherwise NAMEs are enabled. + For example, to use the 'test' binary found via '$PATH' instead of + the shell builtin version, type 'enable -n test'. + + If the '-p' option is supplied, or no NAME arguments appear, a list + of shell builtins is printed. With no other arguments, the list + consists of all enabled shell builtins. The '-a' option means to + list each builtin with an indication of whether or not it is + enabled. + + The '-f' option means to load the new builtin command NAME from + shared object FILENAME, on systems that support dynamic loading. + The '-d' option will delete a builtin loaded with '-f'. + + If there are no options, a list of the shell builtins is displayed. + The '-s' option restricts 'enable' to the POSIX special builtins. + If '-s' is used with '-f', the new builtin becomes a special + builtin (*note Special Builtins::). + + The return status is zero unless a NAME is not a shell builtin or + there is an error loading a new builtin from a shared object. + +'help' + help [-dms] [PATTERN] + + Display helpful information about builtin commands. If PATTERN is + specified, 'help' gives detailed help on all commands matching + PATTERN, otherwise a list of the builtins is printed. + + Options, if supplied, have the following meanings: + + '-d' + Display a short description of each PATTERN + '-m' + Display the description of each PATTERN in a manpage-like + format + '-s' + Display only a short usage synopsis for each PATTERN + + The return status is zero unless no command matches PATTERN. + +'let' + let EXPRESSION [EXPRESSION ...] + + The 'let' builtin allows arithmetic to be performed on shell + variables. Each EXPRESSION is evaluated according to the rules + given below in *note Shell Arithmetic::. If the last EXPRESSION + evaluates to 0, 'let' returns 1; otherwise 0 is returned. + +'local' + local [OPTION] NAME[=VALUE] ... + + For each argument, a local variable named NAME is created, and + assigned VALUE. The OPTION can be any of the options accepted by + 'declare'. 'local' can only be used within a function; it makes + the variable NAME have a visible scope restricted to that function + and its children. If NAME is '-', the set of shell options is made + local to the function in which 'local' is invoked: shell options + changed using the 'set' builtin inside the function are restored to + their original values when the function returns. The restore is + effected as if a series of 'set' commands were executed to restore + the values that were in place before the function. The return + status is zero unless 'local' is used outside a function, an + invalid NAME is supplied, or NAME is a readonly variable. + +'logout' + logout [N] + + Exit a login shell, returning a status of N to the shell's parent. + +'mapfile' + mapfile [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT] + [-t] [-u FD] [-C CALLBACK] [-c QUANTUM] [ARRAY] + + Read lines from the standard input into the indexed array variable + ARRAY, or from file descriptor FD if the '-u' option is supplied. + The variable 'MAPFILE' is the default ARRAY. Options, if supplied, + have the following meanings: + + '-d' + The first character of DELIM is used to terminate each input + line, rather than newline. If DELIM is the empty string, + 'mapfile' will terminate a line when it reads a NUL character. + '-n' + Copy at most COUNT lines. If COUNT is 0, all lines are + copied. + '-O' + Begin assigning to ARRAY at index ORIGIN. The default index + is 0. + '-s' + Discard the first COUNT lines read. + '-t' + Remove a trailing DELIM (default newline) from each line read. + '-u' + Read lines from file descriptor FD instead of the standard + input. + '-C' + Evaluate CALLBACK each time QUANTUM lines are read. The '-c' + option specifies QUANTUM. + '-c' + Specify the number of lines read between each call to + CALLBACK. + + If '-C' is specified without '-c', the default quantum is 5000. + When CALLBACK is evaluated, it is supplied the index of the next + array element to be assigned and the line to be assigned to that + element as additional arguments. CALLBACK is evaluated after the + line is read but before the array element is assigned. + + If not supplied with an explicit origin, 'mapfile' will clear ARRAY + before assigning to it. + + 'mapfile' returns successfully unless an invalid option or option + argument is supplied, ARRAY is invalid or unassignable, or ARRAY is + not an indexed array. + +'printf' + printf [-v VAR] FORMAT [ARGUMENTS] + + Write the formatted ARGUMENTS to the standard output under the + control of the FORMAT. The '-v' option causes the output to be + assigned to the variable VAR rather than being printed to the + standard output. + + The FORMAT is a character string which contains three types of + objects: plain characters, which are simply copied to standard + output, character escape sequences, which are converted and copied + to the standard output, and format specifications, each of which + causes printing of the next successive ARGUMENT. In addition to + the standard 'printf(1)' formats, 'printf' interprets the following + extensions: + + '%b' + Causes 'printf' to expand backslash escape sequences in the + corresponding ARGUMENT in the same way as 'echo -e' (*note + Bash Builtins::). + '%q' + Causes 'printf' to output the corresponding ARGUMENT in a + format that can be reused as shell input. + '%(DATEFMT)T' + Causes 'printf' to output the date-time string resulting from + using DATEFMT as a format string for 'strftime'(3). The + corresponding ARGUMENT is an integer representing the number + of seconds since the epoch. Two special argument values may + be used: -1 represents the current time, and -2 represents the + time the shell was invoked. If no argument is specified, + conversion behaves as if -1 had been given. This is an + exception to the usual 'printf' behavior. + + The %b, %q, and %T directives all use the field width and precision + arguments from the format specification and write that many bytes + from (or use that wide a field for) the expanded argument, which + usually contains more characters than the original. + + Arguments to non-string format specifiers are treated as C language + constants, except that a leading plus or minus sign is allowed, and + if the leading character is a single or double quote, the value is + the ASCII value of the following character. + + The FORMAT is reused as necessary to consume all of the ARGUMENTS. + If the FORMAT requires more ARGUMENTS than are supplied, the extra + format specifications behave as if a zero value or null string, as + appropriate, had been supplied. The return value is zero on + success, non-zero on failure. + +'read' + read [-ers] [-a ANAME] [-d DELIM] [-i TEXT] [-n NCHARS] + [-N NCHARS] [-p PROMPT] [-t TIMEOUT] [-u FD] [NAME ...] + + One line is read from the standard input, or from the file + descriptor FD supplied as an argument to the '-u' option, split + into words as described above in *note Word Splitting::, and the + first word is assigned to the first NAME, the second word to the + second NAME, and so on. If there are more words than names, the + remaining words and their intervening delimiters are assigned to + the last NAME. If there are fewer words read from the input stream + than names, the remaining names are assigned empty values. The + characters in the value of the 'IFS' variable are used to split the + line into words using the same rules the shell uses for expansion + (described above in *note Word Splitting::). The backslash + character '\' may be used to remove any special meaning for the + next character read and for line continuation. + + Options, if supplied, have the following meanings: + + '-a ANAME' + The words are assigned to sequential indices of the array + variable ANAME, starting at 0. All elements are removed from + ANAME before the assignment. Other NAME arguments are + ignored. + + '-d DELIM' + The first character of DELIM is used to terminate the input + line, rather than newline. If DELIM is the empty string, + 'read' will terminate a line when it reads a NUL character. + + '-e' + Readline (*note Command Line Editing::) is used to obtain the + line. Readline uses the current (or default, if line editing + was not previously active) editing settings, but uses + Readline's default filename completion. + + '-i TEXT' + If Readline is being used to read the line, TEXT is placed + into the editing buffer before editing begins. + + '-n NCHARS' + 'read' returns after reading NCHARS characters rather than + waiting for a complete line of input, but honors a delimiter + if fewer than NCHARS characters are read before the delimiter. + + '-N NCHARS' + 'read' returns after reading exactly NCHARS characters rather + than waiting for a complete line of input, unless EOF is + encountered or 'read' times out. Delimiter characters + encountered in the input are not treated specially and do not + cause 'read' to return until NCHARS characters are read. The + result is not split on the characters in 'IFS'; the intent is + that the variable is assigned exactly the characters read + (with the exception of backslash; see the '-r' option below). + + '-p PROMPT' + Display PROMPT, without a trailing newline, before attempting + to read any input. The prompt is displayed only if input is + coming from a terminal. + + '-r' + If this option is given, backslash does not act as an escape + character. The backslash is considered to be part of the + line. In particular, a backslash-newline pair may not then be + used as a line continuation. + + '-s' + Silent mode. If input is coming from a terminal, characters + are not echoed. + + '-t TIMEOUT' + Cause 'read' to time out and return failure if a complete line + of input (or a specified number of characters) is not read + within TIMEOUT seconds. TIMEOUT may be a decimal number with + a fractional portion following the decimal point. This option + is only effective if 'read' is reading input from a terminal, + pipe, or other special file; it has no effect when reading + from regular files. If 'read' times out, 'read' saves any + partial input read into the specified variable NAME. If + TIMEOUT is 0, 'read' returns immediately, without trying to + read any data. The exit status is 0 if input is available on + the specified file descriptor, non-zero otherwise. The exit + status is greater than 128 if the timeout is exceeded. + + '-u FD' + Read input from file descriptor FD. + + If no NAMEs are supplied, the line read, without the ending + delimiter but otherwise unmodified, is assigned to the variable + 'REPLY'. The exit status is zero, unless end-of-file is + encountered, 'read' times out (in which case the status is greater + than 128), a variable assignment error (such as assigning to a + readonly variable) occurs, or an invalid file descriptor is + supplied as the argument to '-u'. + +'readarray' + readarray [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT] + [-t] [-u FD] [-C CALLBACK] [-c QUANTUM] [ARRAY] + + Read lines from the standard input into the indexed array variable + ARRAY, or from file descriptor FD if the '-u' option is supplied. + + A synonym for 'mapfile'. + +'source' + source FILENAME + + A synonym for '.' (*note Bourne Shell Builtins::). + +'type' + type [-afptP] [NAME ...] + + For each NAME, indicate how it would be interpreted if used as a + command name. + + If the '-t' option is used, 'type' prints a single word which is + one of 'alias', 'function', 'builtin', 'file' or 'keyword', if NAME + is an alias, shell function, shell builtin, disk file, or shell + reserved word, respectively. If the NAME is not found, then + nothing is printed, and 'type' returns a failure status. + + If the '-p' option is used, 'type' either returns the name of the + disk file that would be executed, or nothing if '-t' would not + return 'file'. + + The '-P' option forces a path search for each NAME, even if '-t' + would not return 'file'. + + If a command is hashed, '-p' and '-P' print the hashed value, which + is not necessarily the file that appears first in '$PATH'. + + If the '-a' option is used, 'type' returns all of the places that + contain an executable named FILE. This includes aliases and + functions, if and only if the '-p' option is not also used. + + If the '-f' option is used, 'type' does not attempt to find shell + functions, as with the 'command' builtin. + + The return status is zero if all of the NAMES are found, non-zero + if any are not found. + +'typeset' + typeset [-afFgrxilnrtux] [-p] [NAME[=VALUE] ...] + + The 'typeset' command is supplied for compatibility with the Korn + shell. It is a synonym for the 'declare' builtin command. + +'ulimit' + ulimit [-HS] -a + ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [LIMIT] + + 'ulimit' provides control over the resources available to processes + started by the shell, on systems that allow such control. If an + option is given, it is interpreted as follows: + + '-S' + Change and report the soft limit associated with a resource. + + '-H' + Change and report the hard limit associated with a resource. + + '-a' + All current limits are reported; no limits are set. + + '-b' + The maximum socket buffer size. + + '-c' + The maximum size of core files created. + + '-d' + The maximum size of a process's data segment. + + '-e' + The maximum scheduling priority ("nice"). + + '-f' + The maximum size of files written by the shell and its + children. + + '-i' + The maximum number of pending signals. + + '-k' + The maximum number of kqueues that may be allocated. + + '-l' + The maximum size that may be locked into memory. + + '-m' + The maximum resident set size (many systems do not honor this + limit). + + '-n' + The maximum number of open file descriptors (most systems do + not allow this value to be set). + + '-p' + The pipe buffer size. + + '-q' + The maximum number of bytes in POSIX message queues. + + '-r' + The maximum real-time scheduling priority. + + '-s' + The maximum stack size. + + '-t' + The maximum amount of cpu time in seconds. + + '-u' + The maximum number of processes available to a single user. + + '-v' + The maximum amount of virtual memory available to the shell, + and, on some systems, to its children. + + '-x' + The maximum number of file locks. + + '-P' + The maximum number of pseudoterminals. + + '-R' + The maximum time a real-time process can run before blocking, + in microseconds. + + '-T' + The maximum number of threads. + + If LIMIT is given, and the '-a' option is not used, LIMIT is the + new value of the specified resource. The special LIMIT values + 'hard', 'soft', and 'unlimited' stand for the current hard limit, + the current soft limit, and no limit, respectively. A hard limit + cannot be increased by a non-root user once it is set; a soft limit + may be increased up to the value of the hard limit. Otherwise, the + current value of the soft limit for the specified resource is + printed, unless the '-H' option is supplied. When more than one + resource is specified, the limit name and unit, if appropriate, are + printed before the value. When setting new limits, if neither '-H' + nor '-S' is supplied, both the hard and soft limits are set. If no + option is given, then '-f' is assumed. Values are in 1024-byte + increments, except for '-t', which is in seconds; '-R', which is in + microseconds; '-p', which is in units of 512-byte blocks; '-P', + '-T', '-b', '-k', '-n' and '-u', which are unscaled values; and, + when in POSIX Mode (*note Bash POSIX Mode::), '-c' and '-f', which + are in 512-byte increments. + + The return status is zero unless an invalid option or argument is + supplied, or an error occurs while setting a new limit. + +'unalias' + unalias [-a] [NAME ... ] + + Remove each NAME from the list of aliases. If '-a' is supplied, + all aliases are removed. Aliases are described in *note Aliases::. + + +File: bash.info, Node: Modifying Shell Behavior, Next: Special Builtins, Prev: Bash Builtins, Up: Shell Builtin Commands + +4.3 Modifying Shell Behavior +============================ + +* Menu: + +* The Set Builtin:: Change the values of shell attributes and + positional parameters. +* The Shopt Builtin:: Modify shell optional behavior. + + +File: bash.info, Node: The Set Builtin, Next: The Shopt Builtin, Up: Modifying Shell Behavior + +4.3.1 The Set Builtin +--------------------- + +This builtin is so complicated that it deserves its own section. 'set' +allows you to change the values of shell options and set the positional +parameters, or to display the names and values of shell variables. + +'set' + set [--abefhkmnptuvxBCEHPT] [-o OPTION-NAME] [ARGUMENT ...] + set [+abefhkmnptuvxBCEHPT] [+o OPTION-NAME] [ARGUMENT ...] + + If no options or arguments are supplied, 'set' displays the names + and values of all shell variables and functions, sorted according + to the current locale, in a format that may be reused as input for + setting or resetting the currently-set variables. Read-only + variables cannot be reset. In POSIX mode, only shell variables are + listed. + + When options are supplied, they set or unset shell attributes. + Options, if specified, have the following meanings: + + '-a' + Each variable or function that is created or modified is given + the export attribute and marked for export to the environment + of subsequent commands. + + '-b' + Cause the status of terminated background jobs to be reported + immediately, rather than before printing the next primary + prompt. + + '-e' + Exit immediately if a pipeline (*note Pipelines::), which may + consist of a single simple command (*note Simple Commands::), + a list (*note Lists::), or a compound command (*note Compound + Commands::) returns a non-zero status. The shell does not + exit if the command that fails is part of the command list + immediately following a 'while' or 'until' keyword, part of + the test in an 'if' statement, part of any command executed in + a '&&' or '||' list except the command following the final + '&&' or '||', any command in a pipeline but the last, or if + the command's return status is being inverted with '!'. If a + compound command other than a subshell returns a non-zero + status because a command failed while '-e' was being ignored, + the shell does not exit. A trap on 'ERR', if set, is executed + before the shell exits. + + This option applies to the shell environment and each subshell + environment separately (*note Command Execution + Environment::), and may cause subshells to exit before + executing all the commands in the subshell. + + If a compound command or shell function executes in a context + where '-e' is being ignored, none of the commands executed + within the compound command or function body will be affected + by the '-e' setting, even if '-e' is set and a command returns + a failure status. If a compound command or shell function + sets '-e' while executing in a context where '-e' is ignored, + that setting will not have any effect until the compound + command or the command containing the function call completes. + + '-f' + Disable filename expansion (globbing). + + '-h' + Locate and remember (hash) commands as they are looked up for + execution. This option is enabled by default. + + '-k' + All arguments in the form of assignment statements are placed + in the environment for a command, not just those that precede + the command name. + + '-m' + Job control is enabled (*note Job Control::). All processes + run in a separate process group. When a background job + completes, the shell prints a line containing its exit status. + + '-n' + Read commands but do not execute them. This may be used to + check a script for syntax errors. This option is ignored by + interactive shells. + + '-o OPTION-NAME' + + Set the option corresponding to OPTION-NAME: + + 'allexport' + Same as '-a'. + + 'braceexpand' + Same as '-B'. + + 'emacs' + Use an 'emacs'-style line editing interface (*note + Command Line Editing::). This also affects the editing + interface used for 'read -e'. + + 'errexit' + Same as '-e'. + + 'errtrace' + Same as '-E'. + + 'functrace' + Same as '-T'. + + 'hashall' + Same as '-h'. + + 'histexpand' + Same as '-H'. + + 'history' + Enable command history, as described in *note Bash + History Facilities::. This option is on by default in + interactive shells. + + 'ignoreeof' + An interactive shell will not exit upon reading EOF. + + 'keyword' + Same as '-k'. + + 'monitor' + Same as '-m'. + + 'noclobber' + Same as '-C'. + + 'noexec' + Same as '-n'. + + 'noglob' + Same as '-f'. + + 'nolog' + Currently ignored. + + 'notify' + Same as '-b'. + + 'nounset' + Same as '-u'. + + 'onecmd' + Same as '-t'. + + 'physical' + Same as '-P'. + + 'pipefail' + If set, the return value of a pipeline is the value of + the last (rightmost) command to exit with a non-zero + status, or zero if all commands in the pipeline exit + successfully. This option is disabled by default. + + 'posix' + Change the behavior of Bash where the default operation + differs from the POSIX standard to match the standard + (*note Bash POSIX Mode::). This is intended to make Bash + behave as a strict superset of that standard. + + 'privileged' + Same as '-p'. + + 'verbose' + Same as '-v'. + + 'vi' + Use a 'vi'-style line editing interface. This also + affects the editing interface used for 'read -e'. + + 'xtrace' + Same as '-x'. + + '-p' + Turn on privileged mode. In this mode, the '$BASH_ENV' and + '$ENV' files are not processed, shell functions are not + inherited from the environment, and the 'SHELLOPTS', + 'BASHOPTS', 'CDPATH' and 'GLOBIGNORE' variables, if they + appear in the environment, are ignored. If the shell is + started with the effective user (group) id not equal to the + real user (group) id, and the '-p' option is not supplied, + these actions are taken and the effective user id is set to + the real user id. If the '-p' option is supplied at startup, + the effective user id is not reset. Turning this option off + causes the effective user and group ids to be set to the real + user and group ids. + + '-t' + Exit after reading and executing one command. + + '-u' + Treat unset variables and parameters other than the special + parameters '@' or '*' as an error when performing parameter + expansion. An error message will be written to the standard + error, and a non-interactive shell will exit. + + '-v' + Print shell input lines as they are read. + + '-x' + Print a trace of simple commands, 'for' commands, 'case' + commands, 'select' commands, and arithmetic 'for' commands and + their arguments or associated word lists after they are + expanded and before they are executed. The value of the 'PS4' + variable is expanded and the resultant value is printed before + the command and its expanded arguments. + + '-B' + The shell will perform brace expansion (*note Brace + Expansion::). This option is on by default. + + '-C' + Prevent output redirection using '>', '>&', and '<>' from + overwriting existing files. + + '-E' + If set, any trap on 'ERR' is inherited by shell functions, + command substitutions, and commands executed in a subshell + environment. The 'ERR' trap is normally not inherited in such + cases. + + '-H' + Enable '!' style history substitution (*note History + Interaction::). This option is on by default for interactive + shells. + + '-P' + If set, do not resolve symbolic links when performing commands + such as 'cd' which change the current directory. The physical + directory is used instead. By default, Bash follows the + logical chain of directories when performing commands which + change the current directory. + + For example, if '/usr/sys' is a symbolic link to + '/usr/local/sys' then: + $ cd /usr/sys; echo $PWD + /usr/sys + $ cd ..; pwd + /usr + + If 'set -P' is on, then: + $ cd /usr/sys; echo $PWD + /usr/local/sys + $ cd ..; pwd + /usr/local + + '-T' + If set, any trap on 'DEBUG' and 'RETURN' are inherited by + shell functions, command substitutions, and commands executed + in a subshell environment. The 'DEBUG' and 'RETURN' traps are + normally not inherited in such cases. + + '--' + If no arguments follow this option, then the positional + parameters are unset. Otherwise, the positional parameters + are set to the ARGUMENTS, even if some of them begin with a + '-'. + + '-' + Signal the end of options, cause all remaining ARGUMENTS to be + assigned to the positional parameters. The '-x' and '-v' + options are turned off. If there are no arguments, the + positional parameters remain unchanged. + + Using '+' rather than '-' causes these options to be turned off. + The options can also be used upon invocation of the shell. The + current set of options may be found in '$-'. + + The remaining N ARGUMENTS are positional parameters and are + assigned, in order, to '$1', '$2', ... '$N'. The special parameter + '#' is set to N. + + The return status is always zero unless an invalid option is + supplied. + + +File: bash.info, Node: The Shopt Builtin, Prev: The Set Builtin, Up: Modifying Shell Behavior + +4.3.2 The Shopt Builtin +----------------------- + +This builtin allows you to change additional shell optional behavior. + +'shopt' + shopt [-pqsu] [-o] [OPTNAME ...] + + Toggle the values of settings controlling optional shell behavior. + The settings can be either those listed below, or, if the '-o' + option is used, those available with the '-o' option to the 'set' + builtin command (*note The Set Builtin::). With no options, or + with the '-p' option, a list of all settable options is displayed, + with an indication of whether or not each is set; if OPTNAMES are + supplied, the output is restricted to those options. The '-p' + option causes output to be displayed in a form that may be reused + as input. Other options have the following meanings: + + '-s' + Enable (set) each OPTNAME. + + '-u' + Disable (unset) each OPTNAME. + + '-q' + Suppresses normal output; the return status indicates whether + the OPTNAME is set or unset. If multiple OPTNAME arguments + are given with '-q', the return status is zero if all OPTNAMES + are enabled; non-zero otherwise. + + '-o' + Restricts the values of OPTNAME to be those defined for the + '-o' option to the 'set' builtin (*note The Set Builtin::). + + If either '-s' or '-u' is used with no OPTNAME arguments, 'shopt' + shows only those options which are set or unset, respectively. + + Unless otherwise noted, the 'shopt' options are disabled (off) by + default. + + The return status when listing options is zero if all OPTNAMES are + enabled, non-zero otherwise. When setting or unsetting options, + the return status is zero unless an OPTNAME is not a valid shell + option. + + The list of 'shopt' options is: + + 'assoc_expand_once' + If set, the shell suppresses multiple evaluation of + associative array subscripts during arithmetic expression + evaluation, while executing builtins that can perform variable + assignments, and while executing builtins that perform array + dereferencing. + + 'autocd' + If set, a command name that is the name of a directory is + executed as if it were the argument to the 'cd' command. This + option is only used by interactive shells. + + 'cdable_vars' + If this is set, an argument to the 'cd' builtin command that + is not a directory is assumed to be the name of a variable + whose value is the directory to change to. + + 'cdspell' + If set, minor errors in the spelling of a directory component + in a 'cd' command will be corrected. The errors checked for + are transposed characters, a missing character, and a + character too many. If a correction is found, the corrected + path is printed, and the command proceeds. This option is + only used by interactive shells. + + 'checkhash' + If this is set, Bash checks that a command found in the hash + table exists before trying to execute it. If a hashed command + no longer exists, a normal path search is performed. + + 'checkjobs' + If set, Bash lists the status of any stopped and running jobs + before exiting an interactive shell. If any jobs are running, + this causes the exit to be deferred until a second exit is + attempted without an intervening command (*note Job + Control::). The shell always postpones exiting if any jobs + are stopped. + + 'checkwinsize' + If set, Bash checks the window size after each external + (non-builtin) command and, if necessary, updates the values of + 'LINES' and 'COLUMNS'. This option is enabled by default. + + 'cmdhist' + If set, Bash attempts to save all lines of a multiple-line + command in the same history entry. This allows easy + re-editing of multi-line commands. This option is enabled by + default, but only has an effect if command history is enabled + (*note Bash History Facilities::). + + 'compat31' + 'compat32' + 'compat40' + 'compat41' + 'compat42' + 'compat43' + 'compat44' + These control aspects of the shell's compatibility mode (*note + Shell Compatibility Mode::). + + 'complete_fullquote' + If set, Bash quotes all shell metacharacters in filenames and + directory names when performing completion. If not set, Bash + removes metacharacters such as the dollar sign from the set of + characters that will be quoted in completed filenames when + these metacharacters appear in shell variable references in + words to be completed. This means that dollar signs in + variable names that expand to directories will not be quoted; + however, any dollar signs appearing in filenames will not be + quoted, either. This is active only when bash is using + backslashes to quote completed filenames. This variable is + set by default, which is the default Bash behavior in versions + through 4.2. + + 'direxpand' + If set, Bash replaces directory names with the results of word + expansion when performing filename completion. This changes + the contents of the readline editing buffer. If not set, Bash + attempts to preserve what the user typed. + + 'dirspell' + If set, Bash attempts spelling correction on directory names + during word completion if the directory name initially + supplied does not exist. + + 'dotglob' + If set, Bash includes filenames beginning with a '.' in the + results of filename expansion. The filenames '.' and '..' + must always be matched explicitly, even if 'dotglob' is set. + + 'execfail' + If this is set, a non-interactive shell will not exit if it + cannot execute the file specified as an argument to the 'exec' + builtin command. An interactive shell does not exit if 'exec' + fails. + + 'expand_aliases' + If set, aliases are expanded as described below under Aliases, + *note Aliases::. This option is enabled by default for + interactive shells. + + 'extdebug' + If set at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the '--debugger' option. If set after + invocation, behavior intended for use by debuggers is enabled: + + 1. The '-F' option to the 'declare' builtin (*note Bash + Builtins::) displays the source file name and line number + corresponding to each function name supplied as an + argument. + + 2. If the command run by the 'DEBUG' trap returns a non-zero + value, the next command is skipped and not executed. + + 3. If the command run by the 'DEBUG' trap returns a value of + 2, and the shell is executing in a subroutine (a shell + function or a shell script executed by the '.' or + 'source' builtins), the shell simulates a call to + 'return'. + + 4. 'BASH_ARGC' and 'BASH_ARGV' are updated as described in + their descriptions (*note Bash Variables::). + + 5. Function tracing is enabled: command substitution, shell + functions, and subshells invoked with '( COMMAND )' + inherit the 'DEBUG' and 'RETURN' traps. + + 6. Error tracing is enabled: command substitution, shell + functions, and subshells invoked with '( COMMAND )' + inherit the 'ERR' trap. + + 'extglob' + If set, the extended pattern matching features described above + (*note Pattern Matching::) are enabled. + + 'extquote' + If set, '$'STRING'' and '$"STRING"' quoting is performed + within '${PARAMETER}' expansions enclosed in double quotes. + This option is enabled by default. + + 'failglob' + If set, patterns which fail to match filenames during filename + expansion result in an expansion error. + + 'force_fignore' + If set, the suffixes specified by the 'FIGNORE' shell variable + cause words to be ignored when performing word completion even + if the ignored words are the only possible completions. *Note + Bash Variables::, for a description of 'FIGNORE'. This option + is enabled by default. + + 'globasciiranges' + If set, range expressions used in pattern matching bracket + expressions (*note Pattern Matching::) behave as if in the + traditional C locale when performing comparisons. That is, + the current locale's collating sequence is not taken into + account, so 'b' will not collate between 'A' and 'B', and + upper-case and lower-case ASCII characters will collate + together. + + 'globstar' + If set, the pattern '**' used in a filename expansion context + will match all files and zero or more directories and + subdirectories. If the pattern is followed by a '/', only + directories and subdirectories match. + + 'gnu_errfmt' + If set, shell error messages are written in the standard GNU + error message format. + + 'histappend' + If set, the history list is appended to the file named by the + value of the 'HISTFILE' variable when the shell exits, rather + than overwriting the file. + + 'histreedit' + If set, and Readline is being used, a user is given the + opportunity to re-edit a failed history substitution. + + 'histverify' + If set, and Readline is being used, the results of history + substitution are not immediately passed to the shell parser. + Instead, the resulting line is loaded into the Readline + editing buffer, allowing further modification. + + 'hostcomplete' + If set, and Readline is being used, Bash will attempt to + perform hostname completion when a word containing a '@' is + being completed (*note Commands For Completion::). This + option is enabled by default. + + 'huponexit' + If set, Bash will send 'SIGHUP' to all jobs when an + interactive login shell exits (*note Signals::). + + 'inherit_errexit' + If set, command substitution inherits the value of the + 'errexit' option, instead of unsetting it in the subshell + environment. This option is enabled when POSIX mode is + enabled. + + 'interactive_comments' + Allow a word beginning with '#' to cause that word and all + remaining characters on that line to be ignored in an + interactive shell. This option is enabled by default. + + 'lastpipe' + If set, and job control is not active, the shell runs the last + command of a pipeline not executed in the background in the + current shell environment. + + 'lithist' + If enabled, and the 'cmdhist' option is enabled, multi-line + commands are saved to the history with embedded newlines + rather than using semicolon separators where possible. + + 'localvar_inherit' + If set, local variables inherit the value and attributes of a + variable of the same name that exists at a previous scope + before any new value is assigned. The NAMEREF attribute is + not inherited. + + 'localvar_unset' + If set, calling 'unset' on local variables in previous + function scopes marks them so subsequent lookups find them + unset until that function returns. This is identical to the + behavior of unsetting local variables at the current function + scope. + + 'login_shell' + The shell sets this option if it is started as a login shell + (*note Invoking Bash::). The value may not be changed. + + 'mailwarn' + If set, and a file that Bash is checking for mail has been + accessed since the last time it was checked, the message '"The + mail in MAILFILE has been read"' is displayed. + + 'no_empty_cmd_completion' + If set, and Readline is being used, Bash will not attempt to + search the 'PATH' for possible completions when completion is + attempted on an empty line. + + 'nocaseglob' + If set, Bash matches filenames in a case-insensitive fashion + when performing filename expansion. + + 'nocasematch' + If set, Bash matches patterns in a case-insensitive fashion + when performing matching while executing 'case' or '[[' + conditional commands, when performing pattern substitution + word expansions, or when filtering possible completions as + part of programmable completion. + + 'nullglob' + If set, Bash allows filename patterns which match no files to + expand to a null string, rather than themselves. + + 'progcomp' + If set, the programmable completion facilities (*note + Programmable Completion::) are enabled. This option is + enabled by default. + + 'progcomp_alias' + If set, and programmable completion is enabled, Bash treats a + command name that doesn't have any completions as a possible + alias and attempts alias expansion. If it has an alias, Bash + attempts programmable completion using the command word + resulting from the expanded alias. + + 'promptvars' + If set, prompt strings undergo parameter expansion, command + substitution, arithmetic expansion, and quote removal after + being expanded as described below (*note Controlling the + Prompt::). This option is enabled by default. + + 'restricted_shell' + The shell sets this option if it is started in restricted mode + (*note The Restricted Shell::). The value may not be changed. + This is not reset when the startup files are executed, + allowing the startup files to discover whether or not a shell + is restricted. + + 'shift_verbose' + If this is set, the 'shift' builtin prints an error message + when the shift count exceeds the number of positional + parameters. + + 'sourcepath' + If set, the 'source' builtin uses the value of 'PATH' to find + the directory containing the file supplied as an argument. + This option is enabled by default. + + 'xpg_echo' + If set, the 'echo' builtin expands backslash-escape sequences + by default. + + +File: bash.info, Node: Special Builtins, Prev: Modifying Shell Behavior, Up: Shell Builtin Commands + +4.4 Special Builtins +==================== + +For historical reasons, the POSIX standard has classified several +builtin commands as _special_. When Bash is executing in POSIX mode, +the special builtins differ from other builtin commands in three +respects: + + 1. Special builtins are found before shell functions during command + lookup. + + 2. If a special builtin returns an error status, a non-interactive + shell exits. + + 3. Assignment statements preceding the command stay in effect in the + shell environment after the command completes. + + When Bash is not executing in POSIX mode, these builtins behave no +differently than the rest of the Bash builtin commands. The Bash POSIX +mode is described in *note Bash POSIX Mode::. + + These are the POSIX special builtins: + break : . continue eval exec exit export readonly return set + shift trap unset + + +File: bash.info, Node: Shell Variables, Next: Bash Features, Prev: Shell Builtin Commands, Up: Top + +5 Shell Variables +***************** + +* Menu: + +* Bourne Shell Variables:: Variables which Bash uses in the same way + as the Bourne Shell. +* Bash Variables:: List of variables that exist in Bash. + +This chapter describes the shell variables that Bash uses. Bash +automatically assigns default values to a number of variables. + + +File: bash.info, Node: Bourne Shell Variables, Next: Bash Variables, Up: Shell Variables + +5.1 Bourne Shell Variables +========================== + +Bash uses certain shell variables in the same way as the Bourne shell. +In some cases, Bash assigns a default value to the variable. + +'CDPATH' + A colon-separated list of directories used as a search path for the + 'cd' builtin command. + +'HOME' + The current user's home directory; the default for the 'cd' builtin + command. The value of this variable is also used by tilde + expansion (*note Tilde Expansion::). + +'IFS' + A list of characters that separate fields; used when the shell + splits words as part of expansion. + +'MAIL' + If this parameter is set to a filename or directory name and the + 'MAILPATH' variable is not set, Bash informs the user of the + arrival of mail in the specified file or Maildir-format directory. + +'MAILPATH' + A colon-separated list of filenames which the shell periodically + checks for new mail. Each list entry can specify the message that + is printed when new mail arrives in the mail file by separating the + filename from the message with a '?'. When used in the text of the + message, '$_' expands to the name of the current mail file. + +'OPTARG' + The value of the last option argument processed by the 'getopts' + builtin. + +'OPTIND' + The index of the last option argument processed by the 'getopts' + builtin. + +'PATH' + A colon-separated list of directories in which the shell looks for + commands. A zero-length (null) directory name in the value of + 'PATH' indicates the current directory. A null directory name may + appear as two adjacent colons, or as an initial or trailing colon. + +'PS1' + The primary prompt string. The default value is '\s-\v\$ '. *Note + Controlling the Prompt::, for the complete list of escape sequences + that are expanded before 'PS1' is displayed. + +'PS2' + The secondary prompt string. The default value is '> '. 'PS2' is + expanded in the same way as 'PS1' before being displayed. + + +File: bash.info, Node: Bash Variables, Prev: Bourne Shell Variables, Up: Shell Variables + +5.2 Bash Variables +================== + +These variables are set or used by Bash, but other shells do not +normally treat them specially. + + A few variables used by Bash are described in different chapters: +variables for controlling the job control facilities (*note Job Control +Variables::). + +'_' + ($_, an underscore.) At shell startup, set to the pathname used to + invoke the shell or shell script being executed as passed in the + environment or argument list. Subsequently, expands to the last + argument to the previous simple command executed in the foreground, + after expansion. Also set to the full pathname used to invoke each + command executed and placed in the environment exported to that + command. When checking mail, this parameter holds the name of the + mail file. + +'BASH' + The full pathname used to execute the current instance of Bash. + +'BASHOPTS' + A colon-separated list of enabled shell options. Each word in the + list is a valid argument for the '-s' option to the 'shopt' builtin + command (*note The Shopt Builtin::). The options appearing in + 'BASHOPTS' are those reported as 'on' by 'shopt'. If this variable + is in the environment when Bash starts up, each shell option in the + list will be enabled before reading any startup files. This + variable is readonly. + +'BASHPID' + Expands to the process ID of the current Bash process. This + differs from '$$' under certain circumstances, such as subshells + that do not require Bash to be re-initialized. Assignments to + 'BASHPID' have no effect. If 'BASHPID' is unset, it loses its + special properties, even if it is subsequently reset. + +'BASH_ALIASES' + An associative array variable whose members correspond to the + internal list of aliases as maintained by the 'alias' builtin. + (*note Bourne Shell Builtins::). Elements added to this array + appear in the alias list; however, unsetting array elements + currently does not cause aliases to be removed from the alias list. + If 'BASH_ALIASES' is unset, it loses its special properties, even + if it is subsequently reset. + +'BASH_ARGC' + An array variable whose values are the number of parameters in each + frame of the current bash execution call stack. The number of + parameters to the current subroutine (shell function or script + executed with '.' or 'source') is at the top of the stack. When a + subroutine is executed, the number of parameters passed is pushed + onto 'BASH_ARGC'. The shell sets 'BASH_ARGC' only when in extended + debugging mode (see *note The Shopt Builtin:: for a description of + the 'extdebug' option to the 'shopt' builtin). Setting 'extdebug' + after the shell has started to execute a script, or referencing + this variable when 'extdebug' is not set, may result in + inconsistent values. + +'BASH_ARGV' + An array variable containing all of the parameters in the current + bash execution call stack. The final parameter of the last + subroutine call is at the top of the stack; the first parameter of + the initial call is at the bottom. When a subroutine is executed, + the parameters supplied are pushed onto 'BASH_ARGV'. The shell + sets 'BASH_ARGV' only when in extended debugging mode (see *note + The Shopt Builtin:: for a description of the 'extdebug' option to + the 'shopt' builtin). Setting 'extdebug' after the shell has + started to execute a script, or referencing this variable when + 'extdebug' is not set, may result in inconsistent values. + +'BASH_ARGV0' + When referenced, this variable expands to the name of the shell or + shell script (identical to '$0'; *Note Special Parameters::, for + the description of special parameter 0). Assignment to + 'BASH_ARGV0' causes the value assigned to also be assigned to '$0'. + If 'BASH_ARGV0' is unset, it loses its special properties, even if + it is subsequently reset. + +'BASH_CMDS' + An associative array variable whose members correspond to the + internal hash table of commands as maintained by the 'hash' builtin + (*note Bourne Shell Builtins::). Elements added to this array + appear in the hash table; however, unsetting array elements + currently does not cause command names to be removed from the hash + table. If 'BASH_CMDS' is unset, it loses its special properties, + even if it is subsequently reset. + +'BASH_COMMAND' + The command currently being executed or about to be executed, + unless the shell is executing a command as the result of a trap, in + which case it is the command executing at the time of the trap. If + 'BASH_COMMAND' is unset, it loses its special properties, even if + it is subsequently reset. + +'BASH_COMPAT' + The value is used to set the shell's compatibility level. *Note + Shell Compatibility Mode::, for a description of the various + compatibility levels and their effects. The value may be a decimal + number (e.g., 4.2) or an integer (e.g., 42) corresponding to the + desired compatibility level. If 'BASH_COMPAT' is unset or set to + the empty string, the compatibility level is set to the default for + the current version. If 'BASH_COMPAT' is set to a value that is + not one of the valid compatibility levels, the shell prints an + error message and sets the compatibility level to the default for + the current version. The valid values correspond to the + compatibility levels described below (*note Shell Compatibility + Mode::). For example, 4.2 and 42 are valid values that correspond + to the 'compat42' 'shopt' option and set the compatibility level to + 42. The current version is also a valid value. + +'BASH_ENV' + If this variable is set when Bash is invoked to execute a shell + script, its value is expanded and used as the name of a startup + file to read before executing the script. *Note Bash Startup + Files::. + +'BASH_EXECUTION_STRING' + The command argument to the '-c' invocation option. + +'BASH_LINENO' + An array variable whose members are the line numbers in source + files where each corresponding member of FUNCNAME was invoked. + '${BASH_LINENO[$i]}' is the line number in the source file + ('${BASH_SOURCE[$i+1]}') where '${FUNCNAME[$i]}' was called (or + '${BASH_LINENO[$i-1]}' if referenced within another shell + function). Use 'LINENO' to obtain the current line number. + +'BASH_LOADABLES_PATH' + A colon-separated list of directories in which the shell looks for + dynamically loadable builtins specified by the 'enable' command. + +'BASH_REMATCH' + An array variable whose members are assigned by the '=~' binary + operator to the '[[' conditional command (*note Conditional + Constructs::). The element with index 0 is the portion of the + string matching the entire regular expression. The element with + index N is the portion of the string matching the Nth parenthesized + subexpression. + +'BASH_SOURCE' + An array variable whose members are the source filenames where the + corresponding shell function names in the 'FUNCNAME' array variable + are defined. The shell function '${FUNCNAME[$i]}' is defined in + the file '${BASH_SOURCE[$i]}' and called from + '${BASH_SOURCE[$i+1]}' + +'BASH_SUBSHELL' + Incremented by one within each subshell or subshell environment + when the shell begins executing in that environment. The initial + value is 0. If 'BASH_SUBSHELL' is unset, it loses its special + properties, even if it is subsequently reset. + +'BASH_VERSINFO' + A readonly array variable (*note Arrays::) whose members hold + version information for this instance of Bash. The values assigned + to the array members are as follows: + + 'BASH_VERSINFO[0]' + The major version number (the RELEASE). + + 'BASH_VERSINFO[1]' + The minor version number (the VERSION). + + 'BASH_VERSINFO[2]' + The patch level. + + 'BASH_VERSINFO[3]' + The build version. + + 'BASH_VERSINFO[4]' + The release status (e.g., BETA1). + + 'BASH_VERSINFO[5]' + The value of 'MACHTYPE'. + +'BASH_VERSION' + The version number of the current instance of Bash. + +'BASH_XTRACEFD' + If set to an integer corresponding to a valid file descriptor, Bash + will write the trace output generated when 'set -x' is enabled to + that file descriptor. This allows tracing output to be separated + from diagnostic and error messages. The file descriptor is closed + when 'BASH_XTRACEFD' is unset or assigned a new value. Unsetting + 'BASH_XTRACEFD' or assigning it the empty string causes the trace + output to be sent to the standard error. Note that setting + 'BASH_XTRACEFD' to 2 (the standard error file descriptor) and then + unsetting it will result in the standard error being closed. + +'CHILD_MAX' + Set the number of exited child status values for the shell to + remember. Bash will not allow this value to be decreased below a + POSIX-mandated minimum, and there is a maximum value (currently + 8192) that this may not exceed. The minimum value is + system-dependent. + +'COLUMNS' + Used by the 'select' command to determine the terminal width when + printing selection lists. Automatically set if the 'checkwinsize' + option is enabled (*note The Shopt Builtin::), or in an interactive + shell upon receipt of a 'SIGWINCH'. + +'COMP_CWORD' + An index into '${COMP_WORDS}' of the word containing the current + cursor position. This variable is available only in shell + functions invoked by the programmable completion facilities (*note + Programmable Completion::). + +'COMP_LINE' + The current command line. This variable is available only in shell + functions and external commands invoked by the programmable + completion facilities (*note Programmable Completion::). + +'COMP_POINT' + The index of the current cursor position relative to the beginning + of the current command. If the current cursor position is at the + end of the current command, the value of this variable is equal to + '${#COMP_LINE}'. This variable is available only in shell + functions and external commands invoked by the programmable + completion facilities (*note Programmable Completion::). + +'COMP_TYPE' + Set to an integer value corresponding to the type of completion + attempted that caused a completion function to be called: TAB, for + normal completion, '?', for listing completions after successive + tabs, '!', for listing alternatives on partial word completion, + '@', to list completions if the word is not unmodified, or '%', for + menu completion. This variable is available only in shell + functions and external commands invoked by the programmable + completion facilities (*note Programmable Completion::). + +'COMP_KEY' + The key (or final key of a key sequence) used to invoke the current + completion function. + +'COMP_WORDBREAKS' + The set of characters that the Readline library treats as word + separators when performing word completion. If 'COMP_WORDBREAKS' + is unset, it loses its special properties, even if it is + subsequently reset. + +'COMP_WORDS' + An array variable consisting of the individual words in the current + command line. The line is split into words as Readline would split + it, using 'COMP_WORDBREAKS' as described above. This variable is + available only in shell functions invoked by the programmable + completion facilities (*note Programmable Completion::). + +'COMPREPLY' + An array variable from which Bash reads the possible completions + generated by a shell function invoked by the programmable + completion facility (*note Programmable Completion::). Each array + element contains one possible completion. + +'COPROC' + An array variable created to hold the file descriptors for output + from and input to an unnamed coprocess (*note Coprocesses::). + +'DIRSTACK' + An array variable containing the current contents of the directory + stack. Directories appear in the stack in the order they are + displayed by the 'dirs' builtin. Assigning to members of this + array variable may be used to modify directories already in the + stack, but the 'pushd' and 'popd' builtins must be used to add and + remove directories. Assignment to this variable will not change + the current directory. If 'DIRSTACK' is unset, it loses its + special properties, even if it is subsequently reset. + +'EMACS' + If Bash finds this variable in the environment when the shell + starts with value 't', it assumes that the shell is running in an + Emacs shell buffer and disables line editing. + +'ENV' + Expanded and executed similarlty to 'BASH_ENV' (*note Bash Startup + Files::) when an interactive shell is invoked in POSIX Mode (*note + Bash POSIX Mode::). + +'EPOCHREALTIME' + Each time this parameter is referenced, it expands to the number of + seconds since the Unix Epoch as a floating point value with + micro-second granularity (see the documentation for the C library + function TIME for the definition of Epoch). Assignments to + 'EPOCHREALTIME' are ignored. If 'EPOCHREALTIME' is unset, it loses + its special properties, even if it is subsequently reset. + +'EPOCHSECONDS' + Each time this parameter is referenced, it expands to the number of + seconds since the Unix Epoch (see the documentation for the C + library function TIME for the definition of Epoch). Assignments to + 'EPOCHSECONDS' are ignored. If 'EPOCHSECONDS' is unset, it loses + its special properties, even if it is subsequently reset. + +'EUID' + The numeric effective user id of the current user. This variable + is readonly. + +'EXECIGNORE' + A colon-separated list of shell patterns (*note Pattern Matching::) + defining the list of filenames to be ignored by command search + using 'PATH'. Files whose full pathnames match one of these + patterns are not considered executable files for the purposes of + completion and command execution via 'PATH' lookup. This does not + affect the behavior of the '[', 'test', and '[[' commands. Full + pathnames in the command hash table are not subject to + 'EXECIGNORE'. Use this variable to ignore shared library files + that have the executable bit set, but are not executable files. + The pattern matching honors the setting of the 'extglob' shell + option. + +'FCEDIT' + The editor used as a default by the '-e' option to the 'fc' builtin + command. + +'FIGNORE' + A colon-separated list of suffixes to ignore when performing + filename completion. A filename whose suffix matches one of the + entries in 'FIGNORE' is excluded from the list of matched + filenames. A sample value is '.o:~' + +'FUNCNAME' + An array variable containing the names of all shell functions + currently in the execution call stack. The element with index 0 is + the name of any currently-executing shell function. The + bottom-most element (the one with the highest index) is '"main"'. + This variable exists only when a shell function is executing. + Assignments to 'FUNCNAME' have no effect. If 'FUNCNAME' is unset, + it loses its special properties, even if it is subsequently reset. + + This variable can be used with 'BASH_LINENO' and 'BASH_SOURCE'. + Each element of 'FUNCNAME' has corresponding elements in + 'BASH_LINENO' and 'BASH_SOURCE' to describe the call stack. For + instance, '${FUNCNAME[$i]}' was called from the file + '${BASH_SOURCE[$i+1]}' at line number '${BASH_LINENO[$i]}'. The + 'caller' builtin displays the current call stack using this + information. + +'FUNCNEST' + If set to a numeric value greater than 0, defines a maximum + function nesting level. Function invocations that exceed this + nesting level will cause the current command to abort. + +'GLOBIGNORE' + A colon-separated list of patterns defining the set of file names + to be ignored by filename expansion. If a file name matched by a + filename expansion pattern also matches one of the patterns in + 'GLOBIGNORE', it is removed from the list of matches. The pattern + matching honors the setting of the 'extglob' shell option. + +'GROUPS' + An array variable containing the list of groups of which the + current user is a member. Assignments to 'GROUPS' have no effect. + If 'GROUPS' is unset, it loses its special properties, even if it + is subsequently reset. + +'histchars' + Up to three characters which control history expansion, quick + substitution, and tokenization (*note History Interaction::). The + first character is the HISTORY EXPANSION character, that is, the + character which signifies the start of a history expansion, + normally '!'. The second character is the character which + signifies 'quick substitution' when seen as the first character on + a line, normally '^'. The optional third character is the + character which indicates that the remainder of the line is a + comment when found as the first character of a word, usually '#'. + The history comment character causes history substitution to be + skipped for the remaining words on the line. It does not + necessarily cause the shell parser to treat the rest of the line as + a comment. + +'HISTCMD' + The history number, or index in the history list, of the current + command. Assignments to 'HISTCMD' are ignored. If 'HISTCMD' is + unset, it loses its special properties, even if it is subsequently + reset. + +'HISTCONTROL' + A colon-separated list of values controlling how commands are saved + on the history list. If the list of values includes 'ignorespace', + lines which begin with a space character are not saved in the + history list. A value of 'ignoredups' causes lines which match the + previous history entry to not be saved. A value of 'ignoreboth' is + shorthand for 'ignorespace' and 'ignoredups'. A value of + 'erasedups' causes all previous lines matching the current line to + be removed from the history list before that line is saved. Any + value not in the above list is ignored. If 'HISTCONTROL' is unset, + or does not include a valid value, all lines read by the shell + parser are saved on the history list, subject to the value of + 'HISTIGNORE'. The second and subsequent lines of a multi-line + compound command are not tested, and are added to the history + regardless of the value of 'HISTCONTROL'. + +'HISTFILE' + The name of the file to which the command history is saved. The + default value is '~/.bash_history'. + +'HISTFILESIZE' + The maximum number of lines contained in the history file. When + this variable is assigned a value, the history file is truncated, + if necessary, to contain no more than that number of lines by + removing the oldest entries. The history file is also truncated to + this size after writing it when a shell exits. If the value is 0, + the history file is truncated to zero size. Non-numeric values and + numeric values less than zero inhibit truncation. The shell sets + the default value to the value of 'HISTSIZE' after reading any + startup files. + +'HISTIGNORE' + A colon-separated list of patterns used to decide which command + lines should be saved on the history list. Each pattern is + anchored at the beginning of the line and must match the complete + line (no implicit '*' is appended). Each pattern is tested against + the line after the checks specified by 'HISTCONTROL' are applied. + In addition to the normal shell pattern matching characters, '&' + matches the previous history line. '&' may be escaped using a + backslash; the backslash is removed before attempting a match. The + second and subsequent lines of a multi-line compound command are + not tested, and are added to the history regardless of the value of + 'HISTIGNORE'. The pattern matching honors the setting of the + 'extglob' shell option. + + 'HISTIGNORE' subsumes the function of 'HISTCONTROL'. A pattern of + '&' is identical to 'ignoredups', and a pattern of '[ ]*' is + identical to 'ignorespace'. Combining these two patterns, + separating them with a colon, provides the functionality of + 'ignoreboth'. + +'HISTSIZE' + The maximum number of commands to remember on the history list. If + the value is 0, commands are not saved in the history list. + Numeric values less than zero result in every command being saved + on the history list (there is no limit). The shell sets the + default value to 500 after reading any startup files. + +'HISTTIMEFORMAT' + If this variable is set and not null, its value is used as a format + string for STRFTIME to print the time stamp associated with each + history entry displayed by the 'history' builtin. If this variable + is set, time stamps are written to the history file so they may be + preserved across shell sessions. This uses the history comment + character to distinguish timestamps from other history lines. + +'HOSTFILE' + Contains the name of a file in the same format as '/etc/hosts' that + should be read when the shell needs to complete a hostname. The + list of possible hostname completions may be changed while the + shell is running; the next time hostname completion is attempted + after the value is changed, Bash adds the contents of the new file + to the existing list. If 'HOSTFILE' is set, but has no value, or + does not name a readable file, Bash attempts to read '/etc/hosts' + to obtain the list of possible hostname completions. When + 'HOSTFILE' is unset, the hostname list is cleared. + +'HOSTNAME' + The name of the current host. + +'HOSTTYPE' + A string describing the machine Bash is running on. + +'IGNOREEOF' + Controls the action of the shell on receipt of an 'EOF' character + as the sole input. If set, the value denotes the number of + consecutive 'EOF' characters that can be read as the first + character on an input line before the shell will exit. If the + variable exists but does not have a numeric value, or has no value, + then the default is 10. If the variable does not exist, then 'EOF' + signifies the end of input to the shell. This is only in effect + for interactive shells. + +'INPUTRC' + The name of the Readline initialization file, overriding the + default of '~/.inputrc'. + +'INSIDE_EMACS' + If Bash finds this variable in the environment when the shell + starts, it assumes that the shell is running in an Emacs shell + buffer and may disable line editing depending on the value of + 'TERM'. + +'LANG' + Used to determine the locale category for any category not + specifically selected with a variable starting with 'LC_'. + +'LC_ALL' + This variable overrides the value of 'LANG' and any other 'LC_' + variable specifying a locale category. + +'LC_COLLATE' + This variable determines the collation order used when sorting the + results of filename expansion, and determines the behavior of range + expressions, equivalence classes, and collating sequences within + filename expansion and pattern matching (*note Filename + Expansion::). + +'LC_CTYPE' + This variable determines the interpretation of characters and the + behavior of character classes within filename expansion and pattern + matching (*note Filename Expansion::). + +'LC_MESSAGES' + This variable determines the locale used to translate double-quoted + strings preceded by a '$' (*note Locale Translation::). + +'LC_NUMERIC' + This variable determines the locale category used for number + formatting. + +'LC_TIME' + This variable determines the locale category used for data and time + formatting. + +'LINENO' + The line number in the script or shell function currently + executing. If 'LINENO' is unset, it loses its special properties, + even if it is subsequently reset. + +'LINES' + Used by the 'select' command to determine the column length for + printing selection lists. Automatically set if the 'checkwinsize' + option is enabled (*note The Shopt Builtin::), or in an interactive + shell upon receipt of a 'SIGWINCH'. + +'MACHTYPE' + A string that fully describes the system type on which Bash is + executing, in the standard GNU CPU-COMPANY-SYSTEM format. + +'MAILCHECK' + How often (in seconds) that the shell should check for mail in the + files specified in the 'MAILPATH' or 'MAIL' variables. The default + is 60 seconds. When it is time to check for mail, the shell does + so before displaying the primary prompt. If this variable is + unset, or set to a value that is not a number greater than or equal + to zero, the shell disables mail checking. + +'MAPFILE' + An array variable created to hold the text read by the 'mapfile' + builtin when no variable name is supplied. + +'OLDPWD' + The previous working directory as set by the 'cd' builtin. + +'OPTERR' + If set to the value 1, Bash displays error messages generated by + the 'getopts' builtin command. + +'OSTYPE' + A string describing the operating system Bash is running on. + +'PIPESTATUS' + An array variable (*note Arrays::) containing a list of exit status + values from the processes in the most-recently-executed foreground + pipeline (which may contain only a single command). + +'POSIXLY_CORRECT' + If this variable is in the environment when Bash starts, the shell + enters POSIX mode (*note Bash POSIX Mode::) before reading the + startup files, as if the '--posix' invocation option had been + supplied. If it is set while the shell is running, Bash enables + POSIX mode, as if the command + set -o posix + had been executed. When the shell enters POSIX mode, it sets this + variable if it was not already set. + +'PPID' + The process ID of the shell's parent process. This variable is + readonly. + +'PROMPT_COMMAND' + If this variable is set, and is an array, the value of each set + element is interpreted as a command to execute before printing the + primary prompt ('$PS1'). If this is set but not an array variable, + its value is used as a command to execute instead. + +'PROMPT_DIRTRIM' + If set to a number greater than zero, the value is used as the + number of trailing directory components to retain when expanding + the '\w' and '\W' prompt string escapes (*note Controlling the + Prompt::). Characters removed are replaced with an ellipsis. + +'PS0' + The value of this parameter is expanded like 'PS1' and displayed by + interactive shells after reading a command and before the command + is executed. + +'PS3' + The value of this variable is used as the prompt for the 'select' + command. If this variable is not set, the 'select' command prompts + with '#? ' + +'PS4' + The value of this parameter is expanded like PS1 and the expanded + value is the prompt printed before the command line is echoed when + the '-x' option is set (*note The Set Builtin::). The first + character of the expanded value is replicated multiple times, as + necessary, to indicate multiple levels of indirection. The default + is '+ '. + +'PWD' + The current working directory as set by the 'cd' builtin. + +'RANDOM' + Each time this parameter is referenced, it expands to a random + integer between 0 and 32767. Assigning a value to this variable + seeds the random number generator. If 'RANDOM' is unset, it loses + its special properties, even if it is subsequently reset. + +'READLINE_LINE' + The contents of the Readline line buffer, for use with 'bind -x' + (*note Bash Builtins::). + +'READLINE_MARK' + The position of the MARK (saved insertion point) in the Readline + line buffer, for use with 'bind -x' (*note Bash Builtins::). The + characters between the insertion point and the mark are often + called the REGION. + +'READLINE_POINT' + The position of the insertion point in the Readline line buffer, + for use with 'bind -x' (*note Bash Builtins::). + +'REPLY' + The default variable for the 'read' builtin. + +'SECONDS' + This variable expands to the number of seconds since the shell was + started. Assignment to this variable resets the count to the value + assigned, and the expanded value becomes the value assigned plus + the number of seconds since the assignment. The number of seconds + at shell invocation and the current time is always determined by + querying the system clock. If 'SECONDS' is unset, it loses its + special properties, even if it is subsequently reset. + +'SHELL' + This environment variable expands to the full pathname to the + shell. If it is not set when the shell starts, Bash assigns to it + the full pathname of the current user's login shell. + +'SHELLOPTS' + A colon-separated list of enabled shell options. Each word in the + list is a valid argument for the '-o' option to the 'set' builtin + command (*note The Set Builtin::). The options appearing in + 'SHELLOPTS' are those reported as 'on' by 'set -o'. If this + variable is in the environment when Bash starts up, each shell + option in the list will be enabled before reading any startup + files. This variable is readonly. + +'SHLVL' + Incremented by one each time a new instance of Bash is started. + This is intended to be a count of how deeply your Bash shells are + nested. + +'SRANDOM' + This variable expands to a 32-bit pseudo-random number each time it + is referenced. The random number generator is not linear on + systems that support '/dev/urandom' or 'arc4random', so each + returned number has no relationship to the numbers preceding it. + The random number generator cannot be seeded, so assignments to + this variable have no effect. If 'SRANDOM' is unset, it loses its + special properties, even if it is subsequently reset. + +'TIMEFORMAT' + The value of this parameter is used as a format string specifying + how the timing information for pipelines prefixed with the 'time' + reserved word should be displayed. The '%' character introduces an + escape sequence that is expanded to a time value or other + information. The escape sequences and their meanings are as + follows; the braces denote optional portions. + + '%%' + A literal '%'. + + '%[P][l]R' + The elapsed time in seconds. + + '%[P][l]U' + The number of CPU seconds spent in user mode. + + '%[P][l]S' + The number of CPU seconds spent in system mode. + + '%P' + The CPU percentage, computed as (%U + %S) / %R. + + The optional P is a digit specifying the precision, the number of + fractional digits after a decimal point. A value of 0 causes no + decimal point or fraction to be output. At most three places after + the decimal point may be specified; values of P greater than 3 are + changed to 3. If P is not specified, the value 3 is used. + + The optional 'l' specifies a longer format, including minutes, of + the form MMmSS.FFs. The value of P determines whether or not the + fraction is included. + + If this variable is not set, Bash acts as if it had the value + $'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS' + If the value is null, no timing information is displayed. A + trailing newline is added when the format string is displayed. + +'TMOUT' + If set to a value greater than zero, 'TMOUT' is treated as the + default timeout for the 'read' builtin (*note Bash Builtins::). + The 'select' command (*note Conditional Constructs::) terminates if + input does not arrive after 'TMOUT' seconds when input is coming + from a terminal. + + In an interactive shell, the value is interpreted as the number of + seconds to wait for a line of input after issuing the primary + prompt. Bash terminates after waiting for that number of seconds + if a complete line of input does not arrive. + +'TMPDIR' + If set, Bash uses its value as the name of a directory in which + Bash creates temporary files for the shell's use. + +'UID' + The numeric real user id of the current user. This variable is + readonly. + + +File: bash.info, Node: Bash Features, Next: Job Control, Prev: Shell Variables, Up: Top + +6 Bash Features +*************** + +This chapter describes features unique to Bash. + +* Menu: + +* Invoking Bash:: Command line options that you can give + to Bash. +* Bash Startup Files:: When and how Bash executes scripts. +* Interactive Shells:: What an interactive shell is. +* Bash Conditional Expressions:: Primitives used in composing expressions for + the 'test' builtin. +* Shell Arithmetic:: Arithmetic on shell variables. +* Aliases:: Substituting one command for another. +* Arrays:: Array Variables. +* The Directory Stack:: History of visited directories. +* Controlling the Prompt:: Customizing the various prompt strings. +* The Restricted Shell:: A more controlled mode of shell execution. +* Bash POSIX Mode:: Making Bash behave more closely to what + the POSIX standard specifies. +* Shell Compatibility Mode:: How Bash supports behavior that was present + in earlier versions and has changed. + + +File: bash.info, Node: Invoking Bash, Next: Bash Startup Files, Up: Bash Features + +6.1 Invoking Bash +================= + + bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION] + [-O SHOPT_OPTION] [ARGUMENT ...] + bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o OPTION] + [-O SHOPT_OPTION] -c STRING [ARGUMENT ...] + bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o OPTION] + [-O SHOPT_OPTION] [ARGUMENT ...] + + All of the single-character options used with the 'set' builtin +(*note The Set Builtin::) can be used as options when the shell is +invoked. In addition, there are several multi-character options that +you can use. These options must appear on the command line before the +single-character options to be recognized. + +'--debugger' + Arrange for the debugger profile to be executed before the shell + starts. Turns on extended debugging mode (see *note The Shopt + Builtin:: for a description of the 'extdebug' option to the 'shopt' + builtin). + +'--dump-po-strings' + A list of all double-quoted strings preceded by '$' is printed on + the standard output in the GNU 'gettext' PO (portable object) file + format. Equivalent to '-D' except for the output format. + +'--dump-strings' + Equivalent to '-D'. + +'--help' + Display a usage message on standard output and exit successfully. + +'--init-file FILENAME' +'--rcfile FILENAME' + Execute commands from FILENAME (instead of '~/.bashrc') in an + interactive shell. + +'--login' + Equivalent to '-l'. + +'--noediting' + Do not use the GNU Readline library (*note Command Line Editing::) + to read command lines when the shell is interactive. + +'--noprofile' + Don't load the system-wide startup file '/etc/profile' or any of + the personal initialization files '~/.bash_profile', + '~/.bash_login', or '~/.profile' when Bash is invoked as a login + shell. + +'--norc' + Don't read the '~/.bashrc' initialization file in an interactive + shell. This is on by default if the shell is invoked as 'sh'. + +'--posix' + Change the behavior of Bash where the default operation differs + from the POSIX standard to match the standard. This is intended to + make Bash behave as a strict superset of that standard. *Note Bash + POSIX Mode::, for a description of the Bash POSIX mode. + +'--restricted' + Make the shell a restricted shell (*note The Restricted Shell::). + +'--verbose' + Equivalent to '-v'. Print shell input lines as they're read. + +'--version' + Show version information for this instance of Bash on the standard + output and exit successfully. + + There are several single-character options that may be supplied at +invocation which are not available with the 'set' builtin. + +'-c' + Read and execute commands from the first non-option argument + COMMAND_STRING, then exit. If there are arguments after the + COMMAND_STRING, the first argument is assigned to '$0' and any + remaining arguments are assigned to the positional parameters. The + assignment to '$0' sets the name of the shell, which is used in + warning and error messages. + +'-i' + Force the shell to run interactively. Interactive shells are + described in *note Interactive Shells::. + +'-l' + Make this shell act as if it had been directly invoked by login. + When the shell is interactive, this is equivalent to starting a + login shell with 'exec -l bash'. When the shell is not + interactive, the login shell startup files will be executed. 'exec + bash -l' or 'exec bash --login' will replace the current shell with + a Bash login shell. *Note Bash Startup Files::, for a description + of the special behavior of a login shell. + +'-r' + Make the shell a restricted shell (*note The Restricted Shell::). + +'-s' + If this option is present, or if no arguments remain after option + processing, then commands are read from the standard input. This + option allows the positional parameters to be set when invoking an + interactive shell or when reading input through a pipe. + +'-D' + A list of all double-quoted strings preceded by '$' is printed on + the standard output. These are the strings that are subject to + language translation when the current locale is not 'C' or 'POSIX' + (*note Locale Translation::). This implies the '-n' option; no + commands will be executed. + +'[-+]O [SHOPT_OPTION]' + SHOPT_OPTION is one of the shell options accepted by the 'shopt' + builtin (*note The Shopt Builtin::). If SHOPT_OPTION is present, + '-O' sets the value of that option; '+O' unsets it. If + SHOPT_OPTION is not supplied, the names and values of the shell + options accepted by 'shopt' are printed on the standard output. If + the invocation option is '+O', the output is displayed in a format + that may be reused as input. + +'--' + A '--' signals the end of options and disables further option + processing. Any arguments after the '--' are treated as filenames + and arguments. + + A _login_ shell is one whose first character of argument zero is '-', +or one invoked with the '--login' option. + + An _interactive_ shell is one started without non-option arguments, +unless '-s' is specified, without specifying the '-c' option, and whose +input and output are both connected to terminals (as determined by +'isatty(3)'), or one started with the '-i' option. *Note Interactive +Shells::, for more information. + + If arguments remain after option processing, and neither the '-c' nor +the '-s' option has been supplied, the first argument is assumed to be +the name of a file containing shell commands (*note Shell Scripts::). +When Bash is invoked in this fashion, '$0' is set to the name of the +file, and the positional parameters are set to the remaining arguments. +Bash reads and executes commands from this file, then exits. Bash's +exit status is the exit status of the last command executed in the +script. If no commands are executed, the exit status is 0. + + +File: bash.info, Node: Bash Startup Files, Next: Interactive Shells, Prev: Invoking Bash, Up: Bash Features + +6.2 Bash Startup Files +====================== + +This section describes how Bash executes its startup files. If any of +the files exist but cannot be read, Bash reports an error. Tildes are +expanded in filenames as described above under Tilde Expansion (*note +Tilde Expansion::). + + Interactive shells are described in *note Interactive Shells::. + +Invoked as an interactive login shell, or with '--login' +........................................................ + +When Bash is invoked as an interactive login shell, or as a +non-interactive shell with the '--login' option, it first reads and +executes commands from the file '/etc/profile', if that file exists. +After reading that file, it looks for '~/.bash_profile', +'~/.bash_login', and '~/.profile', in that order, and reads and executes +commands from the first one that exists and is readable. The +'--noprofile' option may be used when the shell is started to inhibit +this behavior. + + When an interactive login shell exits, or a non-interactive login +shell executes the 'exit' builtin command, Bash reads and executes +commands from the file '~/.bash_logout', if it exists. + +Invoked as an interactive non-login shell +......................................... + +When an interactive shell that is not a login shell is started, Bash +reads and executes commands from '~/.bashrc', if that file exists. This +may be inhibited by using the '--norc' option. The '--rcfile FILE' +option will force Bash to read and execute commands from FILE instead of +'~/.bashrc'. + + So, typically, your '~/.bash_profile' contains the line + if [ -f ~/.bashrc ]; then . ~/.bashrc; fi +after (or before) any login-specific initializations. + +Invoked non-interactively +......................... + +When Bash is started non-interactively, to run a shell script, for +example, it looks for the variable 'BASH_ENV' in the environment, +expands its value if it appears there, and uses the expanded value as +the name of a file to read and execute. Bash behaves as if the +following command were executed: + if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi +but the value of the 'PATH' variable is not used to search for the +filename. + + As noted above, if a non-interactive shell is invoked with the +'--login' option, Bash attempts to read and execute commands from the +login shell startup files. + +Invoked with name 'sh' +...................... + +If Bash is invoked with the name 'sh', it tries to mimic the startup +behavior of historical versions of 'sh' as closely as possible, while +conforming to the POSIX standard as well. + + When invoked as an interactive login shell, or as a non-interactive +shell with the '--login' option, it first attempts to read and execute +commands from '/etc/profile' and '~/.profile', in that order. The +'--noprofile' option may be used to inhibit this behavior. When invoked +as an interactive shell with the name 'sh', Bash looks for the variable +'ENV', expands its value if it is defined, and uses the expanded value +as the name of a file to read and execute. Since a shell invoked as +'sh' does not attempt to read and execute commands from any other +startup files, the '--rcfile' option has no effect. A non-interactive +shell invoked with the name 'sh' does not attempt to read any other +startup files. + + When invoked as 'sh', Bash enters POSIX mode after the startup files +are read. + +Invoked in POSIX mode +..................... + +When Bash is started in POSIX mode, as with the '--posix' command line +option, it follows the POSIX standard for startup files. In this mode, +interactive shells expand the 'ENV' variable and commands are read and +executed from the file whose name is the expanded value. No other +startup files are read. + +Invoked by remote shell daemon +.............................. + +Bash attempts to determine when it is being run with its standard input +connected to a network connection, as when executed by the remote shell +daemon, usually 'rshd', or the secure shell daemon 'sshd'. If Bash +determines it is being run in this fashion, it reads and executes +commands from '~/.bashrc', if that file exists and is readable. It will +not do this if invoked as 'sh'. The '--norc' option may be used to +inhibit this behavior, and the '--rcfile' option may be used to force +another file to be read, but neither 'rshd' nor 'sshd' generally invoke +the shell with those options or allow them to be specified. + +Invoked with unequal effective and real UID/GIDs +................................................ + +If Bash is started with the effective user (group) id not equal to the +real user (group) id, and the '-p' option is not supplied, no startup +files are read, shell functions are not inherited from the environment, +the 'SHELLOPTS', 'BASHOPTS', 'CDPATH', and 'GLOBIGNORE' variables, if +they appear in the environment, are ignored, and the effective user id +is set to the real user id. If the '-p' option is supplied at +invocation, the startup behavior is the same, but the effective user id +is not reset. + + +File: bash.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features + +6.3 Interactive Shells +====================== + +* Menu: + +* What is an Interactive Shell?:: What determines whether a shell is Interactive. +* Is this Shell Interactive?:: How to tell if a shell is interactive. +* Interactive Shell Behavior:: What changes in a interactive shell? + + +File: bash.info, Node: What is an Interactive Shell?, Next: Is this Shell Interactive?, Up: Interactive Shells + +6.3.1 What is an Interactive Shell? +----------------------------------- + +An interactive shell is one started without non-option arguments, unless +'-s' is specified, without specifying the '-c' option, and whose input +and error output are both connected to terminals (as determined by +'isatty(3)'), or one started with the '-i' option. + + An interactive shell generally reads from and writes to a user's +terminal. + + The '-s' invocation option may be used to set the positional +parameters when an interactive shell is started. + + +File: bash.info, Node: Is this Shell Interactive?, Next: Interactive Shell Behavior, Prev: What is an Interactive Shell?, Up: Interactive Shells + +6.3.2 Is this Shell Interactive? +-------------------------------- + +To determine within a startup script whether or not Bash is running +interactively, test the value of the '-' special parameter. It contains +'i' when the shell is interactive. For example: + + case "$-" in + *i*) echo This shell is interactive ;; + *) echo This shell is not interactive ;; + esac + + Alternatively, startup scripts may examine the variable 'PS1'; it is +unset in non-interactive shells, and set in interactive shells. Thus: + + if [ -z "$PS1" ]; then + echo This shell is not interactive + else + echo This shell is interactive + fi + + +File: bash.info, Node: Interactive Shell Behavior, Prev: Is this Shell Interactive?, Up: Interactive Shells + +6.3.3 Interactive Shell Behavior +-------------------------------- + +When the shell is running interactively, it changes its behavior in +several ways. + + 1. Startup files are read and executed as described in *note Bash + Startup Files::. + + 2. Job Control (*note Job Control::) is enabled by default. When job + control is in effect, Bash ignores the keyboard-generated job + control signals 'SIGTTIN', 'SIGTTOU', and 'SIGTSTP'. + + 3. Bash expands and displays 'PS1' before reading the first line of a + command, and expands and displays 'PS2' before reading the second + and subsequent lines of a multi-line command. Bash expands and + displays 'PS0' after it reads a command but before executing it. + See *note Controlling the Prompt::, for a complete list of prompt + string escape sequences. + + 4. Bash executes the values of the set elements of the + 'PROMPT_COMMANDS' array variable as commands before printing the + primary prompt, '$PS1' (*note Bash Variables::). + + 5. Readline (*note Command Line Editing::) is used to read commands + from the user's terminal. + + 6. Bash inspects the value of the 'ignoreeof' option to 'set -o' + instead of exiting immediately when it receives an 'EOF' on its + standard input when reading a command (*note The Set Builtin::). + + 7. Command history (*note Bash History Facilities::) and history + expansion (*note History Interaction::) are enabled by default. + Bash will save the command history to the file named by '$HISTFILE' + when a shell with history enabled exits. + + 8. Alias expansion (*note Aliases::) is performed by default. + + 9. In the absence of any traps, Bash ignores 'SIGTERM' (*note + Signals::). + + 10. In the absence of any traps, 'SIGINT' is caught and handled (*note + Signals::). 'SIGINT' will interrupt some shell builtins. + + 11. An interactive login shell sends a 'SIGHUP' to all jobs on exit if + the 'huponexit' shell option has been enabled (*note Signals::). + + 12. The '-n' invocation option is ignored, and 'set -n' has no effect + (*note The Set Builtin::). + + 13. Bash will check for mail periodically, depending on the values of + the 'MAIL', 'MAILPATH', and 'MAILCHECK' shell variables (*note Bash + Variables::). + + 14. Expansion errors due to references to unbound shell variables + after 'set -u' has been enabled will not cause the shell to exit + (*note The Set Builtin::). + + 15. The shell will not exit on expansion errors caused by VAR being + unset or null in '${VAR:?WORD}' expansions (*note Shell Parameter + Expansion::). + + 16. Redirection errors encountered by shell builtins will not cause + the shell to exit. + + 17. When running in POSIX mode, a special builtin returning an error + status will not cause the shell to exit (*note Bash POSIX Mode::). + + 18. A failed 'exec' will not cause the shell to exit (*note Bourne + Shell Builtins::). + + 19. Parser syntax errors will not cause the shell to exit. + + 20. Simple spelling correction for directory arguments to the 'cd' + builtin is enabled by default (see the description of the 'cdspell' + option to the 'shopt' builtin in *note The Shopt Builtin::). + + 21. The shell will check the value of the 'TMOUT' variable and exit if + a command is not read within the specified number of seconds after + printing '$PS1' (*note Bash Variables::). + + +File: bash.info, Node: Bash Conditional Expressions, Next: Shell Arithmetic, Prev: Interactive Shells, Up: Bash Features + +6.4 Bash Conditional Expressions +================================ + +Conditional expressions are used by the '[[' compound command and the +'test' and '[' builtin commands. The 'test' and '[' commands determine +their behavior based on the number of arguments; see the descriptions of +those commands for any other command-specific actions. + + Expressions may be unary or binary, and are formed from the following +primaries. Unary expressions are often used to examine the status of a +file. There are string operators and numeric comparison operators as +well. Bash handles several filenames specially when they are used in +expressions. If the operating system on which Bash is running provides +these special files, Bash will use them; otherwise it will emulate them +internally with this behavior: If the FILE argument to one of the +primaries is of the form '/dev/fd/N', then file descriptor N is checked. +If the FILE argument to one of the primaries is one of '/dev/stdin', +'/dev/stdout', or '/dev/stderr', file descriptor 0, 1, or 2, +respectively, is checked. + + When used with '[[', the '<' and '>' operators sort lexicographically +using the current locale. The 'test' command uses ASCII ordering. + + Unless otherwise specified, primaries that operate on files follow +symbolic links and operate on the target of the link, rather than the +link itself. + +'-a FILE' + True if FILE exists. + +'-b FILE' + True if FILE exists and is a block special file. + +'-c FILE' + True if FILE exists and is a character special file. + +'-d FILE' + True if FILE exists and is a directory. + +'-e FILE' + True if FILE exists. + +'-f FILE' + True if FILE exists and is a regular file. + +'-g FILE' + True if FILE exists and its set-group-id bit is set. + +'-h FILE' + True if FILE exists and is a symbolic link. + +'-k FILE' + True if FILE exists and its "sticky" bit is set. + +'-p FILE' + True if FILE exists and is a named pipe (FIFO). + +'-r FILE' + True if FILE exists and is readable. + +'-s FILE' + True if FILE exists and has a size greater than zero. + +'-t FD' + True if file descriptor FD is open and refers to a terminal. + +'-u FILE' + True if FILE exists and its set-user-id bit is set. + +'-w FILE' + True if FILE exists and is writable. + +'-x FILE' + True if FILE exists and is executable. + +'-G FILE' + True if FILE exists and is owned by the effective group id. + +'-L FILE' + True if FILE exists and is a symbolic link. + +'-N FILE' + True if FILE exists and has been modified since it was last read. + +'-O FILE' + True if FILE exists and is owned by the effective user id. + +'-S FILE' + True if FILE exists and is a socket. + +'FILE1 -ef FILE2' + True if FILE1 and FILE2 refer to the same device and inode numbers. + +'FILE1 -nt FILE2' + True if FILE1 is newer (according to modification date) than FILE2, + or if FILE1 exists and FILE2 does not. + +'FILE1 -ot FILE2' + True if FILE1 is older than FILE2, or if FILE2 exists and FILE1 + does not. + +'-o OPTNAME' + True if the shell option OPTNAME is enabled. The list of options + appears in the description of the '-o' option to the 'set' builtin + (*note The Set Builtin::). + +'-v VARNAME' + True if the shell variable VARNAME is set (has been assigned a + value). + +'-R VARNAME' + True if the shell variable VARNAME is set and is a name reference. + +'-z STRING' + True if the length of STRING is zero. + +'-n STRING' +'STRING' + True if the length of STRING is non-zero. + +'STRING1 == STRING2' +'STRING1 = STRING2' + True if the strings are equal. When used with the '[[' command, + this performs pattern matching as described above (*note + Conditional Constructs::). + + '=' should be used with the 'test' command for POSIX conformance. + +'STRING1 != STRING2' + True if the strings are not equal. + +'STRING1 < STRING2' + True if STRING1 sorts before STRING2 lexicographically. + +'STRING1 > STRING2' + True if STRING1 sorts after STRING2 lexicographically. + +'ARG1 OP ARG2' + 'OP' is one of '-eq', '-ne', '-lt', '-le', '-gt', or '-ge'. These + arithmetic binary operators return true if ARG1 is equal to, not + equal to, less than, less than or equal to, greater than, or + greater than or equal to ARG2, respectively. ARG1 and ARG2 may be + positive or negative integers. When used with the '[[' command, + ARG1 and ARG2 are evaluated as arithmetic expressions (*note Shell + Arithmetic::). + + +File: bash.info, Node: Shell Arithmetic, Next: Aliases, Prev: Bash Conditional Expressions, Up: Bash Features + +6.5 Shell Arithmetic +==================== + +The shell allows arithmetic expressions to be evaluated, as one of the +shell expansions or by using the '((' compound command, the 'let' +builtin, or the '-i' option to the 'declare' builtin. + + Evaluation is done in fixed-width integers with no check for +overflow, though division by 0 is trapped and flagged as an error. The +operators and their precedence, associativity, and values are the same +as in the C language. The following list of operators is grouped into +levels of equal-precedence operators. The levels are listed in order of +decreasing precedence. + +'ID++ ID--' + variable post-increment and post-decrement + +'++ID --ID' + variable pre-increment and pre-decrement + +'- +' + unary minus and plus + +'! ~' + logical and bitwise negation + +'**' + exponentiation + +'* / %' + multiplication, division, remainder + +'+ -' + addition, subtraction + +'<< >>' + left and right bitwise shifts + +'<= >= < >' + comparison + +'== !=' + equality and inequality + +'&' + bitwise AND + +'^' + bitwise exclusive OR + +'|' + bitwise OR + +'&&' + logical AND + +'||' + logical OR + +'expr ? expr : expr' + conditional operator + +'= *= /= %= += -= <<= >>= &= ^= |=' + assignment + +'expr1 , expr2' + comma + + Shell variables are allowed as operands; parameter expansion is +performed before the expression is evaluated. Within an expression, +shell variables may also be referenced by name without using the +parameter expansion syntax. A shell variable that is null or unset +evaluates to 0 when referenced by name without using the parameter +expansion syntax. The value of a variable is evaluated as an arithmetic +expression when it is referenced, or when a variable which has been +given the INTEGER attribute using 'declare -i' is assigned a value. A +null value evaluates to 0. A shell variable need not have its INTEGER +attribute turned on to be used in an expression. + + Integer constants follow the C language definition, without suffixes +or character constants. Constants with a leading 0 are interpreted as +octal numbers. A leading '0x' or '0X' denotes hexadecimal. Otherwise, +numbers take the form [BASE'#']N, where the optional BASE is a decimal +number between 2 and 64 representing the arithmetic base, and N is a +number in that base. If BASE'#' is omitted, then base 10 is used. When +specifying N, if a non-digit is required, the digits greater than 9 are +represented by the lowercase letters, the uppercase letters, '@', and +'_', in that order. If BASE is less than or equal to 36, lowercase and +uppercase letters may be used interchangeably to represent numbers +between 10 and 35. + + Operators are evaluated in order of precedence. Sub-expressions in +parentheses are evaluated first and may override the precedence rules +above. + + +File: bash.info, Node: Aliases, Next: Arrays, Prev: Shell Arithmetic, Up: Bash Features + +6.6 Aliases +=========== + +ALIASES allow a string to be substituted for a word when it is used as +the first word of a simple command. The shell maintains a list of +aliases that may be set and unset with the 'alias' and 'unalias' builtin +commands. + + The first word of each simple command, if unquoted, is checked to see +if it has an alias. If so, that word is replaced by the text of the +alias. The characters '/', '$', '`', '=' and any of the shell +metacharacters or quoting characters listed above may not appear in an +alias name. The replacement text may contain any valid shell input, +including shell metacharacters. The first word of the replacement text +is tested for aliases, but a word that is identical to an alias being +expanded is not expanded a second time. This means that one may alias +'ls' to '"ls -F"', for instance, and Bash does not try to recursively +expand the replacement text. If the last character of the alias value +is a BLANK, then the next command word following the alias is also +checked for alias expansion. + + Aliases are created and listed with the 'alias' command, and removed +with the 'unalias' command. + + There is no mechanism for using arguments in the replacement text, as +in 'csh'. If arguments are needed, a shell function should be used +(*note Shell Functions::). + + Aliases are not expanded when the shell is not interactive, unless +the 'expand_aliases' shell option is set using 'shopt' (*note The Shopt +Builtin::). + + The rules concerning the definition and use of aliases are somewhat +confusing. Bash always reads at least one complete line of input, and +all lines that make up a compound command, before executing any of the +commands on that line or the compound command. Aliases are expanded +when a command is read, not when it is executed. Therefore, an alias +definition appearing on the same line as another command does not take +effect until the next line of input is read. The commands following the +alias definition on that line are not affected by the new alias. This +behavior is also an issue when functions are executed. Aliases are +expanded when a function definition is read, not when the function is +executed, because a function definition is itself a command. As a +consequence, aliases defined in a function are not available until after +that function is executed. To be safe, always put alias definitions on +a separate line, and do not use 'alias' in compound commands. + + For almost every purpose, shell functions are preferred over aliases. + + +File: bash.info, Node: Arrays, Next: The Directory Stack, Prev: Aliases, Up: Bash Features + +6.7 Arrays +========== + +Bash provides one-dimensional indexed and associative array variables. +Any variable may be used as an indexed array; the 'declare' builtin will +explicitly declare an array. There is no maximum limit on the size of +an array, nor any requirement that members be indexed or assigned +contiguously. Indexed arrays are referenced using integers (including +arithmetic expressions (*note Shell Arithmetic::)) and are zero-based; +associative arrays use arbitrary strings. Unless otherwise noted, +indexed array indices must be non-negative integers. + + An indexed array is created automatically if any variable is assigned +to using the syntax + NAME[SUBSCRIPT]=VALUE + +The SUBSCRIPT is treated as an arithmetic expression that must evaluate +to a number. To explicitly declare an array, use + declare -a NAME +The syntax + declare -a NAME[SUBSCRIPT] +is also accepted; the SUBSCRIPT is ignored. + +Associative arrays are created using + declare -A NAME + + Attributes may be specified for an array variable using the 'declare' +and 'readonly' builtins. Each attribute applies to all members of an +array. + + Arrays are assigned to using compound assignments of the form + NAME=(VALUE1 VALUE2 ... ) +where each VALUE may be of the form '[SUBSCRIPT]='STRING. Indexed array +assignments do not require anything but STRING. When assigning to +indexed arrays, if the optional subscript is supplied, that index is +assigned to; otherwise the index of the element assigned is the last +index assigned to by the statement plus one. Indexing starts at zero. + + Each VALUE in the list undergoes all the shell expansions described +above (*note Shell Expansions::). + + When assigning to an associative array, the words in a compound +assignment may be either assignment statements, for which the subscript +is required, or a list of words that is interpreted as a sequence of +alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). These +are treated identically to NAME=( [KEY1]=VALUE1 [KEY2]=VALUE2 ... ). +The first word in the list determines how the remaining words are +interpreted; all assignments in a list must be of the same type. When +using key/value pairs, the keys may not be missing or empty; a final +missing value is treated like the empty string. + + This syntax is also accepted by the 'declare' builtin. Individual +array elements may be assigned to using the 'NAME[SUBSCRIPT]=VALUE' +syntax introduced above. + + When assigning to an indexed array, if NAME is subscripted by a +negative number, that number is interpreted as relative to one greater +than the maximum index of NAME, so negative indices count back from the +end of the array, and an index of -1 references the last element. + + Any element of an array may be referenced using '${NAME[SUBSCRIPT]}'. +The braces are required to avoid conflicts with the shell's filename +expansion operators. If the SUBSCRIPT is '@' or '*', the word expands +to all members of the array NAME. These subscripts differ only when the +word appears within double quotes. If the word is double-quoted, +'${NAME[*]}' expands to a single word with the value of each array +member separated by the first character of the 'IFS' variable, and +'${NAME[@]}' expands each element of NAME to a separate word. When +there are no array members, '${NAME[@]}' expands to nothing. If the +double-quoted expansion occurs within a word, the expansion of the first +parameter is joined with the beginning part of the original word, and +the expansion of the last parameter is joined with the last part of the +original word. This is analogous to the expansion of the special +parameters '@' and '*'. '${#NAME[SUBSCRIPT]}' expands to the length of +'${NAME[SUBSCRIPT]}'. If SUBSCRIPT is '@' or '*', the expansion is the +number of elements in the array. If the SUBSCRIPT used to reference an +element of an indexed array evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the +array, so negative indices count back from the end of the array, and an +index of -1 refers to the last element. + + Referencing an array variable without a subscript is equivalent to +referencing with a subscript of 0. Any reference to a variable using a +valid subscript is legal, and 'bash' will create an array if necessary. + + An array variable is considered set if a subscript has been assigned +a value. The null string is a valid value. + + It is possible to obtain the keys (indices) of an array as well as +the values. ${!NAME[@]} and ${!NAME[*]} expand to the indices assigned +in array variable NAME. The treatment when in double quotes is similar +to the expansion of the special parameters '@' and '*' within double +quotes. + + The 'unset' builtin is used to destroy arrays. 'unset +NAME[SUBSCRIPT]' destroys the array element at index SUBSCRIPT. +Negative subscripts to indexed arrays are interpreted as described +above. Unsetting the last element of an array variable does not unset +the variable. 'unset NAME', where NAME is an array, removes the entire +array. A subscript of '*' or '@' also removes the entire array. + + When using a variable name with a subscript as an argument to a +command, such as with 'unset', without using the word expansion syntax +described above, the argument is subject to the shell's filename +expansion. If filename expansion is not desired, the argument should be +quoted. + + The 'declare', 'local', and 'readonly' builtins each accept a '-a' +option to specify an indexed array and a '-A' option to specify an +associative array. If both options are supplied, '-A' takes precedence. +The 'read' builtin accepts a '-a' option to assign a list of words read +from the standard input to an array, and can read values from the +standard input into individual array elements. The 'set' and 'declare' +builtins display array values in a way that allows them to be reused as +input. + + +File: bash.info, Node: The Directory Stack, Next: Controlling the Prompt, Prev: Arrays, Up: Bash Features + +6.8 The Directory Stack +======================= + +* Menu: + +* Directory Stack Builtins:: Bash builtin commands to manipulate + the directory stack. + +The directory stack is a list of recently-visited directories. The +'pushd' builtin adds directories to the stack as it changes the current +directory, and the 'popd' builtin removes specified directories from the +stack and changes the current directory to the directory removed. The +'dirs' builtin displays the contents of the directory stack. The +current directory is always the "top" of the directory stack. + + The contents of the directory stack are also visible as the value of +the 'DIRSTACK' shell variable. + + +File: bash.info, Node: Directory Stack Builtins, Up: The Directory Stack + +6.8.1 Directory Stack Builtins +------------------------------ + +'dirs' + dirs [-clpv] [+N | -N] + + Display the list of currently remembered directories. Directories + are added to the list with the 'pushd' command; the 'popd' command + removes directories from the list. The current directory is always + the first directory in the stack. + + '-c' + Clears the directory stack by deleting all of the elements. + '-l' + Produces a listing using full pathnames; the default listing + format uses a tilde to denote the home directory. + '-p' + Causes 'dirs' to print the directory stack with one entry per + line. + '-v' + Causes 'dirs' to print the directory stack with one entry per + line, prefixing each entry with its index in the stack. + '+N' + Displays the Nth directory (counting from the left of the list + printed by 'dirs' when invoked without options), starting with + zero. + '-N' + Displays the Nth directory (counting from the right of the + list printed by 'dirs' when invoked without options), starting + with zero. + +'popd' + popd [-n] [+N | -N] + + When no arguments are given, 'popd' removes the top directory from + the stack and performs a 'cd' to the new top directory. The + elements are numbered from 0 starting at the first directory listed + with 'dirs'; that is, 'popd' is equivalent to 'popd +0'. + + '-n' + Suppresses the normal change of directory when removing + directories from the stack, so that only the stack is + manipulated. + '+N' + Removes the Nth directory (counting from the left of the list + printed by 'dirs'), starting with zero. + '-N' + Removes the Nth directory (counting from the right of the list + printed by 'dirs'), starting with zero. + +'pushd' + pushd [-n] [+N | -N | DIR] + + Save the current directory on the top of the directory stack and + then 'cd' to DIR. With no arguments, 'pushd' exchanges the top two + directories and makes the new top the current directory. + + '-n' + Suppresses the normal change of directory when rotating or + adding directories to the stack, so that only the stack is + manipulated. + '+N' + Brings the Nth directory (counting from the left of the list + printed by 'dirs', starting with zero) to the top of the list + by rotating the stack. + '-N' + Brings the Nth directory (counting from the right of the list + printed by 'dirs', starting with zero) to the top of the list + by rotating the stack. + 'DIR' + Makes DIR be the top of the stack, making it the new current + directory as if it had been supplied as an argument to the + 'cd' builtin. + + +File: bash.info, Node: Controlling the Prompt, Next: The Restricted Shell, Prev: The Directory Stack, Up: Bash Features + +6.9 Controlling the Prompt +========================== + +Bash examines the value of the array variable 'PROMPT_COMMANDS' just +before printing each primary prompt. If any elements in +'PROMPT_COMMANDS' are set and non-null, Bash executes each value, in +numeric order, just as if it had been typed on the command line. + + In addition, the following table describes the special characters +which can appear in the prompt variables 'PS0', 'PS1', 'PS2', and 'PS4': + +'\a' + A bell character. +'\d' + The date, in "Weekday Month Date" format (e.g., "Tue May 26"). +'\D{FORMAT}' + The FORMAT is passed to 'strftime'(3) and the result is inserted + into the prompt string; an empty FORMAT results in a + locale-specific time representation. The braces are required. +'\e' + An escape character. +'\h' + The hostname, up to the first '.'. +'\H' + The hostname. +'\j' + The number of jobs currently managed by the shell. +'\l' + The basename of the shell's terminal device name. +'\n' + A newline. +'\r' + A carriage return. +'\s' + The name of the shell, the basename of '$0' (the portion following + the final slash). +'\t' + The time, in 24-hour HH:MM:SS format. +'\T' + The time, in 12-hour HH:MM:SS format. +'\@' + The time, in 12-hour am/pm format. +'\A' + The time, in 24-hour HH:MM format. +'\u' + The username of the current user. +'\v' + The version of Bash (e.g., 2.00) +'\V' + The release of Bash, version + patchlevel (e.g., 2.00.0) +'\w' + The current working directory, with '$HOME' abbreviated with a + tilde (uses the '$PROMPT_DIRTRIM' variable). +'\W' + The basename of '$PWD', with '$HOME' abbreviated with a tilde. +'\!' + The history number of this command. +'\#' + The command number of this command. +'\$' + If the effective uid is 0, '#', otherwise '$'. +'\NNN' + The character whose ASCII code is the octal value NNN. +'\\' + A backslash. +'\[' + Begin a sequence of non-printing characters. This could be used to + embed a terminal control sequence into the prompt. +'\]' + End a sequence of non-printing characters. + + The command number and the history number are usually different: the +history number of a command is its position in the history list, which +may include commands restored from the history file (*note Bash History +Facilities::), while the command number is the position in the sequence +of commands executed during the current shell session. + + After the string is decoded, it is expanded via parameter expansion, +command substitution, arithmetic expansion, and quote removal, subject +to the value of the 'promptvars' shell option (*note The Shopt +Builtin::). This can have unwanted side effects if escaped portions of +the string appear within command substitution or contain characters +special to word expansion. + + +File: bash.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Controlling the Prompt, Up: Bash Features + +6.10 The Restricted Shell +========================= + +If Bash is started with the name 'rbash', or the '--restricted' or '-r' +option is supplied at invocation, the shell becomes restricted. A +restricted shell is used to set up an environment more controlled than +the standard shell. A restricted shell behaves identically to 'bash' +with the exception that the following are disallowed or not performed: + + * Changing directories with the 'cd' builtin. + * Setting or unsetting the values of the 'SHELL', 'PATH', 'HISTFILE', + 'ENV', or 'BASH_ENV' variables. + * Specifying command names containing slashes. + * Specifying a filename containing a slash as an argument to the '.' + builtin command. + * Specifying a filename containing a slash as an argument to the + 'history' builtin command. + * Specifying a filename containing a slash as an argument to the '-p' + option to the 'hash' builtin command. + * Importing function definitions from the shell environment at + startup. + * Parsing the value of 'SHELLOPTS' from the shell environment at + startup. + * Redirecting output using the '>', '>|', '<>', '>&', '&>', and '>>' + redirection operators. + * Using the 'exec' builtin to replace the shell with another command. + * Adding or deleting builtin commands with the '-f' and '-d' options + to the 'enable' builtin. + * Using the 'enable' builtin command to enable disabled shell + builtins. + * Specifying the '-p' option to the 'command' builtin. + * Turning off restricted mode with 'set +r' or 'set +o restricted'. + + These restrictions are enforced after any startup files are read. + + When a command that is found to be a shell script is executed (*note +Shell Scripts::), 'rbash' turns off any restrictions in the shell +spawned to execute the script. + + The restricted shell mode is only one component of a useful +restricted environment. It should be accompanied by setting 'PATH' to a +value that allows execution of only a few verified commands (commands +that allow shell escapes are particularly vulnerable), leaving the user +in a non-writable directory other than his home directory after login, +not allowing the restricted shell to execute shell scripts, and cleaning +the environment of variables that cause some commands to modify their +behavior (e.g., 'VISUAL' or 'PAGER'). + + Modern systems provide more secure ways to implement a restricted +environment, such as 'jails', 'zones', or 'containers'. + + +File: bash.info, Node: Bash POSIX Mode, Next: Shell Compatibility Mode, Prev: The Restricted Shell, Up: Bash Features + +6.11 Bash POSIX Mode +==================== + +Starting Bash with the '--posix' command-line option or executing 'set +-o posix' while Bash is running will cause Bash to conform more closely +to the POSIX standard by changing the behavior to match that specified +by POSIX in areas where the Bash default differs. + + When invoked as 'sh', Bash enters POSIX mode after reading the +startup files. + + The following list is what's changed when 'POSIX mode' is in effect: + + 1. Bash ensures that the 'POSIXLY_CORRECT' variable is set. + + 2. When a command in the hash table no longer exists, Bash will + re-search '$PATH' to find the new location. This is also available + with 'shopt -s checkhash'. + + 3. Bash will not insert a command without the execute bit set into the + command hash table, even if it returns it as a (last-ditch) result + from a '$PATH' search. + + 4. The message printed by the job control code and builtins when a job + exits with a non-zero status is 'Done(status)'. + + 5. The message printed by the job control code and builtins when a job + is stopped is 'Stopped(SIGNAME)', where SIGNAME is, for example, + 'SIGTSTP'. + + 6. Alias expansion is always enabled, even in non-interactive shells. + + 7. Reserved words appearing in a context where reserved words are + recognized do not undergo alias expansion. + + 8. The POSIX 'PS1' and 'PS2' expansions of '!' to the history number + and '!!' to '!' are enabled, and parameter expansion is performed + on the values of 'PS1' and 'PS2' regardless of the setting of the + 'promptvars' option. + + 9. The POSIX startup files are executed ('$ENV') rather than the + normal Bash files. + + 10. Tilde expansion is only performed on assignments preceding a + command name, rather than on all assignment statements on the line. + + 11. The default history file is '~/.sh_history' (this is the default + value of '$HISTFILE'). + + 12. Redirection operators do not perform filename expansion on the + word in the redirection unless the shell is interactive. + + 13. Redirection operators do not perform word splitting on the word in + the redirection. + + 14. Function names must be valid shell 'name's. That is, they may not + contain characters other than letters, digits, and underscores, and + may not start with a digit. Declaring a function with an invalid + name causes a fatal syntax error in non-interactive shells. + + 15. Function names may not be the same as one of the POSIX special + builtins. + + 16. POSIX special builtins are found before shell functions during + command lookup. + + 17. When printing shell function definitions (e.g., by 'type'), Bash + does not print the 'function' keyword. + + 18. Literal tildes that appear as the first character in elements of + the 'PATH' variable are not expanded as described above under *note + Tilde Expansion::. + + 19. The 'time' reserved word may be used by itself as a command. When + used in this way, it displays timing statistics for the shell and + its completed children. The 'TIMEFORMAT' variable controls the + format of the timing information. + + 20. When parsing and expanding a ${...} expansion that appears within + double quotes, single quotes are no longer special and cannot be + used to quote a closing brace or other special character, unless + the operator is one of those defined to perform pattern removal. + In this case, they do not have to appear as matched pairs. + + 21. The parser does not recognize 'time' as a reserved word if the + next token begins with a '-'. + + 22. The '!' character does not introduce history expansion within a + double-quoted string, even if the 'histexpand' option is enabled. + + 23. If a POSIX special builtin returns an error status, a + non-interactive shell exits. The fatal errors are those listed in + the POSIX standard, and include things like passing incorrect + options, redirection errors, variable assignment errors for + assignments preceding the command name, and so on. + + 24. A non-interactive shell exits with an error status if a variable + assignment error occurs when no command name follows the assignment + statements. A variable assignment error occurs, for example, when + trying to assign a value to a readonly variable. + + 25. A non-interactive shell exits with an error status if a variable + assignment error occurs in an assignment statement preceding a + special builtin, but not with any other simple command. + + 26. A non-interactive shell exits with an error status if the + iteration variable in a 'for' statement or the selection variable + in a 'select' statement is a readonly variable. + + 27. Non-interactive shells exit if FILENAME in '.' FILENAME is not + found. + + 28. Non-interactive shells exit if a syntax error in an arithmetic + expansion results in an invalid expression. + + 29. Non-interactive shells exit if a parameter expansion error occurs. + + 30. Non-interactive shells exit if there is a syntax error in a script + read with the '.' or 'source' builtins, or in a string processed by + the 'eval' builtin. + + 31. While variable indirection is available, it may not be applied to + the '#' and '?' special parameters. + + 32. When expanding the '*' special parameter in a pattern context + where the expansion is double-quoted does not treat the '$*' as if + it were double-quoted. + + 33. Assignment statements preceding POSIX special builtins persist in + the shell environment after the builtin completes. + + 34. The 'command' builtin does not prevent builtins that take + assignment statements as arguments from expanding them as + assignment statements; when not in POSIX mode, assignment builtins + lose their assignment statement expansion properties when preceded + by 'command'. + + 35. The 'bg' builtin uses the required format to describe each job + placed in the background, which does not include an indication of + whether the job is the current or previous job. + + 36. The output of 'kill -l' prints all the signal names on a single + line, separated by spaces, without the 'SIG' prefix. + + 37. The 'kill' builtin does not accept signal names with a 'SIG' + prefix. + + 38. The 'export' and 'readonly' builtin commands display their output + in the format required by POSIX. + + 39. The 'trap' builtin displays signal names without the leading + 'SIG'. + + 40. The 'trap' builtin doesn't check the first argument for a possible + signal specification and revert the signal handling to the original + disposition if it is, unless that argument consists solely of + digits and is a valid signal number. If users want to reset the + handler for a given signal to the original disposition, they should + use '-' as the first argument. + + 41. 'trap -p' displays signals whose dispositions are set to SIG_DFL + and those that were ignored when the shell started. + + 42. The '.' and 'source' builtins do not search the current directory + for the filename argument if it is not found by searching 'PATH'. + + 43. Enabling POSIX mode has the effect of setting the + 'inherit_errexit' option, so subshells spawned to execute command + substitutions inherit the value of the '-e' option from the parent + shell. When the 'inherit_errexit' option is not enabled, Bash + clears the '-e' option in such subshells. + + 44. Enabling POSIX mode has the effect of setting the 'shift_verbose' + option, so numeric arguments to 'shift' that exceed the number of + positional parameters will result in an error message. + + 45. When the 'alias' builtin displays alias definitions, it does not + display them with a leading 'alias ' unless the '-p' option is + supplied. + + 46. When the 'set' builtin is invoked without options, it does not + display shell function names and definitions. + + 47. When the 'set' builtin is invoked without options, it displays + variable values without quotes, unless they contain shell + metacharacters, even if the result contains nonprinting characters. + + 48. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname + constructed from '$PWD' and the directory name supplied as an + argument does not refer to an existing directory, 'cd' will fail + instead of falling back to PHYSICAL mode. + + 49. When the 'cd' builtin cannot change a directory because the length + of the pathname constructed from '$PWD' and the directory name + supplied as an argument exceeds PATH_MAX when all symbolic links + are expanded, 'cd' will fail instead of attempting to use only the + supplied directory name. + + 50. The 'pwd' builtin verifies that the value it prints is the same as + the current directory, even if it is not asked to check the file + system with the '-P' option. + + 51. When listing the history, the 'fc' builtin does not include an + indication of whether or not a history entry has been modified. + + 52. The default editor used by 'fc' is 'ed'. + + 53. The 'type' and 'command' builtins will not report a non-executable + file as having been found, though the shell will attempt to execute + such a file if it is the only so-named file found in '$PATH'. + + 54. The 'vi' editing mode will invoke the 'vi' editor directly when + the 'v' command is run, instead of checking '$VISUAL' and + '$EDITOR'. + + 55. When the 'xpg_echo' option is enabled, Bash does not attempt to + interpret any arguments to 'echo' as options. Each argument is + displayed, after escape characters are converted. + + 56. The 'ulimit' builtin uses a block size of 512 bytes for the '-c' + and '-f' options. + + 57. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not + interrupt the 'wait' builtin and cause it to return immediately. + The trap command is run once for each child that exits. + + 58. The 'read' builtin may be interrupted by a signal for which a trap + has been set. If Bash receives a trapped signal while executing + 'read', the trap handler executes and 'read' returns an exit status + greater than 128. + + 59. Bash removes an exited background process's status from the list + of such statuses after the 'wait' builtin is used to obtain it. + + There is other POSIX behavior that Bash does not implement by default +even when in POSIX mode. Specifically: + + 1. The 'fc' builtin checks '$EDITOR' as a program to edit history + entries if 'FCEDIT' is unset, rather than defaulting directly to + 'ed'. 'fc' uses 'ed' if 'EDITOR' is unset. + + 2. As noted above, Bash requires the 'xpg_echo' option to be enabled + for the 'echo' builtin to be fully conformant. + + Bash can be configured to be POSIX-conformant by default, by +specifying the '--enable-strict-posix-default' to 'configure' when +building (*note Optional Features::). + + +File: bash.info, Node: Shell Compatibility Mode, Prev: Bash POSIX Mode, Up: Bash Features + +6.12 Shell Compatibility Mode +============================= + +Bash-4.0 introduced the concept of a 'shell compatibility level', +specified as a set of options to the shopt builtin ('compat31', +'compat32', 'compat40', 'compat41', and so on). There is only one +current compatibility level - each option is mutually exclusive. The +compatibility level is intended to allow users to select behavior from +previous versions that is incompatible with newer versions while they +migrate scripts to use current features and behavior. It's intended to +be a temporary solution. + + This section does not mention behavior that is standard for a +particular version (e.g., setting 'compat32' means that quoting the rhs +of the regexp matching operator quotes special regexp characters in the +word, which is default behavior in bash-3.2 and above). + + If a user enables, say, 'compat32', it may affect the behavior of +other compatibility levels up to and including the current compatibility +level. The idea is that each compatibility level controls behavior that +changed in that version of Bash, but that behavior may have been present +in earlier versions. For instance, the change to use locale-based +comparisons with the '[[' command came in bash-4.1, and earlier versions +used ASCII-based comparisons, so enabling 'compat32' will enable +ASCII-based comparisons as well. That granularity may not be sufficient +for all uses, and as a result users should employ compatibility levels +carefully. Read the documentation for a particular feature to find out +the current behavior. + + Bash-4.3 introduced a new shell variable: 'BASH_COMPAT'. The value +assigned to this variable (a decimal version number like 4.2, or an +integer corresponding to the 'compat'NN option, like 42) determines the +compatibility level. + + Starting with bash-4.4, Bash has begun deprecating older +compatibility levels. Eventually, the options will be removed in favor +of 'BASH_COMPAT'. + + Bash-5.0 is the final version for which there will be an individual +shopt option for the previous version. Users should use 'BASH_COMPAT' +on bash-5.0 and later versions. + + The following table describes the behavior changes controlled by each +compatibility level setting. The 'compat'NN tag is used as shorthand +for setting the compatibility level to NN using one of the following +mechanisms. For versions prior to bash-5.0, the compatibility level may +be set using the corresponding 'compat'NN shopt option. For bash-4.3 +and later versions, the 'BASH_COMPAT' variable is preferred, and it is +required for bash-5.1 and later versions. + +'compat31' + * quoting the rhs of the '[[' command's regexp matching operator + (=~) has no special effect + +'compat32' + * interrupting a command list such as "a ; b ; c" causes the + execution of the next command in the list (in bash-4.0 and + later versions, the shell acts as if it received the + interrupt, so interrupting one command in a list aborts the + execution of the entire list) + +'compat40' + * the '<' and '>' operators to the '[[' command do not consider + the current locale when comparing strings; they use ASCII + ordering. Bash versions prior to bash-4.1 use ASCII collation + and strcmp(3); bash-4.1 and later use the current locale's + collation sequence and strcoll(3). + +'compat41' + * in posix mode, 'time' may be followed by options and still be + recognized as a reserved word (this is POSIX interpretation + 267) + * in posix mode, the parser requires that an even number of + single quotes occur in the WORD portion of a double-quoted + ${...} parameter expansion and treats them specially, so that + characters within the single quotes are considered quoted + (this is POSIX interpretation 221) + +'compat42' + * the replacement string in double-quoted pattern substitution + does not undergo quote removal, as it does in versions after + bash-4.2 + * in posix mode, single quotes are considered special when + expanding the WORD portion of a double-quoted ${...} parameter + expansion and can be used to quote a closing brace or other + special character (this is part of POSIX interpretation 221); + in later versions, single quotes are not special within + double-quoted word expansions + +'compat43' + * the shell does not print a warning message if an attempt is + made to use a quoted compound assignment as an argument to + declare (declare -a foo='(1 2)'). Later versions warn that + this usage is deprecated + * word expansion errors are considered non-fatal errors that + cause the current command to fail, even in posix mode (the + default behavior is to make them fatal errors that cause the + shell to exit) + * when executing a shell function, the loop state + (while/until/etc.) is not reset, so 'break' or 'continue' in + that function will break or continue loops in the calling + context. Bash-4.4 and later reset the loop state to prevent + this + +'compat44' + * the shell sets up the values used by 'BASH_ARGV' and + 'BASH_ARGC' so they can expand to the shell's positional + parameters even if extended debugging mode is not enabled + * a subshell inherits loops from its parent context, so 'break' + or 'continue' will cause the subshell to exit. Bash-5.0 and + later reset the loop state to prevent the exit + * variable assignments preceding builtins like 'export' and + 'readonly' that set attributes continue to affect variables + with the same name in the calling environment even if the + shell is not in posix mode + +'compat50 (set using BASH_COMPAT)' + * Bash-5.1 changed the way '$RANDOM' is generated to introduce + slightly more randomness. If the shell compatibility level is + set to 50 or lower, it reverts to the method from bash-5.0 and + previous versions, so seeding the random number generator by + assigning a value to 'RANDOM' will produce the same sequence + as in bash-5.0 + * If the command hash table is empty, Bash versions prior to + bash-5.1 printed an informational message to that effect, even + when producing output that can be reused as input. Bash-5.1 + suppresses that message when the '-l' option is supplied. + + +File: bash.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top + +7 Job Control +************* + +This chapter discusses what job control is, how it works, and how Bash +allows you to access its facilities. + +* Menu: + +* Job Control Basics:: How job control works. +* Job Control Builtins:: Bash builtin commands used to interact + with job control. +* Job Control Variables:: Variables Bash uses to customize job + control. + + +File: bash.info, Node: Job Control Basics, Next: Job Control Builtins, Up: Job Control + +7.1 Job Control Basics +====================== + +Job control refers to the ability to selectively stop (suspend) the +execution of processes and continue (resume) their execution at a later +point. A user typically employs this facility via an interactive +interface supplied jointly by the operating system kernel's terminal +driver and Bash. + + The shell associates a JOB with each pipeline. It keeps a table of +currently executing jobs, which may be listed with the 'jobs' command. +When Bash starts a job asynchronously, it prints a line that looks like: + [1] 25647 +indicating that this job is job number 1 and that the process ID of the +last process in the pipeline associated with this job is 25647. All of +the processes in a single pipeline are members of the same job. Bash +uses the JOB abstraction as the basis for job control. + + To facilitate the implementation of the user interface to job +control, the operating system maintains the notion of a current terminal +process group ID. Members of this process group (processes whose +process group ID is equal to the current terminal process group ID) +receive keyboard-generated signals such as 'SIGINT'. These processes +are said to be in the foreground. Background processes are those whose +process group ID differs from the terminal's; such processes are immune +to keyboard-generated signals. Only foreground processes are allowed to +read from or, if the user so specifies with 'stty tostop', write to the +terminal. Background processes which attempt to read from (write to +when 'stty tostop' is in effect) the terminal are sent a 'SIGTTIN' +('SIGTTOU') signal by the kernel's terminal driver, which, unless +caught, suspends the process. + + If the operating system on which Bash is running supports job +control, Bash contains facilities to use it. Typing the SUSPEND +character (typically '^Z', Control-Z) while a process is running causes +that process to be stopped and returns control to Bash. Typing the +DELAYED SUSPEND character (typically '^Y', Control-Y) causes the process +to be stopped when it attempts to read input from the terminal, and +control to be returned to Bash. The user then manipulates the state of +this job, using the 'bg' command to continue it in the background, the +'fg' command to continue it in the foreground, or the 'kill' command to +kill it. A '^Z' takes effect immediately, and has the additional side +effect of causing pending output and typeahead to be discarded. + + There are a number of ways to refer to a job in the shell. The +character '%' introduces a job specification (JOBSPEC). + + Job number 'n' may be referred to as '%n'. The symbols '%%' and '%+' +refer to the shell's notion of the current job, which is the last job +stopped while it was in the foreground or started in the background. A +single '%' (with no accompanying job specification) also refers to the +current job. The previous job may be referenced using '%-'. If there +is only a single job, '%+' and '%-' can both be used to refer to that +job. In output pertaining to jobs (e.g., the output of the 'jobs' +command), the current job is always flagged with a '+', and the previous +job with a '-'. + + A job may also be referred to using a prefix of the name used to +start it, or using a substring that appears in its command line. For +example, '%ce' refers to a stopped job whose command name begins with +'ce'. Using '%?ce', on the other hand, refers to any job containing the +string 'ce' in its command line. If the prefix or substring matches +more than one job, Bash reports an error. + + Simply naming a job can be used to bring it into the foreground: '%1' +is a synonym for 'fg %1', bringing job 1 from the background into the +foreground. Similarly, '%1 &' resumes job 1 in the background, +equivalent to 'bg %1' + + The shell learns immediately whenever a job changes state. Normally, +Bash waits until it is about to print a prompt before reporting changes +in a job's status so as to not interrupt any other output. If the '-b' +option to the 'set' builtin is enabled, Bash reports such changes +immediately (*note The Set Builtin::). Any trap on 'SIGCHLD' is +executed for each child process that exits. + + If an attempt to exit Bash is made while jobs are stopped, (or +running, if the 'checkjobs' option is enabled - see *note The Shopt +Builtin::), the shell prints a warning message, and if the 'checkjobs' +option is enabled, lists the jobs and their statuses. The 'jobs' +command may then be used to inspect their status. If a second attempt +to exit is made without an intervening command, Bash does not print +another warning, and any stopped jobs are terminated. + + When the shell is waiting for a job or process using the 'wait' +builtin, and job control is enabled, 'wait' will return when the job +changes state. The '-f' option causes 'wait' to wait until the job or +process terminates before returning. + + +File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Prev: Job Control Basics, Up: Job Control + +7.2 Job Control Builtins +======================== + +'bg' + bg [JOBSPEC ...] + + Resume each suspended job JOBSPEC in the background, as if it had + been started with '&'. If JOBSPEC is not supplied, the current job + is used. The return status is zero unless it is run when job + control is not enabled, or, when run with job control enabled, any + JOBSPEC was not found or specifies a job that was started without + job control. + +'fg' + fg [JOBSPEC] + + Resume the job JOBSPEC in the foreground and make it the current + job. If JOBSPEC is not supplied, the current job is used. The + return status is that of the command placed into the foreground, or + non-zero if run when job control is disabled or, when run with job + control enabled, JOBSPEC does not specify a valid job or JOBSPEC + specifies a job that was started without job control. + +'jobs' + jobs [-lnprs] [JOBSPEC] + jobs -x COMMAND [ARGUMENTS] + + The first form lists the active jobs. The options have the + following meanings: + + '-l' + List process IDs in addition to the normal information. + + '-n' + Display information only about jobs that have changed status + since the user was last notified of their status. + + '-p' + List only the process ID of the job's process group leader. + + '-r' + Display only running jobs. + + '-s' + Display only stopped jobs. + + If JOBSPEC is given, output is restricted to information about that + job. If JOBSPEC is not supplied, the status of all jobs is listed. + + If the '-x' option is supplied, 'jobs' replaces any JOBSPEC found + in COMMAND or ARGUMENTS with the corresponding process group ID, + and executes COMMAND, passing it ARGUMENTs, returning its exit + status. + +'kill' + kill [-s SIGSPEC] [-n SIGNUM] [-SIGSPEC] JOBSPEC or PID + kill -l|-L [EXIT_STATUS] + + Send a signal specified by SIGSPEC or SIGNUM to the process named + by job specification JOBSPEC or process ID PID. SIGSPEC is either + a case-insensitive signal name such as 'SIGINT' (with or without + the 'SIG' prefix) or a signal number; SIGNUM is a signal number. + If SIGSPEC and SIGNUM are not present, 'SIGTERM' is used. The '-l' + option lists the signal names. If any arguments are supplied when + '-l' is given, the names of the signals corresponding to the + arguments are listed, and the return status is zero. EXIT_STATUS + is a number specifying a signal number or the exit status of a + process terminated by a signal. The '-L' option is equivalent to + '-l'. The return status is zero if at least one signal was + successfully sent, or non-zero if an error occurs or an invalid + option is encountered. + +'wait' + wait [-fn] [-p VARNAME] [JOBSPEC or PID ...] + + Wait until the child process specified by each process ID PID or + job specification JOBSPEC exits and return the exit status of the + last command waited for. If a job spec is given, all processes in + the job are waited for. If no arguments are given, 'wait' waits + for all running background jobs and the last-executed process + substitution, if its process id is the same as $!, and the return + status is zero. If the '-n' option is supplied, 'wait' waits for a + single job from the list of PIDS or JOBSPECS or, if no arguments + are supplied, any job, to complete and returns its exit status. If + none of the supplied arguments is a child of the shell, or if no + arguments are supplied and the shell has no unwaited-for children, + the exit status is 127. If the '-p' option is supplied, the + process or job identifier of the job for which the exit status is + returned is assigned to the variable VARNAME named by the option + argument. The variable will be unset initially, before any + assignment. This is useful only when the '-n' option is supplied. + Supplying the '-f' option, when job control is enabled, forces + 'wait' to wait for each PID or JOBSPEC to terminate before + returning its status, intead of returning when it changes status. + If neither JOBSPEC nor PID specifies an active child process of the + shell, the return status is 127. + +'disown' + disown [-ar] [-h] [JOBSPEC ... | PID ... ] + + Without options, remove each JOBSPEC from the table of active jobs. + If the '-h' option is given, the job is not removed from the table, + but is marked so that 'SIGHUP' is not sent to the job if the shell + receives a 'SIGHUP'. If JOBSPEC is not present, and neither the + '-a' nor the '-r' option is supplied, the current job is used. If + no JOBSPEC is supplied, the '-a' option means to remove or mark all + jobs; the '-r' option without a JOBSPEC argument restricts + operation to running jobs. + +'suspend' + suspend [-f] + + Suspend the execution of this shell until it receives a 'SIGCONT' + signal. A login shell cannot be suspended; the '-f' option can be + used to override this and force the suspension. + + When job control is not active, the 'kill' and 'wait' builtins do not +accept JOBSPEC arguments. They must be supplied process IDs. + + +File: bash.info, Node: Job Control Variables, Prev: Job Control Builtins, Up: Job Control + +7.3 Job Control Variables +========================= + +'auto_resume' + This variable controls how the shell interacts with the user and + job control. If this variable exists then single word simple + commands without redirections are treated as candidates for + resumption of an existing job. There is no ambiguity allowed; if + there is more than one job beginning with the string typed, then + the most recently accessed job will be selected. The name of a + stopped job, in this context, is the command line used to start it. + If this variable is set to the value 'exact', the string supplied + must match the name of a stopped job exactly; if set to + 'substring', the string supplied needs to match a substring of the + name of a stopped job. The 'substring' value provides + functionality analogous to the '%?' job ID (*note Job Control + Basics::). If set to any other value, the supplied string must be + a prefix of a stopped job's name; this provides functionality + analogous to the '%' job ID. + + +File: bash.info, Node: Command Line Editing, Next: Using History Interactively, Prev: Job Control, Up: Top + +8 Command Line Editing +********************** + +This chapter describes the basic features of the GNU command line +editing interface. Command line editing is provided by the Readline +library, which is used by several different programs, including Bash. +Command line editing is enabled by default when using an interactive +shell, unless the '--noediting' option is supplied at shell invocation. +Line editing is also used when using the '-e' option to the 'read' +builtin command (*note Bash Builtins::). By default, the line editing +commands are similar to those of Emacs. A vi-style line editing +interface is also available. Line editing can be enabled at any time +using the '-o emacs' or '-o vi' options to the 'set' builtin command +(*note The Set Builtin::), or disabled using the '+o emacs' or '+o vi' +options to 'set'. + +* Menu: + +* Introduction and Notation:: Notation used in this text. +* Readline Interaction:: The minimum set of commands for editing a line. +* Readline Init File:: Customizing Readline from a user's view. +* Bindable Readline Commands:: A description of most of the Readline commands + available for binding +* Readline vi Mode:: A short description of how to make Readline + behave like the vi editor. +* Programmable Completion:: How to specify the possible completions for + a specific command. +* Programmable Completion Builtins:: Builtin commands to specify how to + complete arguments for a particular command. +* A Programmable Completion Example:: An example shell function for + generating possible completions. + + +File: bash.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing + +8.1 Introduction to Line Editing +================================ + +The following paragraphs describe the notation used to represent +keystrokes. + + The text 'C-k' is read as 'Control-K' and describes the character +produced when the key is pressed while the Control key is depressed. + + The text 'M-k' is read as 'Meta-K' and describes the character +produced when the Meta key (if you have one) is depressed, and the +key is pressed. The Meta key is labeled on many keyboards. On +keyboards with two keys labeled (usually to either side of the +space bar), the on the left side is generally set to work as a +Meta key. The key on the right may also be configured to work as +a Meta key or may be configured as some other modifier, such as a +Compose key for typing accented characters. + + If you do not have a Meta or key, or another key working as a +Meta key, the identical keystroke can be generated by typing +_first_, and then typing . Either process is known as "metafying" +the key. + + The text 'M-C-k' is read as 'Meta-Control-k' and describes the +character produced by "metafying" 'C-k'. + + In addition, several keys have their own names. Specifically, , +, , , , and all stand for themselves when seen +in this text, or in an init file (*note Readline Init File::). If your +keyboard lacks a key, typing will produce the desired +character. The key may be labeled or on some +keyboards. + + +File: bash.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing + +8.2 Readline Interaction +======================== + +Often during an interactive session you type in a long line of text, +only to notice that the first word on the line is misspelled. The +Readline library gives you a set of commands for manipulating the text +as you type it in, allowing you to just fix your typo, and not forcing +you to retype the majority of the line. Using these editing commands, +you move the cursor to the place that needs correction, and delete or +insert the text of the corrections. Then, when you are satisfied with +the line, you simply press . You do not have to be at the end of +the line to press ; the entire line is accepted regardless of the +location of the cursor within the line. + +* Menu: + +* Readline Bare Essentials:: The least you need to know about Readline. +* Readline Movement Commands:: Moving about the input line. +* Readline Killing Commands:: How to delete text, and how to get it back! +* Readline Arguments:: Giving numeric arguments to commands. +* Searching:: Searching through previous lines. + + +File: bash.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction + +8.2.1 Readline Bare Essentials +------------------------------ + +In order to enter characters into the line, simply type them. The typed +character appears where the cursor was, and then the cursor moves one +space to the right. If you mistype a character, you can use your erase +character to back up and delete the mistyped character. + + Sometimes you may mistype a character, and not notice the error until +you have typed several other characters. In that case, you can type +'C-b' to move the cursor to the left, and then correct your mistake. +Afterwards, you can move the cursor to the right with 'C-f'. + + When you add text in the middle of a line, you will notice that +characters to the right of the cursor are 'pushed over' to make room for +the text that you have inserted. Likewise, when you delete text behind +the cursor, characters to the right of the cursor are 'pulled back' to +fill in the blank space created by the removal of the text. A list of +the bare essentials for editing the text of an input line follows. + +'C-b' + Move back one character. +'C-f' + Move forward one character. + or + Delete the character to the left of the cursor. +'C-d' + Delete the character underneath the cursor. +Printing characters + Insert the character into the line at the cursor. +'C-_' or 'C-x C-u' + Undo the last editing command. You can undo all the way back to an + empty line. + +(Depending on your configuration, the key be set to delete +the character to the left of the cursor and the key set to delete +the character underneath the cursor, like 'C-d', rather than the +character to the left of the cursor.) + + +File: bash.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction + +8.2.2 Readline Movement Commands +-------------------------------- + +The above table describes the most basic keystrokes that you need in +order to do editing of the input line. For your convenience, many other +commands have been added in addition to 'C-b', 'C-f', 'C-d', and . +Here are some commands for moving more rapidly about the line. + +'C-a' + Move to the start of the line. +'C-e' + Move to the end of the line. +'M-f' + Move forward a word, where a word is composed of letters and + digits. +'M-b' + Move backward a word. +'C-l' + Clear the screen, reprinting the current line at the top. + + Notice how 'C-f' moves forward a character, while 'M-f' moves forward +a word. It is a loose convention that control keystrokes operate on +characters while meta keystrokes operate on words. + + +File: bash.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction + +8.2.3 Readline Killing Commands +------------------------------- + +"Killing" text means to delete the text from the line, but to save it +away for later use, usually by "yanking" (re-inserting) it back into the +line. ('Cut' and 'paste' are more recent jargon for 'kill' and 'yank'.) + + If the description for a command says that it 'kills' text, then you +can be sure that you can get the text back in a different (or the same) +place later. + + When you use a kill command, the text is saved in a "kill-ring". Any +number of consecutive kills save all of the killed text together, so +that when you yank it back, you get it all. The kill ring is not line +specific; the text that you killed on a previously typed line is +available to be yanked back later, when you are typing another line. + + Here is the list of commands for killing text. + +'C-k' + Kill the text from the current cursor position to the end of the + line. + +'M-d' + Kill from the cursor to the end of the current word, or, if between + words, to the end of the next word. Word boundaries are the same + as those used by 'M-f'. + +'M-' + Kill from the cursor the start of the current word, or, if between + words, to the start of the previous word. Word boundaries are the + same as those used by 'M-b'. + +'C-w' + Kill from the cursor to the previous whitespace. This is different + than 'M-' because the word boundaries differ. + + Here is how to "yank" the text back into the line. Yanking means to +copy the most-recently-killed text from the kill buffer. + +'C-y' + Yank the most recently killed text back into the buffer at the + cursor. + +'M-y' + Rotate the kill-ring, and yank the new top. You can only do this + if the prior command is 'C-y' or 'M-y'. + + +File: bash.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction + +8.2.4 Readline Arguments +------------------------ + +You can pass numeric arguments to Readline commands. Sometimes the +argument acts as a repeat count, other times it is the sign of the +argument that is significant. If you pass a negative argument to a +command which normally acts in a forward direction, that command will +act in a backward direction. For example, to kill text back to the +start of the line, you might type 'M-- C-k'. + + The general way to pass numeric arguments to a command is to type +meta digits before the command. If the first 'digit' typed is a minus +sign ('-'), then the sign of the argument will be negative. Once you +have typed one meta digit to get the argument started, you can type the +remainder of the digits, and then the command. For example, to give the +'C-d' command an argument of 10, you could type 'M-1 0 C-d', which will +delete the next ten characters on the input line. + + +File: bash.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction + +8.2.5 Searching for Commands in the History +------------------------------------------- + +Readline provides commands for searching through the command history +(*note Bash History Facilities::) for lines containing a specified +string. There are two search modes: "incremental" and +"non-incremental". + + Incremental searches begin before the user has finished typing the +search string. As each character of the search string is typed, +Readline displays the next entry from the history matching the string +typed so far. An incremental search requires only as many characters as +needed to find the desired history entry. To search backward in the +history for a particular string, type 'C-r'. Typing 'C-s' searches +forward through the history. The characters present in the value of the +'isearch-terminators' variable are used to terminate an incremental +search. If that variable has not been assigned a value, the and +'C-J' characters will terminate an incremental search. 'C-g' will abort +an incremental search and restore the original line. When the search is +terminated, the history entry containing the search string becomes the +current line. + + To find other matching entries in the history list, type 'C-r' or +'C-s' as appropriate. This will search backward or forward in the +history for the next entry matching the search string typed so far. Any +other key sequence bound to a Readline command will terminate the search +and execute that command. For instance, a will terminate the +search and accept the line, thereby executing the command from the +history list. A movement command will terminate the search, make the +last line found the current line, and begin editing. + + Readline remembers the last incremental search string. If two 'C-r's +are typed without any intervening characters defining a new search +string, any remembered search string is used. + + Non-incremental searches read the entire search string before +starting to search for matching history lines. The search string may be +typed by the user or be part of the contents of the current line. + + +File: bash.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing + +8.3 Readline Init File +====================== + +Although the Readline library comes with a set of Emacs-like keybindings +installed by default, it is possible to use a different set of +keybindings. Any user can customize programs that use Readline by +putting commands in an "inputrc" file, conventionally in his home +directory. The name of this file is taken from the value of the shell +variable 'INPUTRC'. If that variable is unset, the default is +'~/.inputrc'. If that file does not exist or cannot be read, the +ultimate default is '/etc/inputrc'. The 'bind' builtin command can also +be used to set Readline keybindings and variables. *Note Bash +Builtins::. + + When a program which uses the Readline library starts up, the init +file is read, and the key bindings are set. + + In addition, the 'C-x C-r' command re-reads this init file, thus +incorporating any changes that you might have made to it. + +* Menu: + +* Readline Init File Syntax:: Syntax for the commands in the inputrc file. + +* Conditional Init Constructs:: Conditional key bindings in the inputrc file. + +* Sample Init File:: An example inputrc file. + + +File: bash.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File + +8.3.1 Readline Init File Syntax +------------------------------- + +There are only a few basic constructs allowed in the Readline init file. +Blank lines are ignored. Lines beginning with a '#' are comments. +Lines beginning with a '$' indicate conditional constructs (*note +Conditional Init Constructs::). Other lines denote variable settings +and key bindings. + +Variable Settings + You can modify the run-time behavior of Readline by altering the + values of variables in Readline using the 'set' command within the + init file. The syntax is simple: + + set VARIABLE VALUE + + Here, for example, is how to change from the default Emacs-like key + binding to use 'vi' line editing commands: + + set editing-mode vi + + Variable names and values, where appropriate, are recognized + without regard to case. Unrecognized variable names are ignored. + + Boolean variables (those that can be set to on or off) are set to + on if the value is null or empty, ON (case-insensitive), or 1. Any + other value results in the variable being set to off. + + The 'bind -V' command lists the current Readline variable names and + values. *Note Bash Builtins::. + + A great deal of run-time behavior is changeable with the following + variables. + + 'bell-style' + Controls what happens when Readline wants to ring the terminal + bell. If set to 'none', Readline never rings the bell. If + set to 'visible', Readline uses a visible bell if one is + available. If set to 'audible' (the default), Readline + attempts to ring the terminal's bell. + + 'bind-tty-special-chars' + If set to 'on' (the default), Readline attempts to bind the + control characters treated specially by the kernel's terminal + driver to their Readline equivalents. + + 'blink-matching-paren' + If set to 'on', Readline attempts to briefly move the cursor + to an opening parenthesis when a closing parenthesis is + inserted. The default is 'off'. + + 'colored-completion-prefix' + If set to 'on', when listing completions, Readline displays + the common prefix of the set of possible completions using a + different color. The color definitions are taken from the + value of the 'LS_COLORS' environment variable. The default is + 'off'. + + 'colored-stats' + If set to 'on', Readline displays possible completions using + different colors to indicate their file type. The color + definitions are taken from the value of the 'LS_COLORS' + environment variable. The default is 'off'. + + 'comment-begin' + The string to insert at the beginning of the line when the + 'insert-comment' command is executed. The default value is + '"#"'. + + 'completion-display-width' + The number of screen columns used to display possible matches + when performing completion. The value is ignored if it is + less than 0 or greater than the terminal screen width. A + value of 0 will cause matches to be displayed one per line. + The default value is -1. + + 'completion-ignore-case' + If set to 'on', Readline performs filename matching and + completion in a case-insensitive fashion. The default value + is 'off'. + + 'completion-map-case' + If set to 'on', and COMPLETION-IGNORE-CASE is enabled, + Readline treats hyphens ('-') and underscores ('_') as + equivalent when performing case-insensitive filename matching + and completion. The default value is 'off'. + + 'completion-prefix-display-length' + The length in characters of the common prefix of a list of + possible completions that is displayed without modification. + When set to a value greater than zero, common prefixes longer + than this value are replaced with an ellipsis when displaying + possible completions. + + 'completion-query-items' + The number of possible completions that determines when the + user is asked whether the list of possibilities should be + displayed. If the number of possible completions is greater + than or equal to this value, Readline will ask whether or not + the user wishes to view them; otherwise, they are simply + listed. This variable must be set to an integer value greater + than or equal to 0. A negative value means Readline should + never ask. The default limit is '100'. + + 'convert-meta' + If set to 'on', Readline will convert characters with the + eighth bit set to an ASCII key sequence by stripping the + eighth bit and prefixing an character, converting them + to a meta-prefixed key sequence. The default value is 'on', + but will be set to 'off' if the locale is one that contains + eight-bit characters. + + 'disable-completion' + If set to 'On', Readline will inhibit word completion. + Completion characters will be inserted into the line as if + they had been mapped to 'self-insert'. The default is 'off'. + + 'echo-control-characters' + When set to 'on', on operating systems that indicate they + support it, readline echoes a character corresponding to a + signal generated from the keyboard. The default is 'on'. + + 'editing-mode' + The 'editing-mode' variable controls which default set of key + bindings is used. By default, Readline starts up in Emacs + editing mode, where the keystrokes are most similar to Emacs. + This variable can be set to either 'emacs' or 'vi'. + + 'emacs-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when emacs editing mode is active. The value is + expanded like a key binding, so the standard set of meta- and + control prefixes and backslash escape sequences is available. + Use the '\1' and '\2' escapes to begin and end sequences of + non-printing characters, which can be used to embed a terminal + control sequence into the mode string. The default is '@'. + + 'enable-bracketed-paste' + When set to 'On', Readline will configure the terminal in a + way that will enable it to insert each paste into the editing + buffer as a single string of characters, instead of treating + each character as if it had been read from the keyboard. This + can prevent pasted characters from being interpreted as + editing commands. The default is 'On'. + + 'enable-keypad' + When set to 'on', Readline will try to enable the application + keypad when it is called. Some systems need this to enable + the arrow keys. The default is 'off'. + + 'enable-meta-key' + When set to 'on', Readline will try to enable any meta + modifier key the terminal claims to support when it is called. + On many terminals, the meta key is used to send eight-bit + characters. The default is 'on'. + + 'expand-tilde' + If set to 'on', tilde expansion is performed when Readline + attempts word completion. The default is 'off'. + + 'history-preserve-point' + If set to 'on', the history code attempts to place the point + (the current cursor position) at the same location on each + history line retrieved with 'previous-history' or + 'next-history'. The default is 'off'. + + 'history-size' + Set the maximum number of history entries saved in the history + list. If set to zero, any existing history entries are + deleted and no new entries are saved. If set to a value less + than zero, the number of history entries is not limited. By + default, the number of history entries is not limited. If an + attempt is made to set HISTORY-SIZE to a non-numeric value, + the maximum number of history entries will be set to 500. + + 'horizontal-scroll-mode' + This variable can be set to either 'on' or 'off'. Setting it + to 'on' means that the text of the lines being edited will + scroll horizontally on a single screen line when they are + longer than the width of the screen, instead of wrapping onto + a new screen line. This variable is automatically set to 'on' + for terminals of height 1. By default, this variable is set + to 'off'. + + 'input-meta' + If set to 'on', Readline will enable eight-bit input (it will + not clear the eighth bit in the characters it reads), + regardless of what the terminal claims it can support. The + default value is 'off', but Readline will set it to 'on' if + the locale contains eight-bit characters. The name + 'meta-flag' is a synonym for this variable. + + 'isearch-terminators' + The string of characters that should terminate an incremental + search without subsequently executing the character as a + command (*note Searching::). If this variable has not been + given a value, the characters and 'C-J' will terminate + an incremental search. + + 'keymap' + Sets Readline's idea of the current keymap for key binding + commands. Built-in 'keymap' names are 'emacs', + 'emacs-standard', 'emacs-meta', 'emacs-ctlx', 'vi', 'vi-move', + 'vi-command', and 'vi-insert'. 'vi' is equivalent to + 'vi-command' ('vi-move' is also a synonym); 'emacs' is + equivalent to 'emacs-standard'. Applications may add + additional names. The default value is 'emacs'. The value of + the 'editing-mode' variable also affects the default keymap. + + 'keyseq-timeout' + Specifies the duration Readline will wait for a character when + reading an ambiguous key sequence (one that can form a + complete key sequence using the input read so far, or can take + additional input to complete a longer key sequence). If no + input is received within the timeout, Readline will use the + shorter but complete key sequence. Readline uses this value + to determine whether or not input is available on the current + input source ('rl_instream' by default). The value is + specified in milliseconds, so a value of 1000 means that + Readline will wait one second for additional input. If this + variable is set to a value less than or equal to zero, or to a + non-numeric value, Readline will wait until another key is + pressed to decide which key sequence to complete. The default + value is '500'. + + 'mark-directories' + If set to 'on', completed directory names have a slash + appended. The default is 'on'. + + 'mark-modified-lines' + This variable, when set to 'on', causes Readline to display an + asterisk ('*') at the start of history lines which have been + modified. This variable is 'off' by default. + + 'mark-symlinked-directories' + If set to 'on', completed names which are symbolic links to + directories have a slash appended (subject to the value of + 'mark-directories'). The default is 'off'. + + 'match-hidden-files' + This variable, when set to 'on', causes Readline to match + files whose names begin with a '.' (hidden files) when + performing filename completion. If set to 'off', the leading + '.' must be supplied by the user in the filename to be + completed. This variable is 'on' by default. + + 'menu-complete-display-prefix' + If set to 'on', menu completion displays the common prefix of + the list of possible completions (which may be empty) before + cycling through the list. The default is 'off'. + + 'output-meta' + If set to 'on', Readline will display characters with the + eighth bit set directly rather than as a meta-prefixed escape + sequence. The default is 'off', but Readline will set it to + 'on' if the locale contains eight-bit characters. + + 'page-completions' + If set to 'on', Readline uses an internal 'more'-like pager to + display a screenful of possible completions at a time. This + variable is 'on' by default. + + 'print-completions-horizontally' + If set to 'on', Readline will display completions with matches + sorted horizontally in alphabetical order, rather than down + the screen. The default is 'off'. + + 'revert-all-at-newline' + If set to 'on', Readline will undo all changes to history + lines before returning when 'accept-line' is executed. By + default, history lines may be modified and retain individual + undo lists across calls to 'readline'. The default is 'off'. + + 'show-all-if-ambiguous' + This alters the default behavior of the completion functions. + If set to 'on', words which have more than one possible + completion cause the matches to be listed immediately instead + of ringing the bell. The default value is 'off'. + + 'show-all-if-unmodified' + This alters the default behavior of the completion functions + in a fashion similar to SHOW-ALL-IF-AMBIGUOUS. If set to + 'on', words which have more than one possible completion + without any possible partial completion (the possible + completions don't share a common prefix) cause the matches to + be listed immediately instead of ringing the bell. The + default value is 'off'. + + 'show-mode-in-prompt' + If set to 'on', add a string to the beginning of the prompt + indicating the editing mode: emacs, vi command, or vi + insertion. The mode strings are user-settable (e.g., + EMACS-MODE-STRING). The default value is 'off'. + + 'skip-completed-text' + If set to 'on', this alters the default completion behavior + when inserting a single match into the line. It's only active + when performing completion in the middle of a word. If + enabled, readline does not insert characters from the + completion that match characters after point in the word being + completed, so portions of the word following the cursor are + not duplicated. For instance, if this is enabled, attempting + completion when the cursor is after the 'e' in 'Makefile' will + result in 'Makefile' rather than 'Makefilefile', assuming + there is a single possible completion. The default value is + 'off'. + + 'vi-cmd-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when vi editing mode is active and in command mode. + The value is expanded like a key binding, so the standard set + of meta- and control prefixes and backslash escape sequences + is available. Use the '\1' and '\2' escapes to begin and end + sequences of non-printing characters, which can be used to + embed a terminal control sequence into the mode string. The + default is '(cmd)'. + + 'vi-ins-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when vi editing mode is active and in insertion mode. + The value is expanded like a key binding, so the standard set + of meta- and control prefixes and backslash escape sequences + is available. Use the '\1' and '\2' escapes to begin and end + sequences of non-printing characters, which can be used to + embed a terminal control sequence into the mode string. The + default is '(ins)'. + + 'visible-stats' + If set to 'on', a character denoting a file's type is appended + to the filename when listing possible completions. The + default is 'off'. + +Key Bindings + The syntax for controlling key bindings in the init file is simple. + First you need to find the name of the command that you want to + change. The following sections contain tables of the command name, + the default keybinding, if any, and a short description of what the + command does. + + Once you know the name of the command, simply place on a line in + the init file the name of the key you wish to bind the command to, + a colon, and then the name of the command. There can be no space + between the key name and the colon - that will be interpreted as + part of the key name. The name of the key can be expressed in + different ways, depending on what you find most comfortable. + + In addition to command names, readline allows keys to be bound to a + string that is inserted when the key is pressed (a MACRO). + + The 'bind -p' command displays Readline function names and bindings + in a format that can put directly into an initialization file. + *Note Bash Builtins::. + + KEYNAME: FUNCTION-NAME or MACRO + KEYNAME is the name of a key spelled out in English. For + example: + Control-u: universal-argument + Meta-Rubout: backward-kill-word + Control-o: "> output" + + In the example above, 'C-u' is bound to the function + 'universal-argument', 'M-DEL' is bound to the function + 'backward-kill-word', and 'C-o' is bound to run the macro + expressed on the right hand side (that is, to insert the text + '> output' into the line). + + A number of symbolic character names are recognized while + processing this key binding syntax: DEL, ESC, ESCAPE, LFD, + NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB. + + "KEYSEQ": FUNCTION-NAME or MACRO + KEYSEQ differs from KEYNAME above in that strings denoting an + entire key sequence can be specified, by placing the key + sequence in double quotes. Some GNU Emacs style key escapes + can be used, as in the following example, but the special + character names are not recognized. + + "\C-u": universal-argument + "\C-x\C-r": re-read-init-file + "\e[11~": "Function Key 1" + + In the above example, 'C-u' is again bound to the function + 'universal-argument' (just as it was in the first example), + ''C-x' 'C-r'' is bound to the function 're-read-init-file', + and ' <[> <1> <1> <~>' is bound to insert the text + 'Function Key 1'. + + The following GNU Emacs style escape sequences are available when + specifying key sequences: + + '\C-' + control prefix + '\M-' + meta prefix + '\e' + an escape character + '\\' + backslash + '\"' + <">, a double quotation mark + '\'' + <'>, a single quote or apostrophe + + In addition to the GNU Emacs style escape sequences, a second set + of backslash escapes is available: + + '\a' + alert (bell) + '\b' + backspace + '\d' + delete + '\f' + form feed + '\n' + newline + '\r' + carriage return + '\t' + horizontal tab + '\v' + vertical tab + '\NNN' + the eight-bit character whose value is the octal value NNN + (one to three digits) + '\xHH' + the eight-bit character whose value is the hexadecimal value + HH (one or two hex digits) + + When entering the text of a macro, single or double quotes must be + used to indicate a macro definition. Unquoted text is assumed to + be a function name. In the macro body, the backslash escapes + described above are expanded. Backslash will quote any other + character in the macro text, including '"' and '''. For example, + the following binding will make ''C-x' \' insert a single '\' into + the line: + "\C-x\\": "\\" + + +File: bash.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File + +8.3.2 Conditional Init Constructs +--------------------------------- + +Readline implements a facility similar in spirit to the conditional +compilation features of the C preprocessor which allows key bindings and +variable settings to be performed as the result of tests. There are +four parser directives used. + +'$if' + The '$if' construct allows bindings to be made based on the editing + mode, the terminal being used, or the application using Readline. + The text of the test, after any comparison operator, extends to the + end of the line; unless otherwise noted, no characters are required + to isolate it. + + 'mode' + The 'mode=' form of the '$if' directive is used to test + whether Readline is in 'emacs' or 'vi' mode. This may be used + in conjunction with the 'set keymap' command, for instance, to + set bindings in the 'emacs-standard' and 'emacs-ctlx' keymaps + only if Readline is starting out in 'emacs' mode. + + 'term' + The 'term=' form may be used to include terminal-specific key + bindings, perhaps to bind the key sequences output by the + terminal's function keys. The word on the right side of the + '=' is tested against both the full name of the terminal and + the portion of the terminal name before the first '-'. This + allows 'sun' to match both 'sun' and 'sun-cmd', for instance. + + 'version' + The 'version' test may be used to perform comparisons against + specific Readline versions. The 'version' expands to the + current Readline version. The set of comparison operators + includes '=' (and '=='), '!=', '<=', '>=', '<', and '>'. The + version number supplied on the right side of the operator + consists of a major version number, an optional decimal point, + and an optional minor version (e.g., '7.1'). If the minor + version is omitted, it is assumed to be '0'. The operator may + be separated from the string 'version' and from the version + number argument by whitespace. The following example sets a + variable if the Readline version being used is 7.0 or newer: + $if version >= 7.0 + set show-mode-in-prompt on + $endif + + 'application' + The APPLICATION construct is used to include + application-specific settings. Each program using the + Readline library sets the APPLICATION NAME, and you can test + for a particular value. This could be used to bind key + sequences to functions useful for a specific program. For + instance, the following command adds a key sequence that + quotes the current or previous word in Bash: + $if Bash + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + $endif + + 'variable' + The VARIABLE construct provides simple equality tests for + Readline variables and values. The permitted comparison + operators are '=', '==', and '!='. The variable name must be + separated from the comparison operator by whitespace; the + operator may be separated from the value on the right hand + side by whitespace. Both string and boolean variables may be + tested. Boolean variables must be tested against the values + ON and OFF. The following example is equivalent to the + 'mode=emacs' test described above: + $if editing-mode == emacs + set show-mode-in-prompt on + $endif + +'$endif' + This command, as seen in the previous example, terminates an '$if' + command. + +'$else' + Commands in this branch of the '$if' directive are executed if the + test fails. + +'$include' + This directive takes a single filename as an argument and reads + commands and bindings from that file. For example, the following + directive reads from '/etc/inputrc': + $include /etc/inputrc + + +File: bash.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File + +8.3.3 Sample Init File +---------------------- + +Here is an example of an INPUTRC file. This illustrates key binding, +variable assignment, and conditional syntax. + + # This file controls the behaviour of line input editing for + # programs that use the GNU Readline library. Existing + # programs include FTP, Bash, and GDB. + # + # You can re-read the inputrc file with C-x C-r. + # Lines beginning with '#' are comments. + # + # First, include any system-wide bindings and variable + # assignments from /etc/Inputrc + $include /etc/Inputrc + + # + # Set various bindings for emacs mode. + + set editing-mode emacs + + $if mode=emacs + + Meta-Control-h: backward-kill-word Text after the function name is ignored + + # + # Arrow keys in keypad mode + # + #"\M-OD": backward-char + #"\M-OC": forward-char + #"\M-OA": previous-history + #"\M-OB": next-history + # + # Arrow keys in ANSI mode + # + "\M-[D": backward-char + "\M-[C": forward-char + "\M-[A": previous-history + "\M-[B": next-history + # + # Arrow keys in 8 bit keypad mode + # + #"\M-\C-OD": backward-char + #"\M-\C-OC": forward-char + #"\M-\C-OA": previous-history + #"\M-\C-OB": next-history + # + # Arrow keys in 8 bit ANSI mode + # + #"\M-\C-[D": backward-char + #"\M-\C-[C": forward-char + #"\M-\C-[A": previous-history + #"\M-\C-[B": next-history + + C-q: quoted-insert + + $endif + + # An old-style binding. This happens to be the default. + TAB: complete + + # Macros that are convenient for shell interaction + $if Bash + # edit the path + "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" + # prepare to type a quoted word -- + # insert open and close double quotes + # and move to just after the open quote + "\C-x\"": "\"\"\C-b" + # insert a backslash (testing backslash escapes + # in sequences and macros) + "\C-x\\": "\\" + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + # Add a binding to refresh the line, which is unbound + "\C-xr": redraw-current-line + # Edit variable on current line. + "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" + $endif + + # use a visible bell if one is available + set bell-style visible + + # don't strip characters to 7 bits when reading + set input-meta on + + # allow iso-latin1 characters to be inserted rather + # than converted to prefix-meta sequences + set convert-meta off + + # display characters with the eighth bit set directly + # rather than as meta-prefixed characters + set output-meta on + + # if there are 150 or more possible completions for a word, + # ask whether or not the user wants to see all of them + set completion-query-items 150 + + # For FTP + $if Ftp + "\C-xg": "get \M-?" + "\C-xt": "put \M-?" + "\M-.": yank-last-arg + $endif + + +File: bash.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing + +8.4 Bindable Readline Commands +============================== + +* Menu: + +* Commands For Moving:: Moving about the line. +* Commands For History:: Getting at previous lines. +* Commands For Text:: Commands for changing text. +* Commands For Killing:: Commands for killing and yanking. +* Numeric Arguments:: Specifying numeric arguments, repeat counts. +* Commands For Completion:: Getting Readline to do the typing for you. +* Keyboard Macros:: Saving and re-executing typed characters +* Miscellaneous Commands:: Other miscellaneous commands. + +This section describes Readline commands that may be bound to key +sequences. You can list your key bindings by executing 'bind -P' or, +for a more terse format, suitable for an INPUTRC file, 'bind -p'. +(*Note Bash Builtins::.) Command names without an accompanying key +sequence are unbound by default. + + In the following descriptions, "point" refers to the current cursor +position, and "mark" refers to a cursor position saved by the 'set-mark' +command. The text between the point and mark is referred to as the +"region". + + +File: bash.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands + +8.4.1 Commands For Moving +------------------------- + +'beginning-of-line (C-a)' + Move to the start of the current line. + +'end-of-line (C-e)' + Move to the end of the line. + +'forward-char (C-f)' + Move forward a character. + +'backward-char (C-b)' + Move back a character. + +'forward-word (M-f)' + Move forward to the end of the next word. Words are composed of + letters and digits. + +'backward-word (M-b)' + Move back to the start of the current or previous word. Words are + composed of letters and digits. + +'shell-forward-word (M-C-f)' + Move forward to the end of the next word. Words are delimited by + non-quoted shell metacharacters. + +'shell-backward-word (M-C-b)' + Move back to the start of the current or previous word. Words are + delimited by non-quoted shell metacharacters. + +'previous-screen-line ()' + Attempt to move point to the same physical screen column on the + previous physical screen line. This will not have the desired + effect if the current Readline line does not take up more than one + physical line or if point is not greater than the length of the + prompt plus the screen width. + +'next-screen-line ()' + Attempt to move point to the same physical screen column on the + next physical screen line. This will not have the desired effect + if the current Readline line does not take up more than one + physical line or if the length of the current Readline line is not + greater than the length of the prompt plus the screen width. + +'clear-display (M-C-l)' + Clear the screen and, if possible, the terminal's scrollback + buffer, then redraw the current line, leaving the current line at + the top of the screen. + +'clear-screen (C-l)' + Clear the screen, then redraw the current line, leaving the current + line at the top of the screen. + +'redraw-current-line ()' + Refresh the current line. By default, this is unbound. + + +File: bash.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands + +8.4.2 Commands For Manipulating The History +------------------------------------------- + +'accept-line (Newline or Return)' + Accept the line regardless of where the cursor is. If this line is + non-empty, add it to the history list according to the setting of + the 'HISTCONTROL' and 'HISTIGNORE' variables. If this line is a + modified history line, then restore the history line to its + original state. + +'previous-history (C-p)' + Move 'back' through the history list, fetching the previous + command. + +'next-history (C-n)' + Move 'forward' through the history list, fetching the next command. + +'beginning-of-history (M-<)' + Move to the first line in the history. + +'end-of-history (M->)' + Move to the end of the input history, i.e., the line currently + being entered. + +'reverse-search-history (C-r)' + Search backward starting at the current line and moving 'up' + through the history as necessary. This is an incremental search. + This command sets the region to the matched text and activates the + mark. + +'forward-search-history (C-s)' + Search forward starting at the current line and moving 'down' + through the history as necessary. This is an incremental search. + This command sets the region to the matched text and activates the + mark. + +'non-incremental-reverse-search-history (M-p)' + Search backward starting at the current line and moving 'up' + through the history as necessary using a non-incremental search for + a string supplied by the user. The search string may match + anywhere in a history line. + +'non-incremental-forward-search-history (M-n)' + Search forward starting at the current line and moving 'down' + through the history as necessary using a non-incremental search for + a string supplied by the user. The search string may match + anywhere in a history line. + +'history-search-forward ()' + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string must match at the beginning of a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-search-backward ()' + Search backward through the history for the string of characters + between the start of the current line and the point. The search + string must match at the beginning of a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-substring-search-forward ()' + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-substring-search-backward ()' + Search backward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. This is a + non-incremental search. By default, this command is unbound. + +'yank-nth-arg (M-C-y)' + Insert the first argument to the previous command (usually the + second word on the previous line) at point. With an argument N, + insert the Nth word from the previous command (the words in the + previous command begin with word 0). A negative argument inserts + the Nth word from the end of the previous command. Once the + argument N is computed, the argument is extracted as if the '!N' + history expansion had been specified. + +'yank-last-arg (M-. or M-_)' + Insert last argument to the previous command (the last word of the + previous history entry). With a numeric argument, behave exactly + like 'yank-nth-arg'. Successive calls to 'yank-last-arg' move back + through the history list, inserting the last word (or the word + specified by the argument to the first call) of each line in turn. + Any numeric argument supplied to these successive calls determines + the direction to move through the history. A negative argument + switches the direction through the history (back or forward). The + history expansion facilities are used to extract the last argument, + as if the '!$' history expansion had been specified. + +'operate-and-get-next (C-o)' + Accept the current line for return to the calling application as if + a newline had been entered, and fetch the next line relative to the + current line from the history for editing. A numeric argument, if + supplied, specifies the history entry to use instead of the current + line. + + +File: bash.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands + +8.4.3 Commands For Changing Text +-------------------------------- + +'end-of-file (usually C-d)' + The character indicating end-of-file as set, for example, by + 'stty'. If this character is read when there are no characters on + the line, and point is at the beginning of the line, Readline + interprets it as the end of input and returns EOF. + +'delete-char (C-d)' + Delete the character at point. If this function is bound to the + same character as the tty EOF character, as 'C-d' commonly is, see + above for the effects. + +'backward-delete-char (Rubout)' + Delete the character behind the cursor. A numeric argument means + to kill the characters instead of deleting them. + +'forward-backward-delete-char ()' + Delete the character under the cursor, unless the cursor is at the + end of the line, in which case the character behind the cursor is + deleted. By default, this is not bound to a key. + +'quoted-insert (C-q or C-v)' + Add the next character typed to the line verbatim. This is how to + insert key sequences like 'C-q', for example. + +'self-insert (a, b, A, 1, !, ...)' + Insert yourself. + +'bracketed-paste-begin ()' + This function is intended to be bound to the "bracketed paste" + escape sequence sent by some terminals, and such a binding is + assigned by default. It allows Readline to insert the pasted text + as a single unit without treating each character as if it had been + read from the keyboard. The characters are inserted as if each one + was bound to 'self-insert' instead of executing any editing + commands. + + Bracketed paste sets the region (the characters between point and + the mark) to the inserted text. It uses the concept of an _active + mark_: when the mark is active, Readline redisplay uses the + terminal's standout mode to denote the region. + +'transpose-chars (C-t)' + Drag the character before the cursor forward over the character at + the cursor, moving the cursor forward as well. If the insertion + point is at the end of the line, then this transposes the last two + characters of the line. Negative arguments have no effect. + +'transpose-words (M-t)' + Drag the word before point past the word after point, moving point + past that word as well. If the insertion point is at the end of + the line, this transposes the last two words on the line. + +'upcase-word (M-u)' + Uppercase the current (or following) word. With a negative + argument, uppercase the previous word, but do not move the cursor. + +'downcase-word (M-l)' + Lowercase the current (or following) word. With a negative + argument, lowercase the previous word, but do not move the cursor. + +'capitalize-word (M-c)' + Capitalize the current (or following) word. With a negative + argument, capitalize the previous word, but do not move the cursor. + +'overwrite-mode ()' + Toggle overwrite mode. With an explicit positive numeric argument, + switches to overwrite mode. With an explicit non-positive numeric + argument, switches to insert mode. This command affects only + 'emacs' mode; 'vi' mode does overwrite differently. Each call to + 'readline()' starts in insert mode. + + In overwrite mode, characters bound to 'self-insert' replace the + text at point rather than pushing the text to the right. + Characters bound to 'backward-delete-char' replace the character + before point with a space. + + By default, this command is unbound. + + +File: bash.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands + +8.4.4 Killing And Yanking +------------------------- + +'kill-line (C-k)' + Kill the text from point to the end of the line. With a negative + numeric argument, kill backward from the cursor to the beginning of + the current line. + +'backward-kill-line (C-x Rubout)' + Kill backward from the cursor to the beginning of the current line. + With a negative numeric argument, kill forward from the cursor to + the end of the current line. + +'unix-line-discard (C-u)' + Kill backward from the cursor to the beginning of the current line. + +'kill-whole-line ()' + Kill all characters on the current line, no matter where point is. + By default, this is unbound. + +'kill-word (M-d)' + Kill from point to the end of the current word, or if between + words, to the end of the next word. Word boundaries are the same + as 'forward-word'. + +'backward-kill-word (M-)' + Kill the word behind point. Word boundaries are the same as + 'backward-word'. + +'shell-kill-word (M-C-d)' + Kill from point to the end of the current word, or if between + words, to the end of the next word. Word boundaries are the same + as 'shell-forward-word'. + +'shell-backward-kill-word ()' + Kill the word behind point. Word boundaries are the same as + 'shell-backward-word'. + +'shell-transpose-words (M-C-t)' + Drag the word before point past the word after point, moving point + past that word as well. If the insertion point is at the end of + the line, this transposes the last two words on the line. Word + boundaries are the same as 'shell-forward-word' and + 'shell-backward-word'. + +'unix-word-rubout (C-w)' + Kill the word behind point, using white space as a word boundary. + The killed text is saved on the kill-ring. + +'unix-filename-rubout ()' + Kill the word behind point, using white space and the slash + character as the word boundaries. The killed text is saved on the + kill-ring. + +'delete-horizontal-space ()' + Delete all spaces and tabs around point. By default, this is + unbound. + +'kill-region ()' + Kill the text in the current region. By default, this command is + unbound. + +'copy-region-as-kill ()' + Copy the text in the region to the kill buffer, so it can be yanked + right away. By default, this command is unbound. + +'copy-backward-word ()' + Copy the word before point to the kill buffer. The word boundaries + are the same as 'backward-word'. By default, this command is + unbound. + +'copy-forward-word ()' + Copy the word following point to the kill buffer. The word + boundaries are the same as 'forward-word'. By default, this + command is unbound. + +'yank (C-y)' + Yank the top of the kill ring into the buffer at point. + +'yank-pop (M-y)' + Rotate the kill-ring, and yank the new top. You can only do this + if the prior command is 'yank' or 'yank-pop'. + + +File: bash.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands + +8.4.5 Specifying Numeric Arguments +---------------------------------- + +'digit-argument (M-0, M-1, ... M--)' + Add this digit to the argument already accumulating, or start a new + argument. 'M--' starts a negative argument. + +'universal-argument ()' + This is another way to specify an argument. If this command is + followed by one or more digits, optionally with a leading minus + sign, those digits define the argument. If the command is followed + by digits, executing 'universal-argument' again ends the numeric + argument, but is otherwise ignored. As a special case, if this + command is immediately followed by a character that is neither a + digit nor minus sign, the argument count for the next command is + multiplied by four. The argument count is initially one, so + executing this function the first time makes the argument count + four, a second time makes the argument count sixteen, and so on. + By default, this is not bound to a key. + + +File: bash.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands + +8.4.6 Letting Readline Type For You +----------------------------------- + +'complete ()' + Attempt to perform completion on the text before point. The actual + completion performed is application-specific. Bash attempts + completion treating the text as a variable (if the text begins with + '$'), username (if the text begins with '~'), hostname (if the text + begins with '@'), or command (including aliases and functions) in + turn. If none of these produces a match, filename completion is + attempted. + +'possible-completions (M-?)' + List the possible completions of the text before point. When + displaying completions, Readline sets the number of columns used + for display to the value of 'completion-display-width', the value + of the environment variable 'COLUMNS', or the screen width, in that + order. + +'insert-completions (M-*)' + Insert all completions of the text before point that would have + been generated by 'possible-completions'. + +'menu-complete ()' + Similar to 'complete', but replaces the word to be completed with a + single match from the list of possible completions. Repeated + execution of 'menu-complete' steps through the list of possible + completions, inserting each match in turn. At the end of the list + of completions, the bell is rung (subject to the setting of + 'bell-style') and the original text is restored. An argument of N + moves N positions forward in the list of matches; a negative + argument may be used to move backward through the list. This + command is intended to be bound to , but is unbound by + default. + +'menu-complete-backward ()' + Identical to 'menu-complete', but moves backward through the list + of possible completions, as if 'menu-complete' had been given a + negative argument. + +'delete-char-or-list ()' + Deletes the character under the cursor if not at the beginning or + end of the line (like 'delete-char'). If at the end of the line, + behaves identically to 'possible-completions'. This command is + unbound by default. + +'complete-filename (M-/)' + Attempt filename completion on the text before point. + +'possible-filename-completions (C-x /)' + List the possible completions of the text before point, treating it + as a filename. + +'complete-username (M-~)' + Attempt completion on the text before point, treating it as a + username. + +'possible-username-completions (C-x ~)' + List the possible completions of the text before point, treating it + as a username. + +'complete-variable (M-$)' + Attempt completion on the text before point, treating it as a shell + variable. + +'possible-variable-completions (C-x $)' + List the possible completions of the text before point, treating it + as a shell variable. + +'complete-hostname (M-@)' + Attempt completion on the text before point, treating it as a + hostname. + +'possible-hostname-completions (C-x @)' + List the possible completions of the text before point, treating it + as a hostname. + +'complete-command (M-!)' + Attempt completion on the text before point, treating it as a + command name. Command completion attempts to match the text + against aliases, reserved words, shell functions, shell builtins, + and finally executable filenames, in that order. + +'possible-command-completions (C-x !)' + List the possible completions of the text before point, treating it + as a command name. + +'dynamic-complete-history (M-)' + Attempt completion on the text before point, comparing the text + against lines from the history list for possible completion + matches. + +'dabbrev-expand ()' + Attempt menu completion on the text before point, comparing the + text against lines from the history list for possible completion + matches. + +'complete-into-braces (M-{)' + Perform filename completion and insert the list of possible + completions enclosed within braces so the list is available to the + shell (*note Brace Expansion::). + + +File: bash.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands + +8.4.7 Keyboard Macros +--------------------- + +'start-kbd-macro (C-x ()' + Begin saving the characters typed into the current keyboard macro. + +'end-kbd-macro (C-x ))' + Stop saving the characters typed into the current keyboard macro + and save the definition. + +'call-last-kbd-macro (C-x e)' + Re-execute the last keyboard macro defined, by making the + characters in the macro appear as if typed at the keyboard. + +'print-last-kbd-macro ()' + Print the last keboard macro defined in a format suitable for the + INPUTRC file. + + +File: bash.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands + +8.4.8 Some Miscellaneous Commands +--------------------------------- + +'re-read-init-file (C-x C-r)' + Read in the contents of the INPUTRC file, and incorporate any + bindings or variable assignments found there. + +'abort (C-g)' + Abort the current editing command and ring the terminal's bell + (subject to the setting of 'bell-style'). + +'do-lowercase-version (M-A, M-B, M-X, ...)' + If the metafied character X is upper case, run the command that is + bound to the corresponding metafied lower case character. The + behavior is undefined if X is already lower case. + +'prefix-meta ()' + Metafy the next character typed. This is for keyboards without a + meta key. Typing ' f' is equivalent to typing 'M-f'. + +'undo (C-_ or C-x C-u)' + Incremental undo, separately remembered for each line. + +'revert-line (M-r)' + Undo all changes made to this line. This is like executing the + 'undo' command enough times to get back to the beginning. + +'tilde-expand (M-&)' + Perform tilde expansion on the current word. + +'set-mark (C-@)' + Set the mark to the point. If a numeric argument is supplied, the + mark is set to that position. + +'exchange-point-and-mark (C-x C-x)' + Swap the point with the mark. The current cursor position is set + to the saved position, and the old cursor position is saved as the + mark. + +'character-search (C-])' + A character is read and point is moved to the next occurrence of + that character. A negative count searches for previous + occurrences. + +'character-search-backward (M-C-])' + A character is read and point is moved to the previous occurrence + of that character. A negative count searches for subsequent + occurrences. + +'skip-csi-sequence ()' + Read enough characters to consume a multi-key sequence such as + those defined for keys like Home and End. Such sequences begin + with a Control Sequence Indicator (CSI), usually ESC-[. If this + sequence is bound to "\e[", keys producing such sequences will have + no effect unless explicitly bound to a readline command, instead of + inserting stray characters into the editing buffer. This is + unbound by default, but usually bound to ESC-[. + +'insert-comment (M-#)' + Without a numeric argument, the value of the 'comment-begin' + variable is inserted at the beginning of the current line. If a + numeric argument is supplied, this command acts as a toggle: if the + characters at the beginning of the line do not match the value of + 'comment-begin', the value is inserted, otherwise the characters in + 'comment-begin' are deleted from the beginning of the line. In + either case, the line is accepted as if a newline had been typed. + The default value of 'comment-begin' causes this command to make + the current line a shell comment. If a numeric argument causes the + comment character to be removed, the line will be executed by the + shell. + +'dump-functions ()' + Print all of the functions and their key bindings to the Readline + output stream. If a numeric argument is supplied, the output is + formatted in such a way that it can be made part of an INPUTRC + file. This command is unbound by default. + +'dump-variables ()' + Print all of the settable variables and their values to the + Readline output stream. If a numeric argument is supplied, the + output is formatted in such a way that it can be made part of an + INPUTRC file. This command is unbound by default. + +'dump-macros ()' + Print all of the Readline key sequences bound to macros and the + strings they output. If a numeric argument is supplied, the output + is formatted in such a way that it can be made part of an INPUTRC + file. This command is unbound by default. + +'glob-complete-word (M-g)' + The word before point is treated as a pattern for pathname + expansion, with an asterisk implicitly appended. This pattern is + used to generate a list of matching file names for possible + completions. + +'glob-expand-word (C-x *)' + The word before point is treated as a pattern for pathname + expansion, and the list of matching file names is inserted, + replacing the word. If a numeric argument is supplied, a '*' is + appended before pathname expansion. + +'glob-list-expansions (C-x g)' + The list of expansions that would have been generated by + 'glob-expand-word' is displayed, and the line is redrawn. If a + numeric argument is supplied, a '*' is appended before pathname + expansion. + +'display-shell-version (C-x C-v)' + Display version information about the current instance of Bash. + +'shell-expand-line (M-C-e)' + Expand the line as the shell does. This performs alias and history + expansion as well as all of the shell word expansions (*note Shell + Expansions::). + +'history-expand-line (M-^)' + Perform history expansion on the current line. + +'magic-space ()' + Perform history expansion on the current line and insert a space + (*note History Interaction::). + +'alias-expand-line ()' + Perform alias expansion on the current line (*note Aliases::). + +'history-and-alias-expand-line ()' + Perform history and alias expansion on the current line. + +'insert-last-argument (M-. or M-_)' + A synonym for 'yank-last-arg'. + +'edit-and-execute-command (C-x C-e)' + Invoke an editor on the current command line, and execute the + result as shell commands. Bash attempts to invoke '$VISUAL', + '$EDITOR', and 'emacs' as the editor, in that order. + + +File: bash.info, Node: Readline vi Mode, Next: Programmable Completion, Prev: Bindable Readline Commands, Up: Command Line Editing + +8.5 Readline vi Mode +==================== + +While the Readline library does not have a full set of 'vi' editing +functions, it does contain enough to allow simple editing of the line. +The Readline 'vi' mode behaves as specified in the POSIX standard. + + In order to switch interactively between 'emacs' and 'vi' editing +modes, use the 'set -o emacs' and 'set -o vi' commands (*note The Set +Builtin::). The Readline default is 'emacs' mode. + + When you enter a line in 'vi' mode, you are already placed in +'insertion' mode, as if you had typed an 'i'. Pressing switches +you into 'command' mode, where you can edit the text of the line with +the standard 'vi' movement keys, move to previous history lines with 'k' +and subsequent lines with 'j', and so forth. + + +File: bash.info, Node: Programmable Completion, Next: Programmable Completion Builtins, Prev: Readline vi Mode, Up: Command Line Editing + +8.6 Programmable Completion +=========================== + +When word completion is attempted for an argument to a command for which +a completion specification (a COMPSPEC) has been defined using the +'complete' builtin (*note Programmable Completion Builtins::), the +programmable completion facilities are invoked. + + First, the command name is identified. If a compspec has been +defined for that command, the compspec is used to generate the list of +possible completions for the word. If the command word is the empty +string (completion attempted at the beginning of an empty line), any +compspec defined with the '-E' option to 'complete' is used. If the +command word is a full pathname, a compspec for the full pathname is +searched for first. If no compspec is found for the full pathname, an +attempt is made to find a compspec for the portion following the final +slash. If those searches do not result in a compspec, any compspec +defined with the '-D' option to 'complete' is used as the default. If +there is no default compspec, Bash attempts alias expansion on the +command word as a final resort, and attempts to find a compspec for the +command word from any successful expansion + + Once a compspec has been found, it is used to generate the list of +matching words. If a compspec is not found, the default Bash completion +described above (*note Commands For Completion::) is performed. + + First, the actions specified by the compspec are used. Only matches +which are prefixed by the word being completed are returned. When the +'-f' or '-d' option is used for filename or directory name completion, +the shell variable 'FIGNORE' is used to filter the matches. *Note Bash +Variables::, for a description of 'FIGNORE'. + + Any completions specified by a filename expansion pattern to the '-G' +option are generated next. The words generated by the pattern need not +match the word being completed. The 'GLOBIGNORE' shell variable is not +used to filter the matches, but the 'FIGNORE' shell variable is used. + + Next, the string specified as the argument to the '-W' option is +considered. The string is first split using the characters in the 'IFS' +special variable as delimiters. Shell quoting is honored within the +string, in order to provide a mechanism for the words to contain shell +metacharacters or characters in the value of 'IFS'. Each word is then +expanded using brace expansion, tilde expansion, parameter and variable +expansion, command substitution, and arithmetic expansion, as described +above (*note Shell Expansions::). The results are split using the rules +described above (*note Word Splitting::). The results of the expansion +are prefix-matched against the word being completed, and the matching +words become the possible completions. + + After these matches have been generated, any shell function or +command specified with the '-F' and '-C' options is invoked. When the +command or function is invoked, the 'COMP_LINE', 'COMP_POINT', +'COMP_KEY', and 'COMP_TYPE' variables are assigned values as described +above (*note Bash Variables::). If a shell function is being invoked, +the 'COMP_WORDS' and 'COMP_CWORD' variables are also set. When the +function or command is invoked, the first argument ($1) is the name of +the command whose arguments are being completed, the second argument +($2) is the word being completed, and the third argument ($3) is the +word preceding the word being completed on the current command line. No +filtering of the generated completions against the word being completed +is performed; the function or command has complete freedom in generating +the matches. + + Any function specified with '-F' is invoked first. The function may +use any of the shell facilities, including the 'compgen' and 'compopt' +builtins described below (*note Programmable Completion Builtins::), to +generate the matches. It must put the possible completions in the +'COMPREPLY' array variable, one per array element. + + Next, any command specified with the '-C' option is invoked in an +environment equivalent to command substitution. It should print a list +of completions, one per line, to the standard output. Backslash may be +used to escape a newline, if necessary. + + After all of the possible completions are generated, any filter +specified with the '-X' option is applied to the list. The filter is a +pattern as used for pathname expansion; a '&' in the pattern is replaced +with the text of the word being completed. A literal '&' may be escaped +with a backslash; the backslash is removed before attempting a match. +Any completion that matches the pattern will be removed from the list. +A leading '!' negates the pattern; in this case any completion not +matching the pattern will be removed. If the 'nocasematch' shell option +(see the description of 'shopt' in *note The Shopt Builtin::) is +enabled, the match is performed without regard to the case of alphabetic +characters. + + Finally, any prefix and suffix specified with the '-P' and '-S' +options are added to each member of the completion list, and the result +is returned to the Readline completion code as the list of possible +completions. + + If the previously-applied actions do not generate any matches, and +the '-o dirnames' option was supplied to 'complete' when the compspec +was defined, directory name completion is attempted. + + If the '-o plusdirs' option was supplied to 'complete' when the +compspec was defined, directory name completion is attempted and any +matches are added to the results of the other actions. + + By default, if a compspec is found, whatever it generates is returned +to the completion code as the full set of possible completions. The +default Bash completions are not attempted, and the Readline default of +filename completion is disabled. If the '-o bashdefault' option was +supplied to 'complete' when the compspec was defined, the default Bash +completions are attempted if the compspec generates no matches. If the +'-o default' option was supplied to 'complete' when the compspec was +defined, Readline's default completion will be performed if the compspec +(and, if attempted, the default Bash completions) generate no matches. + + When a compspec indicates that directory name completion is desired, +the programmable completion functions force Readline to append a slash +to completed names which are symbolic links to directories, subject to +the value of the MARK-DIRECTORIES Readline variable, regardless of the +setting of the MARK-SYMLINKED-DIRECTORIES Readline variable. + + There is some support for dynamically modifying completions. This is +most useful when used in combination with a default completion specified +with '-D'. It's possible for shell functions executed as completion +handlers to indicate that completion should be retried by returning an +exit status of 124. If a shell function returns 124, and changes the +compspec associated with the command on which completion is being +attempted (supplied as the first argument when the function is +executed), programmable completion restarts from the beginning, with an +attempt to find a new compspec for that command. This allows a set of +completions to be built dynamically as completion is attempted, rather +than being loaded all at once. + + For instance, assuming that there is a library of compspecs, each +kept in a file corresponding to the name of the command, the following +default completion function would load completions dynamically: + + _completion_loader() + { + . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 + } + complete -D -F _completion_loader -o bashdefault -o default + + +File: bash.info, Node: Programmable Completion Builtins, Next: A Programmable Completion Example, Prev: Programmable Completion, Up: Command Line Editing + +8.7 Programmable Completion Builtins +==================================== + +Three builtin commands are available to manipulate the programmable +completion facilities: one to specify how the arguments to a particular +command are to be completed, and two to modify the completion as it is +happening. + +'compgen' + compgen [OPTION] [WORD] + + Generate possible completion matches for WORD according to the + OPTIONs, which may be any option accepted by the 'complete' builtin + with the exception of '-p' and '-r', and write the matches to the + standard output. When using the '-F' or '-C' options, the various + shell variables set by the programmable completion facilities, + while available, will not have useful values. + + The matches will be generated in the same way as if the + programmable completion code had generated them directly from a + completion specification with the same flags. If WORD is + specified, only those completions matching WORD will be displayed. + + The return value is true unless an invalid option is supplied, or + no matches were generated. + +'complete' + complete [-abcdefgjksuv] [-o COMP-OPTION] [-DEI] [-A ACTION] [-G GLOBPAT] + [-W WORDLIST] [-F FUNCTION] [-C COMMAND] [-X FILTERPAT] + [-P PREFIX] [-S SUFFIX] NAME [NAME ...] + complete -pr [-DEI] [NAME ...] + + Specify how arguments to each NAME should be completed. If the + '-p' option is supplied, or if no options are supplied, existing + completion specifications are printed in a way that allows them to + be reused as input. The '-r' option removes a completion + specification for each NAME, or, if no NAMEs are supplied, all + completion specifications. The '-D' option indicates that other + supplied options and actions should apply to the "default" command + completion; that is, completion attempted on a command for which no + completion has previously been defined. The '-E' option indicates + that other supplied options and actions should apply to "empty" + command completion; that is, completion attempted on a blank line. + The '-I' option indicates that other supplied options and actions + should apply to completion on the initial non-assignment word on + the line, or after a command delimiter such as ';' or '|', which is + usually command name completion. If multiple options are supplied, + the '-D' option takes precedence over '-E', and both take + precedence over '-I'. If any of '-D', '-E', or '-I' are supplied, + any other NAME arguments are ignored; these completions only apply + to the case specified by the option. + + The process of applying these completion specifications when word + completion is attempted is described above (*note Programmable + Completion::). + + Other options, if specified, have the following meanings. The + arguments to the '-G', '-W', and '-X' options (and, if necessary, + the '-P' and '-S' options) should be quoted to protect them from + expansion before the 'complete' builtin is invoked. + + '-o COMP-OPTION' + The COMP-OPTION controls several aspects of the compspec's + behavior beyond the simple generation of completions. + COMP-OPTION may be one of: + + 'bashdefault' + Perform the rest of the default Bash completions if the + compspec generates no matches. + + 'default' + Use Readline's default filename completion if the + compspec generates no matches. + + 'dirnames' + Perform directory name completion if the compspec + generates no matches. + + 'filenames' + Tell Readline that the compspec generates filenames, so + it can perform any filename-specific processing (like + adding a slash to directory names, quoting special + characters, or suppressing trailing spaces). This option + is intended to be used with shell functions specified + with '-F'. + + 'noquote' + Tell Readline not to quote the completed words if they + are filenames (quoting filenames is the default). + + 'nosort' + Tell Readline not to sort the list of possible + completions alphabetically. + + 'nospace' + Tell Readline not to append a space (the default) to + words completed at the end of the line. + + 'plusdirs' + After any matches defined by the compspec are generated, + directory name completion is attempted and any matches + are added to the results of the other actions. + + '-A ACTION' + The ACTION may be one of the following to generate a list of + possible completions: + + 'alias' + Alias names. May also be specified as '-a'. + + 'arrayvar' + Array variable names. + + 'binding' + Readline key binding names (*note Bindable Readline + Commands::). + + 'builtin' + Names of shell builtin commands. May also be specified + as '-b'. + + 'command' + Command names. May also be specified as '-c'. + + 'directory' + Directory names. May also be specified as '-d'. + + 'disabled' + Names of disabled shell builtins. + + 'enabled' + Names of enabled shell builtins. + + 'export' + Names of exported shell variables. May also be specified + as '-e'. + + 'file' + File names. May also be specified as '-f'. + + 'function' + Names of shell functions. + + 'group' + Group names. May also be specified as '-g'. + + 'helptopic' + Help topics as accepted by the 'help' builtin (*note Bash + Builtins::). + + 'hostname' + Hostnames, as taken from the file specified by the + 'HOSTFILE' shell variable (*note Bash Variables::). + + 'job' + Job names, if job control is active. May also be + specified as '-j'. + + 'keyword' + Shell reserved words. May also be specified as '-k'. + + 'running' + Names of running jobs, if job control is active. + + 'service' + Service names. May also be specified as '-s'. + + 'setopt' + Valid arguments for the '-o' option to the 'set' builtin + (*note The Set Builtin::). + + 'shopt' + Shell option names as accepted by the 'shopt' builtin + (*note Bash Builtins::). + + 'signal' + Signal names. + + 'stopped' + Names of stopped jobs, if job control is active. + + 'user' + User names. May also be specified as '-u'. + + 'variable' + Names of all shell variables. May also be specified as + '-v'. + + '-C COMMAND' + COMMAND is executed in a subshell environment, and its output + is used as the possible completions. + + '-F FUNCTION' + The shell function FUNCTION is executed in the current shell + environment. When it is executed, $1 is the name of the + command whose arguments are being completed, $2 is the word + being completed, and $3 is the word preceding the word being + completed, as described above (*note Programmable + Completion::). When it finishes, the possible completions are + retrieved from the value of the 'COMPREPLY' array variable. + + '-G GLOBPAT' + The filename expansion pattern GLOBPAT is expanded to generate + the possible completions. + + '-P PREFIX' + PREFIX is added at the beginning of each possible completion + after all other options have been applied. + + '-S SUFFIX' + SUFFIX is appended to each possible completion after all other + options have been applied. + + '-W WORDLIST' + The WORDLIST is split using the characters in the 'IFS' + special variable as delimiters, and each resultant word is + expanded. The possible completions are the members of the + resultant list which match the word being completed. + + '-X FILTERPAT' + FILTERPAT is a pattern as used for filename expansion. It is + applied to the list of possible completions generated by the + preceding options and arguments, and each completion matching + FILTERPAT is removed from the list. A leading '!' in + FILTERPAT negates the pattern; in this case, any completion + not matching FILTERPAT is removed. + + The return value is true unless an invalid option is supplied, an + option other than '-p' or '-r' is supplied without a NAME argument, + an attempt is made to remove a completion specification for a NAME + for which no specification exists, or an error occurs adding a + completion specification. + +'compopt' + compopt [-o OPTION] [-DEI] [+o OPTION] [NAME] + Modify completion options for each NAME according to the OPTIONs, + or for the currently-executing completion if no NAMEs are supplied. + If no OPTIONs are given, display the completion options for each + NAME or the current completion. The possible values of OPTION are + those valid for the 'complete' builtin described above. The '-D' + option indicates that other supplied options should apply to the + "default" command completion; that is, completion attempted on a + command for which no completion has previously been defined. The + '-E' option indicates that other supplied options should apply to + "empty" command completion; that is, completion attempted on a + blank line. The '-I' option indicates that other supplied options + should apply to completion on the initial non-assignment word on + the line, or after a command delimiter such as ';' or '|', which is + usually command name completion. + + If multiple options are supplied, the '-D' option takes precedence + over '-E', and both take precedence over '-I' + + The return value is true unless an invalid option is supplied, an + attempt is made to modify the options for a NAME for which no + completion specification exists, or an output error occurs. + + +File: bash.info, Node: A Programmable Completion Example, Prev: Programmable Completion Builtins, Up: Command Line Editing + +8.8 A Programmable Completion Example +===================================== + +The most common way to obtain additional completion functionality beyond +the default actions 'complete' and 'compgen' provide is to use a shell +function and bind it to a particular command using 'complete -F'. + + The following function provides completions for the 'cd' builtin. It +is a reasonably good example of what shell functions must do when used +for completion. This function uses the word passed as '$2' to determine +the directory name to complete. You can also use the 'COMP_WORDS' array +variable; the current word is indexed by the 'COMP_CWORD' variable. + + The function relies on the 'complete' and 'compgen' builtins to do +much of the work, adding only the things that the Bash 'cd' does beyond +accepting basic directory names: tilde expansion (*note Tilde +Expansion::), searching directories in $CDPATH, which is described above +(*note Bourne Shell Builtins::), and basic support for the 'cdable_vars' +shell option (*note The Shopt Builtin::). '_comp_cd' modifies the value +of IFS so that it contains only a newline to accommodate file names +containing spaces and tabs - 'compgen' prints the possible completions +it generates one per line. + + Possible completions go into the COMPREPLY array variable, one +completion per array element. The programmable completion system +retrieves the completions from there when the function returns. + + # A completion function for the cd builtin + # based on the cd completion function from the bash_completion package + _comp_cd() + { + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, which also expands tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=${CDPATH/#:/.:} + _cdpath=${_cdpath//::/:.:} + _cdpath=${_cdpath/%:/:.} + for i in ${_cdpath//:/$'\n'}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="${#COMPREPLY[@]}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=${j#$i/} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + return 0 + } + + We install the completion function using the '-F' option to +'complete': + + # Tell readline to quote appropriate and append slashes to directories; + # use the bash default completion for other arguments + complete -o filenames -o nospace -o bashdefault -F _comp_cd cd + +Since we'd like Bash and Readline to take care of some of the other +details for us, we use several other options to tell Bash and Readline +what to do. The '-o filenames' option tells Readline that the possible +completions should be treated as filenames, and quoted appropriately. +That option will also cause Readline to append a slash to filenames it +can determine are directories (which is why we might want to extend +'_comp_cd' to append a slash if we're using directories found via +CDPATH: Readline can't tell those completions are directories). The '-o +nospace' option tells Readline to not append a space character to the +directory name, in case we want to append to it. The '-o bashdefault' +option brings in the rest of the "Bash default" completions - possible +completion that Bash adds to the default Readline set. These include +things like command name completion, variable completion for words +beginning with '$' or '${', completions containing pathname expansion +patterns (*note Filename Expansion::), and so on. + + Once installed using 'complete', '_comp_cd' will be called every time +we attempt word completion for a 'cd' command. + + Many more examples - an extensive collection of completions for most +of the common GNU, Unix, and Linux commands - are available as part of +the bash_completion project. This is installed by default on many +GNU/Linux distributions. Originally written by Ian Macdonald, the +project now lives at . There +are ports for other systems such as Solaris and Mac OS X. + + An older version of the bash_completion package is distributed with +bash in the 'examples/complete' subdirectory. + + +File: bash.info, Node: Using History Interactively, Next: Installing Bash, Prev: Command Line Editing, Up: Top + +9 Using History Interactively +***************************** + +This chapter describes how to use the GNU History Library interactively, +from a user's standpoint. It should be considered a user's guide. For +information on using the GNU History Library in other programs, see the +GNU Readline Library Manual. + +* Menu: + +* Bash History Facilities:: How Bash lets you manipulate your command + history. +* Bash History Builtins:: The Bash builtin commands that manipulate + the command history. +* History Interaction:: What it feels like using History as a user. + + +File: bash.info, Node: Bash History Facilities, Next: Bash History Builtins, Up: Using History Interactively + +9.1 Bash History Facilities +=========================== + +When the '-o history' option to the 'set' builtin is enabled (*note The +Set Builtin::), the shell provides access to the "command history", the +list of commands previously typed. The value of the 'HISTSIZE' shell +variable is used as the number of commands to save in a history list. +The text of the last '$HISTSIZE' commands (default 500) is saved. The +shell stores each command in the history list prior to parameter and +variable expansion but after history expansion is performed, subject to +the values of the shell variables 'HISTIGNORE' and 'HISTCONTROL'. + + When the shell starts up, the history is initialized from the file +named by the 'HISTFILE' variable (default '~/.bash_history'). The file +named by the value of 'HISTFILE' is truncated, if necessary, to contain +no more than the number of lines specified by the value of the +'HISTFILESIZE' variable. When a shell with history enabled exits, the +last '$HISTSIZE' lines are copied from the history list to the file +named by '$HISTFILE'. If the 'histappend' shell option is set (*note +Bash Builtins::), the lines are appended to the history file, otherwise +the history file is overwritten. If 'HISTFILE' is unset, or if the +history file is unwritable, the history is not saved. After saving the +history, the history file is truncated to contain no more than +'$HISTFILESIZE' lines. If 'HISTFILESIZE' is unset, or set to null, a +non-numeric value, or a numeric value less than zero, the history file +is not truncated. + + If the 'HISTTIMEFORMAT' is set, the time stamp information associated +with each history entry is written to the history file, marked with the +history comment character. When the history file is read, lines +beginning with the history comment character followed immediately by a +digit are interpreted as timestamps for the following history entry. + + The builtin command 'fc' may be used to list or edit and re-execute a +portion of the history list. The 'history' builtin may be used to +display or modify the history list and manipulate the history file. +When using command-line editing, search commands are available in each +editing mode that provide access to the history list (*note Commands For +History::). + + The shell allows control over which commands are saved on the history +list. The 'HISTCONTROL' and 'HISTIGNORE' variables may be set to cause +the shell to save only a subset of the commands entered. The 'cmdhist' +shell option, if enabled, causes the shell to attempt to save each line +of a multi-line command in the same history entry, adding semicolons +where necessary to preserve syntactic correctness. The 'lithist' shell +option causes the shell to save the command with embedded newlines +instead of semicolons. The 'shopt' builtin is used to set these +options. *Note The Shopt Builtin::, for a description of 'shopt'. + + +File: bash.info, Node: Bash History Builtins, Next: History Interaction, Prev: Bash History Facilities, Up: Using History Interactively + +9.2 Bash History Builtins +========================= + +Bash provides two builtin commands which manipulate the history list and +history file. + +'fc' + fc [-e ENAME] [-lnr] [FIRST] [LAST] + fc -s [PAT=REP] [COMMAND] + + The first form selects a range of commands from FIRST to LAST from + the history list and displays or edits and re-executes them. Both + FIRST and LAST may be specified as a string (to locate the most + recent command beginning with that string) or as a number (an index + into the history list, where a negative number is used as an offset + from the current command number). + + When listing, a FIRST or LAST of 0 is equivalent to -1 and -0 is + equivalent to the current command (usually the 'fc' command); + otherwise 0 is equivalent to -1 and -0 is invalid. + + If LAST is not specified, it is set to FIRST. If FIRST is not + specified, it is set to the previous command for editing and -16 + for listing. If the '-l' flag is given, the commands are listed on + standard output. The '-n' flag suppresses the command numbers when + listing. The '-r' flag reverses the order of the listing. + Otherwise, the editor given by ENAME is invoked on a file + containing those commands. If ENAME is not given, the value of the + following variable expansion is used: '${FCEDIT:-${EDITOR:-vi}}'. + This says to use the value of the 'FCEDIT' variable if set, or the + value of the 'EDITOR' variable if that is set, or 'vi' if neither + is set. When editing is complete, the edited commands are echoed + and executed. + + In the second form, COMMAND is re-executed after each instance of + PAT in the selected command is replaced by REP. COMMAND is + interpreted the same as FIRST above. + + A useful alias to use with the 'fc' command is 'r='fc -s'', so that + typing 'r cc' runs the last command beginning with 'cc' and typing + 'r' re-executes the last command (*note Aliases::). + +'history' + history [N] + history -c + history -d OFFSET + history -d START-END + history [-anrw] [FILENAME] + history -ps ARG + + With no options, display the history list with line numbers. Lines + prefixed with a '*' have been modified. An argument of N lists + only the last N lines. If the shell variable 'HISTTIMEFORMAT' is + set and not null, it is used as a format string for STRFTIME to + display the time stamp associated with each displayed history + entry. No intervening blank is printed between the formatted time + stamp and the history line. + + Options, if supplied, have the following meanings: + + '-c' + Clear the history list. This may be combined with the other + options to replace the history list completely. + + '-d OFFSET' + Delete the history entry at position OFFSET. If OFFSET is + positive, it should be specified as it appears when the + history is displayed. If OFFSET is negative, it is + interpreted as relative to one greater than the last history + position, so negative indices count back from the end of the + history, and an index of '-1' refers to the current 'history + -d' command. + + '-d START-END' + Delete the history entries between positions START and END, + inclusive. Positive and negative values for START and END are + interpreted as described above. + + '-a' + Append the new history lines to the history file. These are + history lines entered since the beginning of the current Bash + session, but not already appended to the history file. + + '-n' + Append the history lines not already read from the history + file to the current history list. These are lines appended to + the history file since the beginning of the current Bash + session. + + '-r' + Read the history file and append its contents to the history + list. + + '-w' + Write out the current history list to the history file. + + '-p' + Perform history substitution on the ARGs and display the + result on the standard output, without storing the results in + the history list. + + '-s' + The ARGs are added to the end of the history list as a single + entry. + + When any of the '-w', '-r', '-a', or '-n' options is used, if + FILENAME is given, then it is used as the history file. If not, + then the value of the 'HISTFILE' variable is used. + + +File: bash.info, Node: History Interaction, Prev: Bash History Builtins, Up: Using History Interactively + +9.3 History Expansion +===================== + +The History library provides a history expansion feature that is similar +to the history expansion provided by 'csh'. This section describes the +syntax used to manipulate the history information. + + History expansions introduce words from the history list into the +input stream, making it easy to repeat commands, insert the arguments to +a previous command into the current input line, or fix errors in +previous commands quickly. + + History expansion is performed immediately after a complete line is +read, before the shell breaks it into words, and is performed on each +line individually. Bash attempts to inform the history expansion +functions about quoting still in effect from previous lines. + + History expansion takes place in two parts. The first is to +determine which line from the history list should be used during +substitution. The second is to select portions of that line for +inclusion into the current one. The line selected from the history is +called the "event", and the portions of that line that are acted upon +are called "words". Various "modifiers" are available to manipulate the +selected words. The line is broken into words in the same fashion that +Bash does, so that several words surrounded by quotes are considered one +word. History expansions are introduced by the appearance of the +history expansion character, which is '!' by default. + + History expansion implements shell-like quoting conventions: a +backslash can be used to remove the special handling for the next +character; single quotes enclose verbatim sequences of characters, and +can be used to inhibit history expansion; and characters enclosed within +double quotes may be subject to history expansion, since backslash can +escape the history expansion character, but single quotes may not, since +they are not treated specially within double quotes. + + When using the shell, only '\' and ''' may be used to escape the +history expansion character, but the history expansion character is also +treated as quoted if it immediately precedes the closing double quote in +a double-quoted string. + + Several shell options settable with the 'shopt' builtin (*note The +Shopt Builtin::) may be used to tailor the behavior of history +expansion. If the 'histverify' shell option is enabled, and Readline is +being used, history substitutions are not immediately passed to the +shell parser. Instead, the expanded line is reloaded into the Readline +editing buffer for further modification. If Readline is being used, and +the 'histreedit' shell option is enabled, a failed history expansion +will be reloaded into the Readline editing buffer for correction. The +'-p' option to the 'history' builtin command may be used to see what a +history expansion will do before using it. The '-s' option to the +'history' builtin may be used to add commands to the end of the history +list without actually executing them, so that they are available for +subsequent recall. This is most useful in conjunction with Readline. + + The shell allows control of the various characters used by the +history expansion mechanism with the 'histchars' variable, as explained +above (*note Bash Variables::). The shell uses the history comment +character to mark history timestamps when writing the history file. + +* Menu: + +* Event Designators:: How to specify which history line to use. +* Word Designators:: Specifying which words are of interest. +* Modifiers:: Modifying the results of substitution. + + +File: bash.info, Node: Event Designators, Next: Word Designators, Up: History Interaction + +9.3.1 Event Designators +----------------------- + +An event designator is a reference to a command line entry in the +history list. Unless the reference is absolute, events are relative to +the current position in the history list. + +'!' + Start a history substitution, except when followed by a space, tab, + the end of the line, '=' or '(' (when the 'extglob' shell option is + enabled using the 'shopt' builtin). + +'!N' + Refer to command line N. + +'!-N' + Refer to the command N lines back. + +'!!' + Refer to the previous command. This is a synonym for '!-1'. + +'!STRING' + Refer to the most recent command preceding the current position in + the history list starting with STRING. + +'!?STRING[?]' + Refer to the most recent command preceding the current position in + the history list containing STRING. The trailing '?' may be + omitted if the STRING is followed immediately by a newline. If + STRING is missing, the string from the most recent search is used; + it is an error if there is no previous search string. + +'^STRING1^STRING2^' + Quick Substitution. Repeat the last command, replacing STRING1 + with STRING2. Equivalent to '!!:s^STRING1^STRING2^'. + +'!#' + The entire command line typed so far. + + +File: bash.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction + +9.3.2 Word Designators +---------------------- + +Word designators are used to select desired words from the event. A ':' +separates the event specification from the word designator. It may be +omitted if the word designator begins with a '^', '$', '*', '-', or '%'. +Words are numbered from the beginning of the line, with the first word +being denoted by 0 (zero). Words are inserted into the current line +separated by single spaces. + + For example, + +'!!' + designates the preceding command. When you type this, the + preceding command is repeated in toto. + +'!!:$' + designates the last argument of the preceding command. This may be + shortened to '!$'. + +'!fi:2' + designates the second argument of the most recent command starting + with the letters 'fi'. + + Here are the word designators: + +'0 (zero)' + The '0'th word. For many applications, this is the command word. + +'N' + The Nth word. + +'^' + The first argument; that is, word 1. + +'$' + The last argument. + +'%' + The first word matched by the most recent '?STRING?' search, if the + search string begins with a character that is part of a word. + +'X-Y' + A range of words; '-Y' abbreviates '0-Y'. + +'*' + All of the words, except the '0'th. This is a synonym for '1-$'. + It is not an error to use '*' if there is just one word in the + event; the empty string is returned in that case. + +'X*' + Abbreviates 'X-$' + +'X-' + Abbreviates 'X-$' like 'X*', but omits the last word. If 'x' is + missing, it defaults to 0. + + If a word designator is supplied without an event specification, the +previous command is used as the event. + + +File: bash.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction + +9.3.3 Modifiers +--------------- + +After the optional word designator, you can add a sequence of one or +more of the following modifiers, each preceded by a ':'. These modify, +or edit, the word or words selected from the history event. + +'h' + Remove a trailing pathname component, leaving only the head. + +'t' + Remove all leading pathname components, leaving the tail. + +'r' + Remove a trailing suffix of the form '.SUFFIX', leaving the + basename. + +'e' + Remove all but the trailing suffix. + +'p' + Print the new command but do not execute it. + +'q' + Quote the substituted words, escaping further substitutions. + +'x' + Quote the substituted words as with 'q', but break into words at + spaces, tabs, and newlines. The 'q' and 'x' modifiers are mutually + exclusive; the last one supplied is used. + +'s/OLD/NEW/' + Substitute NEW for the first occurrence of OLD in the event line. + Any character may be used as the delimiter in place of '/'. The + delimiter may be quoted in OLD and NEW with a single backslash. If + '&' appears in NEW, it is replaced by OLD. A single backslash will + quote the '&'. If OLD is null, it is set to the last OLD + substituted, or, if no previous history substitutions took place, + the last STRING in a !?STRING'[?]' search. If NEW is is null, each + matching OLD is deleted. The final delimiter is optional if it is + the last character on the input line. + +'&' + Repeat the previous substitution. + +'g' +'a' + Cause changes to be applied over the entire event line. Used in + conjunction with 's', as in 'gs/OLD/NEW/', or with '&'. + +'G' + Apply the following 's' or '&' modifier once to each word in the + event. + + +File: bash.info, Node: Installing Bash, Next: Reporting Bugs, Prev: Using History Interactively, Up: Top + +10 Installing Bash +****************** + +This chapter provides basic instructions for installing Bash on the +various supported platforms. The distribution supports the GNU +operating systems, nearly every version of Unix, and several non-Unix +systems such as BeOS and Interix. Other independent ports exist for +MS-DOS, OS/2, and Windows platforms. + +* Menu: + +* Basic Installation:: Installation instructions. +* Compilers and Options:: How to set special options for various + systems. +* Compiling For Multiple Architectures:: How to compile Bash for more + than one kind of system from + the same source tree. +* Installation Names:: How to set the various paths used by the installation. +* Specifying the System Type:: How to configure Bash for a particular system. +* Sharing Defaults:: How to share default configuration values among GNU + programs. +* Operation Controls:: Options recognized by the configuration program. +* Optional Features:: How to enable and disable optional features when + building Bash. + + +File: bash.info, Node: Basic Installation, Next: Compilers and Options, Up: Installing Bash + +10.1 Basic Installation +======================= + +These are installation instructions for Bash. + + The simplest way to compile Bash is: + + 1. 'cd' to the directory containing the source code and type + './configure' to configure Bash for your system. If you're using + 'csh' on an old version of System V, you might need to type 'sh + ./configure' instead to prevent 'csh' from trying to execute + 'configure' itself. + + Running 'configure' takes some time. While running, it prints + messages telling which features it is checking for. + + 2. Type 'make' to compile Bash and build the 'bashbug' bug reporting + script. + + 3. Optionally, type 'make tests' to run the Bash test suite. + + 4. Type 'make install' to install 'bash' and 'bashbug'. This will + also install the manual pages and Info file. + + The 'configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a 'Makefile' in each directory of the package +(the top directory, the 'builtins', 'doc', and 'support' directories, +each directory under 'lib', and several others). It also creates a +'config.h' file containing system-dependent definitions. Finally, it +creates a shell script named 'config.status' that you can run in the +future to recreate the current configuration, a file 'config.cache' that +saves the results of its tests to speed up reconfiguring, and a file +'config.log' containing compiler output (useful mainly for debugging +'configure'). If at some point 'config.cache' contains results you +don't want to keep, you may remove or edit it. + + To find out more about the options and arguments that the 'configure' +script understands, type + + bash-4.2$ ./configure --help + +at the Bash prompt in your Bash source directory. + + If you want to build Bash in a directory separate from the source +directory - to build for multiple architectures, for example - just use +the full path to the configure script. The following commands will +build bash in a directory under '/usr/local/build' from the source code +in '/usr/local/src/bash-4.4': + + mkdir /usr/local/build/bash-4.4 + cd /usr/local/build/bash-4.4 + bash /usr/local/src/bash-4.4/configure + make + + See *note Compiling For Multiple Architectures:: for more information +about building in a directory separate from the source. + + If you need to do unusual things to compile Bash, please try to +figure out how 'configure' could check whether or not to do them, and +mail diffs or instructions to so they can be +considered for the next release. + + The file 'configure.ac' is used to create 'configure' by a program +called Autoconf. You only need 'configure.ac' if you want to change it +or regenerate 'configure' using a newer version of Autoconf. If you do +this, make sure you are using Autoconf version 2.50 or newer. + + You can remove the program binaries and object files from the source +code directory by typing 'make clean'. To also remove the files that +'configure' created (so you can compile Bash for a different kind of +computer), type 'make distclean'. + + +File: bash.info, Node: Compilers and Options, Next: Compiling For Multiple Architectures, Prev: Basic Installation, Up: Installing Bash + +10.2 Compilers and Options +========================== + +Some systems require unusual options for compilation or linking that the +'configure' script does not know about. You can give 'configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + + On systems that have the 'env' program, you can do it like this: + + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + + The configuration process uses GCC to build Bash if it is available. + + +File: bash.info, Node: Compiling For Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Installing Bash + +10.3 Compiling For Multiple Architectures +========================================= + +You can compile Bash for more than one kind of computer at the same +time, by placing the object files for each architecture in their own +directory. To do this, you must use a version of 'make' that supports +the 'VPATH' variable, such as GNU 'make'. 'cd' to the directory where +you want the object files and executables to go and run the 'configure' +script from the source directory (*note Basic Installation::). You may +need to supply the '--srcdir=PATH' argument to tell 'configure' where +the source files are. 'configure' automatically checks for the source +code in the directory that 'configure' is in and in '..'. + + If you have to use a 'make' that does not supports the 'VPATH' +variable, you can compile Bash for one architecture at a time in the +source code directory. After you have installed Bash for one +architecture, use 'make distclean' before reconfiguring for another +architecture. + + Alternatively, if your system supports symbolic links, you can use +the 'support/mkclone' script to create a build tree which has symbolic +links back to each file in the source directory. Here's an example that +creates a build directory in the current directory from a source +directory '/usr/gnu/src/bash-2.0': + + bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 . + +The 'mkclone' script requires Bash, so you must have already built Bash +for at least one architecture before you can create build directories +for other architectures. + + +File: bash.info, Node: Installation Names, Next: Specifying the System Type, Prev: Compiling For Multiple Architectures, Up: Installing Bash + +10.4 Installation Names +======================= + +By default, 'make install' will install into '/usr/local/bin', +'/usr/local/man', etc. You can specify an installation prefix other +than '/usr/local' by giving 'configure' the option '--prefix=PATH', or +by specifying a value for the 'DESTDIR' 'make' variable when running +'make install'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give 'configure' the option '--exec-prefix=PATH', 'make install' will +use PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + +File: bash.info, Node: Specifying the System Type, Next: Sharing Defaults, Prev: Installation Names, Up: Installing Bash + +10.5 Specifying the System Type +=============================== + +There may be some features 'configure' can not figure out automatically, +but need to determine by the type of host Bash will run on. Usually +'configure' can figure that out, but if it prints a message saying it +can not guess the host type, give it the '--host=TYPE' option. 'TYPE' +can either be a short name for the system type, such as 'sun4', or a +canonical name with three fields: 'CPU-COMPANY-SYSTEM' (e.g., +'i386-unknown-freebsd4.2'). + + See the file 'support/config.sub' for the possible values of each +field. + + +File: bash.info, Node: Sharing Defaults, Next: Operation Controls, Prev: Specifying the System Type, Up: Installing Bash + +10.6 Sharing Defaults +===================== + +If you want to set default values for 'configure' scripts to share, you +can create a site shell script called 'config.site' that gives default +values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' +looks for 'PREFIX/share/config.site' if it exists, then +'PREFIX/etc/config.site' if it exists. Or, you can set the +'CONFIG_SITE' environment variable to the location of the site script. +A warning: the Bash 'configure' looks for a site script, but not all +'configure' scripts do. + + +File: bash.info, Node: Operation Controls, Next: Optional Features, Prev: Sharing Defaults, Up: Installing Bash + +10.7 Operation Controls +======================= + +'configure' recognizes the following options to control how it operates. + +'--cache-file=FILE' + Use and save the results of the tests in FILE instead of + './config.cache'. Set FILE to '/dev/null' to disable caching, for + debugging 'configure'. + +'--help' + Print a summary of the options to 'configure', and exit. + +'--quiet' +'--silent' +'-q' + Do not print messages saying which checks are being made. + +'--srcdir=DIR' + Look for the Bash source code in directory DIR. Usually + 'configure' can determine that directory automatically. + +'--version' + Print the version of Autoconf used to generate the 'configure' + script, and exit. + + 'configure' also accepts some other, not widely used, boilerplate +options. 'configure --help' prints the complete list. + + +File: bash.info, Node: Optional Features, Prev: Operation Controls, Up: Installing Bash + +10.8 Optional Features +====================== + +The Bash 'configure' has a number of '--enable-FEATURE' options, where +FEATURE indicates an optional part of Bash. There are also several +'--with-PACKAGE' options, where PACKAGE is something like 'bash-malloc' +or 'purify'. To turn off the default use of a package, use +'--without-PACKAGE'. To configure Bash without a feature that is +enabled by default, use '--disable-FEATURE'. + + Here is a complete list of the '--enable-' and '--with-' options that +the Bash 'configure' recognizes. + +'--with-afs' + Define if you are using the Andrew File System from Transarc. + +'--with-bash-malloc' + Use the Bash version of 'malloc' in the directory 'lib/malloc'. + This is not the same 'malloc' that appears in GNU libc, but an + older version originally derived from the 4.2 BSD 'malloc'. This + 'malloc' is very fast, but wastes some space on each allocation. + This option is enabled by default. The 'NOTES' file contains a + list of systems for which this should be turned off, and + 'configure' disables this option automatically for a number of + systems. + +'--with-curses' + Use the curses library instead of the termcap library. This should + be supplied if your system has an inadequate or incomplete termcap + database. + +'--with-gnu-malloc' + A synonym for '--with-bash-malloc'. + +'--with-installed-readline[=PREFIX]' + Define this to make Bash link with a locally-installed version of + Readline rather than the version in 'lib/readline'. This works + only with Readline 5.0 and later versions. If PREFIX is 'yes' or + not supplied, 'configure' uses the values of the make variables + 'includedir' and 'libdir', which are subdirectories of 'prefix' by + default, to find the installed version of Readline if it is not in + the standard system include and library directories. If PREFIX is + 'no', Bash links with the version in 'lib/readline'. If PREFIX is + set to any other value, 'configure' treats it as a directory + pathname and looks for the installed version of Readline in + subdirectories of that directory (include files in PREFIX/'include' + and the library in PREFIX/'lib'). + +'--with-purify' + Define this to use the Purify memory allocation checker from + Rational Software. + +'--enable-minimal-config' + This produces a shell with minimal features, close to the + historical Bourne shell. + + There are several '--enable-' options that alter how Bash is compiled +and linked, rather than changing run-time features. + +'--enable-largefile' + Enable support for large files + (http://www.unix.org/version2/whatsnew/lfs20mar.html) if the + operating system requires special compiler options to build + programs which can access large files. This is enabled by default, + if the operating system provides large file support. + +'--enable-profiling' + This builds a Bash binary that produces profiling information to be + processed by 'gprof' each time it is executed. + +'--enable-static-link' + This causes Bash to be linked statically, if 'gcc' is being used. + This could be used to build a version to use as root's shell. + + The 'minimal-config' option can be used to disable all of the +following options, but it is processed first, so individual options may +be enabled using 'enable-FEATURE'. + + All of the following options except for 'disabled-builtins', +'direxpand-default', and 'xpg-echo-default' are enabled by default, +unless the operating system does not provide the necessary support. + +'--enable-alias' + Allow alias expansion and include the 'alias' and 'unalias' + builtins (*note Aliases::). + +'--enable-arith-for-command' + Include support for the alternate form of the 'for' command that + behaves like the C language 'for' statement (*note Looping + Constructs::). + +'--enable-array-variables' + Include support for one-dimensional array shell variables (*note + Arrays::). + +'--enable-bang-history' + Include support for 'csh'-like history substitution (*note History + Interaction::). + +'--enable-brace-expansion' + Include 'csh'-like brace expansion ( 'b{a,b}c' ==> 'bac bbc' ). + See *note Brace Expansion::, for a complete description. + +'--enable-casemod-attributes' + Include support for case-modifying attributes in the 'declare' + builtin and assignment statements. Variables with the UPPERCASE + attribute, for example, will have their values converted to + uppercase upon assignment. + +'--enable-casemod-expansion' + Include support for case-modifying word expansions. + +'--enable-command-timing' + Include support for recognizing 'time' as a reserved word and for + displaying timing statistics for the pipeline following 'time' + (*note Pipelines::). This allows pipelines as well as shell + builtins and functions to be timed. + +'--enable-cond-command' + Include support for the '[[' conditional command. (*note + Conditional Constructs::). + +'--enable-cond-regexp' + Include support for matching POSIX regular expressions using the + '=~' binary operator in the '[[' conditional command. (*note + Conditional Constructs::). + +'--enable-coprocesses' + Include support for coprocesses and the 'coproc' reserved word + (*note Pipelines::). + +'--enable-debugger' + Include support for the bash debugger (distributed separately). + +'--enable-dev-fd-stat-broken' + If calling 'stat' on /dev/fd/N returns different results than + calling 'fstat' on file descriptor N, supply this option to enable + a workaround. This has implications for conditional commands that + test file attributes. + +'--enable-direxpand-default' + Cause the 'direxpand' shell option (*note The Shopt Builtin::) to + be enabled by default when the shell starts. It is normally + disabled by default. + +'--enable-directory-stack' + Include support for a 'csh'-like directory stack and the 'pushd', + 'popd', and 'dirs' builtins (*note The Directory Stack::). + +'--enable-disabled-builtins' + Allow builtin commands to be invoked via 'builtin xxx' even after + 'xxx' has been disabled using 'enable -n xxx'. See *note Bash + Builtins::, for details of the 'builtin' and 'enable' builtin + commands. + +'--enable-dparen-arithmetic' + Include support for the '((...))' command (*note Conditional + Constructs::). + +'--enable-extended-glob' + Include support for the extended pattern matching features + described above under *note Pattern Matching::. + +'--enable-extended-glob-default' + Set the default value of the EXTGLOB shell option described above + under *note The Shopt Builtin:: to be enabled. + +'--enable-function-import' + Include support for importing function definitions exported by + another instance of the shell from the environment. This option is + enabled by default. + +'--enable-glob-asciirange-default' + Set the default value of the GLOBASCIIRANGES shell option described + above under *note The Shopt Builtin:: to be enabled. This controls + the behavior of character ranges when used in pattern matching + bracket expressions. + +'--enable-help-builtin' + Include the 'help' builtin, which displays help on shell builtins + and variables (*note Bash Builtins::). + +'--enable-history' + Include command history and the 'fc' and 'history' builtin commands + (*note Bash History Facilities::). + +'--enable-job-control' + This enables the job control features (*note Job Control::), if the + operating system supports them. + +'--enable-multibyte' + This enables support for multibyte characters if the operating + system provides the necessary support. + +'--enable-net-redirections' + This enables the special handling of filenames of the form + '/dev/tcp/HOST/PORT' and '/dev/udp/HOST/PORT' when used in + redirections (*note Redirections::). + +'--enable-process-substitution' + This enables process substitution (*note Process Substitution::) if + the operating system provides the necessary support. + +'--enable-progcomp' + Enable the programmable completion facilities (*note Programmable + Completion::). If Readline is not enabled, this option has no + effect. + +'--enable-prompt-string-decoding' + Turn on the interpretation of a number of backslash-escaped + characters in the '$PS0', '$PS1', '$PS2', and '$PS4' prompt + strings. See *note Controlling the Prompt::, for a complete list + of prompt string escape sequences. + +'--enable-readline' + Include support for command-line editing and history with the Bash + version of the Readline library (*note Command Line Editing::). + +'--enable-restricted' + Include support for a "restricted shell". If this is enabled, + Bash, when called as 'rbash', enters a restricted mode. See *note + The Restricted Shell::, for a description of restricted mode. + +'--enable-select' + Include the 'select' compound command, which allows the generation + of simple menus (*note Conditional Constructs::). + +'--enable-separate-helpfiles' + Use external files for the documentation displayed by the 'help' + builtin instead of storing the text internally. + +'--enable-single-help-strings' + Store the text displayed by the 'help' builtin as a single string + for each help topic. This aids in translating the text to + different languages. You may need to disable this if your compiler + cannot handle very long string literals. + +'--enable-strict-posix-default' + Make Bash POSIX-conformant by default (*note Bash POSIX Mode::). + +'--enable-usg-echo-default' + A synonym for '--enable-xpg-echo-default'. + +'--enable-xpg-echo-default' + Make the 'echo' builtin expand backslash-escaped characters by + default, without requiring the '-e' option. This sets the default + value of the 'xpg_echo' shell option to 'on', which makes the Bash + 'echo' behave more like the version specified in the Single Unix + Specification, version 3. *Note Bash Builtins::, for a description + of the escape sequences that 'echo' recognizes. + + The file 'config-top.h' contains C Preprocessor '#define' statements +for options which are not settable from 'configure'. Some of these are +not meant to be changed; beware of the consequences if you do. Read the +comments associated with each definition for more information about its +effect. + + +File: bash.info, Node: Reporting Bugs, Next: Major Differences From The Bourne Shell, Prev: Installing Bash, Up: Top + +Appendix A Reporting Bugs +************************* + +Please report all bugs you find in Bash. But first, you should make +sure that it really is a bug, and that it appears in the latest version +of Bash. The latest version of Bash is always available for FTP from +. + + Once you have determined that a bug actually exists, use the +'bashbug' command to submit a bug report. If you have a fix, you are +encouraged to mail that as well! Suggestions and 'philosophical' bug +reports may be mailed to or posted to the Usenet +newsgroup 'gnu.bash.bug'. + + All bug reports should include: + * The version number of Bash. + * The hardware and operating system. + * The compiler used to compile Bash. + * A description of the bug behaviour. + * A short script or 'recipe' which exercises the bug and may be used + to reproduce it. + +'bashbug' inserts the first three items automatically into the template +it provides for filing a bug report. + + Please send all reports concerning this manual to . + + +File: bash.info, Node: Major Differences From The Bourne Shell, Next: GNU Free Documentation License, Prev: Reporting Bugs, Up: Top + +Appendix B Major Differences From The Bourne Shell +************************************************** + +Bash implements essentially the same grammar, parameter and variable +expansion, redirection, and quoting as the Bourne Shell. Bash uses the +POSIX standard as the specification of how these features are to be +implemented. There are some differences between the traditional Bourne +shell and Bash; this section quickly details the differences of +significance. A number of these differences are explained in greater +depth in previous sections. This section uses the version of 'sh' +included in SVR4.2 (the last version of the historical Bourne shell) as +the baseline reference. + + * Bash is POSIX-conformant, even where the POSIX specification + differs from traditional 'sh' behavior (*note Bash POSIX Mode::). + + * Bash has multi-character invocation options (*note Invoking + Bash::). + + * Bash has command-line editing (*note Command Line Editing::) and + the 'bind' builtin. + + * Bash provides a programmable word completion mechanism (*note + Programmable Completion::), and builtin commands 'complete', + 'compgen', and 'compopt', to manipulate it. + + * Bash has command history (*note Bash History Facilities::) and the + 'history' and 'fc' builtins to manipulate it. The Bash history + list maintains timestamp information and uses the value of the + 'HISTTIMEFORMAT' variable to display it. + + * Bash implements 'csh'-like history expansion (*note History + Interaction::). + + * Bash has one-dimensional array variables (*note Arrays::), and the + appropriate variable expansions and assignment syntax to use them. + Several of the Bash builtins take options to act on arrays. Bash + provides a number of built-in array variables. + + * The '$'...'' quoting syntax, which expands ANSI-C backslash-escaped + characters in the text between the single quotes, is supported + (*note ANSI-C Quoting::). + + * Bash supports the '$"..."' quoting syntax to do locale-specific + translation of the characters between the double quotes. The '-D', + '--dump-strings', and '--dump-po-strings' invocation options list + the translatable strings found in a script (*note Locale + Translation::). + + * Bash implements the '!' keyword to negate the return value of a + pipeline (*note Pipelines::). Very useful when an 'if' statement + needs to act only if a test fails. The Bash '-o pipefail' option + to 'set' will cause a pipeline to return a failure status if any + command fails. + + * Bash has the 'time' reserved word and command timing (*note + Pipelines::). The display of the timing statistics may be + controlled with the 'TIMEFORMAT' variable. + + * Bash implements the 'for (( EXPR1 ; EXPR2 ; EXPR3 ))' arithmetic + for command, similar to the C language (*note Looping + Constructs::). + + * Bash includes the 'select' compound command, which allows the + generation of simple menus (*note Conditional Constructs::). + + * Bash includes the '[[' compound command, which makes conditional + testing part of the shell grammar (*note Conditional Constructs::), + including optional regular expression matching. + + * Bash provides optional case-insensitive matching for the 'case' and + '[[' constructs. + + * Bash includes brace expansion (*note Brace Expansion::) and tilde + expansion (*note Tilde Expansion::). + + * Bash implements command aliases and the 'alias' and 'unalias' + builtins (*note Aliases::). + + * Bash provides shell arithmetic, the '((' compound command (*note + Conditional Constructs::), and arithmetic expansion (*note Shell + Arithmetic::). + + * Variables present in the shell's initial environment are + automatically exported to child processes. The Bourne shell does + not normally do this unless the variables are explicitly marked + using the 'export' command. + + * Bash supports the '+=' assignment operator, which appends to the + value of the variable named on the left hand side. + + * Bash includes the POSIX pattern removal '%', '#', '%%' and '##' + expansions to remove leading or trailing substrings from variable + values (*note Shell Parameter Expansion::). + + * The expansion '${#xx}', which returns the length of '${xx}', is + supported (*note Shell Parameter Expansion::). + + * The expansion '${var:'OFFSET'[:'LENGTH']}', which expands to the + substring of 'var''s value of length LENGTH, beginning at OFFSET, + is present (*note Shell Parameter Expansion::). + + * The expansion '${var/[/]'PATTERN'[/'REPLACEMENT']}', which matches + PATTERN and replaces it with REPLACEMENT in the value of 'var', is + available (*note Shell Parameter Expansion::). + + * The expansion '${!PREFIX*}' expansion, which expands to the names + of all shell variables whose names begin with PREFIX, is available + (*note Shell Parameter Expansion::). + + * Bash has INDIRECT variable expansion using '${!word}' (*note Shell + Parameter Expansion::). + + * Bash can expand positional parameters beyond '$9' using '${NUM}'. + + * The POSIX '$()' form of command substitution is implemented (*note + Command Substitution::), and preferred to the Bourne shell's '``' + (which is also implemented for backwards compatibility). + + * Bash has process substitution (*note Process Substitution::). + + * Bash automatically assigns variables that provide information about + the current user ('UID', 'EUID', and 'GROUPS'), the current host + ('HOSTTYPE', 'OSTYPE', 'MACHTYPE', and 'HOSTNAME'), and the + instance of Bash that is running ('BASH', 'BASH_VERSION', and + 'BASH_VERSINFO'). *Note Bash Variables::, for details. + + * The 'IFS' variable is used to split only the results of expansion, + not all words (*note Word Splitting::). This closes a longstanding + shell security hole. + + * The filename expansion bracket expression code uses '!' and '^' to + negate the set of characters between the brackets. The Bourne + shell uses only '!'. + + * Bash implements the full set of POSIX filename expansion operators, + including CHARACTER CLASSES, EQUIVALENCE CLASSES, and COLLATING + SYMBOLS (*note Filename Expansion::). + + * Bash implements extended pattern matching features when the + 'extglob' shell option is enabled (*note Pattern Matching::). + + * It is possible to have a variable and a function with the same + name; 'sh' does not separate the two name spaces. + + * Bash functions are permitted to have local variables using the + 'local' builtin, and thus useful recursive functions may be written + (*note Bash Builtins::). + + * Variable assignments preceding commands affect only that command, + even builtins and functions (*note Environment::). In 'sh', all + variable assignments preceding commands are global unless the + command is executed from the file system. + + * Bash performs filename expansion on filenames specified as operands + to input and output redirection operators (*note Redirections::). + + * Bash contains the '<>' redirection operator, allowing a file to be + opened for both reading and writing, and the '&>' redirection + operator, for directing standard output and standard error to the + same file (*note Redirections::). + + * Bash includes the '<<<' redirection operator, allowing a string to + be used as the standard input to a command. + + * Bash implements the '[n]<&WORD' and '[n]>&WORD' redirection + operators, which move one file descriptor to another. + + * Bash treats a number of filenames specially when they are used in + redirection operators (*note Redirections::). + + * Bash can open network connections to arbitrary machines and + services with the redirection operators (*note Redirections::). + + * The 'noclobber' option is available to avoid overwriting existing + files with output redirection (*note The Set Builtin::). The '>|' + redirection operator may be used to override 'noclobber'. + + * The Bash 'cd' and 'pwd' builtins (*note Bourne Shell Builtins::) + each take '-L' and '-P' options to switch between logical and + physical modes. + + * Bash allows a function to override a builtin with the same name, + and provides access to that builtin's functionality within the + function via the 'builtin' and 'command' builtins (*note Bash + Builtins::). + + * The 'command' builtin allows selective disabling of functions when + command lookup is performed (*note Bash Builtins::). + + * Individual builtins may be enabled or disabled using the 'enable' + builtin (*note Bash Builtins::). + + * The Bash 'exec' builtin takes additional options that allow users + to control the contents of the environment passed to the executed + command, and what the zeroth argument to the command is to be + (*note Bourne Shell Builtins::). + + * Shell functions may be exported to children via the environment + using 'export -f' (*note Shell Functions::). + + * The Bash 'export', 'readonly', and 'declare' builtins can take a + '-f' option to act on shell functions, a '-p' option to display + variables with various attributes set in a format that can be used + as shell input, a '-n' option to remove various variable + attributes, and 'name=value' arguments to set variable attributes + and values simultaneously. + + * The Bash 'hash' builtin allows a name to be associated with an + arbitrary filename, even when that filename cannot be found by + searching the '$PATH', using 'hash -p' (*note Bourne Shell + Builtins::). + + * Bash includes a 'help' builtin for quick reference to shell + facilities (*note Bash Builtins::). + + * The 'printf' builtin is available to display formatted output + (*note Bash Builtins::). + + * The Bash 'read' builtin (*note Bash Builtins::) will read a line + ending in '\' with the '-r' option, and will use the 'REPLY' + variable as a default if no non-option arguments are supplied. The + Bash 'read' builtin also accepts a prompt string with the '-p' + option and will use Readline to obtain the line when given the '-e' + option. The 'read' builtin also has additional options to control + input: the '-s' option will turn off echoing of input characters as + they are read, the '-t' option will allow 'read' to time out if + input does not arrive within a specified number of seconds, the + '-n' option will allow reading only a specified number of + characters rather than a full line, and the '-d' option will read + until a particular character rather than newline. + + * The 'return' builtin may be used to abort execution of scripts + executed with the '.' or 'source' builtins (*note Bourne Shell + Builtins::). + + * Bash includes the 'shopt' builtin, for finer control of shell + optional capabilities (*note The Shopt Builtin::), and allows these + options to be set and unset at shell invocation (*note Invoking + Bash::). + + * Bash has much more optional behavior controllable with the 'set' + builtin (*note The Set Builtin::). + + * The '-x' ('xtrace') option displays commands other than simple + commands when performing an execution trace (*note The Set + Builtin::). + + * The 'test' builtin (*note Bourne Shell Builtins::) is slightly + different, as it implements the POSIX algorithm, which specifies + the behavior based on the number of arguments. + + * Bash includes the 'caller' builtin, which displays the context of + any active subroutine call (a shell function or a script executed + with the '.' or 'source' builtins). This supports the bash + debugger. + + * The 'trap' builtin (*note Bourne Shell Builtins::) allows a 'DEBUG' + pseudo-signal specification, similar to 'EXIT'. Commands specified + with a 'DEBUG' trap are executed before every simple command, 'for' + command, 'case' command, 'select' command, every arithmetic 'for' + command, and before the first command executes in a shell function. + The 'DEBUG' trap is not inherited by shell functions unless the + function has been given the 'trace' attribute or the 'functrace' + option has been enabled using the 'shopt' builtin. The 'extdebug' + shell option has additional effects on the 'DEBUG' trap. + + The 'trap' builtin (*note Bourne Shell Builtins::) allows an 'ERR' + pseudo-signal specification, similar to 'EXIT' and 'DEBUG'. + Commands specified with an 'ERR' trap are executed after a simple + command fails, with a few exceptions. The 'ERR' trap is not + inherited by shell functions unless the '-o errtrace' option to the + 'set' builtin is enabled. + + The 'trap' builtin (*note Bourne Shell Builtins::) allows a + 'RETURN' pseudo-signal specification, similar to 'EXIT' and + 'DEBUG'. Commands specified with an 'RETURN' trap are executed + before execution resumes after a shell function or a shell script + executed with '.' or 'source' returns. The 'RETURN' trap is not + inherited by shell functions unless the function has been given the + 'trace' attribute or the 'functrace' option has been enabled using + the 'shopt' builtin. + + * The Bash 'type' builtin is more extensive and gives more + information about the names it finds (*note Bash Builtins::). + + * The Bash 'umask' builtin permits a '-p' option to cause the output + to be displayed in the form of a 'umask' command that may be reused + as input (*note Bourne Shell Builtins::). + + * Bash implements a 'csh'-like directory stack, and provides the + 'pushd', 'popd', and 'dirs' builtins to manipulate it (*note The + Directory Stack::). Bash also makes the directory stack visible as + the value of the 'DIRSTACK' shell variable. + + * Bash interprets special backslash-escaped characters in the prompt + strings when interactive (*note Controlling the Prompt::). + + * The Bash restricted mode is more useful (*note The Restricted + Shell::); the SVR4.2 shell restricted mode is too limited. + + * The 'disown' builtin can remove a job from the internal shell job + table (*note Job Control Builtins::) or suppress the sending of + 'SIGHUP' to a job when the shell exits as the result of a 'SIGHUP'. + + * Bash includes a number of features to support a separate debugger + for shell scripts. + + * The SVR4.2 shell has two privilege-related builtins ('mldmode' and + 'priv') not present in Bash. + + * Bash does not have the 'stop' or 'newgrp' builtins. + + * Bash does not use the 'SHACCT' variable or perform shell + accounting. + + * The SVR4.2 'sh' uses a 'TIMEOUT' variable like Bash uses 'TMOUT'. + +More features unique to Bash may be found in *note Bash Features::. + +B.1 Implementation Differences From The SVR4.2 Shell +==================================================== + +Since Bash is a completely new implementation, it does not suffer from +many of the limitations of the SVR4.2 shell. For instance: + + * Bash does not fork a subshell when redirecting into or out of a + shell control structure such as an 'if' or 'while' statement. + + * Bash does not allow unbalanced quotes. The SVR4.2 shell will + silently insert a needed closing quote at 'EOF' under certain + circumstances. This can be the cause of some hard-to-find errors. + + * The SVR4.2 shell uses a baroque memory management scheme based on + trapping 'SIGSEGV'. If the shell is started from a process with + 'SIGSEGV' blocked (e.g., by using the 'system()' C library function + call), it misbehaves badly. + + * In a questionable attempt at security, the SVR4.2 shell, when + invoked without the '-p' option, will alter its real and effective + UID and GID if they are less than some magic threshold value, + commonly 100. This can lead to unexpected results. + + * The SVR4.2 shell does not allow users to trap 'SIGSEGV', 'SIGALRM', + or 'SIGCHLD'. + + * The SVR4.2 shell does not allow the 'IFS', 'MAILCHECK', 'PATH', + 'PS1', or 'PS2' variables to be unset. + + * The SVR4.2 shell treats '^' as the undocumented equivalent of '|'. + + * Bash allows multiple option arguments when it is invoked ('-x -v'); + the SVR4.2 shell allows only one option argument ('-xv'). In fact, + some versions of the shell dump core if the second argument begins + with a '-'. + + * The SVR4.2 shell exits a script if any builtin fails; Bash exits a + script only if one of the POSIX special builtins fails, and only + for certain failures, as enumerated in the POSIX standard. + + * The SVR4.2 shell behaves differently when invoked as 'jsh' (it + turns on job control). + + +File: bash.info, Node: GNU Free Documentation License, Next: Indexes, Prev: Major Differences From The Bourne Shell, Up: Top + +Appendix C GNU Free Documentation License +***************************************** + + Version 1.3, 3 November 2008 + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + The "publisher" means any person or entity that distributes copies + of the Document to the public. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow the + conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled "History" in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + "History" section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version's + license notice. These titles must be distinct from any other + section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the documents + in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, receipt of a copy of some or all of the + same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + . + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software. + + +File: bash.info, Node: Indexes, Prev: GNU Free Documentation License, Up: Top + +Appendix D Indexes +****************** + +* Menu: + +* Builtin Index:: Index of Bash builtin commands. +* Reserved Word Index:: Index of Bash reserved words. +* Variable Index:: Quick reference helps you find the + variable you want. +* Function Index:: Index of bindable Readline functions. +* Concept Index:: General index for concepts described in + this manual. + + +File: bash.info, Node: Builtin Index, Next: Reserved Word Index, Up: Indexes + +D.1 Index of Shell Builtin Commands +=================================== + +[index] +* Menu: + +* .: Bourne Shell Builtins. + (line 17) +* :: Bourne Shell Builtins. + (line 11) +* [: Bourne Shell Builtins. + (line 270) +* alias: Bash Builtins. (line 11) +* bg: Job Control Builtins. + (line 7) +* bind: Bash Builtins. (line 21) +* break: Bourne Shell Builtins. + (line 36) +* builtin: Bash Builtins. (line 104) +* caller: Bash Builtins. (line 113) +* cd: Bourne Shell Builtins. + (line 44) +* command: Bash Builtins. (line 130) +* compgen: Programmable Completion Builtins. + (line 12) +* complete: Programmable Completion Builtins. + (line 30) +* compopt: Programmable Completion Builtins. + (line 237) +* continue: Bourne Shell Builtins. + (line 85) +* declare: Bash Builtins. (line 150) +* dirs: Directory Stack Builtins. + (line 7) +* disown: Job Control Builtins. + (line 101) +* echo: Bash Builtins. (line 253) +* enable: Bash Builtins. (line 302) +* eval: Bourne Shell Builtins. + (line 94) +* exec: Bourne Shell Builtins. + (line 102) +* exit: Bourne Shell Builtins. + (line 120) +* export: Bourne Shell Builtins. + (line 127) +* fc: Bash History Builtins. + (line 10) +* fg: Job Control Builtins. + (line 17) +* getopts: Bourne Shell Builtins. + (line 143) +* hash: Bourne Shell Builtins. + (line 187) +* help: Bash Builtins. (line 331) +* history: Bash History Builtins. + (line 46) +* jobs: Job Control Builtins. + (line 27) +* kill: Job Control Builtins. + (line 58) +* let: Bash Builtins. (line 350) +* local: Bash Builtins. (line 358) +* logout: Bash Builtins. (line 374) +* mapfile: Bash Builtins. (line 379) +* popd: Directory Stack Builtins. + (line 35) +* printf: Bash Builtins. (line 425) +* pushd: Directory Stack Builtins. + (line 53) +* pwd: Bourne Shell Builtins. + (line 207) +* read: Bash Builtins. (line 474) +* readarray: Bash Builtins. (line 570) +* readonly: Bourne Shell Builtins. + (line 217) +* return: Bourne Shell Builtins. + (line 236) +* set: The Set Builtin. (line 11) +* shift: Bourne Shell Builtins. + (line 257) +* shopt: The Shopt Builtin. (line 9) +* source: Bash Builtins. (line 579) +* suspend: Job Control Builtins. + (line 113) +* test: Bourne Shell Builtins. + (line 270) +* times: Bourne Shell Builtins. + (line 349) +* trap: Bourne Shell Builtins. + (line 355) +* type: Bash Builtins. (line 584) +* typeset: Bash Builtins. (line 616) +* ulimit: Bash Builtins. (line 622) +* umask: Bourne Shell Builtins. + (line 404) +* unalias: Bash Builtins. (line 728) +* unset: Bourne Shell Builtins. + (line 422) +* wait: Job Control Builtins. + (line 76) + + +File: bash.info, Node: Reserved Word Index, Next: Variable Index, Prev: Builtin Index, Up: Indexes + +D.2 Index of Shell Reserved Words +================================= + +[index] +* Menu: + +* !: Pipelines. (line 9) +* [[: Conditional Constructs. + (line 125) +* ]]: Conditional Constructs. + (line 125) +* {: Command Grouping. (line 21) +* }: Command Grouping. (line 21) +* case: Conditional Constructs. + (line 28) +* do: Looping Constructs. (line 12) +* done: Looping Constructs. (line 12) +* elif: Conditional Constructs. + (line 7) +* else: Conditional Constructs. + (line 7) +* esac: Conditional Constructs. + (line 28) +* fi: Conditional Constructs. + (line 7) +* for: Looping Constructs. (line 32) +* function: Shell Functions. (line 13) +* if: Conditional Constructs. + (line 7) +* in: Conditional Constructs. + (line 28) +* select: Conditional Constructs. + (line 83) +* then: Conditional Constructs. + (line 7) +* time: Pipelines. (line 9) +* until: Looping Constructs. (line 12) +* while: Looping Constructs. (line 22) + + +File: bash.info, Node: Variable Index, Next: Function Index, Prev: Reserved Word Index, Up: Indexes + +D.3 Parameter and Variable Index +================================ + +[index] +* Menu: + +* !: Special Parameters. (line 56) +* #: Special Parameters. (line 39) +* $: Special Parameters. (line 51) +* $!: Special Parameters. (line 57) +* $#: Special Parameters. (line 40) +* $$: Special Parameters. (line 52) +* $*: Special Parameters. (line 10) +* $-: Special Parameters. (line 47) +* $0: Special Parameters. (line 62) +* $?: Special Parameters. (line 43) +* $@: Special Parameters. (line 23) +* $_: Bash Variables. (line 14) +* *: Special Parameters. (line 9) +* -: Special Parameters. (line 46) +* 0: Special Parameters. (line 61) +* ?: Special Parameters. (line 42) +* @: Special Parameters. (line 22) +* _: Bash Variables. (line 13) +* auto_resume: Job Control Variables. + (line 6) +* BASH: Bash Variables. (line 23) +* BASHOPTS: Bash Variables. (line 26) +* BASHPID: Bash Variables. (line 35) +* BASH_ALIASES: Bash Variables. (line 42) +* BASH_ARGC: Bash Variables. (line 51) +* BASH_ARGV: Bash Variables. (line 64) +* BASH_ARGV0: Bash Variables. (line 76) +* BASH_CMDS: Bash Variables. (line 84) +* BASH_COMMAND: Bash Variables. (line 93) +* BASH_COMPAT: Bash Variables. (line 100) +* BASH_ENV: Bash Variables. (line 116) +* BASH_EXECUTION_STRING: Bash Variables. (line 122) +* BASH_LINENO: Bash Variables. (line 125) +* BASH_LOADABLES_PATH: Bash Variables. (line 133) +* BASH_REMATCH: Bash Variables. (line 137) +* BASH_SOURCE: Bash Variables. (line 145) +* BASH_SUBSHELL: Bash Variables. (line 152) +* BASH_VERSINFO: Bash Variables. (line 158) +* BASH_VERSION: Bash Variables. (line 181) +* BASH_XTRACEFD: Bash Variables. (line 184) +* bell-style: Readline Init File Syntax. + (line 38) +* bind-tty-special-chars: Readline Init File Syntax. + (line 45) +* blink-matching-paren: Readline Init File Syntax. + (line 50) +* CDPATH: Bourne Shell Variables. + (line 9) +* CHILD_MAX: Bash Variables. (line 195) +* colored-completion-prefix: Readline Init File Syntax. + (line 55) +* colored-stats: Readline Init File Syntax. + (line 62) +* COLUMNS: Bash Variables. (line 202) +* comment-begin: Readline Init File Syntax. + (line 68) +* completion-display-width: Readline Init File Syntax. + (line 73) +* completion-ignore-case: Readline Init File Syntax. + (line 80) +* completion-map-case: Readline Init File Syntax. + (line 85) +* completion-prefix-display-length: Readline Init File Syntax. + (line 91) +* completion-query-items: Readline Init File Syntax. + (line 98) +* COMPREPLY: Bash Variables. (line 254) +* COMP_CWORD: Bash Variables. (line 208) +* COMP_KEY: Bash Variables. (line 237) +* COMP_LINE: Bash Variables. (line 214) +* COMP_POINT: Bash Variables. (line 219) +* COMP_TYPE: Bash Variables. (line 227) +* COMP_WORDBREAKS: Bash Variables. (line 241) +* COMP_WORDS: Bash Variables. (line 247) +* convert-meta: Readline Init File Syntax. + (line 108) +* COPROC: Bash Variables. (line 260) +* DIRSTACK: Bash Variables. (line 264) +* disable-completion: Readline Init File Syntax. + (line 116) +* echo-control-characters: Readline Init File Syntax. + (line 121) +* editing-mode: Readline Init File Syntax. + (line 126) +* EMACS: Bash Variables. (line 274) +* emacs-mode-string: Readline Init File Syntax. + (line 132) +* enable-bracketed-paste: Readline Init File Syntax. + (line 142) +* enable-keypad: Readline Init File Syntax. + (line 150) +* ENV: Bash Variables. (line 279) +* EPOCHREALTIME: Bash Variables. (line 284) +* EPOCHSECONDS: Bash Variables. (line 292) +* EUID: Bash Variables. (line 299) +* EXECIGNORE: Bash Variables. (line 303) +* expand-tilde: Readline Init File Syntax. + (line 161) +* FCEDIT: Bash Variables. (line 316) +* FIGNORE: Bash Variables. (line 320) +* FUNCNAME: Bash Variables. (line 326) +* FUNCNEST: Bash Variables. (line 343) +* GLOBIGNORE: Bash Variables. (line 348) +* GROUPS: Bash Variables. (line 355) +* histchars: Bash Variables. (line 361) +* HISTCMD: Bash Variables. (line 376) +* HISTCONTROL: Bash Variables. (line 382) +* HISTFILE: Bash Variables. (line 398) +* HISTFILESIZE: Bash Variables. (line 402) +* HISTIGNORE: Bash Variables. (line 413) +* history-preserve-point: Readline Init File Syntax. + (line 165) +* history-size: Readline Init File Syntax. + (line 171) +* HISTSIZE: Bash Variables. (line 433) +* HISTTIMEFORMAT: Bash Variables. (line 440) +* HOME: Bourne Shell Variables. + (line 13) +* horizontal-scroll-mode: Readline Init File Syntax. + (line 180) +* HOSTFILE: Bash Variables. (line 448) +* HOSTNAME: Bash Variables. (line 459) +* HOSTTYPE: Bash Variables. (line 462) +* IFS: Bourne Shell Variables. + (line 18) +* IGNOREEOF: Bash Variables. (line 465) +* input-meta: Readline Init File Syntax. + (line 189) +* INPUTRC: Bash Variables. (line 475) +* INSIDE_EMACS: Bash Variables. (line 479) +* isearch-terminators: Readline Init File Syntax. + (line 197) +* keymap: Readline Init File Syntax. + (line 204) +* LANG: Bash Variables. (line 485) +* LC_ALL: Bash Variables. (line 489) +* LC_COLLATE: Bash Variables. (line 493) +* LC_CTYPE: Bash Variables. (line 500) +* LC_MESSAGES: Locale Translation. (line 15) +* LC_MESSAGES <1>: Bash Variables. (line 505) +* LC_NUMERIC: Bash Variables. (line 509) +* LC_TIME: Bash Variables. (line 513) +* LINENO: Bash Variables. (line 517) +* LINES: Bash Variables. (line 522) +* MACHTYPE: Bash Variables. (line 528) +* MAIL: Bourne Shell Variables. + (line 22) +* MAILCHECK: Bash Variables. (line 532) +* MAILPATH: Bourne Shell Variables. + (line 27) +* MAPFILE: Bash Variables. (line 540) +* mark-modified-lines: Readline Init File Syntax. + (line 234) +* mark-symlinked-directories: Readline Init File Syntax. + (line 239) +* match-hidden-files: Readline Init File Syntax. + (line 244) +* menu-complete-display-prefix: Readline Init File Syntax. + (line 251) +* meta-flag: Readline Init File Syntax. + (line 189) +* OLDPWD: Bash Variables. (line 544) +* OPTARG: Bourne Shell Variables. + (line 34) +* OPTERR: Bash Variables. (line 547) +* OPTIND: Bourne Shell Variables. + (line 38) +* OSTYPE: Bash Variables. (line 551) +* output-meta: Readline Init File Syntax. + (line 256) +* page-completions: Readline Init File Syntax. + (line 262) +* PATH: Bourne Shell Variables. + (line 42) +* PIPESTATUS: Bash Variables. (line 554) +* POSIXLY_CORRECT: Bash Variables. (line 559) +* PPID: Bash Variables. (line 569) +* PROMPT_COMMAND: Bash Variables. (line 573) +* PROMPT_DIRTRIM: Bash Variables. (line 579) +* PS0: Bash Variables. (line 585) +* PS1: Bourne Shell Variables. + (line 48) +* PS2: Bourne Shell Variables. + (line 53) +* PS3: Bash Variables. (line 590) +* PS4: Bash Variables. (line 595) +* PWD: Bash Variables. (line 603) +* RANDOM: Bash Variables. (line 606) +* READLINE_LINE: Bash Variables. (line 612) +* READLINE_MARK: Bash Variables. (line 616) +* READLINE_POINT: Bash Variables. (line 622) +* REPLY: Bash Variables. (line 626) +* revert-all-at-newline: Readline Init File Syntax. + (line 272) +* SECONDS: Bash Variables. (line 629) +* SHELL: Bash Variables. (line 638) +* SHELLOPTS: Bash Variables. (line 643) +* SHLVL: Bash Variables. (line 652) +* show-all-if-ambiguous: Readline Init File Syntax. + (line 278) +* show-all-if-unmodified: Readline Init File Syntax. + (line 284) +* show-mode-in-prompt: Readline Init File Syntax. + (line 293) +* skip-completed-text: Readline Init File Syntax. + (line 299) +* SRANDOM: Bash Variables. (line 657) +* TEXTDOMAIN: Locale Translation. (line 15) +* TEXTDOMAINDIR: Locale Translation. (line 15) +* TIMEFORMAT: Bash Variables. (line 666) +* TMOUT: Bash Variables. (line 704) +* TMPDIR: Bash Variables. (line 716) +* UID: Bash Variables. (line 720) +* vi-cmd-mode-string: Readline Init File Syntax. + (line 312) +* vi-ins-mode-string: Readline Init File Syntax. + (line 323) +* visible-stats: Readline Init File Syntax. + (line 334) + + +File: bash.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes + +D.4 Function Index +================== + +[index] +* Menu: + +* abort (C-g): Miscellaneous Commands. + (line 10) +* accept-line (Newline or Return): Commands For History. + (line 6) +* alias-expand-line (): Miscellaneous Commands. + (line 125) +* backward-char (C-b): Commands For Moving. (line 15) +* backward-delete-char (Rubout): Commands For Text. (line 17) +* backward-kill-line (C-x Rubout): Commands For Killing. + (line 11) +* backward-kill-word (M-): Commands For Killing. + (line 28) +* backward-word (M-b): Commands For Moving. (line 22) +* beginning-of-history (M-<): Commands For History. + (line 20) +* beginning-of-line (C-a): Commands For Moving. (line 6) +* bracketed-paste-begin (): Commands For Text. (line 33) +* call-last-kbd-macro (C-x e): Keyboard Macros. (line 13) +* capitalize-word (M-c): Commands For Text. (line 66) +* character-search (C-]): Miscellaneous Commands. + (line 42) +* character-search-backward (M-C-]): Miscellaneous Commands. + (line 47) +* clear-display (M-C-l): Commands For Moving. (line 48) +* clear-screen (C-l): Commands For Moving. (line 53) +* complete (): Commands For Completion. + (line 6) +* complete-command (M-!): Commands For Completion. + (line 80) +* complete-filename (M-/): Commands For Completion. + (line 49) +* complete-hostname (M-@): Commands For Completion. + (line 72) +* complete-into-braces (M-{): Commands For Completion. + (line 100) +* complete-username (M-~): Commands For Completion. + (line 56) +* complete-variable (M-$): Commands For Completion. + (line 64) +* copy-backward-word (): Commands For Killing. + (line 69) +* copy-forward-word (): Commands For Killing. + (line 74) +* copy-region-as-kill (): Commands For Killing. + (line 65) +* dabbrev-expand (): Commands For Completion. + (line 95) +* delete-char (C-d): Commands For Text. (line 12) +* delete-char-or-list (): Commands For Completion. + (line 43) +* delete-horizontal-space (): Commands For Killing. + (line 57) +* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6) +* display-shell-version (C-x C-v): Miscellaneous Commands. + (line 110) +* do-lowercase-version (M-A, M-B, M-X, ...): Miscellaneous Commands. + (line 14) +* downcase-word (M-l): Commands For Text. (line 62) +* dump-functions (): Miscellaneous Commands. + (line 74) +* dump-macros (): Miscellaneous Commands. + (line 86) +* dump-variables (): Miscellaneous Commands. + (line 80) +* dynamic-complete-history (M-): Commands For Completion. + (line 90) +* edit-and-execute-command (C-x C-e): Miscellaneous Commands. + (line 134) +* end-kbd-macro (C-x )): Keyboard Macros. (line 9) +* end-of-file (usually C-d): Commands For Text. (line 6) +* end-of-history (M->): Commands For History. + (line 23) +* end-of-line (C-e): Commands For Moving. (line 9) +* exchange-point-and-mark (C-x C-x): Miscellaneous Commands. + (line 37) +* forward-backward-delete-char (): Commands For Text. (line 21) +* forward-char (C-f): Commands For Moving. (line 12) +* forward-search-history (C-s): Commands For History. + (line 33) +* forward-word (M-f): Commands For Moving. (line 18) +* glob-complete-word (M-g): Miscellaneous Commands. + (line 92) +* glob-expand-word (C-x *): Miscellaneous Commands. + (line 98) +* glob-list-expansions (C-x g): Miscellaneous Commands. + (line 104) +* history-and-alias-expand-line (): Miscellaneous Commands. + (line 128) +* history-expand-line (M-^): Miscellaneous Commands. + (line 118) +* history-search-backward (): Commands For History. + (line 57) +* history-search-forward (): Commands For History. + (line 51) +* history-substring-search-backward (): Commands For History. + (line 69) +* history-substring-search-forward (): Commands For History. + (line 63) +* insert-comment (M-#): Miscellaneous Commands. + (line 61) +* insert-completions (M-*): Commands For Completion. + (line 22) +* insert-last-argument (M-. or M-_): Miscellaneous Commands. + (line 131) +* kill-line (C-k): Commands For Killing. + (line 6) +* kill-region (): Commands For Killing. + (line 61) +* kill-whole-line (): Commands For Killing. + (line 19) +* kill-word (M-d): Commands For Killing. + (line 23) +* magic-space (): Miscellaneous Commands. + (line 121) +* menu-complete (): Commands For Completion. + (line 26) +* menu-complete-backward (): Commands For Completion. + (line 38) +* next-history (C-n): Commands For History. + (line 17) +* next-screen-line (): Commands For Moving. (line 41) +* non-incremental-forward-search-history (M-n): Commands For History. + (line 45) +* non-incremental-reverse-search-history (M-p): Commands For History. + (line 39) +* operate-and-get-next (C-o): Commands For History. + (line 96) +* overwrite-mode (): Commands For Text. (line 70) +* possible-command-completions (C-x !): Commands For Completion. + (line 86) +* possible-completions (M-?): Commands For Completion. + (line 15) +* possible-filename-completions (C-x /): Commands For Completion. + (line 52) +* possible-hostname-completions (C-x @): Commands For Completion. + (line 76) +* possible-username-completions (C-x ~): Commands For Completion. + (line 60) +* possible-variable-completions (C-x $): Commands For Completion. + (line 68) +* prefix-meta (): Miscellaneous Commands. + (line 19) +* previous-history (C-p): Commands For History. + (line 13) +* previous-screen-line (): Commands For Moving. (line 34) +* print-last-kbd-macro (): Keyboard Macros. (line 17) +* quoted-insert (C-q or C-v): Commands For Text. (line 26) +* re-read-init-file (C-x C-r): Miscellaneous Commands. + (line 6) +* redraw-current-line (): Commands For Moving. (line 57) +* reverse-search-history (C-r): Commands For History. + (line 27) +* revert-line (M-r): Miscellaneous Commands. + (line 26) +* self-insert (a, b, A, 1, !, ...): Commands For Text. (line 30) +* set-mark (C-@): Miscellaneous Commands. + (line 33) +* shell-backward-kill-word (): Commands For Killing. + (line 37) +* shell-backward-word (M-C-b): Commands For Moving. (line 30) +* shell-expand-line (M-C-e): Miscellaneous Commands. + (line 113) +* shell-forward-word (M-C-f): Commands For Moving. (line 26) +* shell-kill-word (M-C-d): Commands For Killing. + (line 32) +* shell-transpose-words (M-C-t): Commands For Killing. + (line 41) +* skip-csi-sequence (): Miscellaneous Commands. + (line 52) +* start-kbd-macro (C-x (): Keyboard Macros. (line 6) +* tilde-expand (M-&): Miscellaneous Commands. + (line 30) +* transpose-chars (C-t): Commands For Text. (line 47) +* transpose-words (M-t): Commands For Text. (line 53) +* undo (C-_ or C-x C-u): Miscellaneous Commands. + (line 23) +* universal-argument (): Numeric Arguments. (line 10) +* unix-filename-rubout (): Commands For Killing. + (line 52) +* unix-line-discard (C-u): Commands For Killing. + (line 16) +* unix-word-rubout (C-w): Commands For Killing. + (line 48) +* upcase-word (M-u): Commands For Text. (line 58) +* yank (C-y): Commands For Killing. + (line 79) +* yank-last-arg (M-. or M-_): Commands For History. + (line 84) +* yank-nth-arg (M-C-y): Commands For History. + (line 75) +* yank-pop (M-y): Commands For Killing. + (line 82) + + +File: bash.info, Node: Concept Index, Prev: Function Index, Up: Indexes + +D.5 Concept Index +================= + +[index] +* Menu: + +* alias expansion: Aliases. (line 6) +* arithmetic evaluation: Shell Arithmetic. (line 6) +* arithmetic expansion: Arithmetic Expansion. + (line 6) +* arithmetic, shell: Shell Arithmetic. (line 6) +* arrays: Arrays. (line 6) +* background: Job Control Basics. (line 6) +* Bash configuration: Basic Installation. (line 6) +* Bash installation: Basic Installation. (line 6) +* Bourne shell: Basic Shell Features. + (line 6) +* brace expansion: Brace Expansion. (line 6) +* builtin: Definitions. (line 17) +* command editing: Readline Bare Essentials. + (line 6) +* command execution: Command Search and Execution. + (line 6) +* command expansion: Simple Command Expansion. + (line 6) +* command history: Bash History Facilities. + (line 6) +* command search: Command Search and Execution. + (line 6) +* command substitution: Command Substitution. + (line 6) +* command timing: Pipelines. (line 9) +* commands, compound: Compound Commands. (line 6) +* commands, conditional: Conditional Constructs. + (line 6) +* commands, grouping: Command Grouping. (line 6) +* commands, lists: Lists. (line 6) +* commands, looping: Looping Constructs. (line 6) +* commands, pipelines: Pipelines. (line 6) +* commands, shell: Shell Commands. (line 6) +* commands, simple: Simple Commands. (line 6) +* comments, shell: Comments. (line 6) +* Compatibility Level: Shell Compatibility Mode. + (line 6) +* Compatibility Mode: Shell Compatibility Mode. + (line 6) +* completion builtins: Programmable Completion Builtins. + (line 6) +* configuration: Basic Installation. (line 6) +* control operator: Definitions. (line 21) +* coprocess: Coprocesses. (line 6) +* directory stack: The Directory Stack. (line 6) +* editing command lines: Readline Bare Essentials. + (line 6) +* environment: Environment. (line 6) +* evaluation, arithmetic: Shell Arithmetic. (line 6) +* event designators: Event Designators. (line 6) +* execution environment: Command Execution Environment. + (line 6) +* exit status: Definitions. (line 26) +* exit status <1>: Exit Status. (line 6) +* expansion: Shell Expansions. (line 6) +* expansion, arithmetic: Arithmetic Expansion. + (line 6) +* expansion, brace: Brace Expansion. (line 6) +* expansion, filename: Filename Expansion. (line 9) +* expansion, parameter: Shell Parameter Expansion. + (line 6) +* expansion, pathname: Filename Expansion. (line 9) +* expansion, tilde: Tilde Expansion. (line 6) +* expressions, arithmetic: Shell Arithmetic. (line 6) +* expressions, conditional: Bash Conditional Expressions. + (line 6) +* field: Definitions. (line 30) +* filename: Definitions. (line 35) +* filename expansion: Filename Expansion. (line 9) +* foreground: Job Control Basics. (line 6) +* functions, shell: Shell Functions. (line 6) +* history builtins: Bash History Builtins. + (line 6) +* history events: Event Designators. (line 8) +* history expansion: History Interaction. (line 6) +* history list: Bash History Facilities. + (line 6) +* History, how to use: A Programmable Completion Example. + (line 113) +* identifier: Definitions. (line 51) +* initialization file, readline: Readline Init File. (line 6) +* installation: Basic Installation. (line 6) +* interaction, readline: Readline Interaction. + (line 6) +* interactive shell: Invoking Bash. (line 131) +* interactive shell <1>: Interactive Shells. (line 6) +* internationalization: Locale Translation. (line 6) +* job: Definitions. (line 38) +* job control: Definitions. (line 42) +* job control <1>: Job Control Basics. (line 6) +* kill ring: Readline Killing Commands. + (line 18) +* killing text: Readline Killing Commands. + (line 6) +* localization: Locale Translation. (line 6) +* login shell: Invoking Bash. (line 128) +* matching, pattern: Pattern Matching. (line 6) +* metacharacter: Definitions. (line 46) +* name: Definitions. (line 51) +* native languages: Locale Translation. (line 6) +* notation, readline: Readline Bare Essentials. + (line 6) +* operator, shell: Definitions. (line 57) +* parameter expansion: Shell Parameter Expansion. + (line 6) +* parameters: Shell Parameters. (line 6) +* parameters, positional: Positional Parameters. + (line 6) +* parameters, special: Special Parameters. (line 6) +* pathname expansion: Filename Expansion. (line 9) +* pattern matching: Pattern Matching. (line 6) +* pipeline: Pipelines. (line 6) +* POSIX: Definitions. (line 9) +* POSIX Mode: Bash POSIX Mode. (line 6) +* process group: Definitions. (line 62) +* process group ID: Definitions. (line 66) +* process substitution: Process Substitution. + (line 6) +* programmable completion: Programmable Completion. + (line 6) +* prompting: Controlling the Prompt. + (line 6) +* quoting: Quoting. (line 6) +* quoting, ANSI: ANSI-C Quoting. (line 6) +* Readline, how to use: Job Control Variables. + (line 23) +* redirection: Redirections. (line 6) +* reserved word: Definitions. (line 70) +* reserved words: Reserved Words. (line 6) +* restricted shell: The Restricted Shell. + (line 6) +* return status: Definitions. (line 75) +* shell arithmetic: Shell Arithmetic. (line 6) +* shell function: Shell Functions. (line 6) +* shell script: Shell Scripts. (line 6) +* shell variable: Shell Parameters. (line 6) +* shell, interactive: Interactive Shells. (line 6) +* signal: Definitions. (line 78) +* signal handling: Signals. (line 6) +* special builtin: Definitions. (line 82) +* special builtin <1>: Special Builtins. (line 6) +* startup files: Bash Startup Files. (line 6) +* suspending jobs: Job Control Basics. (line 6) +* tilde expansion: Tilde Expansion. (line 6) +* token: Definitions. (line 86) +* translation, native languages: Locale Translation. (line 6) +* variable, shell: Shell Parameters. (line 6) +* variables, readline: Readline Init File Syntax. + (line 37) +* word: Definitions. (line 90) +* word splitting: Word Splitting. (line 6) +* yanking text: Readline Killing Commands. + (line 6) + + + +Tag Table: +Node: Top895 +Node: Introduction2813 +Node: What is Bash?3029 +Node: What is a shell?4143 +Node: Definitions6681 +Node: Basic Shell Features9632 +Node: Shell Syntax10851 +Node: Shell Operation11877 +Node: Quoting13170 +Node: Escape Character14470 +Node: Single Quotes14955 +Node: Double Quotes15303 +Node: ANSI-C Quoting16581 +Node: Locale Translation17840 +Node: Comments18993 +Node: Shell Commands19611 +Node: Reserved Words20549 +Node: Simple Commands21305 +Node: Pipelines21959 +Node: Lists24891 +Node: Compound Commands26682 +Node: Looping Constructs27694 +Node: Conditional Constructs30189 +Node: Command Grouping41760 +Node: Coprocesses43239 +Node: GNU Parallel45142 +Node: Shell Functions49443 +Node: Shell Parameters56650 +Node: Positional Parameters61063 +Node: Special Parameters61963 +Node: Shell Expansions65187 +Node: Brace Expansion67310 +Node: Tilde Expansion70033 +Node: Shell Parameter Expansion72650 +Node: Command Substitution87779 +Node: Arithmetic Expansion89134 +Node: Process Substitution90066 +Node: Word Splitting91186 +Node: Filename Expansion93130 +Node: Pattern Matching95679 +Node: Quote Removal99665 +Node: Redirections99960 +Node: Executing Commands109530 +Node: Simple Command Expansion110200 +Node: Command Search and Execution112154 +Node: Command Execution Environment114530 +Node: Environment117514 +Node: Exit Status119173 +Node: Signals120843 +Node: Shell Scripts122810 +Node: Shell Builtin Commands125822 +Node: Bourne Shell Builtins127860 +Node: Bash Builtins148789 +Node: Modifying Shell Behavior178898 +Node: The Set Builtin179243 +Node: The Shopt Builtin189656 +Node: Special Builtins204566 +Node: Shell Variables205545 +Node: Bourne Shell Variables205982 +Node: Bash Variables208086 +Node: Bash Features240720 +Node: Invoking Bash241733 +Node: Bash Startup Files247746 +Node: Interactive Shells252849 +Node: What is an Interactive Shell?253259 +Node: Is this Shell Interactive?253908 +Node: Interactive Shell Behavior254723 +Node: Bash Conditional Expressions258237 +Node: Shell Arithmetic262814 +Node: Aliases265754 +Node: Arrays268374 +Node: The Directory Stack274383 +Node: Directory Stack Builtins275167 +Node: Controlling the Prompt278135 +Node: The Restricted Shell281085 +Node: Bash POSIX Mode283679 +Node: Shell Compatibility Mode294715 +Node: Job Control301371 +Node: Job Control Basics301831 +Node: Job Control Builtins306827 +Node: Job Control Variables312227 +Node: Command Line Editing313383 +Node: Introduction and Notation315054 +Node: Readline Interaction316677 +Node: Readline Bare Essentials317868 +Node: Readline Movement Commands319651 +Node: Readline Killing Commands320611 +Node: Readline Arguments322529 +Node: Searching323573 +Node: Readline Init File325759 +Node: Readline Init File Syntax327018 +Node: Conditional Init Constructs347556 +Node: Sample Init File351752 +Node: Bindable Readline Commands354876 +Node: Commands For Moving356080 +Node: Commands For History358131 +Node: Commands For Text362924 +Node: Commands For Killing366573 +Node: Numeric Arguments369606 +Node: Commands For Completion370745 +Node: Keyboard Macros374936 +Node: Miscellaneous Commands375623 +Node: Readline vi Mode381307 +Node: Programmable Completion382214 +Node: Programmable Completion Builtins389994 +Node: A Programmable Completion Example400689 +Node: Using History Interactively405936 +Node: Bash History Facilities406620 +Node: Bash History Builtins409625 +Node: History Interaction414354 +Node: Event Designators417974 +Node: Word Designators419328 +Node: Modifiers421088 +Node: Installing Bash422899 +Node: Basic Installation424036 +Node: Compilers and Options427294 +Node: Compiling For Multiple Architectures428035 +Node: Installation Names429728 +Node: Specifying the System Type430546 +Node: Sharing Defaults431262 +Node: Operation Controls431935 +Node: Optional Features432893 +Node: Reporting Bugs443411 +Node: Major Differences From The Bourne Shell444605 +Node: GNU Free Documentation License461457 +Node: Indexes486634 +Node: Builtin Index487088 +Node: Reserved Word Index493915 +Node: Variable Index496363 +Node: Function Index512260 +Node: Concept Index525770 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/bash-5.1/doc/bash.pdf b/bash-5.1/doc/bash.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d8d784ee712f1818200ffe00b1f2ad6ad5694d27 Binary files /dev/null and b/bash-5.1/doc/bash.pdf differ diff --git a/bash-5.1/doc/bash.ps b/bash-5.1/doc/bash.ps new file mode 100644 index 0000000000000000000000000000000000000000..bd38ef3be27032719dd048b66bb5704c09793769 --- /dev/null +++ b/bash-5.1/doc/bash.ps @@ -0,0 +1,10059 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.22.4 +%%CreationDate: Wed Nov 18 15:13:06 2020 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%+ font Symbol +%%DocumentSuppliedResources: procset grops 1.22 4 +%%Pages: 83 +%%PageOrder: Ascend +%%DocumentMedia: Default 612 792 0 () () +%%Orientation: Portrait +%%EndComments +%%BeginDefaults +%%PageMedia: Default +%%EndDefaults +%%BeginProlog +%%BeginResource: procset grops 1.22 4 +%!PS-Adobe-3.0 Resource-ProcSet +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +DEFS/BPhook known{DEFS begin BPhook end}if +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/setcmykcolor where{ +pop +/Fk{ +setcmykcolor fill +}bind def +}if +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/setcmykcolor where{ +pop +/Ck/setcmykcolor load def +}if +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne +2 index/UniqueID ne +and +{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +/setpagedevice{}def +mark +}bind def +/PEND{ +cleartomark +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%EndProlog +%%BeginSetup +%%BeginFeature: *PageSize Default +<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice +%%EndFeature +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +%%IncludeResource: font Symbol +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier@0 ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE +/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10.95 +/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0(bash \255 GNU Bourne-Ag) +108 96 Q(ain SHell)-.05 E F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF +(bash)108 124.8 Q F0([options] [command_string | \214le])2.5 E F1 +(COPYRIGHT)72 141.6 Q F0(Bash is Cop)108 153.6 Q +(yright \251 1989-2020 by the Free Softw)-.1 E(are F)-.1 E +(oundation, Inc.)-.15 E F1(DESCRIPTION)72 170.4 Q F2(Bash)108 182.4 Q F0 +.973(is an)3.474 F F2(sh)3.473 E F0 .973 +(-compatible command language interpreter that e)B -.15(xe)-.15 G .973 +(cutes commands read from the standard).15 F(input or from a \214le.)108 +194.4 Q F2(Bash)5 E F0(also incorporates useful features from the)2.5 E +/F3 10/Times-Italic@0 SF -.4(Ko)2.5 G(rn).4 E F0(and)2.5 E F3(C)2.5 E F0 +(shells \()2.5 E F2(ksh)A F0(and)2.5 E F2(csh)2.5 E F0(\).)A F2(Bash)108 +211.2 Q F0 .527(is intended to be a conformant implementation of the Sh\ +ell and Utilities portion of the IEEE POSIX)3.027 F +(speci\214cation \(IEEE Standard 1003.1\).)108 223.2 Q F2(Bash)5 E F0 +(can be con\214gured to be POSIX-conformant by def)2.5 E(ault.)-.1 E F1 +(OPTIONS)72 240 Q F0 .483(All of the single-character shell options doc\ +umented in the description of the)108 252 R F2(set)2.983 E F0 -.2(bu) +2.983 G .483(iltin command, includ-).2 F(ing)108 264 Q F22.718 E +F0 2.718(,c)C .218(an be used as options when the shell is in)-2.718 F +-.2(vo)-.4 G -.1(ke).2 G 2.718(d. In).1 F(addition,)2.719 E F2(bash) +2.719 E F0 .219(interprets the follo)2.719 F .219(wing options)-.25 F +(when it is in)108 276 Q -.2(vo)-.4 G -.1(ke).2 G(d:).1 E F2108 +292.8 Q F0 .868(If the)158 292.8 R F23.368 E F0 .867(option is pr\ +esent, then commands are read from the \214rst non-option ar)3.368 F +(gument)-.18 E F3(com-)3.567 E(mand_string)158 304.8 Q F0 5.726(.I).22 G +3.226(ft)-5.726 G .726(here are ar)-3.226 F .727(guments after the)-.18 +F F3(command_string)3.427 E F0 3.227(,t).22 G .727(he \214rst ar)-3.227 +F .727(gument is assigned)-.18 F(to)158 316.8 Q F2($0)2.919 E F0 .419 +(and an)2.919 F 2.919(yr)-.15 G .419(emaining ar)-2.919 F .418 +(guments are assigned to the positional parameters.)-.18 F .418 +(The assignment)5.418 F(to)158 328.8 Q F2($0)2.5 E F0 +(sets the name of the shell, which is used in w)2.5 E +(arning and error messages.)-.1 E F2108 340.8 Q F0(If the)158 +340.8 Q F22.5 E F0(option is present, the shell is)2.5 E F3(inter) +2.51 E(active)-.15 E F0(.).18 E F2108 352.8 Q F0(Mak)158 352.8 Q +(e)-.1 E F2(bash)2.5 E F0(act as if it had been in)2.5 E -.2(vo)-.4 G +-.1(ke).2 G 2.5(da).1 G 2.5(sal)-2.5 G(ogin shell \(see)-2.5 E/F4 9 +/Times-Bold@0 SF(INV)2.5 E(OCA)-.405 E(TION)-.855 E F0(belo)2.25 E(w\).) +-.25 E F2108 364.8 Q F0(If the)158 364.8 Q F22.5 E F0 +(option is present, the shell becomes)2.5 E F3 -.37(re)2.5 G(stricted) +.37 E F0(\(see)3.27 E F4(RESTRICTED SHELL)2.5 E F0(belo)2.25 E(w\).)-.25 +E F2108 376.8 Q F0 .602(If the)158 376.8 R F23.102 E F0 .602 +(option is present, or if no ar)3.102 F .602 +(guments remain after option processing, then commands)-.18 F .617 +(are read from the standard input.)158 388.8 R .617(This option allo) +5.617 F .616(ws the positional parameters to be set when)-.25 F(in)158 +400.8 Q -.2(vo)-.4 G(king an interacti).2 E .3 -.15(ve s)-.25 H +(hell or when reading input through a pipe.).15 E F2108 412.8 Q F0 +3.183(Al)158 412.8 S .683(ist of all double-quoted strings preceded by) +-3.183 F F2($)3.184 E F0 .684(is printed on the standard output.)3.184 F +.684(These are)5.684 F .458(the strings that are subject to language tr\ +anslation when the current locale is not)158 424.8 R F2(C)2.958 E F0(or) +2.958 E F2(POSIX)2.958 E F0(.)A(This implies the)158 436.8 Q F22.5 +E F0(option; no commands will be e)2.5 E -.15(xe)-.15 G(cuted.).15 E F2 +([\255+]O [)108 448.8 Q F3(shopt_option)A F2(])A F3(shopt_option)158 +460.8 Q F0 1.097(is one of the shell options accepted by the)3.596 F F2 +(shopt)3.597 E F0 -.2(bu)3.597 G 1.097(iltin \(see).2 F F4 1.097 +(SHELL B)3.597 F(UIL)-.09 E(TIN)-.828 E(COMMANDS)158 472.8 Q F0(belo) +3.003 E 3.253(w\). If)-.25 F F3(shopt_option)3.253 E F0 .753 +(is present,)3.253 F F23.253 E F0 .753(sets the v)3.253 F .753 +(alue of that option;)-.25 F F2(+O)3.252 E F0(unsets)3.252 E 2.624 +(it. If)158 484.8 R F3(shopt_option)2.624 E F0 .124 +(is not supplied, the names and v)2.624 F .125 +(alues of the shell options accepted by)-.25 F F2(shopt)2.625 E F0 .506 +(are printed on the standard output.)158 496.8 R .505(If the in)5.505 F +-.2(vo)-.4 G .505(cation option is).2 F F2(+O)3.005 E F0 3.005(,t)C .505 +(he output is displayed in a)-3.005 F +(format that may be reused as input.)158 508.8 Q F2108 520.8 Q F0 +(A)158 520.8 Q F23.363 E F0 .864 +(signals the end of options and disables further option processing.) +3.363 F(An)5.864 E 3.364(ya)-.15 G -.18(rg)-3.364 G .864(uments after) +.18 F(the)158 532.8 Q F22.5 E F0 +(are treated as \214lenames and ar)2.5 E 2.5(guments. An)-.18 F(ar)2.5 E +(gument of)-.18 E F22.5 E F0(is equi)2.5 E -.25(va)-.25 G(lent to) +.25 E F22.5 E F0(.)A F2(Bash)108 549.6 Q F0 .304 +(also interprets a number of multi-character options.)2.804 F .303 +(These options must appear on the command line)5.303 F +(before the single-character options to be recognized.)108 561.6 Q F2 +108 578.4 Q(ugger)-.2 E F0 .474(Arrange for the deb)144 +590.4 R .474(ugger pro\214le to be e)-.2 F -.15(xe)-.15 G .475 +(cuted before the shell starts.).15 F -.45(Tu)5.475 G .475(rns on e).45 +F .475(xtended deb)-.15 F(ug-)-.2 E +(ging mode \(see the description of the)144 602.4 Q F2(extdeb)2.5 E(ug) +-.2 E F0(option to the)2.5 E F2(shopt)2.5 E F0 -.2(bu)2.5 G(iltin belo) +.2 E(w\).)-.25 E F2(\255\255dump\255po\255strings)108 614.4 Q F0(Equi) +144 626.4 Q -.25(va)-.25 G(lent to).25 E F22.5 E F0 2.5(,b)C +(ut the output is in the GNU)-2.7 E F3 -.1(ge)2.5 G(tte).1 E(xt)-.2 E F2 +(po)2.5 E F0(\(portable object\) \214le format.)2.5 E F2 +(\255\255dump\255strings)108 638.4 Q F0(Equi)144 650.4 Q -.25(va)-.25 G +(lent to).25 E F22.5 E F0(.)A F2(\255\255help)108 662.4 Q F0 +(Display a usage message on standard output and e)144 662.4 Q +(xit successfully)-.15 E(.)-.65 E F2108 674.4 Q F3 +(\214le)2.5 E F2108 686.4 Q(c\214le)-.18 E F3(\214le)2.5 E F0 +(Ex)144 698.4 Q 1.599(ecute commands from)-.15 F F3(\214le)6.009 E F0 +1.598(instead of the standard personal initialization \214le)4.279 F F3 +(~/.bashr)3.598 E(c)-.37 E F0 1.598(if the)4.408 F(shell is interacti) +144 710.4 Q .3 -.15(ve \()-.25 H(see).15 E F4(INV)2.5 E(OCA)-.405 E +(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(1)195.395 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(\255\255login)108 84 Q F0(Equi)144 96 Q -.25(va)-.25 G(lent to).25 E +F12.5 E F0(.)A F1(\255\255noediting)108 112.8 Q F0 +(Do not use the GNU)144 124.8 Q F1 -.18(re)2.5 G(adline).18 E F0 +(library to read command lines when the shell is interacti)2.5 E -.15 +(ve)-.25 G(.).15 E F1(\255\255nopr)108 141.6 Q(o\214le)-.18 E F0 .017 +(Do not read either the system-wide startup \214le)144 153.6 R/F2 10 +/Times-Italic@0 SF(/etc/pr)4.183 E(o\214le)-.45 E F0 .017(or an)4.183 F +2.517(yo)-.15 G 2.517(ft)-2.517 G .018 +(he personal initialization \214les)-2.517 F F2(~/.bash_pr)143.5 165.6 Q +(o\214le)-.45 E F0(,).18 E F2(~/.bash_lo)2.305 E(gin)-.1 E F0 2.805(,o) +.24 G(r)-2.805 E F2(~/.pr)2.305 E(o\214le)-.45 E F0 5.305(.B).18 G 2.805 +(yd)-5.305 G(ef)-2.805 E(ault,)-.1 E F1(bash)2.805 E F0 .305 +(reads these \214les when it is in)2.805 F -.2(vo)-.4 G -.1(ke).2 G +2.805(da).1 G(s)-2.805 E 2.5(al)144 177.6 S(ogin shell \(see)-2.5 E/F3 9 +/Times-Bold@0 SF(INV)2.5 E(OCA)-.405 E(TION)-.855 E F0(belo)2.25 E(w\).) +-.25 E F1108 194.4 Q(c)-.18 E F0 .161(Do not read and e)144 +194.4 R -.15(xe)-.15 G .162(cute the personal initialization \214le).15 +F F2(~/.bashr)2.162 E(c)-.37 E F0 .162(if the shell is interacti)2.972 F +-.15(ve)-.25 G 5.162(.T).15 G .162(his op-)-5.162 F(tion is on by def) +144 206.4 Q(ault if the shell is in)-.1 E -.2(vo)-.4 G -.1(ke).2 G 2.5 +(da).1 G(s)-2.5 E F1(sh)2.5 E F0(.)A F1(\255\255posix)108 223.2 Q F0 +1.783(Change the beha)144 235.2 R 1.782(vior of)-.2 F F1(bash)4.282 E F0 +1.782(where the def)4.282 F 1.782(ault operation dif)-.1 F 1.782 +(fers from the POSIX standard to)-.25 F .332(match the standard \()144 +247.2 R F2 .332(posix mode)B F0 2.832(\). See)B F3 .333(SEE ALSO)2.833 F +F0(belo)2.583 E 2.833(wf)-.25 G .333 +(or a reference to a document that details)-2.833 F(ho)144 259.2 Q 2.5 +(wp)-.25 G(osix mode af)-2.5 E(fects bash')-.25 E 2.5(sb)-.55 G(eha)-2.5 +E(vior)-.2 E(.)-.55 E F1108 276 Q(estricted)-.18 E F0 +(The shell becomes restricted \(see)144 288 Q F3(RESTRICTED SHELL)2.5 E +F0(belo)2.25 E(w\).)-.25 E F1108 304.8 Q(erbose)-.1 E F0(Equi) +144 316.8 Q -.25(va)-.25 G(lent to).25 E F12.5 E F0(.)A F1 +108 333.6 Q(ersion)-.1 E F0(Sho)144 345.6 Q 2.5(wv)-.25 G +(ersion information for this instance of)-2.65 E F1(bash)2.5 E F0 +(on the standard output and e)2.5 E(xit successfully)-.15 E(.)-.65 E/F4 +10.95/Times-Bold@0 SF(ARGUMENTS)72 362.4 Q F0 .017(If ar)108 374.4 R +.016(guments remain after option processing, and neither the)-.18 F F1 +2.516 E F0 .016(nor the)2.516 F F12.516 E F0 .016 +(option has been supplied, the \214rst)2.516 F(ar)108 386.4 Q .041(gume\ +nt is assumed to be the name of a \214le containing shell commands.)-.18 +F(If)5.041 E F1(bash)2.541 E F0 .041(is in)2.541 F -.2(vo)-.4 G -.1(ke) +.2 G 2.541(di).1 G 2.541(nt)-2.541 G .042(his f)-2.541 F(ashion,)-.1 E +F1($0)108 398.4 Q F0 .936(is set to the name of the \214le, and the pos\ +itional parameters are set to the remaining ar)3.436 F(guments.)-.18 E +F1(Bash)5.935 E F0 .233(reads and e)108 410.4 R -.15(xe)-.15 G .233 +(cutes commands from this \214le, then e).15 F(xits.)-.15 E F1(Bash) +5.234 E F0 1.334 -.55('s e)D .234(xit status is the e).4 F .234 +(xit status of the last com-)-.15 F .349(mand e)108 422.4 R -.15(xe)-.15 +G .349(cuted in the script.).15 F .349(If no commands are e)5.349 F -.15 +(xe)-.15 G .349(cuted, the e).15 F .348(xit status is 0.)-.15 F .348 +(An attempt is \214rst made to)5.348 F .253 +(open the \214le in the current directory)108 434.4 R 2.753(,a)-.65 G +.254 +(nd, if no \214le is found, then the shell searches the directories in) +-2.753 F F3 -.666(PA)2.754 G(TH)-.189 E F0(for the script.)108 446.4 Q +F4(INV)72 463.2 Q(OCA)-.493 E(TION)-1.04 E F0(A)108 475.2 Q F2(lo)2.5 E +(gin shell)-.1 E F0(is one whose \214rst character of ar)2.5 E +(gument zero is a)-.18 E F12.5 E F0 2.5(,o)C 2.5(ro)-2.5 G +(ne started with the)-2.5 E F1(\255\255login)2.5 E F0(option.)2.5 E(An) +108 492 Q F2(inter)2.734 E(active)-.15 E F0 .234 +(shell is one started without non-option ar)2.734 F .234 +(guments \(unless)-.18 F F12.734 E F0 .233 +(is speci\214ed\) and without the)2.734 F F12.733 E F0 .509(optio\ +n whose standard input and error are both connected to terminals \(as d\ +etermined by)108 504 R F2(isatty)3.019 E F0 .509(\(3\)\), or one).32 F +.946(started with the)108 516 R F13.445 E F0(option.)3.445 E F3 +(PS1)5.945 E F0 .945(is set and)3.195 F F1<24ad>3.445 E F0(includes) +3.445 E F1(i)3.445 E F0(if)3.445 E F1(bash)3.445 E F0 .945(is interacti) +3.445 F -.15(ve)-.25 G 3.445(,a).15 G(llo)-3.445 E .945 +(wing a shell script or a)-.25 F(startup \214le to test this state.)108 +528 Q .032(The follo)108 544.8 R .032(wing paragraphs describe ho)-.25 F +(w)-.25 E F1(bash)2.532 E F0 -.15(exe)2.532 G .032 +(cutes its startup \214les.).15 F .032(If an)5.032 F 2.532(yo)-.15 G +2.532(ft)-2.532 G .032(he \214les e)-2.532 F .033(xist b)-.15 F .033 +(ut cannot be)-.2 F(read,)108 556.8 Q F1(bash)2.6 E F0 .1 +(reports an error)2.6 F 5.1(.T)-.55 G .1(ildes are e)-5.45 F .099 +(xpanded in \214lenames as described belo)-.15 F 2.599(wu)-.25 G(nder) +-2.599 E F1 -.18(Ti)2.599 G .099(lde Expansion).18 F F0(in)2.599 E(the) +108 568.8 Q F3(EXP)2.5 E(ANSION)-.666 E F0(section.)2.25 E(When)108 +585.6 Q F1(bash)2.895 E F0 .395(is in)2.895 F -.2(vo)-.4 G -.1(ke).2 G +2.895(da).1 G 2.895(sa)-2.895 G 2.895(ni)-2.895 G(nteracti)-2.895 E .695 +-.15(ve l)-.25 H .396(ogin shell, or as a non-interacti).15 F .696 -.15 +(ve s)-.25 H .396(hell with the).15 F F1(\255\255login)2.896 E F0 .396 +(option, it)2.896 F 1.334(\214rst reads and e)108 597.6 R -.15(xe)-.15 G +1.334(cutes commands from the \214le).15 F F2(/etc/pr)3.834 E(o\214le) +-.45 E F0 3.834(,i)C 3.833(ft)-3.834 G 1.333(hat \214le e)-3.833 F 3.833 +(xists. After)-.15 F 1.333(reading that \214le, it)3.833 F .248 +(looks for)108 609.6 R F2(~/.bash_pr)2.748 E(o\214le)-.45 E F0(,)A F2 +(~/.bash_lo)2.748 E(gin)-.1 E F0 2.748(,a)C(nd)-2.748 E F2(~/.pr)2.748 E +(o\214le)-.45 E F0 2.748(,i)C 2.749(nt)-2.748 G .249(hat order)-2.749 F +2.749(,a)-.4 G .249(nd reads and e)-2.749 F -.15(xe)-.15 G .249 +(cutes commands from).15 F .076(the \214rst one that e)108 621.6 R .076 +(xists and is readable.)-.15 F(The)5.076 E F1(\255\255nopr)2.576 E +(o\214le)-.18 E F0 .076 +(option may be used when the shell is started to in-)2.576 F +(hibit this beha)108 633.6 Q(vior)-.2 E(.)-.55 E 1.104 +(When an interacti)108 650.4 R 1.404 -.15(ve l)-.25 H 1.104 +(ogin shell e).15 F 1.104(xits, or a non-interacti)-.15 F 1.404 -.15 +(ve l)-.25 H 1.104(ogin shell e).15 F -.15(xe)-.15 G 1.104(cutes the).15 +F F1(exit)3.604 E F0 -.2(bu)3.604 G 1.104(iltin command,).2 F F1(bash) +108 662.4 Q F0(reads and e)2.5 E -.15(xe)-.15 G +(cutes commands from the \214le).15 E F2(~/.bash_lo)2.5 E(gout)-.1 E F0 +2.5(,i)C 2.5(fi)-2.5 G 2.5(te)-2.5 G(xists.)-2.65 E 1.698 +(When an interacti)108 679.2 R 1.998 -.15(ve s)-.25 H 1.698 +(hell that is not a login shell is started,).15 F F1(bash)4.197 E F0 +1.697(reads and e)4.197 F -.15(xe)-.15 G 1.697(cutes commands from).15 F +F2(~/.bashr)108 691.2 Q(c)-.37 E F0 2.535(,i)C 2.535(ft)-2.535 G .035 +(hat \214le e)-2.535 F 2.535(xists. This)-.15 F .036 +(may be inhibited by using the)2.535 F F12.536 E(c)-.18 E F0 +2.536(option. The)2.536 F F12.536 E(c\214le)-.18 E F2(\214le) +2.536 E F0 .036(option will)2.536 F(force)108 703.2 Q F1(bash)2.5 E F0 +(to read and e)2.5 E -.15(xe)-.15 G(cute commands from).15 E F2(\214le) +2.5 E F0(instead of)2.5 E F2(~/.bashr)2.5 E(c)-.37 E F0(.)A(When)108 720 +Q F1(bash)5.306 E F0 2.806(is started non-interacti)5.306 F -.15(ve)-.25 +G(ly).15 E 5.306(,t)-.65 G 5.306(or)-5.306 G 2.806 +(un a shell script, for e)-5.306 F 2.805(xample, it looks for the v)-.15 +F(ariable)-.25 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(2) +195.395 E 0 Cg EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 9/Times-Bold@0 +SF -.27(BA)108 84 S(SH_ENV).27 E F0 1.01(in the en)3.26 F 1.01 +(vironment, e)-.4 F 1.01(xpands its v)-.15 F 1.01 +(alue if it appears there, and uses the e)-.25 F 1.011(xpanded v)-.15 F +1.011(alue as the)-.25 F(name of a \214le to read and e)108 96 Q -.15 +(xe)-.15 G(cute.).15 E/F2 10/Times-Bold@0 SF(Bash)5 E F0(beha)2.5 E -.15 +(ve)-.2 G 2.5(sa).15 G 2.5(si)-2.5 G 2.5(ft)-2.5 G(he follo)-2.5 E +(wing command were e)-.25 E -.15(xe)-.15 G(cuted:).15 E/F3 10/Courier@0 +SF(if [ \255n "$BASH_ENV" ]; then . "$BASH_ENV"; fi)144 114 Q F0 -.2(bu) +108 132 S 2.5(tt).2 G(he v)-2.5 E(alue of the)-.25 E F1 -.666(PA)2.5 G +(TH)-.189 E F0 -.25(va)2.25 G +(riable is not used to search for the \214lename.).25 E(If)108 148.8 Q +F2(bash)3.417 E F0 .917(is in)3.417 F -.2(vo)-.4 G -.1(ke).2 G 3.417(dw) +.1 G .917(ith the name)-3.417 F F2(sh)3.417 E F0 3.417(,i)C 3.417(tt) +-3.417 G .917(ries to mimic the startup beha)-3.417 F .917 +(vior of historical v)-.2 F .917(ersions of)-.15 F F2(sh)3.417 E F0(as) +3.417 E .145 +(closely as possible, while conforming to the POSIX standard as well.) +108 160.8 R .145(When in)5.145 F -.2(vo)-.4 G -.1(ke).2 G 2.645(da).1 G +2.645(sa)-2.645 G 2.645(ni)-2.645 G(nteracti)-2.645 E .445 -.15(ve l) +-.25 H(ogin).15 E 1.264(shell, or a non-interacti)108 172.8 R 1.564 -.15 +(ve s)-.25 H 1.264(hell with the).15 F F2(\255\255login)3.764 E F0 1.264 +(option, it \214rst attempts to read and e)3.764 F -.15(xe)-.15 G 1.263 +(cute commands).15 F(from)108 184.8 Q/F4 10/Times-Italic@0 SF(/etc/pr) +4.173 E(o\214le)-.45 E F0(and)3.203 E F4(~/.pr)2.523 E(o\214le)-.45 E F0 +3.023(,i).18 G 3.024(nt)-3.023 G .524(hat order)-3.024 F 5.524(.T)-.55 G +(he)-5.524 E F2(\255\255nopr)3.024 E(o\214le)-.18 E F0 .524 +(option may be used to inhibit this beha)3.024 F(vior)-.2 E(.)-.55 E +.418(When in)108 196.8 R -.2(vo)-.4 G -.1(ke).2 G 2.918(da).1 G 2.918 +(sa)-2.918 G 2.918(ni)-2.918 G(nteracti)-2.918 E .718 -.15(ve s)-.25 H +.418(hell with the name).15 F F2(sh)2.918 E F0(,)A F2(bash)2.918 E F0 +.418(looks for the v)2.918 F(ariable)-.25 E F1(ENV)2.918 E/F5 9 +/Times-Roman@0 SF(,)A F0 -.15(ex)2.667 G .417(pands its v).15 F(alue) +-.25 E .171(if it is de\214ned, and uses the e)108 208.8 R .171 +(xpanded v)-.15 F .171(alue as the name of a \214le to read and e)-.25 F +-.15(xe)-.15 G 2.671(cute. Since).15 F 2.671(as)2.671 G .171(hell in) +-2.671 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E(as)108 220.8 Q F2(sh)3.081 E F0 +.581(does not attempt to read and e)3.081 F -.15(xe)-.15 G .581 +(cute commands from an).15 F 3.08(yo)-.15 G .58 +(ther startup \214les, the)-3.08 F F23.08 E(c\214le)-.18 E F0 +.58(option has)3.08 F .182(no ef)108 232.8 R 2.682(fect. A)-.25 F +(non-interacti)2.682 E .482 -.15(ve s)-.25 H .182(hell in).15 F -.2(vo) +-.4 G -.1(ke).2 G 2.682(dw).1 G .182(ith the name)-2.682 F F2(sh)2.682 E +F0 .182(does not attempt to read an)2.682 F 2.683(yo)-.15 G .183 +(ther startup \214les.)-2.683 F(When in)108 244.8 Q -.2(vo)-.4 G -.1(ke) +.2 G 2.5(da).1 G(s)-2.5 E F2(sh)2.5 E F0(,)A F2(bash)2.5 E F0(enters)2.5 +E F4(posix)3.75 E F0(mode after the startup \214les are read.)3.03 E +(When)108 261.6 Q F2(bash)2.727 E F0 .226(is started in)2.727 F F4 +(posix)3.976 E F0 .226(mode, as with the)3.256 F F2(\255\255posix)2.726 +E F0 .226(command line option, it follo)2.726 F .226(ws the POSIX stan-) +-.25 F .341(dard for startup \214les.)108 273.6 R .341 +(In this mode, interacti)5.341 F .641 -.15(ve s)-.25 H .341(hells e).15 +F .341(xpand the)-.15 F F1(ENV)2.841 E F0 -.25(va)2.591 G .342 +(riable and commands are read and).25 F -.15(exe)108 285.6 S +(cuted from the \214le whose name is the e).15 E(xpanded v)-.15 E 2.5 +(alue. No)-.25 F(other startup \214les are read.)2.5 E F2(Bash)108 302.4 +Q F0 .224(attempts to determine when it is being run with its standard \ +input connected to a netw)2.724 F .223(ork connection,)-.1 F .025 +(as when e)108 314.4 R -.15(xe)-.15 G .025 +(cuted by the remote shell daemon, usually).15 F F4 -.1(rs)2.525 G(hd).1 +E F0 2.525(,o)C 2.525(rt)-2.525 G .025(he secure shell daemon)-2.525 F +F4(sshd)2.525 E F0 5.025(.I)C(f)-5.025 E F2(bash)2.525 E F0(deter)2.525 +E(-)-.2 E .134(mines it is being run in this f)108 326.4 R .134 +(ashion, it reads and e)-.1 F -.15(xe)-.15 G .133(cutes commands from) +.15 F F4(~/.bashr)2.633 E(c)-.37 E F0 2.633(,i)C 2.633(ft)-2.633 G .133 +(hat \214le e)-2.633 F .133(xists and is)-.15 F 2.869(readable. It)108 +338.4 R .369(will not do this if in)2.869 F -.2(vo)-.4 G -.1(ke).2 G +2.869(da).1 G(s)-2.869 E F2(sh)2.869 E F0 5.369(.T)C(he)-5.369 E F2 +2.869 E(c)-.18 E F0 .369 +(option may be used to inhibit this beha)2.869 F(vior)-.2 E 2.869(,a)-.4 +G(nd)-2.869 E(the)108 350.4 Q F22.919 E(c\214le)-.18 E F0 .419 +(option may be used to force another \214le to be read, b)2.919 F .419 +(ut neither)-.2 F F4 -.1(rs)2.919 G(hd).1 E F0(nor)2.919 E F4(sshd)2.919 +E F0 .418(generally in)2.919 F -.2(vo)-.4 G -.1(ke).2 G +(the shell with those options or allo)108 362.4 Q 2.5(wt)-.25 G +(hem to be speci\214ed.)-2.5 E .433(If the shell is started with the ef) +108 379.2 R(fecti)-.25 E .733 -.15(ve u)-.25 H .433 +(ser \(group\) id not equal to the real user \(group\) id, and the).15 F +F22.934 E F0(op-)2.934 E 1.124(tion is not supplied, no startup \ +\214les are read, shell functions are not inherited from the en)108 +391.2 R 1.124(vironment, the)-.4 F F1(SHELLOPTS)108 403.2 Q F5(,)A F1 +-.27(BA)2.959 G(SHOPTS).27 E F5(,)A F1(CDP)2.959 E -.855(AT)-.666 G(H) +.855 E F5(,)A F0(and)2.959 E F1(GLOBIGNORE)3.209 E F0 -.25(va)2.959 G +.709(riables, if the).25 F 3.209(ya)-.15 G .71(ppear in the en)-3.209 F +.71(vironment, are)-.4 F .905(ignored, and the ef)108 415.2 R(fecti)-.25 +E 1.205 -.15(ve u)-.25 H .904(ser id is set to the real user id.).15 F +.904(If the)5.904 F F23.404 E F0 .904(option is supplied at in) +3.404 F -.2(vo)-.4 G .904(cation, the).2 F(startup beha)108 427.2 Q +(vior is the same, b)-.2 E(ut the ef)-.2 E(fecti)-.25 E .3 -.15(ve u) +-.25 H(ser id is not reset.).15 E/F6 10.95/Times-Bold@0 SF(DEFINITIONS) +72 444 Q F0(The follo)108 456 Q +(wing de\214nitions are used throughout the rest of this document.)-.25 +E F2(blank)108 468 Q F0 2.5(As)144 468 S(pace or tab)-2.5 E(.)-.4 E F2 +-.1(wo)108 480 S(rd).1 E F0 2.5(As)144 480 S +(equence of characters considered as a single unit by the shell.)-2.5 E +(Also kno)5 E(wn as a)-.25 E F2(tok)2.5 E(en)-.1 E F0(.)A F2(name)108 +492 Q F0(A)144 492 Q F4(wor)3.005 E(d)-.37 E F0 .165 +(consisting only of alphanumeric characters and underscores, and be) +3.435 F .166(ginning with an alpha-)-.15 F +(betic character or an underscore.)144 504 Q(Also referred to as an)5 E +F2(identi\214er)2.5 E F0(.)A F2(metacharacter)108 516 Q F0 2.5(Ac)144 +528 S(haracter that, when unquoted, separates w)-2.5 E 2.5(ords. One)-.1 +F(of the follo)2.5 E(wing:)-.25 E F2 5(|&;\(\)<>s)144 540 S 2.5 +(pace tab newline)-5 F(contr)108 552 Q(ol operator)-.18 E F0(A)144 564 Q +F4(tok)2.5 E(en)-.1 E F0(that performs a control function.)2.5 E +(It is one of the follo)5 E(wing symbols:)-.25 E F2 2.5 +(|| & && ; ;; ;& ;;& \( \) | |&)144 576 R()10 E F6(RESER)72 +592.8 Q(VED W)-.602 E(ORDS)-.11 E F4 .307(Reserved wor)108 604.8 R(ds) +-.37 E F0 .307(are w)2.807 F .307(ords that ha)-.1 F .607 -.15(ve a s) +-.2 H .306(pecial meaning to the shell.).15 F .306(The follo)5.306 F +.306(wing w)-.25 F .306(ords are recognized as)-.1 F(reserv)108 616.8 Q +.313(ed when unquoted and either the \214rst w)-.15 F .314 +(ord of a command \(see)-.1 F F1 .314(SHELL GRAMMAR)2.814 F F0(belo) +2.564 E .314(w\), the third)-.25 F -.1(wo)108 628.8 S .644(rd of a).1 F +F2(case)3.144 E F0(or)3.144 E F2(select)3.143 E F0 .643(command \(only) +3.143 F F2(in)3.143 E F0 .643(is v)3.143 F .643(alid\), or the third w) +-.25 F .643(ord of a)-.1 F F2 -.25(fo)3.143 G(r).25 E F0 .643 +(command \(only)3.143 F F2(in)3.143 E F0(and)3.143 E F2(do)3.143 E F0 +(are v)108 640.8 Q(alid\):)-.25 E F2 11.295(!c)144 657.6 S 8.795 +(ase copr)-11.295 F 8.795(oc do done elif else esac \214 f)-.18 F 8.795 +(or function if in select then)-.25 F 7.5(until while { } time [[ ]])144 +669.6 R F6(SHELL GRAMMAR)72 686.4 Q F2(Simple Commands)87 698.4 Q F0(A) +108 710.4 Q F4 .389(simple command)2.889 F F0 .389 +(is a sequence of optional v)2.889 F .388(ariable assignments follo)-.25 +F .388(wed by)-.25 F F2(blank)2.888 E F0 .388(-separated w)B .388 +(ords and)-.1 F .815(redirections, and terminated by a)108 722.4 R F4 +(contr)3.315 E .815(ol oper)-.45 F(ator)-.15 E F0 5.815(.T)C .815 +(he \214rst w)-5.815 F .816(ord speci\214es the command to be e)-.1 F +-.15(xe)-.15 G(cuted,).15 E(GNU Bash 5.1)72 768 Q(2020 October 29) +141.235 E(3)195.395 E 0 Cg EP +%%Page: 4 4 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E +(and is passed as ar)108 84 Q(gument zero.)-.18 E(The remaining w)5 E +(ords are passed as ar)-.1 E(guments to the in)-.18 E -.2(vo)-.4 G -.1 +(ke).2 G 2.5(dc).1 G(ommand.)-2.5 E(The return v)108 100.8 Q(alue of a) +-.25 E/F1 10/Times-Italic@0 SF(simple command)2.5 E F0(is its e)2.5 E +(xit status, or 128+)-.15 E F1(n)A F0 +(if the command is terminated by signal)3.333 E F1(n)2.86 E F0(.).24 E +/F2 10/Times-Bold@0 SF(Pipelines)87 117.6 Q F0(A)108 129.6 Q F1 +(pipeline)2.996 E F0 .496(is a sequence of one or more commands separat\ +ed by one of the control operators)2.996 F F2(|)2.996 E F0(or)2.996 E F2 +(|&)2.996 E F0 5.496(.T)C(he)-5.496 E(format for a pipeline is:)108 +141.6 Q([)144 158.4 Q F2(time)A F0([)2.5 E F2A F0(]] [ ! ])A F1 +(command)2.5 E F0 2.5([[)2.5 G F2(|)-2.5 E/F3 10/Symbol SFA F2(|&)A +F0(])A F1(command2)2.5 E F0(... ])2.5 E .231(The standard output of)108 +175.2 R F1(command)2.931 E F0 .232 +(is connected via a pipe to the standard input of)3.502 F F1(command2) +2.932 E F0 5.232(.T).02 G .232(his connec-)-5.232 F .643 +(tion is performed before an)108 187.2 R 3.143(yr)-.15 G .642 +(edirections speci\214ed by the command \(see)-3.143 F/F4 9/Times-Bold@0 +SF(REDIRECTION)3.142 E F0(belo)2.892 E 3.142(w\). If)-.25 F F2(|&)3.142 +E F0(is)3.142 E(used,)108 199.2 Q F1(command)2.663 E F0 1.263 -.55('s s) +D .163(tandard error).55 F 2.663(,i)-.4 G 2.663(na)-2.663 G .163 +(ddition to its standard output, is connected to)-2.663 F F1(command2) +2.664 E F0 1.264 -.55('s s)D .164(tandard in-).55 F .438 +(put through the pipe; it is shorthand for)108 211.2 R F2 .437(2>&1 |) +2.937 F F0 5.437(.T)C .437 +(his implicit redirection of the standard error to the stan-)-5.437 F +(dard output is performed after an)108 223.2 Q 2.5(yr)-.15 G +(edirections speci\214ed by the command.)-2.5 E .48 +(The return status of a pipeline is the e)108 240 R .48 +(xit status of the last command, unless the)-.15 F F2(pipefail)2.98 E F0 +.48(option is enabled.)2.98 F(If)108 252 Q F2(pipefail)2.687 E F0 .187 +(is enabled, the pipeline')2.687 F 2.687(sr)-.55 G .186 +(eturn status is the v)-2.687 F .186 +(alue of the last \(rightmost\) command to e)-.25 F .186(xit with a)-.15 +F .61(non-zero status, or zero if all commands e)108 264 R .611 +(xit successfully)-.15 F 5.611(.I)-.65 G 3.111(ft)-5.611 G .611 +(he reserv)-3.111 F .611(ed w)-.15 F(ord)-.1 E F2(!)3.111 E F0 .611 +(precedes a pipeline, the)5.611 F -.15(ex)108 276 S .55 +(it status of that pipeline is the logical ne).15 F -.05(ga)-.15 G .55 +(tion of the e).05 F .55(xit status as described abo)-.15 F -.15(ve)-.15 +G 5.55(.T).15 G .55(he shell w)-5.55 F .55(aits for)-.1 F +(all commands in the pipeline to terminate before returning a v)108 288 +Q(alue.)-.25 E .298(If the)108 304.8 R F2(time)2.799 E F0(reserv)2.799 E +.299(ed w)-.15 F .299(ord precedes a pipeline, the elapsed as well as u\ +ser and system time consumed by its)-.1 F -.15(exe)108 316.8 S .14 +(cution are reported when the pipeline terminates.).15 F(The)5.139 E F2 +2.639 E F0 .139(option changes the output format to that spec-) +2.639 F .302(i\214ed by POSIX.)108 328.8 R .303(When the shell is in) +5.302 F F1 .303(posix mode)2.803 F F0 2.803(,i)C 2.803(td)-2.803 G .303 +(oes not recognize)-2.803 F F2(time)2.803 E F0 .303(as a reserv)2.803 F +.303(ed w)-.15 F .303(ord if the ne)-.1 F(xt)-.15 E(tok)108 340.8 Q .736 +(en be)-.1 F .736(gins with a `-'.)-.15 F(The)5.736 E F4(TIMEFORMA)3.236 +E(T)-.855 E F0 -.25(va)2.986 G .736 +(riable may be set to a format string that speci\214es ho).25 F 3.235 +(wt)-.25 G(he)-3.235 E .879 +(timing information should be displayed; see the description of)108 +352.8 R F4(TIMEFORMA)3.38 E(T)-.855 E F0(under)3.13 E F2 .88(Shell V) +3.38 F(ariables)-.92 E F0(be-)3.38 E(lo)108 364.8 Q -.65(w.)-.25 G .162 +(When the shell is in)108 381.6 R F1 .162(posix mode)2.662 F F0(,)A F2 +(time)2.662 E F0 .162(may be follo)2.662 F .161(wed by a ne)-.25 F 2.661 +(wline. In)-.25 F .161(this case, the shell displays the to-)2.661 F +.243(tal user and system time consumed by the shell and its children.) +108 393.6 R(The)5.243 E F4(TIMEFORMA)2.743 E(T)-.855 E F0 -.25(va)2.493 +G .243(riable may be used).25 F +(to specify the format of the time information.)108 405.6 Q .656 +(Each command in a pipeline is e)108 422.4 R -.15(xe)-.15 G .655 +(cuted as a separate process \(i.e., in a subshell\).).15 F(See)5.655 E +F4 .655(COMMAND EXE-)3.155 F .05(CUTION ENVIR)108 434.4 R(ONMENT)-.27 E +F0 .051(for a description of a subshell en)2.3 F 2.551(vironment. If)-.4 +F(the)2.551 E F2(lastpipe)2.551 E F0 .051(option is enabled us-)2.551 F +.416(ing the)108 446.4 R F2(shopt)2.916 E F0 -.2(bu)2.916 G .416 +(iltin \(see the description of).2 F F2(shopt)2.916 E F0(belo)2.916 E +.416(w\), the last element of a pipeline may be run by the)-.25 F +(shell process.)108 458.4 Q F2(Lists)87 475.2 Q F0(A)108 487.2 Q F1 +(list)2.849 E F0 .349(is a sequence of one or more pipelines separated \ +by one of the operators)2.849 F F2(;)2.85 E F0(,)A F2(&)2.85 E F0(,)A F2 +(&&)2.85 E F0 2.85(,o)C(r)-2.85 E F2(||)2.85 E F0 2.85(,a)C .35 +(nd option-)-2.85 F(ally terminated by one of)108 499.2 Q F2(;)2.5 E F0 +(,)A F2(&)2.5 E F0 2.5(,o)C(r)-2.5 E F2()2.5 E F0(.)A .961 +(Of these list operators,)108 516 R F2(&&)3.461 E F0(and)3.461 E F2(||) +3.461 E F0(ha)3.461 E 1.261 -.15(ve e)-.2 H .961(qual precedence, follo) +.15 F .96(wed by)-.25 F F2(;)3.46 E F0(and)3.46 E F2(&)3.46 E F0 3.46 +(,w)C .96(hich ha)-3.46 F 1.26 -.15(ve e)-.2 H .96(qual prece-).15 F +(dence.)108 528 Q 2.5(As)108 544.8 S(equence of one or more ne)-2.5 E +(wlines may appear in a)-.25 E F1(list)2.5 E F0 +(instead of a semicolon to delimit commands.)2.5 E .029 +(If a command is terminated by the control operator)108 561.6 R F2(&) +2.529 E F0 2.529(,t)C .029(he shell e)-2.529 F -.15(xe)-.15 G .029 +(cutes the command in the).15 F F1(bac)2.529 E(kgr)-.2 E(ound)-.45 E F0 +(in)2.529 E 2.678(as)108 573.6 S 2.678(ubshell. The)-2.678 F .178 +(shell does not w)2.678 F .178 +(ait for the command to \214nish, and the return status is 0.)-.1 F .178 +(These are referred)5.178 F .778(to as)108 585.6 R F1(async)3.278 E(hr) +-.15 E(onous)-.45 E F0 3.278(commands. Commands)3.278 F .779 +(separated by a)3.278 F F2(;)3.279 E F0 .779(are e)3.279 F -.15(xe)-.15 +G .779(cuted sequentially; the shell w).15 F .779(aits for)-.1 F +(each command to terminate in turn.)108 597.6 Q +(The return status is the e)5 E(xit status of the last command e)-.15 E +-.15(xe)-.15 G(cuted.).15 E .172(AND and OR lists are sequences of one \ +or more pipelines separated by the)108 614.4 R F2(&&)2.671 E F0(and) +2.671 E F2(||)2.671 E F0 .171(control operators, re-)2.671 F(specti)108 +626.4 Q -.15(ve)-.25 G(ly).15 E 5(.A)-.65 G(ND and OR lists are e)-5 E +-.15(xe)-.15 G(cuted with left associati).15 E(vity)-.25 E 5(.A)-.65 G +2.5(nA)-5 G(ND list has the form)-2.5 E F1(command1)144 643.2 Q F2(&&) +2.5 E F1(command2)2.5 E(command2)108.2 660 Q F0(is e)2.52 E -.15(xe)-.15 +G(cuted if, and only if,).15 E F1(command1)2.7 E F0(returns an e)2.5 E +(xit status of zero \(success\).)-.15 E(An OR list has the form)108 +676.8 Q F1(command1)144 693.6 Q F2(||)2.5 E F1(command2)2.5 E(command2) +108.2 710.4 Q F0 .434(is e)2.954 F -.15(xe)-.15 G .434 +(cuted if, and only if,).15 F F1(command1)3.135 E F0 .435 +(returns a non-zero e)2.935 F .435(xit status.)-.15 F .435 +(The return status of AND)5.435 F(and OR lists is the e)108 722.4 Q +(xit status of the last command e)-.15 E -.15(xe)-.15 G +(cuted in the list.).15 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 +E(4)195.395 E 0 Cg EP +%%Page: 5 5 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(Compound Commands)87 84 Q F0(A)108 96 Q/F2 10/Times-Italic@0 SF 1.054 +(compound command)3.554 F F0 1.054(is one of the follo)3.554 F 3.553 +(wing. In)-.25 F 1.053(most cases a)3.553 F F2(list)3.553 E F0 1.053 +(in a command')3.553 F 3.553(sd)-.55 G 1.053(escription may be)-3.553 F +1.026(separated from the rest of the command by one or more ne)108 108 R +1.026(wlines, and may be follo)-.25 F 1.027(wed by a ne)-.25 F 1.027 +(wline in)-.25 F(place of a semicolon.)108 120 Q(\()108 136.8 Q F2(list) +A F0(\))A F2(list)144 136.8 Q F0 .011(is e)2.512 F -.15(xe)-.15 G .011 +(cuted in a subshell en).15 F .011(vironment \(see)-.4 F/F3 9 +/Times-Bold@0 SF .011(COMMAND EXECUTION ENVIR)2.511 F(ONMENT)-.27 E F0 +(belo)2.261 E(w\).)-.25 E -1.11(Va)144 148.8 S .016 +(riable assignments and b)1.11 F .016(uiltin commands that af)-.2 F .016 +(fect the shell')-.25 F 2.517(se)-.55 G -.4(nv)-2.517 G .017 +(ironment do not remain in ef-).4 F(fect after the command completes.) +144 160.8 Q(The return status is the e)5 E(xit status of)-.15 E F2(list) +2.5 E F0(.)A({)108 177.6 Q F2(list)2.5 E F0 2.5(;})C F2(list)144 177.6 Q +F0 .402(is simply e)2.902 F -.15(xe)-.15 G .401 +(cuted in the current shell en).15 F(vironment.)-.4 E F2(list)5.401 E F0 +.401(must be terminated with a ne)2.901 F .401(wline or)-.25 F 3.214 +(semicolon. This)144 189.6 R .714(is kno)3.214 F .714(wn as a)-.25 F F2 +(gr)3.215 E .715(oup command)-.45 F F0 5.715(.T)C .715 +(he return status is the e)-5.715 F .715(xit status of)-.15 F F2(list) +3.215 E F0 5.715(.N)C(ote)-5.715 E .22(that unlik)144 201.6 R 2.72(et) +-.1 G .22(he metacharacters)-2.72 F F1(\()2.72 E F0(and)2.72 E F1(\)) +2.72 E F0(,)A F1({)2.72 E F0(and)2.72 E F1(})2.719 E F0(are)2.719 E F2 +-.37(re)2.719 G .219(served wor).37 F(ds)-.37 E F0 .219 +(and must occur where a reserv)2.719 F(ed)-.15 E -.1(wo)144 213.6 S .256 +(rd is permitted to be recognized.).1 F .256(Since the)5.256 F 2.756(yd) +-.15 G 2.756(on)-2.756 G .257(ot cause a w)-2.756 F .257(ord break, the) +-.1 F 2.757(ym)-.15 G .257(ust be separated)-2.757 F(from)144 225.6 Q F2 +(list)2.5 E F0(by whitespace or another shell metacharacter)2.5 E(.)-.55 +E(\(\()108 242.4 Q F2 -.2(ex)C(pr).2 E(ession)-.37 E F0(\)\))A(The)144 +254.4 Q F2 -.2(ex)2.552 G(pr).2 E(ession)-.37 E F0 .052(is e)2.552 F +-.25(va)-.25 G .051(luated according to the rules described belo).25 F +2.551(wu)-.25 G(nder)-2.551 E F3 .051(ARITHMETIC EV)2.551 F(ALU)-1.215 E +(A-)-.54 E(TION)144 266.4 Q/F4 9/Times-Roman@0 SF(.)A F0 .411(If the v) +4.91 F .411(alue of the e)-.25 F .411(xpression is non-zero, the return\ + status is 0; otherwise the return status)-.15 F(is 1.)144 278.4 Q +(This is e)5 E(xactly equi)-.15 E -.25(va)-.25 G(lent to).25 E F1(let ") +2.5 E F2 -.2(ex)C(pr).2 E(ession)-.37 E F1(")A F0(.)A F1([[)108 295.2 Q +F2 -.2(ex)2.5 G(pr).2 E(ession)-.37 E F1(]])2.5 E F0 .003 +(Return a status of 0 or 1 depending on the e)144 307.2 R -.25(va)-.25 G +.003(luation of the conditional e).25 F(xpression)-.15 E F2 -.2(ex)2.503 +G(pr).2 E(ession)-.37 E F0 5.003(.E)C(x-)-5.003 E .758 +(pressions are composed of the primaries described belo)144 319.2 R +3.259(wu)-.25 G(nder)-3.259 E F3(CONDITION)3.259 E .759(AL EXPRESSIONS) +-.18 F F4(.)A F0 -.8(Wo)144 331.2 S .029(rd splitting and pathname e).8 +F .029(xpansion are not performed on the w)-.15 F .029(ords between the) +-.1 F F1([[)2.528 E F0(and)2.528 E F1(]])2.528 E F0 2.528(;t)C(ilde) +-2.528 E -.15(ex)144 343.2 S 3.968(pansion, parameter and v).15 F 3.969 +(ariable e)-.25 F 3.969(xpansion, arithmetic e)-.15 F 3.969 +(xpansion, command substitution,)-.15 F .571 +(process substitution, and quote remo)144 355.2 R -.25(va)-.15 G 3.071 +(la).25 G .571(re performed.)-3.071 F .571 +(Conditional operators such as)5.571 F F13.07 E F0 .57(must be) +3.07 F(unquoted to be recognized as primaries.)144 367.2 Q +(When used with)144 385.2 Q F1([[)2.5 E F0 2.5(,t)C(he)-2.5 E F1(<)2.5 E +F0(and)2.5 E F1(>)2.5 E F0(operators sort le)2.5 E +(xicographically using the current locale.)-.15 E .502(When the)144 +403.2 R F1(==)3.002 E F0(and)3.002 E F1(!=)3.002 E F0 .502(operators ar\ +e used, the string to the right of the operator is considered a pat-) +3.002 F .81(tern and matched according to the rules described belo)144 +415.2 R 3.31(wu)-.25 G(nder)-3.31 E F1 -.1(Pa)3.31 G(tter).1 E 3.31(nM) +-.15 G(atching)-3.31 E F0 3.31(,a)C 3.31(si)-3.31 G 3.31(ft)-3.31 G(he) +-3.31 E F1(ext-)3.31 E(glob)144 427.2 Q F0 .313 +(shell option were enabled.)2.813 F(The)5.313 E F1(=)2.813 E F0 .313 +(operator is equi)2.813 F -.25(va)-.25 G .313(lent to).25 F F1(==)2.813 +E F0 5.313(.I)C 2.813(ft)-5.313 G(he)-2.813 E F1(nocasematch)2.813 E F0 +.314(shell op-)2.814 F .03 +(tion is enabled, the match is performed without re)144 439.2 R -.05(ga) +-.15 G .029(rd to the case of alphabetic characters.).05 F .029(The re-) +5.029 F .258(turn v)144 451.2 R .259(alue is 0 if the string matches \() +-.25 F F1(==)A F0 2.759(\)o)C 2.759(rd)-2.759 G .259(oes not match \() +-2.759 F F1(!=)A F0 2.759(\)t)C .259(he pattern, and 1 otherwise.)-2.759 +F(An)5.259 E(y)-.15 E(part of the pattern may be quoted to force the qu\ +oted portion to be matched as a string.)144 463.2 Q .243 +(An additional binary operator)144 481.2 R(,)-.4 E F1(=~)2.743 E F0 +2.743(,i)C 2.743(sa)-2.743 G -.25(va)-2.943 G .243 +(ilable, with the same precedence as).25 F F1(==)2.743 E F0(and)2.743 E +F1(!=)2.743 E F0 5.243(.W)C .243(hen it is)-5.243 F .182 +(used, the string to the right of the operator is considered a POSIX e) +144 493.2 R .182(xtended re)-.15 F .182(gular e)-.15 F .182 +(xpression and)-.15 F 2.624(matched accordingly \(using the POSIX)144 +505.2 R F2 -.37(re)5.124 G(gcomp)-.03 E F0(and)5.124 E F2 -.37(re)5.124 +G -.1(ge)-.03 G(xec)-.1 E F0(interf)5.123 E 2.623 +(aces usually described in)-.1 F F2 -.37(re)144 517.2 S -.1(ge)-.03 G(x) +-.1 E F0 3.271(\(3\)\). The)B .771(return v)3.271 F .772 +(alue is 0 if the string matches the pattern, and 1 otherwise.)-.25 F +.772(If the re)5.772 F(gular)-.15 E -.15(ex)144 529.2 S .509 +(pression is syntactically incorrect, the conditional e).15 F +(xpression')-.15 E 3.008(sr)-.55 G .508(eturn v)-3.008 F .508 +(alue is 2.)-.25 F .508(If the)5.508 F F1(nocase-)3.008 E(match)144 +541.2 Q F0 1.307 +(shell option is enabled, the match is performed without re)3.806 F -.05 +(ga)-.15 G 1.307(rd to the case of alphabetic).05 F 3.063 +(characters. An)144 553.2 R 3.063(yp)-.15 G .563(art of the pattern may\ + be quoted to force the quoted portion to be matched as a)-3.063 F 2.943 +(string. Brack)144 565.2 R .443(et e)-.1 F .443(xpressions in re)-.15 F +.443(gular e)-.15 F .443(xpressions must be treated carefully)-.15 F +2.944(,s)-.65 G .444(ince normal quoting)-2.944 F .615 +(characters lose their meanings between brack)144 577.2 R 3.115(ets. If) +-.1 F .614(the pattern is stored in a shell v)3.115 F .614 +(ariable, quot-)-.25 F(ing the v)144 589.2 Q(ariable e)-.25 E +(xpansion forces the entire pattern to be matched as a string.)-.15 E +.838(The pattern will match if it matches an)144 607.2 R 3.338(yp)-.15 G +.838(art of the string.)-3.338 F .839(Anchor the pattern using the)5.839 +F F1(^)3.339 E F0(and)3.339 E F1($)3.339 E F0(re)144 619.2 Q .847 +(gular e)-.15 F .846 +(xpression operators to force it to match the entire string.)-.15 F .846 +(The array v)5.846 F(ariable)-.25 E F3 -.27(BA)3.346 G(SH_RE-).27 E(MA) +144 631.2 Q(TCH)-.855 E F0 .321 +(records which parts of the string matched the pattern.)2.571 F .322 +(The element of)5.322 F F3 -.27(BA)2.822 G(SH_REMA).27 E(TCH)-.855 E F0 +.583(with inde)144 643.2 R 3.083(x0)-.15 G .582 +(contains the portion of the string matching the entire re)-.001 F .582 +(gular e)-.15 F 3.082(xpression. Substrings)-.15 F .249 +(matched by parenthesized sube)144 655.2 R .249 +(xpressions within the re)-.15 F .249(gular e)-.15 F .249 +(xpression are sa)-.15 F -.15(ve)-.2 G 2.749(di).15 G 2.75(nt)-2.749 G +.25(he remaining)-2.75 F F3 -.27(BA)144 667.2 S(SH_REMA).27 E(TCH)-.855 +E F0 1.13(indices. The element of)3.38 F F3 -.27(BA)3.63 G(SH_REMA).27 E +(TCH)-.855 E F0 1.13(with inde)3.38 F(x)-.15 E F2(n)3.63 E F0 1.13 +(is the portion of the)3.63 F(string matching the)144 679.2 Q F2(n)2.5 E +F0(th parenthesized sube)A(xpression.)-.15 E .785 +(Expressions may be combined using the follo)144 697.2 R .786 +(wing operators, listed in decreasing order of prece-)-.25 F(dence:)144 +709.2 Q(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(5)195.395 E 0 Cg +EP +%%Page: 6 6 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(\()144 84 Q/F2 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E(ession)-.37 +E F1(\))2.5 E F0 .523(Returns the v)180 96 R .522(alue of)-.25 F F2 -.2 +(ex)3.022 G(pr).2 E(ession)-.37 E F0 5.522(.T)C .522 +(his may be used to o)-5.522 F -.15(ve)-.15 G .522 +(rride the normal precedence of).15 F(operators.)180 108 Q F1(!)144 120 +Q F2 -.2(ex)2.5 G(pr).2 E(ession)-.37 E F0 -.35(Tr)180 132 S(ue if).35 E +F2 -.2(ex)2.5 G(pr).2 E(ession)-.37 E F0(is f)2.74 E(alse.)-.1 E F2 -.2 +(ex)144 144 S(pr).2 E(ession1)-.37 E F1(&&)2.5 E F2 -.2(ex)2.5 G(pr).2 E +(ession2)-.37 E F0 -.35(Tr)180 156 S(ue if both).35 E F2 -.2(ex)2.5 G +(pr).2 E(ession1)-.37 E F0(and)2.5 E F2 -.2(ex)2.5 G(pr).2 E(ession2) +-.37 E F0(are true.)2.52 E F2 -.2(ex)144 168 S(pr).2 E(ession1)-.37 E F1 +(||)2.5 E F2 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F0 -.35(Tr)180 180 S +(ue if either).35 E F2 -.2(ex)2.5 G(pr).2 E(ession1)-.37 E F0(or)2.5 E +F2 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F0(is true.)2.52 E(The)144 196.8 +Q F1(&&)2.675 E F0(and)2.675 E F1(||)2.675 E F0 .175(operators do not e) +2.675 F -.25(va)-.25 G(luate).25 E F2 -.2(ex)2.675 G(pr).2 E(ession2) +-.37 E F0 .175(if the v)2.675 F .175(alue of)-.25 F F2 -.2(ex)2.676 G +(pr).2 E(ession1)-.37 E F0 .176(is suf)2.676 F .176(\214cient to de-) +-.25 F(termine the return v)144 208.8 Q +(alue of the entire conditional e)-.25 E(xpression.)-.15 E F1 -.25(fo) +108 225.6 S(r).25 E F2(name)2.5 E F0 2.5([[)2.5 G F1(in)A F0([)2.5 E F2 +(wor)2.5 E 2.5(d.)-.37 G(..)-2.5 E F0 2.5(]];])2.5 G F1(do)A F2(list)2.5 +E F0(;)2.5 E F1(done)2.5 E F0 .424(The list of w)144 237.6 R .424 +(ords follo)-.1 F(wing)-.25 E F1(in)2.924 E F0 .423(is e)2.924 F .423 +(xpanded, generating a list of items.)-.15 F .423(The v)5.423 F(ariable) +-.25 E F2(name)2.923 E F0 .423(is set to)2.923 F .653 +(each element of this list in turn, and)144 249.6 R F2(list)3.153 E F0 +.653(is e)3.153 F -.15(xe)-.15 G .653(cuted each time.).15 F .653 +(If the)5.653 F F1(in)3.153 E F2(wor)3.153 E(d)-.37 E F0 .653 +(is omitted, the)3.153 F F1 -.25(fo)3.153 G(r).25 E F0 .649(command e) +144 261.6 R -.15(xe)-.15 G(cutes).15 E F2(list)3.149 E F0 .648 +(once for each positional parameter that is set \(see)3.148 F/F3 9 +/Times-Bold@0 SF -.666(PA)3.148 G(RAMETERS).666 E F0(belo)2.898 E(w\).) +-.25 E .153(The return status is the e)144 273.6 R .153 +(xit status of the last command that e)-.15 F -.15(xe)-.15 G 2.654 +(cutes. If).15 F .154(the e)2.654 F .154(xpansion of the items)-.15 F +(follo)144 285.6 Q(wing)-.25 E F1(in)2.5 E F0 +(results in an empty list, no commands are e)2.5 E -.15(xe)-.15 G +(cuted, and the return status is 0.).15 E F1 -.25(fo)108 302.4 S(r).25 E +F0(\(\()2.5 E F2 -.2(ex)2.5 G(pr1).2 E F0(;)2.5 E F2 -.2(ex)2.5 G(pr2).2 +E F0(;)2.5 E F2 -.2(ex)2.5 G(pr3).2 E F0(\)\) ;)2.5 E F1(do)2.5 E F2 +(list)2.5 E F0(;)2.5 E F1(done)2.5 E F0 1.236(First, the arithmetic e) +144 314.4 R(xpression)-.15 E F2 -.2(ex)3.736 G(pr1).2 E F0 1.235(is e) +3.736 F -.25(va)-.25 G 1.235 +(luated according to the rules described belo).25 F 3.735(wu)-.25 G +(nder)-3.735 E F3 .561(ARITHMETIC EV)144 326.4 R(ALU)-1.215 E -.855(AT) +-.54 G(ION).855 E/F4 9/Times-Roman@0 SF(.)A F0 .561(The arithmetic e) +5.061 F(xpression)-.15 E F2 -.2(ex)3.061 G(pr2).2 E F0 .562(is then e) +3.062 F -.25(va)-.25 G .562(luated repeatedly until).25 F .592(it e)144 +338.4 R -.25(va)-.25 G .592(luates to zero.).25 F .592(Each time)5.592 F +F2 -.2(ex)3.092 G(pr2).2 E F0 -.25(eva)3.092 G .592 +(luates to a non-zero v).25 F(alue,)-.25 E F2(list)3.092 E F0 .591(is e) +3.092 F -.15(xe)-.15 G .591(cuted and the arith-).15 F .228(metic e)144 +350.4 R(xpression)-.15 E F2 -.2(ex)2.728 G(pr3).2 E F0 .229(is e)2.728 F +-.25(va)-.25 G 2.729(luated. If).25 F(an)2.729 E 2.729(ye)-.15 G .229 +(xpression is omitted, it beha)-2.879 F -.15(ve)-.2 G 2.729(sa).15 G +2.729(si)-2.729 G 2.729(fi)-2.729 G 2.729(te)-2.729 G -.25(va)-2.979 G +.229(luates to 1.).25 F .228(The return v)144 362.4 R .228 +(alue is the e)-.25 F .228(xit status of the last command in)-.15 F F2 +(list)2.728 E F0 .227(that is e)2.728 F -.15(xe)-.15 G .227(cuted, or f) +.15 F .227(alse if an)-.1 F 2.727(yo)-.15 G 2.727(ft)-2.727 G(he)-2.727 +E -.15(ex)144 374.4 S(pressions is in).15 E -.25(va)-.4 G(lid.).25 E F1 +(select)108 391.2 Q F2(name)2.5 E F0([)2.5 E F1(in)2.5 E F2(wor)2.5 E(d) +-.37 E F0 2.5(];)2.5 G F1(do)A F2(list)2.5 E F0(;)2.5 E F1(done)2.5 E F0 +.432(The list of w)144 403.2 R .432(ords follo)-.1 F(wing)-.25 E F1(in) +2.932 E F0 .432(is e)2.932 F .432(xpanded, generating a list of items.) +-.15 F .433(The set of e)5.433 F .433(xpanded w)-.15 F(ords)-.1 E .843 +(is printed on the standard error)144 415.2 R 3.342(,e)-.4 G .842 +(ach preceded by a number)-3.342 F 5.842(.I)-.55 G 3.342(ft)-5.842 G(he) +-3.342 E F1(in)3.342 E F2(wor)3.342 E(d)-.37 E F0 .842 +(is omitted, the posi-)3.342 F .201(tional parameters are printed \(see) +144 427.2 R F3 -.666(PA)2.701 G(RAMETERS).666 E F0(belo)2.451 E 2.701 +(w\). The)-.25 F F3(PS3)2.701 E F0 .201(prompt is then displayed and a) +2.451 F .214(line read from the standard input.)144 439.2 R .213 +(If the line consists of a number corresponding to one of the dis-)5.214 +F 1.537(played w)144 451.2 R 1.537(ords, then the v)-.1 F 1.537(alue of) +-.25 F F2(name)4.397 E F0 1.537(is set to that w)4.217 F 4.037(ord. If) +-.1 F 1.538(the line is empty)4.038 F 4.038(,t)-.65 G 1.538(he w)-4.038 +F 1.538(ords and)-.1 F .066(prompt are displayed ag)144 463.2 R 2.566 +(ain. If)-.05 F .065(EOF is read, the command completes.)2.566 F(An) +5.065 E 2.565(yo)-.15 G .065(ther v)-2.565 F .065(alue read causes)-.25 +F F2(name)144.36 475.2 Q F0 .953(to be set to null.)3.633 F .953 +(The line read is sa)5.953 F -.15(ve)-.2 G 3.454(di).15 G 3.454(nt) +-3.454 G .954(he v)-3.454 F(ariable)-.25 E F3(REPL)3.454 E(Y)-.828 E F4 +(.)A F0(The)5.454 E F2(list)3.544 E F0 .954(is e)4.134 F -.15(xe)-.15 G +.954(cuted after).15 F .072(each selection until a)144 487.2 R F1(br) +2.571 E(eak)-.18 E F0 .071(command is e)2.571 F -.15(xe)-.15 G 2.571 +(cuted. The).15 F -.15(ex)2.571 G .071(it status of).15 F F1(select) +2.571 E F0 .071(is the e)2.571 F .071(xit status of the)-.15 F +(last command e)144 499.2 Q -.15(xe)-.15 G(cuted in).15 E F2(list)2.59 E +F0 2.5(,o).68 G 2.5(rz)-2.5 G(ero if no commands were e)-2.5 E -.15(xe) +-.15 G(cuted.).15 E F1(case)108 516 Q F2(wor)2.5 E(d)-.37 E F1(in)2.5 E +F0 2.5([[)2.5 G(\(])-2.5 E F2(pattern)2.5 E F0([)2.5 E F1(|)2.5 E F2 +(pattern)2.5 E F0 2.5(].)2.5 G(.. \))-2.5 E F2(list)2.5 E F0(;; ] ...) +2.5 E F1(esac)2.5 E F0(A)144 528 Q F1(case)3.264 E F0 .764 +(command \214rst e)3.264 F(xpands)-.15 E F2(wor)3.264 E(d)-.37 E F0 +3.264(,a)C .764(nd tries to match it ag)-3.264 F .764(ainst each)-.05 F +F2(pattern)3.264 E F0 .765(in turn, using the)3.264 F .884 +(matching rules described under)144 540 R F1 -.1(Pa)3.384 G(tter).1 E +3.384(nM)-.15 G(atching)-3.384 E F0(belo)3.384 E 4.684 -.65(w. T)-.25 H +(he).65 E F2(wor)3.384 E(d)-.37 E F0 .884(is e)3.384 F .883 +(xpanded using tilde e)-.15 F(x-)-.15 E .95(pansion, parameter and v)144 +552 R .95(ariable e)-.25 F .95(xpansion, arithmetic e)-.15 F .95 +(xpansion, command substitution, process)-.15 F .181 +(substitution and quote remo)144 564 R -.25(va)-.15 G 2.681(l. Each).25 +F F2(pattern)2.681 E F0 -.15(ex)2.681 G .181(amined is e).15 F .181 +(xpanded using tilde e)-.15 F .18(xpansion, param-)-.15 F .103 +(eter and v)144 576 R .103(ariable e)-.25 F .103(xpansion, arithmetic e) +-.15 F .103(xpansion, command substitution, and process substitution.) +-.15 F .687(If the)144 588 R F1(nocasematch)3.187 E F0 .687 +(shell option is enabled, the match is performed without re)3.187 F -.05 +(ga)-.15 G .687(rd to the case of).05 F .464(alphabetic characters.)144 +600 R .464(When a match is found, the corresponding)5.464 F F2(list) +2.964 E F0 .464(is e)2.964 F -.15(xe)-.15 G 2.964(cuted. If).15 F(the) +2.964 E F1(;;)2.964 E F0(opera-)2.964 E .675(tor is used, no subsequent\ + matches are attempted after the \214rst pattern match.)144 612 R(Using) +5.674 E F1(;&)3.174 E F0 .674(in place)3.174 F(of)144 624 Q F1(;;)2.866 +E F0 .366(causes e)2.866 F -.15(xe)-.15 G .366 +(cution to continue with the).15 F F2(list)2.866 E F0 .367 +(associated with the ne)2.866 F .367(xt set of patterns.)-.15 F(Using) +5.367 E F1(;;&)2.867 E F0 .596(in place of)144 636 R F1(;;)3.096 E F0 +.596(causes the shell to test the ne)3.096 F .595 +(xt pattern list in the statement, if an)-.15 F 1.895 -.65(y, a)-.15 H +.595(nd e).65 F -.15(xe)-.15 G .595(cute an).15 F(y)-.15 E(associated) +144 648 Q F2(list)2.96 E F0 .461 +(on a successful match, continuing the case statement e)2.96 F -.15(xe) +-.15 G .461(cution as if the pattern list).15 F .677(had not matched.) +144 660 R .677(The e)5.677 F .677 +(xit status is zero if no pattern matches.)-.15 F .676 +(Otherwise, it is the e)5.677 F .676(xit status of)-.15 F +(the last command e)144 672 Q -.15(xe)-.15 G(cuted in).15 E F2(list)2.5 +E F0(.)A F1(if)108 688.8 Q F2(list)2.5 E F0(;)A F1(then)2.5 E F2(list) +2.5 E F0 2.5(;[)C F1(elif)A F2(list)2.5 E F0(;)A F1(then)2.5 E F2(list) +2.5 E F0 2.5(;].)C(.. [)-2.5 E F1(else)2.5 E F2(list)2.5 E F0 2.5(;])C +F1<8c>A F0(The)144 700.8 Q F1(if)2.977 E F2(list)3.067 E F0 .478(is e) +3.658 F -.15(xe)-.15 G 2.978(cuted. If).15 F .478(its e)2.978 F .478 +(xit status is zero, the)-.15 F F1(then)2.978 E F2(list)2.978 E F0 .478 +(is e)2.978 F -.15(xe)-.15 G 2.978(cuted. Otherwise,).15 F(each)2.978 E +F1(elif)2.978 E F2(list)2.978 E F0 1.088(is e)144 712.8 R -.15(xe)-.15 G +1.088(cuted in turn, and if its e).15 F 1.087 +(xit status is zero, the corresponding)-.15 F F1(then)3.587 E F2(list) +3.587 E F0 1.087(is e)3.587 F -.15(xe)-.15 G 1.087(cuted and the).15 F +1.239(command completes.)144 724.8 R 1.239(Otherwise, the)6.239 F F1 +(else)3.739 E F2(list)3.739 E F0 1.239(is e)3.739 F -.15(xe)-.15 G 1.239 +(cuted, if present.).15 F 1.24(The e)6.239 F 1.24(xit status is the e) +-.15 F(xit)-.15 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(6) +195.395 E 0 Cg EP +%%Page: 7 7 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E +(status of the last command e)144 84 Q -.15(xe)-.15 G +(cuted, or zero if no condition tested true.).15 E/F1 10/Times-Bold@0 SF +(while)108 100.8 Q/F2 10/Times-Italic@0 SF(list-1)2.5 E F0(;)A F1(do)2.5 +E F2(list-2)2.5 E F0(;)A F1(done)2.5 E(until)108 112.8 Q F2(list-1)2.5 E +F0(;)A F1(do)2.5 E F2(list-2)2.5 E F0(;)A F1(done)2.5 E F0(The)144 124.8 +Q F1(while)3.45 E F0 .95(command continuously e)3.45 F -.15(xe)-.15 G +.95(cutes the list).15 F F2(list-2)3.45 E F0 .95 +(as long as the last command in the list)3.45 F F2(list-1)144 136.8 Q F0 +.205(returns an e)2.705 F .205(xit status of zero.)-.15 F(The)5.205 E F1 +(until)2.705 E F0 .205(command is identical to the)2.705 F F1(while) +2.705 E F0 .205(command, e)2.705 F(xcept)-.15 E .6(that the test is ne) +144 148.8 R -.05(ga)-.15 G(ted:).05 E F2(list-2)3.19 E F0 .6(is e)3.12 F +-.15(xe)-.15 G .599(cuted as long as the last command in).15 F F2 +(list-1)3.189 E F0 .599(returns a non-zero)3.099 F -.15(ex)144 160.8 S +.204(it status.).15 F .204(The e)5.204 F .204(xit status of the)-.15 F +F1(while)2.704 E F0(and)2.704 E F1(until)2.704 E F0 .205 +(commands is the e)2.704 F .205(xit status of the last command)-.15 F +-.15(exe)144 172.8 S(cuted in).15 E F2(list-2)2.5 E F0 2.5(,o)C 2.5(rz) +-2.5 G(ero if none w)-2.5 E(as e)-.1 E -.15(xe)-.15 G(cuted.).15 E F1 +(Copr)87 189.6 Q(ocesses)-.18 E F0(A)108 201.6 Q F2(copr)3.713 E(ocess) +-.45 E F0 1.213(is a shell command preceded by the)3.713 F F1(copr)3.712 +E(oc)-.18 E F0(reserv)3.712 E 1.212(ed w)-.15 F 3.712(ord. A)-.1 F 1.212 +(coprocess is e)3.712 F -.15(xe)-.15 G 1.212(cuted asyn-).15 F .574(chr\ +onously in a subshell, as if the command had been terminated with the) +108 213.6 R F1(&)3.075 E F0 .575(control operator)3.075 F 3.075(,w)-.4 G +.575(ith a tw)-3.075 F(o-)-.1 E -.1(wa)108 225.6 S 2.5(yp).1 G +(ipe established between the e)-2.5 E -.15(xe)-.15 G +(cuting shell and the coprocess.).15 E(The format for a coprocess is:) +108 242.4 Q F1(copr)144 259.2 Q(oc)-.18 E F0([)2.5 E F2 -.27(NA)C(ME).27 +E F0(])A F2(command)2.5 E F0([)2.5 E F2 -.37(re)C(dir).37 E(ections)-.37 +E F0(])A .709(This creates a coprocess named)108 276 R F2 -.27(NA)3.208 +G(ME).27 E F0 5.708(.I)C(f)-5.708 E F2 -.27(NA)3.208 G(ME).27 E F0 .708 +(is not supplied, the def)3.208 F .708(ault name is)-.1 F F1(COPR)3.208 +E(OC)-.3 E F0(.)A F2 -.27(NA)5.708 G(ME).27 E F0 .64 +(must not be supplied if)108 288 R F2(command)3.14 E F0 .64(is a)3.14 F +F2 .64(simple command)3.14 F F0 .64(\(see abo)3.14 F -.15(ve)-.15 G .64 +(\); otherwise, it is interpreted as the \214rst).15 F -.1(wo)108 300 S +.349(rd of the simple command.).1 F .348(When the coprocess is e)5.348 F +-.15(xe)-.15 G .348(cuted, the shell creates an array v).15 F .348 +(ariable \(see)-.25 F F1(Ar)2.848 E(-)-.37 E(rays)108 312 Q F0(belo) +3.095 E .595(w\) named)-.25 F F2 -.27(NA)3.095 G(ME).27 E F0 .595 +(in the conte)3.095 F .595(xt of the e)-.15 F -.15(xe)-.15 G .595 +(cuting shell.).15 F .596(The standard output of)5.595 F F2(command) +3.296 E F0 .596(is con-)3.866 F .387 +(nected via a pipe to a \214le descriptor in the e)108 324 R -.15(xe) +-.15 G .387(cuting shell, and that \214le descriptor is assigned to).15 +F F2 -.27(NA)2.886 G(ME).27 E F0([0].)A .57(The standard input of)108 +336 R F2(command)3.27 E F0 .571 +(is connected via a pipe to a \214le descriptor in the e)3.84 F -.15(xe) +-.15 G .571(cuting shell, and that).15 F 1.221 +(\214le descriptor is assigned to)108 348 R F2 -.27(NA)3.721 G(ME).27 E +F0 3.721([1]. This)B 1.221(pipe is established before an)3.721 F 3.72 +(yr)-.15 G 1.22(edirections speci\214ed by the)-3.72 F 1.58 +(command \(see)108 360 R/F3 9/Times-Bold@0 SF(REDIRECTION)4.08 E F0 +(belo)3.83 E 4.08(w\). The)-.25 F 1.581 +(\214le descriptors can be utilized as ar)4.08 F 1.581 +(guments to shell com-)-.18 F .149 +(mands and redirections using standard w)108 372 R .149(ord e)-.1 F +2.649(xpansions. Other)-.15 F .148(than those created to e)2.649 F -.15 +(xe)-.15 G .148(cute command and).15 F 2.462 +(process substitutions, the \214le descriptors are not a)108 384 R -.25 +(va)-.2 G 2.463(ilable in subshells.).25 F 2.463 +(The process ID of the shell)7.463 F(spa)108 396 Q 1.115(wned to e)-.15 +F -.15(xe)-.15 G 1.115(cute the coprocess is a).15 F -.25(va)-.2 G 1.115 +(ilable as the v).25 F 1.115(alue of the v)-.25 F(ariable)-.25 E F2 -.27 +(NA)3.615 G(ME).27 E F0 3.615(_PID. The)B F1(wait)3.615 E F0 -.2(bu) +3.615 G(iltin).2 E(command may be used to w)108 408 Q +(ait for the coprocess to terminate.)-.1 E .336 +(Since the coprocess is created as an asynchronous command, the)108 +424.8 R F1(copr)2.836 E(oc)-.18 E F0 .336(command al)2.836 F -.1(wa)-.1 +G .336(ys returns success.).1 F +(The return status of a coprocess is the e)108 436.8 Q(xit status of) +-.15 E F2(command)2.5 E F0(.)A F1(Shell Function De\214nitions)87 453.6 +Q F0 2.698(As)108 465.6 S .198 +(hell function is an object that is called lik)-2.698 F 2.698(eas)-.1 G +.198(imple command and e)-2.698 F -.15(xe)-.15 G .197 +(cutes a compound command with).15 F 2.5(an)108 477.6 S .5 -.25(ew s) +-2.5 H(et of positional parameters.).25 E +(Shell functions are declared as follo)5 E(ws:)-.25 E F2(fname)108 494.4 +Q F0(\(\))2.5 E F2(compound\255command)2.5 E F0([)2.5 E F2 -.37(re)C +(dir).37 E(ection)-.37 E F0(])A F1(function)108 506.4 Q F2(fname)2.5 E +F0([\(\)])2.5 E F2(compound\255command)2.5 E F0([)2.5 E F2 -.37(re)C +(dir).37 E(ection)-.37 E F0(])A .216(This de\214nes a function named)144 +518.4 R F2(fname)2.716 E F0 5.217(.T)C .217(he reserv)-5.217 F .217 +(ed w)-.15 F(ord)-.1 E F1(function)2.717 E F0 .217(is optional.)2.717 F +.217(If the)5.217 F F1(function)2.717 E F0(re-)2.717 E(serv)144 530.4 Q +.68(ed w)-.15 F .68(ord is supplied, the parentheses are optional.)-.1 F +(The)5.68 E F2(body)3.18 E F0 .68(of the function is the compound)3.18 F +(command)144 542.4 Q F2(compound\255command)2.784 E F0(\(see)3.354 E F1 +.084(Compound Commands)2.584 F F0(abo)2.584 E -.15(ve)-.15 G 2.584 +(\). That).15 F .084(command is usually a)2.584 F F2(list)144 554.4 Q F0 +.044(of commands between { and }, b)2.544 F .044(ut may be an)-.2 F +2.544(yc)-.15 G .044(ommand listed under)-2.544 F F1 .044 +(Compound Commands)2.544 F F0(abo)144 566.4 Q -.15(ve)-.15 G 2.901(,w) +.15 G .401(ith one e)-2.901 F .401(xception: If the)-.15 F F1(function) +2.901 E F0(reserv)2.901 E .401(ed w)-.15 F .401(ord is used, b)-.1 F +.402(ut the parentheses are not sup-)-.2 F 1.046 +(plied, the braces are required.)144 578.4 R F2(compound\255command) +6.046 E F0 1.046(is e)3.546 F -.15(xe)-.15 G 1.046(cuted whene).15 F +-.15(ve)-.25 G(r).15 E F2(fname)3.546 E F0 1.045(is speci\214ed as)3.546 +F .365(the name of a simple command.)144 590.4 R .365(When in)5.365 F F2 +.366(posix mode)2.865 F F0(,)A F2(fname)2.866 E F0 .366(must be a v) +2.866 F .366(alid shell)-.25 F F2(name)2.866 E F0 .366(and may)2.866 F +.894(not be the name of one of the POSIX)144 602.4 R F2 .893(special b) +3.393 F(uiltins)-.2 E F0 5.893(.I)C 3.393(nd)-5.893 G(ef)-3.393 E .893 +(ault mode, a function name can be)-.1 F(an)144 614.4 Q 3.649(yu)-.15 G +1.149(nquoted shell w)-3.649 F 1.15(ord that does not contain)-.1 F F1 +($)3.65 E F0 6.15(.A)C 1.45 -.15(ny r)-6.15 H 1.15(edirections \(see).15 +F F3(REDIRECTION)3.65 E F0(belo)3.4 E(w\))-.25 E .417(speci\214ed when \ +a function is de\214ned are performed when the function is e)144 626.4 R +-.15(xe)-.15 G 2.916(cuted. The).15 F -.15(ex)2.916 G .416(it status).15 +F .733(of a function de\214nition is zero unless a syntax error occurs \ +or a readonly function with the same)144 638.4 R .178(name already e)144 +650.4 R 2.678(xists. When)-.15 F -.15(exe)2.678 G .178(cuted, the e).15 +F .178(xit status of a function is the e)-.15 F .177 +(xit status of the last com-)-.15 F(mand e)144 662.4 Q -.15(xe)-.15 G +(cuted in the body).15 E 5(.\()-.65 G(See)-5 E F3(FUNCTIONS)2.5 E F0 +(belo)2.25 E -.65(w.)-.25 G(\)).65 E/F4 10.95/Times-Bold@0 SF(COMMENTS) +72 679.2 Q F0 .982(In a non-interacti)108 691.2 R 1.282 -.15(ve s)-.25 H +.982(hell, or an interacti).15 F 1.282 -.15(ve s)-.25 H .982 +(hell in which the).15 F F1(interacti)3.482 E -.1(ve)-.1 G(_comments).1 +E F0 .982(option to the)3.482 F F1(shopt)3.482 E F0 -.2(bu)108 703.2 S +.952(iltin is enabled \(see).2 F F3 .952(SHELL B)3.452 F(UIL)-.09 E .952 +(TIN COMMANDS)-.828 F F0(belo)3.202 E .952(w\), a w)-.25 F .952(ord be) +-.1 F .952(ginning with)-.15 F F1(#)3.451 E F0 .951(causes that w)3.451 +F(ord)-.1 E .604 +(and all remaining characters on that line to be ignored.)108 715.2 R +.605(An interacti)5.605 F .905 -.15(ve s)-.25 H .605(hell without the) +.15 F F1(interacti)3.105 E -.1(ve)-.1 G(_com-).1 E(ments)108 727.2 Q F0 +1.337(option enabled does not allo)3.837 F 3.837(wc)-.25 G 3.836 +(omments. The)-3.837 F F1(interacti)3.836 E -.1(ve)-.1 G(_comments).1 E +F0 1.336(option is on by def)3.836 F 1.336(ault in)-.1 F(GNU Bash 5.1)72 +768 Q(2020 October 29)141.235 E(7)195.395 E 0 Cg EP +%%Page: 8 8 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(interacti)108 84 Q +.3 -.15(ve s)-.25 H(hells.).15 E/F1 10.95/Times-Bold@0 SF -.11(QU)72 +100.8 S -.438(OT).11 G(ING).438 E/F2 10/Times-Italic@0 SF(Quoting)108 +112.8 Q F0 .477(is used to remo)2.977 F .777 -.15(ve t)-.15 H .477 +(he special meaning of certain characters or w).15 F .477 +(ords to the shell.)-.1 F .478(Quoting can be)5.478 F .185 +(used to disable special treatment for special characters, to pre)108 +124.8 R -.15(ve)-.25 G .185(nt reserv).15 F .184(ed w)-.15 F .184 +(ords from being recognized as)-.1 F(such, and to pre)108 136.8 Q -.15 +(ve)-.25 G(nt parameter e).15 E(xpansion.)-.15 E .288(Each of the)108 +153.6 R F2(metac)2.788 E(har)-.15 E(acter)-.15 E(s)-.1 E F0 .288 +(listed abo)2.788 F .588 -.15(ve u)-.15 H(nder).15 E/F3 9/Times-Bold@0 +SF(DEFINITIONS)2.788 E F0 .288 +(has special meaning to the shell and must be)2.538 F +(quoted if it is to represent itself.)108 165.6 Q 1.345 +(When the command history e)108 182.4 R 1.344(xpansion f)-.15 F 1.344 +(acilities are being used \(see)-.1 F F3(HIST)3.844 E(OR)-.162 E 3.594 +(YE)-.315 G(XP)-3.594 E(ANSION)-.666 E F0(belo)3.594 E 1.344(w\), the) +-.25 F F2(history e)108 194.4 Q(xpansion)-.2 E F0(character)2.5 E 2.5 +(,u)-.4 G(sually)-2.5 E/F4 10/Times-Bold@0 SF(!)2.5 E F0 2.5(,m)C +(ust be quoted to pre)-2.5 E -.15(ve)-.25 G(nt history e).15 E +(xpansion.)-.15 E(There are three quoting mechanisms: the)108 211.2 Q F2 +(escape c)2.69 E(har)-.15 E(acter)-.15 E F0 2.5(,s).73 G +(ingle quotes, and double quotes.)-2.5 E 2.962(An)108 228 S .463 +(on-quoted backslash \()-2.962 F F4(\\)A F0 2.963(\)i)C 2.963(st)-2.963 +G(he)-2.963 E F2 .463(escape c)3.153 F(har)-.15 E(acter)-.15 E F0 5.463 +(.I).73 G 2.963(tp)-5.463 G(reserv)-2.963 E .463(es the literal v)-.15 F +.463(alue of the ne)-.25 F .463(xt character that)-.15 F(follo)108 240 Q +1.554(ws, with the e)-.25 F 1.553(xception of . If)-.25 F(a)4.053 E F4(\\)4.053 E F0( pair appears, and the backslash is not itself)-.25 F .347 +(quoted, the)108 252 R F4(\\)2.847 E F0( is treated as a line continuation \(that is, it is remo)-.25 F +-.15(ve)-.15 G 2.848(df).15 G .348(rom the input stream and ef-)-2.848 F +(fecti)108 264 Q -.15(ve)-.25 G(ly ignored\).).15 E .295 +(Enclosing characters in single quotes preserv)108 280.8 R .295 +(es the literal v)-.15 F .295(alue of each character within the quotes.) +-.25 F 2.795(As)5.295 G(in-)-2.795 E +(gle quote may not occur between single quotes, e)108 292.8 Q -.15(ve) +-.25 G 2.5(nw).15 G(hen preceded by a backslash.)-2.5 E .033 +(Enclosing characters in double quotes preserv)108 309.6 R .034 +(es the literal v)-.15 F .034 +(alue of all characters within the quotes, with the)-.25 F -.15(ex)108 +321.6 S .108(ception of).15 F F4($)2.608 E F0(,)A F4<92>2.608 E F0(,)A +F4(\\)2.608 E F0 2.608(,a)C .107(nd, when history e)-2.608 F .107 +(xpansion is enabled,)-.15 F F4(!)2.607 E F0 5.107(.W)C .107 +(hen the shell is in)-5.107 F F2 .107(posix mode)2.607 F F0 2.607(,t)C +(he)-2.607 E F4(!)2.607 E F0 .107(has no)2.607 F .46 +(special meaning within double quotes, e)108 333.6 R -.15(ve)-.25 G 2.96 +(nw).15 G .46(hen history e)-2.96 F .46(xpansion is enabled.)-.15 F .46 +(The characters)5.46 F F4($)2.96 E F0(and)2.96 E F4<92>2.96 E F0(re-) +2.96 E .563(tain their special meaning within double quotes.)108 345.6 R +.562(The backslash retains its special meaning only when fol-)5.563 F +(lo)108 357.6 Q .601(wed by one of the follo)-.25 F .602 +(wing characters:)-.25 F F4($)3.102 E F0(,)A F4<92>3.102 E F0(,)A F4(") +3.935 E F0(,).833 E F4(\\)3.102 E F0 3.102(,o)C(r)-3.102 E F4() +3.102 E F0 5.602(.A)C .602(double quote may be quoted within)-2.5 F .131 +(double quotes by preceding it with a backslash.)108 369.6 R .131 +(If enabled, history e)5.131 F .13(xpansion will be performed unless an) +-.15 F F4(!)2.63 E F0 +(appearing in double quotes is escaped using a backslash.)108 381.6 Q +(The backslash preceding the)5 E F4(!)2.5 E F0(is not remo)5 E -.15(ve) +-.15 G(d.).15 E(The special parameters)108 398.4 Q F4(*)2.5 E F0(and)2.5 +E F4(@)2.5 E F0(ha)2.5 E .3 -.15(ve s)-.2 H +(pecial meaning when in double quotes \(see).15 E F3 -.666(PA)2.5 G +(RAMETERS).666 E F0(belo)2.25 E(w\).)-.25 E -.8(Wo)108 415.2 S .211 +(rds of the form).8 F F4($)2.711 E F0<08>A F2(string)A F0 2.711<0861>C +.211(re treated specially)-2.711 F 5.211(.T)-.65 G .211(he w)-5.211 F +.211(ord e)-.1 F .212(xpands to)-.15 F F2(string)2.712 E F0 2.712(,w)C +.212(ith backslash-escaped char)-2.712 F(-)-.2 E .605 +(acters replaced as speci\214ed by the ANSI C standard.)108 427.2 R .604 +(Backslash escape sequences, if present, are decoded)5.605 F(as follo) +108 439.2 Q(ws:)-.25 E F4(\\a)144 451.2 Q F0(alert \(bell\))180 451.2 Q +F4(\\b)144 463.2 Q F0(backspace)180 463.2 Q F4(\\e)144 475.2 Q(\\E)144 +487.2 Q F0(an escape character)180 487.2 Q F4(\\f)144 499.2 Q F0 +(form feed)180 499.2 Q F4(\\n)144 511.2 Q F0(ne)180 511.2 Q 2.5(wl)-.25 +G(ine)-2.5 E F4(\\r)144 523.2 Q F0(carriage return)180 523.2 Q F4(\\t) +144 535.2 Q F0(horizontal tab)180 535.2 Q F4(\\v)144 547.2 Q F0 -.15(ve) +180 547.2 S(rtical tab).15 E F4(\\\\)144 559.2 Q F0(backslash)180 559.2 +Q F4<5c08>144 571.2 Q F0(single quote)180 571.2 Q F4(\\")144 583.2 Q F0 +(double quote)180 583.2 Q F4(\\?)144 595.2 Q F0(question mark)180 595.2 +Q F4(\\)144 607.2 Q F2(nnn)A F0(the eight-bit character whose v)180 +607.2 Q(alue is the octal v)-.25 E(alue)-.25 E F2(nnn)2.5 E F0 +(\(one to three octal digits\))2.5 E F4(\\x)144 619.2 Q F2(HH)A F0 +(the eight-bit character whose v)180 619.2 Q(alue is the he)-.25 E +(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0(\(one or tw)2.5 E 2.5(oh) +-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F4(\\u)144 631.2 Q F2(HHHH)A F0 +1.506(the Unicode \(ISO/IEC 10646\) character whose v)180 643.2 R 1.507 +(alue is the he)-.25 F 1.507(xadecimal v)-.15 F(alue)-.25 E F2(HHHH) +4.007 E F0(\(one to four he)180 655.2 Q 2.5(xd)-.15 G(igits\))-2.5 E F4 +(\\U)144 667.2 Q F2(HHHHHHHH)A F0 .548 +(the Unicode \(ISO/IEC 10646\) character whose v)180 679.2 R .547 +(alue is the he)-.25 F .547(xadecimal v)-.15 F(alue)-.25 E F2(HHHHH-) +3.047 E(HHH)180 691.2 Q F0(\(one to eight he)2.5 E 2.5(xd)-.15 G +(igits\))-2.5 E F4(\\c)144 703.2 Q F2(x)A F0 2.5(ac)180 703.2 S(ontrol-) +-2.5 E F2(x)A F0(character)2.5 E(The e)108 720 Q(xpanded result is sing\ +le-quoted, as if the dollar sign had not been present.)-.15 E +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(8)195.395 E 0 Cg EP +%%Page: 9 9 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E 2.64(Ad)108 84 S +.14(ouble-quoted string preceded by a dollar sign \()-2.64 F/F1 10 +/Times-Bold@0 SF($)A F0(")A/F2 10/Times-Italic@0 SF(string)A F0 .14 +("\) will cause the string to be translated according)B .31 +(to the current locale.)108 96 R(The)5.31 E F2 -.1(ge)2.809 G(tte).1 E +(xt)-.2 E F0 .309(infrastructure performs the message catalog lookup an\ +d translation, using)2.809 F(the)108 108 Q F1(LC_MESSA)2.625 E(GES)-.55 +E F0(and)2.625 E F1(TEXTDOMAIN)2.625 E F0 .125(shell v)2.625 F 2.625 +(ariables. If)-.25 F .126(the current locale is)2.626 F F1(C)2.626 E F0 +(or)2.626 E F1(POSIX)2.626 E F0 2.626(,o)C 2.626(ri)-2.626 G 2.626(ft) +-2.626 G(here)-2.626 E .362(are no translations a)108 120 R -.25(va)-.2 +G .362(ilable, the dollar sign is ignored.).25 F .362 +(If the string is translated and replaced, the replace-)5.362 F +(ment is double-quoted.)108 132 Q/F3 10.95/Times-Bold@0 SF -.81(PA)72 +148.8 S(RAMETERS).81 E F0(A)108 160.8 Q F2(par)4.574 E(ameter)-.15 E F0 +.824(is an entity that stores v)4.054 F 3.324(alues. It)-.25 F .824 +(can be a)3.324 F F2(name)3.685 E F0 3.325(,an).18 G(umber)-3.325 E +3.325(,o)-.4 G 3.325(ro)-3.325 G .825(ne of the special characters) +-3.325 F .802(listed belo)108 172.8 R 3.302(wu)-.25 G(nder)-3.302 E F1 +.802(Special P)3.302 F(arameters)-.1 E F0 5.802(.A)C F2(variable)-2.21 E +F0 .802(is a parameter denoted by a)3.482 F F2(name)3.662 E F0 5.801(.A) +.18 G -.25(va)-2.5 G .801(riable has a).25 F F2(value)108 184.8 Q F0 +.368(and zero or more)2.868 F F2(attrib)2.868 E(utes)-.2 E F0 5.369(.A)C +(ttrib)-5.369 E .369(utes are assigned using the)-.2 F F1(declar)2.869 E +(e)-.18 E F0 -.2(bu)2.869 G .369(iltin command \(see).2 F F1(declar) +2.869 E(e)-.18 E F0(belo)108 196.8 Q 2.5(wi)-.25 G(n)-2.5 E/F4 9 +/Times-Bold@0 SF(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E/F5 9 +/Times-Roman@0 SF(\).)A F0 2.755(Ap)108 213.6 S .255 +(arameter is set if it has been assigned a v)-2.755 F 2.754(alue. The) +-.25 F .254(null string is a v)2.754 F .254(alid v)-.25 F 2.754 +(alue. Once)-.25 F 2.754(av)2.754 G .254(ariable is set, it)-3.004 F +(may be unset only by using the)108 225.6 Q F1(unset)2.5 E F0 -.2(bu)2.5 +G(iltin command \(see).2 E F4(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS) +-.828 E F0(belo)2.25 E(w\).)-.25 E(A)108 242.4 Q F2(variable)2.79 E F0 +(may be assigned to by a statement of the form)2.68 E F2(name)144 259.2 +Q F0(=[)A F2(value)A F0(])A(If)108 276 Q F2(value)3.022 E F0 .232 +(is not gi)2.912 F -.15(ve)-.25 G .232(n, the v).15 F .232 +(ariable is assigned the null string.)-.25 F(All)5.233 E F2(values)3.023 +E F0(under)3.003 E .233(go tilde e)-.18 F .233(xpansion, parameter)-.15 +F .515(and v)108 288 R .515(ariable e)-.25 F .515 +(xpansion, command substitution, arithmetic e)-.15 F .515 +(xpansion, and quote remo)-.15 F -.25(va)-.15 G 3.015(l\().25 G(see) +-3.015 E F4(EXP)3.015 E(ANSION)-.666 E F0(belo)108 300 Q 2.698(w\). If) +-.25 F .198(the v)2.698 F .198(ariable has its)-.25 F F1(integer)2.698 E +F0(attrib)2.698 E .198(ute set, then)-.2 F F2(value)2.988 E F0 .198 +(is e)2.878 F -.25(va)-.25 G .199(luated as an arithmetic e).25 F .199 +(xpression e)-.15 F -.15(ve)-.25 G(n).15 E .902(if the $\(\(...\)\) e) +108 312 R .902(xpansion is not used \(see)-.15 F F1 .901 +(Arithmetic Expansion)3.401 F F0(belo)3.401 E 3.401(w\). W)-.25 F .901 +(ord splitting is not performed,)-.8 F 1.178(with the e)108 324 R 1.178 +(xception of)-.15 F F1("$@")3.678 E F0 1.178(as e)3.678 F 1.179 +(xplained belo)-.15 F 3.679(wu)-.25 G(nder)-3.679 E F1 1.179(Special P) +3.679 F(arameters)-.1 E F0 6.179(.P)C 1.179(athname e)-6.329 F 1.179 +(xpansion is not)-.15 F 3.649(performed. Assignment)108 336 R 1.149 +(statements may also appear as ar)3.649 F 1.148(guments to the)-.18 F F1 +(alias)3.648 E F0(,)A F1(declar)3.648 E(e)-.18 E F0(,)A F1(typeset)3.648 +E F0(,)A F1(export)3.648 E F0(,)A F1 -.18(re)108 348 S(adonly).18 E F0 +3.288(,a)C(nd)-3.288 E F1(local)3.288 E F0 -.2(bu)3.288 G .788 +(iltin commands \().2 F F2(declar)A(ation)-.15 E F0 3.288 +(commands\). When)3.288 F(in)3.289 E F2 .789(posix mode)3.289 F F0 3.289 +(,t)C .789(hese b)-3.289 F .789(uiltins may)-.2 F 1.496 +(appear in a command after one or more instances of the)108 360 R F1 +(command)3.996 E F0 -.2(bu)3.996 G 1.496 +(iltin and retain these assignment).2 F(statement properties.)108 372 Q +.376(In the conte)108 388.8 R .376 +(xt where an assignment statement is assigning a v)-.15 F .376 +(alue to a shell v)-.25 F .377(ariable or array inde)-.25 F .377 +(x, the +=)-.15 F 1.631 +(operator can be used to append to or add to the v)108 400.8 R(ariable') +-.25 E 4.13(sp)-.55 G(re)-4.13 E 1.63(vious v)-.25 F 4.13(alue. This) +-.25 F 1.63(includes ar)4.13 F 1.63(guments to)-.18 F -.2(bu)108 412.8 S +.163(iltin commands such as).2 F F1(declar)2.664 E(e)-.18 E F0 .164 +(that accept assignment statements \()2.664 F F2(declar)A(ation)-.15 E +F0 2.664(commands\). When)2.664 F .164(+= is)2.664 F .252 +(applied to a v)108 424.8 R .252(ariable for which the)-.25 F F2(inte) +2.752 E -.1(ge)-.4 G(r).1 E F0(attrib)2.752 E .252(ute has been set,)-.2 +F F2(value)2.752 E F0 .251(is e)2.751 F -.25(va)-.25 G .251 +(luated as an arithmetic e).25 F(xpres-)-.15 E .05 +(sion and added to the v)108 436.8 R(ariable')-.25 E 2.55(sc)-.55 G .05 +(urrent v)-2.55 F .05(alue, which is also e)-.25 F -.25(va)-.25 G 2.55 +(luated. When).25 F .05(+= is applied to an array v)2.55 F(ari-)-.25 E +.459(able using compound assignment \(see)108 448.8 R F1(Arrays)2.959 E +F0(belo)2.959 E .459(w\), the v)-.25 F(ariable')-.25 E 2.959(sv)-.55 G +.459(alue is not unset \(as it is when using)-3.209 F .265(=\), and ne) +108 460.8 R 2.765(wv)-.25 G .265(alues are appended to the array be) +-3.015 F .265(ginning at one greater than the array')-.15 F 2.765(sm) +-.55 G .265(aximum inde)-2.765 F 2.765(x\()-.15 G(for)-2.765 E(inde)108 +472.8 Q -.15(xe)-.15 G 3.402(da).15 G .902 +(rrays\) or added as additional k)-3.402 F -.15(ey)-.1 G.15 E .901 +(alue pairs in an associati)-.25 F 1.201 -.15(ve a)-.25 H(rray).15 E +5.901(.W)-.65 G .901(hen applied to a string-)-5.901 F -.25(va)108 484.8 +S(lued v).25 E(ariable,)-.25 E F2(value)2.5 E F0(is e)2.5 E +(xpanded and appended to the v)-.15 E(ariable')-.25 E 2.5(sv)-.55 G +(alue.)-2.75 E 3.382(Av)108 501.6 S .882(ariable can be assigned the) +-3.632 F F2(namer)3.382 E(ef)-.37 E F0(attrib)3.382 E .882 +(ute using the)-.2 F F13.382 E F0 .882(option to the)3.382 F F1 +(declar)3.382 E(e)-.18 E F0(or)3.383 E F1(local)3.383 E F0 -.2(bu)3.383 +G .883(iltin com-).2 F .316(mands \(see the descriptions of)108 513.6 R +F1(declar)2.816 E(e)-.18 E F0(and)2.816 E F1(local)2.816 E F0(belo)2.816 +E .316(w\) to create a)-.25 F F2(namer)2.815 E(ef)-.37 E F0 2.815(,o)C +2.815(rar)-2.815 G .315(eference to another v)-2.815 F(ari-)-.25 E 2.918 +(able. This)108 525.6 R(allo)2.918 E .418(ws v)-.25 F .418 +(ariables to be manipulated indirectly)-.25 F 5.419(.W)-.65 G(hene) +-5.419 E -.15(ve)-.25 G 2.919(rt).15 G .419(he nameref v)-2.919 F .419 +(ariable is referenced, as-)-.25 F .133 +(signed to, unset, or has its attrib)108 537.6 R .132 +(utes modi\214ed \(other than using or changing the)-.2 F F2(namer)2.632 +E(ef)-.37 E F0(attrib)2.632 E .132(ute itself\), the)-.2 F 1.356 +(operation is actually performed on the v)108 549.6 R 1.357 +(ariable speci\214ed by the nameref v)-.25 F(ariable')-.25 E 3.857(sv) +-.55 G 3.857(alue. A)-4.107 F 1.357(nameref is)3.857 F .972 +(commonly used within shell functions to refer to a v)108 561.6 R .971 +(ariable whose name is passed as an ar)-.25 F .971(gument to the)-.18 F +2.5(function. F)108 573.6 R(or instance, if a v)-.15 E +(ariable name is passed to a shell function as its \214rst ar)-.25 E +(gument, running)-.18 E/F6 10/Courier@0 SF(declare -n ref=$1)144 591.6 Q +F0 .302(inside the function creates a nameref v)108 609.6 R(ariable)-.25 +E F1 -.18(re)2.803 G(f).18 E F0 .303(whose v)2.803 F .303(alue is the v) +-.25 F .303(ariable name passed as the \214rst ar)-.25 F(gu-)-.18 E +3.592(ment. References)108 621.6 R 1.092(and assignments to)3.592 F F1 +-.18(re)3.592 G(f).18 E F0 3.592(,a)C 1.092(nd changes to its attrib) +-3.592 F 1.092(utes, are treated as references, assign-)-.2 F .143 +(ments, and attrib)108 633.6 R .144(ute modi\214cations to the v)-.2 F +.144(ariable whose name w)-.25 F .144(as passed as)-.1 F F1($1)2.644 E +F0 5.144(.I)C 2.644(ft)-5.144 G .144(he control v)-2.644 F .144 +(ariable in a)-.25 F F1 -.25(fo)108 645.6 S(r).25 E F0 .868 +(loop has the nameref attrib)3.368 F .868(ute, the list of w)-.2 F .867 +(ords can be a list of shell v)-.1 F .867 +(ariables, and a name reference)-.25 F .509 +(will be established for each w)108 657.6 R .509 +(ord in the list, in turn, when the loop is e)-.1 F -.15(xe)-.15 G 3.009 +(cuted. Array).15 F -.25(va)3.009 G .509(riables cannot be).25 F(gi)108 +669.6 Q -.15(ve)-.25 G 3.032(nt).15 G(he)-3.032 E F1(namer)3.032 E(ef) +-.18 E F0(attrib)3.032 E 3.032(ute. Ho)-.2 F(we)-.25 E -.15(ve)-.25 G +1.332 -.4(r, n).15 H .532(ameref v).4 F .531 +(ariables can reference array v)-.25 F .531(ariables and subscripted ar) +-.25 F(-)-.2 E .533(ray v)108 681.6 R 3.033(ariables. Namerefs)-.25 F +.533(can be unset using the)3.033 F F13.033 E F0 .533 +(option to the)3.033 F F1(unset)3.033 E F0 -.2(bu)3.034 G 3.034 +(iltin. Otherwise,).2 F(if)3.034 E F1(unset)3.034 E F0 .534(is e)3.034 F +-.15(xe)-.15 G(-).15 E .443(cuted with the name of a nameref v)108 693.6 +R .442(ariable as an ar)-.25 F .442(gument, the v)-.18 F .442 +(ariable referenced by the nameref v)-.25 F(ariable)-.25 E +(will be unset.)108 705.6 Q(GNU Bash 5.1)72 768 Q(2020 October 29) +141.235 E(9)195.395 E 0 Cg EP +%%Page: 10 10 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF -.2(Po)87 84 S(sitional P).2 E(arameters)-.1 E F0(A)108 96 Q/F2 10 +/Times-Italic@0 SF .705(positional par)4.455 F(ameter)-.15 E F0 .706(is\ + a parameter denoted by one or more digits, other than the single digit\ + 0.)3.935 F(Posi-)5.706 E .445 +(tional parameters are assigned from the shell')108 108 R 2.944(sa)-.55 +G -.18(rg)-2.944 G .444(uments when it is in).18 F -.2(vo)-.4 G -.1(ke) +.2 G .444(d, and may be reassigned using).1 F(the)108 120 Q F1(set)3.333 +E F0 -.2(bu)3.333 G .833(iltin command.).2 F .834(Positional parameters\ + may not be assigned to with assignment statements.)5.833 F(The)5.834 E +(positional parameters are temporarily replaced when a shell function i\ +s e)108 132 Q -.15(xe)-.15 G(cuted \(see).15 E/F3 9/Times-Bold@0 SF +(FUNCTIONS)2.5 E F0(belo)2.25 E(w\).)-.25 E 1.404(When a positional par\ +ameter consisting of more than a single digit is e)108 148.8 R 1.403 +(xpanded, it must be enclosed in)-.15 F(braces \(see)108 160.8 Q F3(EXP) +2.5 E(ANSION)-.666 E F0(belo)2.25 E(w\).)-.25 E F1(Special P)87 177.6 Q +(arameters)-.1 E F0 1.674(The shell treats se)108 189.6 R -.15(ve)-.25 G +1.674(ral parameters specially).15 F 6.675(.T)-.65 G 1.675 +(hese parameters may only be referenced; assignment to)-6.675 F +(them is not allo)108 201.6 Q(wed.)-.25 E F1(*)108 213.6 Q F0 .224 +(Expands to the positional parameters, starting from one.)144 213.6 R +.223(When the e)5.224 F .223(xpansion is not within double)-.15 F .662 +(quotes, each positional parameter e)144 225.6 R .662 +(xpands to a separate w)-.15 F 3.162(ord. In)-.1 F(conte)3.162 E .662 +(xts where it is performed,)-.15 F 1.082(those w)144 237.6 R 1.082 +(ords are subject to further w)-.1 F 1.081(ord splitting and pathname e) +-.1 F 3.581(xpansion. When)-.15 F 1.081(the e)3.581 F(xpansion)-.15 E +.914(occurs within double quotes, it e)144 249.6 R .914 +(xpands to a single w)-.15 F .915(ord with the v)-.1 F .915 +(alue of each parameter sepa-)-.25 F .891 +(rated by the \214rst character of the)144 261.6 R F3(IFS)3.39 E F0 .89 +(special v)3.14 F 3.39(ariable. That)-.25 F .89(is, ")3.39 F F1($*)A F0 +3.39("i)C 3.39(se)-3.39 G(qui)-3.39 E -.25(va)-.25 G .89(lent to ").25 F +F1($1)A F2(c)A F1($2)A F2(c)A F1(...)A F0(",)A(where)144 273.6 Q F2(c) +3.532 E F0 .832(is the \214rst character of the v)3.642 F .832 +(alue of the)-.25 F F3(IFS)3.332 E F0 -.25(va)3.082 G 3.332(riable. If) +.25 F F3(IFS)3.332 E F0 .833(is unset, the parameters are)3.082 F +(separated by spaces.)144 285.6 Q(If)5 E F3(IFS)2.5 E F0 +(is null, the parameters are joined without interv)2.25 E +(ening separators.)-.15 E F1(@)108 297.6 Q F0 .722 +(Expands to the positional parameters, starting from one.)144 297.6 R +.722(In conte)5.722 F .722(xts where w)-.15 F .722(ord splitting is per) +-.1 F(-)-.2 E 1.165(formed, this e)144 309.6 R 1.165 +(xpands each positional parameter to a separate w)-.15 F 1.165 +(ord; if not within double quotes,)-.1 F .655(these w)144 321.6 R .655 +(ords are subject to w)-.1 F .655(ord splitting.)-.1 F .655(In conte) +5.655 F .655(xts where w)-.15 F .654 +(ord splitting is not performed, this)-.1 F -.15(ex)144 333.6 S .748 +(pands to a single w).15 F .748 +(ord with each positional parameter separated by a space.)-.1 F .748 +(When the e)5.748 F(xpan-)-.15 E 1.091 +(sion occurs within double quotes, each parameter e)144 345.6 R 1.091 +(xpands to a separate w)-.15 F 3.59(ord. That)-.1 F 1.09(is, ")3.59 F F1 +($@)A F0 3.59("i)C(s)-3.59 E(equi)144 357.6 Q -.25(va)-.25 G .412 +(lent to ").25 F F1($1)A F0 2.912("")C F1($2)-2.912 E F0 2.912(".)C +2.912(.. If)-2.912 F .413(the double-quoted e)2.913 F .413 +(xpansion occurs within a w)-.15 F .413(ord, the e)-.1 F .413 +(xpansion of)-.15 F .38(the \214rst parameter is joined with the be)144 +369.6 R .379(ginning part of the original w)-.15 F .379(ord, and the e) +-.1 F .379(xpansion of the)-.15 F .771 +(last parameter is joined with the last part of the original w)144 381.6 +R 3.271(ord. When)-.1 F .772(there are no positional pa-)3.271 F +(rameters, ")144 393.6 Q F1($@)A F0 2.5("a)C(nd)-2.5 E F1($@)2.5 E F0 +-.15(ex)2.5 G(pand to nothing \(i.e., the).15 E 2.5(ya)-.15 G(re remo) +-2.5 E -.15(ve)-.15 G(d\).).15 E F1(#)108 405.6 Q F0 +(Expands to the number of positional parameters in decimal.)144 405.6 Q +F1(?)108 417.6 Q F0(Expands to the e)144 417.6 Q +(xit status of the most recently e)-.15 E -.15(xe)-.15 G(cuted fore).15 +E(ground pipeline.)-.15 E F1108 429.6 Q F0 .882 +(Expands to the current option \215ags as speci\214ed upon in)144 429.6 +R -.2(vo)-.4 G .881(cation, by the).2 F F1(set)3.381 E F0 -.2(bu)3.381 G +.881(iltin command, or).2 F(those set by the shell itself \(such as the) +144 441.6 Q F12.5 E F0(option\).)2.5 E F1($)108 453.6 Q F0 .214 +(Expands to the process ID of the shell.)144 453.6 R .214 +(In a \(\) subshell, it e)5.214 F .214 +(xpands to the process ID of the current)-.15 F +(shell, not the subshell.)144 465.6 Q F1(!)108 477.6 Q F0 .499(Expands \ +to the process ID of the job most recently placed into the background, \ +whether e)144 477.6 R -.15(xe)-.15 G(cuted).15 E +(as an asynchronous command or using the)144 489.6 Q F1(bg)2.5 E F0 -.2 +(bu)2.5 G(iltin \(see).2 E F3(JOB CONTR)2.5 E(OL)-.27 E F0(belo)2.25 E +(w\).)-.25 E F1(0)108 501.6 Q F0 .886 +(Expands to the name of the shell or shell script.)144 501.6 R .886 +(This is set at shell initialization.)5.886 F(If)5.887 E F1(bash)3.387 E +F0 .887(is in-)3.387 F -.2(vo)144 513.6 S -.1(ke).2 G 2.668(dw).1 G .168 +(ith a \214le of commands,)-2.668 F F1($0)2.668 E F0 .167 +(is set to the name of that \214le.)2.667 F(If)5.167 E F1(bash)2.667 E +F0 .167(is started with the)2.667 F F12.667 E F0(op-)2.667 E .895 +(tion, then)144 525.6 R F1($0)3.395 E F0 .895(is set to the \214rst ar) +3.395 F .895(gument after the string to be e)-.18 F -.15(xe)-.15 G .896 +(cuted, if one is present.).15 F(Other)5.896 E(-)-.2 E +(wise, it is set to the \214lename used to in)144 537.6 Q -.2(vo)-.4 G +-.1(ke).2 G F1(bash)2.6 E F0 2.5(,a)C 2.5(sg)-2.5 G -2.15 -.25(iv e)-2.5 +H 2.5(nb).25 G 2.5(ya)-2.5 G -.18(rg)-2.5 G(ument zero.).18 E F1 +(Shell V)87 554.4 Q(ariables)-.92 E F0(The follo)108 566.4 Q(wing v)-.25 +E(ariables are set by the shell:)-.25 E F1(_)108 583.2 Q F0 1.526 +(At shell startup, set to the pathname used to in)144 583.2 R -.2(vo)-.4 +G 1.725 -.1(ke t).2 H 1.525(he shell or shell script being e).1 F -.15 +(xe)-.15 G 1.525(cuted as).15 F .173(passed in the en)144 595.2 R .173 +(vironment or ar)-.4 F .173(gument list.)-.18 F(Subsequently)5.173 E +2.673(,e)-.65 G .173(xpands to the last ar)-2.823 F .174 +(gument to the pre-)-.18 F .337(vious simple command e)144 607.2 R -.15 +(xe)-.15 G .337(cuted in the fore).15 F .336(ground, after e)-.15 F +2.836(xpansion. Also)-.15 F .336(set to the full pathname)2.836 F .365 +(used to in)144 619.2 R -.2(vo)-.4 G .565 -.1(ke e).2 H .365 +(ach command e).1 F -.15(xe)-.15 G .366(cuted and placed in the en).15 F +.366(vironment e)-.4 F .366(xported to that command.)-.15 F(When checki\ +ng mail, this parameter holds the name of the mail \214le currently bei\ +ng check)144 631.2 Q(ed.)-.1 E F1 -.3(BA)108 643.2 S(SH).3 E F0 +(Expands to the full \214lename used to in)144 643.2 Q -.2(vo)-.4 G .2 +-.1(ke t).2 H(his instance of).1 E F1(bash)2.5 E F0(.)A F1 -.3(BA)108 +655.2 S(SHOPTS).3 E F0 2.549(Ac)144 667.2 S .049 +(olon-separated list of enabled shell options.)-2.549 F .049(Each w) +5.049 F .049(ord in the list is a v)-.1 F .049(alid ar)-.25 F .049 +(gument for the)-.18 F F12.548 E F0 .115(option to the)144 679.2 R +F1(shopt)2.616 E F0 -.2(bu)2.616 G .116(iltin command \(see).2 F F3 .116 +(SHELL B)2.616 F(UIL)-.09 E .116(TIN COMMANDS)-.828 F F0(belo)2.366 E +2.616(w\). The)-.25 F .116(options ap-)2.616 F 1.067(pearing in)144 +691.2 R F3 -.27(BA)3.567 G(SHOPTS).27 E F0 1.067(are those reported as) +3.317 F F2(on)3.797 E F0(by)3.807 E F1(shopt)3.567 E F0 6.066(.I)C 3.566 +(ft)-6.066 G 1.066(his v)-3.566 F 1.066(ariable is in the en)-.25 F +(vironment)-.4 E(when)144 703.2 Q F1(bash)3.141 E F0 .642(starts up, ea\ +ch shell option in the list will be enabled before reading an)3.141 F +3.142(ys)-.15 G .642(tartup \214les.)-3.142 F(This v)144 715.2 Q +(ariable is read-only)-.25 E(.)-.65 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(10)190.395 E 0 Cg EP +%%Page: 11 11 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF -.3(BA)108 84 S(SHPID).3 E F0 .188 +(Expands to the process ID of the current)144 96 R F1(bash)2.688 E F0 +2.687(process. This)2.687 F(dif)2.687 E .187(fers from)-.25 F F1($$) +2.687 E F0 .187(under certain circum-)2.687 F .548 +(stances, such as subshells that do not require)144 108 R F1(bash)3.048 +E F0 .548(to be re-initialized.)3.048 F .549(Assignments to)5.549 F/F2 9 +/Times-Bold@0 SF -.27(BA)3.049 G(SHPID).27 E F0(ha)144 120 Q .3 -.15 +(ve n)-.2 H 2.5(oe).15 G -.25(ff)-2.5 G 2.5(ect. If).25 F F1 -.3(BA)2.5 +G(SHPID).3 E F0(is unset, it loses its special properties, e)2.5 E -.15 +(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G +(ubsequently reset.)-2.5 E F1 -.3(BA)108 132 S(SH_ALIASES).3 E F0 1.195 +(An associati)144 144 R 1.495 -.15(ve a)-.25 H 1.195(rray v).15 F 1.195 +(ariable whose members correspond to the internal list of aliases as ma\ +in-)-.25 F .16(tained by the)144 156 R F1(alias)2.66 E F0 -.2(bu)2.66 G +2.66(iltin. Elements).2 F .16 +(added to this array appear in the alias list; ho)2.66 F(we)-.25 E -.15 +(ve)-.25 G .96 -.4(r, u).15 H(nsetting).4 E 4.503 +(array elements currently does not cause aliases to be remo)144 168 R +-.15(ve)-.15 G 7.003(df).15 G 4.503(rom the alias list.)-7.003 F(If) +9.502 E F1 -.3(BA)144 180 S(SH_ALIASES).3 E F0 +(is unset, it loses its special properties, e)2.5 E -.15(ve)-.25 G 2.5 +(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.) +-2.5 E F1 -.3(BA)108 192 S(SH_ARGC).3 E F0 .934(An array v)144 204 R +.934(ariable whose v)-.25 F .934 +(alues are the number of parameters in each frame of the current)-.25 F +F1(bash)3.435 E F0 -.15(exe)144 216 S .535(cution call stack.).15 F .535 +(The number of parameters to the current subroutine \(shell function or\ + script)5.535 F -.15(exe)144 228 S .141(cuted with).15 F F1(.)2.641 E F0 +(or)2.641 E F1(sour)2.641 E(ce)-.18 E F0 2.641(\)i)C 2.641(sa)-2.641 G +2.641(tt)-2.641 G .142(he top of the stack.)-2.641 F .142 +(When a subroutine is e)5.142 F -.15(xe)-.15 G .142 +(cuted, the number of).15 F 1.265(parameters passed is pushed onto)144 +240 R F2 -.27(BA)3.765 G(SH_ARGC).27 E/F3 9/Times-Roman@0 SF(.)A F0 +1.265(The shell sets)5.765 F F2 -.27(BA)3.765 G(SH_ARGC).27 E F0 1.265 +(only when in e)3.515 F(x-)-.15 E .947(tended deb)144 252 R .947 +(ugging mode \(see the description of the)-.2 F F1(extdeb)3.447 E(ug)-.2 +E F0 .947(option to the)3.447 F F1(shopt)3.447 E F0 -.2(bu)3.448 G .948 +(iltin belo).2 F(w\).)-.25 E(Setting)144 264 Q F1(extdeb)3.363 E(ug)-.2 +E F0 .863(after the shell has started to e)3.363 F -.15(xe)-.15 G .862 +(cute a script, or referencing this v).15 F .862(ariable when)-.25 F F1 +(extdeb)144 276 Q(ug)-.2 E F0(is not set, may result in inconsistent v) +2.5 E(alues.)-.25 E F1 -.3(BA)108 288 S(SH_ARGV).3 E F0 .206(An array v) +144 300 R .206(ariable containing all of the parameters in the current) +-.25 F F1(bash)2.706 E F0 -.15(exe)2.706 G .207(cution call stack.).15 F +.207(The \214-)5.207 F .567(nal parameter of the last subroutine call i\ +s at the top of the stack; the \214rst parameter of the initial)144 312 +R 1.424(call is at the bottom.)144 324 R 1.424(When a subroutine is e) +6.424 F -.15(xe)-.15 G 1.424 +(cuted, the parameters supplied are pushed onto).15 F F2 -.27(BA)144 336 +S(SH_ARGV).27 E F3(.)A F0 .854(The shell sets)5.354 F F2 -.27(BA)3.354 G +(SH_ARGV).27 E F0 .853(only when in e)3.104 F .853(xtended deb)-.15 F +.853(ugging mode \(see the de-)-.2 F .475(scription of the)144 348 R F1 +(extdeb)2.975 E(ug)-.2 E F0 .475(option to the)2.975 F F1(shopt)2.975 E +F0 -.2(bu)2.975 G .475(iltin belo).2 F 2.975(w\). Setting)-.25 F F1 +(extdeb)2.976 E(ug)-.2 E F0 .476(after the shell has)2.976 F .45 +(started to e)144 360 R -.15(xe)-.15 G .45 +(cute a script, or referencing this v).15 F .45(ariable when)-.25 F F1 +(extdeb)2.95 E(ug)-.2 E F0 .45(is not set, may result in in-)2.95 F +(consistent v)144 372 Q(alues.)-.25 E F1 -.3(BA)108 384 S(SH_ARGV0).3 E +F0 .25(When referenced, this v)144 396 R .25(ariable e)-.25 F .251 +(xpands to the name of the shell or shell script \(identical to)-.15 F +F1($0)2.751 E F0 2.751(;s)C(ee)-2.751 E .041 +(the description of special parameter 0 abo)144 408 R -.15(ve)-.15 G +2.541(\). Assignment).15 F(to)2.541 E F1 -.3(BA)2.541 G(SH_ARGV0).3 E F0 +.04(causes the v)2.541 F .04(alue as-)-.25 F .216 +(signed to also be assigned to)144 420 R F1($0)2.716 E F0 5.216(.I)C(f) +-5.216 E F1 -.3(BA)2.716 G(SH_ARGV0).3 E F0 .216 +(is unset, it loses its special properties, e)2.716 F -.15(ve)-.25 G +2.716(ni).15 G(f)-2.716 E(it is subsequently reset.)144 432 Q F1 -.3(BA) +108 444 S(SH_CMDS).3 E F0 .668(An associati)144 456 R .968 -.15(ve a) +-.25 H .668(rray v).15 F .668(ariable whose members correspond to the i\ +nternal hash table of commands)-.25 F .195(as maintained by the)144 468 +R F1(hash)2.695 E F0 -.2(bu)2.695 G 2.695(iltin. Elements).2 F .196 +(added to this array appear in the hash table; ho)2.696 F(we)-.25 E -.15 +(ve)-.25 G -.4(r,).15 G .852(unsetting array elements currently does no\ +t cause command names to be remo)144 480 R -.15(ve)-.15 G 3.352(df).15 G +.852(rom the hash)-3.352 F 2.5(table. If)144 492 R F1 -.3(BA)2.5 G +(SH_CMDS).3 E F0(is unset, it loses its special properties, e)2.5 E -.15 +(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G +(ubsequently reset.)-2.5 E F1 -.3(BA)108 504 S(SH_COMMAND).3 E F0 1.242 +(The command currently being e)144 516 R -.15(xe)-.15 G 1.243 +(cuted or about to be e).15 F -.15(xe)-.15 G 1.243 +(cuted, unless the shell is e).15 F -.15(xe)-.15 G 1.243(cuting a).15 F +.263(command as the result of a trap, in which case it is the command e) +144 528 R -.15(xe)-.15 G .262(cuting at the time of the trap.).15 F(If) +144 540 Q F1 -.3(BA)2.5 G(SH_COMMAND).3 E F0 +(is unset, it loses its special properties, e)2.5 E -.15(ve)-.25 G 2.5 +(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.) +-2.5 E F1 -.3(BA)108 552 S(SH_EXECUTION_STRING).3 E F0(The command ar) +144 564 Q(gument to the)-.18 E F12.5 E F0(in)2.5 E -.2(vo)-.4 G +(cation option.).2 E F1 -.3(BA)108 576 S(SH_LINENO).3 E F0 .692 +(An array v)144 588 R .692(ariable whose members are the line numbers i\ +n source \214les where each corresponding)-.25 F .97(member of)144 600 R +F2(FUNCN)3.47 E(AME)-.18 E F0 -.1(wa)3.22 G 3.47(si).1 G -1.9 -.4(nv o) +-3.47 H -.1(ke).4 G(d.).1 E F1(${B)5.969 E(ASH_LINENO[)-.3 E/F4 10 +/Times-Italic@0 SF($i)A F1(]})A F0 .969 +(is the line number in the source)3.469 F 14.671(\214le \()144 612 R F1 +(${B)A(ASH_SOURCE[)-.3 E F4($i+1)A F1(]})A F0 17.171(\)w)C(here)-17.171 +E F1(${FUNCN)17.172 E(AME[)-.2 E F4($i)A F1(]})A F0 -.1(wa)17.172 G +17.172(sc).1 G 14.672(alled \(or)-17.172 F F1(${B)144 624 Q(ASH_LINENO[) +-.3 E F4($i-1)A F1(]})A F0 .115 +(if referenced within another shell function\).)2.615 F(Use)5.115 E F2 +(LINENO)2.615 E F0 .115(to obtain the)2.365 F(current line number)144 +636 Q(.)-.55 E F1 -.3(BA)108 648 S(SH_LO).3 E(AD)-.4 E(ABLES_P)-.35 E +-.95(AT)-.74 G(H).95 E F0 4.07(Ac)144 660 S 1.57(olon-separated list of\ + directories in which the shell looks for dynamically loadable b)-4.07 F +(uiltins)-.2 E(speci\214ed by the)144 672 Q F1(enable)2.5 E F0(command.) +2.5 E F1 -.3(BA)108 684 S(SH_REMA).3 E(TCH)-.95 E F0 .006(An array v)144 +696 R .006(ariable whose members are assigned by the)-.25 F F1(=~)2.506 +E F0 .005(binary operator to the)2.506 F F1([[)2.505 E F0 .005 +(conditional com-)2.505 F 2.506(mand. The)144 708 R .007 +(element with inde)2.506 F 2.507(x0i)-.15 G 2.507(st)-2.507 G .007 +(he portion of the string matching the entire re)-2.507 F .007(gular e) +-.15 F(xpression.)-.15 E 4.331(The element with inde)144 720 R(x)-.15 E +F4(n)6.831 E F0 4.331(is the portion of the string matching the)6.831 F +F4(n)6.83 E F0 4.33(th parenthesized)B(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(11)190.395 E 0 Cg EP +%%Page: 12 12 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(sube)144 84 Q +(xpression.)-.15 E/F1 10/Times-Bold@0 SF -.3(BA)108 96 S(SH_SOURCE).3 E +F0 .125(An array v)144 108 R .125(ariable whose members are the source \ +\214lenames where the corresponding shell function)-.25 F .781 +(names in the)144 120 R/F2 9/Times-Bold@0 SF(FUNCN)3.28 E(AME)-.18 E F0 +.78(array v)3.03 F .78(ariable are de\214ned.)-.25 F .78 +(The shell function)5.78 F F1(${FUNCN)3.28 E(AME[)-.2 E/F3 10 +/Times-Italic@0 SF($i)A F1(]})A F0(is)3.28 E(de\214ned in the \214le)144 +132 Q F1(${B)2.5 E(ASH_SOURCE[)-.3 E F3($i)A F1(]})A F0(and called from) +2.5 E F1(${B)2.5 E(ASH_SOURCE[)-.3 E F3($i+1)A F1(]})A F0(.)A F1 -.3(BA) +108 144 S(SH_SUBSHELL).3 E F0 .296 +(Incremented by one within each subshell or subshell en)144 156 R .296 +(vironment when the shell be)-.4 F .297(gins e)-.15 F -.15(xe)-.15 G +(cuting).15 E 1.277(in that en)144 168 R 3.777(vironment. The)-.4 F +1.277(initial v)3.777 F 1.277(alue is 0.)-.25 F(If)6.277 E F1 -.3(BA) +3.777 G(SH_SUBSHELL).3 E F0 1.276(is unset, it loses its special)3.777 F +(properties, e)144 180 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5 +(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F1 -.3(BA)108 192 S +(SH_VERSINFO).3 E F0 2.644(Ar)144 204 S .144(eadonly array v)-2.644 F +.144(ariable whose members hold v)-.25 F .144 +(ersion information for this instance of)-.15 F F1(bash)2.645 E F0 5.145 +(.T)C(he)-5.145 E -.25(va)144 216 S +(lues assigned to the array members are as follo).25 E(ws:)-.25 E F1 -.3 +(BA)144 234 S(SH_VERSINFO[).3 E F0(0)A F1(])A F0(The major v)264 234 Q +(ersion number \(the)-.15 E F3 -.37(re)2.5 G(lease).37 E F0(\).)A F1 -.3 +(BA)144 246 S(SH_VERSINFO[).3 E F0(1)A F1(])A F0(The minor v)264 246 Q +(ersion number \(the)-.15 E F3(ver)2.5 E(sion)-.1 E F0(\).)A F1 -.3(BA) +144 258 S(SH_VERSINFO[).3 E F0(2)A F1(])A F0(The patch le)264 258 Q -.15 +(ve)-.25 G(l.).15 E F1 -.3(BA)144 270 S(SH_VERSINFO[).3 E F0(3)A F1(])A +F0(The b)264 270 Q(uild v)-.2 E(ersion.)-.15 E F1 -.3(BA)144 282 S +(SH_VERSINFO[).3 E F0(4)A F1(])A F0(The release status \(e.g.,)264 282 Q +F3(beta1)2.5 E F0(\).)A F1 -.3(BA)144 294 S(SH_VERSINFO[).3 E F0(5)A F1 +(])A F0(The v)264 294 Q(alue of)-.25 E F2(MA)2.5 E(CHTYPE)-.495 E/F4 9 +/Times-Roman@0 SF(.)A F1 -.3(BA)108 306 S(SH_VERSION).3 E F0 +(Expands to a string describing the v)144 318 Q +(ersion of this instance of)-.15 E F1(bash)2.5 E F0(.)A F1(COMP_CW)108 +330 Q(ORD)-.1 E F0 .397(An inde)144 342 R 2.897(xi)-.15 G(nto)-2.897 E +F1(${COMP_W)2.896 E(ORDS})-.1 E F0 .396(of the w)2.896 F .396 +(ord containing the current cursor position.)-.1 F .396(This v)5.396 F +(ari-)-.25 E 1.18(able is a)144 354 R -.25(va)-.2 G 1.181 +(ilable only in shell functions in).25 F -.2(vo)-.4 G -.1(ke).2 G 3.681 +(db).1 G 3.681(yt)-3.681 G 1.181(he programmable completion f)-3.681 F +1.181(acilities \(see)-.1 F F1(Pr)144 366 Q(ogrammable Completion)-.18 E +F0(belo)2.5 E(w\).)-.25 E F1(COMP_KEY)108 378 Q F0(The k)144 390 Q .3 +-.15(ey \()-.1 H(or \214nal k).15 E .3 -.15(ey o)-.1 H 2.5(fak).15 G .3 +-.15(ey s)-2.6 H(equence\) used to in).15 E -.2(vo)-.4 G .2 -.1(ke t).2 +H(he current completion function.).1 E F1(COMP_LINE)108 402 Q F0 1.208 +(The current command line.)144 414 R 1.208(This v)6.208 F 1.208 +(ariable is a)-.25 F -.25(va)-.2 G 1.208 +(ilable only in shell functions and e).25 F 1.207(xternal com-)-.15 F +1.037(mands in)144 426 R -.2(vo)-.4 G -.1(ke).2 G 3.537(db).1 G 3.537 +(yt)-3.537 G 1.037(he programmable completion f)-3.537 F 1.037 +(acilities \(see)-.1 F F1(Pr)3.537 E 1.037(ogrammable Completion)-.18 F +F0(be-)3.537 E(lo)144 438 Q(w\).)-.25 E F1(COMP_POINT)108 450 Q F0 .667 +(The inde)144 462 R 3.167(xo)-.15 G 3.167(ft)-3.167 G .666 +(he current cursor position relati)-3.167 F .966 -.15(ve t)-.25 H 3.166 +(ot).15 G .666(he be)-3.166 F .666(ginning of the current command.)-.15 +F .666(If the)5.666 F .534 +(current cursor position is at the end of the current command, the v)144 +474 R .535(alue of this v)-.25 F .535(ariable is equal to)-.25 F F1 +(${#COMP_LINE})144 486 Q F0 5.705(.T)C .705(his v)-5.705 F .704 +(ariable is a)-.25 F -.25(va)-.2 G .704 +(ilable only in shell functions and e).25 F .704(xternal commands in-) +-.15 F -.2(vo)144 498 S -.1(ke).2 G 2.5(db).1 G 2.5(yt)-2.5 G +(he programmable completion f)-2.5 E(acilities \(see)-.1 E F1(Pr)2.5 E +(ogrammable Completion)-.18 E F0(belo)2.5 E(w\).)-.25 E F1(COMP_TYPE)108 +510 Q F0 .041(Set to an inte)144 522 R .041(ger v)-.15 F .041(alue corr\ +esponding to the type of completion attempted that caused a completion) +-.25 F .338(function to be called:)144 534 R F3 -.5(TA)2.837 G(B).5 E F0 +2.837(,f)C .337(or normal completion,)-2.837 F F3(?)2.837 E F0 2.837(,f) +C .337(or listing completions after successi)-2.837 F .637 -.15(ve t) +-.25 H(abs,).15 E F3(!)144 546 Q F0 3.067(,f)C .567 +(or listing alternati)-3.067 F -.15(ve)-.25 G 3.067(so).15 G 3.067(np) +-3.067 G .567(artial w)-3.067 F .567(ord completion,)-.1 F F3(@)3.067 E +F0 3.067(,t)C 3.067(ol)-3.067 G .567(ist completions if the w)-3.067 F +.567(ord is not un-)-.1 F .418(modi\214ed, or)144 558 R F3(%)2.918 E F0 +2.918(,f)C .418(or menu completion.)-2.918 F .417(This v)5.417 F .417 +(ariable is a)-.25 F -.25(va)-.2 G .417 +(ilable only in shell functions and e).25 F(xter)-.15 E(-)-.2 E .704 +(nal commands in)144 570 R -.2(vo)-.4 G -.1(ke).2 G 3.204(db).1 G 3.204 +(yt)-3.204 G .704(he programmable completion f)-3.204 F .704 +(acilities \(see)-.1 F F1(Pr)3.204 E .704(ogrammable Comple-)-.18 F +(tion)144 582 Q F0(belo)2.5 E(w\).)-.25 E F1(COMP_W)108 594 Q(ORDBREAKS) +-.1 E F0 1.336(The set of characters that the)144 606 R F1 -.18(re)3.836 +G(adline).18 E F0 1.336(library treats as w)3.836 F 1.335 +(ord separators when performing w)-.1 F(ord)-.1 E 3.125(completion. If) +144 618 R F2(COMP_W)3.125 E(ORDBREAKS)-.09 E F0 .626 +(is unset, it loses its special properties, e)2.875 F -.15(ve)-.25 G +3.126(ni).15 G 3.126(fi)-3.126 G 3.126(ti)-3.126 G 3.126(ss)-3.126 G +(ubse-)-3.126 E(quently reset.)144 630 Q F1(COMP_W)108 642 Q(ORDS)-.1 E +F0 .654(An array v)144 654 R .654(ariable \(see)-.25 F F1(Arrays)3.154 E +F0(belo)3.154 E .654(w\) consisting of the indi)-.25 F .653(vidual w) +-.25 F .653(ords in the current command)-.1 F 3.191(line. The)144 666 R +.692(line is split into w)3.192 F .692(ords as)-.1 F F1 -.18(re)3.192 G +(adline).18 E F0 -.1(wo)3.192 G .692(uld split it, using).1 F F2(COMP_W) +3.192 E(ORDBREAKS)-.09 E F0 .692(as de-)2.942 F 1.558(scribed abo)144 +678 R -.15(ve)-.15 G 6.558(.T).15 G 1.558(his v)-6.558 F 1.558 +(ariable is a)-.25 F -.25(va)-.2 G 1.558 +(ilable only in shell functions in).25 F -.2(vo)-.4 G -.1(ke).2 G 4.057 +(db).1 G 4.057(yt)-4.057 G 1.557(he programmable)-4.057 F(completion f) +144 690 Q(acilities \(see)-.1 E F1(Pr)2.5 E(ogrammable Completion)-.18 E +F0(belo)2.5 E(w\).)-.25 E F1(COPR)108 702 Q(OC)-.3 E F0 .168(An array v) +144 714 R .168(ariable \(see)-.25 F F1(Arrays)2.668 E F0(belo)2.669 E +.169 +(w\) created to hold the \214le descriptors for output from and input) +-.25 F(to an unnamed coprocess \(see)144 726 Q F1(Copr)2.5 E(ocesses) +-.18 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(12)190.395 E 0 Cg EP +%%Page: 13 13 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(DIRST)108 84 Q -.55(AC)-.9 G(K).55 E F0 .79(An array v)144 96 R .79 +(ariable \(see)-.25 F F1(Arrays)3.29 E F0(belo)3.289 E .789 +(w\) containing the current contents of the directory stack.)-.25 F(Di-) +5.789 E .099(rectories appear in the stack in the order the)144 108 R +2.599(ya)-.15 G .099(re displayed by the)-2.599 F F1(dirs)2.599 E F0 -.2 +(bu)2.599 G 2.599(iltin. Assigning).2 F .099(to mem-)2.599 F .84 +(bers of this array v)144 120 R .84 +(ariable may be used to modify directories already in the stack, b)-.25 +F .84(ut the)-.2 F F1(pushd)3.34 E F0(and)144 132 Q F1(popd)3.45 E F0 +-.2(bu)3.45 G .951(iltins must be used to add and remo).2 F 1.251 -.15 +(ve d)-.15 H 3.451(irectories. Assignment).15 F .951(to this v)3.451 F +.951(ariable will)-.25 F .379(not change the current directory)144 144 R +5.379(.I)-.65 G(f)-5.379 E/F2 9/Times-Bold@0 SF(DIRST)2.879 E -.495(AC) +-.81 G(K).495 E F0 .378(is unset, it loses its special properties, e) +2.629 F -.15(ve)-.25 G 2.878(ni).15 G 2.878(fi)-2.878 G 2.878(ti)-2.878 +G(s)-2.878 E(subsequently reset.)144 156 Q F1(EPOCHREAL)108 168 Q(TIME) +-.92 E F0 .337(Each time this parameter is referenced, it e)144 180 R +.338(xpands to the number of seconds since the Unix Epoch)-.15 F(\(see) +144 192 Q/F3 10/Times-Italic@0 SF(time)2.917 E F0 .417 +(\(3\)\) as a \215oating point v)B .416 +(alue with micro-second granularity)-.25 F 5.416(.A)-.65 G .416 +(ssignments to)-5.416 F F2(EPOCHRE-)2.916 E(AL)144 204 Q(TIME)-.828 E F0 +1.09(are ignored.)3.34 F(If)6.09 E F2(EPOCHREAL)3.59 E(TIME)-.828 E F0 +1.09(is unset, it loses its special properties, e)3.34 F -.15(ve)-.25 G +3.591(ni).15 G 3.591(fi)-3.591 G 3.591(ti)-3.591 G(s)-3.591 E +(subsequently reset.)144 216 Q F1(EPOCHSECONDS)108 228 Q F0 .338 +(Each time this parameter is referenced, it e)144 240 R .337 +(xpands to the number of seconds since the Unix Epoch)-.15 F(\(see)144 +252 Q F3(time)4.041 E F0 4.041(\(3\)\). Assignments)B(to)4.041 E F2 +(EPOCHSECONDS)4.041 E F0 1.542(are ignored.)3.792 F(If)6.542 E F2 +(EPOCHSECONDS)4.042 E F0 1.542(is unset, it)3.792 F +(loses its special properties, e)144 264 Q -.15(ve)-.25 G 2.5(ni).15 G +2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F1 +(EUID)108 276 Q F0 1.104(Expands to the ef)144 276 R(fecti)-.25 E 1.403 +-.15(ve u)-.25 H 1.103(ser ID of the current user).15 F 3.603(,i)-.4 G +1.103(nitialized at shell startup.)-3.603 F 1.103(This v)6.103 F 1.103 +(ariable is)-.25 F(readonly)144 288 Q(.)-.65 E F1(FUNCN)108 300 Q(AME) +-.2 E F0 .478(An array v)144 312 R .479 +(ariable containing the names of all shell functions currently in the e) +-.25 F -.15(xe)-.15 G .479(cution call stack.).15 F .277 +(The element with inde)144 324 R 2.777(x0i)-.15 G 2.777(st)-2.777 G .276 +(he name of an)-2.777 F 2.776(yc)-.15 G(urrently-e)-2.776 E -.15(xe)-.15 +G .276(cuting shell function.).15 F .276(The bottom-most)5.276 F .384 +(element \(the one with the highest inde)144 336 R .384(x\) is)-.15 F/F4 +10/Courier@0 SF("main")2.884 E F0 5.384(.T)C .384(his v)-5.384 F .385 +(ariable e)-.25 F .385(xists only when a shell func-)-.15 F .076 +(tion is e)144 348 R -.15(xe)-.15 G 2.576(cuting. Assignments).15 F(to) +2.576 E F2(FUNCN)2.576 E(AME)-.18 E F0(ha)2.326 E .376 -.15(ve n)-.2 H +2.576(oe).15 G -.25(ff)-2.576 G 2.576(ect. If).25 F F2(FUNCN)2.575 E +(AME)-.18 E F0 .075(is unset, it loses its)2.325 F +(special properties, e)144 360 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 +G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E .11(This v)144 +378 R .111(ariable can be used with)-.25 F F1 -.3(BA)2.611 G(SH_LINENO) +.3 E F0(and)2.611 E F1 -.3(BA)2.611 G(SH_SOURCE).3 E F0 5.111(.E)C .111 +(ach element of)-5.111 F F1(FUNC-)2.611 E -.2(NA)144 390 S(ME).2 E F0 +1.404(has corresponding elements in)3.904 F F1 -.3(BA)3.904 G(SH_LINENO) +.3 E F0(and)3.904 E F1 -.3(BA)3.904 G(SH_SOURCE).3 E F0 1.404 +(to describe the)3.904 F .012(call stack.)144 402 R -.15(Fo)5.012 G +2.512(ri).15 G(nstance,)-2.512 E F1(${FUNCN)2.512 E(AME[)-.2 E F3($i)A +F1(]})A F0 -.1(wa)2.512 G 2.512(sc).1 G .012(alled from the \214le) +-2.512 F F1(${B)2.512 E(ASH_SOURCE[)-.3 E F3($i+1)A F1(]})A F0 1.184 +(at line number)144 414 R F1(${B)3.684 E(ASH_LINENO[)-.3 E F3($i)A F1 +(]})A F0 6.184(.T)C(he)-6.184 E F1(caller)3.683 E F0 -.2(bu)3.683 G +1.183(iltin displays the current call stack using).2 F +(this information.)144 426 Q F1(GR)108 438 Q(OUPS)-.3 E F0 1.228 +(An array v)144 450 R 1.228(ariable containing the list of groups of wh\ +ich the current user is a member)-.25 F 6.229(.A)-.55 G(ssign-)-6.229 E +.572(ments to)144 462 R F2(GR)3.072 E(OUPS)-.27 E F0(ha)2.822 E .872 +-.15(ve n)-.2 H 3.072(oe).15 G -.25(ff)-3.072 G 3.072(ect. If).25 F F2 +(GR)3.072 E(OUPS)-.27 E F0 .572 +(is unset, it loses its special properties, e)2.822 F -.15(ve)-.25 G +3.072(ni).15 G 3.071(fi)-3.072 G 3.071(ti)-3.071 G(s)-3.071 E +(subsequently reset.)144 474 Q F1(HISTCMD)108 486 Q F0 2.81 +(The history number)144 498 R 5.31(,o)-.4 G 5.31(ri)-5.31 G(nde)-5.31 E +5.311(xi)-.15 G 5.311(nt)-5.311 G 2.811 +(he history list, of the current command.)-5.311 F 2.811(Assignments to) +7.811 F F2(HISTCMD)144 510 Q F0 1.135(are ignored.)3.385 F(If)6.135 E F2 +(HISTCMD)3.635 E F0 1.135(is unset, it loses its special properties, e) +3.385 F -.15(ve)-.25 G 3.634(ni).15 G 3.634(fi)-3.634 G 3.634(ti)-3.634 +G 3.634(ss)-3.634 G(ubse-)-3.634 E(quently reset.)144 522 Q F1(HOSTN)108 +534 Q(AME)-.2 E F0(Automatically set to the name of the current host.) +144 546 Q F1(HOSTTYPE)108 558 Q F0 .222(Automatically set to a string t\ +hat uniquely describes the type of machine on which)144 570 R F1(bash) +2.723 E F0 .223(is e)2.723 F -.15(xe)-.15 G(cut-).15 E 2.5(ing. The)144 +582 R(def)2.5 E(ault is system-dependent.)-.1 E F1(LINENO)108 594 Q F0 +1.408(Each time this parameter is referenced, the shell substitutes a d\ +ecimal number representing the)144 606 R .078(current sequential line n\ +umber \(starting with 1\) within a script or function.)144 618 R .079 +(When not in a script or)5.078 F .307(function, the v)144 630 R .307 +(alue substituted is not guaranteed to be meaningful.)-.25 F(If)5.306 E +F2(LINENO)2.806 E F0 .306(is unset, it loses its)2.556 F +(special properties, e)144 642 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 +G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F1(MA)108 654 Q +(CHTYPE)-.55 E F0 .898(Automatically set to a string that fully describ\ +es the system type on which)144 666 R F1(bash)3.398 E F0 .899(is e)3.398 +F -.15(xe)-.15 G .899(cuting, in).15 F(the standard GNU)144 678 Q F3 +(cpu-company-system)2.5 E F0 2.5(format. The)2.5 F(def)2.5 E +(ault is system-dependent.)-.1 E F1(MAPFILE)108 690 Q F0 .294 +(An array v)144 702 R .294(ariable \(see)-.25 F F1(Arrays)2.794 E F0 +(belo)2.794 E .294(w\) created to hold the te)-.25 F .293 +(xt read by the)-.15 F F1(map\214le)2.793 E F0 -.2(bu)2.793 G .293 +(iltin when no).2 F -.25(va)144 714 S(riable name is supplied.).25 E +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(13)190.395 E 0 Cg EP +%%Page: 14 14 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(OLDPWD)108 84 Q F0(The pre)144 96 Q(vious w)-.25 E +(orking directory as set by the)-.1 E F1(cd)2.5 E F0(command.)2.5 E F1 +(OPT)108 108 Q(ARG)-.9 E F0 1.626(The v)144 120 R 1.627 +(alue of the last option ar)-.25 F 1.627(gument processed by the)-.18 F +F1(getopts)4.127 E F0 -.2(bu)4.127 G 1.627(iltin command \(see).2 F/F2 9 +/Times-Bold@0 SF(SHELL)4.127 E -.09(BU)144 132 S(IL).09 E(TIN COMMANDS) +-.828 E F0(belo)2.25 E(w\).)-.25 E F1(OPTIND)108 144 Q F0 1.652 +(The inde)144 156 R 4.152(xo)-.15 G 4.152(ft)-4.152 G 1.652(he ne)-4.152 +F 1.652(xt ar)-.15 F 1.652(gument to be processed by the)-.18 F F1 +(getopts)4.151 E F0 -.2(bu)4.151 G 1.651(iltin command \(see).2 F F2 +(SHELL)4.151 E -.09(BU)144 168 S(IL).09 E(TIN COMMANDS)-.828 E F0(belo) +2.25 E(w\).)-.25 E F1(OSTYPE)108 180 Q F0 .329(Automatically set to a s\ +tring that describes the operating system on which)144 192 R F1(bash) +2.83 E F0 .33(is e)2.83 F -.15(xe)-.15 G 2.83(cuting. The).15 F(def)144 +204 Q(ault is system-dependent.)-.1 E F1(PIPEST)108 216 Q -.95(AT)-.9 G +(US).95 E F0 .61(An array v)144 228 R .61(ariable \(see)-.25 F F1 +(Arrays)3.11 E F0(belo)3.11 E .61(w\) containing a list of e)-.25 F .61 +(xit status v)-.15 F .61(alues from the processes in)-.25 F +(the most-recently-e)144 240 Q -.15(xe)-.15 G(cuted fore).15 E +(ground pipeline \(which may contain only a single command\).)-.15 E F1 +(PPID)108 252 Q F0(The process ID of the shell')144 252 Q 2.5(sp)-.55 G +2.5(arent. This)-2.5 F -.25(va)2.5 G(riable is readonly).25 E(.)-.65 E +F1(PWD)108 264 Q F0(The current w)144 264 Q +(orking directory as set by the)-.1 E F1(cd)2.5 E F0(command.)2.5 E F1 +(RANDOM)108 276 Q F0 .417(Each time this parameter is referenced, it e) +144 288 R .417(xpands to a random inte)-.15 F .417 +(ger between 0 and 32767.)-.15 F(As-)5.417 E .551(signing a v)144 300 R +.551(alue to)-.25 F F2(RANDOM)3.051 E F0 .551 +(initializes \(seeds\) the sequence of random numbers.)2.801 F(If)5.55 E +F2(RANDOM)3.05 E F0(is)2.8 E(unset, it loses its special properties, e) +144 312 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5 +(ss)-2.5 G(ubsequently reset.)-2.5 E F1(READLINE_LINE)108 324 Q F0 1.546 +(The contents of the)144 336 R F1 -.18(re)4.047 G(adline).18 E F0 1.547 +(line b)4.047 F(uf)-.2 E(fer)-.25 E 4.047(,f)-.4 G 1.547(or use with) +-4.047 F/F3 10/Courier@0 SF 1.547(bind -x)4.047 F F0(\(see)4.047 E F2 +1.547(SHELL B)4.047 F(UIL)-.09 E 1.547(TIN COM-)-.828 F(MANDS)144 348 Q +F0(belo)2.25 E(w\).)-.25 E F1(READLINE_MARK)108 360 Q F0 .107 +(The position of the mark \(sa)144 372 R -.15(ve)-.2 G 2.607(di).15 G +.107(nsertion point\) in the)-2.607 F F1 -.18(re)2.606 G(adline).18 E F0 +.106(line b)2.606 F(uf)-.2 E(fer)-.25 E 2.606(,f)-.4 G .106(or use with) +-2.606 F F3 .106(bind -x)2.606 F F0(\(see)144 384 Q F2 1.016(SHELL B) +3.516 F(UIL)-.09 E 1.016(TIN COMMANDS)-.828 F F0(belo)3.266 E 3.516 +(w\). The)-.25 F 1.017(characters between the insertion point and the) +3.516 F(mark are often called the)144 396 Q/F4 10/Times-Italic@0 SF -.37 +(re)2.5 G(gion)-.03 E F0(.)A F1(READLINE_POINT)108 408 Q F0 .314 +(The position of the insertion point in the)144 420 R F1 -.18(re)2.813 G +(adline).18 E F0 .313(line b)2.813 F(uf)-.2 E(fer)-.25 E 2.813(,f)-.4 G +.313(or use with)-2.813 F F3 .313(bind -x)2.813 F F0(\(see)2.813 E F2 +(SHELL)2.813 E -.09(BU)144 432 S(IL).09 E(TIN COMMANDS)-.828 E F0(belo) +2.25 E(w\).)-.25 E F1(REPL)108 444 Q(Y)-.92 E F0 +(Set to the line of input read by the)144 456 Q F1 -.18(re)2.5 G(ad).18 +E F0 -.2(bu)2.5 G(iltin command when no ar).2 E(guments are supplied.) +-.18 E F1(SECONDS)108 468 Q F0 .795(Each time this parameter is referen\ +ced, the number of seconds since shell in)144 480 R -.2(vo)-.4 G .795 +(cation is returned.).2 F .713(If a v)144 492 R .712 +(alue is assigned to)-.25 F F2(SECONDS)3.212 E/F5 9/Times-Roman@0 SF(,)A +F0 .712(the v)2.962 F .712 +(alue returned upon subsequent references is the number)-.25 F .627 +(of seconds since the assignment plus the v)144 504 R .627 +(alue assigned.)-.25 F .628(The number of seconds at shell in)5.627 F +-.2(vo)-.4 G(ca-).2 E .458(tion and the current time is al)144 516 R -.1 +(wa)-.1 G .458(ys determined by querying the system clock.).1 F(If)5.457 +E F2(SECONDS)2.957 E F0 .457(is un-)2.707 F +(set, it loses its special properties, e)144 528 Q -.15(ve)-.25 G 2.5 +(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.) +-2.5 E F1(SHELLOPTS)108 540 Q F0 3.262(Ac)144 552 S .763 +(olon-separated list of enabled shell options.)-3.262 F .763(Each w) +5.763 F .763(ord in the list is a v)-.1 F .763(alid ar)-.25 F .763 +(gument for the)-.18 F F1144 564 Q F0 1.174(option to the)3.674 F +F1(set)3.674 E F0 -.2(bu)3.674 G 1.174(iltin command \(see).2 F F2 1.173 +(SHELL B)3.673 F(UIL)-.09 E 1.173(TIN COMMANDS)-.828 F F0(belo)3.423 E +3.673(w\). The)-.25 F(options)3.673 E .019(appearing in)144 576 R F2 +(SHELLOPTS)2.519 E F0 .019(are those reported as)2.269 F F4(on)2.749 E +F0(by)2.759 E F1 .019(set \255o)2.519 F F0 5.019(.I)C 2.519(ft)-5.019 G +.019(his v)-2.519 F .02(ariable is in the en)-.25 F(vironment)-.4 E +(when)144 588 Q F1(bash)3.142 E F0 .642(starts up, each shell option in\ + the list will be enabled before reading an)3.142 F 3.141(ys)-.15 G .641 +(tartup \214les.)-3.141 F(This v)144 600 Q(ariable is read-only)-.25 E +(.)-.65 E F1(SHL)108 612 Q(VL)-.92 E F0 +(Incremented by one each time an instance of)144 624 Q F1(bash)2.5 E F0 +(is started.)2.5 E F1(SRANDOM)108 636 Q F0 .76(This v)144 648 R .76 +(ariable e)-.25 F .761(xpands to a 32-bit pseudo-random number each tim\ +e it is referenced. The random)-.15 F .565 +(number generator is not linear on systems that support)144 660 R F3 +(/dev/urandom)3.064 E F0(or)3.064 E F4(ar)3.064 E(c4r)-.37 E(andom)-.15 +E F0 3.064(,s)C 3.064(oe)-3.064 G(ach)-3.064 E .788 +(returned number has no relationship to the numbers preceding it.)144 +672 R .788(The random number generator)5.788 F .088 +(cannot be seeded, so assignments to this v)144 684 R .087(ariable ha) +-.25 F .387 -.15(ve n)-.2 H 2.587(oe).15 G -.25(ff)-2.587 G 2.587 +(ect. If).25 F F2(SRANDOM)2.587 E F0 .087(is unset, it loses its)2.337 F +(special properties, e)144 696 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 +G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F1(UID)108 708 Q +F0(Expands to the user ID of the current user)144 708 Q 2.5(,i)-.4 G +(nitialized at shell startup.)-2.5 E(This v)5 E(ariable is readonly)-.25 +E(.)-.65 E .993(The follo)108 724.8 R .993(wing v)-.25 F .994 +(ariables are used by the shell.)-.25 F .994(In some cases,)5.994 F F1 +(bash)3.494 E F0 .994(assigns a def)3.494 F .994(ault v)-.1 F .994 +(alue to a v)-.25 F(ariable;)-.25 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(14)190.395 E 0 Cg EP +%%Page: 15 15 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E +(these cases are noted belo)108 84 Q -.65(w.)-.25 G/F1 10/Times-Bold@0 +SF -.3(BA)108 100.8 S(SH_COMP).3 E -.95(AT)-.74 G F0 .503(The v)144 +112.8 R .502(alue is used to set the shell')-.25 F 3.002(sc)-.55 G .502 +(ompatibility le)-3.002 F -.15(ve)-.25 G 3.002(l. See).15 F/F2 9 +/Times-Bold@0 SF .502(SHELL COMP)3.002 F -.855(AT)-.666 G .502 +(IBILITY MODE).855 F F0(be-)2.752 E(lo)144 124.8 Q 2.662(wf)-.25 G .162 +(or a description of the v)-2.662 F .162(arious compatibility le)-.25 F +-.15(ve)-.25 G .162(ls and their ef).15 F 2.663(fects. The)-.25 F -.25 +(va)2.663 G .163(lue may be a dec-).25 F .33 +(imal number \(e.g., 4.2\) or an inte)144 136.8 R .33 +(ger \(e.g., 42\) corresponding to the desired compatibility le)-.15 F +-.15(ve)-.25 G 2.83(l. If).15 F F1 -.3(BA)144 148.8 S(SH_COMP).3 E -.95 +(AT)-.74 G F0 .86 +(is unset or set to the empty string, the compatibility le)4.31 F -.15 +(ve)-.25 G 3.361(li).15 G 3.361(ss)-3.361 G .861(et to the def)-3.361 F +(ault)-.1 E .39(for the current v)144 160.8 R 2.89(ersion. If)-.15 F F1 +-.3(BA)2.89 G(SH_COMP).3 E -.95(AT)-.74 G F0 .39(is set to a v)3.84 F +.39(alue that is not one of the v)-.25 F .39(alid compati-)-.25 F .277 +(bility le)144 172.8 R -.15(ve)-.25 G .278 +(ls, the shell prints an error message and sets the compatibility le).15 +F -.15(ve)-.25 G 2.778(lt).15 G 2.778(ot)-2.778 G .278(he def)-2.778 F +.278(ault for the)-.1 F 1.401(current v)144 184.8 R 3.901(ersion. The) +-.15 F -.25(va)3.901 G 1.401(lid v).25 F 1.401 +(alues correspond to the compatibility le)-.25 F -.15(ve)-.25 G 1.401 +(ls described belo).15 F 3.9(wu)-.25 G(nder)-3.9 E F2(BSHELL)144 196.8 Q +/F3 9/Times-Roman@0 SF(COMP)A -.999(AT)-.828 G(IBILITY).999 E F2(MODE)A +F3(.)A F0 -.15(Fo)4.997 G 2.997(re).15 G .497(xample, 4.2 and 42 are v) +-3.147 F .497(alid v)-.25 F .498(alues that correspond to the)-.25 F F1 +.774(compat42 shopt)144 208.8 R F0 .774 +(option and set the compatibility le)3.274 F -.15(ve)-.25 G 3.274(lt).15 +G 3.274(o4)-3.274 G 3.274(2. The)-3.274 F .774(current v)3.274 F .773 +(ersion is also a v)-.15 F(alid)-.25 E -.25(va)144 220.8 S(lue.).25 E F1 +-.3(BA)108 232.8 S(SH_ENV).3 E F0 .505(If this parameter is set when)144 +244.8 R F1(bash)3.005 E F0 .505(is e)3.005 F -.15(xe)-.15 G .506 +(cuting a shell script, its v).15 F .506 +(alue is interpreted as a \214lename)-.25 F .391 +(containing commands to initialize the shell, as in)144 256.8 R/F4 10 +/Times-Italic@0 SF(~/.bashr)2.39 E(c)-.37 E F0 5.39(.T).31 G .39(he v) +-5.39 F .39(alue of)-.25 F F2 -.27(BA)2.89 G(SH_ENV).27 E F0 .39 +(is subjected)2.64 F .525(to parameter e)144 268.8 R .525 +(xpansion, command substitution, and arithmetic e)-.15 F .525 +(xpansion before being interpreted)-.15 F(as a \214lename.)144 280.8 Q +F2 -.666(PA)5 G(TH)-.189 E F0 +(is not used to search for the resultant \214lename.)2.25 E F1 -.3(BA) +108 292.8 S(SH_XTRA).3 E(CEFD)-.55 E F0 .481(If set to an inte)144 304.8 +R .481(ger corresponding to a v)-.15 F .481(alid \214le descriptor)-.25 +F(,)-.4 E F1(bash)2.98 E F0 .48(will write the trace output gener)2.98 F +(-)-.2 E 3.114(ated when)144 316.8 R/F5 10/Courier@0 SF 3.114(set -x) +5.614 F F0 3.114(is enabled to that \214le descriptor)5.614 F 8.114(.T) +-.55 G 3.114(he \214le descriptor is closed when)-8.114 F F2 -.27(BA)144 +328.8 S(SH_XTRA).27 E(CEFD)-.495 E F0 .138(is unset or assigned a ne) +2.388 F 2.638(wv)-.25 G 2.638(alue. Unsetting)-2.888 F F2 -.27(BA)2.638 +G(SH_XTRA).27 E(CEFD)-.495 E F0 .138(or assigning it)2.388 F 2.531(the \ +empty string causes the trace output to be sent to the standard error) +144 340.8 R 7.531(.N)-.55 G 2.531(ote that setting)-7.531 F F2 -.27(BA) +144 352.8 S(SH_XTRA).27 E(CEFD)-.495 E F0 .74(to 2 \(the standard error\ + \214le descriptor\) and then unsetting it will result in the)2.991 F +(standard error being closed.)144 364.8 Q F1(CDP)108 376.8 Q -.95(AT) +-.74 G(H).95 E F0 1.247(The search path for the)144 388.8 R F1(cd)3.747 +E F0 3.747(command. This)3.747 F 1.248 +(is a colon-separated list of directories in which the)3.747 F 3.796 +(shell looks for destination directories speci\214ed by the)144 400.8 R +F1(cd)6.295 E F0 6.295(command. A)6.295 F 3.795(sample v)6.295 F 3.795 +(alue is)-.25 F F5(".:~:/usr")144 412.8 Q F0(.)A F1(CHILD_MAX)108 424.8 +Q F0 .997(Set the number of e)144 436.8 R .997(xited child status v)-.15 +F .997(alues for the shell to remember)-.25 F 5.997(.B)-.55 G .997 +(ash will not allo)-5.997 F 3.498(wt)-.25 G(his)-3.498 E -.25(va)144 +448.8 S 1.078(lue to be decreased belo).25 F 3.577(waP)-.25 G 1.077 +(OSIX-mandated minimum, and there is a maximum v)-3.577 F 1.077 +(alue \(cur)-.25 F(-)-.2 E(rently 8192\) that this may not e)144 460.8 Q +2.5(xceed. The)-.15 F(minimum v)2.5 E(alue is system-dependent.)-.25 E +F1(COLUMNS)108 472.8 Q F0 .828(Used by the)144 484.8 R F1(select)3.328 E +F0 .829(compound command to determine the terminal width when printing \ +selection)3.328 F 3.466(lists. Automatically)144 496.8 R .966 +(set if the)3.466 F F1(checkwinsize)3.466 E F0 .966 +(option is enabled or in an interacti)3.466 F 1.266 -.15(ve s)-.25 H +.966(hell upon re-).15 F(ceipt of a)144 508.8 Q F2(SIGWINCH)2.5 E F3(.)A +F1(COMPREPL)108 520.8 Q(Y)-.92 E F0 .847(An array v)144 532.8 R .848 +(ariable from which)-.25 F F1(bash)3.348 E F0 .848 +(reads the possible completions generated by a shell function)3.348 F +(in)144 544.8 Q -.2(vo)-.4 G -.1(ke).2 G 2.785(db).1 G 2.785(yt)-2.785 G +.285(he programmable completion f)-2.785 F .285(acility \(see)-.1 F F1 +(Pr)2.785 E .285(ogrammable Completion)-.18 F F0(belo)2.785 E 2.785 +(w\). Each)-.25 F(array element contains one possible completion.)144 +556.8 Q F1(EMA)108 568.8 Q(CS)-.55 E F0(If)144 580.8 Q F1(bash)2.535 E +F0 .035(\214nds this v)2.535 F .035(ariable in the en)-.25 F .036 +(vironment when the shell starts with v)-.4 F(alue)-.25 E F5(t)2.536 E +F0 2.536(,i)C 2.536(ta)-2.536 G .036(ssumes that the)-2.536 F +(shell is running in an Emacs shell b)144 592.8 Q(uf)-.2 E +(fer and disables line editing.)-.25 E F1(ENV)108 604.8 Q F0 .671 +(Expanded and e)144 604.8 R -.15(xe)-.15 G .671(cuted similarly to).15 F +F2 -.27(BA)3.17 G(SH_ENV).27 E F0(\(see)2.92 E F1(INV)3.17 E(OCA)-.45 E +(TION)-.95 E F0(abo)3.17 E -.15(ve)-.15 G 3.17(\)w).15 G .67 +(hen an interacti)-3.17 F -.15(ve)-.25 G(shell is in)144 616.8 Q -.2(vo) +-.4 G -.1(ke).2 G 2.5(di).1 G(n)-2.5 E F4(posix mode)2.5 E F0(.)A F1 +(EXECIGNORE)108 628.8 Q F0 2.716(Ac)144 640.8 S .216 +(olon-separated list of shell patterns \(see)-2.716 F F1 -.1(Pa)2.717 G +(tter).1 E 2.717(nM)-.15 G(atching)-2.717 E F0 2.717(\)d)C .217 +(e\214ning the list of \214lenames to be)-2.717 F .117 +(ignored by command search using)144 652.8 R F1 -.74(PA)2.617 G(TH)-.21 +E F0 5.117(.F)C .116 +(iles whose full pathnames match one of these patterns)-5.117 F 1.432 +(are not considered e)144 664.8 R -.15(xe)-.15 G 1.432 +(cutable \214les for the purposes of completion and command e).15 F -.15 +(xe)-.15 G 1.433(cution via).15 F F1 -.74(PA)144 676.8 S(TH)-.21 E F0 +2.909(lookup. This)2.909 F .408(does not af)2.908 F .408(fect the beha) +-.25 F .408(vior of the)-.2 F F1([)2.908 E F0(,)A F1(test)2.908 E F0 +2.908(,a)C(nd)-2.908 E F1([[)2.908 E F0 2.908(commands. Full)2.908 F +(pathnames)2.908 E .364(in the command hash table are not subject to)144 +688.8 R F1(EXECIGNORE)2.864 E F0 5.364(.U)C .364(se this v)-5.364 F .364 +(ariable to ignore shared)-.25 F 1.37(library \214les that ha)144 700.8 +R 1.67 -.15(ve t)-.2 H 1.37(he e).15 F -.15(xe)-.15 G 1.37 +(cutable bit set, b).15 F 1.37(ut are not e)-.2 F -.15(xe)-.15 G 1.37 +(cutable \214les.).15 F 1.37(The pattern matching)6.37 F +(honors the setting of the)144 712.8 Q F1(extglob)2.5 E F0 +(shell option.)2.5 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(15) +190.395 E 0 Cg EP +%%Page: 16 16 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(FCEDIT)108 84 Q F0(The def)144 96 Q(ault editor for the)-.1 E F1(fc) +2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E F1(FIGNORE)108 108 Q F0 2.598 +(Ac)144 120 S .098(olon-separated list of suf)-2.598 F<8c78>-.25 E .098 +(es to ignore when performing \214lename completion \(see)-.15 F/F2 9 +/Times-Bold@0 SF(READLINE)2.599 E F0(belo)144 132 Q 2.705(w\). A)-.25 F +.205(\214lename whose suf)2.705 F .205 +(\214x matches one of the entries in)-.25 F F2(FIGNORE)2.705 E F0 .205 +(is e)2.455 F .204(xcluded from the list)-.15 F(of matched \214lenames.) +144 144 Q 2.5(As)5 G(ample v)-2.5 E(alue is)-.25 E/F3 10/Courier@0 SF +(".o:~")2.5 E F0(.)A F1(FUNCNEST)108 156 Q F0 .23(If set to a numeric v) +144 168 R .231 +(alue greater than 0, de\214nes a maximum function nesting le)-.25 F +-.15(ve)-.25 G 2.731(l. Function).15 F(in)2.731 E -.2(vo)-.4 G(-).2 E +(cations that e)144 180 Q(xceed this nesting le)-.15 E -.15(ve)-.25 G +2.5(lw).15 G(ill cause the current command to abort.)-2.5 E F1 +(GLOBIGNORE)108 192 Q F0 2.924(Ac)144 204 S .423(olon-separated list of\ + patterns de\214ning the set of \214le names to be ignored by pathname \ +e)-2.924 F(xpan-)-.15 E 2.947(sion. If)144 216 R 2.947<618c>2.947 G .447 +(le name matched by a pathname e)-2.947 F .448 +(xpansion pattern also matches one of the patterns in)-.15 F F2 +(GLOBIGNORE)144 228 Q/F4 9/Times-Roman@0 SF(,)A F0(it is remo)2.25 E +-.15(ve)-.15 G 2.5(df).15 G(rom the list of matches.)-2.5 E F1 +(HISTCONTR)108 240 Q(OL)-.3 E F0 2.654(Ac)144 252 S .153 +(olon-separated list of v)-2.654 F .153(alues controlling ho)-.25 F +2.653(wc)-.25 G .153(ommands are sa)-2.653 F -.15(ve)-.2 G 2.653(do).15 +G 2.653(nt)-2.653 G .153(he history list.)-2.653 F .153(If the list) +5.153 F .49(of v)144 264 R .49(alues includes)-.25 F/F5 10 +/Times-Italic@0 SF(ignor)3 E(espace)-.37 E F0 2.99(,l).18 G .49 +(ines which be)-2.99 F .49(gin with a)-.15 F F1(space)2.99 E F0 .49 +(character are not sa)2.99 F -.15(ve)-.2 G 2.99(di).15 G 2.99(nt)-2.99 G +.49(he his-)-2.99 F .558(tory list.)144 276 R 3.058(Av)5.558 G .558 +(alue of)-3.308 F F5(ignor)3.068 E(edups)-.37 E F0 .558 +(causes lines matching the pre)3.328 F .557 +(vious history entry to not be sa)-.25 F -.15(ve)-.2 G(d.).15 E 2.925 +(Av)144 288 S .425(alue of)-3.175 F F5(ignor)2.935 E(eboth)-.37 E F0 +.426(is shorthand for)3.205 F F5(ignor)2.926 E(espace)-.37 E F0(and) +2.926 E F5(ignor)2.926 E(edups)-.37 E F0 5.426(.A)C -.25(va)-2.5 G .426 +(lue of).25 F F5(er)3.116 E(asedups)-.15 E F0(causes)3.196 E .699 +(all pre)144 300 R .698 +(vious lines matching the current line to be remo)-.25 F -.15(ve)-.15 G +3.198(df).15 G .698(rom the history list before that line is)-3.198 F +(sa)144 312 Q -.15(ve)-.2 G 2.763(d. An).15 F 2.763(yv)-.15 G .263 +(alue not in the abo)-3.013 F .563 -.15(ve l)-.15 H .263 +(ist is ignored.).15 F(If)5.263 E F2(HISTCONTR)2.763 E(OL)-.27 E F0 .264 +(is unset, or does not include)2.513 F 2.942(av)144 324 S .442(alid v) +-3.192 F .442(alue, all lines read by the shell parser are sa)-.25 F +-.15(ve)-.2 G 2.941(do).15 G 2.941(nt)-2.941 G .441 +(he history list, subject to the v)-2.941 F .441(alue of)-.25 F F2 +(HISTIGNORE)144 336 Q F4(.)A F0 1.981(The second and subsequent lines o\ +f a multi-line compound command are not)6.481 F +(tested, and are added to the history re)144 348 Q -.05(ga)-.15 G +(rdless of the v).05 E(alue of)-.25 E F2(HISTCONTR)2.5 E(OL)-.27 E F4(.) +A F1(HISTFILE)108 360 Q F0 .181 +(The name of the \214le in which command history is sa)144 372 R -.15 +(ve)-.2 G 2.681(d\().15 G(see)-2.681 E F2(HIST)2.681 E(OR)-.162 E(Y) +-.315 E F0(belo)2.431 E 2.681(w\). The)-.25 F(def)2.681 E .181(ault v) +-.1 F(alue)-.25 E(is)144 384 Q F5(~/.bash_history)2.5 E F0 5(.I)C 2.5 +(fu)-5 G(nset, the command history is not sa)-2.5 E -.15(ve)-.2 G 2.5 +(dw).15 G(hen a shell e)-2.5 E(xits.)-.15 E F1(HISTFILESIZE)108 396 Q F0 +1.622(The maximum number of lines contained in the history \214le.)144 +408 R 1.623(When this v)6.623 F 1.623(ariable is assigned a)-.25 F -.25 +(va)144 420 S .125(lue, the history \214le is truncated, if necessary) +.25 F 2.625(,t)-.65 G 2.624(oc)-2.625 G .124 +(ontain no more than that number of lines by re-)-2.624 F(mo)144 432 Q +.065(ving the oldest entries.)-.15 F .066(The history \214le is also tr\ +uncated to this size after writing it when a shell)5.065 F -.15(ex)144 +444 S 2.928(its. If).15 F .428(the v)2.928 F .428 +(alue is 0, the history \214le is truncated to zero size.)-.25 F .427 +(Non-numeric v)5.427 F .427(alues and numeric)-.25 F -.25(va)144 456 S +.152(lues less than zero inhibit truncation.).25 F .152 +(The shell sets the def)5.152 F .152(ault v)-.1 F .152(alue to the v) +-.25 F .152(alue of)-.25 F F1(HISTSIZE)2.652 E F0(after reading an)144 +468 Q 2.5(ys)-.15 G(tartup \214les.)-2.5 E F1(HISTIGNORE)108 480 Q F0 +2.658(Ac)144 492 S .158(olon-separated list of patterns used to decide \ +which command lines should be sa)-2.658 F -.15(ve)-.2 G 2.657(do).15 G +2.657(nt)-2.657 G .157(he his-)-2.657 F .707(tory list.)144 504 R .707 +(Each pattern is anchored at the be)5.707 F .708 +(ginning of the line and must match the complete line)-.15 F .626 +(\(no implicit `)144 516 R F1(*)A F0 3.126('i)C 3.126(sa)-3.126 G 3.126 +(ppended\). Each)-3.126 F .626(pattern is tested ag)3.126 F .625 +(ainst the line after the checks speci\214ed by)-.05 F F2(HISTCONTR)144 +528 Q(OL)-.27 E F0 1.793(are applied.)4.043 F 1.793 +(In addition to the normal shell pattern matching characters, `)6.793 F +F1(&)A F0(')A 1.44(matches the pre)144 540 R 1.44(vious history line.) +-.25 F(`)6.44 E F1(&)A F0 3.94('m)C 1.44 +(ay be escaped using a backslash; the backslash is re-)-3.94 F(mo)144 +552 Q -.15(ve)-.15 G 3.95(db).15 G 1.45(efore attempting a match.)-3.95 +F 1.45(The second and subsequent lines of a multi-line compound)6.45 F +1.269(command are not tested, and are added to the history re)144 564 R +-.05(ga)-.15 G 1.269(rdless of the v).05 F 1.269(alue of)-.25 F F2 +(HISTIGNORE)3.769 E F4(.)A F0 +(The pattern matching honors the setting of the)144 576 Q F1(extglob)2.5 +E F0(shell option.)2.5 E F1(HISTSIZE)108 588 Q F0 1.387 +(The number of commands to remember in the command history \(see)144 600 +R F2(HIST)3.887 E(OR)-.162 E(Y)-.315 E F0(belo)3.637 E 3.887(w\). If) +-.25 F(the)3.888 E -.25(va)144 612 S .413(lue is 0, commands are not sa) +.25 F -.15(ve)-.2 G 2.913(di).15 G 2.913(nt)-2.913 G .413 +(he history list.)-2.913 F .413(Numeric v)5.413 F .412 +(alues less than zero result in e)-.25 F(v-)-.25 E .343 +(ery command being sa)144 624 R -.15(ve)-.2 G 2.843(do).15 G 2.843(nt) +-2.843 G .343(he history list \(there is no limit\).)-2.843 F .344 +(The shell sets the def)5.343 F .344(ault v)-.1 F .344(alue to)-.25 F +(500 after reading an)144 636 Q 2.5(ys)-.15 G(tartup \214les.)-2.5 E F1 +(HISTTIMEFORMA)108 648 Q(T)-.95 E F0 .952(If this v)144 660 R .952 +(ariable is set and not null, its v)-.25 F .951 +(alue is used as a format string for)-.25 F F5(strftime)3.451 E F0 .951 +(\(3\) to print the)B .672 +(time stamp associated with each history entry displayed by the)144 672 +R F1(history)3.173 E F0 -.2(bu)3.173 G 3.173(iltin. If).2 F .673(this v) +3.173 F .673(ariable is)-.25 F .144 +(set, time stamps are written to the history \214le so the)144 684 R +2.644(ym)-.15 G .144(ay be preserv)-2.644 F .144 +(ed across shell sessions.)-.15 F(This)5.144 E(uses the history comment\ + character to distinguish timestamps from other history lines.)144 696 Q +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(16)190.395 E 0 Cg EP +%%Page: 17 17 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(HOME)108 84 Q F0 1.27 +(The home directory of the current user; the def)144 96 R 1.27(ault ar) +-.1 F 1.27(gument for the)-.18 F F1(cd)3.77 E F0 -.2(bu)3.77 G 1.27 +(iltin command.).2 F(The)6.27 E -.25(va)144 108 S(lue of this v).25 E +(ariable is also used when performing tilde e)-.25 E(xpansion.)-.15 E F1 +(HOSTFILE)108 120 Q F0 1.015 +(Contains the name of a \214le in the same format as)144 132 R/F2 10 +/Times-Italic@0 SF(/etc/hosts)5.181 E F0 1.015 +(that should be read when the shell)5.181 F .55 +(needs to complete a hostname.)144 144 R .551 +(The list of possible hostname completions may be changed while)5.551 F +1.059(the shell is running; the ne)144 156 R 1.059 +(xt time hostname completion is attempted after the v)-.15 F 1.058 +(alue is changed,)-.25 F F1(bash)144 168 Q F0 .138 +(adds the contents of the ne)2.638 F 2.638<778c>-.25 G .138(le to the e) +-2.638 F .138(xisting list.)-.15 F(If)5.138 E/F3 9/Times-Bold@0 SF +(HOSTFILE)2.638 E F0 .138(is set, b)2.388 F .139(ut has no v)-.2 F .139 +(alue, or)-.25 F .518(does not name a readable \214le,)144 180 R F1 +(bash)3.018 E F0 .518(attempts to read)3.018 F F2(/etc/hosts)4.683 E F0 +.517(to obtain the list of possible host-)4.683 F(name completions.)144 +192 Q(When)5 E F3(HOSTFILE)2.5 E F0 +(is unset, the hostname list is cleared.)2.25 E F1(IFS)108 204 Q F0(The) +144 204 Q F2 .555(Internal F)3.635 F .555(ield Separ)-.45 F(ator)-.15 E +F0 .555(that is used for w)3.785 F .556(ord splitting after e)-.1 F .556 +(xpansion and to split lines into)-.15 F -.1(wo)144 216 S(rds with the) +.1 E F1 -.18(re)2.5 G(ad).18 E F0 -.2(bu)2.5 G(iltin command.).2 E +(The def)5 E(ault v)-.1 E(alue is `)-.25 E(`')-.25 E('.)-.74 E F1(IGNOREEOF)108 228 Q F0 .503 +(Controls the action of an interacti)144 240 R .803 -.15(ve s)-.25 H +.503(hell on receipt of an).15 F F3(EOF)3.003 E F0 .503 +(character as the sole input.)2.753 F .503(If set,)5.503 F .426(the v) +144 252 R .426(alue is the number of consecuti)-.25 F -.15(ve)-.25 G F3 +(EOF)3.076 E F0 .426 +(characters which must be typed as the \214rst characters)2.676 F .303 +(on an input line before)144 264 R F1(bash)2.802 E F0 -.15(ex)2.802 G +2.802(its. If).15 F .302(the v)2.802 F .302(ariable e)-.25 F .302 +(xists b)-.15 F .302(ut does not ha)-.2 F .602 -.15(ve a n)-.2 H .302 +(umeric v).15 F .302(alue, or has)-.25 F(no v)144 276 Q(alue, the def) +-.25 E(ault v)-.1 E(alue is 10.)-.25 E(If it does not e)5 E(xist,)-.15 E +F3(EOF)2.5 E F0(signi\214es the end of input to the shell.)2.25 E F1 +(INPUTRC)108 288 Q F0 .26(The \214lename for the)144 300 R F1 -.18(re) +2.76 G(adline).18 E F0 .26(startup \214le, o)2.76 F -.15(ve)-.15 G .26 +(rriding the def).15 F .261(ault of)-.1 F F2(~/.inputr)4.427 E(c)-.37 E +F0(\(see)4.427 E F3(READLINE)2.761 E F0(be-)2.511 E(lo)144 312 Q(w\).) +-.25 E F1(INSIDE_EMA)108 324 Q(CS)-.55 E F0 .034(If this v)144 336 R +.034(ariable appears in the en)-.25 F .034 +(vironment when the shell starts,)-.4 F F1(bash)2.533 E F0 .033 +(assumes that it is running in-)2.533 F(side an Emacs shell b)144 348 Q +(uf)-.2 E(fer and may disable line editing, depending on the v)-.25 E +(alue of)-.25 E F1(TERM)2.5 E F0(.)A F1(LANG)108 360 Q F0 1.239 +(Used to determine the locale cate)144 360 R 1.239(gory for an)-.15 F +3.739(yc)-.15 G(ate)-3.739 E 1.24 +(gory not speci\214cally selected with a v)-.15 F(ariable)-.25 E +(starting with)144 372 Q F1(LC_)2.5 E F0(.)A F1(LC_ALL)108 384 Q F0 .974 +(This v)144 396 R .974(ariable o)-.25 F -.15(ve)-.15 G .974 +(rrides the v).15 F .973(alue of)-.25 F F3(LANG)3.473 E F0 .973(and an) +3.223 F 3.473(yo)-.15 G(ther)-3.473 E F1(LC_)3.473 E F0 -.25(va)3.473 G +.973(riable specifying a locale cate-).25 F(gory)144 408 Q(.)-.65 E F1 +(LC_COLLA)108 420 Q(TE)-.95 E F0 .411(This v)144 432 R .412(ariable det\ +ermines the collation order used when sorting the results of pathname e) +-.25 F(xpansion,)-.15 E 1.465(and determines the beha)144 444 R 1.465 +(vior of range e)-.2 F 1.464(xpressions, equi)-.15 F -.25(va)-.25 G +1.464(lence classes, and collating sequences).25 F(within pathname e)144 +456 Q(xpansion and pattern matching.)-.15 E F1(LC_CTYPE)108 468 Q F0 +1.935(This v)144 480 R 1.936 +(ariable determines the interpretation of characters and the beha)-.25 F +1.936(vior of character classes)-.2 F(within pathname e)144 492 Q +(xpansion and pattern matching.)-.15 E F1(LC_MESSA)108 504 Q(GES)-.55 E +F0(This v)144 516 Q(ariable determines the locale used to translate dou\ +ble-quoted strings preceded by a)-.25 E F1($)2.5 E F0(.)A F1(LC_NUMERIC) +108 528 Q F0(This v)144 540 Q(ariable determines the locale cate)-.25 E +(gory used for number formatting.)-.15 E F1(LC_TIME)108 552 Q F0(This v) +144 564 Q(ariable determines the locale cate)-.25 E +(gory used for data and time formatting.)-.15 E F1(LINES)108 576 Q F0 +.055(Used by the)144 576 R F1(select)2.555 E F0 .054(compound command t\ +o determine the column length for printing selection lists.)2.555 F .264 +(Automatically set if the)144 588 R F1(checkwinsize)2.764 E F0 .264 +(option is enabled or in an interacti)2.764 F .565 -.15(ve s)-.25 H .265 +(hell upon receipt of a).15 F F3(SIGWINCH)144 600 Q/F4 9/Times-Roman@0 +SF(.)A F1(MAIL)108 612 Q F0 .422 +(If this parameter is set to a \214le or directory name and the)144 612 +R F3(MAILP)2.921 E -.855(AT)-.666 G(H).855 E F0 -.25(va)2.671 G .421 +(riable is not set,).25 F F1(bash)2.921 E F0(in-)2.921 E +(forms the user of the arri)144 624 Q -.25(va)-.25 G 2.5(lo).25 G 2.5 +(fm)-2.5 G(ail in the speci\214ed \214le or Maildir)-2.5 E +(-format directory)-.2 E(.)-.65 E F1(MAILCHECK)108 636 Q F0 .098 +(Speci\214es ho)144 648 R 2.598(wo)-.25 G .098(ften \(in seconds\)) +-2.598 F F1(bash)2.598 E F0 .098(checks for mail.)2.598 F .098(The def) +5.098 F .098(ault is 60 seconds.)-.1 F .099(When it is time)5.099 F .224 +(to check for mail, the shell does so before displaying the primary pro\ +mpt.)144 660 R .223(If this v)5.223 F .223(ariable is unset,)-.25 F +(or set to a v)144 672 Q(alue that is not a number greater than or equa\ +l to zero, the shell disables mail checking.)-.25 E F1(MAILP)108 684 Q +-.95(AT)-.74 G(H).95 E F0 2.99(Ac)144 696 S .49 +(olon-separated list of \214lenames to be check)-2.99 F .49 +(ed for mail.)-.1 F .49(The message to be printed when mail)5.49 F(arri) +144 708 Q -.15(ve)-.25 G 2.62(si).15 G 2.62(nap)-2.62 G .12(articular \ +\214le may be speci\214ed by separating the \214lename from the message\ + with a `?'.)-2.62 F(When used in the te)144 720 Q(xt of the message,) +-.15 E F1($_)2.5 E F0 -.15(ex)2.5 G +(pands to the name of the current mail\214le.).15 E(Example:)5 E +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(17)190.395 E 0 Cg EP +%%Page: 18 18 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(MAILP)144 84 Q -.95(AT)-.74 G(H).95 E F0(=\010/v)A(ar/mail/bfox?"Y) +-.25 E(ou ha)-1.1 E .3 -.15(ve m)-.2 H +(ail":~/shell\255mail?"$_ has mail!"\010).15 E F1(Bash)144 96 Q F0 .015 +(can be con\214gured to supply a def)2.515 F .015(ault v)-.1 F .015 +(alue for this v)-.25 F .015(ariable \(there is no v)-.25 F .015 +(alue by def)-.25 F .015(ault\), b)-.1 F(ut)-.2 E(the location of the u\ +ser mail \214les that it uses is system dependent \(e.g., /v)144 108 Q +(ar/mail/)-.25 E F1($USER)A F0(\).)A F1(OPTERR)108 120 Q F0 .39 +(If set to the v)144 132 R .39(alue 1,)-.25 F F1(bash)2.89 E F0 .389 +(displays error messages generated by the)2.889 F F1(getopts)2.889 E F0 +-.2(bu)2.889 G .389(iltin command \(see).2 F/F2 9/Times-Bold@0 SF .359 +(SHELL B)144 144 R(UIL)-.09 E .359(TIN COMMANDS)-.828 F F0(belo)2.609 E +(w\).)-.25 E F2(OPTERR)5.359 E F0 .36 +(is initialized to 1 each time the shell is in)2.609 F -.2(vo)-.4 G -.1 +(ke).2 G(d).1 E(or a shell script is e)144 156 Q -.15(xe)-.15 G(cuted.) +.15 E F1 -.74(PA)108 168 S(TH)-.21 E F0 .588 +(The search path for commands.)144 168 R .587 +(It is a colon-separated list of directories in which the shell looks) +5.588 F .471(for commands \(see)144 180 R F2 .471(COMMAND EXECUTION) +2.971 F F0(belo)2.722 E 2.972(w\). A)-.25 F .472 +(zero-length \(null\) directory name in the)2.972 F -.25(va)144 192 S +.536(lue of).25 F F2 -.666(PA)3.036 G(TH)-.189 E F0 .535 +(indicates the current directory)2.786 F 5.535(.A)-.65 G .535 +(null directory name may appear as tw)-2.5 F 3.035(oa)-.1 G(djacent) +-3.035 E .867(colons, or as an initial or trailing colon.)144 204 R .868 +(The def)5.868 F .868(ault path is system-dependent, and is set by the) +-.1 F(administrator who installs)144 216 Q F1(bash)2.5 E F0 5(.A)C +(common v)-2.5 E(alue is)-.25 E/F3 10/Courier@0 SF +(/usr/local/bin:/usr/lo-)2.5 E(cal/sbin:/usr/bin:/usr/sbin:/bin:/sbin) +144 228 Q F0(.)A F1(POSIXL)108 240 Q(Y_CORRECT)-.92 E F0 .471(If this v) +144 252 R .471(ariable is in the en)-.25 F .471(vironment when)-.4 F F1 +(bash)2.971 E F0 .471(starts, the shell enters)2.971 F/F4 10 +/Times-Italic@0 SF .472(posix mode)2.972 F F0 .472(before reading)2.972 +F .011(the startup \214les, as if the)144 264 R F1(\255\255posix)2.511 E +F0(in)2.511 E -.2(vo)-.4 G .011(cation option had been supplied.).2 F +.011(If it is set while the shell is)5.011 F(running,)144 276 Q F1(bash) +4.497 E F0(enables)4.497 E F4 1.997(posix mode)4.497 F F0 4.497(,a)C +4.497(si)-4.497 G 4.497(ft)-4.497 G 1.997(he command)-4.497 F F3 1.997 +(set -o posix)4.497 F F0 1.998(had been e)4.497 F -.15(xe)-.15 G(cuted.) +.15 E(When the shell enters)144 288 Q F4(posix mode)2.5 E F0 2.5(,i)C +2.5(ts)-2.5 G(ets this v)-2.5 E(ariable if it w)-.25 E +(as not already set.)-.1 E F1(PR)108 300 Q(OMPT_COMMAND)-.3 E F0 .155 +(If this v)144 312 R .155(ariable is set, and is an array)-.25 F 2.655 +(,t)-.65 G .155(he v)-2.655 F .155(alue of each set element is e)-.25 F +-.15(xe)-.15 G .155(cuted as a command prior).15 F .407 +(to issuing each primary prompt.)144 324 R .407(If this is set b)5.407 F +.407(ut not an array v)-.2 F .407(ariable, its v)-.25 F .407 +(alue is used as a com-)-.25 F(mand to e)144 336 Q -.15(xe)-.15 G +(cute instead.).15 E F1(PR)108 348 Q(OMPT_DIR)-.3 E(TRIM)-.4 E F0 .676 +(If set to a number greater than zero, the v)144 360 R .676 +(alue is used as the number of trailing directory compo-)-.25 F .923 +(nents to retain when e)144 372 R .923(xpanding the)-.15 F F1(\\w)3.423 +E F0(and)3.423 E F1(\\W)3.423 E F0 .923(prompt string escapes \(see) +3.423 F F2(PR)3.423 E(OMPTING)-.27 E F0(belo)3.173 E(w\).)-.25 E +(Characters remo)144 384 Q -.15(ve)-.15 G 2.5(da).15 G +(re replaced with an ellipsis.)-2.5 E F1(PS0)108 396 Q F0 1.174(The v) +144 396 R 1.174(alue of this parameter is e)-.25 F 1.174(xpanded \(see) +-.15 F F2(PR)3.674 E(OMPTING)-.27 E F0(belo)3.424 E 1.174 +(w\) and displayed by interacti)-.25 F -.15(ve)-.25 G +(shells after reading a command and before the command is e)144 408 Q +-.15(xe)-.15 G(cuted.).15 E F1(PS1)108 420 Q F0 .064(The v)144 420 R +.065(alue of this parameter is e)-.25 F .065(xpanded \(see)-.15 F F2(PR) +2.565 E(OMPTING)-.27 E F0(belo)2.315 E .065 +(w\) and used as the primary prompt)-.25 F 2.5(string. The)144 432 R +(def)2.5 E(ault v)-.1 E(alue is `)-.25 E(`)-.74 E F1(\\s\255\\v\\$)A F0 +-.74('')2.5 G(.).74 E F1(PS2)108 444 Q F0 .118(The v)144 444 R .118 +(alue of this parameter is e)-.25 F .118(xpanded as with)-.15 F F2(PS1) +2.617 E F0 .117(and used as the secondary prompt string.)2.367 F(The) +5.117 E(def)144 456 Q(ault is `)-.1 E(`)-.74 E F1(>)A F0 -.74('')2.5 G +(.).74 E F1(PS3)108 468 Q F0 1.115(The v)144 468 R 1.115 +(alue of this parameter is used as the prompt for the)-.25 F F1(select) +3.615 E F0 1.116(command \(see)3.616 F F2 1.116(SHELL GRAM-)3.616 F(MAR) +144 480 Q F0(abo)2.25 E -.15(ve)-.15 G(\).).15 E F1(PS4)108 492 Q F0 +.101(The v)144 492 R .101(alue of this parameter is e)-.25 F .101 +(xpanded as with)-.15 F F2(PS1)2.6 E F0 .1(and the v)2.35 F .1 +(alue is printed before each command)-.25 F F1(bash)144 504 Q F0 .334 +(displays during an e)2.834 F -.15(xe)-.15 G .335(cution trace.).15 F +.335(The \214rst character of the e)5.335 F .335(xpanded v)-.15 F .335 +(alue of)-.25 F F2(PS4)2.835 E F0 .335(is repli-)2.585 F +(cated multiple times, as necessary)144 516 Q 2.5(,t)-.65 G 2.5(oi)-2.5 +G(ndicate multiple le)-2.5 E -.15(ve)-.25 G(ls of indirection.).15 E +(The def)5 E(ault is `)-.1 E(`)-.74 E F1(+)A F0 -.74('')2.5 G(.).74 E F1 +(SHELL)108 528 Q F0 .543(This v)144 540 R .543(ariable e)-.25 F .543 +(xpands to the full pathname to the shell.)-.15 F .542 +(If it is not set when the shell starts,)5.543 F F1(bash)3.042 E F0 +(assigns to it the full pathname of the current user')144 552 Q 2.5(sl) +-.55 G(ogin shell.)-2.5 E F1(TIMEFORMA)108 564 Q(T)-.95 E F0 .826(The v) +144 576 R .826 +(alue of this parameter is used as a format string specifying ho)-.25 F +3.327(wt)-.25 G .827(he timing information for)-3.327 F .649 +(pipelines pre\214x)144 588 R .649(ed with the)-.15 F F1(time)3.149 E F0 +(reserv)3.149 E .649(ed w)-.15 F .648(ord should be displayed.)-.1 F +(The)5.648 E F1(%)3.148 E F0 .648(character introduces)3.148 F .711 +(an escape sequence that is e)144 600 R .711(xpanded to a time v)-.15 F +.712(alue or other information.)-.25 F .712(The escape sequences)5.712 F +(and their meanings are as follo)144 612 Q +(ws; the braces denote optional portions.)-.25 E F1(%%)144 630 Q F0 2.5 +(Al)194 630 S(iteral)-2.5 E F1(%)2.5 E F0(.)A F1(%[)144 642 Q F4(p)A F1 +(][l]R)A F0(The elapsed time in seconds.)194 642 Q F1(%[)144 654 Q F4(p) +A F1(][l]U)A F0(The number of CPU seconds spent in user mode.)194 654 Q +F1(%[)144 666 Q F4(p)A F1(][l]S)A F0 +(The number of CPU seconds spent in system mode.)194 666 Q F1(%P)144 678 +Q F0(The CPU percentage, computed as \(%U + %S\) / %R.)194 678 Q .87 +(The optional)144 694.8 R F4(p)3.37 E F0 .87(is a digit specifying the) +3.37 F F4(pr)3.37 E(ecision)-.37 E F0 3.37(,t)C .87 +(he number of fractional digits after a decimal)-3.37 F 2.525(point. A) +144 706.8 R -.25(va)2.525 G .025 +(lue of 0 causes no decimal point or fraction to be output.).25 F .026 +(At most three places after the)5.025 F .538 +(decimal point may be speci\214ed; v)144 718.8 R .538(alues of)-.25 F F4 +(p)3.038 E F0 .537(greater than 3 are changed to 3.)3.037 F(If)5.537 E +F4(p)3.037 E F0 .537(is not speci\214ed,)3.037 F(the v)144 730.8 Q +(alue 3 is used.)-.25 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E +(18)190.395 E 0 Cg EP +%%Page: 19 19 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .667(The optional) +144 84 R/F1 10/Times-Bold@0 SF(l)3.167 E F0 .668 +(speci\214es a longer format, including minutes, of the form)3.168 F/F2 +10/Times-Italic@0 SF(MM)3.168 E F0(m)A F2(SS)A F0(.)A F2(FF)A F0 3.168 +(s. The)B -.25(va)3.168 G(lue).25 E(of)144 96 Q F2(p)2.5 E F0 +(determines whether or not the fraction is included.)2.5 E 13.365 +(If this v)144 112.8 R 13.365(ariable is not set,)-.25 F F1(bash)15.865 +E F0 13.364(acts as if it had the v)15.865 F(alue)-.25 E F1($\010\\nr) +144 124.8 Q(eal\\t%3lR\\nuser\\t%3lU\\nsys\\t%3lS\010)-.18 E F0 7.113 +(.I)C 4.613(ft)-7.113 G 2.113(he v)-4.613 F 2.113 +(alue is null, no timing information is dis-)-.25 F 2.5(played. A)144 +136.8 R(trailing ne)2.5 E +(wline is added when the format string is displayed.)-.25 E F1(TMOUT)108 +148.8 Q F0 .941(If set to a v)144 160.8 R .941(alue greater than zero,) +-.25 F/F3 9/Times-Bold@0 SF(TMOUT)3.441 E F0 .941(is treated as the def) +3.191 F .941(ault timeout for the)-.1 F F1 -.18(re)3.441 G(ad).18 E F0 +-.2(bu)3.441 G(iltin.).2 E(The)144 172.8 Q F1(select)2.81 E F0 .31 +(command terminates if input does not arri)2.81 F .611 -.15(ve a)-.25 H +(fter).15 E F3(TMOUT)2.811 E F0 .311(seconds when input is com-)2.561 F +.886(ing from a terminal.)144 184.8 R .886(In an interacti)5.886 F 1.185 +-.15(ve s)-.25 H .885(hell, the v).15 F .885 +(alue is interpreted as the number of seconds to)-.25 F -.1(wa)144 196.8 +S 1.05(it for a line of input after issuing the primary prompt.).1 F F1 +(Bash)6.05 E F0 1.05(terminates after w)3.55 F 1.05(aiting for that)-.1 +F(number of seconds if a complete line of input does not arri)144 208.8 +Q -.15(ve)-.25 G(.).15 E F1(TMPDIR)108 220.8 Q F0 .391(If set,)144 232.8 +R F1(bash)2.891 E F0 .391(uses its v)2.891 F .391 +(alue as the name of a directory in which)-.25 F F1(bash)2.89 E F0 .39 +(creates temporary \214les for the)2.89 F(shell')144 244.8 Q 2.5(su)-.55 +G(se.)-2.5 E F1(auto_r)108 256.8 Q(esume)-.18 E F0 .53(This v)144 268.8 +R .53(ariable controls ho)-.25 F 3.03(wt)-.25 G .531 +(he shell interacts with the user and job control.)-3.03 F .531 +(If this v)5.531 F .531(ariable is set,)-.25 F .539(single w)144 280.8 R +.538(ord simple commands without redirections are treated as candidates\ + for resumption of an)-.1 F -.15(ex)144 292.8 S .366(isting stopped job) +.15 F 5.366(.T)-.4 G .366(here is no ambiguity allo)-5.366 F .366 +(wed; if there is more than one job be)-.25 F .367(ginning with)-.15 F +1.125(the string typed, the job most recently accessed is selected.)144 +304.8 R(The)6.125 E F2(name)3.985 E F0 1.124(of a stopped job, in this) +3.805 F(conte)144 316.8 Q 1.132 +(xt, is the command line used to start it.)-.15 F 1.133(If set to the v) +6.133 F(alue)-.25 E F2 -.2(ex)3.633 G(act).2 E F0 3.633(,t).68 G 1.133 +(he string supplied must)-3.633 F .606 +(match the name of a stopped job e)144 328.8 R .606(xactly; if set to) +-.15 F F2(substring)3.445 E F0 3.105(,t).22 G .605 +(he string supplied needs to match a)-3.105 F .884 +(substring of the name of a stopped job)144 340.8 R 5.884(.T)-.4 G(he) +-5.884 E F2(substring)3.724 E F0 -.25(va)3.604 G .885(lue pro).25 F .885 +(vides functionality analogous to)-.15 F(the)144 352.8 Q F1(%?)3.334 E +F0 .834(job identi\214er \(see)5.834 F F3 .834(JOB CONTR)3.334 F(OL)-.27 +E F0(belo)3.084 E 3.334(w\). If)-.25 F .834(set to an)3.334 F 3.334(yo) +-.15 G .834(ther v)-3.334 F .833(alue, the supplied string)-.25 F .315 +(must be a pre\214x of a stopped job')144 364.8 R 2.816(sn)-.55 G .316 +(ame; this pro)-2.816 F .316(vides functionality analogous to the)-.15 F +F1(%)2.816 E F2(string)A F0(job)2.816 E(identi\214er)144 376.8 Q(.)-.55 +E F1(histchars)108 388.8 Q F0 .546(The tw)144 400.8 R 3.046(oo)-.1 G +3.046(rt)-3.046 G .546(hree characters which control history e)-3.046 F +.545(xpansion and tok)-.15 F .545(enization \(see)-.1 F F3(HIST)3.045 E +(OR)-.162 E 2.795(YE)-.315 G(X-)-2.795 E -.666(PA)144 412.8 S(NSION).666 +E F0(belo)2.987 E 3.237(w\). The)-.25 F .737(\214rst character is the) +3.237 F F2 .737(history e)3.237 F(xpansion)-.2 E F0(character)3.238 E +3.238(,t)-.4 G .738(he character which sig-)-3.238 F .761 +(nals the start of a history e)144 424.8 R .761(xpansion, normally `) +-.15 F F1(!)A F0 3.261('. The)B .76(second character is the)3.261 F F2 +(quic)3.26 E 3.26(ks)-.2 G(ubstitution)-3.26 E F0(character)144 436.8 Q +3.476(,w)-.4 G .977(hich is used as shorthand for re-running the pre) +-3.476 F .977(vious command entered, substituting)-.25 F .131 +(one string for another in the command.)144 448.8 R .131(The def)5.131 F +.131(ault is `)-.1 F F1(^)A F0 2.63('. The)B .13 +(optional third character is the char)2.63 F(-)-.2 E .276(acter which i\ +ndicates that the remainder of the line is a comment when found as the \ +\214rst character)144 460.8 R .46(of a w)144 472.8 R .46 +(ord, normally `)-.1 F F1(#)A F0 2.959('. The)B .459 +(history comment character causes history substitution to be skipped) +2.959 F .466(for the remaining w)144 484.8 R .466(ords on the line.)-.1 +F .467(It does not necessarily cause the shell parser to treat the rest) +5.467 F(of the line as a comment.)144 496.8 Q F1(Arrays)87 513.6 Q(Bash) +108 525.6 Q F0(pro)3.391 E .891(vides one-dimensional inde)-.15 F -.15 +(xe)-.15 G 3.391(da).15 G .891(nd associati)-3.391 F 1.191 -.15(ve a) +-.25 H .891(rray v).15 F 3.391(ariables. An)-.25 F 3.391(yv)-.15 G .89 +(ariable may be used as an)-3.641 F(inde)108 537.6 Q -.15(xe)-.15 G +2.573(da).15 G .073(rray; the)-2.573 F F1(declar)2.573 E(e)-.18 E F0 -.2 +(bu)2.573 G .073(iltin will e).2 F .073(xplicitly declare an array)-.15 +F 5.073(.T)-.65 G .074(here is no maximum limit on the size of)-5.073 F +.329(an array)108 549.6 R 2.829(,n)-.65 G .329(or an)-2.829 F 2.829(yr) +-.15 G .329(equirement that members be inde)-2.829 F -.15(xe)-.15 G +2.829(do).15 G 2.829(ra)-2.829 G .328(ssigned contiguously)-2.829 F +5.328(.I)-.65 G(nde)-5.328 E -.15(xe)-.15 G 2.828(da).15 G .328 +(rrays are refer)-2.828 F(-)-.2 E 1.595(enced using inte)108 561.6 R +1.595(gers \(including arithmetic e)-.15 F 1.595 +(xpressions\) and are zero-based; associati)-.15 F 1.895 -.15(ve a)-.25 +H 1.595(rrays are refer).15 F(-)-.2 E(enced using arbitrary strings.)108 +573.6 Q(Unless otherwise noted, inde)5 E -.15(xe)-.15 G 2.5(da).15 G +(rray indices must be non-ne)-2.5 E -.05(ga)-.15 G(ti).05 E .3 -.15 +(ve i)-.25 H(nte).15 E(gers.)-.15 E 2.463(An inde)108 590.4 R -.15(xe) +-.15 G 4.963(da).15 G 2.463(rray is created automatically if an)-4.963 F +4.963(yv)-.15 G 2.462(ariable is assigned to using the syntax)-5.213 F +F2(name)4.962 E F0([)A F2(sub-)A(script)108 602.4 Q F0(]=)A F2(value)A +F0 5.506(.T)C(he)-5.506 E F2(subscript)3.346 E F0 .507 +(is treated as an arithmetic e)3.687 F .507(xpression that must e)-.15 F +-.25(va)-.25 G .507(luate to a number).25 F 5.507(.T)-.55 G 3.007(oe) +-6.307 G(x-)-3.157 E 1.193(plicitly declare an inde)108 614.4 R -.15(xe) +-.15 G 3.693(da).15 G(rray)-3.693 E 3.693(,u)-.65 G(se)-3.693 E F1 +(declar)3.693 E 3.693<65ad>-.18 G(a)-3.693 E F2(name)3.693 E F0(\(see) +3.692 E F3 1.192(SHELL B)3.692 F(UIL)-.09 E 1.192(TIN COMMANDS)-.828 F +F0(belo)3.442 E(w\).)-.25 E F1(de-)6.192 E(clar)108 626.4 Q 2.5<65ad> +-.18 G(a)-2.5 E F2(name)2.5 E F1([)A F2(subscript)A F1(])A F0 +(is also accepted; the)2.5 E F2(subscript)2.5 E F0(is ignored.)2.5 E +(Associati)108 643.2 Q .3 -.15(ve a)-.25 H(rrays are created using).15 E +F1(declar)2.5 E 2.5<65ad>-.18 G(A)-2.5 E F2(name)2.5 E F0(.)A(Attrib)108 +660 Q .94(utes may be speci\214ed for an array v)-.2 F .941 +(ariable using the)-.25 F F1(declar)3.441 E(e)-.18 E F0(and)3.441 E F1 +-.18(re)3.441 G(adonly).18 E F0 -.2(bu)3.441 G 3.441(iltins. Each).2 F +(attrib)3.441 E(ute)-.2 E(applies to all members of an array)108 672 Q +(.)-.65 E 1.647 +(Arrays are assigned to using compound assignments of the form)108 688.8 +R F2(name)4.147 E F0(=)A F1(\()A F0 -.25(va)C(lue).25 E F2(1)A F0 1.647 +(... v)4.147 F(alue)-.25 E F2(n)A F1(\))A F0 4.147(,w)C 1.647(here each) +-4.147 F F2(value)108 700.8 Q F0 .211(may be of the form [)2.711 F F2 +(subscript)A F0(]=)A F2(string)A F0 5.211(.I)C(nde)-5.211 E -.15(xe)-.15 +G 2.711(da).15 G .212(rray assignments do not require an)-2.711 F .212 +(ything b)-.15 F(ut)-.2 E F2(string)2.712 E F0(.)A(Each)108 712.8 Q F2 +(value)2.53 E F0 .029(in the list is e)2.529 F .029 +(xpanded using all the shell e)-.15 F .029(xpansions described belo)-.15 +F 2.529(wu)-.25 G(nder)-2.529 E F3(EXP)2.529 E(ANSION)-.666 E/F4 9 +/Times-Roman@0 SF(.)A F0(When)4.529 E .995(assigning to inde)108 724.8 R +-.15(xe)-.15 G 3.495(da).15 G .995(rrays, if the optional brack)-3.495 F +.996(ets and subscript are supplied, that inde)-.1 F 3.496(xi)-.15 G +3.496(sa)-3.496 G .996(ssigned to;)-3.496 F(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(19)190.395 E 0 Cg EP +%%Page: 20 20 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .417 +(otherwise the inde)108 84 R 2.917(xo)-.15 G 2.917(ft)-2.917 G .417 +(he element assigned is the last inde)-2.917 F 2.917(xa)-.15 G .416 +(ssigned to by the statement plus one.)-2.917 F(Inde)5.416 E(x-)-.15 E +(ing starts at zero.)108 96 Q 1.288(When assigning to an associati)108 +112.8 R 1.588 -.15(ve a)-.25 H(rray).15 E 3.788(,t)-.65 G 1.288(he w) +-3.788 F 1.288(ords in a compound assignment may be either assignment) +-.1 F .608 +(statements, for which the subscript is required, or a list of w)108 +124.8 R .608(ords that is interpreted as a sequence of alter)-.1 F(-)-.2 +E 1.956(nating k)108 136.8 R -.15(ey)-.1 G 4.456(sa).15 G 1.956(nd v) +-4.456 F(alues:)-.25 E/F1 10/Times-Italic@0 SF(name)4.456 E F0(=)A/F2 10 +/Times-Bold@0 SF(\()A F1 -.1(ke)4.456 G 1.957(y1 value1 k)-.2 F -.3(ey) +-.1 G 4.457(2v).3 G(alue2)-4.457 E F0(...)4.457 E F2(\))A F0 6.957(.T)C +1.957(hese are treated identically to)-6.957 F F1(name)4.457 E F0(=)A F2 +(\()A F0([)108 148.8 Q F1 -.1(ke)C(y1)-.2 E F0(]=)A F1(value1)A F0([) +3.133 E F1 -.1(ke)C(y2)-.2 E F0(]=)A F1(value2)A F0(...)3.133 E F2(\))A +F0 5.633(.T)C .633(he \214rst w)-5.633 F .633 +(ord in the list determines ho)-.1 F 3.132(wt)-.25 G .632 +(he remaining w)-3.132 F .632(ords are inter)-.1 F(-)-.2 E .153 +(preted; all assignments in a list must be of the same type.)108 160.8 R +.154(When using k)5.154 F -.15(ey)-.1 G(/v).15 E .154(alue pairs, the k) +-.25 F -.15(ey)-.1 G 2.654(sm).15 G .154(ay not be)-2.654 F +(missing or empty; a \214nal missing v)108 172.8 Q(alue is treated lik) +-.25 E 2.5(et)-.1 G(he empty string.)-2.5 E .24 +(This syntax is also accepted by the)108 189.6 R F2(declar)2.74 E(e)-.18 +E F0 -.2(bu)2.739 G 2.739(iltin. Indi).2 F .239 +(vidual array elements may be assigned to using the)-.25 F F1(name)108 +201.6 Q F0([)A F1(subscript)A F0(]=)A F1(value)A F0 1.917 +(syntax introduced abo)4.416 F -.15(ve)-.15 G 6.917(.W).15 G 1.917 +(hen assigning to an inde)-6.917 F -.15(xe)-.15 G 4.417(da).15 G(rray) +-4.417 E 4.417(,i)-.65 G(f)-4.417 E F1(name)4.777 E F0 1.917(is sub-) +4.597 F .116(scripted by a ne)108 213.6 R -.05(ga)-.15 G(ti).05 E .416 +-.15(ve n)-.25 H(umber).15 E 2.616(,t)-.4 G .115 +(hat number is interpreted as relati)-2.616 F .415 -.15(ve t)-.25 H +2.615(oo).15 G .115(ne greater than the maximum inde)-2.615 F(x)-.15 E +(of)108 225.6 Q F1(name)2.676 E F0 2.676(,s)C 2.676(on)-2.676 G -2.25 +-.15(eg a)-2.676 H(ti).15 E .476 -.15(ve i)-.25 H .177 +(ndices count back from the end of the array).15 F 2.677(,a)-.65 G .177 +(nd an inde)-2.677 F 2.677(xo)-.15 G 2.677<66ad>-2.677 G 2.677(1r)-2.677 +G .177(eferences the last el-)-2.677 F(ement.)108 237.6 Q(An)108 254.4 Q +3.576(ye)-.15 G 1.076(lement of an array may be referenced using ${) +-3.576 F F1(name)A F0([)A F1(subscript)A F0 3.575(]}. The)B 1.075 +(braces are required to a)3.575 F -.2(vo)-.2 G(id).2 E 1.541 +(con\215icts with pathname e)108 266.4 R 4.041(xpansion. If)-.15 F F1 +(subscript)4.041 E F0(is)4.041 E F2(@)4.041 E F0(or)4.041 E F2(*)4.041 E +F0 4.041(,t)C 1.541(he w)-4.041 F 1.541(ord e)-.1 F 1.541 +(xpands to all members of)-.15 F F1(name)4.042 E F0(.)A 1.057 +(These subscripts dif)108 278.4 R 1.057(fer only when the w)-.25 F 1.057 +(ord appears within double quotes.)-.1 F 1.056(If the w)6.056 F 1.056 +(ord is double-quoted,)-.1 F(${)108 290.4 Q F1(name)A F0 .52([*]} e)B +.52(xpands to a single w)-.15 F .52(ord with the v)-.1 F .521 +(alue of each array member separated by the \214rst character)-.25 F +1.375(of the)108 302.4 R/F3 9/Times-Bold@0 SF(IFS)3.875 E F0 1.375 +(special v)3.625 F 1.375(ariable, and ${)-.25 F F1(name)A F0 1.375 +([@]} e)B 1.375(xpands each element of)-.15 F F1(name)3.875 E F0 1.374 +(to a separate w)3.875 F 3.874(ord. When)-.1 F 2.027 +(there are no array members, ${)108 314.4 R F1(name)A F0 2.028([@]} e)B +2.028(xpands to nothing.)-.15 F 2.028(If the double-quoted e)7.028 F +2.028(xpansion occurs)-.15 F .759(within a w)108 326.4 R .759 +(ord, the e)-.1 F .759 +(xpansion of the \214rst parameter is joined with the be)-.15 F .759 +(ginning part of the original w)-.15 F(ord,)-.1 E .515(and the e)108 +338.4 R .516(xpansion of the last parameter is joined with the last par\ +t of the original w)-.15 F 3.016(ord. This)-.1 F .516(is analogous)3.016 +F .228(to the e)108 350.4 R .228(xpansion of the special parameters)-.15 +F F2(*)2.728 E F0(and)2.728 E F2(@)2.728 E F0(\(see)2.728 E F2 .228 +(Special P)2.728 F(arameters)-.1 E F0(abo)2.727 E -.15(ve)-.15 G 2.727 +(\). ${#).15 F F1(name)A F0([)A F1(subscript)A F0(]})A -.15(ex)108 362.4 +S .886(pands to the length of ${).15 F F1(name)A F0([)A F1(subscript)A +F0 3.386(]}. If)B F1(subscript)3.386 E F0(is)3.386 E F2(*)3.386 E F0(or) +3.386 E F2(@)3.386 E F0 3.386(,t)C .886(he e)-3.386 F .886 +(xpansion is the number of ele-)-.15 F .295(ments in the array)108 374.4 +R 5.295(.I)-.65 G 2.795(ft)-5.295 G(he)-2.795 E F1(subscript)3.135 E F0 +.295(used to reference an element of an inde)3.475 F -.15(xe)-.15 G +2.794(da).15 G .294(rray e)-2.794 F -.25(va)-.25 G .294 +(luates to a number).25 F .628 +(less than zero, it is interpreted as relati)108 386.4 R .928 -.15(ve t) +-.25 H 3.128(oo).15 G .629(ne greater than the maximum inde)-3.128 F +3.129(xo)-.15 G 3.129(ft)-3.129 G .629(he array)-3.129 F 3.129(,s)-.65 G +3.129(on)-3.129 G -2.25 -.15(eg a)-3.129 H(ti).15 E -.15(ve)-.25 G +(indices count back from the end of the array)108 398.4 Q 2.5(,a)-.65 G +(nd an inde)-2.5 E 2.5(xo)-.15 G 2.5<66ad>-2.5 G 2.5(1r)-2.5 G +(eferences the last element.)-2.5 E .595(Referencing an array v)108 +415.2 R .595(ariable without a subscript is equi)-.25 F -.25(va)-.25 G +.595(lent to referencing the array with a subscript of).25 F 2.5(0. An) +108 427.2 R 2.5(yr)-.15 G(eference to a v)-2.5 E(ariable using a v)-.25 +E(alid subscript is le)-.25 E -.05(ga)-.15 G(l, and).05 E F2(bash)2.5 E +F0(will create an array if necessary)2.5 E(.)-.65 E(An array v)108 444 Q +(ariable is considered set if a subscript has been assigned a v)-.25 E +2.5(alue. The)-.25 F(null string is a v)2.5 E(alid v)-.25 E(alue.)-.25 E +.417(It is possible to obtain the k)108 460.8 R -.15(ey)-.1 G 2.918(s\() +.15 G .418(indices\) of an array as well as the v)-2.918 F 2.918 +(alues. ${)-.25 F F2(!)A F1(name)A F0([)A F1(@)A F0 .418(]} and ${)B F2 +(!)A F1(name)A F0([)A F1(*)A F0(]})A -.15(ex)108 472.8 S .75 +(pand to the indices assigned in array v).15 F(ariable)-.25 E F1(name) +3.249 E F0 5.749(.T)C .749 +(he treatment when in double quotes is similar to)-5.749 F(the e)108 +484.8 Q(xpansion of the special parameters)-.15 E F1(@)2.5 E F0(and)2.5 +E F1(*)2.5 E F0(within double quotes.)2.5 E(The)108 501.6 Q F2(unset) +2.766 E F0 -.2(bu)2.766 G .267(iltin is used to destro).2 F 2.767(ya)-.1 +G(rrays.)-2.767 E F2(unset)5.267 E F1(name)2.767 E F0([)A F1(subscript)A +F0 2.767(]d)C(estro)-2.767 E .267(ys the array element at inde)-.1 F(x) +-.15 E F1(sub-)2.767 E(script)108 513.6 Q F0 2.858(,f)C .358 +(or both inde)-2.858 F -.15(xe)-.15 G 2.858(da).15 G .358(nd associati) +-2.858 F .658 -.15(ve a)-.25 H 2.858(rrays. Ne).15 F -.05(ga)-.15 G(ti) +.05 E .658 -.15(ve s)-.25 H .358(ubscripts to inde).15 F -.15(xe)-.15 G +2.858(da).15 G .358(rrays are interpreted as de-)-2.858 F 1.204 +(scribed abo)108 525.6 R -.15(ve)-.15 G 6.204(.U).15 G 1.204 +(nsetting the last element of an array v)-6.204 F 1.205 +(ariable does not unset the v)-.25 F(ariable.)-.25 E F2(unset)6.205 E F1 +(name)3.705 E F0(,)A(where)108 537.6 Q F1(name)2.5 E F0(is an array)2.5 +E 2.5(,o)-.65 G(r)-2.5 E F2(unset)2.5 E F1(name)2.5 E F0([)A F1 +(subscript)A F0(], where)A F1(subscript)2.5 E F0(is)2.5 E F2(*)2.5 E F0 +(or)2.5 E F2(@)2.5 E F0 2.5(,r)C(emo)-2.5 E -.15(ve)-.15 G 2.5(st).15 G +(he entire array)-2.5 E(.)-.65 E .029(When using a v)108 554.4 R .029 +(ariable name with a subscript as an ar)-.25 F .028 +(gument to a command, such as with)-.18 F F2(unset)2.528 E F0 2.528(,w)C +.028(ithout us-)-2.528 F .937(ing the w)108 566.4 R .937(ord e)-.1 F +.937(xpansion syntax described abo)-.15 F -.15(ve)-.15 G 3.437(,t).15 G +.937(he ar)-3.437 F .938(gument is subject to pathname e)-.18 F 3.438 +(xpansion. If)-.15 F(path-)3.438 E(name e)108 578.4 Q +(xpansion is not desired, the ar)-.15 E(gument should be quoted.)-.18 E +(The)108 595.2 Q F2(declar)2.684 E(e)-.18 E F0(,)A F2(local)2.684 E F0 +2.684(,a)C(nd)-2.684 E F2 -.18(re)2.684 G(adonly).18 E F0 -.2(bu)2.684 G +.184(iltins each accept a).2 F F22.684 E F0 .184 +(option to specify an inde)2.684 F -.15(xe)-.15 G 2.683(da).15 G .183 +(rray and a)-2.683 F F22.683 E F0(op-)2.683 E .041 +(tion to specify an associati)108 607.2 R .341 -.15(ve a)-.25 H(rray).15 +E 5.041(.I)-.65 G 2.541(fb)-5.041 G .041(oth options are supplied,) +-2.541 F F22.541 E F0(tak)2.541 E .041(es precedence.)-.1 F(The) +5.041 E F2 -.18(re)2.542 G(ad).18 E F0 -.2(bu)2.542 G .042(iltin ac-).2 +F .864(cepts a)108 619.2 R F23.364 E F0 .864 +(option to assign a list of w)3.364 F .864 +(ords read from the standard input to an array)-.1 F 5.863(.T)-.65 G(he) +-5.863 E F2(set)3.363 E F0(and)3.363 E F2(declar)3.363 E(e)-.18 E F0 -.2 +(bu)108 631.2 S(iltins display array v).2 E(alues in a w)-.25 E +(ay that allo)-.1 E(ws them to be reused as assignments.)-.25 E/F4 10.95 +/Times-Bold@0 SF(EXP)72 648 Q(ANSION)-.81 E F0 .76(Expansion is perform\ +ed on the command line after it has been split into w)108 660 R 3.26 +(ords. There)-.1 F .76(are se)3.26 F -.15(ve)-.25 G 3.26(nk).15 G .76 +(inds of)-3.26 F -.15(ex)108 672 S .201(pansion performed:).15 F F1(br) +2.971 E .201(ace e)-.15 F(xpansion)-.2 E F0(,).24 E F1 .201(tilde e) +2.831 F(xpansion)-.2 E F0(,).24 E F1(par)3.951 E .201 +(ameter and variable e)-.15 F(xpansion)-.2 E F0(,).24 E F1 .2 +(command sub-)2.901 F(stitution)108 684 Q F0(,).24 E F1(arithmetic e) +2.83 E(xpansion)-.2 E F0(,).24 E F1(wor)2.84 E 2.5(ds)-.37 G(plitting) +-2.5 E F0 2.5(,a).22 G(nd)-2.5 E F1(pathname e)3.75 E(xpansion)-.2 E F0 +(.).24 E .418(The order of e)108 700.8 R .418(xpansions is: brace e)-.15 +F .418(xpansion; tilde e)-.15 F .419(xpansion, parameter and v)-.15 F +.419(ariable e)-.25 F .419(xpansion, arithmetic)-.15 F -.15(ex)108 712.8 +S .196(pansion, and command substitution \(done in a left-to-right f).15 +F .195(ashion\); w)-.1 F .195(ord splitting; and pathname e)-.1 F(xpan-) +-.15 E(sion.)108 724.8 Q(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E +(20)190.395 E 0 Cg EP +%%Page: 21 21 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .257 +(On systems that can support it, there is an additional e)108 84 R .257 +(xpansion a)-.15 F -.25(va)-.2 G(ilable:).25 E/F1 10/Times-Italic@0 SF +(pr)2.757 E .257(ocess substitution)-.45 F F0 5.257(.T)C .257 +(his is per)-5.257 F(-)-.2 E +(formed at the same time as tilde, parameter)108 96 Q 2.5(,v)-.4 G +(ariable, and arithmetic e)-2.75 E(xpansion and command substitution.) +-.15 E .003(After these e)108 112.8 R .003 +(xpansions are performed, quote characters present in the original w) +-.15 F .002(ord are remo)-.1 F -.15(ve)-.15 G 2.502(du).15 G .002 +(nless the)-2.502 F(y)-.15 E(ha)108 124.8 Q .3 -.15(ve b)-.2 H +(een quoted themselv).15 E(es \()-.15 E F1(quote r)A(emo)-.37 E(val)-.1 +E F0(\).)A .171(Only brace e)108 141.6 R .171(xpansion, w)-.15 F .171 +(ord splitting, and pathname e)-.1 F .171 +(xpansion can increase the number of w)-.15 F .172(ords of the e)-.1 F +(x-)-.15 E .777(pansion; other e)108 153.6 R .776(xpansions e)-.15 F +.776(xpand a single w)-.15 F .776(ord to a single w)-.1 F 3.276 +(ord. The)-.1 F .776(only e)3.276 F .776(xceptions to this are the e) +-.15 F(x-)-.15 E .695(pansions of ")108 165.6 R/F2 10/Times-Bold@0 SF +($@)A F0 3.195("a)C .695(nd ")-3.195 F F2(${)A F1(name)A F2([@]})A F0 +.696(", and, in most cases,)B F2($*)3.196 E F0(and)3.196 E F2(${)3.196 E +F1(name)A F2([*]})A F0 .696(as e)3.196 F .696(xplained abo)-.15 F .996 +-.15(ve \()-.15 H(see).15 E/F3 9/Times-Bold@0 SF -.666(PA)3.196 G(-).666 +E(RAMETERS)108 177.6 Q/F4 9/Times-Roman@0 SF(\).)A F2(Brace Expansion)87 +194.4 Q F1(Br)108.58 206.4 Q .606(ace e)-.15 F(xpansion)-.2 E F0 .606 +(is a mechanism by which arbitrary strings may be generated.)3.346 F +.606(This mechanism is similar)5.606 F(to)108 218.4 Q F1 .415 +(pathname e)2.915 F(xpansion)-.2 E F0 2.915(,b)C .415 +(ut the \214lenames generated need not e)-3.115 F 2.915(xist. P)-.15 F +.415(atterns to be brace e)-.15 F .415(xpanded tak)-.15 F 2.915(et)-.1 G +(he)-2.915 E .074(form of an optional)108 230.4 R F1(pr)3.823 E(eamble) +-.37 E F0 2.573(,f).18 G(ollo)-2.573 E .073 +(wed by either a series of comma-separated strings or a sequence e)-.25 +F(xpres-)-.15 E .489(sion between a pair of braces, follo)108 242.4 R +.489(wed by an optional)-.25 F F1(postscript)4.239 E F0 5.49(.T).68 G +.49(he preamble is pre\214x)-5.49 F .49(ed to each string)-.15 F .659(c\ +ontained within the braces, and the postscript is then appended to each\ + resulting string, e)108 254.4 R .658(xpanding left to)-.15 F(right.)108 +266.4 Q .718(Brace e)108 283.2 R .719(xpansions may be nested.)-.15 F +.719(The results of each e)5.719 F .719 +(xpanded string are not sorted; left to right order is)-.15 F(preserv) +108 295.2 Q 2.5(ed. F)-.15 F(or e)-.15 E(xample, a)-.15 E F2({)A F0 +(d,c,b)A F2(})A F0 2.5(ee)C(xpands into `ade ace abe'.)-2.65 E 3.243(As) +108 312 S .743(equence e)-3.243 F .743(xpression tak)-.15 F .743 +(es the form)-.1 F F2({)3.243 E F1(x)A F2(..)A F1(y)A F2([..)A F1(incr)A +F2(]})A F0 3.243(,w)C(here)-3.243 E F1(x)3.243 E F0(and)3.242 E F1(y) +3.242 E F0 .742(are either inte)3.242 F .742(gers or single characters,) +-.15 F(and)108 324 Q F1(incr)3.031 E F0 3.031(,a)C 3.032(no)-3.031 G +.532(ptional increment, is an inte)-3.032 F(ger)-.15 E 5.532(.W)-.55 G +.532(hen inte)-5.532 F .532(gers are supplied, the e)-.15 F .532 +(xpression e)-.15 F .532(xpands to each)-.15 F .078(number between)108 +336 R F1(x)2.578 E F0(and)2.578 E F1(y)2.578 E F0 2.578(,i)C(nclusi) +-2.578 E -.15(ve)-.25 G 5.078(.S).15 G .078(upplied inte)-5.078 F .077 +(gers may be pre\214x)-.15 F .077(ed with)-.15 F F1(0)2.577 E F0 .077 +(to force each term to ha)2.577 F .377 -.15(ve t)-.2 H(he).15 E .014 +(same width.)108 348 R .014(When either)5.014 F F1(x)2.514 E F0(or)2.514 +E F1(y)2.514 E F0(be)2.514 E .015(gins with a zero, the shell attempts \ +to force all generated terms to contain)-.15 F 1.143 +(the same number of digits, zero-padding where necessary)108 360 R 6.143 +(.W)-.65 G 1.143(hen characters are supplied, the e)-6.143 F(xpression) +-.15 E -.15(ex)108 372 S 1.064(pands to each character le).15 F 1.064 +(xicographically between)-.15 F F1(x)3.564 E F0(and)3.564 E F1(y)3.564 E +F0 3.564(,i)C(nclusi)-3.564 E -.15(ve)-.25 G 3.564(,u).15 G 1.064 +(sing the def)-3.564 F 1.064(ault C locale.)-.1 F(Note)6.064 E .245 +(that both)108 384 R F1(x)2.745 E F0(and)2.745 E F1(y)2.745 E F0 .245 +(must be of the same type.)2.745 F .244 +(When the increment is supplied, it is used as the dif)5.245 F .244 +(ference be-)-.25 F(tween each term.)108 396 Q(The def)5 E +(ault increment is 1 or \2551 as appropriate.)-.1 E .581(Brace e)108 +412.8 R .581(xpansion is performed before an)-.15 F 3.081(yo)-.15 G .581 +(ther e)-3.081 F .581(xpansions, and an)-.15 F 3.082(yc)-.15 G .582 +(haracters special to other e)-3.082 F(xpansions)-.15 E .016 +(are preserv)108 424.8 R .016(ed in the result.)-.15 F .016 +(It is strictly te)5.016 F(xtual.)-.15 E F2(Bash)5.016 E F0 .015 +(does not apply an)2.516 F 2.515(ys)-.15 G .015 +(yntactic interpretation to the con-)-2.515 F(te)108 436.8 Q +(xt of the e)-.15 E(xpansion or the te)-.15 E(xt between the braces.) +-.15 E 2.501(Ac)108 453.6 S .001(orrectly-formed brace e)-2.501 F .001(\ +xpansion must contain unquoted opening and closing braces, and at least\ + one un-)-.15 F .458(quoted comma or a v)108 465.6 R .458 +(alid sequence e)-.25 F 2.958(xpression. An)-.15 F 2.958(yi)-.15 G .458 +(ncorrectly formed brace e)-2.958 F .457(xpansion is left unchanged.) +-.15 F(A)108 477.6 Q F2({)2.521 E F0(or)2.521 E F2(,)2.521 E F0 .021 +(may be quoted with a backslash to pre)2.521 F -.15(ve)-.25 G .022 +(nt its being considered part of a brace e).15 F 2.522(xpression. T)-.15 +F 2.522(oa)-.8 G -.2(vo)-2.722 G(id).2 E .172 +(con\215icts with parameter e)108 489.6 R .172(xpansion, the string)-.15 +F F2(${)2.672 E F0 .172(is not considered eligible for brace e)2.672 F +.172(xpansion, and inhibits)-.15 F(brace e)108 501.6 Q +(xpansion until the closing)-.15 E F2(})2.5 E F0(.)A 1.476(This constru\ +ct is typically used as shorthand when the common pre\214x of the strin\ +gs to be generated is)108 518.4 R(longer than in the abo)108 530.4 Q .3 +-.15(ve ex)-.15 H(ample:).15 E(mkdir /usr/local/src/bash/{old,ne)144 +547.2 Q -.65(w,)-.25 G(dist,b).65 E(ugs})-.2 E(or)108 559.2 Q(cho)144 +571.2 Q(wn root /usr/{ucb/{e)-.25 E(x,edit},lib/{e)-.15 E(x?.?*,ho)-.15 +E(w_e)-.25 E(x}})-.15 E .618(Brace e)108 588 R .618 +(xpansion introduces a slight incompatibility with historical v)-.15 F +.618(ersions of)-.15 F F2(sh)3.118 E F0(.)A F2(sh)5.618 E F0 .618 +(does not treat open-)3.118 F .247 +(ing or closing braces specially when the)108 600 R 2.747(ya)-.15 G .247 +(ppear as part of a w)-2.747 F .248(ord, and preserv)-.1 F .248 +(es them in the output.)-.15 F F2(Bash)5.248 E F0(remo)108 612 Q -.15 +(ve)-.15 G 3.53(sb).15 G 1.03(races from w)-3.53 F 1.03 +(ords as a consequence of brace e)-.1 F 3.53(xpansion. F)-.15 F 1.03 +(or e)-.15 F 1.03(xample, a w)-.15 F 1.03(ord entered to)-.1 F F2(sh) +3.53 E F0(as)3.53 E F1(\214le{1,2})108 624 Q F0 .514 +(appears identically in the output.)3.014 F .515(The same w)5.515 F .515 +(ord is output as)-.1 F F1 .515(\214le1 \214le2)4.925 F F0 .515(after e) +3.035 F .515(xpansion by)-.15 F F2(bash)3.015 E F0(.)A .437 +(If strict compatibility with)108 636 R F2(sh)2.936 E F0 .436 +(is desired, start)2.936 F F2(bash)2.936 E F0 .436(with the)2.936 F F2 +(+B)2.936 E F0 .436(option or disable brace e)2.936 F .436 +(xpansion with the)-.15 F F2(+B)108 648 Q F0(option to the)2.5 E F2(set) +2.5 E F0(command \(see)2.5 E F3(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS) +-.828 E F0(belo)2.25 E(w\).)-.25 E F2 -.18(Ti)87 664.8 S(lde Expansion) +.18 E F0 1.086(If a w)108 676.8 R 1.086(ord be)-.1 F 1.086 +(gins with an unquoted tilde character \(`)-.15 F F2(~)A F0 1.087 +('\), all of the characters preceding the \214rst unquoted)B .185(slash\ + \(or all characters, if there is no unquoted slash\) are considered a) +108 688.8 R F1(tilde-pr)2.685 E(e\214x)-.37 E F0 5.185(.I)C 2.685(fn) +-5.185 G .185(one of the characters)-2.685 F .725(in the tilde-pre\214x\ + are quoted, the characters in the tilde-pre\214x follo)108 700.8 R .726 +(wing the tilde are treated as a possible)-.25 F F1(lo)108 712.8 Q .523 +(gin name)-.1 F F0 5.523(.I)C 3.023(ft)-5.523 G .523 +(his login name is the null string, the tilde is replaced with the v) +-3.023 F .522(alue of the shell parameter)-.25 F F3(HOME)108 724.8 Q F4 +(.)A F0(If)6.735 E F3(HOME)4.735 E F0 2.236 +(is unset, the home directory of the user e)4.486 F -.15(xe)-.15 G 2.236 +(cuting the shell is substituted instead.).15 F(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(21)190.395 E 0 Cg EP +%%Page: 22 22 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(Otherwise, the ti\ +lde-pre\214x is replaced with the home directory associated with the sp\ +eci\214ed login name.)108 84 Q .093 +(If the tilde-pre\214x is a `~+', the v)108 100.8 R .092 +(alue of the shell v)-.25 F(ariable)-.25 E/F1 9/Times-Bold@0 SF(PWD) +2.592 E F0 .092(replaces the tilde-pre\214x.)2.342 F .092 +(If the tilde-pre\214x is)5.092 F 3.403(a`)108 112.8 S .903 +(~\255', the v)-3.403 F .903(alue of the shell v)-.25 F(ariable)-.25 E +F1(OLDPWD)3.404 E/F2 9/Times-Roman@0 SF(,)A F0 .904 +(if it is set, is substituted.)3.154 F .904(If the characters follo) +5.904 F .904(wing the)-.25 F .88 +(tilde in the tilde-pre\214x consist of a number)108 124.8 R/F3 10 +/Times-Italic@0 SF(N)3.38 E F0 3.38(,o)C .88(ptionally pre\214x)-3.38 F +.879(ed by a `+' or a `\255', the tilde-pre\214x is re-)-.15 F .138(pla\ +ced with the corresponding element from the directory stack, as it w)108 +136.8 R .138(ould be displayed by the)-.1 F/F4 10/Times-Bold@0 SF(dirs) +2.639 E F0 -.2(bu)2.639 G(iltin).2 E(in)108 148.8 Q -.2(vo)-.4 G -.1(ke) +.2 G 2.839(dw).1 G .338(ith the tilde-pre\214x as an ar)-2.839 F 2.838 +(gument. If)-.18 F .338(the characters follo)2.838 F .338 +(wing the tilde in the tilde-pre\214x consist)-.25 F +(of a number without a leading `+' or `\255', `+' is assumed.)108 160.8 +Q(If the login name is in)108 177.6 Q -.25(va)-.4 G(lid, or the tilde e) +.25 E(xpansion f)-.15 E(ails, the w)-.1 E(ord is unchanged.)-.1 E .166 +(Each v)108 194.4 R .167(ariable assignment is check)-.25 F .167 +(ed for unquoted tilde-pre\214x)-.1 F .167(es immediately follo)-.15 F +.167(wing a)-.25 F F4(:)2.667 E F0 .167(or the \214rst)2.667 F F4(=) +2.667 E F0 5.167(.I)C(n)-5.167 E .468(these cases, tilde e)108 206.4 R +.468(xpansion is also performed.)-.15 F(Consequently)5.467 E 2.967(,o) +-.65 G .467(ne may use \214lenames with tildes in assign-)-2.967 F +(ments to)108 218.4 Q F1 -.666(PA)2.5 G(TH)-.189 E F2(,)A F1(MAILP)2.25 +E -.855(AT)-.666 G(H).855 E F2(,)A F0(and)2.25 E F1(CDP)2.5 E -.855(AT) +-.666 G(H).855 E F2(,)A F0(and the shell assigns the e)2.25 E(xpanded v) +-.15 E(alue.)-.25 E .023(Bash also performs tilde e)108 235.2 R .023 +(xpansion on w)-.15 F .024(ords satisfying the conditions of v)-.1 F +.024(ariable assignments \(as described)-.25 F(abo)108 247.2 Q .77 -.15 +(ve u)-.15 H(nder).15 E F1 -.666(PA)2.97 G(RAMETERS).666 E F2(\))A F0 +.47(when the)2.72 F 2.969(ya)-.15 G .469(ppear as ar)-2.969 F .469 +(guments to simple commands.)-.18 F .469(Bash does not do this,)5.469 F +-.15(ex)108 259.2 S(cept for the).15 E F3(declar)2.5 E(ation)-.15 E F0 +(commands listed abo)2.5 E -.15(ve)-.15 G 2.5(,w).15 G(hen in)-2.5 E F3 +(posix mode)2.5 E F0(.)A F4 -.1(Pa)87 276 S(rameter Expansion).1 E F0 +.199(The `)108 288 R F4($)A F0 2.699('c)C .199 +(haracter introduces parameter e)-2.699 F .199 +(xpansion, command substitution, or arithmetic e)-.15 F 2.7 +(xpansion. The)-.15 F(pa-)2.7 E .314(rameter name or symbol to be e)108 +300 R .314(xpanded may be enclosed in braces, which are optional b)-.15 +F .314(ut serv)-.2 F 2.813(et)-.15 G 2.813(op)-2.813 G(rotect)-2.813 E +.414(the v)108 312 R .414(ariable to be e)-.25 F .414 +(xpanded from characters immediately follo)-.15 F .415 +(wing it which could be interpreted as part of)-.25 F(the name.)108 324 +Q 1.19(When braces are used, the matching ending brace is the \214rst `) +108 340.8 R F4(})A F0 3.689('n)C 1.189 +(ot escaped by a backslash or within a)-3.689 F .821 +(quoted string, and not within an embedded arithmetic e)108 352.8 R .822 +(xpansion, command substitution, or parameter e)-.15 F(x-)-.15 E +(pansion.)108 364.8 Q(${)108 381.6 Q F3(par)A(ameter)-.15 E F0(})A .106 +(The v)144 393.6 R .106(alue of)-.25 F F3(par)2.606 E(ameter)-.15 E F0 +.106(is substituted.)2.606 F .106(The braces are required when)5.106 F +F3(par)3.856 E(ameter)-.15 E F0 .106(is a positional pa-)3.336 F .11 +(rameter with more than one digit, or when)144 405.6 R F3(par)3.86 E +(ameter)-.15 E F0 .111(is follo)3.341 F .111 +(wed by a character which is not to be)-.25 F .208 +(interpreted as part of its name.)144 417.6 R(The)5.208 E F3(par)2.708 E +(ameter)-.15 E F0 .208(is a shell parameter as described abo)2.708 F +-.15(ve)-.15 G F4 -.74(PA)2.858 G(RAME-).74 E(TERS)144 429.6 Q F0 2.5 +(\)o)C 2.5(ra)-2.5 G 2.5(na)-2.5 G(rray reference \()-2.5 E F4(Arrays)A +F0(\).)A .346(If the \214rst character of)108 446.4 R F3(par)2.846 E +(ameter)-.15 E F0 .346(is an e)2.846 F .346(xclamation point \()-.15 F +F4(!)A F0 .346(\), and)B F3(par)2.846 E(ameter)-.15 E F0 .346(is not a) +2.846 F F3(namer)2.846 E(ef)-.37 E F0 2.847(,i)C 2.847(ti)-2.847 G +(ntroduces)-2.847 E 2.907(al)108 458.4 S -2.15 -.25(ev e)-2.907 H 2.907 +(lo).25 G 2.906(fi)-2.907 G(ndirection.)-2.906 E F4(Bash)5.406 E F0 .406 +(uses the v)2.906 F .406(alue formed by e)-.25 F .406 +(xpanding the rest of)-.15 F F3(par)2.906 E(ameter)-.15 E F0 .406 +(as the ne)2.906 F(w)-.25 E F3(par)2.906 E(ame-)-.15 E(ter)108 470.4 Q +F0 2.578(;t)C .078(his is then e)-2.578 F .078(xpanded and that v)-.15 F +.079(alue is used in the rest of the e)-.25 F .079 +(xpansion, rather than the e)-.15 F .079(xpansion of the)-.15 F +(original)108 482.4 Q F3(par)2.543 E(ameter)-.15 E F0 5.043(.T)C .043 +(his is kno)-5.043 F .043(wn as)-.25 F F3(indir)2.543 E .043(ect e)-.37 +F(xpansion)-.2 E F0 5.043(.T)C .043(he v)-5.043 F .042 +(alue is subject to tilde e)-.25 F .042(xpansion, parameter)-.15 F -.15 +(ex)108 494.4 S .248(pansion, command substitution, and arithmetic e).15 +F 2.748(xpansion. If)-.15 F F3(par)2.749 E(ameter)-.15 E F0 .249 +(is a nameref, this e)2.749 F .249(xpands to the)-.15 F 1.51 +(name of the parameter referenced by)108 506.4 R F3(par)4.01 E(ameter) +-.15 E F0 1.51(instead of performing the complete indirect e)4.01 F +(xpansion.)-.15 E .387(The e)108 518.4 R .387 +(xceptions to this are the e)-.15 F .387(xpansions of ${)-.15 F F4(!)A +F3(pr)A(e\214x)-.37 E F4(*)A F0 2.887(}a)C .387(nd ${)-2.887 F F4(!)A F3 +(name)A F0([)A F3(@)A F0 .387(]} described belo)B 4.188 -.65(w. T)-.25 H +.388(he e).65 F(xclama-)-.15 E(tion point must immediately follo)108 +530.4 Q 2.5(wt)-.25 G(he left brace in order to introduce indirection.) +-2.5 E .334(In each of the cases belo)108 547.2 R -.65(w,)-.25 G F3(wor) +3.484 E(d)-.37 E F0 .334(is subject to tilde e)2.834 F .334 +(xpansion, parameter e)-.15 F .334(xpansion, command substitution,)-.15 +F(and arithmetic e)108 559.2 Q(xpansion.)-.15 E .066 +(When not performing substring e)108 576 R .067 +(xpansion, using the forms documented belo)-.15 F 2.567(w\()-.25 G +(e.g.,)-2.567 E F4(:-)2.567 E F0(\),)A F4(bash)2.567 E F0 .067 +(tests for a pa-)2.567 F(rameter that is unset or null.)108 588 Q(Omitt\ +ing the colon results in a test only for a parameter that is unset.)5 E +(${)108 604.8 Q F3(par)A(ameter)-.15 E F4<3aad>A F3(wor)A(d)-.37 E F0(}) +A F4 .723(Use Default V)144 616.8 R(alues)-.92 E F0 5.723(.I)C(f)-5.723 +E F3(par)4.473 E(ameter)-.15 E F0 .723(is unset or null, the e)3.953 F +.722(xpansion of)-.15 F F3(wor)3.562 E(d)-.37 E F0 .722(is substituted.) +3.992 F(Other)5.722 E(-)-.2 E(wise, the v)144 628.8 Q(alue of)-.25 E F3 +(par)3.75 E(ameter)-.15 E F0(is substituted.)3.23 E(${)108 640.8 Q F3 +(par)A(ameter)-.15 E F4(:=)A F3(wor)A(d)-.37 E F0(})A F4 .811 +(Assign Default V)144 652.8 R(alues)-.92 E F0 5.812(.I)C(f)-5.812 E F3 +(par)4.562 E(ameter)-.15 E F0 .812(is unset or null, the e)4.042 F .812 +(xpansion of)-.15 F F3(wor)3.652 E(d)-.37 E F0 .812(is assigned to)4.082 +F F3(pa-)4.562 E -.15(ra)144 664.8 S(meter).15 E F0 5.742(.T).73 G .742 +(he v)-5.742 F .742(alue of)-.25 F F3(par)4.492 E(ameter)-.15 E F0 .742 +(is then substituted.)3.972 F .741 +(Positional parameters and special parame-)5.742 F +(ters may not be assigned to in this w)144 676.8 Q(ay)-.1 E(.)-.65 E(${) +108 688.8 Q F3(par)A(ameter)-.15 E F4(:?)A F3(wor)A(d)-.37 E F0(})A F4 +.535(Display Err)144 700.8 R .535(or if Null or Unset)-.18 F F0 5.535 +(.I)C(f)-5.535 E F3(par)4.285 E(ameter)-.15 E F0 .535 +(is null or unset, the e)3.765 F .535(xpansion of)-.15 F F3(wor)3.035 E +(d)-.37 E F0 .535(\(or a mes-)3.035 F .013(sage to that ef)144 712.8 R +.013(fect if)-.25 F F3(wor)2.853 E(d)-.37 E F0 .013(is not present\) is\ + written to the standard error and the shell, if it is not in-)3.283 F +(teracti)144 724.8 Q -.15(ve)-.25 G 2.5(,e).15 G 2.5(xits. Otherwise,) +-2.65 F(the v)2.5 E(alue of)-.25 E F3(par)2.5 E(ameter)-.15 E F0 +(is substituted.)2.5 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E +(22)190.395 E 0 Cg EP +%%Page: 23 23 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(${)108 84 Q/F1 10 +/Times-Italic@0 SF(par)A(ameter)-.15 E/F2 10/Times-Bold@0 SF(:+)A F1 +(wor)A(d)-.37 E F0(})A F2 .745(Use Alter)144 96 R .745(nate V)-.15 F +(alue)-.92 E F0 5.745(.I)C(f)-5.745 E F1(par)4.495 E(ameter)-.15 E F0 +.745(is null or unset, nothing is substituted, otherwise the e)3.975 F +(xpan-)-.15 E(sion of)144 108 Q F1(wor)2.84 E(d)-.37 E F0 +(is substituted.)3.27 E(${)108 120 Q F1(par)A(ameter)-.15 E F2(:)A F1 +(of)A(fset)-.18 E F0(})A(${)108 132 Q F1(par)A(ameter)-.15 E F2(:)A F1 +(of)A(fset)-.18 E F2(:)A F1(length)A F0(})A F2 .002(Substring Expansion) +144 144 R F0 5.002(.E)C .002(xpands to up to)-5.002 F F1(length)2.502 E +F0 .002(characters of the v)2.502 F .002(alue of)-.25 F F1(par)2.502 E +(ameter)-.15 E F0 .002(starting at the)2.502 F .235 +(character speci\214ed by)144 156 R F1(of)2.735 E(fset)-.18 E F0 5.235 +(.I)C(f)-5.235 E F1(par)2.735 E(ameter)-.15 E F0(is)2.735 E F2(@)2.735 E +F0 2.735(,a)C 2.735(ni)-2.735 G(nde)-2.735 E -.15(xe)-.15 G 2.735(da).15 +G .235(rray subscripted by)-2.735 F F2(@)2.735 E F0(or)2.735 E F2(*) +2.735 E F0 2.735(,o)C 2.735(ra)-2.735 G 2.735(na)-2.735 G(s-)-2.735 E +(sociati)144 168 Q 1.578 -.15(ve a)-.25 H 1.278 +(rray name, the results dif).15 F 1.277(fer as described belo)-.25 F +5.077 -.65(w. I)-.25 H(f).65 E F1(length)3.777 E F0 1.277(is omitted, e) +3.777 F 1.277(xpands to the)-.15 F .042(substring of the v)144 180 R +.042(alue of)-.25 F F1(par)2.542 E(ameter)-.15 E F0 .043 +(starting at the character speci\214ed by)2.542 F F1(of)2.543 E(fset) +-.18 E F0 .043(and e)2.543 F .043(xtending to the)-.15 F .847 +(end of the v)144 192 R(alue.)-.25 E F1(length)5.846 E F0(and)3.346 E F1 +(of)3.346 E(fset)-.18 E F0 .846(are arithmetic e)3.346 F .846 +(xpressions \(see)-.15 F/F3 9/Times-Bold@0 SF .846(ARITHMETIC EV)3.346 F +(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F0(belo)144 204 Q(w\).)-.25 E +(If)144 228 Q F1(of)3.028 E(fset)-.18 E F0 -.25(eva)3.029 G .529 +(luates to a number less than zero, the v).25 F .529 +(alue is used as an of)-.25 F .529(fset in characters from the)-.25 F +.046(end of the v)144 240 R .046(alue of)-.25 F F1(par)2.546 E(ameter) +-.15 E F0 5.046(.I)C(f)-5.046 E F1(length)2.546 E F0 -.25(eva)2.546 G +.046(luates to a number less than zero, it is interpreted as an).25 F +(of)144 252 Q .202(fset in characters from the end of the v)-.25 F .202 +(alue of)-.25 F F1(par)2.702 E(ameter)-.15 E F0 .203 +(rather than a number of characters, and)2.702 F .558(the e)144 264 R +.558(xpansion is the characters between)-.15 F F1(of)3.058 E(fset)-.18 E +F0 .558(and that result.)3.058 F .557(Note that a ne)5.557 F -.05(ga) +-.15 G(ti).05 E .857 -.15(ve o)-.25 H -.25(ff).15 G .557(set must be).25 +F(separated from the colon by at least one space to a)144 276 Q -.2(vo) +-.2 G(id being confused with the).2 E F2(:-)2.5 E F0 -.15(ex)2.5 G +(pansion.).15 E(If)144 300 Q F1(par)2.958 E(ameter)-.15 E F0(is)2.958 E +F2(@)2.958 E F0 2.958(,t)C .458(he result is)-2.958 F F1(length)2.959 E +F0 .459(positional parameters be)2.959 F .459(ginning at)-.15 F F1(of) +2.959 E(fset)-.18 E F0 5.459(.A)C(ne)-2.5 E -.05(ga)-.15 G(ti).05 E -.15 +(ve)-.25 G F1(of)3.109 E(fset)-.18 E F0 .6(is tak)144 312 R .6 +(en relati)-.1 F .9 -.15(ve t)-.25 H 3.1(oo).15 G .6 +(ne greater than the greatest positional parameter)-3.1 F 3.1(,s)-.4 G +3.1(oa)-3.1 G 3.1(no)-3.1 G -.25(ff)-3.1 G .6(set of \2551 e).25 F -.25 +(va)-.25 G(luates).25 E .639(to the last positional parameter)144 324 R +5.639(.I)-.55 G 3.139(ti)-5.639 G 3.139(sa)-3.139 G 3.139(ne)-3.139 G +.639(xpansion error if)-3.289 F F1(length)3.14 E F0 -.25(eva)3.14 G .64 +(luates to a number less than).25 F(zero.)144 336 Q(If)144 360 Q F1(par) +3.014 E(ameter)-.15 E F0 .514(is an inde)3.014 F -.15(xe)-.15 G 3.014 +(da).15 G .514(rray name subscripted by @ or *, the result is the)-3.014 +F F1(length)3.014 E F0 .513(members of)3.013 F 1.081(the array be)144 +372 R 1.081(ginning with ${)-.15 F F1(par)A(ameter)-.15 E F0([)A F1(of)A +(fset)-.18 E F0 3.581(]}. A)B(ne)3.581 E -.05(ga)-.15 G(ti).05 E -.15 +(ve)-.25 G F1(of)3.732 E(fset)-.18 E F0 1.082(is tak)3.582 F 1.082 +(en relati)-.1 F 1.382 -.15(ve t)-.25 H 3.582(oo).15 G 1.082(ne greater) +-3.582 F 1.08(than the maximum inde)144 384 R 3.58(xo)-.15 G 3.58(ft) +-3.58 G 1.08(he speci\214ed array)-3.58 F 6.079(.I)-.65 G 3.579(ti) +-6.079 G 3.579(sa)-3.579 G 3.579(ne)-3.579 G 1.079(xpansion error if) +-3.729 F F1(length)3.579 E F0 -.25(eva)3.579 G 1.079(luates to a).25 F +(number less than zero.)144 396 Q(Substring e)144 420 Q +(xpansion applied to an associati)-.15 E .3 -.15(ve a)-.25 H +(rray produces unde\214ned results.).15 E .82(Substring inde)144 444 R +.821(xing is zero-based unless the positional parameters are used, in w\ +hich case the in-)-.15 F(de)144 456 Q .159(xing starts at 1 by def)-.15 +F 2.659(ault. If)-.1 F F1(of)2.659 E(fset)-.18 E F0 .159 +(is 0, and the positional parameters are used,)2.659 F F2($0)2.659 E F0 +.159(is pre\214x)2.659 F .158(ed to)-.15 F(the list.)144 468 Q(${)108 +484.8 Q F2(!)A F1(pr)A(e\214x)-.37 E F2(*)A F0(})A(${)108 496.8 Q F2(!)A +F1(pr)A(e\214x)-.37 E F2(@)A F0(})A F2 .084(Names matching pr)144 508.8 +R(e\214x)-.18 E F0 5.084(.E)C .084(xpands to the names of v)-5.084 F +.084(ariables whose names be)-.25 F .085(gin with)-.15 F F1(pr)2.585 E +(e\214x)-.37 E F0 2.585(,s)C(epa-)-2.585 E .258 +(rated by the \214rst character of the)144 520.8 R F3(IFS)2.758 E F0 +.257(special v)2.507 F 2.757(ariable. When)-.25 F F1(@)2.757 E F0 .257 +(is used and the e)2.757 F .257(xpansion appears)-.15 F +(within double quotes, each v)144 532.8 Q(ariable name e)-.25 E +(xpands to a separate w)-.15 E(ord.)-.1 E(${)108 549.6 Q F2(!)A F1(name) +A F0([)A F1(@)A F0(]})A(${)108 561.6 Q F2(!)A F1(name)A F0([)A F1(*)A F0 +(]})A F2 1.136(List of array k)144 573.6 R(eys)-.1 E F0 6.136(.I)C(f) +-6.136 E F1(name)3.636 E F0 1.136(is an array v)3.636 F 1.136 +(ariable, e)-.25 F 1.136(xpands to the list of array indices \(k)-.15 F +-.15(ey)-.1 G 1.137(s\) as-).15 F .397(signed in)144 585.6 R F1(name) +2.897 E F0 5.397(.I)C(f)-5.397 E F1(name)2.897 E F0 .397 +(is not an array)2.897 F 2.897(,e)-.65 G .397(xpands to 0 if)-3.047 F F1 +(name)2.897 E F0 .397(is set and null otherwise.)2.897 F(When)5.397 E F1 +(@)2.897 E F0(is used and the e)144 597.6 Q +(xpansion appears within double quotes, each k)-.15 E .3 -.15(ey ex)-.1 +H(pands to a separate w).15 E(ord.)-.1 E(${)108 614.4 Q F2(#)A F1(par)A +(ameter)-.15 E F0(})A F2 -.1(Pa)144 626.4 S .47(rameter length).1 F F0 +5.47(.T)C .471(he length in characters of the v)-5.47 F .471(alue of) +-.25 F F1(par)2.971 E(ameter)-.15 E F0 .471(is substituted.)2.971 F(If) +5.471 E F1(par)4.221 E(ame-)-.15 E(ter)144 638.4 Q F0(is)3.627 E F2(*) +2.897 E F0(or)2.897 E F2(@)2.897 E F0 2.897(,t)C .397(he v)-2.897 F .397 +(alue substituted is the number of positional parameters.)-.25 F(If) +5.396 E F1(par)4.146 E(ameter)-.15 E F0 .396(is an ar)3.626 F(-)-.2 E +.78(ray name subscripted by)144 650.4 R F2(*)3.28 E F0(or)3.28 E F2(@) +3.28 E F0 3.28(,t)C .78(he v)-3.28 F .781 +(alue substituted is the number of elements in the array)-.25 F 5.781 +(.I)-.65 G(f)-5.781 E F1(par)145.25 662.4 Q(ameter)-.15 E F0 .456 +(is an inde)3.686 F -.15(xe)-.15 G 2.956(da).15 G .456 +(rray name subscripted by a ne)-2.956 F -.05(ga)-.15 G(ti).05 E .756 +-.15(ve n)-.25 H(umber).15 E 2.955(,t)-.4 G .455 +(hat number is interpreted)-2.955 F .972(as relati)144 674.4 R 1.272 +-.15(ve t)-.25 H 3.472(oo).15 G .973(ne greater than the maximum inde) +-3.472 F 3.473(xo)-.15 G(f)-3.473 E F1(par)3.473 E(ameter)-.15 E F0 +3.473(,s)C 3.473(on)-3.473 G -2.25 -.15(eg a)-3.473 H(ti).15 E 1.273 +-.15(ve i)-.25 H .973(ndices count back).15 F(from the end of the array) +144 686.4 Q 2.5(,a)-.65 G(nd an inde)-2.5 E 2.5(xo)-.15 G 2.5<66ad>-2.5 +G 2.5(1r)-2.5 G(eferences the last element.)-2.5 E(${)108 703.2 Q F1 +(par)A(ameter)-.15 E F2(#)A F1(wor)A(d)-.37 E F0(})A(GNU Bash 5.1)72 768 +Q(2020 October 29)141.235 E(23)190.395 E 0 Cg EP +%%Page: 24 24 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(${)108 84 Q/F1 10 +/Times-Italic@0 SF(par)A(ameter)-.15 E/F2 10/Times-Bold@0 SF(##)A F1 +(wor)A(d)-.37 E F0(})A F2(Remo)144 96 Q 1.396 -.1(ve m)-.1 H 1.196 +(atching pr).1 F 1.196(e\214x patter)-.18 F(n)-.15 E F0 6.196(.T)C(he) +-6.196 E F1(wor)4.036 E(d)-.37 E F0 1.196(is e)4.466 F 1.196 +(xpanded to produce a pattern just as in path-)-.15 F .543(name e)144 +108 R .544(xpansion, and matched ag)-.15 F .544(ainst the e)-.05 F .544 +(xpanded v)-.15 F .544(alue of)-.25 F F1(par)4.294 E(ameter)-.15 E F0 +.544(using the rules described)3.774 F(under)144 120 Q F2 -.1(Pa)3.133 G +(tter).1 E 3.133(nM)-.15 G(atching)-3.133 E F0(belo)3.132 E 4.432 -.65 +(w. I)-.25 H 3.132(ft).65 G .632(he pattern matches the be)-3.132 F .632 +(ginning of the v)-.15 F .632(alue of)-.25 F F1(par)4.382 E(ameter)-.15 +E F0(,).73 E 1.151(then the result of the e)144 132 R 1.151 +(xpansion is the e)-.15 F 1.151(xpanded v)-.15 F 1.151(alue of)-.25 F F1 +(par)4.902 E(ameter)-.15 E F0 1.152(with the shortest matching)4.382 F +.184(pattern \(the `)144 144 R(`)-.74 E F2(#)A F0 1.664 -.74('' c)D .184 +(ase\) or the longest matching pattern \(the `).74 F(`)-.74 E F2(##)A F0 +1.664 -.74('' c)D .184(ase\) deleted.).74 F(If)5.183 E F1(par)3.933 E +(ameter)-.15 E F0(is)3.413 E F2(@)2.683 E F0(or)144 156 Q F2(*)3.018 E +F0 3.018(,t)C .518(he pattern remo)-3.018 F -.25(va)-.15 G 3.018(lo).25 +G .518 +(peration is applied to each positional parameter in turn, and the e) +-3.018 F(xpan-)-.15 E .304(sion is the resultant list.)144 168 R(If) +5.304 E F1(par)4.054 E(ameter)-.15 E F0 .303(is an array v)3.533 F .303 +(ariable subscripted with)-.25 F F2(@)2.803 E F0(or)2.803 E F2(*)2.803 E +F0 2.803(,t)C .303(he pattern re-)-2.803 F(mo)144 180 Q -.25(va)-.15 G +2.987(lo).25 G .487 +(peration is applied to each member of the array in turn, and the e) +-2.987 F .487(xpansion is the resultant)-.15 F(list.)144 192 Q(${)108 +208.8 Q F1(par)A(ameter)-.15 E F2(%)A F1(wor)A(d)-.37 E F0(})A(${)108 +220.8 Q F1(par)A(ameter)-.15 E F2(%%)A F1(wor)A(d)-.37 E F0(})A F2(Remo) +144 232.8 Q .347 -.1(ve m)-.1 H .147(atching suf\214x patter).1 F(n)-.15 +E F0 5.147(.T)C(he)-5.147 E F1(wor)2.647 E(d)-.37 E F0 .147(is e)2.647 F +.146(xpanded to produce a pattern just as in pathname)-.15 F -.15(ex)144 +244.8 S .458(pansion, and matched ag).15 F .458(ainst the e)-.05 F .458 +(xpanded v)-.15 F .458(alue of)-.25 F F1(par)4.209 E(ameter)-.15 E F0 +.459(using the rules described under)3.689 F F2 -.1(Pa)144 256.8 S(tter) +.1 E 3.314(nM)-.15 G(atching)-3.314 E F0(belo)3.314 E 4.614 -.65(w. I) +-.25 H 3.314(ft).65 G .814 +(he pattern matches a trailing portion of the e)-3.314 F .814(xpanded v) +-.15 F .814(alue of)-.25 F F1(pa-)4.564 E -.15(ra)144 268.8 S(meter).15 +E F0 3.816(,t).73 G 1.316(hen the result of the e)-3.816 F 1.317 +(xpansion is the e)-.15 F 1.317(xpanded v)-.15 F 1.317(alue of)-.25 F F1 +(par)5.067 E(ameter)-.15 E F0 1.317(with the shortest)4.547 F 1.085 +(matching pattern \(the `)144 280.8 R(`)-.74 E F2(%)A F0 2.565 -.74 +('' c)D 1.084(ase\) or the longest matching pattern \(the `).74 F(`)-.74 +E F2(%%)A F0 2.564 -.74('' c)D 1.084(ase\) deleted.).74 F(If)6.084 E F1 +(par)145.25 292.8 Q(ameter)-.15 E F0(is)3.389 E F2(@)2.659 E F0(or)2.659 +E F2(*)2.659 E F0 2.659(,t)C .159(he pattern remo)-2.659 F -.25(va)-.15 +G 2.659(lo).25 G .16 +(peration is applied to each positional parameter in turn,)-2.659 F .51 +(and the e)144 304.8 R .51(xpansion is the resultant list.)-.15 F(If) +5.51 E F1(par)4.259 E(ameter)-.15 E F0 .509(is an array v)3.739 F .509 +(ariable subscripted with)-.25 F F2(@)3.009 E F0(or)3.009 E F2(*)3.009 E +F0(,)A .422(the pattern remo)144 316.8 R -.25(va)-.15 G 2.922(lo).25 G +.422(peration is applied to each member of the array in turn, and the e) +-2.922 F .423(xpansion is)-.15 F(the resultant list.)144 328.8 Q(${)108 +345.6 Q F1(par)A(ameter)-.15 E F2(/)A F1(pattern)A F2(/)A F1(string)A F0 +(})A F2 -.1(Pa)144 357.6 S(tter).1 E 3.607(ns)-.15 G(ubstitution)-3.607 +E F0 6.107(.T)C(he)-6.107 E F1(pattern)3.607 E F0 1.107(is e)3.607 F +1.106(xpanded to produce a pattern just as in pathname e)-.15 F(xpan-) +-.15 E(sion,)144 369.6 Q F1 -.8(Pa)3.7 G -.15(ra).8 G(meter).15 E F0 1.2 +(is e)3.7 F 1.2(xpanded and the longest match of)-.15 F F1(pattern)3.7 E +F0(ag)3.7 E 1.2(ainst its v)-.05 F 1.2(alue is replaced with)-.25 F F1 +(string)144 381.6 Q F0 5.397(.T)C .397 +(he match is performed using the rules described under)-5.397 F F2 -.1 +(Pa)2.896 G(tter).1 E 2.896(nM)-.15 G(atching)-2.896 E F0(belo)2.896 E +4.196 -.65(w. I)-.25 H(f).65 E F1(pat-)2.896 E(tern)144 393.6 Q F0(be) +2.569 E .069(gins with)-.15 F F2(/)2.569 E F0 2.569(,a)C .069 +(ll matches of)-2.569 F F1(pattern)2.569 E F0 .069(are replaced with) +2.569 F F1(string)2.57 E F0 5.07(.N)C .07 +(ormally only the \214rst match is)-5.07 F 2.58(replaced. If)144 405.6 R +F1(pattern)2.58 E F0(be)2.58 E .08(gins with)-.15 F F2(#)2.58 E F0 2.58 +(,i)C 2.58(tm)-2.58 G .079(ust match at the be)-2.58 F .079 +(ginning of the e)-.15 F .079(xpanded v)-.15 F .079(alue of)-.25 F F1 +(par)2.579 E(am-)-.15 E(eter)144 417.6 Q F0 5.761(.I)C(f)-5.761 E F1 +(pattern)3.261 E F0(be)3.261 E .761(gins with)-.15 F F2(%)3.261 E F0 +3.261(,i)C 3.261(tm)-3.261 G .761(ust match at the end of the e)-3.261 F +.761(xpanded v)-.15 F .761(alue of)-.25 F F1(par)3.262 E(ameter)-.15 E +F0 5.762(.I)C(f)-5.762 E F1(string)144 429.6 Q F0 .958 +(is null, matches of)3.458 F F1(pattern)3.458 E F0 .958 +(are deleted and the)3.458 F F2(/)3.458 E F0(follo)3.458 E(wing)-.25 E +F1(pattern)3.457 E F0 .957(may be omitted.)3.457 F .957(If the)5.957 F +F2(nocasematch)144 441.6 Q F0 .492 +(shell option is enabled, the match is performed without re)2.992 F -.05 +(ga)-.15 G .492(rd to the case of alpha-).05 F .884(betic characters.) +144 453.6 R(If)5.884 E F1(par)4.634 E(ameter)-.15 E F0(is)4.114 E F2(@) +3.384 E F0(or)3.383 E F2(*)3.383 E F0 3.383(,t)C .883 +(he substitution operation is applied to each positional)-3.383 F 1.002 +(parameter in turn, and the e)144 465.6 R 1.002 +(xpansion is the resultant list.)-.15 F(If)6.002 E F1(par)4.752 E +(ameter)-.15 E F0 1.002(is an array v)4.232 F 1.002(ariable sub-)-.25 F +.159(scripted with)144 477.6 R F2(@)2.659 E F0(or)2.659 E F2(*)2.659 E +F0 2.659(,t)C .159(he substitution operation is applied to each member \ +of the array in turn, and)-2.659 F(the e)144 489.6 Q +(xpansion is the resultant list.)-.15 E(${)108 506.4 Q F1(par)A(ameter) +-.15 E F2(^)A F1(pattern)A F0(})A(${)108 518.4 Q F1(par)A(ameter)-.15 E +F2(^^)A F1(pattern)A F0(})A(${)108 530.4 Q F1(par)A(ameter)-.15 E F2(,)A +F1(pattern)A F0(})A(${)108 542.4 Q F1(par)A(ameter)-.15 E F2(,,)A F1 +(pattern)A F0(})A F2 .437(Case modi\214cation)144 554.4 R F0 5.437(.T)C +.437(his e)-5.437 F .438 +(xpansion modi\214es the case of alphabetic characters in)-.15 F F1(par) +2.938 E(ameter)-.15 E F0 5.438(.T)C(he)-5.438 E F1(pattern)144 566.4 Q +F0 .374(is e)2.874 F .374 +(xpanded to produce a pattern just as in pathname e)-.15 F 2.874 +(xpansion. Each)-.15 F .373(character in the e)2.873 F(x-)-.15 E .513 +(panded v)144 578.4 R .513(alue of)-.25 F F1(par)3.013 E(ameter)-.15 E +F0 .513(is tested ag)3.013 F(ainst)-.05 E F1(pattern)3.013 E F0 3.013 +(,a)C .514(nd, if it matches the pattern, its case is con-)-3.013 F -.15 +(ve)144 590.4 S 2.823(rted. The).15 F .323 +(pattern should not attempt to match more than one character)2.823 F +5.322(.T)-.55 G(he)-5.322 E F2(^)2.822 E F0 .322(operator con)2.822 F +-.15(ve)-.4 G(rts).15 E(lo)144 602.4 Q .18(wercase letters matching)-.25 +F F1(pattern)2.681 E F0 .181(to uppercase; the)2.681 F F2(,)2.681 E F0 +.181(operator con)2.681 F -.15(ve)-.4 G .181 +(rts matching uppercase letters).15 F .085(to lo)144 614.4 R 2.585 +(wercase. The)-.25 F F2(^^)2.585 E F0(and)2.585 E F2(,,)2.585 E F0 -.15 +(ex)2.585 G .085(pansions con).15 F -.15(ve)-.4 G .085 +(rt each matched character in the e).15 F .085(xpanded v)-.15 F .085 +(alue; the)-.25 F F2(^)2.585 E F0(and)144 626.4 Q F2(,)3.59 E F0 -.15 +(ex)3.59 G 1.09(pansions match and con).15 F -.15(ve)-.4 G 1.091 +(rt only the \214rst character in the e).15 F 1.091(xpanded v)-.15 F +3.591(alue. If)-.25 F F1(pattern)3.591 E F0(is)3.591 E 1.121 +(omitted, it is treated lik)144 638.4 R 3.621(ea)-.1 G F2(?)A F0 3.621 +(,w)C 1.121(hich matches e)-3.621 F -.15(ve)-.25 G 1.121(ry character) +.15 F 6.12(.I)-.55 G(f)-6.12 E F1(par)4.87 E(ameter)-.15 E F0(is)4.35 E +F2(@)3.62 E F0(or)3.62 E F2(*)3.62 E F0 3.62(,t)C 1.12(he case)-3.62 F +.339(modi\214cation operation is applied to each positional parameter i\ +n turn, and the e)144 650.4 R .34(xpansion is the re-)-.15 F .25 +(sultant list.)144 662.4 R(If)5.25 E F1(par)4 E(ameter)-.15 E F0 .25 +(is an array v)3.48 F .249(ariable subscripted with)-.25 F F2(@)2.749 E +F0(or)2.749 E F2(*)2.749 E F0 2.749(,t)C .249 +(he case modi\214cation oper)-2.749 F(-)-.2 E +(ation is applied to each member of the array in turn, and the e)144 +674.4 Q(xpansion is the resultant list.)-.15 E(${)108 691.2 Q F1(par)A +(ameter)-.15 E F2(@)A F1(oper)A(ator)-.15 E F0(})A F2 -.1(Pa)144 703.2 S +.86(rameter transf).1 F(ormation)-.25 E F0 5.86(.T)C .86(he e)-5.86 F +.86(xpansion is either a transformation of the v)-.15 F .86(alue of)-.25 +F F1(par)3.36 E(ameter)-.15 E F0 .154(or information about)144 715.2 R +F1(par)2.654 E(ameter)-.15 E F0 .153(itself, depending on the v)2.654 F +.153(alue of)-.25 F F1(oper)2.653 E(ator)-.15 E F0 5.153(.E)C(ach)-5.153 +E F1(oper)2.653 E(ator)-.15 E F0 .153(is a sin-)2.653 F(gle letter:)144 +727.2 Q(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(24)190.395 E 0 +Cg EP +%%Page: 25 25 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(U)144 84 Q F0 .142(The e)180 84 R .142 +(xpansion is a string that is the v)-.15 F .142(alue of)-.25 F/F2 10 +/Times-Italic@0 SF(par)2.642 E(ameter)-.15 E F0 .142(with lo)2.642 F +.143(wercase alphabetic charac-)-.25 F(ters con)180 96 Q -.15(ve)-.4 G +(rted to uppercase.).15 E F1(u)144 108 Q F0 .43(The e)180 108 R .43 +(xpansion is a string that is the v)-.15 F .429(alue of)-.25 F F2(par) +2.929 E(ameter)-.15 E F0 .429(with the \214rst character con)2.929 F +-.15(ve)-.4 G(rted).15 E(to uppercase, if it is alphabetic.)180 120 Q F1 +(L)144 132 Q F0 .124(The e)180 132 R .124 +(xpansion is a string that is the v)-.15 F .124(alue of)-.25 F F2(par) +2.624 E(ameter)-.15 E F0 .125(with uppercase alphabetic charac-)2.625 F +(ters con)180 144 Q -.15(ve)-.4 G(rted to lo).15 E(wercase.)-.25 E F1(Q) +144 156 Q F0 1.065(The e)180 156 R 1.065 +(xpansion is a string that is the v)-.15 F 1.065(alue of)-.25 F F2(par) +3.565 E(ameter)-.15 E F0 1.064(quoted in a format that can be)3.565 F +(reused as input.)180 168 Q F1(E)144 180 Q F0 .44(The e)180 180 R .441 +(xpansion is a string that is the v)-.15 F .441(alue of)-.25 F F2(par) +2.941 E(ameter)-.15 E F0 .441(with backslash escape sequences)2.941 F +-.15(ex)180 192 S(panded as with the).15 E F1($'...)2.5 E(')-.55 E F0 +(quoting mechanism.)2.5 E F1(P)144 204 Q F0 1.073(The e)180 204 R 1.073 +(xpansion is a string that is the result of e)-.15 F 1.073 +(xpanding the v)-.15 F 1.073(alue of)-.25 F F2(par)3.573 E(ameter)-.15 E +F0 1.073(as if it)3.573 F(were a prompt string \(see)180 216 Q F1(PR)2.5 +E(OMPTING)-.3 E F0(belo)2.5 E(w\).)-.25 E F1(A)144 228 Q F0 1.137(The e) +180 228 R 1.138 +(xpansion is a string in the form of an assignment statement or)-.15 F +F1(declar)3.638 E(e)-.18 E F0(command)3.638 E(that, if e)180 240 Q -.25 +(va)-.25 G(luated, will recreate).25 E F2(par)2.5 E(ameter)-.15 E F0 +(with its attrib)2.5 E(utes and v)-.2 E(alue.)-.25 E F1(K)144 252 Q F0 +1.34(Produces a possibly-quoted v)180 252 R 1.339(ersion of the v)-.15 F +1.339(alue of)-.25 F F2(par)3.839 E(ameter)-.15 E F0 3.839(,e)C 1.339 +(xcept that it prints the)-3.989 F -.25(va)180 264 S .257(lues of inde) +.25 F -.15(xe)-.15 G 2.757(da).15 G .257(nd associati)-2.757 F .557 -.15 +(ve a)-.25 H .257(rrays as a sequence of quoted k).15 F -.15(ey)-.1 G +(-v).15 E .257(alue pairs \(see)-.25 F F1(Ar)2.758 E(-)-.37 E(rays)180 +276 Q F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1(a)144 288 Q F0(The e)180 +288 Q(xpansion is a string consisting of \215ag v)-.15 E +(alues representing)-.25 E F2(par)2.5 E(ameter)-.15 E F0 1.1 -.55('s a)D +(ttrib).55 E(utes.)-.2 E(If)144 304.8 Q F2(par)4.403 E(ameter)-.15 E F0 +(is)3.883 E F1(@)3.153 E F0(or)3.153 E F1(*)3.153 E F0 3.153(,t)C .653(\ +he operation is applied to each positional parameter in turn, and the e) +-3.153 F(x-)-.15 E .403(pansion is the resultant list.)144 316.8 R(If) +5.403 E F2(par)4.153 E(ameter)-.15 E F0 .403(is an array v)3.633 F .403 +(ariable subscripted with)-.25 F F1(@)2.903 E F0(or)2.903 E F1(*)2.903 E +F0 2.903(,t)C .403(he opera-)-2.903 F +(tion is applied to each member of the array in turn, and the e)144 +328.8 Q(xpansion is the resultant list.)-.15 E .708(The result of the e) +144 352.8 R .708(xpansion is subject to w)-.15 F .708 +(ord splitting and pathname e)-.1 F .708(xpansion as described be-)-.15 +F(lo)144 364.8 Q -.65(w.)-.25 G F1(Command Substitution)87 381.6 Q F2 +1.697(Command substitution)108 393.6 R F0(allo)4.197 E 1.697 +(ws the output of a command to replace the command name.)-.25 F 1.698 +(There are tw)6.698 F(o)-.1 E(forms:)108 405.6 Q F1($\()144 422.4 Q F2 +(command)A F1(\))1.666 E F0(or)108 434.4 Q F1<92>144 446.4 Q F2(command) +A F1<92>A(Bash)108 463.2 Q F0 .089(performs the e)2.589 F .089 +(xpansion by e)-.15 F -.15(xe)-.15 G(cuting).15 E F2(command)2.589 E F0 +.088(in a subshell en)2.589 F .088(vironment and replacing the command) +-.4 F .41(substitution with the standard output of the command, with an) +108 475.2 R 2.91(yt)-.15 G .41(railing ne)-2.91 F .41(wlines deleted.) +-.25 F .41(Embedded ne)5.41 F(w-)-.25 E .192(lines are not deleted, b) +108 487.2 R .192(ut the)-.2 F 2.692(ym)-.15 G .192(ay be remo)-2.692 F +-.15(ve)-.15 G 2.692(dd).15 G .192(uring w)-2.692 F .192(ord splitting.) +-.1 F .192(The command substitution)5.192 F F1($\(cat)2.691 E F2(\214le) +2.691 E F1(\))A F0(can be replaced by the equi)108 499.2 Q -.25(va)-.25 +G(lent b).25 E(ut f)-.2 E(aster)-.1 E F1($\(<)2.5 E F2(\214le)2.5 E F1 +(\))A F0(.)A 1.724(When the old-style backquote form of substitution is\ + used, backslash retains its literal meaning e)108 516 R(xcept)-.15 E +.315(when follo)108 528 R .315(wed by)-.25 F F1($)2.815 E F0(,)A F1<92> +2.815 E F0 2.815(,o)C(r)-2.815 E F1(\\)2.815 E F0 5.315(.T)C .314(he \ +\214rst backquote not preceded by a backslash terminates the command su\ +b-)-5.315 F 3.886(stitution. When)108 540 R 1.386(using the $\()3.886 F +F2(command).833 E F0 3.886(\)f)1.666 G 1.387 +(orm, all characters between the parentheses mak)-3.886 F 3.887(eu)-.1 G +3.887(pt)-3.887 G 1.387(he com-)-3.887 F +(mand; none are treated specially)108 552 Q(.)-.65 E .894 +(Command substitutions may be nested.)108 568.8 R 2.494 -.8(To n)5.894 H +.894(est when using the backquoted form, escape the inner back-).8 F +(quotes with backslashes.)108 580.8 Q .422 +(If the substitution appears within double quotes, w)108 597.6 R .422 +(ord splitting and pathname e)-.1 F .423(xpansion are not performed)-.15 +F(on the results.)108 609.6 Q F1(Arithmetic Expansion)87 626.4 Q F0 +1.035(Arithmetic e)108 638.4 R 1.035(xpansion allo)-.15 F 1.035 +(ws the e)-.25 F -.25(va)-.25 G 1.034(luation of an arithmetic e).25 F +1.034(xpression and the substitution of the result.)-.15 F +(The format for arithmetic e)108 650.4 Q(xpansion is:)-.15 E F1($\(\() +144 667.2 Q F2 -.2(ex)C(pr).2 E(ession)-.37 E F1(\)\))A F0(The)108 684 Q +F2 -.2(ex)2.665 G(pr).2 E(ession)-.37 E F0 .165 +(is treated as if it were within double quotes, b)2.905 F .166 +(ut a double quote inside the parentheses is not)-.2 F .231 +(treated specially)108 696 R 5.231(.A)-.65 G .231(ll tok)-5.231 F .231 +(ens in the e)-.1 F .231(xpression under)-.15 F .231(go parameter and v) +-.18 F .23(ariable e)-.25 F .23(xpansion, command substi-)-.15 F .048 +(tution, and quote remo)108 708 R -.25(va)-.15 G 2.548(l. The).25 F .048 +(result is treated as the arithmetic e)2.548 F .048(xpression to be e) +-.15 F -.25(va)-.25 G 2.549(luated. Arithmetic).25 F -.15(ex)2.549 G(-) +.15 E(pansions may be nested.)108 720 Q(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(25)190.395 E 0 Cg EP +%%Page: 26 26 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E 1.379(The e)108 84 +R -.25(va)-.25 G 1.378 +(luation is performed according to the rules listed belo).25 F 3.878(wu) +-.25 G(nder)-3.878 E/F1 9/Times-Bold@0 SF 1.378(ARITHMETIC EV)3.878 F +(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E/F2 9/Times-Roman@0 SF(.)A F0 +(If)5.878 E/F3 10/Times-Italic@0 SF -.2(ex)108 96 S(pr).2 E(ession)-.37 +E F0(is in)2.74 E -.25(va)-.4 G(lid,).25 E/F4 10/Times-Bold@0 SF(bash) +2.5 E F0(prints a message indicating f)2.5 E +(ailure and no substitution occurs.)-.1 E F4(Pr)87 112.8 Q +(ocess Substitution)-.18 E F3(Pr)108 124.8 Q .405(ocess substitution) +-.45 F F0(allo)2.905 E .405(ws a process')-.25 F 2.905(si)-.55 G .405 +(nput or output to be referred to using a \214lename.)-2.905 F .405 +(It tak)5.405 F .405(es the form)-.1 F(of)108 136.8 Q F4(<\()3.251 E F3 +(list)A F4(\)).833 E F0(or)3.251 E F4(>\()3.251 E F3(list)A F4(\)).833 E +F0 5.751(.T)C .751(he process)-5.751 F F3(list)3.251 E F0 .751 +(is run asynchronously)3.251 F 3.251(,a)-.65 G .751 +(nd its input or output appears as a \214lename.)-3.251 F .147 +(This \214lename is passed as an ar)108 148.8 R .148 +(gument to the current command as the result of the e)-.18 F 2.648 +(xpansion. If)-.15 F(the)2.648 E F4(>\()2.648 E F3(list)A F4(\)).833 E +F0 .56(form is used, writing to the \214le will pro)108 160.8 R .56 +(vide input for)-.15 F F3(list)3.059 E F0 5.559(.I)C 3.059(ft)-5.559 G +(he)-3.059 E F4(<\()3.059 E F3(list)A F4(\)).833 E F0 .559 +(form is used, the \214le passed as an)3.059 F(ar)108 172.8 Q .308 +(gument should be read to obtain the output of)-.18 F F3(list)2.808 E F0 +5.308(.P)C .309(rocess substitution is supported on systems that sup-) +-5.308 F(port named pipes \()108 184.8 Q F3(FIFOs)A F0 2.5(\)o)C 2.5(rt) +-2.5 G(he)-2.5 E F4(/de)2.5 E(v/fd)-.15 E F0 +(method of naming open \214les.)2.5 E .897(When a)108 201.6 R -.25(va) +-.2 G .896(ilable, process substitution is performed simultaneously wit\ +h parameter and v).25 F .896(ariable e)-.25 F(xpansion,)-.15 E +(command substitution, and arithmetic e)108 213.6 Q(xpansion.)-.15 E F4 +-.75(Wo)87 230.4 S(rd Splitting).75 E F0 1.142 +(The shell scans the results of parameter e)108 242.4 R 1.143 +(xpansion, command substitution, and arithmetic e)-.15 F 1.143 +(xpansion that)-.15 F(did not occur within double quotes for)108 254.4 Q +F3(wor)2.84 E 2.5(ds)-.37 G(plitting)-2.5 E F0(.).22 E .063 +(The shell treats each character of)108 271.2 R F1(IFS)2.563 E F0 .063 +(as a delimiter)2.313 F 2.563(,a)-.4 G .063 +(nd splits the results of the other e)-2.563 F .063(xpansions into w) +-.15 F(ords)-.1 E .207(using these characters as \214eld terminators.) +108 283.2 R(If)5.207 E F1(IFS)2.707 E F0 .207(is unset, or its v)2.457 F +.207(alue is e)-.25 F(xactly)-.15 E F4()2.708 E F0 +(,)A .837(the def)108 295.2 R .837(ault, then sequences of)-.1 F F4 +()3.337 E F0(,)A F4()3.337 E F0 3.337(,a)C(nd)-3.337 E F4 +()3.337 E F0 .836(at the be)3.336 F .836 +(ginning and end of the results of)-.15 F .345(the pre)108 307.2 R .345 +(vious e)-.25 F .345(xpansions are ignored, and an)-.15 F 2.845(ys)-.15 +G .345(equence of)-2.845 F F1(IFS)2.845 E F0 .345 +(characters not at the be)2.595 F .345(ginning or end serv)-.15 F(es) +-.15 E 1.237(to delimit w)108 319.2 R 3.737(ords. If)-.1 F F1(IFS)3.737 +E F0 1.236(has a v)3.486 F 1.236(alue other than the def)-.25 F 1.236 +(ault, then sequences of the whitespace characters)-.1 F F4(space)108 +331.2 Q F0(,)A F4(tab)2.506 E F0 2.506(,a)C(nd)-2.506 E F4(newline)2.506 +E F0 .006(are ignored at the be)2.506 F .006(ginning and end of the w) +-.15 F .007(ord, as long as the whitespace charac-)-.1 F .921 +(ter is in the v)108 343.2 R .92(alue of)-.25 F F1(IFS)3.42 E F0(\(an) +3.17 E F1(IFS)3.42 E F0 .92(whitespace character\).)3.17 F(An)5.92 E +3.42(yc)-.15 G .92(haracter in)-3.42 F F1(IFS)3.42 E F0 .92(that is not) +3.17 F F1(IFS)3.42 E F0(whitespace,)3.17 E .428(along with an)108 355.2 +R 2.928(ya)-.15 G(djacent)-2.928 E F1(IFS)2.928 E F0 .428 +(whitespace characters, delimits a \214eld.)2.678 F 2.928(As)5.428 G +.428(equence of)-2.928 F F1(IFS)2.928 E F0 .429(whitespace charac-)2.679 +F(ters is also treated as a delimiter)108 367.2 Q 5(.I)-.55 G 2.5(ft)-5 +G(he v)-2.5 E(alue of)-.25 E F1(IFS)2.5 E F0(is null, no w)2.25 E +(ord splitting occurs.)-.1 E .783(Explicit null ar)108 384 R .783 +(guments \()-.18 F F4 .833("").833 G F0(or)2.449 E F4 .833<0808>4.115 G +F0 3.282(\)a)C .782 +(re retained and passed to commands as empty strings.)-3.282 F .782 +(Unquoted im-)5.782 F .178(plicit null ar)108 396 R .179 +(guments, resulting from the e)-.18 F .179 +(xpansion of parameters that ha)-.15 F .479 -.15(ve n)-.2 H 2.679(ov).15 +G .179(alues, are remo)-2.929 F -.15(ve)-.15 G 2.679(d. If).15 F 2.679 +(ap)2.679 G(a-)-2.679 E .319(rameter with no v)108 408 R .319(alue is e) +-.25 F .319(xpanded within double quotes, a null ar)-.15 F .319 +(gument results and is retained and passed)-.18 F +(to a command as an empty string.)108 420 Q(When a quoted null ar)5 E +.001(gument appears as part of a w)-.18 F .001(ord whose e)-.1 F +(xpansion)-.15 E .984(is non-null, the null ar)108 432 R .984 +(gument is remo)-.18 F -.15(ve)-.15 G 3.483(d. That).15 F .983 +(is, the w)3.483 F(ord)-.1 E/F5 10/Courier@0 SF -5.1673.483 +F F0(becomes)3.483 E F53.483 E F0 .983(after w)3.483 F .983 +(ord splitting and)-.1 F(null ar)108 444 Q(gument remo)-.18 E -.25(va) +-.15 G(l.).25 E(Note that if no e)108 460.8 Q +(xpansion occurs, no splitting is performed.)-.15 E F4 -.1(Pa)87 477.6 S +(thname Expansion).1 E F0 .37(After w)108 489.6 R .37 +(ord splitting, unless the)-.1 F F42.87 E F0 .37 +(option has been set,)2.87 F F4(bash)2.87 E F0 .371(scans each w)2.871 F +.371(ord for the characters)-.1 F F4(*)2.871 E F0(,)A F4(?)2.871 E F0 +2.871(,a)C(nd)-2.871 E F4([)2.871 E F0(.)A .634 +(If one of these characters appears, and is not quoted, then the w)108 +501.6 R .634(ord is re)-.1 F -.05(ga)-.15 G .633(rded as a).05 F F3 +(pattern)4.383 E F0 3.133(,a).24 G .633(nd replaced)-3.133 F 1.34(with \ +an alphabetically sorted list of \214lenames matching the pattern \(see) +108 513.6 R F1 -.09(Pa)3.84 G(tter).09 E 3.59(nM)-.135 G(atching)-3.59 E +F0(belo)3.59 E 3.84(w\). If)-.25 F(no)3.84 E .534 +(matching \214lenames are found, and the shell option)108 525.6 R F4 +(nullglob)3.034 E F0 .534(is not enabled, the w)3.034 F .534 +(ord is left unchanged.)-.1 F(If)5.534 E(the)108 537.6 Q F4(nullglob) +3.284 E F0 .785(option is set, and no matches are found, the w)3.284 F +.785(ord is remo)-.1 F -.15(ve)-.15 G 3.285(d. If).15 F(the)3.285 E F4 +(failglob)3.285 E F0 .785(shell option is)3.285 F .754(set, and no matc\ +hes are found, an error message is printed and the command is not e)108 +549.6 R -.15(xe)-.15 G 3.254(cuted. If).15 F .754(the shell)3.254 F +(option)108 561.6 Q F4(nocaseglob)3.263 E F0 .763 +(is enabled, the match is performed without re)3.263 F -.05(ga)-.15 G +.764(rd to the case of alphabetic characters.).05 F .039 +(When a pattern is used for pathname e)108 573.6 R .039 +(xpansion, the character)-.15 F F4 -.63(``)2.539 G -.55(.').63 G(')-.08 +E F0 .039(at the start of a name or immediately fol-)5.039 F(lo)108 +585.6 Q .81(wing a slash must be matched e)-.25 F(xplicitly)-.15 E 3.31 +(,u)-.65 G .81(nless the shell option)-3.31 F F4(dotglob)3.31 E F0 .81 +(is set.)3.31 F .81(The \214lenames)5.81 F F4 -.63(``)3.31 G -.55(.').63 +G(')-.08 E F0(and)5.81 E F4 -.63(``)108 597.6 S(..).63 E -.63('')-.55 G +F0 1.182(must al)6.812 F -.1(wa)-.1 G 1.182(ys be matched e).1 F +(xplicitly)-.15 E 3.682(,e)-.65 G -.15(ve)-3.932 G 3.682(ni).15 G(f) +-3.682 E F4(dotglob)3.682 E F0 1.182(is set.)3.682 F 1.181 +(In other cases, the)6.182 F F4 -.63(``)3.681 G -.55(.').63 G(')-.08 E +F0 1.181(character is not)6.181 F .613(treated specially)108 609.6 R +5.613(.W)-.65 G .613 +(hen matching a pathname, the slash character must al)-5.613 F -.1(wa) +-.1 G .614(ys be matched e).1 F .614(xplicitly by a)-.15 F .655 +(slash in the pattern, b)108 621.6 R .655(ut in other matching conte)-.2 +F .655(xts it can be matched by a special pattern character as de-)-.15 +F .719(scribed belo)108 633.6 R 3.219(wu)-.25 G(nder)-3.219 E F1 -.09 +(Pa)3.219 G(tter).09 E 2.969(nM)-.135 G(atching)-2.969 E F2(.)A F0 .719 +(See the description of)5.219 F F4(shopt)3.219 E F0(belo)3.219 E 3.22 +(wu)-.25 G(nder)-3.22 E F1 .72(SHELL B)3.22 F(UIL)-.09 E .72(TIN COM-) +-.828 F(MANDS)108 645.6 Q F0(for a description of the)2.25 E F4 +(nocaseglob)2.5 E F0(,)A F4(nullglob)2.5 E F0(,)A F4(failglob)2.5 E F0 +2.5(,a)C(nd)-2.5 E F4(dotglob)2.5 E F0(shell options.)2.5 E(The)108 +662.4 Q F1(GLOBIGNORE)2.562 E F0 .062(shell v)2.312 F .061 +(ariable may be used to restrict the set of \214le names matching a)-.25 +F F3(pattern)3.811 E F0 5.061(.I).24 G(f)-5.061 E F1(GLO-)2.561 E +(BIGNORE)108 674.4 Q F0 1.096(is set, each matching \214le name that al\ +so matches one of the patterns in)3.346 F F1(GLOBIGNORE)3.597 E F0 1.097 +(is re-)3.347 F(mo)108 686.4 Q -.15(ve)-.15 G 2.851(df).15 G .351 +(rom the list of matches.)-2.851 F .351(If the)5.351 F F4(nocaseglob) +2.851 E F0 .351(option is set, the matching ag)2.851 F .351 +(ainst the patterns in)-.05 F F1(GLO-)2.85 E(BIGNORE)108 698.4 Q F0 1.48 +(is performed without re)3.73 F -.05(ga)-.15 G 1.48(rd to case.).05 F +1.48(The \214lenames)6.48 F F4 -.63(``)3.98 G -.55(.').63 G(')-.08 E F0 +(and)6.48 E F4 -.63(``)3.98 G(..).63 E -.63('')-.55 G F0 1.481(are al) +7.11 F -.1(wa)-.1 G 1.481(ys ignored when).1 F F1(GLOBIGNORE)108 710.4 Q +F0 .827(is set and not null.)3.077 F(Ho)5.827 E(we)-.25 E -.15(ve)-.25 G +1.627 -.4(r, s).15 H(etting).4 E F1(GLOBIGNORE)3.327 E F0 .827 +(to a non-null v)3.077 F .827(alue has the ef)-.25 F .827(fect of)-.25 F +.682(enabling the)108 722.4 R F4(dotglob)3.182 E F0 .682 +(shell option, so all other \214lenames be)3.182 F .682(ginning with a) +-.15 F F4 -.63(``)3.182 G -.55(.').63 G(')-.08 E F0 .682(will match.) +5.682 F 2.283 -.8(To g)5.683 H .683(et the old).8 F(GNU Bash 5.1)72 768 +Q(2020 October 29)141.235 E(26)190.395 E 0 Cg EP +%%Page: 27 27 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(beha)108 84 Q +1.185(vior of ignoring \214lenames be)-.2 F 1.185(ginning with a)-.15 F +/F1 10/Times-Bold@0 SF -.63(``)3.684 G -.55(.').63 G(')-.08 E F0 3.684 +(,m)C(ak)-3.684 E(e)-.1 E F1 -.63(``)3.684 G(.*').63 E(')-.63 E F0 1.184 +(one of the patterns in)6.184 F/F2 9/Times-Bold@0 SF(GLOBIGNORE)3.684 E +/F3 9/Times-Roman@0 SF(.)A F0(The)108 96 Q F1(dotglob)3.131 E F0 .631 +(option is disabled when)3.131 F F2(GLOBIGNORE)3.132 E F0 .632 +(is unset.)2.882 F .632(The pattern matching honors the setting of)5.632 +F(the)108 108 Q F1(extglob)2.5 E F0(shell option.)2.5 E F1 -.1(Pa)108 +124.8 S(tter).1 E 2.5(nM)-.15 G(atching)-2.5 E F0(An)108 141.6 Q 3.138 +(yc)-.15 G .638(haracter that appears in a pattern, other than the spec\ +ial pattern characters described belo)-3.138 F 1.938 -.65(w, m)-.25 H +(atches).65 E 2.721(itself. The)108 153.6 R .221 +(NUL character may not occur in a pattern.)2.721 F 2.721(Ab)5.221 G .221 +(ackslash escapes the follo)-2.721 F .222(wing character; the es-)-.25 F +.418(caping backslash is discarded when matching.)108 165.6 R .418 +(The special pattern characters must be quoted if the)5.418 F 2.918(ya) +-.15 G .418(re to)-2.918 F(be matched literally)108 177.6 Q(.)-.65 E +(The special pattern characters ha)108 194.4 Q .3 -.15(ve t)-.2 H +(he follo).15 E(wing meanings:)-.25 E F1(*)144 211.2 Q F0 .376 +(Matches an)180 211.2 R 2.876(ys)-.15 G .376 +(tring, including the null string.)-2.876 F .376(When the)5.376 F F1 +(globstar)2.876 E F0 .377(shell option is enabled,)2.876 F(and)180 223.2 +Q F1(*)3.275 E F0 .775(is used in a pathname e)3.275 F .775 +(xpansion conte)-.15 F .775(xt, tw)-.15 F 3.275(oa)-.1 G(djacent)-3.275 +E F1(*)3.275 E F0 3.275(su)C .775(sed as a single pattern)-3.275 F 1.058 +(will match all \214les and zero or more directories and subdirectories\ +.)180 235.2 R 1.058(If follo)6.058 F 1.058(wed by a)-.25 F F1(/)3.558 E +F0(,)A(tw)180 247.2 Q 2.5(oa)-.1 G(djacent)-2.5 E F1(*)2.5 E F0 2.5(sw)C +(ill match only directories and subdirectories.)-2.5 E F1(?)144 259.2 Q +F0(Matches an)180 259.2 Q 2.5(ys)-.15 G(ingle character)-2.5 E(.)-.55 E +F1([...])144 271.2 Q F0 .579(Matches an)180 271.2 R 3.079(yo)-.15 G .579 +(ne of the enclosed characters.)-3.079 F 3.079(Ap)5.579 G .578 +(air of characters separated by a h)-3.079 F(yphen)-.05 E .684 +(denotes a)180 283.2 R/F4 10/Times-Italic@0 SF -.15(ra)3.184 G(ng).15 E +3.184(ee)-.1 G(xpr)-3.384 E(ession)-.37 E F0 3.184(;a)C .984 -.15(ny c) +-3.184 H .684(haracter that f).15 F .684(alls between those tw)-.1 F +3.185(oc)-.1 G .685(haracters, inclu-)-3.185 F(si)180 295.2 Q -.15(ve) +-.25 G 3.713(,u).15 G 1.213(sing the current locale')-3.713 F 3.712(sc) +-.55 G 1.212(ollating sequence and character set, is matched.)-3.712 F +1.212(If the)6.212 F 1.123(\214rst character follo)180 307.2 R 1.123 +(wing the)-.25 F F1([)3.623 E F0 1.123(is a)3.623 F F1(!)3.623 E F0 +1.124(or a)6.123 F F1(^)3.624 E F0 1.124(then an)3.624 F 3.624(yc)-.15 G +1.124(haracter not enclosed is matched.)-3.624 F .895 +(The sorting order of characters in range e)180 319.2 R .894 +(xpressions is determined by the current locale)-.15 F .375(and the v) +180 331.2 R .375(alues of the)-.25 F F2(LC_COLLA)2.875 E(TE)-.855 E F0 +(or)2.625 E F2(LC_ALL)2.875 E F0 .375(shell v)2.625 F .375 +(ariables, if set.)-.25 F 1.976 -.8(To o)5.376 H .376(btain the tra-).8 +F .068(ditional interpretation of range e)180 343.2 R .068 +(xpressions, where)-.15 F F1([a\255d])2.568 E F0 .067(is equi)2.567 F +-.25(va)-.25 G .067(lent to).25 F F1([abcd])2.567 E F0 2.567(,s)C .067 +(et v)-2.567 F(alue)-.25 E .156(of the)180 355.2 R F1(LC_ALL)2.656 E F0 +.156(shell v)2.656 F .156(ariable to)-.25 F F1(C)2.657 E F0 2.657(,o)C +2.657(re)-2.657 G .157(nable the)-2.657 F F1(globasciiranges)2.657 E F0 +.157(shell option.)2.657 F(A)5.157 E F12.657 E F0(may)2.657 E .193(\ +be matched by including it as the \214rst or last character in the set.) +180 367.2 R(A)5.193 E F1(])2.693 E F0 .193(may be matched by)2.693 F +(including it as the \214rst character in the set.)180 379.2 Q -.4(Wi) +180 397.2 S(thin).4 E F1([)3.07 E F0(and)3.07 E F1(])3.07 E F0(,)A F4 +-.15(ch)3.07 G(ar).15 E .571(acter classes)-.15 F F0 .571 +(can be speci\214ed using the syntax)3.071 F F1([:)3.071 E F4(class)A F1 +(:])A F0 3.071(,w)C(here)-3.071 E F4(class)3.071 E F0 +(is one of the follo)180 409.2 Q +(wing classes de\214ned in the POSIX standard:)-.25 E F1 5.889 +(alnum alpha ascii blank cntrl digit graph lo)180 421.2 R 5.889 +(wer print punct space up-)-.1 F 5(per w)180 433.2 R 5(ord xdigit)-.1 F +F0 4.289(Ac)180 445.2 S 1.789(haracter class matches an)-4.289 F 4.289 +(yc)-.15 G 1.789(haracter belonging to that class.)-4.289 F(The)6.789 E +F1 -.1(wo)4.29 G(rd).1 E F0(character)4.29 E +(class matches letters, digits, and the character _.)180 457.2 Q -.4(Wi) +180 475.2 S(thin).4 E F1([)4.537 E F0(and)4.537 E F1(])4.537 E F0 4.537 +(,a)C(n)-4.537 E F4 2.037(equivalence class)4.537 F F0 2.036 +(can be speci\214ed using the syntax)4.536 F F1([=)4.536 E F4(c)A F1(=]) +A F0 4.536(,w)C(hich)-4.536 E .125(matches all characters with the same\ + collation weight \(as de\214ned by the current locale\) as)180 487.2 R +(the character)180 499.2 Q F4(c)2.5 E F0(.)A -.4(Wi)180 517.2 S(thin).4 +E F1([)2.5 E F0(and)2.5 E F1(])2.5 E F0 2.5(,t)C(he syntax)-2.5 E F1([.) +2.5 E F4(symbol)A F1(.])A F0(matches the collating symbol)2.5 E F4 +(symbol)2.5 E F0(.)A .705(If the)108 534 R F1(extglob)3.205 E F0 .705 +(shell option is enabled using the)3.205 F F1(shopt)3.205 E F0 -.2(bu) +3.205 G .704(iltin, se).2 F -.15(ve)-.25 G .704(ral e).15 F .704 +(xtended pattern matching operators)-.15 F .255(are recognized.)108 546 +R .255(In the follo)5.255 F .255(wing description, a)-.25 F F4 +(pattern-list)2.755 E F0 .255 +(is a list of one or more patterns separated by a)2.755 F F1(|)2.756 E +F0(.)A(Composite patterns may be formed using one or more of the follo) +108 558 Q(wing sub-patterns:)-.25 E F1(?\()144 582 Q F4(pattern-list) +.833 E F1(\)).833 E F0(Matches zero or one occurrence of the gi)180 594 +Q -.15(ve)-.25 G 2.5(np).15 G(atterns)-2.5 E F1(*\()144 606 Q F4 +(pattern-list).833 E F1(\)).833 E F0 +(Matches zero or more occurrences of the gi)180 618 Q -.15(ve)-.25 G 2.5 +(np).15 G(atterns)-2.5 E F1(+\()144 630 Q F4(pattern-list).833 E F1(\)) +.833 E F0(Matches one or more occurrences of the gi)180 642 Q -.15(ve) +-.25 G 2.5(np).15 G(atterns)-2.5 E F1(@\()144 654 Q F4(pattern-list).833 +E F1(\)).833 E F0(Matches one of the gi)180 666 Q -.15(ve)-.25 G 2.5(np) +.15 G(atterns)-2.5 E F1(!\()144 678 Q F4(pattern-list).833 E F1(\)).833 +E F0(Matches an)180 690 Q(ything e)-.15 E(xcept one of the gi)-.15 E +-.15(ve)-.25 G 2.5(np).15 G(atterns)-2.5 E .969(Complicated e)108 706.8 +R .969(xtended pattern matching ag)-.15 F .969 +(ainst long strings is slo)-.05 F 2.268 -.65(w, e)-.25 H .968 +(specially when the patterns contain).65 F .09 +(alternations and the strings contain multiple matches.)108 718.8 R .091 +(Using separate matches ag)5.091 F .091(ainst shorter strings, or us-) +-.05 F(ing arrays of strings instead of a single long string, may be f) +108 730.8 Q(aster)-.1 E(.)-.55 E(GNU Bash 5.1)72 768 Q(2020 October 29) +141.235 E(27)190.395 E 0 Cg EP +%%Page: 28 28 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(Quote Remo)87 84 Q -.1(va)-.1 G(l).1 E F0 1.113 +(After the preceding e)108 96 R 1.113 +(xpansions, all unquoted occurrences of the characters)-.15 F F1(\\) +3.613 E F0(,)A F1<08>3.612 E F0 3.612(,a)C(nd)-3.612 E F1(")4.445 E F0 +1.112(that did not result)4.445 F(from one of the abo)108 108 Q .3 -.15 +(ve ex)-.15 H(pansions are remo).15 E -.15(ve)-.15 G(d.).15 E/F2 10.95 +/Times-Bold@0 SF(REDIRECTION)72 124.8 Q F0 .545(Before a command is e) +108 136.8 R -.15(xe)-.15 G .545(cuted, its input and output may be).15 F +/F3 10/Times-Italic@0 SF -.37(re)3.045 G(dir).37 E(ected)-.37 E F0 .545 +(using a special notation interpreted)3.815 F .405(by the shell.)108 +148.8 R .405(Redirection allo)5.405 F .405(ws commands' \214le handles \ +to be duplicated, opened, closed, made to refer to)-.25 F(dif)108 160.8 +Q 1.019(ferent \214les, and can change the \214les the command reads fr\ +om and writes to.)-.25 F 1.02(Redirection may also be)6.02 F .215 +(used to modify \214le handles in the current shell e)108 172.8 R -.15 +(xe)-.15 G .215(cution en).15 F 2.715(vironment. The)-.4 F(follo)2.715 E +.215(wing redirection operators)-.25 F .862(may precede or appear an)108 +184.8 R .862(ywhere within a)-.15 F F3 .862(simple command)3.702 F F0 +.862(or may follo)4.132 F 3.362(wa)-.25 G F3(command).2 E F0 5.862(.R) +.77 G .862(edirections are)-5.862 F(processed in the order the)108 196.8 +Q 2.5(ya)-.15 G(ppear)-2.5 E 2.5(,f)-.4 G(rom left to right.)-2.5 E .771 +(Each redirection that may be preceded by a \214le descriptor number ma\ +y instead be preceded by a w)108 213.6 R .771(ord of)-.1 F .292 +(the form {)108 225.6 R F3(varname)A F0 2.793(}. In)B .293 +(this case, for each redirection operator e)2.793 F .293 +(xcept >&- and <&-, the shell will allocate)-.15 F 3.18<618c>108 237.6 S +.679(le descriptor greater than or equal to 10 and assign it to)-3.18 F +F3(varname)3.179 E F0 5.679(.I)C 3.179(f>)-5.679 G .679 +(&- or <&- is preceded by {)-3.179 F F3(var)A(-)-.2 E(name)108 249.6 Q +F0 .599(}, the v)B .599(alue of)-.25 F F3(varname)3.099 E F0 .599 +(de\214nes the \214le descriptor to close.)3.099 F .6(If {)5.6 F F3 +(varname)A F0 3.1(}i)C 3.1(ss)-3.1 G .6(upplied, the redirection)-3.1 F +1.238(persists be)108 261.6 R 1.238(yond the scope of the command, allo) +-.15 F 1.238(wing the shell programmer to manage the \214le descriptor) +-.25 F(himself.)108 273.6 Q .283(In the follo)108 290.4 R .284(wing des\ +criptions, if the \214le descriptor number is omitted, and the \214rst \ +character of the redirect-)-.25 F .513(ion operator is)108 302.4 R F1(<) +3.012 E F0 3.012(,t)C .512 +(he redirection refers to the standard input \(\214le descriptor 0\).) +-3.012 F .512(If the \214rst character of the)5.512 F +(redirection operator is)108 314.4 Q F1(>)2.5 E F0 2.5(,t)C +(he redirection refers to the standard output \(\214le descriptor 1\).) +-2.5 E .824(The w)108 331.2 R .824(ord follo)-.1 F .824 +(wing the redirection operator in the follo)-.25 F .825 +(wing descriptions, unless otherwise noted, is sub-)-.25 F .463 +(jected to brace e)108 343.2 R .463(xpansion, tilde e)-.15 F .462 +(xpansion, parameter and v)-.15 F .462(ariable e)-.25 F .462 +(xpansion, command substitution, arith-)-.15 F .866(metic e)108 355.2 R +.866(xpansion, quote remo)-.15 F -.25(va)-.15 G .866(l, pathname e).25 F +.867(xpansion, and w)-.15 F .867(ord splitting.)-.1 F .867(If it e)5.867 +F .867(xpands to more than one)-.15 F -.1(wo)108 367.2 S(rd,).1 E F1 +(bash)2.5 E F0(reports an error)2.5 E(.)-.55 E +(Note that the order of redirections is signi\214cant.)108 384 Q -.15 +(Fo)5 G 2.5(re).15 G(xample, the command)-2.65 E(ls)144 400.8 Q F1(>)2.5 +E F0(dirlist 2)2.5 E F1(>&)A F0(1)A +(directs both standard output and standard error to the \214le)108 417.6 +Q F3(dirlist)2.85 E F0 2.5(,w).68 G(hile the command)-2.5 E(ls 2)144 +434.4 Q F1(>&)A F0(1)A F1(>)2.5 E F0(dirlist)2.5 E .505 +(directs only the standard output to \214le)108 451.2 R F3(dirlist)3.355 +E F0 3.005(,b).68 G .505(ecause the standard error w)-3.005 F .505 +(as duplicated from the standard)-.1 F +(output before the standard output w)108 463.2 Q(as redirected to)-.1 E +F3(dirlist)2.85 E F0(.).68 E F1(Bash)108 480 Q F0 .598(handles se)3.098 +F -.15(ve)-.25 G .598(ral \214lenames specially when the).15 F 3.099(ya) +-.15 G .599(re used in redirections, as described in the follo)-3.099 F +(wing)-.25 E 3.478(table. If)108 492 R .978 +(the operating system on which)3.478 F F1(bash)3.478 E F0 .978 +(is running pro)3.478 F .977 +(vides these special \214les, bash will use them;)-.15 F +(otherwise it will emulate them internally with the beha)108 504 Q +(vior described belo)-.2 E -.65(w.)-.25 G F1(/de)144 520.8 Q(v/fd/)-.15 +E F3(fd)A F0(If)180 532.8 Q F3(fd)2.5 E F0(is a v)2.5 E(alid inte)-.25 E +(ger)-.15 E 2.5<2c8c>-.4 G(le descriptor)-2.5 E F3(fd)2.5 E F0 +(is duplicated.)2.5 E F1(/de)144 544.8 Q(v/stdin)-.15 E F0 +(File descriptor 0 is duplicated.)180 556.8 Q F1(/de)144 568.8 Q +(v/stdout)-.15 E F0(File descriptor 1 is duplicated.)180 580.8 Q F1(/de) +144 592.8 Q(v/stderr)-.15 E F0(File descriptor 2 is duplicated.)180 +604.8 Q F1(/de)144 616.8 Q(v/tcp/)-.15 E F3(host)A F1(/)A F3(port)A F0 +(If)180 628.8 Q F3(host)2.996 E F0 .496(is a v)2.996 F .496 +(alid hostname or Internet address, and)-.25 F F3(port)2.997 E F0 .497 +(is an inte)2.997 F .497(ger port number or ser)-.15 F(-)-.2 E +(vice name,)180 640.8 Q F1(bash)2.5 E F0 +(attempts to open the corresponding TCP sock)2.5 E(et.)-.1 E F1(/de)144 +652.8 Q(v/udp/)-.15 E F3(host)A F1(/)A F3(port)A F0(If)180 664.8 Q F3 +(host)2.997 E F0 .497(is a v)2.997 F .497 +(alid hostname or Internet address, and)-.25 F F3(port)2.996 E F0 .496 +(is an inte)2.996 F .496(ger port number or ser)-.15 F(-)-.2 E +(vice name,)180 676.8 Q F1(bash)2.5 E F0 +(attempts to open the corresponding UDP sock)2.5 E(et.)-.1 E 2.5(Af)108 +693.6 S(ailure to open or create a \214le causes the redirection to f) +-2.6 E(ail.)-.1 E .045(Redirections using \214le descriptors greater th\ +an 9 should be used with care, as the)108 710.4 R 2.546(ym)-.15 G .046 +(ay con\215ict with \214le de-)-2.546 F +(scriptors the shell uses internally)108 722.4 Q(.)-.65 E(GNU Bash 5.1) +72 768 Q(2020 October 29)141.235 E(28)190.395 E 0 Cg EP +%%Page: 29 29 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(Redir)87 84 Q(ecting Input)-.18 E F0 .391 +(Redirection of input causes the \214le whose name results from the e) +108 96 R .391(xpansion of)-.15 F/F2 10/Times-Italic@0 SF(wor)3.231 E(d) +-.37 E F0 .391(to be opened for read-)3.661 F(ing on \214le descriptor) +108 108 Q F2(n)2.86 E F0 2.5(,o).24 G 2.5(rt)-2.5 G +(he standard input \(\214le descriptor 0\) if)-2.5 E F2(n)2.86 E F0 +(is not speci\214ed.)2.74 E +(The general format for redirecting input is:)108 124.8 Q([)144 141.6 Q +F2(n)A F0(])A F1(<)A F2(wor)A(d)-.37 E F1(Redir)87 158.4 Q +(ecting Output)-.18 E F0 .174 +(Redirection of output causes the \214le whose name results from the e) +108 170.4 R .175(xpansion of)-.15 F F2(wor)3.015 E(d)-.37 E F0 .175 +(to be opened for writ-)3.445 F .084(ing on \214le descriptor)108 182.4 +R F2(n)2.944 E F0 2.583(,o).24 G 2.583(rt)-2.583 G .083 +(he standard output \(\214le descriptor 1\) if)-2.583 F F2(n)2.943 E F0 +.083(is not speci\214ed.)2.823 F .083(If the \214le does not e)5.083 F +(x-)-.15 E(ist it is created; if it does e)108 194.4 Q +(xist it is truncated to zero size.)-.15 E +(The general format for redirecting output is:)108 211.2 Q([)144 228 Q +F2(n)A F0(])A F1(>)A F2(wor)A(d)-.37 E F0 .154 +(If the redirection operator is)108 244.8 R F1(>)2.654 E F0 2.654(,a)C +.154(nd the)-2.654 F F1(noclob)2.654 E(ber)-.1 E F0 .154(option to the) +2.654 F F1(set)2.655 E F0 -.2(bu)2.655 G .155 +(iltin has been enabled, the redirection).2 F .658(will f)108 256.8 R +.658(ail if the \214le whose name results from the e)-.1 F .658 +(xpansion of)-.15 F F2(wor)3.158 E(d)-.37 E F0 -.15(ex)3.158 G .657 +(ists and is a re).15 F .657(gular \214le.)-.15 F .657(If the redi-) +5.657 F .408(rection operator is)108 268.8 R F1(>|)2.909 E F0 2.909(,o)C +2.909(rt)-2.909 G .409(he redirection operator is)-2.909 F F1(>)2.909 E +F0 .409(and the)2.909 F F1(noclob)2.909 E(ber)-.1 E F0 .409 +(option to the)2.909 F F1(set)2.909 E F0 -.2(bu)2.909 G .409 +(iltin command).2 F(is not enabled, the redirection is attempted e)108 +280.8 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214le named by) +-2.5 E F2(wor)2.5 E(d)-.37 E F0 -.15(ex)2.5 G(ists.).15 E F1 -.25(Ap)87 +297.6 S(pending Redir).25 E(ected Output)-.18 E F0 .642 +(Redirection of output in this f)108 309.6 R .642 +(ashion causes the \214le whose name results from the e)-.1 F .641 +(xpansion of)-.15 F F2(wor)3.481 E(d)-.37 E F0 .641(to be)3.911 F .454 +(opened for appending on \214le descriptor)108 321.6 R F2(n)3.315 E F0 +2.955(,o).24 G 2.955(rt)-2.955 G .455 +(he standard output \(\214le descriptor 1\) if)-2.955 F F2(n)3.315 E F0 +.455(is not speci\214ed.)3.195 F(If)5.455 E(the \214le does not e)108 +333.6 Q(xist it is created.)-.15 E +(The general format for appending output is:)108 350.4 Q([)144 367.2 Q +F2(n)A F0(])A F1(>>)A F2(wor)A(d)-.37 E F1(Redir)87 384 Q +(ecting Standard Output and Standard Err)-.18 E(or)-.18 E F0 .249 +(This construct allo)108 396 R .249(ws both the standard output \(\214l\ +e descriptor 1\) and the standard error output \(\214le descrip-)-.25 F +(tor 2\) to be redirected to the \214le whose name is the e)108 408 Q +(xpansion of)-.15 E F2(wor)2.84 E(d)-.37 E F0(.).77 E(There are tw)108 +424.8 Q 2.5(of)-.1 G +(ormats for redirecting standard output and standard error:)-2.5 E F1 +(&>)144 441.6 Q F2(wor)A(d)-.37 E F0(and)108 453.6 Q F1(>&)144 465.6 Q +F2(wor)A(d)-.37 E F0(Of the tw)108 482.4 Q 2.5(of)-.1 G +(orms, the \214rst is preferred.)-2.5 E(This is semantically equi)5 E +-.25(va)-.25 G(lent to).25 E F1(>)144 499.2 Q F2(wor)A(d)-.37 E F0(2)2.5 +E F1(>&)A F0(1)A .114(When using the second form,)108 516 R F2(wor)2.614 +E(d)-.37 E F0 .114(may not e)2.614 F .114(xpand to a number or)-.15 F F1 +2.614 E F0 5.114(.I)C 2.614(fi)-5.114 G 2.615(td)-2.614 G .115 +(oes, other redirection operators)-2.615 F(apply \(see)108 528 Q F1 +(Duplicating File Descriptors)2.5 E F0(belo)2.5 E +(w\) for compatibility reasons.)-.25 E F1 -.25(Ap)87 544.8 S +(pending Standard Output and Standard Err).25 E(or)-.18 E F0 .249 +(This construct allo)108 556.8 R .249(ws both the standard output \(\ +\214le descriptor 1\) and the standard error output \(\214le descrip-) +-.25 F(tor 2\) to be appended to the \214le whose name is the e)108 +568.8 Q(xpansion of)-.15 E F2(wor)2.84 E(d)-.37 E F0(.).77 E +(The format for appending standard output and standard error is:)108 +585.6 Q F1(&>>)144 602.4 Q F2(wor)A(d)-.37 E F0 +(This is semantically equi)108 619.2 Q -.25(va)-.25 G(lent to).25 E F1 +(>>)144 636 Q F2(wor)A(d)-.37 E F0(2)2.5 E F1(>&)A F0(1)A(\(see)108 +652.8 Q F1(Duplicating File Descriptors)2.5 E F0(belo)2.5 E(w\).)-.25 E +F1(Her)87 669.6 Q 2.5(eD)-.18 G(ocuments)-2.5 E F0 .33(This type of red\ +irection instructs the shell to read input from the current source unti\ +l a line containing only)108 681.6 R F2(delimiter)108.35 693.6 Q F0 .615 +(\(with no trailing blanks\) is seen.)3.845 F .615 +(All of the lines read up to that point are then used as the stan-)5.615 +F(dard input \(or \214le descriptor)108 705.6 Q F2(n)2.5 E F0(if)2.5 E +F2(n)2.5 E F0(is speci\214ed\) for a command.)2.5 E +(The format of here-documents is:)108 722.4 Q(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(29)190.395 E 0 Cg EP +%%Page: 30 30 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E([)144 84 Q/F1 10 +/Times-Italic@0 SF(n)A F0(])A/F2 10/Times-Bold@0 SF(<<)A F0([)A F2A +F0(])A F1(wor)A(d)-.37 E(her)164 96 Q(e-document)-.37 E(delimiter)144 +108 Q F0 .301(No parameter and v)108 124.8 R .302(ariable e)-.25 F .302 +(xpansion, command substitution, arithmetic e)-.15 F .302 +(xpansion, or pathname e)-.15 F(xpansion)-.15 E .381(is performed on)108 +136.8 R F1(wor)3.221 E(d)-.37 E F0 5.381(.I).77 G 2.881(fa)-5.381 G .681 +-.15(ny p)-2.881 H .381(art of).15 F F1(wor)3.221 E(d)-.37 E F0 .381 +(is quoted, the)3.651 F F1(delimiter)3.231 E F0 .381 +(is the result of quote remo)3.611 F -.25(va)-.15 G 2.881(lo).25 G(n) +-2.881 E F1(wor)3.221 E(d)-.37 E F0(,).77 E .773 +(and the lines in the here-document are not e)108 148.8 R 3.274 +(xpanded. If)-.15 F F1(wor)3.274 E(d)-.37 E F0 .774 +(is unquoted, all lines of the here-document)3.274 F 1.195 +(are subjected to parameter e)108 160.8 R 1.194 +(xpansion, command substitution, and arithmetic e)-.15 F 1.194 +(xpansion, the character se-)-.15 F(quence)108 172.8 Q F2(\\) +2.5 E F0(is ignored, and)2.5 E F2(\\)2.5 E F0 +(must be used to quote the characters)2.5 E F2(\\)2.5 E F0(,)A F2($)2.5 +E F0 2.5(,a)C(nd)-2.5 E F2<92>2.5 E F0(.)A .601 +(If the redirection operator is)108 189.6 R F2(<<\255)3.101 E F0 3.101 +(,t)C .601(hen all leading tab characters are stripped from input lines\ + and the line)-3.101 F(containing)108 201.6 Q F1(delimiter)2.85 E F0 5 +(.T).73 G(his allo)-5 E +(ws here-documents within shell scripts to be indented in a natural f) +-.25 E(ashion.)-.1 E F2(Her)87 218.4 Q 2.5(eS)-.18 G(trings)-2.5 E F0 +2.5(Av)108 230.4 S(ariant of here documents, the format is:)-2.75 E([) +144 247.2 Q F1(n)A F0(])A F2(<<<)A F1(wor)A(d)-.37 E F0(The)108 264 Q F1 +(wor)3.292 E(d)-.37 E F0(under)3.292 E .792(goes tilde e)-.18 F .792 +(xpansion, parameter and v)-.15 F .792(ariable e)-.25 F .791 +(xpansion, command substitution, arithmetic)-.15 F -.15(ex)108 276 S +1.187(pansion, and quote remo).15 F -.25(va)-.15 G 3.687(l. P).25 F +1.187(athname e)-.15 F 1.187(xpansion and w)-.15 F 1.187 +(ord splitting are not performed.)-.1 F 1.188(The result is)6.187 F .375 +(supplied as a single string, with a ne)108 288 R .374(wline appended, \ +to the command on its standard input \(or \214le descrip-)-.25 F(tor)108 +300 Q F1(n)2.5 E F0(if)2.5 E F1(n)2.5 E F0(is speci\214ed\).)2.5 E F2 +(Duplicating File Descriptors)87 316.8 Q F0(The redirection operator)108 +328.8 Q([)144 345.6 Q F1(n)A F0(])A F2(<&)A F1(wor)A(d)-.37 E F0 .126 +(is used to duplicate input \214le descriptors.)108 362.4 R(If)5.127 E +F1(wor)2.967 E(d)-.37 E F0 -.15(ex)3.397 G .127 +(pands to one or more digits, the \214le descriptor denoted).15 F(by)108 +374.4 Q F1(n)3.318 E F0 .458(is made to be a cop)3.198 F 2.958(yo)-.1 G +2.958(ft)-2.958 G .457(hat \214le descriptor)-2.958 F 5.457(.I)-.55 G +2.957(ft)-5.457 G .457(he digits in)-2.957 F F1(wor)3.297 E(d)-.37 E F0 +.457(do not specify a \214le descriptor open)3.727 F .149 +(for input, a redirection error occurs.)108 386.4 R(If)5.149 E F1(wor) +2.989 E(d)-.37 E F0 -.25(eva)3.419 G .149(luates to).25 F F22.649 E +F0 2.65<2c8c>C .15(le descriptor)-2.65 F F1(n)3.01 E F0 .15(is closed.) +2.89 F(If)5.15 E F1(n)3.01 E F0 .15(is not speci\214ed,)2.89 F +(the standard input \(\214le descriptor 0\) is used.)108 398.4 Q +(The operator)108 415.2 Q([)144 432 Q F1(n)A F0(])A F2(>&)A F1(wor)A(d) +-.37 E F0 .444 +(is used similarly to duplicate output \214le descriptors.)108 448.8 R +(If)5.444 E F1(n)3.304 E F0 .443 +(is not speci\214ed, the standard output \(\214le descrip-)3.183 F .565 +(tor 1\) is used.)108 460.8 R .565(If the digits in)5.565 F F1(wor)3.406 +E(d)-.37 E F0 .566(do not specify a \214le descriptor open for output, \ +a redirection error oc-)3.836 F 3.204(curs. If)108 472.8 R F1(wor)3.544 +E(d)-.37 E F0 -.25(eva)3.974 G .704(luates to).25 F F23.204 E F0 +3.204<2c8c>C .704(le descriptor)-3.204 F F1(n)3.563 E F0 .703 +(is closed.)3.443 F .703(As a special case, if)5.703 F F1(n)3.203 E F0 +.703(is omitted, and)3.203 F F1(wor)3.203 E(d)-.37 E F0(does)3.203 E +.965(not e)108 484.8 R .965(xpand to one or more digits or)-.15 F F2 +3.465 E F0 3.466(,t)C .966 +(he standard output and standard error are redirected as described) +-3.466 F(pre)108 496.8 Q(viously)-.25 E(.)-.65 E F2(Mo)87 513.6 Q +(ving File Descriptors)-.1 E F0(The redirection operator)108 525.6 Q([) +144 542.4 Q F1(n)A F0(])A F2(<&)A F1(digit)A F2A F0(mo)108 559.2 Q +-.15(ve)-.15 G 3.018(st).15 G .518(he \214le descriptor)-3.018 F F1 +(digit)3.018 E F0 .518(to \214le descriptor)3.018 F F1(n)3.378 E F0 +3.018(,o).24 G 3.018(rt)-3.018 G .517 +(he standard input \(\214le descriptor 0\) if)-3.018 F F1(n)3.017 E F0 +.517(is not speci-)3.017 F(\214ed.)108 571.2 Q F1(digit)5 E F0 +(is closed after being duplicated to)2.5 E F1(n)2.5 E F0(.)A(Similarly) +108 588 Q 2.5(,t)-.65 G(he redirection operator)-2.5 E([)144 604.8 Q F1 +(n)A F0(])A F2(>&)A F1(digit)A F2A F0(mo)108 621.6 Q -.15(ve)-.15 G +2.767(st).15 G .267(he \214le descriptor)-2.767 F F1(digit)2.767 E F0 +.267(to \214le descriptor)2.767 F F1(n)3.127 E F0 2.767(,o).24 G 2.767 +(rt)-2.767 G .268(he standard output \(\214le descriptor 1\) if)-2.767 F +F1(n)2.768 E F0 .268(is not speci-)2.768 F(\214ed.)108 633.6 Q F2 +(Opening File Descriptors f)87 650.4 Q(or Reading and Writing)-.25 E F0 +(The redirection operator)108 662.4 Q([)144 679.2 Q F1(n)A F0(])A F2(<>) +A F1(wor)A(d)-.37 E F0 .518(causes the \214le whose name is the e)108 +696 R .518(xpansion of)-.15 F F1(wor)3.358 E(d)-.37 E F0 .518 +(to be opened for both reading and writing on \214le de-)3.788 F +(scriptor)108 708 Q F1(n)2.86 E F0 2.5(,o).24 G 2.5(ro)-2.5 G 2.5<6e8c> +-2.5 G(le descriptor 0 if)-2.5 E F1(n)2.86 E F0(is not speci\214ed.)2.74 +E(If the \214le does not e)5 E(xist, it is created.)-.15 E(GNU Bash 5.1) +72 768 Q(2020 October 29)141.235 E(30)190.395 E 0 Cg EP +%%Page: 31 31 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10.95 +/Times-Bold@0 SF(ALIASES)72 84 Q/F2 10/Times-Italic@0 SF(Aliases)108 96 +Q F0(allo)3.173 E 3.173(was)-.25 G .674(tring to be substituted for a w) +-3.173 F .674(ord when it is used as the \214rst w)-.1 F .674 +(ord of a simple command.)-.1 F .394(The shell maintains a list of alia\ +ses that may be set and unset with the)108 108 R/F3 10/Times-Bold@0 SF +(alias)2.893 E F0(and)2.893 E F3(unalias)2.893 E F0 -.2(bu)2.893 G .393 +(iltin commands).2 F(\(see)108 120 Q/F4 9/Times-Bold@0 SF 1.979(SHELL B) +4.479 F(UIL)-.09 E 1.979(TIN COMMANDS)-.828 F F0(belo)4.229 E 4.48 +(w\). The)-.25 F 1.98(\214rst w)4.48 F 1.98 +(ord of each simple command, if unquoted, is)-.1 F(check)108 132 Q .473 +(ed to see if it has an alias.)-.1 F .473(If so, that w)5.473 F .472 +(ord is replaced by the te)-.1 F .472(xt of the alias.)-.15 F .472 +(The characters)5.472 F F3(/)2.972 E F0(,)A F3($)2.972 E F0(,)A F3<92> +2.972 E F0(,)A(and)108 144 Q F3(=)3.611 E F0 1.111(and an)3.611 F 3.611 +(yo)-.15 G 3.611(ft)-3.611 G 1.111(he shell)-3.611 F F2(metac)3.612 E +(har)-.15 E(acter)-.15 E(s)-.1 E F0 1.112 +(or quoting characters listed abo)3.612 F 1.412 -.15(ve m)-.15 H 1.112 +(ay not appear in an alias).15 F 3.62(name. The)108 156 R 1.12 +(replacement te)3.62 F 1.119(xt may contain an)-.15 F 3.619(yv)-.15 G +1.119(alid shell input, including shell metacharacters.)-3.869 F 1.119 +(The \214rst)6.119 F -.1(wo)108 168 S .513(rd of the replacement te).1 F +.513(xt is tested for aliases, b)-.15 F .513(ut a w)-.2 F .514 +(ord that is identical to an alias being e)-.1 F .514(xpanded is)-.15 F +.296(not e)108 180 R .296(xpanded a second time.)-.15 F .296 +(This means that one may alias)5.296 F F3(ls)2.796 E F0(to)2.796 E F3 +.296(ls \255F)2.796 F F0 2.796(,f)C .295(or instance, and)-2.796 F F3 +(bash)2.795 E F0 .295(does not try)2.795 F .528(to recursi)108 192 R +-.15(ve)-.25 G .528(ly e).15 F .528(xpand the replacement te)-.15 F +3.028(xt. If)-.15 F .528(the last character of the alias v)3.028 F .529 +(alue is a)-.25 F F2(blank)3.299 E F0 3.029(,t).67 G .529(hen the ne) +-3.029 F(xt)-.15 E(command w)108 204 Q(ord follo)-.1 E +(wing the alias is also check)-.25 E(ed for alias e)-.1 E(xpansion.)-.15 +E(Aliases are created and listed with the)108 220.8 Q F3(alias)2.5 E F0 +(command, and remo)2.5 E -.15(ve)-.15 G 2.5(dw).15 G(ith the)-2.5 E F3 +(unalias)2.5 E F0(command.)2.5 E .284 +(There is no mechanism for using ar)108 237.6 R .284 +(guments in the replacement te)-.18 F 2.784(xt. If)-.15 F(ar)2.784 E +.284(guments are needed, a shell func-)-.18 F(tion should be used \(see) +108 249.6 Q F4(FUNCTIONS)2.5 E F0(belo)2.25 E(w\).)-.25 E .282 +(Aliases are not e)108 266.4 R .282 +(xpanded when the shell is not interacti)-.15 F -.15(ve)-.25 G 2.782(,u) +.15 G .282(nless the)-2.782 F F3(expand_aliases)2.783 E F0 .283 +(shell option is set us-)2.783 F(ing)108 278.4 Q F3(shopt)2.5 E F0 +(\(see the description of)2.5 E F3(shopt)2.5 E F0(under)2.5 E F4 +(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 +E .436 +(The rules concerning the de\214nition and use of aliases are some)108 +295.2 R .435(what confusing.)-.25 F F3(Bash)5.435 E F0(al)2.935 E -.1 +(wa)-.1 G .435(ys reads at least).1 F .67 +(one complete line of input, and all lines that mak)108 307.2 R 3.17(eu) +-.1 G 3.17(pac)-3.17 G .67(ompound command, before e)-3.17 F -.15(xe) +-.15 G .67(cuting an).15 F 3.17(yo)-.15 G 3.17(ft)-3.17 G(he)-3.17 E +1.059(commands on that line or the compound command.)108 319.2 R 1.059 +(Aliases are e)6.059 F 1.058(xpanded when a command is read, not)-.15 F +.074(when it is e)108 331.2 R -.15(xe)-.15 G 2.574(cuted. Therefore,).15 +F .075(an alias de\214nition appearing on the same line as another comm\ +and does not)2.574 F(tak)108 343.2 Q 2.838(ee)-.1 G -.25(ff)-2.838 G +.338(ect until the ne).25 F .338(xt line of input is read.)-.15 F .337 +(The commands follo)5.337 F .337 +(wing the alias de\214nition on that line are)-.25 F .551(not af)108 +355.2 R .551(fected by the ne)-.25 F 3.051(wa)-.25 G 3.051(lias. This) +-3.051 F(beha)3.051 E .551(vior is also an issue when functions are e) +-.2 F -.15(xe)-.15 G 3.051(cuted. Aliases).15 F .552(are e)3.052 F(x-) +-.15 E .426(panded when a function de\214nition is read, not when the f\ +unction is e)108 367.2 R -.15(xe)-.15 G .425 +(cuted, because a function de\214nition).15 F .403(is itself a command.) +108 379.2 R .403 +(As a consequence, aliases de\214ned in a function are not a)5.403 F +-.25(va)-.2 G .404(ilable until after that func-).25 F .862(tion is e) +108 391.2 R -.15(xe)-.15 G 3.362(cuted. T).15 F 3.362(ob)-.8 G 3.362(es) +-3.362 G .862(afe, al)-3.362 F -.1(wa)-.1 G .862 +(ys put alias de\214nitions on a separate line, and do not use).1 F F3 +(alias)3.362 E F0 .862(in com-)3.362 F(pound commands.)108 403.2 Q -.15 +(Fo)108 420 S 2.5(ra).15 G(lmost e)-2.5 E -.15(ve)-.25 G +(ry purpose, aliases are superseded by shell functions.).15 E F1 +(FUNCTIONS)72 436.8 Q F0 3.467(As)108 448.8 S .967 +(hell function, de\214ned as described abo)-3.467 F 1.267 -.15(ve u)-.15 +H(nder).15 E F4 .967(SHELL GRAMMAR)3.467 F/F5 9/Times-Roman@0 SF(,)A F0 +.968(stores a series of commands for)3.217 F 1.002(later e)108 460.8 R +-.15(xe)-.15 G 3.502(cution. When).15 F 1.002(the name of a shell funct\ +ion is used as a simple command name, the list of com-)3.502 F .315 +(mands associated with that function name is e)108 472.8 R -.15(xe)-.15 +G 2.816(cuted. Functions).15 F .316(are e)2.816 F -.15(xe)-.15 G .316 +(cuted in the conte).15 F .316(xt of the current)-.15 F .036 +(shell; no ne)108 484.8 R 2.536(wp)-.25 G .036 +(rocess is created to interpret them \(contrast this with the e)-2.536 F +-.15(xe)-.15 G .036(cution of a shell script\).).15 F .035(When a)5.035 +F .639(function is e)108 496.8 R -.15(xe)-.15 G .639(cuted, the ar).15 F +.639 +(guments to the function become the positional parameters during its e) +-.18 F -.15(xe)-.15 G(cution.).15 E .533(The special parameter)108 508.8 +R F3(#)3.033 E F0 .532(is updated to re\215ect the change.)3.033 F .532 +(Special parameter)5.532 F F3(0)3.032 E F0 .532(is unchanged.)3.032 F +.532(The \214rst ele-)5.532 F(ment of the)108 520.8 Q F4(FUNCN)2.5 E +(AME)-.18 E F0 -.25(va)2.25 G +(riable is set to the name of the function while the function is e).25 E +-.15(xe)-.15 G(cuting.).15 E 1.25(All other aspects of the shell e)108 +537.6 R -.15(xe)-.15 G 1.25(cution en).15 F 1.25 +(vironment are identical between a function and its caller with)-.4 F +1.215(these e)108 549.6 R 1.215(xceptions: the)-.15 F F4(DEB)3.715 E(UG) +-.09 E F0(and)3.465 E F3(RETURN)3.715 E F0 1.215 +(traps \(see the description of the)3.715 F F3(trap)3.714 E F0 -.2(bu) +3.714 G 1.214(iltin under).2 F F4(SHELL)3.714 E -.09(BU)108 561.6 S(IL) +.09 E .478(TIN COMMANDS)-.828 F F0(belo)2.728 E .479 +(w\) are not inherited unless the function has been gi)-.25 F -.15(ve) +-.25 G 2.979(nt).15 G(he)-2.979 E F3(trace)2.979 E F0(attrib)2.979 E +.479(ute \(see)-.2 F .421(the description of the)108 573.6 R F4(declar) +2.92 E(e)-.162 E F0 -.2(bu)2.67 G .42(iltin belo).2 F .42(w\) or the) +-.25 F F3 .42(\255o functrace)2.92 F F0 .42 +(shell option has been enabled with the)2.92 F F3(set)2.92 E F0 -.2(bu) +108 585.6 S .071(iltin \(in which case all functions inherit the).2 F F3 +(DEB)2.572 E(UG)-.1 E F0(and)2.572 E F3(RETURN)2.572 E F0 .072 +(traps\), and the)2.572 F F4(ERR)2.572 E F0 .072(trap is not inher)2.322 +F(-)-.2 E(ited unless the)108 597.6 Q F3(\255o errtrace)2.5 E F0 +(shell option has been enabled.)2.5 E -1.11(Va)108 614.4 S .656 +(riables local to the function may be declared with the)1.11 F F3(local) +3.155 E F0 -.2(bu)3.155 G .655(iltin command.).2 F(Ordinarily)5.655 E +3.155(,v)-.65 G .655(ariables and)-3.405 F .05(their v)108 626.4 R .05 +(alues are shared between the function and its caller)-.25 F 5.051(.I) +-.55 G 2.551(fav)-5.051 G .051(ariable is declared)-2.801 F F3(local) +2.551 E F0 2.551(,t)C .051(he v)-2.551 F(ariable')-.25 E 2.551(sv)-.55 G +(isi-)-2.551 E 1.186(ble scope is restricted to that function and its c\ +hildren \(including the functions it calls\).)108 638.4 R 1.185(Local v) +6.185 F(ariables)-.25 E("shado)108 650.4 Q .154(w" v)-.25 F .154 +(ariables with the same name declared at pre)-.25 F .155(vious scopes.) +-.25 F -.15(Fo)5.155 G 2.655(ri).15 G .155(nstance, a local v)-2.655 F +.155(ariable declared)-.25 F .67(in a function hides a global v)108 +662.4 R .669(ariable of the same name: references and assignments refer\ + to the local v)-.25 F(ari-)-.25 E .688(able, lea)108 674.4 R .688 +(ving the global v)-.2 F .688(ariable unmodi\214ed.)-.25 F .688 +(When the function returns, the global v)5.688 F .688 +(ariable is once ag)-.25 F(ain)-.05 E(visible.)108 686.4 Q .727 +(The shell uses)108 703.2 R F2 .727(dynamic scoping)3.227 F F0 .726 +(to control a v)3.227 F(ariable')-.25 E 3.226(sv)-.55 G .726 +(isibility within functions.)-3.226 F -.4(Wi)5.726 G .726 +(th dynamic scoping,).4 F .007(visible v)108 715.2 R .007 +(ariables and their v)-.25 F .007 +(alues are a result of the sequence of function calls that caused e)-.25 +F -.15(xe)-.15 G .008(cution to reach).15 F .814(the current function.) +108 727.2 R .813(The v)5.814 F .813(alue of a v)-.25 F .813 +(ariable that a function sees depends on its v)-.25 F .813 +(alue within its caller)-.25 F 3.313(,i)-.4 G(f)-3.313 E(GNU Bash 5.1)72 +768 Q(2020 October 29)141.235 E(31)190.395 E 0 Cg EP +%%Page: 32 32 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(an)108 84 Q 2.116 +-.65(y, w)-.15 H .816 +(hether that caller is the "global" scope or another shell function.).65 +F .817(This is also the v)5.816 F .817(alue that a local)-.25 F -.25(va) +108 96 S(riable declaration "shado).25 E(ws", and the v)-.25 E +(alue that is restored when the function returns.)-.25 E -.15(Fo)108 +112.8 S 2.724(re).15 G .224(xample, if a v)-2.874 F(ariable)-.25 E/F1 10 +/Times-Italic@0 SF(var)2.724 E F0 .223(is declared as local in function) +2.724 F F1(func1)2.723 E F0 2.723(,a)C(nd)-2.723 E F1(func1)2.723 E F0 +.223(calls another function)2.723 F F1(func2)2.723 E F0(,)A .463 +(references to)108 124.8 R F1(var)2.963 E F0 .463(made from within)2.963 +F F1(func2)2.963 E F0 .463(will resolv)2.963 F 2.964(et)-.15 G 2.964(ot) +-2.964 G .464(he local v)-2.964 F(ariable)-.25 E F1(var)2.964 E F0(from) +2.964 E F1(func1)2.964 E F0 2.964(,s)C(hado)-2.964 E .464(wing an)-.25 F +(y)-.15 E(global v)108 136.8 Q(ariable named)-.25 E F1(var)2.5 E F0(.)A +(The)108 153.6 Q/F2 10/Times-Bold@0 SF(unset)2.983 E F0 -.2(bu)2.983 G +.483(iltin also acts using the same dynamic scope: if a v).2 F .482 +(ariable is local to the current scope,)-.25 F F2(unset)2.982 E F0 .19 +(will unset it; otherwise the unset will refer to the v)108 165.6 R .19 +(ariable found in an)-.25 F 2.69(yc)-.15 G .19 +(alling scope as described abo)-2.69 F -.15(ve)-.15 G 5.19(.I).15 G(f) +-5.19 E 2.721(av)108 177.6 S .221(ariable at the current local scope is\ + unset, it will remain so until it is reset in that scope or until the \ +func-)-2.971 F .013(tion returns.)108 189.6 R .013 +(Once the function returns, an)5.013 F 2.513(yi)-.15 G .014 +(nstance of the v)-2.513 F .014(ariable at a pre)-.25 F .014 +(vious scope will become visible.)-.25 F .567(If the unset acts on a v) +108 201.6 R .566(ariable at a pre)-.25 F .566(vious scope, an)-.25 F +3.066(yi)-.15 G .566(nstance of a v)-3.066 F .566 +(ariable with that name that had been)-.25 F(shado)108 213.6 Q +(wed will become visible.)-.25 E(The)108 230.4 Q F2(FUNCNEST)3.528 E F0 +-.25(va)3.528 G 1.028(riable, if set to a numeric v).25 F 1.028 +(alue greater than 0, de\214nes a maximum function nesting)-.25 F(le)108 +242.4 Q -.15(ve)-.25 G 2.5(l. Function).15 F(in)2.5 E -.2(vo)-.4 G +(cations that e).2 E(xceed the limit cause the entire command to abort.) +-.15 E .044(If the b)108 259.2 R .043(uiltin command)-.2 F F2 -.18(re) +2.543 G(tur).18 E(n)-.15 E F0 .043(is e)2.543 F -.15(xe)-.15 G .043 +(cuted in a function, the function completes and e).15 F -.15(xe)-.15 G +.043(cution resumes with).15 F 1.011(the ne)108 271.2 R 1.011 +(xt command after the function call.)-.15 F(An)6.011 E 3.511(yc)-.15 G +1.011(ommand associated with the)-3.511 F F2(RETURN)3.512 E F0 1.012 +(trap is e)3.512 F -.15(xe)-.15 G(cuted).15 E .214(before e)108 283.2 R +-.15(xe)-.15 G .214(cution resumes.).15 F .213 +(When a function completes, the v)5.214 F .213 +(alues of the positional parameters and the spe-)-.25 F(cial parameter) +108 295.2 Q F2(#)2.5 E F0(are restored to the v)2.5 E(alues the)-.25 E +2.5(yh)-.15 G(ad prior to the function')-2.5 E 2.5(se)-.55 G -.15(xe) +-2.65 G(cution.).15 E 1.358 +(Function names and de\214nitions may be listed with the)108 312 R F2 +3.858 E F0 1.358(option to the)3.858 F F2(declar)3.858 E(e)-.18 E +F0(or)3.859 E F2(typeset)3.859 E F0 -.2(bu)3.859 G 1.359(iltin com-).2 F +3.39(mands. The)108 324 R F23.39 E F0 .89(option to)3.39 F F2 +(declar)3.39 E(e)-.18 E F0(or)3.39 E F2(typeset)3.39 E F0 .89 +(will list the function names only \(and optionally the source)3.39 F +.326(\214le and line number)108 336 R 2.826(,i)-.4 G 2.826(ft)-2.826 G +(he)-2.826 E F2(extdeb)2.826 E(ug)-.2 E F0 .326 +(shell option is enabled\).)2.826 F .327(Functions may be e)5.327 F .327 +(xported so that subshells)-.15 F 1.298(automatically ha)108 348 R 1.598 +-.15(ve t)-.2 H 1.298(hem de\214ned with the).15 F F23.798 E F0 +1.298(option to the)3.798 F F2(export)3.797 E F0 -.2(bu)3.797 G 3.797 +(iltin. A).2 F 1.297(function de\214nition may be)3.797 F +(deleted using the)108 360 Q F22.5 E F0(option to the)2.5 E F2 +(unset)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .371(Functions may be recursi) +108 376.8 R -.15(ve)-.25 G 5.371(.T).15 G(he)-5.371 E F2(FUNCNEST)2.871 +E F0 -.25(va)2.871 G .371 +(riable may be used to limit the depth of the function call).25 F .323 +(stack and restrict the number of function in)108 388.8 R -.2(vo)-.4 G +2.822(cations. By).2 F(def)2.822 E .322 +(ault, no limit is imposed on the number of re-)-.1 F(cursi)108 400.8 Q +.3 -.15(ve c)-.25 H(alls.).15 E/F3 10.95/Times-Bold@0 SF(ARITHMETIC EV) +72 417.6 Q(ALU)-1.478 E -1.04(AT)-.657 G(ION)1.04 E F0 1.088 +(The shell allo)108 429.6 R 1.088(ws arithmetic e)-.25 F 1.089 +(xpressions to be e)-.15 F -.25(va)-.25 G 1.089 +(luated, under certain circumstances \(see the).25 F F2(let)3.589 E F0 +(and)3.589 E F2(de-)3.589 E(clar)108 441.6 Q(e)-.18 E F0 -.2(bu)3.453 G +.953(iltin commands, the).2 F F2(\(\()3.453 E F0 .952 +(compound command, and)3.452 F F2 .952(Arithmetic Expansion)3.452 F F0 +3.452(\). Ev)B .952(aluation is done in)-.25 F<8c78>108 453.6 Q 1.057 +(ed-width inte)-.15 F 1.057(gers with no check for o)-.15 F -.15(ve)-.15 +G(r\215o).15 E 2.357 -.65(w, t)-.25 H 1.057(hough di).65 F 1.057 +(vision by 0 is trapped and \215agged as an error)-.25 F(.)-.55 E .829 +(The operators and their precedence, associati)108 465.6 R(vity)-.25 E +3.329(,a)-.65 G .829(nd v)-3.329 F .829 +(alues are the same as in the C language.)-.25 F .828(The fol-)5.828 F +(lo)108 477.6 Q .439(wing list of operators is grouped into le)-.25 F +-.15(ve)-.25 G .439(ls of equal-precedence operators.).15 F .44(The le) +5.44 F -.15(ve)-.25 G .44(ls are listed in order).15 F +(of decreasing precedence.)108 489.6 Q F1(id)108 506.4 Q F2(++)A F1(id) +2.5 E F2A F0 -.25(va)144 518.4 S +(riable post-increment and post-decrement).25 E F2 2.5108 530.4 S +F0(unary minus and plus)144 530.4 Q F2(++)108 542.4 Q F1(id)A F2 +2.5 E F1(id)A F0 -.25(va)144 554.4 S +(riable pre-increment and pre-decrement).25 E F2 2.5(!~)108 566.4 S F0 +(logical and bitwise ne)144 566.4 Q -.05(ga)-.15 G(tion).05 E F2(**)108 +578.4 Q F0 -.15(ex)144 578.4 S(ponentiation).15 E F2 2.5(*/%)108 590.4 S +F0(multiplication, di)144 590.4 Q(vision, remainder)-.25 E F2 2.5<2bad> +108 602.4 S F0(addition, subtraction)144 602.4 Q F2(<< >>)108 614.4 Q F0 +(left and right bitwise shifts)144 614.4 Q F2(<= >= < >)108 626.4 Q F0 +(comparison)144 638.4 Q F2(== !=)108 650.4 Q F0(equality and inequality) +144 650.4 Q F2(&)108 662.4 Q F0(bitwise AND)144 662.4 Q F2(^)108 674.4 Q +F0(bitwise e)144 674.4 Q(xclusi)-.15 E .3 -.15(ve O)-.25 H(R).15 E F2(|) +108 686.4 Q F0(bitwise OR)144 686.4 Q F2(&&)108 698.4 Q F0(logical AND) +144 698.4 Q F2(||)108 710.4 Q F0(logical OR)144 710.4 Q(GNU Bash 5.1)72 +768 Q(2020 October 29)141.235 E(32)190.395 E 0 Cg EP +%%Page: 33 33 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10 +/Times-Italic@0 SF -.2(ex)108 84 S(pr).2 E/F2 10/Times-Bold@0 SF(?)A F1 +-.2(ex)C(pr).2 E F2(:)A F1 -.2(ex)C(pr).2 E F0(conditional operator)144 +96 Q F2 2.5(=*)108 108 S 2.5(=/)-2.5 G 2.5(=%)-2.5 G 2.5(=+)-2.5 G 2.5 +<3dad>-2.5 G 2.5(=<)-2.5 G(<= >>= &= ^= |=)-2.5 E F0(assignment)144 120 +Q F1 -.2(ex)108 132 S(pr1).2 E F2(,)2.5 E F1 -.2(ex)2.5 G(pr2).2 E F0 +(comma)144 144 Q .68(Shell v)108 160.8 R .68(ariables are allo)-.25 F +.68(wed as operands; parameter e)-.25 F .68 +(xpansion is performed before the e)-.15 F .68(xpression is e)-.15 F +-.25(va)-.25 G(lu-).25 E 3.507(ated. W)108 172.8 R 1.007(ithin an e)-.4 +F 1.007(xpression, shell v)-.15 F 1.007 +(ariables may also be referenced by name without using the parameter) +-.25 F -.15(ex)108 184.8 S .165(pansion syntax.).15 F 2.665(As)5.165 G +.165(hell v)-2.665 F .165(ariable that is null or unset e)-.25 F -.25 +(va)-.25 G .165(luates to 0 when referenced by name without us-).25 F +.42(ing the parameter e)108 196.8 R .42(xpansion syntax.)-.15 F .42 +(The v)5.42 F .421(alue of a v)-.25 F .421(ariable is e)-.25 F -.25(va) +-.25 G .421(luated as an arithmetic e).25 F .421(xpression when)-.15 F +.154(it is referenced, or when a v)108 208.8 R .154 +(ariable which has been gi)-.25 F -.15(ve)-.25 G 2.654(nt).15 G(he) +-2.654 E F1(inte)2.654 E -.1(ge)-.4 G(r).1 E F0(attrib)2.654 E .153 +(ute using)-.2 F F2(declar)2.653 E 2.653<65ad>-.18 G(i)-2.653 E F0 .153 +(is assigned a)2.653 F -.25(va)108 220.8 S 2.857(lue. A).25 F .357 +(null v)2.857 F .357(alue e)-.25 F -.25(va)-.25 G .357(luates to 0.).25 +F 2.857(As)5.357 G .357(hell v)-2.857 F .357(ariable need not ha)-.25 F +.657 -.15(ve i)-.2 H(ts).15 E F1(inte)2.857 E -.1(ge)-.4 G(r).1 E F0 +(attrib)2.857 E .357(ute turned on to be used)-.2 F(in an e)108 232.8 Q +(xpression.)-.15 E(Inte)108 249.6 Q .518(ger constants follo)-.15 F +3.018(wt)-.25 G .518(he C language de\214nition, without suf)-3.018 F +<8c78>-.25 E .517(es or character constants.)-.15 F .517(Constants with) +5.517 F 3.282(al)108 261.6 S .782 +(eading 0 are interpreted as octal numbers.)-3.282 F 3.283(Al)5.782 G +.783(eading 0x or 0X denotes he)-3.283 F 3.283(xadecimal. Otherwise,) +-.15 F(num-)3.283 E .816(bers tak)108 273.6 R 3.316(et)-.1 G .816 +(he form [)-3.316 F F1(base#)A F0 .815(]n, where the optional)B F1(base) +3.315 E F0 .815(is a decimal number between 2 and 64 representing)3.315 +F .349(the arithmetic base, and)108 285.6 R F1(n)2.849 E F0 .349 +(is a number in that base.)2.849 F(If)5.35 E F1(base#)2.85 E F0 .35 +(is omitted, then base 10 is used.)2.85 F .35(When speci-)5.35 F(fying) +108 297.6 Q F1(n)2.975 E F0 2.975(,i)C 2.975(fan)-2.975 G .474(on-digit\ + is required, the digits greater than 9 are represented by the lo)-2.975 +F .474(wercase letters, the up-)-.25 F .518 +(percase letters, @, and _, in that order)108 309.6 R 5.518(.I)-.55 G(f) +-5.518 E F1(base)3.018 E F0 .518(is less than or equal to 36, lo)3.018 F +.518(wercase and uppercase letters)-.25 F +(may be used interchangeably to represent numbers between 10 and 35.)108 +321.6 Q .235(Operators are e)108 338.4 R -.25(va)-.25 G .235 +(luated in order of precedence.).25 F(Sub-e)5.234 E .234 +(xpressions in parentheses are e)-.15 F -.25(va)-.25 G .234 +(luated \214rst and may).25 F -.15(ove)108 350.4 S +(rride the precedence rules abo).15 E -.15(ve)-.15 G(.).15 E/F3 10.95 +/Times-Bold@0 SF(CONDITION)72 367.2 Q(AL EXPRESSIONS)-.219 E F0 .255 +(Conditional e)108 379.2 R .255(xpressions are used by the)-.15 F F2([[) +2.755 E F0 .255(compound command and the)2.755 F F2(test)2.755 E F0(and) +2.755 E F2([)2.756 E F0 -.2(bu)2.756 G .256(iltin commands to test).2 F +.134(\214le attrib)108 391.2 R .134 +(utes and perform string and arithmetic comparisons.)-.2 F(The)5.133 E +F2(test)2.633 E F0(and)2.633 E F2([)2.633 E F0 .133 +(commands determine their be-)2.633 F(ha)108 403.2 Q .197 +(vior based on the number of ar)-.2 F .198 +(guments; see the descriptions of those commands for an)-.18 F 2.698(yo) +-.15 G .198(ther command-)-2.698 F(speci\214c actions.)108 415.2 Q .235 +(Expressions are formed from the follo)108 432 R .234 +(wing unary or binary primaries.)-.25 F F2(Bash)5.234 E F0 .234 +(handles se)2.734 F -.15(ve)-.25 G .234(ral \214lenames spe-).15 F .424 +(cially when the)108 444 R 2.924(ya)-.15 G .424(re used in e)-2.924 F +2.925(xpressions. If)-.15 F .425(the operating system on which)2.925 F +F2(bash)2.925 E F0 .425(is running pro)2.925 F .425(vides these)-.15 F +.345(special \214les, bash will use them; otherwise it will emulate the\ +m internally with this beha)108 456 R .344(vior: If an)-.2 F(y)-.15 E F1 +(\214le)2.844 E F0(ar)2.844 E(-)-.2 E .805 +(gument to one of the primaries is of the form)108 468 R F1(/de)3.305 E +(v/fd/n)-.15 E F0 3.306(,t)C .806(hen \214le descriptor)-3.306 F F1(n) +3.306 E F0 .806(is check)3.306 F 3.306(ed. If)-.1 F(the)3.306 E F1 +(\214le)3.306 E F0(ar)3.306 E(gu-)-.18 E .03 +(ment to one of the primaries is one of)108 480 R F1(/de)2.53 E(v/stdin) +-.15 E F0(,)A F1(/de)2.529 E(v/stdout)-.15 E F0 2.529(,o)C(r)-2.529 E F1 +(/de)2.529 E(v/stderr)-.15 E F0 2.529<2c8c>C .029 +(le descriptor 0, 1, or 2, respec-)-2.529 F(ti)108 492 Q -.15(ve)-.25 G +(ly).15 E 2.5(,i)-.65 G 2.5(sc)-2.5 G(heck)-2.5 E(ed.)-.1 E .721 +(Unless otherwise speci\214ed, primaries that operate on \214les follo) +108 508.8 R 3.221(ws)-.25 G .722(ymbolic links and operate on the tar) +-3.221 F(get)-.18 E(of the link, rather than the link itself.)108 520.8 +Q 1.096(When used with)108 538.8 R F2([[)3.596 E F0 3.596(,t)C(he)-3.596 +E F2(<)3.596 E F0(and)3.595 E F2(>)3.595 E F0 1.095(operators sort le) +3.595 F 1.095(xicographically using the current locale.)-.15 F(The)6.095 +E F2(test)3.595 E F0(com-)3.595 E(mand sorts using ASCII ordering.)108 +550.8 Q F2108 574.8 Q F1(\214le)2.5 E F0 -.35(Tr)144 574.8 S +(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G(ists.).15 E F2108 +586.8 Q F1(\214le)2.5 E F0 -.35(Tr)144 586.8 S(ue if).35 E F1(\214le)2.5 +E F0 -.15(ex)2.5 G(ists and is a block special \214le.).15 E F2108 +598.8 Q F1(\214le)2.5 E F0 -.35(Tr)144 598.8 S(ue if).35 E F1(\214le)2.5 +E F0 -.15(ex)2.5 G(ists and is a character special \214le.).15 E F2 +108 610.8 Q F1(\214le)2.5 E F0 -.35(Tr)144 610.8 S(ue if).35 E F1 +(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a directory).15 E(.)-.65 E F2 +108 622.8 Q F1(\214le)2.5 E F0 -.35(Tr)144 622.8 S(ue if).35 E F1 +(\214le)2.5 E F0 -.15(ex)2.5 G(ists.).15 E F2108 634.8 Q F1 +(\214le)2.5 E F0 -.35(Tr)144 634.8 S(ue if).35 E F1(\214le)2.5 E F0 -.15 +(ex)2.5 G(ists and is a re).15 E(gular \214le.)-.15 E F2108 646.8 +Q F1(\214le)2.5 E F0 -.35(Tr)144 646.8 S(ue if).35 E F1(\214le)2.5 E F0 +-.15(ex)2.5 G(ists and is set-group-id.).15 E F2108 658.8 Q F1 +(\214le)2.5 E F0 -.35(Tr)144 658.8 S(ue if).35 E F1(\214le)2.5 E F0 -.15 +(ex)2.5 G(ists and is a symbolic link.).15 E F2108 670.8 Q F1 +(\214le)2.5 E F0 -.35(Tr)144 670.8 S(ue if).35 E F1(\214le)2.5 E F0 -.15 +(ex)2.5 G(ists and its `).15 E(`stick)-.74 E(y')-.15 E 2.5('b)-.74 G +(it is set.)-2.5 E F2108 682.8 Q F1(\214le)2.5 E F0 -.35(Tr)144 +682.8 S(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G +(ists and is a named pipe \(FIFO\).).15 E F2108 694.8 Q F1(\214le) +2.5 E F0 -.35(Tr)144 694.8 S(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 +G(ists and is readable.).15 E F2108 706.8 Q F1(\214le)2.5 E F0 +-.35(Tr)144 706.8 S(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G +(ists and has a size greater than zero.).15 E F2108 718.8 Q F1(fd) +2.5 E F0 -.35(Tr)144 718.8 S(ue if \214le descriptor).35 E F1(fd)4.47 E +F0(is open and refers to a terminal.)3.27 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(33)190.395 E 0 Cg EP +%%Page: 34 34 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF108 84 Q/F2 10/Times-Italic@0 SF(\214le)2.5 E F0 -.35(Tr)144 84 +S(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and its set-user).15 +E(-id bit is set.)-.2 E F1108 96 Q F2(\214le)2.5 E F0 -.35(Tr)144 +96 S(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is writable.) +.15 E F1108 108 Q F2(\214le)2.5 E F0 -.35(Tr)144 108 S(ue if).35 E +F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is e).15 E -.15(xe)-.15 G +(cutable.).15 E F1108 120 Q F2(\214le)2.5 E F0 -.35(Tr)144 120 S +(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is o).15 E +(wned by the ef)-.25 E(fecti)-.25 E .3 -.15(ve g)-.25 H(roup id.).15 E +F1108 132 Q F2(\214le)2.5 E F0 -.35(Tr)144 132 S(ue if).35 E F2 +(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a symbolic link.).15 E F1 +108 144 Q F2(\214le)2.5 E F0 -.35(Tr)144 144 S(ue if).35 E F2 +(\214le)2.5 E F0 -.15(ex)2.5 G(ists and has been modi\214ed since it w) +.15 E(as last read.)-.1 E F1108 156 Q F2(\214le)2.5 E F0 -.35(Tr) +144 156 S(ue if).35 E F2(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is o).15 +E(wned by the ef)-.25 E(fecti)-.25 E .3 -.15(ve u)-.25 H(ser id.).15 E +F1108 168 Q F2(\214le)2.5 E F0 -.35(Tr)144 168 S(ue if).35 E F2 +(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a sock).15 E(et.)-.1 E F2 +(\214le1)108 180 Q F1(\255ef)2.5 E F2(\214le2)2.5 E F0 -.35(Tr)144 192 S +(ue if).35 E F2(\214le1)2.5 E F0(and)2.5 E F2(\214le2)2.5 E F0 +(refer to the same de)2.5 E(vice and inode numbers.)-.25 E F2(\214le1) +108 204 Q F02.5 E F1(nt)A F2(\214le2)2.5 E F0 -.35(Tr)144 216 S +(ue if).35 E F2(\214le1)2.5 E F0(is ne)2.5 E +(wer \(according to modi\214cation date\) than)-.25 E F2(\214le2)2.5 E +F0 2.5(,o)C 2.5(ri)-2.5 G(f)-2.5 E F2(\214le1)2.5 E F0 -.15(ex)2.5 G +(ists and).15 E F2(\214le2)2.5 E F0(does not.)2.5 E F2(\214le1)108 228 Q +F02.5 E F1(ot)A F2(\214le2)2.5 E F0 -.35(Tr)144 240 S(ue if).35 E F2 +(\214le1)2.5 E F0(is older than)2.5 E F2(\214le2)2.5 E F0 2.5(,o)C 2.5 +(ri)-2.5 G(f)-2.5 E F2(\214le2)2.5 E F0 -.15(ex)2.5 G(ists and).15 E F2 +(\214le1)2.5 E F0(does not.)2.5 E F1108 252 Q F2(optname)2.5 E F0 +-.35(Tr)144 264 S .262(ue if the shell option).35 F F2(optname)2.992 E +F0 .262(is enabled.)2.942 F .262 +(See the list of options under the description of the)5.262 F F1 +2.763 E F0(option to the)144 276 Q F1(set)2.5 E F0 -.2(bu)2.5 G +(iltin belo).2 E -.65(w.)-.25 G F1108 288 Q F2(varname)2.5 E F0 +-.35(Tr)144 300 S(ue if the shell v).35 E(ariable)-.25 E F2(varname)2.79 +E F0(is set \(has been assigned a v)2.68 E(alue\).)-.25 E F1108 +312 Q F2(varname)2.5 E F0 -.35(Tr)144 324 S(ue if the shell v).35 E +(ariable)-.25 E F2(varname)2.79 E F0(is set and is a name reference.) +2.68 E F1108 336 Q F2(string)2.5 E F0 -.35(Tr)144 348 S +(ue if the length of).35 E F2(string)2.5 E F0(is zero.)2.5 E F2(string) +108 360 Q F1108 372 Q F2(string)2.5 E F0 -.35(Tr)144 384 S +(ue if the length of).35 E F2(string)2.84 E F0(is non-zero.)2.72 E F2 +(string1)108 400.8 Q F1(==)2.5 E F2(string2)2.5 E(string1)108 412.8 Q F1 +(=)2.5 E F2(string2)2.5 E F0 -.35(Tr)144 424.8 S .862 +(ue if the strings are equal.).35 F F1(=)5.861 E F0 .861 +(should be used with the)3.361 F F1(test)3.361 E F0 .861 +(command for POSIX conformance.)3.361 F .446(When used with the)144 +436.8 R F1([[)2.946 E F0 .446 +(command, this performs pattern matching as described abo)2.946 F .747 +-.15(ve \()-.15 H F1(Compound).15 E(Commands)144 448.8 Q F0(\).)A F2 +(string1)108 465.6 Q F1(!=)2.5 E F2(string2)2.5 E F0 -.35(Tr)144 477.6 S +(ue if the strings are not equal.).35 E F2(string1)108 494.4 Q F1(<)2.5 +E F2(string2)2.5 E F0 -.35(Tr)144 506.4 S(ue if).35 E F2(string1)2.5 E +F0(sorts before)2.5 E F2(string2)2.5 E F0(le)2.5 E(xicographically)-.15 +E(.)-.65 E F2(string1)108 523.2 Q F1(>)2.5 E F2(string2)2.5 E F0 -.35 +(Tr)144 535.2 S(ue if).35 E F2(string1)2.5 E F0(sorts after)2.5 E F2 +(string2)2.5 E F0(le)2.5 E(xicographically)-.15 E(.)-.65 E F2(ar)108.33 +552 Q(g1)-.37 E F1(OP)2.5 E F2(ar)2.5 E(g2)-.37 E/F3 9/Times-Bold@0 SF +(OP)144 564 Q F0 .385(is one of)2.635 F F1(\255eq)2.885 E F0(,)A F1 +(\255ne)2.885 E F0(,)A F1(\255lt)2.885 E F0(,)A F1(\255le)2.885 E F0(,)A +F1(\255gt)2.885 E F0 2.885(,o)C(r)-2.885 E F1(\255ge)2.885 E F0 5.385 +(.T)C .385(hese arithmetic binary operators return true if)-5.385 F F2 +(ar)2.884 E(g1)-.37 E F0 .845(is equal to, not equal to, less than, les\ +s than or equal to, greater than, or greater than or equal to)144 576 R +F2(ar)144 588 Q(g2)-.37 E F0 3.59(,r)C(especti)-3.59 E -.15(ve)-.25 G +(ly).15 E(.)-.65 E F2(Ar)7.1 E(g1)-.37 E F0(and)3.59 E F2(ar)3.92 E(g2) +-.37 E F0 1.089(may be positi)3.61 F 1.389 -.15(ve o)-.25 H 3.589(rn).15 +G -2.25 -.15(eg a)-3.589 H(ti).15 E 1.389 -.15(ve i)-.25 H(nte).15 E +3.589(gers. When)-.15 F 1.089(used with the)3.589 F F1([[)3.589 E F0 +(command,)144 600 Q F2(Ar)4.447 E(g1)-.37 E F0(and)3.437 E F2(Ar)4.447 E +(g2)-.37 E F0 .937(are e)3.457 F -.25(va)-.25 G .937 +(luated as arithmetic e).25 F .937(xpressions \(see)-.15 F F3 .937 +(ARITHMETIC EV)3.437 F(ALU)-1.215 E(A-)-.54 E(TION)144 612 Q F0(abo)2.25 +E -.15(ve)-.15 G(\).).15 E/F4 10.95/Times-Bold@0 SF(SIMPLE COMMAND EXP) +72 628.8 Q(ANSION)-.81 E F0 .614(When a simple command is e)108 640.8 R +-.15(xe)-.15 G .614(cuted, the shell performs the follo).15 F .613 +(wing e)-.25 F .613(xpansions, assignments, and redi-)-.15 F +(rections, from left to right, in the follo)108 652.8 Q(wing order)-.25 +E(.)-.55 E(1.)108 669.6 Q 1.848(The w)144 669.6 R 1.848 +(ords that the parser has mark)-.1 F 1.848(ed as v)-.1 F 1.849 +(ariable assignments \(those preceding the command)-.25 F +(name\) and redirections are sa)144 681.6 Q -.15(ve)-.2 G 2.5(df).15 G +(or later processing.)-2.5 E(2.)108 698.4 Q .18(The w)144 698.4 R .18 +(ords that are not v)-.1 F .179 +(ariable assignments or redirections are e)-.25 F 2.679(xpanded. If)-.15 +F(an)2.679 E 2.679(yw)-.15 G .179(ords remain af-)-2.779 F .346(ter e) +144 710.4 R .346(xpansion, the \214rst w)-.15 F .346(ord is tak)-.1 F +.347(en to be the name of the command and the remaining w)-.1 F .347 +(ords are)-.1 F(the ar)144 722.4 Q(guments.)-.18 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(34)190.395 E 0 Cg EP +%%Page: 35 35 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(3.)108 84 Q +(Redirections are performed as described abo)144 84 Q .3 -.15(ve u)-.15 +H(nder).15 E/F1 9/Times-Bold@0 SF(REDIRECTION)2.5 E/F2 9/Times-Roman@0 +SF(.)A F0(4.)108 100.8 Q .717(The te)144 100.8 R .717(xt after the)-.15 +F/F3 10/Times-Bold@0 SF(=)3.217 E F0 .717(in each v)3.217 F .717 +(ariable assignment under)-.25 F .717(goes tilde e)-.18 F .717 +(xpansion, parameter e)-.15 F(xpansion,)-.15 E .339 +(command substitution, arithmetic e)144 112.8 R .339 +(xpansion, and quote remo)-.15 F -.25(va)-.15 G 2.839(lb).25 G .339 +(efore being assigned to the v)-2.839 F(ari-)-.25 E(able.)144 124.8 Q +.332(If no command name results, the v)108 141.6 R .332 +(ariable assignments af)-.25 F .332(fect the current shell en)-.25 F +2.832(vironment. Otherwise,)-.4 F(the)2.832 E -.25(va)108 153.6 S .757 +(riables are added to the en).25 F .757(vironment of the e)-.4 F -.15 +(xe)-.15 G .757(cuted command and do not af).15 F .757 +(fect the current shell en)-.25 F(vi-)-.4 E 3.177(ronment. If)108 165.6 +R(an)3.177 E 3.177(yo)-.15 G 3.177(ft)-3.177 G .677 +(he assignments attempts to assign a v)-3.177 F .677 +(alue to a readonly v)-.25 F .676(ariable, an error occurs, and)-.25 F +(the command e)108 177.6 Q(xits with a non-zero status.)-.15 E .149 +(If no command name results, redirections are performed, b)108 194.4 R +.149(ut do not af)-.2 F .15(fect the current shell en)-.25 F 2.65 +(vironment. A)-.4 F(redirection error causes the command to e)108 206.4 +Q(xit with a non-zero status.)-.15 E 1.064 +(If there is a command name left after e)108 223.2 R 1.064(xpansion, e) +-.15 F -.15(xe)-.15 G 1.064(cution proceeds as described belo).15 F +4.864 -.65(w. O)-.25 H 1.064(therwise, the).65 F .068(command e)108 +235.2 R 2.568(xits. If)-.15 F .069(one of the e)2.568 F .069 +(xpansions contained a command substitution, the e)-.15 F .069 +(xit status of the command)-.15 F .467(is the e)108 247.2 R .466 +(xit status of the last command substitution performed.)-.15 F .466 +(If there were no command substitutions, the)5.466 F(command e)108 259.2 +Q(xits with a status of zero.)-.15 E/F4 10.95/Times-Bold@0 SF +(COMMAND EXECUTION)72 276 Q F0 .546 +(After a command has been split into w)108 288 R .547 +(ords, if it results in a simple command and an optional list of ar)-.1 +F(gu-)-.18 E(ments, the follo)108 300 Q(wing actions are tak)-.25 E(en.) +-.1 E .379(If the command name contains no slashes, the shell attempts \ +to locate it.)108 316.8 R .379(If there e)5.379 F .379 +(xists a shell function by)-.15 F .246(that name, that function is in) +108 328.8 R -.2(vo)-.4 G -.1(ke).2 G 2.746(da).1 G 2.746(sd)-2.746 G +.246(escribed abo)-2.746 F .546 -.15(ve i)-.15 H(n).15 E F1(FUNCTIONS) +2.746 E F2(.)A F0 .246(If the name does not match a func-)4.746 F +(tion, the shell searches for it in the list of shell b)108 340.8 Q 2.5 +(uiltins. If)-.2 F 2.5(am)2.5 G(atch is found, that b)-2.5 E +(uiltin is in)-.2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E .31 +(If the name is neither a shell function nor a b)108 357.6 R .309 +(uiltin, and contains no slashes,)-.2 F F3(bash)2.809 E F0 .309 +(searches each element of)2.809 F(the)108 369.6 Q F1 -.666(PA)3.162 G +(TH)-.189 E F0 .662(for a directory containing an e)2.912 F -.15(xe)-.15 +G .662(cutable \214le by that name.).15 F F3(Bash)5.662 E F0 .663 +(uses a hash table to remember)3.162 F 1.915(the full pathnames of e)108 +381.6 R -.15(xe)-.15 G 1.915(cutable \214les \(see).15 F F3(hash)4.415 E +F0(under)4.415 E F1 1.915(SHELL B)4.415 F(UIL)-.09 E 1.914(TIN COMMANDS) +-.828 F F0(belo)4.164 E 4.414(w\). A)-.25 F(full)4.414 E .719 +(search of the directories in)108 393.6 R F1 -.666(PA)3.219 G(TH)-.189 E +F0 .72(is performed only if the command is not found in the hash table.) +2.969 F .72(If the)5.72 F .956(search is unsuccessful, the shell search\ +es for a de\214ned shell function named)108 405.6 R F3(command_not_f) +3.455 E(ound_han-)-.25 E(dle)108 417.6 Q F0 6.005(.I)C 3.505(ft)-6.005 G +1.005(hat function e)-3.505 F 1.005(xists, it is in)-.15 F -.2(vo)-.4 G +-.1(ke).2 G 3.506(di).1 G 3.506(nas)-3.506 G 1.006(eparate e)-3.506 F +-.15(xe)-.15 G 1.006(cution en).15 F 1.006 +(vironment with the original command)-.4 F .256 +(and the original command')108 429.6 R 2.756(sa)-.55 G -.18(rg)-2.756 G +.256(uments as its ar).18 F .256(guments, and the function')-.18 F 2.755 +(se)-.55 G .255(xit status becomes the e)-2.905 F .255(xit sta-)-.15 F +.263(tus of that subshell.)108 441.6 R .263(If that function is not de\ +\214ned, the shell prints an error message and returns an e)5.263 F .263 +(xit sta-)-.15 F(tus of 127.)108 453.6 Q 1.089(If the search is success\ +ful, or if the command name contains one or more slashes, the shell e) +108 470.4 R -.15(xe)-.15 G 1.089(cutes the).15 F .197 +(named program in a separate e)108 482.4 R -.15(xe)-.15 G .197 +(cution en).15 F 2.698(vironment. Ar)-.4 F .198 +(gument 0 is set to the name gi)-.18 F -.15(ve)-.25 G .198 +(n, and the remain-).15 F(ing ar)108 494.4 Q +(guments to the command are set to the ar)-.18 E(guments gi)-.18 E -.15 +(ve)-.25 G(n, if an).15 E -.65(y.)-.15 G 1.049(If this e)108 511.2 R +-.15(xe)-.15 G 1.049(cution f).15 F 1.049 +(ails because the \214le is not in e)-.1 F -.15(xe)-.15 G 1.048 +(cutable format, and the \214le is not a directory).15 F 3.548(,i)-.65 G +3.548(ti)-3.548 G 3.548(sa)-3.548 G(s-)-3.548 E .042(sumed to be a)108 +523.2 R/F5 10/Times-Italic@0 SF .042(shell script)2.542 F F0 2.542 +(,a\214)C .043(le containing shell commands.)-2.542 F 2.543(As)5.043 G +.043(ubshell is spa)-2.543 F .043(wned to e)-.15 F -.15(xe)-.15 G .043 +(cute it.).15 F .043(This sub-)5.043 F .275 +(shell reinitializes itself, so that the ef)108 535.2 R .274 +(fect is as if a ne)-.25 F 2.774(ws)-.25 G .274(hell had been in)-2.774 +F -.2(vo)-.4 G -.1(ke).2 G 2.774(dt).1 G 2.774(oh)-2.774 G .274 +(andle the script, with the)-2.774 F -.15(ex)108 547.2 S 2.357 +(ception that the locations of commands remembered by the parent \(see) +.15 F F3(hash)4.858 E F0(belo)4.858 E 4.858(wu)-.25 G(nder)-4.858 E F1 +(SHELL)4.858 E -.09(BU)108 559.2 S(IL).09 E(TIN COMMANDS)-.828 E F2(\))A +F0(are retained by the child.)2.25 E .348(If the program is a \214le be) +108 576 R .348(ginning with)-.15 F F3(#!)2.848 E F0 2.848(,t)C .347(he \ +remainder of the \214rst line speci\214es an interpreter for the pro-) +-2.848 F 3.178(gram. The)108 588 R .678(shell e)3.178 F -.15(xe)-.15 G +.678(cutes the speci\214ed interpreter on operating systems that do not\ + handle this e).15 F -.15(xe)-.15 G(cutable).15 E .206(format themselv) +108 600 R 2.706(es. The)-.15 F(ar)2.706 E .206 +(guments to the interpreter consist of a single optional ar)-.18 F .206 +(gument follo)-.18 F .206(wing the in-)-.25 F .267 +(terpreter name on the \214rst line of the program, follo)108 612 R .268 +(wed by the name of the program, follo)-.25 F .268(wed by the com-)-.25 +F(mand ar)108 624 Q(guments, if an)-.18 E -.65(y.)-.15 G F4 +(COMMAND EXECUTION ENVIR)72 640.8 Q(ONMENT)-.329 E F0(The shell has an) +108 652.8 Q F5 -.2(ex)2.5 G(ecution en).2 E(vir)-.4 E(onment)-.45 E F0 +2.5(,w)C(hich consists of the follo)-2.5 E(wing:)-.25 E<83>108 669.6 Q +1.406(open \214les inherited by the shell at in)144 669.6 R -.2(vo)-.4 G +1.405(cation, as modi\214ed by redirections supplied to the).2 F F3 +(exec)3.905 E F0 -.2(bu)144 681.6 S(iltin).2 E<83>108 698.4 Q +(the current w)144 698.4 Q(orking directory as set by)-.1 E F3(cd)2.5 E +F0(,)A F3(pushd)2.5 E F0 2.5(,o)C(r)-2.5 E F3(popd)2.5 E F0 2.5(,o)C 2.5 +(ri)-2.5 G(nherited by the shell at in)-2.5 E -.2(vo)-.4 G(cation).2 E +<83>108 715.2 Q(the \214le creation mode mask as set by)144 715.2 Q F3 +(umask)2.5 E F0(or inherited from the shell')2.5 E 2.5(sp)-.55 G(arent) +-2.5 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(35)190.395 E 0 Cg +EP +%%Page: 36 36 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E<83>108 84 Q +(current traps set by)144 84 Q/F1 10/Times-Bold@0 SF(trap)2.5 E F0<83> +108 100.8 Q .256(shell parameters that are set by v)144 100.8 R .256 +(ariable assignment or with)-.25 F F1(set)2.756 E F0 .257 +(or inherited from the shell')2.756 F 2.757(sp)-.55 G(arent)-2.757 E +(in the en)144 112.8 Q(vironment)-.4 E<83>108 129.6 Q +(shell functions de\214ned during e)144 129.6 Q -.15(xe)-.15 G +(cution or inherited from the shell').15 E 2.5(sp)-.55 G +(arent in the en)-2.5 E(vironment)-.4 E<83>108 146.4 Q +(options enabled at in)144 146.4 Q -.2(vo)-.4 G(cation \(either by def) +.2 E(ault or with command-line ar)-.1 E(guments\) or by)-.18 E F1(set) +2.5 E F0<83>108 163.2 Q(options enabled by)144 163.2 Q F1(shopt)2.5 E F0 +<83>108 180 Q(shell aliases de\214ned with)144 180 Q F1(alias)2.5 E F0 +<83>108 196.8 Q -.25(va)144 196.8 S +(rious process IDs, including those of background jobs, the v).25 E +(alue of)-.25 E F1($$)2.5 E F0 2.5(,a)C(nd the v)-2.5 E(alue of)-.25 E +/F2 9/Times-Bold@0 SF(PPID)2.5 E F0 .427 +(When a simple command other than a b)108 213.6 R .426 +(uiltin or shell function is to be e)-.2 F -.15(xe)-.15 G .426 +(cuted, it is in).15 F -.2(vo)-.4 G -.1(ke).2 G 2.926(di).1 G 2.926(nas) +-2.926 G(eparate)-2.926 E -.15(exe)108 225.6 S .133(cution en).15 F .133 +(vironment that consists of the follo)-.4 F 2.634(wing. Unless)-.25 F +.134(otherwise noted, the v)2.634 F .134(alues are inherited from)-.25 F +(the shell.)108 237.6 Q<83>108 254.4 Q 1.056(the shell')144 254.4 R +3.556(so)-.55 G 1.056(pen \214les, plus an)-3.556 F 3.556(ym)-.15 G +1.056 +(odi\214cations and additions speci\214ed by redirections to the com-) +-3.556 F(mand)144 266.4 Q<83>108 283.2 Q(the current w)144 283.2 Q +(orking directory)-.1 E<83>108 300 Q(the \214le creation mode mask)144 +300 Q<83>108 316.8 Q .856(shell v)144 316.8 R .857 +(ariables and functions mark)-.25 F .857(ed for e)-.1 F .857 +(xport, along with v)-.15 F .857(ariables e)-.25 F .857 +(xported for the command,)-.15 F(passed in the en)144 328.8 Q(vironment) +-.4 E<83>108 345.6 Q .307(traps caught by the shell are reset to the v) +144 345.6 R .306(alues inherited from the shell')-.25 F 2.806(sp)-.55 G +.306(arent, and traps ignored)-2.806 F(by the shell are ignored)144 +357.6 Q 2.5(Ac)108 374.4 S(ommand in)-2.5 E -.2(vo)-.4 G -.1(ke).2 G 2.5 +(di).1 G 2.5(nt)-2.5 G(his separate en)-2.5 E(vironment cannot af)-.4 E +(fect the shell')-.25 E 2.5(se)-.55 G -.15(xe)-2.65 G(cution en).15 E +(vironment.)-.4 E .577(Command substitution, commands grouped with pare\ +ntheses, and asynchronous commands are in)108 391.2 R -.2(vo)-.4 G -.1 +(ke).2 G 3.078(di).1 G(n)-3.078 E 2.745(as)108 403.2 S .245(ubshell en) +-2.745 F .245(vironment that is a duplicate of the shell en)-.4 F .244 +(vironment, e)-.4 F .244(xcept that traps caught by the shell are)-.15 F +.358(reset to the v)108 415.2 R .358 +(alues that the shell inherited from its parent at in)-.25 F -.2(vo)-.4 +G 2.858(cation. Builtin).2 F .359(commands that are in)2.859 F -.2(vo) +-.4 G -.1(ke).2 G(d).1 E .857(as part of a pipeline are also e)108 427.2 +R -.15(xe)-.15 G .856(cuted in a subshell en).15 F 3.356 +(vironment. Changes)-.4 F .856(made to the subshell en)3.356 F(viron-) +-.4 E(ment cannot af)108 439.2 Q(fect the shell')-.25 E 2.5(se)-.55 G +-.15(xe)-2.65 G(cution en).15 E(vironment.)-.4 E 1.376(Subshells spa)108 +456 R 1.376(wned to e)-.15 F -.15(xe)-.15 G 1.377 +(cute command substitutions inherit the v).15 F 1.377(alue of the)-.25 F +F13.877 E F0 1.377(option from the parent)3.877 F 2.5(shell. When) +108 468 R(not in)2.5 E/F3 10/Times-Italic@0 SF(posix mode)2.5 E F0(,)A +F1(bash)2.5 E F0(clears the)2.5 E F12.5 E F0 +(option in such subshells.)2.5 E .405(If a command is follo)108 484.8 R +.405(wed by a)-.25 F F1(&)2.905 E F0 .404(and job control is not acti) +2.905 F -.15(ve)-.25 G 2.904(,t).15 G .404(he def)-2.904 F .404 +(ault standard input for the command)-.1 F .197(is the empty \214le)108 +496.8 R F3(/de)2.697 E(v/null)-.15 E F0 5.197(.O)C .197 +(therwise, the in)-5.197 F -.2(vo)-.4 G -.1(ke).2 G 2.697(dc).1 G .198 +(ommand inherits the \214le descriptors of the calling shell)-2.697 F +(as modi\214ed by redirections.)108 508.8 Q/F4 10.95/Times-Bold@0 SF +(ENVIR)72 525.6 Q(ONMENT)-.329 E F0 2.344(When a program is in)108 537.6 +R -.2(vo)-.4 G -.1(ke).2 G 4.843(di).1 G 4.843(ti)-4.843 G 4.843(sg) +-4.843 G -2.15 -.25(iv e)-4.843 H 4.843(na).25 G 4.843(na)-4.843 G 2.343 +(rray of strings called the)-4.843 F F3(en)5.033 E(vir)-.4 E(onment)-.45 +E F0 7.343(.T).68 G 2.343(his is a list of)-7.343 F F3(name)108 549.6 Q +F0A F3(value)A F0(pairs, of the form)2.5 E F3(name)2.86 E F0(=)A F3 +(value)A F0(.).18 E .438(The shell pro)108 566.4 R .438(vides se)-.15 F +-.15(ve)-.25 G .438(ral w).15 F .438(ays to manipulate the en)-.1 F +2.938(vironment. On)-.4 F(in)2.938 E -.2(vo)-.4 G .438 +(cation, the shell scans its o).2 F .439(wn en-)-.25 F .709(vironment a\ +nd creates a parameter for each name found, automatically marking it fo\ +r)108 578.4 R F3 -.2(ex)3.208 G(port).2 E F0 .708(to child pro-)3.888 F +2.703(cesses. Ex)108 590.4 R .203(ecuted commands inherit the en)-.15 F +2.703(vironment. The)-.4 F F1(export)2.703 E F0(and)2.703 E F1(declar) +2.703 E 2.703<65ad>-.18 G(x)-2.703 E F0 .203(commands allo)2.703 F 2.704 +(wp)-.25 G(aram-)-2.704 E .332 +(eters and functions to be added to and deleted from the en)108 602.4 R +2.832(vironment. If)-.4 F .332(the v)2.832 F .332 +(alue of a parameter in the en-)-.25 F .131 +(vironment is modi\214ed, the ne)108 614.4 R 2.631(wv)-.25 G .131 +(alue becomes part of the en)-2.881 F .132 +(vironment, replacing the old.)-.4 F .132(The en)5.132 F(vironment)-.4 E +.321(inherited by an)108 626.4 R 2.821(ye)-.15 G -.15(xe)-2.971 G .321 +(cuted command consists of the shell').15 F 2.821(si)-.55 G .321 +(nitial en)-2.821 F .32(vironment, whose v)-.4 F .32(alues may be modi-) +-.25 F .533(\214ed in the shell, less an)108 638.4 R 3.033(yp)-.15 G +.534(airs remo)-3.033 F -.15(ve)-.15 G 3.034(db).15 G 3.034(yt)-3.034 G +(he)-3.034 E F1(unset)3.034 E F0 .534(command, plus an)3.034 F 3.034(ya) +-.15 G .534(dditions via the)-3.034 F F1(export)3.034 E F0(and)3.034 E +F1(de-)3.034 E(clar)108 650.4 Q 2.5<65ad>-.18 G(x)-2.5 E F0(commands.) +2.5 E .563(The en)108 667.2 R .563(vironment for an)-.4 F(y)-.15 E F3 +.563(simple command)3.403 F F0 .562 +(or function may be augmented temporarily by pre\214xing it with)3.833 F +.202(parameter assignments, as described abo)108 679.2 R .502 -.15(ve i) +-.15 H(n).15 E F2 -.666(PA)2.702 G(RAMETERS).666 E/F5 9/Times-Roman@0 SF +(.)A F0 .202(These assignment statements af)4.702 F .203(fect only the) +-.25 F(en)108 691.2 Q(vironment seen by that command.)-.4 E .81(If the) +108 708 R F13.31 E F0 .81(option is set \(see the)3.31 F F1(set) +3.31 E F0 -.2(bu)3.31 G .81(iltin command belo).2 F .81(w\), then)-.25 F +F3(all)3.64 E F0 .81(parameter assignments are placed in)3.82 F(the en) +108 720 Q +(vironment for a command, not just those that precede the command name.) +-.4 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(36)190.395 E 0 Cg +EP +%%Page: 37 37 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(When)108 84 Q/F1 +10/Times-Bold@0 SF(bash)3.585 E F0(in)3.585 E -.2(vo)-.4 G -.1(ke).2 G +3.585(sa).1 G 3.585(ne)-3.585 G 1.085(xternal command, the v)-3.735 F +(ariable)-.25 E F1(_)3.585 E F0 1.086 +(is set to the full \214lename of the command and)3.586 F +(passed to that command in its en)108 96 Q(vironment.)-.4 E/F2 10.95 +/Times-Bold@0 SF(EXIT ST)72 112.8 Q -1.04(AT)-.986 G(US)1.04 E F0 .151 +(The e)108 124.8 R .151(xit status of an e)-.15 F -.15(xe)-.15 G .151 +(cuted command is the v).15 F .15(alue returned by the)-.25 F/F3 10 +/Times-Italic@0 SF(waitpid)2.65 E F0 .15(system call or equi)2.65 F -.25 +(va)-.25 G .15(lent func-).25 F 2.847(tion. Exit)108 136.8 R .347 +(statuses f)2.847 F .347(all between 0 and 255, though, as e)-.1 F .347 +(xplained belo)-.15 F 1.647 -.65(w, t)-.25 H .347(he shell may use v).65 +F .348(alues abo)-.25 F .648 -.15(ve 1)-.15 H(25).15 E(specially)108 +148.8 Q 5.507(.E)-.65 G .507(xit statuses from shell b)-5.507 F .507 +(uiltins and compound commands are also limited to this range.)-.2 F +(Under)5.506 E(certain circumstances, the shell will use special v)108 +160.8 Q(alues to indicate speci\214c f)-.25 E(ailure modes.)-.1 E -.15 +(Fo)108 177.6 S 3.372(rt).15 G .872(he shell')-3.372 F 3.372(sp)-.55 G +.873(urposes, a command which e)-3.372 F .873(xits with a zero e)-.15 F +.873(xit status has succeeded.)-.15 F .873(An e)5.873 F .873 +(xit status of)-.15 F .049(zero indicates success.)108 189.6 R 2.549(An) +5.049 G .049(on-zero e)-2.549 F .049(xit status indicates f)-.15 F 2.549 +(ailure. When)-.1 F 2.549(ac)2.549 G .048(ommand terminates on a f) +-2.549 F .048(atal sig-)-.1 F(nal)108 201.6 Q F3(N)2.5 E F0(,)A F1(bash) +2.5 E F0(uses the v)2.5 E(alue of 128+)-.25 E F3(N)A F0(as the e)2.5 E +(xit status.)-.15 E .404 +(If a command is not found, the child process created to e)108 218.4 R +-.15(xe)-.15 G .404(cute it returns a status of 127.).15 F .405 +(If a command is)5.405 F(found b)108 230.4 Q(ut is not e)-.2 E -.15(xe) +-.15 G(cutable, the return status is 126.).15 E(If a command f)108 247.2 +Q(ails because of an error during e)-.1 E +(xpansion or redirection, the e)-.15 E(xit status is greater than zero.) +-.15 E .081(Shell b)108 264 R .081 +(uiltin commands return a status of 0 \()-.2 F F3(true)A F0 2.581(\)i)C +2.581(fs)-2.581 G .08(uccessful, and non-zero \()-2.581 F F3(false)A F0 +2.58(\)i)C 2.58(fa)-2.58 G 2.58(ne)-2.58 G .08(rror occurs while)-2.58 F +(the)108 276 Q 2.967(ye)-.15 G -.15(xe)-3.117 G 2.967(cute. All).15 F +-.2(bu)2.967 G .467(iltins return an e).2 F .468 +(xit status of 2 to indicate incorrect usage, generally in)-.15 F -.25 +(va)-.4 G .468(lid options or).25 F(missing ar)108 288 Q(guments.)-.18 E +F1(Bash)108 304.8 Q F0 .202(itself returns the e)2.702 F .202 +(xit status of the last command e)-.15 F -.15(xe)-.15 G .201 +(cuted, unless a syntax error occurs, in which case).15 F(it e)108 316.8 +Q(xits with a non-zero v)-.15 E 2.5(alue. See)-.25 F(also the)2.5 E F1 +(exit)2.5 E F0 -.2(bu)2.5 G(iltin command belo).2 E -.65(w.)-.25 G F2 +(SIGN)72 333.6 Q(ALS)-.219 E F0(When)108 345.6 Q F1(bash)2.502 E F0 .002 +(is interacti)2.502 F -.15(ve)-.25 G 2.502(,i).15 G 2.502(nt)-2.502 G +.002(he absence of an)-2.502 F 2.502(yt)-.15 G .002(raps, it ignores) +-2.502 F/F4 9/Times-Bold@0 SF(SIGTERM)2.502 E F0 .002(\(so that)2.252 F +F1 .002(kill 0)2.502 F F0 .002(does not kill an in-)2.502 F(teracti)108 +357.6 Q 1.216 -.15(ve s)-.25 H .916(hell\), and).15 F F4(SIGINT)3.416 E +F0 .915(is caught and handled \(so that the)3.166 F F1(wait)3.415 E F0 +-.2(bu)3.415 G .915(iltin is interruptible\).).2 F .915(In all cases,) +5.915 F F1(bash)108 369.6 Q F0(ignores)2.5 E F4(SIGQ)2.5 E(UIT)-.09 E/F5 +9/Times-Roman@0 SF(.)A F0(If job control is in ef)4.5 E(fect,)-.25 E F1 +(bash)2.5 E F0(ignores)2.5 E F4(SIGTTIN)2.5 E F5(,)A F4(SIGTT)2.25 E(OU) +-.162 E F5(,)A F0(and)2.25 E F4(SIGTSTP)2.5 E F5(.)A F0(Non-b)108 386.4 +Q 1.064(uiltin commands run by)-.2 F F1(bash)3.564 E F0(ha)3.564 E 1.365 +-.15(ve s)-.2 H 1.065(ignal handlers set to the v).15 F 1.065 +(alues inherited by the shell from its)-.25 F 3.248(parent. When)108 +398.4 R .748(job control is not in ef)3.248 F .747 +(fect, asynchronous commands ignore)-.25 F F4(SIGINT)3.247 E F0(and) +2.997 E F4(SIGQ)3.247 E(UIT)-.09 E F0 .747(in addi-)2.997 F .652 +(tion to these inherited handlers.)108 410.4 R .653 +(Commands run as a result of command substitution ignore the k)5.652 F +-.15(ey)-.1 G(board-).15 E(generated job control signals)108 422.4 Q F4 +(SIGTTIN)2.5 E F5(,)A F4(SIGTT)2.25 E(OU)-.162 E F5(,)A F0(and)2.25 E F4 +(SIGTSTP)2.5 E F5(.)A F0 2.046(The shell e)108 439.2 R 2.046 +(xits by def)-.15 F 2.045(ault upon receipt of a)-.1 F F4(SIGHUP)4.545 E +F5(.)A F0 2.045(Before e)6.545 F 2.045(xiting, an interacti)-.15 F 2.345 +-.15(ve s)-.25 H 2.045(hell resends the).15 F F4(SIGHUP)108 451.2 Q F0 +1.004(to all jobs, running or stopped.)3.254 F 1.004 +(Stopped jobs are sent)6.004 F F4(SIGCONT)3.505 E F0 1.005 +(to ensure that the)3.255 F 3.505(yr)-.15 G(ecei)-3.505 E 1.305 -.15 +(ve t)-.25 H(he).15 E F4(SIGHUP)108 463.2 Q F5(.)A F0 2.53 -.8(To p)5.43 +H(re).8 E -.15(ve)-.25 G .93(nt the shell from sending the signal to a \ +particular job, it should be remo).15 F -.15(ve)-.15 G 3.429(df).15 G +.929(rom the)-3.429 F 1.356(jobs table with the)108 475.2 R F1(diso) +3.856 E(wn)-.1 E F0 -.2(bu)3.856 G 1.356(iltin \(see).2 F F4 1.356 +(SHELL B)3.856 F(UIL)-.09 E 1.356(TIN COMMANDS)-.828 F F0(belo)3.607 E +1.357(w\) or mark)-.25 F 1.357(ed to not recei)-.1 F -.15(ve)-.25 G F4 +(SIGHUP)108 487.2 Q F0(using)2.25 E F1(diso)2.5 E(wn \255h)-.1 E F0(.)A +.166(If the)108 504 R F1(huponexit)2.666 E F0 .166 +(shell option has been set with)2.666 F F1(shopt)2.666 E F0(,)A F1(bash) +2.666 E F0 .166(sends a)2.666 F F4(SIGHUP)2.666 E F0 .166 +(to all jobs when an interacti)2.416 F -.15(ve)-.25 G(login shell e)108 +516 Q(xits.)-.15 E(If)108 532.8 Q F1(bash)3.046 E F0 .546(is w)3.046 F +.546(aiting for a command to complete and recei)-.1 F -.15(ve)-.25 G +3.046(sas).15 G .546(ignal for which a trap has been set, the trap) +-3.046 F .663(will not be e)108 544.8 R -.15(xe)-.15 G .663 +(cuted until the command completes.).15 F(When)5.663 E F1(bash)3.163 E +F0 .662(is w)3.163 F .662(aiting for an asynchronous command)-.1 F .326 +(via the)108 556.8 R F1(wait)2.826 E F0 -.2(bu)2.826 G .327(iltin, the \ +reception of a signal for which a trap has been set will cause the).2 F +F1(wait)2.827 E F0 -.2(bu)2.827 G .327(iltin to re-).2 F +(turn immediately with an e)108 568.8 Q +(xit status greater than 128, immediately after which the trap is e)-.15 +E -.15(xe)-.15 G(cuted.).15 E F2(JOB CONTR)72 585.6 Q(OL)-.329 E F3 -.25 +(Jo)108 597.6 S 3.369(bc).25 G(ontr)-3.369 E(ol)-.45 E F0 .868 +(refers to the ability to selecti)3.879 F -.15(ve)-.25 G .868 +(ly stop \().15 F F3(suspend)A F0 3.368(\)t)C .868(he e)-3.368 F -.15 +(xe)-.15 G .868(cution of processes and continue \().15 F F3 -.37(re)C +(-).37 E(sume)108 609.6 Q F0 2.664(\)t)C .164(heir e)-2.664 F -.15(xe) +-.15 G .164(cution at a later point.).15 F 2.665(Au)5.165 G .165 +(ser typically emplo)-2.665 F .165(ys this f)-.1 F .165 +(acility via an interacti)-.1 F .465 -.15(ve i)-.25 H(nterf).15 E .165 +(ace sup-)-.1 F(plied jointly by the operating system k)108 621.6 Q +(ernel')-.1 E 2.5(st)-.55 G(erminal dri)-2.5 E -.15(ve)-.25 G 2.5(ra).15 +G(nd)-2.5 E F1(bash)2.5 E F0(.)A .785(The shell associates a)108 638.4 R +F3(job)5.025 E F0 .785(with each pipeline.)3.515 F .784(It k)5.785 F +.784(eeps a table of currently e)-.1 F -.15(xe)-.15 G .784 +(cuting jobs, which may be).15 F .324(listed with the)108 650.4 R F1 +(jobs)2.824 E F0 2.824(command. When)2.824 F F1(bash)2.825 E F0 .325 +(starts a job asynchronously \(in the)2.825 F F3(bac)3.095 E(kgr)-.2 E +(ound)-.45 E F0 .325(\), it prints a line).77 F(that looks lik)108 662.4 +Q(e:)-.1 E([1] 25647)144 679.2 Q .241(indicating that this job is job n\ +umber 1 and that the process ID of the last process in the pipeline ass\ +ociated)108 696 R .732(with this job is 25647.)108 708 R .733 +(All of the processes in a single pipeline are members of the same job) +5.732 F(.)-.4 E F1(Bash)5.733 E F0(uses)3.233 E(the)108 720 Q F3(job) +4.24 E F0(abstraction as the basis for job control.)2.73 E(GNU Bash 5.1) +72 768 Q(2020 October 29)141.235 E(37)190.395 E 0 Cg EP +%%Page: 38 38 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E 1.982 -.8(To f)108 +84 T .382(acilitate the implementation of the user interf).7 F .382 +(ace to job control, the operating system maintains the no-)-.1 F 1.537 +(tion of a)108 96 R/F1 10/Times-Italic@0 SF(curr)4.037 E 1.537 +(ent terminal pr)-.37 F 1.537(ocess gr)-.45 F 1.537(oup ID)-.45 F F0 +6.537(.M)C 1.538(embers of this process group \(processes whose process) +-6.537 F .023 +(group ID is equal to the current terminal process group ID\) recei)108 +108 R .323 -.15(ve k)-.25 H -.15(ey).05 G .023 +(board-generated signals such as).15 F/F2 9/Times-Bold@0 SF(SIG-)2.522 E +(INT)108 120 Q/F3 9/Times-Roman@0 SF(.)A F0 1.215 +(These processes are said to be in the)5.715 F F1(for)5.685 E -.4(eg) +-.37 G -.45(ro).4 G(und).45 E F0(.).77 E F1(Bac)6.795 E(kgr)-.2 E(ound) +-.45 E F0 1.216(processes are those whose process)4.485 F .146 +(group ID dif)108 132 R .146(fers from the terminal')-.25 F .146 +(s; such processes are immune to k)-.55 F -.15(ey)-.1 G .145 +(board-generated signals.).15 F .145(Only fore-)5.145 F .16 +(ground processes are allo)108 144 R .16(wed to read from or)-.25 F 2.66 +(,i)-.4 G 2.66(ft)-2.66 G .16(he user so speci\214es with)-2.66 F/F4 10 +/Courier@0 SF .16(stty tostop)2.66 F F0 2.66(,w)C .16(rite to the ter) +-2.66 F(-)-.2 E 3.052(minal. Background)108 156 R .551 +(processes which attempt to read from \(write to when)3.052 F F4 .551 +(stty tostop)3.051 F F0 .551(is in ef)3.051 F .551(fect\) the)-.25 F +.717(terminal are sent a)108 168 R F2 .717(SIGTTIN \(SIGTT)3.217 F(OU\)) +-.162 E F0 .718(signal by the k)2.967 F(ernel')-.1 E 3.218(st)-.55 G +.718(erminal dri)-3.218 F -.15(ve)-.25 G 1.518 -.4(r, w).15 H .718 +(hich, unless caught, sus-).4 F(pends the process.)108 180 Q 1.088 +(If the operating system on which)108 196.8 R/F5 10/Times-Bold@0 SF +(bash)3.588 E F0 1.088(is running supports job control,)3.588 F F5(bash) +3.587 E F0 1.087(contains f)3.587 F 1.087(acilities to use it.)-.1 F -.8 +(Ty)108 208.8 S .301(ping the).8 F F1(suspend)3.141 E F0 .301 +(character \(typically)3.571 F F5(^Z)2.801 E F0 2.801(,C)C .301 +(ontrol-Z\) while a process is running causes that process to be)-2.801 +F 2.143(stopped and returns control to)108 220.8 R F5(bash)4.642 E F0 +7.142(.T)C 2.142(yping the)-7.942 F F1 2.142(delayed suspend)4.992 F F0 +2.142(character \(typically)5.412 F F5(^Y)4.642 E F0 4.642(,C)C +(ontrol-Y\))-4.642 E .021(causes the process to be stopped when it atte\ +mpts to read input from the terminal, and control to be returned)108 +232.8 R(to)108 244.8 Q F5(bash)3.392 E F0 5.892(.T)C .892 +(he user may then manipulate the state of this job, using the)-5.892 F +F5(bg)3.392 E F0 .892(command to continue it in the)3.392 F .17 +(background, the)108 256.8 R F5(fg)2.67 E F0 .17 +(command to continue it in the fore)2.67 F .17(ground, or the)-.15 F F5 +(kill)2.67 E F0 .17(command to kill it.)2.67 F(A)5.17 E F5(^Z)2.67 E F0 +(tak)2.67 E .17(es ef-)-.1 F 1.419(fect immediately)108 268.8 R 3.919 +(,a)-.65 G 1.418(nd has the additional side ef)-3.919 F 1.418 +(fect of causing pending output and typeahead to be dis-)-.25 F(carded.) +108 280.8 Q .777(There are a number of w)108 297.6 R .777 +(ays to refer to a job in the shell.)-.1 F .777(The character)5.777 F F5 +(%)3.277 E F0 .777(introduces a job speci\214cation)3.277 F(\()108 309.6 +Q F1(jobspec)A F0 3.458(\). Job)B(number)3.458 E F1(n)3.818 E F0 .957 +(may be referred to as)3.697 F F5(%n)3.457 E F0 5.957(.A)C .957 +(job may also be referred to using a pre\214x of the)-2.5 F .59(name us\ +ed to start it, or using a substring that appears in its command line.) +108 321.6 R -.15(Fo)5.59 G 3.09(re).15 G(xample,)-3.24 E F5(%ce)3.09 E +F0 .59(refers to a)3.09 F .385(stopped job whose command name be)108 +333.6 R .385(gins with)-.15 F F5(ce)2.885 E F0 5.385(.I)C 2.885(fap) +-5.385 G .385(re\214x matches more than one job,)-2.885 F F5(bash)2.885 +E F0 .385(reports an)2.885 F(error)108 345.6 Q 5.194(.U)-.55 G(sing) +-5.194 E F5(%?ce)2.694 E F0 2.694(,o)C 2.694(nt)-2.694 G .194 +(he other hand, refers to an)-2.694 F 2.694(yj)-.15 G .194 +(ob containing the string)-2.694 F F5(ce)2.694 E F0 .194 +(in its command line.)2.694 F .194(If the)5.194 F .306 +(substring matches more than one job,)108 357.6 R F5(bash)2.806 E F0 +.306(reports an error)2.806 F 5.306(.T)-.55 G .306(he symbols)-5.306 F +F5(%%)2.806 E F0(and)2.806 E F5(%+)2.806 E F0 .306(refer to the shell') +2.806 F(s)-.55 E .132(notion of the)108 369.6 R F1(curr)2.832 E .133 +(ent job)-.37 F F0 2.633(,w).23 G .133 +(hich is the last job stopped while it w)-2.633 F .133(as in the fore) +-.1 F .133(ground or started in the back-)-.15 F 2.576(ground. The)108 +381.6 R F1(pr)3.826 E -.15(ev)-.37 G .076(ious job).15 F F0 .076 +(may be referenced using)2.806 F F5<25ad>2.576 E F0 5.076(.I)C 2.576(ft) +-5.076 G .075(here is only a single job,)-2.576 F F5(%+)2.575 E F0(and) +2.575 E F5<25ad>2.575 E F0 .075(can both)2.575 F .317 +(be used to refer to that job)108 393.6 R 5.317(.I)-.4 G 2.817(no)-5.317 +G .317(utput pertaining to jobs \(e.g., the output of the)-2.817 F F5 +(jobs)2.817 E F0 .317(command\), the current)2.817 F .033(job is al)108 +405.6 R -.1(wa)-.1 G .033(ys \215agged with a).1 F F5(+)2.533 E F0 2.533 +(,a)C .033(nd the pre)-2.533 F .033(vious job with a)-.25 F F52.533 +E F0 5.033(.A)C .033(single % \(with no accompan)-2.5 F .032 +(ying job speci-)-.15 F(\214cation\) also refers to the current job)108 +417.6 Q(.)-.4 E .443 +(Simply naming a job can be used to bring it into the fore)108 434.4 R +(ground:)-.15 E F5(%1)2.944 E F0 .444(is a synon)2.944 F .444(ym for) +-.15 F F5 -.63(``)2.944 G .444(fg %1').63 F(')-.63 E F0 2.944(,b)C +(ringing)-2.944 E 1.473(job 1 from the background into the fore)108 +446.4 R 3.973(ground. Similarly)-.15 F(,)-.65 E F5 -.63(``)3.972 G 1.472 +(%1 &').63 F(')-.63 E F0 1.472(resumes job 1 in the background,)3.972 F +(equi)108 458.4 Q -.25(va)-.25 G(lent to).25 E F5 -.63(``)2.5 G(bg %1') +.63 E(')-.63 E F0(.)A .13(The shell learns immediately whene)108 475.2 R +-.15(ve)-.25 G 2.63(raj).15 G .13(ob changes state.)-2.63 F(Normally) +5.131 E(,)-.65 E F5(bash)2.631 E F0 -.1(wa)2.631 G .131 +(its until it is about to print a).1 F .158 +(prompt before reporting changes in a job')108 487.2 R 2.658(ss)-.55 G +.158(tatus so as to not interrupt an)-2.658 F 2.657(yo)-.15 G .157 +(ther output.)-2.657 F .157(If the)5.157 F F52.657 E F0 .157 +(option to)2.657 F(the)108 499.2 Q F5(set)2.647 E F0 -.2(bu)2.647 G .147 +(iltin command is enabled,).2 F F5(bash)2.647 E F0 .148 +(reports such changes immediately)2.648 F 5.148(.A)-.65 G .448 -.15 +(ny t)-5.148 H .148(rap on).15 F F2(SIGCHLD)2.648 E F0 .148(is e)2.398 F +-.15(xe)-.15 G(-).15 E(cuted for each child that e)108 511.2 Q(xits.) +-.15 E .033(If an attempt to e)108 528 R(xit)-.15 E F5(bash)2.533 E F0 +.033(is made while jobs are stopped \(or)2.533 F 2.532(,i)-.4 G 2.532 +(ft)-2.532 G(he)-2.532 E F5(checkjobs)2.532 E F0 .032 +(shell option has been enabled)2.532 F 1.002(using the)108 540 R F5 +(shopt)3.502 E F0 -.2(bu)3.502 G 1.002 +(iltin, running\), the shell prints a w).2 F 1.002 +(arning message, and, if the)-.1 F F5(checkjobs)3.503 E F0 1.003 +(option is en-)3.503 F .956(abled, lists the jobs and their statuses.) +108 552 R(The)5.955 E F5(jobs)3.455 E F0 .955 +(command may then be used to inspect their status.)3.455 F .955(If a) +5.955 F .603(second attempt to e)108 564 R .604 +(xit is made without an interv)-.15 F .604 +(ening command, the shell does not print another w)-.15 F(arning,)-.1 E +(and an)108 576 Q 2.5(ys)-.15 G(topped jobs are terminated.)-2.5 E .645 +(When the shell is w)108 592.8 R .645 +(aiting for a job or process using the)-.1 F F5(wait)3.144 E F0 -.2(bu) +3.144 G .644(iltin, and job control is enabled,).2 F F5(wait)3.144 E F0 +(will)3.144 E .282(return when the job changes state. The)108 604.8 R F5 +2.782 E F0 .282(option causes)2.782 F F5(wait)2.782 E F0 .282 +(to w)2.782 F .282(ait until the job or process terminates be-)-.1 F +(fore returning.)108 616.8 Q/F6 10.95/Times-Bold@0 SF(PR)72 633.6 Q +(OMPTING)-.329 E F0 .645(When e)108 645.6 R -.15(xe)-.15 G .645 +(cuting interacti).15 F -.15(ve)-.25 G(ly).15 E(,)-.65 E F5(bash)3.145 E +F0 .645(displays the primary prompt)3.145 F F2(PS1)3.145 E F0 .645 +(when it is ready to read a command,)2.895 F .427 +(and the secondary prompt)108 657.6 R F2(PS2)2.927 E F0 .427 +(when it needs more input to complete a command.)2.677 F F5(Bash)5.428 E +F0(displays)2.928 E F2(PS0)2.928 E F0(after)2.678 E .038 +(it reads a command b)108 669.6 R .038(ut before e)-.2 F -.15(xe)-.15 G +.038(cuting it.).15 F F5(Bash)5.038 E F0(displays)2.537 E F2(PS4)2.537 E +F0 .037(as described abo)2.287 F .337 -.15(ve b)-.15 H .037 +(efore tracing each com-).15 F 1.121(mand when the)108 681.6 R F5 +3.621 E F0 1.122(option is enabled.)3.621 F F5(Bash)6.122 E F0(allo) +3.622 E 1.122(ws these prompt strings to be customized by inserting a) +-.25 F(number of backslash-escaped special characters that are decoded \ +as follo)108 693.6 Q(ws:)-.25 E F5(\\a)144 705.6 Q F0 +(an ASCII bell character \(07\))180 705.6 Q F5(\\d)144 717.6 Q F0 +(the date in "W)180 717.6 Q(eekday Month Date" format \(e.g., "T)-.8 E +(ue May 26"\))-.45 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(38) +190.395 E 0 Cg EP +%%Page: 39 39 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(\\D{)144 84 Q/F2 10/Times-Italic@0 SF(format)A F1(})A F0(the)180 96 Q +F2(format)3.927 E F0 1.427(is passed to)3.927 F F2(strftime)3.927 E F0 +1.427(\(3\) and the result is inserted into the prompt string; an)B +(empty)180 108 Q F2(format)2.5 E F0 +(results in a locale-speci\214c time representation.)2.5 E +(The braces are required)5 E F1(\\e)144 120 Q F0 +(an ASCII escape character \(033\))180 120 Q F1(\\h)144 132 Q F0 +(the hostname up to the \214rst `.)180 132 Q(')-.7 E F1(\\H)144 144 Q F0 +(the hostname)180 144 Q F1(\\j)144 156 Q F0 +(the number of jobs currently managed by the shell)180 156 Q F1(\\l)144 +168 Q F0(the basename of the shell')180 168 Q 2.5(st)-.55 G(erminal de) +-2.5 E(vice name)-.25 E F1(\\n)144 180 Q F0(ne)180 180 Q(wline)-.25 E F1 +(\\r)144 192 Q F0(carriage return)180 192 Q F1(\\s)144 204 Q F0 +(the name of the shell, the basename of)180 204 Q F1($0)2.5 E F0 +(\(the portion follo)2.5 E(wing the \214nal slash\))-.25 E F1(\\t)144 +216 Q F0(the current time in 24-hour HH:MM:SS format)180 216 Q F1(\\T) +144 228 Q F0(the current time in 12-hour HH:MM:SS format)180 228 Q F1 +(\\@)144 240 Q F0(the current time in 12-hour am/pm format)180 240 Q F1 +(\\A)144 252 Q F0(the current time in 24-hour HH:MM format)180 252 Q F1 +(\\u)144 264 Q F0(the username of the current user)180 264 Q F1(\\v)144 +276 Q F0(the v)180 276 Q(ersion of)-.15 E F1(bash)2.5 E F0 +(\(e.g., 2.00\))2.5 E F1(\\V)144 288 Q F0(the release of)180 288 Q F1 +(bash)2.5 E F0 2.5(,v)C(ersion + patch le)-2.65 E -.15(ve)-.25 G 2.5 +(l\().15 G(e.g., 2.00.0\))-2.5 E F1(\\w)144 300 Q F0 .115(the current w) +180 300 R .115(orking directory)-.1 F 2.615(,w)-.65 G(ith)-2.615 E/F3 9 +/Times-Bold@0 SF($HOME)2.615 E F0(abbre)2.365 E .116 +(viated with a tilde \(uses the v)-.25 F .116(alue of the)-.25 F F3(PR) +180 312 Q(OMPT_DIR)-.27 E(TRIM)-.36 E F0 -.25(va)2.25 G(riable\)).25 E +F1(\\W)144 324 Q F0(the basename of the current w)180 324 Q +(orking directory)-.1 E 2.5(,w)-.65 G(ith)-2.5 E F3($HOME)2.5 E F0 +(abbre)2.25 E(viated with a tilde)-.25 E F1(\\!)144 336 Q F0 +(the history number of this command)180 336 Q F1(\\#)144 348 Q F0 +(the command number of this command)180 348 Q F1(\\$)144 360 Q F0 +(if the ef)180 360 Q(fecti)-.25 E .3 -.15(ve U)-.25 H(ID is 0, a).15 E +F1(#)2.5 E F0 2.5(,o)C(therwise a)-2.5 E F1($)2.5 E(\\)144 372 Q F2(nnn) +A F0(the character corresponding to the octal number)180 372 Q F2(nnn) +2.5 E F1(\\\\)144 384 Q F0 2.5(ab)180 384 S(ackslash)-2.5 E F1(\\[)144 +396 Q F0(be)180 396 Q 1.257(gin a sequence of non-printing characters, \ +which could be used to embed a terminal)-.15 F +(control sequence into the prompt)180 408 Q F1(\\])144 420 Q F0 +(end a sequence of non-printing characters)180 420 Q .119 +(The command number and the history number are usually dif)108 436.8 R +.12(ferent: the history number of a command is its)-.25 F .547(position\ + in the history list, which may include commands restored from the hist\ +ory \214le \(see)108 448.8 R F3(HIST)3.046 E(OR)-.162 E(Y)-.315 E F0 +(be-)2.796 E(lo)108 460.8 Q .354(w\), while the command number is the p\ +osition in the sequence of commands e)-.25 F -.15(xe)-.15 G .355 +(cuted during the current).15 F .823(shell session.)108 472.8 R .822 +(After the string is decoded, it is e)5.823 F .822 +(xpanded via parameter e)-.15 F .822(xpansion, command substitution,) +-.15 F .682(arithmetic e)108 484.8 R .682(xpansion, and quote remo)-.15 +F -.25(va)-.15 G .682(l, subject to the v).25 F .683(alue of the)-.25 F +F1(pr)3.183 E(omptv)-.18 E(ars)-.1 E F0 .683(shell option \(see the de-) +3.183 F 1.198(scription of the)108 496.8 R F1(shopt)3.698 E F0 1.198 +(command under)3.698 F F3 1.197(SHELL B)3.697 F(UIL)-.09 E 1.197 +(TIN COMMANDS)-.828 F F0(belo)3.447 E 3.697(w\). This)-.25 F 1.197 +(can ha)3.697 F 1.497 -.15(ve u)-.2 H(nw).15 E(anted)-.1 E .322(side ef) +108 508.8 R .322(fects if escaped portions of the string appear within \ +command substitution or contain characters spe-)-.25 F(cial to w)108 +520.8 Q(ord e)-.1 E(xpansion.)-.15 E/F4 10.95/Times-Bold@0 SF(READLINE) +72 537.6 Q F0 .151 +(This is the library that handles reading input when using an interacti) +108 549.6 R .45 -.15(ve s)-.25 H .15(hell, unless the).15 F F1 +(\255\255noediting)2.65 E F0(option)2.65 E .384(is gi)108 561.6 R -.15 +(ve)-.25 G 2.884(na).15 G 2.884(ts)-2.884 G .384(hell in)-2.884 F -.2 +(vo)-.4 G 2.884(cation. Line).2 F .384 +(editing is also used when using the)2.884 F F12.885 E F0 .385 +(option to the)2.885 F F1 -.18(re)2.885 G(ad).18 E F0 -.2(bu)2.885 G +2.885(iltin. By).2 F(de-)2.885 E -.1(fa)108 573.6 S 1.407 +(ult, the line editing commands are similar to those of Emacs.).1 F +3.906(Av)6.406 G 1.406(i-style line editing interf)-3.906 F 1.406 +(ace is also)-.1 F -.2(av)108 585.6 S 3.35(ailable. Line)-.05 F .85 +(editing can be enabled at an)3.35 F 3.35(yt)-.15 G .85(ime using the) +-3.35 F F1 .85(\255o emacs)3.35 F F0(or)3.35 E F1 .85(\255o vi)3.35 F F0 +.85(options to the)3.35 F F1(set)3.35 E F0 -.2(bu)3.35 G(iltin).2 E +(\(see)108 597.6 Q F3 .763(SHELL B)3.263 F(UIL)-.09 E .763(TIN COMMANDS) +-.828 F F0(belo)3.013 E 3.263(w\). T)-.25 F 3.263(ot)-.8 G .763(urn of) +-3.263 F 3.263(fl)-.25 G .763 +(ine editing after the shell is running, use the)-3.263 F F1(+o)3.262 E +(emacs)108 609.6 Q F0(or)2.5 E F1(+o vi)2.5 E F0(options to the)2.5 E F1 +(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(Readline Notation)87 626.4 Q +F0 .463(In this section, the Emacs-style notation is used to denote k) +108 638.4 R -.15(ey)-.1 G(strok).15 E 2.963(es. Control)-.1 F -.1(ke) +2.963 G .463(ys are denoted by C\255)-.05 F F2 -.1(ke)C(y)-.2 E F0(,)A +1.153(e.g., C\255n means Control\255N.)108 650.4 R(Similarly)6.153 E(,) +-.65 E F2(meta)4.033 E F0 -.1(ke)3.913 G 1.153(ys are denoted by M\255) +-.05 F F2 -.1(ke)C(y)-.2 E F0 3.652(,s)C 3.652(oM)-3.652 G 1.152 +(\255x means Meta\255X.)-3.652 F(\(On)6.152 E -.1(ke)108 662.4 S .83 +(yboards without a)-.05 F F2(meta)3.71 E F0 -.1(ke)3.59 G 2.13 -.65 +(y, M)-.05 H.65 E F2(x)A F0 .83(means ESC)3.33 F F2(x)3.33 E F0 3.33 +(,i)C .831(.e., press the Escape k)-3.33 F 1.131 -.15(ey t)-.1 H .831 +(hen the).15 F F2(x)4.101 E F0 -.1(ke)3.861 G 4.631 -.65(y. T)-.05 H +.831(his mak).65 F(es)-.1 E .6(ESC the)108 674.4 R F2 .6(meta pr)3.1 F +(e\214x)-.37 E F0 5.6(.T)C .6(he combination M\255C\255)-5.6 F F2(x)A F0 +.599(means ESC\255Control\255)3.099 F F2(x)A F0 3.099(,o)C 3.099(rp) +-3.099 G .599(ress the Escape k)-3.099 F .899 -.15(ey t)-.1 H .599 +(hen hold).15 F(the Control k)108 686.4 Q .3 -.15(ey w)-.1 H +(hile pressing the).15 E F2(x)3.27 E F0 -.1(ke)3.03 G -.65(y.)-.05 G(\)) +.65 E .595(Readline commands may be gi)108 703.2 R -.15(ve)-.25 G 3.096 +(nn).15 G(umeric)-3.096 E F2(ar)3.426 E(guments)-.37 E F0 3.096(,w).27 G +.596(hich normally act as a repeat count.)-3.096 F(Sometimes,)5.596 E +(ho)108 715.2 Q(we)-.25 E -.15(ve)-.25 G 1.419 -.4(r, i).15 H 3.119(ti) +.4 G 3.119(st)-3.119 G .619(he sign of the ar)-3.119 F .619 +(gument that is signi\214cant.)-.18 F -.15(Pa)5.619 G .619(ssing a ne) +.15 F -.05(ga)-.15 G(ti).05 E .919 -.15(ve a)-.25 H -.18(rg).15 G .619 +(ument to a command that).18 F 2.938(acts in the forw)108 727.2 R 2.938 +(ard direction \(e.g.,)-.1 F F1(kill\255line)5.438 E F0 5.438(\)c)C +2.938(auses that command to act in a backw)-5.438 F 2.938 +(ard direction.)-.1 F(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E +(39)190.395 E 0 Cg EP +%%Page: 40 40 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E +(Commands whose beha)108 84 Q(vior with ar)-.2 E(guments de)-.18 E +(viates from this are noted belo)-.25 E -.65(w.)-.25 G .812 +(When a command is described as)108 100.8 R/F1 10/Times-Italic@0 SF +(killing)3.311 E F0(te)3.311 E .811(xt, the te)-.15 F .811 +(xt deleted is sa)-.15 F -.15(ve)-.2 G 3.311(df).15 G .811 +(or possible future retrie)-3.311 F -.25(va)-.25 G 3.311(l\().25 G F1 +(yank-)-3.311 E(ing)108 112.8 Q F0 2.529(\). The)B .029(killed te)2.529 +F .029(xt is sa)-.15 F -.15(ve)-.2 G 2.529(di).15 G 2.529(na)-2.529 G F1 +.029(kill ring)B F0 5.029(.C)C(onsecuti)-5.029 E .329 -.15(ve k)-.25 H +.029(ills cause the te).15 F .029(xt to be accumulated into one unit,) +-.15 F .567(which can be yank)108 124.8 R .567(ed all at once.)-.1 F +.567(Commands which do not kill te)5.567 F .567 +(xt separate the chunks of te)-.15 F .567(xt on the kill)-.15 F(ring.) +108 136.8 Q/F2 10/Times-Bold@0 SF(Readline Initialization)87 153.6 Q F0 +.091(Readline is customized by putting commands in an initialization \ +\214le \(the)108 165.6 R F1(inputr)2.591 E(c)-.37 E F0 2.591 +(\214le\). The)2.591 F .092(name of this \214le)2.591 F .573(is tak)108 +177.6 R .573(en from the v)-.1 F .573(alue of the)-.25 F/F3 9 +/Times-Bold@0 SF(INPUTRC)3.073 E F0 -.25(va)2.823 G 3.073(riable. If).25 +F .573(that v)3.073 F .573(ariable is unset, the def)-.25 F .573 +(ault is)-.1 F F1(~/.inputr)2.573 E(c)-.37 E F0 5.572(.I).31 G 3.072(ft) +-5.572 G(hat)-3.072 E 3.061(\214le does)108 189.6 R .561(not e)3.061 F +.562(xist or cannot be read, the ultimate def)-.15 F .562(ault is)-.1 F +F1(/etc/inputr)4.212 E(c)-.37 E F0 5.562(.W).31 G .562 +(hen a program which uses the)-5.562 F .175(readline library starts up,\ + the initialization \214le is read, and the k)108 201.6 R .474 -.15 +(ey b)-.1 H .174(indings and v).15 F .174(ariables are set.)-.25 F .174 +(There are)5.174 F .238(only a fe)108 213.6 R 2.738(wb)-.25 G .238 +(asic constructs allo)-2.738 F .239 +(wed in the readline initialization \214le.)-.25 F .239 +(Blank lines are ignored.)5.239 F .239(Lines be)5.239 F(gin-)-.15 E .554 +(ning with a)108 225.6 R F2(#)3.054 E F0 .554(are comments.)3.054 F .554 +(Lines be)5.554 F .554(ginning with a)-.15 F F2($)3.054 E F0 .554 +(indicate conditional constructs.)3.054 F .553(Other lines denote)5.553 +F -.1(ke)108 237.6 S 2.5(yb)-.05 G(indings and v)-2.5 E +(ariable settings.)-.25 E .986(The def)108 254.4 R .986(ault k)-.1 F +-.15(ey)-.1 G .987(-bindings may be changed with an).15 F F1(inputr) +3.497 E(c)-.37 E F0 3.487(\214le. Other)3.797 F .987 +(programs that use this library may)3.487 F(add their o)108 266.4 Q +(wn commands and bindings.)-.25 E -.15(Fo)108 283.2 S 2.5(re).15 G +(xample, placing)-2.65 E(M\255Control\255u: uni)144 300 Q -.15(ve)-.25 G +(rsal\255ar).15 E(gument)-.18 E(or)108 312 Q(C\255Meta\255u: uni)144 324 +Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(into the)108 336 Q F1 +(inputr)2.51 E(c)-.37 E F0 -.1(wo)2.81 G(uld mak).1 E 2.5(eM)-.1 G +(\255C\255u e)-2.5 E -.15(xe)-.15 G(cute the readline command).15 E F1 +(univer)2.58 E(sal\255ar)-.1 E(gument)-.37 E F0(.).68 E 1.011(The follo) +108 352.8 R 1.011(wing symbolic character names are recognized:)-.25 F +F1 -.4(RU)3.511 G(BOUT).4 E F0(,)1.27 E F1(DEL)4.091 E F0(,).53 E F1 +(ESC)4.021 E F0(,).72 E F1(LFD)4.091 E F0(,).28 E F1(NEWLINE)4.21 E F0 +(,).73 E F1(RET)4.14 E F0(,)1.27 E F1(RETURN)108.63 364.8 Q F0(,)1.1 E +F1(SPC)2.83 E F0(,).72 E F1(SP)2.83 E -.3(AC)-.9 G(E).3 E F0 2.5(,a).73 +G(nd)-2.5 E F1 -.5(TA)2.5 G(B).5 E F0(.).27 E .209 +(In addition to command names, readline allo)108 381.6 R .209(ws k)-.25 +F -.15(ey)-.1 G 2.709(st).15 G 2.709(ob)-2.709 G 2.709(eb)-2.709 G .209 +(ound to a string that is inserted when the k)-2.709 F .509 -.15(ey i) +-.1 H(s).15 E(pressed \(a)108 393.6 Q F1(macr)2.5 E(o)-.45 E F0(\).)A F2 +(Readline K)87 410.4 Q(ey Bindings)-.25 E F0 .366 +(The syntax for controlling k)108 422.4 R .666 -.15(ey b)-.1 H .366 +(indings in the).15 F F1(inputr)2.876 E(c)-.37 E F0 .366 +(\214le is simple.)3.176 F .366(All that is required is the name of the) +5.366 F .263(command or the te)108 434.4 R .264(xt of a macro and a k) +-.15 F .564 -.15(ey s)-.1 H .264(equence to which it should be bound.) +.15 F .264(The name may be speci-)5.264 F .139(\214ed in one of tw)108 +446.4 R 2.638(ow)-.1 G .138(ays: as a symbolic k)-2.738 F .438 -.15 +(ey n)-.1 H .138(ame, possibly with).15 F F1(Meta\255)2.638 E F0(or) +2.638 E F1(Contr)2.638 E(ol\255)-.45 E F0(pre\214x)2.638 E .138 +(es, or as a k)-.15 F .438 -.15(ey s)-.1 H(e-).15 E(quence.)108 458.4 Q +.16(When using the form)108 475.2 R F2 -.1(ke)2.66 G(yname).1 E F0(:)A +F1(function\255name).833 E F0(or)2.66 E F1(macr)2.66 E(o)-.45 E F0(,)A +F1 -.1(ke)2.66 G(yname)-.2 E F0 .161(is the name of a k)2.84 F .461 -.15 +(ey s)-.1 H .161(pelled out in Eng-).15 F 2.5(lish. F)108 487.2 R(or e) +-.15 E(xample:)-.15 E(Control-u: uni)144 511.2 Q -.15(ve)-.25 G +(rsal\255ar).15 E(gument)-.18 E(Meta-Rubout: backw)144 523.2 Q +(ard-kill-w)-.1 E(ord)-.1 E(Control-o: "> output")144 535.2 Q .699 +(In the abo)108 552 R .998 -.15(ve ex)-.15 H(ample,).15 E F1(C\255u) +3.038 E F0 .698(is bound to the function)3.448 F F2(uni)3.198 E -.1(ve) +-.1 G(rsal\255ar).1 E(gument)-.1 E F0(,)A F1(M\255DEL)3.878 E F0 .698 +(is bound to the func-)3.728 F(tion)108 564 Q F2(backward\255kill\255w) +2.758 E(ord)-.1 E F0 2.758(,a)C(nd)-2.758 E F1(C\255o)2.598 E F0 .258 +(is bound to run the macro e)2.938 F .259 +(xpressed on the right hand side \(that is, to)-.15 F(insert the te)108 +576 Q(xt)-.15 E/F4 10/Courier@0 SF 6(>o)2.5 G(utput)-6 E F0 +(into the line\).)2.5 E .056(In the second form,)108 592.8 R F2("k)2.556 +E(eyseq")-.1 E F0(:)A F1(function\255name).833 E F0(or)2.556 E F1(macr) +2.556 E(o)-.45 E F0(,)A F2 -.1(ke)2.556 G(yseq).1 E F0(dif)2.555 E .055 +(fers from)-.25 F F2 -.1(ke)2.555 G(yname).1 E F0(abo)2.555 E .355 -.15 +(ve i)-.15 H 2.555(nt).15 G .055(hat strings)-2.555 F 1.284 +(denoting an entire k)108 604.8 R 1.584 -.15(ey s)-.1 H 1.284(equence m\ +ay be speci\214ed by placing the sequence within double quotes.).15 F +(Some)6.284 E .386(GNU Emacs style k)108 616.8 R .686 -.15(ey e)-.1 H +.385(scapes can be used, as in the follo).15 F .385(wing e)-.25 F .385 +(xample, b)-.15 F .385(ut the symbolic character names)-.2 F +(are not recognized.)108 628.8 Q("\\C\255u": uni)144 652.8 Q -.15(ve) +-.25 G(rsal\255ar).15 E(gument)-.18 E +("\\C\255x\\C\255r": re\255read\255init\255\214le)144 664.8 Q +("\\e[11~": "Function K)144 676.8 Q .3 -.15(ey 1)-.25 H(").15 E .314 +(In this e)108 693.6 R(xample,)-.15 E F1(C\255u)2.654 E F0 .314(is ag) +3.064 F .315(ain bound to the function)-.05 F F2(uni)2.815 E -.1(ve)-.1 +G(rsal\255ar).1 E(gument)-.1 E F0(.)A F1 .315(C\255x C\255r)5.155 F F0 +.315(is bound to the func-)3.545 F(tion)108 705.6 Q F2 -.18(re)2.5 G +.18 E(ead\255init\255\214le)-.18 E F0 2.5(,a)C(nd)-2.5 E F1 +(ESC [ 1 1 ~)3.01 E F0(is bound to insert the te)3.94 E(xt)-.15 E F4 +(Function Key 1)2.5 E F0(.)A +(The full set of GNU Emacs style escape sequences is)108 722.4 Q +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(40)190.395 E 0 Cg EP +%%Page: 41 41 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF<5c43ad>144 84 Q F0(control pre\214x)180 84 Q F1<5c4dad>144 96 Q F0 +(meta pre\214x)180 96 Q F1(\\e)144 108 Q F0(an escape character)180 108 +Q F1(\\\\)144 120 Q F0(backslash)180 120 Q F1(\\")144 132 Q F0 +(literal ")180 132 Q F1<5c08>144 144 Q F0(literal \010)180 144 Q(In add\ +ition to the GNU Emacs style escape sequences, a second set of backslas\ +h escapes is a)108 160.8 Q -.25(va)-.2 G(ilable:).25 E F1(\\a)144 172.8 +Q F0(alert \(bell\))180 172.8 Q F1(\\b)144 184.8 Q F0(backspace)180 +184.8 Q F1(\\d)144 196.8 Q F0(delete)180 196.8 Q F1(\\f)144 208.8 Q F0 +(form feed)180 208.8 Q F1(\\n)144 220.8 Q F0(ne)180 220.8 Q(wline)-.25 E +F1(\\r)144 232.8 Q F0(carriage return)180 232.8 Q F1(\\t)144 244.8 Q F0 +(horizontal tab)180 244.8 Q F1(\\v)144 256.8 Q F0 -.15(ve)180 256.8 S +(rtical tab).15 E F1(\\)144 268.8 Q/F2 10/Times-Italic@0 SF(nnn)A F0 +(the eight-bit character whose v)180 268.8 Q(alue is the octal v)-.25 E +(alue)-.25 E F2(nnn)2.5 E F0(\(one to three digits\))2.5 E F1(\\x)144 +280.8 Q F2(HH)A F0(the eight-bit character whose v)180 280.8 Q +(alue is the he)-.25 E(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0 +(\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E 1.142 +(When entering the te)108 297.6 R 1.141(xt of a macro, single or double\ + quotes must be used to indicate a macro de\214nition.)-.15 F .089 +(Unquoted te)108 309.6 R .089(xt is assumed to be a function name.)-.15 +F .09(In the macro body)5.089 F 2.59(,t)-.65 G .09 +(he backslash escapes described abo)-2.59 F -.15(ve)-.15 G(are e)108 +321.6 Q 2.5(xpanded. Backslash)-.15 F(will quote an)2.5 E 2.5(yo)-.15 G +(ther character in the macro te)-2.5 E(xt, including " and \010.)-.15 E +F1(Bash)108 338.4 Q F0(allo)2.93 E .43(ws the current readline k)-.25 F +.73 -.15(ey b)-.1 H .429(indings to be displayed or modi\214ed with the) +.15 F F1(bind)2.929 E F0 -.2(bu)2.929 G .429(iltin command.).2 F .045 +(The editing mode may be switched during interacti)108 350.4 R .345 -.15 +(ve u)-.25 H .046(se by using the).15 F F12.546 E F0 .046 +(option to the)2.546 F F1(set)2.546 E F0 -.2(bu)2.546 G .046 +(iltin command).2 F(\(see)108 362.4 Q/F3 9/Times-Bold@0 SF(SHELL B)2.5 E +(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E F1 +(Readline V)87 379.2 Q(ariables)-.92 E F0 .044(Readline has v)108 391.2 +R .043(ariables that can be used to further customize its beha)-.25 F +(vior)-.2 E 5.043(.A)-.55 G -.25(va)-2.5 G .043 +(riable may be set in the).25 F F2(inpu-)2.553 E(tr)108 403.2 Q(c)-.37 E +F0(\214le with a statement of the form)2.81 E F1(set)144 420 Q F2 +(variable\255name value)2.5 E F0(or using the)108 432 Q F1(bind)2.5 E F0 +-.2(bu)2.5 G(iltin command \(see).2 E F3(SHELL B)2.5 E(UIL)-.09 E +(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E .79 +(Except where noted, readline v)108 448.8 R .79(ariables can tak)-.25 F +3.29(et)-.1 G .79(he v)-3.29 F(alues)-.25 E F1(On)3.29 E F0(or)3.29 E F1 +(Off)3.29 E F0 .79(\(without re)3.29 F -.05(ga)-.15 G .79(rd to case\).) +.05 F(Unrecog-)5.79 E .449(nized v)108 460.8 R .448 +(ariable names are ignored.)-.25 F .448(When a v)5.448 F .448(ariable v) +-.25 F .448(alue is read, empty or null v)-.25 F .448 +(alues, "on" \(case-insensi-)-.25 F(ti)108 472.8 Q -.15(ve)-.25 G .467 +(\), and "1" are equi).15 F -.25(va)-.25 G .468(lent to).25 F F1(On) +2.968 E F0 5.468(.A)C .468(ll other v)-5.468 F .468(alues are equi)-.25 +F -.25(va)-.25 G .468(lent to).25 F F1(Off)2.968 E F0 5.468(.T)C .468 +(he v)-5.468 F .468(ariables and their def)-.25 F(ault)-.1 E -.25(va)108 +484.8 S(lues are:).25 E F1(bell\255style \(audible\))108 501.6 Q F0 .011 +(Controls what happens when readline w)144 513.6 R .011 +(ants to ring the terminal bell.)-.1 F .01(If set to)5.01 F F1(none)2.51 +E F0 2.51(,r)C .01(eadline ne)-2.51 F -.15(ve)-.25 G(r).15 E .94 +(rings the bell.)144 525.6 R .94(If set to)5.94 F F1(visible)3.44 E F0 +3.44(,r)C .94(eadline uses a visible bell if one is a)-3.44 F -.25(va) +-.2 G 3.44(ilable. If).25 F .94(set to)3.44 F F1(audible)3.44 E F0(,)A +(readline attempts to ring the terminal')144 537.6 Q 2.5(sb)-.55 G(ell.) +-2.5 E F1(bind\255tty\255special\255chars \(On\))108 549.6 Q F0 .056 +(If set to)144 561.6 R F1(On)2.556 E F0 2.556(,r)C .056(eadline attempt\ +s to bind the control characters treated specially by the k)-2.556 F +(ernel')-.1 E 2.555(st)-.55 G(ermi-)-2.555 E(nal dri)144 573.6 Q -.15 +(ve)-.25 G 2.5(rt).15 G 2.5(ot)-2.5 G(heir readline equi)-2.5 E -.25(va) +-.25 G(lents.).25 E F1(blink\255matching\255par)108 585.6 Q(en \(Off\)) +-.18 E F0 .21(If set to)144 597.6 R F1(On)2.71 E F0 2.71(,r)C .21 +(eadline attempts to brie\215y mo)-2.71 F .51 -.15(ve t)-.15 H .21 +(he cursor to an opening parenthesis when a closing).15 F +(parenthesis is inserted.)144 609.6 Q F1(color)108 621.6 Q +(ed\255completion\255pr)-.18 E(e\214x \(Off\))-.18 E F0 .515(If set to) +144 633.6 R F1(On)3.015 E F0 3.015(,w)C .515(hen listing completions, r\ +eadline displays the common pre\214x of the set of possible)-3.015 F +2.935(completions using a dif)144 645.6 R 2.935(ferent color)-.25 F +7.936(.T)-.55 G 2.936(he color de\214nitions are tak)-7.936 F 2.936 +(en from the v)-.1 F 2.936(alue of the)-.25 F F1(LS_COLORS)144 657.6 Q +F0(en)2.5 E(vironment v)-.4 E(ariable.)-.25 E F1(color)108 669.6 Q +(ed\255stats \(Off\))-.18 E F0 1.58(If set to)144 681.6 R F1(On)4.08 E +F0 4.08(,r)C 1.579(eadline displays possible completions using dif)-4.08 +F 1.579(ferent colors to indicate their \214le)-.25 F 2.5(type. The)144 +693.6 R(color de\214nitions are tak)2.5 E(en from the v)-.1 E +(alue of the)-.25 E F1(LS_COLORS)2.5 E F0(en)2.5 E(vironment v)-.4 E +(ariable.)-.25 E F1(comment\255begin \(`)108 705.6 Q(`#')-.63 E('\))-.63 +E F0 .884(The string that is inserted when the readline)144 717.6 R F1 +(insert\255comment)3.385 E F0 .885(command is e)3.385 F -.15(xe)-.15 G +3.385(cuted. This).15 F(com-)3.385 E(mand is bound to)144 729.6 Q F1 +(M\255#)2.5 E F0(in emacs mode and to)2.5 E F1(#)2.5 E F0 +(in vi command mode.)2.5 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 +E(41)190.395 E 0 Cg EP +%%Page: 42 42 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(completion\255display\255width \(\2551\))108 84 Q F0 1.453(The numbe\ +r of screen columns used to display possible matches when performing co\ +mpletion.)144 96 R .193(The v)144 108 R .193(alue is ignored if it is l\ +ess than 0 or greater than the terminal screen width.)-.25 F 2.694(Av) +5.194 G .194(alue of 0 will)-2.944 F +(cause matches to be displayed one per line.)144 120 Q(The def)5 E +(ault v)-.1 E(alue is \2551.)-.25 E F1(completion\255ignor)108 132 Q +(e\255case \(Off\))-.18 E F0(If set to)144 144 Q F1(On)2.5 E F0 2.5(,r)C +(eadline performs \214lename matching and completion in a case\255insen\ +siti)-2.5 E .3 -.15(ve f)-.25 H(ashion.).05 E F1 +(completion\255map\255case \(Off\))108 156 Q F0 .094(If set to)144 168 R +F1(On)2.593 E F0 2.593(,a)C(nd)-2.593 E F1(completion\255ignor)2.593 E +(e\255case)-.18 E F0 .093(is enabled, readline treats h)2.593 F .093 +(yphens \()-.05 F/F2 10/Times-Italic@0 SFA F0 2.593(\)a)C .093 +(nd underscores)-2.593 F(\()144 180 Q F2(_)A F0 2.5(\)a)C 2.5(se)-2.5 G +(qui)-2.5 E -.25(va)-.25 G(lent when performing case\255insensiti).25 E +.3 -.15(ve \214)-.25 H(lename matching and completion.).15 E F1 +(completion\255pr)108 192 Q(e\214x\255display\255length \(0\))-.18 E F0 +.829(The length in characters of the common pre\214x of a list of possi\ +ble completions that is displayed)144 204 R 1.275 +(without modi\214cation.)144 216 R 1.275(When set to a v)6.275 F 1.274 +(alue greater than zero, common pre\214x)-.25 F 1.274 +(es longer than this)-.15 F -.25(va)144 228 S(lue are replaced with an \ +ellipsis when displaying possible completions.).25 E F1 +(completion\255query\255items \(100\))108 240 Q F0 .529 +(This determines when the user is queried about vie)144 252 R .53 +(wing the number of possible completions gen-)-.25 F .561(erated by the) +144 264 R F1(possible\255completions)3.061 E F0 3.061(command. It)3.061 +F .561(may be set to an)3.061 F 3.06(yi)-.15 G(nte)-3.06 E .56(ger v) +-.15 F .56(alue greater than or)-.25 F .782(equal to zero.)144 276 R +.783(If the number of possible completions is greater than or equal to \ +the v)5.782 F .783(alue of this)-.25 F -.25(va)144 288 S .368 +(riable, readline will ask whether or not the user wishes to vie).25 F +2.867(wt)-.25 G .367(hem; otherwise the)-2.867 F 2.867(ya)-.15 G .367 +(re simply)-2.867 F(listed on the terminal.)144 300 Q F1(con)108 312 Q +-.1(ve)-.4 G(rt\255meta \(On\)).1 E F0 .612(If set to)144 324 R F1(On) +3.112 E F0 3.112(,r)C .613(eadline will con)-3.112 F -.15(ve)-.4 G .613 +(rt characters with the eighth bit set to an ASCII k).15 F .913 -.15 +(ey s)-.1 H .613(equence by).15 F .541 +(stripping the eighth bit and pre\214xing an escape character \(in ef) +144 336 R .541(fect, using escape as the)-.25 F F2 .541(meta pr)3.041 F +(e-)-.37 E<8c78>144 348 Q F0 2.5(\). The)B(def)2.5 E(ault is)-.1 E F2 +(On)2.5 E F0 2.5(,b)C(ut readline will set it to)-2.7 E F2(Of)2.5 E(f) +-.18 E F0(if the locale contains eight-bit characters.)2.5 E F1 +(disable\255completion \(Off\))108 360 Q F0 .038(If set to)144 372 R F1 +(On)2.538 E F0 2.538(,r)C .038(eadline will inhibit w)-2.538 F .038 +(ord completion.)-.1 F .038 +(Completion characters will be inserted into the)5.038 F(line as if the) +144 384 Q 2.5(yh)-.15 G(ad been mapped to)-2.5 E F1(self-insert)2.5 E F0 +(.)A F1(echo\255contr)108 396 Q(ol\255characters \(On\))-.18 E F0 1.211 +(When set to)144 408 R F1(On)3.711 E F0 3.711(,o)C 3.711(no)-3.711 G +1.211(perating systems that indicate the)-3.711 F 3.711(ys)-.15 G 1.21 +(upport it, readline echoes a character)-3.711 F +(corresponding to a signal generated from the k)144 420 Q -.15(ey)-.1 G +(board.).15 E F1(editing\255mode \(emacs\))108 432 Q F0 .141 +(Controls whether readline be)144 444 R .141(gins with a set of k)-.15 F +.441 -.15(ey b)-.1 H .141(indings similar to).15 F F2(Emacs)2.642 E F0 +(or)2.642 E F2(vi)2.642 E F0(.)A F1(editing\255mode)5.142 E F0 +(can be set to either)144 456 Q F1(emacs)2.5 E F0(or)2.5 E F1(vi)2.5 E +F0(.)A F1(emacs\255mode\255string \(@\))108 468 Q F0 .518(If the)144 480 +R F2(show\255mode\255in\255pr)3.018 E(ompt)-.45 E F0 -.25(va)3.018 G +.517(riable is enabled, this string is displayed immediately before the) +.25 F .622 +(last line of the primary prompt when emacs editing mode is acti)144 492 +R -.15(ve)-.25 G 5.622(.T).15 G .622(he v)-5.622 F .622(alue is e)-.25 F +.622(xpanded lik)-.15 F 3.122(ea)-.1 G -.1(ke)144 504 S 3.34(yb)-.05 G +.839(inding, so the standard set of meta- and control pre\214x)-3.34 F +.839(es and backslash escape sequences is)-.15 F -.2(av)144 516 S 2.798 +(ailable. Use)-.05 F .298(the \\1 and \\2 escapes to be)2.798 F .298 +(gin and end sequences of non-printing characters, which)-.15 F +(can be used to embed a terminal control sequence into the mode string.) +144 528 Q F1(enable\255brack)108 540 Q(eted\255paste \(On\))-.1 E F0 +1.222(When set to)144 552 R F1(On)3.721 E F0 3.721(,r)C 1.221 +(eadline will con\214gure the terminal in a w)-3.721 F 1.221 +(ay that will enable it to insert each)-.1 F .353 +(paste into the editing b)144 564 R(uf)-.2 E .353(fer as a single strin\ +g of characters, instead of treating each character as if)-.25 F .544 +(it had been read from the k)144 576 R -.15(ey)-.1 G 3.043(board. This) +.15 F .543(can pre)3.043 F -.15(ve)-.25 G .543 +(nt pasted characters from being interpreted as).15 F(editing commands.) +144 588 Q F1(enable\255k)108 600 Q(eypad \(Off\))-.1 E F0 .892 +(When set to)144 612 R F1(On)3.393 E F0 3.393(,r)C .893 +(eadline will try to enable the application k)-3.393 F -.15(ey)-.1 G +.893(pad when it is called.).15 F .893(Some sys-)5.893 F +(tems need this to enable the arro)144 624 Q 2.5(wk)-.25 G -.15(ey)-2.6 +G(s.).15 E F1(enable\255meta\255k)108 636 Q(ey \(On\))-.1 E F0 .64 +(When set to)144 648 R F1(On)3.14 E F0 3.14(,r)C .64 +(eadline will try to enable an)-3.14 F 3.14(ym)-.15 G .64 +(eta modi\214er k)-3.14 F .94 -.15(ey t)-.1 H .64 +(he terminal claims to support).15 F(when it is called.)144 660 Q +(On man)5 E 2.5(yt)-.15 G(erminals, the meta k)-2.5 E .3 -.15(ey i)-.1 H +2.5(su).15 G(sed to send eight-bit characters.)-2.5 E F1 +(expand\255tilde \(Off\))108 672 Q F0(If set to)144 684 Q F1(On)2.5 E F0 +2.5(,t)C(ilde e)-2.5 E(xpansion is performed when readline attempts w) +-.15 E(ord completion.)-.1 E F1(history\255pr)108 696 Q(eser)-.18 E -.1 +(ve)-.1 G(\255point \(Off\)).1 E F0 .552(If set to)144 708 R F1(On)3.052 +E F0 3.052(,t)C .552(he history code attempts to place point at the sam\ +e location on each history line re-)-3.052 F(trie)144 720 Q -.15(ve)-.25 +G 2.5(dw).15 G(ith)-2.5 E F1(pr)2.5 E -.15(ev)-.18 G(ious-history).15 E +F0(or)2.5 E F1(next-history)2.5 E F0(.)A(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(42)190.395 E 0 Cg EP +%%Page: 43 43 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(history\255size \(unset\))108 84 Q F0 .949 +(Set the maximum number of history entries sa)144 96 R -.15(ve)-.2 G +3.448(di).15 G 3.448(nt)-3.448 G .948(he history list.)-3.448 F .948 +(If set to zero, an)5.948 F 3.448(ye)-.15 G(xisting)-3.598 E .482 +(history entries are deleted and no ne)144 108 R 2.982(we)-.25 G .483 +(ntries are sa)-2.982 F -.15(ve)-.2 G 2.983(d. If).15 F .483(set to a v) +2.983 F .483(alue less than zero, the num-)-.25 F .278 +(ber of history entries is not limited.)144 120 R .277(By def)5.278 F +.277(ault, the number of history entries is set to the v)-.1 F .277 +(alue of)-.25 F(the)144 132 Q F1(HISTSIZE)3.41 E F0 .91(shell v)3.41 F +3.41(ariable. If)-.25 F .911(an attempt is made to set)3.41 F/F2 10 +/Times-Italic@0 SF(history\255size)3.411 E F0 .911(to a non-numeric v) +3.411 F(alue,)-.25 E +(the maximum number of history entries will be set to 500.)144 144 Q F1 +(horizontal\255scr)108 156 Q(oll\255mode \(Off\))-.18 E F0 .449 +(When set to)144 168 R F1(On)2.949 E F0 2.949(,m)C(ak)-2.949 E .448 +(es readline use a single line for display)-.1 F 2.948(,s)-.65 G .448 +(crolling the input horizontally on a)-2.948 F 1.194(single screen line\ + when it becomes longer than the screen width rather than wrapping to a\ + ne)144 180 R(w)-.25 E 2.5(line. This)144 192 R +(setting is automatically enabled for terminals of height 1.)2.5 E F1 +(input\255meta \(Off\))108 204 Q F0 1.062(If set to)144 216 R F1(On) +3.562 E F0 3.562(,r)C 1.061(eadline will enable eight-bit input \(that \ +is, it will not strip the eighth bit from the)-3.562 F .335 +(characters it reads\), re)144 228 R -.05(ga)-.15 G .335 +(rdless of what the terminal claims it can support.).05 F .336(The name) +5.336 F F1(meta\255\215ag)2.836 E F0(is)2.836 E 2.865(as)144 240 S(ynon) +-2.865 E .365(ym for this v)-.15 F 2.864(ariable. The)-.25 F(def)2.864 E +.364(ault is)-.1 F F2(Of)2.864 E(f)-.18 E F0 2.864(,b)C .364 +(ut readline will set it to)-3.064 F F2(On)2.864 E F0 .364 +(if the locale contains)2.864 F(eight-bit characters.)144 252 Q F1 +(isear)108 264 Q(ch\255terminators \(`)-.18 E(`C\255[C\255J')-.63 E('\)) +-.63 E F0 .439(The string of characters that should terminate an increm\ +ental search without subsequently e)144 276 R -.15(xe)-.15 G(cut-).15 E +.935(ing the character as a command.)144 288 R .935(If this v)5.935 F +.935(ariable has not been gi)-.25 F -.15(ve)-.25 G 3.434(nav).15 G .934 +(alue, the characters)-3.684 F F2(ESC)3.434 E F0(and)144 300 Q F2 +(C\255J)2.5 E F0(will terminate an incremental search.)2.5 E F1 -.1(ke) +108 312 S(ymap \(emacs\)).1 E F0 2.02(Set the current readline k)144 324 +R -.15(ey)-.1 G 4.521(map. The).15 F 2.021(set of v)4.521 F 2.021 +(alid k)-.25 F -.15(ey)-.1 G 2.021(map names is).15 F F2 2.021 +(emacs, emacs\255standar)4.521 F(d,)-.37 E .042 +(emacs\255meta, emacs\255ctlx, vi, vi\255command)144 336 R F0 2.542(,a)C +(nd)-2.542 E F2(vi\255insert)2.832 E F0(.).68 E F2(vi)5.042 E F0 .042 +(is equi)2.542 F -.25(va)-.25 G .042(lent to).25 F F2(vi\255command) +2.541 E F0(;)A F2(emacs)2.541 E F0 .448(is equi)144 348 R -.25(va)-.25 G +.448(lent to).25 F F2(emacs\255standar)2.948 E(d)-.37 E F0 5.448(.T)C +.448(he def)-5.448 F .448(ault v)-.1 F .449(alue is)-.25 F F2(emacs) +3.139 E F0 2.949(;t).27 G .449(he v)-2.949 F .449(alue of)-.25 F F1 +(editing\255mode)2.949 E F0 .449(also af-)2.949 F(fects the def)144 360 +Q(ault k)-.1 E -.15(ey)-.1 G(map.).15 E F1 -.1(ke)108 372 S +(yseq\255timeout \(500\)).1 E F0 .368(Speci\214es the duration)144 384 R +F2 -.37(re)2.867 G(adline).37 E F0 .367(will w)2.867 F .367 +(ait for a character when reading an ambiguous k)-.1 F .667 -.15(ey s) +-.1 H(equence).15 E .524(\(one that can form a complete k)144 396 R .824 +-.15(ey s)-.1 H .524(equence using the input read so f).15 F(ar)-.1 E +3.025(,o)-.4 G 3.025(rc)-3.025 G .525(an tak)-3.025 F 3.025(ea)-.1 G +.525(dditional in-)-3.025 F .807(put to complete a longer k)144 408 R +1.106 -.15(ey s)-.1 H 3.306(equence\). If).15 F .806(no input is recei) +3.306 F -.15(ve)-.25 G 3.306(dw).15 G .806(ithin the timeout,)-3.306 F +F2 -.37(re)3.306 G(adline).37 E F0(will)3.306 E .906(use the shorter b) +144 420 R .907(ut complete k)-.2 F 1.207 -.15(ey s)-.1 H 3.407 +(equence. The).15 F -.25(va)3.407 G .907 +(lue is speci\214ed in milliseconds, so a v).25 F .907(alue of)-.25 F +.05(1000 means that)144 432 R F2 -.37(re)2.55 G(adline).37 E F0 .05 +(will w)2.55 F .05(ait one second for additional input.)-.1 F .05 +(If this v)5.05 F .05(ariable is set to a v)-.25 F(alue)-.25 E .051 +(less than or equal to zero, or to a non-numeric v)144 444 R(alue,)-.25 +E F2 -.37(re)2.551 G(adline).37 E F0 .051(will w)2.551 F .051 +(ait until another k)-.1 F .352 -.15(ey i)-.1 H 2.552(sp).15 G(ressed) +-2.552 E(to decide which k)144 456 Q .3 -.15(ey s)-.1 H +(equence to complete.).15 E F1(mark\255dir)108 468 Q(ectories \(On\)) +-.18 E F0(If set to)144 480 Q F1(On)2.5 E F0 2.5(,c)C +(ompleted directory names ha)-2.5 E .3 -.15(ve a s)-.2 H(lash appended.) +.15 E F1(mark\255modi\214ed\255lines \(Off\))108 492 Q F0(If set to)144 +504 Q F1(On)2.5 E F0 2.5(,h)C(istory lines that ha)-2.5 E .3 -.15(ve b) +-.2 H(een modi\214ed are displayed with a preceding asterisk \().15 E F1 +(*)A F0(\).)A F1(mark\255symlink)108 516 Q(ed\255dir)-.1 E +(ectories \(Off\))-.18 E F0 .175(If set to)144 528 R F1(On)2.675 E F0 +2.675(,c)C .175 +(ompleted names which are symbolic links to directories ha)-2.675 F .475 +-.15(ve a s)-.2 H .175(lash appended \(sub-).15 F(ject to the v)144 540 +Q(alue of)-.25 E F1(mark\255dir)2.5 E(ectories)-.18 E F0(\).)A F1 +(match\255hidden\255\214les \(On\))108 552 Q F0 .192(This v)144 564 R +.192(ariable, when set to)-.25 F F1(On)2.692 E F0 2.692(,c)C .192 +(auses readline to match \214les whose names be)-2.692 F .193 +(gin with a `.)-.15 F 2.693('\()-.7 G(hidden)-2.693 E .457 +(\214les\) when performing \214lename completion.)144 576 R .456 +(If set to)5.456 F F1(Off)2.956 E F0 2.956(,t)C .456(he leading `.) +-2.956 F 2.956('m)-.7 G .456(ust be supplied by the)-2.956 F +(user in the \214lename to be completed.)144 588 Q F1 +(menu\255complete\255display\255pr)108 600 Q(e\214x \(Off\))-.18 E F0 +1.585(If set to)144 612 R F1(On)4.085 E F0 4.085(,m)C 1.585(enu complet\ +ion displays the common pre\214x of the list of possible completions) +-4.085 F(\(which may be empty\) before c)144 624 Q +(ycling through the list.)-.15 E F1(output\255meta \(Off\))108 636 Q F0 +.507(If set to)144 648 R F1(On)3.007 E F0 3.007(,r)C .507(eadline will \ +display characters with the eighth bit set directly rather than as a me\ +ta-)-3.007 F(pre\214x)144 660 Q .884(ed escape sequence.)-.15 F .884 +(The def)5.884 F .884(ault is)-.1 F F2(Of)3.384 E(f)-.18 E F0 3.384(,b)C +.884(ut readline will set it to)-3.584 F F2(On)3.384 E F0 .885 +(if the locale contains)3.384 F(eight-bit characters.)144 672 Q F1 +(page\255completions \(On\))108 684 Q F0 .809(If set to)144 696 R F1(On) +3.308 E F0 3.308(,r)C .808(eadline uses an internal)-3.308 F F2(mor) +3.308 E(e)-.37 E F0(-lik)A 3.308(ep)-.1 G .808 +(ager to display a screenful of possible comple-)-3.308 F +(tions at a time.)144 708 Q(GNU Bash 5.1)72 768 Q(2020 October 29) +141.235 E(43)190.395 E 0 Cg EP +%%Page: 44 44 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(print\255completions\255horizontally \(Off\))108 84 Q F0 .227 +(If set to)144 96 R F1(On)2.727 E F0 2.727(,r)C .227(eadline will displ\ +ay completions with matches sorted horizontally in alphabetical or) +-2.727 F(-)-.2 E(der)144 108 Q 2.5(,r)-.4 G(ather than do)-2.5 E +(wn the screen.)-.25 E F1 -2.29 -.18(re v)108 120 T +(ert\255all\255at\255newline \(Off\)).08 E F0 .699(If set to)144 132 R +F1(On)3.199 E F0 3.199(,r)C .699 +(eadline will undo all changes to history lines before returning when) +-3.199 F F1(accept\255line)3.198 E F0(is)3.198 E -.15(exe)144 144 S +2.686(cuted. By).15 F(def)2.686 E .186 +(ault, history lines may be modi\214ed and retain indi)-.1 F .186 +(vidual undo lists across calls to)-.25 F F1 -.18(re)144 156 S(adline) +.18 E F0(.)A F1(sho)108 168 Q(w\255all\255if\255ambiguous \(Off\))-.1 E +F0 .304(This alters the def)144 180 R .304(ault beha)-.1 F .304 +(vior of the completion functions.)-.2 F .304(If set to)5.304 F F1(On) +2.804 E F0 2.803(,w)C .303(ords which ha)-2.903 F .603 -.15(ve m)-.2 H +(ore).15 E 1.264(than one possible completion cause the matches to be l\ +isted immediately instead of ringing the)144 192 R(bell.)144 204 Q F1 +(sho)108 216 Q(w\255all\255if\255unmodi\214ed \(Off\))-.1 E F0 5.346 +(This alters the def)144 228 R 5.346(ault beha)-.1 F 5.345 +(vior of the completion functions in a f)-.2 F 5.345(ashion similar to) +-.1 F F1(sho)144 240 Q(w\255all\255if\255ambiguous)-.1 E F0 6.69(.I)C +4.19(fs)-6.69 G 1.691(et to)-4.19 F F1(On)4.191 E F0 4.191(,w)C 1.691 +(ords which ha)-4.291 F 1.991 -.15(ve m)-.2 H 1.691 +(ore than one possible completion).15 F 1.04(without an)144 252 R 3.54 +(yp)-.15 G 1.039 +(ossible partial completion \(the possible completions don')-3.54 F +3.539(ts)-.18 G 1.039(hare a common pre\214x\))-3.539 F(cause the match\ +es to be listed immediately instead of ringing the bell.)144 264 Q F1 +(sho)108 276 Q(w\255mode\255in\255pr)-.1 E(ompt \(Off\))-.18 E F0 1.021 +(If set to)144 288 R F1(On)3.521 E F0 3.521(,a)C 1.022 +(dd a string to the be)-3.521 F 1.022 +(ginning of the prompt indicating the editing mode: emacs, vi)-.15 F +(command, or vi insertion.)144 300 Q(The mode strings are user)5 E +(-settable \(e.g.,)-.2 E/F2 10/Times-Italic@0 SF +(emacs\255mode\255string)2.5 E F0(\).)A F1 +(skip\255completed\255text \(Off\))108 312 Q F0 .095(If set to)144 324 R +F1(On)2.595 E F0 2.595(,t)C .095(his alters the def)-2.595 F .095 +(ault completion beha)-.1 F .094 +(vior when inserting a single match into the line.)-.2 F(It')144 336 Q +2.545(so)-.55 G .045(nly acti)-2.545 F .345 -.15(ve w)-.25 H .046 +(hen performing completion in the middle of a w).15 F 2.546(ord. If)-.1 +F .046(enabled, readline does not)2.546 F 1.394(insert characters from \ +the completion that match characters after point in the w)144 348 R +1.394(ord being com-)-.1 F(pleted, so portions of the w)144 360 Q +(ord follo)-.1 E(wing the cursor are not duplicated.)-.25 E F1 +(vi\255cmd\255mode\255string \(\(cmd\)\))108 372 Q F0 .517(If the)144 +384 R F2(show\255mode\255in\255pr)3.017 E(ompt)-.45 E F0 -.25(va)3.017 G +.518(riable is enabled, this string is displayed immediately before the) +.25 F .475(last line of the primary prompt when vi editing mode is acti) +144 396 R .775 -.15(ve a)-.25 H .475(nd in command mode.).15 F .475 +(The v)5.475 F(alue)-.25 E .33(is e)144 408 R .33(xpanded lik)-.15 F +2.83(eak)-.1 G .63 -.15(ey b)-2.93 H .33 +(inding, so the standard set of meta- and control pre\214x).15 F .33 +(es and backslash es-)-.15 F .245(cape sequences is a)144 420 R -.25(va) +-.2 G 2.745(ilable. Use).25 F .244(the \\1 and \\2 escapes to be)2.745 F +.244(gin and end sequences of non-printing)-.15 F(characters, which can\ + be used to embed a terminal control sequence into the mode string.)144 +432 Q F1(vi\255ins\255mode\255string \(\(ins\)\))108 444 Q F0 .517 +(If the)144 456 R F2(show\255mode\255in\255pr)3.017 E(ompt)-.45 E F0 +-.25(va)3.017 G .518 +(riable is enabled, this string is displayed immediately before the).25 +F .186(last line of the primary prompt when vi editing mode is acti)144 +468 R .486 -.15(ve a)-.25 H .186(nd in insertion mode.).15 F .186(The v) +5.186 F .186(alue is)-.25 F -.15(ex)144 480 S .923(panded lik).15 F +3.423(eak)-.1 G 1.223 -.15(ey b)-3.523 H .924 +(inding, so the standard set of meta- and control pre\214x).15 F .924 +(es and backslash es-)-.15 F .245(cape sequences is a)144 492 R -.25(va) +-.2 G 2.745(ilable. Use).25 F .244(the \\1 and \\2 escapes to be)2.745 F +.244(gin and end sequences of non-printing)-.15 F(characters, which can\ + be used to embed a terminal control sequence into the mode string.)144 +504 Q F1(visible\255stats \(Off\))108 516 Q F0 .846(If set to)144 528 R +F1(On)3.346 E F0 3.346(,ac)C .846(haracter denoting a \214le')-3.346 F +3.346(st)-.55 G .846(ype as reported by)-3.346 F F2(stat)3.346 E F0 .846 +(\(2\) is appended to the \214lename)B +(when listing possible completions.)144 540 Q F1 +(Readline Conditional Constructs)87 556.8 Q F0 .05 +(Readline implements a f)108 568.8 R .05(acility similar in spirit to t\ +he conditional compilation features of the C preprocessor)-.1 F .096 +(which allo)108 580.8 R .096(ws k)-.25 F .396 -.15(ey b)-.1 H .096 +(indings and v).15 F .096 +(ariable settings to be performed as the result of tests.)-.25 F .097 +(There are four parser)5.096 F(directi)108 592.8 Q -.15(ve)-.25 G 2.5 +(su).15 G(sed.)-2.5 E F1($if)108 609.6 Q F0(The)144 609.6 Q F1($if)2.963 +E F0 .463(construct allo)2.963 F .462(ws bindings to be made based on t\ +he editing mode, the terminal being used,)-.25 F +(or the application using readline.)144 621.6 Q(The te)5 E +(xt of the test, after an)-.15 E 2.5(yc)-.15 G(omparison operator)-2.5 E +(,)-.4 E -.15(ex)146.5 633.6 S(tends to the end of the line; unless oth\ +erwise noted, no characters are required to isolate it.).15 E F1(mode) +144 650.4 Q F0(The)180 650.4 Q F1(mode=)3.711 E F0 1.211(form of the) +3.711 F F1($if)3.711 E F0(directi)3.711 E 1.511 -.15(ve i)-.25 H 3.711 +(su).15 G 1.211(sed to test whether readline is in emacs or vi)-3.711 F +3.065(mode. This)180 662.4 R .565(may be used in conjunction with the) +3.065 F F1 .565(set k)3.065 F(eymap)-.1 E F0 .565 +(command, for instance, to)3.065 F .735(set bindings in the)180 674.4 R +F2(emacs\255standar)3.235 E(d)-.37 E F0(and)3.235 E F2(emacs\255ctlx) +3.235 E F0 -.1(ke)3.235 G .735(ymaps only if readline is starting)-.05 F +(out in emacs mode.)180 686.4 Q F1(term)144 703.2 Q F0(The)180 703.2 Q +F1(term=)3.197 E F0 .696 +(form may be used to include terminal-speci\214c k)3.197 F .996 -.15 +(ey b)-.1 H .696(indings, perhaps to bind).15 F .654(the k)180 715.2 R +.954 -.15(ey s)-.1 H .654(equences output by the terminal').15 F 3.154 +(sf)-.55 G .654(unction k)-3.154 F -.15(ey)-.1 G 3.154(s. The).15 F -.1 +(wo)3.154 G .654(rd on the right side of).1 F(the)180 727.2 Q F1(=)3.232 +E F0 .732(is tested ag)3.232 F .732(ainst both the full name of the ter\ +minal and the portion of the terminal)-.05 F(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(44)190.395 E 0 Cg EP +%%Page: 45 45 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E +(name before the \214rst)180 84 Q/F1 10/Times-Bold@0 SF2.5 E F0 5 +(.T)C(his allo)-5 E(ws)-.25 E/F2 10/Times-Italic@0 SF(sun)2.84 E F0 +(to match both)2.74 E F2(sun)2.84 E F0(and)2.74 E F2(sun\255cmd)2.84 E +F0 2.5(,f).77 G(or instance.)-2.5 E F1 -.1(ve)144 100.8 S(rsion).1 E F0 +(The)180 112.8 Q F1 -.1(ve)3.108 G(rsion).1 E F0 .608 +(test may be used to perform comparisons ag)3.108 F .609 +(ainst speci\214c readline v)-.05 F(ersions.)-.15 E(The)180 124.8 Q F1 +-.1(ve)2.772 G(rsion).1 E F0 -.15(ex)2.772 G .272 +(pands to the current readline v).15 F 2.771(ersion. The)-.15 F .271 +(set of comparison operators in-)2.771 F(cludes)180 136.8 Q F1(=)3.063 E +F0 3.063(,\()C(and)-3.063 E F1(==)3.063 E F0(\),)A F1(!=)3.063 E F0(,)A +F1(<=)3.063 E F0(,)A F1(>=)3.063 E F0(,)A F1(<)3.063 E F0 3.063(,a)C(nd) +-3.063 E F1(>)3.064 E F0 5.564(.T)C .564(he v)-5.564 F .564 +(ersion number supplied on the right side)-.15 F .318 +(of the operator consists of a major v)180 148.8 R .318(ersion number) +-.15 F 2.818(,a)-.4 G 2.818(no)-2.818 G .318 +(ptional decimal point, and an op-)-2.818 F .1(tional minor v)180 160.8 +R .1(ersion \(e.g.,)-.15 F F1(7.1)2.6 E F0 .1(\). If the minor v)B .101 +(ersion is omitted, it is assumed to be)-.15 F F1(0)2.601 E F0 5.101(.T) +C(he)-5.101 E .06(operator may be separated from the string)180 172.8 R +F1 -.1(ve)2.56 G(rsion).1 E F0 .06(and from the v)2.56 F .06 +(ersion number ar)-.15 F(gument)-.18 E(by whitespace.)180 184.8 Q F1 +(application)144 201.6 Q F0(The)180 213.6 Q F1(application)3.003 E F0 +.503(construct is used to include application-speci\214c settings.)3.003 +F .503(Each program)5.503 F .114(using the readline library sets the)180 +225.6 R F2 .114(application name)2.614 F F0 2.614(,a)C .114 +(nd an initialization \214le can test for a)-2.614 F .5(particular v)180 +237.6 R 3(alue. This)-.25 F .501(could be used to bind k)3 F .801 -.15 +(ey s)-.1 H .501(equences to functions useful for a spe-).15 F .397 +(ci\214c program.)180 249.6 R -.15(Fo)5.397 G 2.896(ri).15 G .396 +(nstance, the follo)-2.896 F .396(wing command adds a k)-.25 F .696 -.15 +(ey s)-.1 H .396(equence that quotes the).15 F(current or pre)180 261.6 +Q(vious w)-.25 E(ord in)-.1 E F1(bash)2.5 E F0(:)A F1($if)180 285.6 Q F0 +(Bash)2.5 E 2.5(#Q)180 297.6 S(uote the current or pre)-2.5 E(vious w) +-.25 E(ord)-.1 E("\\C\255xq": "\\eb\\"\\ef\\"")180 309.6 Q F1($endif)180 +321.6 Q F2(variable)144 338.4 Q F0(The)180 350.4 Q F2(variable)3.776 E +F0 1.276(construct pro)3.776 F 1.276 +(vides simple equality tests for readline v)-.15 F 1.277(ariables and v) +-.25 F(alues.)-.25 E .08(The permitted comparison operators are)180 +362.4 R F2(=)2.579 E F0(,)A F2(==)2.579 E F0 2.579(,a)C(nd)-2.579 E F2 +(!=)2.579 E F0 5.079(.T)C .079(he v)-5.079 F .079 +(ariable name must be sepa-)-.25 F .98(rated from the comparison operat\ +or by whitespace; the operator may be separated from)180 374.4 R .13 +(the v)180 386.4 R .13(alue on the right hand side by whitespace.)-.25 F +.129(Both string and boolean v)5.129 F .129(ariables may be)-.25 F +(tested. Boolean v)180 398.4 Q(ariables must be tested ag)-.25 E +(ainst the v)-.05 E(alues)-.25 E F2(on)2.5 E F0(and)2.5 E F2(of)2.5 E(f) +-.18 E F0(.)A F1($endif)108 415.2 Q F0(This command, as seen in the pre) +144 415.2 Q(vious e)-.25 E(xample, terminates an)-.15 E F1($if)2.5 E F0 +(command.)2.5 E F1($else)108 432 Q F0(Commands in this branch of the)144 +432 Q F1($if)2.5 E F0(directi)2.5 E .3 -.15(ve a)-.25 H(re e).15 E -.15 +(xe)-.15 G(cuted if the test f).15 E(ails.)-.1 E F1($include)108 448.8 Q +F0 .356(This directi)144 460.8 R .656 -.15(ve t)-.25 H(ak).15 E .356 +(es a single \214lename as an ar)-.1 F .357 +(gument and reads commands and bindings from that)-.18 F 2.5(\214le. F) +144 472.8 R(or e)-.15 E(xample, the follo)-.15 E(wing directi)-.25 E .3 +-.15(ve w)-.25 H(ould read).05 E F2(/etc/inputr)2.5 E(c)-.37 E F0(:)A F1 +($include)144 496.8 Q F2(/etc/inputr)5.833 E(c)-.37 E F1(Sear)87 513.6 Q +(ching)-.18 E F0 .835(Readline pro)108 525.6 R .835 +(vides commands for searching through the command history \(see)-.15 F +/F3 9/Times-Bold@0 SF(HIST)3.334 E(OR)-.162 E(Y)-.315 E F0(belo)3.084 E +.834(w\) for lines)-.25 F(containing a speci\214ed string.)108 537.6 Q +(There are tw)5 E 2.5(os)-.1 G(earch modes:)-2.5 E F2(incr)2.51 E +(emental)-.37 E F0(and)3.01 E F2(non-incr)2.86 E(emental)-.37 E F0(.).51 +E .697(Incremental searches be)108 554.4 R .697 +(gin before the user has \214nished typing the search string.)-.15 F +.698(As each character of the)5.698 F .113 +(search string is typed, readline displays the ne)108 566.4 R .112 +(xt entry from the history matching the string typed so f)-.15 F(ar)-.1 +E 5.112(.A)-.55 G(n)-5.112 E .542 +(incremental search requires only as man)108 578.4 R 3.042(yc)-.15 G +.542(haracters as needed to \214nd the desired history entry)-3.042 F +5.542(.T)-.65 G .542(he char)-5.542 F(-)-.2 E .224 +(acters present in the v)108 590.4 R .224(alue of the)-.25 F F1(isear) +2.724 E(ch-terminators)-.18 E F0 -.25(va)2.724 G .224 +(riable are used to terminate an incremental search.).25 F .66 +(If that v)108 602.4 R .66(ariable has not been assigned a v)-.25 F .66 +(alue the Escape and Control-J characters will terminate an incre-)-.25 +F .097(mental search.)108 614.4 R .096(Control-G will abort an incremen\ +tal search and restore the original line.)5.097 F .096 +(When the search is)5.096 F(terminated, the history entry containing th\ +e search string becomes the current line.)108 626.4 Q 2.938 -.8(To \214) +108 643.2 T 1.339(nd other matching entries in the history list, type C\ +ontrol-S or Control-R as appropriate.).8 F 1.339(This will)6.339 F .675 +(search backw)108 655.2 R .675(ard or forw)-.1 F .675 +(ard in the history for the ne)-.1 F .674 +(xt entry matching the search string typed so f)-.15 F(ar)-.1 E 5.674 +(.A)-.55 G -.15(ny)-5.674 G .174(other k)108 667.2 R .474 -.15(ey s)-.1 +H .174 +(equence bound to a readline command will terminate the search and e).15 +F -.15(xe)-.15 G .175(cute that command.).15 F -.15(Fo)5.175 G(r).15 E +.541(instance, a)108 679.2 R F2(ne)3.041 E(wline)-.15 E F0 .541 +(will terminate the search and accept the line, thereby e)3.041 F -.15 +(xe)-.15 G .54(cuting the command from the).15 F(history list.)108 691.2 +Q .653(Readline remembers the last incremental search string.)108 708 R +.653(If tw)5.653 F 3.153(oC)-.1 G .653(ontrol-Rs are typed without an) +-3.153 F 3.153(yi)-.15 G(nterv)-3.153 E(en-)-.15 E +(ing characters de\214ning a ne)108 720 Q 2.5(ws)-.25 G +(earch string, an)-2.5 E 2.5(yr)-.15 G(emembered search string is used.) +-2.5 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(45)190.395 E 0 Cg +EP +%%Page: 46 46 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .567(Non-incremen\ +tal searches read the entire search string before starting to search fo\ +r matching history lines.)108 84 R(The search string may be typed by th\ +e user or be part of the contents of the current line.)108 96 Q/F1 10 +/Times-Bold@0 SF(Readline Command Names)87 112.8 Q F0 1.391(The follo) +108 124.8 R 1.391 +(wing is a list of the names of the commands and the def)-.25 F 1.391 +(ault k)-.1 F 1.691 -.15(ey s)-.1 H 1.391(equences to which the).15 F +3.892(ya)-.15 G(re)-3.892 E 2.622(bound. Command)108 136.8 R .122 +(names without an accompan)2.622 F .122(ying k)-.15 F .421 -.15(ey s)-.1 +H .121(equence are unbound by def).15 F 2.621(ault. In)-.1 F .121 +(the follo)2.621 F(wing)-.25 E(descriptions,)108 148.8 Q/F2 10 +/Times-Italic@0 SF(point)3.41 E F0 .91 +(refers to the current cursor position, and)3.41 F F2(mark)3.411 E F0 +.911(refers to a cursor position sa)3.411 F -.15(ve)-.2 G 3.411(db).15 G +3.411(yt)-3.411 G(he)-3.411 E F1(set\255mark)108 160.8 Q F0 2.5 +(command. The)2.5 F(te)2.5 E +(xt between the point and mark is referred to as the)-.15 E F2 -.37(re) +2.5 G(gion)-.03 E F0(.)A F1(Commands f)87 177.6 Q(or Mo)-.25 E(ving)-.1 +E(beginning\255of\255line \(C\255a\))108 189.6 Q F0(Mo)144 201.6 Q .3 +-.15(ve t)-.15 H 2.5(ot).15 G(he start of the current line.)-2.5 E F1 +(end\255of\255line \(C\255e\))108 213.6 Q F0(Mo)144 225.6 Q .3 -.15 +(ve t)-.15 H 2.5(ot).15 G(he end of the line.)-2.5 E F1 -.25(fo)108 +237.6 S(rward\255char \(C\255f\)).25 E F0(Mo)144 249.6 Q .3 -.15(ve f) +-.15 H(orw).15 E(ard a character)-.1 E(.)-.55 E F1 +(backward\255char \(C\255b\))108 261.6 Q F0(Mo)144 273.6 Q .3 -.15(ve b) +-.15 H(ack a character).15 E(.)-.55 E F1 -.25(fo)108 285.6 S(rward\255w) +.25 E(ord \(M\255f\))-.1 E F0(Mo)144 297.6 Q .823 -.15(ve f)-.15 H(orw) +.15 E .523(ard to the end of the ne)-.1 F .523(xt w)-.15 F 3.023(ord. W) +-.1 F .522(ords are composed of alphanumeric characters \(let-)-.8 F +(ters and digits\).)144 309.6 Q F1(backward\255w)108 321.6 Q +(ord \(M\255b\))-.1 E F0(Mo)144 333.6 Q 1.71 -.15(ve b)-.15 H 1.41 +(ack to the start of the current or pre).15 F 1.41(vious w)-.25 F 3.91 +(ord. W)-.1 F 1.41(ords are composed of alphanumeric)-.8 F +(characters \(letters and digits\).)144 345.6 Q F1(shell\255f)108 357.6 +Q(orward\255w)-.25 E(ord)-.1 E F0(Mo)144 369.6 Q .784 -.15(ve f)-.15 H +(orw).15 E .484(ard to the end of the ne)-.1 F .484(xt w)-.15 F 2.984 +(ord. W)-.1 F .484(ords are delimited by non-quoted shell metacharac-) +-.8 F(ters.)144 381.6 Q F1(shell\255backward\255w)108 393.6 Q(ord)-.1 E +F0(Mo)144 405.6 Q .908 -.15(ve b)-.15 H .609 +(ack to the start of the current or pre).15 F .609(vious w)-.25 F 3.109 +(ord. W)-.1 F .609(ords are delimited by non-quoted shell)-.8 F +(metacharacters.)144 417.6 Q F1(pr)108 429.6 Q -.15(ev)-.18 G +(ious\255scr).15 E(een\255line)-.18 E F0 .891(Attempt to mo)144 441.6 R +1.191 -.15(ve p)-.15 H .891(oint to the same ph).15 F .891 +(ysical screen column on the pre)-.05 F .89(vious ph)-.25 F .89 +(ysical screen line.)-.05 F .87(This will not ha)144 453.6 R 1.17 -.15 +(ve t)-.2 H .87(he desired ef).15 F .87 +(fect if the current Readline line does not tak)-.25 F 3.37(eu)-.1 G +3.37(pm)-3.37 G .87(ore than one)-3.37 F(ph)144 465.6 Q(ysical line or \ +if point is not greater than the length of the prompt plus the screen w\ +idth.)-.05 E F1(next\255scr)108 477.6 Q(een\255line)-.18 E F0 .638 +(Attempt to mo)144 489.6 R .938 -.15(ve p)-.15 H .638 +(oint to the same ph).15 F .637(ysical screen column on the ne)-.05 F +.637(xt ph)-.15 F .637(ysical screen line. This)-.05 F .008(will not ha) +144 501.6 R .309 -.15(ve t)-.2 H .009(he desired ef).15 F .009 +(fect if the current Readline line does not tak)-.25 F 2.509(eu)-.1 G +2.509(pm)-2.509 G .009(ore than one ph)-2.509 F(ysical)-.05 E .772(line\ + or if the length of the current Readline line is not greater than the \ +length of the prompt plus)144 513.6 R(the screen width.)144 525.6 Q F1 +(clear\255display \(M\255C\255l\))108 537.6 Q F0 1.498 +(Clear the screen and, if possible, the terminal')144 549.6 R 3.999(ss) +-.55 G 1.499(crollback b)-3.999 F(uf)-.2 E(fer)-.25 E 3.999(,t)-.4 G +1.499(hen redra)-3.999 F 3.999(wt)-.15 G 1.499(he current line,)-3.999 F +(lea)144 561.6 Q(ving the current line at the top of the screen.)-.2 E +F1(clear\255scr)108 573.6 Q(een \(C\255l\))-.18 E F0 1.36 +(Clear the screen, then redra)144 585.6 R 3.86(wt)-.15 G 1.36 +(he current line, lea)-3.86 F 1.36 +(ving the current line at the top of the screen.)-.2 F -.4(Wi)144 597.6 +S(th an ar).4 E +(gument, refresh the current line without clearing the screen.)-.18 E F1 +-.18(re)108 609.6 S(draw\255curr).18 E(ent\255line)-.18 E F0 +(Refresh the current line.)144 621.6 Q F1(Commands f)87 638.4 Q +(or Manipulating the History)-.25 E(accept\255line \(Newline, Retur)108 +650.4 Q(n\))-.15 E F0 .158(Accept the line re)144 662.4 R -.05(ga)-.15 G +.158(rdless of where the cursor is.).05 F .158 +(If this line is non-empty)5.158 F 2.659(,a)-.65 G .159 +(dd it to the history list)-2.659 F .699(according to the state of the) +144 674.4 R/F3 9/Times-Bold@0 SF(HISTCONTR)3.199 E(OL)-.27 E F0 -.25(va) +2.949 G 3.199(riable. If).25 F .699 +(the line is a modi\214ed history line, then)3.199 F +(restore the history line to its original state.)144 686.4 Q F1(pr)108 +698.4 Q -.15(ev)-.18 G(ious\255history \(C\255p\)).15 E F0 +(Fetch the pre)144 710.4 Q(vious command from the history list, mo)-.25 +E(ving back in the list.)-.15 E(GNU Bash 5.1)72 768 Q(2020 October 29) +141.235 E(46)190.395 E 0 Cg EP +%%Page: 47 47 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(next\255history \(C\255n\))108 84 Q F0(Fetch the ne)144 96 Q +(xt command from the history list, mo)-.15 E(ving forw)-.15 E +(ard in the list.)-.1 E F1(beginning\255of\255history \(M\255<\))108 108 +Q F0(Mo)144 120 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G +(he \214rst line in the history)-2.5 E(.)-.65 E F1 +(end\255of\255history \(M\255>\))108 132 Q F0(Mo)144 144 Q .3 -.15(ve t) +-.15 H 2.5(ot).15 G(he end of the input history)-2.5 E 2.5(,i)-.65 G +(.e., the line currently being entered.)-2.5 E F1 -2.29 -.18(re v)108 +156 T(erse\255sear).08 E(ch\255history \(C\255r\))-.18 E F0 1.47 +(Search backw)144 168 R 1.471(ard starting at the current line and mo) +-.1 F 1.471(ving `up' through the history as necessary)-.15 F(.)-.65 E +(This is an incremental search.)144 180 Q F1 -.25(fo)108 192 S +(rward\255sear).25 E(ch\255history \(C\255s\))-.18 E F0 1.132 +(Search forw)144 204 R 1.132(ard starting at the current line and mo)-.1 +F 1.131(ving `do)-.15 F 1.131(wn' through the history as necessary)-.25 +F(.)-.65 E(This is an incremental search.)144 216 Q F1(non\255incr)108 +228 Q(emental\255r)-.18 E -2.3 -.15(ev e)-.18 H(rse\255sear).15 E +(ch\255history \(M\255p\))-.18 E F0 .164(Search backw)144 240 R .164(ar\ +d through the history starting at the current line using a non-incremen\ +tal search for)-.1 F 2.5(as)144 252 S(tring supplied by the user)-2.5 E +(.)-.55 E F1(non\255incr)108 264 Q(emental\255f)-.18 E(orward\255sear) +-.25 E(ch\255history \(M\255n\))-.18 E F0 1.354(Search forw)144 276 R +1.354(ard through the history using a non-incremental search for a stri\ +ng supplied by the)-.1 F(user)144 288 Q(.)-.55 E F1(history\255sear)108 +300 Q(ch\255f)-.18 E(orward)-.25 E F0 .248(Search forw)144 312 R .249(a\ +rd through the history for the string of characters between the start o\ +f the current line)-.1 F(and the point.)144 324 Q +(This is a non-incremental search.)5 E F1(history\255sear)108 336 Q +(ch\255backward)-.18 E F0 .951(Search backw)144 348 R .951(ard through \ +the history for the string of characters between the start of the curre\ +nt)-.1 F(line and the point.)144 360 Q +(This is a non-incremental search.)5 E F1(history\255substring\255sear) +108 372 Q(ch\255backward)-.18 E F0 .95(Search backw)144 384 R .951(ard \ +through the history for the string of characters between the start of t\ +he current)-.1 F .007(line and the current cursor position \(the)144 396 +R/F2 10/Times-Italic@0 SF(point)2.507 E F0 2.507(\). The)B .007 +(search string may match an)2.507 F .006(ywhere in a history)-.15 F 2.5 +(line. This)144 408 R(is a non-incremental search.)2.5 E F1 +(history\255substring\255sear)108 420 Q(ch\255f)-.18 E(orward)-.25 E F0 +.248(Search forw)144 432 R .249(ard through the history for the string \ +of characters between the start of the current line)-.1 F .319 +(and the point.)144 444 R .319(The search string may match an)5.319 F +.319(ywhere in a history line.)-.15 F .318(This is a non-incremental) +5.318 F(search.)144 456 Q F1(yank\255nth\255ar)108 468 Q 2.5(g\()-.1 G +<4dad43ad7929>-2.5 E F0 .622(Insert the \214rst ar)144 480 R .622 +(gument to the pre)-.18 F .622(vious command \(usually the second w)-.25 +F .622(ord on the pre)-.1 F .622(vious line\))-.25 F .773(at point.)144 +492 R -.4(Wi)5.773 G .773(th an ar).4 F(gument)-.18 E F2(n)3.633 E F0 +3.273(,i).24 G .773(nsert the)-3.273 F F2(n)3.273 E F0 .773(th w)B .773 +(ord from the pre)-.1 F .773(vious command \(the w)-.25 F .773 +(ords in the)-.1 F(pre)144 504 Q .291(vious command be)-.25 F .291 +(gin with w)-.15 F .291(ord 0\).)-.1 F 2.791(An)5.291 G -2.25 -.15(eg a) +-2.791 H(ti).15 E .591 -.15(ve a)-.25 H -.18(rg).15 G .291 +(ument inserts the).18 F F2(n)2.791 E F0 .291(th w)B .292 +(ord from the end of)-.1 F .282(the pre)144 516 R .282(vious command.) +-.25 F .282(Once the ar)5.282 F(gument)-.18 E F2(n)2.781 E F0 .281 +(is computed, the ar)2.781 F .281(gument is e)-.18 F .281 +(xtracted as if the "!)-.15 F F2(n)A F0(")A(history e)144 528 Q +(xpansion had been speci\214ed.)-.15 E F1(yank\255last\255ar)108 540 Q +2.5(g\()-.1 G -1.667(M\255. ,)-2.5 F -1.667(M\255_ \))2.5 F F0 1.307 +(Insert the last ar)144 552 R 1.307(gument to the pre)-.18 F 1.307 +(vious command \(the last w)-.25 F 1.308(ord of the pre)-.1 F 1.308 +(vious history entry\).)-.25 F -.4(Wi)144 564 S .204(th a numeric ar).4 +F .204(gument, beha)-.18 F .504 -.15(ve ex)-.2 H .204(actly lik).15 F(e) +-.1 E F1(yank\255nth\255ar)2.704 E(g)-.1 E F0 5.203(.S)C(uccessi)-5.203 +E .503 -.15(ve c)-.25 H .203(alls to).15 F F1(yank\255last\255ar)2.703 E +(g)-.1 E F0(mo)144 576 Q .806 -.15(ve b)-.15 H .507 +(ack through the history list, inserting the last w).15 F .507 +(ord \(or the w)-.1 F .507(ord speci\214ed by the ar)-.1 F(gument)-.18 E +.416(to the \214rst call\) of each line in turn.)144 588 R(An)5.416 E +2.916(yn)-.15 G .416(umeric ar)-2.916 F .416 +(gument supplied to these successi)-.18 F .715 -.15(ve c)-.25 H .415 +(alls de-).15 F 1.217(termines the direction to mo)144 600 R 1.518 -.15 +(ve t)-.15 H 1.218(hrough the history).15 F 6.218(.A)-.65 G(ne)-2.5 E +-.05(ga)-.15 G(ti).05 E 1.518 -.15(ve a)-.25 H -.18(rg).15 G 1.218 +(ument switches the direction).18 F .494 +(through the history \(back or forw)144 612 R 2.994(ard\). The)-.1 F +.494(history e)2.994 F .494(xpansion f)-.15 F .494 +(acilities are used to e)-.1 F .494(xtract the last)-.15 F -.1(wo)144 +624 S(rd, as if the "!$" history e).1 E(xpansion had been speci\214ed.) +-.15 E F1(shell\255expand\255line \(M\255C\255e\))108 636 Q F0 .622 +(Expand the line as the shell does.)144 648 R .622 +(This performs alias and history e)5.622 F .623 +(xpansion as well as all of the)-.15 F(shell w)144 660 Q(ord e)-.1 E 2.5 +(xpansions. See)-.15 F/F3 9/Times-Bold@0 SF(HIST)2.5 E(OR)-.162 E 2.25 +(YE)-.315 G(XP)-2.25 E(ANSION)-.666 E F0(belo)2.25 E 2.5(wf)-.25 G +(or a description of history e)-2.5 E(xpansion.)-.15 E F1 +(history\255expand\255line \(M\255^\))108 672 Q F0 .939 +(Perform history e)144 684 R .939(xpansion on the current line.)-.15 F +(See)5.939 E F3(HIST)3.439 E(OR)-.162 E 3.189(YE)-.315 G(XP)-3.189 E +(ANSION)-.666 E F0(belo)3.189 E 3.438(wf)-.25 G .938(or a descrip-) +-3.438 F(tion of history e)144 696 Q(xpansion.)-.15 E(GNU Bash 5.1)72 +768 Q(2020 October 29)141.235 E(47)190.395 E 0 Cg EP +%%Page: 48 48 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(magic\255space)108 84 Q F0 .437(Perform history e)144 96 R .437 +(xpansion on the current line and insert a space.)-.15 F(See)5.438 E/F2 +9/Times-Bold@0 SF(HIST)2.938 E(OR)-.162 E 2.688(YE)-.315 G(XP)-2.688 E +(ANSION)-.666 E F0(be-)2.688 E(lo)144 108 Q 2.5(wf)-.25 G +(or a description of history e)-2.5 E(xpansion.)-.15 E F1 +(alias\255expand\255line)108 120 Q F0 .395(Perform alias e)144 132 R +.395(xpansion on the current line.)-.15 F(See)5.395 E F2(ALIASES)2.895 E +F0(abo)2.645 E .694 -.15(ve f)-.15 H .394(or a description of alias e) +.15 F(xpan-)-.15 E(sion.)144 144 Q F1 +(history\255and\255alias\255expand\255line)108 156 Q F0 +(Perform history and alias e)144 168 Q(xpansion on the current line.) +-.15 E F1(insert\255last\255ar)108 180 Q(gument \(M\255.)-.1 E 2.5(,M) +.833 G -1.667(\255_ \))-2.5 F F0 2.5(As)144 192 S(ynon)-2.5 E(ym for) +-.15 E F1(yank\255last\255ar)2.5 E(g)-.1 E F0(.)A F1 +(operate\255and\255get\255next \(C\255o\))108 204 Q F0 .947 +(Accept the current line for e)144 216 R -.15(xe)-.15 G .948 +(cution and fetch the ne).15 F .948(xt line relati)-.15 F 1.248 -.15 +(ve t)-.25 H 3.448(ot).15 G .948(he current line from the)-3.448 F .73 +(history for editing.)144 228 R 3.23(An)5.73 G .73(umeric ar)-3.23 F +.729 +(gument, if supplied, speci\214es the history entry to use instead of) +-.18 F(the current line.)144 240 Q F1 +(edit\255and\255execute\255command \(C\255x C\255e\))108 252 Q F0(In)144 +264 Q -.2(vo)-.4 G .346 -.1(ke a).2 H 2.646(ne).1 G .146 +(ditor on the current command line, and e)-2.646 F -.15(xe)-.15 G .146 +(cute the result as shell commands.).15 F F1(Bash)5.147 E F0(at-)2.647 E +(tempts to in)144 276 Q -.2(vo)-.4 G -.1(ke).2 G F2($VISU)2.6 E(AL)-.54 +E/F3 9/Times-Roman@0 SF(,)A F2($EDIT)2.25 E(OR)-.162 E F3(,)A F0(and) +2.25 E/F4 10/Times-Italic@0 SF(emacs)2.5 E F0(as the editor)2.5 E 2.5 +(,i)-.4 G 2.5(nt)-2.5 G(hat order)-2.5 E(.)-.55 E F1(Commands f)87 292.8 +Q(or Changing T)-.25 E(ext)-.92 E F4(end\255of\255\214le)108 304.8 Q F1 +(\(usually C\255d\))2.5 E F0 .799 +(The character indicating end-of-\214le as set, for e)144 316.8 R .799 +(xample, by)-.15 F/F5 10/Courier@0 SF(stty)3.299 E F0 5.799(.I)C 3.298 +(ft)-5.799 G .798(his character is read when)-3.298 F .592 +(there are no characters on the line, and point is at the be)144 328.8 R +.593(ginning of the line, Readline interprets it)-.15 F +(as the end of input and returns)144 340.8 Q F2(EOF)2.5 E F3(.)A F1 +(delete\255char \(C\255d\))108 352.8 Q F0 .442 +(Delete the character at point.)144 364.8 R .442 +(If this function is bound to the same character as the tty)5.442 F F1 +(EOF)2.941 E F0(char)2.941 E(-)-.2 E(acter)144 376.8 Q 2.5(,a)-.4 G(s) +-2.5 E F1(C\255d)2.5 E F0(commonly is, see abo)2.5 E .3 -.15(ve f)-.15 H +(or the ef).15 E(fects.)-.25 E F1(backward\255delete\255char \(Rubout\)) +108 388.8 Q F0 .552(Delete the character behind the cursor)144 400.8 R +5.553(.W)-.55 G .553(hen gi)-5.553 F -.15(ve)-.25 G 3.053(nan).15 G .553 +(umeric ar)-3.053 F .553(gument, sa)-.18 F .853 -.15(ve t)-.2 H .553 +(he deleted te).15 F .553(xt on)-.15 F(the kill ring.)144 412.8 Q F1 +-.25(fo)108 424.8 S(rward\255backward\255delete\255char).25 E F0 .474 +(Delete the character under the cursor)144 436.8 R 2.974(,u)-.4 G .474 +(nless the cursor is at the end of the line, in which case the)-2.974 F +(character behind the cursor is deleted.)144 448.8 Q F1 +(quoted\255insert \(C\255q, C\255v\))108 460.8 Q F0 .778(Add the ne)144 +472.8 R .779(xt character typed to the line v)-.15 F 3.279 +(erbatim. This)-.15 F .779(is ho)3.279 F 3.279(wt)-.25 G 3.279(oi)-3.279 +G .779(nsert characters lik)-3.279 F(e)-.1 E F1(C\255q)3.279 E F0 3.279 +(,f)C(or)-3.279 E -.15(ex)144 484.8 S(ample.).15 E F1 +(tab\255insert \(C\255v T)108 496.8 Q(AB\))-.9 E F0 +(Insert a tab character)144 508.8 Q(.)-.55 E F1 +(self\255insert \(a, b, A, 1, !, ...\))108 520.8 Q F0 +(Insert the character typed.)144 532.8 Q F1 +(transpose\255chars \(C\255t\))108 544.8 Q F0 .322 +(Drag the character before point forw)144 556.8 R .321(ard o)-.1 F -.15 +(ve)-.15 G 2.821(rt).15 G .321(he character at point, mo)-2.821 F .321 +(ving point forw)-.15 F .321(ard as well.)-.1 F .372 +(If point is at the end of the line, then this transposes the tw)144 +568.8 R 2.872(oc)-.1 G .373(haracters before point.)-2.872 F(Ne)5.373 E +-.05(ga)-.15 G(ti).05 E .673 -.15(ve a)-.25 H -.2(r-).15 G(guments ha) +144 580.8 Q .3 -.15(ve n)-.2 H 2.5(oe).15 G -.25(ff)-2.5 G(ect.).25 E F1 +(transpose\255w)108 592.8 Q(ords \(M\255t\))-.1 E F0 .024(Drag the w)144 +604.8 R .024(ord before point past the w)-.1 F .023(ord after point, mo) +-.1 F .023(ving point o)-.15 F -.15(ve)-.15 G 2.523(rt).15 G .023(hat w) +-2.523 F .023(ord as well.)-.1 F .023(If point)5.023 F +(is at the end of the line, this transposes the last tw)144 616.8 Q 2.5 +(ow)-.1 G(ords on the line.)-2.6 E F1(upcase\255w)108 628.8 Q +(ord \(M\255u\))-.1 E F0 1.698(Uppercase the current \(or follo)144 +640.8 R 1.698(wing\) w)-.25 F 4.198(ord. W)-.1 F 1.698(ith a ne)-.4 F +-.05(ga)-.15 G(ti).05 E 1.999 -.15(ve a)-.25 H -.18(rg).15 G 1.699 +(ument, uppercase the pre).18 F(vious)-.25 E -.1(wo)144 652.8 S(rd, b).1 +E(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1(do)108 664.8 Q +(wncase\255w)-.1 E(ord \(M\255l\))-.1 E F0(Lo)144 676.8 Q 1.648 +(wercase the current \(or follo)-.25 F 1.648(wing\) w)-.25 F 4.148 +(ord. W)-.1 F 1.647(ith a ne)-.4 F -.05(ga)-.15 G(ti).05 E 1.947 -.15 +(ve a)-.25 H -.18(rg).15 G 1.647(ument, lo).18 F 1.647(wercase the pre) +-.25 F(vious)-.25 E -.1(wo)144 688.8 S(rd, b).1 E(ut do not mo)-.2 E .3 +-.15(ve p)-.15 H(oint.).15 E F1(capitalize\255w)108 700.8 Q +(ord \(M\255c\))-.1 E F0 1.974(Capitalize the current \(or follo)144 +712.8 R 1.974(wing\) w)-.25 F 4.474(ord. W)-.1 F 1.974(ith a ne)-.4 F +-.05(ga)-.15 G(ti).05 E 2.274 -.15(ve a)-.25 H -.18(rg).15 G 1.975 +(ument, capitalize the pre).18 F(vious)-.25 E -.1(wo)144 724.8 S(rd, b) +.1 E(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E(GNU Bash 5.1)72 +768 Q(2020 October 29)141.235 E(48)190.395 E 0 Cg EP +%%Page: 49 49 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF -.1(ove)108 84 S(rwrite\255mode).1 E F0 -.8(To)144 96 S .438(ggle o) +.8 F -.15(ve)-.15 G .438(rwrite mode.).15 F -.4(Wi)5.438 G .438(th an e) +.4 F .438(xplicit positi)-.15 F .737 -.15(ve n)-.25 H .437(umeric ar).15 +F .437(gument, switches to o)-.18 F -.15(ve)-.15 G .437(rwrite mode.).15 +F -.4(Wi)144 108 S .78(th an e).4 F .781(xplicit non-positi)-.15 F 1.081 +-.15(ve n)-.25 H .781(umeric ar).15 F .781 +(gument, switches to insert mode.)-.18 F .781(This command af)5.781 F +(fects)-.25 E(only)144 120 Q F1(emacs)4.395 E F0(mode;)4.395 E F1(vi) +4.395 E F0 1.894(mode does o)4.395 F -.15(ve)-.15 G 1.894(rwrite dif).15 +F(ferently)-.25 E 6.894(.E)-.65 G 1.894(ach call to)-6.894 F/F2 10 +/Times-Italic@0 SF -.37(re)4.394 G(adline\(\)).37 E F0 1.894 +(starts in insert)4.394 F 3.968(mode. In)144 132 R -.15(ove)3.968 G +1.468(rwrite mode, characters bound to).15 F F1(self\255insert)3.969 E +F0 1.469(replace the te)3.969 F 1.469(xt at point rather than)-.15 F +.958(pushing the te)144 144 R .958(xt to the right.)-.15 F .957 +(Characters bound to)5.958 F F1(backward\255delete\255char)3.457 E F0 +.957(replace the character)3.457 F(before point with a space.)144 156 Q +(By def)5 E(ault, this command is unbound.)-.1 E F1(Killing and Y)87 +172.8 Q(anking)-.85 E(kill\255line \(C\255k\))108 184.8 Q F0 +(Kill the te)144 196.8 Q(xt from point to the end of the line.)-.15 E F1 +(backward\255kill\255line \(C\255x Rubout\))108 208.8 Q F0(Kill backw) +144 220.8 Q(ard to the be)-.1 E(ginning of the line.)-.15 E F1 +(unix\255line\255discard \(C\255u\))108 232.8 Q F0(Kill backw)144 244.8 +Q(ard from point to the be)-.1 E(ginning of the line.)-.15 E +(The killed te)5 E(xt is sa)-.15 E -.15(ve)-.2 G 2.5(do).15 G 2.5(nt) +-2.5 G(he kill-ring.)-2.5 E F1(kill\255whole\255line)108 256.8 Q F0 +(Kill all characters on the current line, no matter where point is.)144 +268.8 Q F1(kill\255w)108 280.8 Q(ord \(M\255d\))-.1 E F0 .728 +(Kill from point to the end of the current w)144 292.8 R .729 +(ord, or if between w)-.1 F .729(ords, to the end of the ne)-.1 F .729 +(xt w)-.15 F(ord.)-.1 E -.8(Wo)144 304.8 S +(rd boundaries are the same as those used by).8 E F1 -.25(fo)2.5 G +(rward\255w).25 E(ord)-.1 E F0(.)A F1(backward\255kill\255w)108 316.8 Q +(ord \(M\255Rubout\))-.1 E F0(Kill the w)144 328.8 Q(ord behind point.) +-.1 E -.8(Wo)5 G(rd boundaries are the same as those used by).8 E F1 +(backward\255w)2.5 E(ord)-.1 E F0(.)A F1(shell\255kill\255w)108 340.8 Q +(ord)-.1 E F0 .729(Kill from point to the end of the current w)144 352.8 +R .728(ord, or if between w)-.1 F .728(ords, to the end of the ne)-.1 F +.728(xt w)-.15 F(ord.)-.1 E -.8(Wo)144 364.8 S +(rd boundaries are the same as those used by).8 E F1(shell\255f)2.5 E +(orward\255w)-.25 E(ord)-.1 E F0(.)A F1(shell\255backward\255kill\255w) +108 376.8 Q(ord)-.1 E F0 3.025(Kill the w)144 388.8 R 3.025 +(ord behind point.)-.1 F -.8(Wo)8.025 G 3.025 +(rd boundaries are the same as those used by).8 F F1(shell\255back-) +5.525 E(ward\255w)144 400.8 Q(ord)-.1 E F0(.)A F1(unix\255w)108 412.8 Q +(ord\255rubout \(C\255w\))-.1 E F0 .365(Kill the w)144 424.8 R .365 +(ord behind point, using white space as a w)-.1 F .364(ord boundary)-.1 +F 5.364(.T)-.65 G .364(he killed te)-5.364 F .364(xt is sa)-.15 F -.15 +(ve)-.2 G 2.864(do).15 G 2.864(nt)-2.864 G(he)-2.864 E(kill-ring.)144 +436.8 Q F1(unix\255\214lename\255rubout)108 448.8 Q F0 .166(Kill the w) +144 460.8 R .166 +(ord behind point, using white space and the slash character as the w) +-.1 F .167(ord boundaries.)-.1 F(The)5.167 E(killed te)144 472.8 Q +(xt is sa)-.15 E -.15(ve)-.2 G 2.5(do).15 G 2.5(nt)-2.5 G(he kill-ring.) +-2.5 E F1(delete\255horizontal\255space \(M\255\\\))108 484.8 Q F0 +(Delete all spaces and tabs around point.)144 496.8 Q F1(kill\255r)108 +508.8 Q(egion)-.18 E F0(Kill the te)144 520.8 Q(xt in the current re) +-.15 E(gion.)-.15 E F1(copy\255r)108 532.8 Q(egion\255as\255kill)-.18 E +F0(Cop)144 544.8 Q 2.5(yt)-.1 G(he te)-2.5 E(xt in the re)-.15 E +(gion to the kill b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1 +(copy\255backward\255w)108 556.8 Q(ord)-.1 E F0(Cop)144 568.8 Q 4.801 +(yt)-.1 G 2.301(he w)-4.801 F 2.301(ord before point to the kill b)-.1 F +(uf)-.2 E(fer)-.25 E 7.301(.T)-.55 G 2.301(he w)-7.301 F 2.3 +(ord boundaries are the same as)-.1 F F1(back-)4.8 E(ward\255w)144 580.8 +Q(ord)-.1 E F0(.)A F1(copy\255f)108 592.8 Q(orward\255w)-.25 E(ord)-.1 E +F0(Cop)144 604.8 Q 4.507(yt)-.1 G 2.007(he w)-4.507 F 2.007(ord follo) +-.1 F 2.007(wing point to the kill b)-.25 F(uf)-.2 E(fer)-.25 E 7.008 +(.T)-.55 G 2.008(he w)-7.008 F 2.008(ord boundaries are the same as)-.1 +F F1 -.25(fo)4.508 G -.37(r-).25 G(ward\255w)144 616.8 Q(ord)-.1 E F0(.) +A F1(yank \(C\255y\))108 628.8 Q F0 -1(Ya)144 640.8 S +(nk the top of the kill ring into the b)1 E(uf)-.2 E(fer at point.)-.25 +E F1(yank\255pop \(M\255y\))108 652.8 Q F0 +(Rotate the kill ring, and yank the ne)144 664.8 Q 2.5(wt)-.25 G 2.5 +(op. Only)-2.5 F -.1(wo)2.5 G(rks follo).1 E(wing)-.25 E F1(yank)2.5 E +F0(or)2.5 E F1(yank\255pop)2.5 E F0(.)A F1(Numeric Ar)87 681.6 Q +(guments)-.1 E(digit\255ar)108 693.6 Q +(gument \(M\2550, M\2551, ..., M\255\255\))-.1 E F0 .367 +(Add this digit to the ar)144 705.6 R .367 +(gument already accumulating, or start a ne)-.18 F 2.867(wa)-.25 G -.18 +(rg)-2.867 G 2.867(ument. M\255\255).18 F .366(starts a ne)2.867 F -.05 +(ga)-.15 G(-).05 E(ti)144 717.6 Q .3 -.15(ve a)-.25 H -.18(rg).15 G +(ument.).18 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(49)190.395 +E 0 Cg EP +%%Page: 50 50 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(uni)108 84 Q -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0 .778 +(This is another w)144 96 R .779(ay to specify an ar)-.1 F 3.279 +(gument. If)-.18 F .779(this command is follo)3.279 F .779 +(wed by one or more digits,)-.25 F 1.376 +(optionally with a leading minus sign, those digits de\214ne the ar)144 +108 R 3.876(gument. If)-.18 F 1.376(the command is fol-)3.876 F(lo)144 +120 Q 1.17(wed by digits, e)-.25 F -.15(xe)-.15 G(cuting).15 E F1(uni) +3.67 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0(ag)3.67 E 1.17 +(ain ends the numeric ar)-.05 F 1.17(gument, b)-.18 F 1.17(ut is other) +-.2 F(-)-.2 E .899(wise ignored.)144 132 R .898 +(As a special case, if this command is immediately follo)5.899 F .898 +(wed by a character that is)-.25 F 1.23 +(neither a digit nor minus sign, the ar)144 144 R 1.23 +(gument count for the ne)-.18 F 1.23(xt command is multiplied by four) +-.15 F(.)-.55 E .823(The ar)144 156 R .823 +(gument count is initially one, so e)-.18 F -.15(xe)-.15 G .823 +(cuting this function the \214rst time mak).15 F .822(es the ar)-.1 F +(gument)-.18 E(count four)144 168 Q 2.5(,as)-.4 G(econd time mak)-2.5 E +(es the ar)-.1 E(gument count sixteen, and so on.)-.18 E F1(Completing) +87 184.8 Q(complete \(T)108 196.8 Q(AB\))-.9 E F0 1.137 +(Attempt to perform completion on the te)144 208.8 R 1.137 +(xt before point.)-.15 F F1(Bash)6.137 E F0 1.137 +(attempts completion treating the)3.637 F(te)144 220.8 Q .533(xt as a v) +-.15 F .533(ariable \(if the te)-.25 F .533(xt be)-.15 F .533(gins with) +-.15 F F1($)3.033 E F0 .533(\), username \(if the te)B .532(xt be)-.15 F +.532(gins with)-.15 F F1(~)3.032 E F0 .532(\), hostname \(if the)B(te) +144 232.8 Q .701(xt be)-.15 F .701(gins with)-.15 F F1(@)3.201 E F0 .701 +(\), or command \(including aliases and functions\) in turn.)B .702 +(If none of these pro-)5.701 F +(duces a match, \214lename completion is attempted.)144 244.8 Q F1 +(possible\255completions \(M\255?\))108 256.8 Q F0 +(List the possible completions of the te)144 268.8 Q(xt before point.) +-.15 E F1(insert\255completions \(M\255*\))108 280.8 Q F0 .783 +(Insert all completions of the te)144 292.8 R .783 +(xt before point that w)-.15 F .783(ould ha)-.1 F 1.083 -.15(ve b)-.2 H +.783(een generated by).15 F F1(possible\255com-)3.282 E(pletions)144 +304.8 Q F0(.)A F1(menu\255complete)108 316.8 Q F0 .928(Similar to)144 +328.8 R F1(complete)3.428 E F0 3.428(,b)C .929(ut replaces the w)-3.628 +F .929(ord to be completed with a single match from the list of)-.1 F +1.194(possible completions.)144 340.8 R 1.194(Repeated e)6.194 F -.15 +(xe)-.15 G 1.194(cution of).15 F F1(menu\255complete)3.694 E F0 1.193 +(steps through the list of possible)3.694 F .828 +(completions, inserting each match in turn.)144 352.8 R .828 +(At the end of the list of completions, the bell is rung)5.828 F .727 +(\(subject to the setting of)144 364.8 R F1(bell\255style)3.227 E F0 +3.227(\)a)C .727(nd the original te)-3.227 F .727(xt is restored.)-.15 F +.727(An ar)5.727 F .727(gument of)-.18 F/F2 10/Times-Italic@0 SF(n)3.227 +E F0(mo)3.227 E -.15(ve)-.15 G(s).15 E F2(n)3.227 E F0 1.73 +(positions forw)144 376.8 R 1.73(ard in the list of matches; a ne)-.1 F +-.05(ga)-.15 G(ti).05 E 2.03 -.15(ve a)-.25 H -.18(rg).15 G 1.73 +(ument may be used to mo).18 F 2.03 -.15(ve b)-.15 H(ackw).15 E(ard)-.1 +E(through the list.)144 388.8 Q(This command is intended to be bound to) +5 E F1 -.9(TA)2.5 G(B).9 E F0 2.5(,b)C(ut is unbound by def)-2.7 E +(ault.)-.1 E F1(menu\255complete\255backward)108 400.8 Q F0 .82 +(Identical to)144 412.8 R F1(menu\255complete)3.32 E F0 3.32(,b)C .82 +(ut mo)-3.52 F -.15(ve)-.15 G 3.32(sb).15 G(ackw)-3.32 E .82 +(ard through the list of possible completions, as if)-.1 F F1 +(menu\255complete)144 424.8 Q F0(had been gi)2.5 E -.15(ve)-.25 G 2.5 +(nan).15 G -2.25 -.15(eg a)-2.5 H(ti).15 E .3 -.15(ve a)-.25 H -.18(rg) +.15 G 2.5(ument. This).18 F(command is unbound by def)2.5 E(ault.)-.1 E +F1(delete\255char\255or\255list)108 436.8 Q F0 .234 +(Deletes the character under the cursor if not at the be)144 448.8 R +.234(ginning or end of the line \(lik)-.15 F(e)-.1 E F1(delete\255char) +2.735 E F0(\).)A .425(If at the end of the line, beha)144 460.8 R -.15 +(ve)-.2 G 2.925(si).15 G .425(dentically to)-2.925 F F1 +(possible\255completions)2.925 E F0 5.425(.T)C .425 +(his command is unbound)-5.425 F(by def)144 472.8 Q(ault.)-.1 E F1 +(complete\255\214lename \(M\255/\))108 484.8 Q F0 +(Attempt \214lename completion on the te)144 496.8 Q(xt before point.) +-.15 E F1(possible\255\214lename\255completions \(C\255x /\))108 508.8 Q +F0(List the possible completions of the te)144 520.8 Q +(xt before point, treating it as a \214lename.)-.15 E F1 +(complete\255user)108 532.8 Q(name \(M\255~\))-.15 E F0 +(Attempt completion on the te)144 544.8 Q +(xt before point, treating it as a username.)-.15 E F1(possible\255user) +108 556.8 Q(name\255completions \(C\255x ~\))-.15 E F0 +(List the possible completions of the te)144 568.8 Q +(xt before point, treating it as a username.)-.15 E F1(complete\255v)108 +580.8 Q(ariable \(M\255$\))-.1 E F0(Attempt completion on the te)144 +592.8 Q(xt before point, treating it as a shell v)-.15 E(ariable.)-.25 E +F1(possible\255v)108 604.8 Q(ariable\255completions \(C\255x $\))-.1 E +F0(List the possible completions of the te)144 616.8 Q +(xt before point, treating it as a shell v)-.15 E(ariable.)-.25 E F1 +(complete\255hostname \(M\255@\))108 628.8 Q F0 +(Attempt completion on the te)144 640.8 Q +(xt before point, treating it as a hostname.)-.15 E F1 +(possible\255hostname\255completions \(C\255x @\))108 652.8 Q F0 +(List the possible completions of the te)144 664.8 Q +(xt before point, treating it as a hostname.)-.15 E F1 +(complete\255command \(M\255!\))108 676.8 Q F0 .58 +(Attempt completion on the te)144 688.8 R .581 +(xt before point, treating it as a command name.)-.15 F .581 +(Command comple-)5.581 F .715(tion attempts to match the te)144 700.8 R +.715(xt ag)-.15 F .715(ainst aliases, reserv)-.05 F .715(ed w)-.15 F +.715(ords, shell functions, shell b)-.1 F .715(uiltins, and)-.2 F +(\214nally e)144 712.8 Q -.15(xe)-.15 G +(cutable \214lenames, in that order).15 E(.)-.55 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(50)190.395 E 0 Cg EP +%%Page: 51 51 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(possible\255command\255completions \(C\255x !\))108 84 Q F0 +(List the possible completions of the te)144 96 Q +(xt before point, treating it as a command name.)-.15 E F1 +(dynamic\255complete\255history \(M\255T)108 108 Q(AB\))-.9 E F0 .424 +(Attempt completion on the te)144 120 R .425 +(xt before point, comparing the te)-.15 F .425(xt ag)-.15 F .425 +(ainst lines from the history list)-.05 F +(for possible completion matches.)144 132 Q F1(dab)108 144 Q(br)-.1 E +-.15(ev)-.18 G(\255expand).15 E F0 .611 +(Attempt menu completion on the te)144 156 R .611 +(xt before point, comparing the te)-.15 F .61(xt ag)-.15 F .61 +(ainst lines from the his-)-.05 F +(tory list for possible completion matches.)144 168 Q F1 +(complete\255into\255braces \(M\255{\))108 180 Q F0 .4(Perform \214lena\ +me completion and insert the list of possible completions enclosed with\ +in braces so)144 192 R(the list is a)144 204 Q -.25(va)-.2 G +(ilable to the shell \(see).25 E F1(Brace Expansion)2.5 E F0(abo)2.5 E +-.15(ve)-.15 G(\).).15 E F1 -.25(Ke)87 220.8 S(yboard Macr).25 E(os)-.18 +E(start\255kbd\255macr)108 232.8 Q 2.5(o\()-.18 G(C\255x \()-2.5 E(\)) +.833 E F0(Be)144 244.8 Q(gin sa)-.15 E +(ving the characters typed into the current k)-.2 E -.15(ey)-.1 G +(board macro.).15 E F1(end\255kbd\255macr)108 256.8 Q 2.5(o\()-.18 G +(C\255x \))-2.5 E(\)).833 E F0(Stop sa)144 268.8 Q +(ving the characters typed into the current k)-.2 E -.15(ey)-.1 G +(board macro and store the de\214nition.).15 E F1 +(call\255last\255kbd\255macr)108 280.8 Q 2.5(o\()-.18 G(C\255x e\))-2.5 +E F0(Re-e)144 292.8 Q -.15(xe)-.15 G 1(cute the last k).15 F -.15(ey)-.1 +G .999(board macro de\214ned, by making the characters in the macro app\ +ear as if).15 F(typed at the k)144 304.8 Q -.15(ey)-.1 G(board.).15 E F1 +(print\255last\255kbd\255macr)108 316.8 Q 2.5(o\()-.18 G(\))-2.5 E F0 +(Print the last k)144 328.8 Q -.15(ey)-.1 G +(board macro de\214ned in a format suitable for the).15 E/F2 10 +/Times-Italic@0 SF(inputr)2.5 E(c)-.37 E F0(\214le.)2.5 E F1 +(Miscellaneous)87 345.6 Q -.18(re)108 357.6 S.18 E +(ead\255init\255\214le \(C\255x C\255r\))-.18 E F0 1.776 +(Read in the contents of the)144 369.6 R F2(inputr)4.276 E(c)-.37 E F0 +1.777(\214le, and incorporate an)4.276 F 4.277(yb)-.15 G 1.777 +(indings or v)-4.277 F 1.777(ariable assignments)-.25 F(found there.)144 +381.6 Q F1(abort \(C\255g\))108 393.6 Q F0 3.249 +(Abort the current editing command and ring the terminal')144 405.6 R +5.748(sb)-.55 G 3.248(ell \(subject to the setting of)-5.748 F F1 +(bell\255style)144 417.6 Q F0(\).)A F1(do\255lo)108 429.6 Q(wer)-.1 E +(case\255v)-.18 E(ersion \(M\255A, M\255B, M\255)-.1 E F2(x)A F1 2.5(,.) +C(..\))-2.5 E F0 1.738(If the meta\214ed character)144 441.6 R F2(x) +4.238 E F0 1.739 +(is uppercase, run the command that is bound to the corresponding)4.238 +F(meta\214ed lo)144 453.6 Q(wercase character)-.25 E 5(.T)-.55 G +(he beha)-5 E(vior is unde\214ned if)-.2 E F2(x)2.5 E F0(is already lo) +2.5 E(wercase.)-.25 E F1(pr)108 465.6 Q(e\214x\255meta \(ESC\))-.18 E F0 +(Metafy the ne)144 477.6 Q(xt character typed.)-.15 E/F3 9/Times-Bold@0 +SF(ESC)5 E F1(f)2.25 E F0(is equi)2.5 E -.25(va)-.25 G(lent to).25 E F1 +(Meta\255f)2.5 E F0(.)A F1(undo \(C\255_, C\255x C\255u\))108 489.6 Q F0 +(Incremental undo, separately remembered for each line.)144 501.6 Q F1 +-2.29 -.18(re v)108 513.6 T(ert\255line \(M\255r\)).08 E F0 .231 +(Undo all changes made to this line.)144 525.6 R .231(This is lik)5.231 +F 2.731(ee)-.1 G -.15(xe)-2.881 G .23(cuting the).15 F F1(undo)2.73 E F0 +.23(command enough times to re-)2.73 F +(turn the line to its initial state.)144 537.6 Q F1 +(tilde\255expand \(M\255&\))108 549.6 Q F0(Perform tilde e)144 561.6 Q +(xpansion on the current w)-.15 E(ord.)-.1 E F1 +(set\255mark \(C\255@, M\255\))108 573.6 Q F0 +(Set the mark to the point.)144 585.6 Q(If a numeric ar)5 E +(gument is supplied, the mark is set to that position.)-.18 E F1 +(exchange\255point\255and\255mark \(C\255x C\255x\))108 597.6 Q F0(Sw) +144 609.6 Q .282(ap the point with the mark.)-.1 F .283 +(The current cursor position is set to the sa)5.283 F -.15(ve)-.2 G +2.783(dp).15 G .283(osition, and the old)-2.783 F(cursor position is sa) +144 621.6 Q -.15(ve)-.2 G 2.5(da).15 G 2.5(st)-2.5 G(he mark.)-2.5 E F1 +(character\255sear)108 633.6 Q(ch \(C\255]\))-.18 E F0 3.036(Ac)144 +645.6 S .536(haracter is read and point is mo)-3.036 F -.15(ve)-.15 G +3.035(dt).15 G 3.035(ot)-3.035 G .535(he ne)-3.035 F .535 +(xt occurrence of that character)-.15 F 5.535(.A)-.55 G(ne)-2.5 E -.05 +(ga)-.15 G(ti).05 E .835 -.15(ve c)-.25 H(ount).15 E(searches for pre) +144 657.6 Q(vious occurrences.)-.25 E F1(character\255sear)108 669.6 Q +(ch\255backward \(M\255C\255]\))-.18 E F0 3.543(Ac)144 681.6 S 1.043 +(haracter is read and point is mo)-3.543 F -.15(ve)-.15 G 3.544(dt).15 G +3.544(ot)-3.544 G 1.044(he pre)-3.544 F 1.044 +(vious occurrence of that character)-.25 F 6.044(.A)-.55 G(ne)-2.5 E +-.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G +(count searches for subsequent occurrences.)144 693.6 Q F1 +(skip\255csi\255sequence)108 705.6 Q F0 1.827 +(Read enough characters to consume a multi-k)144 717.6 R 2.126 -.15 +(ey s)-.1 H 1.826(equence such as those de\214ned for k).15 F -.15(ey) +-.1 G 4.326(sl).15 G(ik)-4.326 E(e)-.1 E .79(Home and End.)144 729.6 R +.791(Such sequences be)5.79 F .791 +(gin with a Control Sequence Indicator \(CSI\), usually ESC\255[.)-.15 F +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(51)190.395 E 0 Cg EP +%%Page: 52 52 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .332 +(If this sequence is bound to "\\[", k)144 84 R -.15(ey)-.1 G 2.831(sp) +.15 G .331(roducing such sequences will ha)-2.831 F .631 -.15(ve n)-.2 H +2.831(oe).15 G -.25(ff)-2.831 G .331(ect unless e).25 F(xplic-)-.15 E +.026(itly bound to a readline command, instead of inserting stray chara\ +cters into the editing b)144 96 R(uf)-.2 E(fer)-.25 E 5.026(.T)-.55 G +(his)-5.026 E(is unbound by def)144 108 Q(ault, b)-.1 E +(ut usually bound to ESC\255[.)-.2 E/F1 10/Times-Bold@0 SF +(insert\255comment \(M\255#\))108 120 Q F0 -.4(Wi)144 132 S .481 +(thout a numeric ar).4 F .481(gument, the v)-.18 F .481 +(alue of the readline)-.25 F F1(comment\255begin)2.981 E F0 -.25(va) +2.981 G .48(riable is inserted at the).25 F(be)144 144 Q .244 +(ginning of the current line.)-.15 F .245(If a numeric ar)5.244 F .245 +(gument is supplied, this command acts as a toggle: if)-.18 F .322 +(the characters at the be)144 156 R .321 +(ginning of the line do not match the v)-.15 F .321(alue of)-.25 F F1 +(comment\255begin)2.821 E F0 2.821(,t)C .321(he v)-2.821 F .321(alue is) +-.25 F .831(inserted, otherwise the characters in)144 168 R F1 +(comment\255begin)3.331 E F0 .832(are deleted from the be)3.331 F .832 +(ginning of the line.)-.15 F 1.469 +(In either case, the line is accepted as if a ne)144 180 R 1.468 +(wline had been typed.)-.25 F 1.468(The def)6.468 F 1.468(ault v)-.1 F +1.468(alue of)-.25 F F1(com-)3.968 E(ment\255begin)144 192 Q F0 .839 +(causes this command to mak)3.339 F 3.339(et)-.1 G .839 +(he current line a shell comment.)-3.339 F .84(If a numeric ar)5.84 F +(gu-)-.18 E(ment causes the comment character to be remo)144 204 Q -.15 +(ve)-.15 G(d, the line will be e).15 E -.15(xe)-.15 G +(cuted by the shell.).15 E F1(glob\255complete\255w)108 216 Q +(ord \(M\255g\))-.1 E F0 .792(The w)144 228 R .791 +(ord before point is treated as a pattern for pathname e)-.1 F .791 +(xpansion, with an asterisk implicitly)-.15 F 2.5(appended. This)144 240 +R(pattern is used to generate a list of matching \214lenames for possib\ +le completions.)2.5 E F1(glob\255expand\255w)108 252 Q(ord \(C\255x *\)) +-.1 E F0 .175(The w)144 264 R .176 +(ord before point is treated as a pattern for pathname e)-.1 F .176 +(xpansion, and the list of matching \214le-)-.15 F .516 +(names is inserted, replacing the w)144 276 R 3.016(ord. If)-.1 F 3.016 +(an)3.016 G .516(umeric ar)-3.016 F .516 +(gument is supplied, an asterisk is appended)-.18 F(before pathname e) +144 288 Q(xpansion.)-.15 E F1(glob\255list\255expansions \(C\255x g\)) +108 300 Q F0 .923(The list of e)144 312 R .923(xpansions that w)-.15 F +.923(ould ha)-.1 F 1.223 -.15(ve b)-.2 H .923(een generated by).15 F F1 +(glob\255expand\255w)3.423 E(ord)-.1 E F0 .923(is displayed, and)3.423 F +.872(the line is redra)144 324 R 3.372(wn. If)-.15 F 3.372(an)3.372 G +.872(umeric ar)-3.372 F .872 +(gument is supplied, an asterisk is appended before pathname)-.18 F -.15 +(ex)144 336 S(pansion.).15 E F1(dump\255functions)108 348 Q F0 .626 +(Print all of the functions and their k)144 360 R .926 -.15(ey b)-.1 H +.627(indings to the readline output stream.).15 F .627(If a numeric ar) +5.627 F(gu-)-.18 E +(ment is supplied, the output is formatted in such a w)144 372 Q +(ay that it can be made part of an)-.1 E/F2 10/Times-Italic@0 SF(inputr) +2.5 E(c)-.37 E F0(\214le.)2.5 E F1(dump\255v)108 384 Q(ariables)-.1 E F0 +.763(Print all of the settable readline v)144 396 R .762 +(ariables and their v)-.25 F .762(alues to the readline output stream.) +-.25 F .762(If a nu-)5.762 F .108(meric ar)144 408 R .108 +(gument is supplied, the output is formatted in such a w)-.18 F .109 +(ay that it can be made part of an)-.1 F F2(in-)2.609 E(putr)144 420 Q +(c)-.37 E F0(\214le.)2.5 E F1(dump\255macr)108 432 Q(os)-.18 E F0 .593 +(Print all of the readline k)144 444 R .893 -.15(ey s)-.1 H .592 +(equences bound to macros and the strings the).15 F 3.092(yo)-.15 G +3.092(utput. If)-3.092 F 3.092(an)3.092 G(umeric)-3.092 E(ar)144 456 Q +.528(gument is supplied, the output is formatted in such a w)-.18 F .528 +(ay that it can be made part of an)-.1 F F2(inputr)3.028 E(c)-.37 E F0 +(\214le.)144 468 Q F1(display\255shell\255v)108 480 Q +(ersion \(C\255x C\255v\))-.1 E F0(Display v)144 492 Q +(ersion information about the current instance of)-.15 E F1(bash)2.5 E +F0(.)A F1(Pr)87 508.8 Q(ogrammable Completion)-.18 E F0 .147(When w)108 +520.8 R .147(ord completion is attempted for an ar)-.1 F .147 +(gument to a command for which a completion speci\214cation \(a)-.18 F +F2(compspec)108 532.8 Q F0 3.828(\)h)C 1.329 +(as been de\214ned using the)-3.828 F F1(complete)3.829 E F0 -.2(bu) +3.829 G 1.329(iltin \(see).2 F/F3 9/Times-Bold@0 SF 1.329(SHELL B)3.829 +F(UIL)-.09 E 1.329(TIN COMMANDS)-.828 F F0(belo)3.579 E 1.329(w\), the) +-.25 F(programmable completion f)108 544.8 Q(acilities are in)-.1 E -.2 +(vo)-.4 G -.1(ke).2 G(d.).1 E .498 +(First, the command name is identi\214ed.)108 561.6 R .498 +(If the command w)5.498 F .497 +(ord is the empty string \(completion attempted at)-.1 F .233(the be)108 +573.6 R .233(ginning of an empty line\), an)-.15 F 2.733(yc)-.15 G .233 +(ompspec de\214ned with the)-2.733 F F12.733 E F0 .233(option to) +2.733 F F1(complete)2.733 E F0 .233(is used.)2.733 F .234(If a comp-) +5.234 F .481(spec has been de\214ned for that command, the compspec is \ +used to generate the list of possible completions)108 585.6 R .822 +(for the w)108 597.6 R 3.322(ord. If)-.1 F .822(the command w)3.322 F +.823(ord is a full pathname, a compspec for the full pathname is search\ +ed for)-.1 F 2.867(\214rst. If)108 609.6 R .366(no compspec is found fo\ +r the full pathname, an attempt is made to \214nd a compspec for the po\ +rtion)2.867 F(follo)108 621.6 Q .298(wing the \214nal slash.)-.25 F .298 +(If those searches do not result in a compspec, an)5.298 F 2.799(yc)-.15 +G .299(ompspec de\214ned with the)-2.799 F F12.799 E F0 .057 +(option to)108 633.6 R F1(complete)2.557 E F0 .056(is used as the def) +2.556 F 2.556(ault. If)-.1 F .056(there is no def)2.556 F .056 +(ault compspec,)-.1 F F1(bash)2.556 E F0 .056(attempts alias e)2.556 F +.056(xpansion on)-.15 F .332(the command w)108 645.6 R .332(ord as a \ +\214nal resort, and attempts to \214nd a compspec for the command w)-.1 +F .332(ord from an)-.1 F 2.833(ys)-.15 G(uc-)-2.833 E(cessful e)108 +657.6 Q(xpansion.)-.15 E .817(Once a compspec has been found, it is use\ +d to generate the list of matching w)108 674.4 R 3.317(ords. If)-.1 F +3.317(ac)3.317 G .817(ompspec is not)-3.317 F(found, the def)108 686.4 Q +(ault)-.1 E F1(bash)2.5 E F0(completion as described abo)2.5 E .3 -.15 +(ve u)-.15 H(nder).15 E F1(Completing)2.5 E F0(is performed.)2.5 E .463 +(First, the actions speci\214ed by the compspec are used.)108 703.2 R +.464(Only matches which are pre\214x)5.464 F .464(ed by the w)-.15 F +.464(ord being)-.1 F .596(completed are returned.)108 715.2 R .596 +(When the)5.596 F F13.096 E F0(or)3.095 E F13.095 E F0 .595 +(option is used for \214lename or directory name completion, the)3.095 F +(shell v)108 727.2 Q(ariable)-.25 E F3(FIGNORE)2.5 E F0 +(is used to \214lter the matches.)2.25 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(52)190.395 E 0 Cg EP +%%Page: 53 53 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(An)108 84 Q 4.084 +(yc)-.15 G 1.584(ompletions speci\214ed by a pathname e)-4.084 F 1.584 +(xpansion pattern to the)-.15 F/F1 10/Times-Bold@0 SF4.084 E F0 +1.584(option are generated ne)4.084 F 4.084(xt. The)-.15 F -.1(wo)108 96 +S .555(rds generated by the pattern need not match the w).1 F .554 +(ord being completed.)-.1 F(The)5.554 E/F2 9/Times-Bold@0 SF(GLOBIGNORE) +3.054 E F0 .554(shell v)2.804 F(ari-)-.25 E +(able is not used to \214lter the matches, b)108 108 Q(ut the)-.2 E F2 +(FIGNORE)2.5 E F0 -.25(va)2.25 G(riable is used.).25 E(Ne)108 124.8 Q +.32(xt, the string speci\214ed as the ar)-.15 F .32(gument to the)-.18 F +F12.82 E F0 .321(option is considered.)2.821 F .321 +(The string is \214rst split using the)5.321 F .413(characters in the) +108 136.8 R F2(IFS)2.913 E F0 .412(special v)2.663 F .412 +(ariable as delimiters.)-.25 F .412(Shell quoting is honored.)5.412 F +.412(Each w)5.412 F .412(ord is then e)-.1 F(xpanded)-.15 E .091 +(using brace e)108 148.8 R .091(xpansion, tilde e)-.15 F .092 +(xpansion, parameter and v)-.15 F .092(ariable e)-.25 F .092 +(xpansion, command substitution, and arith-)-.15 F 1.397(metic e)108 +160.8 R 1.396(xpansion, as described abo)-.15 F 1.696 -.15(ve u)-.15 H +(nder).15 E F2(EXP)3.896 E(ANSION)-.666 E/F3 9/Times-Roman@0 SF(.)A F0 +1.396(The results are split using the rules described)5.896 F(abo)108 +172.8 Q .509 -.15(ve u)-.15 H(nder).15 E F1 -.75(Wo)2.709 G .209 +(rd Splitting).75 F F0 5.209(.T)C .209(he results of the e)-5.209 F .209 +(xpansion are pre\214x-matched ag)-.15 F .21(ainst the w)-.05 F .21 +(ord being com-)-.1 F(pleted, and the matching w)108 184.8 Q +(ords become the possible completions.)-.1 E .234 +(After these matches ha)108 201.6 R .534 -.15(ve b)-.2 H .234 +(een generated, an).15 F 2.734(ys)-.15 G .233 +(hell function or command speci\214ed with the)-2.734 F F12.733 E +F0(and)2.733 E F12.733 E F0(op-)2.733 E 4.208(tions is in)108 +213.6 R -.2(vo)-.4 G -.1(ke).2 G 6.708(d. When).1 F 4.209 +(the command or function is in)6.708 F -.2(vo)-.4 G -.1(ke).2 G 4.209 +(d, the).1 F F2(COMP_LINE)6.709 E F3(,)A F2(COMP_POINT)6.459 E F3(,)A F2 +(COMP_KEY)108 225.6 Q F3(,)A F0(and)2.408 E F2(COMP_TYPE)2.658 E F0 -.25 +(va)2.408 G .157(riables are assigned v).25 F .157 +(alues as described abo)-.25 F .457 -.15(ve u)-.15 H(nder).15 E F1 .157 +(Shell V)2.657 F(ariables)-.92 E F0 5.157(.I)C(f)-5.157 E 3.485(as)108 +237.6 S .986(hell function is being in)-3.485 F -.2(vo)-.4 G -.1(ke).2 G +.986(d, the).1 F F2(COMP_W)3.486 E(ORDS)-.09 E F0(and)3.236 E F2 +(COMP_CW)3.486 E(ORD)-.09 E F0 -.25(va)3.236 G .986 +(riables are also set.).25 F(When)5.986 E .347 +(the function or command is in)108 249.6 R -.2(vo)-.4 G -.1(ke).2 G .347 +(d, the \214rst ar).1 F .346(gument \()-.18 F F1($1)A F0 2.846(\)i)C +2.846(st)-2.846 G .346(he name of the command whose ar)-2.846 F(guments) +-.18 E .263(are being completed, the second ar)108 261.6 R .263 +(gument \()-.18 F F1($2)A F0 2.763(\)i)C 2.763(st)-2.763 G .264(he w) +-2.763 F .264(ord being completed, and the third ar)-.1 F .264 +(gument \()-.18 F F1($3)A F0 2.764(\)i)C(s)-2.764 E .629(the w)108 273.6 +R .629(ord preceding the w)-.1 F .629 +(ord being completed on the current command line.)-.1 F .628 +(No \214ltering of the generated)5.629 F .714(completions ag)108 285.6 R +.714(ainst the w)-.05 F .714(ord being completed is performed; the func\ +tion or command has complete free-)-.1 F(dom in generating the matches.) +108 297.6 Q(An)108 314.4 Q 2.938(yf)-.15 G .437 +(unction speci\214ed with)-2.938 F F12.937 E F0 .437(is in)2.937 F +-.2(vo)-.4 G -.1(ke).2 G 2.937<648c>.1 G 2.937(rst. The)-2.937 F .437 +(function may use an)2.937 F 2.937(yo)-.15 G 2.937(ft)-2.937 G .437 +(he shell f)-2.937 F .437(acilities, including)-.1 F(the)108 326.4 Q F1 +(compgen)2.956 E F0 -.2(bu)2.956 G .456(iltin described belo).2 F 1.756 +-.65(w, t)-.25 H 2.956(og).65 G .456(enerate the matches.)-2.956 F .457 +(It must put the possible completions in the)5.456 F F2(COMPREPL)108 +338.4 Q(Y)-.828 E F0(array v)2.25 E(ariable, one per array element.)-.25 +E(Ne)108 355.2 Q .081(xt, an)-.15 F 2.581(yc)-.15 G .081 +(ommand speci\214ed with the)-2.581 F F12.581 E F0 .081 +(option is in)2.581 F -.2(vo)-.4 G -.1(ke).2 G 2.581(di).1 G 2.58(na) +-2.581 G 2.58(ne)-2.58 G -.4(nv)-2.58 G .08(ironment equi).4 F -.25(va) +-.25 G .08(lent to command sub-).25 F 2.858(stitution. It)108 367.2 R +.359(should print a list of completions, one per line, to the standard \ +output.)2.858 F .359(Backslash may be used)5.359 F(to escape a ne)108 +379.2 Q(wline, if necessary)-.25 E(.)-.65 E .377 +(After all of the possible completions are generated, an)108 396 R 2.877 +<798c>-.15 G .377(lter speci\214ed with the)-2.877 F F12.876 E F0 +.376(option is applied to the)2.876 F 3.181(list. The)108 408 R .681 +(\214lter is a pattern as used for pathname e)3.181 F .681(xpansion; a) +-.15 F F1(&)3.181 E F0 .682(in the pattern is replaced with the te)3.182 +F .682(xt of)-.15 F .523(the w)108 420 R .523(ord being completed.)-.1 F +3.023(Al)5.523 G(iteral)-3.023 E F1(&)3.023 E F0 .522 +(may be escaped with a backslash; the backslash is remo)3.022 F -.15(ve) +-.15 G 3.022(db).15 G(efore)-3.022 E .849(attempting a match.)108 432 R +(An)5.849 E 3.349(yc)-.15 G .849 +(ompletion that matches the pattern will be remo)-3.349 F -.15(ve)-.15 G +3.35(df).15 G .85(rom the list.)-3.35 F 3.35(Al)5.85 G(eading)-3.35 E F1 +(!)3.35 E F0(ne)108 444 Q -.05(ga)-.15 G .764 +(tes the pattern; in this case an).05 F 3.264(yc)-.15 G .764 +(ompletion not matching the pattern will be remo)-3.264 F -.15(ve)-.15 G +3.264(d. If).15 F(the)3.264 E F1(nocase-)3.264 E(match)108 456 Q F0 +(shell option is enabled, the match is performed without re)2.5 E -.05 +(ga)-.15 G(rd to the case of alphabetic characters.).05 E(Finally)108 +472.8 Q 3.086(,a)-.65 G .886 -.15(ny p)-3.086 H .586(re\214x and suf).15 +F .587(\214x speci\214ed with the)-.25 F F13.087 E F0(and)3.087 E +F13.087 E F0 .587(options are added to each member of the com-) +3.087 F(pletion list, and the result is returned to the readline comple\ +tion code as the list of possible completions.)108 484.8 Q .247 +(If the pre)108 501.6 R .247(viously-applied actions do not generate an) +-.25 F 2.747(ym)-.15 G .247(atches, and the)-2.747 F F1 .247(\255o dir) +2.747 F(names)-.15 E F0 .247(option w)2.747 F .246(as supplied to)-.1 F +F1(complete)108 513.6 Q F0(when the compspec w)2.5 E +(as de\214ned, directory name completion is attempted.)-.1 E .461 +(If the)108 530.4 R F1 .462(\255o plusdirs)2.961 F F0 .462(option w) +2.962 F .462(as supplied to)-.1 F F1(complete)2.962 E F0 .462 +(when the compspec w)2.962 F .462(as de\214ned, directory name com-)-.1 +F(pletion is attempted and an)108 542.4 Q 2.5(ym)-.15 G +(atches are added to the results of the other actions.)-2.5 E .56 +(By def)108 559.2 R .56(ault, if a compspec is found, whate)-.1 F -.15 +(ve)-.25 G 3.06(ri).15 G 3.06(tg)-3.06 G .559 +(enerates is returned to the completion code as the full set)-3.06 F +.631(of possible completions.)108 571.2 R .631(The def)5.631 F(ault)-.1 +E F1(bash)3.131 E F0 .631 +(completions are not attempted, and the readline def)3.131 F .632 +(ault of \214le-)-.1 F .559(name completion is disabled.)108 583.2 R +.559(If the)5.559 F F1 .559(\255o bashdefault)3.059 F F0 .559(option w) +3.059 F .559(as supplied to)-.1 F F1(complete)3.058 E F0 .558 +(when the compspec)3.058 F -.1(wa)108 595.2 S 3.171(sd).1 G .671 +(e\214ned, the)-3.171 F F1(bash)3.171 E F0(def)3.171 E .671 +(ault completions are attempted if the compspec generates no matches.) +-.1 F .672(If the)5.672 F F13.172 E(default)108 607.2 Q F0 1.207 +(option w)3.707 F 1.207(as supplied to)-.1 F F1(complete)3.707 E F0 +1.207(when the compspec w)3.707 F 1.207(as de\214ned, readline')-.1 F +3.707(sd)-.55 G(ef)-3.707 E 1.206(ault completion)-.1 F +(will be performed if the compspec \(and, if attempted, the def)108 +619.2 Q(ault)-.1 E F1(bash)2.5 E F0(completions\) generate no matches.) +2.5 E .245(When a compspec indicates that directory name completion is \ +desired, the programmable completion func-)108 636 R .633(tions force r\ +eadline to append a slash to completed names which are symbolic links t\ +o directories, subject)108 648 R 2.761(to the v)108 660 R 2.761 +(alue of the)-.25 F F1(mark\255dir)5.261 E(ectories)-.18 E F0 2.761 +(readline v)5.261 F 2.761(ariable, re)-.25 F -.05(ga)-.15 G 2.762 +(rdless of the setting of the).05 F F1(mark-sym-)5.262 E(link)108 672 Q +(ed\255dir)-.1 E(ectories)-.18 E F0(readline v)2.5 E(ariable.)-.25 E +.191(There is some support for dynamically modifying completions.)108 +688.8 R .19(This is most useful when used in combina-)5.191 F 1.172 +(tion with a def)108 700.8 R 1.172(ault completion speci\214ed with)-.1 +F F1 1.172(complete \255D)3.672 F F0 6.172(.I)C(t')-6.172 E 3.672(sp) +-.55 G 1.172(ossible for shell functions e)-3.672 F -.15(xe)-.15 G 1.172 +(cuted as).15 F .93(completion handlers to indicate that completion sho\ +uld be retried by returning an e)108 712.8 R .93(xit status of 124.)-.15 +F .93(If a)5.93 F .1(shell function returns 124, and changes the compsp\ +ec associated with the command on which completion is)108 724.8 R +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(53)190.395 E 0 Cg EP +%%Page: 54 54 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .666 +(being attempted \(supplied as the \214rst ar)108 84 R .665 +(gument when the function is e)-.18 F -.15(xe)-.15 G .665 +(cuted\), programmable completion).15 F .083(restarts from the be)108 96 +R .084(ginning, with an attempt to \214nd a ne)-.15 F 2.584(wc)-.25 G +.084(ompspec for that command.)-2.584 F .084(This allo)5.084 F .084 +(ws a set of)-.25 F(completions to be b)108 108 Q(uilt dynamically as c\ +ompletion is attempted, rather than being loaded all at once.)-.2 E -.15 +(Fo)108 124.8 S 2.637(ri).15 G .137 +(nstance, assuming that there is a library of compspecs, each k)-2.637 F +.137(ept in a \214le corresponding to the name of)-.1 F +(the command, the follo)108 136.8 Q(wing def)-.25 E +(ault completion function w)-.1 E(ould load completions dynamically:)-.1 +E/F1 10/Courier@0 SF(_completion_loader\(\))108 153.6 Q({)108 165.6 Q 6 +(.")144 177.6 S +(/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124)-6 E(})108 +189.6 Q(complete -D -F _completion_loader -o bashdefault -o default)108 +201.6 Q/F2 10.95/Times-Bold@0 SF(HIST)72 230.4 Q(OR)-.197 E(Y)-.383 E F0 +.371(When the)108 242.4 R/F3 10/Times-Bold@0 SF .371(\255o history)2.871 +F F0 .371(option to the)2.871 F F3(set)2.872 E F0 -.2(bu)2.872 G .372 +(iltin is enabled, the shell pro).2 F .372(vides access to the)-.15 F/F4 +10/Times-Italic@0 SF .372(command history)2.872 F F0(,)A .305 +(the list of commands pre)108 254.4 R .305(viously typed.)-.25 F .305 +(The v)5.305 F .304(alue of the)-.25 F/F5 9/Times-Bold@0 SF(HISTSIZE) +2.804 E F0 -.25(va)2.554 G .304(riable is used as the number of com-).25 +F .429(mands to sa)108 266.4 R .729 -.15(ve i)-.2 H 2.929(nah).15 G .429 +(istory list.)-2.929 F .429(The te)5.429 F .429(xt of the last)-.15 F F5 +(HISTSIZE)2.93 E F0 .43(commands \(def)2.68 F .43(ault 500\) is sa)-.1 F +-.15(ve)-.2 G 2.93(d. The).15 F(shell)2.93 E .287 +(stores each command in the history list prior to parameter and v)108 +278.4 R .287(ariable e)-.25 F .287(xpansion \(see)-.15 F F5(EXP)2.787 E +(ANSION)-.666 E F0(abo)2.537 E -.15(ve)-.15 G(\)).15 E -.2(bu)108 290.4 +S 4.065(ta).2 G 1.565(fter history e)-4.065 F 1.565 +(xpansion is performed, subject to the v)-.15 F 1.565 +(alues of the shell v)-.25 F(ariables)-.25 E F5(HISTIGNORE)4.065 E F0 +(and)3.816 E F5(HISTCONTR)108 302.4 Q(OL)-.27 E/F6 9/Times-Roman@0 SF(.) +A F0 .082 +(On startup, the history is initialized from the \214le named by the v) +108 319.2 R(ariable)-.25 E F5(HISTFILE)2.582 E F0(\(def)2.332 E(ault)-.1 +E F4(~/.bash_history)2.582 E F0(\).)A .315(The \214le named by the v)108 +331.2 R .315(alue of)-.25 F F5(HISTFILE)2.815 E F0 .315 +(is truncated, if necessary)2.565 F 2.815(,t)-.65 G 2.815(oc)-2.815 G +.315(ontain no more than the number of)-2.815 F .659 +(lines speci\214ed by the v)108 343.2 R .659(alue of)-.25 F F5 +(HISTFILESIZE)3.158 E F6(.)A F0(If)5.158 E F3(HISTFILESIZE)3.158 E F0 +.658(is unset, or set to null, a non-numeric)3.158 F -.25(va)108 355.2 S +.142(lue, or a numeric v).25 F .142 +(alue less than zero, the history \214le is not truncated.)-.25 F .142 +(When the history \214le is read, lines)5.142 F(be)108 367.2 Q 1.605 +(ginning with the history comment character follo)-.15 F 1.604 +(wed immediately by a digit are interpreted as time-)-.25 F .15 +(stamps for the follo)108 379.2 R .15(wing history line.)-.25 F .151 +(These timestamps are optionally displayed depending on the v)5.151 F +.151(alue of)-.25 F(the)108 391.2 Q F5(HISTTIMEFORMA)3.559 E(T)-.855 E +F0 -.25(va)3.309 G 3.559(riable. When).25 F 3.559(as)3.559 G 1.059 +(hell with history enabled e)-3.559 F 1.059(xits, the last)-.15 F F5 +($HISTSIZE)3.559 E F0 1.058(lines are)3.309 F .158 +(copied from the history list to)108 403.2 R F5($HISTFILE)2.658 E F6(.)A +F0 .158(If the)4.658 F F3(histappend)2.658 E F0 .159 +(shell option is enabled \(see the description of)2.659 F F3(shopt)108 +415.2 Q F0(under)2.582 E F5 .082(SHELL B)2.582 F(UIL)-.09 E .082 +(TIN COMMANDS)-.828 F F0(belo)2.332 E .082 +(w\), the lines are appended to the history \214le, otherwise the)-.25 F +.196(history \214le is o)108 427.2 R -.15(ve)-.15 G 2.696(rwritten. If) +.15 F F5(HISTFILE)2.696 E F0 .197(is unset, or if the history \214le is\ + unwritable, the history is not sa)2.446 F -.15(ve)-.2 G(d.).15 E .584 +(If the)108 439.2 R F5(HISTTIMEFORMA)3.084 E(T)-.855 E F0 -.25(va)2.834 +G .584 +(riable is set, time stamps are written to the history \214le, mark).25 +F .583(ed with the his-)-.1 F 1.147(tory comment character)108 451.2 R +3.647(,s)-.4 G 3.647(ot)-3.647 G(he)-3.647 E 3.647(ym)-.15 G 1.147 +(ay be preserv)-3.647 F 1.147(ed across shell sessions.)-.15 F 1.148 +(This uses the history comment)6.148 F 1.377 +(character to distinguish timestamps from other history lines.)108 463.2 +R 1.377(After sa)6.377 F 1.377(ving the history)-.2 F 3.876(,t)-.65 G +1.376(he history \214le is)-3.876 F .756 +(truncated to contain no more than)108 475.2 R F5(HISTFILESIZE)3.257 E +F0 3.257(lines. If)3.007 F F5(HISTFILESIZE)3.257 E F0 .757 +(is unset, or set to null, a non-)3.007 F(numeric v)108 487.2 Q +(alue, or a numeric v)-.25 E +(alue less than zero, the history \214le is not truncated.)-.25 E .299 +(The b)108 504 R .299(uiltin command)-.2 F F3(fc)2.799 E F0(\(see)2.799 +E F5 .299(SHELL B)2.799 F(UIL)-.09 E .299(TIN COMMANDS)-.828 F F0(belo) +2.549 E .298(w\) may be used to list or edit and re-e)-.25 F -.15(xe) +-.15 G(-).15 E .471(cute a portion of the history list.)108 516 R(The) +5.471 E F3(history)2.971 E F0 -.2(bu)2.971 G .472 +(iltin may be used to display or modify the history list and).2 F .002 +(manipulate the history \214le.)108 528 R .001 +(When using command-line editing, search commands are a)5.002 F -.25(va) +-.2 G .001(ilable in each edit-).25 F(ing mode that pro)108 540 Q +(vide access to the history list.)-.15 E 1.485(The shell allo)108 556.8 +R 1.485(ws control o)-.25 F -.15(ve)-.15 G 3.986(rw).15 G 1.486 +(hich commands are sa)-3.986 F -.15(ve)-.2 G 3.986(do).15 G 3.986(nt) +-3.986 G 1.486(he history list.)-3.986 F(The)6.486 E F5(HISTCONTR)3.986 +E(OL)-.27 E F0(and)3.736 E F5(HISTIGNORE)108 568.8 Q F0 -.25(va)2.708 G +.458(riables may be set to cause the shell to sa).25 F .757 -.15(ve o) +-.2 H .457(nly a subset of the commands entered.).15 F(The)5.457 E F3 +(cmdhist)108 580.8 Q F0 .75 +(shell option, if enabled, causes the shell to attempt to sa)3.25 F 1.05 +-.15(ve e)-.2 H .75(ach line of a multi-line command in).15 F 1.077 +(the same history entry)108 592.8 R 3.577(,a)-.65 G 1.077 +(dding semicolons where necessary to preserv)-3.577 F 3.577(es)-.15 G +1.077(yntactic correctness.)-3.577 F(The)6.077 E F3(lithist)3.576 E F0 +.373(shell option causes the shell to sa)108 604.8 R .674 -.15(ve t)-.2 +H .374(he command with embedded ne).15 F .374 +(wlines instead of semicolons.)-.25 F .374(See the)5.374 F .319 +(description of the)108 616.8 R F3(shopt)2.819 E F0 -.2(bu)2.819 G .318 +(iltin belo).2 F 2.818(wu)-.25 G(nder)-2.818 E F5 .318(SHELL B)2.818 F +(UIL)-.09 E .318(TIN COMMANDS)-.828 F F0 .318 +(for information on setting and)2.568 F(unsetting shell options.)108 +628.8 Q F2(HIST)72 645.6 Q(OR)-.197 E 2.738(YE)-.383 G(XP)-2.738 E +(ANSION)-.81 E F0 .61(The shell supports a history e)108 657.6 R .611 +(xpansion feature that is similar to the history e)-.15 F .611 +(xpansion in)-.15 F F3(csh)3.111 E F0 5.611(.T)C .611(his section)-5.611 +F .871(describes what syntax features are a)108 669.6 R -.25(va)-.2 G +3.371(ilable. This).25 F .871(feature is enabled by def)3.371 F .87 +(ault for interacti)-.1 F 1.17 -.15(ve s)-.25 H .87(hells, and).15 F +.949(can be disabled using the)108 681.6 R F3(+H)3.449 E F0 .949 +(option to the)3.449 F F3(set)3.449 E F0 -.2(bu)3.449 G .949 +(iltin command \(see).2 F F5 .949(SHELL B)3.449 F(UIL)-.09 E .95 +(TIN COMMANDS)-.828 F F0(be-)3.2 E(lo)108 693.6 Q 2.5 +(w\). Non-interacti)-.25 F .3 -.15(ve s)-.25 H +(hells do not perform history e).15 E(xpansion by def)-.15 E(ault.)-.1 E +1.306(History e)108 710.4 R 1.306(xpansions introduce w)-.15 F 1.306(or\ +ds from the history list into the input stream, making it easy to repea\ +t)-.1 F .209(commands, insert the ar)108 722.4 R .209(guments to a pre) +-.18 F .21 +(vious command into the current input line, or \214x errors in pre)-.25 +F(vious)-.25 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(54) +190.395 E 0 Cg EP +%%Page: 55 55 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E(commands quickly) +108 84 Q(.)-.65 E 1.164(History e)108 100.8 R 1.163(xpansion is perform\ +ed immediately after a complete line is read, before the shell breaks i\ +t into)-.15 F -.1(wo)108 112.8 S .251 +(rds, and is performed on each line indi).1 F .251 +(vidually without taking quoting on pre)-.25 F .252 +(vious lines into account.)-.25 F(It)5.252 E(tak)108 124.8 Q .146 +(es place in tw)-.1 F 2.646(op)-.1 G 2.646(arts. The)-2.646 F .146(\214\ +rst is to determine which line from the history list to use during subs\ +titution.)2.646 F .766(The second is to select portions of that line fo\ +r inclusion into the current one.)108 136.8 R .767 +(The line selected from the)5.767 F .254(history is the)108 148.8 R/F1 +10/Times-Italic@0 SF -.15(ev)2.754 G(ent).15 E F0 2.753(,a)C .253 +(nd the portions of that line that are acted upon are)-2.753 F F1(wor) +2.753 E(ds)-.37 E F0 5.253(.V)C(arious)-6.363 E F1(modi\214er)2.753 E(s) +-.1 E F0 .253(are a)2.753 F -.25(va)-.2 G(il-).25 E .538 +(able to manipulate the selected w)108 160.8 R 3.038(ords. The)-.1 F +.538(line is brok)3.038 F .538(en into w)-.1 F .539(ords in the same f) +-.1 F .539(ashion as when reading)-.1 F .573(input, so that se)108 172.8 +R -.15(ve)-.25 G(ral).15 E F1(metac)3.073 E(har)-.15 E(acter)-.15 E F0 +.572(-separated w)B .572(ords surrounded by quotes are considered one w) +-.1 F 3.072(ord. His-)-.1 F .355(tory e)108 184.8 R .355 +(xpansions are introduced by the appearance of the history e)-.15 F .355 +(xpansion character)-.15 F 2.855(,w)-.4 G .356(hich is)-2.855 F/F2 10 +/Times-Bold@0 SF(!)3.689 E F0 .356(by def)3.689 F(ault.)-.1 E .791 +(Only backslash \()108 196.8 R F2(\\).833 E F0 3.291(\)a).833 G .79 +(nd single quotes can quote the history e)-3.291 F .79 +(xpansion character)-.15 F 3.29(,b)-.4 G .79(ut the history e)-3.49 F +(xpansion)-.15 E .789(character is also treated as quoted if it immedia\ +tely precedes the closing double quote in a double-quoted)108 208.8 R +(string.)108 220.8 Q(Se)108 237.6 Q -.15(ve)-.25 G .03 +(ral characters inhibit history e).15 F .03 +(xpansion if found immediately follo)-.15 F .03(wing the history e)-.25 +F .03(xpansion character)-.15 F(,)-.4 E -2.15 -.25(ev e)108 249.6 T +3.162(ni).25 G 3.162(fi)-3.162 G 3.162(ti)-3.162 G 3.162(su)-3.162 G +.662(nquoted: space, tab, ne)-3.162 F .662(wline, carriage return, and) +-.25 F F2(=)3.162 E F0 5.662(.I)C 3.162(ft)-5.662 G(he)-3.162 E F2 +(extglob)3.162 E F0 .662(shell option is enabled,)3.162 F F2(\()3.163 E +F0(will also inhibit e)108 261.6 Q(xpansion.)-.15 E(Se)108 278.4 Q -.15 +(ve)-.25 G .11(ral shell options settable with the).15 F F2(shopt)2.61 E +F0 -.2(bu)2.61 G .109(iltin may be used to tailor the beha).2 F .109 +(vior of history e)-.2 F(xpansion.)-.15 E .231(If the)108 290.4 R F2 +(histv)2.731 E(erify)-.1 E F0 .231 +(shell option is enabled \(see the description of the)2.731 F F2(shopt) +2.731 E F0 -.2(bu)2.731 G .231(iltin belo).2 F .231(w\), and)-.25 F F2 +-.18(re)2.731 G(adline).18 E F0 .232(is be-)2.732 F .449(ing used, hist\ +ory substitutions are not immediately passed to the shell parser)108 +302.4 R 5.449(.I)-.55 G .448(nstead, the e)-5.449 F .448 +(xpanded line is)-.15 F 2.228(reloaded into the)108 314.4 R F2 -.18(re) +4.728 G(adline).18 E F0 2.228(editing b)4.728 F(uf)-.2 E 2.228 +(fer for further modi\214cation.)-.25 F(If)7.228 E F2 -.18(re)4.728 G +(adline).18 E F0 2.228(is being used, and the)4.728 F F2(histr)108 326.4 +Q(eedit)-.18 E F0 1.202(shell option is enabled, a f)3.702 F 1.202 +(ailed history substitution will be reloaded into the)-.1 F F2 -.18(re) +3.702 G(adline).18 E F0(editing)3.702 E -.2(bu)108 338.4 S -.25(ff).2 G +.303(er for correction.).25 F(The)5.303 E F22.803 E F0 .303 +(option to the)2.803 F F2(history)2.804 E F0 -.2(bu)2.804 G .304 +(iltin command may be used to see what a history e).2 F(x-)-.15 E .52 +(pansion will do before using it.)108 350.4 R(The)5.52 E F23.02 E +F0 .52(option to the)3.02 F F2(history)3.02 E F0 -.2(bu)3.02 G .52 +(iltin may be used to add commands to the).2 F +(end of the history list without actually e)108 362.4 Q -.15(xe)-.15 G +(cuting them, so that the).15 E 2.5(ya)-.15 G(re a)-2.5 E -.25(va)-.2 G +(ilable for subsequent recall.).25 E 1.108(The shell allo)108 379.2 R +1.108(ws control of the v)-.25 F 1.108 +(arious characters used by the history e)-.25 F 1.108 +(xpansion mechanism \(see the de-)-.15 F .163(scription of)108 391.2 R +F2(histchars)2.663 E F0(abo)2.663 E .463 -.15(ve u)-.15 H(nder).15 E F2 +.163(Shell V)2.663 F(ariables)-.92 E F0 2.663(\). The)B .162 +(shell uses the history comment character to mark)2.663 F +(history timestamps when writing the history \214le.)108 403.2 Q F2(Ev) +87 420 Q(ent Designators)-.1 E F0 .204(An e)108 432 R -.15(ve)-.25 G +.204(nt designator is a reference to a command line entry in the histor\ +y list.).15 F .205(Unless the reference is abso-)5.204 F(lute, e)108 444 +Q -.15(ve)-.25 G(nts are relati).15 E .3 -.15(ve t)-.25 H 2.5(ot).15 G +(he current position in the history list.)-2.5 E F2(!)108 460.8 Q F0 +1.608(Start a history substitution, e)144 460.8 R 1.608 +(xcept when follo)-.15 F 1.607(wed by a)-.25 F F2(blank)4.107 E F0 4.107 +(,n)C -.25(ew)-4.107 G 1.607(line, carriage return, = or \().25 F +(\(when the)144 472.8 Q F2(extglob)2.5 E F0 +(shell option is enabled using the)2.5 E F2(shopt)2.5 E F0 -.2(bu)2.5 G +(iltin\).).2 E F2(!)108 484.8 Q F1(n)A F0(Refer to command line)144 +484.8 Q F1(n)2.86 E F0(.).24 E F2<21ad>108 496.8 Q F1(n)A F0 +(Refer to the current command minus)144 496.8 Q F1(n)2.86 E F0(.).24 E +F2(!!)108 508.8 Q F0(Refer to the pre)144 508.8 Q(vious command.)-.25 E +(This is a synon)5 E(ym for `!\2551'.)-.15 E F2(!)108 520.8 Q F1(string) +A F0 .865(Refer to the most recent command preceding the current positi\ +on in the history list starting with)144 520.8 R F1(string)144.34 532.8 +Q F0(.).22 E F2(!?)108 544.8 Q F1(string)A F2([?])A F0 1.503(Refer to t\ +he most recent command preceding the current position in the history li\ +st containing)144 556.8 R F1(string)144.34 568.8 Q F0 5.496(.T).22 G +.496(he trailing)-5.496 F F2(?)2.996 E F0 .496(may be omitted if)2.996 F +F1(string)3.336 E F0 .497(is follo)3.216 F .497(wed immediately by a ne) +-.25 F 2.997(wline. If)-.25 F F1(string)2.997 E F0(is)2.997 E .391(miss\ +ing, the string from the most recent search is used; it is an error if \ +there is no pre)144 580.8 R .39(vious search)-.25 F(string.)144 592.8 Q +/F3 12/Times-Bold@0 SF(^)108 609.8 Q F1(string1)-5 I F3(^)5 I F1 +(string2)-5 I F3(^)5 I F0 .752(Quick substitution.)144 616.8 R .752 +(Repeat the pre)5.752 F .753(vious command, replacing)-.25 F F1(string1) +3.593 E F0(with)3.253 E F1(string2)3.593 E F0 5.753(.E).02 G(qui)-5.753 +E -.25(va)-.25 G .753(lent to).25 F -.74(``)144 628.8 S(!!:s).74 E/F4 12 +/Times-Roman@0 SF(^)5 I F1(string1)-5 I F4(^)5 I F1(string2)-5 I F4(^)5 +I F0 1.48 -.74('' \()-5 L(see).74 E F2(Modi\214ers)2.5 E F0(belo)2.5 E +(w\).)-.25 E F2(!#)108 640.8 Q F0(The entire command line typed so f)144 +640.8 Q(ar)-.1 E(.)-.55 E F2 -.75(Wo)87 657.6 S(rd Designators).75 E F0 +-.8(Wo)108 669.6 S 1.314(rd designators are used to select desired w).8 +F 1.314(ords from the e)-.1 F -.15(ve)-.25 G 3.814(nt. A).15 F F2(:) +3.814 E F0 1.313(separates the e)3.813 F -.15(ve)-.25 G 1.313 +(nt speci\214cation).15 F .529(from the w)108 681.6 R .529 +(ord designator)-.1 F 5.529(.I)-.55 G 3.029(tm)-5.529 G .529 +(ay be omitted if the w)-3.029 F .529(ord designator be)-.1 F .529 +(gins with a)-.15 F F2(^)3.029 E F0(,)A F2($)3.029 E F0(,)A F2(*)3.029 E +F0(,)A F23.029 E F0 3.029(,o)C(r)-3.029 E F2(%)3.029 E F0 5.53(.W)C +(ords)-6.33 E .516(are numbered from the be)108 693.6 R .516 +(ginning of the line, with the \214rst w)-.15 F .516 +(ord being denoted by 0 \(zero\).)-.1 F -.8(Wo)5.515 G .515(rds are in-) +.8 F(serted into the current line separated by single spaces.)108 705.6 +Q(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(55)190.395 E 0 Cg EP +%%Page: 56 56 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF 2.5(0\()108 84 S(zer)-2.5 E(o\))-.18 E F0(The zeroth w)144 96 Q 2.5 +(ord. F)-.1 F(or the shell, this is the command w)-.15 E(ord.)-.1 E/F2 +10/Times-Italic@0 SF(n)108.36 108 Q F0(The)144 108 Q F2(n)2.5 E F0(th w) +A(ord.)-.1 E F1(^)108 120 Q F0(The \214rst ar)144 120 Q 2.5 +(gument. That)-.18 F(is, w)2.5 E(ord 1.)-.1 E F1($)108 132 Q F0 .063 +(The last w)144 132 R 2.563(ord. This)-.1 F .063(is usually the last ar) +2.563 F .064(gument, b)-.18 F .064(ut will e)-.2 F .064 +(xpand to the zeroth w)-.15 F .064(ord if there is only)-.1 F(one w)144 +144 Q(ord in the line.)-.1 E F1(%)108 156 Q F0 1.42(The \214rst w)144 +156 R 1.42(ord matched by the most recent `?)-.1 F F2(string)A F0 1.419 +(?' search, if the search string be)B 1.419(gins with a)-.15 F +(character that is part of a w)144 168 Q(ord.)-.1 E F2(x)108.77 180 Q F1 +A F2(y)A F0 2.5(Ar)144 180 S(ange of w)-2.5 E(ords; `\255)-.1 E F2 +(y)A F0 2.5('a)C(bbre)-2.5 E(viates `0\255)-.25 E F2(y)A F0('.)A F1(*) +108 192 Q F0 .315(All of the w)144 192 R .315(ords b)-.1 F .315 +(ut the zeroth.)-.2 F .315(This is a synon)5.315 F .315(ym for `)-.15 F +F2(1\255$)A F0 2.815('. It)B .315(is not an error to use)2.815 F F1(*) +2.816 E F0 .316(if there is)2.816 F(just one w)144 204 Q(ord in the e) +-.1 E -.15(ve)-.25 G(nt; the empty string is returned in that case.).15 +E F1(x*)108 216 Q F0(Abbre)144 216 Q(viates)-.25 E F2(x\255$)2.5 E F0(.) +A F1<78ad>108 228 Q F0(Abbre)144 228 Q(viates)-.25 E F2(x\255$)2.5 E F0 +(lik)2.5 E(e)-.1 E F1(x*)2.5 E F0 2.5(,b)C(ut omits the last w)-2.7 E +2.5(ord. If)-.1 F F1(x)2.5 E F0(is missing, it def)2.5 E(aults to 0.)-.1 +E(If a w)108 244.8 Q(ord designator is supplied without an e)-.1 E -.15 +(ve)-.25 G(nt speci\214cation, the pre).15 E +(vious command is used as the e)-.25 E -.15(ve)-.25 G(nt.).15 E F1 +(Modi\214ers)87 261.6 Q F0 .184(After the optional w)108 273.6 R .184 +(ord designator)-.1 F 2.684(,t)-.4 G .183 +(here may appear a sequence of one or more of the follo)-2.684 F .183 +(wing modi\214ers,)-.25 F(each preceded by a `:'.)108 285.6 Q +(These modify)5 E 2.5(,o)-.65 G 2.5(re)-2.5 G(dit, the w)-2.5 E +(ord or w)-.1 E(ords selected from the history e)-.1 E -.15(ve)-.25 G +(nt.).15 E F1(h)108 302.4 Q F0(Remo)144 302.4 Q .3 -.15(ve a t)-.15 H +(railing \214lename component, lea).15 E(ving only the head.)-.2 E F1(t) +108 314.4 Q F0(Remo)144 314.4 Q .3 -.15(ve a)-.15 H +(ll leading \214lename components, lea).15 E(ving the tail.)-.2 E F1(r) +108 326.4 Q F0(Remo)144 326.4 Q .3 -.15(ve a t)-.15 H(railing suf).15 E +(\214x of the form)-.25 E F2(.xxx)2.5 E F0 2.5(,l)C(ea)-2.5 E +(ving the basename.)-.2 E F1(e)108 338.4 Q F0(Remo)144 338.4 Q .3 -.15 +(ve a)-.15 H(ll b).15 E(ut the trailing suf)-.2 E(\214x.)-.25 E F1(p)108 +350.4 Q F0(Print the ne)144 350.4 Q 2.5(wc)-.25 G(ommand b)-2.5 E +(ut do not e)-.2 E -.15(xe)-.15 G(cute it.).15 E F1(q)108 362.4 Q F0 +(Quote the substituted w)144 362.4 Q +(ords, escaping further substitutions.)-.1 E F1(x)108 374.4 Q F0 .385 +(Quote the substituted w)144 374.4 R .385(ords as with)-.1 F F1(q)2.885 +E F0 2.885(,b)C .386(ut break into w)-3.085 F .386(ords at)-.1 F F1 +(blanks)2.886 E F0 .386(and ne)2.886 F 2.886(wlines. The)-.25 F F1(q) +2.886 E F0(and)2.886 E F1(x)2.886 E F0(modi\214ers are mutually e)144 +386.4 Q(xclusi)-.15 E -.15(ve)-.25 G 2.5(;t).15 G +(he last one supplied is used.)-2.5 E F1(s/)108 398.4 Q F2(old)A F1(/)A +F2(ne)A(w)-.15 E F1(/)A F0(Substitute)144 410.4 Q F2(ne)3.329 E(w)-.15 E +F0 .469(for the \214rst occurrence of)3.279 F F2(old)3.199 E F0 .469 +(in the e)3.739 F -.15(ve)-.25 G .469(nt line.).15 F(An)5.469 E 2.969 +(yc)-.15 G .469(haracter may be used as the)-2.969 F .953 +(delimiter in place of /.)144 422.4 R .953 +(The \214nal delimiter is optional if it is the last character of the e) +5.953 F -.15(ve)-.25 G .954(nt line.).15 F .131 +(The delimiter may be quoted in)144 434.4 R F2(old)2.861 E F0(and)3.401 +E F2(ne)2.991 E(w)-.15 E F0 .131(with a single backslash.)2.941 F .131 +(If & appears in)5.131 F F2(ne)2.991 E(w)-.15 E F0 2.631(,i).31 G 2.631 +(ti)-2.631 G 2.631(sr)-2.631 G(e-)-2.631 E .619(placed by)144 446.4 R F2 +(old)3.349 E F0 5.619(.A).77 G .619(single backslash will quote the &.) +-2.5 F(If)5.619 E F2(old)3.349 E F0 .619(is null, it is set to the last) +3.889 F F2(old)3.349 E F0(substi-)3.89 E .487(tuted, or)144 458.4 R +2.987(,i)-.4 G 2.987(fn)-2.987 G 2.987(op)-2.987 G(re)-2.987 E .486 +(vious history substitutions took place, the last)-.25 F F2(string)3.326 +E F0 .486(in a)3.206 F F1(!?)2.986 E F2(string)A F1([?])A F0 2.986 +(search. If)5.486 F F2(ne)144.36 470.4 Q(w)-.15 E F0 +(is null, each matching)2.81 E F2(old)2.73 E F0(is deleted.)3.27 E F1(&) +108 482.4 Q F0(Repeat the pre)144 482.4 Q(vious substitution.)-.25 E F1 +(g)108 494.4 Q F0 .397(Cause changes to be applied o)144 494.4 R -.15 +(ve)-.15 G 2.897(rt).15 G .398(he entire e)-2.897 F -.15(ve)-.25 G .398 +(nt line.).15 F .398(This is used in conjunction with `)5.398 F F1(:s)A +F0 2.898('\()C(e.g.,)-2.898 E(`)144 506.4 Q F1(:gs/)A F2(old)A F1(/)A F2 +(ne)A(w)-.15 E F1(/)A F0 .351('\) or `)B F1(:&)A F0 2.851('. If)B .351 +(used with `)2.851 F F1(:s)A F0 .351(', an)B 2.851(yd)-.15 G .35 +(elimiter can be used in place of /, and the \214nal de-)-2.851 F +(limiter is optional if it is the last character of the e)144 518.4 Q +-.15(ve)-.25 G(nt line.).15 E(An)5 E F1(a)2.5 E F0 +(may be used as a synon)2.5 E(ym for)-.15 E F1(g)2.5 E F0(.)A F1(G)108 +530.4 Q F0(Apply the follo)144 530.4 Q(wing `)-.25 E F1(s)A F0 2.5('o)C +2.5(r`)-2.5 G F1(&)-2.5 E F0 2.5('m)C(odi\214er once to each w)-2.5 E +(ord in the e)-.1 E -.15(ve)-.25 G(nt line.).15 E/F3 10.95/Times-Bold@0 +SF(SHELL B)72 547.2 Q(UIL)-.11 E(TIN COMMANDS)-1.007 E F0 .062 +(Unless otherwise noted, each b)108 559.2 R .062(uiltin command documen\ +ted in this section as accepting options preceded by)-.2 F F1108 +571.2 Q F0(accepts)3.077 E F13.077 E F0 .577 +(to signify the end of the options.)3.077 F(The)5.577 E F1(:)3.077 E F0 +(,)A F1(true)3.077 E F0(,)A F1(false)3.077 E F0 3.077(,a)C(nd)-3.077 E +F1(test)3.077 E F0(/)A F1([)A F0 -.2(bu)3.077 G .577 +(iltins do not accept options).2 F .461(and do not treat)108 583.2 R F1 +2.961 E F0(specially)2.961 E 5.461(.T)-.65 G(he)-5.461 E F1(exit) +2.961 E F0(,)A F1(logout)2.961 E F0(,)A F1 -.18(re)2.961 G(tur).18 E(n) +-.15 E F0(,)A F1(br)2.961 E(eak)-.18 E F0(,)A F1(continue)2.961 E F0(,)A +F1(let)2.961 E F0 2.961(,a)C(nd)-2.961 E F1(shift)2.961 E F0 -.2(bu) +2.962 G .462(iltins accept and).2 F .261(process ar)108 595.2 R .261 +(guments be)-.18 F .261(ginning with)-.15 F F12.761 E F0 .261 +(without requiring)2.761 F F12.761 E F0 5.261(.O)C .261(ther b) +-5.261 F .26(uiltins that accept ar)-.2 F .26(guments b)-.18 F .26 +(ut are not)-.2 F 1.154(speci\214ed as accepting options interpret ar) +108 607.2 R 1.154(guments be)-.18 F 1.154(ginning with)-.15 F F1 +3.654 E F0 1.154(as in)3.654 F -.25(va)-.4 G 1.154 +(lid options and require).25 F F13.654 E F0(to)3.654 E(pre)108 +619.2 Q -.15(ve)-.25 G(nt this interpretation.).15 E F1(:)108 637.2 Q F0 +([)2.5 E F2(ar)A(guments)-.37 E F0(])A .452(No ef)144 649.2 R .452 +(fect; the command does nothing be)-.25 F .452(yond e)-.15 F(xpanding) +-.15 E F2(ar)3.282 E(guments)-.37 E F0 .451(and performing an)3.221 F +2.951(ys)-.15 G(peci\214ed)-2.951 E 2.5(redirections. The)144 661.2 R +(return status is zero.)2.5 E F1(.)110.5 678 Q F2(\214lename)6.666 E F0 +([)2.5 E F2(ar)A(guments)-.37 E F0(])A F1(sour)108 690 Q(ce)-.18 E F2 +(\214lename)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A 1.02 +(Read and e)144 702 R -.15(xe)-.15 G 1.02(cute commands from).15 F F2 +(\214lename)5.43 E F0 1.02(in the current shell en)3.7 F 1.02 +(vironment and return the e)-.4 F(xit)-.15 E 1.331 +(status of the last command e)144 714 R -.15(xe)-.15 G 1.331(cuted from) +.15 F F2(\214lename)5.741 E F0 6.331(.I).18 G(f)-6.331 E F2(\214lename) +5.741 E F0 1.33(does not contain a slash, \214le-)4.011 F .488(names in) +144 726 R/F4 9/Times-Bold@0 SF -.666(PA)2.988 G(TH)-.189 E F0 .488 +(are used to \214nd the directory containing)2.738 F F2(\214lename)4.899 +E F0 5.489(.T).18 G .489(he \214le searched for in)-5.489 F F4 -.666(PA) +2.989 G(TH)-.189 E F0(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E +(56)190.395 E 0 Cg EP +%%Page: 57 57 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .833 +(need not be e)144 84 R -.15(xe)-.15 G 3.333(cutable. When).15 F/F1 10 +/Times-Bold@0 SF(bash)3.333 E F0 .832(is not in)3.333 F/F2 10 +/Times-Italic@0 SF .832(posix mode)3.332 F F0 3.332(,t)C .832 +(he current directory is searched if no)-3.332 F .981 +(\214le is found in)144 96 R/F3 9/Times-Bold@0 SF -.666(PA)3.481 G(TH) +-.189 E/F4 9/Times-Roman@0 SF(.)A F0 .981(If the)5.481 F F1(sour)3.481 E +(cepath)-.18 E F0 .981(option to the)3.481 F F1(shopt)3.481 E F0 -.2(bu) +3.481 G .981(iltin command is turned of).2 F .982(f, the)-.25 F F3 -.666 +(PA)144 108 S(TH)-.189 E F0 .112(is not searched.)2.363 F .112(If an) +5.112 F(y)-.15 E F2(ar)2.612 E(guments)-.37 E F0 .112(are supplied, the) +2.612 F 2.612(yb)-.15 G .112(ecome the positional parameters when)-2.612 +F F2(\214lename)144 120 Q F0 .485(is e)2.985 F -.15(xe)-.15 G 2.985 +(cuted. Otherwise).15 F .485(the positional parameters are unchanged.) +2.985 F .485(If the)5.485 F F12.985 E F0 .485(option is en-)2.985 +F(abled,)144 132 Q F1(sour)3.325 E(ce)-.18 E F0 .825(inherits an)3.325 F +3.325(yt)-.15 G .825(rap on)-3.325 F F1(DEB)3.325 E(UG)-.1 E F0 3.325 +(;i)C 3.325(fi)-3.325 G 3.324(ti)-3.325 G 3.324(sn)-3.324 G .824(ot, an) +-3.324 F(y)-.15 E F1(DEB)3.324 E(UG)-.1 E F0 .824(trap string is sa) +3.324 F -.15(ve)-.2 G 3.324(da).15 G .824(nd re-)-3.324 F .817 +(stored around the call to)144 144 R F1(sour)3.317 E(ce)-.18 E F0 3.317 +(,a)C(nd)-3.317 E F1(sour)3.317 E(ce)-.18 E F0 .817(unsets the)3.317 F +F1(DEB)3.317 E(UG)-.1 E F0 .817(trap while it e)3.317 F -.15(xe)-.15 G +3.317(cutes. If).15 F F13.317 E F0(is)3.318 E 1.435 +(not set, and the sourced \214le changes the)144 156 R F1(DEB)3.935 E +(UG)-.1 E F0 1.435(trap, the ne)3.935 F 3.935(wv)-.25 G 1.435 +(alue is retained when)-4.185 F F1(sour)3.935 E(ce)-.18 E F0 3.762 +(completes. The)144 168 R 1.262 +(return status is the status of the last command e)3.762 F 1.263 +(xited within the script \(0 if no)-.15 F(commands are e)144 180 Q -.15 +(xe)-.15 G(cuted\), and f).15 E(alse if)-.1 E F2(\214lename)4.41 E F0 +(is not found or cannot be read.)2.68 E F1(alias)108 196.8 Q F0([)2.5 E +F1A F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C(..]) +-2.5 E F1(Alias)144 208.8 Q F0 2.725(with no ar)5.225 F 2.724 +(guments or with the)-.18 F F15.224 E F0 2.724 +(option prints the list of aliases in the form)5.224 F F1(alias)5.224 E +F2(name)144 220.8 Q F0(=)A F2(value)A F0 .58(on standard output.)3.08 F +.58(When ar)5.58 F .58 +(guments are supplied, an alias is de\214ned for each)-.18 F F2(name) +3.08 E F0(whose)144 232.8 Q F2(value)2.509 E F0 .009(is gi)2.509 F -.15 +(ve)-.25 G 2.509(n. A).15 F .009(trailing space in)2.509 F F2(value) +2.509 E F0 .009(causes the ne)2.509 F .009(xt w)-.15 F .009 +(ord to be check)-.1 F .008(ed for alias substi-)-.1 F .579 +(tution when the alias is e)144 244.8 R 3.079(xpanded. F)-.15 F .579 +(or each)-.15 F F2(name)3.079 E F0 .579(in the ar)3.079 F .579 +(gument list for which no)-.18 F F2(value)3.079 E F0 .579(is sup-)3.079 +F 1.314(plied, the name and v)144 256.8 R 1.314 +(alue of the alias is printed.)-.25 F F1(Alias)6.314 E F0 1.314 +(returns true unless a)3.814 F F2(name)3.814 E F0 1.313(is gi)3.814 F +-.15(ve)-.25 G 3.813(nf).15 G(or)-3.813 E +(which no alias has been de\214ned.)144 268.8 Q F1(bg)108 285.6 Q F0([) +2.5 E F2(jobspec)A F0(...])2.5 E .744(Resume each suspended job)144 +297.6 R F2(jobspec)3.244 E F0 .745 +(in the background, as if it had been started with)3.244 F F1(&)3.245 E +F0 5.745(.I)C(f)-5.745 E F2(job-)4.985 E(spec)144 309.6 Q F0 .672 +(is not present, the shell')3.482 F 3.172(sn)-.55 G .672(otion of the) +-3.172 F F2(curr)3.172 E .672(ent job)-.37 F F0 .672(is used.)3.172 F F1 +(bg)5.671 E F2(jobspec)4.911 E F0 .671(returns 0 unless run)3.481 F .418 +(when job control is disabled or)144 321.6 R 2.919(,w)-.4 G .419 +(hen run with job control enabled, an)-2.919 F 2.919(ys)-.15 G +(peci\214ed)-2.919 E F2(jobspec)2.919 E F0 -.1(wa)2.919 G 2.919(sn).1 G +(ot)-2.919 E(found or w)144 333.6 Q(as started without job control.)-.1 +E F1(bind)108 350.4 Q F0([)2.5 E F1A F2 -.1(ke)2.5 G(ymap)-.2 E F0 +2.5(][)C F1(\255lpsvPSVX)-2.5 E F0(])A F1(bind)108 362.4 Q F0([)2.5 E F1 +A F2 -.1(ke)2.5 G(ymap)-.2 E F0 2.5(][)C F1-2.5 E F2 +(function)2.5 E F0 2.5(][)C F1-2.5 E F2(function)2.5 E F0 2.5(][)C +F1-2.5 E F2 -.1(ke)2.5 G(yseq)-.2 E F0(])A F1(bind)108 374.4 Q F0 +([)2.5 E F1A F2 -.1(ke)2.5 G(ymap)-.2 E F0(])A F12.5 E F2 +(\214lename)2.5 E F1(bind)108 386.4 Q F0([)2.5 E F1A F2 -.1(ke)2.5 +G(ymap)-.2 E F0(])A F12.5 E F2 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F2 +(shell\255command)A F1(bind)108 398.4 Q F0([)2.5 E F1A F2 -.1(ke) +2.5 G(ymap)-.2 E F0(])A F2 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F2 +(function\255name)A F1(bind)108 410.4 Q F0([)2.5 E F1A F2 -.1(ke) +2.5 G(ymap)-.2 E F0(])A F2 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F2 -.37(re)C +(adline\255command).37 E F0 .239(Display current)144 422.4 R F1 -.18(re) +2.739 G(adline).18 E F0 -.1(ke)2.739 G 2.739(ya)-.05 G .239 +(nd function bindings, bind a k)-2.739 F .539 -.15(ey s)-.1 H .238 +(equence to a).15 F F1 -.18(re)2.738 G(adline).18 E F0 .238(function or) +2.738 F .475(macro, or set a)144 434.4 R F1 -.18(re)2.975 G(adline).18 E +F0 -.25(va)2.975 G 2.975(riable. Each).25 F .476(non-option ar)2.976 F +.476(gument is a command as it w)-.18 F .476(ould appear in)-.1 F F2 +(.inputr)144.23 446.4 Q(c)-.37 E F0 2.968(,b).31 G .467 +(ut each binding or command must be passed as a separate ar)-3.168 F +.467(gument; e.g., '"\\C\255x\\C\255r":)-.18 F 2.5 +(re\255read\255init\255\214le'. Options,)144 458.4 R(if supplied, ha)2.5 +E .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1144 +470.4 Q F2 -.1(ke)2.5 G(ymap)-.2 E F0(Use)180 482.4 Q F2 -.1(ke)5.158 G +(ymap)-.2 E F0 2.658(as the k)5.348 F -.15(ey)-.1 G 2.658(map to be af) +.15 F 2.659(fected by the subsequent bindings.)-.25 F(Acceptable)7.659 E +F2 -.1(ke)180 494.4 S(ymap)-.2 E F0 3.193(names are)5.883 F F2 3.193 +(emacs, emacs\255standar)5.693 F 3.192 +(d, emacs\255meta, emacs\255ctlx, vi, vi\255mo)-.37 F(ve)-.1 E(,)-.1 E +(vi\255command)180 506.4 Q F0 4.089(,a)C(nd)-4.089 E F2(vi\255insert) +4.379 E F0(.).68 E F2(vi)6.589 E F0 1.589(is equi)4.089 F -.25(va)-.25 G +1.589(lent to).25 F F2(vi\255command)4.089 E F0(\()4.089 E F2(vi\255mo)A +(ve)-.1 E F0 1.59(is also a syn-)4.089 F(on)180 518.4 Q(ym\);)-.15 E F2 +(emacs)2.5 E F0(is equi)2.5 E -.25(va)-.25 G(lent to).25 E F2 +(emacs\255standar)2.5 E(d)-.37 E F0(.)A F1144 530.4 Q F0 +(List the names of all)180 530.4 Q F1 -.18(re)2.5 G(adline).18 E F0 +(functions.)2.5 E F1144 542.4 Q F0(Display)180 542.4 Q F1 -.18(re) +2.5 G(adline).18 E F0(function names and bindings in such a w)2.5 E +(ay that the)-.1 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F1144 554.4 +Q F0(List current)180 554.4 Q F1 -.18(re)2.5 G(adline).18 E F0 +(function names and bindings.)2.5 E F1144 566.4 Q F0(Display)180 +566.4 Q F1 -.18(re)3.655 G(adline).18 E F0 -.1(ke)3.655 G 3.655(ys)-.05 +G 1.155(equences bound to macros and the strings the)-3.655 F 3.655(yo) +-.15 G 1.155(utput in such a)-3.655 F -.1(wa)180 578.4 S 2.5(yt).1 G +(hat the)-2.5 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F1144 590.4 Q +F0(Display)180 590.4 Q F1 -.18(re)2.5 G(adline).18 E F0 -.1(ke)2.5 G 2.5 +(ys)-.05 G(equences bound to macros and the strings the)-2.5 E 2.5(yo) +-.15 G(utput.)-2.5 E F1144 602.4 Q F0(Display)180 602.4 Q F1 -.18 +(re)2.5 G(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E +(alues in such a w)-.25 E(ay that the)-.1 E 2.5(yc)-.15 G +(an be re-read.)-2.5 E F1144 614.4 Q F0(List current)180 614.4 Q +F1 -.18(re)2.5 G(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E +(alues.)-.25 E F1144 626.4 Q F2(\214lename)2.5 E F0(Read k)180 +638.4 Q .3 -.15(ey b)-.1 H(indings from).15 E F2(\214lename)2.5 E F0(.)A +F1144 650.4 Q F2(function)2.5 E F0(Query about which k)180 662.4 Q +-.15(ey)-.1 G 2.5(si).15 G -1.9 -.4(nv o)-2.5 H .2 -.1(ke t).4 H +(he named).1 E F2(function)2.5 E F0(.)A F1144 674.4 Q F2(function) +2.5 E F0(Unbind all k)180 686.4 Q -.15(ey)-.1 G 2.5(sb).15 G +(ound to the named)-2.5 E F2(function)2.5 E F0(.)A F1144 698.4 Q +F2 -.1(ke)2.5 G(yseq)-.2 E F0(Remo)180 710.4 Q .3 -.15(ve a)-.15 H .3 +-.15(ny c).15 H(urrent binding for).15 E F2 -.1(ke)2.5 G(yseq)-.2 E F0 +(.)A(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(57)190.395 E 0 Cg +EP +%%Page: 58 58 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF144 84 Q/F2 10/Times-Italic@0 SF -.1(ke)2.5 G(yseq)-.2 E F1(:)A +F2(shell\255command)A F0(Cause)180 96 Q F2(shell\255command)4.325 E F0 +1.825(to be e)4.325 F -.15(xe)-.15 G 1.825(cuted whene).15 F -.15(ve) +-.25 G(r).15 E F2 -.1(ke)4.325 G(yseq)-.2 E F0 1.825(is entered.)4.325 F +(When)6.825 E F2(shell\255com-)4.325 E(mand)180 108 Q F0 1.765(is e) +4.265 F -.15(xe)-.15 G 1.765(cuted, the shell sets the).15 F/F3 9 +/Times-Bold@0 SF(READLINE_LINE)4.265 E F0 -.25(va)4.015 G 1.765 +(riable to the contents of the).25 F F1 -.18(re)180 120 S(adline).18 E +F0 .375(line b)2.874 F(uf)-.2 E .375(fer and the)-.25 F F3 +(READLINE_POINT)2.875 E F0(and)2.625 E F3(READLINE_MARK)2.875 E F0 -.25 +(va)2.625 G .375(riables to the).25 F 1.186 +(current location of the insertion point and the sa)180 132 R -.15(ve) +-.2 G 3.685(di).15 G 1.185(nsertion point \(the mark\), respec-)-3.685 F +(ti)180 144 Q -.15(ve)-.25 G(ly).15 E 5.701(.I)-.65 G 3.201(ft)-5.701 G +.701(he e)-3.201 F -.15(xe)-.15 G .701(cuted command changes the v).15 F +.702(alue of an)-.25 F 3.202(yo)-.15 G(f)-3.202 E F3(READLINE_LINE)3.202 +E/F4 9/Times-Roman@0 SF(,)A F3(READ-)2.952 E(LINE_POINT)180 156 Q F4(,)A +F0(or)3.581 E F3(READLINE_MARK)3.831 E F4(,)A F0 1.331(those ne)3.581 F +3.831(wv)-.25 G 1.33(alues will be re\215ected in the editing)-4.081 F +(state.)180 168 Q F1144 180 Q F0 .829(List all k)180 180 R 1.129 +-.15(ey s)-.1 H .829 +(equences bound to shell commands and the associated commands in a for) +.15 F(-)-.2 E(mat that can be reused as input.)180 192 Q(The return v) +144 208.8 Q(alue is 0 unless an unrecognized option is gi)-.25 E -.15 +(ve)-.25 G 2.5(no).15 G 2.5(ra)-2.5 G 2.5(ne)-2.5 G(rror occurred.)-2.5 +E F1(br)108 225.6 Q(eak)-.18 E F0([)2.5 E F2(n)A F0(])A .055 +(Exit from within a)144 237.6 R F1 -.25(fo)2.555 G(r).25 E F0(,)A F1 +(while)2.555 E F0(,)A F1(until)2.555 E F0 2.555(,o)C(r)-2.555 E F1 +(select)2.555 E F0 2.555(loop. If)2.555 F F2(n)2.555 E F0 .055 +(is speci\214ed, break)2.555 F F2(n)2.555 E F0(le)2.555 E -.15(ve)-.25 G +(ls.).15 E F2(n)5.414 E F0 .054(must be)2.794 F/F5 10/Symbol SF2.554 +E F0(1.)2.554 E(If)144 249.6 Q F2(n)3.074 E F0 .215(is greater than the\ + number of enclosing loops, all enclosing loops are e)2.954 F 2.715 +(xited. The)-.15 F .215(return v)2.715 F(alue)-.25 E(is 0 unless)144 +261.6 Q F2(n)2.5 E F0(is not greater than or equal to 1.)2.5 E F1 -.2 +(bu)108 278.4 S(iltin).2 E F2(shell\255b)2.5 E(uiltin)-.2 E F0([)2.5 E +F2(ar)A(guments)-.37 E F0(])A(Ex)144 290.4 Q .771 +(ecute the speci\214ed shell b)-.15 F .771(uiltin, passing it)-.2 F F2 +(ar)3.601 E(guments)-.37 E F0 3.271(,a).27 G .771(nd return its e)-3.271 +F .77(xit status.)-.15 F .77(This is useful)5.77 F .615 +(when de\214ning a function whose name is the same as a shell b)144 +302.4 R .616(uiltin, retaining the functionality of)-.2 F .57(the b)144 +314.4 R .57(uiltin within the function.)-.2 F(The)5.57 E F1(cd)3.07 E F0 +-.2(bu)3.07 G .57(iltin is commonly rede\214ned this w).2 F(ay)-.1 E +5.57(.T)-.65 G .57(he return status)-5.57 F(is f)144 326.4 Q(alse if)-.1 +E F2(shell\255b)2.84 E(uiltin)-.2 E F0(is not a shell b)2.74 E +(uiltin command.)-.2 E F1(caller)108 343.2 Q F0([)2.5 E F2 -.2(ex)C(pr) +.2 E F0(])A .253(Returns the conte)144 355.2 R .254(xt of an)-.15 F +2.754(ya)-.15 G(cti)-2.754 E .554 -.15(ve s)-.25 H .254 +(ubroutine call \(a shell function or a script e).15 F -.15(xe)-.15 G +.254(cuted with the).15 F F1(.)2.754 E F0(or)2.754 E F1(sour)144 367.2 Q +(ce)-.18 E F0 -.2(bu)2.825 G 2.825(iltins\). W).2 F(ithout)-.4 E F2 -.2 +(ex)2.825 G(pr).2 E F0(,)A F1(caller)2.825 E F0 .324 +(displays the line number and source \214lename of the current)2.824 F +.253(subroutine call.)144 379.2 R .253(If a non-ne)5.253 F -.05(ga)-.15 +G(ti).05 E .553 -.15(ve i)-.25 H(nte).15 E .253(ger is supplied as)-.15 +F F2 -.2(ex)2.753 G(pr).2 E F0(,)A F1(caller)2.753 E F0 .254 +(displays the line number)2.754 F 2.754(,s)-.4 G(ub-)-2.754 E 1.327(rou\ +tine name, and source \214le corresponding to that position in the curr\ +ent e)144 391.2 R -.15(xe)-.15 G 1.327(cution call stack.).15 F(This e) +144 403.2 Q(xtra information may be used, for e)-.15 E .001 +(xample, to print a stack trace.)-.15 F .001(The current frame is frame) +5.001 F 3.02(0. The)144 415.2 R .52(return v)3.02 F .52 +(alue is 0 unless the shell is not e)-.25 F -.15(xe)-.15 G .519 +(cuting a subroutine call or).15 F F2 -.2(ex)3.019 G(pr).2 E F0 .519 +(does not corre-)3.019 F(spond to a v)144 427.2 Q +(alid position in the call stack.)-.25 E F1(cd)108 444 Q F0([)2.5 E F1 +A F0(|[)A F1A F0([)2.5 E F1A F0(]] [\255@]] [)A F2 +(dir)A F0(])A .321(Change the current directory to)144 456 R F2(dir) +2.821 E F0 5.321(.i)C(f)-5.321 E F2(dir)2.821 E F0 .322 +(is not supplied, the v)2.821 F .322(alue of the)-.25 F F3(HOME)2.822 E +F0 .322(shell v)2.572 F .322(ariable is)-.25 F 1.036(the def)144 468 R +3.536(ault. An)-.1 F 3.536(ya)-.15 G 1.035(dditional ar)-3.536 F 1.035 +(guments follo)-.18 F(wing)-.25 E F2(dir)3.535 E F0 1.035(are ignored.) +3.535 F 1.035(The v)6.035 F(ariable)-.25 E F3(CDP)3.535 E -.855(AT)-.666 +G(H).855 E F0(de\214nes)3.285 E .826 +(the search path for the directory containing)144 480 R F2(dir)3.676 E +F0 3.326(:e).73 G .826(ach directory name in)-3.326 F F3(CDP)3.326 E +-.855(AT)-.666 G(H).855 E F0 .827(is searched for)3.077 F F2(dir)144 492 +Q F0 5.665(.A)C(lternati)-5.665 E .965 -.15(ve d)-.25 H .665 +(irectory names in).15 F F3(CDP)3.165 E -.855(AT)-.666 G(H).855 E F0 +.665(are separated by a colon \(:\).)2.915 F 3.165(An)5.665 G .664 +(ull directory name)-3.165 F(in)144 504 Q F3(CDP)3.101 E -.855(AT)-.666 +G(H).855 E F0 .601(is the same as the current directory)2.851 F 3.102 +(,i)-.65 G .602(.e., `)-3.102 F(`)-.74 E F1(.)A F0 -.74('')C 5.602(.I) +.74 G(f)-5.602 E F2(dir)3.452 E F0(be)3.832 E .602 +(gins with a slash \(/\), then)-.15 F F3(CD-)3.102 E -.666(PA)144 516 S +(TH)-.189 E F0 1.003(is not used.)3.254 F(The)6.003 E F13.503 E F0 +1.003(option causes)3.503 F F1(cd)3.503 E F0 1.003(to use the ph)3.503 F +1.003(ysical directory structure by resolving)-.05 F .123 +(symbolic links while tra)144 528 R -.15(ve)-.2 G(rsing).15 E F2(dir) +2.623 E F0 .123(and before processing instances of)2.623 F F2(..)2.623 E +F0(in)2.623 E F2(dir)2.623 E F0 .123(\(see also the)2.623 F F1 +2.623 E F0(op-)2.623 E .43(tion to the)144 540 R F1(set)2.93 E F0 -.2 +(bu)2.93 G .43(iltin command\); the).2 F F12.929 E F0 .429 +(option forces symbolic links to be follo)2.929 F .429(wed by resolving) +-.25 F .472(the link after processing instances of)144 552 R F2(..)2.972 +E F0(in)2.972 E F2(dir)2.973 E F0 5.473(.I)C(f)-5.473 E F2(..)2.973 E F0 +.473(appears in)2.973 F F2(dir)2.973 E F0 2.973(,i)C 2.973(ti)-2.973 G +2.973(sp)-2.973 G .473(rocessed by remo)-2.973 F .473(ving the)-.15 F +.948(immediately pre)144 564 R .948(vious pathname component from)-.25 F +F2(dir)3.448 E F0 3.448(,b)C .948(ack to a slash or the be)-3.448 F .948 +(ginning of)-.15 F F2(dir)3.448 E F0 5.948(.I)C(f)-5.948 E(the)144 576 Q +F12.868 E F0 .368(option is supplied with)2.868 F F12.868 E +F0 2.868(,a)C .368(nd the current w)-2.868 F .368 +(orking directory cannot be successfully deter)-.1 F(-)-.2 E .612 +(mined after a successful directory change,)144 588 R F1(cd)3.112 E F0 +.612(will return an unsuccessful status.)3.112 F .612(On systems that) +5.612 F .353(support it, the)144 600 R F12.853 E F0 .354 +(option presents the e)2.853 F .354(xtended attrib)-.15 F .354 +(utes associated with a \214le as a directory)-.2 F 5.354(.A)-.65 G(n) +-5.354 E(ar)144 612 Q .072(gument of)-.18 F F12.572 E F0 .072 +(is con)2.572 F -.15(ve)-.4 G .072(rted to).15 F F3($OLDPWD)2.572 E F0 +.072(before the directory change is attempted.)2.322 F .072 +(If a non-empty)5.072 F .054(directory name from)144 624 R F3(CDP)2.554 +E -.855(AT)-.666 G(H).855 E F0 .054(is used, or if)2.304 F F12.555 E +F0 .055(is the \214rst ar)2.555 F .055 +(gument, and the directory change is suc-)-.18 F .168 +(cessful, the absolute pathname of the ne)144 636 R 2.668(ww)-.25 G .168 +(orking directory is written to the standard output.)-2.768 F(The)5.168 +E(return v)144 648 Q(alue is true if the directory w)-.25 E +(as successfully changed; f)-.1 E(alse otherwise.)-.1 E F1(command)108 +664.8 Q F0([)2.5 E F1(\255pVv)A F0(])A F2(command)2.5 E F0([)2.5 E F2 +(ar)A(g)-.37 E F0(...])2.5 E(Run)144 676.8 Q F2(command)2.764 E F0(with) +3.334 E F2(ar)2.894 E(gs)-.37 E F0 .065 +(suppressing the normal shell function lookup.)2.834 F .065(Only b)5.065 +F .065(uiltin commands or)-.2 F .502(commands found in the)144 688.8 R +F3 -.666(PA)3.002 G(TH)-.189 E F0 .502(are e)2.752 F -.15(xe)-.15 G +3.002(cuted. If).15 F(the)3.002 E F13.002 E F0 .502(option is gi) +3.002 F -.15(ve)-.25 G .501(n, the search for).15 F F2(command)3.201 E +F0(is)3.771 E .399(performed using a def)144 700.8 R .399(ault v)-.1 F +.399(alue for)-.25 F F3 -.666(PA)2.899 G(TH)-.189 E F0 .4 +(that is guaranteed to \214nd all of the standard utilities.)2.649 F(If) +5.4 E .175(either the)144 712.8 R F12.675 E F0(or)2.675 E F1 +2.675 E F0 .175(option is supplied, a description of)2.675 F F2(command) +2.875 E F0 .174(is printed.)3.445 F(The)5.174 E F12.674 E F0 .174 +(option causes)2.674 F 3.317(as)144 724.8 S .817(ingle w)-3.317 F .817 +(ord indicating the command or \214lename used to in)-.1 F -.2(vo)-.4 G +-.1(ke).2 G F2(command)3.618 E F0 .818(to be displayed; the)4.088 F +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(58)190.395 E 0 Cg EP +%%Page: 59 59 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF144 84 Q F0 .25(option produces a more v)2.75 F .25 +(erbose description.)-.15 F .249(If the)5.25 F F12.749 E F0(or) +2.749 E F12.749 E F0 .249(option is supplied, the e)2.749 F .249 +(xit status)-.15 F 1.004(is 0 if)144 96 R/F2 10/Times-Italic@0 SF +(command)3.704 E F0 -.1(wa)4.274 G 3.504(sf).1 G 1.005 +(ound, and 1 if not.)-3.504 F 1.005 +(If neither option is supplied and an error occurred or)6.005 F F2 +(command)144.2 108 Q F0 1.599(cannot be found, the e)4.869 F 1.599 +(xit status is 127.)-.15 F 1.599(Otherwise, the e)6.599 F 1.598 +(xit status of the)-.15 F F1(command)4.098 E F0 -.2(bu)144 120 S +(iltin is the e).2 E(xit status of)-.15 E F2(command)2.7 E F0(.).77 E F1 +(compgen)108 136.8 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(wor)-2.5 E(d) +-.37 E F0(])A .012(Generate possible completion matches for)144 148.8 R +F2(wor)2.513 E(d)-.37 E F0 .013(according to the)2.513 F F2(option)2.513 +E F0 .013(s, which may be an)B 2.513(yo)-.15 G(ption)-2.513 E .982 +(accepted by the)144 160.8 R F1(complete)3.482 E F0 -.2(bu)3.481 G .981 +(iltin with the e).2 F .981(xception of)-.15 F F13.481 E F0(and) +3.481 E F13.481 E F0 3.481(,a)C .981(nd write the matches to the) +-3.481 F .13(standard output.)144 172.8 R .13(When using the)5.13 F F1 +2.63 E F0(or)2.63 E F12.631 E F0 .131(options, the v)2.631 F +.131(arious shell v)-.25 F .131(ariables set by the program-)-.25 F +(mable completion f)144 184.8 Q(acilities, while a)-.1 E -.25(va)-.2 G +(ilable, will not ha).25 E .3 -.15(ve u)-.2 H(seful v).15 E(alues.)-.25 +E .352(The matches will be generated in the same w)144 208.8 R .352 +(ay as if the programmable completion code had gen-)-.1 F .02(erated th\ +em directly from a completion speci\214cation with the same \215ags.)144 +220.8 R(If)5.02 E F2(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only) +2.52 F(those completions matching)144 232.8 Q F2(wor)2.5 E(d)-.37 E F0 +(will be displayed.)2.5 E(The return v)144 256.8 Q +(alue is true unless an in)-.25 E -.25(va)-.4 G +(lid option is supplied, or no matches were generated.).25 E F1 +(complete)108 273.6 Q F0([)2.5 E F1(\255abcdefgjksuv)A F0 2.5(][)C F1 +-2.5 E F2(comp-option)2.5 E F0 2.5(][)C F1(\255DEI)-2.5 E F0 2.5 +(][)C F1-2.5 E F2(action)2.5 E F0 2.5(][)C F1-2.5 E F2 +(globpat)2.5 E F0 2.5(][)C F1-2.5 E F2(wor)2.5 E(dlist)-.37 E F0 +(])A([)144 285.6 Q F1A F2(function)2.5 E F0 2.5(][)C F1-2.5 +E F2(command)2.5 E F0 2.5(][)C F1-2.5 E F2(\214lterpat)2.5 E F0 +2.5(][)C F1-2.5 E F2(pr)2.5 E(e\214x)-.37 E F0 2.5(][)C F1 +-2.5 E F2(suf)2.5 E<8c78>-.18 E F0(])A F2(name)2.5 E F0([)2.5 E F2 +(name ...)A F0(])A F1(complete \255pr)108 297.6 Q F0([)2.5 E F1(\255DEI) +A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E .634(Specify ho)144 309.6 R +3.134(wa)-.25 G -.18(rg)-3.134 G .634(uments to each).18 F F2(name)3.134 +E F0 .634(should be completed.)3.134 F .633(If the)5.634 F F13.133 +E F0 .633(option is supplied, or if no)3.133 F .139 +(options are supplied, e)144 321.6 R .139 +(xisting completion speci\214cations are printed in a w)-.15 F .14 +(ay that allo)-.1 F .14(ws them to be)-.25 F .31(reused as input.)144 +333.6 R(The)5.31 E F12.81 E F0 .31(option remo)2.81 F -.15(ve)-.15 +G 2.81(sac).15 G .31(ompletion speci\214cation for each)-2.81 F F2(name) +2.81 E F0 2.81(,o)C 1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E F2 +(name)2.81 E F0(s)A 1.207 +(are supplied, all completion speci\214cations.)144 345.6 R(The)6.207 E +F13.707 E F0 1.208(option indicates that other supplied options) +3.708 F .5(and actions should apply to the `)144 357.6 R(`def)-.74 E +(ault')-.1 E 3('c)-.74 G .5 +(ommand completion; that is, completion attempted on)-3 F 3.455(ac)144 +369.6 S .955(ommand for which no completion has pre)-3.455 F .955 +(viously been de\214ned.)-.25 F(The)5.955 E F13.455 E F0 .955 +(option indicates that)3.455 F .876 +(other supplied options and actions should apply to `)144 381.6 R +(`empty')-.74 E 3.376('c)-.74 G .876(ommand completion; that is, com-) +-3.376 F .447(pletion attempted on a blank line.)144 393.6 R(The)5.447 E +F12.947 E F0 .448 +(option indicates that other supplied options and actions)2.947 F .123 +(should apply to completion on the initial non-assignment w)144 405.6 R +.123(ord on the line, or after a command de-)-.1 F 1.02(limiter such as) +144 417.6 R F1(;)3.52 E F0(or)3.52 E F1(|)3.52 E F0 3.52(,w)C 1.021 +(hich is usually command name completion.)-3.52 F 1.021 +(If multiple options are sup-)6.021 F .708(plied, the)144 429.6 R F1 +3.208 E F0 .708(option tak)3.208 F .708(es precedence o)-.1 F -.15 +(ve)-.15 G(r).15 E F13.208 E F0 3.208(,a)C .708(nd both tak)-3.208 +F 3.208(ep)-.1 G .707(recedence o)-3.208 F -.15(ve)-.15 G(r).15 E F1 +3.207 E F0 5.707(.I)C 3.207(fa)-5.707 G 1.007 -.15(ny o)-3.207 H +(f).15 E F13.207 E F0(,)A F1144 441.6 Q F0 2.603(,o)C(r) +-2.603 E F12.603 E F0 .103(are supplied, an)2.603 F 2.603(yo)-.15 +G(ther)-2.603 E F2(name)2.603 E F0(ar)2.603 E .103 +(guments are ignored; these completions only apply to the)-.18 F +(case speci\214ed by the option.)144 453.6 Q .153 +(The process of applying these completion speci\214cations when w)144 +477.6 R .152(ord completion is attempted is de-)-.1 F(scribed abo)144 +489.6 Q .3 -.15(ve u)-.15 H(nder).15 E F1(Pr)2.5 E +(ogrammable Completion)-.18 E F0(.)A .555 +(Other options, if speci\214ed, ha)144 513.6 R .855 -.15(ve t)-.2 H .555 +(he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F .555 +(guments to the)-.18 F F13.056 E F0(,)A F13.056 E F0 3.056 +(,a)C(nd)-3.056 E F13.056 E F0 .723(options \(and, if necessary) +144 525.6 R 3.223(,t)-.65 G(he)-3.223 E F13.223 E F0(and)3.223 E +F13.223 E F0 .722 +(options\) should be quoted to protect them from e)3.223 F(xpan-)-.15 E +(sion before the)144 537.6 Q F1(complete)2.5 E F0 -.2(bu)2.5 G +(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F1144 549.6 Q +F2(comp-option)2.5 E F0(The)184 561.6 Q F2(comp-option)2.79 E F0 .291 +(controls se)2.791 F -.15(ve)-.25 G .291(ral aspects of the compspec') +.15 F 2.791(sb)-.55 G(eha)-2.791 E .291(vior be)-.2 F .291 +(yond the simple)-.15 F(generation of completions.)184 573.6 Q F2 +(comp-option)5 E F0(may be one of:)2.5 E F1(bashdefault)184 585.6 Q F0 +.281(Perform the rest of the def)224 597.6 R(ault)-.1 E F1(bash)2.781 E +F0 .281(completions if the compspec generates no)2.781 F(matches.)224 +609.6 Q F1(default)184 621.6 Q F0 2.875(Use readline')224 621.6 R 5.375 +(sd)-.55 G(ef)-5.375 E 2.876 +(ault \214lename completion if the compspec generates no)-.1 F(matches.) +224 633.6 Q F1(dir)184 645.6 Q(names)-.15 E F0(Perform directory name c\ +ompletion if the compspec generates no matches.)224 657.6 Q F1 +(\214lenames)184 669.6 Q F0 -.7(Te)224 681.6 S .137(ll readline that th\ +e compspec generates \214lenames, so it can perform an).7 F 2.636<798c> +-.15 G(le-)-2.636 E .134(name\255speci\214c processing \(lik)224 693.6 R +2.634(ea)-.1 G .134(dding a slash to directory names, quoting spe-) +-2.634 F .45(cial characters, or suppressing trailing spaces\).)224 +705.6 R .45(Intended to be used with shell)5.45 F(functions.)224 717.6 Q +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(59)190.395 E 0 Cg EP +%%Page: 60 60 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(noquote)184 84 Q F0 -.7(Te)224 84 S .814 +(ll readline not to quote the completed w).7 F .814(ords if the)-.1 F +3.314(ya)-.15 G .815(re \214lenames \(quoting)-3.314 F +(\214lenames is the def)224 96 Q(ault\).)-.1 E F1(nosort)184 108 Q F0 +-.7(Te)224 108 S(ll readline not to sort the list of possible completio\ +ns alphabetically).7 E(.)-.65 E F1(nospace)184 120 Q F0 -.7(Te)224 120 S +.22(ll readline not to append a space \(the def).7 F .22(ault\) to w)-.1 +F .22(ords completed at the end)-.1 F(of the line.)224 132 Q F1 +(plusdirs)184 144 Q F0 1.985(After an)224 144 R 4.485(ym)-.15 G 1.985 +(atches de\214ned by the compspec are generated, directory name)-4.485 F +.584(completion is attempted and an)224 156 R 3.084(ym)-.15 G .584 +(atches are added to the results of the other)-3.084 F(actions.)224 168 +Q F1144 180 Q/F2 10/Times-Italic@0 SF(action)2.5 E F0(The)184 192 +Q F2(action)2.5 E F0(may be one of the follo)2.5 E +(wing to generate a list of possible completions:)-.25 E F1(alias)184 +204 Q F0(Alias names.)224 204 Q(May also be speci\214ed as)5 E F1 +2.5 E F0(.)A F1(arrayv)184 216 Q(ar)-.1 E F0(Array v)224 228 Q +(ariable names.)-.25 E F1(binding)184 240 Q(Readline)224 240 Q F0 -.1 +(ke)2.5 G 2.5(yb)-.05 G(inding names.)-2.5 E F1 -.2(bu)184 252 S(iltin) +.2 E F0(Names of shell b)224 252 Q(uiltin commands.)-.2 E +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1(command)184 264 +Q F0(Command names.)224 276 Q(May also be speci\214ed as)5 E F12.5 +E F0(.)A F1(dir)184 288 Q(ectory)-.18 E F0(Directory names.)224 300 Q +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1(disabled)184 312 +Q F0(Names of disabled shell b)224 324 Q(uiltins.)-.2 E F1(enabled)184 +336 Q F0(Names of enabled shell b)224 336 Q(uiltins.)-.2 E F1(export)184 +348 Q F0(Names of e)224 348 Q(xported shell v)-.15 E 2.5(ariables. May) +-.25 F(also be speci\214ed as)2.5 E F12.5 E F0(.)A F1(\214le)184 +360 Q F0(File names.)224 360 Q(May also be speci\214ed as)5 E F1 +2.5 E F0(.)A F1(function)184 372 Q F0(Names of shell functions.)224 384 +Q F1(gr)184 396 Q(oup)-.18 E F0(Group names.)224 396 Q +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1(helptopic)184 +408 Q F0(Help topics as accepted by the)224 420 Q F1(help)2.5 E F0 -.2 +(bu)2.5 G(iltin.).2 E F1(hostname)184 432 Q F0(Hostnames, as tak)224 444 +Q(en from the \214le speci\214ed by the)-.1 E/F3 9/Times-Bold@0 SF +(HOSTFILE)2.5 E F0(shell v)2.25 E(ariable.)-.25 E F1(job)184 456 Q F0 +(Job names, if job control is acti)224 456 Q -.15(ve)-.25 G 5(.M).15 G +(ay also be speci\214ed as)-5 E F12.5 E F0(.)A F1 -.1(ke)184 468 S +(yw).1 E(ord)-.1 E F0(Shell reserv)224 480 Q(ed w)-.15 E 2.5(ords. May) +-.1 F(also be speci\214ed as)2.5 E F12.5 E F0(.)A F1(running)184 +492 Q F0(Names of running jobs, if job control is acti)224 492 Q -.15 +(ve)-.25 G(.).15 E F1(ser)184 504 Q(vice)-.1 E F0(Service names.)224 504 +Q(May also be speci\214ed as)5 E F12.5 E F0(.)A F1(setopt)184 516 +Q F0 -1.11(Va)224 516 S(lid ar)1.11 E(guments for the)-.18 E F12.5 +E F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1 +(shopt)184 528 Q F0(Shell option names as accepted by the)224 528 Q F1 +(shopt)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(signal)184 540 Q F0 +(Signal names.)224 540 Q F1(stopped)184 552 Q F0 +(Names of stopped jobs, if job control is acti)224 552 Q -.15(ve)-.25 G +(.).15 E F1(user)184 564 Q F0(User names.)224 564 Q +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1 -.1(va)184 576 S +(riable).1 E F0(Names of all shell v)224 576 Q 2.5(ariables. May)-.25 F +(also be speci\214ed as)2.5 E F12.5 E F0(.)A F1144 588 Q F2 +(command)2.5 E(command)184 600 Q F0 1.055(is e)3.555 F -.15(xe)-.15 G +1.055(cuted in a subshell en).15 F 1.056 +(vironment, and its output is used as the possible)-.4 F(completions.) +184 612 Q F1144 624 Q F2(function)2.5 E F0 .114 +(The shell function)184 636 R F2(function)2.614 E F0 .114(is e)2.614 F +-.15(xe)-.15 G .114(cuted in the current shell en).15 F 2.614 +(vironment. When)-.4 F .113(the func-)2.613 F .816(tion is e)184 648 R +-.15(xe)-.15 G .816(cuted, the \214rst ar).15 F .816(gument \()-.18 F F1 +($1)A F0 3.316(\)i)C 3.316(st)-3.316 G .817 +(he name of the command whose ar)-3.316 F(guments)-.18 E 1.407 +(are being completed, the second ar)184 660 R 1.407(gument \()-.18 F F1 +($2)A F0 3.907(\)i)C 3.907(st)-3.907 G 1.407(he w)-3.907 F 1.407 +(ord being completed, and the)-.1 F .103(third ar)184 672 R .103 +(gument \()-.18 F F1($3)A F0 2.603(\)i)C 2.603(st)-2.603 G .103(he w) +-2.603 F .104(ord preceding the w)-.1 F .104 +(ord being completed on the current com-)-.1 F .102(mand line.)184 684 R +.102(When it \214nishes, the possible completions are retrie)5.102 F +-.15(ve)-.25 G 2.601(df).15 G .101(rom the v)-2.601 F .101(alue of the) +-.25 F F3(COMPREPL)184 696 Q(Y)-.828 E F0(array v)2.25 E(ariable.)-.25 E +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(60)190.395 E 0 Cg EP +%%Page: 61 61 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF144 84 Q/F2 10/Times-Italic@0 SF(globpat)2.5 E F0 1.007 +(The pathname e)184 96 R 1.007(xpansion pattern)-.15 F F2(globpat)3.507 +E F0 1.007(is e)3.507 F 1.008(xpanded to generate the possible comple-) +-.15 F(tions.)184 108 Q F1144 120 Q F2(pr)2.5 E(e\214x)-.37 E(pr) +184 132 Q(e\214x)-.37 E F0 .535(is added at the be)3.035 F .534 +(ginning of each possible completion after all other options ha)-.15 F +-.15(ve)-.2 G(been applied.)184 144 Q F1144 156 Q F2(suf)2.5 E +<8c78>-.18 E(suf)184 156 Q<8c78>-.18 E F0 +(is appended to each possible completion after all other options ha)2.5 +E .3 -.15(ve b)-.2 H(een applied.).15 E F1144 168 Q F2(wor)2.5 E +(dlist)-.37 E F0(The)184 180 Q F2(wor)3.639 E(dlist)-.37 E F0 1.14 +(is split using the characters in the)3.639 F/F3 9/Times-Bold@0 SF(IFS) +3.64 E F0 1.14(special v)3.39 F 1.14(ariable as delimiters, and)-.25 F +.981(each resultant w)184 192 R .981(ord is e)-.1 F 3.481 +(xpanded. Shell)-.15 F .981(quoting is honored within)3.481 F F2(wor) +3.481 E(dlist)-.37 E F0 3.48(,i)C 3.48(no)-3.48 G .98(rder to)-3.48 F +(pro)184 204 Q .765(vide a mechanism for the w)-.15 F .766 +(ords to contain shell metacharacters or characters in the)-.1 F -.25 +(va)184 216 S 1.965(lue of).25 F F3(IFS)4.465 E/F4 9/Times-Roman@0 SF(.) +A F0 1.964 +(The possible completions are the members of the resultant list which) +6.465 F(match the w)184 228 Q(ord being completed.)-.1 E F1144 240 +Q F2(\214lterpat)2.5 E(\214lterpat)184 252 Q F0 .455 +(is a pattern as used for pathname e)2.955 F 2.956(xpansion. It)-.15 F +.456(is applied to the list of possible)2.956 F 1.596 +(completions generated by the preceding options and ar)184 264 R 1.596 +(guments, and each completion)-.18 F(matching)184 276 Q F2(\214lterpat) +3.204 E F0 .704(is remo)3.204 F -.15(ve)-.15 G 3.204(df).15 G .704 +(rom the list.)-3.204 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0 +(in)3.204 E F2(\214lterpat)3.205 E F0(ne)3.205 E -.05(ga)-.15 G .705 +(tes the pattern;).05 F(in this case, an)184 288 Q 2.5(yc)-.15 G +(ompletion not matching)-2.5 E F2(\214lterpat)2.5 E F0(is remo)2.5 E +-.15(ve)-.15 G(d.).15 E .467(The return v)144 304.8 R .467 +(alue is true unless an in)-.25 F -.25(va)-.4 G .466 +(lid option is supplied, an option other than).25 F F12.966 E F0 +(or)2.966 E F12.966 E F0 .466(is sup-)2.966 F 1.361 +(plied without a)144 316.8 R F2(name)3.861 E F0(ar)3.861 E 1.361 +(gument, an attempt is made to remo)-.18 F 1.662 -.15(ve a c)-.15 H +1.362(ompletion speci\214cation for a).15 F F2(name)144 328.8 Q F0 +(for which no speci\214cation e)2.5 E +(xists, or an error occurs adding a completion speci\214cation.)-.15 E +F1(compopt)108 345.6 Q F0([)2.5 E F1A F2(option)2.5 E F0 2.5(][)C +F1(\255DEI)-2.5 E F0 2.5(][)C F1(+o)-2.5 E F2(option)2.5 E F0 2.5(][)C +F2(name)-2.5 E F0(])A .447(Modify completion options for each)144 357.6 +R F2(name)2.947 E F0 .447(according to the)2.947 F F2(option)2.947 E F0 +.447(s, or for the currently-e)B -.15(xe)-.15 G(cuting).15 E .725 +(completion if no)144 369.6 R F2(name)3.225 E F0 3.225(sa)C .725 +(re supplied.)-3.225 F .725(If no)5.725 F F2(option)3.225 E F0 3.225(sa) +C .725(re gi)-3.225 F -.15(ve)-.25 G .726 +(n, display the completion options for).15 F(each)144 381.6 Q F2(name) +3.224 E F0 .724(or the current completion.)3.224 F .724(The possible v) +5.724 F .724(alues of)-.25 F F2(option)3.224 E F0 .724(are those v)3.224 +F .723(alid for the)-.25 F F1(com-)3.223 E(plete)144 393.6 Q F0 -.2(bu) +2.677 G .177(iltin described abo).2 F -.15(ve)-.15 G 5.178(.T).15 G(he) +-5.178 E F12.678 E F0 .178 +(option indicates that other supplied options should apply to)2.678 F +1.228(the `)144 405.6 R(`def)-.74 E(ault')-.1 E 3.728('c)-.74 G 1.228(o\ +mmand completion; that is, completion attempted on a command for which \ +no)-3.728 F 2.038(completion has pre)144 417.6 R 2.038 +(viously been de\214ned.)-.25 F(The)7.038 E F14.538 E F0 2.039 +(option indicates that other supplied options)4.538 F 1.539 +(should apply to `)144 429.6 R(`empty')-.74 E 4.039('c)-.74 G 1.538 +(ommand completion; that is, completion attempted on a blank line.) +-4.039 F(The)144 441.6 Q F13.02 E F0 .52(option indicates that ot\ +her supplied options should apply to completion on the initial non-)3.02 +F .868(assignment w)144 453.6 R .868 +(ord on the line, or after a command delimiter such as)-.1 F F1(;)3.368 +E F0(or)3.368 E F1(|)3.368 E F0 3.367(,w)C .867(hich is usually com-) +-3.367 F(mand name completion.)144 465.6 Q .431(The return v)144 489.6 R +.431(alue is true unless an in)-.25 F -.25(va)-.4 G .431 +(lid option is supplied, an attempt is made to modify the op-).25 F +(tions for a)144 501.6 Q F2(name)2.5 E F0 +(for which no completion speci\214cation e)2.5 E +(xists, or an output error occurs.)-.15 E F1(continue)108 518.4 Q F0([) +2.5 E F2(n)A F0(])A .851(Resume the ne)144 530.4 R .851 +(xt iteration of the enclosing)-.15 F F1 -.25(fo)3.351 G(r).25 E F0(,)A +F1(while)3.351 E F0(,)A F1(until)3.351 E F0 3.351(,o)C(r)-3.351 E F1 +(select)3.35 E F0 3.35(loop. If)3.35 F F2(n)3.71 E F0 .85 +(is speci\214ed, re-)3.59 F .203(sume at the)144 542.4 R F2(n)2.703 E F0 +.203(th enclosing loop.)B F2(n)5.563 E F0 .203(must be)2.943 F/F5 10 +/Symbol SF2.703 E F0 2.704(1. If)2.703 F F2(n)3.064 E F0 .204 +(is greater than the number of enclosing loops,)2.944 F 1.184 +(the last enclosing loop \(the `)144 554.4 R(`top-le)-.74 E -.15(ve)-.25 +G(l').15 E 3.684('l)-.74 G 1.184(oop\) is resumed.)-3.684 F 1.183 +(The return v)6.184 F 1.183(alue is 0 unless)-.25 F F2(n)3.683 E F0 +1.183(is not)3.683 F(greater than or equal to 1.)144 566.4 Q F1(declar) +108 583.2 Q(e)-.18 E F0([)2.5 E F1(\255aAfFgiIlnrtux)A F0 2.5(][)C F1 +-2.5 E F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C +(..])-2.5 E F1(typeset)108 595.2 Q F0([)2.5 E F1(\255aAfFgiIlnrtux)A F0 +2.5(][)C F1-2.5 E F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 +2.5(].)C(..])-2.5 E 1.264(Declare v)144 607.2 R 1.264 +(ariables and/or gi)-.25 F 1.564 -.15(ve t)-.25 H 1.264(hem attrib).15 F +3.765(utes. If)-.2 F(no)3.765 E F2(name)3.765 E F0 3.765(sa)C 1.265 +(re gi)-3.765 F -.15(ve)-.25 G 3.765(nt).15 G 1.265(hen display the v) +-3.765 F 1.265(alues of)-.25 F -.25(va)144 619.2 S 3.46(riables. The).25 +F F13.46 E F0 .96(option will display the attrib)3.46 F .96 +(utes and v)-.2 F .96(alues of each)-.25 F F2(name)3.82 E F0 5.96(.W).18 +G(hen)-5.96 E F13.46 E F0 .96(is used)3.46 F(with)144 631.2 Q F2 +(name)2.774 E F0(ar)2.774 E .274 +(guments, additional options, other than)-.18 F F12.775 E F0(and) +2.775 E F12.775 E F0 2.775(,a)C .275(re ignored.)-2.775 F(When) +5.275 E F12.775 E F0 .275(is supplied)2.775 F(without)144 643.2 Q +F2(name)3.79 E F0(ar)3.79 E 1.29(guments, it will display the attrib) +-.18 F 1.289(utes and v)-.2 F 1.289(alues of all v)-.25 F 1.289 +(ariables ha)-.25 F 1.289(ving the at-)-.2 F(trib)144 655.2 Q .38 +(utes speci\214ed by the additional options.)-.2 F .38 +(If no other options are supplied with)5.38 F F12.88 E F0(,)A F1 +(declar)2.88 E(e)-.18 E F0(will)2.88 E 1.107(display the attrib)144 +667.2 R 1.107(utes and v)-.2 F 1.106(alues of all shell v)-.25 F 3.606 +(ariables. The)-.25 F F13.606 E F0 1.106 +(option will restrict the display to)3.606 F .299(shell functions.)144 +679.2 R(The)5.299 E F12.799 E F0 .299(option inhibits the display\ + of function de\214nitions; only the function name)2.799 F 1.54 +(and attrib)144 691.2 R 1.54(utes are printed.)-.2 F 1.54(If the)6.54 F +F1(extdeb)4.04 E(ug)-.2 E F0 1.54(shell option is enabled using)4.04 F +F1(shopt)4.04 E F0 4.04(,t)C 1.54(he source \214le)-4.04 F .648 +(name and line number where each)144 703.2 R F2(name)3.148 E F0 .648 +(is de\214ned are displayed as well.)3.148 F(The)5.648 E F13.148 E +F0 .649(option implies)3.149 F F1144 715.2 Q F0 5.837(.T)C(he) +-5.837 E F13.337 E F0 .837(option forces v)3.337 F .836 +(ariables to be created or modi\214ed at the global scope, e)-.25 F -.15 +(ve)-.25 G 3.336(nw).15 G(hen)-3.336 E F1(de-)3.336 E(clar)144 727.2 Q +(e)-.18 E F0 .818(is e)3.318 F -.15(xe)-.15 G .818 +(cuted in a shell function.).15 F .818 +(It is ignored in all other cases.)5.818 F(The)5.819 E F13.319 E +F0 .819(option causes local)3.319 F(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(61)190.395 E 0 Cg EP +%%Page: 62 62 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E -.25(va)144 84 S +.694(riables to inherit the attrib).25 F .694(utes \(e)-.2 F .694 +(xcept the)-.15 F/F1 10/Times-Italic@0 SF(namer)3.194 E(ef)-.37 E F0 +(attrib)3.194 E .693(ute\) and v)-.2 F .693(alue of an)-.25 F 3.193(ye) +-.15 G .693(xisting v)-3.343 F(ariable)-.25 E .82(with the same)144 96 R +F1(name)3.32 E F0 .82(at a surrounding scope.)3.32 F .82 +(If there is no e)5.82 F .82(xisting v)-.15 F .82(ariable, the local v) +-.25 F .82(ariable is)-.25 F .38(initially unset.)144 108 R .38 +(The follo)5.38 F .379(wing options can be used to restrict output to v) +-.25 F .379(ariables with the speci\214ed)-.25 F(attrib)144 120 Q +(ute or to gi)-.2 E .3 -.15(ve v)-.25 H(ariables attrib)-.1 E(utes:)-.2 +E/F2 10/Times-Bold@0 SF144 132 Q F0(Each)180 132 Q F1(name)2.5 E +F0(is an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray v)-2.5 E +(ariable \(see)-.25 E F2(Arrays)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).) +.15 E F2144 144 Q F0(Each)180 144 Q F1(name)2.5 E F0 +(is an associati)2.5 E .3 -.15(ve a)-.25 H(rray v).15 E(ariable \(see) +-.25 E F2(Arrays)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F2144 +156 Q F0(Use function names only)180 156 Q(.)-.65 E F2144 168 Q F0 +.557(The v)180 168 R .558(ariable is treated as an inte)-.25 F .558 +(ger; arithmetic e)-.15 F -.25(va)-.25 G .558(luation \(see).25 F/F3 9 +/Times-Bold@0 SF .558(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E(TION) +180 180 Q F0(abo)2.25 E -.15(ve)-.15 G 2.5(\)i).15 G 2.5(sp)-2.5 G +(erformed when the v)-2.5 E(ariable is assigned a v)-.25 E(alue.)-.25 E +F2144 192 Q F0 .91(When the v)180 192 R .909 +(ariable is assigned a v)-.25 F .909(alue, all upper)-.25 F .909 +(-case characters are con)-.2 F -.15(ve)-.4 G .909(rted to lo).15 F(wer) +-.25 E(-)-.2 E 2.5(case. The)180 204 R(upper)2.5 E(-case attrib)-.2 E +(ute is disabled.)-.2 E F2144 216 Q F0(Gi)180 216 Q 1.619 -.15 +(ve e)-.25 H(ach).15 E F1(name)3.819 E F0(the)3.819 E F1(namer)3.819 E +(ef)-.37 E F0(attrib)3.819 E 1.319 +(ute, making it a name reference to another v)-.2 F(ariable.)-.25 E .478 +(That other v)180 228 R .478(ariable is de\214ned by the v)-.25 F .478 +(alue of)-.25 F F1(name)2.978 E F0 5.478(.A)C .478 +(ll references, assignments, and at-)-5.478 F(trib)180 240 Q .781 +(ute modi\214cations to)-.2 F F1(name)3.281 E F0 3.281(,e)C .782 +(xcept those using or changing the)-3.431 F F23.282 E F0(attrib) +3.282 E .782(ute itself, are)-.2 F .809(performed on the v)180 252 R +.809(ariable referenced by)-.25 F F1(name)3.308 E F0 1.908 -.55('s v)D +3.308(alue. The).3 F .808(nameref attrib)3.308 F .808(ute cannot be)-.2 +F(applied to array v)180 264 Q(ariables.)-.25 E F2144 276 Q F0 +(Mak)180 276 Q(e)-.1 E F1(name)3.654 E F0 3.654(sr)C(eadonly)-3.654 E +6.154(.T)-.65 G 1.154(hese names cannot then be assigned v)-6.154 F +1.155(alues by subsequent as-)-.25 F(signment statements or unset.)180 +288 Q F2144 300 Q F0(Gi)180 300 Q .73 -.15(ve e)-.25 H(ach).15 E +F1(name)2.93 E F0(the)2.929 E F1(tr)2.929 E(ace)-.15 E F0(attrib)2.929 E +2.929(ute. T)-.2 F .429(raced functions inherit the)-.35 F F2(DEB)2.929 +E(UG)-.1 E F0(and)2.929 E F2(RETURN)2.929 E F0 +(traps from the calling shell.)180 312 Q(The trace attrib)5 E +(ute has no special meaning for v)-.2 E(ariables.)-.25 E F2144 324 +Q F0 .909(When the v)180 324 R .909(ariable is assigned a v)-.25 F .909 +(alue, all lo)-.25 F(wer)-.25 E .909(-case characters are con)-.2 F -.15 +(ve)-.4 G .91(rted to upper).15 F(-)-.2 E 2.5(case. The)180 336 R(lo)2.5 +E(wer)-.25 E(-case attrib)-.2 E(ute is disabled.)-.2 E F2144 348 Q +F0(Mark)180 348 Q F1(name)2.5 E F0 2.5(sf)C(or e)-2.5 E +(xport to subsequent commands via the en)-.15 E(vironment.)-.4 E .144 +(Using `+' instead of `\255' turns of)144 364.8 R 2.643(ft)-.25 G .143 +(he attrib)-2.643 F .143(ute instead, with the e)-.2 F .143 +(xceptions that)-.15 F F2(+a)2.643 E F0(and)2.643 E F2(+A)2.643 E F0 +.143(may not)2.643 F .578(be used to destro)144 376.8 R 3.079(ya)-.1 G +.579(rray v)-3.079 F .579(ariables and)-.25 F F2(+r)3.079 E F0 .579 +(will not remo)3.079 F .879 -.15(ve t)-.15 H .579(he readonly attrib).15 +F 3.079(ute. When)-.2 F .579(used in a)3.079 F(function,)144 388.8 Q F2 +(declar)3.544 E(e)-.18 E F0(and)3.544 E F2(typeset)3.544 E F0(mak)3.544 +E 3.544(ee)-.1 G(ach)-3.544 E F1(name)3.543 E F0 1.043 +(local, as with the)3.543 F F2(local)3.543 E F0 1.043 +(command, unless the)3.543 F F23.543 E F0 1.205 +(option is supplied.)144 400.8 R 1.205(If a v)6.205 F 1.205 +(ariable name is follo)-.25 F 1.205(wed by =)-.25 F F1(value)A F0 3.705 +(,t)C 1.205(he v)-3.705 F 1.205(alue of the v)-.25 F 1.205 +(ariable is set to)-.25 F F1(value)144 412.8 Q F0 5.218(.W)C .218 +(hen using)-5.218 F F22.718 E F0(or)2.718 E F22.718 E F0 +.217(and the compound assignment syntax to create array v)2.717 F .217 +(ariables, addi-)-.25 F .882(tional attrib)144 424.8 R .882 +(utes do not tak)-.2 F 3.382(ee)-.1 G -.25(ff)-3.382 G .882 +(ect until subsequent assignments.).25 F .882(The return v)5.882 F .882 +(alue is 0 unless an)-.25 F(in)144 436.8 Q -.25(va)-.4 G .366(lid optio\ +n is encountered, an attempt is made to de\214ne a function using).25 F +/F4 10/Courier@0 SF .365(\255f foo=bar)2.865 F F0 2.865(,a)C 2.865(na) +-2.865 G(t-)-2.865 E .548(tempt is made to assign a v)144 448.8 R .548 +(alue to a readonly v)-.25 F .549 +(ariable, an attempt is made to assign a v)-.25 F .549(alue to an)-.25 F +1.749(array v)144 460.8 R 1.749 +(ariable without using the compound assignment syntax \(see)-.25 F F2 +(Arrays)4.248 E F0(abo)4.248 E -.15(ve)-.15 G 1.748(\), one of the).15 F +F1(names)144 472.8 Q F0 .359(is not a v)2.858 F .359(alid shell v)-.25 F +.359(ariable name, an attempt is made to turn of)-.25 F 2.859(fr)-.25 G +.359(eadonly status for a read-)-2.859 F 1.213(only v)144 484.8 R 1.213 +(ariable, an attempt is made to turn of)-.25 F 3.713(fa)-.25 G 1.213 +(rray status for an array v)-3.713 F 1.212(ariable, or an attempt is) +-.25 F(made to display a non-e)144 496.8 Q(xistent function with)-.15 E +F22.5 E F0(.)A F2(dirs [\255clpv] [+)108 513.6 Q F1(n)A F2 2.5(][) +C-2.5 E F1(n)A F2(])A F0 -.4(Wi)144 525.6 S .328 +(thout options, displays the list of currently remembered directories.) +.4 F .329(The def)5.329 F .329(ault display is on a)-.1 F 1.238 +(single line with directory names separated by spaces.)144 537.6 R 1.238 +(Directories are added to the list with the)6.238 F F2(pushd)144 549.6 Q +F0 .927(command; the)3.427 F F2(popd)3.428 E F0 .928(command remo)3.428 +F -.15(ve)-.15 G 3.428(se).15 G .928(ntries from the list.)-3.428 F .928 +(The current directory is al-)5.928 F -.1(wa)144 561.6 S +(ys the \214rst directory in the stack.).1 E F2144 573.6 Q F0 +(Clears the directory stack by deleting all of the entries.)180 573.6 Q +F2144 585.6 Q F0 .882 +(Produces a listing using full pathnames; the def)180 585.6 R .881 +(ault listing format uses a tilde to denote)-.1 F(the home directory)180 +597.6 Q(.)-.65 E F2144 609.6 Q F0 +(Print the directory stack with one entry per line.)180 609.6 Q F2 +144 621.6 Q F0 .272(Print the directory stack with one entry per line, \ +pre\214xing each entry with its inde)180 621.6 R 2.773(xi)-.15 G 2.773 +(nt)-2.773 G(he)-2.773 E(stack.)180 633.6 Q F2(+)144 645.6 Q F1(n)A F0 +1.565(Displays the)180 645.6 R F1(n)4.065 E F0 1.565 +(th entry counting from the left of the list sho)B 1.564(wn by)-.25 F F2 +(dirs)4.064 E F0 1.564(when in)4.064 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E +(without options, starting with zero.)180 657.6 Q F2144 669.6 Q F1 +(n)A F0 1.194(Displays the)180 669.6 R F1(n)3.694 E F0 1.194 +(th entry counting from the right of the list sho)B 1.194(wn by)-.25 F +F2(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E +(without options, starting with zero.)180 681.6 Q .258(The return v)144 +698.4 R .258(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258 +(lid option is supplied or).25 F F1(n)2.758 E F0(inde)2.758 E -.15(xe) +-.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-) +.15 F(tory stack.)144 710.4 Q(GNU Bash 5.1)72 768 Q(2020 October 29) +141.235 E(62)190.395 E 0 Cg EP +%%Page: 63 63 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(diso)108 84 Q(wn)-.1 E F0([)2.5 E F1(\255ar)A F0 2.5(][)C F1 +-2.5 E F0 2.5(][)C/F2 10/Times-Italic@0 SF(jobspec)-2.5 E F0(... |)2.5 E +F2(pid)2.5 E F0(... ])2.5 E -.4(Wi)144 96 S .121(thout options, remo).4 +F .422 -.15(ve e)-.15 H(ach).15 E F2(jobspec)4.362 E F0 .122 +(from the table of acti)2.932 F .422 -.15(ve j)-.25 H 2.622(obs. If).15 +F F2(jobspec)4.362 E F0 .122(is not present, and)2.932 F .096 +(neither the)144 108 R F12.596 E F0 .096(nor the)2.596 F F1 +2.596 E F0 .096(option is supplied, the)2.596 F F2(curr)2.596 E .096 +(ent job)-.37 F F0 .096(is used.)2.596 F .096(If the)5.096 F F1 +2.596 E F0 .096(option is gi)2.596 F -.15(ve)-.25 G .096(n, each).15 F +F2(jobspec)145.74 120 Q F0 .585(is not remo)3.395 F -.15(ve)-.15 G 3.085 +(df).15 G .585(rom the table, b)-3.085 F .585(ut is mark)-.2 F .585 +(ed so that)-.1 F/F3 9/Times-Bold@0 SF(SIGHUP)3.085 E F0 .586 +(is not sent to the job if the)2.835 F .962(shell recei)144 132 R -.15 +(ve)-.25 G 3.462(sa).15 G F3(SIGHUP)A/F4 9/Times-Roman@0 SF(.)A F0 .962 +(If no)5.462 F F2(jobspec)5.202 E F0 .962(is supplied, the)3.772 F F1 +3.462 E F0 .962(option means to remo)3.462 F 1.262 -.15(ve o)-.15 +H 3.462(rm).15 G .962(ark all)-3.462 F 1.358(jobs; the)144 144 R F1 +3.858 E F0 1.358(option without a)3.858 F F2(jobspec)5.598 E F0 +(ar)4.169 E 1.359(gument restricts operation to running jobs.)-.18 F +1.359(The return)6.359 F -.25(va)144 156 S(lue is 0 unless a).25 E F2 +(jobspec)4.24 E F0(does not specify a v)2.81 E(alid job)-.25 E(.)-.4 E +F1(echo)108 172.8 Q F0([)2.5 E F1(\255neE)A F0 2.5(][)C F2(ar)-2.5 E(g) +-.37 E F0(...])2.5 E .425(Output the)144 184.8 R F2(ar)2.925 E(g)-.37 E +F0 .424(s, separated by spaces, follo)B .424(wed by a ne)-.25 F 2.924 +(wline. The)-.25 F .424(return status is 0 unless a write)2.924 F .307 +(error occurs.)144 196.8 R(If)5.307 E F12.807 E F0 .307 +(is speci\214ed, the trailing ne)2.807 F .308(wline is suppressed.)-.25 +F .308(If the)5.308 F F12.808 E F0 .308(option is gi)2.808 F -.15 +(ve)-.25 G .308(n, inter).15 F(-)-.2 E .198(pretation of the follo)144 +208.8 R .198(wing backslash-escaped characters is enabled.)-.25 F(The) +5.198 E F12.698 E F0 .197(option disables the in-)2.697 F .067 +(terpretation of these escape characters, e)144 220.8 R -.15(ve)-.25 G +2.567(no).15 G 2.567(ns)-2.567 G .067(ystems where the)-2.567 F 2.567 +(ya)-.15 G .067(re interpreted by def)-2.567 F 2.568(ault. The)-.1 F F1 +(xpg_echo)144 232.8 Q F0 .602 +(shell option may be used to dynamically determine whether or not)3.102 +F F1(echo)3.101 E F0 -.15(ex)3.101 G .601(pands these).15 F .658 +(escape characters by def)144 244.8 R(ault.)-.1 E F1(echo)5.658 E F0 +.659(does not interpret)3.159 F F13.159 E F0 .659 +(to mean the end of options.)3.159 F F1(echo)5.659 E F0(inter)3.159 E(-) +-.2 E(prets the follo)144 256.8 Q(wing escape sequences:)-.25 E F1(\\a) +144 268.8 Q F0(alert \(bell\))180 268.8 Q F1(\\b)144 280.8 Q F0 +(backspace)180 280.8 Q F1(\\c)144 292.8 Q F0(suppress further output)180 +292.8 Q F1(\\e)144 304.8 Q(\\E)144 316.8 Q F0(an escape character)180 +316.8 Q F1(\\f)144 328.8 Q F0(form feed)180 328.8 Q F1(\\n)144 340.8 Q +F0(ne)180 340.8 Q 2.5(wl)-.25 G(ine)-2.5 E F1(\\r)144 352.8 Q F0 +(carriage return)180 352.8 Q F1(\\t)144 364.8 Q F0(horizontal tab)180 +364.8 Q F1(\\v)144 376.8 Q F0 -.15(ve)180 376.8 S(rtical tab).15 E F1 +(\\\\)144 388.8 Q F0(backslash)180 388.8 Q F1(\\0)144 400.8 Q F2(nnn)A +F0(the eight-bit character whose v)180 400.8 Q(alue is the octal v)-.25 +E(alue)-.25 E F2(nnn)2.5 E F0(\(zero to three octal digits\))2.5 E F1 +(\\x)144 412.8 Q F2(HH)A F0(the eight-bit character whose v)180 412.8 Q +(alue is the he)-.25 E(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0 +(\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1 +(\\u)144 424.8 Q F2(HHHH)A F0 1.507 +(the Unicode \(ISO/IEC 10646\) character whose v)180 436.8 R 1.506 +(alue is the he)-.25 F 1.506(xadecimal v)-.15 F(alue)-.25 E F2(HHHH) +4.006 E F0(\(one to four he)180 448.8 Q 2.5(xd)-.15 G(igits\))-2.5 E F1 +(\\U)144 460.8 Q F2(HHHHHHHH)A F0 .547 +(the Unicode \(ISO/IEC 10646\) character whose v)180 472.8 R .547 +(alue is the he)-.25 F .548(xadecimal v)-.15 F(alue)-.25 E F2(HHHHH-) +3.048 E(HHH)180 484.8 Q F0(\(one to eight he)2.5 E 2.5(xd)-.15 G +(igits\))-2.5 E F1(enable)108 501.6 Q F0([)2.5 E F1A F0 2.5(][)C +F1(\255dnps)-2.5 E F0 2.5(][)C F1-2.5 E F2(\214lename)2.5 E F0 2.5 +(][)C F2(name)-2.5 E F0(...])2.5 E .278(Enable and disable b)144 513.6 R +.278(uiltin shell commands.)-.2 F .278(Disabling a b)5.278 F .278 +(uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .833 +(the same name as a shell b)144 525.6 R .834(uiltin to be e)-.2 F -.15 +(xe)-.15 G .834(cuted without specifying a full pathname, e).15 F -.15 +(ve)-.25 G 3.334(nt).15 G(hough)-3.334 E .99 +(the shell normally searches for b)144 537.6 R .989 +(uiltins before disk commands.)-.2 F(If)5.989 E F13.489 E F0 .989 +(is used, each)3.489 F F2(name)3.489 E F0 .989(is dis-)3.489 F .648 +(abled; otherwise,)144 549.6 R F2(names)3.148 E F0 .648(are enabled.) +3.148 F -.15(Fo)5.648 G 3.148(re).15 G .648(xample, to use the)-3.298 F +F1(test)3.148 E F0 .648(binary found via the)3.148 F F3 -.666(PA)3.148 G +(TH)-.189 E F0(in-)2.899 E .539(stead of the shell b)144 561.6 R .538 +(uiltin v)-.2 F .538(ersion, run)-.15 F/F5 10/Courier@0 SF .538 +(enable -n test)3.038 F F0 5.538(.T)C(he)-5.538 E F13.038 E F0 +.538(option means to load the ne)3.038 F(w)-.25 E -.2(bu)144 573.6 S +1.365(iltin command).2 F F2(name)4.225 E F0 1.365(from shared object) +4.045 F F2(\214lename)5.775 E F0 3.865(,o).18 G 3.865(ns)-3.865 G 1.365 +(ystems that support dynamic loading.)-3.865 F(The)144 585.6 Q F1 +2.867 E F0 .367(option will delete a b)2.867 F .367(uiltin pre)-.2 F +.367(viously loaded with)-.25 F F12.866 E F0 5.366(.I)C 2.866(fn) +-5.366 G(o)-2.866 E F2(name)2.866 E F0(ar)2.866 E .366(guments are gi) +-.18 F -.15(ve)-.25 G .366(n, or).15 F .398(if the)144 597.6 R F1 +2.898 E F0 .399(option is supplied, a list of shell b)2.899 F .399 +(uiltins is printed.)-.2 F -.4(Wi)5.399 G .399(th no other option ar).4 +F .399(guments, the)-.18 F .099(list consists of all enabled shell b)144 +609.6 R 2.598(uiltins. If)-.2 F F12.598 E F0 .098 +(is supplied, only disabled b)2.598 F .098(uiltins are printed.)-.2 F +(If)5.098 E F12.598 E F0 .905 +(is supplied, the list printed includes all b)144 621.6 R .905 +(uiltins, with an indication of whether or not each is en-)-.2 F 2.873 +(abled. If)144 633.6 R F12.873 E F0 .372 +(is supplied, the output is restricted to the POSIX)2.873 F F2(special) +2.872 E F0 -.2(bu)2.872 G 2.872(iltins. The).2 F .372(return v)2.872 F +.372(alue is)-.25 F 2.5(0u)144 645.6 S(nless a)-2.5 E F2(name)2.86 E F0 +(is not a shell b)2.68 E(uiltin or there is an error loading a ne)-.2 E +2.5(wb)-.25 G(uiltin from a shared object.)-2.7 E F1 -2.3 -.15(ev a)108 +662.4 T(l).15 E F0([)2.5 E F2(ar)A(g)-.37 E F0(...])2.5 E(The)144 674.4 +Q F2(ar)3.17 E(g)-.37 E F0 3.17(sa)C .671 +(re read and concatenated together into a single command.)-3.17 F .671 +(This command is then read)5.671 F .479(and e)144 686.4 R -.15(xe)-.15 G +.479(cuted by the shell, and its e).15 F .479 +(xit status is returned as the v)-.15 F .478(alue of)-.25 F F1 -2.3 -.15 +(ev a)2.978 H(l).15 E F0 5.478(.I)C 2.978(ft)-5.478 G .478(here are no) +-2.978 F F2(ar)3.308 E(gs)-.37 E F0(,).27 E(or only null ar)144 698.4 Q +(guments,)-.18 E F1 -2.3 -.15(ev a)2.5 H(l).15 E F0(returns 0.)2.5 E +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(63)190.395 E 0 Cg EP +%%Page: 64 64 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(exec)108 84 Q F0([)2.5 E F1(\255cl)A F0 2.5(][)C F1-2.5 E/F2 10 +/Times-Italic@0 SF(name)2.5 E F0 2.5(][)C F2(command)-2.5 E F0([)2.5 E +F2(ar)A(guments)-.37 E F0(]])A(If)144 96 Q F2(command)3.005 E F0 .305 +(is speci\214ed, it replaces the shell.)3.575 F .305(No ne)5.305 F 2.805 +(wp)-.25 G .306(rocess is created.)-2.805 F(The)5.306 E F2(ar)3.136 E +(guments)-.37 E F0(become)3.076 E .177(the ar)144 108 R .177(guments to) +-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)-5.176 G(he)-2.676 E F1 +2.676 E F0 .176 +(option is supplied, the shell places a dash at the be)2.676 F .176 +(ginning of)-.15 F .48(the zeroth ar)144 120 R .48(gument passed to)-.18 +F F2(command)3.18 E F0 5.48(.T).77 G .48(his is what)-5.48 F F2(lo)3.07 +E(gin)-.1 E F0 .48(\(1\) does.).24 F(The)5.48 E F12.98 E F0 .48 +(option causes)2.98 F F2(com-)3.18 E(mand)144 132 Q F0 .639(to be e) +3.909 F -.15(xe)-.15 G .638(cuted with an empty en).15 F 3.138 +(vironment. If)-.4 F F13.138 E F0 .638 +(is supplied, the shell passes)3.138 F F2(name)3.498 E F0 .638(as the) +3.318 F 1.077(zeroth ar)144 144 R 1.077(gument to the e)-.18 F -.15(xe) +-.15 G 1.077(cuted command.).15 F(If)6.077 E F2(command)3.777 E F0 1.077 +(cannot be e)4.347 F -.15(xe)-.15 G 1.077(cuted for some reason, a).15 F +(non-interacti)144 156 Q .877 -.15(ve s)-.25 H .577(hell e).15 F .577 +(xits, unless the)-.15 F F1(execfail)3.077 E F0 .577 +(shell option is enabled.)3.077 F .576(In that case, it returns f)5.577 +F(ail-)-.1 E 3.32(ure. An)144 168 R(interacti)3.32 E 1.12 -.15(ve s)-.25 +H .82(hell returns f).15 F .82(ailure if the \214le cannot be e)-.1 F +-.15(xe)-.15 G 3.32(cuted. A).15 F .82(subshell e)3.32 F .82 +(xits uncondi-)-.15 F .288(tionally if)144 180 R F1(exec)2.788 E F0 -.1 +(fa)2.788 G 2.788(ils. If).1 F F2(command)2.988 E F0 .288 +(is not speci\214ed, an)3.558 F 2.787(yr)-.15 G .287(edirections tak) +-2.787 F 2.787(ee)-.1 G -.25(ff)-2.787 G .287(ect in the current shell,) +.25 F(and the return status is 0.)144 192 Q +(If there is a redirection error)5 E 2.5(,t)-.4 G +(he return status is 1.)-2.5 E F1(exit)108 208.8 Q F0([)2.5 E F2(n)A F0 +(])A .095(Cause the shell to e)144 208.8 R .095(xit with a status of) +-.15 F F2(n)2.595 E F0 5.095(.I)C(f)-5.095 E F2(n)2.955 E F0 .096 +(is omitted, the e)2.835 F .096(xit status is that of the last command) +-.15 F -.15(exe)144 220.8 S 2.5(cuted. A).15 F(trap on)2.5 E/F3 9 +/Times-Bold@0 SF(EXIT)2.5 E F0(is e)2.25 E -.15(xe)-.15 G +(cuted before the shell terminates.).15 E F1(export)108 237.6 Q F0([)2.5 +E F1(\255fn)A F0 2.5(][).833 G F2(name)-2.5 E F0([=)A F2(wor)A(d)-.37 E +F0(]] ...)A F1(export \255p)108 249.6 Q F0 .257(The supplied)144 261.6 R +F2(names)3.117 E F0 .257(are mark)3.027 F .257(ed for automatic e)-.1 F +.257(xport to the en)-.15 F .257(vironment of subsequently e)-.4 F -.15 +(xe)-.15 G(cuted).15 E 2.626(commands. If)144 273.6 R(the)2.626 E F1 +2.626 E F0 .127(option is gi)2.627 F -.15(ve)-.25 G .127(n, the) +.15 F F2(names)2.987 E F0 .127(refer to functions.)2.897 F .127(If no) +5.127 F F2(names)2.987 E F0 .127(are gi)2.897 F -.15(ve)-.25 G .127 +(n, or if the).15 F F1144 285.6 Q F0 .048 +(option is supplied, a list of names of all e)2.548 F .048(xported v) +-.15 F .048(ariables is printed.)-.25 F(The)5.048 E F12.547 E F0 +.047(option causes the)2.547 F -.15(ex)144 297.6 S 1.446 +(port property to be remo).15 F -.15(ve)-.15 G 3.947(df).15 G 1.447 +(rom each)-3.947 F F2(name)3.947 E F0 6.447(.I)C 3.947(fav)-6.447 G +1.447(ariable name is follo)-4.197 F 1.447(wed by =)-.25 F F2(wor)A(d) +-.37 E F0 3.947(,t)C(he)-3.947 E -.25(va)144 309.6 S .742(lue of the v) +.25 F .742(ariable is set to)-.25 F F2(wor)3.242 E(d)-.37 E F0(.)A F1 +(export)5.742 E F0 .742(returns an e)3.242 F .741 +(xit status of 0 unless an in)-.15 F -.25(va)-.4 G .741(lid option is) +.25 F .031(encountered, one of the)144 321.6 R F2(names)2.531 E F0 .031 +(is not a v)2.531 F .032(alid shell v)-.25 F .032(ariable name, or)-.25 +F F12.532 E F0 .032(is supplied with a)2.532 F F2(name)2.892 E F0 +(that)2.712 E(is not a function.)144 333.6 Q F1(fc)108 350.4 Q F0([)2.5 +E F1A F2(ename)2.5 E F0 2.5(][)C F1(\255lnr)-2.5 E F0 2.5(][)C F2 +<8c72>-2.5 E(st)-.1 E F0 2.5(][)C F2(last)-2.5 E F0(])A F1(fc \255s)108 +362.4 Q F0([)2.5 E F2(pat)A F0(=)A F2 -.37(re)C(p).37 E F0 2.5(][)C F2 +(cmd)-2.5 E F0(])A .432 +(The \214rst form selects a range of commands from)144 374.4 R F2<8c72> +4.842 E(st)-.1 E F0(to)3.612 E F2(last)3.022 E F0 .431 +(from the history list and displays or)3.612 F .141(edits and re-e)144 +386.4 R -.15(xe)-.15 G .141(cutes them.).15 F F2 -.45(Fi)5.141 G -.1(rs) +.45 G(t).1 E F0(and)3.321 E F2(last)2.731 E F0 .141 +(may be speci\214ed as a string \(to locate the last command)3.321 F(be) +144 398.4 Q .311(ginning with that string\) or as a number \(an inde) +-.15 F 2.811(xi)-.15 G .31(nto the history list, where a ne)-2.811 F +-.05(ga)-.15 G(ti).05 E .61 -.15(ve n)-.25 H(umber).15 E .071 +(is used as an of)144 410.4 R .071 +(fset from the current command number\).)-.25 F .071(When listing, a) +5.071 F F2<8c72>2.571 E(st)-.1 E F0(or)2.571 E F2(last)2.571 E F0 .071 +(of 0 is equi)2.571 F -.25(va)-.25 G(-).25 E .653 +(lent to \2551 and \2550 is equi)144 422.4 R -.25(va)-.25 G .653 +(lent to the current command \(usually the).25 F F1(fc)3.153 E F0 .653 +(command\); otherwise 0 is)3.153 F(equi)144 434.4 Q -.25(va)-.25 G .242 +(lent to \2551 and \2550 is in).25 F -.25(va)-.4 G 2.742(lid. If).25 F +F2(last)2.832 E F0 .242 +(is not speci\214ed, it is set to the current command for list-)3.422 F +.093(ing \(so that)144 446.4 R/F4 10/Courier@0 SF .093(fc \255l \25510) +2.593 F F0 .093(prints the last 10 commands\) and to)2.593 F F2<8c72> +4.502 E(st)-.1 E F0 2.592(otherwise. If)3.272 F F2<8c72>4.502 E(st)-.1 E +F0 .092(is not speci-)3.272 F(\214ed, it is set to the pre)144 458.4 Q +(vious command for editing and \25516 for listing.)-.25 E(The)144 482.4 +Q F12.522 E F0 .022 +(option suppresses the command numbers when listing.)2.522 F(The)5.022 E +F12.522 E F0 .022(option re)2.522 F -.15(ve)-.25 G .022 +(rses the order of).15 F .438(the commands.)144 494.4 R .438(If the) +5.438 F F12.938 E F0 .438(option is gi)2.938 F -.15(ve)-.25 G .438 +(n, the commands are listed on standard output.).15 F(Otherwise,)5.438 E +.334(the editor gi)144 506.4 R -.15(ve)-.25 G 2.834(nb).15 G(y)-2.834 E +F2(ename)3.024 E F0 .335(is in)3.014 F -.2(vo)-.4 G -.1(ke).2 G 2.835 +(do).1 G 2.835(na\214)-2.835 G .335(le containing those commands.)-2.835 +F(If)5.335 E F2(ename)3.025 E F0 .335(is not gi)3.015 F -.15(ve)-.25 G +(n,).15 E .631(the v)144 518.4 R .631(alue of the)-.25 F F3(FCEDIT)3.131 +E F0 -.25(va)2.881 G .631(riable is used, and the v).25 F .631(alue of) +-.25 F F3(EDIT)3.131 E(OR)-.162 E F0(if)2.881 E F3(FCEDIT)3.13 E F0 .63 +(is not set.)2.88 F .63(If nei-)5.63 F .005(ther v)144 530.4 R .005 +(ariable is set,)-.25 F F2(vi)4.171 E F0 .005(is used.)4.171 F .005 +(When editing is complete, the edited commands are echoed and e)5.005 F +(x-)-.15 E(ecuted.)144 542.4 Q .789(In the second form,)144 566.4 R F2 +(command)3.288 E F0 .788(is re-e)3.288 F -.15(xe)-.15 G .788 +(cuted after each instance of).15 F F2(pat)3.288 E F0 .788 +(is replaced by)3.288 F F2 -.37(re)3.288 G(p).37 E F0(.)A F2(Com-)5.788 +E(mand)144 578.4 Q F0 .171(is interpreted the same as)2.671 F F2<8c72> +2.671 E(st)-.1 E F0(abo)2.671 E -.15(ve)-.15 G 5.171(.A).15 G .172 +(useful alias to use with this is)-2.499 F F4 .172(r='fc \255s')2.672 F +F0 2.672(,s)C 2.672(ot)-2.672 G(hat)-2.672 E(typing)144 590.4 Q F4 7.166 +(rc)3.666 G(c)-7.166 E F0 1.166(runs the last command be)3.666 F 1.166 +(ginning with)-.15 F F4(cc)3.666 E F0 1.165(and typing)3.666 F F4(r) +3.665 E F0(re-e)3.665 E -.15(xe)-.15 G 1.165(cutes the last com-).15 F +(mand.)144 602.4 Q .142(If the \214rst form is used, the return v)144 +626.4 R .142(alue is 0 unless an in)-.25 F -.25(va)-.4 G .142 +(lid option is encountered or).25 F F2<8c72>4.552 E(st)-.1 E F0(or)3.322 +E F2(last)2.732 E F0 .455(specify history lines out of range.)144 638.4 +R .454(If the)5.454 F F12.954 E F0 .454 +(option is supplied, the return v)2.954 F .454(alue is the v)-.25 F .454 +(alue of the)-.25 F .787(last command e)144 650.4 R -.15(xe)-.15 G .787 +(cuted or f).15 F .788 +(ailure if an error occurs with the temporary \214le of commands.)-.1 F +.788(If the)5.788 F 1.136 +(second form is used, the return status is that of the command re-e)144 +662.4 R -.15(xe)-.15 G 1.135(cuted, unless).15 F F2(cmd)3.835 E F0 1.135 +(does not)4.405 F(specify a v)144 674.4 Q +(alid history line, in which case)-.25 E F1(fc)2.5 E F0(returns f)2.5 E +(ailure.)-.1 E F1(fg)108 691.2 Q F0([)2.5 E F2(jobspec)A F0(])A(Resume) +144 703.2 Q F2(jobspec)5.653 E F0 1.413(in the fore)4.223 F 1.413 +(ground, and mak)-.15 F 3.913(ei)-.1 G 3.913(tt)-3.913 G 1.413 +(he current job)-3.913 F 6.413(.I)-.4 G(f)-6.413 E F2(jobspec)5.653 E F0 +1.414(is not present, the)4.223 F(shell')144 715.2 Q 3.117(sn)-.55 G +.617(otion of the)-3.117 F F2(curr)3.117 E .617(ent job)-.37 F F0 .617 +(is used.)3.117 F .617(The return v)5.617 F .616 +(alue is that of the command placed into the)-.25 F(fore)144 727.2 Q +.362(ground, or f)-.15 F .362 +(ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .363 +(hen run with job control enabled, if)-2.862 F(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(64)190.395 E 0 Cg EP +%%Page: 65 65 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10 +/Times-Italic@0 SF(jobspec)145.74 84 Q F0(does not specify a v)2.81 E +(alid job or)-.25 E F1(jobspec)4.24 E F0(speci\214es a job that w)2.81 E +(as started without job control.)-.1 E/F2 10/Times-Bold@0 SF(getopts)108 +100.8 Q F1(optstring name)2.5 E F0([)2.5 E F1(ar)A 2.5(g.)-.37 G(..)-2.5 +E F0(])A F2(getopts)144 112.8 Q F0 .793 +(is used by shell procedures to parse positional parameters.)3.294 F F1 +(optstring)6.023 E F0 .793(contains the option)3.513 F .149 +(characters to be recognized; if a character is follo)144 124.8 R .15 +(wed by a colon, the option is e)-.25 F .15(xpected to ha)-.15 F .45 +-.15(ve a)-.2 H(n).15 E(ar)144 136.8 Q .579 +(gument, which should be separated from it by white space.)-.18 F .578 +(The colon and question mark char)5.579 F(-)-.2 E .636 +(acters may not be used as option characters.)144 148.8 R .636 +(Each time it is in)5.636 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F2(getopts) +3.136 E F0 .636(places the ne)3.136 F .636(xt op-)-.15 F .03 +(tion in the shell v)144 160.8 R(ariable)-.25 E F1(name)2.89 E F0 2.53 +(,i).18 G(nitializing)-2.53 E F1(name)2.89 E F0 .029(if it does not e) +2.71 F .029(xist, and the inde)-.15 F 2.529(xo)-.15 G 2.529(ft)-2.529 G +.029(he ne)-2.529 F .029(xt ar)-.15 F(gu-)-.18 E .065 +(ment to be processed into the v)144 172.8 R(ariable)-.25 E/F3 9 +/Times-Bold@0 SF(OPTIND)2.565 E/F4 9/Times-Roman@0 SF(.)A F3(OPTIND) +4.565 E F0 .066(is initialized to 1 each time the shell or a)2.315 F +.885(shell script is in)144 184.8 R -.2(vo)-.4 G -.1(ke).2 G 3.385 +(d. When).1 F .885(an option requires an ar)3.385 F(gument,)-.18 E F2 +(getopts)3.385 E F0 .885(places that ar)3.385 F .885(gument into)-.18 F +.566(the v)144 196.8 R(ariable)-.25 E F3(OPT)3.066 E(ARG)-.81 E F4(.)A +F0 .566(The shell does not reset)5.066 F F3(OPTIND)3.066 E F0 .567 +(automatically; it must be manually reset)2.816 F .39 +(between multiple calls to)144 208.8 R F2(getopts)2.89 E F0 .39 +(within the same shell in)2.89 F -.2(vo)-.4 G .389(cation if a ne).2 F +2.889(ws)-.25 G .389(et of parameters is to)-2.889 F(be used.)144 220.8 +Q 2.043(When the end of options is encountered,)144 244.8 R F2(getopts) +4.543 E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.044 +(alue greater than zero.)-.25 F F3(OPTIND)144 256.8 Q F0 +(is set to the inde)2.25 E 2.5(xo)-.15 G 2.5(ft)-2.5 G +(he \214rst non-option ar)-2.5 E(gument, and)-.18 E F1(name)2.5 E F0 +(is set to ?.)2.5 E F2(getopts)144 280.8 Q F0 .485 +(normally parses the positional parameters, b)2.985 F .485 +(ut if more ar)-.2 F .485(guments are supplied as)-.18 F F1(ar)3.315 E +(g)-.37 E F0 -.25(va)3.205 G(l-).25 E(ues,)144 292.8 Q F2(getopts)2.5 E +F0(parses those instead.)2.5 E F2(getopts)144 316.8 Q F0 .345 +(can report errors in tw)2.845 F 2.845(ow)-.1 G 2.845(ays. If)-2.945 F +.345(the \214rst character of)2.845 F F1(optstring)3.075 E F0 .345 +(is a colon,)3.065 F F1(silent)3.185 E F0 .345(error re-)3.525 F 1.669 +(porting is used.)144 328.8 R 1.668 +(In normal operation, diagnostic messages are printed when in)6.669 F +-.25(va)-.4 G 1.668(lid options or).25 F .393(missing option ar)144 +340.8 R .393(guments are encountered.)-.18 F .394(If the v)5.394 F +(ariable)-.25 E F3(OPTERR)2.894 E F0 .394 +(is set to 0, no error messages)2.644 F(will be displayed, e)144 352.8 Q +-.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214rst character of)-2.5 E +F1(optstring)2.73 E F0(is not a colon.)2.72 E .667(If an in)144 376.8 R +-.25(va)-.4 G .667(lid option is seen,).25 F F2(getopts)3.167 E F0 .667 +(places ? into)3.167 F F1(name)3.527 E F0 .666 +(and, if not silent, prints an error message)3.347 F .399(and unsets)144 +388.8 R F3(OPT)2.899 E(ARG)-.81 E F4(.)A F0(If)4.899 E F2(getopts)2.899 +E F0 .399(is silent, the option character found is placed in)2.899 F F3 +(OPT)2.899 E(ARG)-.81 E F0 .4(and no)2.65 F +(diagnostic message is printed.)144 400.8 Q 1.242(If a required ar)144 +424.8 R 1.242(gument is not found, and)-.18 F F2(getopts)3.741 E F0 +1.241(is not silent, a question mark \()3.741 F F2(?).833 E F0 3.741 +(\)i).833 G 3.741(sp)-3.741 G 1.241(laced in)-3.741 F F1(name)144.36 +436.8 Q F0(,).18 E F3(OPT)2.713 E(ARG)-.81 E F0 .213 +(is unset, and a diagnostic message is printed.)2.463 F(If)5.213 E F2 +(getopts)2.713 E F0 .213(is silent, then a colon \()2.713 F F2(:).833 E +F0(\)).833 E(is placed in)144 448.8 Q F1(name)2.86 E F0(and)2.68 E F3 +(OPT)2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25 E F2 +(getopts)144 472.8 Q F0 .902 +(returns true if an option, speci\214ed or unspeci\214ed, is found.) +3.402 F .902(It returns f)5.902 F .901(alse if the end of)-.1 F +(options is encountered or an error occurs.)144 484.8 Q F2(hash)108 +501.6 Q F0([)2.5 E F2(\255lr)A F0 2.5(][)C F2-2.5 E F1(\214lename) +2.5 E F0 2.5(][)C F2(\255dt)-2.5 E F0 2.5(][)C F1(name)-2.5 E F0(])A +.858(Each time)144 513.6 R F2(hash)3.358 E F0 .858(is in)3.358 F -.2(vo) +-.4 G -.1(ke).2 G .858(d, the full pathname of the command).1 F F1(name) +3.718 E F0 .858(is determined by searching)3.538 F .956 +(the directories in)144 525.6 R F2($P)3.456 E -.95(AT)-.74 G(H).95 E F0 +.956(and remembered.)3.456 F(An)5.956 E 3.456(yp)-.15 G(re)-3.456 E .956 +(viously-remembered pathname is discarded.)-.25 F .242(If the)144 537.6 +R F22.742 E F0 .243 +(option is supplied, no path search is performed, and)2.742 F F1 +(\214lename)4.653 E F0 .243(is used as the full \214lename)2.923 F .615 +(of the command.)144 549.6 R(The)5.615 E F23.115 E F0 .615 +(option causes the shell to for)3.115 F .615 +(get all remembered locations.)-.18 F(The)5.615 E F23.115 E F0 +(op-)3.115 E .293(tion causes the shell to for)144 561.6 R .293 +(get the remembered location of each)-.18 F F1(name)2.794 E F0 5.294(.I) +C 2.794(ft)-5.294 G(he)-2.794 E F22.794 E F0 .294 +(option is supplied,)2.794 F .028(the full pathname to which each)144 +573.6 R F1(name)2.528 E F0 .028(corresponds is printed.)2.528 F .028 +(If multiple)5.028 F F1(name)2.528 E F0(ar)2.528 E .028 +(guments are sup-)-.18 F .175(plied with)144 585.6 R F22.675 E F0 +2.675(,t)C(he)-2.675 E F1(name)2.675 E F0 .175 +(is printed before the hashed full pathname.)2.675 F(The)5.175 E F2 +2.676 E F0 .176(option causes output to)2.676 F .783 +(be displayed in a format that may be reused as input.)144 597.6 R .783 +(If no ar)5.783 F .783(guments are gi)-.18 F -.15(ve)-.25 G .783 +(n, or if only).15 F F23.283 E F0(is)3.283 E .807 +(supplied, information about remembered commands is printed.)144 609.6 R +.807(The return status is true unless a)5.807 F F1(name)144.36 621.6 Q +F0(is not found or an in)2.68 E -.25(va)-.4 G(lid option is supplied.) +.25 E F2(help)108 638.4 Q F0([)2.5 E F2(\255dms)A F0 2.5(][)C F1 +(pattern)-2.5 E F0(])A .867(Display helpful information about b)144 +650.4 R .867(uiltin commands.)-.2 F(If)5.867 E F1(pattern)4.617 E F0 +.866(is speci\214ed,)3.607 F F2(help)3.366 E F0(gi)3.366 E -.15(ve)-.25 +G 3.366(sd).15 G(etailed)-3.366 E .223(help on all commands matching)144 +662.4 R F1(pattern)3.973 E F0 2.723(;o).24 G .223 +(therwise help for all the b)-2.723 F .224 +(uiltins and shell control struc-)-.2 F(tures is printed.)144 674.4 Q F2 +144 686.4 Q F0(Display a short description of each)180 686.4 Q F1 +(pattern)2.5 E F2144 698.4 Q F0(Display the description of each) +180 698.4 Q F1(pattern)2.5 E F0(in a manpage-lik)2.5 E 2.5(ef)-.1 G +(ormat)-2.5 E F2144 710.4 Q F0 +(Display only a short usage synopsis for each)180 710.4 Q F1(pattern)2.5 +E F0(The return status is 0 unless no command matches)144 727.2 Q F1 +(pattern)3.75 E F0(.).24 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 +E(65)190.395 E 0 Cg EP +%%Page: 66 66 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(history [)108 84 Q/F2 10/Times-Italic@0 SF(n)A F1(])A(history \255c) +108 96 Q(history \255d)108 108 Q F2(of)2.5 E(fset)-.18 E F1 +(history \255d)108 120 Q F2(start)2.5 E F0A F2(end)A F1 +(history \255anrw)108 132 Q F0([)2.5 E F2(\214lename)A F0(])A F1 +(history \255p)108 144 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2(ar)A 2.5(g.) +-.37 G(..)-2.5 E F0(])A F1(history \255s)108 156 Q F2(ar)2.5 E(g)-.37 E +F0([)2.5 E F2(ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A -.4(Wi)144 168 S .752 +(th no options, display the command history list with line numbers.).4 F +.752(Lines listed with a)5.752 F F1(*)3.251 E F0(ha)3.251 E -.15(ve)-.2 +G .38(been modi\214ed.)144 180 R .38(An ar)5.38 F .38(gument of)-.18 F +F2(n)3.24 E F0 .38(lists only the last)3.12 F F2(n)3.24 E F0 2.88 +(lines. If)3.12 F .38(the shell v)2.88 F(ariable)-.25 E/F3 9 +/Times-Bold@0 SF(HISTTIMEFOR-)2.881 E(MA)144 192 Q(T)-.855 E F0 .265 +(is set and not null, it is used as a format string for)2.515 F F2 +(strftime)2.764 E F0 .264(\(3\) to display the time stamp asso-)B 1.019 +(ciated with each displayed history entry)144 204 R 6.019(.N)-.65 G +3.519(oi)-6.019 G(nterv)-3.519 E 1.019 +(ening blank is printed between the formatted)-.15 F .176 +(time stamp and the history line.)144 216 R(If)5.176 E F2(\214lename) +2.676 E F0 .176 +(is supplied, it is used as the name of the history \214le; if)2.676 F +(not, the v)144 228 Q(alue of)-.25 E F3(HISTFILE)2.5 E F0(is used.)2.25 +E(Options, if supplied, ha)5 E .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F1144 240 Q F0 +(Clear the history list by deleting all the entries.)180 240 Q F1 +144 252 Q F2(of)2.5 E(fset)-.18 E F0 .389 +(Delete the history entry at position)180 264 R F2(of)2.889 E(fset)-.18 +E F0 5.389(.I)C(f)-5.389 E F2(of)2.889 E(fset)-.18 E F0 .389(is ne)2.889 +F -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G 2.89(,i).15 G 2.89(ti)-2.89 G +2.89(si)-2.89 G .39(nterpreted as relati)-2.89 F -.15(ve)-.25 G .599 +(to one greater than the last history position, so ne)180 276 R -.05(ga) +-.15 G(ti).05 E .899 -.15(ve i)-.25 H .598 +(ndices count back from the end).15 F(of the history)180 288 Q 2.5(,a) +-.65 G(nd an inde)-2.5 E 2.5(xo)-.15 G 2.5<66ad>-2.5 G 2.5(1r)-2.5 G +(efers to the current)-2.5 E F1(history -d)2.5 E F0(command.)2.5 E F1 +144 300 Q F2(start)2.5 E F0A F2(end)A F0 .757 +(Delete the history entries between positions)180 312 R F2(start)3.257 E +F0(and)3.258 E F2(end)3.258 E F0 3.258(,i)C(nclusi)-3.258 E -.15(ve)-.25 +G 5.758(.P).15 G(ositi)-5.758 E 1.058 -.15(ve a)-.25 H .758(nd ne).15 F +-.05(ga)-.15 G(-).05 E(ti)180 324 Q .3 -.15(ve v)-.25 H(alues for)-.1 E +F2(start)2.5 E F0(and)2.5 E F2(end)2.5 E F0 +(are interpreted as described abo)2.5 E -.15(ve)-.15 G(.).15 E F1 +144 336 Q F0 .565(Append the `)180 336 R(`ne)-.74 E(w')-.25 E 3.065('h) +-.74 G .564(istory lines to the history \214le.)-3.065 F .564 +(These are history lines entered since)5.564 F(the be)180 348 Q +(ginning of the current)-.15 E F1(bash)2.5 E F0(session, b)2.5 E +(ut not already appended to the history \214le.)-.2 E F1144 360 Q +F0 .854(Read the history lines not already read from the history \214le\ + into the current history list.)180 360 R .773 +(These are lines appended to the history \214le since the be)180 372 R +.772(ginning of the current)-.15 F F1(bash)3.272 E F0(ses-)3.272 E +(sion.)180 384 Q F1144 396 Q F0(Read the contents of the history \ +\214le and append them to the current history list.)180 396 Q F1 +144 408 Q F0(Write the current history list to the history \214le, o)180 +408 Q -.15(ve)-.15 G(rwriting the history \214le').15 E 2.5(sc)-.55 G +(ontents.)-2.5 E F1144 420 Q F0 .625 +(Perform history substitution on the follo)180 420 R(wing)-.25 E F2(ar) +3.125 E(gs)-.37 E F0 .626(and display the result on the standard)3.125 F +2.975(output. Does)180 432 R .475 +(not store the results in the history list.)2.975 F(Each)5.475 E F2(ar) +2.975 E(g)-.37 E F0 .475(must be quoted to disable)2.975 F +(normal history e)180 444 Q(xpansion.)-.15 E F1144 456 Q F0 .362 +(Store the)180 456 R F2(ar)3.192 E(gs)-.37 E F0 .363 +(in the history list as a single entry)3.132 F 5.363(.T)-.65 G .363 +(he last command in the history list is)-5.363 F(remo)180 468 Q -.15(ve) +-.15 G 2.5(db).15 G(efore the)-2.5 E F2(ar)2.83 E(gs)-.37 E F0 +(are added.)2.77 E .146(If the)144 484.8 R F3(HISTTIMEFORMA)2.645 E(T) +-.855 E F0 -.25(va)2.395 G .145 +(riable is set, the time stamp information associated with each history) +.25 F .668(entry is written to the history \214le, mark)144 496.8 R .669 +(ed with the history comment character)-.1 F 5.669(.W)-.55 G .669 +(hen the history)-5.669 F .956(\214le is read, lines be)144 508.8 R .956 +(ginning with the history comment character follo)-.15 F .955 +(wed immediately by a digit)-.25 F .832 +(are interpreted as timestamps for the follo)144 520.8 R .832 +(wing history entry)-.25 F 5.833(.T)-.65 G .833(he return v)-5.833 F +.833(alue is 0 unless an in-)-.25 F -.25(va)144 532.8 S .168(lid option\ + is encountered, an error occurs while reading or writing the history \ +\214le, an in).25 F -.25(va)-.4 G(lid).25 E F2(of)2.668 E(f-)-.18 E(set) +144 544.8 Q F0(is supplied as an ar)2.5 E(gument to)-.18 E F12.5 E +F0 2.5(,o)C 2.5(rt)-2.5 G(he history e)-2.5 E +(xpansion supplied as an ar)-.15 E(gument to)-.18 E F12.5 E F0 -.1 +(fa)2.5 G(ils.).1 E F1(jobs)108 561.6 Q F0([)2.5 E F1(\255lnprs)A F0 2.5 +(][)C F2(jobspec)A F0(... ])2.5 E F1(jobs \255x)108 573.6 Q F2(command) +2.5 E F0([)2.5 E F2(ar)2.5 E(gs)-.37 E F0(... ])2.5 E +(The \214rst form lists the acti)144 585.6 Q .3 -.15(ve j)-.25 H 2.5 +(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F1144 597.6 Q F0 +(List process IDs in addition to the normal information.)180 597.6 Q F1 +144 609.6 Q F0 .193(Display information only about jobs that ha) +180 609.6 R .494 -.15(ve c)-.2 H .194(hanged status since the user w).15 +F .194(as last noti-)-.1 F(\214ed of their status.)180 621.6 Q F1 +144 633.6 Q F0(List only the process ID of the job')180 633.6 Q 2.5(sp) +-.55 G(rocess group leader)-2.5 E(.)-.55 E F1144 645.6 Q F0 +(Display only running jobs.)180 645.6 Q F1144 657.6 Q F0 +(Display only stopped jobs.)180 657.6 Q(If)144 674.4 Q F2(jobspec)4.554 +E F0 .314(is gi)3.124 F -.15(ve)-.25 G .314 +(n, output is restricted to information about that job).15 F 5.313(.T) +-.4 G .313(he return status is 0 unless)-5.313 F(an in)144 686.4 Q -.25 +(va)-.4 G(lid option is encountered or an in).25 E -.25(va)-.4 G(lid).25 +E F2(jobspec)4.24 E F0(is supplied.)2.81 E .394(If the)144 703.2 R F1 +2.894 E F0 .394(option is supplied,)2.894 F F1(jobs)2.894 E F0 +.394(replaces an)2.894 F(y)-.15 E F2(jobspec)4.634 E F0 .394(found in) +3.204 F F2(command)3.094 E F0(or)3.664 E F2(ar)3.224 E(gs)-.37 E F0 .395 +(with the corre-)3.164 F(sponding process group ID, and e)144 715.2 Q +-.15(xe)-.15 G(cutes).15 E F2(command)2.7 E F0(passing it)3.27 E F2(ar) +2.83 E(gs)-.37 E F0 2.5(,r).27 G(eturning its e)-2.5 E(xit status.)-.15 +E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(66)190.395 E 0 Cg EP +%%Page: 67 67 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(kill)108 84 Q F0([)2.5 E F1A/F2 10/Times-Italic@0 SF(sigspec) +2.5 E F0(|)2.5 E F12.5 E F2(signum)2.5 E F0(|)2.5 E F12.5 E F2 +(sigspec)A F0 2.5(][)C F2(pid)-2.5 E F0(|)2.5 E F2(jobspec)2.5 E F0 2.5 +(].)C(..)-2.5 E F1(kill \255l)108 96 Q F0(|)A F1A F0([)2.5 E F2 +(sigspec)A F0(|)2.5 E F2 -.2(ex)2.5 G(it_status).2 E F0(])A .017 +(Send the signal named by)144 108 R F2(sigspec)2.857 E F0(or)2.827 E F2 +(signum)2.857 E F0 .017(to the processes named by)2.837 F F2(pid)3.767 E +F0(or)3.287 E F2(jobspec)4.257 E F0(.).31 E F2(sigspec)5.357 E F0(is) +2.827 E .318(either a case-insensiti)144 120 R .618 -.15(ve s)-.25 H +.318(ignal name such as).15 F/F3 9/Times-Bold@0 SF(SIGKILL)2.818 E F0 +.319(\(with or without the)2.569 F F3(SIG)2.819 E F0 .319 +(pre\214x\) or a signal)2.569 F(number;)144 132 Q F2(signum)3.268 E F0 +.427(is a signal number)3.247 F 5.427(.I)-.55 G(f)-5.427 E F2(sigspec) +3.267 E F0 .427(is not present, then)3.237 F F3(SIGTERM)2.927 E F0 .427 +(is assumed.)2.677 F .427(An ar)5.427 F(-)-.2 E .313(gument of)144 144 R +F12.813 E F0 .314(lists the signal names.)2.814 F .314(If an)5.314 +F 2.814(ya)-.15 G -.18(rg)-2.814 G .314(uments are supplied when).18 F +F12.814 E F0 .314(is gi)2.814 F -.15(ve)-.25 G .314 +(n, the names of).15 F .12(the signals corresponding to the ar)144 156 R +.119(guments are listed, and the return status is 0.)-.18 F(The)5.119 E +F2 -.2(ex)2.619 G(it_status).2 E F0(ar)2.619 E(-)-.2 E .799(gument to) +144 168 R F13.299 E F0 .799 +(is a number specifying either a signal number or the e)3.299 F .8 +(xit status of a process termi-)-.15 F .963(nated by a signal.)144 180 R +(The)5.962 E F13.462 E F0 .962(option is equi)3.462 F -.25(va)-.25 +G .962(lent to).25 F F13.462 E F0(.)A F1(kill)5.962 E F0 .962 +(returns true if at least one signal w)3.462 F(as)-.1 E +(successfully sent, or f)144 192 Q(alse if an error occurs or an in)-.1 +E -.25(va)-.4 G(lid option is encountered.).25 E F1(let)108 208.8 Q F2 +(ar)2.5 E(g)-.37 E F0([)2.5 E F2(ar)A(g)-.37 E F0(...])2.5 E(Each)144 +220.8 Q F2(ar)3.026 E(g)-.37 E F0 .196(is an arithmetic e)2.916 F .197 +(xpression to be e)-.15 F -.25(va)-.25 G .197(luated \(see).25 F F3 .197 +(ARITHMETIC EV)2.697 F(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F0(abo) +2.447 E -.15(ve)-.15 G 2.697(\). If).15 F(the last)144 232.8 Q F2(ar) +2.83 E(g)-.37 E F0 -.25(eva)2.72 G(luates to 0,).25 E F1(let)2.5 E F0 +(returns 1; 0 is returned otherwise.)2.5 E F1(local)108 249.6 Q F0([)2.5 +E F2(option)A F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C +(.. | \255 ])-2.5 E -.15(Fo)144 261.6 S 2.542(re).15 G .042(ach ar) +-2.542 F .042(gument, a local v)-.18 F .042(ariable named)-.25 F F2 +(name)2.902 E F0 .042(is created, and assigned)2.722 F F2(value)2.832 E +F0 5.042(.T).18 G(he)-5.042 E F2(option)2.542 E F0 .041(can be)2.541 F +(an)144 273.6 Q 3.152(yo)-.15 G 3.152(ft)-3.152 G .652 +(he options accepted by)-3.152 F F1(declar)3.152 E(e)-.18 E F0 5.652(.W) +C(hen)-5.652 E F1(local)3.152 E F0 .653 +(is used within a function, it causes the v)3.152 F(ari-)-.25 E(able)144 +285.6 Q F2(name)3.282 E F0 .422(to ha)3.102 F .722 -.15(ve a v)-.2 H +.422(isible scope restricted to that function and its children.).15 F +(If)5.421 E F2(name)2.921 E F0 .421(is \255, the set)2.921 F .509 +(of shell options is made local to the function in which)144 297.6 R F1 +(local)3.01 E F0 .51(is in)3.01 F -.2(vo)-.4 G -.1(ke).2 G .51 +(d: shell options changed us-).1 F 1.171(ing the)144 309.6 R F1(set) +3.671 E F0 -.2(bu)3.671 G 1.171 +(iltin inside the function are restored to their original v).2 F 1.17 +(alues when the function re-)-.25 F 3.38(turns. The)144 321.6 R .88 +(restore is ef)3.38 F .88(fected as if a series of)-.25 F F1(set)3.381 E +F0 .881(commands were e)3.381 F -.15(xe)-.15 G .881 +(cuted to restore the v).15 F(alues)-.25 E .788 +(that were in place before the function.)144 333.6 R -.4(Wi)5.788 G .788 +(th no operands,).4 F F1(local)3.288 E F0 .787(writes a list of local v) +3.288 F .787(ariables to)-.25 F .654(the standard output.)144 345.6 R +.654(It is an error to use)5.654 F F1(local)3.154 E F0 .654 +(when not within a function.)3.154 F .655(The return status is 0)5.654 F +(unless)144 357.6 Q F1(local)2.5 E F0(is used outside a function, an in) +2.5 E -.25(va)-.4 G(lid).25 E F2(name)2.86 E F0(is supplied, or)2.68 E +F2(name)2.5 E F0(is a readonly v)2.5 E(ariable.)-.25 E F1(logout)108 +374.4 Q F0(Exit a login shell.)144 374.4 Q F1(map\214le)108 391.2 Q F0 +([)2.5 E F1A F2(delim)2.5 E F0 2.5(][)C F1-2.5 E F2(count) +2.5 E F0 2.5(][)C F1-2.5 E F2(origin)2.5 E F0 2.5(][)C F1 +-2.5 E F2(count)2.5 E F0 2.5(][)C F1-2.5 E F0 2.5(][)C F1 +-2.5 E F2(fd)2.5 E F0 2.5(][)C F1-2.5 E F2(callbac)2.5 E(k)-.2 E +F0 2.5(][)C F1-2.5 E F2(quantum)2.5 E F0 2.5(][)C F2(arr)-2.5 E +(ay)-.15 E F0(])A F1 -.18(re)108 403.2 S(adarray).18 E F0([)2.5 E F1 +A F2(delim)2.5 E F0 2.5(][)C F1-2.5 E F2(count)2.5 E F0 2.5 +(][)C F1-2.5 E F2(origin)2.5 E F0 2.5(][)C F1-2.5 E F2 +(count)2.5 E F0 2.5(][)C F1-2.5 E F0 2.5(][)C F1-2.5 E F2 +(fd)2.5 E F0 2.5(][)C F1-2.5 E F2(callbac)2.5 E(k)-.2 E F0 2.5(][) +C F1-2.5 E F2(quantum)2.5 E F0 2.5(][)C F2(arr)-2.5 E(ay)-.15 E F0 +(])A .159(Read lines from the standard input into the inde)144 415.2 R +-.15(xe)-.15 G 2.659(da).15 G .159(rray v)-2.659 F(ariable)-.25 E F2 +(arr)2.989 E(ay)-.15 E F0 2.659(,o).32 G 2.658(rf)-2.659 G .158 +(rom \214le descriptor)-2.658 F F2(fd)4.628 E F0 1.248(if the)144 427.2 +R F13.748 E F0 1.248(option is supplied.)3.748 F 1.249(The v)6.249 +F(ariable)-.25 E F3(MAPFILE)3.749 E F0 1.249(is the def)3.499 F(ault)-.1 +E F2(arr)3.749 E(ay)-.15 E F0 6.249(.O)C 1.249(ptions, if supplied,) +-6.249 F(ha)144 439.2 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F1144 451.2 Q F0 .911 +(The \214rst character of)180 451.2 R F2(delim)3.411 E F0 .911 +(is used to terminate each input line, rather than ne)3.411 F 3.41 +(wline. If)-.25 F F2(delim)180 463.2 Q F0(is the empty string,)2.5 E F1 +(map\214le)2.5 E F0(will terminate a line when it reads a NUL character) +2.5 E(.)-.55 E F1144 475.2 Q F0(Cop)180 475.2 Q 2.5(ya)-.1 G 2.5 +(tm)-2.5 G(ost)-2.5 E F2(count)2.7 E F0 2.5(lines. If)3.18 F F2(count) +2.5 E F0(is 0, all lines are copied.)2.5 E F1144 487.2 Q F0(Be)180 +487.2 Q(gin assigning to)-.15 E F2(arr)2.83 E(ay)-.15 E F0(at inde)2.82 +E(x)-.15 E F2(origin)2.73 E F0 5(.T).24 G(he def)-5 E(ault inde)-.1 E +2.5(xi)-.15 G 2.5(s0)-2.5 G(.)-2.5 E F1144 499.2 Q F0 +(Discard the \214rst)180 499.2 Q F2(count)2.5 E F0(lines read.)2.5 E F1 +144 511.2 Q F0(Remo)180 511.2 Q .3 -.15(ve a t)-.15 H(railing).15 +E F2(delim)2.5 E F0(\(def)2.5 E(ault ne)-.1 E +(wline\) from each line read.)-.25 E F1144 523.2 Q F0 +(Read lines from \214le descriptor)180 523.2 Q F2(fd)2.5 E F0 +(instead of the standard input.)2.5 E F1144 535.2 Q F0(Ev)180 +535.2 Q(aluate)-.25 E F2(callbac)2.7 E(k)-.2 E F0(each time)3.17 E F2 +(quantum)2.5 E F0(lines are read.)2.5 E(The)5 E F12.5 E F0 +(option speci\214es)2.5 E F2(quantum)2.75 E F0(.).32 E F1144 547.2 +Q F0(Specify the number of lines read between each call to)180 547.2 Q +F2(callbac)2.7 E(k)-.2 E F0(.).67 E(If)144 564 Q F12.967 E F0 .467 +(is speci\214ed without)2.967 F F12.967 E F0 2.967(,t)C .467 +(he def)-2.967 F .467(ault quantum is 5000.)-.1 F(When)5.467 E F2 +(callbac)2.967 E(k)-.2 E F0 .467(is e)2.967 F -.25(va)-.25 G .467 +(luated, it is sup-).25 F .262(plied the inde)144 576 R 2.762(xo)-.15 G +2.762(ft)-2.762 G .262(he ne)-2.762 F .261(xt array element to be assig\ +ned and the line to be assigned to that element)-.15 F .274 +(as additional ar)144 588 R(guments.)-.18 E F2(callbac)5.274 E(k)-.2 E +F0 .274(is e)2.774 F -.25(va)-.25 G .274 +(luated after the line is read b).25 F .275 +(ut before the array element is)-.2 F(assigned.)144 600 Q +(If not supplied with an e)144 616.8 Q(xplicit origin,)-.15 E F1 +(map\214le)2.5 E F0(will clear)2.5 E F2(arr)2.5 E(ay)-.15 E F0 +(before assigning to it.)2.5 E F1(map\214le)144 633.6 Q F0 .797 +(returns successfully unless an in)3.298 F -.25(va)-.4 G .797 +(lid option or option ar).25 F .797(gument is supplied,)-.18 F F2(arr) +3.297 E(ay)-.15 E F0 .797(is in-)3.297 F -.25(va)144 645.6 S +(lid or unassignable, or if).25 E F2(arr)2.5 E(ay)-.15 E F0 +(is not an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray)-2.5 E(.)-.65 E +F1(popd)108 662.4 Q F0<5bad>2.5 E F1(n)A F0 2.5(][)C(+)-2.5 E F2(n)A F0 +2.5(][)C-2.5 E F2(n)A F0(])A(Remo)144 674.4 Q -.15(ve)-.15 G 2.799 +(se).15 G .299(ntries from the directory stack.)-2.799 F -.4(Wi)5.299 G +.299(th no ar).4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15 +G .3(he top directory from the)-2.799 F 1.479(stack, and performs a)144 +686.4 R F1(cd)3.979 E F0 1.479(to the ne)3.979 F 3.979(wt)-.25 G 1.479 +(op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.478 +(uments, if supplied, ha).18 F 1.778 -.15(ve t)-.2 H 1.478(he follo).15 +F(wing)-.25 E(meanings:)144 698.4 Q F1144 710.4 Q F0 .551 +(Suppresses the normal change of directory when remo)180 710.4 R .551 +(ving directories from the stack, so)-.15 F +(that only the stack is manipulated.)180 722.4 Q(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(67)190.395 E 0 Cg EP +%%Page: 68 68 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(+)144 84 Q/F2 10/Times-Italic@0 SF(n)A F0(Remo)180 84 Q -.15(ve)-.15 +G 2.64(st).15 G(he)-2.64 E F2(n)2.64 E F0 .14 +(th entry counting from the left of the list sho)B .14(wn by)-.25 F F1 +(dirs)2.64 E F0 2.64(,s)C .14(tarting with zero.)-2.64 F -.15(Fo)180 96 +S 2.5(re).15 G(xample:)-2.65 E/F3 10/Courier@0 SF(popd +0)2.5 E F0(remo) +2.5 E -.15(ve)-.15 G 2.5(st).15 G(he \214rst directory)-2.5 E(,)-.65 E +F3(popd +1)2.5 E F0(the second.)2.5 E F1144 108 Q F2(n)A F0(Remo)180 +108 Q -.15(ve)-.15 G 3.759(st).15 G(he)-3.759 E F2(n)3.759 E F0 1.259 +(th entry counting from the right of the list sho)B 1.26(wn by)-.25 F F1 +(dirs)3.76 E F0 3.76(,s)C 1.26(tarting with)-3.76 F 2.5(zero. F)180 120 +R(or e)-.15 E(xample:)-.15 E F3(popd -0)2.5 E F0(remo)2.5 E -.15(ve)-.15 +G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 E F3(popd -1)2.5 E F0 +(the ne)2.5 E(xt to last.)-.15 E .644(If the)144 136.8 R F1(popd)3.144 E +F0 .644(command is successful, a)3.144 F F1(dirs)3.143 E F0 .643 +(is performed as well, and the return status is 0.)3.143 F F1(popd)5.643 +E F0 .415(returns f)144 148.8 R .415(alse if an in)-.1 F -.25(va)-.4 G +.415(lid option is encountered, the directory stack is empty).25 F 2.916 +(,an)-.65 G(on-e)-2.916 E .416(xistent direc-)-.15 F +(tory stack entry is speci\214ed, or the directory change f)144 160.8 Q +(ails.)-.1 E F1(printf)108 177.6 Q F0([)2.5 E F1A F2(var)2.5 E F0 +(])A F2(format)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A .358 +(Write the formatted)144 189.6 R F2(ar)2.858 E(guments)-.37 E F0 .358 +(to the standard output under the control of the)2.858 F F2(format)2.857 +E F0 5.357(.T)C(he)-5.357 E F12.857 E F0(op-)2.857 E .714 +(tion causes the output to be assigned to the v)144 201.6 R(ariable)-.25 +E F2(var)3.214 E F0 .714(rather than being printed to the standard)3.214 +F(output.)144 213.6 Q(The)144 237.6 Q F2(format)3.018 E F0 .517(is a ch\ +aracter string which contains three types of objects: plain characters,\ + which are)3.018 F .704(simply copied to standard output, character esc\ +ape sequences, which are con)144 249.6 R -.15(ve)-.4 G .704 +(rted and copied to).15 F .036(the standard output, and format speci\ +\214cations, each of which causes printing of the ne)144 261.6 R .036 +(xt successi)-.15 F -.15(ve)-.25 G F2(ar)144 273.6 Q(gument)-.37 E F0 +5.531(.I)C 3.031(na)-5.531 G .531(ddition to the standard)-3.031 F F2 +(printf)3.032 E F0 .532(\(1\) format speci\214cations,)B F1(printf)3.032 +E F0 .532(interprets the follo)3.032 F(w-)-.25 E(ing e)144 285.6 Q +(xtensions:)-.15 E F1(%b)144 297.6 Q F0(causes)180 297.6 Q F1(printf) +2.596 E F0 .096(to e)2.596 F .096 +(xpand backslash escape sequences in the corresponding)-.15 F F2(ar) +2.596 E(gument)-.37 E F0 .095(in the)2.595 F(same w)180 309.6 Q(ay as) +-.1 E F1(echo \255e)2.5 E F0(.)A F1(%q)144 321.6 Q F0(causes)180 321.6 Q +F1(printf)2.51 E F0 .01(to output the corresponding)2.51 F F2(ar)2.51 E +(gument)-.37 E F0 .01(in a format that can be reused as shell)2.51 F +(input.)180 333.6 Q F1(%\()144 345.6 Q F2(datefmt)A F1(\)T)A F0(causes) +180 357.6 Q F1(printf)4.404 E F0 1.904 +(to output the date-time string resulting from using)4.404 F F2(datefmt) +4.404 E F0 1.903(as a format)4.404 F .38(string for)180 369.6 R F2 +(strftime)2.881 E F0 2.881(\(3\). The)B(corresponding)2.881 E F2(ar) +2.881 E(gument)-.37 E F0 .381(is an inte)2.881 F .381 +(ger representing the number)-.15 F .293(of seconds since the epoch.)180 +381.6 R -1 -.8(Tw o)5.293 H .293(special ar)3.593 F .293(gument v)-.18 F +.293(alues may be used: \2551 represents the)-.25 F .693 +(current time, and \2552 represents the time the shell w)180 393.6 R +.693(as in)-.1 F -.2(vo)-.4 G -.1(ke).2 G 3.194(d. If).1 F .694(no ar) +3.194 F .694(gument is speci-)-.18 F .21(\214ed, con)180 405.6 R -.15 +(ve)-.4 G .21(rsion beha).15 F -.15(ve)-.2 G 2.71(sa).15 G 2.71(si)-2.71 +G 2.71<66ad>-2.71 G 2.71(1h)-2.71 G .21(ad been gi)-2.71 F -.15(ve)-.25 +G 2.71(n. This).15 F .21(is an e)2.71 F .21(xception to the usual)-.15 F +F1(printf)2.71 E F0(beha)180 417.6 Q(vior)-.2 E(.)-.55 E .901 +(The %b, %q, and %T directi)144 434.4 R -.15(ve)-.25 G 3.401(sa).15 G +.901(ll use the \214eld width and precision ar)-3.401 F .902 +(guments from the format)-.18 F .358(speci\214cation and write that man) +144 446.4 R 2.858(yb)-.15 G .357 +(ytes from \(or use that wide a \214eld for\) the e)-2.858 F .357 +(xpanded ar)-.15 F(gument,)-.18 E +(which usually contains more characters than the original.)144 458.4 Q +(Ar)144 475.2 Q .463(guments to non-string format speci\214ers are trea\ +ted as C constants, e)-.18 F .464(xcept that a leading plus or)-.15 F +1.259(minus sign is allo)144 487.2 R 1.259 +(wed, and if the leading character is a single or double quote, the v) +-.25 F 1.258(alue is the)-.25 F(ASCII v)144 499.2 Q(alue of the follo) +-.25 E(wing character)-.25 E(.)-.55 E(The)144 516 Q F2(format)2.514 E F0 +.015(is reused as necessary to consume all of the)2.514 F F2(ar)2.515 E +(guments)-.37 E F0 5.015(.I)C 2.515(ft)-5.015 G(he)-2.515 E F2(format) +2.515 E F0 .015(requires more)2.515 F F2(ar)2.515 E(-)-.2 E(guments)144 +528 Q F0 .566(than are supplied, the e)3.066 F .566 +(xtra format speci\214cations beha)-.15 F .866 -.15(ve a)-.2 H 3.066(si) +.15 G 3.065(faz)-3.066 G .565(ero v)-3.065 F .565(alue or null string,) +-.25 F(as appropriate, had been supplied.)144 540 Q(The return v)5 E +(alue is zero on success, non-zero on f)-.25 E(ailure.)-.1 E F1(pushd) +108 556.8 Q F0([)2.5 E F1A F0 2.5(][)C(+)-2.5 E F2(n)A F0 2.5(][)C +-2.5 E F2(n)A F0(])A F1(pushd)108 568.8 Q F0([)2.5 E F1A F0 +2.5(][)C F2(dir)-2.5 E F0(])A .639(Adds a directory to the top of the d\ +irectory stack, or rotates the stack, making the ne)144 580.8 R 3.14(wt) +-.25 G .64(op of the)-3.14 F .417(stack the current w)144 592.8 R .416 +(orking directory)-.1 F 5.416(.W)-.65 G .416(ith no ar)-5.816 F +(guments,)-.18 E F1(pushd)2.916 E F0 -.15(ex)2.916 G .416 +(changes the top tw).15 F 2.916(od)-.1 G(irectories)-2.916 E 1.625 +(and returns 0, unless the directory stack is empty)144 604.8 R 6.625 +(.A)-.65 G -.18(rg)-6.625 G 1.625(uments, if supplied, ha).18 F 1.925 +-.15(ve t)-.2 H 1.625(he follo).15 F(wing)-.25 E(meanings:)144 616.8 Q +F1144 628.8 Q F0 1.811(Suppresses the normal change of directory \ +when rotating or adding directories to the)180 628.8 R +(stack, so that only the stack is manipulated.)180 640.8 Q F1(+)144 +652.8 Q F2(n)A F0 1.267(Rotates the stack so that the)180 652.8 R F2(n) +3.767 E F0 1.268(th directory \(counting from the left of the list sho)B +1.268(wn by)-.25 F F1(dirs)180 664.8 Q F0 2.5(,s)C +(tarting with zero\) is at the top.)-2.5 E F1144 676.8 Q F2(n)A F0 +.92(Rotates the stack so that the)180 676.8 R F2(n)3.42 E F0 .92 +(th directory \(counting from the right of the list sho)B .92(wn by)-.25 +F F1(dirs)180 688.8 Q F0 2.5(,s)C(tarting with zero\) is at the top.) +-2.5 E F2(dir)144.35 700.8 Q F0(Adds)180 700.8 Q F2(dir)3.137 E F0 .287 +(to the directory stack at the top, making it the ne)3.517 F 2.788(wc) +-.25 G .288(urrent w)-2.788 F .288(orking directory as)-.1 F +(if it had been supplied as the ar)180 712.8 Q(gument to the)-.18 E F1 +(cd)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .489(If the)144 729.6 R F1(pushd) +2.989 E F0 .489(command is successful, a)2.989 F F1(dirs)2.988 E F0 .488 +(is performed as well.)2.988 F .488(If the \214rst form is used,)5.488 F +F1(pushd)2.988 E F0(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(68) +190.395 E 0 Cg EP +%%Page: 69 69 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E 1.039 +(returns 0 unless the cd to)144 84 R/F1 10/Times-Italic@0 SF(dir)3.889 E +F0 -.1(fa)4.269 G 3.539(ils. W).1 F 1.039(ith the second form,)-.4 F/F2 +10/Times-Bold@0 SF(pushd)3.54 E F0 1.04(returns 0 unless the directory) +3.54 F .847(stack is empty)144 96 R 3.347(,an)-.65 G(on-e)-3.347 E .847 +(xistent directory stack element is speci\214ed, or the directory chang\ +e to the)-.15 F(speci\214ed ne)144 108 Q 2.5(wc)-.25 G +(urrent directory f)-2.5 E(ails.)-.1 E F2(pwd)108 124.8 Q F0([)2.5 E F2 +(\255LP)A F0(])A .844(Print the absolute pathname of the current w)144 +136.8 R .845(orking directory)-.1 F 5.845(.T)-.65 G .845 +(he pathname printed contains no)-5.845 F .182(symbolic links if the)144 +148.8 R F22.681 E F0 .181(option is supplied or the)2.681 F F2 +.181(\255o ph)2.681 F(ysical)-.15 E F0 .181(option to the)2.681 F F2 +(set)2.681 E F0 -.2(bu)2.681 G .181(iltin command is).2 F 3.263 +(enabled. If)144 160.8 R(the)3.263 E F23.263 E F0 .763 +(option is used, the pathname printed may contain symbolic links.)3.263 +F .764(The return)5.764 F .405(status is 0 unless an error occurs while\ + reading the name of the current directory or an in)144 172.8 R -.25(va) +-.4 G .405(lid op-).25 F(tion is supplied.)144 184.8 Q F2 -.18(re)108 +201.6 S(ad).18 E F0([)3.816 E F2(\255ers)A F0 3.816(][)C F2-3.816 +E F1(aname)3.816 E F0 3.816(][)C F2-3.816 E F1(delim)3.816 E F0 +3.816(][)C F2-3.816 E F1(te)3.816 E(xt)-.2 E F0 3.816(][)C F2 +-3.816 E F1(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.817(][)C F2 +-3.817 E F1(nc)3.817 E(har)-.15 E(s)-.1 E F0 3.817(][)C F2-3.817 E +F1(pr)3.817 E(ompt)-.45 E F0 3.817(][)C F2-3.817 E F1(timeout) +3.817 E F0 3.817(][)C F2-3.817 E F1(fd)3.817 E F0(])A([)108 213.6 +Q F1(name)A F0(...])2.5 E .516(One line is read from the standard input\ +, or from the \214le descriptor)144 225.6 R F1(fd)3.016 E F0 .516 +(supplied as an ar)3.016 F .516(gument to)-.18 F(the)144 237.6 Q F2 +2.935 E F0 .435(option, split into w)2.935 F .435 +(ords as described abo)-.1 F .735 -.15(ve u)-.15 H(nder).15 E F2 -.75 +(Wo)2.935 G .435(rd Splitting).75 F F0 2.935(,a)C .436(nd the \214rst w) +-2.935 F .436(ord is as-)-.1 F .376(signed to the \214rst)144 249.6 R F1 +(name)3.236 E F0 2.876(,t).18 G .376(he second w)-2.876 F .376 +(ord to the second)-.1 F F1(name)3.236 E F0 2.876(,a).18 G .376 +(nd so on.)-2.876 F .375(If there are more w)5.376 F(ords)-.1 E .236 +(than names, the remaining w)144 261.6 R .237(ords and their interv)-.1 +F .237(ening delimiters are assigned to the last)-.15 F F1(name)3.097 E +F0 5.237(.I).18 G(f)-5.237 E .875(there are fe)144 273.6 R .875(wer w) +-.25 F .875(ords read from the input stream than names, the remaining n\ +ames are assigned)-.1 F .517(empty v)144 285.6 R 3.017(alues. The)-.25 F +.517(characters in)3.017 F/F3 9/Times-Bold@0 SF(IFS)3.017 E F0 .518 +(are used to split the line into w)2.767 F .518 +(ords using the same rules the)-.1 F .027(shell uses for e)144 297.6 R +.026(xpansion \(described abo)-.15 F .326 -.15(ve u)-.15 H(nder).15 E F2 +-.75(Wo)2.526 G .026(rd Splitting).75 F F0 2.526(\). The)B .026 +(backslash character \()2.526 F F2(\\)A F0 2.526(\)m)C(ay)-2.526 E .488 +(be used to remo)144 309.6 R .788 -.15(ve a)-.15 H .788 -.15(ny s).15 H +.488(pecial meaning for the ne).15 F .488 +(xt character read and for line continuation.)-.15 F(Op-)5.489 E +(tions, if supplied, ha)144 321.6 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F2144 333.6 Q F1(aname)2.5 E F0 1.026 +(The w)180 345.6 R 1.026 +(ords are assigned to sequential indices of the array v)-.1 F(ariable) +-.25 E F1(aname)3.855 E F0 3.525(,s).18 G 1.025(tarting at 0.)-3.525 F +F1(aname)180.33 357.6 Q F0(is unset before an)2.68 E 2.5(yn)-.15 G .5 +-.25(ew va)-2.5 H(lues are assigned.).25 E(Other)5 E F1(name)2.5 E F0 +(ar)2.5 E(guments are ignored.)-.18 E F2144 369.6 Q F1(delim)2.5 E +F0 .28(The \214rst character of)180 381.6 R F1(delim)2.78 E F0 .281 +(is used to terminate the input line, rather than ne)2.78 F 2.781 +(wline. If)-.25 F F1(de-)2.781 E(lim)180 393.6 Q F0 +(is the empty string,)2.5 E F2 -.18(re)2.5 G(ad).18 E F0 +(will terminate a line when it reads a NUL character)2.5 E(.)-.55 E F2 +144 405.6 Q F0 .373 +(If the standard input is coming from a terminal,)180 405.6 R F2 -.18 +(re)2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.872 E F0(abo) +2.622 E -.15(ve)-.15 G 2.872(\)i).15 G 2.872(su)-2.872 G(sed)-2.872 E +.218(to obtain the line.)180 417.6 R .218 +(Readline uses the current \(or def)5.218 F .218 +(ault, if line editing w)-.1 F .218(as not pre)-.1 F(viously)-.25 E +(acti)180 429.6 Q -.15(ve)-.25 G 2.5(\)e).15 G(diting settings, b)-2.5 E +(ut uses Readline')-.2 E 2.5(sd)-.55 G(ef)-2.5 E +(ault \214lename completion.)-.1 E F2144 441.6 Q F1(te)2.5 E(xt) +-.2 E F0(If)180 441.6 Q F2 -.18(re)2.716 G(adline).18 E F0 .216 +(is being used to read the line,)2.716 F F1(te)2.716 E(xt)-.2 E F0 .216 +(is placed into the editing b)2.716 F(uf)-.2 E .215(fer before edit-) +-.25 F(ing be)180 453.6 Q(gins.)-.15 E F2144 465.6 Q F1(nc)2.5 E +(har)-.15 E(s)-.1 E F2 -.18(re)180 477.6 S(ad).18 E F0 .322 +(returns after reading)2.822 F F1(nc)2.823 E(har)-.15 E(s)-.1 E F0 .323 +(characters rather than w)2.823 F .323 +(aiting for a complete line of in-)-.1 F(put, b)180 489.6 Q +(ut honors a delimiter if fe)-.2 E(wer than)-.25 E F1(nc)2.5 E(har)-.15 +E(s)-.1 E F0(characters are read before the delimiter)2.5 E(.)-.55 E F2 +144 501.6 Q F1(nc)2.5 E(har)-.15 E(s)-.1 E F2 -.18(re)180 513.6 S +(ad).18 E F0 1.269(returns after reading e)3.77 F(xactly)-.15 E F1(nc) +3.769 E(har)-.15 E(s)-.1 E F0 1.269(characters rather than w)3.769 F +1.269(aiting for a complete)-.1 F .274 +(line of input, unless EOF is encountered or)180 525.6 R F2 -.18(re) +2.775 G(ad).18 E F0 .275(times out.)2.775 F .275 +(Delimiter characters encoun-)5.275 F 1.003 +(tered in the input are not treated specially and do not cause)180 537.6 +R F2 -.18(re)3.502 G(ad).18 E F0 1.002(to return until)3.502 F F1(nc) +3.502 E(har)-.15 E(s)-.1 E F0 .608(characters are read.)180 549.6 R .608 +(The result is not split on the characters in)5.608 F F2(IFS)3.108 E F0 +3.108(;t)C .609(he intent is that the)-3.108 F -.25(va)180 561.6 S .67 +(riable is assigned e).25 F .669 +(xactly the characters read \(with the e)-.15 F .669 +(xception of backslash; see the)-.15 F F2180 573.6 Q F0 +(option belo)2.5 E(w\).)-.25 E F2144 585.6 Q F1(pr)2.5 E(ompt)-.45 +E F0(Display)180 597.6 Q F1(pr)3.66 E(ompt)-.45 E F0 1.161 +(on standard error)3.66 F 3.661(,w)-.4 G 1.161(ithout a trailing ne) +-3.661 F 1.161(wline, before attempting to read)-.25 F(an)180 609.6 Q +2.5(yi)-.15 G 2.5(nput. The)-2.5 F +(prompt is displayed only if input is coming from a terminal.)2.5 E F2 +144 621.6 Q F0 .544(Backslash does not act as an escape character) +180 621.6 R 5.543(.T)-.55 G .543 +(he backslash is considered to be part of)-5.543 F .492(the line.)180 +633.6 R .492(In particular)5.492 F 2.992(,ab)-.4 G(ackslash-ne)-2.992 E +.493(wline pair may not then be used as a line continua-)-.25 F(tion.) +180 645.6 Q F2144 657.6 Q F0(Silent mode.)180 657.6 Q +(If input is coming from a terminal, characters are not echoed.)5 E F2 +144 669.6 Q F1(timeout)2.5 E F0(Cause)180 681.6 Q F2 -.18(re)2.929 +G(ad).18 E F0 .428(to time out and return f)2.929 F .428 +(ailure if a complete line of input \(or a speci\214ed num-)-.1 F .56 +(ber of characters\) is not read within)180 693.6 R F1(timeout)3.061 E +F0(seconds.)3.061 E F1(timeout)5.561 E F0 .561(may be a decimal number) +3.061 F(with a fractional portion follo)180 705.6 Q +(wing the decimal point.)-.25 E(This option is only ef)5 E(fecti)-.25 E +.3 -.15(ve i)-.25 H(f).15 E F2 -.18(re)2.5 G(ad).18 E F0 .506(is readin\ +g input from a terminal, pipe, or other special \214le; it has no ef)180 +717.6 R .506(fect when reading)-.25 F .59(from re)180 729.6 R .59 +(gular \214les.)-.15 F(If)5.59 E F2 -.18(re)3.09 G(ad).18 E F0 .589 +(times out,)3.09 F F2 -.18(re)3.089 G(ad).18 E F0(sa)3.089 E -.15(ve)-.2 +G 3.089(sa).15 G .889 -.15(ny p)-3.089 H .589 +(artial input read into the speci\214ed).15 F(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(69)190.395 E 0 Cg EP +%%Page: 70 70 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E -.25(va)180 84 S +(riable).25 E/F1 10/Times-Italic@0 SF(name)2.77 E F0 5.27(.I)C(f)-5.27 E +F1(timeout)2.77 E F0 .27(is 0,)2.77 F/F2 10/Times-Bold@0 SF -.18(re)2.77 +G(ad).18 E F0 .27(returns immediately)2.77 F 2.77(,w)-.65 G .27 +(ithout trying to read an)-2.77 F 2.77(yd)-.15 G(ata.)-2.77 E 1.12 +(The e)180 96 R 1.12(xit status is 0 if input is a)-.15 F -.25(va)-.2 G +1.12(ilable on the speci\214ed \214le descriptor).25 F 3.62(,n)-.4 G +1.12(on-zero other)-3.62 F(-)-.2 E 2.5(wise. The)180 108 R -.15(ex)2.5 G +(it status is greater than 128 if the timeout is e).15 E(xceeded.)-.15 E +F2144 120 Q F1(fd)2.5 E F0(Read input from \214le descriptor)180 +120 Q F1(fd)2.5 E F0(.)A .522(If no)144 136.8 R F1(names)3.382 E F0 .522 +(are supplied, the line read, without the ending delimiter b)3.292 F +.522(ut otherwise unmodi\214ed, is)-.2 F 1.187(assigned to the v)144 +148.8 R(ariable)-.25 E/F3 9/Times-Bold@0 SF(REPL)3.686 E(Y)-.828 E/F4 9 +/Times-Roman@0 SF(.)A F0 1.186(The e)5.686 F 1.186 +(xit status is zero, unless end-of-\214le is encountered,)-.15 F F2 -.18 +(re)3.686 G(ad).18 E F0 .96 +(times out \(in which case the status is greater than 128\), a v)144 +160.8 R .961(ariable assignment error \(such as as-)-.25 F .707 +(signing to a readonly v)144 172.8 R .706(ariable\) occurs, or an in) +-.25 F -.25(va)-.4 G .706(lid \214le descriptor is supplied as the ar) +.25 F .706(gument to)-.18 F F2144 184.8 Q F0(.)A F2 -.18(re)108 +201.6 S(adonly).18 E F0([)2.5 E F2(\255aAf)A F0 2.5(][)C F2-2.5 E +F0 2.5(][)C F1(name)-2.5 E F0([=)A F1(wor)A(d)-.37 E F0 2.5(].)C(..]) +-2.5 E .77(The gi)144 213.6 R -.15(ve)-.25 G(n).15 E F1(names)3.27 E F0 +.77(are mark)3.27 F .77(ed readonly; the v)-.1 F .77(alues of these)-.25 +F F1(names)3.63 E F0 .77(may not be changed by subse-)3.54 F 1.097 +(quent assignment.)144 225.6 R 1.097(If the)6.097 F F23.597 E F0 +1.097(option is supplied, the functions corresponding to the)3.597 F F1 +(names)3.596 E F0 1.096(are so)3.596 F(mark)144 237.6 Q 3.334(ed. The) +-.1 F F23.334 E F0 .834(option restricts the v)3.334 F .834 +(ariables to inde)-.25 F -.15(xe)-.15 G 3.334(da).15 G .834(rrays; the) +-3.334 F F23.334 E F0 .834(option restricts the v)3.334 F(ari-) +-.25 E .777(ables to associati)144 249.6 R 1.077 -.15(ve a)-.25 H 3.277 +(rrays. If).15 F .777(both options are supplied,)3.277 F F23.277 E +F0(tak)3.277 E .776(es precedence.)-.1 F .776(If no)5.776 F F1(name) +3.636 E F0(ar)3.456 E(gu-)-.18 E .521(ments are gi)144 261.6 R -.15(ve) +-.25 G .521(n, or if the).15 F F23.021 E F0 .521 +(option is supplied, a list of all readonly names is printed.)3.021 F +.522(The other)5.521 F .295(options may be used to restrict the output \ +to a subset of the set of readonly names.)144 273.6 R(The)5.295 E F2 +2.795 E F0(option)2.795 E .786 +(causes output to be displayed in a format that may be reused as input.) +144 285.6 R .786(If a v)5.786 F .786(ariable name is fol-)-.25 F(lo)144 +297.6 Q .718(wed by =)-.25 F F1(wor)A(d)-.37 E F0 3.218(,t)C .718(he v) +-3.218 F .718(alue of the v)-.25 F .718(ariable is set to)-.25 F F1(wor) +3.218 E(d)-.37 E F0 5.718(.T)C .718(he return status is 0 unless an in) +-5.718 F -.25(va)-.4 G(lid).25 E .26(option is encountered, one of the) +144 309.6 R F1(names)3.12 E F0 .26(is not a v)3.03 F .26(alid shell v) +-.25 F .26(ariable name, or)-.25 F F22.76 E F0 .26 +(is supplied with a)2.76 F F1(name)144.36 321.6 Q F0 +(that is not a function.)2.68 E F2 -.18(re)108 338.4 S(tur).18 E(n)-.15 +E F0([)2.5 E F1(n)A F0(])A .021(Causes a function to stop e)144 350.4 R +-.15(xe)-.15 G .021(cuting and return the v).15 F .021 +(alue speci\214ed by)-.25 F F1(n)2.88 E F0 .02(to its caller)2.76 F 5.02 +(.I)-.55 G(f)-5.02 E F1(n)2.88 E F0 .02(is omitted,)2.76 F .596 +(the return status is that of the last command e)144 362.4 R -.15(xe) +-.15 G .597(cuted in the function body).15 F 5.597(.I)-.65 G(f)-5.597 E +F2 -.18(re)3.097 G(tur).18 E(n)-.15 E F0 .597(is e)3.097 F -.15(xe)-.15 +G(cuted).15 E .267(by a trap handler)144 374.4 R 2.767(,t)-.4 G .267 +(he last command used to determine the status is the last command e) +-2.767 F -.15(xe)-.15 G .267(cuted be-).15 F .02(fore the trap handler) +144 386.4 R 5.02(.I)-.55 G(f)-5.02 E F2 -.18(re)2.52 G(tur).18 E(n)-.15 +E F0 .02(is e)2.52 F -.15(xe)-.15 G .02(cuted during a).15 F F2(DEB)2.52 +E(UG)-.1 E F0 .02(trap, the last command used to deter)2.52 F(-)-.2 E +.886(mine the status is the last command e)144 398.4 R -.15(xe)-.15 G +.886(cuted by the trap handler before).15 F F2 -.18(re)3.385 G(tur).18 E +(n)-.15 E F0 -.1(wa)3.385 G 3.385(si).1 G -1.9 -.4(nv o)-3.385 H -.1(ke) +.4 G 3.385(d. If).1 F F2 -.18(re)144 410.4 S(tur).18 E(n)-.15 E F0 .627 +(is used outside a function, b)3.127 F .628(ut during e)-.2 F -.15(xe) +-.15 G .628(cution of a script by the).15 F F2(.)3.128 E F0(\()5.628 E +F2(sour)A(ce)-.18 E F0 3.128(\)c)C .628(ommand, it)-3.128 F .589 +(causes the shell to stop e)144 422.4 R -.15(xe)-.15 G .589 +(cuting that script and return either).15 F F1(n)3.448 E F0 .588 +(or the e)3.328 F .588(xit status of the last com-)-.15 F .325(mand e) +144 434.4 R -.15(xe)-.15 G .325(cuted within the script as the e).15 F +.326(xit status of the script.)-.15 F(If)5.326 E F1(n)2.826 E F0 .326 +(is supplied, the return v)2.826 F .326(alue is)-.25 F .445 +(its least signi\214cant 8 bits.)144 446.4 R .444 +(The return status is non-zero if)5.445 F F2 -.18(re)2.944 G(tur).18 E +(n)-.15 E F0 .444(is supplied a non-numeric ar)2.944 F(gu-)-.18 E .381 +(ment, or is used outside a function and not during e)144 458.4 R -.15 +(xe)-.15 G .381(cution of a script by).15 F F2(.)2.881 E F0(or)3.714 E +F2(sour)2.881 E(ce)-.18 E F0 5.381(.A)C .681 -.15(ny c)-5.381 H(om-).15 +E .75(mand associated with the)144 470.4 R F2(RETURN)3.249 E F0 .749 +(trap is e)3.249 F -.15(xe)-.15 G .749(cuted before e).15 F -.15(xe)-.15 +G .749(cution resumes after the function).15 F(or script.)144 482.4 Q F2 +(set)108 499.2 Q F0([)2.5 E F2(\255\255abefhkmnptuvxBCEHPT)A F0 2.5(][)C +F2-2.5 E F1(option\255name)2.5 E F0 2.5(][)C F1(ar)-2.5 E(g)-.37 E +F0(...])2.5 E F2(set)108 511.2 Q F0([)2.5 E F2(+abefhkmnptuvxBCEHPT)A F0 +2.5(][)C F2(+o)-2.5 E F1(option\255name)2.5 E F0 2.5(][)C F1(ar)-2.5 E +(g)-.37 E F0(...])2.5 E -.4(Wi)144 523.2 S .835 +(thout options, the name and v).4 F .835(alue of each shell v)-.25 F +.836(ariable are displayed in a format that can be)-.25 F .784 +(reused as input for setting or resetting the currently-set v)144 535.2 +R 3.284(ariables. Read-only)-.25 F -.25(va)3.284 G .783 +(riables cannot be).25 F 2.946(reset. In)144 547.2 R F1 .447(posix mode) +2.946 F F0 2.947(,o)C .447(nly shell v)-2.947 F .447 +(ariables are listed.)-.25 F .447 +(The output is sorted according to the current)5.447 F 3.531 +(locale. When)144 559.2 R 1.031(options are speci\214ed, the)3.531 F +3.531(ys)-.15 G 1.031(et or unset shell attrib)-3.531 F 3.53(utes. An) +-.2 F 3.53(ya)-.15 G -.18(rg)-3.53 G 1.03(uments remaining).18 F .584 +(after option processing are treated as v)144 571.2 R .585 +(alues for the positional parameters and are assigned, in or)-.25 F(-) +-.2 E(der)144 583.2 Q 2.5(,t)-.4 G(o)-2.5 E F2($1)2.5 E F0(,)A F2($2)2.5 +E F0(,)A F2 2.5(... $)2.5 F F1(n)A F0 5(.O)C(ptions, if speci\214ed, ha) +-5 E .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2144 +595.2 Q F0 1.378(Each v)184 595.2 R 1.377 +(ariable or function that is created or modi\214ed is gi)-.25 F -.15(ve) +-.25 G 3.877(nt).15 G 1.377(he e)-3.877 F 1.377(xport attrib)-.15 F +1.377(ute and)-.2 F(mark)184 607.2 Q(ed for e)-.1 E(xport to the en)-.15 +E(vironment of subsequent commands.)-.4 E F2144 619.2 Q F0 .131 +(Report the status of terminated background jobs immediately)184 619.2 R +2.632(,r)-.65 G .132(ather than before the ne)-2.632 F(xt)-.15 E +(primary prompt.)184 631.2 Q(This is ef)5 E(fecti)-.25 E .3 -.15(ve o) +-.25 H(nly when job control is enabled.).15 E F2144 643.2 Q F0 +.088(Exit immediately if a)184 643.2 R F1(pipeline)2.588 E F0 .087 +(\(which may consist of a single)2.588 F F1 .087(simple command)2.587 F +F0 .087(\), a)B F1(list)2.587 E F0 2.587(,o)C(r)-2.587 E(a)184 655.2 Q +F1 1.52(compound command)4.02 F F0(\(see)4.021 E F3 1.521(SHELL GRAMMAR) +4.021 F F0(abo)3.771 E -.15(ve)-.15 G 1.521(\), e).15 F 1.521 +(xits with a non-zero status.)-.15 F .08(The shell does not e)184 667.2 +R .079(xit if the command that f)-.15 F .079 +(ails is part of the command list immediately)-.1 F(follo)184 679.2 Q +1.654(wing a)-.25 F F2(while)4.154 E F0(or)4.154 E F2(until)4.154 E F0 +-.1(ke)4.154 G(yw)-.05 E 1.655(ord, part of the test follo)-.1 F 1.655 +(wing the)-.25 F F2(if)4.155 E F0(or)4.155 E F2(elif)4.155 E F0(reserv) +4.155 E(ed)-.15 E -.1(wo)184 691.2 S .582(rds, part of an).1 F 3.082(yc) +-.15 G .582(ommand e)-3.082 F -.15(xe)-.15 G .581(cuted in a).15 F F2 +(&&)3.081 E F0(or)3.081 E F2(||)3.081 E F0 .581(list e)3.081 F .581 +(xcept the command follo)-.15 F(wing)-.25 E .917(the \214nal)184 703.2 R +F2(&&)3.417 E F0(or)3.417 E F2(||)3.417 E F0 3.417(,a)C 1.217 -.15(ny c) +-3.417 H .918(ommand in a pipeline b).15 F .918 +(ut the last, or if the command')-.2 F 3.418(sr)-.55 G(eturn)-3.418 E +-.25(va)184 715.2 S .661(lue is being in).25 F -.15(ve)-.4 G .661 +(rted with).15 F F2(!)3.161 E F0 5.661(.I)C 3.161(fac)-5.661 G .66 +(ompound command other than a subshell returns a)-3.161 F 1.112 +(non-zero status because a command f)184 727.2 R 1.112(ailed while)-.1 F +F23.612 E F0 -.1(wa)3.612 G 3.612(sb).1 G 1.113 +(eing ignored, the shell does)-3.612 F(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(70)190.395 E 0 Cg EP +%%Page: 71 71 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .178(not e)184 84 +R 2.678(xit. A)-.15 F .178(trap on)2.678 F/F1 10/Times-Bold@0 SF(ERR) +2.678 E F0 2.678(,i)C 2.678(fs)-2.678 G .178(et, is e)-2.678 F -.15(xe) +-.15 G .178(cuted before the shell e).15 F 2.677(xits. This)-.15 F .177 +(option applies to)2.677 F .617(the shell en)184 96 R .617 +(vironment and each subshell en)-.4 F .617(vironment separately \(see) +-.4 F/F2 9/Times-Bold@0 SF .618(COMMAND EXE-)3.118 F .643(CUTION ENVIR) +184 108 R(ONMENT)-.27 E F0(abo)2.893 E -.15(ve)-.15 G .643 +(\), and may cause subshells to e).15 F .643(xit before e)-.15 F -.15 +(xe)-.15 G .642(cuting all).15 F(the commands in the subshell.)184 120 Q +.998(If a compound command or shell function e)184 138 R -.15(xe)-.15 G +.999(cutes in a conte).15 F .999(xt where)-.15 F F13.499 E F0 .999 +(is being ig-)3.499 F .089(nored, none of the commands e)184 150 R -.15 +(xe)-.15 G .089(cuted within the compound command or function body).15 F +.502(will be af)184 162 R .502(fected by the)-.25 F F13.002 E F0 +.502(setting, e)3.002 F -.15(ve)-.25 G 3.002(ni).15 G(f)-3.002 E F1 +3.002 E F0 .502(is set and a command returns a f)3.002 F .503 +(ailure sta-)-.1 F 4.184(tus. If)184 174 R 4.184(ac)4.184 G 1.684 +(ompound command or shell function sets)-4.184 F F14.183 E F0 +1.683(while e)4.183 F -.15(xe)-.15 G 1.683(cuting in a conte).15 F(xt) +-.15 E(where)184 186 Q F13.153 E F0 .653 +(is ignored, that setting will not ha)3.153 F .954 -.15(ve a)-.2 H .954 +-.15(ny e).15 H -.25(ff).15 G .654(ect until the compound command).25 F +(or the command containing the function call completes.)184 198 Q F1 +144 210 Q F0(Disable pathname e)184 210 Q(xpansion.)-.15 E F1 +144 222 Q F0 .988(Remember the location of commands as the)184 222 +R 3.488(ya)-.15 G .988(re look)-3.488 F .988(ed up for e)-.1 F -.15(xe) +-.15 G 3.488(cution. This).15 F .987(is en-)3.487 F(abled by def)184 234 +Q(ault.)-.1 E F1144 246 Q F0 .513(All ar)184 246 R .514 +(guments in the form of assignment statements are placed in the en)-.18 +F .514(vironment for a)-.4 F +(command, not just those that precede the command name.)184 258 Q F1 +144 270 Q F0 .149(Monitor mode.)184 270 R .149 +(Job control is enabled.)5.149 F .148(This option is on by def)5.149 F +.148(ault for interacti)-.1 F .448 -.15(ve s)-.25 H(hells).15 E .65 +(on systems that support it \(see)184 282 R F2 .651(JOB CONTR)3.151 F +(OL)-.27 E F0(abo)2.901 E -.15(ve)-.15 G 3.151(\). All).15 F .651 +(processes run in a separate)3.151 F .679(process group.)184 294 R .678 +(When a background job completes, the shell prints a line containing it\ +s)5.679 F -.15(ex)184 306 S(it status.).15 E F1144 318 Q F0 .652 +(Read commands b)184 318 R .652(ut do not e)-.2 F -.15(xe)-.15 G .652 +(cute them.).15 F .653(This may be used to check a shell script for) +5.652 F(syntax errors.)184 330 Q(This is ignored by interacti)5 E .3 +-.15(ve s)-.25 H(hells.).15 E F1144 342 Q/F3 10/Times-Italic@0 SF +(option\255name)2.5 E F0(The)184 354 Q F3(option\255name)2.5 E F0 +(can be one of the follo)2.5 E(wing:)-.25 E F1(allexport)184 366 Q F0 +(Same as)224 378 Q F12.5 E F0(.)A F1(braceexpand)184 390 Q F0 +(Same as)224 402 Q F12.5 E F0(.)A F1(emacs)184 414 Q F0 .089 +(Use an emacs-style command line editing interf)224 414 R 2.589 +(ace. This)-.1 F .089(is enabled by def)2.589 F(ault)-.1 E .95 +(when the shell is interacti)224 426 R -.15(ve)-.25 G 3.45(,u).15 G .95 +(nless the shell is started with the)-3.45 F F1(\255\255noediting)3.45 E +F0 2.5(option. This)224 438 R(also af)2.5 E(fects the editing interf) +-.25 E(ace used for)-.1 E F1 -.18(re)2.5 G(ad \255e).18 E F0(.)A F1(err) +184 450 Q(exit)-.18 E F0(Same as)224 450 Q F12.5 E F0(.)A F1 +(errtrace)184 462 Q F0(Same as)224 462 Q F12.5 E F0(.)A F1 +(functrace)184 474 Q F0(Same as)224 486 Q F12.5 E F0(.)A F1 +(hashall)184 498 Q F0(Same as)224 498 Q F12.5 E F0(.)A F1 +(histexpand)184 510 Q F0(Same as)224 522 Q F12.5 E F0(.)A F1 +(history)184 534 Q F0 .587(Enable command history)224 534 R 3.087(,a) +-.65 G 3.087(sd)-3.087 G .587(escribed abo)-3.087 F .887 -.15(ve u)-.15 +H(nder).15 E F2(HIST)3.087 E(OR)-.162 E(Y)-.315 E/F4 9/Times-Roman@0 SF +(.)A F0 .587(This option is)5.087 F(on by def)224 546 Q +(ault in interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F1(ignor)184 +558 Q(eeof)-.18 E F0 1.656(The ef)224 570 R 1.656 +(fect is as if the shell command)-.25 F/F5 10/Courier@0 SF(IGNOREEOF=10) +4.157 E F0 1.657(had been e)4.157 F -.15(xe)-.15 G(cuted).15 E(\(see)224 +582 Q F1(Shell V)2.5 E(ariables)-.92 E F0(abo)2.5 E -.15(ve)-.15 G(\).) +.15 E F1 -.1(ke)184 594 S(yw).1 E(ord)-.1 E F0(Same as)224 606 Q F1 +2.5 E F0(.)A F1(monitor)184 618 Q F0(Same as)224 618 Q F12.5 +E F0(.)A F1(noclob)184 630 Q(ber)-.1 E F0(Same as)224 642 Q F12.5 +E F0(.)A F1(noexec)184 654 Q F0(Same as)224 654 Q F12.5 E F0(.)A +F1(noglob)184 666 Q F0(Same as)224 666 Q F12.5 E F0(.)A F1(nolog) +184 678 Q F0(Currently ignored.)224 678 Q F1(notify)184 690 Q F0 +(Same as)224 690 Q F12.5 E F0(.)A F1(nounset)184 702 Q F0(Same as) +224 702 Q F12.5 E F0(.)A F1(onecmd)184 714 Q F0(Same as)224 714 Q +F12.5 E F0(.)A(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(71) +190.395 E 0 Cg EP +%%Page: 72 72 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(ph)184 84 Q(ysical)-.15 E F0(Same as)224 84 Q F12.5 E F0(.)A F1 +(pipefail)184 96 Q F0 1.03(If set, the return v)224 96 R 1.029 +(alue of a pipeline is the v)-.25 F 1.029 +(alue of the last \(rightmost\) com-)-.25 F 1.136(mand to e)224 108 R +1.136 +(xit with a non-zero status, or zero if all commands in the pipeline) +-.15 F -.15(ex)224 120 S(it successfully).15 E 5(.T)-.65 G +(his option is disabled by def)-5 E(ault.)-.1 E F1(posix)184 132 Q F0 +2.091(Change the beha)224 132 R 2.091(vior of)-.2 F F1(bash)4.591 E F0 +2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091 +(fers from the)-.25 F 1.212(POSIX standard to match the standard \()224 +144 R/F2 10/Times-Italic@0 SF 1.212(posix mode)B F0 3.712(\). See)B/F3 9 +/Times-Bold@0 SF 1.212(SEE ALSO)3.712 F F0(belo)3.463 E(w)-.25 E .955 +(for a reference to a document that details ho)224 156 R 3.454(wp)-.25 G +.954(osix mode af)-3.454 F .954(fects bash')-.25 F 3.454(sb)-.55 G(e-) +-3.454 E(ha)224 168 Q(vior)-.2 E(.)-.55 E F1(pri)184 180 Q(vileged)-.1 E +F0(Same as)224 192 Q F12.5 E F0(.)A F1 -.1(ve)184 204 S(rbose).1 E +F0(Same as)224 204 Q F12.5 E F0(.)A F1(vi)184 216 Q F0 .209 +(Use a vi-style command line editing interf)224 216 R 2.709(ace. This) +-.1 F .209(also af)2.709 F .21(fects the editing in-)-.25 F(terf)224 228 +Q(ace used for)-.1 E F1 -.18(re)2.5 G(ad \255e).18 E F0(.)A F1(xtrace) +184 240 Q F0(Same as)224 240 Q F12.5 E F0(.)A(If)184 258 Q F1 +3.053 E F0 .553(is supplied with no)3.053 F F2(option\255name) +3.053 E F0 3.053(,t)C .553(he v)-3.053 F .552 +(alues of the current options are printed.)-.25 F(If)5.552 E F1(+o)184 +270 Q F0 1.071(is supplied with no)3.571 F F2(option\255name)3.571 E F0 +3.571(,as)C 1.071(eries of)-3.571 F F1(set)3.572 E F0 1.072 +(commands to recreate the current)3.572 F +(option settings is displayed on the standard output.)184 282 Q F1 +144 294 Q F0 -.45(Tu)184 294 S 1.072(rn on).45 F F2(privile)4.822 E -.1 +(ge)-.4 G(d).1 E F0 3.572(mode. In)4.342 F 1.072(this mode, the)3.572 F +F3($ENV)3.572 E F0(and)3.322 E F3($B)3.572 E(ASH_ENV)-.27 E F0 1.071 +(\214les are not pro-)3.322 F 1.5 +(cessed, shell functions are not inherited from the en)184 306 R 1.501 +(vironment, and the)-.4 F F3(SHELLOPTS)4.001 E/F4 9/Times-Roman@0 SF(,)A +F3 -.27(BA)184 318 S(SHOPTS).27 E F4(,)A F3(CDP)2.775 E -.855(AT)-.666 G +(H).855 E F4(,)A F0(and)2.775 E F3(GLOBIGNORE)3.025 E F0 -.25(va)2.775 G +.524(riables, if the).25 F 3.024(ya)-.15 G .524(ppear in the en)-3.024 F +(vironment,)-.4 E .379(are ignored.)184 330 R .379 +(If the shell is started with the ef)5.379 F(fecti)-.25 E .679 -.15 +(ve u)-.25 H .38(ser \(group\) id not equal to the real).15 F .462 +(user \(group\) id, and the)184 342 R F12.961 E F0 .461 +(option is not supplied, these actions are tak)2.961 F .461 +(en and the ef)-.1 F(fec-)-.25 E(ti)184 354 Q .694 -.15(ve u)-.25 H .394 +(ser id is set to the real user id.).15 F .395(If the)5.395 F F1 +2.895 E F0 .395(option is supplied at startup, the ef)2.895 F(fecti)-.25 +E -.15(ve)-.25 G .387(user id is not reset.)184 366 R -.45(Tu)5.387 G +.387(rning this option of).45 F 2.886(fc)-.25 G .386(auses the ef)-2.886 +F(fecti)-.25 E .686 -.15(ve u)-.25 H .386(ser and group ids to be).15 F +(set to the real user and group ids.)184 378 Q F1144 390 Q F0 +(Exit after reading and e)184 390 Q -.15(xe)-.15 G(cuting one command.) +.15 E F1144 402 Q F0 -.35(Tr)184 402 S .043(eat unset v).35 F .044 +(ariables and parameters other than the special parameters "@" and "*" \ +as an)-.25 F .183(error when performing parameter e)184 414 R 2.683 +(xpansion. If)-.15 F -.15(ex)2.683 G .182 +(pansion is attempted on an unset v).15 F(ari-)-.25 E .746 +(able or parameter)184 426 R 3.246(,t)-.4 G .746 +(he shell prints an error message, and, if not interacti)-3.246 F -.15 +(ve)-.25 G 3.246(,e).15 G .746(xits with a)-3.396 F(non-zero status.)184 +438 Q F1144 450 Q F0(Print shell input lines as the)184 450 Q 2.5 +(ya)-.15 G(re read.)-2.5 E F1144 462 Q F0 .315(After e)184 462 R +.315(xpanding each)-.15 F F2 .315(simple command)2.815 F F0(,)A F1 -.25 +(fo)2.815 G(r).25 E F0(command,)2.815 E F1(case)2.815 E F0(command,) +2.815 E F1(select)2.815 E F0(command,)2.815 E 1.235(or arithmetic)184 +474 R F1 -.25(fo)3.736 G(r).25 E F0 1.236(command, display the e)3.736 F +1.236(xpanded v)-.15 F 1.236(alue of)-.25 F F3(PS4)3.736 E F4(,)A F0 +(follo)3.486 E 1.236(wed by the com-)-.25 F(mand and its e)184 486 Q +(xpanded ar)-.15 E(guments or associated w)-.18 E(ord list.)-.1 E F1 +144 498 Q F0 1.206(The shell performs brace e)184 498 R 1.206 +(xpansion \(see)-.15 F F1 1.205(Brace Expansion)3.705 F F0(abo)3.705 E +-.15(ve)-.15 G 3.705(\). This).15 F 1.205(is on by de-)3.705 F -.1(fa) +184 510 S(ult.).1 E F1144 522 Q F0 .213(If set,)184 522 R F1(bash) +2.713 E F0 .213(does not o)2.713 F -.15(ve)-.15 G .214(rwrite an e).15 F +.214(xisting \214le with the)-.15 F F1(>)2.714 E F0(,)A F1(>&)2.714 E F0 +2.714(,a)C(nd)-2.714 E F1(<>)2.714 E F0 .214(redirection opera-)2.714 F +3.054(tors. This)184 534 R .553(may be o)3.053 F -.15(ve)-.15 G .553 +(rridden when creating output \214les by using the redirection opera-) +.15 F(tor)184 546 Q F1(>|)2.5 E F0(instead of)2.5 E F1(>)2.5 E F0(.)A F1 +144 558 Q F0 .103(If set, an)184 558 R 2.603(yt)-.15 G .103 +(rap on)-2.603 F F1(ERR)2.603 E F0 .104 +(is inherited by shell functions, command substitutions, and com-)2.603 +F .839(mands e)184 570 R -.15(xe)-.15 G .839(cuted in a subshell en).15 +F 3.339(vironment. The)-.4 F F1(ERR)3.338 E F0 .838 +(trap is normally not inherited in)3.338 F(such cases.)184 582 Q F1 +144 594 Q F0(Enable)184 594 Q F1(!)3.031 E F0 .531 +(style history substitution.)5.531 F .531(This option is on by def)5.531 +F .532(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 606 Q -.15 +(ve)-.25 G(.).15 E F1144 618 Q F0 .96 +(If set, the shell does not resolv)184 618 R 3.459(es)-.15 G .959 +(ymbolic links when e)-3.459 F -.15(xe)-.15 G .959 +(cuting commands such as).15 F F1(cd)3.459 E F0 1.452 +(that change the current w)184 630 R 1.452(orking directory)-.1 F 6.452 +(.I)-.65 G 3.953(tu)-6.452 G 1.453(ses the ph)-3.953 F 1.453 +(ysical directory structure in-)-.05 F 3.335(stead. By)184 642 R(def) +3.335 E(ault,)-.1 E F1(bash)3.334 E F0(follo)3.334 E .834 +(ws the logical chain of directories when performing com-)-.25 F +(mands which change the current directory)184 654 Q(.)-.65 E F1144 +666 Q F0 .89(If set, an)184 666 R 3.39(yt)-.15 G .89(raps on)-3.39 F F1 +(DEB)3.39 E(UG)-.1 E F0(and)3.39 E F1(RETURN)3.39 E F0 .89 +(are inherited by shell functions, command)3.39 F 1.932 +(substitutions, and commands e)184 678 R -.15(xe)-.15 G 1.932 +(cuted in a subshell en).15 F 4.432(vironment. The)-.4 F F1(DEB)4.432 E +(UG)-.1 E F0(and)4.432 E F1(RETURN)184 690 Q F0 +(traps are normally not inherited in such cases.)2.5 E F1144 702 Q +F0 .4(If no ar)184 702 R .401(guments follo)-.18 F 2.901(wt)-.25 G .401 +(his option, then the positional parameters are unset.)-2.901 F +(Otherwise,)5.401 E(the positional parameters are set to the)184 714 Q +F2(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G +(ome of them be)-2.5 E(gin with a)-.15 E F12.5 E F0(.)A +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(72)190.395 E 0 Cg EP +%%Page: 73 73 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF144 84 Q F0 .797(Signal the end of options, cause all remaining) +184 84 R/F2 10/Times-Italic@0 SF(ar)3.297 E(g)-.37 E F0 3.297(st)C 3.297 +(ob)-3.297 G 3.296(ea)-3.297 G .796(ssigned to the positional pa-)-3.296 +F 3.021(rameters. The)184 96 R F13.021 E F0(and)3.022 E F1 +3.022 E F0 .522(options are turned of)3.022 F 3.022(f. If)-.25 F .522 +(there are no)3.022 F F2(ar)3.022 E(g)-.37 E F0 .522 +(s, the positional pa-)B(rameters remain unchanged.)184 108 Q .425 +(The options are of)144 124.8 R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef) +-2.925 E .425(ault unless otherwise noted.)-.1 F .425 +(Using + rather than \255 causes these options)5.425 F .177 +(to be turned of)144 136.8 R 2.677(f. The)-.25 F .178 +(options can also be speci\214ed as ar)2.678 F .178(guments to an in) +-.18 F -.2(vo)-.4 G .178(cation of the shell.).2 F(The)5.178 E .066 +(current set of options may be found in)144 148.8 R F1<24ad>2.566 E F0 +5.066(.T)C .066(he return status is al)-5.066 F -.1(wa)-.1 G .066 +(ys true unless an in).1 F -.25(va)-.4 G .066(lid option).25 F +(is encountered.)144 160.8 Q F1(shift)108 177.6 Q F0([)2.5 E F2(n)A F0 +(])A .428(The positional parameters from)144 189.6 R F2(n)2.928 E F0 +.429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.429 G +.429(rameters represented by the num-).15 F(bers)144 201.6 Q F1($#)2.583 +E F0(do)2.583 E .083(wn to)-.25 F F1($#)2.583 E F0A F2(n)A F0 .083 +(+1 are unset.)B F2(n)5.443 E F0 .083(must be a non-ne)2.823 F -.05(ga) +-.15 G(ti).05 E .382 -.15(ve n)-.25 H .082(umber less than or equal to) +.15 F F1($#)2.582 E F0 5.082(.I)C(f)-5.082 E F2(n)2.942 E F0 .06 +(is 0, no parameters are changed.)144 213.6 R(If)5.06 E F2(n)2.92 E F0 +.06(is not gi)2.8 F -.15(ve)-.25 G .06(n, it is assumed to be 1.).15 F +(If)5.06 E F2(n)2.92 E F0 .06(is greater than)2.8 F F1($#)2.56 E F0 2.56 +(,t)C(he)-2.56 E .144(positional parameters are not changed.)144 225.6 R +.144(The return status is greater than zero if)5.144 F F2(n)3.003 E F0 +.143(is greater than)2.883 F F1($#)2.643 E F0 +(or less than zero; otherwise 0.)144 237.6 Q F1(shopt)108 254.4 Q F0([) +2.5 E F1(\255pqsu)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(optname) +-2.5 E F0(...])2.5 E -.8(To)144 266.4 S .639(ggle the v).8 F .639 +(alues of settings controlling optional shell beha)-.25 F(vior)-.2 E +5.639(.T)-.55 G .64(he settings can be either those)-5.639 F .375 +(listed belo)144 278.4 R 1.675 -.65(w, o)-.25 H 1.175 -.4(r, i).65 H +2.875(ft).4 G(he)-2.875 E F12.875 E F0 .375 +(option is used, those a)2.875 F -.25(va)-.2 G .375(ilable with the).25 +F F12.875 E F0 .374(option to the)2.875 F F1(set)2.874 E F0 -.2 +(bu)2.874 G .374(iltin com-).2 F 2.565(mand. W)144 290.4 R .065 +(ith no options, or with the)-.4 F F12.566 E F0 .066 +(option, a list of all settable options is displayed, with an in-)2.566 +F .074(dication of whether or not each is set; if)144 302.4 R F2 +(optnames)2.574 E F0 .074 +(are supplied, the output is restricted to those op-)2.574 F 3.105 +(tions. The)144 314.4 R F13.105 E F0 .605(option causes output to\ + be displayed in a form that may be reused as input.)3.105 F(Other)5.605 +E(options ha)144 326.4 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F1144 338.4 Q F0(Enable \(set\) each)180 +338.4 Q F2(optname)2.5 E F0(.)A F1144 350.4 Q F0 +(Disable \(unset\) each)180 350.4 Q F2(optname)2.5 E F0(.)A F1144 +362.4 Q F0 .003(Suppresses normal output \(quiet mode\); the return sta\ +tus indicates whether the)180 362.4 R F2(optname)2.503 E F0(is)2.503 E +.255(set or unset.)180 374.4 R .255(If multiple)5.255 F F2(optname)2.755 +E F0(ar)2.755 E .256(guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G +(ith)-2.756 E F12.756 E F0 2.756(,t)C .256 +(he return status is zero if)-2.756 F(all)180 386.4 Q F2(optnames)2.5 E +F0(are enabled; non-zero otherwise.)2.5 E F1144 398.4 Q F0 +(Restricts the v)180 398.4 Q(alues of)-.25 E F2(optname)2.5 E F0 +(to be those de\214ned for the)2.5 E F12.5 E F0(option to the)2.5 +E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .625(If either)144 415.2 R F1 +3.125 E F0(or)3.124 E F13.124 E F0 .624(is used with no) +3.124 F F2(optname)3.124 E F0(ar)3.124 E(guments,)-.18 E F1(shopt)3.124 +E F0(sho)3.124 E .624(ws only those options which are)-.25 F .983 +(set or unset, respecti)144 427.2 R -.15(ve)-.25 G(ly).15 E 5.983(.U) +-.65 G .983(nless otherwise noted, the)-5.983 F F1(shopt)3.484 E F0 .984 +(options are disabled \(unset\) by de-)3.484 F -.1(fa)144 439.2 S(ult.) +.1 E 1.544(The return status when listing options is zero if all)144 456 +R F2(optnames)4.044 E F0 1.544(are enabled, non-zero otherwise.)4.044 F +.696 +(When setting or unsetting options, the return status is zero unless an) +144 468 R F2(optname)3.196 E F0 .696(is not a v)3.196 F .696(alid shell) +-.25 F(option.)144 480 Q(The list of)144 496.8 Q F1(shopt)2.5 E F0 +(options is:)2.5 E F1(assoc_expand_once)144 514.8 Q F0 1.945 +(If set, the shell suppresses multiple e)184 526.8 R -.25(va)-.25 G +1.944(luation of associati).25 F 2.244 -.15(ve a)-.25 H 1.944 +(rray subscripts during).15 F .885(arithmetic e)184 538.8 R .885 +(xpression e)-.15 F -.25(va)-.25 G .885(luation, while e).25 F -.15(xe) +-.15 G .885(cuting b).15 F .885(uiltins that can perform v)-.2 F .885 +(ariable as-)-.25 F(signments, and while e)184 550.8 Q -.15(xe)-.15 G +(cuting b).15 E(uiltins that perform array dereferencing.)-.2 E F1 +(autocd)144 562.8 Q F0 .2 +(If set, a command name that is the name of a directory is e)184 562.8 R +-.15(xe)-.15 G .199(cuted as if it were the ar).15 F(gu-)-.18 E +(ment to the)184 574.8 Q F1(cd)2.5 E F0 2.5(command. This)2.5 F +(option is only used by interacti)2.5 E .3 -.15(ve s)-.25 H(hells.).15 E +F1(cdable_v)144 586.8 Q(ars)-.1 E F0 .155(If set, an ar)184 598.8 R .155 +(gument to the)-.18 F F1(cd)2.655 E F0 -.2(bu)2.655 G .156 +(iltin command that is not a directory is assumed to be the).2 F +(name of a v)184 610.8 Q(ariable whose v)-.25 E +(alue is the directory to change to.)-.25 E F1(cdspell)144 622.8 Q F0 +1.055 +(If set, minor errors in the spelling of a directory component in a)184 +622.8 R F1(cd)3.555 E F0 1.055(command will be)3.555 F 3.987 +(corrected. The)184 634.8 R 1.487(errors check)3.987 F 1.487 +(ed for are transposed characters, a missing character)-.1 F 3.988(,a) +-.4 G(nd)-3.988 E .77(one character too man)184 646.8 R 4.57 -.65(y. I) +-.15 H 3.27(fac).65 G .77 +(orrection is found, the corrected \214lename is printed, and)-3.27 F +(the command proceeds.)184 658.8 Q +(This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.) +.15 E F1(checkhash)144 670.8 Q F0 .736(If set,)184 682.8 R F1(bash)3.236 +E F0 .736(checks that a command found in the hash table e)3.236 F .737 +(xists before trying to e)-.15 F -.15(xe)-.15 G(-).15 E(cute it.)184 +694.8 Q(If a hashed command no longer e)5 E +(xists, a normal path search is performed.)-.15 E F1(checkjobs)144 706.8 +Q F0 .449(If set,)184 718.8 R F1(bash)2.949 E F0 .449 +(lists the status of an)2.949 F 2.949(ys)-.15 G .448 +(topped and running jobs before e)-2.949 F .448(xiting an interacti)-.15 +F -.15(ve)-.25 G 3.438(shell. If)184 730.8 R(an)3.438 E 3.438(yj)-.15 G +.938(obs are running, this causes the e)-3.438 F .938 +(xit to be deferred until a second e)-.15 F .939(xit is)-.15 F +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(73)190.395 E 0 Cg EP +%%Page: 74 74 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .817 +(attempted without an interv)184 84 R .817(ening command \(see)-.15 F/F1 +9/Times-Bold@0 SF .816(JOB CONTR)3.316 F(OL)-.27 E F0(abo)3.066 E -.15 +(ve)-.15 G 3.316(\). The).15 F .816(shell al-)3.316 F -.1(wa)184 96 S +(ys postpones e).1 E(xiting if an)-.15 E 2.5(yj)-.15 G(obs are stopped.) +-2.5 E/F2 10/Times-Bold@0 SF(checkwinsize)144 108 Q F0 1.09(If set,)184 +120 R F2(bash)3.59 E F0 1.09(checks the windo)3.59 F 3.59(ws)-.25 G 1.09 +(ize after each e)-3.59 F 1.09(xternal \(non-b)-.15 F 1.09 +(uiltin\) command and, if)-.2 F(necessary)184 132 Q 3.351(,u)-.65 G .851 +(pdates the v)-3.351 F .85(alues of)-.25 F F1(LINES)3.35 E F0(and)3.1 E +F1(COLUMNS)3.35 E/F3 9/Times-Roman@0 SF(.)A F0 .85 +(This option is enabled by de-)5.35 F -.1(fa)184 144 S(ult.).1 E F2 +(cmdhist)144 156 Q F0 .172(If set,)184 156 R F2(bash)2.672 E F0 .172 +(attempts to sa)2.672 F .472 -.15(ve a)-.2 H .173 +(ll lines of a multiple-line command in the same history en-).15 F(try) +184 168 Q 5.597(.T)-.65 G .597(his allo)-5.597 F .597 +(ws easy re-editing of multi-line commands.)-.25 F .597 +(This option is enabled by de-)5.597 F -.1(fa)184 180 S 1.287(ult, b).1 +F 1.288(ut only has an ef)-.2 F 1.288 +(fect if command history is enabled, as described abo)-.25 F 1.588 -.15 +(ve u)-.15 H(nder).15 E F1(HIST)184 192 Q(OR)-.162 E(Y)-.315 E F3(.)A F2 +(compat31)144 204 Q(compat32)144 216 Q(compat40)144 228 Q(compat41)144 +240 Q(compat42)144 252 Q(compat43)144 264 Q(compat44)144 276 Q F0 .889 +(These control aspects of the shell')184 288 R 3.389(sc)-.55 G .889 +(ompatibility mode \(see)-3.389 F F1 .889(SHELL COMP)3.389 F -.855(AT) +-.666 G(IBILITY).855 E(MODE)184 300 Q F0(belo)2.25 E(w\).)-.25 E F2 +(complete_fullquote)144 316.8 Q F0 .653(If set,)184 328.8 R F2(bash) +3.153 E F0 .653(quotes all shell metacharacters in \214lenames and dire\ +ctory names when per)3.153 F(-)-.2 E 1.525(forming completion.)184 340.8 +R 1.524(If not set,)6.525 F F2(bash)4.024 E F0(remo)4.024 E -.15(ve)-.15 +G 4.024(sm).15 G 1.524(etacharacters such as the dollar sign)-4.024 F +2.667(from the set of characters that will be quoted in completed \214l\ +enames when these)184 352.8 R .029(metacharacters appear in shell v)184 +364.8 R .028(ariable references in w)-.25 F .028(ords to be completed.) +-.1 F .028(This means)5.028 F 1.072(that dollar signs in v)184 376.8 R +1.073(ariable names that e)-.25 F 1.073 +(xpand to directories will not be quoted; ho)-.15 F(w-)-.25 E -2.15 -.25 +(ev e)184 388.8 T 1.923 -.4(r, a).25 H 1.423 -.15(ny d).4 H 1.123 +(ollar signs appearing in \214lenames will not be quoted, either).15 F +6.123(.T)-.55 G 1.122(his is acti)-6.123 F -.15(ve)-.25 G .59 +(only when bash is using backslashes to quote completed \214lenames.)184 +400.8 R .59(This v)5.59 F .59(ariable is set)-.25 F(by def)184 412.8 Q +(ault, which is the def)-.1 E(ault bash beha)-.1 E(vior in v)-.2 E +(ersions through 4.2.)-.15 E F2(dir)144 429.6 Q(expand)-.18 E F0 .487 +(If set,)184 441.6 R F2(bash)2.987 E F0 .486 +(replaces directory names with the results of w)2.986 F .486(ord e)-.1 F +.486(xpansion when perform-)-.15 F .179(ing \214lename completion.)184 +453.6 R .179(This changes the contents of the readline editing b)5.179 F +(uf)-.2 E(fer)-.25 E 5.18(.I)-.55 G 2.68(fn)-5.18 G(ot)-2.68 E(set,)184 +465.6 Q F2(bash)2.5 E F0(attempts to preserv)2.5 E 2.5(ew)-.15 G +(hat the user typed.)-2.5 E F2(dirspell)144 482.4 Q F0 .859(If set,)184 +482.4 R F2(bash)3.359 E F0 .858 +(attempts spelling correction on directory names during w)3.359 F .858 +(ord completion if)-.1 F +(the directory name initially supplied does not e)184 494.4 Q(xist.)-.15 +E F2(dotglob)144 511.2 Q F0 .165(If set,)184 511.2 R F2(bash)2.665 E F0 +.165(includes \214lenames be)2.665 F .165(ginning with a `.)-.15 F 2.665 +('i)-.7 G 2.665(nt)-2.665 G .165(he results of pathname e)-2.665 F +(xpansion.)-.15 E(The \214lenames)184 523.2 Q F2 -.63(``)2.5 G -.55(.') +.63 G(')-.08 E F0(and)5 E F2 -.63(``)2.5 G(..).63 E -.63('')-.55 G F0 +(must al)5.63 E -.1(wa)-.1 G(ys be matched e).1 E(xplicitly)-.15 E 2.5 +(,e)-.65 G -.15(ve)-2.75 G 2.5(ni).15 G(f)-2.5 E F2(dotglob)2.5 E F0 +(is set.)2.5 E F2(execfail)144 540 Q F0 .517(If set, a non-interacti)184 +540 R .817 -.15(ve s)-.25 H .517(hell will not e).15 F .516 +(xit if it cannot e)-.15 F -.15(xe)-.15 G .516 +(cute the \214le speci\214ed as an ar).15 F(-)-.2 E(gument to the)184 +552 Q F2(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E(An interacti)5 E +.3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15 E F2(exec)2.5 E F0 +-.1(fa)2.5 G(ils.).1 E F2(expand_aliases)144 568.8 Q F0 .716 +(If set, aliases are e)184 580.8 R .717(xpanded as described abo)-.15 F +1.017 -.15(ve u)-.15 H(nder).15 E F1(ALIASES)3.217 E F3(.)A F0 .717 +(This option is enabled)5.217 F(by def)184 592.8 Q(ault for interacti) +-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F2(extdeb)144 609.6 Q(ug)-.2 E F0 +.17(If set at shell in)184 621.6 R -.2(vo)-.4 G .17 +(cation, or in a shell startup \214le, arrange to e).2 F -.15(xe)-.15 G +.17(cute the deb).15 F .17(ugger pro\214le)-.2 F 1.081 +(before the shell starts, identical to the)184 633.6 R F2 +3.582 E(ugger)-.2 E F0 3.582(option. If)3.582 F 1.082(set after in)3.582 +F -.2(vo)-.4 G 1.082(cation, be-).2 F(ha)184 645.6 Q +(vior intended for use by deb)-.2 E(uggers is enabled:)-.2 E F2(1.)184 +662.4 Q F0(The)220 662.4 Q F24.251 E F0 1.751(option to the)4.251 +F F2(declar)4.251 E(e)-.18 E F0 -.2(bu)4.251 G 1.751 +(iltin displays the source \214le name and line).2 F +(number corresponding to each function name supplied as an ar)220 674.4 +Q(gument.)-.18 E F2(2.)184 691.2 Q F0 1.667(If the command run by the) +220 691.2 R F2(DEB)4.167 E(UG)-.1 E F0 1.667(trap returns a non-zero v) +4.167 F 1.667(alue, the ne)-.25 F(xt)-.15 E +(command is skipped and not e)220 703.2 Q -.15(xe)-.15 G(cuted.).15 E +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(74)190.395 E 0 Cg EP +%%Page: 75 75 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(3.)184 84 Q F0 .841(If the command run by the)220 84 R F1(DEB)3.341 E +(UG)-.1 E F0 .841(trap returns a v)3.341 F .84 +(alue of 2, and the shell is)-.25 F -.15(exe)220 96 S .488 +(cuting in a subroutine \(a shell function or a shell script e).15 F +-.15(xe)-.15 G .488(cuted by the).15 F F1(.)2.988 E F0(or)2.988 E F1 +(sour)220 108 Q(ce)-.18 E F0 -.2(bu)2.5 G +(iltins\), the shell simulates a call to).2 E F1 -.18(re)2.5 G(tur).18 E +(n)-.15 E F0(.)A F1(4.)184 124.8 Q/F2 9/Times-Bold@0 SF -.27(BA)220 +124.8 S(SH_ARGC).27 E F0(and)3.154 E F2 -.27(BA)3.404 G(SH_ARGV).27 E F0 +.904(are updated as described in their descriptions)3.154 F(abo)220 +136.8 Q -.15(ve)-.15 G(.).15 E F1(5.)184 153.6 Q F0 1.637(Function trac\ +ing is enabled: command substitution, shell functions, and sub-)220 +153.6 R(shells in)220 165.6 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith) +-2.5 E F1(\()2.5 E/F3 10/Times-Italic@0 SF(command)2.5 E F1(\))2.5 E F0 +(inherit the)2.5 E F1(DEB)2.5 E(UG)-.1 E F0(and)2.5 E F1(RETURN)2.5 E F0 +(traps.)2.5 E F1(6.)184 182.4 Q F0 1.082(Error tracing is enabled: comm\ +and substitution, shell functions, and subshells)220 182.4 R(in)220 +194.4 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E F3 +(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1(ERR)2.5 E F0(trap.) +2.5 E F1(extglob)144 211.2 Q F0 .4(If set, the e)184 211.2 R .4 +(xtended pattern matching features described abo)-.15 F .7 -.15(ve u) +-.15 H(nder).15 E F1 -.1(Pa)2.9 G .4(thname Expan-).1 F(sion)184 223.2 Q +F0(are enabled.)2.5 E F1(extquote)144 240 Q F0 .86(If set,)184 252 R F1 +($)3.36 E F0<08>A F3(string)A F0 3.36<0861>C(nd)-3.36 E F1($)3.36 E F0 +(")A F3(string)A F0 3.36("q)C .86(uoting is performed within)-3.36 F F1 +(${)3.36 E F3(par)A(ameter)-.15 E F1(})A F0 -.15(ex)3.36 G .86 +(pansions en-).15 F(closed in double quotes.)184 264 Q +(This option is enabled by def)5 E(ault.)-.1 E F1(failglob)144 280.8 Q +F0 .242(If set, patterns which f)184 280.8 R .243 +(ail to match \214lenames during pathname e)-.1 F .243 +(xpansion result in an e)-.15 F(x-)-.15 E(pansion error)184 292.8 Q(.) +-.55 E F1 -.25(fo)144 309.6 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F0 +.937(If set, the suf)184 321.6 R<8c78>-.25 E .936(es speci\214ed by the) +-.15 F F2(FIGNORE)3.436 E F0 .936(shell v)3.186 F .936(ariable cause w) +-.25 F .936(ords to be ignored)-.1 F .32(when performing w)184 333.6 R +.32(ord completion e)-.1 F -.15(ve)-.25 G 2.82(ni).15 G 2.82(ft)-2.82 G +.32(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 2.948 +(pletions. See)184 345.6 R F2 .448(SHELL V)2.948 F(ARIABLES)-1.215 E F0 +(abo)2.698 E .748 -.15(ve f)-.15 H .448(or a description of).15 F F2 +(FIGNORE)2.947 E/F4 9/Times-Roman@0 SF(.)A F0 .447(This option is)4.947 +F(enabled by def)184 357.6 Q(ault.)-.1 E F1(globasciiranges)144 374.4 Q +F0 2.518(If set, range e)184 386.4 R 2.519 +(xpressions used in pattern matching brack)-.15 F 2.519(et e)-.1 F 2.519 +(xpressions \(see)-.15 F F2 -.09(Pa)5.019 G(tter).09 E(n)-.135 E +(Matching)184 398.4 Q F0(abo)2.965 E -.15(ve)-.15 G 3.215(\)b).15 G(eha) +-3.215 E 1.015 -.15(ve a)-.2 H 3.214(si).15 G 3.214(fi)-3.214 G 3.214 +(nt)-3.214 G .714(he traditional C locale when performing comparisons.) +-3.214 F 1.02(That is, the current locale')184 410.4 R 3.52(sc)-.55 G +1.02(ollating sequence is not tak)-3.52 F 1.02(en into account, so)-.1 F +F1(b)3.52 E F0 1.02(will not)3.52 F .957(collate between)184 422.4 R F1 +(A)3.457 E F0(and)3.457 E F1(B)3.457 E F0 3.457(,a)C .957(nd upper) +-3.457 F .957(-case and lo)-.2 F(wer)-.25 E .956 +(-case ASCII characters will collate)-.2 F(together)184 434.4 Q(.)-.55 E +F1(globstar)144 451.2 Q F0 .518(If set, the pattern)184 451.2 R F1(**) +3.018 E F0 .519(used in a pathname e)3.019 F .519(xpansion conte)-.15 F +.519(xt will match all \214les and zero)-.15 F .432 +(or more directories and subdirectories.)184 463.2 R .431 +(If the pattern is follo)5.432 F .431(wed by a)-.25 F F1(/)2.931 E F0 +2.931(,o)C .431(nly directories)-2.931 F(and subdirectories match.)184 +475.2 Q F1(gnu_errfmt)144 492 Q F0(If set, shell error messages are wri\ +tten in the standard GNU error message format.)184 504 Q F1(histappend) +144 520.8 Q F0 .676 +(If set, the history list is appended to the \214le named by the v)184 +532.8 R .676(alue of the)-.25 F F2(HISTFILE)3.177 E F0 -.25(va)2.927 G +(ri-).25 E(able when the shell e)184 544.8 Q(xits, rather than o)-.15 E +-.15(ve)-.15 G(rwriting the \214le.).15 E F1(histr)144 561.6 Q(eedit) +-.18 E F0 .576(If set, and)184 573.6 R F1 -.18(re)3.076 G(adline).18 E +F0 .575(is being used, a user is gi)3.076 F -.15(ve)-.25 G 3.075(nt).15 +G .575(he opportunity to re-edit a f)-3.075 F .575(ailed his-)-.1 F +(tory substitution.)184 585.6 Q F1(histv)144 602.4 Q(erify)-.1 E F0 .402 +(If set, and)184 614.4 R F1 -.18(re)2.903 G(adline).18 E F0 .403 +(is being used, the results of history substitution are not immediately) +2.903 F .662(passed to the shell parser)184 626.4 R 5.662(.I)-.55 G .661 +(nstead, the resulting line is loaded into the)-5.662 F F1 -.18(re)3.161 +G(adline).18 E F0(editing)3.161 E -.2(bu)184 638.4 S -.25(ff).2 G(er).25 +E 2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1 +(hostcomplete)144 655.2 Q F0 1.181(If set, and)184 667.2 R F1 -.18(re) +3.681 G(adline).18 E F0 1.181(is being used,)3.681 F F1(bash)3.682 E F0 +1.182(will attempt to perform hostname completion)3.682 F 1.381 +(when a w)184 679.2 R 1.381(ord containing a)-.1 F F1(@)3.881 E F0 1.381 +(is being completed \(see)3.881 F F1(Completing)3.88 E F0(under)3.88 E +F2(READLINE)3.88 E F0(abo)184 691.2 Q -.15(ve)-.15 G 2.5(\). This).15 F +(is enabled by def)2.5 E(ault.)-.1 E(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(75)190.395 E 0 Cg EP +%%Page: 76 76 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(huponexit)144 84 Q F0(If set,)184 96 Q F1(bash)2.5 E F0(will send)2.5 +E/F2 9/Times-Bold@0 SF(SIGHUP)2.5 E F0(to all jobs when an interacti) +2.25 E .3 -.15(ve l)-.25 H(ogin shell e).15 E(xits.)-.15 E F1 +(inherit_err)144 112.8 Q(exit)-.18 E F0 .219 +(If set, command substitution inherits the v)184 124.8 R .219 +(alue of the)-.25 F F1(err)2.719 E(exit)-.18 E F0 .22 +(option, instead of unsetting)2.719 F(it in the subshell en)184 136.8 Q +2.5(vironment. This)-.4 F(option is enabled when)2.5 E/F3 10 +/Times-Italic@0 SF(posix mode)2.5 E F0(is enabled.)2.5 E F1(interacti) +144 153.6 Q -.1(ve)-.1 G(_comments).1 E F0 .33(If set, allo)184 165.6 R +2.83(waw)-.25 G .33(ord be)-2.93 F .33(ginning with)-.15 F F1(#)2.83 E +F0 .33(to cause that w)2.83 F .33(ord and all remaining characters on) +-.1 F .967(that line to be ignored in an interacti)184 177.6 R 1.267 +-.15(ve s)-.25 H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 +E -.15(ve)-.15 G 3.467(\). This).15 F .968(option is)3.468 F +(enabled by def)184 189.6 Q(ault.)-.1 E F1(lastpipe)144 206.4 Q F0 .066 +(If set, and job control is not acti)184 206.4 R -.15(ve)-.25 G 2.566 +(,t).15 G .066(he shell runs the last command of a pipeline not e)-2.566 +F -.15(xe)-.15 G(-).15 E +(cuted in the background in the current shell en)184 218.4 Q(vironment.) +-.4 E F1(lithist)144 235.2 Q F0 .654(If set, and the)184 235.2 R F1 +(cmdhist)3.154 E F0 .654(option is enabled, multi-line commands are sa) +3.154 F -.15(ve)-.2 G 3.155(dt).15 G 3.155(ot)-3.155 G .655(he history) +-3.155 F(with embedded ne)184 247.2 Q +(wlines rather than using semicolon separators where possible.)-.25 E F1 +(localv)144 264 Q(ar_inherit)-.1 E F0 .422(If set, local v)184 276 R +.422(ariables inherit the v)-.25 F .422(alue and attrib)-.25 F .422 +(utes of a v)-.2 F .422(ariable of the same name that)-.25 F -.15(ex)184 +288 S .173(ists at a pre).15 F .173(vious scope before an)-.25 F 2.673 +(yn)-.15 G .673 -.25(ew va)-2.673 H .173(lue is assigned.).25 F .174 +(The nameref attrib)5.174 F .174(ute is not)-.2 F(inherited.)184 300 Q +F1(localv)144 316.8 Q(ar_unset)-.1 E F0 .329(If set, calling)184 328.8 R +F1(unset)2.829 E F0 .329(on local v)2.829 F .329(ariables in pre)-.25 F +.328(vious function scopes marks them so subse-)-.25 F .543(quent looku\ +ps \214nd them unset until that function returns. This is identical to \ +the beha)184 340.8 R(v-)-.2 E(ior of unsetting local v)184 352.8 Q +(ariables at the current function scope.)-.25 E F1(login_shell)144 369.6 +Q F0 .486 +(The shell sets this option if it is started as a login shell \(see)184 +381.6 R F2(INV)2.986 E(OCA)-.405 E(TION)-.855 E F0(abo)2.736 E -.15(ve) +-.15 G 2.986(\). The).15 F -.25(va)184 393.6 S(lue may not be changed.) +.25 E F1(mailwar)144 410.4 Q(n)-.15 E F0 .814(If set, and a \214le that) +184 422.4 R F1(bash)3.314 E F0 .815 +(is checking for mail has been accessed since the last time it)3.314 F +-.1(wa)184 434.4 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E +(`The mail in)-.74 E F3(mail\214le)2.5 E F0(has been read')2.5 E 2.5('i) +-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E F1(no_empty_cmd_completion)144 +451.2 Q F0 .325(If set, and)184 463.2 R F1 -.18(re)2.825 G(adline).18 E +F0 .325(is being used,)2.825 F F1(bash)2.824 E F0 .324 +(will not attempt to search the)2.824 F F2 -.666(PA)2.824 G(TH)-.189 E +F0 .324(for possible)2.574 F +(completions when completion is attempted on an empty line.)184 475.2 Q +F1(nocaseglob)144 492 Q F0 .436(If set,)184 504 R F1(bash)2.936 E F0 +.436(matches \214lenames in a case\255insensiti)2.936 F .737 -.15(ve f) +-.25 H .437(ashion when performing pathname).05 F -.15(ex)184 516 S +(pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E +-.15(ve)-.15 G(\).).15 E F1(nocasematch)144 532.8 Q F0 1.194(If set,)184 +544.8 R F1(bash)3.694 E F0 1.194 +(matches patterns in a case\255insensiti)3.694 F 1.493 -.15(ve f)-.25 H +1.193(ashion when performing matching).05 F .551(while e)184 556.8 R +-.15(xe)-.15 G(cuting).15 E F1(case)3.051 E F0(or)3.051 E F1([[)3.051 E +F0 .551(conditional commands, when performing pattern substitution)3.051 +F -.1(wo)184 568.8 S .623(rd e).1 F .623(xpansions, or when \214ltering\ + possible completions as part of programmable com-)-.15 F(pletion.)184 +580.8 Q F1(nullglob)144 597.6 Q F0 .854(If set,)184 609.6 R F1(bash) +3.354 E F0(allo)3.354 E .855(ws patterns which match no \214les \(see) +-.25 F F1 -.1(Pa)3.355 G .855(thname Expansion).1 F F0(abo)3.355 E -.15 +(ve)-.15 G 3.355(\)t).15 G(o)-3.355 E -.15(ex)184 621.6 S +(pand to a null string, rather than themselv).15 E(es.)-.15 E F1(pr)144 +638.4 Q(ogcomp)-.18 E F0 .677(If set, the programmable completion f)184 +650.4 R .677(acilities \(see)-.1 F F1(Pr)3.176 E .676 +(ogrammable Completion)-.18 F F0(abo)3.176 E -.15(ve)-.15 G(\)).15 E +(are enabled.)184 662.4 Q(This option is enabled by def)5 E(ault.)-.1 E +F1(pr)144 679.2 Q(ogcomp_alias)-.18 E F0 2.124 +(If set, and programmable completion is enabled,)184 691.2 R F1(bash) +4.624 E F0 2.124(treats a command name that)4.624 F(doesn')184 703.2 Q +3.289(th)-.18 G -2.25 -.2(av e)-3.289 H(an)3.489 E 3.289(yc)-.15 G .789 +(ompletions as a possible alias and attempts alias e)-3.289 F .788 +(xpansion. If it has)-.15 F 1.473(an alias,)184 715.2 R F1(bash)3.973 E +F0 1.473(attempts programmable completion using the command w)3.973 F +1.473(ord resulting)-.1 F(from the e)184 727.2 Q(xpanded alias.)-.15 E +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(76)190.395 E 0 Cg EP +%%Page: 77 77 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(pr)144 84 Q(omptv)-.18 E(ars)-.1 E F0 1.448 +(If set, prompt strings under)184 96 R 1.448(go parameter e)-.18 F 1.447 +(xpansion, command substitution, arithmetic)-.15 F -.15(ex)184 108 S .17 +(pansion, and quote remo).15 F -.25(va)-.15 G 2.67(la).25 G .17 +(fter being e)-2.67 F .17(xpanded as described in)-.15 F/F2 9 +/Times-Bold@0 SF(PR)2.671 E(OMPTING)-.27 E F0(abo)2.421 E -.15(ve)-.15 G +(.).15 E(This option is enabled by def)184 120 Q(ault.)-.1 E F1 -.18(re) +144 136.8 S(stricted_shell).18 E F0 1.069 +(The shell sets this option if it is started in restricted mode \(see) +184 148.8 R F2 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 160.8 Q 2.86 +(w\). The)-.25 F -.25(va)2.86 G .36(lue may not be changed.).25 F .36 +(This is not reset when the startup \214les are e)5.36 F -.15(xe)-.15 G +(-).15 E(cuted, allo)184 172.8 Q(wing the startup \214les to disco)-.25 +E -.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 +E F1(shift_v)144 189.6 Q(erbose)-.1 E F0 .502(If set, the)184 201.6 R F1 +(shift)3.002 E F0 -.2(bu)3.002 G .501 +(iltin prints an error message when the shift count e).2 F .501 +(xceeds the number)-.15 F(of positional parameters.)184 213.6 Q F1(sour) +144 230.4 Q(cepath)-.18 E F0 .77(If set, the)184 242.4 R F1(sour)3.27 E +(ce)-.18 E F0(\()3.27 E F1(.)A F0 3.27(\)b)C .77(uiltin uses the v)-3.47 +F .771(alue of)-.25 F F2 -.666(PA)3.271 G(TH)-.189 E F0 .771 +(to \214nd the directory containing the)3.021 F +(\214le supplied as an ar)184 254.4 Q 2.5(gument. This)-.18 F +(option is enabled by def)2.5 E(ault.)-.1 E F1(xpg_echo)144 271.2 Q F0 +(If set, the)184 283.2 Q F1(echo)2.5 E F0 -.2(bu)2.5 G(iltin e).2 E +(xpands backslash-escape sequences by def)-.15 E(ault.)-.1 E F1(suspend) +108 300 Q F0([)2.5 E F1A F0(])A 1.002(Suspend the e)144 312 R -.15 +(xe)-.15 G 1.002(cution of this shell until it recei).15 F -.15(ve)-.25 +G 3.501(sa).15 G F2(SIGCONT)A F0 3.501(signal. A)3.251 F 1.001 +(login shell cannot be)3.501 F .022(suspended; the)144 324 R F1 +2.522 E F0 .022(option can be used to o)2.522 F -.15(ve)-.15 G .022 +(rride this and force the suspension.).15 F .023(The return status is) +5.023 F 2.5(0u)144 336 S(nless the shell is a login shell and)-2.5 E F1 +2.5 E F0(is not supplied, or if job control is not enabled.)2.5 E +F1(test)108 352.8 Q/F3 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E F1([) +108 364.8 Q F3 -.2(ex)2.5 G(pr).2 E F1(])2.5 E F0 .878 +(Return a status of 0 \(true\) or 1 \(f)144 364.8 R .877 +(alse\) depending on the e)-.1 F -.25(va)-.25 G .877 +(luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex)144 376.8 +S(pr).2 E F0 5.53(.E).73 G .53 +(ach operator and operand must be a separate ar)-5.53 F 3.03 +(gument. Expressions)-.18 F .53(are composed of the)3.03 F 1.361 +(primaries described abo)144 388.8 R 1.661 -.15(ve u)-.15 H(nder).15 E +F2(CONDITION)3.861 E 1.36(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(.) +A F1(test)5.86 E F0 1.36(does not accept an)3.86 F 3.86(yo)-.15 G(p-) +-3.86 E(tions, nor does it accept and ignore an ar)144 400.8 Q +(gument of)-.18 E F12.5 E F0(as signifying the end of options.)2.5 +E .785(Expressions may be combined using the follo)144 418.8 R .786 +(wing operators, listed in decreasing order of prece-)-.25 F 3.412 +(dence. The)144 430.8 R -.25(eva)3.412 G .912 +(luation depends on the number of ar).25 F .911(guments; see belo)-.18 F +4.711 -.65(w. O)-.25 H .911(perator precedence is).65 F +(used when there are \214v)144 442.8 Q 2.5(eo)-.15 G 2.5(rm)-2.5 G +(ore ar)-2.5 E(guments.)-.18 E F1(!)144 454.8 Q F3 -.2(ex)2.5 G(pr).2 E +F0 -.35(Tr)180 454.8 S(ue if).35 E F3 -.2(ex)2.5 G(pr).2 E F0(is f)3.23 +E(alse.)-.1 E F1(\()144 466.8 Q F3 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0 +.26(Returns the v)180 466.8 R .26(alue of)-.25 F F3 -.2(ex)2.76 G(pr).2 +E F0 5.26(.T)C .26(his may be used to o)-5.26 F -.15(ve)-.15 G .26 +(rride the normal precedence of opera-).15 F(tors.)180 478.8 Q F3 -.2 +(ex)144 490.8 S(pr1).2 E F02.5 E F1(a)A F3 -.2(ex)2.5 G(pr2).2 E F0 +-.35(Tr)180 502.8 S(ue if both).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(and)2.5 +E F3 -.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E F3 -.2(ex)144 514.8 S +(pr1).2 E F02.5 E F1(o)A F3 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180 +526.8 S(ue if either).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F3 -.2 +(ex)2.5 G(pr2).2 E F0(is true.)2.52 E F1(test)144 543.6 Q F0(and)2.5 E +F1([)2.5 E F0 -.25(eva)2.5 G(luate conditional e).25 E +(xpressions using a set of rules based on the number of ar)-.15 E +(guments.)-.18 E 2.5(0a)144 561.6 S -.18(rg)-2.5 G(uments).18 E(The e) +180 573.6 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 585.6 S -.18 +(rg)-2.5 G(ument).18 E(The e)180 597.6 Q +(xpression is true if and only if the ar)-.15 E(gument is not null.)-.18 +E 2.5(2a)144 609.6 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar) +180 621.6 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87 +F .37(xpression is true if and only if the second ar)-.15 F .37 +(gument is null.)-.18 F .379(If the \214rst ar)180 633.6 R .38 +(gument is one of the unary conditional operators listed abo)-.18 F .68 +-.15(ve u)-.15 H(nder).15 E F2(CONDI-)2.88 E(TION)180 645.6 Q .553 +(AL EXPRESSIONS)-.18 F F4(,)A F0 .552(the e)2.802 F .552 +(xpression is true if the unary test is true.)-.15 F .552 +(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 657.6 Q +(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E +(xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 669.6 S -.18(rg)-2.5 G +(uments).18 E .236(The follo)180 681.6 R .236 +(wing conditions are applied in the order listed.)-.25 F .236 +(If the second ar)5.236 F .236(gument is one of)-.18 F .855 +(the binary conditional operators listed abo)180 693.6 R 1.155 -.15 +(ve u)-.15 H(nder).15 E F2(CONDITION)3.355 E .855(AL EXPRESSIONS)-.18 F +F4(,)A F0(the)3.104 E .578(result of the e)180 705.6 R .578(xpression i\ +s the result of the binary test using the \214rst and third ar)-.15 F +(guments)-.18 E 1.333(as operands.)180 717.6 R(The)6.333 E F13.833 +E F0(and)3.833 E F13.832 E F0 1.332 +(operators are considered binary operators when there are)3.832 F .558 +(three ar)180 729.6 R 3.058(guments. If)-.18 F .558(the \214rst ar)3.058 +F .558(gument is)-.18 F F1(!)3.058 E F0 3.058(,t)C .558(he v)-3.058 F +.558(alue is the ne)-.25 F -.05(ga)-.15 G .558(tion of the tw).05 F +(o-ar)-.1 E(gument)-.18 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 +E(77)190.395 E 0 Cg EP +%%Page: 78 78 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E .521 +(test using the second and third ar)180 84 R 3.021(guments. If)-.18 F +.521(the \214rst ar)3.021 F .52(gument is e)-.18 F(xactly)-.15 E/F1 10 +/Times-Bold@0 SF(\()3.02 E F0 .52(and the third)3.02 F(ar)180 96 Q .485 +(gument is e)-.18 F(xactly)-.15 E F1(\))2.985 E F0 2.985(,t)C .485 +(he result is the one-ar)-2.985 F .485(gument test of the second ar)-.18 +F 2.985(gument. Other)-.18 F(-)-.2 E(wise, the e)180 108 Q +(xpression is f)-.15 E(alse.)-.1 E 2.5(4a)144 120 S -.18(rg)-2.5 G +(uments).18 E .385(If the \214rst ar)180 132 R .385(gument is)-.18 F F1 +(!)2.885 E F0 2.885(,t)C .385(he result is the ne)-2.885 F -.05(ga)-.15 +G .384(tion of the three-ar).05 F .384(gument e)-.18 F .384 +(xpression com-)-.15 F .284(posed of the remaining ar)180 144 R 2.784 +(guments. Otherwise,)-.18 F .284(the e)2.784 F .284 +(xpression is parsed and e)-.15 F -.25(va)-.25 G .285(luated ac-).25 F +(cording to precedence using the rules listed abo)180 156 Q -.15(ve)-.15 +G(.).15 E 2.5(5o)144 168 S 2.5(rm)-2.5 G(ore ar)-2.5 E(guments)-.18 E +1.635(The e)180 180 R 1.635(xpression is parsed and e)-.15 F -.25(va) +-.25 G 1.635(luated according to precedence using the rules listed).25 F +(abo)180 192 Q -.15(ve)-.15 G(.).15 E(When used with)144 210 Q F1(test) +2.5 E F0(or)2.5 E F1([)2.5 E F0 2.5(,t)C(he)-2.5 E F1(<)2.5 E F0(and)2.5 +E F1(>)2.5 E F0(operators sort le)2.5 E +(xicographically using ASCII ordering.)-.15 E F1(times)108 226.8 Q F0 +1.229(Print the accumulated user and system times for the shell and for\ + processes run from the shell.)144 226.8 R(The return status is 0.)144 +238.8 Q F1(trap)108 255.6 Q F0([)2.5 E F1(\255lp)A F0 2.5(][)C([)-2.5 E +/F2 10/Times-Italic@0 SF(ar)A(g)-.37 E F0(])A F2(sigspec)2.5 E F0(...]) +2.5 E .683(The command)144 267.6 R F2(ar)3.513 E(g)-.37 E F0 .683 +(is to be read and e)3.403 F -.15(xe)-.15 G .682 +(cuted when the shell recei).15 F -.15(ve)-.25 G 3.182(ss).15 G +(ignal\(s\))-3.182 E F2(sigspec)3.522 E F0 5.682(.I).31 G(f)-5.682 E F2 +(ar)3.512 E(g)-.37 E F0(is)3.402 E .608(absent \(and there is a single) +144 279.6 R F2(sigspec)3.108 E F0 3.108(\)o)C(r)-3.108 E F13.108 E +F0 3.108(,e)C .608 +(ach speci\214ed signal is reset to its original disposition)-3.108 F +.659(\(the v)144 291.6 R .659(alue it had upon entrance to the shell\).) +-.25 F(If)5.658 E F2(ar)3.488 E(g)-.37 E F0 .658 +(is the null string the signal speci\214ed by each)3.378 F F2(sigspec) +144.34 303.6 Q F0 .58(is ignored by the shell and by the commands it in) +3.39 F -.2(vo)-.4 G -.1(ke).2 G 3.081(s. If).1 F F2(ar)3.411 E(g)-.37 E +F0 .581(is not present and)3.301 F F13.081 E F0(has)3.081 E 1.215 +(been supplied, then the trap commands associated with each)144 315.6 R +F2(sigspec)4.054 E F0 1.214(are displayed.)4.024 F 1.214(If no ar)6.214 +F(gu-)-.18 E .86(ments are supplied or if only)144 327.6 R F13.36 +E F0 .86(is gi)3.36 F -.15(ve)-.25 G(n,).15 E F1(trap)3.36 E F0 .86 +(prints the list of commands associated with each)3.36 F 2.83 +(signal. The)144 339.6 R F12.83 E F0 .33(option causes the shell \ +to print a list of signal names and their corresponding num-)2.83 F 4.31 +(bers. Each)144 351.6 R F2(sigspec)4.65 E F0 1.811 +(is either a signal name de\214ned in <)4.62 F F2(signal.h)A F0 1.811 +(>, or a signal number)B 6.811(.S)-.55 G(ignal)-6.811 E +(names are case insensiti)144 363.6 Q .3 -.15(ve a)-.25 H(nd the).15 E +/F3 9/Times-Bold@0 SF(SIG)2.5 E F0(pre\214x is optional.)2.25 E .667 +(If a)144 381.6 R F2(sigspec)3.507 E F0(is)3.477 E F3(EXIT)3.167 E F0 +.667(\(0\) the command)2.917 F F2(ar)3.496 E(g)-.37 E F0 .666(is e)3.386 +F -.15(xe)-.15 G .666(cuted on e).15 F .666(xit from the shell.)-.15 F +.666(If a)5.666 F F2(sigspec)3.506 E F0(is)3.476 E F3(DE-)3.166 E -.09 +(BU)144 393.6 S(G).09 E/F4 9/Times-Roman@0 SF(,)A F0 .483(the command) +2.733 F F2(ar)3.313 E(g)-.37 E F0 .483(is e)3.203 F -.15(xe)-.15 G .484 +(cuted before e).15 F -.15(ve)-.25 G(ry).15 E F2 .484(simple command) +2.984 F F0(,)A F2(for)2.984 E F0(command,)2.984 E F2(case)2.984 E F0 +(command,)2.984 E F2(select)144 405.6 Q F0 .563(command, e)3.063 F -.15 +(ve)-.25 G .563(ry arithmetic).15 F F2(for)3.063 E F0 .563 +(command, and before the \214rst command e)3.063 F -.15(xe)-.15 G .562 +(cutes in a shell).15 F .622(function \(see)144 417.6 R F3 .622 +(SHELL GRAMMAR)3.122 F F0(abo)2.872 E -.15(ve)-.15 G 3.122(\). Refer).15 +F .622(to the description of the)3.122 F F1(extdeb)3.122 E(ug)-.2 E F0 +.622(option to the)3.122 F F1(shopt)144 429.6 Q F0 -.2(bu)2.996 G .496 +(iltin for details of its ef).2 F .496(fect on the)-.25 F F1(DEB)2.996 E +(UG)-.1 E F0 2.996(trap. If)2.996 F(a)2.996 E F2(sigspec)3.336 E F0(is) +3.306 E F3(RETURN)2.996 E F4(,)A F0 .496(the command)2.746 F F2(ar) +144.33 441.6 Q(g)-.37 E F0 .18(is e)2.9 F -.15(xe)-.15 G .18 +(cuted each time a shell function or a script e).15 F -.15(xe)-.15 G .18 +(cuted with the).15 F F1(.)2.68 E F0(or)2.68 E F1(sour)2.68 E(ce)-.18 E +F0 -.2(bu)2.68 G .18(iltins \214nishes).2 F -.15(exe)144 453.6 S +(cuting.).15 E .961(If a)144 471.6 R F2(sigspec)3.801 E F0(is)3.771 E F3 +(ERR)3.461 E F4(,)A F0 .961(the command)3.211 F F2(ar)3.791 E(g)-.37 E +F0 .961(is e)3.681 F -.15(xe)-.15 G .961(cuted whene).15 F -.15(ve)-.25 +G 3.461(ra).15 G .96(pipeline \(which may consist of a)-.001 F .185(sin\ +gle simple command\), a list, or a compound command returns a non\255ze\ +ro e)144 483.6 R .185(xit status, subject to)-.15 F .452(the follo)144 +495.6 R .452(wing conditions.)-.25 F(The)5.452 E F3(ERR)2.952 E F0 .451 +(trap is not e)2.701 F -.15(xe)-.15 G .451(cuted if the f).15 F .451 +(ailed command is part of the com-)-.1 F .387 +(mand list immediately follo)144 507.6 R .387(wing a)-.25 F F1(while) +2.887 E F0(or)2.887 E F1(until)2.888 E F0 -.1(ke)2.888 G(yw)-.05 E .388 +(ord, part of the test in an)-.1 F F2(if)2.898 E F0 .388 +(statement, part)4.848 F .778(of a command e)144 519.6 R -.15(xe)-.15 G +.778(cuted in a).15 F F1(&&)3.278 E F0(or)3.278 E F1(||)3.278 E F0 .778 +(list e)3.278 F .778(xcept the command follo)-.15 F .778 +(wing the \214nal)-.25 F F1(&&)3.278 E F0(or)3.278 E F1(||)3.277 E F0 +3.277(,a)C -.15(ny)-3.277 G 1.28(command in a pipeline b)144 531.6 R +1.28(ut the last, or if the command')-.2 F 3.78(sr)-.55 G 1.28(eturn v) +-3.78 F 1.28(alue is being in)-.25 F -.15(ve)-.4 G 1.28(rted using).15 F +F1(!)3.78 E F0(.)A(These are the same conditions obe)144 543.6 Q +(yed by the)-.15 E F1(err)2.5 E(exit)-.18 E F0(\()2.5 E F1A F0 2.5 +(\)o)C(ption.)-2.5 E .133 +(Signals ignored upon entry to the shell cannot be trapped or reset.)144 +561.6 R -.35(Tr)5.132 G .132(apped signals that are not be-).35 F .117 +(ing ignored are reset to their original v)144 573.6 R .117 +(alues in a subshell or subshell en)-.25 F .117 +(vironment when one is cre-)-.4 F 2.5(ated. The)144 585.6 R +(return status is f)2.5 E(alse if an)-.1 E(y)-.15 E F2(sigspec)2.84 E F0 +(is in)2.81 E -.25(va)-.4 G(lid; otherwise).25 E F1(trap)2.5 E F0 +(returns true.)2.5 E F1(type)108 602.4 Q F0([)2.5 E F1(\255aftpP)A F0(]) +A F2(name)2.5 E F0([)2.5 E F2(name)A F0(...])2.5 E -.4(Wi)144 614.4 S +.174(th no options, indicate ho).4 F 2.674(we)-.25 G(ach)-2.674 E F2 +(name)3.034 E F0 -.1(wo)2.854 G .173 +(uld be interpreted if used as a command name.).1 F .173(If the)5.173 F +F1144 626.4 Q F0 .715(option is used,)3.215 F F1(type)3.215 E F0 +.715(prints a string which is one of)3.215 F F2(alias)3.545 E F0(,).27 E +F2 -.1(ke)3.215 G(ywor)-.2 E(d)-.37 E F0(,).77 E F2(function)5.185 E F0 +(,).24 E F2 -.2(bu)3.215 G(iltin).2 E F0 3.215(,o).24 G(r)-3.215 E F2 +(\214le)5.125 E F0(if)3.395 E F2(name)144.36 638.4 Q F0 .087 +(is an alias, shell reserv)2.767 F .087(ed w)-.15 F .087 +(ord, function, b)-.1 F .086(uiltin, or disk \214le, respecti)-.2 F -.15 +(ve)-.25 G(ly).15 E 5.086(.I)-.65 G 2.586(ft)-5.086 G(he)-2.586 E F2 +(name)2.946 E F0 .086(is not)2.766 F .118 +(found, then nothing is printed, and an e)144 650.4 R .118 +(xit status of f)-.15 F .118(alse is returned.)-.1 F .119(If the)5.119 F +F12.619 E F0 .119(option is used,)2.619 F F1(type)2.619 E F0 .855 +(either returns the name of the disk \214le that w)144 662.4 R .855 +(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F2(name)3.715 E F0 +.855(were speci\214ed as a com-)3.535 F .528(mand name, or nothing if) +144 674.4 R/F5 10/Courier@0 SF .528(type -t name)3.028 F F0 -.1(wo)3.028 +G .528(uld not return).1 F F2(\214le)4.938 E F0 5.528(.T).18 G(he)-5.528 +E F13.028 E F0 .529(option forces a)3.028 F F3 -.666(PA)3.029 G +(TH)-.189 E F0 .007(search for each)144 686.4 R F2(name)2.507 E F0 2.507 +(,e)C -.15(ve)-2.757 G 2.507(ni).15 G(f)-2.507 E F5 .007(type -t name) +2.507 F F0 -.1(wo)2.507 G .007(uld not return).1 F F2(\214le)4.417 E F0 +5.006(.I).18 G 2.506(fac)-5.006 G .006(ommand is hashed,)-2.506 F F1 +2.506 E F0(and)144 698.4 Q F13.23 E F0 .73 +(print the hashed v)3.23 F .731 +(alue, which is not necessarily the \214le that appears \214rst in)-.25 +F F3 -.666(PA)3.231 G(TH)-.189 E F4(.)A F0 .731(If the)5.231 F F1 +144 710.4 Q F0 .824(option is used,)3.324 F F1(type)3.324 E F0 .824 +(prints all of the places that contain an e)3.324 F -.15(xe)-.15 G .823 +(cutable named).15 F F2(name)3.683 E F0 5.823(.T).18 G .823(his in-) +-5.823 F 1.176(cludes aliases and functions, if and only if the)144 +722.4 R F13.676 E F0 1.176(option is not also used.)3.676 F 1.177 +(The table of hashed)6.176 F(GNU Bash 5.1)72 768 Q(2020 October 29) +141.235 E(78)190.395 E 0 Cg EP +%%Page: 79 79 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E 1.223 +(commands is not consulted when using)144 84 R/F1 10/Times-Bold@0 SF +3.723 E F0 6.223(.T)C(he)-6.223 E F13.723 E F0 1.223 +(option suppresses shell function lookup, as)3.723 F .325(with the)144 +96 R F1(command)2.825 E F0 -.2(bu)2.825 G(iltin.).2 E F1(type)5.325 E F0 +.325(returns true if all of the ar)2.825 F .326(guments are found, f) +-.18 F .326(alse if an)-.1 F 2.826(ya)-.15 G .326(re not)-2.826 F +(found.)144 108 Q F1(ulimit)108 124.8 Q F0([)2.5 E F1(\255HS)A F0(])A F1 +2.5 E(ulimit)108 136.8 Q F0([)2.5 E F1(\255HS)A F0 2.5(][)C F1 +(\255bcde\214klmnpqrstuvxPR)-2.5 E(T)-.4 E F0([)2.5 E/F2 10 +/Times-Italic@0 SF(limit)A F0(]])A(Pro)144 148.8 Q .244(vides control o) +-.15 F -.15(ve)-.15 G 2.744(rt).15 G .244(he resources a)-2.744 F -.25 +(va)-.2 G .244 +(ilable to the shell and to processes started by it, on systems).25 F +.943(that allo)144 160.8 R 3.443(ws)-.25 G .943(uch control.)-3.443 F +(The)5.943 E F13.443 E F0(and)3.443 E F13.444 E F0 .944 +(options specify that the hard or soft limit is set for the)3.444 F(gi) +144 172.8 Q -.15(ve)-.25 G 2.709(nr).15 G 2.709(esource. A)-2.709 F .208 +(hard limit cannot be increased by a non-root user once it is set; a so\ +ft limit may)2.709 F .425(be increased up to the v)144 184.8 R .425 +(alue of the hard limit.)-.25 F .426(If neither)5.425 F F12.926 E +F0(nor)2.926 E F12.926 E F0 .426 +(is speci\214ed, both the soft and)2.926 F .139(hard limits are set.)144 +196.8 R .139(The v)5.139 F .139(alue of)-.25 F F2(limit)2.729 E F0 .139 +(can be a number in the unit speci\214ed for the resource or one)3.319 F +.741(of the special v)144 208.8 R(alues)-.25 E F1(hard)3.241 E F0(,)A F1 +(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F1(unlimited)3.241 E F0 3.241(,w) +C .741(hich stand for the current hard limit, the current)-3.241 F .024 +(soft limit, and no limit, respecti)144 220.8 R -.15(ve)-.25 G(ly).15 E +5.023(.I)-.65 G(f)-5.023 E F2(limit)2.613 E F0 .023 +(is omitted, the current v)3.203 F .023 +(alue of the soft limit of the re-)-.25 F .984 +(source is printed, unless the)144 232.8 R F13.484 E F0 .984 +(option is gi)3.484 F -.15(ve)-.25 G 3.484(n. When).15 F .985 +(more than one resource is speci\214ed, the)3.484 F .7 +(limit name and unit, if appropriate, are printed before the v)144 244.8 +R 3.2(alue. Other)-.25 F .7(options are interpreted as)3.2 F(follo)144 +256.8 Q(ws:)-.25 E F1144 268.8 Q F0 +(All current limits are reported; no limits are set)180 268.8 Q F1 +144 280.8 Q F0(The maximum sock)180 280.8 Q(et b)-.1 E(uf)-.2 E +(fer size)-.25 E F1144 292.8 Q F0 +(The maximum size of core \214les created)180 292.8 Q F1144 304.8 +Q F0(The maximum size of a process')180 304.8 Q 2.5(sd)-.55 G(ata se) +-2.5 E(gment)-.15 E F1144 316.8 Q F0 +(The maximum scheduling priority \("nice"\))180 316.8 Q F1144 +328.8 Q F0 +(The maximum size of \214les written by the shell and its children)180 +328.8 Q F1144 340.8 Q F0(The maximum number of pending signals)180 +340.8 Q F1144 352.8 Q F0 +(The maximum number of kqueues that may be allocated)180 352.8 Q F1 +144 364.8 Q F0(The maximum size that may be lock)180 364.8 Q +(ed into memory)-.1 E F1144 376.8 Q F0 +(The maximum resident set size \(man)180 376.8 Q 2.5(ys)-.15 G +(ystems do not honor this limit\))-2.5 E F1144 388.8 Q F0 .791(Th\ +e maximum number of open \214le descriptors \(most systems do not allo) +180 388.8 R 3.291(wt)-.25 G .791(his v)-3.291 F .791(alue to)-.25 F +(be set\))180 400.8 Q F1144 412.8 Q F0 +(The pipe size in 512-byte blocks \(this may not be set\))180 412.8 Q F1 +144 424.8 Q F0 +(The maximum number of bytes in POSIX message queues)180 424.8 Q F1 +144 436.8 Q F0(The maximum real-time scheduling priority)180 436.8 +Q F1144 448.8 Q F0(The maximum stack size)180 448.8 Q F1144 +460.8 Q F0(The maximum amount of cpu time in seconds)180 460.8 Q F1 +144 472.8 Q F0(The maximum number of processes a)180 472.8 Q -.25 +(va)-.2 G(ilable to a single user).25 E F1144 484.8 Q F0 .47 +(The maximum amount of virtual memory a)180 484.8 R -.25(va)-.2 G .47 +(ilable to the shell and, on some systems, to).25 F(its children)180 +496.8 Q F1144 508.8 Q F0(The maximum number of \214le locks)180 +508.8 Q F1144 520.8 Q F0(The maximum number of pseudoterminals)180 +520.8 Q F1144 532.8 Q F0(The maximum time a real-time process can\ + run before blocking, in microseconds)180 532.8 Q F1144 544.8 Q F0 +(The maximum number of threads)180 544.8 Q(If)144 561.6 Q F2(limit)3.058 +E F0 .468(is gi)3.648 F -.15(ve)-.25 G .468(n, and the).15 F F1 +2.968 E F0 .468(option is not used,)2.968 F F2(limit)2.968 E F0 .468 +(is the ne)2.968 F 2.968(wv)-.25 G .468 +(alue of the speci\214ed resource.)-3.218 F(If)5.468 E .045 +(no option is gi)144 573.6 R -.15(ve)-.25 G .045(n, then).15 F F1 +2.545 E F0 .045(is assumed.)2.545 F -1.11(Va)5.045 G .045 +(lues are in 1024-byte increments, e)1.11 F .044(xcept for)-.15 F F1 +2.544 E F0 2.544(,w)C .044(hich is)-2.544 F .67(in seconds;)144 +585.6 R F13.17 E F0 3.17(,w)C .67(hich is in microseconds;)-3.17 F +F13.17 E F0 3.17(,w)C .67(hich is in units of 512-byte blocks;) +-3.17 F F13.17 E F0(,)A F13.17 E F0(,)A F13.17 E F0(,) +A F1144 597.6 Q F0(,)A F13.737 E F0 3.737(,a)C(nd)-3.737 E +F13.736 E F0 3.736(,w)C 1.236(hich are unscaled v)-3.736 F 1.236 +(alues; and, when in posix mode,)-.25 F F13.736 E F0(and)3.736 E +F13.736 E F0 3.736(,w)C 1.236(hich are in)-3.736 F .238 +(512-byte increments.)144 609.6 R .238 +(The return status is 0 unless an in)5.238 F -.25(va)-.4 G .238 +(lid option or ar).25 F .238(gument is supplied, or an)-.18 F +(error occurs while setting a ne)144 621.6 Q 2.5(wl)-.25 G(imit.)-2.5 E +F1(umask)108 638.4 Q F0([)2.5 E F1A F0 2.5(][)C F1-2.5 E F0 +2.5(][)C F2(mode)-2.5 E F0(])A .18 +(The user \214le-creation mask is set to)144 650.4 R F2(mode)3.06 E F0 +5.18(.I).18 G(f)-5.18 E F2(mode)3.06 E F0(be)2.86 E .18 +(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\ +therwise it is interpreted as a symbolic mode mask similar to that acce\ +pted by)144 662.4 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144 +674.4 Q F2(mode)3.263 E F0 .382(is omitted, the current v)3.063 F .382 +(alue of the mask is printed.)-.25 F(The)5.382 E F12.882 E F0 .382 +(option causes the mask to be)2.882 F .547 +(printed in symbolic form; the def)144 686.4 R .547 +(ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G +(he)-3.047 E F13.047 E F0 .547(option is supplied, and)3.047 F F2 +(mode)144.38 698.4 Q F0 .552 +(is omitted, the output is in a form that may be reused as input.)3.232 +F .551(The return status is 0 if the)5.551 F(mode w)144 710.4 Q +(as successfully changed or if no)-.1 E F2(mode)2.5 E F0(ar)2.5 E +(gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E +(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 E(79)190.395 E 0 Cg EP +%%Page: 80 80 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(unalias)108 84 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C/F2 10 +/Times-Italic@0 SF(name)-2.5 E F0(...])2.5 E(Remo)144 96 Q 1.057 -.15 +(ve e)-.15 H(ach).15 E F2(name)3.257 E F0 .757 +(from the list of de\214ned aliases.)3.257 F(If)5.758 E F13.258 E +F0 .758(is supplied, all alias de\214nitions are re-)3.258 F(mo)144 108 +Q -.15(ve)-.15 G 2.5(d. The).15 F(return v)2.5 E +(alue is true unless a supplied)-.25 E F2(name)2.86 E F0 +(is not a de\214ned alias.)2.68 E F1(unset)108 124.8 Q F0<5bad>2.5 E F1 +(fv)A F0 2.5(][)C-2.5 E F1(n)A F0 2.5(][)C F2(name)-2.5 E F0(...]) +2.5 E -.15(Fo)144 136.8 S 3.804(re).15 G(ach)-3.804 E F2(name)4.164 E F0 +3.804(,r).18 G(emo)-3.804 E 1.604 -.15(ve t)-.15 H 1.304 +(he corresponding v).15 F 1.303(ariable or function.)-.25 F 1.303 +(If the)6.303 F F13.803 E F0 1.303(option is gi)3.803 F -.15(ve) +-.25 G 1.303(n, each).15 F F2(name)144.36 148.8 Q F0 .464 +(refers to a shell v)3.144 F .464(ariable, and that v)-.25 F .464 +(ariable is remo)-.25 F -.15(ve)-.15 G 2.965(d. Read-only).15 F -.25(va) +2.965 G .465(riables may not be un-).25 F 2.769(set. If)144 160.8 R F1 +2.769 E F0 .269(is speci\214ed, each)2.769 F F2(name)3.129 E F0 +.269(refers to a shell function, and the function de\214nition is remo) +2.949 F -.15(ve)-.15 G(d.).15 E .403(If the)144 172.8 R F12.903 E +F0 .404(option is supplied, and)2.904 F F2(name)2.904 E F0 .404(is a v) +2.904 F .404(ariable with the)-.25 F F2(namer)2.904 E(ef)-.37 E F0 +(attrib)2.904 E(ute,)-.2 E F2(name)2.904 E F0 .404(will be unset)2.904 F +.72(rather than the v)144 184.8 R .72(ariable it references.)-.25 F F1 +5.72 E F0 .72(has no ef)3.22 F .719(fect if the)-.25 F F1 +3.219 E F0 .719(option is supplied.)3.219 F .719(If no options)5.719 F +.736(are supplied, each)144 196.8 R F2(name)3.236 E F0 .736 +(refers to a v)3.236 F .737(ariable; if there is no v)-.25 F .737 +(ariable by that name, a function with)-.25 F 1.762(that name, if an)144 +208.8 R 3.062 -.65(y, i)-.15 H 4.262(su).65 G 4.261(nset. Each)-4.262 F +1.761(unset v)4.261 F 1.761(ariable or function is remo)-.25 F -.15(ve) +-.15 G 4.261(df).15 G 1.761(rom the en)-4.261 F(vironment)-.4 E 3.171 +(passed to subsequent commands.)144 220.8 R 3.172(If an)8.172 F 5.672 +(yo)-.15 G(f)-5.672 E/F3 9/Times-Bold@0 SF -.27(BA)5.672 G(SH_ALIASES) +.27 E/F4 9/Times-Roman@0 SF(,)A F3 -.27(BA)5.422 G(SH_ARGV0).27 E F4(,)A +F3 -.27(BA)5.422 G(SH_CMDS).27 E F4(,)A F3 -.27(BA)144 232.8 S +(SH_COMMAND).27 E F4(,)A F3 -.27(BA)11.482 G(SH_SUBSHELL).27 E F4(,)A F3 +-.27(BA)11.482 G(SHPID).27 E F4(,)A F3(COMP_W)11.482 E(ORDBREAKS)-.09 E +F4(,)A F3(DIRST)11.481 E -.495(AC)-.81 G(K).495 E F4(,)A F3(EPOCHREAL) +144 244.8 Q(TIME)-.828 E F4(,)A F3(EPOCHSECONDS)2.67 E F4(,)A F3(FUNCN) +2.67 E(AME)-.18 E F4(,)A F3(GR)2.67 E(OUPS)-.27 E F4(,)A F3(HISTCMD)2.67 +E F4(,)A F3(LINENO)2.67 E F4(,)A F3(RANDOM)2.67 E F4(,)A F3(SECONDS)144 +256.8 Q F4(,)A F0(or)4.03 E F3(SRANDOM)4.28 E F0 1.779(are unset, the) +4.03 F 4.279(yl)-.15 G 1.779(ose their special properties, e)-4.279 F +-.15(ve)-.25 G 4.279(ni).15 G 4.279(ft)-4.279 G(he)-4.279 E 4.279(ya) +-.15 G 1.779(re subse-)-4.279 F(quently reset.)144 268.8 Q(The e)5 E +(xit status is true unless a)-.15 E F2(name)2.86 E F0(is readonly)2.68 E +(.)-.65 E F1(wait)108 285.6 Q F0([)2.5 E F1(\255fn)A F0 2.5(][)C F1 +-2.5 E F2(varname)2.5 E F0 2.5(][)C F2(id ...)-2.5 E F0(])A -.8 +(Wa)144 297.6 S .659(it for each speci\214ed child process and return i\ +ts termination status.).8 F(Each)5.659 E F2(id)3.169 E F0 .659 +(may be a process)3.929 F .009 +(ID or a job speci\214cation; if a job spec is gi)144 309.6 R -.15(ve) +-.25 G .008(n, all processes in that job').15 F 2.508(sp)-.55 G .008 +(ipeline are w)-2.508 F .008(aited for)-.1 F 5.008(.I)-.55 G(f)-5.008 E +F2(id)144.01 321.6 Q F0 .441(is not gi)3.711 F -.15(ve)-.25 G(n,).15 E +F1(wait)2.941 E F0 -.1(wa)2.941 G .441 +(its for all running background jobs and the last-e).1 F -.15(xe)-.15 G +.442(cuted process substitu-).15 F .598 +(tion, if its process id is the same as)144 333.6 R F1($!)3.098 E F0 +3.098(,a)C .598(nd the return status is zero.)-3.098 F .597(If the)5.597 +F F13.097 E F0 .597(option is supplied,)3.097 F F1(wait)144 345.6 +Q F0 -.1(wa)3.082 G .583(its for a single job from the list of).1 F F2 +(id)3.083 E F0 3.083(so)C 1.383 -.4(r, i)-3.083 H 3.083(fn).4 G(o)-3.083 +E F2(id)3.083 E F0 3.083(sa)C .583(re supplied, an)-3.083 F 3.083(yj) +-.15 G .583(ob, to complete and)-3.083 F .404(returns its e)144 357.6 R +.404(xit status.)-.15 F .403(If none of the supplied ar)5.403 F .403 +(guments is a child of the shell, or if no ar)-.18 F(guments)-.18 E .572 +(are supplied and the shell has no unw)144 369.6 R .573 +(aited-for children, the e)-.1 F .573(xit status is 127.)-.15 F .573 +(If the)5.573 F F13.073 E F0 .573(option is)3.073 F .39 +(supplied, the process or job identi\214er of the job for which the e) +144 381.6 R .39(xit status is returned is assigned to)-.15 F .905(the v) +144 393.6 R(ariable)-.25 E F2(varname)3.405 E F0 .905 +(named by the option ar)3.405 F 3.405(gument. The)-.18 F -.25(va)3.405 G +.905(riable will be unset initially).25 F 3.405(,b)-.65 G(efore)-3.405 E +(an)144 405.6 Q 3.89(ya)-.15 G 3.89(ssignment. This)-3.89 F 1.39 +(is useful only when the)3.89 F F13.89 E F0 1.39 +(option is supplied.)3.89 F 1.39(Supplying the)6.39 F F13.89 E F0 +(option,)3.89 E .574(when job control is enabled, forces)144 417.6 R F1 +(wait)3.075 E F0 .575(to w)3.075 F .575(ait for)-.1 F F2(id)3.075 E F0 +.575(to terminate before returning its status, in-)3.075 F .635 +(stead of returning when it changes status.)144 429.6 R(If)5.635 E F2 +(id)3.145 E F0 .635(speci\214es a non-e)3.905 F .635 +(xistent process or job, the return)-.15 F(status is 127.)144 441.6 Q +(Otherwise, the return status is the e)5 E +(xit status of the last process or job w)-.15 E(aited for)-.1 E(.)-.55 E +/F5 10.95/Times-Bold@0 SF(SHELL COMP)72 458.4 Q -1.04(AT)-.81 G +(IBILITY MODE)1.04 E F0 .911 +(Bash-4.0 introduced the concept of a `shell compatibility le)108 470.4 +R -.15(ve)-.25 G .912(l', speci\214ed as a set of options to the shopt) +.15 F -.2(bu)108 482.4 S(iltin).2 E F1(compat31)3.378 E F0(,)A F1 +(compat32)3.378 E F0(,)A F1(compat40)3.378 E F0(,)A F1(compat41)3.378 E +F0 3.378(,a)C .878(nd so on\).)-3.378 F .877 +(There is only one current compatibility)5.878 F(le)108 494.4 Q -.15(ve) +-.25 G 3.253(l-).15 G 3.253(-e)-3.253 G .753(ach option is mutually e) +-3.253 F(xclusi)-.15 E -.15(ve)-.25 G 5.753(.T).15 G .753 +(he compatibility le)-5.753 F -.15(ve)-.25 G 3.254(li).15 G 3.254(si) +-3.254 G .754(ntended to allo)-3.254 F 3.254(wu)-.25 G .754 +(sers to select be-)-3.254 F(ha)108 506.4 Q 1.084(vior from pre)-.2 F +1.084(vious v)-.25 F 1.083(ersions that is incompatible with ne)-.15 F +1.083(wer v)-.25 F 1.083(ersions while the)-.15 F 3.583(ym)-.15 G 1.083 +(igrate scripts to use)-3.583 F(current features and beha)108 518.4 Q +(vior)-.2 E 2.5(.I)-.55 G(t')-2.5 E 2.5(si)-.55 G +(ntended to be a temporary solution.)-2.5 E 1.456 +(This section does not mention beha)108 535.2 R 1.457 +(vior that is standard for a particular v)-.2 F 1.457 +(ersion \(e.g., setting)-.15 F F1(compat32)3.957 E F0 .887 +(means that quoting the rhs of the re)108 547.2 R(ge)-.15 E .886 +(xp matching operator quotes special re)-.15 F(ge)-.15 E .886 +(xp characters in the w)-.15 F(ord,)-.1 E(which is def)108 559.2 Q +(ault beha)-.1 E(vior in bash-3.2 and abo)-.2 E -.15(ve)-.15 G(\).).15 E +.522(If a user enables, say)108 576 R(,)-.65 E F1(compat32)3.023 E F0 +3.023(,i)C 3.023(tm)-3.023 G .523(ay af)-3.023 F .523(fect the beha)-.25 +F .523(vior of other compatibility le)-.2 F -.15(ve)-.25 G .523 +(ls up to and includ-).15 F .26(ing the current compatibility le)108 588 +R -.15(ve)-.25 G 2.76(l. The).15 F .259 +(idea is that each compatibility le)2.759 F -.15(ve)-.25 G 2.759(lc).15 +G .259(ontrols beha)-2.759 F .259(vior that changed)-.2 F 1.645 +(in that v)108 600 R 1.646(ersion of)-.15 F F1(bash)4.146 E F0 4.146(,b) +C 1.646(ut that beha)-4.346 F 1.646(vior may ha)-.2 F 1.946 -.15(ve b) +-.2 H 1.646(een present in earlier v).15 F 4.146(ersions. F)-.15 F 1.646 +(or instance, the)-.15 F .761 +(change to use locale-based comparisons with the)108 612 R F1([[)3.261 E +F0 .76(command came in bash-4.1, and earlier v)3.261 F .76(ersions used) +-.15 F 1.904(ASCII-based comparisons, so enabling)108 624 R F1(compat32) +4.404 E F0 1.905(will enable ASCII-based comparisons as well.)4.404 F +(That)6.905 E .296(granularity may not be suf)108 636 R .296 +(\214cient for all uses, and as a result users should emplo)-.25 F 2.796 +(yc)-.1 G .295(ompatibility le)-2.796 F -.15(ve)-.25 G .295(ls care-).15 +F(fully)108 648 Q 5(.R)-.65 G(ead the documentation for a particular fe\ +ature to \214nd out the current beha)-5 E(vior)-.2 E(.)-.55 E .531 +(Bash-4.3 introduced a ne)108 664.8 R 3.031(ws)-.25 G .531(hell v)-3.031 +F(ariable:)-.25 E F3 -.27(BA)3.031 G(SH_COMP).27 E -.855(AT)-.666 G F4 +(.).855 E F0 .531(The v)5.031 F .531(alue assigned to this v)-.25 F .532 +(ariable \(a decimal)-.25 F -.15(ve)108 676.8 S .108(rsion number lik) +.15 F 2.608(e4)-.1 G .108(.2, or an inte)-2.608 F .108 +(ger corresponding to the)-.15 F F1(compat)2.607 E F2(NN)A F0 .107 +(option, lik)2.607 F 2.607(e4)-.1 G .107(2\) determines the com-)-2.607 +F(patibility le)108 688.8 Q -.15(ve)-.25 G(l.).15 E .387 +(Starting with bash-4.4, Bash has be)108 705.6 R .388 +(gun deprecating older compatibility le)-.15 F -.15(ve)-.25 G 2.888 +(ls. Ev).15 F(entually)-.15 E 2.888(,t)-.65 G .388(he options will) +-2.888 F(be remo)108 717.6 Q -.15(ve)-.15 G 2.5(di).15 G 2.5(nf)-2.5 G +-.2(avo)-2.6 G 2.5(ro).2 G(f)-2.5 E F3 -.27(BA)2.5 G(SH_COMP).27 E -.855 +(AT)-.666 G F4(.).855 E F0(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 +E(80)190.395 E 0 Cg EP +%%Page: 81 81 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E 1.164 +(Bash-5.0 is the \214nal v)108 84 R 1.164 +(ersion for which there will be an indi)-.15 F 1.163 +(vidual shopt option for the pre)-.25 F 1.163(vious v)-.25 F(ersion.) +-.15 E(Users should use)108 96 Q/F1 9/Times-Bold@0 SF -.27(BA)2.5 G +(SH_COMP).27 E -.855(AT)-.666 G F0(on bash-5.0 and later v)3.105 E +(ersions.)-.15 E 1.613(The follo)108 112.8 R 1.613 +(wing table describes the beha)-.25 F 1.613 +(vior changes controlled by each compatibility le)-.2 F -.15(ve)-.25 G +4.113(ls).15 G 4.114(etting. The)-4.113 F/F2 10/Times-Bold@0 SF(compat) +108 124.8 Q/F3 10/Times-Italic@0 SF(NN)A F0 1.186 +(tag is used as shorthand for setting the compatibility le)3.686 F -.15 +(ve)-.25 G 3.686(lt).15 G(o)-3.686 E F3(NN)3.686 E F0 1.186 +(using one of the follo)3.686 F(wing)-.25 E 3.806(mechanisms. F)108 +136.8 R 1.306(or v)-.15 F 1.306 +(ersions prior to bash-5.0, the compatibility le)-.15 F -.15(ve)-.25 G +3.807(lm).15 G 1.307(ay be set using the corresponding)-3.807 F F2 +(compat)108 148.8 Q F3(NN)A F0 .502(shopt option.)3.002 F -.15(Fo)5.502 +G 3.002(rb).15 G .502(ash-4.3 and later v)-3.002 F .502(ersions, the) +-.15 F F1 -.27(BA)3.002 G(SH_COMP).27 E -.855(AT)-.666 G F0 -.25(va) +3.607 G .502(riable is preferred, and it).25 F +(is required for bash-5.1 and later v)108 160.8 Q(ersions.)-.15 E F2 +(compat31)108 177.6 Q F0<83>144 189.6 Q(quoting the rhs of the)180 189.6 +Q F2([[)2.5 E F0(command')2.5 E 2.5(sr)-.55 G -.15(eg)-2.5 G -.15(ex).15 +G 2.5(pm).15 G(atching operator \(=~\) has no special ef)-2.5 E(fect) +-.25 E F2(compat32)108 206.4 Q F0<83>144 218.4 Q .35 +(interrupting a command list such as "a ; b ; c" causes the e)180 218.4 +R -.15(xe)-.15 G .35(cution of the ne).15 F .35(xt command)-.15 F .018 +(in the list \(in bash-4.0 and later v)180 230.4 R .018 +(ersions, the shell acts as if it recei)-.15 F -.15(ve)-.25 G 2.517(dt) +.15 G .017(he interrupt, so in-)-2.517 F +(terrupting one command in a list aborts the e)180 242.4 Q -.15(xe)-.15 +G(cution of the entire list\)).15 E F2(compat40)108 259.2 Q F0<83>144 +271.2 Q(the)180 271.2 Q F2(<)2.673 E F0(and)2.673 E F2(>)2.673 E F0 .173 +(operators to the)2.673 F F2([[)2.673 E F0 .173 +(command do not consider the current locale when compar)2.673 F(-)-.2 E +.068(ing strings; the)180 283.2 R 2.568(yu)-.15 G .068 +(se ASCII ordering.)-2.568 F .068(Bash v)5.068 F .067 +(ersions prior to bash-4.1 use ASCII collation)-.15 F(and)180 295.2 Q F3 +(str)4.742 E(cmp)-.37 E F0 1.902 +(\(3\); bash-4.1 and later use the current locale').19 F 4.403(sc)-.55 G +1.903(ollation sequence and)-4.403 F F3(str)4.743 E(-)-.2 E(coll)180 +307.2 Q F0(\(3\).).51 E F2(compat41)108 324 Q F0<83>144 336 Q(in)180 336 +Q F3(posix)3.79 E F0(mode,)3.79 E F2(time)3.79 E F0 1.29(may be follo) +3.79 F 1.29(wed by options and still be recognized as a reserv)-.25 F +(ed)-.15 E -.1(wo)180 348 S(rd \(this is POSIX interpretation 267\)).1 E +<83>144 360 Q(in)180 360 Q F3(posix)2.708 E F0 .208 +(mode, the parser requires that an e)2.708 F -.15(ve)-.25 G 2.708(nn).15 +G .208(umber of single quotes occur in the)-2.708 F F3(wor)2.709 E(d) +-.37 E F0 .282(portion of a double-quoted parameter e)180 372 R .282 +(xpansion and treats them specially)-.15 F 2.781(,s)-.65 G 2.781(ot) +-2.781 G .281(hat charac-)-2.781 F(ters within the single quotes are co\ +nsidered quoted \(this is POSIX interpretation 221\))180 384 Q F2 +(compat42)108 400.8 Q F0<83>144 412.8 Q 1.055(the replacement string in\ + double-quoted pattern substitution does not under)180 412.8 R 1.056 +(go quote re-)-.18 F(mo)180 424.8 Q -.25(va)-.15 G(l, as it does in v) +.25 E(ersions after bash-4.2)-.15 E<83>144 436.8 Q .021 +(in posix mode, single quotes are considered special when e)180 436.8 R +.021(xpanding the)-.15 F F3(wor)2.52 E(d)-.37 E F0 .02(portion of a)2.52 +F .017(double-quoted parameter e)180 448.8 R .017 +(xpansion and can be used to quote a closing brace or other spe-)-.15 F +.999(cial character \(this is part of POSIX interpretation 221\); in la\ +ter v)180 460.8 R .998(ersions, single quotes)-.15 F +(are not special within double-quoted w)180 472.8 Q(ord e)-.1 E +(xpansions)-.15 E F2(compat43)108 489.6 Q F0<83>144 501.6 Q 1.07 +(the shell does not print a w)180 501.6 R 1.071 +(arning message if an attempt is made to use a quoted com-)-.1 F .249 +(pound assignment as an ar)180 513.6 R .248 +(gument to declare \(declare -a foo='\(1 2\)'\). Later v)-.18 F .248 +(ersions w)-.15 F(arn)-.1 E(that this usage is deprecated)180 525.6 Q +<83>144 537.6 Q -.1(wo)180 537.6 S .5(rd e).1 F .501 +(xpansion errors are considered non-f)-.15 F .501 +(atal errors that cause the current command to)-.1 F -.1(fa)180 549.6 S +.605(il, e).1 F -.15(ve)-.25 G 3.105(ni).15 G 3.105(np)-3.105 G .605 +(osix mode \(the def)-3.105 F .605(ault beha)-.1 F .605(vior is to mak) +-.2 F 3.105(et)-.1 G .605(hem f)-3.105 F .605 +(atal errors that cause the)-.1 F(shell to e)180 561.6 Q(xit\))-.15 E +<83>144 573.6 Q .354(when e)180 573.6 R -.15(xe)-.15 G .354 +(cuting a shell function, the loop state \(while/until/etc.\)).15 F .355 +(is not reset, so)5.354 F F2(br)2.855 E(eak)-.18 E F0(or)2.855 E F2 +(continue)180 585.6 Q F0 .052 +(in that function will break or continue loops in the calling conte) +2.553 F .052(xt. Bash-4.4 and)-.15 F(later reset the loop state to pre) +180 597.6 Q -.15(ve)-.25 G(nt this).15 E F2(compat44)108 614.4 Q F0<83> +144 626.4 Q .719(the shell sets up the v)180 626.4 R .719(alues used by) +-.25 F F1 -.27(BA)3.219 G(SH_ARGV).27 E F0(and)2.969 E F1 -.27(BA)3.219 +G(SH_ARGC).27 E F0 .719(so the)2.969 F 3.219(yc)-.15 G .719(an e)-3.219 +F(xpand)-.15 E(to the shell')180 638.4 Q 2.5(sp)-.55 G +(ositional parameters e)-2.5 E -.15(ve)-.25 G 2.5(ni).15 G 2.5(fe)-2.5 G +(xtended deb)-2.65 E(ugging mode is not enabled)-.2 E<83>144 650.4 Q +2.635(as)180 650.4 S .135(ubshell inherits loops from its parent conte) +-2.635 F .135(xt, so)-.15 F F2(br)2.635 E(eak)-.18 E F0(or)2.635 E F2 +(continue)2.634 E F0 .134(will cause the sub-)2.634 F(shell to e)180 +662.4 Q 2.5(xit. Bash-5.0)-.15 F(and later reset the loop state to pre) +2.5 E -.15(ve)-.25 G(nt the e).15 E(xit)-.15 E<83>144 674.4 Q -.25(va) +180 674.4 S .618(riable assignments preceding b).25 F .618(uiltins lik) +-.2 F(e)-.1 E F2(export)3.118 E F0(and)3.118 E F2 -.18(re)3.118 G +(adonly).18 E F0 .618(that set attrib)3.118 F .619(utes con-)-.2 F .12 +(tinue to af)180 686.4 R .12(fect v)-.25 F .119 +(ariables with the same name in the calling en)-.25 F .119(vironment e) +-.4 F -.15(ve)-.25 G 2.619(ni).15 G 2.619(ft)-2.619 G .119(he shell is) +-2.619 F(not in posix mode)180 698.4 Q(GNU Bash 5.1)72 768 Q +(2020 October 29)141.235 E(81)190.395 E 0 Cg EP +%%Page: 82 82 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10/Times-Bold@0 +SF(compat50)108 84 Q F0<83>144 96 Q 1.209(Bash-5.1 changed the w)180 96 +R(ay)-.1 E/F2 9/Times-Bold@0 SF($RANDOM)3.709 E F0 1.209 +(is generated to introduce slightly more random-)3.459 F 1.019 +(ness. If the shell compatibility le)180 108 R -.15(ve)-.25 G 3.518(li) +.15 G 3.518(ss)-3.518 G 1.018(et to 50 or lo)-3.518 F(wer)-.25 E 3.518 +(,i)-.4 G 3.518(tr)-3.518 G -2.15 -.25(ev e)-3.518 H 1.018 +(rts to the method from).25 F .732(bash-5.0 and pre)180 120 R .732 +(vious v)-.25 F .733 +(ersions, so seeding the random number generator by assigning a)-.15 F +-.25(va)180 132 S(lue to).25 E F2(RANDOM)2.5 E F0 +(will produce the same sequence as in bash-5.0)2.25 E<83>144 144 Q .696 +(If the command hash table is empty)180 144 R 3.196(,b)-.65 G .696 +(ash v)-3.196 F .695(ersions prior to bash-5.1 printed an informa-)-.15 +F 1.32(tional message to that ef)180 156 R 1.321(fect, e)-.25 F -.15(ve) +-.25 G 3.821(nw).15 G 1.321 +(hen producing output that can be reused as input.)-3.821 F +(Bash-5.1 suppresses that message when the)180 168 Q F12.5 E F0 +(option is supplied.)2.5 E/F3 10.95/Times-Bold@0 SF(RESTRICTED SHELL)72 +184.8 Q F0(If)108 196.8 Q F1(bash)3.582 E F0 1.081 +(is started with the name)3.581 F F1(rbash)3.581 E F0 3.581(,o)C 3.581 +(rt)-3.581 G(he)-3.581 E F13.581 E F0 1.081 +(option is supplied at in)3.581 F -.2(vo)-.4 G 1.081 +(cation, the shell becomes re-).2 F 2.976(stricted. A)108 208.8 R .476 +(restricted shell is used to set up an en)2.976 F .476 +(vironment more controlled than the standard shell.)-.4 F .477(It be-) +5.477 F(ha)108 220.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E +F1(bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E +(wing are disallo)-.25 E(wed or not performed:)-.25 E<83>108 237.6 Q +(changing directories with)144 237.6 Q F1(cd)2.5 E F0<83>108 254.4 Q +(setting or unsetting the v)144 254.4 Q(alues of)-.25 E F2(SHELL)2.5 E +/F4 9/Times-Roman@0 SF(,)A F2 -.666(PA)2.25 G(TH)-.189 E F4(,)A F2 +(HISTFILE)2.25 E F4(,)A F2(ENV)2.25 E F4(,)A F0(or)2.25 E F2 -.27(BA)2.5 +G(SH_ENV).27 E F0<83>108 271.2 Q(specifying command names containing)144 +271.2 Q F1(/)2.5 E F0<83>108 288 Q(specifying a \214lename containing a) +144 288 Q F1(/)2.5 E F0(as an ar)2.5 E(gument to the)-.18 E F1(.)2.5 E +F0 -.2(bu)5 G(iltin command).2 E<83>108 304.8 Q +(specifying a \214lename containing a slash as an ar)144 304.8 Q +(gument to the)-.18 E F1(history)2.5 E F0 -.2(bu)2.5 G(iltin command).2 +E<83>108 321.6 Q .45 +(specifying a \214lename containing a slash as an ar)144 321.6 R .449 +(gument to the)-.18 F F12.949 E F0 .449(option to the)2.949 F F1 +(hash)2.949 E F0 -.2(bu)2.949 G .449(iltin com-).2 F(mand)144 333.6 Q +<83>108 350.4 Q(importing function de\214nitions from the shell en)144 +350.4 Q(vironment at startup)-.4 E<83>108 367.2 Q(parsing the v)144 +367.2 Q(alue of)-.25 E F2(SHELLOPTS)2.5 E F0(from the shell en)2.25 E +(vironment at startup)-.4 E<83>108 384 Q(redirecting output using the >\ +, >|, <>, >&, &>, and >> redirection operators)144 384 Q<83>108 400.8 Q +(using the)144 400.8 Q F1(exec)2.5 E F0 -.2(bu)2.5 G +(iltin command to replace the shell with another command).2 E<83>108 +417.6 Q(adding or deleting b)144 417.6 Q(uiltin commands with the)-.2 E +F12.5 E F0(and)2.5 E F12.5 E F0(options to the)2.5 E F1 +(enable)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E<83>108 434.4 Q +(using the)144 434.4 Q F1(enable)2.5 E F0 -.2(bu)2.5 G +(iltin command to enable disabled shell b).2 E(uiltins)-.2 E<83>108 +451.2 Q(specifying the)144 451.2 Q F12.5 E F0(option to the)2.5 E +F1(command)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E<83>108 468 Q +(turning of)144 468 Q 2.5(fr)-.25 G(estricted mode with)-2.5 E F1 +(set +r)2.5 E F0(or)2.5 E F1(set +o r)2.5 E(estricted)-.18 E F0(.)A +(These restrictions are enforced after an)108 484.8 Q 2.5(ys)-.15 G +(tartup \214les are read.)-2.5 E 1.566 +(When a command that is found to be a shell script is e)108 501.6 R -.15 +(xe)-.15 G 1.567(cuted \(see).15 F F2 1.567(COMMAND EXECUTION)4.067 F F0 +(abo)3.817 E -.15(ve)-.15 G(\),).15 E F1(rbash)108 513.6 Q F0(turns of) +2.5 E 2.5(fa)-.25 G .3 -.15(ny r)-2.5 H(estrictions in the shell spa).15 +E(wned to e)-.15 E -.15(xe)-.15 G(cute the script.).15 E F3(SEE ALSO)72 +530.4 Q/F5 10/Times-Italic@0 SF(Bash Refer)108 542.4 Q(ence Manual)-.37 +E F0 2.5(,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E(y)-.15 E F5 +(The Gnu Readline Libr)108 554.4 Q(ary)-.15 E F0 2.5(,B)C(rian F)-2.5 E +(ox and Chet Rame)-.15 E(y)-.15 E F5(The Gnu History Libr)108 566.4 Q +(ary)-.15 E F0 2.5(,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E(y)-.15 E +F5 -.8(Po)108 578.4 S(rtable Oper).8 E +(ating System Interface \(POSIX\) P)-.15 E(art 2: Shell and Utilities) +-.8 E F0 2.5(,I)C(EEE --)-2.5 E(http://pubs.opengroup.or)144 590.4 Q +(g/onlinepubs/9699919799/)-.18 E(http://tiswww)108 602.4 Q +(.case.edu/~chet/bash/POSIX -- a description of posix mode)-.65 E F5(sh) +108 614.4 Q F0(\(1\),)A F5(ksh)2.5 E F0(\(1\),)A F5(csh)2.5 E F0(\(1\))A +F5(emacs)108 626.4 Q F0(\(1\),)A F5(vi)2.5 E F0(\(1\))A F5 -.37(re)108 +638.4 S(adline).37 E F0(\(3\))A F3(FILES)72 655.2 Q F5(/bin/bash)109.666 +667.2 Q F0(The)144 679.2 Q F1(bash)2.5 E F0 -.15(exe)2.5 G(cutable).15 E +F5(/etc/pr)109.666 691.2 Q(o\214le)-.45 E F0 +(The systemwide initialization \214le, e)144 703.2 Q -.15(xe)-.15 G +(cuted for login shells).15 E(GNU Bash 5.1)72 768 Q(2020 October 29) +141.235 E(82)190.395 E 0 Cg EP +%%Page: 83 83 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 137.14(SH\(1\) General).35 F +(Commands Manual)2.5 E -.35(BA)139.64 G(SH\(1\)).35 E/F1 10 +/Times-Italic@0 SF(~/.bash_pr)109.666 84 Q(o\214le)-.45 E F0 +(The personal initialization \214le, e)144 96 Q -.15(xe)-.15 G +(cuted for login shells).15 E F1(~/.bashr)109.666 108 Q(c)-.37 E F0 +(The indi)144 120 Q(vidual per)-.25 E(-interacti)-.2 E -.15(ve)-.25 G +(-shell startup \214le).15 E F1(~/.bash_lo)109.666 132 Q(gout)-.1 E F0 +(The indi)144 144 Q(vidual login shell cleanup \214le, e)-.25 E -.15(xe) +-.15 G(cuted when a login shell e).15 E(xits)-.15 E F1(~/.inputr)109.666 +156 Q(c)-.37 E F0(Indi)144 168 Q(vidual)-.25 E F1 -.37(re)2.5 G(adline) +.37 E F0(initialization \214le)2.5 E/F2 10.95/Times-Bold@0 SF -.548(AU) +72 184.8 S(THORS).548 E F0(Brian F)108 196.8 Q(ox, Free Softw)-.15 E +(are F)-.1 E(oundation)-.15 E(bfox@gnu.or)108 208.8 Q(g)-.18 E +(Chet Rame)108 225.6 Q 1.3 -.65(y, C)-.15 H(ase W).65 E(estern Reserv) +-.8 E 2.5(eU)-.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(chet.rame)108 +237.6 Q(y@case.edu)-.15 E F2 -.11(BU)72 254.4 S 2.738(GR).11 G(EPOR) +-2.738 E(TS)-.438 E F0 .568(If you \214nd a b)108 266.4 R .568(ug in)-.2 +F/F3 10/Times-Bold@0 SF(bash,)3.068 E F0 .568(you should report it.) +3.068 F .568(But \214rst, you should mak)5.568 F 3.068(es)-.1 G .568 +(ure that it really is a b)-3.068 F .567(ug, and)-.2 F 5.625 +(that it appears in the latest v)108 278.4 R 5.625(ersion of)-.15 F F3 +(bash)8.125 E F0 10.625(.T)C 5.625(he latest v)-10.625 F 5.626 +(ersion is al)-.15 F -.1(wa)-.1 G 5.626(ys a).1 F -.25(va)-.2 G 5.626 +(ilable from).25 F F1(ftp://ftp.gnu.or)108 290.4 Q(g/pub/gnu/bash/)-.37 +E F0(.)A .411(Once you ha)108 307.2 R .711 -.15(ve d)-.2 H .411 +(etermined that a b).15 F .411(ug actually e)-.2 F .411(xists, use the) +-.15 F F1(bashb)3.18 E(ug)-.2 E F0 .41(command to submit a b)3.13 F .41 +(ug report.)-.2 F(If)5.41 E .594(you ha)108 319.2 R .894 -.15(ve a \214) +-.2 H .595(x, you are encouraged to mail that as well!).15 F .595 +(Suggestions and `philosophical' b)5.595 F .595(ug reports may)-.2 F +(be mailed to)108 331.2 Q F1 -.2(bu)2.5 G(g-bash@gnu.or).2 E(g)-.37 E F0 +(or posted to the Usenet ne)2.5 E(wsgroup)-.25 E F3(gnu.bash.b)2.5 E(ug) +-.2 E F0(.)A(ALL b)108 348 Q(ug reports should include:)-.2 E(The v)108 +364.8 Q(ersion number of)-.15 E F3(bash)2.5 E F0(The hardw)108 376.8 Q +(are and operating system)-.1 E(The compiler used to compile)108 388.8 Q +2.5(Ad)108 400.8 S(escription of the b)-2.5 E(ug beha)-.2 E(viour)-.2 E +2.5(As)108 412.8 S(hort script or `recipe' which e)-2.5 E -.15(xe)-.15 G +(rcises the b).15 E(ug)-.2 E F1(bashb)108.27 429.6 Q(ug)-.2 E F0 +(inserts the \214rst three items automatically into the template it pro) +2.72 E(vides for \214ling a b)-.15 E(ug report.)-.2 E(Comments and b)108 +446.4 Q(ug reports concerning this manual page should be directed to)-.2 +E F1 -.15(ch)2.5 G(et.r).15 E(ame)-.15 E(y@case)-.3 E(.edu)-.15 E F0(.) +.25 E F2 -.11(BU)72 463.2 S(GS).11 E F0(It')108 475.2 Q 2.5(st)-.55 G +(oo big and too slo)-2.5 E -.65(w.)-.25 G 1.869 +(There are some subtle dif)108 492 R 1.869(ferences between)-.25 F F3 +(bash)4.369 E F0 1.869(and traditional v)4.369 F 1.869(ersions of)-.15 F +F3(sh)4.368 E F0 4.368(,m)C 1.868(ostly because of the)-4.368 F/F4 9 +/Times-Bold@0 SF(POSIX)108 504 Q F0(speci\214cation.)2.25 E +(Aliases are confusing in some uses.)108 520.8 Q(Shell b)108 537.6 Q +(uiltin commands and functions are not stoppable/restartable.)-.2 E +1.315(Compound commands and command sequences of the form `a ; b ; c' a\ +re not handled gracefully when)108 554.4 R .39 +(process suspension is attempted.)108 566.4 R .389 +(When a process is stopped, the shell immediately e)5.39 F -.15(xe)-.15 +G .389(cutes the ne).15 F .389(xt com-)-.15 F .192 +(mand in the sequence.)108 578.4 R .192(It suf)5.192 F .192(\214ces to \ +place the sequence of commands between parentheses to force it into a) +-.25 F(subshell, which may be stopped as a unit.)108 590.4 Q(Array v)108 +607.2 Q(ariables may not \(yet\) be e)-.25 E(xported.)-.15 E +(There may be only one acti)108 624 Q .3 -.15(ve c)-.25 H +(oprocess at a time.).15 E(GNU Bash 5.1)72 768 Q(2020 October 29)141.235 +E(83)190.395 E 0 Cg EP +%%Trailer +end +%%EOF diff --git a/bash-5.1/doc/bashbug.0 b/bash-5.1/doc/bashbug.0 new file mode 100644 index 0000000000000000000000000000000000000000..373c47b1d08da3afd4fcea261c7ba9c46fff3beb --- /dev/null +++ b/bash-5.1/doc/bashbug.0 @@ -0,0 +1,52 @@ +BASHBUG(1) General Commands Manual BASHBUG(1) + + + +NNAAMMEE + bashbug - report a bug in bash + +SSYYNNOOPPSSIISS + bbaasshhbbuugg [_-_-_v_e_r_s_i_o_n] [_-_-_h_e_l_p] [_e_m_a_i_l_-_a_d_d_r_e_s_s] + +DDEESSCCRRIIPPTTIIOONN + bbaasshhbbuugg is a shell script to help the user compose and mail bug reports + concerning bash in a standard format. bbaasshhbbuugg invokes the editor spec- + ified by the environment variable EEDDIITTOORR on a temporary copy of the bug + report format outline. The user must fill in the appropriate fields and + exit the editor. bbaasshhbbuugg then mails the completed report to _b_u_g_- + _b_a_s_h_@_g_n_u_._o_r_g, or _e_m_a_i_l_-_a_d_d_r_e_s_s. If the report cannot be mailed, it is + saved in the file _d_e_a_d_._b_a_s_h_b_u_g in the invoking user's home directory. + + The bug report format outline consists of several sections. The first + section provides information about the machine, operating system, the + bash version, and the compilation environment. The second section + should be filled in with a description of the bug. The third section + should be a description of how to reproduce the bug. The optional + fourth section is for a proposed fix. Fixes are encouraged. + +EENNVVIIRROONNMMEENNTT + bbaasshhbbuugg will utilize the following environment variables if they exist: + + EEDDIITTOORR Specifies the preferred editor. If EEDDIITTOORR is not set, bbaasshhbbuugg + attempts to locate a number of alternative editors, including + eemmaaccss. If bbaasshhbbuugg cannot locate any of the alternative editors, + it attempts to execute vvii. + + HHOOMMEE Directory in which the failed bug report is saved if the mail + fails. + + TTMMPPDDIIRR Directory in which to create temporary files and directories. + +SSEEEE AALLSSOO + _b_a_s_h(1) + +AAUUTTHHOORRSS + Brian Fox, Free Software Foundation + bfox@gnu.org + + Chet Ramey, Case Western Reserve University + chet@po.cwru.edu + + + +GNU Bash 5.1 2020 August 1 BASHBUG(1) diff --git a/bash-5.1/doc/bashbug.1 b/bash-5.1/doc/bashbug.1 new file mode 100644 index 0000000000000000000000000000000000000000..abcaf48232377c821b3d0e461692deb2ed9eda4b --- /dev/null +++ b/bash-5.1/doc/bashbug.1 @@ -0,0 +1,67 @@ +.\" +.\" MAN PAGE COMMENTS to +.\" +.\" Chet Ramey +.\" Case Western Reserve University +.\" chet@po.cwru.edu +.\" +.\" Last Change: Sun Aug 2 15:39:07 EDT 2020 +.\" +.TH BASHBUG 1 "2020 August 1" "GNU Bash 5.1" +.SH NAME +bashbug \- report a bug in bash +.SH SYNOPSIS +\fBbashbug\fP [\fI--version\fP] [\fI--help\fP] [\fIemail-address\fP] +.SH DESCRIPTION +.B bashbug +is a shell script to help the user compose and mail bug reports +concerning bash in a standard format. +.B bashbug +invokes the editor specified by the environment variable +.SM +.B EDITOR +on a temporary copy of the bug report format outline. The user must +fill in the appropriate fields and exit the editor. +.B bashbug +then mails the completed report to \fIbug-bash@gnu.org\fP, or +\fIemail-address\fP. If the report cannot be mailed, it is saved in the +file \fIdead.bashbug\fP in the invoking user's home directory. +.PP +The bug report format outline consists of several sections. The first +section provides information about the machine, operating system, the +bash version, and the compilation environment. The second section +should be filled in with a description of the bug. The third section +should be a description of how to reproduce the bug. The optional +fourth section is for a proposed fix. Fixes are encouraged. +.SH ENVIRONMENT +.B bashbug +will utilize the following environment variables if they exist: +.TP +.B EDITOR +Specifies the preferred editor. If +.SM +.B EDITOR +is not set, +.B bashbug +attempts to locate a number of alternative editors, including +.BR emacs . +If +.B bashbug +cannot locate any of the alternative editors, it attempts to execute \fBvi\fP. +.TP +.B HOME +Directory in which the failed bug report is saved if the mail fails. +.TP +.B TMPDIR +Directory in which to create temporary files and directories. +.SH "SEE ALSO" +.TP +\fIbash\fP(1) +.SH AUTHORS +Brian Fox, Free Software Foundation +.br +bfox@gnu.org +.PP +Chet Ramey, Case Western Reserve University +.br +chet@po.cwru.edu diff --git a/bash-5.1/doc/bashbug.ps b/bash-5.1/doc/bashbug.ps new file mode 100644 index 0000000000000000000000000000000000000000..9c60a331d97e452fd5f4adcfad2af0bb2c4101b6 --- /dev/null +++ b/bash-5.1/doc/bashbug.ps @@ -0,0 +1,297 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.22.4 +%%CreationDate: Fri Aug 7 11:58:10 2020 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.22 4 +%%Pages: 1 +%%PageOrder: Ascend +%%DocumentMedia: Default 612 792 0 () () +%%Orientation: Portrait +%%EndComments +%%BeginDefaults +%%PageMedia: Default +%%EndDefaults +%%BeginProlog +%%BeginResource: procset grops 1.22 4 +%!PS-Adobe-3.0 Resource-ProcSet +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +DEFS/BPhook known{DEFS begin BPhook end}if +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/setcmykcolor where{ +pop +/Fk{ +setcmykcolor fill +}bind def +}if +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/setcmykcolor where{ +pop +/Ck/setcmykcolor load def +}if +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne +2 index/UniqueID ne +and +{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +/setpagedevice{}def +mark +}bind def +/PEND{ +cleartomark +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%EndProlog +%%BeginSetup +%%BeginFeature: *PageSize Default +<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice +%%EndFeature +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE +/Times-Roman@0 ENC0/Times-Roman RE +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SHB).35 E 116.13 +(UG\(1\) General)-.1 F(Commands Manual)2.5 E -.35(BA)118.63 G(SHB).35 E +(UG\(1\))-.1 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0 +(bashb)108 96 Q(ug \255 report a b)-.2 E(ug in bash)-.2 E F1(SYNOPSIS)72 +112.8 Q/F2 10/Times-Bold@0 SF(bashb)108 124.8 Q(ug)-.2 E F0([)2.5 E/F3 +10/Times-Italic@0 SF(--ver)A(sion)-.1 E F0 2.5(][)C F3(--help)-2.5 E F0 +2.5(][)C F3(email-addr)-2.5 E(ess)-.37 E F0(])A F1(DESCRIPTION)72 141.6 +Q F2(bashb)108 153.6 Q(ug)-.2 E F0 .446 +(is a shell script to help the user compose and mail b)2.947 F .446 +(ug reports concerning bash in a standard for)-.2 F(-)-.2 E(mat.)108 +165.6 Q F2(bashb)5.961 E(ug)-.2 E F0(in)3.461 E -.2(vo)-.4 G -.1(ke).2 G +3.461(st).1 G .962(he editor speci\214ed by the en)-3.461 F .962 +(vironment v)-.4 F(ariable)-.25 E/F4 9/Times-Bold@0 SF(EDIT)3.462 E(OR) +-.162 E F0 .962(on a temporary cop)3.212 F 3.462(yo)-.1 G(f)-3.462 E +.374(the b)108 177.6 R .374(ug report format outline. The user must \ +\214ll in the appropriate \214elds and e)-.2 F .374(xit the editor)-.15 +F(.)-.55 E F2(bashb)5.373 E(ug)-.2 E F0(then)2.873 E 1.141 +(mails the completed report to)108 189.6 R F3 -.2(bu)3.641 G +(g-bash@gnu.or).2 E(g)-.37 E F0 3.641(,o)C(r)-3.641 E F3(email-addr) +3.641 E(ess)-.37 E F0 6.141(.I)C 3.641(ft)-6.141 G 1.142 +(he report cannot be mailed, it is)-3.641 F(sa)108 201.6 Q -.15(ve)-.2 G +2.5(di).15 G 2.5(nt)-2.5 G(he \214le)-2.5 E F3(dead.bashb)2.5 E(ug)-.2 E +F0(in the in)2.5 E -.2(vo)-.4 G(king user').2 E 2.5(sh)-.55 G +(ome directory)-2.5 E(.)-.65 E .354(The b)108 218.4 R .354 +(ug report format outline consists of se)-.2 F -.15(ve)-.25 G .353 +(ral sections.).15 F .353(The \214rst section pro)5.353 F .353 +(vides information about the)-.15 F .37 +(machine, operating system, the bash v)108 230.4 R .371 +(ersion, and the compilation en)-.15 F 2.871(vironment. The)-.4 F .371 +(second section should)2.871 F .209 +(be \214lled in with a description of the b)108 242.4 R 2.709(ug. The) +-.2 F .208(third section should be a description of ho)2.709 F 2.708(wt) +-.25 G 2.708(or)-2.708 G .208(eproduce the)-2.708 F -.2(bu)108 254.4 S +2.5(g. The).2 F(optional fourth section is for a proposed \214x.)2.5 E +(Fix)5 E(es are encouraged.)-.15 E F1(ENVIR)72 271.2 Q(ONMENT)-.329 E F2 +(bashb)108 283.2 Q(ug)-.2 E F0(will utilize the follo)2.5 E(wing en)-.25 +E(vironment v)-.4 E(ariables if the)-.25 E 2.5(ye)-.15 G(xist:)-2.65 E +F2(EDIT)108 300 Q(OR)-.18 E F0 .327(Speci\214es the preferred editor)144 +312 R 2.827(.I)-.55 G(f)-2.827 E F4(EDIT)2.827 E(OR)-.162 E F0 .327 +(is not set,)2.577 F F2(bashb)2.827 E(ug)-.2 E F0 .328 +(attempts to locate a number of alter)2.827 F(-)-.2 E(nati)144 324 Q +1.925 -.15(ve e)-.25 H 1.625(ditors, including).15 F F2(emacs)4.125 E F0 +6.625(.I)C(f)-6.625 E F2(bashb)4.125 E(ug)-.2 E F0 1.625 +(cannot locate an)4.125 F 4.125(yo)-.15 G 4.125(ft)-4.125 G 1.625 +(he alternati)-4.125 F 1.925 -.15(ve e)-.25 H 1.625(ditors, it at-).15 F +(tempts to e)144 336 Q -.15(xe)-.15 G(cute).15 E F2(vi)2.5 E F0(.)A F2 +(HOME)108 352.8 Q F0(Directory in which the f)144 364.8 Q(ailed b)-.1 E +(ug report is sa)-.2 E -.15(ve)-.2 G 2.5(di).15 G 2.5(ft)-2.5 G +(he mail f)-2.5 E(ails.)-.1 E F2(TMPDIR)108 381.6 Q F0 +(Directory in which to create temporary \214les and directories.)144 +393.6 Q F1(SEE ALSO)72 410.4 Q F3(bash)108 422.4 Q F0(\(1\))A F1 -.548 +(AU)72 439.2 S(THORS).548 E F0(Brian F)108 451.2 Q(ox, Free Softw)-.15 E +(are F)-.1 E(oundation)-.15 E(bfox@gnu.or)108 463.2 Q(g)-.18 E +(Chet Rame)108 480 Q 1.3 -.65(y, C)-.15 H(ase W).65 E(estern Reserv)-.8 +E 2.5(eU)-.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(chet@po.cwru.edu) +108 492 Q(GNU Bash 5.1)72 768 Q(2020 August 1)145.395 E(1)199.555 E 0 Cg +EP +%%Trailer +end +%%EOF diff --git a/bash-5.1/doc/bashref.dvi b/bash-5.1/doc/bashref.dvi new file mode 100644 index 0000000000000000000000000000000000000000..2b682d27696646a1393ebce7d4d6520eedfb49d7 Binary files /dev/null and b/bash-5.1/doc/bashref.dvi differ diff --git a/bash-5.1/doc/bashref.html b/bash-5.1/doc/bashref.html new file mode 100644 index 0000000000000000000000000000000000000000..6a4c3ab881254548dfd293812df95dbc83c909a2 --- /dev/null +++ b/bash-5.1/doc/bashref.html @@ -0,0 +1,15872 @@ + + + + + + +Bash Reference Manual + + + + + + + + + + + + + + + + +

Bash Reference Manual

+ + + + + + + + + + + +

Table of Contents

+ +
+ + +
+ + +
+

+Next: , Previous: , Up: (dir)   [Contents][Index]

+
+

Bash Features

+ +

This text is a brief description of the features that are present in +the Bash shell (version 5.1, 29 October 2020). +The Bash home page is http://www.gnu.org/software/bash/. +

+

This is Edition 5.1, last updated 29 October 2020, +of The GNU Bash Reference Manual, +for Bash, Version 5.1. +

+

Bash contains features that appear in other popular shells, and some +features that only appear in Bash. Some of the shells that Bash has +borrowed concepts from are the Bourne Shell (sh), the Korn Shell +(ksh), and the C-shell (csh and its successor, +tcsh). The following menu breaks the features up into +categories, noting which features were inspired by other shells and +which are specific to Bash. +

+

This manual is meant as a brief introduction to features found in +Bash. The Bash manual page should be used as the definitive +reference on shell behavior. +

+ + + + + + + + + + + + + + + + + +
+
+

+Next: , Up: Top   [Contents][Index]

+
+

1 Introduction

+ + + + + +
+ +

1.1 What is Bash?

+ +

Bash is the shell, or command language interpreter, +for the GNU operating system. +The name is an acronym for the ‘Bourne-Again SHell’, +a pun on Stephen Bourne, the author of the direct ancestor of +the current Unix shell sh, +which appeared in the Seventh Edition Bell Labs Research version +of Unix. +

+

Bash is largely compatible with sh and incorporates useful +features from the Korn shell ksh and the C shell csh. +It is intended to be a conformant implementation of the IEEE +POSIX Shell and Tools portion of the IEEE POSIX +specification (IEEE Standard 1003.1). +It offers functional improvements over sh for both interactive and +programming use. +

+

While the GNU operating system provides other shells, including +a version of csh, Bash is the default shell. +Like other GNU software, Bash is quite portable. It currently runs +on nearly every version of Unix and a few other operating systems - +independently-supported ports exist for MS-DOS, OS/2, +and Windows platforms. +

+
+
+

+Previous: , Up: Introduction   [Contents][Index]

+
+

1.2 What is a shell?

+ +

At its base, a shell is simply a macro processor that executes +commands. The term macro processor means functionality where text +and symbols are expanded to create larger expressions. +

+

A Unix shell is both a command interpreter and a programming +language. As a command interpreter, the shell provides the user +interface to the rich set of GNU utilities. The programming +language features allow these utilities to be combined. +Files containing commands can be created, and become +commands themselves. These new commands have the same status as +system commands in directories such as /bin, allowing users +or groups to establish custom environments to automate their common +tasks. +

+

Shells may be used interactively or non-interactively. In +interactive mode, they accept input typed from the keyboard. +When executing non-interactively, shells execute commands read +from a file. +

+

A shell allows execution of GNU commands, both synchronously and +asynchronously. +The shell waits for synchronous commands to complete before accepting +more input; asynchronous commands continue to execute in parallel +with the shell while it reads and executes additional commands. +The redirection constructs permit +fine-grained control of the input and output of those commands. +Moreover, the shell allows control over the contents of commands’ +environments. +

+

Shells also provide a small set of built-in +commands (builtins) implementing functionality impossible +or inconvenient to obtain via separate utilities. +For example, cd, break, continue, and +exec cannot be implemented outside of the shell because +they directly manipulate the shell itself. +The history, getopts, kill, or pwd +builtins, among others, could be implemented in separate utilities, +but they are more convenient to use as builtin commands. +All of the shell builtins are described in +subsequent sections. +

+

While executing commands is essential, most of the power (and +complexity) of shells is due to their embedded programming +languages. Like any high-level language, the shell provides +variables, flow control constructs, quoting, and functions. +

+

Shells offer features geared specifically for +interactive use rather than to augment the programming language. +These interactive features include job control, command line +editing, command history and aliases. Each of these features is +described in this manual. +

+
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

2 Definitions

+

These definitions are used throughout the remainder of this manual. +

+
+
POSIX
+
+

A family of open system standards based on Unix. Bash +is primarily concerned with the Shell and Utilities portion of the +POSIX 1003.1 standard. +

+
+
blank
+

A space or tab character. +

+
+
builtin
+
+

A command that is implemented internally by the shell itself, rather +than by an executable program somewhere in the file system. +

+
+
control operator
+
+

A token that performs a control function. It is a newline +or one of the following: +‘||’, ‘&&’, ‘&’, ‘;’, ‘;;’, ‘;&’, ‘;;&’, +‘|’, ‘|&’, ‘(’, or ‘)’. +

+
+
exit status
+
+

The value returned by a command to its caller. The value is restricted +to eight bits, so the maximum value is 255. +

+
+
field
+
+

A unit of text that is the result of one of the shell expansions. After +expansion, when executing a command, the resulting fields are used as +the command name and arguments. +

+
+
filename
+
+

A string of characters used to identify a file. +

+
+
job
+
+

A set of processes comprising a pipeline, and any processes descended +from it, that are all in the same process group. +

+
+
job control
+
+

A mechanism by which users can selectively stop (suspend) and restart +(resume) execution of processes. +

+
+
metacharacter
+
+

A character that, when unquoted, separates words. A metacharacter is +a space, tab, newline, or one of the following characters: +‘|’, ‘&’, ‘;’, ‘(’, ‘)’, ‘<’, or +‘>’. +

+
+
name
+
+ +

A word consisting solely of letters, numbers, and underscores, +and beginning with a letter or underscore. Names are used as +shell variable and function names. +Also referred to as an identifier. +

+
+
operator
+
+

A control operator or a redirection operator. +See Redirections, for a list of redirection operators. +Operators contain at least one unquoted metacharacter. +

+
+
process group
+
+

A collection of related processes each having the same process +group ID. +

+
+
process group ID
+
+

A unique identifier that represents a process group +during its lifetime. +

+
+
reserved word
+
+

A word that has a special meaning to the shell. Most reserved +words introduce shell flow control constructs, such as for and +while. +

+
+
return status
+
+

A synonym for exit status. +

+
+
signal
+
+

A mechanism by which a process may be notified by the kernel +of an event occurring in the system. +

+
+
special builtin
+
+

A shell builtin command that has been classified as special by the +POSIX standard. +

+
+
token
+
+

A sequence of characters considered a single unit by the shell. +It is either a word or an operator. +

+
+
word
+
+

A sequence of characters treated as a unit by the shell. +Words may not include unquoted metacharacters. +

+
+ +
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

3 Basic Shell Features

+ + +

Bash is an acronym for ‘Bourne-Again SHell’. +The Bourne shell is +the traditional Unix shell originally written by Stephen Bourne. +All of the Bourne shell builtin commands are available in Bash, +The rules for evaluation and quoting are taken from the POSIX +specification for the ‘standard’ Unix shell. +

+

This chapter briefly summarizes the shell’s ‘building blocks’: +commands, control structures, shell functions, shell parameters, +shell expansions, +redirections, which are a way to direct input and output from +and to named files, and how the shell executes commands. +

+ + + + + + + + + + + +
+ +

3.1 Shell Syntax

+ + + + + + +

When the shell reads input, it proceeds through a +sequence of operations. If the input indicates the beginning of a +comment, the shell ignores the comment symbol (‘#’), and the rest +of that line. +

+

Otherwise, roughly speaking, the shell reads its input and +divides the input into words and operators, employing the quoting rules +to select which meanings to assign various words and characters. +

+

The shell then parses these tokens into commands and other constructs, +removes the special meaning of certain words or characters, expands +others, redirects input and output as needed, executes the specified +command, waits for the command’s exit status, and makes that exit status +available for further inspection or processing. +

+
+
+

+Next: , Up: Shell Syntax   [Contents][Index]

+
+

3.1.1 Shell Operation

+ +

The following is a brief description of the shell’s operation when it +reads and executes a command. Basically, the shell does the +following: +

+
    +
  1. Reads its input from a file (see Shell Scripts), from a string +supplied as an argument to the -c invocation option +(see Invoking Bash), or from the user’s terminal. + +
  2. Breaks the input into words and operators, obeying the quoting rules +described in Quoting. These tokens are separated by +metacharacters. Alias expansion is performed by this step +(see Aliases). + +
  3. Parses the tokens into simple and compound commands +(see Shell Commands). + +
  4. Performs the various shell expansions (see Shell Expansions), breaking +the expanded tokens into lists of filenames (see Filename Expansion) +and commands and arguments. + +
  5. Performs any necessary redirections (see Redirections) and removes +the redirection operators and their operands from the argument list. + +
  6. Executes the command (see Executing Commands). + +
  7. Optionally waits for the command to complete and collects its exit +status (see Exit Status). + +
+ +
+
+

+Next: , Previous: , Up: Shell Syntax   [Contents][Index]

+
+

3.1.2 Quoting

+ + + + + + + + + +

Quoting is used to remove the special meaning of certain +characters or words to the shell. Quoting can be used to +disable special treatment for special characters, to prevent +reserved words from being recognized as such, and to prevent +parameter expansion. +

+

Each of the shell metacharacters (see Definitions) +has special meaning to the shell and must be quoted if it is to +represent itself. +When the command history expansion facilities are being used +(see History Interaction), the +history expansion character, usually ‘!’, must be quoted +to prevent history expansion. See Bash History Facilities, for +more details concerning history expansion. +

+

There are three quoting mechanisms: the +escape character, single quotes, and double quotes. +

+
+
+

+Next: , Up: Quoting   [Contents][Index]

+
+

3.1.2.1 Escape Character

+

A non-quoted backslash ‘\’ is the Bash escape character. +It preserves the literal value of the next character that follows, +with the exception of newline. If a \newline pair +appears, and the backslash itself is not quoted, the \newline +is treated as a line continuation (that is, it is removed from +the input stream and effectively ignored). +

+
+
+

+Next: , Previous: , Up: Quoting   [Contents][Index]

+
+

3.1.2.2 Single Quotes

+ +

Enclosing characters in single quotes (‘'’) preserves the literal value +of each character within the quotes. A single quote may not occur +between single quotes, even when preceded by a backslash. +

+
+
+

+Next: , Previous: , Up: Quoting   [Contents][Index]

+
+

3.1.2.3 Double Quotes

+ +

Enclosing characters in double quotes (‘"’) preserves the literal value +of all characters within the quotes, with the exception of +‘$’, ‘`’, ‘\’, +and, when history expansion is enabled, ‘!’. +When the shell is in +POSIX mode (see Bash POSIX Mode), +the ‘!’ has no special meaning +within double quotes, even when history expansion is enabled. +The characters ‘$’ and ‘`’ +retain their special meaning within double quotes (see Shell Expansions). +The backslash retains its special meaning only when followed by one of +the following characters: +‘$’, ‘`’, ‘"’, ‘\’, or newline. +Within double quotes, backslashes that are followed by one of these +characters are removed. Backslashes preceding characters without a +special meaning are left unmodified. +A double quote may be quoted within double quotes by preceding it with +a backslash. +If enabled, history expansion will be performed unless an ‘!’ +appearing in double quotes is escaped using a backslash. +The backslash preceding the ‘!’ is not removed. +

+

The special parameters ‘*’ and ‘@’ have special meaning +when in double quotes (see Shell Parameter Expansion). +

+
+
+

+Next: , Previous: , Up: Quoting   [Contents][Index]

+
+

3.1.2.4 ANSI-C Quoting

+ + +

Words of the form $'string' are treated specially. The +word expands to string, with backslash-escaped characters replaced +as specified by the ANSI C standard. Backslash escape sequences, if +present, are decoded as follows: +

+
+
\a
+

alert (bell) +

+
\b
+

backspace +

+
\e
+
\E
+

an escape character (not ANSI C) +

+
\f
+

form feed +

+
\n
+

newline +

+
\r
+

carriage return +

+
\t
+

horizontal tab +

+
\v
+

vertical tab +

+
\\
+

backslash +

+
\'
+

single quote +

+
\"
+

double quote +

+
\?
+

question mark +

+
\nnn
+

the eight-bit character whose value is the octal value nnn +(one to three octal digits) +

+
\xHH
+

the eight-bit character whose value is the hexadecimal value HH +(one or two hex digits) +

+
\uHHHH
+

the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHH (one to four hex digits) +

+
\UHHHHHHHH
+

the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHHHHHH (one to eight hex digits) +

+
\cx
+

a control-x character +

+
+ +

The expanded result is single-quoted, as if the dollar sign had not +been present. +

+
+
+

+Previous: , Up: Quoting   [Contents][Index]

+
+

3.1.2.5 Locale-Specific Translation

+ + + + + +

A double-quoted string preceded by a dollar sign (‘$’) +will cause the string to be translated according to the current locale. +The gettext infrastructure performs the message catalog lookup and +translation, using the LC_MESSAGES and TEXTDOMAIN shell +variables, as explained below. See the gettext documentation for additional +details. +If the current locale is C or POSIX, +or if there are no translations available, +the dollar sign is ignored. +If the string is translated and replaced, the replacement is +double-quoted. +

+ + + +

Some systems use the message catalog selected by the LC_MESSAGES +shell variable. Others create the name of the message catalog from the +value of the TEXTDOMAIN shell variable, possibly adding a +suffix of ‘.mo’. If you use the TEXTDOMAIN variable, you +may need to set the TEXTDOMAINDIR variable to the location of +the message catalog files. Still others use both variables in this +fashion: +TEXTDOMAINDIR/LC_MESSAGES/LC_MESSAGES/TEXTDOMAIN.mo. +

+
+
+

+Previous: , Up: Shell Syntax   [Contents][Index]

+
+

3.1.3 Comments

+ + +

In a non-interactive shell, or an interactive shell in which the +interactive_comments option to the shopt +builtin is enabled (see The Shopt Builtin), +a word beginning with ‘#’ +causes that word and all remaining characters on that line to +be ignored. An interactive shell without the interactive_comments +option enabled does not allow comments. The interactive_comments +option is on by default in interactive shells. +See Interactive Shells, for a description of what makes +a shell interactive. +

+
+ +

3.2 Shell Commands

+ + +

A simple shell command such as echo a b c consists of the command +itself followed by arguments, separated by spaces. +

+

More complex shell commands are composed of simple commands arranged together +in a variety of ways: in a pipeline in which the output of one command +becomes the input of a second, in a loop or conditional construct, or in +some other grouping. +

+ + + + + + + + + + +
+ +

3.2.1 Reserved Words

+ + +

Reserved words are words that have special meaning to the shell. +They are used to begin and end the shell’s compound commands. +

+

The following words are recognized as reserved when unquoted and +the first word of a command (see below for exceptions): +

+ + + + + +
ifthenelifelsefitime
forinuntilwhiledodone
caseesaccoprocselectfunction
{}[[]]!
+ +

in is recognized as a reserved word if it is the third word of a +case or select command. +in and do are recognized as reserved +words if they are the third word in a for command. +

+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.2 Simple Commands

+ + +

A simple command is the kind of command encountered most often. +It’s just a sequence of words separated by blanks, terminated +by one of the shell’s control operators (see Definitions). The +first word generally specifies a command to be executed, with the +rest of the words being that command’s arguments. +

+

The return status (see Exit Status) of a simple command is +its exit status as provided +by the POSIX 1003.1 waitpid function, or 128+n if +the command was terminated by signal n. +

+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.3 Pipelines

+ + + +

A pipeline is a sequence of one or more commands separated by +one of the control operators ‘|’ or ‘|&’. +

+ + + +

The format for a pipeline is +

+
[time [-p]] [!] command1 [ | or |& command2 ] …
+
+ +

The output of each command in the pipeline is connected via a pipe +to the input of the next command. +That is, each command reads the previous command’s output. This +connection is performed before any redirections specified by the +command. +

+

If ‘|&’ is used, command1’s standard error, in addition to +its standard output, is connected to +command2’s standard input through the pipe; +it is shorthand for 2>&1 |. +This implicit redirection of the standard error to the standard output is +performed after any redirections specified by the command. +

+

The reserved word time causes timing statistics +to be printed for the pipeline once it finishes. +The statistics currently consist of elapsed (wall-clock) time and +user and system time consumed by the command’s execution. +The -p option changes the output format to that specified +by POSIX. +When the shell is in POSIX mode (see Bash POSIX Mode), +it does not recognize time as a reserved word if the next +token begins with a ‘-’. +The TIMEFORMAT variable may be set to a format string that +specifies how the timing information should be displayed. +See Bash Variables, for a description of the available formats. +The use of time as a reserved word permits the timing of +shell builtins, shell functions, and pipelines. An external +time command cannot time these easily. +

+

When the shell is in POSIX mode (see Bash POSIX Mode), time +may be followed by a newline. In this case, the shell displays the +total user and system time consumed by the shell and its children. +The TIMEFORMAT variable may be used to specify the format of +the time information. +

+

If the pipeline is not executed asynchronously (see Lists), the +shell waits for all commands in the pipeline to complete. +

+

Each command in a pipeline is executed in its own subshell, which is a +separate process (see Command Execution Environment). +If the lastpipe option is enabled using the shopt builtin +(see The Shopt Builtin), +the last element of a pipeline may be run by the shell process. +

+

The exit +status of a pipeline is the exit status of the last command in the +pipeline, unless the pipefail option is enabled +(see The Set Builtin). +If pipefail is enabled, the pipeline’s return status is the +value of the last (rightmost) command to exit with a non-zero status, +or zero if all commands exit successfully. +If the reserved word ‘!’ precedes the pipeline, the +exit status is the logical negation of the exit status as described +above. +The shell waits for all commands in the pipeline to terminate before +returning a value. +

+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.4 Lists of Commands

+ + +

A list is a sequence of one or more pipelines separated by one +of the operators ‘;’, ‘&’, ‘&&’, or ‘||’, +and optionally terminated by one of ‘;’, ‘&’, or a +newline. +

+

Of these list operators, ‘&&’ and ‘||’ +have equal precedence, followed by ‘;’ and ‘&’, +which have equal precedence. +

+

A sequence of one or more newlines may appear in a list +to delimit commands, equivalent to a semicolon. +

+

If a command is terminated by the control operator ‘&’, +the shell executes the command asynchronously in a subshell. +This is known as executing the command in the background, +and these are referred to as asynchronous commands. +The shell does not wait for the command to finish, and the return +status is 0 (true). +When job control is not active (see Job Control), +the standard input for asynchronous commands, in the absence of any +explicit redirections, is redirected from /dev/null. +

+

Commands separated by a ‘;’ are executed sequentially; the shell +waits for each command to terminate in turn. The return status is the +exit status of the last command executed. +

+

AND and OR lists are sequences of one or more pipelines +separated by the control operators ‘&&’ and ‘||’, +respectively. AND and OR lists are executed with left +associativity. +

+

An AND list has the form +

+
command1 && command2
+
+ +

command2 is executed if, and only if, command1 +returns an exit status of zero (success). +

+

An OR list has the form +

+
command1 || command2
+
+ +

command2 is executed if, and only if, command1 +returns a non-zero exit status. +

+

The return status of +AND and OR lists is the exit status of the last command +executed in the list. +

+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.5 Compound Commands

+ + + + + + + + +

Compound commands are the shell programming language constructs. +Each construct begins with a reserved word or control operator and is +terminated by a corresponding reserved word or operator. +Any redirections (see Redirections) associated with a compound command +apply to all commands within that compound command unless explicitly overridden. +

+

In most cases a list of commands in a compound command’s description may be +separated from the rest of the command by one or more newlines, and may be +followed by a newline in place of a semicolon. +

+

Bash provides looping constructs, conditional commands, and mechanisms +to group commands and execute them as a unit. +

+
+ +

3.2.5.1 Looping Constructs

+ + +

Bash supports the following looping constructs. +

+

Note that wherever a ‘;’ appears in the description of a +command’s syntax, it may be replaced with one or more newlines. +

+
+
until
+
+ + +

The syntax of the until command is: +

+
+
until test-commands; do consequent-commands; done
+
+ +

Execute consequent-commands as long as +test-commands has an exit status which is not zero. +The return status is the exit status of the last command executed +in consequent-commands, or zero if none was executed. +

+
+
while
+
+

The syntax of the while command is: +

+
+
while test-commands; do consequent-commands; done
+
+ +

Execute consequent-commands as long as +test-commands has an exit status of zero. +The return status is the exit status of the last command executed +in consequent-commands, or zero if none was executed. +

+
+
for
+
+

The syntax of the for command is: +

+
+
for name [ [in [words …] ] ; ] do commands; done
+
+ +

Expand words (see Shell Expansions), and execute commands +once for each member +in the resultant list, with name bound to the current member. +If ‘in words’ is not present, the for command +executes the commands once for each positional parameter that is +set, as if ‘in "$@"’ had been specified +(see Special Parameters). +

+

The return status is the exit status of the last command that executes. +If there are no items in the expansion of words, no commands are +executed, and the return status is zero. +

+

An alternate form of the for command is also supported: +

+
+
for (( expr1 ; expr2 ; expr3 )) ; do commands ; done
+
+ +

First, the arithmetic expression expr1 is evaluated according +to the rules described below (see Shell Arithmetic). +The arithmetic expression expr2 is then evaluated repeatedly +until it evaluates to zero. +Each time expr2 evaluates to a non-zero value, commands are +executed and the arithmetic expression expr3 is evaluated. +If any expression is omitted, it behaves as if it evaluates to 1. +The return value is the exit status of the last command in commands +that is executed, or false if any of the expressions is invalid. +

+
+ +

The break and continue builtins (see Bourne Shell Builtins) +may be used to control loop execution. +

+
+ +

3.2.5.2 Conditional Constructs

+ + +
+
if
+
+ + + + +

The syntax of the if command is: +

+
+
if test-commands; then
+  consequent-commands;
+[elif more-test-commands; then
+  more-consequents;]
+[else alternate-consequents;]
+fi
+
+ +

The test-commands list is executed, and if its return status is zero, +the consequent-commands list is executed. +If test-commands returns a non-zero status, each elif list +is executed in turn, and if its exit status is zero, +the corresponding more-consequents is executed and the +command completes. +If ‘else alternate-consequents’ is present, and +the final command in the final if or elif clause +has a non-zero exit status, then alternate-consequents is executed. +The return status is the exit status of the last command executed, or +zero if no condition tested true. +

+
+
case
+
+ + +

The syntax of the case command is: +

+
+
case word in
+    [ [(] pattern [| pattern]…) command-list ;;]…
+esac
+
+ +

case will selectively execute the command-list corresponding to +the first pattern that matches word. +The match is performed according +to the rules described below in Pattern Matching. +If the nocasematch shell option +(see the description of shopt in The Shopt Builtin) +is enabled, the match is performed without regard to the case +of alphabetic characters. +The ‘|’ is used to separate multiple patterns, and the ‘)’ +operator terminates a pattern list. +A list of patterns and an associated command-list is known +as a clause. +

+

Each clause must be terminated with ‘;;’, ‘;&’, or ‘;;&’. +The word undergoes tilde expansion, parameter expansion, command +substitution, arithmetic expansion, and quote removal +(see Shell Parameter Expansion) +before matching is +attempted. Each pattern undergoes tilde expansion, parameter +expansion, command substitution, and arithmetic expansion. +

+

There may be an arbitrary number of case clauses, each terminated +by a ‘;;’, ‘;&’, or ‘;;&’. +The first pattern that matches determines the +command-list that is executed. +It’s a common idiom to use ‘*’ as the final pattern to define the +default case, since that pattern will always match. +

+

Here is an example using case in a script that could be used to +describe one interesting feature of an animal: +

+
+
echo -n "Enter the name of an animal: "
+read ANIMAL
+echo -n "The $ANIMAL has "
+case $ANIMAL in
+  horse | dog | cat) echo -n "four";;
+  man | kangaroo ) echo -n "two";;
+  *) echo -n "an unknown number of";;
+esac
+echo " legs."
+
+ + +

If the ‘;;’ operator is used, no subsequent matches are attempted after +the first pattern match. +Using ‘;&’ in place of ‘;;’ causes execution to continue with +the command-list associated with the next clause, if any. +Using ‘;;&’ in place of ‘;;’ causes the shell to test the patterns +in the next clause, if any, and execute any associated command-list +on a successful match, +continuing the case statement execution as if the pattern list had not matched. +

+

The return status is zero if no pattern is matched. Otherwise, the +return status is the exit status of the command-list executed. +

+
+
select
+
+ +

The select construct allows the easy generation of menus. +It has almost the same syntax as the for command: +

+
+
select name [in words …]; do commands; done
+
+ +

The list of words following in is expanded, generating a list +of items. The set of expanded words is printed on the standard +error output stream, each preceded by a number. If the +‘in words’ is omitted, the positional parameters are printed, +as if ‘in "$@"’ had been specified. +The PS3 prompt is then displayed and a line is read from the +standard input. +If the line consists of a number corresponding to one of the displayed +words, then the value of name is set to that word. +If the line is empty, the words and prompt are displayed again. +If EOF is read, the select command completes. +Any other value read causes name to be set to null. +The line read is saved in the variable REPLY. +

+

The commands are executed after each selection until a +break command is executed, at which +point the select command completes. +

+

Here is an example that allows the user to pick a filename from the +current directory, and displays the name and index of the file +selected. +

+
+
select fname in *;
+do
+	echo you picked $fname \($REPLY\)
+	break;
+done
+
+ +
+
((…))
+
+
(( expression ))
+
+ +

The arithmetic expression is evaluated according to the rules +described below (see Shell Arithmetic). +If the value of the expression is non-zero, the return status is 0; +otherwise the return status is 1. This is exactly equivalent to +

+
let "expression"
+
+

See Bash Builtins, for a full description of the let builtin. +

+
+
[[…]]
+
+ +
+
[[ expression ]]
+
+ +

Return a status of 0 or 1 depending on the evaluation of +the conditional expression expression. +Expressions are composed of the primaries described below in +Bash Conditional Expressions. +Word splitting and filename expansion are not performed on the words +between the [[ and ]]; tilde expansion, parameter and +variable expansion, arithmetic expansion, command substitution, process +substitution, and quote removal are performed. +Conditional operators such as ‘-f’ must be unquoted to be recognized +as primaries. +

+

When used with [[, the ‘<’ and ‘>’ operators sort +lexicographically using the current locale. +

+

When the ‘==’ and ‘!=’ operators are used, the string to the +right of the operator is considered a pattern and matched according +to the rules described below in Pattern Matching, +as if the extglob shell option were enabled. +The ‘=’ operator is identical to ‘==’. +If the nocasematch shell option +(see the description of shopt in The Shopt Builtin) +is enabled, the match is performed without regard to the case +of alphabetic characters. +The return value is 0 if the string matches (‘==’) or does not +match (‘!=’) the pattern, and 1 otherwise. +Any part of the pattern may be quoted to force the quoted portion +to be matched as a string. +

+

An additional binary operator, ‘=~’, is available, with the same +precedence as ‘==’ and ‘!=’. +When it is used, the string to the right of the operator is considered +a POSIX extended regular expression and matched accordingly +(using the POSIX regcomp and regexec interfaces +usually described in regex(3)). +The return value is 0 if the string matches +the pattern, and 1 otherwise. +If the regular expression is syntactically incorrect, the conditional +expression’s return value is 2. +If the nocasematch shell option +(see the description of shopt in The Shopt Builtin) +is enabled, the match is performed without regard to the case +of alphabetic characters. +Any part of the pattern may be quoted to force the quoted portion +to be matched as a string. +Bracket expressions in regular expressions must be treated carefully, +since normal quoting characters lose their meanings between brackets. +If the pattern is stored in a shell variable, quoting the variable +expansion forces the entire pattern to be matched as a string. +

+

The pattern will match if it matches any part of the string. +Anchor the pattern using the ‘^’ and ‘$’ regular expression +operators to force it to match the entire string. +The array variable BASH_REMATCH records which parts of the string +matched the pattern. +The element of BASH_REMATCH with index 0 contains the portion of +the string matching the entire regular expression. +Substrings matched by parenthesized subexpressions within the regular +expression are saved in the remaining BASH_REMATCH indices. +The element of BASH_REMATCH with index n is the portion of the +string matching the nth parenthesized subexpression. +

+

For example, the following will match a line +(stored in the shell variable line) +if there is a sequence of characters anywhere in the value consisting of +any number, including zero, of +characters in the space character class, +zero or one instances of ‘a’, then a ‘b’: +

+
[[ $line =~ [[:space:]]*(a)?b ]]
+
+ +

That means values like ‘aab’ and ‘ aaaaaab’ will match, as +will a line containing a ‘b’ anywhere in its value. +

+

Storing the regular expression in a shell variable is often a useful +way to avoid problems with quoting characters that are special to the +shell. +It is sometimes difficult to specify a regular expression literally +without using quotes, or to keep track of the quoting used by regular +expressions while paying attention to the shell’s quote removal. +Using a shell variable to store the pattern decreases these problems. +For example, the following is equivalent to the above: +

+
pattern='[[:space:]]*(a)?b'
+[[ $line =~ $pattern ]]
+
+ +

If you want to match a character that’s special to the regular expression +grammar, it has to be quoted to remove its special meaning. +This means that in the pattern ‘xxx.txt’, the ‘.’ matches any +character in the string (its usual regular expression meaning), but in the +pattern ‘"xxx.txt"’ it can only match a literal ‘.’. +Shell programmers should take special care with backslashes, since backslashes +are used both by the shell and regular expressions to remove the special +meaning from the following character. +The following two sets of commands are not equivalent: +

+
pattern='\.'
+
+[[ . =~ $pattern ]]
+[[ . =~ \. ]]
+
+[[ . =~ "$pattern" ]]
+[[ . =~ '\.' ]]
+
+ +

The first two matches will succeed, but the second two will not, because +in the second two the backslash will be part of the pattern to be matched. +In the first two examples, the backslash removes the special meaning from +‘.’, so the literal ‘.’ matches. +If the string in the first examples were anything other than ‘.’, say +‘a’, the pattern would not match, because the quoted ‘.’ in the +pattern loses its special meaning of matching any single character. +

+

Expressions may be combined using the following operators, listed +in decreasing order of precedence: +

+
+
( expression )
+

Returns the value of expression. +This may be used to override the normal precedence of operators. +

+
+
! expression
+

True if expression is false. +

+
+
expression1 && expression2
+

True if both expression1 and expression2 are true. +

+
+
expression1 || expression2
+

True if either expression1 or expression2 is true. +

+
+ +

The && and || operators do not evaluate expression2 if the +value of expression1 is sufficient to determine the return +value of the entire conditional expression. +

+
+ +
+ +

3.2.5.3 Grouping Commands

+ + +

Bash provides two ways to group a list of commands to be executed +as a unit. When commands are grouped, redirections may be applied +to the entire command list. For example, the output of all the +commands in the list may be redirected to a single stream. +

+
+
()
+
+
( list )
+
+ +

Placing a list of commands between parentheses causes a subshell +environment to be created (see Command Execution Environment), and each +of the commands in list to be executed in that subshell. Since the +list is executed in a subshell, variable assignments do not remain in +effect after the subshell completes. +

+
+
{}
+
+ +
+
{ list; }
+
+ +

Placing a list of commands between curly braces causes the list to +be executed in the current shell context. No subshell is created. +The semicolon (or newline) following list is required. +

+
+ +

In addition to the creation of a subshell, there is a subtle difference +between these two constructs due to historical reasons. The braces +are reserved words, so they must be separated from the list +by blanks or other shell metacharacters. +The parentheses are operators, and are +recognized as separate tokens by the shell even if they are not separated +from the list by whitespace. +

+

The exit status of both of these constructs is the exit status of +list. +

+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.6 Coprocesses

+ + +

A coprocess is a shell command preceded by the coproc +reserved word. +A coprocess is executed asynchronously in a subshell, as if the command +had been terminated with the ‘&’ control operator, with a two-way pipe +established between the executing shell and the coprocess. +

+

The format for a coprocess is: +

+
coproc [NAME] command [redirections]
+
+ +

This creates a coprocess named NAME. +If NAME is not supplied, the default name is COPROC. +NAME must not be supplied if command is a simple +command (see Simple Commands); otherwise, it is interpreted as +the first word of the simple command. +

+

When the coprocess is executed, the shell creates an array variable +(see Arrays) +named NAME in the context of the executing shell. +The standard output of command +is connected via a pipe to a file descriptor in the executing shell, +and that file descriptor is assigned to NAME[0]. +The standard input of command +is connected via a pipe to a file descriptor in the executing shell, +and that file descriptor is assigned to NAME[1]. +This pipe is established before any redirections specified by the +command (see Redirections). +The file descriptors can be utilized as arguments to shell commands +and redirections using standard word expansions. +Other than those created to execute command and process substitutions, +the file descriptors are not available in subshells. +

+

The process ID of the shell spawned to execute the coprocess is +available as the value of the variable NAME_PID. +The wait +builtin command may be used to wait for the coprocess to terminate. +

+

Since the coprocess is created as an asynchronous command, +the coproc command always returns success. +The return status of a coprocess is the exit status of command. +

+
+
+

+Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.7 GNU Parallel

+ +

There are ways to run commands in parallel that are not built into Bash. +GNU Parallel is a tool to do just that. +

+

GNU Parallel, as its name suggests, can be used to build and run commands +in parallel. You may run the same command with different arguments, whether +they are filenames, usernames, hostnames, or lines read from files. GNU +Parallel provides shorthand references to many of the most common operations +(input lines, various portions of the input line, different ways to specify +the input source, and so on). Parallel can replace xargs or feed +commands from its input sources to several different instances of Bash. +

+

For a complete description, refer to the GNU Parallel documentation. A few +examples should provide a brief introduction to its use. +

+

For example, it is easy to replace xargs to gzip all html files in the +current directory and its subdirectories: +

+
find . -type f -name '*.html' -print | parallel gzip
+
+

If you need to protect special characters such as newlines in file names, +use find’s -print0 option and parallel’s -0 option. +

+

You can use Parallel to move files from the current directory when the +number of files is too large to process with one mv invocation: +

+
printf '%s\n' * | parallel mv {} destdir
+
+ +

As you can see, the {} is replaced with each line read from standard input. +While using ls will work in most instances, it is not sufficient to +deal with all filenames. printf is a shell builtin, and therefore is +not subject to the kernel’s limit on the number of arguments to a program, +so you can use ‘*’ (but see below about the dotglob shell option). +If you need to accommodate special characters in filenames, you can use +

+
+
printf '%s\0' * | parallel -0 mv {} destdir
+
+ +

as alluded to above. +

+

This will run as many mv commands as there are files in the current +directory. +You can emulate a parallel xargs by adding the -X option: +

+
printf '%s\0' * | parallel -0 -X mv {} destdir
+
+ +

(You may have to modify the pattern if you have the dotglob option +enabled.) +

+

GNU Parallel can replace certain common idioms that operate on lines read +from a file (in this case, filenames listed one per line): +

+
	while IFS= read -r x; do
+		do-something1 "$x" "config-$x"
+		do-something2 < "$x"
+	done < file | process-output
+
+ +

with a more compact syntax reminiscent of lambdas: +

+
cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" |
+           process-output
+
+ +

Parallel provides a built-in mechanism to remove filename extensions, which +lends itself to batch file transformations or renaming: +

+
ls *.gz | parallel -j+0 "zcat {} | bzip2 >{.}.bz2 && rm {}"
+
+

This will recompress all files in the current directory with names ending +in .gz using bzip2, running one job per CPU (-j+0) in parallel. +(We use ls for brevity here; using find as above is more +robust in the face of filenames containing unexpected characters.) +Parallel can take arguments from the command line; the above can also be +written as +

+
+
parallel "zcat {} | bzip2 >{.}.bz2 && rm {}" ::: *.gz
+
+ +

If a command generates output, you may want to preserve the input order in +the output. For instance, the following command +

+
{
+    echo foss.org.my ;
+    echo debian.org ;
+    echo freenetproject.org ;
+} | parallel traceroute
+
+

will display as output the traceroute invocation that finishes first. +Adding the -k option +

+
{
+    echo foss.org.my ;
+    echo debian.org ;
+    echo freenetproject.org ;
+} | parallel -k traceroute
+
+

will ensure that the output of traceroute foss.org.my is displayed first. +

+

Finally, Parallel can be used to run a sequence of shell commands in parallel, +similar to ‘cat file | bash’. +It is not uncommon to take a list of filenames, create a series of shell +commands to operate on them, and feed that list of commands to a shell. +Parallel can speed this up. Assuming that file contains a list of +shell commands, one per line, +

+
+
parallel -j 10 < file
+
+ +

will evaluate the commands using the shell (since no explicit command is +supplied as an argument), in blocks of ten shell jobs at a time. +

+
+ +

3.3 Shell Functions

+ + + +

Shell functions are a way to group commands for later execution +using a single name for the group. They are executed just like +a "regular" command. +When the name of a shell function is used as a simple command name, +the list of commands associated with that function name is executed. +Shell functions are executed in the current +shell context; no new process is created to interpret them. +

+

Functions are declared using this syntax: + +

+
fname () compound-command [ redirections ]
+
+ +

or +

+
+
function fname [()] compound-command [ redirections ]
+
+ +

This defines a shell function named fname. The reserved +word function is optional. +If the function reserved +word is supplied, the parentheses are optional. +The body of the function is the compound command +compound-command (see Compound Commands). +That command is usually a list enclosed between { and }, but +may be any compound command listed above, +with one exception: If the function reserved word is used, but the +parentheses are not supplied, the braces are required. +compound-command is executed whenever fname is specified as the +name of a command. +When the shell is in POSIX mode (see Bash POSIX Mode), +fname must be a valid shell name and +may not be the same as one of the special builtins +(see Special Builtins). +In default mode, a function name can be any unquoted shell word that does +not contain ‘$’. +Any redirections (see Redirections) associated with the shell function +are performed when the function is executed. +A function definition may be deleted using the -f option to the +unset builtin (see Bourne Shell Builtins). +

+

The exit status of a function definition is zero unless a syntax error +occurs or a readonly function with the same name already exists. +When executed, the exit status of a function is the exit status of the +last command executed in the body. +

+

Note that for historical reasons, in the most common usage the curly braces +that surround the body of the function must be separated from the body by +blanks or newlines. +This is because the braces are reserved words and are only recognized +as such when they are separated from the command list +by whitespace or another shell metacharacter. +Also, when using the braces, the list must be terminated by a semicolon, +a ‘&’, or a newline. +

+

When a function is executed, the arguments to the +function become the positional parameters +during its execution (see Positional Parameters). +The special parameter ‘#’ that expands to the number of +positional parameters is updated to reflect the change. +Special parameter 0 is unchanged. +The first element of the FUNCNAME variable is set to the +name of the function while the function is executing. +

+

All other aspects of the shell execution +environment are identical between a function and its caller +with these exceptions: +the DEBUG and RETURN traps +are not inherited unless the function has been given the +trace attribute using the declare builtin or +the -o functrace option has been enabled with +the set builtin, +(in which case all functions inherit the DEBUG and RETURN traps), +and the ERR trap is not inherited unless the -o errtrace +shell option has been enabled. +See Bourne Shell Builtins, for the description of the +trap builtin. +

+

The FUNCNEST variable, if set to a numeric value greater +than 0, defines a maximum function nesting level. Function +invocations that exceed the limit cause the entire command to +abort. +

+

If the builtin command return +is executed in a function, the function completes and +execution resumes with the next command after the function +call. +Any command associated with the RETURN trap is executed +before execution resumes. +When a function completes, the values of the +positional parameters and the special parameter ‘#’ +are restored to the values they had prior to the function’s +execution. If a numeric argument is given to return, +that is the function’s return status; otherwise the function’s +return status is the exit status of the last command executed +before the return. +

+

Variables local to the function may be declared with the +local builtin. These variables are visible only to +the function and the commands it invokes. This is particularly +important when a shell function calls other functions. +

+

Local variables "shadow" variables with the same name declared at +previous scopes. For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. +

+

The shell uses dynamic scoping to control a variable’s visibility +within functions. +With dynamic scoping, visible variables and their values +are a result of the sequence of function calls that caused execution +to reach the current function. +The value of a variable that a function sees depends +on its value within its caller, if any, whether that caller is +the "global" scope or another shell function. +This is also the value that a local variable +declaration "shadows", and the value that is restored when the function +returns. +

+

For example, if a variable var is declared as local in function +func1, and func1 calls another function func2, +references to var made from within func2 will resolve to the +local variable var from func1, shadowing any global variable +named var. +

+

The following script demonstrates this behavior. +When executed, the script displays +

+
+
In func2, var = func1 local
+
+ +
+
func1()
+{
+    local var='func1 local'
+    func2
+}
+
+func2()
+{
+    echo "In func2, var = $var"
+}
+
+var=global
+func1
+
+ +

The unset builtin also acts using the same dynamic scope: if a +variable is local to the current scope, unset will unset it; +otherwise the unset will refer to the variable found in any calling scope +as described above. +If a variable at the current local scope is unset, it will remain so +until it is reset in that scope or until the function returns. +Once the function returns, any instance of the variable at a previous +scope will become visible. +If the unset acts on a variable at a previous scope, any instance of a +variable with that name that had been shadowed will become visible. +

+

Function names and definitions may be listed with the +-f option to the declare (typeset) +builtin command (see Bash Builtins). +The -F option to declare or typeset +will list the function names only +(and optionally the source file and line number, if the extdebug +shell option is enabled). +Functions may be exported so that subshells +automatically have them defined with the +-f option to the export builtin +(see Bourne Shell Builtins). +

+

Functions may be recursive. +The FUNCNEST variable may be used to limit the depth of the +function call stack and restrict the number of function invocations. +By default, no limit is placed on the number of recursive calls. +

+
+ +

3.4 Shell Parameters

+ + + + + + + + + +

A parameter is an entity that stores values. +It can be a name, a number, or one of the special characters +listed below. +A variable is a parameter denoted by a name. +A variable has a value and zero or more attributes. +Attributes are assigned using the declare builtin command +(see the description of the declare builtin in Bash Builtins). +

+

A parameter is set if it has been assigned a value. The null string is +a valid value. Once a variable is set, it may be unset only by using +the unset builtin command. +

+

A variable may be assigned to by a statement of the form +

+
name=[value]
+
+

If value +is not given, the variable is assigned the null string. All +values undergo tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote +removal (detailed below). If the variable has its integer +attribute set, then value +is evaluated as an arithmetic expression even if the $((…)) +expansion is not used (see Arithmetic Expansion). +Word splitting is not performed, with the exception +of "$@" as explained below. +Filename expansion is not performed. +Assignment statements may also appear as arguments to the +alias, +declare, typeset, export, readonly, +and local builtin commands (declaration commands). +When in POSIX mode (see Bash POSIX Mode), these builtins may appear +in a command after one or more instances of the command builtin +and retain these assignment statement properties. +

+

In the context where an assignment statement is assigning a value +to a shell variable or array index (see Arrays), the ‘+=’ +operator can be used to +append to or add to the variable’s previous value. +This includes arguments to builtin commands such as declare that +accept assignment statements (declaration commands). +When ‘+=’ is applied to a variable for which the integer attribute +has been set, value is evaluated as an arithmetic expression and +added to the variable’s current value, which is also evaluated. +When ‘+=’ is applied to an array variable using compound assignment +(see Arrays), the +variable’s value is not unset (as it is when using ‘=’), and new +values are appended to the array beginning at one greater than the array’s +maximum index (for indexed arrays), or added as additional key-value pairs +in an associative array. +When applied to a string-valued variable, value is expanded and +appended to the variable’s value. +

+

A variable can be assigned the nameref attribute using the +-n option to the declare or local builtin commands +(see Bash Builtins) +to create a nameref, or a reference to another variable. +This allows variables to be manipulated indirectly. +Whenever the nameref variable is referenced, assigned to, unset, or has +its attributes modified (other than using or changing the nameref +attribute itself), the +operation is actually performed on the variable specified by the nameref +variable’s value. +A nameref is commonly used within shell functions to refer to a variable +whose name is passed as an argument to the function. +For instance, if a variable name is passed to a shell function as its first +argument, running +

+
declare -n ref=$1
+
+

inside the function creates a nameref variable ref whose value is +the variable name passed as the first argument. +References and assignments to ref, and changes to its attributes, +are treated as references, assignments, and attribute modifications +to the variable whose name was passed as $1. +

+

If the control variable in a for loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. +Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. +Namerefs can be unset using the -n option to the unset builtin +(see Bourne Shell Builtins). +Otherwise, if unset is executed with the name of a nameref variable +as an argument, the variable referenced by the nameref variable will be unset. +

+
+ +

3.4.1 Positional Parameters

+ + +

A positional parameter is a parameter denoted by one or more +digits, other than the single digit 0. Positional parameters are +assigned from the shell’s arguments when it is invoked, +and may be reassigned using the set builtin command. +Positional parameter N may be referenced as ${N}, or +as $N when N consists of a single digit. +Positional parameters may not be assigned to with assignment statements. +The set and shift builtins are used to set and +unset them (see Shell Builtin Commands). +The positional parameters are +temporarily replaced when a shell function is executed +(see Shell Functions). +

+

When a positional parameter consisting of more than a single +digit is expanded, it must be enclosed in braces. +

+
+ +

3.4.2 Special Parameters

+ + +

The shell treats several parameters specially. These parameters may +only be referenced; assignment to them is not allowed. +

+
+
* + +
+
+

($*) Expands to the positional parameters, starting from one. +When the expansion is not within double quotes, each positional parameter +expands to a separate word. +In contexts where it is performed, those words +are subject to further word splitting and filename expansion. +When the expansion occurs within double quotes, it expands to a single word +with the value of each parameter separated by the first character of the +IFS special variable. That is, "$*" is equivalent +to "$1c$2c…", where c +is the first character of the value of the IFS +variable. +If IFS is unset, the parameters are separated by spaces. +If IFS is null, the parameters are joined without intervening +separators. +

+
+
@ + +
+
+

($@) Expands to the positional parameters, starting from one. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +When the +expansion occurs within double quotes, and word splitting is performed, +each parameter expands to a +separate word. That is, "$@" is equivalent to +"$1" "$2" …. +If the double-quoted expansion occurs within a word, the expansion of +the first parameter is joined with the beginning part of the original +word, and the expansion of the last parameter is joined with the last +part of the original word. +When there are no positional parameters, "$@" and +$@ +expand to nothing (i.e., they are removed). +

+
+
# + +
+
+

($#) Expands to the number of positional parameters in decimal. +

+
+
? + +
+
+

($?) Expands to the exit status of the most recently executed foreground +pipeline. +

+
+
- + +
+
+

($-, a hyphen.) Expands to the current option flags as specified upon +invocation, by the set +builtin command, or those set by the shell itself +(such as the -i option). +

+
+
$ + +
+
+

($$) Expands to the process ID of the shell. In a () subshell, it +expands to the process ID of the invoking shell, not the subshell. +

+
+
! + +
+
+

($!) Expands to the process ID of the job most recently placed into the +background, whether executed as an asynchronous command or using +the bg builtin (see Job Control Builtins). +

+
+
0 + +
+
+

($0) Expands to the name of the shell or shell script. This is set at +shell initialization. If Bash is invoked with a file of commands +(see Shell Scripts), $0 is set to the name of that file. +If Bash is started with the -c option (see Invoking Bash), +then $0 is set to the first argument after the string to be +executed, if one is present. Otherwise, it is set +to the filename used to invoke Bash, as given by argument zero. +

+
+ +
+ +

3.5 Shell Expansions

+ + +

Expansion is performed on the command line after it has been split into +tokens. There are seven kinds of expansion performed: +

+
    +
  • brace expansion +
  • tilde expansion +
  • parameter and variable expansion +
  • command substitution +
  • arithmetic expansion +
  • word splitting +
  • filename expansion +
+ + + + + + + + + + + + + +

The order of expansions is: +brace expansion; +tilde expansion, parameter and variable expansion, arithmetic expansion, +and command substitution (done in a left-to-right fashion); +word splitting; +and filename expansion. +

+

On systems that can support it, there is an additional expansion +available: process substitution. +This is performed at the +same time as tilde, parameter, variable, and arithmetic expansion and +command substitution. +

+

After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +(quote removal). +

+

Only brace expansion, word splitting, and filename expansion +can increase the number of words of the expansion; other expansions +expand a single word to a single word. +The only exceptions to this are the expansions of +"$@" and $* (see Special Parameters), and +"${name[@]}" and ${name[*]} +(see Arrays). +

+

After all expansions, quote removal (see Quote Removal) +is performed. +

+
+ +

3.5.1 Brace Expansion

+ + + +

Brace expansion is a mechanism by which arbitrary strings may be generated. +This mechanism is similar to +filename expansion (see Filename Expansion), +but the filenames generated need not exist. +Patterns to be brace expanded take the form of an optional preamble, +followed by either a series of comma-separated strings or a sequence expression +between a pair of braces, +followed by an optional postscript. +The preamble is prefixed to each string contained within the braces, and +the postscript is then appended to each resulting string, expanding left +to right. +

+

Brace expansions may be nested. +The results of each expanded string are not sorted; left to right order +is preserved. +For example, +

+
bash$ echo a{d,c,b}e
+ade ace abe
+
+ +

A sequence expression takes the form {x..y[..incr]}, +where x and y are either integers or single characters, +and incr, an optional increment, is an integer. +When integers are supplied, the expression expands to each number between +x and y, inclusive. +Supplied integers may be prefixed with ‘0’ to force each term to have the +same width. +When either x or y begins with a zero, the shell +attempts to force all generated terms to contain the same number of digits, +zero-padding where necessary. +When characters are supplied, the expression expands to each character +lexicographically between x and y, inclusive, +using the default C locale. +Note that both x and y must be of the same type. +When the increment is supplied, it is used as the difference between +each term. The default increment is 1 or -1 as appropriate. +

+

Brace expansion is performed before any other expansions, +and any characters special to other expansions are preserved +in the result. It is strictly textual. Bash +does not apply any syntactic interpretation to the context of the +expansion or the text between the braces. +

+

A correctly-formed brace expansion must contain unquoted opening +and closing braces, and at least one unquoted comma or a valid +sequence expression. +Any incorrectly formed brace expansion is left unchanged. +

+

A { or ‘,’ may be quoted with a backslash to prevent its +being considered part of a brace expression. +To avoid conflicts with parameter expansion, the string ‘${’ +is not considered eligible for brace expansion, +and inhibits brace expansion until the closing ‘}’. +

+

This construct is typically used as shorthand when the common +prefix of the strings to be generated is longer than in the +above example: +

+
mkdir /usr/local/src/bash/{old,new,dist,bugs}
+
+

or +

+
chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
+
+ +
+ +

3.5.2 Tilde Expansion

+ + + +

If a word begins with an unquoted tilde character (‘~’), all of the +characters up to the first unquoted slash (or all characters, +if there is no unquoted slash) are considered a tilde-prefix. +If none of the characters in the tilde-prefix are quoted, the +characters in the tilde-prefix following the tilde are treated as a +possible login name. +If this login name is the null string, the tilde is replaced with the +value of the HOME shell variable. +If HOME is unset, the home directory of the user executing the +shell is substituted instead. +Otherwise, the tilde-prefix is replaced with the home directory +associated with the specified login name. +

+

If the tilde-prefix is ‘~+’, the value of +the shell variable PWD replaces the tilde-prefix. +If the tilde-prefix is ‘~-’, the value of the shell variable +OLDPWD, if it is set, is substituted. +

+

If the characters following the tilde in the tilde-prefix consist of a +number N, optionally prefixed by a ‘+’ or a ‘-’, +the tilde-prefix is replaced with the +corresponding element from the directory stack, as it would be displayed +by the dirs builtin invoked with the characters following tilde +in the tilde-prefix as an argument (see The Directory Stack). +If the tilde-prefix, sans the tilde, consists of a number without a +leading ‘+’ or ‘-’, ‘+’ is assumed. +

+

If the login name is invalid, or the tilde expansion fails, the word is +left unchanged. +

+

Each variable assignment is checked for unquoted tilde-prefixes immediately +following a ‘:’ or the first ‘=’. +In these cases, tilde expansion is also performed. +Consequently, one may use filenames with tildes in assignments to +PATH, MAILPATH, and CDPATH, +and the shell assigns the expanded value. +

+

The following table shows how Bash treats unquoted tilde-prefixes: +

+
+
~
+

The value of $HOME +

+
~/foo
+

$HOME/foo +

+
+
~fred/foo
+

The subdirectory foo of the home directory of the user +fred +

+
+
~+/foo
+

$PWD/foo +

+
+
~-/foo
+

${OLDPWD-'~-'}/foo +

+
+
~N
+

The string that would be displayed by ‘dirs +N’ +

+
+
~+N
+

The string that would be displayed by ‘dirs +N’ +

+
+
~-N
+

The string that would be displayed by ‘dirs -N’ +

+
+ +

Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (see Shell Parameters) +when they appear as arguments to simple commands. +Bash does not do this, except for the declaration commands listed +above, when in POSIX mode. +

+
+ +

3.5.3 Shell Parameter Expansion

+ + + +

The ‘$’ character introduces parameter expansion, +command substitution, or arithmetic expansion. The parameter name +or symbol to be expanded may be enclosed in braces, which +are optional but serve to protect the variable to be expanded from +characters immediately following it which could be +interpreted as part of the name. +

+

When braces are used, the matching ending brace is the first ‘}’ +not escaped by a backslash or within a quoted string, and not within an +embedded arithmetic expansion, command substitution, or parameter +expansion. +

+

The basic form of parameter expansion is ${parameter}. +The value of parameter is substituted. +The parameter is a shell parameter as described above +(see Shell Parameters) or an array reference (see Arrays). +The braces are required when parameter +is a positional parameter with more than one digit, +or when parameter is followed by a character that is not to be +interpreted as part of its name. +

+

If the first character of parameter is an exclamation point (!), +and parameter is not a nameref, +it introduces a level of indirection. +Bash uses the value formed by expanding the rest of +parameter as the new parameter; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original parameter. +This is known as indirect expansion. +The value is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +If parameter is a nameref, this expands to the name of the +variable referenced by parameter instead of performing the +complete indirect expansion. +The exceptions to this are the expansions of ${!prefix*} +and ${!name[@]} +described below. +The exclamation point must immediately follow the left brace in order to +introduce indirection. +

+

In each of the cases below, word is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +

+

When not performing substring expansion, using the form described +below (e.g., ‘:-’), Bash tests for a parameter that is unset or null. +Omitting the colon results in a test only for a parameter that is unset. +Put another way, if the colon is included, +the operator tests for both parameter’s existence and that its value +is not null; if the colon is omitted, the operator tests only for existence. +

+
+
${parameter:-word}
+

If parameter is unset or null, the expansion of +word is substituted. Otherwise, the value of +parameter is substituted. +

+
+
${parameter:=word}
+

If parameter +is unset or null, the expansion of word +is assigned to parameter. +The value of parameter is then substituted. +Positional parameters and special parameters may not be assigned to +in this way. +

+
+
${parameter:?word}
+

If parameter +is null or unset, the expansion of word (or a message +to that effect if word +is not present) is written to the standard error and the shell, if it +is not interactive, exits. Otherwise, the value of parameter is +substituted. +

+
+
${parameter:+word}
+

If parameter +is null or unset, nothing is substituted, otherwise the expansion of +word is substituted. +

+
+
${parameter:offset}
+
${parameter:offset:length}
+

This is referred to as Substring Expansion. +It expands to up to length characters of the value of parameter +starting at the character specified by offset. +If parameter is ‘@’, an indexed array subscripted by +‘@’ or ‘*’, or an associative array name, the results differ as +described below. +If length is omitted, it expands to the substring of the value of +parameter starting at the character specified by offset +and extending to the end of the value. +length and offset are arithmetic expressions +(see Shell Arithmetic). +

+

If offset evaluates to a number less than zero, the value +is used as an offset in characters +from the end of the value of parameter. +If length evaluates to a number less than zero, +it is interpreted as an offset in characters +from the end of the value of parameter rather than +a number of characters, and the expansion is the characters between +offset and that result. +Note that a negative offset must be separated from the colon by at least +one space to avoid being confused with the ‘:-’ expansion. +

+

Here are some examples illustrating substring expansion on parameters and +subscripted arrays: +

+
$ string=01234567890abcdefgh
+$ echo ${string:7}
+7890abcdefgh
+$ echo ${string:7:0}
+
+$ echo ${string:7:2}
+78
+$ echo ${string:7:-2}
+7890abcdef
+$ echo ${string: -7}
+bcdefgh
+$ echo ${string: -7:0}
+
+$ echo ${string: -7:2}
+bc
+$ echo ${string: -7:-2}
+bcdef
+$ set -- 01234567890abcdefgh
+$ echo ${1:7}
+7890abcdefgh
+$ echo ${1:7:0}
+
+$ echo ${1:7:2}
+78
+$ echo ${1:7:-2}
+7890abcdef
+$ echo ${1: -7}
+bcdefgh
+$ echo ${1: -7:0}
+
+$ echo ${1: -7:2}
+bc
+$ echo ${1: -7:-2}
+bcdef
+$ array[0]=01234567890abcdefgh
+$ echo ${array[0]:7}
+7890abcdefgh
+$ echo ${array[0]:7:0}
+
+$ echo ${array[0]:7:2}
+78
+$ echo ${array[0]:7:-2}
+7890abcdef
+$ echo ${array[0]: -7}
+bcdefgh
+$ echo ${array[0]: -7:0}
+
+$ echo ${array[0]: -7:2}
+bc
+$ echo ${array[0]: -7:-2}
+bcdef
+
+

If parameter is ‘@’, the result is length positional +parameters beginning at offset. +A negative offset is taken relative to one greater than the greatest +positional parameter, so an offset of -1 evaluates to the last positional +parameter. +It is an expansion error if length evaluates to a number less than zero. +

+

The following examples illustrate substring expansion using positional +parameters: +

+
$ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
+$ echo ${@:7}
+7 8 9 0 a b c d e f g h
+$ echo ${@:7:0}
+
+$ echo ${@:7:2}
+7 8
+$ echo ${@:7:-2}
+bash: -2: substring expression < 0
+$ echo ${@: -7:2}
+b c
+$ echo ${@:0}
+./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
+$ echo ${@:0:2}
+./bash 1
+$ echo ${@: -7:0}
+
+
+

If parameter is an indexed array name subscripted +by ‘@’ or ‘*’, the result is the length +members of the array beginning with ${parameter[offset]}. +A negative offset is taken relative to one greater than the maximum +index of the specified array. +It is an expansion error if length evaluates to a number less than zero. +

+

These examples show how you can use substring expansion with indexed +arrays: +

+
$ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h)
+$ echo ${array[@]:7}
+7 8 9 0 a b c d e f g h
+$ echo ${array[@]:7:2}
+7 8
+$ echo ${array[@]: -7:2}
+b c
+$ echo ${array[@]: -7:-2}
+bash: -2: substring expression < 0
+$ echo ${array[@]:0}
+0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
+$ echo ${array[@]:0:2}
+0 1
+$ echo ${array[@]: -7:0}
+
+
+

Substring expansion applied to an associative array produces undefined +results. +

+

Substring indexing is zero-based unless the positional parameters +are used, in which case the indexing starts at 1 by default. +If offset is 0, and the positional parameters are used, $0 is +prefixed to the list. +

+
+
${!prefix*}
+
${!prefix@}
+

Expands to the names of variables whose names begin with prefix, +separated by the first character of the IFS special variable. +When ‘@’ is used and the expansion appears within double quotes, each +variable name expands to a separate word. +

+
+
${!name[@]}
+
${!name[*]}
+

If name is an array variable, expands to the list of array indices +(keys) assigned in name. +If name is not an array, expands to 0 if name is set and null +otherwise. +When ‘@’ is used and the expansion appears within double quotes, each +key expands to a separate word. +

+
+
${#parameter}
+

The length in characters of the expanded value of parameter is +substituted. +If parameter is ‘*’ or ‘@’, the value substituted +is the number of positional parameters. +If parameter is an array name subscripted by ‘*’ or ‘@’, +the value substituted is the number of elements in the array. +If parameter +is an indexed array name subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +parameter, so negative indices count back from the end of the +array, and an index of -1 references the last element. +

+
+
${parameter#word}
+
${parameter##word}
+

The word +is expanded to produce a pattern and matched according to the rules +described below (see Pattern Matching). If the pattern matches +the beginning of the expanded value of parameter, +then the result of the expansion is the expanded value of parameter +with the shortest matching pattern (the ‘#’ case) or the +longest matching pattern (the ‘##’ case) deleted. +If parameter is ‘@’ or ‘*’, +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If parameter is an array variable subscripted with +‘@’ or ‘*’, +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. +

+
+
${parameter%word}
+
${parameter%%word}
+

The word +is expanded to produce a pattern and matched according to the rules +described below (see Pattern Matching). +If the pattern matches a trailing portion of the expanded value of +parameter, then the result of the expansion is the value of +parameter with the shortest matching pattern (the ‘%’ case) +or the longest matching pattern (the ‘%%’ case) deleted. +If parameter is ‘@’ or ‘*’, +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If parameter +is an array variable subscripted with ‘@’ or ‘*’, +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. +

+
+
${parameter/pattern/string}
+
+

The pattern is expanded to produce a pattern just as in +filename expansion. +Parameter is expanded and the longest match of pattern +against its value is replaced with string. +The match is performed according to the rules described below +(see Pattern Matching). +If pattern begins with ‘/’, all matches of pattern are +replaced with string. Normally only the first match is replaced. +If pattern begins with ‘#’, it must match at the beginning +of the expanded value of parameter. +If pattern begins with ‘%’, it must match at the end +of the expanded value of parameter. +If string is null, matches of pattern are deleted +and the / following pattern may be omitted. +If the nocasematch shell option +(see the description of shopt in The Shopt Builtin) +is enabled, the match is performed without regard to the case +of alphabetic characters. +If parameter is ‘@’ or ‘*’, +the substitution operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If parameter +is an array variable subscripted with ‘@’ or ‘*’, +the substitution operation is applied to each member of the +array in turn, and the expansion is the resultant list. +

+
+
${parameter^pattern}
+
${parameter^^pattern}
+
${parameter,pattern}
+
${parameter,,pattern}
+

This expansion modifies the case of alphabetic characters in parameter. +The pattern is expanded to produce a pattern just as in +filename expansion. +Each character in the expanded value of parameter is tested against +pattern, and, if it matches the pattern, its case is converted. +The pattern should not attempt to match more than one character. +The ‘^’ operator converts lowercase letters matching pattern +to uppercase; the ‘,’ operator converts matching uppercase letters +to lowercase. +The ‘^^’ and ‘,,’ expansions convert each matched character in the +expanded value; the ‘^’ and ‘,’ expansions match and convert only +the first character in the expanded value. +If pattern is omitted, it is treated like a ‘?’, which matches +every character. +If parameter is ‘@’ or ‘*’, +the case modification operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If parameter +is an array variable subscripted with ‘@’ or ‘*’, +the case modification operation is applied to each member of the +array in turn, and the expansion is the resultant list. +

+
+
${parameter@operator}
+

The expansion is either a transformation of the value of parameter +or information about parameter itself, depending on the value of +operator. Each operator is a single letter: +

+
+
U
+

The expansion is a string that is the value of parameter with lowercase +alphabetic characters converted to uppercase. +

+
u
+

The expansion is a string that is the value of parameter with the first +character converted to uppercase, if it is alphabetic. +

+
L
+

The expansion is a string that is the value of parameter with uppercase +alphabetic characters converted to lowercase. +

+
Q
+

The expansion is a string that is the value of parameter quoted in a +format that can be reused as input. +

+
E
+

The expansion is a string that is the value of parameter with backslash +escape sequences expanded as with the $'…' quoting mechanism. +

+
P
+

The expansion is a string that is the result of expanding the value of +parameter as if it were a prompt string (see Controlling the Prompt). +

+
A
+

The expansion is a string in the form of +an assignment statement or declare command that, if +evaluated, will recreate parameter with its attributes and value. +

+
K
+

Produces a possibly-quoted version of the value of parameter, +except that it prints the values of +indexed and associative arrays as a sequence of quoted key-value pairs +(see Arrays). +

+
a
+

The expansion is a string consisting of flag values representing +parameter’s attributes. +

+
+ +

If parameter is ‘@’ or ‘*’, +the operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If parameter +is an array variable subscripted with ‘@’ or ‘*’, +the operation is applied to each member of the +array in turn, and the expansion is the resultant list. +

+

The result of the expansion is subject to word splitting and filename +expansion as described below. +

+
+ +
+ +

3.5.4 Command Substitution

+ + +

Command substitution allows the output of a command to replace +the command itself. +Command substitution occurs when a command is enclosed as follows: +

+
$(command)
+
+

or +

+
`command`
+
+ +

Bash performs the expansion by executing command in a subshell environment +and replacing the command substitution with the standard output of the +command, with any trailing newlines deleted. +Embedded newlines are not deleted, but they may be removed during +word splitting. +The command substitution $(cat file) can be +replaced by the equivalent but faster $(< file). +

+

When the old-style backquote form of substitution is used, +backslash retains its literal meaning except when followed by +‘$’, ‘`’, or ‘\’. +The first backquote not preceded by a backslash terminates the +command substitution. +When using the $(command) form, all characters between +the parentheses make up the command; none are treated specially. +

+

Command substitutions may be nested. To nest when using the backquoted +form, escape the inner backquotes with backslashes. +

+

If the substitution appears within double quotes, word splitting and +filename expansion are not performed on the results. +

+
+ +

3.5.5 Arithmetic Expansion

+ + + +

Arithmetic expansion allows the evaluation of an arithmetic expression +and the substitution of the result. The format for arithmetic expansion is: +

+
+
$(( expression ))
+
+ +

The expression is treated as if it were within double quotes, but +a double quote inside the parentheses is not treated specially. +All tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. +The result is treated as the arithmetic expression to be evaluated. +Arithmetic expansions may be nested. +

+

The evaluation is performed according to the rules listed below +(see Shell Arithmetic). +If the expression is invalid, Bash prints a message indicating +failure to the standard error and no substitution occurs. +

+
+ +

3.5.6 Process Substitution

+ + +

Process substitution allows a process’s input or output to be +referred to using a filename. +It takes the form of +

+
<(list)
+
+

or +

+
>(list)
+
+

The process list is run asynchronously, and its input or output +appears as a filename. +This filename is +passed as an argument to the current command as the result of the +expansion. +If the >(list) form is used, writing to +the file will provide input for list. If the +<(list) form is used, the file passed as an +argument should be read to obtain the output of list. +Note that no space may appear between the < or > +and the left parenthesis, otherwise the construct would be interpreted +as a redirection. +Process substitution is supported on systems that support named +pipes (FIFOs) or the /dev/fd method of naming open files. +

+

When available, process substitution is performed simultaneously with +parameter and variable expansion, command substitution, and arithmetic +expansion. +

+
+ +

3.5.7 Word Splitting

+ + +

The shell scans the results of parameter expansion, command substitution, +and arithmetic expansion that did not occur within double quotes for +word splitting. +

+

The shell treats each character of $IFS as a delimiter, and splits +the results of the other expansions into words using these characters +as field terminators. +If IFS is unset, or its value is exactly <space><tab><newline>, +the default, then sequences of + <space>, <tab>, and <newline> +at the beginning and end of the results of the previous +expansions are ignored, and any sequence of IFS +characters not at the beginning or end serves to delimit words. +If IFS has a value other than the default, then sequences of +the whitespace characters space, tab, and newline +are ignored at the beginning and end of the +word, as long as the whitespace character is in the +value of IFS (an IFS whitespace character). +Any character in IFS that is not IFS +whitespace, along with any adjacent IFS +whitespace characters, delimits a field. A sequence of IFS +whitespace characters is also treated as a delimiter. +If the value of IFS is null, no word splitting occurs. +

+

Explicit null arguments ("" or '') are retained +and passed to commands as empty strings. +Unquoted implicit null arguments, resulting from the expansion of +parameters that have no values, are removed. +If a parameter with no value is expanded within double quotes, a +null argument results and is retained +and passed to a command as an empty string. +When a quoted null argument appears as part of a word whose expansion is +non-null, the null argument is removed. +That is, the word +-d'' becomes -d after word splitting and +null argument removal. +

+

Note that if no expansion occurs, no splitting +is performed. +

+
+
+

+Next: , Previous: , Up: Shell Expansions   [Contents][Index]

+
+

3.5.8 Filename Expansion

+ + + + + + + + +

After word splitting, unless the -f option has been set +(see The Set Builtin), Bash scans each word for the characters +‘*’, ‘?’, and ‘[’. +If one of these characters appears, and is not quoted, then the word is +regarded as a pattern, +and replaced with an alphabetically sorted list of +filenames matching the pattern (see Pattern Matching). +If no matching filenames are found, +and the shell option nullglob is disabled, the word is left +unchanged. +If the nullglob option is set, and no matches are found, the word +is removed. +If the failglob shell option is set, and no matches are found, +an error message is printed and the command is not executed. +If the shell option nocaseglob is enabled, the match is performed +without regard to the case of alphabetic characters. +

+

When a pattern is used for filename expansion, the character ‘.’ +at the start of a filename or immediately following a slash +must be matched explicitly, unless the shell option dotglob is set. +The filenames ‘.’ and ‘..’ must always be matched explicitly, +even if dotglob is set. +In other cases, the ‘.’ character is not treated specially. +

+

When matching a filename, the slash character must always be +matched explicitly by a slash in the pattern, but in other matching +contexts it can be matched by a special pattern character as described +below (see Pattern Matching). +

+

See the description of shopt in The Shopt Builtin, +for a description of the nocaseglob, nullglob, +failglob, and dotglob options. +

+

The GLOBIGNORE +shell variable may be used to restrict the set of file names matching a +pattern. If GLOBIGNORE +is set, each matching file name that also matches one of the patterns in +GLOBIGNORE is removed from the list of matches. +If the nocaseglob option is set, the matching against the patterns in +GLOBIGNORE is performed without regard to case. +The filenames +. and .. +are always ignored when GLOBIGNORE +is set and not null. +However, setting GLOBIGNORE to a non-null value has the effect of +enabling the dotglob +shell option, so all other filenames beginning with a +‘.’ will match. +To get the old behavior of ignoring filenames beginning with a +‘.’, make ‘.*’ one of the patterns in GLOBIGNORE. +The dotglob option is disabled when GLOBIGNORE +is unset. +

+
+ +

3.5.8.1 Pattern Matching

+ + + +

Any character that appears in a pattern, other than the special pattern +characters described below, matches itself. +The NUL character may not occur in a pattern. +A backslash escapes the following character; the +escaping backslash is discarded when matching. +The special pattern characters must be quoted if they are to be matched +literally. +

+

The special pattern characters have the following meanings: +

+
*
+

Matches any string, including the null string. +When the globstar shell option is enabled, and ‘*’ is used in +a filename expansion context, two adjacent ‘*’s used as a single +pattern will match all files and zero or more directories and +subdirectories. +If followed by a ‘/’, two adjacent ‘*’s will match only +directories and subdirectories. +

+
?
+

Matches any single character. +

+
[…]
+

Matches any one of the enclosed characters. A pair of characters +separated by a hyphen denotes a range expression; +any character that falls between those two characters, inclusive, +using the current locale’s collating sequence and character set, +is matched. If the first character following the +‘[’ is a ‘!’ or a ‘^’ +then any character not enclosed is matched. A ‘-’ +may be matched by including it as the first or last character +in the set. A ‘]’ may be matched by including it as the first +character in the set. +The sorting order of characters in range expressions is determined by +the current locale and the values of the +LC_COLLATE and LC_ALL shell variables, if set. +

+

For example, in the default C locale, ‘[a-dx-z]’ is equivalent to +‘[abcdxyz]’. Many locales sort characters in dictionary order, and in +these locales ‘[a-dx-z]’ is typically not equivalent to ‘[abcdxyz]’; +it might be equivalent to ‘[aBbCcDdxXyYz]’, for example. To obtain +the traditional interpretation of ranges in bracket expressions, you can +force the use of the C locale by setting the LC_COLLATE or +LC_ALL environment variable to the value ‘C’, or enable the +globasciiranges shell option. +

+

Within ‘[’ and ‘]’, character classes can be specified +using the syntax +[:class:], where class is one of the +following classes defined in the POSIX standard: +

+
alnum   alpha   ascii   blank   cntrl   digit   graph   lower
+print   punct   space   upper   word    xdigit
+
+

A character class matches any character belonging to that class. +The word character class matches letters, digits, and the character +‘_’. +

+

Within ‘[’ and ‘]’, an equivalence class can be +specified using the syntax [=c=], which +matches all characters with the same collation weight (as defined +by the current locale) as the character c. +

+

Within ‘[’ and ‘]’, the syntax [.symbol.] +matches the collating symbol symbol. +

+
+ +

If the extglob shell option is enabled using the shopt +builtin, several extended pattern matching operators are recognized. +In the following description, a pattern-list is a list of one +or more patterns separated by a ‘|’. +Composite patterns may be formed using one or more of the following +sub-patterns: +

+
+
?(pattern-list)
+

Matches zero or one occurrence of the given patterns. +

+
+
*(pattern-list)
+

Matches zero or more occurrences of the given patterns. +

+
+
+(pattern-list)
+

Matches one or more occurrences of the given patterns. +

+
+
@(pattern-list)
+

Matches one of the given patterns. +

+
+
!(pattern-list)
+

Matches anything except one of the given patterns. +

+
+ +

Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. +Using separate matches against shorter strings, or using arrays of +strings instead of a single long string, may be faster. +

+
+ +

3.5.9 Quote Removal

+ +

After the preceding expansions, all unquoted occurrences of the +characters ‘\’, ‘'’, and ‘"’ that did not +result from one of the above expansions are removed. +

+
+ +

3.6 Redirections

+ + +

Before a command is executed, its input and output +may be redirected +using a special notation interpreted by the shell. +Redirection allows commands’ file handles to be +duplicated, opened, closed, +made to refer to different files, +and can change the files the command reads from and writes to. +Redirection may also be used to modify file handles in the +current shell execution environment. The following redirection +operators may precede or appear anywhere within a +simple command or may follow a command. +Redirections are processed in the order they appear, from +left to right. +

+

Each redirection that may be preceded by a file descriptor number +may instead be preceded by a word of the form {varname}. +In this case, for each redirection operator except +>&- and <&-, the shell will allocate a file descriptor greater +than 10 and assign it to {varname}. If >&- or <&- is preceded +by {varname}, the value of varname defines the file +descriptor to close. +If {varname} is supplied, the redirection persists beyond +the scope of the command, allowing the shell programmer to manage +the file descriptor’s lifetime manually. +

+

In the following descriptions, if the file descriptor number is +omitted, and the first character of the redirection operator is +‘<’, the redirection refers to the standard input (file +descriptor 0). If the first character of the redirection operator +is ‘>’, the redirection refers to the standard output (file +descriptor 1). +

+

The word following the redirection operator in the following +descriptions, unless otherwise noted, is subjected to brace expansion, +tilde expansion, parameter expansion, command substitution, arithmetic +expansion, quote removal, filename expansion, and word splitting. +If it expands to more than one word, Bash reports an error. +

+

Note that the order of redirections is significant. For example, +the command +

+
ls > dirlist 2>&1
+
+

directs both standard output (file descriptor 1) and standard error +(file descriptor 2) to the file dirlist, while the command +

+
ls 2>&1 > dirlist
+
+

directs only the standard output to file dirlist, +because the standard error was made a copy of the standard output +before the standard output was redirected to dirlist. +

+

Bash handles several filenames specially when they are used in +redirections, as described in the following table. +If the operating system on which Bash is running provides these +special files, bash will use them; otherwise it will emulate them +internally with the behavior described below. +

+
+
/dev/fd/fd
+

If fd is a valid integer, file descriptor fd is duplicated. +

+
+
/dev/stdin
+

File descriptor 0 is duplicated. +

+
+
/dev/stdout
+

File descriptor 1 is duplicated. +

+
+
/dev/stderr
+

File descriptor 2 is duplicated. +

+
+
/dev/tcp/host/port
+

If host is a valid hostname or Internet address, and port +is an integer port number or service name, Bash attempts to open +the corresponding TCP socket. +

+
+
/dev/udp/host/port
+

If host is a valid hostname or Internet address, and port +is an integer port number or service name, Bash attempts to open +the corresponding UDP socket. +

+
+ +

A failure to open or create a file causes the redirection to fail. +

+

Redirections using file descriptors greater than 9 should be used with +care, as they may conflict with file descriptors the shell uses +internally. +

+

3.6.1 Redirecting Input

+

Redirection of input causes the file whose name results from +the expansion of word +to be opened for reading on file descriptor n, +or the standard input (file descriptor 0) if n +is not specified. +

+

The general format for redirecting input is: +

+
[n]<word
+
+ +

3.6.2 Redirecting Output

+

Redirection of output causes the file whose name results from +the expansion of word +to be opened for writing on file descriptor n, +or the standard output (file descriptor 1) if n +is not specified. If the file does not exist it is created; +if it does exist it is truncated to zero size. +

+

The general format for redirecting output is: +

+
[n]>[|]word
+
+ +

If the redirection operator is ‘>’, and the noclobber +option to the set builtin has been enabled, the redirection +will fail if the file whose name results from the expansion of +word exists and is a regular file. +If the redirection operator is ‘>|’, or the redirection operator is +‘>’ and the noclobber option is not enabled, the redirection +is attempted even if the file named by word exists. +

+

3.6.3 Appending Redirected Output

+

Redirection of output in this fashion +causes the file whose name results from +the expansion of word +to be opened for appending on file descriptor n, +or the standard output (file descriptor 1) if n +is not specified. If the file does not exist it is created. +

+

The general format for appending output is: +

+
[n]>>word
+
+ +

3.6.4 Redirecting Standard Output and Standard Error

+

This construct allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be redirected to the file whose name is the +expansion of word. +

+

There are two formats for redirecting standard output and +standard error: +

+
&>word
+
+

and +

+
>&word
+
+

Of the two forms, the first is preferred. +This is semantically equivalent to +

+
>word 2>&1
+
+

When using the second form, word may not expand to a number or +‘-’. If it does, other redirection operators apply +(see Duplicating File Descriptors below) for compatibility reasons. +

+

3.6.5 Appending Standard Output and Standard Error

+

This construct allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be appended to the file whose name is the +expansion of word. +

+

The format for appending standard output and standard error is: +

+
&>>word
+
+

This is semantically equivalent to +

+
>>word 2>&1
+
+

(see Duplicating File Descriptors below). +

+

3.6.6 Here Documents

+

This type of redirection instructs the shell to read input from the +current source until a line containing only word +(with no trailing blanks) is seen. All of +the lines read up to that point are then used as the standard +input (or file descriptor n if n is specified) for a command. +

+

The format of here-documents is: +

+
[n]<<[-]word
+        here-document
+delimiter
+
+ +

No parameter and variable expansion, command substitution, +arithmetic expansion, or filename expansion is performed on +word. If any part of word is quoted, the +delimiter is the result of quote removal on word, +and the lines in the here-document are not expanded. +If word is unquoted, +all lines of the here-document are subjected to +parameter expansion, command substitution, and arithmetic expansion, +the character sequence \newline is ignored, and ‘\’ +must be used to quote the characters +‘\’, ‘$’, and ‘`’. +

+

If the redirection operator is ‘<<-’, +then all leading tab characters are stripped from input lines and the +line containing delimiter. +This allows here-documents within shell scripts to be indented in a +natural fashion. +

+

3.6.7 Here Strings

+

A variant of here documents, the format is: +

+
[n]<<< word
+
+ +

The word undergoes +tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. +Filename expansion and word splitting are not performed. +The result is supplied as a single string, +with a newline appended, +to the command on its +standard input (or file descriptor n if n is specified). +

+

3.6.8 Duplicating File Descriptors

+

The redirection operator +

+
[n]<&word
+
+

is used to duplicate input file descriptors. +If word +expands to one or more digits, the file descriptor denoted by n +is made to be a copy of that file descriptor. +If the digits in word do not specify a file descriptor open for +input, a redirection error occurs. +If word +evaluates to ‘-’, file descriptor n is closed. +If n is not specified, the standard input (file descriptor 0) is used. +

+

The operator +

+
[n]>&word
+
+

is used similarly to duplicate output file descriptors. If +n is not specified, the standard output (file descriptor 1) is used. +If the digits in word do not specify a file descriptor open for +output, a redirection error occurs. +If word +evaluates to ‘-’, file descriptor n is closed. +As a special case, if n is omitted, and word does not +expand to one or more digits or ‘-’, the standard output and standard +error are redirected as described previously. +

+

3.6.9 Moving File Descriptors

+

The redirection operator +

+
[n]<&digit-
+
+

moves the file descriptor digit to file descriptor n, +or the standard input (file descriptor 0) if n is not specified. +digit is closed after being duplicated to n. +

+

Similarly, the redirection operator +

+
[n]>&digit-
+
+

moves the file descriptor digit to file descriptor n, +or the standard output (file descriptor 1) if n is not specified. +

+

3.6.10 Opening File Descriptors for Reading and Writing

+

The redirection operator +

+
[n]<>word
+
+

causes the file whose name is the expansion of word +to be opened for both reading and writing on file descriptor +n, or on file descriptor 0 if n +is not specified. If the file does not exist, it is created. +

+
+ +

3.7 Executing Commands

+ + + + + + + + + + +
+ +

3.7.1 Simple Command Expansion

+ + +

When a simple command is executed, the shell performs the following +expansions, assignments, and redirections, from left to right, in +the following order. +

+
    +
  1. The words that the parser has marked as variable assignments (those +preceding the command name) and redirections are saved for later +processing. + +
  2. The words that are not variable assignments or redirections are +expanded (see Shell Expansions). +If any words remain after expansion, the first word +is taken to be the name of the command and the remaining words are +the arguments. + +
  3. Redirections are performed as described above (see Redirections). + +
  4. The text after the ‘=’ in each variable assignment undergoes tilde +expansion, parameter expansion, command substitution, arithmetic expansion, +and quote removal before being assigned to the variable. +
+ +

If no command name results, the variable assignments affect the current +shell environment. Otherwise, the variables are added to the environment +of the executed command and do not affect the current shell environment. +If any of the assignments attempts to assign a value to a readonly variable, +an error occurs, and the command exits with a non-zero status. +

+

If no command name results, redirections are performed, but do not +affect the current shell environment. A redirection error causes the +command to exit with a non-zero status. +

+

If there is a command name left after expansion, execution proceeds as +described below. Otherwise, the command exits. If one of the expansions +contained a command substitution, the exit status of the command is +the exit status of the last command substitution performed. If there +were no command substitutions, the command exits with a status of zero. +

+
+ +

3.7.2 Command Search and Execution

+ + + +

After a command has been split into words, if it results in a +simple command and an optional list of arguments, the following +actions are taken. +

+
    +
  1. If the command name contains no slashes, the shell attempts to +locate it. If there exists a shell function by that name, that +function is invoked as described in Shell Functions. + +
  2. If the name does not match a function, the shell searches for +it in the list of shell builtins. If a match is found, that +builtin is invoked. + +
  3. If the name is neither a shell function nor a builtin, +and contains no slashes, Bash searches each element of +$PATH for a directory containing an executable file +by that name. Bash uses a hash table to remember the full +pathnames of executable files to avoid multiple PATH searches +(see the description of hash in Bourne Shell Builtins). +A full search of the directories in $PATH +is performed only if the command is not found in the hash table. +If the search is unsuccessful, the shell searches for a defined shell +function named command_not_found_handle. +If that function exists, it is invoked in a separate execution environment +with the original command and +the original command’s arguments as its arguments, and the function’s +exit status becomes the exit status of that subshell. +If that function is not defined, the shell prints an error +message and returns an exit status of 127. + +
  4. If the search is successful, or if the command name contains +one or more slashes, the shell executes the named program in +a separate execution environment. +Argument 0 is set to the name given, and the remaining arguments +to the command are set to the arguments supplied, if any. + +
  5. If this execution fails because the file is not in executable +format, and the file is not a directory, it is assumed to be a +shell script and the shell executes it as described in +Shell Scripts. + +
  6. If the command was not begun asynchronously, the shell waits for +the command to complete and collects its exit status. + +
+ +
+ +

3.7.3 Command Execution Environment

+ + +

The shell has an execution environment, which consists of the +following: +

+
    +
  • open files inherited by the shell at invocation, as modified by +redirections supplied to the exec builtin + +
  • the current working directory as set by cd, pushd, or +popd, or inherited by the shell at invocation + +
  • the file creation mode mask as set by umask or inherited from +the shell’s parent + +
  • current traps set by trap + +
  • shell parameters that are set by variable assignment or with set +or inherited from the shell’s parent in the environment + +
  • shell functions defined during execution or inherited from the shell’s +parent in the environment + +
  • options enabled at invocation (either by default or with command-line +arguments) or by set + +
  • options enabled by shopt (see The Shopt Builtin) + +
  • shell aliases defined with alias (see Aliases) + +
  • various process IDs, including those of background jobs +(see Lists), the value of $$, and the value of +$PPID + +
+ +

When a simple command other than a builtin or shell function +is to be executed, it +is invoked in a separate execution environment that consists of +the following. Unless otherwise noted, the values are inherited +from the shell. +

+
    +
  • the shell’s open files, plus any modifications and additions specified +by redirections to the command + +
  • the current working directory + +
  • the file creation mode mask + +
  • shell variables and functions marked for export, along with variables +exported for the command, passed in the environment (see Environment) + +
  • traps caught by the shell are reset to the values inherited from the +shell’s parent, and traps ignored by the shell are ignored + +
+ +

A command invoked in this separate environment cannot affect the +shell’s execution environment. +

+

Command substitution, commands grouped with parentheses, +and asynchronous commands are invoked in a +subshell environment that is a duplicate of the shell environment, +except that traps caught by the shell are reset to the values +that the shell inherited from its parent at invocation. Builtin +commands that are invoked as part of a pipeline are also executed +in a subshell environment. Changes made to the subshell environment +cannot affect the shell’s execution environment. +

+

Subshells spawned to execute command substitutions inherit the value of +the -e option from the parent shell. When not in POSIX mode, +Bash clears the -e option in such subshells. +

+

If a command is followed by a ‘&’ and job control is not active, the +default standard input for the command is the empty file /dev/null. +Otherwise, the invoked command inherits the file descriptors of the calling +shell as modified by redirections. +

+
+ +

3.7.4 Environment

+ + +

When a program is invoked it is given an array of strings +called the environment. +This is a list of name-value pairs, of the form name=value. +

+

Bash provides several ways to manipulate the environment. +On invocation, the shell scans its own environment and +creates a parameter for each name found, automatically marking +it for export +to child processes. Executed commands inherit the environment. +The export and ‘declare -x’ +commands allow parameters and functions to be added to and +deleted from the environment. If the value of a parameter +in the environment is modified, the new value becomes part +of the environment, replacing the old. The environment +inherited by any executed command consists of the shell’s +initial environment, whose values may be modified in the shell, +less any pairs removed by the unset and ‘export -n’ +commands, plus any additions via the export and +‘declare -x’ commands. +

+

The environment for any simple command +or function may be augmented temporarily by prefixing it with +parameter assignments, as described in Shell Parameters. +These assignment statements affect only the environment seen +by that command. +

+

If the -k option is set (see The Set Builtin), then all +parameter assignments are placed in the environment for a command, +not just those that precede the command name. +

+

When Bash invokes an external command, the variable ‘$_’ +is set to the full pathname of the command and passed to that +command in its environment. +

+
+
+

+Next: , Previous: , Up: Executing Commands   [Contents][Index]

+
+

3.7.5 Exit Status

+ + +

The exit status of an executed command is the value returned by the +waitpid system call or equivalent function. Exit statuses +fall between 0 and 255, though, as explained below, the shell may +use values above 125 specially. Exit statuses from shell builtins and +compound commands are also limited to this range. Under certain +circumstances, the shell will use special values to indicate specific +failure modes. +

+

For the shell’s purposes, a command which exits with a +zero exit status has succeeded. +A non-zero exit status indicates failure. +This seemingly counter-intuitive scheme is used so there +is one well-defined way to indicate success and a variety of +ways to indicate various failure modes. +When a command terminates on a fatal signal whose number is N, +Bash uses the value 128+N as the exit status. +

+

If a command is not found, the child process created to +execute it returns a status of 127. If a command is found +but is not executable, the return status is 126. +

+

If a command fails because of an error during expansion or redirection, +the exit status is greater than zero. +

+

The exit status is used by the Bash conditional commands +(see Conditional Constructs) and some of the list +constructs (see Lists). +

+

All of the Bash builtins return an exit status of zero if they succeed +and a non-zero status on failure, so they may be used by the +conditional and list constructs. +All builtins return an exit status of 2 to indicate incorrect usage, +generally invalid options or missing arguments. +

+
+
+

+Previous: , Up: Executing Commands   [Contents][Index]

+
+

3.7.6 Signals

+ + +

When Bash is interactive, in the absence of any traps, it ignores +SIGTERM (so that ‘kill 0’ does not kill an interactive shell), +and SIGINT +is caught and handled (so that the wait builtin is interruptible). +When Bash receives a SIGINT, it breaks out of any executing loops. +In all cases, Bash ignores SIGQUIT. +If job control is in effect (see Job Control), Bash +ignores SIGTTIN, SIGTTOU, and SIGTSTP. +

+

Non-builtin commands started by Bash have signal handlers set to the +values inherited by the shell from its parent. +When job control is not in effect, asynchronous commands +ignore SIGINT and SIGQUIT in addition to these inherited +handlers. +Commands run as a result of +command substitution ignore the keyboard-generated job control signals +SIGTTIN, SIGTTOU, and SIGTSTP. +

+

The shell exits by default upon receipt of a SIGHUP. +Before exiting, an interactive shell resends the SIGHUP to +all jobs, running or stopped. +Stopped jobs are sent SIGCONT to ensure that they receive +the SIGHUP. +To prevent the shell from sending the SIGHUP signal to a +particular job, it should be removed +from the jobs table with the disown +builtin (see Job Control Builtins) or marked +to not receive SIGHUP using disown -h. +

+

If the huponexit shell option has been set with shopt +(see The Shopt Builtin), Bash sends a SIGHUP to all jobs when +an interactive login shell exits. +

+

If Bash is waiting for a command to complete and receives a signal +for which a trap has been set, the trap will not be executed until +the command completes. +When Bash is waiting for an asynchronous +command via the wait builtin, the reception of a signal for +which a trap has been set will cause the wait builtin to return +immediately with an exit status greater than 128, immediately after +which the trap is executed. +

+
+ +

3.8 Shell Scripts

+ + +

A shell script is a text file containing shell commands. When such +a file is used as the first non-option argument when invoking Bash, +and neither the -c nor -s option is supplied +(see Invoking Bash), +Bash reads and executes commands from the file, then exits. This +mode of operation creates a non-interactive shell. The shell first +searches for the file in the current directory, and looks in the +directories in $PATH if not found there. +

+

When Bash runs +a shell script, it sets the special parameter 0 to the name +of the file, rather than the name of the shell, and the positional +parameters are set to the remaining arguments, if any are given. +If no additional arguments are supplied, the positional parameters +are unset. +

+

A shell script may be made executable by using the chmod command +to turn on the execute bit. When Bash finds such a file while +searching the $PATH for a command, it spawns a subshell to +execute it. In other words, executing +

+
filename arguments
+
+

is equivalent to executing +

+
bash filename arguments
+
+ +

if filename is an executable shell script. +This subshell reinitializes itself, so that the effect is as if a +new shell had been invoked to interpret the script, with the +exception that the locations of commands remembered by the parent +(see the description of hash in Bourne Shell Builtins) +are retained by the child. +

+

Most versions of Unix make this a part of the operating system’s command +execution mechanism. If the first line of a script begins with +the two characters ‘#!’, the remainder of the line specifies +an interpreter for the program and, depending on the operating system, one +or more optional arguments for that interpreter. +Thus, you can specify Bash, awk, Perl, or some other +interpreter and write the rest of the script file in that language. +

+

The arguments to the interpreter +consist of one or more optional arguments following the interpreter +name on the first line of the script file, followed by the name of +the script file, followed by the rest of the arguments supplied to the +script. +The details of how the interpreter line is split into an interpreter name +and a set of arguments vary across systems. +Bash will perform this action on operating systems that do not handle it +themselves. +Note that some older versions of Unix limit the interpreter +name and a single argument to a maximum of 32 characters, so it’s not +portable to assume that using more than one argument will work. +

+

Bash scripts often begin with #! /bin/bash (assuming that +Bash has been installed in /bin), since this ensures that +Bash will be used to interpret the script, even if it is executed +under another shell. It’s a common idiom to use env to find +bash even if it’s been installed in another directory: +#!/usr/bin/env bash will find the first occurrence of bash +in $PATH. +

+
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

4 Shell Builtin Commands

+ + + + + + + + +

Builtin commands are contained within the shell itself. +When the name of a builtin command is used as the first word of +a simple command (see Simple Commands), the shell executes +the command directly, without invoking another program. +Builtin commands are necessary to implement functionality impossible +or inconvenient to obtain with separate utilities. +

+

This section briefly describes the builtins which Bash inherits from +the Bourne Shell, as well as the builtin commands which are unique +to or have been extended in Bash. +

+

Several builtin commands are described in other chapters: builtin +commands which provide the Bash interface to the job control +facilities (see Job Control Builtins), the directory stack +(see Directory Stack Builtins), the command history +(see Bash History Builtins), and the programmable completion +facilities (see Programmable Completion Builtins). +

+

Many of the builtins have been extended by POSIX or Bash. +

+

Unless otherwise noted, each builtin command documented as accepting +options preceded by ‘-’ accepts ‘--’ +to signify the end of the options. +The :, true, false, and test/[ +builtins do not accept options and do not treat ‘--’ specially. +The exit, logout, return, +break, continue, let, +and shift builtins accept and process arguments beginning +with ‘-’ without requiring ‘--’. +Other builtins that accept arguments but are not specified as accepting +options interpret arguments beginning with ‘-’ as invalid options and +require ‘--’ to prevent this interpretation. +

+
+ +

4.1 Bourne Shell Builtins

+ +

The following shell builtin commands are inherited from the Bourne Shell. +These commands are implemented as specified by the POSIX standard. +

+
+
: (a colon)
+
+
+
: [arguments]
+
+ +

Do nothing beyond expanding arguments and performing redirections. +The return status is zero. +

+
+
. (a period)
+
+
+
. filename [arguments]
+
+ +

Read and execute commands from the filename argument in the +current shell context. If filename does not contain a slash, +the PATH variable is used to find filename. +When Bash is not in POSIX mode, the current directory is searched +if filename is not found in $PATH. +If any arguments are supplied, they become the positional +parameters when filename is executed. Otherwise the positional +parameters are unchanged. +If the -T option is enabled, source inherits any trap on +DEBUG; if it is not, any DEBUG trap string is saved and +restored around the call to source, and source unsets the +DEBUG trap while it executes. +If -T is not set, and the sourced file changes +the DEBUG trap, the new value is retained when source completes. +The return status is the exit status of the last command executed, or +zero if no commands are executed. If filename is not found, or +cannot be read, the return status is non-zero. +This builtin is equivalent to source. +

+
+
break
+
+
+
break [n]
+
+ +

Exit from a for, while, until, or select loop. +If n is supplied, the nth enclosing loop is exited. +n must be greater than or equal to 1. +The return status is zero unless n is not greater than or equal to 1. +

+
+
cd
+
+
+
cd [-L|[-P [-e]] [-@] [directory]
+
+ +

Change the current working directory to directory. +If directory is not supplied, the value of the HOME +shell variable is used. +Any additional arguments following directory are ignored. +If the shell variable +CDPATH exists, it is used as a search path: +each directory name in CDPATH is searched for +directory, with alternative directory names in CDPATH +separated by a colon (‘:’). +If directory begins with a slash, CDPATH is not used. +

+

The -P option means to not follow symbolic links: symbolic links +are resolved while cd is traversing directory and before +processing an instance of ‘..’ in directory. +

+

By default, or when the -L option is supplied, symbolic links +in directory are resolved after cd processes an instance +of ‘..’ in directory. +

+

If ‘..’ appears in directory, it is processed by removing the +immediately preceding pathname component, back to a slash or the beginning +of directory. +

+

If the -e option is supplied with -P +and the current working directory cannot be successfully determined +after a successful directory change, cd will return an unsuccessful +status. +

+

On systems that support it, the -@ option presents the extended +attributes associated with a file as a directory. +

+

If directory is ‘-’, it is converted to $OLDPWD +before the directory change is attempted. +

+

If a non-empty directory name from CDPATH is used, or if +‘-’ is the first argument, and the directory change is +successful, the absolute pathname of the new working directory is +written to the standard output. +

+

The return status is zero if the directory is successfully changed, +non-zero otherwise. +

+
+
continue
+
+
+
continue [n]
+
+ +

Resume the next iteration of an enclosing for, while, +until, or select loop. +If n is supplied, the execution of the nth enclosing loop +is resumed. +n must be greater than or equal to 1. +The return status is zero unless n is not greater than or equal to 1. +

+
+
eval
+
+
+
eval [arguments]
+
+ +

The arguments are concatenated together into a single command, which is +then read and executed, and its exit status returned as the exit status +of eval. +If there are no arguments or only empty arguments, the return status is +zero. +

+
+
exec
+
+
+
exec [-cl] [-a name] [command [arguments]]
+
+ +

If command +is supplied, it replaces the shell without creating a new process. +If the -l option is supplied, the shell places a dash at the +beginning of the zeroth argument passed to command. +This is what the login program does. +The -c option causes command to be executed with an empty +environment. +If -a is supplied, the shell passes name as the zeroth +argument to command. +If command +cannot be executed for some reason, a non-interactive shell exits, +unless the execfail shell option +is enabled. In that case, it returns failure. +An interactive shell returns failure if the file cannot be executed. +A subshell exits unconditionally if exec fails. +If no command is specified, redirections may be used to affect +the current shell environment. If there are no redirection errors, the +return status is zero; otherwise the return status is non-zero. +

+
+
exit
+
+
+
exit [n]
+
+ +

Exit the shell, returning a status of n to the shell’s parent. +If n is omitted, the exit status is that of the last command executed. +Any trap on EXIT is executed before the shell terminates. +

+
+
export
+
+
+
export [-fn] [-p] [name[=value]]
+
+ +

Mark each name to be passed to child processes +in the environment. If the -f option is supplied, the names +refer to shell functions; otherwise the names refer to shell variables. +The -n option means to no longer mark each name for export. +If no names are supplied, or if the -p option is given, a +list of names of all exported variables is displayed. +The -p option displays output in a form that may be reused as input. +If a variable name is followed by =value, the value of +the variable is set to value. +

+

The return status is zero unless an invalid option is supplied, one of +the names is not a valid shell variable name, or -f is supplied +with a name that is not a shell function. +

+
+
getopts
+
+
+
getopts optstring name [arg …]
+
+ +

getopts is used by shell scripts to parse positional parameters. +optstring contains the option characters to be recognized; if a +character is followed by a colon, the option is expected to have an +argument, which should be separated from it by whitespace. +The colon (‘:’) and question mark (‘?’) may not be +used as option characters. +Each time it is invoked, getopts +places the next option in the shell variable name, initializing +name if it does not exist, +and the index of the next argument to be processed into the +variable OPTIND. +OPTIND is initialized to 1 each time the shell or a shell script +is invoked. +When an option requires an argument, +getopts places that argument into the variable OPTARG. +The shell does not reset OPTIND automatically; it must be manually +reset between multiple calls to getopts within the same shell +invocation if a new set of parameters is to be used. +

+

When the end of options is encountered, getopts exits with a +return value greater than zero. +OPTIND is set to the index of the first non-option argument, +and name is set to ‘?’. +

+

getopts +normally parses the positional parameters, but if more arguments are +supplied as arg values, getopts parses those instead. +

+

getopts can report errors in two ways. If the first character of +optstring is a colon, silent +error reporting is used. In normal operation, diagnostic messages +are printed when invalid options or missing option arguments are +encountered. +If the variable OPTERR +is set to 0, no error messages will be displayed, even if the first +character of optstring is not a colon. +

+

If an invalid option is seen, +getopts places ‘?’ into name and, if not silent, +prints an error message and unsets OPTARG. +If getopts is silent, the option character found is placed in +OPTARG and no diagnostic message is printed. +

+

If a required argument is not found, and getopts +is not silent, a question mark (‘?’) is placed in name, +OPTARG is unset, and a diagnostic message is printed. +If getopts is silent, then a colon (‘:’) is placed in +name and OPTARG is set to the option character found. +

+
+
hash
+
+
+
hash [-r] [-p filename] [-dt] [name]
+
+ +

Each time hash is invoked, it remembers the full pathnames of the +commands specified as name arguments, +so they need not be searched for on subsequent invocations. +The commands are found by searching through the directories listed in +$PATH. +Any previously-remembered pathname is discarded. +The -p option inhibits the path search, and filename is +used as the location of name. +The -r option causes the shell to forget all remembered locations. +The -d option causes the shell to forget the remembered location +of each name. +If the -t option is supplied, the full pathname to which each +name corresponds is printed. If multiple name arguments are +supplied with -t, the name is printed before the hashed +full pathname. +The -l option causes output to be displayed in a format +that may be reused as input. +If no arguments are given, or if only -l is supplied, +information about remembered commands is printed. +The return status is zero unless a name is not found or an invalid +option is supplied. +

+
+
pwd
+
+
+
pwd [-LP]
+
+ +

Print the absolute pathname of the current working directory. +If the -P option is supplied, the pathname printed will not +contain symbolic links. +If the -L option is supplied, the pathname printed may contain +symbolic links. +The return status is zero unless an error is encountered while +determining the name of the current directory or an invalid option +is supplied. +

+
+
readonly
+
+
+
readonly [-aAf] [-p] [name[=value]] …
+
+ +

Mark each name as readonly. +The values of these names may not be changed by subsequent assignment. +If the -f option is supplied, each name refers to a shell +function. +The -a option means each name refers to an indexed +array variable; the -A option means each name refers +to an associative array variable. +If both options are supplied, -A takes precedence. +If no name arguments are given, or if the -p +option is supplied, a list of all readonly names is printed. +The other options may be used to restrict the output to a subset of +the set of readonly names. +The -p option causes output to be displayed in a format that +may be reused as input. +If a variable name is followed by =value, the value of +the variable is set to value. +The return status is zero unless an invalid option is supplied, one of +the name arguments is not a valid shell variable or function name, +or the -f option is supplied with a name that is not a shell function. +

+
+
return
+
+
+
return [n]
+
+ +

Cause a shell function to stop executing and return the value n +to its caller. +If n is not supplied, the return value is the exit status of the +last command executed in the function. +If return is executed by a trap handler, the last command used to +determine the status is the last command executed before the trap handler. +If return is executed during a DEBUG trap, the last command +used to determine the status is the last command executed by the trap +handler before return was invoked. +return may also be used to terminate execution of a script +being executed with the . (source) builtin, +returning either n or +the exit status of the last command executed within the script as the exit +status of the script. +If n is supplied, the return value is its least significant +8 bits. +Any command associated with the RETURN trap is executed +before execution resumes after the function or script. +The return status is non-zero if return is supplied a non-numeric +argument or is used outside a function +and not during the execution of a script by . or source. +

+
+
shift
+
+
+
shift [n]
+
+ +

Shift the positional parameters to the left by n. +The positional parameters from n+1 … $# are +renamed to $1$#-n. +Parameters represented by the numbers $# down to $#-n+1 +are unset. +n must be a non-negative number less than or equal to $#. +If n is zero or greater than $#, the positional parameters +are not changed. +If n is not supplied, it is assumed to be 1. +The return status is zero unless n is greater than $# or +less than zero, non-zero otherwise. +

+
+
test
+
[
+
+ +
+
test expr
+
+ +

Evaluate a conditional expression expr and return a status of 0 +(true) or 1 (false). +Each operator and operand must be a separate argument. +Expressions are composed of the primaries described below in +Bash Conditional Expressions. +test does not accept any options, nor does it accept and ignore +an argument of -- as signifying the end of options. +

+

When the [ form is used, the last argument to the command must +be a ]. +

+

Expressions may be combined using the following operators, listed in +decreasing order of precedence. +The evaluation depends on the number of arguments; see below. +Operator precedence is used when there are five or more arguments. +

+
+
! expr
+

True if expr is false. +

+
+
( expr )
+

Returns the value of expr. +This may be used to override the normal precedence of operators. +

+
+
expr1 -a expr2
+

True if both expr1 and expr2 are true. +

+
+
expr1 -o expr2
+

True if either expr1 or expr2 is true. +

+
+ +

The test and [ builtins evaluate conditional +expressions using a set of rules based on the number of arguments. +

+
+
0 arguments
+

The expression is false. +

+
+
1 argument
+

The expression is true if, and only if, the argument is not null. +

+
+
2 arguments
+

If the first argument is ‘!’, the expression is true if and +only if the second argument is null. +If the first argument is one of the unary conditional operators +(see Bash Conditional Expressions), the expression +is true if the unary test is true. +If the first argument is not a valid unary operator, the expression is +false. +

+
+
3 arguments
+

The following conditions are applied in the order listed. +

+
    +
  1. If the second argument is one of the binary conditional +operators (see Bash Conditional Expressions), the +result of the expression is the result of the binary test using the +first and third arguments as operands. +The ‘-a’ and ‘-o’ operators are considered binary operators +when there are three arguments. +
  2. If the first argument is ‘!’, the value is the negation of +the two-argument test using the second and third arguments. +
  3. If the first argument is exactly ‘(’ and the third argument is +exactly ‘)’, the result is the one-argument test of the second +argument. +
  4. Otherwise, the expression is false. +
+ +
+
4 arguments
+

If the first argument is ‘!’, the result is the negation of +the three-argument expression composed of the remaining arguments. +Otherwise, the expression is parsed and evaluated according to +precedence using the rules listed above. +

+
+
5 or more arguments
+

The expression is parsed and evaluated according to precedence +using the rules listed above. +

+
+ +

When used with test or ‘[’, the ‘<’ and ‘>’ +operators sort lexicographically using ASCII ordering. +

+
+
times
+
+
+
times
+
+ +

Print out the user and system times used by the shell and its children. +The return status is zero. +

+
+
trap
+
+
+
trap [-lp] [arg] [sigspec …]
+
+ +

The commands in arg are to be read and executed when the +shell receives signal sigspec. If arg is absent (and +there is a single sigspec) or +equal to ‘-’, each specified signal’s disposition is reset +to the value it had when the shell was started. +If arg is the null string, then the signal specified by +each sigspec is ignored by the shell and commands it invokes. +If arg is not present and -p has been supplied, +the shell displays the trap commands associated with each sigspec. +If no arguments are supplied, or +only -p is given, trap prints the list of commands +associated with each signal number in a form that may be reused as +shell input. +The -l option causes the shell to print a list of signal names +and their corresponding numbers. +Each sigspec is either a signal name or a signal number. +Signal names are case insensitive and the SIG prefix is optional. +

+

If a sigspec +is 0 or EXIT, arg is executed when the shell exits. +If a sigspec is DEBUG, the command arg is executed +before every simple command, for command, case command, +select command, every arithmetic for command, and before +the first command executes in a shell function. +Refer to the description of the extdebug option to the +shopt builtin (see The Shopt Builtin) for details of its +effect on the DEBUG trap. +If a sigspec is RETURN, the command arg is executed +each time a shell function or a script executed with the . or +source builtins finishes executing. +

+

If a sigspec is ERR, the command arg +is executed whenever +a pipeline (which may consist of a single simple +command), a list, or a compound command returns a +non-zero exit status, +subject to the following conditions. +The ERR trap is not executed if the failed command is part of the +command list immediately following an until or while keyword, +part of the test following the if or elif reserved words, +part of a command executed in a && or || list +except the command following the final && or ||, +any command in a pipeline but the last, +or if the command’s return +status is being inverted using !. +These are the same conditions obeyed by the errexit (-e) +option. +

+

Signals ignored upon entry to the shell cannot be trapped or reset. +Trapped signals that are not being ignored are reset to their original +values in a subshell or subshell environment when one is created. +

+

The return status is zero unless a sigspec does not specify a +valid signal. +

+
+
umask
+
+
+
umask [-p] [-S] [mode]
+
+ +

Set the shell process’s file creation mask to mode. If +mode begins with a digit, it is interpreted as an octal number; +if not, it is interpreted as a symbolic mode mask similar +to that accepted by the chmod command. If mode is +omitted, the current value of the mask is printed. If the -S +option is supplied without a mode argument, the mask is printed +in a symbolic format. +If the -p option is supplied, and mode +is omitted, the output is in a form that may be reused as input. +The return status is zero if the mode is successfully changed or if +no mode argument is supplied, and non-zero otherwise. +

+

Note that when the mode is interpreted as an octal number, each number +of the umask is subtracted from 7. Thus, a umask of 022 +results in permissions of 755. +

+
+
unset
+
+
+
unset [-fnv] [name]
+
+ +

Remove each variable or function name. +If the -v option is given, each +name refers to a shell variable and that variable is removed. +If the -f option is given, the names refer to shell +functions, and the function definition is removed. +If the -n option is supplied, and name is a variable with +the nameref attribute, name will be unset rather than the +variable it references. +-n has no effect if the -f option is supplied. +If no options are supplied, each name refers to a variable; if +there is no variable by that name, a function with that name, if any, is +unset. +Readonly variables and functions may not be unset. +Some shell variables lose their special behavior if they are unset; such +behavior is noted in the description of the individual variables. +The return status is zero unless a name is readonly. +

+
+ +
+ +

4.2 Bash Builtin Commands

+ +

This section describes builtin commands which are unique to +or have been extended in Bash. +Some of these commands are specified in the POSIX standard. +

+
+
alias
+
+
+
alias [-p] [name[=value] …]
+
+ +

Without arguments or with the -p option, alias prints +the list of aliases on the standard output in a form that allows +them to be reused as input. +If arguments are supplied, an alias is defined for each name +whose value is given. If no value is given, the name +and value of the alias is printed. +Aliases are described in Aliases. +

+
+
bind
+
+
+
bind [-m keymap] [-lpsvPSVX]
+bind [-m keymap] [-q function] [-u function] [-r keyseq]
+bind [-m keymap] -f filename
+bind [-m keymap] -x keyseq:shell-command
+bind [-m keymap] keyseq:function-name
+bind [-m keymap] keyseq:readline-command
+
+ +

Display current Readline (see Command Line Editing) +key and function bindings, +bind a key sequence to a Readline function or macro, +or set a Readline variable. +Each non-option argument is a command as it would appear in a +Readline initialization file (see Readline Init File), +but each binding or command must be passed as a separate argument; e.g., +‘"\C-x\C-r":re-read-init-file’. +

+

Options, if supplied, have the following meanings: +

+
+
-m keymap
+

Use keymap as the keymap to be affected by +the subsequent bindings. Acceptable keymap +names are +emacs, +emacs-standard, +emacs-meta, +emacs-ctlx, +vi, +vi-move, +vi-command, and +vi-insert. +vi is equivalent to vi-command (vi-move is also a +synonym); emacs is equivalent to emacs-standard. +

+
+
-l
+

List the names of all Readline functions. +

+
+
-p
+

Display Readline function names and bindings in such a way that they +can be used as input or in a Readline initialization file. +

+
+
-P
+

List current Readline function names and bindings. +

+
+
-v
+

Display Readline variable names and values in such a way that they +can be used as input or in a Readline initialization file. +

+
+
-V
+

List current Readline variable names and values. +

+
+
-s
+

Display Readline key sequences bound to macros and the strings they output +in such a way that they can be used as input or in a Readline +initialization file. +

+
+
-S
+

Display Readline key sequences bound to macros and the strings they output. +

+
+
-f filename
+

Read key bindings from filename. +

+
+
-q function
+

Query about which keys invoke the named function. +

+
+
-u function
+

Unbind all keys bound to the named function. +

+
+
-r keyseq
+

Remove any current binding for keyseq. +

+
+
-x keyseq:shell-command
+

Cause shell-command to be executed whenever keyseq is +entered. +When shell-command is executed, the shell sets the +READLINE_LINE variable to the contents of the Readline line +buffer and the READLINE_POINT and READLINE_MARK variables +to the current location of the insertion point and the saved insertion +point (the mark), respectively. +If the executed command changes the value of any of READLINE_LINE, +READLINE_POINT, or READLINE_MARK, those new values will be +reflected in the editing state. +

+
+
-X
+

List all key sequences bound to shell commands and the associated commands +in a format that can be reused as input. +

+
+ +

The return status is zero unless an invalid option is supplied or an +error occurs. +

+
+
builtin
+
+
+
builtin [shell-builtin [args]]
+
+ +

Run a shell builtin, passing it args, and return its exit status. +This is useful when defining a shell function with the same +name as a shell builtin, retaining the functionality of the builtin within +the function. +The return status is non-zero if shell-builtin is not a shell +builtin command. +

+
+
caller
+
+
+
caller [expr]
+
+ +

Returns the context of any active subroutine call (a shell function or +a script executed with the . or source builtins). +

+

Without expr, caller displays the line number and source +filename of the current subroutine call. +If a non-negative integer is supplied as expr, caller +displays the line number, subroutine name, and source file corresponding +to that position in the current execution call stack. This extra +information may be used, for example, to print a stack trace. The +current frame is frame 0. +

+

The return value is 0 unless the shell is not executing a subroutine +call or expr does not correspond to a valid position in the +call stack. +

+
+
command
+
+
+
command [-pVv] command [arguments …]
+
+ +

Runs command with arguments ignoring any shell function +named command. +Only shell builtin commands or commands found by searching the +PATH are executed. +If there is a shell function named ls, running ‘command ls’ +within the function will execute the external command ls +instead of calling the function recursively. +The -p option means to use a default value for PATH +that is guaranteed to find all of the standard utilities. +The return status in this case is 127 if command cannot be +found or an error occurred, and the exit status of command +otherwise. +

+

If either the -V or -v option is supplied, a +description of command is printed. The -v option +causes a single word indicating the command or file name used to +invoke command to be displayed; the -V option produces +a more verbose description. In this case, the return status is +zero if command is found, and non-zero if not. +

+
+
declare
+
+
+
declare [-aAfFgiIlnrtux] [-p] [name[=value] …]
+
+ +

Declare variables and give them attributes. If no names +are given, then display the values of variables instead. +

+

The -p option will display the attributes and values of each +name. +When -p is used with name arguments, additional options, +other than -f and -F, are ignored. +

+

When -p is supplied without name arguments, declare +will display the attributes and values of all variables having the +attributes specified by the additional options. +If no other options are supplied with -p, declare will +display the attributes and values of all shell variables. The -f +option will restrict the display to shell functions. +

+

The -F option inhibits the display of function definitions; +only the function name and attributes are printed. +If the extdebug shell option is enabled using shopt +(see The Shopt Builtin), the source file name and line number where +each name is defined are displayed as well. +-F implies -f. +

+

The -g option forces variables to be created or modified at +the global scope, even when declare is executed in a shell function. +It is ignored in all other cases. +

+

The -I option causes local variables to inherit the attributes +(except the nameref attribute) +and value of any existing variable with the same +name at a surrounding scope. +If there is no existing variable, the local variable is initially unset. +

+

The following options can be used to restrict output to variables with +the specified attributes or to give variables attributes: +

+
+
-a
+

Each name is an indexed array variable (see Arrays). +

+
+
-A
+

Each name is an associative array variable (see Arrays). +

+
+
-f
+

Use function names only. +

+
+
-i
+

The variable is to be treated as +an integer; arithmetic evaluation (see Shell Arithmetic) is +performed when the variable is assigned a value. +

+
+
-l
+

When the variable is assigned a value, all upper-case characters are +converted to lower-case. +The upper-case attribute is disabled. +

+
+
-n
+

Give each name the nameref attribute, making +it a name reference to another variable. +That other variable is defined by the value of name. +All references, assignments, and attribute modifications +to name, except for those using or changing the +-n attribute itself, are performed on the variable referenced by +name’s value. +The nameref attribute cannot be applied to array variables. +

+
+
-r
+

Make names readonly. These names cannot then be assigned values +by subsequent assignment statements or unset. +

+
+
-t
+

Give each name the trace attribute. +Traced functions inherit the DEBUG and RETURN traps from +the calling shell. +The trace attribute has no special meaning for variables. +

+
+
-u
+

When the variable is assigned a value, all lower-case characters are +converted to upper-case. +The lower-case attribute is disabled. +

+
+
-x
+

Mark each name for export to subsequent commands via +the environment. +

+
+ +

Using ‘+’ instead of ‘-’ turns off the attribute instead, +with the exceptions that ‘+a’ and ‘+A’ +may not be used to destroy array variables and ‘+r’ will not +remove the readonly attribute. +When used in a function, declare makes each name local, +as with the local command, unless the -g option is used. +If a variable name is followed by =value, the value of the variable +is set to value. +

+

When using -a or -A and the compound assignment syntax to +create array variables, additional attributes do not take effect until +subsequent assignments. +

+

The return status is zero unless an invalid option is encountered, +an attempt is made to define a function using ‘-f foo=bar’, +an attempt is made to assign a value to a readonly variable, +an attempt is made to assign a value to an array variable without +using the compound assignment syntax (see Arrays), +one of the names is not a valid shell variable name, +an attempt is made to turn off readonly status for a readonly variable, +an attempt is made to turn off array status for an array variable, +or an attempt is made to display a non-existent function with -f. +

+
+
echo
+
+
+
echo [-neE] [arg …]
+
+ +

Output the args, separated by spaces, terminated with a +newline. +The return status is 0 unless a write error occurs. +If -n is specified, the trailing newline is suppressed. +If the -e option is given, interpretation of the following +backslash-escaped characters is enabled. +The -E option disables the interpretation of these escape characters, +even on systems where they are interpreted by default. +The xpg_echo shell option may be used to +dynamically determine whether or not echo expands these +escape characters by default. +echo does not interpret -- to mean the end of options. +

+

echo interprets the following escape sequences: +

+
\a
+

alert (bell) +

+
\b
+

backspace +

+
\c
+

suppress further output +

+
\e
+
\E
+

escape +

+
\f
+

form feed +

+
\n
+

new line +

+
\r
+

carriage return +

+
\t
+

horizontal tab +

+
\v
+

vertical tab +

+
\\
+

backslash +

+
\0nnn
+

the eight-bit character whose value is the octal value nnn +(zero to three octal digits) +

+
\xHH
+

the eight-bit character whose value is the hexadecimal value HH +(one or two hex digits) +

+
\uHHHH
+

the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHH (one to four hex digits) +

+
\UHHHHHHHH
+

the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHHHHHH (one to eight hex digits) +

+
+ +
+
enable
+
+
+
enable [-a] [-dnps] [-f filename] [name …]
+
+ +

Enable and disable builtin shell commands. +Disabling a builtin allows a disk command which has the same name +as a shell builtin to be executed without specifying a full pathname, +even though the shell normally searches for builtins before disk commands. +If -n is used, the names become disabled. Otherwise +names are enabled. For example, to use the test binary +found via $PATH instead of the shell builtin version, type +‘enable -n test’. +

+

If the -p option is supplied, or no name arguments appear, +a list of shell builtins is printed. With no other arguments, the list +consists of all enabled shell builtins. +The -a option means to list +each builtin with an indication of whether or not it is enabled. +

+

The -f option means to load the new builtin command name +from shared object filename, on systems that support dynamic loading. +The -d option will delete a builtin loaded with -f. +

+

If there are no options, a list of the shell builtins is displayed. +The -s option restricts enable to the POSIX special +builtins. If -s is used with -f, the new builtin becomes +a special builtin (see Special Builtins). +

+

The return status is zero unless a name is not a shell builtin +or there is an error loading a new builtin from a shared object. +

+
+
help
+
+
+
help [-dms] [pattern]
+
+ +

Display helpful information about builtin commands. +If pattern is specified, help gives detailed help +on all commands matching pattern, otherwise a list of +the builtins is printed. +

+

Options, if supplied, have the following meanings: +

+
+
-d
+

Display a short description of each pattern +

+
-m
+

Display the description of each pattern in a manpage-like format +

+
-s
+

Display only a short usage synopsis for each pattern +

+
+ +

The return status is zero unless no command matches pattern. +

+
+
let
+
+
+
let expression [expression …]
+
+ +

The let builtin allows arithmetic to be performed on shell +variables. Each expression is evaluated according to the +rules given below in Shell Arithmetic. If the +last expression evaluates to 0, let returns 1; +otherwise 0 is returned. +

+
+
local
+
+
+
local [option] name[=value] …
+
+ +

For each argument, a local variable named name is created, +and assigned value. +The option can be any of the options accepted by declare. +local can only be used within a function; it makes the variable +name have a visible scope restricted to that function and its +children. +If name is ‘-’, the set of shell options is made local to the +function in which local is invoked: shell options changed using +the set builtin inside the function are restored to their original +values when the function returns. +The restore is effected as if a series of set commands were executed +to restore the values that were in place before the function. +The return status is zero unless local is used outside +a function, an invalid name is supplied, or name is a +readonly variable. +

+
+
logout
+
+
+
logout [n]
+
+ +

Exit a login shell, returning a status of n to the shell’s +parent. +

+
+
mapfile
+
+
+
mapfile [-d delim] [-n count] [-O origin] [-s count]
+    [-t] [-u fd] [-C callback] [-c quantum] [array]
+
+ +

Read lines from the standard input into the indexed array variable array, +or from file descriptor fd +if the -u option is supplied. +The variable MAPFILE is the default array. +Options, if supplied, have the following meanings: +

+
+
-d
+

The first character of delim is used to terminate each input line, +rather than newline. +If delim is the empty string, mapfile will terminate a line +when it reads a NUL character. +

+
-n
+

Copy at most count lines. If count is 0, all lines are copied. +

+
-O
+

Begin assigning to array at index origin. +The default index is 0. +

+
-s
+

Discard the first count lines read. +

+
-t
+

Remove a trailing delim (default newline) from each line read. +

+
-u
+

Read lines from file descriptor fd instead of the standard input. +

+
-C
+

Evaluate callback each time quantum lines are read. +The -c option specifies quantum. +

+
-c
+

Specify the number of lines read between each call to callback. +

+
+ +

If -C is specified without -c, +the default quantum is 5000. +When callback is evaluated, it is supplied the index of the next +array element to be assigned and the line to be assigned to that element +as additional arguments. +callback is evaluated after the line is read but before the +array element is assigned. +

+

If not supplied with an explicit origin, mapfile will clear array +before assigning to it. +

+

mapfile returns successfully unless an invalid option or option +argument is supplied, array is invalid or unassignable, or array +is not an indexed array. +

+
+
printf
+
+
+
printf [-v var] format [arguments]
+
+ +

Write the formatted arguments to the standard output under the +control of the format. +The -v option causes the output to be assigned to the variable +var rather than being printed to the standard output. +

+

The format is a character string which contains three types of objects: +plain characters, which are simply copied to standard output, character +escape sequences, which are converted and copied to the standard output, and +format specifications, each of which causes printing of the next successive +argument. +In addition to the standard printf(1) formats, printf +interprets the following extensions: +

+
+
%b
+

Causes printf to expand backslash escape sequences in the +corresponding argument in the same way as echo -e +(see Bash Builtins). +

+
%q
+

Causes printf to output the +corresponding argument in a format that can be reused as shell input. +

+
%(datefmt)T
+

Causes printf to output the date-time string resulting from using +datefmt as a format string for strftime(3). +The corresponding argument is an integer representing the number of +seconds since the epoch. +Two special argument values may be used: -1 represents the current +time, and -2 represents the time the shell was invoked. +If no argument is specified, conversion behaves as if -1 had been given. +This is an exception to the usual printf behavior. +

+
+ +

The %b, %q, and %T directives all use the field width and precision +arguments from the format specification and write that many bytes from +(or use that wide a field for) the expanded argument, which usually +contains more characters than the original. +

+

Arguments to non-string format specifiers are treated as C language constants, +except that a leading plus or minus sign is allowed, and if the leading +character is a single or double quote, the value is the ASCII value of +the following character. +

+

The format is reused as necessary to consume all of the arguments. +If the format requires more arguments than are supplied, the +extra format specifications behave as if a zero value or null string, as +appropriate, had been supplied. The return value is zero on success, +non-zero on failure. +

+
+
read
+
+
+
read [-ers] [-a aname] [-d delim] [-i text] [-n nchars]
+    [-N nchars] [-p prompt] [-t timeout] [-u fd] [name …]
+
+ +

One line is read from the standard input, or from the file descriptor +fd supplied as an argument to the -u option, +split into words as described above in Word Splitting, +and the first word +is assigned to the first name, the second word to the second name, +and so on. +If there are more words than names, +the remaining words and their intervening delimiters are assigned +to the last name. +If there are fewer words read from the input stream than names, +the remaining names are assigned empty values. +The characters in the value of the IFS variable +are used to split the line into words using the same rules the shell +uses for expansion (described above in Word Splitting). +The backslash character ‘\’ may be used to remove any special +meaning for the next character read and for line continuation. +

+

Options, if supplied, have the following meanings: +

+
+
-a aname
+

The words are assigned to sequential indices of the array variable +aname, starting at 0. +All elements are removed from aname before the assignment. +Other name arguments are ignored. +

+
+
-d delim
+

The first character of delim is used to terminate the input line, +rather than newline. +If delim is the empty string, read will terminate a line +when it reads a NUL character. +

+
+
-e
+

Readline (see Command Line Editing) is used to obtain the line. +Readline uses the current (or default, if line editing was not previously +active) editing settings, but uses Readline’s default filename completion. +

+
+
-i text
+

If Readline is being used to read the line, text is placed into +the editing buffer before editing begins. +

+
+
-n nchars
+

read returns after reading nchars characters rather than +waiting for a complete line of input, but honors a delimiter if fewer +than nchars characters are read before the delimiter. +

+
+
-N nchars
+

read returns after reading exactly nchars characters rather +than waiting for a complete line of input, unless EOF is encountered or +read times out. +Delimiter characters encountered in the input are +not treated specially and do not cause read to return until +nchars characters are read. +The result is not split on the characters in IFS; the intent is +that the variable is assigned exactly the characters read +(with the exception of backslash; see the -r option below). +

+
+
-p prompt
+

Display prompt, without a trailing newline, before attempting +to read any input. +The prompt is displayed only if input is coming from a terminal. +

+
+
-r
+

If this option is given, backslash does not act as an escape character. +The backslash is considered to be part of the line. +In particular, a backslash-newline pair may not then be used as a line +continuation. +

+
+
-s
+

Silent mode. If input is coming from a terminal, characters are +not echoed. +

+
+
-t timeout
+

Cause read to time out and return failure if a complete line of +input (or a specified number of characters) +is not read within timeout seconds. +timeout may be a decimal number with a fractional portion following +the decimal point. +This option is only effective if read is reading input from a +terminal, pipe, or other special file; it has no effect when reading +from regular files. +If read times out, read saves any partial input read into +the specified variable name. +If timeout is 0, read returns immediately, without trying to +read any data. The exit status is 0 if input is available on +the specified file descriptor, non-zero otherwise. +The exit status is greater than 128 if the timeout is exceeded. +

+
+
-u fd
+

Read input from file descriptor fd. +

+
+ +

If no names are supplied, the line read, +without the ending delimiter but otherwise unmodified, +is assigned to the +variable REPLY. +The exit status is zero, unless end-of-file is encountered, read +times out (in which case the status is greater than 128), +a variable assignment error (such as assigning to a readonly variable) occurs, +or an invalid file descriptor is supplied as the argument to -u. +

+
+
readarray
+
+
+
readarray [-d delim] [-n count] [-O origin] [-s count]
+    [-t] [-u fd] [-C callback] [-c quantum] [array]
+
+ +

Read lines from the standard input into the indexed array variable array, +or from file descriptor fd +if the -u option is supplied. +

+

A synonym for mapfile. +

+
+
source
+
+
+
source filename
+
+ +

A synonym for . (see Bourne Shell Builtins). +

+
+
type
+
+
+
type [-afptP] [name …]
+
+ +

For each name, indicate how it would be interpreted if used as a +command name. +

+

If the -t option is used, type prints a single word +which is one of ‘alias’, ‘function’, ‘builtin’, +‘file’ or ‘keyword’, +if name is an alias, shell function, shell builtin, +disk file, or shell reserved word, respectively. +If the name is not found, then nothing is printed, and +type returns a failure status. +

+

If the -p option is used, type either returns the name +of the disk file that would be executed, or nothing if -t +would not return ‘file’. +

+

The -P option forces a path search for each name, even if +-t would not return ‘file’. +

+

If a command is hashed, -p and -P print the hashed value, +which is not necessarily the file that appears first in $PATH. +

+

If the -a option is used, type returns all of the places +that contain an executable named file. +This includes aliases and functions, if and only if the -p option +is not also used. +

+

If the -f option is used, type does not attempt to find +shell functions, as with the command builtin. +

+

The return status is zero if all of the names are found, non-zero +if any are not found. +

+
+
typeset
+
+
+
typeset [-afFgrxilnrtux] [-p] [name[=value] …]
+
+ +

The typeset command is supplied for compatibility with the Korn +shell. +It is a synonym for the declare builtin command. +

+
+
ulimit
+
+
+
ulimit [-HS] -a
+ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [limit]
+
+ +

ulimit provides control over the resources available to processes +started by the shell, on systems that allow such control. If an +option is given, it is interpreted as follows: +

+
+
-S
+

Change and report the soft limit associated with a resource. +

+
+
-H
+

Change and report the hard limit associated with a resource. +

+
+
-a
+

All current limits are reported; no limits are set. +

+
+
-b
+

The maximum socket buffer size. +

+
+
-c
+

The maximum size of core files created. +

+
+
-d
+

The maximum size of a process’s data segment. +

+
+
-e
+

The maximum scheduling priority ("nice"). +

+
+
-f
+

The maximum size of files written by the shell and its children. +

+
+
-i
+

The maximum number of pending signals. +

+
+
-k
+

The maximum number of kqueues that may be allocated. +

+
+
-l
+

The maximum size that may be locked into memory. +

+
+
-m
+

The maximum resident set size (many systems do not honor this limit). +

+
+
-n
+

The maximum number of open file descriptors (most systems do not +allow this value to be set). +

+
+
-p
+

The pipe buffer size. +

+
+
-q
+

The maximum number of bytes in POSIX message queues. +

+
+
-r
+

The maximum real-time scheduling priority. +

+
+
-s
+

The maximum stack size. +

+
+
-t
+

The maximum amount of cpu time in seconds. +

+
+
-u
+

The maximum number of processes available to a single user. +

+
+
-v
+

The maximum amount of virtual memory available to the shell, and, on +some systems, to its children. +

+
+
-x
+

The maximum number of file locks. +

+
+
-P
+

The maximum number of pseudoterminals. +

+
+
-R
+

The maximum time a real-time process can run before blocking, in microseconds. +

+
+
-T
+

The maximum number of threads. +

+
+ +

If limit is given, and the -a option is not used, +limit is the new value of the specified resource. +The special limit values hard, soft, and +unlimited stand for the current hard limit, the current soft limit, +and no limit, respectively. +A hard limit cannot be increased by a non-root user once it is set; +a soft limit may be increased up to the value of the hard limit. +Otherwise, the current value of the soft limit for the specified resource +is printed, unless the -H option is supplied. +When more than one +resource is specified, the limit name and unit, if appropriate, +are printed before the value. +When setting new limits, if neither -H nor -S is supplied, +both the hard and soft limits are set. +If no option is given, then -f is assumed. Values are in 1024-byte +increments, except for +-t, which is in seconds; +-R, which is in microseconds; +-p, which is in units of 512-byte blocks; +-P, +-T, +-b, +-k, +-n and -u, which are unscaled values; +and, when in POSIX Mode (see Bash POSIX Mode), +-c and -f, which are in 512-byte increments. +

+

The return status is zero unless an invalid option or argument is supplied, +or an error occurs while setting a new limit. +

+
+
unalias
+
+
+
unalias [-a] [name … ]
+
+ +

Remove each name from the list of aliases. If -a is +supplied, all aliases are removed. +Aliases are described in Aliases. +

+
+ +
+ +

4.3 Modifying Shell Behavior

+ + + + + + +
+ +

4.3.1 The Set Builtin

+ +

This builtin is so complicated that it deserves its own section. set +allows you to change the values of shell options and set the positional +parameters, or to display the names and values of shell variables. +

+
+
set
+
+
+
set [--abefhkmnptuvxBCEHPT] [-o option-name] [argument …]
+set [+abefhkmnptuvxBCEHPT] [+o option-name] [argument …]
+
+ +

If no options or arguments are supplied, set displays the names +and values of all shell variables and functions, sorted according to the +current locale, in a format that may be reused as input +for setting or resetting the currently-set variables. +Read-only variables cannot be reset. +In POSIX mode, only shell variables are listed. +

+

When options are supplied, they set or unset shell attributes. +Options, if specified, have the following meanings: +

+
+
-a
+

Each variable or function that is created or modified is given the +export attribute and marked for export to the environment of +subsequent commands. +

+
+
-b
+

Cause the status of terminated background jobs to be reported +immediately, rather than before printing the next primary prompt. +

+
+
-e
+

Exit immediately if +a pipeline (see Pipelines), which may consist of a single simple command +(see Simple Commands), +a list (see Lists), +or a compound command (see Compound Commands) +returns a non-zero status. +The shell does not exit if the command that fails is part of the +command list immediately following a while or until keyword, +part of the test in an if statement, +part of any command executed in a && or || list except +the command following the final && or ||, +any command in a pipeline but the last, +or if the command’s return status is being inverted with !. +If a compound command other than a subshell +returns a non-zero status because a command failed +while -e was being ignored, the shell does not exit. +A trap on ERR, if set, is executed before the shell exits. +

+

This option applies to the shell environment and each subshell environment +separately (see Command Execution Environment), and may cause +subshells to exit before executing all the commands in the subshell. +

+

If a compound command or shell function executes in a context where +-e is being ignored, +none of the commands executed within the compound command or function body +will be affected by the -e setting, even if -e is set +and a command returns a failure status. +If a compound command or shell function sets -e while executing in +a context where -e is ignored, that setting will not have any +effect until the compound command or the command containing the function +call completes. +

+
+
-f
+

Disable filename expansion (globbing). +

+
+
-h
+

Locate and remember (hash) commands as they are looked up for execution. +This option is enabled by default. +

+
+
-k
+

All arguments in the form of assignment statements are placed +in the environment for a command, not just those that precede +the command name. +

+
+
-m
+

Job control is enabled (see Job Control). +All processes run in a separate process group. +When a background job completes, the shell prints a line +containing its exit status. +

+
+
-n
+

Read commands but do not execute them. +This may be used to check a script for syntax errors. +This option is ignored by interactive shells. +

+
+
-o option-name
+
+

Set the option corresponding to option-name: +

+
+
allexport
+

Same as -a. +

+
+
braceexpand
+

Same as -B. +

+
+
emacs
+

Use an emacs-style line editing interface (see Command Line Editing). +This also affects the editing interface used for read -e. +

+
+
errexit
+

Same as -e. +

+
+
errtrace
+

Same as -E. +

+
+
functrace
+

Same as -T. +

+
+
hashall
+

Same as -h. +

+
+
histexpand
+

Same as -H. +

+
+
history
+

Enable command history, as described in Bash History Facilities. +This option is on by default in interactive shells. +

+
+
ignoreeof
+

An interactive shell will not exit upon reading EOF. +

+
+
keyword
+

Same as -k. +

+
+
monitor
+

Same as -m. +

+
+
noclobber
+

Same as -C. +

+
+
noexec
+

Same as -n. +

+
+
noglob
+

Same as -f. +

+
+
nolog
+

Currently ignored. +

+
+
notify
+

Same as -b. +

+
+
nounset
+

Same as -u. +

+
+
onecmd
+

Same as -t. +

+
+
physical
+

Same as -P. +

+
+
pipefail
+

If set, the return value of a pipeline is the value of the last +(rightmost) command to exit with a non-zero status, or zero if all +commands in the pipeline exit successfully. +This option is disabled by default. +

+
+
posix
+

Change the behavior of Bash where the default operation differs +from the POSIX standard to match the standard +(see Bash POSIX Mode). +This is intended to make Bash behave as a strict superset of that +standard. +

+
+
privileged
+

Same as -p. +

+
+
verbose
+

Same as -v. +

+
+
vi
+

Use a vi-style line editing interface. +This also affects the editing interface used for read -e. +

+
+
xtrace
+

Same as -x. +

+
+ +
+
-p
+

Turn on privileged mode. +In this mode, the $BASH_ENV and $ENV files are not +processed, shell functions are not inherited from the environment, +and the SHELLOPTS, BASHOPTS, CDPATH and GLOBIGNORE +variables, if they appear in the environment, are ignored. +If the shell is started with the effective user (group) id not equal to the +real user (group) id, and the -p option is not supplied, these actions +are taken and the effective user id is set to the real user id. +If the -p option is supplied at startup, the effective user id is +not reset. +Turning this option off causes the effective user +and group ids to be set to the real user and group ids. +

+
+
-t
+

Exit after reading and executing one command. +

+
+
-u
+

Treat unset variables and parameters other than the special parameters +‘@’ or ‘*’ as an error when performing parameter expansion. +An error message will be written to the standard error, and a non-interactive +shell will exit. +

+
+
-v
+

Print shell input lines as they are read. +

+
+
-x
+

Print a trace of simple commands, for commands, case +commands, select commands, and arithmetic for commands +and their arguments or associated word lists after they are +expanded and before they are executed. The value of the PS4 +variable is expanded and the resultant value is printed before +the command and its expanded arguments. +

+
+
-B
+

The shell will perform brace expansion (see Brace Expansion). +This option is on by default. +

+
+
-C
+

Prevent output redirection using ‘>’, ‘>&’, and ‘<>’ +from overwriting existing files. +

+
+
-E
+

If set, any trap on ERR is inherited by shell functions, command +substitutions, and commands executed in a subshell environment. +The ERR trap is normally not inherited in such cases. +

+
+
-H
+

Enable ‘!’ style history substitution (see History Interaction). +This option is on by default for interactive shells. +

+
+
-P
+

If set, do not resolve symbolic links when performing commands such as +cd which change the current directory. The physical directory +is used instead. By default, Bash follows +the logical chain of directories when performing commands +which change the current directory. +

+

For example, if /usr/sys is a symbolic link to /usr/local/sys +then: +

+
$ cd /usr/sys; echo $PWD
+/usr/sys
+$ cd ..; pwd
+/usr
+
+ +

If set -P is on, then: +

+
$ cd /usr/sys; echo $PWD
+/usr/local/sys
+$ cd ..; pwd
+/usr/local
+
+ +
+
-T
+

If set, any trap on DEBUG and RETURN are inherited by +shell functions, command substitutions, and commands executed +in a subshell environment. +The DEBUG and RETURN traps are normally not inherited +in such cases. +

+
+
--
+

If no arguments follow this option, then the positional parameters are +unset. Otherwise, the positional parameters are set to the +arguments, even if some of them begin with a ‘-’. +

+
+
-
+

Signal the end of options, cause all remaining arguments +to be assigned to the positional parameters. The -x +and -v options are turned off. +If there are no arguments, the positional parameters remain unchanged. +

+
+ +

Using ‘+’ rather than ‘-’ causes these options to be +turned off. The options can also be used upon invocation of the +shell. The current set of options may be found in $-. +

+

The remaining N arguments are positional parameters and are +assigned, in order, to $1, $2, … $N. +The special parameter # is set to N. +

+

The return status is always zero unless an invalid option is supplied. +

+
+ +
+ +

4.3.2 The Shopt Builtin

+ +

This builtin allows you to change additional shell optional behavior. +

+
+
shopt
+
+
+
shopt [-pqsu] [-o] [optname …]
+
+ +

Toggle the values of settings controlling optional shell behavior. +The settings can be either those listed below, or, if the +-o option is used, those available with the -o +option to the set builtin command (see The Set Builtin). +With no options, or with the -p option, a list of all settable +options is displayed, with an indication of whether or not each is set; +if optnames are supplied, the output is restricted to those options. +The -p option causes output to be displayed in a form that +may be reused as input. +Other options have the following meanings: +

+
+
-s
+

Enable (set) each optname. +

+
+
-u
+

Disable (unset) each optname. +

+
+
-q
+

Suppresses normal output; the return status +indicates whether the optname is set or unset. +If multiple optname arguments are given with -q, +the return status is zero if all optnames are enabled; +non-zero otherwise. +

+
+
-o
+

Restricts the values of +optname to be those defined for the -o option to the +set builtin (see The Set Builtin). +

+
+ +

If either -s or -u +is used with no optname arguments, shopt shows only +those options which are set or unset, respectively. +

+

Unless otherwise noted, the shopt options are disabled (off) +by default. +

+

The return status when listing options is zero if all optnames +are enabled, non-zero otherwise. When setting or unsetting options, +the return status is zero unless an optname is not a valid shell +option. +

+

The list of shopt options is: +

+
assoc_expand_once
+

If set, the shell suppresses multiple evaluation of associative array +subscripts during arithmetic expression evaluation, while executing +builtins that can perform variable assignments, +and while executing builtins that perform array dereferencing. +

+
+
autocd
+

If set, a command name that is the name of a directory is executed as if +it were the argument to the cd command. +This option is only used by interactive shells. +

+
+
cdable_vars
+

If this is set, an argument to the cd builtin command that +is not a directory is assumed to be the name of a variable whose +value is the directory to change to. +

+
+
cdspell
+

If set, minor errors in the spelling of a directory component in a +cd command will be corrected. +The errors checked for are transposed characters, +a missing character, and a character too many. +If a correction is found, the corrected path is printed, +and the command proceeds. +This option is only used by interactive shells. +

+
+
checkhash
+

If this is set, Bash checks that a command found in the hash +table exists before trying to execute it. If a hashed command no +longer exists, a normal path search is performed. +

+
+
checkjobs
+

If set, Bash lists the status of any stopped and running jobs before +exiting an interactive shell. If any jobs are running, this causes +the exit to be deferred until a second exit is attempted without an +intervening command (see Job Control). +The shell always postpones exiting if any jobs are stopped. +

+
+
checkwinsize
+

If set, Bash checks the window size after each external (non-builtin) +command and, if necessary, updates the values of +LINES and COLUMNS. +This option is enabled by default. +

+
+
cmdhist
+

If set, Bash +attempts to save all lines of a multiple-line +command in the same history entry. This allows +easy re-editing of multi-line commands. +This option is enabled by default, but only has an effect if command +history is enabled (see Bash History Facilities). +

+
+
compat31
+
compat32
+
compat40
+
compat41
+
compat42
+
compat43
+
compat44
+

These control aspects of the shell’s compatibility mode +(see Shell Compatibility Mode). +

+
+
complete_fullquote
+

If set, Bash +quotes all shell metacharacters in filenames and directory names when +performing completion. +If not set, Bash +removes metacharacters such as the dollar sign from the set of +characters that will be quoted in completed filenames +when these metacharacters appear in shell variable references in words to be +completed. +This means that dollar signs in variable names that expand to directories +will not be quoted; +however, any dollar signs appearing in filenames will not be quoted, either. +This is active only when bash is using backslashes to quote completed +filenames. +This variable is set by default, which is the default Bash behavior in +versions through 4.2. +

+
+
direxpand
+

If set, Bash +replaces directory names with the results of word expansion when performing +filename completion. This changes the contents of the readline editing +buffer. +If not set, Bash attempts to preserve what the user typed. +

+
+
dirspell
+

If set, Bash +attempts spelling correction on directory names during word completion +if the directory name initially supplied does not exist. +

+
+
dotglob
+

If set, Bash includes filenames beginning with a ‘.’ in +the results of filename expansion. +The filenames ‘.’ and ‘..’ must always be matched explicitly, +even if dotglob is set. +

+
+
execfail
+

If this is set, a non-interactive shell will not exit if +it cannot execute the file specified as an argument to the exec +builtin command. An interactive shell does not exit if exec +fails. +

+
+
expand_aliases
+

If set, aliases are expanded as described below under Aliases, +Aliases. +This option is enabled by default for interactive shells. +

+
+
extdebug
+

If set at shell invocation, +or in a shell startup file, +arrange to execute the debugger profile +before the shell starts, identical to the --debugger option. +If set after invocation, behavior intended for use by debuggers is enabled: +

+
    +
  1. The -F option to the declare builtin (see Bash Builtins) +displays the source file name and line number corresponding to each function +name supplied as an argument. + +
  2. If the command run by the DEBUG trap returns a non-zero value, the +next command is skipped and not executed. + +
  3. If the command run by the DEBUG trap returns a value of 2, and the +shell is executing in a subroutine (a shell function or a shell script +executed by the . or source builtins), the shell simulates +a call to return. + +
  4. BASH_ARGC and BASH_ARGV are updated as described in their +descriptions (see Bash Variables). + +
  5. Function tracing is enabled: command substitution, shell functions, and +subshells invoked with ( command ) inherit the +DEBUG and RETURN traps. + +
  6. Error tracing is enabled: command substitution, shell functions, and +subshells invoked with ( command ) inherit the +ERR trap. +
+ +
+
extglob
+

If set, the extended pattern matching features described above +(see Pattern Matching) are enabled. +

+
+
extquote
+

If set, $'string' and $"string" quoting is +performed within ${parameter} expansions +enclosed in double quotes. This option is enabled by default. +

+
+
failglob
+

If set, patterns which fail to match filenames during filename expansion +result in an expansion error. +

+
+
force_fignore
+

If set, the suffixes specified by the FIGNORE shell variable +cause words to be ignored when performing word completion even if +the ignored words are the only possible completions. +See Bash Variables, for a description of FIGNORE. +This option is enabled by default. +

+
+
globasciiranges
+

If set, range expressions used in pattern matching bracket expressions +(see Pattern Matching) +behave as if in the traditional C locale when performing +comparisons. That is, the current locale’s collating sequence +is not taken into account, so +‘b’ will not collate between ‘A’ and ‘B’, +and upper-case and lower-case ASCII characters will collate together. +

+
+
globstar
+

If set, the pattern ‘**’ used in a filename expansion context will +match all files and zero or more directories and subdirectories. +If the pattern is followed by a ‘/’, only directories and +subdirectories match. +

+
+
gnu_errfmt
+

If set, shell error messages are written in the standard GNU error +message format. +

+
+
histappend
+

If set, the history list is appended to the file named by the value +of the HISTFILE +variable when the shell exits, rather than overwriting the file. +

+
+
histreedit
+

If set, and Readline +is being used, a user is given the opportunity to re-edit a +failed history substitution. +

+
+
histverify
+

If set, and Readline +is being used, the results of history substitution are not immediately +passed to the shell parser. Instead, the resulting line is loaded into +the Readline editing buffer, allowing further modification. +

+
+
hostcomplete
+

If set, and Readline is being used, Bash will attempt to perform +hostname completion when a word containing a ‘@’ is being +completed (see Commands For Completion). This option is enabled +by default. +

+
+
huponexit
+

If set, Bash will send SIGHUP to all jobs when an interactive +login shell exits (see Signals). +

+
+
inherit_errexit
+

If set, command substitution inherits the value of the errexit option, +instead of unsetting it in the subshell environment. +This option is enabled when POSIX mode is enabled. +

+
+
interactive_comments
+

Allow a word beginning with ‘#’ +to cause that word and all remaining characters on that +line to be ignored in an interactive shell. +This option is enabled by default. +

+
+
lastpipe
+

If set, and job control is not active, the shell runs the last command of +a pipeline not executed in the background in the current shell environment. +

+
+
lithist
+

If enabled, and the cmdhist +option is enabled, multi-line commands are saved to the history with +embedded newlines rather than using semicolon separators where possible. +

+
+
localvar_inherit
+

If set, local variables inherit the value and attributes of a variable of +the same name that exists at a previous scope before any new value is +assigned. The nameref attribute is not inherited. +

+
+
localvar_unset
+

If set, calling unset on local variables in previous function scopes +marks them so subsequent lookups find them unset until that function +returns. This is identical to the behavior of unsetting local variables +at the current function scope. +

+
+
login_shell
+

The shell sets this option if it is started as a login shell +(see Invoking Bash). +The value may not be changed. +

+
+
mailwarn
+

If set, and a file that Bash is checking for mail has been +accessed since the last time it was checked, the message +"The mail in mailfile has been read" is displayed. +

+
+
no_empty_cmd_completion
+

If set, and Readline is being used, Bash will not attempt to search +the PATH for possible completions when completion is attempted +on an empty line. +

+
+
nocaseglob
+

If set, Bash matches filenames in a case-insensitive fashion when +performing filename expansion. +

+
+
nocasematch
+

If set, Bash matches patterns in a case-insensitive fashion when +performing matching while executing case or [[ +conditional commands, +when performing pattern substitution word expansions, +or when filtering possible completions as part of programmable completion. +

+
+
nullglob
+

If set, Bash allows filename patterns which match no +files to expand to a null string, rather than themselves. +

+
+
progcomp
+

If set, the programmable completion facilities +(see Programmable Completion) are enabled. +This option is enabled by default. +

+
+
progcomp_alias
+

If set, and programmable completion is enabled, Bash treats a command +name that doesn’t have any completions as a possible alias and attempts +alias expansion. If it has an alias, Bash attempts programmable +completion using the command word resulting from the expanded alias. +

+
+
promptvars
+

If set, prompt strings undergo +parameter expansion, command substitution, arithmetic +expansion, and quote removal after being expanded +as described below (see Controlling the Prompt). +This option is enabled by default. +

+
+
restricted_shell
+

The shell sets this option if it is started in restricted mode +(see The Restricted Shell). +The value may not be changed. +This is not reset when the startup files are executed, allowing +the startup files to discover whether or not a shell is restricted. +

+
+
shift_verbose
+

If this is set, the shift +builtin prints an error message when the shift count exceeds the +number of positional parameters. +

+
+
sourcepath
+

If set, the source builtin uses the value of PATH +to find the directory containing the file supplied as an argument. +This option is enabled by default. +

+
+
xpg_echo
+

If set, the echo builtin expands backslash-escape sequences +by default. +

+
+
+
+
+ +
+ +

4.4 Special Builtins

+ + +

For historical reasons, the POSIX standard has classified +several builtin commands as special. +When Bash is executing in POSIX mode, the special builtins +differ from other builtin commands in three respects: +

+
    +
  1. Special builtins are found before shell functions during command lookup. + +
  2. If a special builtin returns an error status, a non-interactive shell exits. + +
  3. Assignment statements preceding the command stay in effect in the shell +environment after the command completes. +
+ +

When Bash is not executing in POSIX mode, these builtins behave no +differently than the rest of the Bash builtin commands. +The Bash POSIX mode is described in Bash POSIX Mode. +

+

These are the POSIX special builtins: +

+
break : . continue eval exec exit export readonly return set
+shift trap unset
+
+ +
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

5 Shell Variables

+ + + + + + +

This chapter describes the shell variables that Bash uses. +Bash automatically assigns default values to a number of variables. +

+
+ +

5.1 Bourne Shell Variables

+ +

Bash uses certain shell variables in the same way as the Bourne shell. +In some cases, Bash assigns a default value to the variable. +

+
+
CDPATH + +
+

A colon-separated list of directories used as a search path for +the cd builtin command. +

+
+
HOME + +
+

The current user’s home directory; the default for the cd builtin +command. +The value of this variable is also used by tilde expansion +(see Tilde Expansion). +

+
+
IFS + +
+

A list of characters that separate fields; used when the shell splits +words as part of expansion. +

+
+
MAIL + +
+

If this parameter is set to a filename or directory name +and the MAILPATH variable +is not set, Bash informs the user of the arrival of mail in +the specified file or Maildir-format directory. +

+
+
MAILPATH + +
+

A colon-separated list of filenames which the shell periodically checks +for new mail. +Each list entry can specify the message that is printed when new mail +arrives in the mail file by separating the filename from the message with +a ‘?’. +When used in the text of the message, $_ expands to the name of +the current mail file. +

+
+
OPTARG + +
+

The value of the last option argument processed by the getopts builtin. +

+
+
OPTIND + +
+

The index of the last option argument processed by the getopts builtin. +

+
+
PATH + +
+

A colon-separated list of directories in which the shell looks for +commands. +A zero-length (null) directory name in the value of PATH indicates the +current directory. +A null directory name may appear as two adjacent colons, or as an initial +or trailing colon. +

+
+
PS1 + +
+

The primary prompt string. The default value is ‘\s-\v\$ ’. +See Controlling the Prompt, for the complete list of escape +sequences that are expanded before PS1 is displayed. +

+
+
PS2 + +
+

The secondary prompt string. The default value is ‘> ’. +PS2 is expanded in the same way as PS1 before being +displayed. +

+
+
+ +
+ +

5.2 Bash Variables

+ +

These variables are set or used by Bash, but other shells +do not normally treat them specially. +

+

A few variables used by Bash are described in different chapters: +variables for controlling the job control facilities +(see Job Control Variables). +

+
+
_ + +
+
+

($_, an underscore.) +At shell startup, set to the pathname used to invoke the +shell or shell script being executed as passed in the environment +or argument list. +Subsequently, expands to the last argument to the previous simple +command executed in the foreground, after expansion. +Also set to the full pathname used to invoke each command executed +and placed in the environment exported to that command. +When checking mail, this parameter holds the name of the mail file. +

+
+
BASH + +
+

The full pathname used to execute the current instance of Bash. +

+
+
BASHOPTS + +
+

A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the -s option to the +shopt builtin command (see The Shopt Builtin). +The options appearing in BASHOPTS are those reported +as ‘on’ by ‘shopt’. +If this variable is in the environment when Bash +starts up, each shell option in the list will be enabled before +reading any startup files. This variable is readonly. +

+
+
BASHPID + +
+

Expands to the process ID of the current Bash process. +This differs from $$ under certain circumstances, such as subshells +that do not require Bash to be re-initialized. +Assignments to BASHPID have no effect. +If BASHPID +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_ALIASES + +
+

An associative array variable whose members correspond to the internal +list of aliases as maintained by the alias builtin. +(see Bourne Shell Builtins). +Elements added to this array appear in the alias list; however, +unsetting array elements currently does not cause aliases to be removed +from the alias list. +If BASH_ALIASES +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_ARGC + +
+

An array variable whose values are the number of parameters in each +frame of the current bash execution call stack. The number of +parameters to the current subroutine (shell function or script executed +with . or source) is at the top of the stack. When a +subroutine is executed, the number of parameters passed is pushed onto +BASH_ARGC. +The shell sets BASH_ARGC only when in extended debugging mode +(see The Shopt Builtin +for a description of the extdebug option to the shopt +builtin). +Setting extdebug after the shell has started to execute a script, +or referencing this variable when extdebug is not set, +may result in inconsistent values. +

+
+
BASH_ARGV + +
+

An array variable containing all of the parameters in the current bash +execution call stack. The final parameter of the last subroutine call +is at the top of the stack; the first parameter of the initial call is +at the bottom. When a subroutine is executed, the parameters supplied +are pushed onto BASH_ARGV. +The shell sets BASH_ARGV only when in extended debugging mode +(see The Shopt Builtin +for a description of the extdebug option to the shopt +builtin). +Setting extdebug after the shell has started to execute a script, +or referencing this variable when extdebug is not set, +may result in inconsistent values. +

+
+
BASH_ARGV0 + +
+

When referenced, this variable expands to the name of the shell or shell +script (identical to $0; See Special Parameters, +for the description of special parameter 0). +Assignment to BASH_ARGV0 +causes the value assigned to also be assigned to $0. +If BASH_ARGV0 +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_CMDS + +
+

An associative array variable whose members correspond to the internal +hash table of commands as maintained by the hash builtin +(see Bourne Shell Builtins). +Elements added to this array appear in the hash table; however, +unsetting array elements currently does not cause command names to be removed +from the hash table. +If BASH_CMDS +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_COMMAND + +
+

The command currently being executed or about to be executed, unless the +shell is executing a command as the result of a trap, +in which case it is the command executing at the time of the trap. +If BASH_COMMAND +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_COMPAT + +
+

The value is used to set the shell’s compatibility level. +See Shell Compatibility Mode, for a description of the various +compatibility levels and their effects. +The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) +corresponding to the desired compatibility level. +If BASH_COMPAT is unset or set to the empty string, the compatibility +level is set to the default for the current version. +If BASH_COMPAT is set to a value that is not one of the valid +compatibility levels, the shell prints an error message and sets the +compatibility level to the default for the current version. +The valid values correspond to the compatibility levels +described below (see Shell Compatibility Mode). +For example, 4.2 and 42 are valid values that correspond +to the compat42 shopt option +and set the compatibility level to 42. +The current version is also a valid value. +

+
+
BASH_ENV + +
+

If this variable is set when Bash is invoked to execute a shell +script, its value is expanded and used as the name of a startup file +to read before executing the script. See Bash Startup Files. +

+
+
BASH_EXECUTION_STRING + +
+

The command argument to the -c invocation option. +

+
+
BASH_LINENO + +
+

An array variable whose members are the line numbers in source files +where each corresponding member of FUNCNAME was invoked. +${BASH_LINENO[$i]} is the line number in the source file +(${BASH_SOURCE[$i+1]}) where +${FUNCNAME[$i]} was called (or ${BASH_LINENO[$i-1]} if +referenced within another shell function). +Use LINENO to obtain the current line number. +

+
+
BASH_LOADABLES_PATH + +
+

A colon-separated list of directories in which the shell looks for +dynamically loadable builtins specified by the +enable command. +

+
+
BASH_REMATCH + +
+

An array variable whose members are assigned by the ‘=~’ binary +operator to the [[ conditional command +(see Conditional Constructs). +The element with index 0 is the portion of the string +matching the entire regular expression. +The element with index n is the portion of the +string matching the nth parenthesized subexpression. +

+
+
BASH_SOURCE + +
+

An array variable whose members are the source filenames where the +corresponding shell function names in the FUNCNAME array +variable are defined. +The shell function ${FUNCNAME[$i]} is defined in the file +${BASH_SOURCE[$i]} and called from ${BASH_SOURCE[$i+1]} +

+
+
BASH_SUBSHELL + +
+

Incremented by one within each subshell or subshell environment when +the shell begins executing in that environment. +The initial value is 0. +If BASH_SUBSHELL +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_VERSINFO + +
+

A readonly array variable (see Arrays) +whose members hold version information for this instance of Bash. +The values assigned to the array members are as follows: +

+
+
BASH_VERSINFO[0]
+

The major version number (the release). +

+
+
BASH_VERSINFO[1]
+

The minor version number (the version). +

+
+
BASH_VERSINFO[2]
+

The patch level. +

+
+
BASH_VERSINFO[3]
+

The build version. +

+
+
BASH_VERSINFO[4]
+

The release status (e.g., beta1). +

+
+
BASH_VERSINFO[5]
+

The value of MACHTYPE. +

+
+ +
+
BASH_VERSION + +
+

The version number of the current instance of Bash. +

+
+
BASH_XTRACEFD + +
+

If set to an integer corresponding to a valid file descriptor, Bash +will write the trace output generated when ‘set -x’ +is enabled to that file descriptor. +This allows tracing output to be separated from diagnostic and error +messages. +The file descriptor is closed when BASH_XTRACEFD is unset or assigned +a new value. +Unsetting BASH_XTRACEFD or assigning it the empty string causes the +trace output to be sent to the standard error. +Note that setting BASH_XTRACEFD to 2 (the standard error file +descriptor) and then unsetting it will result in the standard error +being closed. +

+
+
CHILD_MAX + +
+

Set the number of exited child status values for the shell to remember. +Bash will not allow this value to be decreased below a POSIX-mandated +minimum, and there is a maximum value (currently 8192) that this may +not exceed. +The minimum value is system-dependent. +

+
+
COLUMNS + +
+

Used by the select command to determine the terminal width +when printing selection lists. +Automatically set if the checkwinsize option is enabled +(see The Shopt Builtin), or in an interactive shell upon receipt of a +SIGWINCH. +

+
+
COMP_CWORD + +
+

An index into ${COMP_WORDS} of the word containing the current +cursor position. +This variable is available only in shell functions invoked by the +programmable completion facilities (see Programmable Completion). +

+
+
COMP_LINE + +
+

The current command line. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see Programmable Completion). +

+
+
COMP_POINT + +
+

The index of the current cursor position relative to the beginning of +the current command. +If the current cursor position is at the end of the current command, +the value of this variable is equal to ${#COMP_LINE}. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see Programmable Completion). +

+
+
COMP_TYPE + +
+

Set to an integer value corresponding to the type of completion attempted +that caused a completion function to be called: +TAB, for normal completion, +‘?’, for listing completions after successive tabs, +‘!’, for listing alternatives on partial word completion, +‘@’, to list completions if the word is not unmodified, +or +‘%’, for menu completion. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (see Programmable Completion). +

+
+
COMP_KEY + +
+

The key (or final key of a key sequence) used to invoke the current +completion function. +

+
+
COMP_WORDBREAKS + +
+

The set of characters that the Readline library treats as word +separators when performing word completion. +If COMP_WORDBREAKS +is unset, it loses its special properties, +even if it is subsequently reset. +

+
+
COMP_WORDS + +
+

An array variable consisting of the individual +words in the current command line. +The line is split into words as Readline would split it, using +COMP_WORDBREAKS as described above. +This variable is available only in shell functions invoked by the +programmable completion facilities (see Programmable Completion). +

+
+
COMPREPLY + +
+

An array variable from which Bash reads the possible completions +generated by a shell function invoked by the programmable completion +facility (see Programmable Completion). +Each array element contains one possible completion. +

+
+
COPROC + +
+

An array variable created to hold the file descriptors +for output from and input to an unnamed coprocess (see Coprocesses). +

+
+
DIRSTACK + +
+

An array variable containing the current contents of the directory stack. +Directories appear in the stack in the order they are displayed by the +dirs builtin. +Assigning to members of this array variable may be used to modify +directories already in the stack, but the pushd and popd +builtins must be used to add and remove directories. +Assignment to this variable will not change the current directory. +If DIRSTACK +is unset, it loses its special properties, even if +it is subsequently reset. +

+
+
EMACS + +
+

If Bash finds this variable in the environment when the shell +starts with value ‘t’, it assumes that the shell is running in an +Emacs shell buffer and disables line editing. +

+
+
ENV + +
+

Expanded and executed similarlty to BASH_ENV +(see Bash Startup Files) +when an interactive shell is invoked in +POSIX Mode (see Bash POSIX Mode). +

+
+
EPOCHREALTIME + +
+

Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch as a floating point value with micro-second granularity +(see the documentation for the C library function time for the +definition of Epoch). +Assignments to EPOCHREALTIME are ignored. +If EPOCHREALTIME +is unset, it loses its special properties, even if +it is subsequently reset. +

+
+
EPOCHSECONDS + +
+

Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see the documentation for the C library function +time for the definition of Epoch). +Assignments to EPOCHSECONDS are ignored. +If EPOCHSECONDS +is unset, it loses its special properties, even if +it is subsequently reset. +

+
+
EUID + +
+

The numeric effective user id of the current user. This variable +is readonly. +

+
+
EXECIGNORE + +
+

A colon-separated list of shell patterns (see Pattern Matching) +defining the list of filenames to be ignored by command search using +PATH. +Files whose full pathnames match one of these patterns are not considered +executable files for the purposes of completion and command execution +via PATH lookup. +This does not affect the behavior of the [, test, and [[ +commands. +Full pathnames in the command hash table are not subject to EXECIGNORE. +Use this variable to ignore shared library files that have the executable +bit set, but are not executable files. +The pattern matching honors the setting of the extglob shell +option. +

+
+
FCEDIT + +
+

The editor used as a default by the -e option to the fc +builtin command. +

+
+
FIGNORE + +
+

A colon-separated list of suffixes to ignore when performing +filename completion. +A filename whose suffix matches one of the entries in +FIGNORE +is excluded from the list of matched filenames. A sample +value is ‘.o:~’ +

+
+
FUNCNAME + +
+

An array variable containing the names of all shell functions +currently in the execution call stack. +The element with index 0 is the name of any currently-executing +shell function. +The bottom-most element (the one with the highest index) +is "main". +This variable exists only when a shell function is executing. +Assignments to FUNCNAME have no effect. +If FUNCNAME +is unset, it loses its special properties, even if +it is subsequently reset. +

+

This variable can be used with BASH_LINENO and BASH_SOURCE. +Each element of FUNCNAME has corresponding elements in +BASH_LINENO and BASH_SOURCE to describe the call stack. +For instance, ${FUNCNAME[$i]} was called from the file +${BASH_SOURCE[$i+1]} at line number ${BASH_LINENO[$i]}. +The caller builtin displays the current call stack using this +information. +

+
+
FUNCNEST + +
+

If set to a numeric value greater than 0, defines a maximum function +nesting level. Function invocations that exceed this nesting level +will cause the current command to abort. +

+
+
GLOBIGNORE + +
+

A colon-separated list of patterns defining the set of file names to +be ignored by filename expansion. +If a file name matched by a filename expansion pattern also matches one +of the patterns in GLOBIGNORE, it is removed from the list +of matches. +The pattern matching honors the setting of the extglob shell +option. +

+
+
GROUPS + +
+

An array variable containing the list of groups of which the current +user is a member. +Assignments to GROUPS have no effect. +If GROUPS +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
histchars + +
+

Up to three characters which control history expansion, quick +substitution, and tokenization (see History Interaction). +The first character is the +history expansion character, that is, the character which signifies the +start of a history expansion, normally ‘!’. The second character is the +character which signifies ‘quick substitution’ when seen as the first +character on a line, normally ‘^’. The optional third character is the +character which indicates that the remainder of the line is a comment when +found as the first character of a word, usually ‘#’. The history +comment character causes history substitution to be skipped for the +remaining words on the line. It does not necessarily cause the shell +parser to treat the rest of the line as a comment. +

+
+
HISTCMD + +
+

The history number, or index in the history list, of the current +command. +Assignments to HISTCMD are ignored. +If HISTCMD +is unset, it loses its special properties, +even if it is subsequently reset. +

+
+
HISTCONTROL + +
+

A colon-separated list of values controlling how commands are saved on +the history list. +If the list of values includes ‘ignorespace’, lines which begin +with a space character are not saved in the history list. +A value of ‘ignoredups’ causes lines which match the previous +history entry to not be saved. +A value of ‘ignoreboth’ is shorthand for +‘ignorespace’ and ‘ignoredups’. +A value of ‘erasedups’ causes all previous lines matching the +current line to be removed from the history list before that line +is saved. +Any value not in the above list is ignored. +If HISTCONTROL is unset, or does not include a valid value, +all lines read by the shell parser are saved on the history list, +subject to the value of HISTIGNORE. +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +HISTCONTROL. +

+
+
HISTFILE + +
+

The name of the file to which the command history is saved. The +default value is ~/.bash_history. +

+
+
HISTFILESIZE + +
+

The maximum number of lines contained in the history file. +When this variable is assigned a value, the history file is truncated, +if necessary, to contain no more than that number of lines +by removing the oldest entries. +The history file is also truncated to this size after +writing it when a shell exits. +If the value is 0, the history file is truncated to zero size. +Non-numeric values and numeric values less than zero inhibit truncation. +The shell sets the default value to the value of HISTSIZE +after reading any startup files. +

+
+
HISTIGNORE + +
+

A colon-separated list of patterns used to decide which command +lines should be saved on the history list. Each pattern is +anchored at the beginning of the line and must match the complete +line (no implicit ‘*’ is appended). Each pattern is tested +against the line after the checks specified by HISTCONTROL +are applied. In addition to the normal shell pattern matching +characters, ‘&’ matches the previous history line. ‘&’ +may be escaped using a backslash; the backslash is removed +before attempting a match. +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +HISTIGNORE. +The pattern matching honors the setting of the extglob shell +option. +

+

HISTIGNORE subsumes the function of HISTCONTROL. A +pattern of ‘&’ is identical to ignoredups, and a +pattern of ‘[ ]*’ is identical to ignorespace. +Combining these two patterns, separating them with a colon, +provides the functionality of ignoreboth. +

+
+
HISTSIZE + +
+

The maximum number of commands to remember on the history list. +If the value is 0, commands are not saved in the history list. +Numeric values less than zero result in every command being saved +on the history list (there is no limit). +The shell sets the default value to 500 after reading any startup files. +

+
+
HISTTIMEFORMAT + +
+

If this variable is set and not null, its value is used as a format string +for strftime to print the time stamp associated with each history +entry displayed by the history builtin. +If this variable is set, time stamps are written to the history file so +they may be preserved across shell sessions. +This uses the history comment character to distinguish timestamps from +other history lines. +

+
+
HOSTFILE + +
+

Contains the name of a file in the same format as /etc/hosts that +should be read when the shell needs to complete a hostname. +The list of possible hostname completions may be changed while the shell +is running; +the next time hostname completion is attempted after the +value is changed, Bash adds the contents of the new file to the +existing list. +If HOSTFILE is set, but has no value, or does not name a readable file, +Bash attempts to read +/etc/hosts to obtain the list of possible hostname completions. +When HOSTFILE is unset, the hostname list is cleared. +

+
+
HOSTNAME + +
+

The name of the current host. +

+
+
HOSTTYPE + +
+

A string describing the machine Bash is running on. +

+
+
IGNOREEOF + +
+

Controls the action of the shell on receipt of an EOF character +as the sole input. If set, the value denotes the number +of consecutive EOF characters that can be read as the +first character on an input line +before the shell will exit. If the variable exists but does not +have a numeric value, or has no value, then the default is 10. +If the variable does not exist, then EOF signifies the end of +input to the shell. This is only in effect for interactive shells. +

+
+
INPUTRC + +
+

The name of the Readline initialization file, overriding the default +of ~/.inputrc. +

+
+
INSIDE_EMACS + +
+

If Bash finds this variable in the environment when the shell +starts, it assumes that the shell is running in an Emacs shell buffer +and may disable line editing depending on the value of TERM. +

+
+
LANG + +
+

Used to determine the locale category for any category not specifically +selected with a variable starting with LC_. +

+
+
LC_ALL + +
+

This variable overrides the value of LANG and any other +LC_ variable specifying a locale category. +

+
+
LC_COLLATE + +
+

This variable determines the collation order used when sorting the +results of filename expansion, and +determines the behavior of range expressions, equivalence classes, +and collating sequences within filename expansion and pattern matching +(see Filename Expansion). +

+
+
LC_CTYPE + +
+

This variable determines the interpretation of characters and the +behavior of character classes within filename expansion and pattern +matching (see Filename Expansion). +

+
+
LC_MESSAGES + +
+

This variable determines the locale used to translate double-quoted +strings preceded by a ‘$’ (see Locale Translation). +

+
+
LC_NUMERIC + +
+

This variable determines the locale category used for number formatting. +

+
+
LC_TIME + +
+

This variable determines the locale category used for data and time +formatting. +

+
+
LINENO + +
+

The line number in the script or shell function currently executing. +If LINENO +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
LINES + +
+

Used by the select command to determine the column length +for printing selection lists. +Automatically set if the checkwinsize option is enabled +(see The Shopt Builtin), or in an interactive shell upon receipt of a +SIGWINCH. +

+
+
MACHTYPE + +
+

A string that fully describes the system type on which Bash +is executing, in the standard GNU cpu-company-system format. +

+
+
MAILCHECK + +
+

How often (in seconds) that the shell should check for mail in the +files specified in the MAILPATH or MAIL variables. +The default is 60 seconds. When it is time to check +for mail, the shell does so before displaying the primary prompt. +If this variable is unset, or set to a value that is not a number +greater than or equal to zero, the shell disables mail checking. +

+
+
MAPFILE + +
+

An array variable created to hold the text read by the +mapfile builtin when no variable name is supplied. +

+
+
OLDPWD + +
+

The previous working directory as set by the cd builtin. +

+
+
OPTERR + +
+

If set to the value 1, Bash displays error messages +generated by the getopts builtin command. +

+
+
OSTYPE + +
+

A string describing the operating system Bash is running on. +

+
+
PIPESTATUS + +
+

An array variable (see Arrays) +containing a list of exit status values from the processes +in the most-recently-executed foreground pipeline (which may +contain only a single command). +

+
+
POSIXLY_CORRECT + +
+

If this variable is in the environment when Bash starts, the shell +enters POSIX mode (see Bash POSIX Mode) before reading the +startup files, as if the --posix invocation option had been supplied. +If it is set while the shell is running, Bash enables POSIX mode, +as if the command +

+
set -o posix
+
+

had been executed. +When the shell enters POSIX mode, it sets this variable if it was +not already set. +

+
+
PPID + +
+

The process ID of the shell’s parent process. This variable +is readonly. +

+
+
PROMPT_COMMAND + +
+

If this variable is set, and is an array, +the value of each set element is interpreted as a command to execute +before printing the primary prompt ($PS1). +If this is set but not an array variable, +its value is used as a command to execute instead. +

+
+
PROMPT_DIRTRIM + +
+

If set to a number greater than zero, the value is used as the number of +trailing directory components to retain when expanding the \w and +\W prompt string escapes (see Controlling the Prompt). +Characters removed are replaced with an ellipsis. +

+
+
PS0 + +
+

The value of this parameter is expanded like PS1 +and displayed by interactive shells after reading a command +and before the command is executed. +

+
+
PS3 + +
+

The value of this variable is used as the prompt for the +select command. If this variable is not set, the +select command prompts with ‘#? ’ +

+
+
PS4 + +
+

The value of this parameter is expanded like PS1 +and the expanded value is the prompt printed before the command line +is echoed when the -x option is set (see The Set Builtin). +The first character of the expanded value is replicated multiple times, +as necessary, to indicate multiple levels of indirection. +The default is ‘+ ’. +

+
+
PWD + +
+

The current working directory as set by the cd builtin. +

+
+
RANDOM + +
+

Each time this parameter is referenced, it expands to a random integer +between 0 and 32767. Assigning a value to this +variable seeds the random number generator. +If RANDOM +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
READLINE_LINE + +
+

The contents of the Readline line buffer, for use +with ‘bind -x’ (see Bash Builtins). +

+
+
READLINE_MARK + +
+

The position of the mark (saved insertion point) in the +Readline line buffer, for use +with ‘bind -x’ (see Bash Builtins). +The characters between the insertion point and the mark are often +called the region. +

+
+
READLINE_POINT + +
+

The position of the insertion point in the Readline line buffer, for use +with ‘bind -x’ (see Bash Builtins). +

+
+
REPLY + +
+

The default variable for the read builtin. +

+
+
SECONDS + +
+

This variable expands to the number of seconds since the +shell was started. Assignment to this variable resets +the count to the value assigned, and the expanded value +becomes the value assigned plus the number of seconds +since the assignment. +The number of seconds at shell invocation and the current time is always +determined by querying the system clock. +If SECONDS +is unset, it loses its special properties, +even if it is subsequently reset. +

+
+
SHELL + +
+

This environment variable expands to the full pathname to the shell. +If it is not set when the shell starts, +Bash assigns to it the full pathname of the current user’s login shell. +

+
+
SHELLOPTS + +
+

A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the -o option to the +set builtin command (see The Set Builtin). +The options appearing in SHELLOPTS are those reported +as ‘on’ by ‘set -o’. +If this variable is in the environment when Bash +starts up, each shell option in the list will be enabled before +reading any startup files. This variable is readonly. +

+
+
SHLVL + +
+

Incremented by one each time a new instance of Bash is started. This is +intended to be a count of how deeply your Bash shells are nested. +

+
+
SRANDOM + +
+

This variable expands to a 32-bit pseudo-random number each time it is +referenced. The random number generator is not linear on systems that +support /dev/urandom or arc4random, so each returned number +has no relationship to the numbers preceding it. +The random number generator cannot be seeded, so assignments to this +variable have no effect. +If SRANDOM +is unset, it loses its special properties, +even if it is subsequently reset. +

+
+
TIMEFORMAT + +
+

The value of this parameter is used as a format string specifying +how the timing information for pipelines prefixed with the time +reserved word should be displayed. +The ‘%’ character introduces an +escape sequence that is expanded to a time value or other +information. +The escape sequences and their meanings are as +follows; the braces denote optional portions. +

+
+
%%
+

A literal ‘%’. +

+
+
%[p][l]R
+

The elapsed time in seconds. +

+
+
%[p][l]U
+

The number of CPU seconds spent in user mode. +

+
+
%[p][l]S
+

The number of CPU seconds spent in system mode. +

+
+
%P
+

The CPU percentage, computed as (%U + %S) / %R. +

+
+ +

The optional p is a digit specifying the precision, the number of +fractional digits after a decimal point. +A value of 0 causes no decimal point or fraction to be output. +At most three places after the decimal point may be specified; values +of p greater than 3 are changed to 3. +If p is not specified, the value 3 is used. +

+

The optional l specifies a longer format, including minutes, of +the form MMmSS.FFs. +The value of p determines whether or not the fraction is included. +

+

If this variable is not set, Bash acts as if it had the value +

+
$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'
+
+

If the value is null, no timing information is displayed. +A trailing newline is added when the format string is displayed. +

+
+
TMOUT + +
+

If set to a value greater than zero, TMOUT is treated as the +default timeout for the read builtin (see Bash Builtins). +The select command (see Conditional Constructs) terminates +if input does not arrive after TMOUT seconds when input is coming +from a terminal. +

+

In an interactive shell, the value is interpreted as +the number of seconds to wait for a line of input after issuing +the primary prompt. +Bash +terminates after waiting for that number of seconds if a complete +line of input does not arrive. +

+
+
TMPDIR + +
+

If set, Bash uses its value as the name of a directory in which +Bash creates temporary files for the shell’s use. +

+
+
UID + +
+

The numeric real user id of the current user. This variable is readonly. +

+
+
+ +
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

6 Bash Features

+ +

This chapter describes features unique to Bash. +

+ + + + + + + + + + + + + + + +
+ +

6.1 Invoking Bash

+ +
+
bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o option]
+    [-O shopt_option] [argument …]
+bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o option]
+    [-O shopt_option] -c string [argument …]
+bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o option]
+    [-O shopt_option] [argument …]
+
+ +

All of the single-character options used with the set builtin +(see The Set Builtin) can be used as options when the shell is invoked. +In addition, there are several multi-character +options that you can use. These options must appear on the command +line before the single-character options to be recognized. +

+
+
--debugger
+

Arrange for the debugger profile to be executed before the shell +starts. Turns on extended debugging mode (see The Shopt Builtin +for a description of the extdebug option to the shopt +builtin). +

+
+
--dump-po-strings
+

A list of all double-quoted strings preceded by ‘$’ +is printed on the standard output +in the GNU gettext PO (portable object) file format. +Equivalent to -D except for the output format. +

+
+
--dump-strings
+

Equivalent to -D. +

+
+
--help
+

Display a usage message on standard output and exit successfully. +

+
+
--init-file filename
+
--rcfile filename
+

Execute commands from filename (instead of ~/.bashrc) +in an interactive shell. +

+
+
--login
+

Equivalent to -l. +

+
+
--noediting
+

Do not use the GNU Readline library (see Command Line Editing) +to read command lines when the shell is interactive. +

+
+
--noprofile
+

Don’t load the system-wide startup file /etc/profile +or any of the personal initialization files +~/.bash_profile, ~/.bash_login, or ~/.profile +when Bash is invoked as a login shell. +

+
+
--norc
+

Don’t read the ~/.bashrc initialization file in an +interactive shell. This is on by default if the shell is +invoked as sh. +

+
+
--posix
+

Change the behavior of Bash where the default operation differs +from the POSIX standard to match the standard. This +is intended to make Bash behave as a strict superset of that +standard. See Bash POSIX Mode, for a description of the Bash +POSIX mode. +

+
+
--restricted
+

Make the shell a restricted shell (see The Restricted Shell). +

+
+
--verbose
+

Equivalent to -v. Print shell input lines as they’re read. +

+
+
--version
+

Show version information for this instance of +Bash on the standard output and exit successfully. +

+
+ +

There are several single-character options that may be supplied at +invocation which are not available with the set builtin. +

+
+
-c
+

Read and execute commands from the first non-option argument +command_string, then exit. +If there are arguments after the command_string, +the first argument is assigned to $0 +and any remaining arguments are assigned to the positional parameters. +The assignment to $0 sets the name of the shell, which is used +in warning and error messages. +

+
+
-i
+

Force the shell to run interactively. Interactive shells are +described in Interactive Shells. +

+
+
-l
+

Make this shell act as if it had been directly invoked by login. +When the shell is interactive, this is equivalent to starting a +login shell with ‘exec -l bash’. +When the shell is not interactive, the login shell startup files will +be executed. +‘exec bash -l’ or ‘exec bash --login’ +will replace the current shell with a Bash login shell. +See Bash Startup Files, for a description of the special behavior +of a login shell. +

+
+
-r
+

Make the shell a restricted shell (see The Restricted Shell). +

+
+
-s
+

If this option is present, or if no arguments remain after option +processing, then commands are read from the standard input. +This option allows the positional parameters to be set +when invoking an interactive shell or when reading input +through a pipe. +

+
+
-D
+

A list of all double-quoted strings preceded by ‘$’ +is printed on the standard output. +These are the strings that +are subject to language translation when the current locale +is not C or POSIX (see Locale Translation). +This implies the -n option; no commands will be executed. +

+
+
[-+]O [shopt_option]
+

shopt_option is one of the shell options accepted by the +shopt builtin (see The Shopt Builtin). +If shopt_option is present, -O sets the value of that option; ++O unsets it. +If shopt_option is not supplied, the names and values of the shell +options accepted by shopt are printed on the standard output. +If the invocation option is +O, the output is displayed in a format +that may be reused as input. +

+
+
--
+

A -- signals the end of options and disables further option +processing. +Any arguments after the -- are treated as filenames and arguments. +

+
+ + +

A login shell is one whose first character of argument zero is +‘-’, or one invoked with the --login option. +

+ +

An interactive shell is one started without non-option arguments, +unless -s is specified, +without specifying the -c option, and whose input and output are both +connected to terminals (as determined by isatty(3)), or one +started with the -i option. See Interactive Shells, for more +information. +

+

If arguments remain after option processing, and neither the +-c nor the -s +option has been supplied, the first argument is assumed to +be the name of a file containing shell commands (see Shell Scripts). +When Bash is invoked in this fashion, $0 +is set to the name of the file, and the positional parameters +are set to the remaining arguments. +Bash reads and executes commands from this file, then exits. +Bash’s exit status is the exit status of the last command executed +in the script. If no commands are executed, the exit status is 0. +

+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

6.2 Bash Startup Files

+ + +

This section describes how Bash executes its startup files. +If any of the files exist but cannot be read, Bash reports an error. +Tildes are expanded in filenames as described above under +Tilde Expansion (see Tilde Expansion). +

+

Interactive shells are described in Interactive Shells. +

+

Invoked as an interactive login shell, or with --login

+ +

When Bash is invoked as an interactive login shell, or as a +non-interactive shell with the --login option, it first reads and +executes commands from the file /etc/profile, if that file exists. +After reading that file, it looks for ~/.bash_profile, +~/.bash_login, and ~/.profile, in that order, and reads +and executes commands from the first one that exists and is readable. +The --noprofile option may be used when the shell is started to +inhibit this behavior. +

+

When an interactive login shell exits, +or a non-interactive login shell executes the exit builtin command, +Bash reads and executes commands from +the file ~/.bash_logout, if it exists. +

+

Invoked as an interactive non-login shell

+ +

When an interactive shell that is not a login shell is started, Bash +reads and executes commands from ~/.bashrc, if that file exists. +This may be inhibited by using the --norc option. +The --rcfile file option will force Bash to read and +execute commands from file instead of ~/.bashrc. +

+

So, typically, your ~/.bash_profile contains the line +

+
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
+
+

after (or before) any login-specific initializations. +

+

Invoked non-interactively

+ +

When Bash is started non-interactively, to run a shell script, +for example, it looks for the variable BASH_ENV in the environment, +expands its value if it appears there, and uses the expanded value as +the name of a file to read and execute. Bash behaves as if the +following command were executed: +

+
if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
+
+

but the value of the PATH variable is not used to search for the +filename. +

+

As noted above, if a non-interactive shell is invoked with the +--login option, Bash attempts to read and execute commands from the +login shell startup files. +

+

Invoked with name sh

+ +

If Bash is invoked with the name sh, it tries to mimic the +startup behavior of historical versions of sh as closely as +possible, while conforming to the POSIX standard as well. +

+

When invoked as an interactive login shell, or as a non-interactive +shell with the --login option, it first attempts to read +and execute commands from /etc/profile and ~/.profile, in +that order. +The --noprofile option may be used to inhibit this behavior. +When invoked as an interactive shell with the name sh, Bash +looks for the variable ENV, expands its value if it is defined, +and uses the expanded value as the name of a file to read and execute. +Since a shell invoked as sh does not attempt to read and execute +commands from any other startup files, the --rcfile option has +no effect. +A non-interactive shell invoked with the name sh does not attempt +to read any other startup files. +

+

When invoked as sh, Bash enters POSIX mode after +the startup files are read. +

+

Invoked in POSIX mode

+ +

When Bash is started in POSIX mode, as with the +--posix command line option, it follows the POSIX standard +for startup files. +In this mode, interactive shells expand the ENV variable +and commands are read and executed from the file whose name is the +expanded value. +No other startup files are read. +

+

Invoked by remote shell daemon

+ +

Bash attempts to determine when it is being run with its standard input +connected to a network connection, as when executed by the remote shell +daemon, usually rshd, or the secure shell daemon sshd. +If Bash determines it is being run in +this fashion, it reads and executes commands from ~/.bashrc, if that +file exists and is readable. +It will not do this if invoked as sh. +The --norc option may be used to inhibit this behavior, and the +--rcfile option may be used to force another file to be read, but +neither rshd nor sshd generally invoke the shell with those +options or allow them to be specified. +

+

Invoked with unequal effective and real UID/GIDs

+ +

If Bash is started with the effective user (group) id not equal to the +real user (group) id, and the -p option is not supplied, no startup +files are read, shell functions are not inherited from the environment, +the SHELLOPTS, BASHOPTS, CDPATH, and GLOBIGNORE +variables, if they appear in the environment, are ignored, and the effective +user id is set to the real user id. +If the -p option is supplied at invocation, the startup behavior is +the same, but the effective user id is not reset. +

+
+ +

6.3 Interactive Shells

+ + + + + + + + + +
+ +

6.3.1 What is an Interactive Shell?

+ +

An interactive shell +is one started without non-option arguments, unless -s is +specified, without specifying the -c option, and +whose input and error output are both +connected to terminals (as determined by isatty(3)), +or one started with the -i option. +

+

An interactive shell generally reads from and writes to a user’s +terminal. +

+

The -s invocation option may be used to set the positional parameters +when an interactive shell is started. +

+
+ +

6.3.2 Is this Shell Interactive?

+ +

To determine within a startup script whether or not Bash is +running interactively, +test the value of the ‘-’ special parameter. +It contains i when the shell is interactive. For example: +

+
+
case "$-" in
+*i*)	echo This shell is interactive ;;
+*)	echo This shell is not interactive ;;
+esac
+
+ +

Alternatively, startup scripts may examine the variable +PS1; it is unset in non-interactive shells, and set in +interactive shells. Thus: +

+
+
if [ -z "$PS1" ]; then
+        echo This shell is not interactive
+else
+        echo This shell is interactive
+fi
+
+ +
+ +

6.3.3 Interactive Shell Behavior

+ +

When the shell is running interactively, it changes its behavior in +several ways. +

+
    +
  1. Startup files are read and executed as described in Bash Startup Files. + +
  2. Job Control (see Job Control) is enabled by default. When job +control is in effect, Bash ignores the keyboard-generated job control +signals SIGTTIN, SIGTTOU, and SIGTSTP. + +
  3. Bash expands and displays PS1 before reading the first line +of a command, and expands and displays PS2 before reading the +second and subsequent lines of a multi-line command. +Bash expands and displays PS0 after it reads a command but before +executing it. +See Controlling the Prompt, for a complete list of prompt +string escape sequences. + +
  4. Bash executes the values of the set elements of the PROMPT_COMMANDS +array variable as commands before printing the primary prompt, $PS1 +(see Bash Variables). + +
  5. Readline (see Command Line Editing) is used to read commands from +the user’s terminal. + +
  6. Bash inspects the value of the ignoreeof option to set -o +instead of exiting immediately when it receives an EOF on its +standard input when reading a command (see The Set Builtin). + +
  7. Command history (see Bash History Facilities) +and history expansion (see History Interaction) +are enabled by default. +Bash will save the command history to the file named by $HISTFILE +when a shell with history enabled exits. + +
  8. Alias expansion (see Aliases) is performed by default. + +
  9. In the absence of any traps, Bash ignores SIGTERM +(see Signals). + +
  10. In the absence of any traps, SIGINT is caught and handled +(see Signals). +SIGINT will interrupt some shell builtins. + +
  11. An interactive login shell sends a SIGHUP to all jobs on exit +if the huponexit shell option has been enabled (see Signals). + +
  12. The -n invocation option is ignored, and ‘set -n’ has +no effect (see The Set Builtin). + +
  13. Bash will check for mail periodically, depending on the values of the +MAIL, MAILPATH, and MAILCHECK shell variables +(see Bash Variables). + +
  14. Expansion errors due to references to unbound shell variables after +‘set -u’ has been enabled will not cause the shell to exit +(see The Set Builtin). + +
  15. The shell will not exit on expansion errors caused by var being unset +or null in ${var:?word} expansions +(see Shell Parameter Expansion). + +
  16. Redirection errors encountered by shell builtins will not cause the +shell to exit. + +
  17. When running in POSIX mode, a special builtin returning an error +status will not cause the shell to exit (see Bash POSIX Mode). + +
  18. A failed exec will not cause the shell to exit +(see Bourne Shell Builtins). + +
  19. Parser syntax errors will not cause the shell to exit. + +
  20. Simple spelling correction for directory arguments to the cd +builtin is enabled by default (see the description of the cdspell +option to the shopt builtin in The Shopt Builtin). + +
  21. The shell will check the value of the TMOUT variable and exit +if a command is not read within the specified number of seconds after +printing $PS1 (see Bash Variables). + +
+ +
+ +

6.4 Bash Conditional Expressions

+ + +

Conditional expressions are used by the [[ compound command +and the test and [ builtin commands. The test +and [ commands determine their behavior based on the number +of arguments; see the descriptions of those commands for any other +command-specific actions. +

+

Expressions may be unary or binary, +and are formed from the following primaries. +Unary expressions are often used to examine the status of a file. +There are string operators and numeric comparison operators as well. +Bash handles several filenames specially when they are used in +expressions. +If the operating system on which Bash is running provides these +special files, Bash will use them; otherwise it will emulate them +internally with this behavior: +If the file argument to one of the primaries is of the form +/dev/fd/N, then file descriptor N is checked. +If the file argument to one of the primaries is one of +/dev/stdin, /dev/stdout, or /dev/stderr, file +descriptor 0, 1, or 2, respectively, is checked. +

+

When used with [[, the ‘<’ and ‘>’ operators sort +lexicographically using the current locale. +The test command uses ASCII ordering. +

+

Unless otherwise specified, primaries that operate on files follow symbolic +links and operate on the target of the link, rather than the link itself. +

+
+
-a file
+

True if file exists. +

+
+
-b file
+

True if file exists and is a block special file. +

+
+
-c file
+

True if file exists and is a character special file. +

+
+
-d file
+

True if file exists and is a directory. +

+
+
-e file
+

True if file exists. +

+
+
-f file
+

True if file exists and is a regular file. +

+
+
-g file
+

True if file exists and its set-group-id bit is set. +

+
+
-h file
+

True if file exists and is a symbolic link. +

+
+
-k file
+

True if file exists and its "sticky" bit is set. +

+
+
-p file
+

True if file exists and is a named pipe (FIFO). +

+
+
-r file
+

True if file exists and is readable. +

+
+
-s file
+

True if file exists and has a size greater than zero. +

+
+
-t fd
+

True if file descriptor fd is open and refers to a terminal. +

+
+
-u file
+

True if file exists and its set-user-id bit is set. +

+
+
-w file
+

True if file exists and is writable. +

+
+
-x file
+

True if file exists and is executable. +

+
+
-G file
+

True if file exists and is owned by the effective group id. +

+
+
-L file
+

True if file exists and is a symbolic link. +

+
+
-N file
+

True if file exists and has been modified since it was last read. +

+
+
-O file
+

True if file exists and is owned by the effective user id. +

+
+
-S file
+

True if file exists and is a socket. +

+
+
file1 -ef file2
+

True if file1 and file2 refer to the same device and +inode numbers. +

+
+
file1 -nt file2
+

True if file1 is newer (according to modification date) +than file2, or if file1 exists and file2 does not. +

+
+
file1 -ot file2
+

True if file1 is older than file2, +or if file2 exists and file1 does not. +

+
+
-o optname
+

True if the shell option optname is enabled. +The list of options appears in the description of the -o +option to the set builtin (see The Set Builtin). +

+
+
-v varname
+

True if the shell variable varname is set (has been assigned a value). +

+
+
-R varname
+

True if the shell variable varname is set and is a name reference. +

+
+
-z string
+

True if the length of string is zero. +

+
+
-n string
+
string
+

True if the length of string is non-zero. +

+
+
string1 == string2
+
string1 = string2
+

True if the strings are equal. +When used with the [[ command, this performs pattern matching as +described above (see Conditional Constructs). +

+

=’ should be used with the test command for POSIX conformance. +

+
+
string1 != string2
+

True if the strings are not equal. +

+
+
string1 < string2
+

True if string1 sorts before string2 lexicographically. +

+
+
string1 > string2
+

True if string1 sorts after string2 lexicographically. +

+
+
arg1 OP arg2
+

OP is one of +‘-eq’, ‘-ne’, ‘-lt’, ‘-le’, ‘-gt’, or ‘-ge’. +These arithmetic binary operators return true if arg1 +is equal to, not equal to, less than, less than or equal to, +greater than, or greater than or equal to arg2, +respectively. Arg1 and arg2 +may be positive or negative integers. +When used with the [[ command, Arg1 and Arg2 +are evaluated as arithmetic expressions (see Shell Arithmetic). +

+
+ +
+ +

6.5 Shell Arithmetic

+ + + + + + +

The shell allows arithmetic expressions to be evaluated, as one of +the shell expansions or by using the (( compound command, the +let builtin, or the -i option to the declare builtin. +

+

Evaluation is done in fixed-width integers with no check for overflow, +though division by 0 is trapped and flagged as an error. +The operators and their precedence, associativity, and values +are the same as in the C language. +The following list of operators is grouped into levels of +equal-precedence operators. +The levels are listed in order of decreasing precedence. +

+
+
id++ id--
+

variable post-increment and post-decrement +

+
+
++id --id
+

variable pre-increment and pre-decrement +

+
+
- +
+

unary minus and plus +

+
+
! ~
+

logical and bitwise negation +

+
+
**
+

exponentiation +

+
+
* / %
+

multiplication, division, remainder +

+
+
+ -
+

addition, subtraction +

+
+
<< >>
+

left and right bitwise shifts +

+
+
<= >= < >
+

comparison +

+
+
== !=
+

equality and inequality +

+
+
&
+

bitwise AND +

+
+
^
+

bitwise exclusive OR +

+
+
|
+

bitwise OR +

+
+
&&
+

logical AND +

+
+
||
+

logical OR +

+
+
expr ? expr : expr
+

conditional operator +

+
+
= *= /= %= += -= <<= >>= &= ^= |=
+

assignment +

+
+
expr1 , expr2
+

comma +

+
+ +

Shell variables are allowed as operands; parameter expansion is +performed before the expression is evaluated. +Within an expression, shell variables may also be referenced by name +without using the parameter expansion syntax. +A shell variable that is null or unset evaluates to 0 when referenced +by name without using the parameter expansion syntax. +The value of a variable is evaluated as an arithmetic expression +when it is referenced, or when a variable which has been given the +integer attribute using ‘declare -i’ is assigned a value. +A null value evaluates to 0. +A shell variable need not have its integer attribute turned on +to be used in an expression. +

+

Integer constants follow the C language definition, without suffixes or +character constants. +Constants with a leading 0 are interpreted as octal numbers. +A leading ‘0x’ or ‘0X’ denotes hexadecimal. Otherwise, +numbers take the form [base#]n, where the optional base +is a decimal number between 2 and 64 representing the arithmetic +base, and n is a number in that base. +If base# is omitted, then base 10 is used. +When specifying n, +if a non-digit is required, +the digits greater than 9 are represented by the lowercase letters, +the uppercase letters, ‘@’, and ‘_’, in that order. +If base is less than or equal to 36, lowercase and uppercase +letters may be used interchangeably to represent numbers between 10 +and 35. +

+

Operators are evaluated in order of precedence. Sub-expressions in +parentheses are evaluated first and may override the precedence +rules above. +

+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

6.6 Aliases

+ + +

Aliases allow a string to be substituted for a word when it is used +as the first word of a simple command. +The shell maintains a list of aliases that may be set and unset with +the alias and unalias builtin commands. +

+

The first word of each simple command, if unquoted, is checked to see +if it has an alias. +If so, that word is replaced by the text of the alias. +The characters ‘/’, ‘$’, ‘`’, ‘=’ and any of the +shell metacharacters or quoting characters listed above may not appear +in an alias name. +The replacement text may contain any valid +shell input, including shell metacharacters. +The first word of the replacement text is tested for +aliases, but a word that is identical to an alias being expanded +is not expanded a second time. +This means that one may alias ls to "ls -F", +for instance, and Bash does not try to recursively expand the +replacement text. +If the last character of the alias value is a +blank, then the next command word following the +alias is also checked for alias expansion. +

+

Aliases are created and listed with the alias +command, and removed with the unalias command. +

+

There is no mechanism for using arguments in the replacement text, +as in csh. +If arguments are needed, a shell function should be used +(see Shell Functions). +

+

Aliases are not expanded when the shell is not interactive, +unless the expand_aliases shell option is set using +shopt (see The Shopt Builtin). +

+

The rules concerning the definition and use of aliases are +somewhat confusing. Bash +always reads at least one complete line of input, +and all lines that make up a compound command, +before executing any of the commands on that line or the compound command. +Aliases are expanded when a +command is read, not when it is executed. Therefore, an +alias definition appearing on the same line as another +command does not take effect until the next line of input is read. +The commands following the alias definition +on that line are not affected by the new alias. +This behavior is also an issue when functions are executed. +Aliases are expanded when a function definition is read, +not when the function is executed, because a function definition +is itself a command. As a consequence, aliases +defined in a function are not available until after that +function is executed. To be safe, always put +alias definitions on a separate line, and do not use alias +in compound commands. +

+

For almost every purpose, shell functions are preferred over aliases. +

+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

6.7 Arrays

+ + +

Bash provides one-dimensional indexed and associative array variables. +Any variable may be used as an indexed array; +the declare builtin will explicitly declare an array. +There is no maximum +limit on the size of an array, nor any requirement that members +be indexed or assigned contiguously. +Indexed arrays are referenced using integers (including arithmetic +expressions (see Shell Arithmetic)) and are zero-based; +associative arrays use arbitrary strings. +Unless otherwise noted, indexed array indices must be non-negative integers. +

+

An indexed array is created automatically if any variable is assigned to +using the syntax +

+
name[subscript]=value
+
+ +

The subscript +is treated as an arithmetic expression that must evaluate to a number. +To explicitly declare an array, use +

+
declare -a name
+
+

The syntax +

+
declare -a name[subscript]
+
+

is also accepted; the subscript is ignored. +

+

Associative arrays are created using +

+
declare -A name
+
+ +

Attributes may be +specified for an array variable using the declare and +readonly builtins. Each attribute applies to all members of +an array. +

+

Arrays are assigned to using compound assignments of the form +

+
name=(value1 value2 … )
+
+

where each +value may be of the form [subscript]=string. +Indexed array assignments do not require anything but string. +When assigning to indexed arrays, if +the optional subscript is supplied, that index is assigned to; +otherwise the index of the element assigned is the last index assigned +to by the statement plus one. Indexing starts at zero. +

+

Each value in the list undergoes all the shell expansions +described above (see Shell Expansions). +

+

When assigning to an associative array, the words in a compound assignment +may be either assignment statements, for which the subscript is required, +or a list of words that is interpreted as a sequence of alternating keys +and values: +name=(key1 value1 key2 value2 … ). +These are treated identically to +name=( [key1]=value1 [key2]=value2 … ). +The first word in the list determines how the remaining words +are interpreted; all assignments in a list must be of the same type. +When using key/value pairs, the keys may not be missing or empty; +a final missing value is treated like the empty string. +

+

This syntax is also accepted by the declare +builtin. Individual array elements may be assigned to using the +name[subscript]=value syntax introduced above. +

+

When assigning to an indexed array, if name +is subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +name, so negative indices count back from the end of the +array, and an index of -1 references the last element. +

+

Any element of an array may be referenced using +${name[subscript]}. +The braces are required to avoid +conflicts with the shell’s filename expansion operators. If the +subscript is ‘@’ or ‘*’, the word expands to all members +of the array name. These subscripts differ only when the word +appears within double quotes. +If the word is double-quoted, +${name[*]} expands to a single word with +the value of each array member separated by the first character of the +IFS variable, and ${name[@]} expands each element of +name to a separate word. When there are no array members, +${name[@]} expands to nothing. +If the double-quoted expansion occurs within a word, the expansion of +the first parameter is joined with the beginning part of the original +word, and the expansion of the last parameter is joined with the last +part of the original word. +This is analogous to the +expansion of the special parameters ‘@’ and ‘*’. +${#name[subscript]} expands to the length of +${name[subscript]}. +If subscript is ‘@’ or +‘*’, the expansion is the number of elements in the array. +If the subscript +used to reference an element of an indexed array +evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the array, +so negative indices count back from the end of the array, +and an index of -1 refers to the last element. +

+

Referencing an array variable without a subscript is equivalent to +referencing with a subscript of 0. +Any reference to a variable using a valid subscript is legal, and +bash will create an array if necessary. +

+

An array variable is considered set if a subscript has been assigned a +value. The null string is a valid value. +

+

It is possible to obtain the keys (indices) of an array as well as the values. +${!name[@]} and ${!name[*]} expand to the indices +assigned in array variable name. +The treatment when in double quotes is similar to the expansion of the +special parameters ‘@’ and ‘*’ within double quotes. +

+

The unset builtin is used to destroy arrays. +unset name[subscript] +destroys the array element at index subscript. +Negative subscripts to indexed arrays are interpreted as described above. +Unsetting the last element of an array variable does not unset the variable. +unset name, where name is an array, removes the +entire array. A subscript of ‘*’ or ‘@’ also removes the +entire array. +

+

When using a variable name with a subscript as an argument to a command, +such as with unset, without using the word expansion syntax +described above, the argument is subject to the shell’s filename expansion. +If filename expansion is not desired, the argument should be quoted. +

+

The declare, local, and readonly +builtins each accept a -a option to specify an indexed +array and a -A option to specify an associative array. +If both options are supplied, -A takes precedence. +The read builtin accepts a -a +option to assign a list of words read from the standard input +to an array, and can read values from the standard input into +individual array elements. The set and declare +builtins display array values in a way that allows them to be +reused as input. +

+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

6.8 The Directory Stack

+ + + + + + +

The directory stack is a list of recently-visited directories. The +pushd builtin adds directories to the stack as it changes +the current directory, and the popd builtin removes specified +directories from the stack and changes the current directory to +the directory removed. The dirs builtin displays the contents +of the directory stack. The current directory is always the "top" +of the directory stack. +

+

The contents of the directory stack are also visible +as the value of the DIRSTACK shell variable. +

+
+ +

6.8.1 Directory Stack Builtins

+ +
+
dirs
+
+
+
dirs [-clpv] [+N | -N]
+
+ +

Display the list of currently remembered directories. Directories +are added to the list with the pushd command; the +popd command removes directories from the list. +The current directory is always the first directory in the stack. +

+
+
-c
+

Clears the directory stack by deleting all of the elements. +

+
-l
+

Produces a listing using full pathnames; +the default listing format uses a tilde to denote the home directory. +

+
-p
+

Causes dirs to print the directory stack with one entry per +line. +

+
-v
+

Causes dirs to print the directory stack with one entry per +line, prefixing each entry with its index in the stack. +

+
+N
+

Displays the Nth directory (counting from the left of the +list printed by dirs when invoked without options), starting +with zero. +

+
-N
+

Displays the Nth directory (counting from the right of the +list printed by dirs when invoked without options), starting +with zero. +

+
+ +
+
popd
+
+
+
popd [-n] [+N | -N]
+
+ +

When no arguments are given, popd +removes the top directory from the stack and +performs a cd to the new top directory. +The elements are numbered from 0 starting at the first directory +listed with dirs; that is, popd is equivalent to popd +0. +

+
+
-n
+

Suppresses the normal change of directory when removing directories +from the stack, so that only the stack is manipulated. +

+
+N
+

Removes the Nth directory (counting from the left of the +list printed by dirs), starting with zero. +

+
-N
+

Removes the Nth directory (counting from the right of the +list printed by dirs), starting with zero. +

+
+ + +
+
pushd
+
+
pushd [-n] [+N | -N | dir]
+
+ +

Save the current directory on the top of the directory stack +and then cd to dir. +With no arguments, pushd exchanges the top two directories +and makes the new top the current directory. +

+
+
-n
+

Suppresses the normal change of directory when rotating or +adding directories to the stack, so that only the stack is manipulated. +

+
+N
+

Brings the Nth directory (counting from the left of the +list printed by dirs, starting with zero) to the top of +the list by rotating the stack. +

+
-N
+

Brings the Nth directory (counting from the right of the +list printed by dirs, starting with zero) to the top of +the list by rotating the stack. +

+
dir
+

Makes dir be the top of the stack, making +it the new current directory as if it had been supplied as an argument +to the cd builtin. +

+
+
+
+ +
+ +

6.9 Controlling the Prompt

+ + +

Bash examines the value of the array variable PROMPT_COMMANDS just before +printing each primary prompt. +If any elements in PROMPT_COMMANDS are set and non-null, Bash +executes each value, in numeric order, +just as if it had been typed on the command line. +

+

In addition, the following table describes the special characters which +can appear in the prompt variables PS0, PS1, PS2, and +PS4: +

+
+
\a
+

A bell character. +

+
\d
+

The date, in "Weekday Month Date" format (e.g., "Tue May 26"). +

+
\D{format}
+

The format is passed to strftime(3) and the result is inserted +into the prompt string; an empty format results in a locale-specific +time representation. The braces are required. +

+
\e
+

An escape character. +

+
\h
+

The hostname, up to the first ‘.’. +

+
\H
+

The hostname. +

+
\j
+

The number of jobs currently managed by the shell. +

+
\l
+

The basename of the shell’s terminal device name. +

+
\n
+

A newline. +

+
\r
+

A carriage return. +

+
\s
+

The name of the shell, the basename of $0 (the portion +following the final slash). +

+
\t
+

The time, in 24-hour HH:MM:SS format. +

+
\T
+

The time, in 12-hour HH:MM:SS format. +

+
\@
+

The time, in 12-hour am/pm format. +

+
\A
+

The time, in 24-hour HH:MM format. +

+
\u
+

The username of the current user. +

+
\v
+

The version of Bash (e.g., 2.00) +

+
\V
+

The release of Bash, version + patchlevel (e.g., 2.00.0) +

+
\w
+

The current working directory, with $HOME abbreviated with a tilde +(uses the $PROMPT_DIRTRIM variable). +

+
\W
+

The basename of $PWD, with $HOME abbreviated with a tilde. +

+
\!
+

The history number of this command. +

+
\#
+

The command number of this command. +

+
\$
+

If the effective uid is 0, #, otherwise $. +

+
\nnn
+

The character whose ASCII code is the octal value nnn. +

+
\\
+

A backslash. +

+
\[
+

Begin a sequence of non-printing characters. This could be used to +embed a terminal control sequence into the prompt. +

+
\]
+

End a sequence of non-printing characters. +

+
+ +

The command number and the history number are usually different: +the history number of a command is its position in the history +list, which may include commands restored from the history file +(see Bash History Facilities), while the command number is +the position in the sequence of commands executed during the current +shell session. +

+

After the string is decoded, it is expanded via +parameter expansion, command substitution, arithmetic +expansion, and quote removal, subject to the value of the +promptvars shell option (see The Shopt Builtin). +This can have unwanted side effects if escaped portions of the string +appear within command substitution or contain characters special to +word expansion. +

+
+ +

6.10 The Restricted Shell

+ + +

If Bash is started with the name rbash, or the +--restricted +or +-r +option is supplied at invocation, the shell becomes restricted. +A restricted shell is used to +set up an environment more controlled than the standard shell. +A restricted shell behaves identically to bash +with the exception that the following are disallowed or not performed: +

+
    +
  • Changing directories with the cd builtin. +
  • Setting or unsetting the values of the SHELL, PATH, +HISTFILE, +ENV, or BASH_ENV variables. +
  • Specifying command names containing slashes. +
  • Specifying a filename containing a slash as an argument to the . +builtin command. +
  • Specifying a filename containing a slash as an argument to the history +builtin command. +
  • Specifying a filename containing a slash as an argument to the -p +option to the hash builtin command. +
  • Importing function definitions from the shell environment at startup. +
  • Parsing the value of SHELLOPTS from the shell environment at startup. +
  • Redirecting output using the ‘>’, ‘>|’, ‘<>’, ‘>&’, +‘&>’, and ‘>>’ redirection operators. +
  • Using the exec builtin to replace the shell with another command. +
  • Adding or deleting builtin commands with the +-f and -d options to the enable builtin. +
  • Using the enable builtin command to enable disabled shell builtins. +
  • Specifying the -p option to the command builtin. +
  • Turning off restricted mode with ‘set +r’ or ‘set +o restricted’. +
+ +

These restrictions are enforced after any startup files are read. +

+

When a command that is found to be a shell script is executed +(see Shell Scripts), rbash turns off any restrictions in +the shell spawned to execute the script. +

+

The restricted shell mode is only one component of a useful restricted +environment. It should be accompanied by setting PATH to a value +that allows execution of only a few verified commands (commands that +allow shell escapes are particularly vulnerable), leaving the user +in a non-writable directory other than his home directory after login, +not allowing the restricted shell to execute shell scripts, and cleaning +the environment of variables that cause some commands to modify their +behavior (e.g., VISUAL or PAGER). +

+

Modern systems provide more secure ways to implement a restricted environment, +such as jails, zones, or containers. +

+ +
+ +

6.11 Bash POSIX Mode

+ + +

Starting Bash with the --posix command-line option or executing +‘set -o posix’ while Bash is running will cause Bash to conform more +closely to the POSIX standard by changing the behavior to +match that specified by POSIX in areas where the Bash default differs. +

+

When invoked as sh, Bash enters POSIX mode after reading the +startup files. +

+

The following list is what’s changed when ‘POSIX mode’ is in effect: +

+
    +
  1. Bash ensures that the POSIXLY_CORRECT variable is set. + +
  2. When a command in the hash table no longer exists, Bash will re-search +$PATH to find the new location. This is also available with +‘shopt -s checkhash’. + +
  3. Bash will not insert a command without the execute bit set into the +command hash table, even if it returns it as a (last-ditch) result +from a $PATH search. + +
  4. The message printed by the job control code and builtins when a job +exits with a non-zero status is ‘Done(status)’. + +
  5. The message printed by the job control code and builtins when a job +is stopped is ‘Stopped(signame)’, where signame is, for +example, SIGTSTP. + +
  6. Alias expansion is always enabled, even in non-interactive shells. + +
  7. Reserved words appearing in a context where reserved words are recognized +do not undergo alias expansion. + +
  8. The POSIX PS1 and PS2 expansions of ‘!’ to +the history number and ‘!!’ to ‘!’ are enabled, +and parameter expansion is performed on the values of PS1 and +PS2 regardless of the setting of the promptvars option. + +
  9. The POSIX startup files are executed ($ENV) rather than +the normal Bash files. + +
  10. Tilde expansion is only performed on assignments preceding a command +name, rather than on all assignment statements on the line. + +
  11. The default history file is ~/.sh_history (this is the +default value of $HISTFILE). + +
  12. Redirection operators do not perform filename expansion on the word +in the redirection unless the shell is interactive. + +
  13. Redirection operators do not perform word splitting on the word in the +redirection. + +
  14. Function names must be valid shell names. That is, they may not +contain characters other than letters, digits, and underscores, and +may not start with a digit. Declaring a function with an invalid name +causes a fatal syntax error in non-interactive shells. + +
  15. Function names may not be the same as one of the POSIX special +builtins. + +
  16. POSIX special builtins are found before shell functions +during command lookup. + +
  17. When printing shell function definitions (e.g., by type), Bash does +not print the function keyword. + +
  18. Literal tildes that appear as the first character in elements of +the PATH variable are not expanded as described above +under Tilde Expansion. + +
  19. The time reserved word may be used by itself as a command. When +used in this way, it displays timing statistics for the shell and its +completed children. The TIMEFORMAT variable controls the format +of the timing information. + +
  20. When parsing and expanding a ${…} expansion that appears within +double quotes, single quotes are no longer special and cannot be used to +quote a closing brace or other special character, unless the operator is +one of those defined to perform pattern removal. In this case, they do +not have to appear as matched pairs. + +
  21. The parser does not recognize time as a reserved word if the next +token begins with a ‘-’. + + +
  22. The ‘!’ character does not introduce history expansion within a +double-quoted string, even if the histexpand option is enabled. + +
  23. If a POSIX special builtin returns an error status, a +non-interactive shell exits. The fatal errors are those listed in +the POSIX standard, and include things like passing incorrect options, +redirection errors, variable assignment errors for assignments preceding +the command name, and so on. + +
  24. A non-interactive shell exits with an error status if a variable +assignment error occurs when no command name follows the assignment +statements. +A variable assignment error occurs, for example, when trying to assign +a value to a readonly variable. + +
  25. A non-interactive shell exits with an error status if a variable +assignment error occurs in an assignment statement preceding a special +builtin, but not with any other simple command. + +
  26. A non-interactive shell exits with an error status if the iteration +variable in a for statement or the selection variable in a +select statement is a readonly variable. + +
  27. Non-interactive shells exit if filename in . filename +is not found. + +
  28. Non-interactive shells exit if a syntax error in an arithmetic expansion +results in an invalid expression. + +
  29. Non-interactive shells exit if a parameter expansion error occurs. + +
  30. Non-interactive shells exit if there is a syntax error in a script read +with the . or source builtins, or in a string processed by +the eval builtin. + +
  31. While variable indirection is available, it may not be applied to the +‘#’ and ‘?’ special parameters. + +
  32. When expanding the ‘*’ special parameter in a pattern context where the +expansion is double-quoted does not treat the $* as if it were +double-quoted. + +
  33. Assignment statements preceding POSIX special builtins +persist in the shell environment after the builtin completes. + +
  34. The command builtin does not prevent builtins that take assignment +statements as arguments from expanding them as assignment statements; +when not in POSIX mode, assignment builtins lose their assignment +statement expansion properties when preceded by command. + +
  35. The bg builtin uses the required format to describe each job placed +in the background, which does not include an indication of whether the job +is the current or previous job. + +
  36. The output of ‘kill -l’ prints all the signal names on a single line, +separated by spaces, without the ‘SIG’ prefix. + +
  37. The kill builtin does not accept signal names with a ‘SIG’ +prefix. + +
  38. The export and readonly builtin commands display their +output in the format required by POSIX. + +
  39. The trap builtin displays signal names without the leading +SIG. + +
  40. The trap builtin doesn’t check the first argument for a possible +signal specification and revert the signal handling to the original +disposition if it is, unless that argument consists solely of digits and +is a valid signal number. If users want to reset the handler for a given +signal to the original disposition, they should use ‘-’ as the +first argument. + +
  41. trap -p displays signals whose dispositions are set to SIG_DFL and +those that were ignored when the shell started. + +
  42. The . and source builtins do not search the current directory +for the filename argument if it is not found by searching PATH. + +
  43. Enabling POSIX mode has the effect of setting the +inherit_errexit option, so +subshells spawned to execute command substitutions inherit the value of +the -e option from the parent shell. +When the inherit_errexit option is not enabled, +Bash clears the -e option in such subshells. + +
  44. Enabling POSIX mode has the effect of setting the +shift_verbose option, so numeric arguments to shift +that exceed the number of positional parameters will result in an +error message. + +
  45. When the alias builtin displays alias definitions, it does not +display them with a leading ‘alias ’ unless the -p option +is supplied. + +
  46. When the set builtin is invoked without options, it does not display +shell function names and definitions. + +
  47. When the set builtin is invoked without options, it displays +variable values without quotes, unless they contain shell metacharacters, +even if the result contains nonprinting characters. + +
  48. When the cd builtin is invoked in logical mode, and the pathname +constructed from $PWD and the directory name supplied as an argument +does not refer to an existing directory, cd will fail instead of +falling back to physical mode. + +
  49. When the cd builtin cannot change a directory because the +length of the pathname +constructed from $PWD and the directory name supplied as an argument +exceeds PATH_MAX when all symbolic links are expanded, cd will +fail instead of attempting to use only the supplied directory name. + +
  50. The pwd builtin verifies that the value it prints is the same as the +current directory, even if it is not asked to check the file system with the +-P option. + +
  51. When listing the history, the fc builtin does not include an +indication of whether or not a history entry has been modified. + +
  52. The default editor used by fc is ed. + +
  53. The type and command builtins will not report a non-executable +file as having been found, though the shell will attempt to execute such a +file if it is the only so-named file found in $PATH. + +
  54. The vi editing mode will invoke the vi editor directly when +the ‘v’ command is run, instead of checking $VISUAL and +$EDITOR. + +
  55. When the xpg_echo option is enabled, Bash does not attempt to interpret +any arguments to echo as options. Each argument is displayed, after +escape characters are converted. + +
  56. The ulimit builtin uses a block size of 512 bytes for the -c +and -f options. + +
  57. The arrival of SIGCHLD when a trap is set on SIGCHLD does +not interrupt the wait builtin and cause it to return immediately. +The trap command is run once for each child that exits. + +
  58. The read builtin may be interrupted by a signal for which a trap +has been set. +If Bash receives a trapped signal while executing read, the trap +handler executes and read returns an exit status greater than 128. + +
  59. Bash removes an exited background process’s status from the list of such +statuses after the wait builtin is used to obtain it. + +
+ +

There is other POSIX behavior that Bash does not implement by +default even when in POSIX mode. +Specifically: +

+
    +
  1. The fc builtin checks $EDITOR as a program to edit history +entries if FCEDIT is unset, rather than defaulting directly to +ed. fc uses ed if EDITOR is unset. + +
  2. As noted above, Bash requires the xpg_echo option to be enabled for +the echo builtin to be fully conformant. + +
+ +

Bash can be configured to be POSIX-conformant by default, by specifying +the --enable-strict-posix-default to configure when building +(see Optional Features). +

+
+
+

+Previous: , Up: Bash Features   [Contents][Index]

+
+

6.12 Shell Compatibility Mode

+ + + +

Bash-4.0 introduced the concept of a ‘shell compatibility level’, specified +as a set of options to the shopt builtin +(compat31, +compat32, +compat40, +compat41, +and so on). +There is only one current +compatibility level – each option is mutually exclusive. +The compatibility level is intended to allow users to select behavior +from previous versions that is incompatible with newer versions +while they migrate scripts to use current features and +behavior. It’s intended to be a temporary solution. +

+

This section does not mention behavior that is standard for a particular +version (e.g., setting compat32 means that quoting the rhs of the regexp +matching operator quotes special regexp characters in the word, which is +default behavior in bash-3.2 and above). +

+

If a user enables, say, compat32, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed +in that version of Bash, +but that behavior may have been present in earlier versions. +For instance, the change to use locale-based comparisons with the [[ +command came in bash-4.1, and earlier versions used ASCII-based comparisons, +so enabling compat32 will enable ASCII-based comparisons as well. +That granularity may not be sufficient for +all uses, and as a result users should employ compatibility levels carefully. +Read the documentation for a particular feature to find out the +current behavior. +

+

Bash-4.3 introduced a new shell variable: BASH_COMPAT. +The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the compatNN option, like 42) determines the +compatibility level. +

+

Starting with bash-4.4, Bash has begun deprecating older compatibility +levels. +Eventually, the options will be removed in favor of BASH_COMPAT. +

+

Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use BASH_COMPAT +on bash-5.0 and later versions. +

+

The following table describes the behavior changes controlled by each +compatibility level setting. +The compatNN tag is used as shorthand for setting the +compatibility level +to NN using one of the following mechanisms. +For versions prior to bash-5.0, the compatibility level may be set using +the corresponding compatNN shopt option. +For bash-4.3 and later versions, the BASH_COMPAT variable is preferred, +and it is required for bash-5.1 and later versions. +

+
+
compat31
+
    +
  • quoting the rhs of the [[ command’s regexp matching operator (=~) +has no special effect +
+ +
+
compat32
+
    +
  • interrupting a command list such as "a ; b ; c" causes the execution +of the next command in the list (in bash-4.0 and later versions, +the shell acts as if it received the interrupt, so +interrupting one command in a list aborts the execution of the +entire list) +
+ +
+
compat40
+
    +
  • the ‘<’ and ‘>’ operators to the [[ command do not +consider the current locale when comparing strings; they use ASCII +ordering. +Bash versions prior to bash-4.1 use ASCII collation and strcmp(3); +bash-4.1 and later use the current locale’s collation sequence and +strcoll(3). +
+ +
+
compat41
+
    +
  • in posix mode, time may be followed by options and still be +recognized as a reserved word (this is POSIX interpretation 267) +
  • in posix mode, the parser requires that an even number of single +quotes occur in the word portion of a double-quoted ${…} +parameter expansion and treats them specially, so that characters within +the single quotes are considered quoted +(this is POSIX interpretation 221) +
+ +
+
compat42
+
    +
  • the replacement string in double-quoted pattern substitution does not +undergo quote removal, as it does in versions after bash-4.2 +
  • in posix mode, single quotes are considered special when expanding +the word portion of a double-quoted ${…} parameter expansion +and can be used to quote a closing brace or other special character +(this is part of POSIX interpretation 221); +in later versions, single quotes +are not special within double-quoted word expansions +
+ +
+
compat43
+
    +
  • the shell does not print a warning message if an attempt is made to +use a quoted compound assignment as an argument to declare +(declare -a foo=’(1 2)’). Later versions warn that this usage is +deprecated +
  • word expansion errors are considered non-fatal errors that cause the +current command to fail, even in posix mode +(the default behavior is to make them fatal errors that cause the shell +to exit) +
  • when executing a shell function, the loop state (while/until/etc.) +is not reset, so break or continue in that function will break +or continue loops in the calling context. Bash-4.4 and later reset +the loop state to prevent this +
+ +
+
compat44
+
    +
  • the shell sets up the values used by BASH_ARGV and BASH_ARGC +so they can expand to the shell’s positional parameters even if extended +debugging mode is not enabled +
  • a subshell inherits loops from its parent context, so break +or continue will cause the subshell to exit. +Bash-5.0 and later reset the loop state to prevent the exit +
  • variable assignments preceding builtins like export and readonly +that set attributes continue to affect variables with the same +name in the calling environment even if the shell is not in posix +mode +
+ +
+
compat50 (set using BASH_COMPAT)
+
    +
  • Bash-5.1 changed the way $RANDOM is generated to introduce slightly +more randomness. If the shell compatibility level is set to 50 or +lower, it reverts to the method from bash-5.0 and previous versions, +so seeding the random number generator by assigning a value to +RANDOM will produce the same sequence as in bash-5.0 +
  • If the command hash table is empty, Bash versions prior to bash-5.1 +printed an informational message to that effect, even when producing +output that can be reused as input. Bash-5.1 suppresses that message +when the -l option is supplied. +
+
+
+ +
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

7 Job Control

+ +

This chapter discusses what job control is, how it works, and how +Bash allows you to access its facilities. +

+ + + + + + +
+ +

7.1 Job Control Basics

+ + + + + +

Job control +refers to the ability to selectively stop (suspend) +the execution of processes and continue (resume) +their execution at a later point. A user typically employs +this facility via an interactive interface supplied jointly +by the operating system kernel’s terminal driver and Bash. +

+

The shell associates a job with each pipeline. It keeps a +table of currently executing jobs, which may be listed with the +jobs command. When Bash starts a job +asynchronously, it prints a line that looks +like: +

+
[1] 25647
+
+

indicating that this job is job number 1 and that the process ID +of the last process in the pipeline associated with this job is +25647. All of the processes in a single pipeline are members of +the same job. Bash uses the job abstraction as the +basis for job control. +

+

To facilitate the implementation of the user interface to job +control, the operating system maintains the notion of a current terminal +process group ID. Members of this process group (processes whose +process group ID is equal to the current terminal process group +ID) receive keyboard-generated signals such as SIGINT. +These processes are said to be in the foreground. Background +processes are those whose process group ID differs from the +terminal’s; such processes are immune to keyboard-generated +signals. Only foreground processes are allowed to read from or, if +the user so specifies with stty tostop, write to the terminal. +Background processes which attempt to +read from (write to when stty tostop is in effect) the +terminal are sent a SIGTTIN (SIGTTOU) +signal by the kernel’s terminal driver, +which, unless caught, suspends the process. +

+

If the operating system on which Bash is running supports +job control, Bash contains facilities to use it. Typing the +suspend character (typically ‘^Z’, Control-Z) while a +process is running causes that process to be stopped and returns +control to Bash. Typing the delayed suspend character +(typically ‘^Y’, Control-Y) causes the process to be stopped +when it attempts to read input from the terminal, and control to +be returned to Bash. The user then manipulates the state of +this job, using the bg command to continue it in the +background, the fg command to continue it in the +foreground, or the kill command to kill it. A ‘^Z’ +takes effect immediately, and has the additional side effect of +causing pending output and typeahead to be discarded. +

+

There are a number of ways to refer to a job in the shell. The +character ‘%’ introduces a job specification (jobspec). +

+

Job number n may be referred to as ‘%n’. +The symbols ‘%%’ and ‘%+’ refer to the shell’s notion of the +current job, which is the last job stopped while it was in the foreground +or started in the background. +A single ‘%’ (with no accompanying job specification) also refers +to the current job. +The previous job may be referenced using ‘%-’. +If there is only a single job, ‘%+’ and ‘%-’ can both be used +to refer to that job. +In output pertaining to jobs (e.g., the output of the jobs +command), the current job is always flagged with a ‘+’, and the +previous job with a ‘-’. +

+

A job may also be referred to +using a prefix of the name used to start it, or using a substring +that appears in its command line. For example, ‘%ce’ refers +to a stopped job whose command name begins with ‘ce’. +Using ‘%?ce’, on the +other hand, refers to any job containing the string ‘ce’ in +its command line. If the prefix or substring matches more than one job, +Bash reports an error. +

+

Simply naming a job can be used to bring it into the foreground: +‘%1’ is a synonym for ‘fg %1’, bringing job 1 from the +background into the foreground. Similarly, ‘%1 &’ resumes +job 1 in the background, equivalent to ‘bg %1’ +

+

The shell learns immediately whenever a job changes state. +Normally, Bash waits until it is about to print a prompt +before reporting changes in a job’s status so as to not interrupt +any other output. +If the -b option to the set builtin is enabled, +Bash reports such changes immediately (see The Set Builtin). +Any trap on SIGCHLD is executed for each child process +that exits. +

+

If an attempt to exit Bash is made while jobs are stopped, (or running, if +the checkjobs option is enabled – see The Shopt Builtin), the +shell prints a warning message, and if the checkjobs option is +enabled, lists the jobs and their statuses. +The jobs command may then be used to inspect their status. +If a second attempt to exit is made without an intervening command, +Bash does not print another warning, and any stopped jobs are terminated. +

+

When the shell is waiting for a job or process using the wait +builtin, and job control is enabled, wait will return when the +job changes state. The -f option causes wait to wait +until the job or process terminates before returning. +

+
+ +

7.2 Job Control Builtins

+ +
+
bg
+
+
+
bg [jobspec …]
+
+ +

Resume each suspended job jobspec in the background, as if it +had been started with ‘&’. +If jobspec is not supplied, the current job is used. +The return status is zero unless it is run when job control is not +enabled, or, when run with job control enabled, any +jobspec was not found or specifies a job +that was started without job control. +

+
+
fg
+
+
+
fg [jobspec]
+
+ +

Resume the job jobspec in the foreground and make it the current job. +If jobspec is not supplied, the current job is used. +The return status is that of the command placed into the foreground, +or non-zero if run when job control is disabled or, when run with +job control enabled, jobspec does not specify a valid job or +jobspec specifies a job that was started without job control. +

+
+
jobs
+
+
+
jobs [-lnprs] [jobspec]
+jobs -x command [arguments]
+
+ +

The first form lists the active jobs. The options have the +following meanings: +

+
+
-l
+

List process IDs in addition to the normal information. +

+
+
-n
+

Display information only about jobs that have changed status since +the user was last notified of their status. +

+
+
-p
+

List only the process ID of the job’s process group leader. +

+
+
-r
+

Display only running jobs. +

+
+
-s
+

Display only stopped jobs. +

+
+ +

If jobspec is given, +output is restricted to information about that job. +If jobspec is not supplied, the status of all jobs is +listed. +

+

If the -x option is supplied, jobs replaces any +jobspec found in command or arguments with the +corresponding process group ID, and executes command, +passing it arguments, returning its exit status. +

+
+
kill
+
+
+
kill [-s sigspec] [-n signum] [-sigspec] jobspec or pid
+kill -l|-L [exit_status]
+
+ +

Send a signal specified by sigspec or signum to the process +named by job specification jobspec or process ID pid. +sigspec is either a case-insensitive signal name such as +SIGINT (with or without the SIG prefix) +or a signal number; signum is a signal number. +If sigspec and signum are not present, SIGTERM is used. +The -l option lists the signal names. +If any arguments are supplied when -l is given, the names of the +signals corresponding to the arguments are listed, and the return status +is zero. +exit_status is a number specifying a signal number or the exit +status of a process terminated by a signal. +The -L option is equivalent to -l. +The return status is zero if at least one signal was successfully sent, +or non-zero if an error occurs or an invalid option is encountered. +

+
+
wait
+
+
+
wait [-fn] [-p varname] [jobspec or pid …]
+
+ +

Wait until the child process specified by each process ID pid +or job specification jobspec exits and return the exit status of the +last command waited for. +If a job spec is given, all processes in the job are waited for. +If no arguments are given, +wait waits for all running background jobs and +the last-executed process substitution, if its process id is the same as +$!, +and the return status is zero. +If the -n option is supplied, wait waits for a single job +from the list of pids or jobspecs or, if no arguments are +supplied, any job, +to complete and returns its exit status. +If none of the supplied arguments is a child of the shell, or if no arguments +are supplied and the shell has no unwaited-for children, the exit status +is 127. +If the -p option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable +varname named by the option argument. +The variable will be unset initially, before any assignment. +This is useful only when the -n option is supplied. +Supplying the -f option, when job control is enabled, +forces wait to wait for each pid or jobspec to +terminate before returning its status, intead of returning when it changes +status. +If neither jobspec nor pid specifies an active child process +of the shell, the return status is 127. +

+
+
disown
+
+
+
disown [-ar] [-h] [jobspec … | pid … ]
+
+ +

Without options, remove each jobspec from the table of +active jobs. +If the -h option is given, the job is not removed from the table, +but is marked so that SIGHUP is not sent to the job if the shell +receives a SIGHUP. +If jobspec is not present, and neither the -a nor the +-r option is supplied, the current job is used. +If no jobspec is supplied, the -a option means to remove or +mark all jobs; the -r option without a jobspec +argument restricts operation to running jobs. +

+
+
suspend
+
+
+
suspend [-f]
+
+ +

Suspend the execution of this shell until it receives a +SIGCONT signal. +A login shell cannot be suspended; the -f +option can be used to override this and force the suspension. +

+
+ +

When job control is not active, the kill and wait +builtins do not accept jobspec arguments. They must be +supplied process IDs. +

+
+
+

+Previous: , Up: Job Control   [Contents][Index]

+
+

7.3 Job Control Variables

+ +
+
auto_resume + +
+

This variable controls how the shell interacts with the user and +job control. If this variable exists then single word simple +commands without redirections are treated as candidates for resumption +of an existing job. There is no ambiguity allowed; if there is +more than one job beginning with the string typed, then +the most recently accessed job will be selected. +The name of a stopped job, in this context, is the command line +used to start it. If this variable is set to the value ‘exact’, +the string supplied must match the name of a stopped job exactly; +if set to ‘substring’, +the string supplied needs to match a substring of the name of a +stopped job. The ‘substring’ value provides functionality +analogous to the ‘%?’ job ID (see Job Control Basics). +If set to any other value, the supplied string must +be a prefix of a stopped job’s name; this provides functionality +analogous to the ‘%’ job ID. +

+
+
+ + + + + + +
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

8 Command Line Editing

+ +

This chapter describes the basic features of the GNU +command line editing interface. +Command line editing is provided by the Readline library, which is +used by several different programs, including Bash. +Command line editing is enabled by default when using an interactive shell, +unless the --noediting option is supplied at shell invocation. +Line editing is also used when using the -e option to the +read builtin command (see Bash Builtins). +By default, the line editing commands are similar to those of Emacs. +A vi-style line editing interface is also available. +Line editing can be enabled at any time using the -o emacs or +-o vi options to the set builtin command +(see The Set Builtin), or disabled using the +o emacs or ++o vi options to set. +

+ + + + + + + + + + + +
+ +

8.1 Introduction to Line Editing

+ +

The following paragraphs describe the notation used to represent +keystrokes. +

+

The text C-k is read as ‘Control-K’ and describes the character +produced when the k key is pressed while the Control key +is depressed. +

+

The text M-k is read as ‘Meta-K’ and describes the character +produced when the Meta key (if you have one) is depressed, and the k +key is pressed. +The Meta key is labeled ALT on many keyboards. +On keyboards with two keys labeled ALT (usually to either side of +the space bar), the ALT on the left side is generally set to +work as a Meta key. +The ALT key on the right may also be configured to work as a +Meta key or may be configured as some other modifier, such as a +Compose key for typing accented characters. +

+

If you do not have a Meta or ALT key, or another key working as +a Meta key, the identical keystroke can be generated by typing ESC +first, and then typing k. +Either process is known as metafying the k key. +

+

The text M-C-k is read as ‘Meta-Control-k’ and describes the +character produced by metafying C-k. +

+

In addition, several keys have their own names. Specifically, +DEL, ESC, LFD, SPC, RET, and TAB all +stand for themselves when seen in this text, or in an init file +(see Readline Init File). +If your keyboard lacks a LFD key, typing C-j will +produce the desired character. +The RET key may be labeled Return or Enter on +some keyboards. +

+
+ +

8.2 Readline Interaction

+ + +

Often during an interactive session you type in a long line of text, +only to notice that the first word on the line is misspelled. The +Readline library gives you a set of commands for manipulating the text +as you type it in, allowing you to just fix your typo, and not forcing +you to retype the majority of the line. Using these editing commands, +you move the cursor to the place that needs correction, and delete or +insert the text of the corrections. Then, when you are satisfied with +the line, you simply press RET. You do not have to be at the +end of the line to press RET; the entire line is accepted +regardless of the location of the cursor within the line. +

+ + + + + + + + +
+ +

8.2.1 Readline Bare Essentials

+ + + + +

In order to enter characters into the line, simply type them. The typed +character appears where the cursor was, and then the cursor moves one +space to the right. If you mistype a character, you can use your +erase character to back up and delete the mistyped character. +

+

Sometimes you may mistype a character, and +not notice the error until you have typed several other characters. In +that case, you can type C-b to move the cursor to the left, and then +correct your mistake. Afterwards, you can move the cursor to the right +with C-f. +

+

When you add text in the middle of a line, you will notice that characters +to the right of the cursor are ‘pushed over’ to make room for the text +that you have inserted. Likewise, when you delete text behind the cursor, +characters to the right of the cursor are ‘pulled back’ to fill in the +blank space created by the removal of the text. A list of the bare +essentials for editing the text of an input line follows. +

+
+
C-b
+

Move back one character. +

+
C-f
+

Move forward one character. +

+
DEL or Backspace
+

Delete the character to the left of the cursor. +

+
C-d
+

Delete the character underneath the cursor. +

+
Printing characters
+

Insert the character into the line at the cursor. +

+
C-_ or C-x C-u
+

Undo the last editing command. You can undo all the way back to an +empty line. +

+
+ +

(Depending on your configuration, the Backspace key be set to +delete the character to the left of the cursor and the DEL key set +to delete the character underneath the cursor, like C-d, rather +than the character to the left of the cursor.) +

+
+ +

8.2.2 Readline Movement Commands

+ + +

The above table describes the most basic keystrokes that you need +in order to do editing of the input line. For your convenience, many +other commands have been added in addition to C-b, C-f, +C-d, and DEL. Here are some commands for moving more rapidly +about the line. +

+
+
C-a
+

Move to the start of the line. +

+
C-e
+

Move to the end of the line. +

+
M-f
+

Move forward a word, where a word is composed of letters and digits. +

+
M-b
+

Move backward a word. +

+
C-l
+

Clear the screen, reprinting the current line at the top. +

+
+ +

Notice how C-f moves forward a character, while M-f moves +forward a word. It is a loose convention that control keystrokes +operate on characters while meta keystrokes operate on words. +

+
+ +

8.2.3 Readline Killing Commands

+ + + + +

Killing text means to delete the text from the line, but to save +it away for later use, usually by yanking (re-inserting) +it back into the line. +(‘Cut’ and ‘paste’ are more recent jargon for ‘kill’ and ‘yank’.) +

+

If the description for a command says that it ‘kills’ text, then you can +be sure that you can get the text back in a different (or the same) +place later. +

+

When you use a kill command, the text is saved in a kill-ring. +Any number of consecutive kills save all of the killed text together, so +that when you yank it back, you get it all. The kill +ring is not line specific; the text that you killed on a previously +typed line is available to be yanked back later, when you are typing +another line. + +

+

Here is the list of commands for killing text. +

+
+
C-k
+

Kill the text from the current cursor position to the end of the line. +

+
+
M-d
+

Kill from the cursor to the end of the current word, or, if between +words, to the end of the next word. +Word boundaries are the same as those used by M-f. +

+
+
M-DEL
+

Kill from the cursor the start of the current word, or, if between +words, to the start of the previous word. +Word boundaries are the same as those used by M-b. +

+
+
C-w
+

Kill from the cursor to the previous whitespace. This is different than +M-DEL because the word boundaries differ. +

+
+
+ +

Here is how to yank the text back into the line. Yanking +means to copy the most-recently-killed text from the kill buffer. +

+
+
C-y
+

Yank the most recently killed text back into the buffer at the cursor. +

+
+
M-y
+

Rotate the kill-ring, and yank the new top. You can only do this if +the prior command is C-y or M-y. +

+
+ +
+ +

8.2.4 Readline Arguments

+ +

You can pass numeric arguments to Readline commands. Sometimes the +argument acts as a repeat count, other times it is the sign of the +argument that is significant. If you pass a negative argument to a +command which normally acts in a forward direction, that command will +act in a backward direction. For example, to kill text back to the +start of the line, you might type ‘M-- C-k’. +

+

The general way to pass numeric arguments to a command is to type meta +digits before the command. If the first ‘digit’ typed is a minus +sign (‘-’), then the sign of the argument will be negative. Once +you have typed one meta digit to get the argument started, you can type +the remainder of the digits, and then the command. For example, to give +the C-d command an argument of 10, you could type ‘M-1 0 C-d’, +which will delete the next ten characters on the input line. +

+
+ +

8.2.5 Searching for Commands in the History

+ +

Readline provides commands for searching through the command history +(see Bash History Facilities) +for lines containing a specified string. +There are two search modes: incremental and non-incremental. +

+

Incremental searches begin before the user has finished typing the +search string. +As each character of the search string is typed, Readline displays +the next entry from the history matching the string typed so far. +An incremental search requires only as many characters as needed to +find the desired history entry. +To search backward in the history for a particular string, type +C-r. Typing C-s searches forward through the history. +The characters present in the value of the isearch-terminators variable +are used to terminate an incremental search. +If that variable has not been assigned a value, the ESC and +C-J characters will terminate an incremental search. +C-g will abort an incremental search and restore the original line. +When the search is terminated, the history entry containing the +search string becomes the current line. +

+

To find other matching entries in the history list, type C-r or +C-s as appropriate. +This will search backward or forward in the history for the next +entry matching the search string typed so far. +Any other key sequence bound to a Readline command will terminate +the search and execute that command. +For instance, a RET will terminate the search and accept +the line, thereby executing the command from the history list. +A movement command will terminate the search, make the last line found +the current line, and begin editing. +

+

Readline remembers the last incremental search string. If two +C-rs are typed without any intervening characters defining a new +search string, any remembered search string is used. +

+

Non-incremental searches read the entire search string before starting +to search for matching history lines. The search string may be +typed by the user or be part of the contents of the current line. +

+
+ +

8.3 Readline Init File

+ + +

Although the Readline library comes with a set of Emacs-like +keybindings installed by default, it is possible to use a different set +of keybindings. +Any user can customize programs that use Readline by putting +commands in an inputrc file, conventionally in his home directory. +The name of this +file is taken from the value of the shell variable INPUTRC. If +that variable is unset, the default is ~/.inputrc. If that +file does not exist or cannot be read, the ultimate default is +/etc/inputrc. +The bind builtin command can also be used to set Readline +keybindings and variables. +See Bash Builtins. +

+

When a program which uses the Readline library starts up, the +init file is read, and the key bindings are set. +

+

In addition, the C-x C-r command re-reads this init file, thus +incorporating any changes that you might have made to it. +

+ + + + + + +
+ +

8.3.1 Readline Init File Syntax

+ +

There are only a few basic constructs allowed in the +Readline init file. Blank lines are ignored. +Lines beginning with a ‘#’ are comments. +Lines beginning with a ‘$’ indicate conditional +constructs (see Conditional Init Constructs). Other lines +denote variable settings and key bindings. +

+
+
Variable Settings
+

You can modify the run-time behavior of Readline by +altering the values of variables in Readline +using the set command within the init file. +The syntax is simple: +

+
+
set variable value
+
+ +

Here, for example, is how to +change from the default Emacs-like key binding to use +vi line editing commands: +

+
+
set editing-mode vi
+
+ +

Variable names and values, where appropriate, are recognized without regard +to case. Unrecognized variable names are ignored. +

+

Boolean variables (those that can be set to on or off) are set to on if +the value is null or empty, on (case-insensitive), or 1. Any other +value results in the variable being set to off. +

+

The bind -V command lists the current Readline variable names +and values. See Bash Builtins. +

+

A great deal of run-time behavior is changeable with the following +variables. +

+ +
+
bell-style
+
+

Controls what happens when Readline wants to ring the terminal bell. +If set to ‘none’, Readline never rings the bell. If set to +‘visible’, Readline uses a visible bell if one is available. +If set to ‘audible’ (the default), Readline attempts to ring +the terminal’s bell. +

+
+
bind-tty-special-chars
+
+

If set to ‘on’ (the default), Readline attempts to bind the control +characters treated specially by the kernel’s terminal driver to their +Readline equivalents. +

+
+
blink-matching-paren
+
+

If set to ‘on’, Readline attempts to briefly move the cursor to an +opening parenthesis when a closing parenthesis is inserted. The default +is ‘off’. +

+
+
colored-completion-prefix
+
+

If set to ‘on’, when listing completions, Readline displays the +common prefix of the set of possible completions using a different color. +The color definitions are taken from the value of the LS_COLORS +environment variable. +The default is ‘off’. +

+
+
colored-stats
+
+

If set to ‘on’, Readline displays possible completions using different +colors to indicate their file type. +The color definitions are taken from the value of the LS_COLORS +environment variable. +The default is ‘off’. +

+
+
comment-begin
+
+

The string to insert at the beginning of the line when the +insert-comment command is executed. The default value +is "#". +

+
+
completion-display-width
+
+

The number of screen columns used to display possible matches +when performing completion. +The value is ignored if it is less than 0 or greater than the terminal +screen width. +A value of 0 will cause matches to be displayed one per line. +The default value is -1. +

+
+
completion-ignore-case
+
+

If set to ‘on’, Readline performs filename matching and completion +in a case-insensitive fashion. +The default value is ‘off’. +

+
+
completion-map-case
+
+

If set to ‘on’, and completion-ignore-case is enabled, Readline +treats hyphens (‘-’) and underscores (‘_’) as equivalent when +performing case-insensitive filename matching and completion. +The default value is ‘off’. +

+
+
completion-prefix-display-length
+
+

The length in characters of the common prefix of a list of possible +completions that is displayed without modification. When set to a +value greater than zero, common prefixes longer than this value are +replaced with an ellipsis when displaying possible completions. +

+
+
completion-query-items
+
+

The number of possible completions that determines when the user is +asked whether the list of possibilities should be displayed. +If the number of possible completions is greater than or equal to this value, +Readline will ask whether or not the user wishes to view them; +otherwise, they are simply listed. +This variable must be set to an integer value greater than or equal to 0. +A negative value means Readline should never ask. +The default limit is 100. +

+
+
convert-meta
+
+

If set to ‘on’, Readline will convert characters with the +eighth bit set to an ASCII key sequence by stripping the eighth +bit and prefixing an ESC character, converting them to a +meta-prefixed key sequence. The default value is ‘on’, but +will be set to ‘off’ if the locale is one that contains +eight-bit characters. +

+
+
disable-completion
+
+

If set to ‘On’, Readline will inhibit word completion. +Completion characters will be inserted into the line as if they had +been mapped to self-insert. The default is ‘off’. +

+
+
echo-control-characters
+
+

When set to ‘on’, on operating systems that indicate they support it, +readline echoes a character corresponding to a signal generated from the +keyboard. The default is ‘on’. +

+
+
editing-mode
+
+

The editing-mode variable controls which default set of +key bindings is used. By default, Readline starts up in Emacs editing +mode, where the keystrokes are most similar to Emacs. This variable can be +set to either ‘emacs’ or ‘vi’. +

+
+
emacs-mode-string
+
+

If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when emacs editing mode is active. The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the ‘\1’ and ‘\2’ escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is ‘@’. +

+
+
enable-bracketed-paste
+
+

When set to ‘On’, Readline will configure the terminal in a way +that will enable it to insert each paste into the editing buffer as a +single string of characters, instead of treating each character as if +it had been read from the keyboard. This can prevent pasted characters +from being interpreted as editing commands. The default is ‘On’. +

+
+
enable-keypad
+
+

When set to ‘on’, Readline will try to enable the application +keypad when it is called. Some systems need this to enable the +arrow keys. The default is ‘off’. +

+
+
enable-meta-key
+

When set to ‘on’, Readline will try to enable any meta modifier +key the terminal claims to support when it is called. On many terminals, +the meta key is used to send eight-bit characters. +The default is ‘on’. +

+
+
expand-tilde
+
+

If set to ‘on’, tilde expansion is performed when Readline +attempts word completion. The default is ‘off’. +

+
+
history-preserve-point
+
+

If set to ‘on’, the history code attempts to place the point (the +current cursor position) at the +same location on each history line retrieved with previous-history +or next-history. The default is ‘off’. +

+
+
history-size
+
+

Set the maximum number of history entries saved in the history list. +If set to zero, any existing history entries are deleted and no new entries +are saved. +If set to a value less than zero, the number of history entries is not +limited. +By default, the number of history entries is not limited. +If an attempt is made to set history-size to a non-numeric value, +the maximum number of history entries will be set to 500. +

+
+
horizontal-scroll-mode
+
+

This variable can be set to either ‘on’ or ‘off’. Setting it +to ‘on’ means that the text of the lines being edited will scroll +horizontally on a single screen line when they are longer than the width +of the screen, instead of wrapping onto a new screen line. +This variable is automatically set to ‘on’ for terminals of height 1. +By default, this variable is set to ‘off’. +

+
+
input-meta
+
+ +

If set to ‘on’, Readline will enable eight-bit input (it +will not clear the eighth bit in the characters it reads), +regardless of what the terminal claims it can support. The +default value is ‘off’, but Readline will set it to ‘on’ if the +locale contains eight-bit characters. +The name meta-flag is a synonym for this variable. +

+
+
isearch-terminators
+
+

The string of characters that should terminate an incremental search without +subsequently executing the character as a command (see Searching). +If this variable has not been given a value, the characters ESC and +C-J will terminate an incremental search. +

+
+
keymap
+
+

Sets Readline’s idea of the current keymap for key binding commands. +Built-in keymap names are +emacs, +emacs-standard, +emacs-meta, +emacs-ctlx, +vi, +vi-move, +vi-command, and +vi-insert. +vi is equivalent to vi-command (vi-move is also a +synonym); emacs is equivalent to emacs-standard. +Applications may add additional names. +The default value is emacs. +The value of the editing-mode variable also affects the +default keymap. +

+
+
keyseq-timeout
+

Specifies the duration Readline will wait for a character when reading an +ambiguous key sequence (one that can form a complete key sequence using +the input read so far, or can take additional input to complete a longer +key sequence). +If no input is received within the timeout, Readline will use the shorter +but complete key sequence. +Readline uses this value to determine whether or not input is +available on the current input source (rl_instream by default). +The value is specified in milliseconds, so a value of 1000 means that +Readline will wait one second for additional input. +If this variable is set to a value less than or equal to zero, or to a +non-numeric value, Readline will wait until another key is pressed to +decide which key sequence to complete. +The default value is 500. +

+
+
mark-directories
+

If set to ‘on’, completed directory names have a slash +appended. The default is ‘on’. +

+
+
mark-modified-lines
+
+

This variable, when set to ‘on’, causes Readline to display an +asterisk (‘*’) at the start of history lines which have been modified. +This variable is ‘off’ by default. +

+
+
mark-symlinked-directories
+
+

If set to ‘on’, completed names which are symbolic links +to directories have a slash appended (subject to the value of +mark-directories). +The default is ‘off’. +

+
+
match-hidden-files
+
+

This variable, when set to ‘on’, causes Readline to match files whose +names begin with a ‘.’ (hidden files) when performing filename +completion. +If set to ‘off’, the leading ‘.’ must be +supplied by the user in the filename to be completed. +This variable is ‘on’ by default. +

+
+
menu-complete-display-prefix
+
+

If set to ‘on’, menu completion displays the common prefix of the +list of possible completions (which may be empty) before cycling through +the list. The default is ‘off’. +

+
+
output-meta
+
+

If set to ‘on’, Readline will display characters with the +eighth bit set directly rather than as a meta-prefixed escape +sequence. +The default is ‘off’, but Readline will set it to ‘on’ if the +locale contains eight-bit characters. +

+
+
page-completions
+
+

If set to ‘on’, Readline uses an internal more-like pager +to display a screenful of possible completions at a time. +This variable is ‘on’ by default. +

+
+
print-completions-horizontally
+

If set to ‘on’, Readline will display completions with matches +sorted horizontally in alphabetical order, rather than down the screen. +The default is ‘off’. +

+
+
revert-all-at-newline
+
+

If set to ‘on’, Readline will undo all changes to history lines +before returning when accept-line is executed. By default, +history lines may be modified and retain individual undo lists across +calls to readline. The default is ‘off’. +

+
+
show-all-if-ambiguous
+
+

This alters the default behavior of the completion functions. If +set to ‘on’, +words which have more than one possible completion cause the +matches to be listed immediately instead of ringing the bell. +The default value is ‘off’. +

+
+
show-all-if-unmodified
+
+

This alters the default behavior of the completion functions in +a fashion similar to show-all-if-ambiguous. +If set to ‘on’, +words which have more than one possible completion without any +possible partial completion (the possible completions don’t share +a common prefix) cause the matches to be listed immediately instead +of ringing the bell. +The default value is ‘off’. +

+
+
show-mode-in-prompt
+
+

If set to ‘on’, add a string to the beginning of the prompt +indicating the editing mode: emacs, vi command, or vi insertion. +The mode strings are user-settable (e.g., emacs-mode-string). +The default value is ‘off’. +

+
+
skip-completed-text
+
+

If set to ‘on’, this alters the default completion behavior when +inserting a single match into the line. It’s only active when +performing completion in the middle of a word. If enabled, readline +does not insert characters from the completion that match characters +after point in the word being completed, so portions of the word +following the cursor are not duplicated. +For instance, if this is enabled, attempting completion when the cursor +is after the ‘e’ in ‘Makefile’ will result in ‘Makefile’ +rather than ‘Makefilefile’, assuming there is a single possible +completion. +The default value is ‘off’. +

+
+
vi-cmd-mode-string
+
+

If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in command mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the ‘\1’ and ‘\2’ escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is ‘(cmd)’. +

+
+
vi-ins-mode-string
+
+

If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in insertion mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the ‘\1’ and ‘\2’ escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is ‘(ins)’. +

+
+
visible-stats
+
+

If set to ‘on’, a character denoting a file’s type +is appended to the filename when listing possible +completions. The default is ‘off’. +

+
+
+ +
+
Key Bindings
+

The syntax for controlling key bindings in the init file is +simple. First you need to find the name of the command that you +want to change. The following sections contain tables of the command +name, the default keybinding, if any, and a short description of what +the command does. +

+

Once you know the name of the command, simply place on a line +in the init file the name of the key +you wish to bind the command to, a colon, and then the name of the +command. +There can be no space between the key name and the colon – that will be +interpreted as part of the key name. +The name of the key can be expressed in different ways, depending on +what you find most comfortable. +

+

In addition to command names, readline allows keys to be bound +to a string that is inserted when the key is pressed (a macro). +

+

The bind -p command displays Readline function names and +bindings in a format that can put directly into an initialization file. +See Bash Builtins. +

+
+
keynamefunction-name or macro
+

keyname is the name of a key spelled out in English. For example: +

+
Control-u: universal-argument
+Meta-Rubout: backward-kill-word
+Control-o: "> output"
+
+ +

In the example above, C-u is bound to the function +universal-argument, +M-DEL is bound to the function backward-kill-word, and +C-o is bound to run the macro +expressed on the right hand side (that is, to insert the text +‘> output’ into the line). +

+

A number of symbolic character names are recognized while +processing this key binding syntax: +DEL, +ESC, +ESCAPE, +LFD, +NEWLINE, +RET, +RETURN, +RUBOUT, +SPACE, +SPC, +and +TAB. +

+
+
"keyseq": function-name or macro
+

keyseq differs from keyname above in that strings +denoting an entire key sequence can be specified, by placing +the key sequence in double quotes. Some GNU Emacs style key +escapes can be used, as in the following example, but the +special character names are not recognized. +

+
+
"\C-u": universal-argument
+"\C-x\C-r": re-read-init-file
+"\e[11~": "Function Key 1"
+
+ +

In the above example, C-u is again bound to the function +universal-argument (just as it was in the first example), +‘C-x C-r’ is bound to the function re-read-init-file, +and ‘ESC [ 1 1 ~’ is bound to insert +the text ‘Function Key 1’. +

+
+
+ +

The following GNU Emacs style escape sequences are available when +specifying key sequences: +

+
+
\C-
+

control prefix +

+
\M-
+

meta prefix +

+
\e
+

an escape character +

+
\\
+

backslash +

+
\"
+

", a double quotation mark +

+
\'
+

', a single quote or apostrophe +

+
+ +

In addition to the GNU Emacs style escape sequences, a second +set of backslash escapes is available: +

+
+
\a
+

alert (bell) +

+
\b
+

backspace +

+
\d
+

delete +

+
\f
+

form feed +

+
\n
+

newline +

+
\r
+

carriage return +

+
\t
+

horizontal tab +

+
\v
+

vertical tab +

+
\nnn
+

the eight-bit character whose value is the octal value nnn +(one to three digits) +

+
\xHH
+

the eight-bit character whose value is the hexadecimal value HH +(one or two hex digits) +

+
+ +

When entering the text of a macro, single or double quotes must +be used to indicate a macro definition. +Unquoted text is assumed to be a function name. +In the macro body, the backslash escapes described above are expanded. +Backslash will quote any other character in the macro text, +including ‘"’ and ‘'’. +For example, the following binding will make ‘C-x \’ +insert a single ‘\’ into the line: +

+
"\C-x\\": "\\"
+
+ +
+
+ +
+ +

8.3.2 Conditional Init Constructs

+ +

Readline implements a facility similar in spirit to the conditional +compilation features of the C preprocessor which allows key +bindings and variable settings to be performed as the result +of tests. There are four parser directives used. +

+
+
$if
+

The $if construct allows bindings to be made based on the +editing mode, the terminal being used, or the application using +Readline. The text of the test, after any comparison operator, +extends to the end of the line; +unless otherwise noted, no characters are required to isolate it. +

+
+
mode
+

The mode= form of the $if directive is used to test +whether Readline is in emacs or vi mode. +This may be used in conjunction +with the ‘set keymap’ command, for instance, to set bindings in +the emacs-standard and emacs-ctlx keymaps only if +Readline is starting out in emacs mode. +

+
+
term
+

The term= form may be used to include terminal-specific +key bindings, perhaps to bind the key sequences output by the +terminal’s function keys. The word on the right side of the +‘=’ is tested against both the full name of the terminal and +the portion of the terminal name before the first ‘-’. This +allows sun to match both sun and sun-cmd, +for instance. +

+
+
version
+

The version test may be used to perform comparisons against +specific Readline versions. +The version expands to the current Readline version. +The set of comparison operators includes +‘=’ (and ‘==’), ‘!=’, ‘<=’, ‘>=’, ‘<’, +and ‘>’. +The version number supplied on the right side of the operator consists +of a major version number, an optional decimal point, and an optional +minor version (e.g., ‘7.1’). If the minor version is omitted, it +is assumed to be ‘0’. +The operator may be separated from the string version and +from the version number argument by whitespace. +The following example sets a variable if the Readline version being used +is 7.0 or newer: +

+
$if version >= 7.0
+set show-mode-in-prompt on
+$endif
+
+ +
+
application
+

The application construct is used to include +application-specific settings. Each program using the Readline +library sets the application name, and you can test for +a particular value. +This could be used to bind key sequences to functions useful for +a specific program. For instance, the following command adds a +key sequence that quotes the current or previous word in Bash: +

+
$if Bash
+# Quote the current or previous word
+"\C-xq": "\eb\"\ef\""
+$endif
+
+ +
+
variable
+

The variable construct provides simple equality tests for Readline +variables and values. +The permitted comparison operators are ‘=’, ‘==’, and ‘!=’. +The variable name must be separated from the comparison operator by +whitespace; the operator may be separated from the value on the right hand +side by whitespace. +Both string and boolean variables may be tested. Boolean variables must be +tested against the values on and off. +The following example is equivalent to the mode=emacs test described +above: +

+
$if editing-mode == emacs
+set show-mode-in-prompt on
+$endif
+
+
+
+ +
+
$endif
+

This command, as seen in the previous example, terminates an +$if command. +

+
+
$else
+

Commands in this branch of the $if directive are executed if +the test fails. +

+
+
$include
+

This directive takes a single filename as an argument and reads commands +and bindings from that file. +For example, the following directive reads from /etc/inputrc: +

+
$include /etc/inputrc
+
+
+
+ +
+ +

8.3.3 Sample Init File

+ +

Here is an example of an inputrc file. This illustrates key +binding, variable assignment, and conditional syntax. +

+
+
# This file controls the behaviour of line input editing for
+# programs that use the GNU Readline library.  Existing
+# programs include FTP, Bash, and GDB.
+#
+# You can re-read the inputrc file with C-x C-r.
+# Lines beginning with '#' are comments.
+#
+# First, include any system-wide bindings and variable
+# assignments from /etc/Inputrc
+$include /etc/Inputrc
+
+#
+# Set various bindings for emacs mode.
+
+set editing-mode emacs 
+
+$if mode=emacs
+
+Meta-Control-h:	backward-kill-word	Text after the function name is ignored
+
+#
+# Arrow keys in keypad mode
+#
+#"\M-OD":        backward-char
+#"\M-OC":        forward-char
+#"\M-OA":        previous-history
+#"\M-OB":        next-history
+#
+# Arrow keys in ANSI mode
+#
+"\M-[D":        backward-char
+"\M-[C":        forward-char
+"\M-[A":        previous-history
+"\M-[B":        next-history
+#
+# Arrow keys in 8 bit keypad mode
+#
+#"\M-\C-OD":       backward-char
+#"\M-\C-OC":       forward-char
+#"\M-\C-OA":       previous-history
+#"\M-\C-OB":       next-history
+#
+# Arrow keys in 8 bit ANSI mode
+#
+#"\M-\C-[D":       backward-char
+#"\M-\C-[C":       forward-char
+#"\M-\C-[A":       previous-history
+#"\M-\C-[B":       next-history
+
+C-q: quoted-insert
+
+$endif
+
+# An old-style binding.  This happens to be the default.
+TAB: complete
+
+# Macros that are convenient for shell interaction
+$if Bash
+# edit the path
+"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
+# prepare to type a quoted word --
+# insert open and close double quotes
+# and move to just after the open quote
+"\C-x\"": "\"\"\C-b"
+# insert a backslash (testing backslash escapes
+# in sequences and macros)
+"\C-x\\": "\\"
+# Quote the current or previous word
+"\C-xq": "\eb\"\ef\""
+# Add a binding to refresh the line, which is unbound
+"\C-xr": redraw-current-line
+# Edit variable on current line.
+"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
+$endif
+
+# use a visible bell if one is available
+set bell-style visible
+
+# don't strip characters to 7 bits when reading
+set input-meta on
+
+# allow iso-latin1 characters to be inserted rather
+# than converted to prefix-meta sequences
+set convert-meta off
+
+# display characters with the eighth bit set directly
+# rather than as meta-prefixed characters
+set output-meta on
+
+# if there are 150 or more possible completions for a word,
+# ask whether or not the user wants to see all of them
+set completion-query-items 150
+
+# For FTP
+$if Ftp
+"\C-xg": "get \M-?"
+"\C-xt": "put \M-?"
+"\M-.": yank-last-arg
+$endif
+
+ +
+ +

8.4 Bindable Readline Commands

+ + + + + + + + + + + + +

This section describes Readline commands that may be bound to key +sequences. +You can list your key bindings by executing +bind -P or, for a more terse format, suitable for an +inputrc file, bind -p. (See Bash Builtins.) +Command names without an accompanying key sequence are unbound by default. +

+

In the following descriptions, point refers to the current cursor +position, and mark refers to a cursor position saved by the +set-mark command. +The text between the point and mark is referred to as the region. +

+
+ +

8.4.1 Commands For Moving

+
+
beginning-of-line (C-a) + +
+

Move to the start of the current line. +

+
+
end-of-line (C-e) + +
+

Move to the end of the line. +

+
+
forward-char (C-f) + +
+

Move forward a character. +

+
+
backward-char (C-b) + +
+

Move back a character. +

+
+
forward-word (M-f) + +
+

Move forward to the end of the next word. +Words are composed of letters and digits. +

+
+
backward-word (M-b) + +
+

Move back to the start of the current or previous word. +Words are composed of letters and digits. +

+
+
shell-forward-word (M-C-f) + +
+

Move forward to the end of the next word. +Words are delimited by non-quoted shell metacharacters. +

+
+
shell-backward-word (M-C-b) + +
+

Move back to the start of the current or previous word. +Words are delimited by non-quoted shell metacharacters. +

+
+
previous-screen-line () + +
+

Attempt to move point to the same physical screen column on the previous +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if point is not +greater than the length of the prompt plus the screen width. +

+
+
next-screen-line () + +
+

Attempt to move point to the same physical screen column on the next +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if the length +of the current Readline line is not greater than the length of the prompt +plus the screen width. +

+
+
clear-display (M-C-l) + +
+

Clear the screen and, if possible, the terminal’s scrollback buffer, +then redraw the current line, +leaving the current line at the top of the screen. +

+
+
clear-screen (C-l) + +
+

Clear the screen, +then redraw the current line, +leaving the current line at the top of the screen. +

+
+
redraw-current-line () + +
+

Refresh the current line. By default, this is unbound. +

+
+
+ +
+ +

8.4.2 Commands For Manipulating The History

+ +
+
accept-line (Newline or Return) + +
+

Accept the line regardless of where the cursor is. +If this line is +non-empty, add it to the history list according to the setting of +the HISTCONTROL and HISTIGNORE variables. +If this line is a modified history line, then restore the history line +to its original state. +

+
+
previous-history (C-p) + +
+

Move ‘back’ through the history list, fetching the previous command. +

+
+
next-history (C-n) + +
+

Move ‘forward’ through the history list, fetching the next command. +

+
+
beginning-of-history (M-<) + +
+

Move to the first line in the history. +

+
+
end-of-history (M->) + +
+

Move to the end of the input history, i.e., the line currently +being entered. +

+
+
reverse-search-history (C-r) + +
+

Search backward starting at the current line and moving ‘up’ through +the history as necessary. This is an incremental search. +This command sets the region to the matched text and activates the mark. +

+
+
forward-search-history (C-s) + +
+

Search forward starting at the current line and moving ‘down’ through +the history as necessary. This is an incremental search. +This command sets the region to the matched text and activates the mark. +

+
+
non-incremental-reverse-search-history (M-p) + +
+

Search backward starting at the current line and moving ‘up’ +through the history as necessary using a non-incremental search +for a string supplied by the user. +The search string may match anywhere in a history line. +

+
+
non-incremental-forward-search-history (M-n) + +
+

Search forward starting at the current line and moving ‘down’ +through the history as necessary using a non-incremental search +for a string supplied by the user. +The search string may match anywhere in a history line. +

+
+
history-search-forward () + +
+

Search forward through the history for the string of characters +between the start of the current line and the point. +The search string must match at the beginning of a history line. +This is a non-incremental search. +By default, this command is unbound. +

+
+
history-search-backward () + +
+

Search backward through the history for the string of characters +between the start of the current line and the point. +The search string must match at the beginning of a history line. +This is a non-incremental search. +By default, this command is unbound. +

+
+
history-substring-search-forward () + +
+

Search forward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search. +By default, this command is unbound. +

+
+
history-substring-search-backward () + +
+

Search backward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search. +By default, this command is unbound. +

+
+
yank-nth-arg (M-C-y) + +
+

Insert the first argument to the previous command (usually +the second word on the previous line) at point. +With an argument n, +insert the nth word from the previous command (the words +in the previous command begin with word 0). A negative argument +inserts the nth word from the end of the previous command. +Once the argument n is computed, the argument is extracted +as if the ‘!n’ history expansion had been specified. +

+
+
yank-last-arg (M-. or M-_) + +
+

Insert last argument to the previous command (the last word of the +previous history entry). +With a numeric argument, behave exactly like yank-nth-arg. +Successive calls to yank-last-arg move back through the history +list, inserting the last word (or the word specified by the argument to +the first call) of each line in turn. +Any numeric argument supplied to these successive calls determines +the direction to move through the history. A negative argument switches +the direction through the history (back or forward). +The history expansion facilities are used to extract the last argument, +as if the ‘!$’ history expansion had been specified. +

+
+
operate-and-get-next (C-o) + +
+

Accept the current line for return to the calling application as if a +newline had been entered, +and fetch the next line relative to the current line from the history +for editing. +A numeric argument, if supplied, specifies the history entry to use instead +of the current line. +

+
+
+ +
+ +

8.4.3 Commands For Changing Text

+ +
+
end-of-file (usually C-d) + +
+

The character indicating end-of-file as set, for example, by +stty. If this character is read when there are no characters +on the line, and point is at the beginning of the line, Readline +interprets it as the end of input and returns EOF. +

+
+
delete-char (C-d) + +
+

Delete the character at point. If this function is bound to the +same character as the tty EOF character, as C-d +commonly is, see above for the effects. +

+
+
backward-delete-char (Rubout) + +
+

Delete the character behind the cursor. A numeric argument means +to kill the characters instead of deleting them. +

+
+
forward-backward-delete-char () + +
+

Delete the character under the cursor, unless the cursor is at the +end of the line, in which case the character behind the cursor is +deleted. By default, this is not bound to a key. +

+
+
quoted-insert (C-q or C-v) + +
+

Add the next character typed to the line verbatim. This is +how to insert key sequences like C-q, for example. +

+ +
+
self-insert (a, b, A, 1, !, …) + +
+

Insert yourself. +

+
+
bracketed-paste-begin () + +
+

This function is intended to be bound to the "bracketed paste" escape +sequence sent by some terminals, and such a binding is assigned by default. +It allows Readline to insert the pasted text as a single unit without treating +each character as if it had been read from the keyboard. The characters +are inserted as if each one was bound to self-insert instead of +executing any editing commands. +

+

Bracketed paste sets the region (the characters between point and the mark) +to the inserted text. It uses the concept of an active mark: when the +mark is active, Readline redisplay uses the terminal’s standout mode to +denote the region. +

+
+
transpose-chars (C-t) + +
+

Drag the character before the cursor forward over +the character at the cursor, moving the +cursor forward as well. If the insertion point +is at the end of the line, then this +transposes the last two characters of the line. +Negative arguments have no effect. +

+
+
transpose-words (M-t) + +
+

Drag the word before point past the word after point, +moving point past that word as well. +If the insertion point is at the end of the line, this transposes +the last two words on the line. +

+
+
upcase-word (M-u) + +
+

Uppercase the current (or following) word. With a negative argument, +uppercase the previous word, but do not move the cursor. +

+
+
downcase-word (M-l) + +
+

Lowercase the current (or following) word. With a negative argument, +lowercase the previous word, but do not move the cursor. +

+
+
capitalize-word (M-c) + +
+

Capitalize the current (or following) word. With a negative argument, +capitalize the previous word, but do not move the cursor. +

+
+
overwrite-mode () + +
+

Toggle overwrite mode. With an explicit positive numeric argument, +switches to overwrite mode. With an explicit non-positive numeric +argument, switches to insert mode. This command affects only +emacs mode; vi mode does overwrite differently. +Each call to readline() starts in insert mode. +

+

In overwrite mode, characters bound to self-insert replace +the text at point rather than pushing the text to the right. +Characters bound to backward-delete-char replace the character +before point with a space. +

+

By default, this command is unbound. +

+
+
+ +
+ +

8.4.4 Killing And Yanking

+ +
+
kill-line (C-k) + +
+

Kill the text from point to the end of the line. +With a negative numeric argument, kill backward from the cursor to the +beginning of the current line. +

+
+
backward-kill-line (C-x Rubout) + +
+

Kill backward from the cursor to the beginning of the current line. +With a negative numeric argument, kill forward from the cursor to the +end of the current line. +

+
+
unix-line-discard (C-u) + +
+

Kill backward from the cursor to the beginning of the current line. +

+
+
kill-whole-line () + +
+

Kill all characters on the current line, no matter where point is. +By default, this is unbound. +

+
+
kill-word (M-d) + +
+

Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as forward-word. +

+
+
backward-kill-word (M-DEL) + +
+

Kill the word behind point. +Word boundaries are the same as backward-word. +

+
+
shell-kill-word (M-C-d) + +
+

Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as shell-forward-word. +

+
+
shell-backward-kill-word () + +
+

Kill the word behind point. +Word boundaries are the same as shell-backward-word. +

+
+
shell-transpose-words (M-C-t) + +
+

Drag the word before point past the word after point, +moving point past that word as well. +If the insertion point is at the end of the line, this transposes +the last two words on the line. +Word boundaries are the same as shell-forward-word and +shell-backward-word. +

+
+
unix-word-rubout (C-w) + +
+

Kill the word behind point, using white space as a word boundary. +The killed text is saved on the kill-ring. +

+
+
unix-filename-rubout () + +
+

Kill the word behind point, using white space and the slash character +as the word boundaries. +The killed text is saved on the kill-ring. +

+
+
delete-horizontal-space () + +
+

Delete all spaces and tabs around point. By default, this is unbound. +

+
+
kill-region () + +
+

Kill the text in the current region. +By default, this command is unbound. +

+
+
copy-region-as-kill () + +
+

Copy the text in the region to the kill buffer, so it can be yanked +right away. By default, this command is unbound. +

+
+
copy-backward-word () + +
+

Copy the word before point to the kill buffer. +The word boundaries are the same as backward-word. +By default, this command is unbound. +

+
+
copy-forward-word () + +
+

Copy the word following point to the kill buffer. +The word boundaries are the same as forward-word. +By default, this command is unbound. +

+
+
yank (C-y) + +
+

Yank the top of the kill ring into the buffer at point. +

+
+
yank-pop (M-y) + +
+

Rotate the kill-ring, and yank the new top. You can only do this if +the prior command is yank or yank-pop. +

+
+ +
+ +

8.4.5 Specifying Numeric Arguments

+
+
digit-argument (M-0, M-1, … M--) + +
+

Add this digit to the argument already accumulating, or start a new +argument. M-- starts a negative argument. +

+
+
universal-argument () + +
+

This is another way to specify an argument. +If this command is followed by one or more digits, optionally with a +leading minus sign, those digits define the argument. +If the command is followed by digits, executing universal-argument +again ends the numeric argument, but is otherwise ignored. +As a special case, if this command is immediately followed by a +character that is neither a digit nor minus sign, the argument count +for the next command is multiplied by four. +The argument count is initially one, so executing this function the +first time makes the argument count four, a second time makes the +argument count sixteen, and so on. +By default, this is not bound to a key. +

+
+ +
+ +

8.4.6 Letting Readline Type For You

+ +
+
complete (TAB) + +
+

Attempt to perform completion on the text before point. +The actual completion performed is application-specific. +Bash attempts completion treating the text as a variable (if the +text begins with ‘$’), username (if the text begins with +‘~’), hostname (if the text begins with ‘@’), or +command (including aliases and functions) in turn. If none +of these produces a match, filename completion is attempted. +

+
+
possible-completions (M-?) + +
+

List the possible completions of the text before point. +When displaying completions, Readline sets the number of columns used +for display to the value of completion-display-width, the value of +the environment variable COLUMNS, or the screen width, in that order. +

+
+
insert-completions (M-*) + +
+

Insert all completions of the text before point that would have +been generated by possible-completions. +

+
+
menu-complete () + +
+

Similar to complete, but replaces the word to be completed +with a single match from the list of possible completions. +Repeated execution of menu-complete steps through the list +of possible completions, inserting each match in turn. +At the end of the list of completions, the bell is rung +(subject to the setting of bell-style) +and the original text is restored. +An argument of n moves n positions forward in the list +of matches; a negative argument may be used to move backward +through the list. +This command is intended to be bound to TAB, but is unbound +by default. +

+
+
menu-complete-backward () + +
+

Identical to menu-complete, but moves backward through the list +of possible completions, as if menu-complete had been given a +negative argument. +

+
+
delete-char-or-list () + +
+

Deletes the character under the cursor if not at the beginning or +end of the line (like delete-char). +If at the end of the line, behaves identically to +possible-completions. +This command is unbound by default. +

+
+
complete-filename (M-/) + +
+

Attempt filename completion on the text before point. +

+
+
possible-filename-completions (C-x /) + +
+

List the possible completions of the text before point, +treating it as a filename. +

+
+
complete-username (M-~) + +
+

Attempt completion on the text before point, treating +it as a username. +

+
+
possible-username-completions (C-x ~) + +
+

List the possible completions of the text before point, +treating it as a username. +

+
+
complete-variable (M-$) + +
+

Attempt completion on the text before point, treating +it as a shell variable. +

+
+
possible-variable-completions (C-x $) + +
+

List the possible completions of the text before point, +treating it as a shell variable. +

+
+
complete-hostname (M-@) + +
+

Attempt completion on the text before point, treating +it as a hostname. +

+
+
possible-hostname-completions (C-x @) + +
+

List the possible completions of the text before point, +treating it as a hostname. +

+
+
complete-command (M-!) + +
+

Attempt completion on the text before point, treating +it as a command name. Command completion attempts to +match the text against aliases, reserved words, shell +functions, shell builtins, and finally executable filenames, +in that order. +

+
+
possible-command-completions (C-x !) + +
+

List the possible completions of the text before point, +treating it as a command name. +

+
+
dynamic-complete-history (M-TAB) + +
+

Attempt completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. +

+
+
dabbrev-expand () + +
+

Attempt menu completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. +

+
+
complete-into-braces (M-{) + +
+

Perform filename completion and insert the list of possible completions +enclosed within braces so the list is available to the shell +(see Brace Expansion). +

+
+
+ +
+ +

8.4.7 Keyboard Macros

+
+
start-kbd-macro (C-x () + +
+

Begin saving the characters typed into the current keyboard macro. +

+
+
end-kbd-macro (C-x )) + +
+

Stop saving the characters typed into the current keyboard macro +and save the definition. +

+
+
call-last-kbd-macro (C-x e) + +
+

Re-execute the last keyboard macro defined, by making the characters +in the macro appear as if typed at the keyboard. +

+
+
print-last-kbd-macro () + +
+

Print the last keboard macro defined in a format suitable for the +inputrc file. +

+
+
+ +
+ +

8.4.8 Some Miscellaneous Commands

+
+
re-read-init-file (C-x C-r) + +
+

Read in the contents of the inputrc file, and incorporate +any bindings or variable assignments found there. +

+
+
abort (C-g) + +
+

Abort the current editing command and +ring the terminal’s bell (subject to the setting of +bell-style). +

+
+
do-lowercase-version (M-A, M-B, M-x, …) + +
+

If the metafied character x is upper case, run the command +that is bound to the corresponding metafied lower case character. +The behavior is undefined if x is already lower case. +

+
+
prefix-meta (ESC) + +
+

Metafy the next character typed. This is for keyboards +without a meta key. Typing ‘ESC f’ is equivalent to typing +M-f. +

+
+
undo (C-_ or C-x C-u) + +
+

Incremental undo, separately remembered for each line. +

+
+
revert-line (M-r) + +
+

Undo all changes made to this line. This is like executing the undo +command enough times to get back to the beginning. +

+
+
tilde-expand (M-&) + +
+

Perform tilde expansion on the current word. +

+
+
set-mark (C-@) + +
+

Set the mark to the point. If a +numeric argument is supplied, the mark is set to that position. +

+
+
exchange-point-and-mark (C-x C-x) + +
+

Swap the point with the mark. The current cursor position is set to +the saved position, and the old cursor position is saved as the mark. +

+
+
character-search (C-]) + +
+

A character is read and point is moved to the next occurrence of that +character. A negative count searches for previous occurrences. +

+
+
character-search-backward (M-C-]) + +
+

A character is read and point is moved to the previous occurrence +of that character. A negative count searches for subsequent +occurrences. +

+
+
skip-csi-sequence () + +
+

Read enough characters to consume a multi-key sequence such as those +defined for keys like Home and End. Such sequences begin with a +Control Sequence Indicator (CSI), usually ESC-[. If this sequence is +bound to "\e[", keys producing such sequences will have no effect +unless explicitly bound to a readline command, instead of inserting +stray characters into the editing buffer. This is unbound by default, +but usually bound to ESC-[. +

+
+
insert-comment (M-#) + +
+

Without a numeric argument, the value of the comment-begin +variable is inserted at the beginning of the current line. +If a numeric argument is supplied, this command acts as a toggle: if +the characters at the beginning of the line do not match the value +of comment-begin, the value is inserted, otherwise +the characters in comment-begin are deleted from the beginning of +the line. +In either case, the line is accepted as if a newline had been typed. +The default value of comment-begin causes this command +to make the current line a shell comment. +If a numeric argument causes the comment character to be removed, the line +will be executed by the shell. +

+
+
dump-functions () + +
+

Print all of the functions and their key bindings to the +Readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an inputrc file. This command is unbound by default. +

+
+
dump-variables () + +
+

Print all of the settable variables and their values to the +Readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an inputrc file. This command is unbound by default. +

+
+
dump-macros () + +
+

Print all of the Readline key sequences bound to macros and the +strings they output. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an inputrc file. This command is unbound by default. +

+
+
glob-complete-word (M-g) + +
+

The word before point is treated as a pattern for pathname expansion, +with an asterisk implicitly appended. This pattern is used to +generate a list of matching file names for possible completions. +

+
+
glob-expand-word (C-x *) + +
+

The word before point is treated as a pattern for pathname expansion, +and the list of matching file names is inserted, replacing the word. +If a numeric argument is supplied, a ‘*’ is appended before +pathname expansion. +

+
+
glob-list-expansions (C-x g) + +
+

The list of expansions that would have been generated by +glob-expand-word is displayed, and the line is redrawn. +If a numeric argument is supplied, a ‘*’ is appended before +pathname expansion. +

+
+
display-shell-version (C-x C-v) + +
+

Display version information about the current instance of Bash. +

+
+
shell-expand-line (M-C-e) + +
+

Expand the line as the shell does. +This performs alias and history expansion as well as all of the shell +word expansions (see Shell Expansions). +

+
+
history-expand-line (M-^) + +
+

Perform history expansion on the current line. +

+
+
magic-space () + +
+

Perform history expansion on the current line and insert a space +(see History Interaction). +

+
+
alias-expand-line () + +
+

Perform alias expansion on the current line (see Aliases). +

+
+
history-and-alias-expand-line () + +
+

Perform history and alias expansion on the current line. +

+
+
insert-last-argument (M-. or M-_) + +
+

A synonym for yank-last-arg. +

+
+
edit-and-execute-command (C-x C-e) + +
+

Invoke an editor on the current command line, and execute the result as shell +commands. +Bash attempts to invoke +$VISUAL, $EDITOR, and emacs +as the editor, in that order. +

+ + +
+
+ +
+ +

8.5 Readline vi Mode

+ +

While the Readline library does not have a full set of vi +editing functions, it does contain enough to allow simple editing +of the line. The Readline vi mode behaves as specified in +the POSIX standard. +

+

In order to switch interactively between emacs and vi +editing modes, use the ‘set -o emacs’ and ‘set -o vi’ +commands (see The Set Builtin). +The Readline default is emacs mode. +

+

When you enter a line in vi mode, you are already placed in +‘insertion’ mode, as if you had typed an ‘i’. Pressing ESC +switches you into ‘command’ mode, where you can edit the text of the +line with the standard vi movement keys, move to previous +history lines with ‘k’ and subsequent lines with ‘j’, and +so forth. +

+
+ +

8.6 Programmable Completion

+ + +

When word completion is attempted for an argument to a command for +which a completion specification (a compspec) has been defined +using the complete builtin (see Programmable Completion Builtins), +the programmable completion facilities are invoked. +

+

First, the command name is identified. +If a compspec has been defined for that command, the +compspec is used to generate the list of possible completions for the word. +If the command word is the empty string (completion attempted at the +beginning of an empty line), any compspec defined with +the -E option to complete is used. +If the command word is a full pathname, a compspec for the full +pathname is searched for first. +If no compspec is found for the full pathname, an attempt is made to +find a compspec for the portion following the final slash. +If those searches do not result in a compspec, any compspec defined with +the -D option to complete is used as the default. +If there is no default compspec, Bash attempts alias expansion +on the command word as a final resort, and attempts to find a compspec +for the command word from any successful expansion +

+

Once a compspec has been found, it is used to generate the list of +matching words. +If a compspec is not found, the default Bash completion +described above (see Commands For Completion) is performed. +

+

First, the actions specified by the compspec are used. +Only matches which are prefixed by the word being completed are +returned. +When the -f or -d option is used for filename or +directory name completion, the shell variable FIGNORE is +used to filter the matches. +See Bash Variables, for a description of FIGNORE. +

+

Any completions specified by a filename expansion pattern to the +-G option are generated next. +The words generated by the pattern need not match the word being completed. +The GLOBIGNORE shell variable is not used to filter the matches, +but the FIGNORE shell variable is used. +

+

Next, the string specified as the argument to the -W option +is considered. +The string is first split using the characters in the IFS +special variable as delimiters. +Shell quoting is honored within the string, in order to provide a +mechanism for the words to contain shell metacharacters or characters +in the value of IFS. +Each word is then expanded using +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, and arithmetic expansion, +as described above (see Shell Expansions). +The results are split using the rules described above +(see Word Splitting). +The results of the expansion are prefix-matched against the word being +completed, and the matching words become the possible completions. +

+

After these matches have been generated, any shell function or command +specified with the -F and -C options is invoked. +When the command or function is invoked, the COMP_LINE, +COMP_POINT, COMP_KEY, and COMP_TYPE variables are +assigned values as described above (see Bash Variables). +If a shell function is being invoked, the COMP_WORDS and +COMP_CWORD variables are also set. +When the function or command is invoked, the first argument ($1) is the +name of the command whose arguments are being completed, the +second argument ($2) is the word being completed, and the third argument +($3) is the word preceding the word being completed on the current command +line. +No filtering of the generated completions against the word being completed +is performed; the function or command has complete freedom in generating +the matches. +

+

Any function specified with -F is invoked first. +The function may use any of the shell facilities, including the +compgen and compopt builtins described below +(see Programmable Completion Builtins), to generate the matches. +It must put the possible completions in the COMPREPLY array +variable, one per array element. +

+

Next, any command specified with the -C option is invoked +in an environment equivalent to command substitution. +It should print a list of completions, one per line, to +the standard output. +Backslash may be used to escape a newline, if necessary. +

+

After all of the possible completions are generated, any filter +specified with the -X option is applied to the list. +The filter is a pattern as used for pathname expansion; a ‘&’ +in the pattern is replaced with the text of the word being completed. +A literal ‘&’ may be escaped with a backslash; the backslash +is removed before attempting a match. +Any completion that matches the pattern will be removed from the list. +A leading ‘!’ negates the pattern; in this case any completion +not matching the pattern will be removed. +If the nocasematch shell option +(see the description of shopt in The Shopt Builtin) +is enabled, the match is performed without regard to the case +of alphabetic characters. +

+

Finally, any prefix and suffix specified with the -P and -S +options are added to each member of the completion list, and the result is +returned to the Readline completion code as the list of possible +completions. +

+

If the previously-applied actions do not generate any matches, and the +-o dirnames option was supplied to complete when the +compspec was defined, directory name completion is attempted. +

+

If the -o plusdirs option was supplied to complete when +the compspec was defined, directory name completion is attempted and any +matches are added to the results of the other actions. +

+

By default, if a compspec is found, whatever it generates is returned to +the completion code as the full set of possible completions. +The default Bash completions are not attempted, and the Readline default +of filename completion is disabled. +If the -o bashdefault option was supplied to complete when +the compspec was defined, the default Bash completions are attempted +if the compspec generates no matches. +If the -o default option was supplied to complete when the +compspec was defined, Readline’s default completion will be performed +if the compspec (and, if attempted, the default Bash completions) +generate no matches. +

+

When a compspec indicates that directory name completion is desired, +the programmable completion functions force Readline to append a slash +to completed names which are symbolic links to directories, subject to +the value of the mark-directories Readline variable, regardless +of the setting of the mark-symlinked-directories Readline variable. +

+

There is some support for dynamically modifying completions. This is +most useful when used in combination with a default completion specified +with -D. It’s possible for shell functions executed as completion +handlers to indicate that completion should be retried by returning an +exit status of 124. If a shell function returns 124, and changes +the compspec associated with the command on which completion is being +attempted (supplied as the first argument when the function is executed), +programmable completion restarts from the beginning, with an +attempt to find a new compspec for that command. This allows a set of +completions to be built dynamically as completion is attempted, rather than +being loaded all at once. +

+

For instance, assuming that there is a library of compspecs, each kept in a +file corresponding to the name of the command, the following default +completion function would load completions dynamically: +

+
+
_completion_loader()
+{
+    . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
+}
+complete -D -F _completion_loader -o bashdefault -o default
+
+ +
+ +

8.7 Programmable Completion Builtins

+ + +

Three builtin commands are available to manipulate the programmable completion +facilities: one to specify how the arguments to a particular command are to +be completed, and two to modify the completion as it is happening. +

+
+
compgen
+
+
+
compgen [option] [word]
+
+ +

Generate possible completion matches for word according to +the options, which may be any option accepted by the +complete +builtin with the exception of -p and -r, and write +the matches to the standard output. +When using the -F or -C options, the various shell variables +set by the programmable completion facilities, while available, will not +have useful values. +

+

The matches will be generated in the same way as if the programmable +completion code had generated them directly from a completion specification +with the same flags. +If word is specified, only those completions matching word +will be displayed. +

+

The return value is true unless an invalid option is supplied, or no +matches were generated. +

+
+
complete
+
+
+
complete [-abcdefgjksuv] [-o comp-option] [-DEI] [-A action] [-G globpat]
+[-W wordlist] [-F function] [-C command] [-X filterpat]
+[-P prefix] [-S suffix] name [name …]
+complete -pr [-DEI] [name …]
+
+ +

Specify how arguments to each name should be completed. +If the -p option is supplied, or if no options are supplied, existing +completion specifications are printed in a way that allows them to be +reused as input. +The -r option removes a completion specification for +each name, or, if no names are supplied, all +completion specifications. +The -D option indicates that other supplied options and actions should +apply to the “default” command completion; that is, completion attempted +on a command for which no completion has previously been defined. +The -E option indicates that other supplied options and actions should +apply to “empty” command completion; that is, completion attempted on a +blank line. +The -I option indicates that other supplied options and actions should +apply to completion on the initial non-assignment word on the line, or after a +command delimiter such as ‘;’ or ‘|’, which is usually command +name completion. +If multiple options are supplied, the -D option takes precedence +over -E, and both take precedence over -I. +If any of -D, -E, or -I are supplied, any other +name arguments are ignored; these completions only apply to the case +specified by the option. +

+

The process of applying these completion specifications when word completion +is attempted is described above (see Programmable Completion). +

+

Other options, if specified, have the following meanings. +The arguments to the -G, -W, and -X options +(and, if necessary, the -P and -S options) +should be quoted to protect them from expansion before the +complete builtin is invoked. +

+ +
+
-o comp-option
+

The comp-option controls several aspects of the compspec’s behavior +beyond the simple generation of completions. +comp-option may be one of: +

+
+
bashdefault
+

Perform the rest of the default Bash completions if the compspec +generates no matches. +

+
+
default
+

Use Readline’s default filename completion if the compspec generates +no matches. +

+
+
dirnames
+

Perform directory name completion if the compspec generates no matches. +

+
+
filenames
+

Tell Readline that the compspec generates filenames, so it can perform any +filename-specific processing (like adding a slash to directory names, +quoting special characters, or suppressing trailing spaces). +This option is intended to be used with shell functions specified +with -F. +

+
+
noquote
+

Tell Readline not to quote the completed words if they are filenames +(quoting filenames is the default). +

+
+
nosort
+

Tell Readline not to sort the list of possible completions alphabetically. +

+
+
nospace
+

Tell Readline not to append a space (the default) to words completed at +the end of the line. +

+
+
plusdirs
+

After any matches defined by the compspec are generated, +directory name completion is attempted and any +matches are added to the results of the other actions. +

+
+
+ +
+
-A action
+

The action may be one of the following to generate a list of possible +completions: +

+
+
alias
+

Alias names. May also be specified as -a. +

+
+
arrayvar
+

Array variable names. +

+
+
binding
+

Readline key binding names (see Bindable Readline Commands). +

+
+
builtin
+

Names of shell builtin commands. May also be specified as -b. +

+
+
command
+

Command names. May also be specified as -c. +

+
+
directory
+

Directory names. May also be specified as -d. +

+
+
disabled
+

Names of disabled shell builtins. +

+
+
enabled
+

Names of enabled shell builtins. +

+
+
export
+

Names of exported shell variables. May also be specified as -e. +

+
+
file
+

File names. May also be specified as -f. +

+
+
function
+

Names of shell functions. +

+
+
group
+

Group names. May also be specified as -g. +

+
+
helptopic
+

Help topics as accepted by the help builtin (see Bash Builtins). +

+
+
hostname
+

Hostnames, as taken from the file specified by the +HOSTFILE shell variable (see Bash Variables). +

+
+
job
+

Job names, if job control is active. May also be specified as -j. +

+
+
keyword
+

Shell reserved words. May also be specified as -k. +

+
+
running
+

Names of running jobs, if job control is active. +

+
+
service
+

Service names. May also be specified as -s. +

+
+
setopt
+

Valid arguments for the -o option to the set builtin +(see The Set Builtin). +

+
+
shopt
+

Shell option names as accepted by the shopt builtin +(see Bash Builtins). +

+
+
signal
+

Signal names. +

+
+
stopped
+

Names of stopped jobs, if job control is active. +

+
+
user
+

User names. May also be specified as -u. +

+
+
variable
+

Names of all shell variables. May also be specified as -v. +

+
+ +
+
-C command
+

command is executed in a subshell environment, and its output is +used as the possible completions. +

+
+
-F function
+

The shell function function is executed in the current shell +environment. +When it is executed, $1 is the name of the command whose arguments are +being completed, $2 is the word being completed, and $3 is the word +preceding the word being completed, as described above +(see Programmable Completion). +When it finishes, the possible completions are retrieved from the value +of the COMPREPLY array variable. +

+
+
-G globpat
+

The filename expansion pattern globpat is expanded to generate +the possible completions. +

+
+
-P prefix
+

prefix is added at the beginning of each possible completion +after all other options have been applied. +

+
+
-S suffix
+

suffix is appended to each possible completion +after all other options have been applied. +

+
+
-W wordlist
+

The wordlist is split using the characters in the +IFS special variable as delimiters, and each resultant word +is expanded. +The possible completions are the members of the resultant list which +match the word being completed. +

+
+
-X filterpat
+

filterpat is a pattern as used for filename expansion. +It is applied to the list of possible completions generated by the +preceding options and arguments, and each completion matching +filterpat is removed from the list. +A leading ‘!’ in filterpat negates the pattern; in this +case, any completion not matching filterpat is removed. +

+
+ +

The return value is true unless an invalid option is supplied, an option +other than -p or -r is supplied without a name +argument, an attempt is made to remove a completion specification for +a name for which no specification exists, or +an error occurs adding a completion specification. +

+
+
compopt
+
+
+
compopt [-o option] [-DEI] [+o option] [name]
+
+

Modify completion options for each name according to the +options, or for the currently-executing completion if no names +are supplied. +If no options are given, display the completion options for each +name or the current completion. +The possible values of option are those valid for the complete +builtin described above. +The -D option indicates that other supplied options should +apply to the “default” command completion; that is, completion attempted +on a command for which no completion has previously been defined. +The -E option indicates that other supplied options should +apply to “empty” command completion; that is, completion attempted on a +blank line. +The -I option indicates that other supplied options should +apply to completion on the initial non-assignment word on the line, or after a +command delimiter such as ‘;’ or ‘|’, which is usually command +name completion. +

+

If multiple options are supplied, the -D option takes precedence +over -E, and both take precedence over -I +

+

The return value is true unless an invalid option is supplied, an attempt +is made to modify the options for a name for which no completion +specification exists, or an output error occurs. +

+
+
+ +
+ +

8.8 A Programmable Completion Example

+ +

The most common way to obtain additional completion functionality beyond +the default actions complete and compgen provide is to use +a shell function and bind it to a particular command using complete -F. +

+

The following function provides completions for the cd builtin. +It is a reasonably good example of what shell functions must do when +used for completion. This function uses the word passed as $2 +to determine the directory name to complete. You can also use the +COMP_WORDS array variable; the current word is indexed by the +COMP_CWORD variable. +

+

The function relies on the complete and compgen builtins +to do much of the work, adding only the things that the Bash cd +does beyond accepting basic directory names: +tilde expansion (see Tilde Expansion), +searching directories in $CDPATH, which is described above +(see Bourne Shell Builtins), +and basic support for the cdable_vars shell option +(see The Shopt Builtin). +_comp_cd modifies the value of IFS so that it contains only +a newline to accommodate file names containing spaces and tabs – +compgen prints the possible completions it generates one per line. +

+

Possible completions go into the COMPREPLY array variable, one +completion per array element. The programmable completion system retrieves +the completions from there when the function returns. +

+
+
# A completion function for the cd builtin
+# based on the cd completion function from the bash_completion package
+_comp_cd()
+{
+    local IFS=$' \t\n'    # normalize IFS
+    local cur _skipdot _cdpath
+    local i j k
+
+    # Tilde expansion, which also expands tilde to full pathname
+    case "$2" in
+    \~*)    eval cur="$2" ;;
+    *)      cur=$2 ;;
+    esac
+
+    # no cdpath or absolute pathname -- straight directory completion
+    if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then
+        # compgen prints paths one per line; could also use while loop
+        IFS=$'\n'
+        COMPREPLY=( $(compgen -d -- "$cur") )
+        IFS=$' \t\n'
+    # CDPATH+directories in the current directory if not in CDPATH
+    else
+        IFS=$'\n'
+        _skipdot=false
+        # preprocess CDPATH to convert null directory names to .
+        _cdpath=${CDPATH/#:/.:}
+        _cdpath=${_cdpath//::/:.:}
+        _cdpath=${_cdpath/%:/:.}
+        for i in ${_cdpath//:/$'\n'}; do
+            if [[ $i -ef . ]]; then _skipdot=true; fi
+            k="${#COMPREPLY[@]}"
+            for j in $( compgen -d -- "$i/$cur" ); do
+                COMPREPLY[k++]=${j#$i/}        # cut off directory
+            done
+        done
+        $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") )
+        IFS=$' \t\n'
+    fi
+
+    # variable names if appropriate shell option set and no completions
+    if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then
+        COMPREPLY=( $(compgen -v -- "$cur") )
+    fi
+
+    return 0
+}
+
+ +

We install the completion function using the -F option to +complete: +

+
+
# Tell readline to quote appropriate and append slashes to directories;
+# use the bash default completion for other arguments
+complete -o filenames -o nospace -o bashdefault -F _comp_cd cd
+
+ +

Since we’d like Bash and Readline to take care of some +of the other details for us, we use several other options to tell Bash +and Readline what to do. The -o filenames option tells Readline +that the possible completions should be treated as filenames, and quoted +appropriately. That option will also cause Readline to append a slash to +filenames it can determine are directories (which is why we might want to +extend _comp_cd to append a slash if we’re using directories found +via CDPATH: Readline can’t tell those completions are directories). +The -o nospace option tells Readline to not append a space +character to the directory name, in case we want to append to it. +The -o bashdefault option brings in the rest of the "Bash default" +completions – possible completion that Bash adds to the default Readline +set. These include things like command name completion, variable completion +for words beginning with ‘$’ or ‘${’, completions containing pathname +expansion patterns (see Filename Expansion), and so on. +

+

Once installed using complete, _comp_cd will be called every +time we attempt word completion for a cd command. +

+

Many more examples – an extensive collection of completions for most of +the common GNU, Unix, and Linux commands – are available as part of the +bash_completion project. This is installed by default on many GNU/Linux +distributions. Originally written by Ian Macdonald, the project now lives +at https://github.com/scop/bash-completion/. There are ports for +other systems such as Solaris and Mac OS X. +

+

An older version of the bash_completion package is distributed with bash +in the examples/complete subdirectory. +

+ + +
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

9 Using History Interactively

+ + +

This chapter describes how to use the GNU History Library +interactively, from a user’s standpoint. +It should be considered a user’s guide. +For information on using the GNU History Library in other programs, +see the GNU Readline Library Manual. +

+ + + + + + +
+ +

9.1 Bash History Facilities

+ + + +

When the -o history option to the set builtin +is enabled (see The Set Builtin), +the shell provides access to the command history, +the list of commands previously typed. +The value of the HISTSIZE shell variable is used as the +number of commands to save in a history list. +The text of the last $HISTSIZE +commands (default 500) is saved. +The shell stores each command in the history list prior to +parameter and variable expansion +but after history expansion is performed, subject to the +values of the shell variables +HISTIGNORE and HISTCONTROL. +

+

When the shell starts up, the history is initialized from the +file named by the HISTFILE variable (default ~/.bash_history). +The file named by the value of HISTFILE is truncated, if +necessary, to contain no more than the number of lines specified by +the value of the HISTFILESIZE variable. +When a shell with history enabled exits, the last +$HISTSIZE lines are copied from the history list to the file +named by $HISTFILE. +If the histappend shell option is set (see Bash Builtins), +the lines are appended to the history file, +otherwise the history file is overwritten. +If HISTFILE +is unset, or if the history file is unwritable, the history is not saved. +After saving the history, the history file is truncated +to contain no more than $HISTFILESIZE lines. +If HISTFILESIZE is unset, or set to null, a non-numeric value, or +a numeric value less than zero, the history file is not truncated. +

+

If the HISTTIMEFORMAT is set, the time stamp information +associated with each history entry is written to the history file, +marked with the history comment character. +When the history file is read, lines beginning with the history +comment character followed immediately by a digit are interpreted +as timestamps for the following history entry. +

+

The builtin command fc may be used to list or edit and re-execute +a portion of the history list. +The history builtin may be used to display or modify the history +list and manipulate the history file. +When using command-line editing, search commands +are available in each editing mode that provide access to the +history list (see Commands For History). +

+

The shell allows control over which commands are saved on the history +list. The HISTCONTROL and HISTIGNORE +variables may be set to cause the shell to save only a subset of the +commands entered. +The cmdhist +shell option, if enabled, causes the shell to attempt to save each +line of a multi-line command in the same history entry, adding +semicolons where necessary to preserve syntactic correctness. +The lithist +shell option causes the shell to save the command with embedded newlines +instead of semicolons. +The shopt builtin is used to set these options. +See The Shopt Builtin, for a description of shopt. +

+
+ +

9.2 Bash History Builtins

+ + +

Bash provides two builtin commands which manipulate the +history list and history file. +

+
+
fc
+
+
+
fc [-e ename] [-lnr] [first] [last]
+fc -s [pat=rep] [command]
+
+ +

The first form selects a range of commands from first to +last from the history list and displays or edits and re-executes +them. +Both first and +last may be specified as a string (to locate the most recent +command beginning with that string) or as a number (an index into the +history list, where a negative number is used as an offset from the +current command number). +

+

When listing, a first or last of 0 is equivalent to -1 +and -0 is equivalent to the current command (usually the fc +command); +otherwise 0 is equivalent to -1 and -0 is invalid. +

+

If last is not specified, it is set to +first. If first is not specified, it is set to the previous +command for editing and -16 for listing. If the -l flag is +given, the commands are listed on standard output. The -n flag +suppresses the command numbers when listing. The -r flag +reverses the order of the listing. Otherwise, the editor given by +ename is invoked on a file containing those commands. If +ename is not given, the value of the following variable expansion +is used: ${FCEDIT:-${EDITOR:-vi}}. This says to use the +value of the FCEDIT variable if set, or the value of the +EDITOR variable if that is set, or vi if neither is set. +When editing is complete, the edited commands are echoed and executed. +

+

In the second form, command is re-executed after each instance +of pat in the selected command is replaced by rep. +command is interpreted the same as first above. +

+

A useful alias to use with the fc command is r='fc -s', so +that typing ‘r cc’ runs the last command beginning with cc +and typing ‘r’ re-executes the last command (see Aliases). +

+
+
history
+
+
+
history [n]
+history -c
+history -d offset
+history -d start-end
+history [-anrw] [filename]
+history -ps arg
+
+ +

With no options, display the history list with line numbers. +Lines prefixed with a ‘*’ have been modified. +An argument of n lists only the last n lines. +If the shell variable HISTTIMEFORMAT is set and not null, +it is used as a format string for strftime to display +the time stamp associated with each displayed history entry. +No intervening blank is printed between the formatted time stamp +and the history line. +

+

Options, if supplied, have the following meanings: +

+
+
-c
+

Clear the history list. This may be combined +with the other options to replace the history list completely. +

+
+
-d offset
+

Delete the history entry at position offset. +If offset is positive, it should be specified as it appears when +the history is displayed. +If offset is negative, it is interpreted as relative to one greater +than the last history position, so negative indices count back from the +end of the history, and an index of ‘-1’ refers to the current +history -d command. +

+
+
-d start-end
+

Delete the history entries between positions start and end, +inclusive. Positive and negative values for start and end +are interpreted as described above. +

+
+
-a
+

Append the new history lines to the history file. +These are history lines entered since the beginning of the current +Bash session, but not already appended to the history file. +

+
+
-n
+

Append the history lines not already read from the history file +to the current history list. These are lines appended to the history +file since the beginning of the current Bash session. +

+
+
-r
+

Read the history file and append its contents to +the history list. +

+
+
-w
+

Write out the current history list to the history file. +

+
+
-p
+

Perform history substitution on the args and display the result +on the standard output, without storing the results in the history list. +

+
+
-s
+

The args are added to the end of +the history list as a single entry. +

+
+
+ +

When any of the -w, -r, -a, or -n options is +used, if filename +is given, then it is used as the history file. If not, then +the value of the HISTFILE variable is used. +

+
+
+ +
+ +

9.3 History Expansion

+ + +

The History library provides a history expansion feature that is similar +to the history expansion provided by csh. This section +describes the syntax used to manipulate the history information. +

+

History expansions introduce words from the history list into +the input stream, making it easy to repeat commands, insert the +arguments to a previous command into the current input line, or +fix errors in previous commands quickly. +

+

History expansion is performed immediately after a complete line +is read, before the shell breaks it into words, and is performed +on each line individually. Bash attempts to inform the history +expansion functions about quoting still in effect from previous lines. +

+

History expansion takes place in two parts. The first is to determine +which line from the history list should be used during substitution. +The second is to select portions of that line for inclusion into the +current one. The line selected from the history is called the +event, and the portions of that line that are acted upon are +called words. Various modifiers are available to manipulate +the selected words. The line is broken into words in the same fashion +that Bash does, so that several words +surrounded by quotes are considered one word. +History expansions are introduced by the appearance of the +history expansion character, which is ‘!’ by default. +

+

History expansion implements shell-like quoting conventions: +a backslash can be used to remove the special handling for the next character; +single quotes enclose verbatim sequences of characters, and can be used to +inhibit history expansion; +and characters enclosed within double quotes may be subject to history +expansion, since backslash can escape the history expansion character, +but single quotes may not, since they are not treated specially within +double quotes. +

+

When using the shell, only ‘\’ and ‘'’ may be used to escape the +history expansion character, but the history expansion character is +also treated as quoted if it immediately precedes the closing double quote +in a double-quoted string. +

+

Several shell options settable with the shopt +builtin (see The Shopt Builtin) may be used to tailor +the behavior of history expansion. If the +histverify shell option is enabled, and Readline +is being used, history substitutions are not immediately passed to +the shell parser. +Instead, the expanded line is reloaded into the Readline +editing buffer for further modification. +If Readline is being used, and the histreedit +shell option is enabled, a failed history expansion will be +reloaded into the Readline editing buffer for correction. +The -p option to the history builtin command +may be used to see what a history expansion will do before using it. +The -s option to the history builtin may be used to +add commands to the end of the history list without actually executing +them, so that they are available for subsequent recall. +This is most useful in conjunction with Readline. +

+

The shell allows control of the various characters used by the +history expansion mechanism with the histchars variable, +as explained above (see Bash Variables). The shell uses +the history comment character to mark history timestamps when +writing the history file. +

+ + + + + + +
+ +

9.3.1 Event Designators

+ + +

An event designator is a reference to a command line entry in the +history list. +Unless the reference is absolute, events are relative to the current +position in the history list. + +

+
+
!
+

Start a history substitution, except when followed by a space, tab, +the end of the line, ‘=’ or ‘(’ (when the +extglob shell option is enabled using the shopt builtin). +

+
+
!n
+

Refer to command line n. +

+
+
!-n
+

Refer to the command n lines back. +

+
+
!!
+

Refer to the previous command. This is a synonym for ‘!-1’. +

+
+
!string
+

Refer to the most recent command +preceding the current position in the history list +starting with string. +

+
+
!?string[?]
+

Refer to the most recent command +preceding the current position in the history list +containing string. +The trailing +‘?’ may be omitted if the string is followed immediately by +a newline. +If string is missing, the string from the most recent search is used; +it is an error if there is no previous search string. +

+
+
^string1^string2^
+

Quick Substitution. Repeat the last command, replacing string1 +with string2. Equivalent to +!!:s^string1^string2^. +

+
+
!#
+

The entire command line typed so far. +

+
+
+ +
+ +

9.3.2 Word Designators

+ +

Word designators are used to select desired words from the event. +A ‘:’ separates the event specification from the word designator. It +may be omitted if the word designator begins with a ‘^’, ‘$’, +‘*’, ‘-’, or ‘%’. Words are numbered from the beginning +of the line, with the first word being denoted by 0 (zero). Words are +inserted into the current line separated by single spaces. +

+

For example, +

+
+
!!
+

designates the preceding command. When you type this, the preceding +command is repeated in toto. +

+
+
!!:$
+

designates the last argument of the preceding command. This may be +shortened to !$. +

+
+
!fi:2
+

designates the second argument of the most recent command starting with +the letters fi. +

+
+ +

Here are the word designators: +

+
+
0 (zero)
+

The 0th word. For many applications, this is the command word. +

+
+
n
+

The nth word. +

+
+
^
+

The first argument; that is, word 1. +

+
+
$
+

The last argument. +

+
+
%
+

The first word matched by the most recent ‘?string?’ search, +if the search string begins with a character that is part of a word. +

+
+
x-y
+

A range of words; ‘-y’ abbreviates ‘0-y’. +

+
+
*
+

All of the words, except the 0th. This is a synonym for ‘1-$’. +It is not an error to use ‘*’ if there is just one word in the event; +the empty string is returned in that case. +

+
+
x*
+

Abbreviates ‘x-$’ +

+
+
x-
+

Abbreviates ‘x-$’ like ‘x*’, but omits the last word. +If ‘x’ is missing, it defaults to 0. +

+
+
+ +

If a word designator is supplied without an event specification, the +previous command is used as the event. +

+
+ +

9.3.3 Modifiers

+ +

After the optional word designator, you can add a sequence of one or more +of the following modifiers, each preceded by a ‘:’. +These modify, or edit, the word or words selected from the history event. +

+
+
h
+

Remove a trailing pathname component, leaving only the head. +

+
+
t
+

Remove all leading pathname components, leaving the tail. +

+
+
r
+

Remove a trailing suffix of the form ‘.suffix’, leaving +the basename. +

+
+
e
+

Remove all but the trailing suffix. +

+
+
p
+

Print the new command but do not execute it. +

+
+
q
+

Quote the substituted words, escaping further substitutions. +

+
+
x
+

Quote the substituted words as with ‘q’, +but break into words at spaces, tabs, and newlines. +The ‘q’ and ‘x’ modifiers are mutually exclusive; the last one +supplied is used. +

+
+
s/old/new/
+

Substitute new for the first occurrence of old in the +event line. +Any character may be used as the delimiter in place of ‘/’. +The delimiter may be quoted in old and new +with a single backslash. If ‘&’ appears in new, +it is replaced by old. A single backslash will quote +the ‘&’. +If old is null, it is set to the last old +substituted, or, if no previous history substitutions took place, +the last string +in a !?string[?] +search. +If new is is null, each matching old is deleted. +The final delimiter is optional if it is the last +character on the input line. +

+
+
&
+

Repeat the previous substitution. +

+
+
g
+
a
+

Cause changes to be applied over the entire event line. Used in +conjunction with ‘s’, as in gs/old/new/, +or with ‘&’. +

+
+
G
+

Apply the following ‘s’ or ‘&’ modifier once to each word +in the event. +

+
+
+ +
+
+

+Next: , Previous: , Up: Top   [Contents][Index]

+
+

10 Installing Bash

+ +

This chapter provides basic instructions for installing Bash on +the various supported platforms. The distribution supports the +GNU operating systems, nearly every version of Unix, and several +non-Unix systems such as BeOS and Interix. +Other independent ports exist for +MS-DOS, OS/2, and Windows platforms. +

+ + + + + + + + + + + +
+ +

10.1 Basic Installation

+ + + + + +

These are installation instructions for Bash. +

+

The simplest way to compile Bash is: +

+
    +
  1. cd to the directory containing the source code and type +‘./configure’ to configure Bash for your system. If you’re +using csh on an old version of System V, you might need to +type ‘sh ./configure’ instead to prevent csh from trying +to execute configure itself. + +

    Running configure takes some time. +While running, it prints messages telling which features it is +checking for. +

    +
  2. Type ‘make’ to compile Bash and build the bashbug bug +reporting script. + +
  3. Optionally, type ‘make tests’ to run the Bash test suite. + +
  4. Type ‘make install’ to install bash and bashbug. +This will also install the manual pages and Info file. + +
+ +

The configure shell script attempts to guess correct +values for various system-dependent variables used during +compilation. It uses those values to create a Makefile in +each directory of the package (the top directory, the +builtins, doc, and support directories, +each directory under lib, and several others). It also creates a +config.h file containing system-dependent definitions. +Finally, it creates a shell script named config.status that you +can run in the future to recreate the current configuration, a +file config.cache that saves the results of its tests to +speed up reconfiguring, and a file config.log containing +compiler output (useful mainly for debugging configure). +If at some point +config.cache contains results you don’t want to keep, you +may remove or edit it. +

+

To find out more about the options and arguments that the +configure script understands, type +

+
+
bash-4.2$ ./configure --help
+
+ +

at the Bash prompt in your Bash source directory. +

+

If you want to build Bash in a directory separate from the source +directory – to build for multiple architectures, for example – +just use the full path to the configure script. The following commands +will build bash in a directory under /usr/local/build from +the source code in /usr/local/src/bash-4.4: +

+
+
mkdir /usr/local/build/bash-4.4
+cd /usr/local/build/bash-4.4
+bash /usr/local/src/bash-4.4/configure
+make
+
+ +

See Compiling For Multiple Architectures for more information +about building in a directory separate from the source. +

+

If you need to do unusual things to compile Bash, please +try to figure out how configure could check whether or not +to do them, and mail diffs or instructions to +bash-maintainers@gnu.org so they can be +considered for the next release. +

+

The file configure.ac is used to create configure +by a program called Autoconf. You only need +configure.ac if you want to change it or regenerate +configure using a newer version of Autoconf. If +you do this, make sure you are using Autoconf version 2.50 or +newer. +

+

You can remove the program binaries and object files from the +source code directory by typing ‘make clean’. To also remove the +files that configure created (so you can compile Bash for +a different kind of computer), type ‘make distclean’. +

+
+ +

10.2 Compilers and Options

+ +

Some systems require unusual options for compilation or linking +that the configure script does not know about. You can +give configure initial values for variables by setting +them in the environment. Using a Bourne-compatible shell, you +can do that on the command line like this: +

+
+
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+ +

On systems that have the env program, you can do it like this: +

+
+
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+ +

The configuration process uses GCC to build Bash if it +is available. +

+
+ +

10.3 Compiling For Multiple Architectures

+ +

You can compile Bash for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of make that +supports the VPATH variable, such as GNU make. +cd to the +directory where you want the object files and executables to go and run +the configure script from the source directory +(see Basic Installation). +You may need to +supply the --srcdir=PATH argument to tell configure where the +source files are. configure automatically checks for the +source code in the directory that configure is in and in ‘..’. +

+

If you have to use a make that does not supports the VPATH +variable, you can compile Bash for one architecture at a +time in the source code directory. After you have installed +Bash for one architecture, use ‘make distclean’ before +reconfiguring for another architecture. +

+

Alternatively, if your system supports symbolic links, you can use the +support/mkclone script to create a build tree which has +symbolic links back to each file in the source directory. Here’s an +example that creates a build directory in the current directory from a +source directory /usr/gnu/src/bash-2.0: +

+
+
bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 .
+
+ +

The mkclone script requires Bash, so you must have already built +Bash for at least one architecture before you can create build +directories for other architectures. +

+
+ +

10.4 Installation Names

+ +

By default, ‘make install’ will install into +/usr/local/bin, /usr/local/man, etc. You can +specify an installation prefix other than /usr/local by +giving configure the option --prefix=PATH, +or by specifying a value for the DESTDIRmake’ +variable when running ‘make install’. +

+

You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. +If you give configure the option +--exec-prefix=PATH, ‘make install’ will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. +

+
+ +

10.5 Specifying the System Type

+ +

There may be some features configure can not figure out +automatically, but need to determine by the type of host Bash +will run on. Usually configure can figure that +out, but if it prints a message saying it can not guess the host +type, give it the --host=TYPE option. ‘TYPE’ can +either be a short name for the system type, such as ‘sun4’, +or a canonical name with three fields: ‘CPU-COMPANY-SYSTEM’ +(e.g., ‘i386-unknown-freebsd4.2’). +

+

See the file support/config.sub for the possible +values of each field. +

+
+ +

10.6 Sharing Defaults

+ +

If you want to set default values for configure scripts to +share, you can create a site shell script called +config.site that gives default values for variables like +CC, cache_file, and prefix. configure +looks for PREFIX/share/config.site if it exists, then +PREFIX/etc/config.site if it exists. Or, you can set the +CONFIG_SITE environment variable to the location of the site +script. A warning: the Bash configure looks for a site script, +but not all configure scripts do. +

+
+ +

10.7 Operation Controls

+ +

configure recognizes the following options to control how it +operates. +

+
+
--cache-file=file
+

Use and save the results of the tests in +file instead of ./config.cache. Set file to +/dev/null to disable caching, for debugging +configure. +

+
+
--help
+

Print a summary of the options to configure, and exit. +

+
+
--quiet
+
--silent
+
-q
+

Do not print messages saying which checks are being made. +

+
+
--srcdir=dir
+

Look for the Bash source code in directory dir. Usually +configure can determine that directory automatically. +

+
+
--version
+

Print the version of Autoconf used to generate the configure +script, and exit. +

+
+ +

configure also accepts some other, not widely used, boilerplate +options. ‘configure --help’ prints the complete list. +

+
+ +

10.8 Optional Features

+ +

The Bash configure has a number of --enable-feature +options, where feature indicates an optional part of Bash. +There are also several --with-package options, +where package is something like ‘bash-malloc’ or ‘purify’. +To turn off the default use of a package, use +--without-package. To configure Bash without a feature +that is enabled by default, use --disable-feature. +

+

Here is a complete list of the --enable- and +--with- options that the Bash configure recognizes. +

+
+
--with-afs
+

Define if you are using the Andrew File System from Transarc. +

+
+
--with-bash-malloc
+

Use the Bash version of +malloc in the directory lib/malloc. This is not the same +malloc that appears in GNU libc, but an older version +originally derived from the 4.2 BSD malloc. This malloc +is very fast, but wastes some space on each allocation. +This option is enabled by default. +The NOTES file contains a list of systems for +which this should be turned off, and configure disables this +option automatically for a number of systems. +

+
+
--with-curses
+

Use the curses library instead of the termcap library. This should +be supplied if your system has an inadequate or incomplete termcap +database. +

+
+
--with-gnu-malloc
+

A synonym for --with-bash-malloc. +

+
+
--with-installed-readline[=PREFIX]
+

Define this to make Bash link with a locally-installed version of Readline +rather than the version in lib/readline. This works only with +Readline 5.0 and later versions. If PREFIX is yes or not +supplied, configure uses the values of the make variables +includedir and libdir, which are subdirectories of prefix +by default, to find the installed version of Readline if it is not in +the standard system include and library directories. +If PREFIX is no, Bash links with the version in +lib/readline. +If PREFIX is set to any other value, configure treats it as +a directory pathname and looks for +the installed version of Readline in subdirectories of that directory +(include files in PREFIX/include and the library in +PREFIX/lib). +

+
+
--with-purify
+

Define this to use the Purify memory allocation checker from Rational +Software. +

+
+
--enable-minimal-config
+

This produces a shell with minimal features, close to the historical +Bourne shell. +

+
+ +

There are several --enable- options that alter how Bash is +compiled and linked, rather than changing run-time features. +

+
+
--enable-largefile
+

Enable support for large files if the operating system requires special compiler options +to build programs which can access large files. This is enabled by +default, if the operating system provides large file support. +

+
+
--enable-profiling
+

This builds a Bash binary that produces profiling information to be +processed by gprof each time it is executed. +

+
+
--enable-static-link
+

This causes Bash to be linked statically, if gcc is being used. +This could be used to build a version to use as root’s shell. +

+
+ +

The ‘minimal-config’ option can be used to disable all of +the following options, but it is processed first, so individual +options may be enabled using ‘enable-feature’. +

+

All of the following options except for ‘disabled-builtins’, +‘direxpand-default’, and +‘xpg-echo-default’ are +enabled by default, unless the operating system does not provide the +necessary support. +

+
+
--enable-alias
+

Allow alias expansion and include the alias and unalias +builtins (see Aliases). +

+
+
--enable-arith-for-command
+

Include support for the alternate form of the for command +that behaves like the C language for statement +(see Looping Constructs). +

+
+
--enable-array-variables
+

Include support for one-dimensional array shell variables +(see Arrays). +

+
+
--enable-bang-history
+

Include support for csh-like history substitution +(see History Interaction). +

+
+
--enable-brace-expansion
+

Include csh-like brace expansion +( b{a,b}cbac bbc ). +See Brace Expansion, for a complete description. +

+
+
--enable-casemod-attributes
+

Include support for case-modifying attributes in the declare builtin +and assignment statements. Variables with the uppercase attribute, +for example, will have their values converted to uppercase upon assignment. +

+
+
--enable-casemod-expansion
+

Include support for case-modifying word expansions. +

+
+
--enable-command-timing
+

Include support for recognizing time as a reserved word and for +displaying timing statistics for the pipeline following time +(see Pipelines). +This allows pipelines as well as shell builtins and functions to be timed. +

+
+
--enable-cond-command
+

Include support for the [[ conditional command. +(see Conditional Constructs). +

+
+
--enable-cond-regexp
+

Include support for matching POSIX regular expressions using the +‘=~’ binary operator in the [[ conditional command. +(see Conditional Constructs). +

+
+
--enable-coprocesses
+

Include support for coprocesses and the coproc reserved word +(see Pipelines). +

+
+
--enable-debugger
+

Include support for the bash debugger (distributed separately). +

+
+
--enable-dev-fd-stat-broken
+

If calling stat on /dev/fd/N returns different results than +calling fstat on file descriptor N, supply this option to +enable a workaround. +This has implications for conditional commands that test file attributes. +

+
+
--enable-direxpand-default
+

Cause the direxpand shell option (see The Shopt Builtin) +to be enabled by default when the shell starts. +It is normally disabled by default. +

+
+
--enable-directory-stack
+

Include support for a csh-like directory stack and the +pushd, popd, and dirs builtins +(see The Directory Stack). +

+
+
--enable-disabled-builtins
+

Allow builtin commands to be invoked via ‘builtin xxx’ +even after xxx has been disabled using ‘enable -n xxx’. +See Bash Builtins, for details of the builtin and +enable builtin commands. +

+
+
--enable-dparen-arithmetic
+

Include support for the ((…)) command +(see Conditional Constructs). +

+
+
--enable-extended-glob
+

Include support for the extended pattern matching features described +above under Pattern Matching. +

+
+
--enable-extended-glob-default
+

Set the default value of the extglob shell option described +above under The Shopt Builtin to be enabled. +

+
+
--enable-function-import
+

Include support for importing function definitions exported by another +instance of the shell from the environment. This option is enabled by +default. +

+
+
--enable-glob-asciirange-default
+

Set the default value of the globasciiranges shell option described +above under The Shopt Builtin to be enabled. +This controls the behavior of character ranges when used in pattern matching +bracket expressions. +

+
+
--enable-help-builtin
+

Include the help builtin, which displays help on shell builtins and +variables (see Bash Builtins). +

+
+
--enable-history
+

Include command history and the fc and history +builtin commands (see Bash History Facilities). +

+
+
--enable-job-control
+

This enables the job control features (see Job Control), +if the operating system supports them. +

+
+
--enable-multibyte
+

This enables support for multibyte characters if the operating +system provides the necessary support. +

+
+
--enable-net-redirections
+

This enables the special handling of filenames of the form +/dev/tcp/host/port and +/dev/udp/host/port +when used in redirections (see Redirections). +

+
+
--enable-process-substitution
+

This enables process substitution (see Process Substitution) if +the operating system provides the necessary support. +

+
+
--enable-progcomp
+

Enable the programmable completion facilities +(see Programmable Completion). +If Readline is not enabled, this option has no effect. +

+
+
--enable-prompt-string-decoding
+

Turn on the interpretation of a number of backslash-escaped characters +in the $PS0, $PS1, $PS2, and $PS4 prompt +strings. See Controlling the Prompt, for a complete list of prompt +string escape sequences. +

+
+
--enable-readline
+

Include support for command-line editing and history with the Bash +version of the Readline library (see Command Line Editing). +

+
+
--enable-restricted
+

Include support for a restricted shell. If this is enabled, Bash, +when called as rbash, enters a restricted mode. See +The Restricted Shell, for a description of restricted mode. +

+
+
--enable-select
+

Include the select compound command, which allows the generation of +simple menus (see Conditional Constructs). +

+
+
--enable-separate-helpfiles
+

Use external files for the documentation displayed by the help builtin +instead of storing the text internally. +

+
+
--enable-single-help-strings
+

Store the text displayed by the help builtin as a single string for +each help topic. This aids in translating the text to different languages. +You may need to disable this if your compiler cannot handle very long string +literals. +

+
+
--enable-strict-posix-default
+

Make Bash POSIX-conformant by default (see Bash POSIX Mode). +

+
+
--enable-usg-echo-default
+

A synonym for --enable-xpg-echo-default. +

+
+
--enable-xpg-echo-default
+

Make the echo builtin expand backslash-escaped characters by default, +without requiring the -e option. +This sets the default value of the xpg_echo shell option to on, +which makes the Bash echo behave more like the version specified in +the Single Unix Specification, version 3. +See Bash Builtins, for a description of the escape sequences that +echo recognizes. +

+
+ +

The file config-top.h contains C Preprocessor +‘#define’ statements for options which are not settable from +configure. +Some of these are not meant to be changed; beware of the consequences if +you do. +Read the comments associated with each definition for more +information about its effect. +

+
+ +

Appendix A Reporting Bugs

+ +

Please report all bugs you find in Bash. +But first, you should +make sure that it really is a bug, and that it appears in the latest +version of Bash. +The latest version of Bash is always available for FTP from +ftp://ftp.gnu.org/pub/gnu/bash/. +

+

Once you have determined that a bug actually exists, use the +bashbug command to submit a bug report. +If you have a fix, you are encouraged to mail that as well! +Suggestions and ‘philosophical’ bug reports may be mailed +to bug-bash@gnu.org or posted to the Usenet +newsgroup gnu.bash.bug. +

+

All bug reports should include: +

    +
  • The version number of Bash. +
  • The hardware and operating system. +
  • The compiler used to compile Bash. +
  • A description of the bug behaviour. +
  • A short script or ‘recipe’ which exercises the bug and may be used +to reproduce it. +
+ +

bashbug inserts the first three items automatically into +the template it provides for filing a bug report. +

+

Please send all reports concerning this manual to +bug-bash@gnu.org. +

+
+ +

Appendix B Major Differences From The Bourne Shell

+ +

Bash implements essentially the same grammar, parameter and +variable expansion, redirection, and quoting as the Bourne Shell. +Bash uses the POSIX standard as the specification of +how these features are to be implemented. There are some +differences between the traditional Bourne shell and Bash; this +section quickly details the differences of significance. A +number of these differences are explained in greater depth in +previous sections. +This section uses the version of sh included in SVR4.2 (the +last version of the historical Bourne shell) as the baseline reference. +

+
    +
  • Bash is POSIX-conformant, even where the POSIX specification +differs from traditional sh behavior (see Bash POSIX Mode). + +
  • Bash has multi-character invocation options (see Invoking Bash). + +
  • Bash has command-line editing (see Command Line Editing) and +the bind builtin. + +
  • Bash provides a programmable word completion mechanism +(see Programmable Completion), and builtin commands +complete, compgen, and compopt, to +manipulate it. + +
  • Bash has command history (see Bash History Facilities) and the +history and fc builtins to manipulate it. +The Bash history list maintains timestamp information and uses the +value of the HISTTIMEFORMAT variable to display it. + +
  • Bash implements csh-like history expansion +(see History Interaction). + +
  • Bash has one-dimensional array variables (see Arrays), and the +appropriate variable expansions and assignment syntax to use them. +Several of the Bash builtins take options to act on arrays. +Bash provides a number of built-in array variables. + +
  • The $'…' quoting syntax, which expands ANSI-C +backslash-escaped characters in the text between the single quotes, +is supported (see ANSI-C Quoting). + +
  • Bash supports the $"…" quoting syntax to do +locale-specific translation of the characters between the double +quotes. The -D, --dump-strings, and --dump-po-strings +invocation options list the translatable strings found in a script +(see Locale Translation). + +
  • Bash implements the ! keyword to negate the return value of +a pipeline (see Pipelines). +Very useful when an if statement needs to act only if a test fails. +The Bash ‘-o pipefail’ option to set will cause a pipeline to +return a failure status if any command fails. + +
  • Bash has the time reserved word and command timing (see Pipelines). +The display of the timing statistics may be controlled with the +TIMEFORMAT variable. + +
  • Bash implements the for (( expr1 ; expr2 ; expr3 )) +arithmetic for command, similar to the C language (see Looping Constructs). + +
  • Bash includes the select compound command, which allows the +generation of simple menus (see Conditional Constructs). + +
  • Bash includes the [[ compound command, which makes conditional +testing part of the shell grammar (see Conditional Constructs), including +optional regular expression matching. + +
  • Bash provides optional case-insensitive matching for the case and +[[ constructs. + +
  • Bash includes brace expansion (see Brace Expansion) and tilde +expansion (see Tilde Expansion). + +
  • Bash implements command aliases and the alias and unalias +builtins (see Aliases). + +
  • Bash provides shell arithmetic, the (( compound command +(see Conditional Constructs), +and arithmetic expansion (see Shell Arithmetic). + +
  • Variables present in the shell’s initial environment are automatically +exported to child processes. The Bourne shell does not normally do +this unless the variables are explicitly marked using the export +command. + +
  • Bash supports the ‘+=’ assignment operator, which appends to the value +of the variable named on the left hand side. + +
  • Bash includes the POSIX pattern removal ‘%’, ‘#’, ‘%%’ +and ‘##’ expansions to remove leading or trailing substrings from +variable values (see Shell Parameter Expansion). + +
  • The expansion ${#xx}, which returns the length of ${xx}, +is supported (see Shell Parameter Expansion). + +
  • The expansion ${var:offset[:length]}, +which expands to the substring of var’s value of length +length, beginning at offset, is present +(see Shell Parameter Expansion). + +
  • The expansion +${var/[/]pattern[/replacement]}, +which matches pattern and replaces it with replacement in +the value of var, is available (see Shell Parameter Expansion). + +
  • The expansion ${!prefix*} expansion, which expands to +the names of all shell variables whose names begin with prefix, +is available (see Shell Parameter Expansion). + +
  • Bash has indirect variable expansion using ${!word} +(see Shell Parameter Expansion). + +
  • Bash can expand positional parameters beyond $9 using +${num}. + +
  • The POSIX $() form of command substitution +is implemented (see Command Substitution), +and preferred to the Bourne shell’s `` (which +is also implemented for backwards compatibility). + +
  • Bash has process substitution (see Process Substitution). + +
  • Bash automatically assigns variables that provide information about the +current user (UID, EUID, and GROUPS), the current host +(HOSTTYPE, OSTYPE, MACHTYPE, and HOSTNAME), +and the instance of Bash that is running (BASH, +BASH_VERSION, and BASH_VERSINFO). See Bash Variables, +for details. + +
  • The IFS variable is used to split only the results of expansion, +not all words (see Word Splitting). +This closes a longstanding shell security hole. + +
  • The filename expansion bracket expression code uses ‘!’ and ‘^’ +to negate the set of characters between the brackets. +The Bourne shell uses only ‘!’. + +
  • Bash implements the full set of POSIX filename expansion operators, +including character classes, equivalence classes, and +collating symbols (see Filename Expansion). + +
  • Bash implements extended pattern matching features when the extglob +shell option is enabled (see Pattern Matching). + +
  • It is possible to have a variable and a function with the same name; +sh does not separate the two name spaces. + +
  • Bash functions are permitted to have local variables using the +local builtin, and thus useful recursive functions may be written +(see Bash Builtins). + +
  • Variable assignments preceding commands affect only that command, even +builtins and functions (see Environment). +In sh, all variable assignments +preceding commands are global unless the command is executed from the +file system. + +
  • Bash performs filename expansion on filenames specified as operands +to input and output redirection operators (see Redirections). + +
  • Bash contains the ‘<>’ redirection operator, allowing a file to be +opened for both reading and writing, and the ‘&>’ redirection +operator, for directing standard output and standard error to the same +file (see Redirections). + +
  • Bash includes the ‘<<<’ redirection operator, allowing a string to +be used as the standard input to a command. + +
  • Bash implements the ‘[n]<&word’ and ‘[n]>&word’ +redirection operators, which move one file descriptor to another. + +
  • Bash treats a number of filenames specially when they are +used in redirection operators (see Redirections). + +
  • Bash can open network connections to arbitrary machines and services +with the redirection operators (see Redirections). + +
  • The noclobber option is available to avoid overwriting existing +files with output redirection (see The Set Builtin). +The ‘>|’ redirection operator may be used to override noclobber. + +
  • The Bash cd and pwd builtins (see Bourne Shell Builtins) +each take -L and -P options to switch between logical and +physical modes. + +
  • Bash allows a function to override a builtin with the same name, and provides +access to that builtin’s functionality within the function via the +builtin and command builtins (see Bash Builtins). + +
  • The command builtin allows selective disabling of functions +when command lookup is performed (see Bash Builtins). + +
  • Individual builtins may be enabled or disabled using the enable +builtin (see Bash Builtins). + +
  • The Bash exec builtin takes additional options that allow users +to control the contents of the environment passed to the executed +command, and what the zeroth argument to the command is to be +(see Bourne Shell Builtins). + +
  • Shell functions may be exported to children via the environment +using export -f (see Shell Functions). + +
  • The Bash export, readonly, and declare builtins can +take a -f option to act on shell functions, a -p option to +display variables with various attributes set in a format that can be +used as shell input, a -n option to remove various variable +attributes, and ‘name=value’ arguments to set variable attributes +and values simultaneously. + +
  • The Bash hash builtin allows a name to be associated with +an arbitrary filename, even when that filename cannot be found by +searching the $PATH, using ‘hash -p’ +(see Bourne Shell Builtins). + +
  • Bash includes a help builtin for quick reference to shell +facilities (see Bash Builtins). + +
  • The printf builtin is available to display formatted output +(see Bash Builtins). + +
  • The Bash read builtin (see Bash Builtins) +will read a line ending in ‘\’ with +the -r option, and will use the REPLY variable as a +default if no non-option arguments are supplied. +The Bash read builtin +also accepts a prompt string with the -p option and will use +Readline to obtain the line when given the -e option. +The read builtin also has additional options to control input: +the -s option will turn off echoing of input characters as +they are read, the -t option will allow read to time out +if input does not arrive within a specified number of seconds, the +-n option will allow reading only a specified number of +characters rather than a full line, and the -d option will read +until a particular character rather than newline. + +
  • The return builtin may be used to abort execution of scripts +executed with the . or source builtins +(see Bourne Shell Builtins). + +
  • Bash includes the shopt builtin, for finer control of shell +optional capabilities (see The Shopt Builtin), and allows these options +to be set and unset at shell invocation (see Invoking Bash). + +
  • Bash has much more optional behavior controllable with the set +builtin (see The Set Builtin). + +
  • The ‘-x’ (xtrace) option displays commands other than +simple commands when performing an execution trace +(see The Set Builtin). + +
  • The test builtin (see Bourne Shell Builtins) +is slightly different, as it implements the POSIX algorithm, +which specifies the behavior based on the number of arguments. + +
  • Bash includes the caller builtin, which displays the context of +any active subroutine call (a shell function or a script executed with +the . or source builtins). This supports the bash +debugger. + +
  • The trap builtin (see Bourne Shell Builtins) allows a +DEBUG pseudo-signal specification, similar to EXIT. +Commands specified with a DEBUG trap are executed before every +simple command, for command, case command, +select command, every arithmetic for command, and before +the first command executes in a shell function. +The DEBUG trap is not inherited by shell functions unless the +function has been given the trace attribute or the +functrace option has been enabled using the shopt builtin. +The extdebug shell option has additional effects on the +DEBUG trap. + +

    The trap builtin (see Bourne Shell Builtins) allows an +ERR pseudo-signal specification, similar to EXIT and DEBUG. +Commands specified with an ERR trap are executed after a simple +command fails, with a few exceptions. +The ERR trap is not inherited by shell functions unless the +-o errtrace option to the set builtin is enabled. +

    +

    The trap builtin (see Bourne Shell Builtins) allows a +RETURN pseudo-signal specification, similar to +EXIT and DEBUG. +Commands specified with an RETURN trap are executed before +execution resumes after a shell function or a shell script executed with +. or source returns. +The RETURN trap is not inherited by shell functions unless the +function has been given the trace attribute or the +functrace option has been enabled using the shopt builtin. +

    +
  • The Bash type builtin is more extensive and gives more information +about the names it finds (see Bash Builtins). + +
  • The Bash umask builtin permits a -p option to cause +the output to be displayed in the form of a umask command +that may be reused as input (see Bourne Shell Builtins). + +
  • Bash implements a csh-like directory stack, and provides the +pushd, popd, and dirs builtins to manipulate it +(see The Directory Stack). +Bash also makes the directory stack visible as the value of the +DIRSTACK shell variable. + +
  • Bash interprets special backslash-escaped characters in the prompt +strings when interactive (see Controlling the Prompt). + +
  • The Bash restricted mode is more useful (see The Restricted Shell); +the SVR4.2 shell restricted mode is too limited. + +
  • The disown builtin can remove a job from the internal shell +job table (see Job Control Builtins) or suppress the sending +of SIGHUP to a job when the shell exits as the result of a +SIGHUP. + +
  • Bash includes a number of features to support a separate debugger for +shell scripts. + +
  • The SVR4.2 shell has two privilege-related builtins +(mldmode and priv) not present in Bash. + +
  • Bash does not have the stop or newgrp builtins. + +
  • Bash does not use the SHACCT variable or perform shell accounting. + +
  • The SVR4.2 sh uses a TIMEOUT variable like Bash uses +TMOUT. + +
+ +

More features unique to Bash may be found in Bash Features. +

+ +

B.1 Implementation Differences From The SVR4.2 Shell

+ +

Since Bash is a completely new implementation, it does not suffer from +many of the limitations of the SVR4.2 shell. For instance: +

+
    +
  • Bash does not fork a subshell when redirecting into or out of +a shell control structure such as an if or while +statement. + +
  • Bash does not allow unbalanced quotes. The SVR4.2 shell will silently +insert a needed closing quote at EOF under certain circumstances. +This can be the cause of some hard-to-find errors. + +
  • The SVR4.2 shell uses a baroque memory management scheme based on +trapping SIGSEGV. If the shell is started from a process with +SIGSEGV blocked (e.g., by using the system() C library +function call), it misbehaves badly. + +
  • In a questionable attempt at security, the SVR4.2 shell, +when invoked without the -p option, will alter its real +and effective UID and GID if they are less than some +magic threshold value, commonly 100. +This can lead to unexpected results. + +
  • The SVR4.2 shell does not allow users to trap SIGSEGV, +SIGALRM, or SIGCHLD. + +
  • The SVR4.2 shell does not allow the IFS, MAILCHECK, +PATH, PS1, or PS2 variables to be unset. + +
  • The SVR4.2 shell treats ‘^’ as the undocumented equivalent of +‘|’. + +
  • Bash allows multiple option arguments when it is invoked (-x -v); +the SVR4.2 shell allows only one option argument (-xv). In +fact, some versions of the shell dump core if the second argument begins +with a ‘-’. + +
  • The SVR4.2 shell exits a script if any builtin fails; Bash exits +a script only if one of the POSIX special builtins fails, and +only for certain failures, as enumerated in the POSIX standard. + +
  • The SVR4.2 shell behaves differently when invoked as jsh +(it turns on job control). +
+ +
+ +

Appendix C GNU Free Documentation License

+ +
Version 1.3, 3 November 2008 +
+ +
+
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+http://fsf.org/
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+ +
    +
  1. PREAMBLE + +

    The purpose of this License is to make a manual, textbook, or other +functional and useful document free in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. +

    +

    This License is a kind of “copyleft”, which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. +

    +

    We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. +

    +
  2. APPLICABILITY AND DEFINITIONS + +

    This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The “Document”, below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as “you”. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. +

    +

    A “Modified Version” of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. +

    +

    A “Secondary Section” is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document’s overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. +

    +

    The “Invariant Sections” are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. +

    +

    The “Cover Texts” are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. +

    +

    A “Transparent” copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not “Transparent” is called “Opaque”. +

    +

    Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input +format, SGML or XML using a publicly available +DTD, and standard-conforming simple HTML, +PostScript or PDF designed for human modification. Examples +of transparent image formats include PNG, XCF and +JPG. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, SGML or +XML for which the DTD and/or processing tools are +not generally available, and the machine-generated HTML, +PostScript or PDF produced by some word processors for +output purposes only. +

    +

    The “Title Page” means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, “Title Page” means +the text near the most prominent appearance of the work’s title, +preceding the beginning of the body of the text. +

    +

    The “publisher” means any person or entity that distributes copies +of the Document to the public. +

    +

    A section “Entitled XYZ” means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as “Acknowledgements”, +“Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” +of such a section when you modify the Document means that it remains a +section “Entitled XYZ” according to this definition. +

    +

    The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. +

    +
  3. VERBATIM COPYING + +

    You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. +

    +

    You may also lend copies, under the same conditions stated above, and +you may publicly display copies. +

    +
  4. COPYING IN QUANTITY + +

    If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document’s license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. +

    +

    If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. +

    +

    If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. +

    +

    It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. +

    +
  5. MODIFICATIONS + +

    You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: +

    +
      +
    1. Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +
    2. List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. + +
    3. State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +
    4. Preserve all the copyright notices of the Document. + +
    5. Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +
    6. Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +
    7. Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document’s license notice. + +
    8. Include an unaltered copy of this License. + +
    9. Preserve the section Entitled “History”, Preserve its Title, and add +to it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section Entitled “History” in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +
    10. Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the “History” section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +
    11. For any section Entitled “Acknowledgements” or “Dedications”, Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. + +
    12. Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +
    13. Delete any section Entitled “Endorsements”. Such a section +may not be included in the Modified Version. + +
    14. Do not retitle any existing section to be Entitled “Endorsements” or +to conflict in title with any Invariant Section. + +
    15. Preserve any Warranty Disclaimers. +
    + +

    If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version’s license notice. +These titles must be distinct from any other section titles. +

    +

    You may add a section Entitled “Endorsements”, provided it contains +nothing but endorsements of your Modified Version by various +parties—for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. +

    +

    You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. +

    +

    The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. +

    +
  6. COMBINING DOCUMENTS + +

    You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. +

    +

    The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. +

    +

    In the combination, you must combine any sections Entitled “History” +in the various original documents, forming one section Entitled +“History”; likewise combine any sections Entitled “Acknowledgements”, +and any sections Entitled “Dedications”. You must delete all +sections Entitled “Endorsements.” +

    +
  7. COLLECTIONS OF DOCUMENTS + +

    You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. +

    +

    You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. +

    +
  8. AGGREGATION WITH INDEPENDENT WORKS + +

    A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an “aggregate” if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation’s users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. +

    +

    If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document’s Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. +

    +
  9. TRANSLATION + +

    Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. +

    +

    If a section in the Document is Entitled “Acknowledgements”, +“Dedications”, or “History”, the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. +

    +
  10. TERMINATION + +

    You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. +

    +

    However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. +

    +

    Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. +

    +

    Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. +

    +
  11. FUTURE REVISIONS OF THIS LICENSE + +

    The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. +

    +

    Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License “or any later version” applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy’s public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. +

    +
  12. RELICENSING + +

    “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +“Massive Multiauthor Collaboration” (or “MMC”) contained in the +site means any set of copyrightable works thus published on the MMC +site. +

    +

    “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. +

    +

    “Incorporate” means to publish or republish a Document, in whole or +in part, as part of another Document. +

    +

    An MMC is “eligible for relicensing” if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. +

    +

    The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. +

    +
+ +

ADDENDUM: How to use this License for your documents

+ +

To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: +

+
+
  Copyright (C)  year  your name.
+  Permission is granted to copy, distribute and/or modify this document
+  under the terms of the GNU Free Documentation License, Version 1.3
+  or any later version published by the Free Software Foundation;
+  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+  Texts.  A copy of the license is included in the section entitled ``GNU
+  Free Documentation License''.
+
+ +

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the “with…Texts.” line with this: +

+
+
    with the Invariant Sections being list their titles, with
+    the Front-Cover Texts being list, and with the Back-Cover Texts
+    being list.
+
+ +

If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. +

+

If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. +

+ + +
+ +

Appendix D Indexes

+ + + + + + + + + +
+
+

+Next: , Up: Indexes   [Contents][Index]

+
+

D.1 Index of Shell Builtin Commands

+
Jump to:   . +   +: +   +[ +   +
+A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +J +   +K +   +L +   +M +   +P +   +R +   +S +   +T +   +U +   +W +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

.
.: Bourne Shell Builtins

:
:: Bourne Shell Builtins

[
[: Bourne Shell Builtins

A
alias: Bash Builtins

B
bg: Job Control Builtins
bind: Bash Builtins
break: Bourne Shell Builtins
builtin: Bash Builtins

C
caller: Bash Builtins
cd: Bourne Shell Builtins
command: Bash Builtins
compgen: Programmable Completion Builtins
complete: Programmable Completion Builtins
compopt: Programmable Completion Builtins
continue: Bourne Shell Builtins

D
declare: Bash Builtins
dirs: Directory Stack Builtins
disown: Job Control Builtins

E
echo: Bash Builtins
enable: Bash Builtins
eval: Bourne Shell Builtins
exec: Bourne Shell Builtins
exit: Bourne Shell Builtins
export: Bourne Shell Builtins

F
fc: Bash History Builtins
fg: Job Control Builtins

G
getopts: Bourne Shell Builtins

H
hash: Bourne Shell Builtins
help: Bash Builtins
history: Bash History Builtins

J
jobs: Job Control Builtins

K
kill: Job Control Builtins

L
let: Bash Builtins
local: Bash Builtins
logout: Bash Builtins

M
mapfile: Bash Builtins

P
popd: Directory Stack Builtins
printf: Bash Builtins
pushd: Directory Stack Builtins
pwd: Bourne Shell Builtins

R
read: Bash Builtins
readarray: Bash Builtins
readonly: Bourne Shell Builtins
return: Bourne Shell Builtins

S
set: The Set Builtin
shift: Bourne Shell Builtins
shopt: The Shopt Builtin
source: Bash Builtins
suspend: Job Control Builtins

T
test: Bourne Shell Builtins
times: Bourne Shell Builtins
trap: Bourne Shell Builtins
type: Bash Builtins
typeset: Bash Builtins

U
ulimit: Bash Builtins
umask: Bourne Shell Builtins
unalias: Bash Builtins
unset: Bourne Shell Builtins

W
wait: Job Control Builtins

+
Jump to:   . +   +: +   +[ +   +
+A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +J +   +K +   +L +   +M +   +P +   +R +   +S +   +T +   +U +   +W +   +
+ +
+
+

+Next: , Previous: , Up: Indexes   [Contents][Index]

+
+

D.2 Index of Shell Reserved Words

+
Jump to:   ! +   +[ +   +] +   +{ +   +} +   +
+C +   +D +   +E +   +F +   +I +   +S +   +T +   +U +   +W +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

!
!: Pipelines

[
[[: Conditional Constructs

]
]]: Conditional Constructs

{
{: Command Grouping

}
}: Command Grouping

C
case: Conditional Constructs

D
do: Looping Constructs
done: Looping Constructs

E
elif: Conditional Constructs
else: Conditional Constructs
esac: Conditional Constructs

F
fi: Conditional Constructs
for: Looping Constructs
function: Shell Functions

I
if: Conditional Constructs
in: Conditional Constructs

S
select: Conditional Constructs

T
then: Conditional Constructs
time: Pipelines

U
until: Looping Constructs

W
while: Looping Constructs

+
Jump to:   ! +   +[ +   +] +   +{ +   +} +   +
+C +   +D +   +E +   +F +   +I +   +S +   +T +   +U +   +W +   +
+ +
+
+

+Next: , Previous: , Up: Indexes   [Contents][Index]

+
+

D.3 Parameter and Variable Index

+
Jump to:   ! +   +# +   +$ +   +* +   +- +   +0 +   +? +   +@ +   +_ +   +
+A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +I +   +K +   +L +   +M +   +O +   +P +   +R +   +S +   +T +   +U +   +V +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

!
!: Special Parameters

#
#: Special Parameters

$
$: Special Parameters
$!: Special Parameters
$#: Special Parameters
$$: Special Parameters
$*: Special Parameters
$-: Special Parameters
$0: Special Parameters
$?: Special Parameters
$@: Special Parameters
$_: Bash Variables

*
*: Special Parameters

-
-: Special Parameters

0
0: Special Parameters

?
?: Special Parameters

@
@: Special Parameters

_
_: Bash Variables

A
auto_resume: Job Control Variables

B
BASH: Bash Variables
BASHOPTS: Bash Variables
BASHPID: Bash Variables
BASH_ALIASES: Bash Variables
BASH_ARGC: Bash Variables
BASH_ARGV: Bash Variables
BASH_ARGV0: Bash Variables
BASH_CMDS: Bash Variables
BASH_COMMAND: Bash Variables
BASH_COMPAT: Bash Variables
BASH_ENV: Bash Variables
BASH_EXECUTION_STRING: Bash Variables
BASH_LINENO: Bash Variables
BASH_LOADABLES_PATH: Bash Variables
BASH_REMATCH: Bash Variables
BASH_SOURCE: Bash Variables
BASH_SUBSHELL: Bash Variables
BASH_VERSINFO: Bash Variables
BASH_VERSION: Bash Variables
BASH_XTRACEFD: Bash Variables
bell-style: Readline Init File Syntax
bind-tty-special-chars: Readline Init File Syntax
blink-matching-paren: Readline Init File Syntax

C
CDPATH: Bourne Shell Variables
CHILD_MAX: Bash Variables
colored-completion-prefix: Readline Init File Syntax
colored-stats: Readline Init File Syntax
COLUMNS: Bash Variables
comment-begin: Readline Init File Syntax
completion-display-width: Readline Init File Syntax
completion-ignore-case: Readline Init File Syntax
completion-map-case: Readline Init File Syntax
completion-prefix-display-length: Readline Init File Syntax
completion-query-items: Readline Init File Syntax
COMPREPLY: Bash Variables
COMP_CWORD: Bash Variables
COMP_KEY: Bash Variables
COMP_LINE: Bash Variables
COMP_POINT: Bash Variables
COMP_TYPE: Bash Variables
COMP_WORDBREAKS: Bash Variables
COMP_WORDS: Bash Variables
convert-meta: Readline Init File Syntax
COPROC: Bash Variables

D
DIRSTACK: Bash Variables
disable-completion: Readline Init File Syntax

E
echo-control-characters: Readline Init File Syntax
editing-mode: Readline Init File Syntax
EMACS: Bash Variables
emacs-mode-string: Readline Init File Syntax
enable-bracketed-paste: Readline Init File Syntax
enable-keypad: Readline Init File Syntax
ENV: Bash Variables
EPOCHREALTIME: Bash Variables
EPOCHSECONDS: Bash Variables
EUID: Bash Variables
EXECIGNORE: Bash Variables
expand-tilde: Readline Init File Syntax

F
FCEDIT: Bash Variables
FIGNORE: Bash Variables
FUNCNAME: Bash Variables
FUNCNEST: Bash Variables

G
GLOBIGNORE: Bash Variables
GROUPS: Bash Variables

H
histchars: Bash Variables
HISTCMD: Bash Variables
HISTCONTROL: Bash Variables
HISTFILE: Bash Variables
HISTFILESIZE: Bash Variables
HISTIGNORE: Bash Variables
history-preserve-point: Readline Init File Syntax
history-size: Readline Init File Syntax
HISTSIZE: Bash Variables
HISTTIMEFORMAT: Bash Variables
HOME: Bourne Shell Variables
horizontal-scroll-mode: Readline Init File Syntax
HOSTFILE: Bash Variables
HOSTNAME: Bash Variables
HOSTTYPE: Bash Variables

I
IFS: Bourne Shell Variables
IGNOREEOF: Bash Variables
input-meta: Readline Init File Syntax
INPUTRC: Bash Variables
INSIDE_EMACS: Bash Variables
isearch-terminators: Readline Init File Syntax

K
keymap: Readline Init File Syntax

L
LANG: Bash Variables
LC_ALL: Bash Variables
LC_COLLATE: Bash Variables
LC_CTYPE: Bash Variables
LC_MESSAGES: Locale Translation
LC_MESSAGES: Bash Variables
LC_NUMERIC: Bash Variables
LC_TIME: Bash Variables
LINENO: Bash Variables
LINES: Bash Variables

M
MACHTYPE: Bash Variables
MAIL: Bourne Shell Variables
MAILCHECK: Bash Variables
MAILPATH: Bourne Shell Variables
MAPFILE: Bash Variables
mark-modified-lines: Readline Init File Syntax
mark-symlinked-directories: Readline Init File Syntax
match-hidden-files: Readline Init File Syntax
menu-complete-display-prefix: Readline Init File Syntax
meta-flag: Readline Init File Syntax

O
OLDPWD: Bash Variables
OPTARG: Bourne Shell Variables
OPTERR: Bash Variables
OPTIND: Bourne Shell Variables
OSTYPE: Bash Variables
output-meta: Readline Init File Syntax

P
page-completions: Readline Init File Syntax
PATH: Bourne Shell Variables
PIPESTATUS: Bash Variables
POSIXLY_CORRECT: Bash Variables
PPID: Bash Variables
PROMPT_COMMAND: Bash Variables
PROMPT_DIRTRIM: Bash Variables
PS0: Bash Variables
PS1: Bourne Shell Variables
PS2: Bourne Shell Variables
PS3: Bash Variables
PS4: Bash Variables
PWD: Bash Variables

R
RANDOM: Bash Variables
READLINE_LINE: Bash Variables
READLINE_MARK: Bash Variables
READLINE_POINT: Bash Variables
REPLY: Bash Variables
revert-all-at-newline: Readline Init File Syntax

S
SECONDS: Bash Variables
SHELL: Bash Variables
SHELLOPTS: Bash Variables
SHLVL: Bash Variables
show-all-if-ambiguous: Readline Init File Syntax
show-all-if-unmodified: Readline Init File Syntax
show-mode-in-prompt: Readline Init File Syntax
skip-completed-text: Readline Init File Syntax
SRANDOM: Bash Variables

T
TEXTDOMAIN: Locale Translation
TEXTDOMAINDIR: Locale Translation
TIMEFORMAT: Bash Variables
TMOUT: Bash Variables
TMPDIR: Bash Variables

U
UID: Bash Variables

V
vi-cmd-mode-string: Readline Init File Syntax
vi-ins-mode-string: Readline Init File Syntax
visible-stats: Readline Init File Syntax

+
Jump to:   ! +   +# +   +$ +   +* +   +- +   +0 +   +? +   +@ +   +_ +   +
+A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +I +   +K +   +L +   +M +   +O +   +P +   +R +   +S +   +T +   +U +   +V +   +
+ +
+
+

+Next: , Previous: , Up: Indexes   [Contents][Index]

+
+

D.4 Function Index

+
Jump to:   A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +I +   +K +   +M +   +N +   +O +   +P +   +Q +   +R +   +S +   +T +   +U +   +Y +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

A
abort (C-g): Miscellaneous Commands
accept-line (Newline or Return): Commands For History
alias-expand-line (): Miscellaneous Commands

B
backward-char (C-b): Commands For Moving
backward-delete-char (Rubout): Commands For Text
backward-kill-line (C-x Rubout): Commands For Killing
backward-kill-word (M-DEL): Commands For Killing
backward-word (M-b): Commands For Moving
beginning-of-history (M-<): Commands For History
beginning-of-line (C-a): Commands For Moving
bracketed-paste-begin (): Commands For Text

C
call-last-kbd-macro (C-x e): Keyboard Macros
capitalize-word (M-c): Commands For Text
character-search (C-]): Miscellaneous Commands
character-search-backward (M-C-]): Miscellaneous Commands
clear-display (M-C-l): Commands For Moving
clear-screen (C-l): Commands For Moving
complete (TAB): Commands For Completion
complete-command (M-!): Commands For Completion
complete-filename (M-/): Commands For Completion
complete-hostname (M-@): Commands For Completion
complete-into-braces (M-{): Commands For Completion
complete-username (M-~): Commands For Completion
complete-variable (M-$): Commands For Completion
copy-backward-word (): Commands For Killing
copy-forward-word (): Commands For Killing
copy-region-as-kill (): Commands For Killing

D
dabbrev-expand (): Commands For Completion
delete-char (C-d): Commands For Text
delete-char-or-list (): Commands For Completion
delete-horizontal-space (): Commands For Killing
digit-argument (M-0, M-1, … M--): Numeric Arguments
display-shell-version (C-x C-v): Miscellaneous Commands
do-lowercase-version (M-A, M-B, M-x, …): Miscellaneous Commands
downcase-word (M-l): Commands For Text
dump-functions (): Miscellaneous Commands
dump-macros (): Miscellaneous Commands
dump-variables (): Miscellaneous Commands
dynamic-complete-history (M-TAB): Commands For Completion

E
edit-and-execute-command (C-x C-e): Miscellaneous Commands
end-kbd-macro (C-x )): Keyboard Macros
end-of-file (usually C-d): Commands For Text
end-of-history (M->): Commands For History
end-of-line (C-e): Commands For Moving
exchange-point-and-mark (C-x C-x): Miscellaneous Commands

F
forward-backward-delete-char (): Commands For Text
forward-char (C-f): Commands For Moving
forward-search-history (C-s): Commands For History
forward-word (M-f): Commands For Moving

G
glob-complete-word (M-g): Miscellaneous Commands
glob-expand-word (C-x *): Miscellaneous Commands
glob-list-expansions (C-x g): Miscellaneous Commands

H
history-and-alias-expand-line (): Miscellaneous Commands
history-expand-line (M-^): Miscellaneous Commands
history-search-backward (): Commands For History
history-search-forward (): Commands For History
history-substring-search-backward (): Commands For History
history-substring-search-forward (): Commands For History

I
insert-comment (M-#): Miscellaneous Commands
insert-completions (M-*): Commands For Completion
insert-last-argument (M-. or M-_): Miscellaneous Commands

K
kill-line (C-k): Commands For Killing
kill-region (): Commands For Killing
kill-whole-line (): Commands For Killing
kill-word (M-d): Commands For Killing

M
magic-space (): Miscellaneous Commands
menu-complete (): Commands For Completion
menu-complete-backward (): Commands For Completion

N
next-history (C-n): Commands For History
next-screen-line (): Commands For Moving
non-incremental-forward-search-history (M-n): Commands For History
non-incremental-reverse-search-history (M-p): Commands For History

O
operate-and-get-next (C-o): Commands For History
overwrite-mode (): Commands For Text

P
possible-command-completions (C-x !): Commands For Completion
possible-completions (M-?): Commands For Completion
possible-filename-completions (C-x /): Commands For Completion
possible-hostname-completions (C-x @): Commands For Completion
possible-username-completions (C-x ~): Commands For Completion
possible-variable-completions (C-x $): Commands For Completion
prefix-meta (ESC): Miscellaneous Commands
previous-history (C-p): Commands For History
previous-screen-line (): Commands For Moving
print-last-kbd-macro (): Keyboard Macros

Q
quoted-insert (C-q or C-v): Commands For Text

R
re-read-init-file (C-x C-r): Miscellaneous Commands
redraw-current-line (): Commands For Moving
reverse-search-history (C-r): Commands For History
revert-line (M-r): Miscellaneous Commands

S
self-insert (a, b, A, 1, !, …): Commands For Text
set-mark (C-@): Miscellaneous Commands
shell-backward-kill-word (): Commands For Killing
shell-backward-word (M-C-b): Commands For Moving
shell-expand-line (M-C-e): Miscellaneous Commands
shell-forward-word (M-C-f): Commands For Moving
shell-kill-word (M-C-d): Commands For Killing
shell-transpose-words (M-C-t): Commands For Killing
skip-csi-sequence (): Miscellaneous Commands
start-kbd-macro (C-x (): Keyboard Macros

T
tilde-expand (M-&): Miscellaneous Commands
transpose-chars (C-t): Commands For Text
transpose-words (M-t): Commands For Text

U
undo (C-_ or C-x C-u): Miscellaneous Commands
universal-argument (): Numeric Arguments
unix-filename-rubout (): Commands For Killing
unix-line-discard (C-u): Commands For Killing
unix-word-rubout (C-w): Commands For Killing
upcase-word (M-u): Commands For Text

Y
yank (C-y): Commands For Killing
yank-last-arg (M-. or M-_): Commands For History
yank-nth-arg (M-C-y): Commands For History
yank-pop (M-y): Commands For Killing

+
Jump to:   A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +I +   +K +   +M +   +N +   +O +   +P +   +Q +   +R +   +S +   +T +   +U +   +Y +   +
+ +
+
+

+Previous: , Up: Indexes   [Contents][Index]

+
+

D.5 Concept Index

+
Jump to:   A +   +B +   +C +   +D +   +E +   +F +   +H +   +I +   +J +   +K +   +L +   +M +   +N +   +O +   +P +   +Q +   +R +   +S +   +T +   +V +   +W +   +Y +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

A
alias expansion: Aliases
arithmetic evaluation: Shell Arithmetic
arithmetic expansion: Arithmetic Expansion
arithmetic, shell: Shell Arithmetic
arrays: Arrays

B
background: Job Control Basics
Bash configuration: Basic Installation
Bash installation: Basic Installation
Bourne shell: Basic Shell Features
brace expansion: Brace Expansion
builtin: Definitions

C
command editing: Readline Bare Essentials
command execution: Command Search and Execution
command expansion: Simple Command Expansion
command history: Bash History Facilities
command search: Command Search and Execution
command substitution: Command Substitution
command timing: Pipelines
commands, compound: Compound Commands
commands, conditional: Conditional Constructs
commands, grouping: Command Grouping
commands, lists: Lists
commands, looping: Looping Constructs
commands, pipelines: Pipelines
commands, shell: Shell Commands
commands, simple: Simple Commands
comments, shell: Comments
Compatibility Level: Shell Compatibility Mode
Compatibility Mode: Shell Compatibility Mode
completion builtins: Programmable Completion Builtins
configuration: Basic Installation
control operator: Definitions
coprocess: Coprocesses

D
directory stack: The Directory Stack

E
editing command lines: Readline Bare Essentials
environment: Environment
evaluation, arithmetic: Shell Arithmetic
event designators: Event Designators
execution environment: Command Execution Environment
exit status: Definitions
exit status: Exit Status
expansion: Shell Expansions
expansion, arithmetic: Arithmetic Expansion
expansion, brace: Brace Expansion
expansion, filename: Filename Expansion
expansion, parameter: Shell Parameter Expansion
expansion, pathname: Filename Expansion
expansion, tilde: Tilde Expansion
expressions, arithmetic: Shell Arithmetic
expressions, conditional: Bash Conditional Expressions

F
field: Definitions
filename: Definitions
filename expansion: Filename Expansion
foreground: Job Control Basics
functions, shell: Shell Functions

H
history builtins: Bash History Builtins
history events: Event Designators
history expansion: History Interaction
history list: Bash History Facilities
History, how to use: A Programmable Completion Example

I
identifier: Definitions
initialization file, readline: Readline Init File
installation: Basic Installation
interaction, readline: Readline Interaction
interactive shell: Invoking Bash
interactive shell: Interactive Shells
internationalization: Locale Translation

J
job: Definitions
job control: Definitions
job control: Job Control Basics

K
kill ring: Readline Killing Commands
killing text: Readline Killing Commands

L
localization: Locale Translation
login shell: Invoking Bash

M
matching, pattern: Pattern Matching
metacharacter: Definitions

N
name: Definitions
native languages: Locale Translation
notation, readline: Readline Bare Essentials

O
operator, shell: Definitions

P
parameter expansion: Shell Parameter Expansion
parameters: Shell Parameters
parameters, positional: Positional Parameters
parameters, special: Special Parameters
pathname expansion: Filename Expansion
pattern matching: Pattern Matching
pipeline: Pipelines
POSIX: Definitions
POSIX Mode: Bash POSIX Mode
process group: Definitions
process group ID: Definitions
process substitution: Process Substitution
programmable completion: Programmable Completion
prompting: Controlling the Prompt

Q
quoting: Quoting
quoting, ANSI: ANSI-C Quoting

R
Readline, how to use: Job Control Variables
redirection: Redirections
reserved word: Definitions
reserved words: Reserved Words
restricted shell: The Restricted Shell
return status: Definitions

S
shell arithmetic: Shell Arithmetic
shell function: Shell Functions
shell script: Shell Scripts
shell variable: Shell Parameters
shell, interactive: Interactive Shells
signal: Definitions
signal handling: Signals
special builtin: Definitions
special builtin: Special Builtins
startup files: Bash Startup Files
suspending jobs: Job Control Basics

T
tilde expansion: Tilde Expansion
token: Definitions
translation, native languages: Locale Translation

V
variable, shell: Shell Parameters
variables, readline: Readline Init File Syntax

W
word: Definitions
word splitting: Word Splitting

Y
yanking text: Readline Killing Commands

+
Jump to:   A +   +B +   +C +   +D +   +E +   +F +   +H +   +I +   +J +   +K +   +L +   +M +   +N +   +O +   +P +   +Q +   +R +   +S +   +T +   +V +   +W +   +Y +   +
+ +
+ + + + + diff --git a/bash-5.1/doc/bashref.info b/bash-5.1/doc/bashref.info new file mode 100644 index 0000000000000000000000000000000000000000..20ebf243c689025c02659cfa36dd8f29171ed0e2 --- /dev/null +++ b/bash-5.1/doc/bashref.info @@ -0,0 +1,12123 @@ +This is bashref.info, produced by makeinfo version 6.7 from +bashref.texi. + +This text is a brief description of the features that are present in the +Bash shell (version 5.1, 29 October 2020). + + This is Edition 5.1, last updated 29 October 2020, of 'The GNU Bash +Reference Manual', for 'Bash', Version 5.1. + + Copyright (C) 1988-2020 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts, and + no Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". +INFO-DIR-SECTION Basics +START-INFO-DIR-ENTRY +* Bash: (bash). The GNU Bourne-Again SHell. +END-INFO-DIR-ENTRY + + +File: bashref.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) + +Bash Features +************* + +This text is a brief description of the features that are present in the +Bash shell (version 5.1, 29 October 2020). The Bash home page is +. + + This is Edition 5.1, last updated 29 October 2020, of 'The GNU Bash +Reference Manual', for 'Bash', Version 5.1. + + Bash contains features that appear in other popular shells, and some +features that only appear in Bash. Some of the shells that Bash has +borrowed concepts from are the Bourne Shell ('sh'), the Korn Shell +('ksh'), and the C-shell ('csh' and its successor, 'tcsh'). The +following menu breaks the features up into categories, noting which +features were inspired by other shells and which are specific to Bash. + + This manual is meant as a brief introduction to features found in +Bash. The Bash manual page should be used as the definitive reference +on shell behavior. + +* Menu: + +* Introduction:: An introduction to the shell. +* Definitions:: Some definitions used in the rest of this + manual. +* Basic Shell Features:: The shell "building blocks". +* Shell Builtin Commands:: Commands that are a part of the shell. +* Shell Variables:: Variables used or set by Bash. +* Bash Features:: Features found only in Bash. +* Job Control:: What job control is and how Bash allows you + to use it. +* Command Line Editing:: Chapter describing the command line + editing features. +* Using History Interactively:: Command History Expansion +* Installing Bash:: How to build and install Bash on your system. +* Reporting Bugs:: How to report bugs in Bash. +* Major Differences From The Bourne Shell:: A terse list of the differences + between Bash and historical + versions of /bin/sh. +* GNU Free Documentation License:: Copying and sharing this documentation. +* Indexes:: Various indexes for this manual. + + +File: bashref.info, Node: Introduction, Next: Definitions, Up: Top + +1 Introduction +************** + +* Menu: + +* What is Bash?:: A short description of Bash. +* What is a shell?:: A brief introduction to shells. + + +File: bashref.info, Node: What is Bash?, Next: What is a shell?, Up: Introduction + +1.1 What is Bash? +================= + +Bash is the shell, or command language interpreter, for the GNU +operating system. The name is an acronym for the 'Bourne-Again SHell', +a pun on Stephen Bourne, the author of the direct ancestor of the +current Unix shell 'sh', which appeared in the Seventh Edition Bell Labs +Research version of Unix. + + Bash is largely compatible with 'sh' and incorporates useful features +from the Korn shell 'ksh' and the C shell 'csh'. It is intended to be a +conformant implementation of the IEEE POSIX Shell and Tools portion of +the IEEE POSIX specification (IEEE Standard 1003.1). It offers +functional improvements over 'sh' for both interactive and programming +use. + + While the GNU operating system provides other shells, including a +version of 'csh', Bash is the default shell. Like other GNU software, +Bash is quite portable. It currently runs on nearly every version of +Unix and a few other operating systems - independently-supported ports +exist for MS-DOS, OS/2, and Windows platforms. + + +File: bashref.info, Node: What is a shell?, Prev: What is Bash?, Up: Introduction + +1.2 What is a shell? +==================== + +At its base, a shell is simply a macro processor that executes commands. +The term macro processor means functionality where text and symbols are +expanded to create larger expressions. + + A Unix shell is both a command interpreter and a programming +language. As a command interpreter, the shell provides the user +interface to the rich set of GNU utilities. The programming language +features allow these utilities to be combined. Files containing +commands can be created, and become commands themselves. These new +commands have the same status as system commands in directories such as +'/bin', allowing users or groups to establish custom environments to +automate their common tasks. + + Shells may be used interactively or non-interactively. In +interactive mode, they accept input typed from the keyboard. When +executing non-interactively, shells execute commands read from a file. + + A shell allows execution of GNU commands, both synchronously and +asynchronously. The shell waits for synchronous commands to complete +before accepting more input; asynchronous commands continue to execute +in parallel with the shell while it reads and executes additional +commands. The "redirection" constructs permit fine-grained control of +the input and output of those commands. Moreover, the shell allows +control over the contents of commands' environments. + + Shells also provide a small set of built-in commands ("builtins") +implementing functionality impossible or inconvenient to obtain via +separate utilities. For example, 'cd', 'break', 'continue', and 'exec' +cannot be implemented outside of the shell because they directly +manipulate the shell itself. The 'history', 'getopts', 'kill', or 'pwd' +builtins, among others, could be implemented in separate utilities, but +they are more convenient to use as builtin commands. All of the shell +builtins are described in subsequent sections. + + While executing commands is essential, most of the power (and +complexity) of shells is due to their embedded programming languages. +Like any high-level language, the shell provides variables, flow control +constructs, quoting, and functions. + + Shells offer features geared specifically for interactive use rather +than to augment the programming language. These interactive features +include job control, command line editing, command history and aliases. +Each of these features is described in this manual. + + +File: bashref.info, Node: Definitions, Next: Basic Shell Features, Prev: Introduction, Up: Top + +2 Definitions +************* + +These definitions are used throughout the remainder of this manual. + +'POSIX' + A family of open system standards based on Unix. Bash is primarily + concerned with the Shell and Utilities portion of the POSIX 1003.1 + standard. + +'blank' + A space or tab character. + +'builtin' + A command that is implemented internally by the shell itself, + rather than by an executable program somewhere in the file system. + +'control operator' + A 'token' that performs a control function. It is a 'newline' or + one of the following: '||', '&&', '&', ';', ';;', ';&', ';;&', '|', + '|&', '(', or ')'. + +'exit status' + The value returned by a command to its caller. The value is + restricted to eight bits, so the maximum value is 255. + +'field' + A unit of text that is the result of one of the shell expansions. + After expansion, when executing a command, the resulting fields are + used as the command name and arguments. + +'filename' + A string of characters used to identify a file. + +'job' + A set of processes comprising a pipeline, and any processes + descended from it, that are all in the same process group. + +'job control' + A mechanism by which users can selectively stop (suspend) and + restart (resume) execution of processes. + +'metacharacter' + A character that, when unquoted, separates words. A metacharacter + is a 'space', 'tab', 'newline', or one of the following characters: + '|', '&', ';', '(', ')', '<', or '>'. + +'name' + A 'word' consisting solely of letters, numbers, and underscores, + and beginning with a letter or underscore. 'Name's are used as + shell variable and function names. Also referred to as an + 'identifier'. + +'operator' + A 'control operator' or a 'redirection operator'. *Note + Redirections::, for a list of redirection operators. Operators + contain at least one unquoted 'metacharacter'. + +'process group' + A collection of related processes each having the same process + group ID. + +'process group ID' + A unique identifier that represents a 'process group' during its + lifetime. + +'reserved word' + A 'word' that has a special meaning to the shell. Most reserved + words introduce shell flow control constructs, such as 'for' and + 'while'. + +'return status' + A synonym for 'exit status'. + +'signal' + A mechanism by which a process may be notified by the kernel of an + event occurring in the system. + +'special builtin' + A shell builtin command that has been classified as special by the + POSIX standard. + +'token' + A sequence of characters considered a single unit by the shell. It + is either a 'word' or an 'operator'. + +'word' + A sequence of characters treated as a unit by the shell. Words may + not include unquoted 'metacharacters'. + + +File: bashref.info, Node: Basic Shell Features, Next: Shell Builtin Commands, Prev: Definitions, Up: Top + +3 Basic Shell Features +********************** + +Bash is an acronym for 'Bourne-Again SHell'. The Bourne shell is the +traditional Unix shell originally written by Stephen Bourne. All of the +Bourne shell builtin commands are available in Bash, The rules for +evaluation and quoting are taken from the POSIX specification for the +'standard' Unix shell. + + This chapter briefly summarizes the shell's 'building blocks': +commands, control structures, shell functions, shell parameters, shell +expansions, redirections, which are a way to direct input and output +from and to named files, and how the shell executes commands. + +* Menu: + +* Shell Syntax:: What your input means to the shell. +* Shell Commands:: The types of commands you can use. +* Shell Functions:: Grouping commands by name. +* Shell Parameters:: How the shell stores values. +* Shell Expansions:: How Bash expands parameters and the various + expansions available. +* Redirections:: A way to control where input and output go. +* Executing Commands:: What happens when you run a command. +* Shell Scripts:: Executing files of shell commands. + + +File: bashref.info, Node: Shell Syntax, Next: Shell Commands, Up: Basic Shell Features + +3.1 Shell Syntax +================ + +* Menu: + +* Shell Operation:: The basic operation of the shell. +* Quoting:: How to remove the special meaning from characters. +* Comments:: How to specify comments. + +When the shell reads input, it proceeds through a sequence of +operations. If the input indicates the beginning of a comment, the +shell ignores the comment symbol ('#'), and the rest of that line. + + Otherwise, roughly speaking, the shell reads its input and divides +the input into words and operators, employing the quoting rules to +select which meanings to assign various words and characters. + + The shell then parses these tokens into commands and other +constructs, removes the special meaning of certain words or characters, +expands others, redirects input and output as needed, executes the +specified command, waits for the command's exit status, and makes that +exit status available for further inspection or processing. + + +File: bashref.info, Node: Shell Operation, Next: Quoting, Up: Shell Syntax + +3.1.1 Shell Operation +--------------------- + +The following is a brief description of the shell's operation when it +reads and executes a command. Basically, the shell does the following: + + 1. Reads its input from a file (*note Shell Scripts::), from a string + supplied as an argument to the '-c' invocation option (*note + Invoking Bash::), or from the user's terminal. + + 2. Breaks the input into words and operators, obeying the quoting + rules described in *note Quoting::. These tokens are separated by + 'metacharacters'. Alias expansion is performed by this step (*note + Aliases::). + + 3. Parses the tokens into simple and compound commands (*note Shell + Commands::). + + 4. Performs the various shell expansions (*note Shell Expansions::), + breaking the expanded tokens into lists of filenames (*note + Filename Expansion::) and commands and arguments. + + 5. Performs any necessary redirections (*note Redirections::) and + removes the redirection operators and their operands from the + argument list. + + 6. Executes the command (*note Executing Commands::). + + 7. Optionally waits for the command to complete and collects its exit + status (*note Exit Status::). + + +File: bashref.info, Node: Quoting, Next: Comments, Prev: Shell Operation, Up: Shell Syntax + +3.1.2 Quoting +------------- + +* Menu: + +* Escape Character:: How to remove the special meaning from a single + character. +* Single Quotes:: How to inhibit all interpretation of a sequence + of characters. +* Double Quotes:: How to suppress most of the interpretation of a + sequence of characters. +* ANSI-C Quoting:: How to expand ANSI-C sequences in quoted strings. +* Locale Translation:: How to translate strings into different languages. + +Quoting is used to remove the special meaning of certain characters or +words to the shell. Quoting can be used to disable special treatment +for special characters, to prevent reserved words from being recognized +as such, and to prevent parameter expansion. + + Each of the shell metacharacters (*note Definitions::) has special +meaning to the shell and must be quoted if it is to represent itself. +When the command history expansion facilities are being used (*note +History Interaction::), the HISTORY EXPANSION character, usually '!', +must be quoted to prevent history expansion. *Note Bash History +Facilities::, for more details concerning history expansion. + + There are three quoting mechanisms: the ESCAPE CHARACTER, single +quotes, and double quotes. + + +File: bashref.info, Node: Escape Character, Next: Single Quotes, Up: Quoting + +3.1.2.1 Escape Character +........................ + +A non-quoted backslash '\' is the Bash escape character. It preserves +the literal value of the next character that follows, with the exception +of 'newline'. If a '\newline' pair appears, and the backslash itself is +not quoted, the '\newline' is treated as a line continuation (that is, +it is removed from the input stream and effectively ignored). + + +File: bashref.info, Node: Single Quotes, Next: Double Quotes, Prev: Escape Character, Up: Quoting + +3.1.2.2 Single Quotes +..................... + +Enclosing characters in single quotes (''') preserves the literal value +of each character within the quotes. A single quote may not occur +between single quotes, even when preceded by a backslash. + + +File: bashref.info, Node: Double Quotes, Next: ANSI-C Quoting, Prev: Single Quotes, Up: Quoting + +3.1.2.3 Double Quotes +..................... + +Enclosing characters in double quotes ('"') preserves the literal value +of all characters within the quotes, with the exception of '$', '`', +'\', and, when history expansion is enabled, '!'. When the shell is in +POSIX mode (*note Bash POSIX Mode::), the '!' has no special meaning +within double quotes, even when history expansion is enabled. The +characters '$' and '`' retain their special meaning within double quotes +(*note Shell Expansions::). The backslash retains its special meaning +only when followed by one of the following characters: '$', '`', '"', +'\', or 'newline'. Within double quotes, backslashes that are followed +by one of these characters are removed. Backslashes preceding +characters without a special meaning are left unmodified. A double +quote may be quoted within double quotes by preceding it with a +backslash. If enabled, history expansion will be performed unless an +'!' appearing in double quotes is escaped using a backslash. The +backslash preceding the '!' is not removed. + + The special parameters '*' and '@' have special meaning when in +double quotes (*note Shell Parameter Expansion::). + + +File: bashref.info, Node: ANSI-C Quoting, Next: Locale Translation, Prev: Double Quotes, Up: Quoting + +3.1.2.4 ANSI-C Quoting +...................... + +Words of the form '$'STRING'' are treated specially. The word expands +to STRING, with backslash-escaped characters replaced as specified by +the ANSI C standard. Backslash escape sequences, if present, are +decoded as follows: + +'\a' + alert (bell) +'\b' + backspace +'\e' +'\E' + an escape character (not ANSI C) +'\f' + form feed +'\n' + newline +'\r' + carriage return +'\t' + horizontal tab +'\v' + vertical tab +'\\' + backslash +'\'' + single quote +'\"' + double quote +'\?' + question mark +'\NNN' + the eight-bit character whose value is the octal value NNN (one to + three octal digits) +'\xHH' + the eight-bit character whose value is the hexadecimal value HH + (one or two hex digits) +'\uHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHH (one to four hex digits) +'\UHHHHHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHHHHHH (one to eight hex digits) +'\cX' + a control-X character + +The expanded result is single-quoted, as if the dollar sign had not been +present. + + +File: bashref.info, Node: Locale Translation, Prev: ANSI-C Quoting, Up: Quoting + +3.1.2.5 Locale-Specific Translation +................................... + +A double-quoted string preceded by a dollar sign ('$') will cause the +string to be translated according to the current locale. The GETTEXT +infrastructure performs the message catalog lookup and translation, +using the 'LC_MESSAGES' and 'TEXTDOMAIN' shell variables, as explained +below. See the gettext documentation for additional details. If the +current locale is 'C' or 'POSIX', or if there are no translations +available, the dollar sign is ignored. If the string is translated and +replaced, the replacement is double-quoted. + + Some systems use the message catalog selected by the 'LC_MESSAGES' +shell variable. Others create the name of the message catalog from the +value of the 'TEXTDOMAIN' shell variable, possibly adding a suffix of +'.mo'. If you use the 'TEXTDOMAIN' variable, you may need to set the +'TEXTDOMAINDIR' variable to the location of the message catalog files. +Still others use both variables in this fashion: +'TEXTDOMAINDIR'/'LC_MESSAGES'/LC_MESSAGES/'TEXTDOMAIN'.mo. + + +File: bashref.info, Node: Comments, Prev: Quoting, Up: Shell Syntax + +3.1.3 Comments +-------------- + +In a non-interactive shell, or an interactive shell in which the +'interactive_comments' option to the 'shopt' builtin is enabled (*note +The Shopt Builtin::), a word beginning with '#' causes that word and all +remaining characters on that line to be ignored. An interactive shell +without the 'interactive_comments' option enabled does not allow +comments. The 'interactive_comments' option is on by default in +interactive shells. *Note Interactive Shells::, for a description of +what makes a shell interactive. + + +File: bashref.info, Node: Shell Commands, Next: Shell Functions, Prev: Shell Syntax, Up: Basic Shell Features + +3.2 Shell Commands +================== + +A simple shell command such as 'echo a b c' consists of the command +itself followed by arguments, separated by spaces. + + More complex shell commands are composed of simple commands arranged +together in a variety of ways: in a pipeline in which the output of one +command becomes the input of a second, in a loop or conditional +construct, or in some other grouping. + +* Menu: + +* Reserved Words:: Words that have special meaning to the shell. +* Simple Commands:: The most common type of command. +* Pipelines:: Connecting the input and output of several + commands. +* Lists:: How to execute commands sequentially. +* Compound Commands:: Shell commands for control flow. +* Coprocesses:: Two-way communication between commands. +* GNU Parallel:: Running commands in parallel. + + +File: bashref.info, Node: Reserved Words, Next: Simple Commands, Up: Shell Commands + +3.2.1 Reserved Words +-------------------- + +Reserved words are words that have special meaning to the shell. They +are used to begin and end the shell's compound commands. + + The following words are recognized as reserved when unquoted and the +first word of a command (see below for exceptions): + +'if' 'then' 'elif' 'else' 'fi' 'time' +'for' 'in' 'until' 'while' 'do' 'done' +'case' 'esac' 'coproc''select''function' +'{' '}' '[[' ']]' '!' + +'in' is recognized as a reserved word if it is the third word of a +'case' or 'select' command. 'in' and 'do' are recognized as reserved +words if they are the third word in a 'for' command. + + +File: bashref.info, Node: Simple Commands, Next: Pipelines, Prev: Reserved Words, Up: Shell Commands + +3.2.2 Simple Commands +--------------------- + +A simple command is the kind of command encountered most often. It's +just a sequence of words separated by 'blank's, terminated by one of the +shell's control operators (*note Definitions::). The first word +generally specifies a command to be executed, with the rest of the words +being that command's arguments. + + The return status (*note Exit Status::) of a simple command is its +exit status as provided by the POSIX 1003.1 'waitpid' function, or 128+N +if the command was terminated by signal N. + + +File: bashref.info, Node: Pipelines, Next: Lists, Prev: Simple Commands, Up: Shell Commands + +3.2.3 Pipelines +--------------- + +A 'pipeline' is a sequence of one or more commands separated by one of +the control operators '|' or '|&'. + + The format for a pipeline is + [time [-p]] [!] COMMAND1 [ | or |& COMMAND2 ] ... + +The output of each command in the pipeline is connected via a pipe to +the input of the next command. That is, each command reads the previous +command's output. This connection is performed before any redirections +specified by the command. + + If '|&' is used, COMMAND1's standard error, in addition to its +standard output, is connected to COMMAND2's standard input through the +pipe; it is shorthand for '2>&1 |'. This implicit redirection of the +standard error to the standard output is performed after any +redirections specified by the command. + + The reserved word 'time' causes timing statistics to be printed for +the pipeline once it finishes. The statistics currently consist of +elapsed (wall-clock) time and user and system time consumed by the +command's execution. The '-p' option changes the output format to that +specified by POSIX. When the shell is in POSIX mode (*note Bash POSIX +Mode::), it does not recognize 'time' as a reserved word if the next +token begins with a '-'. The 'TIMEFORMAT' variable may be set to a +format string that specifies how the timing information should be +displayed. *Note Bash Variables::, for a description of the available +formats. The use of 'time' as a reserved word permits the timing of +shell builtins, shell functions, and pipelines. An external 'time' +command cannot time these easily. + + When the shell is in POSIX mode (*note Bash POSIX Mode::), 'time' may +be followed by a newline. In this case, the shell displays the total +user and system time consumed by the shell and its children. The +'TIMEFORMAT' variable may be used to specify the format of the time +information. + + If the pipeline is not executed asynchronously (*note Lists::), the +shell waits for all commands in the pipeline to complete. + + Each command in a pipeline is executed in its own subshell, which is +a separate process (*note Command Execution Environment::). If the +'lastpipe' option is enabled using the 'shopt' builtin (*note The Shopt +Builtin::), the last element of a pipeline may be run by the shell +process. + + The exit status of a pipeline is the exit status of the last command +in the pipeline, unless the 'pipefail' option is enabled (*note The Set +Builtin::). If 'pipefail' is enabled, the pipeline's return status is +the value of the last (rightmost) command to exit with a non-zero +status, or zero if all commands exit successfully. If the reserved word +'!' precedes the pipeline, the exit status is the logical negation of +the exit status as described above. The shell waits for all commands in +the pipeline to terminate before returning a value. + + +File: bashref.info, Node: Lists, Next: Compound Commands, Prev: Pipelines, Up: Shell Commands + +3.2.4 Lists of Commands +----------------------- + +A 'list' is a sequence of one or more pipelines separated by one of the +operators ';', '&', '&&', or '||', and optionally terminated by one of +';', '&', or a 'newline'. + + Of these list operators, '&&' and '||' have equal precedence, +followed by ';' and '&', which have equal precedence. + + A sequence of one or more newlines may appear in a 'list' to delimit +commands, equivalent to a semicolon. + + If a command is terminated by the control operator '&', the shell +executes the command asynchronously in a subshell. This is known as +executing the command in the BACKGROUND, and these are referred to as +ASYNCHRONOUS commands. The shell does not wait for the command to +finish, and the return status is 0 (true). When job control is not +active (*note Job Control::), the standard input for asynchronous +commands, in the absence of any explicit redirections, is redirected +from '/dev/null'. + + Commands separated by a ';' are executed sequentially; the shell +waits for each command to terminate in turn. The return status is the +exit status of the last command executed. + + AND and OR lists are sequences of one or more pipelines separated by +the control operators '&&' and '||', respectively. AND and OR lists are +executed with left associativity. + + An AND list has the form + COMMAND1 && COMMAND2 + +COMMAND2 is executed if, and only if, COMMAND1 returns an exit status of +zero (success). + + An OR list has the form + COMMAND1 || COMMAND2 + +COMMAND2 is executed if, and only if, COMMAND1 returns a non-zero exit +status. + + The return status of AND and OR lists is the exit status of the last +command executed in the list. + + +File: bashref.info, Node: Compound Commands, Next: Coprocesses, Prev: Lists, Up: Shell Commands + +3.2.5 Compound Commands +----------------------- + +* Menu: + +* Looping Constructs:: Shell commands for iterative action. +* Conditional Constructs:: Shell commands for conditional execution. +* Command Grouping:: Ways to group commands. + +Compound commands are the shell programming language constructs. Each +construct begins with a reserved word or control operator and is +terminated by a corresponding reserved word or operator. Any +redirections (*note Redirections::) associated with a compound command +apply to all commands within that compound command unless explicitly +overridden. + + In most cases a list of commands in a compound command's description +may be separated from the rest of the command by one or more newlines, +and may be followed by a newline in place of a semicolon. + + Bash provides looping constructs, conditional commands, and +mechanisms to group commands and execute them as a unit. + + +File: bashref.info, Node: Looping Constructs, Next: Conditional Constructs, Up: Compound Commands + +3.2.5.1 Looping Constructs +.......................... + +Bash supports the following looping constructs. + + Note that wherever a ';' appears in the description of a command's +syntax, it may be replaced with one or more newlines. + +'until' + The syntax of the 'until' command is: + + until TEST-COMMANDS; do CONSEQUENT-COMMANDS; done + + Execute CONSEQUENT-COMMANDS as long as TEST-COMMANDS has an exit + status which is not zero. The return status is the exit status of + the last command executed in CONSEQUENT-COMMANDS, or zero if none + was executed. + +'while' + The syntax of the 'while' command is: + + while TEST-COMMANDS; do CONSEQUENT-COMMANDS; done + + Execute CONSEQUENT-COMMANDS as long as TEST-COMMANDS has an exit + status of zero. The return status is the exit status of the last + command executed in CONSEQUENT-COMMANDS, or zero if none was + executed. + +'for' + The syntax of the 'for' command is: + + for NAME [ [in [WORDS ...] ] ; ] do COMMANDS; done + + Expand WORDS (*note Shell Expansions::), and execute COMMANDS once + for each member in the resultant list, with NAME bound to the + current member. If 'in WORDS' is not present, the 'for' command + executes the COMMANDS once for each positional parameter that is + set, as if 'in "$@"' had been specified (*note Special + Parameters::). + + The return status is the exit status of the last command that + executes. If there are no items in the expansion of WORDS, no + commands are executed, and the return status is zero. + + An alternate form of the 'for' command is also supported: + + for (( EXPR1 ; EXPR2 ; EXPR3 )) ; do COMMANDS ; done + + First, the arithmetic expression EXPR1 is evaluated according to + the rules described below (*note Shell Arithmetic::). The + arithmetic expression EXPR2 is then evaluated repeatedly until it + evaluates to zero. Each time EXPR2 evaluates to a non-zero value, + COMMANDS are executed and the arithmetic expression EXPR3 is + evaluated. If any expression is omitted, it behaves as if it + evaluates to 1. The return value is the exit status of the last + command in COMMANDS that is executed, or false if any of the + expressions is invalid. + + The 'break' and 'continue' builtins (*note Bourne Shell Builtins::) +may be used to control loop execution. + + +File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Prev: Looping Constructs, Up: Compound Commands + +3.2.5.2 Conditional Constructs +.............................. + +'if' + The syntax of the 'if' command is: + + if TEST-COMMANDS; then + CONSEQUENT-COMMANDS; + [elif MORE-TEST-COMMANDS; then + MORE-CONSEQUENTS;] + [else ALTERNATE-CONSEQUENTS;] + fi + + The TEST-COMMANDS list is executed, and if its return status is + zero, the CONSEQUENT-COMMANDS list is executed. If TEST-COMMANDS + returns a non-zero status, each 'elif' list is executed in turn, + and if its exit status is zero, the corresponding MORE-CONSEQUENTS + is executed and the command completes. If 'else + ALTERNATE-CONSEQUENTS' is present, and the final command in the + final 'if' or 'elif' clause has a non-zero exit status, then + ALTERNATE-CONSEQUENTS is executed. The return status is the exit + status of the last command executed, or zero if no condition tested + true. + +'case' + The syntax of the 'case' command is: + + case WORD in + [ [(] PATTERN [| PATTERN]...) COMMAND-LIST ;;]... + esac + + 'case' will selectively execute the COMMAND-LIST corresponding to + the first PATTERN that matches WORD. The match is performed + according to the rules described below in *note Pattern Matching::. + If the 'nocasematch' shell option (see the description of 'shopt' + in *note The Shopt Builtin::) is enabled, the match is performed + without regard to the case of alphabetic characters. The '|' is + used to separate multiple patterns, and the ')' operator terminates + a pattern list. A list of patterns and an associated command-list + is known as a CLAUSE. + + Each clause must be terminated with ';;', ';&', or ';;&'. The WORD + undergoes tilde expansion, parameter expansion, command + substitution, arithmetic expansion, and quote removal (*note Shell + Parameter Expansion::) before matching is attempted. Each PATTERN + undergoes tilde expansion, parameter expansion, command + substitution, and arithmetic expansion. + + There may be an arbitrary number of 'case' clauses, each terminated + by a ';;', ';&', or ';;&'. The first pattern that matches + determines the command-list that is executed. It's a common idiom + to use '*' as the final pattern to define the default case, since + that pattern will always match. + + Here is an example using 'case' in a script that could be used to + describe one interesting feature of an animal: + + echo -n "Enter the name of an animal: " + read ANIMAL + echo -n "The $ANIMAL has " + case $ANIMAL in + horse | dog | cat) echo -n "four";; + man | kangaroo ) echo -n "two";; + *) echo -n "an unknown number of";; + esac + echo " legs." + + + If the ';;' operator is used, no subsequent matches are attempted + after the first pattern match. Using ';&' in place of ';;' causes + execution to continue with the COMMAND-LIST associated with the + next clause, if any. Using ';;&' in place of ';;' causes the shell + to test the patterns in the next clause, if any, and execute any + associated COMMAND-LIST on a successful match, continuing the case + statement execution as if the pattern list had not matched. + + The return status is zero if no PATTERN is matched. Otherwise, the + return status is the exit status of the COMMAND-LIST executed. + +'select' + + The 'select' construct allows the easy generation of menus. It has + almost the same syntax as the 'for' command: + + select NAME [in WORDS ...]; do COMMANDS; done + + The list of words following 'in' is expanded, generating a list of + items. The set of expanded words is printed on the standard error + output stream, each preceded by a number. If the 'in WORDS' is + omitted, the positional parameters are printed, as if 'in "$@"' had + been specified. The 'PS3' prompt is then displayed and a line is + read from the standard input. If the line consists of a number + corresponding to one of the displayed words, then the value of NAME + is set to that word. If the line is empty, the words and prompt + are displayed again. If 'EOF' is read, the 'select' command + completes. Any other value read causes NAME to be set to null. + The line read is saved in the variable 'REPLY'. + + The COMMANDS are executed after each selection until a 'break' + command is executed, at which point the 'select' command completes. + + Here is an example that allows the user to pick a filename from the + current directory, and displays the name and index of the file + selected. + + select fname in *; + do + echo you picked $fname \($REPLY\) + break; + done + +'((...))' + (( EXPRESSION )) + + The arithmetic EXPRESSION is evaluated according to the rules + described below (*note Shell Arithmetic::). If the value of the + expression is non-zero, the return status is 0; otherwise the + return status is 1. This is exactly equivalent to + let "EXPRESSION" + *Note Bash Builtins::, for a full description of the 'let' builtin. + +'[[...]]' + [[ EXPRESSION ]] + + Return a status of 0 or 1 depending on the evaluation of the + conditional expression EXPRESSION. Expressions are composed of the + primaries described below in *note Bash Conditional Expressions::. + Word splitting and filename expansion are not performed on the + words between the '[[' and ']]'; tilde expansion, parameter and + variable expansion, arithmetic expansion, command substitution, + process substitution, and quote removal are performed. Conditional + operators such as '-f' must be unquoted to be recognized as + primaries. + + When used with '[[', the '<' and '>' operators sort + lexicographically using the current locale. + + When the '==' and '!=' operators are used, the string to the right + of the operator is considered a pattern and matched according to + the rules described below in *note Pattern Matching::, as if the + 'extglob' shell option were enabled. The '=' operator is identical + to '=='. If the 'nocasematch' shell option (see the description of + 'shopt' in *note The Shopt Builtin::) is enabled, the match is + performed without regard to the case of alphabetic characters. The + return value is 0 if the string matches ('==') or does not match + ('!=') the pattern, and 1 otherwise. Any part of the pattern may + be quoted to force the quoted portion to be matched as a string. + + An additional binary operator, '=~', is available, with the same + precedence as '==' and '!='. When it is used, the string to the + right of the operator is considered a POSIX extended regular + expression and matched accordingly (using the POSIX 'regcomp' and + 'regexec' interfaces usually described in regex(3)). The return + value is 0 if the string matches the pattern, and 1 otherwise. If + the regular expression is syntactically incorrect, the conditional + expression's return value is 2. If the 'nocasematch' shell option + (see the description of 'shopt' in *note The Shopt Builtin::) is + enabled, the match is performed without regard to the case of + alphabetic characters. Any part of the pattern may be quoted to + force the quoted portion to be matched as a string. Bracket + expressions in regular expressions must be treated carefully, since + normal quoting characters lose their meanings between brackets. If + the pattern is stored in a shell variable, quoting the variable + expansion forces the entire pattern to be matched as a string. + + The pattern will match if it matches any part of the string. + Anchor the pattern using the '^' and '$' regular expression + operators to force it to match the entire string. The array + variable 'BASH_REMATCH' records which parts of the string matched + the pattern. The element of 'BASH_REMATCH' with index 0 contains + the portion of the string matching the entire regular expression. + Substrings matched by parenthesized subexpressions within the + regular expression are saved in the remaining 'BASH_REMATCH' + indices. The element of 'BASH_REMATCH' with index N is the portion + of the string matching the Nth parenthesized subexpression. + + For example, the following will match a line (stored in the shell + variable LINE) if there is a sequence of characters anywhere in the + value consisting of any number, including zero, of characters in + the 'space' character class, zero or one instances of 'a', then a + 'b': + [[ $line =~ [[:space:]]*(a)?b ]] + + That means values like 'aab' and ' aaaaaab' will match, as will a + line containing a 'b' anywhere in its value. + + Storing the regular expression in a shell variable is often a + useful way to avoid problems with quoting characters that are + special to the shell. It is sometimes difficult to specify a + regular expression literally without using quotes, or to keep track + of the quoting used by regular expressions while paying attention + to the shell's quote removal. Using a shell variable to store the + pattern decreases these problems. For example, the following is + equivalent to the above: + pattern='[[:space:]]*(a)?b' + [[ $line =~ $pattern ]] + + If you want to match a character that's special to the regular + expression grammar, it has to be quoted to remove its special + meaning. This means that in the pattern 'xxx.txt', the '.' matches + any character in the string (its usual regular expression meaning), + but in the pattern '"xxx.txt"' it can only match a literal '.'. + Shell programmers should take special care with backslashes, since + backslashes are used both by the shell and regular expressions to + remove the special meaning from the following character. The + following two sets of commands are _not_ equivalent: + pattern='\.' + + [[ . =~ $pattern ]] + [[ . =~ \. ]] + + [[ . =~ "$pattern" ]] + [[ . =~ '\.' ]] + + The first two matches will succeed, but the second two will not, + because in the second two the backslash will be part of the pattern + to be matched. In the first two examples, the backslash removes + the special meaning from '.', so the literal '.' matches. If the + string in the first examples were anything other than '.', say 'a', + the pattern would not match, because the quoted '.' in the pattern + loses its special meaning of matching any single character. + + Expressions may be combined using the following operators, listed + in decreasing order of precedence: + + '( EXPRESSION )' + Returns the value of EXPRESSION. This may be used to override + the normal precedence of operators. + + '! EXPRESSION' + True if EXPRESSION is false. + + 'EXPRESSION1 && EXPRESSION2' + True if both EXPRESSION1 and EXPRESSION2 are true. + + 'EXPRESSION1 || EXPRESSION2' + True if either EXPRESSION1 or EXPRESSION2 is true. + + The '&&' and '||' operators do not evaluate EXPRESSION2 if the + value of EXPRESSION1 is sufficient to determine the return value of + the entire conditional expression. + + +File: bashref.info, Node: Command Grouping, Prev: Conditional Constructs, Up: Compound Commands + +3.2.5.3 Grouping Commands +......................... + +Bash provides two ways to group a list of commands to be executed as a +unit. When commands are grouped, redirections may be applied to the +entire command list. For example, the output of all the commands in the +list may be redirected to a single stream. + +'()' + ( LIST ) + + Placing a list of commands between parentheses causes a subshell + environment to be created (*note Command Execution Environment::), + and each of the commands in LIST to be executed in that subshell. + Since the LIST is executed in a subshell, variable assignments do + not remain in effect after the subshell completes. + +'{}' + { LIST; } + + Placing a list of commands between curly braces causes the list to + be executed in the current shell context. No subshell is created. + The semicolon (or newline) following LIST is required. + + In addition to the creation of a subshell, there is a subtle +difference between these two constructs due to historical reasons. The +braces are 'reserved words', so they must be separated from the LIST by +'blank's or other shell metacharacters. The parentheses are +'operators', and are recognized as separate tokens by the shell even if +they are not separated from the LIST by whitespace. + + The exit status of both of these constructs is the exit status of +LIST. + + +File: bashref.info, Node: Coprocesses, Next: GNU Parallel, Prev: Compound Commands, Up: Shell Commands + +3.2.6 Coprocesses +----------------- + +A 'coprocess' is a shell command preceded by the 'coproc' reserved word. +A coprocess is executed asynchronously in a subshell, as if the command +had been terminated with the '&' control operator, with a two-way pipe +established between the executing shell and the coprocess. + + The format for a coprocess is: + coproc [NAME] COMMAND [REDIRECTIONS] + +This creates a coprocess named NAME. If NAME is not supplied, the +default name is COPROC. NAME must not be supplied if COMMAND is a +simple command (*note Simple Commands::); otherwise, it is interpreted +as the first word of the simple command. + + When the coprocess is executed, the shell creates an array variable +(*note Arrays::) named 'NAME' in the context of the executing shell. +The standard output of COMMAND is connected via a pipe to a file +descriptor in the executing shell, and that file descriptor is assigned +to 'NAME'[0]. The standard input of COMMAND is connected via a pipe to +a file descriptor in the executing shell, and that file descriptor is +assigned to 'NAME'[1]. This pipe is established before any redirections +specified by the command (*note Redirections::). The file descriptors +can be utilized as arguments to shell commands and redirections using +standard word expansions. Other than those created to execute command +and process substitutions, the file descriptors are not available in +subshells. + + The process ID of the shell spawned to execute the coprocess is +available as the value of the variable 'NAME'_PID. The 'wait' builtin +command may be used to wait for the coprocess to terminate. + + Since the coprocess is created as an asynchronous command, the +'coproc' command always returns success. The return status of a +coprocess is the exit status of COMMAND. + + +File: bashref.info, Node: GNU Parallel, Prev: Coprocesses, Up: Shell Commands + +3.2.7 GNU Parallel +------------------ + +There are ways to run commands in parallel that are not built into Bash. +GNU Parallel is a tool to do just that. + + GNU Parallel, as its name suggests, can be used to build and run +commands in parallel. You may run the same command with different +arguments, whether they are filenames, usernames, hostnames, or lines +read from files. GNU Parallel provides shorthand references to many of +the most common operations (input lines, various portions of the input +line, different ways to specify the input source, and so on). Parallel +can replace 'xargs' or feed commands from its input sources to several +different instances of Bash. + + For a complete description, refer to the GNU Parallel documentation. +A few examples should provide a brief introduction to its use. + + For example, it is easy to replace 'xargs' to gzip all html files in +the current directory and its subdirectories: + find . -type f -name '*.html' -print | parallel gzip +If you need to protect special characters such as newlines in file +names, use find's '-print0' option and parallel's '-0' option. + + You can use Parallel to move files from the current directory when +the number of files is too large to process with one 'mv' invocation: + printf '%s\n' * | parallel mv {} destdir + + As you can see, the {} is replaced with each line read from standard +input. While using 'ls' will work in most instances, it is not +sufficient to deal with all filenames. 'printf' is a shell builtin, and +therefore is not subject to the kernel's limit on the number of +arguments to a program, so you can use '*' (but see below about the +'dotglob' shell option). If you need to accommodate special characters +in filenames, you can use + + printf '%s\0' * | parallel -0 mv {} destdir + +as alluded to above. + + This will run as many 'mv' commands as there are files in the current +directory. You can emulate a parallel 'xargs' by adding the '-X' +option: + printf '%s\0' * | parallel -0 -X mv {} destdir + + (You may have to modify the pattern if you have the 'dotglob' option +enabled.) + + GNU Parallel can replace certain common idioms that operate on lines +read from a file (in this case, filenames listed one per line): + while IFS= read -r x; do + do-something1 "$x" "config-$x" + do-something2 < "$x" + done < file | process-output + +with a more compact syntax reminiscent of lambdas: + cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" | + process-output + + Parallel provides a built-in mechanism to remove filename extensions, +which lends itself to batch file transformations or renaming: + ls *.gz | parallel -j+0 "zcat {} | bzip2 >{.}.bz2 && rm {}" +This will recompress all files in the current directory with names +ending in .gz using bzip2, running one job per CPU (-j+0) in parallel. +(We use 'ls' for brevity here; using 'find' as above is more robust in +the face of filenames containing unexpected characters.) Parallel can +take arguments from the command line; the above can also be written as + + parallel "zcat {} | bzip2 >{.}.bz2 && rm {}" ::: *.gz + + If a command generates output, you may want to preserve the input +order in the output. For instance, the following command + { + echo foss.org.my ; + echo debian.org ; + echo freenetproject.org ; + } | parallel traceroute +will display as output the traceroute invocation that finishes first. +Adding the '-k' option + { + echo foss.org.my ; + echo debian.org ; + echo freenetproject.org ; + } | parallel -k traceroute +will ensure that the output of 'traceroute foss.org.my' is displayed +first. + + Finally, Parallel can be used to run a sequence of shell commands in +parallel, similar to 'cat file | bash'. It is not uncommon to take a +list of filenames, create a series of shell commands to operate on them, +and feed that list of commands to a shell. Parallel can speed this up. +Assuming that 'file' contains a list of shell commands, one per line, + + parallel -j 10 < file + +will evaluate the commands using the shell (since no explicit command is +supplied as an argument), in blocks of ten shell jobs at a time. + + +File: bashref.info, Node: Shell Functions, Next: Shell Parameters, Prev: Shell Commands, Up: Basic Shell Features + +3.3 Shell Functions +=================== + +Shell functions are a way to group commands for later execution using a +single name for the group. They are executed just like a "regular" +command. When the name of a shell function is used as a simple command +name, the list of commands associated with that function name is +executed. Shell functions are executed in the current shell context; no +new process is created to interpret them. + + Functions are declared using this syntax: + FNAME () COMPOUND-COMMAND [ REDIRECTIONS ] + + or + + function FNAME [()] COMPOUND-COMMAND [ REDIRECTIONS ] + + This defines a shell function named FNAME. The reserved word +'function' is optional. If the 'function' reserved word is supplied, +the parentheses are optional. The BODY of the function is the compound +command COMPOUND-COMMAND (*note Compound Commands::). That command is +usually a LIST enclosed between { and }, but may be any compound command +listed above, with one exception: If the 'function' reserved word is +used, but the parentheses are not supplied, the braces are required. +COMPOUND-COMMAND is executed whenever FNAME is specified as the name of +a command. When the shell is in POSIX mode (*note Bash POSIX Mode::), +FNAME must be a valid shell NAME and may not be the same as one of the +special builtins (*note Special Builtins::). In default mode, a +function name can be any unquoted shell word that does not contain '$'. +Any redirections (*note Redirections::) associated with the shell +function are performed when the function is executed. A function +definition may be deleted using the '-f' option to the 'unset' builtin +(*note Bourne Shell Builtins::). + + The exit status of a function definition is zero unless a syntax +error occurs or a readonly function with the same name already exists. +When executed, the exit status of a function is the exit status of the +last command executed in the body. + + Note that for historical reasons, in the most common usage the curly +braces that surround the body of the function must be separated from the +body by 'blank's or newlines. This is because the braces are reserved +words and are only recognized as such when they are separated from the +command list by whitespace or another shell metacharacter. Also, when +using the braces, the LIST must be terminated by a semicolon, a '&', or +a newline. + + When a function is executed, the arguments to the function become the +positional parameters during its execution (*note Positional +Parameters::). The special parameter '#' that expands to the number of +positional parameters is updated to reflect the change. Special +parameter '0' is unchanged. The first element of the 'FUNCNAME' +variable is set to the name of the function while the function is +executing. + + All other aspects of the shell execution environment are identical +between a function and its caller with these exceptions: the 'DEBUG' and +'RETURN' traps are not inherited unless the function has been given the +'trace' attribute using the 'declare' builtin or the '-o functrace' +option has been enabled with the 'set' builtin, (in which case all +functions inherit the 'DEBUG' and 'RETURN' traps), and the 'ERR' trap is +not inherited unless the '-o errtrace' shell option has been enabled. +*Note Bourne Shell Builtins::, for the description of the 'trap' +builtin. + + The 'FUNCNEST' variable, if set to a numeric value greater than 0, +defines a maximum function nesting level. Function invocations that +exceed the limit cause the entire command to abort. + + If the builtin command 'return' is executed in a function, the +function completes and execution resumes with the next command after the +function call. Any command associated with the 'RETURN' trap is +executed before execution resumes. When a function completes, the +values of the positional parameters and the special parameter '#' are +restored to the values they had prior to the function's execution. If a +numeric argument is given to 'return', that is the function's return +status; otherwise the function's return status is the exit status of the +last command executed before the 'return'. + + Variables local to the function may be declared with the 'local' +builtin. These variables are visible only to the function and the +commands it invokes. This is particularly important when a shell +function calls other functions. + + Local variables "shadow" variables with the same name declared at +previous scopes. For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. + + The shell uses DYNAMIC SCOPING to control a variable's visibility +within functions. With dynamic scoping, visible variables and their +values are a result of the sequence of function calls that caused +execution to reach the current function. The value of a variable that a +function sees depends on its value within its caller, if any, whether +that caller is the "global" scope or another shell function. This is +also the value that a local variable declaration "shadows", and the +value that is restored when the function returns. + + For example, if a variable VAR is declared as local in function +FUNC1, and FUNC1 calls another function FUNC2, references to VAR made +from within FUNC2 will resolve to the local variable VAR from FUNC1, +shadowing any global variable named VAR. + + The following script demonstrates this behavior. When executed, the +script displays + + In func2, var = func1 local + + func1() + { + local var='func1 local' + func2 + } + + func2() + { + echo "In func2, var = $var" + } + + var=global + func1 + + The 'unset' builtin also acts using the same dynamic scope: if a +variable is local to the current scope, 'unset' will unset it; otherwise +the unset will refer to the variable found in any calling scope as +described above. If a variable at the current local scope is unset, it +will remain so until it is reset in that scope or until the function +returns. Once the function returns, any instance of the variable at a +previous scope will become visible. If the unset acts on a variable at +a previous scope, any instance of a variable with that name that had +been shadowed will become visible. + + Function names and definitions may be listed with the '-f' option to +the 'declare' ('typeset') builtin command (*note Bash Builtins::). The +'-F' option to 'declare' or 'typeset' will list the function names only +(and optionally the source file and line number, if the 'extdebug' shell +option is enabled). Functions may be exported so that subshells +automatically have them defined with the '-f' option to the 'export' +builtin (*note Bourne Shell Builtins::). + + Functions may be recursive. The 'FUNCNEST' variable may be used to +limit the depth of the function call stack and restrict the number of +function invocations. By default, no limit is placed on the number of +recursive calls. + + +File: bashref.info, Node: Shell Parameters, Next: Shell Expansions, Prev: Shell Functions, Up: Basic Shell Features + +3.4 Shell Parameters +==================== + +* Menu: + +* Positional Parameters:: The shell's command-line arguments. +* Special Parameters:: Parameters denoted by special characters. + +A PARAMETER is an entity that stores values. It can be a 'name', a +number, or one of the special characters listed below. A VARIABLE is a +parameter denoted by a 'name'. A variable has a VALUE and zero or more +ATTRIBUTES. Attributes are assigned using the 'declare' builtin command +(see the description of the 'declare' builtin in *note Bash Builtins::). + + A parameter is set if it has been assigned a value. The null string +is a valid value. Once a variable is set, it may be unset only by using +the 'unset' builtin command. + + A variable may be assigned to by a statement of the form + NAME=[VALUE] +If VALUE is not given, the variable is assigned the null string. All +VALUEs undergo tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal (detailed +below). If the variable has its 'integer' attribute set, then VALUE is +evaluated as an arithmetic expression even if the '$((...))' expansion +is not used (*note Arithmetic Expansion::). Word splitting is not +performed, with the exception of '"$@"' as explained below. Filename +expansion is not performed. Assignment statements may also appear as +arguments to the 'alias', 'declare', 'typeset', 'export', 'readonly', +and 'local' builtin commands (DECLARATION commands). When in POSIX mode +(*note Bash POSIX Mode::), these builtins may appear in a command after +one or more instances of the 'command' builtin and retain these +assignment statement properties. + + In the context where an assignment statement is assigning a value to +a shell variable or array index (*note Arrays::), the '+=' operator can +be used to append to or add to the variable's previous value. This +includes arguments to builtin commands such as 'declare' that accept +assignment statements (DECLARATION commands). When '+=' is applied to a +variable for which the INTEGER attribute has been set, VALUE is +evaluated as an arithmetic expression and added to the variable's +current value, which is also evaluated. When '+=' is applied to an +array variable using compound assignment (*note Arrays::), the +variable's value is not unset (as it is when using '='), and new values +are appended to the array beginning at one greater than the array's +maximum index (for indexed arrays), or added as additional key-value +pairs in an associative array. When applied to a string-valued +variable, VALUE is expanded and appended to the variable's value. + + A variable can be assigned the NAMEREF attribute using the '-n' +option to the 'declare' or 'local' builtin commands (*note Bash +Builtins::) to create a NAMEREF, or a reference to another variable. +This allows variables to be manipulated indirectly. Whenever the +nameref variable is referenced, assigned to, unset, or has its +attributes modified (other than using or changing the nameref attribute +itself), the operation is actually performed on the variable specified +by the nameref variable's value. A nameref is commonly used within +shell functions to refer to a variable whose name is passed as an +argument to the function. For instance, if a variable name is passed to +a shell function as its first argument, running + declare -n ref=$1 +inside the function creates a nameref variable REF whose value is the +variable name passed as the first argument. References and assignments +to REF, and changes to its attributes, are treated as references, +assignments, and attribute modifications to the variable whose name was +passed as '$1'. + + If the control variable in a 'for' loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. Namerefs can be unset using the '-n' option to the +'unset' builtin (*note Bourne Shell Builtins::). Otherwise, if 'unset' +is executed with the name of a nameref variable as an argument, the +variable referenced by the nameref variable will be unset. + + +File: bashref.info, Node: Positional Parameters, Next: Special Parameters, Up: Shell Parameters + +3.4.1 Positional Parameters +--------------------------- + +A POSITIONAL PARAMETER is a parameter denoted by one or more digits, +other than the single digit '0'. Positional parameters are assigned +from the shell's arguments when it is invoked, and may be reassigned +using the 'set' builtin command. Positional parameter 'N' may be +referenced as '${N}', or as '$N' when 'N' consists of a single digit. +Positional parameters may not be assigned to with assignment statements. +The 'set' and 'shift' builtins are used to set and unset them (*note +Shell Builtin Commands::). The positional parameters are temporarily +replaced when a shell function is executed (*note Shell Functions::). + + When a positional parameter consisting of more than a single digit is +expanded, it must be enclosed in braces. + + +File: bashref.info, Node: Special Parameters, Prev: Positional Parameters, Up: Shell Parameters + +3.4.2 Special Parameters +------------------------ + +The shell treats several parameters specially. These parameters may +only be referenced; assignment to them is not allowed. + +'*' + ($*) Expands to the positional parameters, starting from one. When + the expansion is not within double quotes, each positional + parameter expands to a separate word. In contexts where it is + performed, those words are subject to further word splitting and + filename expansion. When the expansion occurs within double + quotes, it expands to a single word with the value of each + parameter separated by the first character of the 'IFS' special + variable. That is, '"$*"' is equivalent to '"$1C$2C..."', where C + is the first character of the value of the 'IFS' variable. If + 'IFS' is unset, the parameters are separated by spaces. If 'IFS' + is null, the parameters are joined without intervening separators. + +'@' + ($@) Expands to the positional parameters, starting from one. In + contexts where word splitting is performed, this expands each + positional parameter to a separate word; if not within double + quotes, these words are subject to word splitting. In contexts + where word splitting is not performed, this expands to a single + word with each positional parameter separated by a space. When the + expansion occurs within double quotes, and word splitting is + performed, each parameter expands to a separate word. That is, + '"$@"' is equivalent to '"$1" "$2" ...'. If the double-quoted + expansion occurs within a word, the expansion of the first + parameter is joined with the beginning part of the original word, + and the expansion of the last parameter is joined with the last + part of the original word. When there are no positional + parameters, '"$@"' and '$@' expand to nothing (i.e., they are + removed). + +'#' + ($#) Expands to the number of positional parameters in decimal. + +'?' + ($?) Expands to the exit status of the most recently executed + foreground pipeline. + +'-' + ($-, a hyphen.) Expands to the current option flags as specified + upon invocation, by the 'set' builtin command, or those set by the + shell itself (such as the '-i' option). + +'$' + ($$) Expands to the process ID of the shell. In a '()' subshell, + it expands to the process ID of the invoking shell, not the + subshell. + +'!' + ($!) Expands to the process ID of the job most recently placed + into the background, whether executed as an asynchronous command or + using the 'bg' builtin (*note Job Control Builtins::). + +'0' + ($0) Expands to the name of the shell or shell script. This is set + at shell initialization. If Bash is invoked with a file of + commands (*note Shell Scripts::), '$0' is set to the name of that + file. If Bash is started with the '-c' option (*note Invoking + Bash::), then '$0' is set to the first argument after the string to + be executed, if one is present. Otherwise, it is set to the + filename used to invoke Bash, as given by argument zero. + + +File: bashref.info, Node: Shell Expansions, Next: Redirections, Prev: Shell Parameters, Up: Basic Shell Features + +3.5 Shell Expansions +==================== + +Expansion is performed on the command line after it has been split into +'token's. There are seven kinds of expansion performed: + + * brace expansion + * tilde expansion + * parameter and variable expansion + * command substitution + * arithmetic expansion + * word splitting + * filename expansion + +* Menu: + +* Brace Expansion:: Expansion of expressions within braces. +* Tilde Expansion:: Expansion of the ~ character. +* Shell Parameter Expansion:: How Bash expands variables to their values. +* Command Substitution:: Using the output of a command as an argument. +* Arithmetic Expansion:: How to use arithmetic in shell expansions. +* Process Substitution:: A way to write and read to and from a + command. +* Word Splitting:: How the results of expansion are split into separate + arguments. +* Filename Expansion:: A shorthand for specifying filenames matching patterns. +* Quote Removal:: How and when quote characters are removed from + words. + + The order of expansions is: brace expansion; tilde expansion, +parameter and variable expansion, arithmetic expansion, and command +substitution (done in a left-to-right fashion); word splitting; and +filename expansion. + + On systems that can support it, there is an additional expansion +available: PROCESS SUBSTITUTION. This is performed at the same time as +tilde, parameter, variable, and arithmetic expansion and command +substitution. + + After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves (QUOTE +REMOVAL). + + Only brace expansion, word splitting, and filename expansion can +increase the number of words of the expansion; other expansions expand a +single word to a single word. The only exceptions to this are the +expansions of '"$@"' and '$*' (*note Special Parameters::), and +'"${NAME[@]}"' and '${NAME[*]}' (*note Arrays::). + + After all expansions, 'quote removal' (*note Quote Removal::) is +performed. + + +File: bashref.info, Node: Brace Expansion, Next: Tilde Expansion, Up: Shell Expansions + +3.5.1 Brace Expansion +--------------------- + +Brace expansion is a mechanism by which arbitrary strings may be +generated. This mechanism is similar to FILENAME EXPANSION (*note +Filename Expansion::), but the filenames generated need not exist. +Patterns to be brace expanded take the form of an optional PREAMBLE, +followed by either a series of comma-separated strings or a sequence +expression between a pair of braces, followed by an optional POSTSCRIPT. +The preamble is prefixed to each string contained within the braces, and +the postscript is then appended to each resulting string, expanding left +to right. + + Brace expansions may be nested. The results of each expanded string +are not sorted; left to right order is preserved. For example, + bash$ echo a{d,c,b}e + ade ace abe + + A sequence expression takes the form '{X..Y[..INCR]}', where X and Y +are either integers or single characters, and INCR, an optional +increment, is an integer. When integers are supplied, the expression +expands to each number between X and Y, inclusive. Supplied integers +may be prefixed with '0' to force each term to have the same width. +When either X or Y begins with a zero, the shell attempts to force all +generated terms to contain the same number of digits, zero-padding where +necessary. When characters are supplied, the expression expands to each +character lexicographically between X and Y, inclusive, using the +default C locale. Note that both X and Y must be of the same type. +When the increment is supplied, it is used as the difference between +each term. The default increment is 1 or -1 as appropriate. + + Brace expansion is performed before any other expansions, and any +characters special to other expansions are preserved in the result. It +is strictly textual. Bash does not apply any syntactic interpretation +to the context of the expansion or the text between the braces. + + A correctly-formed brace expansion must contain unquoted opening and +closing braces, and at least one unquoted comma or a valid sequence +expression. Any incorrectly formed brace expansion is left unchanged. + + A { or ',' may be quoted with a backslash to prevent its being +considered part of a brace expression. To avoid conflicts with +parameter expansion, the string '${' is not considered eligible for +brace expansion, and inhibits brace expansion until the closing '}'. + + This construct is typically used as shorthand when the common prefix +of the strings to be generated is longer than in the above example: + mkdir /usr/local/src/bash/{old,new,dist,bugs} + or + chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}} + + +File: bashref.info, Node: Tilde Expansion, Next: Shell Parameter Expansion, Prev: Brace Expansion, Up: Shell Expansions + +3.5.2 Tilde Expansion +--------------------- + +If a word begins with an unquoted tilde character ('~'), all of the +characters up to the first unquoted slash (or all characters, if there +is no unquoted slash) are considered a TILDE-PREFIX. If none of the +characters in the tilde-prefix are quoted, the characters in the +tilde-prefix following the tilde are treated as a possible LOGIN NAME. +If this login name is the null string, the tilde is replaced with the +value of the 'HOME' shell variable. If 'HOME' is unset, the home +directory of the user executing the shell is substituted instead. +Otherwise, the tilde-prefix is replaced with the home directory +associated with the specified login name. + + If the tilde-prefix is '~+', the value of the shell variable 'PWD' +replaces the tilde-prefix. If the tilde-prefix is '~-', the value of +the shell variable 'OLDPWD', if it is set, is substituted. + + If the characters following the tilde in the tilde-prefix consist of +a number N, optionally prefixed by a '+' or a '-', the tilde-prefix is +replaced with the corresponding element from the directory stack, as it +would be displayed by the 'dirs' builtin invoked with the characters +following tilde in the tilde-prefix as an argument (*note The Directory +Stack::). If the tilde-prefix, sans the tilde, consists of a number +without a leading '+' or '-', '+' is assumed. + + If the login name is invalid, or the tilde expansion fails, the word +is left unchanged. + + Each variable assignment is checked for unquoted tilde-prefixes +immediately following a ':' or the first '='. In these cases, tilde +expansion is also performed. Consequently, one may use filenames with +tildes in assignments to 'PATH', 'MAILPATH', and 'CDPATH', and the shell +assigns the expanded value. + + The following table shows how Bash treats unquoted tilde-prefixes: + +'~' + The value of '$HOME' +'~/foo' + '$HOME/foo' + +'~fred/foo' + The subdirectory 'foo' of the home directory of the user 'fred' + +'~+/foo' + '$PWD/foo' + +'~-/foo' + '${OLDPWD-'~-'}/foo' + +'~N' + The string that would be displayed by 'dirs +N' + +'~+N' + The string that would be displayed by 'dirs +N' + +'~-N' + The string that would be displayed by 'dirs -N' + + Bash also performs tilde expansion on words satisfying the conditions +of variable assignments (*note Shell Parameters::) when they appear as +arguments to simple commands. Bash does not do this, except for the +DECLARATION commands listed above, when in POSIX mode. + + +File: bashref.info, Node: Shell Parameter Expansion, Next: Command Substitution, Prev: Tilde Expansion, Up: Shell Expansions + +3.5.3 Shell Parameter Expansion +------------------------------- + +The '$' character introduces parameter expansion, command substitution, +or arithmetic expansion. The parameter name or symbol to be expanded +may be enclosed in braces, which are optional but serve to protect the +variable to be expanded from characters immediately following it which +could be interpreted as part of the name. + + When braces are used, the matching ending brace is the first '}' not +escaped by a backslash or within a quoted string, and not within an +embedded arithmetic expansion, command substitution, or parameter +expansion. + + The basic form of parameter expansion is ${PARAMETER}. The value of +PARAMETER is substituted. The PARAMETER is a shell parameter as +described above (*note Shell Parameters::) or an array reference (*note +Arrays::). The braces are required when PARAMETER is a positional +parameter with more than one digit, or when PARAMETER is followed by a +character that is not to be interpreted as part of its name. + + If the first character of PARAMETER is an exclamation point (!), and +PARAMETER is not a NAMEREF, it introduces a level of indirection. Bash +uses the value formed by expanding the rest of PARAMETER as the new +PARAMETER; this is then expanded and that value is used in the rest of +the expansion, rather than the expansion of the original PARAMETER. +This is known as 'indirect expansion'. The value is subject to tilde +expansion, parameter expansion, command substitution, and arithmetic +expansion. If PARAMETER is a nameref, this expands to the name of the +variable referenced by PARAMETER instead of performing the complete +indirect expansion. The exceptions to this are the expansions of +${!PREFIX*} and ${!NAME[@]} described below. The exclamation point must +immediately follow the left brace in order to introduce indirection. + + In each of the cases below, WORD is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. + + When not performing substring expansion, using the form described +below (e.g., ':-'), Bash tests for a parameter that is unset or null. +Omitting the colon results in a test only for a parameter that is unset. +Put another way, if the colon is included, the operator tests for both +PARAMETER's existence and that its value is not null; if the colon is +omitted, the operator tests only for existence. + +'${PARAMETER:-WORD}' + If PARAMETER is unset or null, the expansion of WORD is + substituted. Otherwise, the value of PARAMETER is substituted. + +'${PARAMETER:=WORD}' + If PARAMETER is unset or null, the expansion of WORD is assigned to + PARAMETER. The value of PARAMETER is then substituted. Positional + parameters and special parameters may not be assigned to in this + way. + +'${PARAMETER:?WORD}' + If PARAMETER is null or unset, the expansion of WORD (or a message + to that effect if WORD is not present) is written to the standard + error and the shell, if it is not interactive, exits. Otherwise, + the value of PARAMETER is substituted. + +'${PARAMETER:+WORD}' + If PARAMETER is null or unset, nothing is substituted, otherwise + the expansion of WORD is substituted. + +'${PARAMETER:OFFSET}' +'${PARAMETER:OFFSET:LENGTH}' + This is referred to as Substring Expansion. It expands to up to + LENGTH characters of the value of PARAMETER starting at the + character specified by OFFSET. If PARAMETER is '@', an indexed + array subscripted by '@' or '*', or an associative array name, the + results differ as described below. If LENGTH is omitted, it + expands to the substring of the value of PARAMETER starting at the + character specified by OFFSET and extending to the end of the + value. LENGTH and OFFSET are arithmetic expressions (*note Shell + Arithmetic::). + + If OFFSET evaluates to a number less than zero, the value is used + as an offset in characters from the end of the value of PARAMETER. + If LENGTH evaluates to a number less than zero, it is interpreted + as an offset in characters from the end of the value of PARAMETER + rather than a number of characters, and the expansion is the + characters between OFFSET and that result. Note that a negative + offset must be separated from the colon by at least one space to + avoid being confused with the ':-' expansion. + + Here are some examples illustrating substring expansion on + parameters and subscripted arrays: + + $ string=01234567890abcdefgh + $ echo ${string:7} + 7890abcdefgh + $ echo ${string:7:0} + + $ echo ${string:7:2} + 78 + $ echo ${string:7:-2} + 7890abcdef + $ echo ${string: -7} + bcdefgh + $ echo ${string: -7:0} + + $ echo ${string: -7:2} + bc + $ echo ${string: -7:-2} + bcdef + $ set -- 01234567890abcdefgh + $ echo ${1:7} + 7890abcdefgh + $ echo ${1:7:0} + + $ echo ${1:7:2} + 78 + $ echo ${1:7:-2} + 7890abcdef + $ echo ${1: -7} + bcdefgh + $ echo ${1: -7:0} + + $ echo ${1: -7:2} + bc + $ echo ${1: -7:-2} + bcdef + $ array[0]=01234567890abcdefgh + $ echo ${array[0]:7} + 7890abcdefgh + $ echo ${array[0]:7:0} + + $ echo ${array[0]:7:2} + 78 + $ echo ${array[0]:7:-2} + 7890abcdef + $ echo ${array[0]: -7} + bcdefgh + $ echo ${array[0]: -7:0} + + $ echo ${array[0]: -7:2} + bc + $ echo ${array[0]: -7:-2} + bcdef + + If PARAMETER is '@', the result is LENGTH positional parameters + beginning at OFFSET. A negative OFFSET is taken relative to one + greater than the greatest positional parameter, so an offset of -1 + evaluates to the last positional parameter. It is an expansion + error if LENGTH evaluates to a number less than zero. + + The following examples illustrate substring expansion using + positional parameters: + + $ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${@:7} + 7 8 9 0 a b c d e f g h + $ echo ${@:7:0} + + $ echo ${@:7:2} + 7 8 + $ echo ${@:7:-2} + bash: -2: substring expression < 0 + $ echo ${@: -7:2} + b c + $ echo ${@:0} + ./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${@:0:2} + ./bash 1 + $ echo ${@: -7:0} + + + If PARAMETER is an indexed array name subscripted by '@' or '*', + the result is the LENGTH members of the array beginning with + '${PARAMETER[OFFSET]}'. A negative OFFSET is taken relative to one + greater than the maximum index of the specified array. It is an + expansion error if LENGTH evaluates to a number less than zero. + + These examples show how you can use substring expansion with + indexed arrays: + + $ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h) + $ echo ${array[@]:7} + 7 8 9 0 a b c d e f g h + $ echo ${array[@]:7:2} + 7 8 + $ echo ${array[@]: -7:2} + b c + $ echo ${array[@]: -7:-2} + bash: -2: substring expression < 0 + $ echo ${array[@]:0} + 0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${array[@]:0:2} + 0 1 + $ echo ${array[@]: -7:0} + + + Substring expansion applied to an associative array produces + undefined results. + + Substring indexing is zero-based unless the positional parameters + are used, in which case the indexing starts at 1 by default. If + OFFSET is 0, and the positional parameters are used, '$0' is + prefixed to the list. + +'${!PREFIX*}' +'${!PREFIX@}' + Expands to the names of variables whose names begin with PREFIX, + separated by the first character of the 'IFS' special variable. + When '@' is used and the expansion appears within double quotes, + each variable name expands to a separate word. + +'${!NAME[@]}' +'${!NAME[*]}' + If NAME is an array variable, expands to the list of array indices + (keys) assigned in NAME. If NAME is not an array, expands to 0 if + NAME is set and null otherwise. When '@' is used and the expansion + appears within double quotes, each key expands to a separate word. + +'${#PARAMETER}' + The length in characters of the expanded value of PARAMETER is + substituted. If PARAMETER is '*' or '@', the value substituted is + the number of positional parameters. If PARAMETER is an array name + subscripted by '*' or '@', the value substituted is the number of + elements in the array. If PARAMETER is an indexed array name + subscripted by a negative number, that number is interpreted as + relative to one greater than the maximum index of PARAMETER, so + negative indices count back from the end of the array, and an index + of -1 references the last element. + +'${PARAMETER#WORD}' +'${PARAMETER##WORD}' + The WORD is expanded to produce a pattern and matched according to + the rules described below (*note Pattern Matching::). If the + pattern matches the beginning of the expanded value of PARAMETER, + then the result of the expansion is the expanded value of PARAMETER + with the shortest matching pattern (the '#' case) or the longest + matching pattern (the '##' case) deleted. If PARAMETER is '@' or + '*', the pattern removal operation is applied to each positional + parameter in turn, and the expansion is the resultant list. If + PARAMETER is an array variable subscripted with '@' or '*', the + pattern removal operation is applied to each member of the array in + turn, and the expansion is the resultant list. + +'${PARAMETER%WORD}' +'${PARAMETER%%WORD}' + The WORD is expanded to produce a pattern and matched according to + the rules described below (*note Pattern Matching::). If the + pattern matches a trailing portion of the expanded value of + PARAMETER, then the result of the expansion is the value of + PARAMETER with the shortest matching pattern (the '%' case) or the + longest matching pattern (the '%%' case) deleted. If PARAMETER is + '@' or '*', the pattern removal operation is applied to each + positional parameter in turn, and the expansion is the resultant + list. If PARAMETER is an array variable subscripted with '@' or + '*', the pattern removal operation is applied to each member of the + array in turn, and the expansion is the resultant list. + +'${PARAMETER/PATTERN/STRING}' + + The PATTERN is expanded to produce a pattern just as in filename + expansion. PARAMETER is expanded and the longest match of PATTERN + against its value is replaced with STRING. The match is performed + according to the rules described below (*note Pattern Matching::). + If PATTERN begins with '/', all matches of PATTERN are replaced + with STRING. Normally only the first match is replaced. If + PATTERN begins with '#', it must match at the beginning of the + expanded value of PARAMETER. If PATTERN begins with '%', it must + match at the end of the expanded value of PARAMETER. If STRING is + null, matches of PATTERN are deleted and the '/' following PATTERN + may be omitted. If the 'nocasematch' shell option (see the + description of 'shopt' in *note The Shopt Builtin::) is enabled, + the match is performed without regard to the case of alphabetic + characters. If PARAMETER is '@' or '*', the substitution operation + is applied to each positional parameter in turn, and the expansion + is the resultant list. If PARAMETER is an array variable + subscripted with '@' or '*', the substitution operation is applied + to each member of the array in turn, and the expansion is the + resultant list. + +'${PARAMETER^PATTERN}' +'${PARAMETER^^PATTERN}' +'${PARAMETER,PATTERN}' +'${PARAMETER,,PATTERN}' + This expansion modifies the case of alphabetic characters in + PARAMETER. The PATTERN is expanded to produce a pattern just as in + filename expansion. Each character in the expanded value of + PARAMETER is tested against PATTERN, and, if it matches the + pattern, its case is converted. The pattern should not attempt to + match more than one character. The '^' operator converts lowercase + letters matching PATTERN to uppercase; the ',' operator converts + matching uppercase letters to lowercase. The '^^' and ',,' + expansions convert each matched character in the expanded value; + the '^' and ',' expansions match and convert only the first + character in the expanded value. If PATTERN is omitted, it is + treated like a '?', which matches every character. If PARAMETER is + '@' or '*', the case modification operation is applied to each + positional parameter in turn, and the expansion is the resultant + list. If PARAMETER is an array variable subscripted with '@' or + '*', the case modification operation is applied to each member of + the array in turn, and the expansion is the resultant list. + +'${PARAMETER@OPERATOR}' + The expansion is either a transformation of the value of PARAMETER + or information about PARAMETER itself, depending on the value of + OPERATOR. Each OPERATOR is a single letter: + + 'U' + The expansion is a string that is the value of PARAMETER with + lowercase alphabetic characters converted to uppercase. + 'u' + The expansion is a string that is the value of PARAMETER with + the first character converted to uppercase, if it is + alphabetic. + 'L' + The expansion is a string that is the value of PARAMETER with + uppercase alphabetic characters converted to lowercase. + 'Q' + The expansion is a string that is the value of PARAMETER + quoted in a format that can be reused as input. + 'E' + The expansion is a string that is the value of PARAMETER with + backslash escape sequences expanded as with the '$'...'' + quoting mechanism. + 'P' + The expansion is a string that is the result of expanding the + value of PARAMETER as if it were a prompt string (*note + Controlling the Prompt::). + 'A' + The expansion is a string in the form of an assignment + statement or 'declare' command that, if evaluated, will + recreate PARAMETER with its attributes and value. + 'K' + Produces a possibly-quoted version of the value of PARAMETER, + except that it prints the values of indexed and associative + arrays as a sequence of quoted key-value pairs (*note + Arrays::). + 'a' + The expansion is a string consisting of flag values + representing PARAMETER's attributes. + + If PARAMETER is '@' or '*', the operation is applied to each + positional parameter in turn, and the expansion is the resultant + list. If PARAMETER is an array variable subscripted with '@' or + '*', the operation is applied to each member of the array in turn, + and the expansion is the resultant list. + + The result of the expansion is subject to word splitting and + filename expansion as described below. + + +File: bashref.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions + +3.5.4 Command Substitution +-------------------------- + +Command substitution allows the output of a command to replace the +command itself. Command substitution occurs when a command is enclosed +as follows: + $(COMMAND) +or + `COMMAND` + +Bash performs the expansion by executing COMMAND in a subshell +environment and replacing the command substitution with the standard +output of the command, with any trailing newlines deleted. Embedded +newlines are not deleted, but they may be removed during word splitting. +The command substitution '$(cat FILE)' can be replaced by the equivalent +but faster '$(< FILE)'. + + When the old-style backquote form of substitution is used, backslash +retains its literal meaning except when followed by '$', '`', or '\'. +The first backquote not preceded by a backslash terminates the command +substitution. When using the '$(COMMAND)' form, all characters between +the parentheses make up the command; none are treated specially. + + Command substitutions may be nested. To nest when using the +backquoted form, escape the inner backquotes with backslashes. + + If the substitution appears within double quotes, word splitting and +filename expansion are not performed on the results. + + +File: bashref.info, Node: Arithmetic Expansion, Next: Process Substitution, Prev: Command Substitution, Up: Shell Expansions + +3.5.5 Arithmetic Expansion +-------------------------- + +Arithmetic expansion allows the evaluation of an arithmetic expression +and the substitution of the result. The format for arithmetic expansion +is: + + $(( EXPRESSION )) + + The expression is treated as if it were within double quotes, but a +double quote inside the parentheses is not treated specially. All +tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. The result is treated as the +arithmetic expression to be evaluated. Arithmetic expansions may be +nested. + + The evaluation is performed according to the rules listed below +(*note Shell Arithmetic::). If the expression is invalid, Bash prints a +message indicating failure to the standard error and no substitution +occurs. + + +File: bashref.info, Node: Process Substitution, Next: Word Splitting, Prev: Arithmetic Expansion, Up: Shell Expansions + +3.5.6 Process Substitution +-------------------------- + +Process substitution allows a process's input or output to be referred +to using a filename. It takes the form of + <(LIST) +or + >(LIST) +The process LIST is run asynchronously, and its input or output appears +as a filename. This filename is passed as an argument to the current +command as the result of the expansion. If the '>(LIST)' form is used, +writing to the file will provide input for LIST. If the '<(LIST)' form +is used, the file passed as an argument should be read to obtain the +output of LIST. Note that no space may appear between the '<' or '>' +and the left parenthesis, otherwise the construct would be interpreted +as a redirection. Process substitution is supported on systems that +support named pipes (FIFOs) or the '/dev/fd' method of naming open +files. + + When available, process substitution is performed simultaneously with +parameter and variable expansion, command substitution, and arithmetic +expansion. + + +File: bashref.info, Node: Word Splitting, Next: Filename Expansion, Prev: Process Substitution, Up: Shell Expansions + +3.5.7 Word Splitting +-------------------- + +The shell scans the results of parameter expansion, command +substitution, and arithmetic expansion that did not occur within double +quotes for word splitting. + + The shell treats each character of '$IFS' as a delimiter, and splits +the results of the other expansions into words using these characters as +field terminators. If 'IFS' is unset, or its value is exactly +'', the default, then sequences of ' ', +'', and '' at the beginning and end of the results of the +previous expansions are ignored, and any sequence of 'IFS' characters +not at the beginning or end serves to delimit words. If 'IFS' has a +value other than the default, then sequences of the whitespace +characters 'space', 'tab', and 'newline' are ignored at the beginning +and end of the word, as long as the whitespace character is in the value +of 'IFS' (an 'IFS' whitespace character). Any character in 'IFS' that +is not 'IFS' whitespace, along with any adjacent 'IFS' whitespace +characters, delimits a field. A sequence of 'IFS' whitespace characters +is also treated as a delimiter. If the value of 'IFS' is null, no word +splitting occurs. + + Explicit null arguments ('""' or '''') are retained and passed to +commands as empty strings. Unquoted implicit null arguments, resulting +from the expansion of parameters that have no values, are removed. If a +parameter with no value is expanded within double quotes, a null +argument results and is retained and passed to a command as an empty +string. When a quoted null argument appears as part of a word whose +expansion is non-null, the null argument is removed. That is, the word +'-d''' becomes '-d' after word splitting and null argument removal. + + Note that if no expansion occurs, no splitting is performed. + + +File: bashref.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word Splitting, Up: Shell Expansions + +3.5.8 Filename Expansion +------------------------ + +* Menu: + +* Pattern Matching:: How the shell matches patterns. + +After word splitting, unless the '-f' option has been set (*note The Set +Builtin::), Bash scans each word for the characters '*', '?', and '['. +If one of these characters appears, and is not quoted, then the word is +regarded as a PATTERN, and replaced with an alphabetically sorted list +of filenames matching the pattern (*note Pattern Matching::). If no +matching filenames are found, and the shell option 'nullglob' is +disabled, the word is left unchanged. If the 'nullglob' option is set, +and no matches are found, the word is removed. If the 'failglob' shell +option is set, and no matches are found, an error message is printed and +the command is not executed. If the shell option 'nocaseglob' is +enabled, the match is performed without regard to the case of alphabetic +characters. + + When a pattern is used for filename expansion, the character '.' at +the start of a filename or immediately following a slash must be matched +explicitly, unless the shell option 'dotglob' is set. The filenames '.' +and '..' must always be matched explicitly, even if 'dotglob' is set. +In other cases, the '.' character is not treated specially. + + When matching a filename, the slash character must always be matched +explicitly by a slash in the pattern, but in other matching contexts it +can be matched by a special pattern character as described below (*note +Pattern Matching::). + + See the description of 'shopt' in *note The Shopt Builtin::, for a +description of the 'nocaseglob', 'nullglob', 'failglob', and 'dotglob' +options. + + The 'GLOBIGNORE' shell variable may be used to restrict the set of +file names matching a pattern. If 'GLOBIGNORE' is set, each matching +file name that also matches one of the patterns in 'GLOBIGNORE' is +removed from the list of matches. If the 'nocaseglob' option is set, +the matching against the patterns in 'GLOBIGNORE' is performed without +regard to case. The filenames '.' and '..' are always ignored when +'GLOBIGNORE' is set and not null. However, setting 'GLOBIGNORE' to a +non-null value has the effect of enabling the 'dotglob' shell option, so +all other filenames beginning with a '.' will match. To get the old +behavior of ignoring filenames beginning with a '.', make '.*' one of +the patterns in 'GLOBIGNORE'. The 'dotglob' option is disabled when +'GLOBIGNORE' is unset. + + +File: bashref.info, Node: Pattern Matching, Up: Filename Expansion + +3.5.8.1 Pattern Matching +........................ + +Any character that appears in a pattern, other than the special pattern +characters described below, matches itself. The NUL character may not +occur in a pattern. A backslash escapes the following character; the +escaping backslash is discarded when matching. The special pattern +characters must be quoted if they are to be matched literally. + + The special pattern characters have the following meanings: +'*' + Matches any string, including the null string. When the 'globstar' + shell option is enabled, and '*' is used in a filename expansion + context, two adjacent '*'s used as a single pattern will match all + files and zero or more directories and subdirectories. If followed + by a '/', two adjacent '*'s will match only directories and + subdirectories. +'?' + Matches any single character. +'[...]' + Matches any one of the enclosed characters. A pair of characters + separated by a hyphen denotes a RANGE EXPRESSION; any character + that falls between those two characters, inclusive, using the + current locale's collating sequence and character set, is matched. + If the first character following the '[' is a '!' or a '^' then any + character not enclosed is matched. A '-' may be matched by + including it as the first or last character in the set. A ']' may + be matched by including it as the first character in the set. The + sorting order of characters in range expressions is determined by + the current locale and the values of the 'LC_COLLATE' and 'LC_ALL' + shell variables, if set. + + For example, in the default C locale, '[a-dx-z]' is equivalent to + '[abcdxyz]'. Many locales sort characters in dictionary order, and + in these locales '[a-dx-z]' is typically not equivalent to + '[abcdxyz]'; it might be equivalent to '[aBbCcDdxXyYz]', for + example. To obtain the traditional interpretation of ranges in + bracket expressions, you can force the use of the C locale by + setting the 'LC_COLLATE' or 'LC_ALL' environment variable to the + value 'C', or enable the 'globasciiranges' shell option. + + Within '[' and ']', CHARACTER CLASSES can be specified using the + syntax '[:'CLASS':]', where CLASS is one of the following classes + defined in the POSIX standard: + alnum alpha ascii blank cntrl digit graph lower + print punct space upper word xdigit + A character class matches any character belonging to that class. + The 'word' character class matches letters, digits, and the + character '_'. + + Within '[' and ']', an EQUIVALENCE CLASS can be specified using the + syntax '[='C'=]', which matches all characters with the same + collation weight (as defined by the current locale) as the + character C. + + Within '[' and ']', the syntax '[.'SYMBOL'.]' matches the collating + symbol SYMBOL. + + If the 'extglob' shell option is enabled using the 'shopt' builtin, +several extended pattern matching operators are recognized. In the +following description, a PATTERN-LIST is a list of one or more patterns +separated by a '|'. Composite patterns may be formed using one or more +of the following sub-patterns: + +'?(PATTERN-LIST)' + Matches zero or one occurrence of the given patterns. + +'*(PATTERN-LIST)' + Matches zero or more occurrences of the given patterns. + +'+(PATTERN-LIST)' + Matches one or more occurrences of the given patterns. + +'@(PATTERN-LIST)' + Matches one of the given patterns. + +'!(PATTERN-LIST)' + Matches anything except one of the given patterns. + + Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. Using separate matches against shorter +strings, or using arrays of strings instead of a single long string, may +be faster. + + +File: bashref.info, Node: Quote Removal, Prev: Filename Expansion, Up: Shell Expansions + +3.5.9 Quote Removal +------------------- + +After the preceding expansions, all unquoted occurrences of the +characters '\', ''', and '"' that did not result from one of the above +expansions are removed. + + +File: bashref.info, Node: Redirections, Next: Executing Commands, Prev: Shell Expansions, Up: Basic Shell Features + +3.6 Redirections +================ + +Before a command is executed, its input and output may be REDIRECTED +using a special notation interpreted by the shell. Redirection allows +commands' file handles to be duplicated, opened, closed, made to refer +to different files, and can change the files the command reads from and +writes to. Redirection may also be used to modify file handles in the +current shell execution environment. The following redirection +operators may precede or appear anywhere within a simple command or may +follow a command. Redirections are processed in the order they appear, +from left to right. + + Each redirection that may be preceded by a file descriptor number may +instead be preceded by a word of the form {VARNAME}. In this case, for +each redirection operator except >&- and <&-, the shell will allocate a +file descriptor greater than 10 and assign it to {VARNAME}. If >&- or +<&- is preceded by {VARNAME}, the value of VARNAME defines the file +descriptor to close. If {VARNAME} is supplied, the redirection persists +beyond the scope of the command, allowing the shell programmer to manage +the file descriptor's lifetime manually. + + In the following descriptions, if the file descriptor number is +omitted, and the first character of the redirection operator is '<', the +redirection refers to the standard input (file descriptor 0). If the +first character of the redirection operator is '>', the redirection +refers to the standard output (file descriptor 1). + + The word following the redirection operator in the following +descriptions, unless otherwise noted, is subjected to brace expansion, +tilde expansion, parameter expansion, command substitution, arithmetic +expansion, quote removal, filename expansion, and word splitting. If it +expands to more than one word, Bash reports an error. + + Note that the order of redirections is significant. For example, the +command + ls > DIRLIST 2>&1 +directs both standard output (file descriptor 1) and standard error +(file descriptor 2) to the file DIRLIST, while the command + ls 2>&1 > DIRLIST +directs only the standard output to file DIRLIST, because the standard +error was made a copy of the standard output before the standard output +was redirected to DIRLIST. + + Bash handles several filenames specially when they are used in +redirections, as described in the following table. If the operating +system on which Bash is running provides these special files, bash will +use them; otherwise it will emulate them internally with the behavior +described below. + +'/dev/fd/FD' + If FD is a valid integer, file descriptor FD is duplicated. + +'/dev/stdin' + File descriptor 0 is duplicated. + +'/dev/stdout' + File descriptor 1 is duplicated. + +'/dev/stderr' + File descriptor 2 is duplicated. + +'/dev/tcp/HOST/PORT' + If HOST is a valid hostname or Internet address, and PORT is an + integer port number or service name, Bash attempts to open the + corresponding TCP socket. + +'/dev/udp/HOST/PORT' + If HOST is a valid hostname or Internet address, and PORT is an + integer port number or service name, Bash attempts to open the + corresponding UDP socket. + + A failure to open or create a file causes the redirection to fail. + + Redirections using file descriptors greater than 9 should be used +with care, as they may conflict with file descriptors the shell uses +internally. + +3.6.1 Redirecting Input +----------------------- + +Redirection of input causes the file whose name results from the +expansion of WORD to be opened for reading on file descriptor 'n', or +the standard input (file descriptor 0) if 'n' is not specified. + + The general format for redirecting input is: + [N][|]WORD + + If the redirection operator is '>', and the 'noclobber' option to the +'set' builtin has been enabled, the redirection will fail if the file +whose name results from the expansion of WORD exists and is a regular +file. If the redirection operator is '>|', or the redirection operator +is '>' and the 'noclobber' option is not enabled, the redirection is +attempted even if the file named by WORD exists. + +3.6.3 Appending Redirected Output +--------------------------------- + +Redirection of output in this fashion causes the file whose name results +from the expansion of WORD to be opened for appending on file descriptor +N, or the standard output (file descriptor 1) if N is not specified. If +the file does not exist it is created. + + The general format for appending output is: + [N]>>WORD + +3.6.4 Redirecting Standard Output and Standard Error +---------------------------------------------------- + +This construct allows both the standard output (file descriptor 1) and +the standard error output (file descriptor 2) to be redirected to the +file whose name is the expansion of WORD. + + There are two formats for redirecting standard output and standard +error: + &>WORD +and + >&WORD +Of the two forms, the first is preferred. This is semantically +equivalent to + >WORD 2>&1 + When using the second form, WORD may not expand to a number or '-'. +If it does, other redirection operators apply (see Duplicating File +Descriptors below) for compatibility reasons. + +3.6.5 Appending Standard Output and Standard Error +-------------------------------------------------- + +This construct allows both the standard output (file descriptor 1) and +the standard error output (file descriptor 2) to be appended to the file +whose name is the expansion of WORD. + + The format for appending standard output and standard error is: + &>>WORD +This is semantically equivalent to + >>WORD 2>&1 + (see Duplicating File Descriptors below). + +3.6.6 Here Documents +-------------------- + +This type of redirection instructs the shell to read input from the +current source until a line containing only WORD (with no trailing +blanks) is seen. All of the lines read up to that point are then used +as the standard input (or file descriptor N if N is specified) for a +command. + + The format of here-documents is: + [N]<<[-]WORD + HERE-DOCUMENT + DELIMITER + + No parameter and variable expansion, command substitution, arithmetic +expansion, or filename expansion is performed on WORD. If any part of +WORD is quoted, the DELIMITER is the result of quote removal on WORD, +and the lines in the here-document are not expanded. If WORD is +unquoted, all lines of the here-document are subjected to parameter +expansion, command substitution, and arithmetic expansion, the character +sequence '\newline' is ignored, and '\' must be used to quote the +characters '\', '$', and '`'. + + If the redirection operator is '<<-', then all leading tab characters +are stripped from input lines and the line containing DELIMITER. This +allows here-documents within shell scripts to be indented in a natural +fashion. + +3.6.7 Here Strings +------------------ + +A variant of here documents, the format is: + [N]<<< WORD + + The WORD undergoes tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. Filename +expansion and word splitting are not performed. The result is supplied +as a single string, with a newline appended, to the command on its +standard input (or file descriptor N if N is specified). + +3.6.8 Duplicating File Descriptors +---------------------------------- + +The redirection operator + [N]<&WORD +is used to duplicate input file descriptors. If WORD expands to one or +more digits, the file descriptor denoted by N is made to be a copy of +that file descriptor. If the digits in WORD do not specify a file +descriptor open for input, a redirection error occurs. If WORD +evaluates to '-', file descriptor N is closed. If N is not specified, +the standard input (file descriptor 0) is used. + + The operator + [N]>&WORD +is used similarly to duplicate output file descriptors. If N is not +specified, the standard output (file descriptor 1) is used. If the +digits in WORD do not specify a file descriptor open for output, a +redirection error occurs. If WORD evaluates to '-', file descriptor N +is closed. As a special case, if N is omitted, and WORD does not expand +to one or more digits or '-', the standard output and standard error are +redirected as described previously. + +3.6.9 Moving File Descriptors +----------------------------- + +The redirection operator + [N]<&DIGIT- +moves the file descriptor DIGIT to file descriptor N, or the standard +input (file descriptor 0) if N is not specified. DIGIT is closed after +being duplicated to N. + + Similarly, the redirection operator + [N]>&DIGIT- +moves the file descriptor DIGIT to file descriptor N, or the standard +output (file descriptor 1) if N is not specified. + +3.6.10 Opening File Descriptors for Reading and Writing +------------------------------------------------------- + +The redirection operator + [N]<>WORD +causes the file whose name is the expansion of WORD to be opened for +both reading and writing on file descriptor N, or on file descriptor 0 +if N is not specified. If the file does not exist, it is created. + + +File: bashref.info, Node: Executing Commands, Next: Shell Scripts, Prev: Redirections, Up: Basic Shell Features + +3.7 Executing Commands +====================== + +* Menu: + +* Simple Command Expansion:: How Bash expands simple commands before + executing them. +* Command Search and Execution:: How Bash finds commands and runs them. +* Command Execution Environment:: The environment in which Bash + executes commands that are not + shell builtins. +* Environment:: The environment given to a command. +* Exit Status:: The status returned by commands and how Bash + interprets it. +* Signals:: What happens when Bash or a command it runs + receives a signal. + + +File: bashref.info, Node: Simple Command Expansion, Next: Command Search and Execution, Up: Executing Commands + +3.7.1 Simple Command Expansion +------------------------------ + +When a simple command is executed, the shell performs the following +expansions, assignments, and redirections, from left to right, in the +following order. + + 1. The words that the parser has marked as variable assignments (those + preceding the command name) and redirections are saved for later + processing. + + 2. The words that are not variable assignments or redirections are + expanded (*note Shell Expansions::). If any words remain after + expansion, the first word is taken to be the name of the command + and the remaining words are the arguments. + + 3. Redirections are performed as described above (*note + Redirections::). + + 4. The text after the '=' in each variable assignment undergoes tilde + expansion, parameter expansion, command substitution, arithmetic + expansion, and quote removal before being assigned to the variable. + + If no command name results, the variable assignments affect the +current shell environment. Otherwise, the variables are added to the +environment of the executed command and do not affect the current shell +environment. If any of the assignments attempts to assign a value to a +readonly variable, an error occurs, and the command exits with a +non-zero status. + + If no command name results, redirections are performed, but do not +affect the current shell environment. A redirection error causes the +command to exit with a non-zero status. + + If there is a command name left after expansion, execution proceeds +as described below. Otherwise, the command exits. If one of the +expansions contained a command substitution, the exit status of the +command is the exit status of the last command substitution performed. +If there were no command substitutions, the command exits with a status +of zero. + + +File: bashref.info, Node: Command Search and Execution, Next: Command Execution Environment, Prev: Simple Command Expansion, Up: Executing Commands + +3.7.2 Command Search and Execution +---------------------------------- + +After a command has been split into words, if it results in a simple +command and an optional list of arguments, the following actions are +taken. + + 1. If the command name contains no slashes, the shell attempts to + locate it. If there exists a shell function by that name, that + function is invoked as described in *note Shell Functions::. + + 2. If the name does not match a function, the shell searches for it in + the list of shell builtins. If a match is found, that builtin is + invoked. + + 3. If the name is neither a shell function nor a builtin, and contains + no slashes, Bash searches each element of '$PATH' for a directory + containing an executable file by that name. Bash uses a hash table + to remember the full pathnames of executable files to avoid + multiple 'PATH' searches (see the description of 'hash' in *note + Bourne Shell Builtins::). A full search of the directories in + '$PATH' is performed only if the command is not found in the hash + table. If the search is unsuccessful, the shell searches for a + defined shell function named 'command_not_found_handle'. If that + function exists, it is invoked in a separate execution environment + with the original command and the original command's arguments as + its arguments, and the function's exit status becomes the exit + status of that subshell. If that function is not defined, the + shell prints an error message and returns an exit status of 127. + + 4. If the search is successful, or if the command name contains one or + more slashes, the shell executes the named program in a separate + execution environment. Argument 0 is set to the name given, and + the remaining arguments to the command are set to the arguments + supplied, if any. + + 5. If this execution fails because the file is not in executable + format, and the file is not a directory, it is assumed to be a + SHELL SCRIPT and the shell executes it as described in *note Shell + Scripts::. + + 6. If the command was not begun asynchronously, the shell waits for + the command to complete and collects its exit status. + + +File: bashref.info, Node: Command Execution Environment, Next: Environment, Prev: Command Search and Execution, Up: Executing Commands + +3.7.3 Command Execution Environment +----------------------------------- + +The shell has an EXECUTION ENVIRONMENT, which consists of the following: + + * open files inherited by the shell at invocation, as modified by + redirections supplied to the 'exec' builtin + + * the current working directory as set by 'cd', 'pushd', or 'popd', + or inherited by the shell at invocation + + * the file creation mode mask as set by 'umask' or inherited from the + shell's parent + + * current traps set by 'trap' + + * shell parameters that are set by variable assignment or with 'set' + or inherited from the shell's parent in the environment + + * shell functions defined during execution or inherited from the + shell's parent in the environment + + * options enabled at invocation (either by default or with + command-line arguments) or by 'set' + + * options enabled by 'shopt' (*note The Shopt Builtin::) + + * shell aliases defined with 'alias' (*note Aliases::) + + * various process IDs, including those of background jobs (*note + Lists::), the value of '$$', and the value of '$PPID' + + When a simple command other than a builtin or shell function is to be +executed, it is invoked in a separate execution environment that +consists of the following. Unless otherwise noted, the values are +inherited from the shell. + + * the shell's open files, plus any modifications and additions + specified by redirections to the command + + * the current working directory + + * the file creation mode mask + + * shell variables and functions marked for export, along with + variables exported for the command, passed in the environment + (*note Environment::) + + * traps caught by the shell are reset to the values inherited from + the shell's parent, and traps ignored by the shell are ignored + + A command invoked in this separate environment cannot affect the +shell's execution environment. + + Command substitution, commands grouped with parentheses, and +asynchronous commands are invoked in a subshell environment that is a +duplicate of the shell environment, except that traps caught by the +shell are reset to the values that the shell inherited from its parent +at invocation. Builtin commands that are invoked as part of a pipeline +are also executed in a subshell environment. Changes made to the +subshell environment cannot affect the shell's execution environment. + + Subshells spawned to execute command substitutions inherit the value +of the '-e' option from the parent shell. When not in POSIX mode, Bash +clears the '-e' option in such subshells. + + If a command is followed by a '&' and job control is not active, the +default standard input for the command is the empty file '/dev/null'. +Otherwise, the invoked command inherits the file descriptors of the +calling shell as modified by redirections. + + +File: bashref.info, Node: Environment, Next: Exit Status, Prev: Command Execution Environment, Up: Executing Commands + +3.7.4 Environment +----------------- + +When a program is invoked it is given an array of strings called the +ENVIRONMENT. This is a list of name-value pairs, of the form +'name=value'. + + Bash provides several ways to manipulate the environment. On +invocation, the shell scans its own environment and creates a parameter +for each name found, automatically marking it for EXPORT to child +processes. Executed commands inherit the environment. The 'export' and +'declare -x' commands allow parameters and functions to be added to and +deleted from the environment. If the value of a parameter in the +environment is modified, the new value becomes part of the environment, +replacing the old. The environment inherited by any executed command +consists of the shell's initial environment, whose values may be +modified in the shell, less any pairs removed by the 'unset' and 'export +-n' commands, plus any additions via the 'export' and 'declare -x' +commands. + + The environment for any simple command or function may be augmented +temporarily by prefixing it with parameter assignments, as described in +*note Shell Parameters::. These assignment statements affect only the +environment seen by that command. + + If the '-k' option is set (*note The Set Builtin::), then all +parameter assignments are placed in the environment for a command, not +just those that precede the command name. + + When Bash invokes an external command, the variable '$_' is set to +the full pathname of the command and passed to that command in its +environment. + + +File: bashref.info, Node: Exit Status, Next: Signals, Prev: Environment, Up: Executing Commands + +3.7.5 Exit Status +----------------- + +The exit status of an executed command is the value returned by the +WAITPID system call or equivalent function. Exit statuses fall between +0 and 255, though, as explained below, the shell may use values above +125 specially. Exit statuses from shell builtins and compound commands +are also limited to this range. Under certain circumstances, the shell +will use special values to indicate specific failure modes. + + For the shell's purposes, a command which exits with a zero exit +status has succeeded. A non-zero exit status indicates failure. This +seemingly counter-intuitive scheme is used so there is one well-defined +way to indicate success and a variety of ways to indicate various +failure modes. When a command terminates on a fatal signal whose number +is N, Bash uses the value 128+N as the exit status. + + If a command is not found, the child process created to execute it +returns a status of 127. If a command is found but is not executable, +the return status is 126. + + If a command fails because of an error during expansion or +redirection, the exit status is greater than zero. + + The exit status is used by the Bash conditional commands (*note +Conditional Constructs::) and some of the list constructs (*note +Lists::). + + All of the Bash builtins return an exit status of zero if they +succeed and a non-zero status on failure, so they may be used by the +conditional and list constructs. All builtins return an exit status of +2 to indicate incorrect usage, generally invalid options or missing +arguments. + + +File: bashref.info, Node: Signals, Prev: Exit Status, Up: Executing Commands + +3.7.6 Signals +------------- + +When Bash is interactive, in the absence of any traps, it ignores +'SIGTERM' (so that 'kill 0' does not kill an interactive shell), and +'SIGINT' is caught and handled (so that the 'wait' builtin is +interruptible). When Bash receives a 'SIGINT', it breaks out of any +executing loops. In all cases, Bash ignores 'SIGQUIT'. If job control +is in effect (*note Job Control::), Bash ignores 'SIGTTIN', 'SIGTTOU', +and 'SIGTSTP'. + + Non-builtin commands started by Bash have signal handlers set to the +values inherited by the shell from its parent. When job control is not +in effect, asynchronous commands ignore 'SIGINT' and 'SIGQUIT' in +addition to these inherited handlers. Commands run as a result of +command substitution ignore the keyboard-generated job control signals +'SIGTTIN', 'SIGTTOU', and 'SIGTSTP'. + + The shell exits by default upon receipt of a 'SIGHUP'. Before +exiting, an interactive shell resends the 'SIGHUP' to all jobs, running +or stopped. Stopped jobs are sent 'SIGCONT' to ensure that they receive +the 'SIGHUP'. To prevent the shell from sending the 'SIGHUP' signal to +a particular job, it should be removed from the jobs table with the +'disown' builtin (*note Job Control Builtins::) or marked to not receive +'SIGHUP' using 'disown -h'. + + If the 'huponexit' shell option has been set with 'shopt' (*note The +Shopt Builtin::), Bash sends a 'SIGHUP' to all jobs when an interactive +login shell exits. + + If Bash is waiting for a command to complete and receives a signal +for which a trap has been set, the trap will not be executed until the +command completes. When Bash is waiting for an asynchronous command via +the 'wait' builtin, the reception of a signal for which a trap has been +set will cause the 'wait' builtin to return immediately with an exit +status greater than 128, immediately after which the trap is executed. + + +File: bashref.info, Node: Shell Scripts, Prev: Executing Commands, Up: Basic Shell Features + +3.8 Shell Scripts +================= + +A shell script is a text file containing shell commands. When such a +file is used as the first non-option argument when invoking Bash, and +neither the '-c' nor '-s' option is supplied (*note Invoking Bash::), +Bash reads and executes commands from the file, then exits. This mode +of operation creates a non-interactive shell. The shell first searches +for the file in the current directory, and looks in the directories in +'$PATH' if not found there. + + When Bash runs a shell script, it sets the special parameter '0' to +the name of the file, rather than the name of the shell, and the +positional parameters are set to the remaining arguments, if any are +given. If no additional arguments are supplied, the positional +parameters are unset. + + A shell script may be made executable by using the 'chmod' command to +turn on the execute bit. When Bash finds such a file while searching +the '$PATH' for a command, it spawns a subshell to execute it. In other +words, executing + filename ARGUMENTS +is equivalent to executing + bash filename ARGUMENTS + +if 'filename' is an executable shell script. This subshell +reinitializes itself, so that the effect is as if a new shell had been +invoked to interpret the script, with the exception that the locations +of commands remembered by the parent (see the description of 'hash' in +*note Bourne Shell Builtins::) are retained by the child. + + Most versions of Unix make this a part of the operating system's +command execution mechanism. If the first line of a script begins with +the two characters '#!', the remainder of the line specifies an +interpreter for the program and, depending on the operating system, one +or more optional arguments for that interpreter. Thus, you can specify +Bash, 'awk', Perl, or some other interpreter and write the rest of the +script file in that language. + + The arguments to the interpreter consist of one or more optional +arguments following the interpreter name on the first line of the script +file, followed by the name of the script file, followed by the rest of +the arguments supplied to the script. The details of how the +interpreter line is split into an interpreter name and a set of +arguments vary across systems. Bash will perform this action on +operating systems that do not handle it themselves. Note that some +older versions of Unix limit the interpreter name and a single argument +to a maximum of 32 characters, so it's not portable to assume that using +more than one argument will work. + + Bash scripts often begin with '#! /bin/bash' (assuming that Bash has +been installed in '/bin'), since this ensures that Bash will be used to +interpret the script, even if it is executed under another shell. It's +a common idiom to use 'env' to find 'bash' even if it's been installed +in another directory: '#!/usr/bin/env bash' will find the first +occurrence of 'bash' in '$PATH'. + + +File: bashref.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev: Basic Shell Features, Up: Top + +4 Shell Builtin Commands +************************ + +* Menu: + +* Bourne Shell Builtins:: Builtin commands inherited from the Bourne + Shell. +* Bash Builtins:: Table of builtins specific to Bash. +* Modifying Shell Behavior:: Builtins to modify shell attributes and + optional behavior. +* Special Builtins:: Builtin commands classified specially by + POSIX. + +Builtin commands are contained within the shell itself. When the name +of a builtin command is used as the first word of a simple command +(*note Simple Commands::), the shell executes the command directly, +without invoking another program. Builtin commands are necessary to +implement functionality impossible or inconvenient to obtain with +separate utilities. + + This section briefly describes the builtins which Bash inherits from +the Bourne Shell, as well as the builtin commands which are unique to or +have been extended in Bash. + + Several builtin commands are described in other chapters: builtin +commands which provide the Bash interface to the job control facilities +(*note Job Control Builtins::), the directory stack (*note Directory +Stack Builtins::), the command history (*note Bash History Builtins::), +and the programmable completion facilities (*note Programmable +Completion Builtins::). + + Many of the builtins have been extended by POSIX or Bash. + + Unless otherwise noted, each builtin command documented as accepting +options preceded by '-' accepts '--' to signify the end of the options. +The ':', 'true', 'false', and 'test'/'[' builtins do not accept options +and do not treat '--' specially. The 'exit', 'logout', 'return', +'break', 'continue', 'let', and 'shift' builtins accept and process +arguments beginning with '-' without requiring '--'. Other builtins +that accept arguments but are not specified as accepting options +interpret arguments beginning with '-' as invalid options and require +'--' to prevent this interpretation. + + +File: bashref.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: Shell Builtin Commands + +4.1 Bourne Shell Builtins +========================= + +The following shell builtin commands are inherited from the Bourne +Shell. These commands are implemented as specified by the POSIX +standard. + +': (a colon)' + : [ARGUMENTS] + + Do nothing beyond expanding ARGUMENTS and performing redirections. + The return status is zero. + +'. (a period)' + . FILENAME [ARGUMENTS] + + Read and execute commands from the FILENAME argument in the current + shell context. If FILENAME does not contain a slash, the 'PATH' + variable is used to find FILENAME. When Bash is not in POSIX mode, + the current directory is searched if FILENAME is not found in + '$PATH'. If any ARGUMENTS are supplied, they become the positional + parameters when FILENAME is executed. Otherwise the positional + parameters are unchanged. If the '-T' option is enabled, 'source' + inherits any trap on 'DEBUG'; if it is not, any 'DEBUG' trap string + is saved and restored around the call to 'source', and 'source' + unsets the 'DEBUG' trap while it executes. If '-T' is not set, and + the sourced file changes the 'DEBUG' trap, the new value is + retained when 'source' completes. The return status is the exit + status of the last command executed, or zero if no commands are + executed. If FILENAME is not found, or cannot be read, the return + status is non-zero. This builtin is equivalent to 'source'. + +'break' + break [N] + + Exit from a 'for', 'while', 'until', or 'select' loop. If N is + supplied, the Nth enclosing loop is exited. N must be greater than + or equal to 1. The return status is zero unless N is not greater + than or equal to 1. + +'cd' + cd [-L|[-P [-e]] [-@] [DIRECTORY] + + Change the current working directory to DIRECTORY. If DIRECTORY is + not supplied, the value of the 'HOME' shell variable is used. Any + additional arguments following DIRECTORY are ignored. If the shell + variable 'CDPATH' exists, it is used as a search path: each + directory name in 'CDPATH' is searched for DIRECTORY, with + alternative directory names in 'CDPATH' separated by a colon (':'). + If DIRECTORY begins with a slash, 'CDPATH' is not used. + + The '-P' option means to not follow symbolic links: symbolic links + are resolved while 'cd' is traversing DIRECTORY and before + processing an instance of '..' in DIRECTORY. + + By default, or when the '-L' option is supplied, symbolic links in + DIRECTORY are resolved after 'cd' processes an instance of '..' in + DIRECTORY. + + If '..' appears in DIRECTORY, it is processed by removing the + immediately preceding pathname component, back to a slash or the + beginning of DIRECTORY. + + If the '-e' option is supplied with '-P' and the current working + directory cannot be successfully determined after a successful + directory change, 'cd' will return an unsuccessful status. + + On systems that support it, the '-@' option presents the extended + attributes associated with a file as a directory. + + If DIRECTORY is '-', it is converted to '$OLDPWD' before the + directory change is attempted. + + If a non-empty directory name from 'CDPATH' is used, or if '-' is + the first argument, and the directory change is successful, the + absolute pathname of the new working directory is written to the + standard output. + + The return status is zero if the directory is successfully changed, + non-zero otherwise. + +'continue' + continue [N] + + Resume the next iteration of an enclosing 'for', 'while', 'until', + or 'select' loop. If N is supplied, the execution of the Nth + enclosing loop is resumed. N must be greater than or equal to 1. + The return status is zero unless N is not greater than or equal to + 1. + +'eval' + eval [ARGUMENTS] + + The arguments are concatenated together into a single command, + which is then read and executed, and its exit status returned as + the exit status of 'eval'. If there are no arguments or only empty + arguments, the return status is zero. + +'exec' + exec [-cl] [-a NAME] [COMMAND [ARGUMENTS]] + + If COMMAND is supplied, it replaces the shell without creating a + new process. If the '-l' option is supplied, the shell places a + dash at the beginning of the zeroth argument passed to COMMAND. + This is what the 'login' program does. The '-c' option causes + COMMAND to be executed with an empty environment. If '-a' is + supplied, the shell passes NAME as the zeroth argument to COMMAND. + If COMMAND cannot be executed for some reason, a non-interactive + shell exits, unless the 'execfail' shell option is enabled. In + that case, it returns failure. An interactive shell returns + failure if the file cannot be executed. A subshell exits + unconditionally if 'exec' fails. If no COMMAND is specified, + redirections may be used to affect the current shell environment. + If there are no redirection errors, the return status is zero; + otherwise the return status is non-zero. + +'exit' + exit [N] + + Exit the shell, returning a status of N to the shell's parent. If + N is omitted, the exit status is that of the last command executed. + Any trap on 'EXIT' is executed before the shell terminates. + +'export' + export [-fn] [-p] [NAME[=VALUE]] + + Mark each NAME to be passed to child processes in the environment. + If the '-f' option is supplied, the NAMEs refer to shell functions; + otherwise the names refer to shell variables. The '-n' option + means to no longer mark each NAME for export. If no NAMES are + supplied, or if the '-p' option is given, a list of names of all + exported variables is displayed. The '-p' option displays output + in a form that may be reused as input. If a variable name is + followed by =VALUE, the value of the variable is set to VALUE. + + The return status is zero unless an invalid option is supplied, one + of the names is not a valid shell variable name, or '-f' is + supplied with a name that is not a shell function. + +'getopts' + getopts OPTSTRING NAME [ARG ...] + + 'getopts' is used by shell scripts to parse positional parameters. + OPTSTRING contains the option characters to be recognized; if a + character is followed by a colon, the option is expected to have an + argument, which should be separated from it by whitespace. The + colon (':') and question mark ('?') may not be used as option + characters. Each time it is invoked, 'getopts' places the next + option in the shell variable NAME, initializing NAME if it does not + exist, and the index of the next argument to be processed into the + variable 'OPTIND'. 'OPTIND' is initialized to 1 each time the + shell or a shell script is invoked. When an option requires an + argument, 'getopts' places that argument into the variable + 'OPTARG'. The shell does not reset 'OPTIND' automatically; it must + be manually reset between multiple calls to 'getopts' within the + same shell invocation if a new set of parameters is to be used. + + When the end of options is encountered, 'getopts' exits with a + return value greater than zero. 'OPTIND' is set to the index of + the first non-option argument, and NAME is set to '?'. + + 'getopts' normally parses the positional parameters, but if more + arguments are supplied as ARG values, 'getopts' parses those + instead. + + 'getopts' can report errors in two ways. If the first character of + OPTSTRING is a colon, SILENT error reporting is used. In normal + operation, diagnostic messages are printed when invalid options or + missing option arguments are encountered. If the variable 'OPTERR' + is set to 0, no error messages will be displayed, even if the first + character of 'optstring' is not a colon. + + If an invalid option is seen, 'getopts' places '?' into NAME and, + if not silent, prints an error message and unsets 'OPTARG'. If + 'getopts' is silent, the option character found is placed in + 'OPTARG' and no diagnostic message is printed. + + If a required argument is not found, and 'getopts' is not silent, a + question mark ('?') is placed in NAME, 'OPTARG' is unset, and a + diagnostic message is printed. If 'getopts' is silent, then a + colon (':') is placed in NAME and 'OPTARG' is set to the option + character found. + +'hash' + hash [-r] [-p FILENAME] [-dt] [NAME] + + Each time 'hash' is invoked, it remembers the full pathnames of the + commands specified as NAME arguments, so they need not be searched + for on subsequent invocations. The commands are found by searching + through the directories listed in '$PATH'. Any + previously-remembered pathname is discarded. The '-p' option + inhibits the path search, and FILENAME is used as the location of + NAME. The '-r' option causes the shell to forget all remembered + locations. The '-d' option causes the shell to forget the + remembered location of each NAME. If the '-t' option is supplied, + the full pathname to which each NAME corresponds is printed. If + multiple NAME arguments are supplied with '-t', the NAME is printed + before the hashed full pathname. The '-l' option causes output to + be displayed in a format that may be reused as input. If no + arguments are given, or if only '-l' is supplied, information about + remembered commands is printed. The return status is zero unless a + NAME is not found or an invalid option is supplied. + +'pwd' + pwd [-LP] + + Print the absolute pathname of the current working directory. If + the '-P' option is supplied, the pathname printed will not contain + symbolic links. If the '-L' option is supplied, the pathname + printed may contain symbolic links. The return status is zero + unless an error is encountered while determining the name of the + current directory or an invalid option is supplied. + +'readonly' + readonly [-aAf] [-p] [NAME[=VALUE]] ... + + Mark each NAME as readonly. The values of these names may not be + changed by subsequent assignment. If the '-f' option is supplied, + each NAME refers to a shell function. The '-a' option means each + NAME refers to an indexed array variable; the '-A' option means + each NAME refers to an associative array variable. If both options + are supplied, '-A' takes precedence. If no NAME arguments are + given, or if the '-p' option is supplied, a list of all readonly + names is printed. The other options may be used to restrict the + output to a subset of the set of readonly names. The '-p' option + causes output to be displayed in a format that may be reused as + input. If a variable name is followed by =VALUE, the value of the + variable is set to VALUE. The return status is zero unless an + invalid option is supplied, one of the NAME arguments is not a + valid shell variable or function name, or the '-f' option is + supplied with a name that is not a shell function. + +'return' + return [N] + + Cause a shell function to stop executing and return the value N to + its caller. If N is not supplied, the return value is the exit + status of the last command executed in the function. If 'return' + is executed by a trap handler, the last command used to determine + the status is the last command executed before the trap handler. + If 'return' is executed during a 'DEBUG' trap, the last command + used to determine the status is the last command executed by the + trap handler before 'return' was invoked. 'return' may also be + used to terminate execution of a script being executed with the '.' + ('source') builtin, returning either N or the exit status of the + last command executed within the script as the exit status of the + script. If N is supplied, the return value is its least + significant 8 bits. Any command associated with the 'RETURN' trap + is executed before execution resumes after the function or script. + The return status is non-zero if 'return' is supplied a non-numeric + argument or is used outside a function and not during the execution + of a script by '.' or 'source'. + +'shift' + shift [N] + + Shift the positional parameters to the left by N. The positional + parameters from N+1 ... '$#' are renamed to '$1' ... '$#'-N. + Parameters represented by the numbers '$#' down to '$#'-N+1 are + unset. N must be a non-negative number less than or equal to '$#'. + If N is zero or greater than '$#', the positional parameters are + not changed. If N is not supplied, it is assumed to be 1. The + return status is zero unless N is greater than '$#' or less than + zero, non-zero otherwise. + +'test' +'[' + test EXPR + + Evaluate a conditional expression EXPR and return a status of 0 + (true) or 1 (false). Each operator and operand must be a separate + argument. Expressions are composed of the primaries described + below in *note Bash Conditional Expressions::. 'test' does not + accept any options, nor does it accept and ignore an argument of + '--' as signifying the end of options. + + When the '[' form is used, the last argument to the command must be + a ']'. + + Expressions may be combined using the following operators, listed + in decreasing order of precedence. The evaluation depends on the + number of arguments; see below. Operator precedence is used when + there are five or more arguments. + + '! EXPR' + True if EXPR is false. + + '( EXPR )' + Returns the value of EXPR. This may be used to override the + normal precedence of operators. + + 'EXPR1 -a EXPR2' + True if both EXPR1 and EXPR2 are true. + + 'EXPR1 -o EXPR2' + True if either EXPR1 or EXPR2 is true. + + The 'test' and '[' builtins evaluate conditional expressions using + a set of rules based on the number of arguments. + + 0 arguments + The expression is false. + + 1 argument + The expression is true if, and only if, the argument is not + null. + + 2 arguments + If the first argument is '!', the expression is true if and + only if the second argument is null. If the first argument is + one of the unary conditional operators (*note Bash Conditional + Expressions::), the expression is true if the unary test is + true. If the first argument is not a valid unary operator, + the expression is false. + + 3 arguments + The following conditions are applied in the order listed. + + 1. If the second argument is one of the binary conditional + operators (*note Bash Conditional Expressions::), the + result of the expression is the result of the binary test + using the first and third arguments as operands. The + '-a' and '-o' operators are considered binary operators + when there are three arguments. + 2. If the first argument is '!', the value is the negation + of the two-argument test using the second and third + arguments. + 3. If the first argument is exactly '(' and the third + argument is exactly ')', the result is the one-argument + test of the second argument. + 4. Otherwise, the expression is false. + + 4 arguments + If the first argument is '!', the result is the negation of + the three-argument expression composed of the remaining + arguments. Otherwise, the expression is parsed and evaluated + according to precedence using the rules listed above. + + 5 or more arguments + The expression is parsed and evaluated according to precedence + using the rules listed above. + + When used with 'test' or '[', the '<' and '>' operators sort + lexicographically using ASCII ordering. + +'times' + times + + Print out the user and system times used by the shell and its + children. The return status is zero. + +'trap' + trap [-lp] [ARG] [SIGSPEC ...] + + The commands in ARG are to be read and executed when the shell + receives signal SIGSPEC. If ARG is absent (and there is a single + SIGSPEC) or equal to '-', each specified signal's disposition is + reset to the value it had when the shell was started. If ARG is + the null string, then the signal specified by each SIGSPEC is + ignored by the shell and commands it invokes. If ARG is not + present and '-p' has been supplied, the shell displays the trap + commands associated with each SIGSPEC. If no arguments are + supplied, or only '-p' is given, 'trap' prints the list of commands + associated with each signal number in a form that may be reused as + shell input. The '-l' option causes the shell to print a list of + signal names and their corresponding numbers. Each SIGSPEC is + either a signal name or a signal number. Signal names are case + insensitive and the 'SIG' prefix is optional. + + If a SIGSPEC is '0' or 'EXIT', ARG is executed when the shell + exits. If a SIGSPEC is 'DEBUG', the command ARG is executed before + every simple command, 'for' command, 'case' command, 'select' + command, every arithmetic 'for' command, and before the first + command executes in a shell function. Refer to the description of + the 'extdebug' option to the 'shopt' builtin (*note The Shopt + Builtin::) for details of its effect on the 'DEBUG' trap. If a + SIGSPEC is 'RETURN', the command ARG is executed each time a shell + function or a script executed with the '.' or 'source' builtins + finishes executing. + + If a SIGSPEC is 'ERR', the command ARG is executed whenever a + pipeline (which may consist of a single simple command), a list, or + a compound command returns a non-zero exit status, subject to the + following conditions. The 'ERR' trap is not executed if the failed + command is part of the command list immediately following an + 'until' or 'while' keyword, part of the test following the 'if' or + 'elif' reserved words, part of a command executed in a '&&' or '||' + list except the command following the final '&&' or '||', any + command in a pipeline but the last, or if the command's return + status is being inverted using '!'. These are the same conditions + obeyed by the 'errexit' ('-e') option. + + Signals ignored upon entry to the shell cannot be trapped or reset. + Trapped signals that are not being ignored are reset to their + original values in a subshell or subshell environment when one is + created. + + The return status is zero unless a SIGSPEC does not specify a valid + signal. + +'umask' + umask [-p] [-S] [MODE] + + Set the shell process's file creation mask to MODE. If MODE begins + with a digit, it is interpreted as an octal number; if not, it is + interpreted as a symbolic mode mask similar to that accepted by the + 'chmod' command. If MODE is omitted, the current value of the mask + is printed. If the '-S' option is supplied without a MODE + argument, the mask is printed in a symbolic format. If the '-p' + option is supplied, and MODE is omitted, the output is in a form + that may be reused as input. The return status is zero if the mode + is successfully changed or if no MODE argument is supplied, and + non-zero otherwise. + + Note that when the mode is interpreted as an octal number, each + number of the umask is subtracted from '7'. Thus, a umask of '022' + results in permissions of '755'. + +'unset' + unset [-fnv] [NAME] + + Remove each variable or function NAME. If the '-v' option is + given, each NAME refers to a shell variable and that variable is + removed. If the '-f' option is given, the NAMEs refer to shell + functions, and the function definition is removed. If the '-n' + option is supplied, and NAME is a variable with the NAMEREF + attribute, NAME will be unset rather than the variable it + references. '-n' has no effect if the '-f' option is supplied. If + no options are supplied, each NAME refers to a variable; if there + is no variable by that name, a function with that name, if any, is + unset. Readonly variables and functions may not be unset. Some + shell variables lose their special behavior if they are unset; such + behavior is noted in the description of the individual variables. + The return status is zero unless a NAME is readonly. + + +File: bashref.info, Node: Bash Builtins, Next: Modifying Shell Behavior, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands + +4.2 Bash Builtin Commands +========================= + +This section describes builtin commands which are unique to or have been +extended in Bash. Some of these commands are specified in the POSIX +standard. + +'alias' + alias [-p] [NAME[=VALUE] ...] + + Without arguments or with the '-p' option, 'alias' prints the list + of aliases on the standard output in a form that allows them to be + reused as input. If arguments are supplied, an alias is defined + for each NAME whose VALUE is given. If no VALUE is given, the name + and value of the alias is printed. Aliases are described in *note + Aliases::. + +'bind' + bind [-m KEYMAP] [-lpsvPSVX] + bind [-m KEYMAP] [-q FUNCTION] [-u FUNCTION] [-r KEYSEQ] + bind [-m KEYMAP] -f FILENAME + bind [-m KEYMAP] -x KEYSEQ:SHELL-COMMAND + bind [-m KEYMAP] KEYSEQ:FUNCTION-NAME + bind [-m KEYMAP] KEYSEQ:READLINE-COMMAND + + Display current Readline (*note Command Line Editing::) key and + function bindings, bind a key sequence to a Readline function or + macro, or set a Readline variable. Each non-option argument is a + command as it would appear in a Readline initialization file (*note + Readline Init File::), but each binding or command must be passed + as a separate argument; e.g., '"\C-x\C-r":re-read-init-file'. + + Options, if supplied, have the following meanings: + + '-m KEYMAP' + Use KEYMAP as the keymap to be affected by the subsequent + bindings. Acceptable KEYMAP names are 'emacs', + 'emacs-standard', 'emacs-meta', 'emacs-ctlx', 'vi', 'vi-move', + 'vi-command', and 'vi-insert'. 'vi' is equivalent to + 'vi-command' ('vi-move' is also a synonym); 'emacs' is + equivalent to 'emacs-standard'. + + '-l' + List the names of all Readline functions. + + '-p' + Display Readline function names and bindings in such a way + that they can be used as input or in a Readline initialization + file. + + '-P' + List current Readline function names and bindings. + + '-v' + Display Readline variable names and values in such a way that + they can be used as input or in a Readline initialization + file. + + '-V' + List current Readline variable names and values. + + '-s' + Display Readline key sequences bound to macros and the strings + they output in such a way that they can be used as input or in + a Readline initialization file. + + '-S' + Display Readline key sequences bound to macros and the strings + they output. + + '-f FILENAME' + Read key bindings from FILENAME. + + '-q FUNCTION' + Query about which keys invoke the named FUNCTION. + + '-u FUNCTION' + Unbind all keys bound to the named FUNCTION. + + '-r KEYSEQ' + Remove any current binding for KEYSEQ. + + '-x KEYSEQ:SHELL-COMMAND' + Cause SHELL-COMMAND to be executed whenever KEYSEQ is entered. + When SHELL-COMMAND is executed, the shell sets the + 'READLINE_LINE' variable to the contents of the Readline line + buffer and the 'READLINE_POINT' and 'READLINE_MARK' variables + to the current location of the insertion point and the saved + insertion point (the MARK), respectively. If the executed + command changes the value of any of 'READLINE_LINE', + 'READLINE_POINT', or 'READLINE_MARK', those new values will be + reflected in the editing state. + + '-X' + List all key sequences bound to shell commands and the + associated commands in a format that can be reused as input. + + The return status is zero unless an invalid option is supplied or + an error occurs. + +'builtin' + builtin [SHELL-BUILTIN [ARGS]] + + Run a shell builtin, passing it ARGS, and return its exit status. + This is useful when defining a shell function with the same name as + a shell builtin, retaining the functionality of the builtin within + the function. The return status is non-zero if SHELL-BUILTIN is + not a shell builtin command. + +'caller' + caller [EXPR] + + Returns the context of any active subroutine call (a shell function + or a script executed with the '.' or 'source' builtins). + + Without EXPR, 'caller' displays the line number and source filename + of the current subroutine call. If a non-negative integer is + supplied as EXPR, 'caller' displays the line number, subroutine + name, and source file corresponding to that position in the current + execution call stack. This extra information may be used, for + example, to print a stack trace. The current frame is frame 0. + + The return value is 0 unless the shell is not executing a + subroutine call or EXPR does not correspond to a valid position in + the call stack. + +'command' + command [-pVv] COMMAND [ARGUMENTS ...] + + Runs COMMAND with ARGUMENTS ignoring any shell function named + COMMAND. Only shell builtin commands or commands found by + searching the 'PATH' are executed. If there is a shell function + named 'ls', running 'command ls' within the function will execute + the external command 'ls' instead of calling the function + recursively. The '-p' option means to use a default value for + 'PATH' that is guaranteed to find all of the standard utilities. + The return status in this case is 127 if COMMAND cannot be found or + an error occurred, and the exit status of COMMAND otherwise. + + If either the '-V' or '-v' option is supplied, a description of + COMMAND is printed. The '-v' option causes a single word + indicating the command or file name used to invoke COMMAND to be + displayed; the '-V' option produces a more verbose description. In + this case, the return status is zero if COMMAND is found, and + non-zero if not. + +'declare' + declare [-aAfFgiIlnrtux] [-p] [NAME[=VALUE] ...] + + Declare variables and give them attributes. If no NAMEs are given, + then display the values of variables instead. + + The '-p' option will display the attributes and values of each + NAME. When '-p' is used with NAME arguments, additional options, + other than '-f' and '-F', are ignored. + + When '-p' is supplied without NAME arguments, 'declare' will + display the attributes and values of all variables having the + attributes specified by the additional options. If no other + options are supplied with '-p', 'declare' will display the + attributes and values of all shell variables. The '-f' option will + restrict the display to shell functions. + + The '-F' option inhibits the display of function definitions; only + the function name and attributes are printed. If the 'extdebug' + shell option is enabled using 'shopt' (*note The Shopt Builtin::), + the source file name and line number where each NAME is defined are + displayed as well. '-F' implies '-f'. + + The '-g' option forces variables to be created or modified at the + global scope, even when 'declare' is executed in a shell function. + It is ignored in all other cases. + + The '-I' option causes local variables to inherit the attributes + (except the NAMEREF attribute) and value of any existing variable + with the same NAME at a surrounding scope. If there is no existing + variable, the local variable is initially unset. + + The following options can be used to restrict output to variables + with the specified attributes or to give variables attributes: + + '-a' + Each NAME is an indexed array variable (*note Arrays::). + + '-A' + Each NAME is an associative array variable (*note Arrays::). + + '-f' + Use function names only. + + '-i' + The variable is to be treated as an integer; arithmetic + evaluation (*note Shell Arithmetic::) is performed when the + variable is assigned a value. + + '-l' + When the variable is assigned a value, all upper-case + characters are converted to lower-case. The upper-case + attribute is disabled. + + '-n' + Give each NAME the NAMEREF attribute, making it a name + reference to another variable. That other variable is defined + by the value of NAME. All references, assignments, and + attribute modifications to NAME, except for those using or + changing the '-n' attribute itself, are performed on the + variable referenced by NAME's value. The nameref attribute + cannot be applied to array variables. + + '-r' + Make NAMEs readonly. These names cannot then be assigned + values by subsequent assignment statements or unset. + + '-t' + Give each NAME the 'trace' attribute. Traced functions + inherit the 'DEBUG' and 'RETURN' traps from the calling shell. + The trace attribute has no special meaning for variables. + + '-u' + When the variable is assigned a value, all lower-case + characters are converted to upper-case. The lower-case + attribute is disabled. + + '-x' + Mark each NAME for export to subsequent commands via the + environment. + + Using '+' instead of '-' turns off the attribute instead, with the + exceptions that '+a' and '+A' may not be used to destroy array + variables and '+r' will not remove the readonly attribute. When + used in a function, 'declare' makes each NAME local, as with the + 'local' command, unless the '-g' option is used. If a variable + name is followed by =VALUE, the value of the variable is set to + VALUE. + + When using '-a' or '-A' and the compound assignment syntax to + create array variables, additional attributes do not take effect + until subsequent assignments. + + The return status is zero unless an invalid option is encountered, + an attempt is made to define a function using '-f foo=bar', an + attempt is made to assign a value to a readonly variable, an + attempt is made to assign a value to an array variable without + using the compound assignment syntax (*note Arrays::), one of the + NAMES is not a valid shell variable name, an attempt is made to + turn off readonly status for a readonly variable, an attempt is + made to turn off array status for an array variable, or an attempt + is made to display a non-existent function with '-f'. + +'echo' + echo [-neE] [ARG ...] + + Output the ARGs, separated by spaces, terminated with a newline. + The return status is 0 unless a write error occurs. If '-n' is + specified, the trailing newline is suppressed. If the '-e' option + is given, interpretation of the following backslash-escaped + characters is enabled. The '-E' option disables the interpretation + of these escape characters, even on systems where they are + interpreted by default. The 'xpg_echo' shell option may be used to + dynamically determine whether or not 'echo' expands these escape + characters by default. 'echo' does not interpret '--' to mean the + end of options. + + 'echo' interprets the following escape sequences: + '\a' + alert (bell) + '\b' + backspace + '\c' + suppress further output + '\e' + '\E' + escape + '\f' + form feed + '\n' + new line + '\r' + carriage return + '\t' + horizontal tab + '\v' + vertical tab + '\\' + backslash + '\0NNN' + the eight-bit character whose value is the octal value NNN + (zero to three octal digits) + '\xHH' + the eight-bit character whose value is the hexadecimal value + HH (one or two hex digits) + '\uHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHH (one to four hex digits) + '\UHHHHHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHHHHHH (one to eight hex digits) + +'enable' + enable [-a] [-dnps] [-f FILENAME] [NAME ...] + + Enable and disable builtin shell commands. Disabling a builtin + allows a disk command which has the same name as a shell builtin to + be executed without specifying a full pathname, even though the + shell normally searches for builtins before disk commands. If '-n' + is used, the NAMEs become disabled. Otherwise NAMEs are enabled. + For example, to use the 'test' binary found via '$PATH' instead of + the shell builtin version, type 'enable -n test'. + + If the '-p' option is supplied, or no NAME arguments appear, a list + of shell builtins is printed. With no other arguments, the list + consists of all enabled shell builtins. The '-a' option means to + list each builtin with an indication of whether or not it is + enabled. + + The '-f' option means to load the new builtin command NAME from + shared object FILENAME, on systems that support dynamic loading. + The '-d' option will delete a builtin loaded with '-f'. + + If there are no options, a list of the shell builtins is displayed. + The '-s' option restricts 'enable' to the POSIX special builtins. + If '-s' is used with '-f', the new builtin becomes a special + builtin (*note Special Builtins::). + + The return status is zero unless a NAME is not a shell builtin or + there is an error loading a new builtin from a shared object. + +'help' + help [-dms] [PATTERN] + + Display helpful information about builtin commands. If PATTERN is + specified, 'help' gives detailed help on all commands matching + PATTERN, otherwise a list of the builtins is printed. + + Options, if supplied, have the following meanings: + + '-d' + Display a short description of each PATTERN + '-m' + Display the description of each PATTERN in a manpage-like + format + '-s' + Display only a short usage synopsis for each PATTERN + + The return status is zero unless no command matches PATTERN. + +'let' + let EXPRESSION [EXPRESSION ...] + + The 'let' builtin allows arithmetic to be performed on shell + variables. Each EXPRESSION is evaluated according to the rules + given below in *note Shell Arithmetic::. If the last EXPRESSION + evaluates to 0, 'let' returns 1; otherwise 0 is returned. + +'local' + local [OPTION] NAME[=VALUE] ... + + For each argument, a local variable named NAME is created, and + assigned VALUE. The OPTION can be any of the options accepted by + 'declare'. 'local' can only be used within a function; it makes + the variable NAME have a visible scope restricted to that function + and its children. If NAME is '-', the set of shell options is made + local to the function in which 'local' is invoked: shell options + changed using the 'set' builtin inside the function are restored to + their original values when the function returns. The restore is + effected as if a series of 'set' commands were executed to restore + the values that were in place before the function. The return + status is zero unless 'local' is used outside a function, an + invalid NAME is supplied, or NAME is a readonly variable. + +'logout' + logout [N] + + Exit a login shell, returning a status of N to the shell's parent. + +'mapfile' + mapfile [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT] + [-t] [-u FD] [-C CALLBACK] [-c QUANTUM] [ARRAY] + + Read lines from the standard input into the indexed array variable + ARRAY, or from file descriptor FD if the '-u' option is supplied. + The variable 'MAPFILE' is the default ARRAY. Options, if supplied, + have the following meanings: + + '-d' + The first character of DELIM is used to terminate each input + line, rather than newline. If DELIM is the empty string, + 'mapfile' will terminate a line when it reads a NUL character. + '-n' + Copy at most COUNT lines. If COUNT is 0, all lines are + copied. + '-O' + Begin assigning to ARRAY at index ORIGIN. The default index + is 0. + '-s' + Discard the first COUNT lines read. + '-t' + Remove a trailing DELIM (default newline) from each line read. + '-u' + Read lines from file descriptor FD instead of the standard + input. + '-C' + Evaluate CALLBACK each time QUANTUM lines are read. The '-c' + option specifies QUANTUM. + '-c' + Specify the number of lines read between each call to + CALLBACK. + + If '-C' is specified without '-c', the default quantum is 5000. + When CALLBACK is evaluated, it is supplied the index of the next + array element to be assigned and the line to be assigned to that + element as additional arguments. CALLBACK is evaluated after the + line is read but before the array element is assigned. + + If not supplied with an explicit origin, 'mapfile' will clear ARRAY + before assigning to it. + + 'mapfile' returns successfully unless an invalid option or option + argument is supplied, ARRAY is invalid or unassignable, or ARRAY is + not an indexed array. + +'printf' + printf [-v VAR] FORMAT [ARGUMENTS] + + Write the formatted ARGUMENTS to the standard output under the + control of the FORMAT. The '-v' option causes the output to be + assigned to the variable VAR rather than being printed to the + standard output. + + The FORMAT is a character string which contains three types of + objects: plain characters, which are simply copied to standard + output, character escape sequences, which are converted and copied + to the standard output, and format specifications, each of which + causes printing of the next successive ARGUMENT. In addition to + the standard 'printf(1)' formats, 'printf' interprets the following + extensions: + + '%b' + Causes 'printf' to expand backslash escape sequences in the + corresponding ARGUMENT in the same way as 'echo -e' (*note + Bash Builtins::). + '%q' + Causes 'printf' to output the corresponding ARGUMENT in a + format that can be reused as shell input. + '%(DATEFMT)T' + Causes 'printf' to output the date-time string resulting from + using DATEFMT as a format string for 'strftime'(3). The + corresponding ARGUMENT is an integer representing the number + of seconds since the epoch. Two special argument values may + be used: -1 represents the current time, and -2 represents the + time the shell was invoked. If no argument is specified, + conversion behaves as if -1 had been given. This is an + exception to the usual 'printf' behavior. + + The %b, %q, and %T directives all use the field width and precision + arguments from the format specification and write that many bytes + from (or use that wide a field for) the expanded argument, which + usually contains more characters than the original. + + Arguments to non-string format specifiers are treated as C language + constants, except that a leading plus or minus sign is allowed, and + if the leading character is a single or double quote, the value is + the ASCII value of the following character. + + The FORMAT is reused as necessary to consume all of the ARGUMENTS. + If the FORMAT requires more ARGUMENTS than are supplied, the extra + format specifications behave as if a zero value or null string, as + appropriate, had been supplied. The return value is zero on + success, non-zero on failure. + +'read' + read [-ers] [-a ANAME] [-d DELIM] [-i TEXT] [-n NCHARS] + [-N NCHARS] [-p PROMPT] [-t TIMEOUT] [-u FD] [NAME ...] + + One line is read from the standard input, or from the file + descriptor FD supplied as an argument to the '-u' option, split + into words as described above in *note Word Splitting::, and the + first word is assigned to the first NAME, the second word to the + second NAME, and so on. If there are more words than names, the + remaining words and their intervening delimiters are assigned to + the last NAME. If there are fewer words read from the input stream + than names, the remaining names are assigned empty values. The + characters in the value of the 'IFS' variable are used to split the + line into words using the same rules the shell uses for expansion + (described above in *note Word Splitting::). The backslash + character '\' may be used to remove any special meaning for the + next character read and for line continuation. + + Options, if supplied, have the following meanings: + + '-a ANAME' + The words are assigned to sequential indices of the array + variable ANAME, starting at 0. All elements are removed from + ANAME before the assignment. Other NAME arguments are + ignored. + + '-d DELIM' + The first character of DELIM is used to terminate the input + line, rather than newline. If DELIM is the empty string, + 'read' will terminate a line when it reads a NUL character. + + '-e' + Readline (*note Command Line Editing::) is used to obtain the + line. Readline uses the current (or default, if line editing + was not previously active) editing settings, but uses + Readline's default filename completion. + + '-i TEXT' + If Readline is being used to read the line, TEXT is placed + into the editing buffer before editing begins. + + '-n NCHARS' + 'read' returns after reading NCHARS characters rather than + waiting for a complete line of input, but honors a delimiter + if fewer than NCHARS characters are read before the delimiter. + + '-N NCHARS' + 'read' returns after reading exactly NCHARS characters rather + than waiting for a complete line of input, unless EOF is + encountered or 'read' times out. Delimiter characters + encountered in the input are not treated specially and do not + cause 'read' to return until NCHARS characters are read. The + result is not split on the characters in 'IFS'; the intent is + that the variable is assigned exactly the characters read + (with the exception of backslash; see the '-r' option below). + + '-p PROMPT' + Display PROMPT, without a trailing newline, before attempting + to read any input. The prompt is displayed only if input is + coming from a terminal. + + '-r' + If this option is given, backslash does not act as an escape + character. The backslash is considered to be part of the + line. In particular, a backslash-newline pair may not then be + used as a line continuation. + + '-s' + Silent mode. If input is coming from a terminal, characters + are not echoed. + + '-t TIMEOUT' + Cause 'read' to time out and return failure if a complete line + of input (or a specified number of characters) is not read + within TIMEOUT seconds. TIMEOUT may be a decimal number with + a fractional portion following the decimal point. This option + is only effective if 'read' is reading input from a terminal, + pipe, or other special file; it has no effect when reading + from regular files. If 'read' times out, 'read' saves any + partial input read into the specified variable NAME. If + TIMEOUT is 0, 'read' returns immediately, without trying to + read any data. The exit status is 0 if input is available on + the specified file descriptor, non-zero otherwise. The exit + status is greater than 128 if the timeout is exceeded. + + '-u FD' + Read input from file descriptor FD. + + If no NAMEs are supplied, the line read, without the ending + delimiter but otherwise unmodified, is assigned to the variable + 'REPLY'. The exit status is zero, unless end-of-file is + encountered, 'read' times out (in which case the status is greater + than 128), a variable assignment error (such as assigning to a + readonly variable) occurs, or an invalid file descriptor is + supplied as the argument to '-u'. + +'readarray' + readarray [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT] + [-t] [-u FD] [-C CALLBACK] [-c QUANTUM] [ARRAY] + + Read lines from the standard input into the indexed array variable + ARRAY, or from file descriptor FD if the '-u' option is supplied. + + A synonym for 'mapfile'. + +'source' + source FILENAME + + A synonym for '.' (*note Bourne Shell Builtins::). + +'type' + type [-afptP] [NAME ...] + + For each NAME, indicate how it would be interpreted if used as a + command name. + + If the '-t' option is used, 'type' prints a single word which is + one of 'alias', 'function', 'builtin', 'file' or 'keyword', if NAME + is an alias, shell function, shell builtin, disk file, or shell + reserved word, respectively. If the NAME is not found, then + nothing is printed, and 'type' returns a failure status. + + If the '-p' option is used, 'type' either returns the name of the + disk file that would be executed, or nothing if '-t' would not + return 'file'. + + The '-P' option forces a path search for each NAME, even if '-t' + would not return 'file'. + + If a command is hashed, '-p' and '-P' print the hashed value, which + is not necessarily the file that appears first in '$PATH'. + + If the '-a' option is used, 'type' returns all of the places that + contain an executable named FILE. This includes aliases and + functions, if and only if the '-p' option is not also used. + + If the '-f' option is used, 'type' does not attempt to find shell + functions, as with the 'command' builtin. + + The return status is zero if all of the NAMES are found, non-zero + if any are not found. + +'typeset' + typeset [-afFgrxilnrtux] [-p] [NAME[=VALUE] ...] + + The 'typeset' command is supplied for compatibility with the Korn + shell. It is a synonym for the 'declare' builtin command. + +'ulimit' + ulimit [-HS] -a + ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [LIMIT] + + 'ulimit' provides control over the resources available to processes + started by the shell, on systems that allow such control. If an + option is given, it is interpreted as follows: + + '-S' + Change and report the soft limit associated with a resource. + + '-H' + Change and report the hard limit associated with a resource. + + '-a' + All current limits are reported; no limits are set. + + '-b' + The maximum socket buffer size. + + '-c' + The maximum size of core files created. + + '-d' + The maximum size of a process's data segment. + + '-e' + The maximum scheduling priority ("nice"). + + '-f' + The maximum size of files written by the shell and its + children. + + '-i' + The maximum number of pending signals. + + '-k' + The maximum number of kqueues that may be allocated. + + '-l' + The maximum size that may be locked into memory. + + '-m' + The maximum resident set size (many systems do not honor this + limit). + + '-n' + The maximum number of open file descriptors (most systems do + not allow this value to be set). + + '-p' + The pipe buffer size. + + '-q' + The maximum number of bytes in POSIX message queues. + + '-r' + The maximum real-time scheduling priority. + + '-s' + The maximum stack size. + + '-t' + The maximum amount of cpu time in seconds. + + '-u' + The maximum number of processes available to a single user. + + '-v' + The maximum amount of virtual memory available to the shell, + and, on some systems, to its children. + + '-x' + The maximum number of file locks. + + '-P' + The maximum number of pseudoterminals. + + '-R' + The maximum time a real-time process can run before blocking, + in microseconds. + + '-T' + The maximum number of threads. + + If LIMIT is given, and the '-a' option is not used, LIMIT is the + new value of the specified resource. The special LIMIT values + 'hard', 'soft', and 'unlimited' stand for the current hard limit, + the current soft limit, and no limit, respectively. A hard limit + cannot be increased by a non-root user once it is set; a soft limit + may be increased up to the value of the hard limit. Otherwise, the + current value of the soft limit for the specified resource is + printed, unless the '-H' option is supplied. When more than one + resource is specified, the limit name and unit, if appropriate, are + printed before the value. When setting new limits, if neither '-H' + nor '-S' is supplied, both the hard and soft limits are set. If no + option is given, then '-f' is assumed. Values are in 1024-byte + increments, except for '-t', which is in seconds; '-R', which is in + microseconds; '-p', which is in units of 512-byte blocks; '-P', + '-T', '-b', '-k', '-n' and '-u', which are unscaled values; and, + when in POSIX Mode (*note Bash POSIX Mode::), '-c' and '-f', which + are in 512-byte increments. + + The return status is zero unless an invalid option or argument is + supplied, or an error occurs while setting a new limit. + +'unalias' + unalias [-a] [NAME ... ] + + Remove each NAME from the list of aliases. If '-a' is supplied, + all aliases are removed. Aliases are described in *note Aliases::. + + +File: bashref.info, Node: Modifying Shell Behavior, Next: Special Builtins, Prev: Bash Builtins, Up: Shell Builtin Commands + +4.3 Modifying Shell Behavior +============================ + +* Menu: + +* The Set Builtin:: Change the values of shell attributes and + positional parameters. +* The Shopt Builtin:: Modify shell optional behavior. + + +File: bashref.info, Node: The Set Builtin, Next: The Shopt Builtin, Up: Modifying Shell Behavior + +4.3.1 The Set Builtin +--------------------- + +This builtin is so complicated that it deserves its own section. 'set' +allows you to change the values of shell options and set the positional +parameters, or to display the names and values of shell variables. + +'set' + set [--abefhkmnptuvxBCEHPT] [-o OPTION-NAME] [ARGUMENT ...] + set [+abefhkmnptuvxBCEHPT] [+o OPTION-NAME] [ARGUMENT ...] + + If no options or arguments are supplied, 'set' displays the names + and values of all shell variables and functions, sorted according + to the current locale, in a format that may be reused as input for + setting or resetting the currently-set variables. Read-only + variables cannot be reset. In POSIX mode, only shell variables are + listed. + + When options are supplied, they set or unset shell attributes. + Options, if specified, have the following meanings: + + '-a' + Each variable or function that is created or modified is given + the export attribute and marked for export to the environment + of subsequent commands. + + '-b' + Cause the status of terminated background jobs to be reported + immediately, rather than before printing the next primary + prompt. + + '-e' + Exit immediately if a pipeline (*note Pipelines::), which may + consist of a single simple command (*note Simple Commands::), + a list (*note Lists::), or a compound command (*note Compound + Commands::) returns a non-zero status. The shell does not + exit if the command that fails is part of the command list + immediately following a 'while' or 'until' keyword, part of + the test in an 'if' statement, part of any command executed in + a '&&' or '||' list except the command following the final + '&&' or '||', any command in a pipeline but the last, or if + the command's return status is being inverted with '!'. If a + compound command other than a subshell returns a non-zero + status because a command failed while '-e' was being ignored, + the shell does not exit. A trap on 'ERR', if set, is executed + before the shell exits. + + This option applies to the shell environment and each subshell + environment separately (*note Command Execution + Environment::), and may cause subshells to exit before + executing all the commands in the subshell. + + If a compound command or shell function executes in a context + where '-e' is being ignored, none of the commands executed + within the compound command or function body will be affected + by the '-e' setting, even if '-e' is set and a command returns + a failure status. If a compound command or shell function + sets '-e' while executing in a context where '-e' is ignored, + that setting will not have any effect until the compound + command or the command containing the function call completes. + + '-f' + Disable filename expansion (globbing). + + '-h' + Locate and remember (hash) commands as they are looked up for + execution. This option is enabled by default. + + '-k' + All arguments in the form of assignment statements are placed + in the environment for a command, not just those that precede + the command name. + + '-m' + Job control is enabled (*note Job Control::). All processes + run in a separate process group. When a background job + completes, the shell prints a line containing its exit status. + + '-n' + Read commands but do not execute them. This may be used to + check a script for syntax errors. This option is ignored by + interactive shells. + + '-o OPTION-NAME' + + Set the option corresponding to OPTION-NAME: + + 'allexport' + Same as '-a'. + + 'braceexpand' + Same as '-B'. + + 'emacs' + Use an 'emacs'-style line editing interface (*note + Command Line Editing::). This also affects the editing + interface used for 'read -e'. + + 'errexit' + Same as '-e'. + + 'errtrace' + Same as '-E'. + + 'functrace' + Same as '-T'. + + 'hashall' + Same as '-h'. + + 'histexpand' + Same as '-H'. + + 'history' + Enable command history, as described in *note Bash + History Facilities::. This option is on by default in + interactive shells. + + 'ignoreeof' + An interactive shell will not exit upon reading EOF. + + 'keyword' + Same as '-k'. + + 'monitor' + Same as '-m'. + + 'noclobber' + Same as '-C'. + + 'noexec' + Same as '-n'. + + 'noglob' + Same as '-f'. + + 'nolog' + Currently ignored. + + 'notify' + Same as '-b'. + + 'nounset' + Same as '-u'. + + 'onecmd' + Same as '-t'. + + 'physical' + Same as '-P'. + + 'pipefail' + If set, the return value of a pipeline is the value of + the last (rightmost) command to exit with a non-zero + status, or zero if all commands in the pipeline exit + successfully. This option is disabled by default. + + 'posix' + Change the behavior of Bash where the default operation + differs from the POSIX standard to match the standard + (*note Bash POSIX Mode::). This is intended to make Bash + behave as a strict superset of that standard. + + 'privileged' + Same as '-p'. + + 'verbose' + Same as '-v'. + + 'vi' + Use a 'vi'-style line editing interface. This also + affects the editing interface used for 'read -e'. + + 'xtrace' + Same as '-x'. + + '-p' + Turn on privileged mode. In this mode, the '$BASH_ENV' and + '$ENV' files are not processed, shell functions are not + inherited from the environment, and the 'SHELLOPTS', + 'BASHOPTS', 'CDPATH' and 'GLOBIGNORE' variables, if they + appear in the environment, are ignored. If the shell is + started with the effective user (group) id not equal to the + real user (group) id, and the '-p' option is not supplied, + these actions are taken and the effective user id is set to + the real user id. If the '-p' option is supplied at startup, + the effective user id is not reset. Turning this option off + causes the effective user and group ids to be set to the real + user and group ids. + + '-t' + Exit after reading and executing one command. + + '-u' + Treat unset variables and parameters other than the special + parameters '@' or '*' as an error when performing parameter + expansion. An error message will be written to the standard + error, and a non-interactive shell will exit. + + '-v' + Print shell input lines as they are read. + + '-x' + Print a trace of simple commands, 'for' commands, 'case' + commands, 'select' commands, and arithmetic 'for' commands and + their arguments or associated word lists after they are + expanded and before they are executed. The value of the 'PS4' + variable is expanded and the resultant value is printed before + the command and its expanded arguments. + + '-B' + The shell will perform brace expansion (*note Brace + Expansion::). This option is on by default. + + '-C' + Prevent output redirection using '>', '>&', and '<>' from + overwriting existing files. + + '-E' + If set, any trap on 'ERR' is inherited by shell functions, + command substitutions, and commands executed in a subshell + environment. The 'ERR' trap is normally not inherited in such + cases. + + '-H' + Enable '!' style history substitution (*note History + Interaction::). This option is on by default for interactive + shells. + + '-P' + If set, do not resolve symbolic links when performing commands + such as 'cd' which change the current directory. The physical + directory is used instead. By default, Bash follows the + logical chain of directories when performing commands which + change the current directory. + + For example, if '/usr/sys' is a symbolic link to + '/usr/local/sys' then: + $ cd /usr/sys; echo $PWD + /usr/sys + $ cd ..; pwd + /usr + + If 'set -P' is on, then: + $ cd /usr/sys; echo $PWD + /usr/local/sys + $ cd ..; pwd + /usr/local + + '-T' + If set, any trap on 'DEBUG' and 'RETURN' are inherited by + shell functions, command substitutions, and commands executed + in a subshell environment. The 'DEBUG' and 'RETURN' traps are + normally not inherited in such cases. + + '--' + If no arguments follow this option, then the positional + parameters are unset. Otherwise, the positional parameters + are set to the ARGUMENTS, even if some of them begin with a + '-'. + + '-' + Signal the end of options, cause all remaining ARGUMENTS to be + assigned to the positional parameters. The '-x' and '-v' + options are turned off. If there are no arguments, the + positional parameters remain unchanged. + + Using '+' rather than '-' causes these options to be turned off. + The options can also be used upon invocation of the shell. The + current set of options may be found in '$-'. + + The remaining N ARGUMENTS are positional parameters and are + assigned, in order, to '$1', '$2', ... '$N'. The special parameter + '#' is set to N. + + The return status is always zero unless an invalid option is + supplied. + + +File: bashref.info, Node: The Shopt Builtin, Prev: The Set Builtin, Up: Modifying Shell Behavior + +4.3.2 The Shopt Builtin +----------------------- + +This builtin allows you to change additional shell optional behavior. + +'shopt' + shopt [-pqsu] [-o] [OPTNAME ...] + + Toggle the values of settings controlling optional shell behavior. + The settings can be either those listed below, or, if the '-o' + option is used, those available with the '-o' option to the 'set' + builtin command (*note The Set Builtin::). With no options, or + with the '-p' option, a list of all settable options is displayed, + with an indication of whether or not each is set; if OPTNAMES are + supplied, the output is restricted to those options. The '-p' + option causes output to be displayed in a form that may be reused + as input. Other options have the following meanings: + + '-s' + Enable (set) each OPTNAME. + + '-u' + Disable (unset) each OPTNAME. + + '-q' + Suppresses normal output; the return status indicates whether + the OPTNAME is set or unset. If multiple OPTNAME arguments + are given with '-q', the return status is zero if all OPTNAMES + are enabled; non-zero otherwise. + + '-o' + Restricts the values of OPTNAME to be those defined for the + '-o' option to the 'set' builtin (*note The Set Builtin::). + + If either '-s' or '-u' is used with no OPTNAME arguments, 'shopt' + shows only those options which are set or unset, respectively. + + Unless otherwise noted, the 'shopt' options are disabled (off) by + default. + + The return status when listing options is zero if all OPTNAMES are + enabled, non-zero otherwise. When setting or unsetting options, + the return status is zero unless an OPTNAME is not a valid shell + option. + + The list of 'shopt' options is: + + 'assoc_expand_once' + If set, the shell suppresses multiple evaluation of + associative array subscripts during arithmetic expression + evaluation, while executing builtins that can perform variable + assignments, and while executing builtins that perform array + dereferencing. + + 'autocd' + If set, a command name that is the name of a directory is + executed as if it were the argument to the 'cd' command. This + option is only used by interactive shells. + + 'cdable_vars' + If this is set, an argument to the 'cd' builtin command that + is not a directory is assumed to be the name of a variable + whose value is the directory to change to. + + 'cdspell' + If set, minor errors in the spelling of a directory component + in a 'cd' command will be corrected. The errors checked for + are transposed characters, a missing character, and a + character too many. If a correction is found, the corrected + path is printed, and the command proceeds. This option is + only used by interactive shells. + + 'checkhash' + If this is set, Bash checks that a command found in the hash + table exists before trying to execute it. If a hashed command + no longer exists, a normal path search is performed. + + 'checkjobs' + If set, Bash lists the status of any stopped and running jobs + before exiting an interactive shell. If any jobs are running, + this causes the exit to be deferred until a second exit is + attempted without an intervening command (*note Job + Control::). The shell always postpones exiting if any jobs + are stopped. + + 'checkwinsize' + If set, Bash checks the window size after each external + (non-builtin) command and, if necessary, updates the values of + 'LINES' and 'COLUMNS'. This option is enabled by default. + + 'cmdhist' + If set, Bash attempts to save all lines of a multiple-line + command in the same history entry. This allows easy + re-editing of multi-line commands. This option is enabled by + default, but only has an effect if command history is enabled + (*note Bash History Facilities::). + + 'compat31' + 'compat32' + 'compat40' + 'compat41' + 'compat42' + 'compat43' + 'compat44' + These control aspects of the shell's compatibility mode (*note + Shell Compatibility Mode::). + + 'complete_fullquote' + If set, Bash quotes all shell metacharacters in filenames and + directory names when performing completion. If not set, Bash + removes metacharacters such as the dollar sign from the set of + characters that will be quoted in completed filenames when + these metacharacters appear in shell variable references in + words to be completed. This means that dollar signs in + variable names that expand to directories will not be quoted; + however, any dollar signs appearing in filenames will not be + quoted, either. This is active only when bash is using + backslashes to quote completed filenames. This variable is + set by default, which is the default Bash behavior in versions + through 4.2. + + 'direxpand' + If set, Bash replaces directory names with the results of word + expansion when performing filename completion. This changes + the contents of the readline editing buffer. If not set, Bash + attempts to preserve what the user typed. + + 'dirspell' + If set, Bash attempts spelling correction on directory names + during word completion if the directory name initially + supplied does not exist. + + 'dotglob' + If set, Bash includes filenames beginning with a '.' in the + results of filename expansion. The filenames '.' and '..' + must always be matched explicitly, even if 'dotglob' is set. + + 'execfail' + If this is set, a non-interactive shell will not exit if it + cannot execute the file specified as an argument to the 'exec' + builtin command. An interactive shell does not exit if 'exec' + fails. + + 'expand_aliases' + If set, aliases are expanded as described below under Aliases, + *note Aliases::. This option is enabled by default for + interactive shells. + + 'extdebug' + If set at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the '--debugger' option. If set after + invocation, behavior intended for use by debuggers is enabled: + + 1. The '-F' option to the 'declare' builtin (*note Bash + Builtins::) displays the source file name and line number + corresponding to each function name supplied as an + argument. + + 2. If the command run by the 'DEBUG' trap returns a non-zero + value, the next command is skipped and not executed. + + 3. If the command run by the 'DEBUG' trap returns a value of + 2, and the shell is executing in a subroutine (a shell + function or a shell script executed by the '.' or + 'source' builtins), the shell simulates a call to + 'return'. + + 4. 'BASH_ARGC' and 'BASH_ARGV' are updated as described in + their descriptions (*note Bash Variables::). + + 5. Function tracing is enabled: command substitution, shell + functions, and subshells invoked with '( COMMAND )' + inherit the 'DEBUG' and 'RETURN' traps. + + 6. Error tracing is enabled: command substitution, shell + functions, and subshells invoked with '( COMMAND )' + inherit the 'ERR' trap. + + 'extglob' + If set, the extended pattern matching features described above + (*note Pattern Matching::) are enabled. + + 'extquote' + If set, '$'STRING'' and '$"STRING"' quoting is performed + within '${PARAMETER}' expansions enclosed in double quotes. + This option is enabled by default. + + 'failglob' + If set, patterns which fail to match filenames during filename + expansion result in an expansion error. + + 'force_fignore' + If set, the suffixes specified by the 'FIGNORE' shell variable + cause words to be ignored when performing word completion even + if the ignored words are the only possible completions. *Note + Bash Variables::, for a description of 'FIGNORE'. This option + is enabled by default. + + 'globasciiranges' + If set, range expressions used in pattern matching bracket + expressions (*note Pattern Matching::) behave as if in the + traditional C locale when performing comparisons. That is, + the current locale's collating sequence is not taken into + account, so 'b' will not collate between 'A' and 'B', and + upper-case and lower-case ASCII characters will collate + together. + + 'globstar' + If set, the pattern '**' used in a filename expansion context + will match all files and zero or more directories and + subdirectories. If the pattern is followed by a '/', only + directories and subdirectories match. + + 'gnu_errfmt' + If set, shell error messages are written in the standard GNU + error message format. + + 'histappend' + If set, the history list is appended to the file named by the + value of the 'HISTFILE' variable when the shell exits, rather + than overwriting the file. + + 'histreedit' + If set, and Readline is being used, a user is given the + opportunity to re-edit a failed history substitution. + + 'histverify' + If set, and Readline is being used, the results of history + substitution are not immediately passed to the shell parser. + Instead, the resulting line is loaded into the Readline + editing buffer, allowing further modification. + + 'hostcomplete' + If set, and Readline is being used, Bash will attempt to + perform hostname completion when a word containing a '@' is + being completed (*note Commands For Completion::). This + option is enabled by default. + + 'huponexit' + If set, Bash will send 'SIGHUP' to all jobs when an + interactive login shell exits (*note Signals::). + + 'inherit_errexit' + If set, command substitution inherits the value of the + 'errexit' option, instead of unsetting it in the subshell + environment. This option is enabled when POSIX mode is + enabled. + + 'interactive_comments' + Allow a word beginning with '#' to cause that word and all + remaining characters on that line to be ignored in an + interactive shell. This option is enabled by default. + + 'lastpipe' + If set, and job control is not active, the shell runs the last + command of a pipeline not executed in the background in the + current shell environment. + + 'lithist' + If enabled, and the 'cmdhist' option is enabled, multi-line + commands are saved to the history with embedded newlines + rather than using semicolon separators where possible. + + 'localvar_inherit' + If set, local variables inherit the value and attributes of a + variable of the same name that exists at a previous scope + before any new value is assigned. The NAMEREF attribute is + not inherited. + + 'localvar_unset' + If set, calling 'unset' on local variables in previous + function scopes marks them so subsequent lookups find them + unset until that function returns. This is identical to the + behavior of unsetting local variables at the current function + scope. + + 'login_shell' + The shell sets this option if it is started as a login shell + (*note Invoking Bash::). The value may not be changed. + + 'mailwarn' + If set, and a file that Bash is checking for mail has been + accessed since the last time it was checked, the message '"The + mail in MAILFILE has been read"' is displayed. + + 'no_empty_cmd_completion' + If set, and Readline is being used, Bash will not attempt to + search the 'PATH' for possible completions when completion is + attempted on an empty line. + + 'nocaseglob' + If set, Bash matches filenames in a case-insensitive fashion + when performing filename expansion. + + 'nocasematch' + If set, Bash matches patterns in a case-insensitive fashion + when performing matching while executing 'case' or '[[' + conditional commands, when performing pattern substitution + word expansions, or when filtering possible completions as + part of programmable completion. + + 'nullglob' + If set, Bash allows filename patterns which match no files to + expand to a null string, rather than themselves. + + 'progcomp' + If set, the programmable completion facilities (*note + Programmable Completion::) are enabled. This option is + enabled by default. + + 'progcomp_alias' + If set, and programmable completion is enabled, Bash treats a + command name that doesn't have any completions as a possible + alias and attempts alias expansion. If it has an alias, Bash + attempts programmable completion using the command word + resulting from the expanded alias. + + 'promptvars' + If set, prompt strings undergo parameter expansion, command + substitution, arithmetic expansion, and quote removal after + being expanded as described below (*note Controlling the + Prompt::). This option is enabled by default. + + 'restricted_shell' + The shell sets this option if it is started in restricted mode + (*note The Restricted Shell::). The value may not be changed. + This is not reset when the startup files are executed, + allowing the startup files to discover whether or not a shell + is restricted. + + 'shift_verbose' + If this is set, the 'shift' builtin prints an error message + when the shift count exceeds the number of positional + parameters. + + 'sourcepath' + If set, the 'source' builtin uses the value of 'PATH' to find + the directory containing the file supplied as an argument. + This option is enabled by default. + + 'xpg_echo' + If set, the 'echo' builtin expands backslash-escape sequences + by default. + + +File: bashref.info, Node: Special Builtins, Prev: Modifying Shell Behavior, Up: Shell Builtin Commands + +4.4 Special Builtins +==================== + +For historical reasons, the POSIX standard has classified several +builtin commands as _special_. When Bash is executing in POSIX mode, +the special builtins differ from other builtin commands in three +respects: + + 1. Special builtins are found before shell functions during command + lookup. + + 2. If a special builtin returns an error status, a non-interactive + shell exits. + + 3. Assignment statements preceding the command stay in effect in the + shell environment after the command completes. + + When Bash is not executing in POSIX mode, these builtins behave no +differently than the rest of the Bash builtin commands. The Bash POSIX +mode is described in *note Bash POSIX Mode::. + + These are the POSIX special builtins: + break : . continue eval exec exit export readonly return set + shift trap unset + + +File: bashref.info, Node: Shell Variables, Next: Bash Features, Prev: Shell Builtin Commands, Up: Top + +5 Shell Variables +***************** + +* Menu: + +* Bourne Shell Variables:: Variables which Bash uses in the same way + as the Bourne Shell. +* Bash Variables:: List of variables that exist in Bash. + +This chapter describes the shell variables that Bash uses. Bash +automatically assigns default values to a number of variables. + + +File: bashref.info, Node: Bourne Shell Variables, Next: Bash Variables, Up: Shell Variables + +5.1 Bourne Shell Variables +========================== + +Bash uses certain shell variables in the same way as the Bourne shell. +In some cases, Bash assigns a default value to the variable. + +'CDPATH' + A colon-separated list of directories used as a search path for the + 'cd' builtin command. + +'HOME' + The current user's home directory; the default for the 'cd' builtin + command. The value of this variable is also used by tilde + expansion (*note Tilde Expansion::). + +'IFS' + A list of characters that separate fields; used when the shell + splits words as part of expansion. + +'MAIL' + If this parameter is set to a filename or directory name and the + 'MAILPATH' variable is not set, Bash informs the user of the + arrival of mail in the specified file or Maildir-format directory. + +'MAILPATH' + A colon-separated list of filenames which the shell periodically + checks for new mail. Each list entry can specify the message that + is printed when new mail arrives in the mail file by separating the + filename from the message with a '?'. When used in the text of the + message, '$_' expands to the name of the current mail file. + +'OPTARG' + The value of the last option argument processed by the 'getopts' + builtin. + +'OPTIND' + The index of the last option argument processed by the 'getopts' + builtin. + +'PATH' + A colon-separated list of directories in which the shell looks for + commands. A zero-length (null) directory name in the value of + 'PATH' indicates the current directory. A null directory name may + appear as two adjacent colons, or as an initial or trailing colon. + +'PS1' + The primary prompt string. The default value is '\s-\v\$ '. *Note + Controlling the Prompt::, for the complete list of escape sequences + that are expanded before 'PS1' is displayed. + +'PS2' + The secondary prompt string. The default value is '> '. 'PS2' is + expanded in the same way as 'PS1' before being displayed. + + +File: bashref.info, Node: Bash Variables, Prev: Bourne Shell Variables, Up: Shell Variables + +5.2 Bash Variables +================== + +These variables are set or used by Bash, but other shells do not +normally treat them specially. + + A few variables used by Bash are described in different chapters: +variables for controlling the job control facilities (*note Job Control +Variables::). + +'_' + ($_, an underscore.) At shell startup, set to the pathname used to + invoke the shell or shell script being executed as passed in the + environment or argument list. Subsequently, expands to the last + argument to the previous simple command executed in the foreground, + after expansion. Also set to the full pathname used to invoke each + command executed and placed in the environment exported to that + command. When checking mail, this parameter holds the name of the + mail file. + +'BASH' + The full pathname used to execute the current instance of Bash. + +'BASHOPTS' + A colon-separated list of enabled shell options. Each word in the + list is a valid argument for the '-s' option to the 'shopt' builtin + command (*note The Shopt Builtin::). The options appearing in + 'BASHOPTS' are those reported as 'on' by 'shopt'. If this variable + is in the environment when Bash starts up, each shell option in the + list will be enabled before reading any startup files. This + variable is readonly. + +'BASHPID' + Expands to the process ID of the current Bash process. This + differs from '$$' under certain circumstances, such as subshells + that do not require Bash to be re-initialized. Assignments to + 'BASHPID' have no effect. If 'BASHPID' is unset, it loses its + special properties, even if it is subsequently reset. + +'BASH_ALIASES' + An associative array variable whose members correspond to the + internal list of aliases as maintained by the 'alias' builtin. + (*note Bourne Shell Builtins::). Elements added to this array + appear in the alias list; however, unsetting array elements + currently does not cause aliases to be removed from the alias list. + If 'BASH_ALIASES' is unset, it loses its special properties, even + if it is subsequently reset. + +'BASH_ARGC' + An array variable whose values are the number of parameters in each + frame of the current bash execution call stack. The number of + parameters to the current subroutine (shell function or script + executed with '.' or 'source') is at the top of the stack. When a + subroutine is executed, the number of parameters passed is pushed + onto 'BASH_ARGC'. The shell sets 'BASH_ARGC' only when in extended + debugging mode (see *note The Shopt Builtin:: for a description of + the 'extdebug' option to the 'shopt' builtin). Setting 'extdebug' + after the shell has started to execute a script, or referencing + this variable when 'extdebug' is not set, may result in + inconsistent values. + +'BASH_ARGV' + An array variable containing all of the parameters in the current + bash execution call stack. The final parameter of the last + subroutine call is at the top of the stack; the first parameter of + the initial call is at the bottom. When a subroutine is executed, + the parameters supplied are pushed onto 'BASH_ARGV'. The shell + sets 'BASH_ARGV' only when in extended debugging mode (see *note + The Shopt Builtin:: for a description of the 'extdebug' option to + the 'shopt' builtin). Setting 'extdebug' after the shell has + started to execute a script, or referencing this variable when + 'extdebug' is not set, may result in inconsistent values. + +'BASH_ARGV0' + When referenced, this variable expands to the name of the shell or + shell script (identical to '$0'; *Note Special Parameters::, for + the description of special parameter 0). Assignment to + 'BASH_ARGV0' causes the value assigned to also be assigned to '$0'. + If 'BASH_ARGV0' is unset, it loses its special properties, even if + it is subsequently reset. + +'BASH_CMDS' + An associative array variable whose members correspond to the + internal hash table of commands as maintained by the 'hash' builtin + (*note Bourne Shell Builtins::). Elements added to this array + appear in the hash table; however, unsetting array elements + currently does not cause command names to be removed from the hash + table. If 'BASH_CMDS' is unset, it loses its special properties, + even if it is subsequently reset. + +'BASH_COMMAND' + The command currently being executed or about to be executed, + unless the shell is executing a command as the result of a trap, in + which case it is the command executing at the time of the trap. If + 'BASH_COMMAND' is unset, it loses its special properties, even if + it is subsequently reset. + +'BASH_COMPAT' + The value is used to set the shell's compatibility level. *Note + Shell Compatibility Mode::, for a description of the various + compatibility levels and their effects. The value may be a decimal + number (e.g., 4.2) or an integer (e.g., 42) corresponding to the + desired compatibility level. If 'BASH_COMPAT' is unset or set to + the empty string, the compatibility level is set to the default for + the current version. If 'BASH_COMPAT' is set to a value that is + not one of the valid compatibility levels, the shell prints an + error message and sets the compatibility level to the default for + the current version. The valid values correspond to the + compatibility levels described below (*note Shell Compatibility + Mode::). For example, 4.2 and 42 are valid values that correspond + to the 'compat42' 'shopt' option and set the compatibility level to + 42. The current version is also a valid value. + +'BASH_ENV' + If this variable is set when Bash is invoked to execute a shell + script, its value is expanded and used as the name of a startup + file to read before executing the script. *Note Bash Startup + Files::. + +'BASH_EXECUTION_STRING' + The command argument to the '-c' invocation option. + +'BASH_LINENO' + An array variable whose members are the line numbers in source + files where each corresponding member of FUNCNAME was invoked. + '${BASH_LINENO[$i]}' is the line number in the source file + ('${BASH_SOURCE[$i+1]}') where '${FUNCNAME[$i]}' was called (or + '${BASH_LINENO[$i-1]}' if referenced within another shell + function). Use 'LINENO' to obtain the current line number. + +'BASH_LOADABLES_PATH' + A colon-separated list of directories in which the shell looks for + dynamically loadable builtins specified by the 'enable' command. + +'BASH_REMATCH' + An array variable whose members are assigned by the '=~' binary + operator to the '[[' conditional command (*note Conditional + Constructs::). The element with index 0 is the portion of the + string matching the entire regular expression. The element with + index N is the portion of the string matching the Nth parenthesized + subexpression. + +'BASH_SOURCE' + An array variable whose members are the source filenames where the + corresponding shell function names in the 'FUNCNAME' array variable + are defined. The shell function '${FUNCNAME[$i]}' is defined in + the file '${BASH_SOURCE[$i]}' and called from + '${BASH_SOURCE[$i+1]}' + +'BASH_SUBSHELL' + Incremented by one within each subshell or subshell environment + when the shell begins executing in that environment. The initial + value is 0. If 'BASH_SUBSHELL' is unset, it loses its special + properties, even if it is subsequently reset. + +'BASH_VERSINFO' + A readonly array variable (*note Arrays::) whose members hold + version information for this instance of Bash. The values assigned + to the array members are as follows: + + 'BASH_VERSINFO[0]' + The major version number (the RELEASE). + + 'BASH_VERSINFO[1]' + The minor version number (the VERSION). + + 'BASH_VERSINFO[2]' + The patch level. + + 'BASH_VERSINFO[3]' + The build version. + + 'BASH_VERSINFO[4]' + The release status (e.g., BETA1). + + 'BASH_VERSINFO[5]' + The value of 'MACHTYPE'. + +'BASH_VERSION' + The version number of the current instance of Bash. + +'BASH_XTRACEFD' + If set to an integer corresponding to a valid file descriptor, Bash + will write the trace output generated when 'set -x' is enabled to + that file descriptor. This allows tracing output to be separated + from diagnostic and error messages. The file descriptor is closed + when 'BASH_XTRACEFD' is unset or assigned a new value. Unsetting + 'BASH_XTRACEFD' or assigning it the empty string causes the trace + output to be sent to the standard error. Note that setting + 'BASH_XTRACEFD' to 2 (the standard error file descriptor) and then + unsetting it will result in the standard error being closed. + +'CHILD_MAX' + Set the number of exited child status values for the shell to + remember. Bash will not allow this value to be decreased below a + POSIX-mandated minimum, and there is a maximum value (currently + 8192) that this may not exceed. The minimum value is + system-dependent. + +'COLUMNS' + Used by the 'select' command to determine the terminal width when + printing selection lists. Automatically set if the 'checkwinsize' + option is enabled (*note The Shopt Builtin::), or in an interactive + shell upon receipt of a 'SIGWINCH'. + +'COMP_CWORD' + An index into '${COMP_WORDS}' of the word containing the current + cursor position. This variable is available only in shell + functions invoked by the programmable completion facilities (*note + Programmable Completion::). + +'COMP_LINE' + The current command line. This variable is available only in shell + functions and external commands invoked by the programmable + completion facilities (*note Programmable Completion::). + +'COMP_POINT' + The index of the current cursor position relative to the beginning + of the current command. If the current cursor position is at the + end of the current command, the value of this variable is equal to + '${#COMP_LINE}'. This variable is available only in shell + functions and external commands invoked by the programmable + completion facilities (*note Programmable Completion::). + +'COMP_TYPE' + Set to an integer value corresponding to the type of completion + attempted that caused a completion function to be called: TAB, for + normal completion, '?', for listing completions after successive + tabs, '!', for listing alternatives on partial word completion, + '@', to list completions if the word is not unmodified, or '%', for + menu completion. This variable is available only in shell + functions and external commands invoked by the programmable + completion facilities (*note Programmable Completion::). + +'COMP_KEY' + The key (or final key of a key sequence) used to invoke the current + completion function. + +'COMP_WORDBREAKS' + The set of characters that the Readline library treats as word + separators when performing word completion. If 'COMP_WORDBREAKS' + is unset, it loses its special properties, even if it is + subsequently reset. + +'COMP_WORDS' + An array variable consisting of the individual words in the current + command line. The line is split into words as Readline would split + it, using 'COMP_WORDBREAKS' as described above. This variable is + available only in shell functions invoked by the programmable + completion facilities (*note Programmable Completion::). + +'COMPREPLY' + An array variable from which Bash reads the possible completions + generated by a shell function invoked by the programmable + completion facility (*note Programmable Completion::). Each array + element contains one possible completion. + +'COPROC' + An array variable created to hold the file descriptors for output + from and input to an unnamed coprocess (*note Coprocesses::). + +'DIRSTACK' + An array variable containing the current contents of the directory + stack. Directories appear in the stack in the order they are + displayed by the 'dirs' builtin. Assigning to members of this + array variable may be used to modify directories already in the + stack, but the 'pushd' and 'popd' builtins must be used to add and + remove directories. Assignment to this variable will not change + the current directory. If 'DIRSTACK' is unset, it loses its + special properties, even if it is subsequently reset. + +'EMACS' + If Bash finds this variable in the environment when the shell + starts with value 't', it assumes that the shell is running in an + Emacs shell buffer and disables line editing. + +'ENV' + Expanded and executed similarlty to 'BASH_ENV' (*note Bash Startup + Files::) when an interactive shell is invoked in POSIX Mode (*note + Bash POSIX Mode::). + +'EPOCHREALTIME' + Each time this parameter is referenced, it expands to the number of + seconds since the Unix Epoch as a floating point value with + micro-second granularity (see the documentation for the C library + function TIME for the definition of Epoch). Assignments to + 'EPOCHREALTIME' are ignored. If 'EPOCHREALTIME' is unset, it loses + its special properties, even if it is subsequently reset. + +'EPOCHSECONDS' + Each time this parameter is referenced, it expands to the number of + seconds since the Unix Epoch (see the documentation for the C + library function TIME for the definition of Epoch). Assignments to + 'EPOCHSECONDS' are ignored. If 'EPOCHSECONDS' is unset, it loses + its special properties, even if it is subsequently reset. + +'EUID' + The numeric effective user id of the current user. This variable + is readonly. + +'EXECIGNORE' + A colon-separated list of shell patterns (*note Pattern Matching::) + defining the list of filenames to be ignored by command search + using 'PATH'. Files whose full pathnames match one of these + patterns are not considered executable files for the purposes of + completion and command execution via 'PATH' lookup. This does not + affect the behavior of the '[', 'test', and '[[' commands. Full + pathnames in the command hash table are not subject to + 'EXECIGNORE'. Use this variable to ignore shared library files + that have the executable bit set, but are not executable files. + The pattern matching honors the setting of the 'extglob' shell + option. + +'FCEDIT' + The editor used as a default by the '-e' option to the 'fc' builtin + command. + +'FIGNORE' + A colon-separated list of suffixes to ignore when performing + filename completion. A filename whose suffix matches one of the + entries in 'FIGNORE' is excluded from the list of matched + filenames. A sample value is '.o:~' + +'FUNCNAME' + An array variable containing the names of all shell functions + currently in the execution call stack. The element with index 0 is + the name of any currently-executing shell function. The + bottom-most element (the one with the highest index) is '"main"'. + This variable exists only when a shell function is executing. + Assignments to 'FUNCNAME' have no effect. If 'FUNCNAME' is unset, + it loses its special properties, even if it is subsequently reset. + + This variable can be used with 'BASH_LINENO' and 'BASH_SOURCE'. + Each element of 'FUNCNAME' has corresponding elements in + 'BASH_LINENO' and 'BASH_SOURCE' to describe the call stack. For + instance, '${FUNCNAME[$i]}' was called from the file + '${BASH_SOURCE[$i+1]}' at line number '${BASH_LINENO[$i]}'. The + 'caller' builtin displays the current call stack using this + information. + +'FUNCNEST' + If set to a numeric value greater than 0, defines a maximum + function nesting level. Function invocations that exceed this + nesting level will cause the current command to abort. + +'GLOBIGNORE' + A colon-separated list of patterns defining the set of file names + to be ignored by filename expansion. If a file name matched by a + filename expansion pattern also matches one of the patterns in + 'GLOBIGNORE', it is removed from the list of matches. The pattern + matching honors the setting of the 'extglob' shell option. + +'GROUPS' + An array variable containing the list of groups of which the + current user is a member. Assignments to 'GROUPS' have no effect. + If 'GROUPS' is unset, it loses its special properties, even if it + is subsequently reset. + +'histchars' + Up to three characters which control history expansion, quick + substitution, and tokenization (*note History Interaction::). The + first character is the HISTORY EXPANSION character, that is, the + character which signifies the start of a history expansion, + normally '!'. The second character is the character which + signifies 'quick substitution' when seen as the first character on + a line, normally '^'. The optional third character is the + character which indicates that the remainder of the line is a + comment when found as the first character of a word, usually '#'. + The history comment character causes history substitution to be + skipped for the remaining words on the line. It does not + necessarily cause the shell parser to treat the rest of the line as + a comment. + +'HISTCMD' + The history number, or index in the history list, of the current + command. Assignments to 'HISTCMD' are ignored. If 'HISTCMD' is + unset, it loses its special properties, even if it is subsequently + reset. + +'HISTCONTROL' + A colon-separated list of values controlling how commands are saved + on the history list. If the list of values includes 'ignorespace', + lines which begin with a space character are not saved in the + history list. A value of 'ignoredups' causes lines which match the + previous history entry to not be saved. A value of 'ignoreboth' is + shorthand for 'ignorespace' and 'ignoredups'. A value of + 'erasedups' causes all previous lines matching the current line to + be removed from the history list before that line is saved. Any + value not in the above list is ignored. If 'HISTCONTROL' is unset, + or does not include a valid value, all lines read by the shell + parser are saved on the history list, subject to the value of + 'HISTIGNORE'. The second and subsequent lines of a multi-line + compound command are not tested, and are added to the history + regardless of the value of 'HISTCONTROL'. + +'HISTFILE' + The name of the file to which the command history is saved. The + default value is '~/.bash_history'. + +'HISTFILESIZE' + The maximum number of lines contained in the history file. When + this variable is assigned a value, the history file is truncated, + if necessary, to contain no more than that number of lines by + removing the oldest entries. The history file is also truncated to + this size after writing it when a shell exits. If the value is 0, + the history file is truncated to zero size. Non-numeric values and + numeric values less than zero inhibit truncation. The shell sets + the default value to the value of 'HISTSIZE' after reading any + startup files. + +'HISTIGNORE' + A colon-separated list of patterns used to decide which command + lines should be saved on the history list. Each pattern is + anchored at the beginning of the line and must match the complete + line (no implicit '*' is appended). Each pattern is tested against + the line after the checks specified by 'HISTCONTROL' are applied. + In addition to the normal shell pattern matching characters, '&' + matches the previous history line. '&' may be escaped using a + backslash; the backslash is removed before attempting a match. The + second and subsequent lines of a multi-line compound command are + not tested, and are added to the history regardless of the value of + 'HISTIGNORE'. The pattern matching honors the setting of the + 'extglob' shell option. + + 'HISTIGNORE' subsumes the function of 'HISTCONTROL'. A pattern of + '&' is identical to 'ignoredups', and a pattern of '[ ]*' is + identical to 'ignorespace'. Combining these two patterns, + separating them with a colon, provides the functionality of + 'ignoreboth'. + +'HISTSIZE' + The maximum number of commands to remember on the history list. If + the value is 0, commands are not saved in the history list. + Numeric values less than zero result in every command being saved + on the history list (there is no limit). The shell sets the + default value to 500 after reading any startup files. + +'HISTTIMEFORMAT' + If this variable is set and not null, its value is used as a format + string for STRFTIME to print the time stamp associated with each + history entry displayed by the 'history' builtin. If this variable + is set, time stamps are written to the history file so they may be + preserved across shell sessions. This uses the history comment + character to distinguish timestamps from other history lines. + +'HOSTFILE' + Contains the name of a file in the same format as '/etc/hosts' that + should be read when the shell needs to complete a hostname. The + list of possible hostname completions may be changed while the + shell is running; the next time hostname completion is attempted + after the value is changed, Bash adds the contents of the new file + to the existing list. If 'HOSTFILE' is set, but has no value, or + does not name a readable file, Bash attempts to read '/etc/hosts' + to obtain the list of possible hostname completions. When + 'HOSTFILE' is unset, the hostname list is cleared. + +'HOSTNAME' + The name of the current host. + +'HOSTTYPE' + A string describing the machine Bash is running on. + +'IGNOREEOF' + Controls the action of the shell on receipt of an 'EOF' character + as the sole input. If set, the value denotes the number of + consecutive 'EOF' characters that can be read as the first + character on an input line before the shell will exit. If the + variable exists but does not have a numeric value, or has no value, + then the default is 10. If the variable does not exist, then 'EOF' + signifies the end of input to the shell. This is only in effect + for interactive shells. + +'INPUTRC' + The name of the Readline initialization file, overriding the + default of '~/.inputrc'. + +'INSIDE_EMACS' + If Bash finds this variable in the environment when the shell + starts, it assumes that the shell is running in an Emacs shell + buffer and may disable line editing depending on the value of + 'TERM'. + +'LANG' + Used to determine the locale category for any category not + specifically selected with a variable starting with 'LC_'. + +'LC_ALL' + This variable overrides the value of 'LANG' and any other 'LC_' + variable specifying a locale category. + +'LC_COLLATE' + This variable determines the collation order used when sorting the + results of filename expansion, and determines the behavior of range + expressions, equivalence classes, and collating sequences within + filename expansion and pattern matching (*note Filename + Expansion::). + +'LC_CTYPE' + This variable determines the interpretation of characters and the + behavior of character classes within filename expansion and pattern + matching (*note Filename Expansion::). + +'LC_MESSAGES' + This variable determines the locale used to translate double-quoted + strings preceded by a '$' (*note Locale Translation::). + +'LC_NUMERIC' + This variable determines the locale category used for number + formatting. + +'LC_TIME' + This variable determines the locale category used for data and time + formatting. + +'LINENO' + The line number in the script or shell function currently + executing. If 'LINENO' is unset, it loses its special properties, + even if it is subsequently reset. + +'LINES' + Used by the 'select' command to determine the column length for + printing selection lists. Automatically set if the 'checkwinsize' + option is enabled (*note The Shopt Builtin::), or in an interactive + shell upon receipt of a 'SIGWINCH'. + +'MACHTYPE' + A string that fully describes the system type on which Bash is + executing, in the standard GNU CPU-COMPANY-SYSTEM format. + +'MAILCHECK' + How often (in seconds) that the shell should check for mail in the + files specified in the 'MAILPATH' or 'MAIL' variables. The default + is 60 seconds. When it is time to check for mail, the shell does + so before displaying the primary prompt. If this variable is + unset, or set to a value that is not a number greater than or equal + to zero, the shell disables mail checking. + +'MAPFILE' + An array variable created to hold the text read by the 'mapfile' + builtin when no variable name is supplied. + +'OLDPWD' + The previous working directory as set by the 'cd' builtin. + +'OPTERR' + If set to the value 1, Bash displays error messages generated by + the 'getopts' builtin command. + +'OSTYPE' + A string describing the operating system Bash is running on. + +'PIPESTATUS' + An array variable (*note Arrays::) containing a list of exit status + values from the processes in the most-recently-executed foreground + pipeline (which may contain only a single command). + +'POSIXLY_CORRECT' + If this variable is in the environment when Bash starts, the shell + enters POSIX mode (*note Bash POSIX Mode::) before reading the + startup files, as if the '--posix' invocation option had been + supplied. If it is set while the shell is running, Bash enables + POSIX mode, as if the command + set -o posix + had been executed. When the shell enters POSIX mode, it sets this + variable if it was not already set. + +'PPID' + The process ID of the shell's parent process. This variable is + readonly. + +'PROMPT_COMMAND' + If this variable is set, and is an array, the value of each set + element is interpreted as a command to execute before printing the + primary prompt ('$PS1'). If this is set but not an array variable, + its value is used as a command to execute instead. + +'PROMPT_DIRTRIM' + If set to a number greater than zero, the value is used as the + number of trailing directory components to retain when expanding + the '\w' and '\W' prompt string escapes (*note Controlling the + Prompt::). Characters removed are replaced with an ellipsis. + +'PS0' + The value of this parameter is expanded like 'PS1' and displayed by + interactive shells after reading a command and before the command + is executed. + +'PS3' + The value of this variable is used as the prompt for the 'select' + command. If this variable is not set, the 'select' command prompts + with '#? ' + +'PS4' + The value of this parameter is expanded like PS1 and the expanded + value is the prompt printed before the command line is echoed when + the '-x' option is set (*note The Set Builtin::). The first + character of the expanded value is replicated multiple times, as + necessary, to indicate multiple levels of indirection. The default + is '+ '. + +'PWD' + The current working directory as set by the 'cd' builtin. + +'RANDOM' + Each time this parameter is referenced, it expands to a random + integer between 0 and 32767. Assigning a value to this variable + seeds the random number generator. If 'RANDOM' is unset, it loses + its special properties, even if it is subsequently reset. + +'READLINE_LINE' + The contents of the Readline line buffer, for use with 'bind -x' + (*note Bash Builtins::). + +'READLINE_MARK' + The position of the MARK (saved insertion point) in the Readline + line buffer, for use with 'bind -x' (*note Bash Builtins::). The + characters between the insertion point and the mark are often + called the REGION. + +'READLINE_POINT' + The position of the insertion point in the Readline line buffer, + for use with 'bind -x' (*note Bash Builtins::). + +'REPLY' + The default variable for the 'read' builtin. + +'SECONDS' + This variable expands to the number of seconds since the shell was + started. Assignment to this variable resets the count to the value + assigned, and the expanded value becomes the value assigned plus + the number of seconds since the assignment. The number of seconds + at shell invocation and the current time is always determined by + querying the system clock. If 'SECONDS' is unset, it loses its + special properties, even if it is subsequently reset. + +'SHELL' + This environment variable expands to the full pathname to the + shell. If it is not set when the shell starts, Bash assigns to it + the full pathname of the current user's login shell. + +'SHELLOPTS' + A colon-separated list of enabled shell options. Each word in the + list is a valid argument for the '-o' option to the 'set' builtin + command (*note The Set Builtin::). The options appearing in + 'SHELLOPTS' are those reported as 'on' by 'set -o'. If this + variable is in the environment when Bash starts up, each shell + option in the list will be enabled before reading any startup + files. This variable is readonly. + +'SHLVL' + Incremented by one each time a new instance of Bash is started. + This is intended to be a count of how deeply your Bash shells are + nested. + +'SRANDOM' + This variable expands to a 32-bit pseudo-random number each time it + is referenced. The random number generator is not linear on + systems that support '/dev/urandom' or 'arc4random', so each + returned number has no relationship to the numbers preceding it. + The random number generator cannot be seeded, so assignments to + this variable have no effect. If 'SRANDOM' is unset, it loses its + special properties, even if it is subsequently reset. + +'TIMEFORMAT' + The value of this parameter is used as a format string specifying + how the timing information for pipelines prefixed with the 'time' + reserved word should be displayed. The '%' character introduces an + escape sequence that is expanded to a time value or other + information. The escape sequences and their meanings are as + follows; the braces denote optional portions. + + '%%' + A literal '%'. + + '%[P][l]R' + The elapsed time in seconds. + + '%[P][l]U' + The number of CPU seconds spent in user mode. + + '%[P][l]S' + The number of CPU seconds spent in system mode. + + '%P' + The CPU percentage, computed as (%U + %S) / %R. + + The optional P is a digit specifying the precision, the number of + fractional digits after a decimal point. A value of 0 causes no + decimal point or fraction to be output. At most three places after + the decimal point may be specified; values of P greater than 3 are + changed to 3. If P is not specified, the value 3 is used. + + The optional 'l' specifies a longer format, including minutes, of + the form MMmSS.FFs. The value of P determines whether or not the + fraction is included. + + If this variable is not set, Bash acts as if it had the value + $'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS' + If the value is null, no timing information is displayed. A + trailing newline is added when the format string is displayed. + +'TMOUT' + If set to a value greater than zero, 'TMOUT' is treated as the + default timeout for the 'read' builtin (*note Bash Builtins::). + The 'select' command (*note Conditional Constructs::) terminates if + input does not arrive after 'TMOUT' seconds when input is coming + from a terminal. + + In an interactive shell, the value is interpreted as the number of + seconds to wait for a line of input after issuing the primary + prompt. Bash terminates after waiting for that number of seconds + if a complete line of input does not arrive. + +'TMPDIR' + If set, Bash uses its value as the name of a directory in which + Bash creates temporary files for the shell's use. + +'UID' + The numeric real user id of the current user. This variable is + readonly. + + +File: bashref.info, Node: Bash Features, Next: Job Control, Prev: Shell Variables, Up: Top + +6 Bash Features +*************** + +This chapter describes features unique to Bash. + +* Menu: + +* Invoking Bash:: Command line options that you can give + to Bash. +* Bash Startup Files:: When and how Bash executes scripts. +* Interactive Shells:: What an interactive shell is. +* Bash Conditional Expressions:: Primitives used in composing expressions for + the 'test' builtin. +* Shell Arithmetic:: Arithmetic on shell variables. +* Aliases:: Substituting one command for another. +* Arrays:: Array Variables. +* The Directory Stack:: History of visited directories. +* Controlling the Prompt:: Customizing the various prompt strings. +* The Restricted Shell:: A more controlled mode of shell execution. +* Bash POSIX Mode:: Making Bash behave more closely to what + the POSIX standard specifies. +* Shell Compatibility Mode:: How Bash supports behavior that was present + in earlier versions and has changed. + + +File: bashref.info, Node: Invoking Bash, Next: Bash Startup Files, Up: Bash Features + +6.1 Invoking Bash +================= + + bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION] + [-O SHOPT_OPTION] [ARGUMENT ...] + bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o OPTION] + [-O SHOPT_OPTION] -c STRING [ARGUMENT ...] + bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o OPTION] + [-O SHOPT_OPTION] [ARGUMENT ...] + + All of the single-character options used with the 'set' builtin +(*note The Set Builtin::) can be used as options when the shell is +invoked. In addition, there are several multi-character options that +you can use. These options must appear on the command line before the +single-character options to be recognized. + +'--debugger' + Arrange for the debugger profile to be executed before the shell + starts. Turns on extended debugging mode (see *note The Shopt + Builtin:: for a description of the 'extdebug' option to the 'shopt' + builtin). + +'--dump-po-strings' + A list of all double-quoted strings preceded by '$' is printed on + the standard output in the GNU 'gettext' PO (portable object) file + format. Equivalent to '-D' except for the output format. + +'--dump-strings' + Equivalent to '-D'. + +'--help' + Display a usage message on standard output and exit successfully. + +'--init-file FILENAME' +'--rcfile FILENAME' + Execute commands from FILENAME (instead of '~/.bashrc') in an + interactive shell. + +'--login' + Equivalent to '-l'. + +'--noediting' + Do not use the GNU Readline library (*note Command Line Editing::) + to read command lines when the shell is interactive. + +'--noprofile' + Don't load the system-wide startup file '/etc/profile' or any of + the personal initialization files '~/.bash_profile', + '~/.bash_login', or '~/.profile' when Bash is invoked as a login + shell. + +'--norc' + Don't read the '~/.bashrc' initialization file in an interactive + shell. This is on by default if the shell is invoked as 'sh'. + +'--posix' + Change the behavior of Bash where the default operation differs + from the POSIX standard to match the standard. This is intended to + make Bash behave as a strict superset of that standard. *Note Bash + POSIX Mode::, for a description of the Bash POSIX mode. + +'--restricted' + Make the shell a restricted shell (*note The Restricted Shell::). + +'--verbose' + Equivalent to '-v'. Print shell input lines as they're read. + +'--version' + Show version information for this instance of Bash on the standard + output and exit successfully. + + There are several single-character options that may be supplied at +invocation which are not available with the 'set' builtin. + +'-c' + Read and execute commands from the first non-option argument + COMMAND_STRING, then exit. If there are arguments after the + COMMAND_STRING, the first argument is assigned to '$0' and any + remaining arguments are assigned to the positional parameters. The + assignment to '$0' sets the name of the shell, which is used in + warning and error messages. + +'-i' + Force the shell to run interactively. Interactive shells are + described in *note Interactive Shells::. + +'-l' + Make this shell act as if it had been directly invoked by login. + When the shell is interactive, this is equivalent to starting a + login shell with 'exec -l bash'. When the shell is not + interactive, the login shell startup files will be executed. 'exec + bash -l' or 'exec bash --login' will replace the current shell with + a Bash login shell. *Note Bash Startup Files::, for a description + of the special behavior of a login shell. + +'-r' + Make the shell a restricted shell (*note The Restricted Shell::). + +'-s' + If this option is present, or if no arguments remain after option + processing, then commands are read from the standard input. This + option allows the positional parameters to be set when invoking an + interactive shell or when reading input through a pipe. + +'-D' + A list of all double-quoted strings preceded by '$' is printed on + the standard output. These are the strings that are subject to + language translation when the current locale is not 'C' or 'POSIX' + (*note Locale Translation::). This implies the '-n' option; no + commands will be executed. + +'[-+]O [SHOPT_OPTION]' + SHOPT_OPTION is one of the shell options accepted by the 'shopt' + builtin (*note The Shopt Builtin::). If SHOPT_OPTION is present, + '-O' sets the value of that option; '+O' unsets it. If + SHOPT_OPTION is not supplied, the names and values of the shell + options accepted by 'shopt' are printed on the standard output. If + the invocation option is '+O', the output is displayed in a format + that may be reused as input. + +'--' + A '--' signals the end of options and disables further option + processing. Any arguments after the '--' are treated as filenames + and arguments. + + A _login_ shell is one whose first character of argument zero is '-', +or one invoked with the '--login' option. + + An _interactive_ shell is one started without non-option arguments, +unless '-s' is specified, without specifying the '-c' option, and whose +input and output are both connected to terminals (as determined by +'isatty(3)'), or one started with the '-i' option. *Note Interactive +Shells::, for more information. + + If arguments remain after option processing, and neither the '-c' nor +the '-s' option has been supplied, the first argument is assumed to be +the name of a file containing shell commands (*note Shell Scripts::). +When Bash is invoked in this fashion, '$0' is set to the name of the +file, and the positional parameters are set to the remaining arguments. +Bash reads and executes commands from this file, then exits. Bash's +exit status is the exit status of the last command executed in the +script. If no commands are executed, the exit status is 0. + + +File: bashref.info, Node: Bash Startup Files, Next: Interactive Shells, Prev: Invoking Bash, Up: Bash Features + +6.2 Bash Startup Files +====================== + +This section describes how Bash executes its startup files. If any of +the files exist but cannot be read, Bash reports an error. Tildes are +expanded in filenames as described above under Tilde Expansion (*note +Tilde Expansion::). + + Interactive shells are described in *note Interactive Shells::. + +Invoked as an interactive login shell, or with '--login' +........................................................ + +When Bash is invoked as an interactive login shell, or as a +non-interactive shell with the '--login' option, it first reads and +executes commands from the file '/etc/profile', if that file exists. +After reading that file, it looks for '~/.bash_profile', +'~/.bash_login', and '~/.profile', in that order, and reads and executes +commands from the first one that exists and is readable. The +'--noprofile' option may be used when the shell is started to inhibit +this behavior. + + When an interactive login shell exits, or a non-interactive login +shell executes the 'exit' builtin command, Bash reads and executes +commands from the file '~/.bash_logout', if it exists. + +Invoked as an interactive non-login shell +......................................... + +When an interactive shell that is not a login shell is started, Bash +reads and executes commands from '~/.bashrc', if that file exists. This +may be inhibited by using the '--norc' option. The '--rcfile FILE' +option will force Bash to read and execute commands from FILE instead of +'~/.bashrc'. + + So, typically, your '~/.bash_profile' contains the line + if [ -f ~/.bashrc ]; then . ~/.bashrc; fi +after (or before) any login-specific initializations. + +Invoked non-interactively +......................... + +When Bash is started non-interactively, to run a shell script, for +example, it looks for the variable 'BASH_ENV' in the environment, +expands its value if it appears there, and uses the expanded value as +the name of a file to read and execute. Bash behaves as if the +following command were executed: + if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi +but the value of the 'PATH' variable is not used to search for the +filename. + + As noted above, if a non-interactive shell is invoked with the +'--login' option, Bash attempts to read and execute commands from the +login shell startup files. + +Invoked with name 'sh' +...................... + +If Bash is invoked with the name 'sh', it tries to mimic the startup +behavior of historical versions of 'sh' as closely as possible, while +conforming to the POSIX standard as well. + + When invoked as an interactive login shell, or as a non-interactive +shell with the '--login' option, it first attempts to read and execute +commands from '/etc/profile' and '~/.profile', in that order. The +'--noprofile' option may be used to inhibit this behavior. When invoked +as an interactive shell with the name 'sh', Bash looks for the variable +'ENV', expands its value if it is defined, and uses the expanded value +as the name of a file to read and execute. Since a shell invoked as +'sh' does not attempt to read and execute commands from any other +startup files, the '--rcfile' option has no effect. A non-interactive +shell invoked with the name 'sh' does not attempt to read any other +startup files. + + When invoked as 'sh', Bash enters POSIX mode after the startup files +are read. + +Invoked in POSIX mode +..................... + +When Bash is started in POSIX mode, as with the '--posix' command line +option, it follows the POSIX standard for startup files. In this mode, +interactive shells expand the 'ENV' variable and commands are read and +executed from the file whose name is the expanded value. No other +startup files are read. + +Invoked by remote shell daemon +.............................. + +Bash attempts to determine when it is being run with its standard input +connected to a network connection, as when executed by the remote shell +daemon, usually 'rshd', or the secure shell daemon 'sshd'. If Bash +determines it is being run in this fashion, it reads and executes +commands from '~/.bashrc', if that file exists and is readable. It will +not do this if invoked as 'sh'. The '--norc' option may be used to +inhibit this behavior, and the '--rcfile' option may be used to force +another file to be read, but neither 'rshd' nor 'sshd' generally invoke +the shell with those options or allow them to be specified. + +Invoked with unequal effective and real UID/GIDs +................................................ + +If Bash is started with the effective user (group) id not equal to the +real user (group) id, and the '-p' option is not supplied, no startup +files are read, shell functions are not inherited from the environment, +the 'SHELLOPTS', 'BASHOPTS', 'CDPATH', and 'GLOBIGNORE' variables, if +they appear in the environment, are ignored, and the effective user id +is set to the real user id. If the '-p' option is supplied at +invocation, the startup behavior is the same, but the effective user id +is not reset. + + +File: bashref.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features + +6.3 Interactive Shells +====================== + +* Menu: + +* What is an Interactive Shell?:: What determines whether a shell is Interactive. +* Is this Shell Interactive?:: How to tell if a shell is interactive. +* Interactive Shell Behavior:: What changes in a interactive shell? + + +File: bashref.info, Node: What is an Interactive Shell?, Next: Is this Shell Interactive?, Up: Interactive Shells + +6.3.1 What is an Interactive Shell? +----------------------------------- + +An interactive shell is one started without non-option arguments, unless +'-s' is specified, without specifying the '-c' option, and whose input +and error output are both connected to terminals (as determined by +'isatty(3)'), or one started with the '-i' option. + + An interactive shell generally reads from and writes to a user's +terminal. + + The '-s' invocation option may be used to set the positional +parameters when an interactive shell is started. + + +File: bashref.info, Node: Is this Shell Interactive?, Next: Interactive Shell Behavior, Prev: What is an Interactive Shell?, Up: Interactive Shells + +6.3.2 Is this Shell Interactive? +-------------------------------- + +To determine within a startup script whether or not Bash is running +interactively, test the value of the '-' special parameter. It contains +'i' when the shell is interactive. For example: + + case "$-" in + *i*) echo This shell is interactive ;; + *) echo This shell is not interactive ;; + esac + + Alternatively, startup scripts may examine the variable 'PS1'; it is +unset in non-interactive shells, and set in interactive shells. Thus: + + if [ -z "$PS1" ]; then + echo This shell is not interactive + else + echo This shell is interactive + fi + + +File: bashref.info, Node: Interactive Shell Behavior, Prev: Is this Shell Interactive?, Up: Interactive Shells + +6.3.3 Interactive Shell Behavior +-------------------------------- + +When the shell is running interactively, it changes its behavior in +several ways. + + 1. Startup files are read and executed as described in *note Bash + Startup Files::. + + 2. Job Control (*note Job Control::) is enabled by default. When job + control is in effect, Bash ignores the keyboard-generated job + control signals 'SIGTTIN', 'SIGTTOU', and 'SIGTSTP'. + + 3. Bash expands and displays 'PS1' before reading the first line of a + command, and expands and displays 'PS2' before reading the second + and subsequent lines of a multi-line command. Bash expands and + displays 'PS0' after it reads a command but before executing it. + See *note Controlling the Prompt::, for a complete list of prompt + string escape sequences. + + 4. Bash executes the values of the set elements of the + 'PROMPT_COMMANDS' array variable as commands before printing the + primary prompt, '$PS1' (*note Bash Variables::). + + 5. Readline (*note Command Line Editing::) is used to read commands + from the user's terminal. + + 6. Bash inspects the value of the 'ignoreeof' option to 'set -o' + instead of exiting immediately when it receives an 'EOF' on its + standard input when reading a command (*note The Set Builtin::). + + 7. Command history (*note Bash History Facilities::) and history + expansion (*note History Interaction::) are enabled by default. + Bash will save the command history to the file named by '$HISTFILE' + when a shell with history enabled exits. + + 8. Alias expansion (*note Aliases::) is performed by default. + + 9. In the absence of any traps, Bash ignores 'SIGTERM' (*note + Signals::). + + 10. In the absence of any traps, 'SIGINT' is caught and handled (*note + Signals::). 'SIGINT' will interrupt some shell builtins. + + 11. An interactive login shell sends a 'SIGHUP' to all jobs on exit if + the 'huponexit' shell option has been enabled (*note Signals::). + + 12. The '-n' invocation option is ignored, and 'set -n' has no effect + (*note The Set Builtin::). + + 13. Bash will check for mail periodically, depending on the values of + the 'MAIL', 'MAILPATH', and 'MAILCHECK' shell variables (*note Bash + Variables::). + + 14. Expansion errors due to references to unbound shell variables + after 'set -u' has been enabled will not cause the shell to exit + (*note The Set Builtin::). + + 15. The shell will not exit on expansion errors caused by VAR being + unset or null in '${VAR:?WORD}' expansions (*note Shell Parameter + Expansion::). + + 16. Redirection errors encountered by shell builtins will not cause + the shell to exit. + + 17. When running in POSIX mode, a special builtin returning an error + status will not cause the shell to exit (*note Bash POSIX Mode::). + + 18. A failed 'exec' will not cause the shell to exit (*note Bourne + Shell Builtins::). + + 19. Parser syntax errors will not cause the shell to exit. + + 20. Simple spelling correction for directory arguments to the 'cd' + builtin is enabled by default (see the description of the 'cdspell' + option to the 'shopt' builtin in *note The Shopt Builtin::). + + 21. The shell will check the value of the 'TMOUT' variable and exit if + a command is not read within the specified number of seconds after + printing '$PS1' (*note Bash Variables::). + + +File: bashref.info, Node: Bash Conditional Expressions, Next: Shell Arithmetic, Prev: Interactive Shells, Up: Bash Features + +6.4 Bash Conditional Expressions +================================ + +Conditional expressions are used by the '[[' compound command and the +'test' and '[' builtin commands. The 'test' and '[' commands determine +their behavior based on the number of arguments; see the descriptions of +those commands for any other command-specific actions. + + Expressions may be unary or binary, and are formed from the following +primaries. Unary expressions are often used to examine the status of a +file. There are string operators and numeric comparison operators as +well. Bash handles several filenames specially when they are used in +expressions. If the operating system on which Bash is running provides +these special files, Bash will use them; otherwise it will emulate them +internally with this behavior: If the FILE argument to one of the +primaries is of the form '/dev/fd/N', then file descriptor N is checked. +If the FILE argument to one of the primaries is one of '/dev/stdin', +'/dev/stdout', or '/dev/stderr', file descriptor 0, 1, or 2, +respectively, is checked. + + When used with '[[', the '<' and '>' operators sort lexicographically +using the current locale. The 'test' command uses ASCII ordering. + + Unless otherwise specified, primaries that operate on files follow +symbolic links and operate on the target of the link, rather than the +link itself. + +'-a FILE' + True if FILE exists. + +'-b FILE' + True if FILE exists and is a block special file. + +'-c FILE' + True if FILE exists and is a character special file. + +'-d FILE' + True if FILE exists and is a directory. + +'-e FILE' + True if FILE exists. + +'-f FILE' + True if FILE exists and is a regular file. + +'-g FILE' + True if FILE exists and its set-group-id bit is set. + +'-h FILE' + True if FILE exists and is a symbolic link. + +'-k FILE' + True if FILE exists and its "sticky" bit is set. + +'-p FILE' + True if FILE exists and is a named pipe (FIFO). + +'-r FILE' + True if FILE exists and is readable. + +'-s FILE' + True if FILE exists and has a size greater than zero. + +'-t FD' + True if file descriptor FD is open and refers to a terminal. + +'-u FILE' + True if FILE exists and its set-user-id bit is set. + +'-w FILE' + True if FILE exists and is writable. + +'-x FILE' + True if FILE exists and is executable. + +'-G FILE' + True if FILE exists and is owned by the effective group id. + +'-L FILE' + True if FILE exists and is a symbolic link. + +'-N FILE' + True if FILE exists and has been modified since it was last read. + +'-O FILE' + True if FILE exists and is owned by the effective user id. + +'-S FILE' + True if FILE exists and is a socket. + +'FILE1 -ef FILE2' + True if FILE1 and FILE2 refer to the same device and inode numbers. + +'FILE1 -nt FILE2' + True if FILE1 is newer (according to modification date) than FILE2, + or if FILE1 exists and FILE2 does not. + +'FILE1 -ot FILE2' + True if FILE1 is older than FILE2, or if FILE2 exists and FILE1 + does not. + +'-o OPTNAME' + True if the shell option OPTNAME is enabled. The list of options + appears in the description of the '-o' option to the 'set' builtin + (*note The Set Builtin::). + +'-v VARNAME' + True if the shell variable VARNAME is set (has been assigned a + value). + +'-R VARNAME' + True if the shell variable VARNAME is set and is a name reference. + +'-z STRING' + True if the length of STRING is zero. + +'-n STRING' +'STRING' + True if the length of STRING is non-zero. + +'STRING1 == STRING2' +'STRING1 = STRING2' + True if the strings are equal. When used with the '[[' command, + this performs pattern matching as described above (*note + Conditional Constructs::). + + '=' should be used with the 'test' command for POSIX conformance. + +'STRING1 != STRING2' + True if the strings are not equal. + +'STRING1 < STRING2' + True if STRING1 sorts before STRING2 lexicographically. + +'STRING1 > STRING2' + True if STRING1 sorts after STRING2 lexicographically. + +'ARG1 OP ARG2' + 'OP' is one of '-eq', '-ne', '-lt', '-le', '-gt', or '-ge'. These + arithmetic binary operators return true if ARG1 is equal to, not + equal to, less than, less than or equal to, greater than, or + greater than or equal to ARG2, respectively. ARG1 and ARG2 may be + positive or negative integers. When used with the '[[' command, + ARG1 and ARG2 are evaluated as arithmetic expressions (*note Shell + Arithmetic::). + + +File: bashref.info, Node: Shell Arithmetic, Next: Aliases, Prev: Bash Conditional Expressions, Up: Bash Features + +6.5 Shell Arithmetic +==================== + +The shell allows arithmetic expressions to be evaluated, as one of the +shell expansions or by using the '((' compound command, the 'let' +builtin, or the '-i' option to the 'declare' builtin. + + Evaluation is done in fixed-width integers with no check for +overflow, though division by 0 is trapped and flagged as an error. The +operators and their precedence, associativity, and values are the same +as in the C language. The following list of operators is grouped into +levels of equal-precedence operators. The levels are listed in order of +decreasing precedence. + +'ID++ ID--' + variable post-increment and post-decrement + +'++ID --ID' + variable pre-increment and pre-decrement + +'- +' + unary minus and plus + +'! ~' + logical and bitwise negation + +'**' + exponentiation + +'* / %' + multiplication, division, remainder + +'+ -' + addition, subtraction + +'<< >>' + left and right bitwise shifts + +'<= >= < >' + comparison + +'== !=' + equality and inequality + +'&' + bitwise AND + +'^' + bitwise exclusive OR + +'|' + bitwise OR + +'&&' + logical AND + +'||' + logical OR + +'expr ? expr : expr' + conditional operator + +'= *= /= %= += -= <<= >>= &= ^= |=' + assignment + +'expr1 , expr2' + comma + + Shell variables are allowed as operands; parameter expansion is +performed before the expression is evaluated. Within an expression, +shell variables may also be referenced by name without using the +parameter expansion syntax. A shell variable that is null or unset +evaluates to 0 when referenced by name without using the parameter +expansion syntax. The value of a variable is evaluated as an arithmetic +expression when it is referenced, or when a variable which has been +given the INTEGER attribute using 'declare -i' is assigned a value. A +null value evaluates to 0. A shell variable need not have its INTEGER +attribute turned on to be used in an expression. + + Integer constants follow the C language definition, without suffixes +or character constants. Constants with a leading 0 are interpreted as +octal numbers. A leading '0x' or '0X' denotes hexadecimal. Otherwise, +numbers take the form [BASE'#']N, where the optional BASE is a decimal +number between 2 and 64 representing the arithmetic base, and N is a +number in that base. If BASE'#' is omitted, then base 10 is used. When +specifying N, if a non-digit is required, the digits greater than 9 are +represented by the lowercase letters, the uppercase letters, '@', and +'_', in that order. If BASE is less than or equal to 36, lowercase and +uppercase letters may be used interchangeably to represent numbers +between 10 and 35. + + Operators are evaluated in order of precedence. Sub-expressions in +parentheses are evaluated first and may override the precedence rules +above. + + +File: bashref.info, Node: Aliases, Next: Arrays, Prev: Shell Arithmetic, Up: Bash Features + +6.6 Aliases +=========== + +ALIASES allow a string to be substituted for a word when it is used as +the first word of a simple command. The shell maintains a list of +aliases that may be set and unset with the 'alias' and 'unalias' builtin +commands. + + The first word of each simple command, if unquoted, is checked to see +if it has an alias. If so, that word is replaced by the text of the +alias. The characters '/', '$', '`', '=' and any of the shell +metacharacters or quoting characters listed above may not appear in an +alias name. The replacement text may contain any valid shell input, +including shell metacharacters. The first word of the replacement text +is tested for aliases, but a word that is identical to an alias being +expanded is not expanded a second time. This means that one may alias +'ls' to '"ls -F"', for instance, and Bash does not try to recursively +expand the replacement text. If the last character of the alias value +is a BLANK, then the next command word following the alias is also +checked for alias expansion. + + Aliases are created and listed with the 'alias' command, and removed +with the 'unalias' command. + + There is no mechanism for using arguments in the replacement text, as +in 'csh'. If arguments are needed, a shell function should be used +(*note Shell Functions::). + + Aliases are not expanded when the shell is not interactive, unless +the 'expand_aliases' shell option is set using 'shopt' (*note The Shopt +Builtin::). + + The rules concerning the definition and use of aliases are somewhat +confusing. Bash always reads at least one complete line of input, and +all lines that make up a compound command, before executing any of the +commands on that line or the compound command. Aliases are expanded +when a command is read, not when it is executed. Therefore, an alias +definition appearing on the same line as another command does not take +effect until the next line of input is read. The commands following the +alias definition on that line are not affected by the new alias. This +behavior is also an issue when functions are executed. Aliases are +expanded when a function definition is read, not when the function is +executed, because a function definition is itself a command. As a +consequence, aliases defined in a function are not available until after +that function is executed. To be safe, always put alias definitions on +a separate line, and do not use 'alias' in compound commands. + + For almost every purpose, shell functions are preferred over aliases. + + +File: bashref.info, Node: Arrays, Next: The Directory Stack, Prev: Aliases, Up: Bash Features + +6.7 Arrays +========== + +Bash provides one-dimensional indexed and associative array variables. +Any variable may be used as an indexed array; the 'declare' builtin will +explicitly declare an array. There is no maximum limit on the size of +an array, nor any requirement that members be indexed or assigned +contiguously. Indexed arrays are referenced using integers (including +arithmetic expressions (*note Shell Arithmetic::)) and are zero-based; +associative arrays use arbitrary strings. Unless otherwise noted, +indexed array indices must be non-negative integers. + + An indexed array is created automatically if any variable is assigned +to using the syntax + NAME[SUBSCRIPT]=VALUE + +The SUBSCRIPT is treated as an arithmetic expression that must evaluate +to a number. To explicitly declare an array, use + declare -a NAME +The syntax + declare -a NAME[SUBSCRIPT] +is also accepted; the SUBSCRIPT is ignored. + +Associative arrays are created using + declare -A NAME + + Attributes may be specified for an array variable using the 'declare' +and 'readonly' builtins. Each attribute applies to all members of an +array. + + Arrays are assigned to using compound assignments of the form + NAME=(VALUE1 VALUE2 ... ) +where each VALUE may be of the form '[SUBSCRIPT]='STRING. Indexed array +assignments do not require anything but STRING. When assigning to +indexed arrays, if the optional subscript is supplied, that index is +assigned to; otherwise the index of the element assigned is the last +index assigned to by the statement plus one. Indexing starts at zero. + + Each VALUE in the list undergoes all the shell expansions described +above (*note Shell Expansions::). + + When assigning to an associative array, the words in a compound +assignment may be either assignment statements, for which the subscript +is required, or a list of words that is interpreted as a sequence of +alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). These +are treated identically to NAME=( [KEY1]=VALUE1 [KEY2]=VALUE2 ... ). +The first word in the list determines how the remaining words are +interpreted; all assignments in a list must be of the same type. When +using key/value pairs, the keys may not be missing or empty; a final +missing value is treated like the empty string. + + This syntax is also accepted by the 'declare' builtin. Individual +array elements may be assigned to using the 'NAME[SUBSCRIPT]=VALUE' +syntax introduced above. + + When assigning to an indexed array, if NAME is subscripted by a +negative number, that number is interpreted as relative to one greater +than the maximum index of NAME, so negative indices count back from the +end of the array, and an index of -1 references the last element. + + Any element of an array may be referenced using '${NAME[SUBSCRIPT]}'. +The braces are required to avoid conflicts with the shell's filename +expansion operators. If the SUBSCRIPT is '@' or '*', the word expands +to all members of the array NAME. These subscripts differ only when the +word appears within double quotes. If the word is double-quoted, +'${NAME[*]}' expands to a single word with the value of each array +member separated by the first character of the 'IFS' variable, and +'${NAME[@]}' expands each element of NAME to a separate word. When +there are no array members, '${NAME[@]}' expands to nothing. If the +double-quoted expansion occurs within a word, the expansion of the first +parameter is joined with the beginning part of the original word, and +the expansion of the last parameter is joined with the last part of the +original word. This is analogous to the expansion of the special +parameters '@' and '*'. '${#NAME[SUBSCRIPT]}' expands to the length of +'${NAME[SUBSCRIPT]}'. If SUBSCRIPT is '@' or '*', the expansion is the +number of elements in the array. If the SUBSCRIPT used to reference an +element of an indexed array evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the +array, so negative indices count back from the end of the array, and an +index of -1 refers to the last element. + + Referencing an array variable without a subscript is equivalent to +referencing with a subscript of 0. Any reference to a variable using a +valid subscript is legal, and 'bash' will create an array if necessary. + + An array variable is considered set if a subscript has been assigned +a value. The null string is a valid value. + + It is possible to obtain the keys (indices) of an array as well as +the values. ${!NAME[@]} and ${!NAME[*]} expand to the indices assigned +in array variable NAME. The treatment when in double quotes is similar +to the expansion of the special parameters '@' and '*' within double +quotes. + + The 'unset' builtin is used to destroy arrays. 'unset +NAME[SUBSCRIPT]' destroys the array element at index SUBSCRIPT. +Negative subscripts to indexed arrays are interpreted as described +above. Unsetting the last element of an array variable does not unset +the variable. 'unset NAME', where NAME is an array, removes the entire +array. A subscript of '*' or '@' also removes the entire array. + + When using a variable name with a subscript as an argument to a +command, such as with 'unset', without using the word expansion syntax +described above, the argument is subject to the shell's filename +expansion. If filename expansion is not desired, the argument should be +quoted. + + The 'declare', 'local', and 'readonly' builtins each accept a '-a' +option to specify an indexed array and a '-A' option to specify an +associative array. If both options are supplied, '-A' takes precedence. +The 'read' builtin accepts a '-a' option to assign a list of words read +from the standard input to an array, and can read values from the +standard input into individual array elements. The 'set' and 'declare' +builtins display array values in a way that allows them to be reused as +input. + + +File: bashref.info, Node: The Directory Stack, Next: Controlling the Prompt, Prev: Arrays, Up: Bash Features + +6.8 The Directory Stack +======================= + +* Menu: + +* Directory Stack Builtins:: Bash builtin commands to manipulate + the directory stack. + +The directory stack is a list of recently-visited directories. The +'pushd' builtin adds directories to the stack as it changes the current +directory, and the 'popd' builtin removes specified directories from the +stack and changes the current directory to the directory removed. The +'dirs' builtin displays the contents of the directory stack. The +current directory is always the "top" of the directory stack. + + The contents of the directory stack are also visible as the value of +the 'DIRSTACK' shell variable. + + +File: bashref.info, Node: Directory Stack Builtins, Up: The Directory Stack + +6.8.1 Directory Stack Builtins +------------------------------ + +'dirs' + dirs [-clpv] [+N | -N] + + Display the list of currently remembered directories. Directories + are added to the list with the 'pushd' command; the 'popd' command + removes directories from the list. The current directory is always + the first directory in the stack. + + '-c' + Clears the directory stack by deleting all of the elements. + '-l' + Produces a listing using full pathnames; the default listing + format uses a tilde to denote the home directory. + '-p' + Causes 'dirs' to print the directory stack with one entry per + line. + '-v' + Causes 'dirs' to print the directory stack with one entry per + line, prefixing each entry with its index in the stack. + '+N' + Displays the Nth directory (counting from the left of the list + printed by 'dirs' when invoked without options), starting with + zero. + '-N' + Displays the Nth directory (counting from the right of the + list printed by 'dirs' when invoked without options), starting + with zero. + +'popd' + popd [-n] [+N | -N] + + When no arguments are given, 'popd' removes the top directory from + the stack and performs a 'cd' to the new top directory. The + elements are numbered from 0 starting at the first directory listed + with 'dirs'; that is, 'popd' is equivalent to 'popd +0'. + + '-n' + Suppresses the normal change of directory when removing + directories from the stack, so that only the stack is + manipulated. + '+N' + Removes the Nth directory (counting from the left of the list + printed by 'dirs'), starting with zero. + '-N' + Removes the Nth directory (counting from the right of the list + printed by 'dirs'), starting with zero. + +'pushd' + pushd [-n] [+N | -N | DIR] + + Save the current directory on the top of the directory stack and + then 'cd' to DIR. With no arguments, 'pushd' exchanges the top two + directories and makes the new top the current directory. + + '-n' + Suppresses the normal change of directory when rotating or + adding directories to the stack, so that only the stack is + manipulated. + '+N' + Brings the Nth directory (counting from the left of the list + printed by 'dirs', starting with zero) to the top of the list + by rotating the stack. + '-N' + Brings the Nth directory (counting from the right of the list + printed by 'dirs', starting with zero) to the top of the list + by rotating the stack. + 'DIR' + Makes DIR be the top of the stack, making it the new current + directory as if it had been supplied as an argument to the + 'cd' builtin. + + +File: bashref.info, Node: Controlling the Prompt, Next: The Restricted Shell, Prev: The Directory Stack, Up: Bash Features + +6.9 Controlling the Prompt +========================== + +Bash examines the value of the array variable 'PROMPT_COMMANDS' just +before printing each primary prompt. If any elements in +'PROMPT_COMMANDS' are set and non-null, Bash executes each value, in +numeric order, just as if it had been typed on the command line. + + In addition, the following table describes the special characters +which can appear in the prompt variables 'PS0', 'PS1', 'PS2', and 'PS4': + +'\a' + A bell character. +'\d' + The date, in "Weekday Month Date" format (e.g., "Tue May 26"). +'\D{FORMAT}' + The FORMAT is passed to 'strftime'(3) and the result is inserted + into the prompt string; an empty FORMAT results in a + locale-specific time representation. The braces are required. +'\e' + An escape character. +'\h' + The hostname, up to the first '.'. +'\H' + The hostname. +'\j' + The number of jobs currently managed by the shell. +'\l' + The basename of the shell's terminal device name. +'\n' + A newline. +'\r' + A carriage return. +'\s' + The name of the shell, the basename of '$0' (the portion following + the final slash). +'\t' + The time, in 24-hour HH:MM:SS format. +'\T' + The time, in 12-hour HH:MM:SS format. +'\@' + The time, in 12-hour am/pm format. +'\A' + The time, in 24-hour HH:MM format. +'\u' + The username of the current user. +'\v' + The version of Bash (e.g., 2.00) +'\V' + The release of Bash, version + patchlevel (e.g., 2.00.0) +'\w' + The current working directory, with '$HOME' abbreviated with a + tilde (uses the '$PROMPT_DIRTRIM' variable). +'\W' + The basename of '$PWD', with '$HOME' abbreviated with a tilde. +'\!' + The history number of this command. +'\#' + The command number of this command. +'\$' + If the effective uid is 0, '#', otherwise '$'. +'\NNN' + The character whose ASCII code is the octal value NNN. +'\\' + A backslash. +'\[' + Begin a sequence of non-printing characters. This could be used to + embed a terminal control sequence into the prompt. +'\]' + End a sequence of non-printing characters. + + The command number and the history number are usually different: the +history number of a command is its position in the history list, which +may include commands restored from the history file (*note Bash History +Facilities::), while the command number is the position in the sequence +of commands executed during the current shell session. + + After the string is decoded, it is expanded via parameter expansion, +command substitution, arithmetic expansion, and quote removal, subject +to the value of the 'promptvars' shell option (*note The Shopt +Builtin::). This can have unwanted side effects if escaped portions of +the string appear within command substitution or contain characters +special to word expansion. + + +File: bashref.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Controlling the Prompt, Up: Bash Features + +6.10 The Restricted Shell +========================= + +If Bash is started with the name 'rbash', or the '--restricted' or '-r' +option is supplied at invocation, the shell becomes restricted. A +restricted shell is used to set up an environment more controlled than +the standard shell. A restricted shell behaves identically to 'bash' +with the exception that the following are disallowed or not performed: + + * Changing directories with the 'cd' builtin. + * Setting or unsetting the values of the 'SHELL', 'PATH', 'HISTFILE', + 'ENV', or 'BASH_ENV' variables. + * Specifying command names containing slashes. + * Specifying a filename containing a slash as an argument to the '.' + builtin command. + * Specifying a filename containing a slash as an argument to the + 'history' builtin command. + * Specifying a filename containing a slash as an argument to the '-p' + option to the 'hash' builtin command. + * Importing function definitions from the shell environment at + startup. + * Parsing the value of 'SHELLOPTS' from the shell environment at + startup. + * Redirecting output using the '>', '>|', '<>', '>&', '&>', and '>>' + redirection operators. + * Using the 'exec' builtin to replace the shell with another command. + * Adding or deleting builtin commands with the '-f' and '-d' options + to the 'enable' builtin. + * Using the 'enable' builtin command to enable disabled shell + builtins. + * Specifying the '-p' option to the 'command' builtin. + * Turning off restricted mode with 'set +r' or 'set +o restricted'. + + These restrictions are enforced after any startup files are read. + + When a command that is found to be a shell script is executed (*note +Shell Scripts::), 'rbash' turns off any restrictions in the shell +spawned to execute the script. + + The restricted shell mode is only one component of a useful +restricted environment. It should be accompanied by setting 'PATH' to a +value that allows execution of only a few verified commands (commands +that allow shell escapes are particularly vulnerable), leaving the user +in a non-writable directory other than his home directory after login, +not allowing the restricted shell to execute shell scripts, and cleaning +the environment of variables that cause some commands to modify their +behavior (e.g., 'VISUAL' or 'PAGER'). + + Modern systems provide more secure ways to implement a restricted +environment, such as 'jails', 'zones', or 'containers'. + + +File: bashref.info, Node: Bash POSIX Mode, Next: Shell Compatibility Mode, Prev: The Restricted Shell, Up: Bash Features + +6.11 Bash POSIX Mode +==================== + +Starting Bash with the '--posix' command-line option or executing 'set +-o posix' while Bash is running will cause Bash to conform more closely +to the POSIX standard by changing the behavior to match that specified +by POSIX in areas where the Bash default differs. + + When invoked as 'sh', Bash enters POSIX mode after reading the +startup files. + + The following list is what's changed when 'POSIX mode' is in effect: + + 1. Bash ensures that the 'POSIXLY_CORRECT' variable is set. + + 2. When a command in the hash table no longer exists, Bash will + re-search '$PATH' to find the new location. This is also available + with 'shopt -s checkhash'. + + 3. Bash will not insert a command without the execute bit set into the + command hash table, even if it returns it as a (last-ditch) result + from a '$PATH' search. + + 4. The message printed by the job control code and builtins when a job + exits with a non-zero status is 'Done(status)'. + + 5. The message printed by the job control code and builtins when a job + is stopped is 'Stopped(SIGNAME)', where SIGNAME is, for example, + 'SIGTSTP'. + + 6. Alias expansion is always enabled, even in non-interactive shells. + + 7. Reserved words appearing in a context where reserved words are + recognized do not undergo alias expansion. + + 8. The POSIX 'PS1' and 'PS2' expansions of '!' to the history number + and '!!' to '!' are enabled, and parameter expansion is performed + on the values of 'PS1' and 'PS2' regardless of the setting of the + 'promptvars' option. + + 9. The POSIX startup files are executed ('$ENV') rather than the + normal Bash files. + + 10. Tilde expansion is only performed on assignments preceding a + command name, rather than on all assignment statements on the line. + + 11. The default history file is '~/.sh_history' (this is the default + value of '$HISTFILE'). + + 12. Redirection operators do not perform filename expansion on the + word in the redirection unless the shell is interactive. + + 13. Redirection operators do not perform word splitting on the word in + the redirection. + + 14. Function names must be valid shell 'name's. That is, they may not + contain characters other than letters, digits, and underscores, and + may not start with a digit. Declaring a function with an invalid + name causes a fatal syntax error in non-interactive shells. + + 15. Function names may not be the same as one of the POSIX special + builtins. + + 16. POSIX special builtins are found before shell functions during + command lookup. + + 17. When printing shell function definitions (e.g., by 'type'), Bash + does not print the 'function' keyword. + + 18. Literal tildes that appear as the first character in elements of + the 'PATH' variable are not expanded as described above under *note + Tilde Expansion::. + + 19. The 'time' reserved word may be used by itself as a command. When + used in this way, it displays timing statistics for the shell and + its completed children. The 'TIMEFORMAT' variable controls the + format of the timing information. + + 20. When parsing and expanding a ${...} expansion that appears within + double quotes, single quotes are no longer special and cannot be + used to quote a closing brace or other special character, unless + the operator is one of those defined to perform pattern removal. + In this case, they do not have to appear as matched pairs. + + 21. The parser does not recognize 'time' as a reserved word if the + next token begins with a '-'. + + 22. The '!' character does not introduce history expansion within a + double-quoted string, even if the 'histexpand' option is enabled. + + 23. If a POSIX special builtin returns an error status, a + non-interactive shell exits. The fatal errors are those listed in + the POSIX standard, and include things like passing incorrect + options, redirection errors, variable assignment errors for + assignments preceding the command name, and so on. + + 24. A non-interactive shell exits with an error status if a variable + assignment error occurs when no command name follows the assignment + statements. A variable assignment error occurs, for example, when + trying to assign a value to a readonly variable. + + 25. A non-interactive shell exits with an error status if a variable + assignment error occurs in an assignment statement preceding a + special builtin, but not with any other simple command. + + 26. A non-interactive shell exits with an error status if the + iteration variable in a 'for' statement or the selection variable + in a 'select' statement is a readonly variable. + + 27. Non-interactive shells exit if FILENAME in '.' FILENAME is not + found. + + 28. Non-interactive shells exit if a syntax error in an arithmetic + expansion results in an invalid expression. + + 29. Non-interactive shells exit if a parameter expansion error occurs. + + 30. Non-interactive shells exit if there is a syntax error in a script + read with the '.' or 'source' builtins, or in a string processed by + the 'eval' builtin. + + 31. While variable indirection is available, it may not be applied to + the '#' and '?' special parameters. + + 32. When expanding the '*' special parameter in a pattern context + where the expansion is double-quoted does not treat the '$*' as if + it were double-quoted. + + 33. Assignment statements preceding POSIX special builtins persist in + the shell environment after the builtin completes. + + 34. The 'command' builtin does not prevent builtins that take + assignment statements as arguments from expanding them as + assignment statements; when not in POSIX mode, assignment builtins + lose their assignment statement expansion properties when preceded + by 'command'. + + 35. The 'bg' builtin uses the required format to describe each job + placed in the background, which does not include an indication of + whether the job is the current or previous job. + + 36. The output of 'kill -l' prints all the signal names on a single + line, separated by spaces, without the 'SIG' prefix. + + 37. The 'kill' builtin does not accept signal names with a 'SIG' + prefix. + + 38. The 'export' and 'readonly' builtin commands display their output + in the format required by POSIX. + + 39. The 'trap' builtin displays signal names without the leading + 'SIG'. + + 40. The 'trap' builtin doesn't check the first argument for a possible + signal specification and revert the signal handling to the original + disposition if it is, unless that argument consists solely of + digits and is a valid signal number. If users want to reset the + handler for a given signal to the original disposition, they should + use '-' as the first argument. + + 41. 'trap -p' displays signals whose dispositions are set to SIG_DFL + and those that were ignored when the shell started. + + 42. The '.' and 'source' builtins do not search the current directory + for the filename argument if it is not found by searching 'PATH'. + + 43. Enabling POSIX mode has the effect of setting the + 'inherit_errexit' option, so subshells spawned to execute command + substitutions inherit the value of the '-e' option from the parent + shell. When the 'inherit_errexit' option is not enabled, Bash + clears the '-e' option in such subshells. + + 44. Enabling POSIX mode has the effect of setting the 'shift_verbose' + option, so numeric arguments to 'shift' that exceed the number of + positional parameters will result in an error message. + + 45. When the 'alias' builtin displays alias definitions, it does not + display them with a leading 'alias ' unless the '-p' option is + supplied. + + 46. When the 'set' builtin is invoked without options, it does not + display shell function names and definitions. + + 47. When the 'set' builtin is invoked without options, it displays + variable values without quotes, unless they contain shell + metacharacters, even if the result contains nonprinting characters. + + 48. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname + constructed from '$PWD' and the directory name supplied as an + argument does not refer to an existing directory, 'cd' will fail + instead of falling back to PHYSICAL mode. + + 49. When the 'cd' builtin cannot change a directory because the length + of the pathname constructed from '$PWD' and the directory name + supplied as an argument exceeds PATH_MAX when all symbolic links + are expanded, 'cd' will fail instead of attempting to use only the + supplied directory name. + + 50. The 'pwd' builtin verifies that the value it prints is the same as + the current directory, even if it is not asked to check the file + system with the '-P' option. + + 51. When listing the history, the 'fc' builtin does not include an + indication of whether or not a history entry has been modified. + + 52. The default editor used by 'fc' is 'ed'. + + 53. The 'type' and 'command' builtins will not report a non-executable + file as having been found, though the shell will attempt to execute + such a file if it is the only so-named file found in '$PATH'. + + 54. The 'vi' editing mode will invoke the 'vi' editor directly when + the 'v' command is run, instead of checking '$VISUAL' and + '$EDITOR'. + + 55. When the 'xpg_echo' option is enabled, Bash does not attempt to + interpret any arguments to 'echo' as options. Each argument is + displayed, after escape characters are converted. + + 56. The 'ulimit' builtin uses a block size of 512 bytes for the '-c' + and '-f' options. + + 57. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not + interrupt the 'wait' builtin and cause it to return immediately. + The trap command is run once for each child that exits. + + 58. The 'read' builtin may be interrupted by a signal for which a trap + has been set. If Bash receives a trapped signal while executing + 'read', the trap handler executes and 'read' returns an exit status + greater than 128. + + 59. Bash removes an exited background process's status from the list + of such statuses after the 'wait' builtin is used to obtain it. + + There is other POSIX behavior that Bash does not implement by default +even when in POSIX mode. Specifically: + + 1. The 'fc' builtin checks '$EDITOR' as a program to edit history + entries if 'FCEDIT' is unset, rather than defaulting directly to + 'ed'. 'fc' uses 'ed' if 'EDITOR' is unset. + + 2. As noted above, Bash requires the 'xpg_echo' option to be enabled + for the 'echo' builtin to be fully conformant. + + Bash can be configured to be POSIX-conformant by default, by +specifying the '--enable-strict-posix-default' to 'configure' when +building (*note Optional Features::). + + +File: bashref.info, Node: Shell Compatibility Mode, Prev: Bash POSIX Mode, Up: Bash Features + +6.12 Shell Compatibility Mode +============================= + +Bash-4.0 introduced the concept of a 'shell compatibility level', +specified as a set of options to the shopt builtin ('compat31', +'compat32', 'compat40', 'compat41', and so on). There is only one +current compatibility level - each option is mutually exclusive. The +compatibility level is intended to allow users to select behavior from +previous versions that is incompatible with newer versions while they +migrate scripts to use current features and behavior. It's intended to +be a temporary solution. + + This section does not mention behavior that is standard for a +particular version (e.g., setting 'compat32' means that quoting the rhs +of the regexp matching operator quotes special regexp characters in the +word, which is default behavior in bash-3.2 and above). + + If a user enables, say, 'compat32', it may affect the behavior of +other compatibility levels up to and including the current compatibility +level. The idea is that each compatibility level controls behavior that +changed in that version of Bash, but that behavior may have been present +in earlier versions. For instance, the change to use locale-based +comparisons with the '[[' command came in bash-4.1, and earlier versions +used ASCII-based comparisons, so enabling 'compat32' will enable +ASCII-based comparisons as well. That granularity may not be sufficient +for all uses, and as a result users should employ compatibility levels +carefully. Read the documentation for a particular feature to find out +the current behavior. + + Bash-4.3 introduced a new shell variable: 'BASH_COMPAT'. The value +assigned to this variable (a decimal version number like 4.2, or an +integer corresponding to the 'compat'NN option, like 42) determines the +compatibility level. + + Starting with bash-4.4, Bash has begun deprecating older +compatibility levels. Eventually, the options will be removed in favor +of 'BASH_COMPAT'. + + Bash-5.0 is the final version for which there will be an individual +shopt option for the previous version. Users should use 'BASH_COMPAT' +on bash-5.0 and later versions. + + The following table describes the behavior changes controlled by each +compatibility level setting. The 'compat'NN tag is used as shorthand +for setting the compatibility level to NN using one of the following +mechanisms. For versions prior to bash-5.0, the compatibility level may +be set using the corresponding 'compat'NN shopt option. For bash-4.3 +and later versions, the 'BASH_COMPAT' variable is preferred, and it is +required for bash-5.1 and later versions. + +'compat31' + * quoting the rhs of the '[[' command's regexp matching operator + (=~) has no special effect + +'compat32' + * interrupting a command list such as "a ; b ; c" causes the + execution of the next command in the list (in bash-4.0 and + later versions, the shell acts as if it received the + interrupt, so interrupting one command in a list aborts the + execution of the entire list) + +'compat40' + * the '<' and '>' operators to the '[[' command do not consider + the current locale when comparing strings; they use ASCII + ordering. Bash versions prior to bash-4.1 use ASCII collation + and strcmp(3); bash-4.1 and later use the current locale's + collation sequence and strcoll(3). + +'compat41' + * in posix mode, 'time' may be followed by options and still be + recognized as a reserved word (this is POSIX interpretation + 267) + * in posix mode, the parser requires that an even number of + single quotes occur in the WORD portion of a double-quoted + ${...} parameter expansion and treats them specially, so that + characters within the single quotes are considered quoted + (this is POSIX interpretation 221) + +'compat42' + * the replacement string in double-quoted pattern substitution + does not undergo quote removal, as it does in versions after + bash-4.2 + * in posix mode, single quotes are considered special when + expanding the WORD portion of a double-quoted ${...} parameter + expansion and can be used to quote a closing brace or other + special character (this is part of POSIX interpretation 221); + in later versions, single quotes are not special within + double-quoted word expansions + +'compat43' + * the shell does not print a warning message if an attempt is + made to use a quoted compound assignment as an argument to + declare (declare -a foo='(1 2)'). Later versions warn that + this usage is deprecated + * word expansion errors are considered non-fatal errors that + cause the current command to fail, even in posix mode (the + default behavior is to make them fatal errors that cause the + shell to exit) + * when executing a shell function, the loop state + (while/until/etc.) is not reset, so 'break' or 'continue' in + that function will break or continue loops in the calling + context. Bash-4.4 and later reset the loop state to prevent + this + +'compat44' + * the shell sets up the values used by 'BASH_ARGV' and + 'BASH_ARGC' so they can expand to the shell's positional + parameters even if extended debugging mode is not enabled + * a subshell inherits loops from its parent context, so 'break' + or 'continue' will cause the subshell to exit. Bash-5.0 and + later reset the loop state to prevent the exit + * variable assignments preceding builtins like 'export' and + 'readonly' that set attributes continue to affect variables + with the same name in the calling environment even if the + shell is not in posix mode + +'compat50 (set using BASH_COMPAT)' + * Bash-5.1 changed the way '$RANDOM' is generated to introduce + slightly more randomness. If the shell compatibility level is + set to 50 or lower, it reverts to the method from bash-5.0 and + previous versions, so seeding the random number generator by + assigning a value to 'RANDOM' will produce the same sequence + as in bash-5.0 + * If the command hash table is empty, Bash versions prior to + bash-5.1 printed an informational message to that effect, even + when producing output that can be reused as input. Bash-5.1 + suppresses that message when the '-l' option is supplied. + + +File: bashref.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top + +7 Job Control +************* + +This chapter discusses what job control is, how it works, and how Bash +allows you to access its facilities. + +* Menu: + +* Job Control Basics:: How job control works. +* Job Control Builtins:: Bash builtin commands used to interact + with job control. +* Job Control Variables:: Variables Bash uses to customize job + control. + + +File: bashref.info, Node: Job Control Basics, Next: Job Control Builtins, Up: Job Control + +7.1 Job Control Basics +====================== + +Job control refers to the ability to selectively stop (suspend) the +execution of processes and continue (resume) their execution at a later +point. A user typically employs this facility via an interactive +interface supplied jointly by the operating system kernel's terminal +driver and Bash. + + The shell associates a JOB with each pipeline. It keeps a table of +currently executing jobs, which may be listed with the 'jobs' command. +When Bash starts a job asynchronously, it prints a line that looks like: + [1] 25647 +indicating that this job is job number 1 and that the process ID of the +last process in the pipeline associated with this job is 25647. All of +the processes in a single pipeline are members of the same job. Bash +uses the JOB abstraction as the basis for job control. + + To facilitate the implementation of the user interface to job +control, the operating system maintains the notion of a current terminal +process group ID. Members of this process group (processes whose +process group ID is equal to the current terminal process group ID) +receive keyboard-generated signals such as 'SIGINT'. These processes +are said to be in the foreground. Background processes are those whose +process group ID differs from the terminal's; such processes are immune +to keyboard-generated signals. Only foreground processes are allowed to +read from or, if the user so specifies with 'stty tostop', write to the +terminal. Background processes which attempt to read from (write to +when 'stty tostop' is in effect) the terminal are sent a 'SIGTTIN' +('SIGTTOU') signal by the kernel's terminal driver, which, unless +caught, suspends the process. + + If the operating system on which Bash is running supports job +control, Bash contains facilities to use it. Typing the SUSPEND +character (typically '^Z', Control-Z) while a process is running causes +that process to be stopped and returns control to Bash. Typing the +DELAYED SUSPEND character (typically '^Y', Control-Y) causes the process +to be stopped when it attempts to read input from the terminal, and +control to be returned to Bash. The user then manipulates the state of +this job, using the 'bg' command to continue it in the background, the +'fg' command to continue it in the foreground, or the 'kill' command to +kill it. A '^Z' takes effect immediately, and has the additional side +effect of causing pending output and typeahead to be discarded. + + There are a number of ways to refer to a job in the shell. The +character '%' introduces a job specification (JOBSPEC). + + Job number 'n' may be referred to as '%n'. The symbols '%%' and '%+' +refer to the shell's notion of the current job, which is the last job +stopped while it was in the foreground or started in the background. A +single '%' (with no accompanying job specification) also refers to the +current job. The previous job may be referenced using '%-'. If there +is only a single job, '%+' and '%-' can both be used to refer to that +job. In output pertaining to jobs (e.g., the output of the 'jobs' +command), the current job is always flagged with a '+', and the previous +job with a '-'. + + A job may also be referred to using a prefix of the name used to +start it, or using a substring that appears in its command line. For +example, '%ce' refers to a stopped job whose command name begins with +'ce'. Using '%?ce', on the other hand, refers to any job containing the +string 'ce' in its command line. If the prefix or substring matches +more than one job, Bash reports an error. + + Simply naming a job can be used to bring it into the foreground: '%1' +is a synonym for 'fg %1', bringing job 1 from the background into the +foreground. Similarly, '%1 &' resumes job 1 in the background, +equivalent to 'bg %1' + + The shell learns immediately whenever a job changes state. Normally, +Bash waits until it is about to print a prompt before reporting changes +in a job's status so as to not interrupt any other output. If the '-b' +option to the 'set' builtin is enabled, Bash reports such changes +immediately (*note The Set Builtin::). Any trap on 'SIGCHLD' is +executed for each child process that exits. + + If an attempt to exit Bash is made while jobs are stopped, (or +running, if the 'checkjobs' option is enabled - see *note The Shopt +Builtin::), the shell prints a warning message, and if the 'checkjobs' +option is enabled, lists the jobs and their statuses. The 'jobs' +command may then be used to inspect their status. If a second attempt +to exit is made without an intervening command, Bash does not print +another warning, and any stopped jobs are terminated. + + When the shell is waiting for a job or process using the 'wait' +builtin, and job control is enabled, 'wait' will return when the job +changes state. The '-f' option causes 'wait' to wait until the job or +process terminates before returning. + + +File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables, Prev: Job Control Basics, Up: Job Control + +7.2 Job Control Builtins +======================== + +'bg' + bg [JOBSPEC ...] + + Resume each suspended job JOBSPEC in the background, as if it had + been started with '&'. If JOBSPEC is not supplied, the current job + is used. The return status is zero unless it is run when job + control is not enabled, or, when run with job control enabled, any + JOBSPEC was not found or specifies a job that was started without + job control. + +'fg' + fg [JOBSPEC] + + Resume the job JOBSPEC in the foreground and make it the current + job. If JOBSPEC is not supplied, the current job is used. The + return status is that of the command placed into the foreground, or + non-zero if run when job control is disabled or, when run with job + control enabled, JOBSPEC does not specify a valid job or JOBSPEC + specifies a job that was started without job control. + +'jobs' + jobs [-lnprs] [JOBSPEC] + jobs -x COMMAND [ARGUMENTS] + + The first form lists the active jobs. The options have the + following meanings: + + '-l' + List process IDs in addition to the normal information. + + '-n' + Display information only about jobs that have changed status + since the user was last notified of their status. + + '-p' + List only the process ID of the job's process group leader. + + '-r' + Display only running jobs. + + '-s' + Display only stopped jobs. + + If JOBSPEC is given, output is restricted to information about that + job. If JOBSPEC is not supplied, the status of all jobs is listed. + + If the '-x' option is supplied, 'jobs' replaces any JOBSPEC found + in COMMAND or ARGUMENTS with the corresponding process group ID, + and executes COMMAND, passing it ARGUMENTs, returning its exit + status. + +'kill' + kill [-s SIGSPEC] [-n SIGNUM] [-SIGSPEC] JOBSPEC or PID + kill -l|-L [EXIT_STATUS] + + Send a signal specified by SIGSPEC or SIGNUM to the process named + by job specification JOBSPEC or process ID PID. SIGSPEC is either + a case-insensitive signal name such as 'SIGINT' (with or without + the 'SIG' prefix) or a signal number; SIGNUM is a signal number. + If SIGSPEC and SIGNUM are not present, 'SIGTERM' is used. The '-l' + option lists the signal names. If any arguments are supplied when + '-l' is given, the names of the signals corresponding to the + arguments are listed, and the return status is zero. EXIT_STATUS + is a number specifying a signal number or the exit status of a + process terminated by a signal. The '-L' option is equivalent to + '-l'. The return status is zero if at least one signal was + successfully sent, or non-zero if an error occurs or an invalid + option is encountered. + +'wait' + wait [-fn] [-p VARNAME] [JOBSPEC or PID ...] + + Wait until the child process specified by each process ID PID or + job specification JOBSPEC exits and return the exit status of the + last command waited for. If a job spec is given, all processes in + the job are waited for. If no arguments are given, 'wait' waits + for all running background jobs and the last-executed process + substitution, if its process id is the same as $!, and the return + status is zero. If the '-n' option is supplied, 'wait' waits for a + single job from the list of PIDS or JOBSPECS or, if no arguments + are supplied, any job, to complete and returns its exit status. If + none of the supplied arguments is a child of the shell, or if no + arguments are supplied and the shell has no unwaited-for children, + the exit status is 127. If the '-p' option is supplied, the + process or job identifier of the job for which the exit status is + returned is assigned to the variable VARNAME named by the option + argument. The variable will be unset initially, before any + assignment. This is useful only when the '-n' option is supplied. + Supplying the '-f' option, when job control is enabled, forces + 'wait' to wait for each PID or JOBSPEC to terminate before + returning its status, intead of returning when it changes status. + If neither JOBSPEC nor PID specifies an active child process of the + shell, the return status is 127. + +'disown' + disown [-ar] [-h] [JOBSPEC ... | PID ... ] + + Without options, remove each JOBSPEC from the table of active jobs. + If the '-h' option is given, the job is not removed from the table, + but is marked so that 'SIGHUP' is not sent to the job if the shell + receives a 'SIGHUP'. If JOBSPEC is not present, and neither the + '-a' nor the '-r' option is supplied, the current job is used. If + no JOBSPEC is supplied, the '-a' option means to remove or mark all + jobs; the '-r' option without a JOBSPEC argument restricts + operation to running jobs. + +'suspend' + suspend [-f] + + Suspend the execution of this shell until it receives a 'SIGCONT' + signal. A login shell cannot be suspended; the '-f' option can be + used to override this and force the suspension. + + When job control is not active, the 'kill' and 'wait' builtins do not +accept JOBSPEC arguments. They must be supplied process IDs. + + +File: bashref.info, Node: Job Control Variables, Prev: Job Control Builtins, Up: Job Control + +7.3 Job Control Variables +========================= + +'auto_resume' + This variable controls how the shell interacts with the user and + job control. If this variable exists then single word simple + commands without redirections are treated as candidates for + resumption of an existing job. There is no ambiguity allowed; if + there is more than one job beginning with the string typed, then + the most recently accessed job will be selected. The name of a + stopped job, in this context, is the command line used to start it. + If this variable is set to the value 'exact', the string supplied + must match the name of a stopped job exactly; if set to + 'substring', the string supplied needs to match a substring of the + name of a stopped job. The 'substring' value provides + functionality analogous to the '%?' job ID (*note Job Control + Basics::). If set to any other value, the supplied string must be + a prefix of a stopped job's name; this provides functionality + analogous to the '%' job ID. + + +File: bashref.info, Node: Command Line Editing, Next: Using History Interactively, Prev: Job Control, Up: Top + +8 Command Line Editing +********************** + +This chapter describes the basic features of the GNU command line +editing interface. Command line editing is provided by the Readline +library, which is used by several different programs, including Bash. +Command line editing is enabled by default when using an interactive +shell, unless the '--noediting' option is supplied at shell invocation. +Line editing is also used when using the '-e' option to the 'read' +builtin command (*note Bash Builtins::). By default, the line editing +commands are similar to those of Emacs. A vi-style line editing +interface is also available. Line editing can be enabled at any time +using the '-o emacs' or '-o vi' options to the 'set' builtin command +(*note The Set Builtin::), or disabled using the '+o emacs' or '+o vi' +options to 'set'. + +* Menu: + +* Introduction and Notation:: Notation used in this text. +* Readline Interaction:: The minimum set of commands for editing a line. +* Readline Init File:: Customizing Readline from a user's view. +* Bindable Readline Commands:: A description of most of the Readline commands + available for binding +* Readline vi Mode:: A short description of how to make Readline + behave like the vi editor. +* Programmable Completion:: How to specify the possible completions for + a specific command. +* Programmable Completion Builtins:: Builtin commands to specify how to + complete arguments for a particular command. +* A Programmable Completion Example:: An example shell function for + generating possible completions. + + +File: bashref.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing + +8.1 Introduction to Line Editing +================================ + +The following paragraphs describe the notation used to represent +keystrokes. + + The text 'C-k' is read as 'Control-K' and describes the character +produced when the key is pressed while the Control key is depressed. + + The text 'M-k' is read as 'Meta-K' and describes the character +produced when the Meta key (if you have one) is depressed, and the +key is pressed. The Meta key is labeled on many keyboards. On +keyboards with two keys labeled (usually to either side of the +space bar), the on the left side is generally set to work as a +Meta key. The key on the right may also be configured to work as +a Meta key or may be configured as some other modifier, such as a +Compose key for typing accented characters. + + If you do not have a Meta or key, or another key working as a +Meta key, the identical keystroke can be generated by typing +_first_, and then typing . Either process is known as "metafying" +the key. + + The text 'M-C-k' is read as 'Meta-Control-k' and describes the +character produced by "metafying" 'C-k'. + + In addition, several keys have their own names. Specifically, , +, , , , and all stand for themselves when seen +in this text, or in an init file (*note Readline Init File::). If your +keyboard lacks a key, typing will produce the desired +character. The key may be labeled or on some +keyboards. + + +File: bashref.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing + +8.2 Readline Interaction +======================== + +Often during an interactive session you type in a long line of text, +only to notice that the first word on the line is misspelled. The +Readline library gives you a set of commands for manipulating the text +as you type it in, allowing you to just fix your typo, and not forcing +you to retype the majority of the line. Using these editing commands, +you move the cursor to the place that needs correction, and delete or +insert the text of the corrections. Then, when you are satisfied with +the line, you simply press . You do not have to be at the end of +the line to press ; the entire line is accepted regardless of the +location of the cursor within the line. + +* Menu: + +* Readline Bare Essentials:: The least you need to know about Readline. +* Readline Movement Commands:: Moving about the input line. +* Readline Killing Commands:: How to delete text, and how to get it back! +* Readline Arguments:: Giving numeric arguments to commands. +* Searching:: Searching through previous lines. + + +File: bashref.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction + +8.2.1 Readline Bare Essentials +------------------------------ + +In order to enter characters into the line, simply type them. The typed +character appears where the cursor was, and then the cursor moves one +space to the right. If you mistype a character, you can use your erase +character to back up and delete the mistyped character. + + Sometimes you may mistype a character, and not notice the error until +you have typed several other characters. In that case, you can type +'C-b' to move the cursor to the left, and then correct your mistake. +Afterwards, you can move the cursor to the right with 'C-f'. + + When you add text in the middle of a line, you will notice that +characters to the right of the cursor are 'pushed over' to make room for +the text that you have inserted. Likewise, when you delete text behind +the cursor, characters to the right of the cursor are 'pulled back' to +fill in the blank space created by the removal of the text. A list of +the bare essentials for editing the text of an input line follows. + +'C-b' + Move back one character. +'C-f' + Move forward one character. + or + Delete the character to the left of the cursor. +'C-d' + Delete the character underneath the cursor. +Printing characters + Insert the character into the line at the cursor. +'C-_' or 'C-x C-u' + Undo the last editing command. You can undo all the way back to an + empty line. + +(Depending on your configuration, the key be set to delete +the character to the left of the cursor and the key set to delete +the character underneath the cursor, like 'C-d', rather than the +character to the left of the cursor.) + + +File: bashref.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction + +8.2.2 Readline Movement Commands +-------------------------------- + +The above table describes the most basic keystrokes that you need in +order to do editing of the input line. For your convenience, many other +commands have been added in addition to 'C-b', 'C-f', 'C-d', and . +Here are some commands for moving more rapidly about the line. + +'C-a' + Move to the start of the line. +'C-e' + Move to the end of the line. +'M-f' + Move forward a word, where a word is composed of letters and + digits. +'M-b' + Move backward a word. +'C-l' + Clear the screen, reprinting the current line at the top. + + Notice how 'C-f' moves forward a character, while 'M-f' moves forward +a word. It is a loose convention that control keystrokes operate on +characters while meta keystrokes operate on words. + + +File: bashref.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction + +8.2.3 Readline Killing Commands +------------------------------- + +"Killing" text means to delete the text from the line, but to save it +away for later use, usually by "yanking" (re-inserting) it back into the +line. ('Cut' and 'paste' are more recent jargon for 'kill' and 'yank'.) + + If the description for a command says that it 'kills' text, then you +can be sure that you can get the text back in a different (or the same) +place later. + + When you use a kill command, the text is saved in a "kill-ring". Any +number of consecutive kills save all of the killed text together, so +that when you yank it back, you get it all. The kill ring is not line +specific; the text that you killed on a previously typed line is +available to be yanked back later, when you are typing another line. + + Here is the list of commands for killing text. + +'C-k' + Kill the text from the current cursor position to the end of the + line. + +'M-d' + Kill from the cursor to the end of the current word, or, if between + words, to the end of the next word. Word boundaries are the same + as those used by 'M-f'. + +'M-' + Kill from the cursor the start of the current word, or, if between + words, to the start of the previous word. Word boundaries are the + same as those used by 'M-b'. + +'C-w' + Kill from the cursor to the previous whitespace. This is different + than 'M-' because the word boundaries differ. + + Here is how to "yank" the text back into the line. Yanking means to +copy the most-recently-killed text from the kill buffer. + +'C-y' + Yank the most recently killed text back into the buffer at the + cursor. + +'M-y' + Rotate the kill-ring, and yank the new top. You can only do this + if the prior command is 'C-y' or 'M-y'. + + +File: bashref.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction + +8.2.4 Readline Arguments +------------------------ + +You can pass numeric arguments to Readline commands. Sometimes the +argument acts as a repeat count, other times it is the sign of the +argument that is significant. If you pass a negative argument to a +command which normally acts in a forward direction, that command will +act in a backward direction. For example, to kill text back to the +start of the line, you might type 'M-- C-k'. + + The general way to pass numeric arguments to a command is to type +meta digits before the command. If the first 'digit' typed is a minus +sign ('-'), then the sign of the argument will be negative. Once you +have typed one meta digit to get the argument started, you can type the +remainder of the digits, and then the command. For example, to give the +'C-d' command an argument of 10, you could type 'M-1 0 C-d', which will +delete the next ten characters on the input line. + + +File: bashref.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction + +8.2.5 Searching for Commands in the History +------------------------------------------- + +Readline provides commands for searching through the command history +(*note Bash History Facilities::) for lines containing a specified +string. There are two search modes: "incremental" and +"non-incremental". + + Incremental searches begin before the user has finished typing the +search string. As each character of the search string is typed, +Readline displays the next entry from the history matching the string +typed so far. An incremental search requires only as many characters as +needed to find the desired history entry. To search backward in the +history for a particular string, type 'C-r'. Typing 'C-s' searches +forward through the history. The characters present in the value of the +'isearch-terminators' variable are used to terminate an incremental +search. If that variable has not been assigned a value, the and +'C-J' characters will terminate an incremental search. 'C-g' will abort +an incremental search and restore the original line. When the search is +terminated, the history entry containing the search string becomes the +current line. + + To find other matching entries in the history list, type 'C-r' or +'C-s' as appropriate. This will search backward or forward in the +history for the next entry matching the search string typed so far. Any +other key sequence bound to a Readline command will terminate the search +and execute that command. For instance, a will terminate the +search and accept the line, thereby executing the command from the +history list. A movement command will terminate the search, make the +last line found the current line, and begin editing. + + Readline remembers the last incremental search string. If two 'C-r's +are typed without any intervening characters defining a new search +string, any remembered search string is used. + + Non-incremental searches read the entire search string before +starting to search for matching history lines. The search string may be +typed by the user or be part of the contents of the current line. + + +File: bashref.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing + +8.3 Readline Init File +====================== + +Although the Readline library comes with a set of Emacs-like keybindings +installed by default, it is possible to use a different set of +keybindings. Any user can customize programs that use Readline by +putting commands in an "inputrc" file, conventionally in his home +directory. The name of this file is taken from the value of the shell +variable 'INPUTRC'. If that variable is unset, the default is +'~/.inputrc'. If that file does not exist or cannot be read, the +ultimate default is '/etc/inputrc'. The 'bind' builtin command can also +be used to set Readline keybindings and variables. *Note Bash +Builtins::. + + When a program which uses the Readline library starts up, the init +file is read, and the key bindings are set. + + In addition, the 'C-x C-r' command re-reads this init file, thus +incorporating any changes that you might have made to it. + +* Menu: + +* Readline Init File Syntax:: Syntax for the commands in the inputrc file. + +* Conditional Init Constructs:: Conditional key bindings in the inputrc file. + +* Sample Init File:: An example inputrc file. + + +File: bashref.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File + +8.3.1 Readline Init File Syntax +------------------------------- + +There are only a few basic constructs allowed in the Readline init file. +Blank lines are ignored. Lines beginning with a '#' are comments. +Lines beginning with a '$' indicate conditional constructs (*note +Conditional Init Constructs::). Other lines denote variable settings +and key bindings. + +Variable Settings + You can modify the run-time behavior of Readline by altering the + values of variables in Readline using the 'set' command within the + init file. The syntax is simple: + + set VARIABLE VALUE + + Here, for example, is how to change from the default Emacs-like key + binding to use 'vi' line editing commands: + + set editing-mode vi + + Variable names and values, where appropriate, are recognized + without regard to case. Unrecognized variable names are ignored. + + Boolean variables (those that can be set to on or off) are set to + on if the value is null or empty, ON (case-insensitive), or 1. Any + other value results in the variable being set to off. + + The 'bind -V' command lists the current Readline variable names and + values. *Note Bash Builtins::. + + A great deal of run-time behavior is changeable with the following + variables. + + 'bell-style' + Controls what happens when Readline wants to ring the terminal + bell. If set to 'none', Readline never rings the bell. If + set to 'visible', Readline uses a visible bell if one is + available. If set to 'audible' (the default), Readline + attempts to ring the terminal's bell. + + 'bind-tty-special-chars' + If set to 'on' (the default), Readline attempts to bind the + control characters treated specially by the kernel's terminal + driver to their Readline equivalents. + + 'blink-matching-paren' + If set to 'on', Readline attempts to briefly move the cursor + to an opening parenthesis when a closing parenthesis is + inserted. The default is 'off'. + + 'colored-completion-prefix' + If set to 'on', when listing completions, Readline displays + the common prefix of the set of possible completions using a + different color. The color definitions are taken from the + value of the 'LS_COLORS' environment variable. The default is + 'off'. + + 'colored-stats' + If set to 'on', Readline displays possible completions using + different colors to indicate their file type. The color + definitions are taken from the value of the 'LS_COLORS' + environment variable. The default is 'off'. + + 'comment-begin' + The string to insert at the beginning of the line when the + 'insert-comment' command is executed. The default value is + '"#"'. + + 'completion-display-width' + The number of screen columns used to display possible matches + when performing completion. The value is ignored if it is + less than 0 or greater than the terminal screen width. A + value of 0 will cause matches to be displayed one per line. + The default value is -1. + + 'completion-ignore-case' + If set to 'on', Readline performs filename matching and + completion in a case-insensitive fashion. The default value + is 'off'. + + 'completion-map-case' + If set to 'on', and COMPLETION-IGNORE-CASE is enabled, + Readline treats hyphens ('-') and underscores ('_') as + equivalent when performing case-insensitive filename matching + and completion. The default value is 'off'. + + 'completion-prefix-display-length' + The length in characters of the common prefix of a list of + possible completions that is displayed without modification. + When set to a value greater than zero, common prefixes longer + than this value are replaced with an ellipsis when displaying + possible completions. + + 'completion-query-items' + The number of possible completions that determines when the + user is asked whether the list of possibilities should be + displayed. If the number of possible completions is greater + than or equal to this value, Readline will ask whether or not + the user wishes to view them; otherwise, they are simply + listed. This variable must be set to an integer value greater + than or equal to 0. A negative value means Readline should + never ask. The default limit is '100'. + + 'convert-meta' + If set to 'on', Readline will convert characters with the + eighth bit set to an ASCII key sequence by stripping the + eighth bit and prefixing an character, converting them + to a meta-prefixed key sequence. The default value is 'on', + but will be set to 'off' if the locale is one that contains + eight-bit characters. + + 'disable-completion' + If set to 'On', Readline will inhibit word completion. + Completion characters will be inserted into the line as if + they had been mapped to 'self-insert'. The default is 'off'. + + 'echo-control-characters' + When set to 'on', on operating systems that indicate they + support it, readline echoes a character corresponding to a + signal generated from the keyboard. The default is 'on'. + + 'editing-mode' + The 'editing-mode' variable controls which default set of key + bindings is used. By default, Readline starts up in Emacs + editing mode, where the keystrokes are most similar to Emacs. + This variable can be set to either 'emacs' or 'vi'. + + 'emacs-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when emacs editing mode is active. The value is + expanded like a key binding, so the standard set of meta- and + control prefixes and backslash escape sequences is available. + Use the '\1' and '\2' escapes to begin and end sequences of + non-printing characters, which can be used to embed a terminal + control sequence into the mode string. The default is '@'. + + 'enable-bracketed-paste' + When set to 'On', Readline will configure the terminal in a + way that will enable it to insert each paste into the editing + buffer as a single string of characters, instead of treating + each character as if it had been read from the keyboard. This + can prevent pasted characters from being interpreted as + editing commands. The default is 'On'. + + 'enable-keypad' + When set to 'on', Readline will try to enable the application + keypad when it is called. Some systems need this to enable + the arrow keys. The default is 'off'. + + 'enable-meta-key' + When set to 'on', Readline will try to enable any meta + modifier key the terminal claims to support when it is called. + On many terminals, the meta key is used to send eight-bit + characters. The default is 'on'. + + 'expand-tilde' + If set to 'on', tilde expansion is performed when Readline + attempts word completion. The default is 'off'. + + 'history-preserve-point' + If set to 'on', the history code attempts to place the point + (the current cursor position) at the same location on each + history line retrieved with 'previous-history' or + 'next-history'. The default is 'off'. + + 'history-size' + Set the maximum number of history entries saved in the history + list. If set to zero, any existing history entries are + deleted and no new entries are saved. If set to a value less + than zero, the number of history entries is not limited. By + default, the number of history entries is not limited. If an + attempt is made to set HISTORY-SIZE to a non-numeric value, + the maximum number of history entries will be set to 500. + + 'horizontal-scroll-mode' + This variable can be set to either 'on' or 'off'. Setting it + to 'on' means that the text of the lines being edited will + scroll horizontally on a single screen line when they are + longer than the width of the screen, instead of wrapping onto + a new screen line. This variable is automatically set to 'on' + for terminals of height 1. By default, this variable is set + to 'off'. + + 'input-meta' + If set to 'on', Readline will enable eight-bit input (it will + not clear the eighth bit in the characters it reads), + regardless of what the terminal claims it can support. The + default value is 'off', but Readline will set it to 'on' if + the locale contains eight-bit characters. The name + 'meta-flag' is a synonym for this variable. + + 'isearch-terminators' + The string of characters that should terminate an incremental + search without subsequently executing the character as a + command (*note Searching::). If this variable has not been + given a value, the characters and 'C-J' will terminate + an incremental search. + + 'keymap' + Sets Readline's idea of the current keymap for key binding + commands. Built-in 'keymap' names are 'emacs', + 'emacs-standard', 'emacs-meta', 'emacs-ctlx', 'vi', 'vi-move', + 'vi-command', and 'vi-insert'. 'vi' is equivalent to + 'vi-command' ('vi-move' is also a synonym); 'emacs' is + equivalent to 'emacs-standard'. Applications may add + additional names. The default value is 'emacs'. The value of + the 'editing-mode' variable also affects the default keymap. + + 'keyseq-timeout' + Specifies the duration Readline will wait for a character when + reading an ambiguous key sequence (one that can form a + complete key sequence using the input read so far, or can take + additional input to complete a longer key sequence). If no + input is received within the timeout, Readline will use the + shorter but complete key sequence. Readline uses this value + to determine whether or not input is available on the current + input source ('rl_instream' by default). The value is + specified in milliseconds, so a value of 1000 means that + Readline will wait one second for additional input. If this + variable is set to a value less than or equal to zero, or to a + non-numeric value, Readline will wait until another key is + pressed to decide which key sequence to complete. The default + value is '500'. + + 'mark-directories' + If set to 'on', completed directory names have a slash + appended. The default is 'on'. + + 'mark-modified-lines' + This variable, when set to 'on', causes Readline to display an + asterisk ('*') at the start of history lines which have been + modified. This variable is 'off' by default. + + 'mark-symlinked-directories' + If set to 'on', completed names which are symbolic links to + directories have a slash appended (subject to the value of + 'mark-directories'). The default is 'off'. + + 'match-hidden-files' + This variable, when set to 'on', causes Readline to match + files whose names begin with a '.' (hidden files) when + performing filename completion. If set to 'off', the leading + '.' must be supplied by the user in the filename to be + completed. This variable is 'on' by default. + + 'menu-complete-display-prefix' + If set to 'on', menu completion displays the common prefix of + the list of possible completions (which may be empty) before + cycling through the list. The default is 'off'. + + 'output-meta' + If set to 'on', Readline will display characters with the + eighth bit set directly rather than as a meta-prefixed escape + sequence. The default is 'off', but Readline will set it to + 'on' if the locale contains eight-bit characters. + + 'page-completions' + If set to 'on', Readline uses an internal 'more'-like pager to + display a screenful of possible completions at a time. This + variable is 'on' by default. + + 'print-completions-horizontally' + If set to 'on', Readline will display completions with matches + sorted horizontally in alphabetical order, rather than down + the screen. The default is 'off'. + + 'revert-all-at-newline' + If set to 'on', Readline will undo all changes to history + lines before returning when 'accept-line' is executed. By + default, history lines may be modified and retain individual + undo lists across calls to 'readline'. The default is 'off'. + + 'show-all-if-ambiguous' + This alters the default behavior of the completion functions. + If set to 'on', words which have more than one possible + completion cause the matches to be listed immediately instead + of ringing the bell. The default value is 'off'. + + 'show-all-if-unmodified' + This alters the default behavior of the completion functions + in a fashion similar to SHOW-ALL-IF-AMBIGUOUS. If set to + 'on', words which have more than one possible completion + without any possible partial completion (the possible + completions don't share a common prefix) cause the matches to + be listed immediately instead of ringing the bell. The + default value is 'off'. + + 'show-mode-in-prompt' + If set to 'on', add a string to the beginning of the prompt + indicating the editing mode: emacs, vi command, or vi + insertion. The mode strings are user-settable (e.g., + EMACS-MODE-STRING). The default value is 'off'. + + 'skip-completed-text' + If set to 'on', this alters the default completion behavior + when inserting a single match into the line. It's only active + when performing completion in the middle of a word. If + enabled, readline does not insert characters from the + completion that match characters after point in the word being + completed, so portions of the word following the cursor are + not duplicated. For instance, if this is enabled, attempting + completion when the cursor is after the 'e' in 'Makefile' will + result in 'Makefile' rather than 'Makefilefile', assuming + there is a single possible completion. The default value is + 'off'. + + 'vi-cmd-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when vi editing mode is active and in command mode. + The value is expanded like a key binding, so the standard set + of meta- and control prefixes and backslash escape sequences + is available. Use the '\1' and '\2' escapes to begin and end + sequences of non-printing characters, which can be used to + embed a terminal control sequence into the mode string. The + default is '(cmd)'. + + 'vi-ins-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when vi editing mode is active and in insertion mode. + The value is expanded like a key binding, so the standard set + of meta- and control prefixes and backslash escape sequences + is available. Use the '\1' and '\2' escapes to begin and end + sequences of non-printing characters, which can be used to + embed a terminal control sequence into the mode string. The + default is '(ins)'. + + 'visible-stats' + If set to 'on', a character denoting a file's type is appended + to the filename when listing possible completions. The + default is 'off'. + +Key Bindings + The syntax for controlling key bindings in the init file is simple. + First you need to find the name of the command that you want to + change. The following sections contain tables of the command name, + the default keybinding, if any, and a short description of what the + command does. + + Once you know the name of the command, simply place on a line in + the init file the name of the key you wish to bind the command to, + a colon, and then the name of the command. There can be no space + between the key name and the colon - that will be interpreted as + part of the key name. The name of the key can be expressed in + different ways, depending on what you find most comfortable. + + In addition to command names, readline allows keys to be bound to a + string that is inserted when the key is pressed (a MACRO). + + The 'bind -p' command displays Readline function names and bindings + in a format that can put directly into an initialization file. + *Note Bash Builtins::. + + KEYNAME: FUNCTION-NAME or MACRO + KEYNAME is the name of a key spelled out in English. For + example: + Control-u: universal-argument + Meta-Rubout: backward-kill-word + Control-o: "> output" + + In the example above, 'C-u' is bound to the function + 'universal-argument', 'M-DEL' is bound to the function + 'backward-kill-word', and 'C-o' is bound to run the macro + expressed on the right hand side (that is, to insert the text + '> output' into the line). + + A number of symbolic character names are recognized while + processing this key binding syntax: DEL, ESC, ESCAPE, LFD, + NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB. + + "KEYSEQ": FUNCTION-NAME or MACRO + KEYSEQ differs from KEYNAME above in that strings denoting an + entire key sequence can be specified, by placing the key + sequence in double quotes. Some GNU Emacs style key escapes + can be used, as in the following example, but the special + character names are not recognized. + + "\C-u": universal-argument + "\C-x\C-r": re-read-init-file + "\e[11~": "Function Key 1" + + In the above example, 'C-u' is again bound to the function + 'universal-argument' (just as it was in the first example), + ''C-x' 'C-r'' is bound to the function 're-read-init-file', + and ' <[> <1> <1> <~>' is bound to insert the text + 'Function Key 1'. + + The following GNU Emacs style escape sequences are available when + specifying key sequences: + + '\C-' + control prefix + '\M-' + meta prefix + '\e' + an escape character + '\\' + backslash + '\"' + <">, a double quotation mark + '\'' + <'>, a single quote or apostrophe + + In addition to the GNU Emacs style escape sequences, a second set + of backslash escapes is available: + + '\a' + alert (bell) + '\b' + backspace + '\d' + delete + '\f' + form feed + '\n' + newline + '\r' + carriage return + '\t' + horizontal tab + '\v' + vertical tab + '\NNN' + the eight-bit character whose value is the octal value NNN + (one to three digits) + '\xHH' + the eight-bit character whose value is the hexadecimal value + HH (one or two hex digits) + + When entering the text of a macro, single or double quotes must be + used to indicate a macro definition. Unquoted text is assumed to + be a function name. In the macro body, the backslash escapes + described above are expanded. Backslash will quote any other + character in the macro text, including '"' and '''. For example, + the following binding will make ''C-x' \' insert a single '\' into + the line: + "\C-x\\": "\\" + + +File: bashref.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File + +8.3.2 Conditional Init Constructs +--------------------------------- + +Readline implements a facility similar in spirit to the conditional +compilation features of the C preprocessor which allows key bindings and +variable settings to be performed as the result of tests. There are +four parser directives used. + +'$if' + The '$if' construct allows bindings to be made based on the editing + mode, the terminal being used, or the application using Readline. + The text of the test, after any comparison operator, extends to the + end of the line; unless otherwise noted, no characters are required + to isolate it. + + 'mode' + The 'mode=' form of the '$if' directive is used to test + whether Readline is in 'emacs' or 'vi' mode. This may be used + in conjunction with the 'set keymap' command, for instance, to + set bindings in the 'emacs-standard' and 'emacs-ctlx' keymaps + only if Readline is starting out in 'emacs' mode. + + 'term' + The 'term=' form may be used to include terminal-specific key + bindings, perhaps to bind the key sequences output by the + terminal's function keys. The word on the right side of the + '=' is tested against both the full name of the terminal and + the portion of the terminal name before the first '-'. This + allows 'sun' to match both 'sun' and 'sun-cmd', for instance. + + 'version' + The 'version' test may be used to perform comparisons against + specific Readline versions. The 'version' expands to the + current Readline version. The set of comparison operators + includes '=' (and '=='), '!=', '<=', '>=', '<', and '>'. The + version number supplied on the right side of the operator + consists of a major version number, an optional decimal point, + and an optional minor version (e.g., '7.1'). If the minor + version is omitted, it is assumed to be '0'. The operator may + be separated from the string 'version' and from the version + number argument by whitespace. The following example sets a + variable if the Readline version being used is 7.0 or newer: + $if version >= 7.0 + set show-mode-in-prompt on + $endif + + 'application' + The APPLICATION construct is used to include + application-specific settings. Each program using the + Readline library sets the APPLICATION NAME, and you can test + for a particular value. This could be used to bind key + sequences to functions useful for a specific program. For + instance, the following command adds a key sequence that + quotes the current or previous word in Bash: + $if Bash + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + $endif + + 'variable' + The VARIABLE construct provides simple equality tests for + Readline variables and values. The permitted comparison + operators are '=', '==', and '!='. The variable name must be + separated from the comparison operator by whitespace; the + operator may be separated from the value on the right hand + side by whitespace. Both string and boolean variables may be + tested. Boolean variables must be tested against the values + ON and OFF. The following example is equivalent to the + 'mode=emacs' test described above: + $if editing-mode == emacs + set show-mode-in-prompt on + $endif + +'$endif' + This command, as seen in the previous example, terminates an '$if' + command. + +'$else' + Commands in this branch of the '$if' directive are executed if the + test fails. + +'$include' + This directive takes a single filename as an argument and reads + commands and bindings from that file. For example, the following + directive reads from '/etc/inputrc': + $include /etc/inputrc + + +File: bashref.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File + +8.3.3 Sample Init File +---------------------- + +Here is an example of an INPUTRC file. This illustrates key binding, +variable assignment, and conditional syntax. + + # This file controls the behaviour of line input editing for + # programs that use the GNU Readline library. Existing + # programs include FTP, Bash, and GDB. + # + # You can re-read the inputrc file with C-x C-r. + # Lines beginning with '#' are comments. + # + # First, include any system-wide bindings and variable + # assignments from /etc/Inputrc + $include /etc/Inputrc + + # + # Set various bindings for emacs mode. + + set editing-mode emacs + + $if mode=emacs + + Meta-Control-h: backward-kill-word Text after the function name is ignored + + # + # Arrow keys in keypad mode + # + #"\M-OD": backward-char + #"\M-OC": forward-char + #"\M-OA": previous-history + #"\M-OB": next-history + # + # Arrow keys in ANSI mode + # + "\M-[D": backward-char + "\M-[C": forward-char + "\M-[A": previous-history + "\M-[B": next-history + # + # Arrow keys in 8 bit keypad mode + # + #"\M-\C-OD": backward-char + #"\M-\C-OC": forward-char + #"\M-\C-OA": previous-history + #"\M-\C-OB": next-history + # + # Arrow keys in 8 bit ANSI mode + # + #"\M-\C-[D": backward-char + #"\M-\C-[C": forward-char + #"\M-\C-[A": previous-history + #"\M-\C-[B": next-history + + C-q: quoted-insert + + $endif + + # An old-style binding. This happens to be the default. + TAB: complete + + # Macros that are convenient for shell interaction + $if Bash + # edit the path + "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" + # prepare to type a quoted word -- + # insert open and close double quotes + # and move to just after the open quote + "\C-x\"": "\"\"\C-b" + # insert a backslash (testing backslash escapes + # in sequences and macros) + "\C-x\\": "\\" + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + # Add a binding to refresh the line, which is unbound + "\C-xr": redraw-current-line + # Edit variable on current line. + "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" + $endif + + # use a visible bell if one is available + set bell-style visible + + # don't strip characters to 7 bits when reading + set input-meta on + + # allow iso-latin1 characters to be inserted rather + # than converted to prefix-meta sequences + set convert-meta off + + # display characters with the eighth bit set directly + # rather than as meta-prefixed characters + set output-meta on + + # if there are 150 or more possible completions for a word, + # ask whether or not the user wants to see all of them + set completion-query-items 150 + + # For FTP + $if Ftp + "\C-xg": "get \M-?" + "\C-xt": "put \M-?" + "\M-.": yank-last-arg + $endif + + +File: bashref.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing + +8.4 Bindable Readline Commands +============================== + +* Menu: + +* Commands For Moving:: Moving about the line. +* Commands For History:: Getting at previous lines. +* Commands For Text:: Commands for changing text. +* Commands For Killing:: Commands for killing and yanking. +* Numeric Arguments:: Specifying numeric arguments, repeat counts. +* Commands For Completion:: Getting Readline to do the typing for you. +* Keyboard Macros:: Saving and re-executing typed characters +* Miscellaneous Commands:: Other miscellaneous commands. + +This section describes Readline commands that may be bound to key +sequences. You can list your key bindings by executing 'bind -P' or, +for a more terse format, suitable for an INPUTRC file, 'bind -p'. +(*Note Bash Builtins::.) Command names without an accompanying key +sequence are unbound by default. + + In the following descriptions, "point" refers to the current cursor +position, and "mark" refers to a cursor position saved by the 'set-mark' +command. The text between the point and mark is referred to as the +"region". + + +File: bashref.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands + +8.4.1 Commands For Moving +------------------------- + +'beginning-of-line (C-a)' + Move to the start of the current line. + +'end-of-line (C-e)' + Move to the end of the line. + +'forward-char (C-f)' + Move forward a character. + +'backward-char (C-b)' + Move back a character. + +'forward-word (M-f)' + Move forward to the end of the next word. Words are composed of + letters and digits. + +'backward-word (M-b)' + Move back to the start of the current or previous word. Words are + composed of letters and digits. + +'shell-forward-word (M-C-f)' + Move forward to the end of the next word. Words are delimited by + non-quoted shell metacharacters. + +'shell-backward-word (M-C-b)' + Move back to the start of the current or previous word. Words are + delimited by non-quoted shell metacharacters. + +'previous-screen-line ()' + Attempt to move point to the same physical screen column on the + previous physical screen line. This will not have the desired + effect if the current Readline line does not take up more than one + physical line or if point is not greater than the length of the + prompt plus the screen width. + +'next-screen-line ()' + Attempt to move point to the same physical screen column on the + next physical screen line. This will not have the desired effect + if the current Readline line does not take up more than one + physical line or if the length of the current Readline line is not + greater than the length of the prompt plus the screen width. + +'clear-display (M-C-l)' + Clear the screen and, if possible, the terminal's scrollback + buffer, then redraw the current line, leaving the current line at + the top of the screen. + +'clear-screen (C-l)' + Clear the screen, then redraw the current line, leaving the current + line at the top of the screen. + +'redraw-current-line ()' + Refresh the current line. By default, this is unbound. + + +File: bashref.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands + +8.4.2 Commands For Manipulating The History +------------------------------------------- + +'accept-line (Newline or Return)' + Accept the line regardless of where the cursor is. If this line is + non-empty, add it to the history list according to the setting of + the 'HISTCONTROL' and 'HISTIGNORE' variables. If this line is a + modified history line, then restore the history line to its + original state. + +'previous-history (C-p)' + Move 'back' through the history list, fetching the previous + command. + +'next-history (C-n)' + Move 'forward' through the history list, fetching the next command. + +'beginning-of-history (M-<)' + Move to the first line in the history. + +'end-of-history (M->)' + Move to the end of the input history, i.e., the line currently + being entered. + +'reverse-search-history (C-r)' + Search backward starting at the current line and moving 'up' + through the history as necessary. This is an incremental search. + This command sets the region to the matched text and activates the + mark. + +'forward-search-history (C-s)' + Search forward starting at the current line and moving 'down' + through the history as necessary. This is an incremental search. + This command sets the region to the matched text and activates the + mark. + +'non-incremental-reverse-search-history (M-p)' + Search backward starting at the current line and moving 'up' + through the history as necessary using a non-incremental search for + a string supplied by the user. The search string may match + anywhere in a history line. + +'non-incremental-forward-search-history (M-n)' + Search forward starting at the current line and moving 'down' + through the history as necessary using a non-incremental search for + a string supplied by the user. The search string may match + anywhere in a history line. + +'history-search-forward ()' + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string must match at the beginning of a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-search-backward ()' + Search backward through the history for the string of characters + between the start of the current line and the point. The search + string must match at the beginning of a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-substring-search-forward ()' + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-substring-search-backward ()' + Search backward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. This is a + non-incremental search. By default, this command is unbound. + +'yank-nth-arg (M-C-y)' + Insert the first argument to the previous command (usually the + second word on the previous line) at point. With an argument N, + insert the Nth word from the previous command (the words in the + previous command begin with word 0). A negative argument inserts + the Nth word from the end of the previous command. Once the + argument N is computed, the argument is extracted as if the '!N' + history expansion had been specified. + +'yank-last-arg (M-. or M-_)' + Insert last argument to the previous command (the last word of the + previous history entry). With a numeric argument, behave exactly + like 'yank-nth-arg'. Successive calls to 'yank-last-arg' move back + through the history list, inserting the last word (or the word + specified by the argument to the first call) of each line in turn. + Any numeric argument supplied to these successive calls determines + the direction to move through the history. A negative argument + switches the direction through the history (back or forward). The + history expansion facilities are used to extract the last argument, + as if the '!$' history expansion had been specified. + +'operate-and-get-next (C-o)' + Accept the current line for return to the calling application as if + a newline had been entered, and fetch the next line relative to the + current line from the history for editing. A numeric argument, if + supplied, specifies the history entry to use instead of the current + line. + + +File: bashref.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands + +8.4.3 Commands For Changing Text +-------------------------------- + +'end-of-file (usually C-d)' + The character indicating end-of-file as set, for example, by + 'stty'. If this character is read when there are no characters on + the line, and point is at the beginning of the line, Readline + interprets it as the end of input and returns EOF. + +'delete-char (C-d)' + Delete the character at point. If this function is bound to the + same character as the tty EOF character, as 'C-d' commonly is, see + above for the effects. + +'backward-delete-char (Rubout)' + Delete the character behind the cursor. A numeric argument means + to kill the characters instead of deleting them. + +'forward-backward-delete-char ()' + Delete the character under the cursor, unless the cursor is at the + end of the line, in which case the character behind the cursor is + deleted. By default, this is not bound to a key. + +'quoted-insert (C-q or C-v)' + Add the next character typed to the line verbatim. This is how to + insert key sequences like 'C-q', for example. + +'self-insert (a, b, A, 1, !, ...)' + Insert yourself. + +'bracketed-paste-begin ()' + This function is intended to be bound to the "bracketed paste" + escape sequence sent by some terminals, and such a binding is + assigned by default. It allows Readline to insert the pasted text + as a single unit without treating each character as if it had been + read from the keyboard. The characters are inserted as if each one + was bound to 'self-insert' instead of executing any editing + commands. + + Bracketed paste sets the region (the characters between point and + the mark) to the inserted text. It uses the concept of an _active + mark_: when the mark is active, Readline redisplay uses the + terminal's standout mode to denote the region. + +'transpose-chars (C-t)' + Drag the character before the cursor forward over the character at + the cursor, moving the cursor forward as well. If the insertion + point is at the end of the line, then this transposes the last two + characters of the line. Negative arguments have no effect. + +'transpose-words (M-t)' + Drag the word before point past the word after point, moving point + past that word as well. If the insertion point is at the end of + the line, this transposes the last two words on the line. + +'upcase-word (M-u)' + Uppercase the current (or following) word. With a negative + argument, uppercase the previous word, but do not move the cursor. + +'downcase-word (M-l)' + Lowercase the current (or following) word. With a negative + argument, lowercase the previous word, but do not move the cursor. + +'capitalize-word (M-c)' + Capitalize the current (or following) word. With a negative + argument, capitalize the previous word, but do not move the cursor. + +'overwrite-mode ()' + Toggle overwrite mode. With an explicit positive numeric argument, + switches to overwrite mode. With an explicit non-positive numeric + argument, switches to insert mode. This command affects only + 'emacs' mode; 'vi' mode does overwrite differently. Each call to + 'readline()' starts in insert mode. + + In overwrite mode, characters bound to 'self-insert' replace the + text at point rather than pushing the text to the right. + Characters bound to 'backward-delete-char' replace the character + before point with a space. + + By default, this command is unbound. + + +File: bashref.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands + +8.4.4 Killing And Yanking +------------------------- + +'kill-line (C-k)' + Kill the text from point to the end of the line. With a negative + numeric argument, kill backward from the cursor to the beginning of + the current line. + +'backward-kill-line (C-x Rubout)' + Kill backward from the cursor to the beginning of the current line. + With a negative numeric argument, kill forward from the cursor to + the end of the current line. + +'unix-line-discard (C-u)' + Kill backward from the cursor to the beginning of the current line. + +'kill-whole-line ()' + Kill all characters on the current line, no matter where point is. + By default, this is unbound. + +'kill-word (M-d)' + Kill from point to the end of the current word, or if between + words, to the end of the next word. Word boundaries are the same + as 'forward-word'. + +'backward-kill-word (M-)' + Kill the word behind point. Word boundaries are the same as + 'backward-word'. + +'shell-kill-word (M-C-d)' + Kill from point to the end of the current word, or if between + words, to the end of the next word. Word boundaries are the same + as 'shell-forward-word'. + +'shell-backward-kill-word ()' + Kill the word behind point. Word boundaries are the same as + 'shell-backward-word'. + +'shell-transpose-words (M-C-t)' + Drag the word before point past the word after point, moving point + past that word as well. If the insertion point is at the end of + the line, this transposes the last two words on the line. Word + boundaries are the same as 'shell-forward-word' and + 'shell-backward-word'. + +'unix-word-rubout (C-w)' + Kill the word behind point, using white space as a word boundary. + The killed text is saved on the kill-ring. + +'unix-filename-rubout ()' + Kill the word behind point, using white space and the slash + character as the word boundaries. The killed text is saved on the + kill-ring. + +'delete-horizontal-space ()' + Delete all spaces and tabs around point. By default, this is + unbound. + +'kill-region ()' + Kill the text in the current region. By default, this command is + unbound. + +'copy-region-as-kill ()' + Copy the text in the region to the kill buffer, so it can be yanked + right away. By default, this command is unbound. + +'copy-backward-word ()' + Copy the word before point to the kill buffer. The word boundaries + are the same as 'backward-word'. By default, this command is + unbound. + +'copy-forward-word ()' + Copy the word following point to the kill buffer. The word + boundaries are the same as 'forward-word'. By default, this + command is unbound. + +'yank (C-y)' + Yank the top of the kill ring into the buffer at point. + +'yank-pop (M-y)' + Rotate the kill-ring, and yank the new top. You can only do this + if the prior command is 'yank' or 'yank-pop'. + + +File: bashref.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands + +8.4.5 Specifying Numeric Arguments +---------------------------------- + +'digit-argument (M-0, M-1, ... M--)' + Add this digit to the argument already accumulating, or start a new + argument. 'M--' starts a negative argument. + +'universal-argument ()' + This is another way to specify an argument. If this command is + followed by one or more digits, optionally with a leading minus + sign, those digits define the argument. If the command is followed + by digits, executing 'universal-argument' again ends the numeric + argument, but is otherwise ignored. As a special case, if this + command is immediately followed by a character that is neither a + digit nor minus sign, the argument count for the next command is + multiplied by four. The argument count is initially one, so + executing this function the first time makes the argument count + four, a second time makes the argument count sixteen, and so on. + By default, this is not bound to a key. + + +File: bashref.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands + +8.4.6 Letting Readline Type For You +----------------------------------- + +'complete ()' + Attempt to perform completion on the text before point. The actual + completion performed is application-specific. Bash attempts + completion treating the text as a variable (if the text begins with + '$'), username (if the text begins with '~'), hostname (if the text + begins with '@'), or command (including aliases and functions) in + turn. If none of these produces a match, filename completion is + attempted. + +'possible-completions (M-?)' + List the possible completions of the text before point. When + displaying completions, Readline sets the number of columns used + for display to the value of 'completion-display-width', the value + of the environment variable 'COLUMNS', or the screen width, in that + order. + +'insert-completions (M-*)' + Insert all completions of the text before point that would have + been generated by 'possible-completions'. + +'menu-complete ()' + Similar to 'complete', but replaces the word to be completed with a + single match from the list of possible completions. Repeated + execution of 'menu-complete' steps through the list of possible + completions, inserting each match in turn. At the end of the list + of completions, the bell is rung (subject to the setting of + 'bell-style') and the original text is restored. An argument of N + moves N positions forward in the list of matches; a negative + argument may be used to move backward through the list. This + command is intended to be bound to , but is unbound by + default. + +'menu-complete-backward ()' + Identical to 'menu-complete', but moves backward through the list + of possible completions, as if 'menu-complete' had been given a + negative argument. + +'delete-char-or-list ()' + Deletes the character under the cursor if not at the beginning or + end of the line (like 'delete-char'). If at the end of the line, + behaves identically to 'possible-completions'. This command is + unbound by default. + +'complete-filename (M-/)' + Attempt filename completion on the text before point. + +'possible-filename-completions (C-x /)' + List the possible completions of the text before point, treating it + as a filename. + +'complete-username (M-~)' + Attempt completion on the text before point, treating it as a + username. + +'possible-username-completions (C-x ~)' + List the possible completions of the text before point, treating it + as a username. + +'complete-variable (M-$)' + Attempt completion on the text before point, treating it as a shell + variable. + +'possible-variable-completions (C-x $)' + List the possible completions of the text before point, treating it + as a shell variable. + +'complete-hostname (M-@)' + Attempt completion on the text before point, treating it as a + hostname. + +'possible-hostname-completions (C-x @)' + List the possible completions of the text before point, treating it + as a hostname. + +'complete-command (M-!)' + Attempt completion on the text before point, treating it as a + command name. Command completion attempts to match the text + against aliases, reserved words, shell functions, shell builtins, + and finally executable filenames, in that order. + +'possible-command-completions (C-x !)' + List the possible completions of the text before point, treating it + as a command name. + +'dynamic-complete-history (M-)' + Attempt completion on the text before point, comparing the text + against lines from the history list for possible completion + matches. + +'dabbrev-expand ()' + Attempt menu completion on the text before point, comparing the + text against lines from the history list for possible completion + matches. + +'complete-into-braces (M-{)' + Perform filename completion and insert the list of possible + completions enclosed within braces so the list is available to the + shell (*note Brace Expansion::). + + +File: bashref.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands + +8.4.7 Keyboard Macros +--------------------- + +'start-kbd-macro (C-x ()' + Begin saving the characters typed into the current keyboard macro. + +'end-kbd-macro (C-x ))' + Stop saving the characters typed into the current keyboard macro + and save the definition. + +'call-last-kbd-macro (C-x e)' + Re-execute the last keyboard macro defined, by making the + characters in the macro appear as if typed at the keyboard. + +'print-last-kbd-macro ()' + Print the last keboard macro defined in a format suitable for the + INPUTRC file. + + +File: bashref.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands + +8.4.8 Some Miscellaneous Commands +--------------------------------- + +'re-read-init-file (C-x C-r)' + Read in the contents of the INPUTRC file, and incorporate any + bindings or variable assignments found there. + +'abort (C-g)' + Abort the current editing command and ring the terminal's bell + (subject to the setting of 'bell-style'). + +'do-lowercase-version (M-A, M-B, M-X, ...)' + If the metafied character X is upper case, run the command that is + bound to the corresponding metafied lower case character. The + behavior is undefined if X is already lower case. + +'prefix-meta ()' + Metafy the next character typed. This is for keyboards without a + meta key. Typing ' f' is equivalent to typing 'M-f'. + +'undo (C-_ or C-x C-u)' + Incremental undo, separately remembered for each line. + +'revert-line (M-r)' + Undo all changes made to this line. This is like executing the + 'undo' command enough times to get back to the beginning. + +'tilde-expand (M-&)' + Perform tilde expansion on the current word. + +'set-mark (C-@)' + Set the mark to the point. If a numeric argument is supplied, the + mark is set to that position. + +'exchange-point-and-mark (C-x C-x)' + Swap the point with the mark. The current cursor position is set + to the saved position, and the old cursor position is saved as the + mark. + +'character-search (C-])' + A character is read and point is moved to the next occurrence of + that character. A negative count searches for previous + occurrences. + +'character-search-backward (M-C-])' + A character is read and point is moved to the previous occurrence + of that character. A negative count searches for subsequent + occurrences. + +'skip-csi-sequence ()' + Read enough characters to consume a multi-key sequence such as + those defined for keys like Home and End. Such sequences begin + with a Control Sequence Indicator (CSI), usually ESC-[. If this + sequence is bound to "\e[", keys producing such sequences will have + no effect unless explicitly bound to a readline command, instead of + inserting stray characters into the editing buffer. This is + unbound by default, but usually bound to ESC-[. + +'insert-comment (M-#)' + Without a numeric argument, the value of the 'comment-begin' + variable is inserted at the beginning of the current line. If a + numeric argument is supplied, this command acts as a toggle: if the + characters at the beginning of the line do not match the value of + 'comment-begin', the value is inserted, otherwise the characters in + 'comment-begin' are deleted from the beginning of the line. In + either case, the line is accepted as if a newline had been typed. + The default value of 'comment-begin' causes this command to make + the current line a shell comment. If a numeric argument causes the + comment character to be removed, the line will be executed by the + shell. + +'dump-functions ()' + Print all of the functions and their key bindings to the Readline + output stream. If a numeric argument is supplied, the output is + formatted in such a way that it can be made part of an INPUTRC + file. This command is unbound by default. + +'dump-variables ()' + Print all of the settable variables and their values to the + Readline output stream. If a numeric argument is supplied, the + output is formatted in such a way that it can be made part of an + INPUTRC file. This command is unbound by default. + +'dump-macros ()' + Print all of the Readline key sequences bound to macros and the + strings they output. If a numeric argument is supplied, the output + is formatted in such a way that it can be made part of an INPUTRC + file. This command is unbound by default. + +'glob-complete-word (M-g)' + The word before point is treated as a pattern for pathname + expansion, with an asterisk implicitly appended. This pattern is + used to generate a list of matching file names for possible + completions. + +'glob-expand-word (C-x *)' + The word before point is treated as a pattern for pathname + expansion, and the list of matching file names is inserted, + replacing the word. If a numeric argument is supplied, a '*' is + appended before pathname expansion. + +'glob-list-expansions (C-x g)' + The list of expansions that would have been generated by + 'glob-expand-word' is displayed, and the line is redrawn. If a + numeric argument is supplied, a '*' is appended before pathname + expansion. + +'display-shell-version (C-x C-v)' + Display version information about the current instance of Bash. + +'shell-expand-line (M-C-e)' + Expand the line as the shell does. This performs alias and history + expansion as well as all of the shell word expansions (*note Shell + Expansions::). + +'history-expand-line (M-^)' + Perform history expansion on the current line. + +'magic-space ()' + Perform history expansion on the current line and insert a space + (*note History Interaction::). + +'alias-expand-line ()' + Perform alias expansion on the current line (*note Aliases::). + +'history-and-alias-expand-line ()' + Perform history and alias expansion on the current line. + +'insert-last-argument (M-. or M-_)' + A synonym for 'yank-last-arg'. + +'edit-and-execute-command (C-x C-e)' + Invoke an editor on the current command line, and execute the + result as shell commands. Bash attempts to invoke '$VISUAL', + '$EDITOR', and 'emacs' as the editor, in that order. + + +File: bashref.info, Node: Readline vi Mode, Next: Programmable Completion, Prev: Bindable Readline Commands, Up: Command Line Editing + +8.5 Readline vi Mode +==================== + +While the Readline library does not have a full set of 'vi' editing +functions, it does contain enough to allow simple editing of the line. +The Readline 'vi' mode behaves as specified in the POSIX standard. + + In order to switch interactively between 'emacs' and 'vi' editing +modes, use the 'set -o emacs' and 'set -o vi' commands (*note The Set +Builtin::). The Readline default is 'emacs' mode. + + When you enter a line in 'vi' mode, you are already placed in +'insertion' mode, as if you had typed an 'i'. Pressing switches +you into 'command' mode, where you can edit the text of the line with +the standard 'vi' movement keys, move to previous history lines with 'k' +and subsequent lines with 'j', and so forth. + + +File: bashref.info, Node: Programmable Completion, Next: Programmable Completion Builtins, Prev: Readline vi Mode, Up: Command Line Editing + +8.6 Programmable Completion +=========================== + +When word completion is attempted for an argument to a command for which +a completion specification (a COMPSPEC) has been defined using the +'complete' builtin (*note Programmable Completion Builtins::), the +programmable completion facilities are invoked. + + First, the command name is identified. If a compspec has been +defined for that command, the compspec is used to generate the list of +possible completions for the word. If the command word is the empty +string (completion attempted at the beginning of an empty line), any +compspec defined with the '-E' option to 'complete' is used. If the +command word is a full pathname, a compspec for the full pathname is +searched for first. If no compspec is found for the full pathname, an +attempt is made to find a compspec for the portion following the final +slash. If those searches do not result in a compspec, any compspec +defined with the '-D' option to 'complete' is used as the default. If +there is no default compspec, Bash attempts alias expansion on the +command word as a final resort, and attempts to find a compspec for the +command word from any successful expansion + + Once a compspec has been found, it is used to generate the list of +matching words. If a compspec is not found, the default Bash completion +described above (*note Commands For Completion::) is performed. + + First, the actions specified by the compspec are used. Only matches +which are prefixed by the word being completed are returned. When the +'-f' or '-d' option is used for filename or directory name completion, +the shell variable 'FIGNORE' is used to filter the matches. *Note Bash +Variables::, for a description of 'FIGNORE'. + + Any completions specified by a filename expansion pattern to the '-G' +option are generated next. The words generated by the pattern need not +match the word being completed. The 'GLOBIGNORE' shell variable is not +used to filter the matches, but the 'FIGNORE' shell variable is used. + + Next, the string specified as the argument to the '-W' option is +considered. The string is first split using the characters in the 'IFS' +special variable as delimiters. Shell quoting is honored within the +string, in order to provide a mechanism for the words to contain shell +metacharacters or characters in the value of 'IFS'. Each word is then +expanded using brace expansion, tilde expansion, parameter and variable +expansion, command substitution, and arithmetic expansion, as described +above (*note Shell Expansions::). The results are split using the rules +described above (*note Word Splitting::). The results of the expansion +are prefix-matched against the word being completed, and the matching +words become the possible completions. + + After these matches have been generated, any shell function or +command specified with the '-F' and '-C' options is invoked. When the +command or function is invoked, the 'COMP_LINE', 'COMP_POINT', +'COMP_KEY', and 'COMP_TYPE' variables are assigned values as described +above (*note Bash Variables::). If a shell function is being invoked, +the 'COMP_WORDS' and 'COMP_CWORD' variables are also set. When the +function or command is invoked, the first argument ($1) is the name of +the command whose arguments are being completed, the second argument +($2) is the word being completed, and the third argument ($3) is the +word preceding the word being completed on the current command line. No +filtering of the generated completions against the word being completed +is performed; the function or command has complete freedom in generating +the matches. + + Any function specified with '-F' is invoked first. The function may +use any of the shell facilities, including the 'compgen' and 'compopt' +builtins described below (*note Programmable Completion Builtins::), to +generate the matches. It must put the possible completions in the +'COMPREPLY' array variable, one per array element. + + Next, any command specified with the '-C' option is invoked in an +environment equivalent to command substitution. It should print a list +of completions, one per line, to the standard output. Backslash may be +used to escape a newline, if necessary. + + After all of the possible completions are generated, any filter +specified with the '-X' option is applied to the list. The filter is a +pattern as used for pathname expansion; a '&' in the pattern is replaced +with the text of the word being completed. A literal '&' may be escaped +with a backslash; the backslash is removed before attempting a match. +Any completion that matches the pattern will be removed from the list. +A leading '!' negates the pattern; in this case any completion not +matching the pattern will be removed. If the 'nocasematch' shell option +(see the description of 'shopt' in *note The Shopt Builtin::) is +enabled, the match is performed without regard to the case of alphabetic +characters. + + Finally, any prefix and suffix specified with the '-P' and '-S' +options are added to each member of the completion list, and the result +is returned to the Readline completion code as the list of possible +completions. + + If the previously-applied actions do not generate any matches, and +the '-o dirnames' option was supplied to 'complete' when the compspec +was defined, directory name completion is attempted. + + If the '-o plusdirs' option was supplied to 'complete' when the +compspec was defined, directory name completion is attempted and any +matches are added to the results of the other actions. + + By default, if a compspec is found, whatever it generates is returned +to the completion code as the full set of possible completions. The +default Bash completions are not attempted, and the Readline default of +filename completion is disabled. If the '-o bashdefault' option was +supplied to 'complete' when the compspec was defined, the default Bash +completions are attempted if the compspec generates no matches. If the +'-o default' option was supplied to 'complete' when the compspec was +defined, Readline's default completion will be performed if the compspec +(and, if attempted, the default Bash completions) generate no matches. + + When a compspec indicates that directory name completion is desired, +the programmable completion functions force Readline to append a slash +to completed names which are symbolic links to directories, subject to +the value of the MARK-DIRECTORIES Readline variable, regardless of the +setting of the MARK-SYMLINKED-DIRECTORIES Readline variable. + + There is some support for dynamically modifying completions. This is +most useful when used in combination with a default completion specified +with '-D'. It's possible for shell functions executed as completion +handlers to indicate that completion should be retried by returning an +exit status of 124. If a shell function returns 124, and changes the +compspec associated with the command on which completion is being +attempted (supplied as the first argument when the function is +executed), programmable completion restarts from the beginning, with an +attempt to find a new compspec for that command. This allows a set of +completions to be built dynamically as completion is attempted, rather +than being loaded all at once. + + For instance, assuming that there is a library of compspecs, each +kept in a file corresponding to the name of the command, the following +default completion function would load completions dynamically: + + _completion_loader() + { + . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 + } + complete -D -F _completion_loader -o bashdefault -o default + + +File: bashref.info, Node: Programmable Completion Builtins, Next: A Programmable Completion Example, Prev: Programmable Completion, Up: Command Line Editing + +8.7 Programmable Completion Builtins +==================================== + +Three builtin commands are available to manipulate the programmable +completion facilities: one to specify how the arguments to a particular +command are to be completed, and two to modify the completion as it is +happening. + +'compgen' + compgen [OPTION] [WORD] + + Generate possible completion matches for WORD according to the + OPTIONs, which may be any option accepted by the 'complete' builtin + with the exception of '-p' and '-r', and write the matches to the + standard output. When using the '-F' or '-C' options, the various + shell variables set by the programmable completion facilities, + while available, will not have useful values. + + The matches will be generated in the same way as if the + programmable completion code had generated them directly from a + completion specification with the same flags. If WORD is + specified, only those completions matching WORD will be displayed. + + The return value is true unless an invalid option is supplied, or + no matches were generated. + +'complete' + complete [-abcdefgjksuv] [-o COMP-OPTION] [-DEI] [-A ACTION] [-G GLOBPAT] + [-W WORDLIST] [-F FUNCTION] [-C COMMAND] [-X FILTERPAT] + [-P PREFIX] [-S SUFFIX] NAME [NAME ...] + complete -pr [-DEI] [NAME ...] + + Specify how arguments to each NAME should be completed. If the + '-p' option is supplied, or if no options are supplied, existing + completion specifications are printed in a way that allows them to + be reused as input. The '-r' option removes a completion + specification for each NAME, or, if no NAMEs are supplied, all + completion specifications. The '-D' option indicates that other + supplied options and actions should apply to the "default" command + completion; that is, completion attempted on a command for which no + completion has previously been defined. The '-E' option indicates + that other supplied options and actions should apply to "empty" + command completion; that is, completion attempted on a blank line. + The '-I' option indicates that other supplied options and actions + should apply to completion on the initial non-assignment word on + the line, or after a command delimiter such as ';' or '|', which is + usually command name completion. If multiple options are supplied, + the '-D' option takes precedence over '-E', and both take + precedence over '-I'. If any of '-D', '-E', or '-I' are supplied, + any other NAME arguments are ignored; these completions only apply + to the case specified by the option. + + The process of applying these completion specifications when word + completion is attempted is described above (*note Programmable + Completion::). + + Other options, if specified, have the following meanings. The + arguments to the '-G', '-W', and '-X' options (and, if necessary, + the '-P' and '-S' options) should be quoted to protect them from + expansion before the 'complete' builtin is invoked. + + '-o COMP-OPTION' + The COMP-OPTION controls several aspects of the compspec's + behavior beyond the simple generation of completions. + COMP-OPTION may be one of: + + 'bashdefault' + Perform the rest of the default Bash completions if the + compspec generates no matches. + + 'default' + Use Readline's default filename completion if the + compspec generates no matches. + + 'dirnames' + Perform directory name completion if the compspec + generates no matches. + + 'filenames' + Tell Readline that the compspec generates filenames, so + it can perform any filename-specific processing (like + adding a slash to directory names, quoting special + characters, or suppressing trailing spaces). This option + is intended to be used with shell functions specified + with '-F'. + + 'noquote' + Tell Readline not to quote the completed words if they + are filenames (quoting filenames is the default). + + 'nosort' + Tell Readline not to sort the list of possible + completions alphabetically. + + 'nospace' + Tell Readline not to append a space (the default) to + words completed at the end of the line. + + 'plusdirs' + After any matches defined by the compspec are generated, + directory name completion is attempted and any matches + are added to the results of the other actions. + + '-A ACTION' + The ACTION may be one of the following to generate a list of + possible completions: + + 'alias' + Alias names. May also be specified as '-a'. + + 'arrayvar' + Array variable names. + + 'binding' + Readline key binding names (*note Bindable Readline + Commands::). + + 'builtin' + Names of shell builtin commands. May also be specified + as '-b'. + + 'command' + Command names. May also be specified as '-c'. + + 'directory' + Directory names. May also be specified as '-d'. + + 'disabled' + Names of disabled shell builtins. + + 'enabled' + Names of enabled shell builtins. + + 'export' + Names of exported shell variables. May also be specified + as '-e'. + + 'file' + File names. May also be specified as '-f'. + + 'function' + Names of shell functions. + + 'group' + Group names. May also be specified as '-g'. + + 'helptopic' + Help topics as accepted by the 'help' builtin (*note Bash + Builtins::). + + 'hostname' + Hostnames, as taken from the file specified by the + 'HOSTFILE' shell variable (*note Bash Variables::). + + 'job' + Job names, if job control is active. May also be + specified as '-j'. + + 'keyword' + Shell reserved words. May also be specified as '-k'. + + 'running' + Names of running jobs, if job control is active. + + 'service' + Service names. May also be specified as '-s'. + + 'setopt' + Valid arguments for the '-o' option to the 'set' builtin + (*note The Set Builtin::). + + 'shopt' + Shell option names as accepted by the 'shopt' builtin + (*note Bash Builtins::). + + 'signal' + Signal names. + + 'stopped' + Names of stopped jobs, if job control is active. + + 'user' + User names. May also be specified as '-u'. + + 'variable' + Names of all shell variables. May also be specified as + '-v'. + + '-C COMMAND' + COMMAND is executed in a subshell environment, and its output + is used as the possible completions. + + '-F FUNCTION' + The shell function FUNCTION is executed in the current shell + environment. When it is executed, $1 is the name of the + command whose arguments are being completed, $2 is the word + being completed, and $3 is the word preceding the word being + completed, as described above (*note Programmable + Completion::). When it finishes, the possible completions are + retrieved from the value of the 'COMPREPLY' array variable. + + '-G GLOBPAT' + The filename expansion pattern GLOBPAT is expanded to generate + the possible completions. + + '-P PREFIX' + PREFIX is added at the beginning of each possible completion + after all other options have been applied. + + '-S SUFFIX' + SUFFIX is appended to each possible completion after all other + options have been applied. + + '-W WORDLIST' + The WORDLIST is split using the characters in the 'IFS' + special variable as delimiters, and each resultant word is + expanded. The possible completions are the members of the + resultant list which match the word being completed. + + '-X FILTERPAT' + FILTERPAT is a pattern as used for filename expansion. It is + applied to the list of possible completions generated by the + preceding options and arguments, and each completion matching + FILTERPAT is removed from the list. A leading '!' in + FILTERPAT negates the pattern; in this case, any completion + not matching FILTERPAT is removed. + + The return value is true unless an invalid option is supplied, an + option other than '-p' or '-r' is supplied without a NAME argument, + an attempt is made to remove a completion specification for a NAME + for which no specification exists, or an error occurs adding a + completion specification. + +'compopt' + compopt [-o OPTION] [-DEI] [+o OPTION] [NAME] + Modify completion options for each NAME according to the OPTIONs, + or for the currently-executing completion if no NAMEs are supplied. + If no OPTIONs are given, display the completion options for each + NAME or the current completion. The possible values of OPTION are + those valid for the 'complete' builtin described above. The '-D' + option indicates that other supplied options should apply to the + "default" command completion; that is, completion attempted on a + command for which no completion has previously been defined. The + '-E' option indicates that other supplied options should apply to + "empty" command completion; that is, completion attempted on a + blank line. The '-I' option indicates that other supplied options + should apply to completion on the initial non-assignment word on + the line, or after a command delimiter such as ';' or '|', which is + usually command name completion. + + If multiple options are supplied, the '-D' option takes precedence + over '-E', and both take precedence over '-I' + + The return value is true unless an invalid option is supplied, an + attempt is made to modify the options for a NAME for which no + completion specification exists, or an output error occurs. + + +File: bashref.info, Node: A Programmable Completion Example, Prev: Programmable Completion Builtins, Up: Command Line Editing + +8.8 A Programmable Completion Example +===================================== + +The most common way to obtain additional completion functionality beyond +the default actions 'complete' and 'compgen' provide is to use a shell +function and bind it to a particular command using 'complete -F'. + + The following function provides completions for the 'cd' builtin. It +is a reasonably good example of what shell functions must do when used +for completion. This function uses the word passed as '$2' to determine +the directory name to complete. You can also use the 'COMP_WORDS' array +variable; the current word is indexed by the 'COMP_CWORD' variable. + + The function relies on the 'complete' and 'compgen' builtins to do +much of the work, adding only the things that the Bash 'cd' does beyond +accepting basic directory names: tilde expansion (*note Tilde +Expansion::), searching directories in $CDPATH, which is described above +(*note Bourne Shell Builtins::), and basic support for the 'cdable_vars' +shell option (*note The Shopt Builtin::). '_comp_cd' modifies the value +of IFS so that it contains only a newline to accommodate file names +containing spaces and tabs - 'compgen' prints the possible completions +it generates one per line. + + Possible completions go into the COMPREPLY array variable, one +completion per array element. The programmable completion system +retrieves the completions from there when the function returns. + + # A completion function for the cd builtin + # based on the cd completion function from the bash_completion package + _comp_cd() + { + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, which also expands tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=${CDPATH/#:/.:} + _cdpath=${_cdpath//::/:.:} + _cdpath=${_cdpath/%:/:.} + for i in ${_cdpath//:/$'\n'}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="${#COMPREPLY[@]}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=${j#$i/} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + return 0 + } + + We install the completion function using the '-F' option to +'complete': + + # Tell readline to quote appropriate and append slashes to directories; + # use the bash default completion for other arguments + complete -o filenames -o nospace -o bashdefault -F _comp_cd cd + +Since we'd like Bash and Readline to take care of some of the other +details for us, we use several other options to tell Bash and Readline +what to do. The '-o filenames' option tells Readline that the possible +completions should be treated as filenames, and quoted appropriately. +That option will also cause Readline to append a slash to filenames it +can determine are directories (which is why we might want to extend +'_comp_cd' to append a slash if we're using directories found via +CDPATH: Readline can't tell those completions are directories). The '-o +nospace' option tells Readline to not append a space character to the +directory name, in case we want to append to it. The '-o bashdefault' +option brings in the rest of the "Bash default" completions - possible +completion that Bash adds to the default Readline set. These include +things like command name completion, variable completion for words +beginning with '$' or '${', completions containing pathname expansion +patterns (*note Filename Expansion::), and so on. + + Once installed using 'complete', '_comp_cd' will be called every time +we attempt word completion for a 'cd' command. + + Many more examples - an extensive collection of completions for most +of the common GNU, Unix, and Linux commands - are available as part of +the bash_completion project. This is installed by default on many +GNU/Linux distributions. Originally written by Ian Macdonald, the +project now lives at . There +are ports for other systems such as Solaris and Mac OS X. + + An older version of the bash_completion package is distributed with +bash in the 'examples/complete' subdirectory. + + +File: bashref.info, Node: Using History Interactively, Next: Installing Bash, Prev: Command Line Editing, Up: Top + +9 Using History Interactively +***************************** + +This chapter describes how to use the GNU History Library interactively, +from a user's standpoint. It should be considered a user's guide. For +information on using the GNU History Library in other programs, see the +GNU Readline Library Manual. + +* Menu: + +* Bash History Facilities:: How Bash lets you manipulate your command + history. +* Bash History Builtins:: The Bash builtin commands that manipulate + the command history. +* History Interaction:: What it feels like using History as a user. + + +File: bashref.info, Node: Bash History Facilities, Next: Bash History Builtins, Up: Using History Interactively + +9.1 Bash History Facilities +=========================== + +When the '-o history' option to the 'set' builtin is enabled (*note The +Set Builtin::), the shell provides access to the "command history", the +list of commands previously typed. The value of the 'HISTSIZE' shell +variable is used as the number of commands to save in a history list. +The text of the last '$HISTSIZE' commands (default 500) is saved. The +shell stores each command in the history list prior to parameter and +variable expansion but after history expansion is performed, subject to +the values of the shell variables 'HISTIGNORE' and 'HISTCONTROL'. + + When the shell starts up, the history is initialized from the file +named by the 'HISTFILE' variable (default '~/.bash_history'). The file +named by the value of 'HISTFILE' is truncated, if necessary, to contain +no more than the number of lines specified by the value of the +'HISTFILESIZE' variable. When a shell with history enabled exits, the +last '$HISTSIZE' lines are copied from the history list to the file +named by '$HISTFILE'. If the 'histappend' shell option is set (*note +Bash Builtins::), the lines are appended to the history file, otherwise +the history file is overwritten. If 'HISTFILE' is unset, or if the +history file is unwritable, the history is not saved. After saving the +history, the history file is truncated to contain no more than +'$HISTFILESIZE' lines. If 'HISTFILESIZE' is unset, or set to null, a +non-numeric value, or a numeric value less than zero, the history file +is not truncated. + + If the 'HISTTIMEFORMAT' is set, the time stamp information associated +with each history entry is written to the history file, marked with the +history comment character. When the history file is read, lines +beginning with the history comment character followed immediately by a +digit are interpreted as timestamps for the following history entry. + + The builtin command 'fc' may be used to list or edit and re-execute a +portion of the history list. The 'history' builtin may be used to +display or modify the history list and manipulate the history file. +When using command-line editing, search commands are available in each +editing mode that provide access to the history list (*note Commands For +History::). + + The shell allows control over which commands are saved on the history +list. The 'HISTCONTROL' and 'HISTIGNORE' variables may be set to cause +the shell to save only a subset of the commands entered. The 'cmdhist' +shell option, if enabled, causes the shell to attempt to save each line +of a multi-line command in the same history entry, adding semicolons +where necessary to preserve syntactic correctness. The 'lithist' shell +option causes the shell to save the command with embedded newlines +instead of semicolons. The 'shopt' builtin is used to set these +options. *Note The Shopt Builtin::, for a description of 'shopt'. + + +File: bashref.info, Node: Bash History Builtins, Next: History Interaction, Prev: Bash History Facilities, Up: Using History Interactively + +9.2 Bash History Builtins +========================= + +Bash provides two builtin commands which manipulate the history list and +history file. + +'fc' + fc [-e ENAME] [-lnr] [FIRST] [LAST] + fc -s [PAT=REP] [COMMAND] + + The first form selects a range of commands from FIRST to LAST from + the history list and displays or edits and re-executes them. Both + FIRST and LAST may be specified as a string (to locate the most + recent command beginning with that string) or as a number (an index + into the history list, where a negative number is used as an offset + from the current command number). + + When listing, a FIRST or LAST of 0 is equivalent to -1 and -0 is + equivalent to the current command (usually the 'fc' command); + otherwise 0 is equivalent to -1 and -0 is invalid. + + If LAST is not specified, it is set to FIRST. If FIRST is not + specified, it is set to the previous command for editing and -16 + for listing. If the '-l' flag is given, the commands are listed on + standard output. The '-n' flag suppresses the command numbers when + listing. The '-r' flag reverses the order of the listing. + Otherwise, the editor given by ENAME is invoked on a file + containing those commands. If ENAME is not given, the value of the + following variable expansion is used: '${FCEDIT:-${EDITOR:-vi}}'. + This says to use the value of the 'FCEDIT' variable if set, or the + value of the 'EDITOR' variable if that is set, or 'vi' if neither + is set. When editing is complete, the edited commands are echoed + and executed. + + In the second form, COMMAND is re-executed after each instance of + PAT in the selected command is replaced by REP. COMMAND is + interpreted the same as FIRST above. + + A useful alias to use with the 'fc' command is 'r='fc -s'', so that + typing 'r cc' runs the last command beginning with 'cc' and typing + 'r' re-executes the last command (*note Aliases::). + +'history' + history [N] + history -c + history -d OFFSET + history -d START-END + history [-anrw] [FILENAME] + history -ps ARG + + With no options, display the history list with line numbers. Lines + prefixed with a '*' have been modified. An argument of N lists + only the last N lines. If the shell variable 'HISTTIMEFORMAT' is + set and not null, it is used as a format string for STRFTIME to + display the time stamp associated with each displayed history + entry. No intervening blank is printed between the formatted time + stamp and the history line. + + Options, if supplied, have the following meanings: + + '-c' + Clear the history list. This may be combined with the other + options to replace the history list completely. + + '-d OFFSET' + Delete the history entry at position OFFSET. If OFFSET is + positive, it should be specified as it appears when the + history is displayed. If OFFSET is negative, it is + interpreted as relative to one greater than the last history + position, so negative indices count back from the end of the + history, and an index of '-1' refers to the current 'history + -d' command. + + '-d START-END' + Delete the history entries between positions START and END, + inclusive. Positive and negative values for START and END are + interpreted as described above. + + '-a' + Append the new history lines to the history file. These are + history lines entered since the beginning of the current Bash + session, but not already appended to the history file. + + '-n' + Append the history lines not already read from the history + file to the current history list. These are lines appended to + the history file since the beginning of the current Bash + session. + + '-r' + Read the history file and append its contents to the history + list. + + '-w' + Write out the current history list to the history file. + + '-p' + Perform history substitution on the ARGs and display the + result on the standard output, without storing the results in + the history list. + + '-s' + The ARGs are added to the end of the history list as a single + entry. + + When any of the '-w', '-r', '-a', or '-n' options is used, if + FILENAME is given, then it is used as the history file. If not, + then the value of the 'HISTFILE' variable is used. + + +File: bashref.info, Node: History Interaction, Prev: Bash History Builtins, Up: Using History Interactively + +9.3 History Expansion +===================== + +The History library provides a history expansion feature that is similar +to the history expansion provided by 'csh'. This section describes the +syntax used to manipulate the history information. + + History expansions introduce words from the history list into the +input stream, making it easy to repeat commands, insert the arguments to +a previous command into the current input line, or fix errors in +previous commands quickly. + + History expansion is performed immediately after a complete line is +read, before the shell breaks it into words, and is performed on each +line individually. Bash attempts to inform the history expansion +functions about quoting still in effect from previous lines. + + History expansion takes place in two parts. The first is to +determine which line from the history list should be used during +substitution. The second is to select portions of that line for +inclusion into the current one. The line selected from the history is +called the "event", and the portions of that line that are acted upon +are called "words". Various "modifiers" are available to manipulate the +selected words. The line is broken into words in the same fashion that +Bash does, so that several words surrounded by quotes are considered one +word. History expansions are introduced by the appearance of the +history expansion character, which is '!' by default. + + History expansion implements shell-like quoting conventions: a +backslash can be used to remove the special handling for the next +character; single quotes enclose verbatim sequences of characters, and +can be used to inhibit history expansion; and characters enclosed within +double quotes may be subject to history expansion, since backslash can +escape the history expansion character, but single quotes may not, since +they are not treated specially within double quotes. + + When using the shell, only '\' and ''' may be used to escape the +history expansion character, but the history expansion character is also +treated as quoted if it immediately precedes the closing double quote in +a double-quoted string. + + Several shell options settable with the 'shopt' builtin (*note The +Shopt Builtin::) may be used to tailor the behavior of history +expansion. If the 'histverify' shell option is enabled, and Readline is +being used, history substitutions are not immediately passed to the +shell parser. Instead, the expanded line is reloaded into the Readline +editing buffer for further modification. If Readline is being used, and +the 'histreedit' shell option is enabled, a failed history expansion +will be reloaded into the Readline editing buffer for correction. The +'-p' option to the 'history' builtin command may be used to see what a +history expansion will do before using it. The '-s' option to the +'history' builtin may be used to add commands to the end of the history +list without actually executing them, so that they are available for +subsequent recall. This is most useful in conjunction with Readline. + + The shell allows control of the various characters used by the +history expansion mechanism with the 'histchars' variable, as explained +above (*note Bash Variables::). The shell uses the history comment +character to mark history timestamps when writing the history file. + +* Menu: + +* Event Designators:: How to specify which history line to use. +* Word Designators:: Specifying which words are of interest. +* Modifiers:: Modifying the results of substitution. + + +File: bashref.info, Node: Event Designators, Next: Word Designators, Up: History Interaction + +9.3.1 Event Designators +----------------------- + +An event designator is a reference to a command line entry in the +history list. Unless the reference is absolute, events are relative to +the current position in the history list. + +'!' + Start a history substitution, except when followed by a space, tab, + the end of the line, '=' or '(' (when the 'extglob' shell option is + enabled using the 'shopt' builtin). + +'!N' + Refer to command line N. + +'!-N' + Refer to the command N lines back. + +'!!' + Refer to the previous command. This is a synonym for '!-1'. + +'!STRING' + Refer to the most recent command preceding the current position in + the history list starting with STRING. + +'!?STRING[?]' + Refer to the most recent command preceding the current position in + the history list containing STRING. The trailing '?' may be + omitted if the STRING is followed immediately by a newline. If + STRING is missing, the string from the most recent search is used; + it is an error if there is no previous search string. + +'^STRING1^STRING2^' + Quick Substitution. Repeat the last command, replacing STRING1 + with STRING2. Equivalent to '!!:s^STRING1^STRING2^'. + +'!#' + The entire command line typed so far. + + +File: bashref.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction + +9.3.2 Word Designators +---------------------- + +Word designators are used to select desired words from the event. A ':' +separates the event specification from the word designator. It may be +omitted if the word designator begins with a '^', '$', '*', '-', or '%'. +Words are numbered from the beginning of the line, with the first word +being denoted by 0 (zero). Words are inserted into the current line +separated by single spaces. + + For example, + +'!!' + designates the preceding command. When you type this, the + preceding command is repeated in toto. + +'!!:$' + designates the last argument of the preceding command. This may be + shortened to '!$'. + +'!fi:2' + designates the second argument of the most recent command starting + with the letters 'fi'. + + Here are the word designators: + +'0 (zero)' + The '0'th word. For many applications, this is the command word. + +'N' + The Nth word. + +'^' + The first argument; that is, word 1. + +'$' + The last argument. + +'%' + The first word matched by the most recent '?STRING?' search, if the + search string begins with a character that is part of a word. + +'X-Y' + A range of words; '-Y' abbreviates '0-Y'. + +'*' + All of the words, except the '0'th. This is a synonym for '1-$'. + It is not an error to use '*' if there is just one word in the + event; the empty string is returned in that case. + +'X*' + Abbreviates 'X-$' + +'X-' + Abbreviates 'X-$' like 'X*', but omits the last word. If 'x' is + missing, it defaults to 0. + + If a word designator is supplied without an event specification, the +previous command is used as the event. + + +File: bashref.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction + +9.3.3 Modifiers +--------------- + +After the optional word designator, you can add a sequence of one or +more of the following modifiers, each preceded by a ':'. These modify, +or edit, the word or words selected from the history event. + +'h' + Remove a trailing pathname component, leaving only the head. + +'t' + Remove all leading pathname components, leaving the tail. + +'r' + Remove a trailing suffix of the form '.SUFFIX', leaving the + basename. + +'e' + Remove all but the trailing suffix. + +'p' + Print the new command but do not execute it. + +'q' + Quote the substituted words, escaping further substitutions. + +'x' + Quote the substituted words as with 'q', but break into words at + spaces, tabs, and newlines. The 'q' and 'x' modifiers are mutually + exclusive; the last one supplied is used. + +'s/OLD/NEW/' + Substitute NEW for the first occurrence of OLD in the event line. + Any character may be used as the delimiter in place of '/'. The + delimiter may be quoted in OLD and NEW with a single backslash. If + '&' appears in NEW, it is replaced by OLD. A single backslash will + quote the '&'. If OLD is null, it is set to the last OLD + substituted, or, if no previous history substitutions took place, + the last STRING in a !?STRING'[?]' search. If NEW is is null, each + matching OLD is deleted. The final delimiter is optional if it is + the last character on the input line. + +'&' + Repeat the previous substitution. + +'g' +'a' + Cause changes to be applied over the entire event line. Used in + conjunction with 's', as in 'gs/OLD/NEW/', or with '&'. + +'G' + Apply the following 's' or '&' modifier once to each word in the + event. + + +File: bashref.info, Node: Installing Bash, Next: Reporting Bugs, Prev: Using History Interactively, Up: Top + +10 Installing Bash +****************** + +This chapter provides basic instructions for installing Bash on the +various supported platforms. The distribution supports the GNU +operating systems, nearly every version of Unix, and several non-Unix +systems such as BeOS and Interix. Other independent ports exist for +MS-DOS, OS/2, and Windows platforms. + +* Menu: + +* Basic Installation:: Installation instructions. +* Compilers and Options:: How to set special options for various + systems. +* Compiling For Multiple Architectures:: How to compile Bash for more + than one kind of system from + the same source tree. +* Installation Names:: How to set the various paths used by the installation. +* Specifying the System Type:: How to configure Bash for a particular system. +* Sharing Defaults:: How to share default configuration values among GNU + programs. +* Operation Controls:: Options recognized by the configuration program. +* Optional Features:: How to enable and disable optional features when + building Bash. + + +File: bashref.info, Node: Basic Installation, Next: Compilers and Options, Up: Installing Bash + +10.1 Basic Installation +======================= + +These are installation instructions for Bash. + + The simplest way to compile Bash is: + + 1. 'cd' to the directory containing the source code and type + './configure' to configure Bash for your system. If you're using + 'csh' on an old version of System V, you might need to type 'sh + ./configure' instead to prevent 'csh' from trying to execute + 'configure' itself. + + Running 'configure' takes some time. While running, it prints + messages telling which features it is checking for. + + 2. Type 'make' to compile Bash and build the 'bashbug' bug reporting + script. + + 3. Optionally, type 'make tests' to run the Bash test suite. + + 4. Type 'make install' to install 'bash' and 'bashbug'. This will + also install the manual pages and Info file. + + The 'configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a 'Makefile' in each directory of the package +(the top directory, the 'builtins', 'doc', and 'support' directories, +each directory under 'lib', and several others). It also creates a +'config.h' file containing system-dependent definitions. Finally, it +creates a shell script named 'config.status' that you can run in the +future to recreate the current configuration, a file 'config.cache' that +saves the results of its tests to speed up reconfiguring, and a file +'config.log' containing compiler output (useful mainly for debugging +'configure'). If at some point 'config.cache' contains results you +don't want to keep, you may remove or edit it. + + To find out more about the options and arguments that the 'configure' +script understands, type + + bash-4.2$ ./configure --help + +at the Bash prompt in your Bash source directory. + + If you want to build Bash in a directory separate from the source +directory - to build for multiple architectures, for example - just use +the full path to the configure script. The following commands will +build bash in a directory under '/usr/local/build' from the source code +in '/usr/local/src/bash-4.4': + + mkdir /usr/local/build/bash-4.4 + cd /usr/local/build/bash-4.4 + bash /usr/local/src/bash-4.4/configure + make + + See *note Compiling For Multiple Architectures:: for more information +about building in a directory separate from the source. + + If you need to do unusual things to compile Bash, please try to +figure out how 'configure' could check whether or not to do them, and +mail diffs or instructions to so they can be +considered for the next release. + + The file 'configure.ac' is used to create 'configure' by a program +called Autoconf. You only need 'configure.ac' if you want to change it +or regenerate 'configure' using a newer version of Autoconf. If you do +this, make sure you are using Autoconf version 2.50 or newer. + + You can remove the program binaries and object files from the source +code directory by typing 'make clean'. To also remove the files that +'configure' created (so you can compile Bash for a different kind of +computer), type 'make distclean'. + + +File: bashref.info, Node: Compilers and Options, Next: Compiling For Multiple Architectures, Prev: Basic Installation, Up: Installing Bash + +10.2 Compilers and Options +========================== + +Some systems require unusual options for compilation or linking that the +'configure' script does not know about. You can give 'configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + + On systems that have the 'env' program, you can do it like this: + + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + + The configuration process uses GCC to build Bash if it is available. + + +File: bashref.info, Node: Compiling For Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Installing Bash + +10.3 Compiling For Multiple Architectures +========================================= + +You can compile Bash for more than one kind of computer at the same +time, by placing the object files for each architecture in their own +directory. To do this, you must use a version of 'make' that supports +the 'VPATH' variable, such as GNU 'make'. 'cd' to the directory where +you want the object files and executables to go and run the 'configure' +script from the source directory (*note Basic Installation::). You may +need to supply the '--srcdir=PATH' argument to tell 'configure' where +the source files are. 'configure' automatically checks for the source +code in the directory that 'configure' is in and in '..'. + + If you have to use a 'make' that does not supports the 'VPATH' +variable, you can compile Bash for one architecture at a time in the +source code directory. After you have installed Bash for one +architecture, use 'make distclean' before reconfiguring for another +architecture. + + Alternatively, if your system supports symbolic links, you can use +the 'support/mkclone' script to create a build tree which has symbolic +links back to each file in the source directory. Here's an example that +creates a build directory in the current directory from a source +directory '/usr/gnu/src/bash-2.0': + + bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 . + +The 'mkclone' script requires Bash, so you must have already built Bash +for at least one architecture before you can create build directories +for other architectures. + + +File: bashref.info, Node: Installation Names, Next: Specifying the System Type, Prev: Compiling For Multiple Architectures, Up: Installing Bash + +10.4 Installation Names +======================= + +By default, 'make install' will install into '/usr/local/bin', +'/usr/local/man', etc. You can specify an installation prefix other +than '/usr/local' by giving 'configure' the option '--prefix=PATH', or +by specifying a value for the 'DESTDIR' 'make' variable when running +'make install'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give 'configure' the option '--exec-prefix=PATH', 'make install' will +use PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + +File: bashref.info, Node: Specifying the System Type, Next: Sharing Defaults, Prev: Installation Names, Up: Installing Bash + +10.5 Specifying the System Type +=============================== + +There may be some features 'configure' can not figure out automatically, +but need to determine by the type of host Bash will run on. Usually +'configure' can figure that out, but if it prints a message saying it +can not guess the host type, give it the '--host=TYPE' option. 'TYPE' +can either be a short name for the system type, such as 'sun4', or a +canonical name with three fields: 'CPU-COMPANY-SYSTEM' (e.g., +'i386-unknown-freebsd4.2'). + + See the file 'support/config.sub' for the possible values of each +field. + + +File: bashref.info, Node: Sharing Defaults, Next: Operation Controls, Prev: Specifying the System Type, Up: Installing Bash + +10.6 Sharing Defaults +===================== + +If you want to set default values for 'configure' scripts to share, you +can create a site shell script called 'config.site' that gives default +values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' +looks for 'PREFIX/share/config.site' if it exists, then +'PREFIX/etc/config.site' if it exists. Or, you can set the +'CONFIG_SITE' environment variable to the location of the site script. +A warning: the Bash 'configure' looks for a site script, but not all +'configure' scripts do. + + +File: bashref.info, Node: Operation Controls, Next: Optional Features, Prev: Sharing Defaults, Up: Installing Bash + +10.7 Operation Controls +======================= + +'configure' recognizes the following options to control how it operates. + +'--cache-file=FILE' + Use and save the results of the tests in FILE instead of + './config.cache'. Set FILE to '/dev/null' to disable caching, for + debugging 'configure'. + +'--help' + Print a summary of the options to 'configure', and exit. + +'--quiet' +'--silent' +'-q' + Do not print messages saying which checks are being made. + +'--srcdir=DIR' + Look for the Bash source code in directory DIR. Usually + 'configure' can determine that directory automatically. + +'--version' + Print the version of Autoconf used to generate the 'configure' + script, and exit. + + 'configure' also accepts some other, not widely used, boilerplate +options. 'configure --help' prints the complete list. + + +File: bashref.info, Node: Optional Features, Prev: Operation Controls, Up: Installing Bash + +10.8 Optional Features +====================== + +The Bash 'configure' has a number of '--enable-FEATURE' options, where +FEATURE indicates an optional part of Bash. There are also several +'--with-PACKAGE' options, where PACKAGE is something like 'bash-malloc' +or 'purify'. To turn off the default use of a package, use +'--without-PACKAGE'. To configure Bash without a feature that is +enabled by default, use '--disable-FEATURE'. + + Here is a complete list of the '--enable-' and '--with-' options that +the Bash 'configure' recognizes. + +'--with-afs' + Define if you are using the Andrew File System from Transarc. + +'--with-bash-malloc' + Use the Bash version of 'malloc' in the directory 'lib/malloc'. + This is not the same 'malloc' that appears in GNU libc, but an + older version originally derived from the 4.2 BSD 'malloc'. This + 'malloc' is very fast, but wastes some space on each allocation. + This option is enabled by default. The 'NOTES' file contains a + list of systems for which this should be turned off, and + 'configure' disables this option automatically for a number of + systems. + +'--with-curses' + Use the curses library instead of the termcap library. This should + be supplied if your system has an inadequate or incomplete termcap + database. + +'--with-gnu-malloc' + A synonym for '--with-bash-malloc'. + +'--with-installed-readline[=PREFIX]' + Define this to make Bash link with a locally-installed version of + Readline rather than the version in 'lib/readline'. This works + only with Readline 5.0 and later versions. If PREFIX is 'yes' or + not supplied, 'configure' uses the values of the make variables + 'includedir' and 'libdir', which are subdirectories of 'prefix' by + default, to find the installed version of Readline if it is not in + the standard system include and library directories. If PREFIX is + 'no', Bash links with the version in 'lib/readline'. If PREFIX is + set to any other value, 'configure' treats it as a directory + pathname and looks for the installed version of Readline in + subdirectories of that directory (include files in PREFIX/'include' + and the library in PREFIX/'lib'). + +'--with-purify' + Define this to use the Purify memory allocation checker from + Rational Software. + +'--enable-minimal-config' + This produces a shell with minimal features, close to the + historical Bourne shell. + + There are several '--enable-' options that alter how Bash is compiled +and linked, rather than changing run-time features. + +'--enable-largefile' + Enable support for large files + (http://www.unix.org/version2/whatsnew/lfs20mar.html) if the + operating system requires special compiler options to build + programs which can access large files. This is enabled by default, + if the operating system provides large file support. + +'--enable-profiling' + This builds a Bash binary that produces profiling information to be + processed by 'gprof' each time it is executed. + +'--enable-static-link' + This causes Bash to be linked statically, if 'gcc' is being used. + This could be used to build a version to use as root's shell. + + The 'minimal-config' option can be used to disable all of the +following options, but it is processed first, so individual options may +be enabled using 'enable-FEATURE'. + + All of the following options except for 'disabled-builtins', +'direxpand-default', and 'xpg-echo-default' are enabled by default, +unless the operating system does not provide the necessary support. + +'--enable-alias' + Allow alias expansion and include the 'alias' and 'unalias' + builtins (*note Aliases::). + +'--enable-arith-for-command' + Include support for the alternate form of the 'for' command that + behaves like the C language 'for' statement (*note Looping + Constructs::). + +'--enable-array-variables' + Include support for one-dimensional array shell variables (*note + Arrays::). + +'--enable-bang-history' + Include support for 'csh'-like history substitution (*note History + Interaction::). + +'--enable-brace-expansion' + Include 'csh'-like brace expansion ( 'b{a,b}c' ==> 'bac bbc' ). + See *note Brace Expansion::, for a complete description. + +'--enable-casemod-attributes' + Include support for case-modifying attributes in the 'declare' + builtin and assignment statements. Variables with the UPPERCASE + attribute, for example, will have their values converted to + uppercase upon assignment. + +'--enable-casemod-expansion' + Include support for case-modifying word expansions. + +'--enable-command-timing' + Include support for recognizing 'time' as a reserved word and for + displaying timing statistics for the pipeline following 'time' + (*note Pipelines::). This allows pipelines as well as shell + builtins and functions to be timed. + +'--enable-cond-command' + Include support for the '[[' conditional command. (*note + Conditional Constructs::). + +'--enable-cond-regexp' + Include support for matching POSIX regular expressions using the + '=~' binary operator in the '[[' conditional command. (*note + Conditional Constructs::). + +'--enable-coprocesses' + Include support for coprocesses and the 'coproc' reserved word + (*note Pipelines::). + +'--enable-debugger' + Include support for the bash debugger (distributed separately). + +'--enable-dev-fd-stat-broken' + If calling 'stat' on /dev/fd/N returns different results than + calling 'fstat' on file descriptor N, supply this option to enable + a workaround. This has implications for conditional commands that + test file attributes. + +'--enable-direxpand-default' + Cause the 'direxpand' shell option (*note The Shopt Builtin::) to + be enabled by default when the shell starts. It is normally + disabled by default. + +'--enable-directory-stack' + Include support for a 'csh'-like directory stack and the 'pushd', + 'popd', and 'dirs' builtins (*note The Directory Stack::). + +'--enable-disabled-builtins' + Allow builtin commands to be invoked via 'builtin xxx' even after + 'xxx' has been disabled using 'enable -n xxx'. See *note Bash + Builtins::, for details of the 'builtin' and 'enable' builtin + commands. + +'--enable-dparen-arithmetic' + Include support for the '((...))' command (*note Conditional + Constructs::). + +'--enable-extended-glob' + Include support for the extended pattern matching features + described above under *note Pattern Matching::. + +'--enable-extended-glob-default' + Set the default value of the EXTGLOB shell option described above + under *note The Shopt Builtin:: to be enabled. + +'--enable-function-import' + Include support for importing function definitions exported by + another instance of the shell from the environment. This option is + enabled by default. + +'--enable-glob-asciirange-default' + Set the default value of the GLOBASCIIRANGES shell option described + above under *note The Shopt Builtin:: to be enabled. This controls + the behavior of character ranges when used in pattern matching + bracket expressions. + +'--enable-help-builtin' + Include the 'help' builtin, which displays help on shell builtins + and variables (*note Bash Builtins::). + +'--enable-history' + Include command history and the 'fc' and 'history' builtin commands + (*note Bash History Facilities::). + +'--enable-job-control' + This enables the job control features (*note Job Control::), if the + operating system supports them. + +'--enable-multibyte' + This enables support for multibyte characters if the operating + system provides the necessary support. + +'--enable-net-redirections' + This enables the special handling of filenames of the form + '/dev/tcp/HOST/PORT' and '/dev/udp/HOST/PORT' when used in + redirections (*note Redirections::). + +'--enable-process-substitution' + This enables process substitution (*note Process Substitution::) if + the operating system provides the necessary support. + +'--enable-progcomp' + Enable the programmable completion facilities (*note Programmable + Completion::). If Readline is not enabled, this option has no + effect. + +'--enable-prompt-string-decoding' + Turn on the interpretation of a number of backslash-escaped + characters in the '$PS0', '$PS1', '$PS2', and '$PS4' prompt + strings. See *note Controlling the Prompt::, for a complete list + of prompt string escape sequences. + +'--enable-readline' + Include support for command-line editing and history with the Bash + version of the Readline library (*note Command Line Editing::). + +'--enable-restricted' + Include support for a "restricted shell". If this is enabled, + Bash, when called as 'rbash', enters a restricted mode. See *note + The Restricted Shell::, for a description of restricted mode. + +'--enable-select' + Include the 'select' compound command, which allows the generation + of simple menus (*note Conditional Constructs::). + +'--enable-separate-helpfiles' + Use external files for the documentation displayed by the 'help' + builtin instead of storing the text internally. + +'--enable-single-help-strings' + Store the text displayed by the 'help' builtin as a single string + for each help topic. This aids in translating the text to + different languages. You may need to disable this if your compiler + cannot handle very long string literals. + +'--enable-strict-posix-default' + Make Bash POSIX-conformant by default (*note Bash POSIX Mode::). + +'--enable-usg-echo-default' + A synonym for '--enable-xpg-echo-default'. + +'--enable-xpg-echo-default' + Make the 'echo' builtin expand backslash-escaped characters by + default, without requiring the '-e' option. This sets the default + value of the 'xpg_echo' shell option to 'on', which makes the Bash + 'echo' behave more like the version specified in the Single Unix + Specification, version 3. *Note Bash Builtins::, for a description + of the escape sequences that 'echo' recognizes. + + The file 'config-top.h' contains C Preprocessor '#define' statements +for options which are not settable from 'configure'. Some of these are +not meant to be changed; beware of the consequences if you do. Read the +comments associated with each definition for more information about its +effect. + + +File: bashref.info, Node: Reporting Bugs, Next: Major Differences From The Bourne Shell, Prev: Installing Bash, Up: Top + +Appendix A Reporting Bugs +************************* + +Please report all bugs you find in Bash. But first, you should make +sure that it really is a bug, and that it appears in the latest version +of Bash. The latest version of Bash is always available for FTP from +. + + Once you have determined that a bug actually exists, use the +'bashbug' command to submit a bug report. If you have a fix, you are +encouraged to mail that as well! Suggestions and 'philosophical' bug +reports may be mailed to or posted to the Usenet +newsgroup 'gnu.bash.bug'. + + All bug reports should include: + * The version number of Bash. + * The hardware and operating system. + * The compiler used to compile Bash. + * A description of the bug behaviour. + * A short script or 'recipe' which exercises the bug and may be used + to reproduce it. + +'bashbug' inserts the first three items automatically into the template +it provides for filing a bug report. + + Please send all reports concerning this manual to . + + +File: bashref.info, Node: Major Differences From The Bourne Shell, Next: GNU Free Documentation License, Prev: Reporting Bugs, Up: Top + +Appendix B Major Differences From The Bourne Shell +************************************************** + +Bash implements essentially the same grammar, parameter and variable +expansion, redirection, and quoting as the Bourne Shell. Bash uses the +POSIX standard as the specification of how these features are to be +implemented. There are some differences between the traditional Bourne +shell and Bash; this section quickly details the differences of +significance. A number of these differences are explained in greater +depth in previous sections. This section uses the version of 'sh' +included in SVR4.2 (the last version of the historical Bourne shell) as +the baseline reference. + + * Bash is POSIX-conformant, even where the POSIX specification + differs from traditional 'sh' behavior (*note Bash POSIX Mode::). + + * Bash has multi-character invocation options (*note Invoking + Bash::). + + * Bash has command-line editing (*note Command Line Editing::) and + the 'bind' builtin. + + * Bash provides a programmable word completion mechanism (*note + Programmable Completion::), and builtin commands 'complete', + 'compgen', and 'compopt', to manipulate it. + + * Bash has command history (*note Bash History Facilities::) and the + 'history' and 'fc' builtins to manipulate it. The Bash history + list maintains timestamp information and uses the value of the + 'HISTTIMEFORMAT' variable to display it. + + * Bash implements 'csh'-like history expansion (*note History + Interaction::). + + * Bash has one-dimensional array variables (*note Arrays::), and the + appropriate variable expansions and assignment syntax to use them. + Several of the Bash builtins take options to act on arrays. Bash + provides a number of built-in array variables. + + * The '$'...'' quoting syntax, which expands ANSI-C backslash-escaped + characters in the text between the single quotes, is supported + (*note ANSI-C Quoting::). + + * Bash supports the '$"..."' quoting syntax to do locale-specific + translation of the characters between the double quotes. The '-D', + '--dump-strings', and '--dump-po-strings' invocation options list + the translatable strings found in a script (*note Locale + Translation::). + + * Bash implements the '!' keyword to negate the return value of a + pipeline (*note Pipelines::). Very useful when an 'if' statement + needs to act only if a test fails. The Bash '-o pipefail' option + to 'set' will cause a pipeline to return a failure status if any + command fails. + + * Bash has the 'time' reserved word and command timing (*note + Pipelines::). The display of the timing statistics may be + controlled with the 'TIMEFORMAT' variable. + + * Bash implements the 'for (( EXPR1 ; EXPR2 ; EXPR3 ))' arithmetic + for command, similar to the C language (*note Looping + Constructs::). + + * Bash includes the 'select' compound command, which allows the + generation of simple menus (*note Conditional Constructs::). + + * Bash includes the '[[' compound command, which makes conditional + testing part of the shell grammar (*note Conditional Constructs::), + including optional regular expression matching. + + * Bash provides optional case-insensitive matching for the 'case' and + '[[' constructs. + + * Bash includes brace expansion (*note Brace Expansion::) and tilde + expansion (*note Tilde Expansion::). + + * Bash implements command aliases and the 'alias' and 'unalias' + builtins (*note Aliases::). + + * Bash provides shell arithmetic, the '((' compound command (*note + Conditional Constructs::), and arithmetic expansion (*note Shell + Arithmetic::). + + * Variables present in the shell's initial environment are + automatically exported to child processes. The Bourne shell does + not normally do this unless the variables are explicitly marked + using the 'export' command. + + * Bash supports the '+=' assignment operator, which appends to the + value of the variable named on the left hand side. + + * Bash includes the POSIX pattern removal '%', '#', '%%' and '##' + expansions to remove leading or trailing substrings from variable + values (*note Shell Parameter Expansion::). + + * The expansion '${#xx}', which returns the length of '${xx}', is + supported (*note Shell Parameter Expansion::). + + * The expansion '${var:'OFFSET'[:'LENGTH']}', which expands to the + substring of 'var''s value of length LENGTH, beginning at OFFSET, + is present (*note Shell Parameter Expansion::). + + * The expansion '${var/[/]'PATTERN'[/'REPLACEMENT']}', which matches + PATTERN and replaces it with REPLACEMENT in the value of 'var', is + available (*note Shell Parameter Expansion::). + + * The expansion '${!PREFIX*}' expansion, which expands to the names + of all shell variables whose names begin with PREFIX, is available + (*note Shell Parameter Expansion::). + + * Bash has INDIRECT variable expansion using '${!word}' (*note Shell + Parameter Expansion::). + + * Bash can expand positional parameters beyond '$9' using '${NUM}'. + + * The POSIX '$()' form of command substitution is implemented (*note + Command Substitution::), and preferred to the Bourne shell's '``' + (which is also implemented for backwards compatibility). + + * Bash has process substitution (*note Process Substitution::). + + * Bash automatically assigns variables that provide information about + the current user ('UID', 'EUID', and 'GROUPS'), the current host + ('HOSTTYPE', 'OSTYPE', 'MACHTYPE', and 'HOSTNAME'), and the + instance of Bash that is running ('BASH', 'BASH_VERSION', and + 'BASH_VERSINFO'). *Note Bash Variables::, for details. + + * The 'IFS' variable is used to split only the results of expansion, + not all words (*note Word Splitting::). This closes a longstanding + shell security hole. + + * The filename expansion bracket expression code uses '!' and '^' to + negate the set of characters between the brackets. The Bourne + shell uses only '!'. + + * Bash implements the full set of POSIX filename expansion operators, + including CHARACTER CLASSES, EQUIVALENCE CLASSES, and COLLATING + SYMBOLS (*note Filename Expansion::). + + * Bash implements extended pattern matching features when the + 'extglob' shell option is enabled (*note Pattern Matching::). + + * It is possible to have a variable and a function with the same + name; 'sh' does not separate the two name spaces. + + * Bash functions are permitted to have local variables using the + 'local' builtin, and thus useful recursive functions may be written + (*note Bash Builtins::). + + * Variable assignments preceding commands affect only that command, + even builtins and functions (*note Environment::). In 'sh', all + variable assignments preceding commands are global unless the + command is executed from the file system. + + * Bash performs filename expansion on filenames specified as operands + to input and output redirection operators (*note Redirections::). + + * Bash contains the '<>' redirection operator, allowing a file to be + opened for both reading and writing, and the '&>' redirection + operator, for directing standard output and standard error to the + same file (*note Redirections::). + + * Bash includes the '<<<' redirection operator, allowing a string to + be used as the standard input to a command. + + * Bash implements the '[n]<&WORD' and '[n]>&WORD' redirection + operators, which move one file descriptor to another. + + * Bash treats a number of filenames specially when they are used in + redirection operators (*note Redirections::). + + * Bash can open network connections to arbitrary machines and + services with the redirection operators (*note Redirections::). + + * The 'noclobber' option is available to avoid overwriting existing + files with output redirection (*note The Set Builtin::). The '>|' + redirection operator may be used to override 'noclobber'. + + * The Bash 'cd' and 'pwd' builtins (*note Bourne Shell Builtins::) + each take '-L' and '-P' options to switch between logical and + physical modes. + + * Bash allows a function to override a builtin with the same name, + and provides access to that builtin's functionality within the + function via the 'builtin' and 'command' builtins (*note Bash + Builtins::). + + * The 'command' builtin allows selective disabling of functions when + command lookup is performed (*note Bash Builtins::). + + * Individual builtins may be enabled or disabled using the 'enable' + builtin (*note Bash Builtins::). + + * The Bash 'exec' builtin takes additional options that allow users + to control the contents of the environment passed to the executed + command, and what the zeroth argument to the command is to be + (*note Bourne Shell Builtins::). + + * Shell functions may be exported to children via the environment + using 'export -f' (*note Shell Functions::). + + * The Bash 'export', 'readonly', and 'declare' builtins can take a + '-f' option to act on shell functions, a '-p' option to display + variables with various attributes set in a format that can be used + as shell input, a '-n' option to remove various variable + attributes, and 'name=value' arguments to set variable attributes + and values simultaneously. + + * The Bash 'hash' builtin allows a name to be associated with an + arbitrary filename, even when that filename cannot be found by + searching the '$PATH', using 'hash -p' (*note Bourne Shell + Builtins::). + + * Bash includes a 'help' builtin for quick reference to shell + facilities (*note Bash Builtins::). + + * The 'printf' builtin is available to display formatted output + (*note Bash Builtins::). + + * The Bash 'read' builtin (*note Bash Builtins::) will read a line + ending in '\' with the '-r' option, and will use the 'REPLY' + variable as a default if no non-option arguments are supplied. The + Bash 'read' builtin also accepts a prompt string with the '-p' + option and will use Readline to obtain the line when given the '-e' + option. The 'read' builtin also has additional options to control + input: the '-s' option will turn off echoing of input characters as + they are read, the '-t' option will allow 'read' to time out if + input does not arrive within a specified number of seconds, the + '-n' option will allow reading only a specified number of + characters rather than a full line, and the '-d' option will read + until a particular character rather than newline. + + * The 'return' builtin may be used to abort execution of scripts + executed with the '.' or 'source' builtins (*note Bourne Shell + Builtins::). + + * Bash includes the 'shopt' builtin, for finer control of shell + optional capabilities (*note The Shopt Builtin::), and allows these + options to be set and unset at shell invocation (*note Invoking + Bash::). + + * Bash has much more optional behavior controllable with the 'set' + builtin (*note The Set Builtin::). + + * The '-x' ('xtrace') option displays commands other than simple + commands when performing an execution trace (*note The Set + Builtin::). + + * The 'test' builtin (*note Bourne Shell Builtins::) is slightly + different, as it implements the POSIX algorithm, which specifies + the behavior based on the number of arguments. + + * Bash includes the 'caller' builtin, which displays the context of + any active subroutine call (a shell function or a script executed + with the '.' or 'source' builtins). This supports the bash + debugger. + + * The 'trap' builtin (*note Bourne Shell Builtins::) allows a 'DEBUG' + pseudo-signal specification, similar to 'EXIT'. Commands specified + with a 'DEBUG' trap are executed before every simple command, 'for' + command, 'case' command, 'select' command, every arithmetic 'for' + command, and before the first command executes in a shell function. + The 'DEBUG' trap is not inherited by shell functions unless the + function has been given the 'trace' attribute or the 'functrace' + option has been enabled using the 'shopt' builtin. The 'extdebug' + shell option has additional effects on the 'DEBUG' trap. + + The 'trap' builtin (*note Bourne Shell Builtins::) allows an 'ERR' + pseudo-signal specification, similar to 'EXIT' and 'DEBUG'. + Commands specified with an 'ERR' trap are executed after a simple + command fails, with a few exceptions. The 'ERR' trap is not + inherited by shell functions unless the '-o errtrace' option to the + 'set' builtin is enabled. + + The 'trap' builtin (*note Bourne Shell Builtins::) allows a + 'RETURN' pseudo-signal specification, similar to 'EXIT' and + 'DEBUG'. Commands specified with an 'RETURN' trap are executed + before execution resumes after a shell function or a shell script + executed with '.' or 'source' returns. The 'RETURN' trap is not + inherited by shell functions unless the function has been given the + 'trace' attribute or the 'functrace' option has been enabled using + the 'shopt' builtin. + + * The Bash 'type' builtin is more extensive and gives more + information about the names it finds (*note Bash Builtins::). + + * The Bash 'umask' builtin permits a '-p' option to cause the output + to be displayed in the form of a 'umask' command that may be reused + as input (*note Bourne Shell Builtins::). + + * Bash implements a 'csh'-like directory stack, and provides the + 'pushd', 'popd', and 'dirs' builtins to manipulate it (*note The + Directory Stack::). Bash also makes the directory stack visible as + the value of the 'DIRSTACK' shell variable. + + * Bash interprets special backslash-escaped characters in the prompt + strings when interactive (*note Controlling the Prompt::). + + * The Bash restricted mode is more useful (*note The Restricted + Shell::); the SVR4.2 shell restricted mode is too limited. + + * The 'disown' builtin can remove a job from the internal shell job + table (*note Job Control Builtins::) or suppress the sending of + 'SIGHUP' to a job when the shell exits as the result of a 'SIGHUP'. + + * Bash includes a number of features to support a separate debugger + for shell scripts. + + * The SVR4.2 shell has two privilege-related builtins ('mldmode' and + 'priv') not present in Bash. + + * Bash does not have the 'stop' or 'newgrp' builtins. + + * Bash does not use the 'SHACCT' variable or perform shell + accounting. + + * The SVR4.2 'sh' uses a 'TIMEOUT' variable like Bash uses 'TMOUT'. + +More features unique to Bash may be found in *note Bash Features::. + +B.1 Implementation Differences From The SVR4.2 Shell +==================================================== + +Since Bash is a completely new implementation, it does not suffer from +many of the limitations of the SVR4.2 shell. For instance: + + * Bash does not fork a subshell when redirecting into or out of a + shell control structure such as an 'if' or 'while' statement. + + * Bash does not allow unbalanced quotes. The SVR4.2 shell will + silently insert a needed closing quote at 'EOF' under certain + circumstances. This can be the cause of some hard-to-find errors. + + * The SVR4.2 shell uses a baroque memory management scheme based on + trapping 'SIGSEGV'. If the shell is started from a process with + 'SIGSEGV' blocked (e.g., by using the 'system()' C library function + call), it misbehaves badly. + + * In a questionable attempt at security, the SVR4.2 shell, when + invoked without the '-p' option, will alter its real and effective + UID and GID if they are less than some magic threshold value, + commonly 100. This can lead to unexpected results. + + * The SVR4.2 shell does not allow users to trap 'SIGSEGV', 'SIGALRM', + or 'SIGCHLD'. + + * The SVR4.2 shell does not allow the 'IFS', 'MAILCHECK', 'PATH', + 'PS1', or 'PS2' variables to be unset. + + * The SVR4.2 shell treats '^' as the undocumented equivalent of '|'. + + * Bash allows multiple option arguments when it is invoked ('-x -v'); + the SVR4.2 shell allows only one option argument ('-xv'). In fact, + some versions of the shell dump core if the second argument begins + with a '-'. + + * The SVR4.2 shell exits a script if any builtin fails; Bash exits a + script only if one of the POSIX special builtins fails, and only + for certain failures, as enumerated in the POSIX standard. + + * The SVR4.2 shell behaves differently when invoked as 'jsh' (it + turns on job control). + + +File: bashref.info, Node: GNU Free Documentation License, Next: Indexes, Prev: Major Differences From The Bourne Shell, Up: Top + +Appendix C GNU Free Documentation License +***************************************** + + Version 1.3, 3 November 2008 + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + The "publisher" means any person or entity that distributes copies + of the Document to the public. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow the + conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled "History" in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + "History" section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version's + license notice. These titles must be distinct from any other + section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the documents + in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, receipt of a copy of some or all of the + same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + . + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software. + + +File: bashref.info, Node: Indexes, Prev: GNU Free Documentation License, Up: Top + +Appendix D Indexes +****************** + +* Menu: + +* Builtin Index:: Index of Bash builtin commands. +* Reserved Word Index:: Index of Bash reserved words. +* Variable Index:: Quick reference helps you find the + variable you want. +* Function Index:: Index of bindable Readline functions. +* Concept Index:: General index for concepts described in + this manual. + + +File: bashref.info, Node: Builtin Index, Next: Reserved Word Index, Up: Indexes + +D.1 Index of Shell Builtin Commands +=================================== + +[index] +* Menu: + +* .: Bourne Shell Builtins. + (line 17) +* :: Bourne Shell Builtins. + (line 11) +* [: Bourne Shell Builtins. + (line 270) +* alias: Bash Builtins. (line 11) +* bg: Job Control Builtins. + (line 7) +* bind: Bash Builtins. (line 21) +* break: Bourne Shell Builtins. + (line 36) +* builtin: Bash Builtins. (line 104) +* caller: Bash Builtins. (line 113) +* cd: Bourne Shell Builtins. + (line 44) +* command: Bash Builtins. (line 130) +* compgen: Programmable Completion Builtins. + (line 12) +* complete: Programmable Completion Builtins. + (line 30) +* compopt: Programmable Completion Builtins. + (line 237) +* continue: Bourne Shell Builtins. + (line 85) +* declare: Bash Builtins. (line 150) +* dirs: Directory Stack Builtins. + (line 7) +* disown: Job Control Builtins. + (line 101) +* echo: Bash Builtins. (line 253) +* enable: Bash Builtins. (line 302) +* eval: Bourne Shell Builtins. + (line 94) +* exec: Bourne Shell Builtins. + (line 102) +* exit: Bourne Shell Builtins. + (line 120) +* export: Bourne Shell Builtins. + (line 127) +* fc: Bash History Builtins. + (line 10) +* fg: Job Control Builtins. + (line 17) +* getopts: Bourne Shell Builtins. + (line 143) +* hash: Bourne Shell Builtins. + (line 187) +* help: Bash Builtins. (line 331) +* history: Bash History Builtins. + (line 46) +* jobs: Job Control Builtins. + (line 27) +* kill: Job Control Builtins. + (line 58) +* let: Bash Builtins. (line 350) +* local: Bash Builtins. (line 358) +* logout: Bash Builtins. (line 374) +* mapfile: Bash Builtins. (line 379) +* popd: Directory Stack Builtins. + (line 35) +* printf: Bash Builtins. (line 425) +* pushd: Directory Stack Builtins. + (line 53) +* pwd: Bourne Shell Builtins. + (line 207) +* read: Bash Builtins. (line 474) +* readarray: Bash Builtins. (line 570) +* readonly: Bourne Shell Builtins. + (line 217) +* return: Bourne Shell Builtins. + (line 236) +* set: The Set Builtin. (line 11) +* shift: Bourne Shell Builtins. + (line 257) +* shopt: The Shopt Builtin. (line 9) +* source: Bash Builtins. (line 579) +* suspend: Job Control Builtins. + (line 113) +* test: Bourne Shell Builtins. + (line 270) +* times: Bourne Shell Builtins. + (line 349) +* trap: Bourne Shell Builtins. + (line 355) +* type: Bash Builtins. (line 584) +* typeset: Bash Builtins. (line 616) +* ulimit: Bash Builtins. (line 622) +* umask: Bourne Shell Builtins. + (line 404) +* unalias: Bash Builtins. (line 728) +* unset: Bourne Shell Builtins. + (line 422) +* wait: Job Control Builtins. + (line 76) + + +File: bashref.info, Node: Reserved Word Index, Next: Variable Index, Prev: Builtin Index, Up: Indexes + +D.2 Index of Shell Reserved Words +================================= + +[index] +* Menu: + +* !: Pipelines. (line 9) +* [[: Conditional Constructs. + (line 125) +* ]]: Conditional Constructs. + (line 125) +* {: Command Grouping. (line 21) +* }: Command Grouping. (line 21) +* case: Conditional Constructs. + (line 28) +* do: Looping Constructs. (line 12) +* done: Looping Constructs. (line 12) +* elif: Conditional Constructs. + (line 7) +* else: Conditional Constructs. + (line 7) +* esac: Conditional Constructs. + (line 28) +* fi: Conditional Constructs. + (line 7) +* for: Looping Constructs. (line 32) +* function: Shell Functions. (line 13) +* if: Conditional Constructs. + (line 7) +* in: Conditional Constructs. + (line 28) +* select: Conditional Constructs. + (line 83) +* then: Conditional Constructs. + (line 7) +* time: Pipelines. (line 9) +* until: Looping Constructs. (line 12) +* while: Looping Constructs. (line 22) + + +File: bashref.info, Node: Variable Index, Next: Function Index, Prev: Reserved Word Index, Up: Indexes + +D.3 Parameter and Variable Index +================================ + +[index] +* Menu: + +* !: Special Parameters. (line 56) +* #: Special Parameters. (line 39) +* $: Special Parameters. (line 51) +* $!: Special Parameters. (line 57) +* $#: Special Parameters. (line 40) +* $$: Special Parameters. (line 52) +* $*: Special Parameters. (line 10) +* $-: Special Parameters. (line 47) +* $0: Special Parameters. (line 62) +* $?: Special Parameters. (line 43) +* $@: Special Parameters. (line 23) +* $_: Bash Variables. (line 14) +* *: Special Parameters. (line 9) +* -: Special Parameters. (line 46) +* 0: Special Parameters. (line 61) +* ?: Special Parameters. (line 42) +* @: Special Parameters. (line 22) +* _: Bash Variables. (line 13) +* auto_resume: Job Control Variables. + (line 6) +* BASH: Bash Variables. (line 23) +* BASHOPTS: Bash Variables. (line 26) +* BASHPID: Bash Variables. (line 35) +* BASH_ALIASES: Bash Variables. (line 42) +* BASH_ARGC: Bash Variables. (line 51) +* BASH_ARGV: Bash Variables. (line 64) +* BASH_ARGV0: Bash Variables. (line 76) +* BASH_CMDS: Bash Variables. (line 84) +* BASH_COMMAND: Bash Variables. (line 93) +* BASH_COMPAT: Bash Variables. (line 100) +* BASH_ENV: Bash Variables. (line 116) +* BASH_EXECUTION_STRING: Bash Variables. (line 122) +* BASH_LINENO: Bash Variables. (line 125) +* BASH_LOADABLES_PATH: Bash Variables. (line 133) +* BASH_REMATCH: Bash Variables. (line 137) +* BASH_SOURCE: Bash Variables. (line 145) +* BASH_SUBSHELL: Bash Variables. (line 152) +* BASH_VERSINFO: Bash Variables. (line 158) +* BASH_VERSION: Bash Variables. (line 181) +* BASH_XTRACEFD: Bash Variables. (line 184) +* bell-style: Readline Init File Syntax. + (line 38) +* bind-tty-special-chars: Readline Init File Syntax. + (line 45) +* blink-matching-paren: Readline Init File Syntax. + (line 50) +* CDPATH: Bourne Shell Variables. + (line 9) +* CHILD_MAX: Bash Variables. (line 195) +* colored-completion-prefix: Readline Init File Syntax. + (line 55) +* colored-stats: Readline Init File Syntax. + (line 62) +* COLUMNS: Bash Variables. (line 202) +* comment-begin: Readline Init File Syntax. + (line 68) +* completion-display-width: Readline Init File Syntax. + (line 73) +* completion-ignore-case: Readline Init File Syntax. + (line 80) +* completion-map-case: Readline Init File Syntax. + (line 85) +* completion-prefix-display-length: Readline Init File Syntax. + (line 91) +* completion-query-items: Readline Init File Syntax. + (line 98) +* COMPREPLY: Bash Variables. (line 254) +* COMP_CWORD: Bash Variables. (line 208) +* COMP_KEY: Bash Variables. (line 237) +* COMP_LINE: Bash Variables. (line 214) +* COMP_POINT: Bash Variables. (line 219) +* COMP_TYPE: Bash Variables. (line 227) +* COMP_WORDBREAKS: Bash Variables. (line 241) +* COMP_WORDS: Bash Variables. (line 247) +* convert-meta: Readline Init File Syntax. + (line 108) +* COPROC: Bash Variables. (line 260) +* DIRSTACK: Bash Variables. (line 264) +* disable-completion: Readline Init File Syntax. + (line 116) +* echo-control-characters: Readline Init File Syntax. + (line 121) +* editing-mode: Readline Init File Syntax. + (line 126) +* EMACS: Bash Variables. (line 274) +* emacs-mode-string: Readline Init File Syntax. + (line 132) +* enable-bracketed-paste: Readline Init File Syntax. + (line 142) +* enable-keypad: Readline Init File Syntax. + (line 150) +* ENV: Bash Variables. (line 279) +* EPOCHREALTIME: Bash Variables. (line 284) +* EPOCHSECONDS: Bash Variables. (line 292) +* EUID: Bash Variables. (line 299) +* EXECIGNORE: Bash Variables. (line 303) +* expand-tilde: Readline Init File Syntax. + (line 161) +* FCEDIT: Bash Variables. (line 316) +* FIGNORE: Bash Variables. (line 320) +* FUNCNAME: Bash Variables. (line 326) +* FUNCNEST: Bash Variables. (line 343) +* GLOBIGNORE: Bash Variables. (line 348) +* GROUPS: Bash Variables. (line 355) +* histchars: Bash Variables. (line 361) +* HISTCMD: Bash Variables. (line 376) +* HISTCONTROL: Bash Variables. (line 382) +* HISTFILE: Bash Variables. (line 398) +* HISTFILESIZE: Bash Variables. (line 402) +* HISTIGNORE: Bash Variables. (line 413) +* history-preserve-point: Readline Init File Syntax. + (line 165) +* history-size: Readline Init File Syntax. + (line 171) +* HISTSIZE: Bash Variables. (line 433) +* HISTTIMEFORMAT: Bash Variables. (line 440) +* HOME: Bourne Shell Variables. + (line 13) +* horizontal-scroll-mode: Readline Init File Syntax. + (line 180) +* HOSTFILE: Bash Variables. (line 448) +* HOSTNAME: Bash Variables. (line 459) +* HOSTTYPE: Bash Variables. (line 462) +* IFS: Bourne Shell Variables. + (line 18) +* IGNOREEOF: Bash Variables. (line 465) +* input-meta: Readline Init File Syntax. + (line 189) +* INPUTRC: Bash Variables. (line 475) +* INSIDE_EMACS: Bash Variables. (line 479) +* isearch-terminators: Readline Init File Syntax. + (line 197) +* keymap: Readline Init File Syntax. + (line 204) +* LANG: Bash Variables. (line 485) +* LC_ALL: Bash Variables. (line 489) +* LC_COLLATE: Bash Variables. (line 493) +* LC_CTYPE: Bash Variables. (line 500) +* LC_MESSAGES: Locale Translation. (line 15) +* LC_MESSAGES <1>: Bash Variables. (line 505) +* LC_NUMERIC: Bash Variables. (line 509) +* LC_TIME: Bash Variables. (line 513) +* LINENO: Bash Variables. (line 517) +* LINES: Bash Variables. (line 522) +* MACHTYPE: Bash Variables. (line 528) +* MAIL: Bourne Shell Variables. + (line 22) +* MAILCHECK: Bash Variables. (line 532) +* MAILPATH: Bourne Shell Variables. + (line 27) +* MAPFILE: Bash Variables. (line 540) +* mark-modified-lines: Readline Init File Syntax. + (line 234) +* mark-symlinked-directories: Readline Init File Syntax. + (line 239) +* match-hidden-files: Readline Init File Syntax. + (line 244) +* menu-complete-display-prefix: Readline Init File Syntax. + (line 251) +* meta-flag: Readline Init File Syntax. + (line 189) +* OLDPWD: Bash Variables. (line 544) +* OPTARG: Bourne Shell Variables. + (line 34) +* OPTERR: Bash Variables. (line 547) +* OPTIND: Bourne Shell Variables. + (line 38) +* OSTYPE: Bash Variables. (line 551) +* output-meta: Readline Init File Syntax. + (line 256) +* page-completions: Readline Init File Syntax. + (line 262) +* PATH: Bourne Shell Variables. + (line 42) +* PIPESTATUS: Bash Variables. (line 554) +* POSIXLY_CORRECT: Bash Variables. (line 559) +* PPID: Bash Variables. (line 569) +* PROMPT_COMMAND: Bash Variables. (line 573) +* PROMPT_DIRTRIM: Bash Variables. (line 579) +* PS0: Bash Variables. (line 585) +* PS1: Bourne Shell Variables. + (line 48) +* PS2: Bourne Shell Variables. + (line 53) +* PS3: Bash Variables. (line 590) +* PS4: Bash Variables. (line 595) +* PWD: Bash Variables. (line 603) +* RANDOM: Bash Variables. (line 606) +* READLINE_LINE: Bash Variables. (line 612) +* READLINE_MARK: Bash Variables. (line 616) +* READLINE_POINT: Bash Variables. (line 622) +* REPLY: Bash Variables. (line 626) +* revert-all-at-newline: Readline Init File Syntax. + (line 272) +* SECONDS: Bash Variables. (line 629) +* SHELL: Bash Variables. (line 638) +* SHELLOPTS: Bash Variables. (line 643) +* SHLVL: Bash Variables. (line 652) +* show-all-if-ambiguous: Readline Init File Syntax. + (line 278) +* show-all-if-unmodified: Readline Init File Syntax. + (line 284) +* show-mode-in-prompt: Readline Init File Syntax. + (line 293) +* skip-completed-text: Readline Init File Syntax. + (line 299) +* SRANDOM: Bash Variables. (line 657) +* TEXTDOMAIN: Locale Translation. (line 15) +* TEXTDOMAINDIR: Locale Translation. (line 15) +* TIMEFORMAT: Bash Variables. (line 666) +* TMOUT: Bash Variables. (line 704) +* TMPDIR: Bash Variables. (line 716) +* UID: Bash Variables. (line 720) +* vi-cmd-mode-string: Readline Init File Syntax. + (line 312) +* vi-ins-mode-string: Readline Init File Syntax. + (line 323) +* visible-stats: Readline Init File Syntax. + (line 334) + + +File: bashref.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes + +D.4 Function Index +================== + +[index] +* Menu: + +* abort (C-g): Miscellaneous Commands. + (line 10) +* accept-line (Newline or Return): Commands For History. + (line 6) +* alias-expand-line (): Miscellaneous Commands. + (line 125) +* backward-char (C-b): Commands For Moving. (line 15) +* backward-delete-char (Rubout): Commands For Text. (line 17) +* backward-kill-line (C-x Rubout): Commands For Killing. + (line 11) +* backward-kill-word (M-): Commands For Killing. + (line 28) +* backward-word (M-b): Commands For Moving. (line 22) +* beginning-of-history (M-<): Commands For History. + (line 20) +* beginning-of-line (C-a): Commands For Moving. (line 6) +* bracketed-paste-begin (): Commands For Text. (line 33) +* call-last-kbd-macro (C-x e): Keyboard Macros. (line 13) +* capitalize-word (M-c): Commands For Text. (line 66) +* character-search (C-]): Miscellaneous Commands. + (line 42) +* character-search-backward (M-C-]): Miscellaneous Commands. + (line 47) +* clear-display (M-C-l): Commands For Moving. (line 48) +* clear-screen (C-l): Commands For Moving. (line 53) +* complete (): Commands For Completion. + (line 6) +* complete-command (M-!): Commands For Completion. + (line 80) +* complete-filename (M-/): Commands For Completion. + (line 49) +* complete-hostname (M-@): Commands For Completion. + (line 72) +* complete-into-braces (M-{): Commands For Completion. + (line 100) +* complete-username (M-~): Commands For Completion. + (line 56) +* complete-variable (M-$): Commands For Completion. + (line 64) +* copy-backward-word (): Commands For Killing. + (line 69) +* copy-forward-word (): Commands For Killing. + (line 74) +* copy-region-as-kill (): Commands For Killing. + (line 65) +* dabbrev-expand (): Commands For Completion. + (line 95) +* delete-char (C-d): Commands For Text. (line 12) +* delete-char-or-list (): Commands For Completion. + (line 43) +* delete-horizontal-space (): Commands For Killing. + (line 57) +* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6) +* display-shell-version (C-x C-v): Miscellaneous Commands. + (line 110) +* do-lowercase-version (M-A, M-B, M-X, ...): Miscellaneous Commands. + (line 14) +* downcase-word (M-l): Commands For Text. (line 62) +* dump-functions (): Miscellaneous Commands. + (line 74) +* dump-macros (): Miscellaneous Commands. + (line 86) +* dump-variables (): Miscellaneous Commands. + (line 80) +* dynamic-complete-history (M-): Commands For Completion. + (line 90) +* edit-and-execute-command (C-x C-e): Miscellaneous Commands. + (line 134) +* end-kbd-macro (C-x )): Keyboard Macros. (line 9) +* end-of-file (usually C-d): Commands For Text. (line 6) +* end-of-history (M->): Commands For History. + (line 23) +* end-of-line (C-e): Commands For Moving. (line 9) +* exchange-point-and-mark (C-x C-x): Miscellaneous Commands. + (line 37) +* forward-backward-delete-char (): Commands For Text. (line 21) +* forward-char (C-f): Commands For Moving. (line 12) +* forward-search-history (C-s): Commands For History. + (line 33) +* forward-word (M-f): Commands For Moving. (line 18) +* glob-complete-word (M-g): Miscellaneous Commands. + (line 92) +* glob-expand-word (C-x *): Miscellaneous Commands. + (line 98) +* glob-list-expansions (C-x g): Miscellaneous Commands. + (line 104) +* history-and-alias-expand-line (): Miscellaneous Commands. + (line 128) +* history-expand-line (M-^): Miscellaneous Commands. + (line 118) +* history-search-backward (): Commands For History. + (line 57) +* history-search-forward (): Commands For History. + (line 51) +* history-substring-search-backward (): Commands For History. + (line 69) +* history-substring-search-forward (): Commands For History. + (line 63) +* insert-comment (M-#): Miscellaneous Commands. + (line 61) +* insert-completions (M-*): Commands For Completion. + (line 22) +* insert-last-argument (M-. or M-_): Miscellaneous Commands. + (line 131) +* kill-line (C-k): Commands For Killing. + (line 6) +* kill-region (): Commands For Killing. + (line 61) +* kill-whole-line (): Commands For Killing. + (line 19) +* kill-word (M-d): Commands For Killing. + (line 23) +* magic-space (): Miscellaneous Commands. + (line 121) +* menu-complete (): Commands For Completion. + (line 26) +* menu-complete-backward (): Commands For Completion. + (line 38) +* next-history (C-n): Commands For History. + (line 17) +* next-screen-line (): Commands For Moving. (line 41) +* non-incremental-forward-search-history (M-n): Commands For History. + (line 45) +* non-incremental-reverse-search-history (M-p): Commands For History. + (line 39) +* operate-and-get-next (C-o): Commands For History. + (line 96) +* overwrite-mode (): Commands For Text. (line 70) +* possible-command-completions (C-x !): Commands For Completion. + (line 86) +* possible-completions (M-?): Commands For Completion. + (line 15) +* possible-filename-completions (C-x /): Commands For Completion. + (line 52) +* possible-hostname-completions (C-x @): Commands For Completion. + (line 76) +* possible-username-completions (C-x ~): Commands For Completion. + (line 60) +* possible-variable-completions (C-x $): Commands For Completion. + (line 68) +* prefix-meta (): Miscellaneous Commands. + (line 19) +* previous-history (C-p): Commands For History. + (line 13) +* previous-screen-line (): Commands For Moving. (line 34) +* print-last-kbd-macro (): Keyboard Macros. (line 17) +* quoted-insert (C-q or C-v): Commands For Text. (line 26) +* re-read-init-file (C-x C-r): Miscellaneous Commands. + (line 6) +* redraw-current-line (): Commands For Moving. (line 57) +* reverse-search-history (C-r): Commands For History. + (line 27) +* revert-line (M-r): Miscellaneous Commands. + (line 26) +* self-insert (a, b, A, 1, !, ...): Commands For Text. (line 30) +* set-mark (C-@): Miscellaneous Commands. + (line 33) +* shell-backward-kill-word (): Commands For Killing. + (line 37) +* shell-backward-word (M-C-b): Commands For Moving. (line 30) +* shell-expand-line (M-C-e): Miscellaneous Commands. + (line 113) +* shell-forward-word (M-C-f): Commands For Moving. (line 26) +* shell-kill-word (M-C-d): Commands For Killing. + (line 32) +* shell-transpose-words (M-C-t): Commands For Killing. + (line 41) +* skip-csi-sequence (): Miscellaneous Commands. + (line 52) +* start-kbd-macro (C-x (): Keyboard Macros. (line 6) +* tilde-expand (M-&): Miscellaneous Commands. + (line 30) +* transpose-chars (C-t): Commands For Text. (line 47) +* transpose-words (M-t): Commands For Text. (line 53) +* undo (C-_ or C-x C-u): Miscellaneous Commands. + (line 23) +* universal-argument (): Numeric Arguments. (line 10) +* unix-filename-rubout (): Commands For Killing. + (line 52) +* unix-line-discard (C-u): Commands For Killing. + (line 16) +* unix-word-rubout (C-w): Commands For Killing. + (line 48) +* upcase-word (M-u): Commands For Text. (line 58) +* yank (C-y): Commands For Killing. + (line 79) +* yank-last-arg (M-. or M-_): Commands For History. + (line 84) +* yank-nth-arg (M-C-y): Commands For History. + (line 75) +* yank-pop (M-y): Commands For Killing. + (line 82) + + +File: bashref.info, Node: Concept Index, Prev: Function Index, Up: Indexes + +D.5 Concept Index +================= + +[index] +* Menu: + +* alias expansion: Aliases. (line 6) +* arithmetic evaluation: Shell Arithmetic. (line 6) +* arithmetic expansion: Arithmetic Expansion. + (line 6) +* arithmetic, shell: Shell Arithmetic. (line 6) +* arrays: Arrays. (line 6) +* background: Job Control Basics. (line 6) +* Bash configuration: Basic Installation. (line 6) +* Bash installation: Basic Installation. (line 6) +* Bourne shell: Basic Shell Features. + (line 6) +* brace expansion: Brace Expansion. (line 6) +* builtin: Definitions. (line 17) +* command editing: Readline Bare Essentials. + (line 6) +* command execution: Command Search and Execution. + (line 6) +* command expansion: Simple Command Expansion. + (line 6) +* command history: Bash History Facilities. + (line 6) +* command search: Command Search and Execution. + (line 6) +* command substitution: Command Substitution. + (line 6) +* command timing: Pipelines. (line 9) +* commands, compound: Compound Commands. (line 6) +* commands, conditional: Conditional Constructs. + (line 6) +* commands, grouping: Command Grouping. (line 6) +* commands, lists: Lists. (line 6) +* commands, looping: Looping Constructs. (line 6) +* commands, pipelines: Pipelines. (line 6) +* commands, shell: Shell Commands. (line 6) +* commands, simple: Simple Commands. (line 6) +* comments, shell: Comments. (line 6) +* Compatibility Level: Shell Compatibility Mode. + (line 6) +* Compatibility Mode: Shell Compatibility Mode. + (line 6) +* completion builtins: Programmable Completion Builtins. + (line 6) +* configuration: Basic Installation. (line 6) +* control operator: Definitions. (line 21) +* coprocess: Coprocesses. (line 6) +* directory stack: The Directory Stack. (line 6) +* editing command lines: Readline Bare Essentials. + (line 6) +* environment: Environment. (line 6) +* evaluation, arithmetic: Shell Arithmetic. (line 6) +* event designators: Event Designators. (line 6) +* execution environment: Command Execution Environment. + (line 6) +* exit status: Definitions. (line 26) +* exit status <1>: Exit Status. (line 6) +* expansion: Shell Expansions. (line 6) +* expansion, arithmetic: Arithmetic Expansion. + (line 6) +* expansion, brace: Brace Expansion. (line 6) +* expansion, filename: Filename Expansion. (line 9) +* expansion, parameter: Shell Parameter Expansion. + (line 6) +* expansion, pathname: Filename Expansion. (line 9) +* expansion, tilde: Tilde Expansion. (line 6) +* expressions, arithmetic: Shell Arithmetic. (line 6) +* expressions, conditional: Bash Conditional Expressions. + (line 6) +* field: Definitions. (line 30) +* filename: Definitions. (line 35) +* filename expansion: Filename Expansion. (line 9) +* foreground: Job Control Basics. (line 6) +* functions, shell: Shell Functions. (line 6) +* history builtins: Bash History Builtins. + (line 6) +* history events: Event Designators. (line 8) +* history expansion: History Interaction. (line 6) +* history list: Bash History Facilities. + (line 6) +* History, how to use: A Programmable Completion Example. + (line 113) +* identifier: Definitions. (line 51) +* initialization file, readline: Readline Init File. (line 6) +* installation: Basic Installation. (line 6) +* interaction, readline: Readline Interaction. + (line 6) +* interactive shell: Invoking Bash. (line 131) +* interactive shell <1>: Interactive Shells. (line 6) +* internationalization: Locale Translation. (line 6) +* job: Definitions. (line 38) +* job control: Definitions. (line 42) +* job control <1>: Job Control Basics. (line 6) +* kill ring: Readline Killing Commands. + (line 18) +* killing text: Readline Killing Commands. + (line 6) +* localization: Locale Translation. (line 6) +* login shell: Invoking Bash. (line 128) +* matching, pattern: Pattern Matching. (line 6) +* metacharacter: Definitions. (line 46) +* name: Definitions. (line 51) +* native languages: Locale Translation. (line 6) +* notation, readline: Readline Bare Essentials. + (line 6) +* operator, shell: Definitions. (line 57) +* parameter expansion: Shell Parameter Expansion. + (line 6) +* parameters: Shell Parameters. (line 6) +* parameters, positional: Positional Parameters. + (line 6) +* parameters, special: Special Parameters. (line 6) +* pathname expansion: Filename Expansion. (line 9) +* pattern matching: Pattern Matching. (line 6) +* pipeline: Pipelines. (line 6) +* POSIX: Definitions. (line 9) +* POSIX Mode: Bash POSIX Mode. (line 6) +* process group: Definitions. (line 62) +* process group ID: Definitions. (line 66) +* process substitution: Process Substitution. + (line 6) +* programmable completion: Programmable Completion. + (line 6) +* prompting: Controlling the Prompt. + (line 6) +* quoting: Quoting. (line 6) +* quoting, ANSI: ANSI-C Quoting. (line 6) +* Readline, how to use: Job Control Variables. + (line 23) +* redirection: Redirections. (line 6) +* reserved word: Definitions. (line 70) +* reserved words: Reserved Words. (line 6) +* restricted shell: The Restricted Shell. + (line 6) +* return status: Definitions. (line 75) +* shell arithmetic: Shell Arithmetic. (line 6) +* shell function: Shell Functions. (line 6) +* shell script: Shell Scripts. (line 6) +* shell variable: Shell Parameters. (line 6) +* shell, interactive: Interactive Shells. (line 6) +* signal: Definitions. (line 78) +* signal handling: Signals. (line 6) +* special builtin: Definitions. (line 82) +* special builtin <1>: Special Builtins. (line 6) +* startup files: Bash Startup Files. (line 6) +* suspending jobs: Job Control Basics. (line 6) +* tilde expansion: Tilde Expansion. (line 6) +* token: Definitions. (line 86) +* translation, native languages: Locale Translation. (line 6) +* variable, shell: Shell Parameters. (line 6) +* variables, readline: Readline Init File Syntax. + (line 37) +* word: Definitions. (line 90) +* word splitting: Word Splitting. (line 6) +* yanking text: Readline Killing Commands. + (line 6) + + + +Tag Table: +Node: Top895 +Node: Introduction2813 +Node: What is Bash?3029 +Node: What is a shell?4143 +Node: Definitions6681 +Node: Basic Shell Features9632 +Node: Shell Syntax10851 +Node: Shell Operation11877 +Node: Quoting13170 +Node: Escape Character14470 +Node: Single Quotes14955 +Node: Double Quotes15303 +Node: ANSI-C Quoting16581 +Node: Locale Translation17840 +Node: Comments18993 +Node: Shell Commands19611 +Node: Reserved Words20549 +Node: Simple Commands21305 +Node: Pipelines21959 +Node: Lists24891 +Node: Compound Commands26682 +Node: Looping Constructs27694 +Node: Conditional Constructs30189 +Node: Command Grouping41760 +Node: Coprocesses43239 +Node: GNU Parallel45142 +Node: Shell Functions49443 +Node: Shell Parameters56650 +Node: Positional Parameters61063 +Node: Special Parameters61963 +Node: Shell Expansions65187 +Node: Brace Expansion67310 +Node: Tilde Expansion70033 +Node: Shell Parameter Expansion72650 +Node: Command Substitution87779 +Node: Arithmetic Expansion89134 +Node: Process Substitution90066 +Node: Word Splitting91186 +Node: Filename Expansion93130 +Node: Pattern Matching95679 +Node: Quote Removal99665 +Node: Redirections99960 +Node: Executing Commands109530 +Node: Simple Command Expansion110200 +Node: Command Search and Execution112154 +Node: Command Execution Environment114530 +Node: Environment117514 +Node: Exit Status119173 +Node: Signals120843 +Node: Shell Scripts122810 +Node: Shell Builtin Commands125822 +Node: Bourne Shell Builtins127860 +Node: Bash Builtins148789 +Node: Modifying Shell Behavior178898 +Node: The Set Builtin179243 +Node: The Shopt Builtin189656 +Node: Special Builtins204566 +Node: Shell Variables205545 +Node: Bourne Shell Variables205982 +Node: Bash Variables208086 +Node: Bash Features240720 +Node: Invoking Bash241733 +Node: Bash Startup Files247746 +Node: Interactive Shells252849 +Node: What is an Interactive Shell?253259 +Node: Is this Shell Interactive?253908 +Node: Interactive Shell Behavior254723 +Node: Bash Conditional Expressions258237 +Node: Shell Arithmetic262814 +Node: Aliases265754 +Node: Arrays268374 +Node: The Directory Stack274383 +Node: Directory Stack Builtins275167 +Node: Controlling the Prompt278135 +Node: The Restricted Shell281085 +Node: Bash POSIX Mode283679 +Node: Shell Compatibility Mode294715 +Node: Job Control301371 +Node: Job Control Basics301831 +Node: Job Control Builtins306827 +Node: Job Control Variables312227 +Node: Command Line Editing313383 +Node: Introduction and Notation315054 +Node: Readline Interaction316677 +Node: Readline Bare Essentials317868 +Node: Readline Movement Commands319651 +Node: Readline Killing Commands320611 +Node: Readline Arguments322529 +Node: Searching323573 +Node: Readline Init File325759 +Node: Readline Init File Syntax327018 +Node: Conditional Init Constructs347556 +Node: Sample Init File351752 +Node: Bindable Readline Commands354876 +Node: Commands For Moving356080 +Node: Commands For History358131 +Node: Commands For Text362924 +Node: Commands For Killing366573 +Node: Numeric Arguments369606 +Node: Commands For Completion370745 +Node: Keyboard Macros374936 +Node: Miscellaneous Commands375623 +Node: Readline vi Mode381307 +Node: Programmable Completion382214 +Node: Programmable Completion Builtins389994 +Node: A Programmable Completion Example400689 +Node: Using History Interactively405936 +Node: Bash History Facilities406620 +Node: Bash History Builtins409625 +Node: History Interaction414354 +Node: Event Designators417974 +Node: Word Designators419328 +Node: Modifiers421088 +Node: Installing Bash422899 +Node: Basic Installation424036 +Node: Compilers and Options427294 +Node: Compiling For Multiple Architectures428035 +Node: Installation Names429728 +Node: Specifying the System Type430546 +Node: Sharing Defaults431262 +Node: Operation Controls431935 +Node: Optional Features432893 +Node: Reporting Bugs443411 +Node: Major Differences From The Bourne Shell444605 +Node: GNU Free Documentation License461457 +Node: Indexes486634 +Node: Builtin Index487088 +Node: Reserved Word Index493915 +Node: Variable Index496363 +Node: Function Index512260 +Node: Concept Index525770 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/bash-5.1/doc/bashref.pdf b/bash-5.1/doc/bashref.pdf new file mode 100644 index 0000000000000000000000000000000000000000..50b64fbae5b2045fe6516b54da269560bbae3aaa Binary files /dev/null and b/bash-5.1/doc/bashref.pdf differ diff --git a/bash-5.1/doc/bashref.ps b/bash-5.1/doc/bashref.ps new file mode 100644 index 0000000000000000000000000000000000000000..0ef38c1d1ceb44f5a106fdb64bf8095352c3b338 --- /dev/null +++ b/bash-5.1/doc/bashref.ps @@ -0,0 +1,21959 @@ +%!PS-Adobe-2.0 +%%Creator: dvips(k) 2020.1 Copyright 2020 Radical Eye Software +%%Title: bashref.dvi +%%CreationDate: Wed Nov 18 20:13:07 2020 +%%Pages: 189 +%%PageOrder: Ascend +%%BoundingBox: 0 0 612 792 +%%DocumentFonts: CMBX12 CMR10 CMTT10 CMSL10 CMSY10 CMMI12 CMMI10 CMCSC10 +%%+ CMTI10 CMSLTT10 SFRM1095 CMTT12 CMTT9 CMMI9 CMR9 SFRM1440 +%%DocumentPaperSizes: Letter +%%EndComments +%DVIPSWebPage: (www.radicaleye.com) +%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi +%DVIPSParameters: dpi=600 +%DVIPSSource: TeX output 2020.11.18:1513 +%%BeginProcSet: tex.pro 0 0 +%! +/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S +N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 +mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 +0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ +landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize +mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ +matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round +exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ +statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] +N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin +/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array +/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 +array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N +df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A +definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get +}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} +B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr +1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S +/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy +setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask +restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn +/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put +}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ +bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A +mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ +SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ +userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X +1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 +index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N +/dir 0 def/dyy{/dir 0 def}B/dyt{/dir 1 def}B/dty{/dir 2 def}B/dtt{/dir 3 +def}B/p{dir 2 eq{-90 rotate show 90 rotate}{dir 3 eq{-90 rotate show 90 +rotate}{show}ifelse}ifelse}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 +N/Ry 0 N/V{}B/RV/v{/Ry X/Rx X V}B statusdict begin/product where{pop +false[(Display)(NeXT)(LaserWriter 16/600)]{A length product length le{A +length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse} +forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{ +BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat +{BDot}imagemask grestore}}ifelse B/QV{gsave newpath transform round exch +round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 +rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B +/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M} +B/g{0 M}B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p +-3 w}B/n{p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{ +0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + +%%EndProcSet +%%BeginProcSet: cm-super-t1.enc 0 0 +% This file is generated from `T1uni.map' and `glyphlist.txt', `gl-other.txt' +% +% LIGKERN hyphen hyphen =: endash ; endash hyphen =: emdash ; +% LIGKERN quoteleft quoteleft =: quotedblleft ; +% LIGKERN quoteright quoteright =: quotedblright ; +% LIGKERN comma comma =: quotedblbase ; less less =: guillemotleft ; +% LIGKERN greater greater =: guillemotright ; +% LIGKERN f f =: ff ; f i =: fi ; f l =: fl ; ff i =: ffi ; ff l =: ffl ; +% +% LIGKERN space {} * ; * {} space ; zero {} * ; * {} zero ; +% LIGKERN one {} * ; * {} one ; two {} * ; * {} two ; +% LIGKERN three {} * ; * {} three ; four {} * ; * {} four ; +% LIGKERN five {} * ; * {} five ; six {} * ; * {} six ; +% LIGKERN seven {} * ; * {} seven ; eight {} * ; * {} eight ; +% LIGKERN nine {} * ; * {} nine ; +% +/T1Encoding [ +% 0x00 +/grave +/acute +/circumflex +/tilde +/dieresis +/hungarumlaut +/ring +/caron +/breve +/macron +/dotaccent +/cedilla +/ogonek +/quotesinglbase +/guilsinglleft +/guilsinglright +% 0x10 +/quotedblleft +/quotedblright +/quotedblbase +/guillemotleft +/guillemotright +/endash +/emdash +/afii61664 +/perthousandzero % PERTHOUSAND ZERO +/dotlessi +/dotlessj +/ff +/fi +/fl +/ffi +/ffl +% 0x20 +/uni2423 +/exclam +/quotedbl +/numbersign +/dollar +/percent +/ampersand +/quoteright +/parenleft +/parenright +/asterisk +/plus +/comma +/hyphen +/period +/slash +% 0x30 +/zero +/one +/two +/three +/four +/five +/six +/seven +/eight +/nine +/colon +/semicolon +/less +/equal +/greater +/question +% 0x40 +/at +/A +/B +/C +/D +/E +/F +/G +/H +/I +/J +/K +/L +/M +/N +/O +% 0x50 +/P +/Q +/R +/S +/T +/U +/V +/W +/X +/Y +/Z +/bracketleft +/backslash +/bracketright +/asciicircum +/underscore +% 0x60 +/quoteleft +/a +/b +/c +/d +/e +/f +/g +/h +/i +/j +/k +/l +/m +/n +/o +% 0x70 +/p +/q +/r +/s +/t +/u +/v +/w +/x +/y +/z +/braceleft +/bar +/braceright +/asciitilde +/hyphen.alt % HANGING HYPHEN +% 0x80 +/Abreve +/Aogonek +/Cacute +/Ccaron +/Dcaron +/Ecaron +/Eogonek +/Gbreve +/Lacute +/Lcaron +/Lslash +/Nacute +/Ncaron +/Eng +/Ohungarumlaut +/Racute +% 0x90 +/Rcaron +/Sacute +/Scaron +/Scedilla +/Tcaron +/Tcommaaccent +/Uhungarumlaut +/Uring +/Ydieresis +/Zacute +/Zcaron +/Zdotaccent +/IJ +/Idotaccent +/dcroat +/section +% 0xA0 +/abreve +/aogonek +/cacute +/ccaron +/dcaron +/ecaron +/eogonek +/gbreve +/lacute +/lcaron +/lslash +/nacute +/ncaron +/eng +/ohungarumlaut +/racute +% 0xB0 +/rcaron +/sacute +/scaron +/scedilla +/tcaron +/tcommaaccent +/uhungarumlaut +/uring +/ydieresis +/zacute +/zcaron +/zdotaccent +/ij +/exclamdown +/questiondown +/sterling +% 0xC0 +/Agrave +/Aacute +/Acircumflex +/Atilde +/Adieresis +/Aring +/AE +/Ccedilla +/Egrave +/Eacute +/Ecircumflex +/Edieresis +/Igrave +/Iacute +/Icircumflex +/Idieresis +% 0xD0 +/Eth +/Ntilde +/Ograve +/Oacute +/Ocircumflex +/Otilde +/Odieresis +/OE +/Oslash +/Ugrave +/Uacute +/Ucircumflex +/Udieresis +/Yacute +/Thorn +/SS % Germandbls +% 0xE0 +/agrave +/aacute +/acircumflex +/atilde +/adieresis +/aring +/ae +/ccedilla +/egrave +/eacute +/ecircumflex +/edieresis +/igrave +/iacute +/icircumflex +/idieresis +% 0xF0 +/eth +/ntilde +/ograve +/oacute +/ocircumflex +/otilde +/odieresis +/oe +/oslash +/ugrave +/uacute +/ucircumflex +/udieresis +/yacute +/thorn +/germandbls % or /germandbls.alt +] def + +%%EndProcSet +%%BeginProcSet: texps.pro 0 0 +%! +TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 +index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll +exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0 +ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{ +pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get +div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type +/nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end +definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup +sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll +mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[ +exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if} +forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def +end + +%%EndProcSet +%%BeginFont: SFRM1440 +%!FontType1-1.0: SFRM1440 0.3 +%%CreationDate: Wed Sep 12 2001 +% Copyright (c) 2001 Vladimir Volovich . +% See the file COPYING (GNU General Public License) for license conditions. +% Converted from METAFONT EC/TC and LH fonts: +% ecrm1440, tcrm1440, larm1440, lbrm1440, lcrm1440, rxrm1440. +11 dict begin +/FontInfo 6 dict dup begin +/version (0.3) def +/FullName (Computer Modern Roman) def +/FamilyName (Computer Modern) def +/ItalicAngle 0 def +/isFixedPitch false def +/Weight (Medium) def +end readonly def +/FontName /SFRM1440 def +/Encoding StandardEncoding def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] def +/FontBBox{-178 -319 1370 944}readonly def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052BD0CE60552BD63101D7CDBEEF5B11 +69C468645FE4ED1AF2541AA0770C1DCF81623DE0ECDF49F2B522618F650CE6CB +CC8C21885DD61AF8A523AA677EAEDDFA51A1F9B1885EEE0456196D634E04EF89 +F17499DAD982502ACC349B9EEAAE4A71A73D1147318C60A8BAC10510DE90D8D3 +F46E47295D27129A5AFE0C65E22BAD10D06885A2EE623FF8E1D90287A083E00C +EF25195F68A2A98170E4875AA6B96583CD5632BAD9EB3D511DF934CD36447A31 +D420FA313B5721C37085F478B27E13191957AD30B8B082BCE733AF8402AA3B7D +EC69807BBAA8142AF1CE151D99F5A59AD18798F94781EFAD48BEC8C62C05C56A +336D71AB584F6DF014C56523108606FADE931125496247870E980A65AB33C0C6 +D5B074864D0F58CBE333EFA1201AF335FBDBFB1CC8B1294856C250F222BFB8BE +5DE74F808904F7678552F213C674497F829E96812D340939F73737731D289801 +54E5A8F7F5067ACD9D768F4649B51E54513F2F7878141FC719627C23FC5FBBB6 +3F663343D902E95C56C559B588088227B22378FAAB29392FA62933283D2FB2EA +FDAEC6C1A94ABA0B5BEFA1E728A2052434BFBF6D9759D02A2C6092D4EF794241 +CC28BC939A424AFA193F96530985EE89E2731F6A99BC84C6551A3FEA1342509D +D389F786C8EAF972B8C98B79003B6C71E6696518BE4CAD2A317C5D29621031B4 +00A035445D8CFB67D6C136B3F6D82396E11A3679BC82498519C27601236F1FCA +073DA7817B529424CAF49A0AEE8FF7520C0F204A3B1725F46C2C6953C20E93B6 +2F3EED0EEDF87A350CB841516107D9571503A3D62A2F81840070D43392160783 +D111F3463760EBE634515DA1A1B6C3A5D14FC475F277BAC792FB69B4219E9BF5 +E6F8520584096A7B7BFE439A1604C2BBBB9140A4F4728B4B553A27E1AF52181D +701E90C4FBB16EA8DB39B562E5A2932D45893081D52E020A1FCBC44DC204F4A5 +BEE47F9D25876644CC856B1FC225B61124B89B896C39CDAB0ACCA8277F827382 +6F58A0C8456DC41217219D894B42968FB2EC75D5518B6C4413BAC889532F0B0B +A8D728949CEA00D4A1FD757B3A2336D472842ACF8EB9869044947C67D9AC7BBF +7386DDE209A8DC9F18085952818F67FDC6088D9C8BC51BA6DC0FA37A0F81EDB8 +6F259FA8C0FA3D55BC44529889E72E407C89ACF658631A0508FD7991088644B4 +C958031B52421F9CE73A0479A3175231EFD9E0F7A7B08380E9BAF015730B175B +93C380D1D0F3EB929B7182691BE7E2116CE295CA4331ABD7ECAD7D2DD46FE3E0 +5D3893ED100135901FD42B4E11BEB2689A13E86F1E68635DD81E5A720082E802 +89B440A111B2CDC6BFE79E5B2EB0C528FA0E958F0E981EC29C3B02A9186D7907 +A0CC29251E567958BA95DE609A421581433DD50AF96A82A5ADEFD1C9540D87A8 +D74A7709AF84AD36753784ED8267D3C2521A32C7A9D5BE01E0AF3B349200639C +90C8BF2E26920AC410A9C5D1EB85C0ADD16BAA83B6C0BFE82483D3B719DC19AC +89155140691E3E37F861C53A6F39441B5F229828B198DF5BF6286060DCB64433 +F43499E4AB973F84655311A644ED0921B41B9AE7A8060CB1F45E824FB3497C63 +0A13CB5902294E66186E4496A825447734DF4AB581803488B912E7DCD6007527 +B4CFDC5AD5D1DB430007AE929F969EE332CCF235DAF977D387E47BE0EE337118 +8CFAAC0907E16B0BEAECC3B39221867AE6464BE9AB4CE591B2E24B45AD2C70E2 +A183065810D6AC3DE8EA9F66615113F1E683A4475CE5817491ECBDD4A4818AED +EAFEAB8B93FBDB335D02FAF9276958EFAEE1057C45D313419D195068076D77B2 +C0FF6EA8D6F3F0A899D17E04B8B2141EE335 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMR9 +%!PS-AdobeFont-1.0: CMR9 003.002 +%%Title: CMR9 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMR9. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMR9 known{/CMR9 findfont dup/UniqueID known{dup +/UniqueID get 5000792 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMR9 def +/FontBBox {-39 -250 1036 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR9.) readonly def +/FullName (CMR9) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 12 /fi put +dup 44 /comma put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 72 /H put +dup 73 /I put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 82 /R put +dup 83 /S put +dup 88 /X put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB9AF72336CC4AD340 +15A449513D5F74BFB9A68ABC471020464E3E6E33008238B123DEDE18557D712E +ED5223722892A4DAC477120B8C9F3FE3FD334EACD3E8AABDC3C967C61FF003B4 +B10C56D6A490CE9594D57A2D431B9E5E10FE3D8832E227A7087611431ABCD029 +85F4865E17E17F8CFBD2CADC97E0A8820E3ACEC873F31464466A9545E967E53C +DBDDB8478E69063FBB891566BAF88B7660A4405B16834761F041CCF7650AF955 +F9E853AA9F5F4382E1FE7D0C5BB4023818A2383F91249D48CE021250EC9EEB1D +2835E18FB73026250B32A8849067D5E2258797C917F998F2D4121D96560C5FB5 +B5D3471216639A8671B6DFAC5E3554EC36D9A72518525A795590C74DD70DA3A7 +78BFC43E51D6F2BA52F17D4DD00D389D3983EC54912AFF73684A8A7E345537B7 +E62361C04A47859DA084BC72EA53512DC54132EB2EE671793603015652EAFDE3 +41C4B6B679BD60AEC5153EA0D2200CB1D097DAD770F5F31E6FC475A225995277 +B867B731D5401E2D02B85BA85158C80FF7E2BBCC42B98AC867E67D25DB656072 +55A0D32AB7AA483A5A9686CEA4E2B3031D90D84DB3E2DEE7706C91BA81CB8DAA +700E5F61E07D6998C9552C81B66FD10A10033D49EF3BCB0FF22ED0A3737523C9 +8F851C61C4BF8A213BF6EC70C956AE48B5BD276CC0437C72BF6515B10739919A +F00F6ADD2798CB211668842349171A5AEB0664D2C44397E55A4A9EBDF54A3EF4 +FBBCDAD9DAEF4B0CAEF7112FA828F2F8D9F633D37E5516AB5ECEA87342EF8DC4 +3A50548490F5BC9A8A1F98AC7AEAD9D913BFA10CA86D73AEB5BACC1FEEFDCC15 +B3655522CCA2C772E902FAB2A6FC153597D52763EB44AB7489FF061F7F58E8F2 +AEAAF4D17F36CBFC00D3C653F335D14240C87DB4339DA9D30A5BD1F502BC9013 +461B9DB2FBEEC01BB18990439A0E9CA6576BC9CF6B1A3DB9386C4A5D4AA6A5DC +CFA45FB75F22E10ECB72565DB441A194902C91427B4F676E531C661F7A2C3C85 +CD534D1C89B6779B2EDC8E44667B992C20C70B663BFBF680A6CF4383EB7CA26C +4D1F06B5EF4025BBE65795F1EDB5CCB97050872D6C07BC2974F905ACDB7A765F +291365D6C8152153E7F017A25FB4476C60FD9EAF9A121633DBEAC32F62850223 +D6418566AB350F90F4B35F19598478F76B63E347D4C61E203D4DB8ECB9889181 +C387F4B663A502C638761D2782BB96EAC81A0108D7BD6938F67FEBB69218D115 +D8E89CFABCE15C6ACC7FEB983332A51A6A73CF4E341574F366713D7FB29956D9 +9BF238A87483D37E526A2EA2F101EDD34E34CB92730DCA7235AA0027189BE405 +2DAB4AA021A30C28B26C50808E1E965C02F6212EC7C72F5683339425A7739380 +A422E6191ED8453AF0CAAA424AE44DFA7CC5C2F6EAA8D73A5101D8E9517DBCFB +2858D0E8ECB7DC430EF23A9E4428CB7DED8D035D6050251AC101A2D0E884721E +2F21E573F948048BB8FF888911C508CC198BD750083B339500C426AFCD5634A6 +AAAC1C7E91249667B231BBFC64B4317192FE07FE9DA0DDB5E517D097AAE46577 +9555F29D45C67CDE9812CAD03F220B20519F2FF32DCA56A554D4296FE2D1F3FB +B209B5270E0E695EA5A0EF1144957CE045881AEB8D05D72CE57F4D34617AED67 +0D3AF0472CD8D60933651626550366E300E72A9C89ACD475C2E2ED9BD44B472D +9DAFE943F8E02A6DC38E447EED964624C37C3130E48211CA279BB6A0BD59466B +42F3D89B5746F29E084E22CF58395AF0F29E55113F3A3F2F52CB3A6DF3D026D0 +C81754B8E2E4A15F6943BE9D0087D5166060734FD07C4C57D7C7D90E8C9C1F35 +623CEEE3ABAE75E1A18A1E3B50B7266BD2D8E812CFEB4A46B856885B185640D6 +B9C22179551002B94282F57FB433B7FF157D2F0D240836B72AF4A331668AE5D4 +E6B85415F4E8B9D2F9AF90FAFAA0A3866DF417CA5A31348CF9B41B8F5F4D2F97 +CCF7ADE851B5E2E2F6E319AAF5792EBB9DA2C6AA8B73D889F3CDAA42932CDA7D +07A7E59183CD89520DDFC36E5D513BFD8AD0886046585F29B4D7F42CC0C27AA7 +53915AB1167D292FE91957E94A57FEE2D49C20C9070ECD736BDEE0F046E60350 +EA539DC298156A4E0D019E7D481FDDA6861E20678516AB80ABEC1F09B126BCB9 +52E8272A06BB6DD87ACFC423B4A4FC9A3DC8DCAEBB807C5F748F1FF8B17B8B88 +F426206BF1B7B7D239D26BC3CF0776C467A98CFBBCA5FB6145D5900137ED19DC +D002F10704AA680EC753C22E29AAB15712EF22AF73D80820A1EEE953463D4EA3 +81FAF99518D4FD0F862A324FC44C4B9542A92C5B60CC983CC8F647CE5BDB4D6D +B92B380E0E5F7208A9CD91FA9A469548162C761C1BA05AC9D60B766764D821B6 +B4E17F56CE455F06EA1EE2D38FE47581746C4C5FBA63AEE2B58E877D1A8FA83A +31C972D53B64E92EEEA147426A92CFBF76FC614119C6E9C6476FD6A069C803BF +E949FBE50B5AB1F1463F9747E8D353F7BBD991C4F90F920BC9407D8E24720293 +846D052214E60390C3CB926D38C83AF697425D80C2B4FC4706615B905516B733 +46ACA325CEA68FB21B2D17CF0B68BA4DF249368625CF83441EDBF2B86C957C1E +44CD722BD2537CE84FBA07EC7AE15C840041B9F7F3040072E6084CD55B301C08 +A64A53BD4D3DC30DCAC6C152F316ABC59B8EE978793EBD568849DCC2A75A495A +BC83470D503F8E389F54B4A4A31624E83C601B43AC1E52CB811FAA7CA6B644A5 +1AE0BFD4FC774C9C9DFC2769ABFA9C83F900BE2DD4010416053A1D4874E6ECF4 +D86E44B4CAB15D53E5630C144B0C15B58DAAD785BA298B1893D1B09BA5D40344 +6678FD2D17FF6674433C976D6DAC659175CED26139967C9B2B9CFFD78FC2570A +E5142141C2888DBF2DC8503F9137CE7CB21A1EBC2D65BF33FCEFBC85C9CB736E +24E8595CE934AB032CC70BD6A3B0F3BDBFBBE185512FDB7BE3D4A6620478453E +75D044BF770B44C9741E31985E6DAF5A318D7BED12B02A4BCFE60D25EF12843D +EFC9BAE2A3F2EFAD66D7858E83EB46BB09D2FF8AE9C43844A7001C86ED97AF51 +C511E3A89A1BE349FF5215D1A57843EF51456B9838133846F19BE79AAA5C1AB0 +5F400E5E8E7B0BF96EFCA3B8F0894BE589F2C9FB6C97BD16D38F0A237CD4F034 +099C41F85C7E2C7BEC8E02C4F327306A53B4B48B26A8926670CEEF96F6DF2281 +7C2DAD99EF8B81BBB777227C2475AE7400DC393D9C0445E925DB1E955950F7AE +53E9AC4306794239346A419F7B5DF4168382EF5956B81F83BD4BB7635B3BCC84 +7D84D05AEDC02D14675D777CD19B08124001A4F4EA96990D96000C082A12F00F +7FEF793A7FA69D56D3A38D012168C5458B667190AFE80E02C816CAFF0A71953C +D80B085CD286027E2FDBB05452AA762FD7C813B2E19A79C74190E04E746C4933 +CE1E300CAF5DD53B08110509BDA404EF07FA1BC5224BF1205DE8E0C3276A13DD +866675103B960C5F36644F96B4FAC16F5D6E91F74629B318FCCC8E8CB13EB76B +B0B7B90718D913A52A04732EA3667674994A325A7973C601A7DDD50F658E0826 +ACB8E53D4914B0274AED98D7BC3B2B7F9D48A7ECC2F8ABEE05CF2C4F2B90360B +B7DF779EAF3E103D1D83EDBE32DDA873768D8C37DC10A5354A94B4153049AD64 +FF3E0BB51AB91D7C0B4134D8731CD0270DAAF19BED9EAD800A14B65B68EEE89B +40DD624111670DDC7C030DEFE0D1B96420E249332445C155BA96231C88E70643 +D526BDF3CA1E05FEE72CE2B881CFC01ED780C10E89F0828AD55FE29043BC56E8 +2750A6DD15AADD54492F6092618F4CC6A31766B17FC60766D18C307EFC9BB787 +39047DAD6B38419EFBA46B4E2C932F97451FE78AD75FA90DE409FC6DD46585D2 +1941F5ED47A8FBAEF5A917A240959E8D9F9917DEA3247D9CAE6BF7A88DB4C4A4 +F9F5A6DCE542420A032FF3392FE0F3357B51F884D6181583A554F75B1DF192E9 +253CC828FF06B0D992D5316435980B044BB191508C7C45CD90F797F88856424B +14A5707459C50EDCF3E3D8D1667AAA83015405354CE744C66D9A5728F29E0085 +6DBF740717FA0799E3BCC4ED7841588B496A5E549B953A7FD288B4A045DB611E +E3B2F35963FF18ACCB1C968BEEA2CBF52B3999AAF89A05320BB2E97F52CFE06B +9F10E3A79865A3059A957F97972D80ADF678A36E2B586C101FC6AFA4D137C13E +EE7102C9B8EF78CB057F8B7476F146E8FF5C897FD5503DD198128CFF7B5FB339 +FAD0AF0EA967F77B07B367A4AC9F668F8BED99B98E87FAC750EE045602D76C3F +289FC9D97694C96AAC0AD1BD3FA94DF2CBCEA24B40F47B9B59E54EECEE7AC4C3 +A3F5D19160E4C1EA830D57FBE10D8D46AC5CA0260F22FAA45236F0F542BEA9C5 +5A88F878F68B36114E0573900C65E305462B22A3429A17C7A567694414DDDA46 +5F30542B8FD4F00F6C295B2E8D3A986B953D96822DB2ECD48E8BB1763434E652 +152EF3717F5E7FA10FF0B01D9F64E22C5DBD7254629658887BACEC0ABDE972EE +67299FB84A05B3EFE22B6976DB4CCA384232DDAE38C31623A4E39EA2E82C1EA3 +BBB68F1A7DBF405DEC37CB7203A895C36A44BD2D63F45B3888AF91D37B510A59 +3C921BB44DA620892AD87B665F69F6FA510B071ECC403CB2BE2F54B3969C9E88 +713244BC97C1466DA8216DA7600C221E7E7EF5C789D2E12B36422023A03E11BF +2790FD6062FE6BF62F5010A92F0A104B76E255A0975E04F6F20F760881BDA7F5 +D834D1D328B6EC19AA7D5E5678A84C74C82553DBE8BB5765E84F5A8789032143 +6020940B4B8D45FC3433D356E28C25F42D0C19F911213D85951B2B00D01B77BB +A4C72E964F9D95422BEDE582A05CD52E03D28A996E6CC8FCD910CBAB728073F9 +F9FAEED5470FFA55930447C5BA816F826F983D53EC9941EC8364B3060FD74C95 +26D4F5CA753B574FD2FA4D1D333785241D8741B79E628BC852FDC35478C5ED9A +C1BE88C5EE7302816E65C12B58EA16FEDD4672EB3E24B6EDAD5DCE263BA8A970 +350B651E5A9F3C281D85BC3F44EADD0D93402E36489BA5185E7D388974B0B700 +70575188BB610CCA20F081E2CBDA13DCC6F72567962ADB342E02C1E763B673C5 +F7384E24C6E1730A3A790D690A2103AEF88E0C1D4480DC9B25E5C8C9E1919C95 +F83320179B4C7C4A26D559BFB24D7D596FB73758C9990C451E77FCDDD17763B8 +9C30A9534E3CB6680D3D419D4B70B0B0A0D160FCCDE169714E373F65B7144CC2 +DB9A44E041211E1517D3148E65A2486CBE5E74E625261CCF65392FB4F3091473 +F9E8DF327D59A58558E5C9F7190DB577D5DC658F5E36258291C708B3D224653D +064BB6079F91293FC733710893AD1C96169B30CBFE4E9D52E7EFAE4AFEE68FEF +1AFD5E7E9DFCE8DE332B0FDC0514F9B3090AC85BBFB527FD8034DD33E9576325 +A8769AE09AF1BA792447DDD932B98FC9486B39E0B04DDB3EFB7A30DA0940B33E +E27490E0E841E87B1C90E5248A91742ABEDC10F43A8AF0F9C5B4A4930B1AADAF +01874B9AC3B8D0DBECCDA6CD7E96471FAA15CB7F8A599C5746327CE392224C3C +40BD60AF97BCA6FF6FCAB2FEA114D7300B89E91C3BC92D5B3E2C83BB37992D8C +72F661EFD0AA034C738C019DFB79BF40651A1A34BC1EB9F5AAF58F8B3DA32645 +24AFF8636486F08BC21533B5FF7391B0679A78DFDCB03DAF6BB7475A1D51DAC1 +EE4BE9B986655D1FDB6936445EF99B58B303FE79F11275EEA96A9F6808EA8775 +D873D1052FAC93769789C700F20EB2ED6D15676F6E563A769CA9298E463FC311 +83281483B1C953370D196727A6A0E66D32D9480AB1B6DCA77868C1A2D5DB6483 +5F31EB6B18EEFEF1CDC31533E69B0AFC6B30FC9912DC89BAAEEADC30BE14F448 +1A6B70D36A5D9B01799BEEA686066114910842D022EB464A9A1E8F0A5628BA69 +AA9A1925CCADD44703BC67A89F3B48E4680726DC4360274185CF3C8AB747A8FC +4B928AD62B092EFE48B01E33ED756DB696171FDB775396BBA138E056F71EDAE3 +7A1E4CC272B8418114B0E81DE0BC43DB3C133167344488820A92DF10FFA26FB9 +65FCA2C87D302E956DE6B4FE145145440C83DB43A68F8B29A592B127BDF49063 +B7F11E155CD4CAE305525BEA56B7C412A6260426407BD892A3F2B444AC3421E6 +FB6E6425EB5C3053C5644666B80405530FA0012B54557327C98E0F4F064099A6 +4ACAAFC1870359C1B6FBE7606BB8A26026AE20C212210449905E628AF1B20490 +8CE908B7EF3E3DB551C85AEB0F7FEB6A8D215B97998E5DD9C7CCFB2A9402B8B6 +1770D4023777D4B45A73F471355353412C51D4CE71FAD1E0AFBD87B5F86307F3 +10D0B94F1194EFFB64AD5DA54A4200490F609CA8B912E149F8217ABB1E9EBB3B +C4470E7365CF5E1E761AA1945044B225BD53D142F6588C50E0644740F7DD55E4 +8F73201E5354A8BC78339211AFC4935F44701FBA043AAC4BA4698E9D7700029A +C79F992F62627C91EB855F64C4B251718FDA71EDAF082A0C7B00550949D617A0 +7071FB14F05620CCF2180941341D8E60FC88823438FD728A4042AFA8B853107F +852F631518B61B234565291B5D5B89DA818DEE3AE3B68A2869DFA63255CC882C +3B16BBA08FCE3632E57FF7A07F857A1F0FDCADAB39D77960BD827CCC8661A997 +648BF5BEBC0FD2286C2A112A8DEB9CCB6330A049170D5D68EEEEA011D3EF3EBD +855236B9380087CBBB6BE24191F728B7EAC5B50F7A547AA0989B7C7D3437DBCE +1669341264E290646F2C8C5A3ACAAC7CB63DC692FAAE13E9B40E8BD39FE16A0C +1660CE66872D061056C04DDDC265C024BEF8B7E3C3AEE76FE5C9702002C28BE0 +B180295EE00E567FA2E5CD1638226D24A7C732E1BD8103B476EF5702768689C7 +D4FCD47F2AB94A2B1FBAE6ABF87B09E7713C773FB65CA83F7318035B332B9F99 +24A2C8897527021321D003AAD7C273E4BFA2710B9BB26C2CFD3D9A5D7ED1096C +552D50028AE2476FCD6D12A5D0A897521313ED1A3A8456A70C16EAA50A3E6733 +6DC89FEC56AB54A579EF264377A103939D5EE00A90B4F2206D0023AF9491FBE0 +800C6540FC945199E20E945F46CEEA2E885F6800B9DF042BCEF4291A4B1A62C8 +6A7ACFF872B25FA3AE69E0093F3D0FF13A3313430C06F1AF94D500431566F659 +E8C859A5F80F5BD2E85C8E32603D3745628E8FE6FBC50FA68F9C3811A2BEFEA4 +5852CAE2AE5AAD3230ED050593BAD0A9581EB7B327C6916B8FC348F4C23E6FA2 +00FA28AAACCB3091C1D83F7BB88672A53A2EA3B8C7C24374E400C57F0F01019F +E52D5C47F389D4C9AF126F4080F9AB8D1C8F470932BBECCEC72A9796F6E965A4 +82057DDB43D68298A00880D4C2E2496F26F015FD83C5549215753459310339B7 +6B2961EEEE74DA31FEC8E2BDDA42D4080A32372AC372524BDDA580EF6634ACE3 +128C69D04D890DCA337212B109585C665AA83EFE47D5BABC2627A86EAD11BF7D +744176652C7F9497785A7A06A994ED8414BBE8B26E74D48CB83FA24AAFBDD507 +84A90195EA3D77BCE8C2BEDDD1DC52E8164DF15D65B916EBDF3A8A76849653DF +AE3CAF9561AF3B705F75B9E5DFD6758DB65A2FD54683759912E0D0035CFBCD86 +5C7018E5F1DFB86B739C4749DDCFB2F40529E1F15174DF4AE9833958B66ED869 +920CFB9524F05AB2FA84A4AC41A02490699F277A3B4ECC3C31ACF79E884B979C +AEFF660A8EEF118C79F8DA266F89F32078B1C333DFA5264D6B64371276ED4DBD +5A2DF213D85A56B1CA85DEA53ED0299C1FA48D463B11FC9A0751C986CAABB184 +829B1133CA8422DC11C6CEAAD463FEB468FC7AA2DDBE2E708D27D89164B12BD8 +B9A71A1D06D2FA9ED0B02168B32F6CC0FE765F2AF8A19C7196EE55648E642184 +BDF993C99EF7C10AD2A7962DB9B7851E6EE24A0C53475186BB44083AE18254B9 +F1CEA0B66A6581C81DE19DA8EEC9330A030F3384C1DF8216E5A25FB38C1B94F3 +403C3541593A016CB5FD306F41F40E82D4561EBCBF76153BDFCF338284348755 +0208360C5842FCD6B2D614387575B6E49F4B5A4DA281A352ABE8B76CFCD94A00 +1C586D19B68D965BD8D7EF0DC87271478CB4D0D1633676A2FC51B36876002A9B +F5D632ED778BA9EA1C3741FFCC15AEEC11C8E1544DA7358473325812E50C2135 +84ECE7DCE281956681179C09C0E8DBAC5E4424AAD00FDA269BCD6412F1D6DCE0 +2BC7CABF85AE803D620F5140C63DAC4B0E5F7896343973FBB99486B93B6DB58F +38ACBE8868CC58B3918C1AB4406FBCC7BE8496C78C9D628716BF1E306AA802D4 +5FAC522B1EE90448387DB8E85235FFAAF3754E2317B693D567A488753993B8C5 +DA3C8FA50A35202958FD0BF2900A6CE175920C2EC7CD449D4DB189A50958BF17 +644345CC38250088A694CF0F482ECC55ADCD02E17B3CCE66213A6163B8B44C9A +89068E3B5301D2364F85BF9DF7C77342796363A7B6B294CE26DBB9179DC15756 +E1B32CE919AF44BC79A3AA8FDF6118345B2AE03F3B11D57D9AF50EBCF7152E37 +15510FBF60F16756FC674E2BF58E88CAB2CA2E8B47F50096C51179684331FD61 +8B34520C9C7D01E1511C924FA76B3CAF79501E0AA2C6E1EC6F00CB6CE24B4123 +F493B149B5A5147EF6BF1EF3CD21A76945B95082E1FB3C5A150D8AF793348E8C +A988354FA46E3775486A6999E022EBE293E8396C8F9416929607730606CFA772 +BC8388BA5D64B79E52DD2048ABF21661121A001E6A75731B5DC43CE040396BD7 +B85603C8A0F37E522FD0CBA63C454B12960451CE65A69F98FB2FDBAE725C0999 +05FB68B4C1D320F5F3D61FA8446BE6F8BC46AD9CFA5674A3EC73B8F3419AF9EF +7A1A3C9EDE3BD6359902D4B5F3AB4E3FF9CB2E1937937AFA182C651985703F20 +FB70E37AADED6345EF4E83CB140FF92310BACFBDA11F2CD5AD93AA7563D7426B +0D4B6CF9B669F9A702956CA845E3814E4B5491E58F8C89714229942165A6E8E6 +58982D89C4FA7BC557214BF9ACE2C63AD88F2D1B18A04F510211687C35AA1F7F +D2003D4E60400B95E70422024A7111D926F1B5A77074910710594B95680CFC4D +911FC16B928D9644340A9D2382767FE6AD453E8E4CBF19F77D3DA2934B11FC95 +A6900C3CA3F2B6AE4290A005F908305CB37700680D76C4999AFE509B18305D28 +88C36292D6DA208A8D42F8B81FDEA7E93EE59D6AF3F1A3522EE91BE71BC655B9 +79C49B033A036E1FCD94FC581AE732A224F055503CFC69FBCDEA39CB00DC8A0B +4BEFED99CFC4E44ED51DEDF9EA825FF6BB97D316726531CB4BA083B033C0B69B +8068D5D3E3E31DED5F6267439F149549A6E12B00BA85818AEB491978364D9F7D +7375CBD6C5511CC846D0058BD2CE5467EBCEACE5CBEB2D33AC8E12A84CA620EA +99A0ED916B7770A056F6A9C361CD5118B5DDB10A5A4E643FFB8FC5DCBACDCB28 +696E26D030C5918548AD8B87E21E1B4BAA91AF23663CDE350A21C2CEEFD28947 +BC07BB49404FA39F251E36B95B7338EF03F2E63FBE0E023452097F21931A2599 +4EBA7BFA669EBEDC0F5B33375DFE6DB1638D19D4B5112B5338B14C93F707D340 +056B2B75AFE418EAF9CD57ED842F7B5FFF037B3A4B369C63E4DF9F0BDB4E39C6 +C5BE8EDA628F1C6FEEBC9D9886DBE502CCAA86092646094118069757DAC25C38 +2CA53CBA27577BAF2C57196489CBA54B96C650A1C130184A4444CDE2D0CB1A49 +FADCAF1FE3A66334F85FAFB00F142F28AF2D8FEFC29FE8E0FDA448F181040BF1 +62EA7AE75100BA46B49EF30F596CD9091164AF70666E254938BF6A44F01BBD2C +4160164FD89FCD358E48908BEFBAAC4411B52390CEED6B46D729698CCA8E164C +F77CEBB50C5254F81570E414B1E9E79269D3B2575E161620CC732C0405A29ED7 +1E5A6597D35B11EE08DC09FC9C27F0126C22C73A0EED657D7F91790777E7D8B1 +EBAFB0EC9ADAEFEF7F6A91A1028E46D76289EB1BC15D3597CFCD78D88B633759 +93CB4477596E28A1E413BE25D513BA611757C994AE812C5A6D9AD3F770499252 +C7F53E585E03B2FF056EECFB7ABAC474A981D757AB3B6F2815E7AA8AF8BBA42D +4D83EF8A0FE21CA5EBC295042AE5D74E6D05BECCEFDC74ACDD0A59AFDAD3E94F +141E4BFA04ABEF7E6C43418A5EC54C6E8CCEA1C34DDFAC9CC87DD5E9D4BEE705 +F11B003956DB37B145DDEF022C645C19329E6C04E1EDCDB5F6A33AF1EDB9A17F +79066B1C3579E70B2D43DD89D1F5FD2B2015FA5009D612781CF4916DD8C7B1B5 +21FF0CFAFCE882A106D356D8851F73635A4E7C81FE0BF6378DC2219BC883E3A8 +23290969A2ACC06A77866A8AB83B39289EB14B4F67511FC97F3BE410B4DE91C3 +54876DEB96AB3C60D1FB17D29172F96E98D3FA77B772C69D17A757B6CE32D2C1 +67182DC41B5E19F31F669A886DD4D08092AFAE132C0E0FF810FCBF937EB3AF0F +5AF1416C11508EBDE0C0EC1C618CB6F66658D9CA3793D523D224F8C9A8ADF6B8 +16CE7D210FD4771ADCFEF08809C0E9A37170F0C02A9C9907FE38DF8795C6093E +0DD464FC59313CA7EEF4658A498CFDA9458AA1A86B2A0933182954BFEC58E9AB +3BF65DEF9BE5289826A7AE0AB0E93D83178049CCF8BADDAA7BCBCCA47F983E22 +3CCBB9D2D522DA2A5EDF409A862A52297FAC35CE11176A8B89671BE758CEA324 +5BD245937C46D52F15241E22F803F77E7B5ED83B6395F5387EA7CA46E1DB1F8D +239374BE3F4640A6FE06CE65A07123B722523AB913DA6EA385F524940432DC0D +CE2A2A50539C42DC0942ACC30D372BACF8192645F9943391A602A019EDD69241 +BB0EF67C1C367344D82F5669A75D5234A3FE9312EB4C6BE310722AF8065835F7 +E55443034F04E4B41F321B7CF95EF163231979A8D7D2E7B982D6DE774E8F4CCD +D846A38D9029028C50A99ECE834C67F7CA30F39F4D1803B3CDF4D19FBC3D1FED +EA3F72427D13D6C51FB97E417D38E4AD86E93498AC245EA17317EEE503D11C60 +E6981F07798D11364ACCAA0F06E6D748584EEC92720F50B71157AB2887406B13 +491C79A0054F145417D7E4902CBB38AF4DFAB4F84E25985A6FBF308D974457D0 +8FACC57B056749382FD35F7D9CFC58B2616D205CA0328294C7F47AB9EB50E1D3 +56B4AA213B1605985939AA68DEBCA1F50407136AE16196EA910089D913A4DDA8 +079F046AAD1DFBBD36DF39C43CF356E40972D8AE3F044F31320A3567520331CD +67227812DF611C31DF6C7B420A170B43A478D0678F615AE88B94646F0F1A400D +3E6FE22E584B1197B373FF2A0CA5C90CCF064A5C8A08170269E967DA2833840B +BE87A26B8A5C80F8460100D97C17B62BB62F5F4DDF270DCE6C4F08A733EE750F +6FA75D57A96F5EA3D089D5634FE7C29D6A3DD8206FFAC31EFD273484042313DC +406A646C898E7FCAB097C6E362CE13741CC04549691C6BC246D9FA598AD671DE +81A05E8D011A838E3B9F984676E03BB77EAA1B1256C04028801748155A2B5082 +57E9BFA74C3C18BBBDB7458B5AA3D484CA516A265A9132CA6A16A1C6A1E8F600 +9F9368F4E22AC348EBB52736035A4A4524BCD4B2EF54314007FC9AF134754FD2 +C20294DA556EF82639E26A3014F597955B8766C1E317D21E978A2ACEBAAFD25B +6D27E861E254230360B34431BB58A0037C3372CFDF13DD806DC6ED6B0CA4C96F +B7018FE26AA64C1D23879F117F9969FCBD649805FE66D5B439F6531E5D841B0F +43D110BFE886A11CE54869E036D6480F6C6E0DDE33B40D605671D99A6D297C82 +65B1F442602A026AB0B73BCBCE1B098C423CC623D40D679E45052492E5129675 +F1CA105AE94D7BBF162E8B3CFECC63429E866ED4CBB69F25687DB74A330C7F5F +9727BD3DCF5890FA9BEE5A7BD997433CDD1315850B490DD4EF503BC1A4F30F93 +F032E761C9B4A099ECB96F1DDCE4262FBD75620EDD89659CBC70EE3FEF7C50AE +CB47D9BD8BDDFB7D5ADFCE11EF6871AB41369A582211BB5680DEE2BC141259C3 +08B73E26815015B99AC3683EDD9EBC880A5A64EA728DE0AD8B038D666955E6C4 +0CB961183309835A70BE28AC86A0C90EBCDE36B2C2F9DCF6E61B27845C048932 +1D9CD3F5E7EE7157A478A9B624C46E044AA050942FF1E15C8553321D36EA7586 +3D4A7CB9D971063AF089F6B2A288A83513B4EE3A0F3CF537633604E31FD22B04 +A7A63C54535D31129C4713E5561100F41F596A2771E3399A84C7798C187AC61D +359E2181B61DEC7EBB1E38A5B188A85B9E0A4CC22E0AE4FDFCFE8DD776C703DF +D581E9F3F68DC63B91B7CC430EAE05D7451345EE9928B18947D1EF0907138FE8 +EC9F98CEECEABDB91CE0DC993391632A2993E0F23EDB138C388ED74AA061F4AB +A9879A48EF233D72C2CC6A976212801677FF31818CAA227205687600362634E6 +380A6FE49F7A3E111B50DC40B97D58A7138BEF9BF2D58633643715D96F09568F +D192E619E4DF5BAD6E934C3AA1E29579E85127024193F3866F235C58A9A097F1 +56158AEDDC8A1B66777C28E798DFFD2404507A1E793E990ABEA01D772343B3C8 +0258461306AB5112B36455E39B024D544BC723C61AE4756B78B97566546201F4 +77EF79F142297609B74AAF54FBB44473197E0B5A706FF921C1D7B80CBFF03524 +C6C9B37BF5FF366B0D60026FBE01D9A213905B384449F62FFC7F872114C64F01 +1BD76FF84899641A793D10A504F0B56A7500354C748A68EA4396296F0EE9448C +1997C351D262E9055D2265E4C467FBA11F97E80B6A862D398D341E46212B0389 +08BFCB93BB7ED61C0E4D3BAB05C9A620E78E19342F02A9433B97CF7ACB027528 +E70EA97389D55DDA0FE4BAF2BA8205D3ECD294BC8EC81293C9A11F79C87EEFC6 +C18A8AEEA8F0987BC183C9EED25A91F77408952DDBA65BA715018CDF4145B64A +393ABA54A176F8DCF83A5238D538B3E7B569229F5C4CFAC3CC9827661AF20F1B +44A7930D1DA6688FC1B11BAF855E3E994751E9FE7BF4D588816618A022E25673 +F9C2D9D9AD9C6A16CCC923BD9E94E9A916C6561E692724C499F0A49E13762197 +DE52122CCBF93E3505209FF7F66A36780C7492650F4534E5984642BC7844C69C +0DC60DD6145A5B1662884BB82E4A97EFF6541D10D8799707CA86591BD8CD4CB8 +59BFD8D36AF4D1DCCA1433F20CDD724F3550D88875CDF3FFD49C6F1EA956576B +A1C64746D10C0EE07644371CD7FA3388C308B0E20918061607730E92A11057C2 +27303C387E163212DA3C5EE8952BD9F7F328E35D7AD3CC0FB84943ADB0BAD7E9 +6B4426FA53EEA4F2155359CD3F8E8DD5F0A1FB0B6C8F6A83F5B8BB179FB57256 +57A3DB758AE0F7B0D3A636F09AD0A86BE31303A6F48F2B925B6EF764DE59C3E7 +C995C5422BB61BDD691A5980CCC3639234A7A48A351E67E7ED9F0314B2074210 +36725D5306BBA32DB24BCDBE3F989EC1BB9CFFFDC156280BE9A7F7253F7F4516 +0F368A18CA6B1DCAA5C99693B6B0F593400D09AB18EC8F741091A32E5B5F9BE6 +B628F840E28643A9BF7E24D37E9C39A05BB70479AE6C9905E9B763F23E546A54 +8231D1A6009C658AEA37CA6FD5D2A36604370262583DE5CE3568999E594E5A3F +4D665BBE80C7109A6FF96A856B511F4251555B7FCFA55FB1F739922F7E62F396 +482ED48EFC10B10E6D68148DE88308307BB7643999890BBBAAF2D11484425A43 +B41A4F2F076CA8D187074F3621C0E4326F7B48D5F582A91763A02CAA769947C6 +A424FA57F87E92EB9B199A540A05D4C65D121321BDD09F99EFFD4D43536EC180 +2A2DA1672CA05956D8737D514B088DCAB5D09C633A75BFD6CD35105A9DE88968 +F46E049EB38822AABEFC6EFC14A693555A7D35BD96764D7B915E6A1153A9F5B3 +84A79D547CA8DFFCC4D1F1C168EB6EF6450DC470DBE0A72D1264EDD2375C69AE +554AB2DCC7F966F013F0A76F0FBEA1CAACBCE1B372F098EB069DC35688E6A4AD +6F29454E371DA51CEA13A8E8ACFE916389DBCB162CC81964B4ABE791BB71A27C +51E24E7571CD8FD16BB862199B562E1B9965AD602A77A644E687129A6980F2F0 +F6C1CB584BB8FD1D1A1F8BAA3812CE8D051D23014622A8A508E4296541EE9846 +4A2551A843B6977091E90E9006ED40E62D487ABF2B48633F09080C6C06B390BA +CEF77C69E858E23547FBF6F22BC51C1C5ECF5430588F006EF7B3DC6DC0B0356E +CC8F8099721A5E3475857C1F906A11BDADD1FB27B3A8683FBE50BAF54CD4F4F9 +9EB56147DDDE5B5D861CC8B89DFF9502E088AF20947AE7F72BD6F427F617A7C4 +6A3062AF9029071BE53A25E8C329CD0EE5FD191FA2CC3DFD4D623217C5F6C82D +5FC9661900C111EAD81C6A88FDD47AF5D4B72B0FF9C658139FA478A05EE75DEB +83AD2C79BF78D9CA975BE573AFAAB5E5F0F01E0DD9ED868BEFFACB15DEF79237 +6E685CEEC76F5884B37F94D8FF36D3FE25A771CE4523D4F4D7D53904683BBF91 +18996F3FA2090CDDAFF660AD63D9B5CABFEBD576C0F8ADA93B13EEB8147C1976 +C0172D637ED71C995EDA78AB85C3654D1441DCB41083C4EF1A123980F96FDD80 +6D4190183B4153BC8BE62232A0D6493D7A17C1644057A21E1AFE7322406F27C3 +94E714925202996554228981A8C39EF9AFB30F5EBCEDDF39DEEE3824D78C6437 +FA7FEE75F3B2280DAC4D76339F99F5848B0BB425B127DCC6EB20C1CA50A5233C +793276BFA23F8B2CC4E061BD5797563ABCD7DDF79BF0957436A26D32723EE772 +AA63FC5F282FB238676439B1868946D59ABA007C5C5A2100A0878AE07DEA3CBB +B14FF6E4F69F2A443D7551A6BEBA2C1654E3A8F3058DA2DC0A26CA05C8724013 +39D3B730E70893F0AB453F43DD2E802A46CF66A3E67CAAAB0C4357F167FFC174 +A9BF4E1BEBCF56DFAE9C5A76577FE0AEB09A738E6BED9E62BDF7BCF5B624312F +E48B9DE428BAF38EF9AF8F450CF90E8BCF452D1888C42CEF8BBF2A75953E1F64 +AE35EE604F03199852323AFCCC72CCB2C20C489F2514BF347BBB5930BD425888 +6FF69321A007E21D77F57367F9D41E5D0E01171E96EECA01175F3F85A946C621 +9531EE5570189773AEC2E9D9F2AE5E4CEF742E80FBF22B0A3D4C56D825689D81 +6F6186E00B39E9054559F4C05D35EEA024C8B2AD71F0573BCD1B781F31BB44E6 +FDCE0787C66554093121FB5DCFBF83F06092DFF4E1FD10E6195ED375F9B4AF57 +0186238CFBC277EADC64675C7A9F2F2E17BB2652024C2E9AFBB0D9852D6D4B15 +2ED2EE3374436C58A78EAA552617F8694F123FDA2ED16E7E2D4C45593E0EB4B6 +3257A22F303D0D0AFF77A320967E5FBCCE40BA0FEBB14DCD0649B63A68C6F78E +53DB018C87D8FF4FD1DD789159E76F50CAE880AAB7850FFD309B0B929A641DE0 +FBA51339C4ED5D050398A37EEAAF4D84EB7223D3557E846123462EB60CB8C35F +8B5A628A16692B1EDDEF9ADA7C53FC1BFC1159A2290682ABA5888506482FC7C5 +26A27CDAE23C5D7079FCFE42CB1BCAF8358886B08585872528C6699442358D53 +FDA54CBF9A6D5AFA19450A5D394D209570C970679BB11806423E7A451D7811AD +6284843A4CBB0B7591646B650BDB39E17C6344F846A2F3318CABA7BE6BEE67D4 +712AABD80A4623DB2D797B9D109B7403C46659EA299C8274CB49E9D31A0A9889 +5747621182A9986751141890719C900A785C4DD03C8476C2A3DDF1FC85441D6D +089C7C126A72D8950A453C8C40CF92FBF4107DCC4653E836264BD29F584E1B73 +47B9234FDAEBF0768968BB1F75871DBC0C39CED01611F823B6A17742FF4C407F +6E514DA20DAB72B53D3752B3F2CB8AA720A3F1A4E71938DEE47821E16E97E0F5 +32C9F57335B12B0CEF6B20917C1CC06F035E23F93B6376BE83467C23F0B3A687 +57D9616B932D6BBBF181B6DF116B3D88E5B6B4327F84A16DBABC9ECF4562A96E +D89A445409AB5599175743E559E9C642361DA758611C0D56ADBEE0B686AF487A +EF7EC4FA9CD87239886968B7FC3144313F5F9B90D1A76E45718DB65D2F44D123 +81189F26088D950335E085EB3BB1BDAC3AEE5F5A1AD7C44BD119D04693454422 +CFC2855C6667E64CD8FCC76088F3DB888DA386CB77A060B52930576B80E6CCE1 +D393E689AD64D9A3A3BB37C0EC3CF9286488CFAB18D656E1A0F1B078BC8F5D63 +4B56A82578844BE89201880C0863BBF7F35F1983FBC70C5D6372E298B877E6D9 +89B3A60FFCD876C5372605CF2B5C6E3EB4642D14C75DE75DB264111AD783D49E +F63C3CA3B6D27A2BDA9C9593E6AA5C0A851CA1B8420249B8A3294664BB8025E1 +EF9246BA8D12186C6EBFF3EAE52B4169832CD1E95EFC52F70F0AC1C4AD47E661 +80997CAE243FD5F4B924C597F32E0FE4E32BE29C6063F4813DDCBB96F25955AE +2E691AE1A7268B0592C934FF2AC5B6F7F54C8858406D1204EF17B09C3CFA171C +5FD08034D00EF30FE2276F9E1C0788FF3CFA161EA1B9F233991B949E21942DA0 +B1026B5EF71B85BF1393E114FEDFD47189BA3DD480D3633A8A208DCA897150A3 +C47EAA87B8789E7D57543973497D119AD04F4E3FBFC5DC7741FD7645CEA76742 +8F2F551AD179A45C361D5B314692CE4C4E5A571583804F35D3A45A941C46E168 +68844DD4CD99284F2580E45DA23300B47C10B666E1F7B5C25B8BC054ACD1DC44 +12668056ED2E045E777D11836A5BFBF6B1C79AF48659C57910472C8232C37447 +328185C6FFF6CE1E24EB9D29D0B21E6F40BFA843E2FC6DB59A3A576EA7C26F0D +9275663D03ED3AF206727909CF6E82B1916FED911C5390D4089E33E01D3A3580 +EE8A6D35421297812C7250FAFA6B333655B2A249BA8489146EF66CD31BB734F8 +EC289D5B6541A15D423BA486E7D173676282FA6A12DFAB03FB706DBF0A2C0332 +DAE3E859146D2ADCC1EEDF29AB5E98A4B4085F8F312CE94E5448F93653A44AEB +1DB10210A1EA1597064BF3BDC2BF8BE227B8E0321884DC1B2C1F426370929D30 +22D72F8329C8DEF5D80E6DECD597158968F60F4B5F910537749E1963C161DBD8 +83D94CC3C7A334722545D617B9A8586489D5B866429D9130E785AFF3DB7F5AA6 +571A01DEF40E75570CC9F48C4BDD044C5D9412683C282406BF2C5DA0B0661528 +7834CECCAF019ACA31D27C4865A11BB664EA1BE6377A972E76A05F12E697569E +2C400B018F1EB7BB747BD91DE1557E8B85F890A983D5459EEC773DC0CE99B403 +B15CBA9EED2EA4887C7961E8B62C566CAEE124F329F21BAD56E8CA6ECE16A249 +6256504DDF5C84F5D1222076B4DFA6FB430D2142ECD3765B65DF8A6C87278435 +45E4C826C1922E357DF688EB6F4A6AFB6438D94F7E3C444C0372B7C7CD26AAF5 +6C7B8A44EBE6DD58CE6F878747F7E59FFE8F680661EFDD36DFC4771EECE0403C +F83B20412E006F32870ECF167167974906F99BA655BB23E5E26288535A4AE670 +D3D087F96E076E060AE6A3544570264FC780DA250805993A69D237712BFFE3AD +E587B70D2970692918D3F80E38A769697E98EF5D034C9CFF6D8387D95E16AF89 +4B558561839DD96439349C745BA98D28DE129BA9334EF36994171DB9F358A41E +C1E7CEE3DB6B8CA16E93ED1DABD8C89AB3BA454C20F201D24895D2F2186B9079 +B15430E6742BCD6DBF54A4915CA100B043B341B489F9AB72F5AAB8546E1B2704 +E4E8D752DC3E90B1B153A78CD30E00B87B9E812693BB5F8A72BE121FE861DEC2 +EFBC76D20201C0357C93662F6243AB7C003D51B1B3E4C94830361C81B606C747 +6FE16472E5FF087A25540E66BDB10A7B23641E893396A1BE38C102EB4C391648 +DD50D074BC2B3A10AE6E3A2732C5A94DE40547D21B7F9DC11635B8D6D6AC72AB +4048758EA9F043295973B44B0917B14A8FDDB152D47E92731762B5FBE7E2D424 +A9BCEF2D296B3D8F41E724B6FA037540C465A087037AC77F1AA11A8AFA6B6E1C +8960CDB46F764CED85F36A34D12AAB1B6722910A9233134C1544DFFB42B98D2F +83A97B3898EC57DC07EC4BD53D01E467AAFE50DCFF7135DE13ABF0B826558D66 +5B4FC5862C48A5ED474B3F7BE7EFAB84D141BC92EA5AC299AAA26A6AB4C1DE9A +AF8EF838CBB14C4959BEE5928DC77A84786A0DE55B91B86290651481CB528085 +AECE1722541CC470971F6A2DE7F4B116667189630CA8CBB78541807DBECDE55A +D5CACBC8BF7AE4100130E499ADA3521C7D59FFF2ADC8826FB85A4B8A7F6A7B5B +ED19E9C421D8873270FF623B39A4DB33ED21A32A6A282597595C1FF9E849CC85 +F7AEE01F8CBB21F75660B5520501226CD6B872E116BBB746FB9DDD3B3C545175 +0F4661041FA2A8F5EC7601C145AFE3DF783F676291A3BFE672C743CE2254677A +646CCF082F592F8A2B074ED57BDD4AF9A5DD8D11C86694CFF16A0C67D1FA1C92 +6653A957054357BB9EAEA4C8988599D7B0EB635C03ACD63463EB8F449FDDEC80 +EA43FDD1B6CAB14E3D9B0C2AD3E118E0A0BEBACE1F893939E2DFABE6BD99BAC7 +96083DFF40B552F469AF20D34A434E48EA180BFC8E900F20992601761DA723C6 +1C37176DE8455D0D9D563CD165FF48348F3B5401A5F192F9FED4321E5E765DDD +824ED3671F21A449D9A623264174B5D64904CC1B10C10AA482E25100F764D76E +E73A630AC8A559DE6C260965DC16BA31B46517ABC20C5C3D89FC6FC187D0303A +516C7A2C1C5462E313DAC0C11EAD5D7E771B42B468AB101F284BB94A82432278 +D77E799D2E8F968EA055EB2512EBB67607569173BD75F5154BD3E8BC74B1991E +5224C3930CBE1E222A4568A043C508FDA7B3A9FC07C994D90DA667C78D28EDF5 +2CD2CE44DDBD236316CB70DFD53D179A78A01F3A0243A88B94B69CE85588A85C +FFD9A23A0156293DF9A3F5FD01DB8E1674D691E7ECE78E5767271185C231EBC4 +5D91DE1ADFA89EC1A8FE743062D934120AEDB02006FE70DE82F5EE24B36E829B +0BF2BB312BE578CC81F4F4DA811E6F25DA2D82173620AC20966C9AAEA2819AF9 +0EDE7FD2EA43F7C02A52DBC4E3E91F287D115B835646E53627A041F700D5B631 +1C9236501F2717B2BADA21C20CD9BA48F7BAC488913DF34E5B8679CC4BA71F87 +0FA9968E9D00C5D0CF8AA0FEE7DFF80131C8F5736361C016BDFCD85E28DF8239 +8DE792BC87B0886EFF1D313EFA13D6486478E6A52F5B6383CE563FF948DF4B8C +33F95133650F966B3D38E9AC0C61C47527193CCFA54EC6368542691480DEF9EF +0B74E4382CD2D7EAC72D0DDCF86F9FADED7F2E11C10F992BFD6C74A1AA8A1013 +D317438AFC7F22DD3C7EB64AEB8C8F267FA73F398BAA4434254B993FB12E1922 +EEF8515BE3CDF0BD57C1F0433F9ED466963E0136644C0A4280902C1BE9A86656 +729343D578E0E335407B7D73B9E6657E28675941D76836073E1BDF1768E657E8 +9A06266FED44EB127C0A20650528E3FB33D5771EE49F579C7A70E8231E093A59 +4B8390600524F0198C313F2E6AD936B382098C1BC7FB228F5A647E7EFC382F93 +AF398A0640C5999880057A5619AEAD4CD6BC34F70E7F8B9D5EA6BFCF432C6BBA +8A23510A0C306C5EA0BB33407C56ADC76892EB7407110CD7D2B2B063F870AFE8 +B1ED86BF1593426FF9CFAB3082CB3ECE1BC3F103E0006B2BA846DEB0A0ADC549 +1AA0D92AA01094F8F5CEFA6C86FD432B40D010C148EFADCB035BEC296A4D6F38 +12406270DE9046C76E80FF56FEE665465BE12AC6FA74C2F4C648D29164248CE5 +8831C4BE49DABD324754CF75DCD125F59948B2B1D1F0E116DF84BD02A99E5803 +1D3309C72875BEF544DC1BD37F4AF566745A2BE93CAD7E55EEF5DB17BA290B5E +DA86BFE145591C2034BF045006BB8D59AC0B1C585959AAD12B0B50C2A6175093 +3CB5F54B957712912FC0B2BEB6033012D928859F510312EEB5374ED10CFD5C19 +8749731A97AB9DA6A2A63C44A399A1FD09FF17AF1DFE301232A8383A6AC2F797 +40A188F69CD72FFC973B0BA64F7BA901DAFD00F28F986582D9AFE5DA387714E3 +41B60BF69D803539F0A1B0D3D42896D449DF4411348A00C05C38ED31265DD53B +967427E22F0089F357B5A39B81C1281248214FDD1148F92E75761D4D7D5E8982 +95CDBFE275FE44399FF05DC34245C4BDC38C4F7D265A4F3C1E11717A6F3FCE2E +720FC5142AF5CEAA75CC1868D172425A72253EE3EF7CB99A09D1E46609E3A935 +0F39505442E1A756FB0AAE7D30BA8D3DDD938D0AB9D746E65349D5705B36F60B +335DBD91662CD5A12983EE0161F8C4338336575EF6C9C6842E0611331EBB34B4 +DC778CA9FE0CAB8839FD80D19AB95CF070A73CFB99467256F91D37BB669A470F +C5E25FE5342423A2969CEAB12CCBA86DB276A8ABF9BCDBF377C187CA63BA2087 +FF862833B9F03FFF0132E790064B08913C625E7CEE675C1D4226AD06B75C49CD +DB8CB63A2D32C57031959F177AC8720313569A540BFD5B31E92EB12A923B7329 +A128E58C06A6A0A056FF16F02B37270C9BC345B8459A7A66E1BBDBAAE72547A1 +D4D7571BD1D23FBA973C096C0ECB08E93EF56EAB20D009C7A1A9F396151964FA +57DD810E1784731BDCFAC8868F84C666009FEBE9452934099E7DC25EBEDCA33E +A81D7D49A1FFC7839AEC3A6F621C7170C6BB0F13A2FECBE5A1590A6EA8934E1F +7396AB950A313852EE08A87B98F103C9E67AB7FBD9641DC4D63B0708B2401D9A +D2A864D1DB420628B35A9908E9AD019245C30312E8E64819C1D221B964CEA54B +A195B12E517CF48AE685D2B50D34CB38B685370E762E95455ED521B4D2D9D441 +AD04B19E87CEE1E101E0F6258B66E470A0068EA4ED6AC706D7BB0A4B7A9F56D7 +E166CEB698465FFA3FDD7F63CB9C2F07AA7221BAF32E8066E1608D5CBBC0F1AC +D7A8460668E59A7C8DF2AD01851199D997CD10496D687413D05E934BBD028721 +EDB1CBB81993265D6547FA78E7BD9D01FF60FA333F90AEAC3B6944D629F5E9FB +5F8FD93E49E4DE564F9441B83BD8D93D6121C76F8AB0DFE84E62F21C34585514 +CE0C80F8BBCA8E5472404DE3D990015828187F7BDA1D66C324F9217A3AE1C9D8 +6F5AAAA20A7F6AB652BA36971B40C4F0A90D762864F8E2AB4F5327CAB2CD70C6 +F5020B01155F908799EE5B906487A3BAF15579C814D94BA8A38EC38515582A40 +439F347A516379BB54F9770E1449D08F89717E1EC32C305C2D6CDDC35D0D5F8A +8189D3378D09D6B333C6D5B83CA36C7029FA7795C9DF09EA6DE61362AF79A5FD +38EA53024DD44FB8E53BDB29EB2BB60A7A284EA01B429DFC9BBD5421C8DF7EA1 +93665459A202289AB7217576CB845E2A1D83EC6693FD3CDE809A0AAB042E3778 +F9506DBA544E1032F690F0C783CD4E7CAA58228247DB04F1FD4B90F3305B0B21 +002737BF3F1DC28217AB98D7632B6F966D9CFDAEF72C2973FF3EFF17E02AD8B2 +1084C5E4DFBCC76B3E1EB7762B965D2D8844A771F08434253A0364120634AE38 +54CE24483F46388CD94601F361FF3FE78A304C549B82F178D204C5E4BE9B2485 +8A39D1D0CE1AF954AEC6B2982EEBDF8A0FADECC33733CBC144576FCA8F58D0EC +77431B64BE9C9D3744E26BE5FEBF912DA0B16AF22EFDFD92526E9A65431D70DB +547D241269D266DE9EAF67A24B1EC9E329310DFC31E23EBCBE7FE8DBC78AB553 +6A257514969808E1E79E5AE3C6C24FA363E4F616F52B4724291996DEB52D8E74 +391357477DFD2A594A0B1F10B2831579F4C526B234BEB990A4223F0E5AE15A59 +ADD7112BDE6E257EA454C9E0D439D24E6412520CA5CDD3D5B85EB35934EE5E92 +404C808346B7C97C61CB21908AC35347545F7F426B363175D50AEC231460BD2C +035BD4A94C40B213D13654E2C778277EE429444F098B2C81D37DF81EF898C799 +E645375E86DE4F00D18B26F303C3102B4E8EFBA1DD6B64E49EA81FB5FF52E94A +281C8AD2733339FD58E207D80F6E225D53ED62F1BB2FFFE2764F35B80CDFF711 +A3B84DBF388EADE65A4F7E38D6AFAE2DD00E3A161F85F68B79DE87CE4CD5D77A +73641E1B8E6B355A84740D5CA4E74EB3B245C261F6F769E789C855BC6985090F +564FAECE25C11FC509D63C661A8E6A8FF1FBE8AAEEB3759CD25FAC35BBEF23BA +745FE0A1ABA7A477C8FB63968B8AD3F7DA8E248CDA0AD67445B9D6F6FC034B99 +792BE166BBB0781BB3B5BE5B9EF6B3EBD02C01A4BB1AB7FC048A71F0C429B78A +182BF84D462645F2A11A2A41CB1C94CFEBF17ADBBB9063B4F5D0FA9CDEAEFD14 +FB9E03BD6D5A7737FA1CBF6A7387F84178453B2419CCE7018184E0EAD5F40981 +55A1D215AEB571A861A1F12DFF84A17B142925582709DC5BFB6237C7D37D5ADB +706179768BB1EAA959137401AB9DF46CD54314F93E31A4CBEC0E1C589134F6D1 +C3D3B273E947D09DEB0704A928571D1468C3CB347EB545040E07D3A670816D72 +764998EC7988C5A25E6D2403382866FE5408037BEAEE7EA98BD8EE300B957965 +5B79E8F4BC6F84E4CB037270D4D9FCBC0008408485D855E67D3CB8ADCF7380A9 +09350593ED80A9BE9CF77DE6D1D4A170DAFE7583CF6851970B14219A3A2B4684 +A8010B4F7B422DD699C167BEE110E3890699D710148550482CBF2BD5CEFBA8A5 +C1B45320C9D0C8838546474830316E1E238CE2704C12D43211639333E9AEB018 +68C7068212A440912FB4E58124325DCC233A8BAE6D634C9E47DBDF449974F42D +1D346C206E452F1C1AAF76852A3FD5F156AE0FE1DC777E460DFF136FB94A6879 +54F0E6D4825AC0C6F72A71DBCEBBE355BCF1D0A336043325BE80D780DD21992B +5240312D13CD85C2C2C9F236CCED4F364ACEB22B8712BC0598B75E565BD05A9E +B579CD12D262FF8114D93BFE09D1EBE2B38C6856938C0224D6D900EA9E3C033E +18F7C4E9D4954BBF699B4F7BF5424EFBC36C9DAD6A54C1304A425DA7BF3CC236 +CC82139A00874BA953C4581ABC1B6B06567CDCDF78247C090644C8101E0454F7 +37B42EEAA2743D855C90D03A0DCE75EC28AE7765A5AC7888B477AEE2922C1121 +FBAD4188E125B110C216A7AAF048F41AA81E7F32ABBF1A3F597069561BB6470C +1FA96B179FED4D6781C6F70A343A9CA3D757AD37E73D062970AFC4DD6B54304E +A9D7F87154801D7DFD1C45E0717387EA331B8A5DB13DA5AFE56B341FE296A775 +EACD862B7D6987BAF4B73B04455341B07BB91830868639DA3FD78C0E570E8CF0 +4E85BA82CADB689E7E5DE5777D0200DBF1691AF7A44D0E3ACB9700B1829AE038 +50566EDDE5A9FDA33AAABD737E5F73FD76FB021805406F8E525EEF4FE985B6ED +178570FA9B4453535E38C6D3472BD475A07DB82B0EAE3950D569F7D0C16C17B8 +3737B780DA66F50B7F678B8020527277E243001434176C6E8B9B9DAC87139FBC +30F676E3621F59D2F8F0476FF8C528302C7748CBAEB2997645DC7724FA8588FF +C2969DD8921AFE6E1773AD1135775DEFA1EFD197C113AD53A656D4B7BC1613F3 +8C56B27578F856FDDA30652F7D6DB38B819D1E536B2745421DAB8F5E21932B7E +20412937F8668163EA41BF6D7855B884943179FFE4F2C0C3340C86ECFF4B6DBB +F41CBF9DED39E7BFDABE6AD603FD6202A47536E5102E7181FD60166EB10D51EA +5729F7FBDBCA979A65A8FE0A387F78A99CC7E41D87E0D791EEC0136BE1A077C0 +19FC4B16C601DED739DF6FE9CEFA9E48997624B7C768FD5259D0766A9C94B0BA +9FC8336C05005DFEC39BF559A36962F16F21F208F2691705BB19FE25AA2FB0D1 +DB727839FA045A900A0BCC2717A35A2FF401D10B7E504FCE43C58769563D8289 +03EB34FF2A2C34107C0D2F8984ED +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMMI9 +%!PS-AdobeFont-1.0: CMMI9 003.002 +%%Title: CMMI9 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMMI9. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMMI9 known{/CMMI9 findfont dup/UniqueID known{dup +/UniqueID get 5087384 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMMI9 def +/FontBBox {-29 -250 1075 750 }readonly def +/PaintType 0 def +/FontInfo 10 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMMI9.) readonly def +/FullName (CMMI9) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +/ascent 750 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 58 /period put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3C05EF98F858322DCEA45E0874C5 +45D25FE192539D9CDA4BAA46D9C431465E6ABF4E4271F89EDED7F37BE4B31FB4 +7934F62D1F46E8671F6290D6FFF601D4937BF71C22D60FB800A15796421E3AA7 +72C500501D8B10C0093F6467C553250F7C27B2C3D893772614A846374A85BC4E +BEC0B0A89C4C161C3956ECE25274B962C854E535F418279FE26D8F83E38C5C89 +974E9A224B3CBEF90A9277AF10E0C7CAC8DC11C41DC18B814A7682E5F0248674 +11453BC81C443407AF41AF8A831A85A700CFC65E2181BCBFBD07FC5A8862A8DB +7E2B90C16137614CDAFB584A32E50C0935109679E31306B8BDD29F1756946A67 +7A7C2D9BA6FAB9B20A424AA0E6F4BA64C2801C2FB5A1156CBEED0ACB95F697B8 +BC2A6E6AA7EB1F9FD8E3C9B1A16697EE1F0E7400421A7765AB218FC837A49365 +82DC6B2C877A7DA84A81E6126EE96DB25C17A207D3020A045DCDAA064360DFFC +E3CD50E21ED239D2A6450D04F879A26443ADEB6A20ACC504989876476C7D1A74 +91564FEA1F4CC2C8C8FDF666DB537F315AE1886C73CB5B00E67E7B398A6C018E +540EAEE98BB8136C4F044EDD63C33431D2CF9740F051DF365A4045D9D8782112 +7BB5D494D9235BA98CF2F30CB119F5A904C32AD04C960C43FC1F5FD8DA7D90D8 +93AFB59F3FF4F796481AE2A7548F948FECFC6C127C4D3F159B08F206AE8C296D +EE470DB2F879EA79475E029D22D7A8535C09A18689DB0609CC233E5199C02756 +972CC9C94D9FCE264DEE5D75C8D651E4E2D1189AD9588CB815722BB5EE3C379A +6F31C2E6AE1AE4CCEB29766190AFA20EA937114978752189F1A9F42B39483149 +796FCFA123BA9CCD1D9BE28289660BCAE16C40B5B504058D55CFCBFB4F4E3D94 +DDBF39F157E63946534DA81C018B1C01B9F10DDB55E0A5C2B3985ED1977C039B +D6755EA42CD09E27751E159C30B93F376DBE61CD3AED34BA36A768F232EB3B80 +E3E6B77C4A48D408217818E398B83D995AB6BC871F20991DF57313D6EB0C793D +0F28088EBDB7F38DAF7E01AAB3476EC24D7BB38A9889A7D3038D930FF4289B83 +F54A7BE1E2D98A3822098D2E4D067A0D400C20C0B2B4BBD74C13ED1B827490F9 +ECF48F8C3994C1C5AAC9CF783BFA4F307528F51EAB55F961808A42ED53F00C97 +72A432EAEDCFCFB622389BDA707B6ACC9433B065CF29EBFE93AD14B8ECD5F47F +F073F11822C49B8BE924CDFA6348C3A75E9BB9BF3F31C41716B34794B28CDAC9 +4DB8B087E180A9B3B17680F73D9C12C8D86A922C948093629F5D7F542ED882A1 +692F4F6696865E53E3E2DD43B2D5E8C989CFAA5CA5C4C5999045E170BDE9921C +BACD6F2863F5553EAB2BA2D4A9034729EC0C4201DE90DA89B0A27C5A5C974109 +4E37BFB3F46B3A506169FB0C68E1CAFC844419A8D261A1FD86A3BB78E33D5FB1 +CFC687A5975987CE45155E5FDFAF0CC5FD5568CB1C26212F92E88255F0549F59 +41B33125946DE43436BEC00804063FBF03EC796E3361B1C852EC3038D107F80A +9198968265D5488B26D7670B22C2D75EDFFD1B7B4AAFA36DFD94640C9D0E2D20 +5BCA18683EFB91834A3939AB8EB60E2F09655BE003582634C52770DA9668C292 +2E02929D812EE2B0CC65F020064AD5BDAC5F5693B30508F40ED8E20E87149BD5 +8DD41AFF83FD1944804017DC5A04512E593549FFFAE501131CE2FDB65EFD0B8B +33809CBAEE411B3941C241550B9C30DD28088708F1C0CC3125CBEDCD985EAD28 +03313741F67DB5744A87B381147D5BA70AE1145C27F794854628D87D6C1ECCA1 +749E3465B950175D3C3F40E344297BD92D3190041A4392033A79BEAEAABB8DBE +CC14E39612F43721CFAE6F79074429221CA588AA2501DE520A464DE157A03AFE +3C082FAE7628FC0C57FFC61D0330AE6332D20FDBB09BF36848FE05E782D6379F +64F9C82C45402481B0A35989027F9756BF5A79DA2D96E10F39167ADB4305578F +90B509B6891338FA1D67DCFD61804AA6621526B2EE4769589A2646581712AC05 +DA6E98D16494F07D612743058F54FEE516BD89A8EC3E03F9D7F905175D3412C8 +F7329077FD6EB25213F3CAC94BA0C3363B759401B6EF7548C7D709F3241D030D +4EB46A1AE81863C412BDDAEA6084C37143A4C5E41BC646315B1CD09F934186CF +49D1D8239E363A435307030BD79536B50B723A39DD763DB539F24A10DDA12BD4 +E467339D2D6DB177D6FC539FA77D2DE4118EBAC161E928749F7C753ADEF86117 +58619F1155C563DF2E11ACA8347908B98113AED58FCD0394150EEC94B7F986EE +88BF7171D208D8F1774B1DD478F0C2958AE372D257E7EDF0F6B5D6059CC4D5D3 +B00FCBD2E9CBE79235B9A5A3E943CC27AABB58728C95C7DBD4F4A1F8A4DA99AE +7377B0CC0BFBD454794398AE0D5F7281771FFE87B25A819F36E692286A42D776 +01794A43CA9BB30FB8FFDAAF014F909A369E34C2F6C75B7D4EB9DB0580E33F46 +19654443AFF8384B95600B86FF8E41FEFD032355626D60C7507C058EF832DF41 +194B48A36F11082D1DCF4723E21401E0C7447AABFAB4639B26E3D2730E348F55 +53EBFF39CDD03E06E2FA5FB379603C879EDB7E1A10F89695C9C47DEEE52BE0A3 +F446F187AB9D7E93E6F9387F21129034F36DF40605D28FD526AF82CA9D232BE4 +412567F06B38ECCD496EF40A7B243E46C9FEBA4F1BF4B1ECA029C5EC239353D6 +C0B100BF7E7DB33BD1277DE104F15AA19F37340A777741AD1AD693BC76DA48CC +C6F83CD84591ECFEE375979972B0FAC4C10B625E4BFB261B9FFFA83C31DA0108 +4FFB6377466E9739E0EB64424BD9FC7239C7DD834EC6788A0F97FE714AF92831 +E1BA36A8A9E24739F1DC82DC26CC3CE28C210AA7C569B19E1784D663A0CA4E81 +AFF43E86D6F5F63778847700072CEB77A4EB946DC1F23DBC00BCE773203F76DF +00F0B085F31420672974DDC642D885E95BA6BBE43E1CA8ABF464D9881CDECC7A +E98E31B9754C9B72A8BD5CF6D4D214DBC3BA7A0CDF6635953F5AC1E7639C4A91 +C7AECE4C75CA3389C348F656FC2CC96C84C85A926237B6504DB51937C9CFCDAC +B75C31ED570D180757884E27757783DB2D5F35ECC48C496CDA342D49AA947BF8 +2FDAD2F19DFE8CD1C76A8FA08F33681F3E12E229D7DAB45BE3A3F258B5ED4980 +F15340CF20D965252843E026803E8AEE736EC41CCA82167401977AB719AA2F50 +0B791EEAA82027B3C712D2EB9D14BF8F94FBDE2227609BCAC41EC08DE2BAC023 +28352F913F7DF08D4E1C66E83F764578B22B4EB7191E852B91ADCCB1BCFDB1F4 +E63DFD152E86FA9DE9BC8908130EFDE29CC4401339C05B5B9764CF8EFF14951A +C6C13AF979546996BF22F2B96D3D585B90CD27DADEC78914DA48432C6ACBDD42 +20EF583FD41F2F6D6D10C3DF7DD077304B5940BB0462656E306CBD91EB9B756B +7014B1884A36201EC582FC9345C386043DD2818FC301EF78791C1D7854F8FACE +5DE9801DE9F59D5B4271E003AB897B2EF49501589D681D59CFFD9B03F722EEF4 +74ABD29997515DA3591496B62666744EA76DCA45504F8075C0652D6779DBEAE4 +90430C2945FBD60AD53B51DDBEFC7ED703C418B4B244C8FFA5A3C1B7600C5A55 +3EBDB93C16AC191C3A28EB2279BD3F0D67C826BC6A73D3C0AD02262368AB4621 +98A1605F2887BC5880E1AF2780330E0FD01D7CAACBB0F008A42C427F38236066 +54799594E515B289044BAC4DADF8B3686B4372C5110201221FDA923F131E07E7 +93C44BAD406838BA4D1C277EF74098B8C0EDC41EEDD58C195D7DFF5FEDBF96FC +19CEBC6C3006DD2CBF76916B4298BB915663C2F61AFD7747E03A03BD7280197A +9DA590E3D081C6F53DBF94E8D6FDDDD910A70AB18A0F6D48A590FFAB314D6CFD +E3FB20C1F3C91063F00726A2C13A3D48323F9854839405E5A29D66A43E6E2B84 +A8B3765F1D817071D4D6FF42BC785C2D11AB2B9452F141696CE19C6AFB9777DB +107D6E22D8CC6C26440BC48248AD8805C4329D46BF433741CB519B21663392DA +5DC7FC9BF37E5BC396BFADD7263D09F6B4D69594AB386B7BDFCF3BACB97A0E08 +22013E716E642592A20136CF9CFD61D4E515D80E06A4CB4FC9D9B916C93CEA95 +B83B98C48CF36C1D02291D4F5C0419338D64E33C90C90EDD2BA3B96D70FAFE0D +403A060CFF448D3E28A9B1E3916018465E86095BAAB4706CF7ED350D7C554789 +D7F4FE5F180767DE8739259E68CF142040BE1E2E8C6152DE3417C1FAEA7584B6 +20781DC4A9796431EE713DAC4E713C839D7A4FDC8AB6BFEFFE767AFD8B67FDA6 +943AD387E5D3BCB09039ADB64ECC2BE2620C6EC269E708DD06C311F450099E33 +AF46AEC644222E7DC4DBB9371EE12CFBC4F9B27AB46AD1DA96CE006E1DF8291F +A550A93026CBFFC1087B134EC6EA76F5E109CDA58FF47338A0039A786A575F70 +B8A03A4F9C8D07A4C856C77D9BCC8E3EAA740172D0C2D0A15BA35C9E5717D7FA +2691774DDE730BB9D7C70D7AE103DB8D35F3728470C76EBA0E670634E1A0BA84 +2FA102BAD7271DF2680D86A4CA6FC353869987700E5E3FD778165456033D624F +E9B3E80EBF431ACC934AA0357E824B8AD73E222B510DE8445C55C07C8E5DE46D +E478F832BDDECAF2EBB11941DCF84CCD887043FAED9AA90D12BC8CA9A0C8D94F +8D3BF1F80B14B6CAE6BB1C6AA405AA64BB94D5A82CFEA548BA070796A02F9642 +87326D066101435AB9EB40BA9EA9E61B363F5F5E3B924369796E8B78DE3414A4 +2B79C6A13ECB2F34E6299658D07D2B3DEF3D4383CE009A927F0EF5C196652842 +D96B857AB5E905201E7E8BA21A5EBED1FC6863BA9A1A6E5390407F75055E2EEC +512FBDB3E82CEA13663F1A1944DA072C765D8CED06AB461470C5723BDC1271D4 +4D1D049D3EB131743F1EC9A6ADDAA038ACA2C41D139DC6A84EC3C61AC7F1E559 +6155CC2F49171F6E07CF56D721D9728E87FC7DCBCAC46455A3694C765FE807E9 +9CBC2D304AF37E0F28CCB22F239541B53A4D24D09C662559267467EA487BD33A +0BEFD4899B581D20582930703A868655C31BE935364CA6A95FBCB22CB714C040 +9718824DFE97929D0482430726CCB5A5307957DD2432A9B6271E849148DEB76B +FAA290FF6D0B18DC5B76407852E81C105EC6CFAB0F620C6DC9DA555A33C167B1 +430A8BC338BFC7D75B7099CC906AD923FA107C74D3FBB719D77A4E5A685FF9D8 +56424EE4AA074434B809D894ED50F6A60A035C5223EA25DD8983B9B34210DABE +718D7B2BEB293FF1B63CFB1CBDAFC69552963D90F5E3FF533A3FDBB626E9FAA3 +F3C119E5E01C7BFF832A033C3515BF049E29558B1DAD652F2888E339E67D15AE +95F9BD14E3253DFE9072B24C0E7E85025B71096AF51C86AECB2921126A43156B +EC812B32B1164BD9B2B947D503C015616DBF2024F5C8CB3236C1DCA653D661FE +6B1C19A22D272A176B7F1B7F9E67AF40DB0EFD4940E58B2A050249CA4E55CAF7 +6ACFD84FB46FEF952D18552B3972D79D808B4C263B8C7E1BB647A2D03E102867 +630D5C3F2C917F765A4F6FB8106BA6A9D0093E27A4CB6049C2371287D94B5111 +6E7020776EBD744C6C920464BBBC0AC206033E8240017F8CCB112596ECD7CAFA +89950CF43FD87ACA750C03A778A37FBCE9C82C2F5ABB135BB02DA8E8C0D24475 +3BEA9D79372D0022FF1ABD378C151417DBC69FE5C9CA38D23A3900E34BF924A2 +90777ACDC37930B67DD44A2E76DDBD9B89598D5F626BFD325A978D277265DA47 +38CFAF16E7FF1946E15F41CA73F7B4B02E5AE8FC4C37B115BC567E4EEEFEFC34 +EC8974B1465AE57759EDDA28DD38A9210871D35D331AE1BE6097C3EC21C770C9 +B25D040B2ECCC3AEB1EA1BF99E0C2C0F192C13BB9152CFCF75332E03F9CEC376 +9B8C285A35F53655BE38713E09AE34BA2DA9C06FA42A6FD2D00CBF2AFD2BADB9 +1571629C65DA38A431710CF5B01FCA68E8B8569922FBC3F9B64A5509B6F677AF +1B97E91FFFEB6308AB68AC58F9BA43DB5E764021E75B56170EB44C2C0A7DB86C +62B8982256D3621EBE3DB3994DBF5C5A14CF34B4AF3BD5697F8E3203085DE9D5 +84B0598169760B925463E93DC87CE70AF4C2DF0F4287D2F2069847BCCF7A37A2 +AD451D5ACE4DBCCB2E14D5DF38B226952E7446BF87BEC736EF3D5AE793304618 +D66D3299AB9F9CA1D13F134FAEDF36750046E27706C7CBD8E0877BB6276E5196 +BC2A355D109C0253644918E1CC11B717DE6FBDA201E769812752888CD66268F6 +4ACF4A9449378F9F9923D584BA1B51F33663BE7A306887BC14A37E3C5A4654E6 +531D6EB63DE3946BD8BA95CFB037991174F36D61D842071E6625605CAA350A24 +FE551025D10871FE0E2599A63900C8520EF4911C53A03897C8BEE152451708E2 +43FCF4E700C583A5E8DBCC03BF9CAB864DBD19E1760945DEA0EC0BA38BEA8256 +D3A8D4F70F6685A99C6BD2BA8B412A26C002D76138CFCC7DF6802931E5D97BA6 +0151F6A4C572235B4196B22B7B2D14B32886DF0D2CA8A277ABAAC53B63F64CE4 +E4C088192AAB674497E8AF81961359C389B51F4A257373D907C615030BFBEF53 +DBD99058FD06E352450B658478C10454AC8FC0232B70D5CB916981978053E358 +99D322A07294748BA427FFD1E45C909171017B52B7C742FD77A8560852D819DD +8DD53211A14D7B2FD11E42941722FD3985D627FDAF87EB57326A0D290B5077D1 +8A4230BEB40523A8565F95E0D44F036A571DB698EDD9D94FEC9512369E5E5E73 +A3CA5C142617944F4F99C0697ED088ACAC007FCE06E5A6EDE7D0E03A3399DCE5 +362271BC31533866BA79FD1FB3F608B22CCD4111FFB1BA35D920A23AD157C6B3 +C3DAE11069D5E46DEDA7158C6478D8B8C0D9DC237CDF0CC6633911673C43FB79 +E4F9B7F27495201E5ADE66255BC2CBE9D9F237DECB62A19D62CB41A1C92432D2 +07F0629E913A71B3F1AAF8B8C5AC66D3C8605A48F8913E39C859E163DB1DBC8F +0ACFEE80A40B6172032E95A76B752B873FB4DF23CF3A655AF1A1B88C8DC156C6 +190DE72973950565454C0A188A33395FD3D529A88F2B578356DE8EBBC12F04C4 +5B899F667D9E6F3A4EC6DD8DE71FD4C2E2B6D56823EE4E0526679D71FF1B868D +F261489F06F97B010CCBE640E2F57BA3DC3332B329F7958394BA9777D833AB50 +005E8E9232547104065ACE33396772B0E0BD66D2C6CC54DEDD071E444D8C95F8 +6F88B31E20FDB80F77C83151B7E25BD3736B4F9BDC52EE78C41E9475E5A6D94C +D348AB42F5E36B4F167D29EBDFBD43B03F77EB296B06A36880FF17D412E77EA9 +F2E7C25FD05E16BEC6732681EA21AC3FF6893B93FC09316A370CDDB86D9E6087 +F6042C3F9ECD742778389170F5F041329782FB9F9702F7533E51F355F71825AE +2BF4F8FE50D413AC9A20C41B42537FDBE8DDC5A5C793D3760C1EE13716068752 +F0AF10812250BEDFB4D7133FD58F4587BACD572505C84A7D3802D27443175FE0 +0D89C3398B55176D8642AFBAB5CBCDFD6220C8488564B4306D74A58CD2921AAD +73CF803C754DAC2F30A5324886E273064FA51781D5BC596BFEDDCE3982EA1AA2 +62CA7BAA1B16C6EBB99B2AAC4E6C9CEFB3D10F19987045C4918DB239E6E63D79 +5F44B9D097118D081153AFF96E5EB39CBFBB99A3BE30909F614869031358EB98 +F07A97EA78AE50375941B2474DB46AF3305F2B208D45921F93743A6CB8AC584F +6BEBE25ECAADD5A789EF60C9F54446687E7B030DA3E5243189F02BA46BFD28B7 +DC14822E136AC7E40CE20458DDBF356488045C95907363864CD6943643BF0109 +EE027A3091C11EA392EA91320EBFEA3B857370AD8EB86D73F035A476F7058222 +E8CDE78CA1AA9EA69A8AA6EBFF3E67324C567B914134DE042D6F8F18A9373107 +536E8D90189917D343F5299024239E2EC1D2D177D82DC8E344A7CF2AC71AEC18 +36F139E7A4EB59A67192BCA9ED0EB25DE13032F6FEAFC3B1F4FC81BB0EDC41DF +B9EB92618667C59EA499B788CD26C2137D70F1B0AF793AF5AD0D0941F2E746E3 +F5A7F0288BC1EE11E982EAAE763CA422D72FBBC0D754AD58FBF92629DC8866A0 +431213513744DB48E52EFC89C83FEB082588E4F30D7DA77BB598E51CAE7E4900 +5CD570C914EFBA426BAFF7A56FC775ECF5BE13F2C42E51EF96784E5201C0B64C +074AC229FF0BFDF71E6D5E08D8755D2C12B770B6466A9C9C61C15582DCD2FF78 +E9E74DC2B1CAA344EC0339EBFF92CD2CC1D62E2FA8FF15E7459A83C6CFA58A77 +2F1A40BD276E76B675FD6834052B33BF9190F04DF6AA5FA3BB7D77A88DD5B600 +324C5E28216F47682EC29EABF35BA842BA2294A3D72B126EBB852AB741186C9F +FC84B12DC4A6CEC08F2D03EE61B65C845841EE17F1B765649A +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMSLTT10 +%!PS-AdobeFont-1.0: CMSLTT10 003.002 +%%Title: CMSLTT10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMSLTT10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMSLTT10 known{/CMSLTT10 findfont dup/UniqueID known{dup +/UniqueID get 5000800 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMSLTT10 def +/FontBBox {-20 -233 617 696 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSLTT10.) readonly def +/FullName (CMSLTT10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -9.46 def +/isFixedPitch true def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 39 /quoteright put +dup 45 /hyphen put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 58 /colon put +dup 65 /A put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 72 /H put +dup 73 /I put +dup 74 /J put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 80 /P put +dup 82 /R put +dup 84 /T put +dup 88 /X put +dup 92 /backslash put +dup 95 /underscore put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE33C33655F6FF751F340A8D6C01E3 +2E02C24E186BA91B34A1F538959D4450CB683EAE5B034D030186901B458D3777 +6B3942BD2E07121385120248891AEC2EB33C4E3A0CF00828D0F130C31A918C18 +979FE94379C648EF21ABF659253E43CD1253866F157F1DF85AE7E8714F061B1E +ABA3AD094FE8D6293916FA82EE4F486C7E513A06D4C9BE44306A8287970B4ABF +B6D1F9274A5A0BB6ECF713ADBD1260D5D6C4420D357FD486470A74B2F0621B59 +A9373ABECDBF32FA68AABB66FAB0C970A3354A335FEDDA1C288245E6C890B8DA +3D0EB953283ABFE372221EEB1586B0167F634E3F29CADCAB484B81A243CE1E3F +D5106AD6BDB1AEC91123377F816711CB9D5140120FEA84B8205B79D1569509FC +6B671211985CEF51691C45A168740BD826464B2CB0ABC575E7D453161328F80F +3AF1C99EC219010EC6C95E0A8D1909719CF18BE424967E90DF67537220E60C3C +4345B154D08F9EA684710E659DFFB0BA1B7FDDCD519305900A5E1CDA219A6C90 +DF8BD712A3686DAB90344E8784C7A9AF3318550285039B701B9FA1D3A3C3B6C2 +753F1E794A3463A173C99A9EC0E2AB5737134CEC2C97CD6A37E38692ADB4B131 +54697B7BBBB23680C72CE96066D8007B90AF0FC5958232AB4F21826691E9874D +107F47DAC1026298D787989BD77CB43A09FC95F6997DB00D8483AE9C2716CBD3 +7CDF02DA34FDA2F0754ED0968270E118DDD8BAAAA65C41D699E2BCC2556AA231 +328187D2F50FD518CF458B0BA1F7DBAF4B231CFD61D5DC56335B53C3013BCCC9 +85690E19E992ACE55EEF2BA7A75DEE6DC33933C226FC1494269B7CA4CBAE987C +2C787386400172AE3F44AE47115F4117EED866713BDDCA4A7AF658C49F913CB7 +308635000043F63BA210410A66E192289592882C477B2EEA0B2A339F0E7CF450 +CA0EF79D3A6C28598825CA03FD688DA60C95EF707C6E67CB7E57DE7A80545195 +739ACBDF27069F34C9E0216C3D17CFE7A652B910FCC9B9AECC2E646809C22D93 +FAFAD465DE794755AFF5BEC17160C9563B5C51D07022E2D3A256FB5CACE131D6 +F4B30F591A0419D957D8F0DCAA0A8D65A8D83422AD7C2613FF13A302E152B312 +3F1ABB45E42084EAC894FE335C07324849C9736D00C872C4551997DB889AF17A +A52C5AA77DEB548B0103B77F65717F70B90C1BBAEA7BCB4959F32851A9882A3F +55673F24103D6BF7FB3AD3EC3CC50FD8FBB4A6B13C3D278174320713A7B327CC +A71F01E50840B33D0FC3F5F6A6F2B0F2D0E38494B1C73096A430510F927235FB +69E931DA8CE5415EE88D0248565E3347353621A48F7948AC9EAB5F5057541B50 +82BA955D90BBC82E582FD71904445A59186022FB928015235B60830DA59813D0 +8DA3FC306C43FF8BB2CB6772B1F7BA3C1AA4B2343E7DA7E065EA53A4E5E28DC8 +0790F2D5CFB203CB135A08DCC9702B59A63290444F202756E55B9FB053F773D6 +0F69C63E74DE593E49186FF4304E8FA76C3E3006358DE549E946DB69431981E8 +1261C9C9A884E4EC708F69E6AF5D22C5BAC49F2AE85903E3D48D03B7B97054F1 +D2937A0C685D912D6D20A75A77712164DCBF8FE4D5460DACE139C5A934EEA09F +B94DBF168A4BC03A9D689936D833018FF43837DF9519AD10F357F00BC068E737 +170FC9FC6715165F733A0B6FADB9ABB48B845167DBE6D771C916577FC2132863 +767DC6E3D460E779254194AA690983184D934F5E858C1176B3862B69B42EBE7D +EC9AC4E020085D474093F7694C8A8C2025D4B0163E29320C384D62A9F3FBCB1F +AB5A374EF3DBA48AC2147A207AEFE8B78BECEBC55C97B538F3A0FF4589D171E3 +826342C8A5186224FEE54E4C6AD5EB02BCB4088B132FA1A48362824BEF161235 +8E661DCFDFD8429C65CCEF63902D0E07C2FEC1DC2756D942F13FECCB7E8A8048 +345338F24B7808E46A04A915C111F939E2669A12FAC0BA4F74B832EAC83EABEE +67E2817C058E69C2010F2572FDD15194CD8DF0FE9F827D349C0444A18D1A86FD +802BC120A5114FA3523C221242C7E767B0AAF6AD15DA1561CE8EB18A2401D71E +20481FA5F1E247CB5288F47795A6A3A3BB186E89EAAC4A54AC91405427136127 +5B151203426830F7CADABDB3FF63B40CA29CF8E667E71615869978E99E6F3F07 +0170EACDE3DC62DC05681D7680E2E96C30002AE34A4E5EAEDF88577601A82C36 +22D625A03B0451D7BBAAAE0C396711500E94A482EA787495073F16A76D1657DC +4EA7C7B83BC30CE7F145B65B6E2ADC207D192CE3B5FEF7031F4BD64F57E1BEFF +CCFFE06F1E4ECA48B442DF413766A70DA626359183A9B24C70419487423C816B +4BCB067E661E47E172563090D6328BD738D2B0FE41A0C1D7A47576A79BAFC880 +0473229D134F998909898301CEF50A82B627A9A06DF59D0B9C530EC5D877F1E5 +220D3A1ABD2ACBFDF1933F92B3137B22B9F95A961D93B729307749A50D8A6403 +7AD0F9C40743E39B8D198CFCF7C033D99440D46D821D97545B930EF92E7AE005 +27F2FC766FDD4790FD1913C7A13328E73E587618ABD9008022C5C6C23935CEFE +B5ECA2CEBA1D25DD846B48423F7186E03B1F61C8F1D5AC95CE03C83B2F221300 +7A761D6CB5F7F9251D3F9A7F4B25B99EE7A1347ED3059A811A82A35A033E9B07 +A4FB2A95009576F48665605C478E5F6C1B135016FEB4AE6A6BE4B4359836E04D +45AA11366992162973FB6266547C2E570B8F56F6D992D2C0F63950A16839FE10 +F56E59D93A37573E3268C5892C9F3358753D1FAD6379E82BE740FA17236E96F7 +C53A2FF785FAB86AD17EB1DE8A6AA9C69B91C9D9B43B5188E51F6939FEC21B65 +AF17DCE95DD3BA4F1DD51F0BD5E5869A1ECA7398B6E664EB0D189181E9C23012 +DC1E54C146842A90909DBEC03B79B58909205F2CB2A7F83C66B437D7F7DB9781 +FF0C67F004E979C95B706D8D85255CCD827CF6196D847DB380B56980109E96CA +997157BE78A4F758CE59D78158A854EF2C20099438F74777D3B0298D45BA86D4 +3C0AC30C984718FD62ABA0567AF0A70C1DD41953E3E7212D5C562085177E650A +2ACD49940551E3F7619B4CC31DBF67AC15D938619B95DBF66E6D1300B1BB8605 +31C4011379FB5388CA49E4A9BD6C921560CB8D513F8716A0733D2A7D77E62D22 +A69B54E9048CA168D210816E613CF6357706EF6B118A1263B858B7E19AA98891 +43BD675B06C893579957BAB97199ACB82C080593ECB8B66A7334779CC16E4D0D +4AF365CA6AF9727AE29417B61A5FD52452873B1D666044F8E7C1F6C6AA3397B5 +94A5780F4005FB5E41698FADD1594B505A58253D68D2AE3320E22165D198050E +425820CC0A43FF1D61F168D87CDD30C14D387610B6CDB63BAA39B3EC9B3CA616 +FF1CC679227749DED3DDEA26B4D97C633090DCB8D8A6E5E07E3579E4A99BF1D5 +51E43D1D7F139C9CB1D76D8F693A3F23A74EFBE79F01E0B850BC6B6C7F62C2E9 +859469A144853434895D73DA6BD2B348A48BA80E79327ABD96539F2EA2209852 +E1BF6B0B819D7C68A9A1D0F6F39416E3EC4AC21DCD3C51D3B5B8D417EFAE165F +2A7E0B76E558AC9F685A76FEC7E3C73CD607D9025DE6113BE5D0401887A53910 +82A813B026A502B51D484797D9D7E79A25B6624940AEDB4A15F2C73CA1AF60FA +22D15BFBF268EB044FAE17822511AC6580D1D74DBA3C3335217780B29FEE792D +200B00B8CD888A8BFF15D938FC758BB5CD9B3E08E1AC6CD1669E663BE86711A5 +892684DFCAF70C11E803164994BDAD89128AAD6461D4558AC2ECA3E05EB56D32 +0290AB16A6DF7133DDCBDEAE89C6CD83552792E23CBF567D57E46548EEB0A140 +437492B53C14419B6FE7E64AC23923A9E85F56A9DF209DC4E6BCAF1E045F9CA3 +BB904BFA150F4083C18B0CB5580450CDB657EA768E71222C71DA911A722AB9D9 +E18B6847F417125C40EA8A0CA1F551A4548712D098209C78DF9C3F78605E5402 +DA2DBE2218E49B819296D5AC88D17DDBA982E171733D1E9E295B3157C9B90BF1 +CE68CB185947D1E3D7544155B741296D14B064BEFD3E6AF25C74006CF6800551 +80FCAAEE6FC9105E1674EDFE68C45617D8D3E2264CD395EE94EDD017EB85884F +FDF530EDF4F3F14750CA066F149E688FAF8EF4B5FE6AB515CD298E8D170346CA +9B32BAD1D86DC147BD12EBEDF6CE1E749C5B48314F512470A568C172C35CFA41 +031E34586A89404CB5372D7B2C7A6D96F420D4D7C2D4C08184F4AF86B4536A90 +9367598424112A7B05D7107B23695CBCD569002290599E0FF4EC5C852C31F5F3 +9BD56BB840DC17DEEA579E7A7A9F764788D4E3774BD523D21267869224D68891 +4523070E80A123B58F7B579866332FC38A41A5915EC06F2D14FBE4A6CAF59AEB +57E98D661637EBB885AA5D74AD429CCFF64E5149815E7350118E6385F4C74E0B +2EB474A6DED021D429F01C9B0634A09250C40E22B3BFE1B7246D18116D585F39 +0E06E9B5F27A6CB77C8E9462189CB900CFEF08F798CAE15FBD94587F33816EE9 +03FB2DA6826EB69D8C284AB9F7B00630D0420EB6E35E0E288BA25F5C2345C067 +22412633898AF99C2FB232D1469025BF262B567F29A05F4816FE8EEF5F02BD79 +06202F6A1E3E5D4B3C91BA8D5FF53D5136BF70E5FAEF441A7310CA83721711FC +39EE48BFB2FF287234B1A6102AF146B10A632A53AF97E11FFAC3A2A86BBAE3BD +E0459ECF0305366078066F2CC628A3918E775E4236651B3D817AF1684B07A163 +A0142D16F55D2FB5F2255A8813B8E54EF3E801E95A4A226AB8C0476AC5EDCAD6 +9258ACB6F7C0CBDD298A0B816560622A1871FBE2FAEBFE697A8216A0D8FE30C6 +B1BA6C3E975F78182743842E7F851064037394142AC91B2530FB1D511EB20F3F +79EDD8B7E1579D35F6E7B2883C47A46B6C1A458BECD6BE58AAFD834A7D82A553 +2FE4E66878E4699856DEDE964F454638F768AEDB595A883E380408F558015FB5 +8720954ECE2704AFAD4D62E8BB2657C4FA920D72248B3F762B2F12D125B796AA +1C4BD6B42D766EC1C9B2C7AA4B6A3474BF753742DE8AB76D0AB0DD9A20EE2DCA +0F34CB25995ED3183759CA83ABC32B8BDF0B06EF169252587971F7D37463BFA2 +BE36B2E45559DD73DE7CBE29DE92B9BE6B9F8093F934BA311D81E18A8DA92FC3 +312E3FAB43C53E803975981F0076EBB8F257C123908450661B6FA79E7ECE98F3 +B0A94E0DE3A4DCC8E0FEC106CDEDAA297A75BF1E40F3C2419BF72A644F452E2F +9A8793810319885EB3AB23B1E80E8B62A889311355C73722C18E62711A7E6A16 +A5B923408444B13F6522FECA9A60B067EE332B83E1A69CD835C9D69B5D8859D6 +91F9276863D2E2E8193641E4239F4ED15E2C482C735BF5434BAA454EC2830C1F +7CF766DAC9E924F17F03093132627673BA3D99DC2DBFC89E5BA032C16D3C1C8D +78B3C464081044DB53C7A29E925F4157EEEE928C8E28EDA5F0A4BB6E0042D8AC +7595C350645118172D04FBF06B2C9A9F3603A54B57999E2960C993724CCD6A09 +766BDF73F66E07FCA9BD09079CE8010E6CFECBE2E5DE1EA4E280AB78D5184C11 +016385007CB5AC0BC95955A1E88EA1A1D8EFEA886007708BA063F556D9284D4D +C764E75CECA51BEE3D35DFCEBF6175953D30FDAC00F23B1721A1DD577945B5E3 +8176A21A649D907B5F63C71718ECF32ECCF1B26BF15AF694F1045CF98FC75278 +E9782ACD3D83CBDBEE690D29B3176E745AAE436382D258CB22F3DEDD02E441FC +6A9931AC2F61156DE258DAAD5EDAD41E6C0DFC902173168BB4F51DFA7EA615C8 +B0F92FDB118378CBAC3D56B6B9BB0883C0C14EAA67396AAA7987222A132B7959 +44FC1E9D6DB6D549DFBEF8D2DD8C53DD3B66935FC239E74E2C440CCA13C068EB +C4A3B69F499F573D076E2C92E24F2C69B806591B0807CD903E078683854963EE +5125C3640860CEF37BE186DB781475554BFE6C528A9633AD5772BD53244E24AB +42CA2D1123AF45FA257940CE611D83014DF04E60220E9AF27CB2A2247BBB004A +F5722A5EF058FDC7DC2B6ED1406649DBAA58DF2ED3A91483D60F11C4A39BAF57 +CB1E320A987B790672CDD3E3BEF4A67032244DED2FF4588B2072CDABFEB36009 +9F4BCBEE16F811A44CEC77F8AE873C90C0F4C975E51014ECBD45A56A63F034C2 +82212977023A132E5C88AAA826D841FDE9CBCE7A01E4B6F0EBDDB9A69EFEBD72 +0B41EDA807CEDB791084047624BC11CE10B7A0A311272EFC9E013FA374D97EA5 +F7998FD908748CA72D8CABFD0F01220C2114D3B462B22FB71A23B284B1CBC7D9 +EA20BE71F8ACCED21F096009A14A7C7B51450BA51514707EB46B9FAAB31CFBEA +E1DDA6F5D9AF0B6E7D05A1EEEEECD606427B0F2363D1B882B50140466B9D3CBD +D00DB06DDD1BD4681E367DAA4B7C405C6281B67FFF794041738FC6A01D261CDD +F6E0A330985F2CA782CBCC02B6F4EE5993434F656B91A51CC03B1D73FFA6629F +14F6075EBFD83B702D8844A96CFB5C14051595BC7DB2218156A6DEDA5C98CAD8 +BEB5284D9D9F86406A8C1AE85857185991C360E5F44DEF352A1F301207BE94C2 +9A3A11BA468FACB3FA2D683419C44EFDD7C8F1079659F3ABD89D7F168B1591E5 +6105F9B3FA481BA953CD34CCFE73E427D3AFC46E5C58C2981198BA284DB8B37A +6647BEAA561799877DD6858FCA71CA6003F2961FAA529906673EA94D82D78116 +4DAC81011FD175DA707C1E15D4B6FF19F8720A4E05E6E103E2DE880FA9C192BE +C5ABE7C311C2ECCBCE8F9713DBA74AEC37A61C8F21F271B35F0F7C88B182525B +A4183377597ACDA9A6E2F181725D427795B975BC4168A408D292CAA484BD1B8C +9DC62E737ABC805C8FCB7E96454DA032B601345570EAE0379BDA84BB6D15D780 +42FA1E068A7D62F152B43B788513E13724666FAB4E2B4F04B0448194E46582CE +7389BAF0D1DD4435BAA6B82AC305C04686B89FD51197C721D941BD2893596024 +1598E6C2BD84527EDA6FAB782033E4BB4F964FBACD96CAEC3F3CF89CBABF6B4D +4D3AD14A03D4BE931632BB03BC2B92842FAD51A19A756892D5B978DB695D0540 +CC9D030C612E2B201D60D09F56332DD0BA1351EE62816C21A35C33DC11B37BE4 +D2F164ACD836A5CA1553CBC733E3B159860454B17064B4E22D3764FF6293BC81 +CFA3B2325C8E072857F6FF4ADAA8818247D431A28D3C5FDFBFB24A6CAA327AC1 +0B3630C84ED9F0D33B8255A3CAA9C5A0C79F7BF6BA3B9801C3BD0B30AEF7CCA9 +92F25E332EA97A7CC653C93D1497992D6B76363885B92ADE34C2A33E30A3B1A0 +57E9C16D8CEC189565808D3FAC92973C71CDE74DE9D8781CCAF88747758014C4 +5B62667D4D2CC5EBEBE77C5AD00C6A69D1819F5A786964501E077EB3BBEA52A4 +57729AEDF35253F7E1D31F2DD1587BC15CCFC1B0CA930DA83E2031B099A38158 +8D1849E7145AC74777A3C7136DEABB0C787E5A218309A65EC7D128147EDE3AE0 +C0AC039B56F767A22555CFCC12DCBC7F5A5A3B4E86EF5A69EEA93DF0BAF2A3F3 +7504F5C6A7A67388D2F9045BD755BEB7DFBC2EED679497EBEC808BE20FDCB5C7 +B586463BBB898DECCCF7249E9047DA943FAF0718A2050FCFDF8A4C2029FBA674 +EA64003AC03A847185936FC375CC67B3006EA681F61F640C3640A78D0C7FF521 +D477981E23E5956BAF42252463FDBEC49BB560A9428D248B0C5250CFA2A49CD9 +DBCEF73123C13BA382D3CF6A7B8A8CA3191D379A659F0E2C6E9CAFE9DA2AC074 +F622E397A2F7C73347364AE249B11AE2C34AA7F0D27B5F35D548D5AD1228597D +D16A478C901D3A34D870BA39F770885B7DE62298F0114752435050E99EA4E5E0 +56B965EA185E8DF96B9FE97EE23DD45AADBFE02B427222B9FC99DA94FB2648B8 +46BD30F881BAD3820DCA4D8093BA0FE70E03482CC063B751439125623FA7AE40 +52DB2A380D89D5E37BF264CC73DA9A1540031587F481A0F146C6ED6F3F2957FA +19477F075ACF64D424279612DA5AE02B2A140048386D01B1F30EADF2050B71A7 +993773D5B68C6FE65EAC53411AC6E7E26E49BE5FE1079A8BC565D2CEB7E3B896 +593D720DBF66CDB26DA5D8E533A346845E31374A7C85FB6B06C3D54FE3408013 +864CB0954A2FFC00ED17CC167AF714716376B789A71059DF2032E0E907761E81 +F0C887810337F52662AF43FA1A7528923B0A30A217FA184ACB73207EB3018D5C +09EA88CA0873AE690E94D43B360D9C1070D7CBAE9BBA72E82EF9914D3AED6D1A +5539585EA969F0A1407C8FEDAB69BA3EEE3097D5B123C5770D5ACBCB0882F35A +E8A3E3B1FE3903A941EA2090266B60D218407AB99EEF38F18C9FA307D73E2F5C +42F8C37E2F668BA6B0779791D8404E2B2CA52E28F0B34C85250B0D6AAF9D2DCA +A12133B5B601D971345EB6D892B85FB971DB8C4A4188ADA6575DC6DC42D2F0C8 +4EB946AB47F487B6B4C4C59B2FCEB1291C386805C5B62B61FD7310A13B4620BA +650DDF28FC1AF21FA124C16EE8ABB98904F03E7F49E54348B1AF2211A1768768 +D62E35EA2EF7F2756B58168F9FFB5785DAEAB324C90FDF6207E670DF277D6AB5 +F0924B26BCF52CDA2980680320314F41244B73DA6367C434B5DCDB96B6F0F454 +89BE7553B58CB230BE71B2C7A7F1D63C3B1E80C159DD941027EA44D54767355C +6EB30D38D407FA1189474C2F9D3FD92F5CC6CECC63CF6CA6B33D77F08D274A1B +0AD7C2DCEE55F1B425BCB98F24D0BD431A5BAF6F42BF897BDE9198E6BB331C81 +6B5B63F3604235FB733A882BA5464A3E5415341C8E9A2E79A5896C8C334CCBB8 +A2047CB4E6BB167BD586FFC4A1409B4C13DA0B84608126D10754D562A9812A79 +F2B3078B7CD1D0A37A192E1D58623331B582E62291B6EF6FE3C92E8EC9A40C37 +B251270944393FCF133426FBCE86A318E16141654DD7BB12AD46B60A05E86D3F +14BDDE12FE3B17F9E2443E057FD0A25677D1F17C2BD87F84BA7D6AE3E7EF3EF9 +3DEB268B580A7823253430FF8D80FEFA0F9E4F66D0733E251E7F680B8B23B7B5 +A614F4FAEFAB880843451E4D9840AF7B8BBB6333E010A169528748AFBAE9A6D9 +499E221149C0AA19D536F3F121DF1AE056D3D0FF5C6D837BD8061153501F0209 +79076B4E0C63738C54BB31156F2273A327D3B6D0DDB5039D27D1C4020E90C94E +4A4B156B32F28DD132D2AB4D9CFE18B7851A65BA965382B23CCC0915EB6847A0 +B14492B0405395BDDAB36C2205F229891D989196608455629CB3CD67E07DEDB6 +A09E68BE431182D6CE52CE41B8531FF111ECECA60A68E7E7BDB6B91C7B694688 +47786E04588AE7D21DC6F2309D492FC9795DD054C150ED94110A7F89CF3E92F7 +4649D3F4C778FBF02ADA9E577C5EBA24A1F0278E9D9DC5556A60EADEC068AC57 +5359E9FD0D2E3E7B0006127F95F333D2BE77C70EBB163EA9679207C76C999903 +50D76BDAB2DF0D6A506EEA9C952A3D28D419FB78CC64078CD91C39A5D4FCD9B9 +D135A4E24E373E24047EF1180D3BF51DE4167F3945825B7124198FCDF7432E20 +C35BE9B0C7C0CC194867C4CE9BCD27860826C14749B811E8FEE29015CD65E7F5 +307300B316054B7914CB7464E6AA37DFF4BD0AFC04C0E8BFD1269E2D4CB5A201 +785C32B6B5656A7F6CA6AD8F7C77DF8F70B8F99C88BD8D548E78986096C917F1 +C0C195F4CE7972F1354B95D1BD84934D80CFD09FA14F3DF37300B5E8C208C66B +C544BFBF9B18AA7E27AC4E8567CB7188C20B1807BE56BB2B348C551767F40A07 +022EBCBE0749DE0D8FF1E2792A0BF2B84C940A127203E2216EA4F8689C84C739 +58D5693082E057B67C9BD80FBCA6463D9EFBA2B9F4D3C8F239C1A70D8A4A824C +B045489E1C6BCD28DA4F1BEA2BD80D424722479D0E8A1A99A8B2FE26822D3198 +722E2D276A123A95128EB6C5C6AF9AAD213D088EE92917E0870179888296F4D1 +0FFB87A340D7F052B07C6274027559A8B3843F2422C3640848CD8BF664645EA7 +20EBCB14E9B15F552E9E793B2F5D7BFE849817CCDD9BAF7DBA26BEED536DF80B +E250F831A12EC703AEE5ED6F5C688849B00C85AF124451A29CB67398FD3D4015 +C5D8824B7EC81F85CE9170560BEACD43ABF5EB5329A4E38431F243099B8F88F6 +58E8F6A7DF8AED9153CA90F9C941320750E5C26262BD14CE3CDBA9AED2270546 +24917E378761B5A96F0689511C12A0E598E7BD54A6ABD40AA4FE651AAB9DE733 +88677F863423C714476E797F4A22B94AF646819D91F9612E6E5CCFD9F7D11AB2 +DBDD3C8ED9D257E5A8BE4B7DF9997EB2ED23EBF4BFCBA1993796E34AD93C8CAD +DDEE75EC199BF642C34BA24E323A7099C4B7D232328ED3C7A3BD476FC0B3D921 +8E773970ED221BFD47FC656BD14FEE47F06834C55C0EF960DF0265E847EA4421 +CF81FDFB40A4C997B1EDA3556FCD8BB4EB141EAF4DF853FD353120BBD37D4B44 +2CA1C1D5D8A5626870AAFD925B461A65FA0E2924A197F27B224E53A7140A83C3 +10A7F3868E4801C216EBFC5F8391A1576C69537686DB1CF7F2AE299FB03CF222 +6A38A57466A9C0DC13E9A8200649DA837A6C40E002C25114F0CFB3D2C0A9AF20 +C7B387856AEEE008AD60FA1B26179D95B3486DD3E5BBD096D4B105117418F60B +26AEFDF53A815F712956AFAE0585B243D5A2B4AF5B517023867F57ECE2D538D3 +89804EFA77C0D9CE905A3303F19A9AB3B228A03B88CB26631814A36C27D09E56 +E965514293048ACF6BBAC80329F0422591F06637A274F2582A6BC59ECE5DBB7B +7CB5056822A2426E4359DE632F89734AEB6F783952B007EA1D2EBB7CFB1C1D78 +7EADDF28CA76CE34F78E568B11AA69FAB64D8B0FC933FAD372B9EF19D5F31A25 +35BAF075193980F69141538B7E7586E8DB534762CBD9E95442AD17C8C2F438D4 +DAC23C5F5D772D1809ECEB13809662C6C8B97DCFA5AFD46C6CF3FC6F07BDD604 +5A4C473C7FF3ED34462A79487EB47D5BD4580E98BD44CFF016DCC942E831F7BC +759A345622F5C65C067C83F7474EBEEF62E63F5B49519E0E1A7BA279784977DB +C646DFE8D0AC7D78CD27B8F9D8E18A3A1C1AD427A85401543B0CE4F4469FE14F +BFD02FEBB2050BD06558FEBA3F61D35AE7A0E49639DF68910174F41A20F5C839 +79545CB64FA870FA9AAB20B80CE7D85DB8A0F64915E1742E5835B5152BCD4B89 +4E7BC34E8D8CC93F5DE675090B7BDAD2728022F29D6A7D0F5508A189B8E0CCBB +87AB29B9680978381252A9A37AD5CEBA8E4F8CA2C06D7A2133FF94B3AF05EA7B +0C1497955A4E04183092871E66A7386E063B58764B62C33B6997F2E0D7F4AB76 +6093F606DF3C4E5F8A06E9D602E36F2DF4CA2E8C59EA6F8537A8269EEE427271 +E1FFFFEC053811328AB1FC60821F4C13D277EC66F56F27E0208726C915CBF178 +D2DFBEB767FE08AF1DEF4219F6C97BA5505DA3CF06BCE02E8E5013872DDB0E9B +01103E8F7213F1A00C473349820BA7F202C9F8632B9D7AC4FCC98287175CB2EC +7800B05D4A7617335D1CCC2094F70BA6556A99F2B9365409971DA4BA1913B7E8 +D6D84BBF1CB40FFCBC9B1C6306E9A148F39874A1E2A8FC677EB621FB46304D59 +B982A381886E99BE387640FAEFCE8182A2CC9AC76C1078D9E03CEAFA0747AACE +16F9A95F5A97265A208ABD10C3BF49C1856461B710A29887CB6D57B61D24DDC1 +5DBBFEE1DD43EA93F9B0B70276253A89546A4E3918B5C93A991AD372606F091F +EC35362E95CAAC00280DB8BA15DFA28F9AF7A6F9EC51FB2ADE3D15599AF01627 +B4D96F3D35FC4995EB18DA916FB6D24B56D60084E0CD8A32AB934845FF24B689 +67883D3EAB40BAB8FEBC3C17F6145CE0B96BA50A9ABEC6F1FF955C9FF80DF500 +BEEC7AEEA8C2FAA50968A57FFA5E9AFBAFF08451A63625918621B8FE9A46255C +86B9E145C2526E4D27F974D74221FC90BC691454D7CC6413AEE3321D64E57F58 +81DF5C5954C794492D4135F130855678C8BB7C4A3E3551D2E89F3DF6B049D857 +9115B3697E07024C34985FDAF5EF24210B2864F9471879835FBFED10D7535002 +E806CE05BEC90ACF31E49AA6C62D9E169196A7C358E1AA5C886C1E1544568C2B +500F208319AFCB37CBE4A568136B1791844DB5B627F66C75DBB7FCAAC4EA4620 +323DD1FC501727D74CEEA2C3D1B4D63779120AE0B0843FC978E1EAA6FE4FC337 +46F12F90D6168313CA077B85990EF9C6EB27F71D3B8C262FDBB297B1B88625E4 +62143BD515F6FEFEBAAF35ADF8B57486A14DC57614488C332E2B81B946397168 +1069CE21C21E8F44B2DB9EFC2F4160F17ADC55DA7218DBE64FBD5BABCA4C5718 +9748B61B8F7F9573847E7BB62DCA710100AD39FA555C2C3B3800BCE7C78BA404 +3DBEE48BA6328F47B1E72A507432BE4A7EA3F0AF034B2E29A4CFFAE8B30AF806 +F71936B5FE86F73F9C4B81123E1AE017B60EB2EB108EAC9579F3EF142CEEC861 +EAECCABA38C637306D8379C02548B4B33FB5D8A6169B3899A2D0499899946371 +BCD7D8D37924B66E4DFDF25ECD17408AA78A9A1D1C8A3615E428EDAE3E56017A +0C2CD79A0D92E6DDC54746E5095B4659D73A251F3B7FD7625CE7EAC3EFB61409 +C1463D4015619BA3746F278188E2F30F997D477491D39625C2B829845D4EA97E +56D7F3883CDD5938BF1BDCA2DF5BBD0E3D495554A01840E7E7A081A736DF6D7E +6BDD580F717261F6A3953157DA05AA3B57FBB1E977C6A43555F7BDFCB35C8B8E +B6356A4F1B01317B029918AB1C0400CD32A41515CA55E59CDC9C4641A570DA65 +96FA304094735B8B070FCDBA01DABC55C493A390F3A0B60D31C6EE3176BD5257 +F6CFCD17682833155B9DE734CE94A232BF9FD8AA45C35DCC0B16FEE6EC241BC1 +E944B183ACFFCBA57219D6BD9132E9610780D4AB07FB2F77428114E800CB5855 +0C26502E4B09AD0EC8A4B342DA732E24CBCBC7BEB15322BC3A4B004CB9652D27 +B85525C0E59DF15D972EE00D5D6DCDDE1A141DEDF0BF9309463C7D5D0D95077C +F41EACAFA40CBA65004AC680983DB2CC892C1089A58514051E2C0FC16D74056B +34151DCA72FADD08765BF73139A2A15A46067064490DAC5AB5039C545DE452F7 +35416482DD79C77BD0256D6BE9005C80902D9BE36F06FA4431F1DFBA7C982C66 +E141DA88A07902D83D1A83C0538DF2F8F8719409259196EC46B9D7815E17F836 +4F06E024C1A05A594BCC8C7489B3DE9E9C3B9D2D15B8149F6D09A35A8444CE1C +704E2B8F273FAD8128A6033E871F1A36B95969EF3EA5EE8DE9B2720FED92D43A +B894DFB54E6F3E4D92E18AFD7B4D72FD675AB7447729F4F618FAC4938ABBE9BF +29045FD578CFEDE3BAFA55419C564CE39F324592304FF7B339DC2D889C157BE3 +A182E42DBCB6BEA7773CE2A058EE2076C77CC98F0C37CE8128E1671D8BD8AEB3 +1E724BE5297AEF6F8F90719D75E2218470034C970C7C3BC4CE46234CF25F3092 +526AD39838F4DD2399A4DE9BE341EA932FC616B02FBFE7EC68AD6E98F5AB3040 +C00C615ED7C7D427387D5AA99594EAFD54D3CE88DEEAB0A408C14B48217D73B7 +AAFF60D219FC71262E05BF9D15DA7739FAB52683D27A3E094B40D84E3C272D26 +F9CC125000AADA491137363EEBDE57EF302943F26E7DE08EC71707B62E717F92 +BE14CB7F5D4FF8A802030B10FA8AB4D93286AC064E0547032E2AAFA3E353F4A2 +4B3EA80EF4221C81BA5698D58A460C0412B1C1BF143E547DCA6CCA584011B55F +526742925DBE8300564D621015796CD280DE573A0A733C5F6B2D4AD811EE4778 +FE60F46ACF6B6943B07B0EB0E4636823430A301B06BE688CC24785A8896BCD42 +39B97D9963BB74BD8BF05217B615983E27994FBEDB0577010E46BCAA04DB1A72 +77F4ED8257D145EC44B2B65B408BC71239F1C2E8434C1C2FEE4642BEA1C60C7A +F02BF44140D0DA3E94D7658312A212FABFC0AA74F3512D513E82248BACD86A15 +B5A2C71F3692C8D702FA11B262ECE33B382C681D54BC275FBAB326D928A6A327 +AB2ABFF6C4A65339D945A671AD839DEACA7412ACA3253B399BA17E363B213FCC +962725E0BD8CCE55985438700204353C507E4DB96C1B57DD7A071124476A5095 +BDA4C678F514AA63CADCF7003C73F0C505590526C0D1BCD7DAC0236243AEE48A +5F351E12194DE6754336416227A63FE6C37D472EA1688AFD88FC94922094E799 +930F9952B2B1B86D1436C843A90AA230139B82449E16EA8B29108AA624933D1F +5BB7E1EC1E7F570BD1DC0D2A9C338F4590D590AFE417D289B103E11156D66DEF +F9E1F1F3A68DF07D69FB9CF4D09F2E2D47C2168E0BCECB8BA1CF856826B51D23 +D440D7EE177DC922BA367BC69871D037A508B80E75F43C331F7BB5FC96493932 +0B3CA39DB05BB29C08348C3F0FAC71ADA5C07BCFD160FE677A8A030BDE2C4A6C +A866D89CAFBFE647B36F7931664F82997CBFDECB6F88C795609D1C94DC80F09A +87221FDA3A699D0748F97E682B5B8C7B1EBA75BD44070DDBECB03824F9EA4E1B +BC66A08A1A0F8AA3DC482D408C83B469315A2ABA685726CEA99BC3D15799D28D +F81E0BB958E34A1670C23FCEE68A0DADD2BE3CFCC1914A9FA1B1A661693ADFC6 +378969C2E400E5D4AB0CB7DC0FA364893D2484DA98264CB50205B7B9A2532492 +81A2697B7FA4FC77E71D3117608ED7C474AA2FFEE8B3F1DD942CB16A1FF06C6F +3741AF6972D09A5EDA91B4EDE291A7B3E3D481005BB578DC5AF13C88EEE51380 +78E57D8E073FA46B89A1DD73D51AB11B44048CE2F031031018697B2DA15BB05E +B69E9E54F85E09EE3EBCFF390A9CF28B6F0932A46C9306911F2F36B8CA3ABC14 +022697A6BC560C0A688BD1E49AA9F9CF4917130ECF08F8C500E0096A8BE65E01 +EE5A2618E3C9DDD1D227EB584EB0763C6294B91DADC65AA8F1DB42BA25E77B9B +AAAABEC083135CC61C18987128961505D602E409C3DB90F301CE2C792AB7ABD8 +1B7442AB1C8D5B1FB5AB30444752254A530B227A1E7CBC615B045031FB07468D +DADBE63C9D1AC6F9742738FCF2896ECE73C131063E6FB3B954A77D1CD1F5764E +3D65A43B627E8E7E10C5966C93E9794A3211D8B349D7F82427A65DA39B4AD1AE +A98733594453F400B9841AD3207DF9A908372B8B7F8EAC363D0DDFB90411A468 +1F3F0E7A8DE83F3CEC745BF43D341A20F53BD0667B70613FDB9B1379FA61BC9E +516118F7B1DC7A7B049E116A7A254F0A363694920EA156DF045038B14C229E6D +19417309B6DFF125580B5279D6CAE9AACA31A1D21AAEA8DE32180F3456AF61E8 +AE8011BFA62D7B5A8123A02131D2F622211D74F104CD729CBE44EBC70672C064 +6D8CE2956C78B8CAF172B77E78F715DDA875A492CDD8357CB3AA3ED817043631 +0D278C6AB079AEC3C765D5E0267BD01C1D3F7AAACD0CF34EF8DD2FC5FF8FE85D +E410CBDCE53C792C0ED5092162DB85E6465C058D95816008077E22EB8A98B8D2 +5A4069933FD3F3DE33926152C7DC712807784C17863EC78F9FD11A335BF8C700 +F4963F7C1A72505DB453012507A3EE51F7F2E814CB77769356C7654B9569B68D +36C1EBCFACDF5C8D91D664820758BA73A83EA9660E33D4589C6950CC5C612710 +E9E97BEB5CB43F4109FC0F9E5EA126C1A9F2C4617CA146013F01E810EED40041 +5D09159A5B53FAF73B151499CF4BA3B79A19034CE461298D1B805E161CE837C1 +AE9A7298DB9DD9E54C347E64772AF100A5C736173D5D9EF4C45B8FF6B0ECA17D +C1ED7FA96FAC530778D72CAB4D9920BC6C137EB3187B1DEE669419753B6472C4 +D29CF8ECD1D43AC03DB1413FE6D4A883857E2574C68AEC9AC7F7D3173E9EA7AD +1A8762EB2841D29BA98B8C59BF52ADB41A1C06A50FA66C169605BF950AFFFED3 +6CF7FEE0126C0AF7DD7A85796BE7D93A124581EF530AA62DF4CB06A15A17D5E3 +F6B6B72CD7481D238B2EF97123EE55872A43599ADCD48443DD9DFBFD469C71D2 +624FE39A15FB5CC331E29B20DD1994FDBADF7E2843ADFEFFB38AF6E727638848 +4BB02352C312A363C3920604853550205484499FE4B1D8A29A4913F440E37CBA +9CFE762651749B33BA532DDFEBA257869BE4585699ED7E918FF72D25F3EC0C71 +FC49EF6C38DD1105AE50D5DC13F6F1AE2FC3264C549FB4D8D1A959F25DFE913C +1ABC41ECBB5B538BA1C4870E73599BA518FF41B6445D40C9B9BDAC2D552E4533 +670DE0C40C155E46AEDF4B74BD44A521815B69981F4F33EBB774391320D8B6DB +AD9C9545557E21A90EA55CFA69B967F3E136CCA7A1E4C9D312D9D08940DECDC9 +1CF646FB7704DFDF783BBB1739DA1D2EF502B7B3A1FBEAD958DC99F086E6B623 +F33ADC3A758138E47EA3DE1FEC42EBC6D675C658B9AAA4C4054B1F81CCC4D216 +9559BDFD542140F2A101095F2B3FFEA124F407A8B650032265A48F065C3C5BD9 +66D843E3A2BA4CD7BF56A6A10D90345B51969A03DF45C91EBC2F3023A3E71B4A +B6A7DADD9E3EC5C70207F743157A9A0ECE23A7A95798C2174281A7900919878D +955EBCA90D02F07876BC3F5EB1252A82D891FB3E0FB9FC032080E6F700981030 +0E81FC3E75AC8623405CCAFA66161D5D471EA952F0FD4021754CB61A7B1445AC +0547EBD4D78F141651A5DEA6262F0A05559DEFD434C5485FFBEEE7DA647AFECD +6468D4D3905576FC4F670BA39F9956149CC371A31ACA929CAF0668B667DC2CF1 +8810C6CF9EA23CD5576C110183155DBF15F24CF0973532800274127C6C5C9C79 +EB121C5F0B74D824DDFA3EC4BD7BBB8799875B8A4776B60F840AE96A8F65724F +AAC3BB862EA6F8697D935C60C2DF962F042521BB1D3EB9C064F2CBFD84208D94 +0E9DD9242157F4D3DB05194E82FAD5EF8C09092055463620D1B4ACE3BF9CFDC4 +989840A2CE7BF62D69BBC387D0184EBD87755E4DCEB8296D1005E79779A19B14 +354345A8A0324F1E61D88A22BC423D3DB4686ACB6CCA3CC515B6A5CCA6C888FD +EC2CCB767778AE3FFD7ECBD8BF1828E5BDDF119247F11B299D5272C475C67113 +8F124D25A87AD26E8B7713A5189FDD920EAFC2D9069664744B6E7DE1AB20E798 +8BF9B8885BED5CBAB904032F6245AC752F392524C2FE09F636B59B17ACCE1E56 +ECDE4533FEE75C6ACA81D3FD7F6032B865D8B6F34DF1A99E01FB6534659921FB +81631346B4530CC2E6B15389D7D494A4851C5F7CB502B394E840ECB67D359B77 +E940F25E96B3AA4DBFB0689C0C8D41EBFB5A9ABF7B817AC487093BA1013E345F +B42647E031C22B77A319062324A7BBFDC9DAB8D5B1E0FA4FBF8036AD46E554F9 +6B925144323B7A79B103E808A43954DB3A03120EE5BF48438C0ED2807DE82FF1 +6800AA8EEEA5C70DE747B76246A437B09F402C8E1B545636E0860F670D10E42D +9A579DEFDAFC447917E0AE0AD49F49EFEEAD72A83149A22A82F909670FDF4A9A +B106147A6CD6D9CA4FD64191B7883E89C30FFC30D3262B9B09CD7D2440D85F28 +983B191CEDBCDBC06375195625EB247DAF10FC3F01259E59184F462B79592181 +DF37D70E698785E55E0810FC9A5094CA115B2067FBEE8ECB004856C68A18AE7C +9BB1186342D173068A4BD0020FC703BC1AE0D6C8EF419288D7D0F09042C5CAC3 +6DDFFAF9A79B811C55F41AC87F93DF99604165A6D6E5938016C155EC65393512 +EF633ED422AD5BF8C66AD82B3B2B0FC59F40ACA8B62B2195D84478F920C39EFC +328C9EEAB999D28CB365ABA1A99475D57D5BE151E107BCA6C65D535D8E83EF91 +35EC4BBDC0C5A124CE24ED6438F2103FA03BC103F899CC0E12428A807763DDC6 +CD11E4E11749145810B387906A7B3065BCF1E29A1815ED266DB7A429C3FB2860 +AF3305E4FE74E02626385FAB8833954B803CFF6231810CA8CE55EDB2DC2B1548 +82CFD8F105CC916B0A55E3955BEF60680B544501937E9A6FBDFF46E12B114967 +2066512D019B1D727D3759A708E5D8D8FCD99AEB82B3F660602F8BAF091A7AE9 +ECBF15E7720F671E85C5FE0F2871CE1EC0A7B8E923EDD845F6C8F8CEACC70DDD +B2F87D25890FF1DB39BFF89A3A35B8B14742B4571F412CDF868177E406C9D07D +B759D6D32A7CE22D9E9FD13802A170F20E9FD757B9DA76B12712FF6DD0E8F4E7 +4A296ED2795FFA5A0C3CE468C7A9CCA440C599C207BB084B1DEE83817A7F23EA +1A4ECF72B3786D72D12FE3123D33559793046B7773C9E93AC1172026014A1917 +4B66A90C5AF50072C231F0B633F00EFED86156FF0FBD451C161DD06EDF438A38 +91FA7FFBA022A4468296A7132A3D88AC243B69C70F21B7AEB32BB5AA21800620 +BE6C8116466BB843FEBE361D1DE93F7C38033C95EBFA922FCC45E812B48B1A23 +C33DE814EE885A2354B37C05E405D27A0D3870E19CC718284FDD45F7926758DC +62D79AC3C0EAF56B6812049148970442ABD34E0C0F49A6711A134C5568004C24 +F92B455E8085D77F48ECE5FE9F27FA91379C939919E78B60A54E235B0936B3F0 +E1300BB4CBFD05A18DBBBD76524B4084D54D990F5EA51E5670906E358B4977C1 +83A7124F6BC09AEC282DB90C2FCCD9D909B57959E6E68D2E50344100EB1B6BD0 +1A1FF2C2F0B250AC9B1FFB4A4EF3F28C022F7F873C7B3AF76E1830C9B039154F +B3C3BD97DB32958B718D53B552A7A0B033E84EE515B42184A22A10D77FFE32EC +0E1CD1708021D7931DC73448FB098A61C93B7D03F98465BA42D4B927AB115C49 +C0CB10C0BD55B16E6BA017306506D3D610ABECFA480D8840DAAF23CA03AFD9CF +1075C8E9B821499DE23D4882C081D51649E5C9BBFF1431057D95D61351287B03 +0C9A6BD89F33C02555E1D3DA7F03CC395C1E3633FC902F060DF903FC96C19719 +A5B6A39E +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMTT9 +%!PS-AdobeFont-1.0: CMTT9 003.002 +%%Title: CMTT9 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMTT9. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMTT9 known{/CMTT9 findfont dup/UniqueID known{dup +/UniqueID get 5000831 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMTT9 def +/FontBBox {-6 -233 542 698 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMTT9.) readonly def +/FullName (CMTT9) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch true def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 33 /exclam put +dup 35 /numbersign put +dup 36 /dollar put +dup 38 /ampersand put +dup 39 /quoteright put +dup 40 /parenleft put +dup 41 /parenright put +dup 42 /asterisk put +dup 44 /comma put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 58 /colon put +dup 59 /semicolon put +dup 60 /less put +dup 62 /greater put +dup 63 /question put +dup 64 /at put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 90 /Z put +dup 91 /bracketleft put +dup 93 /bracketright put +dup 94 /asciicircum put +dup 95 /underscore put +dup 96 /quoteleft put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +dup 123 /braceleft put +dup 125 /braceright put +dup 126 /asciitilde put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794DDF2E6BABDA4215500A0 +42D1A3D0D02C0C98BB1D6ED0B7791274C38B038FC7921FF1FB8FAE7258C09259 +4B8E1BD9EDCEDE9ADAD9BD9598EEA9691589649A9A21539161E374075BEE3457 +689F308A4A7AC9F2FE4B301A6C36B0442FB92E3B002623493DC087800B5A0521 +0DB96A23175AC584DE166F59142779F26FEE9783E28DE49FC3A8D6583EE63FBA +610DA773CA18ACE6F64A4867A1A7817120ABF9DE4D17782866E6CB6B65A9F6D8 +3667C8D3E61E5356E35343FDD4C6436DF73934470916CB5F0ECEA6BFF092E735 +C7C355B56189D1DD5715EC97E50145FFC17BB1497315A9585D713A7A6DFC7933 +995468EFD0F59E3C15865B87925A3F2930E20D5A35970E2C44F1629FA16E00EE +EE21EFC50D49F5BC02300D0A7BB85E649CB4E2E828C8B1C5469463013E71D723 +2CB11BCBAC191AC751A2AF7FC228395CE9472DC1809052012AEC2CD66695DAF0 +4CA04234F0187F4116C93F59A7F1F8123DE87F111853B785A20CA8B49B3B0CEC +B11AD345E1A11578D2EFEB0536D125237086CC8CD9F34A5137AC5DDFD8746014 +D74AAE8239B81ACF65F379CF2153B06A238A2D767F294CAE0D79228F0B7D45CE +510AC9657A1776202FEF42F96D476E7DF407786AEA12DEA0013D3B4C5D0640F5 +BC5BB72C34066270399CE595827175B23B25072723BD24E07F6BCD9EF0175DEF +93714BAA53960F81103CFB731CED4A267B53727BCA3C97B0BA5004055D4EF0EC +F725658E53AC86E4061B489AD4154915C3981B3B703E1E2A8D390CCECCA99385 +45EBE35441B062D7D12DAB2B31569387187D74A4043FD71F1C6D352EAE0F6757 +4345FBFB6DB15CAE47CAC4BAE47AECAE5FF5EC19057DCEFA1B23F47364ABDF47 +088A7C6A2AE26B10459B6D41CB69182FD1472F326CE3A15B59255D1DE3B616D8 +9D1F12561038839781E657C896B8C58A32DF5AEA23732A0966D96C68C988ED7A +09B7E2C8F9F3D0D56879764781566299A4EDD3588BDF70E3D924D25074F30988 +E35BDD827AE4D0B4A06F55A9976BF0DB3C0B1D09CD08E8CB168B50617691638C +0EC1A791C228177D4FFB021EC3DF5082CA3487AD2EFC8DE9466A690ADDB4C52A +FE2A6DB4CC275CD33D9136E735279FBB2008D59E667905EBB04326EC33C98B2C +94744B7F540D86E90DED64572ECF1EAD3A58EC101642B245A9C7232DC8FB8741 +03F97883BB32FB955C22F878FA0FD114451A3B3859B0B5537AFAB73AEC7DB2BF +409E1FB41D473714F6BEA73CB085139879FA31710E01915C2938C37BAD6D7D71 +45B897E00857D3931A489EAC7B42BCE4E65F73F67FE027CE482DC47598ABCB95 +39E98DA8ECA3E23F0799D5963ABA6E2984DEACBE7B46B40ADC6213E0F4D08971 +58F68C946C748E4B4217CBA2391BE2086C9758F4E32C9B6413E48D84D33A6E85 +84747029C0A9C9B92841D217A902BA8EB333999D62FDA9F82BFC8ED11F67988A +0CAE42182E414A9766AFFF4B046A09D476F8E3F15A8C7829BEE982D8350BDF5F +F215F2BBBF68D4B567BAB798B9604C79306C475926E9FEC0F07A99F43473C6FD +B15AC29C3D07FEBAD1BAFF75AAF2FBE94F104F1DBF838044FAD94B661B06AECD +D9AEBD02B60CA4546DD6B5B5C1A3833ED07845671CEFCA8955CE0DE5DB8FC93B +3306683CBFB8E5B79A863DE78D455DE9D592043C2686F88A43140F8B9F3B553B +7047420E93E753829F8D47AC7621CFE3626F271E31F0019CC02D0B57F67BB47D +8CFB63E902EA3231C00EC66EEC0D30FE8394558BD3535C888C4CEFC6EB72E737 +712ADC6300162D5D79BEE0CA1F6E4127A0BC90656C01692F6D82C85550AFC97E +C2693E379160FDB9636FA41AE9C75B7F6643B05971C6D67CE30971D590FC07B3 +E0B36B4D1C7F25110B5DA2130D574FA292B47322975A2BADBDB39AAE69BDDBDA +A880F9AAB580117708C79204DFFDC08BF4A48919B5C22228845CE8C3109E93AC +2479E523B8A1C12A6E541118F121DC6B4EAED83491A03192D5C3A2A45D1A2467 +757E7B377C635CF5CAE11A7CB49D49F3A1BB2286090B5F0E4F89869D1771D50C +54B5C5E091E3048A2C194F0ED00DD64FB95BAC6FA9D61ECD093ED416DA3A4981 +DB07CFF17C4F55C62DF628EBFF06FAC3F3D3F91C30EBB34052BE1A08F5EDA4B9 +08977197950A282B84E21D43C64BE3AE4BCE22C70E7D392DE09D89B7F23351AD +6AD37225C12BA79EC9951F5DA1E505DB26200190ADE0E549305B7530CB86EFD2 +A896F13A97E51754F70B609CB4511CEFC38BA579C071E9510A49982389980DC5 +336D6C4A2DB100DFEC4055C7AA9C55880F94FBEA9EB280BEF66CB8E1E38A359D +E5AFB12B540CD599085ADDA7FC2C72E7C873015773FFEECA2C596B75BC39A3EB +3C43FA2E53C0D7993042F3D652BCC483E48B7F6C94C3FF6D38E276086A6AE67A +E5A571B9C72E0D7824E0BC2ADF51A393B9E334649F786EC1923C854382B89627 +1B9E701AE5A6C42E672B2C6A33C8BBCA8F69B9061E787D6B92183F20CF4C3903 +FF5417427B84798C82BE28D2C81624E3920CA61EC9EADB364B5A6E50E49A1A72 +A9A090A1FCD84814B8B2708AD787D2B5015DA1305874F58C5EB62F843685FCB6 +465FCA80176CAB2B2FE65E0A270BCE1E3DB97564BEDFAE5CA44395A8DF4505C0 +3E103CC3B914359B2870DA6CD30382EAE8949131CFE31E9E75C3E47A3834BB32 +CF183D4A8B9001710D0A11390C9DAD116196568591D38C2AF4ADD852F31494EF +573462759A35415900360882739789D6B89ACEFA251C5ED90ED704DD7C3C80CA +9F6CDED69537D201D520C99E69EEAD5D3C0EB84C166660B3C190166D93EDFE6D +15BCB6DC5CDCA825E48D33845CC2FB15291AAB823F25CF8BB0A1EAED8BEC524D +D9CA016027141FAC9D35B64FB9C224552F29EF6B32497254E319090E698FD8A5 +15491CDFE1B988C79A0E3B9D01E12FF084E9FA86CCAE02A3EE6F2917B61A2CC1 +64B8CAF309D1AB48A34227A7729DFF99CB6EC282E3FAEDD2673779AA7E4C1789 +D93FDC37FE95F087C5F88F53D30A2DA9C913BF205FC6BDD060A40184F4AAEB3C +D080D63B89CA3DEFF310D09EF0A83F3914BD5B7932980ECE139EF0313C20B4C8 +576EE0FE3F28FAF4D3CE7CD0890BC824A85B8EF4636BDF1EF1BB519F93D36540 +ED09FAF93FD71992CA2CE2E83F5355162ECEB32AD218092F45D5A61A44E67135 +EF0453589CECDC6962D0E8DA7E7567603BAF50B2C8F1CA65EA5320984E7D69AC +9A7D3D7F92565D79E8C9DD2D92CCA7DE9CD058545E9F98AA47904D70E1897099 +3C4C852B3BA131DDD348433C336BDF5FBDFB62120DDEAEB3255E3207B0C84A0A +1ECF9EC869DB9BFA3693B03FCB27C5A5D3CDD62630DEDE91B4DD5B9784BF0BDD +FC6EEC3FA7ACA9E15FAE47CDD9B7FCD2BF0EFA10716F08C0AF25FF67CB6F9598 +C607D2FCA452417D2C69DC808A9441A66492394C3450BD30632AE739EAD654BA +4343459CA36B6D5B2C12C39495952F2EF93D82C73E33236785A79609E260C4E0 +CF3A3C950DE71DDC3939D42DB1CB1CA917CEAD56979A70F8F3B207C805319FA7 +3C000AE2B21D711A6D78C7BFB901334DC06F59EAB6D94B507734C27971F8458D +D00193645AB92FB8FE163D5C51AE4F40BDB4F2C51691E76EE0636F071F37AAA9 +BA78BD12459CA499210EB0CE2F8BD317387797C33F5933AE7A6264DA06B4A6A6 +1188326147A16B205D1F965872DED7D8EDB3294FAD2FCDF0D423329E9CCF879D +4E0B966D509F45527F7609DD09694D286F6FF7535EF8971B7DFBAF608A19D442 +C133207EB1152ABBD11C455D0977F66A9B73E51381D1CA4B66E87C0C7175A63D +80C699A052F00C41DAEF42E7A40E07B1B14107AB0787E24E17C1462960E3C54C +AE73BE4924464FB177EC62F116B2822842541543EFF7ABDDEE197D6BD8F8D4E6 +59175D8C5957550B70BE775AD52FFF6E7C00DA7CDC16E1DF7446BB5D8FD82647 +3E9F87D5EA365C82A2D991321ECB14A9E3AEADC5A56665DF7072D6DAE402BCB6 +14D92B17F9E063E4E9D8D239C91F5C7C0BCD2FBD936C9D4A0B57659420343B59 +B395BBD1AB5B6003F653699D57E7581F9813CC98D4F072FB78899D6DECC42D34 +F2787EDEA64058B46C4BFAA2BB96E9BE5CACE8D91E4C080ADFC0FA0D4A29C6B8 +54FEA9E11DBCF53D9CA40A21AE5076451EDAB3593E56B6D453DC8EAB8C78B588 +34D4C4F36861B5649BC1E9F3091E704BDA7613ED45C911DFECA74EEA05165191 +825F95A947CAF382FBAF01F3B8B041ACCDF39718D7DC5BA6CA12BB20EEE96439 +BF2E2628AA3BD2C91998E6247A690FCB0CC95F286F427345CC4F1115BA3A6E54 +4743355F2CC991CBDFF5725902C1F5A6DEFDC8638A26EA456C33C27773D6214F +66536CD2E44FD253531732D5A8C44B336B1BB47B0477350EB8CF74889B93402E +2356A9CAAFCA562315D8E0B3F42F08932CB87BA2499A875AFA08D11DA73B38AF +F46D03B7F639A8D7BF88CF07FFF4E91716DCCE6E2CCAB60A64D5E40EFD8B336A +1BFCC4CB04F49DE1FBDE7AA5B2092A6EDBD913D161A3271AB6411622D0E14416 +37F81E0102F5B0F2F9A2B27819E4BACD7C50E29D6291AE5B0973C657761545A6 +741729620EF2BF1046B3913399C10982EE5F4142CF461EA31042E432CC79A1A1 +39C607D22E45A6DEC008CB4BF6007CDE9DD5802B49A62C8E02A6D448B64177CC +887AD71D171B99E7ABE2085B37D90B3BD8513995D9A57F53184DA474F6DB5E49 +B73E04CC214EA5398DF7D7541F94E623E8687B511640457A48A68E9D9D6584CD +15B57CC044D8091C771D175F2EEDD411099BC8F7B4317DC503BB5E405AEEB526 +5E6E1B1F2705275D274E012A98F66075CEB90AFC648B964DDC0E9C4AE7B24CE1 +80B051022E5781A533A21DCFB97893847D685137EAD85BA708A7E118C72FA839 +A9E460B5D17365A0AF1F53A98319FB64A5819B087F554BC056C4BE44113A5404 +BEF759F890C1CA5E7AE156F4F8106FDB4F8DFCCC640976983EADB30976344048 +2A86D7B2AF4A01CA736B98D52ACE392AD4BECE7E61C710B08B66F01857CA460B +B8376E257113E10F6DEDF14CE2A4E6A99ECBCD302C36CADB713D849EAE9EB598 +F29DC98531D793B79F83091F9B136809E006F34E423D528CC4309AFFB3EEB47B +9A9DE4D5B25CE953345C326BCBE2B4912641780637783084D3D12693F8135483 +CBB0AC4EE0B5610D7CEB7DF205830BDB9BB404DC1B28FB0824CC187B26C19A91 +DA0025EC739BF3993700101D042DED86D67F5FB87912CFC51AA7DF53F2162D62 +6314A2CE13810D0B8D81F45771391A236422CFA0F35F7A0CDF14ACB2724AA57B +7C2C28D53029B1146558610E0CFBBF72A85AB9BA308F846228F299F13F68E8F7 +D963B2EE9EF7D4C21690632B640BDDAD0556EFA4EFBF035F13377ABB5CBC280B +9E0C12AACB153C93351E5BA95A7D149010E204950A59C7FC6581D9703468C1E9 +EFAE37E7E6ACB892B3F8D1248D9A4A72F642FECC5E0B25C15EEB921EDDE84D12 +0E524FE6133C4921FF4921242392C12FBE69744D53739F7E849C1B96C4020AB2 +1FF10DEA608F111749E2FBD8DBCB17F353DCB3075B4F4B8186963EFE95A76A10 +85AA5BB6DB4095291974221829A8E436680F4860E01C3843BE5BB3101D0869C0 +EFCE08D187BC04F58C7A450A59093680A0F09E8E3F12DF5223E7EAFEFA01978F +D8354753A68022CC92C71F2CA732DADAA8A466D4AAE5999B0DC077715671F518 +E6277741F44AE798EE50DF44CCF71FCF8BC71F76374005FEBC4883C6EDA854B0 +88C0C2B476709AA809ECE41AE786DB1A32B3FBBCC14921673578D3514C8CA842 +E1FF90BE33F7B93ADF6BFB8B1AFBBD080783BEF056A6BFAEF676F7BF9F2DFCC8 +01D255A9F0391951210D60D4D4DCA93AA858B38C0D7B8FD740D5FC6F277C2A68 +54CC2DE1F40B6347201FCA2A0A91822708D820CE645C3E4E5A09FE25721AB33A +97871ED448F38FC5A349D81F402B34461D840D5768BFC6849439AB6115104F78 +B87115B1DAE12542EA898F86ACE247709817850B067F537E6137196101D46DD2 +D842EA03EF4501E34074E8458E638ACC4EB349A7430AB035BEF2DD4CE00554F9 +18F9FE32A55AC1E7E50D64AAFDA278D77A7149C59DC5B1E3064A4B281A54C9CE +A5EA94ABEAE4C6D5674C208ABC72563976487136AF2E21F835BEFD232D7F0D13 +1D19932367F51D5379934DA7F1635AC51EE5CEBFA63D4D32F018DEF13624EE62 +31DAE68A08DBE3B4FDAAFC75291C8C6CC7A657E3C7453C7D1461A36E88E633D5 +408253B673AD87A9FB2D0F56DF1305916D14D5DD62051E27BCE09CEE9A1F14AF +1D7164BA5FB6E6EC8D38750F7E28BE330909F303ECDEE692E347DE13C8C2F82E +29C8BE6EFD76546F362A12A1C2DC12389EA95ACB4DCBE95620F0C193EAD91B33 +BAAC5801AE827B9AB3FCE5D11D1D7854F8FA8A31670119CC0CA98628F801838B +AAC7EF90AC5466BE69CE3E3CD9951A5EB9AC08014285422F6DA6F6E221BB30F8 +0042A11F2E4B765BB0D142AD52F4D85785EA71B2E1CE20728B9E9306CE93268D +99B822A5AB5232EC7E26EE1160850AD3905864A01357F22722B6A54D4EBE58CE +480EAD9FBF068EE965AC4B5FD2FA8CCB91ECFC6E90B9C49268CA0B0FDAD23ADC +D5A74B41149BB08454054C451AD0DA4CCF8B60F2EBD061AA03A011D548B6B481 +FAB00AF9225BB5463F27FD67333FB51F8664536267E95CFAA0BE3BC1B8F889CB +587A3A4FA2B45864F07E11372C9507A625C0030EF7030A0B4D931BCC48F6DD51 +A4D1F63FDC4B59C1CB18E6242E9F4B4B8AD9755B870FE60D640181FB7EB8120C +C56F51DC8C47FCC6318C2145EDCBEFA7BC4253315BA67FD2B3D4AF6A9F3F229C +AB75B592EADE15B1FB5FDBA1C0F786BD21A51506B7A2E42C2D086BA6F84D1B3D +AC7531545F0B01346831FF36A52CAC1E390F99AEDC265B44B0FC9C581BBA6BE4 +48B723811EBCAEA5FEFAEA7E5B987F2C7B3E9A65D2D14A7B74F099401C57E367 +385352D0776D2A908F7A5A2E4D4160946C5591397877025C8C387CA413EFED56 +8B142E8341E349DB4DBA422A4FEE56A573972A0C66590175158E48850A9F7F38 +4B95726787B8F969FDBC97491CC81CABC976CD00A27D1DFCA7CF467A956C1C6C +839817AEF8794B6151FAE9261119DD5DB787DC9D3B420FD325ED6599FACADE0C +320D54C2E0D296537E22C1783670A9D9BECAEC63853EC2F05A990260DC189D63 +7CCC0BDDF2CF7585071ABAC14630666737041194D0777EA4292AE60BD7F7100E +DB568C90F0D899EA006CA423CFFD6EC70A5D3D8AC43C747DBAD3B02219E47D8D +DE030631F4678C357A58ECC52782B31B50CFD44EC33F41585E51B27E3997D33F +461BEF897220AEC80007F13C5A1EE3A0430CA899047DF944831F8B010A7DE74A +BFD26001472DC00CDC9F17CC435F61ADAD4E9AE062ED477FC621FDDF9242C449 +1BB3F77FDD1519A251B663A693D84B42BF0962F537757F38CE5C5D56B98AB10A +3B70C8AE8D52DCAFCEC22E7B09D3C4EFDA1841C74CA975E4F8294F7BDC796500 +0ABE197ED3737A65F7BAE601C91DB3983EAE11DA3EA18ABBBA3650DC361C2E77 +EF9F97618B0C337A906FF39926D2B0B7883ABBA650816C4C6B34EEA836994EEA +AFEDDE56E0099D0E09EB88EB093544B9BF4871200746A0409C475FC4232A38D8 +F3105B0FF44E4F132378DD12D9E796412FD0F9478322215E9F59E69396C35AC4 +097C4995B2C3BAB2DD04B1A7097DE16DFDD76465E79ADEEBA90489ADD0914EBA +53E11A43ECB11D072C68D2131BE1C7C43CB9DD5FBA0A67BA43D6851AD4CD3BC7 +39AE2E22CCC183A56CEB71D4F9F578518E376426E42B6390426A8434B5A83E78 +77A5B9963BAECD5FA5521C2A29418764E4EC1A72462B04957F823E2817A7F8D0 +1512919889500024B1C42EC107E8B8533C0B314EE4E23313A4C1BDB009A2073F +9BAB479A3F9DA76CCD65629CCEF78015ADBC2D0D124B3BB2D322FC4D209E417D +84BC3C758B6AB64A01E25C9C7B71D741AF90A19A339F99A0BE9FC39622F04C6F +737474CFEC19C890A657BCE192B9DCD8F273CDC5294875DD4507DC5723EBB357 +73DB0933927DC21081E67E5DCF4E41FAA6E00E8DF04128F86348FB0718068FA9 +918319C4EE9D090CDF348153B6CC48648C55E889B4FFD3D75466F1B50C437546 +7DD9CF20980B148F60BB146402DC0732A27F255DCB859CFB6F9D329C12FB14A6 +7824D6DE27B03FF85BC59703A5D6C5B7D1CEBCF3C3FCD71D6D6F0311E41BF8BF +0609D23C84720FA9EAC961C9D49C2E962D9618C32BAFBAA8CAB0B2F616E57DA6 +8CB44C5595A22377B28599F7D34A3BEA4173E1D31A2A6C5670D1F026EE2092A1 +DD0D2BBACAB46E5B0A7113B1BC379709C5870981E482E01EE3D16AF9ACF1A5D8 +7ABDB4BA5C3B13AF047826F360C8892642B482C3C61FAC97F332888AE156B35C +5C8415A75B4F0F25F8E95BC4102FEB4A8287C544C99778EB0C163C22481F615B +0004F764FB7CCB01AE01A614AFC9650D3934F748E8785416BBC89F66C696AF5B +B5F6F125F115241728D85E7159FCDBB10B64598249BB0E6FF1AF845B0A2370AE +E6A973023FCAC4BB6158D48B0C928ABC4E29A0DD611D0F5266AAC8239064C266 +82D4D33B032418967406BC98156CFCE1F091F733D8BAB9523690B4D6765DBADC +210E814DB8715A269474EC0501CF66FA0D8FD224EDDE93AF243032E73714F730 +FB382372C0F9B9372450FA6F13689C9429EDE1A105F234B216263A7D0A917A15 +D1FC128580A16B5572436E398C353A0EC62539CAA188901FC30DF7511C1BF6E3 +B462203AE937653C4562FFFF03078EE7A184F554E6F01932AFD07722A00E50BB +2D2BB785961F76273A16CEEB0EE833DFE14BBA539CC7E48F67A9D20C94283137 +BE84025E86C714DC9C6FD7CE4D1D0C50B6EDC79E066521FDFAB6285C83A68B4E +B1A119875B4E45BF5403950A25286214CB4183C345173F72E6ACFEA5C13B4D2D +FD12BD235193EE6BB66519B553CD963EDD68E7EF9439DF0411C8193ACB183C09 +4143657304B1BE2AB8D2D0203E677FA1DD01152D2ECF9D987B16C3FE0B3F5F12 +5C920243E1CB5FDCBE97DF55102EDED12811F3F7165F4FE1F6FD5A6BA809824C +041FF9441529509EF4442EA873E8E7FF507607D526DD27315859B31D0AC11475 +53C573EBF9DC37A4667133E99D8AA608ACB729F90B736395211043CCA3272AD1 +470F1EB485629AA8B9DCB56479F734703D859F1E4EE8789FD6F739D0122348F5 +1D487FAF1F24EF7A14CF69ADE7A87550F55F394506BC7627A5E319B30F362528 +8AB497EC03B69B58736A5EE0AD63743E7F22125536104674EA63F9AC5286A746 +47C73EE8E0320E7DC098CF43F23EDEF32D213523125110140F46202435EA8E79 +E285C7F3AA0C5877F75FE0F16BDF478A00A6F380C7B677BE479FE900ED3C4A0C +832966F634C63211B58E9AAC3A3346ACACBD040164B491287B45E0131479046F +B430EDCF59B0DB6B0594775AA57CE029EE8DC445463169EA976945A5765AC390 +CA615933FD05173C47D30DD5CCBD56D89B4557C7192C31D7B500B779D7DD3707 +BD4B64980767B6C9A1BC9A948DFB8518AEF581A1D888C6F767F3315EE99F57E8 +4EAA54D04A3A9E34B100024AA7C49DFE273231E3DF17073CCAF5B0EF20566755 +6831F85C57454D1B0A5A8438EFC7F4E396F09CC200643564BADECD2208915FEC +78E94025CEC8ED965EEE5F6B8BA081478231547355F93491915CFC4DBD619862 +0F99133CE7F44756C593C8DF1874E973237ACB17F9614B79D45672CF62AFE009 +EC61B395BD96B0081DE750421A41E9D474F0E030C6B8591D364F29A6D7246EF1 +6B4CF9B931A9A474011C62D504F408651692921AE83116CA0E4E6F41AF877FC3 +CE77764197719291E68B01570AB7038D91B8B81EA501DCB5ECB6083B6764BE3D +DF21B4B3A1E1A5C917F324A1CE5AF92BE3B2F8634A140637425F9BDFBD21FF33 +CBA42069981B230D211602FEF410EFDC199B6DF283343FA5E6B4FF2804DE56A1 +61DDC684579F82C65DAC3A4F92B34FFB6273EF4F4591317B8D2250850BBA236B +C1E36185BC3C8C7A7654B24D7A10A489BDF675F6EFE7B4253F14CB3B5ECD1756 +1882F3D139EB5EC7860D70A176D1536F5119A6C23EE9AE9AB21B586DA19B483C +6BEBA87C457B9DE3D7C71DD7F97E352B642D84455E44EFC54417ADBE7E190F7B +7ABF6FA0EA84A394C8316BF420D6E2DE5B867E6D602365925C3ACFC69ED653A1 +DA30FF3B49D407237196B9401B1EDB7EF2260E582D02B18EDD38AC0016F28896 +0A61CA720216012D0FE2B58D5D675D25A679B1D70FAC10A4EB38060C0BB1AD1D +D1C59BD5F44FDD8768EFBE75B6795543533C02198E21A4B8A5430C2C432E45AA +0C0937D6CED532EE6714C58ADFE2B15B117E9AEDFFC1E172716C756260BA9931 +23AB837CCC7C36BD6B86B628BAA7D6002720AF00411E9D039E435EE479D5015E +23DC9F3993546E50A442CD9D0429F7AF22D9F14064CADF2A3062F218582CA520 +3FD8E0F30B224408594EC426C8DEA57ED60FAB24461611E86302C421BA600CDF +D4EDBF4044F0E2893143D4BABF0A6AA09F28FB4190B779B82A61C65264A199D7 +C2F50BD82837F08970F630E1CC74B4EF421B1032967FEF552DF3C1C83ED995BC +CB9192ED8AAA906CD9708A4882150B27B1E75FFC0D1383C50BB3E6C36F5CBF28 +C0572BD2F01AFFEE5927EBE3B6CB8FE778ED2B524E252F59AF00A3F8F880116B +8EA655D9C6A68CAA28DB7A75003D0C3B653C7587BD1A7D93BE73CA6219024EA1 +07C31E7F7BC9B874183C9337538C925226CDC48FA25D51A6A0677A2BFF699AE1 +E28D9E58369BD6AD73ABA706531DE565E1984A9C89D0C1EC6FC030A93D3D863F +C45EA66F195CFEFF9A03A1673BC544FB4F491AE5E50ECFF7F34B095DA96288F4 +31C02347DCB6792ABE9DE684A1A92318A2BDA38C2D8DDEF29B8FED450DCDCC7A +5C5D124FF0DA047D37E8874370D5537AEE869E771835EA607E1634BC0707C0FF +75D5764B867BEDD8FA075F0CBBA7191B3CBAFC9EF8DFE79E9D7FD5A58916101A +A920F37BC5EC845621EFE3A953C19853C2989FD31952FC4876A8F7C58C4F21C1 +31E6ECE0389BFDC8D6E391B04D443EDEFAEB77985808C398583BC4D8C9979A38 +9842C4FCB7A4E84BD67BE72551A43B2B330293D8655A3D6655A2358E014F5686 +613D19B474AE0A92A80E6E701F4B63EDAF59C3E12DD961A5B413FD1CB5400743 +91F673B3502C6FD90A1349D649EBA4F5D8A6E5AA41F1A4DE1C387E22C9CC2733 +D542291D5B2E5CCD0E1FC1835BD6A74F5DB97FC174730AF33CFE5E68349BEFB6 +F2C76171C578412F075F9730567BE7A2644B17012DDA04D681018CBE09BDFCA6 +1BB460699CBD6006C031A02634BE0B16375FDB9C582EBE6683B60768BC3901E7 +4388A7E058B61713E3046F28F5ABF58417DA878E1870787C472FA08C2FAC7517 +4CE71727BB69D19BB40AEB50F1BD66704EA37D2A0B82F60D72E15440BD27064C +E67CA41D97349309151DA28E1A7850587569A794E9FE46848A4611066291973C +A6CD19857B92F0E36B271F24D54ED663A7C64DE3534B0989D41E21E01469AD69 +916AE35C5177C6BA8CEDA45C92694077DF3EBB0377269619F9925876919A472D +14751E6515118EF9B84A5DD8C92695818BA4C959485EE1EDB6C6D3553B6FBD27 +A0FC42DDF20BB335F7D46F0951C51E9BB69FA6E7C76A8C960FB6A4305FDD2A30 +234A5EFA64C34948422255C14C2A0D8A57174AFB7DF3DB2F520EBB401CA2DD79 +FDF6C624654DFFCEA8FCF5B34C34CAA7C6EAEBA6DC98E8557042126E49E51C3E +BB7C91497A44A69E4EBCBDC0656AA5A7F419D0443576F530C8136AE8612589CE +781205654730006F3A39B4F3E5301784F164A2C87C2F86C894EAFB5E79D7231B +E410219BED0210BADEFCF27EEF683A01FE01DAB70AC8DC4E82ACCF6B5BFB4DAC +A42AEF344755A06DE8A6BF6F2786435E2EB1D103C8FA4306573BE699571880DA +53548A1FC1F24E50B3C2BACE9261C0245F671694A0FBFB4ADAD535AB9949C020 +DEFE36F7EA12B3F8D80E3E3D7B3CBBD8B6EB0AD2573DD5DD0B4FABBC790C9F28 +428B33CA533D5A6348D1A64D868863F4385A3F19D9F4766B6B81CF634981090D +AF0D763F09A2919A9DABC0DC4602D72F8747176F947A92077956FF59FD0D88CF +FE224B9B16C5DD710E6DE3B94D47DED695BCE5414A3794E4CEB7845915272ECF +E4A657C7B53DE7DE96A8C901DA24D54A467EE083181CEE606E5917FED2C97728 +57887C7D19EEA950AADF6E8A99798789757BA126D925E330BB7D931FDF4EE14A +04F58858CE09DCB1F57B8F780DABEDD1C26D72C9A5287C9DD30365693C5DD06D +7365B309AF1C97BD3443B393309929F6D1AE27A1CB55C2F5085EE81928E138F4 +4FA21E90C89F0397C9CDB4D707780F2418B38D8A8D76793C868D4BBF10AFBCD2 +9BBB8202DCC02C37BE63D3CD22208A23743025921A54307A72037E6356EF807F +B2E7DF2B94C51F19895C3C059DB4C42C2DBF4E08E27E31A294B580E2367D2F63 +0C074F03DB73EEC7293AB98DEF387B3C18761C716EE02C95315A36D42BC5334D +984E6E35587BC0711D1B7F8EA8656C8059683C49CA41B0520D6FE1952A1991DC +659D83269307EAAF5A9CA8000FA086B55587FCD0C798FD93905B1CD88A9AA33E +9DBC2FE2A89CC800565567422052BCF5BAA443EB441E3B7B6AF0322014458764 +7AAEF162D0E03F28F1D0A0EEED8714442E9DC41FD4B90436DB8A7E3A9431E726 +FAC0CB7151B6236B2438DCE9EE814A358DC10699244FAFB932C928E0E878D91E +36E840135A9F372A0DC2EECA730E8490F4D42DE218150497C5EE87A5FF5C2282 +3AA9D4B71996F86F8BDA700EBC01E3054459AA3F87CAB9C3A230551D4534C3AD +18F6C76C41E10DB9DD67D19614A516BDD39C432005676C78B36C53BDB3646934 +3AE6BC84D339851BD4D07CEC26129467C7181760DE58D0A288FF1F0DEE52D68A +8423FEA92D3D9331F75E3B062BDB37BEE45D5C338BFC462612D1CA5CFF432D7D +89D34ABEB9F42CB40A63BBECECACC033538136B3F9B81F1230453A52549B648F +E8AA9EE2B0AE82A1904FB78A6237247DD96B906B82945AAA772DA058B85494B5 +DBF53ADE76C1013C1DCC7A19AA3ADD198E3EEDE3269C4F3A6DFE54CBD17C7608 +3BF7513E37D9C8D688087E2A09B863882D46454A5B99CBFF538C008FA9BADC2C +004ED4ECE65C4301862323B134BA11C6D4E691AA899C0E83CEA6A625AED13F65 +78D330A389A6D6EC23CD82D70D53D4F571C9D872E1A09679444FE686A12647B1 +6BB67C8AA4D500F6DACCB2E0C682C835D24C646A51259A72ED3E281C93743832 +A51B3B89D38E575B8521A39D87F8105F892AE9BE53FD758B8DBE2021716ACFB7 +350D5408C621CDEDC04E63DC4468C301435C2C2D61F3B2C24117F9ACBCD9E3A6 +BEA36A9A4227287DCACA0EBB1C6267F23BC0C3E0F28A89184FACFB919D49843B +AEA30EDC40944FFE38FFBD7B33B6B05F5AE1D0E168E924AC698B7200D2E86C14 +E79E6768E27E848768A75DD694B48FE4839058824A9F5C472081962020B96FE8 +45DBD7153E2086C2DECB97B99850286211660573EB090E315BD727C989B8FE41 +D25635F195218A2F15FE8A5C5FAD2857F75969D1257158EE5C52055C1E11D18A +8770E2DE895D7118B3886FD549441424F56DCB3820D5709B9D838435AAE4D64B +6F49CB37B640BD905D6C3FC1E53C8304B0EB694269D6C48D81300DD537373040 +65B95EF64F81AEE581FFAFFF8B32DBFC16B4F1F7FF9DDCE9CF5D6A8A6D79E4C4 +209E47E16C32343B7D8B65D863F33717FC01CEF14A0F012805FAA46552535809 +14126B88CCC2F0E276F5EB42E0C7628CB2397645DD951E31566B9D80F4379A57 +8D10288DD980E93AD47F7F5EB41C4E0DE8AFC5118CFE87A804F309C6A9D1E126 +C0912E55D9B1FA95611FE7FD22C722610746316AA8703953AEE8D52F4B67F0E8 +1C12A3A1A38B3AFC87E78B29AB79174E1CB09880DED63F5EE28AE6916E9BDF2D +3DBBF6F8A09A229BCFE45B37D0E28A3A519DD20CD8B7AFAABCF0EEE058EC5BEC +98CA3FF46CDB8324A5CFD9985AFD545B1425BA1B1F8A3209D159925194C2C7B4 +F353F587F1CEC839996FB9761DA1343F24A17BBE4206324041E9DB6DC5CFB21E +789DCC82093269E3D2894773C8BCD25DB0D6B3DBF7A799276936132C262C2F0C +980D6689EBC8459C62E19C91EF5169439185F8DB0946D7156108A689F9B0A52D +10E02422207CDF2CEF1C2B5D3D50E4D458B4A6C936CE9E6A6C4975AFD8790E5D +057FACE7B96263BAE67A549B42F8CA016C5EF42B55C2FDF20D3A25A68B13FA44 +99D57478B9FFB6BACF69CABEA3C64B559A0D0897176CE2BE218396DD2CB25D70 +59BB599060F97D2CA6422F46D28D3FED8AA36FE161A91DADE4B621EC24BEB0DB +31FAB9F4B67209C5DA12F4AC49B8BADD510C8226962D4657A80DD7DD49104E88 +A0287F75C8784516C98BD7BD15D91F4513384B46BB097291EF6D6229A529BF62 +0A5F4AF3C21150A058B08D0B47DAF540DB98EAAFC88E117BC9DBA9AC19DDD756 +9A90C45BA3E8C37368C7E44BD6BDFD96619ED819CB067ECBC13BE325409987C6 +CB804C705C040AE82EEA129A1A7AD4B7B362E799F2CE5C0390722A16FC60B1E8 +44B0B85D097AE0D5E08DEC18C3E576E22268D7F0CDA46D9469019C20EAE9BA74 +7B49EA6166F5AC94672063D25C4C0E8FCE359712939ACEDFFF9AB5E7442A2A00 +A7E7A05E9E10A209672155C03EB12CD5E80155A5DEE3D503BA08D71E423C472B +A74CD26E15A200FBAB8E94086928E73860E50BB7389B3A8E0E833ABAC5FF8C62 +B894E007E5C220FAE6D53ADE85C747BD84D88BD0F40132A0D1FE51ECDCE1BE9B +BD89734A56C3577515520025A7743F45B01D74588DAED6FCC209CC819CE0DC65 +B590337F93D92D71615422728C6A8AA4D357A4E350BF6CE2480D4E1A818EFD9C +E6243B96F72EF5C5E88645A73189D9772E97911A0713A03201A69D78A98F743C +C0C8562CD876F8DE0A488CCAA3EC11142190BC32B2D8FFBEE6E155EFD20BB003 +055C74D843F2AB34D9552E5620FACE9E40C04DD84E29A602151B7C3352798963 +94674A8246B77CECFCC9A896B64F296EBD891E669A538343C0394E6634D9BDB7 +AB6D9C584DC7DEDF6AEB695FF83953653CED9E2B7F6E5D2A965B60F1FD3DC752 +3FE4EBD010AD47E0A9FD989B15559783B429F50B3A70A1D8CFCBC150A492A8C6 +4F570111E78A66DB463BB2EA226890FC25BD5CCFAEDAB7DEB2D081480821426B +45EDFD5C048A41F295415C43E86930C53961D954B54F6886044A1C5F6D2526EF +F6521BFA9BCEA510AB3E1731719DA2E83729BD08AA2814663532756B1AC5E199 +329025C143B47106919977514AC51B681FBBF5B115AB82A15E24C7315091DFD4 +CD11E813DCFB89355F4CFAFBBD54822018E7EA7ACB3A06DE7B571267E0C66BD5 +6DEFA8A8AED615B9A7F40B138841D094D5BEB32197BF5213BA572AED3C87AC6F +6ED6356BA2A2B9A3E26E43B3E6780BB66CC93A1A2CE94C90D48ADCA2BE608B64 +7C0C0410A9134B81EF24CCDC7426E5096CAE44EE96D666A4F3F72774105AB03E +320FC752F294CA8A537BE8EB6FA85F069E6809553D3A9CB3384E132275D2028A +DC6CE52E75DE9142E8D19C656F7A74D985BEC5367F151A151E5D41346AF70ED3 +14D68F0C83E4EC225E6F60A48200AAA0FAC3725551B8859AF513FFBE2AB3C205 +DCD56B1177021C5D819DC38BA8A042DB92A0A34224E37250AA0F65707C2786C6 +189F518C2E635D327D999949C4358402F4EFB6237C8A0A8BBC01E9B01F58A83E +3BF161E39EF504F2E31BB62F27B4830EAE9B05977DA47EF338817109E0BA1059 +6DFFC6426DBBCE33297E6D36D3492B098C1691DEA31FDF967BE80808199760C8 +46E9D075B01F433DD5A43A2AD872061B3852B74BB421B3564E57C44ED0DE500B +D976E02B51C656974673846B1B5E31F7F9EB5FAB81F92F62ED34EA0715950780 +6F5674E2D6120A4B9B89F749120921EE65043A66F0272B75C05BDDD09217A10F +E9E93E647617CA513F52252556D23F34248D0EBDB3FFCA6BD7C31E3369CB1F0C +20BF53BDF7C4F7A1C37BAD112254C227FACDFD40CA33EDF4688600E16586A5B1 +D53C2AFEEAA2416B29948B4FA677FC1EAC94B4A7A2AA4EFFA901F90B56BC2F04 +921AAC33FA46982497BD267EC185F64A2C6F51C48691908568A4F9814175AC6B +E1B34565EF12D99AD27B74481FCBA29E4C58C8D031DAC1E58E24AE5E432C74E4 +CFDA7278C66FE60C11D9501EE25CFB8F816F06D1427D8A8A119F7E9A66471847 +90BEA16129627D6E12463C9DB6E4CBF9AC20F51EEFC808ED48D41F334115616C +FC0F037AAEAB996F754FA6A8653B8912BA0A9BD0D0EA381B3A54A86155156D1E +BF1BFF694F9EEA20EBE388D4F01CE5117C0EA6E061B807AD4B53270006E6CC45 +5016272BB7FE8540070D51A260A018E09D9A1C7CB3E3C6409BC1993E59667A42 +049F2393C872D0E8EC41FBC2671D0F5E4B99BDC5AD13F7B0930B881CC049FC39 +938DD4D270BA8FD68DFF2ADCC21C7C24ABD1391C947142F1C7CC6E7EE5D31252 +F84B92C304757C0B8394E9E2C2D4DCEBD7709FA645B883D8A5F9657FE6116F2C +891F3DB3BD7DEA5922EE488678297C5A043720DDD777451AB916FA664519A6A8 +9BE9214DC67D68FAF516E19E1F65F162C246B6C010911220978C2FAEEA7023CD +E2C2A175D2C79817AD4E4364090B9C6B95CE86840857599448EA77982CDEE30D +F4E739DE78F7C1831B2FAD322EB48FCA0ED8FE56A0BE9E26E6921171C31F8E79 +D5A59BC6225A0AA217FEB684D1CCF1B12E21DBEF1F1315C920EB46163B5C2F46 +80669943D09CD519256D5A4DE9144FD5103B52774A530D2A4318E9ABFFEF15A0 +24F0590F23BA7612351FC0BD9E5F9A5A8D6ECB677978C4E2AFC4560986B7A8DD +0CC30A82C2CBD2707A18D988C164F2B8CED74B1C12991E705F005E3A8D10BB25 +F5A45974096ED5C5F8A09ADA293175C763CDF9C3484C4B9ABA9839BB9028425F +DD34E700820CA4B2BAF969C1DEEE659A6FF568EDE7B58400C07BDA06310B92EE +17FEF247A7FAFBB56044FAD23EB2933D8F313A161767FE211FC103F392A9A1E8 +B633A259920A15D19A4F5780C09071ED04C83FBAB9ABF344A1B0F1FBD2A96A87 +E03F2785DD00CFD5B3B95736CFE6315E86E8A5E838F4C02B36859AB4CA203FED +4AB0D43E2964FEF26993ACA619F1CF12D3DCFBD8E50AD02A72A6593EB876E244 +D5CDFEE1128408A5C10B5E70D680299E8A33489E1179FA0F753B7FABBB826BD1 +39D7F7A8E7C15C359E24B6569640123700FF628B2D76E2B7B2DE7C2F098A7A46 +8309CCDEA49CD277E96366EF221C4DBCCF17882C4565340EA41EBE83998AC89F +D66825F75F751395FACA772DFCEDA5E3368094CF378C31DF2B405D92690F2546 +AA982FE7F32660E0FB33BF253F632FE978DDAFEECCF840997558C607ECF0CD57 +5CDB3EE71642ADAC37D462F7A23541F850382BC1140C8437FC62C34CD9BE7002 +0C136657F2ED4AF914AD3AEC860B2E873A77C818E491440EEE98075FBD7EE393 +B68FAB94C574EC914FAE259B065C8666CBB2D3604F9FFAA52DEB5F157079D53D +3FBBCC93C598FD83769A8C039EFA0C7BDC027A34721E437E548F120137EC099B +15D65CF68B5F2E5ACBD11A46A6E2168F6E38DACB52D0AF949B8BFC8AA92A6C1B +E5A362B1B05A46F3E58921F6A1CD4C97730B14D31F0C1E2C132D25B2A63D631D +C65813C00332FB695789D21D9903B3CD1425CC36C25C18C7D49014F85BB771C8 +D0D18204492ECCBF69D97B2342457C95A7CBD46C489690CE6B4A4363653B9D46 +A5A03BB8BC675B56A1CDFC8E0C3BC7DD7E4804E61DD27EB6D25119887EEF49DE +905543AEA98A60471A3D512D63CFA12F8768CBDCF8F9EDD9AF084027DBF313DD +059EC75136FC08C22D280B76F1A4AE628CF21DB9A6E567085DCEF55E68812A8D +F72DFBF59786430216884E02416419FEC67428E36B62093250EE61EDA4E9FDC9 +08F01063F9841E1A5FC54F34A65F738A9E330E8074930BD9E85F05AB0E9DDCF1 +2CCC343C8BA7619FA512292B53F37BC95635A3EE07C3E4E91B123E2CC34EA9F9 +123C38F41B1DF9C2A7034BD05D83CFC2B86D69639B8C34940F53F44D5F549305 +F196464989975EF35F33B2B4B52CA9EDC6B32033B63BB03462CC58BBED662365 +2F36F7A46A371A60B245D53F9A7DAA64428EECD40A8F4C93D460490B092558CB +647E53E34771DC04DEEB2C285965F4DCF2CCB8669ADB238CC12897F7DF46E6DB +FD9D5BFBEA1DD262C4CC1B24E681643FAB80B34D057BC920ABAED5B39D2ACFE7 +4CA3A1999ACF8C9AD0F99B12922D37C03D06B77985EF38B3FBCBD6AFD21572BF +84A7BB8C4ED5C3BE657673F8E9F3A1655C0179A4CA565D3B6F0949B2CBBEC189 +B0B46D5727EA5EDB274B66C9FD872C00969B9C6B7CDC3A8CEC053A443CB847F2 +540FAE81CBE3F6B306D1B8B913919D1B9FC029CD5D414DB2E16C7EC97F0BC73C +1BDCD5F3FB0695EB84873FA73629005D7CE48A9A1374CD2A0DAC7F507D3F04EA +A8F71F37B65C4D5F5928C7A59BDB73E1702D4E9508519508DF62DD29AE1209FA +8766D6311A78B12C830AC0D870CB02DAC0D6434801CB48972C196E0CC92BDDEA +398622BAA5B384FB8A0396777CF517A08F646774EFD5C6CAB81C37ED7AF68276 +C86AD81C3C41476A6398A6A22D65421526EEC405F6CC9F2520FAD97FFDDBA3EF +9E8DD5295CE2390650C5B19930B45A410083442196A24413ED58BC3994D003EE +F13DA0A43E7D99C70365FE768AADD61628BDF66FFC0D4195AE0CB7FF33EE475E +2B0EB97F66B2FE63D3436568729519B2639BF5AD17F7061BF9F8A2EADDC7F806 +50C1EBC0AF0BAB233868B10EC7711A0C2FFAACDCE3C49D3A0301C49B82A2DD78 +92BD6740EC601CBD20D460B90EED562B2AE48E55A7C28C8643B4DACAE95AD33F +27F2CB34AC65A0E62BE71CDC3D05361D1F07584945E4E89514C40D8A3132C707 +A4D56B054572CAF5F12E40406C26E5077C9E255516000F1733B136CA5C58961D +A9B22F6FEE7B57DA278A3F8F2B8A2B52B5E2E1FED54F14AFC9F13B18734E42C5 +C04846F7CEE4700920DAC45D381100CF7D5DF4E601D3B933998D86D5FDFDF666 +CC4ECF675477D74327EAB256DC1727A44C3F7A6A970D9598EB46A5C38E81F3C5 +10D8307C19D849BBEB0C962BFBB37409195756E505278D619A73140B2C661235 +2091B4C6A3C81A3F532B8168E69EB1DA998C84834C2C87A910A2A65B264A20AD +50F7B5B8DDA82DC3F45F394BAAE1BAAF5FE217BB95A30E2164C3193083013EDB +950B9F2F8559B483BD35507E77A8C59CE5E6571EF07AA5ADFC51C4E54346AE1E +6E22EE5A58C7B31687B936299B29547E214971677A0D5FDC566E61EA08E86BC6 +976077F73FBC8EA0CFCA796D37DDF0977130FF25C4791DC6CD5B7450A594BD1B +291A8650DFFFAB3154F4129AEBE08C3A0F76A61F23A6662795F20B096772DA49 +FDC818E8F431C8D7488139A55443B81474F5D80D63E1CC6B1AA2241C0AEE0169 +9077ED92D2CB61C71F765AEB0A26665F2677D214B6C5EF0111171B165531D3E4 +7E9E43F1659A4F3E96BFE53F74D902BCCB2557013D900D19B86DBEE27F12CE31 +A94697D4DA12D98DF2F197BF7B7F6380E1CD7D1F9E13B65D5841A990642DE6F8 +0F86E9C087D82FD2A903B7C5191D7D87CB2797C3B24432F7D29BB50DE05D37A5 +B9090F2D26B1AF1EF3DF11645E317BBAD8136611F64885A3D635C3C1F1F42995 +83BB3D6719766FE2D016B42753A30887C1D57DF9CB860FAC2F95BF993EB7DC4B +F61EA29CCCA247F2728D4504648A8EE0B7FA0A766282E63511F89CAD7B612348 +7E83A9D8F233757716321B251D122D9793FCC20090AB7BE19B1575A3AD6CB93B +9FED5A9A6CDD855A1F09FCBE5C9DD97F93C49FAD92D3DAB4B32DFAE82E36165D +5A6BFCE2AEA0F568A481C480D75C1F32ABA8FB904CCBF3FA6AAF58C02B501A62 +4D6C1F8F690BB4B7325A31B13A712549AFA18174BDFDA6010BBFECCCDFDB06B9 +406732F56AA41EFBC80266EBF0B9852EE08E76EEB14A276935114FAD24214CB5 +D177262C90AB93798A00D55A152D635C96846D70395C7EAC49F7A750027F9024 +3781BEE23D56131397B4B241BC6976A4F2B04C8C64EFD55E801D833664019765 +7A22B810889C096B55AD2B4D8963CE240D5DF0FDAB71E9091A167A80F5A3418F +DF87AA78FFB1EFEBD8A2C97E8E7667B289BC23CFC16F0B138CE179402015CC4D +F36912CAE318490F6A050B56B778DCEDA7AD335FBB6F3F05C526C8B5EF0B7BD2 +DFBCF5FD5C40F39B6A3455B86B34E89060AB0E6AB96C3914019CEE49EED033F2 +EE547725E1EDD60358DDF57F9EC734134515949C482D52079316D9A2481A1547 +94B4CA6724EFABBE3DE13F07951329A119D84A07CA8CDB199704694F4B3AF26B +95DABE0B18F99025A88898EDE46BB3C314FDDA77018279B5DC8C854096F3C7F5 +4DE88F3BE84881A03C5E19A77B769EC57B4F6E5BB885485CF242A23C6E5FC322 +04511A00F27AB274232A97A2E5C45188538013667C552E804283C579F1700DD8 +B3C70F6D22FE133C15FA6D5095582333F9B4495282BAD0537B90BC6548427F7E +12C9D744869A3F5F133CB2CA078C83B80F95AAEE5D64203110CA1AF12E5E0273 +298B2EB72DBB5FBC3F6A6D7004FAA17AEFB086870C83E8D742EE560DEAA5F727 +CD7BA16A4D6FAB7ED191AB92BA39300BFB73EE31B7820D85DAE74DE35B2E3FF5 +8879D9D02B251D7903CA30DA07E2B5694F23631CFB5EB08656AECE21A93DA6B9 +EB6CE1A290631B795A55CA75A5EFBC99BD1E21C40D7374181C96B43B696F9079 +E7BC8BCC96044E09E48EAA625B9D5C53CAF79C84E8032A0F976EC2FEEA9583AC +25DCC02DEC8D4798E0C145CC523E5EEE82A1A73AE0EFBB08876278A7983FFF86 +527052AC0100CB273390888702DA5C62889808C3DC427BCC5B0A8D787102E641 +2ABFCA74C325F26A74AE2CC7637C9996547B34F33CE355165910F2C0E6445E7E +70DE25D7D187EF97902D4D535956A4ADA1F1FA0CE9881399477A0B72CFB5F841 +1893157F662F071419B5AAB14EE66E1D478AA9DDA4E4DCDAFB7060EC629ADFAF +5C779DE9AB8A65A65722109954599B931C42DE431F5A988459BE94F48F7D2539 +1A8D09133020EA37FA9C7CF8A32C9C1BAE51E112CFCF59CD7FA6E9676BAFD4D8 +093CBF4FCC3BB2E468ED55E28D75DF47CCF621662632E2087A8227945723823C +02629CCDF94D5168A3810B815522588487CD8AD69EDE6D7FA593E638F603D808 +0E2DC9278B63534E63D22876BDEE3A7CAB88C637DC55C9D1C4F3309C01DF68F0 +3919523B2CE7CA52961AA3C2E618EFE1BBCD2C8DC65EC648CD380E3421F287C7 +6F7308C13F6D857C74522BE6A0B09E15420CFAAE8DE28CFE6350217DA9DB5083 +D15B0CA455D343119E3C1D25F1CA143D5568D63CE32856F21328D5AAD69236BD +208BEC83099D6652E91253440A613155EBE7F2D902CAC765F5049FB5433AD361 +7C7EF2BF062877DB1981B9481F961A097D0402CD89E0BFA180027E29B990C2EF +138AACF0D146CE117990CB9561FA6C0A8D1929D5B8BA4C4D9168D6A744ED4B4F +457EFD4B36189371E60DCE4D2D97EDE139145241DFB26394A142D4457AFC0E04 +990DBBF7E40FF9CC5B0624E9B898CEED3A63865690D1CA256330F472EFA9059E +81920A9D365AD4CF9618E64AF8FE19DEFEFAAABF8B878C42C07490AA600C0E56 +76E6C97F5B0038169395855E4338C84108D1ACB59E5482AF5FA034769A116EF2 +F408FDFAF2205DAD5AE5324EE9F1AC7192E070EA40EF350817F8A69D680DCEE2 +1B30277FDCE432D5541D27536E9086C2C74B2B0D5AB976C3E188EBED10777172 +76F7D7F73E38D15D03809B350C2F55E80AB7EB7D4C4C9B7DD97179F36DB5E4F0 +1140662023CA3C389A8B168A68303117179A4AF84A64B2C2A56ACCBECD6A98AA +14CD43B8CD3FB79202D957E0D5BFFB49967E5421426205FE24C9608E5F591854 +DF895083505CD0A4F53DA06D931AFE3BB68F3FC3DCEC7059D3FF5218BF5F1082 +CDEA29587E7E9E357EC1329411FCCA0C3078E9787A12EA78D59B2E8CF2AF09C8 +DA12B2B0EA4A43283C8FC9AC945EB0E63CCFE272BE758B0F8B2C9BAC46F3BA97 +D05C0E720C584E805589D2804EFEFEDA9962B4CD5B145FF7305FA959B660FC9B +37C79503EBC2D1639D2593B0A9F24EE3CC07352614C0B6C531585F27CFB6EFCF +044F2F2A261B0C2D79FF78899DB6B1F2FB06BFAFEB488504D2FD579F55980DFE +9D15DBCCC176E41EA7AD6364D40D931CE561E0AB57F5FEA21549290E539A3C7F +DCE12F4ED93538385B2D30DFA578BAC6DC92A144A72D1C2CEA334ACA6F6C2133 +D1996B97AE8B102EC56426ED5D59DBBA11BA7D6FD39A8692F0931B64538975F5 +61B79F8640773407E873FB4714516037A5C6FFA8C796A9B01898CDFDC2A3F2A1 +5D3BD4C09165F6AFA9EEA3E0C84DB1D058A4C54EC0673860170038CC318DCCF7 +1F3960F12AA2C9447090D91B0EF8A320E933FC8E89FDA5D5897266A4D156BDB4 +077745CC076FB9A12F9D3BE989E2F8ABF44F4BF842DF548111DE129B36B535ED +E5ECF8AB96D94EDB9E0484E00BF942491ED250EA8E062FC59F223A85F26649CC +AB1AF18824045625756CE044529471B253B1F3B5FA2BBC3DCEDC457C0A42E29D +7A152AE14C8D60122C5AEAF5D4360E51BE81A84F3A6CB164181DD1B62AB204E2 +3F078794D9FE570D6115B1C9DEA193996CEBDC5A32D8EF3EA3C309B9F87C726C +5F2957494663A92639A418C450D42D027053DE7342921EEFD3CCF162DBD32E16 +9C8FF39084FE1117958230EF168E6FA9B48590EDC108D7FDCEBD76BAAAFFBD0A +4EBBA485DEA8C89778456A1A36F420FE78B0A8F854CFDE7E26E76CDC2270C983 +1D5D914F3EEEC7E4105228ADD1646013CAE11C03108C6971EAD9C13524537A4C +2CC3D193CE5CF0FED9939AF23E241FF6C82FCBE73CACA6B4B6F88C17A18CE4D3 +4F49BEFCF830777A1B26CF228DA61EA5177A826645B18F21C10E06C748E113C9 +03402DFE318270EAA54F518FF635C340FF581055C1529CD6976951F6819D5A45 +A4DD081C55E7597D257DB9E2E3DBD46B0878895155DB0C4D859B1E61291EAFFA +7F2816E365A5D6AF6EACFD49362833DE3ECA447871D071BEACE9EB8591F31EC7 +CBCE3C2EA428301FCEB42ED2E082F89476F39F7EB993044B8DC23832B25DD3AB +FD6E0A199A3CF03A79F323FF826682C8FEC47BB2B74C22A92D01F0E0CD8CEBB5 +C59ECEE83A7B02E949225EDEE26D5D11521DB381A26E30CEAC4D8E2FFB87E0F1 +44ED94C0E3C022D4B2DC2922321EEF1BB71DE6C221535B0EB6A9837C8A775440 +BDC58FAA05C859F05A654242BBB4620D92E5E8B3C5A937B98064BF97549E68B8 +8FD29B4E57EE27055217C910A199900E2A465051AE0573E3D46E5CD541BBBA59 +5062CF9444E95536CAB30FDCD35A56AF4F5038E65690633DA9890CE8229F6EB9 +E5BAA68E54F9AF6590B4FDAD42B7BC0A6708A1C2E809B743A5767ED46FCB9847 +8274E288E9B2A49803D238ED5FAEFBDE3863B29D55118E3ADC937E4B02287439 +B452DD41CE8298B10AE99AE275D45C5E0EB5680DDDE9F449855FF97B28AD1A9B +BE728BC56C8B4632938A4337D794EFDB56050F5459C031DCCBB1CFAEBBA79348 +F5514685F1F16FADF390B55DB5B671D0E020C03C8D301683FDA4BE8CDB3C7948 +2F5648A2E049A495608CE414857236A70AAEF5EBAABAF1A0950A2B0B814AFD0D +443CD6D2E0365332CEBFD557DD16FE1E3342A85057C5C8337ECEE5466406A324 +B7A5F881BBB2E442C9775A1C33B5321887E3A8E8001ABAA65B1B2BD1191D6659 +3BBD32F2B01A37BBFE2A3964BF37646262E4D667BEBCAF970226BE5AFFB86A1A +21CC0D74E7376B9634EC8BCC46D551FAA67603D4B707DCBF6C65D932FC76C2B4 +8B2D03F5E29C4E2327F5791CCE1E42395319739422607AFC0B6962680A04A5CE +B9FCA10C3EA7F9B1CFEA675F44029F68E3C9C0B90CD7751040239137508E1E3F +1FFCA19DA7B0933ACEB8239703097AFA4DBEC0FD8F94AA7854F83DF191A44326 +EA23CB5F18E342A9110D30A1D9427492564E7CA82FA80CDE8B7ADD8787B3FCDF +A5D52B14B6147262461F3563101CD20A457672F78F9BCB7F996D7699975C018C +07ABAE4E0987AEB32A45577BA6157B51E9BBC37839FCBB886B8987389D8C82C2 +0281A89F98874003140328866916A547FF0B47F24982E346FEC11458EF35C95B +033F35334E2956A631F7192A +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMR10 +%!PS-AdobeFont-1.0: CMR10 003.002 +%%Title: CMR10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMR10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup +/UniqueID get 5000793 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMR10 def +/FontBBox {-40 -250 1009 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR10.) readonly def +/FullName (CMR10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 11 /ff put +dup 12 /fi put +dup 13 /fl put +dup 14 /ffi put +dup 33 /exclam put +dup 34 /quotedblright put +dup 35 /numbersign put +dup 36 /dollar put +dup 37 /percent put +dup 38 /ampersand put +dup 39 /quoteright put +dup 40 /parenleft put +dup 41 /parenright put +dup 42 /asterisk put +dup 44 /comma put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +dup 58 /colon put +dup 59 /semicolon put +dup 61 /equal put +dup 63 /question put +dup 64 /at put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 74 /J put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 81 /Q put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 90 /Z put +dup 91 /bracketleft put +dup 92 /quotedblleft put +dup 93 /bracketright put +dup 96 /quoteleft put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +dup 123 /endash put +dup 124 /emdash put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB9B8591E5F01442D8 +569672CF86B91C3F79C5DDC97C190EE0082814A5B5A2A5E77C790F087E729079 +24A5AC880DDED58334DD5E8DC6A0B2BD4F04B17334A74BF8FF5D88B7B678A04A +2255C050CB39A389106B0C672A1912AFA86A49EFD02E61E6509E50EE35E67944 +8FC63D91C3D2794B49A0C2993832BC4CDC8F7BD7575AD61BCDF42E2E421AA93E +3FF9E4FAD980256D8B377043A07FC75D6169338028692CCA8CD1FE92FD60AD26 +D57B7519B80A8F8DCE9CEE5CDF720AF268D3C14099498A843D76E3B6C0328F24 +D36EFE7F5C4E5B5C612786200C8DE3A41EE5F1FFAF4097653CFCDC8F4FD32E0B +03EDB3E413283B9EFB0AC33B055617005BC9B0057FD68C52D1B0E67F0C571685 +767F2AA85ADE4E0104A1C777733D5E318A22A9944336E5B98D965E50D31F357A +8B6EA5A0EA98E1B027CE68C2EDB149EDDD04ED74A1B3D206D471A0C11C11449B +DE190BBFEBC08C9E1B7513B43DA3134D6B11A2516E6E86B67F68C970A320D05E +94FEC57FB347606DF89989C33482BD09D011C55AA920319E7B26A205D3D0F004 +22466F09C0482A164CFB27EF6ED2B040ECCC3DCAF345B5A73676F193D43123B7 +72FD6CFC5E37930E61EBD5A6307E4DE70194E6384EC0D79DB6AD86D3B319A31C +8B0589D0FE28241D8ACE280D0530EE99C80723E560BB72AE9D53F4713181F491 +344B06D3027BA4E9E94D4305BE1D817197C54C8FF56CD6964165F6448ECC8A8A +64B48B4F0FD69299A137589E2491A283509B21A3A5772F75B7602A9F60AE559B +07A58436D04222C73EAEA72DE9A5A441F88D27C11F4F91255EFE280E91A4ACAC +1E98A4E5E6C57B9AE86FD218C3CD8F24A4104156A80F13821384E529783C52C8 +78B94AB3A0096090867ED32E8A30980E737922037F75F062BD83BF4F5929BC51 +CC22AEE2DBBAAA001CFFBFF41D258424FAD888FFF1BEAB796A44E3126159E120 +7E4025C676CF94888A1971AEF8B6764B3AF4A92D36FAF6FC56FD049710EE3782 +BC2CD84FE2473F133BE03C1346B875463F126DCAB15C7A9BCC9A727D23611462 +4E8D2BFD2466600285D79518712B8681ABCD69608E6AA9578F7BD771EC36E01A +5A17BC17E375020ECA59B43790ABEB9DF5F4FBBEF807E5699EFEAC563E1ACC5D +EFA336E75DE6D8248E9381BB110884FDC89C2F9A41EBBC9A8A1F98E6A41F68BE +EE30E25CA148C1EFF42DFF8C214A6537AB11F260B8C329A4947B5FC8DC9C5622 +4DF7BF4FBFB00380D47BABB03BC30627AA74103E553F55278F538EDD8C1E64CE +0F1398CA0AB5A86630139B4A7E8FC02804CAFF3830114640AE50D2FDA3B561B5 +C63AD7EE3347804CBB40FB1E77A6C89735DD870351C3A1811591AB493251B904 +314F65791963C0412377C1D02362C5E9655F1C3D4803CD379A8EF24C48218C2E +DF1165840462BF37DDE1B8D5FF09FA2C3B261E2F1A65ECFBE5D4EAD43B52C029 +EEB3948CB8A252CBAF545C8FA1C31E920E23A12DD7222CEF2D2A513BD758EA13 +DA33BF5FBF1D734653EB83DA2D374A5B9A0CE316F24EE375D6DF6BDA49954C2E +DB25A88821193636119D469BA66E5DAA9C92520FD4F84426A4E54273FA469084 +7517817A6EE3E21176D333825E88046F50B3CF6938AF9BA79A2F51398239EB91 +1A2D07F7FCD948427FF62F40FF95E39FE1A1AA8451411563FD5388472251C155 +69BDE9283B41900B21EB1190D06E6B13B7794FED020D2C1BDD205AE77B084BCE +EF628249398B496DE85B406FC2E1939EF00DFC84C07E26CF72EC401BAAE756E5 +7F6673216E7560D1C2A723CB405EE5CA474A07F61B81F8836482F73DC9516D67 +CE0CB770EAD755B6B356198B4B97EBB29C63456953270CCC8D5650C1D006E69D +38DE2DFEAB27DAD50A817F0D645D30AF5B75A7B53CBD3D2B8D87BD0A7E525AF3 +22F7ADDFCE31716914C2318260C2E2B4664893921B68C5A93334A361D94A759C +0D7B146D6FD94F0442D672BDA0F6432E18F3C5DFA37ADA378D95B75F413C9ED1 +BB5C606A3EC7DFB3F796F59B0478C13FD1900381EFE0BB5242D5B5D34D03AF1D +4BDC93EAF8020E26CA23C8B0E7DDEBBC6762A557067A4CE05A524188A8F02E2F +3625DA38DFCF381727887F5646A3995A8A38A5FB1E5D5EBB395FDD0B7C8E71AD +B48EEDB62AB2CE99D121435EFBBFCEEA69AE9ED8238B60CC7288DE33C766CDFE +15B767B4AE2E6CE0965E77272AC9F86023DA620548CFAC85BC751C44218A29C9 +849F1C2DCBDFAD895B54E51A569952ED50F82DC8A19F367E7E44643854EFD6B3 +FCAEB04E55E4661C82D31E2932611748480EF61FB2FBFB0CFB940BEA81AFCD84 +4C6A6332D7A600170E38A8EAFCD4F93DC153C43175434C86BC747348FAC61B76 +1FEC9027C1A193E55C80F1F20B5317AA0A05AAA36AE235F6E49F06E570FEE798 +84857D7552EA92EF3EFAD52DE39C2F8F43C59E3A957B7B926FC95FC4B60186DF +7F3523EE2AB74E294C8C4BCD8B4975E84849E0FBDA6C0B0F24A636DFA578B122 +CF97BC5089E21E9F5298D1C9F30CB8BAFF6A3A11BB4D9A0A5CF2B18D055C44CA +4FD4D8FE1AF3630907DE7E585AA811F9CD11FB2C8FC791851D651009FA5DF20B +3C33FD2FF848A9E3F5652BD294965A332DD3F246C91B0ADA34017FF2451D1394 +F9C3C95AAC6EC8062BE98E8914D51DA6A164AD13938693D446044859D03A949D +F9AC5DF4A000CDA98BB516D762CB9F6D44B5268FD0C26E88BC4A760C0F75A140 +DEBDECA4F511128B7D2805872160C55236F0A0FA7637FF0D4E94AC079CD3C8A7 +D03A5A56F26B0438B577C46011A10532FEBCAD14FBD6032E224F45691A726886 +56F305231EB2FCDF59C8BBFCB5DBD2D093A0E84D62AC93A2312CA69295E937C4 +8DBA1802B85F54B5E7E6D6216A918F911FF705D3B5CF055F1D873B96283A0B53 +59344D910CD396D883F6F7836BA65FAB4393A773A8F6BC298069E5BA38210EED +49C9D920F718E3FCE692527DC7CCE6963BF744F2C91BC5952564196D60574E86 +87A0FAB21F2DB2BD5A51D7FBD8FC19946D24E5A228462C4772F978E650ADCE3B +8D66B9C21279C531CA1C3A8ECE3420BB65837287A7222CC3673A2A5F8BBFDB60 +C719CD073EF9A23675198462C7C87B24CC92D6AEE5C25AC63855CC3281494342 +D28F3D2FDE0C183486769A4FD5B0143193D31FCB2C2A14E487BBD96D0BADBB64 +D1B56021C363A795BF10E2DB448261C363A54A4AC1182B470C457AA82DF3F5D1 +F4B329806141EBD53CAE309319B94133D7EBDC2D0453A905ADD207364371E178 +0A95C2686E3B34C4A978BFC0EE968C39ABA00889BC5149162C2B54483D44FD3B +5CFF41F611C7E03B94945F414560E874D7CF27FFD0630890D7D7EA66CBD15448 +229059E1C436BB33D69552B5367AB5D53591C4678D0C704DD3EA23F5D9E8A7AC +17D003C19E333E726FFFA2961F33C70F429085F7BFE3E2510F59B78F58B19CB4 +01B48E184BAD9020FECCE3AF52048A056981DAEA02AE78197E65855DDB170616 +F54278395D9EA50DC83761AE759F9CDEF9E1948E7002414FC05286ED793E6662 +3347F2A9AF8917493D7305B92CF93E8E9185F70015F5594084298A6C2F9FD3C0 +689F262AC9FEDC9B89577ECDE92F08D3142209FBCE7B5C0A840CC767BCA56C20 +4E4E545E2BE4D21C53855CEE4CD0AB35D1A604C0FFFF77DBAE4289752276559F +A05FEE65F45ECAF44E95E23FAB6052195C7948AF0B1126482D4E02D72BF8AB03 +DE0F1A632F7672AD9DDE70EDC82AA993678A82BEAD0BC2649C4707FD8509810D +364B5C6FE0E10772E95288C622C2F06C634F4DF8C7FD1432BC9310D5F24FEE3F +7AB324863D6DABAA1576E70643CA79EF4D7DF4105093D66CEE0F3B87D2164A7F +26EA05F5C4645B22D3E1BFD2219657712C168FD90DE801FB0F32759E80DEC1E1 +43CEEB19FED12D757205043FC98FEC62D6A8D8B97BC083B4A0E985AF7850D6FD +8716B9957C1C35A0675BC53DF672C425C79F43FDABAEE7D63F092CF271C9A9D7 +C41F40C4189510987887942E60A412B3EEC84C9A6E1AC7D54D528F5604B72C08 +94B7882621A5BF1F325B92FF96B80878CC550D1AE4D8196E41CB1251856609A5 +C4D3BD05A922D0D45E039D9450DEF8490A3E924E41434194910BF60BA1B08BE1 +B41824345627745541A4F1703E956328F6227D11C74946B38CFB096139979E56 +4E723B889B44C6D78673868C89912F8B4F0B4B485F1587A637B630F92E6072D5 +7F3B44EA6FD96BBD4FC28A6C1D90805E3BE3E42A7BC9C880762966C55BC04E01 +204D083AE976FAE6F37C94F27E68F8C0F28D52B17F6C0FD7C9150701FD78F8CE +B8E8DC9260E3974005EB5CA728171F482D765016C94D4ADFE4A42EF42212BC56 +7E4EEEE8B0D2A7856CD4E44F55C0BAB762F92CB8D64C17022D4BF3A47C12F5E6 +279FC23101FEE93753653CE8CEDC3B75C9CCB29BF1D4554C6120DE8EE750FCBB +E38B5D915206974962E320362E59B3F21B3AB1875703191043D03284D4467346 +CFF2F98CEB4845B73ED8E003E0DC94251B73E13A9B51A3F1430BCF6A21EB9B7A +65E17FA411F53BE6432F1506232B8159E008FA257F884A4A01AC53BE91754D78 +BF14A5B0FBFB9C31BF4908355F8A762052968DF526D118708CCB0B7CB5BEE285 +6DAB6CD2E3934178E60BECB11AAB5478623CF6C50C92F8BB5D1A583609028FA7 +B8A53B791BDC9EF76A124F3F7641857E4BEA0837CB36176EC9A522EA7F41B8D3 +63C37D1145367BD300F17B54522A834BBB74DE12BF9EB26ACE6F24A046D58F89 +4D4B7DF74875F1A0C1C9D97BE0849593D7B398EB4B00BEBC8C8D1497B6EF831A +A35380FFB7F1AFA4D888AA52C9482E8B1755CC209905F98F40D95B44D4DCBCB6 +67423D1BC2F3560FF0A8B4F0CAC352A4EE2C1D946E45AAEC8A6AD40303F3382C +DF0756BFA3B1ED64C169E56ED1C760F2FF0E24DC5C9F41306EF8D2628153D30A +5DCB0791126BEFD4947D7EF08301FE015F2B0008DFFCBF9F2D4D859FD43EC7D9 +C5BE237E9BF6665B7B1BEBB362F0C0C3A8D86010B9C97FA741C97C2E0513386C +9C26C235B14DD2A58BFDAC7B5F63DB4DA6D5D37D0098175A9071590E1DF66A3D +B8173A047C29D7D35557F06132CC920B5460B8AFC11D23D09A4E45D089F5EB51 +963FA1A6256E359D485107FD143B2BF21FDE9DA5744BC2615E86C31C89470CF0 +D06C6397D9FCCB316EA9989430240759D2C4945D941F159FC02327F34B042BAB +B5C3A47C78E8C1A6FBCD396B1A51CC4B020B8AD401841EDABACECDB482D6EC5B +72D2BFEB4556720FADD49D07307C8B22ACB7E310CA4151A85C71EEF70E8D15DE +B3B00F26E0E166C14647A65ADA228A3D1C89025BE059306565DB1B1EFC37D358 +8C1EB024254AFD049BA977BD4C2C605050E17940A89D0D4C5D963E792320F5DB +3706682E03D25D9E02487247819551465092CC22B6B56E93F3AB528038FEC3F0 +668F866707A19B0463BE706EC729D2EE1653AAC7E29BD25BFB3241D4792F5152 +ED415B4E7FA92C2EE5A22E27E8B75542C492E56D811C192E95542A6FE0BFE5A5 +69273C2ABED4300D491B92D2AECDD278404CB84B1BB1BD7AFEC858215837D118 +C0E928BE7E07CFEEB51A6D21375B772B8248C994564014015232A0DA4BEA1754 +3274F407FED0837A236371F1A32056240F2015B1E7F4B2CA72C6B58610A66F13 +407CFFBA5E0A2893C1F572D50F51286E9133B5A84239C9493B0574E77D281D01 +11D00683354A000C9700EAFBC1FD104EA19DFCB87470190E7E2CE26E3A6FD0FF +2620B87B82AC8686B6206B530F17E9348BC7D04B948348802CE53A312443DB87 +4DBBA5313A6A2A8DAB8A1CC9A594FF8C299281C0A261C8CB2226B732FBEEDE40 +2C6ACC74A1A61379E2E1CD5548CD908268A32FA83D8504C442EA0E183ADBF7FF +9FD09C037AB03516ECCA93FF048235BD11A25DB07F164512A079C5392AC7F889 +CE96AE5C8D9580BCAFCC087C35E76EED1A671E87C12E3045E15A687134736DF8 +DA984772AFD189D68571A2ED7256F1E204230E41D3D9DD876F938951714A3973 +0CA9310489F8E807C1C7A4E51AEA5BC030610A5D7263FF7E0F9FDE3E5E37A362 +5B919000BD94D978583B942EB79CF2BEAC33FEBC9A67272EB10865BA8FB75FD7 +9D280AB59F91B96C16C982DE848D76D8FA8620DFD7C80B7DEAE7264350D6FB3A +EF04794DA3305844A7CF718F6D1A4A3AFF6826173A076A1372ABFC54ED3AC6C2 +09C9287FC830556CA694E21CA5342ECA7B10C90AFC4783D841D7B1E34FA3DB7A +2B706F3E21B0FBAB23E7257962FC3BC309CEA2C7239A9D6B44CC96825115ABD2 +AF9A2566D2F3382C01569FBDB94C8D664A5DA0F7DC3DD140CA77C743D7BC1420 +324ECF9E4780280EB119885E96A6C619CE3C0C8E1E264E2DEB137E5DC8149786 +486D65667ECF47B1A1E20E9E6E4FC8323E0BC8E61BDD3BCDFC6575C69C03E31A +EFFC290472CBBD049DE3F840AEE37A2486034240F80E75D8A79E0762377DF660 +52B12EAA16D678990B11A9BFBC03C1D4FCDA9FD4FFBB3E88352438102F10B7C5 +9F04C013B6575B5E948FAB58EA691984A0E54E6B9F3F505FFFEF74D06FA1CDF3 +4B8A95904C8A2763AA8AF5B71D00F5DE09DC1CDF87A08B6D181453063E14C12D +B7BB3775A6E2A901636273D9EEB833EA8CF20FD83AE899E28DADE10EEEC20BD7 +BD93085A4B1AC80AC1AE8280C14767F1A487BD066007A0D050317BD081131A14 +6EA0898ED59E46DA7B6254BDCCBC660686E2EDA0E77A705A653733BB5C5497D0 +B130359F866CF293FB6EF0C2AC5BAA2DB0DED045E2DED3A2612D078333260359 +16CF0CCB272D34767EA069E0F0B0D42327A18529D72E890EDA6195C2688438ED +E9ACDBEED41E81CA8EB5E43C2B09CE266EFCA03F2D7FF57F12B06F9E54FCC6A6 +546676F6FFC5B8B7D3F0982B6FF0D21D949309F0C0B175CC1D0976F8C55C6AED +6E821C39041E22D91AB30922F2B2EC2746BC7DAB484991542FBC82D87B487507 +559AB466F73EE23C2D3194DC5CE4C9AE66D3164613AC5CBB3DB501B64DA7C91B +C7ED2EE9027FC0906820B35D4F2CF66C4F9CE4A884B7C07155BCA884ECA5EB3A +ABB83F84DB1F5639599DC7D3F51241AB5D95C3BCB7AB1EC90B4BC989F74FB354 +04B2D7366A34D335A47B8C00C05CB423482BF6C7970A95545424A08AFF9A035B +7F83F52B65A9799CE76E303B85664B624C65E9CA58184C7BE2BB9D9C86A4DE5A +8165EE3DA2E652B5022EE7893896BABD88931DE1D538F615787645DF5ACBBA0B +A8E5B899A37321AA7D4B283AC9234978C2DD81813A1EE5DB6EC170DAC1B6EF02 +94892635B498765C07A38D2E9DB0B7581B11056C28278F89B0E60998379C07EB +C0EAEDC32AA69B8B836F92A61AFD35688315B2C3F860632FC13E4BDFB63214BC +41CC6859EAB3AC3034449213CAB99FA1D216563419CD6D6CE4E1B56F33E6C654 +7AA9DCB5B05FC068DF02AC32408C8010AD004F6CCA9887830927F8CBCD49CDB5 +18CAC1EAFF815FF2F6F527F936948201565003022C6C7390B4E3C2B219FB4F76 +9F12BD25CA7B3B61D1A2F8DFEE795D04D5428B42FB66E0C254AF7B7A10CEF7FD +E5ADA5E217BE24851180E9A1700FBA66C7D2B0D7BFDE4F4EED1D24B821A40947 +5620363657F6D048E651A689822CF815E72FC8AE9D835BE31D1DD8B54C9A717F +4DC319B4B59AE073936EA40B070524C7E71D5A7B64436DA107749746B516E29F +E3BBCB8F8C473E706670E11E5B221716F315FF097CD1841D0069FA69EA1898FF +9F9EC2518C77806A19730C97F54BEAD604548D553D4A6EDB247853225E24E7E9 +89D71F6BC94DB986467E755CCC99069B313F5745B02B4BB608A39F0A0A732B87 +7EA2DED68219754BF1FBCA350327572D769C962EF9242132D93A5C8E9725D8D3 +AAAEC15ED0F362471AA58488620156F3474FA59CA080EA96FE995D2B3DEEADF3 +3141D157481C66507725ACA5953CBBE1ACEE7E3F02C72C6552D15EB3D612730E +61A06A43575568DC3CF3844BABF04CA767E2995196097015E0C4F622C4356B6B +F41DBAFD797A4B9D7AC22332C552043EF98913D0D9B50CA6B7CDAF903BC5C04F +D20A952BA5CC35B646ACD0A287C956B98C450051AF6AAF79DF37F8954473F8F6 +652BF03AE2AE82B99D820CF93F5FC0BA17EBD7AF90313E70594EB5C354023BFA +07912408F1757319C7288E99872B907D5AB583B082EEED8AB079C63E38B07D11 +6744856E689A479CB3A8BC081F33CB06755926204981DC0A45B3ACC18F6865BB +EE2C50DB43B62E3630FC1D9B1FFB3BFFAA6D0A20C0381ADF48E4D916BEE85BA2 +BB40F538F55C11D50F882B73913840B45161262BC8B0012694C3EF26452F9B77 +2CD7C7AD6BFEEAFE31C8A721C2D46AA00C10681BA9970D09F1E10DDC250E2AC3 +9A160EC8C9654FCEB36AC2B586E978D54744FC8A0E963D8EF6E228ADD22D093B +B889C940206F504F14DD921D909BE06EC9BACBC23EB9E9D137FBC983570FFD2E +CC5D2EB5D2A4A8604A4AD418B800EDC6B89809E0009760E9470F037FDD15E649 +93E9C8FCD9436AF02447C7F5AC380FBE69D1405189E8DBFDACF0E7DAECFA095F +E6AE1A2E9ACFC032BA9A5DEDE9DDEE22A88D9A1F1E0FD9BAE2D88FA168386D43 +4B93EFF3AD84A9C05A80462BB3A940B2F7311CF7054F501BDD4F1347213C9327 +5653B73E9D78866901235C66B0C49CBDE3A1BA3A11991E6B8443117745D96020 +38F4A74D9676E4E99291D4420C57ADE4A8D5214D07B14916D83DF15114393048 +FBE0DB83223F609ABE120AB877FEF549B6E2389487BB7ECF1979BCB0785DAD1A +2916961A1DA60AB491FC90BCD6578571226B4DFD204E75FF18FB5E72DFE8A028 +C66F8576254930567A877DBD22F8372E7BA4F23F9497ED653906F5F67A66A1B2 +51957AEB8D443550161075E5523F3D2AFF386E2640B276C3EC5EDAB74AC0DC94 +7D975D7F5781A652BD13AA7F97ADDBE68847167997ACDD038E74E930D8248F0C +2CCBC094031C7147BD8D4DD664184695CF8C474845692540FE2B8A72CDF9DB62 +BE05E15A05F59D56E5EDBE7C371BE5CB3B276FC7A03B5942057EC3136591A1B9 +15E504DC497B663A9DD1729EFD1478C233B9317351D000DC0982F061BFF25A3A +8983E560AE31E321DFB137C77C0AEC704F8DA99024232F26AA6920D58CB17DE3 +C1BC8E20988FBC4705E594569BEFC3F6666785B2FFA49367E3CC695F2A1EB846 +DEB37E120B0F4C0783C0D54655C143C4F74DA0690C6D08D07ED225F361BC0F86 +572D79540730791DCAC15823991FD5DF1AB8F25F84EF40C085B17C9070C59EE6 +31DCE45AFA78440BDE4C69A4D954C2006070A2C310179851F2D39B1B5D3EDBAA +289570BE80F25D75116BBDA61F002B832F9EF2C32B53258B15A1174225168B28 +EC3324C6EC61E5711811E658A1BA65C8D2D47CEC6071CD88DBCDE9CFD2BC34DF +1ECD2226AD588B50AF2399D171E99D8086DDE33E24640A767F249797B1B742CC +F4E95A64E1AF8D88FB128194673CDEFD6A1672DD1D03B6749E729587C0CB7C6D +13BFC785759F35578D611E924CD89FF87DFBC5C93FA7BE150624825F7D137CBB +FBFB1238C1A397826B8D1DF0A39EBDABA5F10B37FE8C27568E1C088F279A0E28 +020DFD377694024FA154AB5C06EDC3CAAC3CB5A69297E1079F5C2F351D81614C +D73ED708907A96F6F8FB0994D3247045E8D41028432E91C7ADB2F22066D6F8D2 +701298CC9FDA7928F99CA135B69808AF6FA1E0A3CCE1BFDE234E9218A565FE28 +96541CB9381E887182873FD7866F5F8415EBE92E51E7FF064D6CEB7BDBEE4DF9 +97633E53488AB11EE93137AA185AA7E4AA043BC73DF1739C92B4D3A8C46BA689 +B9F8FA73BE010D7C4F9007937AD0EE3EE4E3041C72A2C4DB92C6C5433DF33A10 +700F9E891885DAFDA44A00781BD019A9FFFDB6FDF9361520D50AA5037E654C8A +ACD179511AF61BA10DB29A0535972DDE8B838091B5EC3F6C3408E02B8CBB3FD1 +E213E2C53DB7AB14D465CB0E4FE2A2CAFA20E74BF4601CC23687FA7921CB1B86 +6DB57E04C99BF7F56FED75A052362016840676DE91888490B4A1DFE0C079C88D +C8C3BD3527F7C006E1403DABB47C3F9174208A379C221931724F06270985BDE6 +A53263227EDB00124C5677613BEA94BA029F9D6F8BD1F7B87C4426210AE554C0 +7BC707199BF6DB673E40D55741CE1F0853504A414099BA8E0BC7F5EBA5392684 +79552A5D4F7C0CD3A6D80B18014008AB011C8C66C74D32AAD748EF30C1AD484D +B56BFB090C5BB937E81189912665F332911E11E83CCE75A79DEC2838E811D5B7 +DA85AD6ACB7D8A98D15DEC66504CF2131FF06AC9A8A4FBC4CF34EFB8455C231D +0F73A50052AC8FCFB2B2ACB95033AF04078E9CB99551FBB1C46EE6C413D86C90 +AE8BD7FBDB7BA6E9087658C79C4758E242256C0546DB76A3857BC89F26A4DD9A +F4A848104BF1ADB2DCDA25C79BBBDB66CE1C1A45C7427FE7CE5BDDA7CB599B4D +B5D346B15414DC9688A9D00F0372DB98FD33E6164E5D78D6CCEEF0FEA60A7F5A +9873AA7E2A7F98893AC5A9598B71BD06D13D2766489248190A262E5EAA459888 +6D0A38261697EBFA55180F3D416C2190B36C309202D1619A405764612BAA3506 +7D157F49FA1E0A7F252FCB0B8459A30975E02748AE1A891FD6BB288E0D7C144A +1D348F1DDD145912678DAE1906796591E35012373AE01E18515F5CC3BB29A629 +F8B28B54376A9E10D0CFB29B81981E66F27B6AF44DDE0A3621B9ADADA9588201 +11A0362FEF840B200C84480177C9E3F0777350BE92707BA916A90AA81160D498 +6417DB6C7E15766EC5C9058CD51879041BDF2D2514B0D6B968CA0A300EE2E30B +6AE41238D76DF324B0502BF79D58C2DA1FF7E384891182AA59918DC8EDF92299 +BA162134FC3DADB6FA5CEABB94D1CA9BE1635F769EAA88377AD96510A4DA8F8C +5319E0C06CDBDA1BA9845302F716DECFF7B965BE413A7BCFF3C4EADC91626070 +9A5776EC64C67DDBDBBC66F16962306631D70E62616DE4997ECFE39DC6BC9A75 +D2297C2159066195F43B7002138456AE7EF69220925877C87405D06144D250E3 +55EEF1575DE8564BF98E2ED403591F2EA4F6AD71A126A9B1F5D350819058FE4A +949B8C3A7907A725B463B752EB3B44B090C731EBB86FAFE24340D1A89D3FC0A6 +B89E64C3FA480C91DFCCE4922C000B0533A052FB9305EA3B58A38A3AC2688715 +A7C7418637C393439725F0509B3B08E07DE5E0350A005E4C5DB815CD317EDACF +6460DADCF9281BC6523DC8FFFFE18CFFB2EC61884E7B324806851A91F7E0336C +F86AF2C88F1EA1EAF0F87013AFC7DAB6F6BE426D92A406437E38C75614AAC461 +4EDBD8F129D985A1385B0F9F1A4E6D9936FEC600F4E431C653DFD1D56F694471 +FABDCEC7BAAA0C266D35D7380AEE587F61DA5CD1229D99F82BFA7B1A45A165FB +658A4E7A741E11931D6E5C1358CF76056CC0DCF4B623C2A8CCED91694E46661F +BCBA0225541BA9A58EA1F2E2B2402299EF2B691C39A87AB3D5C722DB2738EDC6 +8ADEB09750D714286EB392D198A55784AD908470517724B92849D539ACAE89E7 +A8E37CF20CA87635FF92F1140DDBAA76CD52BFC0B40FBFCA768F837D0AFBC7E9 +BBC89422CBD6429B284F67AD2DF917AF69346A5BFE8DA3DA8F9597C2265F3BC5 +A90CCE79572DB45176AED6E1A5FBADC98816F0E29BF58DBCEF62EF76A8D8C845 +4C7E9AB94A0EA43D2FA271BEA800890613D8247171938596CE4948BCBC7960AD +5B2BA3E0A4384749A7D88F3DD515CC1DA7292EE9775B67F621E156020419D0D2 +1A6AF5B51E64D3EA7D182AA65AD1F663FB28739B86F9EE5880A5A96C3AE1C563 +7A002FD0ECE3AEE80AF18A0FBCA3EDD496C18C8974E856BA39226C382CF8541F +F7E2C35B3CEB1DEE3BA8F346199944BE2F350E4C3DC89D789250C3C5192236AC +513D1A3058230470BBA11E0B39141F48065B808B6FC459A897C304B749B5A656 +38B55950D6F379A535CE2816498DE36D03747FD07514C2DA1764217BF2DE17BF +C8FB2F06382136D301953DC42EA0B429489275571F6B86AAF496E6A2EB196547 +B76BD6DFF6054DAFC9CDC11FBC541426DF0351ED027FE76128411F6F62DAD159 +C116B43AC59C885B3308B158EB74405541F2BD247BEED5D3B35554EABCC133F1 +B71EA3C7C7876661EEDC141818A3E8A9C519E7054E26DC023320A0166FED1C19 +DB1C3044D23E5BA7F039D86ACFBCB5F881A6FF9135E1F5DCF910A873E6F7DF8F +11372C039D09A875DDACA3FFADB73504C1749932C3792CA80D78979CE0269AD7 +47CBE7CA39E26FCE1E71DB711D176644423FB964CF8CCDF16FBB686877B1B99B +FC570BBEE55DC7F2AED8E81FF38DFD61322F1FB69E5CD6EEB8135128A35FC23A +5ADD95D4F873B2EFD14A1FF76CD20454BD3BD2752C9A5F0C21F1E5F39C5865C6 +D4874580E6224B22FAB9240E0346C843AF0C495E7FD5B3310D90A6308D47E882 +EAF80772C87D3F7FB9DDA52F253FE4E3D1E56EBFCBDB9BB9A977DC7E9772428C +47EDCE4D4F793F4DB9C66E65827109E83723E50424A87B36D6E74DD05B327128 +E407252F937ABE315B18312C8BE965E84ED9C895D275A331EBA6E872DBCEE1BB +C6254960940B95F46CAB4F8469E7412F546E62683AA356366F454308367A789E +B1E6F3A07B87829111DD17856727E948E0FAECA4EB00192F125C2331011AABA8 +F4067FD01D56853FA445ADEAE5901242DF460ED8AEF939332F87D81DBE9A30A4 +18884AFF8A7F00530BC7DDD3A1E6C40549BE3E567B225E7C8844F0AF3E19A4A7 +E61F818A5F1BC836012FBB9AC4A5AE737FFA908EBFC88B2EAA62877B05B1B1BB +65062420B89BC4C3C4B7CFAD1148C6A373F26ABA9A8DDC74DBFE47937035DB49 +20F0B8E788C0AD02381732BEB2B9587D6B50E6F7B4E9DAD171B8C64B60A04776 +F70BDD9C6C8831AE39561701FB54D68810E4C3249C32E4D39BB40C500C8A735D +F316A68985E3A0338D8CF730881326E2B76D75BD2566D7387C0DD8C5724592D5 +1FEE9798B269DE09387D3A1EDAB20063BA852726BC7EF07CED98E2DD1957F94F +7E336F6047A935E128444DA8F525FF1E458ADBCB1B6D910B68955DCC59512591 +2F1228007F9524A0AA6113FC6805AC4ED806D5CE6E03AC9EB6830EA9A7AE975D +99A4FDA50B92FB6977BCE8BCBE2D8EA44BCE9B39718584A452205C4349561CBC +7B1E281C058D0BE636CDDE883E1C1AE3802A35C5426443AEB6FF705EC26AF94A +2A7BC536F373C0EBAB41C780E56F5BD1CA645DCED5090CF32D4F0E5A780651A0 +477CB27558B2D0E2AE3D0A02565EE38D5F437D01308A6BEF55E80422F5B5B56F +6DD11ED717B034083F9BB1536D76E321255A137E618B398875B5BB8F5AF02B6E +B4DFFB173C424B24BCAF3C9271A54166A65927519C9770B0DC44CE276ED0C20C +8EF41AC3AEBEB0996DEE664E8F872023710D0BA81DD3A3EBF79BC24717BA1280 +9E9CEE362F5BBADAF6D8200835311B1063FAE4D6EC8325A694EC516AFD24FF99 +EEE758AC14E76FA1573462BCAA75D246AC363C412185D20CDF1539011C35D1C9 +B3B3717F6A37DE522943CF9B3D8CF284B4C0068A1ABD9B58FDFC20CFDC45BCA3 +DD054AF00C18CD7EAF8DFFD45C28A82C7B417AB7188BDB49A5871320B2EFE0B0 +25CE25F3BEFB53856689A44D365C55218190B407B7BF9855ADCBEC5C0094CA63 +11E014EAFA0D1BB324D3B1D94DA4A7AAE9D29C71E2D5F122F1C79726731FD066 +6545816A5E05DE1F8DEF865DDAE0D80E9AD0120A0C81384AFA5BCAED3F8FF80B +B9F8C8A7517A3863034C312BE64AEABAD77A5269253883D460DCB2F0A3B28700 +255BB96397D1D613A14C3368C9F27F3E42B887108793F4B12E2233E5A3620BC4 +F886F124503FE64421C1A40C37B25127094476713D39EB73004CB56E877935BF +BA0C7B095414A1FD59CA11573B86EA32E297BA38B907938B3A25992F0563022D +CF54FD863B8792EFB58A27DC2CA6C4DF48B9388F5676CD462C1AC745488F6BA4 +2B923427A7D29935417E010099FEB69B16BE5A2AF7B4883BBA80815A09693AD3 +2B78D3A939FF18798043F7C88A76BDD527B554BEBAEF922FDC9B381D72C7CD3C +49698A1444FC33E276D3B9263CAFA375F1E64C8B39C89D4A65FC42A7183E41F4 +1C3F0CF7EBBE5260F862EBBA059765497817B8597DECFCDDDA5C1D15AFD3C3D1 +6F1A8E43709540948B1E3B41E32AC13B469222867483B0E765FB427300AE9BB5 +4CED17DE5C45EC8391687036EF43D57835CFE689B99FA0B860E3FAA6471417AB +BD505F23013DBD726BB5645F3006BDAFFD5ED0CAA7428EAFB448E0A30F8B7858 +311E3FC16FAF9FAC5E86998E4954AC4C9E32FBE6E9DF280B457BE80DDA2959A4 +0A874282A7F9AE5236843298C26D5D4160A4554ADBD3EF0254C4F2D108D49DAD +E1D1B996D5147560D574FC238DD005D18CB32A6CD73C265F05E0AEA17C73E3F7 +2FAA00290D1A6361CF67EEAA68800D9212BB5B8F0259FC8D133A21E6BD375FF0 +4BB0FB1E78F065E51298E97164C1FF241336428932D1AB97E1D0ADEE93BA8903 +A8124A3169AE0B905465D7E8DF132D903C9B4C64074147F2BDB1F722BC261E10 +D366C246E8D664CB57A92883CD7174218655BA68D9919D0C8678DC4E7A7E66B5 +DD7DA4E011769991DA9D93311A06A623B680DDCA32B287104A1D7BBD05AA061E +019BE06684F9BF987FA635B9764DCEC3A3286340A7D50355663D5556103267CF +8CD9DDB4DAF109C47176A1E9443F3E2703788B85B6FDC8951783D08F02DF72AB +DB5F8739B2B9B38CC813796F48FCC21B0CFEBC8F074E464989AE5EDDEE5CC3EA +69C281CC4CC295360FC11F67AF3746CE3598A215FA109709A4B193BFEA270261 +8ACB9B7081A9D60CC49AB3F25B0B6F922672E58708BD707AF7DF35E32E7CB939 +CC25BE8392B3DF687FB67F25342671FA831264230CA39D189AB6267095B7CBE5 +09DDBFD5512A8831DFDCF53CDA45E3F0C097C0C4DA1F12589F7AB3D83178E9FB +2E9B5236ABD35A872EB9A37ED9545C6ADAF8FF2000E67AA8C8A8E61C9829F29C +5555FA19BF6949AE81487EBA68E8ACB6244ED2EE8CD537155B68BD1305FCE20D +710147B9AB3CCF6BBC0F2C3D8D77D783ADFA68B208829F05522211E28432729E +AE8A8C09C04174BAEF8D560D62733BBAF506D2EBA030AA77F18A38EA8E98B38B +C03B5A3C33A7B36EBFD1D55D503FC06F19056EEF9D1D01CE279D2BF23B04E880 +D6873E16AAA583ABBEF1EA8E5D6C3D038738573081E264C01DFBEEEF02B8844B +19BB8D27BAD7354AD310ED720DE2D4240F3106275AEF6F7ED61735D799306DB6 +4A3BECE20525769A0D99EB90D957297D5913CC48A98EEE84FEE5D02B30651CA3 +B7573DE50F1B9D8D50E5746394DA8C5BA5D71CF1647F80BC9337F00EC31476E3 +1019B41BD01DE7FD55886402565F688D1E09810DD8AF982032B048548D87AEBF +B20C6B938C6D8F96C2D7B42A1E69DBFE6AC28D166804E03AC698B180A48503D0 +0549D2DD2EBA5C601841A711DBE9D7019E5DE56CF78457F412E42CEEC248DC5A +C0F349903F745E40897D0331124749D0F9F9C71B704E4CB0898AC7120A880215 +236800020AC60B1E5682656534F3332C2DB06A7510AEA061D9206B4C033A80F8 +77DC8EAF7D32A7B791FA3930647CB1A29228DE62A9733C6AE072144BEFF15651 +791C8F99508DA1E3F8B451985DC68251044FEF9F91C7578A2F3956D97D544D3D +0E6A3F7719F9561B47D76612D833BDB64780728A6456E8CF273BB708FFFEF743 +CF069E55B1A871718E02778CA80A5D21597D597246C260AD390E5F4A285A5CCD +E55AE1C37589EE307C6D2E1DEFC605C9BC33511968CC8AA7E61F5390951087AC +F4376C5BC48DCB22D8F0CA6CABF25383616DADD012FAD655FF4198245209E305 +274D18A98D760203C8AB09F7204A967D07B75E7650BE0A0595742F821F74193D +CA0AF1A4875F50D1F3F2786C5532EA3913B3589215386E78157D6F38C4860698 +7DC51E51908A7AA304DF1233ABAE2B3C9B03F2496B320DCA5B7DE98FFBFD6FF6 +EFD2FFECDCEA32D0A7F799382366C6325B89C94B37CED9A1A1BC88602AC5D9BD +1BEDB8D5CD2D38FD1FA33703C41F979BC24F1609B3B35295CF756551F9F2D770 +ADC3D23C5B7C6A777CB33A06791EE8481BF577A94016A061D8AF8882466F7499 +E66E7E93F104E599C79CB6F76D42608B9BC1171A9AFAAD93E846008330DC3C0B +6E8BC7623E8693C1E7E8B5B8BC426B1EF8EE705D2E806486775BAC15660BDB75 +66BD708939D23762BFB8628A863C4F9978F83733049F63709066CD4203476CF4 +575DB5CA5B5F01D8E4DF345D78C2A938B5EEEE618507B2AC9EB9C4BC9B64CFBD +AECF052FA5D93B306C075AA8A645E5B93D1005C252F0DAB540243C7E3C3EE52C +0886A5D89A30DAAB4ED8F38ECE11217F0198347E62BDA7A1BEB6D46482BE3726 +33CFBB23A78756BA63741693D764467273078167DA48362985CCEA2889133C7F +A5B0BA827E92333BB02221F6757E4ACB8C2198BD7A976A29387CFB9B7F51C65C +2E151D1D1F73470B14587A6F11AAD77465975961CB77306E7793EDAC65EA7AD5 +E562F2673FBE78794C9D38659647EF5189F6ADD9B4250085A59F84C0448EE47A +A073B712B6B1CE984DDE3125960C16AC77098424004666BA6116A042551B48E7 +507FA464B21209D31C506D1DAFB628FC2AB30279E6148F3A2DFDD183FD770551 +0CD3FE854FD619E7D2B62A8888C300838E41744BA759EA4E4F19AD5CD249E8DF +74E81BFBFBEE42B2F67370B748B1B3FD5C6201866D8CFFF8D9ED127F43F4009A +CB5D9651587B54ACB8C6D410128362A74EB358437D0CEBB9E0FEA7FFC27A5509 +E799762B27F30B5FAA4ED3B492752B04702E48B1D0C55155157FD7B4E578A560 +5C0343A472546826E9B9B80E91867D2D4C3EEC02133BC338954AC6B58499AA9D +24CC3CBD2023E962D147618C08BBDDCDF36E91EC2D51D6DEB97A1477D8156707 +9C1B858385FBA45CF0FE74563A5D5A51ACCC3EFE991429A8CE57131AD56F352C +E95401BEE11B310C96E9C3CFACACA00114625BA7B4400FFBC5947574317E8699 +90BD8678107AAFFE1516A59027E9907359B61C6B8A97B4F99A338BEFDA2C25DC +D6413A0CAC46051E76BF732CFFCCD0FF1408DD26C76DFFB54F7745C79F3A7ED3 +1D9F8BED7C6977067E6C8E46EFEC63AE0D3953175A6E51DA38EFA2DEF475DD93 +1C34376F5C6C6218DF78EB84773361B9339FA58A88E96C646F291CEEF398D281 +E0DEB2EE21C3EDE0996427EDA0CA0A44247B1A0E03BD9366E75F763C9B1D2BD8 +00D2066BEF933DC6AB3586EEBD04E6D750A22978ABE902200200B468135B690F +B840BEAD5EF80E068F6F87442D93848684A127EA79F4A8A24DE737A373ECCA3B +B405847430C138E51DC18C367702E868CBAAEF6890FEE68A75C5781F32B96D86 +BF5A0C99F04DF2B7FE968B6566BD816C96D7EE35A863C0D4635047FF09F68302 +EF62B9293BBB8BADCFA64C6CD9024C4F739C8C730BD62F2B613C6E1923F04BD5 +62C556E3927411C2655045B9744C9DCB7F1DA9C1B5C70A145E9A35DACF1B68A8 +B5DAE1C62DF9220483F1DC721D559B87D7CD802AB539AF1BF3E434EBCB796A8E +378B1139CB3DD3134DE8F40C716BA87185D3E406E3C941D336A1436D891803E3 +D2C8E627204A343811FA82FD1A232FFD6915501C1B158E890C534CB94FCD9ABA +F64EAF649056C1198F0F58F56D3E1C91C167D4D9B4481D48A12CE297D5DCD0BB +8BE16BF18DE1D58F7D2587B70FF5734EF8391DC5F709BC39E729713CDCFC2EC4 +5E7AA863CBEE1CE8185E657E7FA6565EBD6868F478554E96FA808A708B48E463 +AACC817DF43EB9A5233606A402F3A83FCE99F73B8DD819A4D014FB435BA7F23D +F2AC40C473A34FEAF0A5DE457AB5A18A6CEEE95A55FF604AB5225C5C1DB6C6C7 +0C7647F075E5FD3CBA9F3B316887B4A01F1C2FE09719B4BD09A84C5A3DCB82BF +F5EE9FD0133F987FCF77098E0CB919CA7FB8468059FD35088B97705F180D5A19 +CDEFA29A02C5D3EC4893985A2478B0BE83B18FABD32654040A2F2A9BF7BB4F7B +5781D2A6B5E416BA14BDBB481B3D619B0C885CB392111E32B2AD6C8BA13E9F93 +49CC4B5A35B1F93B68A5ACCA4823DE44BA8979181E50A3804E43D6245488A15A +BD51999A729A20B9DE927F728E59312ABCF89176C35BDED4BEBEC14636B19989 +CB8BF2927C1BDF5460BBB09BA81FB83020BE4D4B69179C8E3B838D6763946166 +B328ED82B448CAB5EC2331CE7601EE8B39B334BCE11038B0EBD8437E5463C640 +73C5FACEA06A219AE83515674CEF03AA2F5FEACF656ADBAB944CBB237813CDC5 +06C303EA518CC59486410D65F5E5395DE84D0EBF8EA37633BECF5A08851B4758 +1BAE6460B2B67D29A8F88FBE52A26DE7A6E6D859CA00BF437837DC123C459B9E +43FB6DA6B79DC16C60F9035EE3B10E2CCEA9F7ED4FE29667E0559A3A34F6B550 +E4184ED8E953247B104DE7D912C5BF66F3259214FF091096DAD710C9F4EF531B +B4C6B3BFBB4715F3654587A5EAC63C917E100F37862B03EC240E762F2DF72CCC +9CBF233ED204EB966F6A34519C0A169EA6130D18CB8E53EE96B7A63C828CFB28 +45CDBBF7FD775137119B7C7BB2A665074691199B387ECF452A3DC5F859D4248F +3A02D4D65167A9E6C92E0A16D293ACE234C049D98E961D14D070DF2A7F55C232 +B2CBF0378ED83686DF80E05DD417153A3FB34A7B2F0DEFA69A34E19CBFF56D1F +14EB4CEFE99DE9CABC5F0FDDEDED79A50F29151294E2576CE97CA00F734702C7 +B94243299D8080957B7102AB370D5448226870CBB5DEA5A295D3D5C8F7D1B5C9 +44E6F16F703E4CD3F74B37AD19BB53635CC4801A317C953F2A131F82DBF39694 +FE552FC18B94EEFC490A579F263DCF470D2AF1336C166F0FC69D84800CB1765D +85937598431461E7B5DB95839BFA81D51ADE49E4242E2DEA4560DF41D27C7733 +2D1F036614FA1AB505537197F419E6722D4EBAF5DB087FCFF838E782D239BE68 +43AB130B26003747C36CFFE7A96CF8522F3F369E1E6443C923C4EF6616241DC2 +5366259FA9FB2559B5B797ECFA474D491E96F2CF07DFCB0765A1A7B0FA8EB181 +0A82708A93C8C8C2EC711CEB46D4A4D51ED42E6D023932F6C29F7E4D9735A5D5 +269481F9A92673E88970CD15DD2F532A2D96C48150C10854F3A98B200612EED5 +C2074848780E53C5E086AB78EBD0444A064C5377945680900997D1739E93EABB +520519269E2516C7757FFACF312E6725805BB2261552C760CB68A7BCDDA0438E +0BD4E6DD87C204039396684FDFC4398421E1D94B110F2831AC0DA589822357AD +A78CEF72FAB2EFCC848DE7C5486AC56D56DBD0BCB39D608F40E0981572B9FB0E +51F11778CDE7A9DCE029ACD63D61C22135CA5AC9DA490C29FF12165AE20F3127 +9D57AF7441F31659BDA2872A720100F3F63D9CBEB596FCC23FE1BDC7DAB26FD8 +00182A4EB8C9ED92B3BB9971AD01063CA67ABE06F51F66232545EA42AC145113 +1BB165ED65DCC3A1C0E288FED14706BD7FA08D3D4F143B8B3BA68BEABE09225D +2D0524B51E2D7ECDFAC0F8D66C7D96D885D0D87B7657F6134B3E7D0493E4BA5A +6DD7591027A957EF7E04AD08B10D93205A5F268E65B30242AD7D07C2EF59238F +F5B6FB46BAFB04D0E354072DD934FC5C63A4FD47541A4BA4B68E531E4614BEF5 +15AC43BEB87A1204B9BC873E9E79BAE958F4622077B7F7C2EBC0FFB7F7B6EA39 +C9D47152C26BC4A41188B367569A22762B8800E715416B7B396BB3B5ABC11A19 +C427DA9CC6EFAB2450C54030DC95A775422AF14156388FC0DB8901D3D13CB248 +B774DC8E8E36C7FEB216ECD93288F0520FDA6FCAC443C62347D680CFE38039F4 +1D15F56B06632BB1E91AA8E098EF73D8A054AF1A8E327BC6E7D37EF19166633D +1714371B2E916869E420A69BFC9AF4CCD3F1DA4569D3542AA43722748E5079E6 +EBDAD7306314586BB17C9C7FF0825D865AF14F0FB03EA08F5E2D22A97B9702A4 +8A169602A94B3F08ED7A0CF6B9288E35FD989F2D0020411EE777702C408920E2 +7A7F37E36734BA4937FEC3B14FB1FCC92BE0944C9D893929A63DEA8030DFD9BF +86C40A4E5421C663BEE7F2C29248B4839E441AD9D04F051AA0991A6D6EC47280 +10CEF96A41D329CB263A566A2D0C993FB918C6356C1249BC14BBE3B39596F7FE +DF719A7A9175B271E37F0C3B46B6F1A53ED40E6C3EA4313A7C90B65997EBD308 +E2F08EA3B7038E0694294BE05E9583BC74306255DE19846A692C0D0D64506C30 +F1E7B83EE2090F0B0C9A1DE01474DF9DC7D618193149E95DB2F6BD8C0DDE48C9 +625313BC0C265A6A4BF5FC9598EF8E16477DD19068CD1AB4C52777E9CBD2EF5F +99E28F5A2CE31E2924C196492A8E3319B1024C84CBD4FC175BE286F1F0829E3C +7628AA9FFFB1810C93336E3749A818E46206A3E415139064C9C7D004D0CEC1F1 +FAB611B672C0EB951AB9CEFE67BEB2817BE9248F887836DB614BD26A59CCA79F +04CA82700DDD8D792E89EA14D0B90FB3F8D6648090A39C99894C8CB638EADAEB +D9BC62555D36EBED36A39AD7601BCE938D26C84EB1A6302CA1111B0C362C7718 +3791067E2B506460D1BE71A13D02451036C4FAD7B917CC9CB347E8FC30EDE59E +8BF9874561A4B0E4235BBA799471EFBAAA64DC644958D1695526A86D56DAA3B6 +8AFA3A1AA7B66C840DDA7860072BF4C937B37FDA41922388FF8B4E3C305335BB +ED114714115CFE1385261C6EF0EC27CE200A0B2434BE519CF064FD5860CB7395 +C934A9D7B06DAA01F039DCF3318F393E22AA8CCEA80F58094F5129B06A5856C6 +9DB2EEB9B377135ACDD04876012CFCE0CAEFA831CDDE6B3ABF574573EB6D72D6 +F03D294CE59A42D5348781C90D1F0D8BDCF770E6989A939E3FD42A68D34E6B0E +A0AE88E2B52577B1BAA36EEA23071FCFB8FC4C41A8FCB9F8871F265D78B274B2 +D0D8F92D55011A124E037B5254162E7956465E96DC76D0CD96643AF172BD33A9 +DD48C30161EF717BA3AE6C7231F05DC4E330964C01F6BE6EE652AEE0AA41086A +B2FB3DEE6697965BF24EFDEB87D49BB4D617A10480CC29C978C953A0B826E470 +BC73AB39F4A8A94306CAC840DE844C60F650537E695C6323991AB9038DB838DC +0264EDB30E27E3F38B9073C8F7FAEEEF4B8285FDFEFF1C7CB16E43C712D78345 +813848FC335ACBA0768BCA0A9D57E99026CF04808F002FD842AF9DDD4E72BC61 +4997B2B39E28E971F60F8D96B66D8EB5911B8856287E3CC2D24D662312C238F3 +777745B73A30CF91BCAF4C6205808A2286285462580052DE31EC1EDB0BBDE46E +5DBA461A815EEDCA60F8D64F7A2A84613DEB4C4745EBD6C04DAE969BF4681B5A +F95ABFAFD2E9FB49A8504348551E67EB6EED4F87362FF9A5CC9BF06478E815E9 +EB946FBAC21430CF51569E331E0060BABFC7B21535D987B480FE1264A3738EB9 +F67197E54D9C2B032A06AAACD80FEEE298763DF5CFD00E2814F58A69A8643AB3 +3902057079A36C46D8ABE38C48ECCC6F7491D4D4A581A452C48CFC961DD8E85A +5929131DD9543262E81C96631C7FD7B94C724102DE9C365AD97D6ABAF44AEFEC +BFFCB5DB96D395117A665FD30A70E8090C3883FCF7ABE76954BFC07E4467E5D6 +262D9C949ADA532E94F9676D15DE90911D34BA384081A789D304584C688025BA +4F6EABB4ABBD427CD00FF823773B11F283241BAA9B9719808D7FC5E77FCFFFA4 +F95DAA339D4843AD99133A1DE37103F386B4092343814923FCC22A87D8A91F98 +3E72139EA419D61789C36D99A207600C188477278887467F15D6A6635BC18D38 +53FC280A6AF75015E003E2C80F312FC1D967203234583FF829FF13890D62FDAD +69DBF4D1AA69AB22A11A64662AFA11952042294C55F890EC1805936402B7C229 +F0A33C29453754544D92CB1E338AB7F3337BAFDC535CC93DCA0A049368B91FB7 +07670DEC8F84592CA1B4B8CF94E0D6A64A0DF9C0C239382D283AB166206B1893 +510E6320866A16450FBC2B0F82A38E460689EB07AD663A0785971D53E42EDD4A +4BA81BAECF10B93B346B20FBAA70E4D15AFEFBE7CCA040D982A92E7853D055E2 +065A09DEBCFA1B2ECAE26C38F8DBD378E976FF597397C27828EE0E6791B8641A +95CEAAEE1849027B06DA878994B70F94C835444F6B69A2DFBD6E4FECA5160C53 +7F12F395CBB410A6C92DFF74F8CDDAF64EFCF4F8ED9B832AD75E48B3F01DBFA8 +86D7ABCC22CA3C13603580C64B639948E2B74654FC8AF03B4F56BC8302645BB3 +B682950933DF6086F8641FEA62CC01F451312D22F4CC5804EDCDF981F6DEE997 +BB777110A8E8ACADFAF6428096108F535472D856AF4165C255A1B43342202F3B +A72C931CD8A966D1898B78B12B14DBC0D3663983A9E2153CBC23184A4FDA6A0F +779AF83DB6FA36FF6258473B17FB452EA4AB02F0D34C0B8C8E1FBBB35B680D94 +0201AB0D0F0637DDE7031FDD239BCD083FF5A28AC9AAB7271D9179A8AE589B26 +A897659AA8E9CA50ADCECF5D5F4D21C7142D4A85678466CBF033D883ADF819FD +CD27E3A6046F3EAEF987DD9171440DE702ECFD3AA51C12AEAB971FB8E3128291 +592A3619A00A4DDE933F960CF460C31AB712D12AE4A37357E42CAA235672926B +00FF510B7686F013ED7841FD01805D2496293CC262F80E730D2FB94EF320314B +2E9BFC65A17A0BCC2233F53ACCC3ADFFAE00F19277AFABBBE4D2E377BE54EC2D +82038A9D3A35D7B13744E468A1AB3D0231D394EBEFF06BC1D52F18430F7F77E8 +DB47FE2A958D86452CB7FB6FAB65198AC7507BAC92FF4F46B97A265BB80E99EE +B2211B9989BBF73B1753B4BD6730271DB7679FAF4D3B223839094C1C980C15D3 +2C9E74DC9DCE7CE0D48B1E2A8E2E3DEBE2DCF6FF7B8407FA88F59A8D572E818F +0C6AEF5B4A99F83398F97B162429D82A62E2377361853F630E7D0A7D728DFEC6 +EE39A9DAD89967BF1579C57AB99CD78DE820C407CAE52C2D7E65C97A594FCE3D +378AC8FF6F8867E8953FBE91D2D8131AF97821F28D6EAA5A9F025DF790FA0967 +2C0A1339E953EEE5FC75F76FEEEE780F332A1C0C08DD80EEF52F1CB7E02DFE52 +86F148A998753B27CB823FA9B4907B37007A5FDB8395AB3FEE7CCD947D1F6CFE +E81CD88BC9690E2F89F7CB130C9A2834F938B3D562A42CEFDC45A38E6BF62ADA +1517974E61F6D35267795C7A9E945856824329B14E70EB350C997756A8FC0A8F +7CBABC48C4AAF0A5D6A8F58AC190AC3F980C00D93FEFF1539D417AF2DFBE1021 +2882782C625D2BD323B9E0D53F1494F8CEF84ABEE30CA90C251887075A697386 +89F38001C3B2FDA9991D9A5EDA186C37DFBD0A77D47E24204981DC0A45B3AC66 +DD14D43A8A9826A0BBD96FE2279638F5AF12F010474075C381BE0243E3217199 +ABF00214D7D13F66411A6AB4FDBFDDF295163DEF72E788302F63FA8225F08ECE +1F32D71BDBCC1ECBBC067187C9713C686E3EDF304BD3C58981C76B6943E66F34 +2BE57CB3145FE9A286F570074DC259CDAB2A415DCFDCAF46FA3E195FD43C38F5 +A612D653E3F178E16D9FCCB637CAC9AFEA648AF52B945B9BFE37F241DF9DDD61 +5425B37F903B079F337E8E15B70CCDB8920F15AF89538608A573E7C9008BE814 +FFAD305F0B94C7AE5F3DB35D34C04C1A250E89C252759581AD933896B468547F +BF0AFC136FEC40C7436120A944979C9DB4D492A52B0FD658E8083E0EACBC60DE +67DCC01E3F87F04754223A34732D211B43248A5A5BDB19992CAF481A564DC9DE +B16CABD3BBF40BB4F84D67015773F7261FB175806DBA97597A0A8AF8920596A1 +3C77C728F23CDA310161CC8573ADE490419AE08CEB622DB6883CF0B75D43F0B8 +B37715EB9AFD9CBA33DEC10BD2D78E541499738D77A6450B93B795EBAD5F44C7 +311134D264B1881069ED3422281C15D1822DE565FF7768B80B58096D5B03D168 +0158B52A52B7B5B94609793DB02F8EA785A2E0A039FE4F8CBA3CD0C2A934F2D0 +A2F862F75093FFB2743748EAE9947B5D9F56CA0D67ABCC01E4432BE67E22DE05 +39664D8D7E9D732A897F03DF889A0D3C09E60C4F3A3996AED7293B8743353739 +DE1D41C5FEDC2BBF6662BFC35660CF8EA4F2C0DA06AE90AE91A9E0A8BC94D43A +B79F3778BB68BB937032EE09062E1C4611EF8E86CB7007F2AA7DD3E46A31AC00 +8CC36771023DE9E9BB5483C051FFEF412A14A65F30DF95C91990408BBB8A1E6E +FE801BA15666D3C270F045A8178BE9E424998653471706D0D86D49967771961C +3F62F1B6F36652DE97526AD89E748221893C9B6E5915C1504FF46B6CD09D85F5 +57F881284D70C35BEA64731C99C0D865E2E9C9FFBD50806164157CE198DF009F +B560FA76FD75CF742308B01F8ABF13E7F9DF82298FE454C1F709387B6F23C306 +61FD8651CA2F51C5F28786D6766B4339928115601BB265F6895712C39D4EB75E +1E1EBE9BD2E808299CAD5092397B7AFC8B386E992AF8A47FB618101925514570 +2CF7F3D9418ECDF120DE0D9B14BA35A19312BB4C87C9A1862E7AC946AAF7E0DB +9126282D6813095178325D6F7510550788D387CC3F7936E5BDFC55543FC2AD73 +0A47BF75CB6B625FE8F087C3E53330DA3EDA69BEB3601FE3223BF111C6235FC6 +8ACA71E69693779A68F93DB849000C3915225B007E9F1A64211A66634F67247D +CB39A389107705AD40B0EE4D1E1AFB6B6F6E7F1D59D12847F748BAA026367172 +61FB9E0FF8EAD4609047340623E92C4954683F777B761B09A1B6E06E13977B66 +B7D5B557C9E0682A0E4EB4B04EC5191E68ED14DB179A9E167389023CEBD2F046 +05B7B10F352B91FBC1D499BC63A8B63A782692732DD2C49C0532E0D98BF9B5B9 +F1EDF5A5E00EA42DF50F9FF5700FA06DE26B5EFDBD15375BFB87068ABFD6101E +4DCFB11A4F6CE0A126B1AF08A0DD21B487FCE447DB919FB215BF614D5027E67C +CBDD8B631B0755EF9B2F6E261D4EE7D892285D1579F3027F9B04BCB1DB28A8E3 +BB0E83592AB3BF25CB92A3BA038A91C5854402DD5C47E1F535750D1090DEE1BB +A5AB0785C67806FE7A4D1C7DA3A8D40E5F8EECD2DB7F5221ECC3AAE50BC607A5 +6B91C718E2092102B2958EEE11B3FAA96868D425513142D1C374886E63A705EE +6D996AE31AC5F89456AD296DD490CA6E63BA98B78E4E9FC2AB540F27D47BAA6D +C8BA9D2F10FB380F3C37575FDCAFC69F42E83301FCFA1DC31DEE29087614B306 +F158970D92374D7435EF08EFB3B32BECBC3C6C9FBD42951801B86C715A7FB306 +65B90CFF9FDE5AA20F20BC8DA696E5FE7214E98F39D2EE60185F926027A6CD5B +960579744D143C1A7BC8BDF10C70003858B2A6EE72F854CD35ECCEC8E92BD664 +F9734FEBD981C41DAA2A42AE83697E3B030C9E2C6C3969293D324A7D68274044 +487004C3F6FAC5B64BA149DF711EDF2F17881864AEDE3E1E4C3147BB3DDB4ED0 +2F79305B402E76F974CD56CB04A4B562DFF36B40DBED2F35D38DBCA5CE8DDD12 +70C28A19C891D126927DAAECF16B2DF41802882956716BDBB442E9F062DAF65F +6E3808CF58F9A4912209644195F04B4A5B209314017E96A700903AF6F4A8E8EA +6CE36F67EA9139F816CC75A806C3585BBFD882F14028770670FEA22F34358E0D +CD9626705BEDEB3A0965697647220C1962FCE67D0D3E2B9FC5DA3C3861F84209 +C56B90CC792B95076CD73D35974433DF6567FCE72A24162B434208A79117055E +53BE3CDCA527E33638F940BED805EE57A3526186F80ADC5B6ACAEE25E2081A63 +3E6D985A8A6256F923B971E34BDA04D21EA99D34095AB201BF44B62258B19ECC +45149754F896F64FBBBA939E41A11082C307165C5EA32F7C8CDEB80851B5219B +7A680F7A8D02C9BAB72FE3B941E324F554E34F5DD5E4936250A82DB846F5966B +779F29A9A4E53BCEA49CB4C6CC7D0034515E9F7B357B6AFC0FCC6FCDA1A34B5B +103062647367EB77762F6B47773264536E40536C5DB2985C3048969F9D6C698A +EEB959112EC964BDB8DC3C6F307477C2615BB536C03E9C9B346A7916D1C69C0E +116DD955FEE0B8F6A0B476DDF245B7C901473A96C2C53DFB5BF4833F984F4D42 +C06B6751BFA6D96E9493139AEE7BE7839B8CB2290735C80542C40D266283CF68 +4DE60FABB54F29A930357CD2AAA60F5E85D1E674610F2E7C280401061AD47B55 +5A1EA0B0196423DD4DC994CD41094818332B99FC9218B2D628E86983DBC5B842 +AEDB7362D479C940452A947973C8BCCD46588808F0F9FFC55EF2D75C1C075BF7 +FE6C21DF51E5F6B00D807B033ACD1C7C6A8B3CCB7332E5ADC93433422095C0C3 +8CBDC619DC8EAC0382428C88443B16ED0DF49CD042D38082CDA4DFB035CE50C3 +9271344F46D3765ACA3E1B2942215F559EF1E308DBC2AF0659DC980F5DCEC6DA +B33D596CB3F26EDD5A11D6647DB7AC5AC4FD41B62BC353356CD12DA5FC6EC2ED +86DB312ED5C8323E1C766A0108ECE43C11D2BA0A63F1BE2B0A9D40EB995647C1 +82D5C9FC55169F50121ECA94D1953CFBF9F38B1FE0C7DD8B786902A841F24A23 +B8762B929FB5AF021414A5321C7288BCA19A240EE15D106043DA19354C4EE1B2 +434A967968C29B9125BE84A907D22B0BC2A2CD09AED00F3CC3C5C7C9AE7C906A +7050756D4E67E11F2F2C14DE59A92C013849CAD0A1B6CD32C0CEAD2A4B20AD3E +ACF8CE2AA125F1EE154B79690659E1B90563E3884B47699AE1F7A71579C3C4CD +B66E6FA9BF98769452C5A2BD8B54112351F05BB77D3D3E3EE9250953BBA94EC9 +C0DAF20B0606C3CFCE4815A876F9CAB8A9A2E5662F7764050A0F5A7852B9AE4B +5799C95B8718D481452AB4262A843E01CCE943DBB8377B7052FB397600962A01 +25E5FA112149DF197FD9C8F16BE5819096B87CB3555969026B8A5F4FCDBF3171 +BB1D5F36E7CF89D94457F4CFFFECFD8BB3E009655D799C4F262FBEF937E5107A +511677585FE4D4560C34F03183E6293EC2BDECF5DB400CD1A29BA1678083CBDF +EAFE8D078B72B42BC1CEF9FB5FAB5B2EAA044F5E98D99D9B907A3FE4E1BD4E0A +2B845C58D7D0119C323AAC85463968D97A651A087DF3B6866EE0D09BA5583D8A +8DB9837B487DF5FA27624BE3C7F17E6C734D294A1D200D971EAECF983A0A2378 +BC2FF6B206A5121EC01229C14E0C22CFE7371AE1007ED8F556B54347ED545D05 +EB488D7DBD5F668F45986703122FFF97A19523731B7D3CDFF8FE45ECCF2B91A2 +0907AB03E8698E0E3F6D846A4417B9F66703DEC16AB8DE158431D3424BF6462A +70085CD88F8BD3DF2023F0738FA6E3F36E752DBE7590F6BBFE1BA8092CB69B54 +BA30D871F6200BB9CEAAD3D6A5AD721FD4A48D002BDFD8E339483D6E32ABE379 +914BE6B673F6FF3CC20BB2A971184433A714E802CBAFE2C85DD5F0E29B5F9459 +16AFA7D594B373139006786FB5B8594D50C91217D49ECE8E684C292946D79658 +A9BC010ACED5F757796BB9C32F98409ECA6511351E340C2C9E3CE2AC1007A52E +95E6DA9F56E11D4B0586F88A149FA8A2BE78DD25F89BF504A99140A7453E4C3B +EC9F94B300E4F6AB24C4528E029DBC0C61E116BDA8F0AE3108E3269A76927509 +95B41AAF17DB3759D04E9F0E7CA4863A9A771A49293B1EE6CB38E33A125342D0 +6C63AB27F308D08F60F4DEB8C0A335B115D25683F8AFF549598A3B1E88BBCBFB +7C418723054B346E748DB987ADF0EB40FD0B8FAAFE5871EDDF9D68821C8C9643 +7A3EF4FD3BDE591022C83EECE829BE8189C6D819708103BB96A29CD107F416FE +3230C3E7E358722AFD9469FFF2C7FD9DEC35BE527B99BAFF00C799B99080BE0E +C88272197BFDEE472E29D1A197083F1BF10324E834C9D76190223E095487AB37 +50BB4FC92179754DD1138F9A55269137543FDE3173BB57BF3E5A2C42F5C58536 +BF4FE748D9033B0E319E3061A7044883A795BFF107E9C12F2449197FD29A2BD4 +C5B7DBC42C28596D43CA57E4184250213D3EE5D447A0D8023E2BDCA6B095DAB2 +3094B07797FA4AD49A4BC874F462D46F9DB4A21773BA0181B3482CF9235D9C78 +B967B280FF82EF3938F51211D5822F527127A5B4D7D643A443581EC8599C62A9 +A91D57B358D8787A39DFC4AD363869F6002E1EE878EC3573521ABBA11B6FAA80 +2F73E889DE675B42463A8488C72AF383482D6509F49786ADA521F76D93C4A91B +7A5B23417305F5F89FB34261C2FF16B3BF983B19DBAB9BB6B1A2EBA3C2AF80C7 +450248EFADA22E1F8D18CBEE599C8D210498432C47CA067449143710A73DA7C1 +38C859665D0D88FF0E4ACB573E954655B5DD4B8C7DBE9B8A3B2C4526872CEB80 +45CB40C3D53F89ACEF33BF54BA05439AB4137D9F6A5F7CC983CC0344216AEE0E +2BCED1790BF4506A8908E1D7AC441366E9938551A962C6AF4BF5E2E6B706CB0D +8572EC4AC8CA0714A5EF6D4861932F42509F217477AC1547A3F96CCD15787A6B +B7DFFA17B0F44E83A08486E779A1E36B7748B17F2D09FE6D7717E1CD3E306004 +F69F2EE47DD0A9FEDA1D43558C8217FC810C109B8E55446B6F151D44C08FC996 +63530C24C7F0B8A59AE9FB7ECD212902BD8E4115A6F6411266A57CA3F7532E2F +C631F18FAAEE1F1B7224B598AC585A4279155501B1BE29E06893A8C56DE80D66 +4D5586C74C54B88D1B61602D44CAC618E21F447A3A17123F9032AE7B7854C08E +E63B5335540A7F4B36DCD11A47FC8E672E8EDBD9BE813702927FA8B0E0715943 +E1AD81AFDA2350A8D9C05295A208EAB36592672ED05E16C4D9392B3CDC1EAC2C +526F600BACC7C2F6E0AD1283259B1388E83880DF85DC9790DCED3EE2CB06245C +3FA795567CF8F6E63059D974D5E2DA8B5262CBEAE15984ED2D6FBE0C5580CD20 +05640AC7C4D28C5692D3F814A1A90A7BA2633A68A7A9752AE74761AD428B19DB +79133438C8E0CACA1624A5780A14DF07A74003E6EF75F75662EF6E817223BACB +0B0B47C05B22016F6EC2E518EA8AF4DA0BDC4B02EBBA5D746CCD8F698E5F25CC +47184CA13E1670BC214C44C27A70CE6DFBFA31B6C82B015C1A4F64F2C767960D +E2E40BC61F84B19C6F874381488053602966F43AE5058C0FAD7FCD563D01DC11 +09C7252BD1FC94D7975F72047395F685A7FABA083130F64B8DEA9029F14C6AC6 +874B97B05248E3D6A435711263526F395BA49D30A21D4AE548141E399FBAB5B1 +6EE081015FE3C5663CCC484B8B4183EFB92E69EFFDD7F01F518569E03A72C4FB +6772A0644FA922FC56B0B99B1F35832A11D929CAEC8280793D062109E3BC57B9 +43E01331FCA8548A573FEB914F916BE1D06D2561296972C28F6AB92BD7C739FB +B1D5251FC46E2ACA742585DA6C13ABF373F66B51B45B44DB1471220A3C5AC33D +B1CBEA5B541B8C1AAEE38ED30735CB1C12D02DF0F6770979AE08BA566887CFF7 +54C4AF9ACC382793D4BF251D09A088691EDF51E72BD9BF9F2455A8380D40723B +1D90B78C210ED9972BA6BEAD25A7B240219C012E3757353802DA6183C365F51D +D94C2C57373A44EC5C422D3959C140BD87F1271405B33BB9747A78E5460A96DE +2C1E98D4B4FD3A15E10989FAFBBA5C57644D6206CDB81493667B3E4FD684F3F5 +8FAEC6F36B47625DAC46AF37D9A04536EB5D64B84D17FA194BA862BADF76E107 +548B078BD5DEAFEC764E789E6CC8E78039801CC4716FFF5E7857B0FA3BC31CA7 +E1AB37C519A9EFC58DD1D3926226A3AB147EEDF10D63CBCDAF2DE66E4356711D +EFB9601764562A81D21D943A01AAA3D814DA167531C164BDE763F6E3D619FE40 +4705A2A03672929945500B4D11F01ECB2B09CED1927029D49A9ABC19B23463EB +0FAB85297CE11F97C1D560C5CFD27691E39FAAA95B468A502988BA484664EF88 +2630187E829EAFC67146942DAFE5DD566A72FD6BF32B33F27B383ABF99F9E438 +C30F7CF8513F209A6B4E76F16BEA603005E8F71C817BA98D25B415B930988A1D +4EFC4CC7BA7801869D53863261CCAF234BBC398FFC8D7F736F231E77DC9C0EA3 +1AA359D0A1962649825F59DBBA3B5975D70B2D6FBEE024FEBB2908E47858568D +4BF000D59D21F549FBC46726878B0123BC5F2450F60B092AB46065DDC9BB7D41 +8E3CDB9982369E2CED9B88B58D47A94A108324E6BC009395CB656230FD9C5EC3 +8631D1F70F5B29CBABA91706687A4EC238AADFD7BC3B43166134AC044E72007B +8BB28A578560F256B2C9F818D948CD3CB57E351BA8F34834C164F3AF6F544B64 +0DA5FF8D23E70669BE37DDD66EDD81132EE4AC92607D6309C5CDFC6D800FA012 +BEDEF9E53F5F3DE3B0955FF6D7F6AFAF7C5026F2B989F8103E4FD2E39176E5C7 +A50333B89EC266B1C39E2534EA4AB75B62B90962065D26D8958DE43A879FB0A6 +316D86559080C6048BF798AAB878E578673FF67A92741F60CADD40265C658184 +A42E9B85997CC8BB4696F50CB08AA5F0F1A658041F6C32A0859B99E9B41A0141 +E9EC90FDA5A358995A7FE0F8E7D5B74F1CEE7C6EE8272B35BD242B5219AC103B +CDD20FB4F83F7BC30E2D0DC150B036CEB93C92908D53C6FD6D2D5BE1A1EB1596 +CD9374A4F388507EB1624048C79366F13C1319E410B9EEF4F33C5BC5BA7392CE +852B8F2F649AF0781AD969BA91CE623BAAE3A45626D4A6D98F210C30C60DFB30 +72C19559C54ECD9FBE406551B0B3C8B1833A8834E1BFECD87A20D90B25F4859A +3A7A21054BD82BD20A3E2112F447ADAD7BDE83EE87ED04683DAB283627AEC13E +450DA15C25855BC4ADA345C1D92CB5880AD4466DDA84568FF703A824A8EE8E29 +F0E221661D6BCF20BF046F80C044A860A2925E96063CCE02D044DAA35923E5FF +6DAEFA7845ECDA7EB4D3145F0436EB4850AB3A65120C32BD2AFAFF65518A7529 +AF8B2E8F5DB78B7F789ED6144D3EE5588A64DC1709E64C69B3907A8B4872AAC2 +896172C0119889060CFC265751C8A781208282157BA8F925BFDFE72E4AE0BB4C +D472F838F9FD40E229A3B36F18D96C99FE8D88CA44BD2702C5723D7BD75CA5E7 +E606909DC6EF9550DC7866C54E6F08F6993E6AC0E78CA0FDB60DB16AFE9149D9 +CE9E29E6461C1FDCAC59B0CA7814F7CB663BD335998F2B946407D92791AB32CA +BC3FAF02A19178205981B654FBC761D3316337936BB9C02F4435E9FF33A93228 +CDCB3DBD347E15779CEB58473E78A5AF2F234F2FF350FF5F2589FD2A3F38EA2A +0411507AE1ED51B550AD45D561344D3A6470C9449E25522F261E9F861A87F272 +250144D4A7FF42EFE2F53F262B4D50A9296958A5FCCAB2A72192C87AA4D7163E +F5C23005FB2BFDDBB7696A39A987822C4D71A1BCFFF58FCE32435CE6580DC9FF +F02B40A04772837D1C090B31D98E73E79D6E63D973AF32C762643D50575E99B2 +D2944583F89A5C23DB7BC78F34E2A23079DFE9CE9E9AD70C5EA9AC910B721861 +9CD2CF56C2E9F92311D2F4319C4E55411BCE3D593188E4324A653B730C2435DA +3D2839B68C3919AF4DFE343C1F1BE951985F50F264253552CC514B6962EA363D +CA92F7AFF2A2F64B14194F69137D3EE3E4854B0BE9E9D9400EF10A9F1B40A01F +0AB88A7542A3F40A29B012ACD52C644EBE181CD24FBAA9A2687A182BDC142695 +6013E51C2A8E561A067760B4696EC55E2DF1D6A04CEE65E74A11F712BCB2F8A6 +9994358EC86660EC04F7DA6C7A133CAB415B034B567F36DC71EDD3DEF8F0802D +437DC1488532EDEC290E147FC9279F4821F0EA2F5BA6E2A43B64CAF0B1942F33 +215C18ED620C928F1EA7D0452613927FE3A78377C01542FBA8A397D0C6D6D26B +AEE8F0A3C15AE5CC927CA38E4C0CD2AB9C71B6780E5EE878523177130C291C70 +75D865FD73B3A875F450331C332ED0205F74355A07C528AA047568789CE16005 +A3CDB32578707DFABCA888B476BDB2FBC69425F9157AE29C0E807B4D996DA7E0 +75C8F714F2EF2803C456E2EE318F6111C286CC7305D2C1E270643BAD7587DC7D +4030E32069D4CB84C8F07D0DF1E492E4F4C9AC6C71ADC174925CECA25FE6878C +4C2BD2D4E3A3CFF16E0FCD8C308B759C2A4FEEDF484BEB0F5BB9B7895DC641D2 +922631FD2E23257128523B31B369AEC4D3A63E3AB3DBE2F649BA1C2E4BB4F8FA +7CC579D3C6FBF2B045EAEC3E5522802DF1E107179B98CDB9F0A9D400CC5DC89C +561A93455644ECF841E34C28FD690062504AEF2D5E09E9E84230E93B56B741D1 +1AC88BDB4E77B90D49DAFF1333758F9E72CC153F4F1823407E9EA929067E180B +989D5B459D867D3B242CECABDA3439BA08BE3F96155B62E3323FFD874DB7897B +CC139739546D83739C5C1665F6CCD89F74CB7C07138891E23DACABD4B67AD04A +1DA2D547378B8E77D1D6CF3A89295BC499F383FEE55EA8359544EF60ACF1F750 +1C607FFAA1AA10A361DDDE23B2858E77C71F0FD2D47ECDE5E77CEE1DA878A8B1 +40211679D7691011B81246ACFF2B487F106FEFF52E79B7B7B05442D846FA7381 +98E1EE04940FD3446A516B47C815943870C9CA9C1B1BDA2894AD89DEA6E1B96E +60C94BE49C89A0FC4B009AEAA8B9E658798B79AB404EB06515D23D0C83465473 +4833AFB6B56761858EDBC5E125891D58DE477CD512943AEFCFCCA741D39CFA02 +E0CBD9045ED5FAF2580C39A1102196A85E1CBC67A1C56A7CDFA12BE2AD351D9F +37D4783CD6A8B0EA717B5FE28D7B39000712E37E622A821D040AC927726402E3 +63345131FE928E3147B83D619DA8F212E144B19EDA829C7F6CBDE636F76ABEB7 +82658AE7276C2F8BEFD02188598DC592E05666984DA2BC8C9F3549E96DF45D44 +9FC713AF972127020E99F95AF3904EAA898F4B67D19BA296AA36FBC14C4DC5AB +C88DCCE567002214C7518098D015FA37AF02BEA5D9F5845FE3FF9037C15EBC79 +4CDCB7D79129ACBFD2573A884EDEAF3939E2D3D6967F1A0117A0DC6C8597FD47 +01813A0B01D60D7709BC55D5DDFCB08F53B441D7EEC6544FF96638CF1ED431EC +794A0E716F63233C0D80E8B4123F30E632AD427857EF57A6CF6A106F5382EF74 +F9088615AF05E3362609E86DC9CB58CD2F709F8196FB61FB4F82F9B1F0792B09 +D6AD2F194A9353F60EDE331B84B7704F0C797415FAC6F5DBD56D39B44A45D1DE +B6A2319784AF1B2A9573DB75B573926AFC074627FAA9E8B4BF773A802896CC96 +65B535DDA172851A2F052934E7D7D593D3E2644444F7C635179D00536099420E +CC56526A9FBCA1B2DDFC48D479DD9A928197AE138735926D72737FE8EF7D1B21 +6425B94AF20B5EE8BC00FD87705DB8DF11ADF16715177FE917C2AAE6DC1CE5EC +EBFA2BBC044398B8F85DF05D50BA8A53E97F44D6CCE9690F901A50B844416408 +91F0DA30C55BC25008122D9A08EE92A8C84F6CEACF40591E4320A114E2B62F15 +92971E5DD0613D6D323245F1DE0C5397802E88C79D9C8C7719F4A13902828BDB +34D6E8D8B68BEEF5A4AB6A4DFCD93AF6ACE8C60A16A593474CB17982F611D6B1 +3294A28699B8E8E73C27C68910AB90B2CC147944323A5F339A5844B674AD75EE +7BA8094D3BFA4FBE6D1EFBBF7603607E38B920BF9CE43E418452E4D61A6D28C1 +F91CC04699210332A1555931106ECB43AC1FE2D08882F0E9180E5924C0335693 +AA13697E9F7F1091D71360D373661CBAA631992B3B2627DA5340DC655F712572 +FD675340127A1CBEFE3656AB4009BCD1BAE64048275146C32E79F031EEC428A2 +0B786601B1B44D5BF9E464CAF224E5636B0D2D83EF07E81A545EE9A5F9A531D2 +064EC94A90714E13760440450A6ACF3DD244C32A9ED0A65C546BA46C27FD7801 +C94F5C0735A1E9E6934D30AD680799FB3A761896C9E1F1BC0422CEEDDE021770 +1837B9A79B0F8775340CE0C2A18E260F6C471E98A3C6E4AC73A148CAB6EFAB3C +E50F14240785645FEE335349C9B8D59B99FD884EA4A1C878A5AB6934511DA544 +7D009675FD5B62F999ED528C3B70D337A7D93D4D14522D1270B5C345B5ADE5ED +518AB80590221630B0E66A85B1DC67A6CDC6B3694F8EE53BF90223FD68ACF7D9 +A4106D543E16EA756EC3CF9C96FAD7E45A8966B8BBBD5B1E5E9509F2DDA57EC1 +AB2B457D495F9C8452376C11C649FE4015844D876967666AF9824AE5E3ED033C +D3DE8808897B223FB36CC42BF7867775B8B97610CAD61760B48C7F3F2DE23908 +035EA9A89551B4AC734DEFF55D121AA9D365BFE4C621AC78344A11360E042213 +EE8F7EB0EEC8BEC6C9294D22467B5D6DB1A0B0E03F371E1AE162C5DD46DD127F +F8F75142EA07F5F5E3B4848E9F4B884F0257D4FCBA87797839A716CAAF03EE52 +FF4479EB9FA912146C609AD0784C7EBC41CD480FB7B3CBA7D5BB91BEBA43B5BC +AA5E4A9CEDB68B34B4EF7A15AE58EEBD677D7D2ACB6570A569F79AA9F8C08334 +2575F0AD37AD980DECA14BD61D6D0F38DA4C8F5E4350778BE866AB63AA8260F0 +3D9105FD3738B1C5417EBC9BE27027718016DAB611E3D06529A5F9C2C0A05371 +3A7B87144805AE4E317F26B518FAC096F5A9BAA8EA45D77BE19CDD1E352FC955 +1ADDD93B080C6E95DE94CE3CC6AE60E797B09EB9FF1EA0B5C60822953F8612A5 +93923E7D7FA07A86AD52B23D3D0B88630B88D6E8C62D009DEF41CC7D95EAC8EB +B26AC8E3DCF0929016378EC4841E1C4F951059105BB7F4D9D827ABA155102A09 +0242EDC57D050CBB9A0B6C5302B1534EC041093CF0C05C0E30F0B3513F3F5356 +75E913640AE066B795197E009D880CF19ED6C92FBE4D9CD3C96C88A59F2097E3 +D9F0F923CF7537FC69D5C714DA5E53CBEF307D8BA7FEB8CAF2DC63B9B07D4556 +CF751C7AA7CB1268BEE3591838C5DA625BDD22B4748A2118B7073C7AC7A885A1 +4996A7900CE4F42B19383E12F0BFBF0862E3A539F952038E1149B57D3B92DD18 +FC33B2AEFF202D53D5212300869B57A104AD5640DDE1A5E3F1240482EA9CC7DD +A63BE8B6DB82A2FBB5DFD31E72A6CED413ABA65C6DD3674A76E547A4CC9C1C5A +504992A649C7F2AC469A9BCA5E9C84333AA74C686A863A05FB73110E466A34C1 +3E3AE5E21B912282BEDAE14864E420B05F9E2EE8B1C523B362A4237929BF2D06 +A0D398D91ADCFD021113D4489736B4D8E703D77F2BB92973874EE461E76ECFE3 +D114EEB3F611531FF20CE6310C338C6C426F2CDE535C69E3F14CBFE16F48C7E7 +7420777D9A175710174DD5E23B2BA6FFEC521907939AD66488857BE8021B385B +D6E1162BFD8BB36174E0D5C238BFD778BA5817BF31B2624429080A5B93AC98E3 +B6C5E9C792F9B1CBA7BBDF63277A28B6891DDCD36D0CF656C4F510C77AA08991 +0545717C76D2289D77C79DB34F2FF22E29AFB3F5E9B6313A2F582E4DDD2373CE +6064843D24FBC35B1A08AAD4A9B408541301166DBE585317FF2A8E15C25DA94F +5A5B9D11F5F0B1A658648C529717151A96623F590FD41908A5CA20CDC0D75D84 +6DBFD25E5D4739177AF9 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMCSC10 +%!PS-AdobeFont-1.0: CMCSC10 003.002 +%%Title: CMCSC10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMCSC10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMCSC10 known{/CMCSC10 findfont dup/UniqueID known{dup +/UniqueID get 5087402 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMCSC10 def +/FontBBox {14 -250 1077 750 }readonly def +/PaintType 0 def +/FontInfo 10 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMCSC10.) readonly def +/FullName (CMCSC10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +/ascent 750 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 45 /hyphen put +dup 47 /slash put +dup 50 /two put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 105 /i put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 117 /u put +dup 120 /x put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3C05EF98F858322DCEA45E0874C5 +45D25FE192539D9CDA4BAA46D9C431465E6ABF4E4271F89EDED7F37BE4B31FB4 +7934F62D1F46E8671F6290D6FFF601D4937BF71C22D60FB800A15796421E3AA7 +72C500501D8B10C0093F6467C553250F7C27B2C3D893772614A846374A85BC4E +BEC0B0A89C4C161C3956ECE25274B962C854E535F418279FE26D8F83E38C5C89 +974E9A224B3CBEF90A9277AF10E0C7CAC8DC11C41DC18B814A7682E5F0248674 +11453BC81C443407AF41AF8A831A85A700CFC65E2181BB89566A9BDEC70EB4F2 +048A6EB631F05C014D372103E37FC3FA317EBC9973565A638403DA02E48B7D31 +CFF6C241DC5CDB470561002FF46437C06EF93BC99352DF04393C661FFFBF4BA2 +0723ABD9B3E9CA9E63BA57EFDBAE684655CBBDBA15ADAE43E1A2C98A3CF060A3 +D16AF8FE3A49B50A24C20EEED716E49AF6013D4D38CD9CC41A91C17E4D04D79D +567E1EF49110AA9C34464E95D81A730ECEB2C9AF38FBA6B45E253288438B4CB3 +DC75B3A906D4357293BA41E59C35223A6C9CBD6FF5FC90C2D07CBB376C7320FF +435A6251822BFCBB612CE630EDF826C37E95F541C21B93FCE127591D5E38165E +2B58A34AAE37712BC58B63FFD70AB80F4F24612CFD2F1466BAAF3CA2BCB45148 +D0DEA0E9B8FBA4C4FF5B8B3CB02E461355051842BD1C94F41066B9B909DB83B1 +DCDCBEF7CD00A43E4C0B8191A29600CA197F0BA227FB8309BB539D2A620BAC70 +8A1AB2DFA51ADC9873B8E5582DCD3ED154E5D727D1665F99BD89883D69E6CC2F +DB3A57AEB612171A88E22F038461DE03FC357F771675E34E90D4D19B4B36891C +9D2333960400E97494F4FC4DBCE6A73C34A0409E433BBDC0AAAEBA7D3555066E +1CFBB4515C8B573C9B9DD12ED5B6ECEBE35AD0DDEA9DB004FC6CB540B5117B49 +59CABE5FD74C6F5B6482B42C20B5FF0467D1DBD7CED2CC651CA57852B6FBB402 +A6764DB342889132C911CAA713A7F2FDD8A5E849345D6C81025E02F5B8B682BA +90CC9B467FBC37362436EA6BF8EB62D784B01D5430147945BC09D1F49EE89F2E +3E2B8E6D439248A56F82F2E03EA5C7A922F2813BE6538A3A423BEBC55B345AFB +3B3C125306749E137C647D78028AE1FBF3E1A82C260132832A9668F454D39C41 +736717DED0A99F6B11F005F0E1D07FE84713AAB4C042FDC166AA146D7B5E9198 +E4F485BE5B135EA281FF1C1E616B5AAF02771F58C5840CB5A427FF9794F93E94 +17FD799C78AED1DC4810BCEF4C6C51D3C1504EA2C6F2B29805B7ECF97B5F637D +FE92E168CB9029E90404CB54FB312FC7AA8A9F2F524C03E61F03B1E31D4F061E +1677B39D5D30C9FD4673E1723F4AE3CCF38593AD6D7F61E9DF3C010E51F25085 +35D51105E1464BA146A78D7297D4D310AD91342A0BB942034A3EC0696B467367 +3E39D202D637E6B14D0EBCA6AD3CF22B07D4CA69C0FCBB6C93782B2F0DFC5AC1 +5D8A16CB5EDB671A0C1BA9D10F63CEAFCD0E06E42C730C8EF769CCFD57937245 +658F486036D37E8BDDE5670A212FB488A8753322A5B170C9662750AA958C0BBD +8E97D8239D2A08B30416504DEEC4E506013E037C91785C674F8A6A44E23FEE6F +CCC00CC5E4D355B0871FDB8ECD64F70EE32449BB5D6F84F8C8AA2D5B1A489BA9 +D7FF2DBAA8D0B84054E93D64D3E77850A3724824914A0F821EEC3D605DD851A7 +606936B8B9E24D6E932E16C448140FE94DD96C75AECB73850035ED9C04A1D93C +64B21E7D4657E030483EC5C3554AEF8BE4D0FE5B9743B875340B09E01273DAE8 +F256C50A1A8F2E0417440A8BB0173F59E11523E1CEF2593A4AC5AF2167627B00 +C5EA97D125EB8A4BD4C372877ABF10F5B7B149D73787E0834BFB3084E9508DF7 +072DD71637019599252059738D4D6BC57A9358E4B14F6AF9C4B31DB8E25C29B3 +7A15F9953BD73ACDE5F0445A5DC406BB4635FAE51C1D8202AE31730E6F355317 +1DC197DB0B6177307C60E5D38F4487363EE051B2E609A52BC4D45B14B6558B6B +5E1618748794B8340752CDBE7756C068975B559615D4CD5A97CE30BAA7B2B1A3 +2FEF2E055232B24FD8A21BECDE1B6A479A28EC80AE2CD16DB50B30B4A6CFCF06 +491C7CD5AC29FB964D4846415233947522676DEABDA0D9535F8507D33693930C +B4E4240A02B0CE7EA288516B8A6EF908D7F8BAF9012D052C6AC96D9F8F6ADB07 +8984F3559C5E7E3022A957982155FC9CD599C74E18328D3AB46F9DD15D1C4C3F +9B93ADB4489BA02CFCF57DE6270F3AD2F8597BE71786510EF08142F430EE5568 +4F9DDB792B7C46B6135E341DBBF062FBC50FABA80CD4A384157BAE57CBEA9781 +AA4416323265168AC097DE7E30A0D4750143A4FCE70A863A31876A8FA5327C3E +36E89589E363AA2B1A6E8B09F5AEB8FFFD0396067173465B6503383DE517A6EA +88C0FC08578398C2A721E5AEB29F4AC9BC990A50CD87BD35A11F9E81F68E7B85 +5E5B95A4F9A5D30379EF90D78E1E466DEF867BAEFC4F5ED2C762BFF099C1C2B3 +5E0DA1C2FB33BE1379413CDDB1EE6BB3A495331F72F2FAEB8152E8AD5FD334A8 +AAB0082A71D5574B618EA8D487B8FAF1B445F3395B1E21224F5492A0E06F5152 +7726835C900E2E52BE3B7B654183AEDEC68053DD0AF19EF6DBC10B6FC08EC7D0 +CC0E2C8FAF8C9A4C21FB7C34E074BBA4EE64226BEC8C928A784C1BEE35B72EC8 +E9295240B29DDC2539CD118BAC38DB3917D14CD33AB45FE47E827F2A2B193AFF +53C5396C52CEA4F43F06AC2D08C74CC85D608CBA267175EC31311EE25AB48DD9 +FE811B411AE426C9FC0B6044D1EBF130231623F1566CEA4D1C06D8032FD9808A +94479C842BC41B675CF6B90113BD681F8D43F51D5016D80EDC11D7640FB950D4 +E709A46184406ED90D0892A4CD9062938A8205697A200DBE1F38EB166EFEA0EC +4FCB45CDAF82EA103DD6FDD03D146F3E42EDA6496064DB3F4FC1C5280C9E604B +D5EBCA08BF2AAC90156C11EF68137DC76502EBF216F3AF3EE30DD2676D218428 +F41C655093F8B530FCA378B5769F262A6FDB4B66B83F18F050E77227E28D71F4 +5F4425CB8D51B3DAE872CD86D7804F870BC564A6DA1CA13EDB00D131CE4F6460 +7021661B99612629DCC20C85CF155EDC5111E015A77B0B82A8FC1EBB374B7EF2 +361419BA93B857D5C9944BB5B4AEDD86ABCC261542077FE09701C96370168579 +5F89D5AAA08D700E2643E88C2FB8D1D56D37AAA9744872E7C050B4CE046B47A7 +83F224FA9FD311C955EFBF173042C8FC66524135F579B1397828870D5C9DC71F +8615FADE2A1CFAEA90F732B6C266E2F3048FC43EDA7A6B6D98E9DB793CF457B3 +F5877E7A055C92B0246FEA8C72B3B3456F93BF36E2651D32CD614C3AECC0B4BC +F824C8363E593A6458D37408FC5B09883B280005DD24123E2D4B1B85F4113327 +EEDD9186A4AF2CD6439B46C5C168C125CA80F9EE9E68906620EE126CFBF26E15 +B269838A54224EDCFE2A373EB750D4829BFA410DE5F1541E428BB1E024AF496D +F5F1C151F5A645C8622F2EF9088D57A2811868A8A8BFCDBFCE3ACB8463AC35B4 +8B6F44E1C1232805842F56FA468F81FF37D5D55B81CA56058558544C142EB3BE +07CFB1F75DECB1E48C14D6AFDD455989AA6FFE8B8DC54F462B3C20E31D270BCE +8E68E2B43A6625AC7E9792704FAAD6CE8BBE0B341DA7189EBB3E9D5375B27FD4 +12506D5BCA50AEDC6955E6C3C7BAA84BACAF7ABDF3A270C7734EC3C6EC22793B +E67B0E288F99699D38DA8B79F2D21DD97945FBDDD132A8F0BF947950D3C0B4AA +EB7B2C435AFE54489E1930610311D718AC610C21A644F34CB2D1959B3066F39B +EADEAB5CFC6AF4D191D86B02402B00D1C5262707861C5308730579795EB53207 +A291A27A8B5C4DAE0A87A0C6A260026CA3CB620E1002E066A515D7990F3DEA29 +0FAC962E0B82B7A6C86B1EDC54007822BAECED673FAAEF88C8109777EB79A53F +AF3C58546974F2F56E70E9B5CB59ACB5C27CB01895557B2D82134D7F02029B24 +3331621F38E68717F5CB68A8892D0B9C0A8ED4F8BB56E80505170D44C6856128 +2DED0254ADA4875CF56B4D97372AAE730D4C77A2940DC8C178274DF88A9EE037 +215C6FE7B9D481EE4DE809B124C0270782411ACCCF89906A8B143D0BA8B2CEDE +E9B90465C3E57A4FD9AD2702323450256ABD09A1F8C26F08480317C08B75B720 +70A161C99715A35A94DD5C9647ED0F8A5337B774C8E54F9653AC859485A1FED5 +37B725A7E4BA58711CBCDA6054E34CBD8E9F9460179DA7DBD243D81A1531FDDE +BF2BD425BD9DBE75EAA333B1F5793669A215549A774597E6ADA16D323FE5601A +EDA41092730009A99BF5B5AAE281844A6BF3292D4D4EDE36B4FD8BCAEB6EB72F +AC5D3CD53D0D621CA9EA8D254FDCB2B5161EE9E80B266563F669805A3A15271A +0753983004A1ECC7FBADF62AFEA4DAB49A178C231759857DB910668BDB07CB3F +7E8EC24901863088B3231EE3FA563924032C91CA9D68DB398F9BD9AC0C651EC8 +9051C9F709CD784F3FF5951DECD7E869ACC34B83AECDB011E6594347855EE7F5 +28811F744A4BD70D4E9077EA7EC19FFCF612689F12B34332857AE41F13E6D16A +962DB9B6AAAC167B9FBDF0068EA13412F318384134B29F3F0C399F1973A3564E +F9C3C39B5BDD4C98D81A6CB476E565860B50704BD65ABD630A5F1372F2D826F3 +3AD47C08B8AD3176A170C369EF3CEEB190134006D6135C5B8CCDBE1C11FFF1EC +3F6D8C46E15C4F5EB9ED9F31A129594D542D40DC3815CD075A0DBB648D868AF5 +15A05C4BDB28BF23653A3AD96CF6AFC065DCCCB23D5D9A945F8CBB539DD3BFA8 +DB8F1FBF9B6F25B41EB4309995CA3D5D6ABD70CBB4A2F0C6364E5439AD1045FF +72F6B45A30BD3A548CFAADDCC6C15D46F6D783D3E520215751DC98335A4ED512 +D7D19235CDF911CC69F3CF4365B678EBF3E87C456A4E77339C74930083445588 +462529C22A96A28C5CE87AFA0C981F26CAED5A1C8DBCDDA612624DBE0373F026 +465185A4D8C73CCD8D71EE97116F8F7D341B87FD78F9CCB9FBDA2A7799711607 +6BBA855AE9D5C505870DC85FDFAAA130A351D56AADBFBD6A7D52055E3200F8B7 +8AE9A00092B55DEA8BDE224B4BA7FD4A191CB1FFC4CB995FEE1AC2883AB69E1A +AFFC09AB5B9AE311A030A5BA05E2213F9BBF016C8FA80689C069314D91274B20 +53FCC65C7D7B3A7504887525BFFA060304931672A078BCD7F269595686310E34 +E1ECA868899BC402D17EC36CE40D5041D7CEDA77F7764C9D98793F5334F574DF +E93CB10A5E8ADAE95CE63D2339557091B4B4911A4987CF21B7F1DBADBC2DD605 +8EB72473C1F2EABCC44E0D0339EECB55DA74085606C3F89D57ACFBF5755A5395 +CA8D4BD47E4EE8D8B882D3AB31A1F0C62E74654C7E041E4FF2693A38A9796064 +46526B0A37E6B5BF8E48E80EDEF81E34DA8F6CC9025936A4D0E6D709D61B7B5C +AB550397117F3F9D2F5A542A64DEA8E1178F7337124D6B56BA92F659AAD694D7 +391028731E01284BFEA635314A8DA8DF7A34EA3B6B2F8803BE6DCB423A9E8015 +55EBD90EBAE8A00298B3B6B1C02BA516AF528122C1F2B07EF69F5466C2C36643 +0D665D6561705509B7582D8301AF3C32E2F3B9433E3E04D62117C7E8A368BDE1 +0D4DAA1C415B2A6573116D2A169AFEF700A83F55D88813585E89C94C07802BA8 +3AE8F9BC3CDBFD9C2E35D062B1FD6E79E1EF104FC70B0AB09D12CA027F33F85A +22F0ECBB4AD55FE8C616B82C46CE69A600E4F767BD7A9C5F9B37A3196B038384 +5DEF76A8884425FE598A63AEB19FA698C2AF7CAA4983CEC789268E22BA051EE0 +20A40633D22D8F707626ED30E8273EAAD1C065F0B2E1718B5AC853ABE09330C3 +B0082A71D557169BC1559B6D285A3499D41C4CCF1F74884EC3917EB9C574371E +AFE8578DDCA459B8D22C0188A8D150437B05FB92022C95EB6FBCC954216B5FED +CBC7C90B9A1F061376A9840FB64390A6BA99CFC8279A86A730C6DBFD14C53C4B +7277D676BD42203677E9ABEEC8C97E13DAA626474513B06F8734DD784F2FBBB9 +B3B448B8E8221E380AB4A86D3A683B86A54129519D50DD4FE63B30954D805CED +A9A5D9A39C58B65B08E1C19555E927C6DBF7FD07252B2B57F62B905D6B488201 +213D106A41033B26FFBAC2E616DA6ADA6D560BADF10E68872806CFD6F6E19D7B +57CF1F7A030A7BAD374F16A977E0ECB8742D034ADAF9C247DA19C8AEA74EF6CE +DAFD6B1DC562FD3B77E4D008BDE4D8C7FCA9895DA1AC9EAA01C32A0DA712B082 +9438E77230D38FC4153E1711417B918BA6CC03203A5FF082AF880F48518D8271 +C1121E4F1386B30A7F1BC6F10EA98443F8A65C867A109336B808BC9A8E2A75AC +F950835AA84B56F59DA4C8A18859C3B68F6B6DE09A6675F639EA9107BDB67B0F +54EBC564BC2D781B61C14363A54956BA78A2BB89C9F966C94EEFC29EE9F4E23E +C0BF750144DC289F0DEE1F8A25BB52E54F656FAFEE4BD2DA57E1306BBE648051 +1D0CFD6A23A3DF082E3CF13197BF1B7FB22B2CD427BB78F455C9634DF989DC90 +7BB2AE247B1C99AB2062855B2948341B0F857ACD750B59E370A6698C6A1F5287 +72A4A9628A592E313956C242DF8277EDD2F1FDFB07CDC104275FFBF796D7518A +DF49FF3CDEC3BDFF1D290C382F244DF18005ECDABF0C5C2C64EEC4383E2E07DC +5C82587C071E59B46B7BEF31D268F39D9B12D534344FBA515E9DE8F166FAD1E2 +7D1558967AAAD3829D3F7EC6938D20E5379F414532976ABA844D97A5E9078901 +EAE4D0ED1F4C7EE7A2D80D891A5013D6409A38ACFA497F5A169EB7F9F4890DC4 +62FA6A89EA48267331F086992B9CA9305E16611E6AEE67DCDD588A25D37F45B1 +0DE75C802EE021E574B64B3969DE2E5061ED9364B646C38D4BBA86802CA6338A +94E135D2256920EBFB1AA22D9E90C7D16853F0DF9F2D942748EE540E4FCE63C6 +5380D7AB4ADD6CB00FE8F7867E4862D8DB432F28331428CC350CDF7F447A65ED +D7683ECA35A22ADD06E9FE6BAF060913AEEE7B2B8EE4798E437698CC9EB2428E +74CE73F84D0D2292DE709D71FFF8901C3505370E6F1D4E28E6B7372492C65A88 +159371B1D60D77CEC93B272B6C5394EE1D2EF9969DB2838B8E128553879A1BA5 +2884B0A596E8FC3D1E648B7E26A4AC57DF09B9CE09B2F91D8CA618CA52AB3DBD +D005A56A420366069B73146A6F58E88BA49671A1AB7C2070C3D42AA770285143 +40AE7D7868C0E1993506B07C086AD7D4F28CE2D15853FC5FBCBF9425D8012B9E +DB6E1E5002517659C8DA69DCEACA94F368537668843D281FC11782F1C5F71977 +CA215349EE6F20565DE3D8D8212A40E1227A4B22965FA64A0B02C62BFDE97E6F +C3C54FED4057EF9D258C42D7440C78C5E0CC58A40DD74ECED4152F70A93CE71A +1B3A57C46F74A6D27BF98C97CCD31A8EA487260F224A3E40F52C65490AB4098A +7B9EEB54A5A415C8C88568F7D9EFE74BBB785FA18AA27D9201F28BBC477A20A5 +D1307AA78EB8C7CAD409AB64B29E4115E45F5FADDCC80CA74B296C4265A40614 +37F2ACD8386AC0202D6FDB6711E8CB06442F209D781E940ADDD6D881D4F8E874 +357C533115923B90138FFE31D3577C6AAE60D768970FAAB682CD0DCA3E9A9A68 +6393E4B772691C1013ADFFC90C508D51B02D2518ADCC7E79F7DE5DF9D18B8435 +6129064DD1A3995E5A6F45D78287CC10A0EAFBF47223494C5EA934B1BC2F7C53 +686C5880303F9E3ADC8B100D441D944686E1FD811C646C6DD0224F6CF55FA87F +D132EF50450879A25242A18683BD6D0266F8F333F3768D1952B0F32AA75106D8 +EC0AB703F287E847CB91FFB88CD9DA174B49171822BDE34621CF41EA772230A6 +3088F8D19CF2364A329162D39E166AC728B15800222E54C40FDA8B73C48CE82B +B2B3E7EF15157FB4510BCDD7EEBBE3FDDF708EA08540D94827AF3EA1B210446C +DEA9EE0EE9B4758863AA33FC296740F0DD9B42A45861516AAE6208F189D8CB8E +BBBDDBCC34B65A7D17B8BE932148C39084A9C71516582BCE25EBF7C1E0D84314 +45B273AF903055D53313DBD159BB698038A397AEF418B4446739318E8D273642 +095B1E04CC60718A2DC2BCD99B34202878786A58AE7C2F43D985874AB8A3F204 +4DBD4B9240EE96F0487CB687830972BF302F262C6381B2C79773EEB152B712E9 +34E8229E0B59788EB9B9FC1AC1E123751D1FF032610410F0847E6B9B9A575306 +53FC00ED82D0BDA8EB008F2380FDBA06D2F8C0210A261508BA95DD600436E0BF +5E8A00CE3C92859961557763D413E79CDD37FDB07131FDC420EF525CC0B5377F +9772D3876DBFDB57FE6275D187832F2B7A635967B201E70B532E85838ED3874B +82B36AB9EAB7DD4D2B5C4140419CA04E87316E802CC93DE6336C22FEBE80C3A5 +D43A0F808E5E6A17F7BCF812FF5EE5AC1959E07F36B24C9192E375FCA3C0A84C +1D1DD2093D4F151B9FEFBA90DB4E94A1D68E49DF5A715A5BE04E7B7D8C384D61 +5DDD71F057FEF51DE7D002AB3BFE0096C47EB3AAC7B89EEEB9E2F9CFC6BCDFD9 +A438C1097D5253E49DC0DE5B6E8F976AE8894914BF8CAB5236C8A3BB2A437CE6 +374D96AFC592F1238357817E1F2836EA763A3C0DEA2DD3F7D758BA61307C21F4 +796A18638504797DD9A5131EC48DB0D23FC9A3E069B2FECA5B36A2260C6FED2E +6EBDE3AED119EDFA96B837C56202ADF7F7747291A43CDDED6EB7DB5B9373CB78 +F6FA0B92BB2C17AD8DA549E878D8DEA681028539E5E2A223E2F9BA4CA09A6FF4 +EA195F1EAE62CC33F2282888962B9032D1C83EC4EDD832866A472426EBA6080A +75E02F39CE0421C5C06B9D593022C23D675D7BE879FCE0B20A9CBB394F9D3815 +9C847518BB8DDBF3A89D699C1FA84E704B02BC85D61ADA5E548CD8DBE269A3E7 +03626A0FEE75E116F95B5D31C73BC852C5FDCF524542BFD9D05D8EB4B2A114E0 +C2FFCE282CBD87D82C1D4E64772B0492068B139B1795E287899CED7791EF5C8F +E77391C51552FF08DAA85BC8B9896CB5C792C3E1C4D44E3CAC1EAEC02E4B986F +E5059463613DD3643F8DCE2264FA66D712A0DACCF86DDAB315393219F5EBD18E +E220AD61CE3C67664615A5F9734421152382E8EA9CBED8269ACFFC37873BA329 +20649A6F684D31BF37194952496E8B962B75B83CEDE72F0DAAB761120B710677 +F3AECF2A67F512F7C423B1DA012D0D0D44F009346C4953447950F514731830D1 +59D01BFF4511CD0257D5ECC2CC4A859E0ED92627F659547C8F137DC0F49F06D6 +02F624EEBDBC779FBECB1816A88F02B3565A9C3D42E919F755F3D80F6FAB681B +585B5A49F62581EDE1D1DF1906007A8926932FE74FA2A94B92026DE9D678EA3B +ABC3C2EE5A3757317AD5F5CD361A511F4019CAF77C46C8FFE4615CD6CFDF7F8C +8CD06F1A2DDBD3BBA03FBBF8DCC898EE71E7D19CDE66971150359310D0BB68B8 +65F3E41D34C8D063A71C27B6C0F27753A9E35D291477858E5B734D72C40C4573 +203C5529340CB56BC00EA0E02B3DB54173E6480D29D957E6735146163980F0A8 +CA4086192E6095F411939DD3FF19854F8F58B39A23D3ABA22BEAE05C4B6B6845 +98968C08559A037DE955F77359FC39249C1149BC4634D10DAABB086A23D9A37A +73A61EAB63BE3B1A8D8E76ED94E731169E892B469056757EC885D8AC4FF50E5C +1D80EFE20E40E26006953C53D765B3BCB4C5396646DB3AEF01F939BD163ADD87 +FEB1E55A73722A0866DEC922EFF8B06AFDF2FC742EB1CA422822BB378310A994 +794062BE62D5BC4D44C25655C902F4FB4FA63CE21E095E4DF3723CFE7D2D961F +10A715B194ED855942588BDA460A28F1B5D849A34D85756CC8CE874E2384AD9F +3A1C348996EA94927BCE9715A8B229C0D7FCC2C07592052796D7BAE23DF895DA +1CF991E912EAC97601FD79F35616A1F23D82647BCB49C360740CF010CA4E8ADF +97A9CAC032D12919CC167CA4C2E6C60EBB4AB87C8F2BDF71E28E91A9BC96056F +5D905902AE964E5336CFDACC8C5CFC5607D75CA5F364AB8E9A65FD372BF15FA9 +0CE1519CD7DBF31F92D2A078754E4BF90F3121F6F698DEC238404EDDD4EEA153 +0335941E4EB8F08DE0104FD8633BE277E9ED26FC65D28FC1D604D8504B2F788A +11E2206ACE8AB33D14CE9D4CFC917008D44AFA2B1877C3D42455593889867784 +7CE696EABDEF95872F065DAFEFAC253F367D47127CE76FCB85BBF0684DD1663C +876E68EC35B21593A10EA5553311880B8EF744014CD1ACFC067FDFD46978BA23 +C86FBA05CEB66E67621680BEE0ABF82364D4E3235A20033437C6B84A71FB34E6 +F8A160AC477A1302B4F98D00FDDB2A35ED9B315700669D9D8A3D254F786316AF +882CAC6555A766281A0836CD45D8CD8245CA69729260D54C11DB43032A0FAC0B +05869ED0A432CEF854FE665BACB0F780C9123B4DA1E1895F8717DDE4A58BD3FD +D214195066D4587463E839EDF667E475BC04EEDAEC41422AC9BC27C238E88318 +7DFFED5D04AAFB1F63AC651B1A4113B7CE9838ABAF75632EDA8B5EE0C8474678 +58898AD595ACD99029DC34EB4BADE834C04444941C3D8280B93951A9E8554EF9 +5F0FAA218DD8224B94807CE2D8DF7E4A5E2B28C44A551DB0708B5D6D5F000B96 +0422A8E953233296B6E5EA698921F1EEEBDF0C5CC72263663895940B4C1EA28E +E0E3AF21698D5430D6495E32E0D5F5E538EF835FBCF4A96DAD8F011B145584EF +1C33809372DF602D1FB3D80A4EAB65897F672642E4317926DF178BAB6F9851C7 +63613B3DB11FF07F9C7582592B620C7767D005D7B0C28AF2D309E6CAC222055F +2C20A58AC1B407641B483D571B9E959A3AE0DEF316EFF7A4514D5313C47AAFBE +82CC583BEB32F20E4C3A5650B58812EF357B68F26882D30A6BBEBDE64E2FD910 +AB8D974CE5C968C7D34390529F4714A9F1D2373DB1D912D418225932541FB250 +9C74346749DE9C5662B1C40437E783A78A283AD6EF43B2C111DEFBEECEB17ED7 +3630AE404B310F1148C82F4969A794D945CA5E1C18F39BB6F9C46EDC8BC3C88B +FAC2116B2338E1AF9C975ECC8474BCA351E3FDF89ED4352FF6A3D6C7EF7A7BDC +DD4B2DA9E7C77F8A6623B670963D2B9B9A80F8445E17B85194AD45E02FF10484 +85E0A700BDE9F574487F9494B424646D48999EA67D469A22B9CB72123F31EA5E +51C07370BFB1C5EDB4ADE75E7111A0116C212920F1362353BF58F33D7E8EE680 +DBF8085B46AFC40ED9FFD7AE756CB267D0F321FDB71F2DD35FBD3003E91E2758 +3DED65748BE5CD0D2D244E8FA187749FED44ED0C71056AD954FCF656DE28E70B +93A79EB4D7BD59E92911EC64EA794732A79B9908B7C6DD42C99BDF07AAA06E07 +5CD6497C489BC56B09E44D22D0FE69521A9BA20ACBFDAB8EE718625711BF479E +512FEC4A8F9EC7CF66D4CC44E2D0EA1235BF17C3D0AD6859385CECA3D4A640B0 +762D325D3A449BF7115CE8469A493C494721D6636BCB9C55ACF1D0F3489E5534 +4A76A8F3E3AD6252D8CBD3EDFDAC890A7B497286241AFE35B2261B66018A1523 +4B9FD31AE07A6CCA6B91A176BC38BC03F97D71F80270E14B83B012FA5270B7B4 +73F889DED2D4BFB24536E495F96BDF408E3840AF1567E9960A4F22F0B749749B +C156336BD7F349F2F82CE54B459462CB7C9846CC090E752DCDC871FF0873076E +8885B0AEF490DB0C9FA98A8FDF84EDFD52AB0F992EEB236A79FB8FB52718EBA6 +E0D586512F81079D468A75336540163B966670B437304F3272CF6E49252662C6 +419E8B2B14D240A1DB0CF6EF14E024F9D8C6882F865D7E007B46DB65E2E6AB1A +22C5F096B255E91CABA7C441A3149FFB4E19BA97E5D43779C2A80208E279A91E +8B8A281C079B819BBB6A5B1A62F34D59B7223D9FBB5F5E96F0D9AFEBD3CE3D57 +A4C4D2345776FCA140EA95242C8AF1EE7B93D2676209B750ABFCFC8CAF50F578 +4C364CF8BC46839A4379624D56B7B917743E9D6A284E7B315D461ED66B262413 +A9AE1741C633A92061DF92AAF78A18586CDCA41248C586F7D272378F9CA76980 +202A391CC9FD46794140F06CC75AF2F4986D690939E083CDF9B96D066B1EC8F3 +DE3B68AC8FAB84970B1A199B3F3AA5BE27ED8119F306CC5F26230C16E9D9FB31 +1EE9D3F5175E4D4D7A8A2945000C37BC73816AEDE6F2AC0F09B788C9988BA69B +82CF336482F490F05725696EB080E460FC03B3E28C1B3613C8E5FE3DEA048D97 +4AC72C9955FDE282FA8C8385B30E3A7EFE247B48B370DCB439FA721BED19AF4C +FDC3D3543A25A4E0273419B6CDD7209FB336C1542BA56257E5D31B70529C12D7 +524617868F4F3B49799322EDF504750D1BAAE307ABC4843704B64ED8AD4996B7 +5193CEA660390527734BF1448AC09998E70FF15BD70F8B6388B0A987CBC783FC +990F7A5EA016EBC024F12BC9812C7C4DD6E991DB89415A49D0B265E453732F4D +2B6BB50E995E719B00DEBE74E7D1E291A739C4EAB39B5A61763DDB65BDA6E1C9 +17C49BF1A76546BE0EDAAA17310AB2D01BDF059B066263C8FFBDA53281C882DA +E2DA35ECE5B4454C8031DBECD8675B60E54261A7D1F70560C6D8CBAB436EF058 +5A0189426AF00AD7EB43FBD13976D8D769ED2639ACBF613A308C941CDB5A632F +F76E14224909A8E7E45B9B5A47BDC9B7B3E3616AEC4DEEAF2899A59B6E144802 +534109EB0E3ECD270E417B2E9CD8D27DE637AC798ED5CCF791061297A0B218A6 +1188C03BAC8DD8DD783BBBF8C4C9AE98E8F1EFC4684CA4BEE6D533458BB229ED +4E31392DC4591DF2D2D07632EBEC0A5FA2C4508C1FD48D56EE871EAF4A84AC07 +A1E34CA2CD81ED369043998A23DD01301D41C582963F07EC3417F09ABF45844E +A74F386BA813F0AC462FE268407B9D2A8813FFCA604C342CE82493DAF631B2B3 +B6D3E9F3398761C4B958569F0D833D27973B07F9DA9D84AC512C284844C04866 +74A325E4ED894F640B8F802097B7C6C4F04BBBC8A7BC6EAECC60EBBF4E676A30 +4A5D0DE4AB45D0C913CCEEB8032D1946A35928BFB0FD76AE324E7E3CEB5B99C9 +0A0A6EBAA6F6D8E4292F9C5408D3859CFDEBFC9413032FA1A6E194C5F616A3D6 +FB0FEB8966534CCC9E6D67DFCA105E8994810D8EE414DAFC80B8A95CAFA254CA +CCAA72B84130B5E485529013A35040074072A8A63B2F4384D976BBFA0A743C5A +0A079A2CD15E598801AD121303CC37A2FD3942776FD1AA0805BED2B646D4D1CD +9DE65CB859735EDC177C5A4D1A54C3E8BE7A91BCA91AB93A9DACAC90204CC207 +8432E95B2C47654DA02EC1664566E2137860F16F798E0A1EFFC819F4304B0FE2 +AA54AFE0AF6CC26D417B0CC9E3F5F6B9BD6DDDE6A2D7FC4C840E4AEF73452D16 +241FF01413DF2125BA3563B3A49EECC8EC4D0BF06283B3C8242F362A546E71B6 +21F3C6DA63882992A14E295926387D66EA6D9F296455276D4FEF0CDC706FBC25 +57169AAF546A1BC72114A3A6DC3A1A76CE001962D771C267864A987188BF6087 +183573E3E9DED10D7023965D29F19C8950B6B9B83E680010995360E54911AAAB +44D07524518EE59F58E49485E885F56FF2CF8D30FC5779770685C305AEC4262C +B8C0C194C26F5E122DF5E4153316C971460C3B3B336C1B72 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMTT12 +%!PS-AdobeFont-1.0: CMTT12 003.002 +%%Title: CMTT12 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMTT12. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMTT12 known{/CMTT12 findfont dup/UniqueID known{dup +/UniqueID get 5000833 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMTT12 def +/FontBBox {-1 -234 524 695 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMTT12.) readonly def +/FullName (CMTT12) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch true def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 45 /hyphen put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 108 /l put +dup 110 /n put +dup 111 /o put +dup 115 /s put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1B57D05DA0555DF933BB0 +7B42D264831116C06C79335D519461E7B0E870A6715E3D74A08D1BCF86E3BCC3 +A43FC6BAD1C68BD9D4AFCC06D845FD1F1E70D7A47F0BBCAECE8396E04591E5E3 +4797F646AFEEB7DB548183F0B74C9BB6BA2AA04E7F5950EC8AE97C741D4B2C5C +A8E7A8DF5A36A30B5A7592D95E1DBC63EF33C92FE459792CED29E2B8B6919251 +75EF62089BD7D44A6E1F9B62EC802FBE62B821DA1C3B2DDED45D27964AD29ED0 +9FB7868F3A8FEADA87A8E42D52C1EB7229D7C79B60BDA263F2BDB025AE14A507 +098FA274206BACFB4A0A7257D5998EE8F0FDCA79CB61DD1FC59DADD11E16BF02 +ECDFD706CDA1E72054D4EB55AF7BA9F19955886BC0BD6E0E3FE3769C94AF3581 +DFB2BCD67FE2892AF07E858A01280194D8DD7332B3D0A585C87FAB056C2EAA9B +5AD48D1C9F00CEF8EF0D1408DBE1C03D04B231D7B8D5D998FE0CD7EE19828EF2 +F988EBF6DDBFEE00F04A4A1F4E1A55DED7EF3AACEAB5005F1962C724A017C914 +2936E2E0DF26A55ACD7DD836C6035CBF07981C1BCE3615064F0540A1034C69B4 +E3908E76EF8925D486DF0B4A8E1F02D8AA99585A7C31847AB9382F83880C1C21 +C496AB2DF8E7BD4643B28B704B5F6B53429D3EE940A79135F5BF0396E5B46F23 +42AF406C26D12BEA7A41F332AEB75DF43C15334CF4651A99F602036946B1B91D +4BB0D2E51C20216D892C8173241AC8FD15A37C3CDD8AB4FB67D8565AFA61C068 +95E3D6E46D7C09BBD09428207D506AD43C693F3C3D787F6A5C39084AE45E81C9 +830900DB50DAD10A17E118FB5E9680B5194716A788FF7514A1167DD1A305FBE5 +5925388A2E95AE46E8806E0F7B954D1A9F70EE29B069A9FEB0349298CE5311BB +CAB039C21AEB714781BBCDBF2FFCBE7C4750D7693ED142ED0475EE9DB5D5F94F +4D4613E2C379E494464447C4167C625D70B9DBE4756DEF299974B704A3C238DC +FCD3AD96645559ACA5056F7FD695D2AA709960E30F055ADBDCC7FDF641920A9F +A279AAB98424E76D01937F9CFE3CF4E3779650D7C2DC38AB27FB81EB16C19B13 +D47E0AC60C83641CCC1A00136625FE274C6AC706B516CBF14C54000BC2B7BD20 +A28D40FCD6D9B321855BDA608E23BD365208DAB23983C0D8A7C9DDC28ED62216 +12A20A3068D843B5FA016B8C6B9BBD36356BF85A128F96F0CE861FB9C998BB21 +E8624E3DE453C686D41DA7B72ABD919C5BE2F24440D11962C77742A8C0115A72 +9E974E71247FCD58318A4347813D4D5A73CF882A7513E2EFE05CE8C7195BDDC7 +DF250B59AD14D02D2991E2D0CF2D0022EF52D78F043D6D7FEEC3E77B6982B1C0 +8CE51E4D3C8342C08ABD84EFCC8239883D8E66CB0FB0BFE8699155B179CCD63E +884C502F7F0496A01360C67D7A9BFC8533346485646AF058A743472B3276FB96 +EC4C82188A4A67763ABCE6AF7898C3B924A01118DCE34C77F22E62BB4C4CB561 +75C93226142D43D5ECB9F43C3A275A52F9E5AE4C9BB9E614082AAEAC5E7453DE +B3F71F9FB747033E227E84E853E75E79771B71495CACE8F911329274CE752AFC +46C993132BA8CF6B9DA2CFC11A0BD57C9A4BC11B7A6D68A4C346D9768E6A6204 +4227F51932162DA350878EF80D0F4084C82CC61F3223010D771EBE7DEC1B80CF +327393AAD4C689BF6A791CA2925878C51069C4F06ABFA42B66860082301FCA71 +EA52BED540116A9B12D9741A4C078F207F92B78923C7965A47A3130CCAEF480F +6B4AD58077FBECC4F99F53BC1F4F24CF3777182A7ADC32FE3260C774E5244912 +470697609A0726EECB72390E6C5C5A1204521D45316989E3C0B4D398958D4363 +3C7A4524B500241161C55C4D8C4CB06034BD825AA2CF2A6895BB9A30BFF00422 +553E4346A53B271C70DE5D0A5AEB92F81CAC1A0E75E47229AA80C8DB09EE3B19 +6E9D3EC0E7ECAB7B879C652282A376C52E5BBF5D4BAF051A0A995460B7F427E9 +521743E74783312E8D7100DE1F31C1C7C85DA33D8D0A626E6E6184DDD538EA7F +46D50247225E036DB3E6072395C88026D429659DFCFC6416D22A9BE285EEA910 +F7B1B74275B8B043721A829F2D4FE6140E5AFB78F0CFCC27FF27ACE773131462 +48B271781695D31C909FED024B2F3220C206B63601A1B02DBBE2C5D94D027982 +F9E7EA6D4B0A812D28855CF62D372A040F138069F7C28BE3344262EA72795CAC +2CC8E21D1A666ABFED384875FD2D098066FF0CD902AD6725AECFE61B2CD83860 +82E587B8893F5E09B155EBD813030499E534C050D6902E5F8BA296030512ACCE +BF19933ECDDA6DAAA1848686DAC81EC429CA7AB1A73B7DFEC0750B404F601F1E +6755F07C0784A56E403C5962905E9147E44E8042C3858E4A91F7B8A71143263C +21DC47E481DF1A38EC4A9F682FE059FE80F257576FEF3A3300A36BC27273152A +78019783D0BC34AB29353EDAEDF48FF6C5DC27C1633CE1CE2C03509992549B87 +75AE1100939A6A2F5AA2BC7C534357687DA72129B9C9F2E511BD95452F10DF8C +A698CEE0BCAF726111B63C4838F05AC5B2EB43D04115145CDBF2EDCC1EFAB612 +5E35EF5CCC5F4296536DC96F1326B86C65DE657BA06E5B97BB7C4F8ED11DF9CD +969FA4302F06A5D43B48D40D3DE360F6A7B8F329022CF5B13A33980E8BE54325 +17FE37C9D78E73A74B5734231ADF0594A2E5F2DAD9BCB682A0F5C59507032DE3 +AD0C62E50C258F1F820ADF788D6611CBE6D1988D09D07F8813D6A3EDEBE034C8 +05F7EDC5DD2E4C15B60FE9284E267C8F7DF53F3CC13C131201DE819049324E53 +499FE93874A92EF07AD0121B8FDA88F7D60DE52E2B20AF958A77421F221F8B29 +B2188307F484E1832988059E5A68C52AA7E840D805E646F17DFFDCE1A2A8C0B5 +2CF6F218A06EE1E2543461030E9697624B086FC6619205C04230CC8DADA60721 +F5C4622673ACA45BEABBE3941E7F40080D652567DED98AA3404A4384DA3006A4 +E8A9298AC3FEF04C92A273 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: SFRM1095 +%!FontType1-1.0: SFRM1095 0.3 +%%CreationDate: Wed Sep 12 2001 +% Copyright (c) 2001 Vladimir Volovich . +% See the file COPYING (GNU General Public License) for license conditions. +% Converted from METAFONT EC/TC and LH fonts: +% ecrm1095, tcrm1095, larm1095, lbrm1095, lcrm1095, rxrm1095. +11 dict begin +/FontInfo 6 dict dup begin +/version (0.3) def +/FullName (Computer Modern Roman) def +/FamilyName (Computer Modern) def +/ItalicAngle 0 def +/isFixedPitch false def +/Weight (Medium) def +end readonly def +/FontName /SFRM1095 def +/Encoding StandardEncoding def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] def +/FontBBox{-188 -320 1445 942}readonly def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052BD0CE60552BD63101D7CDBEEF5B11 +69C468645FE4ED1AF2541AA0770C1DCF81623DE0ECDF49F2B522618F650CE6CB +CC8C21885DD61AF8A523AA677EAEDDFA51A1F9B1885EEE0456196D634E04EF89 +F17499DAD982502ACC349B9EEAAE4A71A73D1147318C60A8BAC10510DE90D8D3 +F46E47295D27129A5AFE0C65E22BAD10D06885A2EE623FF8E1D90287A083E00C +EF25195F68A2A98170E48759F33528B839DFD4B92DF0482493852D12053A7904 +BF6E144B9488970F220C299E80886366662C1276120E72472BF84082B9EEC729 +F7007ECDC5A850C88810EA679DABE81714004E65D938DA9ABDF29C949A52EF02 +EDA8451563235D51286E9133FFC7A27067DF0332ED614AC2D4FAB88EC84E6CB9 +FAB41C933E84B88097BA8742BC30A81416D1CAA3545F08E2554B28362B99B79E +FC42281922B94604AABAF5F7A9B8E2D9A4358F38F2382EF9544B859D098DF243 +034CC475CEDEBF0EDD0A60C907127BB32F7D85A62A44E90B4056D9B4B2FF3A49 +786032C6B25794E2C0003C7852C6B0688351FBFC43300FB0B72880BB7B58BB61 +3D1064E7D4DDB128A9B38EF7510B7E5F82BDE39489E2D1DF08816781B13836E4 +89390F84577F31776FE43A5F94F817A4AA4A698AA4AE84B178FCB65F1B5A5CE1 +334417595F6E40849041565BAA497F6E4B8F4305D849128C9A26A98B909EABE9 +8F2659189ED27C588ADC7C744712B4D9AD0C5DD25D1233E979DE7F53C5F1C47C +E9DF254086E5EC70EBC6B7E080060BA72F15E6BB75C75011B15B7ABB6BF761DD +428FF1BD688938C75BEABA7DEE2AF49364D2E198FDC7F8FA2313BBE598ED3703 +7ECAAA4670BE3A85C693ACA829A5936778BCDCDB38A5981D4CAC8994E2B2F086 +26D8793AC1393D49A8F2FE391F0EF8899F63CFA5A77BC739C867C6CFB9A226B4 +620AED34573F068052604331B7E8E1F0C3BC0BD7DF733F056DB8C3F57E3035BB +EC82DF5B511453A952D429AC721A4F94D5C9BA5B83545948643D0596F4C6C9C5 +796BEC7B26EB9D729F337E0FDFA91E5955585C330D0C4F193FAC870A28CE054C +8942BDA170717B7AE9927C936DF0076507F55CA2979BADD3EFACC0A599933EB6 +F148BB7C3D61066CCC93A5856D253D759F30E37534743210743F0D53F58D0B45 +463F053E19A16E5A1B111915D1E664802F8C6C3ACA0F1BFCF3E209D1FD6C79D1 +5D867E142AD6E69933768274F4E2AB57CC518AD5A1C120887EEDDDF18C291BE7 +B3DB17E8FDB124B11B6142DC60F560DDD668D700614732F3FBAC4637B9F41361 +54CD2D8757A9D9BEDD1EC72FDAAED3CE4A1144F1E919FDB952BA7CA1E3D31C3E +9E434E2E44E7A83AE3480EBE89E0881584045E4AA5814897382EEE5FB5C9410C +2DC7A2136551DE2AA713487A77B911A7E7AEE41F0BEA1FDAC1950473B1394479 +513741DE60091BFB9751C780D99F2DADD5AD8283DC9CD1C81B902C9F3C9C3EB9 +55608E09D6DD423540BCF72394A24F81135C9D9063C0F4441BFE0120E03558D3 +4A16744457EC281AB2A60432C97DEDD16B2F1FF4C1A90D72D46C9F9BE984C6E3 +E239F98B59A938C2A6490889B437CFC21D923572530E41B7567A9C7E2464DB2B +18FAF3EB7CBFE7BED6E77219C0366A7D54D469CE3FF62E75FCA2ED6A46F3E5C4 +489992EE1A42C19DA52F0CB2B1A6956BB3F1767B97FDF225685FF7C9E9243497 +144D31ECF634CABABB79E323CFD483BD7A7B0C2679A9C3DFF0D44F09F084CF3E +886CBC91C5386A266730CE2AF3863534E2450583F6ABB520C27C4EFEA01EBC8A +F019D25B7BDB40CD6712D7DF2DEBF0BC70A92D3B64D1FDF723DBF3D4AE939E96 +D93646BAAE0BC57BB244AAF47ADE59A5228F057192D917E2BBBF588335E09095 +1CD4AA406C1D10C8EE6812DA676A8FD166461064BE4150CB95C41FC055FF8FA1 +89A4BAACB0B978A58EDDDB0CBEBF6566D47CC0AFC93110751B59EA33AB5D6EAB +0DB9A65CB16A053495F06B0D49A70BA8A7826EB571B8428AFE5EBB99AB9B56C6 +F69DCC77C25BBBB53FF25C5DB5CB8E742E3C0BFC25098B4CAEF12D299C886881 +0D4EB71D637BC0CD4D63BD6B4F5FEF9B083D95C34FB9E7BC9FCCAC0B9C7D8AB1 +1816B17AFBFE1DA146662723887E435E17AD2E2315AD800EBEE700B3C12B50EF +4A48C2839AB4BB367E908F59BB5AB88635C3E1B89948BE9F32EFEDC2E439CC79 +BD9754280477F7C982850438092D309C213D70F8D476728119E8FA03762C22B8 +89AC2A2A7C0BEBB0C91CAA95BCCDF91AA918766C82A978B7313870327F89107E +11A44FF02F597C8D4B085F6D7A098233ADADA521CDF34A78081F8965DCA615FB +55DB12C1E3459E49C273ABD2663B13447365C9C1C52E192282E96049FD58506F +FBC9507DDD77014C29275D1352CD5FC765853E858A5781F2DA41360D32FB5A54 +D04E088FD99F8C01DF740E587AACB0E431E03E170CBDA9FF1FCDE8D9FF5E43A5 +73166AF5990B238122AB322F709FEF2F0E2FA7C04FBB62C5383997BC9CFAC8EE +3FAD26E788DB37ECB388CD80A7D861AA9E9199E7BD065BD7A4D21A0D56DA9323 +2AFAE158CBB662283EA7310D32FB5A54D04E088FD99F8C01DF7535A5156B8344 +F1CCDE84A46AB2CC7F0CFD113074A1C4D90758EE58F61589051A0150121A7BAB +A636171E6814A1398DCB9F13FE9B11ED5A5F2EEAC14E0C831B2540D10BC0EDAE +833A83965A33180B0AEA361848DF8FE8E50DF6856F1D10C8EE6BB5198CFB7607 +B6B044160CBE8D4CFF067DF3579918B19B9128C2A83512FC0567CF47B38961BD +CC60FB8C6330A30AFEA9B276DA89313D6A83343298F34461B13C382575BE392E +F94E3EA3004D6D37C025DA3F1846E41606DD510D2C7D0BE9DD194E46BE7CAAF7 +A60D496CE85D2393457C50B2D586E010C7C4C7272F496F0CED0084EA956455F6 +2EE57D13B6485B968190360A3E30210D2664BF91C73AD1A811651CAC09A9DC0E +3A328E1DCA16082699B41A3D533703E58E366E871C982F262478E41DA3483028 +6BDBF03E444C6F0F4DA2CE9AB049F324F887732D21C4BF9C5365C603C9971CFA +7E45249203329FB9B4054B163C166E1322DED12CAAE39E289C126301D25076D0 +2FD409FABA5247D7A25945AD5881E18C2DAEC09606228CF925557DDFA155400F +8D446CFB8AD19704B6C544CFCE47ACCB854A74DEB5C646318679DD738987F800 +96844722729076811B5054DA998F9AEBE37DE5068418F41A007E645599C0BC21 +8363573C695B3F68111CE4A6199C8BD40D61E46A153C3C25D0C7DC125415D125 +D0C6130BB6B603ED78153E0CFE7384F7481FD4EDA141C27898B3636398EFBBC1 +9E81060816655B2F7052016A4C72A6A1CDB83BCCB2EB475A9BE17EB08A5ADA04 +CA8AACF6FE68BBDE580243B111BE76EC06E70CB7751A8B206143D0134BF52670 +BB3F44DD8AA7D26283A483CB46286EE0A9BB4FDB0337342BBF362C236C30A120 +D85812760265E3B283F48C05E78F47CF5C678F54658A30EBD7AAD5840F3C7B9E +21D8CA390CFD164792FF2040E07FA087FDA110A93430C7FAD65C951AEEF79D91 +FC25EC950E250511BB22156C2886A249CD442575934D385554B2B4534AC28C31 +43A657DC937CFAF3F6C87EF4F2826BB02C41DB634D91B70BCCC4F83F4C32796F +C5664490597DA5F2CAC7C0013B18373EF51520DFE081F95E0C1693D02E39AA2B +E356FD312C233285B2A8C8C337504C1EA7E9E1F6BD250B5874842F68C92DA11D +F74E6068495709EDCC6E4BB3A96AA3A4C89411FF06B66DA03FCBB052CF5DE837 +4834FDB84E2248DBC10CD7454636E97E399A7AC5A16A2191D763AFC09588F5EE +57E80130CBDAF18FE2F530BDBD2CFC21D684AF84A8CA37BF2258C80CA61485BB +27EFEBB52E5FDDA77E57AC8EEB3811BE2BC948A926FBBBAE974D9CE89333C945 +A9DFE37E5F34BA68EE97019BDBDAC7482826B8F71EC51A777B64C52B1C37326D +1172F83F6E4DF93B37E66CDD6344810758B10B2EA8C68918DBDBC72F8821F1E1 +96AB78288A2E00C2E03FA05640009DD0EB0D0D318C6A726DE5D8F2B1B035C658 +D09053A4B27B18F18BE4396C900A730908D832F3E8A21C36E32F2D603D0263C0 +8EADB43290CC59C43AD57D357057B13C9ABE55F11DAAA8D78574C430939CEF9E +FB36B462DA71CFB6E86C72ACAA04D5FE4732AC386F52D4AC92C47F9B11FC32E5 +B188AF2890EE3786AE2772D2FBC5D75A7FC59B0519F32D930B71AAEC8B88F1F5 +DCBACC2CBB9951DCC8F21A26F197A309C26ABBC4C25E3FF22B2A511A96F0BFF1 +2BD9AA37DA5DDDF261EAB0E48C62DE0885B8D074A7642D59C8E216B5F0A8B327 +1794E0BA5B672E41832562DE119AC5DA1AFB74AA66885ADB605AF60B44C1D904 +EF85F00E1F143A19DAC00F751E77EE62D394ACD26B463F7C7EBE4EFD40DD93F8 +81C2956C4250F5F28207671D7AFB3AC09FDD0126533384CF1B2004F31E053135 +44EDCAD0114140E52B7E153C354CF3F2BF37A15E2D19A2ED688710B6F9F83C5B +BA14795934112F7963FFD217F016DE82353B915549CECBDF7BDFC6FA4F7B74BE +E202170C9F25C7448970684BC555C8390E34A5098F55E0B003B841CAE775D48C +1603730AF8C091C0622640AC5A0B46757165B44F0AE1EC1072DA26A8EE0DA335 +A6BC8AF994F5508921F3D9E4E09B375A58ACBB9E6B0448903E19A5CF2A51F619 +81D2A539A4556B9C25722D4DFAAB480586C90874DCDFC2D70716B18572557BE9 +E9CAB7F5A3959D5419DD9FEC22D015EBB5D4BB5CABE110D76E8A76D6EF3513DB +5C23D3AE05BEFA77BF6B4ED5C413E8DB87B5ABD1B2FA9B3BF37A81C784ABC42B +1FEFDE6DF012974241B33B67AA67FA38798336F7354F0984D612DBB455D0662B +C8F15F12DA07E391480C1A150213ABBBB0F2927D223D5752B69C930053655C34 +FC487DD271A8AF594F457F6A083C4150686FBCBD60832E4E7D0D4987CAE5484B +CA81A230A21F9C49DFBEB24C94C93ADC954B9B3B3EC484C502BD0DFD605F6D5E +13158237535FA2EADA044ADCC1E1AD42918C8C67320F6621369C250D5335FC05 +AFEA1B294EA5D2A6F335FADB80CB26FCE9EBC0A4EBF72DD47806EBA23C3BCD77 +7F175E2041EA03E2F0B2BD2B81E9A6DD43BA3486375883C30B8606D917C678B6 +6E567A92A0E0DE89BEE5E5AC45C9202D46EED5E045302B71EABAC5FD997A9A7D +8F522B2CA316B7FDF16CE4981DBC25E4E2FCE3981324B16A18236476FE242584 +AE70C683199B7647325D295528EB7CB15A7E3940FE2D248945015E9DEEB9EB26 +7012041740F5A2A6C7DB7B2358EBC0358E9385E734D208957ADFC7DEF83F5E5F +4EDE55E2F078E994312214EEAF63F8D0B481C3D523E712901AD838AF2D840055 +E57D34F8FDD4C842D64D3D94B1CA46CEADF497A2FC75A45AC59F8696DE49672E +E33773AEB31A204F01793262E820E813949115DB90A7C798BDDEA0D5D1E699ED +753593F2B6373BD24D4647CF35A448037ED5E72DF3175DD6744ABAA0E2E0864A +2F4EFF3B07B035520A598CDF1AA97D7DC3057414513DDDDE40C2A9DEFB23631C +B2291ECEEF4D18652CEA451BB1559C0743FE3205BFB6711F1026A613D244BB07 +DB3830F07F32EA637775BCC1B2CEF0C6B0D119AF6CCA17DB1B03AB1E9281C568 +33502239B067013D261BBF33358AAB8803C451B2F570EC34BBA052170AB42F95 +F9386DA11A2C7BB9C05E8C9FDC96111549EAC90DFD8DC906C03F0281C40EC1BF +EB6B15455CF32FCE5C7DF6F55C91132223FD13FBD62A787EB15CF3E4E6E59AB7 +A529DA186B178CC6E8A4D876794527F3AD72FA86B7C2BAE14D3E5A41D8F90754 +AA28185D92C9ECBBDE4EE53E2BBDF05AB4C9700C1367B3D81FFC1AA34A79CEC1 +1CA7D422CB58C8E21870F680E48EB1B2D5A30D974A7E9B24DE13958976C76225 +45415635E32FF316DC4A69B3CD5EFC6EF5F845C8E24C92166C9076691817FA6E +AA5D1F1CE12235DEA3902F3C355CBDA5CC344376A5394AAA7C2CB50BCF32DB50 +4B6D9BED63F0A8928C0C06829558B714FD54F355501EEBE29882185A6CA1703F +6AE65F03CB07406324CCDF00093EBC76627A11A84B5EDB688D20DF49616D8D3F +7491719761E7627CF8FDCFC0DD2265160BEB33ADBE3AD01E7464370E3E0F9D45 +51FC9A87C678EAE5B16A564333DB11687FCB4D1D82C75A2F551FB4F940E0C71D +74CFDDA0974D787BE959B2B87FE13DC290C53819DBDC2081CCD16F34F0A61AF4 +3CF53914B713820BF8F2243C0679345EFD56307165AEDF16E3BC771EFBFF595E +C6B1DB8B028342D5DA1E8CF3FF4269126B48BDDE9BEEF7896CBA70EC77063CFB +0EB3C6FF697509736BCACAA7F03C4C326875396F0499B198DAF7842384C36C2F +36B17A65A1D9FB77649DD78499592C817679F344E0B88D80B8D78EEF9EC6A9FF +41F4D635520B2269035CEDDCB3B5518D63DEBAD4F365A70533AE119F11323AB2 +EF07047536DA6370C07B2215C3A82BFDB44DA593C6B3A33BACC38A105BEA2109 +06DC63737E3EB362A122FE90CE8EF37B9C73FA6933BF27C39EBDE137F15AC495 +7F58F6549759FFD86C2BD3A09490AB47B60E204B16910AFB0C18E4F2361AA033 +9BE5EF972F4B52F18548E3CB947F083768C7254FC019CBD8C4DE7E01DFA456A1 +065EF834C7B146FD395ADBB9FB72B8EABF58EE9E2B2276C87FB83CEAD49BBA55 +7DA56ECA50BE1AE4819EA3C72DBE30F363D43C75287945B0DE47D1FF0283C494 +EA65527E8708279B3B2437BF1CA2456E260020E4FC0A85BA18562CDB8261FDBE +0B928EF40F0DD40E215B8BBD40BB5B5DCF2FD9AB4D5AF64F82EC77BFF8C37BE3 +74BB9B2E44C819E84CE2C634D55A9EEB4F6DA28025C3831B601AD254108178F3 +3EC068E78ED8C72AFC5C3BE0BFE17F31A23B55E7158FFC40381F36DFEB6612EF +33A54D2004D92F0A44B3468DBAC0ED5E34F70561F5E77DA369754685B7F6B04F +233454A59AFDF45F28383B05B6120717744B58D2A96BA706CC9317B5E7FD0848 +56665EB38E31C7F8C87B0C65041A5D2E349CB4264523AABF9C10CA95CDD3BE1D +9923C1A11D046FFC2E82A09E36ED0146978DC383AC6D70EABB20327360CF7EE1 +DC4DE736760F5CF3B47F7BA082DCBF881ED8DEBC1A4580C287418295CFEBFB01 +51B09DFC98C8A8C9C5F9AAA6971CA95D96A23166E5931F7E464B288F4E357112 +4111BB33FB7F0E042448478D3ED7AAEA57D1B0B4E237F919152F8D9E86229BFC +B8D59BF9FB9E0062A3ED67A367669D0F2F8EFEB2219E5FFE7400A9DC725ADA62 +706D4D1860BC04D4432F49D7F4271376678D381B148D72DAD9012173FF3779A1 +7C4D92B28D3117888C864440902499FF0F9BEAB0C83FBD788E26B0BA47484188 +FC01B0349E045421E7D912E1BD329A536F61169344F16D65F6B90DB87E22F72D +8E6F486F8D21E6DAE282C35A2723464F560CAD8B31A931CCA7A2FDB9530769FC +BE0A5F66F1D4DBC0EAF834D078CFAFA415F43DC87AC62A1D8913334016B3FF37 +20902A7E5644848A57346228A13D7B1C757DFA9B5FC4E9E1DCB2C2AA2FD37386 +87E6B350662256D158D8C7DCD2F7AB1E02D6C5C8E3ECB1C6055A6C0B807B8FF7 +997E562EDBEDF7646B64165A55DED91178BF13FD30ADC1A6B6D621B1A7AEE1F4 +2E30D49CF3BD0656F584CECE76A17151913D7ADB223727B47EB3D7F491385112 +D36848973526DDAD7C1C1C0FB672EC627172D10DD33ADF2445483470F28AF65F +29CB086189B3FFA31E0CDA710B6DE2B0EE515A46A3FCFC354AF01AF5C5D0B301 +C8FDEADC6DB9D492554777965E2751A715F8FFB6E0248AC51928DD65CA4F6574 +BB1E01B3ED95D736691EBEA8ADFCD8265F128A67C372720840A206056F66A7A4 +10E1722E4C1BDEA8C980250F9E034C29FE0F7D2F5DAACAE3173C865CA9C4C240 +49B6D4D0CD90B75D3BC68B8C84605923075A9A2D5D6F7008365E52796975CCA5 +02770D168EAF28C337D45762A08817666907C68142CFAB9D75C4F6D6A73FB4C0 +748F038F140CB009A24A80270037C9B5E514E04AEAD7CA8468C4D22E1059F2D2 +EA0E7CA2979C7066F1629B49FDB893DBECF6620FF9C48132297E81F717820A90 +BDB45E16CA1D0D9C152B12D50AF4E1B2519FBB2B779218C5E42E31FDF82448E3 +5AFC5F90AA018902EFFC4D5A14D4326911F7055F9B7AC5B592E2E2D3A198E2C7 +F476CB49DBA0FFB2CAAF494DAD087639203084CEA25DED422E0F8A30634FF1DF +EE5C61FEEC33D547A17961534B3535AA673AE15F560DDFF08EA7AC126882B57F +A1AE8A5313E6D21F67FB6D16AD32690FCE021616D0DB89C51001090A4A7FB515 +139B751F6137DFEA833004F4689474DE3A8FF64D98EF09D25802C3B35DD2DED9 +FB5300E4F50E5CC70FAD3A21917D15D5DAAFE30DC1CCF79A359B81AA3F21359D +297B9795636C03E483A80D47A4826930854329FAC093193AEE3A19BA91063421 +988EA0ACD987862A716C42F071140254B72AC91B91911CD6A9D275FD7F6636B7 +4B1B0A47FD39120411E1D5442E711A6C1EB0741C67B0A44C1A2F98C9FF245A9D +5AE4A04B529CC5FDBABB1C6E8C1590B3CE658EB77B58F4D04803DC351C5645D0 +4DB49D76906E068C3FB553AE91FDFF5F22F734DC4BF8E9D019B06D3A1BB7CDCE +9101E9D2276CCACFB36B9EC74AD213BCE896FAC45D08EBE43E676816DDA135EA +8B78003042DA8581975D4C14CBDECE0B027AE87DF28611F387E64B951812C848 +B661FCC0DF91B39DEF14976D7D00609DE2DB8195C186E376F4029CBACE3AF24D +AABB788FB1AC87D58BF341F95EC2DBD14BFF27D3DAD9A06569FD4EEE40C516AC +D809E761BFCA049DCD6F8E43E60A0BFE64BCB922D1989CC14EAC1987147A5559 +4F1CA14635DF029AC387BE36036BAEA8AE7DD09D090EBE271FE59FD806894A72 +61C714D6D08322726CAAF168C08CE31F26CDF6613C06CC50DBD59B70DA211B44 +1BFA22AD62D56AD098FFB998E25FABBD89A2C17EB7A3AE81F79C05AA4677D744 +7F412484C16CFB322FABEACF98AF9F152E3217D0F2593D6863E7872C5B6F82BB +FDFD09B13FA639680E972DC7B086D7DAAB076CF346814556119BDFBDC3A16374 +E7B92CE50B3BEE8B7C26856BDD3C2ED98337C2B877ED5EE4878C50F06A64F750 +E9C8CA83B7FE6C91E10FA717CCEC0D2F8E21CB5A2367B5C90A81897B6973FAD7 +D4D95F6BEDE4E1EBE6D852A937D5D814AA6BA62324C08AC12FC09C5037588F7B +1B043BC503D725EC657F47DE02CBA939ECD8418F4B7C705EDA3E9AF1E623A989 +074165DB0DDD59B7ECF513C714B7D0A1013E4E3F2B071F6A6DB89B7BBC2774B8 +87ADA7C572B0AA702156B715159829BA38A9EC28E1CF3494B0CEC876A97B4617 +2CC9162F204C36850CA9188B0B97300CDB1AB4F57B55D39BC539BFA5047B032F +02A88CDF11D098FD30F6A6B82B98AB9D288570FE18E4E6A707179D96287D438F +2D5D3C2305C5FAF075E0979EAB1DB645AD9DC87A621219C260FF67C2DB8D541F +8BE9E20ACDCF64C4C721AEF5B2B65761D0310CEF36B1A3E57092DEFB978A43F8 +B553169F523517518CA0618E31F9A5940EDA42D8B9D851AD1E77BC1C0C8EED23 +F469B0568B5A556A5FD5A20F5F4E00FA6F030ECC5E711865F1549E409792F7DA +D1FFD1BE1E6DD22619163B98EB0425319E738254ADA0AE57FE29E121B0D8F172 +DD717E0B59842BE9F6B37FEC3F1BBECE15664851EDA3DA3A1848191C38F2CF60 +7A262D4440322C26150C605AADAD4EC3EF0CA22D6A2F63BE63C9C08EA643B68B +9C88ED95D2F2F0868CC40278DC2752A1E61C793FB87EE69A6D348F98A0174B09 +5AE09E214EDA066174A6823347B831ADF2619281E43A71D549FE194D5AD4ED5B +1DE112CA90BB9D92C57FC3D89F1A57F7CEF2ACE8E944B8B725557F567D9DFC72 +3D28B0E11DA3F81633C042B5FD05513542A2B431B3744E2E9581ED828F5F8A8A +C600F526EA874274FEB94E64F0AD787F47C98899DAA4552E447D4B97B3774334 +8DF26A38D7CD36EA79B64CB31DB0302BFD0DD2280E10FFDEF59E2D1F6452FB09 +E2A7015523BC1A46AC2F816135FD4EC198D30E95203ECD2623E83FFC1436FF74 +068CFF87C1ABDE2D31AD1FEEE6031D889A25B9F2C05036F16BBDC143705545D8 +4D14A2467639644AFF1D239BB08AA769BB5476DD4FE9974DC01E85C02F82958C +12C3AAE071BF1E57C358F72290F15A2655C1C79DB5E5264133AD0139F9F9B540 +972A3FD82BF0377FDB8711A746B9F4C6016172C30CB33CEC0B327DA0DE2668BB +CD41 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMBX12 +%!PS-AdobeFont-1.0: CMBX12 003.002 +%%Title: CMBX12 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMBX12. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMBX12 known{/CMBX12 findfont dup/UniqueID known{dup +/UniqueID get 5000769 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMBX12 def +/FontBBox {-53 -251 1139 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMBX12.) readonly def +/FullName (CMBX12) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Bold) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 11 /ff put +dup 12 /fi put +dup 33 /exclam put +dup 35 /numbersign put +dup 36 /dollar put +dup 42 /asterisk put +dup 44 /comma put +dup 45 /hyphen put +dup 46 /period put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +dup 58 /colon put +dup 63 /question put +dup 64 /at put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 74 /J put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 81 /Q put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 91 /bracketleft put +dup 93 /bracketright put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 123 /endash put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2D43A151FEE81296FBE +0CF37DF6A338C826464BA5198991445EC4BE80971DB687336AE8F74B516E333D +2D8AB74D362C559AAE6ACFAE49AEEF4F52E28C869222C1301D041E7A0BC1B608 +1BF728EF9E98F3A12EB2714E7F16B14E055FE1FA0EEFB058860ACADEDA9D0E4C +42E3C6F1E4869471BFAA3760175F3FBD842755A9D7847EBF605F18293B42F557 +FBE2715002669091BB033E1AAD657532F34F7C66E4F04D63ABB07E6CB9D9AEAE +78EDE8B79DD9BC87A1FF445EAA05B5572BB880E69F4DE1F82D7F0E9980AB0C18 +22C448B0B1722D3CC33C56FF287CECB80658B3AF5E7675BE82CEFF3DAD5942EE +A03C955FF979E41E54BCFB5316A9AB8945C403A73180D0961416EC9C92F49811 +4B91BC4C788392994587517718521E416D469F69952149FF7F9224377EBA1065 +4A727BF806A112A7B45B0A1BA1D5A23683960575368D9EAC8C04753BF7465AF7 +95F25C258C63E4FDFFD0B412FD381946AA38C0B961652BCEC30322C47BF4755D +9F91880688AF066E32FFB22E1A52DE741307AD3ED830D6BAA1D1F562919666DC +5E8FD9862AC8600B0AE0BC7FC779252AAC57248744ACC8A8AAFA836BCF09B0DF +9253DFBB1CB77EA8A59D42D1B18FF25E9AED72FA62FEC3F126F030F5D7DED9C3 +CF60FE890BA4A48E39E687BFFAEAB96AE542A6387F6624486037C8924002A511 +BEE5FBFD780AC1D4BEC3FBC47A930BAD0280D444259528B6C565DE11DE36BB65 +9BADC55C1EDA1A80458E98896D782DFB5C137897419602809F9BF8CA39F00C68 +EFB9E076FB324C2963F23CBFED28B9EF70EAA4E4B903225D1F199A7162AB239A +D92D71C18B1B682D04C6A48926275BCB16D413B2A0E953E1257E0B12D8B717CE +2EC84CFBC046A4338A69F454A469B12118E562B4F56C5FFB3CA5D357513E6FFE +947A564B229C7FD873057D5C7CDF03E958294A1003B37D8DF565A70A00A3734B +0138AE5277D383D10C2BD853EF806D3CCDC47739F0E374A3DF3B63638B949ED6 +4EC25869DC1C0B1F4DBDFFCC97382841D8F10F3635C792139A1EC462FDBA379C +BE0990CA2E70FE73137AFBBF30CA54954D7E7377CC50BDD780DDD4C7FDC77AD2 +F3EB1169F14A0041F18160F43C24FAF556DB5D621709FBC544CE55424F7446D4 +6AC07A51C8CD5161AB0AD5084A96FB35D77F1CA155147DEF8D7A590EA6939514 +D4A226588295CE0007BA8A550895511C8D80BBE5CDFB8A50D249C3BDCA974415 +F5557914A9B805782F399E4078DDB6264F1A49A9A5BA45E284A5196E9828EBA8 +481D357B8D9E6ECA631A6204439FDFACE7D7E6A2392726107CB7D2517CD19A24 +FBE592C119626DB221BBB635B6EB84845C16A9585282E34958B961F4A543AF9D +419B6A9105BF185FC767712D923437BE08A9C0EB92AB6792DBDC671029B6FCA6 +7F717FCE379C0F3B51C6CF042A762ED04898FBB4B0105C3C4ADDDC18C51BAA3B +70A93666669547081D9246732CFF74C83EE90DA17F5B4F8BAF47FE4D81590988 +2858C9B96071341FA0A0D23BDD4947FC9BC2297913CFBD4FD6CA4303AB3179AE +0203F1BD502065F90CE9BEA3B52DAFE4A29446082EA0E6B1D7AF1F31D0AD02CC +9A7FACE2CA86E5FE0F6A425B28A5940ECA306891CECDB3CFC7A5BBC76B5D9E8A +C754379ADE80B4D72CE493010317BF21A0CF4A0A55C1246218839DCA3F4D626D +1F4161D38F54AD5142C1CEE95C61D8BB10FAD4B772F4955777AFDE8AE5A837C2 +A2BBB11D0BF5DA2E63D0B75ED421DBA9C789B281B01846B65DC572BA69591969 +21265DB722AE86BD8CAA3D887C975A617ACEDDFB7AAB341F47532AC0F354A530 +7662C089DA3939588774FFA16FC4A52555DED6D6F51DE718BF5F345C23C90198 +17B77CB8B5D53A5CE7A79F3E286B6A59F3F6178AC8BF15C0A15C1A8A95D03B60 +30EBE53DE328CE085CD9A1D49C69AA299C5B58B24334A546F6E274C1B534DC8F +3289553F560C2F81E413ADB92FA0E7DD1C2F39D5FD268EBA97AB7335ECF28257 +96B4EADB7D0778706CB41C7E9C882760E7670936774A1088FFB2011115FDADB3 +B69EBD5108760762521C25C968C3E282DC3400001AC8FB1EA27FF643E3025950 +1D617BB8BB321281708E496277E11DD3AE0023DA9F25AD06B39C7CF527FED27B +57397E88D3DF70EE4FCCEFC8A0927D6B05517E571B3E70ECC99F3CBA32CCD4DE +B8BF22626B6C94FE65598A88AB90D238461EBD9A098DADEA4091AF1CDD7560EC +8E1B9BC2321686E1759E6B8A270C8CB4A254F7368039602EAEAB86ED21CDED91 +8F2DB9889F46981C494C7EAF5E819B91C129F0740B8002B510014985E5791F59 +B16879CC6521D8E9F1C4C1890AC85A78022BE614BEFF318AB2616F0C3F02405E +BB425D1555472A2642BA7686E431DC3FB8A1688B76660D9957C3FDE8D58109AC +21B1234C9DDF3F0FAF93BCF7B2F88A001F23162E1A13E5E9118D51B485B70A91 +D0CBC39CF44413FD8686D9030782DAB58064F5B987E0402AF5B264B17BD31BD4 +FDF63951BECD73ACA6138854EF35B062D01F33073850D9C09A818828C581241F +A625AB3638081DD0F00F946BE5450D38489CECEA4E66B4D85CC8AE0157E2AEE4 +A22A9313829F24D573101D84CC1784D1CED7DFAD5DD966601370C6CCBB723082 +A86BBAF0A5D867D0D2E3CA16E14E5109A29EF02649C47E12E88B3B397D65CACA +DEB9940B92100744D686066F8250FF30E5F13D81428EE238A2E4E07ACE0F5C38 +7D79D4A336D0D26AF9C2B84088ED8ECDF94A1E3FADB45AFDAB46CAD6FF950B0F +07AA2CDF82374DA76C56D29C80138841EB13F0D02ADD32F88B23E282ECC845F9 +BB9AAECE9CDC644AC2D49577A92307A83A99434F6493156DF25DBF0FCF2EC21E +8C50A312C3D19E0609C0038554CF4FEF3ACEB7A833FD54B06EF0D617C2971C89 +E4C06075B09B84A4F78A82152B9A9C540B1D881313C2C74F20ED064A9606EC2C +B56D7BB4797F1EEF4A9B13579CCF311FA4A4DFA62D80FDB7F535CC6526D1AAE5 +45C008EAF024B48C377522F74D939A475970533E645B1BFA81997549AFF26F67 +2AAE6C2EFA357DB3B525276EF330905688777057F4E4CBF584520A534A8587E5 +5A8360891E75A15205E8ADAC4A4E5A6E27D0C4A7D492216E4BC023AB027F37AF +A8DC7579BA50204D5F45A51460C5BD8A5A7F87668CA6451137F2F59E117BBE28 +5C40820882A5546FA76F0CF49F8A6EC445F0647CC3227C400F56E7E9B84A6975 +E85E243CC1666DBAFF4E07EEAF3AF71BDACB30DAEA792F2B8504CAB071544F01 +5D66243D529C479D276FE22F7E275D9E7FA9C6EECA18716B2F213916E32C1D94 +6E32397B41AC6779543218E506569E3544803BBF9B404A983EBA62A494187B30 +8D3DFA4E1237A2E5E08224A60492C09ADAD8775B7CDB830520829BA164209ACB +BCDEB2D574CEBFB7AE4BE72DF4EB1945FEF2458761AD8DCC0D378AEB7DA002C6 +9C14A665DAAA532B0ABA98D7BFB5A6151FF6703385AF7AE8FD315A492FCCDBCB +B825707F9566B3B4943A3C61C3DEFDC31A843A2D67AB06891F3E110DD8C73D3B +B5E4151B51D9F13905D7D94DB9ABBFCAF35F43B6EEE256B1A80ED6D1739D8D5E +8C767F6F0E8704C5345D028A2A6DAFD9BB7AA048B8B895FE9423A7ACE858BADD +595CB074A128DAFE08FDFFD6BDAC0114159A702FDCBF8013804B0CAEAD7AF38E +FAF086A3248AD4FCA1401A85AE2F72E3E6956DC0996FE8ADB18F89B14A208A15 +13F81AF73D0DB72F78C4DA634ADE3C73756CAE6AF2E149C26316DFD93370BE1A +FB4A79F77A67C07CB0A53C78367F21661D4AFE9E27328E077B522B50FD9AE2E3 +DA087BE481515B5DD7BF894A96A84A6C78874100505B7DDE1D22EFCE8D58B3AB +313AB5495F72E2CA4E6AE22C0CB854302B9990372F1661D9F0A517F90686F248 +C5643008B3D29F7296E5C8FD4049886662EFDD4106E17C879F5D41CE84F87E89 +F6A3117C968B95A35940CC29C43E1E0DEF51C1E46B676301F40D59615C3F73DD +DE37B72FF7105DB84227DA5241583272AB1C3CD97AE11C1EE98FFDB5E5F44844 +8FC41BEA5C54B26341AFF6830D9D0A5A2901B0653D8BD0746838194D240FF753 +E99750D3383373F453723D86BE97B571B8B84D8696089B5CFDD53E6C562A2197 +A8C4FB0CC690C27761A816B441029D3D306245052E0C41B53025D8CB7267CFE3 +C17FDFE348E765326F91AEB700CC49162DF748171214252CBC821493DD01AA20 +417D66DF47EBEFFF3E9BB2B0A2BE7D9B8C68BD570FC2EB0FA54CECC318F04C43 +19598BDE93F2F13DC7847354C99059AB20593EE51E94F9D4E9241869D605AAF4 +9D9B5FD88C3798A039A67993C5EC68B6326B132E647F67EACCA7F7AE7F718D85 +12666E90D7C73EF210E344964A38228B236679A2B18F5E081234CAA2458F8D83 +3F0CA308D19663CB12EB904076EF88E556407C33C9380A6A3D68A9EFE65387C1 +A1BCD2D26DFD2AC0881EC30E81C0A4E76C244A2BD822EE88C4A60B480D107E68 +90E419A1F512E865BA922A7830909BC2611A80931CB2E9344529586726614D94 +3AC5200FB9FF68AD9686506C5EFA8788C0AD0251AFE7F95E84683380CDB421C5 +B1A783B6D5F3A6BD1BC1C14B363DB01C87C0796DCDD5BECF41A1A9F43183CF6B +82C2AE49F0BFDC5DEF7729F2E638EE6EA9E4D059EB9BB1B992AD8C82D501A550 +1BF73CBBFE740179B54E193E84A55DCD61B343C1852780FFB44248FC9426AC94 +AA2B3FE20FBA30F6C4D1E0FF3EDCDD8C0F57CCB50CDB0EFE2E04A8927E239C1D +9B026C7929BB48461D4D695FFC766C8A0E545B1BCC2AA068D1865333108E7985 +2D93F9B00EA0A90939D0D3840D59B6CC0CE2C147B2E1A9A4F14270FE3ACF51D5 +99F7349106165AD627CBBB0ABA01ECC6D3A14C1DC1ED23A9DB9865BB4396C51A +31ECD001EAC94B33C34E29C5611148EF3E55DD61813470B8F3CE32564C749414 +3C93C77EA5A3538A0B5AE3FC4DA32813B06772E0E48E25BB39F3F6FDCC077E86 +F86FA50E18FD19EB2F37311CE87F18F3BC85CE7FD71CA92D5C3264E34E04A2E5 +70C79D99F54D6C6D9D527AE45EBB48411221134587D2253E7C8ED7658EDCA34E +5E768DD14E0200470F73C44D006CE8CB35DE1CA3EC10ADC668B0662A7774C891 +84EC95A31DD872F0728D9F65CA80940080E04630BE4DEC77A2C49E3913C39978 +BF145F8832AF2C4385EBCDB15F9D32C22CBA0CF950877717D6F1591D7C0B8047 +8C9BFCB16AF7124ED83137695F3D69228DB633053208C29E0ABA1B06A7FB3EE7 +5625CB44927E2DA6E038A6E62DEBDA2D96A03177982D8FA33BAAF4426E05F4B7 +9C1748B3FF7691F9888E7FF864A10B9DF761A41E6B5CFAD2BDD7E1C4924AC97B +F4B352705316DD1A58637CC12D71C18A5CA691AB2AA8F171590EC24582B1123E +94D4DC587D8F99E18A711776BF4013C96446BFECFEE4C809EA94B169088024DE +0CBD20199A915AA406F0BD5F3D63D1467C49B4691AEBBB35ED6624F2D7BB74BC +E80FD92B9FD04DD9C2BE9B6FD29EC7EC07FAB447511C61DD299C783BC09AE2A4 +7B3CBCA6A20C6631D06D0B2E2482A50612BB7C29B7E7D0A205EB0E8436702581 +596BC996ABD58CD8D5BAAE4B1478195CAFF98FE0141287296C4EFB8D2E7A8442 +F0A3AA9F9264329982532295A176BA1867EF732BBAC49AF485D9D0F7130F617E +7F7DEEF935874D55A22240F8EDE4F247D5F73481373A392D40A8076BD91079E1 +1CE5998BA13D48D56B49A92B4A18430E316405D2E2E391B496A1934671FF1785 +AF42BA3B2D14B8E04014437FD194455C50289DFBA61B5C377BCBDADA48E82DEE +4E70EF5E9DC03064907BCB8BE4D59DE069FB0C0CB140DA54708E630767313F9F +744594AD8A499CFEF733E640A11FD74E46A749F9C7D18D49251BF85C6EB4668D +67598C31A8F90922FEAEAD4B83B6E7184567DC798E4BA1C4C9B3461A478D63CA +054F13B502DACB674EB49D6BB935E5EC82BF99FDA7D47C581AD7F940DF4FC6FA +6C6D25D647033AC69505F0CAC58DE99087F365531A6283CB89CB644688963C3B +8B2203A94294E58739EF23C7803630A1F9121D62BE1977DE2F41687C8CAF87FE +CBD7AD3B98E0D95C8C6E1A7CCB0E09465AA874DC90A0F5DB2C5E7C130297FD39 +EFE63B0350B5139D09E6864D22C3F1150B29196E40EEF9723E71158B7ECFB8E4 +C426FEDCD439420B7F1C251FADA347C9A2C49738B5A17922E1EA93CA7B125B76 +57449EAA9C1D591CAD327D0E98EF2D44D614EE9ED49DD31ACAC0B956620B6BA5 +5BF6D08CA7541059D5ED2EF00AE2EE95488F5645BF6837D9241C0D3959B7580F +C9ECB2BCF3E65C07D52EC9CFB21C11CD4C883E44C173214C900C44D2E1E43DD1 +CE8DFE3DA93C38B548BC4EC46FF91F30CFB97525E1FD4E77686433B20BABF8D2 +848C1CDF1BCF185CFD7A81D2D4BB826E837E2AF35CFC4F419F698DB0C43E9F9C +B0FB628AC9A3CBE9B1FF4A067016E70333E78B32AB2D89C483834B31F5808FDB +77492E099F1504DABCA5722C7860CDCEDB2DDEB512FFCC7D287F4945FD711F28 +87BC3D36173566B81FC2C1290C717A09697DAC6072408E20926D39270121CE58 +3EF97CE12EDD7F87F2C8CFE36C3C0400869C0D813B71C425343EE0CDF717BDD8 +409D5297D0F8F7FDEB0257C0A391F5635E0DB1116058942FF3E7C94D5F2873A7 +A3B0ADAFC3835AF2BE474E6741319BC6695FB37F59AEE388F81F6E66F910000B +72E6BA7531B4378CEFEEDC79CCF4947BA1703823B5AB4F4AD73D9615C66C489D +99D68E49C9BF765B7FC547BAB9640D51D5A7A2396507AB5A4DFF3D14F52422CD +8FCFEAA06A56C6C7FFCD29C9A7A59DDD2A909A9363FE5F1E9629616D25ED38CB +E754C059E4379318CC491C3B1A90128693AC53F80F8210FAEA7EE638902A7D3C +82B95B3F5AE340EC1B648DBB9FB679D6E80B7F426D8671FE7136D97F51E2D2F3 +C9CE9183E4061CA40091A2A70DBB9ECBB19CE3F65ADD0FB346B54BAB182E2CD0 +EAF4C0F402C25573FB344EA771B297BEB615FCD0595172E84ED2A62FF8962634 +23C19076C2A9ECEED5135994EB397303A9619C76DC55E032DA83FBA441BD484A +59F70A5110A8927F6239A14D4E223E189A5462E4A92EAEFFA4B961A2A32B320F +C2B4E8C1821FA67A655B5042C15E4DE1FB3652B55078DB123573C4E986B19DB0 +1C5131F3DFAB271C30A5476B4A19D8FC922E31879C34BAED94C07A4841B8209C +403369FB8E842610D1EB4662B6171A4465FD0E819964F62EC5B0ADC92F08CF90 +1DE0B410FFBAD16F6D355E8AD72CCF67961EDB6CDA82398021007C2D0462E893 +75EB0710AE4A6CDD15077C9DEFC5774EF4A657734D703CE42174259B58E5277E +0DF26BF59AF8D1A3E7DC12E3C12AA4B67CF35B19962F6950C2020B698D971B35 +82FF84E72F72FBB0C54A112BADBAE6C4CAA358BDE6A705AB59332C3850CA3D25 +C7564499BC1319121CE0D93218210C68080AFF33420E3CB3A48BF9EB66BC07C8 +A79D8CD8E78C200FF7CFA3DAED0B9E87E6141C88B436D8FCBA50AC195FCBB9BC +9512B95FE3A37FFAAB39850FCEBD4D50A243EA416E73F53B4B00F3B6EAE0CA06 +0693AFFEF215D00BFCAD02E45496D7C8F5E99EB9096FC4300D038C1AFD31EC4C +5ACA6B72C1BE7204E37A4CBBCB1EC26AB87F2FF82DE20601025169A5FBD2D060 +62B5B2DBC288C79C33B596832AA18D730AD572C6EDFABCBD36DEA87C0F323C3D +6E537AD3B43C6F3A905597570A8C6B0B4A5E08C08EAFF9731E745F2BA8ED0C0E +1ADF7821CFCD4E38F3F4C243CAD31D9F8FC68B9043740852B4CCBDD37BF728E5 +648215961FA82A0C847ADCC5187331D0863A4573BE520C02CAE14AED4F06B3F1 +FB4A318AB54CD86DEC824707B29F858FD726A167F2333855C0575EAF4EBEA0B6 +754B1775F967140641FC06F82B191244186FF347A351FBD8FA62E8C978B21F6A +E124929876488AFA97FAD262BE3D172E2F03F564F1325C9F1E050C83C12E0CE3 +C7F58270B5C40B46B3F592FB41FFB7F59EBD69B2F489441E398FEF7F84C85055 +531D95FD21629B0E509C2FCEE995D025BAD5D3F28CDBA5CD414405ACBD936C3F +AA4CB2620D7426002161F983AE95E542EB8553AFF7E57B82E05FDD5FC433E1DB +BBCFFB1ED92299DB0291CAB10A84529B7FE279C62628A24A2FC36B01976E13A9 +C528A198B8EC8654AD69CCB5C209964A2B25D6DA9BA0FFB366D19D8C69701D7E +8ECBEA88569601C80ACCC2D5487DDBDC27DC463A53A8E59F9EC17D0ECB7D2188 +B6CEC6BBCEE631DBB9959A9855B997481B5D88B8BA29995053CF42C5518A3E8C +AD21553A0F6BC3483624B013D3537F7C85D7C558A9C772554CFC1C3FE7A70633 +318A99508F5D2FB656B5A91E94F80F74C7472F507428AADC375AB9F18CCED8EE +9DD57456CA8DB8D3B133596CFF2D510746BFA00B23F4001A3D0E8A24476C497F +A14422160995F3378EC9A74A5D72D776BF8BF91146E73518E61C94AC5C7ACEE7 +783E29B29962E638F75366A0C0235475327F024CC6C824A52A6C25E669546A39 +C3459E06945AF250269C9F7B541B1EDA04DF9B9C7B442CC7484595E7B1A860C2 +EE36E1F845BC6E79C445E11925A881A0D3A9849030954BC5FBFED8D254AB3307 +A399E20BC127C05EC76D54C928A3CE1F99F672A8F47C8520C5D444D1EACEE114 +A71EBF58CA1088DEF117A723C391F62C0AF3985BCFD5526503360C33B1DB957C +039360854589686E27DCA9375B709FF2F8F5EAED9564F979A245AE2498556344 +69E2A27804B51D5C52844E3582CFA648E82492354EE0A312AFCC4E90866F63CD +173E4CC6A74D82568D0CD88E078BEB0A5232202C7F74C3A8C80DA4CA4BE6C421 +15B80B4A2A50F91F7841F60C5EBB4DC67ABB15A3A285214E20B5090E25EC9C7A +2A8F1C9F2FD755368F61370634A37A2EBDC4B8728D2439D55B73596A2D5B28BB +A83A38BFCE4B84AA3D8D373C53DCF5DBB5A327D9364288907C0ABC0D5E6B1D1F +7E57E3E21ECD67DD9E3F0E86E00BAE52ABF645D6FE70EEBAD9C853FE34801A46 +8F6BAB6A2C22BAE5DED459A3F06096ECBA2D20C707A5F47FA067FCEC8C8D6466 +9E478B07712A577400F5FFC65EC107578C4E6F28961509BB7C41E49F5E45FC1F +ED4AF951E8BF1B261E06E4D8AC3B4CD60AA0FC495E73E6203605E5473047818A +46C98482D55F198EFECEA05092BF11A982798FACA6AC540293AA90208B56E2B4 +05A05AA45B2F8A67CA109A6987A670340523EAABC230E0034454E773C31543EB +C1C2A99CBD1DC7532E2D2169C3C25B5853E2F0148E4AB501112B8BF210A5B39C +1C4E8991DD2DDCC634D3D63415B5C7DFC564102751C1BCA38AEAA8F4E69D603C +13A5B5A81BAACDBF724AAF76189BF3DB6239A7E19A1B2D6DB4943910A0FEC76B +233994CDB5A903872A55E51561F06A6B999E0F91C9FEA20E0176612E869FC157 +CA648E8C2C4859D3C17905352F1E950675D8C56369B50BC8C75413021319BE2D +C982926A6CFC9FDFD4BD728E8FC1B6FA1074FD7271C136B260C013A9A33CDFED +A82DB154C0423B391E7BDD9C5B35D92D3C4F5CA5C773AD3712840EF3BD5F3C0C +9BF19092B9296CFDA740566999ABF31B92E8AA5A92D29840D33625338A3E7C02 +5854A6B272591E3B581BFCFC1620C9C0F0B128B0B69CF0FE34E56B191FF65DD0 +59BB27457FB4CAE161551620278082F048A6BE2B9073ACF7A6BFAC7D1F9F7F0B +3DBB05CBA5BE5424E1A07BA58458074101EB3731E775802C97133C9FEAE5494F +C0EAA6D6CF2DDBC064CE7696F610A3DD93024161BFF27FA1D8075A295BE3B80F +CC225A257619628F07D9D740349854CBF43BD72E25F63249470C6AD3E171C6AE +149931C1434F22B467BC377604669C077F5806E9193F9E16A737C19BD3FD5C3B +7420A718C022EF57CFC7D7BDFE22C3FE896EF34BFDC09A6D5A6E559D6E1F4D31 +8A6B69C544385C1CB338D352749ED74FD1A051ED6579D5F1673522CB02BC25D4 +5A9A51D740B3A9B6AA52F2B9532A32F4C22FECE7BE96873ACFA2836063BABD50 +D4D0647FCF2FC9975A2ADAB86FE1AB14A5FB4C3A576387A993E9EAD3D401D3B9 +F231F890215B7192A71327BE72F2405E94E47EB82C9A7479B00C6122A94DFEB3 +293F1F328765B0AB7A2D4B51C48E5E2B6E7C96C765EFB49FEBCB593DF1A90284 +4C0723CBD625288D62D821F47FC3C28473B3C5DD3322C8D16C4EBEA14523376A +844F4E51F255B2C1FEFDE840EF9F3E5812411FDB55185100403155B295C63B3A +DBC92BAC9D6973F0D609CD11CC3C3BE89C92CDB21B6C976164FCE64C78C7DCFC +DC64B362067DB28BA59ECB57C2A5880EDCE8DF84606B2A87979DB086E06ABE21 +2663D35368F31CE867F91BF71FF831CE0E38084F98D501095CD4706C2B82FD59 +4E1501EDA7B03CCA974AA84EE5B39FED998FFC3D641B2634D72D92AE5B8BE9BF +64FBCA1B8A80969285372EBCF24A27AE19B48009B144376992058FC36C23CC5A +6E4A0CF12337A9EB8AF4EB6694621877CAD1C713A85940DCCE4FA1EFB2CAC5A1 +5FC3CBB1E61418DE140D044900F52A6BACC68CECF39C9491756BD3153D07768E +9D271FDF798A9BE772E9D6203CB03206020B45BF76810C0315448861A5A2030F +DA8EC1254C22D7CC89684B5AAA2141B7FE3AA4EA3BF55D907B8AD5FDD7488DF2 +A92B28261638A4862130B2EDC13E78F97B9E61B0E933F0AA0EDF58A66BE288FE +84C209CC1881C5E57ACB026EE9EEA1CBCD4A4B02E7FDEE62BF76D885E26B2297 +2C274B7FB21A9B660E934FEA1471473999B90DF953DCFB6D68DF5D2E021349D3 +14314662237C892EE094D4735D2858FFCD6DD748530645E493C98D80A8285CE5 +6715A6328533B1397C3705CD56E0C75387838B370112A8B235ADC17A0A56E03C +D175FB1AC49115DF3A8068BFAE58E8CBBCE530216BBBD0F9F3944427571544F2 +8C62339695952397AB33C31BB14D2B0C9F3ADA35ADFA8E4C4B60412A4ED03363 +7EB00119980897F8FAD36DD39AAEB4D841CB7FD8A232A277AF527D50DE49C5BD +936E0784FA8D2E9820110C5BA10584B294B2791FD0E49A687753DEE31EA923DE +BBD92D8C08FBACD88FE0677BCAB4938C5902229AE85756DA918D1EAAC6290FF7 +D9F6060953B2BEF26E8C07CC430D70EB307F1C727A57F3D46BD6267A03FF3437 +E1D2A9716E3C4054FC42D3C0246721BDC61D4A5BDD65016F90D55BE8FB63BFD7 +06B527A49F84B91FB321607879A9669EDFBA9668D1B4DBD407A7D53F7EF6CC40 +83B4F1A930BA2432BF2C984C4EA14CBFB7030CD0BC1DE50473BE03E04BE50DD1 +7FB991971A7410A7EE4118F6FE4198835C448B709D612075D0187F1D064A55D0 +BF3AEBDEAC29A16EB33EB458F44B0664E74A58EA5BDD24B9EE38374F68E2A923 +8E6EF9E9F26315A22BFE353D875F5ADDF0821009F568476C9642BD3B942090F9 +39B7902DA57E8C13BDD10ED0E137F3521D1B29F287FD6CDFA7D26E2EAF839C7A +38F06ACD6D713FCBFF0510C4C35038553E463A0761F0A23DC9030F6CC4FF96BF +99AF97F7D9267593812BE751607032E736626FAE21BA2912CB67547A5624F9FF +3253923D889FEADC594F8975A032E566CEB10E876AF5047937881C262732BFB8 +1F73C6FD56077C00902C6EBB852D1747B8FFFB1468E8204A9400C4AAF7F7504B +89244B5317C1DB608BAF91FABC56827754D6AB01EB4188C1DD73EB4258F962F6 +D18B5C14089225B509D23D5CD4C1DC4EBDEAD354A1B108466BDC3DD86535C7D5 +9DC062AC8F099821864264F13C4AB2441E7ACD2C47AF331AAEE509B0BA31A92F +18CCEE565B5CE02FF94D635AAAFD9497FD00E8CFD213D22F06BE684D43369131 +24DA92CD0D50373B137892A8B6A9D619094621247B06BE1E433FDB25CBEDDE0C +A7DBFF7A6CCD6DD55186F56A089E3901136B014C0F5AC86C819D5824292E6FBB +17704445C90AC7BE8252FEB750B78804B33B2CDA000073A5530C7A7F2A4AE279 +4D627939E1DF094EFFD5FCE391C4CF81949BF45203819647EDEC018D18CC1D5A +C0C1B1FE3D2BCBABEA21861E2F2FE5DA884F134A93F17F001DE4D595014F3E76 +D4ABF5249A652CA8B53ECE9461924FD87EA819F5F68893EED1A7A1FE4F231514 +3E69D4993A48F014F7E4FAAFF2D8685DF2FF50A41F309F5626E6328EBE3D7793 +6B8EB46F10997C63901343326BC91D6945666C8B3362A1A94A73AAD158E38E2D +1436AF6B3AD32B064A6FFFBEAE70AD11ABCE5ACBF810974EED6623FF916F947E +8897C2171970FE02EF18874092950F75632A916FC6EE77883AF461597245F0AE +8C9C7005217A59C63F192A57B8CB74D07048E7A25F294418AAAB0ED28B0229D4 +2571A21B6B46570EC066319191D8B155B903598F4942F692E3547AFE51D76191 +3A16F163FCB3A73C36471EE438FD549754C91190553CAD1FCC0BA3B1C1921470 +78784DBF40B54294F9EC7EC7F5A8D574CF9CF9D22B5AFA790BA5659631FA3059 +E2E1953F58FB83780B1C99407D48B75A13999CC536089B8AED30485E52DC4985 +82D1A5790B451407C982AD06399DABB46A1A4AFAB1FB85F11B558723706CA227 +37FA6429311FC4A178800ED5DAFFE353929EE385E7AC9E04E4FC63C66296C1E6 +3C5E2DEDD62975D7743C6D35155A5A8367EF7395E4092F095745C3192A5A66A9 +7AE6B45029753FB2230B881A5F7B0A393AB2193B15C06535458598458618C70A +CA5EAAA28AAFE895B5D4CF0A6B2E3C2573F790EB4E0B91C69E1E17FA78B77CC1 +376510918CDF6E955F231BD7DBE1D4B0C1B663DDDBBCD1D95024181273D58215 +A7455285B8DE11E9795DC15B579EA328D21E9E2F8F276D3D7DD7DD69A5BED0A9 +351216C84EBFDB27DA7A3E151B42BFD9165B491D670014B3FA0274F15863F51C +54C322A69313804D6960AA6F0CD14A970F28182796656266DF384B25F627CF3B +5D51F9831719A33AE20EB9CD0511871B416E3DDD76916219B7C93431CF22C76B +DBBF4D6E85432A920C532D8EED18515C4352A52E0B3CECCBADFC1C1133267F2E +D66668799BCCA45FB84FEC96E1BE5F9F62784043B71C05383C353CC53F04162A +9D8419FF16DF736F4CEDF9EC973C501587145DB5E1F1ED63838CD8312011F19F +94F8BDA1CF1225204B9510B972ABAA4F6E9A92A86787127AD97A42BD3952C5D5 +3C588E96FBC8B48C088979F3881BE01C85B53BD456E0EAC91B8A899BFE0E5C1B +D6E38EB78BBA172D26B7F1F6E90F029AFD3CCC6E3B101777F6E045D8892C2005 +12CEE278F85797C382624E847BDC406BDFC013F099F6236C6B4C21D85F205D3E +6FFE140165D3176467E7B241E4BCEDCB0850B03E2810045E79E3190BC6D251C9 +8A2D9CA4314B334868DD0B63DB9D00CCE4D80B4D359E54E9E81F01799905F8A5 +FC2860201F49F53045CAF0D9DDF9EEA4B00221BE2EEEB189D5E1CB6B15DC91E2 +DA3C7A24A571BB9517F8FAC84F7DD0A41F53148D61BC69C6BA042714A69340D2 +86F5874B6653A43EFFD735CBAF59B539B91C1B05E6699A74B1995D5E6AB5601F +9A606A94F85F32DE43ACF78E3E2B75411565BCD9A90491E29E22DB3596F92BA6 +F7C2DE622841483492295376FCE5EE8BA0B13D54740109D82F686810A03CED91 +CA7442086B0E3A5DCC22F11FAADA1474AE0B6A893B3CA6065343D21B834F7239 +48B88675A71B046352293E2FA73932485BFFE08C8CF502F6BE95E999660D8B2A +0FA634AB11C8C4765CB478F19595D5AC0EEAC22E20BD6F30B1A1E3B10805CE25 +FA694E5DEA8DC007C05D654BA6593C846B1FB7548A7ADB2579811D5785EAD68B +AD679E1B61F5FF45E4F8684C7EB447EBB9C9F19C1D346A1D321F2D49E84FD923 +5C54CAA7F85B97232B8CEE6BD06F88F71755AFBD86D0CD6FA10ACF67CE92B40C +605C488E397A2CC9C206C3D96133EF0CCBAEA910F86DD04D645AB8D40F440439 +3D5F0DE8C89DD451C007793ACB6592E65441A9F49BAADB4C33EEF1BB685A74A1 +25BFB78143CF48AE6E4220532452C6437E8FA281C961C9D205DB1B9ECE54A7B2 +02128113842C8454CDD922610DEDEC6AFA3605F800A2C66B1E014EE0520FA2EC +E033F8E7BA6C6A64334D877426070CC64F4A30CF382F2FA2511FCC4E8F32B68B +10D7EEC8A2D3FEB524B64E1ACC9A5D888916D1C52CB3358E4064926E46A0E80A +D7D379A531BE1B3679CD227B51E6D6C02FF46437C0689E7E5346D47AF8694844 +8DD0BA48D36677A4E612DF41F5109385E07B96AE023621BEEFA0A691E2AA2B90 +E8CADEA34F5570B8B23BC40420ED1D6B2561C28A147E099EEDA54721E38D48EF +4C685E67F4228E94F657486A8066269822E58B38B3BC343F9D5F57987579C683 +1568DB43597420CE2BACAC2BB30614464BA2D6CD239CAA21F4CABD42E0025967 +017314B488D7E5EE80E110F82477CCEE750ED06A76054A57FEA3E58EDA4E3C3E +E420DAF021E8ED0D4EF74864A7A1E824C4FF703ECE2C7A1E6BBEDCF03E07B370 +4E1165A4EDD682BE80FFB57B031CF2F1AA3A087FD8F0097423DD6C5CB7534B5D +657B06513CBA6B7003EEF17DE1694B408603A07E466032CE47A12D891803588E +B1C2A4654A823859C31F6A9C1E43A6CD1BC33ED401C057ACF6226FB683A81D5A +9275BE95DC05E58600D03387859171860B5CC021542EC0F9A1D09564CD5D1AB9 +AB4D7912746DB575690193F7AF9F1E8796C9D768C36CC1E7881B7DAF0B577A49 +3120506D2C28E487509CE32C3AF08DDAD24E3661C510A118B1E6532BBF715A0D +6823411E2F423322A0AE1278664A2A391525C51407FC44082FA112B052D18241 +C4BD149FD298430464B8805A392636365F16B552C3A8C85FB4391779C219E8C8 +7666533C8173D05FBD8380AF078D402E8ECD110D8211100B61C2B3AD289F2ED8 +06513E48847DEC3265DDA8589CE2D08462D88BC1DE42C42C7B85C5814FDE1A22 +185627E533C6D6FEF2F08829E4308401F9A3688E43966F682E008CBCEA1FAA78 +AF167872B047977087BABE9CBD0D32C5BEE00DBA8FB601CA91632BCBCF931FB2 +6A7545A1B85240B4CC322AB87215F7FD0861E2E15D6610793D37343DDD37CFE2 +DA8FE76F21F89D36681AA6A43DC0A18AEE2B8890A7888DEBDC7706B0950C5941 +1B4E0DA58D126082D077CDED69545AEC02608232764F1BD76E619096084F6A40 +E2C90B7DCC3EC1B44B0A9D57CF9A26175839B5E794DDF3D971A66BD17066F96B +8F5BCD802920130F76E434A76F8FAE8CE36A682B88013043CD4FC58F0E43957E +6BAD3CD19DA0CDDC20A1A59232EBA4B3D7BFBDFB03B340476C88C8D1E2610162 +AFA87AE597856905EA9E3BF9A9F876708E4EE74EA2B873CD6334EF39934E82EF +57FED286EC865B17F0458D8C80EEA530A48AE583D90327BEF4D5572C2D6302B7 +2826CDC8273D472681AADF689B1C35468B4BD921176E2E6110B701CEE8849057 +1308F271EB8865D933305FAC772D81DBB57AB63B9FE4A099FC5C12A3D0C3B53E +5734D8F9A6363E7A495DA00171614BB09EAC3DBDF70FF4BE66A1B7CBDB0EE947 +A66EFB7FE439A044014FE080B3456E6882885826AB7F7607B83420EB3F1938BC +CD256A898830737E39B674A2AA18FFEF4A5060294EB206535C95C56EBDE03FC6 +58A99B4F468DFA4BE4F63E1355C57B9365CFC853D4DA74774E8C6EC887F1BA26 +5D1850271128267EAD0C2B707BC18382C8F1C30F45DE1BA668B694AA78AFBB5D +C8948DA576469BA18204F616F978E606BE2B07BD972F3247351D3F8119EFA501 +7C471171B70EF45ED3557A26501F599B7606A1F3D3F543C840B38AB2A9AE7D3F +9AA1633E6DE860AB2378329FB9513F1B479B9C553EE43B4565E49D4FB7E39CD2 +998D5FC63EEDA03C1CFB5CC07F3203AACA07C853B69DABD3B48FF745B79AE1F4 +E6013DA04F13E069648104D5A38A2678F31BB1DD166D07578DA08A3476E773E0 +9C23D8E05016ED76A0CCA6BC01BF814996AAF260249389C47CC8CE66B454A5E9 +2643DC04C42CFB12FBB9ADB0E78C79C982D7F24B2FB4E5D32EE804FFEDC9FDC0 +B9984261D8124B3086B2303636C1DCD552AB7CD18AE2E6BFE248D02882014F5D +659C48DB8AE75DD1C5589272EC3D33A552089E26F80142AD0CC676F70A94E2A8 +70BD0F2DE0F1BEAA038C6EE73CF58AA15BE408EFFDE8BC1B2645E1C13272EEB2 +45E63EC4B4E34DE3F1BF7E8530DDDCAD1DB9477E253BB0CDD7DB76423668F37B +6D8CF668643783F562D1A88F831885F92165158476A408B5891AE6583B10E0A8 +2DC1178398D7DDD886B05FEEEF6505C499EAE9A4ED51099D3D424879E7BBD4AA +61C14D18B0239F63C1E6A3D559D232C4833E09C36B5E7A22ADC68E1963610666 +1A6BDFB86A6693CC2CB647A4E339C09BF17FDD40BF22CD952491A5F5A66B9732 +017B68D7961C360A317C013F335CD54FAED7A0F75C75C25C575DE3E65E3F0FDE +C30C7FA545BAA0A3A1A22BB859C16F58E93FB0CA74E98E3899D7923C055AE485 +E75FE2C05DFF8874F452796F95BAB9CBD271423DB40C6087626C5122454C6A9C +BBF205BC00D07D9830F8AD3A76A5A228E9911583358D2122F959B233A8F590FE +BB916539D2AF54A10C52AC6541B1C1CE997480908E02A722256EDB75BEC4E962 +1CE8BDDABF01A673F31775C408EAA2A5FED6AAC014B05C36F3C54D9AD2DCD025 +BB70733EA2185F9FD618788854DF25427E870D37224C6B6617E3FA0C251C3FB0 +6B358CA539D752088A0945DF665D6488E37017EBCC6502CABE9CE267BA87A6DA +E48B1F12FAA0BF3C12FA2E860259C6586FA7843F584CDA55404C88D283141685 +41812C6FEFA7A66AE6C731929D09CE093EC6712749285DC2FD2512F40EC1B114 +70B7613B43D761CB6A02F570A059331ADFA10921C3A3C4E6BE9637FC8B690F23 +138A098D8E1EC01EFF56C86D246BE7270FFAA7C512C6FBD96E3C472F939C1893 +C8A3394C34045B700CF10355913744AF99463D6E2573106B2FB9ED07B79ECEDA +F9F6D041B6061CFD8E02887E5C5B0194243F3DCB40909C3C03333A279E0D9A9B +037B84BD6F7300D0E5EAF980EE53B7FD883886528D521DDE4F74536C7F1C5BA8 +6CF279C90DDBB82DDD1EED77FDB05E8350DA91080BCEE5E3C84F003325433D10 +D03C08B43EF95318EA3748DB9BF84D57A712C0308E80F5A54A38F0B2F7AA403B +C57BD4BB6243F7A0B09AB0C885735D9861115ACA7567ADEA6FEC6F59973584BD +43B3AFD18824327CD6C21D4FE1F16F6C67D01B97FBB6F70DB5D7D6E46FDE0D09 +DBC1E45DCF82E9FB3D465175DCBBF254C59447D3C3DF1F66E0EF8CB6653EA52E +4C1D346D33499D2CF129D9704D74AC399DA2A23092216969B5B8D8B520F05DB0 +345E1BE31E211BE01A1B1FEDCD9F2699E9533385D29F0C80F990CA5A874EC60D +8CDBC045FC2E2F6E7A2E426C485DD04C4052A80568951B7C5B7A7FDF8DD163A3 +CA1D6A36A80B7CB4401674E6E1B9E8F2DEF2ACBF87879AF5131DBDF6A0458B01 +3243CAFB8284DF8C4F946C328B453A363103665491D387CB40A493B9159F46F1 +E95207F8E71D827A15A895EB17899D2C0FD610B9C3D3F8378310602034DA6BB4 +6131CE208D659FD3AEB590D2CA5918ABD2C10E16DC378CC922D605C66850C6FF +2CA7BB0A1538BE6DD5CCBE51CA7509A995F2FBA6D2813AFFFB625604D25D5BE3 +4B677D6CC459FED33F0A58E740A1EF93455D2B7CD3B6D7ABEE83D3BC3823F2AA +FA77DA4784BB1DBDA4083D991F9104BB62EFE168D1BA37A2E3EA54BFE6FC2C94 +47078B5E340D2237B312258AA715FE854291D40061B6AA9F9907146EB2FA3B1E +A1CCF2C8D2FB8230406FEBA3D184317B4F7F777410261D500F55751A0A445DCF +8B100FE5B149B2D2880C3390422BBB8E8C6B8A8B773072A0091C1BBF8415B329 +D16FE300AD05CB4B62C90ED22ECCE09B5786547455213BDCA572889B926E3DC2 +6FCA839E42D5519C1C2CDCF412755B645AF3BC38897CE7750B8E47F6E352702C +9C554B0E2ADB99F2A0CDF93DCF419AA331BA310ACD315C11912F4F8898EE964D +C1E9B8606981B25AEB7E411114D74B37952C0528E51447675CD888D80A0F15C6 +21A42FC33BB3346D51B6BA20B726EC79F582A90EC43EE690F0A83B83D2E23F3E +4F5C12E8BD48F1CFD04A189937925596C040562F4DA681B185BEABB00F7EEF7E +1E44F8ADFC6792AFC7C3C809338A6B1C046917289139040D382F60652624775E +6C6214AF5BE1D81A2A23CF2380BF6A13E88E87E2F1095B60798AB4F657A26671 +FE1C598578506C804FD43FFBFB76DF8D4C8E647F9D021C46011E70880A8AEDA8 +CBF3F181533340999B7620066A460E564C3C23FA8B29CC1BC8D337E2B1E49ED6 +9D10EAD96A52AB4D06982F4C48873C6F4872054695F253B592B83A1BC90A4BA9 +8371C4D319DD261B9A0AB13F74274E5B376A3288FF60C93421F114B51355E725 +FB265D39C00AABB2DE4300968FBE7F652C4EC71A7EBD58A20F2B4C1E2D1E3646 +902A0F815E9D67B50861D6CC2AE3AB45BDDF3782D685ED8E41C0D8F1FA37F238 +00A8A3ACAD22D898CF8E95855558179BC84D199C6C79A3EE2651167A4067A9A3 +49109AE7F53B59EEB1F57DFD4A00077DFC2BD2CB1E3169F0A348D4DDD2D9BFDB +A31951065B0230504FEC2975FB5015838759745EEA1347DE8591A58783F1EA48 +C7A7456E94BD2ECB916B85160277F98FDEC95DEFA7FC19532AF90C6AB3399C55 +86BF03B871A4C4386714AC62E44857919EEB2658D1AD72570D70F1F9926D6B3A +D12988299F620196898ADC3125C5A7D11765025B237983BA1DB66418B484B022 +EA1018CB14150269A089EE9CB3EAF08D4F7E15E29048F729B9D39A15C00B8715 +F030F927C8AC027A3B040CCD0CA1FFC5C6BCBD00457BDDB418BA3805C30AC43B +A8DAAE706D404E22DFEB24AF9874D741C9DA45B3163C259E8DBFFB6ECECE2B97 +6BD4335015222631F5D86490C0F9BD7C22ABD32D6DD412DF772548B38399EC08 +0E28700A2ADAE8F0D50EFC4CA8642E0E996D72BFCDEE1CFB252A6F4D8E03347E +F6328BF18282ECBC88DE3FF382726F910FAC2DD599E63EF7C3068C1CD785D101 +16B7671ECE1E0D30CCA1C6F2D3AB5E81E309696DBE4973F71D240C207CF73CAA +D620DBE563AC9B2000A628E8657A45A24030432AC74B5ABDD022CCF6AB855E1A +61619EB4DBB848A6C2ED5745005938EC8F516979806AF5E714704027A0CECE87 +4C44DAE80608392EE0EE0E39555ACADF1D3A873D35CA84D87ECC2AC41937CB62 +B250E3C1AB878BA32AE2E161D13FA536A305B352E3E0210636A81C6655CFED25 +A2B75AAA6FB0D2FCF696358223E78DBC2B9BCA15271F7612769ADC00BA66A2FA +8E38ACEB99E18B7B4A5C2B7977169EC141121F0664EAD87EDDA372BE22988222 +27D477A6A4715C71091CB2F01C6B3176160BEE79CC8FC854166DBB093A49DCF5 +E45AB3B20EF3223684E83C8FFB2D5DE9CB49754799E038B748E75C99EBA6D69B +36E162CC3860E33896371D0164C14138181F2E00FFC08E2A3619E1820A560C7F +63B054216AC8CBA7B034AEEA8E735705AEBB0D78F17856E1A0476DA6E543E985 +4F7AAD98E3ABB2D7B4B1629FB0E24B9FF10F06192AC8475CF8C35EE3E635BEF6 +ACA79F1847FB84C4B20E6067BC0593C7C39657E08A3CFF64915F887D5B99356D +91C0722A917B347945E1A867B062C016EBB7D924F11C74873EB4656B61A41CCE +DA1780D204D28B6F0CDCB1E059B3517A5AB44D45B43221DC53FC699BBDC4F2D2 +865C697EAA3B49D2AF5A4CBB66244196A3D8A09C8815FFDA307DA47760CFAD34 +434D00946C23BE41A6292220F0CC19CED3277801C9C1C3CBFC755A261B4ADA4A +0C9C3E7F8ADB77A5C68021775619D9CE770B4FE975CD468BC5CED173CE1356CD +A26E6AE273197511E50A014B19A5B79C7B75A57B08185B20AED966A4C9DB4426 +1294A5BF040A05A4FE60FB202C7CD2BE018DA7702CDE728193B72F03C3C0F1EE +58CEF81EF167CE9F8967B4DB7A3A3BC0868B8542DFF05D46DA08CA79F62ABDC4 +39373C66A08D536491CCB5EE828E410576057488E85A47D5D9F99F748E19AC88 +E207C21EB573B9429A7086A93CA63467B3EDFE08931BF575DB82B76AA9C05E00 +29C7D4F53CA16E6DD53BF23A0991B1C5B4902E4DDD5178E55C2BAEA308C5877A +3A21D1184FDAF68ADF993920AAD2EDB045E98C990584EFED9250A332BBC01217 +DD58CCBF7DB9C0E51473CA37655DECE639C28E04EB47E5B52DCA10E92BF83F08 +AF3EC395D0A74BCD4377EB7AFBD1F0B521F6D8F0741A07BE28D6A8C235B90B7E +B448354C9FD450F98270B3083515004B56718E81C4C6654E40B692780D83695C +3F456A401A6D24740C67A485AA8B616B94B23EB889AE93CE66F5CD6916E32C66 +809F5D3C4D52195D1335F89D1AEA6C07A1AC8E8F30AC662E11541536C50A6763 +5D8C71FA8E0EA2BB0141FCADA7AF9CA0A69AC758DF87159707038D81DD706B6D +123D53212F77FBF6AC06A7771FE86D254F9E6B29045CB60628EF491A26226D02 +D799A4B2E1E4DC25BB157BBDFD0958E1A4617EFF11145D3EB94A389F514D1247 +4B6A4CDE1DDF18A826C0BA8FBDCA2045C3BD3465C371248428A4CE147069B2DE +63E85D5F92038E8986DF08510C6FF1DCD615A7164A287A8C8C869C4B1151820C +8BE898107D19E768E66125C6A6BCA28D1A99BD7E6F58F60DA14E77ABA2001B54 +899B488C4DE7DA167A762CA3CAB0E8D157F6BED3679F019546F0322A7F6ED7E0 +D6AB34BF0F646E07A4C08EABC1DC40062E17386A406F88FF43C3AD322E8A85B3 +9EC8C24C751ECCA65BC7A2ABC5BC0E8C883ED0FE37DC111181650CC6DF943495 +5F0DEE475D1CFED3C23655E6053A884DC41E8A4D194A02051E5F7F38C625FF89 +5894F611575CF75A533095881952BAB2C81BD8C303C903C81D937E4D72A28261 +2167382EB3632D975CADB689A7DD5419F12E32DE2345CFAD7A85A9ACE0E63BB5 +3C49A690274EBCC5CDE015218223D2FAE1A1E7344932BD8CD076FE564F523B92 +6B50380301C36A67A264AC735C9B038CFD7D897ADAEC00EC65E174F47EF1EF0E +F4A1C83EAEC77CD415ADBFF5E3AF7769661AD8506C356C20595B1BBB7BFF1808 +92015E73FEBB58376DB5368C54BD47B486330BD22F9E1804A05B350671BA373D +737BD0BBF7E78ECE5C76FCE2B1DA10BDC7074164DCE3D2940F1CDBD02A996EB9 +7F4227B2446C7BDC11AA79B727696467941A4C2E3D51E3EAF366EAC7857F8180 +AB05461898B99098E955BFA09A8371FCF1EB671DE86C89776B7C90AFB9A4EE02 +39B35FFDE25BE1585476BDE88912D1E2D4C1083BA56BA4346B90EE84E6CE5BDD +A7CB599B4D716F7F25668D8C559E2347F20311D49CC7D3D4AA0117D017F065D6 +E43EB82320EEE8B29B7C7B83A6CF79D3A20B16393235FCE7F9D0D5592A80B33C +E664FD2F2B0FFDF29C89F7F5A5B0EA96456CC42DE1C2BC36E791BDEE54293D48 +BAD9DFA71606A78B5C2B8120A45F17A394F417C60CC181EB7ACA7D461A1A8095 +2372E368C1869D19E4A1A23607B6C2B0FAEF474C703492E7C1D68A3248CB8F77 +FB17BDF28A502BACFB2E4601BE018D24EC2CEAA4537271B2B9BB7807CF447BDF +5A7DF27A00D96C481ABE0B02EC0B61606505E357FBC1BF8F1A198A184BFC8B88 +1ECCF1EEAFADC8D299F72370BF10AF53EDCA219DBBE145E0F1FF317515BEC422 +623045574C79B689412F5E7E5B66FB463E11C507DCFAF31AC1AC380F35CB7DA3 +FF9A0B82402DE0696CA50B4CAF93667A489C1640867AD454CB797645710D9929 +4857D74A887D7E458109B90202A50ED46F0375F71482C7C6BC14E5CA6B001206 +62A44754C351B56B41AA8324EECF26A80E7D3FD85086741E70FD33C8BBD546C6 +3AA832DD5BDB976D17B28481B7DAF12DEF348DDFAAC53E3455F82DEB8056C13E +931F9159178FF1C744AA7882E7D49D88398EB3D023A272B8A89FB5659AF715D3 +0809BB26F3EF80A788CF54449988A73B416219862845F904E091951992A279F8 +33FF4A4CC37F9AFD5521E41F6FF1F12B1D9C7C0482BB38D1BE007DDCCCC37C9E +1F7F34B5ECEC3E6DDF6F6EDFD95605BF60F55F2B1D345430A89813FE189F391E +844C44571502F66FC3A56B222DFEF0D676041A660E6D741D8F72967DDE8C0A3E +96BC0FE3243DC07CBC1F0E99619BEA04EE85039B404122E496AA7BE34A4775AD +E4A310C1C020AFC6E74279DBDD0F6F374691D8E3B6EEC90B11AABD20E59F8595 +3397C7E9BA2052454250585469A67EF40741A9F09BA2A2A04885CED6AAAC081D +0475A63CA91BFA5D6A3770C1CF80F9D01521A51D815ABB1F31A89EA13412BA42 +7F1916165E012C0A94135C485E42A5161C7B94A02724B5E6D196D42BE3F408A1 +C11D207F5EA2CC3F2DEDBACF246719BD222861389AAC1ACFB94496CDFC5F3348 +4ED4336E52D03342822CC7E267C2C9694D9C07448ED043C56C57123B08124AB6 +8EC0700E42478E6F0FEFBB0549B2BE787570D2AED16C44AACBD6933A925055A2 +022517A427181398FF7ADAAF7910954360EB4403E16A92D7203A4587ADB06169 +EADDEBC7EA4AD684C2FCB0C1008CA92508C4B755E93401568145C5555C8B794E +F9FE03CDD2D904FF6B3C4429188DE0ACA011BC44D0ADAC60939EEDBAB25AD69D +48A5E171F88DC43B1511C6883DA9AEA734590F09FB58793D0BA23CC46DFE5FE8 +A9C82D1411002EC457793FE7DA76D29FB65F026587DB905A1EE651AF6E4F2122 +A8561A524984E0FA2FBDFEB7A8A4935DF29E126C1CF41ED66412FCDA7D07053F +EEDB110E865CED746D2530704C3D906DA828873B6AF2FC2D9E9EFD835D71BEB4 +A0C889B6156AE539B48E0D8026F5A8FD0DEB71FF8EAFC66BEA2130B9005645C7 +6FCA01DE45783C2D7B75EE9A9A6A8F5BA5F1B13EBDAF2F246D701507DADB5518 +CA8E75918A1975617EDD5F5701AC7FDD1365F9408E3BA2171D4903A78D223BB8 +0CA0E842DDBBA3C6B41D2339A7C620692F10C4FA9E8C950AAC4E86607955BD81 +A4E3B0131984BEF21770B436B286B93456646004854BA2055C3DE31CDF212205 +883E2D4DDF58152F192E50B4663F0F9779B455C665ACD6F40E7948351BD9F78F +24550832F18950ED308B402D5FC6327CFE094F1090871431A59C7238CF1AA562 +3A976BCD5808405E7BCC3DED691D332C9B279C849936CD65A6FEBCF58CC2311A +054CBD1D630459B59071379C3865C3C6A14E22B5B0381F44372DF1DBC8727B1C +59A733C294C4322E243223A986FB8D2BF832755B5CEED304E6B3699998B223E8 +E28EA70BEA1358C2CEB7AB07112D30B83197B263E56937CDD0F074EC29FAE7BC +8D6A89133CE8F837D64B703BC40EB64F2DCC73C763A0D31F3C058B5E9443EEB7 +52874573C500ACAE072071AF89FB9C4F4641AECCD14F7315150E5947731C8963 +55403D9A4A92EFAAAC4F5F6E95B4751351C4177271712F85495397CCFCCEE992 +98E7DBADAE9D3C1F273AA78F75012CA5AA357DB035655B3D98ACC2988169E894 +C573D80D60010DFE08394A6D05932944E07BAF050AEC00E45E04A424C6C351C1 +511DB1E856616281570F6DB61D75078B2D1DB18629731358D8663C615782D63D +E6D7D9464CD95D8B446E563D684D16914B0CA2978C473CB514A5A06D25522569 +9CD74C4E46C95DCA19C8AE79ECF576A677BBEE3510F93C4176A4B5F1A4F24E36 +E0C5CEB30DCED55B7B051C01AB5251CB839AC2E371944C169D9CA4AE4B91450C +5503BFFCEBFE1AFE8574E2020D3DF2BC16BEDEEEB76C7FBE3FEF7F085BBF4BCF +2513333E3A01DCA64322049010D1802D1E50B50E39768F960BA243AE4A79C12A +54D8F7CB63476916E634273F76663E4496466DB6BC16CE9E74727C9EE9FE79FD +B27EF3DF0E46EA9C028AA3FE5470E983BB251AC803FC07164644F385B6BA347F +3FC80E540BB262BB5E0CA619CBED3C8A4311B9C2B0EB70DAAAB4DBD04CA642A9 +53FA5B77D48384A8FE1F706DAE7DC478145A2F97FE5075092149C536F32A83C8 +32DEB9CBF5177AB311222565F16AAC5109F31F7C84321824ED15CF558D65BCA4 +9A73C570753D325F081EE9A3A78AA2F18258C5DFB32739242C0297C185C22200 +34C6F979B51240A7B1A3326677929904B567550051B4D548F3AAA253111F7316 +D3C84FC22E64F65882773C7AC585041DFFE3A6A15F365D825FA0C43DE16DB215 +243E53975DFAB3C1FA30D6CB8B52B9C55FEF96526624D5D8807AA901B16293F3 +AE0C4E03E6E22ABD78342AF9837A380BB99B68ADF493C1FB18CC4B968D707AB7 +B744D296FFEB8F2178B7C47D94DEDEAA916AABF76FA32BC0B86E2526F66ECF17 +6FE4A289C2571DE0F86B9B44459726C41C6C648838F928A8E6FA682A43DEA7FC +3C724137DAEBD60591A73E72F2A92373103808D3973501F08647028F83F2A9FF +400344095BCEC1EDA8A93325FDD58769ECB58511436843AFC403B5ACA14B7F22 +AD9D64C888F1A8F4E2FAD374804A72E16C0DCC0F2F56B91B3908FAF52A2C6DAD +EB9BF87C40FE29015B6E655F40FAC45FEE240C5DE731CF7B54C0F48027697146 +3A6FF6ADE84F6CC90E3799331799DA11AA92F445929BF4A95E9C5F4BD4D63CA1 +C84FE7BE3CDCA2ADF4DCEA99EBCD25D7724760516259D45DDC9D6CDF7E538128 +F3D92F8676AC2D0CFC3687AFB29E8BAE8671ADE209AECC9CED20037759EAB6AE +42E1B41111C9BB92D422CD344E7CB85A7403788C7765AAFA62CBA09A5522A6A5 +0EBE06D0ACD23E77BEF1A15A9E99A4713E67E7C08467C6B2890EEE9AA1F0558F +EC24065FBFB04573E13C52137EACC7A931791A5D5F675AB42E9B716DECB6308D +EF96E59E36E8D40B99A1E6D9F2DA7F32C1E47091733341D89DD109FCA2AFD4B6 +2D65D6366EAFE4A5BB0891B9344557DB94F065B3CD7D75874AD92F24454C2B21 +C4D2600AAD92684996A07B4DBC73BF4A3A01620373202E31B7495DCA42DA4B50 +6464003C1431AF808D30E08C4AF67E5CAE26F78188000AA0E8C97151491BF1C4 +94B1CDD72126412E0673ACD9B9322C3EBAA2AA1D039EFB53BD2C708873BF77A4 +7C89B9A48EFAB9E55ABE4FBB6FE868A9B2D86F96A5DB527514C6361DEAB44B53 +BC93CE3D3546324D72B13FDCB33F519812C1D9D66ECC126F8C3724F4D194DCD6 +3FA6E6F06B2509FCEF85C6A80F9C2ADC3D15A9562D2A65C4D1392FF915679CA4 +36E048D8C93D540DFE0265952094E7E6C8CB33BDCD517247FB81D564670F3964 +E65AD1F253EC49752D8ABF2CE12B2425551E7F03D5AFF08A7AF854E99322B8AD +4C2A300672CB3A06B668A11B752BBE824C07531EB46698EE6C6B65112CB77F0A +FEFA9A531F51D29EE7F45E8D0C73ADA57B32099FE3F0DD59BB97BCEF2CBA4E84 +D892E8B6880397808D46E78E05F42AACF717A2DDEC317BE5E5FFCAEA963032AE +515B76D34F880C049F3DF624FB85DAAFE31882A2D7CC9C29E7EF28E2AA4C46A2 +FE2B035FF8303879C436EA4A2BC67DF287FF0C3430E9566857F0CAF38CDFD955 +559249751A61BB9ABB4946A31881ADED4F938C6468318A97B9F1D60A59C996C9 +C8154F002185DDE6063E67449A6E0A9D9155EF95A7EEC84568EC8DEC4E3E9D6D +5E3E37F01FA5CD500715E0777C0B8FC6940C4BB4E6BE1CBFF8D7F461CCEF1641 +9FBBE9EF79801121137F5336350701ECC4A2ED838874BA412944545B2395C1CC +6873816AFAB5F4B71E978EBA442C309799F81E66312BD6585FDF500075CCD649 +DA023880E008D9E046660FEE0C93B5FF18722BDF423C5D820DCE694C6803B83B +101E61412650B945C63348D5053C3F97B6D38821A262600A8231E151718268DE +4DCB22329C49DF12D9135872A03CD900DAF07D8F3A396A39FC9A5FD04C8AD26D +4A41211D509B31D9032418D372A90CA0AF2E16DB8996E659CF103EC725BC4820 +9ACFB3C8D5155D87A2AFCE311BA6A18F95E37A9218BB5A45620FA20FD485FBC6 +DFBA5A3FA163833657572CC295C5BE868D584046555006623FAACB6602F612B5 +E6DA8CF67C8C7664992B8062C25E877B578194A33F29039ABD44B3DF14980E77 +18F51B2AC035CF9CC17F6C6C3D75D2FF145B14CBC4F9A551D5050B7E52C855E7 +B5D02F32D2807518958AF87E7380B6968C51A54C735000F02DD66B2E837EE0FD +BAD9D9603E517B55B8A9765B5C6301040A83E56AE013786CB760C98DB9537966 +8D9AE205EE938ACEAE707397C3BE2980B090C3B50C814A247F82B3267FD63506 +A21E253CA1FE7DA323C9AEE3F8BFAB2D9DF4A01F18DD530E3C618C889B219610 +E313775F33870ED4791EAFA21B649142534100060E28CA081A2391F1458F3ECD +CAB0BB41419C90D0C9CA95C5A4631A01DF76F52DDE04C6570F22578D556AB841 +A38FFC5A97300AAAB48177442755D76247F84BF57284B05E5D8DE15D0F69D689 +0264FCC502E5A8D8FC2DE3F7823A0363F1BDEC4B694282D0850CCCBFFD84F4AC +06CEB968973837652E674C1F953725039933EB7988BA490D4D8567EE3BAE7BD0 +21CC586C3CDD38F79B0A3A94FB81FACD7D9ED04B4007345A4C7A47860E38F965 +8CB23565121D1E7A0D0F3F3B7DA86BC3BDF2B4CF412BEBE667E6C427F3F86E63 +DCF7920FECF73F2E421E54F6F0A8E84A8BDE2D0B9C5E441F4C428CE8622360CF +6D319385106B2590E0D1A8B6C56DFDE8874A3F30D6DC25C1ECB02356D488BAA8 +C2BA0E8CFF8EF6DA75E2EEA6D27E822F511BBA288F7AB46B3C519FA75B676B55 +72E553764D23EC460CB17BAB327FACE33450E14D8329F2339600F0366869153A +D775A0F12471286F485A65054859B96A00723E1C451C6A8A05C88B32D10AB013 +94D834F675EE8DE2A26910F924583509BBAB4B1DCC5B1FC8781D80E8CF024EAE +BED6FE0FBBE088F73987477FCE10B4055C28199A91BFDCE080B5F52A1DD5EF9E +8506B78DE1DAAA88DCDE13C048AAC003735970A5A74E469EA21D2078FF721966 +FEC29EB8D667540184E3CE37797EBA575CFE7F484C71F16D84ACFCC11A769250 +585B7E825E70BC5AF10B9DA5D4E0D7661B486DE2B1357259D473A57598E257B3 +993F51D3FC6E6EEB9F4792150179796020914877D26AEB07C527CAA4468AC50B +56D8BF2F137F59E55AF7E778DB993EA55FF446CEE4E8E5D87852F211CC342557 +D2F3647F6BC423260E2AC6398D +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMTI10 +%!PS-AdobeFont-1.0: CMTI10 003.002 +%%Title: CMTI10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMTI10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMTI10 known{/CMTI10 findfont dup/UniqueID known{dup +/UniqueID get 5000828 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMTI10 def +/FontBBox {-35 -250 1124 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMTI10.) readonly def +/FullName (CMTI10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 12 /fi put +dup 45 /hyphen put +dup 97 /a put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 103 /g put +dup 105 /i put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 118 /v put +dup 120 /x put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1B57C5FD29DA32D34C95E +2AB2ADB3F60EEB0600C8ADE15A2380DE10AC5AAD585FBD13097B1A7E8E210D4A +EE96785449E07F0C8EBC2EC5EFBFD0897DFDC15E5BFAC9584D8DE95C5AB288CD +8AD8B9BEF0B8E5F887B3B0B331542FC8184DCCB753DB6ACEEF98B85756B988DF +CAF1AE0DBE7D37D5F44A2E760AAE3A5197C27B15E32275A64946C3E4D0476FD2 +7FDE148C788DD2106F7C825E270588AC05B57E625AB17BDD02306F9E5FC851DC +32A5A6EDC43C770A71419B2C0C8074EF3F222C8A2097CD81A91F333A521B3A09 +482A4FE1CB231CE344AD126AA284C3280AAC3AD162CF0EE241BFB4C8F20502FF +118507F5D1B5FD898571015E73E5CF2281085072E00D401F6F59761EEC3E8381 +1F26F75DB66C504AB6BABA87D121B1E7040A07AA2FE01F80DBC246CC03C4B2DC +C2A715980C52B7F96BC1A78FCC7F4F52EEED5F705E08FC1E5BBFCAD121FA88AA +8EBE58172C162AF409DBB0728F14923ED02A65EA24E5D52B6AD07777455A70A4 +61833D3789C719BA92E901232599767E423D5AD9C807670BE0E7B5CFF8256A20 +C7BF7214FFE0342809570F5966A2C43E784F35015D9040BA34FEAB6A6F089504 +3A40A9E9D711A2721D3F4998371430FB3C94BFC619559B97D49627BB630F4B70 +9D0A8FE4E916235335C3962F3CFDB04C4A3CF714DB5E260F4E66FFF2F27CEF2A +D4AA26BBCAED23B8BDC98F8F453BA27AD7758537561E766B82DC3032E92A9EB0 +125D98A22C5466AF069BF72A9BFA052A8628FEC6A6AD0B711DFFEDE3AA2D7CE8 +34EA487038EF50F953B8B4471CBA6FC3C53877EC1BC94582B1123EDF44B4056A +30F49394BDE22CDAD7F01951C7013D26979277D18EFA594E8F4F2B5E615187D9 +39E842EC28461B9ABA52020A127D2CB9002A673A435B13C10602EEFDBBA6BD49 +9DDEAB9E68D655443A5C2492BA061C1391A51592BA8C353A6F6A0708E8860184 +2B5D031D2CAB87D618E9F6F7A0BF3F66B3FD5A25BB91F7F1F5F99CFF56EFF4FF +0A35C55658001ED2E97B26C869292F6274D433A5443179DBB8EE987196306348 +3F9E87C6422AFFDD30080C9AC4EE7FE5E2DCBFEE4974331F4AAE479FD8806D4D +9C2B85FC69EB0453AD827A1E767E5C484BDFBF5C8D6E2B3C96298B390F22D757 +802643A79D5E29CF3AEDF0E12CFBECA4663444FC87F2027571DBA9ECF688BF28 +FF0DDB3AEDBA0FB28447CB4B5D5205F40C1E7A525FD7373392EEFFD910AC82D0 +98E71660A1B3227C4A2592F3E853CA4CDF64DF19A52582E167234F4036FAAAB9 +5446BE102DE2BF43E82F0112C2A20F15A3F92C6571AC761665A905362C4F8BDF +AC8705519C99862CD9C0D75113C4AB5FBB83C880E46B82715B5628890D9103AD +A2329638B95D93C4DECDC5E6C588C9D5183EE6FC28FAF9825F02DCA567306D93 +5440987A81B51EE7291107A08F201C609FEF91A8F0587E8B13D4BAF74A5A6815 +DE9E4441F46AF8E1DDDFA2D611C889614040B144A5EC064DEE4638C04EAB2E37 +4CA8F50FB8C4D65BB296DCCCD39F1F554CFBED96670A91F515CA10EF896874BC +8EF48C6447752C70FF5A06F928DB55586354076773BFF7E94C4C3A7A1C1F421B +A9B4E3936EC26E0C19BBBFC90F021E877F54B62108F6DD1C7F6D5B8E64FC9362 +E173F01BF2904B7E5A08B3543611562C2714099DE7D4FA330DB148B560A9601F +42A84452811CE213DCE782A0D7809CFD954D6BC1EBF2BA4D1B18F50FA8174C96 +3E0120E266AD5DDB40B3F6798AC28CDC5C3C4BC34583528F5B5DC8A222B80B59 +A3A93DC715D061EC6915E6E6E21A25425C25E8747C60F170D61047108826F96F +7830E220C108B441B6EA3198E33C49BAD8D43086E49F5A2BC7958A1A8CD011C4 +49045193394696EC3DDD0BE084E8F2E9F0B9496F035C0DEC1CE11409DF566428 +D50043CFF5CDD1092F6E0807E660B68163BCA738E8D98FC6EE3F713164CD204C +0BA84FFF4F33F47BC31750B448603D7ADB9AE92FA91AEBBBEC0DCD66980E6955 +CEB425ED07115B24E40F53B29B9D840842EAC691B4F591F866DF27556474B485 +1C6F53DD72499847109B16C7093984A6B8487D4F3870DD517945CD90E648C1BB +8A6861E540FCF9D75B984B5009B5CC760CBE297042C240DD624111670B703388 +6FE6FC0E89C6B4C88F51DFF3913D0CC1FB4770C8CBEADD4B86393605C0B6C468 +83CA5594754411B6FC331EF56D7CD6D247FAE42E966583C29239A8F862348D29 +60B177984B6B957E733DB4D275015691D91443BBB13C2DA96097A29733CDB284 +42F89C85A7A743338C9DD3BBC4EE53F695E5163E6E1ABE5791ABF100B198B9B2 +1C21E2FA2FB4AFE7F9BB2D381260CDD3A2CC05BF513AA1E80ED69FA27BC5ED5A +21445BF00BC2F997B356D94AF13736C6D3B0613EB6F4CD96A685FEB672661DCA +206105EDC3CA07900676EB2FAB37F48D2E8207BDE1463894DA3C5B1488AC1EE9 +D39DAF691648048F5D7A384B8927F8DA2BE3602669F71D80686E427F395134E7 +7ADCC611BA91AD4B7A0237213C60CF2C905359C90795230344FC3C50A22BD44B +55B2044792509F50F5C21F53D9F9E9F063ADBED3AB99E2613B23334FE8DF70B4 +6120F2EDF69F50BE793EE145B9FF9C73179DE640FC2ACEB5C6617F918CEEB762 +4CD81E665B2E544864D13230B058717B207D3CC5D6647D5343DB4D0356082392 +871EFFA896631A7E0D6477942B632074A9A4EF7B09D4701B1639BAAB4E03A40E +9B54A7A4F845CD63F88831EBFA4FB847847CB98F3455CB5957F2E0A0F5623645 +DBB5C5564C7F8B117D6E27E65C0F3EA81AE67B4AE4B201E7C4FB0A8364FE53F5 +41A7CE8F834C2C4B322809B353A5E63BBA7BF3B7DC1A85EA700BD287C2BD3FC8 +2832B0BB4695FC937FF5EF06FCD87DCE6DE793C2B1EE10E6450352C17726155F +220D550B1759E15AB2C1D5968E52C8080CD280E99D3CCC0E80C2EF8BBFD96001 +A226FEED7311EFB4B67F424B557A877379A15BCA54780F0CD2CCA00400B9B39D +981C6B552AFD2506D1B23618FA9AE6D8143CD7198A8482CB416CCE62B992347F +337D505A4078713BBD91E5535BD58EF0351EBDCD749CC24D4AD39F8CECD7D6C8 +139756680A4C03A58B3374CEC658D30160AE4863A3938A891BB59CBE02BB451B +1BA4B2B6E68AB61DEB85F95E3C909B8B66E220B9F18280161C279F10F7093CDC +100A53D542F071CC0A5AF834DC1D18738F5DD62A5573E884E1FFD22BD810828A +1EA47F8218C15A2E97CBC609927DA3CC2B802EA4A0D7EB57627C135E3B065905 +F97597D818A2C5CC6F328AD25AD11FA50F1E4FE637980B7474D6F85A521892FB +72989AABEBE02A2D0EFE88A6F67AC29F5D8DDFEDAAF465C439983C6B84389FF7 +A6434462BEB7B07DBE4BBA61ACD4A60C55B5C0AAE527DE381DFECA2E6BAFDC8D +310364ECB42CAFF72BA93C067B2F02D1CA7C34AE7CDC46787A0E234C8BE8A928 +7A6F3DDE0338FAD532A9886E8E3525B85DD39364AB03EC4C0DD25DC179CC1989 +1BE232E387E857C78332D834679195E10F1E7B87B7966DA3B2238F53D1E13FE2 +8F55ED6A92A750C7250C9B91E29796621E7E9520373214D7DA81B2875A986D33 +80382AFF6DE1F829F048E57664D9C4ACE91E4684A51023943A4964AB5657D610 +3A5405EFD4CFD1EBA684243E15093C9667797BB47617B66054EE02C41FFEC45C +C1BAE8AD56B00D323FCB1D2744F061FA16E161988741A319B1564E04BA210996 +4F9F02A3268CABE450D166A763F5284954564A1C86B76544C5F5ACDFE0D758DB +865A1CFCF9FE8CD5F9C3B2998C56468FD52DF8EE60C6935A3D221EAEC7714E3B +301371C7DDA0B03A2416238F2B47BAD3A2C5021C886DF51C695AF9C87A864B48 +3BB3FE0B355EED5454B59B25A0D8A1B8CBD356C24F64D9B55E16C30C011365C9 +1E0380753BA3EDC0868788D5F50B9353D0227BCEE1BE36998B2622C0759BD66B +E4444250589F9CEDE766D8B940770CB6B89503E925B35C00CBEC2873D2DC4A29 +0823FB7A3717B69A7DEDBAAECC067949932728E89BEECAA91DE3AF9BF070B9C0 +30EEFA8C0A55C8388CAA2F0515915C98E67FA095BB98967D14B0DCAFA9622E4E +2E0EBFC768D80585ACDF28D8A5C2B6EE2FE7AAF62FFB90F569F84A0903996DF0 +C1D5723366C436E4088F3E2BB9B47F9789052A71CF5C49908CDC1DDA194BFB89 +14D7E3D7D4D72A150FD6FFD8303E9DE5A97A71B808B8BDF2AE466F31BF5D7A4A +44F81230BBE2B456A221E2F72A8B59F8FEA8D31F8A005A5BD93B9F49CFDC3DCC +CE2B67090460F632271C7157BDC2F05BC2749FD562FC28682A616A52D1B67654 +DF78B7843A9EC26A7DE2EB168F874904C2915B97534B2D4D9F74A9573A771D34 +9F7BC855E8F794621BF6AD471BCC347E2DF5F620F5C209E33A4CBF1EA85AEA87 +4492A77342DD33EF615FF34037D660B713C908786D9022051B825226545827A3 +2AD1B05D654DB6E6D261B4E8AF0933AD1F0FCFC7201E1A7C1B4199F160C38676 +21ABA2DDF1CEB655B3EC3226E0B122976EEA998F7A5241F062E54AD1DFD6ED26 +47C99A439E0AE95415059179867CDD3F0FF751F3141309F40E00A6C7C28433E4 +F649BCD5DAA64177580E05C495EE7BCBCC5FBF104DAF360CC2711386655B26F9 +D349D887EEB32ADE595241560FD5924A1745A22E6A01DB9C285EF14596EBFF0F +03F36EB2E0A7C3864F819EF7B0855121292D49482F046A55CD7271FE03F02EA5 +886864D9D8EC22A68C23089EAEFFF03DED6484D8C341861EF8B6FD3C5BDF5AC8 +352DA4E13A1E30D0CB71E090E9CFB9AB2CAFD0CA7C34AE7D8E3B2EB4666834BD +9CCD1AC2108348AFEF6071796F4BB2FFA4A67ED917E76A109FA2DC2A30D744A0 +9AE653A748C1D18FB52595D84E87F1C1FB6B2F32667FE203262C66627AEFFED3 +92B23861E5EB238BB4EDCE09DAE1C65BAFC198CDD1B45D42CDF93E16BB82D35F +821E9E49067E966AFAB2AB52928F8DD6359984071FC37AA652FB834A09E5BD93 +3AFAE161140E74C6531E413E8FBBFC42BFE8A464B71EB1D8CAA93B33D7BCC3B0 +47C7EEFCD3E9FCF26FF9441DD9BDE68D77AD7251C06BBB9A2103049E8827CAF0 +F26BEF33F656A690235DEEC623CC519AFA82DE2AE16FB99F780FD7D8290DA40B +9B604AEF36B529FD184239E7D50561A07428D28E51B55546590A1AEAD4B7F2B1 +AB8C5B9022C1FA03E33F8F409B24911AB8BFCF6EF4A8E415263C789F89063E71 +C0910DC20347469380B7FC1EEB87D4CED7F4A361E58B61C91AFCABA35C03F978 +B9FB5257C31657EE48504C355CE893FE3C553274C641DBC4004F5D5B879CC5ED +D3F21F867F6DF054127067DE86189F0B59A1B90FDABCDFEE61423609D888EEFD +F4A1367129962110C651D9481CEDDB8C5C2576A59AED64E95F7ED042AEAE2F7E +81AC0C408E593DC30DCAC334EDE9EE27D932B98F040DDCD195D6155607DD2038 +970EB78221A94C52BD4F0EAC65F1FC10E5DAA93C17266F351669CAE56F42B68C +6D01E1EA03AE554D63CE76D800FDD9CFD89F80A241EAEFF7EDFA41794EA25CE7 +97BD5028464D2CD45B53834B4AEF8BF0B9E7C6ECDEACEC887E8790A47A93F668 +A9095E5FA1116A122C0E5B74E2226C654D3187C6CFD8807917820423DA3EC1DE +AA020EEEF2280C44A15209EE2F3FC1776875308CEAD38571E7BF889F287E4594 +971A83605E0B4169D4A23EE790515223DF8724054EDAD905F57918FC0BC64F96 +514B4BF7DC9BA79E763C22C977FB6146B10D26FEA1BAA7BAF21312F78D1625A7 +8E242D743471DB5821408AB786E4A7EA9D35E30E85533C617689F95758FB2C7C +392E759C299DCCE36689686DE0C4DCE32649493650BA194A6208C5EAB670B170 +3F2C70BF0EF0E3BE2FB0A79224FF4ECECD6BB3388C6D06867A0E5E3DB93C1B2F +464C23E44D3132E7D4086E3B59B1D13F49EB4772DEDF8EDC4F603217233FB7BE +C13C28648E9AA51D53F11FB896839F97AEDD8834BCA53CB0021AE91FD8E95E2E +F8A094093AF556B9639F508A401542B06821FF9DE1A745FE9AC5CACD5E8E1053 +911442FC15CA5333751ABFE2C617D38FA1DC332BFEF44AE569DC631C93EC54D6 +261583A695F5A392867A57F59B741EFCD2DCFECBC55D1EA5F2317601C9DFE9ED +D1EA466210FFA905A8F85BD58B98991BEA58DFD1CDED5C9B086D42CCE632DADA +147941917B879139E016B0DDEB8446BA017FC8EE5A354533D667B0835F5D027D +C2D580C16B80B3D05CC92C0465CAE077729F0A15B2DAFC89DCD349B3F81D0516 +C65526EB5C10E45A8A85D716EE35FB9AB201FD7C89ADE5AD925A174169DA20FB +61E96C73A143DF964C20589EF24A0FCFE6195317F2FA0D2249C0D8E649C3D9AD +FF13332EA2E4C9CD36D8443EC8F027B61CEF92C6A6B72DD4ACBACC16E429A9A3 +F5F29C1631360E32F8C1C93ACB22F810B86D2969A7480F486F62F8488BEEC74C +2C1AF13BB92BC578E8CD30BEA6BC8CB68ED730F54CED0167605FA76AD7B7E88C +7AE7688E598F91C471BD65A542E96D64B1EAF19FB4F1234308C48C2DC86E2193 +11ABDB4C6189C6F201627C693691A86DD07FF55C30FDB3F72381E09C6080FD7C +9182762E5001E30F52A216E0B71E4D2D4E2F3B20F95DF3A11FDB2D2B5B5FAA66 +C46226D5E0C77066349770514E5675550FAC9394FB27CD2C2F974F1FD58C04A3 +1EF53A8AB3B2202CCA1CEFA66228E1480A0709436C44BD3319C40CF888AE4692 +5DBBB52B15CF3A518F627F672135A24D5DB9B2EBEF04C860AECF231EBB5A3BF5 +6DCCD5E72FE4B6DD29E896691868A7DE4120AD06AC573F5608B8449B38E71CA0 +EB5CDA3F942482EA7973661170F81DC88D54DD5B92323F46F833DFA757107E9E +F62A47CC50FAA1B68ED535C3E0E1073532A05ED339C8D70B3B9864808ABACD23 +AA95E9FDA43D54C66A675FA074E0A5B8777D3C07850A09087F36852B5351F35D +8BC4DDFCA35CF29CD5E3DE118A741FAC4DED36847F2E2C6CFE08669301722D94 +376F540982958074E7F1383C409652F6C99DA39FE90B38221E75BC1ECB93ABF6 +B00F410A0C5651DB418566AB350FDA1789AFD88286AF3BCB42B98386F7BC144B +02DEB8940D20A6B3062F0C4244EABC50923390064F1D027A8BACC3DE45156E56 +4A942D1B87F1C4A76B0D4D6801AE792CCAE3009BF25368B31B6AD5476FBD3BFF +9759EF463EF5E78E10B7BF64005B2ABE0E8813950A08A1808587A98E0021D0DD +751AD515E8278F1A0759E85D8A084490BBB0F8206484AA36388B1013643D3198 +3509078847BDAE08E76FA5BF3E3A73C323CE093DCC148E3C02C2DE1E26C94D5A +40EC8308ECB02FF7DD04EC1005A2A0DC74D4E587F10A3EF349E828F69FD38962 +2F0C74D5DAB3ED6CC9F97008ACCE74C086A503948DEF1AAF58FC8BEC703CD360 +D32098A56AC776B1BD08442052A2A4EF6C8798F7CDC102AF1A2009657254762A +0793F79A39DCD6ADBAA5EC84A7ED6018BBE727E5D477893D84F157074B24C13E +8D4881C7DF8ADC13EBA0D89745EF93B7616EC5355600BB0D2B630AABA3CF2946 +AFFD0B2B724EF0F28393F2034B2E69DA5061426805353EB4D80E20739BC4C510 +6C45275B8261DCBA10DE1D104B12F46ACD230977EE7D7D1D35D2814139E38C4B +CA6937CCFA653349B1EF64A98457F7B4B5D8F2978F16ECCEF7054905863AA46E +DD524CB33459220C71E9EFA7845A3A760A507B3D3ABC525B35930B613710A13D +098832C58EBBC8B0CA6AD516E6385792C59220331D0922A1F6F838A8DE13C337 +900462F952EABBDC2EB1FBF94A66186C177501453CD3FE3582073DD86F04406B +41B6AEB440DA475E13240445D46726A6D45185D56BAB8807CEC8A8F7CE1AD149 +7CE2E1BB5DE4E5B9592241DD136479A65905FD0062C91DFF7349874BFEA5D9EA +2F610ADB9AE7757B2307A1BB9D6797D9F9C4844A59841C7C7682105E23A374BC +A91885E7410F56F60C29AB8B417E2D6092F8BB70A2DD5DEDD4BA1077D7CC62FD +EA43428C6F79C332342E15F75B08A1ED360B3511F823E75AD49BA7AE63B19238 +2AFE8FAC2715E2FDC895E95036D23127557837506A3B542B0E4651CE2B89C252 +31EE8ADC26E2C04E8E30A9CA12F066CE01953BE7867171FF6C7E834742C36C3B +58E74E4B482CB85FD4D24DB03D753F260A585D552CDC9E1941446F2F5B45FF24 +2DA4932B973139F328E7E92828B900BFD398B6F41DAA0D6861C66AA7F5E3299C +87A5925CE0E0F9E09AAE0792954A1F2C0AAA8288DEEFFE579E38A3CE8A943EB4 +55322A87C1634074EBEC25F724DC1BCC1BC10458CA6C4395659B0DB6B612C151 +557CC669D8DC37769E59A5AC6BF061C79FEE265DBB59520EB8FFEA273601D1E8 +2984B8AE31AE343F37D03E2BF97DC48AFE50BB6138C7B9F9B5E28672A37BD8F5 +8F8C98DC43DB22C6537028798198E2D3B0453ED72487267D653DD50F1BBBDA92 +833A987A95FC1F275B90B581B4BB62B6863A4CFAE37F715EDF3EA5A33679FEB6 +4847ABB4B3D170C275B9F1AC3156D731198DACE0B051674E85B758500AC9FBEE +ECC75EBBD85F8D62AAA328FB09C6526F853077AEF7EFBFC2B6A29D6D508B1E19 +EAFA4C67EEE44045B9F15B9762B3DDF5CE5C18B23A5C2F73A1F6DF7F8679AB78 +843AA41FD2A7DC02B45B729EB76C66A89F5F76E5C4A0C0563B1EC5E75D72EE35 +A7F1FC89216B60D82F6F2B8DBE85E4FF4D63712C689E696F60B52AB622C2A4F9 +37C380775EDB72638D3F81F61D8D74C76D813DDFFF35ABD9A502F2BC7FF65754 +2A8660A5A53E0CDC2E8A95B6E33CA153EB711DC796D313C8183D707D3F0E3EE8 +BA65E0FCE3F1C07F3D93F77056688B5496AE35A6BA0B59619DE78640A8C3F7D9 +7DC5E94894E1E63A7D80600B945B1CCA50F1B85F57673C6CE09EFC4E229D4635 +48AB466118D273BAF7C1B52A067A88C00EBFA7FCB378F1575BC0145F294E6F7F +8007602C6560476FA20BDB91831B22404DB1C4C167594B1216C25226D262FEC6 +F5D0DBAC4B8D743C669CFF2068CB9BCD2DAE8CD6EE1B33BBF7514C4E5EA79D46 +11AAEEA72B791C22A1822E686F3858E95A37D9CEF904EDEC7EBFB0E60995CF64 +57CF0EAAE6D4925126349DE06E101868BED82BB51E911852E6780772912570AF +CD5690C6DA70110DD9903BAA3BAD581D206571D1E57712C75D112254C7A3DC8C +892B66CA346EE682E7D910343C1CCD07465D9E49489839BEDA6174FB2E0DB935 +2D2CBA6B67ADDA1BAA6A51690A10C819692C9BD35BDC689F9DEFEA78BFE79C47 +C9CCFB3D04D20F1D3E0B73498FC0BDC50A3BA6DDB3FAB9458803BB26487C1397 +511717CA3493A7590E27B34C2E2E1BE2ED884CAFD5F7C185CD6EDA68951673D6 +384E6CD12944F86D178E73C8D78D9048A5B1E2FCB489E723F8178F842B362BC9 +F3E4D511B369670908B2C8087AA29F8B592B8AF7018311C0F12A8D45A3625096 +D4C88B19890571C60821F38310685F8DEE7A7A5D209265986F92AAF11143DC85 +F435BC210621851001B6A402E3A07D0F204A3B0D75DA3CD7FF6637D1F434B962 +F404DB3C6BC318EF517AA0836A975C5196976250B5D6B21DF528FB47181F5279 +E1EEBBA0F344D7EABE71904B5C1DB0FD07694C469085D50DF4990E294334E785 +5E5BCC4ADCD38685147CE535B23F3027AAC01A0D65AC751D9CA289B4A8906A64 +165427976FE6FD699442196B0C247C960C9086AB2E440885D11BDD314A3FFD40 +9C5FFF29B40110381ED22F58CA53CB2407E5B993930DE5E32CBC4CDB2FC46604 +AE51C1375F9A41D7B5CB2B2FA52F65CB925BDA5CE18BDCFC46933071789E3F20 +C08FC64F367F409C38279E5F88EDFBEE38105A2469CF009344F9E846419519E5 +8A5EC45DE2F6837C65A883C524305D18769A563691F5887D920CAA8EF0D9D56F +F208395E7390570C6DBBE5AF515BF64478059F922068F0E473C020E54CEBF22D +495D5E843839912C58FDE0A61D4E390E4502E9973562BCA49B3A17BCAC0352AE +5C27DA44578C4FA5821B9A3B03FFAA97E15E83CE09AE155BE919EA42301E6195 +F59C0A9131C4089E97223BF614A37B5C7603190DD465105AD86DFEB74E65479B +BBCEC9EF93508604339454483E244A348A78F29EC4A60554E77136749A4A74BE +F4DE4955FFDB6AEEBE19705EA184605994D2A5284C05A479A33D56FF398DDF3C +5B474F53743255BD5F42DADADD7F71BAC446A10084DE15876FF74765654405C3 +470144E2902EF213A594FB721D0B0FD823DAC347777B7AA58688EA834514299F +75A3C80BCF2FD24D19650B7D2C21ED664D290EFB9122C125F5DE1B2C4A817905 +06C27E7188C9BF3965A6A25A5A9C0353A53D05BF64FD4C226837AF6D9599BE70 +04142CC78E03626BF10D68CE17C2D081B3A4248FF392E985A6946D89BE97AF1B +C6BE7E9820405D06F5FFC06D6304028E5697E8AE15225A8FE19CDF3DFA2079A8 +BA537833DDBEB6106BAADD45E9ABD1C7B5157C5CB26F971B0E7EE8069E3C8FD4 +A7A1833B19CB43DE4E7497D505AE0B7BFEBB3E489315842DCB3D6CB7E6E43AEE +E215D011B2854A3CEE5AADB34A9CB5AE595F2F02CC5CAEA9AB28161FD93F3FD5 +87D17D564939ED05A5055029D1AAAD21726C1AEFA777EFEDF8D687D9F2FCA607 +CE3B585E044A8CFFBD6E93849467378BAE5AB8C02615AA974546C3D7AD70AF26 +55C62A9C4EFE256B5303BBD0B9E13544F408F8AFD7265425BE1421FE6B1E41E3 +B6D9C509B4EB820507F2B41A92F93A584AF62987450095DCE78F9862284F0C53 +F46B02549CA9EA57C9C4CA8A0BC1EBE947AFE73B8F7958853BEAF81D78E23C25 +3BEB6EC3823E1DC7524E38CD63577795EC3DDE03027369957906C85A22F9D805 +2EBD287C2CAEE0D3985264AE614380E421EF23453A68F6E616B3191B506113AD +F6D569E4A20D3B23961DFB3ECE07B382AFD2CCB1F2BC4F3C1974C06C8652682B +EE7ED59D4B2F9EB8492FF978747AB12E123932B34C0F9F3335587C7B8B8E13A4 +0E1EE5212AB1671DD7A2AB5AF2373B60B3353C22FF8128198A5245F9C701B6E9 +80E92AB14A77AE7BA217D33ABDED222EEE9B5888AC6653459EA8738703FF7423 +8391380AF83E56A3BDFD3AD43F2F00E87DB9153D99A3B358A38313A7E6D6B43B +07804A9929FE01EE112C0B1960B286C97E7F563D552250DEB189F3467ADE8491 +9C25A473EC8D590BC6EE6E7F340991D4317F1F0E29737ED93D18BA4DEF6A6C0C +F9A71EFDDBE489F1A5E27699F8C120DDBC96C4F3F3F2F90AC5014F78AF6517F3 +3C8E2B548C7BD7CA91ABC4E71930761D5C609CCB41B7CE490389C7CA6B1A7B34 +7130074DADA12806475998153EC604A5FD7A04AF35D00DA9564123A384E39126 +B228353532842504229FD646A0FA1C24AC462A75A119743C17071D0F3C370D04 +2FBBB8155EC868014066C6EFEA257752846195C4158AF9DF215C8B20AE276F50 +67AB636CF7A49D34B26435233460DFF6F728E91F1FC4224A7AB1C991C94D3224 +E75B5764642BF2972C9F72A347861CA23B78BD37E0902CE7E3776E347AB20388 +2F97386F31D1D41B43B5A1F52C11C908155E7C3AD9C818BD5F8AB022FE979EFC +695DB2B79BE6264EF7DEBC936048FF17E81408CC701C0B1C742B11F6D9442E4D +2BE899B3D354D07CDD71FB19ED3972363ACB918BF229ECDF8C5D6F9ABD5263A1 +81A0BB786D0A859C53BBEEF61872E24BB550FDEF14A66FB0C09836F4677DD4FF +26FB82FFD120F2F8947B51B0A38F47E65A8019C88A1C343E144F7CCDD1E9C541 +640452BFC800ACD27D181077E8F59E12CFFD7C67DF26CD9DE94B87A16BCA14D5 +9EC57D1963A82E2E1667BA64E7C10015A22C4C6FA06B9D76A9CF591FBD2003C9 +116043C62347D68F99214E90E01E80D140B1D3E8AF7526C17AC8A2056B63E192 +031101D44760E5679C4FFA2FF739CBA5A80AE9F95DDD80973F32D0411F9A43A3 +887CB08E116C823DF5921C157390E1568C76B82DD9A7C69FC76501712D2F24DE +7478B1FF5F7C648754860E394340F17D90865DF0D75A1A7770C177ED1052E10A +2A60B370A9DE3A6876B9E102A6706E464A91DFF642F498162C9BDB4F0827AA54 +0D1F36557B76DC6FAB62E52078C40F608CBE6C447CCD32A29C9751C53ED48951 +3E2466B2BC8C28CF21A439CF54B50E6DEA50761A23333E8E96233215BE86B870 +461D46D227790B1E65198B0C32C44F9861B94EDC731836D157B0B3419AB6AA9F +41BEF201D3637F1F6C3F7DCB71BD670EC111B24C411D0AE3310DFC4C9279BCB8 +F5D936F0211B5FC10B7957259D2C3874724EDF11A646D951E79CD958B60EB6E8 +071CD06657B15B5D0BF492312911076FA5E74F7DD94729A1A17393FE5891280B +D0BA2F31DFA6B3E01C0C0F662D02EF94590EDA84EDEFE9F28F5E7DE75B79D8F9 +4178ACBA78D1F147820EF76DB4850910C3249DCE6EA13C1161DA6EC36BC129FF +E9C97EFAF481A1605F788CDD66DAC83A95BF09FA47850FA0D7A844AB7014D9C4 +95A1C6AF0D3AA8A0DBE08FAF4E4FF7D6039F6115845EF41EEBC31D1D6B2CA95C +FB29A10E77935F79EC66A5D14FA898CF1347CA2502496BFC44DC1057AD6B00D9 +E22C8A982C04B48494C7B1C630FFB2FD1701F65B0558C5A2BE9C5A017B3788A4 +B9A22CA8E87600A54D570A6391D814FB95FCCA3631B123AD03A9EE0ECF9A8B6B +A5C050A34767371D99220A3395B8EEE63067AD64C93F4323A1C33BAAB8ED8B85 +FB1F71CCB36B381463157A5F19F0CD76CA14C77839BE94271264F5B454044D8F +4458AF7DC8A85ACD3EC014E424D102D2FED460A7AC342E23B960846056031213 +25CAE1315149CC2069E8963AB540265026F4B11BABD9C4711875217188D5B5DB +6E9CC8E436A56D53B37809295276DC0A21F0CF2D50CD5FEA1AD417F1098A8999 +F4163AEA50ACBF468E0863C901DC518029692C076C5BBD7954DEE6504EBB39CE +8F680420CEE573D8338DB67A5BB2B5361734D36D029812BF3AF22AE71CC4BE7C +8C0E047CA409DA46AA3EF4E6B345A3E1A53A9892A1943BB32ECFD340439C1D52 +14BC35A77EE696CF792BC25DE49B75F3B04F09704B64C8B1EA9FF39E6E8D9B4C +A39ADDE4B5B49E3FBE3A7F0AC51988057E46379173D5D3AB9E786EDF308B5F0A +5B2DA6D030F881DFA0D479D8D6D97D66F3D25ED946128B38DECFD701E607221D +EE1069CADB078D3434253AA89970029EADFE217FF24C825718F68575379A653A +0024F720B6355DB4C7EA81077DC68DD6DC61F85C2AE59E28FE04234E7887A9DA +E4E9E36FB0012C49B48F057C1E98380639744B5EF0B135596964BB2F020ADF92 +812966653E399B2EF9D5044A6F8E2C788EAEF6108AEB70166157E322EB549002 +12A5FC7F4DB295C0DC64BE331D154D07E49DB9090DA8194B941117326D763EA0 +4CCC8B7F97881190EA60F9D0B33BD2DFF04BA5AC81143068D66DBA61A08D3930 +439A0A87540C2CD06F56A3D732CA041DCA2F74DFB4CD05FBD76455E389095AEB +4CE5ED7BE40BFE6003C9D6534F19D150FF8AF8DA936D0739EBE9128BCAD016BE +70EAC25338227E83963F81AD1466C3618B8044AFA276879B9E621F00B96B0B67 +2E8C2D95E222EA6F4586EC05BE9768957AC121965B9BBF9481EA4C513BC092F9 +A4D44F4F949E5537C1F59F74B48AFAFA371F62823286B5E005EADCC936729DAC +4817750D66C15D3508DAEF758FDFB5C84245DF6C040EC0A91B207A1377DEEC10 +5387A82D27199E8826C00B44A5C2A4DC784B1A8288769428FD632D7AF1C3508C +C42FC3ECAE21E060637D961D448568FBF539B8E85B7AD60F1A573995C7857AD9 +9755535F9D04B4ADD5DF7EAAAA0819A5F21F111D9D9821089D071907307025F9 +B6E4C4DCB3E7F6F06492BA6EEF4F32B38393CB787BA9E00D8F60A8B4CC91B228 +0FADC305AC966F9C2547DAE80B4F60959658AEFBFF9F63B95F106EA226978D84 +C7863BEA1C71B13A5FDAC35FE9D7037758574081CB58AF6DDE2C80E90ABC48E6 +DC0716B13DD52ECE01079EE01A114E444C1F09AA1788356432E51806D996A99A +BF169DFBE02DF5728D88FEC214B3B272CB1A7C9B9168F302B505C54584A0B428 +17CBA6046E0319FB5041FB9319E75E7F805232DBE8312E63C639F35CD679638A +60E1B0BAE1F1F9D359A2786AB8838694270C368D7BC92E9D65D119BF317B8909 +7BFD7AF55533BCA289460558977CFC99E3E89D0C4A3B50C17DE43E2A7D7210E0 +96F0B6BA7A4C654A8C59DF2DD5881BE5AFACB64489FEC5B129ABFB10FA17B3A7 +426E2445778B53336CE63969C5F3567DC66DEF49A7D1A6C19C84EDE1C2FDDA4D +4FA5854F4F15C7FC1AC8175587087D068E2150D05141970845D173E5312CAC9F +8B9CAA28EC46FBDDF610B9371BAC2F577ACFF2F7CE3634CB13941BD437390F84 +ED894384E3130E663F5C0EE25C2C8096B7BF90F7783FE1B00F6EB78D92DC41D6 +BADF384149742D6B9CCF1BA890446599FD957258E9E3041201B958C2E5BA6842 +32176AB1367690BF1AE79B6075315D538C7D6634117A20DD82FD8067F5237B5C +C93F4989D054A45FEA482AA961738EF0B9CA8D6711DA94A512BA132038866CF6 +E59012950C870598644FC143CB205494BB65EB649FDD6157FACC5814014C5B46 +1153221D8F2D3B3FAFEB01DFF0BEAA0C00353668793379A88FD7C9827277860C +516724161906BE5B164E +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMMI10 +%!PS-AdobeFont-1.0: CMMI10 003.002 +%%Title: CMMI10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMMI10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMMI10 known{/CMMI10 findfont dup/UniqueID known{dup +/UniqueID get 5087385 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMMI10 def +/FontBBox {-32 -250 1048 750 }readonly def +/PaintType 0 def +/FontInfo 10 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMMI10.) readonly def +/FullName (CMMI10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +/ascent 750 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 58 /period put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3C05EF98F858322DCEA45E0874C5 +45D25FE192539D9CDA4BAA46D9C431465E6ABF4E4271F89EDED7F37BE4B31FB4 +7934F62D1F46E8671F6290D6FFF601D4937BF71C22D60FB800A15796421E3AA7 +72C500501D8B10C0093F6467C553250F7C27B2C3D893772614A846374A85BC4E +BEC0B0A89C4C161C3956ECE25274B962C854E535F418279FE26D8F83E38C5C89 +974E9A224B3CBEF90A9277AF10E0C7CAC8DC11C41DC18B814A7682E5F0248674 +11453BC81C443407AF41AF8A831A85A700CFC65E2181BCBFBC7878DFBD546AC2 +1EF6CC527FEEA044B7C8E686367E920F575AD585387358FFF41BCB212922791C +7B0BD3BED7C6D8F3D9D52D0F181CD4D164E75851D04F64309D810A0DEA1E257B +0D7633CEFE93FEF9D2FB7901453A46F8ACA007358D904E0189AE7B7221545085 +EDD3D5A3CEACD6023861F13C8A345A68115425E94B8FDCCEC1255454EC3E7A37 +404F6C00A3BCCF851B929D4FE66B6D8FD1C0C80130541609759F18EF07BCD133 +78CBC4A0D8A796A2574260C6A952CA73D9EB5C28356F5C90D1A59DC788762BFF +A1B6F0614958D09751C0DB2309406F6B4489125B31C5DD365B2F140CB5E42CEE +88BE11C7176E6BBC90D24E40956279FBDC9D89A6C4A1F4D27EC57F496602FBC4 +C854143903A53EF1188D117C49F8B6F2498B4698C25F2C5E8D8BD833206F88FC +BD5B495EB993A26B6055BD0BBA2B3DDFD462C39E022D4A1760C845EA448DED88 +98C44BAAB85CD0423E00154C4741240EB3A2290B67144A4C80C88BE3D59AD760 +E553DAC4E8BA00B06398B1D0DFE96FB89449D4AE18CE8B27AFE75D2B84EFDB44 +143FD887F8FB364D000651912E40B0BAEDDA5AD57A3BC0E411E1AD908C77DCE3 +981985F98E258A9BB3A1B845FC4A21BCC54559E51BC0E6C22F0C38540F8C9490 +88A0E23EA504FA79F8960CC9D58611C519D3ACDC63FB2FBCAE6674357D7F2285 +4BCC9F54D3DA421D744D3A341DA3B494BB526C0734E1A8FC71501745399F7683 +FD17EC3044419A88C3979FD2ABA5B0130907B145A8462AAF0A9B511D2C8A7C7F +347FF6AC057E6512902BFD2918E2CD31DE615F5D643764E900B60287670AE18F +FDE15545D8BC69591A8CBBB275AFFC9B14BD68DF0AAB32268FB84844D4DBC7BB +C591C1AC5102C50A9C7BAAA848DA88B0519F0F5F0813BF055CF0E3C86F633A04 +B779D2E8E656DB1E09A66A85FE21CA8BA5523F472A229E83F2C4E91ABA46C733 +F3C7B5775B06C97782BC225C46385BEBDC61572458EFC5CF4190AB7A9C1C92DA +29F84BAACF552089195966E3AD9E57CC914D20B6962BE80429A16D4DF1ECAA66 +36C4343FADF0B2B48F12E2EB8443C4AA29D00949255F3968617F98B8ABD4CC12 +048B838EE243A21AC808BD295195E4AE9027005F52258BFCA915C8D9AED9A2C0 +80814F79CF943FBE3594C530A22A92E11BE80FCEC1684C4F56712D5846B0749C +9B54A979B315222F209DEE72583B03093EC38F7C5B9F9BCB21DBE8EDDAE9BE8B +75ACE6B12A31083AC8348EC84D1D29D2297A266284B7E9734E207DAF59A25F4E +4AA38509E993C5394FED76E6A2F25462685C4C86C6E8CFC9863338EC1428BDFC +74616BB1BC8948B0ED4C87C15B4405F3A7796F9DB3798FFFE8BD0A94E834817B +D5E9812E308D0CC920470A6F2CD088FCB80462BF7CB3F039A7DF3DAF5B2B5355 +E083A385CD2EAF0FC181E40E96DD7E9AB9EF5C7E6866A13B8A54718E950FE097 +EF0951A357114F18CE9933D28B3A77AA71E3CE884661F13284BCED5D5FD1A86D +543E588FF473DC2CF9A4DC312500135F29C2D0174B32018C8DBD40EF9A232883 +710A1F2AB2CD11312300ACDF789A9B7B93D2035D81D1C84984D92D78A53A00C6 +EDA94B24BBAC1AD17774A4E07E6F74ABD90415965616AD540C8ECD8C3A44EE4F +7F4F6BB6238C5062D63FA59B7BF08BE93FAEA70A2AB08FBEAAF7DBF56B95FD93 +03CA406543BA6C9527D0DF01F5108D31A51778A5EB1C93F27B72B46146A353A2 +01CACBC829603B9989A87CF64528682CCBA0562A8165B185C58A5C6BB72F5E89 +500ACCAAB8ECEFBB2640E99EAEEC4EA979AA793D013D61D8ACF8784FF8D9398F +F6A252A709324FB39509F0B3A4E725E82F53543383C6765BE556CC897C758208 +AA3AD37B0406E4A79F8F0A6C1983FC73E71CD858C0DB66ED66D5D992978614EE +1EA91EBE191E082EBA1FC040AF19A2202575C2EBEB8058833E3520FA03D2F915 +85C1ED337E457B9FEEB0C6EF2735EFDA6E0D05FA641BCF698AC6B97751E8306C +4DF00A39B8581FF53DB8F8525FDB196D85950906CCB59B8EF171349AA3B567B1 +6A00819947A995FB383C3C1709C9A2C113B2E40BB832B7D4A0FBA0B16A2C455F +55809CC425C403E9668DC66BE45B71A81C332FD4DB279D22A2959962304A8F18 +085893DAC61317D24A8F198FDAB95F3B86F0AFD35047B868A9A17037A2829A02 +BAB042F75F349E197A7EED41984C2859754CAFD0251439921C248B463B516951 +2E1322C80D73F9CBCAA63A585450275AC2492E4D3FB78E800F788254DB5E610D +CF788DF5C70FF99892BCDF16133E34B24B77C8F097F546B87C603DDB8998B66E +BACB68BA27462AF54AA405682EC96D701F0D474DECD5F95CA2102DF639EB169E +D518162C2BAE45FF698B6DE15FC6E7DE48C336C40A670FD26952A6BAB09115E1 +991F0073419F2CC2A1C08BE91096936AA0C37E4ED3CCCEE235476074B8FF1125 +6BDE3701F85532D8BB64CCC927CC335281C95EA689706F0AC717DC2CF680C754 +E5EFD7FA4BB8880B2B727A964C876D4A223069D4E6001771F0E23EAD2A4BBC80 +E76675297B2EF05F52BF4E71B3EE2BE3048CF088C79540113C66AE98B2FD3CB1 +B0741A215FD070882C52765009D7D711DAA2508F19AE7DDA15229A856AC49BC3 +4DDF40814FF96500E4B9B02D412E94623C5FDCC76C0FB8E42DF56A904FE49D65 +1DA7C53901B2EA71AB658A464D3ABDE27D9DB8D9E0B48F64E61A2495AD5D8DAB +B5E72424AD017DF37964AF911BD7FA21A5EB4775DC8E95EF0C0EB856B00D89D7 +8172A1DE8530767D317B8256103E53CFB877E10686A04F5A08F8DC58D843DEBA +FD5F40597588663D103689F6EB3EB14D06E18C8078F2538B43E712DF491FC5C6 +AF639256C8C6134B64D560D8476DEA6329D995E46CC4BC78841C59E73648B47E +BFA7DE0846422F738454AE77E822A083405289247BD7C478BE4974F742CD6051 +E99FBB1D1B3FBABFEE855174734EE45E87D0AADF32B1283B911162A9955847FD +38944D70584FAA6B1A7191C5C134B73F98EB632B69E2F0C0F94156787C34C8A3 +7622A029D58F9626B74F8A8A1F3803E0BC20E0EADEB1E99B70F1BD9F980FB751 +2A842843DE42EB142A84D5D3138629AE9EAF6F3479C423E8829C8816FA6EFA27 +DCE5580E65AA9854B1C64163DC318420CD993C15BFD76A8BA1182860A6B03D6D +22B8CF43CFE6C8AB27C64842E239CAE707D3086BADDE1D7C94E3BC96319470D6 +8D26915C575CFDD03271D6BB9DE86A0EB6EEA6E768B224A626C62A9AB48A6EDB +44F70BB5AF991CDF9736D65933E81CC57A78F623F33EC9AF535F2F25FA4EEC90 +D50DB7E87F31E971A75A33A301CA6013EEC5A4E179D695B33DADF2C98364434A +42926776000B610E17524162253F6FA638D6581C18F99EA0BD1D2E24D2424ADF +C05010D08192485153DD03930C7BF45237593E484F9851E6D464FA10FECA5D9E +0C8CCC97DE029030900CDBB491C5CF226DBF903CFE7735D939C3FDF3A20B70CE +66579B28B99313FEE914E295388C7BC8E055A2E54EA3A8206D3C8F4F7C0BA5E6 +E519419FD8CE215F7B8E9BEC604A9E3FE272A0328A24E31997C8A91E0946BCF1 +6943A97CBED2AB9FC636B49828BBB8B89E0BBC2653796431224895ABA5DAC41E +1854BD9764E86147FD7624F736F40DE3B7582EDDFD15C2BDE3F22B5A54D7DF10 +B87A1301CE85CFC061689A890A321412A13314AE96DCD3EDA75035FDD8F4AB9B +897A2C68263A68457032C469987970648BA2D88B1C5375DFEAA35A917B8A952E +EE670427942AEDB3CB599C5746180E392837D371E15D860620ABDB6AA7772C40 +A5E346661673ACA530BE3D8E3FFB895E5DA3DC23B1B43C080C77F7E47847F0F3 +F3AA5CA9E4BF75FC5EBD18D19F21A7DAA3B11CABC6E4070A15F7DBC8B05EB6AA +A02EF1B078EB66D61D6AFE41DA9B36FE7EC9EF94D1EA26282A9871E2CACB3126 +2AD49C2D9B50A6E47D8F2CCAD50992D1B430979A45FD9E76182A19964BB2A1F6 +51779A2B258DC1DF4C2F3074621286831F3848AC152DDD2BA561E6586ADA88D3 +598A2CE2CD048F027CE0008B828BD915887D7785341E8305DF2346ADB76BE99F +87B02173BDC334E9221C8DF54114A6B24C1C5340299512FA6C8C51AB4C8778CE +178CEF531C6D1B5FF0A1BE8EFF767F959BD4C345C52699A29A17B2A230842BF6 +4B011217D6D24EDAC3F6D53482786F1CA33169B90ECD499407D37CE9B70DDF78 +7B7547B32952535BA9ACD1E244447AE3FCED3AF28717083CF9590A09780984D6 +AF0743C82AE4FB3E2BB2856A4153A3967A023FFC35382D6C22D84A924900B6A6 +3DDD400E6D2418DA6C27F2FA34C075C902B89EBAE658B3C9A18EEE449DA5A379 +337DE95CB7AB3F0970CF1A5D8FAD8090E495570FDFB2FBBA79244780D8035547 +C5A55BB21A2270F724BF5D442CDC5BB9F09BE0CAE59B1C2270F0BDACE698F2C5 +DE8F66BFB9634904B161F5BA2B1950048300D69BABD312D58D89C4ED527AF7BA +7DA2478EDC2CDEE3473DD8A8ED9D891CD1FC21F23013228BB3281B71FCE959BD +6F8E9059D682A7FCC5265A0620992D4FA8D78377EB34CE3ECA070EE3707239BC +98907DB0120CE42ABA32CF97127E28382BDDFD685674279F588D4F951216C355 +821361790F64C2CC720DE97E8ECB57326C43EE47367628E05769E106868B54F4 +C33C9951908DF6FC4F5ED2C7787BD8FA591BBB3E9C6C1DA94CC5E38D9B20C886 +7D237572FF46DD896A4D6163408EA6CEFAC398EE041EAE29D577E75326CA17A6 +B072D47A7B13EC441CE6DAA042ECD02134CBFA6809A435050413817193DAEB16 +A5882C8AEA44BCF36E74E9ECCDFE7E19FF5A5DD7A94E5AB4F8702C3DA7F42325 +23C808670A0490F5B373DADE40814FF9650241D3D69C91FBC5ECE728F827D9BF +C928602E05477903449E079164CA39859C4BCA60C579F490AA455F82B5050BB3 +969AFB478E0D4A257B3356EA3CD62051FCE6C6B1929CFF85BFDF166BEF658E10 +3A55E007F38EBBB248B3F0B8ED1925106B499B762E45113AE1AC9DE09644C84B +9C08034B297314EE69BC32DB6E7D7FB9913CE5AC17E7335979E9DCCE2BAB3725 +1976155551F9706A576FE0E3ADCCF72C87683291528ECB749CB0ED291966E239 +B5E3630676BD409E08F85BC1AEC9A2D4135376284A96EA24431243BD6FE8B966 +95F11A4BB53F392E0AEFEA623064FF8A7002367B0A515635CB2D2DDFB9B4A8D7 +FE721754E81BBA548848A235B91AD4E4F7DB19CCE2F61D277FC00AB956EB93BE +44AB4970CA56BF59506C94ED160FB1E25D3DF2988A532BDB787BFB8539D22986 +FDC378AC31444E63C4727FEE121A43751043849E6DCAC5B59D0FC703AAFBBFD4 +E8B7C268F21615AD02CE9DABEFA27B5FE6A6441B619539CAB1F810F1263447AA +633F5DAF483752EF1A0421740E3A811D2D2898CBF53E7F686C9223FD7235F02D +6F90D2D48CC20AB87778DE3C6FB335E0F0EC20B5DC5B65223FE117526DE2C72F +FE839DF93CB2A7D66CD900CB325F891E311BEC932F703FB4FEFA29DB8B9C88DD +375EC71B3D58C7BC59ADA91971A3BDA1ADEA629CE6CC92BD542CDDFAA7706FB2 +6CDDE2DF07E56D6741916AE8E8744339816F3E6C38062747AA9FDA2A2678A6B7 +EFEA870AA3A4D71B25EE3013EAB1DBA34401B867C7A41AE51E0421D41D3BB83C +E120C8FEABA6E5DEC53A689C21426D4BBCB68CB37568761C360E6D4E3596FB7D +F4DEC7918E58C0293D12D6DDA7E9DCDAAD7C939F55CD1BC4A228B31E9A904156 +DA6B40B08E6ACE674618B768DD681C772A3E55FE096CF949CF3B0460ABDCD891 +D17B37B355B29AB5137899C036F31DA026244FA25FB798FBE5105BDA29F46538 +D3D3AC1001A7BCECE64DE94FFE6C354166A0F97256137BDFA07F6E22A3D1D2F4 +9588DBAE95E895BC5E64DDCBBAA8D0A22C229B42CB717FC711E7E9DF793DF80B +9F14754585A3C7E17F37B32924B9F9870DA8635E3E18BD1DCD81EDF01834D9C6 +B33F23C956C2FCBFA47D84422F583459D827D1E120B97694D12F1F54D02379C0 +D288F7104F3FFCF4F76E3494F4ACBD1BE3A15543CC680924C78A473F8E311ADF +8FE00A04C6C393DE61AD3EDA5BC031E2353076A2489391B52632387CA28A7B93 +FBB065A6EF3658AE80B1ADA47E9B2539E73A71FA75645F85ED8ECC257FB4CF26 +B6C912DE9D0F9899E70BECCB934AD32CF49A093371A9F73DE6255EBC39DE1E7F +00D0CBDABD4D0383977E694890E71FBE5C376BE5F3A80C28987417504F515C50 +909F3D31178BB9B1D085BE514F71B910A9085BD6122DDC72A150BFE266920E49 +5661BCB4BAB51D6DEFE32B616963DBD989FCDD1637B294CE4E288655FBEFA1BF +7F25BBF8CF17C2D5FD161A7C2CC9CC7490D9BF15A1D35B3BFA43ADE256E88BDA +BD490D92907C57BAC408A575EC84D6AEE070148C7C9A91C03B09FDBD792E8FF0 +C0B886AAD2EDD86541E5E579359D40E3AC312ACD3D8FD49F71BD533DDF8859B1 +BAF17F1884E331DD07CEEF93B71D492AEBAADF7A263450A7A72210CE630A0D37 +BF024BDC09ACC882816B8C22C62AE38A3A8D0F6EBC2B1B2C0B8161A8B076DD5D +4B779C0788546BB4CF57332230D237856B00D79C28A7C01D11F44B7304F69075 +94B97A745DA43D1BE561372CE611C345A843834E46AD9DDB16CABCD3FA33D6F1 +F6B5C0497F5EE5400B305CDC16A7EC286AA4D45D0EEBB9DA06AC9C5294D68EC9 +E4DC3CA2B92CE8FC0526184A86EDC7AB34D67E60AC12D9CA8FD300235EC968BA +92C6FBDA47572BC5600F25249F60AD287CBDAE980E747FCBE7EE5CD323E733F0 +63553B494D3DDEB9CC1480B5C3BB79A28E419AA65B18CB297AB383419E890E2A +CE6F98C9900CCB4675280A10CF060B8D220DDA1BE55DFA65715EABCC1AFAA271 +B1F8732341613E17B231231A0D24D4D7FC198AE04D89A99C4536217769C6FBD9 +5EE24A6302F97438F7C0E311C878F674B4477A5ADA3952CDE4055AC408B8174E +86F8FB797646DFFFE0ECA25D1BAB9A9F71F3926D3D85AA63E7A8C931D71E79E0 +AF1EAC26FADE468F4FF7F3861D14C10E3BE1F9EAFD6D3A544E8108D5DAB5B180 +3950C74818BC8AF4758A108F462EF1826647A49667F5E482038C54716856D9BC +35F29922846D2148F92F943E951D7438C73D6A60459A8003174036C64E1629CD +155D47FD04B03C023AD67CD5A70C98AB556EEAB8C48169706E5B352F6505D580 +AC945171BFE62E81F8F500438AC3B64D857BA5BC54C2C4BBB237F8FA51296255 +E66A92A61FE13FDE781D393557EB72CEBAD86511035F775FAC39A0479CCD400F +226709118F887F47CC2ECC8F79816D4A945B2845F50AFD62D8C9A9BBF4739496 +9E644BC9F7B04803B7EE75A09EAE94365F6F374B4FCEB0B506C76297564B9B6B +8B812BC3A33929AA94692572B010E6210AEAA312BDFC88BF302244AB9D587A9B +919823FD01DE12438D960944D1977800FEB49E638C32E5B188B1CA033E0C37EE +A142F746367888AA119535F0CCAF7EAA461B790EB089D2D6962E28A398439BB7 +9C9943654D7A2D765B46BC0DD1F915327F369162E1BA1BA83110B93F442905E0 +523BFF5E279508A98568CD5CFD18FABBE9D17265A9081E7BF64155A2CE3C0DF7 +88D00671AD65654709589BAD7EA65BBA811387ABA5CA0BC3F66D3D48597A0D1D +2C268375DF47CCF62166262AE4840AB03BF49BE67A05EF66328EC729F03CA5FF +AD3937FC053E223303565DC771ACF32E63DFB96D5030E787961D72D02C195C66 +B48E9AF0309DC169CFE8D16E2818DA94693A18F027DEA0D916672480464F7E22 +CA6E431FE38D3FC019BDD229E064B72C545C61C6EA55984565CCA88ACB01F744 +3B4593CC8944C70F30925FB48A16342CC26D444F54CA15E5A624C4A2DAA2AEF8 +404145BBA339F2A2D6FC2F3ECE54387761CA1213C8D56FF96E37C6147CA44B84 +262EA87E7CC10D931E6B5B80D7F09813498497AA84ACB4AC69BC6C8481ED2953 +084F560D7B1CF90555E69BD2AF7C5D944E8E3506165014652462BE1BC81CA341 +E1B0725159D36DA0FFF3577D1DEBC5D91AE683FB0384 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMMI12 +%!PS-AdobeFont-1.0: CMMI12 003.002 +%%Title: CMMI12 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMMI12. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMMI12 known{/CMMI12 findfont dup/UniqueID known{dup +/UniqueID get 5087386 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMMI12 def +/FontBBox {-31 -250 1026 750 }readonly def +/PaintType 0 def +/FontInfo 10 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMMI12.) readonly def +/FullName (CMMI12) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +/ascent 750 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 58 /period put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3C05EF98F858322DCEA45E0874C5 +45D25FE192539D9CDA4BAA46D9C431465E6ABF4E4271F89EDED7F37BE4B31FB4 +7934F62D1F46E8671F6290D6FFF601D4937BF71C22D60FB800A15796421E3AA7 +72C500501D8B10C0093F6467C553250F7C27B2C3D893772614A846374A85BC4E +BEC0B0A89C4C161C3956ECE25274B962C854E535F418279FE26D8F83E38C5C89 +974E9A224B3CBEF90A9277AF10E0C7CAC8DC11C41DC18B814A7682E5F0248674 +11453BC81C443407AF41AF8A831A85A700CFC65E2181BCBFBFE3573BF464E2BE +882A715BE109B49A15C32F62CF5C10257E5EA12C24F72137EB63297C28625AC3 +2274038691582D6D75FE8F895A0813982793297E49CC9B54053BA2ABD429156A +7FFCD7B19DAA44E2107720921B74185AE507AC33141819511A6AC20BC20FB541 +0B5AAEC5743673E9E39C1976D5E6EB4E4D8E2B31BEA302E5AF1B2FBCEC6D9E69 +987970648B9276232093695D55A806D87648B1749CB537E78BB08AA83A5001F7 +609CD1D17FFA1043EB3807AF0B596AF38C91A9675E2A53196FEF45849C95F7DC +182A5EC0EC4435A8A4B6E1CDBF9A5AF457564EA72BF85228EB6FD244F2511F5A +CA9B71A65D53CC06EF5F7EC3A85106139A4D312378BC22183C09A229577B793A +1B7422611C03E84BF809F46C62CE52D3AE29CE01C32B202ACDAA5B72733EB0AE +C31D7EF7BA88D2D14F85313F7A8B9B7A5B124B03AB923744D336C969E5CE304D +3AD977A46664479EDEFB69F113024E761C05FA48A54072DF9E12C2F352ACB3E6 +D04F6EEFFDE209E7FA3DA22E5B1D1409461F4286B7F4F8251B44E5CB7805762E +E129FF4A06A7458F3191926B1CAF70E32C6571AD2DC07C34FF62840896F4D200 +761B1A7FA356526D1E3AB4C542AF13623BAEB9F61B1BEEF79A9205B1FEFDAE24 +8799D516A9ACC30BC0139C63C9A0523E9D5439213B67D490C96F902958779B8F +68BD8E9FDDCE8A3A2E35877DB6C94B7612382ED8F218EB1157D2ADD090A2448D +10B99FBC9211C5629ED1C61C74FE93041E5AA03EA4AC3FFDA00C2B6E719CFAA4 +262FE17F66804A6B54D3669836EE4367D2A2991580C5564463C973CA0DA38AC6 +922716E13B4A807B50304B8826CEFEAA47C305FC07EB2AF25FA7945797237B16 +56CDE17AB0834F5C97E0CC5741B061C6FF3A8DD1A79B9A173B66A6A750538E26 +32FBC92E75BA15CFFE22A7302F47908547007402569158F62C29BA2956534FEA +7DACF1E507AC309DAE8C325F2A6023D2FBD81EF42146BFCE6A16A6310A650460 +7B07BB7647C8760FADDF0DBBCD3DA6CC4645D1732DB3A22D8B76E1D2D48E4D4A +46F4BEB80CE65F3517283A1AE08391FD1C10ED452133706BC6725AABC80107FD +754A8BA47B0281D479F052CE26A723EFFACB79B213041A536542AB334769A2BF +88505D82C498ABDD5A73EB539530F47CAC52825D16A969C8BB56D4A7F2830B8F +CB63B92B576E7BD922A4B25E634751F8A3B7C4EBAFCB373EDC8B8281B1D1371A +7844E9AD990CFF09F0D7ED73A5CF873D2D5C9E8A9923CFA31E1A4B4CCCC40760 +8B3AC8FC3C88BC08BD7407725281BB879A1A822D94997826418F1B89D303F2C0 +BE7A0102E6F529630CBF1BC5BF3E4578C164A3DDE45E62A957EF3FB7F0FBBA6B +CA1E79A1ED195B6A11CFB345B663C5E72FA55D80476F604F6C4257B51686AE25 +8F7D159FE605DDA0AC74BAA5034F29FFFD403070013C6E2D8EF6A0990D91173B +D5A3AEB98B64E412991505C3CB7C2CDE13C091FEB3DFBCAF30C4C19511102300 +135BD5D444BB55692013F52056908DFAB2ABFACE81A58423ACEC59344CEF7D4A +C5A3EFFFFF70759BC3E593D878281225060B97D1BEE6B26EED90571FEAFA1812 +1115C0EEC892F5DE6FDD68321A0B3F10A2D771B79BD85476AF6018472A499A86 +07D64CFF4550866AFE590C471C80EB12CB3A989A60BC7BED39097C12D9286E39 +14C7952C4C64820B4DE44A1827B7B0B535244E93FDB80036D6332F90F95B472D +7031E7E3819E881BD0313CFA112EB3AAE943C99C47635CCA7E34DC0306C04E5D +2E9F60FF037EB11602BE74E8E6B711392E866E3E55D988F7C856417A2B9C186D +639819B4786D039B77F8578EF63C088FF28BD08D8353031445C8498A8F445BC3 +D08923D32AC04BF3CAFEFCCC1E77EA894F4E846F47EF62D6841B8D8576FEAE8F +90044626869D04D61D64D56E8C51AF8C18D6CC3FEF3B6C4F7D56FE3260354948 +10104F69B117FB8269292579A7D52FED688C663B643D8D99F13956612271073E +1A337AED059B7A93819A28CDF01569CBEB51069D22ADAE25C47355560F402B2E +8C9900DA82B79C64497C8494F42FABE5AC41791C2010D98FB7E593C744F250DC +D837DB0EAA4F75D0016970F3AE8359878A08CF9A697A06C5EA945819151265B9 +1A12122B98F79185DF852257BB4798E7DC03712EA6ED34F6E6AE1476788DBC33 +9229FADB8D581BE1A63F596698DBD6DB98A092F67197A4FD4A50B648F2691875 +EE2495D6BB310078F516785A0CEC7EB6E8305FDBAEB1D15690409FE32DD9CFAE +DBD3866FB63EBCAAB73E3E4BE5D7F3AA44793938AAF3F8341683F0790F1D46A3 +60CE083F9BEDDA22E0639A92393960F86602216FA51E2754BC2F4CD0BDECE3D8 +FFAB7E0E49613DD4956C9A10AEA798BDA1F756C755BEC12147ADECAB0FB73B7D +203A11D84DD2AB5AA98FD38C1C2573570FD49A4924A94A106D2A7D850E793608 +FB135853E8C4204441CDBE697FD0CB330B1C3596F32D2BCBF263237EAB362D09 +DA6F531B40384DC91F30674760CA7B64BA1968F6A7FC9EBEF431A1AFC5E76D7F +2D44DCB7F61C7F6B16196B3E8B47343F572DBA8B8B21B43E35BB6B2DD5C7982D +244FD4304D254D6CCB5E8CF70E77F50812F41A988EEB3B26BF0F6F69BBA18077 +31134B5A5823D10FEF6201D045AEE7A24E0F25376E9FC66340C56C05F6CD810B +724D85CC4BB8D789834A447CBBA159565D08BA5793D8599035BB5063271518E8 +F6C50E7DCE71B1D186270DDC860C6DC0CD506010EB5B1FDF6BE47A9A18CC15D7 +D657E58BED9EECAD5CE5D49F63139A39BC52C6584BB2C3264D51BD584B40F8EA +AFCD8B83F548594386EB2B05CE803105E84931DC6E7A1398073D48E130E0D907 +CD0F1ECC3254EDF5D4DDBF44415DC9BA66C673820CDB0FDF033D59BE2B5EFCEF +01FF9D33EDC88F8D522E07F1689D024DBCD09A16A63519E1764C8630FF36058D +CFC07027E0ECDA01E0E85B166C613B22F587B4D355EB018BA93E92A36007B4DA +287FF5A91F7D8A0EDF5554ACCF45AC8066E88865C5692E63EB99CAC81367B605 +8E6C19EB98EBFE0D2D161B447B9A70CDD1122C7B78A413369016E6D8481E2AE9 +9AA97B5DD0ACC9B0820F7742CEB2F46F89F3E2092621969A88DC0156B4F941A1 +6BF1546D4B136657C47B082A8A35FE96016BAF3D9679B8C32EDDD6AE6DF3BFB5 +7854074FA019707FC22BFA82299E72ADF9A980AE29A8E2434277E58B01F6B03C +192E1E25DADD49F6E3F69799AE62B56E00B60A031BF8721DB8B2CB6D4A4C15CA +AB1FDE010AB7DC0DDED977389B101B8E53A949222FAA126656E02817DD32B0D4 +A49516CEC2B97EA7C78FD66229B044EB92F502384BCC6CCDFFF995EABE3BB7A9 +50D5D1AED861E7D3BA8D333026C673C5762712E763E59261426044583D789C67 +A606B96F97663F92BF104CE02FBFDFC521EC0D6670B7D4F85A229F51426DE912 +3B729C4A535FB7C88D0A5E78074751B58885DD6BDD2DD9E9C83F105E8CF63DDF +CA7DB39D0319CA7CC2E73F42747F007574DE25AE1538B4D493D22D0D5F0F80C6 +5F6FA3937C8391DE2F0116F81DB2DB0EF751EC838A7F85F163A6F48804E84B96 +8D715EF25B7E2A5CAECC558D80F421052A1D698F3B8452AC27E30A4E6226E3CE +084C8A83ADA0818A110923CF7AC7AD4CB92AE4ABBE0A9EC1FF935FD02774C1F7 +92A278E513012AD17722A23C55EF82E18F8847B5CCE47F4FE3EC508BA563F7B2 +AE56C94285A18DED4D432FB0CEFC05A20BC17DDF9FF919C724810A8ED7358A27 +97EC93C1A13C443A91947FE1F6F528EA7B628917FA7E554A1D7B31ED46C5ABCF +92BA57961C8876DB4041305EBB029B03D8351D5E2819FF87E97ED214D8F1CEF5 +7F7668DDE223721C0B810F4A4AC81CA4EAC86EAE546E1B15D91E626FB9A31824 +5BFF17C4E79FD56ADBF6DBF01BAF6453A81EBDCB38A5FC0FD0FF0646B3B0D199 +13E2E59A1B5CAB6DE5329BE389BA0E2A2AB55CA40B711ED746C24F1E48892E76 +6DACF7DA163CDC90CF076763008E7A899870CDED5A80758E6177BE6B93B07EB1 +5800A3BF7B9AAC3FA825CE594EF5B7546B181375FA8F37608DF17856D2F8EBD5 +6030A9E6F6BEAF224AD2AEF76D03B023E2FCB922CB8E3C6816AABB61FE6E4F83 +F21B4935102C860ECA03DBEFCA461F0E5B93E5A8D18440BCF7D1D6252A24CB6E +A64FDAC8B67C4888519AA368D9C4A8C08C7155DF5BACD75C5196C571C3C456C4 +7CE8D90215FA6EE8CDD72C48740F7F5930EC3632DB63A9C8D2DA125088C0F05A +9FC83D16B7F53163F4EB6FF372C6C3115F1E68EB35967D11126EDEDF0BF80817 +E68A698183B3EB0A207DB43786E1B9D289359D75AD5E465328CAA90E712C2962 +AE2A466173F2FF30EB535A6054BB0B875DC8552C16B49DF17CF84D98D35497BD +F55E273FCBB0C735899529A69990E09149FBD2DDE64B7FA8D50AE83925DF03C8 +0B63EA158FBABB12A028803DA4B9DD6C48C0FEC469C4E730729F4BB420D5B003 +1918B4AE9CF35CFD31E8E62A44C0484E3D00143BF1D330235E821E5CFEAB4D31 +7CB4604DB1F310457FCF9075A3527279644D908DE847CCD00B6F50DBDEF91D3E +38238CAF550FDCABA2C3A46237218DCC5A09AFAF69997E1EBDA7EFE6FC99ECC8 +5D4AFD5EE35FE2346BE79B499EC8EC436868154A947D13BC02C780EBA4B9E64F +3026F1BF5DC1F8D64FEA1281EA40B4BC355638A3A59BD9055BCBB232FA45EA0B +B405131B64F105814019BC55466EE78E9E9ABB62DB30EA452F7EFD7196C76A85 +15B2CFCD89922CADC0F392B0C54A231F3999AEFB53C24EB0C63B0C8A1A1ABB6B +AAB2F93E5ECC7AB90EADA320E918106BAAFC1F8C425C617639984629018BA674 +6FF4F338AC43E23BC3740542911C058D43A49A11CB3A0CC8E3088BB5BA6048D6 +CC2AD250DE956BFBE83BB24C945C20D9C22E7105983F284EF478F9B68BFB0322 +EEB7D62802CBAAEFF1C2332159DCC7243EA40CE15C734EA905E04C476B178B82 +A08ABCB0B86A7330C75E62EE7844C9E22DDB013ADDF20AFE08122EE1B930A81D +806A0F8CC584CB7FF5F56F9B35E5FF78FD93E7E4A40C64537464EAA275FE88F4 +461FC6A467C8A69B9A9FBC10D44AC1B753D313A8E7D97F5FAEB60F82855658D1 +4DCEE043C8FCDFD8A29DD091F3BA55874A458B2B8989F35055C72FC411382361 +9AADC717E602B48D7C9521D3971A6F7EB19D539445DDE9EFBC5B58FA9E5E426C +172C45CDA24985FC4632287FC3B15849DEB56F5A061993AB10A6BC59868534E6 +69888175053108B77E4978D971B4EC57224C0F93EEA4C15AE92254140A94704E +ED5666FC06C5341F643F779CC88A9E81891565C63B6F7F6286E664F4E0A48690 +356DC96F1B98026C563700772485B83BFA06435D4E0793EF822F423C93FBACA0 +E5D889D2B76771C6F0EE997A5DB43C2F6921132890406E3C33F6F159B14C5D78 +7C151BDFFDD02B697315F191B5490073EB418A4FF2A398C68D44F0CD1B87CF9C +B52F12728B72F94D752D23151196A256908135C87991E508B8906CE2539DCA8A +31F86809C8C6C18A09F6129BD7CDC6B37E76B648788056851F22BD3E3B5772FF +EC01D822B57FFDB3BAE624F05531292641FD6A7E3666152D18F6C653048DD7D7 +98A942C840C4A0FA662F260B21C64214152BB86F03662A330109C5AC0A5EBA30 +C6201F558858130703DF76AF4FBBEE069BDE45C0D9467077D85FFED4F9BA9C61 +AED87D67CDCA453A6528AC5BA153E1039D9CCC556CEA5CBB542265FF54A1B208 +E0E13740E7E7C26AA00AEE909F8F3ADC2726081A744D8EF6BB711BF5F611A900 +76F91C26A338DA13A7160A9F42410CCEB3190000D963D036FDA05A29F598EF40 +8FAE6F8E7E6F50C99C3304A573501C13A00023085F057DF331E3354CBE65D573 +CAE73BF15B3B96B502E0AAF2B4A86237E98A997AAEFFF4227D5A26E8972C48E7 +761F430733E6EF8AB2D903C17FAFBFA21C25F8A0AC157D397BF3CC1AE7598F0A +2BE4FB46B29443CE57F41FD5F91122E9D86F903E94D5B55E2BB95949C156D138 +89883BEFD634311F9280C7F028DCA6408D3A682DF5B55B9F7ABF08F019190F60 +D39E4F0E80F0594235B09A5320109638B938633A2C196E4ED2B43DCD8643C3CF +C6123B076B7F73352F906D96FDE0FBF50CCCA432712C574D5857838BAC30B485 +D25024EB254A7EFE57D1DF0892C275CDB3DF77602F0FED0FAEBC644BCACA04B8 +B424DB125E487794CAB36E01B5E1A26F5E1E97A739AA36D77A12F5B45338EB39 +AF36CEBDED55DCBFCF497FD475FC6BAB5530AD6153C6BD982564EE8712185F1F +D5EA7ADF4104661168A01994C1FD773A50C8AD6A3E4D332E4D59521BB8BBC6C3 +866EB4AC3EA4532477E6CBF6BBF0860031C3B916AA25E3492670EA67F55CF4FD +207C684A0DDB6F4AD21B2909CBA71BCE2E762012B0927BA72367A6AE0AF87F73 +756C9BC85E4EDE35317E2CCCD138C02C7A8013AFDC1A48C3A4BB8EF257BDEEA7 +60E012F54D12D31D18DC59D5E526F12567B8688B4B67E16B56713870300016BD +A3B9DA87FDC865246AF8E94316799110D86B1DDADB8A673402D4226C519C058A +1D1E5A5778584FC28AF12819B1924060BC4F54B1054EA6AB0149E04B8C4302D4 +A56D8A347EB5D3D2A0E12CF7E35059BDB53D9FF6BD25F6D9619BC4669CFC1048 +C6C9978B8751B840F27D82A69075832BE59F55C1737CBB1220FB8FF691FDBDF3 +03BD7D225A9372AC221C38245E48320E1CCF898D9EEDD678E5B8C65B7F588321 +1A3953EEB9B39EA9A8CB72DB08C3E9234DFFF5FDF9DF804C021D57E97DA7622B +97F4CB6E0EB640E0DC9EA15C5193F92A3A7565F4C7A4C9CC327F7CD2C44900AE +D9E76FFE62FC37FA376E77131B566AE67C3E09DA80F198BBB995EE8FA47EEDB8 +4B467C6C7DB8AEA745CF8C56B8BE56534E9C56FCB2B7006426DFE93D728FA4CF +94F131C549814E54ECE7C914C5FE8E4961D3437CE7475D03534B62650F551D97 +201C794AA877445DBEB11C85ADF6119B05360700F8CEDE4766E3A1D7A35CDDC7 +9ABF7C619E3868A39D1852DBE1EEAF5D7898C78323873AC005542B68C43C5000 +CC58F675EB595F87C879694751494676465891E8A897158B481F11A171CCBBD7 +29603F00210CFD7FF31FE3D273933ECC34AFBCC4108D9B76D9ECE63EA06CF939 +4799092A54A749DACB82C1424E9879672C8BC084C360014C9C1B6D5D65C68AED +66CE329C3AD712C0A36BE7EF03FDF339CAA2E0336D387A693B1DFAB5D5164E31 +14755A158168962C9B399F8F1DF3FF5060D7464D5071058C30C572A2BC7DEE53 +84BD7614A4BEC4C84E18CF7EC81C811724463BD46CECA5FB57B0F55EAE20CC74 +6AD815D1897B037C197D2456797B992C20C70B663BF99FE28C513B4E221C8E12 +49779F8C0AE8517048ADDF7CDF0D698E3EFE60071C4997B7F5EF12B6CB65390C +224F13FBB99FFC034C0710F05019899689B6D3350BBA65C7CE7C2AB03D81B9A5 +5F3D65E4D462DAB189006669F7390A78A1B8908A4C913B15DB8827DFF15BB9A4 +A6037DDB643103B937257A7DAB025F09D53FBBC2BCB6B0BCD8D56B2B2784E498 +1F6CF8470DCC892AD0CFE11578718948BABF9C1427084643B66BB9181094E29D +5FBE37708E1D8A6B7518A96876844CB66954227A7A6AF28DD075A462526DD5D6 +40EECC56FA366106E55C7068997B54B7F0D03AC1AD45D28C67C7ECA99DBEDB1C +E18A79C353113E2E05B837E703278B202112B1C69E42A69D64B62F0E7D8F7E5B +C1F93F0F99EC20EF312046F4B0CD7DAB31E422070B629A7FA96583CF3F1519CD +CF08806F40ACD7BB5C960F21E9DA7FB3C72CBA0801ADE83DF738A4EC94F2977D +2B95A166BA4AE28CAD1E37FBBF49D342CDB4DF615E2C5F3076313AC517C350DE +710F5D52DE31DF69864D29DABF14234DF13904BA4333B0D714EEA55CDD79DE45 +FF5D64259C877191547076B1C7684CD252C0337BD9DF66CDC5DBAA4F3102F2E8 +FE48385C55727B80D11F3BE0B7568AA9356FB2B180A6B1392D620DED02F0B736 +5F4399FB9D32DFBC8ED942AD311C82250DA8BFE98D65 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMSY10 +%!PS-AdobeFont-1.0: CMSY10 003.002 +%%Title: CMSY10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMSY10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMSY10 known{/CMSY10 findfont dup/UniqueID known{dup +/UniqueID get 5096651 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMSY10 def +/FontBBox {-29 -960 1116 775 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSY10.) readonly def +/FullName (CMSY10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 0 /minus put +dup 13 /circlecopyrt put +dup 15 /bullet put +dup 33 /arrowright put +dup 55 /mapsto put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CD06DFE1BE899059C588357426D7A0 +7B684C079A47D271426064AD18CB9750D8A986D1D67C1B2AEEF8CE785CC19C81 +DE96489F740045C5E342F02DA1C9F9F3C167651E646F1A67CF379789E311EF91 +511D0F605B045B279357D6FC8537C233E7AEE6A4FDBE73E75A39EB206D20A6F6 +1021961B748D419EBEEB028B592124E174CA595C108E12725B9875544955CFFD +028B698EF742BC8C19F979E35B8E99CADDDDC89CC6C59733F2A24BC3AF36AD86 +1319147A4A219ECB92D0D9F6228B51A97C29547000FCC8A581BE543D73F1FED4 +3D08C53693138003C01E1D216B185179E1856E2A05AA6C66AABB68B7E4409021 +91AA9D8E4C5FBBDA55F1BB6BC679EABA06BE9795DB920A6343CE934B04D75DF2 +E0C30B8FD2E475FE0D66D4AA65821864C7DD6AC9939A04094EEA832EAD33DB7A +11EE8D595FB0E543D0E80D31D584B97879B3C7B4A85CC6358A41342D70AD0B97 +C14123421FE8A7D131FB0D03900B392FDA0ABAFC25E946D2251F150EC595E857 +D17AE424DB76B431366086F377B2A0EEFD3909E3FA35E51886FC318989C1EF20 +B6F5990F1D39C22127F0A47BC8461F3AFDF87D9BDA4B6C1D1CFD7513F1E3C3D3 +93BEF764AA832316343F9FE869A720E4AA87AE76FA87A833BBC5892DE05B867F +10FA225E233BCFA9BB51F46A6DF22ADCEACC01C3CD1F54C9AEFA25E92EFAC00D +7E2BA427C25483BA42A199F4D2E43DFCE79A7156F7417ACF78E41FCA91E6C9EF +B933450D851B73A6AB6AEA7EE4C710CB5C14270D1674FA334686653793FCB31B +491E870D3C2BC654D2C1DE463EC9BA29D7371AA1078800EF93D3F66263A2EBBB +F5723697BF7448BD0D2E301544BECF497FD475B85DFEF52AF4F8F8BE445CABE6 +019318806D10C5952157FF8F8286C1EE701545C8F60EFA854EAE66835A2046A6 +915D395F1E0366EFE0C0391583FE001FF16D82A2E2DA5F57754A2C6F69306E36 +356ECF8EFC3F1188AD6FCD2427E0580C97A5B69B4E0E09B85EEDE142F5ADD2F0 +5DE51D6DB72B127412A0D57106C19CA493048A4F815129ABE767D51715B1515D +9C21067CB5BC88741B7298C83EAE36A866DFA87D8981F179B1C31292F56BBB64 +3C430779468AAF07C8A8B4934E1E775FE3F35186BD1FA6EE3689C1C750678AF1 +FBF9B23195A124C5C991FE670AC0C86FD39D2B07B9A319E74EFD498B45820252 +720ECDF7294F7B0B137CEB86D33BFCEB8606985A3260FD669E461C8BE94216C5 +D434FD8854F44EE66E5A289A9F9E32BC36AF645D53F96652602BAED418C8D726 +BD04A1B4617551FE4DEF54083D414F7DCE004E6BB2DC9C2EF7CE232B254BA2C5 +7DCBD36C2072ED46FF711F121A701E2284BF1B718B3164382B8F453D68FA0377 +DFE106503B8401D4DB87F5402A3AC9A442FA060B0610A9524D530C7157C26B56 +AC970FCC1D5655FFFFA39246E6420CF97D08ADFB7B05822679BD40C638DDF0E7 +A97BFE8918B611A145AC965C203F1428812F9D340AF499B3A915B22BE798594E +0F520109FC81E452180AE45B170FF999C5FC2761C6CECD8742A5A6FC97F16743 +AD4EFCC6572A6D3F3E4E330C5CB2FF6FEA48A5B64DD3DBE943BD9918D4A18E18 +CBCF598AEFBB6AB3CD2CBC9BFD6099272F6543F3E532E0E21E614BD2880B1023 +0AC234CB705827BF016DB84E00E8C255FDEFA0101A842929540B7B4AA8A089BD +5EFF05B72356B6BC3727817823B5CDBB1B963103000D7F2A4E2A1472FC3E614B +5CBCB6D6D784023173DEFEBFA8F9ED87EC1A0A9EE98CA59CFC964CF943DC683F +E9E00DA718C4425A705A69D99988EC6F152525C790912C2E46A2381A569424AB +54DF4798BC2D7E7A361E7991641D4B756CE2A7FF4A2848927092C59C2C4B8809 +E13AB84FB6B111E680D7FB9F2FFC2C5C66B0B501E4447C2E46C10E2F6124476F +A140C404CFE2DC9E0199BF61E035CEB481D438139A9630934E541D261FFD2906 +4CAD99E20655FA746AFB81EDBB5601F5FD6B1D6832A01D585E2C55053F6A7378 +4DAACCAC7608DBDADAAE732D66B3E7F87E79756337C1A961E53A4651BE7C77F4 +038B89C87F650C54A2A90EB7F1D525BB353F33318551EE8D84A6A83C718EA5A4 +B2AC0F7306B1E095819B87015A90CA3ED739B09061782C28CDB36BA4BD5E5308 +5CBB70414E4112193DAC4A1FA30996327230D1E021F3CD8115E12D239D93FFDC +B645910EB29E40D830E7BAF2DB255FD7C4E776557BB38157917D993EAC245837 +A3B515147043574157B8342D829C7228CCEA843ABC89D1785A9672A5923FC4CD +2F3FF27E6FCACF84E2D3136CA2C0FD3EF1EE7354CD04C38B5FB874553646ED2D +CEDF7E362EADD04B18051F20A8FB0DE18E152385B9D05F98A3A7EF177824E246 +455ABE69E2F700EB78185CCFC07E3B4C6FA301112528D977367D30D0D5D59EDE +FAEB706DDC970A9E296236C725B2B55B09B9C336B8E23CBA5FB8692D56F33B03 +16294E5FC7FAA42E96395A57CE51CA8DDD77442F142E2E576B778373FB31C81C +16840BB422CA827E30A81829648BDF1CA36700EA32AD888D097C1FE0A05B2D9F +483AEE40269DF09AF0D1AD3DF80C45DDC59C2A03FBB661C79B87853737C6D352 +67626B657321B16198DBD6DB98A092F17878AE4698121E1006E53D6F9B0A3BE2 +3FB68828EF854A0CDBAA68B37ABCA6AD4A3D809AAF0BAB1697A81FE59C98C472 +1E33CD70A75A22C249DD11D76C2575ED3370A25892A16D2FD569CDA70C130770 +93F493C7D47D6F9A5424A7A542BAD726BFC3AB225DCEBBE6AC4BE006F8C7C0EA +051424B08305BF2D951AB2986AAFEA04E078CA79B399585BFF0F1ADCED02E15B +8765EB6BF6A8E4D0901EFF2C3AA104924EAD9637A35D877E0C51A3C37DA78CD4 +8643C8CE6DCDDE3F116A6C2390F948E5371BEB5AD2E87B41C5F01FB5C196C436 +6E256A88D082E3F46E4EFFBF605B2EFF1E9D9AD5EE4DDC323A137CD9451EDEE0 +06F7D82898D71FAF2362C0FCF1F726F97F820305B7CE20728CA08C63575083A7 +84BA28B7DE2B916432475510E274C12FFD1660A717F51DACFDF0A102D85224E0 +D6DB607BB72569ABB8A7BC6A10354CBBC01732EFE35B72062DF269CB25EA3DE6 +DC603B04C90C5912D2C38D7A5ACDCDD3F6F116D884F0D8C528F69D5D47BA20DB +0A9E585C7D8CC3C324FE8A1DF150279F7E8FB43BDB720E624E5E9918032C02CD +8020636AE5C38DA2484B7F4B34163E0D0A561B43B80E97746DC05C871AB620EC +C5D47101ECED4A7E25F291184BEF8B80024AA7BB456C1B83A907652B331DEA34 +754226C39C6889EBEEFDAD081E01EF8FE47751987667836FDE4C8BB8A3FD4406 +1E643B4EA37BD370734D1A2DB17C2F4B74B4ED75098B433601F75A88C9A37A05 +CCB157EF6E32023BFA33973F3E655A4D58289136996FCFA61EEABD70791B6523 +1FF5DE71AB8A17038923118A5EED8D59C4C58D246FFA9BB26472346B40C8741F +153D19CAFF20DD2A86C6DB89154A630FB1761929FC3F0448EE2F089C1C953E02 +905BA8DE75D101A982A611056C4B237596C10951DD98BAB838B742D3CF7DE718 +617DB72E5268583223E37E029D1C8FD3F1D21690151F76B76C52C725CA135CA2 +8666553E863CE188BFC9B99AF56AC2DB5BFEBEB12FB563D00244EB89E478657A +98AF2E1223C1ABC25A4500E8119B86EB3C26B8A2F3505A3E5610F89B7C34E278 +53FA0A54A7F46D84A35EFEC36AE660A9E3C37EE3864106702DE5AF6C45ABF64B +888A4A51323138CE77DB935576FE6B4824B6942DF80625098CE1B5B32B234F1D +052A9D6039697118A9D793793775D8729D8574A2E74D7109C7B7E23BC5E2E87A +CA8E019203952A4892544E1AD3D4EDD22971611358AB230E9A2ABDF00A288501 +A01B67C42B33F6B78C39562DB50F4663B922D9BE0D8A150311AE44B83C1F129F +07337323E9A23211EE58E16043E127C6F9574019179F5635648A011266677B56 +B5D0201A4E1470B952A1579B57AB2329CD4C615395023C653F784D36B5EE3672 +10D191F29EA508CE84763CA4CE7C2C5229E38E241255A5CABCD6C7CBAED901A2 +CA53B5E24111921CDDF83578D33D463D70EDACA0E470D8F592303FB6BFD68B4D +3F3BE2D7C5EC8BBF10C90111A33E205F2649B56E8443F6FAA6C721C66575AE12 +D4C40F1F46CF9E9DA675AB5D5840D938780CD9E4AD6736ECBEB6A4397613586F +849B51048AC5F9405E03E14540A5E5582F61CDCDB57EDDF95A8C6705F433EE16 +648F098C03DED8A2AD94AE3DE202D629B9422ABB031318D48F2C85F9DBFA17BE +84708AA3B6C9F81F4508F7A5CB7B6646AB8722ECF817877B77D473F577556DAA +2BA0ABACFCF5DEA7498C47328E873019A956FBB250FD9D8885D21D368FA70CBD +2709D2DA44EE7A9869963EAB48789541906DE49FAE785ECE1F18A22C7E7ED204 +9768896B78E9EB7A2BD6EEC1B26083940656ECD689D92942CC8AF05CBF82AED0 +B45A7DF4DD7AA6526FB597322560B9ED3087A65B5EEF1371C328A021411BFE3B +D9B5088B2F1AAE381FFED52D2D1E02CD0DA78683E3B06171CBE94BE9760005D7 +135893D7CC2DB097F6AC664D9594CF1C650F84DA80D2EDE04802DBA33CE3DAFE +EB7A37E8AEFA4FDA6252FF21E8673DD98E67124D5DBC7BACF361E57077B71939 +C1D1FB923E4E35C075CD1BCBE0E80DAEA1320D55B43EAB45D9B26C366B278782 +7519FDC482D98839BF0DF2E7C3A56A1C1A3FC0E57A75CA414F6536C1FE8EB7A0 +4ADFEE3BEDA0F53BE8CF5F64230784A797133E8CD46BCCB3BF38BCE38A73CCE2 +9E073ADE792F7128231DDD1F63E6156ADB2609C200837C2E8A2D93D2A7BC9171 +050C709A71E44E32B1B03C92EB5CF1D3BAB1C38E027DC4ED9AED633D98CD7486 +3F773ACF8AE332631CF2ABE6D606607593FE862ADE31803964E3F4DC3CE3A271 +C76BDD95C87CDB3B87BC26FC7A16D567EEC62E6FF0D471B4853DB8A94D4CACF8 +843824F818083F10E88D52FC4253E8203292CB40F1414AE7E51DD7347007C342 +CD70E8E9F2D2A13D71213B841DDEAAB208AD9EA644591C15DEB084165F9DF24B +B91D3BBEEC2E34E38EF16A0C3F00700A7BDCBBFED2EC0D09601AD6538288DB50 +3478B051B5E16B604A0341FE621A58718D960D699D3FAD284310DCF54EB13175 +19A75A539EE98E804AEA24689D3540F0F12951A3C01FACCE9A7BAF4D0DAFA946 +FF65A4D2A4C39969607272C6886F44E90ABE27CA3A1F12A29D9B32E60E8E34F0 +17C5FE43D0E69A99A922D98909B2BBCD145E59A5E7F5426B3988F73B09A525F6 +8BD4915663C1301323180E760BE81CB874B020FDA3AE63340E4261E4F3E4949B +CC0966BDC4426190BE9F5D77F76A72AD925662E5FE1CEF9CCAB68F0BD33DA003 +F11EB91AC4502FBD6AE48DA0F9D07C35B96B103E379B8A83A05FE728F1716194 +1F650F75BEBADB2E3810388F3E2DC7B19F1BA9E32925F2FD9F19F4E8701F3E4E +4069125D7C401144740691E7A460021A47B1E27997FC1DDABEC5BD0EE0B20194 +2D579C7D6727AA124083242BDA46D8E116E2751C5F298851A62B60AEBE82A929 +9B9F2492BA35690D1EFD16215B8EF14E7A3803B93C28FA41D971B05B6AF3B593 +E74AD1E68A5FCE12A86E63B78BFEA87D3949FD164F12277A4688BE96356791CB +8671C49365608F3EDECC109321AF92B4C29CAF073DA3A7D73E913D0D83FAC5EB +BD884D4C686056404DAAAD6F82F94F803FA1FB0DD8908D1DF08FB87A8BB83027 +04DE0CBB1C6FEB6B517FBD7CF065120079E608CE41893C2BC96A347826CCDFD5 +C69E161217F2127A59F1A6F22037641613F191F22D5B4CDCBCC2EE5615623404 +ABA7BE6C5FE475481615B2AC1A2412E54688DD21E44CC9AF5F16E634AFCA389C +4D740B7B51BB141BFAD1080E7C726C1606A28ED492E6BDE9F800EFACD1513909 +84E98CEB6A0B7A2A6F3E1D1DCC3B2552795E0932673E59ECC56DDD37A1D52BA6 +C3F0E905978AB568941A163F4CE3AAB5C5B16F86016EC47BA6F3F7AAAA77C3B6 +09C8C3ABDB6D514A76ECD37C37AA88B5860630B3406B494F7725975596F84777 +D9CF48686EC9C5DBCC1D78513F591C7C10AB9D153B3D41426B7BF668B0D04503 +56BCB686258462C1DC61095724B9F3312316262FD7C1AEC6E54DE7E5A7BD8EFF +035299B8FD8A4A7B0F51404F4A760F4D8B4C0FB7A32FA4B2383AB6E9C78FDEDB +FE6A5788D38A6701B123630C2A6D820A684166FBBC83DB17069494FBD411B333 +CB37E2491C5BD035A33867A6D3A3D420CC31ACF43AA07182CAAE67E40EC63663 +B678F71D4C6E0EC3A0AAF904CD3AA66E0DE5E3CDE049E94249B39A1C06E3CE9A +F974B2484BB2CDA14282B9511E505B3C89F9C802218AE40D1A7541335C5736DD +CD565D4B9F4CC78F3A393737EDB4FBD0DA299E21CCFEBA5478EEF013F0552A8B +0BB11FF46CCDB784E8BDCF730A16363E66572049E42C695886EAB42A9AD9094C +B635DF4B5B9BD9B9AE8455DFA3EEFC77653190F9A8B1E93B7281C2A21EA7DDA9 +33484745BDF7E3DD63C7AC66C286C9A5A698A5E4D7A91710B7FF943FB23609B6 +4B442F83CB795788FAB5E9CF3F75D5487DA26170E4561C7941C910B088C3B86D +F844B0F340CF82786A3FCF347048463EBD2006281A816627065DDA6CD4D3AC5E +2024BC96C7D896381BBB567951E7A1F29D4E95351298B000D29E5F3D0448CB5A +CFDAE1BADE9403B90371C3A07D208948AFA022A69C519434B6813086ADF518D5 +88E0B92072A44BA1B3EBB630A13B7AB90992E85B6D67361C8D96F3E0D826FF37 +17B67E4B1EB7BADFD98D7F4FD17BECE740ADF13C141EBF0A91CB105DABB32FE0 +55086D56A0D358841D15FD349E6B95512E4EDF4C430216FF85C2ABE995E4B40A +A6044CC8820AD885C07E052B3F91C2E9A1D163BFFD210F7BE95B923E2500DB50 +2075106DB541C267BD450B25B670CE80BCD068D4DBFF2D82634175B61FBD3BC3 +406131F44C7D6F18D375D1F2270829DDF29DC14DBB58A30AC193245D18DE91F8 +AB88AB548D8138605BB5A50073295534E314366E26665AE70482B890E4101D6B +60E4F3B37ABCA1346DAAE8FDB8DD9C832EFF3E73BA470E2BACE7B8515CB43388 +C27AF99FF9322175CF8D4947E6B3846AFF5163E972156847F58A66660EC8A3A6 +5FB47C9F637B4CBB4C73B6A080B0CF6FD1E9665E92032540570FFCC747C67C50 +822811AADC404BC7ECD1673E8AA6C3A2F1D82F39430B58C29145E2F1B679C46E +94EDC711883F1E4EA84117A54757E8895A40401A26E1437B39A2F65CAADD6E02 +D71FA8AF7453668DC613F326A3344F74AD7AC67569AF399385500ABDA5EDD3BA +343CC5EDD4B558467626850E752B9959FEF1454E53E7A3DCBC2255AD8F6AB4FE +894455118A61C58840CB68A925ACCAD75CEACE863D806916228F0614191A1CD5 +DC9BAE256018615AA3725834519449B0A88B4F396654E74099C007930ADB1327 +DD119BF799FE3B0B223E1EDA04FE2DA7A1C879143E1C33B6C6344F4BA033AD6F +8E88C33DEF1977796B454BAB2494C930F492A518E8198C708A75FFEF8C49C324 +A718AB59B889DED521229E741FFE53F98EBE88B0405AD523254FD3FA4BBE96DA +DA1C27C1C979A0DD4E61C3B1F4C4DE01E42F1C4435EECFC02D97994BC8AF5270 +E7CB1458D76ED0229C5FFB4A23B8716018F9050970895D51722CDE8F2EA3D947 +DFF374D84915D5C5D16463A6FFCD079D1ED416C4347BF831FF0C4ADFB61295DC +4D5785BB0852BF472CFC97EC174491CAF961AB90629F055E75DAA6D9898E8653 +5BCF379816CAE46FEA62E7BE8E9B953466E51828172C4DBD0E1BBAD1CE28B5B1 +02B3E36403BE80B49A47446A6677FCED438F01D60EB10F478C89528FA337D0D8 +88D3FC123C076507ACDAF783A9A6E24ED73BF24B6E0F11C13E532DE5F70B15A0 +657F5ED27D204449A841ED19E01432CFFE928E921321113780D036D34F2797DE +D4459CFD15BB117B5C9745EF3CD2B296D91FAD48C80B136D94476967E255F808 +AD2B5D522ADEC64176833756510391815A1D4A8DA1D0AEE7CAD36A1D161889F2 +3347D5B6BC503300FDDD48F594F391D5FB42C42113C538E707C16EE24A3F375E +7C506E8F49CE50FF9DEF3B4A4C1BEB3848EAA3477349833BA22D2A9012287D8B +A8C4CB4307A1188ACC0E6E9338E1559BE5FAFF381BD82A6C71C267409468B3C0 +2C1A29F4281D565836EAE57F680490FEA4A952FF64C8CD11C377C294DCD1EC25 +CEFB2B6DCE959D0208F85B6E32E9B44FD455F9B134A5306D95EA29F37BB8B86D +9E592159338E1293F449380E13C21AE42E6D6952083BFD432F72DFB7B6F9257F +5784C683A6E9ACD72334E0EA8060A81E14EE32300055040E24B49810DFA1468D +A962DE1D1AEE09B49109257898F155A63A83D514996DCD2F96BC0F52796267DD +DA6229F5E9024F78B02154C27EFDB9B6E09B131C9E9E4DB41A0FAEDD93A05512 +A919AC8869C09FC929682B51174D816B85DADE28C00F6391429BA98327848AA8 +C52FEFEBB2296BB78F06BC1950A8E0405EDBA2D8C51F1F607E73F5A2173E5469 +BEB7918844D450B652DCFBC4C0D0C4AC2AD678B7165AA8F053B717C1D417ECF2 +3A2909E864E503059135C05EA8F7CF185DA45CE17FA40B4076ABDD8B167B6F02 +3C8962F09CE07257495ECE5357F755C48E49F4385DB5CE4FBACA3AD4D18E39B8 +F7057F4BF581ED26ADAEE218CE130B0CCCA0C7B273E51D7F314F53EC8EC84100 +8292750A37A4D4551A5C2A65D2382DB0941409D83FE1005752BAD1980307F153 +BD7C92FC12AEBC7C04839FD7F01BC85F0880DB22FE524204FB924445B6B3DF6E +1B657353086539BF4E60909524FFC4CCFBC8E0139F65F53ACF3EEC572C673CD0 +64AB1C29253049B26888A322E0FFCF7DF8871F701CAF5BE7B509E090C43B4755 +B100C929D5A8A4B9646E8EB39F2E705006AD23EEC58E0E1CD0C18A346D8ED66B +D0D2E215F637D25EC4F05C449FF8E25250211635C9D5121EE0D51E712B7A8699 +19E96ED8451ECBE97A7197337C65CCB44FA2522EF6735BFB60CD053EFAC10381 +C70053C2DB3B6DB8DAD720DA6DA25069131FD9759EC2182D1B649AE67FE4181D +B223BA15F5FEB0BBA498F9993F6A9C8DB9088DFACF064ECCB56FC4951EC8F9 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMSL10 +%!PS-AdobeFont-1.0: CMSL10 003.002 +%%Title: CMSL10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMSL10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMSL10 known{/CMSL10 findfont dup/UniqueID known{dup +/UniqueID get 5000798 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMSL10 def +/FontBBox {-62 -250 1123 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSL10.) readonly def +/FullName (CMSL10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -9.46 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 11 /ff put +dup 12 /fi put +dup 14 /ffi put +dup 33 /exclam put +dup 36 /dollar put +dup 45 /hyphen put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1BA6FC8D4362C3CE32E0D +DCE118A7394CB72B56624142B74A3863C1D054C7CB14F89CBAFF08A4162FC384 +7FEDA760DD8E09028C461D7C8C765390E13667DD233EA2E20063634941F668C0 +C14657504A30C0C298F341B0EC9D1247E084CC760B7D4F27874744CDC5D76814 +25E2367955EA15B0B5CD2C4A0B21F3653FCC70D32D6AC6E28FB470EB246D6ED5 +7872201EF784EE43930DC4801FC99043C93D789F5ED9A09946EC104C430B5581 +299CB76590919D5538B16837F966CF6B213D6E40238F55B4E0F715DBD2A8B8B8 +80A4B633D128EB01BB783569E827F83AF61665C0510C7EA8E6FC89A30B0BC0EB +5A53E5E67EF62D8855F6606E421BD351916549C569C7368AAFB714E22A023584 +8B1D6B52FC6F635E44058690002C6BA02CEC21C54CC8875B408A8BB84F445894 +5D6B3E4841CA20AF852A660FE9C832F773691DC6F7197FF3DEAEE97418A5ED2F +F2AE65300416227CD3BB03C29003C770CD7D2A7A2E4C1DCA193651C2CDDBF93B +966938788694BFB562AB0010268955FC3555E5984CCAB0A9B7590C77C9BC713E +A29E5BD7193A4E971D1752DDD0F0AA4648E7E87BBCE66A1E836C715C408B07A5 +9EB56BEFD4596706CF839BA4CFA90CAD4038C1E006B51913279A2C31FBEE5BD4 +A7D74F9103CE6124F5B439CB860987DF44FE17EF88EF1BF62C67060D25696BCD +94ADF08F04E349CEBDF9D3389D870D94CC05E393B3F4362A13A6A672EE5E8F5A +DFE7046AFE3EBAEA58FFEBA4A47BF61F92E2003756DA643CCF2C9DFCCAB62669 +E3C2A18D690B64D907F50BCA155A85E47C3A6954C6FF7ACA36D8DFCE777B7929 +5F5D5F787B9C247ABF13D6D7B4A8F06BA25CCB342F8A5071325CDA86AD71BA23 +8A9695C7D1D50D0AAC267AB7CDBA7AAF46A264B7B081B7E79AD937FEE4969FD5 +155A99E652461EFFB4BD010E5885631E2B2497D6B8C43CE77D7D47FE201DD46E +4482FFDCE150A1183C22C004A0AF0E1F42AA6804E038E1DFC8B0A3CE26B52038 +44D2E7F759DA5C252489E5525963D68BC27C82247BEB18818C7D4CF0BC5CC97D +8C701034B8DF798DD4CE36C3F8B1FD40B2DA14EA75583852875031AF8C909EE0 +04495FDCD04B05A5EFEBA56A8CAC1F57F1B8AB91FB25C81CD51EE69D6E0F52CC +A0E12CF7E3187D67DF71A599FFD895FAA7BF80E2E6B96592BE77AE96905BAF0F +F547355A36C443797DDA7C414AA606CF9153E03450B77D1BA4088D739DF55F07 +111B9E11AF37F45B6EDE6D7AC126E05886A57C83886DA87761BE600DEECD1344 +8A82BD652BE7ABFE6A0F50ED7C6F4EE12CDFD80CA7A5518692F267C51C3FE76C +567BB8DDBE09A2AF901F79AD02B435287CB8057B3D5EE6655071F67B00438728 +C4C3EBD648BAF650993AFE5E2B29074A99ED0FB725D9B8CE8B0292B08A280214 +C3AF252BEEAD30C88F72E322FAC3E9D78A1038F5DFC41F7BF1AE3744A0677094 +51B77C2D630B67853FE5E975A395C06A4D4DA744040B272C2B88D8B7ED3A2C01 +66F503C9DFD3C7DDAC865900D2A4F2CDF517F449851DB1963468D0266D7A3E58 +9F6B2A1843E6444274F16A9930302DACD8D2BC4588765099A86BCCD8A31DF0E6 +2853114DFF2D19F812F19AE6C2E419D7AC1BC024D1195074FD0C6717BFB389A4 +4D5428E7BB2E4F9E9FDEDED7BDCBDD3460805AEA0B5F6460C2FDF19273CE5BA7 +5D3AAE0DB94C6AFA8339646191C23B0149E7CBF136FC4C844E025A38935DF256 +0A0A6466A45EE8B9B23B6A055856FB084F87C73BA28F1883E3B184CD813C72F9 +233B78CA4E125ABD26F29B92CD9DF39D6FDC2A217E2B6B45D9B0A4D536790A5D +BC0903069565A442FA7466414D948AC432C6B75D8D0E1DBB217CA3DC38A52DEF +62E9D5AE9E753956C13819D93148C7683BE4F71B80BC066D8C19FC807FB1C086 +B49215DCF56A91A42089F0D063B9981925691F7DDE3237403AC714F5CC3ACA88 +DB2F1DD205578C00472FD70C8BA4F752E3923ACF3164D442A6B639902ED060D0 +C5777BC20F9A3BDA60FA3BC986C38136FBD2E8F910E32EF36377C9CC187F4AFA +CCEC423DB925B378522B748BDF12D523804CABA83CB5A7ED69FAB9AAB75EE8FC +38D9866E3754C4E2F2B9AEFA804044D878DED0E114EA0E9682FCF38F6628E63D +FE1C1B5615E54FAE8684566EDC4B616F76EEFD6207E0386F06D3BFFA26425F24 +303CC7C8A8D7021E7D09B202616988287838C3DBCE3179B4FB5C726E603A47F2 +8248CB508F327D1291CF3F08F7C88298DC2D0F778D24304EFCF6E074182BF5B1 +8E6551811FD6991971692108E289B61053D6DCBA2925B3903E8916EBD09D97A2 +C6D08E89DE4C0CDF7185E1E00DF456B249F0BFC686E04FDAAD2772DC2C39DD53 +9C23A41471267F53A87E5C2B8CBCDB66CE0B9844BC506428E6150B48D2FA6363 +4FDB2CEDFBAE0B7DBCE4D83E29B2955F8966272CB865EDB360C8A8C19EC62A29 +03066483E4083524A1E8D80FE3867BC1AA91753C26ACBE8489AB0E3330206212 +93E07ED473DBF457EB8489E66FB4B8ED8A9EA8911CF9308CFE3E6D6F36810EE8 +91CCB11BD548617B2C683C354452B9229E7C9E68828BBEC324420DF7C188CCE0 +FBB514547553A7E9B38AC265783891F42DA472388569C8E7594F7E8810895A27 +06E456902A8D9F65CA808F1FD475D011C4572F8A654BA01D67942226A663D179 +95149FFF41A9F55AE84EEB9A6A39C017D7E4FD6EFEEE7FF3CE847CDB064A4954 +9DCD273B810E0F259501BA4003A3EC1ABA6E13D24C0B57FF82D6DF077833B6A2 +7EA54801BA81DB961C261689C0887FAD83771E55D3D137AFBB21779397E11972 +6C6CA922F45AFA5C0526863A5AD8B9C0775CCBA17FFD37A44CED4710884DBC31 +5C9D3F5441595B86CF7CA2EEE42AE87896E9E60EBF5F35C2B7FDBF9A9CDAE262 +3F48396F0F741E9DDF1D4FEF75E68AFB020D06CC29B3A7B2ED819D1AABC12B91 +CA2A65F1AFDDA2F3FB322E0268DBBA024663E49EFF076455338FE31A16B04EC1 +797EAB0B49AFFB906A0690A1E8E2F5314773E1CCFFF43E6FB3875AC907F0C5D0 +DCB9BCC127014D472463560CA0CB1C2CE614D94177C7A52A5B089316689C8112 +CA57E35D716D956DBF9013B1E5B9626456B1433C8C15FA906458F957133B9E19 +8D46DC3AC015F7602538C2AE3927C6DDBACF38E59220C2F5AF36B68DE9117C51 +04CF7DF32B1AF55B87D1D8A5F4BCFEC66F63B32B6548DEDA3AAB06C5310E4757 +78AFF947DA22809B360FE535506A554DDDE5A6F2411246653710ECE5CD3185BE +730520A766C47E1ED01890059882BE1432586864E1A86A7F586438C8DD35C00F +021A741ED47E0F16DB6070ED0C50038632CA4AC2975578A8372A080CC0447C79 +CEABDF2BCD5E78564247B0F0025F556DA8FB62125227849EACFB724A4AE3EF57 +90C07A5B27D2E59425F56BF8AD84C5F5310FEB1BC73D536339FC2E6A5BE2DAFD +97FC835E0D52F680F80ACA37DB498AACF152B9B44626CD89E3302C3EE1623EE0 +F998FA78305960AAB9F483F731F5F67A8C963C23DB8E48FB804EF8B86FAFE7F9 +4C09641915FA7E3930AC922682313408BC1607C76751CEEAFD660206A39CF394 +40ABE2A313AB7D5FD6444E219DC5C26734D322BA268D330AC17959A390D6C8E7 +3A155095BDD66516DAD5D65519A7FB871ECDA77061EFB21F359158B4470EF79B +362C35C06B85C9A9505C8361939C6AC013F2CFE8EEF46FD8CB4452AAB3EF1FA7 +DC066557BADC2ADDDF7DDC2A0E1DD4A357E27A2073427EACF9B9035DA5272136 +7DF37E26D96ED4B2ACD60596E039BCB15E259C72FEB3344E3EEE3D4F17DF4233 +04C1416BCADE80BD483DD8C9AF979E1C7D50C4CF015870703F88B92C4FE46AB8 +DE6717B55C460C805B391B84333097E116F4A51F631FAFAB34CFC925BEE8B72B +C9FD5F5A79D8F2295FBFAE649DC6AB47794AC7D73431FFE5BE992F2B5AC67049 +B5208251C0E442385A9FACF25E3A98D7F5D4C2A1ABDC600AABE84769CA83350F +9B87F71CEAD3600E02FF9AC03C1B5C21C84F911511A0CF0111BAC7605EE31229 +3C526A79D943D92E1CC3C38ABE82D560CFD4172F318030852A5FCC0534B8B3FE +D7365987C8B48A072907B26CDC2108130A33233E8E0BB5FDF14FB55098A10EA2 +B51AD9EFB119F82B08D256D396D3263FBD9DBF172D43A90ACD1A31F3E89E8571 +74BE98B9560E2CD661A2F93C69FEA3FF26B00772AE2C2C24B98D3D122EA2AA8A +44652CCDF4EF4F01CA7D62A976E23E8A86291F43BFAF38FD9C325E70F9C36CB5 +A181DAD30156E98339E6A0498D3420B7BB3B4E651A9090D4A17604AE386273A8 +3D4AE8CC18345E6E19DF06BA848F203F74B161D6A8882991CBA7385F308696A1 +BEEB0130D938A764B98A2001A38489B1334025EA848CA44A116D64926D460D64 +01159E77EA7ED9ECE7BA77635BE564A4ED89315BDFF54ACE6AA1A26591D13CD4 +6D6425CA7933769B842192858D10998509396829263290A3A7CFEBBDA3EE6CDD +DF1E492AECDFF7941B53573F01F623CA0A5ECC9D05A3D0954F7AE8CE94AC3B2A +CD4E27519B2E16F033EB732AA024BBAF74626DB55DC74B1FDDB07FAE98B4AC5C +683CFD8744F361838D343B657EBF52DEEE7AEA7565C5BEEFE455DDDBC4DCCA7D +87D6D769C5ECCF14118A14A85A86865777C8E28F953160D5E82844AE54D541DF +550D5F1519E183E0C42BE88F0458CE8087F2CD4B1B49A8E9E3D127C4A4CB74A6 +2E73BF4CC317781D03FF04BC36AC0E4AF99E2ACAD20F6F8029DE8A035DAB40DB +17D237850BCDD05931FF4B0FE2D0B79EC5A88FE0236271CCB075BD194AA25AFB +3FB93A5206F61A14602E4EB6F1C31C654527CE0C02D04314DF9AFD710D0EBB9E +F8721B97F5FB18E27507E1F800B5509A58A1A8296C72B7B73F99B6CFE42E9C2F +B63B3555475E562672645CD374BCDE937A9B05A157FB3E74C8297507253E957B +1A9DC421946734CEFA3D5EE357DAC7E9DE17A5BDDEF6B2D2A740BC58128FC514 +61154664412BA1C05209EC992A77B7CA45AB7C0EEBF590A5B5652866008CDEF7 +124A3003AE6A7CF9DF3C72750CBD281358CD2FF25B162B78CBB971DB3477F8D2 +ECA3EE9CBC90323B2C236E375337EA0848CD7CB5781A2B0A42DE7E4D99DB2746 +0B26796CEE129D23C76794B7CE21C13C7D4A998B752C8CF43A4821B736EBE246 +D2A2BD7BA3351FBCD1B0A501EC1EAABE60D06DA2FE39BE1F0AD629769FDDC933 +F9D02F9686EC8C2D7455C26AF4DD3F6860B2289E3A30E1C254AD17D731CB73B2 +BF4DFE90CAEECE3ED0CD3FB4C8F4C7BE1C056AB4E9B95781A8968E3CC1010003 +75DFBC4AB9F6B27C5A9AD88D94441A8ADF09EB275E5F0E5E6F3BFEA0FA8C308A +8593ABA0645ECA8FDC3F0E264B35D4B0DDB86B93CD8A047FC409E18196B501C3 +B003622999C47BAC04FD1ABD8AD359C977766E9643EF3BD6385306B08EE3E13E +7DA5A06AE33D17A3D574C6390DB6E9429754B210F0C349C359559C7EAA2350BD +F61D4D8A92B1AF697BC620FA0351E67E0D9F41A95A47EE0BF210C2C48691901F +F905F65693DCB85BE412F097480F6A7266AE0A928729DA0F691CBFFF3B276EA7 +322BCD2206D96E3DAFDFB992CA8F2955F0E8B882729DFF840569D12E4DA1775E +523AA734552AAB6F2F16B89B39F1A3FF0E07EA08D13E612F201716C67F327017 +6C041760DA30374434808273062C1FFA2C47B3FB578807BC26537F542040FF77 +66C995EF3E8B08B09FCD3EE89C30F157158A739606D2CEAA26694A4F1CEA6633 +B54933141CB85C60AB262E2D4E824A3B85C2BEF810DD774F296AB37D0BAE7182 +5648CD18556ACB124246A75474B232D712C2358908B5D9A76F82C626BFDE01A1 +093B8FA6AA0B32F2CDEF737B28BC0448FF816DDB5812131DA0DD5979D77C3838 +B978CC3F6778A4BFCE9A7087EFB19749285AE4C92B99A6649DA349A2E0889D72 +6D4FC664522F06C8C4D86D30BA43ED4E42211217D01636A4E17E2A132D26F394 +EC34EA12D84594AED9C6CDBBC0908860F39B240FA7D7B3003DB10322498691CF +A294C0FC7ACC0BAD1EED3E9D60AAE3F7429695892D1A21CEBF062C6129B33966 +8B2EF6E932F9891DE6028B81C5E9B23278D35B7F0D83989BCBA25E20E9D503DE +144DC485F09A4EFA1268AC5E4B551C5B2F1D51E9B9B9C0FEE585204F869D0BE0 +7287D7570A12940A47C1F51AC6134F03B415C30E147C49F89228855D093EE55F +172711F37776E97A99CC4B36E2F10713E36FB279FD3FA5A0EB9F3938F42E2BB9 +254EB8F0C0F30391735019E02BFDA21D9813C6A22279B898EAF01AA892B14DC6 +5912B9275167AB46EBC420836CC1A5F38A4EB47C039A7BCA62BC3FCE4199FC71 +011DD6E5FFA0F3D7F04AC02AF91B9249B9F993AE346572329DA852115BEF8460 +B94690E790003586F473F37EAB5AC2922F5F663EE2C3C0C336A8DB71650631AC +0A923A389AC911CB215EC2EC7D50CF8AEFD59EBFFA53A9F1FFB7E6215F17093E +3975F186FE23BB5FA5474C11408FABD223E1E6F62035B5A5C1AEFD8899F00FFB +E729C2D5FD551E80716CEA4E8281660286A802AAE8D5834F37F2EAC46297E57E +993B09251DD7789D3467417E393B7DEABD06676B96241B0E43ED1A1A9FC3B12E +0D34B2B0792B79AA648FE9450C3B209FB6D7D91F50C52A5DAB0BC81A8B698BD9 +18946EFF691912D7348D48FE68CD876FC6F71F81165D0C3272DA1A992308D9E0 +ED6D0A4DAD679AF495F62B78D462B463BD4A40931172290C615B3B3B6B47E45F +CEBB85E0A6AB6832067CA6D403C239530D07F199788AA4DD52553836851C5228 +1072406F6D7323A334E7A7FCA588897C4FBA6D4F7DEB65525EFB74E539C988C3 +A685A98752F7198E77E456A545F0D23A1BEF81EF58B02D289CF980A3F17BEC8A +6F83DD90C4A917EB0E5E2B444A608E2E9D2FF80620E16AC1D7775C0A10C1299B +BEE0E1AB24C50647E5CA1DA65CFF3B2C295F0644CA7826E1DC6FADEA93D66A20 +DE852F20AD224D28DB900519EB1569837139C833F24B799F7EBE3FDC14235323 +1D0BCD4991C861F38DF413A5A5588B73AEC3BBFDB885CE17BB3E97B4E6A79761 +93EC8418C2BC4725CD61B5E30C07352F647C3FD50083878C13CFAC241DDCB082 +E53703D182068727F9EB6FACEC25F6D901D7309ED7370867E34E267519E22D62 +4FC7093448BD0D6B1C43D318A3E14C92032325C132AE0FF7ED707E1FA4A955FB +F5224BE0045CB14ECC321D0F333FE24EEFCC504F7C756451D7693C3E6CA87526 +4912E1B6DB935BDE76FBFAFCA4ED473F1D2618812CFF25A6859C626A216603C1 +361BE3E071FCFEC2D4BF2FEBDE07DBD56A1BFF8303901168FA06488BA6B76F36 +95B0A90D7724E9ADB567C2ADC65CF3482CF47FD1D16F70AA19A97D0F9EFC611C +AEA5E1ACCDA7FB2DF05E9480936281484BC329F0B771775E73F7FD72FE3F45F0 +50ADBD03932B38F37A8F0A66B2F739EA3AC8811C8F514E68C5643E4AFF485C81 +88475A523D7FCCA5C8809BD49846C77795A38DC6406082000236A4D2628B5932 +AB7916D44EC2210CB941B1455867E510E9D8A0B83CB645BCABDCDBFCD51A4E12 +60CFFEF0CCA548F654037D01CD631FC4E1F97B4F65DA9AE79D99F13A726E93DC +BBB027B7D175FD17A704C4668F6F8428262959DACA9F8C687C923CFA053804C9 +9B2005FA7E0F07D81E52A9A37AD5CEBA8EA63929093ED0DAB9F7C99C82A50E6C +6440387049A0C359218F5268C9A28F581783BB9D29E08772D7252FAFA6739687 +22570150178893C418531769CB3D96F799BF1C6415820F96B6EFAB5344E82796 +38A0DF66609F5EA332C1065274EC93027D264B84B52AA8AD82E13E2A41AED340 +B240D1888CB89FBB748FD10B214773D466A44AA2AF44371CA8B9A4450DA76EDC +0167B4015A270B9983B89EFFA023A3DFFDE181B90C51D70557B08444263B84F8 +A2A807C55D74265931B553F6D7F132B110DDDD3361BC9563803C888B89881DD5 +09E1A623957F074F5B3644BB3F93D7F96770C73499AC0AFC3D7157EA08BF9D15 +DA7739FAB528A8BC30C0EA7899A3193CB9E8EB51EF67DF4F97D36005EC228B30 +E54D14471A6ADD6DFC0A9E18243743457F55C92DC10202632F8ED3DA25B4EC18 +A8602DA1E1AB8DEA6778893BA825CD9DE6E52089AACB336885882690FFE504C6 +7C0098265EDD8DCF06F07452CC311A8B516C61EBE50214B11B72132EE0033528 +13181B4280F37E2CDE07919B43D2120C22971BAE4821E799143EE8E2726D21A5 +E8728B8F0768597285E8420B583BF7E84B02BAC1991ABC1A5917039DF9EF3B8C +86C9A3CB4F1666755BBFC2E5623339D0ADDF433A6845728195D58C7AE4C04487 +F42B90E877B053AE9A6DD19B8910851CDBBB0702EAA0294506CBBC0A9A1049AE +CB08948CBFA5E8F07D51336C68A034893B6D146B0897024D482176B14FC63C97 +1F08988DDA2846BAA3E4EA0084642063BD71B165479641E15AB05BE6D9598891 +B18215FFF0BF4BF195D34703919C1DFB595F52568E46ECCC2855F69A375C25D5 +10718CE804ABB8C07763C09D9FF6A363C6210E108AC351864AFB17CB5A4AE336 +B582016781DE6A38EF6BEBA595FF4AE88B8C995D96417152176B66F9180FB6FB +5F6D7C6CFF01901E954BBA64CDDD83A0ADA2FF7CD6DD1EC365080E5159E51E66 +E2B32369F28D845BE68AAE8C67C30D2CD4E6ACB627A8DC9568CCCD414D85A2FD +CAFE36BD8991420E3672E2812D9ADFB4B7FA0C0E027503B6FDFC245B725D7EC6 +8AE43F6C8B168111F7E25DEDFD64AAC0BC8776F2D257A3AA8A74FA883092E4A2 +A887EFBD80EE15DF491C5D43D0CFABA834C11583ABC8D549E1DDEDD1A1A3CD5D +5659FC5808D20FF87DC95BEC80CD71B9E5BE3F304A1A03C2F666597072DE657F +75A1AB1193B5EADB81D92C4E4E41648666F0AC8AEBCD484D30FBDEBDD87E6BB5 +06265B9C04BA54625207A13FE4B6F292D27C3014F20FA77588CEC44C3F67DC59 +7F9A77E3CB226C5CC7167A33C006AF85B806097DA22428AF5F2AC68413EF5F44 +A29A02773A2E0C3116B0A016E5D1F5B212896772ECDA058AAB5FE55C60C89AF1 +0ADFAC6A1EEBB828671CC95C7604D4CCB1CCD89FC758131645522626D280A8D3 +B40E343B18EB52ABCF3511C9DE75D9D10E91FD5D780D5D36E484206EE99BBBD7 +FA03A5526800EAECA69F8B9B62E25017576CFB81783F420DCAED6C94CE71E8E7 +CD158B8F7DCA917ACDC5CBAECC9E0DDBF21BFB63DE462B810031D61B385EDBA3 +5FAC4BE68B0442575E0FB9FAB7113797A7EDE04BB699EAE0A23A47009ED0EE95 +58637EF6A5C077B9A0ABDDC9267290F878E80CF79DC2E65842879F2A7AB9D6E3 +0E296776CBDE5DEB9EDEF38BD020DFBD31379A6FED182FB3A0DCCB340A70DB0D +81280D3A0D373A2E672C68D2B2F08AF6061917779FE33419F77A5CA2ECF6E46F +E11D9803E4BAF5A7D0971F6708931CE92B5F83C998FA4716B73AE9A29E6F732D +A89F2A3E686DF93E5DBB6BC6C45C30736081395456D16E25AF42B0F8064DEB21 +2A9E1E4BC599A18E08955209F5195DAE5217F8189CEC5550C1491EE792B7F6B9 +BA2EF22477B92F0F9F6FE8AB9EAD6D6206377D202660FD7FB4BBB21C9F9E289D +D8F6AABC3862D7CAFE7AE4AA3E02B154749C029337C30E0E6452A8FCCB32B0D3 +E8FB74DC71D0874777F5E78D71E8C3D9FE33939CB3A910651438ABC55BDA1906 +4432BA1EA0366DB8B07247E4D1E5EEAF6AA804350D319AF66CCCDEB1104541BE +4C621C23CF07173F423D277173989655AE4EC72786203E00B223F19A4A1FEBBF +7C48EDEF9252AE6330304B5A92DFD8B3BEEEAC5CA058A9F8562E1D016CFFBC02 +539B46123685E87FDCEFFEC42D0106DAFFA86835667DAF47212A9B715DA7A446 +FDE048EC64661262495A7A9D01EF11109EDDB180C43EB9DB662963265EBCFAF9 +5470DD411214CCAEC8AC7F182DF8BD93FE984E1BFA8A1171F4619D213EA9810C +44C65998F3639A7278966684A56FD3A83060A36416430CB1CAADD42112E4302B +E3331562F5CCF6B5B68B60851AF7EC86B534CE1963A2149D9582820E4360870F +8FB29E163121459FACE85EB665765E6455A2D719C9619D55D60DCA65D46F1EB7 +3A5FCDE0284F82FAA0A49ED106D226D7C0052F647F0904556C4729D50455DBFE +7CFD9F8503FF76A117DFDD2B28BD444DD1B0EFDA48D1F6C2B26D805BF4506D7F +167850D37D16FD07CB5AFCA2C78769292AE449D53AFABBDAB026162AA850F133 +96D2213EEB37C3CBD535554FA70AA75964F357A5E847E63936740D9AB95B13D2 +90F334D8FEDA273BA84C7B370FB27D4701598BD6FD563DBD3A5F7B98FA97A9B3 +3E1F87D9664D7AF53A3B7CBFECE3A57856D03C766F8E1552EB33E441AC3AA6DF +1DCA2B9B577B646BEF8F0B25C3AA843939CD0AD20E0659885C7F8E488D2E8E4C +437ED072CCF065697FAEAF59D6D9E83592121D9B40A202003126983D7E169094 +F7FFF67C8F1F0B9F5F48C616BDA5C100804F8B9E6B4824949DC26B4634AA6C21 +E2B1B891A55E5B954D7987B7E6E3CB5E0FC645D7D0B8F7C627F5C642F4DC0453 +5A8E6494B9F4005D2E5F3432D7418111F730707FA9A0623AE971BAD1AB5FB931 +5EDDAC1DB70CDC151BF085D241202D7F1692A45BFA18EAEE8E8F79D5828C9592 +8D945F5177DDF3AF5062AE044BB523CA31378DAC15E19675497988764781797E +2EF746525D1857B45A0FDA679076ADBB5C4C2644A29225CD1E15744B1635B21A +D64C21EAB13BB8EE8B2759504217D8A06DCB690080DA7CDB2D9BC5BCA23017DF +3C73811C1840B092E3AFF36E3F322E3FD4B6E8A6CFF25BFC2EFA25940FDD4985 +F3D447E20960EA675B7CDC617974772691DEB833CED5F18D98FAC99B1F00CDB6 +EBD9E77A98413284C98E4CFB3726987F80B8A82DEC86085943750ABAF974BFF4 +5348BFF04DA5B9DE8238C13D8937427F03C1CDEE994B0C6ECA9D6ABF474DA97D +F34ABCC065173765858424E545421E38E79CE216F4FD5791FB51DB485D1467DB +0EF3A6DB914F763E3B0FC6BF0AF856A0C2BEC44E875C6D6D5A6AD777DA3B17A9 +91A9825B4C3C0AF1ED5D5F43036FE58CF48106D42825AF00D193BBF3B8465BED +00A2267AED6A07EAD4F5747E1EC018D2645FC78EBFE8D5C49FE792F33DFD8CB8 +CEDE83AE62B5A3112C6F5693A6CA7850D01F2F6582B00E7F9F20672C460A3B80 +09F6C9BBA22780BBA997534DAB7B0FD5DBE4003E3FFE8539900458CB905FB0D1 +8E76029048C7E070D2C24E8840A3269EB340B2394D37B3628EC608366FB2A695 +7FDBE02249D82AB905AD105804B6D8E912F2BB7C9625F4B09A7F99325CD7EBA9 +E7083842781FD5746AAF7AEBD6AB5ECCA4D5928B9913D360AEA835FF9379A782 +7B47DC824CB51E77317540378971D2AACDBBE242BAF561128AF71E639F67ACD0 +B04251C644C9C9B26C6D1AF06AC685B5A0D008EC6FD0105F64976613BFAAD28D +83AB4F5D1CB5C570AD134575EBB95781C701BF4C9FF8C344251773C12E1C0859 +119108448094F41E3EA84BA93A582FFBF33CD086F1FB78AC26E44858863AE3F2 +15DDBE2B9C27D8484C480EC74C1847E4DAF520E507A6B5BDC786145EAD85FACB +66900381C821444834B653F6D511AF6553FB221112A438BCC8193B330881027A +908CFAA18E86A2D326326FFC25457C9041BB23701584BAE3FC9185B4B5AB6956 +D8F2BA841F98B0B93F8144B35234067B12FFFDD274DE40183837AAFFEE380CD7 +28DC181C76DA7A4AF637197F53A931D2666E751A2B899F20FFF9FA312A1A79DF +E04432E4D4591C525B67D008DB6FB611CE089A96D25457291663FA9F264576B0 +74A5AF80BDEA1D411DC027775EB5F1A1B135B5E5ACFACE7EF66A2EDBE90771D7 +5D52FD964D4DDE1C419EF7812B15EFBF7481F90F44C276CB3AB69FD5C16EDD5D +41A3F665C6B86CAA2F7C832AEDE7CE813DE65EB0424D45A721CF7CC7E2E2ACA2 +2F0FB88F1D61B60F5B7557BB94A88B94CC15BB89B9E67B1C93156586703EA237 +398EF6F454C70B7F93AD86E1CA3A722BAE4EB6912D19B56DA223484ABFB4C863 +AE40A43BCA384B6FA642B5FDC1877D993BEB7DC9C572B096F15F33A5C95F66EE +8DD97A03EAA53F319C3BC9D2F12F0AEF079256604C6DF649E264EDE6E30E7828 +7B74BB86578FB903BA583C955B1A4CAD417073145D7B2405F03AA98F989D1C90 +8C3F625B28B2B5A8BB5C3E97DF05017B0DF1C7E32F8203556EC952BB2FA045FD +76A9903FEA605A8F03BC4025B4737BBF8C35DA55D0DC2E2DCFD8B9D6C1310AFD +481FCB0AE96095FF7E54BE72F713E00C5553B95EB23247C8F17CBCF9D76CD146 +86543993C53CD843B2284EDF996A0014140A2BC3D6B7CF1883541F932CF17A68 +09030CB936AE925C6CEDE67B053BDA271A427CAC85EADBEEB559E50FE1983DA5 +69476CEAE07BEF681CF40593806F3766189536EBDF92AC72270EBAA9DEC38C82 +8E27F56DC72BB45C38BDEF1E809B69E8C9A787FA37E636C678B7684A74B718B3 +CEF980C3214631C7E89947CC1577259B3E7ED37BCEC9622538B3E21677C48974 +A1F687EB3BB9662F88E6A3D387C9A30C30EB4E206F586B4A90B61729A84A612B +395975B134FEAE92AA05AF675A9D995F60BFA37FCA4D098F91B9D0854B0D1992 +8A3DBA87301552C291F404FA4F590243B24E3D4C6F23CD9874D4EBEDCD51C1E2 +BAF3EB9B690ADE288031FD6481D5C40044F71CEC3AE50F6704D9236839EF9B1C +7FDA3F6E4039FBD2E5B99BB31573BDDA7236FED53D49CF51E3D4B1EECC9F530E +41E5FD3099C5BBDE367D1ABA42A476DC8C7015E1E028595994748D526E2E1D78 +D8DEE2625BD9EBA9A23BD4FAC1BD00DC3C08B078F96F4252843A566B22718B8D +0D4A3B7FFF310A76ED12B345A3AEE2F6C8A1AD394665A6F8C9EBD044A4AB0706 +958E404F955C4E46DF196E1C9BD16E47D60D4EC935864D1A922A5F08DDFCFD34 +21285BADA201BE83254B4A817F7372B64481B3929F1292E12BC91667763E382D +66720076AC19BF952A5B6A7A36D50338F256119F85E44093EE26D7EEA0DB0A6A +2D11DEDFC942EA5E22F4202359C91C65F4B7623EBC539EBA75815866CC964AFA +6369952AB12AF0F7D0F3BADACE96BCC865B4C246D392F6D118CAD444A97E6F89 +3100F3D786EE03431E1B3F1F45E2BC45AD0EF659667E757BAB0E7182DE558C8F +4CF615B2B286B2EDAA9B8A28312DDC1E586CC1225FF6435465A4AF56CCB2694E +B131A72BA2650689E03239761A264AA922FB6544395D991C3DB620F50006C140 +4258D85225E8013155B4531A6FA2017EA450F77F91AC191C50C1A2FAE77B1B05 +F40339270FF24D91BD842CCADBF9DFEA5AA13CA2C8EA069A242C93A73B9BF6CB +5C01247F02AE06329464E02C5A3F6835C3B2A1F110E0E72D907C8629DC0219E0 +4BD43EAD38454B8100021E55FA294C53188B6323F64C0042CC2F9728F776C99F +66B34990B279FD59B4AE356D1DB317F18DA66AF2E12EB5C9553D58BD075424A3 +00BFA49F981FBC0733F388710A62EE9216A96A959B700B02FD79E2174093D6EE +30E5CA22AD61E0563AA18865E47A4DF8FFD40FCAAF36FA72136533B3184BA684 +87E2C88C4A8F119F1DCC5B7CC8BCA31CD23806E08CB77530038FB09CABC6A035 +E21971E5088665D46747FC3D66B0626295252642C833862FCEF1C749CA6B6199 +738198327FBCD7DA364D6F0AE000DC56AA44D8A7D3E74BB7A7C91B117203257C +1ED384C741B14E526571B06E3665865D89A494F32D78674BB62063DF2A48989E +12293072B16049DBC1AAD7EDEBE0DF69F69FAC857D950BD962E17C8BF097DD63 +DA98E41A07C1C299FF834D41D6B075C8802E1081764B017809361A4C1043D141 +C340AA469642D10EAD0ED5F01314CDC9024EBE21924D5488B9FF775934B1B563 +591AF1D8973CF814A987637E8C8231653036AC5714B74680F23D2A41770C1E02 +22659A92D305AFCE2AFC973776939095B142E60375D5CC0AA54CE490BDE293A9 +F19DBD653D7BA4D9C968FDDEBB95A0B6035016FE534D438DD0BF26336F83C555 +1BF5AD6CA8F02CD063CC67D2929D2B6ABB42DFE5FCEE51D583155BD8FE72AB28 +BD423808157195E0293F75818ED5ECD68294C8B6866948084078D83246E9ED70 +38667D6B3398710C5ABC172F446AA0C5AF3F4023F08CC22D02E51D804299A12B +9503C2AA055914AA5DD5481A1B92CF8F70BFED758B447EEB256272CE393FAB8C +08F090E434EA61838AAA3CF02356D5EA8A8323881E413579C55123F64E817D51 +7504A8A473E7D6C39662B665556F9C5CF0F3DF9D42C0C03AA3FBD95DEAF4DA64 +B41FF342092A5445E96FCC6CC910DD9EDF8DAABDF255814A0D0D874B03D3687B +1441639C03FE3176093361CFF731478E609E4A86AF8810832EF983C5EACE4CF1 +AB8419AE0655F8DD18DE8E68F320BC1C1FA89DF622A03866E8AC8EBCBC336E76 +8AF4E24D9D53E0003E4FEE40D4386BC59E6FE3FB13AB6FB94D28FBBD95576A20 +8F8ECFC0952959796BE533D4867224DFC44D079FB8166AEF46F118CFC1B114DD +C87AA0156DFA28A10D8599B40588E1F84907CE0300C7A8CF3C6DB63505A79D04 +1AE29BB896A6B2266FEFB1CA6799CF384B1113F54ECE96FB5C8C90E0B36367AF +5E580A75E1EA2278CFBD60956D333FA75BCAFBEB7FA767EB960097BD38D4F4F3 +E16F00AB29674C802F1EBE7291B4452664260992AF6F834C1D02273BF1B3EA24 +5D6CB3D611F1A99F27300035ED706E6C3D18F56C7CFC472134A96690FCF476D0 +6843014794534851A4CAAA547D5DC4AADC3D94A03BE478FCDCE19CB05BC7CF54 +8B88D9698141D2309327680139F05275D56D025ECA13A25B3211A0F07AFEFFAF +2FB4A48CD4CC4915F988A619C6410A2E16B031EC19B7FDB904D149467F1D295D +6777FDC0712AA90E529D4768339EF966B5907B41CB1258BE514B39C8F853D28A +8951224C1FD0EA80D19D0BEF548A23E70E9D172A2FC6E6BAE3900D81D4E6C530 +1317BBAC68FFE952F47EDFDE434966B89B9E6DB348C6D3D8D10EF6254AAD9B9E +427FCA129A3867C5A0CA1723D4828F8DB1D99774606CC00BEBDB15E02A88F7AA +2B3F47F420E12A5104A09D6AC903E0C9C715BB99A87DBC453829F2ED8CC6A934 +FE875D5947EB0B7C5FBF193769C209CFB55AB5E331DA007C22517035295F7833 +C5F54040629BFE9CF0FD9FA9FF10A7DA143138CE41689004557E0DA6A51349BB +9530B852DBB52EC7FAFA39FCF8381CE3419AF0E9E6D69B14E5020C8DECFB66CA +7071451B87A1FDD2789736E5A3DAB0644CC9727B58529B5A807388CF904C1BEB +8CD7B322676FF8B7CC6A25F887CBCA97DE6A7CC53DD7142BBBD1FB447634E2A5 +E52158C7CA2951E87722298B50ACCD1A381F3FCEA2B8669026C751898DFBE999 +49B86879D78B50F5CBB3FFF59FB9CC55D6C0AFD190C521C9D087B8F0C34B11BE +7F5C705FCED255F6376E3A86A49B49E8059406A6A387FA711478EAC4007E5D80 +C907C72BCB7DF583F76B6685ED9B4262F607D69B23554D1D275A03692D5DFE85 +5002120CD7786263ACDE7CA7158644D8D8D78A757182C03620DC5112538E66F1 +61B30CC11B60AAA0B1873A846DB6281D7AE2420A76E6F66FA5D5B288B8888666 +F707AA8F77363AE3C2B0BBF0577D0131F0F7FAB358AB10A0511605B28C5402B5 +C5EA4466ABBAC85601CF8E61101D80F84D7FD7629620B931302E14E7A89B8955 +41D7A89413A906399D5E375665A4C24DEBA6DFFBC751E23F4D17642D391A4626 +F8397EC5553572023B0F57D5430E35163156F76CFE24442D041B6FA0B44AF48C +15FE0C8C9CBC300AF3A8BBB79B5BA6D2D1F45A294E201DC327BCFFBB5CBCF384 +CF4FDE8C9B07874E8C954603C4A4F0EE585610B19976F6682B41FE2EB56299BA +25EFC2604FBD73F7DE1AF858F325DB0D1FD2A3F8965A1DB71CB68C23ECFFE678 +E08C34E52C0E0B4F61B2CBAF3E765ABABDBE364B31C5C7AD94BB7CD5C92AB012 +43DDCD9A83C43F021176F69945AE6A702FCCACEBF5DBCBA63A92D82453DE824B +B240CFF9B29DF6677D635BCDB3A22DE9F1C0172F32136BC107A1CF2C614897F5 +D6D1C35B2ECDE7E0C8D8BDBF30944D46DEDBCF50E9C45D49A4AECDD5E079BA5E +4866856A603494B605E4E5BE811E626B6A5F54938324785CF96240C12CF83F2A +5302D5588F54E27486A9BB00BAA9262145DA0B7A1DA5E514DD6789692290109C +3F6C8C1C63E49C74BBCDF5FD1D7CC7CBBDEE68BDEED59DAA8BF185044C159365 +0CE5077F69F99A1368365057527484D54BE5461BE90AD66334149EDB5EE3317A +E9070F453CC27111F223C18081AE540DEB5F17E1978E28FB47C5033AA48E55E1 +AD0574F400E446499C63C0937ECBC03CD00E75355E2C41BCC160FB1D793D0407 +355BE741FF520F35C41C0EE6F7FE36065F33B4E30C6DCE227B4B514A575D09A0 +47A0BB2C03240393E73A976A06C6FAF22B9EB30619149F05E9B65F651F8E6199 +634F9485E2AAB2BDED709E56126111165A08D0171538BA37E325A173E4982BE2 +55023BBA920F46060883183231565C764196AFB26DEA93056F0FB140630E9725 +1EE72FB4374FF43A2A8E0807B8F77EB429B7B9D5ABBDC04072836F7EFB4DEE53 +26C1CEC5F6CF13334B84F47EBD1975A83FAE789C309A9243919104C844B6220C +F0FF4E9C6E693A6E4EB2D260D7DA96FDB956216E30C5EAC29AA568894361FAB2 +F9EEEDBFD197B278BAB7F2AD3DEBF46B0B1EE58F005132844C96171806BCD864 +2FD40897CC3E719856A9D137B772AFEEDDAB2D2B353C0705EFEDDC42D169818F +A2D0404F7C84DC9F9CB7527A36F7D8555FAC44AF8A91E872985FA0D758D1C898 +35BE8560D6B584ED66CF9D834C9EA63434575FBB33E54554D9E4B127EC94F55E +7B761616E717A84216C8BC656F79B0E567553932D9F30D3355A30BCB9DC8BC80 +1779D6995E35B3D97D019601BFB970E3CBE8483FF168860909534621D8873D37 +0073F48FEE38F40A8468FC016F7F76E6E1F09D33DD992FEDCFB2ED3860472E84 +6204643E41699ADF19440FDD4F0DCEEEEF52351B782DD90583361B7B8B5541BB +61D25A5AF18FA9F70C599F424C8F9DCFB47420CF4104120FC6F9EF03DF7133FB +27ECF4D848F5E067A27377985CCD10DF85D1E517B813DAD36E8A40664B352FAA +184A8DA90C0DE095DBEF531A2481BB31996107FC057A9D6263514089FA589C0E +AFD82DD4EFEF08B80F0F5D91B22E47A0474E27A0EE54755D6280AF36D52E0938 +C57614778147BEB2E89B4236B540457C7FF03BDB6C6978BB69584FCB58AE4625 +CE733497EC0DF25BEDB7E116C6C5D3FEEEB88D771D616AF3D050B3FA5568F6BB +0752DD30E42B427CB6E6065CD968C6257F2B325F94CC09F5729FD6FD3797E1B6 +C403A0F1B8F3784A856226E64EC3FDE9F4837B512BA76F78F781E44888186DC9 +C2CABDCD59EC4145F6A70B539A55941E830E6237C72AA0B9BF6EFBA37C0DA4B1 +CB4A72627A658600CEA384EC9C5B0CCD3C1ED49530A29C6A6091529CD8D6B2B7 +027E5759C87D353F4090802F13CCB8BBADF1AB157AA24310AA275F0A4FFDA93E +00E05E4E534735CF2E575DD02FCA3CFA96A9896451E9C0365CFB4952667E2CFD +D46D3ABC40FA8F73EC68072FB5AE920E14B37C19FF936649DF5E8A978E9DC653 +FC7DADD3C2DCB18A1839CDA3653470E56E62230A148304BFD323CB1D39F6B50E +D5444C8608AB03D73183210E6F4AAA2EB97005E0824AA42A2ACA2732A58B1D36 +B1EC88C9C5E2848AADED90D2F1BDA936C84263BE055793C553B986B73FE8A22C +1AD099E1D845D5AA1106670C003D889E169ED1877DC454B7601112DC539F56A4 +E936C65227E657BE26FEB41C8E950BCF54224805D9FD6D2516C4DEC09FAA3753 +262B0A82357EBA2978E80C291B267EE5FC19FB8B6BD509DEE723E032FBCAD28A +658F6516D60AE9498A14E1B0AD1FDDC65025EE114FD73EB506992C1FCA660041 +98B6C72AB28D643BFFE1160F600543585524AD00C04BA1C54335536D65B7C471 +FC823F7AEF385E4A013C4924750DC2DC8F12388029D0D958368C15B9C19D718A +AC77E9831E75A330583871159AB63A0332984FDF9D0498AFFD678ABA43FB885D +EB0662034DCEB9576F66174254B26CC515DDAF9EDFFADA446BB02E356E2B6499 +C6B7F4BADF5F949F6E50CD85E869646102F2E5222E62405A4798955E7F4D8018 +050125F9F5F1D8B2AD8F4A6472C2661DF0BBC6B669868C6CB8B52D528F389911 +CD58F5AA9592027BE25DB1946ED1216F2E915B4333AF69C8C0CCAEA467A46376 +D0AC46F291251D3B09883EFCF8EDA7386BBE03A5DA3B5F2FEDE4EC516FDCD92F +12D72BF6C7E690AE3FFCD13C587D2A48574653F562526B0ADCA0B701BE848951 +3A281BE4957189FC236B8CD68FD182FDE918E5C7FE2EFE91C4E6573BD9D0F0C6 +2DDA5F477152DBF21676DEAB763F441C7984F7650920CE6EF3DC77D707F8E03F +622F8E97AA3E7749D080FF7CC0FD1CC561B84714BB4BEFF4628DDC90711AA7DD +6EDA62DF8F73B9829904E802D8E0D60AF8F06A0DAB973B4C6A89020D3030B61A +D8C92ED9D14E29AA92C5305FC4687061998CF71056FE50AEA39BB265E6DF72F5 +F6EF4287D4DB779617F1CFFB3AB1E9D9DF73512C86CF2A82354749586EC9F273 +8CD928A02590A5C51CFB2FBD5F5CF25488800090376519E4A5CF5F0D1FC98BDB +101ED47F36A3678FBE57A31C09FBDBE605F0E9CBCD3254D415061AB3B9E668C2 +4CF41E833517AC0A07C3A0AD412E608CB5F0996D27E7341A2C637931B1BFD660 +1C330898C707F7323B1A47A6E6794AA94EF07C99D9BCD106108EEB903549140F +31D5E0DE52FA3FCDE78C9DB6F202940E69F86DA4AFFC8974D669A8802E6D5C49 +D60E640E5433F7474BD623580D24432927E6919E575FEC9FD044398D6174DA64 +7E6B7B042777003E55C4DF4981DC0A45B3AC04B1512380CE39B97544D3420C4C +B926016CDC82F5CD160FE7106DB362DDACEDAECEBD20464513AFA156038414C7 +DAECA2AE5D517DC2BE95B0E4707E0B191B3730EFB539CC0D3B80E1CC7B6ADCC9 +1F142222BE572124CFAA7246975BD131748A110B0362874FB61D91EA94A4E330 +B88C30A9CC1F7EA5AEAA12018A02EC5681D000A889B19641609A6E712116B7D2 +C7A04AA207CFE9A619290044CC4BDB7979502B5E7182D742DB646A923973EC3D +04382E589C9FDB590D5B25A1D414060802E1251E1F0DBED3B2674DE3FEB7ED96 +50AC23B0E3D9E44F2904B064D06A002AB11A44813BBE243F907681F6A5B7E4B4 +2BBB1D15AA391977FC0D644B9E4EDDEA1F6593F9D6D64F30F1F8DD238E762E53 +CC5B588DA5014CFDF4E281A34CC875656BF31B1ABE80617C269D3C32EDC40CA8 +E354DD255A369C4DF775C35EC9FFA8941D71FA984261AC1BE8C09C5B656658CC +CC2AD41D7CCE283A5530AE8DD2B8D03BCBB3B6B3696FD601C563289526310DBA +FFA90463815A687ECF1D69F69F7B449AEDA02A15E1A9227B0FEBC29F6E16866E +9E0FF502CB87D973ACC8D1BD08B5B76798CAB1A5D8A17DA7CC244EF085F080AC +96CB5CF0F0B2DCE2A1DB769A8777C971A7A4550C759071440654E195A7DC4044 +F60BD207C81295CA20A54903E0E2EBA0726C82DE70F2880A52198CFF2AECC6FF +0DC562A031D56847F6B8E3FEDBEC86862162F3E982169743CBA32DCEF2DFEA24 +D548A862DACE88B14677B0657420CF60E9E186B35AF3863BE4A9E5455BDAE62D +D39E6C7DE4B3E079BEB082842A1486DB5F8E759204926F146037DA7A77CE50B6 +8C29BC9B5299739FE52778D232B44833033A7DFB300429DD002E14F37EF31D08 +069B7D94E70BD31F90495D237B4F175540B12675874396FC75F9D005497F0424 +F68BED0F8CE28AFCCCDE87BF0D0F5301DADCF69980812F989CA9A7642FC5D50E +0632D79277781F3CD9E014E9DA160B2A56CA7EB621EE3D89018774B34E943F8E +EAC217CB05EB834B562B03CCEE6E457C681692C54339506BC7447B943D151012 +93F026765C80712D5398D3EC320BD4864BBA9C4F7242FD066CEBA54390D119BA +C3A15E45CF70E4999BCD0BA14FBA7C6480DA52D9900CC36DDE18693DD1FDDCC7 +FB5BCB5328E5304C0B3189166A2D7F3F3EFA16A4D8C8EAA30CDA83EC1BA519CD +C6CDF954A680DC9487D5397201A20B1530AC427F0DD32A17B8823428E4D1AD8C +8C512FF0F9576EBB8639852BF36E043E302D19A3B559F5F43D4077AC0F9CCDC4 +1A0B6BF5A5F657CB0378772D7476027E060D592492534DA6CFDC84639FDCF136 +036EAB94BBF6AE2A3302A6640EB48A537B579532A557C69240B5BE6DCB609E65 +B248336A2F7A326E85B9651659AD493245223EA204DC2ABBF33007DFA9307E34 +90F924B657395F3622C5449CB9965988E90A9B840FBC2F8B74BB2151B50467FB +0478F1423A776F79DF8AC78E999B1D6081A9B83F714ADABB5C548CD2AF4E9EF5 +A631BD50FC51817AED8EBC6BF7A46767E562BA211561347D89308D28FBC7C04C +61A1324C22E2352DF95EAABCE7EC3ADF40B863589557962D4330F443D0A14F5C +F3DE678CC2C45E6582F47F4EB36EBB12A73B395149CCDBD9A92E3E7A9EFAC658 +13AF608A3BF637A36A7318A342FCC9804352E361AF67436E7B4E6361FEB8656E +6FC5328E38D8C855BB6994E602481654E5372BEBBCBF48C63F6CFACC9F3D4FD3 +95B963ABCCD595D90C427ABE71671BC690DB170494938B4A9B8C0B329C4B0F65 +28B3BBB68584C7CEC9975566FFBF29EA166441185340639DD0FB38BA355A969B +1460753D46ADC2B94315E08A56E5023BA5473DA1933EAF6CF46C1C6413966EB6 +246A6F259FB72738C4DF24F91061764EDCCB4B1834F6EEB9BD80AB12CCBB6BAE +3E9715FC068386456612014DC8457AC3EA92D3140C7E9901856FBF9406F5FEEC +C4814CB0CEB13A44908644A5B6D69DDCACE742080D4A41A70D93705433D8B1D7 +51C782D483FE38BD619D1E0E863BD24AF8D1ED22CCFD1DDC63E481DD1D525BD3 +A69323974D440E4C676A8480ADA8BEDB2F8D7B82DF7E8CF71E9BFB6594A59055 +A50BF0B479C6D1E62E1C25E9BF89C898F815558AA20DB908210E6156A3C0C98C +DB0215DC67BEE211C018E82F504DA56DC959DE82E9467C9889CFC353D379E8D3 +08B40C015840E9EA9F9B11AEB3B1690F7B51E00181EAFC769C32A0EB57EDB2CB +B8304C16B1E391D9C83496A99F765A2F593AE9E60170F93E68D99414A71B2298 +F869CC5617669A5842F10170D8C73BE732CFCE2A2803B1ED4CC582817356A304 +2E80D38F53DB04091D403F76E9648FE51BD4CD3728FE0E27C563DDBA778D2B57 +8B9082ED2A2EA10C0A9EC44DC8695E1B930F408604FC497BB411F34718535925 +A8C763ABD12D21129E018416D6A7F3B85010642706F63E9109CA68AC84FF543F +5CE4ACEA6680A279A54A7E0A83F28B661684AB955DDFBCF3483D2255986F8CC5 +2141404DA424CE7C0F45AC2938AD5A9908B18259FD2C7865B242C3A6427DFC53 +B2AB4291DDA1CD7484AADAEEBEAEE1F6D9AFD997644C576E703F9588338E7DC3 +3E8BF6265048FD288DABEB790875CB83D7102EE1EF1ADEBD252146F5F1C34CA9 +270577C4D71EE41705F6A2F76A17463C8E553BF1E09C06CE00A600B907F36611 +464B9D2974D1C9C8BCB589AC5BB056FA8502E4CDB65B7FD34F5FDC2108915465 +E92B246505C67119DFB1E0A251ED432409F6674195B591E704B029E40E2AA827 +8D8C6A1E2E6E8A0FFEBEFB75896E0943E394F90F03A0DF61ED23E57A24E0C2D2 +79F9977AAA33E6AA211B48720A1D0AD4789608A29ED895DAA0D4A2428654EFFD +F5EA4087E6F727DE7C5EA25C15FA2A6A967FD0A240E890997D78AF8466EEB7DF +8D8BE4552E1996C4684BCE3E853E1C541C7D9C2333ED357D179E4E92A44518B1 +06D92F646AE65F7A27F746EC366EF4921D088CC6CDFD723838AE89648D6B6EAF +824C08B6AFC9D8439DAA5CCC862FFA61AC4B0EEFB2453C972B1A64FE31C071FA +A2DCF66B9CEED757FE42B9DCAE3302F807F7CB2C779F7441EC5F11C776036719 +427F1799BEF7CDFAB114B7C30F27C43CE3D71A71C7BA87C4FC34B711FFCCF892 +23450E5CB964642AE0E4638FF80A913FB7BEDF489DA43E315E8CB8506A4AE884 +BC0832A6B83CB4B390519DA862769AEEF454D3C4CAC6CD3899238A044718FEBB +59F5D7C79EE547269AAEF1ADB1DB7A97E5A01435D957413FF0FB229527025DFB +E1BC87C4198E5EFCFEFA3ACB877B1370D222C1CC30D0AA411440B6A59D545D53 +7D72D4D98337E08107FE636E3F25932D57108A8E3BA3F72006744D1B2E33EE8B +CABD44AEEA44A3307ABF8AC6B68F8D83CD6EDA68951673D6984DC6E2FE260C16 +A8673467A85E727DF7D5F2E5909BD2D22D272F87C945B0E93B4EC1A759393A9B +75F7C462B34542FA02DF5548CAB66E75B88A834354AB7439DDE480C6068A214F +D3748CE5C2B2F1693DE0EA5162771F7FBD17F5A1A7467667CAAAD0610F38CADD +89102E1351F7B5DB870DD9A3CEA56863C249263A102E649FD16FD827BD60BD19 +E680DAB90D235E5BF75D5315B2BE376EA7C1FC97D709FA12CCD937CDAC17845D +C373FDDBB0533C37169A34CF072F187E5661FE60DB1285920E3AD01EE806C874 +48BF676D73DCE4A919E3BD19B6A6DF8C4A23BA65A599774CF0E45F2F20410EAD +5A9E43CE85B335F953A0879CC8327B903C0F24CBDF65AE01836745EC4946749C +DC9810CEC0A4868C3356DE8D6447547785EEBD102E069C2DB83EB107696C8EAA +EB71EDB076E924F27351293F26EEE77DE1ED19EEF02EFF9DC8AD8827BFD0E10F +E3301ED3500E006F4898D0FA373F902A40DEAFD33850059A0EDBCC4FB23B7BFA +5087714FF84D9D987933D86D6533C0784BC72A32DE5E26A4CAEAC39715A19360 +79DAAFB08C7097553749CC993001EF6C17100AEDAF505DB97CE45372632F5CEC +A48C77B21F9E50E81EDE28E19D604ED0D7398D9621B7428F729FFA20F9DA8847 +F83FE50721CCF7260F38E1DF313C9D545D237A28C15934B1018C513F0AE93D72 +F0F22E8F2385686BCE5435122C3EB067F4AA14FDCFB812E7DEB5BA9ADECFBC44 +BA562AAF8AAAC463FC0B2E04A4BA98460A16C49B8AF7B9D624012D432E29FE9C +44836E970CCD5900BA3C2E7A9F4FA98E4AC8DCDD503162CEF4C0CF1598EF607B +E11D60FA839D420207FF3B46E1F432A69C99722BD77535A5A1827C0370BFDB83 +5EA905F8EBD42B427A38FAA2CF4E819C9FD74BF27F548875248AB6D00D2E29FC +6060F2F151C48B758F2C85C1EBF5868A18A1B747D324F7DB49855024F213092E +FF0BA46976813383A25196A4BF30EB1D2214362C75603407488823D2869ED813 +2D84E759F25F9BAB59629C2AB691076AA9BE254A27B49652B05E9AF71865E5E7 +BC324DDD2A1400F4B2888620E60EB08A9EFABB287CA0E52575A364CB0F22380F +E27FC8A0DD537BC0959413A2657AE6FE12936A61EA31ACA64F08523AD9B21514 +0F352F2EF3DDC159795F83E9E12870C13D1D9B98D3E152CED06D3BBEF27B9531 +000CE08D0B280C2C37C8D295557F1BA92C8233259A007E1F0FA0D54762E7A6C4 +28AA751CB4E4D6AB5466D8A04E4AE9F64A3781B730A0BCC6108C9D5198810D35 +CC353F1E76DD3C78D33772F3B3245716DC623F4177418224AC4A5F3E2CA59D03 +95BD0C240231093AB97FD553194ED4B63856045E23D72F67BB6D6A4D6CBC0FA6 +B62BBDF0AABB66C36DACD73A99801E813C6F3BBEE1AFA053BFC3530F2699D2CD +31F66636514A088710DD1DB370BEAFC47470A122381AB4F374BBFBD2AB39A953 +DD0FC82DEDEA60A99C9EB07EC0F702547C9ADF01164D5B22D6A41059984F347F +CAFE7146B3626AC97EC8AFB2614D085CD5FEDDA92EC73D7EC86FC0DD5BC9E912 +D68AFBC4DD321E00B6954F14D5CD9D6580C8DDDDB34ECC92B16BE8953B035AEF +0523D929EF5A086E7064E1117DD2AE2CFC346889116731CF431A2E22C6FE34B7 +6B7535EBAD4AE760956837944EAAF4F001120CB784D249E6CACCE4E0E0FFD8F0 +330C57C7A6E27545825F36189476B887BD56A72802D8947A42323C36114FBD24 +B47F11B3B0F7C5498463F54EA557574F1A8EAAD4D47964B9B244D75FEF37327E +6096D66FCA9E617E441978D58AD792A93E3C37FDB5FDE506AFE0BC0588FDDEA1 +2E64D54283E22364267A5B499EB52F623FFA9CB11DE74FC33715AF2ACFE57C25 +A621B07E7D39E56F4ED2AC442C1B85B412DFA95C574BBDE5111A09F2F70F46CD +FF84965EE534CC63034A2E579FA7928906DD2E64560CA3405B7B5247ACE33391 +F24669DB56F6BD022BBFA47934547003902ED8344277AE5761DBF7604D69C02A +33A7F20EE06494669AAE3403BDAB6E4C4373DD56DF66F9700A06FA86B030F3F1 +3B8210C9948A6EEF8400C952C4A81159316390109680E5C9C22595D8E6FA6717 +B0D6803E850AA03F2E854F0A39F819B64357D53B3FA73AE0981ABFEE4352353B +E5A31D3C3672F07FC2AB8FCA25E5B047F2AEABA8A658ECE9E35579E4214A9834 +C6EEA901E3A72FB1521D22FF6F117C6E80396CF1FAB02A8597F2407BF6CAE3BA +976537E118C6E84C69C76889DEEAFAD6D658CD83381C8CAF989C52BFC59334DC +7ED97D2741940291B677BB4AB0F02D45CD63379DA8F02F35658F13AF64F9D6AA +A42A77A6D2A1653BB1A0FBB7A52249D8133440827678AC81A66FC3DAB5A55F25 +B821E7B5153C6FACED54C203E5FA9F6DFDDFAF54C9C870B719EB0EA4C1131C98 +5DE4047C1862E71FCAD3E4FD982FAC9CC900FC22F6770712FF82BD27683CC442 +9B684AAB15FB663A04001D434E26690056EC7EE8EF3D3E4AF36DFDACEBF21B2D +681A134805B6D34D639782170DAFEBF22C888757E4BBAED1F72F2AEA9ED6CFF2 +C477430514D06ACD1E2AB0BF1EB27EA4DEE773DD77D140F02D2F4D5DB55B07D8 +23AEDB701A2885BD8AC950E8DD285172BBC6CC90A000EE8D5FB6C4D2693C70C3 +B90F94B7F806D4584935D69257CA0CB3F72BCFF88087865C9326F94BD3FAB401 +6C89D92242195DBE02F2437F6A96170F1D0C28623D6921EC424B6222838D18FA +E07B02189A3A79B317770FF5ABAA3D8EC721A5AF14B5276651930AED5B20CACC +34128430F8D6AE1BB7A52DCC22A9796792C926528C0DAC4FD652906A43D695B8 +267B1E89FC1B96628CD003FC2A3E8890E68655532146DC927D36C60E98E956C7 +F86DC4B803247084EF8014C3711867EB692B06F90E1B099501F4CD9AE0EEE694 +5A2B34E927E5239DEA54A8E9BD542DA437CD7928C67AFB661A72B9A2914416FB +6441889C6316F0D4045E09419F5D507152644126C4B614013B868D9F7631EB98 +46A5979176C2E3F9F6463BE83908141553E90F523420FDA7ED53F711C27A4517 +1052685F33B23C9A3D34288073B7FE4AC7796A0C3D7669531B4A4CD47C8BA1BC +9179E425B3C5C004A93ADE699B521F798B9AAE48753028A9F95F68ABB41792E8 +D067F9819247E7D81AFA10D72D0A7B3EFB3C202DE67ADEF30EFF42B4FA14DFE8 +573AFA45CF40E34AEE040ED718C7A37604E898F79184D346AFA0299ACE9BE973 +90B606F0B88DB4336292577439829D202B8BC881559868C2D32DACB708DC7EEC +59632D3E618D37B284780AF2666CC81BADB341C10C9745A1437015AA91AF676E +36741DEA9046B9EE93C70CDE6E5BE30C1574E295A592B03B951137A5443F980D +C36ED9B52125EB8A71078F51FC10BB49CFB048A54824A6911D945641933857D0 +A9DC80654384B562FA3F5AB575ACFFBC53B493A0FB579DC9DE1231A49FDF4375 +865FAB1BA20E74E4B314211692DD359441E47068397D57E608871CA05FB89BCF +E0D46BB5F84BF354BE90BDDE0ED7C565B84C32CF953F2BE1136D9C651891A894 +FC786EC9FACBB8E3F0ABFFE37463BEB48D313D59BAB7210BA2B6CFAE1B2A8BE1 +ED6B45CC9E251C4E8003E5F562EC048B69CF13A634680A2C67550CC94CEF59A1 +F217EE7665184E18D63DC0C91F5C606AD52F2987D379088B39E217C33CA14538 +DF3FF835551D339BF2B836957217D3ABB4DC57BDCEBBCCE14B70DAB6821FAF0E +FE68781DAB924B6966569A4FE5134ED14A74F72FCCEC988EEC4868DCD443A503 +0974EAE6F07E8311C1979A3B2B586188EB5BBABE38017D31FE9685EA852AD59D +8CD75108CDD566599D06B611AEDE7C492B3E82186980527C9281DE79D7449BB9 +660A8353E924B4DB1B9F6166553F436409A93BD5C603021AC613D5C470EFB743 +A6ABA267B872D32B531399BF9ECB63364379CFC3D1804CA7BFDDC19D8AB9560C +66B7D20F94E6AB76722D02E681D3E4561DEE24E21977A4C76967FD8D6499B435 +18BC23E58ABAEB635A8683C4D13551CCFE2B2179661992E3AE95EED9F0470693 +D09152B40DFBBB0298A9429F8B2300676D0353522265ECF91369F3A9888A26 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMTT10 +%!PS-AdobeFont-1.0: CMTT10 003.002 +%%Title: CMTT10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMTT10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMTT10 known{/CMTT10 findfont dup/UniqueID known{dup +/UniqueID get 5000832 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMTT10 def +/FontBBox {-4 -233 537 696 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMTT10.) readonly def +/FullName (CMTT10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch true def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 33 /exclam put +dup 34 /quotedbl put +dup 35 /numbersign put +dup 36 /dollar put +dup 37 /percent put +dup 38 /ampersand put +dup 39 /quoteright put +dup 40 /parenleft put +dup 41 /parenright put +dup 42 /asterisk put +dup 43 /plus put +dup 44 /comma put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +dup 58 /colon put +dup 59 /semicolon put +dup 60 /less put +dup 61 /equal put +dup 62 /greater put +dup 63 /question put +dup 64 /at put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 81 /Q put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 90 /Z put +dup 91 /bracketleft put +dup 92 /backslash put +dup 93 /bracketright put +dup 94 /asciicircum put +dup 95 /underscore put +dup 96 /quoteleft put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +dup 123 /braceleft put +dup 124 /bar put +dup 125 /braceright put +dup 126 /asciitilde put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794DDF2E5ECEBA191DB82B3 +7A69521B0C4D40495B5D9CE7A3AF33D17EE69979B82B715BAD8A5904C5DE0260 +6C15950CCF6E188A0CDF841EB68E5A2F88253E382140F87C87E55C9EA93B8C89 +14A36CDF630D6BE7CD36DBDCE22B21778E8648B97B7EC6742EB5114BDF0454B0 +0EA7B1FE236C84C0E5308C871F67B973892890557AA12E00B2C20C71F516C397 +3F3BBD14A1D0149CA064391056E45E9470FC7F6F556ABC82653B3C8049AB5CF4 +BA83C8F2158C236B2FFD4208846013BAF4165E8BB8D334C8FF2E8D74AF5DAB2F +D44788869B08399421AAA900ECC6A2D594641C121660D4B5F512938994C18DD0 +FCD9B008F68F0351D21ED735B2740CB1E0C1CCD25EB548C35B844601D98828DB +556F71D07E081A593FF12DAF83676492A0FFE16E95717A07082B43A966C1EE8F +8A59E1255E1705C43A23CF29A5E4A6547C93F1680A870EE7BAD8CF74D838CD5E +F806911D8FE4262ED8E7F5BC58B92C9C6D74F8AD45FBB021EC7E97393018B9DB +B1B84E7B243ADB05ADD3F1DB3692ADC5D47FEC7DF93080669E63281F1576B673 +125EDF08016664BE73364F65389F7C3B66623AD1754ECBEF9E5CE6948D933787 +A5674279ACB2EBECD3B4E6361419AB32028A27670C9F3E18B746A10B00AF6D77 +4EC00E3BE521C02A99AE5BAA98F793EB1228952BE67934B91472E01AF7B816BC +56D7F19F631A1927846D800C107B1E9CBFF9D2DD513B4A8CE2E0DFD77B1ED178 +E43FA7052765E9FAF89989D490D8FEF6C536EC0D4AE27A74F474B98DA9E6B92F +15E063DB260571979A5DE2423920CE1F59F56EB11E00E3BB9D466A8263E1E385 +2014BEFDA8D1EA3EDA04BE32AEE6CD15C5C010A1DF7F705A2C0C18E87C8DCCE9 +05D9163181CBA56C0FAC8C06A2990554C8E759D076B01BBEADE3B5FB8B551390 +6C8E4A2A1C6E7D9C708614626F3770C0AB7DD2027469C77975C27576065862AD +04E5E50CEBE907E3E991FA0C627302C0E207B4D5992BEBAB5853AD1C0D271728 +C76F40A79392ACCA7358F948AC65DC823CFDA59E1FF69CEBB6B7EC3CF21669E4 +70D999508F9C49E2D9F8818CA53C977D93E15FBBBAF75B1E84F0BA62BCC4BAFA +4EEC82D804C8A8C0210F3E5E258BB1F6921AF02BA9861BAD5C3D5FC8CEFABA8A +A607E547B802096F7AEB09FBA99C83C9A494B94408DD607CA6561A6E6660C473 +62CF8D35F31D052F6C6C8138A8E1430CBA7EA6973D6D510C1A06B3FBD79D9364 +240C1A00272DA44B89A9FE8D5BF36DC1B5EBB4A78ADBE9C5EDB485F093D9517D +69E1AC9A8E6C9D7C324E3797CFEAD9A18E82E03F69B2CED7D5DDCD1A218BF2E2 +ED2293AE999FE2A4B5213A10083EE0407BCF8007670B8C737EAB30311C868D84 +121149ACB4A27F3ED6C0C181C98AAAF51B105F264B5672D7F745131ABAB5BEA4 +0C9B43C0DD9116D6DC61F90BE72018F290D26D5E9D341055CAF09C9F45333CDB +D45B7954271767F638EEC499F7B53C2CC5774EA7A7F024C4CABFB93D9CB1856A +0C671A4ECA7C62EA5242648A84E7F3AFB9547A0AFC29593CFCE6D8B873A78157 +D337CABD291431C0A2CE1F37E0CD7340567AC206FF98E4B5A6410F70F750451C +550EFB54AA259A1B236CA9CB730D2CEF125EC65D959441F7CC9768F777B44844 +CC9842A307C72B740680ACBBF6AA35FA7A94825069BF7696ED81A371A9E5475A +9D997F2DFAD339AADF797F7E03E654234455AC3D17702A420EE0A597BA31BDE4 +FEB8DBA7C61D311CC90441A620164DC22DC2D373973EF84CC553453AB1B3337F +7B39983B8DFFB3A9425F119B45C1CD37A76F905777B3154CA6200792F1759D06 +E017890F4041A385F2238E3C48B6C8EE6F5258463FDBFF7AC762F6C4363926D6 +50F004D473B7B7F73CA686B559C2885F1AA761653C727A77D73431E9D110E76A +2E55C68CD50F43997C9B2FC4710F8C8540909829E215678E63BB8363C4B8AF05 +9986102BB36580D9CA95CD216B7C321822CB41B2E0422CD077F3B55E0246FDB2 +44D5976F67296B5B0BE4B06F6E43535C21164E6C5089C3E9BA2D6B30888C57DE +49DC8D9D46C0D5EDC47ACF2C03B72DE3B69512508539019B759280BABEA12BC9 +385308A0395C4CD33182A10A5A229743379C2075D82D8BFCE4A66E1AA087A091 +8F5372684FA5037D1B92D50CD9CB4F50AD4F8EE7D51F1C9E63C721CB5B9BD011 +6F0A8DD4FDCD2B008F223A1036D90F0F3B252487DE7898F9AFBB3A9D9CD49E0C +EF4ADAD5155A98D2125ED5A3D3907F67301649519419F33CD942E8DDEAC1BDA0 +E90C431B198F646766A8FA9F8D1561B57E126EF604838C0C1966655CF31FB7EB +C8CCC434FC1C96046D38203E1791EC824A3D7AED85C029288D4608CA7668A2BE +484C99639F121845B22EEFCE0A3B808261921AA042AE19E641769E91277BEC29 +4594082CCB3058F90FAC4A700A8A827ACA00FCF574ABC8EB7DBCECD97F2B22C0 +0AA19E8739B81AF8C6F621D69B8E6F29BAE233FBA655A0AF5BDFD7F5C6B9167C +6BC7AB693D45EF2AD999F5DA3CEFA39BA48A17EE6D9F2C4DAB91AE3F0044DC3F +5D5506CE4675AA928B0092D6F173644F91295216D8BBB14CDDE0AD524A4D545C +1B5E284A3BF0396664081CFB4F186A84A0D24D61E82F4767C1E55A0642720CF3 +909FA1AB8EAB78030B59BEA067DEDBD2F1D0340E790AB2777DB18248521934A8 +BB38A58B7F633DEA4291B0D5D13E9A882C974697CC6D3B49E030C94EA29B5506 +CC29C44D01B4751B453A46A9F6BF3BF135AE87A4CE232AF57B66578310DE41E0 +2A6AC422117F1963C4D7CC306BD25A6E724E51921779F22F029733122E23E2F0 +CB340008813ABB104380C80A492B3FC6D0BB07CB8D8409E9576891EF6E5C9D08 +EB8320DFA31BAFFBD336D0C2BBC3D3B2D30368B9860768FC080D30569C7F7811 +0EBEDA2962476113625EEB555490B8CE4C5F99D74ED10F738C61854CFF8B41C6 +9402E56BE8856144A1A05D0B05F4CB7EF728B2F4F5A439F18C3B68CEFA41E59A +D8308ADC92EC1289DC84CF48D2CDEFF509A145BF945E1E00D552D329EBD2A7C4 +21D58082CC8FA790E981F4AC8EAB99950678FD3A7DA3DF13778681B208DD71A0 +7C3CBD0664B37C9EDC6B601D79A2C51FB54DAEE849F93209793849104E722D3F +52DFAF7047EEEDDFE744787A5801E4AC2C3D58EC5DDC15FCEE03990C53B0C57A +FC54F125A04C8E4A0ADAA725808C587E7DAFB9F784FA2875689979D316DC22BD +AA36B306A1ABCF907B63C6476737B746099973CAEA8C1E2C5C41F27E0F7DE8D7 +F0D942E34E92F43FE902653D4D2EBB6F3B9F7928B1550A82AF234D45D028F429 +067652BD3D391BF423AE72B9CB1E8D91E898161BE3A7849D456A861A2046711E +E934DC59442AE7D81661CE8EF727D8D7DDC0270E937E40F896AEAE6171661431 +C1025C53172F9D366834BA0054FBFD84503FBAE328B6FDEA180F8EA35B1DA937 +5CC3B8F00C206908C2FFFFA6A7AC6915D15EA44BDCF29E2BFCFD4A849535F19B +0D307C696BE8205C7D84B9C77F02EF27D911056EDBB4080E4D3ED72788666CAD +CD91B0ECE27A177DB23320A7FA9C31408B4D02D2A4B1CC6DDE1A6CAC3D8EC1EC +2226EC98E51046D1EC26FA20EE62D24747D83CF4941DCE5CCEEC0DBE387149CD +E05B19FFCAFC0D117F9A3E60DCD4C815228D98EF95EB559AD0ACC0D50FFDF714 +56C3C812EA5ADBB013BBD956A7C4CC0ED7D3E25D5C9AF5E626F18297F75D4957 +F5B0B33379114B903FE98BCF35C3FF76FEE1D9AEB711F2962276531F7380EE3F +E368720E0292A170A15C5539B1FC7BB954EE2624B504CB8C805B8D31AC38307F +0513606F09211AE64DAC447693B2A0AD15E9A64C34F5A911ECD0ABCA90E9791D +67C6BD202B0858EF96E7722305B8AC02B01AB1706CC6AE875A8DDD15EE349046 +EAA65005E7866B506EDFB7A5A2AFD5C9E9DCC821A79EE9C1EA2C7BBA32A40BC7 +CEC26DB1AC473C8C3960ACEC581B37D6569E8C8C42950BAB7930B65E1570E3F8 +9A7FA719F1DCFDA45A3BF2AAB32C9A93BA3552608A61C623DE59BCB346E87EF5 +9CF025A87803161221C5C1C6F6B3403712C76E9D755C7BD68D7F2DC03C14CDF0 +C1BBED1D648B905B4B17037B7263C1EA7A7F06FAAC4E09E08483A8D714C19861 +327CD9C32DDF850302DD6DDE24912D00C22ECDF3CDFB18FA831A41A7488EC203 +F564CFE30D506F0829A96D35A7E09C3DCD107D589B627A15B55C5D6649126BEC +60B88C55ECCBB4E680265D9EAB4CE22965D3B1AF759B01ACB0D0E6C92B6B4EFD +A81E6A648708979487FC591CF09631310D46891423F4EC159A73E30D8DD147A4 +B0EACF6D45D18CD16CEB8176F03ABCB41F2234747B9733C8FAF34AE5D43D3BA5 +0CE0FACFC9B087F84FB6C68678BC6E76022B1526D6E5B3A48EC1A110BD75F45F +1C4DC6D39F254976453F57DF873B7D635C80C42026DE020E5BAFE0DA0D54D1E1 +DC634D2621BA184347E5252F645A6A1DB7657C48124186F0E4C644077457C24D +55753C651A9A7B6349867641464B515B821349C795A645420508673B93750D0C +7A3B33EB1F09782033742AE8F3A23FC02284E6C03818FADD1731361542E3FA3E +75B8D52B668C3E18A4AE967D0FC3157083D952AFB8144D549E69EAAC51C279C5 +E5D88A0D9D53013DFFB4352A1598FF84DCDE6FA32FC377306B9B92C0F96EE149 +8CD55E7B2445B86CCA7A547FA732D52D59025129FD8C6333AC0DF4F0CFF6287E +F2036D5DBBB3B91B92F12FEBE0B61A313A4DB5A9CF0BB3DDB781A56FEBFFACCB +8CB9D1D3DBDBC4CB6AAE6769E470582403CB920630221B68BCB625CD4605FA8F +D3D5B7A1A28D15E44B38E92E906C138E72C15B86F64C38E23BF0440052A8C914 +54397F49DBED99D0AF7CEA3B0A05FF37C2D7EAE1412567E6776333237C31E3C0 +49949EC8BFD6E0F6446CE2D4DCD2C1524A288818CC5D159BF8463A847AE4A2B9 +CC8C58F822804B81B13BF4F2DEB6229C4F51F093075581791D02C36A13B855A0 +34900AA7CD4F1A797652656FE3A8425A38F421C4CC0ACA1CDD44FA6B31219276 +1CDE1CD63D6A58CE705CB56CCA1260F9B86E989019071563A9B4C274A87558CA +6EF1660D574EDA276801F0057740E2C3B80D253D697736484D892CE1AB128B8A +DECD69712F5E70E895FBAA927E8194D792A04AB6CE205E04E38A433BBB793FB4 +E8BBC4279D58A223C6673D909D6AFECD246E66A52F4CB35E5931D24C828489BD +4ECAF621A220D8ECF702BEB01C4FC7510197D3F6D15321EC87175ADBA6434ECD +2B5A306E91375CAD22CD94301763E4A8B981472890422C5488FCD523C9CB17DC +ED22FBF12D5F7525D0D6BCFE8CE85B0DFB1D6F989C267FFBA0A996D309E4A934 +3DB54A9D29C88B9D55D7300DA3D46419256C5A07A2A529A8DE8BD1727281F5FE +97033D861E0531B14E811378EC1AF1CC7EE9BA2B07D935843D3053F673979F8C +FAFD59D555B56CE338F606747238B22BD62C42BB7238FEA335678D474A643570 +A9E7B4970E8C541CE9DBC7BF70ED7BA33639D6744A18379455029E934C95E2EF +639C4848CE9A0879B51649FAB023A71782444B451F92A34CB8A124270CCF86D4 +D18EEF5C1D2B2A29012613851C49F50702D63BACF95EE2AB4D72B375E0A62615 +E0991E130A67ECBA9E05329B740708F1CB148724C3A6E5E3AEC1F88EBCA398D2 +1CA8827C977D72734310233176D1AE26C55CF2CEACA62223315C28FCF6305C7E +A22414D4739A059F552F1F9372CCCA5FED4F9AC987942848EB498900269511F3 +F408CBEA0659B954F5F1B18AE4FB270213646F9B28AE4439D2BA2D3E0AAAA780 +5E530E4EFC8A060EB979E12191044509DA0C14397AFF949E12DC970658D5EAF5 +4EA963F5BC1407A32F3837CA6A24B7F3D60EB8E6222B702E25ED903F9D21AE50 +664A095009BDEAF4B78DAF94E5A55D48366CABF07791A1684B2F54EA69070844 +4F031AF8DF416C2D3679F8BA038B0DC9DD0400CA6B34667BCBBC07E62C1668A8 +35A8C57C9048A7227E672E89681B54D662079A189A9E96A3CA96D8DD10189B04 +1DA49BA2729F1CA585B1BD5C467295285D52E47CA904235A1A3E48EFAE9EB6F6 +01374125CE89D53C276858668CF45D2F092DDCAA52418E0BB94C2B8266B4D88A +5D911507BB1DDA3D8F6E7C14A91CA11AE799EC42E993098E18CADA70BD2A1D82 +2C39326C6E3F9E84CD9758B9AE43D79BF99E6A0CD713E95B3D9B7DB90D127DE0 +DAFEBF850CAAACBD860B5DEF2082F1ADA64B44B193C4A1417BE221FDCA36456C +BE5934C8CE3ED55AE3A11697C2D682B7D0F72D48976451D205783BE25DBD2507 +39C14FFB4BB828DFD187104F38A7F11D5F0698C11E8C1D4F107CACE573FDC4B1 +C56FDAE47024D6FD16A2FEABB434CA320300FC4B6C1B6CA08F76C60B7C08A665 +99F404DBA8A2A1EB18EF6750E4EC186E31561A3F080BA6562967546715859481 +7BA782940F5C5D06626D6F6A412CA7C13820EC7C1DF23E15E5829F698CF617BE +D940523E4EE4ADECEC48C24297DBAD528BA1DCE7AC335A1D15D55415B108EFC8 +6D45030D27B3EA63B2B4CD771DBE66AE0218ABB1153D4B7482289D1313CEF184 +5C960B1E3C3C953912CC6F4521D1E15636C1545EEE457EFB87B88C9E43CC2F38 +6BC4BC96969F4FF28ABB06F4454C01CEF1B6DC538F1E832FC1666D977E5A881B +F72F1B4C7DD4BE167A5535F1163A0706F9A0B26400178DF8A128FB5EBE6A7B81 +E478AD183EC06622B591337B9F1872AAEA356F4FC67EE767B34CB5A4D90702D9 +39FB846947F4096FB3DCF16EC81455164783BA0B5D723060DAFF411B68307E81 +7BEA1D9A47A5AA3D648E618C83C60F060029E6EC4D46B045FA7415BAB2AD0AA5 +ED9C729C24136F6AF61E6409C0B5CA760B16225641E268A68CFB8260BBEAFC77 +6626EBD97195E77CAB425CFB0096D805D9EE699E41680D095AE9FA10122A7882 +2F00F495C9EB2102DF0D3E61833BC0A2E468C5CF7AB430FDB7C0BE3DF2C0D230 +1580BAA25D65F599378D873165482A1FBB224AEA89C6BCCFBDBA42AE1C5DCF41 +06969F585CD3B737D1388D6359F5468D88FCD2279BDB270F6A858FB7D2ABDEFE +5EE8FB79FA437F8F50237B92C307B73B0DCB808D07A9C3255CB9B3B17039CE5A +288103D05D132863FB522A02CEE3839EF9AF7F07D99732F0B8B384745369FB3E +7901166478F4A16076A1504C5E98D17408494E270BBF4470ED12B4332422679F +759F1D93984D7E506D16950DB6C2682FE1379EFFA6F6C95DD71F6E55BE3EF6AF +E0CB25388EEB436E6527806FC75484133F6E561DEB979D5C1FFEFDAF2A6D964E +03BAE0BD593C2992AD84569C81050F7A793C5263E50C2F50B98C4CC703EAE17A +6AEDAACE312DAFAF5278D125B6EFC5587484F61DAFF46B87B7C9B1EEDECA4859 +314A9A9E2248467DE1E54D90DD671660B9040B3E0DD982260822177EFD757266 +74A16C83A7FB168016A320D3DF3BD7726F1F4EC90EE5DFE810C96B099FD4368D +906AE4699049EFD37E8EF058D4B97BF71106445AADD4FC6E90615A0066823A36 +673B8DE32322BBE861AE251226B4385AB28702831270DBD25D666FBB0AD7B96E +A44E891EA1EAF0F87013AFC982E33D67A28E96E0C9CB99B9E4192536830D9901 +931A8CAFA41289633B20BA3BD7AA3414B6DA8D57CCF2FBE39920CC06361F075B +CC40335DB9A0071CFF77F6B7BB47F3100DBDC9C4A58C2B81EC99E8E966AF3390 +E3FBCC28BA1D79961C8A1584266454DF772FBA99664D74D4A89FC82FFEDFCFE1 +4C9E4A04291E803D142E37E7ACA66AB279378F2F192FFB2B5BBAD18B95F03136 +2CB594A3D6D3F8576B90A6C4DAD6D6C8EE07AF682F925F01D0B26CBA347C03BE +F3B0585CF4539FDC66915E22117078CC94D621F31DCB3E021998A5D6EE94CA4B +E214D07517283D56973D8E4367392BF6C1150DEBF459D141AE0941C1C8C5CFBE +E735D796E365A1B0F60BB4CF2801EAFE4889EE5F338D3C4885368281B3C95CCE +251C28A90D318A8A0384439B38D63B94757252062EA44E88509FDD2E75FAAB71 +7329622828B2785C1A8B26351BC74237A6BF99216652ACBD4CCF54CFC8AC72A6 +46342F1E32D4318E7E27C7B2DAC943B3E72C472FC6F1DDA8684AA922516A672C +E969C047E318B5E3B1270C1BEB1C4071A15BC81B29B268C679B41FC5E381BE33 +DD95F0D68118CBB60C521E5CB2BA46A10E50E9238163713290DF6DD8A27D3813 +F871C07E725D4518013D9A84CEC96782541E5580E33C2EBCDB18F08EB4655A46 +507A8526DB26C854928B81FD502B0CCE4A68943C12078F57C10F4E85FBEE1025 +46D925B8B3B447D4920410FEEB9844FABE985F9228FDD9F58392F2F3BD650E49 +2E3AD5A14984874DF4572816931885CE8A448EC95BBF40DDF4F85653AD90A88C +C4A879C0C7596E61997B972E8A55E57B17F802C738E5C7A8FBF6424F8B131B23 +CEE3EA3747DB066246C250EAD335A76FA166ABF75120CECB59076AB31A51F176 +57176CBE8C802A97B0542A5CFD6D5E6D7EC848B923012E45D9F065BFFA0D03E6 +788B68BA4DE51DA37994948F859D41C28BA939C3A82BFDB44DA585AE80B8CD7B +A6EEA79B70BFB4864E06F06A9751BD2D2A209D150D7135E0A25D67263EDD2A7C +C63B5B76ADB05D44BD5BC0BB3EBCE2E74E1AE5F7DE07A59D90C932DAA2553505 +27F2AFC05F7CEB39E1C7E54F69FB0BBB069959F2FBD11709F8E81F6E7CA06DBA +1CBDD8E7A78487462596DA288B50B295E46F4C3D9BA862688C68859734B232A7 +4B371D2BD786924F186524765E789EEAA30B20C069322D42C893A30BF1BD2C46 +F8F3732DDFE80B8FC1789239345944D8B457824FD80D11184E73FBA30EB80A9F +2FD466826D4E666E3A835B98A1D4AE5D17053A6A648E26E77BD08F9A3E02956A +AE82C4929E9666F539079846527D0E326FE7CBBF86E3722BA3E53F8A5121080B +ACF8D3C67A2A1DF624B9DB92105D3C833F5A6ECEC108E026E1D3D968967A1447 +15CEFDD09123D56606134BC3449404ADAB1330C9238DE48F3CDFBC91EB86D7B3 +8B85B5BA97376A0673E434DBFF19798EA90BFBD94493E2D21976F8106FC0C276 +C81C9B9F7D4A68120DDA56FC6EC65FFA40DB78A60A05EC270A106DEEBD2CB92B +F0622BD2B1D43771DF39AAD3ECB655F317AB483F7290C148690903AAA636583C +99DE3DBA99EFE20773D3D8DDD816A28D7BD8881DE570BAF5C7A30679179E1214 +FCFED81605FE56AEA21C1894167F93D648B474352A65C0756F812F97AB435ADD +22C031A21714A626DE35308AC51CD676DB1748DD2773532294FA77CFB2AAFD32 +A72BB7A045F12B4934A768F89217233DBBD69B900B28492A26713CA5D61A9042 +A982CB071F1F875718FAC168E4E275860DB6369B8114E1BDD4801110B62C3E3E +CF140554C826967A99F4E9726526E87D57BF845CE38E33893E5F9788769B6A4B +A4577C38C8D45AF2EDC9F4FA7DD9979AB8E14FF5D8956233AB4C02982BE8E561 +C63B7BC314793F634DB6F086E1A60D9FC3B69D3A7C20A99FBF3CB028CDBCEB60 +E803C8DC3C5F0CCAC030905E72BBAC052520CB0E40E23B46B2150DE67F61E4B1 +8C4D55904B7F90DDE4A4A78B11AE1009DE46DA396791B1C0EA63FB6897FDFA0F +42474042E7E9B06A703A7C6E672AC6705506F3C0B6861BC85CEBB9DC9BCFDE0D +43F5248CD7CAD4B89835BACABBCE6C791BC35FE7211E775C009844FC75CBF6CA +DA6A6B7B488270BFAFFA3E9950914CB0F88C8AB7CDEFD2FDE11ADA7073037EF3 +1A5CEEE37090F3A56D06FBC70597907A26498593783878C02722ECFD5D65903C +7D421CAFA78924DD27756853568535B02533C3393183D6E30DA6ED4BD6582E09 +A5A4B4404EC452E91CB44515AC6124EBADAAE8A98D8A95E7D14DA39951EBC461 +D426490071462F246794023DE1BDC04AB0F1834D50F748C3C60A07E1FB8EF400 +78DBAB90B59500BD1232A872ED51928329CC8F06E83164FBB2D0B24222223EE5 +992241E8E00D5DCCD6DB9A8E2325ADBE12FC8512AC127BBEABDA739672C1644B +554850CD75724E6779A7E76424CAF89E9455860E0AE2679231F4A535C0ED4336 +313717D6F7A4A4DA833847A1BCFC7BF99234FA645F2B85C9A9AAF7108931E3CB +077A9C571E57B0D7EFD92B56C3AA4FCEC0BCAA96005E649AE8012366BE6E62CD +9E742F8F45AE4C96BCD73AD80AFB6F061D629ABEAEC3018CFF45E41F46751953 +44E490B1355DC49C1E10BF343307263584091D122ABB1E3892E532B6DBAA105F +CD48375C112331EC5DB49E4D4CE2D126C9274B21E678E5E3EAAD4EA0CAAA29A7 +86FD8819217B195EC6E40AF23ABCD71156656DAD38C931C8730715A2773DC44C +4DEF14D92C2A054739F27D7EF349A0EB76D952BD9BA169B4F85C09D80984D232 +2CB4A3812BDE539DC79E2EDC7C221739D16B10246A5F57151C210878556D4176 +31EFF3AB6C4D78C4F0DF81692B3C9BDE4F85242BF0E84BACBFA39688BB222A81 +E85E9CB332868ED5B64E140C66E242B97A90C13B6DFBC3D285A49BA9D4BA1A47 +64D83577FFB50BF974D953F42A249ADF9AC228CC4D8E82213FD463BC757AFF26 +DF4D1678FBCD55AFD5FB3014C0380B2F8CA9D6400DF2AA041580A6FA5694ADBA +674286F00E531693DB28F7C996D5A66F80AAAF53001EDFBC065C72FA5BE3F114 +1FA3354376AEF7374AE1D0A8E9B06C58FD029922164DC9FA09343FB6652232E2 +2EE34C662F0092BE479D739ACE775C6F589775DD768B736F7391B9AEBDE7F760 +727702E145CF749DC457B2E98A36C52416107B1E59084B5F777B61511B8D17AC +88386A7933CAF852CA23FE179B67DF8DCF15800755605847ECC0FD77873727FC +1AF2BA8BC75D30E26C40913771E528724FD7C5DE284A8B58AE55A5C48AF26AC8 +02E155B8FCD6755D8F7F5A6F1AE66E4D24A13567B6463B18E65972BD75ABF732 +FB41F87A62FECE9A50C697BCEA1E3B3DF1E3DC961DCA598220CC746326F85F83 +72E803A4E69106EC5BCA01139F92171DBF9964BBEC8D3370039623CA1F927CBF +FE7DA71B04B4321EB4D3FCB27F8404994CC7DE5F26AB8FC019A203D6DF2F449D +85A4F103F7604986A1AC1F7D05D239E728FD6AD1DB5024B0A0542130D2B0E7EA +4432F910F9FD75568F5732EAC95F7A87CEBC359949C26595741533E952327791 +87E42DF84E1064E1BDD3F5A6455087B8E9C783AB9ABBCAF032E9FA32C27ED7E6 +CA7E3D1D76CD1905166090BD81A85485B9B4E976DB2E19A8E62EFB795FD6298C +9ADA57D5BDA2FEBB227F0EFEC59E4B51E06B8358006F9D79C1EFE92510D6046B +6AFEEDC793137DE622A8B3F5C9E3B21F29A98A589D9CEE75E348FD4D206415CE +508AB95A7496236AF1F6F5ED6B3ADFBAF1E35B51484F9B1E0C11C5AEAB9336F5 +A8861ACE1EC74C4A145A64E4FC8F6BEB3A16B021AFF4AEDA59B06326A8D7FCB3 +3B75F9729BFB7EEEDA8A1774728C80AED40BC35D42045E5CEEBBBEFAD2566CB1 +AD69A9A972826DF0F2303BB232367E611C115E8955DC97779B1AF269B84574C0 +9D816C88BAE3AACA6428CFC648FCF0869AD9236591E3B8FA326BD2EDE7F97286 +511C75F4EE4F7B4DA33BA2CE7F778D92AE7C1B4844CAB3ED8FCA285454D78469 +1639D24729E8002E4507A114407DF51543CF7DFFDB7E05ADB2D36E139F2DBACF +D90AF274AFB3E5AB5B38918A28EDFCF6EACA78248BEFDC2FAC0E041AD35B130F +8A91E20251CE976680FCE3F8B65B33118EF7C138CA1260D3CA855C94FCC02CC2 +B29C94A3FFD38056ACE512DE680DA29D97BCFC35FB2A85057E484FC9F72C9A7D +08AFAFCA705335C6E9AEDAFA97D884E0E463E79D8AB45DDF86C56EC922283C4B +777EAABC0D57BEE30D4D47FFA16FEAE2FA972E36516480E1FCAFFA5CE692B7E8 +8F887C5AE573B96643F10BC62FAFA4BC6CD04F5353C0D40CBCEFBBA4DE7B8960 +352E7F6497C9C4489779028934084522336B5E5DF6FF84A78158ED5035FFFC9F +F199AFD543D5D81C0155F3EE0E7F6FAF7898F7F26941D417F7AB37703FE67D37 +C263078FDC85C5430CF379E657FF9ADA0C00DBD605386F5494459C63D4AC057B +2E061B06E17B54AEF38A9EB401FD4C76C6755F2AB651473DA2F19E28C89229E3 +FD385D8559EFFEEE5D0CEF127A8A6CF9017459466E0FAC341DE1994C03A0CA5A +799CCD03DD2B41A05F7B36493638AAF8D7CD380E03726B0A18B02A46A0BCA027 +9BF16ED75AE0494C36161ED2C22DD7036FBBA2E319106B9A56FECC732B87E2F2 +596167125221D42DE9D4435DAD321F878FDA68B9E72DBC2E31178621327BAC50 +72148C123D4C8568DE822169839906B9F0ACAF3B4DCEB9352C8A9E246A9A5EA7 +31E04981D0A53F44B6905704CFFB9F0463518C02538DEF2DBDABE936D1213FBB +FCD28F833C5872057CAA92536B8E8EBA129745E2E2B5A9F07086A1212D466785 +EE640432A0E47C91CCFF3FED5669C8ABC2B43551AD04E7A2FEE2F3C16511F7D4 +048A8207351E83AD32A72360A2DB1AA8F78C5D2630D770F5E13D5C49BE166475 +79483B2F7FEBC1D73B04E0E5D9B8243DBEF7E5D201D9F644B150A230B5CF9B90 +CA34BB8474BCF408E37757B8CE5B33FE7400A68C70F542C7E2A22B8C0AB1EF9F +2BBA7A646A4C872C43C0A748F078AA98A13E882085B460050CB3F5B09B62EC01 +AB87AF8DFCA6823ED6CF8426EC115C5E4DA335FE416E1D37311B7FD56793CCA0 +BF90B579B0FD4E4E1D0A26FB0C1D490D99CF4994693630FA343960E15AFFC596 +49BB7297BFB82FD56BBCB36DC1597F94A157AEDFC53419BA867CC02C26464BC0 +2875127C688DA6902567716A908153DB4CBF710CDBCE50AB98E0CCF1DF5CC571 +00027F6582CF6AB4E584436471D3C8DA2D780E5B02A9B1717364899D51EC679D +CF5F4A4981EDC24F710E892772E4F891AD02B7B98A113FB1AD2B5A51046693A4 +19D03A75A3140C19791C85A0DDD173BB3618E9498CDDC8696CCA6EF81729AD1E +EFE4F3D6242E1766A3079371D1D1833841F46F04F2F8029D8C1943F6986A95E4 +9E77806F221CECAFB3EAE0F979DADC5D2E4715BFB5C64245CBD2300E59030B99 +0885F08417E1A0C57C3746230F9EF4E968C0F41F67706BDA2E983012BF317612 +38E9C0178F027EDA0E679F306AF71F0D8985C712C4B4BBBFC57A86AE052CC2FE +5C1BDFD948801509ADFD4FF9FA7A25E30D6CCC7C7E418EEAB34C4ECC6AC8FADA +637B5CC70136EA5A57B727EB11075755A7840215CE2B9939BBB6C3A7E22DE42E +B3725C1AD0BEE0A54C0B57CB93E6A20E319E2FE4515D80D09972E0A742D20DE0 +55117C1B9F3C181456406FCA70A7E3B757A813F7CF9E3562EB8CAE1CFB65DAA2 +B384C17AE103C20851906846AA4AA5EEE5EE989F292D42B11EB4C4FC057EE4BB +B09A4D81E8AF0CE1C851B2E328E977207A6989F13F7FF039A4E295507CF0A53F +10A345A516EDB7C5FD5763CC27543452249D229BC22099C6FC1DFCC07A35144C +6267BE8D5BDCE57F9C7C65F6A64A74DC2207C8601231477DD57BC8259B26C683 +22FD4DBF0E3BD814E31C9E194CE2EB212268A249216DB084226802B79DC72AAB +FAC4ED3AF6BC51E2D9A1D5A37F5124BEBB1E0B010C34A1B7FBCED45414AD2285 +43BE684BC7BB56C5036D182AFECC061F749522456B4DCD80E3315F48E7E8AB98 +40C4FBDE71DA957C8FD860C4AB02C97578BC8299EF448A526CFC585F27EA14E8 +88F9928CBF87C8E46F69100F0CB43E2720B0BC8DCA50D59FEFBB84383B4036A3 +0ED89F67B433AB4BF686487194107C63BF989A80D761EF3FB20146A0A496E5E9 +26375866581146F3537156051C61F82AA5C68B6E8418297DDA7704EA50262775 +B96E1E1D7643370288780188ABCF25B9B23BBE408EC5DE254F51469D5FB06FF6 +2EA926F94CF1730E014F34822ED267643B773B7CADF967D431B6F3DDC998E56A +243880E9F772F3BAB3702C19C5DC92ACF864D6A771783E178F4A7BFBAD36008A +F0A61C5B437A69E31235DDA9898B4B081F1176C197C0834CAA25FDC9BEB696AA +8ABD1FDBE17E30070690EDA533E2EBC19180DCE4CA8146D6657BDDB765DDFB21 +D0CDB86912E49DB109F66DBB9226E297945BCE9073E724EBABB58E42AD94CDA4 +C9DAEC40F79F3A3D36777B18C61DC9D22EC351324FAC3426917C893E36C8D953 +4ACFACA05F8764BC61A17F6B40D3A97177B97CF88C2B0023ECB3F29F9CB347DC +E686012FB31904DCA042679776108D9D611EEE971D341ABCEACBD0866DA21DCC +270D3DBBBC9CD438F4F651B58D1405A82960CA991CF690B8B564033154645D8D +ED5E4E059D9DFAF3A5C2BA1C1AFE1B865901C8D117262CAB210A3C7A03443544 +E22EA5577AEF1378A9A4528592F32A8AEBCB1CB6A7E4948FF78C6FD230A5892B +D8953ED89392929FB91C042D31E7E8A4912FC701E722D7FAF0308625B3B748F2 +26DE427383236E131022A95395C72B3DEBB139C81811582FA4E9C7F970FA605D +C8DBB3ED8B141428ACE6DF426B2567B10C5D68A4060F25D5D64BA262101CF5C3 +4B7948CDEB6CAC66FFFA0F1795C5F3174F7D319D252DC2D22BD08FAB54CEA742 +64C0C6B94BDF182DC0942C0C82E82A0B04654A7C2E6BE685EC3DAF1D5FE48790 +DA815DBBD0A176BB4D4424ED7F893B4CED54C2EF94D73CBB154E547CD33D874A +E754A17AD1F10C23BC5FA4E709330A10A73C93B843D8CD8A65D5A4241B35CD19 +938F2BA2FA95551F0C2FEF1CB8B056D9A9120F7607BD4C497762C577B66B2DF6 +8F3F661EBD7F3E73E3A0032790ED80F774423A026F8ADE2FA82129E1FF27DB3A +1B6E603479668FD783735606F7AC6BE9D65C17F7ECCA3B622C13F0FC95F8259D +DA4801A7EE18656AAC3D730CF2E17FCE8657AD6289850DC06E897A759F7B53CA +502E764B07FDDBE6E99D25ECF1600D6646622334871C57133A8AFD03FBBC2368 +1BCDABFA9FF4C4A9EF150045F694A3AA487BE461BDD2BF1BBB38BBC365837063 +70963C7C1E7E4809797F4E497DBF6D5A90A71D6E89BEEDD5D16B31ADCAD67A81 +A9A3085B4CA7BD93E1A9591BD4A7C88FF930EE7A131C5F3338817D88AE31813A +C09D5E7120AFA6565B0A647A40CA94B78F20905B7110FE44A90794F7F0CD63DB +E99675C781255B7BA257CEB14DFDF9C13A02701B0FE41C6A6F50CC62C028A3BA +E9A918549B7F9F206DA0909F2009CC87BBB565F281F24D0ACBCB71F12709DB31 +5D355415D97F66DB25CAC37E90BEDB51F2FA97E0A61EF85E845F702D0B3AF935 +14F3EB201323209D76C7C5970AEFCE4225FFB4A1477B177BB52332AA0539291B +9B8004F23CE4E055F7AB6D6F2A8E74C2994306A407A4FC831D1C887C42FFD0DF +EF07891681C7F4AA914AECC427057A8D73261E25F82DC3EEE7295C0870E91523 +E15187584B32B8F8B0F2E9BF4E67E5A2858F00B0C59DA1B1B59B00374C6C6AD9 +741E0998EE0DCC6F5ACD1925CC40807D5B66E971CDCFA4651BBF2490FADD15EF +C8A7EA3ECD078D34D875C3EC5EDAB74AC0DCA00F2329184455C24C97EB0AD4C5 +40B8E4AA2CE6E7816580F9DBCDAE7F01AF0533397CD37C401D4841B60CB976EB +E3093FC863F368C85AECE6E6CF7D9ADABDF628D9806C1269A0EE06FEC90948E5 +CBE40C0A2C72E08D9AD94F07470692D571F595E465CB32BF486AE9C3971B6F7B +FBBDE2699E1FC9DACB156D880DA379262A98C6708A9850FF8EE36C35FF636E46 +D8D00FB3550786C1D73E6B91F9B35D6998F33BC953E0C8AFF996F4C707F8DBAA +AFD76432E45605D5E703C2569856A0BD8C8ACB29BCAC87F1A72F859D20205328 +6272929343C1CBCB053D7E19AEC4B2EFAA765B2002F43E7F62ED5281C94ABDAE +750B2C88B3801559FC6DF0D66E55952FD67AD41718D49D35DBF2B7CCBC1E755E +800ABB45EA4D7547756CE9E6D3AE0B80D8D97D681DFFCF4D5D5330F0FD6AA729 +5BCB1475F18E9612197D6F5F7C7AE8FB931C242993D385AAE7829391D370819A +496B9518C6F913E666C27F0896C7684AA1DB1A335C7B50762B4F8445D45C907B +9E30F7FD84E403DACCB0A8DFF2940312386C315FFA700B0E42242EEE04042E2A +3F4840E719A42FAC426870CC20DF083537010550A6B43A02A330D92CE15222FB +BE6A9F6EFA44F7987224533983D96BD2E1E536437F89E2E43884AE09FF5C7902 +A284704F78AC067C332EA207F53CAB61ED51EF3FE79A9B7A373C3DF72A4F3A5D +67B4F60BB470E5D093FD880AD32809160E550CC1EE67E01CFA80318C03E6FDAD +A8E744FEA593E2761C60D2CE83F3F6D3A2B203739C62A69D4E271FA12372C45F +6C378E4CC21B9B0CBFCF43233562E4BD4D52F7A634D1F0493F8DE445D140EA4A +D3956E9971263B7C3CAEC8AC83E541D58F52E00C1C80EBD9A31F0A9D17FA2D63 +E5E0D22CA28D51E39A055C40AB769EF224AEFE2AF714E322FDCB9770EB00686B +208AAEE2160D059DEED823FF4F9769359C183A6A6398F9E4ED55397F02C68FB1 +016CB495A0599DED25BF1006343DF9AB7C3BAEBD1EB2F99F4FCB07E84AD2D959 +D1D573B89C220DAD815D9EBA41CEF4D664630082DB97645AEA6779A8F0D7765E +B76A4B8B429CF95F22474EEF2FF1C792DD525E50E1EE0A1ECD78570970B62293 +43DBE6E9B97585B754AEFE28E960B5F8B3F549EC7F168FFFC5EBB52C7CDDACCB +DF9E1FD89F2F8CEE44285E79724FDDFED021AAD2025006239EE5CA8543B86200 +C7E8522668B07608615F6F102E295003B1B89264810A2BFC3DAFECFF126B1807 +2388839274203BEEC2B319C7F263ABBE6B181FECB5FDB9516E8F0456B6A1BEAD +7F45DB0F95F4943B2ACF52CB30DFDC6EC936A6292DC2AD0BD67164900CECF3DC +097528073246A88607DDEE1DE4BCFC298892F3B73E897734D7001A466170F60E +5F2948ED36A6AC13975086A2D68B6CD8B033CD14C1B85EEE4AD3679D74DEB998 +AF62D045BF1102FB3927E5B9078F8AF93A0ADDF1937276C423CD346F30D17D3C +C57CE052053EC21A2991D063B157FD535850DD63E55890427BC2C883785DFBA2 +436BDED247251001AB1AE56EA19880B88B3F1BFA6C232876E6C002E9EA850700 +517C80537C27033737A162B10B179624F869FEC056F339D5A292E6E945E7BB31 +A271CA30990B4AA5874CAD851C1154275BBA868EDA5D156F4663E2D436DE6DD2 +74E6579AB19EC803927046D9130BD9E735D64248A6FA78F1DD6B51DF0B1DD553 +316D96795355878C426BDA09F052D54880E5F3E5C1F29786DA0A8084D81A5849 +B2A301BFF171446EEB4DAECAF40D8C4F6C489BEA6C592F8257E68C514180756D +A13569A03827561348B73584D69626B3175247018DB9DFAA9E989E55C97F9A32 +B02423EA16FADA78FE1E3C56EF4122C640EB8D77C5E957B5E425A2FBFD173423 +E8AA1758A91E1B5B85D174D7DA1F11B3AA76761346D2464BDBA290435A6DA50C +1F14E14FE29396C918E3E4C388E93D1C3F7A7161FC61DFA1543D4CA86B6A3A5D +B64FC69BADC3F3E0F7DA2AA5FD6C39700C2CB8A6C823D2620D39FBB0B507003B +6D28C8D67F57C019DE3D8A4B6BD01CF0B305163BB1229F470AAD7436D13C326C +5D205B4C818D0F765E2B9FDDE26B033D1060EBEEAD6E5C49EC8C6F395B54C259 +4E24E89DB787773423E358A1C64C3FDEE4CCBAAC4AC652012A0CD7269A062643 +0F52A1BD1DEE9401B5835752C48CD0B705476B00458D31E70599761C793987D1 +1A14288D5EB2C9452C2C4524202A40A8C773AA8A3B9D10ABFF457478532B2C58 +0DA8776E116853B77D1A8EE320C87B23A693BB5D3E77A9C419772675690DD75C +7AC5BC3ACF97BB11C70C0261EB5DECD96577D755B03EECBC66B3B8FAFAD87950 +94AA617A40E4CFE88939F28D0D36C5C6FB5B4F6E4321BDBF12DCD428BDEC76DC +192AD968A9699084DBFFA3FE06D5F79D336DD6CFCA4C9E1F427A29DB1F4F0492 +A29F5F052310D455E8AE1847083B70EE57C4799FF4B470655D855B8298FD3694 +66E00CF5D04415601598C0ABD6802FA0DC4C12965546076E46C2DE87467CCC8D +F9ED9FE429CDE1DB2AFE61363327B4D11F46C678B59E74F8F09D8B9C14C48004 +CEC93F33A4A6906CD71B2414C05B3599E4D1FC1EB839D4B5E5968711359D3BB2 +8E6E262896409C7EE86DF7A8CF1DCA1EDCB2BE723CAAF5B1D7DC94F093864855 +7FB08EF776FDCF9DD8342ECB7F7B307542880A7C04D3BD09D65BE13F80E36120 +24BBE4C422F1CC0DC956CE53261B903ABA0E0CF1CB0AA8895C0DA8127DE3DC9D +4B491926B5408AC8D29D2FE62CC3CEF548C0A57A1DA202EAEA8F4584D8B64E49 +A3D11A48600CC0913B744180AFB6873BE72DCDFF8EA2203E34082E011C87C3F8 +EE91457705ED0BD4E2C193B7E818B50DDDD734F2BA1B876D262C39D94B0FC27F +0B5A87423EAE91BDAB38BE457EB0309D05FA5E458109305C03295FC39B0D06BD +BFA2B4520DD610E12C3AF842A94296108FB67495B300991C3491F0983B5A0403 +68A8D19218D9429EE400C3B91DDE2A9F163684D9F28120B584FEC88628EAA60F +79F5988BE7BE31153A675BC7B344E7F62CE85E8850361D1996D57E71690472BB +8055755DE965D795E6D2424F7D76AE7F249AEF4BFD75103B2CE4D62FECCD2FAE +3702A57A3320C54D19D5015ABA5AF39B237C53D38DBD80773C0B9D6406574BFA +48BA4EE71769AD140E202D24D9F1691BA072E1AF182FD6DC06C2FD25E3437E38 +ED1D0033E77D2B188F3A84EAE17787110EC5462EF5CD0FEBBE5CE39976B5CDA4 +8206BE5EB8A06C7698C5E6A45EC7F59CAD3D6ED3AC19FABF3D29C9AEBEFDD74A +6B7261D349FE509BD769D9A24B16C276C917F0CBE8B25FFE19BF8528E1C46D38 +3738E3CEE8170E3EE323A464A3C8FF30B3DAD0BE87518E008E37F60DB471E3EC +110E9B8AAA5C875AF759126B39B90A8E7BCB25FA3EFA783AF7B069AED1887A19 +6A75C799940E5352C34A93F125DE82A7387CFDD7073A28C1026C9E06A1D8163B +E66DC3BAAEBBDF96B7B3143B9414AB45643D022294C2AF8C87EBFF1276EF991B +7A1C720C1A7CFD392F211A190A530A19012EB117670AFAE4CF700048D901A5BE +074F9B05AA555FA4ED6D0A92C08E4B795279F9BE48887886B5121DDD857E8A86 +A2885B9A672C72BAB990E0AF6DCCC769A7E18E65A86B3E1482D8297FD98E0510 +30B27AFCB9B261771A1AFC298F96E272E779A8B6AB6B03410ECE32B7B69369C7 +5597FDD08BF2E6CA29E093428DBB0BC53C64E5ECBF216111AC90E82822E7604B +A9AF479BE9FD2FB2ED27EBF4027C22357DB27A5A6FBC6B14607DC26F95A81BA5 +1737D6C406B19857FFF2903F966DCD56BB73B06F5F74C917517DF95D8D5E5108 +350AB839CBDFD7D1F3C687D0B6B576FFE108AE8708B967C29F9840A0D6784789 +DDD7A0D76E92082162603CC916ADAD75BB205E7C9B7A72D286C5411F3771EB6B +9F9022BB24AC9EE7700907280F52862F1D542605F3D3AB06679252DB9A8A4E41 +FD9740AE35473A9FD025F364B863DDD063AF91A114EB529A38F28C4B4551E276 +F76C254669B81BD3CA8479F0C7208AFE5A1927F2AB12FBEC47FE0BF9AC3DBF3C +340DC67125FA0D65B245260B32FB74F90CCA6D327874BDB6C252614C75425F20 +2AD8C9ADD15733715B9281DB9D73C66B9664491416643C04165C64F5939CA73F +F8D7652592F391E59B82EF0BEDA9DC7F42713005E4AEAA1111EAB4E74BD99119 +D86490DEE3DA6C021B36D7AFDF9EEDBB1E3253176EF0607469E0982034AF57A8 +83F024DD4B42B99BBA110514E52498F6BE463B3053DF5114F2D6644FA27702D3 +15DB327F632E3750171BDAD75F0B7D2A84267C712132373A2FE740BB086D53B5 +C3E9A68583159E46FE46ED3B645B0FD505D206E09D438052E27B75EFE7F5D83F +BC153E4BAD47FF241AD46BE13605E1840C5C2CE3492C29EA5FFF5550AA3986E4 +FF28A404908C88269D821EB2FBB193DC311750F6163D75872603A254B949C756 +CB97829F0BE3AD796D52969E483A0A53CA650CFB9AD57E0F4DED89C7746341EB +3D3333F06556BC61BABC3553C7B0D83DDC5B3BFDC77DBD9B6DE41680DD6439E9 +4C9FA49DF62830C86E7A4B1CBD37F2794EB6DAFC3F1676697392A6A635E626DD +3A3BC9E2378C152F9895178C694596191B37BE3DD8C0FF34C82C386289EBD7CC +B63139A3243F193EA10211A8E390B4C4046663CEC373928556F5CC99FE094ED2 +841DDF013CAA6CA5C48CD9382CB776964B38BC24BB009DF203DB81D4EE3A4463 +C5F2BD876E0C9B9B226FF39C0CE6E67589A38388A02A81D3DEA72CC031BB8B2F +66C481F00167DC0BEEE6740A78D736F429B44B82A3B01ED2127052646DB442FC +C1EC78B100F11D42512810F26EEABFFDEE3E46DD584FCC2194896F7BB5670634 +480771223C1E2641A253CE2490AD75591FD94F19B2DBA95F0CD64EE4BA03D3B2 +BB0C7A6437B610004CA4F1B914D9075051F7CBB6CDA305F6337307F317CC05C7 +8BA5A409ED6D915263680852670F8A474AB0646ACF77FA3AC35332DFE2B00CEA +FA99D25DAC950B173DB84ACD9DD99AB23973390FE32E384C6003FEB9A4D3FB1A +CA17FE87AD558921F203432EC00D0BD9E0294A0364048A9743516F46EAC01B7A +AF23DACE21FC2D26692D8F1A85F1B0AA8156D6360B322724C4804FAE55DFA814 +ACCE2F8508335CD775539E7931007A73DFDEEF7695487B10BB0D95FCA66D0F53 +6E86DD15234A025709C4F7DD08761711D05655EAD8122D8BA2F7177E820B48C2 +5EC82CD16644832ADF374ACF193975B4635FB374451D0AED47030807CFDCF240 +783160D79230AAC1F2E5066F09C327ACE24CA2D712D08749FC63C3D8EDADCE22 +B81A7E03350AE88F30BE8222B6954ED0D2910AECBA460EC21BB032C4D5DC1B12 +39F1EB91215B384CDE3F1FBDABA298E37D4460D0B07B0493053444AC73654815 +376ADD2F64BDE78BF59CD75D93A3A3BC730562E9A1F2A730A2F766AA19DE458F +06DD501B215E0C2070CD64DDE13E99719671FA4809FBCB6623E206253081A50F +5329F16F1B0F0F69276852A7A0AC023A821B8E7880F9D7AE5DA74D0483AACB4F +FF09D975ABF439500ADEADA4990CA29A50D82C0A7704F11DDE0C9C8E4DA21382 +C4F7289719D9A4A44BF2735CCAA2BCA698A5FAEC9A3BCCDDA1C88CCE18510733 +5A88B88A193C9DF15ACD00F20A965C11DD8A35CE316EF3E4716AB3FB4EC6288A +91C0F824FC9933315C9A71CA786C9305A9A30F407777F0AEA7D341D1D9605378 +72CF445A4A2E3666C0075E2F9AAC3F452811EF7E60E6C04F37F3808FE8BD39F2 +346F5E25757E3ED2232F1B9B4DADF83DA45F7F302809251973F705CF71E34C18 +7C452C4B5D29E0CB74CD6EA67637FFF0E9D9B211FF96E04FFFE9A27BE5E13BF6 +B51EF214FF4F0A58C5D5734E6BCB0ECD419AE3CF79AB67D1B3EAE70FC1E83691 +095D0C370C9CF847C2A914F0B810124D763A972464C5F2C1F69914A8672D46EE +30F9EFFA7E9628D667E5DB582C123160BF28E77DBBD77598F14A32DD74F67032 +B4A0537D0FF938CC61BB0F9798B600FFB1AD7AE6AEE67E0FC6557FC3FBAA1E4E +C793B0D207EE0395913818CB2446E9B82B880537C1625C70ACBC87F97CEA8C77 +82E6229E1734F80FBF8477F062F3836FA9DCF83A4BA49703FE3DCB5F2CF6266F +4480EDFA91B1D98FAB8BE14DA6E84B9D58B46DE5D034734496474241F59317F4 +4AE4AFFABA7CA3FA149A26CF5050B83BDCB1C56B529900AA20EE6098D135E65E +61026EF0852D497B3799DA044CB378332924CA360A1C62E24B5A0628813829AF +A1236DD728559DAA01188D6EBBF3CEF983C5201904D03A46B62A41E9C5F494DB +135F6B62BD5F3745625E96E1B401848BFD935AD1FE128507866FB807693E8376 +634F1B39763087EE7E454069D5CED93DAE8BE9D1366669A152968E2DF13EFA54 +D1A631CCCA33D914CC1DA8C0DF8ECE2FABD18641FFB43BB5E82DD0A56CC20DCC +64EC0A7A04709085C80C2A1477CF85A29D0C11F204CEA455072DFBA6F5F5C693 +CB2B56EA189926EB51E92D2B5D89F25AB94E1F7FA208916FFE89601B616B41EB +EFA70F4C8CFC3FAD1D056E4076E8CDC2C3058A2B35B34FA0A29A2ED3746060AD +1A6B6988B1B0986DE495FDE9A8C45119DA7EC756E1C83C89842C8744AC4B80DC +264792E2E8D5AE4120BC57C170C742EEB0EAE8C9C4537AE432654DA4DF89FD45 +AE0DBDD92D0DDFA0C90C4FB90FD5A7ABB522A193117153CF578A584447FCD674 +548ECB9250DA4669DDC8CDBEBBA49999F2519DE29B0CE693DEB2F420D4B0CE02 +D9AA3C2C15A6DC98495E1EA54C7670482E2B1034B91692285AC47EFD6271659E +400D6D7DC137A904647FD092B1B4D59170F1EED8E29FCD584FEA2C77642AB839 +0A44403D75504E8DDF1BDBBA6B51B7F9F64B63676B6FBDE514701B9333312126 +4D8AC19B638254A4BFDEACA80AB2CBC4DD12AB48BC34771E210FB576FA0DE013 +5C49E765028D57C056BD7C14E6941B0A92A2073CA3CCA67E9A18F18BE4934550 +EFB984B486B9036B8E3221F63D8642E2C71E6547A8E4B25FC3EC3C42D27DFD85 +E85F2D08C69CDCF3174A09E363E92A8B3D75BFD57CA37144D5267BA4D1750988 +8FA3A9B9100838AA7DFFA97C5E4D2516F5649CA756C97C5A3D500A60D2AC5039 +812B603639C2E3CE36F26CC0AFCB385A5BBD582E7BD1B5920F67DBAF9ABF9EE5 +FCF66EECB566DD87F0618AB73199C230034DE379CAC1F6BD17526305D6B6ECD5 +8C5C57FA76FA775B2A25C7F5C83C27A1F4C71DCA93487469004EDFF855A156C0 +8C8EE1972CEB91B9292F5619118F7DA38B1FCDD069D71D0DAE61BE55AF0E255B +3B8D2DE974592BCA7D92F0DE92538C74A801CF16A424621627BEE5BEC2CC5E68 +9B88BE0ADDB7C8125F7C35D74A52779C6D5D87143506EAB799765589617D08F3 +1305B15752D134A97F7D872CF330F4B3BB62946570C5EA7DB77612DF9B7F91E9 +22321623627FEC40FA04FDC1AA21DECC7AE531510375D6F68A68C6B8BD649A67 +A3E24B30E04ACC2171A510DCD77F7688E2ABD7D3346BD84E8363BCDB2EABBE0E +5BC87A595CE80F977190EF06D3D0BE12DA50EA0C33D25617A9DA8940967906B5 +F5317F4CDCE1DCC7ED48B4AC4DA131EBCCD11F7D241551AF8A2A723A5C634EAC +575113186D3B83F8B6E2E50796481B6CA50D440D5B20C5206A85F539FB7D52B8 +B831EF10B784D195BF7EFF05A9125A3B90CE131D84ADBBE6E47AAC2FBE51DDDF +1286C0DCCA8343F7803FCB25CD690EF9FB49C1C3B91BB7FCE5D330C781744502 +AE46FEC050B4C695101F3B86ACE09D502572DFF5F8534DBE6DEAE838B4000712 +4B21697BA3FCDCCB3B858251438F05B3EA1F8CABC08A502C5324D1315214E7DA +6B62576C10E6EE9A69FDB9D424FE1C7BC32CF37EE9EFC42B9F6726C486762574 +03913F9B3F5A20B1EFA8D4E072EA2F641D7AF64403C4EC76E3A81185B976499D +C78FAD546598AB094B628942EBA51C11FD572264BFC7B0E97A1715D7443F29EB +7BB4E6848383836F99850E22316C73B76B0E6848008B832E49B7373A94DADEE4 +E7EB32C428F531FFA2067E3316A47C08068D93E27525A9A2A915CD9F204AB4DE +01EF65ECE8167C184DFA747930AA322FC136DE0D412E99E6F37ACF87A788141B +3043A3B0D20DDE8C2137EF0DA77A899A581A51AC4CD5A1031F84BD428D0A17A9 +989877277917D07CB806DF051C23F1AB0049FBDE843B34CFC9DEC4147D97759E +983C395F0C9DC2832139DFDE0455002BEBC392E7617156400301F76441347A3E +E94D2FB65A31DA189BCC3CE94AFC1613B546D424A36EB2F83F3444DDAB0F03A0 +F3C270A9B8BC62465F46D83929DB7F0240E52CAC458194BFD50645F825D0C41C +773B1D6757625906C7643BDCE990E24467C011ACDAF6D4A26A62D71FAF1F475C +F14CA4D545E9E4F80BB01F3AC573D046DA7356FB9884CAE3A29DC357BC8CB255 +E5108AB355F0E087902C9BB458DCE8F341F1AEB79E468EE9A45855FE037780E7 +9EA9ADC1CFA141A3F976DFEF51A428D237F234BF5C694DAD4CCF2AE84FFAB574 +A25C1FBA2F38110C305D962420A310FE93301B8677478BDBBBDC518B8C94E819 +26BD2529D0EBF0E770CB3A1E107440D135848D2F90CE8F37693EDAF6071B79F4 +FEA5ABF4D9F2DC67F2468F2BDA3FA968EED4CAF8D7A22CB28AA43804F72F56B9 +545DBD0E3F27DD5617329305CD8577AF38CD4C472CB181CF3DBEA07CD42C6C1C +51E819286FFFC75E38F5EFF96C763F51A31A78B0848CF56DE1A2CBE2F39B0C41 +FC7C0D42D48D6C75516316B27F6C34AE6D5F5873233914790ECE044C014E9796 +20E200F53FC51ABFEC15C1E08D36E9A4DA7E58DAC014E2C0627EE8ACC6AD021A +D2E2C431ACE954602EB99D4584250637F807507A17DA18521B6820E066058B09 +8C2B4609FDEA9E02007A097F833C7A9854D74B38DC81016759DD8FC6F98071FE +620AFA1A8DE5AA974C281A1DEC9C8B866E7E350BE5EF3C7C53F82280790CF239 +C847E4C7F74BCEBED8BCC57D4C01BC4394F0E9EC5AD01852B3B06B93A477A1AB +AA97B588415A03C1984B0C9619C899DFD4766A2CE91CD6A65120E07756100696 +297345CACCE1551A2CB549077A292B73ECD47C3A098049BC49F2125BBF004DAA +8827C407B06A07E5F39CC17843FE876FB2DC6CA2ADC0A4D8812901FC82913ECF +BD04C66B3647B7A698B4BC6C2F136C04AF4792F10C31231F2A04E4B55538CC17 +AFE4B47BA2F575BB4E7E222E9F6A4F904F11CBBC6DF6C2F3C15DCF268A39D6AB +DEB9D091EFE6ECD5DF61ED23E570D484A6AFD5F8D34B7D484F76F150D3D97EBE +5E91D7A458FAB380BE167E7F2FAAC82BC2C7F3C14BDFD06D9665F5AB2CE34800 +E779AC43B70E22199D3BC4A2A14EFD5D20AF12D8CC26BCE54762ECCA9D9F5FDE +84B43104575B2D6533FD3BD245AAAA4B82314EAEC2E6E566EB32AE367D2F2BBE +8F6DF9D63F56693D701E259ED828A3E27561A5901B87F606AADBEDDD7E846AC1 +F07D1ACCEC90CF6AB18114A140FE4BC918EDC9B06284B40E2C82D4BE3C1EAB92 +E2E2F0DE115737561F7ACA173B81C9AF7EFCD6797BC1AE6366646C8F1ADC38A9 +F1928933BFB6AB474FA81D8C006AA11B76461ED98DB4DCB95D7772E3D15C2A29 +F116DF0437225E8EA1FC5C3997633CD63539069F7788AAB84BC9FA8A1A61316D +2C0F07D2914A61B0418912B276561540BE5DBC1F7A20241E85ED95BB775E16D4 +1F22262C8128967F53031EBA86D0A2184DEB01D51D4F7E15BADE50B7DE246C05 +38B9B49D264A4B29A372FCBF57323308C71A0E14748850B56D51BB932B1DCAA3 +A1469E84536A42B0D8B55A0292C8050D6CD1BFDCC4D287B15082801EA40AB8DE +CD8628D0E1252DBC57333D74841246D7A6392F158EAA9FD5BC6CB2E535DDBEAB +F16FF32617952596187203D41342DF7FC1E0CAEA2EE8F012236DAB0208A626E4 +5FC5EC819580727F7890BF2B114523A3006CFE3B67F19419A009826C635C4B2C +10CED88293D753A6FC63C5C17A424E911169E316DAC022EE37A5F93A6D7BB446 +5402EDB1F758FFCCBE83F7842CF09E84DAC17CC8A5D0521CDBCA8B320D90F24F +32AA9B86DAFD068FB0D234C94EC0889134DCCF83F8B0C89F67D660EC4D6E2B34 +D4CC5E094049ACFA09767E7C0AFD789767D0660825FC94878BFCA40105597194 +BDF88A8636D180BAFEF635601218B47E1242497D1E90E7A0F1098FE4161E6C7D +D1E920DBECEDE54FD9D8EA40E25881F0E31C3FECCA22ED507DF496122D25AF56 +E6E690952EC746BE46F4D228D54C634B04D036DD33252E5A5B6309E559EB9CF9 +DD17101EF262D5FEBE9C207007A2E7F3BCCCE3243333F0A79C1779E727414D60 +B451BDC14BA3FFCBB9D49641DE51BE92C7D136C2C910559A6EE106DC05CB4890 +322BC12FD592C4789FD8368DFB7827A67FF8FADE351646D0B4B35F74A924E229 +DDCBE1B5D24D049CBD4424B123B6AAE7F5AF8AEEC7F862431541F6B755A272CE +177CAB058D297A35041646435664056644B2422B2CB890080C3BEC3C52C6363C +B843F24977C482C7A37CF18DEDE4E8FECB280E86263BBB5BD413A9BE19329817 +EC424B1AEEEF713A52D68143AF0DC2B02F293425F041A616D148ABED9E7FA7A0 +AE99B5762A52E38BE8E7148EF22808632CBDEA8613948D8E3D576580FA3F4B3E +0B5F9E1B240BC7D0744FB1D121E3231994DEDE24B919A72869C15B839DDD9917 +D3BF2466E673B142E4B527B17893D3405603E1271E2D005A6318DC98CFA3D25C +3A7B59A16B1D6C5C31F267B964E951DFDB1143F8D9005E378A3D4F5B072911CC +814C191A806A989BC176544E45BA9A5CB16281394572CC6275A96865BEAB6F9D +06DD94701FB30DEAC86652473C182379F43877528F28AB0B5FD9669347003055 +2E6169601690053E00E18BE7FA7143DA61EA74326BE8122E56485E65B0572821 +BBE05576C1D9706EE219A8377338E93DFFFEE5E37E6054412A9B875A092C948C +C4663F161AEBAFBB964859E9056D42B76A806A2B1C435318459E272DD51339B6 +B16BC73787ADF1D7A2CD630CA98F8B6C479693BA427D7096E83AAC35B6D1CCAE +B5879B03B706C6AA3FC1A1D180315A2252DE59C45E9429E107D7A73A645AB182 +6FCD53B44907874A1B286BC50D9051160CBFB374856E59C961C376C3B553454B +108BC5FFAC60EB8C7426A70A1FFC2CE80D8989A3EEC43A9AD51771D48884BB32 +1749E328FDCCD4FDD104E80EB6813FB98D83139791DD2A2C9ED7A70BC458DB09 +5D73B21DAF0FFC110324B8F2BC145FA61962C5D78B4D6C8D014D6938AF09F36A +2A3E5634A140A1A525BFCAA00616AA1D8195A8A68E4260B8ADDDF789B131C074 +01EF325E06AEA94A459CE1F51F312C3C19142528AC941551F324BE2653BBCF38 +46DDC6BDF7EF77D68C32F4DE7D8604E63A632AB2108086C77B94DC31D926D1E7 +1D3653D8B35CC5AC431368B7B2D7C3A565FEE9D9B2E366F265A627FE7B4378C4 +81A0C4DBDDE6F7DD940F08764D307A5B09097320431AA76A41C4ADE92C260588 +522B197B802DC488FA2169BC2E13AE36A98591E1673C1CAC29B4E0E15D2227E7 +80928CA4C060FECE89B014C3FB6A42313FC438E448DDD73CB66ADEF1FACF2E2A +4601F76ECFF658D97BC22C765C0B1B04B03EE08A41E2C778A8E5954CABE7B386 +BFC2DC7C60E720BAB2B1A726D8AF4933355F21731FD7C930F31720C1E16F6C01 +C0C8B6747961B605CDFFB02FD6D6A7758B1097AA1D47C6DA9DBF0F87E55672AD +FE93D17DA6FE7B2E3A5360C5BF0C3F4715165CC6748BC95CFA74D4AD57B481B9 +3784040A6B1BB028CA9F69B6AE52CFF8FF3FD169FDE1A85B52651D99B4042E72 +D5E952BD9F976EFA21C935F2ECBF5C8D4D8BA0AA97DD1458650F6DB9C80B3B21 +F60761C150944567DE98E9DED3BB831A57DE2A5C8CC4417D0D02BF24EB09C2A7 +B8262EFB223FDEDB45E75E2559190060C676B43721B5894EA52440AAAF72B77D +42138ABF062B92255DCE006EC18492D4CC0CA6FE753E8851305B967B4B01D481 +85D8A1B78CAEBEB99ED44E5BD7B0CD242B46F8C3C4B1DCE6B103497A89D0C48A +FCA2DDB3CBEF2CC076673FE28DD397F4975BF03EABF542C8ECAE8311822A6564 +14C20DE022F9AFBF672B31D124F96E2475073E6B53F8032685A45AC7181B0158 +A6FDBF2DFCC9D842D42E098BC02AEFABA6D571821604BBDC389E80931BC8A767 +A92DC7CE49EDDC3C89521CD3AF5AEFF121EAA27B74A37BF043B1AC045A0D9A38 +8767D85D15DBF0F5ABC495207AA3AD05BE201642206044F470EFDF4A8D52C050 +D600F04B97ACED3F7FC8A56E7640A6A4AAAE1816F3A77D887A378AA0B130B509 +72A8ADBD5808E9BBB7F83216D995EC74FD168D5A3D171AB9C52A0E21169172A2 +9C680D926D2327A314835700D399CE25A8311D22D1127B43CB8A9D900133C4D1 +CA1F71C4331F37DBE7F26650B4D512C5E192635CD8CF4C560AB5BFFE0671424D +456BA00271A643AA2477DAB650F682D89B932BEBB5A66EBC9072A469EE78E0B3 +86F58B1BA76F31B978C167A0E5CE18889C4DA968CEF94EFA70060960E1D53535 +17230FC0C8AA0E878AD3D6E306533800DB46BF785219872DBCAAEC33A236A8AA +E86D9C9316CEE8D75888217824D56420EF7AFE70E18C6AC6E7E71161373D574A +D399548B201868F2D1B2DEC136ECFEFE25C307630331F2F893FE36E0CCC8113F +9D7A6DE87881BC713E6B438F1E804B2C6F00DAA4FF0A33F2B051EE2655BD8583 +9AA5BB2F7A4AD400F34963FA1BD28D5AB933EAE84C047D636122BE431DB097BC +85D7CB6C30B09333A567F7DFC0A0482E4373512294562297BACC2F53E2BF1718 +4E23AA470CB1879235832D66846522B8EC1536E17172B8DA9DEB14877C9405D4 +531E548E8ACEBE66D41992C0D0A25CE7FE2641DC2F06A1399C864A7C1155DDD4 +20A2D292688E6426B147572C2CD3706C96C22C977A4A6C4A30A54C7DDD50DCB9 +7BBC5C0B744CD85DF88166B916C0F1909A38742C6BCB58045C4223B70F4B3BAD +74EBBE8395A3F64A14D6838554EB6AB7CE417DD7448EBB4F3EE10B13B454C4EA +949AF16A87E72ED21159408171A4847199C5E403FADCC67D0FFA5A58452ADC67 +FC3C597826B20BD85A1AC7BFA715531D99DDA5155185E3FBF29DDF559A103F75 +538AC8CC0B4C4041288E89B387F6ABE04F90E8CEB2099293D1DC4FE00647C80C +5DBE532282708D050BC6A226F45DBC314D109554BB25CF04770ED4874EED1B1F +E18E006F254BB4297C435B416A9AFC6FC51568D89317BCDD9885E2D1ED15F4F7 +AF253B5FAEE5CC44BF9D860982B7F4706C8B8018E6488E337B773A4A7AAF9998 +6796B30721736F7AB66CE22EBEF616FE5847929A2E08D64DA7E912F4CA899F73 +6A0A1F1F2163886A7C5E6999D98AB9708EADE2030050B2D05AEF0AA9447F8698 +7C191DD81DB9131D0DC19BB7CD0CD9A60AEBBA3FAD203CA51B6FECB75EC91C14 +EE75CBB49420594C7B9A56EDE29343B5D1817AFF27B71F0BF2B8D59D8198C2B7 +A9F4091A085C973412051D6ACCD3F0B37D502D8FE193CD5E42769D1F497847CF +B986233F0DE24FE2F4ED03BFA105DD04182887D3C6CB827A1D5B00170B8DFA5E +EB1BE4FEEACCC82A5BB4BCE2C8320CBCF6EEBFC955025F3980763F51170EA440 +C2144AD36893326E5A3DC214AF59FF505E8168593AB9543FC6690F0D63262FBB +978B833906430E5D2DC99D729D1CCE7A0A91725537BCF91DFBF8073EEE494A2B +E38F1AA3D81C602D05FAD3CA3A8A5A7E1F0A7F7CA736B561F3C29275E68D01E1 +FA253D089243988C475ABF8077C71DD93F1414E69FAEE565F42C863C61BE554B +44C92919D78D898E70510D9EA1FCAB702FD53337263606A777A001224390AA6C +D8CA04FE8F34D61F03E083D0A050EA3985ED026479142A7184494C615A7AC675 +97B6196C56F2034850A77938B7585B18AEEA2D249E41D25302DFF2416FCADC13 +E69030FD907778821C66F93220A31991386640AC2315A5B7DB80B4AE91A6A4D7 +8BC19E632295CFECA8D65B4045C5A7614852CD48686A27D61F6DC6ED6120D30D +92C97F4D0B5135823FA4A59DFB7633 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +TeXDict begin 40258431 52099146 1000 600 600 (bashref.dvi) +@start /Fa 130[55 1[55 123[{ T1Encoding ReEncodeFont }2 +116.231 /SFRM1440 rf /Fb 133[34 41 41 55 41 43 30 30 +30 41 43 38 43 64 21 41 23 21 43 38 23 34 43 34 43 38 +8[58 4[43 57 1[52 60 58 70 48 2[28 58 3[59 55 54 58 7[38 +38 38 38 38 38 38 38 38 38 3[21 31[43 12[{}52 74.7198 +/CMR9 rf /Fc 197[21 58[{}1 74.7198 /CMMI9 rf /Fd 134[39 +39 2[39 39 39 39 2[39 39 39 39 2[39 39 1[39 39 39 2[39 +19[39 27[39 39 2[39 45[{}20 74.7198 /CMSLTT10 rf /Fe +129[39 39 1[39 39 39 39 39 39 39 39 39 39 39 39 39 39 +39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 1[39 +39 39 39 39 39 39 39 39 39 1[39 39 39 39 39 39 1[39 39 +39 39 39 39 39 39 39 39 39 39 1[39 39 39 5[39 39 39 39 +39 39 39 39 39 1[39 39 39 39 39 1[39 39 1[39 33[{}81 +74.7198 /CMTT9 rf /Ff 167[62 3[60 46 2[57 1[62 76 52 +1[43 1[62 65 54 1[63 60 67[{}13 83.022 /CMR10 rf /Fg +135[67 2[67 1[50 2[61 69 5[33 1[70 2[68 52[60 47[{}9 +109.174 /CMCSC10 rf /Fh 140[56 3[56 56 1[56 2[56 56 56 +57[56 45[{}8 109.091 /CMTT12 rf /Fi 130[45 1[45 123[{ + T1Encoding ReEncodeFont }2 91.3242 /SFRM1095 rf /Fj +134[48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 1[48 2[48 3[48 3[48 1[48 1[48 +1[48 48 48 1[48 48 48 1[48 48 48 48 1[48 6[48 6[48 48 +48 48 2[48 5[48 39[{}49 90.9091 /CMSLTT10 rf /Fk 134[65 +65 89 65 68 48 48 50 65 68 61 68 102 34 65 1[34 68 61 +37 56 68 55 68 60 7[93 1[127 1[94 85 68 92 92 84 92 96 +116 74 96 1[46 96 96 77 81 94 89 87 93 1[58 5[61 61 61 +61 61 61 61 61 61 61 1[34 41 34 31[68 72 11[{}62 109.091 +/CMBX12 rf /Fl 135[42 1[42 1[30 37 38 1[46 46 51 74 23 +42 1[28 1[42 1[42 46 42 1[46 51[33 32[51 12[{}19 90.9091 +/CMTI10 rf /Fm 135[56 2[56 1[42 55 1[51 58 56 68 47 2[27 +1[58 49 51 57 54 53 56 46[50 2[50 1[34 45[{}20 90.9091 +/CMCSC10 rf /Fn 197[25 58[{}1 90.9091 /CMMI10 rf /Fo +197[33 58[{}1 119.552 /CMMI12 rf /Fp 134[85 85 1[85 90 +63 64 66 1[90 81 90 134 45 1[49 45 90 81 49 74 90 72 +90 78 10[122 124 112 90 120 3[126 153 97 1[83 60 126 +127 101 106 124 117 115 122 7[81 81 81 81 81 81 81 81 +81 81 35[90 94 11[{}52 143.462 /CMBX12 rf /Fq 200[0 21[91 +17[45 1[91 12[71{}5 90.9091 /CMSY10 rf /Fr 133[40 48 +48 66 48 51 35 36 36 48 51 45 51 76 25 48 28 25 51 45 +28 40 51 40 51 45 7[68 68 93 1[68 66 51 67 1[62 71 68 +83 57 71 1[33 68 71 59 62 69 66 64 68 13[45 45 45 3[30 +8[45 2[25 18[76 1[51 53 11[{}57 90.9091 /CMSL10 rf /Fs +132[67 1[71 71 97 71 75 52 53 55 1[75 67 75 112 37 71 +41 37 75 67 41 61 75 60 75 65 3[37 1[37 1[102 102 139 +102 103 94 75 100 101 92 101 105 128 81 105 69 50 105 +106 85 88 103 97 96 102 105 64 4[37 67 67 67 67 67 67 +67 67 67 67 1[37 1[37 1[67 5[67 112 1[41 20[75 78 11[{}73 +119.552 /CMBX12 rf /Ft 129[48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 1[48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 48 48 48 48 48 33[{}93 90.9091 +/CMTT10 rf /Fu 131[91 45 40 48 48 66 48 51 35 36 36 48 +51 45 51 76 25 48 28 25 51 45 28 40 51 40 51 45 25 2[25 +45 25 56 68 68 93 68 68 66 51 67 71 62 71 68 83 57 71 +47 33 68 71 59 62 69 66 64 68 71 43 1[71 1[25 25 45 45 +45 45 45 45 45 45 45 45 45 25 30 25 1[45 35 35 25 71 +76 45 76 45 25 18[76 51 51 53 11[{}91 90.9091 /CMR10 +rf /Fv 138[108 1[76 79 3[108 1[54 3[108 1[59 88 1[86 +1[94 14[144 4[184 10[138 66[{}13 172.154 /CMBX12 rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%BeginPaperSize: Letter +/setpagedevice where +{ pop << /PageSize [612 792] >> setpagedevice } +{ /letter where { pop letter } if } +ifelse +%%EndPaperSize + end +%%EndSetup +%%Page: 1 1 +TeXDict begin 1 0 bop 150 1318 a Fv(Bash)64 b(Reference)j(Man)-5 +b(ual)p 150 1385 3600 34 v 2361 1481 a Fu(Reference)31 +b(Do)s(cumen)m(tation)i(for)d(Bash)2428 1589 y(Edition)h(5.1,)g(for)f +Ft(Bash)g Fu(V)-8 b(ersion)31 b(5.1.)3217 1697 y(Octob)s(er)f(2020)150 +4927 y Fs(Chet)45 b(Ramey)-11 b(,)46 b(Case)g(W)-11 b(estern)46 +b(Reserv)l(e)g(Univ)l(ersit)l(y)150 5068 y(Brian)f(F)-11 +b(o)l(x,)45 b(F)-11 b(ree)45 b(Soft)l(w)l(are)h(F)-11 +b(oundation)p 150 5141 3600 17 v eop end +%%Page: 2 2 +TeXDict begin 2 1 bop 150 4279 a Fu(This)35 b(text)h(is)g(a)g(brief)f +(description)h(of)f(the)h(features)g(that)g(are)g(presen)m(t)g(in)f +(the)h(Bash)f(shell)h(\(v)m(ersion)150 4389 y(5.1,)c(29)f(Octob)s(er)f +(2020\).)150 4523 y(This)35 b(is)g(Edition)h(5.1,)i(last)f(up)s(dated)d +(29)i(Octob)s(er)g(2020,)j(of)c Fr(The)h(GNU)g(Bash)f(Reference)i(Man)m +(ual)p Fu(,)150 4633 y(for)30 b Ft(Bash)p Fu(,)g(V)-8 +b(ersion)31 b(5.1.)150 4767 y(Cop)m(yrigh)m(t)602 4764 +y(c)577 4767 y Fq(\015)f Fu(1988{2020)35 b(F)-8 b(ree)31 +b(Soft)m(w)m(are)h(F)-8 b(oundation,)31 b(Inc.)390 4902 +y(P)m(ermission)21 b(is)f(gran)m(ted)h(to)g(cop)m(y)-8 +b(,)24 b(distribute)c(and/or)h(mo)s(dify)e(this)i(do)s(cumen)m(t)f +(under)f(the)390 5011 y(terms)25 b(of)h(the)f(GNU)h(F)-8 +b(ree)27 b(Do)s(cumen)m(tation)g(License,)g(V)-8 b(ersion)26 +b(1.3)g(or)f(an)m(y)h(later)g(v)m(ersion)390 5121 y(published)43 +b(b)m(y)h(the)h(F)-8 b(ree)46 b(Soft)m(w)m(are)g(F)-8 +b(oundation;)53 b(with)44 b(no)g(In)m(v)-5 b(arian)m(t)46 +b(Sections,)j(no)390 5230 y(F)-8 b(ron)m(t-Co)m(v)m(er)31 +b(T)-8 b(exts,)30 b(and)f(no)f(Bac)m(k-Co)m(v)m(er)k(T)-8 +b(exts.)41 b(A)29 b(cop)m(y)h(of)f(the)g(license)h(is)f(included)390 +5340 y(in)h(the)h(section)g(en)m(titled)h(\\GNU)f(F)-8 +b(ree)32 b(Do)s(cumen)m(tation)g(License".)p eop end +%%Page: -1 3 +TeXDict begin -1 2 bop 3725 -116 a Fu(i)150 299 y Fp(T)-13 +b(able)53 b(of)h(Con)l(ten)l(ts)150 649 y Fs(1)135 b(In)l(tro)t +(duction)31 b Fo(:)19 b(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)44 b Fs(1)275 786 y Fu(1.1)92 +b(What)31 b(is)f(Bash?)10 b Fn(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)23 b Fu(1)275 896 y(1.2)92 b(What)31 +b(is)f(a)h(shell?)22 b Fn(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)35 b Fu(1)150 1147 y Fs(2)135 b(De\014nitions)31 +b Fo(:)20 b(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:) +f(:)h(:)f(:)g(:)h(:)43 b Fs(3)150 1425 y(3)135 b(Basic)45 +b(Shell)g(F)-11 b(eatures)19 b Fo(:)h(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +h(:)f(:)32 b Fs(5)275 1562 y Fu(3.1)92 b(Shell)30 b(Syn)m(tax)13 +b Fn(:)j(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +27 b Fu(5)399 1671 y(3.1.1)93 b(Shell)30 b(Op)s(eration)14 +b Fn(:)h(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)28 b Fu(5)399 +1781 y(3.1.2)93 b(Quoting)23 b Fn(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)37 b Fu(6)524 1890 y(3.1.2.1)93 +b(Escap)s(e)30 b(Character)19 b Fn(:)d(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)33 b Fu(6)524 +2000 y(3.1.2.2)93 b(Single)31 b(Quotes)16 b Fn(:)g(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)30 +b Fu(6)524 2110 y(3.1.2.3)93 b(Double)31 b(Quotes)14 +b Fn(:)i(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)28 b Fu(6)524 2219 y(3.1.2.4)93 +b(ANSI-C)30 b(Quoting)15 b Fn(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)29 b Fu(6)524 +2329 y(3.1.2.5)93 b(Lo)s(cale-Sp)s(eci\014c)32 b(T)-8 +b(ranslation)17 b Fn(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)30 +b Fu(7)399 2438 y(3.1.3)93 b(Commen)m(ts)14 b Fn(:)i(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)28 b Fu(7)275 2548 y(3.2)92 +b(Shell)30 b(Commands)9 b Fn(:)15 b(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)23 b Fu(8)399 2658 y(3.2.1)93 b(Reserv)m(ed)31 +b(W)-8 b(ords)27 b Fn(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)40 +b Fu(8)399 2767 y(3.2.2)93 b(Simple)30 b(Commands)15 +b Fn(:)f(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)29 b Fu(8)399 2877 y(3.2.3)93 +b(Pip)s(elines)26 b Fn(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)40 b Fu(8)399 2986 y(3.2.4)93 b(Lists)30 +b(of)h(Commands)23 b Fn(:)14 b(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)36 b Fu(9)399 +3096 y(3.2.5)93 b(Comp)s(ound)28 b(Commands)9 b Fn(:)14 +b(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +22 b Fu(10)524 3205 y(3.2.5.1)93 b(Lo)s(oping)30 b(Constructs)16 +b Fn(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)29 +b Fu(10)524 3315 y(3.2.5.2)93 b(Conditional)31 b(Constructs)25 +b Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)39 +b Fu(11)524 3425 y(3.2.5.3)93 b(Grouping)30 b(Commands)22 +b Fn(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)36 +b Fu(15)399 3534 y(3.2.6)93 b(Copro)s(cesses)26 b Fn(:)15 +b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)39 b Fu(15)399 +3644 y(3.2.7)93 b(GNU)31 b(P)m(arallel)13 b Fn(:)k(:)f(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)26 b Fu(16)275 3753 y(3.3)92 b(Shell)30 +b(F)-8 b(unctions)16 b Fn(:)g(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g +(:)h(:)29 b Fu(18)275 3863 y(3.4)92 b(Shell)30 b(P)m(arameters)c +Fn(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)38 b +Fu(20)399 3973 y(3.4.1)93 b(P)m(ositional)32 b(P)m(arameters)8 +b Fn(:)17 b(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)21 b Fu(21)399 4082 y(3.4.2)93 b(Sp)s(ecial)30 +b(P)m(arameters)c Fn(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)37 b Fu(21)275 4192 +y(3.5)92 b(Shell)30 b(Expansions)24 b Fn(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)38 b Fu(22)399 4301 y(3.5.1)93 b(Brace)31 +b(Expansion)9 b Fn(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)22 b +Fu(23)399 4411 y(3.5.2)93 b(Tilde)30 b(Expansion)18 b +Fn(:)d(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)31 b Fu(24)399 4521 y(3.5.3)93 +b(Shell)30 b(P)m(arameter)i(Expansion)26 b Fn(:)15 b(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)39 b Fu(25)399 4630 y(3.5.4)93 +b(Command)29 b(Substitution)20 b Fn(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)33 b Fu(31)399 4740 +y(3.5.5)93 b(Arithmetic)31 b(Expansion)c Fn(:)15 b(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)40 b +Fu(31)399 4849 y(3.5.6)93 b(Pro)s(cess)30 b(Substitution)15 +b Fn(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)28 b Fu(32)399 4959 y(3.5.7)93 b(W)-8 +b(ord)31 b(Splitting)d Fn(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)41 +b Fu(32)399 5068 y(3.5.8)93 b(Filename)32 b(Expansion)22 +b Fn(:)14 b(:)h(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)35 b Fu(33)524 5178 y(3.5.8.1)93 b(P)m(attern)31 +b(Matc)m(hing)14 b Fn(:)k(:)d(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)27 b Fu(33)399 5288 y(3.5.9)93 +b(Quote)31 b(Remo)m(v)-5 b(al)17 b Fn(:)g(:)e(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)30 +b Fu(35)p eop end +%%Page: -2 4 +TeXDict begin -2 3 bop 3699 -116 a Fu(ii)275 83 y(3.6)92 +b(Redirections)14 b Fn(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)27 b Fu(35)399 193 y(3.6.1)93 b(Redirecting)31 +b(Input)11 b Fn(:)j(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)24 b Fu(36)399 302 +y(3.6.2)93 b(Redirecting)31 b(Output)15 b Fn(:)f(:)i(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)28 +b Fu(36)399 412 y(3.6.3)93 b(App)s(ending)28 b(Redirected)k(Output)20 +b Fn(:)14 b(:)h(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)33 b Fu(36)399 +521 y(3.6.4)93 b(Redirecting)31 b(Standard)e(Output)h(and)f(Standard)h +(Error)16 b Fn(:)e(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)29 b +Fu(37)399 631 y(3.6.5)93 b(App)s(ending)28 b(Standard)i(Output)f(and)h +(Standard)f(Error)d Fn(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)40 +b Fu(37)399 741 y(3.6.6)93 b(Here)31 b(Do)s(cumen)m(ts)15 +b Fn(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)27 b Fu(37)399 850 y(3.6.7)93 +b(Here)31 b(Strings)16 b Fn(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)29 +b Fu(38)399 960 y(3.6.8)93 b(Duplicating)32 b(File)f(Descriptors)25 +b Fn(:)15 b(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)37 +b Fu(38)399 1069 y(3.6.9)93 b(Mo)m(ving)32 b(File)f(Descriptors)d +Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +40 b Fu(38)399 1179 y(3.6.10)93 b(Op)s(ening)29 b(File)j(Descriptors)f +(for)f(Reading)h(and)f(W)-8 b(riting)29 b Fn(:)15 b(:)h(:)f(:)g(:)h(:)f +(:)41 b Fu(38)275 1289 y(3.7)92 b(Executing)31 b(Commands)24 +b Fn(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)38 b Fu(39)399 1398 y(3.7.1)93 +b(Simple)30 b(Command)f(Expansion)11 b Fn(:)k(:)g(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)24 b Fu(39)399 1508 y(3.7.2)93 b(Command)29 +b(Searc)m(h)i(and)f(Execution)15 b Fn(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +28 b Fu(39)399 1617 y(3.7.3)93 b(Command)29 b(Execution)i(En)m +(vironmen)m(t)17 b Fn(:)e(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)30 b Fu(40)399 +1727 y(3.7.4)93 b(En)m(vironmen)m(t)26 b Fn(:)16 b(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)39 b Fu(41)399 1836 y(3.7.5)93 b(Exit)31 +b(Status)16 b Fn(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)29 +b Fu(41)399 1946 y(3.7.6)93 b(Signals)23 b Fn(:)15 b(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)36 b Fu(42)275 +2056 y(3.8)92 b(Shell)30 b(Scripts)12 b Fn(:)i(:)i(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)25 b Fu(42)150 2306 +y Fs(4)135 b(Shell)45 b(Builtin)g(Commands)14 b Fo(:)20 +b(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)27 b Fs(44)275 2443 y Fu(4.1)92 b(Bourne)30 +b(Shell)g(Builtins)16 b Fn(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)29 +b Fu(44)275 2553 y(4.2)92 b(Bash)30 b(Builtin)h(Commands)13 +b Fn(:)h(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)26 b Fu(51)275 2663 y(4.3)92 b(Mo)s(difying)30 +b(Shell)g(Beha)m(vior)18 b Fn(:)f(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)31 b Fu(62)399 +2772 y(4.3.1)93 b(The)30 b(Set)g(Builtin)14 b Fn(:)i(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)27 b Fu(62)399 2882 y(4.3.2)93 b(The)30 b(Shopt)f(Builtin)21 +b Fn(:)16 b(:)g(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)34 b Fu(66)275 2991 y(4.4)92 +b(Sp)s(ecial)30 b(Builtins)9 b Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)22 b Fu(72)150 3242 y Fs(5)135 b(Shell)45 +b(V)-11 b(ariables)11 b Fo(:)20 b(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)24 b Fs(73)275 3379 y Fu(5.1)92 +b(Bourne)30 b(Shell)g(V)-8 b(ariables)10 b Fn(:)17 b(:)e(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +23 b Fu(73)275 3489 y(5.2)92 b(Bash)30 b(V)-8 b(ariables)26 +b Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)38 +b Fu(73)150 3739 y Fs(6)135 b(Bash)44 b(F)-11 b(eatures)32 +b Fo(:)19 b(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +44 b Fs(86)275 3876 y Fu(6.1)92 b(In)m(v)m(oking)31 b(Bash)16 +b Fn(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)29 +b Fu(86)275 3986 y(6.2)92 b(Bash)30 b(Startup)g(Files)f +Fn(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)41 b Fu(88)275 +4095 y(6.3)92 b(In)m(teractiv)m(e)32 b(Shells)19 b Fn(:)d(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)32 b Fu(89)399 4205 y(6.3.1)93 +b(What)31 b(is)f(an)h(In)m(teractiv)m(e)h(Shell?)25 b +Fn(:)16 b(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)38 +b Fu(90)399 4315 y(6.3.2)93 b(Is)30 b(this)g(Shell)g(In)m(teractiv)m +(e?)22 b Fn(:)d(:)c(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)35 b Fu(90)399 4424 y(6.3.3)93 b(In)m(teractiv)m(e)33 +b(Shell)d(Beha)m(vior)11 b Fn(:)17 b(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)24 b Fu(90)275 4534 y(6.4)92 b(Bash)30 +b(Conditional)h(Expressions)10 b Fn(:)k(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)23 b Fu(91)275 4643 y(6.5)92 +b(Shell)30 b(Arithmetic)13 b Fn(:)k(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)26 b Fu(93)275 4753 y(6.6)92 b(Aliases)20 b Fn(:)d(:)e(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)33 +b Fu(94)275 4863 y(6.7)92 b(Arra)m(ys)25 b Fn(:)16 b(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)38 +b Fu(95)275 4972 y(6.8)92 b(The)29 b(Directory)j(Stac)m(k)16 +b Fn(:)h(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)29 b Fu(97)399 5082 +y(6.8.1)93 b(Directory)32 b(Stac)m(k)f(Builtins)23 b +Fn(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +36 b Fu(97)275 5191 y(6.9)92 b(Con)m(trolling)31 b(the)g(Prompt)13 +b Fn(:)h(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)25 b Fu(98)275 5301 y(6.10)92 +b(The)30 b(Restricted)h(Shell)9 b Fn(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)22 +b Fu(100)p eop end +%%Page: -3 5 +TeXDict begin -3 4 bop 3674 -116 a Fu(iii)275 83 y(6.11)92 +b(Bash)31 b(POSIX)e(Mo)s(de)14 b Fn(:)i(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)28 +b Fu(101)275 193 y(6.12)92 b(Shell)30 b(Compatibilit)m(y)i(Mo)s(de)25 +b Fn(:)15 b(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)38 b Fu(104)150 443 y Fs(7)135 b(Job)45 b(Con)l(trol)35 +b Fo(:)20 b(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:) +g(:)48 b Fs(107)275 580 y Fu(7.1)92 b(Job)30 b(Con)m(trol)h(Basics)23 +b Fn(:)16 b(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)36 b Fu(107)275 690 +y(7.2)92 b(Job)30 b(Con)m(trol)h(Builtins)11 b Fn(:)k(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)24 b Fu(108)275 800 y(7.3)92 b(Job)30 b(Con)m(trol)h(V)-8 +b(ariables)26 b Fn(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)38 b Fu(110)150 +1050 y Fs(8)135 b(Command)45 b(Line)g(Editing)11 b Fo(:)20 +b(:)g(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)k Fs(111)275 1187 y Fu(8.1)92 b(In)m(tro)s(duction) +30 b(to)h(Line)f(Editing)12 b Fn(:)k(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)25 b Fu(111)275 1297 y(8.2)92 +b(Readline)31 b(In)m(teraction)14 b Fn(:)j(:)e(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)27 +b Fu(111)399 1406 y(8.2.1)93 b(Readline)31 b(Bare)g(Essen)m(tials)13 +b Fn(:)j(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)26 +b Fu(112)399 1516 y(8.2.2)93 b(Readline)31 b(Mo)m(v)m(emen)m(t)i +(Commands)13 b Fn(:)i(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)27 +b Fu(112)399 1626 y(8.2.3)93 b(Readline)31 b(Killing)g(Commands)24 +b Fn(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)38 +b Fu(113)399 1735 y(8.2.4)93 b(Readline)31 b(Argumen)m(ts)17 +b Fn(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)30 b Fu(113)399 1845 y(8.2.5)93 b(Searc)m(hing)31 +b(for)f(Commands)f(in)h(the)h(History)15 b Fn(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)28 b Fu(113)275 +1954 y(8.3)92 b(Readline)31 b(Init)f(File)8 b Fn(:)17 +b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)22 b Fu(114)399 2064 +y(8.3.1)93 b(Readline)31 b(Init)f(File)i(Syn)m(tax)21 +b Fn(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)34 +b Fu(114)399 2174 y(8.3.2)93 b(Conditional)31 b(Init)f(Constructs)14 +b Fn(:)h(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)27 +b Fu(122)399 2283 y(8.3.3)93 b(Sample)30 b(Init)g(File)20 +b Fn(:)d(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)33 b Fu(124)275 2393 y(8.4)92 +b(Bindable)30 b(Readline)h(Commands)19 b Fn(:)c(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)33 b Fu(127)399 2502 y(8.4.1)93 +b(Commands)29 b(F)-8 b(or)31 b(Mo)m(ving)16 b Fn(:)h(:)e(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)29 b Fu(127)399 +2612 y(8.4.2)93 b(Commands)29 b(F)-8 b(or)31 b(Manipulating)g(The)f +(History)c Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)39 b Fu(128)399 2721 y(8.4.3)93 b(Commands)29 b(F)-8 +b(or)31 b(Changing)f(T)-8 b(ext)9 b Fn(:)17 b(:)e(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)23 b Fu(130)399 2831 y(8.4.4)93 b(Killing)31 +b(And)e(Y)-8 b(anking)10 b Fn(:)17 b(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)24 b Fu(131)399 +2941 y(8.4.5)93 b(Sp)s(ecifying)30 b(Numeric)g(Argumen)m(ts)25 +b Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)39 b Fu(132)399 +3050 y(8.4.6)93 b(Letting)31 b(Readline)g(T)m(yp)s(e)f(F)-8 +b(or)31 b(Y)-8 b(ou)20 b Fn(:)c(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)33 +b Fu(133)399 3160 y(8.4.7)93 b(Keyb)s(oard)29 b(Macros)9 +b Fn(:)17 b(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)22 b Fu(134)399 3269 y(8.4.8)93 +b(Some)30 b(Miscellaneous)j(Commands)14 b Fn(:)f(:)j(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)27 b Fu(135)275 3379 y(8.5)92 b(Readline)31 b(vi)f(Mo)s(de)e +Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)41 b Fu(137)275 +3489 y(8.6)92 b(Programmable)30 b(Completion)25 b Fn(:)15 +b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)37 +b Fu(137)275 3598 y(8.7)92 b(Programmable)30 b(Completion)h(Builtins)14 +b Fn(:)i(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)28 b Fu(139)275 +3708 y(8.8)92 b(A)30 b(Programmable)h(Completion)g(Example)8 +b Fn(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)22 b Fu(143)150 3958 y +Fs(9)135 b(Using)45 b(History)h(In)l(teractiv)l(ely)28 +b Fo(:)22 b(:)d(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g +(:)h(:)41 b Fs(146)275 4095 y Fu(9.1)92 b(Bash)30 b(History)h(F)-8 +b(acilities)9 b Fn(:)19 b(:)c(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)22 b Fu(146)275 +4205 y(9.2)92 b(Bash)30 b(History)h(Builtins)d Fn(:)16 +b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)h(:)f(:)41 b Fu(146)275 4315 y(9.3)92 b(History)31 +b(Expansion)10 b Fn(:)k(:)h(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)23 +b Fu(148)399 4424 y(9.3.1)93 b(Ev)m(en)m(t)31 b(Designators)19 +b Fn(:)e(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)32 b Fu(149)399 4534 y(9.3.2)93 b(W)-8 +b(ord)31 b(Designators)c Fn(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)39 b Fu(150)399 +4643 y(9.3.3)93 b(Mo)s(di\014ers)15 b Fn(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)29 b Fu(150)p eop end +%%Page: -4 6 +TeXDict begin -4 5 bop 3677 -116 a Fu(iv)150 83 y Fs(10)135 +b(Installing)46 b(Bash)16 b Fo(:)j(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)h(:)f(:)29 b Fs(152)275 220 y Fu(10.1)92 b(Basic)32 +b(Installation)8 b Fn(:)17 b(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)22 +b Fu(152)275 330 y(10.2)92 b(Compilers)30 b(and)g(Options)17 +b Fn(:)d(:)i(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)30 b Fu(153)275 439 y(10.3)92 b(Compiling)30 +b(F)-8 b(or)32 b(Multiple)f(Arc)m(hitectures)10 b Fn(:)16 +b(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)23 b Fu(153)275 549 y(10.4)92 +b(Installation)32 b(Names)22 b Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)35 +b Fu(153)275 658 y(10.5)92 b(Sp)s(ecifying)30 b(the)g(System)h(T)m(yp)s +(e)21 b Fn(:)14 b(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)34 b Fu(154)275 768 y(10.6)92 b(Sharing)30 b(Defaults)24 +b Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)37 b Fu(154)275 +878 y(10.7)92 b(Op)s(eration)30 b(Con)m(trols)12 b Fn(:)k(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)25 b Fu(154)275 987 y(10.8)92 b(Optional)31 +b(F)-8 b(eatures)19 b Fn(:)d(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)32 +b Fu(155)150 1238 y Fs(App)t(endix)44 b(A)119 b(Rep)t(orting)46 +b(Bugs)21 b Fo(:)f(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)35 b Fs(160)150 1498 y(App)t(endix)44 +b(B)125 b(Ma)7 b(jor)46 b(Di\013erences)g(F)-11 b(rom)284 +1639 y(The)45 b(Bourne)f(Shell)35 b Fo(:)19 b(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)47 b Fs(161)275 1776 y Fu(B.1)92 +b(Implemen)m(tation)31 b(Di\013erences)h(F)-8 b(rom)31 +b(The)e(SVR4.2)j(Shell)22 b Fn(:)15 b(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)35 b Fu(165)150 2027 y Fs(App)t(endix)44 b(C)124 b(GNU)36 +b(F)-11 b(ree)35 b(Do)t(cumen)l(tation)i(License)25 b +Fo(:)20 b(:)29 b Fs(167)150 2305 y(App)t(endix)44 b(D)118 +b(Indexes)27 b Fo(:)20 b(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)40 +b Fs(175)275 2442 y Fu(D.1)92 b(Index)29 b(of)i(Shell)f(Builtin)h +(Commands)23 b Fn(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)38 +b Fu(175)275 2552 y(D.2)92 b(Index)29 b(of)i(Shell)f(Reserv)m(ed)h(W)-8 +b(ords)20 b Fn(:)c(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)34 +b Fu(176)275 2661 y(D.3)92 b(P)m(arameter)31 b(and)f(V)-8 +b(ariable)32 b(Index)27 b Fn(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)42 b Fu(177)275 2771 y(D.4)92 b(F)-8 b(unction)31 +b(Index)24 b Fn(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)38 +b Fu(179)275 2880 y(D.5)92 b(Concept)30 b(Index)15 b +Fn(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)29 b +Fu(181)p eop end +%%Page: 1 7 +TeXDict begin 1 6 bop 3705 -116 a Fu(1)150 299 y Fp(1)80 +b(In)l(tro)t(duction)150 604 y Fs(1.1)68 b(What)45 b(is)g(Bash?)150 +763 y Fu(Bash)38 b(is)g(the)g(shell,)i(or)d(command)h(language)h(in)m +(terpreter,)h(for)e(the)g Fm(gnu)f Fu(op)s(erating)h(system.)63 +b(The)150 873 y(name)33 b(is)g(an)g(acron)m(ym)g(for)g(the)g(`)p +Ft(Bourne-Again)27 b(SHell)p Fu(',)32 b(a)i(pun)d(on)i(Stephen)f +(Bourne,)h(the)g(author)150 983 y(of)f(the)f(direct)h(ancestor)h(of)e +(the)h(curren)m(t)f(Unix)g(shell)h Ft(sh)p Fu(,)f(whic)m(h)g(app)s +(eared)g(in)g(the)h(Sev)m(en)m(th)g(Edition)150 1092 +y(Bell)g(Labs)e(Researc)m(h)h(v)m(ersion)g(of)f(Unix.)275 +1221 y(Bash)f(is)g(largely)i(compatible)f(with)f Ft(sh)g +Fu(and)g(incorp)s(orates)g(useful)g(features)g(from)g(the)g(Korn)g +(shell)150 1330 y Ft(ksh)37 b Fu(and)h(the)g(C)g(shell)g +Ft(csh)p Fu(.)64 b(It)38 b(is)g(in)m(tended)g(to)h(b)s(e)f(a)g +(conforman)m(t)h(implemen)m(tation)h(of)e(the)g Fm(ieee)150 +1440 y(posix)c Fu(Shell)g(and)g(T)-8 b(o)s(ols)35 b(p)s(ortion)f(of)g +(the)h Fm(ieee)f(posix)f Fu(sp)s(eci\014cation)j(\()p +Fm(ieee)e Fu(Standard)f(1003.1\).)56 b(It)150 1550 y(o\013ers)31 +b(functional)f(impro)m(v)m(emen)m(ts)i(o)m(v)m(er)g Ft(sh)d +Fu(for)i(b)s(oth)e(in)m(teractiv)m(e)k(and)d(programming)g(use.)275 +1678 y(While)h(the)g Fm(gnu)f Fu(op)s(erating)h(system)g(pro)m(vides)f +(other)h(shells,)g(including)f(a)h(v)m(ersion)g(of)g +Ft(csh)p Fu(,)f(Bash)150 1788 y(is)j(the)h(default)f(shell.)49 +b(Lik)m(e)34 b(other)g Fm(gnu)f Fu(soft)m(w)m(are,)i(Bash)f(is)f(quite) +h(p)s(ortable.)49 b(It)33 b(curren)m(tly)g(runs)f(on)150 +1897 y(nearly)c(ev)m(ery)g(v)m(ersion)g(of)f(Unix)h(and)e(a)i(few)f +(other)h(op)s(erating)g(systems)f Fq(\000)g Fu(indep)s(enden)m +(tly-supp)s(orted)150 2007 y(p)s(orts)j(exist)h(for)f +Fm(ms-dos)p Fu(,)f Fm(os/2)p Fu(,)i(and)f(Windo)m(ws)g(platforms.)150 +2236 y Fs(1.2)68 b(What)45 b(is)g(a)h(shell?)150 2395 +y Fu(A)m(t)32 b(its)f(base,)h(a)f(shell)g(is)h(simply)e(a)h(macro)h +(pro)s(cessor)f(that)g(executes)i(commands.)42 b(The)30 +b(term)h(macro)150 2505 y(pro)s(cessor)25 b(means)g(functionalit)m(y)i +(where)d(text)j(and)d(sym)m(b)s(ols)h(are)h(expanded)e(to)i(create)h +(larger)f(expres-)150 2615 y(sions.)275 2743 y(A)34 b(Unix)h(shell)g +(is)f(b)s(oth)g(a)h(command)g(in)m(terpreter)g(and)f(a)h(programming)f +(language.)55 b(As)35 b(a)g(com-)150 2853 y(mand)30 b(in)m(terpreter,)i +(the)g(shell)f(pro)m(vides)g(the)h(user)e(in)m(terface)j(to)f(the)f +(ric)m(h)h(set)g(of)f Fm(gnu)g Fu(utilities.)44 b(The)150 +2962 y(programming)30 b(language)h(features)f(allo)m(w)h(these)g +(utilities)g(to)g(b)s(e)e(com)m(bined.)41 b(Files)31 +b(con)m(taining)g(com-)150 3072 y(mands)e(can)i(b)s(e)e(created,)j(and) +d(b)s(ecome)i(commands)f(themselv)m(es.)42 b(These)30 +b(new)f(commands)h(ha)m(v)m(e)i(the)150 3182 y(same)j(status)g(as)g +(system)g(commands)f(in)g(directories)i(suc)m(h)e(as)h +Ft(/bin)p Fu(,)g(allo)m(wing)h(users)e(or)g(groups)g(to)150 +3291 y(establish)d(custom)f(en)m(vironmen)m(ts)h(to)g(automate)h(their) +f(common)f(tasks.)275 3420 y(Shells)j(ma)m(y)h(b)s(e)f(used)g(in)m +(teractiv)m(ely)k(or)d(non-in)m(teractiv)m(ely)-8 b(.)54 +b(In)33 b(in)m(teractiv)m(e)j(mo)s(de,)f(they)e(accept)150 +3529 y(input)21 b(t)m(yp)s(ed)h(from)g(the)h(k)m(eyb)s(oard.)37 +b(When)22 b(executing)i(non-in)m(teractiv)m(ely)-8 b(,)27 +b(shells)c(execute)g(commands)150 3639 y(read)30 b(from)g(a)h(\014le.) +275 3768 y(A)41 b(shell)g(allo)m(ws)h(execution)h(of)e +Fm(gnu)g Fu(commands,)i(b)s(oth)e(sync)m(hronously)f(and)h(async)m +(hronously)-8 b(.)150 3877 y(The)29 b(shell)g(w)m(aits)i(for)e(sync)m +(hronous)f(commands)h(to)h(complete)h(b)s(efore)e(accepting)i(more)e +(input;)g(asyn-)150 3987 y(c)m(hronous)22 b(commands)h(con)m(tin)m(ue)h +(to)f(execute)h(in)e(parallel)i(with)f(the)f(shell)h(while)g(it)g +(reads)g(and)f(executes)150 4096 y(additional)35 b(commands.)50 +b(The)33 b Fr(redirection)h Fu(constructs)g(p)s(ermit)f(\014ne-grained) +g(con)m(trol)i(of)f(the)g(input)150 4206 y(and)40 b(output)f(of)i +(those)f(commands.)70 b(Moreo)m(v)m(er,)45 b(the)c(shell)f(allo)m(ws)h +(con)m(trol)h(o)m(v)m(er)g(the)e(con)m(ten)m(ts)i(of)150 +4316 y(commands')30 b(en)m(vironmen)m(ts.)275 4444 y(Shells)k(also)i +(pro)m(vide)g(a)f(small)h(set)f(of)g(built-in)g(commands)g(\()p +Fr(builtins)t Fu(\))g(implemen)m(ting)h(function-)150 +4554 y(alit)m(y)i(imp)s(ossible)e(or)g(incon)m(v)m(enien)m(t)j(to)e +(obtain)g(via)g(separate)g(utilities.)61 b(F)-8 b(or)37 +b(example,)i Ft(cd)p Fu(,)e Ft(break)p Fu(,)150 4663 +y Ft(continue)p Fu(,)28 b(and)i Ft(exec)f Fu(cannot)i(b)s(e)f(implemen) +m(ted)h(outside)g(of)f(the)h(shell)f(b)s(ecause)h(they)f(directly)h +(ma-)150 4773 y(nipulate)d(the)g(shell)g(itself.)41 b(The)27 +b Ft(history)p Fu(,)g Ft(getopts)p Fu(,)f Ft(kill)p Fu(,)i(or)g +Ft(pwd)f Fu(builtins,)h(among)g(others,)h(could)150 4883 +y(b)s(e)34 b(implemen)m(ted)g(in)g(separate)h(utilities,)i(but)d(they)g +(are)g(more)h(con)m(v)m(enien)m(t)h(to)f(use)f(as)g(builtin)g(com-)150 +4992 y(mands.)40 b(All)31 b(of)f(the)h(shell)f(builtins)g(are)h +(describ)s(ed)e(in)h(subsequen)m(t)g(sections.)275 5121 +y(While)39 b(executing)h(commands)e(is)g(essen)m(tial,)43 +b(most)c(of)g(the)g(p)s(o)m(w)m(er)f(\(and)g(complexit)m(y\))j(of)e +(shells)150 5230 y(is)34 b(due)f(to)i(their)f(em)m(b)s(edded)f +(programming)h(languages.)52 b(Lik)m(e)35 b(an)m(y)f(high-lev)m(el)i +(language,)h(the)d(shell)150 5340 y(pro)m(vides)c(v)-5 +b(ariables,)32 b(\015o)m(w)e(con)m(trol)i(constructs,)f(quoting,)g(and) +f(functions.)p eop end +%%Page: 2 8 +TeXDict begin 2 7 bop 150 -116 a Fu(Chapter)30 b(1:)41 +b(In)m(tro)s(duction)2592 b(2)275 299 y(Shells)21 b(o\013er)i(features) +f(geared)h(sp)s(eci\014cally)g(for)f(in)m(teractiv)m(e)j(use)d(rather)g +(than)g(to)h(augmen)m(t)g(the)f(pro-)150 408 y(gramming)32 +b(language.)48 b(These)32 b(in)m(teractiv)m(e)j(features)d(include)g +(job)g(con)m(trol,)j(command)c(line)i(editing,)150 518 +y(command)d(history)g(and)g(aliases.)42 b(Eac)m(h)31 +b(of)g(these)g(features)f(is)h(describ)s(ed)e(in)h(this)g(man)m(ual.)p +eop end +%%Page: 3 9 +TeXDict begin 3 8 bop 3705 -116 a Fu(3)150 299 y Fp(2)80 +b(De\014nitions)150 552 y Fu(These)30 b(de\014nitions)g(are)h(used)e +(throughout)h(the)h(remainder)f(of)g(this)h(man)m(ual.)150 +720 y Ft(POSIX)240 b Fu(A)27 b(family)g(of)g(op)s(en)f(system)g +(standards)g(based)g(on)h(Unix.)39 b(Bash)27 b(is)g(primarily)f +(concerned)630 830 y(with)k(the)h(Shell)f(and)g(Utilities)i(p)s(ortion) +e(of)h(the)f Fm(posix)g Fu(1003.1)j(standard.)150 995 +y Ft(blank)240 b Fu(A)30 b(space)h(or)g(tab)f(c)m(haracter.)150 +1161 y Ft(builtin)144 b Fu(A)35 b(command)g(that)g(is)g(implemen)m(ted) +g(in)m(ternally)h(b)m(y)f(the)g(shell)g(itself,)i(rather)d(than)h(b)m +(y)630 1271 y(an)30 b(executable)i(program)e(somewhere)h(in)f(the)g +(\014le)h(system.)150 1436 y Ft(control)d(operator)630 +1546 y Fu(A)20 b Ft(token)f Fu(that)i(p)s(erforms)e(a)i(con)m(trol)g +(function.)37 b(It)21 b(is)f(a)h Ft(newline)d Fu(or)j(one)f(of)h(the)f +(follo)m(wing:)630 1655 y(`)p Ft(||)p Fu(',)31 b(`)p +Ft(&&)p Fu(',)f(`)p Ft(&)p Fu(',)h(`)p Ft(;)p Fu(',)g(`)p +Ft(;;)p Fu(',)f(`)p Ft(;&)p Fu(',)h(`)p Ft(;;&)p Fu(',)f(`)p +Ft(|)p Fu(',)h(`)p Ft(|&)p Fu(',)f(`)p Ft(\()p Fu(',)h(or)f(`)p +Ft(\))p Fu('.)150 1821 y Ft(exit)f(status)630 1931 y +Fu(The)f(v)-5 b(alue)29 b(returned)e(b)m(y)h(a)h(command)f(to)h(its)g +(caller.)41 b(The)28 b(v)-5 b(alue)29 b(is)f(restricted)h(to)h(eigh)m +(t)630 2040 y(bits,)h(so)f(the)h(maxim)m(um)f(v)-5 b(alue)31 +b(is)f(255.)150 2206 y Ft(field)240 b Fu(A)27 b(unit)g(of)g(text)h +(that)g(is)f(the)g(result)g(of)g(one)h(of)f(the)g(shell)g(expansions.) +40 b(After)27 b(expansion,)630 2315 y(when)e(executing)h(a)g(command,)h +(the)f(resulting)f(\014elds)g(are)h(used)f(as)h(the)g(command)f(name) +630 2425 y(and)30 b(argumen)m(ts.)150 2591 y Ft(filename)96 +b Fu(A)30 b(string)h(of)f(c)m(haracters)i(used)e(to)h(iden)m(tify)g(a)f +(\014le.)150 2756 y Ft(job)336 b Fu(A)31 b(set)h(of)f(pro)s(cesses)g +(comprising)g(a)g(pip)s(eline,)g(and)g(an)m(y)g(pro)s(cesses)g +(descended)g(from)f(it,)630 2866 y(that)h(are)g(all)g(in)f(the)h(same)f +(pro)s(cess)g(group.)150 3031 y Ft(job)f(control)630 +3141 y Fu(A)22 b(mec)m(hanism)g(b)m(y)f(whic)m(h)h(users)f(can)h +(selectiv)m(ely)i(stop)e(\(susp)s(end\))e(and)h(restart)i(\(resume\)) +630 3251 y(execution)32 b(of)e(pro)s(cesses.)150 3416 +y Ft(metacharacter)630 3526 y Fu(A)23 b(c)m(haracter)h(that,)h(when)d +(unquoted,)h(separates)h(w)m(ords.)37 b(A)23 b(metac)m(haracter)i(is)e +(a)g Ft(space)p Fu(,)630 3635 y Ft(tab)p Fu(,)29 b Ft(newline)p +Fu(,)e(or)i(one)h(of)f(the)h(follo)m(wing)g(c)m(haracters:)42 +b(`)p Ft(|)p Fu(',)29 b(`)p Ft(&)p Fu(',)h(`)p Ft(;)p +Fu(',)g(`)p Ft(\()p Fu(',)g(`)p Ft(\))p Fu(',)g(`)p Ft(<)p +Fu(',)f(or)h(`)p Ft(>)p Fu('.)150 3801 y Ft(name)288 +b Fu(A)37 b Ft(word)f Fu(consisting)i(solely)h(of)e(letters,)j(n)m(um)m +(b)s(ers,)e(and)f(underscores,)h(and)f(b)s(eginning)630 +3910 y(with)23 b(a)g(letter)h(or)f(underscore.)38 b Ft(Name)p +Fu(s)22 b(are)h(used)f(as)i(shell)f(v)-5 b(ariable)24 +b(and)e(function)h(names.)630 4020 y(Also)31 b(referred)f(to)h(as)f(an) +h Ft(identifier)p Fu(.)150 4186 y Ft(operator)96 b Fu(A)38 +b Ft(control)28 b(operator)36 b Fu(or)h(a)i Ft(redirection)27 +b(operator)p Fu(.)61 b(See)38 b(Section)g(3.6)h([Redirec-)630 +4295 y(tions],)f(page)f(35,)i(for)d(a)g(list)h(of)f(redirection)h(op)s +(erators.)58 b(Op)s(erators)35 b(con)m(tain)j(at)f(least)630 +4405 y(one)31 b(unquoted)e Ft(metacharacter)p Fu(.)150 +4570 y Ft(process)f(group)630 4680 y Fu(A)i(collection)k(of)c(related)h +(pro)s(cesses)g(eac)m(h)g(ha)m(ving)g(the)g(same)f(pro)s(cess)g(group)g +Fm(id)p Fu(.)150 4846 y Ft(process)e(group)h(ID)630 4955 +y Fu(A)h(unique)g(iden)m(ti\014er)h(that)f(represen)m(ts)h(a)g +Ft(process)d(group)h Fu(during)g(its)i(lifetime.)150 +5121 y Ft(reserved)d(word)630 5230 y Fu(A)h Ft(word)e +Fu(that)i(has)f(a)h(sp)s(ecial)g(meaning)f(to)h(the)g(shell.)40 +b(Most)30 b(reserv)m(ed)e(w)m(ords)g(in)m(tro)s(duce)630 +5340 y(shell)j(\015o)m(w)f(con)m(trol)i(constructs,)f(suc)m(h)f(as)g +Ft(for)g Fu(and)g Ft(while)p Fu(.)p eop end +%%Page: 4 10 +TeXDict begin 4 9 bop 150 -116 a Fu(Chapter)30 b(2:)41 +b(De\014nitions)2662 b(4)150 299 y Ft(return)29 b(status)630 +408 y Fu(A)h(synon)m(ym)g(for)g Ft(exit)g(status)p Fu(.)150 +568 y Ft(signal)192 b Fu(A)40 b(mec)m(hanism)h(b)m(y)e(whic)m(h)h(a)h +(pro)s(cess)e(ma)m(y)i(b)s(e)e(noti\014ed)h(b)m(y)g(the)h(k)m(ernel)f +(of)g(an)g(ev)m(en)m(t)630 677 y(o)s(ccurring)30 b(in)g(the)h(system.) +150 837 y Ft(special)d(builtin)630 946 y Fu(A)j(shell)f(builtin)g +(command)h(that)g(has)f(b)s(een)g(classi\014ed)h(as)g(sp)s(ecial)g(b)m +(y)f(the)h Fm(posix)f Fu(stan-)630 1056 y(dard.)150 1215 +y Ft(token)240 b Fu(A)38 b(sequence)h(of)f(c)m(haracters)h(considered)f +(a)h(single)g(unit)e(b)m(y)h(the)h(shell.)64 b(It)38 +b(is)g(either)h(a)630 1325 y Ft(word)29 b Fu(or)i(an)f +Ft(operator)p Fu(.)150 1484 y Ft(word)288 b Fu(A)28 b(sequence)g(of)g +(c)m(haracters)h(treated)g(as)f(a)g(unit)f(b)m(y)h(the)g(shell.)40 +b(W)-8 b(ords)28 b(ma)m(y)g(not)g(include)630 1594 y(unquoted)i +Ft(metacharacters)p Fu(.)p eop end +%%Page: 5 11 +TeXDict begin 5 10 bop 3705 -116 a Fu(5)150 299 y Fp(3)80 +b(Basic)54 b(Shell)e(F)-13 b(eatures)150 601 y Fu(Bash)21 +b(is)g(an)f(acron)m(ym)i(for)e(`)p Ft(Bourne-Again)27 +b(SHell)p Fu('.)37 b(The)20 b(Bourne)g(shell)h(is)g(the)g(traditional)h +(Unix)f(shell)150 710 y(originally)h(written)f(b)m(y)f(Stephen)g +(Bourne.)38 b(All)21 b(of)g(the)g(Bourne)f(shell)h(builtin)f(commands)g +(are)i(a)m(v)-5 b(ailable)150 820 y(in)26 b(Bash,)h(The)f(rules)f(for)h +(ev)-5 b(aluation)28 b(and)d(quoting)h(are)h(tak)m(en)g(from)f(the)g +Fm(posix)f Fu(sp)s(eci\014cation)i(for)f(the)150 929 +y(`standard')k(Unix)g(shell.)275 1086 y(This)h(c)m(hapter)i(brie\015y)e +(summarizes)h(the)h(shell's)f(`building)g(blo)s(c)m(ks':)45 +b(commands,)32 b(con)m(trol)i(struc-)150 1196 y(tures,)k(shell)e +(functions,)h(shell)g Fl(p)-5 b(ar)g(ameters)p Fu(,)41 +b(shell)36 b(expansions,)i Fl(r)-5 b(e)g(dir)g(e)g(ctions)p +Fu(,)40 b(whic)m(h)c(are)h(a)f(w)m(a)m(y)h(to)150 1306 +y(direct)31 b(input)e(and)h(output)g(from)g(and)g(to)h(named)f +(\014les,)g(and)g(ho)m(w)g(the)h(shell)g(executes)g(commands.)150 +1580 y Fs(3.1)68 b(Shell)45 b(Syn)l(tax)150 1740 y Fu(When)40 +b(the)h(shell)g(reads)f(input,)i(it)f(pro)s(ceeds)f(through)g(a)h +(sequence)g(of)g(op)s(erations.)71 b(If)40 b(the)h(input)150 +1849 y(indicates)31 b(the)f(b)s(eginning)f(of)h(a)g(commen)m(t,)h(the)f +(shell)g(ignores)g(the)g(commen)m(t)h(sym)m(b)s(ol)f(\(`)p +Ft(#)p Fu('\),)h(and)e(the)150 1959 y(rest)i(of)f(that)h(line.)275 +2116 y(Otherwise,)h(roughly)f(sp)s(eaking,)i(the)f(shell)g(reads)g(its) +g(input)f(and)h(divides)f(the)i(input)e(in)m(to)h(w)m(ords)150 +2225 y(and)23 b(op)s(erators,)j(emplo)m(ying)e(the)g(quoting)h(rules)e +(to)h(select)i(whic)m(h)d(meanings)h(to)h(assign)f(v)-5 +b(arious)23 b(w)m(ords)150 2335 y(and)30 b(c)m(haracters.)275 +2492 y(The)38 b(shell)h(then)f(parses)g(these)h(tok)m(ens)h(in)m(to)f +(commands)g(and)f(other)h(constructs,)i(remo)m(v)m(es)f(the)150 +2602 y(sp)s(ecial)31 b(meaning)f(of)g(certain)h(w)m(ords)f(or)g(c)m +(haracters,)i(expands)d(others,)h(redirects)h(input)e(and)g(output)150 +2711 y(as)d(needed,)g(executes)g(the)g(sp)s(eci\014ed)e(command,)j(w)m +(aits)f(for)f(the)g(command's)g(exit)i(status,)f(and)f(mak)m(es)150 +2821 y(that)31 b(exit)g(status)g(a)m(v)-5 b(ailable)33 +b(for)d(further)f(insp)s(ection)h(or)h(pro)s(cessing.)150 +3043 y Fk(3.1.1)63 b(Shell)41 b(Op)s(eration)150 3190 +y Fu(The)c(follo)m(wing)h(is)f(a)h(brief)e(description)i(of)f(the)g +(shell's)h(op)s(eration)f(when)f(it)i(reads)f(and)f(executes)j(a)150 +3299 y(command.)h(Basically)-8 b(,)34 b(the)c(shell)h(do)s(es)f(the)h +(follo)m(wing:)199 3456 y(1.)61 b(Reads)42 b(its)h(input)e(from)h(a)g +(\014le)h(\(see)g(Section)g(3.8)g([Shell)f(Scripts],)j(page)e(42\),)k +(from)41 b(a)i(string)330 3566 y(supplied)30 b(as)h(an)g(argumen)m(t)h +(to)g(the)f Ft(-c)g Fu(in)m(v)m(o)s(cation)i(option)f(\(see)g(Section)g +(6.1)g([In)m(v)m(oking)g(Bash],)330 3675 y(page)f(86\),)h(or)e(from)g +(the)h(user's)f(terminal.)199 3821 y(2.)61 b(Breaks)43 +b(the)g(input)f(in)m(to)h(w)m(ords)f(and)g(op)s(erators,)k(ob)s(eying)d +(the)g(quoting)g(rules)f(describ)s(ed)f(in)330 3931 y(Section)27 +b(3.1.2)i([Quoting],)f(page)f(6.)40 b(These)26 b(tok)m(ens)i(are)f +(separated)g(b)m(y)f Ft(metacharacters)p Fu(.)36 b(Alias)330 +4040 y(expansion)30 b(is)h(p)s(erformed)d(b)m(y)j(this)f(step)g(\(see)i +(Section)f(6.6)g([Aliases],)i(page)e(94\).)199 4186 y(3.)61 +b(P)m(arses)35 b(the)g(tok)m(ens)g(in)m(to)h(simple)e(and)g(comp)s +(ound)f(commands)h(\(see)h(Section)h(3.2)f([Shell)g(Com-)330 +4296 y(mands],)30 b(page)h(8\).)199 4442 y(4.)61 b(P)m(erforms)40 +b(the)h(v)-5 b(arious)40 b(shell)h(expansions)f(\(see)h(Section)g(3.5)g +([Shell)g(Expansions],)h(page)f(22\),)330 4551 y(breaking)35 +b(the)g(expanded)g(tok)m(ens)h(in)m(to)g(lists)f(of)g(\014lenames)h +(\(see)g(Section)f(3.5.8)i([Filename)g(Ex-)330 4661 y(pansion],)30 +b(page)h(33\))h(and)e(commands)g(and)g(argumen)m(ts.)199 +4807 y(5.)61 b(P)m(erforms)36 b(an)m(y)i(necessary)f(redirections)g +(\(see)h(Section)f(3.6)h([Redirections],)i(page)e(35\))g(and)e(re-)330 +4916 y(mo)m(v)m(es)c(the)e(redirection)h(op)s(erators)g(and)f(their)g +(op)s(erands)f(from)h(the)h(argumen)m(t)f(list.)199 5062 +y(6.)61 b(Executes)31 b(the)g(command)f(\(see)h(Section)g(3.7)h +([Executing)f(Commands],)f(page)h(39\).)199 5208 y(7.)61 +b(Optionally)40 b(w)m(aits)g(for)f(the)g(command)g(to)h(complete)g(and) +f(collects)i(its)f(exit)g(status)f(\(see)h(Sec-)330 5317 +y(tion)31 b(3.7.5)h([Exit)f(Status],)g(page)g(41\).)p +eop end +%%Page: 6 12 +TeXDict begin 6 11 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2292 b(6)150 299 +y Fk(3.1.2)63 b(Quoting)150 446 y Fu(Quoting)32 b(is)h(used)e(to)i +(remo)m(v)m(e)h(the)e(sp)s(ecial)h(meaning)f(of)h(certain)g(c)m +(haracters)g(or)f(w)m(ords)g(to)h(the)f(shell.)150 555 +y(Quoting)c(can)f(b)s(e)g(used)f(to)j(disable)e(sp)s(ecial)h(treatmen)m +(t)h(for)e(sp)s(ecial)h(c)m(haracters,)i(to)e(prev)m(en)m(t)g(reserv)m +(ed)150 665 y(w)m(ords)i(from)g(b)s(eing)g(recognized)h(as)g(suc)m(h,)f +(and)g(to)h(prev)m(en)m(t)g(parameter)g(expansion.)275 +795 y(Eac)m(h)22 b(of)g(the)g(shell)g(metac)m(haracters)i(\(see)f +(Chapter)e(2)i([De\014nitions],)h(page)f(3\))g(has)e(sp)s(ecial)i +(meaning)150 905 y(to)40 b(the)g(shell)f(and)g(m)m(ust)g(b)s(e)g +(quoted)g(if)h(it)g(is)f(to)h(represen)m(t)g(itself.)68 +b(When)39 b(the)h(command)f(history)150 1015 y(expansion)i(facilities)j +(are)e(b)s(eing)f(used)g(\(see)h(Section)h(9.3)f([History)h(In)m +(teraction],)j(page)c(148\),)47 b(the)150 1124 y Fr(history)30 +b(expansion)h Fu(c)m(haracter,)h(usually)f(`)p Ft(!)p +Fu(',)g(m)m(ust)f(b)s(e)g(quoted)h(to)g(prev)m(en)m(t)g(history)g +(expansion.)41 b(See)150 1234 y(Section)22 b(9.1)g([Bash)f(History)h(F) +-8 b(acilities],)26 b(page)c(146,)j(for)20 b(more)h(details)h +(concerning)g(history)f(expansion.)275 1364 y(There)37 +b(are)h(three)f(quoting)h(mec)m(hanisms:)56 b(the)38 +b Fr(escap)s(e)g(c)m(haracter)p Fu(,)j(single)d(quotes,)i(and)d(double) +150 1474 y(quotes.)150 1665 y Fk(3.1.2.1)63 b(Escap)s(e)41 +b(Character)150 1812 y Fu(A)36 b(non-quoted)f(bac)m(kslash)h(`)p +Ft(\\)p Fu(')g(is)f(the)h(Bash)g(escap)s(e)f(c)m(haracter.)58 +b(It)36 b(preserv)m(es)f(the)h(literal)h(v)-5 b(alue)36 +b(of)150 1921 y(the)27 b(next)g(c)m(haracter)h(that)f(follo)m(ws,)i +(with)d(the)h(exception)g(of)g Ft(newline)p Fu(.)38 b(If)26 +b(a)h Ft(\\newline)d Fu(pair)i(app)s(ears,)150 2031 y(and)k(the)h(bac)m +(kslash)g(itself)g(is)g(not)g(quoted,)g(the)f Ft(\\newline)f +Fu(is)h(treated)i(as)f(a)g(line)g(con)m(tin)m(uation)h(\(that)150 +2140 y(is,)f(it)g(is)f(remo)m(v)m(ed)h(from)f(the)h(input)e(stream)i +(and)f(e\013ectiv)m(ely)j(ignored\).)150 2331 y Fk(3.1.2.2)63 +b(Single)42 b(Quotes)150 2478 y Fu(Enclosing)24 b(c)m(haracters)h(in)e +(single)h(quotes)g(\(`)p Ft(')p Fu('\))g(preserv)m(es)g(the)f(literal)i +(v)-5 b(alue)24 b(of)g(eac)m(h)g(c)m(haracter)h(within)150 +2588 y(the)31 b(quotes.)42 b(A)31 b(single)h(quote)f(ma)m(y)g(not)g(o)s +(ccur)g(b)s(et)m(w)m(een)g(single)h(quotes,)f(ev)m(en)h(when)d +(preceded)i(b)m(y)g(a)150 2697 y(bac)m(kslash.)150 2888 +y Fk(3.1.2.3)63 b(Double)42 b(Quotes)150 3035 y Fu(Enclosing)24 +b(c)m(haracters)h(in)f(double)f(quotes)h(\(`)p Ft(")p +Fu('\))g(preserv)m(es)g(the)g(literal)h(v)-5 b(alue)24 +b(of)g(all)g(c)m(haracters)h(within)150 3145 y(the)34 +b(quotes,)h(with)f(the)g(exception)h(of)f(`)p Ft($)p +Fu(',)h(`)p Ft(`)p Fu(',)g(`)p Ft(\\)p Fu(',)g(and,)f(when)f(history)g +(expansion)h(is)g(enabled,)h(`)p Ft(!)p Fu('.)150 3254 +y(When)c(the)g(shell)g(is)g(in)f Fm(posix)h Fu(mo)s(de)f(\(see)i +(Section)g(6.11)g([Bash)f(POSIX)f(Mo)s(de],)i(page)g(101\),)h(the)e(`)p +Ft(!)p Fu(')150 3364 y(has)d(no)g(sp)s(ecial)h(meaning)g(within)f +(double)g(quotes,)h(ev)m(en)g(when)f(history)g(expansion)g(is)g +(enabled.)40 b(The)150 3474 y(c)m(haracters)h(`)p Ft($)p +Fu(')e(and)g(`)p Ft(`)p Fu(')g(retain)h(their)f(sp)s(ecial)h(meaning)f +(within)g(double)g(quotes)h(\(see)g(Section)g(3.5)150 +3583 y([Shell)29 b(Expansions],)g(page)h(22\).)41 b(The)28 +b(bac)m(kslash)i(retains)f(its)h(sp)s(ecial)f(meaning)g(only)g(when)f +(follo)m(w)m(ed)150 3693 y(b)m(y)41 b(one)f(of)h(the)g(follo)m(wing)h +(c)m(haracters:)63 b(`)p Ft($)p Fu(',)43 b(`)p Ft(`)p +Fu(',)h(`)p Ft(")p Fu(',)g(`)p Ft(\\)p Fu(',)f(or)e Ft(newline)p +Fu(.)69 b(Within)41 b(double)f(quotes,)150 3802 y(bac)m(kslashes)25 +b(that)h(are)f(follo)m(w)m(ed)h(b)m(y)e(one)h(of)g(these)g(c)m +(haracters)h(are)f(remo)m(v)m(ed.)40 b(Bac)m(kslashes)26 +b(preceding)150 3912 y(c)m(haracters)35 b(without)e(a)h(sp)s(ecial)f +(meaning)h(are)f(left)h(unmo)s(di\014ed.)47 b(A)34 b(double)f(quote)g +(ma)m(y)h(b)s(e)f(quoted)150 4022 y(within)h(double)h(quotes)g(b)m(y)g +(preceding)g(it)g(with)g(a)g(bac)m(kslash.)55 b(If)35 +b(enabled,)h(history)f(expansion)g(will)150 4131 y(b)s(e)f(p)s +(erformed)g(unless)g(an)h(`)p Ft(!)p Fu(')g(app)s(earing)f(in)h(double) +f(quotes)i(is)f(escap)s(ed)g(using)f(a)h(bac)m(kslash.)55 +b(The)150 4241 y(bac)m(kslash)31 b(preceding)f(the)h(`)p +Ft(!)p Fu(')f(is)h(not)g(remo)m(v)m(ed.)275 4371 y(The)41 +b(sp)s(ecial)h(parameters)f(`)p Ft(*)p Fu(')h(and)f(`)p +Ft(@)p Fu(')h(ha)m(v)m(e)g(sp)s(ecial)g(meaning)g(when)f(in)g(double)g +(quotes)h(\(see)150 4481 y(Section)31 b(3.5.3)h([Shell)f(P)m(arameter)h +(Expansion],)e(page)h(25\).)150 4672 y Fk(3.1.2.4)63 +b(ANSI-C)40 b(Quoting)150 4819 y Fu(W)-8 b(ords)43 b(of)f(the)h(form)f +Ft($')p Fj(string)p Ft(')e Fu(are)j(treated)g(sp)s(ecially)-8 +b(.)79 b(The)42 b(w)m(ord)g(expands)f(to)j Fr(string)p +Fu(,)h(with)150 4928 y(bac)m(kslash-escap)s(ed)f(c)m(haracters)h +(replaced)f(as)g(sp)s(eci\014ed)f(b)m(y)g(the)g(ANSI)g(C)g(standard.)79 +b(Bac)m(kslash)150 5038 y(escap)s(e)31 b(sequences,)g(if)f(presen)m(t,) +h(are)g(deco)s(ded)f(as)g(follo)m(ws:)150 5189 y Ft(\\a)384 +b Fu(alert)31 b(\(b)s(ell\))150 5340 y Ft(\\b)384 b Fu(bac)m(kspace)p +eop end +%%Page: 7 13 +TeXDict begin 7 12 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2292 b(7)150 299 +y Ft(\\e)150 408 y(\\E)384 b Fu(an)30 b(escap)s(e)h(c)m(haracter)h +(\(not)f(ANSI)f(C\))150 566 y Ft(\\f)384 b Fu(form)30 +b(feed)150 723 y Ft(\\n)384 b Fu(newline)150 880 y Ft(\\r)g +Fu(carriage)32 b(return)150 1037 y Ft(\\t)384 b Fu(horizon)m(tal)32 +b(tab)150 1194 y Ft(\\v)384 b Fu(v)m(ertical)32 b(tab)150 +1351 y Ft(\\\\)384 b Fu(bac)m(kslash)150 1508 y Ft(\\')g +Fu(single)31 b(quote)150 1665 y Ft(\\")384 b Fu(double)30 +b(quote)150 1823 y Ft(\\?)384 b Fu(question)31 b(mark)150 +1980 y Ft(\\)p Fj(nnn)288 b Fu(the)36 b(eigh)m(t-bit)h(c)m(haracter)g +(whose)f(v)-5 b(alue)36 b(is)f(the)h(o)s(ctal)h(v)-5 +b(alue)36 b Fr(nnn)e Fu(\(one)i(to)h(three)f(o)s(ctal)630 +2089 y(digits\))150 2246 y Ft(\\x)p Fj(HH)288 b Fu(the)36 +b(eigh)m(t-bit)i(c)m(haracter)f(whose)f(v)-5 b(alue)36 +b(is)g(the)g(hexadecimal)h(v)-5 b(alue)36 b Fr(HH)46 +b Fu(\(one)37 b(or)f(t)m(w)m(o)630 2356 y(hex)30 b(digits\))150 +2513 y Ft(\\u)p Fj(HHHH)192 b Fu(the)33 b(Unico)s(de)f(\(ISO/IEC)g +(10646\))j(c)m(haracter)f(whose)e(v)-5 b(alue)33 b(is)g(the)g +(hexadecimal)g(v)-5 b(alue)630 2623 y Fr(HHHH)41 b Fu(\(one)31 +b(to)g(four)f(hex)g(digits\))150 2780 y Ft(\\U)p Fj(HHHHHHHH)630 +2889 y Fu(the)j(Unico)s(de)f(\(ISO/IEC)g(10646\))j(c)m(haracter)f +(whose)e(v)-5 b(alue)33 b(is)g(the)g(hexadecimal)g(v)-5 +b(alue)630 2999 y Fr(HHHHHHHH)42 b Fu(\(one)31 b(to)g(eigh)m(t)g(hex)g +(digits\))150 3156 y Ft(\\c)p Fj(x)336 b Fu(a)31 b(con)m(trol-)p +Fr(x)38 b Fu(c)m(haracter)150 3313 y(The)30 b(expanded)f(result)i(is)f +(single-quoted,)i(as)f(if)f(the)g(dollar)h(sign)g(had)e(not)i(b)s(een)f +(presen)m(t.)150 3510 y Fk(3.1.2.5)63 b(Lo)s(cale-Sp)s(eci\014c)41 +b(T)-10 b(ranslation)150 3657 y Fu(A)28 b(double-quoted)g(string)f +(preceded)h(b)m(y)f(a)h(dollar)h(sign)e(\(`)p Ft($)p +Fu('\))i(will)f(cause)g(the)g(string)g(to)g(b)s(e)f(translated)150 +3767 y(according)37 b(to)g(the)f(curren)m(t)g(lo)s(cale.)59 +b(The)36 b Fr(gettext)k Fu(infrastructure)35 b(p)s(erforms)g(the)h +(message)h(catalog)150 3876 y(lo)s(okup)21 b(and)g(translation,)k +(using)c(the)h Ft(LC_MESSAGES)d Fu(and)i Ft(TEXTDOMAIN)e +Fu(shell)i(v)-5 b(ariables,)25 b(as)d(explained)150 3986 +y(b)s(elo)m(w.)57 b(See)36 b(the)g(gettext)i(do)s(cumen)m(tation)e(for) +g(additional)g(details.)58 b(If)35 b(the)h(curren)m(t)f(lo)s(cale)j(is) +e Ft(C)f Fu(or)150 4096 y Ft(POSIX)p Fu(,)g(or)g(if)g(there)g(are)h(no) +f(translations)h(a)m(v)-5 b(ailable,)38 b(the)e(dollar)f(sign)g(is)g +(ignored.)55 b(If)35 b(the)g(string)g(is)150 4205 y(translated)c(and)f +(replaced,)h(the)f(replacemen)m(t)i(is)f(double-quoted.)275 +4339 y(Some)20 b(systems)h(use)f(the)h(message)h(catalog)h(selected)f +(b)m(y)f(the)g Ft(LC_MESSAGES)c Fu(shell)k(v)-5 b(ariable.)39 +b(Others)150 4448 y(create)g(the)e(name)g(of)g(the)g(message)h(catalog) +i(from)d(the)g(v)-5 b(alue)37 b(of)g(the)h Ft(TEXTDOMAIN)c +Fu(shell)j(v)-5 b(ariable,)150 4558 y(p)s(ossibly)31 +b(adding)g(a)g(su\016x)g(of)h(`)p Ft(.mo)p Fu('.)43 b(If)31 +b(y)m(ou)h(use)f(the)h Ft(TEXTDOMAIN)c Fu(v)-5 b(ariable,)33 +b(y)m(ou)f(ma)m(y)g(need)f(to)h(set)150 4667 y(the)22 +b Ft(TEXTDOMAINDIR)d Fu(v)-5 b(ariable)23 b(to)g(the)f(lo)s(cation)i +(of)e(the)h(message)g(catalog)i(\014les.)38 b(Still)23 +b(others)f(use)g(b)s(oth)150 4777 y(v)-5 b(ariables)31 +b(in)f(this)g(fashion:)41 b Ft(TEXTDOMAINDIR)p Fu(/)p +Ft(LC_MESSAGES)p Fu(/LC)p 2528 4777 28 4 v 34 w(MESSA)m(GES/)p +Ft(TEXTDOMAIN)p Fu(.mo.)150 4974 y Fk(3.1.3)63 b(Commen)m(ts)150 +5121 y Fu(In)21 b(a)i(non-in)m(teractiv)m(e)h(shell,)g(or)e(an)g(in)m +(teractiv)m(e)j(shell)d(in)g(whic)m(h)g(the)g Ft(interactive_comments) +16 b Fu(option)150 5230 y(to)40 b(the)f Ft(shopt)e Fu(builtin)h(is)h +(enabled)g(\(see)h(Section)g(4.3.2)g([The)f(Shopt)f(Builtin],)k(page)e +(66\),)i(a)d(w)m(ord)150 5340 y(b)s(eginning)26 b(with)g(`)p +Ft(#)p Fu(')g(causes)h(that)f(w)m(ord)g(and)g(all)h(remaining)g(c)m +(haracters)g(on)f(that)h(line)g(to)g(b)s(e)f(ignored.)p +eop end +%%Page: 8 14 +TeXDict begin 8 13 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2292 b(8)150 299 +y(An)43 b(in)m(teractiv)m(e)j(shell)e(without)f(the)g +Ft(interactive_comments)38 b Fu(option)44 b(enabled)f(do)s(es)g(not)g +(allo)m(w)150 408 y(commen)m(ts.)56 b(The)34 b Ft(interactive_comments) +c Fu(option)35 b(is)g(on)g(b)m(y)g(default)g(in)g(in)m(teractiv)m(e)j +(shells.)55 b(See)150 518 y(Section)30 b(6.3)f([In)m(teractiv)m(e)j +(Shells],)d(page)h(89,)g(for)e(a)i(description)e(of)h(what)g(mak)m(es)h +(a)f(shell)g(in)m(teractiv)m(e.)150 757 y Fs(3.2)68 b(Shell)45 +b(Commands)150 916 y Fu(A)d(simple)g(shell)g(command)f(suc)m(h)h(as)g +Ft(echo)29 b(a)h(b)g(c)41 b Fu(consists)i(of)f(the)f(command)h(itself)h +(follo)m(w)m(ed)g(b)m(y)150 1026 y(argumen)m(ts,)31 b(separated)g(b)m +(y)f(spaces.)275 1159 y(More)h(complex)h(shell)f(commands)g(are)g(comp) +s(osed)g(of)g(simple)g(commands)g(arranged)g(together)h(in)150 +1269 y(a)f(v)-5 b(ariet)m(y)32 b(of)f(w)m(a)m(ys:)41 +b(in)31 b(a)g(pip)s(eline)f(in)g(whic)m(h)g(the)h(output)f(of)h(one)f +(command)h(b)s(ecomes)f(the)h(input)f(of)150 1378 y(a)h(second,)f(in)h +(a)f(lo)s(op)h(or)f(conditional)i(construct,)f(or)f(in)g(some)h(other)g +(grouping.)150 1575 y Fk(3.2.1)63 b(Reserv)m(ed)40 b(W)-10 +b(ords)150 1722 y Fu(Reserv)m(ed)33 b(w)m(ords)g(are)g(w)m(ords)g(that) +g(ha)m(v)m(e)h(sp)s(ecial)g(meaning)f(to)h(the)f(shell.)49 +b(They)32 b(are)h(used)g(to)g(b)s(egin)150 1832 y(and)d(end)f(the)i +(shell's)g(comp)s(ound)e(commands.)275 1965 y(The)k(follo)m(wing)i(w)m +(ords)e(are)h(recognized)i(as)e(reserv)m(ed)f(when)g(unquoted)g(and)g +(the)h(\014rst)f(w)m(ord)h(of)g(a)150 2075 y(command)c(\(see)h(b)s(elo) +m(w)g(for)f(exceptions\):)150 2208 y Ft(if)364 b(then)168 +b(elif)g(else)g(fi)336 b(time)150 2318 y(for)316 b(in)264 +b(until)120 b(while)g(do)336 b(done)150 2427 y(case)268 +b(esac)168 b(coproc)72 b(select)g(function)150 2537 y({)412 +b(})312 b([[)264 b(]])g(!)150 2670 y(in)33 b Fu(is)h(recognized)h(as)f +(a)g(reserv)m(ed)f(w)m(ord)h(if)f(it)h(is)g(the)g(third)f(w)m(ord)g(of) +h(a)g Ft(case)e Fu(or)i Ft(select)e Fu(command.)150 2780 +y Ft(in)e Fu(and)g Ft(do)f Fu(are)i(recognized)h(as)e(reserv)m(ed)h(w)m +(ords)f(if)g(they)h(are)f(the)h(third)f(w)m(ord)g(in)g(a)g +Ft(for)g Fu(command.)150 2977 y Fk(3.2.2)63 b(Simple)41 +b(Commands)150 3124 y Fu(A)29 b(simple)f(command)g(is)h(the)g(kind)e +(of)i(command)f(encoun)m(tered)h(most)g(often.)40 b(It's)29 +b(just)f(a)h(sequence)g(of)150 3233 y(w)m(ords)22 b(separated)i(b)m(y)e +Ft(blank)p Fu(s,)i(terminated)f(b)m(y)g(one)g(of)g(the)g(shell's)g(con) +m(trol)h(op)s(erators)f(\(see)h(Chapter)f(2)150 3343 +y([De\014nitions],)37 b(page)e(3\).)54 b(The)35 b(\014rst)e(w)m(ord)i +(generally)g(sp)s(eci\014es)g(a)g(command)f(to)h(b)s(e)f(executed,)j +(with)150 3452 y(the)31 b(rest)f(of)h(the)f(w)m(ords)g(b)s(eing)g(that) +h(command's)f(argumen)m(ts.)275 3586 y(The)h(return)h(status)g(\(see)i +(Section)f(3.7.5)h([Exit)f(Status],)h(page)f(41\))g(of)g(a)g(simple)f +(command)g(is)h(its)150 3695 y(exit)38 b(status)f(as)g(pro)m(vided)f(b) +m(y)h(the)g Fm(posix)f Fu(1003.1)j Ft(waitpid)c Fu(function,)j(or)f +(128)p Ft(+)p Fr(n)g Fu(if)g(the)g(command)150 3805 y(w)m(as)31 +b(terminated)g(b)m(y)f(signal)h Fr(n)p Fu(.)150 4002 +y Fk(3.2.3)63 b(Pip)s(elines)150 4149 y Fu(A)21 b Ft(pipeline)d +Fu(is)j(a)g(sequence)g(of)g(one)g(or)g(more)g(commands)f(separated)h(b) +m(y)g(one)g(of)g(the)g(con)m(trol)h(op)s(erators)150 +4259 y(`)p Ft(|)p Fu(')31 b(or)f(`)p Ft(|&)p Fu('.)275 +4392 y(The)f(format)i(for)f(a)h(pip)s(eline)f(is)390 +4525 y Ft([time)46 b([-p]])h([!])g Fj(command1)e Ft([)j(|)f(or)g(|&)g +Fj(command2)f Ft(])h(...)150 4659 y Fu(The)25 b(output)f(of)i(eac)m(h)g +(command)f(in)f(the)i(pip)s(eline)e(is)i(connected)g(via)f(a)h(pip)s(e) +e(to)i(the)f(input)f(of)h(the)h(next)150 4768 y(command.)40 +b(That)29 b(is,)h(eac)m(h)h(command)e(reads)g(the)h(previous)f +(command's)g(output.)40 b(This)29 b(connection)150 4878 +y(is)h(p)s(erformed)f(b)s(efore)h(an)m(y)h(redirections)g(sp)s +(eci\014ed)f(b)m(y)g(the)g(command.)275 5011 y(If)k(`)p +Ft(|&)p Fu(')h(is)f(used,)i Fr(command1)7 b Fu('s)35 +b(standard)f(error,)i(in)e(addition)h(to)h(its)f(standard)f(output,)i +(is)e(con-)150 5121 y(nected)h(to)g Fr(command2)7 b Fu('s)35 +b(standard)f(input)f(through)h(the)g(pip)s(e;)i(it)f(is)g(shorthand)e +(for)h Ft(2>&1)29 b(|)p Fu(.)53 b(This)150 5230 y(implicit)41 +b(redirection)f(of)g(the)g(standard)f(error)g(to)h(the)g(standard)f +(output)g(is)h(p)s(erformed)e(after)j(an)m(y)150 5340 +y(redirections)31 b(sp)s(eci\014ed)f(b)m(y)g(the)g(command.)p +eop end +%%Page: 9 15 +TeXDict begin 9 14 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2292 b(9)275 299 +y(The)36 b(reserv)m(ed)g(w)m(ord)g Ft(time)g Fu(causes)h(timing)g +(statistics)h(to)f(b)s(e)f(prin)m(ted)g(for)g(the)h(pip)s(eline)f(once) +h(it)150 408 y(\014nishes.)51 b(The)34 b(statistics)i(curren)m(tly)e +(consist)h(of)f(elapsed)h(\(w)m(all-clo)s(c)m(k\))i(time)e(and)f(user)f +(and)h(system)150 518 y(time)e(consumed)e(b)m(y)h(the)g(command's)g +(execution.)44 b(The)31 b Ft(-p)f Fu(option)i(c)m(hanges)g(the)f +(output)g(format)g(to)150 628 y(that)j(sp)s(eci\014ed)e(b)m(y)h +Fm(posix)p Fu(.)49 b(When)33 b(the)g(shell)g(is)h(in)e +Fm(posix)h Fu(mo)s(de)g(\(see)h(Section)g(6.11)g([Bash)g(POSIX)150 +737 y(Mo)s(de],)j(page)e(101\),)j(it)e(do)s(es)e(not)i(recognize)g +Ft(time)e Fu(as)h(a)h(reserv)m(ed)f(w)m(ord)f(if)h(the)g(next)g(tok)m +(en)h(b)s(egins)150 847 y(with)d(a)g(`)p Ft(-)p Fu('.)49 +b(The)33 b Ft(TIMEFORMAT)d Fu(v)-5 b(ariable)34 b(ma)m(y)g(b)s(e)f(set) +g(to)h(a)g(format)f(string)g(that)h(sp)s(eci\014es)f(ho)m(w)g(the)150 +956 y(timing)38 b(information)g(should)e(b)s(e)h(displa)m(y)m(ed.)62 +b(See)38 b(Section)g(5.2)g([Bash)g(V)-8 b(ariables],)41 +b(page)d(73,)i(for)e(a)150 1066 y(description)27 b(of)g(the)h(a)m(v)-5 +b(ailable)29 b(formats.)40 b(The)26 b(use)h(of)g Ft(time)f +Fu(as)i(a)f(reserv)m(ed)g(w)m(ord)g(p)s(ermits)f(the)h(timing)150 +1176 y(of)38 b(shell)g(builtins,)i(shell)e(functions,)i(and)d(pip)s +(elines.)63 b(An)38 b(external)h Ft(time)e Fu(command)h(cannot)g(time) +150 1285 y(these)31 b(easily)-8 b(.)275 1418 y(When)26 +b(the)h(shell)g(is)g(in)g Fm(posix)f Fu(mo)s(de)g(\(see)i(Section)f +(6.11)i([Bash)e(POSIX)f(Mo)s(de],)i(page)g(101\),)h Ft(time)150 +1527 y Fu(ma)m(y)d(b)s(e)f(follo)m(w)m(ed)j(b)m(y)d(a)h(newline.)39 +b(In)25 b(this)h(case,)i(the)d(shell)h(displa)m(ys)g(the)g(total)h +(user)e(and)g(system)h(time)150 1637 y(consumed)33 b(b)m(y)h(the)h +(shell)f(and)f(its)i(c)m(hildren.)51 b(The)34 b Ft(TIMEFORMAT)d +Fu(v)-5 b(ariable)35 b(ma)m(y)g(b)s(e)e(used)g(to)i(sp)s(ecify)150 +1746 y(the)c(format)f(of)h(the)f(time)h(information.)275 +1879 y(If)24 b(the)h(pip)s(eline)g(is)g(not)g(executed)h(async)m +(hronously)f(\(see)h(Section)g(3.2.4)h([Lists],)g(page)e(9\),)i(the)f +(shell)150 1988 y(w)m(aits)31 b(for)f(all)i(commands)e(in)g(the)g(pip)s +(eline)g(to)h(complete.)275 2121 y(Eac)m(h)e(command)g(in)g(a)g(pip)s +(eline)g(is)g(executed)h(in)e(its)i(o)m(wn)f(subshell,)f(whic)m(h)h(is) +g(a)g(separate)h(pro)s(cess)150 2230 y(\(see)g(Section)g(3.7.3)h +([Command)e(Execution)h(En)m(vironmen)m(t],)g(page)g(40\).)41 +b(If)29 b(the)g Ft(lastpipe)e Fu(option)j(is)150 2340 +y(enabled)35 b(using)g(the)g Ft(shopt)f Fu(builtin)g(\(see)i(Section)g +(4.3.2)h([The)e(Shopt)f(Builtin],)j(page)f(66\),)i(the)d(last)150 +2450 y(elemen)m(t)d(of)e(a)h(pip)s(eline)f(ma)m(y)h(b)s(e)f(run)f(b)m +(y)h(the)h(shell)f(pro)s(cess.)275 2582 y(The)24 b(exit)i(status)f(of)h +(a)f(pip)s(eline)g(is)g(the)g(exit)h(status)f(of)h(the)f(last)h +(command)f(in)f(the)i(pip)s(eline,)g(unless)150 2692 +y(the)31 b Ft(pipefail)d Fu(option)j(is)g(enabled)f(\(see)i(Section)f +(4.3.1)i([The)d(Set)h(Builtin],)g(page)h(62\).)42 b(If)30 +b Ft(pipefail)150 2801 y Fu(is)f(enabled,)g(the)f(pip)s(eline's)g +(return)g(status)h(is)f(the)h(v)-5 b(alue)29 b(of)f(the)h(last)g +(\(righ)m(tmost\))i(command)d(to)h(exit)150 2911 y(with)34 +b(a)h(non-zero)g(status,)i(or)d(zero)i(if)e(all)i(commands)e(exit)h +(successfully)-8 b(.)54 b(If)34 b(the)h(reserv)m(ed)g(w)m(ord)f(`)p +Ft(!)p Fu(')150 3020 y(precedes)e(the)f(pip)s(eline,)h(the)f(exit)i +(status)f(is)f(the)h(logical)i(negation)f(of)e(the)h(exit)g(status)g +(as)g(describ)s(ed)150 3130 y(ab)s(o)m(v)m(e.)63 b(The)38 +b(shell)f(w)m(aits)i(for)e(all)i(commands)e(in)g(the)h(pip)s(eline)f +(to)h(terminate)h(b)s(efore)e(returning)g(a)150 3240 +y(v)-5 b(alue.)150 3435 y Fk(3.2.4)63 b(Lists)41 b(of)h(Commands)150 +3582 y Fu(A)37 b Ft(list)e Fu(is)i(a)g(sequence)g(of)g(one)g(or)f(more) +h(pip)s(elines)f(separated)h(b)m(y)g(one)g(of)f(the)h(op)s(erators)g(`) +p Ft(;)p Fu(',)i(`)p Ft(&)p Fu(',)150 3691 y(`)p Ft(&&)p +Fu(',)31 b(or)f(`)p Ft(||)p Fu(',)g(and)g(optionally)i(terminated)f(b)m +(y)f(one)h(of)f(`)p Ft(;)p Fu(',)h(`)p Ft(&)p Fu(',)g(or)f(a)h +Ft(newline)p Fu(.)275 3824 y(Of)23 b(these)h(list)g(op)s(erators,)i(`)p +Ft(&&)p Fu(')d(and)g(`)p Ft(||)p Fu(')h(ha)m(v)m(e)h(equal)f +(precedence,)i(follo)m(w)m(ed)f(b)m(y)f(`)p Ft(;)p Fu(')g(and)f(`)p +Ft(&)p Fu(',)i(whic)m(h)150 3933 y(ha)m(v)m(e)32 b(equal)e(precedence.) +275 4066 y(A)f(sequence)h(of)g(one)g(or)g(more)g(newlines)f(ma)m(y)h +(app)s(ear)f(in)h(a)g Ft(list)e Fu(to)j(delimit)f(commands,)g(equiv-) +150 4175 y(alen)m(t)i(to)f(a)g(semicolon.)275 4308 y(If)c(a)h(command)f +(is)h(terminated)g(b)m(y)g(the)g(con)m(trol)h(op)s(erator)f(`)p +Ft(&)p Fu(',)h(the)e(shell)h(executes)h(the)f(command)150 +4418 y(async)m(hronously)g(in)h(a)g(subshell.)39 b(This)28 +b(is)h(kno)m(wn)f(as)h(executing)h(the)f(command)g(in)f(the)h +Fr(bac)m(kground)p Fu(,)150 4527 y(and)42 b(these)i(are)f(referred)g +(to)g(as)h Fr(async)m(hronous)i Fu(commands.)78 b(The)43 +b(shell)g(do)s(es)g(not)g(w)m(ait)h(for)f(the)150 4637 +y(command)34 b(to)h(\014nish,)f(and)f(the)h(return)f(status)i(is)f(0)g +(\(true\).)53 b(When)34 b(job)g(con)m(trol)h(is)f(not)h(activ)m(e)h +(\(see)150 4746 y(Chapter)27 b(7)h([Job)f(Con)m(trol],)i(page)g(107\),) +h(the)d(standard)g(input)f(for)i(async)m(hronous)f(commands,)h(in)f +(the)150 4856 y(absence)k(of)f(an)m(y)h(explicit)h(redirections,)f(is)f +(redirected)h(from)f Ft(/dev/null)p Fu(.)275 4988 y(Commands)19 +b(separated)j(b)m(y)f(a)g(`)p Ft(;)p Fu(')g(are)h(executed)g(sequen)m +(tially;)k(the)21 b(shell)g(w)m(aits)h(for)f(eac)m(h)h(command)150 +5098 y(to)31 b(terminate)h(in)e(turn.)39 b(The)30 b(return)f(status)i +(is)f(the)h(exit)g(status)g(of)g(the)f(last)h(command)f(executed.)275 +5230 y Fm(and)g Fu(and)h Fm(or)g Fu(lists)h(are)g(sequences)f(of)h(one) +g(or)f(more)h(pip)s(elines)e(separated)i(b)m(y)g(the)f(con)m(trol)i(op) +s(er-)150 5340 y(ators)e(`)p Ft(&&)p Fu(')f(and)g(`)p +Ft(||)p Fu(',)h(resp)s(ectiv)m(ely)-8 b(.)42 b Fm(and)30 +b Fu(and)f Fm(or)h Fu(lists)h(are)g(executed)g(with)f(left)h(asso)s +(ciativit)m(y)-8 b(.)p eop end +%%Page: 10 16 +TeXDict begin 10 15 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(10)275 299 +y(An)30 b Fm(and)f Fu(list)i(has)f(the)h(form)390 433 +y Fj(command1)46 b Ft(&&)h Fj(command2)150 567 y Fr(command2)38 +b Fu(is)30 b(executed)i(if,)e(and)g(only)g(if,)h Fr(command1)38 +b Fu(returns)29 b(an)h(exit)h(status)g(of)g(zero)g(\(success\).)275 +701 y(An)f Fm(or)f Fu(list)i(has)f(the)h(form)390 835 +y Fj(command1)46 b Ft(||)h Fj(command2)150 969 y Fr(command2)38 +b Fu(is)30 b(executed)i(if,)e(and)g(only)g(if,)h Fr(command1)38 +b Fu(returns)29 b(a)i(non-zero)g(exit)g(status.)275 1103 +y(The)h(return)g(status)i(of)f Fm(and)f Fu(and)h Fm(or)f +Fu(lists)i(is)f(the)g(exit)h(status)g(of)f(the)g(last)h(command)f +(executed)150 1213 y(in)d(the)h(list.)150 1412 y Fk(3.2.5)63 +b(Comp)s(ound)42 b(Commands)150 1558 y Fu(Comp)s(ound)29 +b(commands)h(are)i(the)f(shell)g(programming)f(language)j(constructs.) +42 b(Eac)m(h)32 b(construct)f(b)s(e-)150 1668 y(gins)25 +b(with)f(a)i(reserv)m(ed)f(w)m(ord)f(or)h(con)m(trol)h(op)s(erator)f +(and)g(is)g(terminated)g(b)m(y)g(a)g(corresp)s(onding)f(reserv)m(ed)150 +1778 y(w)m(ord)i(or)g(op)s(erator.)40 b(An)m(y)26 b(redirections)g +(\(see)i(Section)f(3.6)g([Redirections],)h(page)f(35\))h(asso)s(ciated) +f(with)150 1887 y(a)k(comp)s(ound)f(command)h(apply)f(to)i(all)g +(commands)f(within)f(that)i(comp)s(ound)d(command)i(unless)f(ex-)150 +1997 y(plicitly)i(o)m(v)m(erridden.)275 2131 y(In)20 +b(most)h(cases)g(a)g(list)h(of)f(commands)f(in)g(a)h(comp)s(ound)f +(command's)g(description)h(ma)m(y)g(b)s(e)f(separated)150 +2240 y(from)30 b(the)h(rest)g(of)g(the)g(command)g(b)m(y)f(one)h(or)g +(more)g(newlines,)g(and)f(ma)m(y)i(b)s(e)e(follo)m(w)m(ed)i(b)m(y)f(a)g +(newline)150 2350 y(in)f(place)h(of)g(a)g(semicolon.)275 +2484 y(Bash)45 b(pro)m(vides)h(lo)s(oping)g(constructs,)j(conditional)e +(commands,)j(and)44 b(mec)m(hanisms)i(to)g(group)150 +2594 y(commands)30 b(and)g(execute)i(them)e(as)g(a)h(unit.)150 +2792 y Fk(3.2.5.1)63 b(Lo)s(oping)43 b(Constructs)150 +2939 y Fu(Bash)31 b(supp)s(orts)d(the)j(follo)m(wing)g(lo)s(oping)g +(constructs.)275 3073 y(Note)k(that)f(wherev)m(er)g(a)g(`)p +Ft(;)p Fu(')g(app)s(ears)f(in)h(the)g(description)g(of)g(a)g(command's) +g(syn)m(tax,)i(it)e(ma)m(y)h(b)s(e)150 3183 y(replaced)c(with)f(one)h +(or)f(more)g(newlines.)150 3341 y Ft(until)240 b Fu(The)30 +b(syn)m(tax)h(of)f(the)h Ft(until)e Fu(command)h(is:)870 +3476 y Ft(until)46 b Fj(test-commands)p Ft(;)e(do)j Fj +(consequent-commands)p Ft(;)c(done)630 3610 y Fu(Execute)f +Fr(consequen)m(t-commands)k Fu(as)41 b(long)h(as)f Fr(test-commands)46 +b Fu(has)41 b(an)g(exit)h(status)630 3719 y(whic)m(h)c(is)h(not)g +(zero.)67 b(The)38 b(return)g(status)h(is)f(the)h(exit)h(status)f(of)g +(the)g(last)g(command)630 3829 y(executed)31 b(in)f Fr(consequen)m +(t-commands)p Fu(,)i(or)e(zero)h(if)g(none)f(w)m(as)h(executed.)150 +3987 y Ft(while)240 b Fu(The)30 b(syn)m(tax)h(of)f(the)h +Ft(while)e Fu(command)h(is:)870 4122 y Ft(while)46 b +Fj(test-commands)p Ft(;)e(do)j Fj(consequent-commands)p +Ft(;)c(done)630 4256 y Fu(Execute)f Fr(consequen)m(t-commands)k +Fu(as)41 b(long)h(as)f Fr(test-commands)46 b Fu(has)41 +b(an)g(exit)h(status)630 4365 y(of)34 b(zero.)53 b(The)34 +b(return)f(status)h(is)h(the)f(exit)h(status)g(of)f(the)g(last)h +(command)f(executed)h(in)630 4475 y Fr(consequen)m(t-commands)p +Fu(,)c(or)g(zero)g(if)f(none)g(w)m(as)h(executed.)150 +4633 y Ft(for)336 b Fu(The)30 b(syn)m(tax)h(of)f(the)h +Ft(for)e Fu(command)i(is:)870 4768 y Ft(for)47 b Fj(name)g +Ft([)g([in)g([)p Fj(words)f Ft(...)o(])i(])f(;)h(])f(do)g +Fj(commands)p Ft(;)e(done)630 4902 y Fu(Expand)30 b Fr(w)m(ords)k +Fu(\(see)d(Section)h(3.5)g([Shell)f(Expansions],)g(page)g(22\),)i(and)d +(execute)i Fr(com-)630 5011 y(mands)43 b Fu(once)e(for)g(eac)m(h)g(mem) +m(b)s(er)f(in)g(the)h(resultan)m(t)g(list,)j(with)c Fr(name)46 +b Fu(b)s(ound)39 b(to)i(the)630 5121 y(curren)m(t)34 +b(mem)m(b)s(er.)53 b(If)35 b(`)p Ft(in)30 b Fj(words)p +Fu(')j(is)i(not)g(presen)m(t,)h(the)f Ft(for)e Fu(command)i(executes)h +(the)630 5230 y Fr(commands)j Fu(once)e(for)f(eac)m(h)h(p)s(ositional)g +(parameter)f(that)h(is)f(set,)i(as)e(if)g(`)p Ft(in)30 +b("$@")p Fu(')36 b(had)630 5340 y(b)s(een)30 b(sp)s(eci\014ed)f(\(see)j +(Section)f(3.4.2)h([Sp)s(ecial)f(P)m(arameters],)h(page)f(21\).)p +eop end +%%Page: 11 17 +TeXDict begin 11 16 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(11)630 299 +y(The)27 b(return)f(status)h(is)g(the)h(exit)g(status)f(of)g(the)h +(last)g(command)e(that)i(executes.)41 b(If)27 b(there)630 +408 y(are)38 b(no)f(items)g(in)g(the)h(expansion)f(of)g +Fr(w)m(ords)p Fu(,)i(no)e(commands)g(are)g(executed,)j(and)d(the)630 +518 y(return)29 b(status)i(is)f(zero.)630 644 y(An)g(alternate)i(form)e +(of)h(the)f Ft(for)g Fu(command)g(is)g(also)h(supp)s(orted:)870 +771 y Ft(for)47 b(\(\()g Fj(expr1)f Ft(;)i Fj(expr2)e +Ft(;)i Fj(expr3)e Ft(\)\))h(;)h(do)f Fj(commands)e Ft(;)j(done)630 +897 y Fu(First,)38 b(the)f(arithmetic)h(expression)e +Fr(expr1)43 b Fu(is)36 b(ev)-5 b(aluated)38 b(according)f(to)g(the)g +(rules)f(de-)630 1007 y(scrib)s(ed)41 b(b)s(elo)m(w)h(\(see)h(Section)g +(6.5)g([Shell)g(Arithmetic],)j(page)d(93\).)77 b(The)42 +b(arithmetic)630 1116 y(expression)33 b Fr(expr2)41 b +Fu(is)34 b(then)f(ev)-5 b(aluated)35 b(rep)s(eatedly)f(un)m(til)g(it)g +(ev)-5 b(aluates)35 b(to)g(zero.)51 b(Eac)m(h)630 1226 +y(time)23 b Fr(expr2)30 b Fu(ev)-5 b(aluates)25 b(to)e(a)g(non-zero)h +(v)-5 b(alue,)25 b Fr(commands)h Fu(are)d(executed)g(and)g(the)g +(arith-)630 1335 y(metic)29 b(expression)f Fr(expr3)36 +b Fu(is)28 b(ev)-5 b(aluated.)41 b(If)28 b(an)m(y)h(expression)f(is)g +(omitted,)i(it)f(b)s(eha)m(v)m(es)g(as)630 1445 y(if)i(it)h(ev)-5 +b(aluates)32 b(to)g(1.)44 b(The)30 b(return)g(v)-5 b(alue)32 +b(is)f(the)g(exit)h(status)g(of)f(the)g(last)h(command)f(in)630 +1555 y Fr(commands)j Fu(that)d(is)f(executed,)i(or)e(false)h(if)f(an)m +(y)h(of)g(the)f(expressions)g(is)h(in)m(v)-5 b(alid.)275 +1698 y(The)26 b Ft(break)g Fu(and)h Ft(continue)e Fu(builtins)i(\(see)h +(Section)h(4.1)f([Bourne)g(Shell)f(Builtins],)i(page)f(44\))g(ma)m(y) +150 1807 y(b)s(e)i(used)f(to)i(con)m(trol)h(lo)s(op)f(execution.)150 +1990 y Fk(3.2.5.2)63 b(Conditional)42 b(Constructs)150 +2154 y Ft(if)384 b Fu(The)30 b(syn)m(tax)h(of)f(the)h +Ft(if)f Fu(command)g(is:)870 2280 y Ft(if)47 b Fj(test-commands)p +Ft(;)d(then)965 2390 y Fj(consequent-commands)p Ft(;)870 +2500 y([elif)i Fj(more-test-commands)p Ft(;)d(then)965 +2609 y Fj(more-consequents)p Ft(;])870 2719 y([else)j +Fj(alternate-consequents)p Ft(;])870 2828 y(fi)630 2955 +y Fu(The)53 b Fr(test-commands)58 b Fu(list)c(is)g(executed,)60 +b(and)53 b(if)g(its)h(return)e(status)i(is)f(zero,)61 +b(the)630 3064 y Fr(consequen)m(t-commands)44 b Fu(list)d(is)f +(executed.)70 b(If)40 b Fr(test-commands)k Fu(returns)39 +b(a)h(non-zero)630 3174 y(status,)45 b(eac)m(h)e Ft(elif)d +Fu(list)i(is)g(executed)h(in)e(turn,)j(and)d(if)g(its)h(exit)h(status)f +(is)f(zero,)46 b(the)630 3284 y(corresp)s(onding)37 b +Fr(more-consequen)m(ts)42 b Fu(is)c(executed)g(and)f(the)h(command)g +(completes.)63 b(If)630 3393 y(`)p Ft(else)29 b Fj +(alternate-consequents)p Fu(')c(is)30 b(presen)m(t,)h(and)f(the)g +(\014nal)g(command)g(in)g(the)g(\014nal)630 3503 y Ft(if)44 +b Fu(or)g Ft(elif)f Fu(clause)i(has)f(a)h(non-zero)g(exit)g(status,)j +(then)c Fr(alternate-consequen)m(ts)51 b Fu(is)630 3612 +y(executed.)k(The)34 b(return)g(status)h(is)f(the)h(exit)h(status)f(of) +g(the)g(last)g(command)g(executed,)630 3722 y(or)30 b(zero)i(if)e(no)g +(condition)h(tested)g(true.)150 3865 y Ft(case)288 b +Fu(The)30 b(syn)m(tax)h(of)f(the)h Ft(case)e Fu(command)h(is:)870 +3991 y Ft(case)47 b Fj(word)f Ft(in)1061 4101 y([)h([\(])g +Fj(pattern)f Ft([|)h Fj(pattern)p Ft(]...)m(\))h Fj(command-list)c +Ft(;;]...)870 4211 y(esac)630 4337 y(case)20 b Fu(will)i(selectiv)m +(ely)j(execute)e(the)e Fr(command-list)k Fu(corresp)s(onding)20 +b(to)i(the)g(\014rst)f Fr(pattern)630 4446 y Fu(that)h(matc)m(hes)h +Fr(w)m(ord)p Fu(.)38 b(The)21 b(matc)m(h)h(is)g(p)s(erformed)e +(according)j(to)f(the)g(rules)g(describ)s(ed)e(b)s(e-)630 +4556 y(lo)m(w)25 b(in)e(Section)i(3.5.8.1)h([P)m(attern)f(Matc)m +(hing],)i(page)e(33.)39 b(If)23 b(the)h Ft(nocasematch)d +Fu(shell)j(op-)630 4666 y(tion)j(\(see)g(the)f(description)g(of)g +Ft(shopt)f Fu(in)g(Section)i(4.3.2)h([The)e(Shopt)f(Builtin],)j(page)f +(66\))630 4775 y(is)40 b(enabled,)i(the)e(matc)m(h)h(is)e(p)s(erformed) +g(without)g(regard)h(to)h(the)f(case)g(of)g(alphab)s(etic)630 +4885 y(c)m(haracters.)48 b(The)32 b(`)p Ft(|)p Fu(')g(is)h(used)e(to)i +(separate)h(m)m(ultiple)f(patterns,)g(and)f(the)g(`)p +Ft(\))p Fu(')h(op)s(erator)630 4994 y(terminates)f(a)f(pattern)g(list.) +43 b(A)31 b(list)g(of)g(patterns)g(and)f(an)h(asso)s(ciated)h +(command-list)g(is)630 5104 y(kno)m(wn)e(as)g(a)h Fr(clause)p +Fu(.)630 5230 y(Eac)m(h)42 b(clause)g(m)m(ust)f(b)s(e)g(terminated)h +(with)e(`)p Ft(;;)p Fu(',)45 b(`)p Ft(;&)p Fu(',)f(or)d(`)p +Ft(;;&)p Fu('.)73 b(The)41 b Fr(w)m(ord)j Fu(under-)630 +5340 y(go)s(es)35 b(tilde)f(expansion,)h(parameter)g(expansion,)g +(command)f(substitution,)h(arithmetic)p eop end +%%Page: 12 18 +TeXDict begin 12 17 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(12)630 299 +y(expansion,)35 b(and)f(quote)g(remo)m(v)-5 b(al)36 b(\(see)f(Section)g +(3.5.3)h([Shell)e(P)m(arameter)h(Expansion],)630 408 +y(page)22 b(25\))g(b)s(efore)f(matc)m(hing)h(is)g(attempted.)38 +b(Eac)m(h)22 b Fr(pattern)g Fu(undergo)s(es)e(tilde)i(expansion,)630 +518 y(parameter)31 b(expansion,)f(command)g(substitution,)h(and)f +(arithmetic)h(expansion.)630 651 y(There)f(ma)m(y)g(b)s(e)f(an)h +(arbitrary)g(n)m(um)m(b)s(er)f(of)h Ft(case)f Fu(clauses,)i(eac)m(h)g +(terminated)g(b)m(y)e(a)i(`)p Ft(;;)p Fu(',)630 761 y(`)p +Ft(;&)p Fu(',)c(or)e(`)p Ft(;;&)p Fu('.)39 b(The)25 b(\014rst)g +(pattern)h(that)g(matc)m(hes)h(determines)e(the)h(command-list)g(that) +630 870 y(is)35 b(executed.)55 b(It's)35 b(a)g(common)g(idiom)g(to)g +(use)g(`)p Ft(*)p Fu(')g(as)g(the)g(\014nal)f(pattern)h(to)h(de\014ne)e +(the)630 980 y(default)d(case,)g(since)g(that)g(pattern)f(will)h(alw)m +(a)m(ys)h(matc)m(h.)630 1113 y(Here)j(is)g(an)g(example)h(using)e +Ft(case)g Fu(in)g(a)h(script)g(that)h(could)f(b)s(e)f(used)g(to)h +(describ)s(e)g(one)630 1223 y(in)m(teresting)d(feature)f(of)f(an)g +(animal:)870 1356 y Ft(echo)47 b(-n)g("Enter)f(the)h(name)f(of)i(an)f +(animal:)f(")870 1465 y(read)h(ANIMAL)870 1575 y(echo)g(-n)g("The)f +($ANIMAL)g(has)h(")870 1684 y(case)g($ANIMAL)e(in)965 +1794 y(horse)i(|)g(dog)g(|)h(cat\))e(echo)h(-n)g("four";;)965 +1904 y(man)g(|)h(kangaroo)d(\))j(echo)e(-n)i("two";;)965 +2013 y(*\))g(echo)e(-n)h("an)g(unknown)f(number)g(of";;)870 +2123 y(esac)870 2232 y(echo)h(")g(legs.")630 2389 y Fu(If)40 +b(the)i(`)p Ft(;;)p Fu(')e(op)s(erator)i(is)f(used,)i(no)e(subsequen)m +(t)f(matc)m(hes)i(are)f(attempted)h(after)g(the)630 2498 +y(\014rst)c(pattern)h(matc)m(h.)67 b(Using)39 b(`)p Ft(;&)p +Fu(')g(in)f(place)i(of)f(`)p Ft(;;)p Fu(')g(causes)g(execution)h(to)g +(con)m(tin)m(ue)630 2608 y(with)34 b(the)g Fr(command-list)j +Fu(asso)s(ciated)f(with)e(the)h(next)f(clause,)i(if)f(an)m(y)-8 +b(.)53 b(Using)34 b(`)p Ft(;;&)p Fu(')g(in)630 2718 y(place)c(of)f(`)p +Ft(;;)p Fu(')g(causes)h(the)f(shell)h(to)g(test)g(the)f(patterns)g(in)g +(the)g(next)h(clause,)g(if)f(an)m(y)-8 b(,)31 b(and)630 +2827 y(execute)26 b(an)m(y)f(asso)s(ciated)h Fr(command-list)h +Fu(on)e(a)f(successful)h(matc)m(h,)i(con)m(tin)m(uing)e(the)g(case)630 +2937 y(statemen)m(t)32 b(execution)g(as)e(if)h(the)f(pattern)h(list)g +(had)f(not)g(matc)m(hed.)630 3070 y(The)c(return)f(status)h(is)g(zero)h +(if)f(no)g Fr(pattern)g Fu(is)g(matc)m(hed.)40 b(Otherwise,)27 +b(the)g(return)e(status)630 3180 y(is)30 b(the)h(exit)g(status)g(of)f +(the)h Fr(command-list)i Fu(executed.)150 3336 y Ft(select)630 +3469 y Fu(The)g Ft(select)f Fu(construct)i(allo)m(ws)h(the)f(easy)g +(generation)h(of)e(men)m(us.)50 b(It)34 b(has)f(almost)i(the)630 +3579 y(same)c(syn)m(tax)g(as)f(the)h Ft(for)e Fu(command:)870 +3712 y Ft(select)46 b Fj(name)h Ft([in)g Fj(words)f Ft(...)o(];)h(do)h +Fj(commands)p Ft(;)d(done)630 3845 y Fu(The)25 b(list)h(of)f(w)m(ords)g +(follo)m(wing)i Ft(in)d Fu(is)h(expanded,)h(generating)h(a)e(list)h(of) +g(items.)39 b(The)25 b(set)h(of)630 3954 y(expanded)i(w)m(ords)h(is)g +(prin)m(ted)f(on)h(the)g(standard)f(error)h(output)f(stream,)i(eac)m(h) +g(preceded)630 4064 y(b)m(y)21 b(a)g(n)m(um)m(b)s(er.)37 +b(If)20 b(the)i(`)p Ft(in)30 b Fj(words)p Fu(')20 b(is)h(omitted,)j +(the)d(p)s(ositional)h(parameters)g(are)f(prin)m(ted,)630 +4174 y(as)28 b(if)f(`)p Ft(in)j("$@")p Fu(')d(had)f(b)s(een)h(sp)s +(eci\014ed.)39 b(The)27 b Ft(PS3)g Fu(prompt)f(is)i(then)f(displa)m(y)m +(ed)h(and)f(a)h(line)630 4283 y(is)h(read)f(from)h(the)f(standard)g +(input.)39 b(If)29 b(the)g(line)g(consists)g(of)g(a)g(n)m(um)m(b)s(er)e +(corresp)s(onding)630 4393 y(to)36 b(one)f(of)h(the)f(displa)m(y)m(ed)h +(w)m(ords,)g(then)f(the)g(v)-5 b(alue)36 b(of)f Fr(name)40 +b Fu(is)35 b(set)h(to)g(that)g(w)m(ord.)54 b(If)630 4502 +y(the)37 b(line)h(is)f(empt)m(y)-8 b(,)39 b(the)e(w)m(ords)g(and)f +(prompt)g(are)i(displa)m(y)m(ed)f(again.)62 b(If)37 b +Ft(EOF)f Fu(is)h(read,)630 4612 y(the)c Ft(select)e Fu(command)i +(completes.)50 b(An)m(y)33 b(other)g(v)-5 b(alue)33 b(read)g(causes)g +Fr(name)38 b Fu(to)c(b)s(e)e(set)630 4722 y(to)f(n)m(ull.)41 +b(The)30 b(line)g(read)h(is)f(sa)m(v)m(ed)h(in)g(the)f(v)-5 +b(ariable)31 b Ft(REPLY)p Fu(.)630 4855 y(The)42 b Fr(commands)j +Fu(are)d(executed)h(after)g(eac)m(h)g(selection)h(un)m(til)e(a)h +Ft(break)d Fu(command)i(is)630 4964 y(executed,)32 b(at)f(whic)m(h)f(p) +s(oin)m(t)g(the)h Ft(select)d Fu(command)i(completes.)630 +5097 y(Here)39 b(is)g(an)g(example)h(that)f(allo)m(ws)i(the)e(user)f +(to)i(pic)m(k)f(a)g(\014lename)h(from)e(the)h(curren)m(t)630 +5207 y(directory)-8 b(,)32 b(and)d(displa)m(ys)i(the)f(name)h(and)f +(index)f(of)i(the)g(\014le)f(selected.)870 5340 y Ft(select)46 +b(fname)g(in)i(*;)p eop end +%%Page: 13 19 +TeXDict begin 13 18 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(13)870 299 +y Ft(do)870 408 y(echo)47 b(you)g(picked)f($fname)g(\\\($REPLY\\\))870 +518 y(break;)870 628 y(done)150 788 y(\(\(...)o(\)\))870 +923 y(\(\()h Fj(expression)e Ft(\)\))630 1058 y Fu(The)33 +b(arithmetic)i Fr(expression)f Fu(is)f(ev)-5 b(aluated)35 +b(according)g(to)f(the)g(rules)f(describ)s(ed)g(b)s(elo)m(w)630 +1167 y(\(see)j(Section)f(6.5)h([Shell)f(Arithmetic],)i(page)f(93\).)55 +b(If)34 b(the)h(v)-5 b(alue)35 b(of)g(the)g(expression)g(is)630 +1277 y(non-zero,)27 b(the)f(return)e(status)i(is)g(0;)h(otherwise)f +(the)g(return)e(status)i(is)g(1.)39 b(This)25 b(is)g(exactly)630 +1386 y(equiv)-5 b(alen)m(t)32 b(to)870 1521 y Ft(let)47 +b(")p Fj(expression)p Ft(")630 1656 y Fu(See)25 b(Section)h(4.2)h +([Bash)e(Builtins],)i(page)f(51,)i(for)c(a)i(full)f(description)g(of)g +(the)h Ft(let)e Fu(builtin.)150 1816 y Ft([[...)o(]])870 +1951 y([[)47 b Fj(expression)e Ft(]])630 2086 y Fu(Return)25 +b(a)h(status)f(of)h(0)g(or)g(1)g(dep)s(ending)e(on)h(the)h(ev)-5 +b(aluation)27 b(of)e(the)h(conditional)h(expres-)630 +2196 y(sion)j Fr(expression)p Fu(.)41 b(Expressions)29 +b(are)i(comp)s(osed)f(of)g(the)h(primaries)f(describ)s(ed)f(b)s(elo)m +(w)h(in)630 2305 y(Section)36 b(6.4)h([Bash)f(Conditional)g +(Expressions],)h(page)f(91.)57 b(W)-8 b(ord)36 b(splitting)h(and)e +(\014le-)630 2415 y(name)d(expansion)g(are)h(not)g(p)s(erformed)d(on)j +(the)f(w)m(ords)g(b)s(et)m(w)m(een)h(the)f Ft([[)g Fu(and)f +Ft(]])p Fu(;)i(tilde)630 2524 y(expansion,)e(parameter)g(and)f(v)-5 +b(ariable)31 b(expansion,)g(arithmetic)g(expansion,)g(command)630 +2634 y(substitution,)40 b(pro)s(cess)f(substitution,)h(and)e(quote)h +(remo)m(v)-5 b(al)40 b(are)f(p)s(erformed.)63 b(Condi-)630 +2744 y(tional)32 b(op)s(erators)e(suc)m(h)g(as)h(`)p +Ft(-f)p Fu(')f(m)m(ust)g(b)s(e)g(unquoted)g(to)h(b)s(e)e(recognized)j +(as)f(primaries.)630 2878 y(When)k(used)f(with)h Ft([[)p +Fu(,)h(the)f(`)p Ft(<)p Fu(')g(and)g(`)p Ft(>)p Fu(')g(op)s(erators)g +(sort)g(lexicographically)j(using)d(the)630 2988 y(curren)m(t)30 +b(lo)s(cale.)630 3123 y(When)22 b(the)h(`)p Ft(==)p Fu(')f(and)g(`)p +Ft(!=)p Fu(')g(op)s(erators)h(are)g(used,)g(the)g(string)f(to)i(the)e +(righ)m(t)h(of)g(the)g(op)s(erator)630 3232 y(is)31 b(considered)g(a)h +(pattern)f(and)g(matc)m(hed)h(according)g(to)g(the)g(rules)f(describ)s +(ed)f(b)s(elo)m(w)h(in)630 3342 y(Section)d(3.5.8.1)h([P)m(attern)f +(Matc)m(hing],)h(page)f(33,)g(as)f(if)g(the)g Ft(extglob)d +Fu(shell)j(option)g(w)m(ere)630 3452 y(enabled.)46 b(The)31 +b(`)p Ft(=)p Fu(')h(op)s(erator)h(is)f(iden)m(tical)h(to)g(`)p +Ft(==)p Fu('.)46 b(If)31 b(the)h Ft(nocasematch)d Fu(shell)j(option)630 +3561 y(\(see)42 b(the)f(description)g(of)h Ft(shopt)d +Fu(in)i(Section)h(4.3.2)h([The)e(Shopt)f(Builtin],)45 +b(page)d(66\))630 3671 y(is)e(enabled,)i(the)e(matc)m(h)h(is)e(p)s +(erformed)g(without)g(regard)h(to)h(the)f(case)g(of)g(alphab)s(etic)630 +3780 y(c)m(haracters.)h(The)28 b(return)e(v)-5 b(alue)28 +b(is)g(0)g(if)g(the)g(string)g(matc)m(hes)h(\(`)p Ft(==)p +Fu('\))f(or)g(do)s(es)f(not)h(matc)m(h)630 3890 y(\(`)p +Ft(!=)p Fu('\))j(the)f(pattern,)h(and)e(1)i(otherwise.)41 +b(An)m(y)30 b(part)g(of)h(the)f(pattern)g(ma)m(y)h(b)s(e)f(quoted)g(to) +630 4000 y(force)h(the)g(quoted)f(p)s(ortion)g(to)h(b)s(e)f(matc)m(hed) +h(as)g(a)f(string.)630 4134 y(An)44 b(additional)h(binary)f(op)s +(erator,)49 b(`)p Ft(=~)p Fu(',)f(is)c(a)m(v)-5 b(ailable,)51 +b(with)44 b(the)h(same)f(precedence)630 4244 y(as)c(`)p +Ft(==)p Fu(')g(and)f(`)p Ft(!=)p Fu('.)69 b(When)40 b(it)g(is)g(used,)i +(the)e(string)g(to)g(the)g(righ)m(t)h(of)f(the)g(op)s(erator)g(is)630 +4354 y(considered)23 b(a)g Fm(posix)g Fu(extended)g(regular)g +(expression)g(and)f(matc)m(hed)i(accordingly)g(\(using)630 +4463 y(the)29 b Fm(posix)g Ft(regcomp)e Fu(and)h Ft(regexec)g +Fu(in)m(terfaces)i(usually)f(describ)s(ed)f(in)h Fl(r)-5 +b(e)g(gex)11 b Fu(\(3\)\).)42 b(The)630 4573 y(return)20 +b(v)-5 b(alue)21 b(is)g(0)g(if)g(the)g(string)g(matc)m(hes)h(the)f +(pattern,)j(and)c(1)h(otherwise.)38 b(If)21 b(the)g(regular)630 +4682 y(expression)k(is)h(syn)m(tactically)i(incorrect,)g(the)e +(conditional)h(expression's)e(return)g(v)-5 b(alue)26 +b(is)630 4792 y(2.)39 b(If)24 b(the)h Ft(nocasematch)c +Fu(shell)k(option)g(\(see)h(the)e(description)h(of)g +Ft(shopt)e Fu(in)h(Section)h(4.3.2)630 4902 y([The)e(Shopt)g(Builtin],) +j(page)e(66\))h(is)e(enabled,)i(the)f(matc)m(h)g(is)g(p)s(erformed)e +(without)h(regard)630 5011 y(to)36 b(the)g(case)h(of)f(alphab)s(etic)g +(c)m(haracters.)58 b(An)m(y)36 b(part)g(of)g(the)g(pattern)f(ma)m(y)i +(b)s(e)e(quoted)630 5121 y(to)f(force)g(the)f(quoted)h(p)s(ortion)f(to) +h(b)s(e)f(matc)m(hed)h(as)f(a)h(string.)50 b(Brac)m(k)m(et)35 +b(expressions)e(in)630 5230 y(regular)g(expressions)g(m)m(ust)g(b)s(e)f +(treated)i(carefully)-8 b(,)35 b(since)e(normal)g(quoting)g(c)m +(haracters)630 5340 y(lose)25 b(their)f(meanings)g(b)s(et)m(w)m(een)h +(brac)m(k)m(ets.)40 b(If)23 b(the)h(pattern)h(is)f(stored)g(in)f(a)i +(shell)f(v)-5 b(ariable,)p eop end +%%Page: 14 20 +TeXDict begin 14 19 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(14)630 299 +y(quoting)41 b(the)f(v)-5 b(ariable)42 b(expansion)e(forces)h(the)f(en) +m(tire)h(pattern)g(to)g(b)s(e)f(matc)m(hed)h(as)g(a)630 +408 y(string.)630 555 y(The)26 b(pattern)g(will)h(matc)m(h)g(if)f(it)h +(matc)m(hes)h(an)m(y)e(part)h(of)f(the)h(string.)39 b(Anc)m(hor)26 +b(the)h(pattern)630 664 y(using)f(the)i(`)p Ft(^)p Fu(')f(and)f(`)p +Ft($)p Fu(')h(regular)h(expression)e(op)s(erators)h(to)h(force)g(it)f +(to)h(matc)m(h)g(the)f(en)m(tire)630 774 y(string.)81 +b(The)44 b(arra)m(y)g(v)-5 b(ariable)45 b Ft(BASH_REMATCH)40 +b Fu(records)k(whic)m(h)f(parts)h(of)g(the)g(string)630 +883 y(matc)m(hed)31 b(the)f(pattern.)41 b(The)30 b(elemen)m(t)i(of)e +Ft(BASH_REMATCH)d Fu(with)j(index)g(0)g(con)m(tains)i(the)630 +993 y(p)s(ortion)20 b(of)h(the)g(string)f(matc)m(hing)i(the)f(en)m +(tire)g(regular)g(expression.)37 b(Substrings)19 b(matc)m(hed)630 +1103 y(b)m(y)30 b(paren)m(thesized)g(sub)s(expressions)e(within)i(the)g +(regular)g(expression)g(are)g(sa)m(v)m(ed)h(in)f(the)630 +1212 y(remaining)j Ft(BASH_REMATCH)c Fu(indices.)49 b(The)32 +b(elemen)m(t)i(of)f Ft(BASH_REMATCH)d Fu(with)i(index)g +Fr(n)630 1322 y Fu(is)e(the)h(p)s(ortion)f(of)g(the)h(string)f(matc)m +(hing)i(the)e Fr(n)p Fu(th)g(paren)m(thesized)h(sub)s(expression.)630 +1468 y(F)-8 b(or)34 b(example,)h(the)e(follo)m(wing)i(will)f(matc)m(h)g +(a)g(line)f(\(stored)h(in)f(the)h(shell)f(v)-5 b(ariable)34 +b Fr(line)5 b Fu(\))630 1577 y(if)42 b(there)h(is)g(a)f(sequence)h(of)g +(c)m(haracters)h(an)m(ywhere)e(in)g(the)h(v)-5 b(alue)43 +b(consisting)g(of)g(an)m(y)630 1687 y(n)m(um)m(b)s(er,)30 +b(including)h(zero,)h(of)f(c)m(haracters)i(in)e(the)g +Ft(space)f Fu(c)m(haracter)i(class,)h(zero)f(or)f(one)630 +1797 y(instances)g(of)f(`)p Ft(a)p Fu(',)h(then)f(a)h(`)p +Ft(b)p Fu(':)870 1943 y Ft([[)47 b($line)g(=~)g([[:space:]]*\(a\)?b)c +(]])630 2089 y Fu(That)24 b(means)g(v)-5 b(alues)24 b(lik)m(e)h(`)p +Ft(aab)p Fu(')e(and)h(`)30 b Ft(aaaaaab)p Fu(')22 b(will)i(matc)m(h,)j +(as)d(will)g(a)g(line)g(con)m(taining)630 2198 y(a)31 +b(`)p Ft(b)p Fu(')f(an)m(ywhere)h(in)f(its)g(v)-5 b(alue.)630 +2345 y(Storing)31 b(the)g(regular)g(expression)f(in)h(a)g(shell)g(v)-5 +b(ariable)31 b(is)g(often)g(a)g(useful)f(w)m(a)m(y)i(to)f(a)m(v)m(oid) +630 2454 y(problems)f(with)g(quoting)h(c)m(haracters)i(that)e(are)g(sp) +s(ecial)g(to)h(the)f(shell.)41 b(It)31 b(is)g(sometimes)630 +2564 y(di\016cult)24 b(to)h(sp)s(ecify)f(a)h(regular)g(expression)f +(literally)i(without)f(using)e(quotes,)k(or)d(to)h(k)m(eep)630 +2673 y(trac)m(k)33 b(of)g(the)f(quoting)g(used)g(b)m(y)g(regular)g +(expressions)g(while)g(pa)m(ying)h(atten)m(tion)h(to)f(the)630 +2783 y(shell's)25 b(quote)g(remo)m(v)-5 b(al.)40 b(Using)25 +b(a)g(shell)g(v)-5 b(ariable)26 b(to)f(store)g(the)g(pattern)g +(decreases)g(these)630 2892 y(problems.)40 b(F)-8 b(or)31 +b(example,)g(the)g(follo)m(wing)h(is)e(equiv)-5 b(alen)m(t)32 +b(to)f(the)g(ab)s(o)m(v)m(e:)870 3039 y Ft(pattern='[[:space:]]*\(a\))o +(?b')870 3148 y([[)47 b($line)g(=~)g($pattern)e(]])630 +3294 y Fu(If)28 b(y)m(ou)h(w)m(an)m(t)g(to)g(matc)m(h)h(a)e(c)m +(haracter)j(that's)e(sp)s(ecial)g(to)g(the)g(regular)f(expression)g +(gram-)630 3404 y(mar,)g(it)g(has)g(to)g(b)s(e)f(quoted)h(to)g(remo)m +(v)m(e)h(its)f(sp)s(ecial)g(meaning.)40 b(This)27 b(means)g(that)h(in)g +(the)630 3513 y(pattern)e(`)p Ft(xxx.txt)p Fu(',)g(the)h(`)p +Ft(.)p Fu(')f(matc)m(hes)i(an)m(y)e(c)m(haracter)i(in)e(the)h(string)f +(\(its)h(usual)f(regular)630 3623 y(expression)g(meaning\),)i(but)e(in) +g(the)h(pattern)f(`)p Ft("xxx.txt")p Fu(')f(it)i(can)g(only)f(matc)m(h) +i(a)e(literal)630 3733 y(`)p Ft(.)p Fu('.)56 b(Shell)35 +b(programmers)f(should)h(tak)m(e)i(sp)s(ecial)e(care)i(with)e(bac)m +(kslashes,)i(since)f(bac)m(k-)630 3842 y(slashes)27 b(are)g(used)f(b)s +(oth)g(b)m(y)h(the)f(shell)h(and)f(regular)h(expressions)g(to)g(remo)m +(v)m(e)h(the)f(sp)s(ecial)630 3952 y(meaning)h(from)f(the)h(follo)m +(wing)i(c)m(haracter.)41 b(The)27 b(follo)m(wing)j(t)m(w)m(o)f(sets)f +(of)g(commands)g(are)630 4061 y Fl(not)40 b Fu(equiv)-5 +b(alen)m(t:)870 4208 y Ft(pattern='\\.')870 4427 y([[)47 +b(.)h(=~)f($pattern)e(]])870 4536 y([[)i(.)h(=~)f(\\.)g(]])870 +4756 y([[)g(.)h(=~)f("$pattern")e(]])870 4865 y([[)i(.)h(=~)f('\\.')f +(]])630 5011 y Fu(The)28 b(\014rst)h(t)m(w)m(o)h(matc)m(hes)g(will)f +(succeed,)h(but)f(the)g(second)g(t)m(w)m(o)h(will)f(not,)h(b)s(ecause)f +(in)g(the)630 5121 y(second)39 b(t)m(w)m(o)i(the)e(bac)m(kslash)h(will) +f(b)s(e)g(part)g(of)g(the)h(pattern)f(to)h(b)s(e)e(matc)m(hed.)68 +b(In)39 b(the)630 5230 y(\014rst)31 b(t)m(w)m(o)h(examples,)h(the)e +(bac)m(kslash)h(remo)m(v)m(es)h(the)f(sp)s(ecial)g(meaning)f(from)g(`)p +Ft(.)p Fu(',)h(so)g(the)630 5340 y(literal)f(`)p Ft(.)p +Fu(')e(matc)m(hes.)42 b(If)28 b(the)i(string)f(in)g(the)g(\014rst)g +(examples)g(w)m(ere)h(an)m(ything)g(other)f(than)p eop +end +%%Page: 15 21 +TeXDict begin 15 20 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(15)630 299 +y(`)p Ft(.)p Fu(',)29 b(sa)m(y)g(`)p Ft(a)p Fu(',)g(the)f(pattern)g(w)m +(ould)g(not)h(matc)m(h,)h(b)s(ecause)e(the)g(quoted)g(`)p +Ft(.)p Fu(')h(in)e(the)i(pattern)630 408 y(loses)i(its)g(sp)s(ecial)g +(meaning)f(of)h(matc)m(hing)g(an)m(y)g(single)g(c)m(haracter.)630 +542 y(Expressions)23 b(ma)m(y)h(b)s(e)e(com)m(bined)i(using)f(the)h +(follo)m(wing)h(op)s(erators,)g(listed)f(in)f(decreasing)630 +651 y(order)30 b(of)g(precedence:)630 808 y Ft(\()g Fj(expression)e +Ft(\))1110 918 y Fu(Returns)i(the)h(v)-5 b(alue)31 b(of)g +Fr(expression)p Fu(.)42 b(This)30 b(ma)m(y)i(b)s(e)e(used)g(to)i(o)m(v) +m(erride)g(the)1110 1027 y(normal)e(precedence)h(of)g(op)s(erators.)630 +1184 y Ft(!)f Fj(expression)1110 1293 y Fu(T)-8 b(rue)30 +b(if)g Fr(expression)g Fu(is)h(false.)630 1450 y Fj(expression1)c +Ft(&&)j Fj(expression2)1110 1560 y Fu(T)-8 b(rue)30 b(if)g(b)s(oth)g +Fr(expression1)38 b Fu(and)29 b Fr(expression2)38 b Fu(are)31 +b(true.)630 1716 y Fj(expression1)c Ft(||)j Fj(expression2)1110 +1826 y Fu(T)-8 b(rue)30 b(if)g(either)h Fr(expression1)38 +b Fu(or)30 b Fr(expression2)38 b Fu(is)30 b(true.)630 +1983 y(The)24 b Ft(&&)h Fu(and)f Ft(||)g Fu(op)s(erators)h(do)g(not)g +(ev)-5 b(aluate)27 b Fr(expression2)32 b Fu(if)25 b(the)g(v)-5 +b(alue)25 b(of)g Fr(expression1)630 2092 y Fu(is)30 b(su\016cien)m(t)h +(to)g(determine)g(the)f(return)g(v)-5 b(alue)31 b(of)f(the)h(en)m(tire) +g(conditional)h(expression.)150 2289 y Fk(3.2.5.3)63 +b(Grouping)43 b(Commands)150 2436 y Fu(Bash)30 b(pro)m(vides)g(t)m(w)m +(o)h(w)m(a)m(ys)f(to)h(group)e(a)h(list)g(of)g(commands)f(to)i(b)s(e)e +(executed)h(as)g(a)h(unit.)40 b(When)29 b(com-)150 2545 +y(mands)h(are)i(group)s(ed,)f(redirections)h(ma)m(y)g(b)s(e)e(applied)i +(to)g(the)f(en)m(tire)h(command)g(list.)44 b(F)-8 b(or)32 +b(example,)150 2655 y(the)f(output)f(of)g(all)h(the)g(commands)f(in)g +(the)h(list)g(ma)m(y)g(b)s(e)e(redirected)i(to)g(a)g(single)g(stream.) +150 2812 y Ft(\(\))870 2945 y(\()47 b Fj(list)g Ft(\))630 +3078 y Fu(Placing)30 b(a)f(list)g(of)g(commands)f(b)s(et)m(w)m(een)i +(paren)m(theses)e(causes)i(a)f(subshell)e(en)m(vironmen)m(t)630 +3188 y(to)k(b)s(e)e(created)j(\(see)f(Section)g(3.7.3)h([Command)d +(Execution)i(En)m(vironmen)m(t],)g(page)f(40\),)630 3297 +y(and)d(eac)m(h)h(of)g(the)f(commands)g(in)g Fr(list)j +Fu(to)f(b)s(e)d(executed)j(in)e(that)h(subshell.)38 b(Since)28 +b(the)f Fr(list)630 3407 y Fu(is)i(executed)g(in)f(a)h(subshell,)g(v)-5 +b(ariable)29 b(assignmen)m(ts)g(do)g(not)g(remain)f(in)g(e\013ect)j +(after)e(the)630 3516 y(subshell)g(completes.)150 3673 +y Ft({})870 3806 y({)47 b Fj(list)p Ft(;)g(})630 3939 +y Fu(Placing)30 b(a)g(list)g(of)g(commands)f(b)s(et)m(w)m(een)h(curly)f +(braces)g(causes)h(the)f(list)h(to)g(b)s(e)f(executed)630 +4049 y(in)d(the)h(curren)m(t)g(shell)f(con)m(text.)42 +b(No)27 b(subshell)f(is)g(created.)41 b(The)26 b(semicolon)i(\(or)f +(newline\))630 4159 y(follo)m(wing)32 b Fr(list)h Fu(is)d(required.)275 +4315 y(In)44 b(addition)h(to)h(the)f(creation)i(of)e(a)g(subshell,)j +(there)e(is)f(a)g(subtle)g(di\013erence)h(b)s(et)m(w)m(een)f(these)150 +4425 y(t)m(w)m(o)c(constructs)e(due)g(to)g(historical)i(reasons.)67 +b(The)39 b(braces)g(are)h Ft(reserved)28 b(words)p Fu(,)40 +b(so)g(they)f(m)m(ust)150 4535 y(b)s(e)d(separated)h(from)f(the)g +Fr(list)j Fu(b)m(y)e Ft(blank)p Fu(s)e(or)h(other)h(shell)f(metac)m +(haracters.)62 b(The)36 b(paren)m(theses)h(are)150 4644 +y Ft(operators)p Fu(,)23 b(and)h(are)g(recognized)i(as)e(separate)i +(tok)m(ens)f(b)m(y)f(the)g(shell)h(ev)m(en)g(if)f(they)g(are)h(not)f +(separated)150 4754 y(from)30 b(the)g Fr(list)j Fu(b)m(y)e(whitespace.) +275 4887 y(The)e(exit)j(status)e(of)h(b)s(oth)f(of)g(these)h +(constructs)g(is)f(the)h(exit)g(status)f(of)h Fr(list)p +Fu(.)150 5083 y Fk(3.2.6)63 b(Copro)s(cesses)150 5230 +y Fu(A)37 b Ft(coprocess)c Fu(is)k(a)g(shell)f(command)h(preceded)f(b)m +(y)g(the)h Ft(coproc)d Fu(reserv)m(ed)j(w)m(ord.)59 b(A)36 +b(copro)s(cess)h(is)150 5340 y(executed)g(async)m(hronously)g(in)f(a)h +(subshell,)g(as)g(if)g(the)f(command)h(had)f(b)s(een)f(terminated)i +(with)g(the)p eop end +%%Page: 16 22 +TeXDict begin 16 21 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(16)150 299 +y(`)p Ft(&)p Fu(')34 b(con)m(trol)h(op)s(erator,)g(with)f(a)g(t)m(w)m +(o-w)m(a)m(y)i(pip)s(e)d(established)h(b)s(et)m(w)m(een)h(the)f +(executing)h(shell)f(and)f(the)150 408 y(copro)s(cess.)275 +550 y(The)c(format)i(for)f(a)h(copro)s(cess)g(is:)390 +691 y Ft(coproc)46 b([)p Fj(NAME)p Ft(])g Fj(command)g +Ft([)p Fj(redirections)p Ft(])150 833 y Fu(This)39 b(creates)j(a)e +(copro)s(cess)h(named)f Fr(NAME)p Fu(.)70 b(If)40 b Fr(NAME)46 +b Fu(is)40 b(not)g(supplied,)i(the)e(default)h(name)f(is)150 +942 y Fr(COPR)m(OC)p Fu(.)d Fr(NAME)28 b Fu(m)m(ust)23 +b(not)g(b)s(e)e(supplied)h(if)g Fr(command)k Fu(is)d(a)g(simple)f +(command)g(\(see)i(Section)f(3.2.2)150 1052 y([Simple)39 +b(Commands],)h(page)g(8\);)k(otherwise,)e(it)d(is)g(in)m(terpreted)h +(as)f(the)g(\014rst)f(w)m(ord)h(of)g(the)g(simple)150 +1162 y(command.)275 1303 y(When)j(the)i(copro)s(cess)f(is)g(executed,) +48 b(the)43 b(shell)g(creates)i(an)e(arra)m(y)g(v)-5 +b(ariable)44 b(\(see)g(Section)g(6.7)150 1413 y([Arra)m(ys],)32 +b(page)g(95\))h(named)e Ft(NAME)f Fu(in)h(the)h(con)m(text)h(of)e(the)h +(executing)g(shell.)44 b(The)31 b(standard)f(output)150 +1522 y(of)39 b Fr(command)j Fu(is)d(connected)g(via)g(a)g(pip)s(e)f(to) +i(a)f(\014le)f(descriptor)h(in)f(the)h(executing)h(shell,)h(and)d(that) +150 1632 y(\014le)i(descriptor)h(is)f(assigned)h(to)g +Ft(NAME)p Fu([0].)70 b(The)40 b(standard)f(input)h(of)g +Fr(command)k Fu(is)c(connected)h(via)150 1741 y(a)h(pip)s(e)f(to)i(a)f +(\014le)g(descriptor)g(in)f(the)h(executing)i(shell,)h(and)c(that)h +(\014le)g(descriptor)g(is)g(assigned)g(to)150 1851 y +Ft(NAME)p Fu([1].)69 b(This)39 b(pip)s(e)g(is)h(established)g(b)s +(efore)f(an)m(y)h(redirections)h(sp)s(eci\014ed)e(b)m(y)g(the)h +(command)g(\(see)150 1961 y(Section)45 b(3.6)h([Redirections],)k(page) +45 b(35\).)84 b(The)44 b(\014le)h(descriptors)f(can)h(b)s(e)f(utilized) +h(as)g(argumen)m(ts)150 2070 y(to)d(shell)g(commands)f(and)g +(redirections)h(using)f(standard)g(w)m(ord)g(expansions.)74 +b(Other)41 b(than)g(those)150 2180 y(created)27 b(to)g(execute)g +(command)f(and)f(pro)s(cess)h(substitutions,)h(the)f(\014le)g +(descriptors)g(are)g(not)h(a)m(v)-5 b(ailable)150 2289 +y(in)30 b(subshells.)275 2431 y(The)d(pro)s(cess)h(ID)h(of)f(the)h +(shell)f(spa)m(wned)g(to)h(execute)h(the)e(copro)s(cess)h(is)f(a)m(v)-5 +b(ailable)31 b(as)d(the)h(v)-5 b(alue)29 b(of)150 2540 +y(the)k(v)-5 b(ariable)33 b Ft(NAME)p 850 2540 28 4 v +39 w Fu(PID.)g(The)f Ft(wait)f Fu(builtin)h(command)g(ma)m(y)h(b)s(e)f +(used)g(to)h(w)m(ait)h(for)e(the)h(copro)s(cess)150 2650 +y(to)e(terminate.)275 2791 y(Since)20 b(the)g(copro)s(cess)h(is)g +(created)g(as)g(an)f(async)m(hronous)g(command,)i(the)f +Ft(coproc)d Fu(command)i(alw)m(a)m(ys)150 2901 y(returns)29 +b(success.)41 b(The)30 b(return)f(status)i(of)f(a)h(copro)s(cess)g(is)f +(the)h(exit)g(status)g(of)f Fr(command)p Fu(.)150 3107 +y Fk(3.2.7)63 b(GNU)41 b(P)m(arallel)150 3254 y Fu(There)30 +b(are)h(w)m(a)m(ys)g(to)g(run)f(commands)g(in)g(parallel)h(that)h(are)e +(not)h(built)g(in)m(to)g(Bash.)41 b(GNU)31 b(P)m(arallel)i(is)150 +3364 y(a)e(to)s(ol)g(to)g(do)f(just)g(that.)275 3505 +y(GNU)e(P)m(arallel,)i(as)e(its)g(name)f(suggests,)j(can)d(b)s(e)g +(used)g(to)h(build)f(and)g(run)f(commands)h(in)h(parallel.)150 +3615 y(Y)-8 b(ou)41 b(ma)m(y)g(run)e(the)h(same)h(command)f(with)g +(di\013eren)m(t)h(argumen)m(ts,)j(whether)39 b(they)i(are)g +(\014lenames,)150 3724 y(usernames,)27 b(hostnames,)h(or)e(lines)h +(read)f(from)h(\014les.)39 b(GNU)27 b(P)m(arallel)i(pro)m(vides)d +(shorthand)g(references)150 3834 y(to)38 b(man)m(y)g(of)g(the)g(most)g +(common)g(op)s(erations)g(\(input)f(lines,)j(v)-5 b(arious)38 +b(p)s(ortions)f(of)h(the)g(input)e(line,)150 3943 y(di\013eren)m(t)f(w) +m(a)m(ys)h(to)f(sp)s(ecify)f(the)h(input)f(source,)i(and)e(so)h(on\).) +54 b(P)m(arallel)36 b(can)f(replace)h Ft(xargs)d Fu(or)i(feed)150 +4053 y(commands)30 b(from)g(its)h(input)e(sources)h(to)i(sev)m(eral)f +(di\013eren)m(t)g(instances)g(of)g(Bash.)275 4194 y(F)-8 +b(or)33 b(a)g(complete)h(description,)g(refer)e(to)i(the)f(GNU)g(P)m +(arallel)i(do)s(cumen)m(tation.)48 b(A)33 b(few)f(examples)150 +4304 y(should)d(pro)m(vide)i(a)g(brief)e(in)m(tro)s(duction)i(to)g(its) +g(use.)275 4445 y(F)-8 b(or)37 b(example,)i(it)e(is)f(easy)h(to)g +(replace)h Ft(xargs)d Fu(to)i(gzip)g(all)g(h)m(tml)g(\014les)f(in)h +(the)f(curren)m(t)g(directory)150 4555 y(and)30 b(its)h(sub)s +(directories:)390 4696 y Ft(find)47 b(.)g(-type)f(f)i(-name)e('*.html') +g(-print)g(|)h(parallel)f(gzip)150 4838 y Fu(If)30 b(y)m(ou)h(need)f +(to)h(protect)h(sp)s(ecial)f(c)m(haracters)g(suc)m(h)g(as)f(newlines)h +(in)f(\014le)g(names,)h(use)f(\014nd's)f Ft(-print0)150 +4948 y Fu(option)i(and)f(parallel's)h Ft(-0)f Fu(option.)275 +5089 y(Y)-8 b(ou)34 b(can)g(use)f(P)m(arallel)j(to)e(mo)m(v)m(e)h +(\014les)f(from)f(the)h(curren)m(t)f(directory)h(when)f(the)h(n)m(um)m +(b)s(er)e(of)i(\014les)150 5199 y(is)c(to)s(o)i(large)f(to)g(pro)s +(cess)f(with)g(one)h Ft(mv)f Fu(in)m(v)m(o)s(cation:)390 +5340 y Ft(printf)46 b('\045s\\n')g(*)i(|)f(parallel)f(mv)h({})g +(destdir)p eop end +%%Page: 17 23 +TeXDict begin 17 22 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(17)275 299 +y(As)28 b(y)m(ou)h(can)g(see,)g(the)g Fi({})g Fu(is)g(replaced)g(with)f +(eac)m(h)i(line)f(read)f(from)g(standard)g(input.)39 +b(While)29 b(using)150 408 y Ft(ls)34 b Fu(will)i(w)m(ork)f(in)g(most)g +(instances,)i(it)f(is)f(not)g(su\016cien)m(t)h(to)g(deal)f(with)g(all)h +(\014lenames.)55 b Ft(printf)33 b Fu(is)j(a)150 518 y(shell)31 +b(builtin,)f(and)g(therefore)h(is)g(not)g(sub)5 b(ject)30 +b(to)h(the)g(k)m(ernel's)g(limit)g(on)g(the)g(n)m(um)m(b)s(er)e(of)i +(argumen)m(ts)150 628 y(to)37 b(a)f(program,)h(so)g(y)m(ou)f(can)g(use) +g(`)p Ft(*)p Fu(')g(\(but)f(see)i(b)s(elo)m(w)f(ab)s(out)g(the)g +Ft(dotglob)e Fu(shell)i(option\).)58 b(If)36 b(y)m(ou)150 +737 y(need)30 b(to)h(accommo)s(date)h(sp)s(ecial)f(c)m(haracters)h(in)e +(\014lenames,)h(y)m(ou)g(can)f(use)390 877 y Ft(printf)46 +b('\045s\\0')g(*)i(|)f(parallel)f(-0)h(mv)g({})g(destdir)150 +1017 y Fu(as)31 b(alluded)f(to)h(ab)s(o)m(v)m(e.)275 +1157 y(This)e(will)i(run)e(as)h(man)m(y)h Ft(mv)e Fu(commands)h(as)h +(there)f(are)h(\014les)f(in)h(the)f(curren)m(t)g(directory)-8 +b(.)42 b(Y)-8 b(ou)31 b(can)150 1267 y(em)m(ulate)h(a)f(parallel)g +Ft(xargs)e Fu(b)m(y)h(adding)g(the)h Ft(-X)f Fu(option:)390 +1407 y Ft(printf)46 b('\045s\\0')g(*)i(|)f(parallel)f(-0)h(-X)g(mv)g +({})g(destdir)275 1547 y Fu(\(Y)-8 b(ou)31 b(ma)m(y)g(ha)m(v)m(e)g(to)g +(mo)s(dify)f(the)h(pattern)f(if)g(y)m(ou)h(ha)m(v)m(e)h(the)e +Ft(dotglob)f Fu(option)h(enabled.\))275 1687 y(GNU)h(P)m(arallel)i(can) +e(replace)h(certain)g(common)g(idioms)f(that)g(op)s(erate)h(on)f(lines) +g(read)g(from)f(a)i(\014le)150 1797 y(\(in)e(this)h(case,)g +(\014lenames)g(listed)g(one)f(p)s(er)g(line\):)390 1937 +y Ft(while)46 b(IFS=)h(read)g(-r)g(x;)g(do)390 2046 y(do-something1)d +("$x")j("config-$x")390 2156 y(do-something2)d(<)k("$x")390 +2265 y(done)f(<)g(file)g(|)g(process-output)150 2405 +y Fu(with)30 b(a)h(more)f(compact)i(syn)m(tax)f(reminiscen)m(t)g(of)g +(lam)m(b)s(das:)390 2545 y Ft(cat)47 b(list)g(|)g(parallel)f +("do-something1)d({})48 b(config-{})d(;)i(do-something2)e(<)i({}")g(|) +915 2655 y(process-output)275 2795 y Fu(P)m(arallel)31 +b(pro)m(vides)e(a)h(built-in)g(mec)m(hanism)g(to)g(remo)m(v)m(e)h +(\014lename)e(extensions,)i(whic)m(h)e(lends)g(itself)150 +2905 y(to)i(batc)m(h)g(\014le)g(transformations)f(or)g(renaming:)390 +3045 y Ft(ls)47 b(*.gz)g(|)g(parallel)f(-j+0)g("zcat)h({})g(|)g(bzip2)g +(>{.}.bz2)e(&&)j(rm)f({}")150 3185 y Fu(This)28 b(will)i(recompress)e +(all)i(\014les)f(in)g(the)g(curren)m(t)g(directory)g(with)g(names)g +(ending)f(in)h(.gz)h(using)f(bzip2,)150 3294 y(running)37 +b(one)i(job)f(p)s(er)f(CPU)h(\(-j)p Ft(+)p Fu(0\))i(in)e(parallel.)66 +b(\(W)-8 b(e)40 b(use)e Ft(ls)g Fu(for)h(brevit)m(y)g(here;)j(using)c +Ft(find)g Fu(as)150 3404 y(ab)s(o)m(v)m(e)e(is)g(more)f(robust)f(in)h +(the)h(face)g(of)f(\014lenames)h(con)m(taining)g(unexp)s(ected)f(c)m +(haracters.\))57 b(P)m(arallel)150 3513 y(can)31 b(tak)m(e)h(argumen)m +(ts)e(from)g(the)h(command)f(line;)h(the)f(ab)s(o)m(v)m(e)i(can)f(also) +g(b)s(e)f(written)g(as)390 3654 y Ft(parallel)46 b("zcat)g({})h(|)h +(bzip2)e(>{.}.bz2)f(&&)j(rm)f({}")g(:::)g(*.gz)275 3794 +y Fu(If)24 b(a)i(command)f(generates)h(output,)g(y)m(ou)g(ma)m(y)f(w)m +(an)m(t)h(to)g(preserv)m(e)g(the)f(input)f(order)h(in)g(the)g(output.) +150 3903 y(F)-8 b(or)31 b(instance,)g(the)g(follo)m(wing)h(command)390 +4043 y Ft({)581 4153 y(echo)47 b(foss.org.my)d(;)581 +4262 y(echo)j(debian.org)e(;)581 4372 y(echo)i(freenetproject.org)42 +b(;)390 4482 y(})47 b(|)h(parallel)d(traceroute)150 4622 +y Fu(will)31 b(displa)m(y)f(as)h(output)f(the)g(traceroute)i(in)m(v)m +(o)s(cation)h(that)e(\014nishes)e(\014rst.)40 b(Adding)30 +b(the)g Ft(-k)g Fu(option)390 4762 y Ft({)581 4871 y(echo)47 +b(foss.org.my)d(;)581 4981 y(echo)j(debian.org)e(;)581 +5090 y(echo)i(freenetproject.org)42 b(;)390 5200 y(})47 +b(|)h(parallel)d(-k)j(traceroute)150 5340 y Fu(will)31 +b(ensure)e(that)i(the)g(output)f(of)g Ft(traceroute)e(foss.org.my)f +Fu(is)k(displa)m(y)m(ed)g(\014rst.)p eop end +%%Page: 18 24 +TeXDict begin 18 23 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(18)275 299 +y(Finally)-8 b(,)31 b(P)m(arallel)h(can)e(b)s(e)f(used)g(to)i(run)d(a)i +(sequence)h(of)f(shell)g(commands)f(in)h(parallel,)h(similar)f(to)150 +408 y(`)p Ft(cat)g(file)f(|)h(bash)p Fu('.)53 b(It)35 +b(is)g(not)g(uncommon)f(to)i(tak)m(e)g(a)f(list)h(of)f(\014lenames,)h +(create)g(a)g(series)f(of)g(shell)150 518 y(commands)24 +b(to)h(op)s(erate)h(on)e(them,)i(and)e(feed)g(that)h(list)h(of)e +(commands)g(to)i(a)f(shell.)39 b(P)m(arallel)26 b(can)f(sp)s(eed)150 +628 y(this)30 b(up.)40 b(Assuming)30 b(that)h Ft(file)e +Fu(con)m(tains)i(a)g(list)g(of)g(shell)f(commands,)h(one)f(p)s(er)g +(line,)390 772 y Ft(parallel)46 b(-j)h(10)g(<)g(file)150 +917 y Fu(will)37 b(ev)-5 b(aluate)38 b(the)f(commands)f(using)g(the)h +(shell)g(\(since)g(no)f(explicit)i(command)e(is)h(supplied)e(as)i(an) +150 1027 y(argumen)m(t\),)31 b(in)f(blo)s(c)m(ks)h(of)g(ten)f(shell)h +(jobs)f(at)h(a)g(time.)150 1283 y Fs(3.3)68 b(Shell)45 +b(F)-11 b(unctions)150 1442 y Fu(Shell)35 b(functions)h(are)g(a)g(w)m +(a)m(y)g(to)h(group)e(commands)g(for)h(later)g(execution)h(using)e(a)h +(single)g(name)g(for)150 1552 y(the)f(group.)55 b(They)35 +b(are)g(executed)h(just)f(lik)m(e)h(a)g Ft(")p Fu(regular)p +Ft(")f Fu(command.)54 b(When)35 b(the)h(name)f(of)g(a)h(shell)150 +1661 y(function)j(is)g(used)f(as)h(a)h(simple)f(command)g(name,)i(the)e +(list)h(of)f(commands)g(asso)s(ciated)i(with)d(that)150 +1771 y(function)25 b(name)h(is)g(executed.)40 b(Shell)25 +b(functions)g(are)i(executed)f(in)f(the)h(curren)m(t)g(shell)g(con)m +(text;)j(no)c(new)150 1881 y(pro)s(cess)30 b(is)g(created)i(to)f(in)m +(terpret)g(them.)275 2025 y(F)-8 b(unctions)30 b(are)h(declared)g +(using)f(this)g(syn)m(tax:)390 2170 y Fj(fname)46 b Ft(\(\))i +Fj(compound-command)43 b Ft([)k Fj(redirections)e Ft(])275 +2315 y Fu(or)390 2460 y Ft(function)h Fj(fname)g Ft([\(\)])h +Fj(compound-command)c Ft([)k Fj(redirections)e Ft(])275 +2604 y Fu(This)37 b(de\014nes)h(a)h(shell)f(function)g(named)g +Fr(fname)p Fu(.)65 b(The)38 b(reserv)m(ed)h(w)m(ord)f +Ft(function)e Fu(is)j(optional.)150 2714 y(If)33 b(the)g +Ft(function)e Fu(reserv)m(ed)i(w)m(ord)g(is)g(supplied,)g(the)g(paren)m +(theses)h(are)f(optional.)50 b(The)33 b Fr(b)s(o)s(dy)39 +b Fu(of)34 b(the)150 2824 y(function)41 b(is)h(the)g(comp)s(ound)e +(command)h Fr(comp)s(ound-command)j Fu(\(see)e(Section)h(3.2.5)g([Comp) +s(ound)150 2933 y(Commands],)30 b(page)h(10\).)42 b(That)30 +b(command)g(is)g(usually)h(a)f Fr(list)j Fu(enclosed)e(b)s(et)m(w)m +(een)g Fi({)g Fu(and)f Fi(})p Fu(,)h(but)e(ma)m(y)150 +3043 y(b)s(e)39 b(an)m(y)h(comp)s(ound)e(command)i(listed)g(ab)s(o)m(v) +m(e,)j(with)d(one)g(exception:)60 b(If)39 b(the)h Ft(function)e +Fu(reserv)m(ed)150 3152 y(w)m(ord)g(is)g(used,)h(but)f(the)g(paren)m +(theses)h(are)f(not)h(supplied,)g(the)f(braces)g(are)h(required.)63 +b Fr(comp)s(ound-)150 3262 y(command)37 b Fu(is)d(executed)g(whenev)m +(er)f Fr(fname)39 b Fu(is)34 b(sp)s(eci\014ed)e(as)i(the)g(name)g(of)f +(a)h(command.)50 b(When)34 b(the)150 3371 y(shell)e(is)f(in)g +Fm(posix)f Fu(mo)s(de)h(\(see)i(Section)f(6.11)h([Bash)e(POSIX)g(Mo)s +(de],)h(page)g(101\),)h Fr(fname)k Fu(m)m(ust)31 b(b)s(e)g(a)150 +3481 y(v)-5 b(alid)37 b(shell)f Fr(name)42 b Fu(and)36 +b(ma)m(y)h(not)f(b)s(e)g(the)g(same)h(as)g(one)f(of)h(the)g(sp)s(ecial) +g(builtins)e(\(see)j(Section)f(4.4)150 3591 y([Sp)s(ecial)e(Builtins],) +h(page)e(72\).)54 b(In)33 b(default)h(mo)s(de,)h(a)g(function)f(name)g +(can)g(b)s(e)g(an)m(y)g(unquoted)g(shell)150 3700 y(w)m(ord)g(that)h +(do)s(es)e(not)i(con)m(tain)g(`)p Ft($)p Fu('.)53 b(An)m(y)34 +b(redirections)h(\(see)g(Section)g(3.6)g([Redirections],)i(page)e(35\)) +150 3810 y(asso)s(ciated)30 b(with)e(the)h(shell)f(function)g(are)h(p)s +(erformed)e(when)h(the)g(function)g(is)h(executed.)41 +b(A)28 b(function)150 3919 y(de\014nition)g(ma)m(y)h(b)s(e)f(deleted)h +(using)f(the)h Ft(-f)e Fu(option)i(to)g(the)g Ft(unset)e +Fu(builtin)h(\(see)h(Section)g(4.1)h([Bourne)150 4029 +y(Shell)g(Builtins],)h(page)h(44\).)275 4174 y(The)26 +b(exit)i(status)g(of)f(a)h(function)f(de\014nition)g(is)g(zero)h +(unless)f(a)g(syn)m(tax)h(error)f(o)s(ccurs)g(or)g(a)h(readonly)150 +4283 y(function)k(with)f(the)i(same)f(name)g(already)h(exists.)46 +b(When)32 b(executed,)h(the)f(exit)h(status)g(of)f(a)g(function)150 +4393 y(is)e(the)h(exit)g(status)g(of)f(the)h(last)g(command)f(executed) +i(in)e(the)g(b)s(o)s(dy)-8 b(.)275 4538 y(Note)22 b(that)f(for)f +(historical)i(reasons,)h(in)e(the)g(most)g(common)g(usage)g(the)g +(curly)f(braces)h(that)g(surround)150 4647 y(the)38 b(b)s(o)s(dy)d(of)j +(the)f(function)g(m)m(ust)g(b)s(e)g(separated)h(from)f(the)g(b)s(o)s +(dy)f(b)m(y)h Ft(blank)p Fu(s)f(or)h(newlines.)62 b(This)150 +4757 y(is)38 b(b)s(ecause)g(the)h(braces)f(are)h(reserv)m(ed)f(w)m +(ords)g(and)f(are)i(only)f(recognized)i(as)e(suc)m(h)g(when)f(they)i +(are)150 4866 y(separated)26 b(from)f(the)h(command)f(list)i(b)m(y)e +(whitespace)h(or)g(another)g(shell)g(metac)m(haracter.)41 +b(Also,)28 b(when)150 4976 y(using)i(the)g(braces,)h(the)g +Fr(list)i Fu(m)m(ust)d(b)s(e)g(terminated)h(b)m(y)f(a)h(semicolon,)h(a) +e(`)p Ft(&)p Fu(',)h(or)g(a)f(newline.)275 5121 y(When)i(a)i(function)f +(is)g(executed,)i(the)e(argumen)m(ts)h(to)g(the)f(function)g(b)s(ecome) +g(the)h(p)s(ositional)g(pa-)150 5230 y(rameters)42 b(during)e(its)i +(execution)h(\(see)f(Section)g(3.4.1)h([P)m(ositional)h(P)m +(arameters],)i(page)c(21\).)75 b(The)150 5340 y(sp)s(ecial)37 +b(parameter)f(`)p Ft(#)p Fu(')g(that)h(expands)e(to)i(the)f(n)m(um)m(b) +s(er)f(of)h(p)s(ositional)h(parameters)f(is)g(up)s(dated)f(to)p +eop end +%%Page: 19 25 +TeXDict begin 19 24 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(19)150 299 +y(re\015ect)36 b(the)f(c)m(hange.)56 b(Sp)s(ecial)35 +b(parameter)h Ft(0)f Fu(is)g(unc)m(hanged.)54 b(The)35 +b(\014rst)f(elemen)m(t)j(of)e(the)g Ft(FUNCNAME)150 408 +y Fu(v)-5 b(ariable)31 b(is)g(set)f(to)i(the)e(name)h(of)f(the)h +(function)f(while)g(the)h(function)f(is)g(executing.)275 +540 y(All)25 b(other)g(asp)s(ects)g(of)g(the)g(shell)g(execution)h(en)m +(vironmen)m(t)g(are)f(iden)m(tical)h(b)s(et)m(w)m(een)g(a)f(function)g +(and)150 650 y(its)35 b(caller)i(with)d(these)i(exceptions:)50 +b(the)36 b Ft(DEBUG)d Fu(and)h Ft(RETURN)g Fu(traps)g(are)i(not)f +(inherited)f(unless)h(the)150 759 y(function)26 b(has)g(b)s(een)f(giv)m +(en)i(the)g Ft(trace)d Fu(attribute)j(using)f(the)g Ft(declare)e +Fu(builtin)i(or)g(the)h Ft(-o)i(functrace)150 869 y Fu(option)f(has)e +(b)s(een)h(enabled)g(with)g(the)g Ft(set)f Fu(builtin,)i(\(in)f(whic)m +(h)f(case)j(all)f(functions)e(inherit)h(the)g Ft(DEBUG)150 +978 y Fu(and)33 b Ft(RETURN)f Fu(traps\),)j(and)e(the)h +Ft(ERR)f Fu(trap)h(is)g(not)g(inherited)f(unless)g(the)h +Ft(-o)c(errtrace)h Fu(shell)j(option)150 1088 y(has)h(b)s(een)f +(enabled.)55 b(See)35 b(Section)h(4.1)g([Bourne)f(Shell)g(Builtins],)i +(page)f(44,)i(for)c(the)i(description)f(of)150 1198 y(the)c +Ft(trap)e Fu(builtin.)275 1329 y(The)38 b Ft(FUNCNEST)f +Fu(v)-5 b(ariable,)42 b(if)d(set)h(to)g(a)g(n)m(umeric)f(v)-5 +b(alue)39 b(greater)h(than)f(0,)j(de\014nes)d(a)g(maxim)m(um)150 +1439 y(function)24 b(nesting)h(lev)m(el.)40 b(F)-8 b(unction)25 +b(in)m(v)m(o)s(cations)i(that)e(exceed)g(the)g(limit)g(cause)g(the)g +(en)m(tire)g(command)150 1548 y(to)31 b(ab)s(ort.)275 +1680 y(If)37 b(the)g(builtin)g(command)h Ft(return)d +Fu(is)j(executed)g(in)g(a)g(function,)h(the)e(function)h(completes)h +(and)150 1789 y(execution)25 b(resumes)e(with)h(the)g(next)g(command)f +(after)i(the)f(function)f(call.)40 b(An)m(y)24 b(command)f(asso)s +(ciated)150 1899 y(with)36 b(the)h Ft(RETURN)d Fu(trap)i(is)h(executed) +g(b)s(efore)f(execution)i(resumes.)57 b(When)37 b(a)f(function)g +(completes,)150 2008 y(the)h(v)-5 b(alues)38 b(of)f(the)g(p)s +(ositional)h(parameters)f(and)g(the)g(sp)s(ecial)h(parameter)f(`)p +Ft(#)p Fu(')g(are)h(restored)f(to)h(the)150 2118 y(v)-5 +b(alues)26 b(they)f(had)g(prior)f(to)i(the)g(function's)f(execution.)40 +b(If)25 b(a)h(n)m(umeric)f(argumen)m(t)h(is)f(giv)m(en)h(to)g +Ft(return)p Fu(,)150 2228 y(that)j(is)g(the)f(function's)h(return)e +(status;)j(otherwise)f(the)f(function's)h(return)e(status)i(is)f(the)h +(exit)h(status)150 2337 y(of)h(the)f(last)h(command)f(executed)i(b)s +(efore)e(the)g Ft(return)p Fu(.)275 2469 y(V)-8 b(ariables)31 +b(lo)s(cal)g(to)f(the)g(function)f(ma)m(y)i(b)s(e)e(declared)h(with)f +(the)h Ft(local)f Fu(builtin.)40 b(These)29 b(v)-5 b(ariables)150 +2578 y(are)25 b(visible)h(only)f(to)g(the)g(function)g(and)f(the)i +(commands)e(it)i(in)m(v)m(ok)m(es.)40 b(This)24 b(is)h(particularly)h +(imp)s(ortan)m(t)150 2688 y(when)j(a)i(shell)g(function)f(calls)h +(other)g(functions.)275 2819 y(Lo)s(cal)41 b(v)-5 b(ariables)42 +b Ft(")p Fu(shado)m(w)p Ft(")e Fu(v)-5 b(ariables)42 +b(with)f(the)g(same)g(name)g(declared)h(at)f(previous)g(scop)s(es.)150 +2929 y(F)-8 b(or)41 b(instance,)j(a)d(lo)s(cal)h(v)-5 +b(ariable)41 b(declared)g(in)f(a)h(function)f(hides)g(a)h(global)h(v)-5 +b(ariable)41 b(of)g(the)g(same)150 3039 y(name:)59 b(references)40 +b(and)f(assignmen)m(ts)h(refer)f(to)i(the)f(lo)s(cal)g(v)-5 +b(ariable,)43 b(lea)m(ving)f(the)d(global)i(v)-5 b(ariable)150 +3148 y(unmo)s(di\014ed.)39 b(When)30 b(the)g(function)g(returns,)g(the) +g(global)i(v)-5 b(ariable)31 b(is)g(once)g(again)g(visible.)275 +3280 y(The)f(shell)h(uses)g Fr(dynamic)g(scoping)39 b +Fu(to)32 b(con)m(trol)g(a)f(v)-5 b(ariable's)32 b(visibilit)m(y)h +(within)d(functions.)42 b(With)150 3389 y(dynamic)31 +b(scoping,)i(visible)e(v)-5 b(ariables)32 b(and)f(their)h(v)-5 +b(alues)32 b(are)f(a)h(result)g(of)f(the)h(sequence)g(of)f(function)150 +3499 y(calls)37 b(that)g(caused)g(execution)g(to)g(reac)m(h)g(the)g +(curren)m(t)f(function.)58 b(The)36 b(v)-5 b(alue)36 +b(of)h(a)g(v)-5 b(ariable)37 b(that)g(a)150 3608 y(function)24 +b(sees)g(dep)s(ends)f(on)h(its)g(v)-5 b(alue)25 b(within)e(its)i +(caller,)i(if)d(an)m(y)-8 b(,)26 b(whether)e(that)g(caller)i(is)e(the)g +Ft(")p Fu(global)p Ft(")150 3718 y Fu(scop)s(e)41 b(or)g(another)g +(shell)g(function.)73 b(This)40 b(is)h(also)h(the)f(v)-5 +b(alue)41 b(that)h(a)f(lo)s(cal)i(v)-5 b(ariable)41 b(declaration)150 +3828 y Ft(")p Fu(shado)m(ws)p Ft(")p Fu(,)30 b(and)g(the)g(v)-5 +b(alue)31 b(that)g(is)f(restored)h(when)e(the)i(function)f(returns.)275 +3959 y(F)-8 b(or)41 b(example,)j(if)d(a)g(v)-5 b(ariable)41 +b Fr(v)-5 b(ar)48 b Fu(is)40 b(declared)h(as)g(lo)s(cal)h(in)f +(function)f Fr(func1)p Fu(,)j(and)d Fr(func1)48 b Fu(calls)150 +4069 y(another)33 b(function)g Fr(func2)p Fu(,)g(references)g(to)h +Fr(v)-5 b(ar)39 b Fu(made)33 b(from)f(within)h Fr(func2)39 +b Fu(will)34 b(resolv)m(e)g(to)g(the)f(lo)s(cal)150 4178 +y(v)-5 b(ariable)31 b Fr(v)-5 b(ar)37 b Fu(from)30 b +Fr(func1)p Fu(,)g(shado)m(wing)h(an)m(y)f(global)i(v)-5 +b(ariable)31 b(named)f Fr(v)-5 b(ar)p Fu(.)275 4310 y(The)29 +b(follo)m(wing)j(script)f(demonstrates)f(this)h(b)s(eha)m(vior.)40 +b(When)31 b(executed,)g(the)g(script)f(displa)m(ys)390 +4441 y Ft(In)47 b(func2,)f(var)h(=)h(func1)e(local)390 +4573 y(func1\(\))390 4682 y({)581 4792 y(local)g(var='func1)f(local') +581 4902 y(func2)390 5011 y(})390 5230 y(func2\(\))390 +5340 y({)p eop end +%%Page: 20 26 +TeXDict begin 20 25 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(20)581 299 +y Ft(echo)47 b("In)f(func2,)h(var)f(=)i($var")390 408 +y(})390 628 y(var=global)390 737 y(func1)275 878 y Fu(The)32 +b Ft(unset)g Fu(builtin)g(also)i(acts)g(using)e(the)i(same)f(dynamic)g +(scop)s(e:)46 b(if)33 b(a)g(v)-5 b(ariable)34 b(is)f(lo)s(cal)h(to)g +(the)150 987 y(curren)m(t)i(scop)s(e,)h Ft(unset)e Fu(will)h(unset)g +(it;)j(otherwise)e(the)f(unset)f(will)h(refer)g(to)h(the)f(v)-5 +b(ariable)37 b(found)d(in)150 1097 y(an)m(y)j(calling)h(scop)s(e)f(as)g +(describ)s(ed)f(ab)s(o)m(v)m(e.)61 b(If)36 b(a)h(v)-5 +b(ariable)38 b(at)f(the)g(curren)m(t)g(lo)s(cal)h(scop)s(e)e(is)h +(unset,)h(it)150 1207 y(will)27 b(remain)h(so)f(un)m(til)g(it)h(is)f +(reset)h(in)f(that)g(scop)s(e)h(or)f(un)m(til)g(the)h(function)e +(returns.)39 b(Once)27 b(the)g(function)150 1316 y(returns,)34 +b(an)m(y)h(instance)g(of)f(the)g(v)-5 b(ariable)35 b(at)g(a)g(previous) +e(scop)s(e)i(will)f(b)s(ecome)h(visible.)52 b(If)34 b(the)g(unset)150 +1426 y(acts)e(on)f(a)h(v)-5 b(ariable)32 b(at)g(a)f(previous)g(scop)s +(e,)h(an)m(y)f(instance)h(of)f(a)h(v)-5 b(ariable)32 +b(with)f(that)h(name)f(that)h(had)150 1535 y(b)s(een)e(shado)m(w)m(ed)g +(will)h(b)s(ecome)g(visible.)275 1676 y(F)-8 b(unction)51 +b(names)f(and)g(de\014nitions)g(ma)m(y)i(b)s(e)e(listed)h(with)f(the)h +Ft(-f)f Fu(option)h(to)g(the)g Ft(declare)150 1786 y +Fu(\()p Ft(typeset)p Fu(\))35 b(builtin)g(command)h(\(see)h(Section)g +(4.2)g([Bash)f(Builtins],)i(page)f(51\).)59 b(The)35 +b Ft(-F)h Fu(option)g(to)150 1895 y Ft(declare)e Fu(or)i +Ft(typeset)e Fu(will)i(list)h(the)f(function)g(names)g(only)g(\(and)g +(optionally)h(the)f(source)g(\014le)h(and)150 2005 y(line)c(n)m(um)m(b) +s(er,)g(if)f(the)h Ft(extdebug)e Fu(shell)i(option)g(is)g(enabled\).)49 +b(F)-8 b(unctions)33 b(ma)m(y)h(b)s(e)e(exp)s(orted)g(so)h(that)150 +2114 y(subshells)j(automatically)k(ha)m(v)m(e)f(them)e(de\014ned)f +(with)h(the)h Ft(-f)e Fu(option)i(to)g(the)g Ft(export)d +Fu(builtin)i(\(see)150 2224 y(Section)31 b(4.1)h([Bourne)e(Shell)g +(Builtins],)h(page)h(44\).)275 2365 y(F)-8 b(unctions)33 +b(ma)m(y)g(b)s(e)g(recursiv)m(e.)48 b(The)32 b Ft(FUNCNEST)f +Fu(v)-5 b(ariable)34 b(ma)m(y)f(b)s(e)f(used)g(to)i(limit)g(the)f +(depth)f(of)150 2474 y(the)27 b(function)f(call)i(stac)m(k)h(and)d +(restrict)h(the)g(n)m(um)m(b)s(er)f(of)h(function)f(in)m(v)m(o)s +(cations.)42 b(By)27 b(default,)g(no)g(limit)150 2584 +y(is)j(placed)h(on)g(the)f(n)m(um)m(b)s(er)f(of)i(recursiv)m(e)f +(calls.)150 2834 y Fs(3.4)68 b(Shell)45 b(P)l(arameters)150 +2993 y Fu(A)23 b Fr(parameter)31 b Fu(is)23 b(an)g(en)m(tit)m(y)i(that) +f(stores)g(v)-5 b(alues.)39 b(It)23 b(can)h(b)s(e)f(a)g +Ft(name)p Fu(,)h(a)g(n)m(um)m(b)s(er,)f(or)h(one)f(of)h(the)f(sp)s +(ecial)150 3103 y(c)m(haracters)i(listed)e(b)s(elo)m(w.)39 +b(A)23 b Fr(v)-5 b(ariable)30 b Fu(is)23 b(a)g(parameter)h(denoted)f(b) +m(y)h(a)f Ft(name)p Fu(.)37 b(A)24 b(v)-5 b(ariable)24 +b(has)f(a)g Fr(v)-5 b(alue)150 3212 y Fu(and)33 b(zero)i(or)f(more)g +Fr(attributes)p Fu(.)52 b(A)m(ttributes)35 b(are)f(assigned)g(using)g +(the)g Ft(declare)e Fu(builtin)h(command)150 3322 y(\(see)e(the)g +(description)f(of)h(the)f Ft(declare)f Fu(builtin)h(in)g(Section)h(4.2) +g([Bash)g(Builtins],)g(page)g(51\).)275 3462 y(A)d(parameter)h(is)g +(set)g(if)f(it)h(has)f(b)s(een)g(assigned)h(a)g(v)-5 +b(alue.)40 b(The)28 b(n)m(ull)h(string)f(is)h(a)g(v)-5 +b(alid)28 b(v)-5 b(alue.)41 b(Once)150 3572 y(a)31 b(v)-5 +b(ariable)31 b(is)f(set,)i(it)e(ma)m(y)h(b)s(e)f(unset)g(only)h(b)m(y)f +(using)g(the)g Ft(unset)f Fu(builtin)h(command.)275 3713 +y(A)g(v)-5 b(ariable)31 b(ma)m(y)g(b)s(e)f(assigned)g(to)i(b)m(y)e(a)h +(statemen)m(t)h(of)e(the)h(form)390 3853 y Fj(name)p +Ft(=[)p Fj(value)p Ft(])150 3994 y Fu(If)j Fr(v)-5 b(alue)40 +b Fu(is)35 b(not)g(giv)m(en,)h(the)f(v)-5 b(ariable)35 +b(is)g(assigned)g(the)f(n)m(ull)h(string.)53 b(All)35 +b Fr(v)-5 b(alue)5 b Fu(s)35 b(undergo)f(tilde)h(ex-)150 +4103 y(pansion,)h(parameter)f(and)f(v)-5 b(ariable)36 +b(expansion,)f(command)g(substitution,)h(arithmetic)g(expansion,)150 +4213 y(and)k(quote)h(remo)m(v)-5 b(al)42 b(\(detailed)h(b)s(elo)m(w\).) +72 b(If)40 b(the)h(v)-5 b(ariable)41 b(has)g(its)g Ft(integer)e +Fu(attribute)i(set,)j(then)150 4323 y Fr(v)-5 b(alue)38 +b Fu(is)33 b(ev)-5 b(aluated)34 b(as)f(an)g(arithmetic)h(expression)f +(ev)m(en)h(if)e(the)h Ft($\(\(...)o(\)\))f Fu(expansion)h(is)g(not)g +(used)150 4432 y(\(see)e(Section)g(3.5.5)i([Arithmetic)e(Expansion],)f +(page)h(31\).)42 b(W)-8 b(ord)31 b(splitting)g(is)g(not)f(p)s +(erformed,)f(with)150 4542 y(the)35 b(exception)h(of)f +Ft("$@")f Fu(as)h(explained)g(b)s(elo)m(w.)54 b(Filename)36 +b(expansion)f(is)g(not)g(p)s(erformed.)53 b(Assign-)150 +4651 y(men)m(t)33 b(statemen)m(ts)h(ma)m(y)f(also)g(app)s(ear)f(as)g +(argumen)m(ts)h(to)g(the)g Ft(alias)p Fu(,)e Ft(declare)p +Fu(,)g Ft(typeset)p Fu(,)g Ft(export)p Fu(,)150 4761 +y Ft(readonly)p Fu(,)38 b(and)g Ft(local)f Fu(builtin)h(commands)g(\()p +Fr(declaration)j Fu(commands\).)64 b(When)39 b(in)f Fm(posix)f +Fu(mo)s(de)150 4871 y(\(see)29 b(Section)h(6.11)g([Bash)f(POSIX)e(Mo)s +(de],)j(page)f(101\),)h(these)f(builtins)f(ma)m(y)h(app)s(ear)f(in)g(a) +h(command)150 4980 y(after)34 b(one)g(or)f(more)h(instances)g(of)f(the) +h Ft(command)d Fu(builtin)i(and)g(retain)h(these)g(assignmen)m(t)g +(statemen)m(t)150 5090 y(prop)s(erties.)275 5230 y(In)29 +b(the)h(con)m(text)i(where)d(an)h(assignmen)m(t)h(statemen)m(t)h(is)e +(assigning)g(a)h(v)-5 b(alue)30 b(to)h(a)f(shell)g(v)-5 +b(ariable)31 b(or)150 5340 y(arra)m(y)24 b(index)f(\(see)h(Section)g +(6.7)g([Arra)m(ys],)i(page)e(95\),)i(the)e(`)p Ft(+=)p +Fu(')f(op)s(erator)g(can)h(b)s(e)f(used)f(to)i(app)s(end)e(to)i(or)p +eop end +%%Page: 21 27 +TeXDict begin 21 26 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(21)150 299 +y(add)28 b(to)i(the)f(v)-5 b(ariable's)30 b(previous)e(v)-5 +b(alue.)41 b(This)28 b(includes)g(argumen)m(ts)i(to)f(builtin)g +(commands)f(suc)m(h)h(as)150 408 y Ft(declare)e Fu(that)i(accept)h +(assignmen)m(t)f(statemen)m(ts)h(\()p Fr(declaration)h +Fu(commands\).)40 b(When)28 b(`)p Ft(+=)p Fu(')h(is)f(applied)150 +518 y(to)d(a)f(v)-5 b(ariable)24 b(for)g(whic)m(h)f(the)h +Fr(in)m(teger)32 b Fu(attribute)24 b(has)g(b)s(een)f(set,)j +Fr(v)-5 b(alue)29 b Fu(is)24 b(ev)-5 b(aluated)25 b(as)f(an)g +(arithmetic)150 628 y(expression)30 b(and)f(added)g(to)i(the)f(v)-5 +b(ariable's)30 b(curren)m(t)g(v)-5 b(alue,)31 b(whic)m(h)e(is)h(also)h +(ev)-5 b(aluated.)42 b(When)29 b(`)p Ft(+=)p Fu(')h(is)150 +737 y(applied)25 b(to)h(an)f(arra)m(y)h(v)-5 b(ariable)26 +b(using)f(comp)s(ound)f(assignmen)m(t)i(\(see)g(Section)g(6.7)g([Arra)m +(ys],)h(page)f(95\),)150 847 y(the)33 b(v)-5 b(ariable's)33 +b(v)-5 b(alue)33 b(is)g(not)g(unset)f(\(as)h(it)g(is)g(when)e(using)i +(`)p Ft(=)p Fu('\),)g(and)f(new)g(v)-5 b(alues)33 b(are)g(app)s(ended)e +(to)150 956 y(the)26 b(arra)m(y)h(b)s(eginning)e(at)i(one)f(greater)h +(than)f(the)g(arra)m(y's)h(maxim)m(um)f(index)f(\(for)i(indexed)e(arra) +m(ys\),)j(or)150 1066 y(added)c(as)i(additional)g(k)m(ey-v)-5 +b(alue)26 b(pairs)f(in)g(an)g(asso)s(ciativ)m(e)j(arra)m(y)-8 +b(.)40 b(When)24 b(applied)h(to)h(a)g(string-v)-5 b(alued)150 +1176 y(v)g(ariable,)31 b Fr(v)-5 b(alue)36 b Fu(is)31 +b(expanded)e(and)h(app)s(ended)f(to)i(the)f(v)-5 b(ariable's)32 +b(v)-5 b(alue.)275 1319 y(A)28 b(v)-5 b(ariable)29 b(can)f(b)s(e)f +(assigned)i(the)f Fr(nameref)45 b Fu(attribute)29 b(using)f(the)g +Ft(-n)f Fu(option)i(to)g(the)f Ft(declare)e Fu(or)150 +1428 y Ft(local)f Fu(builtin)h(commands)g(\(see)i(Section)f(4.2)h +([Bash)f(Builtins],)h(page)f(51\))h(to)f(create)i(a)e +Fr(nameref)p Fu(,)g(or)g(a)150 1538 y(reference)f(to)g(another)f(v)-5 +b(ariable.)40 b(This)24 b(allo)m(ws)j(v)-5 b(ariables)26 +b(to)g(b)s(e)e(manipulated)h(indirectly)-8 b(.)40 b(Whenev)m(er)150 +1647 y(the)31 b(nameref)g(v)-5 b(ariable)32 b(is)f(referenced,)g +(assigned)h(to,)g(unset,)f(or)g(has)f(its)i(attributes)f(mo)s(di\014ed) +f(\(other)150 1757 y(than)c(using)g(or)h(c)m(hanging)g(the)g(nameref)f +(attribute)i(itself)7 b(\),)29 b(the)d(op)s(eration)h(is)g(actually)h +(p)s(erformed)d(on)150 1867 y(the)31 b(v)-5 b(ariable)31 +b(sp)s(eci\014ed)f(b)m(y)g(the)h(nameref)f(v)-5 b(ariable's)31 +b(v)-5 b(alue.)42 b(A)30 b(nameref)g(is)h(commonly)g(used)e(within)150 +1976 y(shell)h(functions)g(to)h(refer)f(to)h(a)f(v)-5 +b(ariable)31 b(whose)f(name)h(is)f(passed)g(as)g(an)g(argumen)m(t)h(to) +g(the)f(function.)150 2086 y(F)-8 b(or)31 b(instance,)g(if)g(a)g(v)-5 +b(ariable)31 b(name)f(is)h(passed)e(to)j(a)e(shell)h(function)f(as)h +(its)f(\014rst)g(argumen)m(t,)h(running)390 2229 y Ft(declare)46 +b(-n)h(ref=$1)150 2372 y Fu(inside)31 b(the)h(function)f(creates)i(a)g +(nameref)e(v)-5 b(ariable)32 b Fr(ref)49 b Fu(whose)32 +b(v)-5 b(alue)32 b(is)g(the)f(v)-5 b(ariable)33 b(name)e(passed)150 +2481 y(as)e(the)h(\014rst)e(argumen)m(t.)41 b(References)30 +b(and)e(assignmen)m(ts)i(to)g Fr(ref)p Fu(,)f(and)g(c)m(hanges)h(to)g +(its)f(attributes,)i(are)150 2591 y(treated)g(as)f(references,)g +(assignmen)m(ts,)h(and)e(attribute)i(mo)s(di\014cations)f(to)h(the)f(v) +-5 b(ariable)30 b(whose)g(name)150 2701 y(w)m(as)h(passed)f(as)g +Ft($1)p Fu(.)275 2844 y(If)h(the)g(con)m(trol)i(v)-5 +b(ariable)32 b(in)g(a)f Ft(for)g Fu(lo)s(op)h(has)f(the)g(nameref)h +(attribute,)g(the)g(list)g(of)g(w)m(ords)f(can)h(b)s(e)150 +2953 y(a)h(list)h(of)f(shell)g(v)-5 b(ariables,)34 b(and)e(a)i(name)f +(reference)g(will)g(b)s(e)f(established)h(for)g(eac)m(h)h(w)m(ord)e(in) +h(the)g(list,)150 3063 y(in)c(turn,)g(when)g(the)h(lo)s(op)g(is)g +(executed.)41 b(Arra)m(y)30 b(v)-5 b(ariables)30 b(cannot)h(b)s(e)e +(giv)m(en)h(the)g(nameref)g(attribute.)150 3172 y(Ho)m(w)m(ev)m(er,)39 +b(nameref)d(v)-5 b(ariables)36 b(can)g(reference)g(arra)m(y)g(v)-5 +b(ariables)37 b(and)e(subscripted)f(arra)m(y)i(v)-5 b(ariables.)150 +3282 y(Namerefs)36 b(can)f(b)s(e)g(unset)g(using)g(the)h +Ft(-n)e Fu(option)i(to)g(the)g Ft(unset)e Fu(builtin)h(\(see)h(Section) +g(4.1)h([Bourne)150 3392 y(Shell)43 b(Builtins],)j(page)e(44\).)79 +b(Otherwise,)45 b(if)e Ft(unset)e Fu(is)i(executed)h(with)e(the)h(name) +g(of)g(a)g(nameref)150 3501 y(v)-5 b(ariable)31 b(as)g(an)f(argumen)m +(t,)h(the)g(v)-5 b(ariable)31 b(referenced)f(b)m(y)g(the)h(nameref)f(v) +-5 b(ariable)31 b(will)g(b)s(e)f(unset.)150 3709 y Fk(3.4.1)63 +b(P)m(ositional)41 b(P)m(arameters)150 3856 y Fu(A)28 +b Fr(p)s(ositional)h(parameter)35 b Fu(is)28 b(a)g(parameter)g(denoted) +g(b)m(y)g(one)g(or)g(more)g(digits,)h(other)g(than)e(the)h(single)150 +3965 y(digit)34 b Ft(0)p Fu(.)48 b(P)m(ositional)36 b(parameters)d(are) +g(assigned)h(from)e(the)i(shell's)f(argumen)m(ts)g(when)f(it)i(is)f(in) +m(v)m(ok)m(ed,)150 4075 y(and)38 b(ma)m(y)i(b)s(e)e(reassigned)i(using) +e(the)h Ft(set)g Fu(builtin)f(command.)67 b(P)m(ositional)41 +b(parameter)e Ft(N)g Fu(ma)m(y)h(b)s(e)150 4185 y(referenced)34 +b(as)h Ft(${N})p Fu(,)g(or)f(as)h Ft($N)e Fu(when)h Ft(N)g +Fu(consists)h(of)f(a)h(single)g(digit.)54 b(P)m(ositional)37 +b(parameters)d(ma)m(y)150 4294 y(not)j(b)s(e)f(assigned)h(to)g(with)f +(assignmen)m(t)i(statemen)m(ts.)61 b(The)36 b Ft(set)g +Fu(and)g Ft(shift)f Fu(builtins)h(are)h(used)f(to)150 +4404 y(set)k(and)f(unset)f(them)i(\(see)g(Chapter)f(4)g([Shell)h +(Builtin)g(Commands],)h(page)f(44\).)68 b(The)39 b(p)s(ositional)150 +4513 y(parameters)44 b(are)g(temp)s(orarily)g(replaced)h(when)e(a)h +(shell)g(function)g(is)g(executed)g(\(see)h(Section)g(3.3)150 +4623 y([Shell)30 b(F)-8 b(unctions],)32 b(page)f(18\).)275 +4766 y(When)c(a)i(p)s(ositional)g(parameter)g(consisting)f(of)h(more)f +(than)g(a)g(single)h(digit)g(is)f(expanded,)g(it)h(m)m(ust)150 +4876 y(b)s(e)h(enclosed)h(in)f(braces.)150 5083 y Fk(3.4.2)63 +b(Sp)s(ecial)41 b(P)m(arameters)150 5230 y Fu(The)d(shell)g(treats)h +(sev)m(eral)g(parameters)f(sp)s(ecially)-8 b(.)65 b(These)38 +b(parameters)h(ma)m(y)f(only)g(b)s(e)g(referenced;)150 +5340 y(assignmen)m(t)31 b(to)g(them)g(is)f(not)h(allo)m(w)m(ed.)p +eop end +%%Page: 22 28 +TeXDict begin 22 27 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(22)150 299 +y Ft(*)432 b Fu(\($*\))38 b(Expands)d(to)i(the)f(p)s(ositional)h +(parameters,)h(starting)f(from)f(one.)59 b(When)36 b(the)g(ex-)630 +408 y(pansion)h(is)h(not)g(within)f(double)g(quotes,)j(eac)m(h)f(p)s +(ositional)f(parameter)g(expands)f(to)i(a)630 518 y(separate)23 +b(w)m(ord.)38 b(In)21 b(con)m(texts)j(where)e(it)g(is)h(p)s(erformed,)f +(those)h(w)m(ords)e(are)i(sub)5 b(ject)22 b(to)h(fur-)630 +628 y(ther)k(w)m(ord)g(splitting)i(and)e(\014lename)g(expansion.)40 +b(When)27 b(the)h(expansion)f(o)s(ccurs)g(within)630 +737 y(double)37 b(quotes,)k(it)d(expands)f(to)h(a)g(single)h(w)m(ord)e +(with)h(the)f(v)-5 b(alue)39 b(of)f(eac)m(h)g(parameter)630 +847 y(separated)g(b)m(y)g(the)f(\014rst)g(c)m(haracter)i(of)f(the)g +Ft(IFS)f Fu(sp)s(ecial)h(v)-5 b(ariable.)63 b(That)38 +b(is,)h Ft("$*")e Fu(is)630 956 y(equiv)-5 b(alen)m(t)39 +b(to)g Ft("$1)p Fj(c)p Ft($2)p Fj(c)p Ft(...)m(")p Fu(,)h(where)d +Fr(c)44 b Fu(is)38 b(the)g(\014rst)g(c)m(haracter)h(of)f(the)g(v)-5 +b(alue)39 b(of)f(the)630 1066 y Ft(IFS)29 b Fu(v)-5 b(ariable.)41 +b(If)29 b Ft(IFS)g Fu(is)h(unset,)f(the)h(parameters)g(are)g(separated) +g(b)m(y)g(spaces.)41 b(If)29 b Ft(IFS)g Fu(is)630 1176 +y(n)m(ull,)i(the)f(parameters)h(are)g(joined)f(without)g(in)m(terv)m +(ening)i(separators.)150 1334 y Ft(@)432 b Fu(\($@\))43 +b(Expands)f(to)h(the)g(p)s(ositional)g(parameters,)k(starting)c(from)f +(one.)78 b(In)42 b(con)m(texts)630 1444 y(where)35 b(w)m(ord)h +(splitting)g(is)g(p)s(erformed,)g(this)g(expands)e(eac)m(h)j(p)s +(ositional)g(parameter)f(to)630 1553 y(a)d(separate)h(w)m(ord;)g(if)f +(not)g(within)g(double)f(quotes,)j(these)e(w)m(ords)g(are)g(sub)5 +b(ject)33 b(to)g(w)m(ord)630 1663 y(splitting.)60 b(In)36 +b(con)m(texts)j(where)d(w)m(ord)g(splitting)h(is)g(not)g(p)s(erformed,) +g(this)f(expands)g(to)630 1773 y(a)c(single)h(w)m(ord)e(with)h(eac)m(h) +h(p)s(ositional)g(parameter)f(separated)g(b)m(y)g(a)g(space.)46 +b(When)32 b(the)630 1882 y(expansion)i(o)s(ccurs)h(within)e(double)i +(quotes,)h(and)e(w)m(ord)g(splitting)h(is)g(p)s(erformed,)f(eac)m(h)630 +1992 y(parameter)23 b(expands)f(to)i(a)f(separate)h(w)m(ord.)37 +b(That)23 b(is,)i Ft("$@")c Fu(is)i(equiv)-5 b(alen)m(t)24 +b(to)g Ft("$1")29 b("$2")630 2101 y(...)o Fu(.)39 b(If)26 +b(the)g(double-quoted)g(expansion)f(o)s(ccurs)h(within)f(a)h(w)m(ord,)h +(the)f(expansion)g(of)g(the)630 2211 y(\014rst)31 b(parameter)h(is)g +(joined)f(with)g(the)h(b)s(eginning)f(part)h(of)f(the)h(original)h(w)m +(ord,)f(and)f(the)630 2321 y(expansion)25 b(of)g(the)h(last)g +(parameter)f(is)h(joined)f(with)g(the)g(last)h(part)f(of)g(the)h +(original)g(w)m(ord.)630 2430 y(When)i(there)g(are)g(no)g(p)s +(ositional)g(parameters,)h Ft("$@")e Fu(and)g Ft($@)h +Fu(expand)f(to)h(nothing)g(\(i.e.,)630 2540 y(they)j(are)f(remo)m(v)m +(ed\).)150 2698 y Ft(#)432 b Fu(\($#\))31 b(Expands)e(to)i(the)g(n)m +(um)m(b)s(er)e(of)h(p)s(ositional)i(parameters)e(in)g(decimal.)150 +2857 y Ft(?)432 b Fu(\($?\))88 b(Expands)45 b(to)h(the)g(exit)h(status) +f(of)g(the)g(most)h(recen)m(tly)g(executed)g(foreground)630 +2967 y(pip)s(eline.)150 3125 y Ft(-)432 b Fu(\($-,)24 +b(a)e(h)m(yphen.\))37 b(Expands)20 b(to)i(the)f(curren)m(t)h(option)f +(\015ags)h(as)f(sp)s(eci\014ed)g(up)s(on)f(in)m(v)m(o)s(cation,)630 +3235 y(b)m(y)38 b(the)h Ft(set)f Fu(builtin)g(command,)j(or)d(those)i +(set)f(b)m(y)f(the)h(shell)g(itself)g(\(suc)m(h)g(as)g(the)g +Ft(-i)630 3344 y Fu(option\).)150 3503 y Ft($)432 b Fu(\($$\))31 +b(Expands)d(to)j(the)e(pro)s(cess)h Fm(id)f Fu(of)h(the)g(shell.)41 +b(In)28 b(a)i Ft(\(\))f Fu(subshell,)h(it)g(expands)e(to)j(the)630 +3613 y(pro)s(cess)f Fm(id)g Fu(of)h(the)g(in)m(v)m(oking)g(shell,)g +(not)g(the)f(subshell.)150 3771 y Ft(!)432 b Fu(\($!\))51 +b(Expands)32 b(to)i(the)g(pro)s(cess)f Fm(id)h Fu(of)f(the)h(job)f +(most)h(recen)m(tly)h(placed)f(in)m(to)g(the)g(bac)m(k-)630 +3881 y(ground,)26 b(whether)g(executed)g(as)h(an)f(async)m(hronous)f +(command)h(or)g(using)g(the)g Ft(bg)f Fu(builtin)630 +3990 y(\(see)31 b(Section)h(7.2)f([Job)f(Con)m(trol)h(Builtins],)g +(page)h(108\).)150 4149 y Ft(0)432 b Fu(\($0\))46 b(Expands)d(to)i(the) +g(name)g(of)f(the)h(shell)g(or)f(shell)h(script.)83 b(This)44 +b(is)g(set)h(at)h(shell)630 4259 y(initialization.)d(If)27 +b(Bash)h(is)g(in)m(v)m(ok)m(ed)h(with)e(a)i(\014le)e(of)h(commands)g +(\(see)g(Section)h(3.8)g([Shell)630 4368 y(Scripts],)g(page)g(42\),)h +Ft($0)e Fu(is)h(set)g(to)g(the)f(name)h(of)f(that)h(\014le.)41 +b(If)28 b(Bash)g(is)h(started)g(with)f(the)630 4478 y +Ft(-c)i Fu(option)h(\(see)h(Section)g(6.1)f([In)m(v)m(oking)h(Bash],)g +(page)f(86\),)i(then)d Ft($0)g Fu(is)h(set)g(to)h(the)f(\014rst)630 +4587 y(argumen)m(t)g(after)g(the)g(string)g(to)g(b)s(e)f(executed,)i +(if)f(one)g(is)f(presen)m(t.)42 b(Otherwise,)31 b(it)g(is)f(set)630 +4697 y(to)h(the)g(\014lename)f(used)g(to)h(in)m(v)m(ok)m(e)h(Bash,)f +(as)g(giv)m(en)g(b)m(y)f(argumen)m(t)h(zero.)150 4937 +y Fs(3.5)68 b(Shell)45 b(Expansions)150 5096 y Fu(Expansion)27 +b(is)i(p)s(erformed)d(on)i(the)g(command)g(line)h(after)f(it)h(has)f(b) +s(een)f(split)h(in)m(to)i Ft(token)p Fu(s.)38 b(There)28 +b(are)150 5206 y(sev)m(en)j(kinds)e(of)i(expansion)f(p)s(erformed:)225 +5340 y Fq(\017)60 b Fu(brace)31 b(expansion)p eop end +%%Page: 23 29 +TeXDict begin 23 28 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(23)225 299 +y Fq(\017)60 b Fu(tilde)31 b(expansion)225 436 y Fq(\017)60 +b Fu(parameter)31 b(and)f(v)-5 b(ariable)31 b(expansion)225 +574 y Fq(\017)60 b Fu(command)30 b(substitution)225 711 +y Fq(\017)60 b Fu(arithmetic)32 b(expansion)225 849 y +Fq(\017)60 b Fu(w)m(ord)30 b(splitting)225 986 y Fq(\017)60 +b Fu(\014lename)31 b(expansion)275 1155 y(The)24 b(order)h(of)h +(expansions)f(is:)39 b(brace)25 b(expansion;)j(tilde)e(expansion,)g +(parameter)g(and)f(v)-5 b(ariable)26 b(ex-)150 1264 y(pansion,)j +(arithmetic)i(expansion,)f(and)f(command)g(substitution)g(\(done)g(in)h +(a)f(left-to-righ)m(t)k(fashion\);)150 1374 y(w)m(ord)d(splitting;)h +(and)f(\014lename)h(expansion.)275 1515 y(On)42 b(systems)h(that)h(can) +g(supp)s(ort)e(it,)47 b(there)d(is)f(an)h(additional)g(expansion)f(a)m +(v)-5 b(ailable:)69 b Fr(pro)s(cess)150 1624 y(substitution)p +Fu(.)50 b(This)33 b(is)h(p)s(erformed)e(at)j(the)f(same)g(time)g(as)g +(tilde,)i(parameter,)f(v)-5 b(ariable,)35 b(and)f(arith-)150 +1734 y(metic)d(expansion)g(and)e(command)i(substitution.)275 +1874 y(After)f(these)h(expansions)f(are)g(p)s(erformed,)f(quote)i(c)m +(haracters)h(presen)m(t)e(in)g(the)g(original)i(w)m(ord)e(are)150 +1984 y(remo)m(v)m(ed)h(unless)f(they)h(ha)m(v)m(e)g(b)s(een)f(quoted)g +(themselv)m(es)i(\()p Fr(quote)f(remo)m(v)-5 b(al)t Fu(\).)275 +2124 y(Only)31 b(brace)i(expansion,)h(w)m(ord)e(splitting,)i(and)e +(\014lename)h(expansion)f(can)h(increase)g(the)g(n)m(um)m(b)s(er)150 +2234 y(of)24 b(w)m(ords)g(of)g(the)h(expansion;)h(other)e(expansions)g +(expand)g(a)g(single)h(w)m(ord)f(to)h(a)f(single)h(w)m(ord.)38 +b(The)24 b(only)150 2344 y(exceptions)i(to)f(this)g(are)g(the)g +(expansions)g(of)g Ft("$@")f Fu(and)g Ft($*)g Fu(\(see)i(Section)f +(3.4.2)i([Sp)s(ecial)e(P)m(arameters],)150 2453 y(page)31 +b(21\),)h(and)e Ft("${)p Fj(name)p Ft([@]}")d Fu(and)i +Ft(${)p Fj(name)p Ft([*]})f Fu(\(see)j(Section)h(6.7)f([Arra)m(ys],)g +(page)g(95\).)275 2594 y(After)41 b(all)i(expansions,)h +Ft(quote)29 b(removal)40 b Fu(\(see)i(Section)h(3.5.9)g([Quote)f(Remo)m +(v)-5 b(al],)47 b(page)42 b(35\))h(is)150 2703 y(p)s(erformed.)150 +2908 y Fk(3.5.1)63 b(Brace)40 b(Expansion)150 3055 y +Fu(Brace)32 b(expansion)f(is)f(a)i(mec)m(hanism)f(b)m(y)f(whic)m(h)h +(arbitrary)f(strings)h(ma)m(y)g(b)s(e)f(generated.)43 +b(This)30 b(mec)m(h-)150 3165 y(anism)35 b(is)h(similar)f(to)h +Fr(\014lename)g(expansion)f Fu(\(see)i(Section)f(3.5.8)h([Filename)g +(Expansion],)f(page)g(33\),)150 3275 y(but)26 b(the)h(\014lenames)g +(generated)h(need)f(not)g(exist.)40 b(P)m(atterns)28 +b(to)f(b)s(e)g(brace)g(expanded)f(tak)m(e)i(the)f(form)g(of)150 +3384 y(an)j(optional)h Fr(pream)m(ble)p Fu(,)g(follo)m(w)m(ed)g(b)m(y)f +(either)g(a)h(series)f(of)g(comma-separated)i(strings)d(or)h(a)h +(sequence)150 3494 y(expression)36 b(b)s(et)m(w)m(een)g(a)h(pair)e(of)i +(braces,)g(follo)m(w)m(ed)h(b)m(y)e(an)g(optional)h Fr(p)s(ostscript)p +Fu(.)57 b(The)36 b(pream)m(ble)g(is)150 3603 y(pre\014xed)28 +b(to)h(eac)m(h)h(string)f(con)m(tained)h(within)e(the)h(braces,)g(and)g +(the)g(p)s(ostscript)f(is)h(then)f(app)s(ended)f(to)150 +3713 y(eac)m(h)32 b(resulting)e(string,)h(expanding)e(left)j(to)f(righ) +m(t.)275 3853 y(Brace)37 b(expansions)f(ma)m(y)h(b)s(e)f(nested.)59 +b(The)36 b(results)g(of)h(eac)m(h)g(expanded)f(string)g(are)h(not)g +(sorted;)150 3963 y(left)31 b(to)g(righ)m(t)g(order)f(is)g(preserv)m +(ed.)41 b(F)-8 b(or)31 b(example,)390 4104 y Ft(bash$)46 +b(echo)h(a{d,c,b}e)390 4213 y(ade)g(ace)g(abe)275 4354 +y Fu(A)23 b(sequence)g(expression)g(tak)m(es)i(the)e(form)g +Ft({)p Fj(x)p Ft(..)p Fj(y)p Ft([..)p Fj(incr)p Ft(]})p +Fu(,)e(where)i Fr(x)29 b Fu(and)23 b Fr(y)30 b Fu(are)24 +b(either)g(in)m(tegers)150 4463 y(or)42 b(single)h(c)m(haracters,)48 +b(and)41 b Fr(incr)p Fu(,)46 b(an)c(optional)i(incremen)m(t,)i(is)c(an) +h(in)m(teger.)78 b(When)42 b(in)m(tegers)i(are)150 4573 +y(supplied,)f(the)f(expression)f(expands)f(to)i(eac)m(h)h(n)m(um)m(b)s +(er)d(b)s(et)m(w)m(een)i Fr(x)47 b Fu(and)41 b Fr(y)p +Fu(,)j(inclusiv)m(e.)75 b(Supplied)150 4682 y(in)m(tegers)33 +b(ma)m(y)e(b)s(e)g(pre\014xed)f(with)h(`)p Ft(0)p Fu(')h(to)g(force)g +(eac)m(h)g(term)g(to)g(ha)m(v)m(e)g(the)g(same)g(width.)42 +b(When)31 b(either)150 4792 y Fr(x)43 b Fu(or)36 b Fr(y)44 +b Fu(b)s(egins)36 b(with)g(a)h(zero,)i(the)e(shell)g(attempts)g(to)g +(force)g(all)h(generated)f(terms)g(to)g(con)m(tain)h(the)150 +4902 y(same)e(n)m(um)m(b)s(er)e(of)i(digits,)i(zero-padding)d(where)h +(necessary)-8 b(.)57 b(When)35 b(c)m(haracters)i(are)f(supplied,)g(the) +150 5011 y(expression)24 b(expands)g(to)h(eac)m(h)h(c)m(haracter)g +(lexicographically)h(b)s(et)m(w)m(een)e Fr(x)30 b Fu(and)24 +b Fr(y)p Fu(,)i(inclusiv)m(e,)h(using)d(the)150 5121 +y(default)32 b(C)g(lo)s(cale.)48 b(Note)34 b(that)f(b)s(oth)e +Fr(x)39 b Fu(and)31 b Fr(y)40 b Fu(m)m(ust)32 b(b)s(e)g(of)g(the)h +(same)f(t)m(yp)s(e.)47 b(When)32 b(the)g(incremen)m(t)150 +5230 y(is)d(supplied,)g(it)h(is)f(used)f(as)i(the)f(di\013erence)h(b)s +(et)m(w)m(een)g(eac)m(h)g(term.)41 b(The)29 b(default)g(incremen)m(t)h +(is)f(1)h(or)f(-1)150 5340 y(as)i(appropriate.)p eop +end +%%Page: 24 30 +TeXDict begin 24 29 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(24)275 299 +y(Brace)36 b(expansion)g(is)f(p)s(erformed)f(b)s(efore)h(an)m(y)h +(other)g(expansions,)h(and)e(an)m(y)g(c)m(haracters)i(sp)s(ecial)150 +408 y(to)32 b(other)g(expansions)g(are)g(preserv)m(ed)f(in)h(the)f +(result.)45 b(It)32 b(is)g(strictly)g(textual.)46 b(Bash)32 +b(do)s(es)f(not)h(apply)150 518 y(an)m(y)27 b(syn)m(tactic)i(in)m +(terpretation)g(to)f(the)f(con)m(text)i(of)e(the)g(expansion)g(or)g +(the)h(text)g(b)s(et)m(w)m(een)f(the)h(braces.)275 656 +y(A)h(correctly-formed)i(brace)f(expansion)f(m)m(ust)h(con)m(tain)h +(unquoted)e(op)s(ening)g(and)g(closing)i(braces,)150 +766 y(and)h(at)i(least)g(one)f(unquoted)g(comma)g(or)g(a)h(v)-5 +b(alid)33 b(sequence)g(expression.)48 b(An)m(y)33 b(incorrectly)h +(formed)150 875 y(brace)d(expansion)f(is)g(left)h(unc)m(hanged.)275 +1013 y(A)25 b Fi({)h Fu(or)f(`)p Ft(,)p Fu(')g(ma)m(y)h(b)s(e)f(quoted) +h(with)f(a)g(bac)m(kslash)h(to)g(prev)m(en)m(t)g(its)g(b)s(eing)f +(considered)g(part)g(of)h(a)g(brace)150 1123 y(expression.)51 +b(T)-8 b(o)34 b(a)m(v)m(oid)i(con\015icts)e(with)g(parameter)g +(expansion,)h(the)f(string)g(`)p Ft(${)p Fu(')g(is)g(not)g(considered) +150 1232 y(eligible)e(for)e(brace)h(expansion,)f(and)g(inhibits)g +(brace)h(expansion)f(un)m(til)g(the)h(closing)h(`)p Ft(})p +Fu('.)275 1370 y(This)e(construct)h(is)g(t)m(ypically)i(used)d(as)h +(shorthand)f(when)g(the)h(common)g(pre\014x)f(of)h(the)g(strings)g(to) +150 1480 y(b)s(e)f(generated)h(is)g(longer)g(than)f(in)g(the)g(ab)s(o)m +(v)m(e)i(example:)390 1618 y Ft(mkdir)46 b(/usr/local/src/bash/{old,n)o +(ew,)o(dist)o(,bug)o(s})275 1756 y Fu(or)390 1894 y Ft(chown)g(root)h +(/usr/{ucb/{ex,edit},lib/)o({ex?)o(.?*,)o(how)o(_ex})o(})150 +2097 y Fk(3.5.2)63 b(Tilde)41 b(Expansion)150 2243 y +Fu(If)29 b(a)h(w)m(ord)g(b)s(egins)f(with)g(an)h(unquoted)f(tilde)h(c)m +(haracter)h(\(`)p Ft(~)p Fu('\),)g(all)g(of)f(the)g(c)m(haracters)h(up) +d(to)j(the)f(\014rst)150 2353 y(unquoted)24 b(slash)g(\(or)h(all)h(c)m +(haracters,)h(if)e(there)g(is)f(no)h(unquoted)e(slash\))i(are)g +(considered)g(a)g Fr(tilde-pre\014x)p Fu(.)150 2463 y(If)38 +b(none)g(of)g(the)h(c)m(haracters)g(in)f(the)h(tilde-pre\014x)f(are)h +(quoted,)h(the)f(c)m(haracters)h(in)d(the)i(tilde-pre\014x)150 +2572 y(follo)m(wing)28 b(the)g(tilde)f(are)h(treated)g(as)f(a)g(p)s +(ossible)g Fr(login)h(name)p Fu(.)39 b(If)27 b(this)g(login)h(name)f +(is)g(the)g(n)m(ull)g(string,)150 2682 y(the)35 b(tilde)g(is)g +(replaced)g(with)f(the)h(v)-5 b(alue)35 b(of)g(the)g +Ft(HOME)e Fu(shell)i(v)-5 b(ariable.)54 b(If)34 b Ft(HOME)g +Fu(is)h(unset,)g(the)g(home)150 2791 y(directory)e(of)g(the)f(user)g +(executing)i(the)e(shell)h(is)f(substituted)g(instead.)47 +b(Otherwise,)33 b(the)g(tilde-pre\014x)150 2901 y(is)d(replaced)h(with) +f(the)h(home)f(directory)h(asso)s(ciated)h(with)e(the)h(sp)s(eci\014ed) +e(login)j(name.)275 3039 y(If)g(the)h(tilde-pre\014x)f(is)h(`)p +Ft(~+)p Fu(',)g(the)g(v)-5 b(alue)33 b(of)g(the)g(shell)g(v)-5 +b(ariable)34 b Ft(PWD)d Fu(replaces)j(the)f(tilde-pre\014x.)47 +b(If)150 3149 y(the)31 b(tilde-pre\014x)f(is)g(`)p Ft(~-)p +Fu(',)h(the)f(v)-5 b(alue)31 b(of)g(the)f(shell)h(v)-5 +b(ariable)31 b Ft(OLDPWD)p Fu(,)e(if)h(it)h(is)g(set,)g(is)f +(substituted.)275 3287 y(If)f(the)h(c)m(haracters)h(follo)m(wing)h(the) +e(tilde)g(in)g(the)g(tilde-pre\014x)g(consist)g(of)g(a)h(n)m(um)m(b)s +(er)d Fr(N)p Fu(,)j(optionally)150 3396 y(pre\014xed)22 +b(b)m(y)h(a)h(`)p Ft(+)p Fu(')f(or)h(a)f(`)p Ft(-)p Fu(',)j(the)d +(tilde-pre\014x)g(is)h(replaced)f(with)g(the)h(corresp)s(onding)e +(elemen)m(t)j(from)e(the)150 3506 y(directory)36 b(stac)m(k,)i(as)e(it) +g(w)m(ould)f(b)s(e)g(displa)m(y)m(ed)h(b)m(y)g(the)f +Ft(dirs)g Fu(builtin)g(in)m(v)m(ok)m(ed)i(with)e(the)g(c)m(haracters) +150 3615 y(follo)m(wing)40 b(tilde)f(in)g(the)f(tilde-pre\014x)h(as)g +(an)f(argumen)m(t)h(\(see)h(Section)f(6.8)h([The)e(Directory)i(Stac)m +(k],)150 3725 y(page)c(97\).)57 b(If)35 b(the)g(tilde-pre\014x,)i(sans) +e(the)h(tilde,)h(consists)f(of)g(a)f(n)m(um)m(b)s(er)f(without)i(a)f +(leading)h(`)p Ft(+)p Fu(')g(or)150 3834 y(`)p Ft(-)p +Fu(',)31 b(`)p Ft(+)p Fu(')f(is)h(assumed.)275 3972 y(If)e(the)i(login) +g(name)g(is)f(in)m(v)-5 b(alid,)31 b(or)g(the)f(tilde)h(expansion)f +(fails,)i(the)e(w)m(ord)g(is)h(left)g(unc)m(hanged.)275 +4110 y(Eac)m(h)38 b(v)-5 b(ariable)38 b(assignmen)m(t)h(is)e(c)m(hec)m +(k)m(ed)j(for)d(unquoted)g(tilde-pre\014xes)h(immediately)g(follo)m +(wing)150 4220 y(a)d(`)p Ft(:)p Fu(')g(or)g(the)g(\014rst)f(`)p +Ft(=)p Fu('.)54 b(In)34 b(these)h(cases,)i(tilde)e(expansion)g(is)g +(also)h(p)s(erformed.)52 b(Consequen)m(tly)-8 b(,)37 +b(one)150 4330 y(ma)m(y)29 b(use)e(\014lenames)h(with)g(tildes)g(in)g +(assignmen)m(ts)g(to)h Ft(PATH)p Fu(,)f Ft(MAILPATH)p +Fu(,)e(and)h Ft(CDPATH)p Fu(,)g(and)h(the)g(shell)150 +4439 y(assigns)j(the)f(expanded)g(v)-5 b(alue.)275 4577 +y(The)29 b(follo)m(wing)j(table)g(sho)m(ws)e(ho)m(w)g(Bash)h(treats)g +(unquoted)e(tilde-pre\014xes:)150 4742 y Ft(~)432 b Fu(The)30 +b(v)-5 b(alue)31 b(of)f Ft($HOME)150 4905 y(~/foo)240 +b($HOME/foo)150 5068 y(~fred/foo)630 5177 y Fu(The)30 +b(sub)s(directory)f Ft(foo)h Fu(of)g(the)h(home)f(directory)h(of)g(the) +f(user)g Ft(fred)150 5340 y(~+/foo)192 b($PWD/foo)p eop +end +%%Page: 25 31 +TeXDict begin 25 30 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(25)150 299 +y Ft(~-/foo)192 b(${OLDPWD-'~-'}/foo)150 471 y(~)p Fj(N)384 +b Fu(The)30 b(string)g(that)h(w)m(ould)f(b)s(e)g(displa)m(y)m(ed)h(b)m +(y)f(`)p Ft(dirs)g(+)p Fj(N)p Fu(')150 644 y Ft(~+)p +Fj(N)336 b Fu(The)30 b(string)g(that)h(w)m(ould)f(b)s(e)g(displa)m(y)m +(ed)h(b)m(y)f(`)p Ft(dirs)g(+)p Fj(N)p Fu(')150 816 y +Ft(~-)p Fj(N)336 b Fu(The)30 b(string)g(that)h(w)m(ould)f(b)s(e)g +(displa)m(y)m(ed)h(b)m(y)f(`)p Ft(dirs)g(-)p Fj(N)p Fu(')275 +995 y(Bash)40 b(also)h(p)s(erforms)e(tilde)h(expansion)g(on)h(w)m(ords) +e(satisfying)i(the)f(conditions)h(of)f(v)-5 b(ariable)41 +b(as-)150 1105 y(signmen)m(ts)f(\(see)h(Section)g(3.4)g([Shell)f(P)m +(arameters],)k(page)d(20\))g(when)e(they)h(app)s(ear)f(as)i(argumen)m +(ts)150 1215 y(to)c(simple)f(commands.)57 b(Bash)36 b(do)s(es)f(not)h +(do)g(this,)i(except)f(for)e(the)h Fr(declaration)i Fu(commands)d +(listed)150 1324 y(ab)s(o)m(v)m(e,)d(when)d(in)h Fm(posix)g +Fu(mo)s(de.)150 1536 y Fk(3.5.3)63 b(Shell)41 b(P)m(arameter)f +(Expansion)150 1683 y Fu(The)g(`)p Ft($)p Fu(')h(c)m(haracter)i(in)m +(tro)s(duces)d(parameter)h(expansion,)j(command)d(substitution,)i(or)e +(arithmetic)150 1793 y(expansion.)d(The)22 b(parameter)h(name)f(or)g +(sym)m(b)s(ol)h(to)g(b)s(e)e(expanded)h(ma)m(y)h(b)s(e)f(enclosed)h(in) +f(braces,)i(whic)m(h)150 1903 y(are)31 b(optional)g(but)f(serv)m(e)h +(to)h(protect)f(the)g(v)-5 b(ariable)31 b(to)g(b)s(e)f(expanded)g(from) +g(c)m(haracters)i(immediately)150 2012 y(follo)m(wing)g(it)f(whic)m(h)f +(could)g(b)s(e)g(in)m(terpreted)h(as)f(part)h(of)f(the)h(name.)275 +2160 y(When)44 b(braces)i(are)f(used,)j(the)e(matc)m(hing)g(ending)f +(brace)g(is)g(the)g(\014rst)g(`)p Ft(})p Fu(')g(not)g(escap)s(ed)h(b)m +(y)f(a)150 2269 y(bac)m(kslash)40 b(or)f(within)g(a)g(quoted)g(string,) +j(and)c(not)i(within)e(an)h(em)m(b)s(edded)f(arithmetic)j(expansion,) +150 2379 y(command)30 b(substitution,)g(or)h(parameter)g(expansion.)275 +2526 y(The)40 b(basic)i(form)f(of)g(parameter)h(expansion)f(is)h($)p +Fi({)p Fr(parameter)7 b Fi(})p Fu(.)74 b(The)41 b(v)-5 +b(alue)42 b(of)g Fr(parameter)48 b Fu(is)150 2636 y(substituted.)43 +b(The)31 b Fr(parameter)39 b Fu(is)31 b(a)h(shell)f(parameter)h(as)g +(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)f(Section)g(3.4)h([Shell)150 +2746 y(P)m(arameters],)e(page)f(20\))h(or)e(an)g(arra)m(y)h(reference)f +(\(see)i(Section)f(6.7)g([Arra)m(ys],)g(page)g(95\).)42 +b(The)29 b(braces)150 2855 y(are)j(required)g(when)f +Fr(parameter)39 b Fu(is)32 b(a)h(p)s(ositional)f(parameter)h(with)f +(more)g(than)g(one)g(digit,)i(or)e(when)150 2965 y Fr(parameter)37 +b Fu(is)31 b(follo)m(w)m(ed)h(b)m(y)e(a)h(c)m(haracter)h(that)f(is)f +(not)h(to)g(b)s(e)f(in)m(terpreted)g(as)h(part)f(of)h(its)f(name.)275 +3112 y(If)k(the)h(\014rst)f(c)m(haracter)i(of)f Fr(parameter)42 +b Fu(is)35 b(an)g(exclamation)i(p)s(oin)m(t)e(\(!\),)i(and)d +Fr(parameter)42 b Fu(is)34 b(not)i(a)150 3222 y Fr(nameref)p +Fu(,)c(it)f(in)m(tro)s(duces)h(a)f(lev)m(el)i(of)f(indirection.)44 +b(Bash)31 b(uses)g(the)g(v)-5 b(alue)32 b(formed)f(b)m(y)g(expanding)g +(the)150 3332 y(rest)c(of)f Fr(parameter)33 b Fu(as)27 +b(the)g(new)f Fr(parameter)7 b Fu(;)28 b(this)e(is)g(then)g(expanded)g +(and)g(that)h(v)-5 b(alue)27 b(is)f(used)g(in)g(the)150 +3441 y(rest)33 b(of)f(the)h(expansion,)g(rather)g(than)f(the)h +(expansion)f(of)h(the)g(original)g Fr(parameter)p Fu(.)48 +b(This)32 b(is)g(kno)m(wn)150 3551 y(as)42 b Ft(indirect)28 +b(expansion)p Fu(.)71 b(The)41 b(v)-5 b(alue)41 b(is)h(sub)5 +b(ject)41 b(to)h(tilde)g(expansion,)i(parameter)e(expansion,)150 +3660 y(command)31 b(substitution,)g(and)g(arithmetic)h(expansion.)43 +b(If)31 b Fr(parameter)38 b Fu(is)32 b(a)f(nameref,)h(this)f(expands) +150 3770 y(to)d(the)g(name)g(of)f(the)h(v)-5 b(ariable)28 +b(referenced)g(b)m(y)f Fr(parameter)35 b Fu(instead)27 +b(of)h(p)s(erforming)e(the)i(complete)h(in-)150 3880 +y(direct)e(expansion.)39 b(The)25 b(exceptions)i(to)g(this)f(are)h(the) +f(expansions)g(of)g($)p Fi({)p Fu(!)p Fr(pre\014x)6 b +Fu(*)p Fi(})28 b Fu(and)d($)p Fi({)p Fu(!)p Fr(name)5 +b Fu([@])p Fi(})150 3989 y Fu(describ)s(ed)28 b(b)s(elo)m(w.)41 +b(The)28 b(exclamation)j(p)s(oin)m(t)f(m)m(ust)f(immediately)h(follo)m +(w)g(the)g(left)f(brace)h(in)f(order)f(to)150 4099 y(in)m(tro)s(duce)i +(indirection.)275 4246 y(In)39 b(eac)m(h)i(of)g(the)f(cases)h(b)s(elo)m +(w,)i Fr(w)m(ord)h Fu(is)c(sub)5 b(ject)40 b(to)h(tilde)f(expansion,)j +(parameter)e(expansion,)150 4356 y(command)30 b(substitution,)g(and)g +(arithmetic)i(expansion.)275 4503 y(When)h(not)h(p)s(erforming)e +(substring)h(expansion,)h(using)g(the)f(form)h(describ)s(ed)e(b)s(elo)m +(w)i(\(e.g.,)i(`)p Ft(:-)p Fu('\),)150 4613 y(Bash)d(tests)h(for)e(a)i +(parameter)f(that)h(is)e(unset)h(or)g(n)m(ull.)48 b(Omitting)33 +b(the)h(colon)f(results)g(in)g(a)g(test)h(only)150 4723 +y(for)c(a)i(parameter)f(that)g(is)g(unset.)41 b(Put)31 +b(another)f(w)m(a)m(y)-8 b(,)33 b(if)e(the)f(colon)i(is)f(included,)f +(the)h(op)s(erator)g(tests)150 4832 y(for)36 b(b)s(oth)g +Fr(parameter)7 b Fu('s)37 b(existence)h(and)e(that)i(its)f(v)-5 +b(alue)37 b(is)g(not)f(n)m(ull;)k(if)d(the)g(colon)h(is)e(omitted,)k +(the)150 4942 y(op)s(erator)31 b(tests)g(only)f(for)g(existence.)150 +5121 y Ft(${)p Fj(parameter)p Ft(:)p Fq(\000)p Fj(word)p +Ft(})630 5230 y Fu(If)g Fr(parameter)37 b Fu(is)30 b(unset)g(or)h(n)m +(ull,)f(the)h(expansion)f(of)g Fr(w)m(ord)k Fu(is)c(substituted.)40 +b(Otherwise,)630 5340 y(the)31 b(v)-5 b(alue)30 b(of)h +Fr(parameter)37 b Fu(is)31 b(substituted.)p eop end +%%Page: 26 32 +TeXDict begin 26 31 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(26)150 299 +y Ft(${)p Fj(parameter)p Ft(:=)p Fj(word)p Ft(})630 408 +y Fu(If)33 b Fr(parameter)40 b Fu(is)33 b(unset)f(or)h(n)m(ull,)h(the)f +(expansion)g(of)g Fr(w)m(ord)j Fu(is)d(assigned)g(to)h +Fr(parameter)p Fu(.)630 518 y(The)c(v)-5 b(alue)32 b(of)f +Fr(parameter)38 b Fu(is)31 b(then)g(substituted.)42 b(P)m(ositional)33 +b(parameters)e(and)f(sp)s(ecial)630 628 y(parameters)h(ma)m(y)g(not)f +(b)s(e)g(assigned)h(to)g(in)f(this)g(w)m(a)m(y)-8 b(.)150 +786 y Ft(${)p Fj(parameter)p Ft(:?)p Fj(word)p Ft(})630 +896 y Fu(If)26 b Fr(parameter)33 b Fu(is)26 b(n)m(ull)g(or)g(unset,)h +(the)f(expansion)g(of)g Fr(w)m(ord)k Fu(\(or)c(a)h(message)g(to)g(that) +f(e\013ect)630 1005 y(if)i Fr(w)m(ord)j Fu(is)d(not)g(presen)m(t\))h +(is)f(written)g(to)h(the)f(standard)f(error)h(and)f(the)h(shell,)h(if)f +(it)h(is)f(not)630 1115 y(in)m(teractiv)m(e,)33 b(exits.)42 +b(Otherwise,)30 b(the)h(v)-5 b(alue)31 b(of)f Fr(parameter)38 +b Fu(is)30 b(substituted.)150 1273 y Ft(${)p Fj(parameter)p +Ft(:+)p Fj(word)p Ft(})630 1383 y Fu(If)35 b Fr(parameter)42 +b Fu(is)36 b(n)m(ull)f(or)h(unset,)g(nothing)g(is)f(substituted,)i +(otherwise)e(the)h(expansion)630 1492 y(of)31 b Fr(w)m(ord)i +Fu(is)e(substituted.)150 1650 y Ft(${)p Fj(parameter)p +Ft(:)p Fj(offset)p Ft(})150 1760 y(${)p Fj(parameter)p +Ft(:)p Fj(offset)p Ft(:)p Fj(lengt)o(h)p Ft(})630 1870 +y Fu(This)f(is)h(referred)f(to)h(as)g(Substring)f(Expansion.)41 +b(It)31 b(expands)f(to)h(up)f(to)h Fr(length)g Fu(c)m(harac-)630 +1979 y(ters)k(of)g(the)h(v)-5 b(alue)35 b(of)g Fr(parameter)42 +b Fu(starting)36 b(at)g(the)f(c)m(haracter)i(sp)s(eci\014ed)d(b)m(y)h +Fr(o\013set)p Fu(.)55 b(If)630 2089 y Fr(parameter)32 +b Fu(is)26 b(`)p Ft(@)p Fu(',)g(an)f(indexed)g(arra)m(y)h(subscripted)e +(b)m(y)h(`)p Ft(@)p Fu(')g(or)h(`)p Ft(*)p Fu(',)g(or)g(an)f(asso)s +(ciativ)m(e)j(ar-)630 2198 y(ra)m(y)g(name,)h(the)f(results)g(di\013er) +g(as)g(describ)s(ed)f(b)s(elo)m(w.)40 b(If)28 b Fr(length)g +Fu(is)g(omitted,)i(it)f(expands)630 2308 y(to)e(the)g(substring)f(of)g +(the)h(v)-5 b(alue)27 b(of)g Fr(parameter)33 b Fu(starting)28 +b(at)f(the)g(c)m(haracter)h(sp)s(eci\014ed)e(b)m(y)630 +2418 y Fr(o\013set)37 b Fu(and)d(extending)g(to)h(the)f(end)g(of)g(the) +g(v)-5 b(alue.)53 b Fr(length)34 b Fu(and)g Fr(o\013set)j +Fu(are)e(arithmetic)630 2527 y(expressions)30 b(\(see)h(Section)g(6.5)h +([Shell)e(Arithmetic],)i(page)f(93\).)630 2661 y(If)39 +b Fr(o\013set)k Fu(ev)-5 b(aluates)41 b(to)f(a)g(n)m(um)m(b)s(er)f +(less)h(than)f(zero,)k(the)d(v)-5 b(alue)40 b(is)g(used)e(as)i(an)g +(o\013set)630 2771 y(in)33 b(c)m(haracters)i(from)f(the)f(end)g(of)h +(the)g(v)-5 b(alue)34 b(of)g Fr(parameter)p Fu(.)51 b(If)33 +b Fr(length)h Fu(ev)-5 b(aluates)35 b(to)g(a)630 2880 +y(n)m(um)m(b)s(er)23 b(less)h(than)g(zero,)j(it)d(is)h(in)m(terpreted)f +(as)g(an)h(o\013set)g(in)f(c)m(haracters)h(from)f(the)g(end)g(of)630 +2990 y(the)31 b(v)-5 b(alue)31 b(of)g Fr(parameter)38 +b Fu(rather)30 b(than)h(a)g(n)m(um)m(b)s(er)f(of)g(c)m(haracters,)j +(and)d(the)h(expansion)630 3099 y(is)39 b(the)g(c)m(haracters)i(b)s(et) +m(w)m(een)f Fr(o\013set)i Fu(and)c(that)i(result.)67 +b(Note)40 b(that)g(a)g(negativ)m(e)h(o\013set)630 3209 +y(m)m(ust)27 b(b)s(e)g(separated)g(from)g(the)g(colon)i(b)m(y)e(at)h +(least)g(one)f(space)h(to)g(a)m(v)m(oid)h(b)s(eing)e(confused)630 +3319 y(with)j(the)h(`)p Ft(:-)p Fu(')f(expansion.)630 +3453 y(Here)43 b(are)g(some)f(examples)h(illustrating)g(substring)f +(expansion)g(on)g(parameters)h(and)630 3562 y(subscripted)29 +b(arra)m(ys:)630 3696 y Ft($)47 b(string=01234567890abcdefgh)630 +3806 y($)g(echo)g(${string:7})630 3915 y(7890abcdefgh)630 +4025 y($)g(echo)g(${string:7:0})630 4244 y($)g(echo)g(${string:7:2})630 +4354 y(78)630 4463 y($)g(echo)g(${string:7:-2})630 4573 +y(7890abcdef)630 4682 y($)g(echo)g(${string:)e(-7})630 +4792 y(bcdefgh)630 4902 y($)i(echo)g(${string:)e(-7:0})630 +5121 y($)i(echo)g(${string:)e(-7:2})630 5230 y(bc)630 +5340 y($)i(echo)g(${string:)e(-7:-2})p eop end +%%Page: 27 33 +TeXDict begin 27 32 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(27)630 299 +y Ft(bcdef)630 408 y($)47 b(set)g(--)h(01234567890abcdefgh)630 +518 y($)f(echo)g(${1:7})630 628 y(7890abcdefgh)630 737 +y($)g(echo)g(${1:7:0})630 956 y($)g(echo)g(${1:7:2})630 +1066 y(78)630 1176 y($)g(echo)g(${1:7:-2})630 1285 y(7890abcdef)630 +1395 y($)g(echo)g(${1:)g(-7})630 1504 y(bcdefgh)630 1614 +y($)g(echo)g(${1:)g(-7:0})630 1833 y($)g(echo)g(${1:)g(-7:2})630 +1943 y(bc)630 2052 y($)g(echo)g(${1:)g(-7:-2})630 2162 +y(bcdef)630 2271 y($)g(array[0]=01234567890abcdef)o(gh)630 +2381 y($)g(echo)g(${array[0]:7})630 2491 y(7890abcdefgh)630 +2600 y($)g(echo)g(${array[0]:7:0})630 2819 y($)g(echo)g +(${array[0]:7:2})630 2929 y(78)630 3039 y($)g(echo)g(${array[0]:7:-2}) +630 3148 y(7890abcdef)630 3258 y($)g(echo)g(${array[0]:)e(-7})630 +3367 y(bcdefgh)630 3477 y($)i(echo)g(${array[0]:)e(-7:0})630 +3696 y($)i(echo)g(${array[0]:)e(-7:2})630 3806 y(bc)630 +3915 y($)i(echo)g(${array[0]:)e(-7:-2})630 4025 y(bcdef)630 +4171 y Fu(If)22 b Fr(parameter)30 b Fu(is)23 b(`)p Ft(@)p +Fu(',)i(the)e(result)g(is)g Fr(length)h Fu(p)s(ositional)f(parameters)h +(b)s(eginning)e(at)i Fr(o\013set)p Fu(.)630 4281 y(A)36 +b(negativ)m(e)j Fr(o\013set)g Fu(is)e(tak)m(en)g(relativ)m(e)i(to)e +(one)g(greater)g(than)f(the)h(greatest)h(p)s(ositional)630 +4390 y(parameter,)29 b(so)f(an)g(o\013set)h(of)f(-1)g(ev)-5 +b(aluates)30 b(to)e(the)g(last)h(p)s(ositional)g(parameter.)40 +b(It)28 b(is)g(an)630 4500 y(expansion)i(error)g(if)h +Fr(length)f Fu(ev)-5 b(aluates)32 b(to)f(a)g(n)m(um)m(b)s(er)e(less)i +(than)f(zero.)630 4646 y(The)i(follo)m(wing)i(examples)f(illustrate)h +(substring)d(expansion)i(using)f(p)s(ositional)h(param-)630 +4755 y(eters:)630 4902 y Ft($)47 b(set)g(--)h(1)f(2)g(3)h(4)f(5)h(6)f +(7)h(8)f(9)h(0)f(a)h(b)f(c)g(d)h(e)f(f)h(g)f(h)630 5011 +y($)g(echo)g(${@:7})630 5121 y(7)g(8)h(9)f(0)h(a)f(b)h(c)f(d)h(e)f(f)h +(g)f(h)630 5230 y($)g(echo)g(${@:7:0})p eop end +%%Page: 28 34 +TeXDict begin 28 33 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(28)630 299 +y Ft($)47 b(echo)g(${@:7:2})630 408 y(7)g(8)630 518 y($)g(echo)g +(${@:7:-2})630 628 y(bash:)f(-2:)h(substring)f(expression)f(<)i(0)630 +737 y($)g(echo)g(${@:)g(-7:2})630 847 y(b)g(c)630 956 +y($)g(echo)g(${@:0})630 1066 y(./bash)f(1)i(2)f(3)g(4)h(5)f(6)h(7)f(8)h +(9)f(0)h(a)f(b)h(c)f(d)g(e)h(f)f(g)h(h)630 1176 y($)f(echo)g(${@:0:2}) +630 1285 y(./bash)f(1)630 1395 y($)h(echo)g(${@:)g(-7:0})630 +1677 y Fu(If)36 b Fr(parameter)43 b Fu(is)36 b(an)g(indexed)g(arra)m(y) +g(name)g(subscripted)f(b)m(y)h(`)p Ft(@)p Fu(')g(or)h(`)p +Ft(*)p Fu(',)h(the)e(result)g(is)630 1786 y(the)j Fr(length)g +Fu(mem)m(b)s(ers)f(of)h(the)f(arra)m(y)i(b)s(eginning)d(with)i +Ft(${)p Fj(parameter)p Ft([)p Fj(offset)p Ft(]})p Fu(.)60 +b(A)630 1896 y(negativ)m(e)33 b Fr(o\013set)g Fu(is)e(tak)m(en)h +(relativ)m(e)g(to)g(one)f(greater)g(than)g(the)f(maxim)m(um)h(index)f +(of)h(the)630 2005 y(sp)s(eci\014ed)38 b(arra)m(y)-8 +b(.)65 b(It)38 b(is)g(an)h(expansion)f(error)f(if)i Fr(length)f +Fu(ev)-5 b(aluates)40 b(to)f(a)g(n)m(um)m(b)s(er)e(less)630 +2115 y(than)30 b(zero.)630 2287 y(These)23 b(examples)i(sho)m(w)e(ho)m +(w)h(y)m(ou)g(can)g(use)f(substring)f(expansion)i(with)f(indexed)g +(arra)m(ys:)630 2459 y Ft($)47 b(array=\(0)f(1)h(2)h(3)f(4)h(5)f(6)h(7) +f(8)h(9)f(0)h(a)f(b)g(c)h(d)f(e)h(f)f(g)h(h\))630 2569 +y($)f(echo)g(${array[@]:7})630 2679 y(7)g(8)h(9)f(0)h(a)f(b)h(c)f(d)h +(e)f(f)h(g)f(h)630 2788 y($)g(echo)g(${array[@]:7:2})630 +2898 y(7)g(8)630 3007 y($)g(echo)g(${array[@]:)e(-7:2})630 +3117 y(b)i(c)630 3226 y($)g(echo)g(${array[@]:)e(-7:-2})630 +3336 y(bash:)h(-2:)h(substring)f(expression)f(<)i(0)630 +3446 y($)g(echo)g(${array[@]:0})630 3555 y(0)g(1)h(2)f(3)h(4)f(5)h(6)f +(7)h(8)f(9)h(0)f(a)g(b)h(c)f(d)h(e)f(f)h(g)f(h)630 3665 +y($)g(echo)g(${array[@]:0:2})630 3774 y(0)g(1)630 3884 +y($)g(echo)g(${array[@]:)e(-7:0})630 4166 y Fu(Substring)25 +b(expansion)g(applied)h(to)h(an)f(asso)s(ciativ)m(e)j(arra)m(y)d(pro)s +(duces)f(unde\014ned)f(results.)630 4338 y(Substring)32 +b(indexing)i(is)f(zero-based)i(unless)e(the)h(p)s(ositional)g +(parameters)g(are)g(used,)g(in)630 4448 y(whic)m(h)29 +b(case)i(the)f(indexing)g(starts)g(at)g(1)g(b)m(y)g(default.)41 +b(If)29 b Fr(o\013set)k Fu(is)d(0,)g(and)f(the)h(p)s(ositional)630 +4557 y(parameters)h(are)f(used,)g Ft($0)g Fu(is)g(pre\014xed)g(to)h +(the)f(list.)150 4792 y Ft(${!)p Fj(prefix)p Ft(*})150 +4902 y(${!)p Fj(prefix)p Ft(@})630 5011 y Fu(Expands)24 +b(to)h(the)g(names)g(of)g(v)-5 b(ariables)26 b(whose)f(names)f(b)s +(egin)h(with)f Fr(pre\014x)p Fu(,)i(separated)f(b)m(y)630 +5121 y(the)k(\014rst)f(c)m(haracter)j(of)e(the)g Ft(IFS)f +Fu(sp)s(ecial)i(v)-5 b(ariable.)41 b(When)29 b(`)p Ft(@)p +Fu(')g(is)g(used)f(and)h(the)g(expan-)630 5230 y(sion)35 +b(app)s(ears)g(within)f(double)h(quotes,)i(eac)m(h)f(v)-5 +b(ariable)36 b(name)f(expands)g(to)g(a)h(separate)630 +5340 y(w)m(ord.)p eop end +%%Page: 29 35 +TeXDict begin 29 34 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(29)150 299 +y Ft(${!)p Fj(name)p Ft([@]})150 408 y(${!)p Fj(name)p +Ft([*]})630 518 y Fu(If)26 b Fr(name)32 b Fu(is)27 b(an)f(arra)m(y)h(v) +-5 b(ariable,)29 b(expands)d(to)h(the)g(list)g(of)g(arra)m(y)g(indices) +g(\(k)m(eys\))h(assigned)630 628 y(in)c Fr(name)p Fu(.)39 +b(If)24 b Fr(name)30 b Fu(is)24 b(not)h(an)f(arra)m(y)-8 +b(,)27 b(expands)c(to)j(0)f(if)f Fr(name)30 b Fu(is)24 +b(set)h(and)f(n)m(ull)g(otherwise.)630 737 y(When)39 +b(`)p Ft(@)p Fu(')h(is)f(used)g(and)f(the)i(expansion)f(app)s(ears)g +(within)f(double)h(quotes,)k(eac)m(h)d(k)m(ey)630 847 +y(expands)30 b(to)h(a)f(separate)i(w)m(ord.)150 1011 +y Ft(${#)p Fj(parameter)p Ft(})630 1121 y Fu(The)40 b(length)g(in)g(c)m +(haracters)i(of)e(the)h(expanded)e(v)-5 b(alue)41 b(of)f +Fr(parameter)47 b Fu(is)40 b(substituted.)630 1230 y(If)i +Fr(parameter)50 b Fu(is)43 b(`)p Ft(*)p Fu(')g(or)g(`)p +Ft(@)p Fu(',)k(the)c(v)-5 b(alue)43 b(substituted)f(is)h(the)g(n)m(um)m +(b)s(er)f(of)h(p)s(ositional)630 1340 y(parameters.)i(If)32 +b Fr(parameter)38 b Fu(is)32 b(an)g(arra)m(y)g(name)g(subscripted)f(b)m +(y)g(`)p Ft(*)p Fu(')h(or)g(`)p Ft(@)p Fu(',)g(the)g(v)-5 +b(alue)630 1450 y(substituted)30 b(is)h(the)g(n)m(um)m(b)s(er)e(of)i +(elemen)m(ts)i(in)d(the)h(arra)m(y)-8 b(.)43 b(If)30 +b Fr(parameter)38 b Fu(is)31 b(an)f(indexed)630 1559 +y(arra)m(y)37 b(name)g(subscripted)f(b)m(y)h(a)g(negativ)m(e)i(n)m(um)m +(b)s(er,)f(that)f(n)m(um)m(b)s(er)f(is)g(in)m(terpreted)i(as)630 +1669 y(relativ)m(e)47 b(to)g(one)e(greater)i(than)e(the)h(maxim)m(um)f +(index)g(of)g Fr(parameter)p Fu(,)50 b(so)c(negativ)m(e)630 +1778 y(indices)30 b(coun)m(t)h(bac)m(k)g(from)f(the)h(end)e(of)i(the)f +(arra)m(y)-8 b(,)32 b(and)e(an)g(index)g(of)g(-1)h(references)g(the)630 +1888 y(last)g(elemen)m(t.)150 2052 y Ft(${)p Fj(parameter)p +Ft(#)p Fj(word)p Ft(})150 2162 y(${)p Fj(parameter)p +Ft(##)p Fj(word)p Ft(})630 2271 y Fu(The)43 b Fr(w)m(ord)k +Fu(is)d(expanded)f(to)h(pro)s(duce)f(a)h(pattern)g(and)f(matc)m(hed)i +(according)f(to)h(the)630 2381 y(rules)31 b(describ)s(ed)g(b)s(elo)m(w) +h(\(see)h(Section)g(3.5.8.1)h([P)m(attern)g(Matc)m(hing],)g(page)f +(33\).)46 b(If)32 b(the)630 2491 y(pattern)37 b(matc)m(hes)h(the)f(b)s +(eginning)f(of)h(the)g(expanded)f(v)-5 b(alue)38 b(of)f +Fr(parameter)p Fu(,)i(then)e(the)630 2600 y(result)f(of)h(the)f +(expansion)h(is)f(the)h(expanded)e(v)-5 b(alue)37 b(of)g +Fr(parameter)43 b Fu(with)36 b(the)h(shortest)630 2710 +y(matc)m(hing)31 b(pattern)e(\(the)h(`)p Ft(#)p Fu(')g(case\))h(or)e +(the)h(longest)h(matc)m(hing)f(pattern)g(\(the)g(`)p +Ft(##)p Fu(')g(case\))630 2819 y(deleted.)49 b(If)32 +b Fr(parameter)40 b Fu(is)33 b(`)p Ft(@)p Fu(')g(or)g(`)p +Ft(*)p Fu(',)h(the)f(pattern)g(remo)m(v)-5 b(al)34 b(op)s(eration)g(is) +f(applied)f(to)630 2929 y(eac)m(h)38 b(p)s(ositional)g(parameter)g(in)f +(turn,)h(and)e(the)h(expansion)g(is)h(the)f(resultan)m(t)h(list.)61 +b(If)630 3039 y Fr(parameter)38 b Fu(is)32 b(an)f(arra)m(y)h(v)-5 +b(ariable)32 b(subscripted)e(with)h(`)p Ft(@)p Fu(')g(or)h(`)p +Ft(*)p Fu(',)g(the)f(pattern)h(remo)m(v)-5 b(al)630 3148 +y(op)s(eration)30 b(is)g(applied)f(to)i(eac)m(h)g(mem)m(b)s(er)e(of)h +(the)g(arra)m(y)g(in)f(turn,)g(and)g(the)h(expansion)g(is)630 +3258 y(the)h(resultan)m(t)g(list.)150 3422 y Ft(${)p +Fj(parameter)p Ft(\045)p Fj(word)p Ft(})150 3532 y(${)p +Fj(parameter)p Ft(\045\045)p Fj(word)p Ft(})630 3641 +y Fu(The)43 b Fr(w)m(ord)k Fu(is)d(expanded)f(to)h(pro)s(duce)f(a)h +(pattern)g(and)f(matc)m(hed)i(according)f(to)h(the)630 +3751 y(rules)f(describ)s(ed)g(b)s(elo)m(w)h(\(see)h(Section)g(3.5.8.1)h +([P)m(attern)f(Matc)m(hing],)51 b(page)45 b(33\).)85 +b(If)630 3861 y(the)43 b(pattern)g(matc)m(hes)h(a)g(trailing)g(p)s +(ortion)e(of)h(the)g(expanded)g(v)-5 b(alue)43 b(of)g +Fr(parameter)p Fu(,)630 3970 y(then)c(the)g(result)g(of)h(the)f +(expansion)g(is)h(the)f(v)-5 b(alue)40 b(of)f Fr(parameter)46 +b Fu(with)39 b(the)h(shortest)630 4080 y(matc)m(hing)31 +b(pattern)e(\(the)h(`)p Ft(\045)p Fu(')g(case\))h(or)e(the)h(longest)h +(matc)m(hing)f(pattern)g(\(the)g(`)p Ft(\045\045)p Fu(')g(case\))630 +4189 y(deleted.)49 b(If)32 b Fr(parameter)40 b Fu(is)33 +b(`)p Ft(@)p Fu(')g(or)g(`)p Ft(*)p Fu(',)h(the)f(pattern)g(remo)m(v)-5 +b(al)34 b(op)s(eration)g(is)f(applied)f(to)630 4299 y(eac)m(h)38 +b(p)s(ositional)g(parameter)g(in)f(turn,)h(and)e(the)h(expansion)g(is)h +(the)f(resultan)m(t)h(list.)61 b(If)630 4408 y Fr(parameter)38 +b Fu(is)32 b(an)f(arra)m(y)h(v)-5 b(ariable)32 b(subscripted)e(with)h +(`)p Ft(@)p Fu(')g(or)h(`)p Ft(*)p Fu(',)g(the)f(pattern)h(remo)m(v)-5 +b(al)630 4518 y(op)s(eration)30 b(is)g(applied)f(to)i(eac)m(h)g(mem)m +(b)s(er)e(of)h(the)g(arra)m(y)g(in)f(turn,)g(and)g(the)h(expansion)g +(is)630 4628 y(the)h(resultan)m(t)g(list.)150 4792 y +Ft(${)p Fj(parameter)p Ft(/)p Fj(pattern)p Ft(/)p Fj(stri)o(ng)p +Ft(})630 4902 y Fu(The)37 b Fr(pattern)g Fu(is)g(expanded)g(to)h(pro)s +(duce)e(a)h(pattern)g(just)g(as)h(in)e(\014lename)i(expansion.)630 +5011 y Fr(P)m(arameter)46 b Fu(is)38 b(expanded)f(and)g(the)i(longest)g +(matc)m(h)g(of)f Fr(pattern)g Fu(against)h(its)f(v)-5 +b(alue)39 b(is)630 5121 y(replaced)31 b(with)g Fr(string)p +Fu(.)42 b(The)30 b(matc)m(h)h(is)g(p)s(erformed)f(according)h(to)h(the) +f(rules)f(describ)s(ed)630 5230 y(b)s(elo)m(w)f(\(see)h(Section)g +(3.5.8.1)h([P)m(attern)g(Matc)m(hing],)g(page)f(33\).)41 +b(If)29 b Fr(pattern)g Fu(b)s(egins)f(with)630 5340 y(`)p +Ft(/)p Fu(',)43 b(all)e(matc)m(hes)g(of)f Fr(pattern)g +Fu(are)h(replaced)f(with)g Fr(string)p Fu(.)69 b(Normally)41 +b(only)f(the)h(\014rst)p eop end +%%Page: 30 36 +TeXDict begin 30 35 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(30)630 299 +y(matc)m(h)28 b(is)f(replaced.)40 b(If)26 b Fr(pattern)h +Fu(b)s(egins)f(with)h(`)p Ft(#)p Fu(',)h(it)f(m)m(ust)g(matc)m(h)h(at)g +(the)f(b)s(eginning)f(of)630 408 y(the)32 b(expanded)f(v)-5 +b(alue)32 b(of)g Fr(parameter)p Fu(.)45 b(If)31 b Fr(pattern)h +Fu(b)s(egins)f(with)g(`)p Ft(\045)p Fu(',)i(it)f(m)m(ust)g(matc)m(h)g +(at)630 518 y(the)24 b(end)f(of)h(the)h(expanded)e(v)-5 +b(alue)24 b(of)g Fr(parameter)p Fu(.)39 b(If)24 b Fr(string)31 +b Fu(is)24 b(n)m(ull,)i(matc)m(hes)f(of)f Fr(pattern)630 +628 y Fu(are)36 b(deleted)g(and)f(the)g Ft(/)g Fu(follo)m(wing)i +Fr(pattern)e Fu(ma)m(y)h(b)s(e)f(omitted.)57 b(If)34 +b(the)i Ft(nocasematch)630 737 y Fu(shell)31 b(option)h(\(see)g(the)g +(description)f(of)g Ft(shopt)f Fu(in)h(Section)h(4.3.2)h([The)e(Shopt)f +(Builtin],)630 847 y(page)45 b(66\))h(is)f(enabled,)j(the)d(matc)m(h)g +(is)g(p)s(erformed)e(without)i(regard)f(to)h(the)g(case)h(of)630 +956 y(alphab)s(etic)36 b(c)m(haracters.)56 b(If)34 b +Fr(parameter)42 b Fu(is)36 b(`)p Ft(@)p Fu(')f(or)g(`)p +Ft(*)p Fu(',)h(the)g(substitution)e(op)s(eration)i(is)630 +1066 y(applied)26 b(to)g(eac)m(h)h(p)s(ositional)f(parameter)h(in)e +(turn,)h(and)f(the)h(expansion)g(is)f(the)h(resultan)m(t)630 +1176 y(list.)38 b(If)21 b Fr(parameter)28 b Fu(is)22 +b(an)f(arra)m(y)h(v)-5 b(ariable)22 b(subscripted)e(with)h(`)p +Ft(@)p Fu(')g(or)g(`)p Ft(*)p Fu(',)j(the)d(substitution)630 +1285 y(op)s(eration)30 b(is)g(applied)f(to)i(eac)m(h)g(mem)m(b)s(er)e +(of)h(the)g(arra)m(y)g(in)f(turn,)g(and)g(the)h(expansion)g(is)630 +1395 y(the)h(resultan)m(t)g(list.)150 1551 y Ft(${)p +Fj(parameter)p Ft(^)p Fj(pattern)p Ft(})150 1661 y(${)p +Fj(parameter)p Ft(^^)p Fj(pattern)p Ft(})150 1771 y(${)p +Fj(parameter)p Ft(,)p Fj(pattern)p Ft(})150 1880 y(${)p +Fj(parameter)p Ft(,,)p Fj(pattern)p Ft(})630 1990 y Fu(This)36 +b(expansion)g(mo)s(di\014es)g(the)g(case)i(of)f(alphab)s(etic)g(c)m +(haracters)h(in)e Fr(parameter)p Fu(.)59 b(The)630 2099 +y Fr(pattern)33 b Fu(is)g(expanded)e(to)j(pro)s(duce)d(a)j(pattern)e +(just)g(as)h(in)g(\014lename)g(expansion.)47 b(Eac)m(h)630 +2209 y(c)m(haracter)32 b(in)e(the)g(expanded)f(v)-5 b(alue)31 +b(of)f Fr(parameter)37 b Fu(is)30 b(tested)h(against)h +Fr(pattern)p Fu(,)e(and,)g(if)630 2318 y(it)j(matc)m(hes)h(the)g +(pattern,)f(its)h(case)g(is)f(con)m(v)m(erted.)49 b(The)33 +b(pattern)g(should)f(not)h(attempt)630 2428 y(to)f(matc)m(h)g(more)f +(than)g(one)g(c)m(haracter.)44 b(The)30 b(`)p Ft(^)p +Fu(')i(op)s(erator)f(con)m(v)m(erts)h(lo)m(w)m(ercase)i(letters)630 +2538 y(matc)m(hing)i Fr(pattern)f Fu(to)h(upp)s(ercase;)h(the)e(`)p +Ft(,)p Fu(')g(op)s(erator)g(con)m(v)m(erts)i(matc)m(hing)f(upp)s +(ercase)630 2647 y(letters)e(to)f(lo)m(w)m(ercase.)50 +b(The)32 b(`)p Ft(^^)p Fu(')h(and)f(`)p Ft(,,)p Fu(')g(expansions)h +(con)m(v)m(ert)h(eac)m(h)g(matc)m(hed)f(c)m(har-)630 +2757 y(acter)c(in)f(the)h(expanded)e(v)-5 b(alue;)30 +b(the)e(`)p Ft(^)p Fu(')g(and)g(`)p Ft(,)p Fu(')g(expansions)g(matc)m +(h)h(and)f(con)m(v)m(ert)i(only)630 2866 y(the)37 b(\014rst)g(c)m +(haracter)i(in)e(the)g(expanded)g(v)-5 b(alue.)61 b(If)37 +b Fr(pattern)g Fu(is)h(omitted,)i(it)e(is)f(treated)630 +2976 y(lik)m(e)h(a)f(`)p Ft(?)p Fu(',)i(whic)m(h)d(matc)m(hes)i(ev)m +(ery)f(c)m(haracter.)61 b(If)37 b Fr(parameter)43 b Fu(is)37 +b(`)p Ft(@)p Fu(')g(or)f(`)p Ft(*)p Fu(',)j(the)e(case)630 +3086 y(mo)s(di\014cation)29 b(op)s(eration)f(is)g(applied)g(to)h(eac)m +(h)h(p)s(ositional)f(parameter)f(in)g(turn,)g(and)g(the)630 +3195 y(expansion)38 b(is)g(the)g(resultan)m(t)h(list.)65 +b(If)37 b Fr(parameter)46 b Fu(is)38 b(an)g(arra)m(y)g(v)-5 +b(ariable)39 b(subscripted)630 3305 y(with)26 b(`)p Ft(@)p +Fu(')f(or)h(`)p Ft(*)p Fu(',)h(the)f(case)h(mo)s(di\014cation)f(op)s +(eration)h(is)e(applied)h(to)h(eac)m(h)g(mem)m(b)s(er)e(of)h(the)630 +3414 y(arra)m(y)31 b(in)f(turn,)f(and)h(the)h(expansion)f(is)g(the)h +(resultan)m(t)g(list.)150 3571 y Ft(${)p Fj(parameter)p +Ft(@)p Fj(operator)p Ft(})630 3680 y Fu(The)d(expansion)h(is)f(either)h +(a)g(transformation)g(of)g(the)g(v)-5 b(alue)29 b(of)g +Fr(parameter)35 b Fu(or)29 b(informa-)630 3790 y(tion)e(ab)s(out)f +Fr(parameter)33 b Fu(itself,)28 b(dep)s(ending)c(on)i(the)h(v)-5 +b(alue)26 b(of)h Fr(op)s(erator)p Fu(.)39 b(Eac)m(h)27 +b Fr(op)s(erator)630 3900 y Fu(is)j(a)h(single)g(letter:)630 +4056 y Ft(U)432 b Fu(The)31 b(expansion)g(is)g(a)g(string)h(that)f(is)h +(the)f(v)-5 b(alue)32 b(of)f Fr(parameter)38 b Fu(with)31 +b(lo)m(w-)1110 4166 y(ercase)g(alphab)s(etic)g(c)m(haracters)h(con)m(v) +m(erted)g(to)f(upp)s(ercase.)630 4322 y Ft(u)432 b Fu(The)34 +b(expansion)g(is)g(a)h(string)f(that)h(is)g(the)f(v)-5 +b(alue)35 b(of)f Fr(parameter)42 b Fu(with)34 b(the)1110 +4432 y(\014rst)c(c)m(haracter)i(con)m(v)m(erted)f(to)h(upp)s(ercase,)d +(if)i(it)g(is)f(alphab)s(etic.)630 4589 y Ft(L)432 b +Fu(The)33 b(expansion)h(is)g(a)g(string)g(that)h(is)f(the)g(v)-5 +b(alue)34 b(of)g Fr(parameter)41 b Fu(with)34 b(up-)1110 +4698 y(p)s(ercase)c(alphab)s(etic)h(c)m(haracters)h(con)m(v)m(erted)g +(to)f(lo)m(w)m(ercase.)630 4855 y Ft(Q)432 b Fu(The)30 +b(expansion)h(is)g(a)g(string)f(that)i(is)f(the)g(v)-5 +b(alue)31 b(of)g Fr(parameter)37 b Fu(quoted)31 b(in)1110 +4964 y(a)g(format)f(that)h(can)g(b)s(e)f(reused)f(as)i(input.)630 +5121 y Ft(E)432 b Fu(The)27 b(expansion)g(is)g(a)g(string)h(that)f(is)h +(the)f(v)-5 b(alue)28 b(of)f Fr(parameter)34 b Fu(with)27 +b(bac)m(k-)1110 5230 y(slash)e(escap)s(e)h(sequences)f(expanded)g(as)g +(with)g(the)h Ft($'...)o(')e Fu(quoting)i(mec)m(h-)1110 +5340 y(anism.)p eop end +%%Page: 31 37 +TeXDict begin 31 36 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(31)630 299 +y Ft(P)432 b Fu(The)22 b(expansion)h(is)g(a)g(string)g(that)g(is)g(the) +g(result)g(of)g(expanding)f(the)h(v)-5 b(alue)24 b(of)1110 +408 y Fr(parameter)31 b Fu(as)24 b(if)f(it)h(w)m(ere)g(a)g(prompt)f +(string)h(\(see)g(Section)h(6.9)g([Con)m(trolling)1110 +518 y(the)31 b(Prompt],)f(page)h(98\).)630 676 y Ft(A)432 +b Fu(The)24 b(expansion)g(is)g(a)h(string)f(in)g(the)g(form)g(of)h(an)f +(assignmen)m(t)h(statemen)m(t)h(or)1110 785 y Ft(declare)h +Fu(command)i(that,)h(if)f(ev)-5 b(aluated,)31 b(will)e(recreate)i +Fr(parameter)36 b Fu(with)1110 895 y(its)31 b(attributes)g(and)e(v)-5 +b(alue.)630 1052 y Ft(K)432 b Fu(Pro)s(duces)33 b(a)i(p)s +(ossibly-quoted)e(v)m(ersion)i(of)f(the)h(v)-5 b(alue)34 +b(of)h Fr(parameter)p Fu(,)g(ex-)1110 1162 y(cept)46 +b(that)h(it)f(prin)m(ts)f(the)h(v)-5 b(alues)47 b(of)f(indexed)f(and)g +(asso)s(ciativ)m(e)k(arra)m(ys)1110 1271 y(as)37 b(a)g(sequence)f(of)h +(quoted)g(k)m(ey-v)-5 b(alue)38 b(pairs)e(\(see)h(Section)h(6.7)f +([Arra)m(ys],)1110 1381 y(page)31 b(95\).)630 1539 y +Ft(a)432 b Fu(The)30 b(expansion)g(is)g(a)h(string)f(consisting)h(of)g +(\015ag)g(v)-5 b(alues)30 b(represen)m(ting)h Fr(pa-)1110 +1648 y(rameter)7 b Fu('s)31 b(attributes.)630 1806 y(If)e +Fr(parameter)37 b Fu(is)30 b(`)p Ft(@)p Fu(')g(or)g(`)p +Ft(*)p Fu(',)g(the)g(op)s(eration)g(is)g(applied)f(to)i(eac)m(h)g(p)s +(ositional)f(parameter)630 1915 y(in)24 b(turn,)g(and)f(the)h +(expansion)g(is)g(the)g(resultan)m(t)h(list.)39 b(If)23 +b Fr(parameter)31 b Fu(is)24 b(an)g(arra)m(y)g(v)-5 b(ariable)630 +2025 y(subscripted)24 b(with)h(`)p Ft(@)p Fu(')h(or)g(`)p +Ft(*)p Fu(',)h(the)e(op)s(eration)h(is)g(applied)f(to)h(eac)m(h)h(mem)m +(b)s(er)e(of)h(the)f(arra)m(y)630 2134 y(in)30 b(turn,)g(and)f(the)i +(expansion)f(is)h(the)f(resultan)m(t)h(list.)630 2268 +y(The)c(result)h(of)g(the)f(expansion)h(is)g(sub)5 b(ject)27 +b(to)h(w)m(ord)g(splitting)g(and)f(\014lename)h(expansion)630 +2378 y(as)j(describ)s(ed)e(b)s(elo)m(w.)150 2575 y Fk(3.5.4)63 +b(Command)41 b(Substitution)150 2722 y Fu(Command)f(substitution)h +(allo)m(ws)i(the)e(output)g(of)h(a)f(command)g(to)h(replace)g(the)g +(command)f(itself.)150 2831 y(Command)29 b(substitution)h(o)s(ccurs)h +(when)e(a)i(command)f(is)g(enclosed)h(as)g(follo)m(ws:)390 +2965 y Ft($\()p Fj(command)p Ft(\))150 3098 y Fu(or)390 +3232 y Ft(`)p Fj(command)p Ft(`)150 3366 y Fu(Bash)20 +b(p)s(erforms)f(the)i(expansion)f(b)m(y)g(executing)i +Fr(command)h Fu(in)d(a)h(subshell)e(en)m(vironmen)m(t)i(and)f +(replacing)150 3475 y(the)40 b(command)g(substitution)f(with)h(the)g +(standard)f(output)g(of)h(the)g(command,)i(with)e(an)m(y)g(trailing)150 +3585 y(newlines)e(deleted.)64 b(Em)m(b)s(edded)37 b(newlines)h(are)g +(not)g(deleted,)j(but)d(they)g(ma)m(y)h(b)s(e)e(remo)m(v)m(ed)i(during) +150 3694 y(w)m(ord)30 b(splitting.)42 b(The)30 b(command)g +(substitution)h Ft($\(cat)e Fj(file)p Ft(\))g Fu(can)h(b)s(e)g +(replaced)h(b)m(y)g(the)f(equiv)-5 b(alen)m(t)150 3804 +y(but)30 b(faster)g Ft($\(<)g Fj(file)p Ft(\))p Fu(.)275 +3937 y(When)j(the)i(old-st)m(yle)h(bac)m(kquote)f(form)f(of)g +(substitution)g(is)g(used,)h(bac)m(kslash)f(retains)h(its)f(literal)150 +4047 y(meaning)k(except)h(when)e(follo)m(w)m(ed)j(b)m(y)e(`)p +Ft($)p Fu(',)j(`)p Ft(`)p Fu(',)f(or)e(`)p Ft(\\)p Fu('.)64 +b(The)38 b(\014rst)f(bac)m(kquote)j(not)e(preceded)g(b)m(y)g(a)150 +4157 y(bac)m(kslash)k(terminates)f(the)h(command)e(substitution.)72 +b(When)41 b(using)f(the)i Ft($\()p Fj(command)p Ft(\))c +Fu(form,)43 b(all)150 4266 y(c)m(haracters)32 b(b)s(et)m(w)m(een)f(the) +f(paren)m(theses)h(mak)m(e)g(up)f(the)g(command;)h(none)f(are)h +(treated)g(sp)s(ecially)-8 b(.)275 4400 y(Command)22 +b(substitutions)g(ma)m(y)i(b)s(e)e(nested.)39 b(T)-8 +b(o)23 b(nest)g(when)f(using)h(the)g(bac)m(kquoted)h(form,)g(escap)s(e) +150 4509 y(the)31 b(inner)e(bac)m(kquotes)j(with)e(bac)m(kslashes.)275 +4643 y(If)e(the)i(substitution)e(app)s(ears)h(within)g(double)f +(quotes,)i(w)m(ord)f(splitting)h(and)f(\014lename)g(expansion)150 +4753 y(are)i(not)f(p)s(erformed)f(on)h(the)h(results.)150 +4950 y Fk(3.5.5)63 b(Arithmetic)40 b(Expansion)150 5097 +y Fu(Arithmetic)25 b(expansion)g(allo)m(ws)g(the)g(ev)-5 +b(aluation)26 b(of)f(an)f(arithmetic)i(expression)e(and)g(the)g +(substitution)150 5206 y(of)31 b(the)f(result.)41 b(The)30 +b(format)g(for)g(arithmetic)i(expansion)e(is:)390 5340 +y Ft($\(\()47 b Fj(expression)e Ft(\)\))p eop end +%%Page: 32 38 +TeXDict begin 32 37 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(32)275 299 +y(The)33 b(expression)g(is)h(treated)g(as)g(if)g(it)g(w)m(ere)g(within) +f(double)h(quotes,)h(but)e(a)h(double)f(quote)h(inside)150 +408 y(the)k(paren)m(theses)g(is)g(not)g(treated)h(sp)s(ecially)-8 +b(.)65 b(All)38 b(tok)m(ens)h(in)f(the)g(expression)f(undergo)g +(parameter)150 518 y(and)26 b(v)-5 b(ariable)28 b(expansion,)g(command) +e(substitution,)i(and)e(quote)i(remo)m(v)-5 b(al.)41 +b(The)26 b(result)h(is)g(treated)h(as)150 628 y(the)j(arithmetic)g +(expression)f(to)h(b)s(e)f(ev)-5 b(aluated.)42 b(Arithmetic)31 +b(expansions)g(ma)m(y)g(b)s(e)e(nested.)275 761 y(The)34 +b(ev)-5 b(aluation)37 b(is)f(p)s(erformed)e(according)i(to)g(the)g +(rules)f(listed)h(b)s(elo)m(w)g(\(see)g(Section)g(6.5)h([Shell)150 +870 y(Arithmetic],)32 b(page)f(93\).)42 b(If)30 b(the)h(expression)f +(is)g(in)m(v)-5 b(alid,)32 b(Bash)e(prin)m(ts)g(a)h(message)g +(indicating)h(failure)150 980 y(to)f(the)g(standard)e(error)h(and)g(no) +g(substitution)g(o)s(ccurs.)150 1177 y Fk(3.5.6)63 b(Pro)s(cess)42 +b(Substitution)150 1324 y Fu(Pro)s(cess)33 b(substitution)g(allo)m(ws)i +(a)e(pro)s(cess's)g(input)f(or)h(output)g(to)h(b)s(e)f(referred)f(to)i +(using)f(a)g(\014lename.)150 1433 y(It)d(tak)m(es)i(the)f(form)f(of)390 +1567 y Ft(<\()p Fj(list)p Ft(\))150 1700 y Fu(or)390 +1833 y Ft(>\()p Fj(list)p Ft(\))150 1966 y Fu(The)e(pro)s(cess)h +Fr(list)j Fu(is)d(run)e(async)m(hronously)-8 b(,)30 b(and)e(its)i +(input)e(or)h(output)f(app)s(ears)h(as)g(a)g(\014lename.)41 +b(This)150 2076 y(\014lename)25 b(is)g(passed)g(as)g(an)g(argumen)m(t)h +(to)g(the)f(curren)m(t)g(command)g(as)g(the)g(result)g(of)g(the)h +(expansion.)38 b(If)150 2186 y(the)28 b Ft(>\()p Fj(list)p +Ft(\))d Fu(form)i(is)g(used,)h(writing)f(to)h(the)g(\014le)f(will)h +(pro)m(vide)g(input)e(for)h Fr(list)p Fu(.)41 b(If)26 +b(the)i Ft(<\()p Fj(list)p Ft(\))d Fu(form)150 2295 y(is)g(used,)g(the) +f(\014le)h(passed)f(as)h(an)f(argumen)m(t)h(should)e(b)s(e)h(read)h(to) +g(obtain)g(the)f(output)g(of)h Fr(list)p Fu(.)40 b(Note)25 +b(that)150 2405 y(no)33 b(space)g(ma)m(y)g(app)s(ear)f(b)s(et)m(w)m +(een)i(the)f Ft(<)f Fu(or)h Ft(>)f Fu(and)g(the)h(left)h(paren)m +(thesis,)f(otherwise)h(the)f(construct)150 2514 y(w)m(ould)j(b)s(e)g +(in)m(terpreted)g(as)h(a)f(redirection.)59 b(Pro)s(cess)36 +b(substitution)g(is)h(supp)s(orted)d(on)i(systems)g(that)150 +2624 y(supp)s(ort)29 b(named)h(pip)s(es)f(\()p Fm(fif)n(o)p +Fu(s\))h(or)h(the)f Ft(/dev/fd)f Fu(metho)s(d)h(of)g(naming)g(op)s(en)g +(\014les.)275 2757 y(When)36 b(a)m(v)-5 b(ailable,)40 +b(pro)s(cess)c(substitution)h(is)f(p)s(erformed)f(sim)m(ultaneously)i +(with)g(parameter)g(and)150 2867 y(v)-5 b(ariable)31 +b(expansion,)g(command)f(substitution,)g(and)g(arithmetic)i(expansion.) +150 3064 y Fk(3.5.7)63 b(W)-10 b(ord)41 b(Splitting)150 +3210 y Fu(The)30 b(shell)h(scans)g(the)g(results)f(of)h(parameter)g +(expansion,)g(command)g(substitution,)g(and)f(arithmetic)150 +3320 y(expansion)g(that)h(did)f(not)g(o)s(ccur)h(within)e(double)h +(quotes)h(for)f(w)m(ord)g(splitting.)275 3453 y(The)e(shell)g(treats)i +(eac)m(h)g(c)m(haracter)g(of)f Ft($IFS)e Fu(as)i(a)g(delimiter,)h(and)e +(splits)g(the)h(results)f(of)h(the)g(other)150 3563 y(expansions)22 +b(in)m(to)i(w)m(ords)e(using)h(these)g(c)m(haracters)h(as)f(\014eld)f +(terminators.)39 b(If)22 b Ft(IFS)g Fu(is)h(unset,)h(or)e(its)h(v)-5 +b(alue)150 3672 y(is)36 b(exactly)j Ft()p +Fu(,)32 b(the)37 b(default,)h(then)e(sequences)h(of)67 +b Ft()p Fu(,)36 b Ft()p Fu(,)h(and)150 3782 +y Ft()28 b Fu(at)k(the)f(b)s(eginning)f(and)h(end)f(of)h(the)g +(results)g(of)g(the)g(previous)g(expansions)f(are)i(ignored,)150 +3892 y(and)k(an)m(y)h(sequence)h(of)f Ft(IFS)f Fu(c)m(haracters)i(not)f +(at)h(the)f(b)s(eginning)f(or)h(end)f(serv)m(es)h(to)h(delimit)f(w)m +(ords.)150 4001 y(If)43 b Ft(IFS)f Fu(has)h(a)h(v)-5 +b(alue)43 b(other)h(than)f(the)g(default,)k(then)c(sequences)h(of)f +(the)h(whitespace)f(c)m(haracters)150 4111 y Ft(space)p +Fu(,)29 b Ft(tab)p Fu(,)h(and)g Ft(newline)e Fu(are)j(ignored)g(at)g +(the)f(b)s(eginning)g(and)g(end)g(of)g(the)h(w)m(ord,)f(as)h(long)g(as) +g(the)150 4220 y(whitespace)c(c)m(haracter)h(is)f(in)f(the)g(v)-5 +b(alue)27 b(of)g Ft(IFS)e Fu(\(an)i Ft(IFS)e Fu(whitespace)i(c)m +(haracter\).)42 b(An)m(y)26 b(c)m(haracter)i(in)150 4330 +y Ft(IFS)c Fu(that)h(is)g(not)f Ft(IFS)g Fu(whitespace,)j(along)f(with) +e(an)m(y)h(adjacen)m(t)h Ft(IFS)e Fu(whitespace)h(c)m(haracters,)i +(delimits)150 4440 y(a)k(\014eld.)40 b(A)31 b(sequence)g(of)f +Ft(IFS)g Fu(whitespace)h(c)m(haracters)h(is)e(also)h(treated)h(as)f(a)f +(delimiter.)42 b(If)30 b(the)g(v)-5 b(alue)150 4549 y(of)31 +b Ft(IFS)e Fu(is)h(n)m(ull,)h(no)f(w)m(ord)g(splitting)h(o)s(ccurs.)275 +4682 y(Explicit)21 b(n)m(ull)g(argumen)m(ts)g(\()p Ft("")g +Fu(or)g Ft('')p Fu(\))f(are)h(retained)h(and)e(passed)g(to)i(commands)e +(as)i(empt)m(y)f(strings.)150 4792 y(Unquoted)37 b(implicit)i(n)m(ull)f +(argumen)m(ts,)i(resulting)d(from)g(the)h(expansion)g(of)g(parameters)f +(that)i(ha)m(v)m(e)150 4902 y(no)32 b(v)-5 b(alues,)33 +b(are)f(remo)m(v)m(ed.)47 b(If)32 b(a)g(parameter)h(with)e(no)h(v)-5 +b(alue)33 b(is)f(expanded)f(within)h(double)f(quotes,)j(a)150 +5011 y(n)m(ull)c(argumen)m(t)g(results)g(and)f(is)h(retained)g(and)f +(passed)g(to)i(a)f(command)g(as)g(an)f(empt)m(y)i(string.)40 +b(When)150 5121 y(a)f(quoted)f(n)m(ull)g(argumen)m(t)h(app)s(ears)e(as) +i(part)f(of)g(a)g(w)m(ord)g(whose)g(expansion)g(is)h(non-n)m(ull,)h +(the)e(n)m(ull)150 5230 y(argumen)m(t)i(is)f(remo)m(v)m(ed.)69 +b(That)39 b(is,)j(the)e(w)m(ord)f Ft(-d'')f Fu(b)s(ecomes)i +Ft(-d)e Fu(after)i(w)m(ord)f(splitting)h(and)f(n)m(ull)150 +5340 y(argumen)m(t)31 b(remo)m(v)-5 b(al.)p eop end +%%Page: 33 39 +TeXDict begin 33 38 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(33)275 299 +y(Note)31 b(that)g(if)g(no)f(expansion)g(o)s(ccurs,)g(no)h(splitting)g +(is)f(p)s(erformed.)150 505 y Fk(3.5.8)63 b(Filename)41 +b(Expansion)150 652 y Fu(After)30 b(w)m(ord)f(splitting,)i(unless)d +(the)i Ft(-f)f Fu(option)h(has)f(b)s(een)g(set)h(\(see)g(Section)h +(4.3.1)g([The)e(Set)h(Builtin],)150 762 y(page)d(62\),)i(Bash)d(scans)h +(eac)m(h)h(w)m(ord)e(for)g(the)h(c)m(haracters)g(`)p +Ft(*)p Fu(',)h(`)p Ft(?)p Fu(',)g(and)e(`)p Ft([)p Fu('.)39 +b(If)26 b(one)h(of)g(these)f(c)m(haracters)150 872 y(app)s(ears,)34 +b(and)f(is)g(not)h(quoted,)h(then)e(the)h(w)m(ord)f(is)h(regarded)f(as) +h(a)g Fr(pattern)p Fu(,)h(and)e(replaced)h(with)f(an)150 +981 y(alphab)s(etically)41 b(sorted)e(list)h(of)g(\014lenames)f(matc)m +(hing)i(the)e(pattern)g(\(see)i(Section)f(3.5.8.1)i([P)m(attern)150 +1091 y(Matc)m(hing],)e(page)e(33\).)60 b(If)36 b(no)h(matc)m(hing)g +(\014lenames)g(are)g(found,)g(and)f(the)g(shell)h(option)g +Ft(nullglob)150 1200 y Fu(is)k(disabled,)i(the)f(w)m(ord)e(is)h(left)h +(unc)m(hanged.)72 b(If)40 b(the)h Ft(nullglob)e Fu(option)i(is)g(set,)k +(and)40 b(no)h(matc)m(hes)150 1310 y(are)c(found,)g(the)g(w)m(ord)f(is) +g(remo)m(v)m(ed.)60 b(If)36 b(the)h Ft(failglob)d Fu(shell)j(option)g +(is)g(set,)i(and)c(no)i(matc)m(hes)h(are)150 1420 y(found,)e(an)g +(error)f(message)i(is)f(prin)m(ted)f(and)h(the)g(command)f(is)h(not)g +(executed.)58 b(If)35 b(the)h(shell)g(option)150 1529 +y Ft(nocaseglob)e Fu(is)j(enabled,)i(the)e(matc)m(h)h(is)f(p)s +(erformed)e(without)i(regard)g(to)h(the)f(case)h(of)f(alphab)s(etic)150 +1639 y(c)m(haracters.)275 1781 y(When)23 b(a)h(pattern)f(is)h(used)f +(for)g(\014lename)h(expansion,)h(the)e(c)m(haracter)i(`)p +Ft(.)p Fu(')f(at)g(the)g(start)g(of)g(a)g(\014lename)150 +1890 y(or)f(immediately)i(follo)m(wing)g(a)f(slash)f(m)m(ust)h(b)s(e)f +(matc)m(hed)h(explicitly)-8 b(,)27 b(unless)c(the)g(shell)h(option)g +Ft(dotglob)150 2000 y Fu(is)k(set.)41 b(The)28 b(\014lenames)g(`)p +Ft(.)p Fu(')g(and)g(`)p Ft(..)p Fu(')g(m)m(ust)g(alw)m(a)m(ys)i(b)s(e)e +(matc)m(hed)h(explicitly)-8 b(,)30 b(ev)m(en)f(if)g Ft(dotglob)d +Fu(is)i(set.)150 2109 y(In)i(other)g(cases,)i(the)e(`)p +Ft(.)p Fu(')h(c)m(haracter)h(is)e(not)h(treated)g(sp)s(ecially)-8 +b(.)275 2251 y(When)30 b(matc)m(hing)i(a)f(\014lename,)h(the)f(slash)f +(c)m(haracter)j(m)m(ust)d(alw)m(a)m(ys)j(b)s(e)d(matc)m(hed)h +(explicitly)i(b)m(y)e(a)150 2361 y(slash)d(in)f(the)h(pattern,)h(but)e +(in)h(other)g(matc)m(hing)h(con)m(texts)h(it)e(can)g(b)s(e)g(matc)m +(hed)g(b)m(y)g(a)g(sp)s(ecial)h(pattern)150 2470 y(c)m(haracter)j(as)f +(describ)s(ed)e(b)s(elo)m(w)h(\(see)i(Section)f(3.5.8.1)i([P)m(attern)e +(Matc)m(hing],)i(page)e(33\).)275 2612 y(See)d(the)g(description)g(of)g +Ft(shopt)e Fu(in)i(Section)g(4.3.2)i([The)e(Shopt)f(Builtin],)i(page)g +(66,)g(for)f(a)g(descrip-)150 2722 y(tion)j(of)f(the)h +Ft(nocaseglob)p Fu(,)d Ft(nullglob)p Fu(,)g Ft(failglob)p +Fu(,)h(and)g Ft(dotglob)g Fu(options.)275 2864 y(The)36 +b Ft(GLOBIGNORE)d Fu(shell)k(v)-5 b(ariable)37 b(ma)m(y)g(b)s(e)f(used) +g(to)h(restrict)g(the)g(set)g(of)g(\014le)f(names)h(matc)m(hing)150 +2973 y(a)42 b(pattern.)74 b(If)41 b Ft(GLOBIGNORE)e Fu(is)i(set,)k(eac) +m(h)e(matc)m(hing)f(\014le)g(name)f(that)h(also)h(matc)m(hes)f(one)g +(of)g(the)150 3083 y(patterns)34 b(in)g Ft(GLOBIGNORE)d +Fu(is)k(remo)m(v)m(ed)g(from)f(the)g(list)h(of)f(matc)m(hes.)54 +b(If)33 b(the)i Ft(nocaseglob)c Fu(option)k(is)150 3192 +y(set,)c(the)e(matc)m(hing)i(against)g(the)f(patterns)f(in)h +Ft(GLOBIGNORE)c Fu(is)k(p)s(erformed)e(without)i(regard)f(to)i(case.) +150 3302 y(The)d(\014lenames)h Ft(.)g Fu(and)f Ft(..)h +Fu(are)g(alw)m(a)m(ys)h(ignored)f(when)f Ft(GLOBIGNORE)f +Fu(is)i(set)g(and)f(not)h(n)m(ull.)41 b(Ho)m(w)m(ev)m(er,)150 +3412 y(setting)30 b Ft(GLOBIGNORE)d Fu(to)j(a)f(non-n)m(ull)g(v)-5 +b(alue)30 b(has)f(the)g(e\013ect)i(of)f(enabling)f(the)h +Ft(dotglob)d Fu(shell)i(option,)150 3521 y(so)j(all)h(other)f +(\014lenames)g(b)s(eginning)f(with)h(a)g(`)p Ft(.)p Fu(')g(will)h(matc) +m(h.)46 b(T)-8 b(o)32 b(get)h(the)f(old)g(b)s(eha)m(vior)g(of)h +(ignoring)150 3631 y(\014lenames)c(b)s(eginning)f(with)h(a)h(`)p +Ft(.)p Fu(',)f(mak)m(e)h(`)p Ft(.*)p Fu(')f(one)h(of)f(the)g(patterns)g +(in)g Ft(GLOBIGNORE)p Fu(.)37 b(The)29 b Ft(dotglob)150 +3740 y Fu(option)i(is)f(disabled)g(when)g Ft(GLOBIGNORE)d +Fu(is)k(unset.)150 3947 y Fk(3.5.8.1)63 b(P)m(attern)40 +b(Matc)m(hing)150 4094 y Fu(An)m(y)24 b(c)m(haracter)h(that)f(app)s +(ears)f(in)g(a)h(pattern,)i(other)e(than)f(the)h(sp)s(ecial)g(pattern)g +(c)m(haracters)h(describ)s(ed)150 4203 y(b)s(elo)m(w,)31 +b(matc)m(hes)g(itself.)42 b(The)29 b Fm(nul)h Fu(c)m(haracter)i(ma)m(y) +e(not)h(o)s(ccur)f(in)g(a)h(pattern.)40 b(A)31 b(bac)m(kslash)g(escap)s +(es)150 4313 y(the)38 b(follo)m(wing)g(c)m(haracter;)43 +b(the)37 b(escaping)i(bac)m(kslash)e(is)h(discarded)f(when)f(matc)m +(hing.)63 b(The)36 b(sp)s(ecial)150 4423 y(pattern)30 +b(c)m(haracters)i(m)m(ust)f(b)s(e)e(quoted)i(if)f(they)h(are)f(to)i(b)s +(e)d(matc)m(hed)i(literally)-8 b(.)275 4564 y(The)29 +b(sp)s(ecial)i(pattern)g(c)m(haracters)h(ha)m(v)m(e)f(the)g(follo)m +(wing)h(meanings:)150 4735 y Ft(*)432 b Fu(Matc)m(hes)31 +b(an)m(y)e(string,)h(including)f(the)g(n)m(ull)g(string.)41 +b(When)29 b(the)g Ft(globstar)e Fu(shell)i(option)630 +4844 y(is)37 b(enabled,)h(and)e(`)p Ft(*)p Fu(')h(is)g(used)f(in)g(a)h +(\014lename)g(expansion)g(con)m(text,)j(t)m(w)m(o)e(adjacen)m(t)g(`)p +Ft(*)p Fu('s)630 4954 y(used)f(as)g(a)h(single)g(pattern)g(will)f(matc) +m(h)i(all)f(\014les)f(and)g(zero)h(or)g(more)f(directories)i(and)630 +5064 y(sub)s(directories.)g(If)25 b(follo)m(w)m(ed)j(b)m(y)e(a)g(`)p +Ft(/)p Fu(',)h(t)m(w)m(o)g(adjacen)m(t)h(`)p Ft(*)p Fu('s)e(will)g +(matc)m(h)h(only)f(directories)630 5173 y(and)k(sub)s(directories.)150 +5340 y Ft(?)432 b Fu(Matc)m(hes)32 b(an)m(y)f(single)g(c)m(haracter.)p +eop end +%%Page: 34 40 +TeXDict begin 34 39 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(34)150 299 +y Ft([...)o(])241 b Fu(Matc)m(hes)27 b(an)m(y)e(one)g(of)g(the)g +(enclosed)g(c)m(haracters.)41 b(A)25 b(pair)f(of)h(c)m(haracters)i +(separated)e(b)m(y)g(a)630 408 y(h)m(yphen)k(denotes)i(a)g +Fr(range)g(expression)p Fu(;)f(an)m(y)h(c)m(haracter)h(that)f(falls)g +(b)s(et)m(w)m(een)g(those)g(t)m(w)m(o)630 518 y(c)m(haracters,)d +(inclusiv)m(e,)f(using)d(the)h(curren)m(t)f(lo)s(cale's)j(collating)g +(sequence)e(and)f(c)m(haracter)630 628 y(set,)31 b(is)f(matc)m(hed.)42 +b(If)30 b(the)g(\014rst)g(c)m(haracter)i(follo)m(wing)g(the)e(`)p +Ft([)p Fu(')h(is)f(a)h(`)p Ft(!)p Fu(')f(or)g(a)h(`)p +Ft(^)p Fu(')g(then)f(an)m(y)630 737 y(c)m(haracter)c(not)f(enclosed)g +(is)g(matc)m(hed.)40 b(A)25 b(`)p Fq(\000)p Fu(')f(ma)m(y)i(b)s(e)e +(matc)m(hed)h(b)m(y)f(including)h(it)g(as)g(the)630 847 +y(\014rst)32 b(or)h(last)h(c)m(haracter)h(in)e(the)g(set.)50 +b(A)33 b(`)p Ft(])p Fu(')g(ma)m(y)h(b)s(e)e(matc)m(hed)i(b)m(y)f +(including)g(it)g(as)h(the)630 956 y(\014rst)25 b(c)m(haracter)i(in)e +(the)h(set.)40 b(The)25 b(sorting)h(order)f(of)h(c)m(haracters)h(in)f +(range)g(expressions)f(is)630 1066 y(determined)h(b)m(y)h(the)g(curren) +m(t)f(lo)s(cale)j(and)d(the)h(v)-5 b(alues)27 b(of)g(the)g +Ft(LC_COLLATE)d Fu(and)i Ft(LC_ALL)630 1176 y Fu(shell)31 +b(v)-5 b(ariables,)31 b(if)f(set.)630 1312 y(F)-8 b(or)34 +b(example,)g(in)f(the)g(default)g(C)f(lo)s(cale,)k(`)p +Ft([a-dx-z])p Fu(')31 b(is)i(equiv)-5 b(alen)m(t)34 b(to)g(`)p +Ft([abcdxyz])p Fu('.)630 1422 y(Man)m(y)68 b(lo)s(cales)h(sort)f(c)m +(haracters)h(in)e(dictionary)i(order,)76 b(and)67 b(in)g(these)h(lo)s +(cales)630 1531 y(`)p Ft([a-dx-z])p Fu(')36 b(is)i(t)m(ypically)i(not)e +(equiv)-5 b(alen)m(t)39 b(to)g(`)p Ft([abcdxyz])p Fu(';)g(it)g(migh)m +(t)f(b)s(e)f(equiv)-5 b(alen)m(t)630 1641 y(to)34 b(`)p +Ft([aBbCcDdxXyYz])p Fu(',)c(for)j(example.)49 b(T)-8 +b(o)33 b(obtain)h(the)f(traditional)h(in)m(terpretation)h(of)630 +1751 y(ranges)e(in)f(brac)m(k)m(et)i(expressions,)g(y)m(ou)f(can)g +(force)g(the)g(use)f(of)h(the)g(C)f(lo)s(cale)i(b)m(y)f(setting)630 +1860 y(the)c Ft(LC_COLLATE)e Fu(or)i Ft(LC_ALL)f Fu(en)m(vironmen)m(t)i +(v)-5 b(ariable)30 b(to)g(the)f(v)-5 b(alue)30 b(`)p +Ft(C)p Fu(',)g(or)f(enable)h(the)630 1970 y Ft(globasciiranges)c +Fu(shell)31 b(option.)630 2106 y(Within)23 b(`)p Ft([)p +Fu(')h(and)e(`)p Ft(])p Fu(',)j Fr(c)m(haracter)g(classes)j +Fu(can)c(b)s(e)e(sp)s(eci\014ed)h(using)f(the)i(syn)m(tax)f +Ft([:)p Fr(class)t Ft(:])p Fu(,)630 2216 y(where)30 b +Fr(class)35 b Fu(is)30 b(one)h(of)f(the)h(follo)m(wing)h(classes)f +(de\014ned)e(in)h(the)h Fm(posix)f Fu(standard:)870 2353 +y Ft(alnum)142 b(alpha)g(ascii)f(blank)h(cntrl)g(digit)g(graph)g(lower) +870 2462 y(print)g(punct)g(space)f(upper)h(word)190 b(xdigit)630 +2599 y Fu(A)42 b(c)m(haracter)h(class)f(matc)m(hes)h(an)m(y)f(c)m +(haracter)h(b)s(elonging)f(to)g(that)g(class.)75 b(The)41 +b Ft(word)630 2709 y Fu(c)m(haracter)32 b(class)f(matc)m(hes)h +(letters,)f(digits,)h(and)d(the)i(c)m(haracter)h(`)p +Ft(_)p Fu('.)630 2845 y(Within)25 b(`)p Ft([)p Fu(')f(and)g(`)p +Ft(])p Fu(',)i(an)e Fr(equiv)-5 b(alence)26 b(class)j +Fu(can)24 b(b)s(e)g(sp)s(eci\014ed)g(using)g(the)g(syn)m(tax)h +Ft([=)p Fr(c)6 b Ft(=])p Fu(,)630 2955 y(whic)m(h)29 +b(matc)m(hes)i(all)f(c)m(haracters)h(with)e(the)h(same)g(collation)h(w) +m(eigh)m(t)g(\(as)f(de\014ned)e(b)m(y)i(the)630 3064 +y(curren)m(t)g(lo)s(cale\))j(as)d(the)h(c)m(haracter)h +Fr(c)p Fu(.)630 3201 y(Within)22 b(`)p Ft([)p Fu(')f(and)g(`)p +Ft(])p Fu(',)j(the)d(syn)m(tax)h Ft([.)p Fr(sym)m(b)s(ol)t +Ft(.])e Fu(matc)m(hes)i(the)g(collating)i(sym)m(b)s(ol)d +Fr(sym)m(b)s(ol)p Fu(.)275 3367 y(If)29 b(the)g Ft(extglob)f +Fu(shell)h(option)h(is)g(enabled)f(using)g(the)h Ft(shopt)e +Fu(builtin,)h(sev)m(eral)i(extended)f(pattern)150 3477 +y(matc)m(hing)37 b(op)s(erators)e(are)h(recognized.)58 +b(In)35 b(the)g(follo)m(wing)i(description,)g(a)f Fr(pattern-list)j +Fu(is)d(a)g(list)g(of)150 3586 y(one)d(or)f(more)h(patterns)f +(separated)h(b)m(y)f(a)h(`)p Ft(|)p Fu('.)47 b(Comp)s(osite)33 +b(patterns)f(ma)m(y)i(b)s(e)d(formed)h(using)g(one)h(or)150 +3696 y(more)e(of)f(the)h(follo)m(wing)g(sub-patterns:)150 +3862 y Ft(?\()p Fj(pattern-list)p Ft(\))630 3971 y Fu(Matc)m(hes)h +(zero)f(or)g(one)f(o)s(ccurrence)h(of)f(the)h(giv)m(en)g(patterns.)150 +4135 y Ft(*\()p Fj(pattern-list)p Ft(\))630 4245 y Fu(Matc)m(hes)h +(zero)f(or)g(more)f(o)s(ccurrences)h(of)f(the)h(giv)m(en)g(patterns.) +150 4408 y Ft(+\()p Fj(pattern-list)p Ft(\))630 4518 +y Fu(Matc)m(hes)h(one)f(or)f(more)h(o)s(ccurrences)f(of)h(the)f(giv)m +(en)i(patterns.)150 4682 y Ft(@\()p Fj(pattern-list)p +Ft(\))630 4791 y Fu(Matc)m(hes)g(one)f(of)f(the)h(giv)m(en)g(patterns.) +150 4955 y Ft(!\()p Fj(pattern-list)p Ft(\))630 5064 +y Fu(Matc)m(hes)h(an)m(ything)f(except)g(one)g(of)f(the)h(giv)m(en)g +(patterns.)275 5230 y(Complicated)41 b(extended)f(pattern)g(matc)m +(hing)h(against)h(long)f(strings)f(is)g(slo)m(w,)k(esp)s(ecially)d +(when)150 5340 y(the)29 b(patterns)g(con)m(tain)i(alternations)f(and)f +(the)g(strings)g(con)m(tain)h(m)m(ultiple)g(matc)m(hes.)42 +b(Using)29 b(separate)p eop end +%%Page: 35 41 +TeXDict begin 35 40 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(35)150 299 +y(matc)m(hes)38 b(against)g(shorter)e(strings,)i(or)f(using)f(arra)m +(ys)h(of)g(strings)f(instead)h(of)g(a)g(single)g(long)h(string,)150 +408 y(ma)m(y)31 b(b)s(e)f(faster.)150 614 y Fk(3.5.9)63 +b(Quote)41 b(Remo)m(v)-7 b(al)150 760 y Fu(After)32 b(the)g(preceding)g +(expansions,)h(all)f(unquoted)f(o)s(ccurrences)h(of)g(the)h(c)m +(haracters)g(`)p Ft(\\)p Fu(',)g(`)p Ft(')p Fu(',)f(and)g(`)p +Ft(")p Fu(')150 870 y(that)f(did)f(not)g(result)g(from)g(one)h(of)g +(the)f(ab)s(o)m(v)m(e)i(expansions)e(are)h(remo)m(v)m(ed.)150 +1120 y Fs(3.6)68 b(Redirections)150 1279 y Fu(Before)32 +b(a)f(command)f(is)h(executed,)h(its)f(input)e(and)h(output)h(ma)m(y)g +(b)s(e)f Fr(redirected)k Fu(using)c(a)i(sp)s(ecial)f(no-)150 +1389 y(tation)d(in)m(terpreted)f(b)m(y)f(the)h(shell.)40 +b(Redirection)27 b(allo)m(ws)h(commands')f(\014le)f(handles)g(to)i(b)s +(e)e(duplicated,)150 1498 y(op)s(ened,)i(closed,)i(made)e(to)h(refer)f +(to)h(di\013eren)m(t)f(\014les,)h(and)f(can)g(c)m(hange)h(the)g +(\014les)f(the)g(command)g(reads)150 1608 y(from)39 b(and)g(writes)h +(to.)69 b(Redirection)40 b(ma)m(y)g(also)h(b)s(e)e(used)g(to)h(mo)s +(dify)f(\014le)g(handles)g(in)g(the)h(curren)m(t)150 +1717 y(shell)e(execution)h(en)m(vironmen)m(t.)65 b(The)37 +b(follo)m(wing)j(redirection)f(op)s(erators)f(ma)m(y)g(precede)h(or)f +(app)s(ear)150 1827 y(an)m(ywhere)30 b(within)f(a)h(simple)f(command)h +(or)f(ma)m(y)i(follo)m(w)g(a)f(command.)40 b(Redirections)30 +b(are)g(pro)s(cessed)150 1936 y(in)g(the)h(order)f(they)g(app)s(ear,)g +(from)g(left)h(to)g(righ)m(t.)275 2077 y(Eac)m(h)45 b(redirection)h +(that)f(ma)m(y)h(b)s(e)e(preceded)g(b)m(y)h(a)h(\014le)f(descriptor)f +(n)m(um)m(b)s(er)g(ma)m(y)h(instead)h(b)s(e)150 2186 +y(preceded)41 b(b)m(y)g(a)h(w)m(ord)f(of)g(the)h(form)f +Fi({)p Fr(v)-5 b(arname)5 b Fi(})p Fu(.)74 b(In)41 b(this)g(case,)k +(for)c(eac)m(h)i(redirection)f(op)s(erator)150 2296 y(except)37 +b Ft(>)p Fu(&-)e(and)g Ft(<)p Fu(&-,)i(the)f(shell)g(will)g(allo)s +(cate)j(a)d(\014le)g(descriptor)f(greater)i(than)f(10)g(and)f(assign)h +(it)150 2406 y(to)e Fi({)p Fr(v)-5 b(arname)5 b Fi(})p +Fu(.)52 b(If)33 b Ft(>)p Fu(&-)g(or)h Ft(<)p Fu(&-)f(is)g(preceded)h(b) +m(y)f Fi({)p Fr(v)-5 b(arname)5 b Fi(})p Fu(,)36 b(the)e(v)-5 +b(alue)34 b(of)f Fr(v)-5 b(arname)39 b Fu(de\014nes)33 +b(the)150 2515 y(\014le)e(descriptor)g(to)h(close.)43 +b(If)31 b Fi({)p Fr(v)-5 b(arname)5 b Fi(})32 b Fu(is)f(supplied,)f +(the)h(redirection)g(p)s(ersists)f(b)s(ey)m(ond)h(the)g(scop)s(e)150 +2625 y(of)42 b(the)f(command,)j(allo)m(wing)f(the)f(shell)g(programmer) +f(to)h(manage)g(the)g(\014le)f(descriptor's)h(lifetime)150 +2734 y(man)m(ually)-8 b(.)275 2875 y(In)27 b(the)i(follo)m(wing)h +(descriptions,)g(if)e(the)h(\014le)g(descriptor)f(n)m(um)m(b)s(er)g(is) +g(omitted,)i(and)f(the)f(\014rst)g(c)m(har-)150 2984 +y(acter)42 b(of)f(the)g(redirection)g(op)s(erator)g(is)g(`)p +Ft(<)p Fu(',)i(the)e(redirection)g(refers)g(to)g(the)g(standard)f +(input)f(\(\014le)150 3094 y(descriptor)33 b(0\).)49 +b(If)33 b(the)g(\014rst)f(c)m(haracter)i(of)g(the)f(redirection)g(op)s +(erator)h(is)f(`)p Ft(>)p Fu(',)h(the)f(redirection)g(refers)150 +3203 y(to)e(the)g(standard)e(output)h(\(\014le)h(descriptor)f(1\).)275 +3344 y(The)h(w)m(ord)h(follo)m(wing)i(the)f(redirection)g(op)s(erator)f +(in)g(the)h(follo)m(wing)h(descriptions,)f(unless)e(other-)150 +3453 y(wise)21 b(noted,)i(is)e(sub)5 b(jected)21 b(to)h(brace)f +(expansion,)i(tilde)f(expansion,)h(parameter)e(expansion,)i(command)150 +3563 y(substitution,)31 b(arithmetic)h(expansion,)f(quote)h(remo)m(v)-5 +b(al,)33 b(\014lename)e(expansion,)g(and)f(w)m(ord)h(splitting.)150 +3672 y(If)f(it)h(expands)e(to)i(more)g(than)f(one)h(w)m(ord,)f(Bash)h +(rep)s(orts)e(an)h(error.)275 3813 y(Note)h(that)g(the)g(order)f(of)g +(redirections)h(is)g(signi\014can)m(t.)41 b(F)-8 b(or)31 +b(example,)h(the)e(command)390 3953 y Ft(ls)47 b(>)h +Fj(dirlist)d Ft(2>&1)150 4093 y Fu(directs)28 b(b)s(oth)f(standard)g +(output)g(\(\014le)h(descriptor)f(1\))i(and)e(standard)f(error)i +(\(\014le)g(descriptor)f(2\))h(to)h(the)150 4203 y(\014le)h +Fr(dirlist)p Fu(,)h(while)f(the)h(command)390 4343 y +Ft(ls)47 b(2>&1)g(>)g Fj(dirlist)150 4484 y Fu(directs)28 +b(only)f(the)h(standard)e(output)i(to)g(\014le)f Fr(dirlist)p +Fu(,)h(b)s(ecause)g(the)f(standard)g(error)g(w)m(as)h(made)f(a)h(cop)m +(y)150 4593 y(of)j(the)f(standard)g(output)g(b)s(efore)g(the)g +(standard)g(output)g(w)m(as)g(redirected)h(to)g Fr(dirlist)p +Fu(.)275 4733 y(Bash)26 b(handles)f(sev)m(eral)j(\014lenames)e(sp)s +(ecially)h(when)f(they)g(are)g(used)g(in)g(redirections,)i(as)e +(describ)s(ed)150 4843 y(in)38 b(the)h(follo)m(wing)h(table.)66 +b(If)38 b(the)h(op)s(erating)g(system)f(on)h(whic)m(h)f(Bash)h(is)f +(running)f(pro)m(vides)h(these)150 4953 y(sp)s(ecial)27 +b(\014les,)g(bash)e(will)i(use)f(them;)h(otherwise)g(it)f(will)h(em)m +(ulate)h(them)e(in)m(ternally)h(with)f(the)g(b)s(eha)m(vior)150 +5062 y(describ)s(ed)j(b)s(elo)m(w.)150 5230 y Ft(/dev/fd/)p +Fj(fd)630 5340 y Fu(If)h Fr(fd)j Fu(is)d(a)h(v)-5 b(alid)31 +b(in)m(teger,)h(\014le)e(descriptor)h Fr(fd)i Fu(is)d(duplicated.)p +eop end +%%Page: 36 42 +TeXDict begin 36 41 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(36)150 299 +y Ft(/dev/stdin)630 408 y Fu(File)32 b(descriptor)e(0)h(is)f +(duplicated.)150 577 y Ft(/dev/stdout)630 687 y Fu(File)i(descriptor)e +(1)h(is)f(duplicated.)150 856 y Ft(/dev/stderr)630 965 +y Fu(File)i(descriptor)e(2)h(is)f(duplicated.)150 1134 +y Ft(/dev/tcp/)p Fj(host)p Ft(/)p Fj(port)630 1244 y +Fu(If)41 b Fr(host)i Fu(is)f(a)g(v)-5 b(alid)41 b(hostname)h(or)f(In)m +(ternet)h(address,)i(and)c Fr(p)s(ort)j Fu(is)f(an)f(in)m(teger)i(p)s +(ort)630 1354 y(n)m(um)m(b)s(er)23 b(or)i(service)h(name,)g(Bash)f +(attempts)h(to)f(op)s(en)f(the)h(corresp)s(onding)f(TCP)g(so)s(c)m(k)m +(et.)150 1522 y Ft(/dev/udp/)p Fj(host)p Ft(/)p Fj(port)630 +1632 y Fu(If)41 b Fr(host)i Fu(is)f(a)g(v)-5 b(alid)41 +b(hostname)h(or)f(In)m(ternet)h(address,)i(and)c Fr(p)s(ort)j +Fu(is)f(an)f(in)m(teger)i(p)s(ort)630 1742 y(n)m(um)m(b)s(er)23 +b(or)h(service)h(name,)h(Bash)e(attempts)h(to)g(op)s(en)f(the)g +(corresp)s(onding)f(UDP)i(so)s(c)m(k)m(et.)275 1915 y(A)30 +b(failure)h(to)g(op)s(en)e(or)i(create)h(a)e(\014le)h(causes)g(the)f +(redirection)h(to)g(fail.)275 2059 y(Redirections)f(using)e(\014le)i +(descriptors)f(greater)h(than)f(9)h(should)e(b)s(e)h(used)f(with)h +(care,)h(as)g(they)f(ma)m(y)150 2169 y(con\015ict)i(with)f(\014le)h +(descriptors)f(the)g(shell)h(uses)f(in)m(ternally)-8 +b(.)150 2378 y Fk(3.6.1)63 b(Redirecting)40 b(Input)150 +2525 y Fu(Redirection)35 b(of)f(input)f(causes)i(the)f(\014le)g(whose)g +(name)g(results)g(from)g(the)g(expansion)g(of)g Fr(w)m(ord)k +Fu(to)d(b)s(e)150 2634 y(op)s(ened)d(for)g(reading)g(on)g(\014le)h +(descriptor)f Ft(n)p Fu(,)h(or)f(the)g(standard)g(input)f(\(\014le)i +(descriptor)f(0\))h(if)f Ft(n)g Fu(is)h(not)150 2744 +y(sp)s(eci\014ed.)275 2888 y(The)c(general)j(format)e(for)h +(redirecting)g(input)e(is:)390 3032 y Ft([)p Fj(n)p Ft(]<)p +Fj(word)150 3241 y Fk(3.6.2)63 b(Redirecting)40 b(Output)150 +3388 y Fu(Redirection)31 b(of)g(output)f(causes)h(the)f(\014le)h(whose) +f(name)g(results)h(from)e(the)i(expansion)f(of)h Fr(w)m(ord)i +Fu(to)f(b)s(e)150 3497 y(op)s(ened)d(for)g(writing)g(on)g(\014le)h +(descriptor)f Fr(n)p Fu(,)g(or)g(the)h(standard)e(output)h(\(\014le)h +(descriptor)f(1\))h(if)g Fr(n)e Fu(is)i(not)150 3607 +y(sp)s(eci\014ed.)40 b(If)30 b(the)g(\014le)h(do)s(es)f(not)h(exist)g +(it)g(is)f(created;)i(if)e(it)h(do)s(es)f(exist)h(it)g(is)g(truncated)f +(to)h(zero)g(size.)275 3751 y(The)e(general)j(format)e(for)h +(redirecting)g(output)f(is:)390 3895 y Ft([)p Fj(n)p +Ft(]>[|])p Fj(word)275 4039 y Fu(If)g(the)h(redirection)g(op)s(erator)g +(is)g(`)p Ft(>)p Fu(',)g(and)f(the)h Ft(noclobber)d Fu(option)j(to)g +(the)g Ft(set)f Fu(builtin)g(has)h(b)s(een)150 4148 y(enabled,)h(the)g +(redirection)h(will)f(fail)h(if)e(the)i(\014le)e(whose)h(name)g +(results)g(from)f(the)h(expansion)g(of)g Fr(w)m(ord)150 +4258 y Fu(exists)f(and)f(is)g(a)h(regular)g(\014le.)41 +b(If)30 b(the)h(redirection)g(op)s(erator)g(is)f(`)p +Ft(>|)p Fu(',)h(or)f(the)h(redirection)g(op)s(erator)g(is)150 +4367 y(`)p Ft(>)p Fu(')36 b(and)f(the)g Ft(noclobber)e +Fu(option)j(is)g(not)g(enabled,)h(the)e(redirection)h(is)g(attempted)g +(ev)m(en)h(if)e(the)h(\014le)150 4477 y(named)30 b(b)m(y)g +Fr(w)m(ord)k Fu(exists.)150 4686 y Fk(3.6.3)63 b(App)s(ending)42 +b(Redirected)e(Output)150 4833 y Fu(Redirection)23 b(of)e(output)h(in)f +(this)h(fashion)f(causes)h(the)g(\014le)g(whose)f(name)h(results)f +(from)g(the)h(expansion)g(of)150 4942 y Fr(w)m(ord)28 +b Fu(to)e(b)s(e)e(op)s(ened)g(for)h(app)s(ending)e(on)i(\014le)g +(descriptor)g Fr(n)p Fu(,)g(or)g(the)g(standard)f(output)h(\(\014le)g +(descriptor)150 5052 y(1\))31 b(if)f Fr(n)g Fu(is)h(not)f(sp)s +(eci\014ed.)40 b(If)30 b(the)h(\014le)f(do)s(es)g(not)h(exist)g(it)g +(is)f(created.)275 5196 y(The)f(general)j(format)e(for)h(app)s(ending)e +(output)h(is:)390 5340 y Ft([)p Fj(n)p Ft(]>>)p Fj(word)p +eop end +%%Page: 37 43 +TeXDict begin 37 42 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(37)150 299 +y Fk(3.6.4)63 b(Redirecting)40 b(Standard)h(Output)g(and)g(Standard)g +(Error)150 446 y Fu(This)33 b(construct)i(allo)m(ws)g(b)s(oth)f(the)g +(standard)g(output)f(\(\014le)i(descriptor)f(1\))h(and)f(the)g +(standard)f(error)150 555 y(output)d(\(\014le)h(descriptor)f(2\))h(to)g +(b)s(e)f(redirected)h(to)g(the)f(\014le)h(whose)f(name)h(is)f(the)g +(expansion)h(of)f Fr(w)m(ord)p Fu(.)275 712 y(There)f(are)i(t)m(w)m(o)h +(formats)e(for)h(redirecting)g(standard)e(output)h(and)g(standard)f +(error:)390 870 y Ft(&>)p Fj(word)150 1027 y Fu(and)390 +1184 y Ft(>&)p Fj(word)150 1341 y Fu(Of)h(the)g(t)m(w)m(o)i(forms,)e +(the)h(\014rst)e(is)i(preferred.)39 b(This)30 b(is)g(seman)m(tically)j +(equiv)-5 b(alen)m(t)32 b(to)390 1498 y Ft(>)p Fj(word)46 +b Ft(2>&1)275 1655 y Fu(When)41 b(using)g(the)h(second)f(form,)k +Fr(w)m(ord)f Fu(ma)m(y)e(not)g(expand)f(to)h(a)g(n)m(um)m(b)s(er)f(or)g +(`)p Ft(-)p Fu('.)75 b(If)41 b(it)h(do)s(es,)150 1764 +y(other)27 b(redirection)g(op)s(erators)f(apply)h(\(see)g(Duplicating)h +(File)f(Descriptors)h(b)s(elo)m(w\))f(for)f(compatibilit)m(y)150 +1874 y(reasons.)150 2096 y Fk(3.6.5)63 b(App)s(ending)42 +b(Standard)f(Output)g(and)g(Standard)g(Error)150 2243 +y Fu(This)33 b(construct)i(allo)m(ws)g(b)s(oth)f(the)g(standard)g +(output)f(\(\014le)i(descriptor)f(1\))h(and)f(the)g(standard)f(error) +150 2352 y(output)d(\(\014le)h(descriptor)f(2\))h(to)g(b)s(e)f(app)s +(ended)f(to)i(the)f(\014le)h(whose)f(name)g(is)h(the)f(expansion)h(of)f +Fr(w)m(ord)p Fu(.)275 2509 y(The)f(format)i(for)f(app)s(ending)f +(standard)h(output)g(and)f(standard)h(error)g(is:)390 +2666 y Ft(&>>)p Fj(word)150 2823 y Fu(This)g(is)g(seman)m(tically)j +(equiv)-5 b(alen)m(t)32 b(to)390 2980 y Ft(>>)p Fj(word)46 +b Ft(2>&1)275 3138 y Fu(\(see)31 b(Duplicating)h(File)f(Descriptors)g +(b)s(elo)m(w\).)150 3359 y Fk(3.6.6)63 b(Here)41 b(Do)s(cumen)m(ts)150 +3506 y Fu(This)26 b(t)m(yp)s(e)g(of)h(redirection)g(instructs)f(the)g +(shell)h(to)g(read)f(input)g(from)g(the)g(curren)m(t)h(source)f(un)m +(til)h(a)g(line)150 3616 y(con)m(taining)h(only)e Fr(w)m(ord)k +Fu(\(with)c(no)g(trailing)h(blanks\))f(is)g(seen.)40 +b(All)27 b(of)f(the)g(lines)h(read)f(up)f(to)i(that)g(p)s(oin)m(t)150 +3725 y(are)k(then)f(used)f(as)i(the)g(standard)e(input)h(\(or)g(\014le) +h(descriptor)f Fr(n)g Fu(if)g Fr(n)g Fu(is)g(sp)s(eci\014ed\))g(for)h +(a)f(command.)275 3883 y(The)f(format)i(of)g(here-do)s(cumen)m(ts)f +(is:)390 4040 y Ft([)p Fj(n)p Ft(]<<[)p Fq(\000)p Ft(])p +Fj(word)772 4149 y(here-document)390 4259 y(delimiter)275 +4416 y Fu(No)i(parameter)h(and)f(v)-5 b(ariable)32 b(expansion,)h +(command)f(substitution,)h(arithmetic)g(expansion,)g(or)150 +4525 y(\014lename)26 b(expansion)g(is)g(p)s(erformed)e(on)i +Fr(w)m(ord)p Fu(.)39 b(If)25 b(an)m(y)i(part)e(of)h Fr(w)m(ord)j +Fu(is)d(quoted,)i(the)e Fr(delimiter)33 b Fu(is)26 b(the)150 +4635 y(result)33 b(of)g(quote)g(remo)m(v)-5 b(al)34 b(on)f +Fr(w)m(ord)p Fu(,)g(and)f(the)h(lines)g(in)g(the)g(here-do)s(cumen)m(t) +g(are)g(not)g(expanded.)47 b(If)150 4745 y Fr(w)m(ord)26 +b Fu(is)c(unquoted,)h(all)g(lines)g(of)g(the)f(here-do)s(cumen)m(t)g +(are)h(sub)5 b(jected)22 b(to)h(parameter)g(expansion,)h(com-)150 +4854 y(mand)30 b(substitution,)g(and)g(arithmetic)h(expansion,)g(the)f +(c)m(haracter)i(sequence)f Ft(\\newline)d Fu(is)j(ignored,)150 +4964 y(and)f(`)p Ft(\\)p Fu(')g(m)m(ust)h(b)s(e)e(used)h(to)h(quote)g +(the)g(c)m(haracters)g(`)p Ft(\\)p Fu(',)g(`)p Ft($)p +Fu(',)g(and)f(`)p Ft(`)p Fu('.)275 5121 y(If)21 b(the)i(redirection)g +(op)s(erator)g(is)f(`)p Ft(<<-)p Fu(',)i(then)e(all)h(leading)g(tab)g +(c)m(haracters)h(are)e(stripp)s(ed)f(from)h(input)150 +5230 y(lines)33 b(and)f(the)h(line)h(con)m(taining)g +Fr(delimiter)p Fu(.)49 b(This)32 b(allo)m(ws)i(here-do)s(cumen)m(ts)f +(within)f(shell)i(scripts)e(to)150 5340 y(b)s(e)e(inden)m(ted)g(in)g(a) +h(natural)f(fashion.)p eop end +%%Page: 38 44 +TeXDict begin 38 43 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(38)150 299 +y Fk(3.6.7)63 b(Here)41 b(Strings)150 446 y Fu(A)30 b(v)-5 +b(arian)m(t)32 b(of)e(here)h(do)s(cumen)m(ts,)f(the)g(format)h(is:)390 +600 y Ft([)p Fj(n)p Ft(]<<<)46 b Fj(word)275 753 y Fu(The)29 +b Fr(w)m(ord)k Fu(undergo)s(es)c(tilde)i(expansion,)f(parameter)h(and)e +(v)-5 b(ariable)31 b(expansion,)f(command)g(sub-)150 +863 y(stitution,)f(arithmetic)f(expansion,)g(and)f(quote)h(remo)m(v)-5 +b(al.)41 b(Filename)29 b(expansion)e(and)f(w)m(ord)h(splitting)150 +973 y(are)35 b(not)g(p)s(erformed.)51 b(The)34 b(result)h(is)g +(supplied)e(as)i(a)f(single)i(string,)f(with)g(a)g(newline)f(app)s +(ended,)g(to)150 1082 y(the)d(command)f(on)g(its)h(standard)e(input)h +(\(or)g(\014le)h(descriptor)f Fr(n)g Fu(if)g Fr(n)g Fu(is)h(sp)s +(eci\014ed\).)150 1301 y Fk(3.6.8)63 b(Duplicating)41 +b(File)g(Descriptors)150 1448 y Fu(The)30 b(redirection)h(op)s(erator) +390 1602 y Ft([)p Fj(n)p Ft(]<&)p Fj(word)150 1755 y +Fu(is)k(used)e(to)j(duplicate)f(input)f(\014le)g(descriptors.)53 +b(If)34 b Fr(w)m(ord)k Fu(expands)c(to)h(one)g(or)g(more)g(digits,)h +(the)f(\014le)150 1865 y(descriptor)e(denoted)h(b)m(y)f +Fr(n)g Fu(is)g(made)h(to)g(b)s(e)f(a)g(cop)m(y)h(of)g(that)g(\014le)f +(descriptor.)50 b(If)33 b(the)h(digits)g(in)f Fr(w)m(ord)150 +1975 y Fu(do)c(not)h(sp)s(ecify)f(a)h(\014le)f(descriptor)g(op)s(en)g +(for)g(input,)g(a)h(redirection)g(error)f(o)s(ccurs.)40 +b(If)29 b Fr(w)m(ord)j Fu(ev)-5 b(aluates)150 2084 y(to)31 +b(`)p Ft(-)p Fu(',)g(\014le)g(descriptor)g Fr(n)f Fu(is)g(closed.)43 +b(If)30 b Fr(n)g Fu(is)g(not)h(sp)s(eci\014ed,)f(the)h(standard)f +(input)g(\(\014le)h(descriptor)f(0\))150 2194 y(is)g(used.)275 +2348 y(The)f(op)s(erator)390 2502 y Ft([)p Fj(n)p Ft(]>&)p +Fj(word)150 2655 y Fu(is)40 b(used)g(similarly)h(to)g(duplicate)f +(output)g(\014le)h(descriptors.)70 b(If)40 b Fr(n)f Fu(is)i(not)f(sp)s +(eci\014ed,)i(the)f(standard)150 2765 y(output)30 b(\(\014le)g +(descriptor)g(1\))h(is)f(used.)39 b(If)30 b(the)g(digits)h(in)e +Fr(w)m(ord)34 b Fu(do)29 b(not)i(sp)s(ecify)e(a)i(\014le)f(descriptor)g +(op)s(en)150 2875 y(for)35 b(output,)h(a)g(redirection)g(error)e(o)s +(ccurs.)55 b(If)35 b Fr(w)m(ord)j Fu(ev)-5 b(aluates)37 +b(to)f(`)p Ft(-)p Fu(',)h(\014le)e(descriptor)g Fr(n)g +Fu(is)g(closed.)150 2984 y(As)f(a)g(sp)s(ecial)h(case,)h(if)e +Fr(n)f Fu(is)h(omitted,)i(and)e Fr(w)m(ord)j Fu(do)s(es)d(not)g(expand) +f(to)i(one)f(or)g(more)g(digits)h(or)f(`)p Ft(-)p Fu(',)150 +3094 y(the)d(standard)e(output)h(and)g(standard)f(error)h(are)h +(redirected)g(as)g(describ)s(ed)e(previously)-8 b(.)150 +3312 y Fk(3.6.9)63 b(Mo)m(ving)41 b(File)h(Descriptors)150 +3459 y Fu(The)30 b(redirection)h(op)s(erator)390 3613 +y Ft([)p Fj(n)p Ft(]<&)p Fj(digit)p Ft(-)150 3767 y Fu(mo)m(v)m(es)i +(the)f(\014le)g(descriptor)f Fr(digit)k Fu(to)d(\014le)g(descriptor)g +Fr(n)p Fu(,)f(or)h(the)g(standard)f(input)f(\(\014le)j(descriptor)e +(0\))150 3876 y(if)f Fr(n)g Fu(is)h(not)f(sp)s(eci\014ed.)40 +b Fr(digit)33 b Fu(is)e(closed)g(after)g(b)s(eing)f(duplicated)g(to)h +Fr(n)p Fu(.)275 4030 y(Similarly)-8 b(,)31 b(the)f(redirection)h(op)s +(erator)390 4184 y Ft([)p Fj(n)p Ft(]>&)p Fj(digit)p +Ft(-)150 4338 y Fu(mo)m(v)m(es)e(the)g(\014le)f(descriptor)f +Fr(digit)k Fu(to)e(\014le)f(descriptor)g Fr(n)p Fu(,)g(or)g(the)g +(standard)f(output)h(\(\014le)g(descriptor)g(1\))150 +4448 y(if)i Fr(n)g Fu(is)h(not)f(sp)s(eci\014ed.)150 +4666 y Fk(3.6.10)63 b(Op)s(ening)42 b(File)g(Descriptors)g(for)g +(Reading)e(and)h(W)-10 b(riting)150 4813 y Fu(The)30 +b(redirection)h(op)s(erator)390 4967 y Ft([)p Fj(n)p +Ft(]<>)p Fj(word)150 5121 y Fu(causes)39 b(the)g(\014le)g(whose)g(name) +g(is)g(the)g(expansion)g(of)g Fr(w)m(ord)j Fu(to)d(b)s(e)g(op)s(ened)f +(for)g(b)s(oth)h(reading)g(and)150 5230 y(writing)33 +b(on)f(\014le)h(descriptor)f Fr(n)p Fu(,)h(or)g(on)f(\014le)h +(descriptor)g(0)g(if)f Fr(n)g Fu(is)h(not)g(sp)s(eci\014ed.)47 +b(If)32 b(the)h(\014le)f(do)s(es)h(not)150 5340 y(exist,)e(it)g(is)g +(created.)p eop end +%%Page: 39 45 +TeXDict begin 39 44 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(39)150 299 +y Fs(3.7)68 b(Executing)46 b(Commands)150 523 y Fk(3.7.1)63 +b(Simple)41 b(Command)h(Expansion)150 670 y Fu(When)33 +b(a)g(simple)g(command)g(is)g(executed,)h(the)g(shell)f(p)s(erforms)e +(the)i(follo)m(wing)i(expansions,)e(assign-)150 779 y(men)m(ts,)e(and)f +(redirections,)h(from)f(left)h(to)g(righ)m(t,)g(in)f(the)h(follo)m +(wing)h(order.)199 913 y(1.)61 b(The)38 b(w)m(ords)f(that)i(the)g +(parser)e(has)h(mark)m(ed)g(as)h(v)-5 b(ariable)39 b(assignmen)m(ts)g +(\(those)g(preceding)f(the)330 1023 y(command)30 b(name\))h(and)f +(redirections)h(are)f(sa)m(v)m(ed)i(for)e(later)h(pro)s(cessing.)199 +1157 y(2.)61 b(The)39 b(w)m(ords)g(that)i(are)f(not)g(v)-5 +b(ariable)40 b(assignmen)m(ts)h(or)e(redirections)i(are)f(expanded)f +(\(see)h(Sec-)330 1267 y(tion)d(3.5)i([Shell)e(Expansions],)h(page)g +(22\).)61 b(If)37 b(an)m(y)g(w)m(ords)f(remain)h(after)h(expansion,)h +(the)e(\014rst)330 1376 y(w)m(ord)31 b(is)g(tak)m(en)h(to)g(b)s(e)f +(the)g(name)h(of)f(the)h(command)f(and)f(the)i(remaining)f(w)m(ords)g +(are)g(the)h(argu-)330 1486 y(men)m(ts.)199 1620 y(3.)61 +b(Redirections)25 b(are)f(p)s(erformed)f(as)h(describ)s(ed)f(ab)s(o)m +(v)m(e)i(\(see)g(Section)g(3.6)g([Redirections],)i(page)d(35\).)199 +1754 y(4.)61 b(The)25 b(text)h(after)f(the)g(`)p Ft(=)p +Fu(')h(in)e(eac)m(h)j(v)-5 b(ariable)25 b(assignmen)m(t)h(undergo)s(es) +e(tilde)i(expansion,)g(parameter)330 1864 y(expansion,)49 +b(command)d(substitution,)j(arithmetic)d(expansion,)k(and)45 +b(quote)h(remo)m(v)-5 b(al)46 b(b)s(efore)330 1973 y(b)s(eing)30 +b(assigned)h(to)g(the)f(v)-5 b(ariable.)275 2132 y(If)32 +b(no)i(command)f(name)g(results,)h(the)g(v)-5 b(ariable)34 +b(assignmen)m(ts)g(a\013ect)h(the)f(curren)m(t)f(shell)h(en)m(viron-) +150 2242 y(men)m(t.)39 b(Otherwise,)27 b(the)e(v)-5 b(ariables)26 +b(are)g(added)f(to)h(the)f(en)m(vironmen)m(t)h(of)g(the)f(executed)h +(command)g(and)150 2351 y(do)35 b(not)f(a\013ect)j(the)d(curren)m(t)h +(shell)g(en)m(vironmen)m(t.)54 b(If)34 b(an)m(y)h(of)g(the)f(assignmen) +m(ts)i(attempts)f(to)h(assign)150 2461 y(a)j(v)-5 b(alue)39 +b(to)g(a)g(readonly)f(v)-5 b(ariable,)42 b(an)c(error)g(o)s(ccurs,)j +(and)c(the)i(command)f(exits)h(with)g(a)f(non-zero)150 +2570 y(status.)275 2705 y(If)33 b(no)g(command)g(name)h(results,)g +(redirections)g(are)g(p)s(erformed,)f(but)g(do)h(not)f(a\013ect)i(the)f +(curren)m(t)150 2814 y(shell)d(en)m(vironmen)m(t.)41 +b(A)30 b(redirection)h(error)f(causes)h(the)g(command)f(to)h(exit)g +(with)f(a)h(non-zero)g(status.)275 2948 y(If)26 b(there)i(is)f(a)h +(command)f(name)h(left)g(after)g(expansion,)g(execution)h(pro)s(ceeds)e +(as)g(describ)s(ed)f(b)s(elo)m(w.)150 3058 y(Otherwise,)39 +b(the)e(command)g(exits.)62 b(If)37 b(one)g(of)g(the)h(expansions)f +(con)m(tained)h(a)g(command)f(substitu-)150 3167 y(tion,)i(the)d(exit)h +(status)g(of)f(the)h(command)f(is)h(the)f(exit)h(status)g(of)f(the)h +(last)g(command)f(substitution)150 3277 y(p)s(erformed.)55 +b(If)35 b(there)g(w)m(ere)h(no)g(command)f(substitutions,)i(the)e +(command)h(exits)g(with)f(a)h(status)g(of)150 3387 y(zero.)150 +3585 y Fk(3.7.2)63 b(Command)41 b(Searc)m(h)f(and)h(Execution)150 +3732 y Fu(After)i(a)h(command)f(has)g(b)s(een)f(split)h(in)m(to)h(w)m +(ords,)j(if)c(it)g(results)g(in)g(a)h(simple)f(command)g(and)f(an)150 +3842 y(optional)32 b(list)f(of)f(argumen)m(ts,)h(the)g(follo)m(wing)g +(actions)h(are)f(tak)m(en.)199 3976 y(1.)61 b(If)24 b(the)g(command)g +(name)g(con)m(tains)i(no)e(slashes,)i(the)e(shell)h(attempts)g(to)g(lo) +s(cate)h(it.)39 b(If)24 b(there)g(exists)330 4085 y(a)h(shell)g +(function)f(b)m(y)g(that)h(name,)h(that)f(function)f(is)h(in)m(v)m(ok)m +(ed)h(as)e(describ)s(ed)g(in)g(Section)h(3.3)h([Shell)330 +4195 y(F)-8 b(unctions],)31 b(page)h(18.)199 4329 y(2.)61 +b(If)41 b(the)g(name)h(do)s(es)f(not)g(matc)m(h)i(a)e(function,)j(the)e +(shell)f(searc)m(hes)i(for)e(it)h(in)f(the)g(list)h(of)g(shell)330 +4439 y(builtins.)e(If)30 b(a)h(matc)m(h)g(is)f(found,)g(that)h(builtin) +f(is)g(in)m(v)m(ok)m(ed.)199 4573 y(3.)61 b(If)40 b(the)g(name)h(is)f +(neither)h(a)f(shell)h(function)f(nor)g(a)g(builtin,)j(and)d(con)m +(tains)h(no)g(slashes,)i(Bash)330 4682 y(searc)m(hes)c(eac)m(h)g +(elemen)m(t)g(of)g Ft($PATH)d Fu(for)i(a)g(directory)h(con)m(taining)g +(an)f(executable)h(\014le)f(b)m(y)g(that)330 4792 y(name.)56 +b(Bash)36 b(uses)f(a)h(hash)e(table)j(to)f(remem)m(b)s(er)f(the)h(full) +f(pathnames)g(of)h(executable)h(\014les)e(to)330 4902 +y(a)m(v)m(oid)e(m)m(ultiple)f Ft(PATH)f Fu(searc)m(hes)i(\(see)f(the)g +(description)g(of)f Ft(hash)g Fu(in)g(Section)i(4.1)f([Bourne)g(Shell) +330 5011 y(Builtins],)37 b(page)f(44\).)55 b(A)35 b(full)g(searc)m(h)g +(of)g(the)g(directories)h(in)f Ft($PATH)e Fu(is)i(p)s(erformed)f(only)h +(if)g(the)330 5121 y(command)24 b(is)h(not)g(found)e(in)i(the)g(hash)f +(table.)39 b(If)25 b(the)f(searc)m(h)i(is)e(unsuccessful,)h(the)g +(shell)g(searc)m(hes)330 5230 y(for)e(a)h(de\014ned)e(shell)h(function) +h(named)e Ft(command_not_found_handle)p Fu(.)32 b(If)23 +b(that)h(function)f(exists,)330 5340 y(it)33 b(is)f(in)m(v)m(ok)m(ed)i +(in)e(a)h(separate)h(execution)f(en)m(vironmen)m(t)g(with)f(the)h +(original)h(command)e(and)g(the)p eop end +%%Page: 40 46 +TeXDict begin 40 45 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(40)330 299 +y(original)26 b(command's)e(argumen)m(ts)h(as)g(its)g(argumen)m(ts,)h +(and)e(the)h(function's)f(exit)i(status)f(b)s(ecomes)330 +408 y(the)j(exit)g(status)g(of)f(that)h(subshell.)39 +b(If)27 b(that)h(function)f(is)h(not)g(de\014ned,)f(the)g(shell)h(prin) +m(ts)f(an)g(error)330 518 y(message)k(and)f(returns)f(an)i(exit)g +(status)g(of)f(127.)199 654 y(4.)61 b(If)33 b(the)g(searc)m(h)h(is)g +(successful,)g(or)f(if)g(the)h(command)f(name)g(con)m(tains)i(one)f(or) +f(more)g(slashes,)i(the)330 763 y(shell)g(executes)h(the)f(named)f +(program)g(in)h(a)g(separate)h(execution)f(en)m(vironmen)m(t.)55 +b(Argumen)m(t)35 b(0)330 873 y(is)30 b(set)h(to)h(the)e(name)h(giv)m +(en,)g(and)f(the)h(remaining)f(argumen)m(ts)h(to)g(the)g(command)f(are) +h(set)g(to)g(the)330 983 y(argumen)m(ts)g(supplied,)e(if)h(an)m(y)-8 +b(.)199 1118 y(5.)61 b(If)35 b(this)h(execution)h(fails)f(b)s(ecause)g +(the)f(\014le)h(is)g(not)g(in)f(executable)j(format,)f(and)e(the)h +(\014le)g(is)g(not)330 1228 y(a)d(directory)-8 b(,)34 +b(it)f(is)g(assumed)e(to)j(b)s(e)d(a)i Fr(shell)g(script)h +Fu(and)e(the)h(shell)f(executes)i(it)f(as)g(describ)s(ed)e(in)330 +1338 y(Section)g(3.8)h([Shell)e(Scripts],)g(page)i(42.)199 +1473 y(6.)61 b(If)38 b(the)h(command)f(w)m(as)h(not)g(b)s(egun)e(async) +m(hronously)-8 b(,)42 b(the)c(shell)h(w)m(aits)h(for)e(the)h(command)f +(to)330 1583 y(complete)32 b(and)e(collects)i(its)f(exit)g(status.)150 +1785 y Fk(3.7.3)63 b(Command)41 b(Execution)f(En)m(vironmen)m(t)150 +1932 y Fu(The)30 b(shell)g(has)h(an)f Fr(execution)h(en)m(vironmen)m(t) +p Fu(,)h(whic)m(h)e(consists)h(of)f(the)h(follo)m(wing:)225 +2069 y Fq(\017)60 b Fu(op)s(en)32 b(\014les)g(inherited)g(b)m(y)h(the)f +(shell)h(at)g(in)m(v)m(o)s(cation,)j(as)c(mo)s(di\014ed)g(b)m(y)g +(redirections)h(supplied)e(to)330 2178 y(the)g Ft(exec)e +Fu(builtin)225 2314 y Fq(\017)60 b Fu(the)28 b(curren)m(t)g(w)m(orking) +h(directory)g(as)f(set)h(b)m(y)f Ft(cd)p Fu(,)g Ft(pushd)p +Fu(,)g(or)g Ft(popd)p Fu(,)g(or)g(inherited)g(b)m(y)g(the)h(shell)f(at) +330 2424 y(in)m(v)m(o)s(cation)225 2560 y Fq(\017)60 +b Fu(the)31 b(\014le)f(creation)i(mo)s(de)e(mask)g(as)h(set)g(b)m(y)f +Ft(umask)f Fu(or)h(inherited)g(from)g(the)h(shell's)f(paren)m(t)225 +2695 y Fq(\017)60 b Fu(curren)m(t)30 b(traps)g(set)h(b)m(y)f +Ft(trap)225 2831 y Fq(\017)60 b Fu(shell)30 b(parameters)f(that)h(are)g +(set)g(b)m(y)g(v)-5 b(ariable)30 b(assignmen)m(t)g(or)g(with)f +Ft(set)f Fu(or)i(inherited)f(from)g(the)330 2941 y(shell's)i(paren)m(t) +f(in)g(the)h(en)m(vironmen)m(t)225 3077 y Fq(\017)60 +b Fu(shell)44 b(functions)f(de\014ned)f(during)h(execution)i(or)e +(inherited)h(from)f(the)h(shell's)g(paren)m(t)f(in)h(the)330 +3186 y(en)m(vironmen)m(t)225 3322 y Fq(\017)60 b Fu(options)33 +b(enabled)g(at)h(in)m(v)m(o)s(cation)h(\(either)f(b)m(y)f(default)g(or) +g(with)g(command-line)g(argumen)m(ts\))h(or)330 3432 +y(b)m(y)c Ft(set)225 3567 y Fq(\017)60 b Fu(options)31 +b(enabled)f(b)m(y)g Ft(shopt)f Fu(\(see)j(Section)f(4.3.2)h([The)e +(Shopt)g(Builtin],)h(page)g(66\))225 3703 y Fq(\017)60 +b Fu(shell)31 b(aliases)g(de\014ned)f(with)g Ft(alias)f +Fu(\(see)i(Section)g(6.6)h([Aliases],)g(page)f(94\))225 +3839 y Fq(\017)60 b Fu(v)-5 b(arious)50 b(pro)s(cess)f +Fm(id)p Fu(s,)55 b(including)49 b(those)i(of)e(bac)m(kground)h(jobs)f +(\(see)i(Section)g(3.2.4)g([Lists],)330 3948 y(page)31 +b(9\),)g(the)g(v)-5 b(alue)31 b(of)f Ft($$)p Fu(,)g(and)g(the)h(v)-5 +b(alue)31 b(of)f Ft($PPID)275 4112 y Fu(When)k(a)g(simple)h(command)f +(other)g(than)g(a)h(builtin)f(or)g(shell)h(function)f(is)g(to)h(b)s(e)f +(executed,)i(it)f(is)150 4221 y(in)m(v)m(ok)m(ed)25 b(in)f(a)g +(separate)h(execution)g(en)m(vironmen)m(t)g(that)f(consists)g(of)h(the) +f(follo)m(wing.)40 b(Unless)24 b(otherwise)150 4331 y(noted,)31 +b(the)f(v)-5 b(alues)31 b(are)g(inherited)f(from)g(the)g(shell.)225 +4468 y Fq(\017)60 b Fu(the)31 b(shell's)h(op)s(en)e(\014les,)i(plus)e +(an)m(y)h(mo)s(di\014cations)h(and)e(additions)h(sp)s(eci\014ed)g(b)m +(y)g(redirections)g(to)330 4578 y(the)g(command)225 4713 +y Fq(\017)60 b Fu(the)31 b(curren)m(t)f(w)m(orking)g(directory)225 +4849 y Fq(\017)60 b Fu(the)31 b(\014le)f(creation)i(mo)s(de)e(mask)225 +4985 y Fq(\017)60 b Fu(shell)32 b(v)-5 b(ariables)33 +b(and)e(functions)h(mark)m(ed)g(for)g(exp)s(ort,)g(along)h(with)f(v)-5 +b(ariables)32 b(exp)s(orted)g(for)g(the)330 5095 y(command,)e(passed)g +(in)g(the)h(en)m(vironmen)m(t)g(\(see)g(Section)g(3.7.4)i([En)m +(vironmen)m(t],)e(page)g(41\))225 5230 y Fq(\017)60 b +Fu(traps)31 b(caugh)m(t)h(b)m(y)f(the)g(shell)h(are)f(reset)h(to)g(the) +f(v)-5 b(alues)32 b(inherited)e(from)h(the)g(shell's)h(paren)m(t,)g +(and)330 5340 y(traps)e(ignored)h(b)m(y)f(the)g(shell)h(are)g(ignored)p +eop end +%%Page: 41 47 +TeXDict begin 41 46 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(41)275 299 +y(A)41 b(command)g(in)m(v)m(ok)m(ed)i(in)e(this)h(separate)g(en)m +(vironmen)m(t)g(cannot)g(a\013ect)h(the)f(shell's)g(execution)150 +408 y(en)m(vironmen)m(t.)275 552 y(Command)35 b(substitution,)j +(commands)e(group)s(ed)f(with)i(paren)m(theses,)h(and)e(async)m +(hronous)g(com-)150 662 y(mands)c(are)h(in)m(v)m(ok)m(ed)i(in)d(a)i +(subshell)e(en)m(vironmen)m(t)h(that)h(is)f(a)g(duplicate)h(of)f(the)g +(shell)g(en)m(vironmen)m(t,)150 772 y(except)i(that)g(traps)f(caugh)m +(t)h(b)m(y)f(the)h(shell)f(are)g(reset)h(to)g(the)f(v)-5 +b(alues)35 b(that)g(the)f(shell)h(inherited)e(from)150 +881 y(its)g(paren)m(t)f(at)h(in)m(v)m(o)s(cation.)49 +b(Builtin)32 b(commands)g(that)h(are)g(in)m(v)m(ok)m(ed)h(as)e(part)g +(of)h(a)f(pip)s(eline)g(are)h(also)150 991 y(executed)41 +b(in)f(a)h(subshell)e(en)m(vironmen)m(t.)72 b(Changes)40 +b(made)g(to)h(the)g(subshell)e(en)m(vironmen)m(t)i(cannot)150 +1100 y(a\013ect)32 b(the)f(shell's)f(execution)i(en)m(vironmen)m(t.)275 +1244 y(Subshells)c(spa)m(wned)i(to)h(execute)g(command)f(substitutions) +g(inherit)g(the)g(v)-5 b(alue)31 b(of)f(the)h Ft(-e)e +Fu(option)150 1354 y(from)23 b(the)i(paren)m(t)f(shell.)38 +b(When)24 b(not)g(in)g Fm(posix)f Fu(mo)s(de,)i(Bash)f(clears)h(the)f +Ft(-e)f Fu(option)i(in)e(suc)m(h)h(subshells.)275 1498 +y(If)f(a)h(command)g(is)g(follo)m(w)m(ed)h(b)m(y)f(a)g(`)p +Ft(&)p Fu(')g(and)f(job)h(con)m(trol)h(is)f(not)g(activ)m(e,)k(the)c +(default)g(standard)f(input)150 1607 y(for)35 b(the)g(command)g(is)g +(the)g(empt)m(y)h(\014le)f Ft(/dev/null)p Fu(.)52 b(Otherwise,)37 +b(the)e(in)m(v)m(ok)m(ed)h(command)f(inherits)150 1717 +y(the)c(\014le)f(descriptors)g(of)h(the)f(calling)i(shell)f(as)f(mo)s +(di\014ed)g(b)m(y)g(redirections.)150 1926 y Fk(3.7.4)63 +b(En)m(vironmen)m(t)150 2073 y Fu(When)29 b(a)g(program)f(is)h(in)m(v)m +(ok)m(ed)h(it)g(is)f(giv)m(en)g(an)g(arra)m(y)g(of)g(strings)g(called)h +(the)f Fr(en)m(vironmen)m(t)p Fu(.)41 b(This)28 b(is)h(a)150 +2182 y(list)i(of)g(name-v)-5 b(alue)31 b(pairs,)f(of)h(the)f(form)g +Ft(name=value)p Fu(.)275 2326 y(Bash)39 b(pro)m(vides)g(sev)m(eral)i(w) +m(a)m(ys)g(to)f(manipulate)f(the)h(en)m(vironmen)m(t.)69 +b(On)38 b(in)m(v)m(o)s(cation,)44 b(the)c(shell)150 2436 +y(scans)g(its)h(o)m(wn)f(en)m(vironmen)m(t)h(and)f(creates)i(a)f +(parameter)f(for)g(eac)m(h)i(name)e(found,)i(automatically)150 +2545 y(marking)26 b(it)g(for)g Fr(exp)s(ort)h Fu(to)g(c)m(hild)f(pro)s +(cesses.)39 b(Executed)26 b(commands)g(inherit)g(the)g(en)m(vironmen)m +(t.)39 b(The)150 2655 y Ft(export)c Fu(and)i(`)p Ft(declare)29 +b(-x)p Fu(')36 b(commands)h(allo)m(w)i(parameters)e(and)g(functions)g +(to)h(b)s(e)e(added)h(to)h(and)150 2765 y(deleted)21 +b(from)f(the)h(en)m(vironmen)m(t.)38 b(If)20 b(the)h(v)-5 +b(alue)21 b(of)g(a)g(parameter)g(in)f(the)g(en)m(vironmen)m(t)i(is)e +(mo)s(di\014ed,)i(the)150 2874 y(new)31 b(v)-5 b(alue)32 +b(b)s(ecomes)f(part)h(of)f(the)h(en)m(vironmen)m(t,)g(replacing)h(the)e +(old.)44 b(The)31 b(en)m(vironmen)m(t)h(inherited)150 +2984 y(b)m(y)f(an)m(y)g(executed)h(command)f(consists)g(of)g(the)g +(shell's)h(initial)g(en)m(vironmen)m(t,)g(whose)f(v)-5 +b(alues)31 b(ma)m(y)h(b)s(e)150 3093 y(mo)s(di\014ed)26 +b(in)g(the)h(shell,)h(less)f(an)m(y)g(pairs)f(remo)m(v)m(ed)i(b)m(y)f +(the)g Ft(unset)e Fu(and)h(`)p Ft(export)j(-n)p Fu(')e(commands,)g +(plus)150 3203 y(an)m(y)k(additions)f(via)h(the)g Ft(export)d +Fu(and)i(`)p Ft(declare)f(-x)p Fu(')h(commands.)275 3347 +y(The)j(en)m(vironmen)m(t)i(for)f(an)m(y)g(simple)h(command)f(or)g +(function)g(ma)m(y)g(b)s(e)g(augmen)m(ted)h(temp)s(orarily)150 +3457 y(b)m(y)c(pre\014xing)e(it)i(with)g(parameter)g(assignmen)m(ts,)h +(as)e(describ)s(ed)g(in)g(Section)i(3.4)g([Shell)e(P)m(arameters],)150 +3566 y(page)g(20.)41 b(These)29 b(assignmen)m(t)i(statemen)m(ts)g +(a\013ect)f(only)g(the)f(en)m(vironmen)m(t)h(seen)g(b)m(y)f(that)h +(command.)275 3710 y(If)g(the)h Ft(-k)g Fu(option)g(is)g(set)h(\(see)g +(Section)g(4.3.1)g([The)f(Set)g(Builtin],)h(page)g(62\),)h(then)e(all)g +(parameter)150 3820 y(assignmen)m(ts)f(are)g(placed)h(in)e(the)h(en)m +(vironmen)m(t)g(for)g(a)g(command,)f(not)h(just)f(those)i(that)f +(precede)g(the)150 3929 y(command)g(name.)275 4073 y(When)h(Bash)h(in)m +(v)m(ok)m(es)i(an)e(external)h(command,)f(the)g(v)-5 +b(ariable)33 b(`)p Ft($_)p Fu(')f(is)g(set)h(to)f(the)g(full)g +(pathname)150 4183 y(of)f(the)f(command)g(and)g(passed)g(to)h(that)g +(command)f(in)g(its)h(en)m(vironmen)m(t.)150 4392 y Fk(3.7.5)63 +b(Exit)40 b(Status)150 4538 y Fu(The)26 b(exit)h(status)f(of)g(an)g +(executed)h(command)f(is)g(the)h(v)-5 b(alue)26 b(returned)f(b)m(y)h +(the)g Fr(w)m(aitpid)k Fu(system)d(call)g(or)150 4648 +y(equiv)-5 b(alen)m(t)33 b(function.)45 b(Exit)32 b(statuses)g(fall)g +(b)s(et)m(w)m(een)h(0)f(and)f(255,)i(though,)f(as)g(explained)g(b)s +(elo)m(w,)h(the)150 4758 y(shell)i(ma)m(y)g(use)f(v)-5 +b(alues)35 b(ab)s(o)m(v)m(e)g(125)h(sp)s(ecially)-8 b(.)54 +b(Exit)35 b(statuses)g(from)f(shell)h(builtins)f(and)f(comp)s(ound)150 +4867 y(commands)j(are)g(also)h(limited)g(to)g(this)f(range.)58 +b(Under)36 b(certain)h(circumstances,)h(the)e(shell)h(will)f(use)150 +4977 y(sp)s(ecial)31 b(v)-5 b(alues)31 b(to)g(indicate)g(sp)s(eci\014c) +f(failure)h(mo)s(des.)275 5121 y(F)-8 b(or)32 b(the)g(shell's)g(purp)s +(oses,)e(a)j(command)e(whic)m(h)h(exits)g(with)g(a)g(zero)g(exit)h +(status)f(has)f(succeeded.)150 5230 y(A)e(non-zero)h(exit)g(status)g +(indicates)g(failure.)40 b(This)28 b(seemingly)i(coun)m(ter-in)m +(tuitiv)m(e)i(sc)m(heme)e(is)f(used)g(so)150 5340 y(there)34 +b(is)g(one)g(w)m(ell-de\014ned)g(w)m(a)m(y)g(to)h(indicate)g(success)f +(and)f(a)h(v)-5 b(ariet)m(y)35 b(of)f(w)m(a)m(ys)h(to)f(indicate)h(v)-5 +b(arious)p eop end +%%Page: 42 48 +TeXDict begin 42 47 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(42)150 299 +y(failure)38 b(mo)s(des.)62 b(When)37 b(a)h(command)f(terminates)i(on)e +(a)h(fatal)h(signal)g(whose)e(n)m(um)m(b)s(er)f(is)i +Fr(N)p Fu(,)i(Bash)150 408 y(uses)30 b(the)g(v)-5 b(alue)31 +b(128)p Ft(+)p Fr(N)42 b Fu(as)30 b(the)h(exit)g(status.)275 +537 y(If)k(a)h(command)g(is)g(not)g(found,)g(the)g(c)m(hild)h(pro)s +(cess)e(created)i(to)g(execute)g(it)g(returns)d(a)j(status)f(of)150 +647 y(127.)42 b(If)30 b(a)h(command)f(is)g(found)f(but)h(is)g(not)h +(executable,)h(the)f(return)e(status)i(is)f(126.)275 +776 y(If)i(a)i(command)f(fails)g(b)s(ecause)g(of)h(an)f(error)f(during) +g(expansion)h(or)g(redirection,)i(the)f(exit)g(status)150 +885 y(is)c(greater)i(than)e(zero.)275 1014 y(The)38 b(exit)h(status)g +(is)g(used)f(b)m(y)g(the)h(Bash)g(conditional)h(commands)e(\(see)h +(Section)h(3.2.5.2)h([Con-)150 1123 y(ditional)i(Constructs],)h(page)f +(11\))g(and)e(some)i(of)f(the)g(list)g(constructs)g(\(see)h(Section)f +(3.2.4)i([Lists],)150 1233 y(page)31 b(9\).)275 1362 +y(All)40 b(of)g(the)h(Bash)f(builtins)f(return)g(an)h(exit)h(status)g +(of)f(zero)h(if)f(they)g(succeed)g(and)g(a)g(non-zero)150 +1471 y(status)34 b(on)f(failure,)i(so)f(they)g(ma)m(y)g(b)s(e)f(used)g +(b)m(y)g(the)h(conditional)h(and)e(list)h(constructs.)50 +b(All)35 b(builtins)150 1581 y(return)e(an)i(exit)g(status)g(of)f(2)h +(to)g(indicate)h(incorrect)f(usage,)h(generally)g(in)m(v)-5 +b(alid)35 b(options)g(or)f(missing)150 1691 y(argumen)m(ts.)150 +1878 y Fk(3.7.6)63 b(Signals)150 2025 y Fu(When)36 b(Bash)g(is)h(in)m +(teractiv)m(e,)j(in)c(the)h(absence)f(of)h(an)m(y)f(traps,)i(it)e +(ignores)h Ft(SIGTERM)d Fu(\(so)j(that)g(`)p Ft(kill)150 +2135 y(0)p Fu(')c(do)s(es)g(not)g(kill)g(an)g(in)m(teractiv)m(e)j +(shell\),)f(and)d Ft(SIGINT)f Fu(is)i(caugh)m(t)h(and)f(handled)f(\(so) +h(that)h(the)f Ft(wait)150 2244 y Fu(builtin)24 b(is)h(in)m +(terruptible\).)39 b(When)24 b(Bash)g(receiv)m(es)j(a)d +Ft(SIGINT)p Fu(,)h(it)g(breaks)f(out)h(of)f(an)m(y)h(executing)h(lo)s +(ops.)150 2354 y(In)31 b(all)h(cases,)h(Bash)f(ignores)g +Ft(SIGQUIT)p Fu(.)42 b(If)32 b(job)f(con)m(trol)i(is)e(in)h(e\013ect)h +(\(see)f(Chapter)f(7)h([Job)g(Con)m(trol],)150 2464 y(page)f(107\),)h +(Bash)f(ignores)g Ft(SIGTTIN)p Fu(,)d Ft(SIGTTOU)p Fu(,)h(and)h +Ft(SIGTSTP)p Fu(.)275 2592 y(Non-builtin)h(commands)g(started)g(b)m(y)g +(Bash)h(ha)m(v)m(e)g(signal)g(handlers)e(set)i(to)g(the)g(v)-5 +b(alues)31 b(inherited)150 2702 y(b)m(y)37 b(the)h(shell)g(from)f(its)h +(paren)m(t.)62 b(When)38 b(job)f(con)m(trol)i(is)e(not)h(in)f +(e\013ect,)k(async)m(hronous)c(commands)150 2812 y(ignore)f +Ft(SIGINT)e Fu(and)h Ft(SIGQUIT)e Fu(in)j(addition)f(to)i(these)f +(inherited)f(handlers.)55 b(Commands)35 b(run)f(as)i(a)150 +2921 y(result)27 b(of)h(command)f(substitution)h(ignore)g(the)g(k)m +(eyb)s(oard-generated)g(job)g(con)m(trol)h(signals)f +Ft(SIGTTIN)p Fu(,)150 3031 y Ft(SIGTTOU)p Fu(,)h(and)g +Ft(SIGTSTP)p Fu(.)275 3160 y(The)h(shell)i(exits)g(b)m(y)f(default)g +(up)s(on)f(receipt)i(of)f(a)h Ft(SIGHUP)p Fu(.)42 b(Before)32 +b(exiting,)h(an)e(in)m(teractiv)m(e)j(shell)150 3269 +y(resends)41 b(the)i Ft(SIGHUP)e Fu(to)i(all)g(jobs,)i(running)c(or)h +(stopp)s(ed.)76 b(Stopp)s(ed)41 b(jobs)h(are)h(sen)m(t)g +Ft(SIGCONT)d Fu(to)150 3379 y(ensure)32 b(that)h(they)g(receiv)m(e)i +(the)e Ft(SIGHUP)p Fu(.)47 b(T)-8 b(o)33 b(prev)m(en)m(t)g(the)g(shell) +g(from)g(sending)f(the)h Ft(SIGHUP)e Fu(signal)150 3488 +y(to)i(a)g(particular)g(job,)g(it)g(should)f(b)s(e)g(remo)m(v)m(ed)h +(from)g(the)f(jobs)g(table)i(with)e(the)h Ft(disown)e +Fu(builtin)h(\(see)150 3598 y(Section)c(7.2)g([Job)e(Con)m(trol)i +(Builtins],)g(page)g(108\))h(or)e(mark)m(ed)g(to)g(not)g(receiv)m(e)i +Ft(SIGHUP)c Fu(using)i Ft(disown)150 3707 y(-h)p Fu(.)275 +3836 y(If)38 b(the)h Ft(huponexit)e Fu(shell)i(option)g(has)g(b)s(een)f +(set)i(with)f Ft(shopt)e Fu(\(see)j(Section)g(4.3.2)h([The)e(Shopt)150 +3946 y(Builtin],)31 b(page)g(66\),)h(Bash)f(sends)e(a)i +Ft(SIGHUP)e Fu(to)i(all)g(jobs)f(when)f(an)i(in)m(teractiv)m(e)i(login) +e(shell)g(exits.)275 4075 y(If)38 b(Bash)h(is)g(w)m(aiting)h(for)f(a)g +(command)f(to)i(complete)g(and)e(receiv)m(es)j(a)e(signal)h(for)e(whic) +m(h)h(a)g(trap)150 4184 y(has)c(b)s(een)f(set,)i(the)f(trap)g(will)g +(not)g(b)s(e)f(executed)i(un)m(til)f(the)g(command)f(completes.)55 +b(When)35 b(Bash)g(is)150 4294 y(w)m(aiting)j(for)f(an)g(async)m +(hronous)g(command)g(via)h(the)f Ft(wait)f Fu(builtin,)i(the)g +(reception)g(of)f(a)g(signal)h(for)150 4403 y(whic)m(h)d(a)g(trap)g +(has)g(b)s(een)f(set)h(will)h(cause)f(the)g Ft(wait)f +Fu(builtin)h(to)g(return)f(immediately)i(with)f(an)g(exit)150 +4513 y(status)c(greater)g(than)f(128,)i(immediately)g(after)f(whic)m(h) +f(the)h(trap)f(is)g(executed.)150 4742 y Fs(3.8)68 b(Shell)45 +b(Scripts)150 4902 y Fu(A)30 b(shell)f(script)h(is)f(a)h(text)h(\014le) +f(con)m(taining)h(shell)f(commands.)40 b(When)29 b(suc)m(h)g(a)h +(\014le)g(is)f(used)g(as)h(the)g(\014rst)150 5011 y(non-option)c +(argumen)m(t)h(when)e(in)m(v)m(oking)i(Bash,)g(and)f(neither)g(the)g +Ft(-c)g Fu(nor)f Ft(-s)h Fu(option)g(is)g(supplied)f(\(see)150 +5121 y(Section)39 b(6.1)g([In)m(v)m(oking)g(Bash],)h(page)f(86\),)i +(Bash)d(reads)g(and)f(executes)i(commands)f(from)f(the)i(\014le,)150 +5230 y(then)32 b(exits.)46 b(This)32 b(mo)s(de)f(of)i(op)s(eration)f +(creates)i(a)e(non-in)m(teractiv)m(e)j(shell.)46 b(The)31 +b(shell)i(\014rst)e(searc)m(hes)150 5340 y(for)d(the)g(\014le)g(in)g +(the)g(curren)m(t)f(directory)-8 b(,)30 b(and)d(lo)s(oks)i(in)e(the)i +(directories)g(in)e Ft($PATH)g Fu(if)h(not)g(found)e(there.)p +eop end +%%Page: 43 49 +TeXDict begin 43 48 bop 150 -116 a Fu(Chapter)30 b(3:)41 +b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(43)275 299 +y(When)34 b(Bash)h(runs)e(a)i(shell)g(script,)g(it)h(sets)f(the)f(sp)s +(ecial)i(parameter)f Ft(0)f Fu(to)h(the)g(name)g(of)g(the)g(\014le,)150 +408 y(rather)k(than)g(the)h(name)f(of)h(the)f(shell,)j(and)d(the)h(p)s +(ositional)g(parameters)f(are)h(set)g(to)g(the)g(remain-)150 +518 y(ing)f(argumen)m(ts,)j(if)d(an)m(y)g(are)g(giv)m(en.)67 +b(If)39 b(no)g(additional)g(argumen)m(ts)h(are)f(supplied,)h(the)f(p)s +(ositional)150 628 y(parameters)31 b(are)f(unset.)275 +762 y(A)39 b(shell)h(script)f(ma)m(y)h(b)s(e)f(made)h(executable)h(b)m +(y)e(using)g(the)h Ft(chmod)e Fu(command)h(to)h(turn)e(on)i(the)150 +872 y(execute)j(bit.)73 b(When)41 b(Bash)g(\014nds)e(suc)m(h)i(a)h +(\014le)f(while)g(searc)m(hing)h(the)f Ft($PATH)f Fu(for)h(a)h +(command,)h(it)150 981 y(spa)m(wns)30 b(a)g(subshell)g(to)h(execute)h +(it.)41 b(In)30 b(other)g(w)m(ords,)g(executing)390 1116 +y Ft(filename)46 b Fj(arguments)150 1250 y Fu(is)30 b(equiv)-5 +b(alen)m(t)32 b(to)f(executing)390 1385 y Ft(bash)47 +b(filename)e Fj(arguments)150 1519 y Fu(if)30 b Ft(filename)d +Fu(is)j(an)f(executable)j(shell)e(script.)40 b(This)29 +b(subshell)g(reinitializes)i(itself,)g(so)f(that)h(the)e(e\013ect)150 +1629 y(is)36 b(as)h(if)g(a)f(new)g(shell)h(had)f(b)s(een)g(in)m(v)m(ok) +m(ed)h(to)h(in)m(terpret)e(the)h(script,)h(with)e(the)h(exception)h +(that)f(the)150 1738 y(lo)s(cations)25 b(of)g(commands)e(remem)m(b)s +(ered)h(b)m(y)g(the)g(paren)m(t)g(\(see)h(the)f(description)g(of)g +Ft(hash)f Fu(in)h(Section)h(4.1)150 1848 y([Bourne)30 +b(Shell)h(Builtins],)g(page)g(44\))h(are)e(retained)h(b)m(y)f(the)h(c)m +(hild.)275 1983 y(Most)36 b(v)m(ersions)g(of)g(Unix)f(mak)m(e)h(this)g +(a)g(part)f(of)h(the)g(op)s(erating)g(system's)f(command)h(execution) +150 2092 y(mec)m(hanism.)50 b(If)33 b(the)g(\014rst)g(line)h(of)f(a)h +(script)f(b)s(egins)g(with)g(the)g(t)m(w)m(o)i(c)m(haracters)g(`)p +Ft(#!)p Fu(',)f(the)g(remainder)150 2202 y(of)27 b(the)g(line)g(sp)s +(eci\014es)g(an)g(in)m(terpreter)g(for)g(the)g(program)g(and,)g(dep)s +(ending)e(on)i(the)g(op)s(erating)h(system,)150 2311 +y(one)e(or)g(more)g(optional)h(argumen)m(ts)f(for)g(that)g(in)m +(terpreter.)40 b(Th)m(us,)26 b(y)m(ou)g(can)g(sp)s(ecify)g(Bash,)h +Ft(awk)p Fu(,)f(P)m(erl,)150 2421 y(or)k(some)h(other)g(in)m(terpreter) +g(and)e(write)i(the)f(rest)h(of)g(the)f(script)g(\014le)h(in)f(that)h +(language.)275 2555 y(The)k(argumen)m(ts)h(to)h(the)f(in)m(terpreter)h +(consist)f(of)h(one)f(or)g(more)g(optional)h(argumen)m(ts)f(follo)m +(wing)150 2665 y(the)e(in)m(terpreter)g(name)g(on)g(the)g(\014rst)g +(line)g(of)g(the)g(script)g(\014le,)h(follo)m(w)m(ed)h(b)m(y)e(the)g +(name)g(of)g(the)g(script)150 2775 y(\014le,)k(follo)m(w)m(ed)g(b)m(y)e +(the)g(rest)g(of)g(the)h(argumen)m(ts)f(supplied)f(to)i(the)f(script.) +58 b(The)35 b(details)i(of)g(ho)m(w)f(the)150 2884 y(in)m(terpreter)26 +b(line)g(is)g(split)g(in)m(to)h(an)f(in)m(terpreter)g(name)g(and)f(a)h +(set)h(of)e(argumen)m(ts)i(v)-5 b(ary)25 b(across)i(systems.)150 +2994 y(Bash)j(will)f(p)s(erform)g(this)g(action)i(on)e(op)s(erating)h +(systems)g(that)g(do)f(not)h(handle)f(it)h(themselv)m(es.)42 +b(Note)150 3103 y(that)e(some)g(older)g(v)m(ersions)g(of)g(Unix)f +(limit)i(the)f(in)m(terpreter)g(name)g(and)f(a)h(single)g(argumen)m(t)g +(to)h(a)150 3213 y(maxim)m(um)21 b(of)g(32)h(c)m(haracters,)j(so)c +(it's)h(not)g(p)s(ortable)f(to)h(assume)e(that)i(using)f(more)g(than)g +(one)g(argumen)m(t)150 3323 y(will)31 b(w)m(ork.)275 +3457 y(Bash)h(scripts)g(often)g(b)s(egin)g(with)g Ft(#!)e(/bin/bash)g +Fu(\(assuming)i(that)h(Bash)f(has)g(b)s(een)f(installed)i(in)150 +3567 y Ft(/bin)p Fu(\),)26 b(since)h(this)f(ensures)f(that)i(Bash)f +(will)h(b)s(e)f(used)f(to)i(in)m(terpret)f(the)h(script,)g(ev)m(en)g +(if)f(it)h(is)f(executed)150 3676 y(under)h(another)h(shell.)41 +b(It's)28 b(a)h(common)g(idiom)f(to)h(use)f Ft(env)g +Fu(to)h(\014nd)e Ft(bash)g Fu(ev)m(en)i(if)f(it's)i(b)s(een)d +(installed)150 3786 y(in)h(another)g(directory:)40 b +Ft(#!/usr/bin/env)27 b(bash)f Fu(will)j(\014nd)d(the)j(\014rst)e(o)s +(ccurrence)h(of)g Ft(bash)f Fu(in)h Ft($PATH)p Fu(.)p +eop end +%%Page: 44 50 +TeXDict begin 44 49 bop 3659 -116 a Fu(44)150 299 y Fp(4)80 +b(Shell)53 b(Builtin)f(Commands)150 499 y Fu(Builtin)34 +b(commands)f(are)h(con)m(tained)g(within)f(the)h(shell)g(itself.)50 +b(When)34 b(the)f(name)h(of)f(a)h(builtin)f(com-)150 +608 y(mand)26 b(is)i(used)e(as)i(the)g(\014rst)e(w)m(ord)h(of)h(a)f +(simple)h(command)f(\(see)h(Section)g(3.2.2)h([Simple)f(Commands],)150 +718 y(page)21 b(8\),)j(the)d(shell)g(executes)h(the)f(command)f +(directly)-8 b(,)24 b(without)d(in)m(v)m(oking)h(another)f(program.)37 +b(Builtin)150 828 y(commands)f(are)h(necessary)g(to)g(implemen)m(t)g +(functionalit)m(y)h(imp)s(ossible)e(or)h(incon)m(v)m(enien)m(t)h(to)f +(obtain)150 937 y(with)30 b(separate)h(utilities.)275 +1065 y(This)c(section)j(brie\015y)e(describ)s(es)g(the)h(builtins)f +(whic)m(h)g(Bash)h(inherits)f(from)g(the)h(Bourne)g(Shell,)g(as)150 +1174 y(w)m(ell)i(as)g(the)g(builtin)e(commands)h(whic)m(h)h(are)f +(unique)g(to)h(or)f(ha)m(v)m(e)i(b)s(een)d(extended)i(in)f(Bash.)275 +1302 y(Sev)m(eral)45 b(builtin)e(commands)h(are)h(describ)s(ed)e(in)h +(other)g(c)m(hapters:)69 b(builtin)43 b(commands)h(whic)m(h)150 +1412 y(pro)m(vide)23 b(the)h(Bash)f(in)m(terface)i(to)f(the)g(job)f +(con)m(trol)i(facilities)g(\(see)f(Section)h(7.2)f([Job)f(Con)m(trol)h +(Builtins],)150 1521 y(page)37 b(108\),)i(the)d(directory)g(stac)m(k)h +(\(see)g(Section)g(6.8.1)g([Directory)h(Stac)m(k)f(Builtins],)h(page)e +(97\),)j(the)150 1631 y(command)23 b(history)h(\(see)g(Section)g(9.2)h +([Bash)f(History)g(Builtins],)h(page)g(146\),)h(and)d(the)h +(programmable)150 1740 y(completion)32 b(facilities)g(\(see)g(Section)f +(8.7)g([Programmable)g(Completion)g(Builtins],)g(page)h(139\).)275 +1868 y(Man)m(y)f(of)f(the)h(builtins)e(ha)m(v)m(e)j(b)s(een)e(extended) +g(b)m(y)g Fm(posix)g Fu(or)g(Bash.)275 1996 y(Unless)20 +b(otherwise)h(noted,)h(eac)m(h)g(builtin)e(command)g(do)s(cumen)m(ted)g +(as)h(accepting)h(options)e(preceded)150 2105 y(b)m(y)42 +b(`)p Ft(-)p Fu(')g(accepts)h(`)p Ft(--)p Fu(')f(to)h(signify)f(the)g +(end)f(of)h(the)g(options.)76 b(The)41 b Ft(:)p Fu(,)k +Ft(true)p Fu(,)f Ft(false)p Fu(,)g(and)d Ft(test)p Fu(/)p +Ft([)150 2215 y Fu(builtins)32 b(do)g(not)h(accept)h(options)f(and)f +(do)g(not)h(treat)g(`)p Ft(--)p Fu(')g(sp)s(ecially)-8 +b(.)48 b(The)32 b Ft(exit)p Fu(,)g Ft(logout)p Fu(,)f +Ft(return)p Fu(,)150 2325 y Ft(break)p Fu(,)38 b Ft(continue)p +Fu(,)f Ft(let)p Fu(,)i(and)d Ft(shift)g Fu(builtins)h(accept)i(and)e +(pro)s(cess)g(argumen)m(ts)h(b)s(eginning)e(with)150 +2434 y(`)p Ft(-)p Fu(')h(without)f(requiring)g(`)p Ft(--)p +Fu('.)59 b(Other)36 b(builtins)g(that)h(accept)h(argumen)m(ts)f(but)f +(are)h(not)g(sp)s(eci\014ed)f(as)150 2544 y(accepting)28 +b(options)f(in)m(terpret)g(argumen)m(ts)g(b)s(eginning)e(with)i(`)p +Ft(-)p Fu(')f(as)h(in)m(v)-5 b(alid)27 b(options)g(and)f(require)g(`)p +Ft(--)p Fu(')150 2653 y(to)31 b(prev)m(en)m(t)g(this)f(in)m +(terpretation.)150 2880 y Fs(4.1)68 b(Bourne)45 b(Shell)g(Builtins)150 +3040 y Fu(The)22 b(follo)m(wing)j(shell)d(builtin)h(commands)f(are)h +(inherited)g(from)f(the)h(Bourne)g(Shell.)38 b(These)22 +b(commands)150 3149 y(are)31 b(implemen)m(ted)g(as)f(sp)s(eci\014ed)g +(b)m(y)g(the)h Fm(posix)e Fu(standard.)150 3295 y Ft(:)h +Fu(\(a)h(colon\))870 3405 y Ft(:)47 b([)p Fj(arguments)p +Ft(])630 3532 y Fu(Do)c(nothing)f(b)s(ey)m(ond)g(expanding)f +Fr(argumen)m(ts)46 b Fu(and)c(p)s(erforming)f(redirections.)76 +b(The)630 3642 y(return)29 b(status)i(is)f(zero.)150 +3788 y Ft(.)g Fu(\(a)h(p)s(erio)s(d\))870 3897 y Ft(.)47 +b Fj(filename)f Ft([)p Fj(arguments)p Ft(])630 4025 y +Fu(Read)34 b(and)f(execute)i(commands)e(from)g(the)h +Fr(\014lename)39 b Fu(argumen)m(t)34 b(in)f(the)h(curren)m(t)g(shell) +630 4134 y(con)m(text.)45 b(If)31 b Fr(\014lename)37 +b Fu(do)s(es)31 b(not)g(con)m(tain)i(a)e(slash,)h(the)g +Ft(PATH)e Fu(v)-5 b(ariable)32 b(is)f(used)f(to)i(\014nd)630 +4244 y Fr(\014lename)p Fu(.)52 b(When)34 b(Bash)g(is)h(not)f(in)g +Fm(posix)f Fu(mo)s(de,)i(the)g(curren)m(t)f(directory)g(is)g(searc)m +(hed)630 4354 y(if)d Fr(\014lename)36 b Fu(is)31 b(not)h(found)d(in)i +Ft($PATH)p Fu(.)41 b(If)31 b(an)m(y)g Fr(argumen)m(ts)k +Fu(are)c(supplied,)f(they)i(b)s(ecome)630 4463 y(the)e(p)s(ositional)h +(parameters)g(when)e Fr(\014lename)35 b Fu(is)30 b(executed.)42 +b(Otherwise)30 b(the)g(p)s(ositional)630 4573 y(parameters)40 +b(are)f(unc)m(hanged.)67 b(If)39 b(the)g Ft(-T)g Fu(option)g(is)h +(enabled,)h Ft(source)d Fu(inherits)h(an)m(y)630 4682 +y(trap)31 b(on)g Ft(DEBUG)p Fu(;)f(if)i(it)f(is)g(not,)h(an)m(y)g +Ft(DEBUG)e Fu(trap)h(string)g(is)g(sa)m(v)m(ed)h(and)f(restored)g +(around)630 4792 y(the)41 b(call)i(to)e Ft(source)p Fu(,)i(and)d +Ft(source)f Fu(unsets)i(the)g Ft(DEBUG)f Fu(trap)h(while)g(it)g +(executes.)74 b(If)630 4902 y Ft(-T)39 b Fu(is)g(not)h(set,)j(and)c +(the)g(sourced)h(\014le)f(c)m(hanges)i(the)e Ft(DEBUG)f +Fu(trap,)k(the)e(new)f(v)-5 b(alue)40 b(is)630 5011 y(retained)e(when)e +Ft(source)g Fu(completes.)63 b(The)37 b(return)f(status)h(is)h(the)f +(exit)i(status)e(of)h(the)630 5121 y(last)g(command)e(executed,)j(or)e +(zero)h(if)e(no)h(commands)f(are)h(executed.)61 b(If)36 +b Fr(\014lename)42 b Fu(is)630 5230 y(not)f(found,)h(or)e(cannot)h(b)s +(e)f(read,)j(the)e(return)e(status)i(is)g(non-zero.)71 +b(This)40 b(builtin)g(is)630 5340 y(equiv)-5 b(alen)m(t)32 +b(to)f Ft(source)p Fu(.)p eop end +%%Page: 45 51 +TeXDict begin 45 50 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(45)150 299 y Ft(break)870 +428 y(break)46 b([)p Fj(n)p Ft(])630 558 y Fu(Exit)f(from)f(a)g +Ft(for)p Fu(,)k Ft(while)p Fu(,)e Ft(until)p Fu(,)h(or)d +Ft(select)f Fu(lo)s(op.)83 b(If)44 b Fr(n)g Fu(is)g(supplied,)j(the)e +Fr(n)p Fu(th)630 667 y(enclosing)c(lo)s(op)f(is)h(exited.)70 +b Fr(n)40 b Fu(m)m(ust)g(b)s(e)f(greater)j(than)d(or)i(equal)f(to)h(1.) +70 b(The)40 b(return)630 777 y(status)31 b(is)f(zero)h(unless)f +Fr(n)g Fu(is)g(not)h(greater)g(than)g(or)f(equal)h(to)g(1.)150 +927 y Ft(cd)870 1056 y(cd)47 b([-L|[-P)f([-e]])g([-@])h([)p +Fj(directory)p Ft(])630 1186 y Fu(Change)27 b(the)g(curren)m(t)f(w)m +(orking)h(directory)g(to)h Fr(directory)p Fu(.)40 b(If)26 +b Fr(directory)35 b Fu(is)27 b(not)g(supplied,)630 1295 +y(the)f(v)-5 b(alue)26 b(of)f(the)h Ft(HOME)e Fu(shell)i(v)-5 +b(ariable)26 b(is)g(used.)38 b(An)m(y)25 b(additional)i(argumen)m(ts)e +(follo)m(wing)630 1405 y Fr(directory)39 b Fu(are)31 +b(ignored.)41 b(If)30 b(the)h(shell)g(v)-5 b(ariable)31 +b Ft(CDPATH)e Fu(exists,)i(it)g(is)g(used)f(as)g(a)h(searc)m(h)630 +1514 y(path:)39 b(eac)m(h)29 b(directory)g(name)f(in)f +Ft(CDPATH)g Fu(is)h(searc)m(hed)g(for)g Fr(directory)p +Fu(,)h(with)f(alternativ)m(e)630 1624 y(directory)j(names)g(in)f +Ft(CDPATH)f Fu(separated)j(b)m(y)e(a)h(colon)h(\(`)p +Ft(:)p Fu('\).)43 b(If)30 b Fr(directory)39 b Fu(b)s(egins)30 +b(with)630 1733 y(a)h(slash,)f Ft(CDPATH)f Fu(is)h(not)h(used.)630 +1863 y(The)g Ft(-P)h Fu(option)g(means)g(to)h(not)f(follo)m(w)h(sym)m +(b)s(olic)g(links:)44 b(sym)m(b)s(olic)32 b(links)g(are)g(resolv)m(ed) +630 1973 y(while)41 b Ft(cd)f Fu(is)h(tra)m(v)m(ersing)h +Fr(directory)49 b Fu(and)40 b(b)s(efore)g(pro)s(cessing)h(an)f +(instance)i(of)f(`)p Ft(..)p Fu(')f(in)630 2082 y Fr(directory)p +Fu(.)630 2212 y(By)34 b(default,)h(or)e(when)g(the)g +Ft(-L)g Fu(option)h(is)g(supplied,)f(sym)m(b)s(olic)h(links)f(in)h +Fr(directory)42 b Fu(are)630 2321 y(resolv)m(ed)31 b(after)g +Ft(cd)f Fu(pro)s(cesses)g(an)g(instance)h(of)g(`)p Ft(..)p +Fu(')f(in)g Fr(directory)p Fu(.)630 2451 y(If)35 b(`)p +Ft(..)p Fu(')f(app)s(ears)h(in)f Fr(directory)p Fu(,)j(it)f(is)f(pro)s +(cessed)f(b)m(y)h(remo)m(ving)h(the)f(immediately)h(pre-)630 +2560 y(ceding)31 b(pathname)f(comp)s(onen)m(t,)h(bac)m(k)g(to)g(a)g +(slash)f(or)h(the)f(b)s(eginning)g(of)g Fr(directory)p +Fu(.)630 2690 y(If)i(the)i Ft(-e)e Fu(option)h(is)g(supplied)f(with)g +Ft(-P)h Fu(and)f(the)h(curren)m(t)g(w)m(orking)g(directory)g(cannot)630 +2800 y(b)s(e)k(successfully)g(determined)g(after)i(a)e(successful)h +(directory)g(c)m(hange,)i Ft(cd)d Fu(will)h(return)630 +2909 y(an)30 b(unsuccessful)f(status.)630 3039 y(On)41 +b(systems)h(that)h(supp)s(ort)d(it,)46 b(the)c Ft(-@)g +Fu(option)g(presen)m(ts)g(the)g(extended)g(attributes)630 +3148 y(asso)s(ciated)32 b(with)e(a)h(\014le)f(as)h(a)f(directory)-8 +b(.)630 3278 y(If)41 b Fr(directory)49 b Fu(is)41 b(`)p +Ft(-)p Fu(',)j(it)e(is)f(con)m(v)m(erted)h(to)g Ft($OLDPWD)d +Fu(b)s(efore)i(the)g(directory)h(c)m(hange)g(is)630 3387 +y(attempted.)630 3517 y(If)33 b(a)h(non-empt)m(y)g(directory)g(name)f +(from)g Ft(CDPATH)f Fu(is)h(used,)h(or)g(if)f(`)p Ft(-)p +Fu(')h(is)f(the)h(\014rst)f(argu-)630 3626 y(men)m(t,)28 +b(and)e(the)h(directory)g(c)m(hange)h(is)f(successful,)h(the)f +(absolute)g(pathname)g(of)f(the)h(new)630 3736 y(w)m(orking)k +(directory)g(is)f(written)g(to)i(the)e(standard)g(output.)630 +3866 y(The)f(return)g(status)h(is)f(zero)i(if)e(the)h(directory)g(is)g +(successfully)g(c)m(hanged,)g(non-zero)g(oth-)630 3975 +y(erwise.)150 4125 y Ft(continue)870 4254 y(continue)46 +b([)p Fj(n)p Ft(])630 4384 y Fu(Resume)32 b(the)g(next)g(iteration)i +(of)e(an)g(enclosing)h Ft(for)p Fu(,)f Ft(while)p Fu(,)f +Ft(until)p Fu(,)g(or)h Ft(select)f Fu(lo)s(op.)630 4493 +y(If)f Fr(n)h Fu(is)g(supplied,)e(the)j(execution)g(of)f(the)g +Fr(n)p Fu(th)f(enclosing)i(lo)s(op)f(is)f(resumed.)42 +b Fr(n)30 b Fu(m)m(ust)h(b)s(e)630 4603 y(greater)39 +b(than)f(or)g(equal)g(to)h(1.)63 b(The)38 b(return)e(status)j(is)e +(zero)i(unless)e Fr(n)h Fu(is)g(not)g(greater)630 4712 +y(than)30 b(or)g(equal)h(to)g(1.)150 4862 y Ft(eval)870 +4991 y(eval)47 b([)p Fj(arguments)p Ft(])630 5121 y Fu(The)25 +b(argumen)m(ts)h(are)g(concatenated)i(together)f(in)m(to)f(a)g(single)h +(command,)f(whic)m(h)g(is)f(then)630 5230 y(read)35 b(and)g(executed,)j +(and)d(its)h(exit)g(status)g(returned)e(as)h(the)h(exit)g(status)g(of)g +Ft(eval)p Fu(.)54 b(If)630 5340 y(there)31 b(are)f(no)h(argumen)m(ts)f +(or)h(only)f(empt)m(y)h(argumen)m(ts,)g(the)f(return)g(status)g(is)h +(zero.)p eop end +%%Page: 46 52 +TeXDict begin 46 51 bop 150 -116 a Fu(Chapter)30 b(4:)h(Shell)f +(Builtin)h(Commands)2079 b(46)150 299 y Ft(exec)870 430 +y(exec)47 b([-cl])f([-a)h Fj(name)p Ft(])f([)p Fj(command)g +Ft([)p Fj(arguments)p Ft(]])630 562 y Fu(If)36 b Fr(command)k +Fu(is)c(supplied,)h(it)g(replaces)h(the)e(shell)h(without)f(creating)i +(a)f(new)f(pro)s(cess.)630 671 y(If)k(the)h Ft(-l)e Fu(option)i(is)g +(supplied,)h(the)e(shell)h(places)g(a)g(dash)f(at)h(the)f(b)s(eginning) +g(of)h(the)630 781 y(zeroth)36 b(argumen)m(t)h(passed)e(to)h +Fr(command)p Fu(.)57 b(This)35 b(is)h(what)f(the)h Ft(login)e +Fu(program)i(do)s(es.)630 891 y(The)i Ft(-c)g Fu(option)g(causes)h +Fr(command)j Fu(to)d(b)s(e)f(executed)h(with)f(an)g(empt)m(y)h(en)m +(vironmen)m(t.)630 1000 y(If)c Ft(-a)g Fu(is)h(supplied,)f(the)h(shell) +g(passes)f Fr(name)41 b Fu(as)36 b(the)f(zeroth)i(argumen)m(t)f(to)g +Fr(command)p Fu(.)630 1110 y(If)c Fr(command)j Fu(cannot)e(b)s(e)f +(executed)h(for)f(some)g(reason,)h(a)g(non-in)m(teractiv)m(e)i(shell)d +(exits,)630 1219 y(unless)27 b(the)g Ft(execfail)e Fu(shell)i(option)h +(is)f(enabled.)40 b(In)27 b(that)g(case,)j(it)d(returns)f(failure.)40 +b(An)630 1329 y(in)m(teractiv)m(e)35 b(shell)d(returns)f(failure)h(if)g +(the)g(\014le)g(cannot)h(b)s(e)e(executed.)47 b(A)32 +b(subshell)f(exits)630 1439 y(unconditionally)j(if)g +Ft(exec)f Fu(fails.)52 b(If)33 b(no)h Fr(command)j Fu(is)d(sp)s +(eci\014ed,)h(redirections)f(ma)m(y)h(b)s(e)630 1548 +y(used)30 b(to)i(a\013ect)g(the)f(curren)m(t)g(shell)g(en)m(vironmen)m +(t.)43 b(If)30 b(there)i(are)f(no)g(redirection)g(errors,)630 +1658 y(the)g(return)e(status)i(is)f(zero;)h(otherwise)g(the)g(return)e +(status)i(is)f(non-zero.)150 1811 y Ft(exit)870 1943 +y(exit)47 b([)p Fj(n)p Ft(])630 2074 y Fu(Exit)30 b(the)g(shell,)h +(returning)d(a)j(status)f(of)g Fr(n)f Fu(to)h(the)g(shell's)g(paren)m +(t.)41 b(If)30 b Fr(n)f Fu(is)h(omitted,)h(the)630 2184 +y(exit)c(status)g(is)g(that)g(of)g(the)g(last)g(command)f(executed.)41 +b(An)m(y)26 b(trap)h(on)f Ft(EXIT)f Fu(is)i(executed)630 +2293 y(b)s(efore)j(the)h(shell)f(terminates.)150 2447 +y Ft(export)870 2578 y(export)46 b([-fn])g([-p])h([)p +Fj(name)p Ft([=)p Fj(value)p Ft(]])630 2710 y Fu(Mark)40 +b(eac)m(h)h Fr(name)k Fu(to)40 b(b)s(e)f(passed)g(to)i(c)m(hild)f(pro)s +(cesses)f(in)g(the)h(en)m(vironmen)m(t.)70 b(If)39 b(the)630 +2819 y Ft(-f)33 b Fu(option)h(is)g(supplied,)f(the)h +Fr(name)5 b Fu(s)33 b(refer)g(to)i(shell)e(functions;)i(otherwise)f +(the)g(names)630 2929 y(refer)c(to)h(shell)g(v)-5 b(ariables.)41 +b(The)30 b Ft(-n)f Fu(option)i(means)f(to)h(no)f(longer)h(mark)f(eac)m +(h)i Fr(name)j Fu(for)630 3039 y(exp)s(ort.)52 b(If)33 +b(no)h Fr(names)k Fu(are)c(supplied,)g(or)g(if)g(the)g +Ft(-p)g Fu(option)g(is)g(giv)m(en,)j(a)d(list)h(of)f(names)630 +3148 y(of)d(all)h(exp)s(orted)e(v)-5 b(ariables)31 b(is)g(displa)m(y)m +(ed.)43 b(The)30 b Ft(-p)g Fu(option)i(displa)m(ys)e(output)h(in)f(a)h +(form)630 3258 y(that)25 b(ma)m(y)g(b)s(e)f(reused)g(as)h(input.)38 +b(If)24 b(a)h(v)-5 b(ariable)25 b(name)g(is)g(follo)m(w)m(ed)h(b)m(y)e +(=)p Fr(v)-5 b(alue)p Fu(,)27 b(the)d(v)-5 b(alue)630 +3367 y(of)31 b(the)f(v)-5 b(ariable)31 b(is)g(set)g(to)g +Fr(v)-5 b(alue)p Fu(.)630 3499 y(The)29 b(return)e(status)j(is)f(zero)h +(unless)e(an)h(in)m(v)-5 b(alid)29 b(option)h(is)f(supplied,)f(one)i +(of)f(the)g(names)630 3608 y(is)k(not)g(a)h(v)-5 b(alid)33 +b(shell)h(v)-5 b(ariable)33 b(name,)i(or)e Ft(-f)f Fu(is)h(supplied)f +(with)h(a)g(name)g(that)h(is)f(not)h(a)630 3718 y(shell)d(function.)150 +3871 y Ft(getopts)870 4003 y(getopts)46 b Fj(optstring)f(name)i +Ft([)p Fj(arg)f Ft(...])630 4134 y(getopts)28 b Fu(is)i(used)g(b)m(y)g +(shell)g(scripts)g(to)g(parse)g(p)s(ositional)h(parameters.)41 +b Fr(optstring)d Fu(con-)630 4244 y(tains)k(the)g(option)f(c)m +(haracters)i(to)g(b)s(e)d(recognized;)49 b(if)42 b(a)f(c)m(haracter)j +(is)d(follo)m(w)m(ed)i(b)m(y)f(a)630 4354 y(colon,)33 +b(the)f(option)g(is)g(exp)s(ected)g(to)h(ha)m(v)m(e)g(an)e(argumen)m +(t,)i(whic)m(h)f(should)e(b)s(e)h(separated)630 4463 +y(from)40 b(it)g(b)m(y)g(whitespace.)70 b(The)40 b(colon)h(\(`)p +Ft(:)p Fu('\))g(and)e(question)h(mark)g(\(`)p Ft(?)p +Fu('\))h(ma)m(y)f(not)h(b)s(e)630 4573 y(used)d(as)g(option)h(c)m +(haracters.)67 b(Eac)m(h)39 b(time)g(it)g(is)f(in)m(v)m(ok)m(ed,)k +Ft(getopts)37 b Fu(places)i(the)g(next)630 4682 y(option)29 +b(in)f(the)h(shell)g(v)-5 b(ariable)30 b Fr(name)p Fu(,)f(initializing) +i Fr(name)j Fu(if)28 b(it)h(do)s(es)g(not)g(exist,)h(and)e(the)630 +4792 y(index)33 b(of)g(the)h(next)f(argumen)m(t)h(to)g(b)s(e)e(pro)s +(cessed)h(in)m(to)h(the)g(v)-5 b(ariable)34 b Ft(OPTIND)p +Fu(.)48 b Ft(OPTIND)630 4902 y Fu(is)41 b(initialized)i(to)f(1)f(eac)m +(h)h(time)g(the)f(shell)g(or)g(a)g(shell)g(script)g(is)g(in)m(v)m(ok)m +(ed.)74 b(When)41 b(an)630 5011 y(option)36 b(requires)e(an)h(argumen)m +(t,)i Ft(getopts)c Fu(places)j(that)g(argumen)m(t)g(in)m(to)g(the)f(v) +-5 b(ariable)630 5121 y Ft(OPTARG)p Fu(.)55 b(The)35 +b(shell)g(do)s(es)h(not)g(reset)g Ft(OPTIND)e Fu(automatically;)41 +b(it)36 b(m)m(ust)f(b)s(e)g(man)m(ually)630 5230 y(reset)i(b)s(et)m(w)m +(een)g(m)m(ultiple)h(calls)f(to)g Ft(getopts)e Fu(within)h(the)h(same)g +(shell)f(in)m(v)m(o)s(cation)j(if)e(a)630 5340 y(new)30 +b(set)h(of)f(parameters)h(is)f(to)i(b)s(e)d(used.)p eop +end +%%Page: 47 53 +TeXDict begin 47 52 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(47)630 299 y(When)41 +b(the)h(end)e(of)i(options)g(is)f(encoun)m(tered,)k Ft(getopts)39 +b Fu(exits)j(with)f(a)h(return)e(v)-5 b(alue)630 408 +y(greater)32 b(than)e(zero.)41 b Ft(OPTIND)29 b Fu(is)h(set)h(to)g(the) +g(index)f(of)g(the)h(\014rst)f(non-option)g(argumen)m(t,)630 +518 y(and)g Fr(name)35 b Fu(is)c(set)g(to)g(`)p Ft(?)p +Fu('.)630 655 y Ft(getopts)c Fu(normally)j(parses)e(the)i(p)s +(ositional)g(parameters,)g(but)e(if)i(more)f(argumen)m(ts)h(are)630 +765 y(supplied)f(as)i Fr(arg)38 b Fu(v)-5 b(alues,)31 +b Ft(getopts)e Fu(parses)h(those)h(instead.)630 902 y +Ft(getopts)h Fu(can)h(rep)s(ort)g(errors)g(in)h(t)m(w)m(o)h(w)m(a)m +(ys.)51 b(If)33 b(the)h(\014rst)e(c)m(haracter)k(of)d +Fr(optstring)42 b Fu(is)34 b(a)630 1011 y(colon,)g Fr(silen)m(t)h +Fu(error)d(rep)s(orting)f(is)i(used.)45 b(In)31 b(normal)h(op)s +(eration,)h(diagnostic)h(messages)630 1121 y(are)c(prin)m(ted)e(when)g +(in)m(v)-5 b(alid)30 b(options)g(or)f(missing)g(option)g(argumen)m(ts)h +(are)f(encoun)m(tered.)630 1230 y(If)34 b(the)g(v)-5 +b(ariable)35 b Ft(OPTERR)d Fu(is)i(set)h(to)f(0,)i(no)e(error)g +(messages)h(will)f(b)s(e)f(displa)m(y)m(ed,)j(ev)m(en)f(if)630 +1340 y(the)c(\014rst)e(c)m(haracter)j(of)f Ft(optstring)d +Fu(is)i(not)h(a)f(colon.)630 1477 y(If)39 b(an)h(in)m(v)-5 +b(alid)41 b(option)f(is)g(seen,)i Ft(getopts)c Fu(places)j(`)p +Ft(?)p Fu(')f(in)m(to)h Fr(name)k Fu(and,)d(if)e(not)g(silen)m(t,)630 +1587 y(prin)m(ts)f(an)h(error)f(message)h(and)f(unsets)g +Ft(OPTARG)p Fu(.)67 b(If)39 b Ft(getopts)f Fu(is)i(silen)m(t,)j(the)c +(option)630 1696 y(c)m(haracter)32 b(found)d(is)h(placed)h(in)f +Ft(OPTARG)f Fu(and)h(no)g(diagnostic)i(message)f(is)g(prin)m(ted.)630 +1833 y(If)c(a)g(required)f(argumen)m(t)i(is)f(not)g(found,)g(and)f +Ft(getopts)f Fu(is)i(not)h(silen)m(t,)h(a)e(question)g(mark)630 +1943 y(\(`)p Ft(?)p Fu('\))h(is)g(placed)g(in)f Fr(name)p +Fu(,)h Ft(OPTARG)e Fu(is)h(unset,)h(and)f(a)g(diagnostic)i(message)g +(is)e(prin)m(ted.)39 b(If)630 2052 y Ft(getopts)28 b +Fu(is)h(silen)m(t,)i(then)e(a)h(colon)h(\(`)p Ft(:)p +Fu('\))f(is)g(placed)g(in)f Fr(name)35 b Fu(and)29 b +Ft(OPTARG)f Fu(is)h(set)h(to)h(the)630 2162 y(option)g(c)m(haracter)h +(found.)150 2326 y Ft(hash)870 2463 y(hash)47 b([-r])f([-p)h +Fj(filename)p Ft(])e([-dt])i([)p Fj(name)p Ft(])630 2600 +y Fu(Eac)m(h)32 b(time)g Ft(hash)e Fu(is)h(in)m(v)m(ok)m(ed,)j(it)d +(remem)m(b)s(ers)g(the)g(full)g(pathnames)g(of)h(the)f(commands)630 +2710 y(sp)s(eci\014ed)i(as)i Fr(name)k Fu(argumen)m(ts,)c(so)g(they)f +(need)g(not)g(b)s(e)f(searc)m(hed)i(for)f(on)g(subsequen)m(t)630 +2819 y(in)m(v)m(o)s(cations.)79 b(The)41 b(commands)h(are)h(found)e(b)m +(y)h(searc)m(hing)i(through)d(the)i(directories)630 2929 +y(listed)37 b(in)g Ft($PATH)p Fu(.)58 b(An)m(y)37 b(previously-remem)m +(b)s(ered)f(pathname)h(is)g(discarded.)59 b(The)37 b +Ft(-p)630 3039 y Fu(option)d(inhibits)f(the)h(path)g(searc)m(h,)h(and)e +Fr(\014lename)39 b Fu(is)34 b(used)f(as)h(the)f(lo)s(cation)j(of)e +Fr(name)p Fu(.)630 3148 y(The)42 b Ft(-r)g Fu(option)h(causes)f(the)h +(shell)g(to)g(forget)g(all)h(remem)m(b)s(ered)d(lo)s(cations.)79 +b(The)42 b Ft(-d)630 3258 y Fu(option)31 b(causes)g(the)f(shell)h(to)g +(forget)h(the)f(remem)m(b)s(ered)e(lo)s(cation)j(of)f(eac)m(h)h +Fr(name)p Fu(.)41 b(If)30 b(the)630 3367 y Ft(-t)39 b +Fu(option)h(is)g(supplied,)g(the)g(full)f(pathname)h(to)g(whic)m(h)f +(eac)m(h)i Fr(name)k Fu(corresp)s(onds)38 b(is)630 3477 +y(prin)m(ted.)i(If)28 b(m)m(ultiple)h Fr(name)34 b Fu(argumen)m(ts)29 +b(are)g(supplied)f(with)g Ft(-t)p Fu(,)h(the)g Fr(name)34 +b Fu(is)28 b(prin)m(ted)630 3587 y(b)s(efore)h(the)i(hashed)e(full)g +(pathname.)41 b(The)29 b Ft(-l)g Fu(option)i(causes)f(output)f(to)i(b)s +(e)e(displa)m(y)m(ed)630 3696 y(in)23 b(a)h(format)g(that)g(ma)m(y)g(b) +s(e)f(reused)f(as)i(input.)37 b(If)23 b(no)h(argumen)m(ts)f(are)h(giv)m +(en,)i(or)e(if)f(only)h Ft(-l)630 3806 y Fu(is)35 b(supplied,)f +(information)h(ab)s(out)g(remem)m(b)s(ered)f(commands)g(is)h(prin)m +(ted.)53 b(The)34 b(return)630 3915 y(status)d(is)f(zero)h(unless)f(a)h +Fr(name)k Fu(is)c(not)f(found)f(or)i(an)f(in)m(v)-5 b(alid)31 +b(option)g(is)f(supplied.)150 4080 y Ft(pwd)870 4217 +y(pwd)47 b([-LP])630 4354 y Fu(Prin)m(t)29 b(the)g(absolute)h(pathname) +e(of)h(the)h(curren)m(t)e(w)m(orking)h(directory)-8 b(.)42 +b(If)28 b(the)h Ft(-P)f Fu(option)630 4463 y(is)39 b(supplied,)h(the)f +(pathname)g(prin)m(ted)g(will)g(not)h(con)m(tain)g(sym)m(b)s(olic)f +(links.)67 b(If)38 b(the)i Ft(-L)630 4573 y Fu(option)k(is)g(supplied,) +i(the)e(pathname)f(prin)m(ted)h(ma)m(y)g(con)m(tain)h(sym)m(b)s(olic)f +(links.)80 b(The)630 4682 y(return)26 b(status)h(is)h(zero)g(unless)e +(an)h(error)g(is)g(encoun)m(tered)g(while)h(determining)f(the)g(name) +630 4792 y(of)k(the)f(curren)m(t)g(directory)h(or)f(an)h(in)m(v)-5 +b(alid)31 b(option)g(is)f(supplied.)150 4956 y Ft(readonly)870 +5093 y(readonly)46 b([-aAf])g([-p])g([)p Fj(name)p Ft([=)p +Fj(value)p Ft(]])e(...)630 5230 y Fu(Mark)33 b(eac)m(h)h +Fr(name)39 b Fu(as)33 b(readonly)-8 b(.)49 b(The)32 b(v)-5 +b(alues)34 b(of)f(these)g(names)g(ma)m(y)h(not)f(b)s(e)f(c)m(hanged)630 +5340 y(b)m(y)38 b(subsequen)m(t)g(assignmen)m(t.)65 b(If)38 +b(the)h Ft(-f)f Fu(option)g(is)h(supplied,)g(eac)m(h)h +Fr(name)j Fu(refers)38 b(to)p eop end +%%Page: 48 54 +TeXDict begin 48 53 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(48)630 299 y(a)37 +b(shell)g(function.)59 b(The)36 b Ft(-a)g Fu(option)h(means)f(eac)m(h)i +Fr(name)k Fu(refers)36 b(to)h(an)f(indexed)g(arra)m(y)630 +408 y(v)-5 b(ariable;)28 b(the)f Ft(-A)e Fu(option)h(means)g(eac)m(h)h +Fr(name)k Fu(refers)26 b(to)g(an)g(asso)s(ciativ)m(e)i(arra)m(y)f(v)-5 +b(ariable.)630 518 y(If)35 b(b)s(oth)g(options)h(are)h(supplied,)f +Ft(-A)f Fu(tak)m(es)i(precedence.)58 b(If)35 b(no)h Fr(name)k +Fu(argumen)m(ts)d(are)630 628 y(giv)m(en,)k(or)c(if)h(the)g +Ft(-p)f Fu(option)h(is)f(supplied,)i(a)f(list)g(of)g(all)g(readonly)g +(names)f(is)h(prin)m(ted.)630 737 y(The)32 b(other)g(options)g(ma)m(y)h +(b)s(e)f(used)f(to)i(restrict)g(the)f(output)g(to)h(a)f(subset)g(of)g +(the)g(set)h(of)630 847 y(readonly)c(names.)41 b(The)28 +b Ft(-p)h Fu(option)h(causes)g(output)e(to)j(b)s(e)d(displa)m(y)m(ed)i +(in)f(a)h(format)f(that)630 956 y(ma)m(y)j(b)s(e)e(reused)g(as)i +(input.)42 b(If)30 b(a)i(v)-5 b(ariable)31 b(name)h(is)f(follo)m(w)m +(ed)h(b)m(y)f(=)p Fr(v)-5 b(alue)p Fu(,)32 b(the)f(v)-5 +b(alue)32 b(of)630 1066 y(the)i(v)-5 b(ariable)34 b(is)f(set)i(to)f +Fr(v)-5 b(alue)p Fu(.)50 b(The)33 b(return)g(status)g(is)h(zero)g +(unless)f(an)g(in)m(v)-5 b(alid)34 b(option)630 1176 +y(is)c(supplied,)f(one)h(of)g(the)g Fr(name)35 b Fu(argumen)m(ts)30 +b(is)g(not)g(a)g(v)-5 b(alid)31 b(shell)f(v)-5 b(ariable)30 +b(or)g(function)630 1285 y(name,)h(or)f(the)h Ft(-f)e +Fu(option)i(is)g(supplied)e(with)h(a)h(name)f(that)h(is)f(not)h(a)g +(shell)f(function.)150 1462 y Ft(return)870 1606 y(return)46 +b([)p Fj(n)p Ft(])630 1749 y Fu(Cause)37 b(a)g(shell)h(function)f(to)g +(stop)h(executing)g(and)e(return)h(the)g(v)-5 b(alue)37 +b Fr(n)g Fu(to)h(its)f(caller.)630 1858 y(If)h Fr(n)h +Fu(is)g(not)g(supplied,)h(the)f(return)e(v)-5 b(alue)40 +b(is)f(the)g(exit)g(status)g(of)g(the)g(last)h(command)630 +1968 y(executed)i(in)f(the)g(function.)72 b(If)41 b Ft(return)e +Fu(is)i(executed)h(b)m(y)f(a)h(trap)f(handler,)i(the)e(last)630 +2078 y(command)d(used)f(to)i(determine)f(the)g(status)g(is)h(the)f +(last)h(command)e(executed)i(b)s(efore)630 2187 y(the)27 +b(trap)g(handler.)39 b(If)26 b Ft(return)g Fu(is)h(executed)h(during)d +(a)j Ft(DEBUG)d Fu(trap,)j(the)f(last)h(command)630 2297 +y(used)f(to)h(determine)g(the)f(status)h(is)g(the)f(last)i(command)e +(executed)h(b)m(y)g(the)f(trap)h(handler)630 2406 y(b)s(efore)e +Ft(return)f Fu(w)m(as)i(in)m(v)m(ok)m(ed.)41 b Ft(return)25 +b Fu(ma)m(y)i(also)g(b)s(e)f(used)g(to)h(terminate)h(execution)g(of)630 +2516 y(a)34 b(script)g(b)s(eing)g(executed)g(with)g(the)g +Ft(.)g Fu(\()p Ft(source)p Fu(\))f(builtin,)h(returning)f(either)i +Fr(n)e Fu(or)h(the)630 2626 y(exit)j(status)f(of)g(the)g(last)h +(command)e(executed)i(within)e(the)h(script)g(as)g(the)g(exit)h(status) +630 2735 y(of)i(the)g(script.)65 b(If)38 b Fr(n)g Fu(is)h(supplied,)h +(the)f(return)e(v)-5 b(alue)39 b(is)g(its)g(least)h(signi\014can)m(t)g +(8)f(bits.)630 2845 y(An)m(y)g(command)f(asso)s(ciated)j(with)d(the)h +Ft(RETURN)e Fu(trap)i(is)g(executed)g(b)s(efore)g(execution)630 +2954 y(resumes)29 b(after)h(the)g(function)g(or)g(script.)40 +b(The)29 b(return)g(status)h(is)g(non-zero)g(if)g Ft(return)e +Fu(is)630 3064 y(supplied)h(a)i(non-n)m(umeric)g(argumen)m(t)g(or)f(is) +h(used)f(outside)h(a)g(function)f(and)g(not)h(during)630 +3173 y(the)g(execution)g(of)g(a)f(script)h(b)m(y)f Ft(.)g +Fu(or)g Ft(source)p Fu(.)150 3351 y Ft(shift)870 3494 +y(shift)46 b([)p Fj(n)p Ft(])630 3637 y Fu(Shift)41 b(the)g(p)s +(ositional)h(parameters)g(to)g(the)f(left)h(b)m(y)g Fr(n)p +Fu(.)73 b(The)40 b(p)s(ositional)j(parameters)630 3747 +y(from)34 b Fr(n)p Ft(+)p Fu(1)39 b(.)22 b(.)h(.)45 b +Ft($#)34 b Fu(are)g(renamed)g(to)h Ft($1)k Fu(.)22 b(.)g(.)46 +b Ft($#)p Fu(-)p Fr(n)p Fu(.)51 b(P)m(arameters)36 b(represen)m(ted)e +(b)m(y)g(the)630 3856 y(n)m(um)m(b)s(ers)d Ft($#)i Fu(do)m(wn)f(to)i +Ft($#)p Fu(-)p Fr(n)p Ft(+)p Fu(1)e(are)h(unset.)48 b +Fr(n)32 b Fu(m)m(ust)h(b)s(e)f(a)h(non-negativ)m(e)i(n)m(um)m(b)s(er)d +(less)630 3966 y(than)g(or)g(equal)h(to)g Ft($#)p Fu(.)46 +b(If)31 b Fr(n)h Fu(is)g(zero)h(or)f(greater)i(than)e +Ft($#)p Fu(,)g(the)h(p)s(ositional)g(parameters)630 4075 +y(are)e(not)h(c)m(hanged.)43 b(If)31 b Fr(n)g Fu(is)g(not)g(supplied,)f +(it)i(is)f(assumed)f(to)i(b)s(e)f(1.)43 b(The)31 b(return)f(status)630 +4185 y(is)g(zero)i(unless)d Fr(n)h Fu(is)g(greater)i(than)e +Ft($#)g Fu(or)g(less)h(than)f(zero,)i(non-zero)e(otherwise.)150 +4362 y Ft(test)150 4472 y([)870 4615 y(test)47 b Fj(expr)630 +4758 y Fu(Ev)-5 b(aluate)43 b(a)f(conditional)h(expression)f +Fr(expr)48 b Fu(and)41 b(return)g(a)h(status)g(of)g(0)g(\(true\))h(or)f +(1)630 4868 y(\(false\).)g(Eac)m(h)31 b(op)s(erator)f(and)f(op)s(erand) +g(m)m(ust)h(b)s(e)f(a)i(separate)g(argumen)m(t.)41 b(Expressions)630 +4977 y(are)26 b(comp)s(osed)f(of)g(the)h(primaries)f(describ)s(ed)f(b)s +(elo)m(w)h(in)g(Section)h(6.4)h([Bash)e(Conditional)630 +5087 y(Expressions],)39 b(page)g(91.)64 b Ft(test)37 +b Fu(do)s(es)g(not)h(accept)i(an)m(y)e(options,)i(nor)e(do)s(es)f(it)h +(accept)630 5197 y(and)30 b(ignore)h(an)f(argumen)m(t)h(of)f +Ft(--)g Fu(as)h(signifying)f(the)h(end)f(of)g(options.)630 +5340 y(When)g(the)h Ft([)f Fu(form)g(is)g(used,)g(the)g(last)i(argumen) +m(t)e(to)i(the)e(command)g(m)m(ust)h(b)s(e)e(a)i Ft(])p +Fu(.)p eop end +%%Page: 49 55 +TeXDict begin 49 54 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(49)630 299 y(Expressions)23 +b(ma)m(y)h(b)s(e)e(com)m(bined)i(using)f(the)h(follo)m(wing)h(op)s +(erators,)g(listed)f(in)f(decreasing)630 408 y(order)30 +b(of)h(precedence.)43 b(The)30 b(ev)-5 b(aluation)33 +b(dep)s(ends)28 b(on)j(the)g(n)m(um)m(b)s(er)f(of)h(argumen)m(ts;)g +(see)630 518 y(b)s(elo)m(w.)41 b(Op)s(erator)30 b(precedence)h(is)f +(used)g(when)f(there)i(are)f(\014v)m(e)h(or)f(more)h(argumen)m(ts.)630 +673 y Ft(!)f Fj(expr)210 b Fu(T)-8 b(rue)30 b(if)g Fr(expr)37 +b Fu(is)30 b(false.)630 829 y Ft(\()g Fj(expr)f Ft(\))133 +b Fu(Returns)23 b(the)i(v)-5 b(alue)25 b(of)f Fr(expr)p +Fu(.)38 b(This)24 b(ma)m(y)h(b)s(e)e(used)h(to)h(o)m(v)m(erride)g(the)g +(normal)1110 938 y(precedence)31 b(of)f(op)s(erators.)630 +1093 y Fj(expr1)f Ft(-a)h Fj(expr2)1110 1203 y Fu(T)-8 +b(rue)30 b(if)g(b)s(oth)g Fr(expr1)37 b Fu(and)30 b Fr(expr2)38 +b Fu(are)30 b(true.)630 1358 y Fj(expr1)f Ft(-o)h Fj(expr2)1110 +1468 y Fu(T)-8 b(rue)30 b(if)g(either)h Fr(expr1)38 b +Fu(or)30 b Fr(expr2)37 b Fu(is)31 b(true.)630 1623 y(The)37 +b Ft(test)f Fu(and)g Ft([)h Fu(builtins)g(ev)-5 b(aluate)39 +b(conditional)f(expressions)f(using)g(a)g(set)h(of)f(rules)630 +1733 y(based)30 b(on)g(the)h(n)m(um)m(b)s(er)e(of)h(argumen)m(ts.)630 +1888 y(0)h(argumen)m(ts)1110 1998 y(The)f(expression)g(is)g(false.)630 +2153 y(1)h(argumen)m(t)1110 2262 y(The)f(expression)g(is)g(true)h(if,)f +(and)g(only)g(if,)h(the)g(argumen)m(t)f(is)h(not)f(n)m(ull.)630 +2418 y(2)h(argumen)m(ts)1110 2527 y(If)f(the)h(\014rst)f(argumen)m(t)h +(is)g(`)p Ft(!)p Fu(',)g(the)g(expression)g(is)g(true)f(if)h(and)f +(only)h(if)g(the)1110 2637 y(second)j(argumen)m(t)f(is)h(n)m(ull.)50 +b(If)33 b(the)h(\014rst)e(argumen)m(t)i(is)g(one)g(of)f(the)h(unary) +1110 2746 y(conditional)42 b(op)s(erators)f(\(see)g(Section)h(6.4)f +([Bash)g(Conditional)g(Expres-)1110 2856 y(sions],)34 +b(page)f(91\),)i(the)e(expression)f(is)h(true)g(if)g(the)g(unary)e +(test)j(is)f(true.)47 b(If)1110 2966 y(the)33 b(\014rst)g(argumen)m(t)h +(is)f(not)g(a)h(v)-5 b(alid)34 b(unary)e(op)s(erator,)i(the)g +(expression)f(is)1110 3075 y(false.)630 3230 y(3)e(argumen)m(ts)1110 +3340 y(The)f(follo)m(wing)i(conditions)f(are)f(applied)h(in)f(the)g +(order)g(listed.)1159 3472 y(1.)61 b(If)29 b(the)g(second)g(argumen)m +(t)h(is)f(one)h(of)f(the)h(binary)e(conditional)j(op)s(era-)1290 +3582 y(tors)c(\(see)h(Section)g(6.4)g([Bash)g(Conditional)f +(Expressions],)h(page)f(91\),)1290 3692 y(the)d(result)g(of)f(the)h +(expression)g(is)g(the)f(result)h(of)g(the)g(binary)f(test)h(using)1290 +3801 y(the)35 b(\014rst)e(and)h(third)g(argumen)m(ts)h(as)f(op)s +(erands.)52 b(The)34 b(`)p Ft(-a)p Fu(')g(and)g(`)p Ft(-o)p +Fu(')1290 3911 y(op)s(erators)24 b(are)g(considered)g(binary)f(op)s +(erators)h(when)f(there)h(are)h(three)1290 4020 y(argumen)m(ts.)1159 +4153 y(2.)61 b(If)41 b(the)h(\014rst)e(argumen)m(t)i(is)f(`)p +Ft(!)p Fu(',)k(the)d(v)-5 b(alue)41 b(is)h(the)f(negation)i(of)f(the) +1290 4262 y(t)m(w)m(o-argumen)m(t)33 b(test)e(using)f(the)g(second)h +(and)e(third)h(argumen)m(ts.)1159 4395 y(3.)61 b(If)35 +b(the)h(\014rst)e(argumen)m(t)i(is)g(exactly)h(`)p Ft(\()p +Fu(')f(and)f(the)g(third)g(argumen)m(t)h(is)1290 4504 +y(exactly)i(`)p Ft(\))p Fu(',)g(the)f(result)f(is)h(the)f(one-argumen)m +(t)i(test)f(of)f(the)h(second)1290 4614 y(argumen)m(t.)1159 +4746 y(4.)61 b(Otherwise,)30 b(the)h(expression)f(is)g(false.)630 +4902 y(4)h(argumen)m(ts)1110 5011 y(If)h(the)i(\014rst)e(argumen)m(t)h +(is)g(`)p Ft(!)p Fu(',)h(the)f(result)g(is)g(the)g(negation)h(of)f(the) +g(three-)1110 5121 y(argumen)m(t)h(expression)f(comp)s(osed)h(of)f(the) +h(remaining)g(argumen)m(ts.)50 b(Oth-)1110 5230 y(erwise,)34 +b(the)f(expression)g(is)g(parsed)g(and)f(ev)-5 b(aluated)34 +b(according)h(to)e(prece-)1110 5340 y(dence)e(using)e(the)i(rules)f +(listed)h(ab)s(o)m(v)m(e.)p eop end +%%Page: 50 56 +TeXDict begin 50 55 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(50)630 299 y(5)31 +b(or)f(more)h(argumen)m(ts)1110 408 y(The)43 b(expression)f(is)i +(parsed)e(and)g(ev)-5 b(aluated)45 b(according)f(to)f(precedence)1110 +518 y(using)30 b(the)g(rules)g(listed)h(ab)s(o)m(v)m(e.)630 +690 y(When)40 b(used)f(with)g Ft(test)g Fu(or)h(`)p Ft([)p +Fu(',)j(the)d(`)p Ft(<)p Fu(')g(and)f(`)p Ft(>)p Fu(')h(op)s(erators)g +(sort)g(lexicographically)630 800 y(using)30 b(ASCI)s(I)f(ordering.)150 +972 y Ft(times)870 1113 y(times)630 1254 y Fu(Prin)m(t)37 +b(out)h(the)g(user)e(and)h(system)g(times)h(used)f(b)m(y)g(the)h(shell) +f(and)g(its)h(c)m(hildren.)61 b(The)630 1363 y(return)29 +b(status)i(is)f(zero.)150 1536 y Ft(trap)870 1677 y(trap)47 +b([-lp])f([)p Fj(arg)p Ft(])g([)p Fj(sigspec)g Ft(...)o(])630 +1817 y Fu(The)d(commands)f(in)h Fr(arg)51 b Fu(are)44 +b(to)g(b)s(e)e(read)h(and)g(executed)h(when)e(the)h(shell)g(receiv)m +(es)630 1927 y(signal)36 b Fr(sigsp)s(ec)p Fu(.)57 b(If)35 +b Fr(arg)44 b Fu(is)36 b(absen)m(t)g(\(and)f(there)h(is)g(a)f(single)i +Fr(sigsp)s(ec)6 b Fu(\))35 b(or)h(equal)g(to)h(`)p Ft(-)p +Fu(',)630 2037 y(eac)m(h)k(sp)s(eci\014ed)e(signal's)h(disp)s(osition)g +(is)f(reset)i(to)f(the)g(v)-5 b(alue)40 b(it)g(had)f(when)g(the)h +(shell)630 2146 y(w)m(as)33 b(started.)47 b(If)32 b Fr(arg)41 +b Fu(is)32 b(the)h(n)m(ull)f(string,)i(then)e(the)g(signal)i(sp)s +(eci\014ed)d(b)m(y)i(eac)m(h)g Fr(sigsp)s(ec)630 2256 +y Fu(is)g(ignored)h(b)m(y)f(the)g(shell)h(and)e(commands)h(it)h(in)m(v) +m(ok)m(es.)51 b(If)33 b Fr(arg)41 b Fu(is)33 b(not)h(presen)m(t)f(and)g +Ft(-p)630 2365 y Fu(has)g(b)s(een)g(supplied,)f(the)i(shell)f(displa)m +(ys)h(the)f(trap)g(commands)g(asso)s(ciated)i(with)e(eac)m(h)630 +2475 y Fr(sigsp)s(ec)p Fu(.)47 b(If)31 b(no)i(argumen)m(ts)f(are)h +(supplied,)e(or)i(only)f Ft(-p)g Fu(is)g(giv)m(en,)i +Ft(trap)d Fu(prin)m(ts)h(the)g(list)630 2585 y(of)c(commands)f(asso)s +(ciated)i(with)f(eac)m(h)h(signal)f(n)m(um)m(b)s(er)e(in)i(a)g(form)f +(that)h(ma)m(y)h(b)s(e)e(reused)630 2694 y(as)f(shell)h(input.)38 +b(The)26 b Ft(-l)f Fu(option)i(causes)f(the)g(shell)h(to)g(prin)m(t)e +(a)i(list)f(of)h(signal)g(names)f(and)630 2804 y(their)33 +b(corresp)s(onding)f(n)m(um)m(b)s(ers.)47 b(Eac)m(h)34 +b Fr(sigsp)s(ec)39 b Fu(is)33 b(either)g(a)h(signal)g(name)f(or)g(a)g +(signal)630 2913 y(n)m(um)m(b)s(er.)39 b(Signal)31 b(names)f(are)h +(case)h(insensitiv)m(e)f(and)f(the)g Ft(SIG)g Fu(pre\014x)f(is)i +(optional.)630 3054 y(If)k(a)g Fr(sigsp)s(ec)41 b Fu(is)35 +b Ft(0)g Fu(or)g Ft(EXIT)p Fu(,)g Fr(arg)43 b Fu(is)35 +b(executed)h(when)e(the)h(shell)h(exits.)55 b(If)35 b(a)g +Fr(sigsp)s(ec)41 b Fu(is)630 3164 y Ft(DEBUG)p Fu(,)32 +b(the)g(command)g Fr(arg)40 b Fu(is)33 b(executed)g(b)s(efore)f(ev)m +(ery)h(simple)f(command,)h Ft(for)e Fu(com-)630 3273 +y(mand,)d Ft(case)g Fu(command,)h Ft(select)e Fu(command,)i(ev)m(ery)h +(arithmetic)g Ft(for)d Fu(command,)j(and)630 3383 y(b)s(efore)22 +b(the)g(\014rst)f(command)h(executes)i(in)e(a)g(shell)h(function.)37 +b(Refer)22 b(to)h(the)g(description)f(of)630 3493 y(the)i +Ft(extdebug)d Fu(option)j(to)h(the)f Ft(shopt)e Fu(builtin)h(\(see)i +(Section)f(4.3.2)i([The)d(Shopt)g(Builtin],)630 3602 +y(page)33 b(66\))g(for)f(details)h(of)f(its)h(e\013ect)g(on)f(the)g +Ft(DEBUG)f Fu(trap.)46 b(If)31 b(a)i Fr(sigsp)s(ec)38 +b Fu(is)32 b Ft(RETURN)p Fu(,)f(the)630 3712 y(command)h +Fr(arg)41 b Fu(is)33 b(executed)g(eac)m(h)h(time)f(a)g(shell)g +(function)g(or)f(a)h(script)g(executed)g(with)630 3821 +y(the)e Ft(.)f Fu(or)g Ft(source)f Fu(builtins)g(\014nishes)h +(executing.)630 3962 y(If)20 b(a)i Fr(sigsp)s(ec)27 b +Fu(is)21 b Ft(ERR)p Fu(,)h(the)f(command)g Fr(arg)29 +b Fu(is)21 b(executed)h(whenev)m(er)e(a)i(pip)s(eline)e(\(whic)m(h)h +(ma)m(y)630 4072 y(consist)35 b(of)g(a)f(single)h(simple)g(command\),)h +(a)e(list,)j(or)d(a)h(comp)s(ound)e(command)h(returns)630 +4181 y(a)41 b(non-zero)g(exit)h(status,)h(sub)5 b(ject)41 +b(to)g(the)g(follo)m(wing)h(conditions.)72 b(The)40 b +Ft(ERR)f Fu(trap)i(is)630 4291 y(not)c(executed)h(if)f(the)h(failed)f +(command)g(is)g(part)g(of)h(the)f(command)g(list)h(immediately)630 +4401 y(follo)m(wing)30 b(an)e Ft(until)f Fu(or)i Ft(while)e +Fu(k)m(eyw)m(ord,)i(part)g(of)f(the)h(test)g(follo)m(wing)h(the)f +Ft(if)f Fu(or)g Ft(elif)630 4510 y Fu(reserv)m(ed)45 +b(w)m(ords,)j(part)c(of)h(a)g(command)g(executed)g(in)g(a)g +Ft(&&)f Fu(or)h Ft(||)f Fu(list)h(except)h(the)630 4620 +y(command)28 b(follo)m(wing)j(the)d(\014nal)h Ft(&&)f +Fu(or)g Ft(||)p Fu(,)h(an)m(y)g(command)f(in)h(a)g(pip)s(eline)f(but)g +(the)h(last,)630 4729 y(or)d(if)g(the)f(command's)h(return)f(status)h +(is)g(b)s(eing)f(in)m(v)m(erted)i(using)e Ft(!)p Fu(.)39 +b(These)25 b(are)i(the)f(same)630 4839 y(conditions)31 +b(ob)s(ey)m(ed)f(b)m(y)h(the)f Ft(errexit)f Fu(\()p Ft(-e)p +Fu(\))h(option.)630 4980 y(Signals)37 b(ignored)f(up)s(on)f(en)m(try)i +(to)g(the)f(shell)h(cannot)g(b)s(e)f(trapp)s(ed)f(or)h(reset.)59 +b(T)-8 b(rapp)s(ed)630 5089 y(signals)28 b(that)f(are)h(not)f(b)s(eing) +g(ignored)g(are)g(reset)h(to)g(their)f(original)h(v)-5 +b(alues)28 b(in)e(a)i(subshell)630 5199 y(or)i(subshell)g(en)m +(vironmen)m(t)h(when)e(one)i(is)f(created.)630 5340 y(The)g(return)f +(status)i(is)f(zero)h(unless)f(a)h Fr(sigsp)s(ec)36 b +Fu(do)s(es)30 b(not)h(sp)s(ecify)f(a)g(v)-5 b(alid)31 +b(signal.)p eop end +%%Page: 51 57 +TeXDict begin 51 56 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(51)150 299 y Ft(umask)870 +434 y(umask)46 b([-p])h([-S])g([)p Fj(mode)p Ft(])630 +570 y Fu(Set)30 b(the)f(shell)h(pro)s(cess's)f(\014le)h(creation)g +(mask)g(to)g Fr(mo)s(de)p Fu(.)40 b(If)29 b Fr(mo)s(de)34 +b Fu(b)s(egins)29 b(with)g(a)h(digit,)630 679 y(it)e(is)f(in)m +(terpreted)g(as)g(an)g(o)s(ctal)i(n)m(um)m(b)s(er;)e(if)g(not,)h(it)g +(is)f(in)m(terpreted)g(as)g(a)h(sym)m(b)s(olic)f(mo)s(de)630 +789 y(mask)i(similar)g(to)g(that)h(accepted)g(b)m(y)f(the)g +Ft(chmod)e Fu(command.)40 b(If)28 b Fr(mo)s(de)34 b Fu(is)28 +b(omitted,)j(the)630 899 y(curren)m(t)39 b(v)-5 b(alue)40 +b(of)f(the)g(mask)g(is)h(prin)m(ted.)66 b(If)39 b(the)g +Ft(-S)g Fu(option)g(is)h(supplied)d(without)j(a)630 1008 +y Fr(mo)s(de)d Fu(argumen)m(t,)d(the)e(mask)g(is)h(prin)m(ted)f(in)g(a) +g(sym)m(b)s(olic)h(format.)47 b(If)32 b(the)g Ft(-p)g +Fu(option)h(is)630 1118 y(supplied,)f(and)f Fr(mo)s(de)37 +b Fu(is)32 b(omitted,)i(the)f(output)f(is)g(in)g(a)g(form)g(that)h(ma)m +(y)g(b)s(e)e(reused)h(as)630 1227 y(input.)62 b(The)38 +b(return)f(status)h(is)g(zero)g(if)g(the)g(mo)s(de)g(is)g(successfully) +g(c)m(hanged)g(or)g(if)g(no)630 1337 y Fr(mo)s(de)d Fu(argumen)m(t)c +(is)f(supplied,)g(and)f(non-zero)i(otherwise.)630 1473 +y(Note)38 b(that)e(when)g(the)g(mo)s(de)g(is)g(in)m(terpreted)h(as)f +(an)g(o)s(ctal)i(n)m(um)m(b)s(er,)e(eac)m(h)i(n)m(um)m(b)s(er)d(of)630 +1582 y(the)f(umask)g(is)h(subtracted)f(from)f Ft(7)p +Fu(.)53 b(Th)m(us,)34 b(a)h(umask)e(of)i Ft(022)e Fu(results)h(in)g(p)s +(ermissions)630 1692 y(of)d Ft(755)p Fu(.)150 1853 y +Ft(unset)870 1989 y(unset)46 b([-fnv])g([)p Fj(name)p +Ft(])630 2124 y Fu(Remo)m(v)m(e)36 b(eac)m(h)f(v)-5 b(ariable)35 +b(or)f(function)f Fr(name)p Fu(.)52 b(If)33 b(the)i Ft(-v)e +Fu(option)h(is)g(giv)m(en,)j(eac)m(h)e Fr(name)630 2234 +y Fu(refers)27 b(to)h(a)g(shell)f(v)-5 b(ariable)28 b(and)f(that)h(v)-5 +b(ariable)28 b(is)f(remo)m(v)m(ed.)41 b(If)27 b(the)g +Ft(-f)g Fu(option)g(is)h(giv)m(en,)630 2343 y(the)37 +b Fr(name)5 b Fu(s)37 b(refer)f(to)i(shell)f(functions,)h(and)e(the)h +(function)g(de\014nition)f(is)h(remo)m(v)m(ed.)61 b(If)630 +2453 y(the)34 b Ft(-n)e Fu(option)i(is)g(supplied,)f(and)g +Fr(name)38 b Fu(is)c(a)f(v)-5 b(ariable)34 b(with)g(the)f +Fr(nameref)51 b Fu(attribute,)630 2563 y Fr(name)42 b +Fu(will)37 b(b)s(e)f(unset)g(rather)g(than)h(the)g(v)-5 +b(ariable)37 b(it)g(references.)60 b Ft(-n)36 b Fu(has)g(no)h(e\013ect) +h(if)630 2672 y(the)h Ft(-f)g Fu(option)g(is)h(supplied.)65 +b(If)39 b(no)g(options)h(are)f(supplied,)h(eac)m(h)h +Fr(name)j Fu(refers)39 b(to)h(a)630 2782 y(v)-5 b(ariable;)45 +b(if)39 b(there)g(is)g(no)g(v)-5 b(ariable)40 b(b)m(y)f(that)h(name,)h +(a)f(function)f(with)g(that)g(name,)j(if)630 2891 y(an)m(y)-8 +b(,)34 b(is)e(unset.)46 b(Readonly)33 b(v)-5 b(ariables)33 +b(and)f(functions)g(ma)m(y)h(not)f(b)s(e)g(unset.)46 +b(Some)33 b(shell)630 3001 y(v)-5 b(ariables)29 b(lose)h(their)e(sp)s +(ecial)h(b)s(eha)m(vior)g(if)f(they)h(are)g(unset;)g(suc)m(h)f(b)s(eha) +m(vior)h(is)g(noted)f(in)630 3110 y(the)35 b(description)h(of)f(the)g +(individual)g(v)-5 b(ariables.)56 b(The)34 b(return)g(status)i(is)f +(zero)h(unless)f(a)630 3220 y Fr(name)h Fu(is)30 b(readonly)-8 +b(.)150 3464 y Fs(4.2)68 b(Bash)45 b(Builtin)g(Commands)150 +3623 y Fu(This)c(section)h(describ)s(es)f(builtin)f(commands)h(whic)m +(h)g(are)h(unique)e(to)j(or)e(ha)m(v)m(e)h(b)s(een)f(extended)g(in)150 +3733 y(Bash.)g(Some)30 b(of)h(these)g(commands)f(are)g(sp)s(eci\014ed)g +(in)g(the)h Fm(posix)e Fu(standard.)150 3895 y Ft(alias)870 +4031 y(alias)46 b([-p])h([)p Fj(name)p Ft([=)p Fj(value)p +Ft(])d(...)o(])630 4166 y Fu(Without)26 b(argumen)m(ts)f(or)g(with)f +(the)h Ft(-p)g Fu(option,)h Ft(alias)e Fu(prin)m(ts)g(the)h(list)h(of)f +(aliases)h(on)f(the)630 4276 y(standard)g(output)g(in)g(a)h(form)f +(that)h(allo)m(ws)h(them)e(to)h(b)s(e)f(reused)g(as)g(input.)39 +b(If)25 b(argumen)m(ts)630 4385 y(are)j(supplied,)e(an)i(alias)g(is)f +(de\014ned)f(for)h(eac)m(h)h Fr(name)33 b Fu(whose)27 +b Fr(v)-5 b(alue)33 b Fu(is)27 b(giv)m(en.)41 b(If)26 +b(no)h Fr(v)-5 b(alue)630 4495 y Fu(is)37 b(giv)m(en,)j(the)d(name)g +(and)g(v)-5 b(alue)37 b(of)h(the)f(alias)h(is)f(prin)m(ted.)61 +b(Aliases)38 b(are)f(describ)s(ed)f(in)630 4605 y(Section)31 +b(6.6)h([Aliases],)g(page)f(94.)150 4766 y Ft(bind)870 +4902 y(bind)47 b([-m)g Fj(keymap)p Ft(])e([-lpsvPSVX])870 +5011 y(bind)i([-m)g Fj(keymap)p Ft(])e([-q)i Fj(function)p +Ft(])f([-u)g Fj(function)p Ft(])g([-r)h Fj(keyseq)p Ft(])870 +5121 y(bind)g([-m)g Fj(keymap)p Ft(])e(-f)j Fj(filename)870 +5230 y Ft(bind)f([-m)g Fj(keymap)p Ft(])e(-x)j Fj(keyseq:shell-command) +870 5340 y Ft(bind)f([-m)g Fj(keymap)p Ft(])e Fj(keyseq:function-name)p +eop end +%%Page: 52 58 +TeXDict begin 52 57 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(52)870 299 y Ft(bind)47 +b([-m)g Fj(keymap)p Ft(])e Fj(keyseq:readline-command)630 +432 y Fu(Displa)m(y)22 b(curren)m(t)f(Readline)h(\(see)f(Chapter)g(8)g +([Command)f(Line)h(Editing],)j(page)e(111\))g(k)m(ey)630 +542 y(and)36 b(function)g(bindings,)i(bind)d(a)i(k)m(ey)g(sequence)g +(to)h(a)f(Readline)g(function)f(or)h(macro,)630 651 y(or)44 +b(set)h(a)g(Readline)f(v)-5 b(ariable.)83 b(Eac)m(h)45 +b(non-option)g(argumen)m(t)f(is)g(a)h(command)f(as)g(it)630 +761 y(w)m(ould)e(app)s(ear)f(in)h(a)h(Readline)g(initialization)i +(\014le)d(\(see)h(Section)g(8.3)g([Readline)g(Init)630 +870 y(File],)c(page)d(114\),)j(but)c(eac)m(h)h(binding)f(or)g(command)h +(m)m(ust)f(b)s(e)g(passed)g(as)h(a)g(separate)630 980 +y(argumen)m(t;)31 b(e.g.,)h(`)p Ft("\\C-x\\C-r":re-read-init-f)o(ile)p +Fu('.)630 1113 y(Options,)e(if)h(supplied,)e(ha)m(v)m(e)i(the)g(follo)m +(wing)h(meanings:)630 1270 y Ft(-m)e Fj(keymap)66 b Fu(Use)54 +b Fr(k)m(eymap)j Fu(as)d(the)g(k)m(eymap)g(to)h(b)s(e)e(a\013ected)i(b) +m(y)f(the)g(subsequen)m(t)1110 1379 y(bindings.)46 b(Acceptable)34 +b Fr(k)m(eymap)i Fu(names)c(are)h Ft(emacs)p Fu(,)f Ft(emacs-standard)p +Fu(,)1110 1489 y Ft(emacs-meta)p Fu(,)99 b Ft(emacs-ctlx)p +Fu(,)f Ft(vi)p Fu(,)j Ft(vi-move)p Fu(,)f Ft(vi-command)p +Fu(,)f(and)1110 1598 y Ft(vi-insert)p Fu(.)81 b Ft(vi)44 +b Fu(is)h(equiv)-5 b(alen)m(t)46 b(to)g Ft(vi-command)c +Fu(\()p Ft(vi-move)h Fu(is)i(also)h(a)1110 1708 y(synon)m(ym\);)30 +b Ft(emacs)f Fu(is)i(equiv)-5 b(alen)m(t)32 b(to)f Ft(emacs-standard)p +Fu(.)630 1864 y Ft(-l)384 b Fu(List)31 b(the)f(names)g(of)h(all)g +(Readline)g(functions.)630 2021 y Ft(-p)384 b Fu(Displa)m(y)34 +b(Readline)f(function)g(names)g(and)f(bindings)f(in)i(suc)m(h)f(a)i(w)m +(a)m(y)f(that)1110 2131 y(they)e(can)f(b)s(e)g(used)g(as)g(input)g(or)g +(in)g(a)h(Readline)g(initialization)i(\014le.)630 2287 +y Ft(-P)384 b Fu(List)31 b(curren)m(t)f(Readline)h(function)f(names)g +(and)g(bindings.)630 2444 y Ft(-v)384 b Fu(Displa)m(y)25 +b(Readline)f(v)-5 b(ariable)25 b(names)f(and)f(v)-5 b(alues)24 +b(in)g(suc)m(h)f(a)i(w)m(a)m(y)f(that)h(they)1110 2553 +y(can)31 b(b)s(e)e(used)h(as)h(input)e(or)h(in)g(a)h(Readline)g +(initialization)j(\014le.)630 2710 y Ft(-V)384 b Fu(List)31 +b(curren)m(t)f(Readline)h(v)-5 b(ariable)31 b(names)f(and)g(v)-5 +b(alues.)630 2866 y Ft(-s)384 b Fu(Displa)m(y)39 b(Readline)f(k)m(ey)g +(sequences)f(b)s(ound)f(to)i(macros)g(and)f(the)g(strings)1110 +2976 y(they)d(output)f(in)h(suc)m(h)f(a)h(w)m(a)m(y)h(that)f(they)g +(can)g(b)s(e)f(used)g(as)h(input)e(or)i(in)g(a)1110 3086 +y(Readline)d(initialization)i(\014le.)630 3242 y Ft(-S)384 +b Fu(Displa)m(y)39 b(Readline)f(k)m(ey)g(sequences)f(b)s(ound)f(to)i +(macros)g(and)f(the)g(strings)1110 3352 y(they)31 b(output.)630 +3508 y Ft(-f)f Fj(filename)1110 3618 y Fu(Read)h(k)m(ey)g(bindings)e +(from)h Fr(\014lename)p Fu(.)630 3774 y Ft(-q)g Fj(function)1110 +3884 y Fu(Query)g(ab)s(out)g(whic)m(h)g(k)m(eys)h(in)m(v)m(ok)m(e)h +(the)f(named)f Fr(function)p Fu(.)630 4041 y Ft(-u)g +Fj(function)1110 4150 y Fu(Un)m(bind)f(all)i(k)m(eys)g(b)s(ound)e(to)i +(the)f(named)g Fr(function)p Fu(.)630 4307 y Ft(-r)g +Fj(keyseq)66 b Fu(Remo)m(v)m(e)32 b(an)m(y)f(curren)m(t)f(binding)f +(for)h Fr(k)m(eyseq)p Fu(.)630 4463 y Ft(-x)g Fj(keyseq:shell-command) +1110 4573 y Fu(Cause)35 b Fr(shell-command)k Fu(to)d(b)s(e)f(executed)h +(whenev)m(er)f Fr(k)m(eyseq)j Fu(is)d(en)m(tered.)1110 +4682 y(When)46 b Fr(shell-command)k Fu(is)c(executed,)51 +b(the)46 b(shell)g(sets)g(the)g Ft(READLINE_)1110 4792 +y(LINE)37 b Fu(v)-5 b(ariable)38 b(to)g(the)g(con)m(ten)m(ts)i(of)e +(the)g(Readline)g(line)g(bu\013er)f(and)g(the)1110 4902 +y Ft(READLINE_POINT)21 b Fu(and)k Ft(READLINE_MARK)c +Fu(v)-5 b(ariables)26 b(to)g(the)g(curren)m(t)f(lo)s(ca-)1110 +5011 y(tion)f(of)g(the)g(insertion)g(p)s(oin)m(t)g(and)f(the)h(sa)m(v)m +(ed)h(insertion)f(p)s(oin)m(t)g(\(the)g Fr(mark)6 b Fu(\),)1110 +5121 y(resp)s(ectiv)m(ely)-8 b(.)43 b(If)30 b(the)h(executed)g(command) +g(c)m(hanges)g(the)g(v)-5 b(alue)31 b(of)g(an)m(y)g(of)1110 +5230 y Ft(READLINE_LINE)p Fu(,)40 b Ft(READLINE_POINT)p +Fu(,)f(or)i Ft(READLINE_MARK)p Fu(,)e(those)i(new)1110 +5340 y(v)-5 b(alues)31 b(will)f(b)s(e)g(re\015ected)h(in)f(the)h +(editing)g(state.)p eop end +%%Page: 53 59 +TeXDict begin 53 58 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(53)630 299 y Ft(-X)384 +b Fu(List)27 b(all)i(k)m(ey)f(sequences)f(b)s(ound)e(to)j(shell)g +(commands)e(and)h(the)g(asso)s(ciated)1110 408 y(commands)j(in)g(a)h +(format)g(that)f(can)h(b)s(e)f(reused)f(as)i(input.)630 +568 y(The)26 b(return)f(status)i(is)f(zero)i(unless)d(an)i(in)m(v)-5 +b(alid)27 b(option)g(is)f(supplied)f(or)i(an)f(error)g(o)s(ccurs.)150 +727 y Ft(builtin)870 862 y(builtin)46 b([)p Fj(shell-builtin)e +Ft([)p Fj(args)p Ft(]])630 996 y Fu(Run)35 b(a)i(shell)f(builtin,)i +(passing)e(it)h Fr(args)p Fu(,)h(and)e(return)f(its)i(exit)g(status.)59 +b(This)35 b(is)i(useful)630 1106 y(when)29 b(de\014ning)h(a)g(shell)h +(function)f(with)g(the)g(same)h(name)f(as)h(a)g(shell)f(builtin,)g +(retaining)630 1215 y(the)k(functionalit)m(y)h(of)f(the)f(builtin)g +(within)g(the)h(function.)50 b(The)33 b(return)g(status)h(is)f(non-)630 +1325 y(zero)e(if)g Fr(shell-builtin)f Fu(is)g(not)h(a)g(shell)f +(builtin)g(command.)150 1484 y Ft(caller)870 1619 y(caller)46 +b([)p Fj(expr)p Ft(])630 1753 y Fu(Returns)34 b(the)g(con)m(text)j(of)e +(an)m(y)g(activ)m(e)i(subroutine)c(call)j(\(a)f(shell)g(function)f(or)h +(a)g(script)630 1863 y(executed)c(with)f(the)h Ft(.)f +Fu(or)g Ft(source)f Fu(builtins\).)630 1998 y(Without)45 +b Fr(expr)p Fu(,)j Ft(caller)43 b Fu(displa)m(ys)i(the)f(line)h(n)m(um) +m(b)s(er)f(and)g(source)g(\014lename)h(of)g(the)630 2107 +y(curren)m(t)35 b(subroutine)g(call.)58 b(If)35 b(a)h(non-negativ)m(e)i +(in)m(teger)f(is)f(supplied)e(as)i Fr(expr)p Fu(,)h Ft(caller)630 +2217 y Fu(displa)m(ys)k(the)f(line)h(n)m(um)m(b)s(er,)h(subroutine)d +(name,)44 b(and)c(source)g(\014le)h(corresp)s(onding)e(to)630 +2326 y(that)c(p)s(osition)g(in)f(the)h(curren)m(t)f(execution)i(call)g +(stac)m(k.)54 b(This)34 b(extra)h(information)g(ma)m(y)630 +2436 y(b)s(e)30 b(used,)g(for)g(example,)h(to)g(prin)m(t)f(a)h(stac)m +(k)h(trace.)42 b(The)29 b(curren)m(t)i(frame)f(is)g(frame)h(0.)630 +2570 y(The)d(return)g(v)-5 b(alue)29 b(is)g(0)g(unless)f(the)h(shell)g +(is)g(not)g(executing)h(a)f(subroutine)e(call)j(or)f +Fr(expr)630 2680 y Fu(do)s(es)h(not)h(corresp)s(ond)e(to)i(a)g(v)-5 +b(alid)30 b(p)s(osition)h(in)f(the)g(call)i(stac)m(k.)150 +2839 y Ft(command)870 2974 y(command)46 b([-pVv])g Fj(command)g +Ft([)p Fj(arguments)f Ft(...)o(])630 3108 y Fu(Runs)32 +b Fr(command)k Fu(with)d Fr(argumen)m(ts)k Fu(ignoring)c(an)m(y)g +(shell)h(function)e(named)h Fr(command)p Fu(.)630 3218 +y(Only)39 b(shell)i(builtin)e(commands)h(or)g(commands)f(found)g(b)m(y) +h(searc)m(hing)h(the)f Ft(PATH)f Fu(are)630 3328 y(executed.)59 +b(If)36 b(there)h(is)f(a)h(shell)f(function)g(named)g +Ft(ls)p Fu(,)h(running)e(`)p Ft(command)29 b(ls)p Fu(')35 +b(within)630 3437 y(the)c(function)f(will)h(execute)g(the)g(external)g +(command)g Ft(ls)f Fu(instead)g(of)h(calling)h(the)f(func-)630 +3547 y(tion)36 b(recursiv)m(ely)-8 b(.)56 b(The)34 b +Ft(-p)h Fu(option)g(means)g(to)h(use)f(a)g(default)h(v)-5 +b(alue)35 b(for)g Ft(PATH)f Fu(that)i(is)630 3656 y(guaran)m(teed)f(to) +f(\014nd)e(all)j(of)f(the)g(standard)f(utilities.)52 +b(The)33 b(return)g(status)h(in)f(this)h(case)630 3766 +y(is)29 b(127)g(if)g Fr(command)j Fu(cannot)d(b)s(e)e(found)h(or)g(an)g +(error)h(o)s(ccurred,)f(and)g(the)h(exit)g(status)g(of)630 +3875 y Fr(command)34 b Fu(otherwise.)630 4010 y(If)e(either)h(the)f +Ft(-V)g Fu(or)g Ft(-v)g Fu(option)h(is)f(supplied,)g(a)h(description)f +(of)h Fr(command)j Fu(is)c(prin)m(ted.)630 4120 y(The)f +Ft(-v)h Fu(option)g(causes)g(a)g(single)h(w)m(ord)f(indicating)g(the)g +(command)g(or)g(\014le)g(name)g(used)630 4229 y(to)40 +b(in)m(v)m(ok)m(e)h Fr(command)h Fu(to)e(b)s(e)e(displa)m(y)m(ed;)44 +b(the)39 b Ft(-V)f Fu(option)i(pro)s(duces)d(a)j(more)f(v)m(erb)s(ose) +630 4339 y(description.)61 b(In)36 b(this)h(case,)j(the)e(return)e +(status)h(is)g(zero)h(if)f Fr(command)k Fu(is)c(found,)h(and)630 +4448 y(non-zero)31 b(if)f(not.)150 4608 y Ft(declare)870 +4742 y(declare)46 b([-aAfFgiIlnrtux])d([-p])k([)p Fj(name)p +Ft([=)p Fj(value)p Ft(])d(...)o(])630 4877 y Fu(Declare)29 +b(v)-5 b(ariables)28 b(and)e(giv)m(e)j(them)e(attributes.)40 +b(If)27 b(no)g Fr(name)5 b Fu(s)27 b(are)h(giv)m(en,)h(then)e(displa)m +(y)630 4986 y(the)k(v)-5 b(alues)30 b(of)h(v)-5 b(ariables)31 +b(instead.)630 5121 y(The)k Ft(-p)f Fu(option)i(will)g(displa)m(y)f +(the)h(attributes)g(and)e(v)-5 b(alues)36 b(of)f(eac)m(h)i +Fr(name)p Fu(.)55 b(When)36 b Ft(-p)630 5230 y Fu(is)i(used)g(with)g +Fr(name)43 b Fu(argumen)m(ts,)e(additional)e(options,)i(other)d(than)g +Ft(-f)g Fu(and)g Ft(-F)p Fu(,)i(are)630 5340 y(ignored.)p +eop end +%%Page: 54 60 +TeXDict begin 54 59 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(54)630 299 y(When)40 +b Ft(-p)g Fu(is)g(supplied)f(without)i Fr(name)k Fu(argumen)m(ts,)f +Ft(declare)38 b Fu(will)j(displa)m(y)f(the)h(at-)630 +408 y(tributes)31 b(and)f(v)-5 b(alues)31 b(of)g(all)h(v)-5 +b(ariables)31 b(ha)m(ving)h(the)f(attributes)g(sp)s(eci\014ed)f(b)m(y)h +(the)g(addi-)630 518 y(tional)k(options.)52 b(If)34 b(no)g(other)g +(options)g(are)g(supplied)f(with)h Ft(-p)p Fu(,)g Ft(declare)e +Fu(will)j(displa)m(y)630 628 y(the)e(attributes)h(and)e(v)-5 +b(alues)33 b(of)g(all)h(shell)f(v)-5 b(ariables.)50 b(The)32 +b Ft(-f)g Fu(option)i(will)f(restrict)h(the)630 737 y(displa)m(y)d(to)g +(shell)f(functions.)630 877 y(The)41 b Ft(-F)f Fu(option)i(inhibits)e +(the)i(displa)m(y)f(of)g(function)g(de\014nitions;)47 +b(only)41 b(the)g(function)630 986 y(name)30 b(and)f(attributes)i(are)f +(prin)m(ted.)40 b(If)30 b(the)g Ft(extdebug)e Fu(shell)i(option)g(is)g +(enabled)g(using)630 1096 y Ft(shopt)24 b Fu(\(see)i(Section)g(4.3.2)i +([The)d(Shopt)f(Builtin],)k(page)e(66\),)i(the)d(source)h(\014le)f +(name)h(and)630 1205 y(line)31 b(n)m(um)m(b)s(er)e(where)h(eac)m(h)h +Fr(name)36 b Fu(is)30 b(de\014ned)f(are)i(displa)m(y)m(ed)g(as)g(w)m +(ell.)41 b Ft(-F)30 b Fu(implies)h Ft(-f)p Fu(.)630 1345 +y(The)36 b Ft(-g)g Fu(option)h(forces)g(v)-5 b(ariables)37 +b(to)g(b)s(e)f(created)i(or)e(mo)s(di\014ed)g(at)h(the)g(global)h(scop) +s(e,)630 1455 y(ev)m(en)g(when)e Ft(declare)f Fu(is)j(executed)g(in)f +(a)g(shell)h(function.)61 b(It)37 b(is)g(ignored)h(in)f(all)h(other)630 +1564 y(cases.)630 1704 y(The)50 b Ft(-I)h Fu(option)g(causes)h(lo)s +(cal)g(v)-5 b(ariables)51 b(to)h(inherit)f(the)g(attributes)g(\(except) +i(the)630 1813 y Fr(nameref)63 b Fu(attribute\))46 b(and)f(v)-5 +b(alue)45 b(of)h(an)m(y)f(existing)i(v)-5 b(ariable)46 +b(with)f(the)g(same)h Fr(name)630 1923 y Fu(at)40 b(a)f(surrounding)d +(scop)s(e.)66 b(If)39 b(there)g(is)g(no)f(existing)i(v)-5 +b(ariable,)42 b(the)d(lo)s(cal)h(v)-5 b(ariable)40 b(is)630 +2032 y(initially)32 b(unset.)630 2172 y(The)27 b(follo)m(wing)h +(options)g(can)f(b)s(e)g(used)f(to)i(restrict)g(output)e(to)i(v)-5 +b(ariables)28 b(with)f(the)g(sp)s(ec-)630 2281 y(i\014ed)j(attributes)h +(or)f(to)h(giv)m(e)h(v)-5 b(ariables)31 b(attributes:)630 +2451 y Ft(-a)384 b Fu(Eac)m(h)36 b Fr(name)k Fu(is)34 +b(an)h(indexed)g(arra)m(y)g(v)-5 b(ariable)36 b(\(see)f(Section)h(6.7)g +([Arra)m(ys],)1110 2560 y(page)31 b(95\).)630 2730 y +Ft(-A)384 b Fu(Eac)m(h)24 b Fr(name)k Fu(is)23 b(an)g(asso)s(ciativ)m +(e)j(arra)m(y)e(v)-5 b(ariable)24 b(\(see)g(Section)g(6.7)g([Arra)m +(ys],)1110 2839 y(page)31 b(95\).)630 3009 y Ft(-f)384 +b Fu(Use)31 b(function)f(names)g(only)-8 b(.)630 3178 +y Ft(-i)384 b Fu(The)36 b(v)-5 b(ariable)37 b(is)f(to)h(b)s(e)f +(treated)h(as)g(an)f(in)m(teger;)41 b(arithmetic)c(ev)-5 +b(aluation)1110 3288 y(\(see)29 b(Section)f(6.5)h([Shell)f +(Arithmetic],)i(page)e(93\))h(is)f(p)s(erformed)e(when)h(the)1110 +3397 y(v)-5 b(ariable)31 b(is)g(assigned)f(a)h(v)-5 b(alue.)630 +3567 y Ft(-l)384 b Fu(When)26 b(the)g(v)-5 b(ariable)27 +b(is)f(assigned)g(a)g(v)-5 b(alue,)28 b(all)f(upp)s(er-case)e(c)m +(haracters)j(are)1110 3676 y(con)m(v)m(erted)k(to)f(lo)m(w)m(er-case.) +43 b(The)30 b(upp)s(er-case)g(attribute)h(is)g(disabled.)630 +3846 y Ft(-n)384 b Fu(Giv)m(e)28 b(eac)m(h)g Fr(name)k +Fu(the)27 b Fr(nameref)44 b Fu(attribute,)28 b(making)f(it)h(a)f(name)f +(reference)1110 3955 y(to)32 b(another)g(v)-5 b(ariable.)46 +b(That)31 b(other)h(v)-5 b(ariable)33 b(is)f(de\014ned)e(b)m(y)i(the)g +(v)-5 b(alue)32 b(of)1110 4065 y Fr(name)p Fu(.)54 b(All)35 +b(references,)h(assignmen)m(ts,)h(and)d(attribute)h(mo)s(di\014cations) +g(to)1110 4174 y Fr(name)p Fu(,)27 b(except)f(for)f(those)h(using)f(or) +g(c)m(hanging)h(the)f Ft(-n)g Fu(attribute)h(itself,)i(are)1110 +4284 y(p)s(erformed)22 b(on)h(the)g(v)-5 b(ariable)25 +b(referenced)e(b)m(y)g Fr(name)5 b Fu('s)23 b(v)-5 b(alue.)39 +b(The)23 b(nameref)1110 4394 y(attribute)31 b(cannot)g(b)s(e)f(applied) +g(to)h(arra)m(y)g(v)-5 b(ariables.)630 4563 y Ft(-r)384 +b Fu(Mak)m(e)25 b Fr(name)5 b Fu(s)23 b(readonly)-8 b(.)39 +b(These)24 b(names)f(cannot)h(then)f(b)s(e)g(assigned)h(v)-5 +b(alues)1110 4672 y(b)m(y)30 b(subsequen)m(t)g(assignmen)m(t)h +(statemen)m(ts)h(or)f(unset.)630 4842 y Ft(-t)384 b Fu(Giv)m(e)33 +b(eac)m(h)h Fr(name)j Fu(the)32 b Ft(trace)f Fu(attribute.)46 +b(T)-8 b(raced)32 b(functions)g(inherit)g(the)1110 4951 +y Ft(DEBUG)26 b Fu(and)h Ft(RETURN)f Fu(traps)h(from)g(the)h(calling)h +(shell.)40 b(The)27 b(trace)i(attribute)1110 5061 y(has)h(no)g(sp)s +(ecial)h(meaning)g(for)f(v)-5 b(ariables.)630 5230 y +Ft(-u)384 b Fu(When)28 b(the)h(v)-5 b(ariable)29 b(is)f(assigned)h(a)f +(v)-5 b(alue,)30 b(all)f(lo)m(w)m(er-case)i(c)m(haracters)f(are)1110 +5340 y(con)m(v)m(erted)i(to)f(upp)s(er-case.)40 b(The)30 +b(lo)m(w)m(er-case)j(attribute)e(is)g(disabled.)p eop +end +%%Page: 55 61 +TeXDict begin 55 60 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(55)630 299 y Ft(-x)384 +b Fu(Mark)30 b(eac)m(h)h Fr(name)k Fu(for)29 b(exp)s(ort)h(to)g +(subsequen)m(t)f(commands)h(via)g(the)g(en)m(vi-)1110 +408 y(ronmen)m(t.)630 560 y(Using)e(`)p Ft(+)p Fu(')h(instead)f(of)g(`) +p Ft(-)p Fu(')g(turns)f(o\013)i(the)f(attribute)h(instead,)g(with)f +(the)g(exceptions)h(that)630 670 y(`)p Ft(+a)p Fu(')23 +b(and)f(`)p Ft(+A)p Fu(')h(ma)m(y)h(not)f(b)s(e)f(used)g(to)i(destro)m +(y)g(arra)m(y)f(v)-5 b(ariables)24 b(and)e(`)p Ft(+r)p +Fu(')h(will)g(not)g(remo)m(v)m(e)630 780 y(the)36 b(readonly)h +(attribute.)59 b(When)36 b(used)f(in)h(a)h(function,)g +Ft(declare)d Fu(mak)m(es)j(eac)m(h)h Fr(name)630 889 +y Fu(lo)s(cal,)e(as)d(with)h(the)f Ft(local)f Fu(command,)j(unless)d +(the)i Ft(-g)f Fu(option)h(is)f(used.)49 b(If)33 b(a)h(v)-5 +b(ariable)630 999 y(name)30 b(is)h(follo)m(w)m(ed)h(b)m(y)e(=)p +Fr(v)-5 b(alue)p Fu(,)31 b(the)f(v)-5 b(alue)31 b(of)g(the)f(v)-5 +b(ariable)32 b(is)e(set)h(to)g Fr(v)-5 b(alue)p Fu(.)630 +1130 y(When)41 b(using)g Ft(-a)g Fu(or)h Ft(-A)e Fu(and)h(the)h(comp)s +(ound)e(assignmen)m(t)i(syn)m(tax)g(to)g(create)h(arra)m(y)630 +1239 y(v)-5 b(ariables,)28 b(additional)f(attributes)g(do)f(not)h(tak)m +(e)h(e\013ect)g(un)m(til)e(subsequen)m(t)g(assignmen)m(ts.)630 +1370 y(The)35 b(return)f(status)i(is)g(zero)g(unless)f(an)g(in)m(v)-5 +b(alid)36 b(option)g(is)g(encoun)m(tered,)h(an)f(attempt)630 +1480 y(is)c(made)g(to)g(de\014ne)f(a)h(function)g(using)f(`)p +Ft(-f)f(foo=bar)p Fu(',)h(an)h(attempt)g(is)g(made)g(to)h(assign)630 +1589 y(a)42 b(v)-5 b(alue)43 b(to)g(a)f(readonly)g(v)-5 +b(ariable,)47 b(an)42 b(attempt)h(is)f(made)g(to)h(assign)f(a)h(v)-5 +b(alue)42 b(to)h(an)630 1699 y(arra)m(y)30 b(v)-5 b(ariable)30 +b(without)g(using)e(the)i(comp)s(ound)e(assignmen)m(t)i(syn)m(tax)g +(\(see)h(Section)f(6.7)630 1808 y([Arra)m(ys],)47 b(page)c(95\),)48 +b(one)43 b(of)g(the)g Fr(names)k Fu(is)c(not)g(a)g(v)-5 +b(alid)43 b(shell)g(v)-5 b(ariable)44 b(name,)i(an)630 +1918 y(attempt)28 b(is)f(made)h(to)f(turn)f(o\013)i(readonly)f(status)g +(for)g(a)h(readonly)f(v)-5 b(ariable,)29 b(an)e(attempt)630 +2028 y(is)h(made)h(to)g(turn)e(o\013)i(arra)m(y)f(status)h(for)f(an)g +(arra)m(y)h(v)-5 b(ariable,)30 b(or)e(an)g(attempt)i(is)e(made)g(to)630 +2137 y(displa)m(y)j(a)f(non-existen)m(t)i(function)e(with)g +Ft(-f)p Fu(.)150 2289 y Ft(echo)870 2420 y(echo)47 b([-neE])f([)p +Fj(arg)g Ft(...])630 2551 y Fu(Output)31 b(the)i Fr(arg)8 +b Fu(s,)33 b(separated)g(b)m(y)g(spaces,)g(terminated)g(with)f(a)h +(newline.)47 b(The)32 b(return)630 2660 y(status)f(is)f(0)h(unless)f(a) +h(write)g(error)f(o)s(ccurs.)41 b(If)30 b Ft(-n)g Fu(is)h(sp)s +(eci\014ed,)f(the)h(trailing)g(newline)g(is)630 2770 +y(suppressed.)38 b(If)29 b(the)h Ft(-e)f Fu(option)h(is)f(giv)m(en,)i +(in)m(terpretation)g(of)e(the)h(follo)m(wing)h(bac)m(kslash-)630 +2880 y(escap)s(ed)43 b(c)m(haracters)h(is)e(enabled.)78 +b(The)42 b Ft(-E)g Fu(option)h(disables)g(the)g(in)m(terpretation)h(of) +630 2989 y(these)27 b(escap)s(e)g(c)m(haracters,)i(ev)m(en)e(on)g +(systems)f(where)g(they)h(are)g(in)m(terpreted)g(b)m(y)f(default.)630 +3099 y(The)32 b Ft(xpg_echo)f Fu(shell)i(option)g(ma)m(y)h(b)s(e)e +(used)g(to)h(dynamically)h(determine)f(whether)f(or)630 +3208 y(not)h Ft(echo)f Fu(expands)g(these)h(escap)s(e)h(c)m(haracters)g +(b)m(y)f(default.)48 b Ft(echo)32 b Fu(do)s(es)g(not)i(in)m(terpret)630 +3318 y Ft(--)c Fu(to)h(mean)f(the)h(end)f(of)g(options.)630 +3449 y Ft(echo)f Fu(in)m(terprets)i(the)f(follo)m(wing)i(escap)s(e)f +(sequences:)630 3601 y Ft(\\a)384 b Fu(alert)31 b(\(b)s(ell\))630 +3753 y Ft(\\b)384 b Fu(bac)m(kspace)630 3905 y Ft(\\c)g +Fu(suppress)28 b(further)h(output)630 4057 y Ft(\\e)630 +4166 y(\\E)384 b Fu(escap)s(e)630 4318 y Ft(\\f)g Fu(form)30 +b(feed)630 4470 y Ft(\\n)384 b Fu(new)30 b(line)630 4622 +y Ft(\\r)384 b Fu(carriage)32 b(return)630 4774 y Ft(\\t)384 +b Fu(horizon)m(tal)32 b(tab)630 4926 y Ft(\\v)384 b Fu(v)m(ertical)32 +b(tab)630 5078 y Ft(\\\\)384 b Fu(bac)m(kslash)630 5230 +y Ft(\\0)p Fj(nnn)240 b Fu(the)32 b(eigh)m(t-bit)i(c)m(haracter)g +(whose)e(v)-5 b(alue)33 b(is)f(the)g(o)s(ctal)i(v)-5 +b(alue)32 b Fr(nnn)f Fu(\(zero)i(to)1110 5340 y(three)e(o)s(ctal)g +(digits\))p eop end +%%Page: 56 62 +TeXDict begin 56 61 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(56)630 299 y Ft(\\x)p +Fj(HH)288 b Fu(the)38 b(eigh)m(t-bit)i(c)m(haracter)g(whose)e(v)-5 +b(alue)39 b(is)f(the)h(hexadecimal)g(v)-5 b(alue)39 b +Fr(HH)1110 408 y Fu(\(one)31 b(or)f(t)m(w)m(o)i(hex)e(digits\))630 +563 y Ft(\\u)p Fj(HHHH)192 b Fu(the)41 b(Unico)s(de)g(\(ISO/IEC)f +(10646\))j(c)m(haracter)g(whose)e(v)-5 b(alue)41 b(is)g(the)g(hex-)1110 +673 y(adecimal)32 b(v)-5 b(alue)31 b Fr(HHHH)41 b Fu(\(one)31 +b(to)g(four)e(hex)h(digits\))630 828 y Ft(\\U)p Fj(HHHHHHHH)1110 +938 y Fu(the)41 b(Unico)s(de)g(\(ISO/IEC)f(10646\))j(c)m(haracter)g +(whose)e(v)-5 b(alue)41 b(is)g(the)g(hex-)1110 1047 y(adecimal)32 +b(v)-5 b(alue)31 b Fr(HHHHHHHH)41 b Fu(\(one)31 b(to)g(eigh)m(t)h(hex)e +(digits\))150 1202 y Ft(enable)870 1334 y(enable)46 b([-a])h([-dnps])f +([-f)g Fj(filename)p Ft(])g([)p Fj(name)g Ft(...)o(])630 +1467 y Fu(Enable)36 b(and)f(disable)h(builtin)g(shell)g(commands.)56 +b(Disabling)37 b(a)g(builtin)e(allo)m(ws)i(a)f(disk)630 +1576 y(command)e(whic)m(h)g(has)g(the)g(same)h(name)f(as)h(a)f(shell)h +(builtin)e(to)i(b)s(e)f(executed)h(without)630 1686 y(sp)s(ecifying)27 +b(a)g(full)g(pathname,)g(ev)m(en)h(though)f(the)g(shell)g(normally)g +(searc)m(hes)h(for)f(builtins)630 1795 y(b)s(efore)35 +b(disk)g(commands.)55 b(If)35 b Ft(-n)g Fu(is)g(used,)h(the)g +Fr(name)5 b Fu(s)35 b(b)s(ecome)h(disabled.)55 b(Otherwise)630 +1905 y Fr(name)5 b Fu(s)44 b(are)h(enabled.)82 b(F)-8 +b(or)45 b(example,)k(to)c(use)f(the)g Ft(test)f Fu(binary)h(found)f +(via)h Ft($PATH)630 2015 y Fu(instead)31 b(of)f(the)h(shell)f(builtin)g +(v)m(ersion,)h(t)m(yp)s(e)g(`)p Ft(enable)e(-n)h(test)p +Fu('.)630 2147 y(If)45 b(the)i Ft(-p)e Fu(option)h(is)g(supplied,)j(or) +d(no)g Fr(name)51 b Fu(argumen)m(ts)46 b(app)s(ear,)k(a)c(list)h(of)f +(shell)630 2256 y(builtins)37 b(is)h(prin)m(ted.)63 b(With)38 +b(no)f(other)h(argumen)m(ts,)j(the)d(list)g(consists)g(of)g(all)h +(enabled)630 2366 y(shell)d(builtins.)57 b(The)35 b Ft(-a)h +Fu(option)g(means)g(to)g(list)h(eac)m(h)g(builtin)f(with)f(an)h +(indication)h(of)630 2476 y(whether)30 b(or)g(not)h(it)g(is)f(enabled.) +630 2608 y(The)22 b Ft(-f)f Fu(option)h(means)g(to)h(load)g(the)f(new)g +(builtin)f(command)h Fr(name)27 b Fu(from)22 b(shared)f(ob)5 +b(ject)630 2717 y Fr(\014lename)p Fu(,)33 b(on)e(systems)h(that)h(supp) +s(ort)d(dynamic)i(loading.)46 b(The)31 b Ft(-d)g Fu(option)h(will)h +(delete)630 2827 y(a)e(builtin)f(loaded)h(with)f Ft(-f)p +Fu(.)630 2959 y(If)j(there)i(are)f(no)g(options,)h(a)f(list)h(of)f(the) +g(shell)g(builtins)g(is)g(displa)m(y)m(ed.)52 b(The)33 +b Ft(-s)g Fu(option)630 3069 y(restricts)j Ft(enable)d +Fu(to)j(the)f Fm(posix)f Fu(sp)s(ecial)i(builtins.)54 +b(If)34 b Ft(-s)h Fu(is)g(used)f(with)g Ft(-f)p Fu(,)i(the)f(new)630 +3178 y(builtin)30 b(b)s(ecomes)h(a)f(sp)s(ecial)h(builtin)f(\(see)i +(Section)f(4.4)g([Sp)s(ecial)g(Builtins],)g(page)g(72\).)630 +3311 y(The)26 b(return)f(status)h(is)g(zero)h(unless)e(a)i +Fr(name)k Fu(is)26 b(not)g(a)h(shell)f(builtin)g(or)g(there)g(is)g(an)g +(error)630 3420 y(loading)31 b(a)g(new)f(builtin)g(from)g(a)g(shared)g +(ob)5 b(ject.)150 3575 y Ft(help)870 3707 y(help)47 b([-dms])f([)p +Fj(pattern)p Ft(])630 3840 y Fu(Displa)m(y)40 b(helpful)e(information)h +(ab)s(out)g(builtin)f(commands.)66 b(If)38 b Fr(pattern)h +Fu(is)g(sp)s(eci\014ed,)630 3949 y Ft(help)28 b Fu(giv)m(es)i(detailed) +g(help)e(on)h(all)h(commands)e(matc)m(hing)i Fr(pattern)p +Fu(,)g(otherwise)f(a)g(list)h(of)630 4059 y(the)h(builtins)e(is)i(prin) +m(ted.)630 4191 y(Options,)f(if)h(supplied,)e(ha)m(v)m(e)i(the)g(follo) +m(wing)h(meanings:)630 4346 y Ft(-d)384 b Fu(Displa)m(y)32 +b(a)e(short)g(description)h(of)f(eac)m(h)i Fr(pattern)630 +4501 y Ft(-m)384 b Fu(Displa)m(y)32 b(the)e(description)g(of)h(eac)m(h) +h Fr(pattern)e Fu(in)g(a)h(manpage-lik)m(e)h(format)630 +4656 y Ft(-s)384 b Fu(Displa)m(y)32 b(only)e(a)h(short)f(usage)h +(synopsis)e(for)i(eac)m(h)g Fr(pattern)630 4811 y Fu(The)f(return)f +(status)i(is)f(zero)h(unless)f(no)g(command)h(matc)m(hes)g +Fr(pattern)p Fu(.)150 4966 y Ft(let)870 5098 y(let)47 +b Fj(expression)e Ft([)p Fj(expression)g Ft(...)o(])630 +5230 y Fu(The)c Ft(let)g Fu(builtin)g(allo)m(ws)i(arithmetic)f(to)h(b)s +(e)d(p)s(erformed)g(on)i(shell)g(v)-5 b(ariables.)74 +b(Eac)m(h)630 5340 y Fr(expression)31 b Fu(is)g(ev)-5 +b(aluated)32 b(according)f(to)h(the)f(rules)g(giv)m(en)h(b)s(elo)m(w)f +(in)f(Section)i(6.5)g([Shell)p eop end +%%Page: 57 63 +TeXDict begin 57 62 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(57)630 299 y(Arithmetic],)51 +b(page)46 b(93.)87 b(If)45 b(the)g(last)h Fr(expression)g +Fu(ev)-5 b(aluates)47 b(to)f(0,)k Ft(let)44 b Fu(returns)g(1;)630 +408 y(otherwise)31 b(0)g(is)f(returned.)150 568 y Ft(local)870 +702 y(local)46 b([)p Fj(option)p Ft(])g Fj(name)p Ft([=)p +Fj(value)p Ft(])e(...)630 836 y Fu(F)-8 b(or)27 b(eac)m(h)g(argumen)m +(t,)g(a)f(lo)s(cal)h(v)-5 b(ariable)27 b(named)e Fr(name)31 +b Fu(is)26 b(created,)i(and)d(assigned)h Fr(v)-5 b(alue)p +Fu(.)630 946 y(The)37 b Fr(option)h Fu(can)f(b)s(e)g(an)m(y)h(of)f(the) +h(options)g(accepted)g(b)m(y)g Ft(declare)p Fu(.)59 b +Ft(local)36 b Fu(can)i(only)630 1055 y(b)s(e)j(used)h(within)f(a)i +(function;)48 b(it)42 b(mak)m(es)h(the)f(v)-5 b(ariable)43 +b Fr(name)48 b Fu(ha)m(v)m(e)43 b(a)f(visible)h(scop)s(e)630 +1165 y(restricted)h(to)f(that)h(function)e(and)g(its)i(c)m(hildren.)78 +b(If)42 b Fr(name)48 b Fu(is)43 b(`)p Ft(-)p Fu(',)j(the)d(set)h(of)f +(shell)630 1275 y(options)34 b(is)f(made)g(lo)s(cal)i(to)f(the)f +(function)g(in)g(whic)m(h)g Ft(local)f Fu(is)h(in)m(v)m(ok)m(ed:)48 +b(shell)34 b(options)630 1384 y(c)m(hanged)e(using)e(the)i +Ft(set)e Fu(builtin)h(inside)g(the)g(function)g(are)g(restored)h(to)g +(their)f(original)630 1494 y(v)-5 b(alues)36 b(when)e(the)i(function)f +(returns.)54 b(The)35 b(restore)h(is)g(e\013ected)h(as)e(if)h(a)g +(series)f(of)h Ft(set)630 1603 y Fu(commands)j(w)m(ere)g(executed)h(to) +f(restore)h(the)f(v)-5 b(alues)39 b(that)h(w)m(ere)f(in)f(place)i(b)s +(efore)f(the)630 1713 y(function.)j(The)30 b(return)g(status)h(is)g +(zero)h(unless)e Ft(local)g Fu(is)h(used)f(outside)h(a)g(function,)g +(an)630 1823 y(in)m(v)-5 b(alid)31 b Fr(name)k Fu(is)c(supplied,)e(or)i +Fr(name)k Fu(is)c(a)f(readonly)h(v)-5 b(ariable.)150 +1982 y Ft(logout)870 2116 y(logout)46 b([)p Fj(n)p Ft(])630 +2250 y Fu(Exit)31 b(a)g(login)g(shell,)g(returning)e(a)i(status)g(of)f +Fr(n)g Fu(to)h(the)g(shell's)f(paren)m(t.)150 2409 y +Ft(mapfile)870 2544 y(mapfile)46 b([-d)h Fj(delim)p Ft(])f([-n)h +Fj(count)p Ft(])f([-O)h Fj(origin)p Ft(])f([-s)g Fj(count)p +Ft(])1061 2653 y([-t])h([-u)f Fj(fd)p Ft(])h([-C)g Fj(callback)p +Ft(])f([-c)g Fj(quantum)p Ft(])g([)p Fj(array)p Ft(])630 +2788 y Fu(Read)38 b(lines)f(from)g(the)h(standard)e(input)g(in)m(to)j +(the)e(indexed)g(arra)m(y)h(v)-5 b(ariable)38 b Fr(arra)m(y)p +Fu(,)i(or)630 2897 y(from)28 b(\014le)h(descriptor)f +Fr(fd)k Fu(if)c(the)h Ft(-u)f Fu(option)h(is)g(supplied.)39 +b(The)28 b(v)-5 b(ariable)29 b Ft(MAPFILE)e Fu(is)i(the)630 +3007 y(default)i Fr(arra)m(y)p Fu(.)41 b(Options,)30 +b(if)g(supplied,)g(ha)m(v)m(e)h(the)g(follo)m(wing)h(meanings:)630 +3166 y Ft(-d)384 b Fu(The)37 b(\014rst)g(c)m(haracter)i(of)f +Fr(delim)g Fu(is)f(used)g(to)h(terminate)h(eac)m(h)g(input)d(line,)1110 +3275 y(rather)41 b(than)h(newline.)74 b(If)41 b Fr(delim)h +Fu(is)g(the)f(empt)m(y)h(string,)j Ft(mapfile)40 b Fu(will)1110 +3385 y(terminate)31 b(a)g(line)g(when)e(it)i(reads)f(a)h(NUL)g(c)m +(haracter.)630 3544 y Ft(-n)384 b Fu(Cop)m(y)30 b(at)h(most)g +Fr(coun)m(t)i Fu(lines.)41 b(If)30 b Fr(coun)m(t)j Fu(is)d(0,)h(all)h +(lines)e(are)h(copied.)630 3703 y Ft(-O)384 b Fu(Begin)31 +b(assigning)g(to)g Fr(arra)m(y)39 b Fu(at)31 b(index)f +Fr(origin)p Fu(.)41 b(The)30 b(default)h(index)f(is)g(0.)630 +3862 y Ft(-s)384 b Fu(Discard)31 b(the)f(\014rst)g Fr(coun)m(t)j +Fu(lines)e(read.)630 4021 y Ft(-t)384 b Fu(Remo)m(v)m(e)32 +b(a)f(trailing)g Fr(delim)g Fu(\(default)g(newline\))f(from)g(eac)m(h)i +(line)f(read.)630 4180 y Ft(-u)384 b Fu(Read)31 b(lines)f(from)g +(\014le)h(descriptor)f Fr(fd)j Fu(instead)e(of)f(the)h(standard)e +(input.)630 4340 y Ft(-C)384 b Fu(Ev)-5 b(aluate)26 b +Fr(callbac)m(k)33 b Fu(eac)m(h)26 b(time)g Fr(quan)m(tum)f +Fu(lines)g(are)g(read.)39 b(The)25 b Ft(-c)f Fu(option)1110 +4449 y(sp)s(eci\014es)30 b Fr(quan)m(tum)p Fu(.)630 4608 +y Ft(-c)384 b Fu(Sp)s(ecify)30 b(the)g(n)m(um)m(b)s(er)f(of)i(lines)f +(read)h(b)s(et)m(w)m(een)g(eac)m(h)g(call)h(to)f Fr(callbac)m(k)p +Fu(.)630 4767 y(If)36 b Ft(-C)g Fu(is)g(sp)s(eci\014ed)g(without)g +Ft(-c)p Fu(,)h(the)g(default)f(quan)m(tum)g(is)h(5000.)60 +b(When)36 b Fr(callbac)m(k)44 b Fu(is)630 4877 y(ev)-5 +b(aluated,)30 b(it)e(is)g(supplied)f(the)h(index)f(of)i(the)f(next)g +(arra)m(y)g(elemen)m(t)h(to)g(b)s(e)e(assigned)i(and)630 +4986 y(the)39 b(line)g(to)h(b)s(e)e(assigned)h(to)h(that)f(elemen)m(t)i +(as)e(additional)h(argumen)m(ts.)66 b Fr(callbac)m(k)47 +b Fu(is)630 5096 y(ev)-5 b(aluated)32 b(after)e(the)h(line)g(is)f(read) +g(but)g(b)s(efore)g(the)h(arra)m(y)g(elemen)m(t)g(is)g(assigned.)630 +5230 y(If)25 b(not)g(supplied)f(with)h(an)g(explicit)i(origin,)g +Ft(mapfile)c Fu(will)j(clear)g Fr(arra)m(y)34 b Fu(b)s(efore)24 +b(assigning)630 5340 y(to)31 b(it.)p eop end +%%Page: 58 64 +TeXDict begin 58 63 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(58)630 299 y Ft(mapfile)41 +b Fu(returns)g(successfully)i(unless)e(an)i(in)m(v)-5 +b(alid)43 b(option)g(or)g(option)g(argumen)m(t)g(is)630 +408 y(supplied,)29 b Fr(arra)m(y)39 b Fu(is)30 b(in)m(v)-5 +b(alid)31 b(or)g(unassignable,)f(or)h Fr(arra)m(y)38 +b Fu(is)31 b(not)f(an)h(indexed)e(arra)m(y)-8 b(.)150 +564 y Ft(printf)870 697 y(printf)46 b([-v)h Fj(var)p +Ft(])g Fj(format)f Ft([)p Fj(arguments)p Ft(])630 830 +y Fu(W)-8 b(rite)27 b(the)g(formatted)f Fr(argumen)m(ts)k +Fu(to)d(the)f(standard)f(output)h(under)e(the)i(con)m(trol)i(of)e(the) +630 939 y Fr(format)p Fu(.)66 b(The)39 b Ft(-v)f Fu(option)h(causes)g +(the)g(output)g(to)g(b)s(e)f(assigned)h(to)h(the)f(v)-5 +b(ariable)39 b Fr(v)-5 b(ar)630 1049 y Fu(rather)30 b(than)g(b)s(eing)g +(prin)m(ted)g(to)h(the)g(standard)e(output.)630 1181 +y(The)36 b Fr(format)i Fu(is)f(a)f(c)m(haracter)i(string)e(whic)m(h)g +(con)m(tains)i(three)e(t)m(yp)s(es)g(of)h(ob)5 b(jects:)53 +b(plain)630 1291 y(c)m(haracters,)41 b(whic)m(h)c(are)h(simply)e +(copied)i(to)g(standard)f(output,)i(c)m(haracter)g(escap)s(e)e(se-)630 +1401 y(quences,)g(whic)m(h)f(are)g(con)m(v)m(erted)h(and)f(copied)g(to) +g(the)g(standard)f(output,)i(and)f(format)630 1510 y(sp)s +(eci\014cations,)j(eac)m(h)e(of)g(whic)m(h)f(causes)g(prin)m(ting)g(of) +h(the)f(next)h(successiv)m(e)g Fr(argumen)m(t)p Fu(.)630 +1620 y(In)24 b(addition)h(to)g(the)g(standard)f Ft(printf\(1\))e +Fu(formats,)27 b Ft(printf)c Fu(in)m(terprets)i(the)f(follo)m(wing)630 +1729 y(extensions:)630 1885 y Ft(\045b)384 b Fu(Causes)38 +b Ft(printf)f Fu(to)j(expand)e(bac)m(kslash)h(escap)s(e)g(sequences)g +(in)f(the)h(cor-)1110 1995 y(resp)s(onding)31 b Fr(argumen)m(t)j +Fu(in)e(the)h(same)f(w)m(a)m(y)h(as)g Ft(echo)c(-e)j +Fu(\(see)h(Section)g(4.2)1110 2104 y([Bash)e(Builtins],)g(page)g(51\).) +630 2260 y Ft(\045q)384 b Fu(Causes)32 b Ft(printf)e +Fu(to)i(output)g(the)g(corresp)s(onding)f Fr(argumen)m(t)j +Fu(in)d(a)i(format)1110 2370 y(that)e(can)g(b)s(e)e(reused)h(as)h +(shell)f(input.)630 2525 y Ft(\045\()p Fj(datefmt)p Ft(\)T)1110 +2635 y Fu(Causes)f Ft(printf)e Fu(to)j(output)f(the)g(date-time)i +(string)e(resulting)h(from)e(using)1110 2744 y Fr(datefm)m(t)45 +b Fu(as)d(a)g(format)g(string)g(for)g Ft(strftime)p Fu(\(3\).)74 +b(The)41 b(corresp)s(onding)1110 2854 y Fr(argumen)m(t)h +Fu(is)e(an)g(in)m(teger)i(represen)m(ting)e(the)g(n)m(um)m(b)s(er)f(of) +h(seconds)g(since)1110 2964 y(the)24 b(ep)s(o)s(c)m(h.)38 +b(Tw)m(o)24 b(sp)s(ecial)h(argumen)m(t)f(v)-5 b(alues)24 +b(ma)m(y)h(b)s(e)e(used:)36 b(-1)25 b(represen)m(ts)1110 +3073 y(the)30 b(curren)m(t)g(time,)h(and)e(-2)i(represen)m(ts)f(the)g +(time)h(the)f(shell)g(w)m(as)g(in)m(v)m(ok)m(ed.)1110 +3183 y(If)38 b(no)g(argumen)m(t)h(is)f(sp)s(eci\014ed,)i(con)m(v)m +(ersion)f(b)s(eha)m(v)m(es)g(as)g(if)f(-1)h(had)f(b)s(een)1110 +3292 y(giv)m(en.)k(This)29 b(is)i(an)f(exception)i(to)f(the)f(usual)g +Ft(printf)f Fu(b)s(eha)m(vior.)630 3448 y(The)d(\045b,)h(\045q,)h(and)e +(\045T)g(directiv)m(es)j(all)e(use)g(the)g(\014eld)f(width)g(and)h +(precision)g(argumen)m(ts)630 3558 y(from)f(the)g(format)h(sp)s +(eci\014cation)g(and)e(write)i(that)f(man)m(y)h(b)m(ytes)f(from)g(\(or) +h(use)e(that)i(wide)630 3667 y(a)42 b(\014eld)g(for\))g(the)h(expanded) +e(argumen)m(t,)k(whic)m(h)d(usually)g(con)m(tains)h(more)f(c)m +(haracters)630 3777 y(than)30 b(the)h(original.)630 3910 +y(Argumen)m(ts)d(to)h(non-string)e(format)i(sp)s(eci\014ers)e(are)h +(treated)h(as)g(C)e(language)j(constan)m(ts,)630 4019 +y(except)22 b(that)g(a)g(leading)g(plus)e(or)h(min)m(us)f(sign)i(is)f +(allo)m(w)m(ed,)k(and)c(if)g(the)g(leading)h(c)m(haracter)h(is)630 +4129 y(a)i(single)g(or)f(double)h(quote,)h(the)f(v)-5 +b(alue)25 b(is)f(the)h(ASCI)s(I)e(v)-5 b(alue)25 b(of)f(the)h(follo)m +(wing)h(c)m(haracter.)630 4261 y(The)31 b Fr(format)i +Fu(is)f(reused)e(as)i(necessary)f(to)i(consume)e(all)h(of)f(the)h +Fr(argumen)m(ts)p Fu(.)44 b(If)30 b(the)i Fr(for-)630 +4371 y(mat)c Fu(requires)e(more)g Fr(argumen)m(ts)k Fu(than)25 +b(are)i(supplied,)e(the)h(extra)h(format)f(sp)s(eci\014cations)630 +4481 y(b)s(eha)m(v)m(e)j(as)g(if)f(a)h(zero)g(v)-5 b(alue)29 +b(or)g(n)m(ull)f(string,)h(as)g(appropriate,)g(had)f(b)s(een)g +(supplied.)38 b(The)630 4590 y(return)29 b(v)-5 b(alue)31 +b(is)g(zero)g(on)f(success,)h(non-zero)g(on)f(failure.)150 +4746 y Ft(read)870 4879 y(read)47 b([-ers])f([-a)h Fj(aname)p +Ft(])f([-d)h Fj(delim)p Ft(])f([-i)h Fj(text)p Ft(])f([-n)h +Fj(nchars)p Ft(])1061 4988 y([-N)g Fj(nchars)p Ft(])f([-p)h +Fj(prompt)p Ft(])e([-t)i Fj(timeout)p Ft(])f([-u)h Fj(fd)p +Ft(])g([)p Fj(name)f Ft(...)o(])630 5121 y Fu(One)38 +b(line)g(is)g(read)g(from)g(the)g(standard)f(input,)j(or)e(from)f(the)i +(\014le)f(descriptor)g Fr(fd)j Fu(sup-)630 5230 y(plied)34 +b(as)h(an)f(argumen)m(t)h(to)g(the)f Ft(-u)g Fu(option,)i(split)f(in)m +(to)g(w)m(ords)f(as)g(describ)s(ed)g(ab)s(o)m(v)m(e)h(in)630 +5340 y(Section)j(3.5.7)h([W)-8 b(ord)38 b(Splitting],)i(page)e(32,)j +(and)36 b(the)i(\014rst)f(w)m(ord)g(is)g(assigned)h(to)g(the)p +eop end +%%Page: 59 65 +TeXDict begin 59 64 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(59)630 299 y(\014rst)32 +b Fr(name)p Fu(,)h(the)g(second)g(w)m(ord)f(to)h(the)g(second)g +Fr(name)p Fu(,)g(and)f(so)h(on.)47 b(If)32 b(there)h(are)g(more)630 +408 y(w)m(ords)39 b(than)g(names,)j(the)e(remaining)f(w)m(ords)g(and)g +(their)h(in)m(terv)m(ening)g(delimiters)h(are)630 518 +y(assigned)29 b(to)h(the)g(last)g Fr(name)p Fu(.)40 b(If)29 +b(there)g(are)h(few)m(er)f(w)m(ords)g(read)g(from)g(the)g(input)g +(stream)630 628 y(than)35 b(names,)i(the)e(remaining)h(names)f(are)h +(assigned)f(empt)m(y)h(v)-5 b(alues.)56 b(The)34 b(c)m(haracters)630 +737 y(in)e(the)h(v)-5 b(alue)33 b(of)g(the)g Ft(IFS)f +Fu(v)-5 b(ariable)33 b(are)h(used)d(to)j(split)f(the)g(line)g(in)m(to)g +(w)m(ords)g(using)f(the)630 847 y(same)d(rules)f(the)g(shell)h(uses)f +(for)g(expansion)g(\(describ)s(ed)g(ab)s(o)m(v)m(e)i(in)e(Section)h +(3.5.7)h([W)-8 b(ord)630 956 y(Splitting],)38 b(page)f(32\).)60 +b(The)35 b(bac)m(kslash)i(c)m(haracter)h(`)p Ft(\\)p +Fu(')e(ma)m(y)h(b)s(e)f(used)f(to)i(remo)m(v)m(e)h(an)m(y)630 +1066 y(sp)s(ecial)31 b(meaning)g(for)f(the)g(next)h(c)m(haracter)h +(read)e(and)g(for)g(line)h(con)m(tin)m(uation.)630 1196 +y(Options,)f(if)h(supplied,)e(ha)m(v)m(e)i(the)g(follo)m(wing)h +(meanings:)630 1348 y Ft(-a)e Fj(aname)114 b Fu(The)34 +b(w)m(ords)f(are)i(assigned)f(to)h(sequen)m(tial)h(indices)e(of)g(the)g +(arra)m(y)h(v)-5 b(ariable)1110 1457 y Fr(aname)p Fu(,)29 +b(starting)h(at)f(0.)40 b(All)29 b(elemen)m(ts)h(are)e(remo)m(v)m(ed)i +(from)d Fr(aname)34 b Fu(b)s(efore)1110 1567 y(the)d(assignmen)m(t.)41 +b(Other)30 b Fr(name)36 b Fu(argumen)m(ts)30 b(are)h(ignored.)630 +1718 y Ft(-d)f Fj(delim)114 b Fu(The)41 b(\014rst)h(c)m(haracter)h(of)f +Fr(delim)g Fu(is)g(used)g(to)g(terminate)h(the)f(input)f(line,)1110 +1828 y(rather)31 b(than)g(newline.)42 b(If)30 b Fr(delim)h +Fu(is)g(the)h(empt)m(y)f(string,)g Ft(read)f Fu(will)h(termi-)1110 +1937 y(nate)g(a)g(line)f(when)g(it)h(reads)f(a)h(NUL)f(c)m(haracter.) +630 2089 y Ft(-e)384 b Fu(Readline)46 b(\(see)g(Chapter)e(8)h([Command) +f(Line)h(Editing],)50 b(page)45 b(111\))i(is)1110 2198 +y(used)37 b(to)i(obtain)g(the)f(line.)65 b(Readline)39 +b(uses)e(the)i(curren)m(t)f(\(or)g(default,)j(if)1110 +2308 y(line)h(editing)g(w)m(as)g(not)g(previously)f(activ)m(e\))k +(editing)d(settings,)j(but)c(uses)1110 2418 y(Readline's)31 +b(default)g(\014lename)f(completion.)630 2569 y Ft(-i)g +Fj(text)162 b Fu(If)36 b(Readline)i(is)f(b)s(eing)g(used)f(to)h(read)g +(the)g(line,)j Fr(text)f Fu(is)e(placed)h(in)m(to)g(the)1110 +2679 y(editing)31 b(bu\013er)e(b)s(efore)h(editing)h(b)s(egins.)630 +2830 y Ft(-n)f Fj(nchars)66 b Ft(read)38 b Fu(returns)f(after)j +(reading)f Fr(nc)m(hars)j Fu(c)m(haracters)e(rather)f(than)g(w)m +(aiting)1110 2939 y(for)d(a)h(complete)h(line)f(of)g(input,)g(but)f +(honors)g(a)h(delimiter)g(if)f(few)m(er)h(than)1110 3049 +y Fr(nc)m(hars)d Fu(c)m(haracters)e(are)e(read)h(b)s(efore)f(the)g +(delimiter.)630 3200 y Ft(-N)g Fj(nchars)66 b Ft(read)39 +b Fu(returns)f(after)j(reading)e(exactly)j Fr(nc)m(hars)h +Fu(c)m(haracters)f(rather)d(than)1110 3310 y(w)m(aiting)32 +b(for)f(a)g(complete)i(line)e(of)g(input,)g(unless)f(EOF)h(is)g(encoun) +m(tered)g(or)1110 3420 y Ft(read)f Fu(times)i(out.)43 +b(Delimiter)33 b(c)m(haracters)f(encoun)m(tered)g(in)f(the)g(input)g +(are)1110 3529 y(not)g(treated)h(sp)s(ecially)f(and)f(do)h(not)g(cause) +g Ft(read)e Fu(to)j(return)d(un)m(til)i Fr(nc)m(hars)1110 +3639 y Fu(c)m(haracters)26 b(are)f(read.)38 b(The)24 +b(result)g(is)h(not)f(split)h(on)f(the)h(c)m(haracters)h(in)e +Ft(IFS)p Fu(;)1110 3748 y(the)e(in)m(ten)m(t)i(is)e(that)h(the)f(v)-5 +b(ariable)23 b(is)f(assigned)g(exactly)i(the)e(c)m(haracters)i(read) +1110 3858 y(\(with)30 b(the)h(exception)h(of)e(bac)m(kslash;)h(see)g +(the)g Ft(-r)f Fu(option)h(b)s(elo)m(w\).)630 4009 y +Ft(-p)f Fj(prompt)66 b Fu(Displa)m(y)38 b Fr(prompt)p +Fu(,)g(without)e(a)h(trailing)h(newline,)h(b)s(efore)d(attempting)i(to) +1110 4119 y(read)f(an)m(y)h(input.)60 b(The)37 b(prompt)g(is)g(displa)m +(y)m(ed)h(only)f(if)g(input)g(is)g(coming)1110 4228 y(from)30 +b(a)h(terminal.)630 4380 y Ft(-r)384 b Fu(If)21 b(this)h(option)g(is)f +(giv)m(en,)k(bac)m(kslash)d(do)s(es)f(not)h(act)h(as)f(an)f(escap)s(e)h +(c)m(haracter.)1110 4489 y(The)30 b(bac)m(kslash)i(is)f(considered)g +(to)h(b)s(e)e(part)h(of)g(the)g(line.)43 b(In)30 b(particular,)i(a)1110 +4599 y(bac)m(kslash-newline)26 b(pair)e(ma)m(y)h(not)g(then)g(b)s(e)f +(used)g(as)h(a)g(line)g(con)m(tin)m(uation.)630 4750 +y Ft(-s)384 b Fu(Silen)m(t)28 b(mo)s(de.)40 b(If)27 b(input)f(is)i +(coming)g(from)f(a)h(terminal,)h(c)m(haracters)g(are)f(not)1110 +4860 y(ec)m(ho)s(ed.)630 5011 y Ft(-t)i Fj(timeout)1110 +5121 y Fu(Cause)42 b Ft(read)g Fu(to)h(time)h(out)f(and)f(return)f +(failure)i(if)g(a)g(complete)h(line)f(of)1110 5230 y(input)26 +b(\(or)h(a)g(sp)s(eci\014ed)f(n)m(um)m(b)s(er)g(of)h(c)m(haracters\))h +(is)f(not)g(read)g(within)f Fr(time-)1110 5340 y(out)37 +b Fu(seconds.)53 b Fr(timeout)38 b Fu(ma)m(y)d(b)s(e)f(a)h(decimal)h(n) +m(um)m(b)s(er)d(with)h(a)h(fractional)p eop end +%%Page: 60 66 +TeXDict begin 60 65 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(60)1110 299 y(p)s(ortion)29 +b(follo)m(wing)h(the)f(decimal)h(p)s(oin)m(t.)40 b(This)29 +b(option)g(is)g(only)g(e\013ectiv)m(e)j(if)1110 408 y +Ft(read)j Fu(is)i(reading)g(input)e(from)h(a)h(terminal,)i(pip)s(e,)e +(or)g(other)f(sp)s(ecial)i(\014le;)1110 518 y(it)31 b(has)g(no)g +(e\013ect)h(when)e(reading)h(from)g(regular)g(\014les.)42 +b(If)30 b Ft(read)g Fu(times)h(out,)1110 628 y Ft(read)d +Fu(sa)m(v)m(es)j(an)m(y)f(partial)h(input)d(read)i(in)m(to)h(the)e(sp)s +(eci\014ed)g(v)-5 b(ariable)31 b Fr(name)p Fu(.)1110 +737 y(If)k Fr(timeout)j Fu(is)e(0,)h Ft(read)e Fu(returns)f +(immediately)-8 b(,)39 b(without)c(trying)h(to)g(read)1110 +847 y(an)m(y)c(data.)44 b(The)31 b(exit)h(status)f(is)h(0)f(if)h(input) +e(is)h(a)m(v)-5 b(ailable)34 b(on)d(the)h(sp)s(eci\014ed)1110 +956 y(\014le)g(descriptor,)g(non-zero)h(otherwise.)46 +b(The)31 b(exit)i(status)f(is)g(greater)h(than)1110 1066 +y(128)f(if)e(the)h(timeout)g(is)f(exceeded.)630 1225 +y Ft(-u)g Fj(fd)258 b Fu(Read)31 b(input)e(from)h(\014le)g(descriptor)h +Fr(fd)p Fu(.)630 1385 y(If)h(no)g Fr(name)5 b Fu(s)33 +b(are)f(supplied,)g(the)h(line)g(read,)g(without)f(the)h(ending)f +(delimiter)h(but)e(oth-)630 1494 y(erwise)36 b(unmo)s(di\014ed,)e(is)i +(assigned)f(to)h(the)g(v)-5 b(ariable)36 b Ft(REPLY)p +Fu(.)55 b(The)34 b(exit)j(status)e(is)h(zero,)630 1604 +y(unless)i(end-of-\014le)h(is)f(encoun)m(tered,)j Ft(read)d +Fu(times)h(out)f(\(in)h(whic)m(h)f(case)h(the)g(status)g(is)630 +1714 y(greater)31 b(than)f(128\),)i(a)e(v)-5 b(ariable)30 +b(assignmen)m(t)h(error)f(\(suc)m(h)f(as)i(assigning)f(to)h(a)f +(readonly)630 1823 y(v)-5 b(ariable\))30 b(o)s(ccurs,)f(or)f(an)h(in)m +(v)-5 b(alid)29 b(\014le)g(descriptor)f(is)h(supplied)e(as)i(the)g +(argumen)m(t)g(to)g Ft(-u)p Fu(.)150 1983 y Ft(readarray)870 +2092 y(readarray)45 b([-d)i Fj(delim)p Ft(])f([-n)h Fj(count)p +Ft(])f([-O)h Fj(origin)p Ft(])f([-s)h Fj(count)p Ft(])1061 +2202 y([-t])g([-u)f Fj(fd)p Ft(])h([-C)g Fj(callback)p +Ft(])f([-c)g Fj(quantum)p Ft(])g([)p Fj(array)p Ft(])630 +2336 y Fu(Read)38 b(lines)f(from)g(the)h(standard)e(input)g(in)m(to)j +(the)e(indexed)g(arra)m(y)h(v)-5 b(ariable)38 b Fr(arra)m(y)p +Fu(,)i(or)630 2446 y(from)30 b(\014le)g(descriptor)h +Fr(fd)i Fu(if)d(the)h Ft(-u)e Fu(option)i(is)g(supplied.)630 +2580 y(A)f(synon)m(ym)g(for)g Ft(mapfile)p Fu(.)150 2740 +y Ft(source)870 2874 y(source)46 b Fj(filename)630 3009 +y Fu(A)30 b(synon)m(ym)g(for)g Ft(.)g Fu(\(see)i(Section)f(4.1)g +([Bourne)g(Shell)f(Builtins],)h(page)g(44\).)150 3168 +y Ft(type)870 3303 y(type)47 b([-afptP])e([)p Fj(name)i +Ft(...)o(])630 3437 y Fu(F)-8 b(or)42 b(eac)m(h)g Fr(name)p +Fu(,)i(indicate)e(ho)m(w)g(it)f(w)m(ould)g(b)s(e)g(in)m(terpreted)g(if) +g(used)f(as)i(a)f(command)630 3547 y(name.)630 3681 y(If)g(the)g +Ft(-t)g Fu(option)h(is)f(used,)j Ft(type)c Fu(prin)m(ts)h(a)h(single)g +(w)m(ord)f(whic)m(h)g(is)g(one)h(of)g(`)p Ft(alias)p +Fu(',)630 3791 y(`)p Ft(function)p Fu(',)32 b(`)p Ft(builtin)p +Fu(',)g(`)p Ft(file)p Fu(')g(or)h(`)p Ft(keyword)p Fu(',)f(if)h +Fr(name)38 b Fu(is)33 b(an)f(alias,)j(shell)e(function,)630 +3900 y(shell)i(builtin,)g(disk)g(\014le,)h(or)e(shell)h(reserv)m(ed)g +(w)m(ord,)h(resp)s(ectiv)m(ely)-8 b(.)55 b(If)34 b(the)h +Fr(name)40 b Fu(is)35 b(not)630 4010 y(found,)29 b(then)h(nothing)h(is) +f(prin)m(ted,)g(and)g Ft(type)f Fu(returns)g(a)i(failure)g(status.)630 +4144 y(If)25 b(the)g Ft(-p)g Fu(option)h(is)f(used,)h +Ft(type)e Fu(either)h(returns)g(the)g(name)g(of)h(the)f(disk)g(\014le)g +(that)h(w)m(ould)630 4254 y(b)s(e)k(executed,)h(or)g(nothing)f(if)g +Ft(-t)g Fu(w)m(ould)g(not)h(return)e(`)p Ft(file)p Fu('.)630 +4389 y(The)h Ft(-P)g Fu(option)h(forces)g(a)g(path)f(searc)m(h)h(for)g +(eac)m(h)g Fr(name)p Fu(,)g(ev)m(en)g(if)g Ft(-t)f Fu(w)m(ould)g(not)h +(return)630 4498 y(`)p Ft(file)p Fu('.)630 4633 y(If)f(a)g(command)g +(is)g(hashed,)f Ft(-p)h Fu(and)f Ft(-P)g Fu(prin)m(t)h(the)g(hashed)f +(v)-5 b(alue,)31 b(whic)m(h)f(is)g(not)g(neces-)630 4742 +y(sarily)h(the)f(\014le)h(that)g(app)s(ears)e(\014rst)h(in)g +Ft($PATH)p Fu(.)630 4877 y(If)22 b(the)i Ft(-a)e Fu(option)h(is)g +(used,)h Ft(type)e Fu(returns)f(all)j(of)f(the)g(places)h(that)f(con)m +(tain)i(an)d(executable)630 4986 y(named)32 b Fr(\014le)p +Fu(.)49 b(This)32 b(includes)h(aliases)h(and)e(functions,)i(if)f(and)f +(only)h(if)g(the)g Ft(-p)f Fu(option)i(is)630 5096 y(not)d(also)g +(used.)630 5230 y(If)f(the)g Ft(-f)g Fu(option)g(is)h(used,)e +Ft(type)g Fu(do)s(es)h(not)h(attempt)g(to)g(\014nd)d(shell)j +(functions,)f(as)g(with)630 5340 y(the)h Ft(command)d +Fu(builtin.)p eop end +%%Page: 61 67 +TeXDict begin 61 66 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(61)630 299 y(The)31 +b(return)f(status)h(is)g(zero)h(if)f(all)h(of)f(the)h +Fr(names)i Fu(are)e(found,)e(non-zero)i(if)f(an)m(y)g(are)h(not)630 +408 y(found.)150 566 y Ft(typeset)870 700 y(typeset)46 +b([-afFgrxilnrtux])d([-p])k([)p Fj(name)p Ft([=)p Fj(value)p +Ft(])d(...)o(])630 834 y Fu(The)31 b Ft(typeset)e Fu(command)i(is)g +(supplied)f(for)h(compatibilit)m(y)i(with)e(the)g(Korn)f(shell.)44 +b(It)31 b(is)630 943 y(a)g(synon)m(ym)f(for)g(the)g Ft(declare)f +Fu(builtin)h(command.)150 1101 y Ft(ulimit)870 1235 y(ulimit)46 +b([-HS])g(-a)870 1344 y(ulimit)g([-HS])g([-bcdefiklmnpqrstuvxPRT])c([)p +Fj(limit)p Ft(])630 1478 y(ulimit)25 b Fu(pro)m(vides)h(con)m(trol)i(o) +m(v)m(er)g(the)f(resources)f(a)m(v)-5 b(ailable)29 b(to)e(pro)s(cesses) +f(started)h(b)m(y)g(the)630 1588 y(shell,)i(on)f(systems)g(that)h(allo) +m(w)h(suc)m(h)e(con)m(trol.)41 b(If)28 b(an)g(option)h(is)f(giv)m(en,)i +(it)e(is)h(in)m(terpreted)630 1697 y(as)i(follo)m(ws:)630 +1855 y Ft(-S)384 b Fu(Change)30 b(and)g(rep)s(ort)g(the)g(soft)h(limit) +g(asso)s(ciated)h(with)e(a)h(resource.)630 2013 y Ft(-H)384 +b Fu(Change)30 b(and)g(rep)s(ort)g(the)g(hard)g(limit)h(asso)s(ciated)h +(with)e(a)h(resource.)630 2171 y Ft(-a)384 b Fu(All)31 +b(curren)m(t)f(limits)h(are)g(rep)s(orted;)f(no)g(limits)h(are)g(set.) +630 2328 y Ft(-b)384 b Fu(The)30 b(maxim)m(um)g(so)s(c)m(k)m(et)i +(bu\013er)e(size.)630 2486 y Ft(-c)384 b Fu(The)30 b(maxim)m(um)g(size) +h(of)g(core)g(\014les)f(created.)630 2644 y Ft(-d)384 +b Fu(The)30 b(maxim)m(um)g(size)h(of)g(a)g(pro)s(cess's)f(data)h +(segmen)m(t.)630 2802 y Ft(-e)384 b Fu(The)30 b(maxim)m(um)g(sc)m +(heduling)h(priorit)m(y)f(\()p Ft(")p Fu(nice)p Ft(")p +Fu(\).)630 2960 y Ft(-f)384 b Fu(The)30 b(maxim)m(um)g(size)h(of)g +(\014les)f(written)h(b)m(y)f(the)g(shell)h(and)f(its)h(c)m(hildren.)630 +3118 y Ft(-i)384 b Fu(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(p)s +(ending)e(signals.)630 3275 y Ft(-k)384 b Fu(The)30 b(maxim)m(um)g(n)m +(um)m(b)s(er)f(of)i(kqueues)f(that)h(ma)m(y)g(b)s(e)e(allo)s(cated.)630 +3433 y Ft(-l)384 b Fu(The)30 b(maxim)m(um)g(size)h(that)g(ma)m(y)g(b)s +(e)f(lo)s(c)m(k)m(ed)i(in)m(to)f(memory)-8 b(.)630 3591 +y Ft(-m)384 b Fu(The)36 b(maxim)m(um)g(residen)m(t)h(set)g(size)g +(\(man)m(y)g(systems)f(do)h(not)f(honor)g(this)1110 3701 +y(limit\).)630 3858 y Ft(-n)384 b Fu(The)38 b(maxim)m(um)h(n)m(um)m(b)s +(er)e(of)i(op)s(en)f(\014le)h(descriptors)g(\(most)g(systems)g(do)1110 +3968 y(not)31 b(allo)m(w)g(this)g(v)-5 b(alue)31 b(to)g(b)s(e)e(set\).) +630 4126 y Ft(-p)384 b Fu(The)30 b(pip)s(e)f(bu\013er)h(size.)630 +4284 y Ft(-q)384 b Fu(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(b)m +(ytes)g(in)f Fm(posix)f Fu(message)j(queues.)630 4441 +y Ft(-r)384 b Fu(The)30 b(maxim)m(um)g(real-time)i(sc)m(heduling)f +(priorit)m(y)-8 b(.)630 4599 y Ft(-s)384 b Fu(The)30 +b(maxim)m(um)g(stac)m(k)i(size.)630 4757 y Ft(-t)384 +b Fu(The)30 b(maxim)m(um)g(amoun)m(t)h(of)f(cpu)g(time)h(in)f(seconds.) +630 4915 y Ft(-u)384 b Fu(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i +(pro)s(cesses)f(a)m(v)-5 b(ailable)33 b(to)e(a)f(single)i(user.)630 +5073 y Ft(-v)384 b Fu(The)41 b(maxim)m(um)h(amoun)m(t)g(of)h(virtual)f +(memory)g(a)m(v)-5 b(ailable)44 b(to)e(the)g(shell,)1110 +5182 y(and,)30 b(on)g(some)h(systems,)g(to)g(its)g(c)m(hildren.)630 +5340 y Ft(-x)384 b Fu(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i +(\014le)f(lo)s(c)m(ks.)p eop end +%%Page: 62 68 +TeXDict begin 62 67 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(62)630 299 y Ft(-P)384 +b Fu(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(pseudoterminals.)630 +478 y Ft(-R)384 b Fu(The)27 b(maxim)m(um)h(time)h(a)f(real-time)i(pro)s +(cess)d(can)i(run)d(b)s(efore)i(blo)s(c)m(king,)h(in)1110 +587 y(microseconds.)630 766 y Ft(-T)384 b Fu(The)30 b(maxim)m(um)g(n)m +(um)m(b)s(er)f(of)i(threads.)630 945 y(If)36 b Fr(limit)k +Fu(is)c(giv)m(en,)k(and)c(the)h Ft(-a)f Fu(option)h(is)f(not)h(used,)h +Fr(limit)h Fu(is)e(the)g(new)f(v)-5 b(alue)37 b(of)g(the)630 +1055 y(sp)s(eci\014ed)c(resource.)51 b(The)34 b(sp)s(ecial)g +Fr(limit)j Fu(v)-5 b(alues)34 b Ft(hard)p Fu(,)g Ft(soft)p +Fu(,)g(and)f Ft(unlimited)e Fu(stand)630 1164 y(for)h(the)g(curren)m(t) +g(hard)f(limit,)i(the)g(curren)m(t)f(soft)g(limit,)h(and)f(no)g(limit,) +h(resp)s(ectiv)m(ely)-8 b(.)48 b(A)630 1274 y(hard)24 +b(limit)i(cannot)g(b)s(e)e(increased)h(b)m(y)g(a)h(non-ro)s(ot)f(user)f +(once)i(it)g(is)f(set;)j(a)d(soft)g(limit)h(ma)m(y)630 +1384 y(b)s(e)37 b(increased)h(up)e(to)j(the)f(v)-5 b(alue)38 +b(of)f(the)h(hard)f(limit.)63 b(Otherwise,)39 b(the)f(curren)m(t)f(v)-5 +b(alue)630 1493 y(of)39 b(the)g(soft)h(limit)g(for)f(the)g(sp)s +(eci\014ed)f(resource)h(is)g(prin)m(ted,)i(unless)e(the)g +Ft(-H)f Fu(option)i(is)630 1603 y(supplied.)47 b(When)33 +b(more)g(than)g(one)g(resource)g(is)g(sp)s(eci\014ed,)g(the)g(limit)h +(name)f(and)f(unit,)630 1712 y(if)27 b(appropriate,)h(are)f(prin)m(ted) +g(b)s(efore)g(the)g(v)-5 b(alue.)40 b(When)27 b(setting)h(new)e +(limits,)j(if)e(neither)630 1822 y Ft(-H)38 b Fu(nor)g +Ft(-S)g Fu(is)h(supplied,)h(b)s(oth)e(the)h(hard)f(and)g(soft)h(limits) +g(are)g(set.)67 b(If)38 b(no)h(option)g(is)630 1932 y(giv)m(en,)c(then) +f Ft(-f)e Fu(is)i(assumed.)49 b(V)-8 b(alues)35 b(are)e(in)h(1024-b)m +(yte)i(incremen)m(ts,)f(except)f(for)f Ft(-t)p Fu(,)630 +2041 y(whic)m(h)e(is)g(in)g(seconds;)h Ft(-R)p Fu(,)g(whic)m(h)f(is)g +(in)g(microseconds;)h Ft(-p)p Fu(,)g(whic)m(h)f(is)g(in)g(units)g(of)g +(512-)630 2151 y(b)m(yte)k(blo)s(c)m(ks;)j Ft(-P)p Fu(,)e +Ft(-T)p Fu(,)f Ft(-b)p Fu(,)h Ft(-k)p Fu(,)f Ft(-n)g +Fu(and)f Ft(-u)p Fu(,)h(whic)m(h)g(are)g(unscaled)g(v)-5 +b(alues;)37 b(and,)f(when)630 2260 y(in)g Fm(posix)f +Fu(Mo)s(de)h(\(see)g(Section)h(6.11)g([Bash)g(POSIX)d(Mo)s(de],)k(page) +f(101\),)i Ft(-c)c Fu(and)g Ft(-f)p Fu(,)630 2370 y(whic)m(h)30 +b(are)h(in)f(512-b)m(yte)j(incremen)m(ts.)630 2514 y(The)h(return)g +(status)h(is)f(zero)i(unless)e(an)g(in)m(v)-5 b(alid)36 +b(option)f(or)f(argumen)m(t)i(is)e(supplied,)h(or)630 +2624 y(an)30 b(error)g(o)s(ccurs)g(while)h(setting)g(a)g(new)f(limit.) +150 2803 y Ft(unalias)870 2947 y(unalias)46 b([-a])g([)p +Fj(name)h Ft(...)g(])630 3091 y Fu(Remo)m(v)m(e)42 b(eac)m(h)f +Fr(name)k Fu(from)39 b(the)i(list)f(of)g(aliases.)71 +b(If)40 b Ft(-a)f Fu(is)h(supplied,)h(all)g(aliases)h(are)630 +3201 y(remo)m(v)m(ed.)g(Aliases)31 b(are)g(describ)s(ed)e(in)h(Section) +i(6.6)f([Aliases],)h(page)f(94.)150 3471 y Fs(4.3)68 +b(Mo)t(difying)45 b(Shell)g(Beha)l(vior)150 3695 y Fk(4.3.1)63 +b(The)41 b(Set)g(Builtin)150 3842 y Fu(This)35 b(builtin)h(is)g(so)g +(complicated)i(that)f(it)f(deserv)m(es)h(its)f(o)m(wn)g(section.)59 +b Ft(set)35 b Fu(allo)m(ws)j(y)m(ou)e(to)h(c)m(hange)150 +3951 y(the)c(v)-5 b(alues)34 b(of)f(shell)g(options)h(and)e(set)i(the)f +(p)s(ositional)h(parameters,)h(or)e(to)h(displa)m(y)f(the)g(names)h +(and)150 4061 y(v)-5 b(alues)31 b(of)f(shell)h(v)-5 b(ariables.)150 +4250 y Ft(set)870 4394 y(set)47 b([--abefhkmnptuvxBCEHPT])41 +b([-o)47 b Fj(option-name)p Ft(])e([)p Fj(argument)g +Ft(...)o(])870 4504 y(set)i([+abefhkmnptuvxBCEHPT])42 +b([+o)47 b Fj(option-name)p Ft(])d([)p Fj(argument)h +Ft(...)o(])630 4648 y Fu(If)22 b(no)h(options)g(or)g(argumen)m(ts)g +(are)g(supplied,)g Ft(set)f Fu(displa)m(ys)g(the)h(names)g(and)f(v)-5 +b(alues)23 b(of)g(all)630 4757 y(shell)j(v)-5 b(ariables)27 +b(and)e(functions,)h(sorted)g(according)h(to)g(the)f(curren)m(t)f(lo)s +(cale,)k(in)c(a)i(format)630 4867 y(that)i(ma)m(y)h(b)s(e)e(reused)g +(as)h(input)f(for)h(setting)h(or)e(resetting)i(the)f(curren)m(tly-set)h +(v)-5 b(ariables.)630 4977 y(Read-only)37 b(v)-5 b(ariables)37 +b(cannot)h(b)s(e)e(reset.)59 b(In)36 b Fm(posix)g Fu(mo)s(de,)i(only)f +(shell)f(v)-5 b(ariables)38 b(are)630 5086 y(listed.)630 +5230 y(When)29 b(options)g(are)g(supplied,)f(they)h(set)h(or)f(unset)f +(shell)h(attributes.)41 b(Options,)29 b(if)g(sp)s(ec-)630 +5340 y(i\014ed,)h(ha)m(v)m(e)i(the)e(follo)m(wing)i(meanings:)p +eop end +%%Page: 63 69 +TeXDict begin 63 68 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(63)630 299 y Ft(-a)384 +b Fu(Eac)m(h)37 b(v)-5 b(ariable)36 b(or)g(function)g(that)g(is)g +(created)h(or)f(mo)s(di\014ed)f(is)h(giv)m(en)h(the)1110 +408 y(exp)s(ort)28 b(attribute)h(and)f(mark)m(ed)g(for)g(exp)s(ort)g +(to)h(the)g(en)m(vironmen)m(t)f(of)h(sub-)1110 518 y(sequen)m(t)i +(commands.)630 682 y Ft(-b)384 b Fu(Cause)44 b(the)h(status)g(of)f +(terminated)h(bac)m(kground)g(jobs)f(to)h(b)s(e)f(rep)s(orted)1110 +792 y(immediately)-8 b(,)30 b(rather)d(than)f(b)s(efore)h(prin)m(ting)g +(the)g(next)g(primary)g(prompt.)630 956 y Ft(-e)384 b +Fu(Exit)65 b(immediately)g(if)f(a)h(pip)s(eline)e(\(see)i(Section)g +(3.2.3)h([Pip)s(elines],)1110 1066 y(page)56 b(8\),)62 +b(whic)m(h)55 b(ma)m(y)h(consist)f(of)h(a)f(single)h(simple)f(command)g +(\(see)1110 1176 y(Section)30 b(3.2.2)i([Simple)d(Commands],)g(page)h +(8\),)h(a)f(list)g(\(see)h(Section)f(3.2.4)1110 1285 +y([Lists],)66 b(page)59 b(9\),)67 b(or)58 b(a)h(comp)s(ound)e(command)h +(\(see)h(Section)g(3.2.5)1110 1395 y([Comp)s(ound)h(Commands],)70 +b(page)63 b(10\))g(returns)e(a)i(non-zero)f(status.)1110 +1504 y(The)41 b(shell)g(do)s(es)g(not)g(exit)h(if)f(the)h(command)f +(that)h(fails)f(is)g(part)g(of)h(the)1110 1614 y(command)g(list)h +(immediately)g(follo)m(wing)g(a)g Ft(while)e Fu(or)h +Ft(until)e Fu(k)m(eyw)m(ord,)1110 1724 y(part)61 b(of)g(the)g(test)h +(in)e(an)h Ft(if)f Fu(statemen)m(t,)71 b(part)61 b(of)g(an)m(y)g +(command)1110 1833 y(executed)50 b(in)e(a)h Ft(&&)f Fu(or)h +Ft(||)f Fu(list)h(except)g(the)g(command)g(follo)m(wing)h(the)1110 +1943 y(\014nal)37 b Ft(&&)g Fu(or)g Ft(||)p Fu(,)h(an)m(y)g(command)f +(in)g(a)g(pip)s(eline)g(but)g(the)g(last,)j(or)e(if)f(the)1110 +2052 y(command's)c(return)f(status)h(is)g(b)s(eing)g(in)m(v)m(erted)h +(with)e Ft(!)p Fu(.)48 b(If)33 b(a)g(comp)s(ound)1110 +2162 y(command)g(other)g(than)f(a)i(subshell)d(returns)h(a)h(non-zero)h +(status)f(b)s(ecause)1110 2271 y(a)k(command)g(failed)g(while)g +Ft(-e)f Fu(w)m(as)i(b)s(eing)e(ignored,)j(the)e(shell)g(do)s(es)g(not) +1110 2381 y(exit.)42 b(A)30 b(trap)g(on)h Ft(ERR)p Fu(,)e(if)i(set,)g +(is)f(executed)i(b)s(efore)e(the)g(shell)h(exits.)1110 +2518 y(This)f(option)h(applies)f(to)h(the)g(shell)g(en)m(vironmen)m(t)g +(and)f(eac)m(h)h(subshell)f(en-)1110 2628 y(vironmen)m(t)j(separately)i +(\(see)f(Section)g(3.7.3)h([Command)d(Execution)i(En-)1110 +2737 y(vironmen)m(t],)i(page)f(40\),)i(and)d(ma)m(y)h(cause)f +(subshells)g(to)h(exit)g(b)s(efore)f(exe-)1110 2847 y(cuting)d(all)g +(the)g(commands)f(in)g(the)g(subshell.)1110 2984 y(If)41 +b(a)g(comp)s(ound)e(command)i(or)g(shell)g(function)g(executes)h(in)f +(a)g(con)m(text)1110 3093 y(where)31 b Ft(-e)g Fu(is)g(b)s(eing)g +(ignored,)h(none)f(of)h(the)f(commands)g(executed)h(within)1110 +3203 y(the)j(comp)s(ound)f(command)h(or)g(function)f(b)s(o)s(dy)g(will) +h(b)s(e)f(a\013ected)j(b)m(y)e(the)1110 3313 y Ft(-e)25 +b Fu(setting,)j(ev)m(en)e(if)g Ft(-e)f Fu(is)h(set)g(and)f(a)h(command) +g(returns)e(a)i(failure)g(status.)1110 3422 y(If)32 b(a)i(comp)s(ound)d +(command)i(or)g(shell)g(function)f(sets)i Ft(-e)e Fu(while)h(executing) +1110 3532 y(in)40 b(a)h(con)m(text)i(where)d Ft(-e)g +Fu(is)h(ignored,)j(that)d(setting)h(will)f(not)g(ha)m(v)m(e)h(an)m(y) +1110 3641 y(e\013ect)g(un)m(til)e(the)h(comp)s(ound)e(command)h(or)g +(the)g(command)g(con)m(taining)1110 3751 y(the)31 b(function)f(call)h +(completes.)630 3915 y Ft(-f)384 b Fu(Disable)31 b(\014lename)g +(expansion)f(\(globbing\).)630 4080 y Ft(-h)384 b Fu(Lo)s(cate)33 +b(and)e(remem)m(b)s(er)h(\(hash\))g(commands)f(as)h(they)g(are)g(lo)s +(ok)m(ed)h(up)e(for)1110 4189 y(execution.)42 b(This)29 +b(option)i(is)g(enabled)f(b)m(y)g(default.)630 4354 y +Ft(-k)384 b Fu(All)34 b(argumen)m(ts)g(in)f(the)h(form)f(of)g +(assignmen)m(t)h(statemen)m(ts)i(are)d(placed)h(in)1110 +4463 y(the)k(en)m(vironmen)m(t)g(for)g(a)g(command,)h(not)f(just)f +(those)i(that)f(precede)g(the)1110 4573 y(command)30 +b(name.)630 4737 y Ft(-m)384 b Fu(Job)28 b(con)m(trol)h(is)f(enabled)g +(\(see)h(Chapter)f(7)g([Job)g(Con)m(trol],)i(page)f(107\).)41 +b(All)1110 4847 y(pro)s(cesses)27 b(run)f(in)i(a)g(separate)g(pro)s +(cess)f(group.)40 b(When)27 b(a)h(bac)m(kground)f(job)1110 +4956 y(completes,)32 b(the)f(shell)f(prin)m(ts)g(a)h(line)f(con)m +(taining)i(its)f(exit)g(status.)630 5121 y Ft(-n)384 +b Fu(Read)38 b(commands)f(but)f(do)i(not)f(execute)i(them.)62 +b(This)37 b(ma)m(y)h(b)s(e)f(used)f(to)1110 5230 y(c)m(hec)m(k)d(a)e +(script)g(for)g(syn)m(tax)h(errors.)42 b(This)30 b(option)i(is)f +(ignored)g(b)m(y)g(in)m(terac-)1110 5340 y(tiv)m(e)h(shells.)p +eop end +%%Page: 64 70 +TeXDict begin 64 69 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(64)630 299 y Ft(-o)30 +b Fj(option-name)1110 408 y Fu(Set)h(the)f(option)h(corresp)s(onding)e +(to)i Fr(option-name)5 b Fu(:)1110 575 y Ft(allexport)1590 +685 y Fu(Same)30 b(as)h Ft(-a)p Fu(.)1110 852 y Ft(braceexpand)1590 +962 y Fu(Same)f(as)h Ft(-B)p Fu(.)1110 1129 y Ft(emacs)240 +b Fu(Use)25 b(an)f Ft(emacs)p Fu(-st)m(yle)h(line)f(editing)h(in)m +(terface)h(\(see)g(Chapter)e(8)1590 1238 y([Command)33 +b(Line)g(Editing],)h(page)h(111\).)51 b(This)32 b(also)i(a\013ects)1590 +1348 y(the)d(editing)g(in)m(terface)h(used)d(for)h Ft(read)f(-e)p +Fu(.)1110 1515 y Ft(errexit)144 b Fu(Same)30 b(as)h Ft(-e)p +Fu(.)1110 1682 y Ft(errtrace)96 b Fu(Same)30 b(as)h Ft(-E)p +Fu(.)1110 1849 y Ft(functrace)1590 1958 y Fu(Same)f(as)h +Ft(-T)p Fu(.)1110 2125 y Ft(hashall)144 b Fu(Same)30 +b(as)h Ft(-h)p Fu(.)1110 2292 y Ft(histexpand)1590 2402 +y Fu(Same)f(as)h Ft(-H)p Fu(.)1110 2569 y Ft(history)144 +b Fu(Enable)39 b(command)g(history)-8 b(,)42 b(as)d(describ)s(ed)f(in)h +(Section)h(9.1)1590 2679 y([Bash)d(History)g(F)-8 b(acilities],)41 +b(page)c(146.)60 b(This)36 b(option)h(is)f(on)1590 2788 +y(b)m(y)30 b(default)h(in)f(in)m(teractiv)m(e)j(shells.)1110 +2955 y Ft(ignoreeof)1590 3065 y Fu(An)d(in)m(teractiv)m(e)j(shell)e +(will)g(not)f(exit)h(up)s(on)e(reading)i(EOF.)1110 3232 +y Ft(keyword)144 b Fu(Same)30 b(as)h Ft(-k)p Fu(.)1110 +3399 y Ft(monitor)144 b Fu(Same)30 b(as)h Ft(-m)p Fu(.)1110 +3566 y Ft(noclobber)1590 3675 y Fu(Same)f(as)h Ft(-C)p +Fu(.)1110 3842 y Ft(noexec)192 b Fu(Same)30 b(as)h Ft(-n)p +Fu(.)1110 4009 y Ft(noglob)192 b Fu(Same)30 b(as)h Ft(-f)p +Fu(.)1110 4176 y Ft(nolog)240 b Fu(Curren)m(tly)30 b(ignored.)1110 +4343 y Ft(notify)192 b Fu(Same)30 b(as)h Ft(-b)p Fu(.)1110 +4510 y Ft(nounset)144 b Fu(Same)30 b(as)h Ft(-u)p Fu(.)1110 +4677 y Ft(onecmd)192 b Fu(Same)30 b(as)h Ft(-t)p Fu(.)1110 +4844 y Ft(physical)96 b Fu(Same)30 b(as)h Ft(-P)p Fu(.)1110 +5011 y Ft(pipefail)96 b Fu(If)44 b(set,)k(the)d(return)e(v)-5 +b(alue)45 b(of)f(a)h(pip)s(eline)e(is)i(the)f(v)-5 b(alue)45 +b(of)1590 5121 y(the)33 b(last)h(\(righ)m(tmost\))h(command)e(to)h +(exit)g(with)f(a)g(non-zero)1590 5230 y(status,)28 b(or)f(zero)g(if)f +(all)i(commands)e(in)g(the)h(pip)s(eline)f(exit)i(suc-)1590 +5340 y(cessfully)-8 b(.)41 b(This)30 b(option)h(is)f(disabled)g(b)m(y)h +(default.)p eop end +%%Page: 65 71 +TeXDict begin 65 70 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(65)1110 299 y +Ft(posix)240 b Fu(Change)30 b(the)g(b)s(eha)m(vior)h(of)f(Bash)g(where) +g(the)g(default)h(op)s(era-)1590 408 y(tion)25 b(di\013ers)f(from)g +(the)h Fm(posix)f Fu(standard)f(to)i(matc)m(h)h(the)f(stan-)1590 +518 y(dard)h(\(see)j(Section)f(6.11)h([Bash)f(POSIX)e(Mo)s(de],)j(page) +f(101\).)1590 628 y(This)37 b(is)g(in)m(tended)g(to)h(mak)m(e)g(Bash)g +(b)s(eha)m(v)m(e)g(as)g(a)f(strict)h(su-)1590 737 y(p)s(erset)30 +b(of)h(that)f(standard.)1110 911 y Ft(privileged)1590 +1020 y Fu(Same)g(as)h Ft(-p)p Fu(.)1110 1194 y Ft(verbose)144 +b Fu(Same)30 b(as)h Ft(-v)p Fu(.)1110 1367 y Ft(vi)384 +b Fu(Use)36 b(a)g Ft(vi)p Fu(-st)m(yle)g(line)g(editing)g(in)m +(terface.)58 b(This)35 b(also)h(a\013ects)1590 1477 y(the)31 +b(editing)g(in)m(terface)h(used)d(for)h Ft(read)f(-e)p +Fu(.)1110 1650 y Ft(xtrace)192 b Fu(Same)30 b(as)h Ft(-x)p +Fu(.)630 1824 y Ft(-p)384 b Fu(T)-8 b(urn)33 b(on)h(privileged)h(mo)s +(de.)51 b(In)34 b(this)g(mo)s(de,)h(the)f Ft($BASH_ENV)e +Fu(and)h Ft($ENV)1110 1934 y Fu(\014les)23 b(are)h(not)f(pro)s(cessed,) +h(shell)g(functions)e(are)i(not)f(inherited)g(from)f(the)i(en-)1110 +2043 y(vironmen)m(t,)h(and)e(the)g Ft(SHELLOPTS)p Fu(,)f +Ft(BASHOPTS)p Fu(,)h Ft(CDPATH)e Fu(and)i Ft(GLOBIGNORE)1110 +2153 y Fu(v)-5 b(ariables,)23 b(if)e(they)g(app)s(ear)f(in)g(the)h(en)m +(vironmen)m(t,)i(are)e(ignored.)38 b(If)20 b(the)h(shell)1110 +2262 y(is)37 b(started)h(with)f(the)g(e\013ectiv)m(e)j(user)d +(\(group\))g(id)g(not)g(equal)h(to)g(the)f(real)1110 +2372 y(user)h(\(group\))h(id,)i(and)d(the)h Ft(-p)f Fu(option)i(is)e +(not)i(supplied,)f(these)h(actions)1110 2482 y(are)32 +b(tak)m(en)i(and)d(the)h(e\013ectiv)m(e)j(user)c(id)h(is)g(set)h(to)f +(the)h(real)f(user)g(id.)45 b(If)32 b(the)1110 2591 y +Ft(-p)i Fu(option)h(is)g(supplied)f(at)h(startup,)h(the)f(e\013ectiv)m +(e)i(user)d(id)g(is)h(not)g(reset.)1110 2701 y(T)-8 b(urning)35 +b(this)i(option)g(o\013)g(causes)g(the)g(e\013ectiv)m(e)i(user)d(and)g +(group)g(ids)g(to)1110 2810 y(b)s(e)30 b(set)h(to)g(the)f(real)h(user)f +(and)g(group)g(ids.)630 2984 y Ft(-t)384 b Fu(Exit)31 +b(after)g(reading)f(and)g(executing)h(one)g(command.)630 +3157 y Ft(-u)384 b Fu(T)-8 b(reat)25 b(unset)e(v)-5 b(ariables)25 +b(and)e(parameters)h(other)h(than)e(the)h(sp)s(ecial)h(param-)1110 +3267 y(eters)35 b(`)p Ft(@)p Fu(')f(or)g(`)p Ft(*)p Fu(')h(as)f(an)g +(error)g(when)f(p)s(erforming)g(parameter)i(expansion.)1110 +3377 y(An)28 b(error)h(message)g(will)g(b)s(e)f(written)h(to)h(the)e +(standard)g(error,)h(and)f(a)h(non-)1110 3486 y(in)m(teractiv)m(e)k +(shell)e(will)g(exit.)630 3660 y Ft(-v)384 b Fu(Prin)m(t)30 +b(shell)h(input)e(lines)i(as)g(they)f(are)h(read.)630 +3833 y Ft(-x)384 b Fu(Prin)m(t)21 b(a)h(trace)h(of)f(simple)f +(commands,)i Ft(for)e Fu(commands,)i Ft(case)d Fu(commands,)1110 +3943 y Ft(select)29 b Fu(commands,)j(and)e(arithmetic)j +Ft(for)d Fu(commands)h(and)f(their)i(argu-)1110 4052 +y(men)m(ts)h(or)f(asso)s(ciated)i(w)m(ord)e(lists)h(after)g(they)f(are) +h(expanded)f(and)f(b)s(efore)1110 4162 y(they)i(are)g(executed.)49 +b(The)32 b(v)-5 b(alue)33 b(of)g(the)g Ft(PS4)f Fu(v)-5 +b(ariable)34 b(is)f(expanded)f(and)1110 4271 y(the)24 +b(resultan)m(t)h(v)-5 b(alue)24 b(is)g(prin)m(ted)g(b)s(efore)f(the)h +(command)g(and)f(its)i(expanded)1110 4381 y(argumen)m(ts.)630 +4555 y Ft(-B)384 b Fu(The)41 b(shell)g(will)g(p)s(erform)f(brace)h +(expansion)g(\(see)h(Section)g(3.5.1)g([Brace)1110 4664 +y(Expansion],)30 b(page)h(23\).)42 b(This)30 b(option)h(is)f(on)g(b)m +(y)h(default.)630 4838 y Ft(-C)384 b Fu(Prev)m(en)m(t)25 +b(output)e(redirection)h(using)f(`)p Ft(>)p Fu(',)i(`)p +Ft(>&)p Fu(',)g(and)e(`)p Ft(<>)p Fu(')g(from)h(o)m(v)m(erwriting)1110 +4947 y(existing)31 b(\014les.)630 5121 y Ft(-E)384 b +Fu(If)39 b(set,)j(an)m(y)e(trap)f(on)g Ft(ERR)g Fu(is)g(inherited)g(b)m +(y)g(shell)h(functions,)h(command)1110 5230 y(substitutions,)35 +b(and)e(commands)g(executed)i(in)f(a)g(subshell)f(en)m(vironmen)m(t.) +1110 5340 y(The)d Ft(ERR)f Fu(trap)i(is)f(normally)h(not)f(inherited)g +(in)g(suc)m(h)g(cases.)p eop end +%%Page: 66 72 +TeXDict begin 66 71 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(66)630 299 y Ft(-H)384 +b Fu(Enable)38 b(`)p Ft(!)p Fu(')h(st)m(yle)h(history)e(substitution)g +(\(see)h(Section)h(9.3)f([History)g(In-)1110 408 y(teraction],)g(page)d +(148\).)57 b(This)34 b(option)i(is)f(on)g(b)m(y)h(default)f(for)g(in)m +(teractiv)m(e)1110 518 y(shells.)630 670 y Ft(-P)384 +b Fu(If)39 b(set,)j(do)d(not)g(resolv)m(e)i(sym)m(b)s(olic)e(links)g +(when)f(p)s(erforming)g(commands)1110 780 y(suc)m(h)29 +b(as)h Ft(cd)f Fu(whic)m(h)g(c)m(hange)h(the)g(curren)m(t)f(directory) +-8 b(.)42 b(The)28 b(ph)m(ysical)j(direc-)1110 890 y(tory)j(is)g(used)f +(instead.)52 b(By)34 b(default,)h(Bash)f(follo)m(ws)h(the)f(logical)i +(c)m(hain)f(of)1110 999 y(directories)j(when)d(p)s(erforming)h +(commands)g(whic)m(h)g(c)m(hange)i(the)f(curren)m(t)1110 +1109 y(directory)-8 b(.)1110 1240 y(F)g(or)42 b(example,)i(if)d +Ft(/usr/sys)e Fu(is)i(a)g(sym)m(b)s(olic)g(link)g(to)h +Ft(/usr/local/sys)1110 1349 y Fu(then:)1350 1480 y Ft($)47 +b(cd)h(/usr/sys;)d(echo)i($PWD)1350 1590 y(/usr/sys)1350 +1700 y($)g(cd)h(..;)f(pwd)1350 1809 y(/usr)1110 1940 +y Fu(If)30 b Ft(set)f(-P)h Fu(is)h(on,)f(then:)1350 2071 +y Ft($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350 2181 y(/usr/local/sys) +1350 2290 y($)g(cd)h(..;)f(pwd)1350 2400 y(/usr/local)630 +2552 y(-T)384 b Fu(If)34 b(set,)j(an)m(y)e(trap)g(on)g +Ft(DEBUG)e Fu(and)i Ft(RETURN)e Fu(are)i(inherited)g(b)m(y)f(shell)i +(func-)1110 2662 y(tions,)k(command)d(substitutions,)h(and)f(commands)g +(executed)h(in)f(a)h(sub-)1110 2771 y(shell)33 b(en)m(vironmen)m(t.)49 +b(The)32 b Ft(DEBUG)g Fu(and)g Ft(RETURN)f Fu(traps)h(are)i(normally)f +(not)1110 2881 y(inherited)d(in)g(suc)m(h)g(cases.)630 +3033 y Ft(--)384 b Fu(If)44 b(no)g(argumen)m(ts)g(follo)m(w)i(this)e +(option,)k(then)c(the)h(p)s(ositional)g(parame-)1110 +3143 y(ters)31 b(are)g(unset.)40 b(Otherwise,)31 b(the)f(p)s(ositional) +i(parameters)f(are)f(set)h(to)h(the)1110 3253 y Fr(argumen)m(ts)p +Fu(,)f(ev)m(en)g(if)f(some)h(of)g(them)f(b)s(egin)g(with)g(a)h(`)p +Ft(-)p Fu('.)630 3405 y Ft(-)432 b Fu(Signal)45 b(the)g(end)f(of)h +(options,)k(cause)c(all)h(remaining)e Fr(argumen)m(ts)49 +b Fu(to)d(b)s(e)1110 3515 y(assigned)33 b(to)h(the)g(p)s(ositional)g +(parameters.)49 b(The)33 b Ft(-x)g Fu(and)f Ft(-v)h Fu(options)h(are) +1110 3624 y(turned)k(o\013.)68 b(If)38 b(there)i(are)f(no)g(argumen)m +(ts,)j(the)e(p)s(ositional)g(parameters)1110 3734 y(remain)30 +b(unc)m(hanged.)630 3886 y(Using)d(`)p Ft(+)p Fu(')h(rather)f(than)g(`) +p Ft(-)p Fu(')g(causes)h(these)f(options)h(to)g(b)s(e)e(turned)g +(o\013.)40 b(The)27 b(options)h(can)630 3996 y(also)36 +b(b)s(e)f(used)f(up)s(on)g(in)m(v)m(o)s(cation)j(of)e(the)g(shell.)56 +b(The)34 b(curren)m(t)h(set)h(of)f(options)h(ma)m(y)g(b)s(e)630 +4105 y(found)29 b(in)h Ft($-)p Fu(.)630 4236 y(The)43 +b(remaining)h(N)f Fr(argumen)m(ts)48 b Fu(are)c(p)s(ositional)g +(parameters)g(and)f(are)h(assigned,)j(in)630 4346 y(order,)30 +b(to)h Ft($1)p Fu(,)f Ft($2)p Fu(,)36 b(.)22 b(.)g(.)42 +b Ft($N)p Fu(.)e(The)30 b(sp)s(ecial)h(parameter)g Ft(#)f +Fu(is)g(set)h(to)g(N.)630 4477 y(The)f(return)f(status)i(is)f(alw)m(a)m +(ys)i(zero)f(unless)f(an)g(in)m(v)-5 b(alid)31 b(option)g(is)f +(supplied.)150 4669 y Fk(4.3.2)63 b(The)41 b(Shopt)h(Builtin)150 +4816 y Fu(This)30 b(builtin)g(allo)m(ws)h(y)m(ou)g(to)g(c)m(hange)h +(additional)f(shell)f(optional)i(b)s(eha)m(vior.)150 +4968 y Ft(shopt)870 5099 y(shopt)46 b([-pqsu])g([-o])h([)p +Fj(optname)e Ft(...])630 5230 y Fu(T)-8 b(oggle)37 b(the)e(v)-5 +b(alues)35 b(of)g(settings)h(con)m(trolling)g(optional)g(shell)f(b)s +(eha)m(vior.)55 b(The)34 b(settings)630 5340 y(can)24 +b(b)s(e)g(either)h(those)f(listed)h(b)s(elo)m(w,)h(or,)f(if)g(the)f +Ft(-o)f Fu(option)i(is)f(used,)h(those)g(a)m(v)-5 b(ailable)26 +b(with)p eop end +%%Page: 67 73 +TeXDict begin 67 72 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(67)630 299 y(the)30 +b Ft(-o)f Fu(option)i(to)f(the)g Ft(set)f Fu(builtin)h(command)f(\(see) +i(Section)g(4.3.1)g([The)f(Set)g(Builtin],)630 408 y(page)i(62\).)45 +b(With)32 b(no)f(options,)h(or)g(with)f(the)g Ft(-p)g +Fu(option,)h(a)g(list)g(of)f(all)i(settable)g(options)630 +518 y(is)g(displa)m(y)m(ed,)i(with)e(an)g(indication)h(of)g(whether)e +(or)h(not)h(eac)m(h)g(is)g(set;)h(if)e Fr(optnames)38 +b Fu(are)630 628 y(supplied,)25 b(the)g(output)g(is)g(restricted)g(to)h +(those)g(options.)39 b(The)24 b Ft(-p)h Fu(option)g(causes)g(output)630 +737 y(to)30 b(b)s(e)f(displa)m(y)m(ed)g(in)g(a)h(form)f(that)g(ma)m(y)h +(b)s(e)f(reused)f(as)i(input.)39 b(Other)29 b(options)g(ha)m(v)m(e)i +(the)630 847 y(follo)m(wing)h(meanings:)630 1004 y Ft(-s)384 +b Fu(Enable)30 b(\(set\))i(eac)m(h)f Fr(optname)p Fu(.)630 +1161 y Ft(-u)384 b Fu(Disable)31 b(\(unset\))g(eac)m(h)h +Fr(optname)p Fu(.)630 1319 y Ft(-q)384 b Fu(Suppresses)28 +b(normal)h(output;)h(the)g(return)e(status)i(indicates)h(whether)e(the) +1110 1428 y Fr(optname)37 b Fu(is)31 b(set)h(or)f(unset.)43 +b(If)31 b(m)m(ultiple)h Fr(optname)37 b Fu(argumen)m(ts)31 +b(are)h(giv)m(en)1110 1538 y(with)d Ft(-q)p Fu(,)g(the)g(return)f +(status)h(is)g(zero)h(if)f(all)h Fr(optnames)j Fu(are)d(enabled;)f +(non-)1110 1647 y(zero)i(otherwise.)630 1805 y Ft(-o)384 +b Fu(Restricts)22 b(the)f(v)-5 b(alues)22 b(of)f Fr(optname)27 +b Fu(to)22 b(b)s(e)e(those)i(de\014ned)e(for)h(the)g +Ft(-o)f Fu(option)1110 1914 y(to)31 b(the)g Ft(set)e +Fu(builtin)h(\(see)h(Section)h(4.3.1)g([The)e(Set)g(Builtin],)i(page)f +(62\).)630 2071 y(If)e(either)i Ft(-s)e Fu(or)h Ft(-u)f +Fu(is)h(used)f(with)g(no)h Fr(optname)35 b Fu(argumen)m(ts,)c +Ft(shopt)d Fu(sho)m(ws)h(only)h(those)630 2181 y(options)h(whic)m(h)f +(are)h(set)f(or)h(unset,)f(resp)s(ectiv)m(ely)-8 b(.)630 +2314 y(Unless)30 b(otherwise)h(noted,)g(the)g Ft(shopt)d +Fu(options)j(are)g(disabled)f(\(o\013)7 b(\))32 b(b)m(y)e(default.)630 +2448 y(The)d(return)f(status)i(when)f(listing)h(options)g(is)f(zero)i +(if)e(all)i Fr(optnames)i Fu(are)d(enabled,)g(non-)630 +2557 y(zero)40 b(otherwise.)66 b(When)39 b(setting)h(or)f(unsetting)g +(options,)i(the)e(return)f(status)h(is)g(zero)630 2667 +y(unless)30 b(an)g Fr(optname)36 b Fu(is)30 b(not)h(a)g(v)-5 +b(alid)30 b(shell)h(option.)630 2800 y(The)f(list)h(of)f +Ft(shopt)f Fu(options)i(is:)630 2958 y Ft(assoc_expand_once)1110 +3067 y Fu(If)h(set,)i(the)e(shell)h(suppresses)e(m)m(ultiple)i(ev)-5 +b(aluation)34 b(of)e(asso)s(ciativ)m(e)j(arra)m(y)1110 +3177 y(subscripts)24 b(during)h(arithmetic)h(expression)g(ev)-5 +b(aluation,)28 b(while)e(executing)1110 3286 y(builtins)c(that)i(can)f +(p)s(erform)f(v)-5 b(ariable)24 b(assignmen)m(ts,)h(and)e(while)g +(executing)1110 3396 y(builtins)30 b(that)h(p)s(erform)e(arra)m(y)i +(dereferencing.)630 3553 y Ft(autocd)192 b Fu(If)27 b(set,)h(a)g +(command)f(name)g(that)h(is)f(the)g(name)g(of)h(a)f(directory)h(is)f +(executed)1110 3663 y(as)j(if)f(it)h(w)m(ere)f(the)h(argumen)m(t)g(to)g +(the)f Ft(cd)g Fu(command.)40 b(This)29 b(option)g(is)h(only)1110 +3772 y(used)g(b)m(y)g(in)m(teractiv)m(e)j(shells.)630 +3930 y Ft(cdable_vars)1110 4039 y Fu(If)h(this)h(is)g(set,)i(an)e +(argumen)m(t)g(to)h(the)f Ft(cd)f Fu(builtin)h(command)f(that)i(is)f +(not)1110 4149 y(a)c(directory)g(is)g(assumed)f(to)h(b)s(e)f(the)h +(name)f(of)h(a)g(v)-5 b(ariable)31 b(whose)g(v)-5 b(alue)31 +b(is)1110 4258 y(the)g(directory)f(to)i(c)m(hange)f(to.)630 +4416 y Ft(cdspell)144 b Fu(If)27 b(set,)h(minor)f(errors)f(in)h(the)g +(sp)s(elling)h(of)f(a)g(directory)h(comp)s(onen)m(t)f(in)g(a)h +Ft(cd)1110 4525 y Fu(command)i(will)h(b)s(e)f(corrected.)43 +b(The)30 b(errors)g(c)m(hec)m(k)m(ed)j(for)d(are)h(transp)s(osed)1110 +4635 y(c)m(haracters,)46 b(a)c(missing)f(c)m(haracter,)47 +b(and)40 b(a)i(c)m(haracter)h(to)s(o)g(man)m(y)-8 b(.)74 +b(If)42 b(a)1110 4744 y(correction)25 b(is)e(found,)g(the)h(corrected)g +(path)f(is)g(prin)m(ted,)h(and)f(the)g(command)1110 4854 +y(pro)s(ceeds.)40 b(This)30 b(option)h(is)f(only)h(used)e(b)m(y)h(in)m +(teractiv)m(e)k(shells.)630 5011 y Ft(checkhash)1110 +5121 y Fu(If)29 b(this)h(is)g(set,)g(Bash)g(c)m(hec)m(ks)h(that)g(a)f +(command)f(found)g(in)g(the)h(hash)f(table)1110 5230 +y(exists)k(b)s(efore)f(trying)h(to)h(execute)g(it.)48 +b(If)32 b(a)h(hashed)e(command)i(no)f(longer)1110 5340 +y(exists,)f(a)g(normal)f(path)g(searc)m(h)h(is)g(p)s(erformed.)p +eop end +%%Page: 68 74 +TeXDict begin 68 73 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(68)630 299 y Ft(checkjobs)1110 +408 y Fu(If)28 b(set,)i(Bash)e(lists)h(the)g(status)g(of)f(an)m(y)h +(stopp)s(ed)f(and)g(running)e(jobs)i(b)s(efore)1110 518 +y(exiting)42 b(an)f(in)m(teractiv)m(e)j(shell.)72 b(If)41 +b(an)m(y)g(jobs)f(are)i(running,)g(this)f(causes)1110 +628 y(the)30 b(exit)g(to)g(b)s(e)f(deferred)g(un)m(til)h(a)f(second)h +(exit)g(is)g(attempted)h(without)e(an)1110 737 y(in)m(terv)m(ening)d +(command)f(\(see)h(Chapter)e(7)h([Job)g(Con)m(trol],)i(page)f(107\).)40 +b(The)1110 847 y(shell)31 b(alw)m(a)m(ys)g(p)s(ostp)s(ones)f(exiting)h +(if)g(an)m(y)f(jobs)g(are)h(stopp)s(ed.)630 1029 y Ft(checkwinsize)1110 +1139 y Fu(If)23 b(set,)j(Bash)e(c)m(hec)m(ks)h(the)f(windo)m(w)f(size)h +(after)h(eac)m(h)f(external)h(\(non-builtin\))1110 1249 +y(command)55 b(and,)60 b(if)55 b(necessary)-8 b(,)62 +b(up)s(dates)54 b(the)h(v)-5 b(alues)55 b(of)g Ft(LINES)f +Fu(and)1110 1358 y Ft(COLUMNS)p Fu(.)39 b(This)29 b(option)i(is)g +(enabled)f(b)m(y)g(default.)630 1541 y Ft(cmdhist)144 +b Fu(If)33 b(set,)j(Bash)e(attempts)h(to)g(sa)m(v)m(e)g(all)g(lines)f +(of)g(a)h(m)m(ultiple-line)g(command)1110 1650 y(in)c(the)g(same)g +(history)g(en)m(try)-8 b(.)42 b(This)30 b(allo)m(ws)i(easy)g +(re-editing)g(of)f(m)m(ulti-line)1110 1760 y(commands.)79 +b(This)43 b(option)g(is)h(enabled)f(b)m(y)g(default,)k(but)c(only)g +(has)g(an)1110 1870 y(e\013ect)30 b(if)e(command)g(history)g(is)h +(enabled)f(\(see)h(Section)g(9.1)h([Bash)e(History)1110 +1979 y(F)-8 b(acilities],)34 b(page)d(146\).)630 2162 +y Ft(compat31)630 2271 y(compat32)630 2381 y(compat40)630 +2491 y(compat41)630 2600 y(compat42)630 2710 y(compat43)630 +2819 y(compat44)96 b Fu(These)39 b(con)m(trol)i(asp)s(ects)f(of)f(the)h +(shell's)g(compatibilit)m(y)h(mo)s(de)e(\(see)h(Sec-)1110 +2929 y(tion)31 b(6.12)h([Shell)e(Compatibilit)m(y)i(Mo)s(de],)f(page)g +(104\).)630 3112 y Ft(complete_fullquote)1110 3221 y +Fu(If)g(set,)g(Bash)h(quotes)f(all)h(shell)f(metac)m(haracters)i(in)e +(\014lenames)g(and)g(direc-)1110 3331 y(tory)g(names)f(when)g(p)s +(erforming)f(completion.)43 b(If)30 b(not)h(set,)g(Bash)g(remo)m(v)m +(es)1110 3440 y(metac)m(haracters)40 b(suc)m(h)d(as)h(the)g(dollar)g +(sign)g(from)f(the)h(set)g(of)f(c)m(haracters)1110 3550 +y(that)f(will)g(b)s(e)f(quoted)g(in)g(completed)i(\014lenames)e(when)f +(these)i(metac)m(har-)1110 3660 y(acters)29 b(app)s(ear)e(in)g(shell)h +(v)-5 b(ariable)28 b(references)g(in)f(w)m(ords)g(to)i(b)s(e)e +(completed.)1110 3769 y(This)k(means)i(that)g(dollar)f(signs)g(in)g(v) +-5 b(ariable)33 b(names)g(that)f(expand)g(to)h(di-)1110 +3879 y(rectories)28 b(will)g(not)f(b)s(e)f(quoted;)j(ho)m(w)m(ev)m(er,) +g(an)m(y)e(dollar)h(signs)f(app)s(earing)f(in)1110 3988 +y(\014lenames)j(will)h(not)f(b)s(e)g(quoted,)h(either.)41 +b(This)28 b(is)i(activ)m(e)h(only)e(when)g(bash)1110 +4098 y(is)39 b(using)f(bac)m(kslashes)i(to)g(quote)g(completed)f +(\014lenames.)67 b(This)38 b(v)-5 b(ariable)1110 4208 +y(is)41 b(set)g(b)m(y)g(default,)j(whic)m(h)c(is)h(the)g(default)g +(Bash)g(b)s(eha)m(vior)g(in)g(v)m(ersions)1110 4317 y(through)30 +b(4.2.)630 4500 y Ft(direxpand)1110 4609 y Fu(If)k(set,)i(Bash)f +(replaces)g(directory)g(names)g(with)f(the)g(results)h(of)f(w)m(ord)g +(ex-)1110 4719 y(pansion)k(when)g(p)s(erforming)f(\014lename)i +(completion.)67 b(This)38 b(c)m(hanges)i(the)1110 4829 +y(con)m(ten)m(ts)29 b(of)e(the)g(readline)h(editing)g(bu\013er.)38 +b(If)27 b(not)g(set,)i(Bash)e(attempts)h(to)1110 4938 +y(preserv)m(e)j(what)f(the)g(user)g(t)m(yp)s(ed.)630 +5121 y Ft(dirspell)96 b Fu(If)26 b(set,)i(Bash)f(attempts)g(sp)s +(elling)g(correction)g(on)g(directory)g(names)f(during)1110 +5230 y(w)m(ord)36 b(completion)h(if)f(the)g(directory)g(name)g +(initially)h(supplied)e(do)s(es)h(not)1110 5340 y(exist.)p +eop end +%%Page: 69 75 +TeXDict begin 69 74 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(69)630 299 y Ft(dotglob)144 +b Fu(If)36 b(set,)i(Bash)e(includes)g(\014lenames)g(b)s(eginning)f +(with)h(a)g(`.')58 b(in)36 b(the)g(results)1110 408 y(of)f(\014lename)f +(expansion.)53 b(The)33 b(\014lenames)i(`)p Ft(.)p Fu(')f(and)g(`)p +Ft(..)p Fu(')g(m)m(ust)h(alw)m(a)m(ys)h(b)s(e)1110 518 +y(matc)m(hed)31 b(explicitly)-8 b(,)33 b(ev)m(en)e(if)f +Ft(dotglob)f Fu(is)h(set.)630 682 y Ft(execfail)96 b +Fu(If)24 b(this)h(is)f(set,)j(a)e(non-in)m(teractiv)m(e)i(shell)e(will) +f(not)h(exit)h(if)e(it)h(cannot)h(execute)1110 792 y(the)i(\014le)g(sp) +s(eci\014ed)g(as)g(an)g(argumen)m(t)g(to)h(the)f Ft(exec)f +Fu(builtin)h(command.)39 b(An)1110 902 y(in)m(teractiv)m(e)33 +b(shell)e(do)s(es)f(not)g(exit)i(if)e Ft(exec)f Fu(fails.)630 +1066 y Ft(expand_aliases)1110 1176 y Fu(If)j(set,)h(aliases)g(are)g +(expanded)e(as)h(describ)s(ed)f(b)s(elo)m(w)h(under)f(Aliases,)i(Sec-) +1110 1285 y(tion)38 b(6.6)h([Aliases],)j(page)d(94.)64 +b(This)37 b(option)h(is)g(enabled)g(b)m(y)g(default)g(for)1110 +1395 y(in)m(teractiv)m(e)33 b(shells.)630 1559 y Ft(extdebug)96 +b Fu(If)35 b(set)i(at)f(shell)g(in)m(v)m(o)s(cation,)k(or)c(in)f(a)h +(shell)h(startup)e(\014le,)i(arrange)g(to)f(ex-)1110 +1669 y(ecute)h(the)f(debugger)g(pro\014le)g(b)s(efore)g(the)g(shell)h +(starts,)h(iden)m(tical)g(to)f(the)1110 1778 y Ft(--debugger)32 +b Fu(option.)56 b(If)35 b(set)h(after)g(in)m(v)m(o)s(cation,)j(b)s(eha) +m(vior)c(in)m(tended)g(for)1110 1888 y(use)30 b(b)m(y)g(debuggers)g(is) +h(enabled:)1159 2025 y(1.)61 b(The)37 b Ft(-F)g Fu(option)h(to)g(the)g +Ft(declare)d Fu(builtin)i(\(see)i(Section)f(4.2)h([Bash)1290 +2134 y(Builtins],)29 b(page)g(51\))g(displa)m(ys)f(the)g(source)h +(\014le)f(name)g(and)f(line)h(n)m(um-)1290 2244 y(b)s(er)h(corresp)s +(onding)g(to)i(eac)m(h)g(function)f(name)g(supplied)f(as)i(an)f(argu-) +1290 2354 y(men)m(t.)1159 2491 y(2.)61 b(If)20 b(the)h(command)g(run)e +(b)m(y)i(the)f Ft(DEBUG)g Fu(trap)g(returns)g(a)h(non-zero)g(v)-5 +b(alue,)1290 2600 y(the)31 b(next)f(command)g(is)h(skipp)s(ed)e(and)g +(not)i(executed.)1159 2737 y(3.)61 b(If)37 b(the)g(command)g(run)f(b)m +(y)i(the)f Ft(DEBUG)f Fu(trap)h(returns)f(a)i(v)-5 b(alue)38 +b(of)f(2,)1290 2847 y(and)c(the)g(shell)h(is)f(executing)i(in)e(a)h +(subroutine)e(\(a)i(shell)g(function)f(or)1290 2956 y(a)h(shell)g +(script)f(executed)h(b)m(y)g(the)f Ft(.)h Fu(or)f Ft(source)f +Fu(builtins\),)i(the)g(shell)1290 3066 y(sim)m(ulates)d(a)g(call)h(to)f +Ft(return)p Fu(.)1159 3203 y(4.)61 b Ft(BASH_ARGC)34 +b Fu(and)i Ft(BASH_ARGV)e Fu(are)j(up)s(dated)e(as)h(describ)s(ed)g(in) +g(their)1290 3313 y(descriptions)30 b(\(see)i(Section)f(5.2)g([Bash)g +(V)-8 b(ariables],)32 b(page)f(73\).)1159 3450 y(5.)61 +b(F)-8 b(unction)57 b(tracing)g(is)g(enabled:)93 b(command)56 +b(substitution,)63 b(shell)1290 3559 y(functions,)32 +b(and)e(subshells)h(in)m(v)m(ok)m(ed)i(with)e Ft(\()f +Fj(command)e Ft(\))j Fu(inherit)h(the)1290 3669 y Ft(DEBUG)d +Fu(and)h Ft(RETURN)e Fu(traps.)1159 3806 y(6.)61 b(Error)41 +b(tracing)i(is)f(enabled:)63 b(command)42 b(substitution,)i(shell)f +(func-)1290 3915 y(tions,)32 b(and)e(subshells)g(in)m(v)m(ok)m(ed)i +(with)e Ft(\()g Fj(command)f Ft(\))h Fu(inherit)h(the)g +Ft(ERR)1290 4025 y Fu(trap.)630 4189 y Ft(extglob)144 +b Fu(If)26 b(set,)i(the)f(extended)f(pattern)h(matc)m(hing)g(features)g +(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)1110 4299 y(Section)j(3.5.8.1)i +([P)m(attern)f(Matc)m(hing],)g(page)f(33\))h(are)f(enabled.)630 +4463 y Ft(extquote)96 b Fu(If)51 b(set,)58 b Ft($')p +Fj(string)p Ft(')49 b Fu(and)i Ft($")p Fj(string)p Ft(")e +Fu(quoting)k(is)e(p)s(erformed)f(within)1110 4573 y Ft(${)p +Fj(parameter)p Ft(})31 b Fu(expansions)k(enclosed)g(in)g(double)f +(quotes.)55 b(This)33 b(option)1110 4682 y(is)d(enabled)h(b)m(y)f +(default.)630 4847 y Ft(failglob)96 b Fu(If)36 b(set,)j(patterns)d +(whic)m(h)g(fail)h(to)h(matc)m(h)f(\014lenames)f(during)g(\014lename)g +(ex-)1110 4956 y(pansion)30 b(result)g(in)g(an)g(expansion)h(error.)630 +5121 y Ft(force_fignore)1110 5230 y Fu(If)43 b(set,)k(the)d(su\016xes)f +(sp)s(eci\014ed)f(b)m(y)i(the)f Ft(FIGNORE)f Fu(shell)h(v)-5 +b(ariable)44 b(cause)1110 5340 y(w)m(ords)31 b(to)h(b)s(e)f(ignored)h +(when)f(p)s(erforming)f(w)m(ord)h(completion)i(ev)m(en)f(if)g(the)p +eop end +%%Page: 70 76 +TeXDict begin 70 75 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(70)1110 299 y(ignored)37 +b(w)m(ords)g(are)g(the)h(only)f(p)s(ossible)g(completions.)62 +b(See)37 b(Section)h(5.2)1110 408 y([Bash)24 b(V)-8 b(ariables],)27 +b(page)e(73,)h(for)d(a)h(description)g(of)g Ft(FIGNORE)p +Fu(.)37 b(This)22 b(option)1110 518 y(is)30 b(enabled)h(b)m(y)f +(default.)630 701 y Ft(globasciiranges)1110 810 y Fu(If)j(set,)h(range) +f(expressions)g(used)f(in)h(pattern)g(matc)m(hing)h(brac)m(k)m(et)h +(expres-)1110 920 y(sions)28 b(\(see)h(Section)h(3.5.8.1)g([P)m(attern) +g(Matc)m(hing],)h(page)e(33\))g(b)s(eha)m(v)m(e)g(as)g(if)1110 +1029 y(in)i(the)g(traditional)i(C)d(lo)s(cale)j(when)d(p)s(erforming)g +(comparisons.)44 b(That)31 b(is,)1110 1139 y(the)d(curren)m(t)g(lo)s +(cale's)i(collating)h(sequence)d(is)h(not)f(tak)m(en)h(in)m(to)g +(accoun)m(t,)i(so)1110 1249 y(`)p Ft(b)p Fu(')j(will)g(not)g(collate)i +(b)s(et)m(w)m(een)e(`)p Ft(A)p Fu(')g(and)f(`)p Ft(B)p +Fu(',)h(and)f(upp)s(er-case)g(and)g(lo)m(w)m(er-)1110 +1358 y(case)e(ASCI)s(I)e(c)m(haracters)j(will)f(collate)i(together.)630 +1541 y Ft(globstar)96 b Fu(If)38 b(set,)j(the)e(pattern)f(`)p +Ft(**)p Fu(')h(used)e(in)i(a)f(\014lename)h(expansion)f(con)m(text)j +(will)1110 1650 y(matc)m(h)36 b(all)g(\014les)f(and)f(zero)i(or)f(more) +g(directories)h(and)e(sub)s(directories.)54 b(If)1110 +1760 y(the)30 b(pattern)g(is)g(follo)m(w)m(ed)i(b)m(y)d(a)i(`)p +Ft(/)p Fu(',)f(only)g(directories)h(and)f(sub)s(directories)1110 +1870 y(matc)m(h.)630 2052 y Ft(gnu_errfmt)1110 2162 y +Fu(If)35 b(set,)j(shell)e(error)g(messages)g(are)h(written)e(in)h(the)g +(standard)f Fm(gnu)g Fu(error)1110 2271 y(message)c(format.)630 +2454 y Ft(histappend)1110 2564 y Fu(If)c(set,)j(the)e(history)g(list)g +(is)g(app)s(ended)e(to)j(the)f(\014le)g(named)f(b)m(y)h(the)g(v)-5 +b(alue)29 b(of)1110 2673 y(the)d Ft(HISTFILE)d Fu(v)-5 +b(ariable)26 b(when)e(the)h(shell)h(exits,)h(rather)e(than)h(o)m(v)m +(erwriting)1110 2783 y(the)31 b(\014le.)630 2966 y Ft(histreedit)1110 +3075 y Fu(If)i(set,)h(and)f(Readline)h(is)f(b)s(eing)g(used,)g(a)g +(user)g(is)g(giv)m(en)h(the)g(opp)s(ortunit)m(y)1110 +3185 y(to)d(re-edit)g(a)g(failed)g(history)f(substitution.)630 +3367 y Ft(histverify)1110 3477 y Fu(If)35 b(set,)i(and)e(Readline)h(is) +f(b)s(eing)g(used,)h(the)f(results)g(of)g(history)h(substitu-)1110 +3587 y(tion)h(are)g(not)g(immediately)h(passed)e(to)h(the)g(shell)g +(parser.)59 b(Instead,)38 b(the)1110 3696 y(resulting)i(line)f(is)h +(loaded)g(in)m(to)g(the)g(Readline)g(editing)g(bu\013er,)h(allo)m(wing) +1110 3806 y(further)29 b(mo)s(di\014cation.)630 3988 +y Ft(hostcomplete)1110 4098 y Fu(If)38 b(set,)j(and)c(Readline)i(is)f +(b)s(eing)g(used,)h(Bash)g(will)f(attempt)h(to)g(p)s(erform)1110 +4208 y(hostname)d(completion)h(when)e(a)h(w)m(ord)f(con)m(taining)i(a)f +(`)p Ft(@)p Fu(')g(is)g(b)s(eing)f(com-)1110 4317 y(pleted)g(\(see)h +(Section)f(8.4.6)i([Commands)d(F)-8 b(or)36 b(Completion],)g(page)g +(133\).)1110 4427 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.) +630 4609 y Ft(huponexit)1110 4719 y Fu(If)i(set,)i(Bash)f(will)h(send)d +Ft(SIGHUP)h Fu(to)h(all)h(jobs)e(when)g(an)g(in)m(teractiv)m(e)k(login) +1110 4829 y(shell)31 b(exits)g(\(see)g(Section)g(3.7.6)h([Signals],)g +(page)f(42\).)630 5011 y Ft(inherit_errexit)1110 5121 +y Fu(If)e(set,)h(command)g(substitution)f(inherits)g(the)g(v)-5 +b(alue)30 b(of)g(the)f Ft(errexit)f Fu(op-)1110 5230 +y(tion,)33 b(instead)g(of)f(unsetting)g(it)h(in)f(the)g(subshell)f(en)m +(vironmen)m(t.)46 b(This)32 b(op-)1110 5340 y(tion)f(is)f(enabled)h +(when)e Fm(posix)h Fu(mo)s(de)g(is)g(enabled.)p eop end +%%Page: 71 77 +TeXDict begin 71 76 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(71)630 299 y Ft +(interactive_comments)1110 408 y Fu(Allo)m(w)27 b(a)g(w)m(ord)e(b)s +(eginning)g(with)h(`)p Ft(#)p Fu(')g(to)h(cause)f(that)h(w)m(ord)f(and) +f(all)i(remain-)1110 518 y(ing)41 b(c)m(haracters)i(on)e(that)h(line)g +(to)g(b)s(e)f(ignored)g(in)g(an)g(in)m(teractiv)m(e)j(shell.)1110 +628 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)630 +777 y Ft(lastpipe)96 b Fu(If)24 b(set,)i(and)e(job)g(con)m(trol)i(is)f +(not)f(activ)m(e,)k(the)d(shell)f(runs)f(the)i(last)g(command)1110 +887 y(of)37 b(a)h(pip)s(eline)e(not)h(executed)h(in)f(the)g(bac)m +(kground)g(in)g(the)g(curren)m(t)g(shell)1110 996 y(en)m(vironmen)m(t.) +630 1146 y Ft(lithist)144 b Fu(If)22 b(enabled,)i(and)d(the)h +Ft(cmdhist)e Fu(option)j(is)f(enabled,)i(m)m(ulti-line)f(commands)1110 +1255 y(are)28 b(sa)m(v)m(ed)h(to)g(the)f(history)g(with)f(em)m(b)s +(edded)g(newlines)h(rather)g(than)f(using)1110 1365 y(semicolon)32 +b(separators)f(where)e(p)s(ossible.)630 1514 y Ft(localvar_inherit)1110 +1624 y Fu(If)j(set,)h(lo)s(cal)g(v)-5 b(ariables)33 b(inherit)f(the)g +(v)-5 b(alue)32 b(and)g(attributes)h(of)f(a)g(v)-5 b(ariable)1110 +1733 y(of)36 b(the)g(same)g(name)g(that)h(exists)f(at)h(a)f(previous)g +(scop)s(e)g(b)s(efore)f(an)m(y)h(new)1110 1843 y(v)-5 +b(alue)31 b(is)f(assigned.)41 b(The)30 b Fr(nameref)48 +b Fu(attribute)31 b(is)f(not)h(inherited.)630 1993 y +Ft(localvar_unset)1110 2102 y Fu(If)i(set,)i(calling)g +Ft(unset)d Fu(on)i(lo)s(cal)g(v)-5 b(ariables)35 b(in)e(previous)g +(function)g(scop)s(es)1110 2212 y(marks)26 b(them)g(so)g(subsequen)m(t) +g(lo)s(okups)f(\014nd)g(them)h(unset)f(un)m(til)i(that)g(func-)1110 +2321 y(tion)40 b(returns.)68 b(This)39 b(is)g(iden)m(tical)j(to)e(the)g +(b)s(eha)m(vior)g(of)g(unsetting)g(lo)s(cal)1110 2431 +y(v)-5 b(ariables)31 b(at)g(the)g(curren)m(t)f(function)g(scop)s(e.)630 +2580 y Ft(login_shell)1110 2690 y Fu(The)35 b(shell)h(sets)g(this)f +(option)h(if)g(it)g(is)f(started)h(as)g(a)g(login)g(shell)g(\(see)g +(Sec-)1110 2800 y(tion)29 b(6.1)g([In)m(v)m(oking)h(Bash],)f(page)g +(86\).)41 b(The)28 b(v)-5 b(alue)29 b(ma)m(y)g(not)f(b)s(e)g(c)m +(hanged.)630 2949 y Ft(mailwarn)96 b Fu(If)34 b(set,)i(and)e(a)h +(\014le)g(that)g(Bash)f(is)h(c)m(hec)m(king)h(for)f(mail)g(has)f(b)s +(een)g(accessed)1110 3059 y(since)24 b(the)h(last)g(time)f(it)h(w)m(as) +f(c)m(hec)m(k)m(ed,)k(the)c(message)h Ft("The)k(mail)h(in)f +Fj(mail-)1110 3168 y(file)g Ft(has)h(been)f(read")g Fu(is)h(displa)m(y) +m(ed.)630 3318 y Ft(no_empty_cmd_completion)1110 3427 +y Fu(If)g(set,)g(and)g(Readline)g(is)h(b)s(eing)e(used,)h(Bash)g(will)g +(not)g(attempt)i(to)e(searc)m(h)1110 3537 y(the)25 b +Ft(PATH)f Fu(for)h(p)s(ossible)f(completions)j(when)d(completion)i(is)f +(attempted)h(on)1110 3646 y(an)k(empt)m(y)h(line.)630 +3796 y Ft(nocaseglob)1110 3905 y Fu(If)38 b(set,)k(Bash)d(matc)m(hes)g +(\014lenames)g(in)f(a)h(case-insensitiv)m(e)j(fashion)c(when)1110 +4015 y(p)s(erforming)29 b(\014lename)i(expansion.)630 +4164 y Ft(nocasematch)1110 4274 y Fu(If)42 b(set,)k(Bash)d(matc)m(hes)g +(patterns)g(in)f(a)h(case-insensitiv)m(e)i(fashion)d(when)1110 +4384 y(p)s(erforming)31 b(matc)m(hing)i(while)f(executing)i +Ft(case)d Fu(or)h Ft([[)g Fu(conditional)h(com-)1110 +4493 y(mands,)d(when)g(p)s(erforming)g(pattern)h(substitution)g(w)m +(ord)g(expansions,)g(or)1110 4603 y(when)g(\014ltering)i(p)s(ossible)f +(completions)h(as)g(part)f(of)h(programmable)f(com-)1110 +4712 y(pletion.)630 4862 y Ft(nullglob)96 b Fu(If)23 +b(set,)j(Bash)e(allo)m(ws)g(\014lename)g(patterns)g(whic)m(h)f(matc)m +(h)h(no)g(\014les)f(to)i(expand)1110 4971 y(to)31 b(a)g(n)m(ull)f +(string,)h(rather)f(than)g(themselv)m(es.)630 5121 y +Ft(progcomp)96 b Fu(If)25 b(set,)i(the)f(programmable)g(completion)g +(facilities)i(\(see)f(Section)f(8.6)h([Pro-)1110 5230 +y(grammable)45 b(Completion],)k(page)c(137\))h(are)f(enabled.)82 +b(This)44 b(option)h(is)1110 5340 y(enabled)30 b(b)m(y)h(default.)p +eop end +%%Page: 72 78 +TeXDict begin 72 77 bop 150 -116 a Fu(Chapter)30 b(4:)41 +b(Shell)30 b(Builtin)h(Commands)2069 b(72)630 299 y Ft(progcomp_alias) +1110 408 y Fu(If)23 b(set,)j(and)d(programmable)h(completion)h(is)f +(enabled,)h(Bash)f(treats)h(a)f(com-)1110 518 y(mand)34 +b(name)h(that)g(do)s(esn't)f(ha)m(v)m(e)i(an)m(y)g(completions)f(as)g +(a)g(p)s(ossible)g(alias)1110 628 y(and)40 b(attempts)i(alias)h +(expansion.)72 b(If)41 b(it)g(has)g(an)g(alias,)k(Bash)c(attempts)1110 +737 y(programmable)28 b(completion)h(using)e(the)h(command)f(w)m(ord)h +(resulting)f(from)1110 847 y(the)k(expanded)e(alias.)630 +1006 y Ft(promptvars)1110 1116 y Fu(If)50 b(set,)56 b(prompt)49 +b(strings)h(undergo)g(parameter)h(expansion,)k(command)1110 +1225 y(substitution,)35 b(arithmetic)g(expansion,)g(and)e(quote)i(remo) +m(v)-5 b(al)35 b(after)f(b)s(eing)1110 1335 y(expanded)53 +b(as)h(describ)s(ed)e(b)s(elo)m(w)i(\(see)h(Section)f(6.9)h([Con)m +(trolling)g(the)1110 1445 y(Prompt],)30 b(page)h(98\).)42 +b(This)30 b(option)h(is)f(enabled)h(b)m(y)f(default.)630 +1604 y Ft(restricted_shell)1110 1714 y Fu(The)40 b(shell)h(sets)g(this) +g(option)g(if)g(it)h(is)e(started)i(in)e(restricted)i(mo)s(de)e(\(see) +1110 1823 y(Section)32 b(6.10)h([The)d(Restricted)j(Shell],)e(page)h +(100\).)45 b(The)30 b(v)-5 b(alue)32 b(ma)m(y)g(not)1110 +1933 y(b)s(e)g(c)m(hanged.)49 b(This)32 b(is)h(not)h(reset)f(when)f +(the)h(startup)g(\014les)f(are)i(executed,)1110 2042 +y(allo)m(wing)k(the)e(startup)f(\014les)h(to)g(disco)m(v)m(er)h +(whether)f(or)f(not)i(a)f(shell)g(is)g(re-)1110 2152 +y(stricted.)630 2311 y Ft(shift_verbose)1110 2421 y Fu(If)g(this)g(is)g +(set,)j(the)d Ft(shift)f Fu(builtin)h(prin)m(ts)f(an)h(error)g(message) +i(when)d(the)1110 2531 y(shift)30 b(coun)m(t)h(exceeds)g(the)g(n)m(um)m +(b)s(er)e(of)h(p)s(ositional)i(parameters.)630 2690 y +Ft(sourcepath)1110 2800 y Fu(If)22 b(set,)j(the)e Ft(source)e +Fu(builtin)h(uses)g(the)h(v)-5 b(alue)23 b(of)g Ft(PATH)e +Fu(to)j(\014nd)d(the)h(directory)1110 2909 y(con)m(taining)29 +b(the)e(\014le)h(supplied)e(as)h(an)g(argumen)m(t.)40 +b(This)27 b(option)h(is)f(enabled)1110 3019 y(b)m(y)j(default.)630 +3178 y Ft(xpg_echo)96 b Fu(If)31 b(set,)h(the)g Ft(echo)e +Fu(builtin)h(expands)f(bac)m(kslash-escap)s(e)j(sequences)f(b)m(y)f +(de-)1110 3288 y(fault.)150 3528 y Fs(4.4)68 b(Sp)t(ecial)45 +b(Builtins)150 3688 y Fu(F)-8 b(or)35 b(historical)h(reasons,)g(the)e +Fm(posix)g Fu(standard)f(has)i(classi\014ed)f(sev)m(eral)i(builtin)e +(commands)g(as)h Fl(sp)-5 b(e-)150 3797 y(cial)p Fu(.)47 +b(When)33 b(Bash)f(is)h(executing)g(in)f Fm(posix)g Fu(mo)s(de,)h(the)g +(sp)s(ecial)g(builtins)e(di\013er)i(from)f(other)g(builtin)150 +3907 y(commands)e(in)g(three)h(resp)s(ects:)199 4042 +y(1.)61 b(Sp)s(ecial)31 b(builtins)e(are)i(found)e(b)s(efore)h(shell)h +(functions)f(during)f(command)h(lo)s(okup.)199 4176 y(2.)61 +b(If)30 b(a)h(sp)s(ecial)g(builtin)f(returns)f(an)h(error)g(status,)h +(a)g(non-in)m(teractiv)m(e)i(shell)d(exits.)199 4311 +y(3.)61 b(Assignmen)m(t)30 b(statemen)m(ts)h(preceding)f(the)f(command) +g(sta)m(y)i(in)e(e\013ect)i(in)e(the)h(shell)f(en)m(vironmen)m(t)330 +4420 y(after)i(the)f(command)h(completes.)275 4579 y(When)36 +b(Bash)g(is)h(not)f(executing)i(in)e Fm(posix)f Fu(mo)s(de,)j(these)f +(builtins)f(b)s(eha)m(v)m(e)h(no)f(di\013eren)m(tly)h(than)150 +4689 y(the)31 b(rest)f(of)h(the)f(Bash)h(builtin)e(commands.)41 +b(The)30 b(Bash)g Fm(posix)g Fu(mo)s(de)g(is)g(describ)s(ed)f(in)h +(Section)h(6.11)150 4799 y([Bash)g(POSIX)e(Mo)s(de],)i(page)g(101.)275 +4933 y(These)f(are)g(the)h Fm(posix)f Fu(sp)s(ecial)h(builtins:)390 +5068 y Ft(break)46 b(:)i(.)f(continue)f(eval)g(exec)h(exit)g(export)f +(readonly)f(return)h(set)390 5177 y(shift)g(trap)h(unset)p +eop end +%%Page: 73 79 +TeXDict begin 73 78 bop 3659 -116 a Fu(73)150 299 y Fp(5)80 +b(Shell)53 b(V)-13 b(ariables)150 504 y Fu(This)21 b(c)m(hapter)i +(describ)s(es)e(the)i(shell)f(v)-5 b(ariables)23 b(that)f(Bash)h(uses.) +37 b(Bash)23 b(automatically)h(assigns)f(default)150 +614 y(v)-5 b(alues)31 b(to)g(a)g(n)m(um)m(b)s(er)e(of)h(v)-5 +b(ariables.)150 843 y Fs(5.1)68 b(Bourne)45 b(Shell)g(V)-11 +b(ariables)150 1003 y Fu(Bash)30 b(uses)g(certain)h(shell)g(v)-5 +b(ariables)31 b(in)f(the)g(same)h(w)m(a)m(y)g(as)g(the)f(Bourne)g +(shell.)41 b(In)30 b(some)g(cases,)i(Bash)150 1112 y(assigns)f(a)f +(default)h(v)-5 b(alue)31 b(to)g(the)f(v)-5 b(ariable.)150 +1260 y Ft(CDPATH)192 b Fu(A)39 b(colon-separated)i(list)e(of)g +(directories)h(used)f(as)g(a)g(searc)m(h)h(path)e(for)h(the)g +Ft(cd)f Fu(builtin)630 1370 y(command.)150 1518 y Ft(HOME)288 +b Fu(The)23 b(curren)m(t)h(user's)f(home)g(directory;)k(the)d(default)g +(for)f(the)h Ft(cd)f Fu(builtin)g(command.)38 b(The)630 +1628 y(v)-5 b(alue)37 b(of)f(this)g(v)-5 b(ariable)37 +b(is)g(also)g(used)e(b)m(y)h(tilde)h(expansion)f(\(see)i(Section)f +(3.5.2)h([Tilde)630 1737 y(Expansion],)30 b(page)h(24\).)150 +1885 y Ft(IFS)336 b Fu(A)25 b(list)i(of)e(c)m(haracters)i(that)f +(separate)g(\014elds;)h(used)e(when)f(the)i(shell)f(splits)h(w)m(ords)e +(as)i(part)630 1995 y(of)31 b(expansion.)150 2143 y Ft(MAIL)288 +b Fu(If)44 b(this)g(parameter)h(is)g(set)g(to)g(a)f(\014lename)h(or)f +(directory)h(name)g(and)f(the)g Ft(MAILPATH)630 2252 +y Fu(v)-5 b(ariable)32 b(is)e(not)h(set,)h(Bash)f(informs)f(the)h(user) +f(of)h(the)g(arriv)-5 b(al)31 b(of)g(mail)g(in)g(the)g(sp)s(eci\014ed) +630 2362 y(\014le)f(or)h(Maildir-format)g(directory)-8 +b(.)150 2510 y Ft(MAILPATH)96 b Fu(A)33 b(colon-separated)i(list)f(of)f +(\014lenames)h(whic)m(h)f(the)g(shell)g(p)s(erio)s(dically)h(c)m(hec)m +(ks)g(for)f(new)630 2619 y(mail.)60 b(Eac)m(h)37 b(list)g(en)m(try)g +(can)g(sp)s(ecify)f(the)h(message)h(that)f(is)g(prin)m(ted)f(when)f +(new)h(mail)630 2729 y(arriv)m(es)31 b(in)g(the)g(mail)g(\014le)g(b)m +(y)g(separating)h(the)f(\014lename)g(from)f(the)h(message)h(with)e(a)i +(`)p Ft(?)p Fu('.)630 2839 y(When)g(used)f(in)h(the)g(text)i(of)e(the)g +(message,)i Ft($_)e Fu(expands)f(to)i(the)f(name)g(of)h(the)f(curren)m +(t)630 2948 y(mail)f(\014le.)150 3096 y Ft(OPTARG)192 +b Fu(The)30 b(v)-5 b(alue)31 b(of)f(the)h(last)g(option)g(argumen)m(t)g +(pro)s(cessed)f(b)m(y)g(the)g Ft(getopts)f Fu(builtin.)150 +3244 y Ft(OPTIND)192 b Fu(The)30 b(index)g(of)g(the)h(last)g(option)g +(argumen)m(t)g(pro)s(cessed)f(b)m(y)g(the)g Ft(getopts)f +Fu(builtin.)150 3392 y Ft(PATH)288 b Fu(A)32 b(colon-separated)i(list)f +(of)f(directories)h(in)e(whic)m(h)h(the)g(shell)g(lo)s(oks)h(for)f +(commands.)45 b(A)630 3502 y(zero-length)e(\(n)m(ull\))g(directory)f +(name)g(in)g(the)g(v)-5 b(alue)42 b(of)g Ft(PATH)f Fu(indicates)i(the)f +(curren)m(t)630 3611 y(directory)-8 b(.)49 b(A)33 b(n)m(ull)f +(directory)i(name)e(ma)m(y)i(app)s(ear)e(as)h(t)m(w)m(o)h(adjacen)m(t)g +(colons,)g(or)f(as)g(an)630 3721 y(initial)f(or)e(trailing)h(colon.)150 +3869 y Ft(PS1)336 b Fu(The)35 b(primary)f(prompt)h(string.)55 +b(The)35 b(default)h(v)-5 b(alue)35 b(is)h(`)p Ft(\\s-\\v\\$)28 +b Fu('.)56 b(See)36 b(Section)g(6.9)630 3979 y([Con)m(trolling)42 +b(the)e(Prompt],)j(page)e(98,)j(for)c(the)g(complete)i(list)f(of)f +(escap)s(e)h(sequences)630 4088 y(that)31 b(are)g(expanded)e(b)s(efore) +h Ft(PS1)g Fu(is)g(displa)m(y)m(ed.)150 4236 y Ft(PS2)336 +b Fu(The)28 b(secondary)g(prompt)g(string.)40 b(The)28 +b(default)g(v)-5 b(alue)29 b(is)g(`)p Ft(>)h Fu('.)40 +b Ft(PS2)28 b Fu(is)g(expanded)g(in)g(the)630 4346 y(same)j(w)m(a)m(y)g +(as)g Ft(PS1)e Fu(b)s(efore)h(b)s(eing)g(displa)m(y)m(ed.)150 +4575 y Fs(5.2)68 b(Bash)45 b(V)-11 b(ariables)150 4734 +y Fu(These)45 b(v)-5 b(ariables)46 b(are)g(set)g(or)f(used)f(b)m(y)h +(Bash,)50 b(but)44 b(other)i(shells)f(do)h(not)f(normally)h(treat)g +(them)150 4844 y(sp)s(ecially)-8 b(.)275 4973 y(A)24 +b(few)g(v)-5 b(ariables)24 b(used)g(b)m(y)f(Bash)i(are)f(describ)s(ed)f +(in)h(di\013eren)m(t)g(c)m(hapters:)38 b(v)-5 b(ariables)25 +b(for)f(con)m(trolling)150 5082 y(the)31 b(job)f(con)m(trol)h +(facilities)i(\(see)e(Section)g(7.3)h([Job)e(Con)m(trol)h(V)-8 +b(ariables],)32 b(page)g(110\).)150 5230 y Ft(_)432 b +Fu(\($)p 716 5230 28 4 v 41 w(,)34 b(an)g(underscore.\))49 +b(A)m(t)35 b(shell)f(startup,)g(set)g(to)g(the)g(pathname)f(used)g(to)h +(in)m(v)m(ok)m(e)i(the)630 5340 y(shell)e(or)g(shell)h(script)f(b)s +(eing)f(executed)j(as)e(passed)g(in)f(the)i(en)m(vironmen)m(t)f(or)g +(argumen)m(t)p eop end +%%Page: 74 80 +TeXDict begin 74 79 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(74)630 299 y(list.)55 +b(Subsequen)m(tly)-8 b(,)35 b(expands)f(to)i(the)f(last)g(argumen)m(t)h +(to)f(the)g(previous)f(simple)h(com-)630 408 y(mand)21 +b(executed)i(in)e(the)i(foreground,)g(after)f(expansion.)38 +b(Also)22 b(set)h(to)f(the)g(full)g(pathname)630 518 +y(used)h(to)i(in)m(v)m(ok)m(e)h(eac)m(h)g(command)e(executed)h(and)f +(placed)g(in)g(the)g(en)m(vironmen)m(t)h(exp)s(orted)630 +628 y(to)33 b(that)g(command.)45 b(When)32 b(c)m(hec)m(king)i(mail,)g +(this)e(parameter)g(holds)g(the)g(name)g(of)h(the)630 +737 y(mail)e(\014le.)150 920 y Ft(BASH)288 b Fu(The)30 +b(full)g(pathname)g(used)g(to)h(execute)h(the)e(curren)m(t)g(instance)h +(of)g(Bash.)150 1103 y Ft(BASHOPTS)96 b Fu(A)31 b(colon-separated)h +(list)f(of)g(enabled)f(shell)h(options.)41 b(Eac)m(h)31 +b(w)m(ord)f(in)g(the)h(list)g(is)g(a)g(v)-5 b(alid)630 +1212 y(argumen)m(t)37 b(for)g(the)g Ft(-s)f Fu(option)i(to)f(the)g +Ft(shopt)f Fu(builtin)g(command)h(\(see)g(Section)h(4.3.2)630 +1322 y([The)e(Shopt)g(Builtin],)i(page)f(66\).)60 b(The)36 +b(options)h(app)s(earing)f(in)g Ft(BASHOPTS)e Fu(are)i(those)630 +1431 y(rep)s(orted)e(as)h(`)p Ft(on)p Fu(')f(b)m(y)h(`)p +Ft(shopt)p Fu('.)53 b(If)34 b(this)g(v)-5 b(ariable)36 +b(is)f(in)f(the)h(en)m(vironmen)m(t)g(when)f(Bash)630 +1541 y(starts)25 b(up,)f(eac)m(h)i(shell)e(option)h(in)e(the)i(list)g +(will)f(b)s(e)g(enabled)g(b)s(efore)g(reading)g(an)m(y)g(startup)630 +1650 y(\014les.)41 b(This)29 b(v)-5 b(ariable)31 b(is)g(readonly)-8 +b(.)150 1833 y Ft(BASHPID)144 b Fu(Expands)35 b(to)i(the)f(pro)s(cess)f +(ID)i(of)f(the)g(curren)m(t)g(Bash)g(pro)s(cess.)58 b(This)35 +b(di\013ers)h(from)g Ft($$)630 1943 y Fu(under)31 b(certain)j +(circumstances,)h(suc)m(h)e(as)g(subshells)f(that)i(do)f(not)g(require) +g(Bash)g(to)h(b)s(e)630 2052 y(re-initialized.)57 b(Assignmen)m(ts)35 +b(to)h Ft(BASHPID)d Fu(ha)m(v)m(e)j(no)f(e\013ect.)56 +b(If)34 b Ft(BASHPID)f Fu(is)i(unset,)h(it)630 2162 y(loses)31 +b(its)g(sp)s(ecial)g(prop)s(erties,)f(ev)m(en)h(if)f(it)h(is)g +(subsequen)m(tly)f(reset.)150 2345 y Ft(BASH_ALIASES)630 +2454 y Fu(An)40 b(asso)s(ciativ)m(e)j(arra)m(y)d(v)-5 +b(ariable)41 b(whose)f(mem)m(b)s(ers)f(corresp)s(ond)g(to)i(the)f(in)m +(ternal)h(list)630 2564 y(of)c(aliases)h(as)f(main)m(tained)g(b)m(y)g +(the)g Ft(alias)e Fu(builtin.)59 b(\(see)37 b(Section)h(4.1)f([Bourne)g +(Shell)630 2673 y(Builtins],)31 b(page)g(44\).)42 b(Elemen)m(ts)31 +b(added)e(to)i(this)f(arra)m(y)h(app)s(ear)f(in)g(the)g(alias)h(list;)h +(ho)m(w-)630 2783 y(ev)m(er,)k(unsetting)f(arra)m(y)g(elemen)m(ts)g +(curren)m(tly)g(do)s(es)f(not)g(cause)h(aliases)h(to)f(b)s(e)f(remo)m +(v)m(ed)630 2892 y(from)25 b(the)h(alias)h(list.)40 b(If)25 +b Ft(BASH_ALIASES)d Fu(is)k(unset,)g(it)g(loses)h(its)f(sp)s(ecial)g +(prop)s(erties,)g(ev)m(en)630 3002 y(if)k(it)h(is)g(subsequen)m(tly)f +(reset.)150 3185 y Ft(BASH_ARGC)630 3294 y Fu(An)39 b(arra)m(y)g(v)-5 +b(ariable)40 b(whose)f(v)-5 b(alues)39 b(are)h(the)f(n)m(um)m(b)s(er)f +(of)h(parameters)g(in)g(eac)m(h)h(frame)630 3404 y(of)i(the)g(curren)m +(t)g(bash)f(execution)i(call)g(stac)m(k.)76 b(The)42 +b(n)m(um)m(b)s(er)e(of)i(parameters)g(to)h(the)630 3513 +y(curren)m(t)38 b(subroutine)f(\(shell)i(function)e(or)i(script)f +(executed)h(with)e Ft(.)h Fu(or)g Ft(source)p Fu(\))f(is)h(at)630 +3623 y(the)27 b(top)g(of)g(the)g(stac)m(k.)41 b(When)27 +b(a)g(subroutine)f(is)h(executed,)i(the)e(n)m(um)m(b)s(er)f(of)h +(parameters)630 3733 y(passed)44 b(is)h(pushed)e(on)m(to)j +Ft(BASH_ARGC)p Fu(.)81 b(The)44 b(shell)h(sets)g Ft(BASH_ARGC)e +Fu(only)i(when)e(in)630 3842 y(extended)34 b(debugging)f(mo)s(de)g +(\(see)i(Section)f(4.3.2)i([The)d(Shopt)g(Builtin],)i(page)g(66,)g(for) +630 3952 y(a)e(description)g(of)f(the)h Ft(extdebug)d +Fu(option)j(to)h(the)e Ft(shopt)g Fu(builtin\).)47 b(Setting)33 +b Ft(extdebug)630 4061 y Fu(after)c(the)g(shell)g(has)g(started)g(to)g +(execute)i(a)e(script,)g(or)g(referencing)g(this)f(v)-5 +b(ariable)30 b(when)630 4171 y Ft(extdebug)e Fu(is)j(not)f(set,)h(ma)m +(y)g(result)g(in)f(inconsisten)m(t)h(v)-5 b(alues.)150 +4354 y Ft(BASH_ARGV)630 4463 y Fu(An)24 b(arra)m(y)g(v)-5 +b(ariable)25 b(con)m(taining)h(all)f(of)f(the)h(parameters)f(in)g(the)g +(curren)m(t)g(bash)g(execution)630 4573 y(call)35 b(stac)m(k.)53 +b(The)34 b(\014nal)g(parameter)g(of)g(the)g(last)h(subroutine)e(call)i +(is)f(at)h(the)f(top)h(of)f(the)630 4682 y(stac)m(k;)28 +b(the)c(\014rst)f(parameter)i(of)f(the)g(initial)i(call)f(is)f(at)h +(the)f(b)s(ottom.)39 b(When)24 b(a)g(subroutine)630 4792 +y(is)40 b(executed,)j(the)d(parameters)h(supplied)d(are)i(pushed)f(on)m +(to)i Ft(BASH_ARGV)p Fu(.)66 b(The)40 b(shell)630 4902 +y(sets)28 b Ft(BASH_ARGV)e Fu(only)i(when)f(in)h(extended)g(debugging)g +(mo)s(de)g(\(see)h(Section)f(4.3.2)i([The)630 5011 y(Shopt)g(Builtin],) +h(page)g(66,)g(for)g(a)f(description)h(of)f(the)h Ft(extdebug)d +Fu(option)j(to)g(the)f Ft(shopt)630 5121 y Fu(builtin\).)64 +b(Setting)38 b Ft(extdebug)e Fu(after)j(the)f(shell)g(has)g(started)g +(to)h(execute)g(a)g(script,)h(or)630 5230 y(referencing)35 +b(this)f(v)-5 b(ariable)35 b(when)e Ft(extdebug)f Fu(is)j(not)f(set,)j +(ma)m(y)e(result)f(in)g(inconsisten)m(t)630 5340 y(v)-5 +b(alues.)p eop end +%%Page: 75 81 +TeXDict begin 75 80 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(75)150 299 y Ft(BASH_ARGV0)630 +408 y Fu(When)31 b(referenced,)g(this)g(v)-5 b(ariable)32 +b(expands)e(to)h(the)h(name)f(of)g(the)g(shell)g(or)g(shell)g(script) +630 518 y(\(iden)m(tical)42 b(to)e Ft($0)p Fu(;)j(See)d(Section)g +(3.4.2)i([Sp)s(ecial)e(P)m(arameters],)j(page)d(21,)j(for)c(the)h(de-) +630 628 y(scription)32 b(of)g(sp)s(ecial)g(parameter)g(0\).)45 +b(Assignmen)m(t)32 b(to)h Ft(BASH_ARGV0)c Fu(causes)j(the)f(v)-5 +b(alue)630 737 y(assigned)34 b(to)h(also)g(b)s(e)e(assigned)h(to)g +Ft($0)p Fu(.)51 b(If)33 b Ft(BASH_ARGV0)f Fu(is)h(unset,)i(it)f(loses)h +(its)f(sp)s(ecial)630 847 y(prop)s(erties,)c(ev)m(en)h(if)f(it)h(is)g +(subsequen)m(tly)f(reset.)150 1048 y Ft(BASH_CMDS)630 +1157 y Fu(An)k(asso)s(ciativ)m(e)i(arra)m(y)f(v)-5 b(ariable)35 +b(whose)f(mem)m(b)s(ers)f(corresp)s(ond)g(to)i(the)f(in)m(ternal)h +(hash)630 1267 y(table)c(of)g(commands)f(as)g(main)m(tained)h(b)m(y)g +(the)f Ft(hash)f Fu(builtin)h(\(see)h(Section)g(4.1)h([Bourne)630 +1377 y(Shell)42 b(Builtins],)k(page)d(44\).)77 b(Elemen)m(ts)43 +b(added)e(to)i(this)f(arra)m(y)h(app)s(ear)f(in)f(the)i(hash)630 +1486 y(table;)k(ho)m(w)m(ev)m(er,)e(unsetting)c(arra)m(y)g(elemen)m(ts) +i(curren)m(tly)d(do)s(es)h(not)g(cause)g(command)630 +1596 y(names)36 b(to)g(b)s(e)f(remo)m(v)m(ed)i(from)e(the)h(hash)f +(table.)58 b(If)36 b Ft(BASH_CMDS)d Fu(is)j(unset,)h(it)f(loses)h(its) +630 1705 y(sp)s(ecial)31 b(prop)s(erties,)f(ev)m(en)h(if)f(it)h(is)g +(subsequen)m(tly)f(reset.)150 1906 y Ft(BASH_COMMAND)630 +2016 y Fu(The)39 b(command)h(curren)m(tly)g(b)s(eing)f(executed)i(or)e +(ab)s(out)h(to)g(b)s(e)f(executed,)44 b(unless)39 b(the)630 +2125 y(shell)g(is)g(executing)g(a)g(command)g(as)g(the)f(result)h(of)g +(a)g(trap,)i(in)d(whic)m(h)g(case)i(it)f(is)g(the)630 +2235 y(command)30 b(executing)i(at)g(the)f(time)g(of)g(the)g(trap.)41 +b(If)30 b Ft(BASH_COMMAND)e Fu(is)i(unset,)h(it)g(loses)630 +2345 y(its)g(sp)s(ecial)g(prop)s(erties,)f(ev)m(en)h(if)f(it)h(is)f +(subsequen)m(tly)g(reset.)150 2545 y Ft(BASH_COMPAT)630 +2655 y Fu(The)i(v)-5 b(alue)33 b(is)g(used)f(to)h(set)g(the)g(shell's)g +(compatibilit)m(y)i(lev)m(el.)49 b(See)33 b(Section)h(6.12)g([Shell)630 +2765 y(Compatibilit)m(y)j(Mo)s(de],)h(page)e(104,)i(for)e(a)g +(description)g(of)f(the)h(v)-5 b(arious)36 b(compatibilit)m(y)630 +2874 y(lev)m(els)g(and)f(their)g(e\013ects.)55 b(The)34 +b(v)-5 b(alue)36 b(ma)m(y)f(b)s(e)f(a)i(decimal)f(n)m(um)m(b)s(er)f +(\(e.g.,)k(4.2\))e(or)f(an)630 2984 y(in)m(teger)44 b(\(e.g.,)j(42\))d +(corresp)s(onding)d(to)i(the)g(desired)e(compatibilit)m(y)k(lev)m(el.) +78 b(If)42 b Ft(BASH_)630 3093 y(COMPAT)28 b Fu(is)j(unset)e(or)h(set)h +(to)g(the)f(empt)m(y)h(string,)f(the)h(compatibilit)m(y)h(lev)m(el)g +(is)e(set)h(to)g(the)630 3203 y(default)39 b(for)g(the)g(curren)m(t)g +(v)m(ersion.)67 b(If)38 b Ft(BASH_COMPAT)e Fu(is)j(set)h(to)f(a)h(v)-5 +b(alue)39 b(that)h(is)f(not)630 3313 y(one)31 b(of)f(the)h(v)-5 +b(alid)31 b(compatibilit)m(y)i(lev)m(els,)f(the)f(shell)f(prin)m(ts)g +(an)h(error)f(message)i(and)e(sets)630 3422 y(the)i(compatibilit)m(y)j +(lev)m(el)e(to)g(the)g(default)f(for)g(the)g(curren)m(t)g(v)m(ersion.) +47 b(The)31 b(v)-5 b(alid)33 b(v)-5 b(alues)630 3532 +y(corresp)s(ond)31 b(to)i(the)g(compatibilit)m(y)i(lev)m(els)f(describ) +s(ed)d(b)s(elo)m(w)i(\(see)g(Section)h(6.12)g([Shell)630 +3641 y(Compatibilit)m(y)d(Mo)s(de],)f(page)g(104\).)42 +b(F)-8 b(or)30 b(example,)h(4.2)f(and)f(42)h(are)g(v)-5 +b(alid)30 b(v)-5 b(alues)29 b(that)630 3751 y(corresp)s(ond)d(to)i(the) +f Ft(compat42)e(shopt)g Fu(option)j(and)e(set)i(the)f(compatibilit)m(y) +i(lev)m(el)g(to)f(42.)630 3861 y(The)i(curren)m(t)g(v)m(ersion)h(is)f +(also)i(a)e(v)-5 b(alid)31 b(v)-5 b(alue.)150 4061 y +Ft(BASH_ENV)96 b Fu(If)28 b(this)g(v)-5 b(ariable)30 +b(is)e(set)h(when)f(Bash)g(is)h(in)m(v)m(ok)m(ed)h(to)f(execute)h(a)e +(shell)h(script,)g(its)g(v)-5 b(alue)29 b(is)630 4171 +y(expanded)k(and)h(used)g(as)g(the)h(name)f(of)g(a)h(startup)f(\014le)g +(to)h(read)f(b)s(efore)g(executing)i(the)630 4281 y(script.)41 +b(See)30 b(Section)h(6.2)h([Bash)f(Startup)e(Files],)j(page)f(88.)150 +4482 y Ft(BASH_EXECUTION_STRING)630 4591 y Fu(The)f(command)g(argumen)m +(t)h(to)g(the)g Ft(-c)e Fu(in)m(v)m(o)s(cation)k(option.)150 +4792 y Ft(BASH_LINENO)630 4902 y Fu(An)62 b(arra)m(y)i(v)-5 +b(ariable)63 b(whose)g(mem)m(b)s(ers)e(are)j(the)e(line)h(n)m(um)m(b)s +(ers)f(in)g(source)h(\014les)630 5011 y(where)46 b(eac)m(h)i(corresp)s +(onding)d(mem)m(b)s(er)h(of)h Fr(FUNCNAME)53 b Fu(w)m(as)47 +b(in)m(v)m(ok)m(ed.)91 b Ft(${BASH_)630 5121 y(LINENO[$i]})39 +b Fu(is)i(the)h(line)g(n)m(um)m(b)s(er)e(in)i(the)f(source)h(\014le)g +(\()p Ft(${BASH_SOURCE[$i+1]})p Fu(\))630 5230 y(where)d +Ft(${FUNCNAME[$i]})c Fu(w)m(as)k(called)i(\(or)e Ft +(${BASH_LINENO[$i-1]})34 b Fu(if)39 b(referenced)630 +5340 y(within)30 b(another)g(shell)h(function\).)41 b(Use)31 +b Ft(LINENO)d Fu(to)j(obtain)g(the)g(curren)m(t)f(line)h(n)m(um)m(b)s +(er.)p eop end +%%Page: 76 82 +TeXDict begin 76 81 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(76)150 299 y Ft +(BASH_LOADABLES_PATH)630 408 y Fu(A)39 b(colon-separated)i(list)f(of)f +(directories)h(in)f(whic)m(h)g(the)g(shell)h(lo)s(oks)f(for)g +(dynamically)630 518 y(loadable)32 b(builtins)d(sp)s(eci\014ed)h(b)m(y) +g(the)h Ft(enable)e Fu(command.)150 673 y Ft(BASH_REMATCH)630 +783 y Fu(An)43 b(arra)m(y)i(v)-5 b(ariable)44 b(whose)g(mem)m(b)s(ers)f +(are)h(assigned)g(b)m(y)f(the)h(`)p Ft(=~)p Fu(')g(binary)f(op)s +(erator)630 892 y(to)37 b(the)f Ft([[)g Fu(conditional)i(command)e +(\(see)h(Section)g(3.2.5.2)i([Conditional)e(Constructs],)630 +1002 y(page)e(11\).)52 b(The)33 b(elemen)m(t)j(with)d(index)g(0)i(is)f +(the)g(p)s(ortion)f(of)h(the)g(string)g(matc)m(hing)h(the)630 +1112 y(en)m(tire)29 b(regular)f(expression.)40 b(The)27 +b(elemen)m(t)j(with)d(index)h Fr(n)f Fu(is)h(the)g(p)s(ortion)g(of)g +(the)g(string)630 1221 y(matc)m(hing)j(the)g Fr(n)p Fu(th)f(paren)m +(thesized)h(sub)s(expression.)150 1377 y Ft(BASH_SOURCE)630 +1486 y Fu(An)40 b(arra)m(y)h(v)-5 b(ariable)41 b(whose)f(mem)m(b)s(ers) +g(are)h(the)g(source)f(\014lenames)h(where)f(the)g(corre-)630 +1596 y(sp)s(onding)27 b(shell)i(function)f(names)g(in)g(the)h +Ft(FUNCNAME)d Fu(arra)m(y)j(v)-5 b(ariable)30 b(are)f(de\014ned.)38 +b(The)630 1705 y(shell)26 b(function)g Ft(${FUNCNAME[$i]})c +Fu(is)k(de\014ned)f(in)g(the)h(\014le)h Ft(${BASH_SOURCE[$i]})21 +b Fu(and)630 1815 y(called)32 b(from)d Ft(${BASH_SOURCE[$i+1]})150 +1970 y(BASH_SUBSHELL)630 2080 y Fu(Incremen)m(ted)24 +b(b)m(y)f(one)h(within)f(eac)m(h)i(subshell)d(or)i(subshell)e(en)m +(vironmen)m(t)i(when)f(the)h(shell)630 2189 y(b)s(egins)j(executing)i +(in)e(that)h(en)m(vironmen)m(t.)41 b(The)27 b(initial)i(v)-5 +b(alue)28 b(is)f(0.)40 b(If)28 b Ft(BASH_SUBSHELL)630 +2299 y Fu(is)i(unset,)h(it)g(loses)g(its)f(sp)s(ecial)h(prop)s(erties,) +f(ev)m(en)h(if)g(it)g(is)f(subsequen)m(tly)g(reset.)150 +2454 y Ft(BASH_VERSINFO)630 2564 y Fu(A)36 b(readonly)g(arra)m(y)g(v)-5 +b(ariable)37 b(\(see)f(Section)h(6.7)g([Arra)m(ys],)h(page)e(95\))h +(whose)f(mem)m(b)s(ers)630 2673 y(hold)c(v)m(ersion)h(information)f +(for)g(this)g(instance)h(of)g(Bash.)46 b(The)32 b(v)-5 +b(alues)32 b(assigned)h(to)g(the)630 2783 y(arra)m(y)e(mem)m(b)s(ers)e +(are)i(as)g(follo)m(ws:)630 2938 y Ft(BASH_VERSINFO[0])1110 +3048 y Fu(The)f(ma)5 b(jor)30 b(v)m(ersion)h(n)m(um)m(b)s(er)e(\(the)i +Fr(release)5 b Fu(\).)630 3203 y Ft(BASH_VERSINFO[1])1110 +3313 y Fu(The)30 b(minor)g(v)m(ersion)h(n)m(um)m(b)s(er)e(\(the)i +Fr(v)m(ersion)p Fu(\).)630 3468 y Ft(BASH_VERSINFO[2])1110 +3577 y Fu(The)f(patc)m(h)h(lev)m(el.)630 3733 y Ft(BASH_VERSINFO[3]) +1110 3842 y Fu(The)f(build)f(v)m(ersion.)630 3998 y Ft +(BASH_VERSINFO[4])1110 4107 y Fu(The)h(release)i(status)e(\(e.g.,)j +Fr(b)s(eta1)7 b Fu(\).)630 4262 y Ft(BASH_VERSINFO[5])1110 +4372 y Fu(The)30 b(v)-5 b(alue)31 b(of)f Ft(MACHTYPE)p +Fu(.)150 4527 y Ft(BASH_VERSION)630 4637 y Fu(The)g(v)m(ersion)h(n)m +(um)m(b)s(er)e(of)h(the)h(curren)m(t)f(instance)h(of)g(Bash.)150 +4792 y Ft(BASH_XTRACEFD)630 4902 y Fu(If)f(set)h(to)h(an)e(in)m(teger)i +(corresp)s(onding)e(to)h(a)g(v)-5 b(alid)31 b(\014le)g(descriptor,)g +(Bash)g(will)g(write)g(the)630 5011 y(trace)37 b(output)f(generated)h +(when)f(`)p Ft(set)29 b(-x)p Fu(')36 b(is)g(enabled)h(to)g(that)f +(\014le)h(descriptor.)58 b(This)630 5121 y(allo)m(ws)29 +b(tracing)h(output)d(to)i(b)s(e)f(separated)g(from)g(diagnostic)h(and)f +(error)f(messages.)41 b(The)630 5230 y(\014le)31 b(descriptor)f(is)h +(closed)g(when)f Ft(BASH_XTRACEFD)d Fu(is)k(unset)f(or)g(assigned)h(a)g +(new)f(v)-5 b(alue.)630 5340 y(Unsetting)45 b Ft(BASH_XTRACEFD)40 +b Fu(or)k(assigning)g(it)g(the)g(empt)m(y)h(string)e(causes)i(the)f +(trace)p eop end +%%Page: 77 83 +TeXDict begin 77 82 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(77)630 299 y(output)33 +b(to)i(b)s(e)d(sen)m(t)j(to)f(the)g(standard)e(error.)50 +b(Note)35 b(that)g(setting)f Ft(BASH_XTRACEFD)c Fu(to)630 +408 y(2)39 b(\(the)h(standard)e(error)g(\014le)h(descriptor\))h(and)e +(then)h(unsetting)g(it)g(will)g(result)g(in)g(the)630 +518 y(standard)30 b(error)g(b)s(eing)f(closed.)150 664 +y Ft(CHILD_MAX)630 774 y Fu(Set)35 b(the)h(n)m(um)m(b)s(er)e(of)h +(exited)h(c)m(hild)g(status)f(v)-5 b(alues)36 b(for)f(the)g(shell)g(to) +h(remem)m(b)s(er.)55 b(Bash)630 883 y(will)37 b(not)g(allo)m(w)i(this)e +(v)-5 b(alue)37 b(to)h(b)s(e)e(decreased)i(b)s(elo)m(w)f(a)g +Fm(posix)p Fu(-mandated)f(minim)m(um,)630 993 y(and)30 +b(there)g(is)g(a)h(maxim)m(um)f(v)-5 b(alue)30 b(\(curren)m(tly)h +(8192\))h(that)f(this)f(ma)m(y)g(not)h(exceed.)41 b(The)630 +1103 y(minim)m(um)30 b(v)-5 b(alue)30 b(is)h(system-dep)s(enden)m(t.) +150 1249 y Ft(COLUMNS)144 b Fu(Used)32 b(b)m(y)f(the)h +Ft(select)e Fu(command)h(to)i(determine)f(the)f(terminal)i(width)d +(when)h(prin)m(ting)630 1358 y(selection)39 b(lists.)63 +b(Automatically)41 b(set)d(if)f(the)h Ft(checkwinsize)d +Fu(option)j(is)f(enabled)h(\(see)630 1468 y(Section)44 +b(4.3.2)h([The)e(Shopt)g(Builtin],)k(page)d(66\),)k(or)43 +b(in)g(an)g(in)m(teractiv)m(e)j(shell)e(up)s(on)630 1577 +y(receipt)31 b(of)g(a)g Ft(SIGWINCH)p Fu(.)150 1724 y +Ft(COMP_CWORD)630 1833 y Fu(An)38 b(index)g(in)m(to)h +Ft(${COMP_WORDS})c Fu(of)k(the)g(w)m(ord)f(con)m(taining)i(the)e +(curren)m(t)g(cursor)g(p)s(o-)630 1943 y(sition.)72 b(This)40 +b(v)-5 b(ariable)41 b(is)f(a)m(v)-5 b(ailable)43 b(only)e(in)f(shell)h +(functions)f(in)m(v)m(ok)m(ed)i(b)m(y)e(the)h(pro-)630 +2052 y(grammable)36 b(completion)g(facilities)i(\(see)e(Section)g(8.6)g +([Programmable)g(Completion],)630 2162 y(page)31 b(137\).)150 +2308 y Ft(COMP_LINE)630 2418 y Fu(The)38 b(curren)m(t)h(command)f +(line.)66 b(This)37 b(v)-5 b(ariable)40 b(is)f(a)m(v)-5 +b(ailable)41 b(only)d(in)h(shell)f(functions)630 2527 +y(and)25 b(external)h(commands)f(in)m(v)m(ok)m(ed)h(b)m(y)f(the)h +(programmable)f(completion)i(facilities)g(\(see)630 2637 +y(Section)k(8.6)h([Programmable)f(Completion],)g(page)g(137\).)150 +2783 y Ft(COMP_POINT)630 2892 y Fu(The)25 b(index)g(of)h(the)g(curren)m +(t)f(cursor)g(p)s(osition)h(relativ)m(e)i(to)e(the)g(b)s(eginning)f(of) +g(the)h(curren)m(t)630 3002 y(command.)40 b(If)27 b(the)h(curren)m(t)g +(cursor)g(p)s(osition)g(is)g(at)g(the)g(end)g(of)g(the)g(curren)m(t)g +(command,)630 3112 y(the)i(v)-5 b(alue)30 b(of)g(this)g(v)-5 +b(ariable)31 b(is)f(equal)g(to)h Ft(${#COMP_LINE})p Fu(.)37 +b(This)29 b(v)-5 b(ariable)31 b(is)f(a)m(v)-5 b(ailable)630 +3221 y(only)36 b(in)f(shell)h(functions)f(and)g(external)h(commands)g +(in)m(v)m(ok)m(ed)h(b)m(y)e(the)h(programmable)630 3331 +y(completion)c(facilities)g(\(see)g(Section)f(8.6)g([Programmable)g +(Completion],)h(page)f(137\).)150 3477 y Ft(COMP_TYPE)630 +3587 y Fu(Set)c(to)h(an)f(in)m(teger)h(v)-5 b(alue)28 +b(corresp)s(onding)e(to)h(the)h(t)m(yp)s(e)f(of)g(completion)h +(attempted)g(that)630 3696 y(caused)e(a)h(completion)h(function)e(to)h +(b)s(e)f(called:)40 b Fr(T)-8 b(AB)p Fu(,)27 b(for)g(normal)f +(completion,)j(`)p Ft(?)p Fu(',)e(for)630 3806 y(listing)35 +b(completions)h(after)f(successiv)m(e)g(tabs,)h(`)p Ft(!)p +Fu(',)g(for)e(listing)h(alternativ)m(es)i(on)d(partial)630 +3915 y(w)m(ord)22 b(completion,)k(`)p Ft(@)p Fu(',)f(to)e(list)g +(completions)h(if)f(the)g(w)m(ord)f(is)h(not)g(unmo)s(di\014ed,)f(or)h +(`)p Ft(\045)p Fu(',)h(for)630 4025 y(men)m(u)i(completion.)41 +b(This)25 b(v)-5 b(ariable)27 b(is)g(a)m(v)-5 b(ailable)28 +b(only)f(in)f(shell)g(functions)g(and)g(external)630 +4134 y(commands)32 b(in)m(v)m(ok)m(ed)i(b)m(y)e(the)g(programmable)h +(completion)g(facilities)i(\(see)e(Section)g(8.6)630 +4244 y([Programmable)e(Completion],)h(page)f(137\).)150 +4390 y Ft(COMP_KEY)96 b Fu(The)29 b(k)m(ey)i(\(or)g(\014nal)e(k)m(ey)i +(of)f(a)g(k)m(ey)h(sequence\))g(used)e(to)i(in)m(v)m(ok)m(e)h(the)e +(curren)m(t)g(completion)630 4500 y(function.)150 4646 +y Ft(COMP_WORDBREAKS)630 4756 y Fu(The)f(set)i(of)e(c)m(haracters)j +(that)e(the)g(Readline)g(library)g(treats)g(as)g(w)m(ord)g(separators)g +(when)630 4865 y(p)s(erforming)i(w)m(ord)h(completion.)51 +b(If)33 b Ft(COMP_WORDBREAKS)c Fu(is)34 b(unset,)g(it)f(loses)i(its)e +(sp)s(ecial)630 4975 y(prop)s(erties,)d(ev)m(en)h(if)f(it)h(is)g +(subsequen)m(tly)f(reset.)150 5121 y Ft(COMP_WORDS)630 +5230 y Fu(An)36 b(arra)m(y)g(v)-5 b(ariable)37 b(consisting)g(of)f(the) +g(individual)f(w)m(ords)h(in)f(the)h(curren)m(t)g(command)630 +5340 y(line.)94 b(The)47 b(line)i(is)f(split)g(in)m(to)h(w)m(ords)e(as) +h(Readline)h(w)m(ould)f(split)g(it,)53 b(using)47 b Ft(COMP_)p +eop end +%%Page: 78 84 +TeXDict begin 78 83 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(78)630 299 y Ft(WORDBREAKS)34 +b Fu(as)i(describ)s(ed)g(ab)s(o)m(v)m(e.)60 b(This)36 +b(v)-5 b(ariable)37 b(is)f(a)m(v)-5 b(ailable)39 b(only)e(in)f(shell)h +(func-)630 408 y(tions)32 b(in)m(v)m(ok)m(ed)i(b)m(y)d(the)i +(programmable)f(completion)h(facilities)h(\(see)f(Section)g(8.6)g +([Pro-)630 518 y(grammable)e(Completion],)g(page)g(137\).)150 +676 y Ft(COMPREPLY)630 786 y Fu(An)37 b(arra)m(y)h(v)-5 +b(ariable)38 b(from)f(whic)m(h)g(Bash)g(reads)g(the)h(p)s(ossible)e +(completions)j(generated)630 896 y(b)m(y)33 b(a)g(shell)h(function)f +(in)m(v)m(ok)m(ed)h(b)m(y)f(the)g(programmable)h(completion)g(facilit)m +(y)h(\(see)f(Sec-)630 1005 y(tion)g(8.6)g([Programmable)g(Completion],) +h(page)f(137\).)51 b(Eac)m(h)34 b(arra)m(y)g(elemen)m(t)h(con)m(tains) +630 1115 y(one)c(p)s(ossible)f(completion.)150 1273 y +Ft(COPROC)192 b Fu(An)27 b(arra)m(y)g(v)-5 b(ariable)28 +b(created)g(to)f(hold)g(the)g(\014le)g(descriptors)g(for)g(output)f +(from)h(and)f(input)630 1383 y(to)31 b(an)f(unnamed)f(copro)s(cess)i +(\(see)g(Section)h(3.2.6)g([Copro)s(cesses],)f(page)g(15\).)150 +1541 y Ft(DIRSTACK)96 b Fu(An)26 b(arra)m(y)h(v)-5 b(ariable)28 +b(con)m(taining)g(the)f(curren)m(t)f(con)m(ten)m(ts)j(of)e(the)f +(directory)i(stac)m(k.)41 b(Direc-)630 1650 y(tories)33 +b(app)s(ear)f(in)g(the)h(stac)m(k)h(in)e(the)h(order)f(they)h(are)g +(displa)m(y)m(ed)g(b)m(y)f(the)h Ft(dirs)e Fu(builtin.)630 +1760 y(Assigning)f(to)h(mem)m(b)s(ers)f(of)g(this)g(arra)m(y)g(v)-5 +b(ariable)31 b(ma)m(y)g(b)s(e)e(used)h(to)h(mo)s(dify)e(directories)630 +1870 y(already)41 b(in)f(the)h(stac)m(k,)k(but)40 b(the)h +Ft(pushd)e Fu(and)h Ft(popd)f Fu(builtins)h(m)m(ust)h(b)s(e)e(used)h +(to)i(add)630 1979 y(and)37 b(remo)m(v)m(e)h(directories.)63 +b(Assignmen)m(t)37 b(to)h(this)f(v)-5 b(ariable)38 b(will)g(not)f(c)m +(hange)i(the)e(cur-)630 2089 y(ren)m(t)c(directory)-8 +b(.)47 b(If)32 b Ft(DIRSTACK)e Fu(is)i(unset,)g(it)h(loses)g(its)g(sp)s +(ecial)g(prop)s(erties,)f(ev)m(en)h(if)f(it)h(is)630 +2198 y(subsequen)m(tly)d(reset.)150 2357 y Ft(EMACS)240 +b Fu(If)31 b(Bash)h(\014nds)d(this)j(v)-5 b(ariable)32 +b(in)f(the)h(en)m(vironmen)m(t)g(when)e(the)i(shell)f(starts)h(with)f +(v)-5 b(alue)630 2466 y(`)p Ft(t)p Fu(',)36 b(it)f(assumes)f(that)h +(the)g(shell)f(is)h(running)e(in)h(an)g(Emacs)h(shell)g(bu\013er)e(and) +h(disables)630 2576 y(line)d(editing.)150 2734 y Ft(ENV)336 +b Fu(Expanded)30 b(and)h(executed)h(similarlt)m(y)g(to)g +Ft(BASH_ENV)d Fu(\(see)k(Section)f(6.2)g([Bash)g(Startup)630 +2844 y(Files],)39 b(page)e(88\))h(when)d(an)h(in)m(teractiv)m(e)j +(shell)d(is)h(in)m(v)m(ok)m(ed)g(in)f Fm(posix)g Fu(Mo)s(de)g(\(see)h +(Sec-)630 2953 y(tion)31 b(6.11)h([Bash)f(POSIX)e(Mo)s(de],)i(page)g +(101\).)150 3112 y Ft(EPOCHREALTIME)630 3221 y Fu(Eac)m(h)38 +b(time)f(this)g(parameter)h(is)f(referenced,)i(it)f(expands)e(to)i(the) +f(n)m(um)m(b)s(er)f(of)h(seconds)630 3331 y(since)f(the)g(Unix)f(Ep)s +(o)s(c)m(h)g(as)h(a)g(\015oating)h(p)s(oin)m(t)f(v)-5 +b(alue)36 b(with)f(micro-second)i(gran)m(ularit)m(y)630 +3440 y(\(see)42 b(the)g(do)s(cumen)m(tation)g(for)f(the)g(C)g(library)g +(function)g Fr(time)47 b Fu(for)41 b(the)h(de\014nition)f(of)630 +3550 y(Ep)s(o)s(c)m(h\).)82 b(Assignmen)m(ts)44 b(to)h +Ft(EPOCHREALTIME)c Fu(are)j(ignored.)83 b(If)43 b Ft(EPOCHREALTIME)e +Fu(is)630 3660 y(unset,)30 b(it)h(loses)g(its)g(sp)s(ecial)g(prop)s +(erties,)f(ev)m(en)h(if)f(it)h(is)g(subsequen)m(tly)f(reset.)150 +3818 y Ft(EPOCHSECONDS)630 3927 y Fu(Eac)m(h)38 b(time)f(this)g +(parameter)h(is)f(referenced,)i(it)f(expands)e(to)i(the)f(n)m(um)m(b)s +(er)f(of)h(seconds)630 4037 y(since)e(the)g(Unix)f(Ep)s(o)s(c)m(h)g +(\(see)i(the)f(do)s(cumen)m(tation)g(for)g(the)f(C)h(library)f +(function)g Fr(time)630 4147 y Fu(for)41 b(the)g(de\014nition)g(of)h +(Ep)s(o)s(c)m(h\).)73 b(Assignmen)m(ts)41 b(to)h Ft(EPOCHSECONDS)c +Fu(are)k(ignored.)73 b(If)630 4256 y Ft(EPOCHSECONDS)27 +b Fu(is)j(unset,)g(it)g(loses)h(its)g(sp)s(ecial)f(prop)s(erties,)g(ev) +m(en)h(if)f(it)g(is)g(subsequen)m(tly)630 4366 y(reset.)150 +4524 y Ft(EUID)288 b Fu(The)30 b(n)m(umeric)g(e\013ectiv)m(e)j(user)d +(id)g(of)g(the)h(curren)m(t)f(user.)40 b(This)30 b(v)-5 +b(ariable)31 b(is)f(readonly)-8 b(.)150 4682 y Ft(EXECIGNORE)630 +4792 y Fu(A)29 b(colon-separated)h(list)f(of)g(shell)g(patterns)f +(\(see)i(Section)f(3.5.8.1)i([P)m(attern)f(Matc)m(hing],)630 +4902 y(page)j(33\))g(de\014ning)e(the)h(list)g(of)g(\014lenames)g(to)g +(b)s(e)g(ignored)g(b)m(y)f(command)h(searc)m(h)g(using)630 +5011 y Ft(PATH)p Fu(.)k(Files)22 b(whose)f(full)g(pathnames)g(matc)m(h) +h(one)f(of)g(these)h(patterns)e(are)i(not)f(considered)630 +5121 y(executable)j(\014les)e(for)g(the)h(purp)s(oses)d(of)j +(completion)h(and)d(command)i(execution)g(via)g Ft(PATH)630 +5230 y Fu(lo)s(okup.)56 b(This)35 b(do)s(es)g(not)h(a\013ect)i(the)d(b) +s(eha)m(vior)h(of)g(the)g Ft([)p Fu(,)h Ft(test)p Fu(,)f(and)f +Ft([[)g Fu(commands.)630 5340 y(F)-8 b(ull)42 b(pathnames)e(in)h(the)g +(command)g(hash)f(table)i(are)g(not)f(sub)5 b(ject)41 +b(to)g Ft(EXECIGNORE)p Fu(.)p eop end +%%Page: 79 85 +TeXDict begin 79 84 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(79)630 299 y(Use)30 +b(this)f(v)-5 b(ariable)30 b(to)g(ignore)g(shared)f(library)g(\014les)g +(that)h(ha)m(v)m(e)h(the)f(executable)h(bit)e(set,)630 +408 y(but)36 b(are)h(not)g(executable)i(\014les.)60 b(The)36 +b(pattern)h(matc)m(hing)h(honors)e(the)h(setting)h(of)f(the)630 +518 y Ft(extglob)28 b Fu(shell)j(option.)150 679 y Ft(FCEDIT)192 +b Fu(The)30 b(editor)h(used)e(as)i(a)g(default)f(b)m(y)h(the)f +Ft(-e)g Fu(option)h(to)g(the)f Ft(fc)g Fu(builtin)g(command.)150 +840 y Ft(FIGNORE)144 b Fu(A)35 b(colon-separated)i(list)f(of)g +(su\016xes)e(to)i(ignore)g(when)e(p)s(erforming)g(\014lename)i(comple-) +630 950 y(tion.)k(A)27 b(\014lename)g(whose)f(su\016x)g(matc)m(hes)i +(one)f(of)g(the)g(en)m(tries)g(in)g Ft(FIGNORE)d Fu(is)j(excluded)630 +1060 y(from)j(the)g(list)h(of)g(matc)m(hed)g(\014lenames.)41 +b(A)30 b(sample)h(v)-5 b(alue)31 b(is)f(`)p Ft(.o:~)p +Fu(')150 1221 y Ft(FUNCNAME)96 b Fu(An)35 b(arra)m(y)i(v)-5 +b(ariable)36 b(con)m(taining)h(the)f(names)g(of)g(all)g(shell)g +(functions)g(curren)m(tly)f(in)h(the)630 1330 y(execution)g(call)h +(stac)m(k.)57 b(The)34 b(elemen)m(t)j(with)e(index)g(0)h(is)f(the)g +(name)h(of)f(an)m(y)h(curren)m(tly-)630 1440 y(executing)f(shell)f +(function.)51 b(The)34 b(b)s(ottom-most)h(elemen)m(t)g(\(the)g(one)f +(with)g(the)g(highest)630 1549 y(index\))e(is)h Ft("main")p +Fu(.)44 b(This)32 b(v)-5 b(ariable)33 b(exists)g(only)g(when)e(a)i +(shell)f(function)g(is)g(executing.)630 1659 y(Assignmen)m(ts)23 +b(to)f Ft(FUNCNAME)e Fu(ha)m(v)m(e)k(no)e(e\013ect.)39 +b(If)22 b Ft(FUNCNAME)e Fu(is)i(unset,)h(it)g(loses)g(its)f(sp)s(ecial) +630 1769 y(prop)s(erties,)30 b(ev)m(en)h(if)f(it)h(is)g(subsequen)m +(tly)f(reset.)630 1904 y(This)h(v)-5 b(ariable)32 b(can)f(b)s(e)g(used) +g(with)g Ft(BASH_LINENO)d Fu(and)j Ft(BASH_SOURCE)p Fu(.)40 +b(Eac)m(h)32 b(elemen)m(t)630 2014 y(of)g Ft(FUNCNAME)d +Fu(has)j(corresp)s(onding)e(elemen)m(ts)j(in)f Ft(BASH_LINENO)c +Fu(and)k Ft(BASH_SOURCE)c Fu(to)630 2123 y(describ)s(e)39 +b(the)h(call)h(stac)m(k.)70 b(F)-8 b(or)41 b(instance,)i +Ft(${FUNCNAME[$i]})35 b Fu(w)m(as)41 b(called)f(from)g(the)630 +2233 y(\014le)27 b Ft(${BASH_SOURCE[$i+1]})21 b Fu(at)27 +b(line)h(n)m(um)m(b)s(er)d Ft(${BASH_LINENO[$i]})p Fu(.)34 +b(The)27 b Ft(caller)630 2342 y Fu(builtin)j(displa)m(ys)g(the)h +(curren)m(t)f(call)i(stac)m(k)g(using)d(this)i(information.)150 +2504 y Ft(FUNCNEST)96 b Fu(If)34 b(set)i(to)f(a)h(n)m(umeric)e(v)-5 +b(alue)36 b(greater)g(than)e(0,)j(de\014nes)d(a)h(maxim)m(um)g +(function)g(nesting)630 2613 y(lev)m(el.)42 b(F)-8 b(unction)29 +b(in)m(v)m(o)s(cations)h(that)f(exceed)h(this)e(nesting)h(lev)m(el)h +(will)f(cause)g(the)f(curren)m(t)630 2723 y(command)i(to)h(ab)s(ort.) +150 2884 y Ft(GLOBIGNORE)630 2993 y Fu(A)k(colon-separated)i(list)f(of) +f(patterns)g(de\014ning)f(the)i(set)f(of)g(\014le)h(names)f(to)g(b)s(e) +g(ignored)630 3103 y(b)m(y)28 b(\014lename)h(expansion.)40 +b(If)28 b(a)h(\014le)g(name)g(matc)m(hed)g(b)m(y)g(a)g(\014lename)f +(expansion)h(pattern)630 3213 y(also)k(matc)m(hes)g(one)f(of)g(the)g +(patterns)g(in)f Ft(GLOBIGNORE)p Fu(,)f(it)i(is)g(remo)m(v)m(ed)h(from) +e(the)h(list)h(of)630 3322 y(matc)m(hes.)41 b(The)27 +b(pattern)g(matc)m(hing)h(honors)f(the)g(setting)i(of)e(the)h +Ft(extglob)d Fu(shell)i(option.)150 3483 y Ft(GROUPS)192 +b Fu(An)36 b(arra)m(y)g(v)-5 b(ariable)37 b(con)m(taining)g(the)f(list) +h(of)f(groups)g(of)g(whic)m(h)f(the)i(curren)m(t)e(user)h(is)g(a)630 +3593 y(mem)m(b)s(er.)41 b(Assignmen)m(ts)30 b(to)i Ft(GROUPS)d +Fu(ha)m(v)m(e)i(no)g(e\013ect.)42 b(If)30 b Ft(GROUPS)f +Fu(is)i(unset,)f(it)h(loses)h(its)630 3703 y(sp)s(ecial)f(prop)s +(erties,)f(ev)m(en)h(if)f(it)h(is)g(subsequen)m(tly)f(reset.)150 +3864 y Ft(histchars)630 3973 y Fu(Up)c(to)g(three)g(c)m(haracters)i +(whic)m(h)d(con)m(trol)j(history)d(expansion,)i(quic)m(k)g +(substitution,)g(and)630 4083 y(tok)m(enization)k(\(see)f(Section)f +(9.3)h([History)f(In)m(teraction],)i(page)f(148\).)41 +b(The)29 b(\014rst)e(c)m(harac-)630 4193 y(ter)j(is)f(the)g +Fr(history)g(expansion)g Fu(c)m(haracter,)j(that)e(is,)f(the)h(c)m +(haracter)h(whic)m(h)d(signi\014es)i(the)630 4302 y(start)25 +b(of)f(a)h(history)f(expansion,)i(normally)e(`)p Ft(!)p +Fu('.)39 b(The)24 b(second)g(c)m(haracter)i(is)e(the)g(c)m(haracter)630 +4412 y(whic)m(h)36 b(signi\014es)g(`quic)m(k)h(substitution')f(when)f +(seen)h(as)g(the)g(\014rst)f(c)m(haracter)j(on)e(a)g(line,)630 +4521 y(normally)27 b(`)p Ft(^)p Fu('.)39 b(The)26 b(optional)i(third)d +(c)m(haracter)j(is)e(the)h(c)m(haracter)h(whic)m(h)e(indicates)h(that) +630 4631 y(the)34 b(remainder)f(of)h(the)g(line)g(is)f(a)h(commen)m(t)h +(when)e(found)f(as)i(the)g(\014rst)f(c)m(haracter)i(of)f(a)630 +4740 y(w)m(ord,)i(usually)f(`)p Ft(#)p Fu('.)55 b(The)34 +b(history)h(commen)m(t)h(c)m(haracter)h(causes)e(history)g +(substitution)630 4850 y(to)27 b(b)s(e)f(skipp)s(ed)f(for)i(the)f +(remaining)h(w)m(ords)f(on)h(the)f(line.)40 b(It)27 b(do)s(es)f(not)h +(necessarily)g(cause)630 4960 y(the)k(shell)f(parser)g(to)h(treat)g +(the)g(rest)g(of)f(the)h(line)f(as)h(a)g(commen)m(t.)150 +5121 y Ft(HISTCMD)144 b Fu(The)44 b(history)h(n)m(um)m(b)s(er,)j(or)d +(index)g(in)f(the)h(history)g(list,)50 b(of)45 b(the)g(curren)m(t)g +(command.)630 5230 y(Assignmen)m(ts)37 b(to)h Ft(HISTCMD)d +Fu(are)j(ignored.)61 b(If)37 b Ft(HISTCMD)e Fu(is)i(unset,)h(it)g +(loses)g(its)f(sp)s(ecial)630 5340 y(prop)s(erties,)30 +b(ev)m(en)h(if)f(it)h(is)g(subsequen)m(tly)f(reset.)p +eop end +%%Page: 80 86 +TeXDict begin 80 85 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(80)150 299 y Ft(HISTCONTROL)630 +408 y Fu(A)40 b(colon-separated)i(list)f(of)f(v)-5 b(alues)40 +b(con)m(trolling)i(ho)m(w)e(commands)g(are)h(sa)m(v)m(ed)g(on)f(the)630 +518 y(history)29 b(list.)41 b(If)28 b(the)h(list)h(of)f(v)-5 +b(alues)29 b(includes)f(`)p Ft(ignorespace)p Fu(',)f(lines)i(whic)m(h)g +(b)s(egin)f(with)630 628 y(a)39 b(space)g(c)m(haracter)i(are)e(not)g +(sa)m(v)m(ed)g(in)g(the)g(history)f(list.)66 b(A)39 b(v)-5 +b(alue)39 b(of)g(`)p Ft(ignoredups)p Fu(')630 737 y(causes)34 +b(lines)h(whic)m(h)f(matc)m(h)h(the)f(previous)f(history)h(en)m(try)h +(to)g(not)f(b)s(e)f(sa)m(v)m(ed.)53 b(A)34 b(v)-5 b(alue)630 +847 y(of)32 b(`)p Ft(ignoreboth)p Fu(')d(is)j(shorthand)e(for)i(`)p +Ft(ignorespace)p Fu(')d(and)i(`)p Ft(ignoredups)p Fu('.)42 +b(A)32 b(v)-5 b(alue)32 b(of)630 956 y(`)p Ft(erasedups)p +Fu(')f(causes)i(all)h(previous)f(lines)g(matc)m(hing)h(the)f(curren)m +(t)g(line)g(to)h(b)s(e)e(remo)m(v)m(ed)630 1066 y(from)42 +b(the)h(history)f(list)i(b)s(efore)e(that)h(line)g(is)g(sa)m(v)m(ed.)78 +b(An)m(y)43 b(v)-5 b(alue)43 b(not)g(in)f(the)h(ab)s(o)m(v)m(e)630 +1176 y(list)35 b(is)g(ignored.)53 b(If)34 b Ft(HISTCONTROL)e +Fu(is)i(unset,)i(or)e(do)s(es)h(not)g(include)f(a)h(v)-5 +b(alid)35 b(v)-5 b(alue,)36 b(all)630 1285 y(lines)30 +b(read)g(b)m(y)g(the)g(shell)g(parser)g(are)g(sa)m(v)m(ed)h(on)f(the)g +(history)g(list,)h(sub)5 b(ject)30 b(to)g(the)g(v)-5 +b(alue)630 1395 y(of)42 b Ft(HISTIGNORE)p Fu(.)73 b(The)42 +b(second)g(and)g(subsequen)m(t)f(lines)h(of)h(a)f(m)m(ulti-line)h(comp) +s(ound)630 1504 y(command)33 b(are)h(not)g(tested,)i(and)d(are)h(added) +f(to)h(the)g(history)g(regardless)g(of)g(the)f(v)-5 b(alue)630 +1614 y(of)31 b Ft(HISTCONTROL)p Fu(.)150 1763 y Ft(HISTFILE)96 +b Fu(The)27 b(name)h(of)g(the)g(\014le)g(to)h(whic)m(h)f(the)g(command) +f(history)h(is)g(sa)m(v)m(ed.)41 b(The)27 b(default)h(v)-5 +b(alue)630 1873 y(is)30 b Ft(~/.bash_history)p Fu(.)150 +2022 y Ft(HISTFILESIZE)630 2132 y Fu(The)c(maxim)m(um)f(n)m(um)m(b)s +(er)g(of)h(lines)h(con)m(tained)g(in)f(the)g(history)g(\014le.)39 +b(When)26 b(this)g(v)-5 b(ariable)630 2242 y(is)25 b(assigned)h(a)g(v) +-5 b(alue,)27 b(the)f(history)f(\014le)h(is)f(truncated,)i(if)e +(necessary)-8 b(,)28 b(to)e(con)m(tain)g(no)g(more)630 +2351 y(than)37 b(that)h(n)m(um)m(b)s(er)d(of)j(lines)f(b)m(y)g(remo)m +(ving)h(the)f(oldest)h(en)m(tries.)62 b(The)37 b(history)g(\014le)g(is) +630 2461 y(also)i(truncated)f(to)h(this)e(size)i(after)g(writing)f(it)g +(when)f(a)h(shell)h(exits.)64 b(If)37 b(the)h(v)-5 b(alue)39 +b(is)630 2570 y(0,)g(the)e(history)f(\014le)h(is)g(truncated)f(to)i +(zero)f(size.)60 b(Non-n)m(umeric)37 b(v)-5 b(alues)37 +b(and)f(n)m(umeric)630 2680 y(v)-5 b(alues)31 b(less)f(than)g(zero)h +(inhibit)f(truncation.)41 b(The)29 b(shell)i(sets)f(the)h(default)f(v) +-5 b(alue)31 b(to)g(the)630 2790 y(v)-5 b(alue)31 b(of)f +Ft(HISTSIZE)f Fu(after)h(reading)h(an)m(y)g(startup)f(\014les.)150 +2939 y Ft(HISTIGNORE)630 3049 y Fu(A)j(colon-separated)h(list)f(of)g +(patterns)f(used)g(to)h(decide)g(whic)m(h)f(command)g(lines)h(should) +630 3158 y(b)s(e)f(sa)m(v)m(ed)h(on)g(the)f(history)h(list.)47 +b(Eac)m(h)33 b(pattern)g(is)f(anc)m(hored)h(at)g(the)f(b)s(eginning)g +(of)h(the)630 3268 y(line)43 b(and)e(m)m(ust)h(matc)m(h)h(the)g +(complete)h(line)e(\(no)h(implicit)g(`)p Ft(*)p Fu(')f(is)g(app)s +(ended\).)75 b(Eac)m(h)630 3377 y(pattern)42 b(is)g(tested)g(against)h +(the)f(line)g(after)g(the)g(c)m(hec)m(ks)h(sp)s(eci\014ed)e(b)m(y)h +Ft(HISTCONTROL)630 3487 y Fu(are)37 b(applied.)59 b(In)36 +b(addition)h(to)g(the)g(normal)g(shell)f(pattern)h(matc)m(hing)h(c)m +(haracters,)i(`)p Ft(&)p Fu(')630 3597 y(matc)m(hes)d(the)f(previous)g +(history)g(line.)57 b(`)p Ft(&)p Fu(')36 b(ma)m(y)h(b)s(e)e(escap)s(ed) +h(using)g(a)g(bac)m(kslash;)k(the)630 3706 y(bac)m(kslash)34 +b(is)g(remo)m(v)m(ed)h(b)s(efore)e(attempting)i(a)g(matc)m(h.)51 +b(The)34 b(second)f(and)h(subsequen)m(t)630 3816 y(lines)e(of)h(a)g(m)m +(ulti-line)g(comp)s(ound)e(command)h(are)h(not)f(tested,)i(and)e(are)g +(added)g(to)h(the)630 3925 y(history)k(regardless)h(of)f(the)g(v)-5 +b(alue)38 b(of)f Ft(HISTIGNORE)p Fu(.)58 b(The)37 b(pattern)g(matc)m +(hing)i(honors)630 4035 y(the)31 b(setting)g(of)g(the)f +Ft(extglob)f Fu(shell)h(option.)630 4164 y Ft(HISTIGNORE)20 +b Fu(subsumes)g(the)j(function)f(of)h Ft(HISTCONTROL)p +Fu(.)35 b(A)23 b(pattern)f(of)h(`)p Ft(&)p Fu(')g(is)f(iden)m(tical)630 +4274 y(to)k Ft(ignoredups)p Fu(,)e(and)h(a)h(pattern)g(of)f(`)p +Ft([)31 b(]*)p Fu(')25 b(is)h(iden)m(tical)h(to)f Ft(ignorespace)p +Fu(.)36 b(Com)m(bining)630 4384 y(these)30 b(t)m(w)m(o)h(patterns,)f +(separating)g(them)g(with)f(a)h(colon,)h(pro)m(vides)e(the)h +(functionalit)m(y)h(of)630 4493 y Ft(ignoreboth)p Fu(.)150 +4643 y Ft(HISTSIZE)96 b Fu(The)37 b(maxim)m(um)g(n)m(um)m(b)s(er)e(of)j +(commands)f(to)g(remem)m(b)s(er)g(on)g(the)g(history)g(list.)62 +b(If)37 b(the)630 4752 y(v)-5 b(alue)26 b(is)g(0,)i(commands)d(are)h +(not)h(sa)m(v)m(ed)g(in)e(the)h(history)g(list.)40 b(Numeric)26 +b(v)-5 b(alues)26 b(less)g(than)630 4862 y(zero)i(result)e(in)h(ev)m +(ery)g(command)g(b)s(eing)f(sa)m(v)m(ed)i(on)f(the)g(history)f(list)i +(\(there)f(is)g(no)g(limit\).)630 4971 y(The)j(shell)g(sets)h(the)g +(default)f(v)-5 b(alue)31 b(to)g(500)h(after)f(reading)f(an)m(y)h +(startup)f(\014les.)150 5121 y Ft(HISTTIMEFORMAT)630 +5230 y Fu(If)44 b(this)g(v)-5 b(ariable)45 b(is)f(set)g(and)g(not)g(n)m +(ull,)k(its)d(v)-5 b(alue)44 b(is)g(used)g(as)g(a)h(format)f(string)g +(for)630 5340 y Fr(strftime)c Fu(to)35 b(prin)m(t)f(the)h(time)g(stamp) +f(asso)s(ciated)i(with)f(eac)m(h)g(history)g(en)m(try)f(displa)m(y)m +(ed)p eop end +%%Page: 81 87 +TeXDict begin 81 86 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(81)630 299 y(b)m(y)34 +b(the)f Ft(history)f Fu(builtin.)50 b(If)33 b(this)h(v)-5 +b(ariable)34 b(is)g(set,)h(time)f(stamps)g(are)g(written)f(to)i(the)630 +408 y(history)26 b(\014le)g(so)g(they)g(ma)m(y)h(b)s(e)e(preserv)m(ed)g +(across)i(shell)f(sessions.)39 b(This)25 b(uses)h(the)g(history)630 +518 y(commen)m(t)31 b(c)m(haracter)h(to)f(distinguish)f(timestamps)h +(from)f(other)g(history)h(lines.)150 687 y Ft(HOSTFILE)96 +b Fu(Con)m(tains)33 b(the)g(name)f(of)h(a)g(\014le)f(in)g(the)h(same)g +(format)g(as)f Ft(/etc/hosts)e Fu(that)j(should)f(b)s(e)630 +797 y(read)21 b(when)g(the)g(shell)h(needs)f(to)h(complete)h(a)e +(hostname.)38 b(The)21 b(list)h(of)g(p)s(ossible)f(hostname)630 +907 y(completions)27 b(ma)m(y)f(b)s(e)f(c)m(hanged)h(while)f(the)h +(shell)g(is)f(running;)h(the)g(next)f(time)i(hostname)630 +1016 y(completion)33 b(is)g(attempted)g(after)g(the)f(v)-5 +b(alue)33 b(is)f(c)m(hanged,)i(Bash)e(adds)f(the)i(con)m(ten)m(ts)h(of) +630 1126 y(the)h(new)f(\014le)g(to)h(the)g(existing)h(list.)53 +b(If)34 b Ft(HOSTFILE)e Fu(is)j(set,)h(but)e(has)g(no)h(v)-5 +b(alue,)36 b(or)e(do)s(es)630 1235 y(not)d(name)f(a)h(readable)g +(\014le,)g(Bash)f(attempts)i(to)f(read)f Ft(/etc/hosts)e +Fu(to)j(obtain)g(the)f(list)630 1345 y(of)h(p)s(ossible)f(hostname)h +(completions.)43 b(When)31 b Ft(HOSTFILE)d Fu(is)j(unset,)f(the)h +(hostname)g(list)630 1455 y(is)f(cleared.)150 1624 y +Ft(HOSTNAME)96 b Fu(The)30 b(name)g(of)h(the)f(curren)m(t)h(host.)150 +1793 y Ft(HOSTTYPE)96 b Fu(A)30 b(string)h(describing)f(the)g(mac)m +(hine)h(Bash)g(is)f(running)f(on.)150 1963 y Ft(IGNOREEOF)630 +2072 y Fu(Con)m(trols)e(the)h(action)g(of)f(the)g(shell)g(on)g(receipt) +h(of)f(an)g Ft(EOF)f Fu(c)m(haracter)i(as)g(the)f(sole)h(input.)630 +2182 y(If)i(set,)i(the)f(v)-5 b(alue)32 b(denotes)f(the)g(n)m(um)m(b)s +(er)f(of)h(consecutiv)m(e)i Ft(EOF)d Fu(c)m(haracters)i(that)f(can)h(b) +s(e)630 2291 y(read)40 b(as)f(the)h(\014rst)f(c)m(haracter)i(on)f(an)f +(input)g(line)h(b)s(efore)f(the)h(shell)g(will)g(exit.)70 +b(If)39 b(the)630 2401 y(v)-5 b(ariable)39 b(exists)f(but)g(do)s(es)f +(not)h(ha)m(v)m(e)h(a)g(n)m(umeric)f(v)-5 b(alue,)40 +b(or)e(has)g(no)g(v)-5 b(alue,)40 b(then)e(the)630 2511 +y(default)31 b(is)g(10.)43 b(If)30 b(the)h(v)-5 b(ariable)31 +b(do)s(es)g(not)g(exist,)h(then)e Ft(EOF)g Fu(signi\014es)h(the)g(end)f +(of)h(input)630 2620 y(to)g(the)g(shell.)41 b(This)29 +b(is)i(only)f(in)g(e\013ect)i(for)e(in)m(teractiv)m(e)j(shells.)150 +2790 y Ft(INPUTRC)144 b Fu(The)68 b(name)h(of)f(the)h(Readline)g +(initialization)j(\014le,)78 b(o)m(v)m(erriding)69 b(the)g(default)g +(of)630 2899 y Ft(~/.inputrc)p Fu(.)150 3068 y Ft(INSIDE_EMACS)630 +3178 y Fu(If)29 b(Bash)h(\014nds)e(this)h(v)-5 b(ariable)31 +b(in)e(the)h(en)m(vironmen)m(t)g(when)e(the)i(shell)g(starts,)g(it)g +(assumes)630 3288 y(that)i(the)g(shell)g(is)f(running)f(in)i(an)f +(Emacs)h(shell)g(bu\013er)e(and)h(ma)m(y)i(disable)e(line)h(editing)630 +3397 y(dep)s(ending)d(on)h(the)h(v)-5 b(alue)31 b(of)f +Ft(TERM)p Fu(.)150 3567 y Ft(LANG)288 b Fu(Used)28 b(to)h(determine)f +(the)g(lo)s(cale)h(category)h(for)e(an)m(y)h(category)h(not)e(sp)s +(eci\014cally)g(selected)630 3676 y(with)i(a)h(v)-5 b(ariable)31 +b(starting)g(with)f Ft(LC_)p Fu(.)150 3846 y Ft(LC_ALL)192 +b Fu(This)28 b(v)-5 b(ariable)29 b(o)m(v)m(errides)h(the)f(v)-5 +b(alue)29 b(of)g Ft(LANG)f Fu(and)g(an)m(y)h(other)g +Ft(LC_)f Fu(v)-5 b(ariable)29 b(sp)s(ecifying)630 3955 +y(a)i(lo)s(cale)h(category)-8 b(.)150 4125 y Ft(LC_COLLATE)630 +4234 y Fu(This)37 b(v)-5 b(ariable)38 b(determines)g(the)g(collation)i +(order)d(used)g(when)f(sorting)i(the)g(results)g(of)630 +4344 y(\014lename)e(expansion,)i(and)e(determines)g(the)h(b)s(eha)m +(vior)f(of)g(range)h(expressions,)h(equiv-)630 4453 y(alence)e +(classes,)h(and)e(collating)i(sequences)e(within)f(\014lename)h +(expansion)g(and)f(pattern)630 4563 y(matc)m(hing)d(\(see)h(Section)f +(3.5.8)h([Filename)g(Expansion],)e(page)h(33\).)150 4732 +y Ft(LC_CTYPE)96 b Fu(This)36 b(v)-5 b(ariable)37 b(determines)f(the)h +(in)m(terpretation)h(of)f(c)m(haracters)h(and)e(the)g(b)s(eha)m(vior)h +(of)630 4842 y(c)m(haracter)46 b(classes)g(within)e(\014lename)h +(expansion)g(and)f(pattern)h(matc)m(hing)h(\(see)f(Sec-)630 +4951 y(tion)31 b(3.5.8)h([Filename)g(Expansion],)e(page)h(33\).)150 +5121 y Ft(LC_MESSAGES)630 5230 y Fu(This)25 b(v)-5 b(ariable)27 +b(determines)f(the)g(lo)s(cale)i(used)d(to)i(translate)g(double-quoted) +f(strings)g(pre-)630 5340 y(ceded)31 b(b)m(y)f(a)h(`)p +Ft($)p Fu(')f(\(see)h(Section)h(3.1.2.5)g([Lo)s(cale)g(T)-8 +b(ranslation],)32 b(page)f(7\).)p eop end +%%Page: 82 88 +TeXDict begin 82 87 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(82)150 299 y Ft(LC_NUMERIC)630 +408 y Fu(This)30 b(v)-5 b(ariable)31 b(determines)f(the)h(lo)s(cale)h +(category)g(used)e(for)g(n)m(um)m(b)s(er)f(formatting.)150 +573 y Ft(LC_TIME)144 b Fu(This)25 b(v)-5 b(ariable)26 +b(determines)g(the)g(lo)s(cale)h(category)h(used)d(for)g(data)h(and)f +(time)i(formatting.)150 737 y Ft(LINENO)192 b Fu(The)32 +b(line)h(n)m(um)m(b)s(er)e(in)i(the)f(script)h(or)f(shell)h(function)f +(curren)m(tly)h(executing.)49 b(If)32 b Ft(LINENO)630 +847 y Fu(is)e(unset,)h(it)g(loses)g(its)f(sp)s(ecial)h(prop)s(erties,)f +(ev)m(en)h(if)g(it)g(is)f(subsequen)m(tly)g(reset.)150 +1011 y Ft(LINES)240 b Fu(Used)43 b(b)m(y)g(the)g Ft(select)e +Fu(command)i(to)g(determine)g(the)g(column)g(length)g(for)g(prin)m +(ting)630 1121 y(selection)c(lists.)63 b(Automatically)41 +b(set)d(if)f(the)h Ft(checkwinsize)d Fu(option)j(is)f(enabled)h(\(see) +630 1230 y(Section)44 b(4.3.2)h([The)e(Shopt)g(Builtin],)k(page)d +(66\),)k(or)43 b(in)g(an)g(in)m(teractiv)m(e)j(shell)e(up)s(on)630 +1340 y(receipt)31 b(of)g(a)g Ft(SIGWINCH)p Fu(.)150 1504 +y Ft(MACHTYPE)96 b Fu(A)26 b(string)g(that)h(fully)f(describ)s(es)f +(the)h(system)g(t)m(yp)s(e)h(on)f(whic)m(h)f(Bash)i(is)f(executing,)i +(in)e(the)630 1614 y(standard)k Fm(gnu)g Fr(cpu-compan)m(y-system)h +Fu(format.)150 1778 y Ft(MAILCHECK)630 1888 y Fu(Ho)m(w)d(often)g(\(in) +g(seconds\))g(that)g(the)f(shell)h(should)f(c)m(hec)m(k)i(for)e(mail)h +(in)f(the)h(\014les)g(sp)s(eci\014ed)630 1998 y(in)i(the)h +Ft(MAILPATH)e Fu(or)i Ft(MAIL)e Fu(v)-5 b(ariables.)43 +b(The)30 b(default)h(is)f(60)i(seconds.)42 b(When)30 +b(it)h(is)g(time)630 2107 y(to)37 b(c)m(hec)m(k)h(for)e(mail,)j(the)e +(shell)f(do)s(es)g(so)h(b)s(efore)f(displa)m(ying)h(the)f(primary)g +(prompt.)57 b(If)630 2217 y(this)37 b(v)-5 b(ariable)38 +b(is)f(unset,)h(or)f(set)h(to)g(a)f(v)-5 b(alue)38 b(that)f(is)g(not)h +(a)f(n)m(um)m(b)s(er)f(greater)i(than)f(or)630 2326 y(equal)31 +b(to)g(zero,)g(the)g(shell)g(disables)f(mail)h(c)m(hec)m(king.)150 +2491 y Ft(MAPFILE)144 b Fu(An)35 b(arra)m(y)h(v)-5 b(ariable)36 +b(created)g(to)h(hold)e(the)g(text)i(read)e(b)m(y)g(the)h +Ft(mapfile)d Fu(builtin)i(when)630 2600 y(no)30 b(v)-5 +b(ariable)31 b(name)g(is)f(supplied.)150 2765 y Ft(OLDPWD)192 +b Fu(The)30 b(previous)g(w)m(orking)g(directory)h(as)g(set)g(b)m(y)f +(the)h Ft(cd)e Fu(builtin.)150 2929 y Ft(OPTERR)192 b +Fu(If)35 b(set)i(to)f(the)h(v)-5 b(alue)36 b(1,)i(Bash)e(displa)m(ys)g +(error)f(messages)i(generated)g(b)m(y)f(the)g Ft(getopts)630 +3039 y Fu(builtin)30 b(command.)150 3203 y Ft(OSTYPE)192 +b Fu(A)30 b(string)h(describing)f(the)g(op)s(erating)h(system)g(Bash)f +(is)h(running)d(on.)150 3367 y Ft(PIPESTATUS)630 3477 +y Fu(An)23 b(arra)m(y)h(v)-5 b(ariable)24 b(\(see)h(Section)f(6.7)h +([Arra)m(ys],)g(page)f(95\))h(con)m(taining)g(a)f(list)g(of)g(exit)g +(sta-)630 3587 y(tus)h(v)-5 b(alues)27 b(from)e(the)h(pro)s(cesses)g +(in)f(the)h(most-recen)m(tly-executed)j(foreground)c(pip)s(eline)630 +3696 y(\(whic)m(h)30 b(ma)m(y)h(con)m(tain)h(only)f(a)f(single)h +(command\).)150 3861 y Ft(POSIXLY_CORRECT)630 3970 y +Fu(If)h(this)g(v)-5 b(ariable)34 b(is)e(in)g(the)h(en)m(vironmen)m(t)g +(when)e(Bash)i(starts,)g(the)g(shell)g(en)m(ters)g Fm(posix)630 +4080 y Fu(mo)s(de)46 b(\(see)h(Section)g(6.11)g([Bash)g(POSIX)e(Mo)s +(de],)50 b(page)d(101\))h(b)s(efore)e(reading)g(the)630 +4189 y(startup)38 b(\014les,)j(as)e(if)g(the)g Ft(--posix)d +Fu(in)m(v)m(o)s(cation)41 b(option)e(had)f(b)s(een)g(supplied.)64 +b(If)39 b(it)g(is)630 4299 y(set)31 b(while)f(the)h(shell)f(is)h +(running,)e(Bash)h(enables)h Fm(posix)f Fu(mo)s(de,)g(as)g(if)h(the)f +(command)870 4436 y Ft(set)47 b(-o)g(posix)630 4573 y +Fu(had)33 b(b)s(een)g(executed.)51 b(When)33 b(the)h(shell)f(en)m(ters) +h Fm(posix)f Fu(mo)s(de,)h(it)g(sets)g(this)g(v)-5 b(ariable)34 +b(if)630 4682 y(it)d(w)m(as)g(not)f(already)h(set.)150 +4847 y Ft(PPID)288 b Fu(The)30 b(pro)s(cess)g Fm(id)g +Fu(of)h(the)f(shell's)h(paren)m(t)g(pro)s(cess.)40 b(This)30 +b(v)-5 b(ariable)31 b(is)f(readonly)-8 b(.)150 5011 y +Ft(PROMPT_COMMAND)630 5121 y Fu(If)23 b(this)h(v)-5 b(ariable)24 +b(is)g(set,)i(and)d(is)h(an)f(arra)m(y)-8 b(,)27 b(the)d(v)-5 +b(alue)24 b(of)g(eac)m(h)g(set)h(elemen)m(t)g(is)f(in)m(terpreted)630 +5230 y(as)29 b(a)g(command)f(to)i(execute)g(b)s(efore)e(prin)m(ting)h +(the)g(primary)f(prompt)f(\()p Ft($PS1)p Fu(\).)40 b(If)28 +b(this)h(is)630 5340 y(set)c(but)f(not)g(an)h(arra)m(y)g(v)-5 +b(ariable,)26 b(its)f(v)-5 b(alue)25 b(is)f(used)g(as)h(a)f(command)g +(to)i(execute)f(instead.)p eop end +%%Page: 83 89 +TeXDict begin 83 88 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(83)150 299 y Ft(PROMPT_DIRTRIM)630 +408 y Fu(If)27 b(set)g(to)h(a)g(n)m(um)m(b)s(er)e(greater)i(than)f +(zero,)i(the)e(v)-5 b(alue)28 b(is)f(used)g(as)g(the)h(n)m(um)m(b)s(er) +e(of)h(trailing)630 518 y(directory)35 b(comp)s(onen)m(ts)g(to)h +(retain)f(when)f(expanding)g(the)h Ft(\\w)f Fu(and)g +Ft(\\W)g Fu(prompt)g(string)630 628 y(escap)s(es)21 b(\(see)h(Section)f +(6.9)h([Con)m(trolling)g(the)f(Prompt],)h(page)f(98\).)39 +b(Characters)21 b(remo)m(v)m(ed)630 737 y(are)31 b(replaced)g(with)f +(an)g(ellipsis.)150 892 y Ft(PS0)336 b Fu(The)32 b(v)-5 +b(alue)33 b(of)g(this)g(parameter)g(is)g(expanded)e(lik)m(e)j +Ft(PS1)e Fu(and)g(displa)m(y)m(ed)i(b)m(y)e(in)m(teractiv)m(e)630 +1002 y(shells)e(after)h(reading)g(a)g(command)f(and)f(b)s(efore)h(the)h +(command)f(is)h(executed.)150 1157 y Ft(PS3)336 b Fu(The)34 +b(v)-5 b(alue)35 b(of)f(this)g(v)-5 b(ariable)35 b(is)g(used)e(as)i +(the)f(prompt)g(for)g(the)g Ft(select)f Fu(command.)52 +b(If)630 1267 y(this)30 b(v)-5 b(ariable)31 b(is)g(not)f(set,)i(the)e +Ft(select)f Fu(command)h(prompts)f(with)h(`)p Ft(#?)g +Fu(')150 1422 y Ft(PS4)336 b Fu(The)37 b(v)-5 b(alue)37 +b(of)g(this)g(parameter)h(is)f(expanded)f(lik)m(e)i Fr(PS1)44 +b Fu(and)37 b(the)g(expanded)f(v)-5 b(alue)38 b(is)630 +1532 y(the)d(prompt)f(prin)m(ted)g(b)s(efore)g(the)h(command)f(line)h +(is)g(ec)m(ho)s(ed)g(when)f(the)h Ft(-x)f Fu(option)h(is)630 +1641 y(set)k(\(see)h(Section)g(4.3.1)g([The)f(Set)g(Builtin],)j(page)e +(62\).)67 b(The)38 b(\014rst)g(c)m(haracter)j(of)e(the)630 +1751 y(expanded)33 b(v)-5 b(alue)33 b(is)h(replicated)g(m)m(ultiple)g +(times,)h(as)f(necessary)-8 b(,)35 b(to)f(indicate)g(m)m(ultiple)630 +1861 y(lev)m(els)e(of)e(indirection.)42 b(The)29 b(default)i(is)f(`)p +Ft(+)h Fu('.)150 2016 y Ft(PWD)336 b Fu(The)30 b(curren)m(t)g(w)m +(orking)h(directory)g(as)f(set)h(b)m(y)f(the)h Ft(cd)f +Fu(builtin.)150 2171 y Ft(RANDOM)192 b Fu(Eac)m(h)26 +b(time)g(this)f(parameter)h(is)g(referenced,)g(it)g(expands)f(to)h(a)g +(random)e(in)m(teger)j(b)s(et)m(w)m(een)630 2281 y(0)e(and)e(32767.)41 +b(Assigning)25 b(a)f(v)-5 b(alue)25 b(to)g(this)f(v)-5 +b(ariable)25 b(seeds)f(the)h(random)e(n)m(um)m(b)s(er)g(gener-)630 +2390 y(ator.)41 b(If)27 b Ft(RANDOM)f Fu(is)h(unset,)h(it)g(loses)h +(its)f(sp)s(ecial)g(prop)s(erties,)g(ev)m(en)g(if)g(it)g(is)f +(subsequen)m(tly)630 2500 y(reset.)150 2655 y Ft(READLINE_LINE)630 +2765 y Fu(The)g(con)m(ten)m(ts)i(of)f(the)g(Readline)g(line)g +(bu\013er,)f(for)h(use)f(with)g(`)p Ft(bind)j(-x)p Fu(')d(\(see)h +(Section)h(4.2)630 2874 y([Bash)i(Builtins],)g(page)g(51\).)150 +3029 y Ft(READLINE_MARK)630 3139 y Fu(The)26 b(p)s(osition)h(of)g(the)g +Fr(mark)32 b Fu(\(sa)m(v)m(ed)c(insertion)f(p)s(oin)m(t\))g(in)g(the)g +(Readline)g(line)g(bu\013er,)g(for)630 3249 y(use)36 +b(with)f(`)p Ft(bind)30 b(-x)p Fu(')35 b(\(see)i(Section)g(4.2)g([Bash) +f(Builtins],)i(page)f(51\).)58 b(The)35 b(c)m(haracters)630 +3358 y(b)s(et)m(w)m(een)c(the)g(insertion)f(p)s(oin)m(t)g(and)g(the)h +(mark)f(are)h(often)f(called)i(the)f Fr(region)p Fu(.)150 +3513 y Ft(READLINE_POINT)630 3623 y Fu(The)23 b(p)s(osition)g(of)g(the) +h(insertion)f(p)s(oin)m(t)g(in)g(the)g(Readline)h(line)f(bu\013er,)h +(for)f(use)g(with)g(`)p Ft(bind)630 3733 y(-x)p Fu(')30 +b(\(see)h(Section)h(4.2)f([Bash)g(Builtins],)g(page)g(51\).)150 +3888 y Ft(REPLY)240 b Fu(The)30 b(default)g(v)-5 b(ariable)32 +b(for)e(the)g Ft(read)g Fu(builtin.)150 4043 y Ft(SECONDS)144 +b Fu(This)40 b(v)-5 b(ariable)41 b(expands)f(to)h(the)g(n)m(um)m(b)s +(er)e(of)i(seconds)g(since)g(the)f(shell)h(w)m(as)g(started.)630 +4153 y(Assignmen)m(t)i(to)g(this)g(v)-5 b(ariable)43 +b(resets)g(the)g(coun)m(t)g(to)g(the)g(v)-5 b(alue)43 +b(assigned,)j(and)c(the)630 4262 y(expanded)35 b(v)-5 +b(alue)36 b(b)s(ecomes)h(the)f(v)-5 b(alue)36 b(assigned)g(plus)f(the)h +(n)m(um)m(b)s(er)f(of)h(seconds)g(since)630 4372 y(the)24 +b(assignmen)m(t.)39 b(The)23 b(n)m(um)m(b)s(er)g(of)h(seconds)f(at)i +(shell)f(in)m(v)m(o)s(cation)i(and)d(the)h(curren)m(t)f(time)630 +4482 y(is)j(alw)m(a)m(ys)i(determined)e(b)m(y)g(querying)g(the)h +(system)f(clo)s(c)m(k.)41 b(If)26 b Ft(SECONDS)e Fu(is)i(unset,)h(it)g +(loses)630 4591 y(its)k(sp)s(ecial)g(prop)s(erties,)f(ev)m(en)h(if)f +(it)h(is)f(subsequen)m(tly)g(reset.)150 4746 y Ft(SHELL)240 +b Fu(This)24 b(en)m(vironmen)m(t)i(v)-5 b(ariable)26 +b(expands)e(to)i(the)g(full)f(pathname)g(to)h(the)f(shell.)39 +b(If)25 b(it)g(is)h(not)630 4856 y(set)36 b(when)f(the)h(shell)g +(starts,)i(Bash)e(assigns)h(to)f(it)h(the)f(full)f(pathname)h(of)g(the) +g(curren)m(t)630 4966 y(user's)30 b(login)h(shell.)150 +5121 y Ft(SHELLOPTS)630 5230 y Fu(A)g(colon-separated)h(list)f(of)g +(enabled)f(shell)h(options.)41 b(Eac)m(h)31 b(w)m(ord)f(in)g(the)h +(list)g(is)g(a)g(v)-5 b(alid)630 5340 y(argumen)m(t)28 +b(for)f(the)h Ft(-o)e Fu(option)i(to)g(the)g Ft(set)e +Fu(builtin)h(command)g(\(see)i(Section)f(4.3.1)h([The)p +eop end +%%Page: 84 90 +TeXDict begin 84 89 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(84)630 299 y(Set)29 +b(Builtin],)h(page)f(62\).)42 b(The)28 b(options)h(app)s(earing)f(in)g +Ft(SHELLOPTS)e Fu(are)j(those)h(rep)s(orted)630 408 y(as)g(`)p +Ft(on)p Fu(')f(b)m(y)h(`)p Ft(set)g(-o)p Fu('.)40 b(If)29 +b(this)h(v)-5 b(ariable)30 b(is)g(in)f(the)h(en)m(vironmen)m(t)g(when)f +(Bash)h(starts)g(up,)630 518 y(eac)m(h)41 b(shell)e(option)h(in)f(the)h +(list)g(will)f(b)s(e)g(enabled)h(b)s(efore)f(reading)g(an)m(y)h +(startup)f(\014les.)630 628 y(This)30 b(v)-5 b(ariable)31 +b(is)f(readonly)-8 b(.)150 790 y Ft(SHLVL)240 b Fu(Incremen)m(ted)21 +b(b)m(y)g(one)g(eac)m(h)h(time)f(a)h(new)e(instance)h(of)g(Bash)g(is)g +(started.)38 b(This)20 b(is)h(in)m(tended)630 899 y(to)31 +b(b)s(e)f(a)h(coun)m(t)g(of)f(ho)m(w)h(deeply)f(y)m(our)g(Bash)h +(shells)f(are)h(nested.)150 1062 y Ft(SRANDOM)144 b Fu(This)36 +b(v)-5 b(ariable)37 b(expands)f(to)h(a)g(32-bit)h(pseudo-random)d(n)m +(um)m(b)s(er)g(eac)m(h)j(time)f(it)g(is)g(ref-)630 1171 +y(erenced.)47 b(The)32 b(random)g(n)m(um)m(b)s(er)f(generator)j(is)e +(not)h(linear)g(on)f(systems)h(that)g(supp)s(ort)630 +1281 y Ft(/dev/urandom)26 b Fu(or)k Ft(arc4random)p Fu(,)d(so)j(eac)m +(h)g(returned)f(n)m(um)m(b)s(er)f(has)h(no)g(relationship)h(to)630 +1390 y(the)39 b(n)m(um)m(b)s(ers)e(preceding)i(it.)66 +b(The)38 b(random)g(n)m(um)m(b)s(er)f(generator)j(cannot)g(b)s(e)e +(seeded,)630 1500 y(so)c(assignmen)m(ts)g(to)g(this)f(v)-5 +b(ariable)34 b(ha)m(v)m(e)h(no)e(e\013ect.)51 b(If)33 +b Ft(SRANDOM)e Fu(is)j(unset,)g(it)f(loses)i(its)630 +1610 y(sp)s(ecial)c(prop)s(erties,)f(ev)m(en)h(if)f(it)h(is)g +(subsequen)m(tly)f(reset.)150 1772 y Ft(TIMEFORMAT)630 +1881 y Fu(The)g(v)-5 b(alue)32 b(of)f(this)g(parameter)g(is)g(used)f +(as)h(a)g(format)h(string)f(sp)s(ecifying)f(ho)m(w)h(the)g(tim-)630 +1991 y(ing)37 b(information)f(for)h(pip)s(elines)f(pre\014xed)f(with)h +(the)h Ft(time)e Fu(reserv)m(ed)i(w)m(ord)f(should)g(b)s(e)630 +2101 y(displa)m(y)m(ed.)k(The)27 b(`)p Ft(\045)p Fu(')h(c)m(haracter)h +(in)m(tro)s(duces)e(an)h(escap)s(e)g(sequence)g(that)g(is)f(expanded)g +(to)630 2210 y(a)37 b(time)g(v)-5 b(alue)36 b(or)h(other)f +(information.)59 b(The)36 b(escap)s(e)g(sequences)h(and)e(their)i +(meanings)630 2320 y(are)31 b(as)f(follo)m(ws;)i(the)f(braces)f(denote) +h(optional)h(p)s(ortions.)630 2482 y Ft(\045\045)384 +b Fu(A)30 b(literal)i(`)p Ft(\045)p Fu('.)630 2644 y +Ft(\045[)p Fj(p)p Ft(][l]R)96 b Fu(The)30 b(elapsed)h(time)g(in)f +(seconds.)630 2806 y Ft(\045[)p Fj(p)p Ft(][l]U)96 b +Fu(The)30 b(n)m(um)m(b)s(er)f(of)h(CPU)g(seconds)h(sp)s(en)m(t)f(in)g +(user)f(mo)s(de.)630 2968 y Ft(\045[)p Fj(p)p Ft(][l]S)96 +b Fu(The)30 b(n)m(um)m(b)s(er)f(of)h(CPU)g(seconds)h(sp)s(en)m(t)f(in)g +(system)g(mo)s(de.)630 3131 y Ft(\045P)384 b Fu(The)30 +b(CPU)g(p)s(ercen)m(tage,)i(computed)e(as)h(\(\045U)f +Ft(+)g Fu(\045S\))g(/)h(\045R.)630 3293 y(The)23 b(optional)j +Fr(p)g Fu(is)e(a)g(digit)h(sp)s(ecifying)e(the)h(precision,)i(the)e(n)m +(um)m(b)s(er)f(of)h(fractional)h(digits)630 3402 y(after)36 +b(a)f(decimal)i(p)s(oin)m(t.)55 b(A)35 b(v)-5 b(alue)36 +b(of)f(0)h(causes)g(no)f(decimal)h(p)s(oin)m(t)f(or)h(fraction)g(to)g +(b)s(e)630 3512 y(output.)48 b(A)m(t)34 b(most)f(three)g(places)h +(after)f(the)g(decimal)h(p)s(oin)m(t)f(ma)m(y)h(b)s(e)e(sp)s +(eci\014ed;)i(v)-5 b(alues)630 3622 y(of)31 b Fr(p)h +Fu(greater)g(than)e(3)h(are)f(c)m(hanged)h(to)g(3.)42 +b(If)29 b Fr(p)k Fu(is)d(not)h(sp)s(eci\014ed,)f(the)h(v)-5 +b(alue)30 b(3)h(is)g(used.)630 3758 y(The)54 b(optional)h +Ft(l)f Fu(sp)s(eci\014es)g(a)h(longer)f(format,)61 b(including)54 +b(min)m(utes,)61 b(of)54 b(the)g(form)630 3867 y Fr(MM)10 +b Fu(m)p Fr(SS)p Fu(.)p Fr(FF)d Fu(s.)103 b(The)50 b(v)-5 +b(alue)52 b(of)f Fr(p)j Fu(determines)d(whether)f(or)h(not)h(the)f +(fraction)h(is)630 3977 y(included.)630 4113 y(If)30 +b(this)g(v)-5 b(ariable)31 b(is)g(not)f(set,)i(Bash)e(acts)h(as)g(if)f +(it)h(had)f(the)h(v)-5 b(alue)870 4248 y Ft +($'\\nreal\\t\0453lR\\nuser\\t\0453)o(lU\\n)o(sys\\)o(t\0453)o(lS')630 +4384 y Fu(If)37 b(the)g(v)-5 b(alue)38 b(is)f(n)m(ull,)i(no)f(timing)f +(information)h(is)f(displa)m(y)m(ed.)62 b(A)37 b(trailing)i(newline)e +(is)630 4494 y(added)30 b(when)f(the)i(format)f(string)h(is)f(displa)m +(y)m(ed.)150 4656 y Ft(TMOUT)240 b Fu(If)22 b(set)h(to)g(a)g(v)-5 +b(alue)23 b(greater)h(than)e(zero,)j Ft(TMOUT)d Fu(is)g(treated)i(as)e +(the)h(default)g(timeout)g(for)g(the)630 4766 y Ft(read)31 +b Fu(builtin)h(\(see)h(Section)f(4.2)i([Bash)e(Builtins],)h(page)g +(51\).)47 b(The)32 b Ft(select)e Fu(command)630 4875 +y(\(see)f(Section)h(3.2.5.2)g([Conditional)g(Constructs],)e(page)i +(11\))f(terminates)g(if)g(input)e(do)s(es)630 4985 y(not)k(arriv)m(e)g +(after)g Ft(TMOUT)e Fu(seconds)h(when)f(input)h(is)g(coming)h(from)f(a) +h(terminal.)630 5121 y(In)40 b(an)h(in)m(teractiv)m(e)i(shell,)h(the)d +(v)-5 b(alue)41 b(is)g(in)m(terpreted)g(as)f(the)h(n)m(um)m(b)s(er)f +(of)h(seconds)f(to)630 5230 y(w)m(ait)28 b(for)e(a)g(line)h(of)g(input) +e(after)i(issuing)f(the)h(primary)e(prompt.)39 b(Bash)26 +b(terminates)h(after)630 5340 y(w)m(aiting)32 b(for)e(that)h(n)m(um)m +(b)s(er)e(of)h(seconds)h(if)f(a)h(complete)h(line)e(of)h(input)e(do)s +(es)h(not)h(arriv)m(e.)p eop end +%%Page: 85 91 +TeXDict begin 85 90 bop 150 -116 a Fu(Chapter)30 b(5:)41 +b(Shell)30 b(V)-8 b(ariables)2459 b(85)150 299 y Ft(TMPDIR)192 +b Fu(If)39 b(set,)j(Bash)e(uses)f(its)h(v)-5 b(alue)40 +b(as)f(the)h(name)f(of)h(a)g(directory)g(in)f(whic)m(h)g(Bash)h +(creates)630 408 y(temp)s(orary)30 b(\014les)g(for)g(the)h(shell's)g +(use.)150 568 y Ft(UID)336 b Fu(The)30 b(n)m(umeric)g(real)h(user)f(id) +g(of)g(the)h(curren)m(t)f(user.)40 b(This)30 b(v)-5 b(ariable)31 +b(is)f(readonly)-8 b(.)p eop end +%%Page: 86 92 +TeXDict begin 86 91 bop 3659 -116 a Fu(86)150 299 y Fp(6)80 +b(Bash)54 b(F)-13 b(eatures)150 502 y Fu(This)30 b(c)m(hapter)h +(describ)s(es)e(features)i(unique)e(to)i(Bash.)150 731 +y Fs(6.1)68 b(In)l(v)l(oking)46 b(Bash)390 890 y Ft(bash)h([long-opt])e +([-ir])h([-abefhkmnptuvxdBCDHP])c([-o)47 b Fj(option)p +Ft(])581 1000 y([-O)g Fj(shopt_option)p Ft(])d([)p Fj(argument)h +Ft(...)o(])390 1110 y(bash)i([long-opt])e([-abefhkmnptuvxdBCDHP])c([-o) +47 b Fj(option)p Ft(])581 1219 y([-O)g Fj(shopt_option)p +Ft(])d(-c)j Fj(string)f Ft([)p Fj(argument)g Ft(...)o(])390 +1329 y(bash)h([long-opt])e(-s)i([-abefhkmnptuvxdBCDHP])42 +b([-o)k Fj(option)p Ft(])581 1438 y([-O)h Fj(shopt_option)p +Ft(])d([)p Fj(argument)h Ft(...)o(])275 1567 y Fu(All)31 +b(of)g(the)f(single-c)m(haracter)k(options)d(used)f(with)g(the)h +Ft(set)f Fu(builtin)g(\(see)h(Section)h(4.3.1)g([The)f(Set)150 +1676 y(Builtin],)45 b(page)c(62\))i(can)e(b)s(e)f(used)h(as)g(options)g +(when)f(the)i(shell)f(is)g(in)m(v)m(ok)m(ed.)74 b(In)41 +b(addition,)j(there)150 1786 y(are)38 b(sev)m(eral)h(m)m(ulti-c)m +(haracter)h(options)d(that)h(y)m(ou)g(can)g(use.)61 b(These)38 +b(options)f(m)m(ust)h(app)s(ear)e(on)i(the)150 1896 y(command)30 +b(line)h(b)s(efore)f(the)g(single-c)m(haracter)j(options)e(to)g(b)s(e)f +(recognized.)150 2043 y Ft(--debugger)630 2152 y Fu(Arrange)j(for)g +(the)g(debugger)g(pro\014le)g(to)h(b)s(e)e(executed)i(b)s(efore)f(the)g +(shell)g(starts.)49 b(T)-8 b(urns)630 2262 y(on)35 b(extended)g +(debugging)f(mo)s(de)h(\(see)g(Section)h(4.3.2)h([The)d(Shopt)g +(Builtin],)j(page)f(66,)630 2371 y(for)30 b(a)h(description)f(of)h(the) +f Ft(extdebug)f Fu(option)h(to)h(the)g Ft(shopt)e Fu(builtin\).)150 +2519 y Ft(--dump-po-strings)630 2628 y Fu(A)37 b(list)g(of)f(all)i +(double-quoted)e(strings)g(preceded)g(b)m(y)h(`)p Ft($)p +Fu(')f(is)h(prin)m(ted)f(on)g(the)h(standard)630 2738 +y(output)29 b(in)g(the)g Fm(gnu)g Ft(gettext)f Fu(PO)g(\(p)s(ortable)i +(ob)5 b(ject\))30 b(\014le)g(format.)40 b(Equiv)-5 b(alen)m(t)31 +b(to)f Ft(-D)630 2847 y Fu(except)h(for)f(the)h(output)f(format.)150 +2995 y Ft(--dump-strings)630 3104 y Fu(Equiv)-5 b(alen)m(t)31 +b(to)g Ft(-D)p Fu(.)150 3251 y Ft(--help)192 b Fu(Displa)m(y)32 +b(a)e(usage)h(message)h(on)e(standard)g(output)g(and)f(exit)j +(successfully)-8 b(.)150 3399 y Ft(--init-file)27 b Fj(filename)150 +3508 y Ft(--rcfile)h Fj(filename)630 3618 y Fu(Execute)23 +b(commands)e(from)g Fr(\014lename)28 b Fu(\(instead)22 +b(of)g Ft(~/.bashrc)p Fu(\))e(in)h(an)h(in)m(teractiv)m(e)i(shell.)150 +3765 y Ft(--login)144 b Fu(Equiv)-5 b(alen)m(t)31 b(to)g +Ft(-l)p Fu(.)150 3912 y Ft(--noediting)630 4022 y Fu(Do)h(not)e(use)h +(the)g Fm(gnu)f Fu(Readline)i(library)e(\(see)h(Chapter)g(8)g([Command) +f(Line)g(Editing],)630 4131 y(page)h(111\))h(to)f(read)g(command)f +(lines)g(when)g(the)g(shell)h(is)f(in)m(teractiv)m(e.)150 +4278 y Ft(--noprofile)630 4388 y Fu(Don't)22 b(load)g(the)g +(system-wide)f(startup)g(\014le)h Ft(/etc/profile)c Fu(or)j(an)m(y)h +(of)f(the)h(p)s(ersonal)f(ini-)630 4498 y(tialization)34 +b(\014les)e Ft(~/.bash_profile)p Fu(,)c Ft(~/.bash_login)p +Fu(,)g(or)k Ft(~/.profile)c Fu(when)j(Bash)630 4607 y(is)f(in)m(v)m(ok) +m(ed)i(as)f(a)g(login)g(shell.)150 4754 y Ft(--norc)192 +b Fu(Don't)35 b(read)f(the)g Ft(~/.bashrc)e Fu(initialization)k(\014le) +f(in)e(an)h(in)m(teractiv)m(e)j(shell.)52 b(This)33 b(is)h(on)630 +4864 y(b)m(y)c(default)h(if)f(the)h(shell)f(is)h(in)m(v)m(ok)m(ed)h(as) +e Ft(sh)p Fu(.)150 5011 y Ft(--posix)144 b Fu(Change)24 +b(the)h(b)s(eha)m(vior)f(of)g(Bash)h(where)e(the)i(default)f(op)s +(eration)h(di\013ers)f(from)f(the)i Fm(posix)630 5121 +y Fu(standard)35 b(to)h(matc)m(h)g(the)g(standard.)55 +b(This)35 b(is)h(in)m(tended)f(to)h(mak)m(e)h(Bash)f(b)s(eha)m(v)m(e)g +(as)g(a)630 5230 y(strict)22 b(sup)s(erset)e(of)h(that)g(standard.)37 +b(See)21 b(Section)h(6.11)g([Bash)f(POSIX)f(Mo)s(de],)k(page)d(101,)630 +5340 y(for)30 b(a)h(description)f(of)h(the)f(Bash)h Fm(posix)f +Fu(mo)s(de.)p eop end +%%Page: 87 93 +TeXDict begin 87 92 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(87)150 299 y Ft(--restricted)630 +408 y Fu(Mak)m(e)54 b(the)e(shell)g(a)h(restricted)g(shell)f(\(see)h +(Section)g(6.10)h([The)d(Restricted)j(Shell],)630 518 +y(page)31 b(100\).)150 677 y Ft(--verbose)630 787 y Fu(Equiv)-5 +b(alen)m(t)31 b(to)g Ft(-v)p Fu(.)41 b(Prin)m(t)30 b(shell)g(input)g +(lines)g(as)h(they're)g(read.)150 946 y Ft(--version)630 +1056 y Fu(Sho)m(w)d(v)m(ersion)g(information)g(for)g(this)g(instance)h +(of)f(Bash)g(on)g(the)g(standard)f(output)h(and)630 1166 +y(exit)j(successfully)-8 b(.)275 1325 y(There)28 b(are)i(sev)m(eral)g +(single-c)m(haracter)i(options)d(that)h(ma)m(y)g(b)s(e)e(supplied)g(at) +i(in)m(v)m(o)s(cation)h(whic)m(h)e(are)150 1435 y(not)i(a)m(v)-5 +b(ailable)32 b(with)e(the)h Ft(set)e Fu(builtin.)150 +1594 y Ft(-c)384 b Fu(Read)66 b(and)f(execute)i(commands)e(from)g(the)h +(\014rst)e(non-option)i(argumen)m(t)g Fr(com-)630 1704 +y(mand)p 859 1704 28 4 v 39 w(string)p Fu(,)34 b(then)e(exit.)49 +b(If)32 b(there)h(are)g(argumen)m(ts)g(after)g(the)g +Fr(command)p 3303 1704 V 40 w(string)p Fu(,)h(the)630 +1813 y(\014rst)e(argumen)m(t)h(is)g(assigned)g(to)h Ft($0)e +Fu(and)h(an)m(y)g(remaining)g(argumen)m(ts)g(are)g(assigned)g(to)630 +1923 y(the)38 b(p)s(ositional)h(parameters.)65 b(The)37 +b(assignmen)m(t)i(to)g Ft($0)f Fu(sets)g(the)h(name)f(of)g(the)g +(shell,)630 2032 y(whic)m(h)30 b(is)h(used)e(in)h(w)m(arning)g(and)g +(error)g(messages.)150 2192 y Ft(-i)384 b Fu(F)-8 b(orce)22 +b(the)g(shell)f(to)g(run)f(in)m(teractiv)m(ely)-8 b(.)41 +b(In)m(teractiv)m(e)23 b(shells)e(are)h(describ)s(ed)d(in)i(Section)h +(6.3)630 2301 y([In)m(teractiv)m(e)33 b(Shells],)e(page)g(89.)150 +2461 y Ft(-l)384 b Fu(Mak)m(e)33 b(this)e(shell)h(act)g(as)g(if)f(it)h +(had)f(b)s(een)f(directly)i(in)m(v)m(ok)m(ed)h(b)m(y)f(login.)44 +b(When)31 b(the)h(shell)630 2570 y(is)37 b(in)m(teractiv)m(e,)43 +b(this)37 b(is)g(equiv)-5 b(alen)m(t)39 b(to)f(starting)h(a)e(login)i +(shell)e(with)g(`)p Ft(exec)30 b(-l)g(bash)p Fu('.)630 +2680 y(When)h(the)g(shell)h(is)f(not)g(in)m(teractiv)m(e,)k(the)c +(login)h(shell)g(startup)f(\014les)g(will)g(b)s(e)g(executed.)630 +2790 y(`)p Ft(exec)e(bash)h(-l)p Fu(')43 b(or)h(`)p Ft(exec)29 +b(bash)g(--login)p Fu(')42 b(will)i(replace)h(the)f(curren)m(t)f(shell) +h(with)g(a)630 2899 y(Bash)26 b(login)g(shell.)39 b(See)26 +b(Section)g(6.2)h([Bash)e(Startup)g(Files],)j(page)e(88,)i(for)d(a)h +(description)630 3009 y(of)31 b(the)f(sp)s(ecial)h(b)s(eha)m(vior)g(of) +f(a)h(login)g(shell.)150 3168 y Ft(-r)384 b Fu(Mak)m(e)54 +b(the)e(shell)g(a)h(restricted)g(shell)f(\(see)h(Section)g(6.10)h([The) +d(Restricted)j(Shell],)630 3278 y(page)31 b(100\).)150 +3437 y Ft(-s)384 b Fu(If)24 b(this)h(option)h(is)f(presen)m(t,)h(or)f +(if)g(no)f(argumen)m(ts)i(remain)e(after)i(option)f(pro)s(cessing,)h +(then)630 3547 y(commands)i(are)h(read)g(from)f(the)h(standard)f +(input.)39 b(This)28 b(option)h(allo)m(ws)h(the)f(p)s(ositional)630 +3656 y(parameters)i(to)h(b)s(e)e(set)i(when)d(in)m(v)m(oking)k(an)d(in) +m(teractiv)m(e)k(shell)d(or)g(when)f(reading)h(input)630 +3766 y(through)f(a)g(pip)s(e.)150 3925 y Ft(-D)384 b +Fu(A)37 b(list)g(of)f(all)i(double-quoted)e(strings)g(preceded)g(b)m(y) +h(`)p Ft($)p Fu(')f(is)h(prin)m(ted)f(on)g(the)h(standard)630 +4035 y(output.)63 b(These)38 b(are)g(the)g(strings)g(that)h(are)f(sub)5 +b(ject)38 b(to)h(language)g(translation)g(when)630 4144 +y(the)e(curren)m(t)g(lo)s(cale)h(is)f(not)g Ft(C)g Fu(or)f +Ft(POSIX)g Fu(\(see)h(Section)h(3.1.2.5)h([Lo)s(cale)g(T)-8 +b(ranslation],)630 4254 y(page)31 b(7\).)42 b(This)29 +b(implies)i(the)f Ft(-n)g Fu(option;)h(no)f(commands)g(will)h(b)s(e)f +(executed.)150 4413 y Ft([-+]O)f([)p Fj(shopt_option)p +Ft(])630 4523 y Fr(shopt)p 854 4523 V 40 w(option)44 +b Fu(is)g(one)h(of)f(the)g(shell)h(options)f(accepted)h(b)m(y)f(the)h +Ft(shopt)d Fu(builtin)i(\(see)630 4633 y(Section)32 b(4.3.2)h([The)e +(Shopt)f(Builtin],)i(page)g(66\).)44 b(If)31 b Fr(shopt)p +2724 4633 V 40 w(option)g Fu(is)g(presen)m(t,)h Ft(-O)f +Fu(sets)630 4742 y(the)24 b(v)-5 b(alue)24 b(of)g(that)h(option;)h +Ft(+O)e Fu(unsets)f(it.)39 b(If)23 b Fr(shopt)p 2423 +4742 V 40 w(option)h Fu(is)g(not)g(supplied,)g(the)g(names)630 +4852 y(and)31 b(v)-5 b(alues)32 b(of)g(the)g(shell)g(options)g +(accepted)h(b)m(y)f Ft(shopt)e Fu(are)i(prin)m(ted)f(on)h(the)g +(standard)630 4961 y(output.)40 b(If)29 b(the)h(in)m(v)m(o)s(cation)h +(option)f(is)f Ft(+O)p Fu(,)h(the)f(output)g(is)h(displa)m(y)m(ed)g(in) +f(a)h(format)f(that)630 5071 y(ma)m(y)i(b)s(e)f(reused)f(as)i(input.) +150 5230 y Ft(--)384 b Fu(A)38 b Ft(--)g Fu(signals)g(the)h(end)e(of)i +(options)f(and)g(disables)g(further)f(option)h(pro)s(cessing.)64 +b(An)m(y)630 5340 y(argumen)m(ts)31 b(after)g(the)f Ft(--)g +Fu(are)h(treated)g(as)g(\014lenames)f(and)g(argumen)m(ts.)p +eop end +%%Page: 88 94 +TeXDict begin 88 93 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(88)275 299 y(A)27 b +Fl(lo)-5 b(gin)35 b Fu(shell)27 b(is)g(one)h(whose)f(\014rst)f(c)m +(haracter)j(of)e(argumen)m(t)h(zero)f(is)h(`)p Ft(-)p +Fu(',)g(or)f(one)g(in)m(v)m(ok)m(ed)i(with)e(the)150 +408 y Ft(--login)h Fu(option.)275 555 y(An)g Fl(inter)-5 +b(active)37 b Fu(shell)30 b(is)f(one)g(started)h(without)f(non-option)h +(argumen)m(ts,)g(unless)e Ft(-s)h Fu(is)g(sp)s(eci\014ed,)150 +665 y(without)k(sp)s(ecifying)h(the)f Ft(-c)g Fu(option,)i(and)e(whose) +g(input)g(and)f(output)h(are)h(b)s(oth)f(connected)h(to)g(ter-)150 +774 y(minals)g(\(as)g(determined)f(b)m(y)h Ft(isatty\(3\))p +Fu(\),)e(or)i(one)g(started)g(with)f(the)h Ft(-i)f Fu(option.)51 +b(See)33 b(Section)i(6.3)150 884 y([In)m(teractiv)m(e)e(Shells],)e +(page)g(89,)g(for)f(more)h(information.)275 1031 y(If)i(argumen)m(ts)h +(remain)g(after)h(option)f(pro)s(cessing,)h(and)e(neither)h(the)g +Ft(-c)g Fu(nor)f(the)h Ft(-s)g Fu(option)g(has)150 1140 +y(b)s(een)44 b(supplied,)j(the)d(\014rst)g(argumen)m(t)h(is)g(assumed)e +(to)j(b)s(e)d(the)i(name)g(of)f(a)h(\014le)g(con)m(taining)h(shell)150 +1250 y(commands)30 b(\(see)g(Section)h(3.8)g([Shell)f(Scripts],)g(page) +h(42\).)41 b(When)30 b(Bash)g(is)g(in)m(v)m(ok)m(ed)i(in)d(this)h +(fashion,)150 1359 y Ft($0)37 b Fu(is)g(set)h(to)h(the)e(name)h(of)f +(the)h(\014le,)i(and)c(the)i(p)s(ositional)g(parameters)g(are)g(set)g +(to)g(the)g(remaining)150 1469 y(argumen)m(ts.)h(Bash)26 +b(reads)f(and)g(executes)h(commands)f(from)g(this)g(\014le,)i(then)e +(exits.)40 b(Bash's)25 b(exit)i(status)150 1579 y(is)f(the)h(exit)h +(status)e(of)h(the)g(last)g(command)f(executed)h(in)g(the)f(script.)40 +b(If)26 b(no)g(commands)g(are)h(executed,)150 1688 y(the)k(exit)g +(status)g(is)f(0.)150 1947 y Fs(6.2)68 b(Bash)45 b(Startup)g(Files)150 +2107 y Fu(This)23 b(section)j(describ)s(es)d(ho)m(w)i(Bash)f(executes)h +(its)g(startup)f(\014les.)38 b(If)24 b(an)m(y)h(of)f(the)h(\014les)f +(exist)h(but)e(cannot)150 2216 y(b)s(e)29 b(read,)i(Bash)f(rep)s(orts)f +(an)h(error.)40 b(Tildes)30 b(are)g(expanded)f(in)h(\014lenames)g(as)g +(describ)s(ed)f(ab)s(o)m(v)m(e)i(under)150 2326 y(Tilde)f(Expansion)g +(\(see)h(Section)h(3.5.2)g([Tilde)e(Expansion],)h(page)g(24\).)275 +2473 y(In)m(teractiv)m(e)h(shells)f(are)g(describ)s(ed)e(in)h(Section)h +(6.3)h([In)m(teractiv)m(e)h(Shells],)d(page)h(89.)150 +2684 y Fk(In)m(v)m(ok)m(ed)40 b(as)h(an)f(in)m(teractiv)m(e)f(login)j +(shell,)g(or)g(with)e Fh(--login)150 2831 y Fu(When)c(Bash)f(is)h(in)m +(v)m(ok)m(ed)h(as)f(an)g(in)m(teractiv)m(e)j(login)d(shell,)i(or)e(as)g +(a)g(non-in)m(teractiv)m(e)i(shell)e(with)g(the)150 2940 +y Ft(--login)30 b Fu(option,)k(it)f(\014rst)e(reads)h(and)g(executes)i +(commands)e(from)f(the)i(\014le)f Ft(/etc/profile)p Fu(,)e(if)i(that) +150 3050 y(\014le)44 b(exists.)80 b(After)44 b(reading)g(that)g +(\014le,)j(it)d(lo)s(oks)g(for)f Ft(~/.bash_profile)p +Fu(,)g Ft(~/.bash_login)p Fu(,)h(and)150 3160 y Ft(~/.profile)p +Fu(,)25 b(in)i(that)g(order,)h(and)e(reads)h(and)f(executes)j(commands) +d(from)h(the)g(\014rst)f(one)i(that)f(exists)150 3269 +y(and)j(is)h(readable.)42 b(The)30 b Ft(--noprofile)d +Fu(option)k(ma)m(y)g(b)s(e)f(used)g(when)g(the)h(shell)f(is)h(started)g +(to)g(inhibit)150 3379 y(this)f(b)s(eha)m(vior.)275 3526 +y(When)h(an)g(in)m(teractiv)m(e)k(login)d(shell)g(exits,)h(or)f(a)g +(non-in)m(teractiv)m(e)i(login)f(shell)e(executes)i(the)f +Ft(exit)150 3635 y Fu(builtin)g(command,)i(Bash)e(reads)h(and)f +(executes)i(commands)e(from)g(the)h(\014le)g Ft(~/.bash_logout)p +Fu(,)d(if)i(it)150 3745 y(exists.)150 3956 y Fk(In)m(v)m(ok)m(ed)40 +b(as)h(an)f(in)m(teractiv)m(e)f(non-login)k(shell)150 +4103 y Fu(When)g(an)h(in)m(teractiv)m(e)i(shell)e(that)g(is)f(not)h(a)g +(login)g(shell)g(is)f(started,)48 b(Bash)c(reads)f(and)g(executes)150 +4213 y(commands)31 b(from)g Ft(~/.bashrc)p Fu(,)f(if)h(that)h(\014le)g +(exists.)44 b(This)31 b(ma)m(y)h(b)s(e)f(inhibited)g(b)m(y)g(using)g +(the)h Ft(--norc)150 4322 y Fu(option.)40 b(The)27 b +Ft(--rcfile)h Fj(file)e Fu(option)h(will)g(force)h(Bash)f(to)h(read)f +(and)f(execute)j(commands)d(from)h Fr(\014le)150 4432 +y Fu(instead)k(of)f Ft(~/.bashrc)p Fu(.)275 4579 y(So,)g(t)m(ypically) +-8 b(,)33 b(y)m(our)d Ft(~/.bash_profile)c Fu(con)m(tains)32 +b(the)f(line)390 4725 y Ft(if)47 b([)h(-f)f(~/.bashrc)e(];)i(then)g(.)g +(~/.bashrc;)e(fi)150 4872 y Fu(after)31 b(\(or)g(b)s(efore\))f(an)m(y)h +(login-sp)s(eci\014c)g(initializations.)150 5083 y Fk(In)m(v)m(ok)m(ed) +40 b(non-in)m(teractiv)m(ely)150 5230 y Fu(When)33 b(Bash)g(is)g +(started)h(non-in)m(teractiv)m(ely)-8 b(,)37 b(to)d(run)e(a)h(shell)h +(script,)g(for)f(example,)i(it)e(lo)s(oks)h(for)f(the)150 +5340 y(v)-5 b(ariable)35 b Ft(BASH_ENV)d Fu(in)i(the)h(en)m(vironmen)m +(t,)h(expands)e(its)g(v)-5 b(alue)35 b(if)g(it)g(app)s(ears)e(there,)j +(and)e(uses)g(the)p eop end +%%Page: 89 95 +TeXDict begin 89 94 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(89)150 299 y(expanded)30 +b(v)-5 b(alue)30 b(as)h(the)g(name)f(of)h(a)f(\014le)h(to)g(read)f(and) +g(execute.)42 b(Bash)31 b(b)s(eha)m(v)m(es)g(as)g(if)f(the)g(follo)m +(wing)150 408 y(command)g(w)m(ere)h(executed:)390 552 +y Ft(if)47 b([)h(-n)f("$BASH_ENV")e(];)i(then)f(.)i("$BASH_ENV";)c(fi) +150 696 y Fu(but)30 b(the)g(v)-5 b(alue)31 b(of)g(the)f +Ft(PATH)f Fu(v)-5 b(ariable)32 b(is)e(not)h(used)e(to)i(searc)m(h)g +(for)f(the)h(\014lename.)275 840 y(As)42 b(noted)g(ab)s(o)m(v)m(e,)47 +b(if)42 b(a)h(non-in)m(teractiv)m(e)i(shell)d(is)g(in)m(v)m(ok)m(ed)i +(with)e(the)h Ft(--login)d Fu(option,)46 b(Bash)150 949 +y(attempts)31 b(to)g(read)g(and)e(execute)j(commands)e(from)g(the)h +(login)g(shell)g(startup)e(\014les.)150 1158 y Fk(In)m(v)m(ok)m(ed)40 +b(with)g(name)h Fh(sh)150 1305 y Fu(If)c(Bash)g(is)g(in)m(v)m(ok)m(ed)i +(with)e(the)g(name)g Ft(sh)p Fu(,)i(it)f(tries)f(to)h(mimic)g(the)f +(startup)g(b)s(eha)m(vior)g(of)h(historical)150 1414 +y(v)m(ersions)31 b(of)f Ft(sh)g Fu(as)h(closely)h(as)e(p)s(ossible,)g +(while)h(conforming)f(to)h(the)g Fm(posix)e Fu(standard)h(as)h(w)m +(ell.)275 1558 y(When)50 b(in)m(v)m(ok)m(ed)j(as)f(an)f(in)m(teractiv)m +(e)j(login)e(shell,)57 b(or)51 b(as)g(a)h(non-in)m(teractiv)m(e)h +(shell)f(with)f(the)150 1668 y Ft(--login)31 b Fu(option,)k(it)e +(\014rst)g(attempts)h(to)g(read)f(and)g(execute)h(commands)f(from)g +Ft(/etc/profile)d Fu(and)150 1777 y Ft(~/.profile)p Fu(,)d(in)i(that)i +(order.)39 b(The)30 b Ft(--noprofile)c Fu(option)k(ma)m(y)g(b)s(e)f +(used)g(to)h(inhibit)f(this)h(b)s(eha)m(vior.)150 1887 +y(When)36 b(in)m(v)m(ok)m(ed)i(as)e(an)g(in)m(teractiv)m(e)j(shell)e +(with)f(the)g(name)h Ft(sh)p Fu(,)g(Bash)f(lo)s(oks)h(for)f(the)h(v)-5 +b(ariable)37 b Ft(ENV)p Fu(,)150 1997 y(expands)29 b(its)i(v)-5 +b(alue)30 b(if)h(it)f(is)g(de\014ned,)g(and)f(uses)h(the)g(expanded)g +(v)-5 b(alue)30 b(as)h(the)f(name)g(of)g(a)h(\014le)f(to)h(read)150 +2106 y(and)g(execute.)46 b(Since)32 b(a)g(shell)g(in)m(v)m(ok)m(ed)h +(as)f Ft(sh)f Fu(do)s(es)g(not)h(attempt)h(to)g(read)e(and)g(execute)i +(commands)150 2216 y(from)39 b(an)m(y)g(other)h(startup)e(\014les,)k +(the)d Ft(--rcfile)e Fu(option)j(has)f(no)g(e\013ect.)69 +b(A)39 b(non-in)m(teractiv)m(e)j(shell)150 2325 y(in)m(v)m(ok)m(ed)32 +b(with)e(the)g(name)h Ft(sh)f Fu(do)s(es)g(not)g(attempt)i(to)f(read)f +(an)m(y)h(other)g(startup)e(\014les.)275 2469 y(When)h(in)m(v)m(ok)m +(ed)h(as)g Ft(sh)p Fu(,)f(Bash)h(en)m(ters)g Fm(posix)e +Fu(mo)s(de)h(after)h(the)g(startup)f(\014les)g(are)h(read.)150 +2678 y Fk(In)m(v)m(ok)m(ed)40 b(in)h Fg(posix)g Fk(mo)s(de)150 +2824 y Fu(When)28 b(Bash)h(is)g(started)g(in)g Fm(posix)f +Fu(mo)s(de,)g(as)h(with)g(the)g Ft(--posix)d Fu(command)j(line)g +(option,)h(it)f(follo)m(ws)150 2934 y(the)24 b Fm(posix)f +Fu(standard)h(for)f(startup)h(\014les.)38 b(In)24 b(this)g(mo)s(de,)h +(in)m(teractiv)m(e)i(shells)d(expand)f(the)h Ft(ENV)f +Fu(v)-5 b(ariable)150 3044 y(and)30 b(commands)g(are)g(read)h(and)e +(executed)j(from)d(the)i(\014le)f(whose)g(name)h(is)f(the)h(expanded)e +(v)-5 b(alue.)41 b(No)150 3153 y(other)31 b(startup)f(\014les)g(are)h +(read.)150 3362 y Fk(In)m(v)m(ok)m(ed)40 b(b)m(y)g(remote)h(shell)h +(daemon)150 3509 y Fu(Bash)36 b(attempts)h(to)g(determine)f(when)f(it)i +(is)f(b)s(eing)g(run)e(with)i(its)g(standard)g(input)f(connected)i(to)g +(a)150 3618 y(net)m(w)m(ork)h(connection,)j(as)c(when)g(executed)h(b)m +(y)f(the)h(remote)g(shell)g(daemon,)h(usually)e Ft(rshd)p +Fu(,)h(or)g(the)150 3728 y(secure)c(shell)f(daemon)h +Ft(sshd)p Fu(.)49 b(If)33 b(Bash)g(determines)h(it)g(is)f(b)s(eing)g +(run)f(in)i(this)f(fashion,)h(it)g(reads)g(and)150 3837 +y(executes)29 b(commands)e(from)g Ft(~/.bashrc)p Fu(,)e(if)j(that)g +(\014le)f(exists)h(and)f(is)g(readable.)41 b(It)27 b(will)h(not)f(do)h +(this)f(if)150 3947 y(in)m(v)m(ok)m(ed)k(as)f Ft(sh)p +Fu(.)40 b(The)29 b Ft(--norc)f Fu(option)i(ma)m(y)g(b)s(e)f(used)f(to)j +(inhibit)e(this)g(b)s(eha)m(vior,)h(and)f(the)h Ft(--rcfile)150 +4057 y Fu(option)36 b(ma)m(y)g(b)s(e)e(used)h(to)h(force)g(another)f +(\014le)h(to)g(b)s(e)e(read,)j(but)d(neither)i Ft(rshd)e +Fu(nor)h Ft(sshd)f Fu(generally)150 4166 y(in)m(v)m(ok)m(e)e(the)f +(shell)f(with)h(those)f(options)h(or)f(allo)m(w)i(them)f(to)g(b)s(e)e +(sp)s(eci\014ed.)150 4375 y Fk(In)m(v)m(ok)m(ed)40 b(with)g(unequal)h +(e\013ectiv)m(e)e(and)i(real)g Fg(uid/gid)p Fk(s)150 +4522 y Fu(If)34 b(Bash)h(is)g(started)g(with)f(the)h(e\013ectiv)m(e)i +(user)d(\(group\))h(id)f(not)h(equal)g(to)g(the)g(real)g(user)f +(\(group\))h(id,)150 4631 y(and)26 b(the)i Ft(-p)e Fu(option)h(is)g +(not)h(supplied,)e(no)h(startup)g(\014les)g(are)g(read,)h(shell)f +(functions)g(are)g(not)g(inherited)150 4741 y(from)41 +b(the)g(en)m(vironmen)m(t,)j(the)d Ft(SHELLOPTS)p Fu(,)h +Ft(BASHOPTS)p Fu(,)g Ft(CDPATH)p Fu(,)g(and)e Ft(GLOBIGNORE)e +Fu(v)-5 b(ariables,)45 b(if)150 4850 y(they)28 b(app)s(ear)f(in)h(the)g +(en)m(vironmen)m(t,)i(are)e(ignored,)h(and)e(the)h(e\013ectiv)m(e)j +(user)c(id)h(is)g(set)g(to)h(the)f(real)h(user)150 4960 +y(id.)62 b(If)38 b(the)f Ft(-p)h Fu(option)g(is)f(supplied)g(at)h(in)m +(v)m(o)s(cation,)k(the)c(startup)f(b)s(eha)m(vior)h(is)g(the)g(same,)i +(but)d(the)150 5070 y(e\013ectiv)m(e)c(user)d(id)g(is)g(not)h(reset.) +150 5324 y Fs(6.3)68 b(In)l(teractiv)l(e)47 b(Shells)p +eop end +%%Page: 90 96 +TeXDict begin 90 95 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(90)150 299 y Fk(6.3.1)63 +b(What)40 b(is)h(an)g(In)m(teractiv)m(e)e(Shell?)150 +446 y Fu(An)g(in)m(teractiv)m(e)k(shell)d(is)g(one)g(started)g(without) +g(non-option)g(argumen)m(ts,)j(unless)c Ft(-s)h Fu(is)f(sp)s +(eci\014ed,)150 555 y(without)30 b(sp)s(ecifying)g(the)g +Ft(-c)f Fu(option,)h(and)g(whose)f(input)g(and)g(error)h(output)f(are)h +(b)s(oth)f(connected)i(to)150 665 y(terminals)g(\(as)g(determined)f(b)m +(y)g Ft(isatty\(3\))p Fu(\),)e(or)j(one)f(started)h(with)f(the)h +Ft(-i)f Fu(option.)275 808 y(An)g(in)m(teractiv)m(e)j(shell)d +(generally)i(reads)e(from)g(and)g(writes)g(to)h(a)g(user's)f(terminal.) +275 952 y(The)i Ft(-s)g Fu(in)m(v)m(o)s(cation)j(option)f(ma)m(y)f(b)s +(e)g(used)f(to)i(set)f(the)g(p)s(ositional)h(parameters)f(when)f(an)h +(in)m(ter-)150 1061 y(activ)m(e)g(shell)d(is)h(started.)150 +1269 y Fk(6.3.2)63 b(Is)41 b(this)g(Shell)g(In)m(teractiv)m(e?)150 +1416 y Fu(T)-8 b(o)30 b(determine)g(within)f(a)h(startup)g(script)f +(whether)g(or)h(not)g(Bash)g(is)g(running)e(in)m(teractiv)m(ely)-8 +b(,)33 b(test)e(the)150 1526 y(v)-5 b(alue)30 b(of)g(the)f(`)p +Ft(-)p Fu(')h(sp)s(ecial)g(parameter.)41 b(It)29 b(con)m(tains)i +Ft(i)e Fu(when)g(the)g(shell)h(is)f(in)m(teractiv)m(e.)44 +b(F)-8 b(or)30 b(example:)390 1669 y Ft(case)47 b("$-")f(in)390 +1779 y(*i*\))h(echo)f(This)h(shell)f(is)h(interactive)e(;;)390 +1888 y(*\))i(echo)g(This)f(shell)h(is)g(not)g(interactive)e(;;)390 +1998 y(esac)275 2141 y Fu(Alternativ)m(ely)-8 b(,)28 +b(startup)23 b(scripts)h(ma)m(y)g(examine)g(the)g(v)-5 +b(ariable)25 b Ft(PS1)p Fu(;)g(it)g(is)e(unset)h(in)f(non-in)m +(teractiv)m(e)150 2251 y(shells,)31 b(and)e(set)i(in)f(in)m(teractiv)m +(e)k(shells.)40 b(Th)m(us:)390 2394 y Ft(if)47 b([)h(-z)f("$PS1")f(];)h +(then)772 2503 y(echo)f(This)h(shell)f(is)i(not)f(interactive)390 +2613 y(else)772 2723 y(echo)f(This)h(shell)f(is)i(interactive)390 +2832 y(fi)150 3040 y Fk(6.3.3)63 b(In)m(teractiv)m(e)38 +b(Shell)k(Beha)m(vior)150 3187 y Fu(When)30 b(the)h(shell)f(is)h +(running)d(in)m(teractiv)m(ely)-8 b(,)34 b(it)d(c)m(hanges)h(its)f(b)s +(eha)m(vior)f(in)g(sev)m(eral)i(w)m(a)m(ys.)199 3330 +y(1.)61 b(Startup)37 b(\014les)g(are)h(read)f(and)g(executed)h(as)f +(describ)s(ed)g(in)g(Section)h(6.2)g([Bash)g(Startup)e(Files],)330 +3440 y(page)31 b(88.)199 3579 y(2.)61 b(Job)32 b(Con)m(trol)h(\(see)g +(Chapter)e(7)i([Job)f(Con)m(trol],)i(page)f(107\))h(is)e(enabled)g(b)m +(y)g(default.)46 b(When)32 b(job)330 3689 y(con)m(trol)j(is)f(in)f +(e\013ect,)k(Bash)d(ignores)g(the)g(k)m(eyb)s(oard-generated)h(job)e +(con)m(trol)i(signals)g Ft(SIGTTIN)p Fu(,)330 3798 y +Ft(SIGTTOU)p Fu(,)29 b(and)g Ft(SIGTSTP)p Fu(.)199 3937 +y(3.)61 b(Bash)25 b(expands)e(and)h(displa)m(ys)h Ft(PS1)e +Fu(b)s(efore)h(reading)h(the)f(\014rst)g(line)h(of)f(a)h(command,)h +(and)e(expands)330 4047 y(and)33 b(displa)m(ys)h Ft(PS2)f +Fu(b)s(efore)h(reading)g(the)g(second)g(and)f(subsequen)m(t)g(lines)i +(of)f(a)g(m)m(ulti-line)h(com-)330 4156 y(mand.)42 b(Bash)31 +b(expands)f(and)h(displa)m(ys)g Ft(PS0)f Fu(after)h(it)h(reads)f(a)g +(command)g(but)f(b)s(efore)h(executing)330 4266 y(it.)62 +b(See)38 b(Section)g(6.9)h([Con)m(trolling)g(the)e(Prompt],)j(page)e +(98,)i(for)d(a)h(complete)h(list)f(of)g(prompt)330 4375 +y(string)30 b(escap)s(e)h(sequences.)199 4514 y(4.)61 +b(Bash)28 b(executes)h(the)e(v)-5 b(alues)28 b(of)g(the)g(set)g(elemen) +m(ts)h(of)f(the)g Ft(PROMPT_COMMANDS)23 b Fu(arra)m(y)28 +b(v)-5 b(ariable)29 b(as)330 4624 y(commands)e(b)s(efore)f(prin)m(ting) +h(the)g(primary)g(prompt,)g Ft($PS1)f Fu(\(see)i(Section)f(5.2)i([Bash) +e(V)-8 b(ariables],)330 4733 y(page)31 b(73\).)199 4872 +y(5.)61 b(Readline)27 b(\(see)g(Chapter)e(8)h([Command)g(Line)g +(Editing],)h(page)g(111\))g(is)f(used)g(to)g(read)g(commands)330 +4982 y(from)k(the)g(user's)g(terminal.)199 5121 y(6.)61 +b(Bash)36 b(insp)s(ects)g(the)h(v)-5 b(alue)37 b(of)f(the)g +Ft(ignoreeof)e Fu(option)j(to)g Ft(set)29 b(-o)36 b Fu(instead)h(of)f +(exiting)i(imme-)330 5230 y(diately)f(when)e(it)i(receiv)m(es)h(an)e +Ft(EOF)f Fu(on)h(its)g(standard)f(input)g(when)h(reading)g(a)g(command) +g(\(see)330 5340 y(Section)31 b(4.3.1)h([The)e(Set)h(Builtin],)g(page)g +(62\).)p eop end +%%Page: 91 97 +TeXDict begin 91 96 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(91)199 299 y(7.)61 +b(Command)43 b(history)h(\(see)h(Section)g(9.1)g([Bash)f(History)h(F)-8 +b(acilities],)51 b(page)45 b(146\))h(and)d(history)330 +408 y(expansion)h(\(see)i(Section)f(9.3)h([History)g(In)m(teraction],)k +(page)45 b(148\))h(are)f(enabled)g(b)m(y)f(default.)330 +518 y(Bash)28 b(will)g(sa)m(v)m(e)h(the)f(command)f(history)h(to)g(the) +g(\014le)g(named)f(b)m(y)h Ft($HISTFILE)d Fu(when)h(a)i(shell)g(with) +330 628 y(history)i(enabled)h(exits.)199 762 y(8.)61 +b(Alias)31 b(expansion)g(\(see)g(Section)g(6.6)g([Aliases],)i(page)e +(94\))h(is)e(p)s(erformed)f(b)m(y)h(default.)199 896 +y(9.)61 b(In)24 b(the)g(absence)h(of)f(an)m(y)h(traps,)g(Bash)g +(ignores)f Ft(SIGTERM)f Fu(\(see)i(Section)g(3.7.6)h([Signals],)g(page) +f(42\).)154 1030 y(10.)61 b(In)29 b(the)g(absence)h(of)g(an)m(y)g +(traps,)f Ft(SIGINT)f Fu(is)h(caugh)m(t)i(and)e(handled)f(\(see)j +(Section)f(3.7.6)h([Signals],)330 1140 y(page)g(42\).)42 +b Ft(SIGINT)29 b Fu(will)h(in)m(terrupt)g(some)h(shell)g(builtins.)154 +1274 y(11.)61 b(An)40 b(in)m(teractiv)m(e)j(login)e(shell)g(sends)e(a)i +Ft(SIGHUP)d Fu(to)j(all)g(jobs)f(on)g(exit)h(if)g(the)f +Ft(huponexit)e Fu(shell)330 1383 y(option)31 b(has)f(b)s(een)g(enabled) +g(\(see)h(Section)g(3.7.6)i([Signals],)e(page)g(42\).)154 +1517 y(12.)61 b(The)29 b Ft(-n)g Fu(in)m(v)m(o)s(cation)j(option)e(is)g +(ignored,)g(and)f(`)p Ft(set)h(-n)p Fu(')f(has)h(no)f(e\013ect)j(\(see) +e(Section)h(4.3.1)g([The)330 1627 y(Set)g(Builtin],)g(page)g(62\).)154 +1761 y(13.)61 b(Bash)32 b(will)g(c)m(hec)m(k)i(for)e(mail)g(p)s(erio)s +(dically)-8 b(,)34 b(dep)s(ending)c(on)i(the)g(v)-5 b(alues)32 +b(of)g(the)h Ft(MAIL)p Fu(,)e Ft(MAILPATH)p Fu(,)330 +1871 y(and)f Ft(MAILCHECK)e Fu(shell)i(v)-5 b(ariables)31 +b(\(see)h(Section)f(5.2)g([Bash)g(V)-8 b(ariables],)32 +b(page)f(73\).)154 2005 y(14.)61 b(Expansion)32 b(errors)h(due)f(to)i +(references)f(to)h(un)m(b)s(ound)c(shell)j(v)-5 b(ariables)34 +b(after)g(`)p Ft(set)29 b(-u)p Fu(')k(has)g(b)s(een)330 +2114 y(enabled)d(will)h(not)g(cause)g(the)f(shell)h(to)g(exit)g(\(see)g +(Section)h(4.3.1)g([The)e(Set)h(Builtin],)g(page)g(62\).)154 +2248 y(15.)61 b(The)48 b(shell)h(will)f(not)h(exit)g(on)g(expansion)f +(errors)g(caused)g(b)m(y)h Fr(v)-5 b(ar)54 b Fu(b)s(eing)48 +b(unset)g(or)h(n)m(ull)f(in)330 2358 y Ft(${)p Fj(var)p +Ft(:?)p Fj(word)p Ft(})27 b Fu(expansions)j(\(see)h(Section)h(3.5.3)g +([Shell)e(P)m(arameter)i(Expansion],)e(page)h(25\).)154 +2492 y(16.)61 b(Redirection)31 b(errors)f(encoun)m(tered)h(b)m(y)f +(shell)h(builtins)f(will)g(not)h(cause)g(the)f(shell)h(to)g(exit.)154 +2626 y(17.)61 b(When)26 b(running)f(in)i Fm(posix)e Fu(mo)s(de,)j(a)f +(sp)s(ecial)g(builtin)f(returning)g(an)g(error)h(status)g(will)g(not)f +(cause)330 2736 y(the)31 b(shell)f(to)h(exit)h(\(see)f(Section)g(6.11)h +([Bash)f(POSIX)e(Mo)s(de],)i(page)g(101\).)154 2870 y(18.)61 +b(A)34 b(failed)g Ft(exec)f Fu(will)h(not)g(cause)g(the)g(shell)g(to)g +(exit)h(\(see)f(Section)h(4.1)g([Bourne)f(Shell)f(Builtins],)330 +2980 y(page)e(44\).)154 3114 y(19.)61 b(P)m(arser)31 +b(syn)m(tax)f(errors)g(will)h(not)g(cause)g(the)f(shell)h(to)g(exit.) +154 3248 y(20.)61 b(Simple)21 b(sp)s(elling)h(correction)g(for)g +(directory)g(argumen)m(ts)f(to)i(the)e Ft(cd)g Fu(builtin)g(is)h +(enabled)f(b)m(y)h(default)330 3357 y(\(see)35 b(the)g(description)f +(of)h(the)f Ft(cdspell)f Fu(option)h(to)i(the)e Ft(shopt)f +Fu(builtin)h(in)g(Section)h(4.3.2)h([The)330 3467 y(Shopt)30 +b(Builtin],)h(page)g(66\).)154 3601 y(21.)61 b(The)42 +b(shell)h(will)g(c)m(hec)m(k)h(the)f(v)-5 b(alue)43 b(of)f(the)h +Ft(TMOUT)e Fu(v)-5 b(ariable)44 b(and)e(exit)h(if)g(a)g(command)f(is)h +(not)330 3711 y(read)30 b(within)g(the)g(sp)s(eci\014ed)f(n)m(um)m(b)s +(er)g(of)i(seconds)f(after)g(prin)m(ting)g Ft($PS1)f +Fu(\(see)i(Section)g(5.2)h([Bash)330 3820 y(V)-8 b(ariables],)32 +b(page)f(73\).)150 4060 y Fs(6.4)68 b(Bash)45 b(Conditional)h +(Expressions)150 4220 y Fu(Conditional)26 b(expressions)g(are)g(used)f +(b)m(y)g(the)h Ft([[)f Fu(comp)s(ound)g(command)g(and)g(the)h +Ft(test)f Fu(and)g Ft([)g Fu(builtin)150 4329 y(commands.)50 +b(The)33 b Ft(test)g Fu(and)f Ft([)i Fu(commands)f(determine)h(their)f +(b)s(eha)m(vior)h(based)f(on)h(the)f(n)m(um)m(b)s(er)g(of)150 +4439 y(argumen)m(ts;)28 b(see)f(the)f(descriptions)g(of)g(those)g +(commands)g(for)g(an)m(y)g(other)h(command-sp)s(eci\014c)e(actions.)275 +4573 y(Expressions)d(ma)m(y)h(b)s(e)g(unary)f(or)h(binary)-8 +b(,)24 b(and)f(are)g(formed)g(from)g(the)g(follo)m(wing)h(primaries.)38 +b(Unary)150 4682 y(expressions)c(are)g(often)g(used)g(to)g(examine)h +(the)f(status)g(of)h(a)f(\014le.)52 b(There)33 b(are)h(string)g(op)s +(erators)h(and)150 4792 y(n)m(umeric)c(comparison)g(op)s(erators)h(as)f +(w)m(ell.)44 b(Bash)31 b(handles)g(sev)m(eral)h(\014lenames)g(sp)s +(ecially)g(when)e(they)150 4902 y(are)35 b(used)e(in)i(expressions.)52 +b(If)34 b(the)h(op)s(erating)f(system)h(on)f(whic)m(h)g(Bash)h(is)f +(running)f(pro)m(vides)h(these)150 5011 y(sp)s(ecial)22 +b(\014les,)i(Bash)e(will)g(use)f(them;)k(otherwise)d(it)g(will)g(em)m +(ulate)h(them)f(in)m(ternally)h(with)e(this)h(b)s(eha)m(vior:)150 +5121 y(If)27 b(the)g Fr(\014le)33 b Fu(argumen)m(t)27 +b(to)h(one)g(of)f(the)h(primaries)f(is)g(of)h(the)f(form)g +Ft(/dev/fd/)p Fj(N)p Fu(,)e(then)i(\014le)h(descriptor)f +Fr(N)150 5230 y Fu(is)g(c)m(hec)m(k)m(ed.)42 b(If)26 +b(the)h Fr(\014le)32 b Fu(argumen)m(t)c(to)f(one)h(of)f(the)g +(primaries)f(is)h(one)h(of)f Ft(/dev/stdin)p Fu(,)e Ft(/dev/stdout)p +Fu(,)150 5340 y(or)30 b Ft(/dev/stderr)p Fu(,)e(\014le)i(descriptor)h +(0,)g(1,)g(or)f(2,)h(resp)s(ectiv)m(ely)-8 b(,)32 b(is)f(c)m(hec)m(k)m +(ed.)p eop end +%%Page: 92 98 +TeXDict begin 92 97 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(92)275 299 y(When)37 +b(used)g(with)g Ft([[)p Fu(,)i(the)f(`)p Ft(<)p Fu(')g(and)f(`)p +Ft(>)p Fu(')h(op)s(erators)g(sort)g(lexicographically)i(using)d(the)h +(curren)m(t)150 408 y(lo)s(cale.)k(The)30 b Ft(test)f +Fu(command)i(uses)f(ASCI)s(I)e(ordering.)275 542 y(Unless)44 +b(otherwise)h(sp)s(eci\014ed,)j(primaries)c(that)h(op)s(erate)g(on)g +(\014les)f(follo)m(w)i(sym)m(b)s(olic)f(links)g(and)150 +651 y(op)s(erate)31 b(on)f(the)h(target)h(of)e(the)h(link,)f(rather)h +(than)f(the)g(link)h(itself.)150 808 y Ft(-a)f Fj(file)162 +b Fu(T)-8 b(rue)30 b(if)g Fr(\014le)36 b Fu(exists.)150 +965 y Ft(-b)30 b Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g +Fr(\014le)36 b Fu(exists)31 b(and)f(is)g(a)h(blo)s(c)m(k)g(sp)s(ecial)g +(\014le.)150 1122 y Ft(-c)f Fj(file)162 b Fu(T)-8 b(rue)30 +b(if)g Fr(\014le)36 b Fu(exists)31 b(and)f(is)g(a)h(c)m(haracter)h(sp)s +(ecial)f(\014le.)150 1279 y Ft(-d)f Fj(file)162 b Fu(T)-8 +b(rue)30 b(if)g Fr(\014le)36 b Fu(exists)31 b(and)f(is)g(a)h(directory) +-8 b(.)150 1436 y Ft(-e)30 b Fj(file)162 b Fu(T)-8 b(rue)30 +b(if)g Fr(\014le)36 b Fu(exists.)150 1592 y Ft(-f)30 +b Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g Fr(\014le)36 +b Fu(exists)31 b(and)f(is)g(a)h(regular)f(\014le.)150 +1749 y Ft(-g)g Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g +Fr(\014le)36 b Fu(exists)31 b(and)f(its)g(set-group-id)h(bit)g(is)f +(set.)150 1906 y Ft(-h)g Fj(file)162 b Fu(T)-8 b(rue)30 +b(if)g Fr(\014le)36 b Fu(exists)31 b(and)f(is)g(a)h(sym)m(b)s(olic)g +(link.)150 2063 y Ft(-k)f Fj(file)162 b Fu(T)-8 b(rue)30 +b(if)g Fr(\014le)36 b Fu(exists)31 b(and)f(its)g Ft(")p +Fu(stic)m(ky)p Ft(")h Fu(bit)g(is)f(set.)150 2220 y Ft(-p)g +Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g Fr(\014le)36 b +Fu(exists)31 b(and)f(is)g(a)h(named)f(pip)s(e)f(\(FIF)m(O\).)150 +2377 y Ft(-r)h Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g +Fr(\014le)36 b Fu(exists)31 b(and)f(is)g(readable.)150 +2534 y Ft(-s)g Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g +Fr(\014le)36 b Fu(exists)31 b(and)f(has)g(a)g(size)i(greater)f(than)f +(zero.)150 2690 y Ft(-t)g Fj(fd)258 b Fu(T)-8 b(rue)30 +b(if)g(\014le)h(descriptor)f Fr(fd)j Fu(is)e(op)s(en)e(and)h(refers)g +(to)h(a)g(terminal.)150 2847 y Ft(-u)f Fj(file)162 b +Fu(T)-8 b(rue)30 b(if)g Fr(\014le)36 b Fu(exists)31 b(and)f(its)g +(set-user-id)h(bit)f(is)h(set.)150 3004 y Ft(-w)f Fj(file)162 +b Fu(T)-8 b(rue)30 b(if)g Fr(\014le)36 b Fu(exists)31 +b(and)f(is)g(writable.)150 3161 y Ft(-x)g Fj(file)162 +b Fu(T)-8 b(rue)30 b(if)g Fr(\014le)36 b Fu(exists)31 +b(and)f(is)g(executable.)150 3318 y Ft(-G)g Fj(file)162 +b Fu(T)-8 b(rue)30 b(if)g Fr(\014le)36 b Fu(exists)31 +b(and)f(is)g(o)m(wned)g(b)m(y)h(the)f(e\013ectiv)m(e)j(group)d(id.)150 +3475 y Ft(-L)g Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g +Fr(\014le)36 b Fu(exists)31 b(and)f(is)g(a)h(sym)m(b)s(olic)g(link.)150 +3632 y Ft(-N)f Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g +Fr(\014le)36 b Fu(exists)31 b(and)f(has)g(b)s(een)f(mo)s(di\014ed)h +(since)g(it)h(w)m(as)g(last)g(read.)150 3789 y Ft(-O)f +Fj(file)162 b Fu(T)-8 b(rue)30 b(if)g Fr(\014le)36 b +Fu(exists)31 b(and)f(is)g(o)m(wned)g(b)m(y)h(the)f(e\013ectiv)m(e)j +(user)d(id.)150 3945 y Ft(-S)g Fj(file)162 b Fu(T)-8 +b(rue)30 b(if)g Fr(\014le)36 b Fu(exists)31 b(and)f(is)g(a)h(so)s(c)m +(k)m(et.)150 4102 y Fj(file1)e Ft(-ef)g Fj(file2)630 +4212 y Fu(T)-8 b(rue)30 b(if)g Fr(\014le1)38 b Fu(and)30 +b Fr(\014le2)38 b Fu(refer)30 b(to)i(the)e(same)h(device)g(and)f(ino)s +(de)g(n)m(um)m(b)s(ers.)150 4369 y Fj(file1)f Ft(-nt)g +Fj(file2)630 4478 y Fu(T)-8 b(rue)23 b(if)h Fr(\014le1)32 +b Fu(is)24 b(new)m(er)g(\(according)h(to)g(mo)s(di\014cation)f(date\))h +(than)f Fr(\014le2)p Fu(,)i(or)e(if)g Fr(\014le1)31 b +Fu(exists)630 4588 y(and)f Fr(\014le2)38 b Fu(do)s(es)30 +b(not.)150 4745 y Fj(file1)f Ft(-ot)g Fj(file2)630 4854 +y Fu(T)-8 b(rue)30 b(if)g Fr(\014le1)38 b Fu(is)31 b(older)f(than)g +Fr(\014le2)p Fu(,)i(or)e(if)g Fr(\014le2)38 b Fu(exists)31 +b(and)f Fr(\014le1)38 b Fu(do)s(es)30 b(not.)150 5011 +y Ft(-o)g Fj(optname)630 5121 y Fu(T)-8 b(rue)41 b(if)g(the)g(shell)h +(option)f Fr(optname)47 b Fu(is)41 b(enabled.)73 b(The)41 +b(list)h(of)f(options)h(app)s(ears)e(in)630 5230 y(the)33 +b(description)h(of)f(the)g Ft(-o)g Fu(option)g(to)h(the)g +Ft(set)e Fu(builtin)h(\(see)h(Section)g(4.3.1)h([The)e(Set)630 +5340 y(Builtin],)e(page)g(62\).)p eop end +%%Page: 93 99 +TeXDict begin 93 98 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(93)150 299 y Ft(-v)30 +b Fj(varname)630 408 y Fu(T)-8 b(rue)30 b(if)g(the)h(shell)f(v)-5 +b(ariable)32 b Fr(v)-5 b(arname)35 b Fu(is)30 b(set)h(\(has)g(b)s(een)e +(assigned)i(a)g(v)-5 b(alue\).)150 565 y Ft(-R)30 b Fj(varname)630 +674 y Fu(T)-8 b(rue)30 b(if)g(the)h(shell)f(v)-5 b(ariable)32 +b Fr(v)-5 b(arname)35 b Fu(is)30 b(set)h(and)f(is)h(a)f(name)h +(reference.)150 830 y Ft(-z)f Fj(string)66 b Fu(T)-8 +b(rue)30 b(if)g(the)h(length)g(of)f Fr(string)38 b Fu(is)31 +b(zero.)150 987 y Ft(-n)f Fj(string)150 1096 y(string)192 +b Fu(T)-8 b(rue)30 b(if)g(the)h(length)g(of)f Fr(string)38 +b Fu(is)31 b(non-zero.)150 1252 y Fj(string1)d Ft(==)i +Fj(string2)150 1362 y(string1)e Ft(=)i Fj(string2)630 +1472 y Fu(T)-8 b(rue)43 b(if)h(the)g(strings)g(are)g(equal.)82 +b(When)44 b(used)f(with)g(the)h Ft([[)g Fu(command,)j(this)d(p)s(er-) +630 1581 y(forms)d(pattern)g(matc)m(hing)i(as)f(describ)s(ed)e(ab)s(o)m +(v)m(e)j(\(see)f(Section)g(3.2.5.2)i([Conditional)630 +1691 y(Constructs],)30 b(page)h(11\).)630 1824 y(`)p +Ft(=)p Fu(')g(should)e(b)s(e)h(used)f(with)h(the)h Ft(test)e +Fu(command)h(for)g Fm(posix)g Fu(conformance.)150 1980 +y Fj(string1)e Ft(!=)i Fj(string2)630 2089 y Fu(T)-8 +b(rue)30 b(if)g(the)h(strings)f(are)h(not)f(equal.)150 +2246 y Fj(string1)e Ft(<)i Fj(string2)630 2355 y Fu(T)-8 +b(rue)30 b(if)g Fr(string1)38 b Fu(sorts)31 b(b)s(efore)f +Fr(string2)38 b Fu(lexicographically)-8 b(.)150 2511 +y Fj(string1)28 b Ft(>)i Fj(string2)630 2621 y Fu(T)-8 +b(rue)30 b(if)g Fr(string1)38 b Fu(sorts)31 b(after)g +Fr(string2)38 b Fu(lexicographically)-8 b(.)150 2777 +y Fj(arg1)29 b Ft(OP)h Fj(arg2)630 2887 y Ft(OP)j Fu(is)h(one)g(of)h(`) +p Ft(-eq)p Fu(',)f(`)p Ft(-ne)p Fu(',)h(`)p Ft(-lt)p +Fu(',)g(`)p Ft(-le)p Fu(',)f(`)p Ft(-gt)p Fu(',)h(or)f(`)p +Ft(-ge)p Fu('.)51 b(These)34 b(arithmetic)h(binary)630 +2996 y(op)s(erators)h(return)e(true)i(if)f Fr(arg1)44 +b Fu(is)36 b(equal)g(to,)i(not)e(equal)g(to,)i(less)e(than,)h(less)f +(than)f(or)630 3106 y(equal)29 b(to,)g(greater)h(than,)e(or)g(greater)i +(than)d(or)i(equal)f(to)h Fr(arg2)p Fu(,)h(resp)s(ectiv)m(ely)-8 +b(.)42 b Fr(Arg1)36 b Fu(and)630 3215 y Fr(arg2)41 b +Fu(ma)m(y)34 b(b)s(e)f(p)s(ositiv)m(e)h(or)f(negativ)m(e)j(in)m +(tegers.)50 b(When)33 b(used)g(with)g(the)g Ft([[)g Fu(command,)630 +3325 y Fr(Arg1)41 b Fu(and)33 b Fr(Arg2)41 b Fu(are)33 +b(ev)-5 b(aluated)35 b(as)e(arithmetic)i(expressions)d(\(see)j(Section) +f(6.5)g([Shell)630 3435 y(Arithmetic],)e(page)f(93\).)150 +3672 y Fs(6.5)68 b(Shell)45 b(Arithmetic)150 3832 y Fu(The)26 +b(shell)h(allo)m(ws)h(arithmetic)f(expressions)g(to)g(b)s(e)f(ev)-5 +b(aluated,)29 b(as)d(one)h(of)g(the)g(shell)f(expansions)h(or)f(b)m(y) +150 3941 y(using)h(the)g Ft(\(\()g Fu(comp)s(ound)e(command,)j(the)g +Ft(let)e Fu(builtin,)i(or)f(the)g Ft(-i)g Fu(option)h(to)f(the)h +Ft(declare)d Fu(builtin.)275 4074 y(Ev)-5 b(aluation)27 +b(is)g(done)f(in)g(\014xed-width)g(in)m(tegers)i(with)e(no)h(c)m(hec)m +(k)h(for)e(o)m(v)m(er\015o)m(w,)j(though)d(division)h(b)m(y)150 +4184 y(0)g(is)g(trapp)s(ed)f(and)h(\015agged)g(as)h(an)f(error.)39 +b(The)26 b(op)s(erators)h(and)g(their)g(precedence,)h(asso)s(ciativit)m +(y)-8 b(,)32 b(and)150 4293 y(v)-5 b(alues)35 b(are)h(the)f(same)g(as)h +(in)e(the)h(C)g(language.)56 b(The)35 b(follo)m(wing)h(list)g(of)f(op)s +(erators)g(is)g(group)s(ed)f(in)m(to)150 4403 y(lev)m(els)27 +b(of)f(equal-precedence)i(op)s(erators.)39 b(The)25 b(lev)m(els)j(are)e +(listed)h(in)e(order)h(of)g(decreasing)g(precedence.)150 +4559 y Fj(id)p Ft(++)j Fj(id)p Ft(--)67 b Fu(v)-5 b(ariable)31 +b(p)s(ost-incremen)m(t)g(and)f(p)s(ost-decremen)m(t)150 +4715 y Ft(++)p Fj(id)f Ft(--)p Fj(id)67 b Fu(v)-5 b(ariable)31 +b(pre-incremen)m(t)g(and)f(pre-decremen)m(t)150 4871 +y Ft(-)g(+)354 b Fu(unary)29 b(min)m(us)h(and)g(plus)150 +5028 y Ft(!)g(~)354 b Fu(logical)33 b(and)d(bit)m(wise)h(negation)150 +5184 y Ft(**)384 b Fu(exp)s(onen)m(tiation)150 5340 y +Ft(*)30 b(/)g(\045)276 b Fu(m)m(ultiplication,)33 b(division,)d +(remainder)p eop end +%%Page: 94 100 +TeXDict begin 94 99 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(94)150 299 y Ft(+)30 +b(-)354 b Fu(addition,)31 b(subtraction)150 460 y Ft(<<)f(>>)258 +b Fu(left)31 b(and)f(righ)m(t)h(bit)m(wise)g(shifts)150 +620 y Ft(<=)f(>=)g(<)g(>)102 b Fu(comparison)150 781 +y Ft(==)30 b(!=)258 b Fu(equalit)m(y)32 b(and)e(inequalit)m(y)150 +942 y Ft(&)432 b Fu(bit)m(wise)31 b(AND)150 1103 y Ft(^)432 +b Fu(bit)m(wise)31 b(exclusiv)m(e)h(OR)150 1263 y Ft(|)432 +b Fu(bit)m(wise)31 b(OR)150 1424 y Ft(&&)384 b Fu(logical)33 +b(AND)150 1585 y Ft(||)384 b Fu(logical)33 b(OR)150 1746 +y Ft(expr)c(?)h(expr)f(:)h(expr)630 1855 y Fu(conditional)i(op)s +(erator)150 2016 y Ft(=)e(*=)g(/=)g(\045=)f(+=)h(-=)g(<<=)f(>>=)h(&=)g +(^=)f(|=)630 2126 y Fu(assignmen)m(t)150 2287 y Ft(expr1)g(,)h(expr2) +630 2396 y Fu(comma)275 2558 y(Shell)38 b(v)-5 b(ariables)39 +b(are)g(allo)m(w)m(ed)i(as)e(op)s(erands;)i(parameter)e(expansion)g(is) +f(p)s(erformed)g(b)s(efore)g(the)150 2667 y(expression)g(is)g(ev)-5 +b(aluated.)66 b(Within)38 b(an)h(expression,)h(shell)e(v)-5 +b(ariables)39 b(ma)m(y)g(also)g(b)s(e)f(referenced)g(b)m(y)150 +2777 y(name)31 b(without)f(using)g(the)h(parameter)g(expansion)f(syn)m +(tax.)42 b(A)31 b(shell)f(v)-5 b(ariable)32 b(that)f(is)f(n)m(ull)h(or) +f(unset)150 2886 y(ev)-5 b(aluates)41 b(to)f(0)g(when)e(referenced)h(b) +m(y)g(name)h(without)f(using)g(the)g(parameter)h(expansion)f(syn)m +(tax.)150 2996 y(The)c(v)-5 b(alue)37 b(of)f(a)h(v)-5 +b(ariable)36 b(is)g(ev)-5 b(aluated)38 b(as)e(an)g(arithmetic)h +(expression)f(when)f(it)h(is)g(referenced,)i(or)150 3106 +y(when)31 b(a)i(v)-5 b(ariable)33 b(whic)m(h)f(has)g(b)s(een)f(giv)m +(en)j(the)e Fr(in)m(teger)40 b Fu(attribute)33 b(using)f(`)p +Ft(declare)d(-i)p Fu(')i(is)i(assigned)150 3215 y(a)j(v)-5 +b(alue.)58 b(A)36 b(n)m(ull)f(v)-5 b(alue)37 b(ev)-5 +b(aluates)37 b(to)g(0.)57 b(A)36 b(shell)g(v)-5 b(ariable)37 +b(need)e(not)h(ha)m(v)m(e)h(its)f Fr(in)m(teger)44 b +Fu(attribute)150 3325 y(turned)29 b(on)h(to)i(b)s(e)d(used)h(in)g(an)g +(expression.)275 3461 y(In)m(teger)41 b(constan)m(ts)g(follo)m(w)h(the) +e(C)g(language)i(de\014nition,)g(without)f(su\016xes)e(or)h(c)m +(haracter)i(con-)150 3570 y(stan)m(ts.)f(Constan)m(ts)31 +b(with)f(a)g(leading)h(0)f(are)h(in)m(terpreted)f(as)g(o)s(ctal)i(n)m +(um)m(b)s(ers.)39 b(A)30 b(leading)h(`)p Ft(0x)p Fu(')f(or)g(`)p +Ft(0X)p Fu(')150 3680 y(denotes)g(hexadecimal.)42 b(Otherwise,)30 +b(n)m(um)m(b)s(ers)f(tak)m(e)i(the)f(form)g([)p Fr(base)5 +b Ft(#)p Fu(])p Fr(n)p Fu(,)30 b(where)f(the)i(optional)g +Fr(base)150 3789 y Fu(is)e(a)h(decimal)g(n)m(um)m(b)s(er)e(b)s(et)m(w)m +(een)h(2)h(and)e(64)i(represen)m(ting)g(the)f(arithmetic)i(base,)e(and) +g Fr(n)g Fu(is)g(a)g(n)m(um)m(b)s(er)150 3899 y(in)g(that)i(base.)40 +b(If)30 b Fr(base)5 b Ft(#)30 b Fu(is)f(omitted,)i(then)f(base)g(10)g +(is)g(used.)40 b(When)30 b(sp)s(ecifying)f Fr(n)p Fu(,)h(if)f(a)i +(non-digit)f(is)150 4008 y(required,)k(the)g(digits)h(greater)g(than)e +(9)i(are)f(represen)m(ted)g(b)m(y)f(the)h(lo)m(w)m(ercase)j(letters,)f +(the)e(upp)s(ercase)150 4118 y(letters,)26 b(`)p Ft(@)p +Fu(',)g(and)d(`)p Ft(_)p Fu(',)i(in)e(that)i(order.)38 +b(If)23 b Fr(base)29 b Fu(is)23 b(less)h(than)g(or)f(equal)h(to)h(36,)h +(lo)m(w)m(ercase)g(and)d(upp)s(ercase)150 4228 y(letters)32 +b(ma)m(y)f(b)s(e)e(used)h(in)m(terc)m(hangeably)i(to)f(represen)m(t)g +(n)m(um)m(b)s(ers)e(b)s(et)m(w)m(een)i(10)g(and)f(35.)275 +4364 y(Op)s(erators)44 b(are)h(ev)-5 b(aluated)46 b(in)f(order)f(of)h +(precedence.)85 b(Sub-expressions)44 b(in)g(paren)m(theses)i(are)150 +4473 y(ev)-5 b(aluated)32 b(\014rst)d(and)h(ma)m(y)h(o)m(v)m(erride)g +(the)g(precedence)g(rules)f(ab)s(o)m(v)m(e.)150 4716 +y Fs(6.6)68 b(Aliases)150 4875 y Fr(Aliases)41 b Fu(allo)m(w)d(a)f +(string)f(to)h(b)s(e)f(substituted)g(for)g(a)g(w)m(ord)g(when)g(it)h +(is)f(used)f(as)i(the)g(\014rst)e(w)m(ord)h(of)h(a)150 +4985 y(simple)32 b(command.)45 b(The)31 b(shell)i(main)m(tains)f(a)h +(list)f(of)g(aliases)i(that)e(ma)m(y)h(b)s(e)e(set)h(and)g(unset)f +(with)h(the)150 5095 y Ft(alias)d Fu(and)h Ft(unalias)e +Fu(builtin)i(commands.)275 5230 y(The)f(\014rst)f(w)m(ord)i(of)f(eac)m +(h)i(simple)f(command,)g(if)f(unquoted,)g(is)h(c)m(hec)m(k)m(ed)h(to)g +(see)f(if)g(it)g(has)f(an)g(alias.)150 5340 y(If)24 b(so,)i(that)g(w)m +(ord)e(is)h(replaced)g(b)m(y)f(the)h(text)h(of)e(the)h(alias.)40 +b(The)24 b(c)m(haracters)i(`)p Ft(/)p Fu(',)h(`)p Ft($)p +Fu(',)f(`)p Ft(`)p Fu(',)g(`)p Ft(=)p Fu(')f(and)f(an)m(y)h(of)p +eop end +%%Page: 95 101 +TeXDict begin 95 100 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(95)150 299 y(the)23 +b(shell)g(metac)m(haracters)i(or)e(quoting)g(c)m(haracters)h(listed)g +(ab)s(o)m(v)m(e)g(ma)m(y)f(not)g(app)s(ear)f(in)h(an)g(alias)h(name.) +150 408 y(The)e(replacemen)m(t)h(text)g(ma)m(y)g(con)m(tain)h(an)m(y)e +(v)-5 b(alid)23 b(shell)f(input,)h(including)f(shell)g(metac)m +(haracters.)40 b(The)150 518 y(\014rst)35 b(w)m(ord)g(of)h(the)g +(replacemen)m(t)i(text)e(is)g(tested)h(for)e(aliases,)k(but)c(a)h(w)m +(ord)g(that)g(is)g(iden)m(tical)i(to)e(an)150 628 y(alias)c(b)s(eing)f +(expanded)f(is)h(not)g(expanded)f(a)h(second)g(time.)43 +b(This)30 b(means)h(that)g(one)g(ma)m(y)h(alias)g Ft(ls)e +Fu(to)150 737 y Ft("ls)f(-F")p Fu(,)f(for)f(instance,)i(and)d(Bash)i +(do)s(es)f(not)h(try)f(to)h(recursiv)m(ely)g(expand)e(the)i(replacemen) +m(t)h(text.)40 b(If)150 847 y(the)31 b(last)h(c)m(haracter)h(of)e(the)h +(alias)g(v)-5 b(alue)31 b(is)h(a)f Fr(blank)p Fu(,)g(then)g(the)g(next) +h(command)e(w)m(ord)h(follo)m(wing)i(the)150 956 y(alias)f(is)e(also)h +(c)m(hec)m(k)m(ed)i(for)d(alias)h(expansion.)275 1096 +y(Aliases)e(are)f(created)i(and)d(listed)i(with)f(the)g +Ft(alias)f Fu(command,)h(and)g(remo)m(v)m(ed)h(with)f(the)g +Ft(unalias)150 1206 y Fu(command.)275 1345 y(There)44 +b(is)h(no)g(mec)m(hanism)g(for)f(using)h(argumen)m(ts)g(in)f(the)h +(replacemen)m(t)i(text,)i(as)d(in)e Ft(csh)p Fu(.)83 +b(If)150 1455 y(argumen)m(ts)37 b(are)h(needed,)g(a)g(shell)f(function) +f(should)g(b)s(e)h(used)f(\(see)i(Section)g(3.3)g([Shell)f(F)-8 +b(unctions],)150 1564 y(page)31 b(18\).)275 1704 y(Aliases)i(are)h(not) +e(expanded)g(when)g(the)h(shell)g(is)g(not)g(in)m(teractiv)m(e,)j +(unless)c(the)h Ft(expand_aliases)150 1813 y Fu(shell)e(option)f(is)h +(set)g(using)f Ft(shopt)f Fu(\(see)i(Section)g(4.3.2)h([The)e(Shopt)g +(Builtin],)h(page)g(66\).)275 1953 y(The)38 b(rules)h(concerning)h(the) +f(de\014nition)g(and)g(use)g(of)g(aliases)i(are)e(somewhat)h +(confusing.)67 b(Bash)150 2063 y(alw)m(a)m(ys)37 b(reads)f(at)h(least)g +(one)f(complete)i(line)e(of)g(input,)h(and)e(all)i(lines)f(that)g(mak)m +(e)h(up)e(a)h(comp)s(ound)150 2172 y(command,)29 b(b)s(efore)g +(executing)i(an)m(y)e(of)h(the)f(commands)g(on)g(that)h(line)f(or)h +(the)f(comp)s(ound)f(command.)150 2282 y(Aliases)g(are)g(expanded)e +(when)g(a)i(command)f(is)g(read,)h(not)f(when)f(it)i(is)f(executed.)41 +b(Therefore,)28 b(an)f(alias)150 2391 y(de\014nition)36 +b(app)s(earing)h(on)f(the)h(same)g(line)g(as)g(another)g(command)f(do)s +(es)g(not)h(tak)m(e)i(e\013ect)f(un)m(til)f(the)150 2501 +y(next)i(line)g(of)g(input)f(is)h(read.)66 b(The)38 b(commands)h(follo) +m(wing)h(the)f(alias)h(de\014nition)e(on)h(that)g(line)h(are)150 +2610 y(not)33 b(a\013ected)h(b)m(y)f(the)g(new)f(alias.)49 +b(This)32 b(b)s(eha)m(vior)h(is)g(also)g(an)g(issue)g(when)e(functions) +i(are)g(executed.)150 2720 y(Aliases)c(are)g(expanded)e(when)g(a)i +(function)e(de\014nition)h(is)g(read,)h(not)f(when)g(the)g(function)g +(is)g(executed,)150 2830 y(b)s(ecause)36 b(a)h(function)f(de\014nition) +f(is)i(itself)g(a)f(command.)58 b(As)36 b(a)h(consequence,)h(aliases)g +(de\014ned)d(in)h(a)150 2939 y(function)28 b(are)h(not)g(a)m(v)-5 +b(ailable)31 b(un)m(til)e(after)g(that)g(function)f(is)g(executed.)41 +b(T)-8 b(o)29 b(b)s(e)f(safe,)i(alw)m(a)m(ys)g(put)e(alias)150 +3049 y(de\014nitions)i(on)g(a)h(separate)g(line,)g(and)f(do)g(not)h +(use)f Ft(alias)f Fu(in)h(comp)s(ound)f(commands.)275 +3188 y(F)-8 b(or)31 b(almost)g(ev)m(ery)g(purp)s(ose,)e(shell)i +(functions)f(are)g(preferred)g(o)m(v)m(er)h(aliases.)150 +3437 y Fs(6.7)68 b(Arra)l(ys)150 3596 y Fu(Bash)33 b(pro)m(vides)g +(one-dimensional)g(indexed)f(and)h(asso)s(ciativ)m(e)i(arra)m(y)e(v)-5 +b(ariables.)49 b(An)m(y)33 b(v)-5 b(ariable)33 b(ma)m(y)150 +3706 y(b)s(e)e(used)h(as)g(an)g(indexed)f(arra)m(y;)j(the)e +Ft(declare)e Fu(builtin)h(will)i(explicitly)g(declare)g(an)f(arra)m(y) +-8 b(.)46 b(There)32 b(is)150 3815 y(no)h(maxim)m(um)g(limit)h(on)f +(the)g(size)h(of)g(an)f(arra)m(y)-8 b(,)35 b(nor)d(an)m(y)i(requiremen) +m(t)f(that)h(mem)m(b)s(ers)e(b)s(e)g(indexed)150 3925 +y(or)26 b(assigned)h(con)m(tiguously)-8 b(.)41 b(Indexed)25 +b(arra)m(ys)i(are)f(referenced)g(using)g(in)m(tegers)i(\(including)e +(arithmetic)150 4034 y(expressions)38 b(\(see)h(Section)g(6.5)h([Shell) +e(Arithmetic],)k(page)d(93\)\))h(and)d(are)i(zero-based;)k(asso)s +(ciativ)m(e)150 4144 y(arra)m(ys)37 b(use)f(arbitrary)g(strings.)59 +b(Unless)36 b(otherwise)h(noted,)h(indexed)e(arra)m(y)h(indices)f(m)m +(ust)g(b)s(e)g(non-)150 4254 y(negativ)m(e)d(in)m(tegers.)275 +4393 y(An)26 b(indexed)h(arra)m(y)h(is)f(created)h(automatically)j(if)c +(an)m(y)g(v)-5 b(ariable)28 b(is)g(assigned)f(to)h(using)f(the)g(syn)m +(tax)390 4533 y Fj(name)p Ft([)p Fj(subscript)p Ft(]=)p +Fj(value)150 4672 y Fu(The)34 b Fr(subscript)h Fu(is)g(treated)g(as)g +(an)f(arithmetic)i(expression)e(that)h(m)m(ust)g(ev)-5 +b(aluate)36 b(to)f(a)g(n)m(um)m(b)s(er.)51 b(T)-8 b(o)150 +4782 y(explicitly)32 b(declare)f(an)g(arra)m(y)-8 b(,)31 +b(use)390 4921 y Ft(declare)46 b(-a)h Fj(name)150 5061 +y Fu(The)30 b(syn)m(tax)390 5200 y Ft(declare)46 b(-a)h +Fj(name)p Ft([)p Fj(subscript)p Ft(])150 5340 y Fu(is)30 +b(also)i(accepted;)g(the)e Fr(subscript)h Fu(is)g(ignored.)p +eop end +%%Page: 96 102 +TeXDict begin 96 101 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(96)150 299 y(Asso)s(ciativ)m(e)33 +b(arra)m(ys)d(are)h(created)h(using)390 427 y Ft(declare)46 +b(-A)h Fj(name)275 555 y Fu(A)m(ttributes)f(ma)m(y)h(b)s(e)e(sp)s +(eci\014ed)g(for)h(an)g(arra)m(y)g(v)-5 b(ariable)47 +b(using)e(the)h Ft(declare)e Fu(and)h Ft(readonly)150 +664 y Fu(builtins.)40 b(Eac)m(h)31 b(attribute)g(applies)g(to)g(all)g +(mem)m(b)s(ers)f(of)g(an)h(arra)m(y)-8 b(.)275 792 y(Arra)m(ys)30 +b(are)h(assigned)f(to)h(using)f(comp)s(ound)f(assignmen)m(ts)i(of)g +(the)f(form)390 920 y Fj(name)p Ft(=\()p Fj(value1)44 +b(value2)j Ft(...)f(\))150 1048 y Fu(where)33 b(eac)m(h)i +Fr(v)-5 b(alue)40 b Fu(ma)m(y)34 b(b)s(e)g(of)g(the)g(form)f +Ft([)p Fj(subscript)p Ft(]=)p Fr(string)p Fu(.)48 b(Indexed)33 +b(arra)m(y)h(assignmen)m(ts)h(do)150 1157 y(not)26 b(require)f(an)m +(ything)g(but)g Fr(string)p Fu(.)39 b(When)25 b(assigning)h(to)g +(indexed)f(arra)m(ys,)i(if)e(the)h(optional)g(subscript)150 +1267 y(is)h(supplied,)f(that)h(index)g(is)f(assigned)h(to;)i(otherwise) +e(the)g(index)g(of)f(the)h(elemen)m(t)i(assigned)d(is)h(the)g(last)150 +1377 y(index)j(assigned)h(to)g(b)m(y)f(the)g(statemen)m(t)j(plus)c +(one.)41 b(Indexing)30 b(starts)h(at)g(zero.)275 1504 +y(Eac)m(h)26 b Fr(v)-5 b(alue)32 b Fu(in)26 b(the)h(list)g(undergo)s +(es)e(all)i(the)g(shell)f(expansions)g(describ)s(ed)f(ab)s(o)m(v)m(e)j +(\(see)f(Section)g(3.5)150 1614 y([Shell)j(Expansions],)h(page)g(22\).) +275 1742 y(When)k(assigning)i(to)g(an)f(asso)s(ciativ)m(e)i(arra)m(y)-8 +b(,)39 b(the)d(w)m(ords)f(in)h(a)h(comp)s(ound)d(assignmen)m(t)j(ma)m +(y)g(b)s(e)150 1851 y(either)31 b(assignmen)m(t)h(statemen)m(ts,)h(for) +e(whic)m(h)g(the)g(subscript)f(is)h(required,)g(or)g(a)g(list)h(of)f(w) +m(ords)f(that)i(is)150 1961 y(in)m(terpreted)g(as)g(a)g(sequence)f(of)h +(alternating)h(k)m(eys)f(and)f(v)-5 b(alues:)44 b Fr(name)5 +b Fu(=\()p Fr(k)m(ey1)40 b(v)-5 b(alue1)40 b(k)m(ey2)g(v)-5 +b(alue2)156 2071 y Fu(.)22 b(.)g(.)47 b(\).)57 b(These)35 +b(are)i(treated)f(iden)m(tically)i(to)e Fr(name)5 b Fu(=\()36 +b([)p Fr(k)m(ey1)7 b Fu(]=)p Fr(v)-5 b(alue1)46 b Fu([)p +Fr(k)m(ey2)7 b Fu(]=)p Fr(v)-5 b(alue2)51 b Fu(.)22 b(.)h(.)46 +b(\).)57 b(The)150 2180 y(\014rst)25 b(w)m(ord)f(in)h(the)h(list)g +(determines)f(ho)m(w)g(the)h(remaining)f(w)m(ords)g(are)h(in)m +(terpreted;)h(all)f(assignmen)m(ts)g(in)150 2290 y(a)31 +b(list)f(m)m(ust)h(b)s(e)e(of)h(the)h(same)f(t)m(yp)s(e.)41 +b(When)30 b(using)g(k)m(ey/v)-5 b(alue)32 b(pairs,)e(the)g(k)m(eys)h +(ma)m(y)g(not)f(b)s(e)g(missing)150 2399 y(or)g(empt)m(y;)h(a)g +(\014nal)f(missing)g(v)-5 b(alue)31 b(is)g(treated)g(lik)m(e)h(the)e +(empt)m(y)h(string.)275 2527 y(This)f(syn)m(tax)j(is)e(also)i(accepted) +g(b)m(y)f(the)f Ft(declare)f Fu(builtin.)44 b(Individual)31 +b(arra)m(y)h(elemen)m(ts)h(ma)m(y)g(b)s(e)150 2637 y(assigned)e(to)g +(using)f(the)g Fj(name)p Ft([)p Fj(subscript)p Ft(]=)p +Fj(value)25 b Fu(syn)m(tax)31 b(in)m(tro)s(duced)e(ab)s(o)m(v)m(e.)275 +2765 y(When)h(assigning)h(to)h(an)e(indexed)g(arra)m(y)-8 +b(,)32 b(if)f Fr(name)36 b Fu(is)31 b(subscripted)e(b)m(y)i(a)g +(negativ)m(e)i(n)m(um)m(b)s(er,)c(that)150 2874 y(n)m(um)m(b)s(er)43 +b(is)h(in)m(terpreted)h(as)f(relativ)m(e)j(to)e(one)f(greater)i(than)e +(the)g(maxim)m(um)g(index)g(of)h Fr(name)p Fu(,)j(so)150 +2984 y(negativ)m(e)30 b(indices)d(coun)m(t)h(bac)m(k)g(from)f(the)g +(end)g(of)g(the)h(arra)m(y)-8 b(,)29 b(and)e(an)g(index)g(of)g(-1)h +(references)g(the)f(last)150 3093 y(elemen)m(t.)275 3221 +y(An)m(y)h(elemen)m(t)h(of)g(an)f(arra)m(y)g(ma)m(y)h(b)s(e)f +(referenced)g(using)g Ft(${)p Fj(name)p Ft([)p Fj(subscript)p +Ft(]})p Fu(.)35 b(The)27 b(braces)i(are)150 3331 y(required)f(to)j(a)m +(v)m(oid)f(con\015icts)g(with)f(the)h(shell's)f(\014lename)h(expansion) +f(op)s(erators.)41 b(If)28 b(the)i Fr(subscript)g Fu(is)150 +3440 y(`)p Ft(@)p Fu(')f(or)h(`)p Ft(*)p Fu(',)f(the)h(w)m(ord)f +(expands)f(to)i(all)g(mem)m(b)s(ers)e(of)i(the)f(arra)m(y)h +Fr(name)p Fu(.)40 b(These)29 b(subscripts)f(di\013er)h(only)150 +3550 y(when)36 b(the)g(w)m(ord)g(app)s(ears)g(within)g(double)g +(quotes.)60 b(If)36 b(the)h(w)m(ord)f(is)g(double-quoted,)j +Ft(${)p Fj(name)p Ft([*]})150 3660 y Fu(expands)25 b(to)h(a)g(single)h +(w)m(ord)e(with)g(the)h(v)-5 b(alue)26 b(of)g(eac)m(h)h(arra)m(y)f(mem) +m(b)s(er)f(separated)h(b)m(y)g(the)f(\014rst)g(c)m(harac-)150 +3769 y(ter)j(of)g(the)h Ft(IFS)e Fu(v)-5 b(ariable,)29 +b(and)f Ft(${)p Fj(name)p Ft([@]})d Fu(expands)i(eac)m(h)i(elemen)m(t)h +(of)e Fr(name)33 b Fu(to)c(a)f(separate)h(w)m(ord.)150 +3879 y(When)j(there)h(are)f(no)g(arra)m(y)h(mem)m(b)s(ers,)f +Ft(${)p Fj(name)p Ft([@]})e Fu(expands)h(to)i(nothing.)47 +b(If)31 b(the)i(double-quoted)150 3988 y(expansion)39 +b(o)s(ccurs)h(within)f(a)h(w)m(ord,)i(the)d(expansion)h(of)g(the)f +(\014rst)g(parameter)h(is)g(joined)f(with)h(the)150 4098 +y(b)s(eginning)29 b(part)g(of)h(the)f(original)i(w)m(ord,)e(and)g(the)h +(expansion)f(of)h(the)f(last)i(parameter)e(is)h(joined)f(with)150 +4208 y(the)g(last)h(part)f(of)g(the)g(original)h(w)m(ord.)40 +b(This)28 b(is)h(analogous)h(to)f(the)h(expansion)e(of)h(the)g(sp)s +(ecial)h(param-)150 4317 y(eters)g(`)p Ft(@)p Fu(')f(and)g(`)p +Ft(*)p Fu('.)41 b Ft(${#)p Fj(name)p Ft([)p Fj(subscript)p +Ft(]})24 b Fu(expands)k(to)i(the)g(length)g(of)f Ft(${)p +Fj(name)p Ft([)p Fj(subscript)p Ft(]})p Fu(.)35 b(If)150 +4427 y Fr(subscript)28 b Fu(is)g(`)p Ft(@)p Fu(')f(or)h(`)p +Ft(*)p Fu(',)g(the)g(expansion)f(is)g(the)h(n)m(um)m(b)s(er)e(of)i +(elemen)m(ts)g(in)f(the)h(arra)m(y)-8 b(.)41 b(If)27 +b(the)g Fr(subscript)150 4536 y Fu(used)34 b(to)h(reference)g(an)f +(elemen)m(t)i(of)f(an)f(indexed)g(arra)m(y)h(ev)-5 b(aluates)36 +b(to)f(a)g(n)m(um)m(b)s(er)e(less)i(than)f(zero,)i(it)150 +4646 y(is)c(in)m(terpreted)h(as)f(relativ)m(e)i(to)f(one)f(greater)h +(than)f(the)h(maxim)m(um)f(index)f(of)h(the)h(arra)m(y)-8 +b(,)33 b(so)g(negativ)m(e)150 4756 y(indices)d(coun)m(t)h(bac)m(k)h +(from)e(the)g(end)g(of)g(the)h(arra)m(y)-8 b(,)31 b(and)f(an)g(index)g +(of)h(-1)g(refers)f(to)h(the)g(last)g(elemen)m(t.)275 +4883 y(Referencing)41 b(an)f(arra)m(y)h(v)-5 b(ariable)42 +b(without)e(a)h(subscript)e(is)i(equiv)-5 b(alen)m(t)42 +b(to)f(referencing)g(with)g(a)150 4993 y(subscript)35 +b(of)h(0.)57 b(An)m(y)36 b(reference)g(to)h(a)f(v)-5 +b(ariable)36 b(using)g(a)g(v)-5 b(alid)36 b(subscript)f(is)h(legal,)j +(and)c Ft(bash)g Fu(will)150 5103 y(create)d(an)e(arra)m(y)h(if)f +(necessary)-8 b(.)275 5230 y(An)35 b(arra)m(y)i(v)-5 +b(ariable)37 b(is)g(considered)f(set)h(if)f(a)h(subscript)e(has)h(b)s +(een)g(assigned)g(a)h(v)-5 b(alue.)59 b(The)36 b(n)m(ull)150 +5340 y(string)30 b(is)h(a)g(v)-5 b(alid)30 b(v)-5 b(alue.)p +eop end +%%Page: 97 103 +TeXDict begin 97 102 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(97)275 299 y(It)29 +b(is)h(p)s(ossible)f(to)h(obtain)g(the)f(k)m(eys)i(\(indices\))f(of)f +(an)h(arra)m(y)g(as)f(w)m(ell)i(as)f(the)f(v)-5 b(alues.)41 +b($)p Fi({)p Fu(!)p Fr(name)5 b Fu([@])p Fi(})150 408 +y Fu(and)39 b($)p Fi({)p Fu(!)p Fr(name)5 b Fu([*])p +Fi(})43 b Fu(expand)c(to)i(the)f(indices)h(assigned)f(in)g(arra)m(y)g +(v)-5 b(ariable)41 b Fr(name)p Fu(.)70 b(The)39 b(treatmen)m(t)150 +518 y(when)i(in)g(double)g(quotes)h(is)f(similar)h(to)h(the)e +(expansion)h(of)f(the)h(sp)s(ecial)g(parameters)g(`)p +Ft(@)p Fu(')g(and)f(`)p Ft(*)p Fu(')150 628 y(within)30 +b(double)g(quotes.)275 759 y(The)25 b Ft(unset)g Fu(builtin)g(is)h +(used)f(to)i(destro)m(y)f(arra)m(ys.)40 b Ft(unset)29 +b Fj(name)p Ft([)p Fj(subscript)p Ft(])22 b Fu(destro)m(ys)k(the)g +(arra)m(y)150 868 y(elemen)m(t)40 b(at)e(index)g Fr(subscript)p +Fu(.)62 b(Negativ)m(e)41 b(subscripts)c(to)i(indexed)e(arra)m(ys)i(are) +f(in)m(terpreted)h(as)f(de-)150 978 y(scrib)s(ed)30 b(ab)s(o)m(v)m(e.) +42 b(Unsetting)31 b(the)g(last)g(elemen)m(t)h(of)f(an)g(arra)m(y)g(v)-5 +b(ariable)31 b(do)s(es)f(not)h(unset)f(the)h(v)-5 b(ariable.)150 +1087 y Ft(unset)29 b Fj(name)p Fu(,)e(where)h Fr(name)33 +b Fu(is)28 b(an)g(arra)m(y)-8 b(,)30 b(remo)m(v)m(es)f(the)f(en)m(tire) +h(arra)m(y)-8 b(.)41 b(A)28 b(subscript)f(of)h(`)p Ft(*)p +Fu(')g(or)g(`)p Ft(@)p Fu(')g(also)150 1197 y(remo)m(v)m(es)k(the)e(en) +m(tire)i(arra)m(y)-8 b(.)275 1328 y(When)35 b(using)g(a)i(v)-5 +b(ariable)36 b(name)g(with)g(a)g(subscript)e(as)i(an)g(argumen)m(t)g +(to)h(a)f(command,)h(suc)m(h)f(as)150 1438 y(with)k Ft(unset)p +Fu(,)h(without)e(using)h(the)g(w)m(ord)f(expansion)h(syn)m(tax)g +(describ)s(ed)f(ab)s(o)m(v)m(e,)44 b(the)c(argumen)m(t)g(is)150 +1547 y(sub)5 b(ject)25 b(to)h(the)g(shell's)g(\014lename)f(expansion.) +39 b(If)25 b(\014lename)h(expansion)f(is)g(not)h(desired,)g(the)f +(argumen)m(t)150 1657 y(should)k(b)s(e)h(quoted.)275 +1788 y(The)20 b Ft(declare)p Fu(,)h Ft(local)p Fu(,)h(and)e +Ft(readonly)f Fu(builtins)h(eac)m(h)i(accept)g(a)g Ft(-a)e +Fu(option)h(to)h(sp)s(ecify)f(an)f(indexed)150 1897 y(arra)m(y)28 +b(and)f(a)h Ft(-A)e Fu(option)i(to)g(sp)s(ecify)f(an)h(asso)s(ciativ)m +(e)i(arra)m(y)-8 b(.)40 b(If)27 b(b)s(oth)g(options)h(are)g(supplied,)f +Ft(-A)f Fu(tak)m(es)150 2007 y(precedence.)55 b(The)35 +b Ft(read)f Fu(builtin)h(accepts)h(a)g Ft(-a)e Fu(option)i(to)g(assign) +f(a)g(list)h(of)f(w)m(ords)g(read)g(from)g(the)150 2116 +y(standard)h(input)g(to)i(an)f(arra)m(y)-8 b(,)40 b(and)c(can)h(read)g +(v)-5 b(alues)38 b(from)e(the)h(standard)g(input)f(in)m(to)i +(individual)150 2226 y(arra)m(y)f(elemen)m(ts.)62 b(The)36 +b Ft(set)g Fu(and)h Ft(declare)d Fu(builtins)j(displa)m(y)g(arra)m(y)g +(v)-5 b(alues)37 b(in)g(a)g(w)m(a)m(y)h(that)g(allo)m(ws)150 +2336 y(them)30 b(to)h(b)s(e)f(reused)g(as)g(input.)150 +2569 y Fs(6.8)68 b(The)45 b(Directory)g(Stac)l(k)150 +2729 y Fu(The)21 b(directory)h(stac)m(k)h(is)e(a)h(list)g(of)f(recen)m +(tly-visited)j(directories.)39 b(The)20 b Ft(pushd)g +Fu(builtin)h(adds)g(directories)150 2838 y(to)42 b(the)f(stac)m(k)i(as) +e(it)h(c)m(hanges)g(the)f(curren)m(t)g(directory)-8 b(,)45 +b(and)40 b(the)i Ft(popd)e Fu(builtin)g(remo)m(v)m(es)j(sp)s(eci\014ed) +150 2948 y(directories)29 b(from)f(the)h(stac)m(k)h(and)d(c)m(hanges)j +(the)e(curren)m(t)g(directory)h(to)g(the)g(directory)f(remo)m(v)m(ed.) +41 b(The)150 3058 y Ft(dirs)34 b Fu(builtin)g(displa)m(ys)h(the)g(con)m +(ten)m(ts)i(of)e(the)g(directory)h(stac)m(k.)56 b(The)34 +b(curren)m(t)h(directory)g(is)g(alw)m(a)m(ys)150 3167 +y(the)c Ft(")p Fu(top)p Ft(")f Fu(of)g(the)h(directory)g(stac)m(k.)275 +3298 y(The)k(con)m(ten)m(ts)i(of)f(the)h(directory)f(stac)m(k)h(are)f +(also)h(visible)g(as)f(the)g(v)-5 b(alue)36 b(of)g(the)g +Ft(DIRSTACK)e Fu(shell)150 3408 y(v)-5 b(ariable.)150 +3600 y Fk(6.8.1)63 b(Directory)40 b(Stac)m(k)g(Builtins)150 +3768 y Ft(dirs)870 3899 y(dirs)47 b([-clpv])e([+)p Fj(N)i +Ft(|)h(-)p Fj(N)p Ft(])630 4030 y Fu(Displa)m(y)35 b(the)f(list)g(of)g +(curren)m(tly)g(remem)m(b)s(ered)f(directories.)51 b(Directories)36 +b(are)e(added)f(to)630 4140 y(the)28 b(list)h(with)f(the)g +Ft(pushd)f Fu(command;)i(the)f Ft(popd)f Fu(command)h(remo)m(v)m(es)h +(directories)g(from)630 4249 y(the)i(list.)41 b(The)30 +b(curren)m(t)g(directory)h(is)f(alw)m(a)m(ys)i(the)f(\014rst)e +(directory)i(in)f(the)h(stac)m(k.)630 4402 y Ft(-c)384 +b Fu(Clears)31 b(the)f(directory)h(stac)m(k)h(b)m(y)e(deleting)h(all)h +(of)e(the)h(elemen)m(ts.)630 4554 y Ft(-l)384 b Fu(Pro)s(duces)31 +b(a)h(listing)h(using)e(full)h(pathnames;)h(the)f(default)g(listing)h +(format)1110 4664 y(uses)d(a)h(tilde)g(to)g(denote)g(the)f(home)h +(directory)-8 b(.)630 4816 y Ft(-p)384 b Fu(Causes)30 +b Ft(dirs)f Fu(to)i(prin)m(t)f(the)h(directory)g(stac)m(k)h(with)e(one) +g(en)m(try)h(p)s(er)e(line.)630 4968 y Ft(-v)384 b Fu(Causes)36 +b Ft(dirs)f Fu(to)i(prin)m(t)f(the)g(directory)h(stac)m(k)h(with)e(one) +h(en)m(try)f(p)s(er)f(line,)1110 5078 y(pre\014xing)30 +b(eac)m(h)h(en)m(try)g(with)f(its)h(index)e(in)i(the)f(stac)m(k.)630 +5230 y Ft(+)p Fj(N)384 b Fu(Displa)m(ys)23 b(the)f Fr(N)10 +b Fu(th)21 b(directory)h(\(coun)m(ting)h(from)e(the)h(left)g(of)g(the)g +(list)g(prin)m(ted)1110 5340 y(b)m(y)30 b Ft(dirs)f Fu(when)h(in)m(v)m +(ok)m(ed)i(without)e(options\),)h(starting)g(with)g(zero.)p +eop end +%%Page: 98 104 +TeXDict begin 98 103 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(98)630 299 y Ft(-)p +Fj(N)384 b Fu(Displa)m(ys)47 b(the)g Fr(N)10 b Fu(th)46 +b(directory)h(\(coun)m(ting)g(from)f(the)g(righ)m(t)h(of)g(the)f(list) +1110 408 y(prin)m(ted)25 b(b)m(y)g Ft(dirs)g Fu(when)f(in)m(v)m(ok)m +(ed)j(without)f(options\),)h(starting)g(with)e(zero.)150 +583 y Ft(popd)870 725 y(popd)47 b([-n])f([+)p Fj(N)h +Ft(|)h(-)p Fj(N)p Ft(])630 867 y Fu(When)32 b(no)g(argumen)m(ts)h(are)g +(giv)m(en,)h Ft(popd)d Fu(remo)m(v)m(es)j(the)f(top)f(directory)h(from) +f(the)g(stac)m(k)630 977 y(and)f(p)s(erforms)e(a)j Ft(cd)f +Fu(to)h(the)f(new)g(top)h(directory)-8 b(.)44 b(The)31 +b(elemen)m(ts)i(are)e(n)m(um)m(b)s(ered)f(from)630 1086 +y(0)j(starting)g(at)g(the)f(\014rst)g(directory)g(listed)h(with)f +Ft(dirs)p Fu(;)g(that)h(is,)g Ft(popd)e Fu(is)i(equiv)-5 +b(alen)m(t)33 b(to)630 1196 y Ft(popd)c(+0)p Fu(.)630 +1370 y Ft(-n)384 b Fu(Suppresses)27 b(the)j(normal)g(c)m(hange)g(of)g +(directory)g(when)e(remo)m(ving)j(directo-)1110 1480 +y(ries)f(from)g(the)h(stac)m(k,)h(so)f(that)g(only)f(the)h(stac)m(k)g +(is)g(manipulated.)630 1655 y Ft(+)p Fj(N)384 b Fu(Remo)m(v)m(es)22 +b(the)f Fr(N)10 b Fu(th)20 b(directory)g(\(coun)m(ting)i(from)e(the)g +(left)h(of)g(the)f(list)h(prin)m(ted)1110 1764 y(b)m(y)30 +b Ft(dirs)p Fu(\),)g(starting)h(with)f(zero.)630 1939 +y Ft(-)p Fj(N)384 b Fu(Remo)m(v)m(es)46 b(the)g Fr(N)10 +b Fu(th)44 b(directory)h(\(coun)m(ting)h(from)f(the)g(righ)m(t)g(of)g +(the)g(list)1110 2048 y(prin)m(ted)30 b(b)m(y)g Ft(dirs)p +Fu(\),)g(starting)h(with)f(zero.)150 2223 y Ft(pushd)870 +2365 y(pushd)46 b([-n])h([+)p Fj(N)g Ft(|)g Fj(-N)h Ft(|)f +Fj(dir)p Ft(])630 2507 y Fu(Sa)m(v)m(e)30 b(the)e(curren)m(t)g +(directory)h(on)f(the)h(top)f(of)h(the)f(directory)h(stac)m(k)h(and)e +(then)g Ft(cd)f Fu(to)i Fr(dir)p Fu(.)630 2617 y(With)39 +b(no)f(argumen)m(ts,)j Ft(pushd)c Fu(exc)m(hanges)j(the)f(top)f(t)m(w)m +(o)i(directories)g(and)d(mak)m(es)j(the)630 2726 y(new)30 +b(top)g(the)h(curren)m(t)f(directory)-8 b(.)630 2901 +y Ft(-n)384 b Fu(Suppresses)24 b(the)j(normal)f(c)m(hange)h(of)g +(directory)f(when)g(rotating)h(or)f(adding)1110 3010 +y(directories)31 b(to)h(the)e(stac)m(k,)i(so)f(that)g(only)f(the)h +(stac)m(k)h(is)e(manipulated.)630 3185 y Ft(+)p Fj(N)384 +b Fu(Brings)29 b(the)f Fr(N)10 b Fu(th)29 b(directory)g(\(coun)m(ting)h +(from)e(the)g(left)i(of)e(the)h(list)g(prin)m(ted)1110 +3295 y(b)m(y)34 b Ft(dirs)p Fu(,)g(starting)h(with)f(zero\))i(to)f(the) +f(top)g(of)h(the)f(list)h(b)m(y)f(rotating)i(the)1110 +3404 y(stac)m(k.)630 3579 y Ft(-)p Fj(N)384 b Fu(Brings)23 +b(the)g Fr(N)10 b Fu(th)23 b(directory)h(\(coun)m(ting)g(from)e(the)i +(righ)m(t)f(of)g(the)h(list)f(prin)m(ted)1110 3688 y(b)m(y)34 +b Ft(dirs)p Fu(,)g(starting)h(with)f(zero\))i(to)f(the)f(top)g(of)h +(the)f(list)h(b)m(y)f(rotating)i(the)1110 3798 y(stac)m(k.)630 +3972 y Fj(dir)336 b Fu(Mak)m(es)28 b Fr(dir)33 b Fu(b)s(e)27 +b(the)g(top)g(of)g(the)h(stac)m(k,)h(making)e(it)h(the)f(new)g(curren)m +(t)g(direc-)1110 4082 y(tory)k(as)f(if)h(it)g(had)e(b)s(een)h(supplied) +f(as)i(an)f(argumen)m(t)h(to)g(the)f Ft(cd)g Fu(builtin.)150 +4345 y Fs(6.9)68 b(Con)l(trolling)47 b(the)e(Prompt)150 +4505 y Fu(Bash)33 b(examines)h(the)f(v)-5 b(alue)33 b(of)h(the)f(arra)m +(y)g(v)-5 b(ariable)34 b Ft(PROMPT_COMMANDS)29 b Fu(just)j(b)s(efore)h +(prin)m(ting)g(eac)m(h)150 4614 y(primary)c(prompt.)40 +b(If)30 b(an)m(y)g(elemen)m(ts)i(in)e Ft(PROMPT_COMMANDS)c +Fu(are)31 b(set)f(and)g(non-n)m(ull,)g(Bash)h(executes)150 +4724 y(eac)m(h)h(v)-5 b(alue,)31 b(in)f(n)m(umeric)g(order,)g(just)g +(as)g(if)h(it)g(had)e(b)s(een)h(t)m(yp)s(ed)g(on)g(the)h(command)f +(line.)275 4874 y(In)d(addition,)j(the)f(follo)m(wing)h(table)f +(describ)s(es)f(the)h(sp)s(ecial)g(c)m(haracters)h(whic)m(h)f(can)f +(app)s(ear)g(in)h(the)150 4983 y(prompt)g(v)-5 b(ariables)32 +b Ft(PS0)p Fu(,)d Ft(PS1)p Fu(,)h Ft(PS2)p Fu(,)g(and)f +Ft(PS4)p Fu(:)150 5165 y Ft(\\a)384 b Fu(A)30 b(b)s(ell)h(c)m +(haracter.)150 5340 y Ft(\\d)384 b Fu(The)30 b(date,)h(in)f +Ft(")p Fu(W)-8 b(eekda)m(y)32 b(Mon)m(th)f(Date)p Ft(")h +Fu(format)f(\(e.g.,)h Ft(")p Fu(T)-8 b(ue)30 b(Ma)m(y)h(26)p +Ft(")p Fu(\).)p eop end +%%Page: 99 105 +TeXDict begin 99 104 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2484 b(99)150 299 y Ft(\\D{)p +Fj(format)p Ft(})630 408 y Fu(The)27 b Fr(format)i Fu(is)f(passed)e(to) +i Ft(strftime)p Fu(\(3\))f(and)f(the)i(result)f(is)g(inserted)g(in)m +(to)h(the)g(prompt)630 518 y(string;)42 b(an)d(empt)m(y)f +Fr(format)j Fu(results)d(in)g(a)h(lo)s(cale-sp)s(eci\014c)h(time)f +(represen)m(tation.)65 b(The)630 628 y(braces)31 b(are)f(required.)150 +790 y Ft(\\e)384 b Fu(An)30 b(escap)s(e)h(c)m(haracter.)150 +952 y Ft(\\h)384 b Fu(The)30 b(hostname,)h(up)e(to)i(the)g(\014rst)e +(`.'.)150 1114 y Ft(\\H)384 b Fu(The)30 b(hostname.)150 +1276 y Ft(\\j)384 b Fu(The)30 b(n)m(um)m(b)s(er)f(of)h(jobs)g(curren)m +(tly)h(managed)g(b)m(y)f(the)g(shell.)150 1438 y Ft(\\l)384 +b Fu(The)30 b(basename)h(of)f(the)h(shell's)f(terminal)h(device)g +(name.)150 1600 y Ft(\\n)384 b Fu(A)30 b(newline.)150 +1763 y Ft(\\r)384 b Fu(A)30 b(carriage)i(return.)150 +1925 y Ft(\\s)384 b Fu(The)22 b(name)g(of)h(the)f(shell,)i(the)f +(basename)f(of)h Ft($0)f Fu(\(the)g(p)s(ortion)g(follo)m(wing)i(the)f +(\014nal)e(slash\).)150 2087 y Ft(\\t)384 b Fu(The)30 +b(time,)h(in)f(24-hour)h(HH:MM:SS)g(format.)150 2249 +y Ft(\\T)384 b Fu(The)30 b(time,)h(in)f(12-hour)h(HH:MM:SS)g(format.) +150 2411 y Ft(\\@)384 b Fu(The)30 b(time,)h(in)f(12-hour)h(am/pm)f +(format.)150 2573 y Ft(\\A)384 b Fu(The)30 b(time,)h(in)f(24-hour)h +(HH:MM)g(format.)150 2735 y Ft(\\u)384 b Fu(The)30 b(username)g(of)g +(the)h(curren)m(t)f(user.)150 2898 y Ft(\\v)384 b Fu(The)30 +b(v)m(ersion)h(of)f(Bash)h(\(e.g.,)h(2.00\))150 3060 +y Ft(\\V)384 b Fu(The)30 b(release)i(of)e(Bash,)h(v)m(ersion)g +Ft(+)f Fu(patc)m(hlev)m(el)i(\(e.g.,)h(2.00.0\))150 3222 +y Ft(\\w)384 b Fu(The)34 b(curren)m(t)h(w)m(orking)g(directory)-8 +b(,)37 b(with)e Ft($HOME)e Fu(abbreviated)j(with)e(a)h(tilde)h(\(uses)f +(the)630 3331 y Ft($PROMPT_DIRTRIM)26 b Fu(v)-5 b(ariable\).)150 +3494 y Ft(\\W)384 b Fu(The)30 b(basename)h(of)f Ft($PWD)p +Fu(,)g(with)g Ft($HOME)f Fu(abbreviated)h(with)g(a)h(tilde.)150 +3656 y Ft(\\!)384 b Fu(The)30 b(history)g(n)m(um)m(b)s(er)f(of)i(this)f +(command.)150 3818 y Ft(\\#)384 b Fu(The)30 b(command)g(n)m(um)m(b)s +(er)f(of)i(this)f(command.)150 3980 y Ft(\\$)384 b Fu(If)30 +b(the)g(e\013ectiv)m(e)j(uid)d(is)g(0,)h Ft(#)p Fu(,)g(otherwise)g +Ft($)p Fu(.)150 4142 y Ft(\\)p Fj(nnn)288 b Fu(The)30 +b(c)m(haracter)i(whose)e(ASCI)s(I)f(co)s(de)h(is)h(the)f(o)s(ctal)i(v) +-5 b(alue)31 b Fr(nnn)p Fu(.)150 4304 y Ft(\\\\)384 b +Fu(A)30 b(bac)m(kslash.)150 4466 y Ft(\\[)384 b Fu(Begin)38 +b(a)f(sequence)g(of)g(non-prin)m(ting)g(c)m(haracters.)61 +b(This)36 b(could)h(b)s(e)g(used)f(to)h(em)m(b)s(ed)g(a)630 +4576 y(terminal)31 b(con)m(trol)h(sequence)e(in)m(to)i(the)e(prompt.) +150 4738 y Ft(\\])384 b Fu(End)29 b(a)i(sequence)g(of)f(non-prin)m +(ting)g(c)m(haracters.)275 4902 y(The)25 b(command)h(n)m(um)m(b)s(er)f +(and)h(the)g(history)g(n)m(um)m(b)s(er)f(are)i(usually)f(di\013eren)m +(t:)39 b(the)26 b(history)g(n)m(um)m(b)s(er)150 5011 +y(of)h(a)f(command)h(is)f(its)h(p)s(osition)f(in)g(the)h(history)f +(list,)i(whic)m(h)f(ma)m(y)g(include)f(commands)g(restored)g(from)150 +5121 y(the)39 b(history)h(\014le)f(\(see)h(Section)g(9.1)h([Bash)e +(History)h(F)-8 b(acilities],)45 b(page)40 b(146\),)j(while)d(the)f +(command)150 5230 y(n)m(um)m(b)s(er)j(is)h(the)h(p)s(osition)f(in)g +(the)g(sequence)h(of)f(commands)g(executed)h(during)e(the)i(curren)m(t) +f(shell)150 5340 y(session.)p eop end +%%Page: 100 106 +TeXDict begin 100 105 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2439 b(100)275 299 y(After)28 +b(the)g(string)g(is)g(deco)s(ded,)g(it)g(is)g(expanded)f(via)i +(parameter)f(expansion,)h(command)f(substitu-)150 408 +y(tion,)g(arithmetic)f(expansion,)g(and)e(quote)i(remo)m(v)-5 +b(al,)29 b(sub)5 b(ject)25 b(to)i(the)f(v)-5 b(alue)27 +b(of)f(the)g Ft(promptvars)e Fu(shell)150 518 y(option)i(\(see)h +(Section)g(4.3.2)g([The)f(Shopt)f(Builtin],)j(page)e(66\).)41 +b(This)25 b(can)h(ha)m(v)m(e)h(un)m(w)m(an)m(ted)f(side)g(e\013ects)150 +628 y(if)i(escap)s(ed)f(p)s(ortions)g(of)h(the)g(string)f(app)s(ear)g +(within)g(command)h(substitution)f(or)h(con)m(tain)g(c)m(haracters)150 +737 y(sp)s(ecial)j(to)g(w)m(ord)f(expansion.)150 1015 +y Fs(6.10)68 b(The)45 b(Restricted)h(Shell)150 1174 y +Fu(If)34 b(Bash)g(is)g(started)g(with)g(the)g(name)h +Ft(rbash)p Fu(,)e(or)h(the)h Ft(--restricted)30 b Fu(or)k +Ft(-r)g Fu(option)g(is)g(supplied)f(at)150 1284 y(in)m(v)m(o)s(cation,) +d(the)d(shell)g(b)s(ecomes)h(restricted.)40 b(A)27 b(restricted)h +(shell)f(is)g(used)f(to)i(set)f(up)f(an)h(en)m(vironmen)m(t)150 +1393 y(more)g(con)m(trolled)i(than)e(the)g(standard)g(shell.)40 +b(A)27 b(restricted)h(shell)f(b)s(eha)m(v)m(es)h(iden)m(tically)h(to)f +Ft(bash)e Fu(with)150 1503 y(the)31 b(exception)g(that)g(the)g(follo)m +(wing)h(are)e(disallo)m(w)m(ed)i(or)e(not)h(p)s(erformed:)225 +1662 y Fq(\017)60 b Fu(Changing)30 b(directories)h(with)g(the)f +Ft(cd)g Fu(builtin.)225 1809 y Fq(\017)60 b Fu(Setting)33 +b(or)g(unsetting)f(the)h(v)-5 b(alues)33 b(of)f(the)h +Ft(SHELL)p Fu(,)f Ft(PATH)p Fu(,)g Ft(HISTFILE)p Fu(,)f +Ft(ENV)p Fu(,)h(or)g Ft(BASH_ENV)e Fu(v)-5 b(ari-)330 +1919 y(ables.)225 2065 y Fq(\017)60 b Fu(Sp)s(ecifying)30 +b(command)g(names)g(con)m(taining)i(slashes.)225 2212 +y Fq(\017)60 b Fu(Sp)s(ecifying)30 b(a)h(\014lename)f(con)m(taining)i +(a)f(slash)f(as)h(an)f(argumen)m(t)h(to)g(the)f Ft(.)h +Fu(builtin)e(command.)225 2359 y Fq(\017)60 b Fu(Sp)s(ecifying)33 +b(a)i(\014lename)f(con)m(taining)h(a)g(slash)e(as)i(an)e(argumen)m(t)i +(to)g(the)f Ft(history)e Fu(builtin)h(com-)330 2469 y(mand.)225 +2615 y Fq(\017)60 b Fu(Sp)s(ecifying)32 b(a)g(\014lename)h(con)m +(taining)h(a)e(slash)g(as)h(an)f(argumen)m(t)h(to)g(the)f +Ft(-p)g Fu(option)h(to)g(the)f Ft(hash)330 2725 y Fu(builtin)e +(command.)225 2872 y Fq(\017)60 b Fu(Imp)s(orting)30 +b(function)g(de\014nitions)g(from)f(the)i(shell)g(en)m(vironmen)m(t)g +(at)g(startup.)225 3018 y Fq(\017)60 b Fu(P)m(arsing)31 +b(the)f(v)-5 b(alue)31 b(of)g Ft(SHELLOPTS)d Fu(from)h(the)i(shell)g +(en)m(vironmen)m(t)g(at)g(startup.)225 3165 y Fq(\017)60 +b Fu(Redirecting)31 b(output)f(using)g(the)h(`)p Ft(>)p +Fu(',)g(`)p Ft(>|)p Fu(',)f(`)p Ft(<>)p Fu(',)h(`)p Ft(>&)p +Fu(',)f(`)p Ft(&>)p Fu(',)h(and)e(`)p Ft(>>)p Fu(')i(redirection)g(op)s +(erators.)225 3312 y Fq(\017)60 b Fu(Using)31 b(the)f +Ft(exec)f Fu(builtin)h(to)h(replace)h(the)e(shell)h(with)f(another)h +(command.)225 3459 y Fq(\017)60 b Fu(Adding)24 b(or)g(deleting)i +(builtin)e(commands)g(with)h(the)f Ft(-f)g Fu(and)g Ft(-d)g +Fu(options)h(to)h(the)e Ft(enable)f Fu(builtin.)225 3606 +y Fq(\017)60 b Fu(Using)31 b(the)f Ft(enable)f Fu(builtin)h(command)g +(to)h(enable)g(disabled)f(shell)g(builtins.)225 3752 +y Fq(\017)60 b Fu(Sp)s(ecifying)30 b(the)g Ft(-p)g Fu(option)h(to)g +(the)g Ft(command)d Fu(builtin.)225 3899 y Fq(\017)60 +b Fu(T)-8 b(urning)29 b(o\013)i(restricted)g(mo)s(de)f(with)g(`)p +Ft(set)g(+r)p Fu(')g(or)g(`)p Ft(set)g(+o)g(restricted)p +Fu('.)275 4096 y(These)g(restrictions)h(are)g(enforced)f(after)h(an)m +(y)g(startup)f(\014les)g(are)h(read.)275 4255 y(When)j(a)i(command)e +(that)i(is)f(found)f(to)h(b)s(e)g(a)g(shell)g(script)g(is)g(executed)h +(\(see)g(Section)g(3.8)g([Shell)150 4364 y(Scripts],)25 +b(page)e(42\),)j Ft(rbash)c Fu(turns)g(o\013)i(an)m(y)f(restrictions)h +(in)f(the)g(shell)h(spa)m(wned)e(to)i(execute)g(the)g(script.)275 +4523 y(The)42 b(restricted)h(shell)g(mo)s(de)f(is)g(only)h(one)g(comp)s +(onen)m(t)f(of)h(a)g(useful)f(restricted)h(en)m(vironmen)m(t.)150 +4633 y(It)36 b(should)g(b)s(e)f(accompanied)j(b)m(y)e(setting)h +Ft(PATH)e Fu(to)i(a)g(v)-5 b(alue)37 b(that)g(allo)m(ws)g(execution)h +(of)e(only)h(a)f(few)150 4743 y(v)m(eri\014ed)26 b(commands)g +(\(commands)g(that)h(allo)m(w)h(shell)f(escap)s(es)f(are)h +(particularly)g(vulnerable\),)g(lea)m(ving)150 4852 y(the)i(user)f(in)h +(a)g(non-writable)h(directory)f(other)g(than)g(his)g(home)g(directory)g +(after)h(login,)g(not)f(allo)m(wing)150 4962 y(the)j(restricted)g +(shell)g(to)g(execute)h(shell)e(scripts,)h(and)f(cleaning)i(the)e(en)m +(vironmen)m(t)i(of)e(v)-5 b(ariables)32 b(that)150 5071 +y(cause)f(some)g(commands)f(to)h(mo)s(dify)e(their)i(b)s(eha)m(vior)f +(\(e.g.,)j Ft(VISUAL)28 b Fu(or)j Ft(PAGER)p Fu(\).)275 +5230 y(Mo)s(dern)e(systems)g(pro)m(vide)h(more)g(secure)g(w)m(a)m(ys)g +(to)h(implemen)m(t)f(a)g(restricted)h(en)m(vironmen)m(t,)f(suc)m(h)150 +5340 y(as)h Ft(jails)p Fu(,)e Ft(zones)p Fu(,)g(or)h +Ft(containers)p Fu(.)p eop end +%%Page: 101 107 +TeXDict begin 101 106 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2439 b(101)150 299 y Fs(6.11)68 +b(Bash)45 b(POSIX)f(Mo)t(de)150 458 y Fu(Starting)39 +b(Bash)f(with)g(the)h Ft(--posix)d Fu(command-line)j(option)g(or)f +(executing)h(`)p Ft(set)30 b(-o)g(posix)p Fu(')37 b(while)150 +568 y(Bash)26 b(is)g(running)e(will)j(cause)f(Bash)g(to)h(conform)f +(more)g(closely)h(to)g(the)f Fm(posix)f Fu(standard)g(b)m(y)h(c)m +(hanging)150 677 y(the)31 b(b)s(eha)m(vior)f(to)h(matc)m(h)g(that)g(sp) +s(eci\014ed)f(b)m(y)g Fm(posix)g Fu(in)g(areas)h(where)f(the)h(Bash)f +(default)h(di\013ers.)275 810 y(When)f(in)m(v)m(ok)m(ed)h(as)g +Ft(sh)p Fu(,)f(Bash)h(en)m(ters)g Fm(posix)e Fu(mo)s(de)h(after)h +(reading)g(the)f(startup)g(\014les.)275 942 y(The)f(follo)m(wing)j +(list)f(is)g(what's)f(c)m(hanged)h(when)e(`)p Fm(posix)h +Fu(mo)s(de')h(is)f(in)g(e\013ect:)199 1074 y(1.)61 b(Bash)31 +b(ensures)e(that)i(the)f Ft(POSIXLY_CORRECT)d Fu(v)-5 +b(ariable)31 b(is)f(set.)199 1206 y(2.)61 b(When)28 b(a)i(command)e(in) +g(the)h(hash)f(table)i(no)e(longer)h(exists,)h(Bash)f(will)g(re-searc)m +(h)h Ft($PATH)d Fu(to)i(\014nd)330 1316 y(the)i(new)e(lo)s(cation.)43 +b(This)29 b(is)i(also)g(a)m(v)-5 b(ailable)33 b(with)d(`)p +Ft(shopt)f(-s)h(checkhash)p Fu('.)199 1448 y(3.)61 b(Bash)36 +b(will)g(not)g(insert)g(a)g(command)f(without)h(the)g(execute)h(bit)f +(set)g(in)m(to)h(the)f(command)g(hash)330 1558 y(table,)c(ev)m(en)f(if) +f(it)h(returns)e(it)i(as)g(a)f(\(last-ditc)m(h\))j(result)d(from)g(a)h +Ft($PATH)e Fu(searc)m(h.)199 1690 y(4.)61 b(The)42 b(message)h(prin)m +(ted)e(b)m(y)h(the)g(job)g(con)m(trol)i(co)s(de)e(and)f(builtins)h +(when)f(a)h(job)g(exits)h(with)f(a)330 1800 y(non-zero)31 +b(status)g(is)f(`Done\(status\)'.)199 1932 y(5.)61 b(The)40 +b(message)h(prin)m(ted)f(b)m(y)g(the)h(job)f(con)m(trol)h(co)s(de)g +(and)f(builtins)f(when)h(a)g(job)g(is)h(stopp)s(ed)e(is)330 +2041 y(`Stopp)s(ed\()p Fr(signame)5 b Fu(\)',)31 b(where)f +Fr(signame)36 b Fu(is,)31 b(for)f(example,)h Ft(SIGTSTP)p +Fu(.)199 2174 y(6.)61 b(Alias)31 b(expansion)g(is)f(alw)m(a)m(ys)i +(enabled,)e(ev)m(en)i(in)e(non-in)m(teractiv)m(e)j(shells.)199 +2306 y(7.)61 b(Reserv)m(ed)40 b(w)m(ords)g(app)s(earing)f(in)h(a)g(con) +m(text)i(where)d(reserv)m(ed)h(w)m(ords)f(are)i(recognized)g(do)f(not) +330 2415 y(undergo)30 b(alias)h(expansion.)199 2548 y(8.)61 +b(The)38 b Fm(posix)h Ft(PS1)f Fu(and)g Ft(PS2)g Fu(expansions)g(of)i +(`)p Ft(!)p Fu(')f(to)g(the)g(history)g(n)m(um)m(b)s(er)f(and)g(`)p +Ft(!!)p Fu(')h(to)g(`)p Ft(!)p Fu(')h(are)330 2657 y(enabled,)26 +b(and)f(parameter)g(expansion)g(is)g(p)s(erformed)e(on)i(the)g(v)-5 +b(alues)25 b(of)g Ft(PS1)f Fu(and)h Ft(PS2)f Fu(regardless)330 +2767 y(of)31 b(the)f(setting)i(of)e(the)h Ft(promptvars)c +Fu(option.)199 2899 y(9.)61 b(The)30 b Fm(posix)g Fu(startup)f(\014les) +i(are)g(executed)g(\()p Ft($ENV)p Fu(\))f(rather)g(than)g(the)h(normal) +f(Bash)g(\014les.)154 3031 y(10.)61 b(Tilde)30 b(expansion)g(is)f(only) +h(p)s(erformed)f(on)h(assignmen)m(ts)g(preceding)g(a)g(command)g(name,) +g(rather)330 3141 y(than)g(on)g(all)i(assignmen)m(t)f(statemen)m(ts)h +(on)e(the)h(line.)154 3273 y(11.)61 b(The)30 b(default)g(history)h +(\014le)f(is)h Ft(~/.sh_history)26 b Fu(\(this)31 b(is)f(the)h(default) +g(v)-5 b(alue)30 b(of)h Ft($HISTFILE)p Fu(\).)154 3405 +y(12.)61 b(Redirection)25 b(op)s(erators)f(do)g(not)g(p)s(erform)f +(\014lename)h(expansion)g(on)g(the)g(w)m(ord)f(in)h(the)g(redirection) +330 3515 y(unless)30 b(the)g(shell)h(is)f(in)m(teractiv)m(e.)154 +3647 y(13.)61 b(Redirection)31 b(op)s(erators)g(do)f(not)h(p)s(erform)e +(w)m(ord)h(splitting)h(on)f(the)h(w)m(ord)f(in)g(the)g(redirection.)154 +3779 y(14.)61 b(F)-8 b(unction)35 b(names)g(m)m(ust)f(b)s(e)g(v)-5 +b(alid)35 b(shell)f Ft(name)p Fu(s.)52 b(That)34 b(is,)i(they)f(ma)m(y) +g(not)g(con)m(tain)g(c)m(haracters)330 3889 y(other)e(than)g(letters,)h +(digits,)h(and)d(underscores,)h(and)f(ma)m(y)h(not)g(start)h(with)e(a)h +(digit.)49 b(Declaring)330 3999 y(a)31 b(function)f(with)g(an)g(in)m(v) +-5 b(alid)31 b(name)g(causes)f(a)h(fatal)h(syn)m(tax)f(error)f(in)g +(non-in)m(teractiv)m(e)j(shells.)154 4131 y(15.)61 b(F)-8 +b(unction)31 b(names)f(ma)m(y)h(not)g(b)s(e)f(the)g(same)h(as)g(one)f +(of)h(the)f Fm(posix)g Fu(sp)s(ecial)h(builtins.)154 +4263 y(16.)61 b Fm(posix)30 b Fu(sp)s(ecial)h(builtins)e(are)i(found)e +(b)s(efore)h(shell)h(functions)f(during)f(command)h(lo)s(okup.)154 +4395 y(17.)61 b(When)48 b(prin)m(ting)g(shell)h(function)f +(de\014nitions)g(\(e.g.,)55 b(b)m(y)48 b Ft(type)p Fu(\),)k(Bash)d(do)s +(es)f(not)h(prin)m(t)f(the)330 4505 y Ft(function)28 +b Fu(k)m(eyw)m(ord.)154 4637 y(18.)61 b(Literal)28 b(tildes)g(that)f +(app)s(ear)f(as)i(the)f(\014rst)f(c)m(haracter)j(in)d(elemen)m(ts)j(of) +e(the)g Ft(PATH)f Fu(v)-5 b(ariable)27 b(are)h(not)330 +4747 y(expanded)i(as)g(describ)s(ed)f(ab)s(o)m(v)m(e)j(under)d(Section) +i(3.5.2)h([Tilde)f(Expansion],)f(page)h(24.)154 4879 +y(19.)61 b(The)29 b Ft(time)g Fu(reserv)m(ed)h(w)m(ord)g(ma)m(y)g(b)s +(e)g(used)f(b)m(y)h(itself)g(as)g(a)h(command.)40 b(When)30 +b(used)f(in)g(this)h(w)m(a)m(y)-8 b(,)330 4989 y(it)33 +b(displa)m(ys)g(timing)g(statistics)h(for)e(the)h(shell)g(and)f(its)g +(completed)i(c)m(hildren.)47 b(The)32 b Ft(TIMEFORMAT)330 +5098 y Fu(v)-5 b(ariable)31 b(con)m(trols)h(the)e(format)h(of)g(the)f +(timing)h(information.)154 5230 y(20.)61 b(When)33 b(parsing)g(and)f +(expanding)h(a)h($)p Fi({)6 b Fu(.)22 b(.)h(.)11 b Fi(})33 +b Fu(expansion)g(that)h(app)s(ears)f(within)f(double)h(quotes,)330 +5340 y(single)42 b(quotes)g(are)g(no)g(longer)g(sp)s(ecial)g(and)f +(cannot)i(b)s(e)e(used)g(to)h(quote)g(a)g(closing)h(brace)f(or)p +eop end +%%Page: 102 108 +TeXDict begin 102 107 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2439 b(102)330 299 y(other)31 +b(sp)s(ecial)h(c)m(haracter,)i(unless)c(the)i(op)s(erator)f(is)g(one)h +(of)f(those)h(de\014ned)e(to)i(p)s(erform)e(pattern)330 +408 y(remo)m(v)-5 b(al.)42 b(In)30 b(this)g(case,)i(they)e(do)g(not)h +(ha)m(v)m(e)h(to)f(app)s(ear)e(as)i(matc)m(hed)g(pairs.)154 +547 y(21.)61 b(The)29 b(parser)g(do)s(es)g(not)h(recognize)h +Ft(time)d Fu(as)i(a)g(reserv)m(ed)f(w)m(ord)g(if)h(the)f(next)h(tok)m +(en)h(b)s(egins)d(with)i(a)330 656 y(`)p Ft(-)p Fu('.)154 +795 y(22.)61 b(The)30 b(`)p Ft(!)p Fu(')h(c)m(haracter)h(do)s(es)e(not) +h(in)m(tro)s(duce)g(history)f(expansion)h(within)f(a)h(double-quoted)g +(string,)330 905 y(ev)m(en)g(if)f(the)h Ft(histexpand)d +Fu(option)i(is)h(enabled.)154 1043 y(23.)61 b(If)24 b(a)g +Fm(posix)g Fu(sp)s(ecial)h(builtin)f(returns)f(an)h(error)g(status,)i +(a)e(non-in)m(teractiv)m(e)j(shell)e(exits.)39 b(The)24 +b(fatal)330 1153 y(errors)30 b(are)h(those)f(listed)h(in)f(the)h +Fm(posix)e Fu(standard,)h(and)g(include)g(things)g(lik)m(e)i(passing)e +(incorrect)330 1262 y(options,)43 b(redirection)d(errors,)i(v)-5 +b(ariable)41 b(assignmen)m(t)g(errors)e(for)g(assignmen)m(ts)i +(preceding)f(the)330 1372 y(command)30 b(name,)h(and)f(so)g(on.)154 +1510 y(24.)61 b(A)31 b(non-in)m(teractiv)m(e)j(shell)d(exits)h(with)e +(an)h(error)g(status)g(if)g(a)g(v)-5 b(ariable)32 b(assignmen)m(t)g +(error)e(o)s(ccurs)330 1620 y(when)38 b(no)h(command)g(name)g(follo)m +(ws)i(the)e(assignmen)m(t)h(statemen)m(ts.)69 b(A)39 +b(v)-5 b(ariable)40 b(assignmen)m(t)330 1729 y(error)30 +b(o)s(ccurs,)g(for)g(example,)i(when)d(trying)i(to)g(assign)f(a)h(v)-5 +b(alue)31 b(to)g(a)g(readonly)f(v)-5 b(ariable.)154 1868 +y(25.)61 b(A)31 b(non-in)m(teractiv)m(e)j(shell)d(exits)h(with)e(an)h +(error)g(status)g(if)g(a)g(v)-5 b(ariable)32 b(assignmen)m(t)g(error)e +(o)s(ccurs)330 1977 y(in)g(an)g(assignmen)m(t)i(statemen)m(t)g +(preceding)e(a)h(sp)s(ecial)g(builtin,)f(but)g(not)g(with)h(an)m(y)f +(other)h(simple)330 2087 y(command.)154 2225 y(26.)61 +b(A)43 b(non-in)m(teractiv)m(e)i(shell)e(exits)h(with)f(an)f(error)h +(status)g(if)g(the)g(iteration)h(v)-5 b(ariable)44 b(in)f(a)g +Ft(for)330 2335 y Fu(statemen)m(t)32 b(or)f(the)f(selection)i(v)-5 +b(ariable)32 b(in)e(a)g Ft(select)f Fu(statemen)m(t)j(is)f(a)f +(readonly)h(v)-5 b(ariable.)154 2473 y(27.)61 b(Non-in)m(teractiv)m(e) +34 b(shells)c(exit)h(if)g Fr(\014lename)k Fu(in)30 b +Ft(.)g Fr(\014lename)36 b Fu(is)31 b(not)f(found.)154 +2612 y(28.)61 b(Non-in)m(teractiv)m(e)41 b(shells)d(exit)h(if)f(a)g +(syn)m(tax)g(error)g(in)f(an)h(arithmetic)h(expansion)f(results)f(in)h +(an)330 2721 y(in)m(v)-5 b(alid)31 b(expression.)154 +2860 y(29.)61 b(Non-in)m(teractiv)m(e)34 b(shells)c(exit)h(if)g(a)f +(parameter)h(expansion)g(error)f(o)s(ccurs.)154 2998 +y(30.)61 b(Non-in)m(teractiv)m(e)27 b(shells)c(exit)i(if)e(there)h(is)f +(a)h(syn)m(tax)g(error)f(in)g(a)h(script)f(read)g(with)h(the)f +Ft(.)g Fu(or)h Ft(source)330 3108 y Fu(builtins,)30 b(or)g(in)g(a)h +(string)g(pro)s(cessed)e(b)m(y)i(the)f Ft(eval)f Fu(builtin.)154 +3246 y(31.)61 b(While)32 b(v)-5 b(ariable)32 b(indirection)f(is)g(a)m +(v)-5 b(ailable,)34 b(it)d(ma)m(y)h(not)f(b)s(e)g(applied)g(to)g(the)h +(`)p Ft(#)p Fu(')f(and)f(`)p Ft(?)p Fu(')h(sp)s(ecial)330 +3356 y(parameters.)154 3494 y(32.)61 b(When)28 b(expanding)g(the)g(`)p +Ft(*)p Fu(')g(sp)s(ecial)h(parameter)f(in)g(a)h(pattern)f(con)m(text)i +(where)e(the)g(expansion)g(is)330 3604 y(double-quoted)i(do)s(es)g(not) +h(treat)h(the)e Ft($*)g Fu(as)h(if)f(it)h(w)m(ere)g(double-quoted.)154 +3742 y(33.)61 b(Assignmen)m(t)23 b(statemen)m(ts)h(preceding)e +Fm(posix)f Fu(sp)s(ecial)i(builtins)f(p)s(ersist)g(in)f(the)i(shell)f +(en)m(vironmen)m(t)330 3852 y(after)31 b(the)f(builtin)g(completes.)154 +3990 y(34.)61 b(The)31 b Ft(command)e Fu(builtin)i(do)s(es)g(not)h +(prev)m(en)m(t)f(builtins)g(that)h(tak)m(e)h(assignmen)m(t)f(statemen)m +(ts)h(as)f(ar-)330 4100 y(gumen)m(ts)40 b(from)e(expanding)h(them)g(as) +h(assignmen)m(t)g(statemen)m(ts;)46 b(when)38 b(not)i(in)f +Fm(posix)f Fu(mo)s(de,)330 4209 y(assignmen)m(t)k(builtins)e(lose)h +(their)g(assignmen)m(t)h(statemen)m(t)h(expansion)d(prop)s(erties)g +(when)g(pre-)330 4319 y(ceded)31 b(b)m(y)f Ft(command)p +Fu(.)154 4457 y(35.)61 b(The)27 b Ft(bg)g Fu(builtin)g(uses)g(the)h +(required)f(format)h(to)g(describ)s(e)f(eac)m(h)i(job)e(placed)h(in)f +(the)h(bac)m(kground,)330 4567 y(whic)m(h)h(do)s(es)g(not)g(include)g +(an)g(indication)h(of)f(whether)f(the)h(job)g(is)g(the)h(curren)m(t)e +(or)h(previous)g(job.)154 4706 y(36.)61 b(The)23 b(output)f(of)i(`)p +Ft(kill)29 b(-l)p Fu(')23 b(prin)m(ts)f(all)i(the)g(signal)f(names)g +(on)g(a)h(single)g(line,)h(separated)e(b)m(y)g(spaces,)330 +4815 y(without)30 b(the)h(`)p Ft(SIG)p Fu(')f(pre\014x.)154 +4954 y(37.)61 b(The)30 b Ft(kill)f Fu(builtin)h(do)s(es)g(not)h(accept) +h(signal)f(names)f(with)g(a)h(`)p Ft(SIG)p Fu(')f(pre\014x.)154 +5092 y(38.)61 b(The)38 b Ft(export)f Fu(and)g Ft(readonly)f +Fu(builtin)i(commands)g(displa)m(y)h(their)f(output)g(in)g(the)h +(format)g(re-)330 5202 y(quired)30 b(b)m(y)g Fm(posix)p +Fu(.)154 5340 y(39.)61 b(The)30 b Ft(trap)f Fu(builtin)h(displa)m(ys)g +(signal)i(names)e(without)g(the)h(leading)g Ft(SIG)p +Fu(.)p eop end +%%Page: 103 109 +TeXDict begin 103 108 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2439 b(103)154 299 y(40.)61 +b(The)39 b Ft(trap)e Fu(builtin)i(do)s(esn't)g(c)m(hec)m(k)h(the)g +(\014rst)e(argumen)m(t)i(for)e(a)i(p)s(ossible)e(signal)i(sp)s +(eci\014cation)330 408 y(and)30 b(rev)m(ert)i(the)e(signal)i(handling)e +(to)h(the)g(original)h(disp)s(osition)e(if)h(it)g(is,)g(unless)f(that)h +(argumen)m(t)330 518 y(consists)e(solely)g(of)g(digits)g(and)f(is)g(a)h +(v)-5 b(alid)29 b(signal)g(n)m(um)m(b)s(er.)38 b(If)28 +b(users)g(w)m(an)m(t)h(to)g(reset)g(the)g(handler)330 +628 y(for)h(a)g(giv)m(en)h(signal)g(to)f(the)h(original)g(disp)s +(osition,)f(they)g(should)f(use)h(`)p Ft(-)p Fu(')g(as)g(the)g(\014rst) +f(argumen)m(t.)154 765 y(41.)61 b Ft(trap)29 b(-p)35 +b Fu(displa)m(ys)h(signals)h(whose)f(disp)s(ositions)f(are)h(set)h(to)f +(SIG)p 2687 765 28 4 v 40 w(DFL)g(and)g(those)g(that)g(w)m(ere)330 +874 y(ignored)30 b(when)g(the)g(shell)h(started.)154 +1011 y(42.)61 b(The)21 b Ft(.)h Fu(and)f Ft(source)f +Fu(builtins)h(do)g(not)h(searc)m(h)h(the)f(curren)m(t)f(directory)h +(for)g(the)g(\014lename)f(argumen)m(t)330 1121 y(if)30 +b(it)h(is)g(not)f(found)f(b)m(y)i(searc)m(hing)g Ft(PATH)p +Fu(.)154 1258 y(43.)61 b(Enabling)21 b Fm(posix)g Fu(mo)s(de)g(has)g +(the)g(e\013ect)i(of)e(setting)i(the)e Ft(inherit_errexit)d +Fu(option,)23 b(so)f(subshells)330 1367 y(spa)m(wned)27 +b(to)i(execute)g(command)e(substitutions)h(inherit)f(the)h(v)-5 +b(alue)28 b(of)g(the)g Ft(-e)f Fu(option)h(from)g(the)330 +1477 y(paren)m(t)37 b(shell.)62 b(When)37 b(the)g Ft(inherit_errexit)c +Fu(option)38 b(is)f(not)h(enabled,)h(Bash)e(clears)h(the)g +Ft(-e)330 1587 y Fu(option)31 b(in)f(suc)m(h)g(subshells.)154 +1724 y(44.)61 b(Enabling)32 b Fm(posix)f Fu(mo)s(de)h(has)g(the)h +(e\013ect)g(of)g(setting)g(the)g Ft(shift_verbose)28 +b Fu(option,)34 b(so)e(n)m(umeric)330 1833 y(argumen)m(ts)f(to)g +Ft(shift)f Fu(that)h(exceed)h(the)e(n)m(um)m(b)s(er)g(of)h(p)s +(ositional)g(parameters)g(will)g(result)g(in)f(an)330 +1943 y(error)g(message.)154 2080 y(45.)61 b(When)43 b(the)g +Ft(alias)f Fu(builtin)g(displa)m(ys)i(alias)g(de\014nitions,)i(it)d(do) +s(es)g(not)g(displa)m(y)h(them)f(with)g(a)330 2189 y(leading)31 +b(`)p Ft(alias)e Fu(')i(unless)f(the)g Ft(-p)g Fu(option)h(is)f +(supplied.)154 2326 y(46.)61 b(When)40 b(the)g Ft(set)f +Fu(builtin)h(is)g(in)m(v)m(ok)m(ed)h(without)f(options,)j(it)e(do)s(es) +f(not)g(displa)m(y)g(shell)g(function)330 2436 y(names)30 +b(and)g(de\014nitions.)154 2573 y(47.)61 b(When)36 b(the)g +Ft(set)g Fu(builtin)g(is)g(in)m(v)m(ok)m(ed)i(without)e(options,)i(it)f +(displa)m(ys)f(v)-5 b(ariable)37 b(v)-5 b(alues)37 b(without)330 +2682 y(quotes,)26 b(unless)d(they)i(con)m(tain)g(shell)f(metac)m +(haracters,)k(ev)m(en)d(if)f(the)g(result)g(con)m(tains)i(nonprin)m +(ting)330 2792 y(c)m(haracters.)154 2929 y(48.)61 b(When)35 +b(the)g Ft(cd)f Fu(builtin)h(is)g(in)m(v)m(ok)m(ed)i(in)d +Fr(logical)41 b Fu(mo)s(de,)36 b(and)f(the)g(pathname)g(constructed)g +(from)330 3039 y Ft($PWD)i Fu(and)h(the)h(directory)f(name)h(supplied)e +(as)i(an)f(argumen)m(t)h(do)s(es)f(not)g(refer)h(to)g(an)f(existing)330 +3148 y(directory)-8 b(,)32 b Ft(cd)d Fu(will)i(fail)g(instead)g(of)f +(falling)h(bac)m(k)h(to)f Fr(ph)m(ysical)j Fu(mo)s(de.)154 +3285 y(49.)61 b(When)37 b(the)h Ft(cd)f Fu(builtin)g(cannot)h(c)m +(hange)h(a)f(directory)g(b)s(ecause)g(the)g(length)g(of)f(the)h +(pathname)330 3395 y(constructed)52 b(from)f Ft($PWD)f +Fu(and)g(the)i(directory)g(name)f(supplied)f(as)i(an)f(argumen)m(t)h +(exceeds)330 3504 y Fr(P)-8 b(A)g(TH)p 584 3504 V 41 +w(MAX)42 b Fu(when)31 b(all)j(sym)m(b)s(olic)e(links)h(are)f(expanded,) +h Ft(cd)f Fu(will)g(fail)h(instead)g(of)g(attempting)330 +3614 y(to)e(use)f(only)h(the)f(supplied)f(directory)i(name.)154 +3751 y(50.)61 b(The)36 b Ft(pwd)f Fu(builtin)h(v)m(eri\014es)h(that)g +(the)f(v)-5 b(alue)37 b(it)g(prin)m(ts)e(is)i(the)f(same)h(as)f(the)h +(curren)m(t)f(directory)-8 b(,)330 3861 y(ev)m(en)31 +b(if)f(it)h(is)g(not)f(ask)m(ed)h(to)g(c)m(hec)m(k)h(the)f(\014le)f +(system)h(with)f(the)h Ft(-P)e Fu(option.)154 3998 y(51.)61 +b(When)35 b(listing)g(the)g(history)-8 b(,)36 b(the)f +Ft(fc)g Fu(builtin)f(do)s(es)g(not)h(include)g(an)f(indication)i(of)f +(whether)f(or)330 4107 y(not)d(a)f(history)h(en)m(try)f(has)g(b)s(een)g +(mo)s(di\014ed.)154 4244 y(52.)61 b(The)30 b(default)g(editor)h(used)f +(b)m(y)g Ft(fc)g Fu(is)g Ft(ed)p Fu(.)154 4381 y(53.)61 +b(The)37 b Ft(type)g Fu(and)g Ft(command)f Fu(builtins)i(will)g(not)g +(rep)s(ort)f(a)i(non-executable)g(\014le)f(as)g(ha)m(ving)h(b)s(een)330 +4491 y(found,)26 b(though)h(the)g(shell)g(will)g(attempt)h(to)g +(execute)g(suc)m(h)f(a)g(\014le)g(if)g(it)g(is)g(the)g(only)g(so-named) +g(\014le)330 4600 y(found)i(in)h Ft($PATH)p Fu(.)154 +4737 y(54.)61 b(The)33 b Ft(vi)f Fu(editing)i(mo)s(de)f(will)g(in)m(v)m +(ok)m(e)i(the)e Ft(vi)g Fu(editor)h(directly)f(when)f(the)i(`)p +Ft(v)p Fu(')f(command)g(is)g(run,)330 4847 y(instead)e(of)f(c)m(hec)m +(king)i Ft($VISUAL)d Fu(and)g Ft($EDITOR)p Fu(.)154 4984 +y(55.)61 b(When)41 b(the)g Ft(xpg_echo)e Fu(option)i(is)g(enabled,)j +(Bash)d(do)s(es)g(not)g(attempt)h(to)g(in)m(terpret)f(an)m(y)h(ar-)330 +5093 y(gumen)m(ts)35 b(to)g Ft(echo)e Fu(as)i(options.)54 +b(Eac)m(h)35 b(argumen)m(t)g(is)f(displa)m(y)m(ed,)j(after)e(escap)s(e) +g(c)m(haracters)h(are)330 5203 y(con)m(v)m(erted.)154 +5340 y(56.)61 b(The)30 b Ft(ulimit)f Fu(builtin)g(uses)h(a)h(blo)s(c)m +(k)g(size)g(of)g(512)g(b)m(ytes)g(for)f(the)h Ft(-c)f +Fu(and)g Ft(-f)f Fu(options.)p eop end +%%Page: 104 110 +TeXDict begin 104 109 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2439 b(104)154 299 y(57.)61 +b(The)39 b(arriv)-5 b(al)41 b(of)f Ft(SIGCHLD)e Fu(when)h(a)h(trap)g +(is)g(set)h(on)f Ft(SIGCHLD)e Fu(do)s(es)h(not)h(in)m(terrupt)g(the)g +Ft(wait)330 408 y Fu(builtin)c(and)h(cause)g(it)h(to)f(return)f +(immediately)-8 b(.)62 b(The)37 b(trap)f(command)h(is)g(run)e(once)j +(for)f(eac)m(h)330 518 y(c)m(hild)31 b(that)g(exits.)154 +654 y(58.)61 b(The)27 b Ft(read)f Fu(builtin)g(ma)m(y)i(b)s(e)e(in)m +(terrupted)h(b)m(y)g(a)h(signal)f(for)g(whic)m(h)g(a)h(trap)f(has)g(b)s +(een)f(set.)40 b(If)27 b(Bash)330 764 y(receiv)m(es)41 +b(a)f(trapp)s(ed)e(signal)i(while)f(executing)h Ft(read)p +Fu(,)h(the)e(trap)h(handler)e(executes)i(and)f Ft(read)330 +874 y Fu(returns)29 b(an)h(exit)i(status)e(greater)i(than)e(128.)154 +1010 y(59.)61 b(Bash)27 b(remo)m(v)m(es)h(an)e(exited)i(bac)m(kground)e +(pro)s(cess's)h(status)g(from)f(the)h(list)g(of)g(suc)m(h)f(statuses)h +(after)330 1119 y(the)k Ft(wait)e Fu(builtin)h(is)g(used)g(to)h(obtain) +g(it.)275 1284 y(There)j(is)g(other)h Fm(posix)f Fu(b)s(eha)m(vior)h +(that)g(Bash)g(do)s(es)f(not)h(implemen)m(t)g(b)m(y)g(default)f(ev)m +(en)i(when)d(in)150 1394 y Fm(posix)d Fu(mo)s(de.)40 +b(Sp)s(eci\014cally:)199 1532 y(1.)61 b(The)30 b Ft(fc)f +Fu(builtin)h(c)m(hec)m(ks)i Ft($EDITOR)c Fu(as)j(a)f(program)g(to)h +(edit)g(history)f(en)m(tries)h(if)f Ft(FCEDIT)f Fu(is)h(unset,)330 +1641 y(rather)g(than)g(defaulting)h(directly)g(to)g Ft(ed)p +Fu(.)40 b Ft(fc)30 b Fu(uses)g Ft(ed)g Fu(if)g Ft(EDITOR)f +Fu(is)h(unset.)199 1778 y(2.)61 b(As)29 b(noted)g(ab)s(o)m(v)m(e,)i +(Bash)e(requires)g(the)g Ft(xpg_echo)e Fu(option)j(to)g(b)s(e)e +(enabled)h(for)g(the)g Ft(echo)f Fu(builtin)330 1887 +y(to)j(b)s(e)f(fully)g(conforman)m(t.)275 2052 y(Bash)c(can)g(b)s(e)f +(con\014gured)h(to)g(b)s(e)g Fm(posix)p Fu(-conforman)m(t)g(b)m(y)g +(default,)h(b)m(y)f(sp)s(ecifying)g(the)g Ft(--enable-)150 +2162 y(strict-posix-default)c Fu(to)27 b Ft(configure)e +Fu(when)h(building)h(\(see)h(Section)g(10.8)g([Optional)g(F)-8 +b(eatures],)150 2271 y(page)31 b(155\).)150 2518 y Fs(6.12)68 +b(Shell)46 b(Compatibilit)l(y)h(Mo)t(de)150 2677 y Fu(Bash-4.0)30 +b(in)m(tro)s(duced)d(the)i(concept)g(of)f(a)h(`shell)f(compatibilit)m +(y)i(lev)m(el',)h(sp)s(eci\014ed)d(as)g(a)h(set)f(of)h(options)150 +2786 y(to)i(the)f(shopt)g(builtin)g(\()p Ft(compat31)p +Fu(,)e Ft(compat32)p Fu(,)h Ft(compat40)p Fu(,)f Ft(compat41)p +Fu(,)g(and)i(so)g(on\).)41 b(There)30 b(is)g(only)150 +2896 y(one)f(curren)m(t)f(compatibilit)m(y)j(lev)m(el)f({)f(eac)m(h)h +(option)f(is)g(m)m(utually)g(exclusiv)m(e.)41 b(The)28 +b(compatibilit)m(y)j(lev)m(el)150 3006 y(is)39 b(in)m(tended)g(to)h +(allo)m(w)g(users)e(to)i(select)h(b)s(eha)m(vior)e(from)f(previous)h(v) +m(ersions)g(that)h(is)f(incompatible)150 3115 y(with)d(new)m(er)g(v)m +(ersions)g(while)g(they)g(migrate)h(scripts)f(to)h(use)f(curren)m(t)f +(features)i(and)e(b)s(eha)m(vior.)58 b(It's)150 3225 +y(in)m(tended)30 b(to)h(b)s(e)f(a)h(temp)s(orary)f(solution.)275 +3363 y(This)k(section)j(do)s(es)e(not)h(men)m(tion)g(b)s(eha)m(vior)g +(that)g(is)f(standard)g(for)g(a)h(particular)g(v)m(ersion)g(\(e.g.,)150 +3473 y(setting)24 b Ft(compat32)e Fu(means)h(that)h(quoting)g(the)f +(rhs)g(of)g(the)h(regexp)f(matc)m(hing)i(op)s(erator)e(quotes)h(sp)s +(ecial)150 3582 y(regexp)31 b(c)m(haracters)g(in)g(the)f(w)m(ord,)g +(whic)m(h)g(is)h(default)f(b)s(eha)m(vior)h(in)f(bash-3.2)h(and)f(ab)s +(o)m(v)m(e\).)275 3720 y(If)f(a)h(user)f(enables,)h(sa)m(y)-8 +b(,)31 b Ft(compat32)p Fu(,)d(it)i(ma)m(y)g(a\013ect)h(the)f(b)s(eha)m +(vior)g(of)g(other)g(compatibilit)m(y)h(lev)m(els)150 +3830 y(up)23 b(to)h(and)f(including)h(the)g(curren)m(t)f(compatibilit)m +(y)j(lev)m(el.)41 b(The)23 b(idea)h(is)g(that)g(eac)m(h)h(compatibilit) +m(y)h(lev)m(el)150 3939 y(con)m(trols)35 b(b)s(eha)m(vior)f(that)g(c)m +(hanged)g(in)f(that)h(v)m(ersion)g(of)g(Bash,)h(but)e(that)h(b)s(eha)m +(vior)g(ma)m(y)g(ha)m(v)m(e)h(b)s(een)150 4049 y(presen)m(t)f(in)g +(earlier)g(v)m(ersions.)52 b(F)-8 b(or)35 b(instance,)g(the)f(c)m +(hange)h(to)g(use)f(lo)s(cale-based)h(comparisons)f(with)150 +4159 y(the)e Ft([[)f Fu(command)g(came)h(in)g(bash-4.1,)h(and)d +(earlier)j(v)m(ersions)f(used)f(ASCI)s(I-based)f(comparisons,)i(so)150 +4268 y(enabling)27 b Ft(compat32)e Fu(will)i(enable)g(ASCI)s(I-based)e +(comparisons)i(as)g(w)m(ell.)41 b(That)26 b(gran)m(ularit)m(y)i(ma)m(y) +g(not)150 4378 y(b)s(e)i(su\016cien)m(t)i(for)f(all)g(uses,)g(and)g(as) +g(a)g(result)g(users)f(should)g(emplo)m(y)i(compatibilit)m(y)h(lev)m +(els)g(carefully)-8 b(.)150 4487 y(Read)31 b(the)f(do)s(cumen)m(tation) +h(for)g(a)f(particular)h(feature)g(to)g(\014nd)e(out)h(the)h(curren)m +(t)f(b)s(eha)m(vior.)275 4625 y(Bash-4.3)44 b(in)m(tro)s(duced)e(a)h +(new)f(shell)h(v)-5 b(ariable:)65 b Ft(BASH_COMPAT)p +Fu(.)75 b(The)42 b(v)-5 b(alue)43 b(assigned)g(to)g(this)150 +4735 y(v)-5 b(ariable)32 b(\(a)g(decimal)h(v)m(ersion)e(n)m(um)m(b)s +(er)f(lik)m(e)j(4.2,)g(or)e(an)h(in)m(teger)g(corresp)s(onding)f(to)h +(the)f Ft(compat)p Fr(NN)150 4845 y Fu(option,)g(lik)m(e)h(42\))f +(determines)g(the)f(compatibilit)m(y)j(lev)m(el.)275 +4983 y(Starting)e(with)g(bash-4.4,)h(Bash)f(has)g(b)s(egun)f +(deprecating)h(older)h(compatibilit)m(y)h(lev)m(els.)44 +b(Ev)m(en)m(tu-)150 5092 y(ally)-8 b(,)32 b(the)e(options)h(will)g(b)s +(e)f(remo)m(v)m(ed)h(in)f(fa)m(v)m(or)i(of)e Ft(BASH_COMPAT)p +Fu(.)275 5230 y(Bash-5.0)36 b(is)f(the)g(\014nal)f(v)m(ersion)i(for)e +(whic)m(h)h(there)g(will)g(b)s(e)f(an)h(individual)f(shopt)h(option)g +(for)g(the)150 5340 y(previous)30 b(v)m(ersion.)41 b(Users)30 +b(should)g(use)g Ft(BASH_COMPAT)d Fu(on)j(bash-5.0)h(and)f(later)i(v)m +(ersions.)p eop end +%%Page: 105 111 +TeXDict begin 105 110 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2439 b(105)275 299 y(The)24 +b(follo)m(wing)i(table)g(describ)s(es)e(the)i(b)s(eha)m(vior)f(c)m +(hanges)h(con)m(trolled)g(b)m(y)f(eac)m(h)h(compatibilit)m(y)h(lev)m +(el)150 408 y(setting.)43 b(The)30 b Ft(compat)p Fr(NN)39 +b Fu(tag)32 b(is)f(used)f(as)h(shorthand)e(for)h(setting)i(the)f +(compatibilit)m(y)i(lev)m(el)f(to)g Fr(NN)150 518 y Fu(using)37 +b(one)h(of)g(the)g(follo)m(wing)h(mec)m(hanisms.)63 b(F)-8 +b(or)39 b(v)m(ersions)f(prior)f(to)h(bash-5.0,)j(the)d(compatibilit)m +(y)150 628 y(lev)m(el)d(ma)m(y)f(b)s(e)e(set)i(using)e(the)i(corresp)s +(onding)e Ft(compat)p Fr(NN)41 b Fu(shopt)33 b(option.)50 +b(F)-8 b(or)34 b(bash-4.3)f(and)g(later)150 737 y(v)m(ersions,)40 +b(the)e Ft(BASH_COMPAT)d Fu(v)-5 b(ariable)39 b(is)e(preferred,)i(and)e +(it)i(is)f(required)f(for)g(bash-5.1)i(and)e(later)150 +847 y(v)m(ersions.)150 1025 y Ft(compat31)705 1165 y +Fq(\017)60 b Fu(quoting)34 b(the)g(rhs)e(of)i(the)f Ft([[)g +Fu(command's)h(regexp)f(matc)m(hing)i(op)s(erator)f(\(=)p +Ft(~)p Fu(\))f(has)810 1275 y(no)d(sp)s(ecial)h(e\013ect)150 +1446 y Ft(compat32)705 1587 y Fq(\017)60 b Fu(in)m(terrupting)28 +b(a)g(command)g(list)h(suc)m(h)f(as)g Ft(")p Fu(a)g(;)h(b)f(;)h(c)p +Ft(")f Fu(causes)h(the)f(execution)h(of)g(the)810 1697 +y(next)j(command)f(in)g(the)h(list)g(\(in)f(bash-4.0)h(and)f(later)i(v) +m(ersions,)f(the)g(shell)f(acts)i(as)810 1806 y(if)i(it)i(receiv)m(ed)f +(the)g(in)m(terrupt,)h(so)f(in)m(terrupting)f(one)h(command)f(in)g(a)h +(list)g(ab)s(orts)810 1916 y(the)31 b(execution)g(of)g(the)f(en)m(tire) +i(list\))150 2087 y Ft(compat40)705 2228 y Fq(\017)60 +b Fu(the)35 b(`)p Ft(<)p Fu(')g(and)f(`)p Ft(>)p Fu(')g(op)s(erators)h +(to)g(the)g Ft([[)f Fu(command)h(do)f(not)h(consider)f(the)h(curren)m +(t)810 2338 y(lo)s(cale)41 b(when)d(comparing)i(strings;)k(they)c(use)f +(ASCI)s(I)f(ordering.)67 b(Bash)40 b(v)m(ersions)810 +2447 y(prior)f(to)i(bash-4.1)f(use)g(ASCI)s(I)e(collation)k(and)d +(strcmp\(3\);)45 b(bash-4.1)c(and)e(later)810 2557 y(use)30 +b(the)h(curren)m(t)f(lo)s(cale's)i(collation)h(sequence)d(and)g +(strcoll\(3\).)150 2728 y Ft(compat41)705 2869 y Fq(\017)60 +b Fu(in)29 b(p)s(osix)f(mo)s(de,)i Ft(time)e Fu(ma)m(y)h(b)s(e)g(follo) +m(w)m(ed)i(b)m(y)e(options)g(and)g(still)h(b)s(e)e(recognized)j(as)810 +2979 y(a)g(reserv)m(ed)f(w)m(ord)g(\(this)h(is)f Fm(posix)g +Fu(in)m(terpretation)i(267\))705 3119 y Fq(\017)60 b +Fu(in)37 b(p)s(osix)f(mo)s(de,)i(the)g(parser)e(requires)g(that)i(an)f +(ev)m(en)g(n)m(um)m(b)s(er)f(of)h(single)g(quotes)810 +3229 y(o)s(ccur)28 b(in)g(the)h Fr(w)m(ord)i Fu(p)s(ortion)d(of)h(a)g +(double-quoted)f($)p Fi({)6 b Fu(.)23 b(.)f(.)11 b Fi(})29 +b Fu(parameter)g(expansion)810 3338 y(and)34 b(treats)h(them)f(sp)s +(ecially)-8 b(,)37 b(so)e(that)g(c)m(haracters)g(within)f(the)h(single) +g(quotes)g(are)810 3448 y(considered)30 b(quoted)h(\(this)f(is)h +Fm(posix)e Fu(in)m(terpretation)j(221\))150 3620 y Ft(compat42)705 +3760 y Fq(\017)60 b Fu(the)29 b(replacemen)m(t)i(string)e(in)g +(double-quoted)h(pattern)f(substitution)g(do)s(es)g(not)h(un-)810 +3870 y(dergo)h(quote)g(remo)m(v)-5 b(al,)32 b(as)e(it)h(do)s(es)f(in)g +(v)m(ersions)h(after)g(bash-4.2)705 4010 y Fq(\017)60 +b Fu(in)39 b(p)s(osix)g(mo)s(de,)j(single)e(quotes)g(are)g(considered)f +(sp)s(ecial)h(when)f(expanding)g(the)810 4120 y Fr(w)m(ord)d +Fu(p)s(ortion)c(of)g(a)h(double-quoted)g($)p Fi({)6 b +Fu(.)22 b(.)h(.)11 b Fi(})33 b Fu(parameter)g(expansion)f(and)g(can)h +(b)s(e)810 4230 y(used)40 b(to)i(quote)g(a)f(closing)h(brace)f(or)g +(other)h(sp)s(ecial)f(c)m(haracter)i(\(this)e(is)g(part)g(of)810 +4339 y Fm(posix)36 b Fu(in)m(terpretation)h(221\);)42 +b(in)36 b(later)h(v)m(ersions,)h(single)f(quotes)g(are)g(not)f(sp)s +(ecial)810 4449 y(within)30 b(double-quoted)g(w)m(ord)g(expansions)150 +4620 y Ft(compat43)705 4761 y Fq(\017)60 b Fu(the)31 +b(shell)g(do)s(es)g(not)g(prin)m(t)f(a)h(w)m(arning)g(message)h(if)f +(an)g(attempt)h(is)f(made)f(to)i(use)f(a)810 4871 y(quoted)22 +b(comp)s(ound)f(assignmen)m(t)i(as)f(an)g(argumen)m(t)h(to)g(declare)g +(\(declare)g(-a)g(fo)s(o='\(1)810 4980 y(2\)'\).)42 b(Later)31 +b(v)m(ersions)g(w)m(arn)f(that)h(this)f(usage)h(is)f(deprecated)705 +5121 y Fq(\017)60 b Fu(w)m(ord)21 b(expansion)g(errors)g(are)h +(considered)f(non-fatal)h(errors)f(that)h(cause)g(the)f(curren)m(t)810 +5230 y(command)k(to)g(fail,)i(ev)m(en)e(in)g(p)s(osix)f(mo)s(de)h +(\(the)g(default)g(b)s(eha)m(vior)g(is)g(to)g(mak)m(e)h(them)810 +5340 y(fatal)32 b(errors)d(that)i(cause)g(the)g(shell)f(to)i(exit\))p +eop end +%%Page: 106 112 +TeXDict begin 106 111 bop 150 -116 a Fu(Chapter)30 b(6:)41 +b(Bash)30 b(F)-8 b(eatures)2439 b(106)705 299 y Fq(\017)60 +b Fu(when)37 b(executing)i(a)g(shell)f(function,)i(the)f(lo)s(op)f +(state)h(\(while/un)m(til/etc.\))68 b(is)38 b(not)810 +408 y(reset,)c(so)g Ft(break)d Fu(or)i Ft(continue)e +Fu(in)h(that)i(function)f(will)g(break)g(or)g(con)m(tin)m(ue)h(lo)s +(ops)810 518 y(in)h(the)g(calling)h(con)m(text.)57 b(Bash-4.4)37 +b(and)d(later)i(reset)g(the)f(lo)s(op)g(state)i(to)e(prev)m(en)m(t)810 +628 y(this)150 787 y Ft(compat44)705 922 y Fq(\017)60 +b Fu(the)41 b(shell)g(sets)g(up)e(the)i(v)-5 b(alues)41 +b(used)f(b)m(y)h Ft(BASH_ARGV)d Fu(and)i Ft(BASH_ARGC)e +Fu(so)j(they)810 1031 y(can)26 b(expand)f(to)h(the)g(shell's)g(p)s +(ositional)g(parameters)g(ev)m(en)h(if)e(extended)h(debugging)810 +1141 y(mo)s(de)k(is)g(not)h(enabled)705 1275 y Fq(\017)60 +b Fu(a)40 b(subshell)f(inherits)g(lo)s(ops)h(from)g(its)g(paren)m(t)g +(con)m(text,)k(so)c Ft(break)e Fu(or)i Ft(continue)810 +1385 y Fu(will)35 b(cause)g(the)f(subshell)f(to)i(exit.)54 +b(Bash-5.0)36 b(and)d(later)j(reset)f(the)f(lo)s(op)h(state)g(to)810 +1494 y(prev)m(en)m(t)c(the)g(exit)705 1629 y Fq(\017)60 +b Fu(v)-5 b(ariable)28 b(assignmen)m(ts)h(preceding)f(builtins)f(lik)m +(e)i Ft(export)d Fu(and)h Ft(readonly)e Fu(that)j(set)810 +1738 y(attributes)37 b(con)m(tin)m(ue)h(to)g(a\013ect)g(v)-5 +b(ariables)37 b(with)g(the)f(same)h(name)g(in)g(the)f(calling)810 +1848 y(en)m(vironmen)m(t)31 b(ev)m(en)g(if)f(the)h(shell)g(is)f(not)h +(in)f(p)s(osix)f(mo)s(de)150 2007 y Ft(compat50)f(\(set)h(using)g +(BASH_COMPAT\))705 2117 y Fq(\017)60 b Fu(Bash-5.1)29 +b(c)m(hanged)g(the)f(w)m(a)m(y)g Ft($RANDOM)e Fu(is)i(generated)h(to)f +(in)m(tro)s(duce)g(sligh)m(tly)h(more)810 2227 y(randomness.)39 +b(If)30 b(the)f(shell)h(compatibilit)m(y)i(lev)m(el)f(is)f(set)g(to)h +(50)f(or)g(lo)m(w)m(er,)h(it)f(rev)m(erts)810 2336 y(to)e(the)g(metho)s +(d)f(from)g(bash-5.0)h(and)f(previous)g(v)m(ersions,)i(so)e(seeding)h +(the)g(random)810 2446 y(n)m(um)m(b)s(er)36 b(generator)j(b)m(y)e +(assigning)h(a)g(v)-5 b(alue)38 b(to)g Ft(RANDOM)e Fu(will)i(pro)s +(duce)e(the)i(same)810 2555 y(sequence)31 b(as)f(in)g(bash-5.0)705 +2690 y Fq(\017)60 b Fu(If)22 b(the)g(command)g(hash)f(table)i(is)f +(empt)m(y)-8 b(,)25 b(Bash)d(v)m(ersions)g(prior)g(to)h(bash-5.1)f +(prin)m(ted)810 2800 y(an)29 b(informational)i(message)g(to)f(that)g +(e\013ect,)h(ev)m(en)g(when)d(pro)s(ducing)g(output)h(that)810 +2909 y(can)40 b(b)s(e)g(reused)f(as)h(input.)69 b(Bash-5.1)42 +b(suppresses)c(that)j(message)g(when)e(the)i Ft(-l)810 +3019 y Fu(option)31 b(is)f(supplied.)p eop end +%%Page: 107 113 +TeXDict begin 107 112 bop 3614 -116 a Fu(107)150 299 +y Fp(7)80 b(Job)54 b(Con)l(trol)150 518 y Fu(This)25 +b(c)m(hapter)i(discusses)f(what)g(job)f(con)m(trol)j(is,)f(ho)m(w)f(it) +h(w)m(orks,)g(and)f(ho)m(w)g(Bash)g(allo)m(ws)h(y)m(ou)g(to)g(access) +150 628 y(its)k(facilities.)150 863 y Fs(7.1)68 b(Job)45 +b(Con)l(trol)h(Basics)150 1022 y Fu(Job)27 b(con)m(trol)i(refers)e(to)h +(the)g(abilit)m(y)h(to)f(selectiv)m(ely)j(stop)c(\(susp)s(end\))f(the)i +(execution)h(of)e(pro)s(cesses)h(and)150 1132 y(con)m(tin)m(ue)38 +b(\(resume\))g(their)f(execution)h(at)g(a)g(later)g(p)s(oin)m(t.)61 +b(A)37 b(user)g(t)m(ypically)i(emplo)m(ys)f(this)f(facilit)m(y)150 +1241 y(via)27 b(an)e(in)m(teractiv)m(e)k(in)m(terface)f(supplied)d +(join)m(tly)h(b)m(y)g(the)h(op)s(erating)f(system)g(k)m(ernel's)h +(terminal)f(driv)m(er)150 1351 y(and)k(Bash.)275 1482 +y(The)23 b(shell)i(asso)s(ciates)h(a)f Fr(job)h Fu(with)e(eac)m(h)i +(pip)s(eline.)38 b(It)25 b(k)m(eeps)f(a)h(table)h(of)e(curren)m(tly)h +(executing)g(jobs,)150 1592 y(whic)m(h)33 b(ma)m(y)i(b)s(e)e(listed)h +(with)f(the)h Ft(jobs)f Fu(command.)50 b(When)33 b(Bash)h(starts)g(a)g +(job)g(async)m(hronously)-8 b(,)34 b(it)150 1701 y(prin)m(ts)c(a)h +(line)f(that)h(lo)s(oks)g(lik)m(e:)390 1833 y Ft([1])47 +b(25647)150 1965 y Fu(indicating)34 b(that)g(this)f(job)g(is)g(job)g(n) +m(um)m(b)s(er)f(1)i(and)f(that)g(the)h(pro)s(cess)f Fm(id)g +Fu(of)g(the)h(last)g(pro)s(cess)f(in)g(the)150 2074 y(pip)s(eline)42 +b(asso)s(ciated)i(with)e(this)g(job)g(is)h(25647.)78 +b(All)43 b(of)g(the)g(pro)s(cesses)f(in)g(a)h(single)g(pip)s(eline)f +(are)150 2184 y(mem)m(b)s(ers)30 b(of)g(the)h(same)f(job.)41 +b(Bash)30 b(uses)g(the)h Fr(job)h Fu(abstraction)f(as)g(the)g(basis)f +(for)g(job)g(con)m(trol.)275 2315 y(T)-8 b(o)23 b(facilitate)j(the)d +(implemen)m(tation)i(of)f(the)f(user)f(in)m(terface)j(to)f(job)f(con)m +(trol,)j(the)d(op)s(erating)h(system)150 2425 y(main)m(tains)j(the)f +(notion)h(of)f(a)g(curren)m(t)g(terminal)g(pro)s(cess)g(group)g +Fm(id)p Fu(.)39 b(Mem)m(b)s(ers)26 b(of)g(this)g(pro)s(cess)f(group)150 +2534 y(\(pro)s(cesses)h(whose)g(pro)s(cess)g(group)g +Fm(id)g Fu(is)h(equal)g(to)g(the)f(curren)m(t)g(terminal)h(pro)s(cess)f +(group)f Fm(id)p Fu(\))i(receiv)m(e)150 2644 y(k)m(eyb)s +(oard-generated)22 b(signals)g(suc)m(h)e(as)h Ft(SIGINT)p +Fu(.)36 b(These)21 b(pro)s(cesses)g(are)g(said)g(to)g(b)s(e)g(in)f(the) +h(foreground.)150 2754 y(Bac)m(kground)38 b(pro)s(cesses)f(are)h(those) +g(whose)f(pro)s(cess)g(group)g Fm(id)h Fu(di\013ers)f(from)g(the)g +(terminal's;)42 b(suc)m(h)150 2863 y(pro)s(cesses)24 +b(are)g(imm)m(une)g(to)g(k)m(eyb)s(oard-generated)h(signals.)40 +b(Only)23 b(foreground)g(pro)s(cesses)h(are)g(allo)m(w)m(ed)150 +2973 y(to)g(read)e(from)h(or,)h(if)f(the)g(user)f(so)i(sp)s(eci\014es)e +(with)h Ft(stty)29 b(tostop)p Fu(,)23 b(write)g(to)g(the)h(terminal.)38 +b(Bac)m(kground)150 3082 y(pro)s(cesses)27 b(whic)m(h)g(attempt)h(to)f +(read)g(from)g(\(write)g(to)h(when)e Ft(stty)j(tostop)d +Fu(is)h(in)f(e\013ect\))j(the)e(terminal)150 3192 y(are)32 +b(sen)m(t)g(a)g Ft(SIGTTIN)e Fu(\()p Ft(SIGTTOU)p Fu(\))g(signal)i(b)m +(y)g(the)g(k)m(ernel's)g(terminal)g(driv)m(er,)g(whic)m(h,)g(unless)f +(caugh)m(t,)150 3302 y(susp)s(ends)d(the)i(pro)s(cess.)275 +3433 y(If)k(the)i(op)s(erating)g(system)f(on)h(whic)m(h)f(Bash)g(is)h +(running)d(supp)s(orts)h(job)h(con)m(trol,)j(Bash)e(con)m(tains)150 +3543 y(facilities)30 b(to)f(use)f(it.)40 b(T)m(yping)28 +b(the)g Fr(susp)s(end)h Fu(c)m(haracter)h(\(t)m(ypically)g(`)p +Ft(^Z)p Fu(',)f(Con)m(trol-Z\))g(while)f(a)g(pro)s(cess)150 +3652 y(is)42 b(running)f(causes)i(that)g(pro)s(cess)f(to)h(b)s(e)f +(stopp)s(ed)f(and)h(returns)f(con)m(trol)j(to)f(Bash.)77 +b(T)m(yping)42 b(the)150 3762 y Fr(dela)m(y)m(ed)k(susp)s(end)f +Fu(c)m(haracter)h(\(t)m(ypically)g(`)p Ft(^Y)p Fu(',)i(Con)m(trol-Y\))e +(causes)e(the)h(pro)s(cess)e(to)i(b)s(e)f(stopp)s(ed)150 +3871 y(when)26 b(it)i(attempts)h(to)f(read)f(input)g(from)f(the)i +(terminal,)h(and)e(con)m(trol)h(to)g(b)s(e)f(returned)f(to)j(Bash.)39 +b(The)150 3981 y(user)e(then)g(manipulates)h(the)g(state)h(of)f(this)f +(job,)j(using)d(the)h Ft(bg)f Fu(command)g(to)h(con)m(tin)m(ue)h(it)f +(in)g(the)150 4091 y(bac)m(kground,)g(the)f Ft(fg)g Fu(command)f(to)i +(con)m(tin)m(ue)g(it)f(in)f(the)h(foreground,)h(or)f(the)g +Ft(kill)f Fu(command)g(to)150 4200 y(kill)27 b(it.)40 +b(A)27 b(`)p Ft(^Z)p Fu(')g(tak)m(es)h(e\013ect)g(immediately)-8 +b(,)29 b(and)d(has)h(the)f(additional)i(side)e(e\013ect)j(of)d(causing) +h(p)s(ending)150 4310 y(output)j(and)g(t)m(yp)s(eahead)h(to)g(b)s(e)e +(discarded.)275 4441 y(There)j(are)g(a)h(n)m(um)m(b)s(er)e(of)i(w)m(a)m +(ys)g(to)h(refer)e(to)h(a)g(job)f(in)g(the)h(shell.)47 +b(The)32 b(c)m(haracter)i(`)p Ft(\045)p Fu(')f(in)m(tro)s(duces)150 +4551 y(a)e(job)f(sp)s(eci\014cation)h(\()p Fr(jobsp)s(ec)6 +b Fu(\).)275 4682 y(Job)31 b(n)m(um)m(b)s(er)f Ft(n)h +Fu(ma)m(y)h(b)s(e)f(referred)g(to)h(as)g(`)p Ft(\045n)p +Fu('.)44 b(The)31 b(sym)m(b)s(ols)g(`)p Ft(\045\045)p +Fu(')h(and)f(`)p Ft(\045+)p Fu(')g(refer)h(to)g(the)g(shell's)150 +4792 y(notion)k(of)f(the)g(curren)m(t)g(job,)h(whic)m(h)f(is)g(the)g +(last)h(job)f(stopp)s(ed)f(while)h(it)h(w)m(as)g(in)e(the)i(foreground) +e(or)150 4902 y(started)27 b(in)g(the)g(bac)m(kground.)40 +b(A)27 b(single)g(`)p Ft(\045)p Fu(')g(\(with)g(no)g(accompan)m(ying)i +(job)d(sp)s(eci\014cation\))i(also)g(refers)150 5011 +y(to)k(the)e(curren)m(t)h(job.)42 b(The)30 b(previous)g(job)h(ma)m(y)g +(b)s(e)f(referenced)h(using)f(`)p Ft(\045-)p Fu('.)42 +b(If)30 b(there)h(is)g(only)g(a)g(single)150 5121 y(job,)g(`)p +Ft(\045+)p Fu(')g(and)f(`)p Ft(\045-)p Fu(')h(can)h(b)s(oth)e(b)s(e)g +(used)h(to)g(refer)g(to)h(that)g(job.)42 b(In)30 b(output)h(p)s +(ertaining)g(to)g(jobs)g(\(e.g.,)150 5230 y(the)39 b(output)f(of)g(the) +h Ft(jobs)e Fu(command\),)k(the)d(curren)m(t)h(job)f(is)g(alw)m(a)m(ys) +i(\015agged)f(with)f(a)h(`)p Ft(+)p Fu(',)i(and)d(the)150 +5340 y(previous)30 b(job)g(with)g(a)h(`)p Ft(-)p Fu('.)p +eop end +%%Page: 108 114 +TeXDict begin 108 113 bop 150 -116 a Fu(Chapter)30 b(7:)41 +b(Job)30 b(Con)m(trol)2526 b(108)275 299 y(A)38 b(job)g(ma)m(y)h(also)g +(b)s(e)f(referred)f(to)j(using)d(a)i(pre\014x)e(of)i(the)f(name)h(used) +e(to)i(start)g(it,)i(or)e(using)f(a)150 408 y(substring)g(that)j(app)s +(ears)e(in)g(its)h(command)f(line.)69 b(F)-8 b(or)41 +b(example,)i(`)p Ft(\045ce)p Fu(')c(refers)g(to)i(a)f(stopp)s(ed)e(job) +150 518 y(whose)30 b(command)g(name)g(b)s(egins)g(with)g(`)p +Ft(ce)p Fu('.)40 b(Using)31 b(`)p Ft(\045?ce)p Fu(',)f(on)g(the)g +(other)h(hand,)e(refers)h(to)h(an)m(y)f(job)150 628 y(con)m(taining)e +(the)e(string)h(`)p Ft(ce)p Fu(')f(in)g(its)h(command)f(line.)40 +b(If)26 b(the)g(pre\014x)g(or)g(substring)f(matc)m(hes)j(more)e(than) +150 737 y(one)31 b(job,)f(Bash)g(rep)s(orts)g(an)g(error.)275 +869 y(Simply)g(naming)h(a)g(job)g(can)g(b)s(e)f(used)h(to)g(bring)f(it) +i(in)m(to)g(the)f(foreground:)41 b(`)p Ft(\0451)p Fu(')31 +b(is)g(a)h(synon)m(ym)e(for)150 978 y(`)p Ft(fg)g(\0451)p +Fu(',)i(bringing)f(job)g(1)g(from)g(the)h(bac)m(kground)f(in)m(to)i +(the)e(foreground.)44 b(Similarly)-8 b(,)32 b(`)p Ft(\0451)e(&)p +Fu(')i(resumes)150 1088 y(job)e(1)h(in)f(the)g(bac)m(kground,)h(equiv) +-5 b(alen)m(t)32 b(to)f(`)p Ft(bg)f(\0451)p Fu(')275 +1219 y(The)g(shell)i(learns)f(immediately)i(whenev)m(er)e(a)h(job)f(c)m +(hanges)h(state.)45 b(Normally)-8 b(,)33 b(Bash)e(w)m(aits)i(un)m(til) +150 1329 y(it)25 b(is)g(ab)s(out)f(to)i(prin)m(t)e(a)h(prompt)f(b)s +(efore)g(rep)s(orting)h(c)m(hanges)g(in)g(a)g(job's)f(status)h(so)g(as) +g(to)g(not)g(in)m(terrupt)150 1439 y(an)m(y)k(other)f(output.)40 +b(If)28 b(the)g Ft(-b)g Fu(option)g(to)h(the)g Ft(set)e +Fu(builtin)h(is)g(enabled,)h(Bash)g(rep)s(orts)e(suc)m(h)h(c)m(hanges) +150 1548 y(immediately)d(\(see)g(Section)g(4.3.1)g([The)f(Set)g +(Builtin],)i(page)f(62\).)40 b(An)m(y)24 b(trap)f(on)h +Ft(SIGCHLD)e Fu(is)i(executed)150 1658 y(for)30 b(eac)m(h)i(c)m(hild)e +(pro)s(cess)g(that)h(exits.)275 1789 y(If)25 b(an)h(attempt)h(to)g +(exit)g(Bash)f(is)h(made)f(while)g(jobs)f(are)i(stopp)s(ed,)f(\(or)h +(running,)e(if)h(the)g Ft(checkjobs)150 1899 y Fu(option)e(is)f +(enabled)h({)g(see)g(Section)g(4.3.2)h([The)e(Shopt)g(Builtin],)j(page) +e(66\),)i(the)e(shell)f(prin)m(ts)g(a)h(w)m(arning)150 +2009 y(message,)k(and)c(if)i(the)f Ft(checkjobs)e Fu(option)j(is)f +(enabled,)i(lists)e(the)h(jobs)f(and)f(their)i(statuses.)39 +b(The)25 b Ft(jobs)150 2118 y Fu(command)36 b(ma)m(y)h(then)f(b)s(e)f +(used)g(to)i(insp)s(ect)f(their)g(status.)59 b(If)36 +b(a)g(second)g(attempt)i(to)f(exit)g(is)f(made)150 2228 +y(without)e(an)f(in)m(terv)m(ening)i(command,)f(Bash)g(do)s(es)f(not)h +(prin)m(t)g(another)f(w)m(arning,)i(and)e(an)m(y)h(stopp)s(ed)150 +2337 y(jobs)c(are)h(terminated.)275 2469 y(When)f(the)h(shell)g(is)f(w) +m(aiting)i(for)f(a)g(job)f(or)h(pro)s(cess)f(using)g(the)h +Ft(wait)f Fu(builtin,)g(and)g(job)h(con)m(trol)h(is)150 +2578 y(enabled,)i Ft(wait)f Fu(will)g(return)g(when)f(the)i(job)f(c)m +(hanges)h(state.)51 b(The)33 b Ft(-f)g Fu(option)h(causes)f +Ft(wait)g Fu(to)h(w)m(ait)150 2688 y(un)m(til)d(the)f(job)g(or)h(pro)s +(cess)f(terminates)h(b)s(efore)f(returning.)150 2923 +y Fs(7.2)68 b(Job)45 b(Con)l(trol)h(Builtins)150 3104 +y Ft(bg)870 3236 y(bg)h([)p Fj(jobspec)f Ft(...)o(])630 +3367 y Fu(Resume)24 b(eac)m(h)h(susp)s(ended)d(job)i +Fr(jobsp)s(ec)29 b Fu(in)24 b(the)g(bac)m(kground,)h(as)g(if)f(it)h +(had)e(b)s(een)g(started)630 3477 y(with)32 b(`)p Ft(&)p +Fu('.)45 b(If)31 b Fr(jobsp)s(ec)37 b Fu(is)32 b(not)g(supplied,)f(the) +h(curren)m(t)g(job)f(is)h(used.)45 b(The)31 b(return)g(status)630 +3586 y(is)i(zero)g(unless)f(it)h(is)g(run)e(when)h(job)g(con)m(trol)i +(is)f(not)g(enabled,)h(or,)f(when)f(run)f(with)h(job)630 +3696 y(con)m(trol)h(enabled,)g(an)m(y)f Fr(jobsp)s(ec)37 +b Fu(w)m(as)32 b(not)g(found)f(or)g(sp)s(eci\014es)h(a)g(job)g(that)g +(w)m(as)g(started)630 3806 y(without)e(job)g(con)m(trol.)150 +3959 y Ft(fg)870 4091 y(fg)47 b([)p Fj(jobspec)p Ft(])630 +4222 y Fu(Resume)c(the)g(job)g Fr(jobsp)s(ec)48 b Fu(in)43 +b(the)g(foreground)g(and)f(mak)m(e)j(it)e(the)h(curren)m(t)f(job.)78 +b(If)630 4332 y Fr(jobsp)s(ec)41 b Fu(is)c(not)f(supplied,)h(the)f +(curren)m(t)h(job)f(is)g(used.)58 b(The)36 b(return)f(status)h(is)h +(that)g(of)630 4441 y(the)d(command)g(placed)h(in)m(to)g(the)f +(foreground,)g(or)g(non-zero)h(if)f(run)f(when)g(job)g(con)m(trol)630 +4551 y(is)i(disabled)g(or,)i(when)d(run)g(with)h(job)g(con)m(trol)h +(enabled,)h Fr(jobsp)s(ec)j Fu(do)s(es)35 b(not)h(sp)s(ecify)f(a)630 +4660 y(v)-5 b(alid)31 b(job)f(or)g Fr(jobsp)s(ec)35 b +Fu(sp)s(eci\014es)30 b(a)h(job)f(that)h(w)m(as)g(started)g(without)f +(job)g(con)m(trol.)150 4814 y Ft(jobs)870 4945 y(jobs)47 +b([-lnprs])e([)p Fj(jobspec)p Ft(])870 5055 y(jobs)i(-x)g +Fj(command)f Ft([)p Fj(arguments)p Ft(])630 5187 y Fu(The)30 +b(\014rst)f(form)h(lists)h(the)g(activ)m(e)h(jobs.)41 +b(The)30 b(options)g(ha)m(v)m(e)i(the)e(follo)m(wing)i(meanings:)630 +5340 y Ft(-l)384 b Fu(List)31 b(pro)s(cess)f Fm(id)p +Fu(s)g(in)g(addition)h(to)g(the)f(normal)h(information.)p +eop end +%%Page: 109 115 +TeXDict begin 109 114 bop 150 -116 a Fu(Chapter)30 b(7:)41 +b(Job)30 b(Con)m(trol)2526 b(109)630 299 y Ft(-n)384 +b Fu(Displa)m(y)26 b(information)f(only)h(ab)s(out)e(jobs)h(that)g(ha)m +(v)m(e)i(c)m(hanged)e(status)h(since)1110 408 y(the)31 +b(user)e(w)m(as)i(last)g(noti\014ed)f(of)h(their)f(status.)630 +583 y Ft(-p)384 b Fu(List)31 b(only)f(the)h(pro)s(cess)f +Fm(id)g Fu(of)h(the)f(job's)g(pro)s(cess)g(group)g(leader.)630 +757 y Ft(-r)384 b Fu(Displa)m(y)32 b(only)e(running)f(jobs.)630 +931 y Ft(-s)384 b Fu(Displa)m(y)32 b(only)e(stopp)s(ed)f(jobs.)630 +1105 y(If)23 b Fr(jobsp)s(ec)28 b Fu(is)23 b(giv)m(en,)i(output)e(is)g +(restricted)h(to)g(information)f(ab)s(out)g(that)h(job.)37 +b(If)23 b Fr(jobsp)s(ec)630 1214 y Fu(is)30 b(not)h(supplied,)e(the)i +(status)g(of)f(all)h(jobs)f(is)h(listed.)630 1356 y(If)k(the)g +Ft(-x)f Fu(option)i(is)f(supplied,)g Ft(jobs)f Fu(replaces)i(an)m(y)f +Fr(jobsp)s(ec)40 b Fu(found)34 b(in)h Fr(command)j Fu(or)630 +1466 y Fr(argumen)m(ts)j Fu(with)c(the)h(corresp)s(onding)e(pro)s(cess) +h(group)f Fm(id)p Fu(,)k(and)c(executes)j Fr(command)p +Fu(,)630 1575 y(passing)30 b(it)h Fr(argumen)m(t)r Fu(s,)g(returning)f +(its)g(exit)i(status.)150 1749 y Ft(kill)870 1891 y(kill)47 +b([-s)g Fj(sigspec)p Ft(])e([-n)i Fj(signum)p Ft(])f([-)p +Fj(sigspec)p Ft(])f Fj(jobspec)h Ft(or)h Fj(pid)870 2001 +y Ft(kill)g(-l|-L)f([)p Fj(exit_status)p Ft(])630 2143 +y Fu(Send)22 b(a)i(signal)g(sp)s(eci\014ed)f(b)m(y)g +Fr(sigsp)s(ec)29 b Fu(or)24 b Fr(sign)m(um)f Fu(to)h(the)g(pro)s(cess)f +(named)g(b)m(y)g(job)g(sp)s(eci\014-)630 2252 y(cation)k +Fr(jobsp)s(ec)j Fu(or)25 b(pro)s(cess)g Fm(id)h Fr(pid)p +Fu(.)38 b Fr(sigsp)s(ec)31 b Fu(is)25 b(either)h(a)g(case-insensitiv)m +(e)i(signal)e(name)630 2362 y(suc)m(h)37 b(as)g Ft(SIGINT)f +Fu(\(with)h(or)g(without)g(the)g Ft(SIG)g Fu(pre\014x\))f(or)h(a)h +(signal)g(n)m(um)m(b)s(er;)h Fr(sign)m(um)630 2471 y +Fu(is)g(a)f(signal)i(n)m(um)m(b)s(er.)63 b(If)39 b Fr(sigsp)s(ec)44 +b Fu(and)38 b Fr(sign)m(um)g Fu(are)h(not)g(presen)m(t,)h +Ft(SIGTERM)d Fu(is)h(used.)630 2581 y(The)27 b Ft(-l)h +Fu(option)g(lists)h(the)f(signal)h(names.)39 b(If)28 +b(an)m(y)g(argumen)m(ts)h(are)f(supplied)f(when)g Ft(-l)g +Fu(is)630 2690 y(giv)m(en,)32 b(the)g(names)e(of)i(the)f(signals)g +(corresp)s(onding)f(to)i(the)f(argumen)m(ts)g(are)h(listed,)g(and)630 +2800 y(the)c(return)f(status)h(is)g(zero.)41 b Fr(exit)p +1796 2800 28 4 v 41 w(status)32 b Fu(is)c(a)g(n)m(um)m(b)s(er)f(sp)s +(ecifying)g(a)i(signal)f(n)m(um)m(b)s(er)f(or)630 2910 +y(the)h(exit)h(status)g(of)f(a)h(pro)s(cess)e(terminated)i(b)m(y)f(a)h +(signal.)40 b(The)28 b Ft(-L)g Fu(option)g(is)g(equiv)-5 +b(alen)m(t)630 3019 y(to)34 b Ft(-l)p Fu(.)47 b(The)32 +b(return)g(status)h(is)g(zero)g(if)g(at)g(least)h(one)f(signal)h(w)m +(as)f(successfully)g(sen)m(t,)h(or)630 3129 y(non-zero)d(if)f(an)h +(error)f(o)s(ccurs)g(or)g(an)g(in)m(v)-5 b(alid)31 b(option)g(is)f +(encoun)m(tered.)150 3303 y Ft(wait)870 3445 y(wait)47 +b([-fn])f([-p)h Fj(varname)p Ft(])e([)p Fj(jobspec)h +Ft(or)h Fj(pid)g Ft(...)o(])630 3587 y Fu(W)-8 b(ait)28 +b(un)m(til)f(the)f(c)m(hild)h(pro)s(cess)f(sp)s(eci\014ed)g(b)m(y)g +(eac)m(h)h(pro)s(cess)f Fm(id)h Fr(pid)i Fu(or)d(job)g(sp)s +(eci\014cation)630 3696 y Fr(jobsp)s(ec)40 b Fu(exits)35 +b(and)f(return)g(the)g(exit)i(status)f(of)g(the)g(last)g(command)f(w)m +(aited)i(for.)53 b(If)35 b(a)630 3806 y(job)g(sp)s(ec)f(is)h(giv)m(en,) +i(all)f(pro)s(cesses)f(in)f(the)h(job)g(are)g(w)m(aited)h(for.)54 +b(If)35 b(no)f(argumen)m(ts)i(are)630 3915 y(giv)m(en,)28 +b Ft(wait)c Fu(w)m(aits)j(for)e(all)i(running)c(bac)m(kground)j(jobs)f +(and)g(the)h(last-executed)h(pro)s(cess)630 4025 y(substitution,)37 +b(if)f(its)g(pro)s(cess)f(id)h(is)f(the)h(same)g(as)g +Fr($!)p Fu(,)i(and)d(the)h(return)f(status)h(is)g(zero.)630 +4134 y(If)h(the)h Ft(-n)f Fu(option)h(is)f(supplied,)i +Ft(wait)d Fu(w)m(aits)j(for)e(a)h(single)g(job)f(from)g(the)h(list)g +(of)g Fr(pids)630 4244 y Fu(or)31 b Fr(jobsp)s(ecs)k +Fu(or,)d(if)f(no)g(argumen)m(ts)h(are)g(supplied,)e(an)m(y)i(job,)f(to) +i(complete)f(and)f(returns)630 4354 y(its)36 b(exit)h(status.)56 +b(If)35 b(none)h(of)g(the)g(supplied)e(argumen)m(ts)i(is)f(a)h(c)m +(hild)g(of)g(the)g(shell,)h(or)f(if)630 4463 y(no)31 +b(argumen)m(ts)g(are)g(supplied)f(and)g(the)h(shell)g(has)g(no)f(un)m +(w)m(aited-for)i(c)m(hildren,)f(the)g(exit)630 4573 y(status)k(is)g +(127.)55 b(If)34 b(the)h Ft(-p)g Fu(option)g(is)g(supplied,)f(the)h +(pro)s(cess)g(or)f(job)h(iden)m(ti\014er)g(of)g(the)630 +4682 y(job)j(for)g(whic)m(h)f(the)i(exit)g(status)f(is)g(returned)f(is) +h(assigned)h(to)g(the)f(v)-5 b(ariable)39 b Fr(v)-5 b(arname)630 +4792 y Fu(named)29 b(b)m(y)f(the)i(option)f(argumen)m(t.)41 +b(The)28 b(v)-5 b(ariable)30 b(will)g(b)s(e)e(unset)h(initially)-8 +b(,)31 b(b)s(efore)e(an)m(y)630 4902 y(assignmen)m(t.)76 +b(This)41 b(is)h(useful)f(only)h(when)f(the)h Ft(-n)f +Fu(option)i(is)f(supplied.)74 b(Supplying)630 5011 y(the)39 +b Ft(-f)f Fu(option,)k(when)37 b(job)i(con)m(trol)h(is)f(enabled,)i +(forces)e Ft(wait)e Fu(to)j(w)m(ait)g(for)e(eac)m(h)i +Fr(pid)630 5121 y Fu(or)29 b Fr(jobsp)s(ec)34 b Fu(to)c(terminate)g(b)s +(efore)f(returning)f(its)h(status,)h(in)m(tead)g(of)f(returning)f(when) +g(it)630 5230 y(c)m(hanges)37 b(status.)58 b(If)35 b(neither)h +Fr(jobsp)s(ec)41 b Fu(nor)36 b Fr(pid)i Fu(sp)s(eci\014es)e(an)g(activ) +m(e)i(c)m(hild)e(pro)s(cess)g(of)630 5340 y(the)31 b(shell,)f(the)h +(return)e(status)i(is)f(127.)p eop end +%%Page: 110 116 +TeXDict begin 110 115 bop 150 -116 a Fu(Chapter)30 b(7:)41 +b(Job)30 b(Con)m(trol)2526 b(110)150 299 y Ft(disown)870 +433 y(disown)46 b([-ar])g([-h])h([)p Fj(jobspec)f Ft(...)h(|)g +Fj(pid)g Ft(...)g(])630 568 y Fu(Without)33 b(options,)h(remo)m(v)m(e)g +(eac)m(h)f Fr(jobsp)s(ec)38 b Fu(from)32 b(the)h(table)g(of)g(activ)m +(e)h(jobs.)47 b(If)32 b(the)h Ft(-h)630 677 y Fu(option)j(is)f(giv)m +(en,)i(the)f(job)f(is)g(not)g(remo)m(v)m(ed)h(from)f(the)g(table,)j +(but)c(is)i(mark)m(ed)f(so)g(that)630 787 y Ft(SIGHUP)e +Fu(is)j(not)f(sen)m(t)h(to)g(the)f(job)g(if)g(the)g(shell)h(receiv)m +(es)h(a)e Ft(SIGHUP)p Fu(.)54 b(If)34 b Fr(jobsp)s(ec)40 +b Fu(is)c(not)630 897 y(presen)m(t,)41 b(and)d(neither)h(the)g +Ft(-a)f Fu(nor)g(the)h Ft(-r)f Fu(option)h(is)g(supplied,)g(the)g +(curren)m(t)g(job)f(is)630 1006 y(used.)g(If)25 b(no)h +Fr(jobsp)s(ec)k Fu(is)c(supplied,)f(the)h Ft(-a)f Fu(option)h(means)g +(to)g(remo)m(v)m(e)h(or)e(mark)h(all)g(jobs;)630 1116 +y(the)31 b Ft(-r)e Fu(option)i(without)g(a)f Fr(jobsp)s(ec)36 +b Fu(argumen)m(t)30 b(restricts)h(op)s(eration)g(to)g(running)e(jobs.) +150 1275 y Ft(suspend)870 1410 y(suspend)46 b([-f])630 +1544 y Fu(Susp)s(end)31 b(the)i(execution)h(of)g(this)f(shell)g(un)m +(til)h(it)g(receiv)m(es)h(a)e Ft(SIGCONT)f Fu(signal.)50 +b(A)33 b(login)630 1654 y(shell)28 b(cannot)g(b)s(e)f(susp)s(ended;)g +(the)g Ft(-f)g Fu(option)i(can)f(b)s(e)f(used)g(to)h(o)m(v)m(erride)h +(this)e(and)g(force)630 1763 y(the)k(susp)s(ension.)275 +1923 y(When)f(job)f(con)m(trol)j(is)e(not)h(activ)m(e,)i(the)d +Ft(kill)f Fu(and)h Ft(wait)f Fu(builtins)g(do)h(not)h(accept)h +Fr(jobsp)s(ec)j Fu(argu-)150 2032 y(men)m(ts.)41 b(They)30 +b(m)m(ust)g(b)s(e)g(supplied)f(pro)s(cess)h Fm(id)p Fu(s.)150 +2273 y Fs(7.3)68 b(Job)45 b(Con)l(trol)h(V)-11 b(ariables)150 +2457 y Ft(auto_resume)630 2567 y Fu(This)31 b(v)-5 b(ariable)32 +b(con)m(trols)g(ho)m(w)g(the)f(shell)h(in)m(teracts)h(with)e(the)h +(user)e(and)h(job)g(con)m(trol.)45 b(If)630 2677 y(this)28 +b(v)-5 b(ariable)30 b(exists)f(then)f(single)h(w)m(ord)f(simple)h +(commands)f(without)g(redirections)i(are)630 2786 y(treated)h(as)g +(candidates)f(for)g(resumption)g(of)g(an)g(existing)h(job.)41 +b(There)29 b(is)h(no)h(am)m(biguit)m(y)630 2896 y(allo)m(w)m(ed;)f(if)d +(there)g(is)g(more)g(than)f(one)h(job)g(b)s(eginning)f(with)g(the)h +(string)g(t)m(yp)s(ed,)g(then)g(the)630 3005 y(most)j(recen)m(tly)h +(accessed)f(job)f(will)h(b)s(e)f(selected.)42 b(The)29 +b(name)g(of)h(a)g(stopp)s(ed)e(job,)i(in)f(this)630 3115 +y(con)m(text,)h(is)e(the)g(command)g(line)g(used)f(to)h(start)g(it.)41 +b(If)27 b(this)h(v)-5 b(ariable)28 b(is)g(set)g(to)h(the)e(v)-5 +b(alue)630 3225 y(`)p Ft(exact)p Fu(',)33 b(the)g(string)g(supplied)f +(m)m(ust)h(matc)m(h)g(the)h(name)f(of)g(a)g(stopp)s(ed)f(job)h +(exactly;)j(if)630 3334 y(set)29 b(to)h(`)p Ft(substring)p +Fu(',)d(the)i(string)g(supplied)e(needs)i(to)g(matc)m(h)h(a)f +(substring)f(of)h(the)g(name)630 3444 y(of)38 b(a)f(stopp)s(ed)g(job.) +62 b(The)37 b(`)p Ft(substring)p Fu(')e(v)-5 b(alue)38 +b(pro)m(vides)f(functionalit)m(y)i(analogous)g(to)630 +3553 y(the)c(`)p Ft(\045?)p Fu(')g(job)g Fm(id)g Fu(\(see)h(Section)g +(7.1)g([Job)e(Con)m(trol)i(Basics],)i(page)e(107\).)56 +b(If)34 b(set)i(to)g(an)m(y)630 3663 y(other)c(v)-5 b(alue,)32 +b(the)g(supplied)e(string)i(m)m(ust)f(b)s(e)g(a)h(pre\014x)f(of)h(a)g +(stopp)s(ed)e(job's)i(name;)g(this)630 3773 y(pro)m(vides)e +(functionalit)m(y)i(analogous)g(to)f(the)g(`)p Ft(\045)p +Fu(')f(job)g Fm(id)p Fu(.)p eop end +%%Page: 111 117 +TeXDict begin 111 116 bop 3614 -116 a Fu(111)150 299 +y Fp(8)80 b(Command)54 b(Line)f(Editing)150 635 y Fu(This)28 +b(c)m(hapter)i(describ)s(es)e(the)h(basic)g(features)h(of)f(the)g +Fm(gnu)f Fu(command)h(line)g(editing)h(in)m(terface.)42 +b(Com-)150 745 y(mand)c(line)i(editing)f(is)g(pro)m(vided)g(b)m(y)g +(the)g(Readline)h(library)-8 b(,)41 b(whic)m(h)e(is)g(used)f(b)m(y)h +(sev)m(eral)h(di\013eren)m(t)150 855 y(programs,)34 b(including)e +(Bash.)49 b(Command)32 b(line)i(editing)f(is)g(enabled)g(b)m(y)g +(default)g(when)f(using)h(an)g(in-)150 964 y(teractiv)m(e)h(shell,)d +(unless)g(the)g Ft(--noediting)d Fu(option)k(is)f(supplied)e(at)j +(shell)f(in)m(v)m(o)s(cation.)45 b(Line)31 b(editing)150 +1074 y(is)g(also)h(used)f(when)f(using)h(the)g Ft(-e)g +Fu(option)h(to)g(the)f Ft(read)f Fu(builtin)h(command)g(\(see)h +(Section)g(4.2)h([Bash)150 1183 y(Builtins],)j(page)f(51\).)52 +b(By)35 b(default,)g(the)f(line)h(editing)f(commands)g(are)h(similar)f +(to)h(those)f(of)g(Emacs.)150 1293 y(A)h(vi-st)m(yle)h(line)f(editing)g +(in)m(terface)h(is)e(also)i(a)m(v)-5 b(ailable.)55 b(Line)34 +b(editing)h(can)g(b)s(e)f(enabled)g(at)h(an)m(y)g(time)150 +1402 y(using)h(the)g Ft(-o)30 b(emacs)35 b Fu(or)h Ft(-o)30 +b(vi)35 b Fu(options)i(to)g(the)f Ft(set)f Fu(builtin)h(command)g +(\(see)h(Section)g(4.3.1)h([The)150 1512 y(Set)31 b(Builtin],)g(page)g +(62\),)h(or)e(disabled)g(using)g(the)h Ft(+o)e(emacs)g +Fu(or)i Ft(+o)e(vi)h Fu(options)h(to)g Ft(set)p Fu(.)150 +1804 y Fs(8.1)68 b(In)l(tro)t(duction)45 b(to)g(Line)h(Editing)150 +1963 y Fu(The)30 b(follo)m(wing)i(paragraphs)d(describ)s(e)h(the)h +(notation)g(used)f(to)h(represen)m(t)f(k)m(eystrok)m(es.)275 +2132 y(The)35 b(text)i Fj(C-k)f Fu(is)g(read)g(as)h(`Con)m(trol-K')g +(and)f(describ)s(es)f(the)h(c)m(haracter)i(pro)s(duced)d(when)g(the)h +Ft(k)150 2242 y Fu(k)m(ey)31 b(is)g(pressed)e(while)h(the)h(Con)m(trol) +g(k)m(ey)g(is)g(depressed.)275 2410 y(The)g(text)i Fj(M-k)e +Fu(is)h(read)f(as)i(`Meta-K')g(and)f(describ)s(es)f(the)h(c)m(haracter) +h(pro)s(duced)e(when)f(the)i(Meta)150 2520 y(k)m(ey)i(\(if)f(y)m(ou)h +(ha)m(v)m(e)g(one\))g(is)f(depressed,)g(and)f(the)h Ft(k)g +Fu(k)m(ey)h(is)f(pressed.)48 b(The)32 b(Meta)j(k)m(ey)e(is)h(lab)s +(eled)f Ft(ALT)150 2629 y Fu(on)c(man)m(y)h(k)m(eyb)s(oards.)40 +b(On)29 b(k)m(eyb)s(oards)g(with)h(t)m(w)m(o)h(k)m(eys)f(lab)s(eled)g +Ft(ALT)e Fu(\(usually)i(to)g(either)g(side)g(of)g(the)150 +2739 y(space)h(bar\),)f(the)g Ft(ALT)f Fu(on)h(the)g(left)h(side)f(is)g +(generally)h(set)f(to)h(w)m(ork)f(as)g(a)h(Meta)g(k)m(ey)-8 +b(.)42 b(The)29 b Ft(ALT)g Fu(k)m(ey)i(on)150 2849 y(the)c(righ)m(t)h +(ma)m(y)g(also)g(b)s(e)f(con\014gured)f(to)i(w)m(ork)f(as)h(a)f(Meta)i +(k)m(ey)f(or)f(ma)m(y)h(b)s(e)e(con\014gured)h(as)g(some)h(other)150 +2958 y(mo)s(di\014er,)i(suc)m(h)g(as)g(a)h(Comp)s(ose)f(k)m(ey)h(for)f +(t)m(yping)h(accen)m(ted)h(c)m(haracters.)275 3127 y(If)23 +b(y)m(ou)i(do)f(not)h(ha)m(v)m(e)h(a)f(Meta)g(or)g Ft(ALT)e +Fu(k)m(ey)-8 b(,)27 b(or)e(another)f(k)m(ey)i(w)m(orking)e(as)h(a)g +(Meta)h(k)m(ey)-8 b(,)27 b(the)d(iden)m(tical)150 3236 +y(k)m(eystrok)m(e)30 b(can)f(b)s(e)f(generated)h(b)m(y)g(t)m(yping)g +Ft(ESC)e Fl(\014rst)p Fu(,)j(and)e(then)g(t)m(yping)h +Ft(k)p Fu(.)40 b(Either)28 b(pro)s(cess)g(is)g(kno)m(wn)150 +3346 y(as)j Fr(metafying)39 b Fu(the)30 b Ft(k)g Fu(k)m(ey)-8 +b(.)275 3515 y(The)39 b(text)j Fj(M-C-k)d Fu(is)h(read)g(as)h +(`Meta-Con)m(trol-k')j(and)39 b(describ)s(es)h(the)g(c)m(haracter)i +(pro)s(duced)d(b)m(y)150 3624 y Fr(metafying)g Fj(C-k)p +Fu(.)275 3793 y(In)c(addition,)j(sev)m(eral)f(k)m(eys)g(ha)m(v)m(e)g +(their)f(o)m(wn)g(names.)58 b(Sp)s(eci\014cally)-8 b(,)38 +b Ft(DEL)p Fu(,)f Ft(ESC)p Fu(,)g Ft(LFD)p Fu(,)g Ft(SPC)p +Fu(,)g Ft(RET)p Fu(,)150 3902 y(and)d Ft(TAB)f Fu(all)j(stand)e(for)g +(themselv)m(es)i(when)d(seen)i(in)f(this)g(text,)j(or)d(in)h(an)f(init) +h(\014le)f(\(see)i(Section)f(8.3)150 4012 y([Readline)f(Init)g(File],)i +(page)e(114\).)52 b(If)33 b(y)m(our)g(k)m(eyb)s(oard)h(lac)m(ks)g(a)g +Ft(LFD)f Fu(k)m(ey)-8 b(,)36 b(t)m(yping)e Ft(C-j)e Fu(will)i(pro)s +(duce)150 4122 y(the)d(desired)e(c)m(haracter.)43 b(The)30 +b Ft(RET)f Fu(k)m(ey)i(ma)m(y)g(b)s(e)f(lab)s(eled)h +Ft(Return)d Fu(or)j Ft(Enter)d Fu(on)j(some)g(k)m(eyb)s(oards.)150 +4413 y Fs(8.2)68 b(Readline)47 b(In)l(teraction)150 4573 +y Fu(Often)32 b(during)g(an)g(in)m(teractiv)m(e)j(session)e(y)m(ou)g(t) +m(yp)s(e)g(in)f(a)h(long)g(line)g(of)f(text,)j(only)d(to)i(notice)g +(that)f(the)150 4682 y(\014rst)f(w)m(ord)g(on)g(the)g(line)h(is)g +(missp)s(elled.)46 b(The)32 b(Readline)h(library)f(giv)m(es)h(y)m(ou)g +(a)g(set)g(of)f(commands)g(for)150 4792 y(manipulating)e(the)g(text)h +(as)f(y)m(ou)g(t)m(yp)s(e)g(it)g(in,)g(allo)m(wing)h(y)m(ou)f(to)h +(just)e(\014x)g(y)m(our)h(t)m(yp)s(o,)g(and)g(not)g(forcing)150 +4902 y(y)m(ou)e(to)h(ret)m(yp)s(e)g(the)f(ma)5 b(jorit)m(y)29 +b(of)f(the)h(line.)40 b(Using)28 b(these)h(editing)g(commands,)f(y)m +(ou)h(mo)m(v)m(e)g(the)g(cursor)150 5011 y(to)35 b(the)f(place)i(that)e +(needs)g(correction,)j(and)d(delete)h(or)f(insert)h(the)f(text)h(of)g +(the)f(corrections.)54 b(Then,)150 5121 y(when)24 b(y)m(ou)h(are)g +(satis\014ed)g(with)g(the)g(line,)i(y)m(ou)e(simply)f(press)g +Ft(RET)p Fu(.)39 b(Y)-8 b(ou)25 b(do)g(not)g(ha)m(v)m(e)h(to)g(b)s(e)e +(at)h(the)h(end)150 5230 y(of)33 b(the)h(line)g(to)g(press)e +Ft(RET)p Fu(;)i(the)g(en)m(tire)g(line)f(is)h(accepted)g(regardless)g +(of)f(the)h(lo)s(cation)h(of)e(the)h(cursor)150 5340 +y(within)c(the)g(line.)p eop end +%%Page: 112 118 +TeXDict begin 112 117 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(112)150 299 y Fk(8.2.1)63 +b(Readline)40 b(Bare)h(Essen)m(tials)150 446 y Fu(In)31 +b(order)h(to)h(en)m(ter)g(c)m(haracters)g(in)m(to)g(the)g(line,)g +(simply)e(t)m(yp)s(e)i(them.)46 b(The)31 b(t)m(yp)s(ed)h(c)m(haracter)i +(app)s(ears)150 555 y(where)e(the)h(cursor)e(w)m(as,)j(and)e(then)g +(the)h(cursor)e(mo)m(v)m(es)j(one)f(space)g(to)g(the)g(righ)m(t.)47 +b(If)32 b(y)m(ou)h(mist)m(yp)s(e)g(a)150 665 y(c)m(haracter,)f(y)m(ou)f +(can)g(use)f(y)m(our)g(erase)h(c)m(haracter)h(to)f(bac)m(k)g(up)f(and)f +(delete)j(the)f(mist)m(yp)s(ed)e(c)m(haracter.)275 806 +y(Sometimes)i(y)m(ou)g(ma)m(y)h(mist)m(yp)s(e)e(a)i(c)m(haracter,)g +(and)e(not)i(notice)g(the)f(error)f(un)m(til)h(y)m(ou)g(ha)m(v)m(e)h(t) +m(yp)s(ed)150 916 y(sev)m(eral)e(other)f(c)m(haracters.)42 +b(In)28 b(that)i(case,)g(y)m(ou)f(can)g(t)m(yp)s(e)h +Fj(C-b)d Fu(to)j(mo)m(v)m(e)g(the)f(cursor)g(to)g(the)g(left,)i(and)150 +1026 y(then)f(correct)i(y)m(our)e(mistak)m(e.)42 b(Afterw)m(ards,)31 +b(y)m(ou)f(can)h(mo)m(v)m(e)h(the)e(cursor)g(to)h(the)g(righ)m(t)g +(with)f Fj(C-f)p Fu(.)275 1167 y(When)i(y)m(ou)h(add)f(text)h(in)f(the) +h(middle)f(of)h(a)g(line,)h(y)m(ou)e(will)h(notice)h(that)f(c)m +(haracters)h(to)g(the)e(righ)m(t)150 1277 y(of)d(the)g(cursor)f(are)h +(`pushed)e(o)m(v)m(er')j(to)g(mak)m(e)f(ro)s(om)g(for)f(the)h(text)h +(that)f(y)m(ou)g(ha)m(v)m(e)h(inserted.)40 b(Lik)m(ewise,)150 +1386 y(when)d(y)m(ou)g(delete)i(text)g(b)s(ehind)c(the)j(cursor,)h(c)m +(haracters)g(to)f(the)g(righ)m(t)g(of)g(the)g(cursor)e(are)i(`pulled) +150 1496 y(bac)m(k')24 b(to)f(\014ll)g(in)f(the)h(blank)f(space)i +(created)f(b)m(y)g(the)g(remo)m(v)-5 b(al)24 b(of)f(the)g(text.)39 +b(A)23 b(list)g(of)g(the)g(bare)f(essen)m(tials)150 1605 +y(for)30 b(editing)h(the)g(text)g(of)g(an)f(input)f(line)i(follo)m(ws.) +150 1775 y Fj(C-b)336 b Fu(Mo)m(v)m(e)32 b(bac)m(k)g(one)e(c)m +(haracter.)150 1941 y Fj(C-f)336 b Fu(Mo)m(v)m(e)32 b(forw)m(ard)e(one) +h(c)m(haracter.)150 2108 y Ft(DEL)e Fu(or)i Ft(Backspace)630 +2217 y Fu(Delete)i(the)d(c)m(haracter)i(to)f(the)g(left)g(of)f(the)h +(cursor.)150 2384 y Fj(C-d)336 b Fu(Delete)33 b(the)d(c)m(haracter)i +(underneath)d(the)i(cursor.)150 2550 y(Prin)m(ting)g(c)m(haracters)630 +2660 y(Insert)f(the)g(c)m(haracter)i(in)m(to)g(the)e(line)h(at)g(the)g +(cursor.)150 2826 y Fj(C-_)e Fu(or)i Fj(C-x)e(C-u)630 +2936 y Fu(Undo)k(the)h(last)g(editing)g(command.)50 b(Y)-8 +b(ou)34 b(can)f(undo)g(all)h(the)f(w)m(a)m(y)i(bac)m(k)f(to)g(an)g +(empt)m(y)630 3045 y(line.)150 3215 y(\(Dep)s(ending)29 +b(on)h(y)m(our)f(con\014guration,)i(the)e Ft(Backspace)e +Fu(k)m(ey)k(b)s(e)d(set)j(to)f(delete)h(the)e(c)m(haracter)i(to)g(the) +150 3324 y(left)37 b(of)f(the)h(cursor)e(and)h(the)g +Ft(DEL)g Fu(k)m(ey)h(set)f(to)h(delete)h(the)e(c)m(haracter)i +(underneath)d(the)h(cursor,)i(lik)m(e)150 3434 y Fj(C-d)p +Fu(,)30 b(rather)g(than)g(the)h(c)m(haracter)h(to)f(the)f(left)h(of)g +(the)f(cursor.\))150 3640 y Fk(8.2.2)63 b(Readline)40 +b(Mo)m(v)m(emen)m(t)h(Commands)150 3787 y Fu(The)27 b(ab)s(o)m(v)m(e)i +(table)g(describ)s(es)e(the)g(most)i(basic)f(k)m(eystrok)m(es)h(that)f +(y)m(ou)g(need)g(in)f(order)g(to)i(do)e(editing)i(of)150 +3897 y(the)k(input)f(line.)49 b(F)-8 b(or)34 b(y)m(our)f(con)m(v)m +(enience,)j(man)m(y)d(other)g(commands)f(ha)m(v)m(e)j(b)s(een)d(added)g +(in)h(addition)150 4006 y(to)j Fj(C-b)p Fu(,)f Fj(C-f)p +Fu(,)g Fj(C-d)p Fu(,)h(and)e Ft(DEL)p Fu(.)54 b(Here)35 +b(are)g(some)h(commands)e(for)h(mo)m(ving)h(more)f(rapidly)f(ab)s(out)h +(the)150 4116 y(line.)150 4286 y Fj(C-a)336 b Fu(Mo)m(v)m(e)32 +b(to)g(the)e(start)h(of)g(the)f(line.)150 4452 y Fj(C-e)336 +b Fu(Mo)m(v)m(e)32 b(to)g(the)e(end)g(of)g(the)h(line.)150 +4618 y Fj(M-f)336 b Fu(Mo)m(v)m(e)32 b(forw)m(ard)e(a)h(w)m(ord,)f +(where)g(a)h(w)m(ord)f(is)g(comp)s(osed)g(of)h(letters)h(and)d(digits.) +150 4785 y Fj(M-b)336 b Fu(Mo)m(v)m(e)32 b(bac)m(kw)m(ard)f(a)g(w)m +(ord.)150 4951 y Fj(C-l)336 b Fu(Clear)31 b(the)f(screen,)h(reprin)m +(ting)f(the)h(curren)m(t)f(line)h(at)g(the)f(top.)275 +5121 y(Notice)c(ho)m(w)f Fj(C-f)e Fu(mo)m(v)m(es)j(forw)m(ard)e(a)h(c)m +(haracter,)j(while)d Fj(M-f)e Fu(mo)m(v)m(es)j(forw)m(ard)e(a)h(w)m +(ord.)39 b(It)24 b(is)h(a)g(lo)s(ose)150 5230 y(con)m(v)m(en)m(tion)32 +b(that)f(con)m(trol)g(k)m(eystrok)m(es)h(op)s(erate)e(on)g(c)m +(haracters)h(while)f(meta)h(k)m(eystrok)m(es)h(op)s(erate)e(on)150 +5340 y(w)m(ords.)p eop end +%%Page: 113 119 +TeXDict begin 113 118 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(113)150 299 y Fk(8.2.3)63 +b(Readline)40 b(Killing)i(Commands)150 446 y Fr(Killing)35 +b Fu(text)28 b(means)e(to)h(delete)h(the)f(text)g(from)g(the)f(line,)i +(but)e(to)h(sa)m(v)m(e)h(it)g(a)m(w)m(a)m(y)g(for)e(later)i(use,)f +(usually)150 555 y(b)m(y)g Fr(y)m(anking)35 b Fu(\(re-inserting\))28 +b(it)g(bac)m(k)f(in)m(to)h(the)f(line.)40 b(\(`Cut')27 +b(and)g(`paste')h(are)f(more)g(recen)m(t)h(jargon)f(for)150 +665 y(`kill')32 b(and)d(`y)m(ank'.\))275 801 y(If)g(the)i(description)f +(for)g(a)h(command)f(sa)m(ys)g(that)h(it)g(`kills')g(text,)h(then)e(y)m +(ou)g(can)h(b)s(e)e(sure)h(that)h(y)m(ou)150 911 y(can)g(get)g(the)g +(text)g(bac)m(k)g(in)f(a)h(di\013eren)m(t)g(\(or)g(the)f(same\))h +(place)h(later.)275 1047 y(When)23 b(y)m(ou)g(use)g(a)h(kill)g +(command,)g(the)g(text)g(is)f(sa)m(v)m(ed)i(in)e(a)g +Fr(kill-ring)p Fu(.)39 b(An)m(y)24 b(n)m(um)m(b)s(er)e(of)h(consecutiv) +m(e)150 1157 y(kills)31 b(sa)m(v)m(e)i(all)f(of)f(the)g(killed)h(text)g +(together,)g(so)g(that)f(when)f(y)m(ou)h(y)m(ank)h(it)f(bac)m(k,)h(y)m +(ou)g(get)g(it)f(all.)43 b(The)150 1267 y(kill)33 b(ring)f(is)g(not)h +(line)g(sp)s(eci\014c;)g(the)g(text)g(that)g(y)m(ou)g(killed)f(on)h(a)f +(previously)g(t)m(yp)s(ed)h(line)f(is)h(a)m(v)-5 b(ailable)150 +1376 y(to)31 b(b)s(e)f(y)m(ank)m(ed)h(bac)m(k)g(later,)h(when)d(y)m(ou) +i(are)g(t)m(yping)f(another)h(line.)275 1513 y(Here)f(is)h(the)f(list)h +(of)g(commands)f(for)g(killing)h(text.)150 1675 y Fj(C-k)336 +b Fu(Kill)31 b(the)f(text)i(from)e(the)g(curren)m(t)g(cursor)g(p)s +(osition)h(to)g(the)f(end)g(of)g(the)h(line.)150 1836 +y Fj(M-d)336 b Fu(Kill)27 b(from)f(the)g(cursor)g(to)h(the)f(end)g(of)h +(the)f(curren)m(t)g(w)m(ord,)h(or,)h(if)e(b)s(et)m(w)m(een)h(w)m(ords,) +g(to)g(the)630 1946 y(end)j(of)g(the)h(next)f(w)m(ord.)41 +b(W)-8 b(ord)30 b(b)s(oundaries)f(are)i(the)g(same)f(as)h(those)g(used) +f(b)m(y)g Fj(M-f)p Fu(.)150 2107 y Fj(M-DEL)240 b Fu(Kill)31 +b(from)f(the)h(cursor)f(the)g(start)h(of)g(the)g(curren)m(t)f(w)m(ord,) +h(or,)f(if)h(b)s(et)m(w)m(een)g(w)m(ords,)f(to)i(the)630 +2217 y(start)39 b(of)f(the)h(previous)f(w)m(ord.)64 b(W)-8 +b(ord)39 b(b)s(oundaries)e(are)i(the)f(same)h(as)g(those)f(used)g(b)m +(y)630 2326 y Fj(M-b)p Fu(.)150 2487 y Fj(C-w)336 b Fu(Kill)35 +b(from)g(the)g(cursor)f(to)i(the)f(previous)g(whitespace.)55 +b(This)34 b(is)h(di\013eren)m(t)h(than)e Fj(M-DEL)630 +2597 y Fu(b)s(ecause)c(the)h(w)m(ord)f(b)s(oundaries)f(di\013er.)275 +2759 y(Here)42 b(is)f(ho)m(w)h(to)g Fr(y)m(ank)47 b Fu(the)42 +b(text)g(bac)m(k)h(in)m(to)f(the)g(line.)74 b(Y)-8 b(anking)43 +b(means)e(to)h(cop)m(y)h(the)e(most-)150 2869 y(recen)m(tly-killed)33 +b(text)e(from)f(the)g(kill)i(bu\013er.)150 3031 y Fj(C-y)336 +b Fu(Y)-8 b(ank)31 b(the)f(most)h(recen)m(tly)h(killed)f(text)g(bac)m +(k)g(in)m(to)h(the)e(bu\013er)g(at)h(the)f(cursor.)150 +3192 y Fj(M-y)336 b Fu(Rotate)36 b(the)f(kill-ring,)i(and)d(y)m(ank)h +(the)f(new)g(top.)54 b(Y)-8 b(ou)35 b(can)g(only)f(do)h(this)f(if)h +(the)g(prior)630 3302 y(command)30 b(is)h Fj(C-y)e Fu(or)h +Fj(M-y)p Fu(.)150 3503 y Fk(8.2.4)63 b(Readline)40 b(Argumen)m(ts)150 +3650 y Fu(Y)-8 b(ou)40 b(can)f(pass)g(n)m(umeric)f(argumen)m(ts)i(to)f +(Readline)h(commands.)67 b(Sometimes)39 b(the)g(argumen)m(t)h(acts)150 +3760 y(as)g(a)h(rep)s(eat)f(coun)m(t,)j(other)e(times)f(it)h(is)f(the)g +Fl(sign)47 b Fu(of)41 b(the)f(argumen)m(t)g(that)h(is)f(signi\014can)m +(t.)71 b(If)40 b(y)m(ou)150 3869 y(pass)33 b(a)h(negativ)m(e)i(argumen) +m(t)e(to)g(a)g(command)f(whic)m(h)g(normally)h(acts)g(in)f(a)h(forw)m +(ard)f(direction,)i(that)150 3979 y(command)g(will)h(act)g(in)f(a)h +(bac)m(kw)m(ard)f(direction.)57 b(F)-8 b(or)36 b(example,)h(to)f(kill)g +(text)g(bac)m(k)g(to)g(the)g(start)g(of)150 4088 y(the)31 +b(line,)g(y)m(ou)f(migh)m(t)h(t)m(yp)s(e)g(`)p Ft(M--)f(C-k)p +Fu('.)275 4225 y(The)d(general)i(w)m(a)m(y)h(to)e(pass)g(n)m(umeric)g +(argumen)m(ts)h(to)g(a)f(command)g(is)g(to)h(t)m(yp)s(e)f(meta)i +(digits)e(b)s(efore)150 4334 y(the)j(command.)42 b(If)30 +b(the)h(\014rst)f(`digit')i(t)m(yp)s(ed)f(is)g(a)g(min)m(us)f(sign)h +(\(`)p Ft(-)p Fu('\),)h(then)f(the)g(sign)f(of)h(the)g(argumen)m(t)150 +4444 y(will)39 b(b)s(e)e(negativ)m(e.)66 b(Once)38 b(y)m(ou)h(ha)m(v)m +(e)g(t)m(yp)s(ed)f(one)h(meta)g(digit)g(to)f(get)i(the)e(argumen)m(t)h +(started,)i(y)m(ou)150 4554 y(can)29 b(t)m(yp)s(e)g(the)g(remainder)f +(of)h(the)g(digits,)h(and)f(then)f(the)h(command.)40 +b(F)-8 b(or)30 b(example,)g(to)f(giv)m(e)i(the)e Fj(C-d)150 +4663 y Fu(command)37 b(an)g(argumen)m(t)h(of)g(10,)i(y)m(ou)e(could)f +(t)m(yp)s(e)h(`)p Ft(M-1)29 b(0)h(C-d)p Fu(',)39 b(whic)m(h)e(will)h +(delete)h(the)e(next)h(ten)150 4773 y(c)m(haracters)32 +b(on)e(the)h(input)e(line.)150 4974 y Fk(8.2.5)63 b(Searc)m(hing)40 +b(for)i(Commands)g(in)f(the)g(History)150 5121 y Fu(Readline)35 +b(pro)m(vides)f(commands)g(for)g(searc)m(hing)h(through)e(the)i +(command)f(history)g(\(see)h(Section)g(9.1)150 5230 y([Bash)i(History)h +(F)-8 b(acilities],)42 b(page)37 b(146\))i(for)d(lines)h(con)m(taining) +i(a)e(sp)s(eci\014ed)f(string.)60 b(There)36 b(are)i(t)m(w)m(o)150 +5340 y(searc)m(h)31 b(mo)s(des:)40 b Fr(incremen)m(tal)35 +b Fu(and)30 b Fr(non-incremen)m(tal)p Fu(.)p eop end +%%Page: 114 120 +TeXDict begin 114 119 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(114)275 299 y(Incremen)m(tal)26 +b(searc)m(hes)h(b)s(egin)e(b)s(efore)g(the)h(user)f(has)h(\014nished)e +(t)m(yping)i(the)g(searc)m(h)g(string.)39 b(As)26 b(eac)m(h)150 +408 y(c)m(haracter)37 b(of)e(the)h(searc)m(h)g(string)f(is)h(t)m(yp)s +(ed,)g(Readline)g(displa)m(ys)g(the)f(next)h(en)m(try)g(from)e(the)i +(history)150 518 y(matc)m(hing)25 b(the)f(string)g(t)m(yp)s(ed)g(so)g +(far.)39 b(An)23 b(incremen)m(tal)j(searc)m(h)e(requires)g(only)g(as)g +(man)m(y)g(c)m(haracters)i(as)150 628 y(needed)i(to)i(\014nd)d(the)i +(desired)f(history)h(en)m(try)-8 b(.)41 b(T)-8 b(o)29 +b(searc)m(h)h(bac)m(kw)m(ard)f(in)f(the)h(history)g(for)f(a)i +(particular)150 737 y(string,)g(t)m(yp)s(e)f Fj(C-r)p +Fu(.)40 b(T)m(yping)29 b Fj(C-s)g Fu(searc)m(hes)h(forw)m(ard)f +(through)g(the)g(history)-8 b(.)41 b(The)29 b(c)m(haracters)i(presen)m +(t)150 847 y(in)38 b(the)g(v)-5 b(alue)38 b(of)g(the)g +Ft(isearch-terminators)33 b Fu(v)-5 b(ariable)39 b(are)f(used)f(to)i +(terminate)g(an)f(incremen)m(tal)150 956 y(searc)m(h.)71 +b(If)40 b(that)h(v)-5 b(ariable)41 b(has)f(not)h(b)s(een)e(assigned)i +(a)f(v)-5 b(alue,)44 b(the)c Ft(ESC)g Fu(and)f Fj(C-J)h +Fu(c)m(haracters)i(will)150 1066 y(terminate)h(an)g(incremen)m(tal)g +(searc)m(h.)78 b Fj(C-g)41 b Fu(will)i(ab)s(ort)f(an)g(incremen)m(tal)i +(searc)m(h)f(and)f(restore)h(the)150 1176 y(original)30 +b(line.)41 b(When)28 b(the)h(searc)m(h)h(is)f(terminated,)h(the)f +(history)g(en)m(try)g(con)m(taining)h(the)f(searc)m(h)h(string)150 +1285 y(b)s(ecomes)h(the)f(curren)m(t)g(line.)275 1416 +y(T)-8 b(o)31 b(\014nd)e(other)j(matc)m(hing)g(en)m(tries)g(in)e(the)h +(history)g(list,)h(t)m(yp)s(e)g Fj(C-r)e Fu(or)h Fj(C-s)f +Fu(as)h(appropriate.)43 b(This)150 1525 y(will)26 b(searc)m(h)h(bac)m +(kw)m(ard)g(or)f(forw)m(ard)g(in)f(the)i(history)f(for)g(the)g(next)g +(en)m(try)h(matc)m(hing)g(the)f(searc)m(h)h(string)150 +1635 y(t)m(yp)s(ed)37 b(so)h(far.)63 b(An)m(y)38 b(other)f(k)m(ey)i +(sequence)f(b)s(ound)e(to)i(a)g(Readline)h(command)e(will)h(terminate)h +(the)150 1744 y(searc)m(h)26 b(and)f(execute)i(that)f(command.)39 +b(F)-8 b(or)26 b(instance,)h(a)f Ft(RET)f Fu(will)g(terminate)i(the)f +(searc)m(h)g(and)e(accept)150 1854 y(the)30 b(line,)g(thereb)m(y)f +(executing)i(the)e(command)g(from)g(the)h(history)f(list.)41 +b(A)29 b(mo)m(v)m(emen)m(t)j(command)d(will)150 1964 +y(terminate)i(the)g(searc)m(h,)g(mak)m(e)h(the)e(last)h(line)g(found)e +(the)i(curren)m(t)f(line,)h(and)f(b)s(egin)g(editing.)275 +2094 y(Readline)35 b(remem)m(b)s(ers)f(the)h(last)h(incremen)m(tal)g +(searc)m(h)f(string.)54 b(If)34 b(t)m(w)m(o)j Fj(C-r)p +Fu(s)c(are)i(t)m(yp)s(ed)g(without)150 2204 y(an)m(y)i(in)m(terv)m +(ening)g(c)m(haracters)h(de\014ning)e(a)h(new)f(searc)m(h)h(string,)h +(an)m(y)f(remem)m(b)s(ered)e(searc)m(h)i(string)g(is)150 +2313 y(used.)275 2444 y(Non-incremen)m(tal)48 b(searc)m(hes)g(read)e +(the)h(en)m(tire)h(searc)m(h)f(string)g(b)s(efore)f(starting)h(to)h +(searc)m(h)f(for)150 2553 y(matc)m(hing)d(history)e(lines.)78 +b(The)42 b(searc)m(h)h(string)g(ma)m(y)g(b)s(e)f(t)m(yp)s(ed)g(b)m(y)g +(the)h(user)f(or)h(b)s(e)f(part)g(of)h(the)150 2663 y(con)m(ten)m(ts)32 +b(of)f(the)f(curren)m(t)g(line.)150 2896 y Fs(8.3)68 +b(Readline)47 b(Init)e(File)150 3055 y Fu(Although)f(the)g(Readline)g +(library)f(comes)i(with)e(a)h(set)h(of)f(Emacs-lik)m(e)h(k)m +(eybindings)f(installed)g(b)m(y)150 3165 y(default,)26 +b(it)g(is)e(p)s(ossible)h(to)g(use)f(a)i(di\013eren)m(t)f(set)g(of)g(k) +m(eybindings.)38 b(An)m(y)25 b(user)f(can)h(customize)h(programs)150 +3274 y(that)45 b(use)f(Readline)h(b)m(y)f(putting)g(commands)g(in)g(an) +g Fr(inputrc)49 b Fu(\014le,)g(con)m(v)m(en)m(tionally)e(in)d(his)g +(home)150 3384 y(directory)-8 b(.)59 b(The)35 b(name)i(of)f(this)g +(\014le)g(is)g(tak)m(en)h(from)f(the)g(v)-5 b(alue)37 +b(of)f(the)g(shell)h(v)-5 b(ariable)36 b Ft(INPUTRC)p +Fu(.)56 b(If)150 3493 y(that)36 b(v)-5 b(ariable)36 b(is)f(unset,)h +(the)f(default)h(is)f Ft(~/.inputrc)p Fu(.)52 b(If)35 +b(that)g(\014le)h(do)s(es)e(not)i(exist)g(or)f(cannot)h(b)s(e)150 +3603 y(read,)f(the)f(ultimate)h(default)f(is)g Ft(/etc/inputrc)p +Fu(.)47 b(The)33 b Ft(bind)g Fu(builtin)g(command)h(can)g(also)h(b)s(e) +e(used)150 3713 y(to)e(set)g(Readline)g(k)m(eybindings)f(and)g(v)-5 +b(ariables.)41 b(See)31 b(Section)g(4.2)g([Bash)g(Builtins],)g(page)g +(51.)275 3843 y(When)e(a)h(program)f(whic)m(h)h(uses)f(the)h(Readline)g +(library)f(starts)h(up,)f(the)h(init)g(\014le)f(is)h(read,)g(and)f(the) +150 3953 y(k)m(ey)i(bindings)e(are)i(set.)275 4083 y(In)26 +b(addition,)i(the)f Ft(C-x)i(C-r)d Fu(command)h(re-reads)g(this)f(init) +h(\014le,)h(th)m(us)f(incorp)s(orating)g(an)m(y)g(c)m(hanges)150 +4193 y(that)k(y)m(ou)g(migh)m(t)g(ha)m(v)m(e)g(made)g(to)g(it.)150 +4384 y Fk(8.3.1)63 b(Readline)40 b(Init)h(File)g(Syn)m(tax)150 +4531 y Fu(There)f(are)i(only)f(a)g(few)g(basic)g(constructs)h(allo)m(w) +m(ed)h(in)d(the)h(Readline)h(init)f(\014le.)73 b(Blank)41 +b(lines)h(are)150 4641 y(ignored.)72 b(Lines)41 b(b)s(eginning)f(with)h +(a)g(`)p Ft(#)p Fu(')g(are)h(commen)m(ts.)73 b(Lines)41 +b(b)s(eginning)f(with)g(a)i(`)p Ft($)p Fu(')f(indicate)150 +4750 y(conditional)e(constructs)f(\(see)g(Section)h(8.3.2)g +([Conditional)g(Init)e(Constructs],)j(page)e(122\).)64 +b(Other)150 4860 y(lines)31 b(denote)g(v)-5 b(ariable)31 +b(settings)g(and)f(k)m(ey)h(bindings.)150 5011 y(V)-8 +b(ariable)32 b(Settings)630 5121 y(Y)-8 b(ou)41 b(can)g(mo)s(dify)e +(the)i(run-time)f(b)s(eha)m(vior)g(of)h(Readline)g(b)m(y)f(altering)h +(the)g(v)-5 b(alues)41 b(of)630 5230 y(v)-5 b(ariables)34 +b(in)f(Readline)i(using)e(the)g Ft(set)g Fu(command)g(within)g(the)h +(init)g(\014le.)50 b(The)33 b(syn)m(tax)630 5340 y(is)d(simple:)p +eop end +%%Page: 115 121 +TeXDict begin 115 120 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(115)870 299 y Ft(set)47 +b Fj(variable)e(value)630 436 y Fu(Here,)29 b(for)e(example,)h(is)g(ho) +m(w)f(to)h(c)m(hange)g(from)f(the)g(default)h(Emacs-lik)m(e)h(k)m(ey)f +(binding)e(to)630 545 y(use)k Ft(vi)g Fu(line)h(editing)g(commands:)870 +682 y Ft(set)47 b(editing-mode)d(vi)630 819 y Fu(V)-8 +b(ariable)36 b(names)f(and)g(v)-5 b(alues,)36 b(where)f(appropriate,)h +(are)g(recognized)g(without)f(regard)630 929 y(to)c(case.)42 +b(Unrecognized)31 b(v)-5 b(ariable)31 b(names)g(are)f(ignored.)630 +1066 y(Bo)s(olean)c(v)-5 b(ariables)26 b(\(those)g(that)g(can)f(b)s(e)f +(set)i(to)g(on)f(or)g(o\013)7 b(\))25 b(are)h(set)f(to)h(on)f(if)g(the) +g(v)-5 b(alue)26 b(is)630 1176 y(n)m(ull)e(or)g(empt)m(y)-8 +b(,)27 b Fr(on)d Fu(\(case-insensitiv)m(e\),)29 b(or)24 +b(1.)39 b(An)m(y)25 b(other)f(v)-5 b(alue)25 b(results)f(in)g(the)g(v) +-5 b(ariable)630 1285 y(b)s(eing)30 b(set)h(to)g(o\013.)630 +1422 y(The)37 b Ft(bind)30 b(-V)37 b Fu(command)g(lists)i(the)f(curren) +m(t)f(Readline)i(v)-5 b(ariable)38 b(names)g(and)f(v)-5 +b(alues.)630 1532 y(See)31 b(Section)g(4.2)g([Bash)g(Builtins],)g(page) +g(51.)630 1669 y(A)f(great)i(deal)f(of)g(run-time)f(b)s(eha)m(vior)g +(is)g(c)m(hangeable)j(with)d(the)g(follo)m(wing)i(v)-5 +b(ariables.)630 1833 y Ft(bell-style)1110 1943 y Fu(Con)m(trols)44 +b(what)g(happ)s(ens)e(when)h(Readline)i(w)m(an)m(ts)f(to)h(ring)e(the)h +(termi-)1110 2052 y(nal)37 b(b)s(ell.)61 b(If)37 b(set)h(to)g(`)p +Ft(none)p Fu(',)g(Readline)g(nev)m(er)g(rings)e(the)i(b)s(ell.)61 +b(If)36 b(set)i(to)1110 2162 y(`)p Ft(visible)p Fu(',)32 +b(Readline)i(uses)f(a)g(visible)g(b)s(ell)g(if)g(one)g(is)g(a)m(v)-5 +b(ailable.)51 b(If)33 b(set)g(to)1110 2271 y(`)p Ft(audible)p +Fu(')j(\(the)i(default\),)i(Readline)e(attempts)g(to)h(ring)e(the)g +(terminal's)1110 2381 y(b)s(ell.)630 2545 y Ft(bind-tty-special-chars) +1110 2655 y Fu(If)e(set)g(to)h(`)p Ft(on)p Fu(')f(\(the)g(default\),)i +(Readline)f(attempts)g(to)g(bind)d(the)i(con)m(trol)1110 +2765 y(c)m(haracters)30 b(treated)g(sp)s(ecially)g(b)m(y)f(the)g(k)m +(ernel's)h(terminal)f(driv)m(er)g(to)h(their)1110 2874 +y(Readline)h(equiv)-5 b(alen)m(ts.)630 3039 y Ft(blink-matching-paren) +1110 3148 y Fu(If)36 b(set)g(to)h(`)p Ft(on)p Fu(',)h(Readline)f +(attempts)g(to)g(brie\015y)e(mo)m(v)m(e)j(the)f(cursor)e(to)i(an)1110 +3258 y(op)s(ening)k(paren)m(thesis)h(when)f(a)h(closing)h(paren)m +(thesis)e(is)h(inserted.)74 b(The)1110 3367 y(default)31 +b(is)f(`)p Ft(off)p Fu('.)630 3532 y Ft(colored-completion-prefi)o(x) +1110 3641 y Fu(If)f(set)h(to)g(`)p Ft(on)p Fu(',)g(when)e(listing)i +(completions,)h(Readline)f(displa)m(ys)g(the)f(com-)1110 +3751 y(mon)c(pre\014x)f(of)i(the)f(set)h(of)g(p)s(ossible)f +(completions)h(using)f(a)h(di\013eren)m(t)g(color.)1110 +3861 y(The)39 b(color)i(de\014nitions)f(are)g(tak)m(en)h(from)f(the)g +(v)-5 b(alue)40 b(of)g(the)g Ft(LS_COLORS)1110 3970 y +Fu(en)m(vironmen)m(t)31 b(v)-5 b(ariable.)41 b(The)30 +b(default)h(is)f(`)p Ft(off)p Fu('.)630 4134 y Ft(colored-stats)1110 +4244 y Fu(If)c(set)h(to)g(`)p Ft(on)p Fu(',)h(Readline)f(displa)m(ys)g +(p)s(ossible)f(completions)h(using)f(di\013eren)m(t)1110 +4354 y(colors)40 b(to)g(indicate)g(their)f(\014le)h(t)m(yp)s(e.)67 +b(The)38 b(color)j(de\014nitions)d(are)i(tak)m(en)1110 +4463 y(from)24 b(the)h(v)-5 b(alue)25 b(of)g(the)g Ft(LS_COLORS)d +Fu(en)m(vironmen)m(t)j(v)-5 b(ariable.)40 b(The)24 b(default)1110 +4573 y(is)30 b(`)p Ft(off)p Fu('.)630 4737 y Ft(comment-begin)1110 +4847 y Fu(The)62 b(string)g(to)h(insert)f(at)h(the)g(b)s(eginning)e(of) +h(the)h(line)f(when)g(the)1110 4956 y Ft(insert-comment)26 +b Fu(command)31 b(is)f(executed.)42 b(The)30 b(default)g(v)-5 +b(alue)31 b(is)f Ft("#")p Fu(.)630 5121 y Ft(completion-display-width) +1110 5230 y Fu(The)41 b(n)m(um)m(b)s(er)f(of)i(screen)g(columns)f(used) +g(to)h(displa)m(y)g(p)s(ossible)f(matc)m(hes)1110 5340 +y(when)28 b(p)s(erforming)g(completion.)41 b(The)29 b(v)-5 +b(alue)29 b(is)g(ignored)g(if)g(it)h(is)f(less)g(than)p +eop end +%%Page: 116 122 +TeXDict begin 116 121 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(116)1110 299 y(0)27 +b(or)f(greater)h(than)f(the)g(terminal)h(screen)f(width.)39 +b(A)26 b(v)-5 b(alue)27 b(of)f(0)h(will)f(cause)1110 +408 y(matc)m(hes)32 b(to)f(b)s(e)e(displa)m(y)m(ed)i(one)g(p)s(er)e +(line.)41 b(The)30 b(default)h(v)-5 b(alue)31 b(is)f(-1.)630 +587 y Ft(completion-ignore-case)1110 696 y Fu(If)d(set)h(to)g(`)p +Ft(on)p Fu(',)g(Readline)g(p)s(erforms)e(\014lename)h(matc)m(hing)i +(and)e(completion)1110 806 y(in)j(a)h(case-insensitiv)m(e)i(fashion.)40 +b(The)30 b(default)h(v)-5 b(alue)30 b(is)h(`)p Ft(off)p +Fu('.)630 984 y Ft(completion-map-case)1110 1093 y Fu(If)22 +b(set)g(to)h(`)p Ft(on)p Fu(',)h(and)e Fr(completion-ignore-case)31 +b Fu(is)22 b(enabled,)i(Readline)f(treats)1110 1203 y(h)m(yphens)29 +b(\(`)p Ft(-)p Fu('\))j(and)e(underscores)g(\(`)p Ft(_)p +Fu('\))i(as)f(equiv)-5 b(alen)m(t)32 b(when)e(p)s(erforming)1110 +1313 y(case-insensitiv)m(e)47 b(\014lename)e(matc)m(hing)g(and)f +(completion.)85 b(The)44 b(default)1110 1422 y(v)-5 b(alue)31 +b(is)f(`)p Ft(off)p Fu('.)630 1600 y Ft(completion-prefix-displa)o +(y-le)o(ngth)1110 1710 y Fu(The)h(length)g(in)g(c)m(haracters)i(of)f +(the)f(common)h(pre\014x)e(of)h(a)h(list)g(of)f(p)s(ossible)1110 +1819 y(completions)g(that)f(is)g(displa)m(y)m(ed)g(without)g(mo)s +(di\014cation.)41 b(When)29 b(set)h(to)h(a)1110 1929 +y(v)-5 b(alue)26 b(greater)h(than)e(zero,)j(common)e(pre\014xes)e +(longer)j(than)e(this)g(v)-5 b(alue)27 b(are)1110 2039 +y(replaced)k(with)f(an)g(ellipsis)h(when)e(displa)m(ying)i(p)s(ossible) +f(completions.)630 2217 y Ft(completion-query-items)1110 +2326 y Fu(The)c(n)m(um)m(b)s(er)f(of)h(p)s(ossible)g(completions)h +(that)g(determines)f(when)f(the)i(user)1110 2436 y(is)43 +b(ask)m(ed)g(whether)f(the)g(list)h(of)g(p)s(ossibilities)g(should)f(b) +s(e)g(displa)m(y)m(ed.)77 b(If)1110 2545 y(the)29 b(n)m(um)m(b)s(er)f +(of)h(p)s(ossible)g(completions)h(is)f(greater)h(than)f(or)g(equal)g +(to)h(this)1110 2655 y(v)-5 b(alue,)45 b(Readline)e(will)f(ask)g +(whether)f(or)h(not)g(the)g(user)f(wishes)g(to)i(view)1110 +2765 y(them;)33 b(otherwise,)f(they)g(are)g(simply)g(listed.)45 +b(This)31 b(v)-5 b(ariable)33 b(m)m(ust)e(b)s(e)g(set)1110 +2874 y(to)39 b(an)f(in)m(teger)i(v)-5 b(alue)39 b(greater)g(than)f(or)h +(equal)g(to)g(0.)65 b(A)38 b(negativ)m(e)i(v)-5 b(alue)1110 +2984 y(means)30 b(Readline)h(should)f(nev)m(er)g(ask.)41 +b(The)30 b(default)h(limit)g(is)f Ft(100)p Fu(.)630 3162 +y Ft(convert-meta)1110 3271 y Fu(If)22 b(set)g(to)h(`)p +Ft(on)p Fu(',)h(Readline)f(will)f(con)m(v)m(ert)i(c)m(haracters)f(with) +f(the)g(eigh)m(th)h(bit)f(set)1110 3381 y(to)33 b(an)e +Fm(asci)r(i)h Fu(k)m(ey)h(sequence)f(b)m(y)g(stripping)f(the)h(eigh)m +(th)h(bit)f(and)f(pre\014xing)1110 3491 y(an)24 b Ft(ESC)g +Fu(c)m(haracter,)j(con)m(v)m(erting)f(them)f(to)g(a)g(meta-pre\014xed)f +(k)m(ey)h(sequence.)1110 3600 y(The)i(default)h(v)-5 +b(alue)28 b(is)f(`)p Ft(on)p Fu(',)i(but)d(will)i(b)s(e)f(set)h(to)g(`) +p Ft(off)p Fu(')g(if)f(the)h(lo)s(cale)h(is)f(one)1110 +3710 y(that)j(con)m(tains)h(eigh)m(t-bit)g(c)m(haracters.)630 +3888 y Ft(disable-completion)1110 3998 y Fu(If)k(set)h(to)h(`)p +Ft(On)p Fu(',)g(Readline)f(will)g(inhibit)f(w)m(ord)h(completion.)60 +b(Completion)1110 4107 y(c)m(haracters)28 b(will)e(b)s(e)f(inserted)h +(in)m(to)h(the)g(line)f(as)g(if)g(they)h(had)e(b)s(een)g(mapp)s(ed)1110 +4217 y(to)31 b Ft(self-insert)p Fu(.)38 b(The)30 b(default)g(is)h(`)p +Ft(off)p Fu('.)630 4395 y Ft(echo-control-characters)1110 +4504 y Fu(When)f(set)h(to)g(`)p Ft(on)p Fu(',)f(on)g(op)s(erating)h +(systems)f(that)h(indicate)g(they)g(supp)s(ort)1110 4614 +y(it,)i(readline)e(ec)m(ho)s(es)i(a)f(c)m(haracter)h(corresp)s(onding)d +(to)j(a)f(signal)g(generated)1110 4724 y(from)e(the)g(k)m(eyb)s(oard.) +41 b(The)30 b(default)g(is)h(`)p Ft(on)p Fu('.)630 4902 +y Ft(editing-mode)1110 5011 y Fu(The)d Ft(editing-mode)e +Fu(v)-5 b(ariable)29 b(con)m(trols)h(whic)m(h)e(default)h(set)h(of)e(k) +m(ey)i(bind-)1110 5121 y(ings)25 b(is)g(used.)38 b(By)26 +b(default,)g(Readline)g(starts)f(up)f(in)h(Emacs)g(editing)h(mo)s(de,) +1110 5230 y(where)j(the)g(k)m(eystrok)m(es)i(are)e(most)h(similar)f(to) +h(Emacs.)40 b(This)29 b(v)-5 b(ariable)30 b(can)1110 +5340 y(b)s(e)g(set)h(to)g(either)g(`)p Ft(emacs)p Fu(')e(or)h(`)p +Ft(vi)p Fu('.)p eop end +%%Page: 117 123 +TeXDict begin 117 122 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(117)630 299 y Ft +(emacs-mode-string)1110 408 y Fu(If)33 b(the)h Fr(sho)m(w-mo)s +(de-in-prompt)h Fu(v)-5 b(ariable)35 b(is)e(enabled,)i(this)f(string)f +(is)h(dis-)1110 518 y(pla)m(y)m(ed)24 b(immediately)g(b)s(efore)f(the)g +(last)h(line)f(of)h(the)f(primary)f(prompt)g(when)1110 +628 y(emacs)g(editing)h(mo)s(de)e(is)h(activ)m(e.)40 +b(The)21 b(v)-5 b(alue)22 b(is)g(expanded)f(lik)m(e)h(a)h(k)m(ey)f +(bind-)1110 737 y(ing,)27 b(so)f(the)f(standard)g(set)h(of)f(meta-)i +(and)e(con)m(trol)i(pre\014xes)d(and)h(bac)m(kslash)1110 +847 y(escap)s(e)f(sequences)h(is)e(a)m(v)-5 b(ailable.)41 +b(Use)25 b(the)f(`)p Ft(\\1)p Fu(')f(and)h(`)p Ft(\\2)p +Fu(')g(escap)s(es)g(to)g(b)s(egin)1110 956 y(and)37 b(end)g(sequences)h +(of)f(non-prin)m(ting)h(c)m(haracters,)j(whic)m(h)c(can)h(b)s(e)f(used) +1110 1066 y(to)h(em)m(b)s(ed)f(a)g(terminal)h(con)m(trol)h(sequence)f +(in)m(to)g(the)f(mo)s(de)g(string.)61 b(The)1110 1176 +y(default)31 b(is)f(`)p Ft(@)p Fu('.)630 1332 y Ft +(enable-bracketed-paste)1110 1442 y Fu(When)24 b(set)h(to)h(`)p +Ft(On)p Fu(',)g(Readline)f(will)g(con\014gure)f(the)h(terminal)g(in)f +(a)h(w)m(a)m(y)g(that)1110 1551 y(will)k(enable)f(it)h(to)g(insert)g +(eac)m(h)g(paste)g(in)m(to)g(the)g(editing)g(bu\013er)e(as)i(a)f +(single)1110 1661 y(string)33 b(of)f(c)m(haracters,)j(instead)e(of)g +(treating)h(eac)m(h)g(c)m(haracter)g(as)f(if)f(it)i(had)1110 +1771 y(b)s(een)e(read)i(from)e(the)i(k)m(eyb)s(oard.)49 +b(This)32 b(can)h(prev)m(en)m(t)h(pasted)f(c)m(haracters)1110 +1880 y(from)d(b)s(eing)g(in)m(terpreted)h(as)f(editing)h(commands.)41 +b(The)29 b(default)i(is)f(`)p Ft(On)p Fu('.)630 2037 +y Ft(enable-keypad)1110 2146 y Fu(When)23 b(set)h(to)g(`)p +Ft(on)p Fu(',)h(Readline)f(will)g(try)f(to)h(enable)g(the)f +(application)i(k)m(eypad)1110 2256 y(when)h(it)h(is)f(called.)41 +b(Some)27 b(systems)f(need)h(this)f(to)h(enable)g(the)g(arro)m(w)g(k)m +(eys.)1110 2365 y(The)j(default)g(is)h(`)p Ft(off)p Fu('.)630 +2522 y Ft(enable-meta-key)1110 2632 y Fu(When)40 b(set)g(to)g(`)p +Ft(on)p Fu(',)j(Readline)d(will)g(try)g(to)g(enable)g(an)m(y)g(meta)h +(mo)s(di\014er)1110 2741 y(k)m(ey)i(the)e(terminal)i(claims)f(to)h +(supp)s(ort)d(when)h(it)h(is)g(called.)76 b(On)41 b(man)m(y)1110 +2851 y(terminals,)c(the)e(meta)h(k)m(ey)g(is)f(used)g(to)h(send)e(eigh) +m(t-bit)j(c)m(haracters.)56 b(The)1110 2960 y(default)31 +b(is)f(`)p Ft(on)p Fu('.)630 3117 y Ft(expand-tilde)1110 +3226 y Fu(If)d(set)h(to)h(`)p Ft(on)p Fu(',)f(tilde)g(expansion)g(is)f +(p)s(erformed)f(when)h(Readline)h(attempts)1110 3336 +y(w)m(ord)i(completion.)42 b(The)30 b(default)g(is)h(`)p +Ft(off)p Fu('.)630 3493 y Ft(history-preserve-point)1110 +3602 y Fu(If)41 b(set)h(to)h(`)p Ft(on)p Fu(',)i(the)c(history)h(co)s +(de)g(attempts)h(to)f(place)h(the)f(p)s(oin)m(t)f(\(the)1110 +3712 y(curren)m(t)35 b(cursor)g(p)s(osition\))g(at)h(the)g(same)f(lo)s +(cation)i(on)e(eac)m(h)h(history)g(line)1110 3821 y(retriev)m(ed)h +(with)f Ft(previous-history)c Fu(or)37 b Ft(next-history)p +Fu(.)55 b(The)36 b(default)1110 3931 y(is)30 b(`)p Ft(off)p +Fu('.)630 4088 y Ft(history-size)1110 4197 y Fu(Set)39 +b(the)g(maxim)m(um)g(n)m(um)m(b)s(er)f(of)h(history)g(en)m(tries)h(sa)m +(v)m(ed)g(in)f(the)g(history)1110 4307 y(list.)51 b(If)34 +b(set)g(to)h(zero,)g(an)m(y)f(existing)h(history)f(en)m(tries)g(are)g +(deleted)h(and)e(no)1110 4416 y(new)e(en)m(tries)i(are)f(sa)m(v)m(ed.) +46 b(If)31 b(set)h(to)h(a)f(v)-5 b(alue)32 b(less)g(than)f(zero,)i(the) +f(n)m(um)m(b)s(er)1110 4526 y(of)f(history)f(en)m(tries)h(is)g(not)g +(limited.)42 b(By)30 b(default,)h(the)g(n)m(um)m(b)s(er)e(of)i(history) +1110 4635 y(en)m(tries)j(is)f(not)g(limited.)49 b(If)32 +b(an)h(attempt)h(is)f(made)g(to)h(set)f Fr(history-size)39 +b Fu(to)1110 4745 y(a)34 b(non-n)m(umeric)f(v)-5 b(alue,)34 +b(the)g(maxim)m(um)f(n)m(um)m(b)s(er)f(of)h(history)h(en)m(tries)g +(will)1110 4855 y(b)s(e)c(set)h(to)g(500.)630 5011 y +Ft(horizontal-scroll-mode)1110 5121 y Fu(This)k(v)-5 +b(ariable)37 b(can)f(b)s(e)f(set)h(to)h(either)f(`)p +Ft(on)p Fu(')g(or)g(`)p Ft(off)p Fu('.)57 b(Setting)36 +b(it)g(to)h(`)p Ft(on)p Fu(')1110 5230 y(means)26 b(that)h(the)f(text)h +(of)g(the)f(lines)g(b)s(eing)g(edited)h(will)f(scroll)h(horizon)m +(tally)1110 5340 y(on)32 b(a)g(single)g(screen)g(line)g(when)e(they)i +(are)g(longer)h(than)e(the)h(width)f(of)h(the)p eop end +%%Page: 118 124 +TeXDict begin 118 123 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(118)1110 299 y(screen,)28 +b(instead)g(of)f(wrapping)f(on)m(to)i(a)g(new)e(screen)i(line.)40 +b(This)26 b(v)-5 b(ariable)28 b(is)1110 408 y(automatically)k(set)e(to) +g(`)p Ft(on)p Fu(')f(for)g(terminals)g(of)h(heigh)m(t)g(1.)41 +b(By)29 b(default,)h(this)1110 518 y(v)-5 b(ariable)31 +b(is)g(set)f(to)i(`)p Ft(off)p Fu('.)630 719 y Ft(input-meta)1110 +829 y Fu(If)f(set)g(to)h(`)p Ft(on)p Fu(',)g(Readline)g(will)f(enable)h +(eigh)m(t-bit)h(input)d(\(it)i(will)f(not)h(clear)1110 +938 y(the)40 b(eigh)m(th)g(bit)g(in)f(the)h(c)m(haracters)h(it)f +(reads\),)j(regardless)c(of)h(what)g(the)1110 1048 y(terminal)k(claims) +h(it)f(can)g(supp)s(ort.)79 b(The)44 b(default)g(v)-5 +b(alue)44 b(is)g(`)p Ft(off)p Fu(',)j(but)1110 1157 y(Readline)24 +b(will)h(set)f(it)g(to)h(`)p Ft(on)p Fu(')e(if)h(the)g(lo)s(cale)i(con) +m(tains)f(eigh)m(t-bit)g(c)m(haracters.)1110 1267 y(The)30 +b(name)g Ft(meta-flag)e Fu(is)j(a)f(synon)m(ym)g(for)g(this)h(v)-5 +b(ariable.)630 1468 y Ft(isearch-terminators)1110 1577 +y Fu(The)51 b(string)h(of)g(c)m(haracters)h(that)f(should)e(terminate)j +(an)f(incremen)m(tal)1110 1687 y(searc)m(h)25 b(without)g(subsequen)m +(tly)g(executing)h(the)f(c)m(haracter)h(as)f(a)g(command)1110 +1797 y(\(see)38 b(Section)g(8.2.5)h([Searc)m(hing],)h(page)e(113\).)62 +b(If)37 b(this)g(v)-5 b(ariable)38 b(has)f(not)1110 1906 +y(b)s(een)e(giv)m(en)h(a)g(v)-5 b(alue,)37 b(the)f(c)m(haracters)h +Ft(ESC)d Fu(and)h Fj(C-J)g Fu(will)h(terminate)g(an)1110 +2016 y(incremen)m(tal)c(searc)m(h.)630 2217 y Ft(keymap)192 +b Fu(Sets)64 b(Readline's)i(idea)f(of)f(the)h(curren)m(t)f(k)m(eymap)h +(for)f(k)m(ey)h(binding)1110 2326 y(commands.)71 b(Built-in)41 +b Ft(keymap)e Fu(names)h(are)h Ft(emacs)p Fu(,)h Ft(emacs-standard)p +Fu(,)1110 2436 y Ft(emacs-meta)p Fu(,)99 b Ft(emacs-ctlx)p +Fu(,)f Ft(vi)p Fu(,)j Ft(vi-move)p Fu(,)f Ft(vi-command)p +Fu(,)f(and)1110 2545 y Ft(vi-insert)p Fu(.)81 b Ft(vi)44 +b Fu(is)h(equiv)-5 b(alen)m(t)46 b(to)g Ft(vi-command)c +Fu(\()p Ft(vi-move)h Fu(is)i(also)h(a)1110 2655 y(synon)m(ym\);)41 +b Ft(emacs)c Fu(is)h(equiv)-5 b(alen)m(t)39 b(to)f Ft(emacs-standard)p +Fu(.)59 b(Applications)1110 2765 y(ma)m(y)32 b(add)e(additional)i +(names.)43 b(The)30 b(default)h(v)-5 b(alue)32 b(is)f +Ft(emacs)p Fu(.)41 b(The)30 b(v)-5 b(alue)1110 2874 y(of)31 +b(the)f Ft(editing-mode)d Fu(v)-5 b(ariable)31 b(also)h(a\013ects)f +(the)g(default)g(k)m(eymap.)630 3075 y Ft(keyseq-timeout)1110 +3185 y Fu(Sp)s(eci\014es)25 b(the)g(duration)g(Readline)h(will)g(w)m +(ait)g(for)g(a)f(c)m(haracter)i(when)e(read-)1110 3294 +y(ing)30 b(an)g(am)m(biguous)g(k)m(ey)h(sequence)f(\(one)g(that)h(can)f +(form)g(a)g(complete)h(k)m(ey)1110 3404 y(sequence)j(using)e(the)i +(input)e(read)h(so)g(far,)h(or)g(can)f(tak)m(e)i(additional)f(input) +1110 3513 y(to)g(complete)g(a)f(longer)h(k)m(ey)f(sequence\).)49 +b(If)33 b(no)f(input)g(is)h(receiv)m(ed)h(within)1110 +3623 y(the)43 b(timeout,)48 b(Readline)43 b(will)g(use)g(the)g(shorter) +g(but)f(complete)j(k)m(ey)e(se-)1110 3733 y(quence.)c(Readline)26 +b(uses)f(this)h(v)-5 b(alue)26 b(to)g(determine)g(whether)f(or)g(not)h +(input)1110 3842 y(is)31 b(a)m(v)-5 b(ailable)33 b(on)d(the)h(curren)m +(t)f(input)g(source)h(\()p Ft(rl_instream)d Fu(b)m(y)i(default\).)1110 +3952 y(The)25 b(v)-5 b(alue)26 b(is)f(sp)s(eci\014ed)f(in)h +(milliseconds,)j(so)d(a)h(v)-5 b(alue)26 b(of)f(1000)i(means)e(that) +1110 4061 y(Readline)e(will)g(w)m(ait)g(one)g(second)f(for)g +(additional)i(input.)37 b(If)22 b(this)g(v)-5 b(ariable)23 +b(is)1110 4171 y(set)28 b(to)h(a)f(v)-5 b(alue)29 b(less)f(than)g(or)f +(equal)i(to)f(zero,)i(or)e(to)g(a)h(non-n)m(umeric)e(v)-5 +b(alue,)1110 4281 y(Readline)30 b(will)f(w)m(ait)i(un)m(til)e(another)h +(k)m(ey)g(is)f(pressed)g(to)h(decide)f(whic)m(h)g(k)m(ey)1110 +4390 y(sequence)i(to)g(complete.)42 b(The)30 b(default)g(v)-5 +b(alue)31 b(is)g Ft(500)p Fu(.)630 4591 y Ft(mark-directories)1110 +4701 y Fu(If)38 b(set)g(to)h(`)p Ft(on)p Fu(',)i(completed)e(directory) +f(names)g(ha)m(v)m(e)i(a)e(slash)g(app)s(ended.)1110 +4810 y(The)30 b(default)g(is)h(`)p Ft(on)p Fu('.)630 +5011 y Ft(mark-modified-lines)1110 5121 y Fu(This)k(v)-5 +b(ariable,)38 b(when)d(set)h(to)h(`)p Ft(on)p Fu(',)g(causes)g +(Readline)f(to)h(displa)m(y)f(an)f(as-)1110 5230 y(terisk)f(\(`)p +Ft(*)p Fu('\))h(at)f(the)g(start)g(of)g(history)g(lines)g(whic)m(h)f +(ha)m(v)m(e)i(b)s(een)e(mo)s(di\014ed.)1110 5340 y(This)d(v)-5 +b(ariable)31 b(is)f(`)p Ft(off)p Fu(')g(b)m(y)g(default.)p +eop end +%%Page: 119 125 +TeXDict begin 119 124 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(119)630 299 y Ft +(mark-symlinked-directori)o(es)1110 408 y Fu(If)59 b(set)h(to)g(`)p +Ft(on)p Fu(',)67 b(completed)60 b(names)f(whic)m(h)g(are)h(sym)m(b)s +(olic)g(links)f(to)1110 518 y(directories)71 b(ha)m(v)m(e)f(a)g(slash)f +(app)s(ended)f(\(sub)5 b(ject)70 b(to)g(the)g(v)-5 b(alue)70 +b(of)1110 628 y Ft(mark-directories)p Fu(\).)37 b(The)30 +b(default)g(is)g(`)p Ft(off)p Fu('.)630 778 y Ft(match-hidden-files) +1110 888 y Fu(This)21 b(v)-5 b(ariable,)25 b(when)d(set)g(to)h(`)p +Ft(on)p Fu(',)h(causes)f(Readline)g(to)g(matc)m(h)g(\014les)f(whose) +1110 998 y(names)44 b(b)s(egin)g(with)g(a)g(`)p Ft(.)p +Fu(')g(\(hidden)f(\014les\))i(when)e(p)s(erforming)g(\014lename)1110 +1107 y(completion.)75 b(If)41 b(set)g(to)h(`)p Ft(off)p +Fu(',)i(the)e(leading)g(`)p Ft(.)p Fu(')f(m)m(ust)g(b)s(e)g(supplied)f +(b)m(y)1110 1217 y(the)34 b(user)g(in)g(the)g(\014lename)g(to)h(b)s(e)f +(completed.)53 b(This)33 b(v)-5 b(ariable)35 b(is)f(`)p +Ft(on)p Fu(')g(b)m(y)1110 1326 y(default.)630 1477 y +Ft(menu-complete-display-pr)o(efix)1110 1587 y Fu(If)f(set)h(to)g(`)p +Ft(on)p Fu(',)h(men)m(u)e(completion)i(displa)m(ys)e(the)h(common)g +(pre\014x)e(of)i(the)1110 1696 y(list)k(of)g(p)s(ossible)f(completions) +i(\(whic)m(h)e(ma)m(y)h(b)s(e)f(empt)m(y\))i(b)s(efore)e(cycling)1110 +1806 y(through)30 b(the)g(list.)42 b(The)29 b(default)i(is)f(`)p +Ft(off)p Fu('.)630 1956 y Ft(output-meta)1110 2066 y +Fu(If)35 b(set)h(to)g(`)p Ft(on)p Fu(',)h(Readline)f(will)g(displa)m(y) +f(c)m(haracters)i(with)e(the)h(eigh)m(th)g(bit)1110 2176 +y(set)h(directly)g(rather)f(than)g(as)h(a)g(meta-pre\014xed)f(escap)s +(e)h(sequence.)59 b(The)1110 2285 y(default)26 b(is)f(`)p +Ft(off)p Fu(',)i(but)e(Readline)h(will)g(set)g(it)g(to)h(`)p +Ft(on)p Fu(')e(if)h(the)f(lo)s(cale)j(con)m(tains)1110 +2395 y(eigh)m(t-bit)k(c)m(haracters.)630 2545 y Ft(page-completions) +1110 2655 y Fu(If)h(set)i(to)f(`)p Ft(on)p Fu(',)h(Readline)g(uses)e +(an)h(in)m(ternal)h Ft(more)p Fu(-lik)m(e)f(pager)g(to)h(displa)m(y) +1110 2765 y(a)e(screenful)f(of)g(p)s(ossible)g(completions)i(at)f(a)g +(time.)47 b(This)31 b(v)-5 b(ariable)34 b(is)e(`)p Ft(on)p +Fu(')1110 2874 y(b)m(y)e(default.)630 3025 y Ft +(print-completions-horizo)o(ntal)o(ly)1110 3134 y Fu(If)23 +b(set)i(to)g(`)p Ft(on)p Fu(',)g(Readline)g(will)f(displa)m(y)g +(completions)h(with)f(matc)m(hes)h(sorted)1110 3244 y(horizon)m(tally) +45 b(in)e(alphab)s(etical)i(order,)i(rather)c(than)g(do)m(wn)g(the)h +(screen.)1110 3354 y(The)30 b(default)g(is)h(`)p Ft(off)p +Fu('.)630 3504 y Ft(revert-all-at-newline)1110 3614 y +Fu(If)e(set)h(to)g(`)p Ft(on)p Fu(',)g(Readline)g(will)g(undo)f(all)h +(c)m(hanges)h(to)f(history)g(lines)f(b)s(efore)1110 3724 +y(returning)f(when)f Ft(accept-line)f Fu(is)j(executed.)41 +b(By)29 b(default,)g(history)g(lines)1110 3833 y(ma)m(y)42 +b(b)s(e)g(mo)s(di\014ed)e(and)h(retain)i(individual)e(undo)g(lists)h +(across)g(calls)h(to)1110 3943 y Ft(readline)p Fu(.)38 +b(The)30 b(default)h(is)f(`)p Ft(off)p Fu('.)630 4093 +y Ft(show-all-if-ambiguous)1110 4203 y Fu(This)f(alters)i(the)f +(default)g(b)s(eha)m(vior)g(of)g(the)h(completion)g(functions.)40 +b(If)29 b(set)1110 4313 y(to)f(`)p Ft(on)p Fu(',)g(w)m(ords)f(whic)m(h) +g(ha)m(v)m(e)i(more)f(than)f(one)h(p)s(ossible)f(completion)h(cause) +1110 4422 y(the)39 b(matc)m(hes)h(to)g(b)s(e)e(listed)h(immediately)i +(instead)e(of)g(ringing)g(the)g(b)s(ell.)1110 4532 y(The)30 +b(default)g(v)-5 b(alue)31 b(is)g(`)p Ft(off)p Fu('.)630 +4682 y Ft(show-all-if-unmodified)1110 4792 y Fu(This)38 +b(alters)h(the)g(default)g(b)s(eha)m(vior)g(of)f(the)h(completion)h +(functions)e(in)h(a)1110 4902 y(fashion)25 b(similar)h(to)g +Fr(sho)m(w-all-if-am)m(biguous)p Fu(.)41 b(If)25 b(set)h(to)h(`)p +Ft(on)p Fu(',)f(w)m(ords)f(whic)m(h)1110 5011 y(ha)m(v)m(e)32 +b(more)f(than)f(one)i(p)s(ossible)e(completion)i(without)f(an)m(y)g(p)s +(ossible)f(par-)1110 5121 y(tial)43 b(completion)h(\(the)f(p)s(ossible) +f(completions)h(don't)f(share)g(a)h(common)1110 5230 +y(pre\014x\))30 b(cause)g(the)h(matc)m(hes)g(to)g(b)s(e)f(listed)g +(immediately)i(instead)e(of)h(ring-)1110 5340 y(ing)g(the)f(b)s(ell.)41 +b(The)30 b(default)g(v)-5 b(alue)31 b(is)f(`)p Ft(off)p +Fu('.)p eop end +%%Page: 120 126 +TeXDict begin 120 125 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(120)630 299 y Ft +(show-mode-in-prompt)1110 408 y Fu(If)24 b(set)h(to)g(`)p +Ft(on)p Fu(',)g(add)f(a)h(string)f(to)h(the)f(b)s(eginning)g(of)g(the)h +(prompt)e(indicating)1110 518 y(the)33 b(editing)h(mo)s(de:)46 +b(emacs,)35 b(vi)e(command,)h(or)f(vi)h(insertion.)49 +b(The)32 b(mo)s(de)1110 628 y(strings)45 b(are)h(user-settable)g +(\(e.g.,)51 b Fr(emacs-mo)s(de-string)8 b Fu(\).)87 b(The)45 +b(default)1110 737 y(v)-5 b(alue)31 b(is)f(`)p Ft(off)p +Fu('.)630 887 y Ft(skip-completed-text)1110 996 y Fu(If)i(set)i(to)f(`) +p Ft(on)p Fu(',)h(this)f(alters)g(the)g(default)g(completion)h(b)s(eha) +m(vior)f(when)f(in-)1110 1106 y(serting)d(a)h(single)g(matc)m(h)f(in)m +(to)h(the)g(line.)40 b(It's)30 b(only)f(activ)m(e)i(when)d(p)s(erform-) +1110 1215 y(ing)35 b(completion)h(in)e(the)h(middle)f(of)h(a)f(w)m +(ord.)53 b(If)35 b(enabled,)g(readline)g(do)s(es)1110 +1325 y(not)41 b(insert)f(c)m(haracters)i(from)e(the)h(completion)h +(that)f(matc)m(h)g(c)m(haracters)1110 1435 y(after)c(p)s(oin)m(t)g(in)g +(the)g(w)m(ord)f(b)s(eing)g(completed,)k(so)d(p)s(ortions)f(of)h(the)g +(w)m(ord)1110 1544 y(follo)m(wing)c(the)f(cursor)f(are)h(not)g +(duplicated.)45 b(F)-8 b(or)32 b(instance,)h(if)f(this)f(is)h(en-)1110 +1654 y(abled,)43 b(attempting)f(completion)g(when)d(the)i(cursor)f(is)g +(after)h(the)g(`)p Ft(e)p Fu(')f(in)1110 1763 y(`)p Ft(Makefile)p +Fu(')c(will)i(result)f(in)g(`)p Ft(Makefile)p Fu(')f(rather)h(than)h(`) +p Ft(Makefilefile)p Fu(',)1110 1873 y(assuming)d(there)g(is)h(a)f +(single)h(p)s(ossible)f(completion.)56 b(The)35 b(default)g(v)-5 +b(alue)1110 1983 y(is)30 b(`)p Ft(off)p Fu('.)630 2132 +y Ft(vi-cmd-mode-string)1110 2242 y Fu(If)j(the)h Fr(sho)m(w-mo)s +(de-in-prompt)h Fu(v)-5 b(ariable)35 b(is)e(enabled,)i(this)f(string)f +(is)h(dis-)1110 2351 y(pla)m(y)m(ed)24 b(immediately)g(b)s(efore)f(the) +g(last)h(line)f(of)h(the)f(primary)f(prompt)g(when)1110 +2461 y(vi)32 b(editing)h(mo)s(de)f(is)g(activ)m(e)j(and)c(in)h(command) +g(mo)s(de.)46 b(The)31 b(v)-5 b(alue)33 b(is)f(ex-)1110 +2570 y(panded)26 b(lik)m(e)i(a)f(k)m(ey)h(binding,)e(so)i(the)f +(standard)f(set)h(of)g(meta-)h(and)e(con)m(trol)1110 +2680 y(pre\014xes)34 b(and)g(bac)m(kslash)i(escap)s(e)g(sequences)f(is) +g(a)m(v)-5 b(ailable.)57 b(Use)35 b(the)g(`)p Ft(\\1)p +Fu(')1110 2790 y(and)23 b(`)p Ft(\\2)p Fu(')h(escap)s(es)h(to)f(b)s +(egin)g(and)f(end)g(sequences)i(of)f(non-prin)m(ting)f(c)m(harac-)1110 +2899 y(ters,)31 b(whic)m(h)g(can)g(b)s(e)f(used)g(to)h(em)m(b)s(ed)f(a) +h(terminal)h(con)m(trol)g(sequence)f(in)m(to)1110 3009 +y(the)g(mo)s(de)f(string.)40 b(The)30 b(default)h(is)f(`)p +Ft(\(cmd\))p Fu('.)630 3158 y Ft(vi-ins-mode-string)1110 +3268 y Fu(If)j(the)h Fr(sho)m(w-mo)s(de-in-prompt)h Fu(v)-5 +b(ariable)35 b(is)e(enabled,)i(this)f(string)f(is)h(dis-)1110 +3377 y(pla)m(y)m(ed)24 b(immediately)g(b)s(efore)f(the)g(last)h(line)f +(of)h(the)f(primary)f(prompt)g(when)1110 3487 y(vi)35 +b(editing)h(mo)s(de)e(is)i(activ)m(e)h(and)d(in)h(insertion)g(mo)s(de.) +54 b(The)35 b(v)-5 b(alue)35 b(is)g(ex-)1110 3597 y(panded)26 +b(lik)m(e)i(a)f(k)m(ey)h(binding,)e(so)i(the)f(standard)f(set)h(of)g +(meta-)h(and)e(con)m(trol)1110 3706 y(pre\014xes)34 b(and)g(bac)m +(kslash)i(escap)s(e)g(sequences)f(is)g(a)m(v)-5 b(ailable.)57 +b(Use)35 b(the)g(`)p Ft(\\1)p Fu(')1110 3816 y(and)23 +b(`)p Ft(\\2)p Fu(')h(escap)s(es)h(to)f(b)s(egin)g(and)f(end)g +(sequences)i(of)f(non-prin)m(ting)f(c)m(harac-)1110 3925 +y(ters,)31 b(whic)m(h)g(can)g(b)s(e)f(used)g(to)h(em)m(b)s(ed)f(a)h +(terminal)h(con)m(trol)g(sequence)f(in)m(to)1110 4035 +y(the)g(mo)s(de)f(string.)40 b(The)30 b(default)h(is)f(`)p +Ft(\(ins\))p Fu('.)630 4184 y Ft(visible-stats)1110 4294 +y Fu(If)h(set)i(to)f(`)p Ft(on)p Fu(',)h(a)f(c)m(haracter)i(denoting)e +(a)g(\014le's)g(t)m(yp)s(e)g(is)g(app)s(ended)e(to)j(the)1110 +4403 y(\014lename)e(when)e(listing)i(p)s(ossible)f(completions.)42 +b(The)30 b(default)g(is)h(`)p Ft(off)p Fu('.)150 4553 +y(Key)f(Bindings)630 4663 y(The)41 b(syn)m(tax)i(for)f(con)m(trolling)h +(k)m(ey)g(bindings)e(in)h(the)g(init)g(\014le)g(is)g(simple.)75 +b(First)43 b(y)m(ou)630 4772 y(need)27 b(to)i(\014nd)d(the)i(name)f(of) +h(the)g(command)f(that)i(y)m(ou)f(w)m(an)m(t)g(to)g(c)m(hange.)41 +b(The)27 b(follo)m(wing)630 4882 y(sections)37 b(con)m(tain)g(tables)g +(of)f(the)g(command)f(name,)j(the)e(default)g(k)m(eybinding,)h(if)f(an) +m(y)-8 b(,)630 4991 y(and)30 b(a)h(short)f(description)g(of)h(what)f +(the)g(command)h(do)s(es.)630 5121 y(Once)36 b(y)m(ou)g(kno)m(w)g(the)g +(name)g(of)g(the)g(command,)h(simply)f(place)h(on)e(a)i(line)f(in)g +(the)g(init)630 5230 y(\014le)e(the)g(name)f(of)h(the)g(k)m(ey)g(y)m +(ou)g(wish)f(to)h(bind)f(the)h(command)f(to,)i(a)f(colon,)i(and)d(then) +630 5340 y(the)f(name)h(of)f(the)g(command.)46 b(There)32 +b(can)g(b)s(e)g(no)g(space)g(b)s(et)m(w)m(een)h(the)f(k)m(ey)h(name)g +(and)p eop end +%%Page: 121 127 +TeXDict begin 121 126 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(121)630 299 y(the)41 +b(colon)h({)f(that)g(will)g(b)s(e)g(in)m(terpreted)g(as)g(part)f(of)h +(the)g(k)m(ey)h(name.)72 b(The)40 b(name)h(of)630 408 +y(the)35 b(k)m(ey)g(can)g(b)s(e)f(expressed)f(in)i(di\013eren)m(t)g(w)m +(a)m(ys,)h(dep)s(ending)d(on)h(what)h(y)m(ou)g(\014nd)e(most)630 +518 y(comfortable.)630 650 y(In)i(addition)h(to)h(command)f(names,)i +(readline)e(allo)m(ws)h(k)m(eys)g(to)g(b)s(e)e(b)s(ound)f(to)j(a)f +(string)630 759 y(that)31 b(is)f(inserted)h(when)e(the)i(k)m(ey)g(is)f +(pressed)g(\(a)h Fr(macro)5 b Fu(\).)630 891 y(The)42 +b Ft(bind)30 b(-p)42 b Fu(command)h(displa)m(ys)g(Readline)g(function)g +(names)g(and)f(bindings)g(in)h(a)630 1000 y(format)37 +b(that)h(can)f(put)f(directly)i(in)m(to)g(an)f(initialization)j +(\014le.)60 b(See)38 b(Section)f(4.2)i([Bash)630 1110 +y(Builtins],)31 b(page)g(51.)630 1263 y Fr(k)m(eyname)5 +b Fu(:)42 b Fr(function-name)35 b Fu(or)c Fr(macro)1110 +1373 y(k)m(eyname)k Fu(is)29 b(the)f(name)h(of)g(a)g(k)m(ey)h(sp)s +(elled)e(out)h(in)g(English.)39 b(F)-8 b(or)30 b(example:)1350 +1504 y Ft(Control-u:)45 b(universal-argument)1350 1614 +y(Meta-Rubout:)f(backward-kill-word)1350 1724 y(Control-o:)h(">)i +(output")1110 1855 y Fu(In)94 b(the)g(example)h(ab)s(o)m(v)m(e,)112 +b Fj(C-u)94 b Fu(is)g(b)s(ound)f(to)i(the)f(function)1110 +1965 y Ft(universal-argument)p Fu(,)124 b Fj(M-DEL)107 +b Fu(is)i(b)s(ound)e(to)j(the)f(function)1110 2074 y +Ft(backward-kill-word)p Fu(,)75 b(and)69 b Fj(C-o)g Fu(is)h(b)s(ound)e +(to)j(run)d(the)i(macro)1110 2184 y(expressed)45 b(on)h(the)g(righ)m(t) +g(hand)e(side)i(\(that)h(is,)i(to)e(insert)e(the)h(text)h(`)p +Ft(>)1110 2293 y(output)p Fu(')29 b(in)m(to)i(the)g(line\).)1110 +2425 y(A)62 b(n)m(um)m(b)s(er)e(of)i(sym)m(b)s(olic)h(c)m(haracter)g +(names)f(are)g(recognized)h(while)1110 2534 y(pro)s(cessing)40 +b(this)f(k)m(ey)i(binding)e(syn)m(tax:)60 b Fr(DEL)p +Fu(,)42 b Fr(ESC)p Fu(,)g Fr(ESCAPE)p Fu(,)f Fr(LFD)p +Fu(,)1110 2644 y Fr(NEWLINE)p Fu(,)31 b Fr(RET)p Fu(,)f +Fr(RETURN)p Fu(,)g Fr(R)m(UBOUT)p Fu(,)h Fr(SP)-8 b(A)m(CE)p +Fu(,)31 b Fr(SPC)p Fu(,)e(and)h Fr(T)-8 b(AB)p Fu(.)630 +2798 y Ft(")p Fr(k)m(eyseq)r Ft(")p Fu(:)41 b Fr(function-name)36 +b Fu(or)30 b Fr(macro)1110 2907 y(k)m(eyseq)k Fu(di\013ers)d(from)f +Fr(k)m(eyname)37 b Fu(ab)s(o)m(v)m(e)32 b(in)f(that)h(strings)f +(denoting)g(an)g(en-)1110 3017 y(tire)j(k)m(ey)h(sequence)f(can)g(b)s +(e)f(sp)s(eci\014ed,)h(b)m(y)f(placing)i(the)f(k)m(ey)g(sequence)g(in) +1110 3126 y(double)29 b(quotes.)41 b(Some)29 b Fm(gnu)h +Fu(Emacs)f(st)m(yle)i(k)m(ey)f(escap)s(es)g(can)g(b)s(e)f(used,)g(as) +1110 3236 y(in)k(the)h(follo)m(wing)i(example,)f(but)e(the)h(sp)s +(ecial)h(c)m(haracter)g(names)f(are)g(not)1110 3345 y(recognized.)1350 +3477 y Ft("\\C-u":)46 b(universal-argument)1350 3587 +y("\\C-x\\C-r":)f(re-read-init-file)1350 3696 y("\\e[11~":)g("Function) +h(Key)g(1")1110 3828 y Fu(In)64 b(the)g(ab)s(o)m(v)m(e)i(example,)74 +b Fj(C-u)64 b Fu(is)g(again)i(b)s(ound)c(to)k(the)e(function)1110 +3937 y Ft(universal-argument)39 b Fu(\(just)k(as)h(it)g(w)m(as)g(in)g +(the)f(\014rst)g(example\),)49 b(`)p Fj(C-x)1110 4047 +y(C-r)p Fu(')30 b(is)g(b)s(ound)e(to)j(the)g(function)f +Ft(re-read-init-file)p Fu(,)c(and)j(`)p Ft(ESC)h([)g(1)g(1)1110 +4156 y(~)p Fu(')g(is)h(b)s(ound)d(to)j(insert)f(the)h(text)g(`)p +Ft(Function)e(Key)g(1)p Fu('.)630 4310 y(The)g(follo)m(wing)i +Fm(gnu)f Fu(Emacs)g(st)m(yle)h(escap)s(e)f(sequences)g(are)g(a)m(v)-5 +b(ailable)32 b(when)d(sp)s(ecifying)630 4419 y(k)m(ey)i(sequences:)630 +4573 y Fj(\\C-)336 b Fu(con)m(trol)32 b(pre\014x)630 +4726 y Fj(\\M-)336 b Fu(meta)31 b(pre\014x)630 4880 y +Fj(\\e)384 b Fu(an)30 b(escap)s(e)h(c)m(haracter)630 +5033 y Fj(\\\\)384 b Fu(bac)m(kslash)630 5187 y Fj(\\)p +Ft(")g(")p Fu(,)30 b(a)h(double)f(quotation)i(mark)630 +5340 y Fj(\\')384 b Ft(')p Fu(,)30 b(a)h(single)g(quote)g(or)f(ap)s +(ostrophe)p eop end +%%Page: 122 128 +TeXDict begin 122 127 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(122)630 299 y(In)27 +b(addition)h(to)g(the)g Fm(gnu)f Fu(Emacs)h(st)m(yle)h(escap)s(e)f +(sequences,)h(a)f(second)f(set)h(of)g(bac)m(kslash)630 +408 y(escap)s(es)j(is)f(a)m(v)-5 b(ailable:)630 570 y +Ft(\\a)384 b Fu(alert)31 b(\(b)s(ell\))630 731 y Ft(\\b)384 +b Fu(bac)m(kspace)630 892 y Ft(\\d)g Fu(delete)630 1053 +y Ft(\\f)g Fu(form)30 b(feed)630 1214 y Ft(\\n)384 b +Fu(newline)630 1375 y Ft(\\r)g Fu(carriage)32 b(return)630 +1536 y Ft(\\t)384 b Fu(horizon)m(tal)32 b(tab)630 1697 +y Ft(\\v)384 b Fu(v)m(ertical)32 b(tab)630 1858 y Ft(\\)p +Fj(nnn)288 b Fu(the)35 b(eigh)m(t-bit)h(c)m(haracter)g(whose)e(v)-5 +b(alue)35 b(is)g(the)f(o)s(ctal)i(v)-5 b(alue)35 b Fr(nnn)e +Fu(\(one)i(to)1110 1968 y(three)c(digits\))630 2129 y +Ft(\\x)p Fj(HH)288 b Fu(the)38 b(eigh)m(t-bit)i(c)m(haracter)g(whose)e +(v)-5 b(alue)39 b(is)f(the)h(hexadecimal)g(v)-5 b(alue)39 +b Fr(HH)1110 2239 y Fu(\(one)31 b(or)f(t)m(w)m(o)i(hex)e(digits\))630 +2400 y(When)37 b(en)m(tering)h(the)g(text)g(of)g(a)g(macro,)i(single)e +(or)f(double)g(quotes)h(m)m(ust)f(b)s(e)g(used)f(to)630 +2509 y(indicate)23 b(a)e(macro)h(de\014nition.)38 b(Unquoted)21 +b(text)i(is)e(assumed)g(to)h(b)s(e)f(a)h(function)f(name.)38 +b(In)630 2619 y(the)22 b(macro)f(b)s(o)s(dy)-8 b(,)23 +b(the)e(bac)m(kslash)h(escap)s(es)g(describ)s(ed)e(ab)s(o)m(v)m(e)j +(are)e(expanded.)37 b(Bac)m(kslash)630 2729 y(will)j(quote)h(an)m(y)f +(other)g(c)m(haracter)i(in)d(the)i(macro)f(text,)k(including)39 +b(`)p Ft(")p Fu(')h(and)g(`)p Ft(')p Fu('.)69 b(F)-8 +b(or)630 2838 y(example,)28 b(the)e(follo)m(wing)h(binding)d(will)i +(mak)m(e)h(`)p Fj(C-x)j Ft(\\)p Fu(')c(insert)f(a)h(single)h(`)p +Ft(\\)p Fu(')f(in)m(to)g(the)g(line:)870 2974 y Ft("\\C-x\\\\":)45 +b("\\\\")150 3175 y Fk(8.3.2)63 b(Conditional)41 b(Init)g(Constructs) +150 3322 y Fu(Readline)c(implemen)m(ts)g(a)h(facilit)m(y)g(similar)f +(in)g(spirit)f(to)i(the)f(conditional)h(compilation)g(features)f(of)150 +3431 y(the)31 b(C)f(prepro)s(cessor)g(whic)m(h)g(allo)m(ws)i(k)m(ey)g +(bindings)d(and)h(v)-5 b(ariable)32 b(settings)f(to)h(b)s(e)e(p)s +(erformed)f(as)i(the)150 3541 y(result)f(of)h(tests.)41 +b(There)30 b(are)h(four)f(parser)f(directiv)m(es)j(used.)150 +3703 y Ft($if)336 b Fu(The)31 b Ft($if)f Fu(construct)i(allo)m(ws)h +(bindings)d(to)i(b)s(e)e(made)i(based)f(on)g(the)g(editing)h(mo)s(de,)g +(the)630 3812 y(terminal)37 b(b)s(eing)f(used,)h(or)f(the)h +(application)g(using)f(Readline.)59 b(The)36 b(text)h(of)f(the)h(test,) +630 3922 y(after)30 b(an)m(y)g(comparison)g(op)s(erator,)g(extends)f +(to)h(the)g(end)f(of)h(the)f(line;)i(unless)e(otherwise)630 +4031 y(noted,)i(no)f(c)m(haracters)i(are)f(required)e(to)i(isolate)i +(it.)630 4193 y Ft(mode)288 b Fu(The)30 b Ft(mode=)e +Fu(form)i(of)g(the)h Ft($if)e Fu(directiv)m(e)j(is)e(used)f(to)i(test)g +(whether)e(Read-)1110 4302 y(line)44 b(is)f(in)g Ft(emacs)f +Fu(or)h Ft(vi)g Fu(mo)s(de.)79 b(This)42 b(ma)m(y)i(b)s(e)e(used)h(in)g +(conjunction)1110 4412 y(with)c(the)h(`)p Ft(set)29 b(keymap)p +Fu(')38 b(command,)k(for)d(instance,)j(to)e(set)g(bindings)e(in)1110 +4521 y(the)32 b Ft(emacs-standard)c Fu(and)j Ft(emacs-ctlx)d +Fu(k)m(eymaps)k(only)g(if)g(Readline)g(is)1110 4631 y(starting)f(out)g +(in)f Ft(emacs)f Fu(mo)s(de.)630 4792 y Ft(term)288 b +Fu(The)26 b Ft(term=)g Fu(form)g(ma)m(y)i(b)s(e)e(used)g(to)i(include)f +(terminal-sp)s(eci\014c)g(k)m(ey)h(bind-)1110 4902 y(ings,)38 +b(p)s(erhaps)c(to)j(bind)e(the)h(k)m(ey)h(sequences)f(output)g(b)m(y)g +(the)g(terminal's)1110 5011 y(function)24 b(k)m(eys.)39 +b(The)23 b(w)m(ord)h(on)f(the)i(righ)m(t)f(side)g(of)g(the)g(`)p +Ft(=)p Fu(')g(is)g(tested)h(against)1110 5121 y(b)s(oth)k(the)h(full)g +(name)g(of)g(the)g(terminal)h(and)e(the)i(p)s(ortion)e(of)h(the)g +(terminal)1110 5230 y(name)k(b)s(efore)f(the)g(\014rst)g(`)p +Ft(-)p Fu('.)50 b(This)33 b(allo)m(ws)i Ft(sun)e Fu(to)h(matc)m(h)g(b)s +(oth)f Ft(sun)g Fu(and)1110 5340 y Ft(sun-cmd)p Fu(,)c(for)h(instance.) +p eop end +%%Page: 123 129 +TeXDict begin 123 128 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(123)630 299 y Ft(version)144 +b Fu(The)44 b Ft(version)f Fu(test)i(ma)m(y)h(b)s(e)e(used)f(to)j(p)s +(erform)d(comparisons)i(against)1110 408 y(sp)s(eci\014c)c(Readline)i +(v)m(ersions.)74 b(The)42 b Ft(version)d Fu(expands)i(to)h(the)g +(curren)m(t)1110 518 y(Readline)25 b(v)m(ersion.)39 b(The)23 +b(set)h(of)g(comparison)h(op)s(erators)f(includes)f(`)p +Ft(=)p Fu(')h(\(and)1110 628 y(`)p Ft(==)p Fu('\),)33 +b(`)p Ft(!=)p Fu(',)f(`)p Ft(<=)p Fu(',)h(`)p Ft(>=)p +Fu(',)f(`)p Ft(<)p Fu(',)h(and)e(`)p Ft(>)p Fu('.)46 +b(The)31 b(v)m(ersion)i(n)m(um)m(b)s(er)d(supplied)h(on)1110 +737 y(the)j(righ)m(t)h(side)f(of)g(the)g(op)s(erator)g(consists)h(of)f +(a)g(ma)5 b(jor)35 b(v)m(ersion)f(n)m(um)m(b)s(er,)1110 +847 y(an)45 b(optional)i(decimal)f(p)s(oin)m(t,)k(and)44 +b(an)i(optional)g(minor)f(v)m(ersion)h(\(e.g.,)1110 956 +y(`)p Ft(7.1)p Fu('\).)40 b(If)27 b(the)h(minor)f(v)m(ersion)h(is)g +(omitted,)h(it)f(is)g(assumed)f(to)h(b)s(e)f(`)p Ft(0)p +Fu('.)40 b(The)1110 1066 y(op)s(erator)34 b(ma)m(y)g(b)s(e)f(separated) +g(from)g(the)h(string)f Ft(version)f Fu(and)h(from)g(the)1110 +1176 y(v)m(ersion)39 b(n)m(um)m(b)s(er)f(argumen)m(t)h(b)m(y)f +(whitespace.)67 b(The)38 b(follo)m(wing)i(example)1110 +1285 y(sets)31 b(a)g(v)-5 b(ariable)31 b(if)f(the)h(Readline)g(v)m +(ersion)f(b)s(eing)g(used)g(is)g(7.0)i(or)e(new)m(er:)1350 +1440 y Ft($if)47 b(version)f(>=)h(7.0)1350 1550 y(set)g +(show-mode-in-prompt)42 b(on)1350 1659 y($endif)630 1860 +y(application)1110 1970 y Fu(The)21 b Fr(application)j +Fu(construct)e(is)g(used)f(to)i(include)f(application-sp)s(eci\014c)h +(set-)1110 2079 y(tings.)39 b(Eac)m(h)26 b(program)e(using)g(the)h +(Readline)g(library)g(sets)g(the)g Fr(application)1110 +2189 y(name)p Fu(,)g(and)e(y)m(ou)g(can)h(test)g(for)f(a)g(particular)h +(v)-5 b(alue.)39 b(This)22 b(could)h(b)s(e)g(used)f(to)1110 +2298 y(bind)32 b(k)m(ey)h(sequences)g(to)h(functions)e(useful)g(for)h +(a)g(sp)s(eci\014c)f(program.)48 b(F)-8 b(or)1110 2408 +y(instance,)35 b(the)e(follo)m(wing)h(command)f(adds)f(a)i(k)m(ey)f +(sequence)h(that)f(quotes)1110 2518 y(the)e(curren)m(t)f(or)g(previous) +g(w)m(ord)g(in)g(Bash:)1350 2673 y Ft($if)47 b(Bash)1350 +2782 y(#)g(Quote)g(the)g(current)f(or)h(previous)e(word)1350 +2892 y("\\C-xq":)h("\\eb\\"\\ef\\"")1350 3002 y($endif)630 +3202 y(variable)96 b Fu(The)33 b Fr(v)-5 b(ariable)39 +b Fu(construct)33 b(pro)m(vides)g(simple)g(equalit)m(y)i(tests)e(for)g +(Readline)1110 3312 y(v)-5 b(ariables)32 b(and)f(v)-5 +b(alues.)45 b(The)32 b(p)s(ermitted)f(comparison)h(op)s(erators)f(are)i +(`)p Ft(=)p Fu(',)1110 3421 y(`)p Ft(==)p Fu(',)49 b(and)44 +b(`)p Ft(!=)p Fu('.)85 b(The)44 b(v)-5 b(ariable)46 b(name)f(m)m(ust)g +(b)s(e)g(separated)g(from)g(the)1110 3531 y(comparison)25 +b(op)s(erator)g(b)m(y)g(whitespace;)j(the)d(op)s(erator)g(ma)m(y)g(b)s +(e)f(separated)1110 3641 y(from)33 b(the)h(v)-5 b(alue)35 +b(on)f(the)g(righ)m(t)g(hand)f(side)h(b)m(y)f(whitespace.)52 +b(Both)35 b(string)1110 3750 y(and)i(b)s(o)s(olean)g(v)-5 +b(ariables)38 b(ma)m(y)h(b)s(e)d(tested.)63 b(Bo)s(olean)39 +b(v)-5 b(ariables)38 b(m)m(ust)g(b)s(e)1110 3860 y(tested)46 +b(against)g(the)f(v)-5 b(alues)46 b Fr(on)f Fu(and)f +Fr(o\013)p Fu(.)85 b(The)45 b(follo)m(wing)h(example)g(is)1110 +3969 y(equiv)-5 b(alen)m(t)32 b(to)f(the)f Ft(mode=emacs)e +Fu(test)j(describ)s(ed)f(ab)s(o)m(v)m(e:)1350 4124 y +Ft($if)47 b(editing-mode)d(==)k(emacs)1350 4234 y(set)f +(show-mode-in-prompt)42 b(on)1350 4344 y($endif)150 4544 +y($endif)192 b Fu(This)29 b(command,)i(as)f(seen)h(in)f(the)g(previous) +g(example,)h(terminates)g(an)g Ft($if)e Fu(command.)150 +4745 y Ft($else)240 b Fu(Commands)29 b(in)h(this)h(branc)m(h)e(of)i +(the)f Ft($if)g Fu(directiv)m(e)i(are)f(executed)g(if)f(the)h(test)g +(fails.)150 4945 y Ft($include)96 b Fu(This)43 b(directiv)m(e)i(tak)m +(es)g(a)e(single)i(\014lename)e(as)h(an)f(argumen)m(t)h(and)f(reads)g +(commands)630 5055 y(and)38 b(bindings)f(from)h(that)i(\014le.)65 +b(F)-8 b(or)39 b(example,)j(the)d(follo)m(wing)h(directiv)m(e)g(reads)e +(from)630 5165 y Ft(/etc/inputrc)p Fu(:)870 5320 y Ft($include)46 +b(/etc/inputrc)p eop end +%%Page: 124 130 +TeXDict begin 124 129 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(124)150 299 y Fk(8.3.3)63 +b(Sample)41 b(Init)g(File)150 446 y Fu(Here)27 b(is)f(an)h(example)g +(of)f(an)h Fr(inputrc)k Fu(\014le.)39 b(This)26 b(illustrates)h(k)m(ey) +h(binding,)e(v)-5 b(ariable)27 b(assignmen)m(t,)i(and)150 +555 y(conditional)j(syn)m(tax.)p eop end +%%Page: 125 131 +TeXDict begin 125 130 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(125)390 408 y Ft(#)47 +b(This)g(file)g(controls)e(the)i(behaviour)e(of)j(line)e(input)h +(editing)e(for)390 518 y(#)i(programs)f(that)h(use)g(the)f(GNU)h +(Readline)f(library.)93 b(Existing)390 628 y(#)47 b(programs)f(include) +g(FTP,)g(Bash,)h(and)g(GDB.)390 737 y(#)390 847 y(#)g(You)g(can)g +(re-read)f(the)h(inputrc)f(file)g(with)h(C-x)g(C-r.)390 +956 y(#)g(Lines)g(beginning)e(with)i('#')g(are)g(comments.)390 +1066 y(#)390 1176 y(#)g(First,)g(include)e(any)i(system-wide)e +(bindings)h(and)g(variable)390 1285 y(#)h(assignments)e(from)i +(/etc/Inputrc)390 1395 y($include)f(/etc/Inputrc)390 +1614 y(#)390 1724 y(#)h(Set)g(various)f(bindings)g(for)h(emacs)f(mode.) +390 1943 y(set)h(editing-mode)d(emacs)390 2162 y($if)j(mode=emacs)390 +2381 y(Meta-Control-h:)91 b(backward-kill-word)43 b(Text)k(after)f(the) +h(function)f(name)g(is)h(ignored)390 2600 y(#)390 2710 +y(#)g(Arrow)g(keys)f(in)i(keypad)e(mode)390 2819 y(#)390 +2929 y(#"\\M-OD":)379 b(backward-char)390 3039 y(#"\\M-OC":)g +(forward-char)390 3148 y(#"\\M-OA":)g(previous-history)390 +3258 y(#"\\M-OB":)g(next-history)390 3367 y(#)390 3477 +y(#)47 b(Arrow)g(keys)f(in)i(ANSI)e(mode)390 3587 y(#)390 +3696 y("\\M-[D":)380 b(backward-char)390 3806 y("\\M-[C":)g +(forward-char)390 3915 y("\\M-[A":)g(previous-history)390 +4025 y("\\M-[B":)g(next-history)390 4134 y(#)390 4244 +y(#)47 b(Arrow)g(keys)f(in)i(8)f(bit)g(keypad)f(mode)390 +4354 y(#)390 4463 y(#"\\M-\\C-OD":)331 b(backward-char)390 +4573 y(#"\\M-\\C-OC":)g(forward-char)390 4682 y(#"\\M-\\C-OA":)g +(previous-history)390 4792 y(#"\\M-\\C-OB":)g(next-history)390 +4902 y(#)390 5011 y(#)47 b(Arrow)g(keys)f(in)i(8)f(bit)g(ANSI)g(mode) +390 5121 y(#)390 5230 y(#"\\M-\\C-[D":)331 b(backward-char)390 +5340 y(#"\\M-\\C-[C":)g(forward-char)p eop end +%%Page: 126 132 +TeXDict begin 126 131 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(126)390 299 y Ft(#"\\M-\\C-[A":) +331 b(previous-history)390 408 y(#"\\M-\\C-[B":)g(next-history)390 +628 y(C-q:)47 b(quoted-insert)390 847 y($endif)390 1066 +y(#)g(An)h(old-style)d(binding.)93 b(This)47 b(happens)f(to)h(be)g(the) +g(default.)390 1176 y(TAB:)g(complete)390 1395 y(#)g(Macros)g(that)f +(are)h(convenient)e(for)i(shell)f(interaction)390 1504 +y($if)h(Bash)390 1614 y(#)g(edit)g(the)g(path)390 1724 +y("\\C-xp":)f("PATH=${PATH}\\e\\C-e\\C-a)o(\\ef)o(\\C-f)o(")390 +1833 y(#)h(prepare)f(to)h(type)g(a)h(quoted)e(word)g(--)390 +1943 y(#)h(insert)g(open)f(and)h(close)f(double)h(quotes)390 +2052 y(#)g(and)g(move)g(to)g(just)g(after)f(the)h(open)g(quote)390 +2162 y("\\C-x\\"":)e("\\"\\"\\C-b")390 2271 y(#)i(insert)g(a)g +(backslash)e(\(testing)h(backslash)f(escapes)390 2381 +y(#)i(in)h(sequences)d(and)i(macros\))390 2491 y("\\C-x\\\\":)e("\\\\") +390 2600 y(#)i(Quote)g(the)g(current)f(or)h(previous)e(word)390 +2710 y("\\C-xq":)h("\\eb\\"\\ef\\"")390 2819 y(#)h(Add)g(a)h(binding)e +(to)h(refresh)f(the)h(line,)f(which)g(is)h(unbound)390 +2929 y("\\C-xr":)f(redraw-current-line)390 3039 y(#)h(Edit)g(variable)f +(on)h(current)f(line.)390 3148 y("\\M-\\C-v":)f +("\\C-a\\C-k$\\C-y\\M-\\C-e\\C-)o(a\\C-)o(y=")390 3258 +y($endif)390 3477 y(#)i(use)g(a)h(visible)e(bell)g(if)h(one)g(is)h +(available)390 3587 y(set)f(bell-style)e(visible)390 +3806 y(#)i(don't)g(strip)f(characters)f(to)i(7)h(bits)e(when)h(reading) +390 3915 y(set)g(input-meta)e(on)390 4134 y(#)i(allow)g(iso-latin1)e +(characters)g(to)i(be)g(inserted)f(rather)390 4244 y(#)h(than)g +(converted)e(to)j(prefix-meta)c(sequences)390 4354 y(set)j +(convert-meta)d(off)390 4573 y(#)j(display)f(characters)f(with)i(the)g +(eighth)f(bit)h(set)g(directly)390 4682 y(#)g(rather)g(than)f(as)h +(meta-prefixed)e(characters)390 4792 y(set)i(output-meta)e(on)390 +5011 y(#)i(if)h(there)e(are)h(150)g(or)g(more)g(possible)e(completions) +g(for)i(a)g(word,)390 5121 y(#)g(ask)g(whether)f(or)h(not)g(the)g(user) +g(wants)f(to)h(see)g(all)g(of)g(them)390 5230 y(set)g +(completion-query-items)42 b(150)p eop end +%%Page: 127 133 +TeXDict begin 127 132 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(127)390 299 y Ft(#)47 +b(For)g(FTP)390 408 y($if)g(Ftp)390 518 y("\\C-xg":)f("get)g(\\M-?")390 +628 y("\\C-xt":)g("put)g(\\M-?")390 737 y("\\M-.":)g(yank-last-arg)390 +847 y($endif)150 1089 y Fs(8.4)68 b(Bindable)45 b(Readline)i(Commands) +150 1248 y Fu(This)32 b(section)h(describ)s(es)f(Readline)h(commands)f +(that)h(ma)m(y)h(b)s(e)d(b)s(ound)g(to)i(k)m(ey)g(sequences.)48 +b(Y)-8 b(ou)33 b(can)150 1358 y(list)40 b(y)m(our)f(k)m(ey)i(bindings)d +(b)m(y)h(executing)i Ft(bind)29 b(-P)39 b Fu(or,)j(for)d(a)h(more)g +(terse)g(format,)i(suitable)e(for)f(an)150 1468 y Fr(inputrc)34 +b Fu(\014le,)29 b Ft(bind)g(-p)p Fu(.)40 b(\(See)30 b(Section)f(4.2)h +([Bash)g(Builtins],)g(page)g(51.\))41 b(Command)28 b(names)h(without) +150 1577 y(an)h(accompan)m(ying)i(k)m(ey)f(sequence)g(are)g(un)m(b)s +(ound)d(b)m(y)i(default.)275 1713 y(In)25 b(the)h(follo)m(wing)i +(descriptions,)f Fr(p)s(oin)m(t)h Fu(refers)e(to)h(the)f(curren)m(t)g +(cursor)g(p)s(osition,)h(and)f Fr(mark)31 b Fu(refers)150 +1822 y(to)40 b(a)f(cursor)f(p)s(osition)h(sa)m(v)m(ed)h(b)m(y)f(the)g +Ft(set-mark)d Fu(command.)66 b(The)38 b(text)i(b)s(et)m(w)m(een)g(the)f +(p)s(oin)m(t)g(and)150 1932 y(mark)30 b(is)h(referred)e(to)i(as)g(the)f +Fr(region)p Fu(.)150 2132 y Fk(8.4.1)63 b(Commands)42 +b(F)-10 b(or)41 b(Mo)m(ving)150 2304 y Ft(beginning-of-line)26 +b(\(C-a\))630 2414 y Fu(Mo)m(v)m(e)32 b(to)g(the)e(start)h(of)g(the)f +(curren)m(t)g(line.)150 2574 y Ft(end-of-line)d(\(C-e\))630 +2684 y Fu(Mo)m(v)m(e)32 b(to)g(the)e(end)g(of)g(the)h(line.)150 +2844 y Ft(forward-char)c(\(C-f\))630 2954 y Fu(Mo)m(v)m(e)32 +b(forw)m(ard)e(a)h(c)m(haracter.)150 3114 y Ft(backward-char)c(\(C-b\)) +630 3223 y Fu(Mo)m(v)m(e)32 b(bac)m(k)g(a)e(c)m(haracter.)150 +3384 y Ft(forward-word)d(\(M-f\))630 3493 y Fu(Mo)m(v)m(e)32 +b(forw)m(ard)e(to)h(the)f(end)g(of)g(the)h(next)f(w)m(ord.)41 +b(W)-8 b(ords)30 b(are)h(comp)s(osed)f(of)g(letters)i(and)630 +3603 y(digits.)150 3763 y Ft(backward-word)27 b(\(M-b\))630 +3873 y Fu(Mo)m(v)m(e)36 b(bac)m(k)e(to)g(the)g(start)g(of)g(the)g +(curren)m(t)f(or)g(previous)g(w)m(ord.)50 b(W)-8 b(ords)34 +b(are)g(comp)s(osed)630 3982 y(of)d(letters)g(and)f(digits.)150 +4143 y Ft(shell-forward-word)25 b(\(M-C-f\))630 4252 +y Fu(Mo)m(v)m(e)30 b(forw)m(ard)e(to)h(the)f(end)f(of)h(the)h(next)f(w) +m(ord.)40 b(W)-8 b(ords)28 b(are)g(delimited)h(b)m(y)f(non-quoted)630 +4362 y(shell)j(metac)m(haracters.)150 4522 y Ft(shell-backward-word)25 +b(\(M-C-b\))630 4632 y Fu(Mo)m(v)m(e)37 b(bac)m(k)e(to)h(the)f(start)g +(of)g(the)g(curren)m(t)g(or)f(previous)h(w)m(ord.)53 +b(W)-8 b(ords)35 b(are)g(delimited)630 4741 y(b)m(y)30 +b(non-quoted)h(shell)f(metac)m(haracters.)150 4902 y +Ft(previous-screen-line)25 b(\(\))630 5011 y Fu(A)m(ttempt)41 +b(to)g(mo)m(v)m(e)h(p)s(oin)m(t)e(to)h(the)f(same)h(ph)m(ysical)g +(screen)f(column)g(on)g(the)g(previous)630 5121 y(ph)m(ysical)26 +b(screen)f(line.)39 b(This)24 b(will)i(not)f(ha)m(v)m(e)h(the)f +(desired)g(e\013ect)h(if)f(the)h(curren)m(t)e(Readline)630 +5230 y(line)k(do)s(es)f(not)g(tak)m(e)i(up)d(more)i(than)f(one)g(ph)m +(ysical)h(line)g(or)f(if)g(p)s(oin)m(t)h(is)f(not)h(greater)g(than)630 +5340 y(the)j(length)f(of)h(the)f(prompt)g(plus)f(the)i(screen)f(width.) +p eop end +%%Page: 128 134 +TeXDict begin 128 133 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(128)150 299 y Ft(next-screen-line) +26 b(\(\))630 408 y Fu(A)m(ttempt)g(to)f(mo)m(v)m(e)i(p)s(oin)m(t)d(to) +i(the)e(same)i(ph)m(ysical)f(screen)g(column)f(on)h(the)f(next)h(ph)m +(ysical)630 518 y(screen)e(line.)39 b(This)23 b(will)g(not)h(ha)m(v)m +(e)h(the)e(desired)g(e\013ect)i(if)e(the)g(curren)m(t)h(Readline)g +(line)f(do)s(es)630 628 y(not)k(tak)m(e)i(up)e(more)g(than)g(one)g(ph)m +(ysical)h(line)g(or)f(if)g(the)h(length)f(of)h(the)f(curren)m(t)g +(Readline)630 737 y(line)k(is)f(not)h(greater)g(than)f(the)h(length)g +(of)f(the)h(prompt)e(plus)h(the)g(screen)h(width.)150 +916 y Ft(clear-display)c(\(M-C-l\))630 1026 y Fu(Clear)33 +b(the)g(screen)g(and,)h(if)e(p)s(ossible,)i(the)f(terminal's)g +(scrollbac)m(k)i(bu\013er,)e(then)f(redra)m(w)630 1136 +y(the)f(curren)m(t)f(line,)h(lea)m(ving)h(the)e(curren)m(t)h(line)f(at) +h(the)g(top)g(of)f(the)h(screen.)150 1315 y Ft(clear-screen)c(\(C-l\)) +630 1424 y Fu(Clear)35 b(the)f(screen,)i(then)e(redra)m(w)g(the)h +(curren)m(t)f(line,)i(lea)m(ving)g(the)f(curren)m(t)f(line)h(at)g(the) +630 1534 y(top)c(of)f(the)h(screen.)150 1713 y Ft(redraw-current-line) +25 b(\(\))630 1823 y Fu(Refresh)30 b(the)g(curren)m(t)h(line.)41 +b(By)30 b(default,)h(this)f(is)h(un)m(b)s(ound.)150 2041 +y Fk(8.4.2)63 b(Commands)42 b(F)-10 b(or)41 b(Manipulating)h(The)f +(History)150 2223 y Ft(accept-line)27 b(\(Newline)h(or)i(Return\))630 +2333 y Fu(Accept)25 b(the)e(line)h(regardless)g(of)f(where)g(the)h +(cursor)e(is.)39 b(If)23 b(this)g(line)h(is)f(non-empt)m(y)-8 +b(,)26 b(add)c(it)630 2442 y(to)27 b(the)f(history)g(list)h(according)g +(to)g(the)f(setting)i(of)e(the)g Ft(HISTCONTROL)d Fu(and)j +Ft(HISTIGNORE)630 2552 y Fu(v)-5 b(ariables.)42 b(If)30 +b(this)h(line)g(is)g(a)g(mo)s(di\014ed)e(history)i(line,)g(then)f +(restore)i(the)f(history)f(line)h(to)630 2662 y(its)g(original)g +(state.)150 2841 y Ft(previous-history)26 b(\(C-p\))630 +2950 y Fu(Mo)m(v)m(e)32 b(`bac)m(k')g(through)e(the)g(history)h(list,)g +(fetc)m(hing)g(the)g(previous)f(command.)150 3129 y Ft(next-history)d +(\(C-n\))630 3239 y Fu(Mo)m(v)m(e)32 b(`forw)m(ard')f(through)e(the)i +(history)f(list,)i(fetc)m(hing)f(the)g(next)f(command.)150 +3418 y Ft(beginning-of-history)25 b(\(M-<\))630 3528 +y Fu(Mo)m(v)m(e)32 b(to)g(the)e(\014rst)g(line)g(in)h(the)f(history)-8 +b(.)150 3707 y Ft(end-of-history)26 b(\(M->\))630 3816 +y Fu(Mo)m(v)m(e)32 b(to)g(the)e(end)g(of)g(the)h(input)e(history)-8 +b(,)31 b(i.e.,)h(the)f(line)f(curren)m(tly)h(b)s(eing)f(en)m(tered.)150 +3995 y Ft(reverse-search-history)24 b(\(C-r\))630 4105 +y Fu(Searc)m(h)31 b(bac)m(kw)m(ard)h(starting)g(at)g(the)f(curren)m(t)g +(line)g(and)g(mo)m(ving)h(`up')e(through)h(the)g(his-)630 +4215 y(tory)26 b(as)h(necessary)-8 b(.)40 b(This)25 b(is)i(an)f +(incremen)m(tal)h(searc)m(h.)40 b(This)25 b(command)h(sets)h(the)f +(region)630 4324 y(to)31 b(the)g(matc)m(hed)g(text)g(and)f(activ)-5 +b(ates)33 b(the)d(mark.)150 4503 y Ft(forward-search-history)24 +b(\(C-s\))630 4613 y Fu(Searc)m(h)44 b(forw)m(ard)f(starting)h(at)h +(the)e(curren)m(t)h(line)g(and)f(mo)m(ving)h(`do)m(wn')g(through)f(the) +630 4723 y(history)38 b(as)g(necessary)-8 b(.)65 b(This)38 +b(is)g(an)g(incremen)m(tal)h(searc)m(h.)65 b(This)37 +b(command)h(sets)h(the)630 4832 y(region)31 b(to)g(the)g(matc)m(hed)g +(text)g(and)f(activ)-5 b(ates)33 b(the)d(mark.)150 5011 +y Ft(non-incremental-reverse-)o(sear)o(ch-h)o(ist)o(ory)24 +b(\(M-p\))630 5121 y Fu(Searc)m(h)31 b(bac)m(kw)m(ard)h(starting)g(at)g +(the)f(curren)m(t)g(line)g(and)g(mo)m(ving)h(`up')e(through)h(the)g +(his-)630 5230 y(tory)36 b(as)g(necessary)h(using)e(a)i(non-incremen)m +(tal)g(searc)m(h)f(for)g(a)g(string)g(supplied)f(b)m(y)h(the)630 +5340 y(user.)k(The)30 b(searc)m(h)h(string)f(ma)m(y)h(matc)m(h)g(an)m +(ywhere)g(in)f(a)h(history)f(line.)p eop end +%%Page: 129 135 +TeXDict begin 129 134 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(129)150 299 y Ft +(non-incremental-forward-)o(sear)o(ch-h)o(ist)o(ory)24 +b(\(M-n\))630 408 y Fu(Searc)m(h)44 b(forw)m(ard)f(starting)h(at)h(the) +e(curren)m(t)h(line)g(and)f(mo)m(ving)h(`do)m(wn')g(through)f(the)630 +518 y(history)27 b(as)f(necessary)i(using)e(a)h(non-incremen)m(tal)g +(searc)m(h)h(for)e(a)h(string)g(supplied)e(b)m(y)i(the)630 +628 y(user.)40 b(The)30 b(searc)m(h)h(string)f(ma)m(y)h(matc)m(h)g(an)m +(ywhere)g(in)f(a)h(history)f(line.)150 784 y Ft(history-search-forward) +24 b(\(\))630 894 y Fu(Searc)m(h)42 b(forw)m(ard)f(through)f(the)i +(history)f(for)g(the)h(string)f(of)h(c)m(haracters)h(b)s(et)m(w)m(een)f +(the)630 1003 y(start)36 b(of)h(the)f(curren)m(t)f(line)i(and)e(the)h +(p)s(oin)m(t.)58 b(The)35 b(searc)m(h)i(string)e(m)m(ust)h(matc)m(h)h +(at)g(the)630 1113 y(b)s(eginning)32 b(of)g(a)h(history)g(line.)47 +b(This)32 b(is)h(a)f(non-incremen)m(tal)i(searc)m(h.)48 +b(By)33 b(default,)g(this)630 1223 y(command)d(is)h(un)m(b)s(ound.)150 +1379 y Ft(history-search-backward)24 b(\(\))630 1489 +y Fu(Searc)m(h)35 b(bac)m(kw)m(ard)g(through)f(the)h(history)g(for)g +(the)f(string)h(of)g(c)m(haracters)h(b)s(et)m(w)m(een)g(the)630 +1598 y(start)g(of)h(the)f(curren)m(t)f(line)i(and)e(the)h(p)s(oin)m(t.) +58 b(The)35 b(searc)m(h)i(string)e(m)m(ust)h(matc)m(h)h(at)g(the)630 +1708 y(b)s(eginning)32 b(of)g(a)h(history)g(line.)47 +b(This)32 b(is)h(a)f(non-incremen)m(tal)i(searc)m(h.)48 +b(By)33 b(default,)g(this)630 1817 y(command)d(is)h(un)m(b)s(ound.)150 +1974 y Ft(history-substring-search)o(-for)o(ward)24 b(\(\))630 +2084 y Fu(Searc)m(h)42 b(forw)m(ard)f(through)f(the)i(history)f(for)g +(the)h(string)f(of)h(c)m(haracters)h(b)s(et)m(w)m(een)f(the)630 +2193 y(start)29 b(of)g(the)g(curren)m(t)g(line)g(and)f(the)h(p)s(oin)m +(t.)40 b(The)29 b(searc)m(h)g(string)g(ma)m(y)g(matc)m(h)h(an)m(ywhere) +630 2303 y(in)i(a)h(history)g(line.)47 b(This)32 b(is)g(a)h +(non-incremen)m(tal)h(searc)m(h.)47 b(By)33 b(default,)h(this)e +(command)630 2412 y(is)e(un)m(b)s(ound.)150 2569 y Ft +(history-substring-search)o(-bac)o(kwar)o(d)24 b(\(\))630 +2679 y Fu(Searc)m(h)35 b(bac)m(kw)m(ard)g(through)f(the)h(history)g +(for)g(the)f(string)h(of)g(c)m(haracters)h(b)s(et)m(w)m(een)g(the)630 +2788 y(start)29 b(of)g(the)g(curren)m(t)g(line)g(and)f(the)h(p)s(oin)m +(t.)40 b(The)29 b(searc)m(h)g(string)g(ma)m(y)g(matc)m(h)h(an)m(ywhere) +630 2898 y(in)i(a)h(history)g(line.)47 b(This)32 b(is)g(a)h +(non-incremen)m(tal)h(searc)m(h.)47 b(By)33 b(default,)h(this)e +(command)630 3007 y(is)e(un)m(b)s(ound.)150 3164 y Ft(yank-nth-arg)d +(\(M-C-y\))630 3273 y Fu(Insert)37 b(the)g(\014rst)f(argumen)m(t)i(to)f +(the)h(previous)e(command)h(\(usually)g(the)g(second)g(w)m(ord)630 +3383 y(on)32 b(the)g(previous)f(line\))i(at)f(p)s(oin)m(t.)46 +b(With)32 b(an)g(argumen)m(t)g Fr(n)p Fu(,)g(insert)g(the)g +Fr(n)p Fu(th)f(w)m(ord)g(from)630 3493 y(the)k(previous)f(command)h +(\(the)g(w)m(ords)g(in)f(the)h(previous)g(command)f(b)s(egin)h(with)f +(w)m(ord)630 3602 y(0\).)69 b(A)40 b(negativ)m(e)h(argumen)m(t)f +(inserts)g(the)f Fr(n)p Fu(th)g(w)m(ord)g(from)g(the)h(end)f(of)h(the)f +(previous)630 3712 y(command.)48 b(Once)33 b(the)g(argumen)m(t)h +Fr(n)e Fu(is)h(computed,)h(the)f(argumen)m(t)g(is)g(extracted)i(as)e +(if)630 3821 y(the)e(`)p Ft(!)p Fj(n)p Fu(')f(history)g(expansion)g +(had)g(b)s(een)g(sp)s(eci\014ed.)150 3978 y Ft(yank-last-arg)d(\(M-.)i +(or)h(M-_\))630 4088 y Fu(Insert)k(last)i(argumen)m(t)g(to)g(the)f +(previous)f(command)h(\(the)h(last)f(w)m(ord)g(of)g(the)g(previous)630 +4197 y(history)e(en)m(try\).)51 b(With)34 b(a)g(n)m(umeric)g(argumen)m +(t,)h(b)s(eha)m(v)m(e)f(exactly)h(lik)m(e)g Ft(yank-nth-arg)p +Fu(.)630 4307 y(Successiv)m(e)26 b(calls)g(to)f Ft(yank-last-arg)c +Fu(mo)m(v)m(e)27 b(bac)m(k)e(through)f(the)h(history)g(list,)i +(inserting)630 4416 y(the)c(last)g(w)m(ord)f(\(or)h(the)g(w)m(ord)f(sp) +s(eci\014ed)g(b)m(y)g(the)h(argumen)m(t)g(to)g(the)g(\014rst)f(call\))i +(of)f(eac)m(h)h(line)630 4526 y(in)36 b(turn.)58 b(An)m(y)36 +b(n)m(umeric)h(argumen)m(t)f(supplied)g(to)h(these)g(successiv)m(e)g +(calls)h(determines)630 4635 y(the)d(direction)g(to)h(mo)m(v)m(e)g +(through)e(the)h(history)-8 b(.)54 b(A)35 b(negativ)m(e)i(argumen)m(t)e +(switc)m(hes)h(the)630 4745 y(direction)23 b(through)g(the)g(history)f +(\(bac)m(k)i(or)f(forw)m(ard\).)38 b(The)22 b(history)h(expansion)g +(facilities)630 4855 y(are)28 b(used)f(to)h(extract)h(the)f(last)g +(argumen)m(t,)h(as)e(if)h(the)g(`)p Ft(!$)p Fu(')f(history)g(expansion) +h(had)f(b)s(een)630 4964 y(sp)s(eci\014ed.)150 5121 y +Ft(operate-and-get-next)e(\(C-o\))630 5230 y Fu(Accept)30 +b(the)g(curren)m(t)e(line)i(for)f(return)f(to)h(the)h(calling)g +(application)h(as)e(if)g(a)h(newline)f(had)630 5340 y(b)s(een)22 +b(en)m(tered,)k(and)d(fetc)m(h)h(the)f(next)g(line)h(relativ)m(e)h(to)f +(the)f(curren)m(t)g(line)h(from)f(the)g(history)p eop +end +%%Page: 130 136 +TeXDict begin 130 135 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(130)630 299 y(for)31 +b(editing.)43 b(A)31 b(n)m(umeric)f(argumen)m(t,)i(if)f(supplied,)f(sp) +s(eci\014es)h(the)g(history)f(en)m(try)i(to)f(use)630 +408 y(instead)g(of)f(the)h(curren)m(t)f(line.)150 605 +y Fk(8.4.3)63 b(Commands)42 b(F)-10 b(or)41 b(Changing)g(T)-10 +b(ext)150 775 y Fj(end-of-file)27 b Ft(\(usually)h(C-d\))630 +885 y Fu(The)e(c)m(haracter)h(indicating)h(end-of-\014le)e(as)h(set,)g +(for)f(example,)i(b)m(y)e Ft(stty)p Fu(.)39 b(If)25 b(this)h(c)m +(harac-)630 995 y(ter)c(is)g(read)g(when)e(there)i(are)h(no)e(c)m +(haracters)j(on)d(the)h(line,)i(and)d(p)s(oin)m(t)h(is)g(at)h(the)f(b)s +(eginning)630 1104 y(of)31 b(the)f(line,)h(Readline)g(in)m(terprets)g +(it)g(as)f(the)h(end)f(of)g(input)f(and)h(returns)f Fm(eof)p +Fu(.)150 1261 y Ft(delete-char)e(\(C-d\))630 1370 y Fu(Delete)35 +b(the)f(c)m(haracter)h(at)f(p)s(oin)m(t.)49 b(If)33 b(this)g(function)g +(is)g(b)s(ound)e(to)j(the)g(same)f(c)m(haracter)630 1480 +y(as)e(the)f(tt)m(y)i Fm(eof)d Fu(c)m(haracter,)j(as)f +Fj(C-d)e Fu(commonly)i(is,)g(see)g(ab)s(o)m(v)m(e)h(for)e(the)g +(e\013ects.)150 1637 y Ft(backward-delete-char)25 b(\(Rubout\))630 +1746 y Fu(Delete)32 b(the)f(c)m(haracter)g(b)s(ehind)e(the)h(cursor.)40 +b(A)30 b(n)m(umeric)g(argumen)m(t)h(means)f(to)h(kill)g(the)630 +1856 y(c)m(haracters)h(instead)e(of)h(deleting)g(them.)150 +2013 y Ft(forward-backward-delete-)o(char)24 b(\(\))630 +2122 y Fu(Delete)40 b(the)f(c)m(haracter)h(under)c(the)j(cursor,)h +(unless)d(the)i(cursor)e(is)h(at)h(the)g(end)e(of)i(the)630 +2232 y(line,)33 b(in)e(whic)m(h)g(case)i(the)f(c)m(haracter)h(b)s +(ehind)d(the)i(cursor)f(is)g(deleted.)46 b(By)32 b(default,)g(this)630 +2341 y(is)e(not)h(b)s(ound)d(to)j(a)g(k)m(ey)-8 b(.)150 +2498 y Ft(quoted-insert)27 b(\(C-q)i(or)h(C-v\))630 2608 +y Fu(Add)j(the)i(next)f(c)m(haracter)i(t)m(yp)s(ed)e(to)h(the)f(line)h +(v)m(erbatim.)53 b(This)33 b(is)i(ho)m(w)f(to)h(insert)f(k)m(ey)630 +2717 y(sequences)d(lik)m(e)g Fj(C-q)p Fu(,)f(for)g(example.)150 +2874 y Ft(self-insert)d(\(a,)j(b,)g(A,)f(1,)h(!,)g(...)o(\))630 +2983 y Fu(Insert)g(y)m(ourself.)150 3140 y Ft(bracketed-paste-begin)25 +b(\(\))630 3250 y Fu(This)f(function)h(is)f(in)m(tended)h(to)h(b)s(e)e +(b)s(ound)f(to)i(the)g Ft(")p Fu(brac)m(k)m(eted)h(paste)p +Ft(")f Fu(escap)s(e)h(sequence)630 3359 y(sen)m(t)38 +b(b)m(y)f(some)h(terminals,)i(and)d(suc)m(h)g(a)h(binding)e(is)i +(assigned)f(b)m(y)h(default.)62 b(It)38 b(allo)m(ws)630 +3469 y(Readline)33 b(to)g(insert)g(the)f(pasted)h(text)g(as)g(a)g +(single)g(unit)f(without)h(treating)h(eac)m(h)f(c)m(har-)630 +3578 y(acter)40 b(as)f(if)g(it)g(had)f(b)s(een)g(read)h(from)f(the)h(k) +m(eyb)s(oard.)66 b(The)39 b(c)m(haracters)h(are)f(inserted)630 +3688 y(as)44 b(if)g(eac)m(h)i(one)e(w)m(as)g(b)s(ound)e(to)j +Ft(self-insert)c Fu(instead)j(of)h(executing)g(an)m(y)f(editing)630 +3798 y(commands.)630 3931 y(Brac)m(k)m(eted)38 b(paste)f(sets)f(the)h +(region)f(\(the)h(c)m(haracters)g(b)s(et)m(w)m(een)g(p)s(oin)m(t)f(and) +g(the)g(mark\))630 4040 y(to)j(the)g(inserted)f(text.)65 +b(It)39 b(uses)f(the)g(concept)h(of)g(an)f Fl(active)i(mark)10 +b Fu(:)57 b(when)38 b(the)g(mark)630 4150 y(is)d(activ)m(e,)k(Readline) +c(redispla)m(y)h(uses)e(the)h(terminal's)h(standout)f(mo)s(de)f(to)i +(denote)g(the)630 4260 y(region.)150 4416 y Ft(transpose-chars)26 +b(\(C-t\))630 4526 y Fu(Drag)33 b(the)f(c)m(haracter)h(b)s(efore)f(the) +g(cursor)f(forw)m(ard)h(o)m(v)m(er)h(the)f(c)m(haracter)i(at)e(the)g +(cursor,)630 4635 y(mo)m(ving)k(the)g(cursor)f(forw)m(ard)g(as)g(w)m +(ell.)57 b(If)35 b(the)h(insertion)g(p)s(oin)m(t)f(is)g(at)i(the)e(end) +g(of)h(the)630 4745 y(line,)24 b(then)e(this)g(transp)s(oses)f(the)h +(last)h(t)m(w)m(o)g(c)m(haracters)g(of)f(the)h(line.)38 +b(Negativ)m(e)25 b(argumen)m(ts)630 4855 y(ha)m(v)m(e)32 +b(no)e(e\013ect.)150 5011 y Ft(transpose-words)c(\(M-t\))630 +5121 y Fu(Drag)33 b(the)g(w)m(ord)f(b)s(efore)g(p)s(oin)m(t)g(past)g +(the)h(w)m(ord)f(after)g(p)s(oin)m(t,)i(mo)m(ving)f(p)s(oin)m(t)f(past) +g(that)630 5230 y(w)m(ord)c(as)h(w)m(ell.)41 b(If)27 +b(the)i(insertion)f(p)s(oin)m(t)h(is)f(at)h(the)g(end)e(of)i(the)f +(line,)i(this)e(transp)s(oses)g(the)630 5340 y(last)j(t)m(w)m(o)h(w)m +(ords)e(on)g(the)h(line.)p eop end +%%Page: 131 137 +TeXDict begin 131 136 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(131)150 299 y Ft(upcase-word)27 +b(\(M-u\))630 408 y Fu(Upp)s(ercase)32 b(the)g(curren)m(t)g(\(or)g +(follo)m(wing\))i(w)m(ord.)45 b(With)32 b(a)g(negativ)m(e)j(argumen)m +(t,)e(upp)s(er-)630 518 y(case)e(the)g(previous)f(w)m(ord,)g(but)g(do)g +(not)h(mo)m(v)m(e)h(the)e(cursor.)150 665 y Ft(downcase-word)d(\(M-l\)) +630 775 y Fu(Lo)m(w)m(ercase)c(the)f(curren)m(t)f(\(or)h(follo)m +(wing\))i(w)m(ord.)37 b(With)22 b(a)g(negativ)m(e)i(argumen)m(t,)g(lo)m +(w)m(ercase)630 884 y(the)31 b(previous)e(w)m(ord,)i(but)e(do)i(not)f +(mo)m(v)m(e)i(the)f(cursor.)150 1032 y Ft(capitalize-word)26 +b(\(M-c\))630 1141 y Fu(Capitalize)d(the)f(curren)m(t)f(\(or)g(follo)m +(wing\))i(w)m(ord.)38 b(With)21 b(a)h(negativ)m(e)h(argumen)m(t,)h +(capitalize)630 1251 y(the)31 b(previous)e(w)m(ord,)i(but)e(do)i(not)f +(mo)m(v)m(e)i(the)f(cursor.)150 1398 y Ft(overwrite-mode)26 +b(\(\))630 1508 y Fu(T)-8 b(oggle)35 b(o)m(v)m(erwrite)g(mo)s(de.)48 +b(With)33 b(an)g(explicit)h(p)s(ositiv)m(e)g(n)m(umeric)f(argumen)m(t,) +h(switc)m(hes)630 1617 y(to)22 b(o)m(v)m(erwrite)i(mo)s(de.)37 +b(With)22 b(an)g(explicit)h(non-p)s(ositiv)m(e)f(n)m(umeric)g(argumen)m +(t,)i(switc)m(hes)e(to)630 1727 y(insert)30 b(mo)s(de.)41 +b(This)30 b(command)h(a\013ects)h(only)e Ft(emacs)f Fu(mo)s(de;)i +Ft(vi)f Fu(mo)s(de)g(do)s(es)g(o)m(v)m(erwrite)630 1837 +y(di\013eren)m(tly)-8 b(.)42 b(Eac)m(h)31 b(call)h(to)f +Ft(readline\(\))c Fu(starts)k(in)f(insert)g(mo)s(de.)630 +1965 y(In)52 b(o)m(v)m(erwrite)h(mo)s(de,)58 b(c)m(haracters)c(b)s +(ound)c(to)j Ft(self-insert)c Fu(replace)k(the)g(text)g(at)630 +2075 y(p)s(oin)m(t)59 b(rather)f(than)h(pushing)e(the)i(text)g(to)h +(the)f(righ)m(t.)126 b(Characters)59 b(b)s(ound)d(to)630 +2184 y Ft(backward-delete-char)25 b Fu(replace)31 b(the)g(c)m(haracter) +h(b)s(efore)e(p)s(oin)m(t)g(with)g(a)h(space.)630 2313 +y(By)g(default,)f(this)h(command)f(is)g(un)m(b)s(ound.)150 +2500 y Fk(8.4.4)63 b(Killing)42 b(And)e(Y)-10 b(anking)150 +2665 y Ft(kill-line)28 b(\(C-k\))630 2775 y Fu(Kill)k(the)f(text)i +(from)d(p)s(oin)m(t)i(to)g(the)f(end)g(of)g(the)h(line.)44 +b(With)31 b(a)h(negativ)m(e)i(n)m(umeric)d(argu-)630 +2885 y(men)m(t,)g(kill)g(bac)m(kw)m(ard)g(from)f(the)g(cursor)g(to)h +(the)g(b)s(eginning)e(of)i(the)g(curren)m(t)f(line.)150 +3032 y Ft(backward-kill-line)25 b(\(C-x)30 b(Rubout\))630 +3141 y Fu(Kill)40 b(bac)m(kw)m(ard)h(from)e(the)h(cursor)g(to)g(the)g +(b)s(eginning)g(of)g(the)g(curren)m(t)f(line.)70 b(With)41 +b(a)630 3251 y(negativ)m(e)47 b(n)m(umeric)e(argumen)m(t,)50 +b(kill)c(forw)m(ard)e(from)h(the)g(cursor)g(to)h(the)f(end)f(of)i(the) +630 3361 y(curren)m(t)30 b(line.)150 3508 y Ft(unix-line-discard)c +(\(C-u\))630 3617 y Fu(Kill)31 b(bac)m(kw)m(ard)g(from)e(the)i(cursor)f +(to)h(the)f(b)s(eginning)g(of)h(the)f(curren)m(t)g(line.)150 +3765 y Ft(kill-whole-line)c(\(\))630 3874 y Fu(Kill)37 +b(all)g(c)m(haracters)h(on)f(the)f(curren)m(t)h(line,)h(no)f(matter)g +(where)f(p)s(oin)m(t)h(is.)59 b(By)36 b(default,)630 +3984 y(this)30 b(is)h(un)m(b)s(ound.)150 4131 y Ft(kill-word)d(\(M-d\)) +630 4241 y Fu(Kill)i(from)f(p)s(oin)m(t)g(to)h(the)g(end)e(of)i(the)f +(curren)m(t)h(w)m(ord,)f(or)g(if)h(b)s(et)m(w)m(een)g(w)m(ords,)f(to)h +(the)g(end)630 4350 y(of)h(the)f(next)h(w)m(ord.)40 b(W)-8 +b(ord)31 b(b)s(oundaries)e(are)h(the)h(same)g(as)f Ft(forward-word)p +Fu(.)150 4498 y Ft(backward-kill-word)25 b(\(M-DEL\))630 +4607 y Fu(Kill)k(the)g(w)m(ord)g(b)s(ehind)e(p)s(oin)m(t.)40 +b(W)-8 b(ord)29 b(b)s(oundaries)f(are)h(the)g(same)g(as)g +Ft(backward-word)p Fu(.)150 4754 y Ft(shell-kill-word)d(\(M-C-d\))630 +4864 y Fu(Kill)k(from)f(p)s(oin)m(t)g(to)h(the)g(end)e(of)i(the)f +(curren)m(t)h(w)m(ord,)f(or)g(if)h(b)s(et)m(w)m(een)g(w)m(ords,)f(to)h +(the)g(end)630 4974 y(of)h(the)f(next)h(w)m(ord.)40 b(W)-8 +b(ord)31 b(b)s(oundaries)e(are)h(the)h(same)g(as)f Ft +(shell-forward-word)p Fu(.)150 5121 y Ft(shell-backward-kill-word)24 +b(\(\))630 5230 y Fu(Kill)e(the)h(w)m(ord)e(b)s(ehind)g(p)s(oin)m(t.)38 +b(W)-8 b(ord)22 b(b)s(oundaries)f(are)h(the)g(same)h(as)f +Ft(shell-backward-)630 5340 y(word)p Fu(.)p eop end +%%Page: 132 138 +TeXDict begin 132 137 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(132)150 299 y Ft +(shell-transpose-words)25 b(\(M-C-t\))630 408 y Fu(Drag)33 +b(the)g(w)m(ord)f(b)s(efore)g(p)s(oin)m(t)g(past)g(the)h(w)m(ord)f +(after)g(p)s(oin)m(t,)i(mo)m(ving)f(p)s(oin)m(t)f(past)g(that)630 +518 y(w)m(ord)c(as)h(w)m(ell.)41 b(If)27 b(the)i(insertion)f(p)s(oin)m +(t)h(is)f(at)h(the)g(end)e(of)i(the)f(line,)i(this)e(transp)s(oses)g +(the)630 628 y(last)j(t)m(w)m(o)h(w)m(ords)d(on)i(the)f(line.)41 +b(W)-8 b(ord)31 b(b)s(oundaries)e(are)h(the)h(same)f(as)h +Ft(shell-forward-)630 737 y(word)e Fu(and)h Ft(shell-backward-word)p +Fu(.)150 897 y Ft(unix-word-rubout)c(\(C-w\))630 1007 +y Fu(Kill)32 b(the)g(w)m(ord)f(b)s(ehind)f(p)s(oin)m(t,)i(using)f +(white)h(space)g(as)g(a)g(w)m(ord)f(b)s(oundary)-8 b(.)43 +b(The)31 b(killed)630 1116 y(text)g(is)g(sa)m(v)m(ed)g(on)g(the)f +(kill-ring.)150 1277 y Ft(unix-filename-rubout)25 b(\(\))630 +1386 y Fu(Kill)37 b(the)f(w)m(ord)g(b)s(ehind)f(p)s(oin)m(t,)j(using)e +(white)g(space)h(and)f(the)g(slash)g(c)m(haracter)i(as)f(the)630 +1496 y(w)m(ord)30 b(b)s(oundaries.)39 b(The)30 b(killed)h(text)g(is)g +(sa)m(v)m(ed)g(on)g(the)f(kill-ring.)150 1656 y Ft +(delete-horizontal-space)24 b(\(\))630 1765 y Fu(Delete)33 +b(all)e(spaces)g(and)e(tabs)i(around)e(p)s(oin)m(t.)41 +b(By)31 b(default,)f(this)h(is)f(un)m(b)s(ound.)150 1925 +y Ft(kill-region)d(\(\))630 2035 y Fu(Kill)k(the)f(text)i(in)e(the)g +(curren)m(t)h(region.)41 b(By)31 b(default,)f(this)h(command)f(is)g(un) +m(b)s(ound.)150 2195 y Ft(copy-region-as-kill)25 b(\(\))630 +2305 y Fu(Cop)m(y)34 b(the)g(text)h(in)f(the)g(region)g(to)h(the)f +(kill)h(bu\013er,)f(so)g(it)h(can)f(b)s(e)f(y)m(ank)m(ed)i(righ)m(t)f +(a)m(w)m(a)m(y)-8 b(.)630 2414 y(By)31 b(default,)f(this)h(command)f +(is)g(un)m(b)s(ound.)150 2574 y Ft(copy-backward-word)25 +b(\(\))630 2684 y Fu(Cop)m(y)38 b(the)h(w)m(ord)f(b)s(efore)g(p)s(oin)m +(t)g(to)i(the)e(kill)h(bu\013er.)64 b(The)38 b(w)m(ord)g(b)s(oundaries) +f(are)i(the)630 2793 y(same)31 b(as)f Ft(backward-word)p +Fu(.)38 b(By)30 b(default,)h(this)f(command)g(is)h(un)m(b)s(ound.)150 +2953 y Ft(copy-forward-word)26 b(\(\))630 3063 y Fu(Cop)m(y)31 +b(the)g(w)m(ord)g(follo)m(wing)h(p)s(oin)m(t)f(to)h(the)f(kill)h +(bu\013er.)42 b(The)30 b(w)m(ord)h(b)s(oundaries)e(are)j(the)630 +3173 y(same)f(as)f Ft(forward-word)p Fu(.)38 b(By)30 +b(default,)h(this)g(command)f(is)g(un)m(b)s(ound.)150 +3333 y Ft(yank)f(\(C-y\))630 3442 y Fu(Y)-8 b(ank)31 +b(the)f(top)h(of)g(the)f(kill)h(ring)f(in)m(to)i(the)e(bu\013er)g(at)h +(p)s(oin)m(t.)150 3602 y Ft(yank-pop)d(\(M-y\))630 3712 +y Fu(Rotate)36 b(the)f(kill-ring,)i(and)d(y)m(ank)h(the)f(new)g(top.)54 +b(Y)-8 b(ou)35 b(can)g(only)f(do)h(this)f(if)h(the)g(prior)630 +3822 y(command)30 b(is)h Ft(yank)e Fu(or)h Ft(yank-pop)p +Fu(.)150 4021 y Fk(8.4.5)63 b(Sp)s(ecifying)42 b(Numeric)f(Argumen)m +(ts)150 4194 y Ft(digit-argument)26 b(\()p Fj(M-0)p Ft(,)j +Fj(M-1)p Ft(,)h(...)f Fj(M--)p Ft(\))630 4303 y Fu(Add)d(this)h(digit)g +(to)h(the)f(argumen)m(t)g(already)h(accum)m(ulating,)h(or)e(start)h(a)f +(new)f(argumen)m(t.)630 4413 y Fj(M--)j Fu(starts)i(a)g(negativ)m(e)i +(argumen)m(t.)150 4573 y Ft(universal-argument)25 b(\(\))630 +4682 y Fu(This)g(is)g(another)h(w)m(a)m(y)g(to)h(sp)s(ecify)e(an)g +(argumen)m(t.)40 b(If)25 b(this)g(command)h(is)f(follo)m(w)m(ed)i(b)m +(y)f(one)630 4792 y(or)k(more)f(digits,)i(optionally)g(with)e(a)h +(leading)h(min)m(us)e(sign,)h(those)g(digits)g(de\014ne)f(the)h(ar-)630 +4902 y(gumen)m(t.)41 b(If)28 b(the)i(command)f(is)g(follo)m(w)m(ed)h(b) +m(y)f(digits,)i(executing)f Ft(universal-argument)630 +5011 y Fu(again)j(ends)e(the)h(n)m(umeric)f(argumen)m(t,)i(but)e(is)h +(otherwise)g(ignored.)45 b(As)32 b(a)g(sp)s(ecial)h(case,)630 +5121 y(if)g(this)g(command)f(is)h(immediately)h(follo)m(w)m(ed)h(b)m(y) +d(a)h(c)m(haracter)i(that)e(is)g(neither)g(a)g(digit)630 +5230 y(nor)41 b(min)m(us)f(sign,)k(the)e(argumen)m(t)f(coun)m(t)h(for)f +(the)h(next)f(command)g(is)g(m)m(ultiplied)h(b)m(y)630 +5340 y(four.)54 b(The)35 b(argumen)m(t)g(coun)m(t)h(is)f(initially)h +(one,)h(so)e(executing)i(this)e(function)f(the)i(\014rst)p +eop end +%%Page: 133 139 +TeXDict begin 133 138 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(133)630 299 y(time)29 +b(mak)m(es)h(the)e(argumen)m(t)i(coun)m(t)f(four,)f(a)h(second)g(time)g +(mak)m(es)h(the)e(argumen)m(t)h(coun)m(t)630 408 y(sixteen,)i(and)f(so) +h(on.)40 b(By)31 b(default,)g(this)f(is)g(not)h(b)s(ound)d(to)k(a)e(k)m +(ey)-8 b(.)150 603 y Fk(8.4.6)63 b(Letting)40 b(Readline)h(T)m(yp)s(e)g +(F)-10 b(or)42 b(Y)-10 b(ou)150 772 y Ft(complete)28 +b(\(TAB\))630 882 y Fu(A)m(ttempt)c(to)f(p)s(erform)e(completion)j(on)f +(the)g(text)g(b)s(efore)f(p)s(oin)m(t.)39 b(The)22 b(actual)i +(completion)630 991 y(p)s(erformed)33 b(is)h(application-sp)s +(eci\014c.)53 b(Bash)35 b(attempts)g(completion)g(treating)h(the)e +(text)630 1101 y(as)39 b(a)h(v)-5 b(ariable)39 b(\(if)h(the)f(text)h(b) +s(egins)e(with)h(`)p Ft($)p Fu('\),)j(username)c(\(if)i(the)f(text)h(b) +s(egins)e(with)630 1210 y(`)p Ft(~)p Fu('\),)31 b(hostname)f(\(if)g +(the)g(text)h(b)s(egins)e(with)h(`)p Ft(@)p Fu('\),)h(or)f(command)f +(\(including)h(aliases)i(and)630 1320 y(functions\))j(in)f(turn.)53 +b(If)34 b(none)g(of)h(these)h(pro)s(duces)d(a)i(matc)m(h,)i(\014lename) +e(completion)h(is)630 1430 y(attempted.)150 1584 y Ft +(possible-completions)25 b(\(M-?\))630 1694 y Fu(List)35 +b(the)g(p)s(ossible)f(completions)i(of)e(the)h(text)h(b)s(efore)e(p)s +(oin)m(t.)54 b(When)34 b(displa)m(ying)h(com-)630 1803 +y(pletions,)f(Readline)f(sets)f(the)h(n)m(um)m(b)s(er)e(of)i(columns)f +(used)f(for)i(displa)m(y)f(to)h(the)g(v)-5 b(alue)33 +b(of)630 1913 y Ft(completion-display-width)o Fu(,)g(the)j(v)-5 +b(alue)37 b(of)g(the)f(en)m(vironmen)m(t)h(v)-5 b(ariable)38 +b Ft(COLUMNS)p Fu(,)630 2022 y(or)30 b(the)h(screen)f(width,)g(in)g +(that)h(order.)150 2177 y Ft(insert-completions)25 b(\(M-*\))630 +2286 y Fu(Insert)30 b(all)h(completions)h(of)f(the)g(text)g(b)s(efore)f +(p)s(oin)m(t)h(that)g(w)m(ould)f(ha)m(v)m(e)i(b)s(een)e(generated)630 +2396 y(b)m(y)g Ft(possible-completions)p Fu(.)150 2550 +y Ft(menu-complete)d(\(\))630 2660 y Fu(Similar)d(to)g +Ft(complete)p Fu(,)f(but)h(replaces)g(the)g(w)m(ord)g(to)g(b)s(e)f +(completed)i(with)e(a)i(single)f(matc)m(h)630 2770 y(from)37 +b(the)h(list)h(of)f(p)s(ossible)f(completions.)64 b(Rep)s(eated)39 +b(execution)g(of)f Ft(menu-complete)630 2879 y Fu(steps)i(through)g +(the)g(list)h(of)f(p)s(ossible)g(completions,)k(inserting)c(eac)m(h)i +(matc)m(h)f(in)f(turn.)630 2989 y(A)m(t)e(the)f(end)f(of)h(the)g(list)g +(of)g(completions,)i(the)e(b)s(ell)g(is)g(rung)f(\(sub)5 +b(ject)36 b(to)i(the)f(setting)630 3098 y(of)f Ft(bell-style)p +Fu(\))e(and)h(the)h(original)i(text)f(is)f(restored.)57 +b(An)36 b(argumen)m(t)h(of)f Fr(n)f Fu(mo)m(v)m(es)i +Fr(n)630 3208 y Fu(p)s(ositions)e(forw)m(ard)f(in)g(the)h(list)h(of)e +(matc)m(hes;)39 b(a)c(negativ)m(e)i(argumen)m(t)e(ma)m(y)g(b)s(e)f +(used)g(to)630 3318 y(mo)m(v)m(e)40 b(bac)m(kw)m(ard)e(through)g(the)g +(list.)65 b(This)38 b(command)g(is)g(in)m(tended)g(to)h(b)s(e)f(b)s +(ound)e(to)630 3427 y Ft(TAB)p Fu(,)30 b(but)f(is)i(un)m(b)s(ound)d(b)m +(y)i(default.)150 3582 y Ft(menu-complete-backward)24 +b(\(\))630 3691 y Fu(Iden)m(tical)36 b(to)g Ft(menu-complete)p +Fu(,)d(but)h(mo)m(v)m(es)j(bac)m(kw)m(ard)e(through)f(the)i(list)f(of)g +(p)s(ossible)630 3801 y(completions,)d(as)e(if)h Ft(menu-complete)26 +b Fu(had)k(b)s(een)g(giv)m(en)h(a)g(negativ)m(e)i(argumen)m(t.)150 +3955 y Ft(delete-char-or-list)25 b(\(\))630 4065 y Fu(Deletes)41 +b(the)e(c)m(haracter)h(under)e(the)h(cursor)f(if)h(not)g(at)g(the)h(b)s +(eginning)e(or)h(end)f(of)h(the)630 4174 y(line)50 b(\(lik)m(e)h +Ft(delete-char)p Fu(\).)96 b(If)49 b(at)h(the)g(end)f(of)h(the)f(line,) +55 b(b)s(eha)m(v)m(es)c(iden)m(tically)g(to)630 4284 +y Ft(possible-completions)p Fu(.)35 b(This)30 b(command)g(is)g(un)m(b)s +(ound)e(b)m(y)i(default.)150 4438 y Ft(complete-filename)c(\(M-/\))630 +4548 y Fu(A)m(ttempt)32 b(\014lename)e(completion)i(on)e(the)h(text)g +(b)s(efore)f(p)s(oin)m(t.)150 4702 y Ft(possible-filename-comple)o +(tion)o(s)24 b(\(C-x)30 b(/\))630 4812 y Fu(List)f(the)g(p)s(ossible)f +(completions)h(of)g(the)g(text)g(b)s(efore)g(p)s(oin)m(t,)g(treating)h +(it)f(as)g(a)f(\014lename.)150 4966 y Ft(complete-username)e(\(M-~\)) +630 5076 y Fu(A)m(ttempt)32 b(completion)f(on)g(the)f(text)i(b)s(efore) +e(p)s(oin)m(t,)g(treating)i(it)f(as)f(a)h(username.)150 +5230 y Ft(possible-username-comple)o(tion)o(s)24 b(\(C-x)30 +b(~\))630 5340 y Fu(List)25 b(the)g(p)s(ossible)g(completions)h(of)f +(the)g(text)h(b)s(efore)f(p)s(oin)m(t,)h(treating)g(it)g(as)f(a)g +(username.)p eop end +%%Page: 134 140 +TeXDict begin 134 139 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(134)150 299 y Ft +(complete-variable)26 b(\(M-$\))630 408 y Fu(A)m(ttempt)32 +b(completion)f(on)g(the)f(text)i(b)s(efore)e(p)s(oin)m(t,)g(treating)i +(it)f(as)f(a)h(shell)g(v)-5 b(ariable.)150 589 y Ft +(possible-variable-comple)o(tion)o(s)24 b(\(C-x)30 b($\))630 +699 y Fu(List)42 b(the)g(p)s(ossible)g(completions)h(of)f(the)g(text)h +(b)s(efore)e(p)s(oin)m(t,)46 b(treating)d(it)f(as)g(a)h(shell)630 +809 y(v)-5 b(ariable.)150 989 y Ft(complete-hostname)26 +b(\(M-@\))630 1099 y Fu(A)m(ttempt)32 b(completion)f(on)g(the)f(text)i +(b)s(efore)e(p)s(oin)m(t,)g(treating)i(it)f(as)f(a)h(hostname.)150 +1280 y Ft(possible-hostname-comple)o(tion)o(s)24 b(\(C-x)30 +b(@\))630 1390 y Fu(List)25 b(the)g(p)s(ossible)f(completions)h(of)g +(the)g(text)g(b)s(efore)g(p)s(oin)m(t,)h(treating)g(it)f(as)f(a)h +(hostname.)150 1570 y Ft(complete-command)h(\(M-!\))630 +1680 y Fu(A)m(ttempt)32 b(completion)g(on)f(the)g(text)h(b)s(efore)e(p) +s(oin)m(t,)h(treating)h(it)g(as)f(a)g(command)g(name.)630 +1790 y(Command)46 b(completion)i(attempts)g(to)f(matc)m(h)h(the)f(text) +h(against)g(aliases,)53 b(reserv)m(ed)630 1899 y(w)m(ords,)36 +b(shell)g(functions,)h(shell)e(builtins,)i(and)e(\014nally)g +(executable)i(\014lenames,)g(in)e(that)630 2009 y(order.)150 +2190 y Ft(possible-command-complet)o(ions)24 b(\(C-x)29 +b(!\))630 2299 y Fu(List)d(the)h(p)s(ossible)f(completions)h(of)f(the)h +(text)g(b)s(efore)f(p)s(oin)m(t,)h(treating)g(it)g(as)g(a)f(command)630 +2409 y(name.)150 2590 y Ft(dynamic-complete-history)e(\(M-TAB\))630 +2699 y Fu(A)m(ttempt)31 b(completion)h(on)e(the)g(text)h(b)s(efore)f(p) +s(oin)m(t,)g(comparing)h(the)f(text)h(against)h(lines)630 +2809 y(from)e(the)g(history)h(list)g(for)f(p)s(ossible)g(completion)i +(matc)m(hes.)150 2990 y Ft(dabbrev-expand)26 b(\(\))630 +3099 y Fu(A)m(ttempt)i(men)m(u)e(completion)i(on)f(the)g(text)g(b)s +(efore)f(p)s(oin)m(t,)i(comparing)f(the)g(text)h(against)630 +3209 y(lines)j(from)e(the)i(history)f(list)h(for)g(p)s(ossible)e +(completion)j(matc)m(hes.)150 3390 y Ft(complete-into-braces)25 +b(\(M-{\))630 3500 y Fu(P)m(erform)f(\014lename)f(completion)i(and)f +(insert)f(the)h(list)g(of)g(p)s(ossible)f(completions)i(enclosed)630 +3609 y(within)34 b(braces)h(so)f(the)h(list)g(is)g(a)m(v)-5 +b(ailable)37 b(to)e(the)g(shell)g(\(see)g(Section)h(3.5.1)g([Brace)g +(Ex-)630 3719 y(pansion],)30 b(page)h(23\).)150 3939 +y Fk(8.4.7)63 b(Keyb)s(oard)41 b(Macros)150 4122 y Ft(start-kbd-macro) +26 b(\(C-x)j(\(\))630 4232 y Fu(Begin)i(sa)m(ving)h(the)e(c)m +(haracters)i(t)m(yp)s(ed)e(in)m(to)h(the)g(curren)m(t)f(k)m(eyb)s(oard) +g(macro.)150 4413 y Ft(end-kbd-macro)d(\(C-x)i(\)\))630 +4522 y Fu(Stop)e(sa)m(ving)h(the)g(c)m(haracters)g(t)m(yp)s(ed)f(in)m +(to)i(the)e(curren)m(t)g(k)m(eyb)s(oard)g(macro)h(and)f(sa)m(v)m(e)i +(the)630 4632 y(de\014nition.)150 4813 y Ft(call-last-kbd-macro)c +(\(C-x)k(e\))630 4922 y Fu(Re-execute)37 b(the)e(last)h(k)m(eyb)s(oard) +f(macro)h(de\014ned,)f(b)m(y)h(making)f(the)g(c)m(haracters)i(in)e(the) +630 5032 y(macro)c(app)s(ear)f(as)g(if)h(t)m(yp)s(ed)f(at)h(the)f(k)m +(eyb)s(oard.)150 5213 y Ft(print-last-kbd-macro)25 b(\(\))630 +5322 y Fu(Prin)m(t)30 b(the)h(last)g(k)m(eb)s(oard)f(macro)h(de\014ned) +e(in)i(a)f(format)h(suitable)g(for)f(the)h Fr(inputrc)k +Fu(\014le.)p eop end +%%Page: 135 141 +TeXDict begin 135 140 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(135)150 299 y Fk(8.4.8)63 +b(Some)41 b(Miscellaneous)i(Commands)150 478 y Ft(re-read-init-file)26 +b(\(C-x)j(C-r\))630 587 y Fu(Read)22 b(in)g(the)g(con)m(ten)m(ts)h(of)f +(the)g Fr(inputrc)27 b Fu(\014le,)d(and)d(incorp)s(orate)h(an)m(y)h +(bindings)d(or)i(v)-5 b(ariable)630 697 y(assignmen)m(ts)31 +b(found)e(there.)150 870 y Ft(abort)g(\(C-g\))630 979 +y Fu(Ab)s(ort)d(the)h(curren)m(t)f(editing)h(command)f(and)g(ring)h +(the)f(terminal's)h(b)s(ell)g(\(sub)5 b(ject)26 b(to)i(the)630 +1089 y(setting)j(of)g Ft(bell-style)p Fu(\).)150 1262 +y Ft(do-lowercase-version)25 b(\(M-A,)k(M-B,)g(M-)p Fj(x)p +Ft(,)g(...)o(\))630 1372 y Fu(If)35 b(the)g(meta\014ed)g(c)m(haracter)i +Fr(x)k Fu(is)35 b(upp)s(er)e(case,)k(run)d(the)h(command)g(that)g(is)g +(b)s(ound)e(to)630 1481 y(the)g(corresp)s(onding)f(meta\014ed)h(lo)m(w) +m(er)i(case)f(c)m(haracter.)50 b(The)32 b(b)s(eha)m(vior)h(is)g +(unde\014ned)e(if)630 1591 y Fr(x)37 b Fu(is)30 b(already)h(lo)m(w)m +(er)h(case.)150 1764 y Ft(prefix-meta)27 b(\(ESC\))630 +1873 y Fu(Metafy)39 b(the)e(next)h(c)m(haracter)h(t)m(yp)s(ed.)62 +b(This)37 b(is)g(for)h(k)m(eyb)s(oards)f(without)g(a)h(meta)g(k)m(ey)-8 +b(.)630 1983 y(T)m(yping)30 b(`)p Ft(ESC)g(f)p Fu(')g(is)h(equiv)-5 +b(alen)m(t)31 b(to)g(t)m(yping)g Fj(M-f)p Fu(.)150 2156 +y Ft(undo)e(\(C-_)g(or)h(C-x)g(C-u\))630 2266 y Fu(Incremen)m(tal)h +(undo,)f(separately)h(remem)m(b)s(ered)f(for)g(eac)m(h)i(line.)150 +2439 y Ft(revert-line)27 b(\(M-r\))630 2548 y Fu(Undo)33 +b(all)h(c)m(hanges)g(made)f(to)h(this)f(line.)49 b(This)32 +b(is)h(lik)m(e)i(executing)f(the)f Ft(undo)f Fu(command)630 +2658 y(enough)e(times)h(to)g(get)h(bac)m(k)f(to)g(the)f(b)s(eginning.) +150 2831 y Ft(tilde-expand)d(\(M-&\))630 2940 y Fu(P)m(erform)j(tilde)h +(expansion)g(on)f(the)g(curren)m(t)h(w)m(ord.)150 3114 +y Ft(set-mark)d(\(C-@\))630 3223 y Fu(Set)33 b(the)g(mark)f(to)i(the)f +(p)s(oin)m(t.)48 b(If)32 b(a)h(n)m(umeric)g(argumen)m(t)g(is)g +(supplied,)f(the)h(mark)g(is)f(set)630 3333 y(to)f(that)g(p)s(osition.) +150 3506 y Ft(exchange-point-and-mark)24 b(\(C-x)29 b(C-x\))630 +3615 y Fu(Sw)m(ap)i(the)g(p)s(oin)m(t)g(with)g(the)g(mark.)43 +b(The)31 b(curren)m(t)g(cursor)f(p)s(osition)i(is)f(set)h(to)f(the)h +(sa)m(v)m(ed)630 3725 y(p)s(osition,)f(and)e(the)i(old)g(cursor)e(p)s +(osition)i(is)f(sa)m(v)m(ed)i(as)e(the)h(mark.)150 3898 +y Ft(character-search)26 b(\(C-]\))630 4008 y Fu(A)f(c)m(haracter)h(is) +f(read)g(and)f(p)s(oin)m(t)h(is)g(mo)m(v)m(ed)h(to)g(the)f(next)g(o)s +(ccurrence)g(of)g(that)g(c)m(haracter.)630 4117 y(A)30 +b(negativ)m(e)j(coun)m(t)e(searc)m(hes)g(for)f(previous)g(o)s +(ccurrences.)150 4290 y Ft(character-search-backwar)o(d)24 +b(\(M-C-]\))630 4400 y Fu(A)45 b(c)m(haracter)h(is)f(read)g(and)f(p)s +(oin)m(t)h(is)g(mo)m(v)m(ed)h(to)f(the)g(previous)f(o)s(ccurrence)h(of) +g(that)630 4509 y(c)m(haracter.)d(A)31 b(negativ)m(e)h(coun)m(t)f +(searc)m(hes)h(for)e(subsequen)m(t)f(o)s(ccurrences.)150 +4682 y Ft(skip-csi-sequence)d(\(\))630 4792 y Fu(Read)i(enough)f(c)m +(haracters)h(to)g(consume)f(a)h(m)m(ulti-k)m(ey)h(sequence)f(suc)m(h)f +(as)g(those)h(de\014ned)630 4902 y(for)37 b(k)m(eys)h(lik)m(e)g(Home)g +(and)f(End.)60 b(Suc)m(h)37 b(sequences)g(b)s(egin)g(with)g(a)h(Con)m +(trol)g(Sequence)630 5011 y(Indicator)f(\(CSI\),)f(usually)h(ESC-[.)59 +b(If)36 b(this)g(sequence)h(is)g(b)s(ound)d(to)k Ft("\\)p +Fu(e[)p Ft(")p Fu(,)g(k)m(eys)f(pro-)630 5121 y(ducing)31 +b(suc)m(h)h(sequences)g(will)h(ha)m(v)m(e)g(no)f(e\013ect)h(unless)e +(explicitly)j(b)s(ound)c(to)i(a)h(readline)630 5230 y(command,)f +(instead)g(of)g(inserting)g(stra)m(y)h(c)m(haracters)g(in)m(to)g(the)f +(editing)h(bu\013er.)44 b(This)31 b(is)630 5340 y(un)m(b)s(ound)d(b)m +(y)i(default,)h(but)f(usually)g(b)s(ound)e(to)j(ESC-[.)p +eop end +%%Page: 136 142 +TeXDict begin 136 141 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(136)150 299 y Ft(insert-comment)26 +b(\(M-#\))630 408 y Fu(Without)36 b(a)g(n)m(umeric)g(argumen)m(t,)h +(the)f(v)-5 b(alue)36 b(of)g(the)g Ft(comment-begin)c +Fu(v)-5 b(ariable)36 b(is)g(in-)630 518 y(serted)c(at)g(the)g(b)s +(eginning)f(of)h(the)f(curren)m(t)h(line.)45 b(If)31 +b(a)h(n)m(umeric)f(argumen)m(t)h(is)g(supplied,)630 628 +y(this)k(command)h(acts)g(as)g(a)g(toggle:)55 b(if)37 +b(the)f(c)m(haracters)i(at)g(the)e(b)s(eginning)g(of)h(the)g(line)630 +737 y(do)30 b(not)h(matc)m(h)h(the)f(v)-5 b(alue)31 b(of)f +Ft(comment-begin)p Fu(,)e(the)i(v)-5 b(alue)31 b(is)g(inserted,)g +(otherwise)g(the)630 847 y(c)m(haracters)42 b(in)d Ft(comment-begin)e +Fu(are)j(deleted)h(from)f(the)g(b)s(eginning)g(of)g(the)g(line.)71 +b(In)630 956 y(either)37 b(case,)j(the)e(line)f(is)g(accepted)i(as)e +(if)g(a)g(newline)g(had)g(b)s(een)f(t)m(yp)s(ed.)60 b(The)37 +b(default)630 1066 y(v)-5 b(alue)32 b(of)g Ft(comment-begin)c +Fu(causes)k(this)f(command)h(to)g(mak)m(e)h(the)e(curren)m(t)h(line)g +(a)g(shell)630 1176 y(commen)m(t.)40 b(If)26 b(a)h(n)m(umeric)f +(argumen)m(t)h(causes)g(the)f(commen)m(t)i(c)m(haracter)g(to)f(b)s(e)f +(remo)m(v)m(ed,)630 1285 y(the)31 b(line)f(will)h(b)s(e)f(executed)h(b) +m(y)f(the)h(shell.)150 1443 y Ft(dump-functions)26 b(\(\))630 +1553 y Fu(Prin)m(t)g(all)i(of)e(the)h(functions)f(and)g(their)g(k)m(ey) +h(bindings)e(to)j(the)e(Readline)h(output)f(stream.)630 +1663 y(If)31 b(a)h(n)m(umeric)g(argumen)m(t)g(is)g(supplied,)f(the)h +(output)f(is)h(formatted)g(in)f(suc)m(h)h(a)g(w)m(a)m(y)g(that)630 +1772 y(it)f(can)g(b)s(e)e(made)i(part)f(of)g(an)h Fr(inputrc)k +Fu(\014le.)41 b(This)29 b(command)h(is)h(un)m(b)s(ound)c(b)m(y)k +(default.)150 1931 y Ft(dump-variables)26 b(\(\))630 +2040 y Fu(Prin)m(t)21 b(all)h(of)g(the)f(settable)i(v)-5 +b(ariables)22 b(and)f(their)g(v)-5 b(alues)22 b(to)g(the)f(Readline)h +(output)f(stream.)630 2150 y(If)31 b(a)h(n)m(umeric)g(argumen)m(t)g(is) +g(supplied,)f(the)h(output)f(is)h(formatted)g(in)f(suc)m(h)h(a)g(w)m(a) +m(y)g(that)630 2259 y(it)f(can)g(b)s(e)e(made)i(part)f(of)g(an)h +Fr(inputrc)k Fu(\014le.)41 b(This)29 b(command)h(is)h(un)m(b)s(ound)c +(b)m(y)k(default.)150 2418 y Ft(dump-macros)c(\(\))630 +2527 y Fu(Prin)m(t)34 b(all)g(of)g(the)g(Readline)g(k)m(ey)h(sequences) +f(b)s(ound)e(to)i(macros)g(and)f(the)h(strings)g(they)630 +2637 y(output.)53 b(If)35 b(a)g(n)m(umeric)f(argumen)m(t)i(is)e +(supplied,)h(the)g(output)g(is)f(formatted)i(in)e(suc)m(h)h(a)630 +2746 y(w)m(a)m(y)c(that)g(it)f(can)g(b)s(e)g(made)g(part)f(of)i(an)e +Fr(inputrc)35 b Fu(\014le.)41 b(This)29 b(command)h(is)g(un)m(b)s(ound) +d(b)m(y)630 2856 y(default.)150 3014 y Ft(glob-complete-word)e(\(M-g\)) +630 3124 y Fu(The)i(w)m(ord)h(b)s(efore)f(p)s(oin)m(t)h(is)g(treated)h +(as)f(a)h(pattern)f(for)f(pathname)h(expansion,)g(with)g(an)630 +3233 y(asterisk)d(implicitly)h(app)s(ended.)37 b(This)23 +b(pattern)i(is)f(used)g(to)h(generate)h(a)e(list)h(of)g(matc)m(hing)630 +3343 y(\014le)30 b(names)h(for)f(p)s(ossible)g(completions.)150 +3501 y Ft(glob-expand-word)c(\(C-x)j(*\))630 3611 y Fu(The)40 +b(w)m(ord)g(b)s(efore)g(p)s(oin)m(t)h(is)g(treated)g(as)g(a)g(pattern)g +(for)f(pathname)g(expansion,)k(and)630 3720 y(the)c(list)g(of)f(matc)m +(hing)i(\014le)e(names)g(is)h(inserted,)h(replacing)g(the)e(w)m(ord.)67 +b(If)39 b(a)h(n)m(umeric)630 3830 y(argumen)m(t)31 b(is)f(supplied,)g +(a)g(`)p Ft(*)p Fu(')h(is)f(app)s(ended)f(b)s(efore)h(pathname)g +(expansion.)150 3988 y Ft(glob-list-expansions)25 b(\(C-x)k(g\))630 +4098 y Fu(The)k(list)h(of)f(expansions)g(that)h(w)m(ould)f(ha)m(v)m(e)h +(b)s(een)f(generated)h(b)m(y)f Ft(glob-expand-word)630 +4208 y Fu(is)h(displa)m(y)m(ed,)h(and)e(the)h(line)g(is)f(redra)m(wn.) +50 b(If)33 b(a)h(n)m(umeric)g(argumen)m(t)g(is)f(supplied,)h(a)g(`)p +Ft(*)p Fu(')630 4317 y(is)c(app)s(ended)f(b)s(efore)h(pathname)g +(expansion.)150 4475 y Ft(display-shell-version)25 b(\(C-x)k(C-v\))630 +4585 y Fu(Displa)m(y)j(v)m(ersion)e(information)h(ab)s(out)f(the)h +(curren)m(t)f(instance)h(of)f(Bash.)150 4743 y Ft(shell-expand-line)c +(\(M-C-e\))630 4853 y Fu(Expand)34 b(the)h(line)h(as)g(the)f(shell)h +(do)s(es.)55 b(This)34 b(p)s(erforms)g(alias)i(and)f(history)g +(expansion)630 4963 y(as)f(w)m(ell)g(as)g(all)h(of)e(the)h(shell)g(w)m +(ord)f(expansions)g(\(see)i(Section)f(3.5)h([Shell)e(Expansions],)630 +5072 y(page)e(22\).)150 5230 y Ft(history-expand-line)25 +b(\(M-^\))630 5340 y Fu(P)m(erform)30 b(history)h(expansion)f(on)g(the) +h(curren)m(t)f(line.)p eop end +%%Page: 137 143 +TeXDict begin 137 142 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(137)150 299 y Ft(magic-space)27 +b(\(\))630 408 y Fu(P)m(erform)c(history)g(expansion)g(on)g(the)g +(curren)m(t)g(line)g(and)g(insert)g(a)g(space)h(\(see)g(Section)g(9.3) +630 518 y([History)31 b(In)m(teraction],)i(page)e(148\).)150 +663 y Ft(alias-expand-line)26 b(\(\))630 773 y Fu(P)m(erform)i(alias)i +(expansion)e(on)g(the)h(curren)m(t)f(line)h(\(see)g(Section)g(6.6)h +([Aliases],)g(page)f(94\).)150 918 y Ft(history-and-alias-expand)o +(-lin)o(e)24 b(\(\))630 1028 y Fu(P)m(erform)30 b(history)h(and)e +(alias)j(expansion)e(on)g(the)h(curren)m(t)f(line.)150 +1173 y Ft(insert-last-argument)25 b(\(M-.)k(or)h(M-_\))630 +1283 y Fu(A)g(synon)m(ym)g(for)g Ft(yank-last-arg)p Fu(.)150 +1428 y Ft(edit-and-execute-command)24 b(\(C-x)29 b(C-e\))630 +1538 y Fu(In)m(v)m(ok)m(e)34 b(an)f(editor)g(on)g(the)g(curren)m(t)f +(command)h(line,)h(and)e(execute)i(the)f(result)g(as)g(shell)630 +1647 y(commands.)81 b(Bash)44 b(attempts)h(to)g(in)m(v)m(ok)m(e)h +Ft($VISUAL)p Fu(,)f Ft($EDITOR)p Fu(,)h(and)d Ft(emacs)g +Fu(as)h(the)630 1757 y(editor,)31 b(in)f(that)h(order.)150 +1983 y Fs(8.5)68 b(Readline)47 b(vi)e(Mo)t(de)150 2143 +y Fu(While)32 b(the)g(Readline)g(library)f(do)s(es)g(not)h(ha)m(v)m(e)h +(a)f(full)f(set)h(of)g Ft(vi)f Fu(editing)h(functions,)f(it)h(do)s(es)g +(con)m(tain)150 2252 y(enough)i(to)h(allo)m(w)g(simple)f(editing)h(of)f +(the)g(line.)52 b(The)34 b(Readline)g Ft(vi)g Fu(mo)s(de)f(b)s(eha)m(v) +m(es)i(as)f(sp)s(eci\014ed)f(in)150 2362 y(the)e Fm(posix)e +Fu(standard.)275 2489 y(In)35 b(order)g(to)i(switc)m(h)f(in)m(teractiv) +m(ely)j(b)s(et)m(w)m(een)d Ft(emacs)f Fu(and)g Ft(vi)g +Fu(editing)h(mo)s(des,)h(use)f(the)g(`)p Ft(set)30 b(-o)150 +2599 y(emacs)p Fu(')43 b(and)h(`)p Ft(set)30 b(-o)f(vi)p +Fu(')44 b(commands)g(\(see)i(Section)f(4.3.1)h([The)e(Set)h(Builtin],)j +(page)e(62\).)83 b(The)150 2709 y(Readline)31 b(default)g(is)f +Ft(emacs)f Fu(mo)s(de.)275 2836 y(When)g(y)m(ou)i(en)m(ter)f(a)h(line)f +(in)g Ft(vi)f Fu(mo)s(de,)h(y)m(ou)h(are)f(already)h(placed)f(in)g +(`insertion')g(mo)s(de,)g(as)h(if)f(y)m(ou)150 2946 y(had)f(t)m(yp)s +(ed)g(an)g(`)p Ft(i)p Fu('.)41 b(Pressing)29 b Ft(ESC)f +Fu(switc)m(hes)i(y)m(ou)g(in)m(to)h(`command')e(mo)s(de,)h(where)e(y)m +(ou)i(can)g(edit)g(the)150 3055 y(text)35 b(of)f(the)g(line)g(with)f +(the)h(standard)f Ft(vi)g Fu(mo)m(v)m(emen)m(t)j(k)m(eys,)g(mo)m(v)m(e) +f(to)f(previous)g(history)f(lines)h(with)150 3165 y(`)p +Ft(k)p Fu(')d(and)e(subsequen)m(t)h(lines)h(with)f(`)p +Ft(j)p Fu(',)g(and)g(so)h(forth.)150 3391 y Fs(8.6)68 +b(Programmable)47 b(Completion)150 3551 y Fu(When)25 +b(w)m(ord)g(completion)i(is)f(attempted)g(for)g(an)f(argumen)m(t)h(to)g +(a)g(command)f(for)h(whic)m(h)f(a)h(completion)150 3660 +y(sp)s(eci\014cation)40 b(\(a)h Fr(compsp)s(ec)6 b Fu(\))39 +b(has)h(b)s(een)f(de\014ned)f(using)h(the)h Ft(complete)d +Fu(builtin)j(\(see)g(Section)h(8.7)150 3770 y([Programmable)h +(Completion)f(Builtins],)k(page)d(139\),)j(the)c(programmable)g +(completion)i(facilities)150 3880 y(are)31 b(in)m(v)m(ok)m(ed.)275 +4007 y(First,)23 b(the)e(command)g(name)g(is)h(iden)m(ti\014ed.)37 +b(If)21 b(a)g(compsp)s(ec)g(has)g(b)s(een)f(de\014ned)g(for)h(that)h +(command,)150 4117 y(the)44 b(compsp)s(ec)g(is)g(used)f(to)h(generate)i +(the)e(list)g(of)g(p)s(ossible)g(completions)h(for)e(the)h(w)m(ord.)81 +b(If)44 b(the)150 4226 y(command)36 b(w)m(ord)g(is)g(the)g(empt)m(y)h +(string)f(\(completion)i(attempted)f(at)g(the)g(b)s(eginning)e(of)h(an) +h(empt)m(y)150 4336 y(line\),)30 b(an)m(y)g(compsp)s(ec)f(de\014ned)f +(with)h(the)h Ft(-E)e Fu(option)i(to)g Ft(complete)d +Fu(is)i(used.)40 b(If)29 b(the)g(command)g(w)m(ord)150 +4445 y(is)e(a)h(full)e(pathname,)i(a)g(compsp)s(ec)e(for)h(the)g(full)g +(pathname)g(is)g(searc)m(hed)h(for)f(\014rst.)39 b(If)26 +b(no)h(compsp)s(ec)g(is)150 4555 y(found)22 b(for)g(the)h(full)g +(pathname,)h(an)f(attempt)h(is)f(made)g(to)g(\014nd)f(a)h(compsp)s(ec)f +(for)h(the)g(p)s(ortion)f(follo)m(wing)150 4665 y(the)34 +b(\014nal)g(slash.)53 b(If)34 b(those)g(searc)m(hes)i(do)e(not)g +(result)h(in)f(a)g(compsp)s(ec,)h(an)m(y)g(compsp)s(ec)f(de\014ned)f +(with)150 4774 y(the)k Ft(-D)g Fu(option)g(to)h Ft(complete)d +Fu(is)i(used)g(as)g(the)g(default.)61 b(If)37 b(there)g(is)h(no)f +(default)g(compsp)s(ec,)i(Bash)150 4884 y(attempts)e(alias)h(expansion) +e(on)g(the)h(command)f(w)m(ord)g(as)h(a)f(\014nal)g(resort,)j(and)c +(attempts)j(to)f(\014nd)e(a)150 4993 y(compsp)s(ec)30 +b(for)g(the)h(command)f(w)m(ord)g(from)g(an)m(y)h(successful)f +(expansion)275 5121 y(Once)k(a)g(compsp)s(ec)g(has)g(b)s(een)f(found,)h +(it)h(is)f(used)f(to)i(generate)h(the)e(list)h(of)f(matc)m(hing)h(w)m +(ords.)51 b(If)150 5230 y(a)37 b(compsp)s(ec)f(is)g(not)h(found,)f(the) +h(default)f(Bash)h(completion)g(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)f +(Section)g(8.4.6)150 5340 y([Commands)30 b(F)-8 b(or)31 +b(Completion],)g(page)g(133\))h(is)f(p)s(erformed.)p +eop end +%%Page: 138 144 +TeXDict begin 138 143 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(138)275 299 y(First,)31 +b(the)g(actions)g(sp)s(eci\014ed)f(b)m(y)h(the)f(compsp)s(ec)h(are)g +(used.)40 b(Only)30 b(matc)m(hes)i(whic)m(h)e(are)h(pre\014xed)150 +408 y(b)m(y)h(the)f(w)m(ord)h(b)s(eing)f(completed)h(are)g(returned.)44 +b(When)31 b(the)h Ft(-f)f Fu(or)h Ft(-d)f Fu(option)h(is)f(used)g(for)h +(\014lename)150 518 y(or)e(directory)h(name)f(completion,)i(the)e +(shell)h(v)-5 b(ariable)31 b Ft(FIGNORE)d Fu(is)i(used)f(to)i(\014lter) +g(the)f(matc)m(hes.)42 b(See)150 628 y(Section)31 b(5.2)h([Bash)e(V)-8 +b(ariables],)33 b(page)e(73,)g(for)f(a)h(description)g(of)f +Ft(FIGNORE)p Fu(.)275 769 y(An)m(y)22 b(completions)h(sp)s(eci\014ed)f +(b)m(y)g(a)h(\014lename)f(expansion)h(pattern)f(to)h(the)g +Ft(-G)e Fu(option)i(are)g(generated)150 878 y(next.)41 +b(The)29 b(w)m(ords)g(generated)h(b)m(y)g(the)g(pattern)f(need)h(not)f +(matc)m(h)i(the)f(w)m(ord)f(b)s(eing)g(completed.)41 +b(The)150 988 y Ft(GLOBIGNORE)29 b Fu(shell)i(v)-5 b(ariable)32 +b(is)g(not)g(used)e(to)i(\014lter)g(the)g(matc)m(hes,)h(but)d(the)i +Ft(FIGNORE)e Fu(shell)h(v)-5 b(ariable)150 1097 y(is)30 +b(used.)275 1238 y(Next,)39 b(the)f(string)f(sp)s(eci\014ed)f(as)h(the) +g(argumen)m(t)h(to)g(the)f Ft(-W)f Fu(option)i(is)f(considered.)60 +b(The)37 b(string)150 1348 y(is)c(\014rst)e(split)i(using)f(the)h(c)m +(haracters)h(in)e(the)h Ft(IFS)e Fu(sp)s(ecial)j(v)-5 +b(ariable)33 b(as)g(delimiters.)48 b(Shell)32 b(quoting)h(is)150 +1457 y(honored)f(within)h(the)g(string,)h(in)f(order)f(to)i(pro)m(vide) +f(a)h(mec)m(hanism)f(for)g(the)g(w)m(ords)g(to)g(con)m(tain)i(shell)150 +1567 y(metac)m(haracters)e(or)e(c)m(haracters)i(in)e(the)g(v)-5 +b(alue)31 b(of)g Ft(IFS)p Fu(.)42 b(Eac)m(h)32 b(w)m(ord)e(is)h(then)g +(expanded)f(using)h(brace)150 1677 y(expansion,)g(tilde)h(expansion,)f +(parameter)g(and)g(v)-5 b(ariable)32 b(expansion,)f(command)f +(substitution,)i(and)150 1786 y(arithmetic)c(expansion,)f(as)g(describ) +s(ed)e(ab)s(o)m(v)m(e)i(\(see)h(Section)f(3.5)g([Shell)g(Expansions],)g +(page)g(22\).)40 b(The)150 1896 y(results)23 b(are)h(split)g(using)f +(the)h(rules)f(describ)s(ed)f(ab)s(o)m(v)m(e)j(\(see)g(Section)f(3.5.7) +h([W)-8 b(ord)24 b(Splitting],)i(page)e(32\).)150 2005 +y(The)j(results)h(of)f(the)h(expansion)g(are)g(pre\014x-matc)m(hed)g +(against)h(the)f(w)m(ord)f(b)s(eing)g(completed,)j(and)d(the)150 +2115 y(matc)m(hing)k(w)m(ords)f(b)s(ecome)h(the)g(p)s(ossible)f +(completions.)275 2256 y(After)f(these)g(matc)m(hes)i(ha)m(v)m(e)f(b)s +(een)f(generated,)h(an)m(y)g(shell)f(function)g(or)g(command)g(sp)s +(eci\014ed)f(with)150 2365 y(the)36 b Ft(-F)f Fu(and)g +Ft(-C)g Fu(options)h(is)g(in)m(v)m(ok)m(ed.)59 b(When)35 +b(the)h(command)g(or)f(function)h(is)g(in)m(v)m(ok)m(ed,)i(the)e +Ft(COMP_)150 2475 y(LINE)p Fu(,)42 b Ft(COMP_POINT)p +Fu(,)d Ft(COMP_KEY)p Fu(,)i(and)e Ft(COMP_TYPE)f Fu(v)-5 +b(ariables)41 b(are)f(assigned)g(v)-5 b(alues)41 b(as)f(describ)s(ed) +150 2585 y(ab)s(o)m(v)m(e)34 b(\(see)g(Section)g(5.2)g([Bash)f(V)-8 +b(ariables],)36 b(page)d(73\).)50 b(If)33 b(a)g(shell)g(function)g(is)g +(b)s(eing)f(in)m(v)m(ok)m(ed,)k(the)150 2694 y Ft(COMP_WORDS)j +Fu(and)i Ft(COMP_CWORD)d Fu(v)-5 b(ariables)42 b(are)g(also)h(set.)74 +b(When)41 b(the)h(function)f(or)h(command)f(is)150 2804 +y(in)m(v)m(ok)m(ed,)c(the)e(\014rst)f(argumen)m(t)h(\($1\))h(is)e(the)h +(name)g(of)f(the)h(command)f(whose)h(argumen)m(ts)f(are)h(b)s(eing)150 +2913 y(completed,)30 b(the)f(second)f(argumen)m(t)h(\($2\))h(is)f(the)g +(w)m(ord)f(b)s(eing)g(completed,)i(and)e(the)h(third)e(argumen)m(t)150 +3023 y(\($3\))40 b(is)f(the)f(w)m(ord)h(preceding)f(the)h(w)m(ord)f(b)s +(eing)g(completed)i(on)e(the)h(curren)m(t)f(command)h(line.)65 +b(No)150 3133 y(\014ltering)33 b(of)h(the)f(generated)h(completions)g +(against)h(the)e(w)m(ord)g(b)s(eing)f(completed)i(is)g(p)s(erformed;)f +(the)150 3242 y(function)d(or)g(command)h(has)f(complete)i(freedom)e +(in)g(generating)h(the)g(matc)m(hes.)275 3383 y(An)m(y)j(function)h(sp) +s(eci\014ed)f(with)g Ft(-F)g Fu(is)h(in)m(v)m(ok)m(ed)h(\014rst.)53 +b(The)35 b(function)f(ma)m(y)h(use)g(an)m(y)g(of)g(the)g(shell)150 +3493 y(facilities,)50 b(including)44 b(the)h Ft(compgen)d +Fu(and)i Ft(compopt)e Fu(builtins)i(describ)s(ed)f(b)s(elo)m(w)h(\(see) +i(Section)f(8.7)150 3602 y([Programmable)31 b(Completion)h(Builtins],)f +(page)h(139\),)g(to)g(generate)g(the)f(matc)m(hes.)42 +b(It)31 b(m)m(ust)g(put)f(the)150 3712 y(p)s(ossible)g(completions)h +(in)f(the)h Ft(COMPREPLY)d Fu(arra)m(y)j(v)-5 b(ariable,)31 +b(one)g(p)s(er)e(arra)m(y)i(elemen)m(t.)275 3853 y(Next,)26 +b(an)m(y)f(command)f(sp)s(eci\014ed)g(with)g(the)h Ft(-C)f +Fu(option)h(is)f(in)m(v)m(ok)m(ed)i(in)e(an)g(en)m(vironmen)m(t)h +(equiv)-5 b(alen)m(t)150 3962 y(to)26 b(command)e(substitution.)39 +b(It)25 b(should)f(prin)m(t)h(a)g(list)h(of)f(completions,)i(one)e(p)s +(er)f(line,)j(to)f(the)f(standard)150 4072 y(output.)40 +b(Bac)m(kslash)32 b(ma)m(y)f(b)s(e)f(used)g(to)h(escap)s(e)g(a)f +(newline,)h(if)f(necessary)-8 b(.)275 4213 y(After)24 +b(all)i(of)f(the)f(p)s(ossible)g(completions)i(are)f(generated,)i(an)m +(y)e(\014lter)g(sp)s(eci\014ed)e(with)i(the)g Ft(-X)e +Fu(option)150 4322 y(is)34 b(applied)g(to)g(the)h(list.)52 +b(The)33 b(\014lter)h(is)g(a)h(pattern)f(as)g(used)f(for)h(pathname)g +(expansion;)i(a)e(`)p Ft(&)p Fu(')g(in)g(the)150 4432 +y(pattern)28 b(is)f(replaced)h(with)g(the)f(text)i(of)f(the)f(w)m(ord)h +(b)s(eing)f(completed.)40 b(A)28 b(literal)h(`)p Ft(&)p +Fu(')f(ma)m(y)g(b)s(e)f(escap)s(ed)150 4542 y(with)38 +b(a)h(bac)m(kslash;)k(the)38 b(bac)m(kslash)h(is)g(remo)m(v)m(ed)g(b)s +(efore)f(attempting)h(a)g(matc)m(h.)65 b(An)m(y)39 b(completion)150 +4651 y(that)32 b(matc)m(hes)g(the)g(pattern)g(will)f(b)s(e)g(remo)m(v)m +(ed)h(from)f(the)h(list.)44 b(A)32 b(leading)g(`)p Ft(!)p +Fu(')f(negates)i(the)f(pattern;)150 4761 y(in)d(this)g(case)h(an)m(y)g +(completion)h(not)e(matc)m(hing)h(the)g(pattern)f(will)h(b)s(e)e(remo)m +(v)m(ed.)42 b(If)29 b(the)g Ft(nocasematch)150 4870 y +Fu(shell)k(option)f(\(see)i(the)e(description)g(of)h +Ft(shopt)e Fu(in)h(Section)h(4.3.2)h([The)e(Shopt)g(Builtin],)h(page)g +(66\))h(is)150 4980 y(enabled,)d(the)f(matc)m(h)h(is)g(p)s(erformed)e +(without)h(regard)g(to)h(the)g(case)g(of)g(alphab)s(etic)g(c)m +(haracters.)275 5121 y(Finally)-8 b(,)42 b(an)m(y)c(pre\014x)g(and)f +(su\016x)h(sp)s(eci\014ed)f(with)i(the)f Ft(-P)g Fu(and)g +Ft(-S)f Fu(options)i(are)g(added)f(to)h(eac)m(h)150 5230 +y(mem)m(b)s(er)31 b(of)g(the)h(completion)h(list,)f(and)f(the)h(result) +f(is)h(returned)e(to)i(the)g(Readline)g(completion)h(co)s(de)150 +5340 y(as)e(the)f(list)h(of)g(p)s(ossible)f(completions.)p +eop end +%%Page: 139 145 +TeXDict begin 139 144 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(139)275 299 y(If)27 +b(the)h(previously-applied)f(actions)i(do)f(not)g(generate)h(an)m(y)f +(matc)m(hes,)i(and)d(the)h Ft(-o)h(dirnames)d Fu(op-)150 +408 y(tion)j(w)m(as)f(supplied)f(to)i Ft(complete)d Fu(when)h(the)h +(compsp)s(ec)g(w)m(as)g(de\014ned,)g(directory)g(name)h(completion)150 +518 y(is)h(attempted.)275 653 y(If)35 b(the)g Ft(-o)30 +b(plusdirs)j Fu(option)j(w)m(as)g(supplied)e(to)i Ft(complete)e +Fu(when)g(the)i(compsp)s(ec)f(w)m(as)h(de\014ned,)150 +763 y(directory)g(name)f(completion)i(is)e(attempted)h(and)f(an)m(y)h +(matc)m(hes)g(are)g(added)f(to)h(the)f(results)g(of)h(the)150 +873 y(other)31 b(actions.)275 1008 y(By)g(default,)i(if)e(a)h(compsp)s +(ec)f(is)h(found,)f(whatev)m(er)h(it)g(generates)h(is)e(returned)g(to)h +(the)g(completion)150 1117 y(co)s(de)21 b(as)g(the)g(full)g(set)g(of)g +(p)s(ossible)f(completions.)39 b(The)20 b(default)h(Bash)g(completions) +h(are)g(not)f(attempted,)150 1227 y(and)30 b(the)g(Readline)h(default)f +(of)g(\014lename)h(completion)g(is)f(disabled.)41 b(If)29 +b(the)i Ft(-o)e(bashdefault)e Fu(option)150 1337 y(w)m(as)d(supplied)e +(to)j Ft(complete)c Fu(when)i(the)g(compsp)s(ec)h(w)m(as)g(de\014ned,)g +(the)f(default)h(Bash)g(completions)h(are)150 1446 y(attempted)j(if)f +(the)h(compsp)s(ec)f(generates)h(no)f(matc)m(hes.)41 +b(If)27 b(the)g Ft(-o)j(default)25 b Fu(option)j(w)m(as)f(supplied)f +(to)150 1556 y Ft(complete)f Fu(when)h(the)h(compsp)s(ec)f(w)m(as)i +(de\014ned,)e(Readline's)i(default)f(completion)h(will)f(b)s(e)f(p)s +(erformed)150 1665 y(if)k(the)h(compsp)s(ec)f(\(and,)g(if)h(attempted,) +g(the)g(default)f(Bash)h(completions\))h(generate)g(no)e(matc)m(hes.) +275 1801 y(When)20 b(a)i(compsp)s(ec)e(indicates)i(that)g(directory)g +(name)f(completion)h(is)f(desired,)i(the)e(programmable)150 +1910 y(completion)31 b(functions)e(force)i(Readline)f(to)h(app)s(end)d +(a)i(slash)g(to)g(completed)h(names)e(whic)m(h)h(are)g(sym-)150 +2020 y(b)s(olic)40 b(links)g(to)h(directories,)j(sub)5 +b(ject)40 b(to)h(the)f(v)-5 b(alue)41 b(of)f(the)g Fr(mark-directories) +45 b Fu(Readline)c(v)-5 b(ariable,)150 2130 y(regardless)31 +b(of)f(the)h(setting)g(of)g(the)f Fr(mark-symlink)m(ed-directories)36 +b Fu(Readline)31 b(v)-5 b(ariable.)275 2265 y(There)25 +b(is)i(some)g(supp)s(ort)e(for)h(dynamically)h(mo)s(difying)f +(completions.)40 b(This)26 b(is)g(most)h(useful)f(when)150 +2374 y(used)40 b(in)h(com)m(bination)i(with)e(a)g(default)h(completion) +g(sp)s(eci\014ed)f(with)g Ft(-D)p Fu(.)72 b(It's)42 b(p)s(ossible)f +(for)g(shell)150 2484 y(functions)28 b(executed)h(as)f(completion)i +(handlers)d(to)i(indicate)g(that)g(completion)g(should)e(b)s(e)h +(retried)g(b)m(y)150 2594 y(returning)j(an)i(exit)g(status)f(of)h(124.) +48 b(If)31 b(a)i(shell)f(function)g(returns)f(124,)k(and)c(c)m(hanges)j +(the)e(compsp)s(ec)150 2703 y(asso)s(ciated)43 b(with)e(the)g(command)g +(on)g(whic)m(h)g(completion)i(is)e(b)s(eing)g(attempted)h(\(supplied)e +(as)i(the)150 2813 y(\014rst)29 b(argumen)m(t)h(when)e(the)i(function)f +(is)g(executed\),)j(programmable)d(completion)i(restarts)f(from)f(the) +150 2922 y(b)s(eginning,)e(with)g(an)h(attempt)g(to)g(\014nd)e(a)i(new) +e(compsp)s(ec)i(for)f(that)h(command.)39 b(This)27 b(allo)m(ws)h(a)g +(set)g(of)150 3032 y(completions)33 b(to)f(b)s(e)g(built)f(dynamically) +i(as)f(completion)h(is)f(attempted,)h(rather)f(than)f(b)s(eing)g +(loaded)150 3142 y(all)g(at)g(once.)275 3277 y(F)-8 b(or)38 +b(instance,)h(assuming)e(that)h(there)f(is)h(a)f(library)g(of)g(compsp) +s(ecs,)i(eac)m(h)g(k)m(ept)e(in)g(a)h(\014le)f(corre-)150 +3386 y(sp)s(onding)g(to)j(the)f(name)f(of)h(the)g(command,)i(the)e +(follo)m(wing)h(default)f(completion)h(function)e(w)m(ould)150 +3496 y(load)31 b(completions)g(dynamically:)390 3631 +y Ft(_completion_loader\(\))390 3741 y({)581 3851 y(.)47 +b("/etc/bash_completion.d/$1)o(.sh)o(")42 b(>/dev/null)j(2>&1)i(&&)g +(return)f(124)390 3960 y(})390 4070 y(complete)g(-D)h(-F)g +(_completion_loader)c(-o)k(bashdefault)e(-o)i(default)150 +4312 y Fs(8.7)68 b(Programmable)47 b(Completion)f(Builtins)150 +4471 y Fu(Three)21 b(builtin)g(commands)f(are)i(a)m(v)-5 +b(ailable)24 b(to)e(manipulate)f(the)h(programmable)f(completion)h +(facilities:)150 4581 y(one)34 b(to)g(sp)s(ecify)f(ho)m(w)h(the)f +(argumen)m(ts)h(to)g(a)g(particular)g(command)f(are)h(to)g(b)s(e)f +(completed,)j(and)d(t)m(w)m(o)150 4690 y(to)e(mo)s(dify)f(the)g +(completion)i(as)e(it)h(is)g(happ)s(ening.)150 4851 y +Ft(compgen)870 4986 y(compgen)46 b([)p Fj(option)p Ft(])f([)p +Fj(word)p Ft(])630 5121 y Fu(Generate)27 b(p)s(ossible)e(completion)i +(matc)m(hes)g(for)e Fr(w)m(ord)k Fu(according)e(to)f(the)g +Fr(option)p Fu(s,)h(whic)m(h)630 5230 y(ma)m(y)32 b(b)s(e)f(an)m(y)h +(option)g(accepted)g(b)m(y)g(the)f Ft(complete)f Fu(builtin)h(with)g +(the)g(exception)i(of)f Ft(-p)630 5340 y Fu(and)39 b +Ft(-r)p Fu(,)i(and)e(write)h(the)g(matc)m(hes)g(to)g(the)g(standard)f +(output.)68 b(When)39 b(using)g(the)h Ft(-F)p eop end +%%Page: 140 146 +TeXDict begin 140 145 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(140)630 299 y(or)33 +b Ft(-C)f Fu(options,)i(the)e(v)-5 b(arious)33 b(shell)g(v)-5 +b(ariables)33 b(set)g(b)m(y)g(the)g(programmable)g(completion)630 +408 y(facilities,)g(while)d(a)m(v)-5 b(ailable,)33 b(will)e(not)g(ha)m +(v)m(e)g(useful)f(v)-5 b(alues.)630 555 y(The)34 b(matc)m(hes)h(will)g +(b)s(e)f(generated)h(in)f(the)h(same)g(w)m(a)m(y)g(as)g(if)f(the)h +(programmable)f(com-)630 664 y(pletion)d(co)s(de)g(had)f(generated)i +(them)e(directly)i(from)e(a)h(completion)h(sp)s(eci\014cation)f(with) +630 774 y(the)e(same)h(\015ags.)40 b(If)29 b Fr(w)m(ord)j +Fu(is)d(sp)s(eci\014ed,)g(only)g(those)h(completions)g(matc)m(hing)g +Fr(w)m(ord)j Fu(will)630 883 y(b)s(e)d(displa)m(y)m(ed.)630 +1029 y(The)24 b(return)g(v)-5 b(alue)25 b(is)g(true)f(unless)g(an)h(in) +m(v)-5 b(alid)25 b(option)g(is)g(supplied,)f(or)h(no)g(matc)m(hes)g(w)m +(ere)630 1139 y(generated.)150 1322 y Ft(complete)870 +1468 y(complete)46 b([-abcdefgjksuv])d([-o)k Fj(comp-option)p +Ft(])e([-DEI])h([-A)h Fj(action)p Ft(])e([-)870 1577 +y(G)i Fj(globpat)p Ft(])870 1687 y([-W)g Fj(wordlist)p +Ft(])e([-F)i Fj(function)p Ft(])e([-C)i Fj(command)p +Ft(])f([-X)h Fj(filterpat)p Ft(])870 1797 y([-P)g Fj(prefix)p +Ft(])f([-S)h Fj(suffix)p Ft(])e Fj(name)i Ft([)p Fj(name)f +Ft(...])870 1906 y(complete)g(-pr)g([-DEI])h([)p Fj(name)f +Ft(...)o(])630 2052 y Fu(Sp)s(ecify)37 b(ho)m(w)h(argumen)m(ts)f(to)i +(eac)m(h)g Fr(name)j Fu(should)37 b(b)s(e)g(completed.)63 +b(If)38 b(the)f Ft(-p)g Fu(option)630 2162 y(is)30 b(supplied,)e(or)i +(if)g(no)f(options)h(are)g(supplied,)f(existing)h(completion)h(sp)s +(eci\014cations)g(are)630 2271 y(prin)m(ted)24 b(in)h(a)g(w)m(a)m(y)g +(that)h(allo)m(ws)g(them)e(to)i(b)s(e)e(reused)f(as)i(input.)38 +b(The)24 b Ft(-r)g Fu(option)i(remo)m(v)m(es)630 2381 +y(a)i(completion)h(sp)s(eci\014cation)f(for)g(eac)m(h)h +Fr(name)p Fu(,)f(or,)h(if)e(no)h Fr(name)5 b Fu(s)27 +b(are)h(supplied,)g(all)g(com-)630 2491 y(pletion)i(sp)s +(eci\014cations.)42 b(The)29 b Ft(-D)g Fu(option)h(indicates)h(that)f +(other)g(supplied)e(options)j(and)630 2600 y(actions)c(should)e(apply)g +(to)i(the)f(\\default")h(command)e(completion;)k(that)e(is,)g +(completion)630 2710 y(attempted)g(on)f(a)h(command)f(for)g(whic)m(h)g +(no)g(completion)i(has)d(previously)h(b)s(een)g(de\014ned.)630 +2819 y(The)e Ft(-E)g Fu(option)h(indicates)g(that)g(other)g(supplied)e +(options)h(and)g(actions)i(should)d(apply)h(to)630 2929 +y(\\empt)m(y")33 b(command)e(completion;)i(that)f(is,)g(completion)h +(attempted)f(on)g(a)f(blank)g(line.)630 3039 y(The)24 +b Ft(-I)g Fu(option)h(indicates)g(that)g(other)g(supplied)e(options)h +(and)g(actions)i(should)d(apply)h(to)630 3148 y(completion)29 +b(on)g(the)f(initial)h(non-assignmen)m(t)g(w)m(ord)f(on)g(the)g(line,)i +(or)e(after)h(a)f(command)630 3258 y(delimiter)41 b(suc)m(h)g(as)f(`)p +Ft(;)p Fu(')h(or)g(`)p Ft(|)p Fu(',)i(whic)m(h)e(is)f(usually)h +(command)f(name)h(completion.)72 b(If)630 3367 y(m)m(ultiple)26 +b(options)g(are)g(supplied,)g(the)f Ft(-D)g Fu(option)h(tak)m(es)i +(precedence)e(o)m(v)m(er)g Ft(-E)p Fu(,)h(and)e(b)s(oth)630 +3477 y(tak)m(e)34 b(precedence)f(o)m(v)m(er)h Ft(-I)p +Fu(.)47 b(If)32 b(an)m(y)h(of)g Ft(-D)p Fu(,)g Ft(-E)p +Fu(,)f(or)h Ft(-I)f Fu(are)h(supplied,)f(an)m(y)h(other)g +Fr(name)630 3587 y Fu(argumen)m(ts)k(are)g(ignored;)j(these)d +(completions)h(only)e(apply)g(to)i(the)f(case)g(sp)s(eci\014ed)f(b)m(y) +630 3696 y(the)31 b(option.)630 3842 y(The)e(pro)s(cess)g(of)h +(applying)g(these)g(completion)g(sp)s(eci\014cations)h(when)d(w)m(ord)i +(completion)630 3952 y(is)35 b(attempted)h(is)f(describ)s(ed)f(ab)s(o)m +(v)m(e)j(\(see)f(Section)g(8.6)g([Programmable)g(Completion],)630 +4061 y(page)31 b(137\).)630 4208 y(Other)d(options,)i(if)f(sp)s +(eci\014ed,)g(ha)m(v)m(e)h(the)f(follo)m(wing)i(meanings.)40 +b(The)29 b(argumen)m(ts)g(to)h(the)630 4317 y Ft(-G)p +Fu(,)41 b Ft(-W)p Fu(,)h(and)c Ft(-X)h Fu(options)h(\(and,)h(if)f +(necessary)-8 b(,)42 b(the)e Ft(-P)f Fu(and)f Ft(-S)h +Fu(options\))h(should)f(b)s(e)630 4427 y(quoted)28 b(to)h(protect)g +(them)f(from)f(expansion)h(b)s(efore)g(the)g Ft(complete)e +Fu(builtin)h(is)h(in)m(v)m(ok)m(ed.)630 4609 y Ft(-o)i +Fj(comp-option)1110 4719 y Fu(The)c Fr(comp-option)i +Fu(con)m(trols)g(sev)m(eral)h(asp)s(ects)e(of)g(the)g(compsp)s(ec's)g +(b)s(eha)m(v-)1110 4829 y(ior)g(b)s(ey)m(ond)f(the)g(simple)h +(generation)h(of)e(completions.)41 b Fr(comp-option)27 +b Fu(ma)m(y)1110 4938 y(b)s(e)j(one)g(of:)1110 5121 y +Ft(bashdefault)1590 5230 y Fu(P)m(erform)d(the)h(rest)f(of)h(the)g +(default)f(Bash)h(completions)g(if)g(the)1590 5340 y(compsp)s(ec)i +(generates)i(no)e(matc)m(hes.)p eop end +%%Page: 141 147 +TeXDict begin 141 146 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(141)1110 299 y Ft(default)144 +b Fu(Use)22 b(Readline's)g(default)g(\014lename)g(completion)g(if)g +(the)g(comp-)1590 408 y(sp)s(ec)30 b(generates)i(no)e(matc)m(hes.)1110 +570 y Ft(dirnames)96 b Fu(P)m(erform)46 b(directory)g(name)h +(completion)g(if)f(the)g(compsp)s(ec)1590 680 y(generates)32 +b(no)e(matc)m(hes.)1110 841 y Ft(filenames)1590 951 y +Fu(T)-8 b(ell)40 b(Readline)f(that)h(the)f(compsp)s(ec)f(generates)j +(\014lenames,)1590 1060 y(so)29 b(it)h(can)f(p)s(erform)f(an)m(y)h +(\014lename-sp)s(eci\014c)h(pro)s(cessing)e(\(lik)m(e)1590 +1170 y(adding)22 b(a)g(slash)g(to)h(directory)f(names,)i(quoting)f(sp)s +(ecial)f(c)m(har-)1590 1279 y(acters,)39 b(or)d(suppressing)f(trailing) +i(spaces\).)59 b(This)35 b(option)i(is)1590 1389 y(in)m(tended)30 +b(to)g(b)s(e)g(used)f(with)g(shell)i(functions)e(sp)s(eci\014ed)g(with) +1590 1499 y Ft(-F)p Fu(.)1110 1660 y Ft(noquote)144 b +Fu(T)-8 b(ell)28 b(Readline)g(not)g(to)g(quote)g(the)g(completed)g(w)m +(ords)f(if)h(they)1590 1770 y(are)j(\014lenames)f(\(quoting)h +(\014lenames)g(is)f(the)h(default\).)1110 1931 y Ft(nosort)192 +b Fu(T)-8 b(ell)23 b(Readline)g(not)f(to)h(sort)g(the)f(list)h(of)f(p)s +(ossible)g(completions)1590 2041 y(alphab)s(etically)-8 +b(.)1110 2202 y Ft(nospace)144 b Fu(T)-8 b(ell)40 b(Readline)g(not)g +(to)g(app)s(end)d(a)j(space)g(\(the)f(default\))h(to)1590 +2312 y(w)m(ords)30 b(completed)h(at)g(the)g(end)f(of)g(the)h(line.)1110 +2473 y Ft(plusdirs)96 b Fu(After)30 b(an)m(y)h(matc)m(hes)g(de\014ned)d +(b)m(y)i(the)g(compsp)s(ec)g(are)g(gener-)1590 2583 y(ated,)g +(directory)f(name)g(completion)i(is)d(attempted)i(and)f(an)m(y)1590 +2693 y(matc)m(hes)j(are)e(added)g(to)h(the)g(results)f(of)g(the)h +(other)g(actions.)630 2854 y Ft(-A)f Fj(action)66 b Fu(The)25 +b Fr(action)h Fu(ma)m(y)g(b)s(e)e(one)h(of)h(the)f(follo)m(wing)i(to)e +(generate)i(a)e(list)h(of)f(p)s(ossible)1110 2964 y(completions:)1110 +3125 y Ft(alias)240 b Fu(Alias)31 b(names.)41 b(Ma)m(y)31 +b(also)h(b)s(e)e(sp)s(eci\014ed)f(as)i Ft(-a)p Fu(.)1110 +3287 y Ft(arrayvar)96 b Fu(Arra)m(y)31 b(v)-5 b(ariable)31 +b(names.)1110 3448 y Ft(binding)144 b Fu(Readline)30 +b(k)m(ey)f(binding)f(names)h(\(see)h(Section)f(8.4)h([Bindable)1590 +3558 y(Readline)h(Commands],)f(page)h(127\).)1110 3719 +y Ft(builtin)144 b Fu(Names)21 b(of)g(shell)f(builtin)h(commands.)37 +b(Ma)m(y)21 b(also)h(b)s(e)e(sp)s(eci\014ed)1590 3829 +y(as)31 b Ft(-b)p Fu(.)1110 3990 y Ft(command)144 b Fu(Command)29 +b(names.)41 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s(eci\014ed)f(as)i +Ft(-c)p Fu(.)1110 4152 y Ft(directory)1590 4261 y Fu(Directory)h +(names.)40 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s(eci\014ed)g(as)g +Ft(-d)p Fu(.)1110 4423 y Ft(disabled)96 b Fu(Names)31 +b(of)g(disabled)f(shell)g(builtins.)1110 4584 y Ft(enabled)144 +b Fu(Names)31 b(of)g(enabled)f(shell)g(builtins.)1110 +4746 y Ft(export)192 b Fu(Names)34 b(of)f(exp)s(orted)f(shell)h(v)-5 +b(ariables.)49 b(Ma)m(y)35 b(also)e(b)s(e)g(sp)s(eci-)1590 +4855 y(\014ed)d(as)g Ft(-e)p Fu(.)1110 5017 y Ft(file)288 +b Fu(File)32 b(names.)40 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s(eci\014ed)f +(as)i Ft(-f)p Fu(.)1110 5178 y Ft(function)96 b Fu(Names)31 +b(of)g(shell)f(functions.)1110 5340 y Ft(group)240 b +Fu(Group)30 b(names.)40 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s(eci\014ed)g +(as)g Ft(-g)p Fu(.)p eop end +%%Page: 142 148 +TeXDict begin 142 147 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(142)1110 299 y Ft(helptopic)1590 +408 y Fu(Help)37 b(topics)g(as)g(accepted)h(b)m(y)e(the)h +Ft(help)f Fu(builtin)g(\(see)h(Sec-)1590 518 y(tion)31 +b(4.2)g([Bash)g(Builtins],)g(page)g(51\).)1110 689 y +Ft(hostname)96 b Fu(Hostnames,)89 b(as)76 b(tak)m(en)h(from)f(the)g +(\014le)h(sp)s(eci\014ed)e(b)m(y)1590 799 y(the)55 b +Ft(HOSTFILE)e Fu(shell)j(v)-5 b(ariable)56 b(\(see)g(Section)g(5.2)h +([Bash)1590 908 y(V)-8 b(ariables],)32 b(page)f(73\).)1110 +1080 y Ft(job)336 b Fu(Job)31 b(names,)h(if)g(job)f(con)m(trol)i(is)f +(activ)m(e.)46 b(Ma)m(y)33 b(also)g(b)s(e)e(sp)s(eci-)1590 +1189 y(\014ed)f(as)g Ft(-j)p Fu(.)1110 1361 y Ft(keyword)144 +b Fu(Shell)30 b(reserv)m(ed)h(w)m(ords.)40 b(Ma)m(y)32 +b(also)f(b)s(e)f(sp)s(eci\014ed)f(as)i Ft(-k)p Fu(.)1110 +1532 y Ft(running)144 b Fu(Names)31 b(of)g(running)d(jobs,)i(if)h(job)f +(con)m(trol)h(is)g(activ)m(e.)1110 1703 y Ft(service)144 +b Fu(Service)31 b(names.)41 b(Ma)m(y)31 b(also)g(b)s(e)f(sp)s +(eci\014ed)g(as)g Ft(-s)p Fu(.)1110 1874 y Ft(setopt)192 +b Fu(V)-8 b(alid)39 b(argumen)m(ts)g(for)f(the)h Ft(-o)e +Fu(option)i(to)g(the)g Ft(set)e Fu(builtin)1590 1984 +y(\(see)31 b(Section)h(4.3.1)g([The)e(Set)g(Builtin],)i(page)f(62\).) +1110 2155 y Ft(shopt)240 b Fu(Shell)40 b(option)g(names)g(as)g +(accepted)i(b)m(y)e(the)g Ft(shopt)e Fu(builtin)1590 +2265 y(\(see)31 b(Section)h(4.2)f([Bash)g(Builtins],)g(page)g(51\).) +1110 2436 y Ft(signal)192 b Fu(Signal)31 b(names.)1110 +2607 y Ft(stopped)144 b Fu(Names)31 b(of)g(stopp)s(ed)e(jobs,)h(if)g +(job)g(con)m(trol)i(is)f(activ)m(e.)1110 2778 y Ft(user)288 +b Fu(User)30 b(names.)41 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s(eci\014ed)f +(as)i Ft(-u)p Fu(.)1110 2950 y Ft(variable)96 b Fu(Names)36 +b(of)g(all)g(shell)g(v)-5 b(ariables.)56 b(Ma)m(y)37 +b(also)f(b)s(e)f(sp)s(eci\014ed)g(as)1590 3059 y Ft(-v)p +Fu(.)630 3230 y Ft(-C)30 b Fj(command)1110 3340 y Fr(command)35 +b Fu(is)e(executed)g(in)e(a)i(subshell)e(en)m(vironmen)m(t,)i(and)f +(its)g(output)g(is)1110 3450 y(used)e(as)g(the)h(p)s(ossible)f +(completions.)630 3621 y Ft(-F)g Fj(function)1110 3730 +y Fu(The)39 b(shell)g(function)g Fr(function)g Fu(is)g(executed)h(in)f +(the)g(curren)m(t)g(shell)g(en)m(vi-)1110 3840 y(ronmen)m(t.)72 +b(When)41 b(it)g(is)g(executed,)k($1)c(is)g(the)g(name)g(of)g(the)g +(command)1110 3950 y(whose)34 b(argumen)m(ts)h(are)g(b)s(eing)f +(completed,)j($2)e(is)f(the)h(w)m(ord)f(b)s(eing)g(com-)1110 +4059 y(pleted,)44 b(and)c($3)i(is)e(the)h(w)m(ord)g(preceding)f(the)h +(w)m(ord)f(b)s(eing)h(completed,)1110 4169 y(as)g(describ)s(ed)f(ab)s +(o)m(v)m(e)i(\(see)g(Section)f(8.6)h([Programmable)g(Completion],)1110 +4278 y(page)30 b(137\).)42 b(When)29 b(it)h(\014nishes,)e(the)h(p)s +(ossible)g(completions)h(are)g(retriev)m(ed)1110 4388 +y(from)g(the)g(v)-5 b(alue)31 b(of)g(the)f Ft(COMPREPLY)e +Fu(arra)m(y)j(v)-5 b(ariable.)630 4559 y Ft(-G)30 b Fj(globpat)1110 +4669 y Fu(The)39 b(\014lename)h(expansion)g(pattern)g +Fr(globpat)j Fu(is)d(expanded)f(to)h(generate)1110 4778 +y(the)31 b(p)s(ossible)e(completions.)630 4950 y Ft(-P)h +Fj(prefix)66 b Fr(pre\014x)39 b Fu(is)34 b(added)f(at)i(the)f(b)s +(eginning)f(of)i(eac)m(h)g(p)s(ossible)e(completion)i(after)1110 +5059 y(all)c(other)g(options)g(ha)m(v)m(e)g(b)s(een)f(applied.)630 +5230 y Ft(-S)g Fj(suffix)66 b Fr(su\016x)26 b Fu(is)20 +b(app)s(ended)f(to)i(eac)m(h)h(p)s(ossible)e(completion)i(after)f(all)g +(other)g(options)1110 5340 y(ha)m(v)m(e)32 b(b)s(een)d(applied.)p +eop end +%%Page: 143 149 +TeXDict begin 143 148 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(143)630 299 y Ft(-W)30 +b Fj(wordlist)1110 408 y Fu(The)24 b Fr(w)m(ordlist)k +Fu(is)d(split)g(using)f(the)h(c)m(haracters)i(in)d(the)i +Ft(IFS)e Fu(sp)s(ecial)h(v)-5 b(ariable)1110 518 y(as)36 +b(delimiters,)i(and)e(eac)m(h)h(resultan)m(t)g(w)m(ord)e(is)h +(expanded.)57 b(The)35 b(p)s(ossible)1110 628 y(completions)c(are)e +(the)h(mem)m(b)s(ers)f(of)g(the)h(resultan)m(t)g(list)g(whic)m(h)f +(matc)m(h)i(the)1110 737 y(w)m(ord)f(b)s(eing)g(completed.)630 +909 y Ft(-X)g Fj(filterpat)1110 1019 y Fr(\014lterpat)d +Fu(is)e(a)g(pattern)g(as)f(used)g(for)h(\014lename)g(expansion.)38 +b(It)25 b(is)g(applied)f(to)1110 1128 y(the)30 b(list)f(of)h(p)s +(ossible)f(completions)h(generated)h(b)m(y)e(the)g(preceding)h(options) +1110 1238 y(and)d(argumen)m(ts,)i(and)e(eac)m(h)i(completion)g(matc)m +(hing)g Fr(\014lterpat)h Fu(is)e(remo)m(v)m(ed)1110 1347 +y(from)i(the)h(list.)42 b(A)30 b(leading)i(`)p Ft(!)p +Fu(')e(in)g Fr(\014lterpat)j Fu(negates)f(the)f(pattern;)g(in)f(this) +1110 1457 y(case,)i(an)m(y)e(completion)i(not)f(matc)m(hing)g +Fr(\014lterpat)i Fu(is)d(remo)m(v)m(ed.)630 1629 y(The)35 +b(return)g(v)-5 b(alue)37 b(is)f(true)f(unless)h(an)f(in)m(v)-5 +b(alid)37 b(option)f(is)g(supplied,)g(an)g(option)h(other)630 +1738 y(than)h Ft(-p)g Fu(or)g Ft(-r)f Fu(is)h(supplied)f(without)i(a)f +Fr(name)44 b Fu(argumen)m(t,)c(an)e(attempt)i(is)e(made)g(to)630 +1848 y(remo)m(v)m(e)32 b(a)e(completion)i(sp)s(eci\014cation)f(for)f(a) +h Fr(name)k Fu(for)30 b(whic)m(h)g(no)g(sp)s(eci\014cation)h(exists,) +630 1958 y(or)f(an)h(error)f(o)s(ccurs)g(adding)g(a)g(completion)i(sp)s +(eci\014cation.)150 2129 y Ft(compopt)870 2270 y(compopt)46 +b([-o)h Fj(option)p Ft(])f([-DEI])g([+o)h Fj(option)p +Ft(])e([)p Fj(name)p Ft(])630 2411 y Fu(Mo)s(dify)33 +b(completion)h(options)g(for)f(eac)m(h)h Fr(name)39 b +Fu(according)34 b(to)g(the)f Fr(option)p Fu(s,)i(or)e(for)g(the)630 +2520 y(curren)m(tly-executing)46 b(completion)f(if)f(no)f +Fr(name)5 b Fu(s)44 b(are)h(supplied.)80 b(If)43 b(no)h +Fr(option)p Fu(s)h(are)630 2630 y(giv)m(en,)30 b(displa)m(y)e(the)g +(completion)h(options)g(for)e(eac)m(h)i Fr(name)34 b +Fu(or)27 b(the)i(curren)m(t)e(completion.)630 2740 y(The)f(p)s(ossible) +g(v)-5 b(alues)27 b(of)f Fr(option)h Fu(are)g(those)g(v)-5 +b(alid)26 b(for)g(the)h Ft(complete)d Fu(builtin)i(describ)s(ed)630 +2849 y(ab)s(o)m(v)m(e.)41 b(The)27 b Ft(-D)f Fu(option)i(indicates)g +(that)g(other)f(supplied)f(options)i(should)e(apply)h(to)h(the)630 +2959 y(\\default")33 b(command)f(completion;)i(that)f(is,)g(completion) +g(attempted)g(on)f(a)g(command)630 3068 y(for)g(whic)m(h)g(no)g +(completion)i(has)e(previously)g(b)s(een)g(de\014ned.)45 +b(The)32 b Ft(-E)f Fu(option)i(indicates)630 3178 y(that)23 +b(other)f(supplied)e(options)j(should)e(apply)g(to)i(\\empt)m(y")g +(command)f(completion;)k(that)630 3287 y(is,)36 b(completion)g +(attempted)g(on)e(a)h(blank)g(line.)54 b(The)34 b Ft(-I)g +Fu(option)h(indicates)g(that)h(other)630 3397 y(supplied)23 +b(options)i(should)f(apply)g(to)i(completion)g(on)e(the)h(initial)h +(non-assignmen)m(t)f(w)m(ord)630 3507 y(on)37 b(the)f(line,)j(or)e +(after)g(a)g(command)f(delimiter)i(suc)m(h)e(as)h(`)p +Ft(;)p Fu(')g(or)f(`)p Ft(|)p Fu(',)j(whic)m(h)e(is)f(usually)630 +3616 y(command)30 b(name)h(completion.)630 3757 y(If)k(m)m(ultiple)i +(options)f(are)g(supplied,)g(the)g Ft(-D)g Fu(option)g(tak)m(es)h +(precedence)g(o)m(v)m(er)g Ft(-E)p Fu(,)g(and)630 3867 +y(b)s(oth)30 b(tak)m(e)i(precedence)e(o)m(v)m(er)i Ft(-I)630 +4007 y Fu(The)23 b(return)g(v)-5 b(alue)25 b(is)f(true)g(unless)f(an)h +(in)m(v)-5 b(alid)24 b(option)h(is)f(supplied,)g(an)g(attempt)h(is)f +(made)630 4117 y(to)32 b(mo)s(dify)f(the)g(options)h(for)f(a)h +Fr(name)k Fu(for)31 b(whic)m(h)g(no)g(completion)i(sp)s(eci\014cation)f +(exists,)630 4226 y(or)e(an)h(output)f(error)g(o)s(ccurs.)150 +4486 y Fs(8.8)68 b(A)44 b(Programmable)j(Completion)f(Example)150 +4645 y Fu(The)37 b(most)g(common)g(w)m(a)m(y)i(to)e(obtain)h +(additional)g(completion)g(functionalit)m(y)h(b)s(ey)m(ond)d(the)i +(default)150 4755 y(actions)29 b Ft(complete)d Fu(and)i +Ft(compgen)e Fu(pro)m(vide)i(is)h(to)f(use)g(a)h(shell)f(function)g +(and)g(bind)e(it)j(to)g(a)g(particular)150 4864 y(command)h(using)g +Ft(complete)e(-F)p Fu(.)275 5011 y(The)j(follo)m(wing)j(function)e(pro) +m(vides)g(completions)i(for)e(the)g Ft(cd)g Fu(builtin.)46 +b(It)32 b(is)h(a)f(reasonably)h(go)s(o)s(d)150 5121 y(example)41 +b(of)g(what)f(shell)h(functions)f(m)m(ust)g(do)h(when)e(used)h(for)g +(completion.)73 b(This)39 b(function)h(uses)150 5230 +y(the)32 b(w)m(ord)f(passed)g(as)h Ft($2)f Fu(to)h(determine)g(the)f +(directory)h(name)g(to)g(complete.)46 b(Y)-8 b(ou)32 +b(can)g(also)g(use)g(the)150 5340 y Ft(COMP_WORDS)c Fu(arra)m(y)i(v)-5 +b(ariable;)32 b(the)e(curren)m(t)h(w)m(ord)f(is)g(indexed)g(b)m(y)g +(the)h Ft(COMP_CWORD)c Fu(v)-5 b(ariable.)p eop end +%%Page: 144 150 +TeXDict begin 144 149 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(144)275 299 y(The)42 +b(function)h(relies)h(on)e(the)i Ft(complete)c Fu(and)j +Ft(compgen)e Fu(builtins)h(to)i(do)f(m)m(uc)m(h)g(of)g(the)h(w)m(ork,) +150 408 y(adding)25 b(only)h(the)g(things)g(that)g(the)g(Bash)g +Ft(cd)f Fu(do)s(es)g(b)s(ey)m(ond)g(accepting)j(basic)e(directory)g +(names:)38 b(tilde)150 518 y(expansion)22 b(\(see)h(Section)g(3.5.2)g +([Tilde)g(Expansion],)g(page)g(24\),)i(searc)m(hing)e(directories)g(in) +e Fr($CDP)-8 b(A)g(TH)p Fu(,)150 628 y(whic)m(h)21 b(is)h(describ)s(ed) +e(ab)s(o)m(v)m(e)j(\(see)f(Section)h(4.1)f([Bourne)g(Shell)f +(Builtins],)j(page)e(44\),)j(and)c(basic)h(supp)s(ort)150 +737 y(for)31 b(the)h Ft(cdable_vars)d Fu(shell)i(option)h(\(see)h +(Section)f(4.3.2)i([The)d(Shopt)g(Builtin],)i(page)f(66\).)46 +b Ft(_comp_)150 847 y(cd)30 b Fu(mo)s(di\014es)g(the)h(v)-5 +b(alue)31 b(of)g Fr(IFS)36 b Fu(so)31 b(that)g(it)g(con)m(tains)h(only) +f(a)g(newline)g(to)h(accommo)s(date)g(\014le)f(names)150 +956 y(con)m(taining)i(spaces)g(and)e(tabs)h({)g Ft(compgen)e +Fu(prin)m(ts)h(the)h(p)s(ossible)f(completions)i(it)g(generates)g(one)f +(p)s(er)150 1066 y(line.)275 1230 y(P)m(ossible)24 b(completions)h(go)g +(in)m(to)g(the)f Fr(COMPREPL)-8 b(Y)36 b Fu(arra)m(y)24 +b(v)-5 b(ariable,)26 b(one)e(completion)i(p)s(er)c(arra)m(y)150 +1340 y(elemen)m(t.)42 b(The)30 b(programmable)g(completion)i(system)e +(retriev)m(es)h(the)g(completions)g(from)f(there)g(when)150 +1450 y(the)h(function)f(returns.)390 1614 y Ft(#)47 b(A)h(completion)d +(function)g(for)i(the)g(cd)g(builtin)390 1724 y(#)g(based)g(on)g(the)g +(cd)g(completion)e(function)h(from)g(the)h(bash_completion)d(package) +390 1833 y(_comp_cd\(\))390 1943 y({)581 2052 y(local)i(IFS=$')g +(\\t\\n')190 b(#)47 b(normalize)f(IFS)581 2162 y(local)g(cur)h +(_skipdot)f(_cdpath)581 2271 y(local)g(i)i(j)f(k)581 +2491 y(#)g(Tilde)g(expansion,)e(which)h(also)h(expands)f(tilde)g(to)h +(full)g(pathname)581 2600 y(case)g("$2")f(in)581 2710 +y(\\~*\))190 b(eval)46 b(cur="$2")g(;;)581 2819 y(*\))286 +b(cur=$2)46 b(;;)581 2929 y(esac)581 3148 y(#)h(no)h(cdpath)e(or)h +(absolute)e(pathname)h(--)h(straight)f(directory)f(completion)581 +3258 y(if)i([[)g(-z)g("${CDPATH:-}")e(]])i(||)g([[)g("$cur")f(==)h +(@\(./*|../*|/*\))d(]];)j(then)772 3367 y(#)g(compgen)f(prints)g(paths) +h(one)f(per)h(line;)g(could)f(also)h(use)g(while)f(loop)772 +3477 y(IFS=$'\\n')772 3587 y(COMPREPLY=\()f($\(compgen)g(-d)i(--)g +("$cur"\))f(\))772 3696 y(IFS=$')g(\\t\\n')581 3806 y(#)h +(CDPATH+directories)c(in)k(the)g(current)f(directory)f(if)j(not)e(in)i +(CDPATH)581 3915 y(else)772 4025 y(IFS=$'\\n')772 4134 +y(_skipdot=false)772 4244 y(#)f(preprocess)e(CDPATH)h(to)i(convert)d +(null)i(directory)e(names)i(to)g(.)772 4354 y(_cdpath=${CDPATH/#:/.:}) +772 4463 y(_cdpath=${_cdpath//::/:.)o(:})772 4573 y +(_cdpath=${_cdpath/\045:/:.})772 4682 y(for)g(i)g(in)g +(${_cdpath//:/$'\\n'};)c(do)963 4792 y(if)k([[)g($i)g(-ef)g(.)h(]];)f +(then)f(_skipdot=true;)e(fi)963 4902 y(k="${#COMPREPLY[@]}")963 +5011 y(for)j(j)g(in)g($\()g(compgen)f(-d)h(--)h("$i/$cur")d(\);)i(do) +1154 5121 y(COMPREPLY[k++]=${j#$i/})375 b(#)48 b(cut)f(off)f(directory) +963 5230 y(done)772 5340 y(done)p eop end +%%Page: 145 151 +TeXDict begin 145 150 bop 150 -116 a Fu(Chapter)30 b(8:)41 +b(Command)29 b(Line)i(Editing)2062 b(145)772 299 y Ft($_skipdot)45 +b(||)i(COMPREPLY+=\()e($\(compgen)g(-d)i(--)g("$cur"\))f(\))772 +408 y(IFS=$')g(\\t\\n')581 518 y(fi)581 737 y(#)h(variable)f(names)g +(if)h(appropriate)e(shell)i(option)f(set)h(and)f(no)i(completions)581 +847 y(if)f(shopt)f(-q)i(cdable_vars)c(&&)k([[)f(${#COMPREPLY[@]})c(-eq) +k(0)g(]];)g(then)772 956 y(COMPREPLY=\()e($\(compgen)g(-v)i(--)g +("$cur"\))f(\))581 1066 y(fi)581 1285 y(return)g(0)390 +1395 y(})275 1529 y Fu(W)-8 b(e)31 b(install)g(the)g(completion)h +(function)e(using)f(the)i Ft(-F)f Fu(option)h(to)g Ft(complete)p +Fu(:)390 1664 y Ft(#)47 b(Tell)g(readline)f(to)h(quote)f(appropriate)f +(and)i(append)f(slashes)g(to)h(directories;)390 1773 +y(#)g(use)g(the)g(bash)g(default)f(completion)f(for)i(other)f +(arguments)390 1883 y(complete)g(-o)h(filenames)e(-o)i(nospace)f(-o)h +(bashdefault)e(-F)i(_comp_cd)f(cd)150 2017 y Fu(Since)33 +b(w)m(e'd)g(lik)m(e)i(Bash)e(and)f(Readline)i(to)g(tak)m(e)g(care)g(of) +f(some)h(of)f(the)g(other)h(details)g(for)e(us,)i(w)m(e)f(use)150 +2127 y(sev)m(eral)43 b(other)g(options)f(to)h(tell)g(Bash)f(and)f +(Readline)i(what)f(to)g(do.)76 b(The)41 b Ft(-o)30 b(filenames)39 +b Fu(option)150 2237 y(tells)j(Readline)g(that)g(the)f(p)s(ossible)g +(completions)h(should)f(b)s(e)f(treated)i(as)g(\014lenames,)i(and)d +(quoted)150 2346 y(appropriately)-8 b(.)53 b(That)34 +b(option)h(will)g(also)g(cause)g(Readline)g(to)g(app)s(end)e(a)h(slash) +g(to)h(\014lenames)g(it)g(can)150 2456 y(determine)i(are)g(directories) +h(\(whic)m(h)g(is)f(wh)m(y)f(w)m(e)i(migh)m(t)f(w)m(an)m(t)h(to)g +(extend)f Ft(_comp_cd)e Fu(to)i(app)s(end)f(a)150 2565 +y(slash)22 b(if)g(w)m(e're)h(using)f(directories)h(found)e(via)i +Fr(CDP)-8 b(A)g(TH)10 b Fu(:)37 b(Readline)23 b(can't)g(tell)g(those)g +(completions)h(are)150 2675 y(directories\).)45 b(The)31 +b Ft(-o)f(nospace)f Fu(option)j(tells)g(Readline)g(to)h(not)e(app)s +(end)f(a)i(space)g(c)m(haracter)h(to)f(the)150 2785 y(directory)c +(name,)h(in)f(case)h(w)m(e)f(w)m(an)m(t)h(to)f(app)s(end)f(to)h(it.)41 +b(The)27 b Ft(-o)j(bashdefault)25 b Fu(option)j(brings)f(in)h(the)150 +2894 y(rest)h(of)f(the)h Ft(")p Fu(Bash)f(default)p Ft(")h +Fu(completions)g({)g(p)s(ossible)f(completion)i(that)f(Bash)f(adds)g +(to)h(the)g(default)150 3004 y(Readline)f(set.)40 b(These)28 +b(include)f(things)g(lik)m(e)i(command)e(name)h(completion,)h(v)-5 +b(ariable)28 b(completion)h(for)150 3113 y(w)m(ords)e(b)s(eginning)h +(with)f(`)p Ft($)p Fu(')h(or)g(`)p Ft(${)p Fu(',)h(completions)g(con)m +(taining)g(pathname)f(expansion)g(patterns)g(\(see)150 +3223 y(Section)j(3.5.8)h([Filename)g(Expansion],)e(page)i(33\),)f(and)f +(so)h(on.)275 3357 y(Once)39 b(installed)i(using)e Ft(complete)p +Fu(,)h Ft(_comp_cd)d Fu(will)j(b)s(e)g(called)g(ev)m(ery)h(time)f(w)m +(e)g(attempt)h(w)m(ord)150 3467 y(completion)32 b(for)e(a)h +Ft(cd)e Fu(command.)275 3601 y(Man)m(y)34 b(more)g(examples)g({)g(an)g +(extensiv)m(e)h(collection)i(of)c(completions)i(for)f(most)g(of)g(the)g +(common)150 3711 y(GNU,)g(Unix,)h(and)d(Lin)m(ux)h(commands)g({)h(are)g +(a)m(v)-5 b(ailable)36 b(as)e(part)f(of)h(the)f(bash)p +2943 3711 28 4 v 39 w(completion)i(pro)5 b(ject.)150 +3821 y(This)33 b(is)h(installed)h(b)m(y)f(default)g(on)g(man)m(y)h +(GNU/Lin)m(ux)f(distributions.)51 b(Originally)35 b(written)f(b)m(y)g +(Ian)150 3930 y(Macdonald,)48 b(the)c(pro)5 b(ject)44 +b(no)m(w)g(liv)m(es)h(at)f Ft(https:)11 b(/)g(/)g(github)g(.)g(com)g(/) +g(sc)o(op)g(/)f(bash)o(-co)o(mple)o(tion)g(/)h Fu(.)150 +4040 y(There)30 b(are)h(p)s(orts)e(for)h(other)h(systems)f(suc)m(h)g +(as)h(Solaris)g(and)f(Mac)h(OS)f(X.)275 4174 y(An)54 +b(older)h(v)m(ersion)h(of)f(the)g(bash)p 1532 4174 V +40 w(completion)h(pac)m(k)-5 b(age)57 b(is)e(distributed)f(with)h(bash) +f(in)h(the)150 4284 y Ft(examples/complete)26 b Fu(sub)s(directory)-8 +b(.)p eop end +%%Page: 146 152 +TeXDict begin 146 151 bop 3614 -116 a Fu(146)150 299 +y Fp(9)80 b(Using)53 b(History)g(In)l(teractiv)l(ely)150 +554 y Fu(This)42 b(c)m(hapter)h(describ)s(es)f(ho)m(w)g(to)h(use)g(the) +f Fm(gnu)h Fu(History)g(Library)e(in)m(teractiv)m(ely)-8 +b(,)50 b(from)42 b(a)h(user's)150 664 y(standp)s(oin)m(t.)76 +b(It)42 b(should)f(b)s(e)h(considered)g(a)g(user's)g(guide.)76 +b(F)-8 b(or)43 b(information)f(on)g(using)g(the)g Fm(gnu)150 +774 y Fu(History)31 b(Library)f(in)g(other)g(programs,)g(see)h(the)g +Fm(gnu)f Fu(Readline)h(Library)f(Man)m(ual.)150 1025 +y Fs(9.1)68 b(Bash)45 b(History)h(F)-11 b(acilities)150 +1184 y Fu(When)44 b(the)g Ft(-o)30 b(history)42 b Fu(option)i(to)h(the) +f Ft(set)f Fu(builtin)h(is)g(enabled)g(\(see)g(Section)h(4.3.1)h([The)e +(Set)150 1294 y(Builtin],)32 b(page)g(62\),)h(the)e(shell)h(pro)m +(vides)f(access)h(to)g(the)f Fr(command)g(history)p Fu(,)h(the)f(list)h +(of)f(commands)150 1404 y(previously)h(t)m(yp)s(ed.)47 +b(The)33 b(v)-5 b(alue)33 b(of)f(the)h Ft(HISTSIZE)e +Fu(shell)h(v)-5 b(ariable)34 b(is)f(used)e(as)i(the)g(n)m(um)m(b)s(er)e +(of)i(com-)150 1513 y(mands)i(to)i(sa)m(v)m(e)h(in)e(a)g(history)h +(list.)58 b(The)36 b(text)h(of)g(the)f(last)h Ft($HISTSIZE)d +Fu(commands)i(\(default)g(500\))150 1623 y(is)h(sa)m(v)m(ed.)61 +b(The)36 b(shell)h(stores)h(eac)m(h)g(command)e(in)h(the)g(history)g +(list)g(prior)f(to)i(parameter)f(and)f(v)-5 b(ari-)150 +1732 y(able)33 b(expansion)g(but)f(after)h(history)f(expansion)h(is)g +(p)s(erformed,)e(sub)5 b(ject)33 b(to)g(the)g(v)-5 b(alues)33 +b(of)g(the)g(shell)150 1842 y(v)-5 b(ariables)31 b Ft(HISTIGNORE)d +Fu(and)h Ft(HISTCONTROL)p Fu(.)275 1984 y(When)g(the)g(shell)h(starts)g +(up,)f(the)h(history)f(is)h(initialized)h(from)e(the)h(\014le)f(named)g +(b)m(y)h(the)f Ft(HISTFILE)150 2093 y Fu(v)-5 b(ariable)26 +b(\(default)g Ft(~/.bash_history)p Fu(\).)35 b(The)24 +b(\014le)i(named)e(b)m(y)h(the)h(v)-5 b(alue)25 b(of)h +Ft(HISTFILE)c Fu(is)k(truncated,)150 2203 y(if)42 b(necessary)-8 +b(,)45 b(to)e(con)m(tain)g(no)f(more)g(than)f(the)h(n)m(um)m(b)s(er)f +(of)h(lines)g(sp)s(eci\014ed)f(b)m(y)h(the)g(v)-5 b(alue)42 +b(of)g(the)150 2312 y Ft(HISTFILESIZE)28 b Fu(v)-5 b(ariable.)46 +b(When)31 b(a)h(shell)g(with)g(history)f(enabled)h(exits,)h(the)f(last) +h Ft($HISTSIZE)c Fu(lines)150 2422 y(are)35 b(copied)g(from)g(the)g +(history)f(list)i(to)f(the)g(\014le)g(named)f(b)m(y)h +Ft($HISTFILE)p Fu(.)51 b(If)35 b(the)g Ft(histappend)d +Fu(shell)150 2532 y(option)26 b(is)g(set)g(\(see)h(Section)f(4.2)h +([Bash)f(Builtins],)h(page)g(51\),)h(the)e(lines)g(are)g(app)s(ended)e +(to)i(the)g(history)150 2641 y(\014le,)36 b(otherwise)f(the)g(history)f +(\014le)h(is)f(o)m(v)m(erwritten.)55 b(If)34 b Ft(HISTFILE)e +Fu(is)j(unset,)g(or)g(if)f(the)h(history)f(\014le)h(is)150 +2751 y(un)m(writable,)f(the)f(history)g(is)g(not)h(sa)m(v)m(ed.)49 +b(After)34 b(sa)m(ving)g(the)f(history)-8 b(,)34 b(the)g(history)f +(\014le)g(is)g(truncated)150 2860 y(to)g(con)m(tain)h(no)f(more)g(than) +f Ft($HISTFILESIZE)d Fu(lines.)48 b(If)33 b Ft(HISTFILESIZE)c +Fu(is)k(unset,)g(or)f(set)i(to)f(n)m(ull,)h(a)150 2970 +y(non-n)m(umeric)c(v)-5 b(alue,)31 b(or)f(a)h(n)m(umeric)f(v)-5 +b(alue)31 b(less)g(than)f(zero,)h(the)g(history)f(\014le)h(is)f(not)h +(truncated.)275 3112 y(If)g(the)h Ft(HISTTIMEFORMAT)d +Fu(is)j(set,)h(the)f(time)h(stamp)f(information)g(asso)s(ciated)i(with) +e(eac)m(h)h(history)150 3221 y(en)m(try)d(is)h(written)f(to)h(the)f +(history)h(\014le,)f(mark)m(ed)h(with)f(the)g(history)g(commen)m(t)h(c) +m(haracter.)43 b(When)30 b(the)150 3331 y(history)22 +b(\014le)h(is)g(read,)h(lines)f(b)s(eginning)e(with)i(the)f(history)h +(commen)m(t)g(c)m(haracter)h(follo)m(w)m(ed)h(immediately)150 +3440 y(b)m(y)30 b(a)h(digit)g(are)g(in)m(terpreted)g(as)f(timestamps)h +(for)f(the)h(follo)m(wing)h(history)e(en)m(try)-8 b(.)275 +3582 y(The)19 b(builtin)h(command)g Ft(fc)g Fu(ma)m(y)h(b)s(e)f(used)f +(to)i(list)g(or)g(edit)g(and)e(re-execute)j(a)f(p)s(ortion)f(of)g(the)h +(history)150 3692 y(list.)41 b(The)27 b Ft(history)f +Fu(builtin)i(ma)m(y)h(b)s(e)e(used)g(to)i(displa)m(y)g(or)f(mo)s(dify)f +(the)h(history)g(list)h(and)f(manipulate)150 3801 y(the)j(history)g +(\014le.)42 b(When)31 b(using)f(command-line)h(editing,)h(searc)m(h)f +(commands)g(are)g(a)m(v)-5 b(ailable)33 b(in)e(eac)m(h)150 +3911 y(editing)45 b(mo)s(de)g(that)g(pro)m(vide)g(access)h(to)f(the)g +(history)f(list)i(\(see)f(Section)h(8.4.2)g([Commands)e(F)-8 +b(or)150 4020 y(History],)31 b(page)h(128\).)275 4162 +y(The)47 b(shell)i(allo)m(ws)h(con)m(trol)f(o)m(v)m(er)h(whic)m(h)e +(commands)g(are)h(sa)m(v)m(ed)g(on)f(the)h(history)f(list.)95 +b(The)150 4272 y Ft(HISTCONTROL)25 b Fu(and)j Ft(HISTIGNORE)e +Fu(v)-5 b(ariables)29 b(ma)m(y)h(b)s(e)d(set)j(to)f(cause)g(the)g +(shell)f(to)i(sa)m(v)m(e)g(only)f(a)g(subset)150 4381 +y(of)e(the)g(commands)f(en)m(tered.)40 b(The)26 b Ft(cmdhist)f +Fu(shell)i(option,)h(if)f(enabled,)g(causes)h(the)e(shell)h(to)h +(attempt)150 4491 y(to)23 b(sa)m(v)m(e)h(eac)m(h)f(line)g(of)f(a)h(m)m +(ulti-line)g(command)f(in)g(the)h(same)f(history)g(en)m(try)-8 +b(,)25 b(adding)d(semicolons)h(where)150 4600 y(necessary)37 +b(to)f(preserv)m(e)h(syn)m(tactic)h(correctness.)58 b(The)36 +b Ft(lithist)e Fu(shell)i(option)h(causes)g(the)f(shell)g(to)150 +4710 y(sa)m(v)m(e)41 b(the)e(command)g(with)f(em)m(b)s(edded)g +(newlines)h(instead)g(of)g(semicolons.)68 b(The)39 b +Ft(shopt)e Fu(builtin)i(is)150 4820 y(used)30 b(to)i(set)g(these)g +(options.)43 b(See)32 b(Section)g(4.3.2)h([The)e(Shopt)f(Builtin],)j +(page)f(66,)g(for)f(a)h(description)150 4929 y(of)f Ft(shopt)p +Fu(.)150 5181 y Fs(9.2)68 b(Bash)45 b(History)h(Builtins)150 +5340 y Fu(Bash)31 b(pro)m(vides)f(t)m(w)m(o)i(builtin)e(commands)g +(whic)m(h)g(manipulate)g(the)h(history)f(list)h(and)f(history)g +(\014le.)p eop end +%%Page: 147 153 +TeXDict begin 147 152 bop 150 -116 a Fu(Chapter)30 b(9:)41 +b(Using)30 b(History)h(In)m(teractiv)m(ely)1925 b(147)150 +299 y Ft(fc)870 430 y(fc)47 b([-e)g Fj(ename)p Ft(])f([-lnr])g([)p +Fj(first)p Ft(])g([)p Fj(last)p Ft(])870 540 y(fc)h(-s)g([)p +Fj(pat)p Ft(=)p Fj(rep)p Ft(])f([)p Fj(command)p Ft(])630 +671 y Fu(The)32 b(\014rst)g(form)g(selects)j(a)e(range)g(of)f(commands) +h(from)f Fr(\014rst)i Fu(to)f Fr(last)j Fu(from)c(the)h(history)630 +781 y(list)41 b(and)f(displa)m(ys)g(or)g(edits)h(and)e(re-executes)j +(them.)71 b(Both)40 b Fr(\014rst)i Fu(and)e Fr(last)j +Fu(ma)m(y)e(b)s(e)630 891 y(sp)s(eci\014ed)33 b(as)h(a)g(string)g(\(to) +h(lo)s(cate)h(the)e(most)g(recen)m(t)h(command)f(b)s(eginning)f(with)g +(that)630 1000 y(string\))28 b(or)g(as)h(a)f(n)m(um)m(b)s(er)f(\(an)h +(index)g(in)m(to)h(the)f(history)g(list,)h(where)f(a)g(negativ)m(e)i(n) +m(um)m(b)s(er)630 1110 y(is)g(used)g(as)h(an)f(o\013set)h(from)f(the)h +(curren)m(t)f(command)g(n)m(um)m(b)s(er\).)630 1241 y(When)j(listing,)h +(a)f Fr(\014rst)h Fu(or)f Fr(last)j Fu(of)d(0)g(is)g(equiv)-5 +b(alen)m(t)34 b(to)g(-1)f(and)g(-0)g(is)g(equiv)-5 b(alen)m(t)34 +b(to)g(the)630 1351 y(curren)m(t)k(command)h(\(usually)g(the)g +Ft(fc)f Fu(command\);)43 b(otherwise)c(0)g(is)g(equiv)-5 +b(alen)m(t)40 b(to)f(-1)630 1461 y(and)30 b(-0)h(is)f(in)m(v)-5 +b(alid.)630 1592 y(If)33 b Fr(last)j Fu(is)e(not)f(sp)s(eci\014ed,)h +(it)g(is)f(set)h(to)g Fr(\014rst)p Fu(.)49 b(If)33 b +Fr(\014rst)i Fu(is)e(not)h(sp)s(eci\014ed,)f(it)h(is)g(set)g(to)g(the) +630 1702 y(previous)g(command)f(for)h(editing)h(and)e +Fq(\000)p Fu(16)i(for)f(listing.)53 b(If)33 b(the)h Ft(-l)g +Fu(\015ag)g(is)g(giv)m(en,)j(the)630 1811 y(commands)27 +b(are)h(listed)g(on)f(standard)g(output.)39 b(The)27 +b Ft(-n)g Fu(\015ag)h(suppresses)e(the)h(command)630 +1921 y(n)m(um)m(b)s(ers)h(when)h(listing.)42 b(The)29 +b Ft(-r)g Fu(\015ag)i(rev)m(erses)f(the)g(order)f(of)i(the)f(listing.) +41 b(Otherwise,)630 2030 y(the)i(editor)h(giv)m(en)g(b)m(y)f +Fr(ename)49 b Fu(is)43 b(in)m(v)m(ok)m(ed)i(on)e(a)g(\014le)h(con)m +(taining)g(those)g(commands.)630 2140 y(If)c Fr(ename)46 +b Fu(is)40 b(not)h(giv)m(en,)j(the)d(v)-5 b(alue)41 b(of)f(the)h(follo) +m(wing)h(v)-5 b(ariable)41 b(expansion)f(is)g(used:)630 +2250 y Ft(${FCEDIT:-${EDITOR:-vi}})o Fu(.)34 b(This)25 +b(sa)m(ys)i(to)g(use)f(the)g(v)-5 b(alue)27 b(of)f(the)h +Ft(FCEDIT)d Fu(v)-5 b(ariable)630 2359 y(if)33 b(set,)i(or)e(the)h(v)-5 +b(alue)33 b(of)h(the)f Ft(EDITOR)f Fu(v)-5 b(ariable)34 +b(if)f(that)h(is)f(set,)i(or)e Ft(vi)f Fu(if)i(neither)f(is)g(set.)630 +2469 y(When)d(editing)h(is)g(complete,)h(the)e(edited)h(commands)f(are) +h(ec)m(ho)s(ed)g(and)e(executed.)630 2600 y(In)34 b(the)g(second)g +(form,)h Fr(command)j Fu(is)c(re-executed)i(after)f(eac)m(h)g(instance) +g(of)f Fr(pat)j Fu(in)d(the)630 2710 y(selected)29 b(command)e(is)h +(replaced)f(b)m(y)h Fr(rep)p Fu(.)39 b Fr(command)31 +b Fu(is)c(in)m(terpreted)h(the)f(same)h(as)g Fr(\014rst)630 +2819 y Fu(ab)s(o)m(v)m(e.)630 2951 y(A)j(useful)f(alias)i(to)g(use)e +(with)h(the)g Ft(fc)f Fu(command)h(is)g Ft(r='fc)e(-s')p +Fu(,)h(so)h(that)h(t)m(yping)f(`)p Ft(r)f(cc)p Fu(')630 +3061 y(runs)35 b(the)h(last)h(command)f(b)s(eginning)g(with)g +Ft(cc)f Fu(and)h(t)m(yping)g(`)p Ft(r)p Fu(')h(re-executes)h(the)e +(last)630 3170 y(command)30 b(\(see)h(Section)h(6.6)f([Aliases],)h +(page)g(94\).)150 3324 y Ft(history)870 3455 y(history)46 +b([)p Fj(n)p Ft(])870 3565 y(history)g(-c)870 3674 y(history)g(-d)h +Fj(offset)870 3784 y Ft(history)f(-d)h Fj(start)p Ft(-)p +Fj(end)870 3893 y Ft(history)f([-anrw])g([)p Fj(filename)p +Ft(])870 4003 y(history)g(-ps)h Fj(arg)630 4134 y Fu(With)26 +b(no)g(options,)h(displa)m(y)f(the)g(history)g(list)g(with)f(line)h(n)m +(um)m(b)s(ers.)38 b(Lines)26 b(pre\014xed)e(with)630 +4244 y(a)35 b(`)p Ft(*)p Fu(')g(ha)m(v)m(e)h(b)s(een)e(mo)s(di\014ed.) +53 b(An)34 b(argumen)m(t)h(of)g Fr(n)f Fu(lists)i(only)f(the)g(last)g +Fr(n)f Fu(lines.)54 b(If)35 b(the)630 4354 y(shell)30 +b(v)-5 b(ariable)31 b Ft(HISTTIMEFORMAT)26 b Fu(is)k(set)h(and)e(not)i +(n)m(ull,)f(it)h(is)f(used)f(as)h(a)h(format)f(string)630 +4463 y(for)36 b Fr(strftime)41 b Fu(to)36 b(displa)m(y)g(the)g(time)h +(stamp)f(asso)s(ciated)h(with)f(eac)m(h)h(displa)m(y)m(ed)f(history)630 +4573 y(en)m(try)-8 b(.)47 b(No)33 b(in)m(terv)m(ening)g(blank)f(is)g +(prin)m(ted)g(b)s(et)m(w)m(een)h(the)g(formatted)f(time)h(stamp)g(and) +630 4682 y(the)e(history)f(line.)630 4814 y(Options,)g(if)h(supplied,)e +(ha)m(v)m(e)i(the)g(follo)m(wing)h(meanings:)630 4967 +y Ft(-c)384 b Fu(Clear)23 b(the)g(history)g(list.)39 +b(This)22 b(ma)m(y)i(b)s(e)e(com)m(bined)h(with)f(the)h(other)h +(options)1110 5077 y(to)31 b(replace)g(the)g(history)f(list)h +(completely)-8 b(.)630 5230 y Ft(-d)30 b Fj(offset)66 +b Fu(Delete)38 b(the)f(history)f(en)m(try)h(at)f(p)s(osition)h +Fr(o\013set)p Fu(.)59 b(If)36 b Fr(o\013set)j Fu(is)d(p)s(ositiv)m(e,)j +(it)1110 5340 y(should)32 b(b)s(e)h(sp)s(eci\014ed)f(as)i(it)g(app)s +(ears)e(when)g(the)i(history)f(is)g(displa)m(y)m(ed.)50 +b(If)p eop end +%%Page: 148 154 +TeXDict begin 148 153 bop 150 -116 a Fu(Chapter)30 b(9:)41 +b(Using)30 b(History)h(In)m(teractiv)m(ely)1925 b(148)1110 +299 y Fr(o\013set)26 b Fu(is)d(negativ)m(e,)k(it)c(is)g(in)m(terpreted) +h(as)f(relativ)m(e)i(to)f(one)f(greater)h(than)f(the)1110 +408 y(last)36 b(history)f(p)s(osition,)h(so)f(negativ)m(e)i(indices)e +(coun)m(t)h(bac)m(k)f(from)g(the)g(end)1110 518 y(of)h(the)g(history)-8 +b(,)37 b(and)e(an)h(index)f(of)h(`)p Ft(-1)p Fu(')f(refers)g(to)i(the)f +(curren)m(t)f Ft(history)1110 628 y(-d)30 b Fu(command.)630 +785 y Ft(-d)g Fj(start)p Ft(-)p Fj(end)1110 895 y Fu(Delete)23 +b(the)d(history)h(en)m(tries)g(b)s(et)m(w)m(een)g(p)s(ositions)g +Fr(start)i Fu(and)d Fr(end)p Fu(,)i(inclusiv)m(e.)1110 +1004 y(P)m(ositiv)m(e)41 b(and)c(negativ)m(e)k(v)-5 b(alues)38 +b(for)h Fr(start)h Fu(and)e Fr(end)j Fu(are)e(in)m(terpreted)g(as)1110 +1114 y(describ)s(ed)29 b(ab)s(o)m(v)m(e.)630 1271 y Ft(-a)384 +b Fu(App)s(end)28 b(the)i(new)f(history)g(lines)h(to)h(the)e(history)h +(\014le.)41 b(These)29 b(are)h(history)1110 1381 y(lines)36 +b(en)m(tered)g(since)f(the)h(b)s(eginning)f(of)g(the)h(curren)m(t)f +(Bash)h(session,)h(but)1110 1490 y(not)31 b(already)g(app)s(ended)d(to) +j(the)g(history)f(\014le.)630 1648 y Ft(-n)384 b Fu(App)s(end)32 +b(the)i(history)f(lines)h(not)g(already)g(read)g(from)f(the)h(history)f +(\014le)h(to)1110 1758 y(the)26 b(curren)m(t)f(history)g(list.)40 +b(These)25 b(are)h(lines)g(app)s(ended)e(to)i(the)f(history)h(\014le) +1110 1867 y(since)31 b(the)f(b)s(eginning)g(of)g(the)h(curren)m(t)f +(Bash)h(session.)630 2025 y Ft(-r)384 b Fu(Read)31 b(the)f(history)g +(\014le)h(and)f(app)s(end)e(its)j(con)m(ten)m(ts)h(to)f(the)g(history)f +(list.)630 2182 y Ft(-w)384 b Fu(W)-8 b(rite)32 b(out)e(the)h(curren)m +(t)f(history)g(list)h(to)h(the)e(history)g(\014le.)630 +2339 y Ft(-p)384 b Fu(P)m(erform)31 b(history)f(substitution)h(on)f +(the)h Fr(arg)8 b Fu(s)31 b(and)f(displa)m(y)h(the)f(result)h(on)1110 +2449 y(the)d(standard)f(output,)i(without)f(storing)g(the)g(results)g +(in)g(the)g(history)g(list.)630 2606 y Ft(-s)384 b Fu(The)30 +b Fr(arg)8 b Fu(s)30 b(are)h(added)f(to)h(the)f(end)g(of)h(the)f +(history)h(list)g(as)f(a)h(single)g(en)m(try)-8 b(.)630 +2764 y(When)26 b(an)m(y)h(of)f(the)g Ft(-w)p Fu(,)h Ft(-r)p +Fu(,)g Ft(-a)p Fu(,)g(or)f Ft(-n)f Fu(options)i(is)f(used,)h(if)f +Fr(\014lename)32 b Fu(is)26 b(giv)m(en,)i(then)e(it)h(is)630 +2873 y(used)h(as)g(the)h(history)f(\014le.)40 b(If)28 +b(not,)i(then)e(the)g(v)-5 b(alue)29 b(of)g(the)g Ft(HISTFILE)d +Fu(v)-5 b(ariable)29 b(is)f(used.)150 3112 y Fs(9.3)68 +b(History)46 b(Expansion)150 3272 y Fu(The)f(History)h(library)e(pro)m +(vides)i(a)f(history)g(expansion)g(feature)h(that)g(is)f(similar)h(to)g +(the)f(history)150 3381 y(expansion)g(pro)m(vided)f(b)m(y)h +Ft(csh)p Fu(.)83 b(This)44 b(section)i(describ)s(es)e(the)h(syn)m(tax)h +(used)e(to)i(manipulate)f(the)150 3491 y(history)30 b(information.)275 +3624 y(History)h(expansions)f(in)m(tro)s(duce)g(w)m(ords)g(from)g(the)h +(history)f(list)h(in)m(to)g(the)g(input)f(stream,)h(making)150 +3734 y(it)g(easy)g(to)g(rep)s(eat)g(commands,)f(insert)g(the)h(argumen) +m(ts)f(to)h(a)g(previous)f(command)g(in)m(to)i(the)e(curren)m(t)150 +3844 y(input)f(line,)i(or)g(\014x)f(errors)f(in)h(previous)g(commands)g +(quic)m(kly)-8 b(.)275 3977 y(History)24 b(expansion)f(is)h(p)s +(erformed)e(immediately)j(after)f(a)g(complete)h(line)f(is)g(read,)h(b) +s(efore)e(the)h(shell)150 4087 y(breaks)32 b(it)i(in)m(to)f(w)m(ords,)g +(and)f(is)h(p)s(erformed)e(on)h(eac)m(h)i(line)f(individually)-8 +b(.)48 b(Bash)33 b(attempts)g(to)h(inform)150 4196 y(the)d(history)f +(expansion)g(functions)g(ab)s(out)g(quoting)h(still)g(in)f(e\013ect)i +(from)e(previous)g(lines.)275 4330 y(History)37 b(expansion)f(tak)m(es) +i(place)g(in)e(t)m(w)m(o)i(parts.)59 b(The)36 b(\014rst)g(is)h(to)g +(determine)g(whic)m(h)f(line)h(from)150 4439 y(the)42 +b(history)f(list)h(should)e(b)s(e)h(used)f(during)g(substitution.)74 +b(The)40 b(second)i(is)f(to)h(select)h(p)s(ortions)e(of)150 +4549 y(that)31 b(line)g(for)f(inclusion)h(in)m(to)g(the)g(curren)m(t)f +(one.)42 b(The)30 b(line)h(selected)h(from)e(the)h(history)f(is)h +(called)h(the)150 4659 y Fr(ev)m(en)m(t)p Fu(,)e(and)c(the)i(p)s +(ortions)e(of)i(that)f(line)h(that)g(are)f(acted)i(up)s(on)c(are)j +(called)g Fr(w)m(ords)p Fu(.)39 b(V)-8 b(arious)28 b +Fr(mo)s(di\014ers)150 4768 y Fu(are)33 b(a)m(v)-5 b(ailable)36 +b(to)d(manipulate)h(the)f(selected)h(w)m(ords.)48 b(The)32 +b(line)i(is)f(brok)m(en)f(in)m(to)i(w)m(ords)f(in)f(the)i(same)150 +4878 y(fashion)23 b(that)g(Bash)g(do)s(es,)h(so)f(that)h(sev)m(eral)g +(w)m(ords)e(surrounded)e(b)m(y)j(quotes)g(are)g(considered)g(one)g(w)m +(ord.)150 4987 y(History)37 b(expansions)g(are)g(in)m(tro)s(duced)f(b)m +(y)h(the)g(app)s(earance)g(of)g(the)g(history)f(expansion)h(c)m +(haracter,)150 5097 y(whic)m(h)30 b(is)h(`)p Ft(!)p Fu(')f(b)m(y)g +(default.)275 5230 y(History)c(expansion)g(implemen)m(ts)h(shell-lik)m +(e)h(quoting)f(con)m(v)m(en)m(tions:)40 b(a)27 b(bac)m(kslash)g(can)f +(b)s(e)g(used)f(to)150 5340 y(remo)m(v)m(e)h(the)e(sp)s(ecial)g +(handling)g(for)g(the)g(next)g(c)m(haracter;)k(single)d(quotes)g +(enclose)g(v)m(erbatim)g(sequences)p eop end +%%Page: 149 155 +TeXDict begin 149 154 bop 150 -116 a Fu(Chapter)30 b(9:)41 +b(Using)30 b(History)h(In)m(teractiv)m(ely)1925 b(149)150 +299 y(of)29 b(c)m(haracters,)i(and)e(can)g(b)s(e)g(used)f(to)i(inhibit) +f(history)g(expansion;)g(and)g(c)m(haracters)i(enclosed)e(within)150 +408 y(double)h(quotes)i(ma)m(y)f(b)s(e)f(sub)5 b(ject)31 +b(to)h(history)f(expansion,)g(since)g(bac)m(kslash)g(can)h(escap)s(e)f +(the)g(history)150 518 y(expansion)e(c)m(haracter,)j(but)d(single)h +(quotes)g(ma)m(y)h(not,)f(since)g(they)g(are)g(not)f(treated)i(sp)s +(ecially)f(within)150 628 y(double)g(quotes.)275 765 +y(When)41 b(using)g(the)h(shell,)i(only)e(`)p Ft(\\)p +Fu(')g(and)e(`)p Ft(')p Fu(')i(ma)m(y)g(b)s(e)f(used)g(to)h(escap)s(e)g +(the)g(history)f(expansion)150 875 y(c)m(haracter,)e(but)34 +b(the)i(history)g(expansion)f(c)m(haracter)i(is)f(also)g(treated)h(as)e +(quoted)h(if)g(it)g(immediately)150 984 y(precedes)30 +b(the)h(closing)g(double)f(quote)h(in)f(a)h(double-quoted)g(string.)275 +1122 y(Sev)m(eral)48 b(shell)g(options)h(settable)g(with)e(the)h +Ft(shopt)f Fu(builtin)g(\(see)i(Section)f(4.3.2)i([The)e(Shopt)150 +1232 y(Builtin],)24 b(page)e(66\))h(ma)m(y)e(b)s(e)g(used)g(to)h +(tailor)g(the)g(b)s(eha)m(vior)f(of)h(history)f(expansion.)37 +b(If)21 b(the)h Ft(histverify)150 1341 y Fu(shell)35 +b(option)f(is)h(enabled,)g(and)f(Readline)h(is)f(b)s(eing)g(used,)h +(history)g(substitutions)e(are)i(not)g(immedi-)150 1451 +y(ately)i(passed)d(to)i(the)g(shell)f(parser.)55 b(Instead,)37 +b(the)e(expanded)g(line)g(is)h(reloaded)g(in)m(to)g(the)f(Readline)150 +1561 y(editing)29 b(bu\013er)f(for)h(further)e(mo)s(di\014cation.)41 +b(If)28 b(Readline)h(is)g(b)s(eing)f(used,)h(and)f(the)h +Ft(histreedit)d Fu(shell)150 1670 y(option)e(is)g(enabled,)h(a)g +(failed)f(history)g(expansion)g(will)g(b)s(e)f(reloaded)h(in)m(to)h +(the)f(Readline)g(editing)h(bu\013er)150 1780 y(for)31 +b(correction.)43 b(The)30 b Ft(-p)g Fu(option)h(to)h(the)f +Ft(history)e Fu(builtin)h(command)h(ma)m(y)g(b)s(e)f(used)g(to)i(see)f +(what)g(a)150 1889 y(history)25 b(expansion)g(will)g(do)g(b)s(efore)g +(using)f(it.)40 b(The)24 b Ft(-s)h Fu(option)g(to)h(the)f +Ft(history)e Fu(builtin)i(ma)m(y)g(b)s(e)g(used)150 1999 +y(to)36 b(add)f(commands)g(to)h(the)g(end)f(of)g(the)h(history)f(list)i +(without)e(actually)i(executing)g(them,)g(so)e(that)150 +2108 y(they)c(are)f(a)m(v)-5 b(ailable)33 b(for)d(subsequen)m(t)g +(recall.)42 b(This)29 b(is)i(most)g(useful)e(in)h(conjunction)h(with)f +(Readline.)275 2246 y(The)j(shell)h(allo)m(ws)h(con)m(trol)h(of)e(the)g +(v)-5 b(arious)34 b(c)m(haracters)h(used)f(b)m(y)f(the)h(history)g +(expansion)g(mec)m(h-)150 2356 y(anism)h(with)g(the)g +Ft(histchars)d Fu(v)-5 b(ariable,)38 b(as)d(explained)g(ab)s(o)m(v)m(e) +i(\(see)f(Section)f(5.2)i([Bash)e(V)-8 b(ariables],)150 +2465 y(page)32 b(73\).)44 b(The)31 b(shell)g(uses)g(the)g(history)g +(commen)m(t)i(c)m(haracter)f(to)g(mark)f(history)g(timestamps)h(when) +150 2575 y(writing)e(the)h(history)f(\014le.)150 2777 +y Fk(9.3.1)63 b(Ev)m(en)m(t)39 b(Designators)150 2924 +y Fu(An)32 b(ev)m(en)m(t)j(designator)e(is)g(a)g(reference)g(to)h(a)f +(command)f(line)h(en)m(try)g(in)g(the)g(history)g(list.)48 +b(Unless)33 b(the)150 3034 y(reference)e(is)f(absolute,)i(ev)m(en)m(ts) +f(are)g(relativ)m(e)i(to)e(the)f(curren)m(t)g(p)s(osition)h(in)f(the)h +(history)f(list.)150 3198 y Ft(!)432 b Fu(Start)34 b(a)f(history)h +(substitution,)g(except)g(when)f(follo)m(w)m(ed)i(b)m(y)e(a)h(space,)h +(tab,)f(the)g(end)f(of)630 3308 y(the)i(line,)g(`)p Ft(=)p +Fu(')g(or)f(`)p Ft(\()p Fu(')h(\(when)e(the)i Ft(extglob)d +Fu(shell)j(option)f(is)h(enabled)f(using)g(the)g Ft(shopt)630 +3417 y Fu(builtin\).)150 3580 y Ft(!)p Fj(n)384 b Fu(Refer)30 +b(to)i(command)e(line)g Fr(n)p Fu(.)150 3742 y Ft(!-)p +Fj(n)336 b Fu(Refer)30 b(to)i(the)e(command)g Fr(n)g +Fu(lines)h(bac)m(k.)150 3905 y Ft(!!)384 b Fu(Refer)30 +b(to)i(the)e(previous)g(command.)40 b(This)30 b(is)g(a)h(synon)m(ym)f +(for)g(`)p Ft(!-1)p Fu('.)150 4067 y Ft(!)p Fj(string)144 +b Fu(Refer)25 b(to)h(the)f(most)h(recen)m(t)g(command)f(preceding)g +(the)g(curren)m(t)g(p)s(osition)g(in)g(the)g(history)630 +4177 y(list)31 b(starting)g(with)f Fr(string)p Fu(.)150 +4340 y Ft(!?)p Fj(string)p Ft([?])630 4449 y Fu(Refer)25 +b(to)h(the)f(most)h(recen)m(t)g(command)f(preceding)g(the)g(curren)m(t) +g(p)s(osition)g(in)g(the)g(history)630 4559 y(list)32 +b(con)m(taining)i Fr(string)p Fu(.)45 b(The)31 b(trailing)i(`)p +Ft(?)p Fu(')f(ma)m(y)g(b)s(e)f(omitted)i(if)f(the)g Fr(string)39 +b Fu(is)32 b(follo)m(w)m(ed)630 4668 y(immediately)f(b)m(y)e(a)h +(newline.)40 b(If)29 b Fr(string)38 b Fu(is)29 b(missing,)h(the)g +(string)f(from)g(the)h(most)g(recen)m(t)630 4778 y(searc)m(h)h(is)f +(used;)g(it)h(is)g(an)f(error)g(if)g(there)h(is)f(no)g(previous)g +(searc)m(h)h(string.)150 4941 y Ft(^)p Fj(string1)p Ft(^)p +Fj(string2)p Ft(^)630 5050 y Fu(Quic)m(k)h(Substitution.)44 +b(Rep)s(eat)32 b(the)g(last)h(command,)f(replacing)g +Fr(string1)40 b Fu(with)31 b Fr(string2)p Fu(.)630 5160 +y(Equiv)-5 b(alen)m(t)31 b(to)g Ft(!!:s^)p Fj(string1)p +Ft(^)p Fj(string2)p Ft(^)p Fu(.)150 5322 y Ft(!#)384 +b Fu(The)30 b(en)m(tire)h(command)f(line)h(t)m(yp)s(ed)f(so)h(far.)p +eop end +%%Page: 150 156 +TeXDict begin 150 155 bop 150 -116 a Fu(Chapter)30 b(9:)41 +b(Using)30 b(History)h(In)m(teractiv)m(ely)1925 b(150)150 +299 y Fk(9.3.2)63 b(W)-10 b(ord)41 b(Designators)150 +446 y Fu(W)-8 b(ord)27 b(designators)h(are)g(used)e(to)i(select)h +(desired)d(w)m(ords)h(from)f(the)i(ev)m(en)m(t.)41 b(A)27 +b(`)p Ft(:)p Fu(')g(separates)h(the)f(ev)m(en)m(t)150 +555 y(sp)s(eci\014cation)38 b(from)e(the)h(w)m(ord)f(designator.)61 +b(It)37 b(ma)m(y)h(b)s(e)e(omitted)i(if)e(the)h(w)m(ord)g(designator)g +(b)s(egins)150 665 y(with)30 b(a)g(`)p Ft(^)p Fu(',)g(`)p +Ft($)p Fu(',)g(`)p Ft(*)p Fu(',)h(`)p Ft(-)p Fu(',)f(or)g(`)p +Ft(\045)p Fu('.)41 b(W)-8 b(ords)30 b(are)g(n)m(um)m(b)s(ered)e(from)i +(the)g(b)s(eginning)f(of)h(the)g(line,)g(with)g(the)150 +775 y(\014rst)f(w)m(ord)f(b)s(eing)h(denoted)h(b)m(y)f(0)h(\(zero\).)41 +b(W)-8 b(ords)30 b(are)g(inserted)f(in)m(to)h(the)g(curren)m(t)f(line)g +(separated)h(b)m(y)150 884 y(single)h(spaces.)275 1019 +y(F)-8 b(or)31 b(example,)150 1179 y Ft(!!)384 b Fu(designates)37 +b(the)f(preceding)g(command.)57 b(When)35 b(y)m(ou)i(t)m(yp)s(e)f +(this,)h(the)f(preceding)g(com-)630 1289 y(mand)30 b(is)g(rep)s(eated)g +(in)g(toto.)150 1449 y Ft(!!:$)288 b Fu(designates)23 +b(the)g(last)g(argumen)m(t)g(of)f(the)h(preceding)f(command.)38 +b(This)22 b(ma)m(y)h(b)s(e)e(shortened)630 1558 y(to)31 +b Ft(!$)p Fu(.)150 1718 y Ft(!fi:2)240 b Fu(designates)30 +b(the)g(second)f(argumen)m(t)h(of)f(the)h(most)f(recen)m(t)i(command)e +(starting)h(with)f(the)630 1828 y(letters)j Ft(fi)p Fu(.)275 +1988 y(Here)e(are)h(the)g(w)m(ord)f(designators:)150 +2148 y Ft(0)g(\(zero\))114 b Fu(The)30 b Ft(0)p Fu(th)g(w)m(ord.)40 +b(F)-8 b(or)31 b(man)m(y)g(applications,)h(this)e(is)g(the)h(command)f +(w)m(ord.)150 2308 y Fj(n)432 b Fu(The)30 b Fr(n)p Fu(th)g(w)m(ord.)150 +2467 y Ft(^)432 b Fu(The)30 b(\014rst)f(argumen)m(t;)j(that)f(is,)f(w)m +(ord)g(1.)150 2627 y Ft($)432 b Fu(The)30 b(last)h(argumen)m(t.)150 +2787 y Ft(\045)432 b Fu(The)40 b(\014rst)h(w)m(ord)f(matc)m(hed)i(b)m +(y)f(the)g(most)g(recen)m(t)h(`)p Ft(?)p Fj(string)p +Ft(?)p Fu(')d(searc)m(h,)44 b(if)d(the)g(searc)m(h)630 +2897 y(string)30 b(b)s(egins)g(with)g(a)h(c)m(haracter)h(that)f(is)f +(part)h(of)f(a)h(w)m(ord.)150 3057 y Fj(x)p Ft(-)p Fj(y)336 +b Fu(A)30 b(range)h(of)g(w)m(ords;)f(`)p Ft(-)p Fj(y)p +Fu(')g(abbreviates)h(`)p Ft(0-)p Fj(y)p Fu('.)150 3216 +y Ft(*)432 b Fu(All)28 b(of)g(the)g(w)m(ords,)g(except)h(the)e +Ft(0)p Fu(th.)40 b(This)27 b(is)g(a)h(synon)m(ym)f(for)h(`)p +Ft(1-$)p Fu('.)39 b(It)28 b(is)g(not)g(an)f(error)630 +3326 y(to)j(use)g(`)p Ft(*)p Fu(')f(if)h(there)g(is)g(just)f(one)h(w)m +(ord)f(in)g(the)h(ev)m(en)m(t;)i(the)d(empt)m(y)i(string)e(is)h +(returned)e(in)630 3436 y(that)j(case.)150 3595 y Fj(x)p +Ft(*)384 b Fu(Abbreviates)31 b(`)p Fj(x)p Ft(-$)p Fu(')150 +3755 y Fj(x)p Ft(-)384 b Fu(Abbreviates)27 b(`)p Fj(x)p +Ft(-$)p Fu(')g(lik)m(e)h(`)p Fj(x)p Ft(*)p Fu(',)g(but)e(omits)i(the)f +(last)h(w)m(ord.)39 b(If)27 b(`)p Ft(x)p Fu(')g(is)g(missing,)g(it)h +(defaults)630 3865 y(to)j(0.)275 4025 y(If)i(a)h(w)m(ord)g(designator)g +(is)g(supplied)f(without)h(an)g(ev)m(en)m(t)h(sp)s(eci\014cation,)h +(the)e(previous)f(command)150 4135 y(is)d(used)g(as)h(the)f(ev)m(en)m +(t.)150 4334 y Fk(9.3.3)63 b(Mo)s(di\014ers)150 4481 +y Fu(After)29 b(the)g(optional)g(w)m(ord)g(designator,)g(y)m(ou)g(can)g +(add)f(a)h(sequence)g(of)g(one)g(or)f(more)h(of)g(the)f(follo)m(wing) +150 4591 y(mo)s(di\014ers,)33 b(eac)m(h)h(preceded)f(b)m(y)g(a)h(`)p +Ft(:)p Fu('.)50 b(These)33 b(mo)s(dify)-8 b(,)33 b(or)h(edit,)g(the)g +(w)m(ord)f(or)g(w)m(ords)g(selected)h(from)150 4700 y(the)d(history)f +(ev)m(en)m(t.)150 4860 y Ft(h)432 b Fu(Remo)m(v)m(e)32 +b(a)f(trailing)g(pathname)g(comp)s(onen)m(t,)g(lea)m(ving)h(only)e(the) +h(head.)150 5020 y Ft(t)432 b Fu(Remo)m(v)m(e)32 b(all)f(leading)h +(pathname)e(comp)s(onen)m(ts,)h(lea)m(ving)h(the)e(tail.)150 +5180 y Ft(r)432 b Fu(Remo)m(v)m(e)32 b(a)f(trailing)g(su\016x)f(of)g +(the)h(form)f(`)p Ft(.)p Fj(suffix)p Fu(',)f(lea)m(ving)j(the)f +(basename.)150 5340 y Ft(e)432 b Fu(Remo)m(v)m(e)32 b(all)f(but)f(the)h +(trailing)g(su\016x.)p eop end +%%Page: 151 157 +TeXDict begin 151 156 bop 150 -116 a Fu(Chapter)30 b(9:)41 +b(Using)30 b(History)h(In)m(teractiv)m(ely)1925 b(151)150 +299 y Ft(p)432 b Fu(Prin)m(t)30 b(the)h(new)f(command)g(but)g(do)g(not) +g(execute)i(it.)150 458 y Ft(q)432 b Fu(Quote)31 b(the)f(substituted)g +(w)m(ords,)g(escaping)h(further)e(substitutions.)150 +618 y Ft(x)432 b Fu(Quote)32 b(the)f(substituted)g(w)m(ords)f(as)i +(with)f(`)p Ft(q)p Fu(',)h(but)e(break)h(in)m(to)i(w)m(ords)d(at)i +(spaces,)h(tabs,)630 727 y(and)38 b(newlines.)66 b(The)39 +b(`)p Ft(q)p Fu(')g(and)f(`)p Ft(x)p Fu(')h(mo)s(di\014ers)f(are)h(m)m +(utually)g(exclusiv)m(e;)45 b(the)39 b(last)h(one)630 +837 y(supplied)29 b(is)i(used.)150 996 y Ft(s/)p Fj(old)p +Ft(/)p Fj(new)p Ft(/)630 1106 y Fu(Substitute)g Fr(new)39 +b Fu(for)32 b(the)g(\014rst)f(o)s(ccurrence)h(of)f Fr(old)36 +b Fu(in)31 b(the)h(ev)m(en)m(t)h(line.)46 b(An)m(y)31 +b(c)m(haracter)630 1215 y(ma)m(y)k(b)s(e)e(used)h(as)g(the)h(delimiter) +g(in)f(place)h(of)f(`)p Ft(/)p Fu('.)53 b(The)33 b(delimiter)i(ma)m(y)g +(b)s(e)f(quoted)g(in)630 1325 y Fr(old)40 b Fu(and)c +Fr(new)44 b Fu(with)36 b(a)h(single)g(bac)m(kslash.)60 +b(If)36 b(`)p Ft(&)p Fu(')h(app)s(ears)e(in)i Fr(new)p +Fu(,)g(it)h(is)e(replaced)h(b)m(y)630 1435 y Fr(old)p +Fu(.)k(A)31 b(single)g(bac)m(kslash)g(will)g(quote)g(the)g(`)p +Ft(&)p Fu('.)41 b(If)31 b Fr(old)j Fu(is)c(n)m(ull,)h(it)g(is)g(set)g +(to)g(the)g(last)g Fr(old)630 1544 y Fu(substituted,)j(or,)g(if)f(no)g +(previous)g(history)g(substitutions)g(to)s(ok)h(place,)h(the)e(last)h +Fr(string)630 1654 y Fu(in)j(a)g(!?)p Fr(string)8 b Ft([?])37 +b Fu(searc)m(h.)61 b(If)37 b Fr(new)45 b Fu(is)37 b(is)g(n)m(ull,)i +(eac)m(h)f(matc)m(hing)h Fr(old)h Fu(is)e(deleted.)61 +b(The)630 1763 y(\014nal)30 b(delimiter)h(is)g(optional)g(if)f(it)h(is) +g(the)f(last)i(c)m(haracter)f(on)g(the)f(input)g(line.)150 +1923 y Ft(&)432 b Fu(Rep)s(eat)31 b(the)f(previous)g(substitution.)150 +2082 y Ft(g)150 2192 y(a)432 b Fu(Cause)38 b(c)m(hanges)i(to)f(b)s(e)f +(applied)h(o)m(v)m(er)h(the)f(en)m(tire)g(ev)m(en)m(t)h(line.)66 +b(Used)39 b(in)f(conjunction)630 2301 y(with)30 b(`)p +Ft(s)p Fu(',)h(as)f(in)h Ft(gs/)p Fj(old)p Ft(/)p Fj(new)p +Ft(/)p Fu(,)c(or)j(with)h(`)p Ft(&)p Fu('.)150 2461 y +Ft(G)432 b Fu(Apply)30 b(the)g(follo)m(wing)i(`)p Ft(s)p +Fu(')f(or)f(`)p Ft(&)p Fu(')h(mo)s(di\014er)e(once)i(to)g(eac)m(h)h(w)m +(ord)e(in)g(the)g(ev)m(en)m(t.)p eop end +%%Page: 152 158 +TeXDict begin 152 157 bop 3614 -116 a Fu(152)150 299 +y Fp(10)80 b(Installing)52 b(Bash)150 534 y Fu(This)31 +b(c)m(hapter)h(pro)m(vides)g(basic)g(instructions)f(for)g(installing)i +(Bash)f(on)f(the)h(v)-5 b(arious)31 b(supp)s(orted)f(plat-)150 +643 y(forms.)40 b(The)28 b(distribution)h(supp)s(orts)e(the)j +Fm(gnu)f Fu(op)s(erating)h(systems,)f(nearly)h(ev)m(ery)g(v)m(ersion)f +(of)h(Unix,)150 753 y(and)d(sev)m(eral)j(non-Unix)d(systems)h(suc)m(h)g +(as)g(BeOS)g(and)f(In)m(terix.)40 b(Other)28 b(indep)s(enden)m(t)e(p)s +(orts)h(exist)i(for)150 862 y Fm(ms-dos)p Fu(,)h Fm(os/2)p +Fu(,)g(and)g(Windo)m(ws)g(platforms.)150 1103 y Fs(10.1)68 +b(Basic)45 b(Installation)150 1263 y Fu(These)30 b(are)h(installation)h +(instructions)e(for)h(Bash.)275 1398 y(The)e(simplest)i(w)m(a)m(y)g(to) +g(compile)h(Bash)e(is:)199 1532 y(1.)61 b Ft(cd)38 b +Fu(to)h(the)f(directory)h(con)m(taining)h(the)f(source)f(co)s(de)h(and) +f(t)m(yp)s(e)g(`)p Ft(./configure)p Fu(')e(to)j(con\014gure)330 +1642 y(Bash)c(for)f(y)m(our)h(system.)54 b(If)34 b(y)m(ou're)h(using)f +Ft(csh)g Fu(on)g(an)h(old)g(v)m(ersion)g(of)g(System)f(V,)h(y)m(ou)g +(migh)m(t)330 1751 y(need)21 b(to)g(t)m(yp)s(e)g(`)p +Ft(sh)30 b(./configure)p Fu(')18 b(instead)j(to)g(prev)m(en)m(t)h +Ft(csh)e Fu(from)g(trying)h(to)g(execute)h Ft(configure)330 +1861 y Fu(itself.)330 1996 y(Running)30 b Ft(configure)f +Fu(tak)m(es)k(some)e(time.)45 b(While)32 b(running,)e(it)i(prin)m(ts)f +(messages)h(telling)h(whic)m(h)330 2105 y(features)e(it)g(is)f(c)m(hec) +m(king)i(for.)199 2240 y(2.)61 b(T)m(yp)s(e)30 b(`)p +Ft(make)p Fu(')g(to)h(compile)g(Bash)g(and)e(build)h(the)g +Ft(bashbug)f Fu(bug)g(rep)s(orting)h(script.)199 2374 +y(3.)61 b(Optionally)-8 b(,)32 b(t)m(yp)s(e)e(`)p Ft(make)g(tests)p +Fu(')f(to)i(run)e(the)h(Bash)h(test)g(suite.)199 2509 +y(4.)61 b(T)m(yp)s(e)36 b(`)p Ft(make)29 b(install)p +Fu(')35 b(to)i(install)h Ft(bash)d Fu(and)h Ft(bashbug)p +Fu(.)57 b(This)35 b(will)i(also)h(install)f(the)g(man)m(ual)330 +2619 y(pages)31 b(and)f(Info)g(\014le.)275 2778 y(The)20 +b Ft(configure)f Fu(shell)i(script)g(attempts)h(to)g(guess)f(correct)i +(v)-5 b(alues)21 b(for)g(v)-5 b(arious)21 b(system-dep)s(enden)m(t)150 +2888 y(v)-5 b(ariables)31 b(used)e(during)g(compilation.)42 +b(It)31 b(uses)e(those)i(v)-5 b(alues)30 b(to)h(create)h(a)e +Ft(Makefile)e Fu(in)i(eac)m(h)i(direc-)150 2998 y(tory)k(of)g(the)g +(pac)m(k)-5 b(age)38 b(\(the)e(top)g(directory)-8 b(,)38 +b(the)e Ft(builtins)p Fu(,)f Ft(doc)p Fu(,)i(and)e Ft(support)e +Fu(directories,)39 b(eac)m(h)150 3107 y(directory)29 +b(under)d Ft(lib)p Fu(,)j(and)e(sev)m(eral)j(others\).)40 +b(It)29 b(also)g(creates)h(a)e Ft(config.h)e Fu(\014le)j(con)m(taining) +g(system-)150 3217 y(dep)s(enden)m(t)e(de\014nitions.)40 +b(Finally)-8 b(,)31 b(it)d(creates)i(a)f(shell)g(script)f(named)g +Ft(config.status)d Fu(that)k(y)m(ou)g(can)150 3326 y(run)h(in)h(the)h +(future)f(to)h(recreate)h(the)f(curren)m(t)f(con\014guration,)i(a)f +(\014le)f Ft(config.cache)e Fu(that)j(sa)m(v)m(es)h(the)150 +3436 y(results)39 b(of)g(its)h(tests)g(to)g(sp)s(eed)e(up)g +(recon\014guring,)j(and)e(a)g(\014le)g Ft(config.log)e +Fu(con)m(taining)j(compiler)150 3545 y(output)30 b(\(useful)h(mainly)g +(for)f(debugging)h Ft(configure)p Fu(\).)40 b(If)30 b(at)h(some)h(p)s +(oin)m(t)e Ft(config.cache)e Fu(con)m(tains)150 3655 +y(results)i(y)m(ou)h(don't)f(w)m(an)m(t)h(to)h(k)m(eep,)f(y)m(ou)g(ma)m +(y)g(remo)m(v)m(e)g(or)g(edit)g(it.)275 3790 y(T)-8 b(o)37 +b(\014nd)f(out)i(more)f(ab)s(out)h(the)f(options)h(and)f(argumen)m(ts)g +(that)h(the)g Ft(configure)d Fu(script)i(under-)150 3899 +y(stands,)30 b(t)m(yp)s(e)390 4034 y Ft(bash-4.2$)45 +b(./configure)g(--help)150 4169 y Fu(at)31 b(the)g(Bash)f(prompt)g(in)g +(y)m(our)g(Bash)h(source)f(directory)-8 b(.)275 4303 +y(If)34 b(y)m(ou)h(w)m(an)m(t)g(to)g(build)f(Bash)g(in)h(a)g(directory) +g(separate)g(from)f(the)h(source)g(directory)g({)g(to)g(build)150 +4413 y(for)30 b(m)m(ultiple)i(arc)m(hitectures,)g(for)e(example)h({)g +(just)f(use)h(the)f(full)h(path)f(to)h(the)g(con\014gure)f(script.)41 +b(The)150 4523 y(follo)m(wing)24 b(commands)f(will)g(build)f(bash)g(in) +g(a)h(directory)h(under)d Ft(/usr/local/build)d Fu(from)23 +b(the)g(source)150 4632 y(co)s(de)31 b(in)f Ft(/usr/local/src/bash-4.4) +o Fu(:)390 4767 y Ft(mkdir)46 b(/usr/local/build/bash-4.4)390 +4877 y(cd)h(/usr/local/build/bash-4.4)390 4986 y(bash)g +(/usr/local/src/bash-4.4)o(/con)o(fig)o(ure)390 5096 +y(make)275 5230 y Fu(See)27 b(Section)h(10.3)g([Compiling)g(F)-8 +b(or)27 b(Multiple)h(Arc)m(hitectures],)i(page)d(153,)j(for)c(more)i +(information)150 5340 y(ab)s(out)i(building)g(in)g(a)g(directory)h +(separate)h(from)e(the)g(source.)p eop end +%%Page: 153 159 +TeXDict begin 153 158 bop 150 -116 a Fu(Chapter)30 b(10:)41 +b(Installing)31 b(Bash)2356 b(153)275 299 y(If)53 b(y)m(ou)h(need)f(to) +i(do)e(un)m(usual)g(things)g(to)i(compile)g(Bash,)k(please)c(try)e(to)i +(\014gure)e(out)h(ho)m(w)150 408 y Ft(configure)47 b +Fu(could)j(c)m(hec)m(k)h(whether)e(or)g(not)h(to)h(do)e(them,)55 +b(and)49 b(mail)h(di\013s)f(or)h(instructions)f(to)150 +518 y Ft(bash-maintainers@gnu.org)24 b Fu(so)30 b(they)h(can)g(b)s(e)e +(considered)i(for)f(the)g(next)h(release.)275 658 y(The)e(\014le)g +Ft(configure.ac)d Fu(is)k(used)e(to)j(create)g Ft(configure)c +Fu(b)m(y)i(a)h(program)f(called)i(Auto)s(conf.)40 b(Y)-8 +b(ou)150 768 y(only)34 b(need)g Ft(configure.ac)d Fu(if)i(y)m(ou)i(w)m +(an)m(t)g(to)f(c)m(hange)i(it)e(or)g(regenerate)i Ft(configure)31 +b Fu(using)j(a)g(new)m(er)150 878 y(v)m(ersion)25 b(of)f(Auto)s(conf.) +39 b(If)24 b(y)m(ou)h(do)f(this,)i(mak)m(e)f(sure)f(y)m(ou)h(are)f +(using)g(Auto)s(conf)h(v)m(ersion)f(2.50)i(or)f(new)m(er.)275 +1018 y(Y)-8 b(ou)29 b(can)f(remo)m(v)m(e)i(the)f(program)g(binaries)f +(and)g(ob)5 b(ject)29 b(\014les)g(from)f(the)h(source)f(co)s(de)h +(directory)g(b)m(y)150 1127 y(t)m(yping)j(`)p Ft(make)d(clean)p +Fu('.)42 b(T)-8 b(o)32 b(also)g(remo)m(v)m(e)g(the)g(\014les)f(that)g +Ft(configure)e Fu(created)j(\(so)g(y)m(ou)g(can)f(compile)150 +1237 y(Bash)g(for)f(a)g(di\013eren)m(t)h(kind)f(of)g(computer\),)h(t)m +(yp)s(e)g(`)p Ft(make)e(distclean)p Fu('.)150 1487 y +Fs(10.2)68 b(Compilers)46 b(and)f(Options)150 1646 y +Fu(Some)28 b(systems)h(require)f(un)m(usual)f(options)i(for)f +(compilation)i(or)f(linking)f(that)h(the)g Ft(configure)d +Fu(script)150 1756 y(do)s(es)32 b(not)g(kno)m(w)g(ab)s(out.)44 +b(Y)-8 b(ou)33 b(can)f(giv)m(e)h Ft(configure)d Fu(initial)j(v)-5 +b(alues)32 b(for)g(v)-5 b(ariables)32 b(b)m(y)g(setting)h(them)150 +1865 y(in)k(the)g(en)m(vironmen)m(t.)62 b(Using)38 b(a)f +(Bourne-compatible)i(shell,)g(y)m(ou)f(can)g(do)f(that)h(on)f(the)g +(command)150 1975 y(line)31 b(lik)m(e)g(this:)390 2115 +y Ft(CC=c89)46 b(CFLAGS=-O2)f(LIBS=-lposix)g(./configure)275 +2255 y Fu(On)29 b(systems)h(that)h(ha)m(v)m(e)h(the)f +Ft(env)e Fu(program,)h(y)m(ou)h(can)g(do)f(it)h(lik)m(e)h(this:)390 +2396 y Ft(env)47 b(CPPFLAGS=-I/usr/local/in)o(clud)o(e)42 +b(LDFLAGS=-s)j(./configure)275 2536 y Fu(The)29 b(con\014guration)i +(pro)s(cess)f(uses)g(GCC)g(to)h(build)e(Bash)i(if)f(it)h(is)g(a)m(v)-5 +b(ailable.)150 2786 y Fs(10.3)68 b(Compiling)46 b(F)-11 +b(or)45 b(Multiple)g(Arc)l(hitectures)150 2945 y Fu(Y)-8 +b(ou)27 b(can)g(compile)g(Bash)g(for)f(more)h(than)f(one)h(kind)f(of)g +(computer)h(at)g(the)g(same)g(time,)h(b)m(y)e(placing)i(the)150 +3055 y(ob)5 b(ject)31 b(\014les)f(for)g(eac)m(h)i(arc)m(hitecture)f(in) +f(their)g(o)m(wn)h(directory)-8 b(.)41 b(T)-8 b(o)31 +b(do)f(this,)g(y)m(ou)h(m)m(ust)f(use)g(a)g(v)m(ersion)150 +3164 y(of)36 b Ft(make)e Fu(that)i(supp)s(orts)e(the)i +Ft(VPATH)e Fu(v)-5 b(ariable,)38 b(suc)m(h)d(as)h(GNU)g +Ft(make)p Fu(.)55 b Ft(cd)35 b Fu(to)i(the)e(directory)h(where)150 +3274 y(y)m(ou)k(w)m(an)m(t)h(the)g(ob)5 b(ject)41 b(\014les)f(and)f +(executables)j(to)e(go)h(and)f(run)e(the)j Ft(configure)c +Fu(script)j(from)g(the)150 3383 y(source)32 b(directory)h(\(see)g +(Section)f(10.1)i([Basic)f(Installation],)i(page)e(152\).)47 +b(Y)-8 b(ou)32 b(ma)m(y)h(need)f(to)g(supply)150 3493 +y(the)43 b Ft(--srcdir=PATH)c Fu(argumen)m(t)k(to)h(tell)g +Ft(configure)c Fu(where)i(the)h(source)g(\014les)g(are.)78 +b Ft(configure)150 3603 y Fu(automatically)33 b(c)m(hec)m(ks)f(for)e +(the)h(source)f(co)s(de)h(in)f(the)h(directory)f(that)h +Ft(configure)d Fu(is)j(in)f(and)f(in)h(`..'.)275 3743 +y(If)20 b(y)m(ou)h(ha)m(v)m(e)i(to)e(use)g(a)g Ft(make)f +Fu(that)i(do)s(es)e(not)i(supp)s(orts)d(the)i Ft(VPATH)e +Fu(v)-5 b(ariable,)24 b(y)m(ou)e(can)f(compile)h(Bash)150 +3853 y(for)33 b(one)h(arc)m(hitecture)h(at)f(a)g(time)g(in)f(the)h +(source)g(co)s(de)f(directory)-8 b(.)51 b(After)34 b(y)m(ou)g(ha)m(v)m +(e)h(installed)f(Bash)150 3962 y(for)c(one)h(arc)m(hitecture,)h(use)e +(`)p Ft(make)g(distclean)p Fu(')e(b)s(efore)i(recon\014guring)g(for)g +(another)g(arc)m(hitecture.)275 4102 y(Alternativ)m(ely)-8 +b(,)30 b(if)c(y)m(our)g(system)h(supp)s(orts)d(sym)m(b)s(olic)j(links,) +g(y)m(ou)g(can)g(use)f(the)g Ft(support/mkclone)150 4212 +y Fu(script)d(to)h(create)g(a)f(build)f(tree)i(whic)m(h)f(has)f(sym)m +(b)s(olic)i(links)e(bac)m(k)i(to)g(eac)m(h)g(\014le)f(in)g(the)g +(source)g(directory)-8 b(.)150 4322 y(Here's)41 b(an)f(example)i(that)f +(creates)h(a)e(build)g(directory)h(in)f(the)h(curren)m(t)f(directory)h +(from)f(a)h(source)150 4431 y(directory)31 b Ft(/usr/gnu/src/bash-2.0)p +Fu(:)390 4572 y Ft(bash)47 b(/usr/gnu/src/bash-2.0/s)o(uppo)o(rt/)o +(mkcl)o(one)41 b(-s)47 b(/usr/gnu/src/bash-2.0)42 b(.)150 +4712 y Fu(The)c Ft(mkclone)e Fu(script)i(requires)g(Bash,)i(so)f(y)m +(ou)f(m)m(ust)h(ha)m(v)m(e)g(already)g(built)f(Bash)g(for)g(at)h(least) +h(one)150 4821 y(arc)m(hitecture)32 b(b)s(efore)e(y)m(ou)h(can)f +(create)i(build)e(directories)h(for)f(other)h(arc)m(hitectures.)150 +5071 y Fs(10.4)68 b(Installation)47 b(Names)150 5230 +y Fu(By)37 b(default,)i(`)p Ft(make)29 b(install)p Fu(')35 +b(will)j(install)f(in)m(to)h Ft(/usr/local/bin)p Fu(,)d +Ft(/usr/local/man)p Fu(,)f(etc.)61 b(Y)-8 b(ou)150 5340 +y(can)35 b(sp)s(ecify)f(an)h(installation)i(pre\014x)c(other)j(than)e +Ft(/usr/local)e Fu(b)m(y)j(giving)g Ft(configure)e Fu(the)h(option)p +eop end +%%Page: 154 160 +TeXDict begin 154 159 bop 150 -116 a Fu(Chapter)30 b(10:)41 +b(Installing)31 b(Bash)2356 b(154)150 299 y Ft(--prefix=)p +Fj(PATH)p Fu(,)41 b(or)g(b)m(y)g(sp)s(ecifying)h(a)f(v)-5 +b(alue)42 b(for)f(the)h Ft(DESTDIR)d Fu(`)p Ft(make)p +Fu(')i(v)-5 b(ariable)42 b(when)f(running)150 408 y(`)p +Ft(make)29 b(install)p Fu('.)275 566 y(Y)-8 b(ou)71 b(can)h(sp)s(ecify) +f(separate)h(installation)h(pre\014xes)d(for)h(arc)m(hitecture-sp)s +(eci\014c)i(\014les)f(and)150 676 y(arc)m(hitecture-indep)s(enden)m(t) +44 b(\014les.)80 b(If)43 b(y)m(ou)h(giv)m(e)h Ft(configure)c +Fu(the)j(option)g Ft(--exec-prefix=)p Fj(PATH)p Fu(,)150 +785 y(`)p Ft(make)29 b(install)p Fu(')63 b(will)h(use)f +Fr(P)-8 b(A)g(TH)75 b Fu(as)64 b(the)g(pre\014x)e(for)i(installing)h +(programs)e(and)h(libraries.)150 895 y(Do)s(cumen)m(tation)32 +b(and)e(other)h(data)g(\014les)f(will)h(still)g(use)f(the)h(regular)f +(pre\014x.)150 1171 y Fs(10.5)68 b(Sp)t(ecifying)45 b(the)g(System)h(T) +l(yp)t(e)150 1330 y Fu(There)f(ma)m(y)g(b)s(e)f(some)i(features)f +Ft(configure)e Fu(can)i(not)g(\014gure)g(out)g(automatically)-8 +b(,)52 b(but)44 b(need)h(to)150 1440 y(determine)26 b(b)m(y)g(the)g(t)m +(yp)s(e)g(of)g(host)g(Bash)g(will)g(run)f(on.)39 b(Usually)26 +b Ft(configure)d Fu(can)k(\014gure)e(that)h(out,)i(but)150 +1549 y(if)g(it)g(prin)m(ts)f(a)h(message)g(sa)m(ying)h(it)f(can)g(not)f +(guess)h(the)g(host)f(t)m(yp)s(e,)i(giv)m(e)g(it)f(the)g +Ft(--host=TYPE)c Fu(option.)150 1659 y(`)p Ft(TYPE)p +Fu(')29 b(can)h(either)g(b)s(e)g(a)g(short)f(name)h(for)f(the)h(system) +g(t)m(yp)s(e,)h(suc)m(h)e(as)h(`)p Ft(sun4)p Fu(',)g(or)f(a)h +(canonical)i(name)150 1768 y(with)e(three)h(\014elds:)40 +b(`)p Ft(CPU-COMPANY-SYSTEM)p Fu(')26 b(\(e.g.,)32 b(`)p +Ft(i386-unknown-freebsd4.2)p Fu('\).)275 1926 y(See)e(the)h(\014le)f +Ft(support/config.sub)c Fu(for)k(the)g(p)s(ossible)g(v)-5 +b(alues)31 b(of)f(eac)m(h)i(\014eld.)150 2202 y Fs(10.6)68 +b(Sharing)45 b(Defaults)150 2361 y Fu(If)d(y)m(ou)i(w)m(an)m(t)g(to)f +(set)h(default)f(v)-5 b(alues)43 b(for)g Ft(configure)d +Fu(scripts)j(to)h(share,)i(y)m(ou)d(can)g(create)i(a)e(site)150 +2471 y(shell)48 b(script)f(called)i Ft(config.site)44 +b Fu(that)k(giv)m(es)h(default)f(v)-5 b(alues)48 b(for)f(v)-5 +b(ariables)48 b(lik)m(e)h Ft(CC)p Fu(,)j Ft(cache_)150 +2580 y(file)p Fu(,)c(and)d Ft(prefix)p Fu(.)85 b Ft(configure)43 +b Fu(lo)s(oks)j(for)f Ft(PREFIX/share/config.site)39 +b Fu(if)46 b(it)g(exists,)k(then)150 2690 y Ft(PREFIX/etc/config.site) +24 b Fu(if)31 b(it)g(exists.)42 b(Or,)30 b(y)m(ou)h(can)g(set)g(the)g +Ft(CONFIG_SITE)c Fu(en)m(vironmen)m(t)k(v)-5 b(ari-)150 +2800 y(able)40 b(to)g(the)g(lo)s(cation)h(of)e(the)h(site)g(script.)67 +b(A)40 b(w)m(arning:)58 b(the)40 b(Bash)g Ft(configure)c +Fu(lo)s(oks)k(for)f(a)h(site)150 2909 y(script,)31 b(but)e(not)i(all)g +Ft(configure)d Fu(scripts)i(do.)150 3185 y Fs(10.7)68 +b(Op)t(eration)46 b(Con)l(trols)150 3344 y Ft(configure)28 +b Fu(recognizes)k(the)e(follo)m(wing)i(options)f(to)g(con)m(trol)h(ho)m +(w)e(it)h(op)s(erates.)150 3538 y Ft(--cache-file=)p +Fj(file)630 3648 y Fu(Use)d(and)g(sa)m(v)m(e)h(the)f(results)g(of)g +(the)h(tests)f(in)g Fr(\014le)33 b Fu(instead)28 b(of)h +Ft(./config.cache)p Fu(.)36 b(Set)28 b Fr(\014le)630 +3758 y Fu(to)j Ft(/dev/null)d Fu(to)j(disable)g(cac)m(hing,)h(for)e +(debugging)g Ft(configure)p Fu(.)150 3940 y Ft(--help)192 +b Fu(Prin)m(t)30 b(a)h(summary)e(of)i(the)f(options)h(to)g +Ft(configure)p Fu(,)d(and)i(exit.)150 4123 y Ft(--quiet)150 +4232 y(--silent)150 4342 y(-q)384 b Fu(Do)31 b(not)g(prin)m(t)f +(messages)h(sa)m(ying)g(whic)m(h)g(c)m(hec)m(ks)g(are)g(b)s(eing)f +(made.)150 4525 y Ft(--srcdir=)p Fj(dir)630 4634 y Fu(Lo)s(ok)i(for)g +(the)g(Bash)g(source)h(co)s(de)f(in)g(directory)g Fr(dir)p +Fu(.)45 b(Usually)33 b Ft(configure)c Fu(can)j(deter-)630 +4744 y(mine)e(that)h(directory)g(automatically)-8 b(.)150 +4927 y Ft(--version)630 5036 y Fu(Prin)m(t)29 b(the)h(v)m(ersion)g(of)g +(Auto)s(conf)f(used)g(to)h(generate)h(the)f Ft(configure)d +Fu(script,)j(and)f(exit.)275 5230 y Ft(configure)34 b +Fu(also)k(accepts)g(some)g(other,)h(not)e(widely)g(used,)h(b)s +(oilerplate)g(options.)61 b(`)p Ft(configure)150 5340 +y(--help)p Fu(')29 b(prin)m(ts)h(the)g(complete)i(list.)p +eop end +%%Page: 155 161 +TeXDict begin 155 160 bop 150 -116 a Fu(Chapter)30 b(10:)41 +b(Installing)31 b(Bash)2356 b(155)150 299 y Fs(10.8)68 +b(Optional)46 b(F)-11 b(eatures)150 458 y Fu(The)29 b(Bash)h +Ft(configure)d Fu(has)j(a)g(n)m(um)m(b)s(er)f(of)h Ft(--enable-)p +Fj(feature)25 b Fu(options,)30 b(where)g Fr(feature)35 +b Fu(indicates)150 568 y(an)e(optional)i(part)e(of)h(Bash.)50 +b(There)33 b(are)g(also)i(sev)m(eral)g Ft(--with-)p Fj(package)29 +b Fu(options,)35 b(where)e Fr(pac)m(k)-5 b(age)150 677 +y Fu(is)32 b(something)h(lik)m(e)h(`)p Ft(bash-malloc)p +Fu(')c(or)i(`)p Ft(purify)p Fu('.)45 b(T)-8 b(o)33 b(turn)e(o\013)i +(the)f(default)h(use)f(of)g(a)h(pac)m(k)-5 b(age,)35 +b(use)150 787 y Ft(--without-)p Fj(package)p Fu(.)46 +b(T)-8 b(o)34 b(con\014gure)g(Bash)g(without)f(a)i(feature)f(that)g(is) +g(enabled)g(b)m(y)f(default,)i(use)150 897 y Ft(--disable-)p +Fj(feature)p Fu(.)275 1033 y(Here)28 b(is)g(a)h(complete)g(list)g(of)f +(the)h Ft(--enable-)c Fu(and)j Ft(--with-)e Fu(options)i(that)h(the)f +(Bash)g Ft(configure)150 1143 y Fu(recognizes.)150 1306 +y Ft(--with-afs)630 1415 y Fu(De\014ne)j(if)f(y)m(ou)h(are)f(using)g +(the)h(Andrew)e(File)j(System)e(from)g(T)-8 b(ransarc.)150 +1577 y Ft(--with-bash-malloc)630 1686 y Fu(Use)34 b(the)g(Bash)h(v)m +(ersion)f(of)g Ft(malloc)e Fu(in)i(the)g(directory)h +Ft(lib/malloc)p Fu(.)48 b(This)34 b(is)g(not)g(the)630 +1796 y(same)e Ft(malloc)e Fu(that)j(app)s(ears)e(in)g +Fm(gnu)h Fu(lib)s(c,)g(but)f(an)h(older)f(v)m(ersion)i(originally)g +(deriv)m(ed)630 1905 y(from)f(the)h(4.2)g Fm(bsd)f Ft(malloc)p +Fu(.)45 b(This)31 b Ft(malloc)g Fu(is)i(v)m(ery)f(fast,)i(but)e(w)m +(astes)h(some)g(space)g(on)630 2015 y(eac)m(h)j(allo)s(cation.)58 +b(This)34 b(option)i(is)f(enabled)g(b)m(y)g(default.)56 +b(The)34 b Ft(NOTES)g Fu(\014le)h(con)m(tains)i(a)630 +2125 y(list)29 b(of)f(systems)f(for)h(whic)m(h)g(this)g(should)e(b)s(e) +i(turned)e(o\013,)j(and)f Ft(configure)d Fu(disables)j(this)630 +2234 y(option)j(automatically)i(for)d(a)h(n)m(um)m(b)s(er)e(of)i +(systems.)150 2396 y Ft(--with-curses)630 2505 y Fu(Use)h(the)h(curses) +e(library)h(instead)g(of)h(the)f(termcap)g(library)-8 +b(.)46 b(This)32 b(should)f(b)s(e)g(supplied)630 2615 +y(if)f(y)m(our)h(system)f(has)g(an)h(inadequate)g(or)f(incomplete)i +(termcap)e(database.)150 2777 y Ft(--with-gnu-malloc)630 +2886 y Fu(A)g(synon)m(ym)g(for)g Ft(--with-bash-malloc)p +Fu(.)150 3048 y Ft(--with-installed-readlin)o(e[=)p Fj(P)o(REFI)o(X)p +Ft(])630 3157 y Fu(De\014ne)c(this)f(to)h(mak)m(e)h(Bash)f(link)f(with) +g(a)h(lo)s(cally-installed)i(v)m(ersion)e(of)g(Readline)g(rather)630 +3267 y(than)f(the)h(v)m(ersion)g(in)f Ft(lib/readline)p +Fu(.)36 b(This)25 b(w)m(orks)g(only)h(with)f(Readline)h(5.0)h(and)e +(later)630 3376 y(v)m(ersions.)46 b(If)32 b Fr(PREFIX)41 +b Fu(is)32 b Ft(yes)f Fu(or)i(not)f(supplied,)f Ft(configure)f +Fu(uses)i(the)g(v)-5 b(alues)32 b(of)h(the)630 3486 y(mak)m(e)28 +b(v)-5 b(ariables)29 b Ft(includedir)24 b Fu(and)j Ft(libdir)p +Fu(,)g(whic)m(h)g(are)h(sub)s(directories)f(of)g Ft(prefix)f +Fu(b)m(y)630 3596 y(default,)44 b(to)d(\014nd)f(the)h(installed)g(v)m +(ersion)h(of)f(Readline)g(if)g(it)g(is)g(not)g(in)g(the)g(standard)630 +3705 y(system)35 b(include)f(and)g(library)g(directories.)54 +b(If)34 b Fr(PREFIX)43 b Fu(is)35 b Ft(no)p Fu(,)g(Bash)f(links)h(with) +f(the)630 3815 y(v)m(ersion)42 b(in)e Ft(lib/readline)p +Fu(.)70 b(If)40 b Fr(PREFIX)51 b Fu(is)41 b(set)g(to)h(an)m(y)g(other)f +(v)-5 b(alue,)44 b Ft(configure)630 3924 y Fu(treats)27 +b(it)g(as)f(a)h(directory)g(pathname)f(and)f(lo)s(oks)i(for)f(the)g +(installed)h(v)m(ersion)g(of)f(Readline)630 4034 y(in)34 +b(sub)s(directories)f(of)h(that)h(directory)g(\(include)f(\014les)g(in) +g Fr(PREFIX)9 b Fu(/)p Ft(include)32 b Fu(and)i(the)630 +4144 y(library)c(in)g Fr(PREFIX)9 b Fu(/)p Ft(lib)p Fu(\).)150 +4305 y Ft(--with-purify)630 4415 y Fu(De\014ne)23 b(this)g(to)h(use)f +(the)g(Purify)f(memory)h(allo)s(cation)i(c)m(hec)m(k)m(er)g(from)e +(Rational)i(Soft)m(w)m(are.)150 4576 y Ft(--enable-minimal-config)630 +4686 y Fu(This)e(pro)s(duces)f(a)i(shell)g(with)f(minimal)h(features,)h +(close)g(to)f(the)g(historical)h(Bourne)e(shell.)275 +4849 y(There)k(are)i(sev)m(eral)g Ft(--enable-)d Fu(options)i(that)h +(alter)g(ho)m(w)f(Bash)g(is)g(compiled)h(and)e(link)m(ed,)i(rather)150 +4958 y(than)h(c)m(hanging)h(run-time)f(features.)150 +5121 y Ft(--enable-largefile)630 5230 y Fu(Enable)36 +b(supp)s(ort)f(for)g(large)j(\014les)e(\()p Ft(http:)5 +b(/)g(/)g(www)g(.)g(unix)g(.)g(org)t(/)g(v)o(ersi)o(on2)t(/)g(w)o(hats) +o(new)t(/)630 5340 y(lfs20mar)h(.)g(html)p Fu(\))35 b(if)j(the)g(op)s +(erating)g(system)g(requires)f(sp)s(ecial)i(compiler)f(options)g(to)p +eop end +%%Page: 156 162 +TeXDict begin 156 161 bop 150 -116 a Fu(Chapter)30 b(10:)41 +b(Installing)31 b(Bash)2356 b(156)630 299 y(build)33 +b(programs)g(whic)m(h)h(can)g(access)h(large)g(\014les.)51 +b(This)33 b(is)h(enabled)g(b)m(y)g(default,)h(if)f(the)630 +408 y(op)s(erating)d(system)f(pro)m(vides)h(large)g(\014le)g(supp)s +(ort.)150 570 y Ft(--enable-profiling)630 680 y Fu(This)g(builds)f(a)i +(Bash)g(binary)f(that)h(pro)s(duces)e(pro\014ling)h(information)h(to)h +(b)s(e)d(pro)s(cessed)630 790 y(b)m(y)g Ft(gprof)f Fu(eac)m(h)j(time)f +(it)g(is)f(executed.)150 951 y Ft(--enable-static-link)630 +1061 y Fu(This)37 b(causes)h(Bash)f(to)h(b)s(e)f(link)m(ed)h +(statically)-8 b(,)43 b(if)37 b Ft(gcc)g Fu(is)g(b)s(eing)g(used.)61 +b(This)37 b(could)h(b)s(e)630 1171 y(used)30 b(to)h(build)e(a)i(v)m +(ersion)g(to)g(use)f(as)g(ro)s(ot's)h(shell.)275 1334 +y(The)f(`)p Ft(minimal-config)p Fu(')d(option)k(can)g(b)s(e)f(used)f +(to)j(disable)e(all)i(of)f(the)f(follo)m(wing)i(options,)g(but)d(it)150 +1443 y(is)h(pro)s(cessed)g(\014rst,)g(so)h(individual)f(options)g(ma)m +(y)h(b)s(e)f(enabled)g(using)g(`)p Ft(enable-)p Fj(feature)p +Fu('.)275 1580 y(All)c(of)f(the)h(follo)m(wing)h(options)f(except)g +(for)g(`)p Ft(disabled-builtins)p Fu(',)c(`)p Ft(direxpand-default)p +Fu(',)h(and)150 1690 y(`)p Ft(xpg-echo-default)p Fu(')28 +b(are)33 b(enabled)f(b)m(y)g(default,)h(unless)e(the)i(op)s(erating)f +(system)h(do)s(es)e(not)i(pro)m(vide)150 1800 y(the)e(necessary)f(supp) +s(ort.)150 1963 y Ft(--enable-alias)630 2072 y Fu(Allo)m(w)41 +b(alias)g(expansion)f(and)f(include)g(the)h Ft(alias)f +Fu(and)g Ft(unalias)e Fu(builtins)j(\(see)g(Sec-)630 +2182 y(tion)31 b(6.6)g([Aliases],)i(page)e(94\).)150 +2344 y Ft(--enable-arith-for-comma)o(nd)630 2453 y Fu(Include)21 +b(supp)s(ort)g(for)g(the)i(alternate)g(form)f(of)g(the)g +Ft(for)f Fu(command)h(that)h(b)s(eha)m(v)m(es)f(lik)m(e)i(the)630 +2563 y(C)30 b(language)i Ft(for)d Fu(statemen)m(t)j(\(see)g(Section)f +(3.2.5.1)i([Lo)s(oping)d(Constructs],)h(page)g(10\).)150 +2725 y Ft(--enable-array-variables)630 2834 y Fu(Include)h(supp)s(ort)g +(for)h(one-dimensional)h(arra)m(y)f(shell)h(v)-5 b(ariables)33 +b(\(see)h(Section)g(6.7)h([Ar-)630 2944 y(ra)m(ys],)c(page)g(95\).)150 +3106 y Ft(--enable-bang-history)630 3215 y Fu(Include)36 +b(supp)s(ort)f(for)h Ft(csh)p Fu(-lik)m(e)h(history)g(substitution)f +(\(see)h(Section)g(9.3)h([History)f(In-)630 3325 y(teraction],)c(page)e +(148\).)150 3487 y Ft(--enable-brace-expansion)630 3597 +y Fu(Include)40 b Ft(csh)p Fu(-lik)m(e)h(brace)f(expansion)g(\()h +Ft(b{a,b}c)d Fq(7!)i Ft(bac)30 b(bbc)39 b Fu(\).)71 b(See)40 +b(Section)h(3.5.1)630 3706 y([Brace)32 b(Expansion],)e(page)h(23,)h +(for)e(a)g(complete)i(description.)150 3868 y Ft +(--enable-casemod-attribu)o(tes)630 3978 y Fu(Include)37 +b(supp)s(ort)g(for)g(case-mo)s(difying)i(attributes)g(in)e(the)h +Ft(declare)e Fu(builtin)i(and)f(as-)630 4087 y(signmen)m(t)29 +b(statemen)m(ts.)41 b(V)-8 b(ariables)30 b(with)e(the)g +Fr(upp)s(ercase)k Fu(attribute,)e(for)e(example,)i(will)630 +4197 y(ha)m(v)m(e)i(their)e(v)-5 b(alues)31 b(con)m(v)m(erted)h(to)f +(upp)s(ercase)e(up)s(on)g(assignmen)m(t.)150 4359 y Ft +(--enable-casemod-expansi)o(on)630 4468 y Fu(Include)h(supp)s(ort)e +(for)i(case-mo)s(difying)i(w)m(ord)e(expansions.)150 +4630 y Ft(--enable-command-timing)630 4740 y Fu(Include)43 +b(supp)s(ort)f(for)h(recognizing)i Ft(time)e Fu(as)g(a)h(reserv)m(ed)g +(w)m(ord)f(and)g(for)h(displa)m(ying)630 4849 y(timing)37 +b(statistics)h(for)e(the)g(pip)s(eline)g(follo)m(wing)i +Ft(time)d Fu(\(see)i(Section)g(3.2.3)h([Pip)s(elines],)630 +4959 y(page)24 b(8\).)39 b(This)23 b(allo)m(ws)h(pip)s(elines)f(as)h(w) +m(ell)g(as)g(shell)f(builtins)g(and)g(functions)g(to)h(b)s(e)e(timed.) +150 5121 y Ft(--enable-cond-command)630 5230 y Fu(Include)33 +b(supp)s(ort)f(for)i(the)g Ft([[)f Fu(conditional)i(command.)51 +b(\(see)34 b(Section)h(3.2.5.2)h([Condi-)630 5340 y(tional)c +(Constructs],)e(page)h(11\).)p eop end +%%Page: 157 163 +TeXDict begin 157 162 bop 150 -116 a Fu(Chapter)30 b(10:)41 +b(Installing)31 b(Bash)2356 b(157)150 299 y Ft(--enable-cond-regexp)630 +408 y Fu(Include)35 b(supp)s(ort)f(for)i(matc)m(hing)h +Fm(posix)e Fu(regular)h(expressions)g(using)f(the)h(`)p +Ft(=~)p Fu(')g(binary)630 518 y(op)s(erator)25 b(in)f(the)h +Ft([[)f Fu(conditional)h(command.)39 b(\(see)25 b(Section)h(3.2.5.2)h +([Conditional)e(Con-)630 628 y(structs],)31 b(page)g(11\).)150 +774 y Ft(--enable-coprocesses)630 883 y Fu(Include)23 +b(supp)s(ort)f(for)i(copro)s(cesses)g(and)f(the)h Ft(coproc)e +Fu(reserv)m(ed)i(w)m(ord)g(\(see)h(Section)f(3.2.3)630 +993 y([Pip)s(elines],)31 b(page)g(8\).)150 1139 y Ft(--enable-debugger) +630 1249 y Fu(Include)f(supp)s(ort)e(for)i(the)h(bash)f(debugger)g +(\(distributed)g(separately\).)150 1395 y Ft(--enable-dev-fd-stat-bro)o +(ken)630 1504 y Fu(If)c(calling)j Ft(stat)d Fu(on)g(/dev/fd/)p +Fr(N)38 b Fu(returns)25 b(di\013eren)m(t)j(results)f(than)f(calling)j +Ft(fstat)c Fu(on)i(\014le)630 1614 y(descriptor)g Fr(N)p +Fu(,)i(supply)c(this)j(option)g(to)g(enable)f(a)h(w)m(ork)-5 +b(around.)39 b(This)27 b(has)g(implications)630 1724 +y(for)j(conditional)i(commands)e(that)h(test)g(\014le)g(attributes.)150 +1870 y Ft(--enable-direxpand-defau)o(lt)630 1979 y Fu(Cause)53 +b(the)g Ft(direxpand)d Fu(shell)j(option)h(\(see)g(Section)f(4.3.2)i +([The)e(Shopt)f(Builtin],)630 2089 y(page)29 b(66\))g(to)f(b)s(e)f +(enabled)h(b)m(y)g(default)g(when)e(the)i(shell)g(starts.)41 +b(It)27 b(is)h(normally)g(disabled)630 2198 y(b)m(y)i(default.)150 +2345 y Ft(--enable-directory-stack)630 2454 y Fu(Include)j(supp)s(ort)g +(for)h(a)g Ft(csh)p Fu(-lik)m(e)h(directory)f(stac)m(k)i(and)d(the)i +Ft(pushd)p Fu(,)f Ft(popd)p Fu(,)g(and)f Ft(dirs)630 +2564 y Fu(builtins)d(\(see)h(Section)g(6.8)h([The)e(Directory)i(Stac)m +(k],)g(page)f(97\).)150 2710 y Ft(--enable-disabled-builti)o(ns)630 +2819 y Fu(Allo)m(w)40 b(builtin)e(commands)g(to)h(b)s(e)f(in)m(v)m(ok)m +(ed)i(via)f(`)p Ft(builtin)29 b(xxx)p Fu(')37 b(ev)m(en)j(after)f +Ft(xxx)e Fu(has)630 2929 y(b)s(een)31 b(disabled)g(using)g(`)p +Ft(enable)d(-n)i(xxx)p Fu('.)43 b(See)32 b(Section)g(4.2)h([Bash)e +(Builtins],)i(page)f(51,)630 3039 y(for)e(details)i(of)e(the)h +Ft(builtin)d Fu(and)i Ft(enable)e Fu(builtin)i(commands.)150 +3185 y Ft(--enable-dparen-arithmet)o(ic)630 3294 y Fu(Include)42 +b(supp)s(ort)f(for)h(the)h Ft(\(\(...)o(\)\))f Fu(command)g(\(see)i +(Section)f(3.2.5.2)i([Conditional)630 3404 y(Constructs],)30 +b(page)h(11\).)150 3550 y Ft(--enable-extended-glob)630 +3660 y Fu(Include)40 b(supp)s(ort)e(for)i(the)h(extended)f(pattern)h +(matc)m(hing)g(features)g(describ)s(ed)e(ab)s(o)m(v)m(e)630 +3769 y(under)29 b(Section)i(3.5.8.1)i([P)m(attern)e(Matc)m(hing],)i +(page)e(33.)150 3915 y Ft(--enable-extended-glob-d)o(efau)o(lt)630 +4025 y Fu(Set)40 b(the)g(default)g(v)-5 b(alue)41 b(of)f(the)g +Fr(extglob)j Fu(shell)d(option)g(describ)s(ed)f(ab)s(o)m(v)m(e)i(under) +d(Sec-)630 4134 y(tion)31 b(4.3.2)h([The)e(Shopt)g(Builtin],)h(page)g +(66,)h(to)f(b)s(e)f(enabled.)150 4281 y Ft(--enable-function-import)630 +4390 y Fu(Include)23 b(supp)s(ort)g(for)g(imp)s(orting)h(function)g +(de\014nitions)f(exp)s(orted)h(b)m(y)g(another)g(instance)630 +4500 y(of)31 b(the)f(shell)h(from)f(the)g(en)m(vironmen)m(t.)41 +b(This)30 b(option)h(is)f(enabled)h(b)m(y)f(default.)150 +4646 y Ft(--enable-glob-asciirange)o(-def)o(ault)630 +4756 y Fu(Set)h(the)g(default)f(v)-5 b(alue)31 b(of)g(the)g +Fr(globasciiranges)36 b Fu(shell)31 b(option)g(describ)s(ed)f(ab)s(o)m +(v)m(e)h(under)630 4865 y(Section)39 b(4.3.2)h([The)e(Shopt)g +(Builtin],)j(page)e(66,)i(to)f(b)s(e)d(enabled.)65 b(This)37 +b(con)m(trols)j(the)630 4975 y(b)s(eha)m(vior)21 b(of)g(c)m(haracter)h +(ranges)f(when)f(used)g(in)g(pattern)h(matc)m(hing)h(brac)m(k)m(et)g +(expressions.)150 5121 y Ft(--enable-help-builtin)630 +5230 y Fu(Include)i(the)h Ft(help)f Fu(builtin,)h(whic)m(h)g(displa)m +(ys)f(help)h(on)f(shell)h(builtins)f(and)h(v)-5 b(ariables)25 +b(\(see)630 5340 y(Section)31 b(4.2)h([Bash)e(Builtins],)i(page)f +(51\).)p eop end +%%Page: 158 164 +TeXDict begin 158 163 bop 150 -116 a Fu(Chapter)30 b(10:)41 +b(Installing)31 b(Bash)2356 b(158)150 299 y Ft(--enable-history)630 +408 y Fu(Include)29 b(command)g(history)h(and)f(the)h +Ft(fc)f Fu(and)g Ft(history)e Fu(builtin)j(commands)f(\(see)h(Sec-)630 +518 y(tion)h(9.1)g([Bash)g(History)g(F)-8 b(acilities],)34 +b(page)d(146\).)150 664 y Ft(--enable-job-control)630 +774 y Fu(This)h(enables)i(the)f(job)g(con)m(trol)i(features)e(\(see)i +(Chapter)d(7)i([Job)f(Con)m(trol],)i(page)f(107\),)630 +883 y(if)c(the)h(op)s(erating)g(system)f(supp)s(orts)f(them.)150 +1029 y Ft(--enable-multibyte)630 1139 y Fu(This)g(enables)i(supp)s(ort) +d(for)i(m)m(ultib)m(yte)h(c)m(haracters)g(if)f(the)g(op)s(erating)h +(system)f(pro)m(vides)630 1249 y(the)h(necessary)f(supp)s(ort.)150 +1395 y Ft(--enable-net-redirection)o(s)630 1504 y Fu(This)23 +b(enables)h(the)g(sp)s(ecial)h(handling)e(of)h(\014lenames)g(of)g(the)g +(form)g Ft(/dev/tcp/)p Fj(host)p Ft(/)p Fj(port)630 1614 +y Fu(and)31 b Ft(/dev/udp/)p Fj(host)p Ft(/)p Fj(port)26 +b Fu(when)31 b(used)g(in)g(redirections)h(\(see)g(Section)g(3.6)h +([Redirec-)630 1724 y(tions],)e(page)g(35\).)150 1870 +y Ft(--enable-process-substit)o(utio)o(n)630 1979 y Fu(This)49 +b(enables)i(pro)s(cess)f(substitution)g(\(see)h(Section)g(3.5.6)h([Pro) +s(cess)e(Substitution],)630 2089 y(page)31 b(32\))h(if)e(the)h(op)s +(erating)f(system)h(pro)m(vides)f(the)h(necessary)g(supp)s(ort.)150 +2235 y Ft(--enable-progcomp)630 2345 y Fu(Enable)d(the)g(programmable)g +(completion)i(facilities)g(\(see)f(Section)g(8.6)g([Programmable)630 +2454 y(Completion],)i(page)h(137\).)42 b(If)30 b(Readline)h(is)f(not)h +(enabled,)f(this)h(option)g(has)f(no)g(e\013ect.)150 +2600 y Ft(--enable-prompt-string-d)o(ecod)o(ing)630 2710 +y Fu(T)-8 b(urn)30 b(on)i(the)f(in)m(terpretation)i(of)f(a)g(n)m(um)m +(b)s(er)e(of)i(bac)m(kslash-escap)s(ed)g(c)m(haracters)i(in)d(the)630 +2819 y Ft($PS0)p Fu(,)36 b Ft($PS1)p Fu(,)g Ft($PS2)p +Fu(,)h(and)e Ft($PS4)f Fu(prompt)h(strings.)57 b(See)36 +b(Section)h(6.9)g([Con)m(trolling)g(the)630 2929 y(Prompt],)30 +b(page)h(98,)h(for)e(a)h(complete)h(list)f(of)f(prompt)g(string)g +(escap)s(e)h(sequences.)150 3075 y Ft(--enable-readline)630 +3185 y Fu(Include)d(supp)s(ort)f(for)h(command-line)h(editing)g(and)f +(history)g(with)g(the)h(Bash)g(v)m(ersion)g(of)630 3294 +y(the)i(Readline)g(library)f(\(see)h(Chapter)f(8)g([Command)g(Line)g +(Editing],)h(page)g(111\).)150 3440 y Ft(--enable-restricted)630 +3550 y Fu(Include)41 b(supp)s(ort)f(for)i(a)g Fr(restricted)g(shell)p +Fu(.)75 b(If)42 b(this)f(is)h(enabled,)j(Bash,)g(when)c(called)630 +3660 y(as)f Ft(rbash)p Fu(,)h(en)m(ters)f(a)g(restricted)h(mo)s(de.)68 +b(See)40 b(Section)h(6.10)g([The)f(Restricted)h(Shell],)630 +3769 y(page)31 b(100,)h(for)e(a)h(description)f(of)h(restricted)g(mo)s +(de.)150 3915 y Ft(--enable-select)630 4025 y Fu(Include)25 +b(the)h Ft(select)f Fu(comp)s(ound)f(command,)j(whic)m(h)e(allo)m(ws)j +(the)e(generation)h(of)f(simple)630 4134 y(men)m(us)k(\(see)h(Section)g +(3.2.5.2)i([Conditional)e(Constructs],)g(page)g(11\).)150 +4281 y Ft(--enable-separate-helpfi)o(les)630 4390 y Fu(Use)h(external)h +(\014les)f(for)g(the)g(do)s(cumen)m(tation)h(displa)m(y)m(ed)f(b)m(y)g +(the)g Ft(help)f Fu(builtin)h(instead)630 4500 y(of)f(storing)f(the)h +(text)g(in)m(ternally)-8 b(.)150 4646 y Ft(--enable-single-help-str)o +(ings)630 4756 y Fu(Store)40 b(the)g(text)h(displa)m(y)m(ed)g(b)m(y)e +(the)i Ft(help)d Fu(builtin)i(as)g(a)g(single)h(string)f(for)f(eac)m(h) +i(help)630 4865 y(topic.)54 b(This)33 b(aids)i(in)f(translating)h(the)g +(text)g(to)g(di\013eren)m(t)g(languages.)54 b(Y)-8 b(ou)35 +b(ma)m(y)g(need)630 4975 y(to)c(disable)g(this)f(if)g(y)m(our)h +(compiler)g(cannot)f(handle)g(v)m(ery)h(long)g(string)f(literals.)150 +5121 y Ft(--enable-strict-posix-de)o(faul)o(t)630 5230 +y Fu(Mak)m(e)c(Bash)f Fm(posix)p Fu(-conforman)m(t)g(b)m(y)f(default)h +(\(see)g(Section)h(6.11)g([Bash)f(POSIX)e(Mo)s(de],)630 +5340 y(page)31 b(101\).)p eop end +%%Page: 159 165 +TeXDict begin 159 164 bop 150 -116 a Fu(Chapter)30 b(10:)41 +b(Installing)31 b(Bash)2356 b(159)150 299 y Ft +(--enable-usg-echo-defaul)o(t)630 408 y Fu(A)30 b(synon)m(ym)g(for)g +Ft(--enable-xpg-echo-default)p Fu(.)150 568 y Ft +(--enable-xpg-echo-defaul)o(t)630 677 y Fu(Mak)m(e)c(the)f +Ft(echo)e Fu(builtin)i(expand)f(bac)m(kslash-escap)s(ed)h(c)m +(haracters)h(b)m(y)f(default,)h(without)630 787 y(requiring)d(the)h +Ft(-e)f Fu(option.)39 b(This)23 b(sets)h(the)g(default)g(v)-5 +b(alue)24 b(of)g(the)g Ft(xpg_echo)e Fu(shell)h(option)630 +897 y(to)28 b Ft(on)p Fu(,)g(whic)m(h)f(mak)m(es)h(the)g(Bash)f +Ft(echo)f Fu(b)s(eha)m(v)m(e)i(more)g(lik)m(e)h(the)e(v)m(ersion)h(sp)s +(eci\014ed)f(in)g(the)630 1006 y(Single)35 b(Unix)f(Sp)s +(eci\014cation,)i(v)m(ersion)e(3.)53 b(See)35 b(Section)g(4.2)g([Bash)g +(Builtins],)h(page)f(51,)630 1116 y(for)30 b(a)h(description)f(of)h +(the)f(escap)s(e)h(sequences)g(that)g Ft(echo)e Fu(recognizes.)275 +1275 y(The)f(\014le)i Ft(config-top.h)c Fu(con)m(tains)31 +b(C)d(Prepro)s(cessor)h(`)p Ft(#define)p Fu(')f(statemen)m(ts)j(for)f +(options)f(whic)m(h)150 1385 y(are)35 b(not)g(settable)i(from)d +Ft(configure)p Fu(.)51 b(Some)35 b(of)g(these)g(are)h(not)f(mean)m(t)g +(to)h(b)s(e)e(c)m(hanged;)k(b)s(ew)m(are)d(of)150 1494 +y(the)h(consequences)g(if)f(y)m(ou)h(do.)55 b(Read)36 +b(the)g(commen)m(ts)g(asso)s(ciated)h(with)e(eac)m(h)i(de\014nition)e +(for)g(more)150 1604 y(information)c(ab)s(out)f(its)h(e\013ect.)p +eop end +%%Page: 160 166 +TeXDict begin 160 165 bop 3614 -116 a Fu(160)150 299 +y Fp(App)t(endix)52 b(A)81 b(Rep)t(orting)53 b(Bugs)150 +533 y Fu(Please)33 b(rep)s(ort)e(all)h(bugs)f(y)m(ou)h(\014nd)e(in)i +(Bash.)44 b(But)32 b(\014rst,)g(y)m(ou)g(should)e(mak)m(e)j(sure)e +(that)h(it)g(really)h(is)f(a)150 643 y(bug,)d(and)g(that)h(it)g(app)s +(ears)f(in)g(the)h(latest)h(v)m(ersion)f(of)g(Bash.)40 +b(The)29 b(latest)j(v)m(ersion)e(of)f(Bash)h(is)f(alw)m(a)m(ys)150 +752 y(a)m(v)-5 b(ailable)33 b(for)d(FTP)g(from)g Ft +(ftp://ftp.gnu.org/pub/gn)o(u/ba)o(sh/)o Fu(.)275 887 +y(Once)41 b(y)m(ou)g(ha)m(v)m(e)h(determined)f(that)h(a)f(bug)g +(actually)h(exists,)j(use)c(the)g Ft(bashbug)e Fu(command)i(to)150 +996 y(submit)25 b(a)h(bug)g(rep)s(ort.)38 b(If)26 b(y)m(ou)g(ha)m(v)m +(e)h(a)f(\014x,)h(y)m(ou)f(are)g(encouraged)h(to)f(mail)h(that)f(as)g +(w)m(ell!)40 b(Suggestions)150 1106 y(and)j(`philosophical')i(bug)e +(rep)s(orts)f(ma)m(y)j(b)s(e)e(mailed)h(to)g Ft(bug-bash@gnu)11 +b(.)g(org)39 b Fu(or)k(p)s(osted)g(to)i(the)150 1215 +y(Usenet)31 b(newsgroup)e Ft(gnu.bash.bug)p Fu(.)275 +1350 y(All)i(bug)e(rep)s(orts)h(should)f(include:)225 +1484 y Fq(\017)60 b Fu(The)30 b(v)m(ersion)h(n)m(um)m(b)s(er)e(of)h +(Bash.)225 1619 y Fq(\017)60 b Fu(The)30 b(hardw)m(are)g(and)g(op)s +(erating)g(system.)225 1753 y Fq(\017)60 b Fu(The)30 +b(compiler)h(used)e(to)i(compile)h(Bash.)225 1888 y Fq(\017)60 +b Fu(A)30 b(description)h(of)f(the)h(bug)f(b)s(eha)m(viour.)225 +2022 y Fq(\017)60 b Fu(A)30 b(short)h(script)f(or)g(`recip)s(e')h(whic) +m(h)f(exercises)i(the)e(bug)g(and)g(ma)m(y)h(b)s(e)f(used)f(to)i(repro) +s(duce)e(it.)150 2182 y Ft(bashbug)d Fu(inserts)i(the)h(\014rst)f +(three)g(items)h(automatically)i(in)m(to)f(the)e(template)i(it)f(pro)m +(vides)f(for)g(\014ling)h(a)150 2291 y(bug)h(rep)s(ort.)275 +2426 y(Please)h(send)f(all)h(rep)s(orts)f(concerning)g(this)h(man)m +(ual)f(to)h Ft(bug-bash@gnu.org)p Fu(.)p eop end +%%Page: 161 167 +TeXDict begin 161 166 bop 3614 -116 a Fu(161)150 141 +y Fp(App)t(endix)58 b(B)81 b(Ma)9 b(jor)54 b(Di\013erences)d(F)-13 +b(rom)54 b(The)g(Bourne)1088 299 y(Shell)150 530 y Fu(Bash)26 +b(implemen)m(ts)h(essen)m(tially)g(the)g(same)f(grammar,)h(parameter)f +(and)g(v)-5 b(ariable)27 b(expansion,)g(redirec-)150 +640 y(tion,)i(and)e(quoting)g(as)h(the)g(Bourne)f(Shell.)40 +b(Bash)27 b(uses)g(the)h Fm(posix)f Fu(standard)f(as)i(the)g(sp)s +(eci\014cation)g(of)150 749 y(ho)m(w)34 b(these)h(features)g(are)g(to)g +(b)s(e)f(implemen)m(ted.)53 b(There)34 b(are)h(some)g(di\013erences)g +(b)s(et)m(w)m(een)g(the)g(tradi-)150 859 y(tional)e(Bourne)e(shell)h +(and)f(Bash;)i(this)f(section)g(quic)m(kly)h(details)g(the)e +(di\013erences)h(of)g(signi\014cance.)46 b(A)150 969 +y(n)m(um)m(b)s(er)24 b(of)h(these)h(di\013erences)f(are)h(explained)f +(in)g(greater)h(depth)f(in)g(previous)f(sections.)40 +b(This)25 b(section)150 1078 y(uses)33 b(the)i(v)m(ersion)f(of)g +Ft(sh)f Fu(included)g(in)h(SVR4.2)h(\(the)f(last)h(v)m(ersion)f(of)g +(the)g(historical)i(Bourne)d(shell\))150 1188 y(as)e(the)f(baseline)h +(reference.)225 1322 y Fq(\017)60 b Fu(Bash)32 b(is)h +Fm(posix)p Fu(-conforman)m(t,)g(ev)m(en)g(where)f(the)g +Fm(posix)g Fu(sp)s(eci\014cation)h(di\013ers)f(from)g(traditional)330 +1431 y Ft(sh)e Fu(b)s(eha)m(vior)g(\(see)i(Section)f(6.11)h([Bash)e +(POSIX)g(Mo)s(de],)h(page)g(101\).)225 1565 y Fq(\017)60 +b Fu(Bash)26 b(has)g(m)m(ulti-c)m(haracter)i(in)m(v)m(o)s(cation)g +(options)f(\(see)f(Section)h(6.1)g([In)m(v)m(oking)g(Bash],)h(page)e +(86\).)225 1699 y Fq(\017)60 b Fu(Bash)40 b(has)f(command-line)h +(editing)g(\(see)h(Chapter)e(8)h([Command)f(Line)g(Editing],)k(page)d +(111\))330 1809 y(and)30 b(the)g Ft(bind)g Fu(builtin.)225 +1943 y Fq(\017)60 b Fu(Bash)46 b(pro)m(vides)g(a)g(programmable)g(w)m +(ord)f(completion)i(mec)m(hanism)f(\(see)h(Section)g(8.6)g([Pro-)330 +2052 y(grammable)39 b(Completion],)i(page)e(137\),)i(and)d(builtin)g +(commands)f Ft(complete)p Fu(,)h Ft(compgen)p Fu(,)h(and)330 +2162 y Ft(compopt)p Fu(,)29 b(to)i(manipulate)g(it.)225 +2296 y Fq(\017)60 b Fu(Bash)26 b(has)f(command)h(history)f(\(see)i +(Section)f(9.1)h([Bash)f(History)h(F)-8 b(acilities],)30 +b(page)c(146\))i(and)d(the)330 2405 y Ft(history)k Fu(and)h +Ft(fc)g Fu(builtins)g(to)h(manipulate)g(it.)42 b(The)30 +b(Bash)h(history)g(list)g(main)m(tains)g(timestamp)330 +2515 y(information)g(and)e(uses)h(the)h(v)-5 b(alue)31 +b(of)f(the)h Ft(HISTTIMEFORMAT)26 b Fu(v)-5 b(ariable)32 +b(to)f(displa)m(y)f(it.)225 2649 y Fq(\017)60 b Fu(Bash)48 +b(implemen)m(ts)h Ft(csh)p Fu(-lik)m(e)g(history)f(expansion)g(\(see)h +(Section)g(9.3)h([History)f(In)m(teraction],)330 2759 +y(page)31 b(148\).)225 2892 y Fq(\017)60 b Fu(Bash)33 +b(has)g(one-dimensional)h(arra)m(y)f(v)-5 b(ariables)34 +b(\(see)g(Section)g(6.7)g([Arra)m(ys],)g(page)g(95\),)h(and)e(the)330 +3002 y(appropriate)39 b(v)-5 b(ariable)40 b(expansions)f(and)g +(assignmen)m(t)h(syn)m(tax)g(to)g(use)f(them.)67 b(Sev)m(eral)40 +b(of)g(the)330 3112 y(Bash)32 b(builtins)f(tak)m(e)j(options)e(to)h +(act)g(on)e(arra)m(ys.)46 b(Bash)32 b(pro)m(vides)g(a)g(n)m(um)m(b)s +(er)f(of)h(built-in)f(arra)m(y)330 3221 y(v)-5 b(ariables.)225 +3355 y Fq(\017)60 b Fu(The)37 b Ft($'...)n(')g Fu(quoting)g(syn)m(tax,) +j(whic)m(h)d(expands)f(ANSI-C)h(bac)m(kslash-escap)s(ed)h(c)m +(haracters)g(in)330 3465 y(the)26 b(text)h(b)s(et)m(w)m(een)g(the)g +(single)f(quotes,)i(is)e(supp)s(orted)f(\(see)i(Section)g(3.1.2.4)h +([ANSI-C)e(Quoting],)330 3574 y(page)31 b(6\).)225 3708 +y Fq(\017)60 b Fu(Bash)30 b(supp)s(orts)f(the)h Ft($"...)o(")f +Fu(quoting)i(syn)m(tax)g(to)f(do)g(lo)s(cale-sp)s(eci\014c)i +(translation)g(of)e(the)g(c)m(har-)330 3818 y(acters)g(b)s(et)m(w)m +(een)f(the)f(double)g(quotes.)41 b(The)28 b Ft(-D)p Fu(,)h +Ft(--dump-strings)p Fu(,)c(and)j Ft(--dump-po-strings)330 +3927 y Fu(in)m(v)m(o)s(cation)42 b(options)d(list)i(the)e(translatable) +i(strings)f(found)e(in)h(a)h(script)g(\(see)g(Section)g(3.1.2.5)330 +4037 y([Lo)s(cale)32 b(T)-8 b(ranslation],)31 b(page)h(7\).)225 +4171 y Fq(\017)60 b Fu(Bash)44 b(implemen)m(ts)g(the)f +Ft(!)h Fu(k)m(eyw)m(ord)g(to)g(negate)h(the)f(return)e(v)-5 +b(alue)44 b(of)g(a)g(pip)s(eline)f(\(see)h(Sec-)330 4281 +y(tion)33 b(3.2.3)i([Pip)s(elines],)f(page)g(8\).)49 +b(V)-8 b(ery)33 b(useful)f(when)g(an)h Ft(if)f Fu(statemen)m(t)j(needs) +d(to)i(act)g(only)f(if)330 4390 y(a)k(test)h(fails.)60 +b(The)36 b(Bash)g(`)p Ft(-o)30 b(pipefail)p Fu(')35 b(option)i(to)h +Ft(set)d Fu(will)i(cause)g(a)g(pip)s(eline)g(to)g(return)f(a)330 +4500 y(failure)31 b(status)f(if)h(an)m(y)f(command)g(fails.)225 +4634 y Fq(\017)60 b Fu(Bash)34 b(has)g(the)g Ft(time)f +Fu(reserv)m(ed)h(w)m(ord)g(and)f(command)h(timing)h(\(see)g(Section)g +(3.2.3)g([Pip)s(elines],)330 4743 y(page)g(8\).)52 b(The)33 +b(displa)m(y)i(of)f(the)g(timing)g(statistics)i(ma)m(y)f(b)s(e)e(con)m +(trolled)j(with)e(the)g Ft(TIMEFORMAT)330 4853 y Fu(v)-5 +b(ariable.)225 4987 y Fq(\017)60 b Fu(Bash)28 b(implemen)m(ts)g(the)f +Ft(for)j(\(\()g Fj(expr1)f Ft(;)h Fj(expr2)f Ft(;)h Fj(expr3)f +Ft(\)\))e Fu(arithmetic)h(for)g(command,)g(sim-)330 5096 +y(ilar)j(to)g(the)g(C)f(language)h(\(see)h(Section)f(3.2.5.1)i([Lo)s +(oping)d(Constructs],)h(page)g(10\).)225 5230 y Fq(\017)60 +b Fu(Bash)31 b(includes)f(the)g Ft(select)f Fu(comp)s(ound)g(command,)i +(whic)m(h)f(allo)m(ws)i(the)f(generation)g(of)g(simple)330 +5340 y(men)m(us)f(\(see)h(Section)g(3.2.5.2)i([Conditional)e +(Constructs],)g(page)g(11\).)p eop end +%%Page: 162 168 +TeXDict begin 162 167 bop 150 -116 a Fu(App)s(endix)29 +b(B:)i(Ma)5 b(jor)31 b(Di\013erences)g(F)-8 b(rom)31 +b(The)f(Bourne)g(Shell)1258 b(162)225 299 y Fq(\017)60 +b Fu(Bash)40 b(includes)g(the)g Ft([[)g Fu(comp)s(ound)e(command,)43 +b(whic)m(h)c(mak)m(es)i(conditional)h(testing)f(part)f(of)330 +408 y(the)f(shell)g(grammar)g(\(see)h(Section)f(3.2.5.2)j([Conditional) +d(Constructs],)i(page)f(11\),)i(including)330 518 y(optional)32 +b(regular)e(expression)g(matc)m(hing.)225 653 y Fq(\017)60 +b Fu(Bash)31 b(pro)m(vides)f(optional)h(case-insensitiv)m(e)i(matc)m +(hing)f(for)e(the)g Ft(case)g Fu(and)f Ft([[)h Fu(constructs.)225 +789 y Fq(\017)60 b Fu(Bash)27 b(includes)g(brace)h(expansion)f(\(see)h +(Section)g(3.5.1)i([Brace)e(Expansion],)g(page)g(23\))h(and)d(tilde)330 +898 y(expansion)k(\(see)i(Section)f(3.5.2)h([Tilde)f(Expansion],)f +(page)h(24\).)225 1034 y Fq(\017)60 b Fu(Bash)24 b(implemen)m(ts)h +(command)e(aliases)j(and)d(the)i Ft(alias)d Fu(and)i +Ft(unalias)e Fu(builtins)h(\(see)i(Section)g(6.6)330 +1143 y([Aliases],)32 b(page)f(94\).)225 1279 y Fq(\017)60 +b Fu(Bash)32 b(pro)m(vides)g(shell)g(arithmetic,)i(the)e +Ft(\(\()g Fu(comp)s(ound)e(command)i(\(see)h(Section)f(3.2.5.2)j([Con-) +330 1388 y(ditional)d(Constructs],)e(page)i(11\),)g(and)e(arithmetic)i +(expansion)e(\(see)i(Section)f(6.5)h([Shell)f(Arith-)330 +1498 y(metic],)h(page)f(93\).)225 1633 y Fq(\017)60 b +Fu(V)-8 b(ariables)31 b(presen)m(t)e(in)g(the)g(shell's)h(initial)g(en) +m(vironmen)m(t)g(are)g(automatically)i(exp)s(orted)d(to)h(c)m(hild)330 +1743 y(pro)s(cesses.)38 b(The)23 b(Bourne)g(shell)g(do)s(es)g(not)g +(normally)g(do)g(this)g(unless)g(the)g(v)-5 b(ariables)24 +b(are)f(explicitly)330 1852 y(mark)m(ed)30 b(using)g(the)h +Ft(export)e Fu(command.)225 1988 y Fq(\017)60 b Fu(Bash)26 +b(supp)s(orts)d(the)j(`)p Ft(+=)p Fu(')f(assignmen)m(t)i(op)s(erator,)g +(whic)m(h)e(app)s(ends)f(to)i(the)g(v)-5 b(alue)26 b(of)f(the)h(v)-5 +b(ariable)330 2097 y(named)30 b(on)g(the)h(left)g(hand)e(side.)225 +2233 y Fq(\017)60 b Fu(Bash)36 b(includes)g(the)g Fm(posix)f +Fu(pattern)h(remo)m(v)-5 b(al)37 b(`)p Ft(\045)p Fu(',)h(`)p +Ft(#)p Fu(',)g(`)p Ft(\045\045)p Fu(')e(and)f(`)p Ft(##)p +Fu(')h(expansions)g(to)g(remo)m(v)m(e)330 2342 y(leading)f(or)f +(trailing)h(substrings)e(from)g(v)-5 b(ariable)35 b(v)-5 +b(alues)35 b(\(see)g(Section)g(3.5.3)g([Shell)g(P)m(arameter)330 +2452 y(Expansion],)30 b(page)h(25\).)225 2587 y Fq(\017)60 +b Fu(The)46 b(expansion)g Ft(${#xx})p Fu(,)j(whic)m(h)d(returns)f(the)i +(length)f(of)h Ft(${xx})p Fu(,)i(is)e(supp)s(orted)d(\(see)j(Sec-)330 +2697 y(tion)31 b(3.5.3)h([Shell)f(P)m(arameter)g(Expansion],)f(page)i +(25\).)225 2832 y Fq(\017)60 b Fu(The)30 b(expansion)g +Ft(${var:)p Fr(o\013set)r Ft([:)p Fr(length)p Ft(]})p +Fu(,)g(whic)m(h)g(expands)g(to)h(the)g(substring)e(of)i +Ft(var)p Fu('s)e(v)-5 b(alue)330 2942 y(of)43 b(length)g +Fr(length)p Fu(,)k(b)s(eginning)42 b(at)i Fr(o\013set)p +Fu(,)j(is)c(presen)m(t)g(\(see)g(Section)h(3.5.3)h([Shell)e(P)m +(arameter)330 3051 y(Expansion],)30 b(page)h(25\).)225 +3187 y Fq(\017)60 b Fu(The)21 b(expansion)f Ft(${var/[/])p +Fr(pattern)p Ft([/)p Fr(replacemen)m(t)r Ft(]})p Fu(,)i(whic)m(h)e +(matc)m(hes)j Fr(pattern)e Fu(and)f(replaces)330 3296 +y(it)29 b(with)e Fr(replacemen)m(t)32 b Fu(in)c(the)g(v)-5 +b(alue)29 b(of)f Ft(var)p Fu(,)g(is)g(a)m(v)-5 b(ailable)31 +b(\(see)e(Section)f(3.5.3)i([Shell)f(P)m(arameter)330 +3406 y(Expansion],)h(page)h(25\).)225 3541 y Fq(\017)60 +b Fu(The)33 b(expansion)g Ft(${!)p Fj(prefix)p Ft(*})d +Fu(expansion,)k(whic)m(h)e(expands)h(to)h(the)f(names)g(of)g(all)h +(shell)f(v)-5 b(ari-)330 3651 y(ables)36 b(whose)g(names)g(b)s(egin)g +(with)g Fr(pre\014x)p Fu(,)g(is)g(a)m(v)-5 b(ailable)39 +b(\(see)e(Section)g(3.5.3)g([Shell)g(P)m(arameter)330 +3761 y(Expansion],)30 b(page)h(25\).)225 3896 y Fq(\017)60 +b Fu(Bash)22 b(has)f Fr(indirect)j Fu(v)-5 b(ariable)22 +b(expansion)g(using)f Ft(${!word})e Fu(\(see)k(Section)f(3.5.3)i +([Shell)e(P)m(arameter)330 4006 y(Expansion],)30 b(page)h(25\).)225 +4141 y Fq(\017)60 b Fu(Bash)31 b(can)f(expand)g(p)s(ositional)h +(parameters)g(b)s(ey)m(ond)e Ft($9)h Fu(using)g Ft(${)p +Fj(num)p Ft(})p Fu(.)225 4276 y Fq(\017)60 b Fu(The)27 +b Fm(posix)g Ft($\(\))g Fu(form)g(of)h(command)g(substitution)f(is)h +(implemen)m(ted)g(\(see)h(Section)f(3.5.4)i([Com-)330 +4386 y(mand)38 b(Substitution],)k(page)e(31\),)j(and)38 +b(preferred)g(to)i(the)g(Bourne)f(shell's)h Ft(``)e Fu(\(whic)m(h)i(is) +f(also)330 4495 y(implemen)m(ted)31 b(for)f(bac)m(kw)m(ards)h +(compatibilit)m(y\).)225 4631 y Fq(\017)60 b Fu(Bash)31 +b(has)f(pro)s(cess)g(substitution)g(\(see)h(Section)g(3.5.6)h([Pro)s +(cess)f(Substitution],)f(page)h(32\).)225 4766 y Fq(\017)60 +b Fu(Bash)55 b(automatically)j(assigns)e(v)-5 b(ariables)55 +b(that)h(pro)m(vide)f(information)h(ab)s(out)f(the)g(curren)m(t)330 +4876 y(user)40 b(\()p Ft(UID)p Fu(,)i Ft(EUID)p Fu(,)g(and)e +Ft(GROUPS)p Fu(\),)h(the)g(curren)m(t)f(host)g(\()p Ft(HOSTTYPE)p +Fu(,)h Ft(OSTYPE)p Fu(,)h Ft(MACHTYPE)p Fu(,)f(and)330 +4985 y Ft(HOSTNAME)p Fu(\),)55 b(and)c(the)g(instance)h(of)g(Bash)f +(that)h(is)f(running)f(\()p Ft(BASH)p Fu(,)56 b Ft(BASH_VERSION)p +Fu(,)e(and)330 5095 y Ft(BASH_VERSINFO)p Fu(\).)37 b(See)31 +b(Section)g(5.2)h([Bash)e(V)-8 b(ariables],)33 b(page)e(73,)g(for)f +(details.)225 5230 y Fq(\017)60 b Fu(The)44 b Ft(IFS)f +Fu(v)-5 b(ariable)45 b(is)f(used)f(to)i(split)f(only)g(the)g(results)g +(of)h(expansion,)i(not)d(all)h(w)m(ords)f(\(see)330 5340 +y(Section)29 b(3.5.7)h([W)-8 b(ord)29 b(Splitting],)h(page)f(32\).)41 +b(This)28 b(closes)h(a)g(longstanding)g(shell)f(securit)m(y)h(hole.)p +eop end +%%Page: 163 169 +TeXDict begin 163 168 bop 150 -116 a Fu(App)s(endix)29 +b(B:)i(Ma)5 b(jor)31 b(Di\013erences)g(F)-8 b(rom)31 +b(The)f(Bourne)g(Shell)1258 b(163)225 299 y Fq(\017)60 +b Fu(The)36 b(\014lename)h(expansion)f(brac)m(k)m(et)i(expression)f(co) +s(de)f(uses)g(`)p Ft(!)p Fu(')h(and)f(`)p Ft(^)p Fu(')h(to)g(negate)h +(the)f(set)g(of)330 408 y(c)m(haracters)32 b(b)s(et)m(w)m(een)f(the)f +(brac)m(k)m(ets.)43 b(The)29 b(Bourne)i(shell)f(uses)g(only)h(`)p +Ft(!)p Fu('.)225 536 y Fq(\017)60 b Fu(Bash)38 b(implemen)m(ts)g(the)g +(full)g(set)g(of)g Fm(posix)f Fu(\014lename)h(expansion)g(op)s +(erators,)i(including)d Fr(c)m(har-)330 646 y(acter)i(classes)p +Fu(,)j Fr(equiv)-5 b(alence)39 b(classes)p Fu(,)j(and)37 +b Fr(collating)k(sym)m(b)s(ols)g Fu(\(see)e(Section)g(3.5.8)h +([Filename)330 756 y(Expansion],)30 b(page)h(33\).)225 +883 y Fq(\017)60 b Fu(Bash)35 b(implemen)m(ts)g(extended)g(pattern)g +(matc)m(hing)h(features)f(when)f(the)h Ft(extglob)d Fu(shell)j(option) +330 993 y(is)30 b(enabled)h(\(see)g(Section)g(3.5.8.1)i([P)m(attern)f +(Matc)m(hing],)g(page)f(33\).)225 1121 y Fq(\017)60 b +Fu(It)22 b(is)g(p)s(ossible)g(to)h(ha)m(v)m(e)g(a)f(v)-5 +b(ariable)23 b(and)f(a)g(function)g(with)g(the)g(same)g(name;)j +Ft(sh)d Fu(do)s(es)g(not)g(separate)330 1230 y(the)31 +b(t)m(w)m(o)g(name)g(spaces.)225 1358 y Fq(\017)60 b +Fu(Bash)30 b(functions)e(are)i(p)s(ermitted)f(to)h(ha)m(v)m(e)h(lo)s +(cal)g(v)-5 b(ariables)30 b(using)f(the)g Ft(local)f +Fu(builtin,)i(and)e(th)m(us)330 1468 y(useful)i(recursiv)m(e)g +(functions)g(ma)m(y)h(b)s(e)f(written)g(\(see)i(Section)f(4.2)g([Bash)g +(Builtins],)g(page)h(51\).)225 1596 y Fq(\017)60 b Fu(V)-8 +b(ariable)25 b(assignmen)m(ts)g(preceding)e(commands)h(a\013ect)h(only) +f(that)g(command,)h(ev)m(en)f(builtins)g(and)330 1705 +y(functions)36 b(\(see)h(Section)g(3.7.4)h([En)m(vironmen)m(t],)h(page) +e(41\).)60 b(In)35 b Ft(sh)p Fu(,)j(all)f(v)-5 b(ariable)37 +b(assignmen)m(ts)330 1815 y(preceding)30 b(commands)g(are)h(global)h +(unless)d(the)i(command)f(is)h(executed)g(from)f(the)g(\014le)h +(system.)225 1943 y Fq(\017)60 b Fu(Bash)44 b(p)s(erforms)e(\014lename) +i(expansion)f(on)h(\014lenames)g(sp)s(eci\014ed)f(as)h(op)s(erands)e +(to)j(input)e(and)330 2052 y(output)30 b(redirection)h(op)s(erators)g +(\(see)g(Section)g(3.6)h([Redirections],)g(page)f(35\).)225 +2180 y Fq(\017)60 b Fu(Bash)29 b(con)m(tains)h(the)f(`)p +Ft(<>)p Fu(')f(redirection)i(op)s(erator,)f(allo)m(wing)i(a)e(\014le)g +(to)g(b)s(e)f(op)s(ened)g(for)h(b)s(oth)f(read-)330 2290 +y(ing)35 b(and)f(writing,)i(and)e(the)h(`)p Ft(&>)p Fu(')g(redirection) +g(op)s(erator,)h(for)f(directing)g(standard)f(output)h(and)330 +2399 y(standard)30 b(error)g(to)h(the)f(same)h(\014le)f(\(see)i +(Section)f(3.6)g([Redirections],)h(page)g(35\).)225 2527 +y Fq(\017)60 b Fu(Bash)21 b(includes)f(the)h(`)p Ft(<<<)p +Fu(')g(redirection)g(op)s(erator,)i(allo)m(wing)g(a)e(string)f(to)i(b)s +(e)e(used)g(as)h(the)g(standard)330 2637 y(input)29 b(to)j(a)e +(command.)225 2765 y Fq(\017)60 b Fu(Bash)32 b(implemen)m(ts)f(the)h(`) +p Ft([n]<&)p Fj(word)p Fu(')d(and)i(`)p Ft([n]>&)p Fj(word)p +Fu(')e(redirection)j(op)s(erators,)g(whic)m(h)f(mo)m(v)m(e)330 +2874 y(one)g(\014le)f(descriptor)g(to)h(another.)225 +3002 y Fq(\017)60 b Fu(Bash)25 b(treats)h(a)f(n)m(um)m(b)s(er)e(of)i +(\014lenames)g(sp)s(ecially)g(when)f(they)h(are)g(used)f(in)g +(redirection)i(op)s(erators)330 3112 y(\(see)31 b(Section)h(3.6)f +([Redirections],)h(page)f(35\).)225 3240 y Fq(\017)60 +b Fu(Bash)33 b(can)f(op)s(en)g(net)m(w)m(ork)i(connections)f(to)h +(arbitrary)e(mac)m(hines)h(and)f(services)h(with)f(the)h(redi-)330 +3349 y(rection)e(op)s(erators)g(\(see)g(Section)g(3.6)h +([Redirections],)g(page)f(35\).)225 3477 y Fq(\017)60 +b Fu(The)29 b Ft(noclobber)e Fu(option)j(is)g(a)m(v)-5 +b(ailable)32 b(to)e(a)m(v)m(oid)h(o)m(v)m(erwriting)g(existing)g +(\014les)e(with)h(output)f(redi-)330 3587 y(rection)39 +b(\(see)h(Section)f(4.3.1)h([The)e(Set)h(Builtin],)i(page)e(62\).)66 +b(The)38 b(`)p Ft(>|)p Fu(')h(redirection)g(op)s(erator)330 +3696 y(ma)m(y)31 b(b)s(e)f(used)f(to)i(o)m(v)m(erride)h +Ft(noclobber)p Fu(.)225 3824 y Fq(\017)60 b Fu(The)34 +b(Bash)g Ft(cd)g Fu(and)f Ft(pwd)g Fu(builtins)h(\(see)h(Section)g(4.1) +g([Bourne)g(Shell)f(Builtins],)h(page)g(44\))h(eac)m(h)330 +3934 y(tak)m(e)c Ft(-L)e Fu(and)f Ft(-P)h Fu(options)h(to)g(switc)m(h)g +(b)s(et)m(w)m(een)g(logical)i(and)c(ph)m(ysical)i(mo)s(des.)225 +4061 y Fq(\017)60 b Fu(Bash)25 b(allo)m(ws)h(a)g(function)e(to)i(o)m(v) +m(erride)g(a)g(builtin)e(with)h(the)g(same)g(name,)i(and)d(pro)m(vides) +h(access)h(to)330 4171 y(that)34 b(builtin's)f(functionalit)m(y)h +(within)f(the)g(function)g(via)h(the)f Ft(builtin)f Fu(and)g +Ft(command)g Fu(builtins)330 4281 y(\(see)f(Section)h(4.2)f([Bash)g +(Builtins],)g(page)g(51\).)225 4408 y Fq(\017)60 b Fu(The)35 +b Ft(command)e Fu(builtin)i(allo)m(ws)i(selectiv)m(e)h(disabling)e(of)f +(functions)g(when)g(command)g(lo)s(okup)g(is)330 4518 +y(p)s(erformed)29 b(\(see)i(Section)g(4.2)h([Bash)f(Builtins],)g(page)g +(51\).)225 4646 y Fq(\017)60 b Fu(Individual)23 b(builtins)g(ma)m(y)i +(b)s(e)e(enabled)h(or)g(disabled)g(using)f(the)h Ft(enable)f +Fu(builtin)g(\(see)i(Section)g(4.2)330 4756 y([Bash)31 +b(Builtins],)g(page)g(51\).)225 4883 y Fq(\017)60 b Fu(The)26 +b(Bash)h Ft(exec)e Fu(builtin)h(tak)m(es)i(additional)f(options)g(that) +g(allo)m(w)h(users)d(to)j(con)m(trol)g(the)e(con)m(ten)m(ts)330 +4993 y(of)35 b(the)f(en)m(vironmen)m(t)h(passed)f(to)h(the)g(executed)g +(command,)h(and)d(what)i(the)f(zeroth)h(argumen)m(t)330 +5103 y(to)c(the)g(command)f(is)g(to)h(b)s(e)f(\(see)h(Section)h(4.1)f +([Bourne)f(Shell)h(Builtins],)g(page)g(44\).)225 5230 +y Fq(\017)60 b Fu(Shell)29 b(functions)g(ma)m(y)h(b)s(e)f(exp)s(orted)g +(to)h(c)m(hildren)f(via)h(the)g(en)m(vironmen)m(t)g(using)f +Ft(export)f(-f)h Fu(\(see)330 5340 y(Section)i(3.3)h([Shell)e(F)-8 +b(unctions],)32 b(page)f(18\).)p eop end +%%Page: 164 170 +TeXDict begin 164 169 bop 150 -116 a Fu(App)s(endix)29 +b(B:)i(Ma)5 b(jor)31 b(Di\013erences)g(F)-8 b(rom)31 +b(The)f(Bourne)g(Shell)1258 b(164)225 299 y Fq(\017)60 +b Fu(The)40 b(Bash)h Ft(export)p Fu(,)h Ft(readonly)p +Fu(,)f(and)g Ft(declare)d Fu(builtins)j(can)g(tak)m(e)h(a)f +Ft(-f)f Fu(option)i(to)f(act)h(on)330 408 y(shell)30 +b(functions,)f(a)h Ft(-p)f Fu(option)g(to)i(displa)m(y)e(v)-5 +b(ariables)30 b(with)f(v)-5 b(arious)30 b(attributes)g(set)g(in)f(a)h +(format)330 518 y(that)g(can)g(b)s(e)f(used)g(as)g(shell)h(input,)f(a)h +Ft(-n)f Fu(option)h(to)g(remo)m(v)m(e)h(v)-5 b(arious)30 +b(v)-5 b(ariable)30 b(attributes,)h(and)330 628 y(`)p +Ft(name=value)p Fu(')d(argumen)m(ts)j(to)g(set)g(v)-5 +b(ariable)31 b(attributes)g(and)f(v)-5 b(alues)30 b(sim)m(ultaneously) +-8 b(.)225 765 y Fq(\017)60 b Fu(The)42 b(Bash)h Ft(hash)f +Fu(builtin)g(allo)m(ws)j(a)e(name)g(to)g(b)s(e)f(asso)s(ciated)j(with)d +(an)h(arbitrary)f(\014lename,)330 874 y(ev)m(en)30 b(when)e(that)h +(\014lename)g(cannot)h(b)s(e)e(found)g(b)m(y)h(searc)m(hing)g(the)g +Ft($PATH)p Fu(,)g(using)f(`)p Ft(hash)h(-p)p Fu(')g(\(see)330 +984 y(Section)i(4.1)h([Bourne)e(Shell)g(Builtins],)h(page)h(44\).)225 +1121 y Fq(\017)60 b Fu(Bash)27 b(includes)f(a)i Ft(help)d +Fu(builtin)i(for)f(quic)m(k)h(reference)h(to)f(shell)g(facilities)i +(\(see)f(Section)g(4.2)g([Bash)330 1230 y(Builtins],)j(page)g(51\).)225 +1367 y Fq(\017)60 b Fu(The)42 b Ft(printf)g Fu(builtin)g(is)h(a)m(v)-5 +b(ailable)45 b(to)f(displa)m(y)f(formatted)g(output)g(\(see)h(Section)g +(4.2)g([Bash)330 1477 y(Builtins],)31 b(page)g(51\).)225 +1614 y Fq(\017)60 b Fu(The)26 b(Bash)h Ft(read)f Fu(builtin)g(\(see)i +(Section)g(4.2)g([Bash)f(Builtins],)h(page)g(51\))g(will)f(read)g(a)g +(line)g(ending)330 1724 y(in)i(`)p Ft(\\)p Fu(')h(with)f(the)g +Ft(-r)g Fu(option,)i(and)d(will)i(use)f(the)h Ft(REPLY)e +Fu(v)-5 b(ariable)30 b(as)g(a)f(default)h(if)f(no)h(non-option)330 +1833 y(argumen)m(ts)h(are)h(supplied.)42 b(The)30 b(Bash)i +Ft(read)e Fu(builtin)g(also)j(accepts)f(a)g(prompt)e(string)h(with)g +(the)330 1943 y Ft(-p)c Fu(option)h(and)f(will)g(use)h(Readline)g(to)g +(obtain)g(the)g(line)f(when)g(giv)m(en)h(the)g Ft(-e)f +Fu(option.)40 b(The)27 b Ft(read)330 2052 y Fu(builtin)h(also)i(has)e +(additional)i(options)f(to)g(con)m(trol)h(input:)39 b(the)29 +b Ft(-s)f Fu(option)h(will)g(turn)e(o\013)j(ec)m(hoing)330 +2162 y(of)f(input)f(c)m(haracters)j(as)e(they)g(are)h(read,)f(the)g +Ft(-t)g Fu(option)g(will)h(allo)m(w)g Ft(read)e Fu(to)i(time)g(out)f +(if)g(input)330 2271 y(do)s(es)i(not)h(arriv)m(e)g(within)f(a)h(sp)s +(eci\014ed)f(n)m(um)m(b)s(er)f(of)i(seconds,)g(the)f +Ft(-n)g Fu(option)h(will)g(allo)m(w)h(reading)330 2381 +y(only)38 b(a)g(sp)s(eci\014ed)f(n)m(um)m(b)s(er)f(of)i(c)m(haracters)h +(rather)e(than)g(a)h(full)g(line,)i(and)d(the)h Ft(-d)f +Fu(option)h(will)330 2491 y(read)30 b(un)m(til)h(a)g(particular)f(c)m +(haracter)i(rather)f(than)f(newline.)225 2628 y Fq(\017)60 +b Fu(The)33 b Ft(return)e Fu(builtin)i(ma)m(y)g(b)s(e)g(used)f(to)i(ab) +s(ort)f(execution)h(of)f(scripts)g(executed)h(with)f(the)g +Ft(.)g Fu(or)330 2737 y Ft(source)c Fu(builtins)g(\(see)j(Section)f +(4.1)g([Bourne)g(Shell)f(Builtins],)h(page)g(44\).)225 +2874 y Fq(\017)60 b Fu(Bash)43 b(includes)g(the)g Ft(shopt)f +Fu(builtin,)k(for)d(\014ner)f(con)m(trol)j(of)e(shell)h(optional)g +(capabilities)h(\(see)330 2984 y(Section)c(4.3.2)g([The)f(Shopt)f +(Builtin],)k(page)d(66\),)k(and)39 b(allo)m(ws)i(these)f(options)h(to)f +(b)s(e)f(set)i(and)330 3093 y(unset)30 b(at)h(shell)g(in)m(v)m(o)s +(cation)h(\(see)f(Section)h(6.1)f([In)m(v)m(oking)g(Bash],)g(page)h +(86\).)225 3230 y Fq(\017)60 b Fu(Bash)45 b(has)f(m)m(uc)m(h)g(more)h +(optional)h(b)s(eha)m(vior)e(con)m(trollable)j(with)e(the)f +Ft(set)g Fu(builtin)g(\(see)h(Sec-)330 3340 y(tion)31 +b(4.3.1)h([The)e(Set)h(Builtin],)g(page)g(62\).)225 3477 +y Fq(\017)60 b Fu(The)31 b(`)p Ft(-x)p Fu(')g(\()p Ft(xtrace)p +Fu(\))g(option)h(displa)m(ys)f(commands)h(other)f(than)h(simple)f +(commands)g(when)g(p)s(er-)330 3587 y(forming)f(an)g(execution)i(trace) +f(\(see)h(Section)f(4.3.1)h([The)e(Set)h(Builtin],)g(page)g(62\).)225 +3724 y Fq(\017)60 b Fu(The)28 b Ft(test)g Fu(builtin)h(\(see)h(Section) +f(4.1)h([Bourne)f(Shell)g(Builtins],)h(page)g(44\))g(is)f(sligh)m(tly)h +(di\013eren)m(t,)330 3833 y(as)23 b(it)g(implemen)m(ts)f(the)h +Fm(posix)f Fu(algorithm,)j(whic)m(h)d(sp)s(eci\014es)g(the)h(b)s(eha)m +(vior)f(based)g(on)h(the)f(n)m(um)m(b)s(er)330 3943 y(of)31 +b(argumen)m(ts.)225 4080 y Fq(\017)60 b Fu(Bash)31 b(includes)g(the)h +Ft(caller)d Fu(builtin,)j(whic)m(h)f(displa)m(ys)g(the)g(con)m(text)i +(of)f(an)m(y)g(activ)m(e)h(subroutine)330 4189 y(call)28 +b(\(a)f(shell)f(function)h(or)f(a)h(script)f(executed)h(with)f(the)h +Ft(.)f Fu(or)g Ft(source)f Fu(builtins\).)39 b(This)26 +b(supp)s(orts)330 4299 y(the)31 b(bash)e(debugger.)225 +4436 y Fq(\017)60 b Fu(The)42 b Ft(trap)f Fu(builtin)h(\(see)i(Section) +f(4.1)h([Bourne)e(Shell)g(Builtins],)47 b(page)c(44\))h(allo)m(ws)g(a)e +Ft(DEBUG)330 4545 y Fu(pseudo-signal)c(sp)s(eci\014cation,)i(similar)e +(to)g Ft(EXIT)p Fu(.)62 b(Commands)36 b(sp)s(eci\014ed)h(with)g(a)h +Ft(DEBUG)e Fu(trap)330 4655 y(are)k(executed)g(b)s(efore)f(ev)m(ery)h +(simple)f(command,)j Ft(for)c Fu(command,)k Ft(case)c +Fu(command,)k Ft(select)330 4765 y Fu(command,)35 b(ev)m(ery)g +(arithmetic)g Ft(for)e Fu(command,)i(and)f(b)s(efore)g(the)g(\014rst)f +(command)h(executes)h(in)330 4874 y(a)29 b(shell)g(function.)40 +b(The)28 b Ft(DEBUG)g Fu(trap)g(is)h(not)g(inherited)f(b)m(y)h(shell)g +(functions)f(unless)g(the)h(function)330 4984 y(has)35 +b(b)s(een)g(giv)m(en)i(the)f Ft(trace)e Fu(attribute)i(or)g(the)g +Ft(functrace)d Fu(option)j(has)f(b)s(een)g(enabled)g(using)330 +5093 y(the)28 b Ft(shopt)e Fu(builtin.)39 b(The)27 b +Ft(extdebug)f Fu(shell)i(option)g(has)f(additional)h(e\013ects)h(on)f +(the)g Ft(DEBUG)e Fu(trap.)330 5230 y(The)21 b Ft(trap)e +Fu(builtin)i(\(see)h(Section)g(4.1)g([Bourne)f(Shell)g(Builtins],)j +(page)e(44\))g(allo)m(ws)g(an)f Ft(ERR)f Fu(pseudo-)330 +5340 y(signal)30 b(sp)s(eci\014cation,)h(similar)f(to)g +Ft(EXIT)f Fu(and)g Ft(DEBUG)p Fu(.)39 b(Commands)28 b(sp)s(eci\014ed)h +(with)g(an)g Ft(ERR)g Fu(trap)p eop end +%%Page: 165 171 +TeXDict begin 165 170 bop 150 -116 a Fu(App)s(endix)29 +b(B:)i(Ma)5 b(jor)31 b(Di\013erences)g(F)-8 b(rom)31 +b(The)f(Bourne)g(Shell)1258 b(165)330 299 y(are)40 b(executed)g(after)g +(a)f(simple)h(command)f(fails,)j(with)d(a)h(few)f(exceptions.)68 +b(The)39 b Ft(ERR)g Fu(trap)g(is)330 408 y(not)g(inherited)f(b)m(y)h +(shell)g(functions)f(unless)g(the)h Ft(-o)29 b(errtrace)37 +b Fu(option)i(to)g(the)g Ft(set)f Fu(builtin)g(is)330 +518 y(enabled.)330 650 y(The)g Ft(trap)g Fu(builtin)h(\(see)g(Section)h +(4.1)g([Bourne)f(Shell)g(Builtins],)i(page)f(44\))g(allo)m(ws)g(a)g +Ft(RETURN)330 759 y Fu(pseudo-signal)35 b(sp)s(eci\014cation,)j +(similar)d(to)h Ft(EXIT)e Fu(and)g Ft(DEBUG)p Fu(.)54 +b(Commands)34 b(sp)s(eci\014ed)g(with)h(an)330 869 y +Ft(RETURN)k Fu(trap)i(are)g(executed)h(b)s(efore)e(execution)i(resumes) +e(after)h(a)g(shell)g(function)g(or)g(a)g(shell)330 978 +y(script)36 b(executed)g(with)g Ft(.)f Fu(or)h Ft(source)e +Fu(returns.)56 b(The)35 b Ft(RETURN)f Fu(trap)i(is)g(not)g(inherited)f +(b)m(y)h(shell)330 1088 y(functions)k(unless)h(the)g(function)f(has)h +(b)s(een)f(giv)m(en)i(the)f Ft(trace)e Fu(attribute)j(or)e(the)h +Ft(functrace)330 1198 y Fu(option)31 b(has)f(b)s(een)g(enabled)g(using) +g(the)g Ft(shopt)f Fu(builtin.)225 1329 y Fq(\017)60 +b Fu(The)30 b(Bash)g Ft(type)f Fu(builtin)h(is)g(more)g(extensiv)m(e)i +(and)d(giv)m(es)j(more)e(information)h(ab)s(out)f(the)g(names)330 +1439 y(it)h(\014nds)e(\(see)i(Section)g(4.2)h([Bash)e(Builtins],)i +(page)f(51\).)225 1570 y Fq(\017)60 b Fu(The)27 b(Bash)h +Ft(umask)e Fu(builtin)h(p)s(ermits)g(a)h Ft(-p)f Fu(option)h(to)h +(cause)f(the)g(output)f(to)h(b)s(e)f(displa)m(y)m(ed)h(in)g(the)330 +1680 y(form)i(of)h(a)g Ft(umask)f Fu(command)g(that)i(ma)m(y)f(b)s(e)f +(reused)g(as)h(input)f(\(see)i(Section)f(4.1)h([Bourne)f(Shell)330 +1789 y(Builtins],)g(page)g(44\).)225 1921 y Fq(\017)60 +b Fu(Bash)34 b(implemen)m(ts)h(a)g Ft(csh)p Fu(-lik)m(e)g(directory)f +(stac)m(k,)j(and)d(pro)m(vides)g(the)g Ft(pushd)p Fu(,)g +Ft(popd)p Fu(,)g(and)g Ft(dirs)330 2030 y Fu(builtins)g(to)i +(manipulate)f(it)h(\(see)f(Section)h(6.8)g([The)f(Directory)h(Stac)m +(k],)i(page)d(97\).)56 b(Bash)35 b(also)330 2140 y(mak)m(es)c(the)g +(directory)g(stac)m(k)g(visible)g(as)g(the)f(v)-5 b(alue)31 +b(of)g(the)f Ft(DIRSTACK)f Fu(shell)h(v)-5 b(ariable.)225 +2272 y Fq(\017)60 b Fu(Bash)28 b(in)m(terprets)h(sp)s(ecial)g(bac)m +(kslash-escap)s(ed)g(c)m(haracters)g(in)f(the)h(prompt)e(strings)h +(when)f(in)m(ter-)330 2381 y(activ)m(e)33 b(\(see)e(Section)g(6.9)h +([Con)m(trolling)f(the)g(Prompt],)f(page)h(98\).)225 +2513 y Fq(\017)60 b Fu(The)46 b(Bash)h(restricted)g(mo)s(de)f(is)h +(more)f(useful)g(\(see)h(Section)h(6.10)g([The)e(Restricted)i(Shell],) +330 2622 y(page)31 b(100\);)h(the)f(SVR4.2)g(shell)g(restricted)g(mo)s +(de)f(is)g(to)s(o)h(limited.)225 2754 y Fq(\017)60 b +Fu(The)30 b Ft(disown)f Fu(builtin)h(can)h(remo)m(v)m(e)h(a)f(job)f +(from)g(the)h(in)m(ternal)g(shell)g(job)f(table)i(\(see)f(Section)h +(7.2)330 2863 y([Job)e(Con)m(trol)h(Builtins],)g(page)g(108\))g(or)g +(suppress)d(the)i(sending)g(of)g Ft(SIGHUP)e Fu(to)j(a)g(job)f(when)f +(the)330 2973 y(shell)i(exits)g(as)f(the)h(result)f(of)h(a)f +Ft(SIGHUP)p Fu(.)225 3104 y Fq(\017)60 b Fu(Bash)31 b(includes)f(a)g(n) +m(um)m(b)s(er)f(of)i(features)g(to)g(supp)s(ort)d(a)j(separate)g +(debugger)f(for)h(shell)f(scripts.)225 3236 y Fq(\017)60 +b Fu(The)28 b(SVR4.2)h(shell)f(has)g(t)m(w)m(o)i(privilege-related)g +(builtins)e(\()p Ft(mldmode)e Fu(and)i Ft(priv)p Fu(\))f(not)i(presen)m +(t)f(in)330 3346 y(Bash.)225 3477 y Fq(\017)60 b Fu(Bash)31 +b(do)s(es)f(not)g(ha)m(v)m(e)i(the)e Ft(stop)g Fu(or)g +Ft(newgrp)f Fu(builtins.)225 3609 y Fq(\017)60 b Fu(Bash)31 +b(do)s(es)f(not)g(use)g(the)h Ft(SHACCT)d Fu(v)-5 b(ariable)32 +b(or)e(p)s(erform)f(shell)i(accoun)m(ting.)225 3740 y +Fq(\017)60 b Fu(The)30 b(SVR4.2)h Ft(sh)f Fu(uses)g(a)g +Ft(TIMEOUT)f Fu(v)-5 b(ariable)31 b(lik)m(e)h(Bash)e(uses)g +Ft(TMOUT)p Fu(.)150 3894 y(More)h(features)g(unique)e(to)i(Bash)g(ma)m +(y)g(b)s(e)f(found)f(in)h(Chapter)f(6)i([Bash)g(F)-8 +b(eatures],)32 b(page)f(86.)150 4128 y Fs(B.1)67 b(Implemen)l(tation)48 +b(Di\013erences)e(F)-11 b(rom)44 b(The)h(SVR4.2)g(Shell)150 +4288 y Fu(Since)33 b(Bash)h(is)f(a)g(completely)i(new)e(implemen)m +(tation,)j(it)e(do)s(es)e(not)i(su\013er)e(from)h(man)m(y)g(of)h(the)f +(limi-)150 4397 y(tations)f(of)e(the)h(SVR4.2)g(shell.)41 +b(F)-8 b(or)31 b(instance:)225 4529 y Fq(\017)60 b Fu(Bash)32 +b(do)s(es)f(not)h(fork)f(a)h(subshell)e(when)h(redirecting)h(in)m(to)h +(or)e(out)h(of)g(a)g(shell)f(con)m(trol)i(structure)330 +4639 y(suc)m(h)d(as)h(an)f Ft(if)g Fu(or)g Ft(while)f +Fu(statemen)m(t.)225 4770 y Fq(\017)60 b Fu(Bash)29 b(do)s(es)f(not)h +(allo)m(w)h(un)m(balanced)f(quotes.)41 b(The)28 b(SVR4.2)h(shell)g +(will)g(silen)m(tly)i(insert)d(a)h(needed)330 4880 y(closing)g(quote)g +(at)f Ft(EOF)f Fu(under)g(certain)h(circumstances.)41 +b(This)27 b(can)h(b)s(e)g(the)g(cause)g(of)g(some)h(hard-)330 +4989 y(to-\014nd)h(errors.)225 5121 y Fq(\017)60 b Fu(The)45 +b(SVR4.2)h(shell)f(uses)g(a)g(baro)s(que)g(memory)g(managemen)m(t)i(sc) +m(heme)e(based)g(on)g(trapping)330 5230 y Ft(SIGSEGV)p +Fu(.)57 b(If)35 b(the)i(shell)f(is)h(started)g(from)e(a)i(pro)s(cess)f +(with)g Ft(SIGSEGV)e Fu(blo)s(c)m(k)m(ed)k(\(e.g.,)h(b)m(y)d(using)330 +5340 y(the)31 b Ft(system\(\))d Fu(C)i(library)g(function)g(call\),)i +(it)f(misb)s(eha)m(v)m(es)g(badly)-8 b(.)p eop end +%%Page: 166 172 +TeXDict begin 166 171 bop 150 -116 a Fu(App)s(endix)29 +b(B:)i(Ma)5 b(jor)31 b(Di\013erences)g(F)-8 b(rom)31 +b(The)f(Bourne)g(Shell)1258 b(166)225 299 y Fq(\017)60 +b Fu(In)30 b(a)i(questionable)g(attempt)g(at)g(securit)m(y)-8 +b(,)33 b(the)e(SVR4.2)h(shell,)g(when)e(in)m(v)m(ok)m(ed)j(without)e +(the)h Ft(-p)330 408 y Fu(option,)39 b(will)d(alter)i(its)e(real)h(and) +f(e\013ectiv)m(e)j Fm(uid)d Fu(and)g Fm(gid)h Fu(if)f(they)h(are)f +(less)h(than)f(some)h(magic)330 518 y(threshold)30 b(v)-5 +b(alue,)31 b(commonly)g(100.)42 b(This)29 b(can)i(lead)g(to)g(unexp)s +(ected)f(results.)225 653 y Fq(\017)60 b Fu(The)30 b(SVR4.2)h(shell)g +(do)s(es)f(not)g(allo)m(w)i(users)e(to)h(trap)f Ft(SIGSEGV)p +Fu(,)f Ft(SIGALRM)p Fu(,)f(or)j Ft(SIGCHLD)p Fu(.)225 +787 y Fq(\017)60 b Fu(The)34 b(SVR4.2)h(shell)g(do)s(es)g(not)f(allo)m +(w)j(the)d Ft(IFS)p Fu(,)h Ft(MAILCHECK)p Fu(,)f Ft(PATH)p +Fu(,)h Ft(PS1)p Fu(,)g(or)f Ft(PS2)g Fu(v)-5 b(ariables)35 +b(to)330 897 y(b)s(e)30 b(unset.)225 1031 y Fq(\017)60 +b Fu(The)30 b(SVR4.2)h(shell)g(treats)g(`)p Ft(^)p Fu(')f(as)h(the)g +(undo)s(cumen)m(ted)e(equiv)-5 b(alen)m(t)31 b(of)g(`)p +Ft(|)p Fu('.)225 1166 y Fq(\017)60 b Fu(Bash)37 b(allo)m(ws)h(m)m +(ultiple)f(option)g(argumen)m(ts)g(when)e(it)i(is)g(in)m(v)m(ok)m(ed)h +(\()p Ft(-x)30 b(-v)p Fu(\);)40 b(the)c(SVR4.2)i(shell)330 +1275 y(allo)m(ws)c(only)f(one)g(option)g(argumen)m(t)g(\()p +Ft(-xv)p Fu(\).)47 b(In)32 b(fact,)i(some)f(v)m(ersions)g(of)g(the)g +(shell)f(dump)f(core)330 1385 y(if)f(the)h(second)f(argumen)m(t)h(b)s +(egins)f(with)g(a)h(`)p Ft(-)p Fu('.)225 1519 y Fq(\017)60 +b Fu(The)26 b(SVR4.2)i(shell)f(exits)g(a)g(script)g(if)g(an)m(y)g +(builtin)f(fails;)j(Bash)e(exits)g(a)g(script)g(only)g(if)g(one)g(of)g +(the)330 1629 y Fm(posix)34 b Fu(sp)s(ecial)h(builtins)f(fails,)i(and)e +(only)h(for)f(certain)h(failures,)h(as)f(en)m(umerated)g(in)f(the)h +Fm(posix)330 1738 y Fu(standard.)225 1873 y Fq(\017)60 +b Fu(The)30 b(SVR4.2)h(shell)g(b)s(eha)m(v)m(es)f(di\013eren)m(tly)h +(when)f(in)m(v)m(ok)m(ed)i(as)e Ft(jsh)g Fu(\(it)h(turns)e(on)h(job)g +(con)m(trol\).)p eop end +%%Page: 167 173 +TeXDict begin 167 172 bop 3614 -116 a Fu(167)150 299 +y Fp(App)t(endix)52 b(C)81 b(GNU)54 b(F)-13 b(ree)53 +b(Do)t(cumen)l(tation)e(License)1359 502 y Fu(V)-8 b(ersion)31 +b(1.3,)g(3)g(No)m(v)m(em)m(b)s(er)h(2008)390 635 y(Cop)m(yrigh)m(t)842 +632 y(c)817 635 y Fq(\015)e Fu(2000,)j(2001,)f(2002,)g(2007,)h(2008)f +(F)-8 b(ree)31 b(Soft)m(w)m(are)h(F)-8 b(oundation,)31 +b(Inc.)390 745 y Ft(http://fsf.org/)390 964 y Fu(Ev)m(ery)m(one)g(is)g +(p)s(ermitted)f(to)h(cop)m(y)g(and)f(distribute)g(v)m(erbatim)h(copies) +390 1074 y(of)g(this)f(license)h(do)s(cumen)m(t,)g(but)e(c)m(hanging)j +(it)f(is)f(not)h(allo)m(w)m(ed.)199 1207 y(0.)61 b(PREAMBLE)330 +1340 y(The)37 b(purp)s(ose)e(of)i(this)g(License)h(is)f(to)h(mak)m(e)g +(a)g(man)m(ual,)h(textb)s(o)s(ok,)h(or)d(other)g(functional)h(and)330 +1450 y(useful)29 b(do)s(cumen)m(t)h Fr(free)36 b Fu(in)29 +b(the)i(sense)f(of)g(freedom:)41 b(to)31 b(assure)e(ev)m(ery)m(one)j +(the)e(e\013ectiv)m(e)j(freedom)330 1559 y(to)f(cop)m(y)g(and)f +(redistribute)g(it,)h(with)g(or)f(without)g(mo)s(difying)g(it,)i +(either)f(commercially)h(or)e(non-)330 1669 y(commercially)-8 +b(.)56 b(Secondarily)-8 b(,)36 b(this)f(License)g(preserv)m(es)g(for)f +(the)h(author)f(and)g(publisher)f(a)i(w)m(a)m(y)330 1778 +y(to)i(get)g(credit)g(for)f(their)g(w)m(ork,)i(while)e(not)g(b)s(eing)g +(considered)g(resp)s(onsible)f(for)h(mo)s(di\014cations)330 +1888 y(made)30 b(b)m(y)h(others.)330 2021 y(This)22 b(License)i(is)f(a) +h(kind)e(of)i(\\cop)m(yleft",)j(whic)m(h)c(means)g(that)h(deriv)-5 +b(ativ)m(e)24 b(w)m(orks)f(of)h(the)f(do)s(cumen)m(t)330 +2131 y(m)m(ust)34 b(themselv)m(es)h(b)s(e)e(free)h(in)g(the)g(same)g +(sense.)51 b(It)34 b(complemen)m(ts)h(the)f(GNU)g(General)h(Public)330 +2240 y(License,)c(whic)m(h)f(is)h(a)f(cop)m(yleft)i(license)g(designed) +e(for)g(free)h(soft)m(w)m(are.)330 2373 y(W)-8 b(e)31 +b(ha)m(v)m(e)f(designed)g(this)f(License)h(in)f(order)g(to)i(use)e(it)h +(for)f(man)m(uals)h(for)f(free)h(soft)m(w)m(are,)h(b)s(ecause)330 +2483 y(free)42 b(soft)m(w)m(are)i(needs)e(free)g(do)s(cumen)m(tation:) +65 b(a)42 b(free)h(program)f(should)f(come)i(with)f(man)m(uals)330 +2592 y(pro)m(viding)29 b(the)g(same)g(freedoms)f(that)i(the)f(soft)m(w) +m(are)h(do)s(es.)40 b(But)29 b(this)f(License)i(is)f(not)g(limited)g +(to)330 2702 y(soft)m(w)m(are)j(man)m(uals;)f(it)g(can)g(b)s(e)f(used)g +(for)g(an)m(y)h(textual)h(w)m(ork,)f(regardless)g(of)g(sub)5 +b(ject)30 b(matter)i(or)330 2812 y(whether)f(it)h(is)f(published)f(as)i +(a)f(prin)m(ted)g(b)s(o)s(ok.)44 b(W)-8 b(e)32 b(recommend)f(this)h +(License)g(principally)f(for)330 2921 y(w)m(orks)f(whose)h(purp)s(ose)d +(is)j(instruction)f(or)g(reference.)199 3054 y(1.)61 +b(APPLICABILITY)29 b(AND)j(DEFINITIONS)330 3187 y(This)39 +b(License)i(applies)f(to)g(an)m(y)h(man)m(ual)f(or)g(other)g(w)m(ork,)i +(in)e(an)m(y)g(medium,)i(that)e(con)m(tains)i(a)330 3297 +y(notice)h(placed)f(b)m(y)f(the)h(cop)m(yrigh)m(t)h(holder)e(sa)m(ying) +h(it)g(can)g(b)s(e)f(distributed)f(under)g(the)i(terms)330 +3407 y(of)c(this)f(License.)62 b(Suc)m(h)37 b(a)h(notice)h(gran)m(ts)f +(a)g(w)m(orld-wide,)h(ro)m(y)m(alt)m(y-free)i(license,)f(unlimited)d +(in)330 3516 y(duration,)49 b(to)d(use)f(that)g(w)m(ork)h(under)d(the)j +(conditions)f(stated)h(herein.)85 b(The)45 b(\\Do)s(cumen)m(t",)330 +3626 y(b)s(elo)m(w,)29 b(refers)f(to)h(an)m(y)g(suc)m(h)f(man)m(ual)h +(or)f(w)m(ork.)40 b(An)m(y)29 b(mem)m(b)s(er)e(of)i(the)f(public)g(is)g +(a)h(licensee,)i(and)330 3735 y(is)25 b(addressed)f(as)h(\\y)m(ou".)40 +b(Y)-8 b(ou)26 b(accept)g(the)f(license)h(if)f(y)m(ou)h(cop)m(y)-8 +b(,)27 b(mo)s(dify)d(or)h(distribute)g(the)g(w)m(ork)330 +3845 y(in)30 b(a)h(w)m(a)m(y)g(requiring)f(p)s(ermission)f(under)g(cop) +m(yrigh)m(t)j(la)m(w.)330 3978 y(A)i(\\Mo)s(di\014ed)f(V)-8 +b(ersion")35 b(of)f(the)g(Do)s(cumen)m(t)g(means)g(an)m(y)g(w)m(ork)f +(con)m(taining)j(the)e(Do)s(cumen)m(t)g(or)330 4088 y(a)k(p)s(ortion)f +(of)h(it,)i(either)e(copied)g(v)m(erbatim,)i(or)d(with)h(mo)s +(di\014cations)f(and/or)h(translated)g(in)m(to)330 4197 +y(another)31 b(language.)330 4330 y(A)26 b(\\Secondary)g(Section")h(is) +f(a)h(named)e(app)s(endix)f(or)i(a)h(fron)m(t-matter)g(section)g(of)f +(the)g(Do)s(cumen)m(t)330 4440 y(that)c(deals)g(exclusiv)m(ely)h(with)e +(the)g(relationship)h(of)f(the)h(publishers)d(or)i(authors)g(of)h(the)f +(Do)s(cumen)m(t)330 4549 y(to)38 b(the)f(Do)s(cumen)m(t's)i(o)m(v)m +(erall)g(sub)5 b(ject)37 b(\(or)h(to)g(related)g(matters\))g(and)f(con) +m(tains)h(nothing)f(that)330 4659 y(could)j(fall)h(directly)g(within)f +(that)h(o)m(v)m(erall)i(sub)5 b(ject.)70 b(\(Th)m(us,)42 +b(if)e(the)h(Do)s(cumen)m(t)g(is)f(in)g(part)h(a)330 +4769 y(textb)s(o)s(ok)24 b(of)g(mathematics,)j(a)d(Secondary)f(Section) +h(ma)m(y)g(not)g(explain)g(an)m(y)g(mathematics.\))40 +b(The)330 4878 y(relationship)28 b(could)f(b)s(e)g(a)g(matter)i(of)e +(historical)i(connection)f(with)f(the)h(sub)5 b(ject)27 +b(or)g(with)g(related)330 4988 y(matters,)38 b(or)d(of)h(legal,)i +(commercial,)h(philosophical,)f(ethical)f(or)e(p)s(olitical)i(p)s +(osition)f(regarding)330 5097 y(them.)330 5230 y(The)25 +b(\\In)m(v)-5 b(arian)m(t)27 b(Sections")g(are)f(certain)g(Secondary)g +(Sections)g(whose)f(titles)i(are)f(designated,)i(as)330 +5340 y(b)s(eing)e(those)h(of)g(In)m(v)-5 b(arian)m(t)27 +b(Sections,)i(in)d(the)h(notice)h(that)f(sa)m(ys)g(that)g(the)g(Do)s +(cumen)m(t)g(is)g(released)p eop end +%%Page: 168 174 +TeXDict begin 168 173 bop 150 -116 a Fu(App)s(endix)29 +b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560 +b(168)330 299 y(under)26 b(this)i(License.)40 b(If)27 +b(a)h(section)h(do)s(es)f(not)f(\014t)h(the)g(ab)s(o)m(v)m(e)h +(de\014nition)e(of)h(Secondary)f(then)h(it)g(is)330 408 +y(not)k(allo)m(w)m(ed)i(to)e(b)s(e)g(designated)g(as)g(In)m(v)-5 +b(arian)m(t.)46 b(The)31 b(Do)s(cumen)m(t)i(ma)m(y)f(con)m(tain)i(zero) +e(In)m(v)-5 b(arian)m(t)330 518 y(Sections.)39 b(If)25 +b(the)f(Do)s(cumen)m(t)i(do)s(es)e(not)h(iden)m(tify)g(an)m(y)g(In)m(v) +-5 b(arian)m(t)25 b(Sections)h(then)e(there)h(are)g(none.)330 +669 y(The)36 b(\\Co)m(v)m(er)i(T)-8 b(exts")38 b(are)f(certain)g(short) +g(passages)g(of)g(text)g(that)h(are)f(listed,)i(as)d(F)-8 +b(ron)m(t-Co)m(v)m(er)330 778 y(T)g(exts)26 b(or)f(Bac)m(k-Co)m(v)m(er) +j(T)-8 b(exts,)27 b(in)d(the)h(notice)i(that)e(sa)m(ys)h(that)g(the)f +(Do)s(cumen)m(t)h(is)f(released)g(under)330 888 y(this)h(License.)40 +b(A)25 b(F)-8 b(ron)m(t-Co)m(v)m(er)29 b(T)-8 b(ext)26 +b(ma)m(y)h(b)s(e)e(at)i(most)f(5)g(w)m(ords,)g(and)g(a)g(Bac)m(k-Co)m +(v)m(er)j(T)-8 b(ext)26 b(ma)m(y)330 998 y(b)s(e)k(at)h(most)g(25)g(w)m +(ords.)330 1148 y(A)36 b(\\T)-8 b(ransparen)m(t")36 b(cop)m(y)g(of)g +(the)f(Do)s(cumen)m(t)h(means)g(a)g(mac)m(hine-readable)h(cop)m(y)-8 +b(,)38 b(represen)m(ted)330 1258 y(in)d(a)h(format)g(whose)g(sp)s +(eci\014cation)g(is)g(a)m(v)-5 b(ailable)38 b(to)f(the)f(general)g +(public,)h(that)f(is)g(suitable)g(for)330 1367 y(revising)c(the)g(do)s +(cumen)m(t)f(straigh)m(tforw)m(ardly)i(with)e(generic)i(text)g(editors) +f(or)f(\(for)h(images)h(com-)330 1477 y(p)s(osed)23 b(of)h(pixels\))g +(generic)h(pain)m(t)f(programs)g(or)f(\(for)h(dra)m(wings\))g(some)g +(widely)g(a)m(v)-5 b(ailable)26 b(dra)m(wing)330 1587 +y(editor,)k(and)f(that)g(is)g(suitable)h(for)f(input)f(to)i(text)g +(formatters)f(or)g(for)g(automatic)i(translation)f(to)330 +1696 y(a)d(v)-5 b(ariet)m(y)28 b(of)f(formats)g(suitable)h(for)e(input) +g(to)i(text)g(formatters.)40 b(A)27 b(cop)m(y)g(made)g(in)g(an)g +(otherwise)330 1806 y(T)-8 b(ransparen)m(t)37 b(\014le)h(format)g +(whose)f(markup,)i(or)e(absence)h(of)g(markup,)g(has)g(b)s(een)f +(arranged)g(to)330 1915 y(th)m(w)m(art)27 b(or)g(discourage)g +(subsequen)m(t)f(mo)s(di\014cation)h(b)m(y)g(readers)f(is)g(not)h(T)-8 +b(ransparen)m(t.)39 b(An)27 b(image)330 2025 y(format)35 +b(is)f(not)h(T)-8 b(ransparen)m(t)34 b(if)g(used)g(for)g(an)m(y)g +(substan)m(tial)h(amoun)m(t)g(of)g(text.)53 b(A)35 b(cop)m(y)g(that)g +(is)330 2134 y(not)c(\\T)-8 b(ransparen)m(t")31 b(is)f(called)i +(\\Opaque".)330 2285 y(Examples)53 b(of)g(suitable)h(formats)f(for)g(T) +-8 b(ransparen)m(t)53 b(copies)h(include)f(plain)g Fm(asci)r(i)g +Fu(without)330 2395 y(markup,)37 b(T)-8 b(exinfo)36 b(input)f(format,)j +(LaT)1759 2414 y(E)1810 2395 y(X)e(input)f(format,)j +Ff(SGML)f Fu(or)f Ff(XML)g Fu(using)g(a)g(publicly)330 +2504 y(a)m(v)-5 b(ailable)42 b Ff(DTD)p Fu(,)h(and)c +(standard-conforming)g(simple)h Ff(HTML)p Fu(,)i(P)m(ostScript)e(or)f +Ff(PDF)h Fu(designed)330 2614 y(for)e(h)m(uman)f(mo)s(di\014cation.)65 +b(Examples)38 b(of)h(transparen)m(t)f(image)h(formats)g(include)f +Ff(PNG)p Fu(,)i Ff(X)n(CF)330 2724 y Fu(and)e Ff(JPG)p +Fu(.)64 b(Opaque)38 b(formats)h(include)f(proprietary)h(formats)f(that) +h(can)g(b)s(e)f(read)h(and)f(edited)330 2833 y(only)54 +b(b)m(y)f(proprietary)h(w)m(ord)f(pro)s(cessors,)59 b +Ff(SGML)54 b Fu(or)f Ff(XML)h Fu(for)g(whic)m(h)f(the)h +Ff(DTD)g Fu(and/or)330 2943 y(pro)s(cessing)61 b(to)s(ols)h(are)f(not)g +(generally)i(a)m(v)-5 b(ailable,)71 b(and)60 b(the)h(mac)m +(hine-generated)j Ff(HTML)p Fu(,)330 3052 y(P)m(ostScript)31 +b(or)f Ff(PDF)h Fu(pro)s(duced)d(b)m(y)j(some)f(w)m(ord)g(pro)s +(cessors)g(for)g(output)g(purp)s(oses)f(only)-8 b(.)330 +3203 y(The)34 b(\\Title)h(P)m(age")i(means,)e(for)f(a)h(prin)m(ted)f(b) +s(o)s(ok,)h(the)f(title)i(page)f(itself,)h(plus)e(suc)m(h)f(follo)m +(wing)330 3313 y(pages)28 b(as)g(are)g(needed)g(to)g(hold,)g(legibly)-8 +b(,)30 b(the)e(material)h(this)e(License)i(requires)e(to)h(app)s(ear)f +(in)h(the)330 3422 y(title)g(page.)40 b(F)-8 b(or)28 +b(w)m(orks)e(in)g(formats)h(whic)m(h)g(do)f(not)h(ha)m(v)m(e)h(an)m(y)e +(title)j(page)e(as)g(suc)m(h,)g(\\Title)h(P)m(age")330 +3532 y(means)j(the)f(text)i(near)e(the)h(most)g(prominen)m(t)g(app)s +(earance)f(of)h(the)g(w)m(ork's)g(title,)h(preceding)f(the)330 +3641 y(b)s(eginning)f(of)g(the)h(b)s(o)s(dy)e(of)h(the)h(text.)330 +3792 y(The)j(\\publisher")g(means)h(an)m(y)f(p)s(erson)g(or)h(en)m(tit) +m(y)h(that)f(distributes)f(copies)i(of)e(the)h(Do)s(cumen)m(t)330 +3902 y(to)c(the)g(public.)330 4052 y(A)f(section)h(\\En)m(titled)g +(XYZ")f(means)f(a)h(named)g(subunit)e(of)h(the)h(Do)s(cumen)m(t)h +(whose)e(title)i(either)330 4162 y(is)d(precisely)g(XYZ)g(or)f(con)m +(tains)i(XYZ)f(in)f(paren)m(theses)i(follo)m(wing)g(text)g(that)f +(translates)h(XYZ)e(in)330 4271 y(another)e(language.)40 +b(\(Here)26 b(XYZ)f(stands)f(for)h(a)g(sp)s(eci\014c)g(section)h(name)f +(men)m(tioned)h(b)s(elo)m(w,)g(suc)m(h)330 4381 y(as)i(\\Ac)m(kno)m +(wledgemen)m(ts",)33 b(\\Dedications",)e(\\Endorsemen)m(ts",)e(or)f +(\\History".\))42 b(T)-8 b(o)29 b(\\Preserv)m(e)330 4491 +y(the)34 b(Title")h(of)e(suc)m(h)h(a)g(section)g(when)f(y)m(ou)h(mo)s +(dify)e(the)i(Do)s(cumen)m(t)h(means)e(that)h(it)g(remains)g(a)330 +4600 y(section)e(\\En)m(titled)f(XYZ")g(according)g(to)g(this)g +(de\014nition.)330 4751 y(The)c(Do)s(cumen)m(t)i(ma)m(y)f(include)f(W) +-8 b(arran)m(t)m(y)30 b(Disclaimers)f(next)f(to)g(the)g(notice)h(whic)m +(h)e(states)i(that)330 4861 y(this)34 b(License)g(applies)g(to)h(the)f +(Do)s(cumen)m(t.)52 b(These)33 b(W)-8 b(arran)m(t)m(y)36 +b(Disclaimers)f(are)g(considered)e(to)330 4970 y(b)s(e)k(included)g(b)m +(y)g(reference)h(in)g(this)f(License,)j(but)d(only)h(as)g(regards)f +(disclaiming)i(w)m(arran)m(ties:)330 5080 y(an)m(y)e(other)g +(implication)i(that)e(these)g(W)-8 b(arran)m(t)m(y)39 +b(Disclaimers)f(ma)m(y)g(ha)m(v)m(e)g(is)f(v)m(oid)g(and)f(has)h(no)330 +5189 y(e\013ect)32 b(on)e(the)h(meaning)f(of)h(this)f(License.)199 +5340 y(2.)61 b(VERBA)-8 b(TIM)31 b(COPYING)p eop end +%%Page: 169 175 +TeXDict begin 169 174 bop 150 -116 a Fu(App)s(endix)29 +b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560 +b(169)330 299 y(Y)-8 b(ou)39 b(ma)m(y)f(cop)m(y)h(and)e(distribute)h +(the)g(Do)s(cumen)m(t)h(in)f(an)m(y)g(medium,)h(either)g(commercially)h +(or)330 408 y(noncommercially)-8 b(,)48 b(pro)m(vided)42 +b(that)h(this)f(License,)47 b(the)42 b(cop)m(yrigh)m(t)i(notices,)j +(and)42 b(the)h(license)330 518 y(notice)37 b(sa)m(ying)g(this)e +(License)i(applies)e(to)i(the)f(Do)s(cumen)m(t)g(are)g(repro)s(duced)e +(in)i(all)g(copies,)j(and)330 628 y(that)27 b(y)m(ou)g(add)f(no)h +(other)f(conditions)h(whatso)s(ev)m(er)h(to)f(those)g(of)g(this)f +(License.)40 b(Y)-8 b(ou)27 b(ma)m(y)g(not)g(use)330 +737 y(tec)m(hnical)35 b(measures)d(to)i(obstruct)f(or)g(con)m(trol)h +(the)f(reading)g(or)g(further)e(cop)m(ying)j(of)f(the)g(copies)330 +847 y(y)m(ou)25 b(mak)m(e)g(or)g(distribute.)38 b(Ho)m(w)m(ev)m(er,)28 +b(y)m(ou)d(ma)m(y)g(accept)h(comp)s(ensation)f(in)f(exc)m(hange)j(for)d +(copies.)330 956 y(If)32 b(y)m(ou)g(distribute)g(a)h(large)g(enough)f +(n)m(um)m(b)s(er)f(of)h(copies)h(y)m(ou)f(m)m(ust)h(also)g(follo)m(w)g +(the)f(conditions)330 1066 y(in)e(section)i(3.)330 1200 +y(Y)-8 b(ou)21 b(ma)m(y)h(also)f(lend)g(copies,)i(under)d(the)h(same)g +(conditions)g(stated)h(ab)s(o)m(v)m(e,)i(and)c(y)m(ou)h(ma)m(y)g +(publicly)330 1310 y(displa)m(y)31 b(copies.)199 1443 +y(3.)61 b(COPYING)30 b(IN)g(QUANTITY)330 1577 y(If)25 +b(y)m(ou)g(publish)f(prin)m(ted)g(copies)i(\(or)g(copies)g(in)f(media)g +(that)h(commonly)g(ha)m(v)m(e)g(prin)m(ted)f(co)m(v)m(ers\))i(of)330 +1687 y(the)32 b(Do)s(cumen)m(t,)h(n)m(um)m(b)s(ering)e(more)h(than)f +(100,)j(and)d(the)h(Do)s(cumen)m(t's)h(license)f(notice)h(requires)330 +1797 y(Co)m(v)m(er)i(T)-8 b(exts,)36 b(y)m(ou)f(m)m(ust)f(enclose)i +(the)e(copies)h(in)f(co)m(v)m(ers)i(that)f(carry)-8 b(,)36 +b(clearly)f(and)f(legibly)-8 b(,)37 b(all)330 1906 y(these)j(Co)m(v)m +(er)g(T)-8 b(exts:)59 b(F)-8 b(ron)m(t-Co)m(v)m(er)41 +b(T)-8 b(exts)40 b(on)f(the)g(fron)m(t)g(co)m(v)m(er,)44 +b(and)38 b(Bac)m(k-Co)m(v)m(er)k(T)-8 b(exts)40 b(on)330 +2016 y(the)29 b(bac)m(k)h(co)m(v)m(er.)42 b(Both)30 b(co)m(v)m(ers)h(m) +m(ust)e(also)h(clearly)g(and)f(legibly)h(iden)m(tify)f(y)m(ou)h(as)f +(the)h(publisher)330 2125 y(of)k(these)h(copies.)53 b(The)34 +b(fron)m(t)h(co)m(v)m(er)h(m)m(ust)e(presen)m(t)g(the)h(full)f(title)i +(with)d(all)j(w)m(ords)d(of)i(the)f(title)330 2235 y(equally)e +(prominen)m(t)e(and)g(visible.)43 b(Y)-8 b(ou)31 b(ma)m(y)g(add)g +(other)g(material)h(on)f(the)g(co)m(v)m(ers)h(in)e(addition.)330 +2345 y(Cop)m(ying)36 b(with)g(c)m(hanges)h(limited)g(to)g(the)g(co)m(v) +m(ers,)i(as)d(long)h(as)g(they)f(preserv)m(e)g(the)h(title)g(of)g(the) +330 2454 y(Do)s(cumen)m(t)h(and)e(satisfy)i(these)f(conditions,)j(can)d +(b)s(e)g(treated)h(as)f(v)m(erbatim)h(cop)m(ying)g(in)f(other)330 +2564 y(resp)s(ects.)330 2698 y(If)32 b(the)h(required)f(texts)i(for)e +(either)h(co)m(v)m(er)i(are)e(to)s(o)g(v)m(oluminous)g(to)g(\014t)g +(legibly)-8 b(,)35 b(y)m(ou)e(should)f(put)330 2807 y(the)h(\014rst)f +(ones)h(listed)g(\(as)h(man)m(y)f(as)g(\014t)g(reasonably\))g(on)g(the) +g(actual)h(co)m(v)m(er,)h(and)e(con)m(tin)m(ue)h(the)330 +2917 y(rest)d(on)m(to)g(adjacen)m(t)h(pages.)330 3051 +y(If)27 b(y)m(ou)g(publish)e(or)i(distribute)g(Opaque)f(copies)i(of)f +(the)h(Do)s(cumen)m(t)f(n)m(um)m(b)s(ering)f(more)i(than)e(100,)330 +3160 y(y)m(ou)i(m)m(ust)g(either)h(include)e(a)i(mac)m(hine-readable)g +(T)-8 b(ransparen)m(t)28 b(cop)m(y)h(along)g(with)e(eac)m(h)i(Opaque) +330 3270 y(cop)m(y)-8 b(,)38 b(or)d(state)h(in)f(or)g(with)g(eac)m(h)h +(Opaque)e(cop)m(y)i(a)g(computer-net)m(w)m(ork)g(lo)s(cation)h(from)d +(whic)m(h)330 3380 y(the)24 b(general)i(net)m(w)m(ork-using)f(public)e +(has)h(access)i(to)f(do)m(wnload)f(using)g(public-standard)f(net)m(w)m +(ork)330 3489 y(proto)s(cols)40 b(a)f(complete)h(T)-8 +b(ransparen)m(t)39 b(cop)m(y)g(of)g(the)h(Do)s(cumen)m(t,)i(free)d(of)g +(added)f(material.)67 b(If)330 3599 y(y)m(ou)39 b(use)g(the)g(latter)h +(option,)h(y)m(ou)f(m)m(ust)e(tak)m(e)j(reasonably)e(pruden)m(t)e +(steps,)k(when)d(y)m(ou)h(b)s(egin)330 3708 y(distribution)f(of)g +(Opaque)g(copies)h(in)e(quan)m(tit)m(y)-8 b(,)43 b(to)38 +b(ensure)g(that)h(this)f(T)-8 b(ransparen)m(t)38 b(cop)m(y)h(will)330 +3818 y(remain)30 b(th)m(us)g(accessible)i(at)f(the)f(stated)h(lo)s +(cation)h(un)m(til)e(at)h(least)h(one)e(y)m(ear)h(after)g(the)f(last)h +(time)330 3927 y(y)m(ou)37 b(distribute)f(an)h(Opaque)f(cop)m(y)i +(\(directly)g(or)e(through)g(y)m(our)h(agen)m(ts)h(or)f(retailers\))h +(of)f(that)330 4037 y(edition)31 b(to)g(the)g(public.)330 +4171 y(It)k(is)f(requested,)i(but)e(not)h(required,)g(that)g(y)m(ou)g +(con)m(tact)h(the)f(authors)f(of)h(the)g(Do)s(cumen)m(t)g(w)m(ell)330 +4281 y(b)s(efore)28 b(redistributing)g(an)m(y)h(large)h(n)m(um)m(b)s +(er)d(of)i(copies,)h(to)f(giv)m(e)h(them)f(a)g(c)m(hance)h(to)f(pro)m +(vide)g(y)m(ou)330 4390 y(with)h(an)g(up)s(dated)f(v)m(ersion)i(of)g +(the)f(Do)s(cumen)m(t.)199 4524 y(4.)61 b(MODIFICA)-8 +b(TIONS)330 4658 y(Y)g(ou)26 b(ma)m(y)g(cop)m(y)g(and)f(distribute)g(a) +h(Mo)s(di\014ed)f(V)-8 b(ersion)26 b(of)g(the)g(Do)s(cumen)m(t)g(under) +e(the)h(conditions)330 4768 y(of)c(sections)h(2)g(and)e(3)h(ab)s(o)m(v) +m(e,)k(pro)m(vided)20 b(that)i(y)m(ou)f(release)i(the)e(Mo)s(di\014ed)f +(V)-8 b(ersion)22 b(under)d(precisely)330 4877 y(this)29 +b(License,)h(with)f(the)g(Mo)s(di\014ed)f(V)-8 b(ersion)30 +b(\014lling)f(the)g(role)h(of)f(the)g(Do)s(cumen)m(t,)h(th)m(us)f +(licensing)330 4987 y(distribution)k(and)h(mo)s(di\014cation)g(of)h +(the)f(Mo)s(di\014ed)f(V)-8 b(ersion)35 b(to)g(who)s(ev)m(er)f(p)s +(ossesses)f(a)i(cop)m(y)g(of)330 5096 y(it.)41 b(In)30 +b(addition,)h(y)m(ou)f(m)m(ust)h(do)f(these)h(things)f(in)g(the)h(Mo)s +(di\014ed)e(V)-8 b(ersion:)357 5230 y(A.)60 b(Use)33 +b(in)f(the)h(Title)h(P)m(age)g(\(and)f(on)f(the)h(co)m(v)m(ers,)i(if)e +(an)m(y\))g(a)g(title)h(distinct)f(from)g(that)g(of)g(the)510 +5340 y(Do)s(cumen)m(t,)j(and)d(from)g(those)i(of)f(previous)f(v)m +(ersions)h(\(whic)m(h)g(should,)g(if)g(there)g(w)m(ere)g(an)m(y)-8 +b(,)p eop end +%%Page: 170 176 +TeXDict begin 170 175 bop 150 -116 a Fu(App)s(endix)29 +b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560 +b(170)510 299 y(b)s(e)31 b(listed)h(in)f(the)g(History)h(section)g(of)g +(the)f(Do)s(cumen)m(t\).)45 b(Y)-8 b(ou)32 b(ma)m(y)g(use)f(the)g(same) +h(title)h(as)510 408 y(a)e(previous)f(v)m(ersion)g(if)h(the)f(original) +i(publisher)d(of)h(that)h(v)m(ersion)g(giv)m(es)h(p)s(ermission.)360 +545 y(B.)61 b(List)31 b(on)f(the)h(Title)g(P)m(age,)i(as)d(authors,)h +(one)g(or)f(more)h(p)s(ersons)e(or)h(en)m(tities)j(resp)s(onsible)c +(for)510 655 y(authorship)c(of)h(the)h(mo)s(di\014cations)f(in)g(the)g +(Mo)s(di\014ed)f(V)-8 b(ersion,)28 b(together)g(with)d(at)i(least)h +(\014v)m(e)510 765 y(of)c(the)g(principal)g(authors)f(of)i(the)f(Do)s +(cumen)m(t)g(\(all)h(of)g(its)f(principal)g(authors,)h(if)f(it)g(has)g +(few)m(er)510 874 y(than)30 b(\014v)m(e\),)h(unless)f(they)h(release)g +(y)m(ou)g(from)f(this)g(requiremen)m(t.)359 1011 y(C.)60 +b(State)32 b(on)e(the)h(Title)h(page)f(the)g(name)g(of)g(the)g +(publisher)e(of)i(the)g(Mo)s(di\014ed)f(V)-8 b(ersion,)32 +b(as)f(the)510 1121 y(publisher.)355 1258 y(D.)61 b(Preserv)m(e)31 +b(all)g(the)g(cop)m(yrigh)m(t)h(notices)f(of)g(the)f(Do)s(cumen)m(t.) +363 1395 y(E.)60 b(Add)30 b(an)i(appropriate)f(cop)m(yrigh)m(t)i +(notice)f(for)g(y)m(our)f(mo)s(di\014cations)g(adjacen)m(t)i(to)f(the)g +(other)510 1504 y(cop)m(yrigh)m(t)g(notices.)365 1641 +y(F.)61 b(Include,)28 b(immediately)h(after)f(the)h(cop)m(yrigh)m(t)g +(notices,)h(a)e(license)h(notice)g(giving)g(the)f(public)510 +1751 y(p)s(ermission)23 b(to)j(use)e(the)g(Mo)s(di\014ed)g(V)-8 +b(ersion)25 b(under)e(the)i(terms)f(of)h(this)f(License,)j(in)d(the)g +(form)510 1861 y(sho)m(wn)30 b(in)g(the)g(Addendum)f(b)s(elo)m(w.)353 +1998 y(G.)61 b(Preserv)m(e)23 b(in)g(that)g(license)h(notice)g(the)f +(full)g(lists)g(of)g(In)m(v)-5 b(arian)m(t)23 b(Sections)h(and)e +(required)g(Co)m(v)m(er)510 2107 y(T)-8 b(exts)31 b(giv)m(en)g(in)f +(the)h(Do)s(cumen)m(t's)g(license)h(notice.)357 2244 +y(H.)60 b(Include)30 b(an)g(unaltered)g(cop)m(y)h(of)g(this)f(License.) +392 2381 y(I.)60 b(Preserv)m(e)33 b(the)f(section)h(En)m(titled)g +(\\History",)h(Preserv)m(e)f(its)f(Title,)i(and)d(add)h(to)h(it)f(an)g +(item)510 2491 y(stating)d(at)g(least)g(the)g(title,)h(y)m(ear,)g(new)d +(authors,)i(and)e(publisher)f(of)j(the)f(Mo)s(di\014ed)f(V)-8 +b(ersion)510 2600 y(as)32 b(giv)m(en)g(on)f(the)h(Title)g(P)m(age.)45 +b(If)31 b(there)h(is)f(no)g(section)i(En)m(titled)f(\\History")h(in)e +(the)g(Do)s(cu-)510 2710 y(men)m(t,)37 b(create)f(one)f(stating)h(the)f +(title,)i(y)m(ear,)g(authors,)f(and)e(publisher)f(of)i(the)g(Do)s +(cumen)m(t)510 2819 y(as)h(giv)m(en)h(on)f(its)h(Title)g(P)m(age,)i +(then)d(add)g(an)g(item)g(describing)g(the)g(Mo)s(di\014ed)g(V)-8 +b(ersion)37 b(as)510 2929 y(stated)31 b(in)f(the)h(previous)f(sen)m +(tence.)378 3066 y(J.)60 b(Preserv)m(e)33 b(the)g(net)m(w)m(ork)g(lo)s +(cation,)i(if)d(an)m(y)-8 b(,)34 b(giv)m(en)f(in)g(the)f(Do)s(cumen)m +(t)h(for)g(public)e(access)j(to)510 3176 y(a)e(T)-8 b(ransparen)m(t)30 +b(cop)m(y)i(of)g(the)f(Do)s(cumen)m(t,)h(and)f(lik)m(ewise)h(the)g(net) +m(w)m(ork)g(lo)s(cations)g(giv)m(en)g(in)510 3285 y(the)g(Do)s(cumen)m +(t)g(for)g(previous)f(v)m(ersions)h(it)g(w)m(as)g(based)f(on.)45 +b(These)31 b(ma)m(y)h(b)s(e)f(placed)h(in)g(the)510 3395 +y(\\History")27 b(section.)40 b(Y)-8 b(ou)25 b(ma)m(y)h(omit)g(a)f(net) +m(w)m(ork)h(lo)s(cation)g(for)f(a)h(w)m(ork)f(that)g(w)m(as)h +(published)510 3504 y(at)36 b(least)h(four)e(y)m(ears)i(b)s(efore)e +(the)h(Do)s(cumen)m(t)h(itself,)h(or)d(if)h(the)g(original)h(publisher) +d(of)i(the)510 3614 y(v)m(ersion)31 b(it)g(refers)f(to)h(giv)m(es)h(p)s +(ermission.)354 3751 y(K.)60 b(F)-8 b(or)24 b(an)m(y)h(section)f(En)m +(titled)h(\\Ac)m(kno)m(wledgemen)m(ts")i(or)d(\\Dedications",)k +(Preserv)m(e)c(the)g(Title)510 3861 y(of)j(the)f(section,)j(and)d +(preserv)m(e)h(in)f(the)h(section)g(all)h(the)e(substance)h(and)f(tone) +h(of)f(eac)m(h)i(of)f(the)510 3970 y(con)m(tributor)k(ac)m(kno)m +(wledgemen)m(ts)i(and/or)d(dedications)h(giv)m(en)h(therein.)368 +4107 y(L.)60 b(Preserv)m(e)36 b(all)g(the)g(In)m(v)-5 +b(arian)m(t)36 b(Sections)g(of)f(the)h(Do)s(cumen)m(t,)h(unaltered)f +(in)f(their)g(text)i(and)510 4217 y(in)f(their)g(titles.)58 +b(Section)37 b(n)m(um)m(b)s(ers)d(or)i(the)g(equiv)-5 +b(alen)m(t)38 b(are)e(not)g(considered)g(part)g(of)g(the)510 +4326 y(section)c(titles.)341 4463 y(M.)61 b(Delete)33 +b(an)m(y)e(section)h(En)m(titled)f(\\Endorsemen)m(ts".)42 +b(Suc)m(h)30 b(a)i(section)f(ma)m(y)h(not)f(b)s(e)f(included)510 +4573 y(in)g(the)h(Mo)s(di\014ed)e(V)-8 b(ersion.)357 +4710 y(N.)60 b(Do)29 b(not)g(retitle)h(an)m(y)e(existing)i(section)f +(to)g(b)s(e)f(En)m(titled)h(\\Endorsemen)m(ts")g(or)f(to)h(con\015ict)g +(in)510 4819 y(title)j(with)e(an)m(y)h(In)m(v)-5 b(arian)m(t)31 +b(Section.)354 4956 y(O.)60 b(Preserv)m(e)31 b(an)m(y)g(W)-8 +b(arran)m(t)m(y)32 b(Disclaimers.)330 5121 y(If)h(the)g(Mo)s(di\014ed)g +(V)-8 b(ersion)34 b(includes)f(new)g(fron)m(t-matter)i(sections)f(or)f +(app)s(endices)g(that)h(qualify)330 5230 y(as)28 b(Secondary)g +(Sections)g(and)f(con)m(tain)j(no)d(material)j(copied)e(from)f(the)h +(Do)s(cumen)m(t,)i(y)m(ou)e(ma)m(y)g(at)330 5340 y(y)m(our)k(option)h +(designate)h(some)e(or)h(all)g(of)f(these)h(sections)h(as)e(in)m(v)-5 +b(arian)m(t.)48 b(T)-8 b(o)33 b(do)f(this,)h(add)f(their)p +eop end +%%Page: 171 177 +TeXDict begin 171 176 bop 150 -116 a Fu(App)s(endix)29 +b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560 +b(171)330 299 y(titles)37 b(to)f(the)f(list)h(of)g(In)m(v)-5 +b(arian)m(t)36 b(Sections)g(in)f(the)h(Mo)s(di\014ed)f(V)-8 +b(ersion's)36 b(license)g(notice.)57 b(These)330 408 +y(titles)32 b(m)m(ust)e(b)s(e)g(distinct)h(from)e(an)m(y)i(other)g +(section)g(titles.)330 551 y(Y)-8 b(ou)43 b(ma)m(y)g(add)f(a)g(section) +i(En)m(titled)f(\\Endorsemen)m(ts",)j(pro)m(vided)c(it)h(con)m(tains)g +(nothing)g(but)330 661 y(endorsemen)m(ts)30 b(of)g(y)m(our)f(Mo)s +(di\014ed)g(V)-8 b(ersion)31 b(b)m(y)e(v)-5 b(arious)30 +b(parties|for)g(example,)g(statemen)m(ts)i(of)330 770 +y(p)s(eer)27 b(review)g(or)g(that)h(the)f(text)i(has)d(b)s(een)h(appro) +m(v)m(ed)g(b)m(y)g(an)h(organization)h(as)e(the)h(authoritativ)m(e)330 +880 y(de\014nition)i(of)h(a)f(standard.)330 1022 y(Y)-8 +b(ou)29 b(ma)m(y)g(add)e(a)i(passage)g(of)g(up)e(to)i(\014v)m(e)g(w)m +(ords)e(as)i(a)g(F)-8 b(ron)m(t-Co)m(v)m(er)30 b(T)-8 +b(ext,)30 b(and)e(a)g(passage)i(of)e(up)330 1132 y(to)g(25)g(w)m(ords)e +(as)i(a)f(Bac)m(k-Co)m(v)m(er)j(T)-8 b(ext,)29 b(to)f(the)f(end)f(of)i +(the)f(list)h(of)f(Co)m(v)m(er)h(T)-8 b(exts)27 b(in)g(the)h(Mo)s +(di\014ed)330 1241 y(V)-8 b(ersion.)58 b(Only)35 b(one)h(passage)h(of)f +(F)-8 b(ron)m(t-Co)m(v)m(er)38 b(T)-8 b(ext)36 b(and)g(one)g(of)g(Bac)m +(k-Co)m(v)m(er)j(T)-8 b(ext)36 b(ma)m(y)h(b)s(e)330 1351 +y(added)27 b(b)m(y)g(\(or)h(through)f(arrangemen)m(ts)h(made)g(b)m(y\)) +g(an)m(y)g(one)f(en)m(tit)m(y)-8 b(.)42 b(If)27 b(the)h(Do)s(cumen)m(t) +g(already)330 1461 y(includes)34 b(a)g(co)m(v)m(er)h(text)g(for)f(the)g +(same)h(co)m(v)m(er,)h(previously)e(added)f(b)m(y)h(y)m(ou)g(or)g(b)m +(y)g(arrangemen)m(t)330 1570 y(made)h(b)m(y)g(the)h(same)f(en)m(tit)m +(y)i(y)m(ou)f(are)f(acting)i(on)e(b)s(ehalf)f(of,)j(y)m(ou)f(ma)m(y)g +(not)f(add)g(another;)j(but)330 1680 y(y)m(ou)c(ma)m(y)h(replace)g(the) +f(old)g(one,)i(on)e(explicit)h(p)s(ermission)e(from)g(the)i(previous)e +(publisher)f(that)330 1789 y(added)e(the)g(old)h(one.)330 +1932 y(The)25 b(author\(s\))h(and)f(publisher\(s\))f(of)i(the)f(Do)s +(cumen)m(t)h(do)g(not)f(b)m(y)h(this)f(License)h(giv)m(e)h(p)s +(ermission)330 2041 y(to)k(use)f(their)g(names)h(for)f(publicit)m(y)g +(for)h(or)f(to)h(assert)g(or)f(imply)g(endorsemen)m(t)g(of)h(an)m(y)g +(Mo)s(di\014ed)330 2151 y(V)-8 b(ersion.)199 2293 y(5.)61 +b(COMBINING)31 b(DOCUMENTS)330 2436 y(Y)-8 b(ou)39 b(ma)m(y)g(com)m +(bine)h(the)f(Do)s(cumen)m(t)g(with)g(other)f(do)s(cumen)m(ts)h +(released)g(under)f(this)g(License,)330 2545 y(under)f(the)h(terms)g +(de\014ned)f(in)h(section)h(4)g(ab)s(o)m(v)m(e)g(for)f(mo)s(di\014ed)f +(v)m(ersions,)k(pro)m(vided)d(that)h(y)m(ou)330 2655 +y(include)25 b(in)g(the)g(com)m(bination)i(all)f(of)g(the)f(In)m(v)-5 +b(arian)m(t)26 b(Sections)g(of)g(all)g(of)f(the)h(original)g(do)s +(cumen)m(ts,)330 2765 y(unmo)s(di\014ed,)g(and)g(list)h(them)g(all)g +(as)g(In)m(v)-5 b(arian)m(t)28 b(Sections)f(of)g(y)m(our)g(com)m(bined) +g(w)m(ork)f(in)h(its)g(license)330 2874 y(notice,)32 +b(and)e(that)h(y)m(ou)f(preserv)m(e)h(all)g(their)g(W)-8 +b(arran)m(t)m(y)32 b(Disclaimers.)330 3017 y(The)e(com)m(bined)g(w)m +(ork)h(need)e(only)i(con)m(tain)g(one)g(cop)m(y)g(of)f(this)g(License,) +i(and)d(m)m(ultiple)i(iden)m(tical)330 3126 y(In)m(v)-5 +b(arian)m(t)33 b(Sections)g(ma)m(y)g(b)s(e)f(replaced)h(with)f(a)h +(single)g(cop)m(y)-8 b(.)48 b(If)32 b(there)h(are)g(m)m(ultiple)g(In)m +(v)-5 b(arian)m(t)330 3236 y(Sections)27 b(with)g(the)g(same)g(name)g +(but)f(di\013eren)m(t)h(con)m(ten)m(ts,)i(mak)m(e)f(the)f(title)h(of)f +(eac)m(h)h(suc)m(h)f(section)330 3345 y(unique)33 b(b)m(y)h(adding)f +(at)i(the)f(end)g(of)g(it,)h(in)f(paren)m(theses,)i(the)e(name)g(of)g +(the)g(original)h(author)f(or)330 3455 y(publisher)23 +b(of)i(that)h(section)g(if)f(kno)m(wn,)h(or)f(else)h(a)f(unique)f(n)m +(um)m(b)s(er.)38 b(Mak)m(e)26 b(the)g(same)f(adjustmen)m(t)330 +3565 y(to)g(the)g(section)g(titles)h(in)e(the)h(list)g(of)f(In)m(v)-5 +b(arian)m(t)26 b(Sections)f(in)f(the)g(license)i(notice)g(of)e(the)h +(com)m(bined)330 3674 y(w)m(ork.)330 3817 y(In)41 b(the)g(com)m +(bination,)46 b(y)m(ou)41 b(m)m(ust)g(com)m(bine)h(an)m(y)g(sections)g +(En)m(titled)g(\\History")h(in)e(the)g(v)-5 b(ari-)330 +3926 y(ous)32 b(original)h(do)s(cumen)m(ts,)g(forming)f(one)g(section)h +(En)m(titled)g(\\History";)i(lik)m(ewise)f(com)m(bine)f(an)m(y)330 +4036 y(sections)g(En)m(titled)f(\\Ac)m(kno)m(wledgemen)m(ts",)k(and)31 +b(an)m(y)h(sections)h(En)m(titled)g(\\Dedications".)47 +b(Y)-8 b(ou)330 4145 y(m)m(ust)30 b(delete)i(all)f(sections)h(En)m +(titled)f(\\Endorsemen)m(ts.")199 4288 y(6.)61 b(COLLECTIONS)28 +b(OF)i(DOCUMENTS)330 4430 y(Y)-8 b(ou)32 b(ma)m(y)h(mak)m(e)g(a)f +(collection)i(consisting)f(of)f(the)g(Do)s(cumen)m(t)g(and)g(other)g +(do)s(cumen)m(ts)f(released)330 4540 y(under)41 b(this)h(License,)k +(and)c(replace)h(the)g(individual)f(copies)h(of)f(this)g(License)h(in)f +(the)h(v)-5 b(arious)330 4650 y(do)s(cumen)m(ts)42 b(with)g(a)h(single) +g(cop)m(y)h(that)f(is)f(included)g(in)g(the)h(collection,)48 +b(pro)m(vided)42 b(that)i(y)m(ou)330 4759 y(follo)m(w)38 +b(the)g(rules)e(of)h(this)g(License)h(for)f(v)m(erbatim)h(cop)m(ying)g +(of)f(eac)m(h)h(of)f(the)h(do)s(cumen)m(ts)e(in)h(all)330 +4869 y(other)31 b(resp)s(ects.)330 5011 y(Y)-8 b(ou)32 +b(ma)m(y)g(extract)h(a)f(single)g(do)s(cumen)m(t)f(from)g(suc)m(h)g(a)h +(collection,)i(and)d(distribute)g(it)h(individu-)330 +5121 y(ally)k(under)d(this)i(License,)i(pro)m(vided)e(y)m(ou)g(insert)g +(a)g(cop)m(y)h(of)f(this)g(License)g(in)m(to)h(the)g(extracted)330 +5230 y(do)s(cumen)m(t,)d(and)f(follo)m(w)i(this)e(License)h(in)g(all)g +(other)g(resp)s(ects)f(regarding)h(v)m(erbatim)g(cop)m(ying)h(of)330 +5340 y(that)d(do)s(cumen)m(t.)p eop end +%%Page: 172 178 +TeXDict begin 172 177 bop 150 -116 a Fu(App)s(endix)29 +b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560 +b(172)199 299 y(7.)61 b(A)m(GGREGA)-8 b(TION)32 b(WITH)e(INDEPENDENT)h +(W)m(ORKS)330 441 y(A)d(compilation)i(of)e(the)g(Do)s(cumen)m(t)h(or)f +(its)g(deriv)-5 b(ativ)m(es)30 b(with)d(other)i(separate)g(and)e(indep) +s(enden)m(t)330 551 y(do)s(cumen)m(ts)33 b(or)g(w)m(orks,)h(in)f(or)h +(on)f(a)g(v)m(olume)h(of)g(a)f(storage)i(or)e(distribution)g(medium,)g +(is)h(called)330 661 y(an)c(\\aggregate")k(if)c(the)g(cop)m(yrigh)m(t)i +(resulting)e(from)f(the)i(compilation)g(is)f(not)h(used)e(to)i(limit)g +(the)330 770 y(legal)d(righ)m(ts)f(of)g(the)g(compilation's)h(users)e +(b)s(ey)m(ond)g(what)g(the)h(individual)f(w)m(orks)g(p)s(ermit.)39 +b(When)330 880 y(the)g(Do)s(cumen)m(t)g(is)f(included)g(in)g(an)g +(aggregate,)44 b(this)38 b(License)h(do)s(es)f(not)h(apply)f(to)h(the)g +(other)330 989 y(w)m(orks)30 b(in)g(the)h(aggregate)i(whic)m(h)d(are)h +(not)g(themselv)m(es)g(deriv)-5 b(ativ)m(e)32 b(w)m(orks)f(of)f(the)h +(Do)s(cumen)m(t.)330 1132 y(If)22 b(the)h(Co)m(v)m(er)h(T)-8 +b(ext)23 b(requiremen)m(t)g(of)g(section)h(3)f(is)g(applicable)h(to)f +(these)h(copies)f(of)g(the)g(Do)s(cumen)m(t,)330 1241 +y(then)f(if)g(the)h(Do)s(cumen)m(t)g(is)g(less)f(than)g(one)h(half)f +(of)h(the)g(en)m(tire)g(aggregate,)k(the)c(Do)s(cumen)m(t's)g(Co)m(v)m +(er)330 1351 y(T)-8 b(exts)27 b(ma)m(y)g(b)s(e)f(placed)h(on)g(co)m(v)m +(ers)h(that)f(brac)m(k)m(et)h(the)f(Do)s(cumen)m(t)g(within)f(the)h +(aggregate,)j(or)d(the)330 1461 y(electronic)37 b(equiv)-5 +b(alen)m(t)36 b(of)g(co)m(v)m(ers)g(if)f(the)g(Do)s(cumen)m(t)h(is)f +(in)g(electronic)i(form.)54 b(Otherwise)35 b(they)330 +1570 y(m)m(ust)30 b(app)s(ear)g(on)g(prin)m(ted)g(co)m(v)m(ers)i(that)f +(brac)m(k)m(et)h(the)f(whole)f(aggregate.)199 1713 y(8.)61 +b(TRANSLA)-8 b(TION)330 1855 y(T)g(ranslation)41 b(is)f(considered)f(a) +i(kind)e(of)h(mo)s(di\014cation,)j(so)d(y)m(ou)g(ma)m(y)h(distribute)e +(translations)330 1965 y(of)45 b(the)f(Do)s(cumen)m(t)h(under)e(the)h +(terms)h(of)f(section)i(4.)83 b(Replacing)45 b(In)m(v)-5 +b(arian)m(t)45 b(Sections)g(with)330 2074 y(translations)h(requires)f +(sp)s(ecial)h(p)s(ermission)f(from)g(their)g(cop)m(yrigh)m(t)i +(holders,)i(but)c(y)m(ou)g(ma)m(y)330 2184 y(include)24 +b(translations)i(of)e(some)h(or)g(all)g(In)m(v)-5 b(arian)m(t)25 +b(Sections)g(in)f(addition)h(to)g(the)g(original)h(v)m(ersions)330 +2293 y(of)32 b(these)f(In)m(v)-5 b(arian)m(t)33 b(Sections.)44 +b(Y)-8 b(ou)32 b(ma)m(y)g(include)f(a)h(translation)g(of)g(this)f +(License,)i(and)d(all)j(the)330 2403 y(license)42 b(notices)g(in)f(the) +h(Do)s(cumen)m(t,)j(and)40 b(an)m(y)i(W)-8 b(arran)m(t)m(y)42 +b(Disclaimers,)k(pro)m(vided)41 b(that)h(y)m(ou)330 2513 +y(also)f(include)f(the)g(original)h(English)f(v)m(ersion)g(of)g(this)g +(License)h(and)e(the)h(original)h(v)m(ersions)g(of)330 +2622 y(those)35 b(notices)g(and)e(disclaimers.)53 b(In)33 +b(case)i(of)g(a)f(disagreemen)m(t)h(b)s(et)m(w)m(een)g(the)f +(translation)i(and)330 2732 y(the)f(original)i(v)m(ersion)e(of)h(this)f +(License)h(or)f(a)g(notice)i(or)e(disclaimer,)i(the)f(original)g(v)m +(ersion)g(will)330 2841 y(prev)-5 b(ail.)330 2984 y(If)28 +b(a)h(section)h(in)e(the)h(Do)s(cumen)m(t)h(is)e(En)m(titled)i(\\Ac)m +(kno)m(wledgemen)m(ts",)i(\\Dedications",)g(or)d(\\His-)330 +3093 y(tory",)f(the)f(requiremen)m(t)f(\(section)i(4\))f(to)g(Preserv)m +(e)g(its)f(Title)i(\(section)f(1\))g(will)g(t)m(ypically)h(require)330 +3203 y(c)m(hanging)j(the)g(actual)h(title.)199 3345 y(9.)61 +b(TERMINA)-8 b(TION)330 3488 y(Y)g(ou)30 b(ma)m(y)h(not)f(cop)m(y)-8 +b(,)31 b(mo)s(dify)-8 b(,)30 b(sublicense,)g(or)g(distribute)f(the)h +(Do)s(cumen)m(t)g(except)h(as)f(expressly)330 3598 y(pro)m(vided)38 +b(under)f(this)i(License.)65 b(An)m(y)39 b(attempt)h(otherwise)f(to)g +(cop)m(y)-8 b(,)42 b(mo)s(dify)-8 b(,)40 b(sublicense,)h(or)330 +3707 y(distribute)30 b(it)h(is)f(v)m(oid,)h(and)f(will)h(automatically) +i(terminate)f(y)m(our)e(righ)m(ts)h(under)e(this)h(License.)330 +3850 y(Ho)m(w)m(ev)m(er,)35 b(if)e(y)m(ou)f(cease)i(all)f(violation)i +(of)d(this)g(License,)i(then)e(y)m(our)h(license)g(from)f(a)h +(particular)330 3959 y(cop)m(yrigh)m(t)k(holder)e(is)h(reinstated)h +(\(a\))f(pro)m(visionally)-8 b(,)39 b(unless)c(and)g(un)m(til)h(the)g +(cop)m(yrigh)m(t)h(holder)330 4069 y(explicitly)42 b(and)e(\014nally)h +(terminates)g(y)m(our)g(license,)j(and)c(\(b\))h(p)s(ermanen)m(tly)-8 +b(,)43 b(if)e(the)g(cop)m(yrigh)m(t)330 4178 y(holder)34 +b(fails)h(to)g(notify)g(y)m(ou)g(of)f(the)h(violation)h(b)m(y)e(some)h +(reasonable)g(means)g(prior)e(to)i(60)h(da)m(ys)330 4288 +y(after)31 b(the)f(cessation.)330 4430 y(Moreo)m(v)m(er,)k(y)m(our)d +(license)i(from)e(a)h(particular)f(cop)m(yrigh)m(t)i(holder)e(is)h +(reinstated)g(p)s(ermanen)m(tly)f(if)330 4540 y(the)d(cop)m(yrigh)m(t)h +(holder)f(noti\014es)g(y)m(ou)g(of)g(the)g(violation)h(b)m(y)f(some)g +(reasonable)h(means,)f(this)g(is)g(the)330 4650 y(\014rst)f(time)i(y)m +(ou)f(ha)m(v)m(e)h(receiv)m(ed)g(notice)g(of)f(violation)i(of)e(this)f +(License)i(\(for)f(an)m(y)g(w)m(ork\))g(from)f(that)330 +4759 y(cop)m(yrigh)m(t)33 b(holder,)g(and)e(y)m(ou)h(cure)g(the)g +(violation)i(prior)d(to)i(30)f(da)m(ys)h(after)f(y)m(our)g(receipt)h +(of)f(the)330 4869 y(notice.)330 5011 y(T)-8 b(ermination)28 +b(of)g(y)m(our)f(righ)m(ts)h(under)e(this)i(section)g(do)s(es)f(not)h +(terminate)h(the)e(licenses)i(of)f(parties)330 5121 y(who)38 +b(ha)m(v)m(e)h(receiv)m(ed)h(copies)e(or)h(righ)m(ts)f(from)g(y)m(ou)g +(under)f(this)h(License.)64 b(If)38 b(y)m(our)g(righ)m(ts)h(ha)m(v)m(e) +330 5230 y(b)s(een)25 b(terminated)i(and)e(not)h(p)s(ermanen)m(tly)g +(reinstated,)i(receipt)f(of)f(a)g(cop)m(y)h(of)f(some)h(or)f(all)h(of)f +(the)330 5340 y(same)31 b(material)h(do)s(es)e(not)g(giv)m(e)i(y)m(ou)f +(an)m(y)g(righ)m(ts)f(to)i(use)e(it.)p eop end +%%Page: 173 179 +TeXDict begin 173 178 bop 150 -116 a Fu(App)s(endix)29 +b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560 +b(173)154 299 y(10.)61 b(FUTURE)30 b(REVISIONS)f(OF)i(THIS)e(LICENSE) +330 433 y(The)41 b(F)-8 b(ree)43 b(Soft)m(w)m(are)f(F)-8 +b(oundation)43 b(ma)m(y)f(publish)e(new,)k(revised)d(v)m(ersions)h(of)g +(the)g(GNU)g(F)-8 b(ree)330 543 y(Do)s(cumen)m(tation)34 +b(License)e(from)g(time)h(to)g(time.)46 b(Suc)m(h)31 +b(new)h(v)m(ersions)g(will)h(b)s(e)e(similar)h(in)g(spirit)330 +653 y(to)j(the)g(presen)m(t)f(v)m(ersion,)i(but)e(ma)m(y)h(di\013er)f +(in)g(detail)h(to)g(address)f(new)g(problems)f(or)i(concerns.)330 +762 y(See)c Ft(http://www.gnu.org/copy)o(left)o(/)p Fu(.)330 +897 y(Eac)m(h)f(v)m(ersion)g(of)g(the)f(License)h(is)g(giv)m(en)g(a)g +(distinguishing)f(v)m(ersion)h(n)m(um)m(b)s(er.)39 b(If)29 +b(the)g(Do)s(cumen)m(t)330 1006 y(sp)s(eci\014es)45 b(that)h(a)g +(particular)f(n)m(um)m(b)s(ered)f(v)m(ersion)i(of)f(this)g(License)h +(\\or)g(an)m(y)g(later)g(v)m(ersion")330 1116 y(applies)33 +b(to)g(it,)h(y)m(ou)e(ha)m(v)m(e)i(the)f(option)g(of)f(follo)m(wing)i +(the)f(terms)f(and)g(conditions)h(either)g(of)f(that)330 +1225 y(sp)s(eci\014ed)37 b(v)m(ersion)i(or)e(of)h(an)m(y)h(later)g(v)m +(ersion)f(that)g(has)g(b)s(een)f(published)f(\(not)j(as)f(a)g(draft\))g +(b)m(y)330 1335 y(the)33 b(F)-8 b(ree)34 b(Soft)m(w)m(are)f(F)-8 +b(oundation.)49 b(If)32 b(the)h(Do)s(cumen)m(t)g(do)s(es)g(not)g(sp)s +(ecify)f(a)h(v)m(ersion)g(n)m(um)m(b)s(er)f(of)330 1445 +y(this)i(License,)j(y)m(ou)d(ma)m(y)i(c)m(ho)s(ose)f(an)m(y)g(v)m +(ersion)g(ev)m(er)g(published)e(\(not)i(as)g(a)f(draft\))h(b)m(y)f(the) +h(F)-8 b(ree)330 1554 y(Soft)m(w)m(are)33 b(F)-8 b(oundation.)46 +b(If)32 b(the)g(Do)s(cumen)m(t)g(sp)s(eci\014es)g(that)g(a)h(pro)m(xy)f +(can)g(decide)g(whic)m(h)g(future)330 1664 y(v)m(ersions)h(of)g(this)f +(License)h(can)g(b)s(e)f(used,)g(that)i(pro)m(xy's)e(public)g(statemen) +m(t)i(of)f(acceptance)i(of)e(a)330 1773 y(v)m(ersion)e(p)s(ermanen)m +(tly)f(authorizes)h(y)m(ou)g(to)g(c)m(ho)s(ose)g(that)g(v)m(ersion)g +(for)f(the)h(Do)s(cumen)m(t.)154 1908 y(11.)61 b(RELICENSING)330 +2042 y(\\Massiv)m(e)39 b(Multiauthor)f(Collab)s(oration)g(Site")h(\(or) +e(\\MMC)h(Site"\))h(means)e(an)m(y)h(W)-8 b(orld)37 b(Wide)330 +2152 y(W)-8 b(eb)36 b(serv)m(er)g(that)h(publishes)d(cop)m(yrigh)m +(table)k(w)m(orks)e(and)f(also)i(pro)m(vides)e(prominen)m(t)h +(facilities)330 2262 y(for)27 b(an)m(yb)s(o)s(dy)g(to)h(edit)g(those)g +(w)m(orks.)39 b(A)28 b(public)f(wiki)h(that)g(an)m(yb)s(o)s(dy)e(can)i +(edit)g(is)f(an)h(example)g(of)330 2371 y(suc)m(h)33 +b(a)h(serv)m(er.)51 b(A)34 b(\\Massiv)m(e)i(Multiauthor)e(Collab)s +(oration")h(\(or)f(\\MMC"\))h(con)m(tained)g(in)f(the)330 +2481 y(site)d(means)f(an)m(y)h(set)g(of)g(cop)m(yrigh)m(table)h(w)m +(orks)e(th)m(us)g(published)f(on)h(the)h(MMC)f(site.)330 +2615 y(\\CC-BY-SA")36 b(means)f(the)g(Creativ)m(e)i(Commons)e(A)m +(ttribution-Share)g(Alik)m(e)i(3.0)f(license)g(pub-)330 +2725 y(lished)27 b(b)m(y)f(Creativ)m(e)j(Commons)d(Corp)s(oration,)h(a) +g(not-for-pro\014t)g(corp)s(oration)h(with)e(a)h(principal)330 +2834 y(place)g(of)f(business)e(in)i(San)f(F)-8 b(rancisco,)29 +b(California,)f(as)e(w)m(ell)h(as)f(future)f(cop)m(yleft)i(v)m(ersions) +f(of)g(that)330 2944 y(license)31 b(published)e(b)m(y)h(that)h(same)g +(organization.)330 3078 y(\\Incorp)s(orate")h(means)e(to)h(publish)e +(or)i(republish)e(a)i(Do)s(cumen)m(t,)g(in)g(whole)g(or)f(in)g(part,)h +(as)g(part)330 3188 y(of)g(another)f(Do)s(cumen)m(t.)330 +3323 y(An)c(MMC)g(is)h(\\eligible)h(for)e(relicensing")h(if)g(it)f(is)h +(licensed)f(under)f(this)h(License,)i(and)e(if)g(all)h(w)m(orks)330 +3432 y(that)43 b(w)m(ere)f(\014rst)f(published)f(under)h(this)h +(License)g(somewhere)g(other)g(than)g(this)g(MMC,)h(and)330 +3542 y(subsequen)m(tly)34 b(incorp)s(orated)h(in)f(whole)h(or)g(in)f +(part)h(in)m(to)h(the)f(MMC,)g(\(1\))h(had)e(no)h(co)m(v)m(er)h(texts) +330 3651 y(or)30 b(in)m(v)-5 b(arian)m(t)32 b(sections,)g(and)d(\(2\))j +(w)m(ere)f(th)m(us)f(incorp)s(orated)g(prior)g(to)h(No)m(v)m(em)m(b)s +(er)g(1,)g(2008.)330 3786 y(The)40 b(op)s(erator)h(of)g(an)f(MMC)h +(Site)g(ma)m(y)g(republish)e(an)h(MMC)h(con)m(tained)h(in)e(the)h(site) +g(under)330 3895 y(CC-BY-SA)30 b(on)g(the)h(same)f(site)h(at)g(an)m(y)g +(time)g(b)s(efore)e(August)h(1,)h(2009,)h(pro)m(vided)e(the)g(MMC)h(is) +330 4005 y(eligible)h(for)e(relicensing.)p eop end +%%Page: 174 180 +TeXDict begin 174 179 bop 150 -116 a Fu(App)s(endix)29 +b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560 +b(174)150 299 y Fs(ADDENDUM:)45 b(Ho)l(w)h(to)f(use)g(this)h(License)f +(for)g(y)l(our)g(do)t(cumen)l(ts)150 458 y Fu(T)-8 b(o)35 +b(use)f(this)h(License)g(in)f(a)h(do)s(cumen)m(t)g(y)m(ou)f(ha)m(v)m(e) +i(written,)g(include)f(a)f(cop)m(y)i(of)f(the)f(License)h(in)g(the)150 +568 y(do)s(cumen)m(t)30 b(and)g(put)g(the)g(follo)m(wing)i(cop)m(yrigh) +m(t)g(and)e(license)h(notices)g(just)f(after)h(the)g(title)h(page:)468 +680 y Fe(Copyright)42 b(\(C\))79 b Fd(year)g(your)40 +b(name)p Fe(.)468 767 y(Permission)i(is)e(granted)g(to)g(copy,)h +(distribute)g(and/or)g(modify)f(this)g(document)468 854 +y(under)h(the)f(terms)g(of)g(the)g(GNU)g(Free)g(Documentation)i +(License,)f(Version)g(1.3)468 941 y(or)f(any)g(later)g(version)h +(published)h(by)d(the)h(Free)g(Software)h(Foundation;)468 +1029 y(with)g(no)e(Invariant)j(Sections,)f(no)f(Front-Cover)h(Texts,)g +(and)f(no)f(Back-Cover)468 1116 y(Texts.)80 b(A)40 b(copy)g(of)g(the)f +(license)i(is)f(included)h(in)f(the)g(section)g(entitled)h(``GNU)468 +1203 y(Free)g(Documentation)h(License''.)275 1337 y Fu(If)d(y)m(ou)h +(ha)m(v)m(e)h(In)m(v)-5 b(arian)m(t)41 b(Sections,)i(F)-8 +b(ron)m(t-Co)m(v)m(er)42 b(T)-8 b(exts)41 b(and)e(Bac)m(k-Co)m(v)m(er)k +(T)-8 b(exts,)43 b(replace)e(the)150 1447 y(\\with)6 +b(.)22 b(.)g(.)12 b(T)-8 b(exts.")41 b(line)31 b(with)f(this:)547 +1559 y Fe(with)40 b(the)g(Invariant)h(Sections)g(being)g +Fd(list)f(their)g(titles)p Fe(,)h(with)547 1646 y(the)f(Front-Cover)i +(Texts)e(being)g Fd(list)p Fe(,)h(and)f(with)g(the)g(Back-Cover)h +(Texts)547 1733 y(being)f Fd(list)p Fe(.)275 1868 y Fu(If)34 +b(y)m(ou)i(ha)m(v)m(e)g(In)m(v)-5 b(arian)m(t)36 b(Sections)g(without)f +(Co)m(v)m(er)h(T)-8 b(exts,)38 b(or)d(some)g(other)h(com)m(bination)g +(of)g(the)150 1978 y(three,)31 b(merge)g(those)g(t)m(w)m(o)g +(alternativ)m(es)i(to)e(suit)f(the)h(situation.)275 2112 +y(If)23 b(y)m(our)h(do)s(cumen)m(t)f(con)m(tains)i(non)m(trivial)g +(examples)g(of)f(program)f(co)s(de,)j(w)m(e)e(recommend)g(releasing)150 +2222 y(these)44 b(examples)f(in)g(parallel)h(under)e(y)m(our)h(c)m +(hoice)i(of)e(free)g(soft)m(w)m(are)h(license,)k(suc)m(h)43 +b(as)g(the)g(GNU)150 2331 y(General)31 b(Public)f(License,)i(to)f(p)s +(ermit)e(their)i(use)f(in)g(free)g(soft)m(w)m(are.)p +eop end +%%Page: 175 181 +TeXDict begin 175 180 bop 3614 -116 a Fu(175)150 299 +y Fp(App)t(endix)52 b(D)81 b(Indexes)150 639 y Fs(D.1)68 +b(Index)45 b(of)g(Shell)g(Builtin)g(Commands)146 806 +y(.)150 923 y Fe(.)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)33 b Fb(44)146 1163 y Fs(:)150 1280 y Fe(:)19 b Fc(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 b Fb(44)146 +1523 y Fs([)150 1640 y Fe([)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)33 b Fb(48)146 1881 y Fs(A)150 1998 y Fe(alias)9 +b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 b Fb(51)146 2239 y +Fs(B)150 2356 y Fe(bg)14 b Fc(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)29 +b Fb(108)150 2443 y Fe(bind)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(51)150 2531 y Fe(break)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 +b Fb(45)150 2618 y Fe(builtin)f Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fb(53)146 2859 y Fs(C)150 2976 y Fe(caller)6 b Fc(:)15 +b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)20 b Fb(53)150 3063 y Fe(cd)c Fc(:)e(:)f(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)31 b Fb(45)150 3151 y Fe(command)22 +b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)35 b Fb(53)150 3238 y Fe(compgen)18 +b Fc(:)d(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)33 b Fb(139)150 3326 y Fe(complete)16 +b Fc(:)f(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)31 b Fb(140)150 3413 y Fe(compopt)18 b Fc(:)d(:)e(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 +b Fb(143)150 3501 y Fe(continue)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)32 b +Fb(45)146 3741 y Fs(D)150 3858 y Fe(declare)22 b Fc(:)13 +b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)35 b Fb(53)150 3946 y Fe(dirs)11 b Fc(:)j(:)f(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)25 b Fb(97)150 4033 y Fe(disown)d Fc(:)13 +b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)36 b Fb(110)146 4274 y Fs(E)150 4391 y Fe(echo)11 +b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 b Fb(55)150 4478 +y Fe(enable)6 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)20 b Fb(56)150 +4566 y Fe(eval)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(45)150 4653 y Fe(exec)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(46)150 4741 y Fe(exit)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(46)150 4828 y Fe(export)6 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)20 +b Fb(46)146 5080 y Fs(F)150 5197 y Fe(fc)14 b Fc(:)g(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)29 b Fb(147)150 5284 y Fe(fg)14 b Fc(:)g(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)29 b Fb(108)2021 871 y Fs(G)2025 988 y Fe(getopts)22 +b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)35 b Fb(46)2021 1250 y Fs(H)2025 +1369 y Fe(hash)11 b Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 +b Fb(47)2025 1457 y Fe(help)11 b Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 +b Fb(56)2025 1544 y Fe(history)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b +Fb(147)2021 1806 y Fs(J)2025 1924 y Fe(jobs)9 b Fc(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)24 b Fb(108)2021 2186 y Fs(K)2025 +2303 y Fe(kill)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)24 +b Fb(109)2021 2554 y Fs(L)2025 2672 y Fe(let)14 b Fc(:)f(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)28 b Fb(56)2025 2760 y Fe(local)9 b Fc(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)23 b Fb(57)2025 2848 y Fe(logout)6 +b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b Fb(57)2021 3110 y Fs(M)2025 +3227 y Fe(mapfile)h Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fb(57)2021 +3489 y Fs(P)2025 3608 y Fe(popd)11 b Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 +b Fb(98)2025 3696 y Fe(printf)6 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 +b Fb(58)2025 3784 y Fe(pushd)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)23 +b Fb(98)2025 3871 y Fe(pwd)14 b Fc(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)28 +b Fb(47)2021 4133 y Fs(R)2025 4251 y Fe(read)11 b Fc(:)j(:)f(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)26 b Fb(58)2025 4339 y Fe(readarray)15 b +Fc(:)g(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)30 b Fb(60)2025 4427 y Fe(readonly)18 b Fc(:)d(:)e(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 +b Fb(47)2025 4515 y Fe(return)6 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 +b Fb(48)2021 4765 y Fs(S)2025 4884 y Fe(set)14 b Fc(:)f(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)28 b Fb(62)2025 4972 y Fe(shift)9 b Fc(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)23 b Fb(48)2025 5060 y Fe(shopt)9 +b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)23 b Fb(66)2025 5148 +y Fe(source)6 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b Fb(60)2025 +5235 y Fe(suspend)d Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fb(110)p eop end +%%Page: 176 182 +TeXDict begin 176 181 bop 150 -116 a Fu(App)s(endix)29 +b(D:)i(Indexes)2623 b(176)146 294 y Fs(T)150 410 y Fe(test)11 +b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 b Fb(48)150 497 +y Fe(times)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 b Fb(50)150 +584 y Fe(trap)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(50)150 671 y Fe(type)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(60)150 758 y Fe(typeset)d Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fb(61)146 1003 y Fs(U)150 1119 y Fe(ulimit)6 b Fc(:)15 +b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)20 b Fb(61)150 1206 y Fe(umask)9 +b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 b Fb(51)150 1293 y +Fe(unalias)f Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 b Fb(62)150 1380 y +Fe(unset)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 b Fb(51)2021 +294 y Fs(W)2025 433 y Fe(wait)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)24 +b Fb(109)150 2133 y Fs(D.2)68 b(Index)45 b(of)g(Shell)g(Reserv)l(ed)h +(W)-11 b(ords)146 2704 y(!)150 2820 y Fe(!)21 b Fc(:)13 +b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b Fb(8)146 +3056 y Fs([)150 3172 y Fe([[)16 b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)31 b Fb(13)146 3414 y Fs(])150 3530 y Fe(]])16 b +Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)31 b Fb(13)146 +3770 y Fa({)150 3886 y Fe({)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)33 b Fb(15)146 4125 y Fa(})150 4241 y Fe(})19 +b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 b +Fb(15)146 4475 y Fs(C)150 4591 y Fe(case)11 b Fc(:)j(:)f(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)25 b Fb(11)146 4825 y Fs(D)150 4941 y Fe(do)16 +b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)31 b Fb(10)150 +5028 y Fe(done)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(10)146 5261 y Fs(E)150 5377 y Fe(elif)11 b Fc(:)j(:)f(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)25 b Fb(11)150 5465 y Fe(else)11 b Fc(:)j(:)f(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)25 b Fb(11)150 5552 y Fe(esac)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)25 b Fb(11)2021 2703 y Fs(F)2025 2836 y Fe(fi)16 +b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)31 b Fb(11)2025 +2928 y Fe(for)14 b Fc(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)28 +b Fb(10)2025 3015 y Fe(function)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 b +Fb(18)2021 3359 y Fs(I)2025 3491 y Fe(if)16 b Fc(:)e(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)31 b Fb(11)2025 3578 y Fe(in)16 b Fc(:)e(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)31 b Fb(11)2021 3921 y Fs(S)2025 +4048 y Fe(select)6 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b +Fb(12)2021 4392 y Fs(T)2025 4524 y Fe(then)11 b Fc(:)j(:)f(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)26 b Fb(11)2025 4611 y Fe(time)13 b Fc(:)h(:)f(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)28 b Fb(8)2021 4954 y Fs(U)2025 5081 y +Fe(until)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)23 b Fb(10)2021 +5425 y Fs(W)2025 5552 y Fe(while)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)23 +b Fb(10)p eop end +%%Page: 177 183 +TeXDict begin 177 182 bop 150 -116 a Fu(App)s(endix)29 +b(D:)i(Indexes)2623 b(177)150 299 y Fs(D.3)68 b(P)l(arameter)47 +b(and)d(V)-11 b(ariable)46 b(Index)146 955 y(!)150 1073 +y Fe(!)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 +b Fb(22)146 1327 y Fs(#)150 1445 y Fe(#)19 b Fc(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 b Fb(22)146 +1701 y Fs($)150 1820 y Fe($)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)33 b Fb(22)150 1909 y Fe($!)16 b Fc(:)e(:)f(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)31 b Fb(22)150 1997 y Fe($#)16 b Fc(:)e(:)f(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)31 b Fb(22)150 2085 y Fe($$)16 b Fc(:)e(:)f(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)31 b Fb(22)150 2173 y Fe($*)16 +b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)31 b Fb(22)150 +2261 y Fe($-)16 b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)31 +b Fb(22)150 2350 y Fe($?)16 b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +31 b Fb(22)150 2438 y Fe($@)16 b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)31 b Fb(22)150 2526 y Fe($_)16 b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)31 b Fb(73)150 2613 y Fe($0)16 b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)31 b Fb(22)146 2876 y Fs(*)150 2994 y Fe(*)19 +b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 b +Fb(22)146 3248 y Fs({)150 3366 y Fe(-)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)33 b Fb(22)146 3620 y Fs(?)150 3738 +y Fe(?)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 +b Fb(22)146 3992 y Fs(@)150 4110 y Fe(@)19 b Fc(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 b Fb(22)p +156 4364 41 6 v 150 4482 a Fe(_)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)33 b Fb(73)146 4736 y Fs(0)150 4854 y +Fe(0)19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 +b Fb(22)146 5108 y Fs(A)150 5226 y Fe(auto_resume)8 b +Fc(:)16 b(:)d(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +23 b Fb(110)2021 954 y Fs(B)2025 1074 y Fe(BASH)11 b +Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 b Fb(74)2025 1163 +y Fe(BASH_ALIASES)8 b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)22 b Fb(74)2025 1251 y Fe(BASH_ARGC)15 +b Fc(:)g(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)30 b Fb(74)2025 1340 y Fe(BASH_ARGV)15 b Fc(:)g(:)f(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 +b Fb(74)2025 1429 y Fe(BASH_ARGV0)13 b Fc(:)i(:)e(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)27 b Fb(75)2025 +1517 y Fe(BASH_CMDS)15 b Fc(:)g(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 b Fb(75)2025 1606 +y Fe(BASH_COMMAND)8 b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)22 b Fb(75)2025 1695 y Fe(BASH_COMPAT)10 +b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)25 b Fb(75)2025 1783 y Fe(BASH_ENV)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 +b Fb(75)2025 1872 y Fe(BASH_EXECUTION_STRING)24 b Fc(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)34 b Fb(75)2025 1960 y Fe(BASH_LINENO)10 +b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)25 b Fb(75)2025 2049 y Fe(BASH_LOADABLES_PATH)7 b +Fc(:)17 b(:)c(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)22 b Fb(76)2025 +2138 y Fe(BASH_REMATCH)8 b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)22 b Fb(76)2025 2226 y Fe(BASH_SOURCE)10 +b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)25 b Fb(76)2025 2315 y Fe(BASH_SUBSHELL)g Fc(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 +b Fb(76)2025 2403 y Fe(BASH_VERSINFO)25 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 b Fb(76)2025 2492 +y Fe(BASH_VERSION)8 b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)22 b Fb(76)2025 2581 y Fe(BASH_XTRACEFD)j +Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 +b Fb(76)2025 2669 y Fe(BASHOPTS)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 b +Fb(74)2025 2758 y Fe(BASHPID)22 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 +b Fb(74)2025 2847 y Fe(bell-style)11 b Fc(:)k(:)e(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)26 b Fb(115)2025 +2935 y Fe(bind-tty-special-chars)14 b Fc(:)k(:)13 b(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)29 +b Fb(115)2025 3022 y Fe(blink-matching-paren)24 b Fc(:)13 +b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)34 b Fb(115)2021 3297 y Fs(C)2025 +3417 y Fe(CDPATH)6 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b +Fb(73)2025 3506 y Fe(CHILD_MAX)15 b Fc(:)g(:)f(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 b Fb(77)2025 +3595 y Fe(colored-completion-prefix)7 b Fc(:)18 b(:)13 +b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)22 +b Fb(115)2025 3683 y Fe(colored-stats)h Fc(:)13 b(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fb(115)2025 3772 y Fe(COLUMNS)22 +b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)35 b Fb(77)2025 3860 y Fe(comment-begin)23 +b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 +b Fb(115)2025 3949 y Fe(COMP_CWORD)13 b Fc(:)i(:)e(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)27 b Fb(77)2025 +4038 y Fe(COMP_KEY)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 b Fb(77)2025 4126 +y Fe(COMP_LINE)15 b Fc(:)g(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 b Fb(77)2025 4215 y Fe(COMP_POINT)13 +b Fc(:)i(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)27 b Fb(77)2025 4303 y Fe(COMP_TYPE)15 b Fc(:)g(:)f(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 +b Fb(77)2025 4392 y Fe(COMP_WORDBREAKS)17 b Fc(:)g(:)c(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)32 b Fb(77)2025 4481 y Fe(COMP_WORDS)13 +b Fc(:)i(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)27 b Fb(77)2025 4569 y Fe(completion-display-width)9 +b Fc(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)24 b Fb(115)2025 4658 y Fe(completion-ignore-case)14 +b Fc(:)k(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)29 b Fb(116)2025 4747 y Fe(completion-map-case)d +Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 b Fb(116)2025 4835 +y Fe(completion-prefix-display-leng)q(th)29 b Fc(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38 b Fb(116)2025 4924 +y Fe(completion-query-items)14 b Fc(:)k(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)29 +b Fb(116)2025 5012 y Fe(COMPREPLY)15 b Fc(:)g(:)f(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 b +Fb(78)2025 5101 y Fe(convert-meta)25 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)38 b Fb(116)2025 5188 +y Fe(COPROC)6 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b Fb(78)p +eop end +%%Page: 178 184 +TeXDict begin 178 183 bop 150 -116 a Fu(App)s(endix)29 +b(D:)i(Indexes)2623 b(178)146 294 y Fs(D)150 416 y Fe(DIRSTACK)18 +b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)32 b Fb(78)150 503 y Fe(disable-completion)7 +b Fc(:)18 b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)22 b Fb(116)146 +791 y Fs(E)150 913 y Fe(echo-control-characters)12 b +Fc(:)18 b(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)26 b Fb(116)150 1002 y Fe(editing-mode)f +Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)37 +b Fb(116)150 1092 y Fe(emacs-mode-string)10 b Fc(:)17 +b(:)c(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)25 b Fb(117)150 1181 +y Fe(EMACS)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 b Fb(78)150 +1270 y Fe(enable-bracketed-paste)14 b Fc(:)k(:)c(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)29 +b Fb(117)150 1359 y Fe(enable-keypad)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 b Fb(117)150 1449 y Fe(ENV)14 +b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)28 b Fb(78)150 +1538 y Fe(EPOCHREALTIME)d Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)37 b Fb(78)150 1627 y Fe(EPOCHSECONDS)8 +b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +22 b Fb(78)150 1716 y Fe(EUID)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(78)150 1806 y Fe(EXECIGNORE)13 b Fc(:)i(:)e(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)27 b Fb(78)150 +1893 y Fe(expand-tilde)e Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)37 b Fb(117)146 2180 y Fs(F)150 2303 +y Fe(FCEDIT)6 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)20 b Fb(79)150 +2392 y Fe(FIGNORE)i Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 b Fb(79)150 +2481 y Fe(FUNCNAME)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)32 b Fb(79)150 2568 +y Fe(FUNCNEST)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)32 b Fb(79)146 2844 y +Fs(G)150 2967 y Fe(GLOBIGNORE)13 b Fc(:)i(:)e(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)27 b Fb(79)150 +3054 y Fe(GROUPS)6 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)20 b +Fb(79)146 3330 y Fs(H)150 3452 y Fe(histchars)15 b Fc(:)h(:)d(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)30 +b Fb(79)150 3542 y Fe(HISTCMD)22 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fb(79)150 3631 y Fe(HISTCONTROL)10 b Fc(:)16 b(:)d(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)25 b Fb(80)150 +3720 y Fe(HISTFILE)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)32 b Fb(80)150 3809 +y Fe(HISTFILESIZE)8 b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)22 b Fb(80)150 3899 y Fe(HISTIGNORE)13 +b Fc(:)i(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)27 b Fb(80)150 3988 y Fe(history-preserve-point)14 +b Fc(:)k(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)29 b Fb(117)150 4077 y Fe(history-size)c +Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)37 +b Fb(117)150 4166 y Fe(HISTSIZE)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)32 b +Fb(80)150 4256 y Fe(HISTTIMEFORMAT)23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 b Fb(80)150 4345 y Fe(HOME)11 +b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 b Fb(73)150 4434 +y Fe(horizontal-scroll-mode)14 b Fc(:)k(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)29 b Fb(117)150 +4523 y Fe(HOSTFILE)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)32 b Fb(81)150 4613 +y Fe(HOSTNAME)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)32 b Fb(81)150 4700 y +Fe(HOSTTYPE)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)32 b Fb(81)2021 294 y Fs(I)2025 +420 y Fe(IFS)14 b Fc(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)28 +b Fb(73)2025 510 y Fe(IGNOREEOF)15 b Fc(:)g(:)f(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 b Fb(81)2025 +600 y Fe(input-meta)11 b Fc(:)k(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)26 b Fb(118)2025 691 y Fe(INPUTRC)c +Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)35 b Fb(81)2025 781 y Fe(INSIDE_EMACS)8 +b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +22 b Fb(81)2025 868 y Fe(isearch-terminators)k Fc(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)37 b Fb(118)2021 1167 y Fs(K)2025 +1290 y Fe(keymap)22 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)36 b Fb(118)2021 +1601 y Fs(L)2025 1727 y Fe(LANG)11 b Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 +b Fb(81)2025 1817 y Fe(LC_ALL)6 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 +b Fb(81)2025 1907 y Fe(LC_COLLATE)13 b Fc(:)i(:)e(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)27 b Fb(81)2025 +1998 y Fe(LC_CTYPE)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 b Fb(81)2025 2088 +y Fe(LC_MESSAGES)21 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)34 b Fb(7,)26 b(81)2025 2178 y Fe(LC_NUMERIC)13 +b Fc(:)i(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)27 b Fb(82)2025 2269 y Fe(LC_TIME)22 b Fc(:)13 +b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)35 b Fb(82)2025 2359 y Fe(LINENO)6 b Fc(:)14 +b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)21 b Fb(82)2025 2446 y Fe(LINES)9 +b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)23 b Fb(82)2021 2746 +y Fs(M)2025 2872 y Fe(MACHTYPE)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 b +Fb(82)2025 2962 y Fe(MAIL)11 b Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 +b Fb(73)2025 3052 y Fe(MAILCHECK)15 b Fc(:)g(:)f(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 b Fb(82)2025 +3143 y Fe(MAILPATH)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 b Fb(73)2025 3233 +y Fe(MAPFILE)22 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fb(82)2025 3323 +y Fe(mark-modified-lines)26 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 +b Fb(118)2025 3414 y Fe(mark-symlinked-directories)27 +b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +36 b Fb(119)2025 3504 y Fe(match-hidden-files)7 b Fc(:)17 +b(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)22 b Fb(119)2025 3594 +y Fe(menu-complete-display-prefix)17 b Fc(:)h(:)13 b(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)31 b Fb(119)2025 3681 y Fe(meta-flag)13 +b Fc(:)i(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)28 b Fb(118)2021 3992 y Fs(O)2025 4118 y Fe(OLDPWD)6 +b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b Fb(82)2025 4208 y Fe(OPTARG)6 +b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b Fb(73)2025 4299 y Fe(OPTERR)6 +b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b Fb(82)2025 4389 y Fe(OPTIND)6 +b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b Fb(73)2025 4480 y Fe(OSTYPE)6 +b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 b Fb(82)2025 4567 y Fe(output-meta)8 +b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +23 b Fb(119)p eop end +%%Page: 179 185 +TeXDict begin 179 184 bop 150 -116 a Fu(App)s(endix)29 +b(D:)i(Indexes)2623 b(179)146 294 y Fs(P)150 410 y Fe(page-completions) +13 b Fc(:)j(:)d(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)27 b Fb(119)150 +497 y Fe(PATH)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)25 +b Fb(73)150 584 y Fe(PIPESTATUS)13 b Fc(:)i(:)e(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)27 b Fb(82)150 +671 y Fe(POSIXLY_CORRECT)17 b Fc(:)g(:)c(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)32 b Fb(82)150 758 y Fe(PPID)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)25 b Fb(82)150 846 y Fe(PROMPT_COMMAND)e Fc(:)13 +b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 +b Fb(82)150 933 y Fe(PROMPT_DIRTRIM)23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 b Fb(83)150 1020 y Fe(PS0)14 +b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)28 b Fb(83)150 +1107 y Fe(PS1)14 b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)28 +b Fb(73)150 1194 y Fe(PS2)14 b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)28 +b Fb(73)150 1281 y Fe(PS3)14 b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)28 +b Fb(83)150 1369 y Fe(PS4)14 b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)28 +b Fb(83)150 1456 y Fe(PWD)14 b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)28 +b Fb(83)146 1689 y Fs(R)150 1804 y Fe(RANDOM)6 b Fc(:)15 +b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)20 b Fb(83)150 1892 y Fe(READLINE_LINE)25 +b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)37 +b Fb(83)150 1979 y Fe(READLINE_MARK)25 b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)37 b Fb(83)150 2066 y +Fe(READLINE_POINT)23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)34 b Fb(83)150 2153 y Fe(REPLY)9 b Fc(:)14 +b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)23 b Fb(83)150 2240 y Fe(revert-all-at-newline) +17 b Fc(:)h(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)32 b Fb(119)146 2473 y Fs(S)150 +2589 y Fe(SECONDS)22 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 b Fb(83)150 +2676 y Fe(SHELL)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 +b Fb(83)150 2763 y Fe(SHELLOPTS)15 b Fc(:)h(:)d(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)30 b Fb(83)150 +2851 y Fe(SHLVL)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 +b Fb(84)150 2938 y Fe(show-all-if-ambiguous)17 b Fc(:)h(:)13 +b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)32 b Fb(119)150 3025 y Fe(show-all-if-unmodified)14 +b Fc(:)k(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)29 b Fb(119)150 3112 y Fe(show-mode-in-prompt)d +Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)37 b Fb(120)2025 260 y +Fe(skip-completed-text)26 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 +b Fb(120)2025 347 y Fe(SRANDOM)22 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 +b Fb(84)2021 669 y Fs(T)2025 798 y Fe(TEXTDOMAIN)15 b +Fc(:)g(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)30 b Fb(7)2025 889 y Fe(TEXTDOMAINDIR)7 b Fc(:)16 +b(:)d(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)23 +b Fb(7)2025 981 y Fe(TIMEFORMAT)13 b Fc(:)i(:)e(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)27 b Fb(84)2025 +1072 y Fe(TMOUT)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)23 +b Fb(84)2025 1159 y Fe(TMPDIR)6 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)21 +b Fb(85)2021 1481 y Fs(U)2025 1606 y Fe(UID)14 b Fc(:)f(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)28 b Fb(85)2021 1928 y Fs(V)2025 2057 +y Fe(vi-cmd-mode-string)7 b Fc(:)17 b(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)22 +b Fb(120)2025 2148 y Fe(vi-ins-mode-string)7 b Fc(:)17 +b(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)22 b Fb(120)2025 2235 +y Fe(visible-stats)h Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)35 b Fb(120)150 3751 y Fs(D.4)68 b(F)-11 b(unction)44 +b(Index)146 4237 y(A)150 4354 y Fe(abort)27 b(\(C-g\))15 +b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)30 +b Fb(135)150 4442 y Fe(accept-line)e(\(Newline)g(or)e(Return\))12 +b Fc(:)i(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)27 +b Fb(128)150 4529 y Fe(alias-expand-line)i(\(\))9 b Fc(:)14 +b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)24 b Fb(137)146 4784 y Fs(B)150 +4902 y Fe(backward-char)29 b(\(C-b\))12 b Fc(:)i(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)26 b Fb(127)150 4989 y Fe(backward-delete-char)k(\(Rubout\))22 +b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 +b Fb(130)150 5077 y Fe(backward-kill-line)30 b(\(C-x)c(Rubout\))e +Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b +Fb(131)150 5165 y Fe(backward-kill-word)30 b(\(M-DEL\))11 +b Fc(:)j(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +26 b Fb(131)150 5252 y Fe(backward-word)j(\(M-b\))12 +b Fc(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)26 b Fb(127)150 5340 +y Fe(beginning-of-history)k(\(M-<\))11 b Fc(:)j(:)f(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 b Fb(128)2025 +4206 y Fe(beginning-of-line)j(\(C-a\))20 b Fc(:)13 b(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)34 +b Fb(127)2025 4294 y Fe(bracketed-paste-begin)c(\(\))16 +b Fc(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)31 b Fb(130)2021 4589 y Fs(C)2025 4713 y Fe +(call-last-kbd-macro)f(\(C-x)c(e\))15 b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)30 b Fb(134)2025 4802 +y Fe(capitalize-word)f(\(M-c\))7 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)22 +b Fb(131)2025 4892 y Fe(character-search)29 b(\(C-]\))22 +b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)36 b Fb(135)2025 4982 y Fe +(character-search-backward)31 b(\(M-C-]\))10 b Fc(:)15 +b(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)25 b Fb(135)2025 5071 +y Fe(clear-display)j(\(M-C-l\))7 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)22 +b Fb(128)2025 5161 y Fe(clear-screen)28 b(\(C-l\))14 +b Fc(:)h(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)29 b Fb(128)2025 +5250 y Fe(complete)e(\(TAB\))7 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)22 b Fb(133)2025 5340 y Fe(complete-command)29 +b(\(M-!\))22 b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 b Fb(134)p eop end +%%Page: 180 186 +TeXDict begin 180 185 bop 150 -116 a Fu(App)s(endix)29 +b(D:)i(Indexes)2623 b(180)150 264 y Fe(complete-filename)29 +b(\(M-/\))20 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)33 b Fb(133)150 353 y Fe(complete-hostname) +c(\(M-@\))20 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)33 b Fb(134)150 442 y Fe +(complete-into-braces)d(\(M-{\))11 b Fc(:)j(:)f(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 b Fb(134)150 531 +y Fe(complete-username)j(\(M-~\))20 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)33 +b Fb(133)150 621 y Fe(complete-variable)c(\(M-$\))20 +b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)33 b Fb(134)150 710 y Fe(copy-backward-word)d(\(\))7 +b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)21 b Fb(132)150 799 y Fe(copy-forward-word) +29 b(\(\))9 b Fc(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)24 b Fb(132)150 +887 y Fe(copy-region-as-kill)30 b(\(\))22 b Fc(:)13 b(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)36 +b Fb(132)146 1175 y Fs(D)150 1298 y Fe(dabbrev-expand)29 +b(\(\))17 b Fc(:)c(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)32 +b Fb(134)150 1387 y Fe(delete-char)c(\(C-d\))17 b Fc(:)d(:)f(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)32 b Fb(130)150 1476 y Fe(delete-char-or-list)e +(\(\))22 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)36 b Fb(133)150 1566 y Fe +(delete-horizontal-space)31 b(\(\))11 b Fc(:)i(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 b Fb(132)150 +1655 y Fe(digit-argument)j(\()p Fd(M-0)p Fe(,)e Fd(M-1)p +Fe(,)f(...)g Fd(M--)p Fe(\))11 b Fc(:)j(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:) +26 b Fb(132)150 1744 y Fe(display-shell-version)k(\(C-x)d(C-v\))c +Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b +Fb(136)150 1825 y Fe(do-lowercase-version)30 b(\(M-A,)227 +1912 y(M-B,)c(M-)p Fd(x)p Fe(,)h(...\))10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)25 b Fb(135)150 2001 y Fe(downcase-word)k(\(M-l\)) +12 b Fc(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)26 b Fb(131)150 2090 +y Fe(dump-functions)j(\(\))17 b Fc(:)c(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +32 b Fb(136)150 2180 y Fe(dump-macros)c(\(\))7 b Fc(:)14 +b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)22 +b Fb(136)150 2269 y Fe(dump-variables)29 b(\(\))17 b +Fc(:)c(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)32 b Fb(136)150 +2356 y Fe(dynamic-complete-history)f(\(M-TAB\))13 b Fc(:)i(:)e(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)27 b Fb(134)146 2645 y Fs(E)150 +2767 y Fe(edit-and-execute-command)k(\(C-x)c(C-e\))14 +b Fc(:)g(:)f(:)g(:)g(:)h(:)f(:)g(:)29 b Fb(137)150 2857 +y Fe(end-kbd-macro)g(\(C-x)d(\)\))13 b Fc(:)h(:)f(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)28 +b Fb(134)150 2946 y Fd(end-of-file)g Fe(\(usually)g(C-d\))21 +b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)35 b Fb(130)150 3035 y Fe(end-of-history)29 b(\(M->\))9 +b Fc(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)24 b Fb(128)150 3124 y +Fe(end-of-line)k(\(C-e\))17 b Fc(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)32 +b Fb(127)150 3212 y Fe(exchange-point-and-mark)f(\(C-x)26 +b(C-x\))17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)32 +b Fb(135)146 3500 y Fs(F)150 3623 y Fe(forward-backward-delete-char)g +(\(\))15 b Fc(:)f(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 +b Fb(130)150 3712 y Fe(forward-char)e(\(C-f\))14 b Fc(:)h(:)e(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)29 b Fb(127)150 3801 y Fe(forward-search-history)i +(\(C-s\))24 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)38 b Fb(128)150 3889 y Fe(forward-word)28 b(\(M-f\))14 +b Fc(:)h(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)29 b Fb(127)146 4167 +y Fs(G)150 4289 y Fe(glob-complete-word)h(\(M-g\))16 +b Fc(:)e(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)31 b Fb(136)150 4379 y Fe(glob-expand-word)e(\(C-x)e(*\))c +Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)38 b Fb(136)150 4466 y Fe(glob-list-expansions)30 +b(\(C-x)d(g\))13 b Fc(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)27 b Fb(136)2021 294 y Fs(H)2025 422 y Fe +(history-and-alias-expand-line)32 b(\(\))13 b Fc(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)28 b Fb(137)2025 513 y Fe(history-expand-line)i +(\(M-^\))13 b Fc(:)h(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)28 b Fb(136)2025 604 y Fe(history-search-backward)j +(\(\))11 b Fc(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)26 b Fb(129)2025 695 y Fe(history-search-forward)k(\(\))13 +b Fc(:)h(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)28 b Fb(129)2025 786 y Fe(history-substring-search-backw)q(ard)k +(\(\))20 b Fc(:)13 b(:)g(:)g(:)g(:)35 b Fb(129)2025 874 +y Fe(history-substring-search-forwa)q(rd)d(\(\))22 b +Fc(:)13 b(:)h(:)f(:)g(:)g(:)37 b Fb(129)2021 1200 y Fs(I)2025 +1329 y Fe(insert-comment)29 b(\(M-#\))9 b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +24 b Fb(136)2025 1420 y Fe(insert-completions)29 b(\(M-*\))16 +b Fc(:)f(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)31 b Fb(133)2025 1507 y Fe(insert-last-argument)f(\(M-.)c(or)g +(M-_\))7 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)22 +b Fb(137)2021 1834 y Fs(K)2025 1962 y Fe(kill-line)27 +b(\(C-k\))c Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 +b Fb(131)2025 2053 y Fe(kill-region)28 b(\(\))7 b Fc(:)14 +b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)22 +b Fb(132)2025 2144 y Fe(kill-whole-line)29 b(\(\))14 +b Fc(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)29 b Fb(131)2025 +2231 y Fe(kill-word)e(\(M-d\))c Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)37 b Fb(131)2021 2548 y Fs(M)2025 2676 y +Fe(magic-space)28 b(\(\))7 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)22 b Fb(137)2025 2767 y Fe(menu-complete)28 +b(\(\))20 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 +b Fb(133)2025 2854 y Fe(menu-complete-backward)c(\(\))13 +b Fc(:)h(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)28 b Fb(133)2021 3181 y Fs(N)2025 3309 y Fe(next-history)g(\(C-n\)) +14 b Fc(:)h(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)29 b Fb(128)2025 +3401 y Fe(next-screen-line)g(\(\))12 b Fc(:)h(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +27 b Fb(128)2025 3472 y Fe(non-incremental-forward-)2102 +3560 y(search-history)h(\(M-n\))23 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 +b Fb(129)2025 3647 y Fe(non-incremental-reverse-)2102 +3734 y(search-history)28 b(\(M-p\))23 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 +b Fb(128)2021 4070 y Fs(O)2025 4198 y Fe(operate-and-get-next)30 +b(\(C-o\))11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)26 b Fb(129)2025 4285 y Fe(overwrite-mode)j(\(\))17 +b Fc(:)c(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)32 b Fb(131)p +eop end +%%Page: 181 187 +TeXDict begin 181 186 bop 150 -116 a Fu(App)s(endix)29 +b(D:)i(Indexes)2623 b(181)146 294 y Fs(P)150 411 y Fe +(possible-command-completions)32 b(\(C-x)26 b(!\))9 b +Fc(:)14 b(:)g(:)f(:)g(:)g(:)24 b Fb(134)150 499 y Fe +(possible-completions)30 b(\(M-?\))11 b Fc(:)j(:)f(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 b Fb(133)150 +586 y Fe(possible-filename-completions)32 b(\(C-x)27 +b(/\))7 b Fc(:)13 b(:)g(:)g(:)g(:)22 b Fb(133)150 674 +y Fe(possible-hostname-completions)32 b(\(C-x)27 b(@\))7 +b Fc(:)13 b(:)g(:)g(:)g(:)22 b Fb(134)150 762 y Fe +(possible-username-completions)32 b(\(C-x)27 b(~\))7 +b Fc(:)13 b(:)g(:)g(:)g(:)22 b Fb(133)150 849 y Fe +(possible-variable-completions)32 b(\(C-x)27 b($\))7 +b Fc(:)13 b(:)g(:)g(:)g(:)22 b Fb(134)150 937 y Fe(prefix-meta)28 +b(\(ESC\))17 b Fc(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)32 +b Fb(135)150 1025 y Fe(previous-history)d(\(C-p\))23 +b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)36 b Fb(128)150 1112 y Fe(previous-screen-line)30 +b(\(\))19 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)33 b Fb(127)150 1199 y Fe +(print-last-kbd-macro)d(\(\))19 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)33 b Fb(134)146 +1453 y Fs(Q)150 1570 y Fe(quoted-insert)c(\(C-q)d(or)g(C-v\))8 +b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)22 b Fb(130)146 1824 y Fs(R)150 1941 y Fe(re-read-init-file)29 +b(\(C-x)e(C-r\))15 b Fc(:)f(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)30 b Fb(135)150 2029 y Fe(redraw-current-line)g(\(\))22 +b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)36 b Fb(128)150 2117 y Fe(reverse-search-history)31 +b(\(C-r\))24 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)38 b Fb(128)150 2204 y Fe(revert-line)28 b(\(M-r\))17 +b Fc(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)32 b Fb(135)146 +2447 y Fs(S)150 2565 y Fe(self-insert)c(\(a,)e(b,)g(A,)g(1,)h(!,)f +(...\))13 b Fc(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)27 +b Fb(130)150 2652 y Fe(set-mark)g(\(C-@\))7 b Fc(:)15 +b(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)22 +b Fb(135)150 2740 y Fe(shell-backward-kill-word)31 b(\(\))8 +b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +23 b Fb(131)150 2828 y Fe(shell-backward-word)30 b(\(M-C-b\))8 +b Fc(:)15 b(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +23 b Fb(127)150 2915 y Fe(shell-expand-line)29 b(\(M-C-e\))13 +b Fc(:)j(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)28 b Fb(136)150 3003 y Fe(shell-forward-word)i(\(M-C-f\))11 +b Fc(:)j(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +26 b Fb(127)150 3091 y Fe(shell-kill-word)j(\(M-C-d\))20 +b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)33 b Fb(131)150 3178 y Fe(shell-transpose-words)d +(\(M-C-t\))22 b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)35 b Fb(132)2025 264 y Fe(skip-csi-sequence)29 b(\(\))9 +b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)24 b Fb(135)2025 351 y +Fe(start-kbd-macro)29 b(\(C-x)d(\(\))8 b Fc(:)14 b(:)f(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)23 +b Fb(134)2021 819 y Fs(T)2025 970 y Fe(tilde-expand)28 +b(\(M-&\))14 b Fc(:)h(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)29 +b Fb(135)2025 1068 y Fe(transpose-chars)g(\(C-t\))7 b +Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)22 b Fb(130)2025 1155 y Fe(transpose-words) +29 b(\(M-t\))7 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)22 b Fb(130)2021 +1634 y Fs(U)2025 1784 y Fe(undo)k(\(C-_)h(or)f(C-x)g(C-u\))10 +b Fc(:)k(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)25 b Fb(135)2025 1883 y Fe +(universal-argument)k(\(\))7 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)22 +b Fb(132)2025 1981 y Fe(unix-filename-rubout)30 b(\(\))19 +b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)34 b Fb(132)2025 2080 y Fe(unix-line-discard)29 +b(\(C-u\))20 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)34 b Fb(131)2025 2178 y Fe +(unix-word-rubout)29 b(\(C-w\))22 b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 +b Fb(132)2025 2265 y Fe(upcase-word)28 b(\(M-u\))17 b +Fc(:)d(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)32 b Fb(131)2021 +2744 y Fs(Y)2025 2894 y Fe(yank)26 b(\(C-y\))18 b Fc(:)c(:)f(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 +b Fb(132)2025 2993 y Fe(yank-last-arg)28 b(\(M-.)f(or)f(M-_\))8 +b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)22 b Fb(129)2025 3091 y Fe(yank-nth-arg)28 b(\(M-C-y\))9 +b Fc(:)15 b(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)24 b Fb(129)2025 3178 +y Fe(yank-pop)j(\(M-y\))7 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)22 b Fb(132)150 3927 y Fs(D.5)68 b(Concept)45 +b(Index)146 4520 y(A)150 4646 y Fb(alias)27 b(expansion)7 +b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)21 +b Fb(94)150 4736 y(arithmetic)26 b(ev)l(aluation)d Fc(:)13 +b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)37 b Fb(93)150 4826 y(arithmetic)26 +b(expansion)11 b Fc(:)j(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)26 +b Fb(31)150 4917 y(arithmetic,)h(shell)6 b Fc(:)14 b(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)20 b Fb(93)150 5004 +y(arra)n(ys)h Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 b Fb(95)2021 +4520 y Fs(B)2025 4644 y Fb(bac)n(kground)13 b Fc(:)f(:)h(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)28 b Fb(107)2025 +4733 y(Bash)e(con\014guration)11 b Fc(:)j(:)f(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)26 b Fb(152)2025 4823 y(Bash)g(installation)9 +b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)24 +b Fb(152)2025 4913 y(Bourne)i(shell)20 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)35 b +Fb(5)2025 5002 y(brace)26 b(expansion)9 b Fc(:)k(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)24 b Fb(23)2025 5089 y(builtin)15 +b Fc(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 b Fb(3)p eop end +%%Page: 182 188 +TeXDict begin 182 187 bop 150 -116 a Fu(App)s(endix)29 +b(D:)i(Indexes)2623 b(182)146 294 y Fs(C)150 415 y Fb(command)26 +b(editing)19 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)34 +b Fb(112)150 503 y(command)26 b(execution)12 b Fc(:)h(:)g(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)26 b Fb(39)150 592 y(command)g(expansion)c +Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)36 b Fb(39)150 +681 y(command)26 b(history)18 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)33 b Fb(146)150 770 y(command)26 b(searc)n(h)16 +b Fc(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)30 +b Fb(39)150 859 y(command)c(substitution)21 b Fc(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fb(31)150 947 y(command)26 +b(timing)13 b Fc(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)28 b Fb(8)150 1036 y(commands,)e(comp)r(ound)c Fc(:)13 +b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)37 b Fb(10)150 1125 y(commands,)26 +b(conditional)10 b Fc(:)15 b(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)25 +b Fb(11)150 1214 y(commands,)h(grouping)15 b Fc(:)f(:)f(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)29 b Fb(15)150 1302 y(commands,)d(lists)12 +b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)27 +b Fb(9)150 1391 y(commands,)f(lo)r(oping)e Fc(:)13 b(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)37 b Fb(10)150 1480 y(commands,)26 +b(pip)r(elines)18 b Fc(:)c(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)33 +b Fb(8)150 1569 y(commands,)26 b(shell)c Fc(:)13 b(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b Fb(8)150 1657 y(commands,)26 +b(simple)e Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38 +b Fb(8)150 1746 y(commen)n(ts,)26 b(shell)13 b Fc(:)i(:)e(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)28 b Fb(7)150 +1835 y(Compatibilit)n(y)f(Lev)n(el)10 b Fc(:)j(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)25 b Fb(104)150 1924 y(Compatibilit)n(y)i(Mo)r(de)22 +b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 b Fb(104)150 +2013 y(completion)27 b(builtins)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)36 b Fb(139)150 2101 y(con\014guration)22 b Fc(:)13 +b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)36 +b Fb(152)150 2190 y(con)n(trol)26 b(op)r(erator)8 b Fc(:)15 +b(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)23 +b Fb(3)150 2277 y(copro)r(cess)18 b Fc(:)c(:)f(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)32 b +Fb(15)146 2553 y Fs(D)150 2672 y Fb(directory)26 b(stac)n(k)11 +b Fc(:)i(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 +b Fb(97)146 2948 y Fs(E)150 3069 y Fb(editing)g(command)g(lines)17 +b Fc(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)32 b Fb(112)150 3158 y(en)n(vironmen)n(t)18 +b Fc(:)12 b(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)32 b Fb(41)150 3247 y(ev)l(aluation,)26 b(arithmetic)12 +b Fc(:)i(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)26 b Fb(93)150 3335 +y(ev)n(en)n(t)f(designators)c Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)34 b Fb(149)150 3424 y(execution)26 b(en)n(vironmen)n(t)17 +b Fc(:)12 b(:)h(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)31 b Fb(40)150 3513 +y(exit)25 b(status)7 b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)22 b Fb(3,)k(41)150 3602 y(expansion)9 +b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)24 b Fb(22)150 3691 y(expansion,)i(arithmetic)18 +b Fc(:)c(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)32 b Fb(31)150 3779 +y(expansion,)26 b(brace)16 b Fc(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)30 b Fb(23)150 3868 y(expansion,)c(\014lename)18 +b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)32 b Fb(33)150 +3957 y(expansion,)26 b(parameter)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)34 b Fb(25)150 4046 y(expansion,)26 b(pathname)7 +b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)22 b Fb(33)150 +4134 y(expansion,)k(tilde)14 b Fc(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)28 b Fb(24)150 4223 y(expressions,)f(arithmetic)13 +b Fc(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)27 b Fb(93)150 4310 y(expressions,)g +(conditional)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)32 b Fb(91)2021 +294 y Fs(F)2025 415 y Fb(\014eld)21 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)36 b Fb(3)2025 504 y(\014lename)21 b Fc(:)14 b(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)36 +b Fb(3)2025 593 y(\014lename)26 b(expansion)11 b Fc(:)i(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)26 b Fb(33)2025 682 y(foreground)9 +b Fc(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)24 b Fb(107)2025 769 y(functions,)i(shell)9 b +Fc(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)24 +b Fb(18)2021 1048 y Fs(H)2025 1170 y Fb(history)h(builtins)20 +b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)35 +b Fb(146)2025 1259 y(history)25 b(ev)n(en)n(ts)8 b Fc(:)13 +b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)23 +b Fb(149)2025 1347 y(history)i(expansion)14 b Fc(:)g(:)f(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)29 b Fb(148)2025 1436 y(history)c(list)9 +b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)24 b Fb(146)2025 1524 y(History)-6 b(,)25 b(ho)n(w)h(to)g(use) +19 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)34 b Fb(145)2021 +1803 y Fs(I)2025 1924 y Fb(iden)n(ti\014er)12 b Fc(:)g(:)h(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)27 +b Fb(3)2025 2013 y(initialization)h(\014le,)e(readline)17 +b Fc(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)32 b Fb(114)2025 2102 y(installation)21 +b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)34 b Fb(152)2025 2191 y(in)n(teraction,)26 b(readline)7 +b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)22 b Fb(111)2025 +2280 y(in)n(teractiv)n(e)k(shell)20 b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)34 b Fb(88,)27 b(89)2025 2367 y(in)n(ternationalization)22 +b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 +b Fb(7)2021 2637 y Fs(J)2025 2758 y Fb(job)23 b Fc(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fb(3)2025 2845 +y(job)26 b(con)n(trol)17 b Fc(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)31 b Fb(3,)c(107)2021 3124 y Fs(K)2025 +3246 y Fb(kill)f(ring)7 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)22 b Fb(113)2025 +3333 y(killing)k(text)6 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)21 b Fb(113)2021 3612 +y Fs(L)2025 3733 y Fb(lo)r(calization)i Fc(:)13 b(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)35 +b Fb(7)2025 3821 y(login)26 b(shell)6 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)21 +b Fb(88)2021 4100 y Fs(M)2025 4221 y Fb(matc)n(hing,)26 +b(pattern)9 b Fc(:)k(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)24 +b Fb(33)2025 4308 y(metac)n(haracter)7 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)22 b Fb(3)p +eop end +%%Page: 183 189 +TeXDict begin 183 188 bop 150 -116 a Fu(App)s(endix)29 +b(D:)i(Indexes)2623 b(183)146 294 y Fs(N)150 410 y Fb(name)19 +b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 b Fb(3)150 497 +y(nativ)n(e)25 b(languages)c Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)34 b Fb(7)150 584 y(notation,)27 +b(readline)13 b Fc(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)27 +b Fb(112)146 828 y Fs(O)150 944 y Fb(op)r(erator,)g(shell)c +Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +37 b Fb(3)146 1187 y Fs(P)150 1303 y Fb(parameter)26 +b(expansion)13 b Fc(:)h(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)28 +b Fb(25)150 1390 y(parameters)c Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)37 b Fb(20)150 +1478 y(parameters,)27 b(p)r(ositional)7 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)21 b Fb(21)150 1565 y(parameters,)27 b(sp)r(ecial)7 +b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)21 +b Fb(21)150 1652 y(pathname)k(expansion)18 b Fc(:)c(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)32 b Fb(33)150 1739 y(pattern)25 b(matc)n(hing)c +Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34 +b Fb(33)150 1827 y(pip)r(eline)12 b Fc(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)27 +b Fb(8)150 1914 y(POSIX)22 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38 +b Fb(3)150 2001 y(POSIX)25 b(Mo)r(de)14 b Fc(:)g(:)f(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)29 b Fb(101)150 2088 +y(pro)r(cess)e(group)15 b Fc(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)30 b Fb(3)150 2176 y(pro)r(cess)d(group)e +(ID)11 b Fc(:)i(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)26 +b Fb(3)150 2263 y(pro)r(cess)h(substitution)11 b Fc(:)h(:)i(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)25 b Fb(32)150 2350 y(programmable)i(completion)8 +b Fc(:)14 b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)23 b Fb(137)150 2437 y(prompting)17 +b Fc(:)c(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)31 b Fb(98)146 2681 y Fs(Q)150 2797 y Fb(quoting)16 +b Fc(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)31 b Fb(6)150 2884 y(quoting,)26 +b(ANSI)18 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)34 b Fb(6)146 3127 y Fs(R)150 3243 y Fb(Readline,)26 +b(ho)n(w)g(to)g(use)11 b Fc(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)26 +b Fb(110)150 3331 y(redirection)13 b Fc(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)27 b Fb(35)150 +3418 y(reserv)n(ed)f(w)n(ord)13 b Fc(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)28 b Fb(3)150 3505 +y(reserv)n(ed)e(w)n(ords)15 b Fc(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)30 b Fb(8)150 3592 y(restricted)c(shell)12 +b Fc(:)i(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)27 +b Fb(100)150 3679 y(return)e(status)10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)25 b Fb(4)2021 +294 y Fs(S)2025 430 y Fb(shell)h(arithmetic)17 b Fc(:)d(:)f(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)31 b Fb(93)2025 524 +y(shell)26 b(function)18 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)32 b Fb(18)2025 617 y(shell)26 +b(script)10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)25 b Fb(42)2025 711 y(shell)h(v)l(ariable)7 +b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)22 b Fb(20)2025 805 y(shell,)k(in)n(teractiv)n(e)21 +b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34 +b Fb(89)2025 899 y(signal)13 b Fc(:)h(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)28 +b Fb(4)2025 992 y(signal)f(handling)6 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)21 b Fb(42)2025 1086 +y(sp)r(ecial)27 b(builtin)16 b Fc(:)d(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)31 b Fb(4,)26 b(72)2025 1180 y(startup)f(\014les)10 +b Fc(:)k(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)25 b Fb(88)2025 1267 y(susp)r(ending)g(jobs)10 +b Fc(:)k(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)25 +b Fb(107)2021 1647 y Fs(T)2025 1783 y Fb(tilde)h(expansion)7 +b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)22 +b Fb(24)2025 1877 y(tok)n(en)17 b Fc(:)12 b(:)i(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)32 +b Fb(4)2025 1964 y(translation,)27 b(nativ)n(e)e(languages)c +Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)34 b Fb(7)2021 2344 y Fs(V)2025 2480 y +Fb(v)l(ariable,)26 b(shell)14 b Fc(:)g(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)28 b Fb(20)2025 2567 y(v)l(ariables,)f +(readline)7 b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)22 +b Fb(115)2021 2947 y Fs(W)2025 3083 y Fb(w)n(ord)10 b +Fc(:)j(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)25 b Fb(4)2025 3170 +y(w)n(ord)h(splitting)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)24 b Fb(32)2021 3550 y Fs(Y)2025 +3679 y Fb(y)n(anking)h(text)13 b Fc(:)f(:)h(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)28 b Fb(113)p eop end +%%Trailer + +userdict /end-hook known{end-hook}if +%%EOF diff --git a/bash-5.1/doc/bashref.texi b/bash-5.1/doc/bashref.texi new file mode 100644 index 0000000000000000000000000000000000000000..d02151e38f804b55501adb4cefcf343d812ff134 --- /dev/null +++ b/bash-5.1/doc/bashref.texi @@ -0,0 +1,9583 @@ +\input texinfo.tex @c -*- texinfo -*- +@c %**start of header +@setfilename bashref.info +@settitle Bash Reference Manual + +@include version.texi +@c %**end of header + +@copying +This text is a brief description of the features that are present in +the Bash shell (version @value{VERSION}, @value{UPDATED}). + +This is Edition @value{EDITION}, last updated @value{UPDATED}, +of @cite{The GNU Bash Reference Manual}, +for @code{Bash}, Version @value{VERSION}. + +Copyright @copyright{} 1988--2020 Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``GNU Free Documentation License''. +@end quotation +@end copying + +@defcodeindex bt +@defcodeindex rw +@set BashFeatures + +@dircategory Basics +@direntry +* Bash: (bash). The GNU Bourne-Again SHell. +@end direntry + +@finalout + +@titlepage +@title Bash Reference Manual +@subtitle Reference Documentation for Bash +@subtitle Edition @value{EDITION}, for @code{Bash} Version @value{VERSION}. +@subtitle @value{UPDATED-MONTH} +@author Chet Ramey, Case Western Reserve University +@author Brian Fox, Free Software Foundation + +@page +@vskip 0pt plus 1filll +@insertcopying + +@end titlepage + +@contents + +@ifnottex +@node Top, Introduction, (dir), (dir) +@top Bash Features + +This text is a brief description of the features that are present in +the Bash shell (version @value{VERSION}, @value{UPDATED}). +The Bash home page is @url{http://www.gnu.org/software/bash/}. + +This is Edition @value{EDITION}, last updated @value{UPDATED}, +of @cite{The GNU Bash Reference Manual}, +for @code{Bash}, Version @value{VERSION}. + +Bash contains features that appear in other popular shells, and some +features that only appear in Bash. Some of the shells that Bash has +borrowed concepts from are the Bourne Shell (@file{sh}), the Korn Shell +(@file{ksh}), and the C-shell (@file{csh} and its successor, +@file{tcsh}). The following menu breaks the features up into +categories, noting which features were inspired by other shells and +which are specific to Bash. + +This manual is meant as a brief introduction to features found in +Bash. The Bash manual page should be used as the definitive +reference on shell behavior. + +@menu +* Introduction:: An introduction to the shell. +* Definitions:: Some definitions used in the rest of this + manual. +* Basic Shell Features:: The shell "building blocks". +* Shell Builtin Commands:: Commands that are a part of the shell. +* Shell Variables:: Variables used or set by Bash. +* Bash Features:: Features found only in Bash. +* Job Control:: What job control is and how Bash allows you + to use it. +* Command Line Editing:: Chapter describing the command line + editing features. +* Using History Interactively:: Command History Expansion +* Installing Bash:: How to build and install Bash on your system. +* Reporting Bugs:: How to report bugs in Bash. +* Major Differences From The Bourne Shell:: A terse list of the differences + between Bash and historical + versions of /bin/sh. +* GNU Free Documentation License:: Copying and sharing this documentation. +* Indexes:: Various indexes for this manual. +@end menu +@end ifnottex + +@node Introduction +@chapter Introduction +@menu +* What is Bash?:: A short description of Bash. +* What is a shell?:: A brief introduction to shells. +@end menu + +@node What is Bash? +@section What is Bash? + +Bash is the shell, or command language interpreter, +for the @sc{gnu} operating system. +The name is an acronym for the @samp{Bourne-Again SHell}, +a pun on Stephen Bourne, the author of the direct ancestor of +the current Unix shell @code{sh}, +which appeared in the Seventh Edition Bell Labs Research version +of Unix. + +Bash is largely compatible with @code{sh} and incorporates useful +features from the Korn shell @code{ksh} and the C shell @code{csh}. +It is intended to be a conformant implementation of the @sc{ieee} +@sc{posix} Shell and Tools portion of the @sc{ieee} @sc{posix} +specification (@sc{ieee} Standard 1003.1). +It offers functional improvements over @code{sh} for both interactive and +programming use. + +While the @sc{gnu} operating system provides other shells, including +a version of @code{csh}, Bash is the default shell. +Like other @sc{gnu} software, Bash is quite portable. It currently runs +on nearly every version of Unix and a few other operating systems @minus{} +independently-supported ports exist for @sc{ms-dos}, @sc{os/2}, +and Windows platforms. + +@node What is a shell? +@section What is a shell? + +At its base, a shell is simply a macro processor that executes +commands. The term macro processor means functionality where text +and symbols are expanded to create larger expressions. + +A Unix shell is both a command interpreter and a programming +language. As a command interpreter, the shell provides the user +interface to the rich set of @sc{gnu} utilities. The programming +language features allow these utilities to be combined. +Files containing commands can be created, and become +commands themselves. These new commands have the same status as +system commands in directories such as @file{/bin}, allowing users +or groups to establish custom environments to automate their common +tasks. + +Shells may be used interactively or non-interactively. In +interactive mode, they accept input typed from the keyboard. +When executing non-interactively, shells execute commands read +from a file. + +A shell allows execution of @sc{gnu} commands, both synchronously and +asynchronously. +The shell waits for synchronous commands to complete before accepting +more input; asynchronous commands continue to execute in parallel +with the shell while it reads and executes additional commands. +The @dfn{redirection} constructs permit +fine-grained control of the input and output of those commands. +Moreover, the shell allows control over the contents of commands' +environments. + +Shells also provide a small set of built-in +commands (@dfn{builtins}) implementing functionality impossible +or inconvenient to obtain via separate utilities. +For example, @code{cd}, @code{break}, @code{continue}, and +@code{exec} cannot be implemented outside of the shell because +they directly manipulate the shell itself. +The @code{history}, @code{getopts}, @code{kill}, or @code{pwd} +builtins, among others, could be implemented in separate utilities, +but they are more convenient to use as builtin commands. +All of the shell builtins are described in +subsequent sections. + +While executing commands is essential, most of the power (and +complexity) of shells is due to their embedded programming +languages. Like any high-level language, the shell provides +variables, flow control constructs, quoting, and functions. + +Shells offer features geared specifically for +interactive use rather than to augment the programming language. +These interactive features include job control, command line +editing, command history and aliases. Each of these features is +described in this manual. + +@node Definitions +@chapter Definitions +These definitions are used throughout the remainder of this manual. + +@table @code + +@item POSIX +@cindex POSIX +A family of open system standards based on Unix. Bash +is primarily concerned with the Shell and Utilities portion of the +@sc{posix} 1003.1 standard. + +@item blank +A space or tab character. + +@item builtin +@cindex builtin +A command that is implemented internally by the shell itself, rather +than by an executable program somewhere in the file system. + +@item control operator +@cindex control operator +A @code{token} that performs a control function. It is a @code{newline} +or one of the following: +@samp{||}, @samp{&&}, @samp{&}, @samp{;}, @samp{;;}, @samp{;&}, @samp{;;&}, +@samp{|}, @samp{|&}, @samp{(}, or @samp{)}. + +@item exit status +@cindex exit status +The value returned by a command to its caller. The value is restricted +to eight bits, so the maximum value is 255. + +@item field +@cindex field +A unit of text that is the result of one of the shell expansions. After +expansion, when executing a command, the resulting fields are used as +the command name and arguments. + +@item filename +@cindex filename +A string of characters used to identify a file. + +@item job +@cindex job +A set of processes comprising a pipeline, and any processes descended +from it, that are all in the same process group. + +@item job control +@cindex job control +A mechanism by which users can selectively stop (suspend) and restart +(resume) execution of processes. + +@item metacharacter +@cindex metacharacter +A character that, when unquoted, separates words. A metacharacter is +a @code{space}, @code{tab}, @code{newline}, or one of the following characters: +@samp{|}, @samp{&}, @samp{;}, @samp{(}, @samp{)}, @samp{<}, or +@samp{>}. + +@item name +@cindex name +@cindex identifier +A @code{word} consisting solely of letters, numbers, and underscores, +and beginning with a letter or underscore. @code{Name}s are used as +shell variable and function names. +Also referred to as an @code{identifier}. + +@item operator +@cindex operator, shell +A @code{control operator} or a @code{redirection operator}. +@xref{Redirections}, for a list of redirection operators. +Operators contain at least one unquoted @code{metacharacter}. + +@item process group +@cindex process group +A collection of related processes each having the same process +group @sc{id}. + +@item process group ID +@cindex process group ID +A unique identifier that represents a @code{process group} +during its lifetime. + +@item reserved word +@cindex reserved word +A @code{word} that has a special meaning to the shell. Most reserved +words introduce shell flow control constructs, such as @code{for} and +@code{while}. + +@item return status +@cindex return status +A synonym for @code{exit status}. + +@item signal +@cindex signal +A mechanism by which a process may be notified by the kernel +of an event occurring in the system. + +@item special builtin +@cindex special builtin +A shell builtin command that has been classified as special by the +@sc{posix} standard. + +@item token +@cindex token +A sequence of characters considered a single unit by the shell. +It is either a @code{word} or an @code{operator}. + +@item word +@cindex word +A sequence of characters treated as a unit by the shell. +Words may not include unquoted @code{metacharacters}. +@end table + +@node Basic Shell Features +@chapter Basic Shell Features +@cindex Bourne shell + +Bash is an acronym for @samp{Bourne-Again SHell}. +The Bourne shell is +the traditional Unix shell originally written by Stephen Bourne. +All of the Bourne shell builtin commands are available in Bash, +The rules for evaluation and quoting are taken from the @sc{posix} +specification for the `standard' Unix shell. + +This chapter briefly summarizes the shell's `building blocks': +commands, control structures, shell functions, shell @i{parameters}, +shell expansions, +@i{redirections}, which are a way to direct input and output from +and to named files, and how the shell executes commands. + +@menu +* Shell Syntax:: What your input means to the shell. +* Shell Commands:: The types of commands you can use. +* Shell Functions:: Grouping commands by name. +* Shell Parameters:: How the shell stores values. +* Shell Expansions:: How Bash expands parameters and the various + expansions available. +* Redirections:: A way to control where input and output go. +* Executing Commands:: What happens when you run a command. +* Shell Scripts:: Executing files of shell commands. +@end menu + +@node Shell Syntax +@section Shell Syntax +@menu +* Shell Operation:: The basic operation of the shell. +* Quoting:: How to remove the special meaning from characters. +* Comments:: How to specify comments. +@end menu + +When the shell reads input, it proceeds through a +sequence of operations. If the input indicates the beginning of a +comment, the shell ignores the comment symbol (@samp{#}), and the rest +of that line. + +Otherwise, roughly speaking, the shell reads its input and +divides the input into words and operators, employing the quoting rules +to select which meanings to assign various words and characters. + +The shell then parses these tokens into commands and other constructs, +removes the special meaning of certain words or characters, expands +others, redirects input and output as needed, executes the specified +command, waits for the command's exit status, and makes that exit status +available for further inspection or processing. + +@node Shell Operation +@subsection Shell Operation + +The following is a brief description of the shell's operation when it +reads and executes a command. Basically, the shell does the +following: + +@enumerate +@item +Reads its input from a file (@pxref{Shell Scripts}), from a string +supplied as an argument to the @option{-c} invocation option +(@pxref{Invoking Bash}), or from the user's terminal. + +@item +Breaks the input into words and operators, obeying the quoting rules +described in @ref{Quoting}. These tokens are separated by +@code{metacharacters}. Alias expansion is performed by this step +(@pxref{Aliases}). + +@item +Parses the tokens into simple and compound commands +(@pxref{Shell Commands}). + +@item +Performs the various shell expansions (@pxref{Shell Expansions}), breaking +the expanded tokens into lists of filenames (@pxref{Filename Expansion}) +and commands and arguments. + +@item +Performs any necessary redirections (@pxref{Redirections}) and removes +the redirection operators and their operands from the argument list. + +@item +Executes the command (@pxref{Executing Commands}). + +@item +Optionally waits for the command to complete and collects its exit +status (@pxref{Exit Status}). + +@end enumerate + +@node Quoting +@subsection Quoting +@cindex quoting +@menu +* Escape Character:: How to remove the special meaning from a single + character. +* Single Quotes:: How to inhibit all interpretation of a sequence + of characters. +* Double Quotes:: How to suppress most of the interpretation of a + sequence of characters. +* ANSI-C Quoting:: How to expand ANSI-C sequences in quoted strings. +* Locale Translation:: How to translate strings into different languages. +@end menu + +Quoting is used to remove the special meaning of certain +characters or words to the shell. Quoting can be used to +disable special treatment for special characters, to prevent +reserved words from being recognized as such, and to prevent +parameter expansion. + +Each of the shell metacharacters (@pxref{Definitions}) +has special meaning to the shell and must be quoted if it is to +represent itself. +When the command history expansion facilities are being used +(@pxref{History Interaction}), the +@var{history expansion} character, usually @samp{!}, must be quoted +to prevent history expansion. @xref{Bash History Facilities}, for +more details concerning history expansion. + +There are three quoting mechanisms: the +@var{escape character}, single quotes, and double quotes. + +@node Escape Character +@subsubsection Escape Character +A non-quoted backslash @samp{\} is the Bash escape character. +It preserves the literal value of the next character that follows, +with the exception of @code{newline}. If a @code{\newline} pair +appears, and the backslash itself is not quoted, the @code{\newline} +is treated as a line continuation (that is, it is removed from +the input stream and effectively ignored). + +@node Single Quotes +@subsubsection Single Quotes + +Enclosing characters in single quotes (@samp{'}) preserves the literal value +of each character within the quotes. A single quote may not occur +between single quotes, even when preceded by a backslash. + +@node Double Quotes +@subsubsection Double Quotes + +Enclosing characters in double quotes (@samp{"}) preserves the literal value +of all characters within the quotes, with the exception of +@samp{$}, @samp{`}, @samp{\}, +and, when history expansion is enabled, @samp{!}. +When the shell is in +@sc{posix} mode (@pxref{Bash POSIX Mode}), +the @samp{!} has no special meaning +within double quotes, even when history expansion is enabled. +The characters @samp{$} and @samp{`} +retain their special meaning within double quotes (@pxref{Shell Expansions}). +The backslash retains its special meaning only when followed by one of +the following characters: +@samp{$}, @samp{`}, @samp{"}, @samp{\}, or @code{newline}. +Within double quotes, backslashes that are followed by one of these +characters are removed. Backslashes preceding characters without a +special meaning are left unmodified. +A double quote may be quoted within double quotes by preceding it with +a backslash. +If enabled, history expansion will be performed unless an @samp{!} +appearing in double quotes is escaped using a backslash. +The backslash preceding the @samp{!} is not removed. + +The special parameters @samp{*} and @samp{@@} have special meaning +when in double quotes (@pxref{Shell Parameter Expansion}). + +@node ANSI-C Quoting +@subsubsection ANSI-C Quoting +@cindex quoting, ANSI + +Words of the form @code{$'@var{string}'} are treated specially. The +word expands to @var{string}, with backslash-escaped characters replaced +as specified by the ANSI C standard. Backslash escape sequences, if +present, are decoded as follows: + +@table @code +@item \a +alert (bell) +@item \b +backspace +@item \e +@itemx \E +an escape character (not ANSI C) +@item \f +form feed +@item \n +newline +@item \r +carriage return +@item \t +horizontal tab +@item \v +vertical tab +@item \\ +backslash +@item \' +single quote +@item \" +double quote +@item \? +question mark +@item \@var{nnn} +the eight-bit character whose value is the octal value @var{nnn} +(one to three octal digits) +@item \x@var{HH} +the eight-bit character whose value is the hexadecimal value @var{HH} +(one or two hex digits) +@item \u@var{HHHH} +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +@var{HHHH} (one to four hex digits) +@item \U@var{HHHHHHHH} +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +@var{HHHHHHHH} (one to eight hex digits) +@item \c@var{x} +a control-@var{x} character +@end table + +@noindent +The expanded result is single-quoted, as if the dollar sign had not +been present. + +@node Locale Translation +@subsubsection Locale-Specific Translation +@cindex localization +@cindex internationalization +@cindex native languages +@cindex translation, native languages + +A double-quoted string preceded by a dollar sign (@samp{$}) +will cause the string to be translated according to the current locale. +The @var{gettext} infrastructure performs the message catalog lookup and +translation, using the @code{LC_MESSAGES} and @code{TEXTDOMAIN} shell +variables, as explained below. See the gettext documentation for additional +details. +If the current locale is @code{C} or @code{POSIX}, +or if there are no translations available, +the dollar sign is ignored. +If the string is translated and replaced, the replacement is +double-quoted. + +@vindex LC_MESSAGES +@vindex TEXTDOMAIN +@vindex TEXTDOMAINDIR +Some systems use the message catalog selected by the @env{LC_MESSAGES} +shell variable. Others create the name of the message catalog from the +value of the @env{TEXTDOMAIN} shell variable, possibly adding a +suffix of @samp{.mo}. If you use the @env{TEXTDOMAIN} variable, you +may need to set the @env{TEXTDOMAINDIR} variable to the location of +the message catalog files. Still others use both variables in this +fashion: +@env{TEXTDOMAINDIR}/@env{LC_MESSAGES}/LC_MESSAGES/@env{TEXTDOMAIN}.mo. + +@node Comments +@subsection Comments +@cindex comments, shell + +In a non-interactive shell, or an interactive shell in which the +@code{interactive_comments} option to the @code{shopt} +builtin is enabled (@pxref{The Shopt Builtin}), +a word beginning with @samp{#} +causes that word and all remaining characters on that line to +be ignored. An interactive shell without the @code{interactive_comments} +option enabled does not allow comments. The @code{interactive_comments} +option is on by default in interactive shells. +@xref{Interactive Shells}, for a description of what makes +a shell interactive. + +@node Shell Commands +@section Shell Commands +@cindex commands, shell + +A simple shell command such as @code{echo a b c} consists of the command +itself followed by arguments, separated by spaces. + +More complex shell commands are composed of simple commands arranged together +in a variety of ways: in a pipeline in which the output of one command +becomes the input of a second, in a loop or conditional construct, or in +some other grouping. + +@menu +* Reserved Words:: Words that have special meaning to the shell. +* Simple Commands:: The most common type of command. +* Pipelines:: Connecting the input and output of several + commands. +* Lists:: How to execute commands sequentially. +* Compound Commands:: Shell commands for control flow. +* Coprocesses:: Two-way communication between commands. +* GNU Parallel:: Running commands in parallel. +@end menu + +@node Reserved Words +@subsection Reserved Words +@cindex reserved words + +Reserved words are words that have special meaning to the shell. +They are used to begin and end the shell's compound commands. + +The following words are recognized as reserved when unquoted and +the first word of a command (see below for exceptions): + +@multitable @columnfractions .1 .1 .1 .1 .12 .1 +@item @code{if} @tab @code{then} @tab @code{elif} +@tab @code{else} @tab @code{fi} @tab @code{time} +@item @code{for} @tab @code{in} @tab @code{until} +@tab @code{while} @tab @code{do} @tab @code{done} +@item @code{case} @tab @code{esac} @tab @code{coproc} +@tab @code{select} @tab @code{function} +@item @code{@{} @tab @code{@}} @tab @code{[[} @tab @code{]]} @tab @code{!} +@end multitable + +@noindent +@code{in} is recognized as a reserved word if it is the third word of a +@code{case} or @code{select} command. +@code{in} and @code{do} are recognized as reserved +words if they are the third word in a @code{for} command. + +@node Simple Commands +@subsection Simple Commands +@cindex commands, simple + +A simple command is the kind of command encountered most often. +It's just a sequence of words separated by @code{blank}s, terminated +by one of the shell's control operators (@pxref{Definitions}). The +first word generally specifies a command to be executed, with the +rest of the words being that command's arguments. + +The return status (@pxref{Exit Status}) of a simple command is +its exit status as provided +by the @sc{posix} 1003.1 @code{waitpid} function, or 128+@var{n} if +the command was terminated by signal @var{n}. + +@node Pipelines +@subsection Pipelines +@cindex pipeline +@cindex commands, pipelines + +A @code{pipeline} is a sequence of one or more commands separated by +one of the control operators @samp{|} or @samp{|&}. + +@rwindex time +@rwindex ! +@cindex command timing +The format for a pipeline is +@example +[time [-p]] [!] @var{command1} [ | or |& @var{command2} ] @dots{} +@end example + +@noindent +The output of each command in the pipeline is connected via a pipe +to the input of the next command. +That is, each command reads the previous command's output. This +connection is performed before any redirections specified by the +command. + +If @samp{|&} is used, @var{command1}'s standard error, in addition to +its standard output, is connected to +@var{command2}'s standard input through the pipe; +it is shorthand for @code{2>&1 |}. +This implicit redirection of the standard error to the standard output is +performed after any redirections specified by the command. + +The reserved word @code{time} causes timing statistics +to be printed for the pipeline once it finishes. +The statistics currently consist of elapsed (wall-clock) time and +user and system time consumed by the command's execution. +The @option{-p} option changes the output format to that specified +by @sc{posix}. +When the shell is in @sc{posix} mode (@pxref{Bash POSIX Mode}), +it does not recognize @code{time} as a reserved word if the next +token begins with a @samp{-}. +The @env{TIMEFORMAT} variable may be set to a format string that +specifies how the timing information should be displayed. +@xref{Bash Variables}, for a description of the available formats. +The use of @code{time} as a reserved word permits the timing of +shell builtins, shell functions, and pipelines. An external +@code{time} command cannot time these easily. + +When the shell is in @sc{posix} mode (@pxref{Bash POSIX Mode}), @code{time} +may be followed by a newline. In this case, the shell displays the +total user and system time consumed by the shell and its children. +The @env{TIMEFORMAT} variable may be used to specify the format of +the time information. + +If the pipeline is not executed asynchronously (@pxref{Lists}), the +shell waits for all commands in the pipeline to complete. + +Each command in a pipeline is executed in its own subshell, which is a +separate process (@pxref{Command Execution Environment}). +If the @code{lastpipe} option is enabled using the @code{shopt} builtin +(@pxref{The Shopt Builtin}), +the last element of a pipeline may be run by the shell process. + +The exit +status of a pipeline is the exit status of the last command in the +pipeline, unless the @code{pipefail} option is enabled +(@pxref{The Set Builtin}). +If @code{pipefail} is enabled, the pipeline's return status is the +value of the last (rightmost) command to exit with a non-zero status, +or zero if all commands exit successfully. +If the reserved word @samp{!} precedes the pipeline, the +exit status is the logical negation of the exit status as described +above. +The shell waits for all commands in the pipeline to terminate before +returning a value. + +@node Lists +@subsection Lists of Commands +@cindex commands, lists + +A @code{list} is a sequence of one or more pipelines separated by one +of the operators @samp{;}, @samp{&}, @samp{&&}, or @samp{||}, +and optionally terminated by one of @samp{;}, @samp{&}, or a +@code{newline}. + +Of these list operators, @samp{&&} and @samp{||} +have equal precedence, followed by @samp{;} and @samp{&}, +which have equal precedence. + +A sequence of one or more newlines may appear in a @code{list} +to delimit commands, equivalent to a semicolon. + +If a command is terminated by the control operator @samp{&}, +the shell executes the command asynchronously in a subshell. +This is known as executing the command in the @var{background}, +and these are referred to as @var{asynchronous} commands. +The shell does not wait for the command to finish, and the return +status is 0 (true). +When job control is not active (@pxref{Job Control}), +the standard input for asynchronous commands, in the absence of any +explicit redirections, is redirected from @code{/dev/null}. + +Commands separated by a @samp{;} are executed sequentially; the shell +waits for each command to terminate in turn. The return status is the +exit status of the last command executed. + +@sc{and} and @sc{or} lists are sequences of one or more pipelines +separated by the control operators @samp{&&} and @samp{||}, +respectively. @sc{and} and @sc{or} lists are executed with left +associativity. + +An @sc{and} list has the form +@example +@var{command1} && @var{command2} +@end example + +@noindent +@var{command2} is executed if, and only if, @var{command1} +returns an exit status of zero (success). + +An @sc{or} list has the form +@example +@var{command1} || @var{command2} +@end example + +@noindent +@var{command2} is executed if, and only if, @var{command1} +returns a non-zero exit status. + +The return status of +@sc{and} and @sc{or} lists is the exit status of the last command +executed in the list. + +@node Compound Commands +@subsection Compound Commands +@cindex commands, compound + +@menu +* Looping Constructs:: Shell commands for iterative action. +* Conditional Constructs:: Shell commands for conditional execution. +* Command Grouping:: Ways to group commands. +@end menu + +Compound commands are the shell programming language constructs. +Each construct begins with a reserved word or control operator and is +terminated by a corresponding reserved word or operator. +Any redirections (@pxref{Redirections}) associated with a compound command +apply to all commands within that compound command unless explicitly overridden. + +In most cases a list of commands in a compound command's description may be +separated from the rest of the command by one or more newlines, and may be +followed by a newline in place of a semicolon. + +Bash provides looping constructs, conditional commands, and mechanisms +to group commands and execute them as a unit. + +@node Looping Constructs +@subsubsection Looping Constructs +@cindex commands, looping + +Bash supports the following looping constructs. + +Note that wherever a @samp{;} appears in the description of a +command's syntax, it may be replaced with one or more newlines. + +@table @code +@item until +@rwindex until +@rwindex do +@rwindex done +The syntax of the @code{until} command is: + +@example +until @var{test-commands}; do @var{consequent-commands}; done +@end example + +Execute @var{consequent-commands} as long as +@var{test-commands} has an exit status which is not zero. +The return status is the exit status of the last command executed +in @var{consequent-commands}, or zero if none was executed. + +@item while +@rwindex while +The syntax of the @code{while} command is: + +@example +while @var{test-commands}; do @var{consequent-commands}; done +@end example + +Execute @var{consequent-commands} as long as +@var{test-commands} has an exit status of zero. +The return status is the exit status of the last command executed +in @var{consequent-commands}, or zero if none was executed. + +@item for +@rwindex for +The syntax of the @code{for} command is: + +@example +for @var{name} [ [in [@var{words} @dots{}] ] ; ] do @var{commands}; done +@end example + +Expand @var{words} (@pxref{Shell Expansions}), and execute @var{commands} +once for each member +in the resultant list, with @var{name} bound to the current member. +If @samp{in @var{words}} is not present, the @code{for} command +executes the @var{commands} once for each positional parameter that is +set, as if @samp{in "$@@"} had been specified +(@pxref{Special Parameters}). + +The return status is the exit status of the last command that executes. +If there are no items in the expansion of @var{words}, no commands are +executed, and the return status is zero. + +An alternate form of the @code{for} command is also supported: + +@example +for (( @var{expr1} ; @var{expr2} ; @var{expr3} )) ; do @var{commands} ; done +@end example + +First, the arithmetic expression @var{expr1} is evaluated according +to the rules described below (@pxref{Shell Arithmetic}). +The arithmetic expression @var{expr2} is then evaluated repeatedly +until it evaluates to zero. +Each time @var{expr2} evaluates to a non-zero value, @var{commands} are +executed and the arithmetic expression @var{expr3} is evaluated. +If any expression is omitted, it behaves as if it evaluates to 1. +The return value is the exit status of the last command in @var{commands} +that is executed, or false if any of the expressions is invalid. +@end table + +The @code{break} and @code{continue} builtins (@pxref{Bourne Shell Builtins}) +may be used to control loop execution. + +@node Conditional Constructs +@subsubsection Conditional Constructs +@cindex commands, conditional + +@table @code +@item if +@rwindex if +@rwindex then +@rwindex else +@rwindex elif +@rwindex fi +The syntax of the @code{if} command is: + +@example +if @var{test-commands}; then + @var{consequent-commands}; +[elif @var{more-test-commands}; then + @var{more-consequents};] +[else @var{alternate-consequents};] +fi +@end example + +The @var{test-commands} list is executed, and if its return status is zero, +the @var{consequent-commands} list is executed. +If @var{test-commands} returns a non-zero status, each @code{elif} list +is executed in turn, and if its exit status is zero, +the corresponding @var{more-consequents} is executed and the +command completes. +If @samp{else @var{alternate-consequents}} is present, and +the final command in the final @code{if} or @code{elif} clause +has a non-zero exit status, then @var{alternate-consequents} is executed. +The return status is the exit status of the last command executed, or +zero if no condition tested true. + +@item case +@rwindex case +@rwindex in +@rwindex esac +The syntax of the @code{case} command is: + +@example +case @var{word} in + [ [(] @var{pattern} [| @var{pattern}]@dots{}) @var{command-list} ;;]@dots{} +esac +@end example + +@code{case} will selectively execute the @var{command-list} corresponding to +the first @var{pattern} that matches @var{word}. +The match is performed according +to the rules described below in @ref{Pattern Matching}. +If the @code{nocasematch} shell option +(see the description of @code{shopt} in @ref{The Shopt Builtin}) +is enabled, the match is performed without regard to the case +of alphabetic characters. +The @samp{|} is used to separate multiple patterns, and the @samp{)} +operator terminates a pattern list. +A list of patterns and an associated command-list is known +as a @var{clause}. + +Each clause must be terminated with @samp{;;}, @samp{;&}, or @samp{;;&}. +The @var{word} undergoes tilde expansion, parameter expansion, command +substitution, arithmetic expansion, and quote removal +(@pxref{Shell Parameter Expansion}) +before matching is +attempted. Each @var{pattern} undergoes tilde expansion, parameter +expansion, command substitution, and arithmetic expansion. + +There may be an arbitrary number of @code{case} clauses, each terminated +by a @samp{;;}, @samp{;&}, or @samp{;;&}. +The first pattern that matches determines the +command-list that is executed. +It's a common idiom to use @samp{*} as the final pattern to define the +default case, since that pattern will always match. + +Here is an example using @code{case} in a script that could be used to +describe one interesting feature of an animal: + +@example +echo -n "Enter the name of an animal: " +read ANIMAL +echo -n "The $ANIMAL has " +case $ANIMAL in + horse | dog | cat) echo -n "four";; + man | kangaroo ) echo -n "two";; + *) echo -n "an unknown number of";; +esac +echo " legs." +@end example + +@noindent + +If the @samp{;;} operator is used, no subsequent matches are attempted after +the first pattern match. +Using @samp{;&} in place of @samp{;;} causes execution to continue with +the @var{command-list} associated with the next clause, if any. +Using @samp{;;&} in place of @samp{;;} causes the shell to test the patterns +in the next clause, if any, and execute any associated @var{command-list} +on a successful match, +continuing the case statement execution as if the pattern list had not matched. + +The return status is zero if no @var{pattern} is matched. Otherwise, the +return status is the exit status of the @var{command-list} executed. + +@item select +@rwindex select + +The @code{select} construct allows the easy generation of menus. +It has almost the same syntax as the @code{for} command: + +@example +select @var{name} [in @var{words} @dots{}]; do @var{commands}; done +@end example + +The list of words following @code{in} is expanded, generating a list +of items. The set of expanded words is printed on the standard +error output stream, each preceded by a number. If the +@samp{in @var{words}} is omitted, the positional parameters are printed, +as if @samp{in "$@@"} had been specified. +The @env{PS3} prompt is then displayed and a line is read from the +standard input. +If the line consists of a number corresponding to one of the displayed +words, then the value of @var{name} is set to that word. +If the line is empty, the words and prompt are displayed again. +If @code{EOF} is read, the @code{select} command completes. +Any other value read causes @var{name} to be set to null. +The line read is saved in the variable @env{REPLY}. + +The @var{commands} are executed after each selection until a +@code{break} command is executed, at which +point the @code{select} command completes. + +Here is an example that allows the user to pick a filename from the +current directory, and displays the name and index of the file +selected. + +@example +select fname in *; +do + echo you picked $fname \($REPLY\) + break; +done +@end example + +@item ((@dots{})) +@example +(( @var{expression} )) +@end example + +The arithmetic @var{expression} is evaluated according to the rules +described below (@pxref{Shell Arithmetic}). +If the value of the expression is non-zero, the return status is 0; +otherwise the return status is 1. This is exactly equivalent to +@example +let "@var{expression}" +@end example +@noindent +@xref{Bash Builtins}, for a full description of the @code{let} builtin. + +@item [[@dots{}]] +@rwindex [[ +@rwindex ]] +@example +[[ @var{expression} ]] +@end example + +Return a status of 0 or 1 depending on the evaluation of +the conditional expression @var{expression}. +Expressions are composed of the primaries described below in +@ref{Bash Conditional Expressions}. +Word splitting and filename expansion are not performed on the words +between the @code{[[} and @code{]]}; tilde expansion, parameter and +variable expansion, arithmetic expansion, command substitution, process +substitution, and quote removal are performed. +Conditional operators such as @samp{-f} must be unquoted to be recognized +as primaries. + +When used with @code{[[}, the @samp{<} and @samp{>} operators sort +lexicographically using the current locale. + +When the @samp{==} and @samp{!=} operators are used, the string to the +right of the operator is considered a pattern and matched according +to the rules described below in @ref{Pattern Matching}, +as if the @code{extglob} shell option were enabled. +The @samp{=} operator is identical to @samp{==}. +If the @code{nocasematch} shell option +(see the description of @code{shopt} in @ref{The Shopt Builtin}) +is enabled, the match is performed without regard to the case +of alphabetic characters. +The return value is 0 if the string matches (@samp{==}) or does not +match (@samp{!=}) the pattern, and 1 otherwise. +Any part of the pattern may be quoted to force the quoted portion +to be matched as a string. + +An additional binary operator, @samp{=~}, is available, with the same +precedence as @samp{==} and @samp{!=}. +When it is used, the string to the right of the operator is considered +a @sc{posix} extended regular expression and matched accordingly +(using the @sc{posix} @code{regcomp} and @code{regexec} interfaces +usually described in @i{regex}(3)). +The return value is 0 if the string matches +the pattern, and 1 otherwise. +If the regular expression is syntactically incorrect, the conditional +expression's return value is 2. +If the @code{nocasematch} shell option +(see the description of @code{shopt} in @ref{The Shopt Builtin}) +is enabled, the match is performed without regard to the case +of alphabetic characters. +Any part of the pattern may be quoted to force the quoted portion +to be matched as a string. +Bracket expressions in regular expressions must be treated carefully, +since normal quoting characters lose their meanings between brackets. +If the pattern is stored in a shell variable, quoting the variable +expansion forces the entire pattern to be matched as a string. + +The pattern will match if it matches any part of the string. +Anchor the pattern using the @samp{^} and @samp{$} regular expression +operators to force it to match the entire string. +The array variable @code{BASH_REMATCH} records which parts of the string +matched the pattern. +The element of @code{BASH_REMATCH} with index 0 contains the portion of +the string matching the entire regular expression. +Substrings matched by parenthesized subexpressions within the regular +expression are saved in the remaining @code{BASH_REMATCH} indices. +The element of @code{BASH_REMATCH} with index @var{n} is the portion of the +string matching the @var{n}th parenthesized subexpression. + +For example, the following will match a line +(stored in the shell variable @var{line}) +if there is a sequence of characters anywhere in the value consisting of +any number, including zero, of +characters in the @code{space} character class, +zero or one instances of @samp{a}, then a @samp{b}: +@example +[[ $line =~ [[:space:]]*(a)?b ]] +@end example + +@noindent +That means values like @samp{aab} and @samp{ aaaaaab} will match, as +will a line containing a @samp{b} anywhere in its value. + +Storing the regular expression in a shell variable is often a useful +way to avoid problems with quoting characters that are special to the +shell. +It is sometimes difficult to specify a regular expression literally +without using quotes, or to keep track of the quoting used by regular +expressions while paying attention to the shell's quote removal. +Using a shell variable to store the pattern decreases these problems. +For example, the following is equivalent to the above: +@example +pattern='[[:space:]]*(a)?b' +[[ $line =~ $pattern ]] +@end example + +@noindent +If you want to match a character that's special to the regular expression +grammar, it has to be quoted to remove its special meaning. +This means that in the pattern @samp{xxx.txt}, the @samp{.} matches any +character in the string (its usual regular expression meaning), but in the +pattern @samp{"xxx.txt"} it can only match a literal @samp{.}. +Shell programmers should take special care with backslashes, since backslashes +are used both by the shell and regular expressions to remove the special +meaning from the following character. +The following two sets of commands are @emph{not} equivalent: +@example +pattern='\.' + +[[ . =~ $pattern ]] +[[ . =~ \. ]] + +[[ . =~ "$pattern" ]] +[[ . =~ '\.' ]] +@end example + +@noindent +The first two matches will succeed, but the second two will not, because +in the second two the backslash will be part of the pattern to be matched. +In the first two examples, the backslash removes the special meaning from +@samp{.}, so the literal @samp{.} matches. +If the string in the first examples were anything other than @samp{.}, say +@samp{a}, the pattern would not match, because the quoted @samp{.} in the +pattern loses its special meaning of matching any single character. + +Expressions may be combined using the following operators, listed +in decreasing order of precedence: + +@table @code +@item ( @var{expression} ) +Returns the value of @var{expression}. +This may be used to override the normal precedence of operators. + +@item ! @var{expression} +True if @var{expression} is false. + +@item @var{expression1} && @var{expression2} +True if both @var{expression1} and @var{expression2} are true. + +@item @var{expression1} || @var{expression2} +True if either @var{expression1} or @var{expression2} is true. +@end table + +@noindent +The @code{&&} and @code{||} operators do not evaluate @var{expression2} if the +value of @var{expression1} is sufficient to determine the return +value of the entire conditional expression. +@end table + +@node Command Grouping +@subsubsection Grouping Commands +@cindex commands, grouping + +Bash provides two ways to group a list of commands to be executed +as a unit. When commands are grouped, redirections may be applied +to the entire command list. For example, the output of all the +commands in the list may be redirected to a single stream. + +@table @code +@item () +@example +( @var{list} ) +@end example + +Placing a list of commands between parentheses causes a subshell +environment to be created (@pxref{Command Execution Environment}), and each +of the commands in @var{list} to be executed in that subshell. Since the +@var{list} is executed in a subshell, variable assignments do not remain in +effect after the subshell completes. + +@item @{@} +@rwindex @{ +@rwindex @} +@example +@{ @var{list}; @} +@end example + +Placing a list of commands between curly braces causes the list to +be executed in the current shell context. No subshell is created. +The semicolon (or newline) following @var{list} is required. +@end table + +In addition to the creation of a subshell, there is a subtle difference +between these two constructs due to historical reasons. The braces +are @code{reserved words}, so they must be separated from the @var{list} +by @code{blank}s or other shell metacharacters. +The parentheses are @code{operators}, and are +recognized as separate tokens by the shell even if they are not separated +from the @var{list} by whitespace. + +The exit status of both of these constructs is the exit status of +@var{list}. + +@node Coprocesses +@subsection Coprocesses +@cindex coprocess + +A @code{coprocess} is a shell command preceded by the @code{coproc} +reserved word. +A coprocess is executed asynchronously in a subshell, as if the command +had been terminated with the @samp{&} control operator, with a two-way pipe +established between the executing shell and the coprocess. + +The format for a coprocess is: +@example +coproc [@var{NAME}] @var{command} [@var{redirections}] +@end example + +@noindent +This creates a coprocess named @var{NAME}. +If @var{NAME} is not supplied, the default name is @var{COPROC}. +@var{NAME} must not be supplied if @var{command} is a simple +command (@pxref{Simple Commands}); otherwise, it is interpreted as +the first word of the simple command. + +When the coprocess is executed, the shell creates an array variable +(@pxref{Arrays}) +named @env{NAME} in the context of the executing shell. +The standard output of @var{command} +is connected via a pipe to a file descriptor in the executing shell, +and that file descriptor is assigned to @env{NAME}[0]. +The standard input of @var{command} +is connected via a pipe to a file descriptor in the executing shell, +and that file descriptor is assigned to @env{NAME}[1]. +This pipe is established before any redirections specified by the +command (@pxref{Redirections}). +The file descriptors can be utilized as arguments to shell commands +and redirections using standard word expansions. +Other than those created to execute command and process substitutions, +the file descriptors are not available in subshells. + +The process ID of the shell spawned to execute the coprocess is +available as the value of the variable @env{NAME}_PID. +The @code{wait} +builtin command may be used to wait for the coprocess to terminate. + +Since the coprocess is created as an asynchronous command, +the @code{coproc} command always returns success. +The return status of a coprocess is the exit status of @var{command}. + +@node GNU Parallel +@subsection GNU Parallel + +There are ways to run commands in parallel that are not built into Bash. +GNU Parallel is a tool to do just that. + +GNU Parallel, as its name suggests, can be used to build and run commands +in parallel. You may run the same command with different arguments, whether +they are filenames, usernames, hostnames, or lines read from files. GNU +Parallel provides shorthand references to many of the most common operations +(input lines, various portions of the input line, different ways to specify +the input source, and so on). Parallel can replace @code{xargs} or feed +commands from its input sources to several different instances of Bash. + +For a complete description, refer to the GNU Parallel documentation. A few +examples should provide a brief introduction to its use. + +For example, it is easy to replace @code{xargs} to gzip all html files in the +current directory and its subdirectories: +@example +find . -type f -name '*.html' -print | parallel gzip +@end example +@noindent +If you need to protect special characters such as newlines in file names, +use find's @option{-print0} option and parallel's @option{-0} option. + +You can use Parallel to move files from the current directory when the +number of files is too large to process with one @code{mv} invocation: +@example +printf '%s\n' * | parallel mv @{@} destdir +@end example + +As you can see, the @{@} is replaced with each line read from standard input. +While using @code{ls} will work in most instances, it is not sufficient to +deal with all filenames. @code{printf} is a shell builtin, and therefore is +not subject to the kernel's limit on the number of arguments to a program, +so you can use @samp{*} (but see below about the @code{dotglob} shell option). +If you need to accommodate special characters in filenames, you can use + +@example +printf '%s\0' * | parallel -0 mv @{@} destdir +@end example + +@noindent +as alluded to above. + +This will run as many @code{mv} commands as there are files in the current +directory. +You can emulate a parallel @code{xargs} by adding the @option{-X} option: +@example +printf '%s\0' * | parallel -0 -X mv @{@} destdir +@end example + +(You may have to modify the pattern if you have the @code{dotglob} option +enabled.) + +GNU Parallel can replace certain common idioms that operate on lines read +from a file (in this case, filenames listed one per line): +@example + while IFS= read -r x; do + do-something1 "$x" "config-$x" + do-something2 < "$x" + done < file | process-output +@end example + +@noindent +with a more compact syntax reminiscent of lambdas: +@example +cat list | parallel "do-something1 @{@} config-@{@} ; do-something2 < @{@}" | + process-output +@end example + +Parallel provides a built-in mechanism to remove filename extensions, which +lends itself to batch file transformations or renaming: +@example +ls *.gz | parallel -j+0 "zcat @{@} | bzip2 >@{.@}.bz2 && rm @{@}" +@end example +@noindent +This will recompress all files in the current directory with names ending +in .gz using bzip2, running one job per CPU (-j+0) in parallel. +(We use @code{ls} for brevity here; using @code{find} as above is more +robust in the face of filenames containing unexpected characters.) +Parallel can take arguments from the command line; the above can also be +written as + +@example +parallel "zcat @{@} | bzip2 >@{.@}.bz2 && rm @{@}" ::: *.gz +@end example + +If a command generates output, you may want to preserve the input order in +the output. For instance, the following command +@example +@{ + echo foss.org.my ; + echo debian.org ; + echo freenetproject.org ; +@} | parallel traceroute +@end example +@noindent +will display as output the traceroute invocation that finishes first. +Adding the @option{-k} option +@example +@{ + echo foss.org.my ; + echo debian.org ; + echo freenetproject.org ; +@} | parallel -k traceroute +@end example +@noindent +will ensure that the output of @code{traceroute foss.org.my} is displayed first. + +Finally, Parallel can be used to run a sequence of shell commands in parallel, +similar to @samp{cat file | bash}. +It is not uncommon to take a list of filenames, create a series of shell +commands to operate on them, and feed that list of commands to a shell. +Parallel can speed this up. Assuming that @file{file} contains a list of +shell commands, one per line, + +@example +parallel -j 10 < file +@end example + +@noindent +will evaluate the commands using the shell (since no explicit command is +supplied as an argument), in blocks of ten shell jobs at a time. + +@node Shell Functions +@section Shell Functions +@cindex shell function +@cindex functions, shell + +Shell functions are a way to group commands for later execution +using a single name for the group. They are executed just like +a "regular" command. +When the name of a shell function is used as a simple command name, +the list of commands associated with that function name is executed. +Shell functions are executed in the current +shell context; no new process is created to interpret them. + +Functions are declared using this syntax: +@rwindex function +@example +@var{fname} () @var{compound-command} [ @var{redirections} ] +@end example + +or + +@example +function @var{fname} [()] @var{compound-command} [ @var{redirections} ] +@end example + +This defines a shell function named @var{fname}. The reserved +word @code{function} is optional. +If the @code{function} reserved +word is supplied, the parentheses are optional. +The @var{body} of the function is the compound command +@var{compound-command} (@pxref{Compound Commands}). +That command is usually a @var{list} enclosed between @{ and @}, but +may be any compound command listed above, +with one exception: If the @code{function} reserved word is used, but the +parentheses are not supplied, the braces are required. +@var{compound-command} is executed whenever @var{fname} is specified as the +name of a command. +When the shell is in @sc{posix} mode (@pxref{Bash POSIX Mode}), +@var{fname} must be a valid shell @var{name} and +may not be the same as one of the special builtins +(@pxref{Special Builtins}). +In default mode, a function name can be any unquoted shell word that does +not contain @samp{$}. +Any redirections (@pxref{Redirections}) associated with the shell function +are performed when the function is executed. +A function definition may be deleted using the @option{-f} option to the +@code{unset} builtin (@pxref{Bourne Shell Builtins}). + +The exit status of a function definition is zero unless a syntax error +occurs or a readonly function with the same name already exists. +When executed, the exit status of a function is the exit status of the +last command executed in the body. + +Note that for historical reasons, in the most common usage the curly braces +that surround the body of the function must be separated from the body by +@code{blank}s or newlines. +This is because the braces are reserved words and are only recognized +as such when they are separated from the command list +by whitespace or another shell metacharacter. +Also, when using the braces, the @var{list} must be terminated by a semicolon, +a @samp{&}, or a newline. + +When a function is executed, the arguments to the +function become the positional parameters +during its execution (@pxref{Positional Parameters}). +The special parameter @samp{#} that expands to the number of +positional parameters is updated to reflect the change. +Special parameter @code{0} is unchanged. +The first element of the @env{FUNCNAME} variable is set to the +name of the function while the function is executing. + +All other aspects of the shell execution +environment are identical between a function and its caller +with these exceptions: +the @env{DEBUG} and @env{RETURN} traps +are not inherited unless the function has been given the +@code{trace} attribute using the @code{declare} builtin or +the @code{-o functrace} option has been enabled with +the @code{set} builtin, +(in which case all functions inherit the @env{DEBUG} and @env{RETURN} traps), +and the @env{ERR} trap is not inherited unless the @code{-o errtrace} +shell option has been enabled. +@xref{Bourne Shell Builtins}, for the description of the +@code{trap} builtin. + +The @env{FUNCNEST} variable, if set to a numeric value greater +than 0, defines a maximum function nesting level. Function +invocations that exceed the limit cause the entire command to +abort. + +If the builtin command @code{return} +is executed in a function, the function completes and +execution resumes with the next command after the function +call. +Any command associated with the @code{RETURN} trap is executed +before execution resumes. +When a function completes, the values of the +positional parameters and the special parameter @samp{#} +are restored to the values they had prior to the function's +execution. If a numeric argument is given to @code{return}, +that is the function's return status; otherwise the function's +return status is the exit status of the last command executed +before the @code{return}. + +Variables local to the function may be declared with the +@code{local} builtin. These variables are visible only to +the function and the commands it invokes. This is particularly +important when a shell function calls other functions. + +Local variables "shadow" variables with the same name declared at +previous scopes. For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. + +The shell uses @var{dynamic scoping} to control a variable's visibility +within functions. +With dynamic scoping, visible variables and their values +are a result of the sequence of function calls that caused execution +to reach the current function. +The value of a variable that a function sees depends +on its value within its caller, if any, whether that caller is +the "global" scope or another shell function. +This is also the value that a local variable +declaration "shadows", and the value that is restored when the function +returns. + +For example, if a variable @var{var} is declared as local in function +@var{func1}, and @var{func1} calls another function @var{func2}, +references to @var{var} made from within @var{func2} will resolve to the +local variable @var{var} from @var{func1}, shadowing any global variable +named @var{var}. + +The following script demonstrates this behavior. +When executed, the script displays + +@example +In func2, var = func1 local +@end example + +@example +func1() +@{ + local var='func1 local' + func2 +@} + +func2() +@{ + echo "In func2, var = $var" +@} + +var=global +func1 +@end example + +The @code{unset} builtin also acts using the same dynamic scope: if a +variable is local to the current scope, @code{unset} will unset it; +otherwise the unset will refer to the variable found in any calling scope +as described above. +If a variable at the current local scope is unset, it will remain so +until it is reset in that scope or until the function returns. +Once the function returns, any instance of the variable at a previous +scope will become visible. +If the unset acts on a variable at a previous scope, any instance of a +variable with that name that had been shadowed will become visible. + +Function names and definitions may be listed with the +@option{-f} option to the @code{declare} (@code{typeset}) +builtin command (@pxref{Bash Builtins}). +The @option{-F} option to @code{declare} or @code{typeset} +will list the function names only +(and optionally the source file and line number, if the @code{extdebug} +shell option is enabled). +Functions may be exported so that subshells +automatically have them defined with the +@option{-f} option to the @code{export} builtin +(@pxref{Bourne Shell Builtins}). + +Functions may be recursive. +The @code{FUNCNEST} variable may be used to limit the depth of the +function call stack and restrict the number of function invocations. +By default, no limit is placed on the number of recursive calls. + +@node Shell Parameters +@section Shell Parameters +@cindex parameters +@cindex variable, shell +@cindex shell variable + +@menu +* Positional Parameters:: The shell's command-line arguments. +* Special Parameters:: Parameters denoted by special characters. +@end menu + +A @var{parameter} is an entity that stores values. +It can be a @code{name}, a number, or one of the special characters +listed below. +A @var{variable} is a parameter denoted by a @code{name}. +A variable has a @var{value} and zero or more @var{attributes}. +Attributes are assigned using the @code{declare} builtin command +(see the description of the @code{declare} builtin in @ref{Bash Builtins}). + +A parameter is set if it has been assigned a value. The null string is +a valid value. Once a variable is set, it may be unset only by using +the @code{unset} builtin command. + +A variable may be assigned to by a statement of the form +@example +@var{name}=[@var{value}] +@end example +@noindent +If @var{value} +is not given, the variable is assigned the null string. All +@var{value}s undergo tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote +removal (detailed below). If the variable has its @code{integer} +attribute set, then @var{value} +is evaluated as an arithmetic expression even if the @code{$((@dots{}))} +expansion is not used (@pxref{Arithmetic Expansion}). +Word splitting is not performed, with the exception +of @code{"$@@"} as explained below. +Filename expansion is not performed. +Assignment statements may also appear as arguments to the +@code{alias}, +@code{declare}, @code{typeset}, @code{export}, @code{readonly}, +and @code{local} builtin commands (@var{declaration} commands). +When in @sc{posix} mode (@pxref{Bash POSIX Mode}), these builtins may appear +in a command after one or more instances of the @code{command} builtin +and retain these assignment statement properties. + +In the context where an assignment statement is assigning a value +to a shell variable or array index (@pxref{Arrays}), the @samp{+=} +operator can be used to +append to or add to the variable's previous value. +This includes arguments to builtin commands such as @code{declare} that +accept assignment statements (@var{declaration} commands). +When @samp{+=} is applied to a variable for which the @var{integer} attribute +has been set, @var{value} is evaluated as an arithmetic expression and +added to the variable's current value, which is also evaluated. +When @samp{+=} is applied to an array variable using compound assignment +(@pxref{Arrays}), the +variable's value is not unset (as it is when using @samp{=}), and new +values are appended to the array beginning at one greater than the array's +maximum index (for indexed arrays), or added as additional key-value pairs +in an associative array. +When applied to a string-valued variable, @var{value} is expanded and +appended to the variable's value. + +A variable can be assigned the @var{nameref} attribute using the +@option{-n} option to the @code{declare} or @code{local} builtin commands +(@pxref{Bash Builtins}) +to create a @var{nameref}, or a reference to another variable. +This allows variables to be manipulated indirectly. +Whenever the nameref variable is referenced, assigned to, unset, or has +its attributes modified (other than using or changing the nameref +attribute itself), the +operation is actually performed on the variable specified by the nameref +variable's value. +A nameref is commonly used within shell functions to refer to a variable +whose name is passed as an argument to the function. +For instance, if a variable name is passed to a shell function as its first +argument, running +@example +declare -n ref=$1 +@end example +@noindent +inside the function creates a nameref variable @var{ref} whose value is +the variable name passed as the first argument. +References and assignments to @var{ref}, and changes to its attributes, +are treated as references, assignments, and attribute modifications +to the variable whose name was passed as @code{$1}. + +If the control variable in a @code{for} loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. +Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. +Namerefs can be unset using the @option{-n} option to the @code{unset} builtin +(@pxref{Bourne Shell Builtins}). +Otherwise, if @code{unset} is executed with the name of a nameref variable +as an argument, the variable referenced by the nameref variable will be unset. + +@node Positional Parameters +@subsection Positional Parameters +@cindex parameters, positional + +A @var{positional parameter} is a parameter denoted by one or more +digits, other than the single digit @code{0}. Positional parameters are +assigned from the shell's arguments when it is invoked, +and may be reassigned using the @code{set} builtin command. +Positional parameter @code{N} may be referenced as @code{$@{N@}}, or +as @code{$N} when @code{N} consists of a single digit. +Positional parameters may not be assigned to with assignment statements. +The @code{set} and @code{shift} builtins are used to set and +unset them (@pxref{Shell Builtin Commands}). +The positional parameters are +temporarily replaced when a shell function is executed +(@pxref{Shell Functions}). + +When a positional parameter consisting of more than a single +digit is expanded, it must be enclosed in braces. + +@node Special Parameters +@subsection Special Parameters +@cindex parameters, special + +The shell treats several parameters specially. These parameters may +only be referenced; assignment to them is not allowed. + +@vtable @code + +@item * +@vindex $* +($*) Expands to the positional parameters, starting from one. +When the expansion is not within double quotes, each positional parameter +expands to a separate word. +In contexts where it is performed, those words +are subject to further word splitting and filename expansion. +When the expansion occurs within double quotes, it expands to a single word +with the value of each parameter separated by the first character of the +@env{IFS} special variable. That is, @code{"$*"} is equivalent +to @code{"$1@var{c}$2@var{c}@dots{}"}, where @var{c} +is the first character of the value of the @code{IFS} +variable. +If @env{IFS} is unset, the parameters are separated by spaces. +If @env{IFS} is null, the parameters are joined without intervening +separators. + +@item @@ +@vindex $@@ +($@@) Expands to the positional parameters, starting from one. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +When the +expansion occurs within double quotes, and word splitting is performed, +each parameter expands to a +separate word. That is, @code{"$@@"} is equivalent to +@code{"$1" "$2" @dots{}}. +If the double-quoted expansion occurs within a word, the expansion of +the first parameter is joined with the beginning part of the original +word, and the expansion of the last parameter is joined with the last +part of the original word. +When there are no positional parameters, @code{"$@@"} and +@code{$@@} +expand to nothing (i.e., they are removed). + +@item # +@vindex $# +($#) Expands to the number of positional parameters in decimal. + +@item ? +@vindex $? +($?) Expands to the exit status of the most recently executed foreground +pipeline. + +@item - +@vindex $- +($-, a hyphen.) Expands to the current option flags as specified upon +invocation, by the @code{set} +builtin command, or those set by the shell itself +(such as the @option{-i} option). + +@item $ +@vindex $$ +($$) Expands to the process @sc{id} of the shell. In a @code{()} subshell, it +expands to the process @sc{id} of the invoking shell, not the subshell. + +@item ! +@vindex $! +($!) Expands to the process @sc{id} of the job most recently placed into the +background, whether executed as an asynchronous command or using +the @code{bg} builtin (@pxref{Job Control Builtins}). + +@item 0 +@vindex $0 +($0) Expands to the name of the shell or shell script. This is set at +shell initialization. If Bash is invoked with a file of commands +(@pxref{Shell Scripts}), @code{$0} is set to the name of that file. +If Bash is started with the @option{-c} option (@pxref{Invoking Bash}), +then @code{$0} is set to the first argument after the string to be +executed, if one is present. Otherwise, it is set +to the filename used to invoke Bash, as given by argument zero. +@end vtable + +@node Shell Expansions +@section Shell Expansions +@cindex expansion + +Expansion is performed on the command line after it has been split into +@code{token}s. There are seven kinds of expansion performed: + +@itemize @bullet +@item brace expansion +@item tilde expansion +@item parameter and variable expansion +@item command substitution +@item arithmetic expansion +@item word splitting +@item filename expansion +@end itemize + +@menu +* Brace Expansion:: Expansion of expressions within braces. +* Tilde Expansion:: Expansion of the ~ character. +* Shell Parameter Expansion:: How Bash expands variables to their values. +* Command Substitution:: Using the output of a command as an argument. +* Arithmetic Expansion:: How to use arithmetic in shell expansions. +* Process Substitution:: A way to write and read to and from a + command. +* Word Splitting:: How the results of expansion are split into separate + arguments. +* Filename Expansion:: A shorthand for specifying filenames matching patterns. +* Quote Removal:: How and when quote characters are removed from + words. +@end menu + +The order of expansions is: +brace expansion; +tilde expansion, parameter and variable expansion, arithmetic expansion, +and command substitution (done in a left-to-right fashion); +word splitting; +and filename expansion. + +On systems that can support it, there is an additional expansion +available: @var{process substitution}. +This is performed at the +same time as tilde, parameter, variable, and arithmetic expansion and +command substitution. + +After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +(@var{quote removal}). + +Only brace expansion, word splitting, and filename expansion +can increase the number of words of the expansion; other expansions +expand a single word to a single word. +The only exceptions to this are the expansions of +@code{"$@@"} and @code{$*} (@pxref{Special Parameters}), and +@code{"$@{@var{name}[@@]@}"} and @code{$@{@var{name}[*]@}} +(@pxref{Arrays}). + +After all expansions, @code{quote removal} (@pxref{Quote Removal}) +is performed. + +@node Brace Expansion +@subsection Brace Expansion +@cindex brace expansion +@cindex expansion, brace + +Brace expansion is a mechanism by which arbitrary strings may be generated. +This mechanism is similar to +@var{filename expansion} (@pxref{Filename Expansion}), +but the filenames generated need not exist. +Patterns to be brace expanded take the form of an optional @var{preamble}, +followed by either a series of comma-separated strings or a sequence expression +between a pair of braces, +followed by an optional @var{postscript}. +The preamble is prefixed to each string contained within the braces, and +the postscript is then appended to each resulting string, expanding left +to right. + +Brace expansions may be nested. +The results of each expanded string are not sorted; left to right order +is preserved. +For example, +@example +bash$ echo a@{d,c,b@}e +ade ace abe +@end example + +A sequence expression takes the form @code{@{@var{x}..@var{y}[..@var{incr}]@}}, +where @var{x} and @var{y} are either integers or single characters, +and @var{incr}, an optional increment, is an integer. +When integers are supplied, the expression expands to each number between +@var{x} and @var{y}, inclusive. +Supplied integers may be prefixed with @samp{0} to force each term to have the +same width. +When either @var{x} or @var{y} begins with a zero, the shell +attempts to force all generated terms to contain the same number of digits, +zero-padding where necessary. +When characters are supplied, the expression expands to each character +lexicographically between @var{x} and @var{y}, inclusive, +using the default C locale. +Note that both @var{x} and @var{y} must be of the same type. +When the increment is supplied, it is used as the difference between +each term. The default increment is 1 or -1 as appropriate. + +Brace expansion is performed before any other expansions, +and any characters special to other expansions are preserved +in the result. It is strictly textual. Bash +does not apply any syntactic interpretation to the context of the +expansion or the text between the braces. + +A correctly-formed brace expansion must contain unquoted opening +and closing braces, and at least one unquoted comma or a valid +sequence expression. +Any incorrectly formed brace expansion is left unchanged. + +A @{ or @samp{,} may be quoted with a backslash to prevent its +being considered part of a brace expression. +To avoid conflicts with parameter expansion, the string @samp{$@{} +is not considered eligible for brace expansion, +and inhibits brace expansion until the closing @samp{@}}. + +This construct is typically used as shorthand when the common +prefix of the strings to be generated is longer than in the +above example: +@example +mkdir /usr/local/src/bash/@{old,new,dist,bugs@} +@end example +or +@example +chown root /usr/@{ucb/@{ex,edit@},lib/@{ex?.?*,how_ex@}@} +@end example + +@node Tilde Expansion +@subsection Tilde Expansion +@cindex tilde expansion +@cindex expansion, tilde + +If a word begins with an unquoted tilde character (@samp{~}), all of the +characters up to the first unquoted slash (or all characters, +if there is no unquoted slash) are considered a @var{tilde-prefix}. +If none of the characters in the tilde-prefix are quoted, the +characters in the tilde-prefix following the tilde are treated as a +possible @var{login name}. +If this login name is the null string, the tilde is replaced with the +value of the @env{HOME} shell variable. +If @env{HOME} is unset, the home directory of the user executing the +shell is substituted instead. +Otherwise, the tilde-prefix is replaced with the home directory +associated with the specified login name. + +If the tilde-prefix is @samp{~+}, the value of +the shell variable @env{PWD} replaces the tilde-prefix. +If the tilde-prefix is @samp{~-}, the value of the shell variable +@env{OLDPWD}, if it is set, is substituted. + +If the characters following the tilde in the tilde-prefix consist of a +number @var{N}, optionally prefixed by a @samp{+} or a @samp{-}, +the tilde-prefix is replaced with the +corresponding element from the directory stack, as it would be displayed +by the @code{dirs} builtin invoked with the characters following tilde +in the tilde-prefix as an argument (@pxref{The Directory Stack}). +If the tilde-prefix, sans the tilde, consists of a number without a +leading @samp{+} or @samp{-}, @samp{+} is assumed. + +If the login name is invalid, or the tilde expansion fails, the word is +left unchanged. + +Each variable assignment is checked for unquoted tilde-prefixes immediately +following a @samp{:} or the first @samp{=}. +In these cases, tilde expansion is also performed. +Consequently, one may use filenames with tildes in assignments to +@env{PATH}, @env{MAILPATH}, and @env{CDPATH}, +and the shell assigns the expanded value. + +The following table shows how Bash treats unquoted tilde-prefixes: + +@table @code +@item ~ +The value of @code{$HOME} +@item ~/foo +@file{$HOME/foo} + +@item ~fred/foo +The subdirectory @code{foo} of the home directory of the user +@code{fred} + +@item ~+/foo +@file{$PWD/foo} + +@item ~-/foo +@file{$@{OLDPWD-'~-'@}/foo} + +@item ~@var{N} +The string that would be displayed by @samp{dirs +@var{N}} + +@item ~+@var{N} +The string that would be displayed by @samp{dirs +@var{N}} + +@item ~-@var{N} +The string that would be displayed by @samp{dirs -@var{N}} +@end table + +Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (@pxref{Shell Parameters}) +when they appear as arguments to simple commands. +Bash does not do this, except for the @var{declaration} commands listed +above, when in @sc{posix} mode. + +@node Shell Parameter Expansion +@subsection Shell Parameter Expansion +@cindex parameter expansion +@cindex expansion, parameter + +The @samp{$} character introduces parameter expansion, +command substitution, or arithmetic expansion. The parameter name +or symbol to be expanded may be enclosed in braces, which +are optional but serve to protect the variable to be expanded from +characters immediately following it which could be +interpreted as part of the name. + +When braces are used, the matching ending brace is the first @samp{@}} +not escaped by a backslash or within a quoted string, and not within an +embedded arithmetic expansion, command substitution, or parameter +expansion. + +The basic form of parameter expansion is $@{@var{parameter}@}. +The value of @var{parameter} is substituted. +The @var{parameter} is a shell parameter as described above +(@pxref{Shell Parameters}) or an array reference (@pxref{Arrays}). +The braces are required when @var{parameter} +is a positional parameter with more than one digit, +or when @var{parameter} is followed by a character that is not to be +interpreted as part of its name. + +If the first character of @var{parameter} is an exclamation point (!), +and @var{parameter} is not a @var{nameref}, +it introduces a level of indirection. +Bash uses the value formed by expanding the rest of +@var{parameter} as the new @var{parameter}; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original @var{parameter}. +This is known as @code{indirect expansion}. +The value is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +If @var{parameter} is a nameref, this expands to the name of the +variable referenced by @var{parameter} instead of performing the +complete indirect expansion. +The exceptions to this are the expansions of $@{!@var{prefix}*@} +and $@{!@var{name}[@@]@} +described below. +The exclamation point must immediately follow the left brace in order to +introduce indirection. + +In each of the cases below, @var{word} is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. + +When not performing substring expansion, using the form described +below (e.g., @samp{:-}), Bash tests for a parameter that is unset or null. +Omitting the colon results in a test only for a parameter that is unset. +Put another way, if the colon is included, +the operator tests for both @var{parameter}'s existence and that its value +is not null; if the colon is omitted, the operator tests only for existence. + +@table @code + +@item $@{@var{parameter}:@minus{}@var{word}@} +If @var{parameter} is unset or null, the expansion of +@var{word} is substituted. Otherwise, the value of +@var{parameter} is substituted. + +@item $@{@var{parameter}:=@var{word}@} +If @var{parameter} +is unset or null, the expansion of @var{word} +is assigned to @var{parameter}. +The value of @var{parameter} is then substituted. +Positional parameters and special parameters may not be assigned to +in this way. + +@item $@{@var{parameter}:?@var{word}@} +If @var{parameter} +is null or unset, the expansion of @var{word} (or a message +to that effect if @var{word} +is not present) is written to the standard error and the shell, if it +is not interactive, exits. Otherwise, the value of @var{parameter} is +substituted. + +@item $@{@var{parameter}:+@var{word}@} +If @var{parameter} +is null or unset, nothing is substituted, otherwise the expansion of +@var{word} is substituted. + +@item $@{@var{parameter}:@var{offset}@} +@itemx $@{@var{parameter}:@var{offset}:@var{length}@} +This is referred to as Substring Expansion. +It expands to up to @var{length} characters of the value of @var{parameter} +starting at the character specified by @var{offset}. +If @var{parameter} is @samp{@@}, an indexed array subscripted by +@samp{@@} or @samp{*}, or an associative array name, the results differ as +described below. +If @var{length} is omitted, it expands to the substring of the value of +@var{parameter} starting at the character specified by @var{offset} +and extending to the end of the value. +@var{length} and @var{offset} are arithmetic expressions +(@pxref{Shell Arithmetic}). + +If @var{offset} evaluates to a number less than zero, the value +is used as an offset in characters +from the end of the value of @var{parameter}. +If @var{length} evaluates to a number less than zero, +it is interpreted as an offset in characters +from the end of the value of @var{parameter} rather than +a number of characters, and the expansion is the characters between +@var{offset} and that result. +Note that a negative offset must be separated from the colon by at least +one space to avoid being confused with the @samp{:-} expansion. + +Here are some examples illustrating substring expansion on parameters and +subscripted arrays: + +@verbatim +$ string=01234567890abcdefgh +$ echo ${string:7} +7890abcdefgh +$ echo ${string:7:0} + +$ echo ${string:7:2} +78 +$ echo ${string:7:-2} +7890abcdef +$ echo ${string: -7} +bcdefgh +$ echo ${string: -7:0} + +$ echo ${string: -7:2} +bc +$ echo ${string: -7:-2} +bcdef +$ set -- 01234567890abcdefgh +$ echo ${1:7} +7890abcdefgh +$ echo ${1:7:0} + +$ echo ${1:7:2} +78 +$ echo ${1:7:-2} +7890abcdef +$ echo ${1: -7} +bcdefgh +$ echo ${1: -7:0} + +$ echo ${1: -7:2} +bc +$ echo ${1: -7:-2} +bcdef +$ array[0]=01234567890abcdefgh +$ echo ${array[0]:7} +7890abcdefgh +$ echo ${array[0]:7:0} + +$ echo ${array[0]:7:2} +78 +$ echo ${array[0]:7:-2} +7890abcdef +$ echo ${array[0]: -7} +bcdefgh +$ echo ${array[0]: -7:0} + +$ echo ${array[0]: -7:2} +bc +$ echo ${array[0]: -7:-2} +bcdef +@end verbatim + +If @var{parameter} is @samp{@@}, the result is @var{length} positional +parameters beginning at @var{offset}. +A negative @var{offset} is taken relative to one greater than the greatest +positional parameter, so an offset of -1 evaluates to the last positional +parameter. +It is an expansion error if @var{length} evaluates to a number less than zero. + +The following examples illustrate substring expansion using positional +parameters: + +@verbatim +$ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h +$ echo ${@:7} +7 8 9 0 a b c d e f g h +$ echo ${@:7:0} + +$ echo ${@:7:2} +7 8 +$ echo ${@:7:-2} +bash: -2: substring expression < 0 +$ echo ${@: -7:2} +b c +$ echo ${@:0} +./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h +$ echo ${@:0:2} +./bash 1 +$ echo ${@: -7:0} + +@end verbatim + +If @var{parameter} is an indexed array name subscripted +by @samp{@@} or @samp{*}, the result is the @var{length} +members of the array beginning with @code{$@{@var{parameter}[@var{offset}]@}}. +A negative @var{offset} is taken relative to one greater than the maximum +index of the specified array. +It is an expansion error if @var{length} evaluates to a number less than zero. + +These examples show how you can use substring expansion with indexed +arrays: + +@verbatim +$ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h) +$ echo ${array[@]:7} +7 8 9 0 a b c d e f g h +$ echo ${array[@]:7:2} +7 8 +$ echo ${array[@]: -7:2} +b c +$ echo ${array[@]: -7:-2} +bash: -2: substring expression < 0 +$ echo ${array[@]:0} +0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h +$ echo ${array[@]:0:2} +0 1 +$ echo ${array[@]: -7:0} + +@end verbatim + +Substring expansion applied to an associative array produces undefined +results. + +Substring indexing is zero-based unless the positional parameters +are used, in which case the indexing starts at 1 by default. +If @var{offset} is 0, and the positional parameters are used, @code{$0} is +prefixed to the list. + +@item $@{!@var{prefix}*@} +@itemx $@{!@var{prefix}@@@} +Expands to the names of variables whose names begin with @var{prefix}, +separated by the first character of the @env{IFS} special variable. +When @samp{@@} is used and the expansion appears within double quotes, each +variable name expands to a separate word. + +@item $@{!@var{name}[@@]@} +@itemx $@{!@var{name}[*]@} +If @var{name} is an array variable, expands to the list of array indices +(keys) assigned in @var{name}. +If @var{name} is not an array, expands to 0 if @var{name} is set and null +otherwise. +When @samp{@@} is used and the expansion appears within double quotes, each +key expands to a separate word. + +@item $@{#@var{parameter}@} +The length in characters of the expanded value of @var{parameter} is +substituted. +If @var{parameter} is @samp{*} or @samp{@@}, the value substituted +is the number of positional parameters. +If @var{parameter} is an array name subscripted by @samp{*} or @samp{@@}, +the value substituted is the number of elements in the array. +If @var{parameter} +is an indexed array name subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +@var{parameter}, so negative indices count back from the end of the +array, and an index of -1 references the last element. + +@item $@{@var{parameter}#@var{word}@} +@itemx $@{@var{parameter}##@var{word}@} +The @var{word} +is expanded to produce a pattern and matched according to the rules +described below (@pxref{Pattern Matching}). If the pattern matches +the beginning of the expanded value of @var{parameter}, +then the result of the expansion is the expanded value of @var{parameter} +with the shortest matching pattern (the @samp{#} case) or the +longest matching pattern (the @samp{##} case) deleted. +If @var{parameter} is @samp{@@} or @samp{*}, +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If @var{parameter} is an array variable subscripted with +@samp{@@} or @samp{*}, +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. + +@item $@{@var{parameter}%@var{word}@} +@itemx $@{@var{parameter}%%@var{word}@} +The @var{word} +is expanded to produce a pattern and matched according to the rules +described below (@pxref{Pattern Matching}). +If the pattern matches a trailing portion of the expanded value of +@var{parameter}, then the result of the expansion is the value of +@var{parameter} with the shortest matching pattern (the @samp{%} case) +or the longest matching pattern (the @samp{%%} case) deleted. +If @var{parameter} is @samp{@@} or @samp{*}, +the pattern removal operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If @var{parameter} +is an array variable subscripted with @samp{@@} or @samp{*}, +the pattern removal operation is applied to each member of the +array in turn, and the expansion is the resultant list. + +@item $@{@var{parameter}/@var{pattern}/@var{string}@} + +The @var{pattern} is expanded to produce a pattern just as in +filename expansion. +@var{Parameter} is expanded and the longest match of @var{pattern} +against its value is replaced with @var{string}. +The match is performed according to the rules described below +(@pxref{Pattern Matching}). +If @var{pattern} begins with @samp{/}, all matches of @var{pattern} are +replaced with @var{string}. Normally only the first match is replaced. +If @var{pattern} begins with @samp{#}, it must match at the beginning +of the expanded value of @var{parameter}. +If @var{pattern} begins with @samp{%}, it must match at the end +of the expanded value of @var{parameter}. +If @var{string} is null, matches of @var{pattern} are deleted +and the @code{/} following @var{pattern} may be omitted. +If the @code{nocasematch} shell option +(see the description of @code{shopt} in @ref{The Shopt Builtin}) +is enabled, the match is performed without regard to the case +of alphabetic characters. +If @var{parameter} is @samp{@@} or @samp{*}, +the substitution operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If @var{parameter} +is an array variable subscripted with @samp{@@} or @samp{*}, +the substitution operation is applied to each member of the +array in turn, and the expansion is the resultant list. + +@item $@{@var{parameter}^@var{pattern}@} +@itemx $@{@var{parameter}^^@var{pattern}@} +@itemx $@{@var{parameter},@var{pattern}@} +@itemx $@{@var{parameter},,@var{pattern}@} +This expansion modifies the case of alphabetic characters in @var{parameter}. +The @var{pattern} is expanded to produce a pattern just as in +filename expansion. +Each character in the expanded value of @var{parameter} is tested against +@var{pattern}, and, if it matches the pattern, its case is converted. +The pattern should not attempt to match more than one character. +The @samp{^} operator converts lowercase letters matching @var{pattern} +to uppercase; the @samp{,} operator converts matching uppercase letters +to lowercase. +The @samp{^^} and @samp{,,} expansions convert each matched character in the +expanded value; the @samp{^} and @samp{,} expansions match and convert only +the first character in the expanded value. +If @var{pattern} is omitted, it is treated like a @samp{?}, which matches +every character. +If @var{parameter} is @samp{@@} or @samp{*}, +the case modification operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If @var{parameter} +is an array variable subscripted with @samp{@@} or @samp{*}, +the case modification operation is applied to each member of the +array in turn, and the expansion is the resultant list. + +@item $@{@var{parameter}@@@var{operator}@} +The expansion is either a transformation of the value of @var{parameter} +or information about @var{parameter} itself, depending on the value of +@var{operator}. Each @var{operator} is a single letter: + +@table @code +@item U +The expansion is a string that is the value of @var{parameter} with lowercase +alphabetic characters converted to uppercase. +@item u +The expansion is a string that is the value of @var{parameter} with the first +character converted to uppercase, if it is alphabetic. +@item L +The expansion is a string that is the value of @var{parameter} with uppercase +alphabetic characters converted to lowercase. +@item Q +The expansion is a string that is the value of @var{parameter} quoted in a +format that can be reused as input. +@item E +The expansion is a string that is the value of @var{parameter} with backslash +escape sequences expanded as with the @code{$'@dots{}'} quoting mechanism. +@item P +The expansion is a string that is the result of expanding the value of +@var{parameter} as if it were a prompt string (@pxref{Controlling the Prompt}). +@item A +The expansion is a string in the form of +an assignment statement or @code{declare} command that, if +evaluated, will recreate @var{parameter} with its attributes and value. +@item K +Produces a possibly-quoted version of the value of @var{parameter}, +except that it prints the values of +indexed and associative arrays as a sequence of quoted key-value pairs +(@pxref{Arrays}). +@item a +The expansion is a string consisting of flag values representing +@var{parameter}'s attributes. +@end table + +If @var{parameter} is @samp{@@} or @samp{*}, +the operation is applied to each positional +parameter in turn, and the expansion is the resultant list. +If @var{parameter} +is an array variable subscripted with @samp{@@} or @samp{*}, +the operation is applied to each member of the +array in turn, and the expansion is the resultant list. + +The result of the expansion is subject to word splitting and filename +expansion as described below. +@end table + +@node Command Substitution +@subsection Command Substitution +@cindex command substitution + +Command substitution allows the output of a command to replace +the command itself. +Command substitution occurs when a command is enclosed as follows: +@example +$(@var{command}) +@end example +@noindent +or +@example +`@var{command}` +@end example + +@noindent +Bash performs the expansion by executing @var{command} in a subshell environment +and replacing the command substitution with the standard output of the +command, with any trailing newlines deleted. +Embedded newlines are not deleted, but they may be removed during +word splitting. +The command substitution @code{$(cat @var{file})} can be +replaced by the equivalent but faster @code{$(< @var{file})}. + +When the old-style backquote form of substitution is used, +backslash retains its literal meaning except when followed by +@samp{$}, @samp{`}, or @samp{\}. +The first backquote not preceded by a backslash terminates the +command substitution. +When using the @code{$(@var{command})} form, all characters between +the parentheses make up the command; none are treated specially. + +Command substitutions may be nested. To nest when using the backquoted +form, escape the inner backquotes with backslashes. + +If the substitution appears within double quotes, word splitting and +filename expansion are not performed on the results. + +@node Arithmetic Expansion +@subsection Arithmetic Expansion +@cindex expansion, arithmetic +@cindex arithmetic expansion + +Arithmetic expansion allows the evaluation of an arithmetic expression +and the substitution of the result. The format for arithmetic expansion is: + +@example +$(( @var{expression} )) +@end example + +The expression is treated as if it were within double quotes, but +a double quote inside the parentheses is not treated specially. +All tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. +The result is treated as the arithmetic expression to be evaluated. +Arithmetic expansions may be nested. + +The evaluation is performed according to the rules listed below +(@pxref{Shell Arithmetic}). +If the expression is invalid, Bash prints a message indicating +failure to the standard error and no substitution occurs. + +@node Process Substitution +@subsection Process Substitution +@cindex process substitution + +Process substitution allows a process's input or output to be +referred to using a filename. +It takes the form of +@example +<(@var{list}) +@end example +@noindent +or +@example +>(@var{list}) +@end example +@noindent +The process @var{list} is run asynchronously, and its input or output +appears as a filename. +This filename is +passed as an argument to the current command as the result of the +expansion. +If the @code{>(@var{list})} form is used, writing to +the file will provide input for @var{list}. If the +@code{<(@var{list})} form is used, the file passed as an +argument should be read to obtain the output of @var{list}. +Note that no space may appear between the @code{<} or @code{>} +and the left parenthesis, otherwise the construct would be interpreted +as a redirection. +Process substitution is supported on systems that support named +pipes (@sc{fifo}s) or the @file{/dev/fd} method of naming open files. + +When available, process substitution is performed simultaneously with +parameter and variable expansion, command substitution, and arithmetic +expansion. + +@node Word Splitting +@subsection Word Splitting +@cindex word splitting + +The shell scans the results of parameter expansion, command substitution, +and arithmetic expansion that did not occur within double quotes for +word splitting. + +The shell treats each character of @env{$IFS} as a delimiter, and splits +the results of the other expansions into words using these characters +as field terminators. +If @env{IFS} is unset, or its value is exactly @code{}, +the default, then sequences of +@code{ }, @code{}, and @code{} +at the beginning and end of the results of the previous +expansions are ignored, and any sequence of @env{IFS} +characters not at the beginning or end serves to delimit words. +If @env{IFS} has a value other than the default, then sequences of +the whitespace characters @code{space}, @code{tab}, and @code{newline} +are ignored at the beginning and end of the +word, as long as the whitespace character is in the +value of @env{IFS} (an @env{IFS} whitespace character). +Any character in @env{IFS} that is not @env{IFS} +whitespace, along with any adjacent @env{IFS} +whitespace characters, delimits a field. A sequence of @env{IFS} +whitespace characters is also treated as a delimiter. +If the value of @env{IFS} is null, no word splitting occurs. + +Explicit null arguments (@code{""} or @code{''}) are retained +and passed to commands as empty strings. +Unquoted implicit null arguments, resulting from the expansion of +parameters that have no values, are removed. +If a parameter with no value is expanded within double quotes, a +null argument results and is retained +and passed to a command as an empty string. +When a quoted null argument appears as part of a word whose expansion is +non-null, the null argument is removed. +That is, the word +@code{-d''} becomes @code{-d} after word splitting and +null argument removal. + +Note that if no expansion occurs, no splitting +is performed. + +@node Filename Expansion +@subsection Filename Expansion +@menu +* Pattern Matching:: How the shell matches patterns. +@end menu +@cindex expansion, filename +@cindex expansion, pathname +@cindex filename expansion +@cindex pathname expansion + +After word splitting, unless the @option{-f} option has been set +(@pxref{The Set Builtin}), Bash scans each word for the characters +@samp{*}, @samp{?}, and @samp{[}. +If one of these characters appears, and is not quoted, then the word is +regarded as a @var{pattern}, +and replaced with an alphabetically sorted list of +filenames matching the pattern (@pxref{Pattern Matching}). +If no matching filenames are found, +and the shell option @code{nullglob} is disabled, the word is left +unchanged. +If the @code{nullglob} option is set, and no matches are found, the word +is removed. +If the @code{failglob} shell option is set, and no matches are found, +an error message is printed and the command is not executed. +If the shell option @code{nocaseglob} is enabled, the match is performed +without regard to the case of alphabetic characters. + +When a pattern is used for filename expansion, the character @samp{.} +at the start of a filename or immediately following a slash +must be matched explicitly, unless the shell option @code{dotglob} is set. +The filenames @samp{.} and @samp{..} must always be matched explicitly, +even if @code{dotglob} is set. +In other cases, the @samp{.} character is not treated specially. + +When matching a filename, the slash character must always be +matched explicitly by a slash in the pattern, but in other matching +contexts it can be matched by a special pattern character as described +below (@pxref{Pattern Matching}). + +See the description of @code{shopt} in @ref{The Shopt Builtin}, +for a description of the @code{nocaseglob}, @code{nullglob}, +@code{failglob}, and @code{dotglob} options. + +The @env{GLOBIGNORE} +shell variable may be used to restrict the set of file names matching a +pattern. If @env{GLOBIGNORE} +is set, each matching file name that also matches one of the patterns in +@env{GLOBIGNORE} is removed from the list of matches. +If the @code{nocaseglob} option is set, the matching against the patterns in +@env{GLOBIGNORE} is performed without regard to case. +The filenames +@file{.} and @file{..} +are always ignored when @env{GLOBIGNORE} +is set and not null. +However, setting @env{GLOBIGNORE} to a non-null value has the effect of +enabling the @code{dotglob} +shell option, so all other filenames beginning with a +@samp{.} will match. +To get the old behavior of ignoring filenames beginning with a +@samp{.}, make @samp{.*} one of the patterns in @env{GLOBIGNORE}. +The @code{dotglob} option is disabled when @env{GLOBIGNORE} +is unset. + +@node Pattern Matching +@subsubsection Pattern Matching +@cindex pattern matching +@cindex matching, pattern + +Any character that appears in a pattern, other than the special pattern +characters described below, matches itself. +The @sc{nul} character may not occur in a pattern. +A backslash escapes the following character; the +escaping backslash is discarded when matching. +The special pattern characters must be quoted if they are to be matched +literally. + +The special pattern characters have the following meanings: +@table @code +@item * +Matches any string, including the null string. +When the @code{globstar} shell option is enabled, and @samp{*} is used in +a filename expansion context, two adjacent @samp{*}s used as a single +pattern will match all files and zero or more directories and +subdirectories. +If followed by a @samp{/}, two adjacent @samp{*}s will match only +directories and subdirectories. +@item ? +Matches any single character. +@item [@dots{}] +Matches any one of the enclosed characters. A pair of characters +separated by a hyphen denotes a @var{range expression}; +any character that falls between those two characters, inclusive, +using the current locale's collating sequence and character set, +is matched. If the first character following the +@samp{[} is a @samp{!} or a @samp{^} +then any character not enclosed is matched. A @samp{@minus{}} +may be matched by including it as the first or last character +in the set. A @samp{]} may be matched by including it as the first +character in the set. +The sorting order of characters in range expressions is determined by +the current locale and the values of the +@env{LC_COLLATE} and @env{LC_ALL} shell variables, if set. + +For example, in the default C locale, @samp{[a-dx-z]} is equivalent to +@samp{[abcdxyz]}. Many locales sort characters in dictionary order, and in +these locales @samp{[a-dx-z]} is typically not equivalent to @samp{[abcdxyz]}; +it might be equivalent to @samp{[aBbCcDdxXyYz]}, for example. To obtain +the traditional interpretation of ranges in bracket expressions, you can +force the use of the C locale by setting the @env{LC_COLLATE} or +@env{LC_ALL} environment variable to the value @samp{C}, or enable the +@code{globasciiranges} shell option. + +Within @samp{[} and @samp{]}, @var{character classes} can be specified +using the syntax +@code{[:}@var{class}@code{:]}, where @var{class} is one of the +following classes defined in the @sc{posix} standard: +@example +alnum alpha ascii blank cntrl digit graph lower +print punct space upper word xdigit +@end example +@noindent +A character class matches any character belonging to that class. +The @code{word} character class matches letters, digits, and the character +@samp{_}. + +Within @samp{[} and @samp{]}, an @var{equivalence class} can be +specified using the syntax @code{[=}@var{c}@code{=]}, which +matches all characters with the same collation weight (as defined +by the current locale) as the character @var{c}. + +Within @samp{[} and @samp{]}, the syntax @code{[.}@var{symbol}@code{.]} +matches the collating symbol @var{symbol}. +@end table + +If the @code{extglob} shell option is enabled using the @code{shopt} +builtin, several extended pattern matching operators are recognized. +In the following description, a @var{pattern-list} is a list of one +or more patterns separated by a @samp{|}. +Composite patterns may be formed using one or more of the following +sub-patterns: + +@table @code +@item ?(@var{pattern-list}) +Matches zero or one occurrence of the given patterns. + +@item *(@var{pattern-list}) +Matches zero or more occurrences of the given patterns. + +@item +(@var{pattern-list}) +Matches one or more occurrences of the given patterns. + +@item @@(@var{pattern-list}) +Matches one of the given patterns. + +@item !(@var{pattern-list}) +Matches anything except one of the given patterns. +@end table + +Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. +Using separate matches against shorter strings, or using arrays of +strings instead of a single long string, may be faster. + +@node Quote Removal +@subsection Quote Removal + +After the preceding expansions, all unquoted occurrences of the +characters @samp{\}, @samp{'}, and @samp{"} that did not +result from one of the above expansions are removed. + +@node Redirections +@section Redirections +@cindex redirection + +Before a command is executed, its input and output +may be @var{redirected} +using a special notation interpreted by the shell. +Redirection allows commands' file handles to be +duplicated, opened, closed, +made to refer to different files, +and can change the files the command reads from and writes to. +Redirection may also be used to modify file handles in the +current shell execution environment. The following redirection +operators may precede or appear anywhere within a +simple command or may follow a command. +Redirections are processed in the order they appear, from +left to right. + +Each redirection that may be preceded by a file descriptor number +may instead be preceded by a word of the form @{@var{varname}@}. +In this case, for each redirection operator except +>&- and <&-, the shell will allocate a file descriptor greater +than 10 and assign it to @{@var{varname}@}. If >&- or <&- is preceded +by @{@var{varname}@}, the value of @var{varname} defines the file +descriptor to close. +If @{@var{varname}@} is supplied, the redirection persists beyond +the scope of the command, allowing the shell programmer to manage +the file descriptor's lifetime manually. + +In the following descriptions, if the file descriptor number is +omitted, and the first character of the redirection operator is +@samp{<}, the redirection refers to the standard input (file +descriptor 0). If the first character of the redirection operator +is @samp{>}, the redirection refers to the standard output (file +descriptor 1). + +The word following the redirection operator in the following +descriptions, unless otherwise noted, is subjected to brace expansion, +tilde expansion, parameter expansion, command substitution, arithmetic +expansion, quote removal, filename expansion, and word splitting. +If it expands to more than one word, Bash reports an error. + +Note that the order of redirections is significant. For example, +the command +@example +ls > @var{dirlist} 2>&1 +@end example +@noindent +directs both standard output (file descriptor 1) and standard error +(file descriptor 2) to the file @var{dirlist}, while the command +@example +ls 2>&1 > @var{dirlist} +@end example +@noindent +directs only the standard output to file @var{dirlist}, +because the standard error was made a copy of the standard output +before the standard output was redirected to @var{dirlist}. + +Bash handles several filenames specially when they are used in +redirections, as described in the following table. +If the operating system on which Bash is running provides these +special files, bash will use them; otherwise it will emulate them +internally with the behavior described below. + +@table @code +@item /dev/fd/@var{fd} +If @var{fd} is a valid integer, file descriptor @var{fd} is duplicated. + +@item /dev/stdin +File descriptor 0 is duplicated. + +@item /dev/stdout +File descriptor 1 is duplicated. + +@item /dev/stderr +File descriptor 2 is duplicated. + +@item /dev/tcp/@var{host}/@var{port} +If @var{host} is a valid hostname or Internet address, and @var{port} +is an integer port number or service name, Bash attempts to open +the corresponding TCP socket. + +@item /dev/udp/@var{host}/@var{port} +If @var{host} is a valid hostname or Internet address, and @var{port} +is an integer port number or service name, Bash attempts to open +the corresponding UDP socket. +@end table + +A failure to open or create a file causes the redirection to fail. + +Redirections using file descriptors greater than 9 should be used with +care, as they may conflict with file descriptors the shell uses +internally. + +@subsection Redirecting Input +Redirection of input causes the file whose name results from +the expansion of @var{word} +to be opened for reading on file descriptor @code{n}, +or the standard input (file descriptor 0) if @code{n} +is not specified. + +The general format for redirecting input is: +@example +[@var{n}]<@var{word} +@end example + +@subsection Redirecting Output +Redirection of output causes the file whose name results from +the expansion of @var{word} +to be opened for writing on file descriptor @var{n}, +or the standard output (file descriptor 1) if @var{n} +is not specified. If the file does not exist it is created; +if it does exist it is truncated to zero size. + +The general format for redirecting output is: +@example +[@var{n}]>[|]@var{word} +@end example + +If the redirection operator is @samp{>}, and the @code{noclobber} +option to the @code{set} builtin has been enabled, the redirection +will fail if the file whose name results from the expansion of +@var{word} exists and is a regular file. +If the redirection operator is @samp{>|}, or the redirection operator is +@samp{>} and the @code{noclobber} option is not enabled, the redirection +is attempted even if the file named by @var{word} exists. + +@subsection Appending Redirected Output +Redirection of output in this fashion +causes the file whose name results from +the expansion of @var{word} +to be opened for appending on file descriptor @var{n}, +or the standard output (file descriptor 1) if @var{n} +is not specified. If the file does not exist it is created. + +The general format for appending output is: +@example +[@var{n}]>>@var{word} +@end example + +@subsection Redirecting Standard Output and Standard Error +This construct allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be redirected to the file whose name is the +expansion of @var{word}. + +There are two formats for redirecting standard output and +standard error: +@example +&>@var{word} +@end example +@noindent +and +@example +>&@var{word} +@end example +@noindent +Of the two forms, the first is preferred. +This is semantically equivalent to +@example +>@var{word} 2>&1 +@end example +When using the second form, @var{word} may not expand to a number or +@samp{-}. If it does, other redirection operators apply +(see Duplicating File Descriptors below) for compatibility reasons. + +@subsection Appending Standard Output and Standard Error +This construct allows both the +standard output (file descriptor 1) and +the standard error output (file descriptor 2) +to be appended to the file whose name is the +expansion of @var{word}. + +The format for appending standard output and standard error is: +@example +&>>@var{word} +@end example +@noindent +This is semantically equivalent to +@example +>>@var{word} 2>&1 +@end example +(see Duplicating File Descriptors below). + +@subsection Here Documents +This type of redirection instructs the shell to read input from the +current source until a line containing only @var{word} +(with no trailing blanks) is seen. All of +the lines read up to that point are then used as the standard +input (or file descriptor @var{n} if @var{n} is specified) for a command. + +The format of here-documents is: +@example +[@var{n}]<<[@minus{}]@var{word} + @var{here-document} +@var{delimiter} +@end example + +No parameter and variable expansion, command substitution, +arithmetic expansion, or filename expansion is performed on +@var{word}. If any part of @var{word} is quoted, the +@var{delimiter} is the result of quote removal on @var{word}, +and the lines in the here-document are not expanded. +If @var{word} is unquoted, +all lines of the here-document are subjected to +parameter expansion, command substitution, and arithmetic expansion, +the character sequence @code{\newline} is ignored, and @samp{\} +must be used to quote the characters +@samp{\}, @samp{$}, and @samp{`}. + +If the redirection operator is @samp{<<-}, +then all leading tab characters are stripped from input lines and the +line containing @var{delimiter}. +This allows here-documents within shell scripts to be indented in a +natural fashion. + +@subsection Here Strings +A variant of here documents, the format is: +@example +[@var{n}]<<< @var{word} +@end example + +The @var{word} undergoes +tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. +Filename expansion and word splitting are not performed. +The result is supplied as a single string, +with a newline appended, +to the command on its +standard input (or file descriptor @var{n} if @var{n} is specified). + +@subsection Duplicating File Descriptors +The redirection operator +@example +[@var{n}]<&@var{word} +@end example +@noindent +is used to duplicate input file descriptors. +If @var{word} +expands to one or more digits, the file descriptor denoted by @var{n} +is made to be a copy of that file descriptor. +If the digits in @var{word} do not specify a file descriptor open for +input, a redirection error occurs. +If @var{word} +evaluates to @samp{-}, file descriptor @var{n} is closed. +If @var{n} is not specified, the standard input (file descriptor 0) is used. + +The operator +@example +[@var{n}]>&@var{word} +@end example +@noindent +is used similarly to duplicate output file descriptors. If +@var{n} is not specified, the standard output (file descriptor 1) is used. +If the digits in @var{word} do not specify a file descriptor open for +output, a redirection error occurs. +If @var{word} +evaluates to @samp{-}, file descriptor @var{n} is closed. +As a special case, if @var{n} is omitted, and @var{word} does not +expand to one or more digits or @samp{-}, the standard output and standard +error are redirected as described previously. + +@subsection Moving File Descriptors +The redirection operator +@example +[@var{n}]<&@var{digit}- +@end example +@noindent +moves the file descriptor @var{digit} to file descriptor @var{n}, +or the standard input (file descriptor 0) if @var{n} is not specified. +@var{digit} is closed after being duplicated to @var{n}. + +Similarly, the redirection operator +@example +[@var{n}]>&@var{digit}- +@end example +@noindent +moves the file descriptor @var{digit} to file descriptor @var{n}, +or the standard output (file descriptor 1) if @var{n} is not specified. + +@subsection Opening File Descriptors for Reading and Writing +The redirection operator +@example +[@var{n}]<>@var{word} +@end example +@noindent +causes the file whose name is the expansion of @var{word} +to be opened for both reading and writing on file descriptor +@var{n}, or on file descriptor 0 if @var{n} +is not specified. If the file does not exist, it is created. + +@node Executing Commands +@section Executing Commands + +@menu +* Simple Command Expansion:: How Bash expands simple commands before + executing them. +* Command Search and Execution:: How Bash finds commands and runs them. +* Command Execution Environment:: The environment in which Bash + executes commands that are not + shell builtins. +* Environment:: The environment given to a command. +* Exit Status:: The status returned by commands and how Bash + interprets it. +* Signals:: What happens when Bash or a command it runs + receives a signal. +@end menu + +@node Simple Command Expansion +@subsection Simple Command Expansion +@cindex command expansion + +When a simple command is executed, the shell performs the following +expansions, assignments, and redirections, from left to right, in +the following order. + +@enumerate +@item +The words that the parser has marked as variable assignments (those +preceding the command name) and redirections are saved for later +processing. + +@item +The words that are not variable assignments or redirections are +expanded (@pxref{Shell Expansions}). +If any words remain after expansion, the first word +is taken to be the name of the command and the remaining words are +the arguments. + +@item +Redirections are performed as described above (@pxref{Redirections}). + +@item +The text after the @samp{=} in each variable assignment undergoes tilde +expansion, parameter expansion, command substitution, arithmetic expansion, +and quote removal before being assigned to the variable. +@end enumerate + +If no command name results, the variable assignments affect the current +shell environment. Otherwise, the variables are added to the environment +of the executed command and do not affect the current shell environment. +If any of the assignments attempts to assign a value to a readonly variable, +an error occurs, and the command exits with a non-zero status. + +If no command name results, redirections are performed, but do not +affect the current shell environment. A redirection error causes the +command to exit with a non-zero status. + +If there is a command name left after expansion, execution proceeds as +described below. Otherwise, the command exits. If one of the expansions +contained a command substitution, the exit status of the command is +the exit status of the last command substitution performed. If there +were no command substitutions, the command exits with a status of zero. + +@node Command Search and Execution +@subsection Command Search and Execution +@cindex command execution +@cindex command search + +After a command has been split into words, if it results in a +simple command and an optional list of arguments, the following +actions are taken. + +@enumerate +@item +If the command name contains no slashes, the shell attempts to +locate it. If there exists a shell function by that name, that +function is invoked as described in @ref{Shell Functions}. + +@item +If the name does not match a function, the shell searches for +it in the list of shell builtins. If a match is found, that +builtin is invoked. + +@item +If the name is neither a shell function nor a builtin, +and contains no slashes, Bash searches each element of +@env{$PATH} for a directory containing an executable file +by that name. Bash uses a hash table to remember the full +pathnames of executable files to avoid multiple @env{PATH} searches +(see the description of @code{hash} in @ref{Bourne Shell Builtins}). +A full search of the directories in @env{$PATH} +is performed only if the command is not found in the hash table. +If the search is unsuccessful, the shell searches for a defined shell +function named @code{command_not_found_handle}. +If that function exists, it is invoked in a separate execution environment +with the original command and +the original command's arguments as its arguments, and the function's +exit status becomes the exit status of that subshell. +If that function is not defined, the shell prints an error +message and returns an exit status of 127. + +@item +If the search is successful, or if the command name contains +one or more slashes, the shell executes the named program in +a separate execution environment. +Argument 0 is set to the name given, and the remaining arguments +to the command are set to the arguments supplied, if any. + +@item +If this execution fails because the file is not in executable +format, and the file is not a directory, it is assumed to be a +@var{shell script} and the shell executes it as described in +@ref{Shell Scripts}. + +@item +If the command was not begun asynchronously, the shell waits for +the command to complete and collects its exit status. + +@end enumerate + +@node Command Execution Environment +@subsection Command Execution Environment +@cindex execution environment + +The shell has an @var{execution environment}, which consists of the +following: + +@itemize @bullet +@item +open files inherited by the shell at invocation, as modified by +redirections supplied to the @code{exec} builtin + +@item +the current working directory as set by @code{cd}, @code{pushd}, or +@code{popd}, or inherited by the shell at invocation + +@item +the file creation mode mask as set by @code{umask} or inherited from +the shell's parent + +@item +current traps set by @code{trap} + +@item +shell parameters that are set by variable assignment or with @code{set} +or inherited from the shell's parent in the environment + +@item +shell functions defined during execution or inherited from the shell's +parent in the environment + +@item +options enabled at invocation (either by default or with command-line +arguments) or by @code{set} + +@item +options enabled by @code{shopt} (@pxref{The Shopt Builtin}) + +@item +shell aliases defined with @code{alias} (@pxref{Aliases}) + +@item +various process @sc{id}s, including those of background jobs +(@pxref{Lists}), the value of @code{$$}, and the value of +@env{$PPID} + +@end itemize + +When a simple command other than a builtin or shell function +is to be executed, it +is invoked in a separate execution environment that consists of +the following. Unless otherwise noted, the values are inherited +from the shell. + +@itemize @bullet +@item +the shell's open files, plus any modifications and additions specified +by redirections to the command + +@item +the current working directory + +@item +the file creation mode mask + +@item +shell variables and functions marked for export, along with variables +exported for the command, passed in the environment (@pxref{Environment}) + +@item +traps caught by the shell are reset to the values inherited from the +shell's parent, and traps ignored by the shell are ignored + +@end itemize + +A command invoked in this separate environment cannot affect the +shell's execution environment. + +Command substitution, commands grouped with parentheses, +and asynchronous commands are invoked in a +subshell environment that is a duplicate of the shell environment, +except that traps caught by the shell are reset to the values +that the shell inherited from its parent at invocation. Builtin +commands that are invoked as part of a pipeline are also executed +in a subshell environment. Changes made to the subshell environment +cannot affect the shell's execution environment. + +Subshells spawned to execute command substitutions inherit the value of +the @option{-e} option from the parent shell. When not in @sc{posix} mode, +Bash clears the @option{-e} option in such subshells. + +If a command is followed by a @samp{&} and job control is not active, the +default standard input for the command is the empty file @file{/dev/null}. +Otherwise, the invoked command inherits the file descriptors of the calling +shell as modified by redirections. + +@node Environment +@subsection Environment +@cindex environment + +When a program is invoked it is given an array of strings +called the @var{environment}. +This is a list of name-value pairs, of the form @code{name=value}. + +Bash provides several ways to manipulate the environment. +On invocation, the shell scans its own environment and +creates a parameter for each name found, automatically marking +it for @var{export} +to child processes. Executed commands inherit the environment. +The @code{export} and @samp{declare -x} +commands allow parameters and functions to be added to and +deleted from the environment. If the value of a parameter +in the environment is modified, the new value becomes part +of the environment, replacing the old. The environment +inherited by any executed command consists of the shell's +initial environment, whose values may be modified in the shell, +less any pairs removed by the @code{unset} and @samp{export -n} +commands, plus any additions via the @code{export} and +@samp{declare -x} commands. + +The environment for any simple command +or function may be augmented temporarily by prefixing it with +parameter assignments, as described in @ref{Shell Parameters}. +These assignment statements affect only the environment seen +by that command. + +If the @option{-k} option is set (@pxref{The Set Builtin}), then all +parameter assignments are placed in the environment for a command, +not just those that precede the command name. + +When Bash invokes an external command, the variable @samp{$_} +is set to the full pathname of the command and passed to that +command in its environment. + +@node Exit Status +@subsection Exit Status +@cindex exit status + +The exit status of an executed command is the value returned by the +@var{waitpid} system call or equivalent function. Exit statuses +fall between 0 and 255, though, as explained below, the shell may +use values above 125 specially. Exit statuses from shell builtins and +compound commands are also limited to this range. Under certain +circumstances, the shell will use special values to indicate specific +failure modes. + +For the shell's purposes, a command which exits with a +zero exit status has succeeded. +A non-zero exit status indicates failure. +This seemingly counter-intuitive scheme is used so there +is one well-defined way to indicate success and a variety of +ways to indicate various failure modes. +When a command terminates on a fatal signal whose number is @var{N}, +Bash uses the value 128+@var{N} as the exit status. + +If a command is not found, the child process created to +execute it returns a status of 127. If a command is found +but is not executable, the return status is 126. + +If a command fails because of an error during expansion or redirection, +the exit status is greater than zero. + +The exit status is used by the Bash conditional commands +(@pxref{Conditional Constructs}) and some of the list +constructs (@pxref{Lists}). + +All of the Bash builtins return an exit status of zero if they succeed +and a non-zero status on failure, so they may be used by the +conditional and list constructs. +All builtins return an exit status of 2 to indicate incorrect usage, +generally invalid options or missing arguments. + +@node Signals +@subsection Signals +@cindex signal handling + +When Bash is interactive, in the absence of any traps, it ignores +@code{SIGTERM} (so that @samp{kill 0} does not kill an interactive shell), +and @code{SIGINT} +is caught and handled (so that the @code{wait} builtin is interruptible). +When Bash receives a @code{SIGINT}, it breaks out of any executing loops. +In all cases, Bash ignores @code{SIGQUIT}. +If job control is in effect (@pxref{Job Control}), Bash +ignores @code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}. + +Non-builtin commands started by Bash have signal handlers set to the +values inherited by the shell from its parent. +When job control is not in effect, asynchronous commands +ignore @code{SIGINT} and @code{SIGQUIT} in addition to these inherited +handlers. +Commands run as a result of +command substitution ignore the keyboard-generated job control signals +@code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}. + +The shell exits by default upon receipt of a @code{SIGHUP}. +Before exiting, an interactive shell resends the @code{SIGHUP} to +all jobs, running or stopped. +Stopped jobs are sent @code{SIGCONT} to ensure that they receive +the @code{SIGHUP}. +To prevent the shell from sending the @code{SIGHUP} signal to a +particular job, it should be removed +from the jobs table with the @code{disown} +builtin (@pxref{Job Control Builtins}) or marked +to not receive @code{SIGHUP} using @code{disown -h}. + +If the @code{huponexit} shell option has been set with @code{shopt} +(@pxref{The Shopt Builtin}), Bash sends a @code{SIGHUP} to all jobs when +an interactive login shell exits. + +If Bash is waiting for a command to complete and receives a signal +for which a trap has been set, the trap will not be executed until +the command completes. +When Bash is waiting for an asynchronous +command via the @code{wait} builtin, the reception of a signal for +which a trap has been set will cause the @code{wait} builtin to return +immediately with an exit status greater than 128, immediately after +which the trap is executed. + +@node Shell Scripts +@section Shell Scripts +@cindex shell script + +A shell script is a text file containing shell commands. When such +a file is used as the first non-option argument when invoking Bash, +and neither the @option{-c} nor @option{-s} option is supplied +(@pxref{Invoking Bash}), +Bash reads and executes commands from the file, then exits. This +mode of operation creates a non-interactive shell. The shell first +searches for the file in the current directory, and looks in the +directories in @env{$PATH} if not found there. + +When Bash runs +a shell script, it sets the special parameter @code{0} to the name +of the file, rather than the name of the shell, and the positional +parameters are set to the remaining arguments, if any are given. +If no additional arguments are supplied, the positional parameters +are unset. + +A shell script may be made executable by using the @code{chmod} command +to turn on the execute bit. When Bash finds such a file while +searching the @env{$PATH} for a command, it spawns a subshell to +execute it. In other words, executing +@example +filename @var{arguments} +@end example +@noindent +is equivalent to executing +@example +bash filename @var{arguments} +@end example + +@noindent +if @code{filename} is an executable shell script. +This subshell reinitializes itself, so that the effect is as if a +new shell had been invoked to interpret the script, with the +exception that the locations of commands remembered by the parent +(see the description of @code{hash} in @ref{Bourne Shell Builtins}) +are retained by the child. + +Most versions of Unix make this a part of the operating system's command +execution mechanism. If the first line of a script begins with +the two characters @samp{#!}, the remainder of the line specifies +an interpreter for the program and, depending on the operating system, one +or more optional arguments for that interpreter. +Thus, you can specify Bash, @code{awk}, Perl, or some other +interpreter and write the rest of the script file in that language. + +The arguments to the interpreter +consist of one or more optional arguments following the interpreter +name on the first line of the script file, followed by the name of +the script file, followed by the rest of the arguments supplied to the +script. +The details of how the interpreter line is split into an interpreter name +and a set of arguments vary across systems. +Bash will perform this action on operating systems that do not handle it +themselves. +Note that some older versions of Unix limit the interpreter +name and a single argument to a maximum of 32 characters, so it's not +portable to assume that using more than one argument will work. + +Bash scripts often begin with @code{#! /bin/bash} (assuming that +Bash has been installed in @file{/bin}), since this ensures that +Bash will be used to interpret the script, even if it is executed +under another shell. It's a common idiom to use @code{env} to find +@code{bash} even if it's been installed in another directory: +@code{#!/usr/bin/env bash} will find the first occurrence of @code{bash} +in @env{$PATH}. + +@node Shell Builtin Commands +@chapter Shell Builtin Commands + +@menu +* Bourne Shell Builtins:: Builtin commands inherited from the Bourne + Shell. +* Bash Builtins:: Table of builtins specific to Bash. +* Modifying Shell Behavior:: Builtins to modify shell attributes and + optional behavior. +* Special Builtins:: Builtin commands classified specially by + POSIX. +@end menu + +Builtin commands are contained within the shell itself. +When the name of a builtin command is used as the first word of +a simple command (@pxref{Simple Commands}), the shell executes +the command directly, without invoking another program. +Builtin commands are necessary to implement functionality impossible +or inconvenient to obtain with separate utilities. + +This section briefly describes the builtins which Bash inherits from +the Bourne Shell, as well as the builtin commands which are unique +to or have been extended in Bash. + +Several builtin commands are described in other chapters: builtin +commands which provide the Bash interface to the job control +facilities (@pxref{Job Control Builtins}), the directory stack +(@pxref{Directory Stack Builtins}), the command history +(@pxref{Bash History Builtins}), and the programmable completion +facilities (@pxref{Programmable Completion Builtins}). + +Many of the builtins have been extended by @sc{posix} or Bash. + +Unless otherwise noted, each builtin command documented as accepting +options preceded by @samp{-} accepts @samp{--} +to signify the end of the options. +The @code{:}, @code{true}, @code{false}, and @code{test}/@code{[} +builtins do not accept options and do not treat @samp{--} specially. +The @code{exit}, @code{logout}, @code{return}, +@code{break}, @code{continue}, @code{let}, +and @code{shift} builtins accept and process arguments beginning +with @samp{-} without requiring @samp{--}. +Other builtins that accept arguments but are not specified as accepting +options interpret arguments beginning with @samp{-} as invalid options and +require @samp{--} to prevent this interpretation. + +@node Bourne Shell Builtins +@section Bourne Shell Builtins + +The following shell builtin commands are inherited from the Bourne Shell. +These commands are implemented as specified by the @sc{posix} standard. + +@table @code +@item : @r{(a colon)} +@btindex : +@example +: [@var{arguments}] +@end example + +Do nothing beyond expanding @var{arguments} and performing redirections. +The return status is zero. + +@item . @r{(a period)} +@btindex . +@example +. @var{filename} [@var{arguments}] +@end example + +Read and execute commands from the @var{filename} argument in the +current shell context. If @var{filename} does not contain a slash, +the @env{PATH} variable is used to find @var{filename}. +When Bash is not in @sc{posix} mode, the current directory is searched +if @var{filename} is not found in @env{$PATH}. +If any @var{arguments} are supplied, they become the positional +parameters when @var{filename} is executed. Otherwise the positional +parameters are unchanged. +If the @option{-T} option is enabled, @code{source} inherits any trap on +@code{DEBUG}; if it is not, any @code{DEBUG} trap string is saved and +restored around the call to @code{source}, and @code{source} unsets the +@code{DEBUG} trap while it executes. +If @option{-T} is not set, and the sourced file changes +the @code{DEBUG} trap, the new value is retained when @code{source} completes. +The return status is the exit status of the last command executed, or +zero if no commands are executed. If @var{filename} is not found, or +cannot be read, the return status is non-zero. +This builtin is equivalent to @code{source}. + +@item break +@btindex break +@example +break [@var{n}] +@end example + +Exit from a @code{for}, @code{while}, @code{until}, or @code{select} loop. +If @var{n} is supplied, the @var{n}th enclosing loop is exited. +@var{n} must be greater than or equal to 1. +The return status is zero unless @var{n} is not greater than or equal to 1. + +@item cd +@btindex cd +@example +cd [-L|[-P [-e]] [-@@] [@var{directory}] +@end example + +Change the current working directory to @var{directory}. +If @var{directory} is not supplied, the value of the @env{HOME} +shell variable is used. +Any additional arguments following @var{directory} are ignored. +If the shell variable +@env{CDPATH} exists, it is used as a search path: +each directory name in @env{CDPATH} is searched for +@var{directory}, with alternative directory names in @env{CDPATH} +separated by a colon (@samp{:}). +If @var{directory} begins with a slash, @env{CDPATH} is not used. + +The @option{-P} option means to not follow symbolic links: symbolic links +are resolved while @code{cd} is traversing @var{directory} and before +processing an instance of @samp{..} in @var{directory}. + +By default, or when the @option{-L} option is supplied, symbolic links +in @var{directory} are resolved after @code{cd} processes an instance +of @samp{..} in @var{directory}. + +If @samp{..} appears in @var{directory}, it is processed by removing the +immediately preceding pathname component, back to a slash or the beginning +of @var{directory}. + +If the @option{-e} option is supplied with @option{-P} +and the current working directory cannot be successfully determined +after a successful directory change, @code{cd} will return an unsuccessful +status. + +On systems that support it, the @option{-@@} option presents the extended +attributes associated with a file as a directory. + +If @var{directory} is @samp{-}, it is converted to @env{$OLDPWD} +before the directory change is attempted. + +If a non-empty directory name from @env{CDPATH} is used, or if +@samp{-} is the first argument, and the directory change is +successful, the absolute pathname of the new working directory is +written to the standard output. + +The return status is zero if the directory is successfully changed, +non-zero otherwise. + +@item continue +@btindex continue +@example +continue [@var{n}] +@end example + +Resume the next iteration of an enclosing @code{for}, @code{while}, +@code{until}, or @code{select} loop. +If @var{n} is supplied, the execution of the @var{n}th enclosing loop +is resumed. +@var{n} must be greater than or equal to 1. +The return status is zero unless @var{n} is not greater than or equal to 1. + +@item eval +@btindex eval +@example +eval [@var{arguments}] +@end example + +The arguments are concatenated together into a single command, which is +then read and executed, and its exit status returned as the exit status +of @code{eval}. +If there are no arguments or only empty arguments, the return status is +zero. + +@item exec +@btindex exec +@example +exec [-cl] [-a @var{name}] [@var{command} [@var{arguments}]] +@end example + +If @var{command} +is supplied, it replaces the shell without creating a new process. +If the @option{-l} option is supplied, the shell places a dash at the +beginning of the zeroth argument passed to @var{command}. +This is what the @code{login} program does. +The @option{-c} option causes @var{command} to be executed with an empty +environment. +If @option{-a} is supplied, the shell passes @var{name} as the zeroth +argument to @var{command}. +If @var{command} +cannot be executed for some reason, a non-interactive shell exits, +unless the @code{execfail} shell option +is enabled. In that case, it returns failure. +An interactive shell returns failure if the file cannot be executed. +A subshell exits unconditionally if @code{exec} fails. +If no @var{command} is specified, redirections may be used to affect +the current shell environment. If there are no redirection errors, the +return status is zero; otherwise the return status is non-zero. + +@item exit +@btindex exit +@example +exit [@var{n}] +@end example + +Exit the shell, returning a status of @var{n} to the shell's parent. +If @var{n} is omitted, the exit status is that of the last command executed. +Any trap on @code{EXIT} is executed before the shell terminates. + +@item export +@btindex export +@example +export [-fn] [-p] [@var{name}[=@var{value}]] +@end example + +Mark each @var{name} to be passed to child processes +in the environment. If the @option{-f} option is supplied, the @var{name}s +refer to shell functions; otherwise the names refer to shell variables. +The @option{-n} option means to no longer mark each @var{name} for export. +If no @var{names} are supplied, or if the @option{-p} option is given, a +list of names of all exported variables is displayed. +The @option{-p} option displays output in a form that may be reused as input. +If a variable name is followed by =@var{value}, the value of +the variable is set to @var{value}. + +The return status is zero unless an invalid option is supplied, one of +the names is not a valid shell variable name, or @option{-f} is supplied +with a name that is not a shell function. + +@item getopts +@btindex getopts +@example +getopts @var{optstring} @var{name} [@var{arg} @dots{}] +@end example + +@code{getopts} is used by shell scripts to parse positional parameters. +@var{optstring} contains the option characters to be recognized; if a +character is followed by a colon, the option is expected to have an +argument, which should be separated from it by whitespace. +The colon (@samp{:}) and question mark (@samp{?}) may not be +used as option characters. +Each time it is invoked, @code{getopts} +places the next option in the shell variable @var{name}, initializing +@var{name} if it does not exist, +and the index of the next argument to be processed into the +variable @env{OPTIND}. +@env{OPTIND} is initialized to 1 each time the shell or a shell script +is invoked. +When an option requires an argument, +@code{getopts} places that argument into the variable @env{OPTARG}. +The shell does not reset @env{OPTIND} automatically; it must be manually +reset between multiple calls to @code{getopts} within the same shell +invocation if a new set of parameters is to be used. + +When the end of options is encountered, @code{getopts} exits with a +return value greater than zero. +@env{OPTIND} is set to the index of the first non-option argument, +and @var{name} is set to @samp{?}. + +@code{getopts} +normally parses the positional parameters, but if more arguments are +supplied as @var{arg} values, @code{getopts} parses those instead. + +@code{getopts} can report errors in two ways. If the first character of +@var{optstring} is a colon, @var{silent} +error reporting is used. In normal operation, diagnostic messages +are printed when invalid options or missing option arguments are +encountered. +If the variable @env{OPTERR} +is set to 0, no error messages will be displayed, even if the first +character of @code{optstring} is not a colon. + +If an invalid option is seen, +@code{getopts} places @samp{?} into @var{name} and, if not silent, +prints an error message and unsets @env{OPTARG}. +If @code{getopts} is silent, the option character found is placed in +@env{OPTARG} and no diagnostic message is printed. + +If a required argument is not found, and @code{getopts} +is not silent, a question mark (@samp{?}) is placed in @var{name}, +@code{OPTARG} is unset, and a diagnostic message is printed. +If @code{getopts} is silent, then a colon (@samp{:}) is placed in +@var{name} and @env{OPTARG} is set to the option character found. + +@item hash +@btindex hash +@example +hash [-r] [-p @var{filename}] [-dt] [@var{name}] +@end example + +Each time @code{hash} is invoked, it remembers the full pathnames of the +commands specified as @var{name} arguments, +so they need not be searched for on subsequent invocations. +The commands are found by searching through the directories listed in +@env{$PATH}. +Any previously-remembered pathname is discarded. +The @option{-p} option inhibits the path search, and @var{filename} is +used as the location of @var{name}. +The @option{-r} option causes the shell to forget all remembered locations. +The @option{-d} option causes the shell to forget the remembered location +of each @var{name}. +If the @option{-t} option is supplied, the full pathname to which each +@var{name} corresponds is printed. If multiple @var{name} arguments are +supplied with @option{-t}, the @var{name} is printed before the hashed +full pathname. +The @option{-l} option causes output to be displayed in a format +that may be reused as input. +If no arguments are given, or if only @option{-l} is supplied, +information about remembered commands is printed. +The return status is zero unless a @var{name} is not found or an invalid +option is supplied. + +@item pwd +@btindex pwd +@example +pwd [-LP] +@end example + +Print the absolute pathname of the current working directory. +If the @option{-P} option is supplied, the pathname printed will not +contain symbolic links. +If the @option{-L} option is supplied, the pathname printed may contain +symbolic links. +The return status is zero unless an error is encountered while +determining the name of the current directory or an invalid option +is supplied. + +@item readonly +@btindex readonly +@example +readonly [-aAf] [-p] [@var{name}[=@var{value}]] @dots{} +@end example + +Mark each @var{name} as readonly. +The values of these names may not be changed by subsequent assignment. +If the @option{-f} option is supplied, each @var{name} refers to a shell +function. +The @option{-a} option means each @var{name} refers to an indexed +array variable; the @option{-A} option means each @var{name} refers +to an associative array variable. +If both options are supplied, @option{-A} takes precedence. +If no @var{name} arguments are given, or if the @option{-p} +option is supplied, a list of all readonly names is printed. +The other options may be used to restrict the output to a subset of +the set of readonly names. +The @option{-p} option causes output to be displayed in a format that +may be reused as input. +If a variable name is followed by =@var{value}, the value of +the variable is set to @var{value}. +The return status is zero unless an invalid option is supplied, one of +the @var{name} arguments is not a valid shell variable or function name, +or the @option{-f} option is supplied with a name that is not a shell function. + +@item return +@btindex return +@example +return [@var{n}] +@end example + +Cause a shell function to stop executing and return the value @var{n} +to its caller. +If @var{n} is not supplied, the return value is the exit status of the +last command executed in the function. +If @code{return} is executed by a trap handler, the last command used to +determine the status is the last command executed before the trap handler. +If @code{return} is executed during a @code{DEBUG} trap, the last command +used to determine the status is the last command executed by the trap +handler before @code{return} was invoked. +@code{return} may also be used to terminate execution of a script +being executed with the @code{.} (@code{source}) builtin, +returning either @var{n} or +the exit status of the last command executed within the script as the exit +status of the script. +If @var{n} is supplied, the return value is its least significant +8 bits. +Any command associated with the @code{RETURN} trap is executed +before execution resumes after the function or script. +The return status is non-zero if @code{return} is supplied a non-numeric +argument or is used outside a function +and not during the execution of a script by @code{.} or @code{source}. + +@item shift +@btindex shift +@example +shift [@var{n}] +@end example + +Shift the positional parameters to the left by @var{n}. +The positional parameters from @var{n}+1 @dots{} @code{$#} are +renamed to @code{$1} @dots{} @code{$#}-@var{n}. +Parameters represented by the numbers @code{$#} down to @code{$#}-@var{n}+1 +are unset. +@var{n} must be a non-negative number less than or equal to @code{$#}. +If @var{n} is zero or greater than @code{$#}, the positional parameters +are not changed. +If @var{n} is not supplied, it is assumed to be 1. +The return status is zero unless @var{n} is greater than @code{$#} or +less than zero, non-zero otherwise. + +@item test +@itemx [ +@btindex test +@btindex [ +@example +test @var{expr} +@end example + +Evaluate a conditional expression @var{expr} and return a status of 0 +(true) or 1 (false). +Each operator and operand must be a separate argument. +Expressions are composed of the primaries described below in +@ref{Bash Conditional Expressions}. +@code{test} does not accept any options, nor does it accept and ignore +an argument of @option{--} as signifying the end of options. + +When the @code{[} form is used, the last argument to the command must +be a @code{]}. + +Expressions may be combined using the following operators, listed in +decreasing order of precedence. +The evaluation depends on the number of arguments; see below. +Operator precedence is used when there are five or more arguments. + +@table @code +@item ! @var{expr} +True if @var{expr} is false. + +@item ( @var{expr} ) +Returns the value of @var{expr}. +This may be used to override the normal precedence of operators. + +@item @var{expr1} -a @var{expr2} +True if both @var{expr1} and @var{expr2} are true. + +@item @var{expr1} -o @var{expr2} +True if either @var{expr1} or @var{expr2} is true. +@end table + +The @code{test} and @code{[} builtins evaluate conditional +expressions using a set of rules based on the number of arguments. + +@table @asis +@item 0 arguments +The expression is false. + +@item 1 argument +The expression is true if, and only if, the argument is not null. + +@item 2 arguments +If the first argument is @samp{!}, the expression is true if and +only if the second argument is null. +If the first argument is one of the unary conditional operators +(@pxref{Bash Conditional Expressions}), the expression +is true if the unary test is true. +If the first argument is not a valid unary operator, the expression is +false. + +@item 3 arguments +The following conditions are applied in the order listed. + +@enumerate +@item +If the second argument is one of the binary conditional +operators (@pxref{Bash Conditional Expressions}), the +result of the expression is the result of the binary test using the +first and third arguments as operands. +The @samp{-a} and @samp{-o} operators are considered binary operators +when there are three arguments. +@item +If the first argument is @samp{!}, the value is the negation of +the two-argument test using the second and third arguments. +@item +If the first argument is exactly @samp{(} and the third argument is +exactly @samp{)}, the result is the one-argument test of the second +argument. +@item +Otherwise, the expression is false. +@end enumerate + +@item 4 arguments +If the first argument is @samp{!}, the result is the negation of +the three-argument expression composed of the remaining arguments. +Otherwise, the expression is parsed and evaluated according to +precedence using the rules listed above. + +@item 5 or more arguments +The expression is parsed and evaluated according to precedence +using the rules listed above. +@end table + +When used with @code{test} or @samp{[}, the @samp{<} and @samp{>} +operators sort lexicographically using ASCII ordering. + +@item times +@btindex times +@example +times +@end example + +Print out the user and system times used by the shell and its children. +The return status is zero. + +@item trap +@btindex trap +@example +trap [-lp] [@var{arg}] [@var{sigspec} @dots{}] +@end example + +The commands in @var{arg} are to be read and executed when the +shell receives signal @var{sigspec}. If @var{arg} is absent (and +there is a single @var{sigspec}) or +equal to @samp{-}, each specified signal's disposition is reset +to the value it had when the shell was started. +If @var{arg} is the null string, then the signal specified by +each @var{sigspec} is ignored by the shell and commands it invokes. +If @var{arg} is not present and @option{-p} has been supplied, +the shell displays the trap commands associated with each @var{sigspec}. +If no arguments are supplied, or +only @option{-p} is given, @code{trap} prints the list of commands +associated with each signal number in a form that may be reused as +shell input. +The @option{-l} option causes the shell to print a list of signal names +and their corresponding numbers. +Each @var{sigspec} is either a signal name or a signal number. +Signal names are case insensitive and the @code{SIG} prefix is optional. + +If a @var{sigspec} +is @code{0} or @code{EXIT}, @var{arg} is executed when the shell exits. +If a @var{sigspec} is @code{DEBUG}, the command @var{arg} is executed +before every simple command, @code{for} command, @code{case} command, +@code{select} command, every arithmetic @code{for} command, and before +the first command executes in a shell function. +Refer to the description of the @code{extdebug} option to the +@code{shopt} builtin (@pxref{The Shopt Builtin}) for details of its +effect on the @code{DEBUG} trap. +If a @var{sigspec} is @code{RETURN}, the command @var{arg} is executed +each time a shell function or a script executed with the @code{.} or +@code{source} builtins finishes executing. + +If a @var{sigspec} is @code{ERR}, the command @var{arg} +is executed whenever +a pipeline (which may consist of a single simple +command), a list, or a compound command returns a +non-zero exit status, +subject to the following conditions. +The @code{ERR} trap is not executed if the failed command is part of the +command list immediately following an @code{until} or @code{while} keyword, +part of the test following the @code{if} or @code{elif} reserved words, +part of a command executed in a @code{&&} or @code{||} list +except the command following the final @code{&&} or @code{||}, +any command in a pipeline but the last, +or if the command's return +status is being inverted using @code{!}. +These are the same conditions obeyed by the @code{errexit} (@option{-e}) +option. + +Signals ignored upon entry to the shell cannot be trapped or reset. +Trapped signals that are not being ignored are reset to their original +values in a subshell or subshell environment when one is created. + +The return status is zero unless a @var{sigspec} does not specify a +valid signal. + +@item umask +@btindex umask +@example +umask [-p] [-S] [@var{mode}] +@end example + +Set the shell process's file creation mask to @var{mode}. If +@var{mode} begins with a digit, it is interpreted as an octal number; +if not, it is interpreted as a symbolic mode mask similar +to that accepted by the @code{chmod} command. If @var{mode} is +omitted, the current value of the mask is printed. If the @option{-S} +option is supplied without a @var{mode} argument, the mask is printed +in a symbolic format. +If the @option{-p} option is supplied, and @var{mode} +is omitted, the output is in a form that may be reused as input. +The return status is zero if the mode is successfully changed or if +no @var{mode} argument is supplied, and non-zero otherwise. + +Note that when the mode is interpreted as an octal number, each number +of the umask is subtracted from @code{7}. Thus, a umask of @code{022} +results in permissions of @code{755}. + +@item unset +@btindex unset +@example +unset [-fnv] [@var{name}] +@end example + +Remove each variable or function @var{name}. +If the @option{-v} option is given, each +@var{name} refers to a shell variable and that variable is removed. +If the @option{-f} option is given, the @var{name}s refer to shell +functions, and the function definition is removed. +If the @option{-n} option is supplied, and @var{name} is a variable with +the @var{nameref} attribute, @var{name} will be unset rather than the +variable it references. +@option{-n} has no effect if the @option{-f} option is supplied. +If no options are supplied, each @var{name} refers to a variable; if +there is no variable by that name, a function with that name, if any, is +unset. +Readonly variables and functions may not be unset. +Some shell variables lose their special behavior if they are unset; such +behavior is noted in the description of the individual variables. +The return status is zero unless a @var{name} is readonly. +@end table + +@node Bash Builtins +@section Bash Builtin Commands + +This section describes builtin commands which are unique to +or have been extended in Bash. +Some of these commands are specified in the @sc{posix} standard. + +@table @code + +@item alias +@btindex alias +@example +alias [-p] [@var{name}[=@var{value}] @dots{}] +@end example + +Without arguments or with the @option{-p} option, @code{alias} prints +the list of aliases on the standard output in a form that allows +them to be reused as input. +If arguments are supplied, an alias is defined for each @var{name} +whose @var{value} is given. If no @var{value} is given, the name +and value of the alias is printed. +Aliases are described in @ref{Aliases}. + +@item bind +@btindex bind +@example +bind [-m @var{keymap}] [-lpsvPSVX] +bind [-m @var{keymap}] [-q @var{function}] [-u @var{function}] [-r @var{keyseq}] +bind [-m @var{keymap}] -f @var{filename} +bind [-m @var{keymap}] -x @var{keyseq:shell-command} +bind [-m @var{keymap}] @var{keyseq:function-name} +bind [-m @var{keymap}] @var{keyseq:readline-command} +@end example + +Display current Readline (@pxref{Command Line Editing}) +key and function bindings, +bind a key sequence to a Readline function or macro, +or set a Readline variable. +Each non-option argument is a command as it would appear in a +Readline initialization file (@pxref{Readline Init File}), +but each binding or command must be passed as a separate argument; e.g., +@samp{"\C-x\C-r":re-read-init-file}. + +Options, if supplied, have the following meanings: + +@table @code +@item -m @var{keymap} +Use @var{keymap} as the keymap to be affected by +the subsequent bindings. Acceptable @var{keymap} +names are +@code{emacs}, +@code{emacs-standard}, +@code{emacs-meta}, +@code{emacs-ctlx}, +@code{vi}, +@code{vi-move}, +@code{vi-command}, and +@code{vi-insert}. +@code{vi} is equivalent to @code{vi-command} (@code{vi-move} is also a +synonym); @code{emacs} is equivalent to @code{emacs-standard}. + +@item -l +List the names of all Readline functions. + +@item -p +Display Readline function names and bindings in such a way that they +can be used as input or in a Readline initialization file. + +@item -P +List current Readline function names and bindings. + +@item -v +Display Readline variable names and values in such a way that they +can be used as input or in a Readline initialization file. + +@item -V +List current Readline variable names and values. + +@item -s +Display Readline key sequences bound to macros and the strings they output +in such a way that they can be used as input or in a Readline +initialization file. + +@item -S +Display Readline key sequences bound to macros and the strings they output. + +@item -f @var{filename} +Read key bindings from @var{filename}. + +@item -q @var{function} +Query about which keys invoke the named @var{function}. + +@item -u @var{function} +Unbind all keys bound to the named @var{function}. + +@item -r @var{keyseq} +Remove any current binding for @var{keyseq}. + +@item -x @var{keyseq:shell-command} +Cause @var{shell-command} to be executed whenever @var{keyseq} is +entered. +When @var{shell-command} is executed, the shell sets the +@code{READLINE_LINE} variable to the contents of the Readline line +buffer and the @code{READLINE_POINT} and @code{READLINE_MARK} variables +to the current location of the insertion point and the saved insertion +point (the @var{mark}), respectively. +If the executed command changes the value of any of @code{READLINE_LINE}, +@code{READLINE_POINT}, or @code{READLINE_MARK}, those new values will be +reflected in the editing state. + +@item -X +List all key sequences bound to shell commands and the associated commands +in a format that can be reused as input. +@end table + +@noindent +The return status is zero unless an invalid option is supplied or an +error occurs. + +@item builtin +@btindex builtin +@example +builtin [@var{shell-builtin} [@var{args}]] +@end example + +Run a shell builtin, passing it @var{args}, and return its exit status. +This is useful when defining a shell function with the same +name as a shell builtin, retaining the functionality of the builtin within +the function. +The return status is non-zero if @var{shell-builtin} is not a shell +builtin command. + +@item caller +@btindex caller +@example +caller [@var{expr}] +@end example + +Returns the context of any active subroutine call (a shell function or +a script executed with the @code{.} or @code{source} builtins). + +Without @var{expr}, @code{caller} displays the line number and source +filename of the current subroutine call. +If a non-negative integer is supplied as @var{expr}, @code{caller} +displays the line number, subroutine name, and source file corresponding +to that position in the current execution call stack. This extra +information may be used, for example, to print a stack trace. The +current frame is frame 0. + +The return value is 0 unless the shell is not executing a subroutine +call or @var{expr} does not correspond to a valid position in the +call stack. + +@item command +@btindex command +@example +command [-pVv] @var{command} [@var{arguments} @dots{}] +@end example + +Runs @var{command} with @var{arguments} ignoring any shell function +named @var{command}. +Only shell builtin commands or commands found by searching the +@env{PATH} are executed. +If there is a shell function named @code{ls}, running @samp{command ls} +within the function will execute the external command @code{ls} +instead of calling the function recursively. +The @option{-p} option means to use a default value for @env{PATH} +that is guaranteed to find all of the standard utilities. +The return status in this case is 127 if @var{command} cannot be +found or an error occurred, and the exit status of @var{command} +otherwise. + +If either the @option{-V} or @option{-v} option is supplied, a +description of @var{command} is printed. The @option{-v} option +causes a single word indicating the command or file name used to +invoke @var{command} to be displayed; the @option{-V} option produces +a more verbose description. In this case, the return status is +zero if @var{command} is found, and non-zero if not. + +@item declare +@btindex declare +@example +declare [-aAfFgiIlnrtux] [-p] [@var{name}[=@var{value}] @dots{}] +@end example + +Declare variables and give them attributes. If no @var{name}s +are given, then display the values of variables instead. + +The @option{-p} option will display the attributes and values of each +@var{name}. +When @option{-p} is used with @var{name} arguments, additional options, +other than @option{-f} and @option{-F}, are ignored. + +When @option{-p} is supplied without @var{name} arguments, @code{declare} +will display the attributes and values of all variables having the +attributes specified by the additional options. +If no other options are supplied with @option{-p}, @code{declare} will +display the attributes and values of all shell variables. The @option{-f} +option will restrict the display to shell functions. + +The @option{-F} option inhibits the display of function definitions; +only the function name and attributes are printed. +If the @code{extdebug} shell option is enabled using @code{shopt} +(@pxref{The Shopt Builtin}), the source file name and line number where +each @var{name} is defined are displayed as well. +@option{-F} implies @option{-f}. + +The @option{-g} option forces variables to be created or modified at +the global scope, even when @code{declare} is executed in a shell function. +It is ignored in all other cases. + +The @option{-I} option causes local variables to inherit the attributes +(except the @var{nameref} attribute) +and value of any existing variable with the same +@var{name} at a surrounding scope. +If there is no existing variable, the local variable is initially unset. + +The following options can be used to restrict output to variables with +the specified attributes or to give variables attributes: + +@table @code +@item -a +Each @var{name} is an indexed array variable (@pxref{Arrays}). + +@item -A +Each @var{name} is an associative array variable (@pxref{Arrays}). + +@item -f +Use function names only. + +@item -i +The variable is to be treated as +an integer; arithmetic evaluation (@pxref{Shell Arithmetic}) is +performed when the variable is assigned a value. + +@item -l +When the variable is assigned a value, all upper-case characters are +converted to lower-case. +The upper-case attribute is disabled. + +@item -n +Give each @var{name} the @var{nameref} attribute, making +it a name reference to another variable. +That other variable is defined by the value of @var{name}. +All references, assignments, and attribute modifications +to @var{name}, except for those using or changing the +@option{-n} attribute itself, are performed on the variable referenced by +@var{name}'s value. +The nameref attribute cannot be applied to array variables. + +@item -r +Make @var{name}s readonly. These names cannot then be assigned values +by subsequent assignment statements or unset. + +@item -t +Give each @var{name} the @code{trace} attribute. +Traced functions inherit the @code{DEBUG} and @code{RETURN} traps from +the calling shell. +The trace attribute has no special meaning for variables. + +@item -u +When the variable is assigned a value, all lower-case characters are +converted to upper-case. +The lower-case attribute is disabled. + +@item -x +Mark each @var{name} for export to subsequent commands via +the environment. +@end table + +Using @samp{+} instead of @samp{-} turns off the attribute instead, +with the exceptions that @samp{+a} and @samp{+A} +may not be used to destroy array variables and @samp{+r} will not +remove the readonly attribute. +When used in a function, @code{declare} makes each @var{name} local, +as with the @code{local} command, unless the @option{-g} option is used. +If a variable name is followed by =@var{value}, the value of the variable +is set to @var{value}. + +When using @option{-a} or @option{-A} and the compound assignment syntax to +create array variables, additional attributes do not take effect until +subsequent assignments. + +The return status is zero unless an invalid option is encountered, +an attempt is made to define a function using @samp{-f foo=bar}, +an attempt is made to assign a value to a readonly variable, +an attempt is made to assign a value to an array variable without +using the compound assignment syntax (@pxref{Arrays}), +one of the @var{names} is not a valid shell variable name, +an attempt is made to turn off readonly status for a readonly variable, +an attempt is made to turn off array status for an array variable, +or an attempt is made to display a non-existent function with @option{-f}. + +@item echo +@btindex echo +@example +echo [-neE] [@var{arg} @dots{}] +@end example + +Output the @var{arg}s, separated by spaces, terminated with a +newline. +The return status is 0 unless a write error occurs. +If @option{-n} is specified, the trailing newline is suppressed. +If the @option{-e} option is given, interpretation of the following +backslash-escaped characters is enabled. +The @option{-E} option disables the interpretation of these escape characters, +even on systems where they are interpreted by default. +The @code{xpg_echo} shell option may be used to +dynamically determine whether or not @code{echo} expands these +escape characters by default. +@code{echo} does not interpret @option{--} to mean the end of options. + +@code{echo} interprets the following escape sequences: +@table @code +@item \a +alert (bell) +@item \b +backspace +@item \c +suppress further output +@item \e +@itemx \E +escape +@item \f +form feed +@item \n +new line +@item \r +carriage return +@item \t +horizontal tab +@item \v +vertical tab +@item \\ +backslash +@item \0@var{nnn} +the eight-bit character whose value is the octal value @var{nnn} +(zero to three octal digits) +@item \x@var{HH} +the eight-bit character whose value is the hexadecimal value @var{HH} +(one or two hex digits) +@item \u@var{HHHH} +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +@var{HHHH} (one to four hex digits) +@item \U@var{HHHHHHHH} +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +@var{HHHHHHHH} (one to eight hex digits) +@end table + +@item enable +@btindex enable +@example +enable [-a] [-dnps] [-f @var{filename}] [@var{name} @dots{}] +@end example + +Enable and disable builtin shell commands. +Disabling a builtin allows a disk command which has the same name +as a shell builtin to be executed without specifying a full pathname, +even though the shell normally searches for builtins before disk commands. +If @option{-n} is used, the @var{name}s become disabled. Otherwise +@var{name}s are enabled. For example, to use the @code{test} binary +found via @env{$PATH} instead of the shell builtin version, type +@samp{enable -n test}. + +If the @option{-p} option is supplied, or no @var{name} arguments appear, +a list of shell builtins is printed. With no other arguments, the list +consists of all enabled shell builtins. +The @option{-a} option means to list +each builtin with an indication of whether or not it is enabled. + +The @option{-f} option means to load the new builtin command @var{name} +from shared object @var{filename}, on systems that support dynamic loading. +The @option{-d} option will delete a builtin loaded with @option{-f}. + +If there are no options, a list of the shell builtins is displayed. +The @option{-s} option restricts @code{enable} to the @sc{posix} special +builtins. If @option{-s} is used with @option{-f}, the new builtin becomes +a special builtin (@pxref{Special Builtins}). + +The return status is zero unless a @var{name} is not a shell builtin +or there is an error loading a new builtin from a shared object. + +@item help +@btindex help +@example +help [-dms] [@var{pattern}] +@end example + +Display helpful information about builtin commands. +If @var{pattern} is specified, @code{help} gives detailed help +on all commands matching @var{pattern}, otherwise a list of +the builtins is printed. + +Options, if supplied, have the following meanings: + +@table @code +@item -d +Display a short description of each @var{pattern} +@item -m +Display the description of each @var{pattern} in a manpage-like format +@item -s +Display only a short usage synopsis for each @var{pattern} +@end table + +The return status is zero unless no command matches @var{pattern}. + +@item let +@btindex let +@example +let @var{expression} [@var{expression} @dots{}] +@end example + +The @code{let} builtin allows arithmetic to be performed on shell +variables. Each @var{expression} is evaluated according to the +rules given below in @ref{Shell Arithmetic}. If the +last @var{expression} evaluates to 0, @code{let} returns 1; +otherwise 0 is returned. + +@item local +@btindex local +@example +local [@var{option}] @var{name}[=@var{value}] @dots{} +@end example + +For each argument, a local variable named @var{name} is created, +and assigned @var{value}. +The @var{option} can be any of the options accepted by @code{declare}. +@code{local} can only be used within a function; it makes the variable +@var{name} have a visible scope restricted to that function and its +children. +If @var{name} is @samp{-}, the set of shell options is made local to the +function in which @code{local} is invoked: shell options changed using +the @code{set} builtin inside the function are restored to their original +values when the function returns. +The restore is effected as if a series of @code{set} commands were executed +to restore the values that were in place before the function. +The return status is zero unless @code{local} is used outside +a function, an invalid @var{name} is supplied, or @var{name} is a +readonly variable. + +@item logout +@btindex logout +@example +logout [@var{n}] +@end example + +Exit a login shell, returning a status of @var{n} to the shell's +parent. + +@item mapfile +@btindex mapfile +@example +mapfile [-d @var{delim}] [-n @var{count}] [-O @var{origin}] [-s @var{count}] + [-t] [-u @var{fd}] [-C @var{callback}] [-c @var{quantum}] [@var{array}] +@end example + +Read lines from the standard input into the indexed array variable @var{array}, +or from file descriptor @var{fd} +if the @option{-u} option is supplied. +The variable @code{MAPFILE} is the default @var{array}. +Options, if supplied, have the following meanings: + +@table @code + +@item -d +The first character of @var{delim} is used to terminate each input line, +rather than newline. +If @var{delim} is the empty string, @code{mapfile} will terminate a line +when it reads a NUL character. +@item -n +Copy at most @var{count} lines. If @var{count} is 0, all lines are copied. +@item -O +Begin assigning to @var{array} at index @var{origin}. +The default index is 0. +@item -s +Discard the first @var{count} lines read. +@item -t +Remove a trailing @var{delim} (default newline) from each line read. +@item -u +Read lines from file descriptor @var{fd} instead of the standard input. +@item -C +Evaluate @var{callback} each time @var{quantum} lines are read. +The @option{-c} option specifies @var{quantum}. +@item -c +Specify the number of lines read between each call to @var{callback}. +@end table + +If @option{-C} is specified without @option{-c}, +the default quantum is 5000. +When @var{callback} is evaluated, it is supplied the index of the next +array element to be assigned and the line to be assigned to that element +as additional arguments. +@var{callback} is evaluated after the line is read but before the +array element is assigned. + +If not supplied with an explicit origin, @code{mapfile} will clear @var{array} +before assigning to it. + +@code{mapfile} returns successfully unless an invalid option or option +argument is supplied, @var{array} is invalid or unassignable, or @var{array} +is not an indexed array. + +@item printf +@btindex printf +@example +printf [-v @var{var}] @var{format} [@var{arguments}] +@end example + +Write the formatted @var{arguments} to the standard output under the +control of the @var{format}. +The @option{-v} option causes the output to be assigned to the variable +@var{var} rather than being printed to the standard output. + +The @var{format} is a character string which contains three types of objects: +plain characters, which are simply copied to standard output, character +escape sequences, which are converted and copied to the standard output, and +format specifications, each of which causes printing of the next successive +@var{argument}. +In addition to the standard @code{printf(1)} formats, @code{printf} +interprets the following extensions: + +@table @code +@item %b +Causes @code{printf} to expand backslash escape sequences in the +corresponding @var{argument} in the same way as @code{echo -e} +(@pxref{Bash Builtins}). +@item %q +Causes @code{printf} to output the +corresponding @var{argument} in a format that can be reused as shell input. +@item %(@var{datefmt})T +Causes @code{printf} to output the date-time string resulting from using +@var{datefmt} as a format string for @code{strftime}(3). +The corresponding @var{argument} is an integer representing the number of +seconds since the epoch. +Two special argument values may be used: -1 represents the current +time, and -2 represents the time the shell was invoked. +If no argument is specified, conversion behaves as if -1 had been given. +This is an exception to the usual @code{printf} behavior. +@end table + +@noindent +The %b, %q, and %T directives all use the field width and precision +arguments from the format specification and write that many bytes from +(or use that wide a field for) the expanded argument, which usually +contains more characters than the original. + +Arguments to non-string format specifiers are treated as C language constants, +except that a leading plus or minus sign is allowed, and if the leading +character is a single or double quote, the value is the ASCII value of +the following character. + +The @var{format} is reused as necessary to consume all of the @var{arguments}. +If the @var{format} requires more @var{arguments} than are supplied, the +extra format specifications behave as if a zero value or null string, as +appropriate, had been supplied. The return value is zero on success, +non-zero on failure. + +@item read +@btindex read +@example +read [-ers] [-a @var{aname}] [-d @var{delim}] [-i @var{text}] [-n @var{nchars}] + [-N @var{nchars}] [-p @var{prompt}] [-t @var{timeout}] [-u @var{fd}] [@var{name} @dots{}] +@end example + +One line is read from the standard input, or from the file descriptor +@var{fd} supplied as an argument to the @option{-u} option, +split into words as described above in @ref{Word Splitting}, +and the first word +is assigned to the first @var{name}, the second word to the second @var{name}, +and so on. +If there are more words than names, +the remaining words and their intervening delimiters are assigned +to the last @var{name}. +If there are fewer words read from the input stream than names, +the remaining names are assigned empty values. +The characters in the value of the @env{IFS} variable +are used to split the line into words using the same rules the shell +uses for expansion (described above in @ref{Word Splitting}). +The backslash character @samp{\} may be used to remove any special +meaning for the next character read and for line continuation. + +Options, if supplied, have the following meanings: + +@table @code +@item -a @var{aname} +The words are assigned to sequential indices of the array variable +@var{aname}, starting at 0. +All elements are removed from @var{aname} before the assignment. +Other @var{name} arguments are ignored. + +@item -d @var{delim} +The first character of @var{delim} is used to terminate the input line, +rather than newline. +If @var{delim} is the empty string, @code{read} will terminate a line +when it reads a NUL character. + +@item -e +Readline (@pxref{Command Line Editing}) is used to obtain the line. +Readline uses the current (or default, if line editing was not previously +active) editing settings, but uses Readline's default filename completion. + +@item -i @var{text} +If Readline is being used to read the line, @var{text} is placed into +the editing buffer before editing begins. + +@item -n @var{nchars} +@code{read} returns after reading @var{nchars} characters rather than +waiting for a complete line of input, but honors a delimiter if fewer +than @var{nchars} characters are read before the delimiter. + +@item -N @var{nchars} +@code{read} returns after reading exactly @var{nchars} characters rather +than waiting for a complete line of input, unless EOF is encountered or +@code{read} times out. +Delimiter characters encountered in the input are +not treated specially and do not cause @code{read} to return until +@var{nchars} characters are read. +The result is not split on the characters in @code{IFS}; the intent is +that the variable is assigned exactly the characters read +(with the exception of backslash; see the @option{-r} option below). + +@item -p @var{prompt} +Display @var{prompt}, without a trailing newline, before attempting +to read any input. +The prompt is displayed only if input is coming from a terminal. + +@item -r +If this option is given, backslash does not act as an escape character. +The backslash is considered to be part of the line. +In particular, a backslash-newline pair may not then be used as a line +continuation. + +@item -s +Silent mode. If input is coming from a terminal, characters are +not echoed. + +@item -t @var{timeout} +Cause @code{read} to time out and return failure if a complete line of +input (or a specified number of characters) +is not read within @var{timeout} seconds. +@var{timeout} may be a decimal number with a fractional portion following +the decimal point. +This option is only effective if @code{read} is reading input from a +terminal, pipe, or other special file; it has no effect when reading +from regular files. +If @code{read} times out, @code{read} saves any partial input read into +the specified variable @var{name}. +If @var{timeout} is 0, @code{read} returns immediately, without trying to +read any data. The exit status is 0 if input is available on +the specified file descriptor, non-zero otherwise. +The exit status is greater than 128 if the timeout is exceeded. + +@item -u @var{fd} +Read input from file descriptor @var{fd}. +@end table + +If no @var{name}s are supplied, the line read, +without the ending delimiter but otherwise unmodified, +is assigned to the +variable @env{REPLY}. +The exit status is zero, unless end-of-file is encountered, @code{read} +times out (in which case the status is greater than 128), +a variable assignment error (such as assigning to a readonly variable) occurs, +or an invalid file descriptor is supplied as the argument to @option{-u}. + +@item readarray +@btindex readarray +@example +readarray [-d @var{delim}] [-n @var{count}] [-O @var{origin}] [-s @var{count}] + [-t] [-u @var{fd}] [-C @var{callback}] [-c @var{quantum}] [@var{array}] +@end example + +Read lines from the standard input into the indexed array variable @var{array}, +or from file descriptor @var{fd} +if the @option{-u} option is supplied. + +A synonym for @code{mapfile}. + +@item source +@btindex source +@example +source @var{filename} +@end example + +A synonym for @code{.} (@pxref{Bourne Shell Builtins}). + +@item type +@btindex type +@example +type [-afptP] [@var{name} @dots{}] +@end example + +For each @var{name}, indicate how it would be interpreted if used as a +command name. + +If the @option{-t} option is used, @code{type} prints a single word +which is one of @samp{alias}, @samp{function}, @samp{builtin}, +@samp{file} or @samp{keyword}, +if @var{name} is an alias, shell function, shell builtin, +disk file, or shell reserved word, respectively. +If the @var{name} is not found, then nothing is printed, and +@code{type} returns a failure status. + +If the @option{-p} option is used, @code{type} either returns the name +of the disk file that would be executed, or nothing if @option{-t} +would not return @samp{file}. + +The @option{-P} option forces a path search for each @var{name}, even if +@option{-t} would not return @samp{file}. + +If a command is hashed, @option{-p} and @option{-P} print the hashed value, +which is not necessarily the file that appears first in @code{$PATH}. + +If the @option{-a} option is used, @code{type} returns all of the places +that contain an executable named @var{file}. +This includes aliases and functions, if and only if the @option{-p} option +is not also used. + +If the @option{-f} option is used, @code{type} does not attempt to find +shell functions, as with the @code{command} builtin. + +The return status is zero if all of the @var{names} are found, non-zero +if any are not found. + +@item typeset +@btindex typeset +@example +typeset [-afFgrxilnrtux] [-p] [@var{name}[=@var{value}] @dots{}] +@end example + +The @code{typeset} command is supplied for compatibility with the Korn +shell. +It is a synonym for the @code{declare} builtin command. + +@item ulimit +@btindex ulimit +@example +ulimit [-HS] -a +ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [@var{limit}] +@end example + +@code{ulimit} provides control over the resources available to processes +started by the shell, on systems that allow such control. If an +option is given, it is interpreted as follows: + +@table @code +@item -S +Change and report the soft limit associated with a resource. + +@item -H +Change and report the hard limit associated with a resource. + +@item -a +All current limits are reported; no limits are set. + +@item -b +The maximum socket buffer size. + +@item -c +The maximum size of core files created. + +@item -d +The maximum size of a process's data segment. + +@item -e +The maximum scheduling priority ("nice"). + +@item -f +The maximum size of files written by the shell and its children. + +@item -i +The maximum number of pending signals. + +@item -k +The maximum number of kqueues that may be allocated. + +@item -l +The maximum size that may be locked into memory. + +@item -m +The maximum resident set size (many systems do not honor this limit). + +@item -n +The maximum number of open file descriptors (most systems do not +allow this value to be set). + +@item -p +The pipe buffer size. + +@item -q +The maximum number of bytes in @sc{posix} message queues. + +@item -r +The maximum real-time scheduling priority. + +@item -s +The maximum stack size. + +@item -t +The maximum amount of cpu time in seconds. + +@item -u +The maximum number of processes available to a single user. + +@item -v +The maximum amount of virtual memory available to the shell, and, on +some systems, to its children. + +@item -x +The maximum number of file locks. + +@item -P +The maximum number of pseudoterminals. + +@item -R +The maximum time a real-time process can run before blocking, in microseconds. + +@item -T +The maximum number of threads. +@end table + +If @var{limit} is given, and the @option{-a} option is not used, +@var{limit} is the new value of the specified resource. +The special @var{limit} values @code{hard}, @code{soft}, and +@code{unlimited} stand for the current hard limit, the current soft limit, +and no limit, respectively. +A hard limit cannot be increased by a non-root user once it is set; +a soft limit may be increased up to the value of the hard limit. +Otherwise, the current value of the soft limit for the specified resource +is printed, unless the @option{-H} option is supplied. +When more than one +resource is specified, the limit name and unit, if appropriate, +are printed before the value. +When setting new limits, if neither @option{-H} nor @option{-S} is supplied, +both the hard and soft limits are set. +If no option is given, then @option{-f} is assumed. Values are in 1024-byte +increments, except for +@option{-t}, which is in seconds; +@option{-R}, which is in microseconds; +@option{-p}, which is in units of 512-byte blocks; +@option{-P}, +@option{-T}, +@option{-b}, +@option{-k}, +@option{-n} and @option{-u}, which are unscaled values; +and, when in @sc{posix} Mode (@pxref{Bash POSIX Mode}), +@option{-c} and @option{-f}, which are in 512-byte increments. + +The return status is zero unless an invalid option or argument is supplied, +or an error occurs while setting a new limit. + +@item unalias +@btindex unalias +@example +unalias [-a] [@var{name} @dots{} ] +@end example + +Remove each @var{name} from the list of aliases. If @option{-a} is +supplied, all aliases are removed. +Aliases are described in @ref{Aliases}. +@end table + +@node Modifying Shell Behavior +@section Modifying Shell Behavior + +@menu +* The Set Builtin:: Change the values of shell attributes and + positional parameters. +* The Shopt Builtin:: Modify shell optional behavior. +@end menu + +@node The Set Builtin +@subsection The Set Builtin + +This builtin is so complicated that it deserves its own section. @code{set} +allows you to change the values of shell options and set the positional +parameters, or to display the names and values of shell variables. + +@table @code +@item set +@btindex set +@example +set [--abefhkmnptuvxBCEHPT] [-o @var{option-name}] [@var{argument} @dots{}] +set [+abefhkmnptuvxBCEHPT] [+o @var{option-name}] [@var{argument} @dots{}] +@end example + +If no options or arguments are supplied, @code{set} displays the names +and values of all shell variables and functions, sorted according to the +current locale, in a format that may be reused as input +for setting or resetting the currently-set variables. +Read-only variables cannot be reset. +In @sc{posix} mode, only shell variables are listed. + +When options are supplied, they set or unset shell attributes. +Options, if specified, have the following meanings: + +@table @code +@item -a +Each variable or function that is created or modified is given the +export attribute and marked for export to the environment of +subsequent commands. + +@item -b +Cause the status of terminated background jobs to be reported +immediately, rather than before printing the next primary prompt. + +@item -e +Exit immediately if +a pipeline (@pxref{Pipelines}), which may consist of a single simple command +(@pxref{Simple Commands}), +a list (@pxref{Lists}), +or a compound command (@pxref{Compound Commands}) +returns a non-zero status. +The shell does not exit if the command that fails is part of the +command list immediately following a @code{while} or @code{until} keyword, +part of the test in an @code{if} statement, +part of any command executed in a @code{&&} or @code{||} list except +the command following the final @code{&&} or @code{||}, +any command in a pipeline but the last, +or if the command's return status is being inverted with @code{!}. +If a compound command other than a subshell +returns a non-zero status because a command failed +while @option{-e} was being ignored, the shell does not exit. +A trap on @code{ERR}, if set, is executed before the shell exits. + +This option applies to the shell environment and each subshell environment +separately (@pxref{Command Execution Environment}), and may cause +subshells to exit before executing all the commands in the subshell. + +If a compound command or shell function executes in a context where +@option{-e} is being ignored, +none of the commands executed within the compound command or function body +will be affected by the @option{-e} setting, even if @option{-e} is set +and a command returns a failure status. +If a compound command or shell function sets @option{-e} while executing in +a context where @option{-e} is ignored, that setting will not have any +effect until the compound command or the command containing the function +call completes. + +@item -f +Disable filename expansion (globbing). + +@item -h +Locate and remember (hash) commands as they are looked up for execution. +This option is enabled by default. + +@item -k +All arguments in the form of assignment statements are placed +in the environment for a command, not just those that precede +the command name. + +@item -m +Job control is enabled (@pxref{Job Control}). +All processes run in a separate process group. +When a background job completes, the shell prints a line +containing its exit status. + +@item -n +Read commands but do not execute them. +This may be used to check a script for syntax errors. +This option is ignored by interactive shells. + +@item -o @var{option-name} + +Set the option corresponding to @var{option-name}: + +@table @code +@item allexport +Same as @code{-a}. + +@item braceexpand +Same as @code{-B}. + +@item emacs +Use an @code{emacs}-style line editing interface (@pxref{Command Line Editing}). +This also affects the editing interface used for @code{read -e}. + +@item errexit +Same as @code{-e}. + +@item errtrace +Same as @code{-E}. + +@item functrace +Same as @code{-T}. + +@item hashall +Same as @code{-h}. + +@item histexpand +Same as @code{-H}. + +@item history +Enable command history, as described in @ref{Bash History Facilities}. +This option is on by default in interactive shells. + +@item ignoreeof +An interactive shell will not exit upon reading EOF. + +@item keyword +Same as @code{-k}. + +@item monitor +Same as @code{-m}. + +@item noclobber +Same as @code{-C}. + +@item noexec +Same as @code{-n}. + +@item noglob +Same as @code{-f}. + +@item nolog +Currently ignored. + +@item notify +Same as @code{-b}. + +@item nounset +Same as @code{-u}. + +@item onecmd +Same as @code{-t}. + +@item physical +Same as @code{-P}. + +@item pipefail +If set, the return value of a pipeline is the value of the last +(rightmost) command to exit with a non-zero status, or zero if all +commands in the pipeline exit successfully. +This option is disabled by default. + +@item posix +Change the behavior of Bash where the default operation differs +from the @sc{posix} standard to match the standard +(@pxref{Bash POSIX Mode}). +This is intended to make Bash behave as a strict superset of that +standard. + +@item privileged +Same as @code{-p}. + +@item verbose +Same as @code{-v}. + +@item vi +Use a @code{vi}-style line editing interface. +This also affects the editing interface used for @code{read -e}. + +@item xtrace +Same as @code{-x}. +@end table + +@item -p +Turn on privileged mode. +In this mode, the @env{$BASH_ENV} and @env{$ENV} files are not +processed, shell functions are not inherited from the environment, +and the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH} and @env{GLOBIGNORE} +variables, if they appear in the environment, are ignored. +If the shell is started with the effective user (group) id not equal to the +real user (group) id, and the @option{-p} option is not supplied, these actions +are taken and the effective user id is set to the real user id. +If the @option{-p} option is supplied at startup, the effective user id is +not reset. +Turning this option off causes the effective user +and group ids to be set to the real user and group ids. + +@item -t +Exit after reading and executing one command. + +@item -u +Treat unset variables and parameters other than the special parameters +@samp{@@} or @samp{*} as an error when performing parameter expansion. +An error message will be written to the standard error, and a non-interactive +shell will exit. + +@item -v +Print shell input lines as they are read. + +@item -x +Print a trace of simple commands, @code{for} commands, @code{case} +commands, @code{select} commands, and arithmetic @code{for} commands +and their arguments or associated word lists after they are +expanded and before they are executed. The value of the @env{PS4} +variable is expanded and the resultant value is printed before +the command and its expanded arguments. + +@item -B +The shell will perform brace expansion (@pxref{Brace Expansion}). +This option is on by default. + +@item -C +Prevent output redirection using @samp{>}, @samp{>&}, and @samp{<>} +from overwriting existing files. + +@item -E +If set, any trap on @code{ERR} is inherited by shell functions, command +substitutions, and commands executed in a subshell environment. +The @code{ERR} trap is normally not inherited in such cases. + +@item -H +Enable @samp{!} style history substitution (@pxref{History Interaction}). +This option is on by default for interactive shells. + +@item -P +If set, do not resolve symbolic links when performing commands such as +@code{cd} which change the current directory. The physical directory +is used instead. By default, Bash follows +the logical chain of directories when performing commands +which change the current directory. + +For example, if @file{/usr/sys} is a symbolic link to @file{/usr/local/sys} +then: +@example +$ cd /usr/sys; echo $PWD +/usr/sys +$ cd ..; pwd +/usr +@end example + +@noindent +If @code{set -P} is on, then: +@example +$ cd /usr/sys; echo $PWD +/usr/local/sys +$ cd ..; pwd +/usr/local +@end example + +@item -T +If set, any trap on @code{DEBUG} and @code{RETURN} are inherited by +shell functions, command substitutions, and commands executed +in a subshell environment. +The @code{DEBUG} and @code{RETURN} traps are normally not inherited +in such cases. + +@item -- +If no arguments follow this option, then the positional parameters are +unset. Otherwise, the positional parameters are set to the +@var{arguments}, even if some of them begin with a @samp{-}. + +@item - +Signal the end of options, cause all remaining @var{arguments} +to be assigned to the positional parameters. The @option{-x} +and @option{-v} options are turned off. +If there are no arguments, the positional parameters remain unchanged. +@end table + +Using @samp{+} rather than @samp{-} causes these options to be +turned off. The options can also be used upon invocation of the +shell. The current set of options may be found in @code{$-}. + +The remaining N @var{arguments} are positional parameters and are +assigned, in order, to @code{$1}, @code{$2}, @dots{} @code{$N}. +The special parameter @code{#} is set to N. + +The return status is always zero unless an invalid option is supplied. +@end table + +@node The Shopt Builtin +@subsection The Shopt Builtin + +This builtin allows you to change additional shell optional behavior. + +@table @code + +@item shopt +@btindex shopt +@example +shopt [-pqsu] [-o] [@var{optname} @dots{}] +@end example + +Toggle the values of settings controlling optional shell behavior. +The settings can be either those listed below, or, if the +@option{-o} option is used, those available with the @option{-o} +option to the @code{set} builtin command (@pxref{The Set Builtin}). +With no options, or with the @option{-p} option, a list of all settable +options is displayed, with an indication of whether or not each is set; +if @var{optnames} are supplied, the output is restricted to those options. +The @option{-p} option causes output to be displayed in a form that +may be reused as input. +Other options have the following meanings: + +@table @code +@item -s +Enable (set) each @var{optname}. + +@item -u +Disable (unset) each @var{optname}. + +@item -q +Suppresses normal output; the return status +indicates whether the @var{optname} is set or unset. +If multiple @var{optname} arguments are given with @option{-q}, +the return status is zero if all @var{optnames} are enabled; +non-zero otherwise. + +@item -o +Restricts the values of +@var{optname} to be those defined for the @option{-o} option to the +@code{set} builtin (@pxref{The Set Builtin}). +@end table + +If either @option{-s} or @option{-u} +is used with no @var{optname} arguments, @code{shopt} shows only +those options which are set or unset, respectively. + +Unless otherwise noted, the @code{shopt} options are disabled (off) +by default. + +The return status when listing options is zero if all @var{optnames} +are enabled, non-zero otherwise. When setting or unsetting options, +the return status is zero unless an @var{optname} is not a valid shell +option. + +The list of @code{shopt} options is: +@table @code + +@item assoc_expand_once +If set, the shell suppresses multiple evaluation of associative array +subscripts during arithmetic expression evaluation, while executing +builtins that can perform variable assignments, +and while executing builtins that perform array dereferencing. + +@item autocd +If set, a command name that is the name of a directory is executed as if +it were the argument to the @code{cd} command. +This option is only used by interactive shells. + +@item cdable_vars +If this is set, an argument to the @code{cd} builtin command that +is not a directory is assumed to be the name of a variable whose +value is the directory to change to. + +@item cdspell +If set, minor errors in the spelling of a directory component in a +@code{cd} command will be corrected. +The errors checked for are transposed characters, +a missing character, and a character too many. +If a correction is found, the corrected path is printed, +and the command proceeds. +This option is only used by interactive shells. + +@item checkhash +If this is set, Bash checks that a command found in the hash +table exists before trying to execute it. If a hashed command no +longer exists, a normal path search is performed. + +@item checkjobs +If set, Bash lists the status of any stopped and running jobs before +exiting an interactive shell. If any jobs are running, this causes +the exit to be deferred until a second exit is attempted without an +intervening command (@pxref{Job Control}). +The shell always postpones exiting if any jobs are stopped. + +@item checkwinsize +If set, Bash checks the window size after each external (non-builtin) +command and, if necessary, updates the values of +@env{LINES} and @env{COLUMNS}. +This option is enabled by default. + +@item cmdhist +If set, Bash +attempts to save all lines of a multiple-line +command in the same history entry. This allows +easy re-editing of multi-line commands. +This option is enabled by default, but only has an effect if command +history is enabled (@pxref{Bash History Facilities}). + +@item compat31 +@itemx compat32 +@itemx compat40 +@itemx compat41 +@itemx compat42 +@itemx compat43 +@itemx compat44 +These control aspects of the shell's compatibility mode +(@pxref{Shell Compatibility Mode}). + +@item complete_fullquote +If set, Bash +quotes all shell metacharacters in filenames and directory names when +performing completion. +If not set, Bash +removes metacharacters such as the dollar sign from the set of +characters that will be quoted in completed filenames +when these metacharacters appear in shell variable references in words to be +completed. +This means that dollar signs in variable names that expand to directories +will not be quoted; +however, any dollar signs appearing in filenames will not be quoted, either. +This is active only when bash is using backslashes to quote completed +filenames. +This variable is set by default, which is the default Bash behavior in +versions through 4.2. + +@item direxpand +If set, Bash +replaces directory names with the results of word expansion when performing +filename completion. This changes the contents of the readline editing +buffer. +If not set, Bash attempts to preserve what the user typed. + +@item dirspell +If set, Bash +attempts spelling correction on directory names during word completion +if the directory name initially supplied does not exist. + +@item dotglob +If set, Bash includes filenames beginning with a `.' in +the results of filename expansion. +The filenames @samp{.} and @samp{..} must always be matched explicitly, +even if @code{dotglob} is set. + +@item execfail +If this is set, a non-interactive shell will not exit if +it cannot execute the file specified as an argument to the @code{exec} +builtin command. An interactive shell does not exit if @code{exec} +fails. + +@item expand_aliases +If set, aliases are expanded as described below under Aliases, +@ref{Aliases}. +This option is enabled by default for interactive shells. + +@item extdebug +If set at shell invocation, +or in a shell startup file, +arrange to execute the debugger profile +before the shell starts, identical to the @option{--debugger} option. +If set after invocation, behavior intended for use by debuggers is enabled: + +@enumerate +@item +The @option{-F} option to the @code{declare} builtin (@pxref{Bash Builtins}) +displays the source file name and line number corresponding to each function +name supplied as an argument. + +@item +If the command run by the @code{DEBUG} trap returns a non-zero value, the +next command is skipped and not executed. + +@item +If the command run by the @code{DEBUG} trap returns a value of 2, and the +shell is executing in a subroutine (a shell function or a shell script +executed by the @code{.} or @code{source} builtins), the shell simulates +a call to @code{return}. + +@item +@code{BASH_ARGC} and @code{BASH_ARGV} are updated as described in their +descriptions (@pxref{Bash Variables}). + +@item +Function tracing is enabled: command substitution, shell functions, and +subshells invoked with @code{( @var{command} )} inherit the +@code{DEBUG} and @code{RETURN} traps. + +@item +Error tracing is enabled: command substitution, shell functions, and +subshells invoked with @code{( @var{command} )} inherit the +@code{ERR} trap. +@end enumerate + +@item extglob +If set, the extended pattern matching features described above +(@pxref{Pattern Matching}) are enabled. + +@item extquote +If set, @code{$'@var{string}'} and @code{$"@var{string}"} quoting is +performed within @code{$@{@var{parameter}@}} expansions +enclosed in double quotes. This option is enabled by default. + +@item failglob +If set, patterns which fail to match filenames during filename expansion +result in an expansion error. + +@item force_fignore +If set, the suffixes specified by the @env{FIGNORE} shell variable +cause words to be ignored when performing word completion even if +the ignored words are the only possible completions. +@xref{Bash Variables}, for a description of @env{FIGNORE}. +This option is enabled by default. + +@item globasciiranges +If set, range expressions used in pattern matching bracket expressions +(@pxref{Pattern Matching}) +behave as if in the traditional C locale when performing +comparisons. That is, the current locale's collating sequence +is not taken into account, so +@samp{b} will not collate between @samp{A} and @samp{B}, +and upper-case and lower-case ASCII characters will collate together. + +@item globstar +If set, the pattern @samp{**} used in a filename expansion context will +match all files and zero or more directories and subdirectories. +If the pattern is followed by a @samp{/}, only directories and +subdirectories match. + +@item gnu_errfmt +If set, shell error messages are written in the standard @sc{gnu} error +message format. + +@item histappend +If set, the history list is appended to the file named by the value +of the @env{HISTFILE} +variable when the shell exits, rather than overwriting the file. + +@item histreedit +If set, and Readline +is being used, a user is given the opportunity to re-edit a +failed history substitution. + +@item histverify +If set, and Readline +is being used, the results of history substitution are not immediately +passed to the shell parser. Instead, the resulting line is loaded into +the Readline editing buffer, allowing further modification. + +@item hostcomplete +If set, and Readline is being used, Bash will attempt to perform +hostname completion when a word containing a @samp{@@} is being +completed (@pxref{Commands For Completion}). This option is enabled +by default. + +@item huponexit +If set, Bash will send @code{SIGHUP} to all jobs when an interactive +login shell exits (@pxref{Signals}). + +@item inherit_errexit +If set, command substitution inherits the value of the @code{errexit} option, +instead of unsetting it in the subshell environment. +This option is enabled when @sc{posix} mode is enabled. + +@item interactive_comments +Allow a word beginning with @samp{#} +to cause that word and all remaining characters on that +line to be ignored in an interactive shell. +This option is enabled by default. + +@item lastpipe +If set, and job control is not active, the shell runs the last command of +a pipeline not executed in the background in the current shell environment. + +@item lithist +If enabled, and the @code{cmdhist} +option is enabled, multi-line commands are saved to the history with +embedded newlines rather than using semicolon separators where possible. + +@item localvar_inherit +If set, local variables inherit the value and attributes of a variable of +the same name that exists at a previous scope before any new value is +assigned. The @var{nameref} attribute is not inherited. + +@item localvar_unset +If set, calling @code{unset} on local variables in previous function scopes +marks them so subsequent lookups find them unset until that function +returns. This is identical to the behavior of unsetting local variables +at the current function scope. + +@item login_shell +The shell sets this option if it is started as a login shell +(@pxref{Invoking Bash}). +The value may not be changed. + +@item mailwarn +If set, and a file that Bash is checking for mail has been +accessed since the last time it was checked, the message +@code{"The mail in @var{mailfile} has been read"} is displayed. + +@item no_empty_cmd_completion +If set, and Readline is being used, Bash will not attempt to search +the @env{PATH} for possible completions when completion is attempted +on an empty line. + +@item nocaseglob +If set, Bash matches filenames in a case-insensitive fashion when +performing filename expansion. + +@item nocasematch +If set, Bash matches patterns in a case-insensitive fashion when +performing matching while executing @code{case} or @code{[[} +conditional commands, +when performing pattern substitution word expansions, +or when filtering possible completions as part of programmable completion. + +@item nullglob +If set, Bash allows filename patterns which match no +files to expand to a null string, rather than themselves. + +@item progcomp +If set, the programmable completion facilities +(@pxref{Programmable Completion}) are enabled. +This option is enabled by default. + +@item progcomp_alias +If set, and programmable completion is enabled, Bash treats a command +name that doesn't have any completions as a possible alias and attempts +alias expansion. If it has an alias, Bash attempts programmable +completion using the command word resulting from the expanded alias. + +@item promptvars +If set, prompt strings undergo +parameter expansion, command substitution, arithmetic +expansion, and quote removal after being expanded +as described below (@pxref{Controlling the Prompt}). +This option is enabled by default. + +@item restricted_shell +The shell sets this option if it is started in restricted mode +(@pxref{The Restricted Shell}). +The value may not be changed. +This is not reset when the startup files are executed, allowing +the startup files to discover whether or not a shell is restricted. + +@item shift_verbose +If this is set, the @code{shift} +builtin prints an error message when the shift count exceeds the +number of positional parameters. + +@item sourcepath +If set, the @code{source} builtin uses the value of @env{PATH} +to find the directory containing the file supplied as an argument. +This option is enabled by default. + +@item xpg_echo +If set, the @code{echo} builtin expands backslash-escape sequences +by default. + +@end table +@end table + +@node Special Builtins +@section Special Builtins +@cindex special builtin + +For historical reasons, the @sc{posix} standard has classified +several builtin commands as @emph{special}. +When Bash is executing in @sc{posix} mode, the special builtins +differ from other builtin commands in three respects: + +@enumerate +@item +Special builtins are found before shell functions during command lookup. + +@item +If a special builtin returns an error status, a non-interactive shell exits. + +@item +Assignment statements preceding the command stay in effect in the shell +environment after the command completes. +@end enumerate + +When Bash is not executing in @sc{posix} mode, these builtins behave no +differently than the rest of the Bash builtin commands. +The Bash @sc{posix} mode is described in @ref{Bash POSIX Mode}. + +These are the @sc{posix} special builtins: +@example +@w{break : . continue eval exec exit export readonly return set} +@w{shift trap unset} +@end example + +@node Shell Variables +@chapter Shell Variables + +@menu +* Bourne Shell Variables:: Variables which Bash uses in the same way + as the Bourne Shell. +* Bash Variables:: List of variables that exist in Bash. +@end menu + +This chapter describes the shell variables that Bash uses. +Bash automatically assigns default values to a number of variables. + +@node Bourne Shell Variables +@section Bourne Shell Variables + +Bash uses certain shell variables in the same way as the Bourne shell. +In some cases, Bash assigns a default value to the variable. + +@vtable @code + +@item CDPATH +A colon-separated list of directories used as a search path for +the @code{cd} builtin command. + +@item HOME +The current user's home directory; the default for the @code{cd} builtin +command. +The value of this variable is also used by tilde expansion +(@pxref{Tilde Expansion}). + +@item IFS +A list of characters that separate fields; used when the shell splits +words as part of expansion. + +@item MAIL +If this parameter is set to a filename or directory name +and the @env{MAILPATH} variable +is not set, Bash informs the user of the arrival of mail in +the specified file or Maildir-format directory. + +@item MAILPATH +A colon-separated list of filenames which the shell periodically checks +for new mail. +Each list entry can specify the message that is printed when new mail +arrives in the mail file by separating the filename from the message with +a @samp{?}. +When used in the text of the message, @code{$_} expands to the name of +the current mail file. + +@item OPTARG +The value of the last option argument processed by the @code{getopts} builtin. + +@item OPTIND +The index of the last option argument processed by the @code{getopts} builtin. + +@item PATH +A colon-separated list of directories in which the shell looks for +commands. +A zero-length (null) directory name in the value of @code{PATH} indicates the +current directory. +A null directory name may appear as two adjacent colons, or as an initial +or trailing colon. + +@item PS1 +The primary prompt string. The default value is @samp{\s-\v\$ }. +@xref{Controlling the Prompt}, for the complete list of escape +sequences that are expanded before @env{PS1} is displayed. + +@item PS2 +The secondary prompt string. The default value is @samp{> }. +@env{PS2} is expanded in the same way as @env{PS1} before being +displayed. + +@end vtable + +@node Bash Variables +@section Bash Variables + +These variables are set or used by Bash, but other shells +do not normally treat them specially. + +A few variables used by Bash are described in different chapters: +variables for controlling the job control facilities +(@pxref{Job Control Variables}). + +@vtable @code + +@item _ +@vindex $_ +($_, an underscore.) +At shell startup, set to the pathname used to invoke the +shell or shell script being executed as passed in the environment +or argument list. +Subsequently, expands to the last argument to the previous simple +command executed in the foreground, after expansion. +Also set to the full pathname used to invoke each command executed +and placed in the environment exported to that command. +When checking mail, this parameter holds the name of the mail file. + +@item BASH +The full pathname used to execute the current instance of Bash. + +@item BASHOPTS +A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the @option{-s} option to the +@code{shopt} builtin command (@pxref{The Shopt Builtin}). +The options appearing in @env{BASHOPTS} are those reported +as @samp{on} by @samp{shopt}. +If this variable is in the environment when Bash +starts up, each shell option in the list will be enabled before +reading any startup files. This variable is readonly. + +@item BASHPID +Expands to the process ID of the current Bash process. +This differs from @code{$$} under certain circumstances, such as subshells +that do not require Bash to be re-initialized. +Assignments to @env{BASHPID} have no effect. +If @env{BASHPID} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item BASH_ALIASES +An associative array variable whose members correspond to the internal +list of aliases as maintained by the @code{alias} builtin. +(@pxref{Bourne Shell Builtins}). +Elements added to this array appear in the alias list; however, +unsetting array elements currently does not cause aliases to be removed +from the alias list. +If @env{BASH_ALIASES} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item BASH_ARGC +An array variable whose values are the number of parameters in each +frame of the current bash execution call stack. The number of +parameters to the current subroutine (shell function or script executed +with @code{.} or @code{source}) is at the top of the stack. When a +subroutine is executed, the number of parameters passed is pushed onto +@code{BASH_ARGC}. +The shell sets @code{BASH_ARGC} only when in extended debugging mode +(see @ref{The Shopt Builtin} +for a description of the @code{extdebug} option to the @code{shopt} +builtin). +Setting @code{extdebug} after the shell has started to execute a script, +or referencing this variable when @code{extdebug} is not set, +may result in inconsistent values. + +@item BASH_ARGV +An array variable containing all of the parameters in the current bash +execution call stack. The final parameter of the last subroutine call +is at the top of the stack; the first parameter of the initial call is +at the bottom. When a subroutine is executed, the parameters supplied +are pushed onto @code{BASH_ARGV}. +The shell sets @code{BASH_ARGV} only when in extended debugging mode +(see @ref{The Shopt Builtin} +for a description of the @code{extdebug} option to the @code{shopt} +builtin). +Setting @code{extdebug} after the shell has started to execute a script, +or referencing this variable when @code{extdebug} is not set, +may result in inconsistent values. + +@item BASH_ARGV0 +When referenced, this variable expands to the name of the shell or shell +script (identical to @code{$0}; @xref{Special Parameters}, +for the description of special parameter 0). +Assignment to @code{BASH_ARGV0} +causes the value assigned to also be assigned to @code{$0}. +If @env{BASH_ARGV0} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item BASH_CMDS +An associative array variable whose members correspond to the internal +hash table of commands as maintained by the @code{hash} builtin +(@pxref{Bourne Shell Builtins}). +Elements added to this array appear in the hash table; however, +unsetting array elements currently does not cause command names to be removed +from the hash table. +If @env{BASH_CMDS} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item BASH_COMMAND +The command currently being executed or about to be executed, unless the +shell is executing a command as the result of a trap, +in which case it is the command executing at the time of the trap. +If @env{BASH_COMMAND} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item BASH_COMPAT +The value is used to set the shell's compatibility level. +@xref{Shell Compatibility Mode}, for a description of the various +compatibility levels and their effects. +The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) +corresponding to the desired compatibility level. +If @env{BASH_COMPAT} is unset or set to the empty string, the compatibility +level is set to the default for the current version. +If @env{BASH_COMPAT} is set to a value that is not one of the valid +compatibility levels, the shell prints an error message and sets the +compatibility level to the default for the current version. +The valid values correspond to the compatibility levels +described below (@pxref{Shell Compatibility Mode}). +For example, 4.2 and 42 are valid values that correspond +to the @code{compat42} @code{shopt} option +and set the compatibility level to 42. +The current version is also a valid value. + +@item BASH_ENV +If this variable is set when Bash is invoked to execute a shell +script, its value is expanded and used as the name of a startup file +to read before executing the script. @xref{Bash Startup Files}. + +@item BASH_EXECUTION_STRING +The command argument to the @option{-c} invocation option. + +@item BASH_LINENO +An array variable whose members are the line numbers in source files +where each corresponding member of @var{FUNCNAME} was invoked. +@code{$@{BASH_LINENO[$i]@}} is the line number in the source file +(@code{$@{BASH_SOURCE[$i+1]@}}) where +@code{$@{FUNCNAME[$i]@}} was called (or @code{$@{BASH_LINENO[$i-1]@}} if +referenced within another shell function). +Use @code{LINENO} to obtain the current line number. + +@item BASH_LOADABLES_PATH +A colon-separated list of directories in which the shell looks for +dynamically loadable builtins specified by the +@code{enable} command. + +@item BASH_REMATCH +An array variable whose members are assigned by the @samp{=~} binary +operator to the @code{[[} conditional command +(@pxref{Conditional Constructs}). +The element with index 0 is the portion of the string +matching the entire regular expression. +The element with index @var{n} is the portion of the +string matching the @var{n}th parenthesized subexpression. + +@item BASH_SOURCE +An array variable whose members are the source filenames where the +corresponding shell function names in the @code{FUNCNAME} array +variable are defined. +The shell function @code{$@{FUNCNAME[$i]@}} is defined in the file +@code{$@{BASH_SOURCE[$i]@}} and called from @code{$@{BASH_SOURCE[$i+1]@}} + +@item BASH_SUBSHELL +Incremented by one within each subshell or subshell environment when +the shell begins executing in that environment. +The initial value is 0. +If @env{BASH_SUBSHELL} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item BASH_VERSINFO +A readonly array variable (@pxref{Arrays}) +whose members hold version information for this instance of Bash. +The values assigned to the array members are as follows: + +@table @code + +@item BASH_VERSINFO[0] +The major version number (the @var{release}). + +@item BASH_VERSINFO[1] +The minor version number (the @var{version}). + +@item BASH_VERSINFO[2] +The patch level. + +@item BASH_VERSINFO[3] +The build version. + +@item BASH_VERSINFO[4] +The release status (e.g., @var{beta1}). + +@item BASH_VERSINFO[5] +The value of @env{MACHTYPE}. +@end table + +@item BASH_VERSION +The version number of the current instance of Bash. + +@item BASH_XTRACEFD +If set to an integer corresponding to a valid file descriptor, Bash +will write the trace output generated when @samp{set -x} +is enabled to that file descriptor. +This allows tracing output to be separated from diagnostic and error +messages. +The file descriptor is closed when @code{BASH_XTRACEFD} is unset or assigned +a new value. +Unsetting @code{BASH_XTRACEFD} or assigning it the empty string causes the +trace output to be sent to the standard error. +Note that setting @code{BASH_XTRACEFD} to 2 (the standard error file +descriptor) and then unsetting it will result in the standard error +being closed. + +@item CHILD_MAX +Set the number of exited child status values for the shell to remember. +Bash will not allow this value to be decreased below a @sc{posix}-mandated +minimum, and there is a maximum value (currently 8192) that this may +not exceed. +The minimum value is system-dependent. + +@item COLUMNS +Used by the @code{select} command to determine the terminal width +when printing selection lists. +Automatically set if the @code{checkwinsize} option is enabled +(@pxref{The Shopt Builtin}), or in an interactive shell upon receipt of a +@code{SIGWINCH}. + +@item COMP_CWORD +An index into @env{$@{COMP_WORDS@}} of the word containing the current +cursor position. +This variable is available only in shell functions invoked by the +programmable completion facilities (@pxref{Programmable Completion}). + +@item COMP_LINE +The current command line. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (@pxref{Programmable Completion}). + +@item COMP_POINT +The index of the current cursor position relative to the beginning of +the current command. +If the current cursor position is at the end of the current command, +the value of this variable is equal to @code{$@{#COMP_LINE@}}. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (@pxref{Programmable Completion}). + +@item COMP_TYPE +Set to an integer value corresponding to the type of completion attempted +that caused a completion function to be called: +@var{TAB}, for normal completion, +@samp{?}, for listing completions after successive tabs, +@samp{!}, for listing alternatives on partial word completion, +@samp{@@}, to list completions if the word is not unmodified, +or +@samp{%}, for menu completion. +This variable is available only in shell functions and external +commands invoked by the +programmable completion facilities (@pxref{Programmable Completion}). + +@item COMP_KEY +The key (or final key of a key sequence) used to invoke the current +completion function. + +@item COMP_WORDBREAKS +The set of characters that the Readline library treats as word +separators when performing word completion. +If @env{COMP_WORDBREAKS} +is unset, it loses its special properties, +even if it is subsequently reset. + +@item COMP_WORDS +An array variable consisting of the individual +words in the current command line. +The line is split into words as Readline would split it, using +@code{COMP_WORDBREAKS} as described above. +This variable is available only in shell functions invoked by the +programmable completion facilities (@pxref{Programmable Completion}). + +@item COMPREPLY +An array variable from which Bash reads the possible completions +generated by a shell function invoked by the programmable completion +facility (@pxref{Programmable Completion}). +Each array element contains one possible completion. + +@item COPROC +An array variable created to hold the file descriptors +for output from and input to an unnamed coprocess (@pxref{Coprocesses}). + +@item DIRSTACK +An array variable containing the current contents of the directory stack. +Directories appear in the stack in the order they are displayed by the +@code{dirs} builtin. +Assigning to members of this array variable may be used to modify +directories already in the stack, but the @code{pushd} and @code{popd} +builtins must be used to add and remove directories. +Assignment to this variable will not change the current directory. +If @env{DIRSTACK} +is unset, it loses its special properties, even if +it is subsequently reset. + +@item EMACS +If Bash finds this variable in the environment when the shell +starts with value @samp{t}, it assumes that the shell is running in an +Emacs shell buffer and disables line editing. + +@item ENV +Expanded and executed similarlty to @code{BASH_ENV} +(@pxref{Bash Startup Files}) +when an interactive shell is invoked in +@sc{posix} Mode (@pxref{Bash POSIX Mode}). + +@item EPOCHREALTIME +Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch as a floating point value with micro-second granularity +(see the documentation for the C library function @var{time} for the +definition of Epoch). +Assignments to @env{EPOCHREALTIME} are ignored. +If @env{EPOCHREALTIME} +is unset, it loses its special properties, even if +it is subsequently reset. + +@item EPOCHSECONDS +Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see the documentation for the C library function +@var{time} for the definition of Epoch). +Assignments to @env{EPOCHSECONDS} are ignored. +If @env{EPOCHSECONDS} +is unset, it loses its special properties, even if +it is subsequently reset. + +@item EUID +The numeric effective user id of the current user. This variable +is readonly. + +@item EXECIGNORE +A colon-separated list of shell patterns (@pxref{Pattern Matching}) +defining the list of filenames to be ignored by command search using +@code{PATH}. +Files whose full pathnames match one of these patterns are not considered +executable files for the purposes of completion and command execution +via @code{PATH} lookup. +This does not affect the behavior of the @code{[}, @code{test}, and @code{[[} +commands. +Full pathnames in the command hash table are not subject to @code{EXECIGNORE}. +Use this variable to ignore shared library files that have the executable +bit set, but are not executable files. +The pattern matching honors the setting of the @code{extglob} shell +option. + +@item FCEDIT +The editor used as a default by the @option{-e} option to the @code{fc} +builtin command. + +@item FIGNORE +A colon-separated list of suffixes to ignore when performing +filename completion. +A filename whose suffix matches one of the entries in +@env{FIGNORE} +is excluded from the list of matched filenames. A sample +value is @samp{.o:~} + +@item FUNCNAME +An array variable containing the names of all shell functions +currently in the execution call stack. +The element with index 0 is the name of any currently-executing +shell function. +The bottom-most element (the one with the highest index) +is @code{"main"}. +This variable exists only when a shell function is executing. +Assignments to @env{FUNCNAME} have no effect. +If @env{FUNCNAME} +is unset, it loses its special properties, even if +it is subsequently reset. + +This variable can be used with @code{BASH_LINENO} and @code{BASH_SOURCE}. +Each element of @code{FUNCNAME} has corresponding elements in +@code{BASH_LINENO} and @code{BASH_SOURCE} to describe the call stack. +For instance, @code{$@{FUNCNAME[$i]@}} was called from the file +@code{$@{BASH_SOURCE[$i+1]@}} at line number @code{$@{BASH_LINENO[$i]@}}. +The @code{caller} builtin displays the current call stack using this +information. + +@item FUNCNEST +If set to a numeric value greater than 0, defines a maximum function +nesting level. Function invocations that exceed this nesting level +will cause the current command to abort. + +@item GLOBIGNORE +A colon-separated list of patterns defining the set of file names to +be ignored by filename expansion. +If a file name matched by a filename expansion pattern also matches one +of the patterns in @env{GLOBIGNORE}, it is removed from the list +of matches. +The pattern matching honors the setting of the @code{extglob} shell +option. + +@item GROUPS +An array variable containing the list of groups of which the current +user is a member. +Assignments to @env{GROUPS} have no effect. +If @env{GROUPS} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item histchars +Up to three characters which control history expansion, quick +substitution, and tokenization (@pxref{History Interaction}). +The first character is the +@var{history expansion} character, that is, the character which signifies the +start of a history expansion, normally @samp{!}. The second character is the +character which signifies `quick substitution' when seen as the first +character on a line, normally @samp{^}. The optional third character is the +character which indicates that the remainder of the line is a comment when +found as the first character of a word, usually @samp{#}. The history +comment character causes history substitution to be skipped for the +remaining words on the line. It does not necessarily cause the shell +parser to treat the rest of the line as a comment. + +@item HISTCMD +The history number, or index in the history list, of the current +command. +Assignments to @env{HISTCMD} are ignored. +If @env{HISTCMD} +is unset, it loses its special properties, +even if it is subsequently reset. + +@item HISTCONTROL +A colon-separated list of values controlling how commands are saved on +the history list. +If the list of values includes @samp{ignorespace}, lines which begin +with a space character are not saved in the history list. +A value of @samp{ignoredups} causes lines which match the previous +history entry to not be saved. +A value of @samp{ignoreboth} is shorthand for +@samp{ignorespace} and @samp{ignoredups}. +A value of @samp{erasedups} causes all previous lines matching the +current line to be removed from the history list before that line +is saved. +Any value not in the above list is ignored. +If @env{HISTCONTROL} is unset, or does not include a valid value, +all lines read by the shell parser are saved on the history list, +subject to the value of @env{HISTIGNORE}. +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +@env{HISTCONTROL}. + +@item HISTFILE +The name of the file to which the command history is saved. The +default value is @file{~/.bash_history}. + +@item HISTFILESIZE +The maximum number of lines contained in the history file. +When this variable is assigned a value, the history file is truncated, +if necessary, to contain no more than that number of lines +by removing the oldest entries. +The history file is also truncated to this size after +writing it when a shell exits. +If the value is 0, the history file is truncated to zero size. +Non-numeric values and numeric values less than zero inhibit truncation. +The shell sets the default value to the value of @env{HISTSIZE} +after reading any startup files. + +@item HISTIGNORE +A colon-separated list of patterns used to decide which command +lines should be saved on the history list. Each pattern is +anchored at the beginning of the line and must match the complete +line (no implicit @samp{*} is appended). Each pattern is tested +against the line after the checks specified by @env{HISTCONTROL} +are applied. In addition to the normal shell pattern matching +characters, @samp{&} matches the previous history line. @samp{&} +may be escaped using a backslash; the backslash is removed +before attempting a match. +The second and subsequent lines of a multi-line compound command are +not tested, and are added to the history regardless of the value of +@env{HISTIGNORE}. +The pattern matching honors the setting of the @code{extglob} shell +option. + +@env{HISTIGNORE} subsumes the function of @env{HISTCONTROL}. A +pattern of @samp{&} is identical to @code{ignoredups}, and a +pattern of @samp{[ ]*} is identical to @code{ignorespace}. +Combining these two patterns, separating them with a colon, +provides the functionality of @code{ignoreboth}. + +@item HISTSIZE +The maximum number of commands to remember on the history list. +If the value is 0, commands are not saved in the history list. +Numeric values less than zero result in every command being saved +on the history list (there is no limit). +The shell sets the default value to 500 after reading any startup files. + +@item HISTTIMEFORMAT +If this variable is set and not null, its value is used as a format string +for @var{strftime} to print the time stamp associated with each history +entry displayed by the @code{history} builtin. +If this variable is set, time stamps are written to the history file so +they may be preserved across shell sessions. +This uses the history comment character to distinguish timestamps from +other history lines. + +@item HOSTFILE +Contains the name of a file in the same format as @file{/etc/hosts} that +should be read when the shell needs to complete a hostname. +The list of possible hostname completions may be changed while the shell +is running; +the next time hostname completion is attempted after the +value is changed, Bash adds the contents of the new file to the +existing list. +If @env{HOSTFILE} is set, but has no value, or does not name a readable file, +Bash attempts to read +@file{/etc/hosts} to obtain the list of possible hostname completions. +When @env{HOSTFILE} is unset, the hostname list is cleared. + +@item HOSTNAME +The name of the current host. + +@item HOSTTYPE +A string describing the machine Bash is running on. + +@item IGNOREEOF +Controls the action of the shell on receipt of an @code{EOF} character +as the sole input. If set, the value denotes the number +of consecutive @code{EOF} characters that can be read as the +first character on an input line +before the shell will exit. If the variable exists but does not +have a numeric value, or has no value, then the default is 10. +If the variable does not exist, then @code{EOF} signifies the end of +input to the shell. This is only in effect for interactive shells. + +@item INPUTRC +The name of the Readline initialization file, overriding the default +of @file{~/.inputrc}. + +@item INSIDE_EMACS +If Bash finds this variable in the environment when the shell +starts, it assumes that the shell is running in an Emacs shell buffer +and may disable line editing depending on the value of @env{TERM}. + +@item LANG +Used to determine the locale category for any category not specifically +selected with a variable starting with @code{LC_}. + +@item LC_ALL +This variable overrides the value of @env{LANG} and any other +@code{LC_} variable specifying a locale category. + +@item LC_COLLATE +This variable determines the collation order used when sorting the +results of filename expansion, and +determines the behavior of range expressions, equivalence classes, +and collating sequences within filename expansion and pattern matching +(@pxref{Filename Expansion}). + +@item LC_CTYPE +This variable determines the interpretation of characters and the +behavior of character classes within filename expansion and pattern +matching (@pxref{Filename Expansion}). + +@item LC_MESSAGES +This variable determines the locale used to translate double-quoted +strings preceded by a @samp{$} (@pxref{Locale Translation}). + +@item LC_NUMERIC +This variable determines the locale category used for number formatting. + +@item LC_TIME +This variable determines the locale category used for data and time +formatting. + +@item LINENO +The line number in the script or shell function currently executing. +If @env{LINENO} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item LINES +Used by the @code{select} command to determine the column length +for printing selection lists. +Automatically set if the @code{checkwinsize} option is enabled +(@pxref{The Shopt Builtin}), or in an interactive shell upon receipt of a +@code{SIGWINCH}. + +@item MACHTYPE +A string that fully describes the system type on which Bash +is executing, in the standard @sc{gnu} @var{cpu-company-system} format. + +@item MAILCHECK +How often (in seconds) that the shell should check for mail in the +files specified in the @env{MAILPATH} or @env{MAIL} variables. +The default is 60 seconds. When it is time to check +for mail, the shell does so before displaying the primary prompt. +If this variable is unset, or set to a value that is not a number +greater than or equal to zero, the shell disables mail checking. + +@item MAPFILE +An array variable created to hold the text read by the +@code{mapfile} builtin when no variable name is supplied. + +@item OLDPWD +The previous working directory as set by the @code{cd} builtin. + +@item OPTERR +If set to the value 1, Bash displays error messages +generated by the @code{getopts} builtin command. + +@item OSTYPE +A string describing the operating system Bash is running on. + +@item PIPESTATUS +An array variable (@pxref{Arrays}) +containing a list of exit status values from the processes +in the most-recently-executed foreground pipeline (which may +contain only a single command). + +@item POSIXLY_CORRECT +If this variable is in the environment when Bash starts, the shell +enters @sc{posix} mode (@pxref{Bash POSIX Mode}) before reading the +startup files, as if the @option{--posix} invocation option had been supplied. +If it is set while the shell is running, Bash enables @sc{posix} mode, +as if the command +@example +@code{set -o posix} +@end example +@noindent +had been executed. +When the shell enters @sc{posix} mode, it sets this variable if it was +not already set. + +@item PPID +The process @sc{id} of the shell's parent process. This variable +is readonly. + +@item PROMPT_COMMAND +If this variable is set, and is an array, +the value of each set element is interpreted as a command to execute +before printing the primary prompt (@env{$PS1}). +If this is set but not an array variable, +its value is used as a command to execute instead. + +@item PROMPT_DIRTRIM +If set to a number greater than zero, the value is used as the number of +trailing directory components to retain when expanding the @code{\w} and +@code{\W} prompt string escapes (@pxref{Controlling the Prompt}). +Characters removed are replaced with an ellipsis. + +@item PS0 +The value of this parameter is expanded like @env{PS1} +and displayed by interactive shells after reading a command +and before the command is executed. + +@item PS3 +The value of this variable is used as the prompt for the +@code{select} command. If this variable is not set, the +@code{select} command prompts with @samp{#? } + +@item PS4 +The value of this parameter is expanded like @var{PS1} +and the expanded value is the prompt printed before the command line +is echoed when the @option{-x} option is set (@pxref{The Set Builtin}). +The first character of the expanded value is replicated multiple times, +as necessary, to indicate multiple levels of indirection. +The default is @samp{+ }. + +@item PWD +The current working directory as set by the @code{cd} builtin. + +@item RANDOM +Each time this parameter is referenced, it expands to a random integer +between 0 and 32767. Assigning a value to this +variable seeds the random number generator. +If @env{RANDOM} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item READLINE_LINE +The contents of the Readline line buffer, for use +with @samp{bind -x} (@pxref{Bash Builtins}). + +@item READLINE_MARK +The position of the @var{mark} (saved insertion point) in the +Readline line buffer, for use +with @samp{bind -x} (@pxref{Bash Builtins}). +The characters between the insertion point and the mark are often +called the @var{region}. + +@item READLINE_POINT +The position of the insertion point in the Readline line buffer, for use +with @samp{bind -x} (@pxref{Bash Builtins}). + +@item REPLY +The default variable for the @code{read} builtin. + +@item SECONDS +This variable expands to the number of seconds since the +shell was started. Assignment to this variable resets +the count to the value assigned, and the expanded value +becomes the value assigned plus the number of seconds +since the assignment. +The number of seconds at shell invocation and the current time is always +determined by querying the system clock. +If @env{SECONDS} +is unset, it loses its special properties, +even if it is subsequently reset. + +@item SHELL +This environment variable expands to the full pathname to the shell. +If it is not set when the shell starts, +Bash assigns to it the full pathname of the current user's login shell. + +@item SHELLOPTS +A colon-separated list of enabled shell options. Each word in +the list is a valid argument for the @option{-o} option to the +@code{set} builtin command (@pxref{The Set Builtin}). +The options appearing in @env{SHELLOPTS} are those reported +as @samp{on} by @samp{set -o}. +If this variable is in the environment when Bash +starts up, each shell option in the list will be enabled before +reading any startup files. This variable is readonly. + +@item SHLVL +Incremented by one each time a new instance of Bash is started. This is +intended to be a count of how deeply your Bash shells are nested. + +@item SRANDOM +This variable expands to a 32-bit pseudo-random number each time it is +referenced. The random number generator is not linear on systems that +support @file{/dev/urandom} or @code{arc4random}, so each returned number +has no relationship to the numbers preceding it. +The random number generator cannot be seeded, so assignments to this +variable have no effect. +If @env{SRANDOM} +is unset, it loses its special properties, +even if it is subsequently reset. + +@item TIMEFORMAT +The value of this parameter is used as a format string specifying +how the timing information for pipelines prefixed with the @code{time} +reserved word should be displayed. +The @samp{%} character introduces an +escape sequence that is expanded to a time value or other +information. +The escape sequences and their meanings are as +follows; the braces denote optional portions. + +@table @code + +@item %% +A literal @samp{%}. + +@item %[@var{p}][l]R +The elapsed time in seconds. + +@item %[@var{p}][l]U +The number of CPU seconds spent in user mode. + +@item %[@var{p}][l]S +The number of CPU seconds spent in system mode. + +@item %P +The CPU percentage, computed as (%U + %S) / %R. +@end table + +The optional @var{p} is a digit specifying the precision, the number of +fractional digits after a decimal point. +A value of 0 causes no decimal point or fraction to be output. +At most three places after the decimal point may be specified; values +of @var{p} greater than 3 are changed to 3. +If @var{p} is not specified, the value 3 is used. + +The optional @code{l} specifies a longer format, including minutes, of +the form @var{MM}m@var{SS}.@var{FF}s. +The value of @var{p} determines whether or not the fraction is included. + +If this variable is not set, Bash acts as if it had the value +@example +@code{$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'} +@end example +If the value is null, no timing information is displayed. +A trailing newline is added when the format string is displayed. + +@item TMOUT +If set to a value greater than zero, @code{TMOUT} is treated as the +default timeout for the @code{read} builtin (@pxref{Bash Builtins}). +The @code{select} command (@pxref{Conditional Constructs}) terminates +if input does not arrive after @code{TMOUT} seconds when input is coming +from a terminal. + +In an interactive shell, the value is interpreted as +the number of seconds to wait for a line of input after issuing +the primary prompt. +Bash +terminates after waiting for that number of seconds if a complete +line of input does not arrive. + +@item TMPDIR +If set, Bash uses its value as the name of a directory in which +Bash creates temporary files for the shell's use. + +@item UID +The numeric real user id of the current user. This variable is readonly. + +@end vtable + +@node Bash Features +@chapter Bash Features + +This chapter describes features unique to Bash. + +@menu +* Invoking Bash:: Command line options that you can give + to Bash. +* Bash Startup Files:: When and how Bash executes scripts. +* Interactive Shells:: What an interactive shell is. +* Bash Conditional Expressions:: Primitives used in composing expressions for + the @code{test} builtin. +* Shell Arithmetic:: Arithmetic on shell variables. +* Aliases:: Substituting one command for another. +* Arrays:: Array Variables. +* The Directory Stack:: History of visited directories. +* Controlling the Prompt:: Customizing the various prompt strings. +* The Restricted Shell:: A more controlled mode of shell execution. +* Bash POSIX Mode:: Making Bash behave more closely to what + the POSIX standard specifies. +* Shell Compatibility Mode:: How Bash supports behavior that was present + in earlier versions and has changed. +@end menu + +@node Invoking Bash +@section Invoking Bash + +@example +bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @var{option}] + [-O @var{shopt_option}] [@var{argument} @dots{}] +bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @var{option}] + [-O @var{shopt_option}] -c @var{string} [@var{argument} @dots{}] +bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @var{option}] + [-O @var{shopt_option}] [@var{argument} @dots{}] +@end example + +All of the single-character options used with the @code{set} builtin +(@pxref{The Set Builtin}) can be used as options when the shell is invoked. +In addition, there are several multi-character +options that you can use. These options must appear on the command +line before the single-character options to be recognized. + +@table @code +@item --debugger +Arrange for the debugger profile to be executed before the shell +starts. Turns on extended debugging mode (see @ref{The Shopt Builtin} +for a description of the @code{extdebug} option to the @code{shopt} +builtin). + +@item --dump-po-strings +A list of all double-quoted strings preceded by @samp{$} +is printed on the standard output +in the @sc{gnu} @code{gettext} PO (portable object) file format. +Equivalent to @option{-D} except for the output format. + +@item --dump-strings +Equivalent to @option{-D}. + +@item --help +Display a usage message on standard output and exit successfully. + +@item --init-file @var{filename} +@itemx --rcfile @var{filename} +Execute commands from @var{filename} (instead of @file{~/.bashrc}) +in an interactive shell. + +@item --login +Equivalent to @option{-l}. + +@item --noediting +Do not use the @sc{gnu} Readline library (@pxref{Command Line Editing}) +to read command lines when the shell is interactive. + +@item --noprofile +Don't load the system-wide startup file @file{/etc/profile} +or any of the personal initialization files +@file{~/.bash_profile}, @file{~/.bash_login}, or @file{~/.profile} +when Bash is invoked as a login shell. + +@item --norc +Don't read the @file{~/.bashrc} initialization file in an +interactive shell. This is on by default if the shell is +invoked as @code{sh}. + +@item --posix +Change the behavior of Bash where the default operation differs +from the @sc{posix} standard to match the standard. This +is intended to make Bash behave as a strict superset of that +standard. @xref{Bash POSIX Mode}, for a description of the Bash +@sc{posix} mode. + +@item --restricted +Make the shell a restricted shell (@pxref{The Restricted Shell}). + +@item --rpm-requires +Produce the list of files that are required for the +shell script to run. This implies '-n' and is subject +to the same limitations as compile time error checking checking; +Command substitutions, Conditional expressions and @command{eval} +are not parsed so some dependencies may be missed. + +@item --verbose +Equivalent to @option{-v}. Print shell input lines as they're read. + +@item --version +Show version information for this instance of +Bash on the standard output and exit successfully. +@end table + +There are several single-character options that may be supplied at +invocation which are not available with the @code{set} builtin. + +@table @code +@item -c +Read and execute commands from the first non-option argument +@var{command_string}, then exit. +If there are arguments after the @var{command_string}, +the first argument is assigned to @code{$0} +and any remaining arguments are assigned to the positional parameters. +The assignment to @code{$0} sets the name of the shell, which is used +in warning and error messages. + +@item -i +Force the shell to run interactively. Interactive shells are +described in @ref{Interactive Shells}. + +@item -l +Make this shell act as if it had been directly invoked by login. +When the shell is interactive, this is equivalent to starting a +login shell with @samp{exec -l bash}. +When the shell is not interactive, the login shell startup files will +be executed. +@samp{exec bash -l} or @samp{exec bash --login} +will replace the current shell with a Bash login shell. +@xref{Bash Startup Files}, for a description of the special behavior +of a login shell. + +@item -r +Make the shell a restricted shell (@pxref{The Restricted Shell}). + +@item -s +If this option is present, or if no arguments remain after option +processing, then commands are read from the standard input. +This option allows the positional parameters to be set +when invoking an interactive shell or when reading input +through a pipe. + +@item -D +A list of all double-quoted strings preceded by @samp{$} +is printed on the standard output. +These are the strings that +are subject to language translation when the current locale +is not @code{C} or @code{POSIX} (@pxref{Locale Translation}). +This implies the @option{-n} option; no commands will be executed. + +@item [-+]O [@var{shopt_option}] +@var{shopt_option} is one of the shell options accepted by the +@code{shopt} builtin (@pxref{The Shopt Builtin}). +If @var{shopt_option} is present, @option{-O} sets the value of that option; +@option{+O} unsets it. +If @var{shopt_option} is not supplied, the names and values of the shell +options accepted by @code{shopt} are printed on the standard output. +If the invocation option is @option{+O}, the output is displayed in a format +that may be reused as input. + +@item -- +A @code{--} signals the end of options and disables further option +processing. +Any arguments after the @code{--} are treated as filenames and arguments. +@end table + +@cindex login shell +A @emph{login} shell is one whose first character of argument zero is +@samp{-}, or one invoked with the @option{--login} option. + +@cindex interactive shell +An @emph{interactive} shell is one started without non-option arguments, +unless @option{-s} is specified, +without specifying the @option{-c} option, and whose input and output are both +connected to terminals (as determined by @code{isatty(3)}), or one +started with the @option{-i} option. @xref{Interactive Shells}, for more +information. + +If arguments remain after option processing, and neither the +@option{-c} nor the @option{-s} +option has been supplied, the first argument is assumed to +be the name of a file containing shell commands (@pxref{Shell Scripts}). +When Bash is invoked in this fashion, @code{$0} +is set to the name of the file, and the positional parameters +are set to the remaining arguments. +Bash reads and executes commands from this file, then exits. +Bash's exit status is the exit status of the last command executed +in the script. If no commands are executed, the exit status is 0. + +@node Bash Startup Files +@section Bash Startup Files +@cindex startup files + +This section describes how Bash executes its startup files. +If any of the files exist but cannot be read, Bash reports an error. +Tildes are expanded in filenames as described above under +Tilde Expansion (@pxref{Tilde Expansion}). + +Interactive shells are described in @ref{Interactive Shells}. + +@subsubheading Invoked as an interactive login shell, or with @option{--login} + +When Bash is invoked as an interactive login shell, or as a +non-interactive shell with the @option{--login} option, it first reads and +executes commands from the file @file{/etc/profile}, if that file exists. +After reading that file, it looks for @file{~/.bash_profile}, +@file{~/.bash_login}, and @file{~/.profile}, in that order, and reads +and executes commands from the first one that exists and is readable. +The @option{--noprofile} option may be used when the shell is started to +inhibit this behavior. + +When an interactive login shell exits, +or a non-interactive login shell executes the @code{exit} builtin command, +Bash reads and executes commands from +the file @file{~/.bash_logout}, if it exists. + +@subsubheading Invoked as an interactive non-login shell + +When an interactive shell that is not a login shell is started, Bash +reads and executes commands from @file{~/.bashrc}, if that file exists. +This may be inhibited by using the @option{--norc} option. +The @option{--rcfile @var{file}} option will force Bash to read and +execute commands from @var{file} instead of @file{~/.bashrc}. + +So, typically, your @file{~/.bash_profile} contains the line +@example +@code{if [ -f ~/.bashrc ]; then . ~/.bashrc; fi} +@end example +@noindent +after (or before) any login-specific initializations. + +@subsubheading Invoked non-interactively + +When Bash is started non-interactively, to run a shell script, +for example, it looks for the variable @env{BASH_ENV} in the environment, +expands its value if it appears there, and uses the expanded value as +the name of a file to read and execute. Bash behaves as if the +following command were executed: +@example +@code{if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi} +@end example +@noindent +but the value of the @env{PATH} variable is not used to search for the +filename. + +As noted above, if a non-interactive shell is invoked with the +@option{--login} option, Bash attempts to read and execute commands from the +login shell startup files. + +@subsubheading Invoked with name @code{sh} + +If Bash is invoked with the name @code{sh}, it tries to mimic the +startup behavior of historical versions of @code{sh} as closely as +possible, while conforming to the @sc{posix} standard as well. + +When invoked as an interactive login shell, or as a non-interactive +shell with the @option{--login} option, it first attempts to read +and execute commands from @file{/etc/profile} and @file{~/.profile}, in +that order. +The @option{--noprofile} option may be used to inhibit this behavior. +When invoked as an interactive shell with the name @code{sh}, Bash +looks for the variable @env{ENV}, expands its value if it is defined, +and uses the expanded value as the name of a file to read and execute. +Since a shell invoked as @code{sh} does not attempt to read and execute +commands from any other startup files, the @option{--rcfile} option has +no effect. +A non-interactive shell invoked with the name @code{sh} does not attempt +to read any other startup files. + +When invoked as @code{sh}, Bash enters @sc{posix} mode after +the startup files are read. + +@subsubheading Invoked in @sc{posix} mode + +When Bash is started in @sc{posix} mode, as with the +@option{--posix} command line option, it follows the @sc{posix} standard +for startup files. +In this mode, interactive shells expand the @env{ENV} variable +and commands are read and executed from the file whose name is the +expanded value. +No other startup files are read. + +@subsubheading Invoked by remote shell daemon + +Bash attempts to determine when it is being run with its standard input +connected to a network connection, as when executed by the remote shell +daemon, usually @code{rshd}, or the secure shell daemon @code{sshd}. +If Bash determines it is being run in +this fashion, it reads and executes commands from @file{~/.bashrc}, if that +file exists and is readable. +It will not do this if invoked as @code{sh}. +The @option{--norc} option may be used to inhibit this behavior, and the +@option{--rcfile} option may be used to force another file to be read, but +neither @code{rshd} nor @code{sshd} generally invoke the shell with those +options or allow them to be specified. + +@subsubheading Invoked with unequal effective and real @sc{uid/gid}s + +If Bash is started with the effective user (group) id not equal to the +real user (group) id, and the @option{-p} option is not supplied, no startup +files are read, shell functions are not inherited from the environment, +the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH}, and @env{GLOBIGNORE} +variables, if they appear in the environment, are ignored, and the effective +user id is set to the real user id. +If the @option{-p} option is supplied at invocation, the startup behavior is +the same, but the effective user id is not reset. + +@node Interactive Shells +@section Interactive Shells +@cindex interactive shell +@cindex shell, interactive + +@menu +* What is an Interactive Shell?:: What determines whether a shell is Interactive. +* Is this Shell Interactive?:: How to tell if a shell is interactive. +* Interactive Shell Behavior:: What changes in a interactive shell? +@end menu + +@node What is an Interactive Shell? +@subsection What is an Interactive Shell? + +An interactive shell +is one started without non-option arguments, unless @option{-s} is +specified, without specifying the @option{-c} option, and +whose input and error output are both +connected to terminals (as determined by @code{isatty(3)}), +or one started with the @option{-i} option. + +An interactive shell generally reads from and writes to a user's +terminal. + +The @option{-s} invocation option may be used to set the positional parameters +when an interactive shell is started. + +@node Is this Shell Interactive? +@subsection Is this Shell Interactive? + +To determine within a startup script whether or not Bash is +running interactively, +test the value of the @samp{-} special parameter. +It contains @code{i} when the shell is interactive. For example: + +@example +case "$-" in +*i*) echo This shell is interactive ;; +*) echo This shell is not interactive ;; +esac +@end example + +Alternatively, startup scripts may examine the variable +@env{PS1}; it is unset in non-interactive shells, and set in +interactive shells. Thus: + +@example +if [ -z "$PS1" ]; then + echo This shell is not interactive +else + echo This shell is interactive +fi +@end example + +@node Interactive Shell Behavior +@subsection Interactive Shell Behavior + +When the shell is running interactively, it changes its behavior in +several ways. + +@enumerate +@item +Startup files are read and executed as described in @ref{Bash Startup Files}. + +@item +Job Control (@pxref{Job Control}) is enabled by default. When job +control is in effect, Bash ignores the keyboard-generated job control +signals @code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}. + +@item +Bash expands and displays @env{PS1} before reading the first line +of a command, and expands and displays @env{PS2} before reading the +second and subsequent lines of a multi-line command. +Bash expands and displays @env{PS0} after it reads a command but before +executing it. +See @ref{Controlling the Prompt}, for a complete list of prompt +string escape sequences. + +@item +Bash executes the values of the set elements of the @env{PROMPT_COMMANDS} +array variable as commands before printing the primary prompt, @env{$PS1} +(@pxref{Bash Variables}). + +@item +Readline (@pxref{Command Line Editing}) is used to read commands from +the user's terminal. + +@item +Bash inspects the value of the @code{ignoreeof} option to @code{set -o} +instead of exiting immediately when it receives an @code{EOF} on its +standard input when reading a command (@pxref{The Set Builtin}). + +@item +Command history (@pxref{Bash History Facilities}) +and history expansion (@pxref{History Interaction}) +are enabled by default. +Bash will save the command history to the file named by @env{$HISTFILE} +when a shell with history enabled exits. + +@item +Alias expansion (@pxref{Aliases}) is performed by default. + +@item +In the absence of any traps, Bash ignores @code{SIGTERM} +(@pxref{Signals}). + +@item +In the absence of any traps, @code{SIGINT} is caught and handled +(@pxref{Signals}). +@code{SIGINT} will interrupt some shell builtins. + +@item +An interactive login shell sends a @code{SIGHUP} to all jobs on exit +if the @code{huponexit} shell option has been enabled (@pxref{Signals}). + +@item +The @option{-n} invocation option is ignored, and @samp{set -n} has +no effect (@pxref{The Set Builtin}). + +@item +Bash will check for mail periodically, depending on the values of the +@env{MAIL}, @env{MAILPATH}, and @env{MAILCHECK} shell variables +(@pxref{Bash Variables}). + +@item +Expansion errors due to references to unbound shell variables after +@samp{set -u} has been enabled will not cause the shell to exit +(@pxref{The Set Builtin}). + +@item +The shell will not exit on expansion errors caused by @var{var} being unset +or null in @code{$@{@var{var}:?@var{word}@}} expansions +(@pxref{Shell Parameter Expansion}). + +@item +Redirection errors encountered by shell builtins will not cause the +shell to exit. + +@item +When running in @sc{posix} mode, a special builtin returning an error +status will not cause the shell to exit (@pxref{Bash POSIX Mode}). + +@item +A failed @code{exec} will not cause the shell to exit +(@pxref{Bourne Shell Builtins}). + +@item +Parser syntax errors will not cause the shell to exit. + +@item +Simple spelling correction for directory arguments to the @code{cd} +builtin is enabled by default (see the description of the @code{cdspell} +option to the @code{shopt} builtin in @ref{The Shopt Builtin}). + +@item +The shell will check the value of the @env{TMOUT} variable and exit +if a command is not read within the specified number of seconds after +printing @env{$PS1} (@pxref{Bash Variables}). + +@end enumerate + +@node Bash Conditional Expressions +@section Bash Conditional Expressions +@cindex expressions, conditional + +Conditional expressions are used by the @code{[[} compound command +and the @code{test} and @code{[} builtin commands. The @code{test} +and @code{[} commands determine their behavior based on the number +of arguments; see the descriptions of those commands for any other +command-specific actions. + +Expressions may be unary or binary, +and are formed from the following primaries. +Unary expressions are often used to examine the status of a file. +There are string operators and numeric comparison operators as well. +Bash handles several filenames specially when they are used in +expressions. +If the operating system on which Bash is running provides these +special files, Bash will use them; otherwise it will emulate them +internally with this behavior: +If the @var{file} argument to one of the primaries is of the form +@file{/dev/fd/@var{N}}, then file descriptor @var{N} is checked. +If the @var{file} argument to one of the primaries is one of +@file{/dev/stdin}, @file{/dev/stdout}, or @file{/dev/stderr}, file +descriptor 0, 1, or 2, respectively, is checked. + +When used with @code{[[}, the @samp{<} and @samp{>} operators sort +lexicographically using the current locale. +The @code{test} command uses ASCII ordering. + +Unless otherwise specified, primaries that operate on files follow symbolic +links and operate on the target of the link, rather than the link itself. + +@table @code +@item -a @var{file} +True if @var{file} exists. + +@item -b @var{file} +True if @var{file} exists and is a block special file. + +@item -c @var{file} +True if @var{file} exists and is a character special file. + +@item -d @var{file} +True if @var{file} exists and is a directory. + +@item -e @var{file} +True if @var{file} exists. + +@item -f @var{file} +True if @var{file} exists and is a regular file. + +@item -g @var{file} +True if @var{file} exists and its set-group-id bit is set. + +@item -h @var{file} +True if @var{file} exists and is a symbolic link. + +@item -k @var{file} +True if @var{file} exists and its "sticky" bit is set. + +@item -p @var{file} +True if @var{file} exists and is a named pipe (FIFO). + +@item -r @var{file} +True if @var{file} exists and is readable. + +@item -s @var{file} +True if @var{file} exists and has a size greater than zero. + +@item -t @var{fd} +True if file descriptor @var{fd} is open and refers to a terminal. + +@item -u @var{file} +True if @var{file} exists and its set-user-id bit is set. + +@item -w @var{file} +True if @var{file} exists and is writable. + +@item -x @var{file} +True if @var{file} exists and is executable. + +@item -G @var{file} +True if @var{file} exists and is owned by the effective group id. + +@item -L @var{file} +True if @var{file} exists and is a symbolic link. + +@item -N @var{file} +True if @var{file} exists and has been modified since it was last read. + +@item -O @var{file} +True if @var{file} exists and is owned by the effective user id. + +@item -S @var{file} +True if @var{file} exists and is a socket. + +@item @var{file1} -ef @var{file2} +True if @var{file1} and @var{file2} refer to the same device and +inode numbers. + +@item @var{file1} -nt @var{file2} +True if @var{file1} is newer (according to modification date) +than @var{file2}, or if @var{file1} exists and @var{file2} does not. + +@item @var{file1} -ot @var{file2} +True if @var{file1} is older than @var{file2}, +or if @var{file2} exists and @var{file1} does not. + +@item -o @var{optname} +True if the shell option @var{optname} is enabled. +The list of options appears in the description of the @option{-o} +option to the @code{set} builtin (@pxref{The Set Builtin}). + +@item -v @var{varname} +True if the shell variable @var{varname} is set (has been assigned a value). + +@item -R @var{varname} +True if the shell variable @var{varname} is set and is a name reference. + +@item -z @var{string} +True if the length of @var{string} is zero. + +@item -n @var{string} +@itemx @var{string} +True if the length of @var{string} is non-zero. + +@item @var{string1} == @var{string2} +@itemx @var{string1} = @var{string2} +True if the strings are equal. +When used with the @code{[[} command, this performs pattern matching as +described above (@pxref{Conditional Constructs}). + +@samp{=} should be used with the @code{test} command for @sc{posix} conformance. + +@item @var{string1} != @var{string2} +True if the strings are not equal. + +@item @var{string1} < @var{string2} +True if @var{string1} sorts before @var{string2} lexicographically. + +@item @var{string1} > @var{string2} +True if @var{string1} sorts after @var{string2} lexicographically. + +@item @var{arg1} OP @var{arg2} +@code{OP} is one of +@samp{-eq}, @samp{-ne}, @samp{-lt}, @samp{-le}, @samp{-gt}, or @samp{-ge}. +These arithmetic binary operators return true if @var{arg1} +is equal to, not equal to, less than, less than or equal to, +greater than, or greater than or equal to @var{arg2}, +respectively. @var{Arg1} and @var{arg2} +may be positive or negative integers. +When used with the @code{[[} command, @var{Arg1} and @var{Arg2} +are evaluated as arithmetic expressions (@pxref{Shell Arithmetic}). +@end table + +@node Shell Arithmetic +@section Shell Arithmetic +@cindex arithmetic, shell +@cindex shell arithmetic +@cindex expressions, arithmetic +@cindex evaluation, arithmetic +@cindex arithmetic evaluation + +The shell allows arithmetic expressions to be evaluated, as one of +the shell expansions or by using the @code{((} compound command, the +@code{let} builtin, or the @option{-i} option to the @code{declare} builtin. + +Evaluation is done in fixed-width integers with no check for overflow, +though division by 0 is trapped and flagged as an error. +The operators and their precedence, associativity, and values +are the same as in the C language. +The following list of operators is grouped into levels of +equal-precedence operators. +The levels are listed in order of decreasing precedence. + +@table @code + +@item @var{id}++ @var{id}-- +variable post-increment and post-decrement + +@item ++@var{id} --@var{id} +variable pre-increment and pre-decrement + +@item - + +unary minus and plus + +@item ! ~ +logical and bitwise negation + +@item ** +exponentiation + +@item * / % +multiplication, division, remainder + +@item + - +addition, subtraction + +@item << >> +left and right bitwise shifts + +@item <= >= < > +comparison + +@item == != +equality and inequality + +@item & +bitwise AND + +@item ^ +bitwise exclusive OR + +@item | +bitwise OR + +@item && +logical AND + +@item || +logical OR + +@item expr ? expr : expr +conditional operator + +@item = *= /= %= += -= <<= >>= &= ^= |= +assignment + +@item expr1 , expr2 +comma +@end table + +Shell variables are allowed as operands; parameter expansion is +performed before the expression is evaluated. +Within an expression, shell variables may also be referenced by name +without using the parameter expansion syntax. +A shell variable that is null or unset evaluates to 0 when referenced +by name without using the parameter expansion syntax. +The value of a variable is evaluated as an arithmetic expression +when it is referenced, or when a variable which has been given the +@var{integer} attribute using @samp{declare -i} is assigned a value. +A null value evaluates to 0. +A shell variable need not have its @var{integer} attribute turned on +to be used in an expression. + +Integer constants follow the C language definition, without suffixes or +character constants. +Constants with a leading 0 are interpreted as octal numbers. +A leading @samp{0x} or @samp{0X} denotes hexadecimal. Otherwise, +numbers take the form [@var{base}@code{#}]@var{n}, where the optional @var{base} +is a decimal number between 2 and 64 representing the arithmetic +base, and @var{n} is a number in that base. +If @var{base}@code{#} is omitted, then base 10 is used. +When specifying @var{n}, +if a non-digit is required, +the digits greater than 9 are represented by the lowercase letters, +the uppercase letters, @samp{@@}, and @samp{_}, in that order. +If @var{base} is less than or equal to 36, lowercase and uppercase +letters may be used interchangeably to represent numbers between 10 +and 35. + +Operators are evaluated in order of precedence. Sub-expressions in +parentheses are evaluated first and may override the precedence +rules above. + +@node Aliases +@section Aliases +@cindex alias expansion + +@var{Aliases} allow a string to be substituted for a word when it is used +as the first word of a simple command. +The shell maintains a list of aliases that may be set and unset with +the @code{alias} and @code{unalias} builtin commands. + +The first word of each simple command, if unquoted, is checked to see +if it has an alias. +If so, that word is replaced by the text of the alias. +The characters @samp{/}, @samp{$}, @samp{`}, @samp{=} and any of the +shell metacharacters or quoting characters listed above may not appear +in an alias name. +The replacement text may contain any valid +shell input, including shell metacharacters. +The first word of the replacement text is tested for +aliases, but a word that is identical to an alias being expanded +is not expanded a second time. +This means that one may alias @code{ls} to @code{"ls -F"}, +for instance, and Bash does not try to recursively expand the +replacement text. +If the last character of the alias value is a +@var{blank}, then the next command word following the +alias is also checked for alias expansion. + +Aliases are created and listed with the @code{alias} +command, and removed with the @code{unalias} command. + +There is no mechanism for using arguments in the replacement text, +as in @code{csh}. +If arguments are needed, a shell function should be used +(@pxref{Shell Functions}). + +Aliases are not expanded when the shell is not interactive, +unless the @code{expand_aliases} shell option is set using +@code{shopt} (@pxref{The Shopt Builtin}). + +The rules concerning the definition and use of aliases are +somewhat confusing. Bash +always reads at least one complete line of input, +and all lines that make up a compound command, +before executing any of the commands on that line or the compound command. +Aliases are expanded when a +command is read, not when it is executed. Therefore, an +alias definition appearing on the same line as another +command does not take effect until the next line of input is read. +The commands following the alias definition +on that line are not affected by the new alias. +This behavior is also an issue when functions are executed. +Aliases are expanded when a function definition is read, +not when the function is executed, because a function definition +is itself a command. As a consequence, aliases +defined in a function are not available until after that +function is executed. To be safe, always put +alias definitions on a separate line, and do not use @code{alias} +in compound commands. + +For almost every purpose, shell functions are preferred over aliases. + +@node Arrays +@section Arrays +@cindex arrays + +Bash provides one-dimensional indexed and associative array variables. +Any variable may be used as an indexed array; +the @code{declare} builtin will explicitly declare an array. +There is no maximum +limit on the size of an array, nor any requirement that members +be indexed or assigned contiguously. +Indexed arrays are referenced using integers (including arithmetic +expressions (@pxref{Shell Arithmetic})) and are zero-based; +associative arrays use arbitrary strings. +Unless otherwise noted, indexed array indices must be non-negative integers. + +An indexed array is created automatically if any variable is assigned to +using the syntax +@example +@var{name}[@var{subscript}]=@var{value} +@end example + +@noindent +The @var{subscript} +is treated as an arithmetic expression that must evaluate to a number. +To explicitly declare an array, use +@example +declare -a @var{name} +@end example +@noindent +The syntax +@example +declare -a @var{name}[@var{subscript}] +@end example +@noindent +is also accepted; the @var{subscript} is ignored. + +@noindent +Associative arrays are created using +@example +declare -A @var{name} +@end example + +Attributes may be +specified for an array variable using the @code{declare} and +@code{readonly} builtins. Each attribute applies to all members of +an array. + +Arrays are assigned to using compound assignments of the form +@example +@var{name}=(@var{value1} @var{value2} @dots{} ) +@end example +@noindent +where each +@var{value} may be of the form @code{[@var{subscript}]=}@var{string}. +Indexed array assignments do not require anything but @var{string}. +When assigning to indexed arrays, if +the optional subscript is supplied, that index is assigned to; +otherwise the index of the element assigned is the last index assigned +to by the statement plus one. Indexing starts at zero. + +Each @var{value} in the list undergoes all the shell expansions +described above (@pxref{Shell Expansions}). + +When assigning to an associative array, the words in a compound assignment +may be either assignment statements, for which the subscript is required, +or a list of words that is interpreted as a sequence of alternating keys +and values: +@var{name}=(@var{key1} @var{value1} @var{key2} @var{value2} @dots{} ). +These are treated identically to +@var{name}=( [@var{key1}]=@var{value1} [@var{key2}]=@var{value2} @dots{} ). +The first word in the list determines how the remaining words +are interpreted; all assignments in a list must be of the same type. +When using key/value pairs, the keys may not be missing or empty; +a final missing value is treated like the empty string. + +This syntax is also accepted by the @code{declare} +builtin. Individual array elements may be assigned to using the +@code{@var{name}[@var{subscript}]=@var{value}} syntax introduced above. + +When assigning to an indexed array, if @var{name} +is subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +@var{name}, so negative indices count back from the end of the +array, and an index of -1 references the last element. + +Any element of an array may be referenced using +@code{$@{@var{name}[@var{subscript}]@}}. +The braces are required to avoid +conflicts with the shell's filename expansion operators. If the +@var{subscript} is @samp{@@} or @samp{*}, the word expands to all members +of the array @var{name}. These subscripts differ only when the word +appears within double quotes. +If the word is double-quoted, +@code{$@{@var{name}[*]@}} expands to a single word with +the value of each array member separated by the first character of the +@env{IFS} variable, and @code{$@{@var{name}[@@]@}} expands each element of +@var{name} to a separate word. When there are no array members, +@code{$@{@var{name}[@@]@}} expands to nothing. +If the double-quoted expansion occurs within a word, the expansion of +the first parameter is joined with the beginning part of the original +word, and the expansion of the last parameter is joined with the last +part of the original word. +This is analogous to the +expansion of the special parameters @samp{@@} and @samp{*}. +@code{$@{#@var{name}[@var{subscript}]@}} expands to the length of +@code{$@{@var{name}[@var{subscript}]@}}. +If @var{subscript} is @samp{@@} or +@samp{*}, the expansion is the number of elements in the array. +If the @var{subscript} +used to reference an element of an indexed array +evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the array, +so negative indices count back from the end of the array, +and an index of -1 refers to the last element. + +Referencing an array variable without a subscript is equivalent to +referencing with a subscript of 0. +Any reference to a variable using a valid subscript is legal, and +@code{bash} will create an array if necessary. + +An array variable is considered set if a subscript has been assigned a +value. The null string is a valid value. + +It is possible to obtain the keys (indices) of an array as well as the values. +$@{!@var{name}[@@]@} and $@{!@var{name}[*]@} expand to the indices +assigned in array variable @var{name}. +The treatment when in double quotes is similar to the expansion of the +special parameters @samp{@@} and @samp{*} within double quotes. + +The @code{unset} builtin is used to destroy arrays. +@code{unset @var{name}[@var{subscript}]} +destroys the array element at index @var{subscript}. +Negative subscripts to indexed arrays are interpreted as described above. +Unsetting the last element of an array variable does not unset the variable. +@code{unset @var{name}}, where @var{name} is an array, removes the +entire array. A subscript of @samp{*} or @samp{@@} also removes the +entire array. + +When using a variable name with a subscript as an argument to a command, +such as with @code{unset}, without using the word expansion syntax +described above, the argument is subject to the shell's filename expansion. +If filename expansion is not desired, the argument should be quoted. + +The @code{declare}, @code{local}, and @code{readonly} +builtins each accept a @option{-a} option to specify an indexed +array and a @option{-A} option to specify an associative array. +If both options are supplied, @option{-A} takes precedence. +The @code{read} builtin accepts a @option{-a} +option to assign a list of words read from the standard input +to an array, and can read values from the standard input into +individual array elements. The @code{set} and @code{declare} +builtins display array values in a way that allows them to be +reused as input. + +@node The Directory Stack +@section The Directory Stack +@cindex directory stack + +@menu +* Directory Stack Builtins:: Bash builtin commands to manipulate + the directory stack. +@end menu + +The directory stack is a list of recently-visited directories. The +@code{pushd} builtin adds directories to the stack as it changes +the current directory, and the @code{popd} builtin removes specified +directories from the stack and changes the current directory to +the directory removed. The @code{dirs} builtin displays the contents +of the directory stack. The current directory is always the "top" +of the directory stack. + +The contents of the directory stack are also visible +as the value of the @env{DIRSTACK} shell variable. + +@node Directory Stack Builtins +@subsection Directory Stack Builtins + +@table @code + +@item dirs +@btindex dirs +@example +dirs [-clpv] [+@var{N} | -@var{N}] +@end example + +Display the list of currently remembered directories. Directories +are added to the list with the @code{pushd} command; the +@code{popd} command removes directories from the list. +The current directory is always the first directory in the stack. + +@table @code +@item -c +Clears the directory stack by deleting all of the elements. +@item -l +Produces a listing using full pathnames; +the default listing format uses a tilde to denote the home directory. +@item -p +Causes @code{dirs} to print the directory stack with one entry per +line. +@item -v +Causes @code{dirs} to print the directory stack with one entry per +line, prefixing each entry with its index in the stack. +@item +@var{N} +Displays the @var{N}th directory (counting from the left of the +list printed by @code{dirs} when invoked without options), starting +with zero. +@item -@var{N} +Displays the @var{N}th directory (counting from the right of the +list printed by @code{dirs} when invoked without options), starting +with zero. +@end table + +@item popd +@btindex popd +@example +popd [-n] [+@var{N} | -@var{N}] +@end example + +When no arguments are given, @code{popd} +removes the top directory from the stack and +performs a @code{cd} to the new top directory. +The elements are numbered from 0 starting at the first directory +listed with @code{dirs}; that is, @code{popd} is equivalent to @code{popd +0}. + +@table @code +@item -n +Suppresses the normal change of directory when removing directories +from the stack, so that only the stack is manipulated. +@item +@var{N} +Removes the @var{N}th directory (counting from the left of the +list printed by @code{dirs}), starting with zero. +@item -@var{N} +Removes the @var{N}th directory (counting from the right of the +list printed by @code{dirs}), starting with zero. +@end table + +@btindex pushd +@item pushd +@example +pushd [-n] [@var{+N} | @var{-N} | @var{dir}] +@end example + +Save the current directory on the top of the directory stack +and then @code{cd} to @var{dir}. +With no arguments, @code{pushd} exchanges the top two directories +and makes the new top the current directory. + +@table @code +@item -n +Suppresses the normal change of directory when rotating or +adding directories to the stack, so that only the stack is manipulated. +@item +@var{N} +Brings the @var{N}th directory (counting from the left of the +list printed by @code{dirs}, starting with zero) to the top of +the list by rotating the stack. +@item -@var{N} +Brings the @var{N}th directory (counting from the right of the +list printed by @code{dirs}, starting with zero) to the top of +the list by rotating the stack. +@item @var{dir} +Makes @var{dir} be the top of the stack, making +it the new current directory as if it had been supplied as an argument +to the @code{cd} builtin. +@end table +@end table + +@node Controlling the Prompt +@section Controlling the Prompt +@cindex prompting + +Bash examines the value of the array variable @env{PROMPT_COMMANDS} just before +printing each primary prompt. +If any elements in @env{PROMPT_COMMANDS} are set and non-null, Bash +executes each value, in numeric order, +just as if it had been typed on the command line. + +In addition, the following table describes the special characters which +can appear in the prompt variables @env{PS0}, @env{PS1}, @env{PS2}, and +@env{PS4}: + +@table @code +@item \a +A bell character. +@item \d +The date, in "Weekday Month Date" format (e.g., "Tue May 26"). +@item \D@{@var{format}@} +The @var{format} is passed to @code{strftime}(3) and the result is inserted +into the prompt string; an empty @var{format} results in a locale-specific +time representation. The braces are required. +@item \e +An escape character. +@item \h +The hostname, up to the first `.'. +@item \H +The hostname. +@item \j +The number of jobs currently managed by the shell. +@item \l +The basename of the shell's terminal device name. +@item \n +A newline. +@item \r +A carriage return. +@item \s +The name of the shell, the basename of @code{$0} (the portion +following the final slash). +@item \t +The time, in 24-hour HH:MM:SS format. +@item \T +The time, in 12-hour HH:MM:SS format. +@item \@@ +The time, in 12-hour am/pm format. +@item \A +The time, in 24-hour HH:MM format. +@item \u +The username of the current user. +@item \v +The version of Bash (e.g., 2.00) +@item \V +The release of Bash, version + patchlevel (e.g., 2.00.0) +@item \w +The current working directory, with @env{$HOME} abbreviated with a tilde +(uses the @env{$PROMPT_DIRTRIM} variable). +@item \W +The basename of @env{$PWD}, with @env{$HOME} abbreviated with a tilde. +@item \! +The history number of this command. +@item \# +The command number of this command. +@item \$ +If the effective uid is 0, @code{#}, otherwise @code{$}. +@item \@var{nnn} +The character whose ASCII code is the octal value @var{nnn}. +@item \\ +A backslash. +@item \[ +Begin a sequence of non-printing characters. This could be used to +embed a terminal control sequence into the prompt. +@item \] +End a sequence of non-printing characters. +@end table + +The command number and the history number are usually different: +the history number of a command is its position in the history +list, which may include commands restored from the history file +(@pxref{Bash History Facilities}), while the command number is +the position in the sequence of commands executed during the current +shell session. + +After the string is decoded, it is expanded via +parameter expansion, command substitution, arithmetic +expansion, and quote removal, subject to the value of the +@code{promptvars} shell option (@pxref{The Shopt Builtin}). +This can have unwanted side effects if escaped portions of the string +appear within command substitution or contain characters special to +word expansion. + +@node The Restricted Shell +@section The Restricted Shell +@cindex restricted shell + +If Bash is started with the name @code{rbash}, or the +@option{--restricted} +or +@option{-r} +option is supplied at invocation, the shell becomes restricted. +A restricted shell is used to +set up an environment more controlled than the standard shell. +A restricted shell behaves identically to @code{bash} +with the exception that the following are disallowed or not performed: + +@itemize @bullet +@item +Changing directories with the @code{cd} builtin. +@item +Setting or unsetting the values of the @env{SHELL}, @env{PATH}, +@env{HISTFILE}, +@env{ENV}, or @env{BASH_ENV} variables. +@item +Specifying command names containing slashes. +@item +Specifying a filename containing a slash as an argument to the @code{.} +builtin command. +@item +Specifying a filename containing a slash as an argument to the @code{history} +builtin command. +@item +Specifying a filename containing a slash as an argument to the @option{-p} +option to the @code{hash} builtin command. +@item +Importing function definitions from the shell environment at startup. +@item +Parsing the value of @env{SHELLOPTS} from the shell environment at startup. +@item +Redirecting output using the @samp{>}, @samp{>|}, @samp{<>}, @samp{>&}, +@samp{&>}, and @samp{>>} redirection operators. +@item +Using the @code{exec} builtin to replace the shell with another command. +@item +Adding or deleting builtin commands with the +@option{-f} and @option{-d} options to the @code{enable} builtin. +@item +Using the @code{enable} builtin command to enable disabled shell builtins. +@item +Specifying the @option{-p} option to the @code{command} builtin. +@item +Turning off restricted mode with @samp{set +r} or @samp{set +o restricted}. +@end itemize + +These restrictions are enforced after any startup files are read. + +When a command that is found to be a shell script is executed +(@pxref{Shell Scripts}), @code{rbash} turns off any restrictions in +the shell spawned to execute the script. + +The restricted shell mode is only one component of a useful restricted +environment. It should be accompanied by setting @env{PATH} to a value +that allows execution of only a few verified commands (commands that +allow shell escapes are particularly vulnerable), leaving the user +in a non-writable directory other than his home directory after login, +not allowing the restricted shell to execute shell scripts, and cleaning +the environment of variables that cause some commands to modify their +behavior (e.g., @env{VISUAL} or @env{PAGER}). + +Modern systems provide more secure ways to implement a restricted environment, +such as @code{jails}, @code{zones}, or @code{containers}. + + +@node Bash POSIX Mode +@section Bash POSIX Mode +@cindex POSIX Mode + +Starting Bash with the @option{--posix} command-line option or executing +@samp{set -o posix} while Bash is running will cause Bash to conform more +closely to the @sc{posix} standard by changing the behavior to +match that specified by @sc{posix} in areas where the Bash default differs. + +When invoked as @code{sh}, Bash enters @sc{posix} mode after reading the +startup files. + +The following list is what's changed when `@sc{posix} mode' is in effect: + +@enumerate +@item +Bash ensures that the @env{POSIXLY_CORRECT} variable is set. + +@item +When a command in the hash table no longer exists, Bash will re-search +@env{$PATH} to find the new location. This is also available with +@samp{shopt -s checkhash}. + +@item +Bash will not insert a command without the execute bit set into the +command hash table, even if it returns it as a (last-ditch) result +from a @env{$PATH} search. + +@item +The message printed by the job control code and builtins when a job +exits with a non-zero status is `Done(status)'. + +@item +The message printed by the job control code and builtins when a job +is stopped is `Stopped(@var{signame})', where @var{signame} is, for +example, @code{SIGTSTP}. + +@item +Alias expansion is always enabled, even in non-interactive shells. + +@item +Reserved words appearing in a context where reserved words are recognized +do not undergo alias expansion. + +@item +The @sc{posix} @env{PS1} and @env{PS2} expansions of @samp{!} to +the history number and @samp{!!} to @samp{!} are enabled, +and parameter expansion is performed on the values of @env{PS1} and +@env{PS2} regardless of the setting of the @code{promptvars} option. + +@item +The @sc{posix} startup files are executed (@env{$ENV}) rather than +the normal Bash files. + +@item +Tilde expansion is only performed on assignments preceding a command +name, rather than on all assignment statements on the line. + +@item +The default history file is @file{~/.sh_history} (this is the +default value of @env{$HISTFILE}). + +@item +Redirection operators do not perform filename expansion on the word +in the redirection unless the shell is interactive. + +@item +Redirection operators do not perform word splitting on the word in the +redirection. + +@item +Function names must be valid shell @code{name}s. That is, they may not +contain characters other than letters, digits, and underscores, and +may not start with a digit. Declaring a function with an invalid name +causes a fatal syntax error in non-interactive shells. + +@item +Function names may not be the same as one of the @sc{posix} special +builtins. + +@item +@sc{posix} special builtins are found before shell functions +during command lookup. + +@item +When printing shell function definitions (e.g., by @code{type}), Bash does +not print the @code{function} keyword. + +@item +Literal tildes that appear as the first character in elements of +the @env{PATH} variable are not expanded as described above +under @ref{Tilde Expansion}. + +@item +The @code{time} reserved word may be used by itself as a command. When +used in this way, it displays timing statistics for the shell and its +completed children. The @env{TIMEFORMAT} variable controls the format +of the timing information. + +@item +When parsing and expanding a $@{@dots{}@} expansion that appears within +double quotes, single quotes are no longer special and cannot be used to +quote a closing brace or other special character, unless the operator is +one of those defined to perform pattern removal. In this case, they do +not have to appear as matched pairs. + +@item +The parser does not recognize @code{time} as a reserved word if the next +token begins with a @samp{-}. + +@ignore +@item +When parsing @code{$()} command substitutions containing here-documents, +the parser does not allow a here-document to be delimited by the closing +right parenthesis. The newline after the here-document delimiter is required. +@end ignore + +@item +The @samp{!} character does not introduce history expansion within a +double-quoted string, even if the @code{histexpand} option is enabled. + +@item +If a @sc{posix} special builtin returns an error status, a +non-interactive shell exits. The fatal errors are those listed in +the @sc{posix} standard, and include things like passing incorrect options, +redirection errors, variable assignment errors for assignments preceding +the command name, and so on. + +@item +A non-interactive shell exits with an error status if a variable +assignment error occurs when no command name follows the assignment +statements. +A variable assignment error occurs, for example, when trying to assign +a value to a readonly variable. + +@item +A non-interactive shell exits with an error status if a variable +assignment error occurs in an assignment statement preceding a special +builtin, but not with any other simple command. + +@item +A non-interactive shell exits with an error status if the iteration +variable in a @code{for} statement or the selection variable in a +@code{select} statement is a readonly variable. + +@item +Non-interactive shells exit if @var{filename} in @code{.} @var{filename} +is not found. + +@item +Non-interactive shells exit if a syntax error in an arithmetic expansion +results in an invalid expression. + +@item +Non-interactive shells exit if a parameter expansion error occurs. + +@item +Non-interactive shells exit if there is a syntax error in a script read +with the @code{.} or @code{source} builtins, or in a string processed by +the @code{eval} builtin. + +@item +While variable indirection is available, it may not be applied to the +@samp{#} and @samp{?} special parameters. + +@item +When expanding the @samp{*} special parameter in a pattern context where the +expansion is double-quoted does not treat the @code{$*} as if it were +double-quoted. + +@item +Assignment statements preceding @sc{posix} special builtins +persist in the shell environment after the builtin completes. + +@item +The @code{command} builtin does not prevent builtins that take assignment +statements as arguments from expanding them as assignment statements; +when not in @sc{posix} mode, assignment builtins lose their assignment +statement expansion properties when preceded by @code{command}. + +@item +The @code{bg} builtin uses the required format to describe each job placed +in the background, which does not include an indication of whether the job +is the current or previous job. + +@item +The output of @samp{kill -l} prints all the signal names on a single line, +separated by spaces, without the @samp{SIG} prefix. + +@item +The @code{kill} builtin does not accept signal names with a @samp{SIG} +prefix. + +@item +The @code{export} and @code{readonly} builtin commands display their +output in the format required by @sc{posix}. + +@item +The @code{trap} builtin displays signal names without the leading +@code{SIG}. + +@item +The @code{trap} builtin doesn't check the first argument for a possible +signal specification and revert the signal handling to the original +disposition if it is, unless that argument consists solely of digits and +is a valid signal number. If users want to reset the handler for a given +signal to the original disposition, they should use @samp{-} as the +first argument. + +@item +@code{trap -p} displays signals whose dispositions are set to SIG_DFL and +those that were ignored when the shell started. + +@item +The @code{.} and @code{source} builtins do not search the current directory +for the filename argument if it is not found by searching @env{PATH}. + +@item +Enabling @sc{posix} mode has the effect of setting the +@code{inherit_errexit} option, so +subshells spawned to execute command substitutions inherit the value of +the @option{-e} option from the parent shell. +When the @code{inherit_errexit} option is not enabled, +Bash clears the @option{-e} option in such subshells. + +@item +Enabling @sc{posix} mode has the effect of setting the +@code{shift_verbose} option, so numeric arguments to @code{shift} +that exceed the number of positional parameters will result in an +error message. + +@item +When the @code{alias} builtin displays alias definitions, it does not +display them with a leading @samp{alias } unless the @option{-p} option +is supplied. + +@item +When the @code{set} builtin is invoked without options, it does not display +shell function names and definitions. + +@item +When the @code{set} builtin is invoked without options, it displays +variable values without quotes, unless they contain shell metacharacters, +even if the result contains nonprinting characters. + +@item +When the @code{cd} builtin is invoked in @var{logical} mode, and the pathname +constructed from @code{$PWD} and the directory name supplied as an argument +does not refer to an existing directory, @code{cd} will fail instead of +falling back to @var{physical} mode. + +@item +When the @code{cd} builtin cannot change a directory because the +length of the pathname +constructed from @code{$PWD} and the directory name supplied as an argument +exceeds @var{PATH_MAX} when all symbolic links are expanded, @code{cd} will +fail instead of attempting to use only the supplied directory name. + +@item +The @code{pwd} builtin verifies that the value it prints is the same as the +current directory, even if it is not asked to check the file system with the +@option{-P} option. + +@item +When listing the history, the @code{fc} builtin does not include an +indication of whether or not a history entry has been modified. + +@item +The default editor used by @code{fc} is @code{ed}. + +@item +The @code{type} and @code{command} builtins will not report a non-executable +file as having been found, though the shell will attempt to execute such a +file if it is the only so-named file found in @code{$PATH}. + +@item +The @code{vi} editing mode will invoke the @code{vi} editor directly when +the @samp{v} command is run, instead of checking @code{$VISUAL} and +@code{$EDITOR}. + +@item +When the @code{xpg_echo} option is enabled, Bash does not attempt to interpret +any arguments to @code{echo} as options. Each argument is displayed, after +escape characters are converted. + +@item +The @code{ulimit} builtin uses a block size of 512 bytes for the @option{-c} +and @option{-f} options. + +@item +The arrival of @code{SIGCHLD} when a trap is set on @code{SIGCHLD} does +not interrupt the @code{wait} builtin and cause it to return immediately. +The trap command is run once for each child that exits. + +@item +The @code{read} builtin may be interrupted by a signal for which a trap +has been set. +If Bash receives a trapped signal while executing @code{read}, the trap +handler executes and @code{read} returns an exit status greater than 128. + +@item +Bash removes an exited background process's status from the list of such +statuses after the @code{wait} builtin is used to obtain it. + +@end enumerate + +There is other @sc{posix} behavior that Bash does not implement by +default even when in @sc{posix} mode. +Specifically: + +@enumerate + +@item +The @code{fc} builtin checks @code{$EDITOR} as a program to edit history +entries if @code{FCEDIT} is unset, rather than defaulting directly to +@code{ed}. @code{fc} uses @code{ed} if @code{EDITOR} is unset. + +@item +As noted above, Bash requires the @code{xpg_echo} option to be enabled for +the @code{echo} builtin to be fully conformant. + +@end enumerate + +Bash can be configured to be @sc{posix}-conformant by default, by specifying +the @option{--enable-strict-posix-default} to @code{configure} when building +(@pxref{Optional Features}). + +@node Shell Compatibility Mode +@section Shell Compatibility Mode +@cindex Compatibility Level +@cindex Compatibility Mode + +Bash-4.0 introduced the concept of a `shell compatibility level', specified +as a set of options to the shopt builtin +(@code{compat31}, +@code{compat32}, +@code{compat40}, +@code{compat41}, +and so on). +There is only one current +compatibility level -- each option is mutually exclusive. +The compatibility level is intended to allow users to select behavior +from previous versions that is incompatible with newer versions +while they migrate scripts to use current features and +behavior. It's intended to be a temporary solution. + +This section does not mention behavior that is standard for a particular +version (e.g., setting @code{compat32} means that quoting the rhs of the regexp +matching operator quotes special regexp characters in the word, which is +default behavior in bash-3.2 and above). + +If a user enables, say, @code{compat32}, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed +in that version of Bash, +but that behavior may have been present in earlier versions. +For instance, the change to use locale-based comparisons with the @code{[[} +command came in bash-4.1, and earlier versions used ASCII-based comparisons, +so enabling @code{compat32} will enable ASCII-based comparisons as well. +That granularity may not be sufficient for +all uses, and as a result users should employ compatibility levels carefully. +Read the documentation for a particular feature to find out the +current behavior. + +Bash-4.3 introduced a new shell variable: @env{BASH_COMPAT}. +The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the @code{compat}@var{NN} option, like 42) determines the +compatibility level. + +Starting with bash-4.4, Bash has begun deprecating older compatibility +levels. +Eventually, the options will be removed in favor of @env{BASH_COMPAT}. + +Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use @env{BASH_COMPAT} +on bash-5.0 and later versions. + +The following table describes the behavior changes controlled by each +compatibility level setting. +The @code{compat}@var{NN} tag is used as shorthand for setting the +compatibility level +to @var{NN} using one of the following mechanisms. +For versions prior to bash-5.0, the compatibility level may be set using +the corresponding @code{compat}@var{NN} shopt option. +For bash-4.3 and later versions, the @env{BASH_COMPAT} variable is preferred, +and it is required for bash-5.1 and later versions. + +@table @code +@item compat31 +@itemize @bullet +@item +quoting the rhs of the @code{[[} command's regexp matching operator (=~) +has no special effect +@end itemize + +@item compat32 +@itemize @bullet +@item +interrupting a command list such as "a ; b ; c" causes the execution +of the next command in the list (in bash-4.0 and later versions, +the shell acts as if it received the interrupt, so +interrupting one command in a list aborts the execution of the +entire list) +@end itemize + +@item compat40 +@itemize @bullet +@item +the @samp{<} and @samp{>} operators to the @code{[[} command do not +consider the current locale when comparing strings; they use ASCII +ordering. +Bash versions prior to bash-4.1 use ASCII collation and strcmp(3); +bash-4.1 and later use the current locale's collation sequence and +strcoll(3). +@end itemize + +@item compat41 +@itemize @bullet +@item +in posix mode, @code{time} may be followed by options and still be +recognized as a reserved word (this is @sc{posix} interpretation 267) +@item +in posix mode, the parser requires that an even number of single +quotes occur in the @var{word} portion of a double-quoted $@{@dots{}@} +parameter expansion and treats them specially, so that characters within +the single quotes are considered quoted +(this is @sc{posix} interpretation 221) +@end itemize + +@item compat42 +@itemize @bullet +@item +the replacement string in double-quoted pattern substitution does not +undergo quote removal, as it does in versions after bash-4.2 +@item +in posix mode, single quotes are considered special when expanding +the @var{word} portion of a double-quoted $@{@dots{}@} parameter expansion +and can be used to quote a closing brace or other special character +(this is part of @sc{posix} interpretation 221); +in later versions, single quotes +are not special within double-quoted word expansions +@end itemize + +@item compat43 +@itemize @bullet +@item +the shell does not print a warning message if an attempt is made to +use a quoted compound assignment as an argument to declare +(declare -a foo='(1 2)'). Later versions warn that this usage is +deprecated +@item +word expansion errors are considered non-fatal errors that cause the +current command to fail, even in posix mode +(the default behavior is to make them fatal errors that cause the shell +to exit) +@item +when executing a shell function, the loop state (while/until/etc.) +is not reset, so @code{break} or @code{continue} in that function will break +or continue loops in the calling context. Bash-4.4 and later reset +the loop state to prevent this +@end itemize + +@item compat44 +@itemize @bullet +@item +the shell sets up the values used by @env{BASH_ARGV} and @env{BASH_ARGC} +so they can expand to the shell's positional parameters even if extended +debugging mode is not enabled +@item +a subshell inherits loops from its parent context, so @code{break} +or @code{continue} will cause the subshell to exit. +Bash-5.0 and later reset the loop state to prevent the exit +@item +variable assignments preceding builtins like @code{export} and @code{readonly} +that set attributes continue to affect variables with the same +name in the calling environment even if the shell is not in posix +mode +@end itemize + +@item compat50 (set using BASH_COMPAT) +@itemize @bullet +@item +Bash-5.1 changed the way @code{$RANDOM} is generated to introduce slightly +more randomness. If the shell compatibility level is set to 50 or +lower, it reverts to the method from bash-5.0 and previous versions, +so seeding the random number generator by assigning a value to +@env{RANDOM} will produce the same sequence as in bash-5.0 +@item +If the command hash table is empty, Bash versions prior to bash-5.1 +printed an informational message to that effect, even when producing +output that can be reused as input. Bash-5.1 suppresses that message +when the @option{-l} option is supplied. +@end itemize +@end table + +@node Job Control +@chapter Job Control + +This chapter discusses what job control is, how it works, and how +Bash allows you to access its facilities. + +@menu +* Job Control Basics:: How job control works. +* Job Control Builtins:: Bash builtin commands used to interact + with job control. +* Job Control Variables:: Variables Bash uses to customize job + control. +@end menu + +@node Job Control Basics +@section Job Control Basics +@cindex job control +@cindex foreground +@cindex background +@cindex suspending jobs + +Job control +refers to the ability to selectively stop (suspend) +the execution of processes and continue (resume) +their execution at a later point. A user typically employs +this facility via an interactive interface supplied jointly +by the operating system kernel's terminal driver and Bash. + +The shell associates a @var{job} with each pipeline. It keeps a +table of currently executing jobs, which may be listed with the +@code{jobs} command. When Bash starts a job +asynchronously, it prints a line that looks +like: +@example +[1] 25647 +@end example +@noindent +indicating that this job is job number 1 and that the process @sc{id} +of the last process in the pipeline associated with this job is +25647. All of the processes in a single pipeline are members of +the same job. Bash uses the @var{job} abstraction as the +basis for job control. + +To facilitate the implementation of the user interface to job +control, the operating system maintains the notion of a current terminal +process group @sc{id}. Members of this process group (processes whose +process group @sc{id} is equal to the current terminal process group +@sc{id}) receive keyboard-generated signals such as @code{SIGINT}. +These processes are said to be in the foreground. Background +processes are those whose process group @sc{id} differs from the +terminal's; such processes are immune to keyboard-generated +signals. Only foreground processes are allowed to read from or, if +the user so specifies with @code{stty tostop}, write to the terminal. +Background processes which attempt to +read from (write to when @code{stty tostop} is in effect) the +terminal are sent a @code{SIGTTIN} (@code{SIGTTOU}) +signal by the kernel's terminal driver, +which, unless caught, suspends the process. + +If the operating system on which Bash is running supports +job control, Bash contains facilities to use it. Typing the +@var{suspend} character (typically @samp{^Z}, Control-Z) while a +process is running causes that process to be stopped and returns +control to Bash. Typing the @var{delayed suspend} character +(typically @samp{^Y}, Control-Y) causes the process to be stopped +when it attempts to read input from the terminal, and control to +be returned to Bash. The user then manipulates the state of +this job, using the @code{bg} command to continue it in the +background, the @code{fg} command to continue it in the +foreground, or the @code{kill} command to kill it. A @samp{^Z} +takes effect immediately, and has the additional side effect of +causing pending output and typeahead to be discarded. + +There are a number of ways to refer to a job in the shell. The +character @samp{%} introduces a job specification (@var{jobspec}). + +Job number @code{n} may be referred to as @samp{%n}. +The symbols @samp{%%} and @samp{%+} refer to the shell's notion of the +current job, which is the last job stopped while it was in the foreground +or started in the background. +A single @samp{%} (with no accompanying job specification) also refers +to the current job. +The previous job may be referenced using @samp{%-}. +If there is only a single job, @samp{%+} and @samp{%-} can both be used +to refer to that job. +In output pertaining to jobs (e.g., the output of the @code{jobs} +command), the current job is always flagged with a @samp{+}, and the +previous job with a @samp{-}. + +A job may also be referred to +using a prefix of the name used to start it, or using a substring +that appears in its command line. For example, @samp{%ce} refers +to a stopped job whose command name begins with @samp{ce}. +Using @samp{%?ce}, on the +other hand, refers to any job containing the string @samp{ce} in +its command line. If the prefix or substring matches more than one job, +Bash reports an error. + +Simply naming a job can be used to bring it into the foreground: +@samp{%1} is a synonym for @samp{fg %1}, bringing job 1 from the +background into the foreground. Similarly, @samp{%1 &} resumes +job 1 in the background, equivalent to @samp{bg %1} + +The shell learns immediately whenever a job changes state. +Normally, Bash waits until it is about to print a prompt +before reporting changes in a job's status so as to not interrupt +any other output. +If the @option{-b} option to the @code{set} builtin is enabled, +Bash reports such changes immediately (@pxref{The Set Builtin}). +Any trap on @code{SIGCHLD} is executed for each child process +that exits. + +If an attempt to exit Bash is made while jobs are stopped, (or running, if +the @code{checkjobs} option is enabled -- see @ref{The Shopt Builtin}), the +shell prints a warning message, and if the @code{checkjobs} option is +enabled, lists the jobs and their statuses. +The @code{jobs} command may then be used to inspect their status. +If a second attempt to exit is made without an intervening command, +Bash does not print another warning, and any stopped jobs are terminated. + +When the shell is waiting for a job or process using the @code{wait} +builtin, and job control is enabled, @code{wait} will return when the +job changes state. The @option{-f} option causes @code{wait} to wait +until the job or process terminates before returning. + +@node Job Control Builtins +@section Job Control Builtins + +@table @code + +@item bg +@btindex bg +@example +bg [@var{jobspec} @dots{}] +@end example + +Resume each suspended job @var{jobspec} in the background, as if it +had been started with @samp{&}. +If @var{jobspec} is not supplied, the current job is used. +The return status is zero unless it is run when job control is not +enabled, or, when run with job control enabled, any +@var{jobspec} was not found or specifies a job +that was started without job control. + +@item fg +@btindex fg +@example +fg [@var{jobspec}] +@end example + +Resume the job @var{jobspec} in the foreground and make it the current job. +If @var{jobspec} is not supplied, the current job is used. +The return status is that of the command placed into the foreground, +or non-zero if run when job control is disabled or, when run with +job control enabled, @var{jobspec} does not specify a valid job or +@var{jobspec} specifies a job that was started without job control. + +@item jobs +@btindex jobs +@example +jobs [-lnprs] [@var{jobspec}] +jobs -x @var{command} [@var{arguments}] +@end example + +The first form lists the active jobs. The options have the +following meanings: + +@table @code +@item -l +List process @sc{id}s in addition to the normal information. + +@item -n +Display information only about jobs that have changed status since +the user was last notified of their status. + +@item -p +List only the process @sc{id} of the job's process group leader. + +@item -r +Display only running jobs. + +@item -s +Display only stopped jobs. +@end table + +If @var{jobspec} is given, +output is restricted to information about that job. +If @var{jobspec} is not supplied, the status of all jobs is +listed. + +If the @option{-x} option is supplied, @code{jobs} replaces any +@var{jobspec} found in @var{command} or @var{arguments} with the +corresponding process group @sc{id}, and executes @var{command}, +passing it @var{argument}s, returning its exit status. + +@item kill +@btindex kill +@example +kill [-s @var{sigspec}] [-n @var{signum}] [-@var{sigspec}] @var{jobspec} or @var{pid} +kill -l|-L [@var{exit_status}] +@end example + +Send a signal specified by @var{sigspec} or @var{signum} to the process +named by job specification @var{jobspec} or process @sc{id} @var{pid}. +@var{sigspec} is either a case-insensitive signal name such as +@code{SIGINT} (with or without the @code{SIG} prefix) +or a signal number; @var{signum} is a signal number. +If @var{sigspec} and @var{signum} are not present, @code{SIGTERM} is used. +The @option{-l} option lists the signal names. +If any arguments are supplied when @option{-l} is given, the names of the +signals corresponding to the arguments are listed, and the return status +is zero. +@var{exit_status} is a number specifying a signal number or the exit +status of a process terminated by a signal. +The @option{-L} option is equivalent to @option{-l}. +The return status is zero if at least one signal was successfully sent, +or non-zero if an error occurs or an invalid option is encountered. + +@item wait +@btindex wait +@example +wait [-fn] [-p @var{varname}] [@var{jobspec} or @var{pid} @dots{}] +@end example + +Wait until the child process specified by each process @sc{id} @var{pid} +or job specification @var{jobspec} exits and return the exit status of the +last command waited for. +If a job spec is given, all processes in the job are waited for. +If no arguments are given, +@code{wait} waits for all running background jobs and +the last-executed process substitution, if its process id is the same as +@var{$!}, +and the return status is zero. +If the @option{-n} option is supplied, @code{wait} waits for a single job +from the list of @var{pids} or @var{jobspecs} or, if no arguments are +supplied, any job, +to complete and returns its exit status. +If none of the supplied arguments is a child of the shell, or if no arguments +are supplied and the shell has no unwaited-for children, the exit status +is 127. +If the @option{-p} option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable +@var{varname} named by the option argument. +The variable will be unset initially, before any assignment. +This is useful only when the @option{-n} option is supplied. +Supplying the @option{-f} option, when job control is enabled, +forces @code{wait} to wait for each @var{pid} or @var{jobspec} to +terminate before returning its status, intead of returning when it changes +status. +If neither @var{jobspec} nor @var{pid} specifies an active child process +of the shell, the return status is 127. + +@item disown +@btindex disown +@example +disown [-ar] [-h] [@var{jobspec} @dots{} | @var{pid} @dots{} ] +@end example + +Without options, remove each @var{jobspec} from the table of +active jobs. +If the @option{-h} option is given, the job is not removed from the table, +but is marked so that @code{SIGHUP} is not sent to the job if the shell +receives a @code{SIGHUP}. +If @var{jobspec} is not present, and neither the @option{-a} nor the +@option{-r} option is supplied, the current job is used. +If no @var{jobspec} is supplied, the @option{-a} option means to remove or +mark all jobs; the @option{-r} option without a @var{jobspec} +argument restricts operation to running jobs. + +@item suspend +@btindex suspend +@example +suspend [-f] +@end example + +Suspend the execution of this shell until it receives a +@code{SIGCONT} signal. +A login shell cannot be suspended; the @option{-f} +option can be used to override this and force the suspension. +@end table + +When job control is not active, the @code{kill} and @code{wait} +builtins do not accept @var{jobspec} arguments. They must be +supplied process @sc{id}s. + +@node Job Control Variables +@section Job Control Variables + +@vtable @code + +@item auto_resume +This variable controls how the shell interacts with the user and +job control. If this variable exists then single word simple +commands without redirections are treated as candidates for resumption +of an existing job. There is no ambiguity allowed; if there is +more than one job beginning with the string typed, then +the most recently accessed job will be selected. +The name of a stopped job, in this context, is the command line +used to start it. If this variable is set to the value @samp{exact}, +the string supplied must match the name of a stopped job exactly; +if set to @samp{substring}, +the string supplied needs to match a substring of the name of a +stopped job. The @samp{substring} value provides functionality +analogous to the @samp{%?} job @sc{id} (@pxref{Job Control Basics}). +If set to any other value, the supplied string must +be a prefix of a stopped job's name; this provides functionality +analogous to the @samp{%} job @sc{id}. + +@end vtable + +@set readline-appendix +@set history-appendix +@cindex Readline, how to use +@include rluser.texi +@cindex History, how to use +@include hsuser.texi +@clear readline-appendix +@clear history-appendix + +@node Installing Bash +@chapter Installing Bash + +This chapter provides basic instructions for installing Bash on +the various supported platforms. The distribution supports the +@sc{gnu} operating systems, nearly every version of Unix, and several +non-Unix systems such as BeOS and Interix. +Other independent ports exist for +@sc{ms-dos}, @sc{os/2}, and Windows platforms. + +@menu +* Basic Installation:: Installation instructions. +* Compilers and Options:: How to set special options for various + systems. +* Compiling For Multiple Architectures:: How to compile Bash for more + than one kind of system from + the same source tree. +* Installation Names:: How to set the various paths used by the installation. +* Specifying the System Type:: How to configure Bash for a particular system. +* Sharing Defaults:: How to share default configuration values among GNU + programs. +* Operation Controls:: Options recognized by the configuration program. +* Optional Features:: How to enable and disable optional features when + building Bash. +@end menu + +@node Basic Installation +@section Basic Installation +@cindex installation +@cindex configuration +@cindex Bash installation +@cindex Bash configuration + +These are installation instructions for Bash. + +The simplest way to compile Bash is: + +@enumerate +@item +@code{cd} to the directory containing the source code and type +@samp{./configure} to configure Bash for your system. If you're +using @code{csh} on an old version of System V, you might need to +type @samp{sh ./configure} instead to prevent @code{csh} from trying +to execute @code{configure} itself. + +Running @code{configure} takes some time. +While running, it prints messages telling which features it is +checking for. + +@item +Type @samp{make} to compile Bash and build the @code{bashbug} bug +reporting script. + +@item +Optionally, type @samp{make tests} to run the Bash test suite. + +@item +Type @samp{make install} to install @code{bash} and @code{bashbug}. +This will also install the manual pages and Info file. + +@end enumerate + +The @code{configure} shell script attempts to guess correct +values for various system-dependent variables used during +compilation. It uses those values to create a @file{Makefile} in +each directory of the package (the top directory, the +@file{builtins}, @file{doc}, and @file{support} directories, +each directory under @file{lib}, and several others). It also creates a +@file{config.h} file containing system-dependent definitions. +Finally, it creates a shell script named @code{config.status} that you +can run in the future to recreate the current configuration, a +file @file{config.cache} that saves the results of its tests to +speed up reconfiguring, and a file @file{config.log} containing +compiler output (useful mainly for debugging @code{configure}). +If at some point +@file{config.cache} contains results you don't want to keep, you +may remove or edit it. + +To find out more about the options and arguments that the +@code{configure} script understands, type + +@example +bash-4.2$ ./configure --help +@end example + +@noindent +at the Bash prompt in your Bash source directory. + +If you want to build Bash in a directory separate from the source +directory -- to build for multiple architectures, for example -- +just use the full path to the configure script. The following commands +will build bash in a directory under @file{/usr/local/build} from +the source code in @file{/usr/local/src/bash-4.4}: + +@example +mkdir /usr/local/build/bash-4.4 +cd /usr/local/build/bash-4.4 +bash /usr/local/src/bash-4.4/configure +make +@end example + +See @ref{Compiling For Multiple Architectures} for more information +about building in a directory separate from the source. + +If you need to do unusual things to compile Bash, please +try to figure out how @code{configure} could check whether or not +to do them, and mail diffs or instructions to +@email{bash-maintainers@@gnu.org} so they can be +considered for the next release. + +The file @file{configure.ac} is used to create @code{configure} +by a program called Autoconf. You only need +@file{configure.ac} if you want to change it or regenerate +@code{configure} using a newer version of Autoconf. If +you do this, make sure you are using Autoconf version 2.50 or +newer. + +You can remove the program binaries and object files from the +source code directory by typing @samp{make clean}. To also remove the +files that @code{configure} created (so you can compile Bash for +a different kind of computer), type @samp{make distclean}. + +@node Compilers and Options +@section Compilers and Options + +Some systems require unusual options for compilation or linking +that the @code{configure} script does not know about. You can +give @code{configure} initial values for variables by setting +them in the environment. Using a Bourne-compatible shell, you +can do that on the command line like this: + +@example +CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure +@end example + +On systems that have the @code{env} program, you can do it like this: + +@example +env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure +@end example + +The configuration process uses GCC to build Bash if it +is available. + +@node Compiling For Multiple Architectures +@section Compiling For Multiple Architectures + +You can compile Bash for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of @code{make} that +supports the @code{VPATH} variable, such as GNU @code{make}. +@code{cd} to the +directory where you want the object files and executables to go and run +the @code{configure} script from the source directory +(@pxref{Basic Installation}). +You may need to +supply the @option{--srcdir=PATH} argument to tell @code{configure} where the +source files are. @code{configure} automatically checks for the +source code in the directory that @code{configure} is in and in `..'. + +If you have to use a @code{make} that does not supports the @code{VPATH} +variable, you can compile Bash for one architecture at a +time in the source code directory. After you have installed +Bash for one architecture, use @samp{make distclean} before +reconfiguring for another architecture. + +Alternatively, if your system supports symbolic links, you can use the +@file{support/mkclone} script to create a build tree which has +symbolic links back to each file in the source directory. Here's an +example that creates a build directory in the current directory from a +source directory @file{/usr/gnu/src/bash-2.0}: + +@example +bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 . +@end example + +@noindent +The @code{mkclone} script requires Bash, so you must have already built +Bash for at least one architecture before you can create build +directories for other architectures. + +@node Installation Names +@section Installation Names + +By default, @samp{make install} will install into +@file{/usr/local/bin}, @file{/usr/local/man}, etc. You can +specify an installation prefix other than @file{/usr/local} by +giving @code{configure} the option @option{--prefix=@var{PATH}}, +or by specifying a value for the @code{DESTDIR} @samp{make} +variable when running @samp{make install}. + +You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. +If you give @code{configure} the option +@option{--exec-prefix=@var{PATH}}, @samp{make install} will use +@var{PATH} as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + +@node Specifying the System Type +@section Specifying the System Type + +There may be some features @code{configure} can not figure out +automatically, but need to determine by the type of host Bash +will run on. Usually @code{configure} can figure that +out, but if it prints a message saying it can not guess the host +type, give it the @option{--host=TYPE} option. @samp{TYPE} can +either be a short name for the system type, such as @samp{sun4}, +or a canonical name with three fields: @samp{CPU-COMPANY-SYSTEM} +(e.g., @samp{i386-unknown-freebsd4.2}). + +See the file @file{support/config.sub} for the possible +values of each field. + +@node Sharing Defaults +@section Sharing Defaults + +If you want to set default values for @code{configure} scripts to +share, you can create a site shell script called +@code{config.site} that gives default values for variables like +@code{CC}, @code{cache_file}, and @code{prefix}. @code{configure} +looks for @file{PREFIX/share/config.site} if it exists, then +@file{PREFIX/etc/config.site} if it exists. Or, you can set the +@code{CONFIG_SITE} environment variable to the location of the site +script. A warning: the Bash @code{configure} looks for a site script, +but not all @code{configure} scripts do. + +@node Operation Controls +@section Operation Controls + +@code{configure} recognizes the following options to control how it +operates. + +@table @code + +@item --cache-file=@var{file} +Use and save the results of the tests in +@var{file} instead of @file{./config.cache}. Set @var{file} to +@file{/dev/null} to disable caching, for debugging +@code{configure}. + +@item --help +Print a summary of the options to @code{configure}, and exit. + +@item --quiet +@itemx --silent +@itemx -q +Do not print messages saying which checks are being made. + +@item --srcdir=@var{dir} +Look for the Bash source code in directory @var{dir}. Usually +@code{configure} can determine that directory automatically. + +@item --version +Print the version of Autoconf used to generate the @code{configure} +script, and exit. +@end table + +@code{configure} also accepts some other, not widely used, boilerplate +options. @samp{configure --help} prints the complete list. + +@node Optional Features +@section Optional Features + +The Bash @code{configure} has a number of @option{--enable-@var{feature}} +options, where @var{feature} indicates an optional part of Bash. +There are also several @option{--with-@var{package}} options, +where @var{package} is something like @samp{bash-malloc} or @samp{purify}. +To turn off the default use of a package, use +@option{--without-@var{package}}. To configure Bash without a feature +that is enabled by default, use @option{--disable-@var{feature}}. + +Here is a complete list of the @option{--enable-} and +@option{--with-} options that the Bash @code{configure} recognizes. + +@table @code +@item --with-afs +Define if you are using the Andrew File System from Transarc. + +@item --with-bash-malloc +Use the Bash version of +@code{malloc} in the directory @file{lib/malloc}. This is not the same +@code{malloc} that appears in @sc{gnu} libc, but an older version +originally derived from the 4.2 @sc{bsd} @code{malloc}. This @code{malloc} +is very fast, but wastes some space on each allocation. +This option is enabled by default. +The @file{NOTES} file contains a list of systems for +which this should be turned off, and @code{configure} disables this +option automatically for a number of systems. + +@item --with-curses +Use the curses library instead of the termcap library. This should +be supplied if your system has an inadequate or incomplete termcap +database. + +@item --with-gnu-malloc +A synonym for @code{--with-bash-malloc}. + +@item --with-installed-readline[=@var{PREFIX}] +Define this to make Bash link with a locally-installed version of Readline +rather than the version in @file{lib/readline}. This works only with +Readline 5.0 and later versions. If @var{PREFIX} is @code{yes} or not +supplied, @code{configure} uses the values of the make variables +@code{includedir} and @code{libdir}, which are subdirectories of @code{prefix} +by default, to find the installed version of Readline if it is not in +the standard system include and library directories. +If @var{PREFIX} is @code{no}, Bash links with the version in +@file{lib/readline}. +If @var{PREFIX} is set to any other value, @code{configure} treats it as +a directory pathname and looks for +the installed version of Readline in subdirectories of that directory +(include files in @var{PREFIX}/@code{include} and the library in +@var{PREFIX}/@code{lib}). + +@item --with-purify +Define this to use the Purify memory allocation checker from Rational +Software. + +@item --enable-minimal-config +This produces a shell with minimal features, close to the historical +Bourne shell. +@end table + +There are several @option{--enable-} options that alter how Bash is +compiled and linked, rather than changing run-time features. + +@table @code +@item --enable-largefile +Enable support for @uref{http://www.unix.org/version2/whatsnew/lfs20mar.html, +large files} if the operating system requires special compiler options +to build programs which can access large files. This is enabled by +default, if the operating system provides large file support. + +@item --enable-profiling +This builds a Bash binary that produces profiling information to be +processed by @code{gprof} each time it is executed. + +@item --enable-static-link +This causes Bash to be linked statically, if @code{gcc} is being used. +This could be used to build a version to use as root's shell. +@end table + +The @samp{minimal-config} option can be used to disable all of +the following options, but it is processed first, so individual +options may be enabled using @samp{enable-@var{feature}}. + +All of the following options except for @samp{disabled-builtins}, +@samp{direxpand-default}, and +@samp{xpg-echo-default} are +enabled by default, unless the operating system does not provide the +necessary support. + +@table @code +@item --enable-alias +Allow alias expansion and include the @code{alias} and @code{unalias} +builtins (@pxref{Aliases}). + +@item --enable-arith-for-command +Include support for the alternate form of the @code{for} command +that behaves like the C language @code{for} statement +(@pxref{Looping Constructs}). + +@item --enable-array-variables +Include support for one-dimensional array shell variables +(@pxref{Arrays}). + +@item --enable-bang-history +Include support for @code{csh}-like history substitution +(@pxref{History Interaction}). + +@item --enable-brace-expansion +Include @code{csh}-like brace expansion +( @code{b@{a,b@}c} @expansion{} @code{bac bbc} ). +See @ref{Brace Expansion}, for a complete description. + +@item --enable-casemod-attributes +Include support for case-modifying attributes in the @code{declare} builtin +and assignment statements. Variables with the @var{uppercase} attribute, +for example, will have their values converted to uppercase upon assignment. + +@item --enable-casemod-expansion +Include support for case-modifying word expansions. + +@item --enable-command-timing +Include support for recognizing @code{time} as a reserved word and for +displaying timing statistics for the pipeline following @code{time} +(@pxref{Pipelines}). +This allows pipelines as well as shell builtins and functions to be timed. + +@item --enable-cond-command +Include support for the @code{[[} conditional command. +(@pxref{Conditional Constructs}). + +@item --enable-cond-regexp +Include support for matching @sc{posix} regular expressions using the +@samp{=~} binary operator in the @code{[[} conditional command. +(@pxref{Conditional Constructs}). + +@item --enable-coprocesses +Include support for coprocesses and the @code{coproc} reserved word +(@pxref{Pipelines}). + +@item --enable-debugger +Include support for the bash debugger (distributed separately). + +@item --enable-dev-fd-stat-broken +If calling @code{stat} on /dev/fd/@var{N} returns different results than +calling @code{fstat} on file descriptor @var{N}, supply this option to +enable a workaround. +This has implications for conditional commands that test file attributes. + +@item --enable-direxpand-default +Cause the @code{direxpand} shell option (@pxref{The Shopt Builtin}) +to be enabled by default when the shell starts. +It is normally disabled by default. + +@item --enable-directory-stack +Include support for a @code{csh}-like directory stack and the +@code{pushd}, @code{popd}, and @code{dirs} builtins +(@pxref{The Directory Stack}). + +@item --enable-disabled-builtins +Allow builtin commands to be invoked via @samp{builtin xxx} +even after @code{xxx} has been disabled using @samp{enable -n xxx}. +See @ref{Bash Builtins}, for details of the @code{builtin} and +@code{enable} builtin commands. + +@item --enable-dparen-arithmetic +Include support for the @code{((@dots{}))} command +(@pxref{Conditional Constructs}). + +@item --enable-extended-glob +Include support for the extended pattern matching features described +above under @ref{Pattern Matching}. + +@item --enable-extended-glob-default +Set the default value of the @var{extglob} shell option described +above under @ref{The Shopt Builtin} to be enabled. + +@item --enable-function-import +Include support for importing function definitions exported by another +instance of the shell from the environment. This option is enabled by +default. + +@item --enable-glob-asciirange-default +Set the default value of the @var{globasciiranges} shell option described +above under @ref{The Shopt Builtin} to be enabled. +This controls the behavior of character ranges when used in pattern matching +bracket expressions. + +@item --enable-help-builtin +Include the @code{help} builtin, which displays help on shell builtins and +variables (@pxref{Bash Builtins}). + +@item --enable-history +Include command history and the @code{fc} and @code{history} +builtin commands (@pxref{Bash History Facilities}). + +@item --enable-job-control +This enables the job control features (@pxref{Job Control}), +if the operating system supports them. + +@item --enable-multibyte +This enables support for multibyte characters if the operating +system provides the necessary support. + +@item --enable-net-redirections +This enables the special handling of filenames of the form +@code{/dev/tcp/@var{host}/@var{port}} and +@code{/dev/udp/@var{host}/@var{port}} +when used in redirections (@pxref{Redirections}). + +@item --enable-process-substitution +This enables process substitution (@pxref{Process Substitution}) if +the operating system provides the necessary support. + +@item --enable-progcomp +Enable the programmable completion facilities +(@pxref{Programmable Completion}). +If Readline is not enabled, this option has no effect. + +@item --enable-prompt-string-decoding +Turn on the interpretation of a number of backslash-escaped characters +in the @env{$PS0}, @env{$PS1}, @env{$PS2}, and @env{$PS4} prompt +strings. See @ref{Controlling the Prompt}, for a complete list of prompt +string escape sequences. + +@item --enable-readline +Include support for command-line editing and history with the Bash +version of the Readline library (@pxref{Command Line Editing}). + +@item --enable-restricted +Include support for a @dfn{restricted shell}. If this is enabled, Bash, +when called as @code{rbash}, enters a restricted mode. See +@ref{The Restricted Shell}, for a description of restricted mode. + +@item --enable-select +Include the @code{select} compound command, which allows the generation of +simple menus (@pxref{Conditional Constructs}). + +@item --enable-separate-helpfiles +Use external files for the documentation displayed by the @code{help} builtin +instead of storing the text internally. + +@item --enable-single-help-strings +Store the text displayed by the @code{help} builtin as a single string for +each help topic. This aids in translating the text to different languages. +You may need to disable this if your compiler cannot handle very long string +literals. + +@item --enable-strict-posix-default +Make Bash @sc{posix}-conformant by default (@pxref{Bash POSIX Mode}). + +@item --enable-usg-echo-default +A synonym for @code{--enable-xpg-echo-default}. + +@item --enable-xpg-echo-default +Make the @code{echo} builtin expand backslash-escaped characters by default, +without requiring the @option{-e} option. +This sets the default value of the @code{xpg_echo} shell option to @code{on}, +which makes the Bash @code{echo} behave more like the version specified in +the Single Unix Specification, version 3. +@xref{Bash Builtins}, for a description of the escape sequences that +@code{echo} recognizes. +@end table + +The file @file{config-top.h} contains C Preprocessor +@samp{#define} statements for options which are not settable from +@code{configure}. +Some of these are not meant to be changed; beware of the consequences if +you do. +Read the comments associated with each definition for more +information about its effect. + +@node Reporting Bugs +@appendix Reporting Bugs + +Please report all bugs you find in Bash. +But first, you should +make sure that it really is a bug, and that it appears in the latest +version of Bash. +The latest version of Bash is always available for FTP from +@uref{ftp://ftp.gnu.org/pub/gnu/bash/}. + +Once you have determined that a bug actually exists, use the +@code{bashbug} command to submit a bug report. +If you have a fix, you are encouraged to mail that as well! +Suggestions and `philosophical' bug reports may be mailed +to @email{bug-bash@@gnu.org} or posted to the Usenet +newsgroup @code{gnu.bash.bug}. + +All bug reports should include: +@itemize @bullet +@item +The version number of Bash. +@item +The hardware and operating system. +@item +The compiler used to compile Bash. +@item +A description of the bug behaviour. +@item +A short script or `recipe' which exercises the bug and may be used +to reproduce it. +@end itemize + +@noindent +@code{bashbug} inserts the first three items automatically into +the template it provides for filing a bug report. + +Please send all reports concerning this manual to +@email{bug-bash@@gnu.org}. + +@node Major Differences From The Bourne Shell +@appendix Major Differences From The Bourne Shell + +Bash implements essentially the same grammar, parameter and +variable expansion, redirection, and quoting as the Bourne Shell. +Bash uses the @sc{posix} standard as the specification of +how these features are to be implemented. There are some +differences between the traditional Bourne shell and Bash; this +section quickly details the differences of significance. A +number of these differences are explained in greater depth in +previous sections. +This section uses the version of @code{sh} included in SVR4.2 (the +last version of the historical Bourne shell) as the baseline reference. + +@itemize @bullet + +@item +Bash is @sc{posix}-conformant, even where the @sc{posix} specification +differs from traditional @code{sh} behavior (@pxref{Bash POSIX Mode}). + +@item +Bash has multi-character invocation options (@pxref{Invoking Bash}). + +@item +Bash has command-line editing (@pxref{Command Line Editing}) and +the @code{bind} builtin. + +@item +Bash provides a programmable word completion mechanism +(@pxref{Programmable Completion}), and builtin commands +@code{complete}, @code{compgen}, and @code{compopt}, to +manipulate it. + +@item +Bash has command history (@pxref{Bash History Facilities}) and the +@code{history} and @code{fc} builtins to manipulate it. +The Bash history list maintains timestamp information and uses the +value of the @code{HISTTIMEFORMAT} variable to display it. + +@item +Bash implements @code{csh}-like history expansion +(@pxref{History Interaction}). + +@item +Bash has one-dimensional array variables (@pxref{Arrays}), and the +appropriate variable expansions and assignment syntax to use them. +Several of the Bash builtins take options to act on arrays. +Bash provides a number of built-in array variables. + +@item +The @code{$'@dots{}'} quoting syntax, which expands ANSI-C +backslash-escaped characters in the text between the single quotes, +is supported (@pxref{ANSI-C Quoting}). + +@item +Bash supports the @code{$"@dots{}"} quoting syntax to do +locale-specific translation of the characters between the double +quotes. The @option{-D}, @option{--dump-strings}, and @option{--dump-po-strings} +invocation options list the translatable strings found in a script +(@pxref{Locale Translation}). + +@item +Bash implements the @code{!} keyword to negate the return value of +a pipeline (@pxref{Pipelines}). +Very useful when an @code{if} statement needs to act only if a test fails. +The Bash @samp{-o pipefail} option to @code{set} will cause a pipeline to +return a failure status if any command fails. + +@item +Bash has the @code{time} reserved word and command timing (@pxref{Pipelines}). +The display of the timing statistics may be controlled with the +@env{TIMEFORMAT} variable. + +@item +Bash implements the @code{for (( @var{expr1} ; @var{expr2} ; @var{expr3} ))} +arithmetic for command, similar to the C language (@pxref{Looping Constructs}). + +@item +Bash includes the @code{select} compound command, which allows the +generation of simple menus (@pxref{Conditional Constructs}). + +@item +Bash includes the @code{[[} compound command, which makes conditional +testing part of the shell grammar (@pxref{Conditional Constructs}), including +optional regular expression matching. + +@item +Bash provides optional case-insensitive matching for the @code{case} and +@code{[[} constructs. + +@item +Bash includes brace expansion (@pxref{Brace Expansion}) and tilde +expansion (@pxref{Tilde Expansion}). + +@item +Bash implements command aliases and the @code{alias} and @code{unalias} +builtins (@pxref{Aliases}). + +@item +Bash provides shell arithmetic, the @code{((} compound command +(@pxref{Conditional Constructs}), +and arithmetic expansion (@pxref{Shell Arithmetic}). + +@item +Variables present in the shell's initial environment are automatically +exported to child processes. The Bourne shell does not normally do +this unless the variables are explicitly marked using the @code{export} +command. + +@item +Bash supports the @samp{+=} assignment operator, which appends to the value +of the variable named on the left hand side. + +@item +Bash includes the @sc{posix} pattern removal @samp{%}, @samp{#}, @samp{%%} +and @samp{##} expansions to remove leading or trailing substrings from +variable values (@pxref{Shell Parameter Expansion}). + +@item +The expansion @code{$@{#xx@}}, which returns the length of @code{$@{xx@}}, +is supported (@pxref{Shell Parameter Expansion}). + +@item +The expansion @code{$@{var:}@var{offset}@code{[:}@var{length}@code{]@}}, +which expands to the substring of @code{var}'s value of length +@var{length}, beginning at @var{offset}, is present +(@pxref{Shell Parameter Expansion}). + +@item +The expansion +@code{$@{var/[/]}@var{pattern}@code{[/}@var{replacement}@code{]@}}, +which matches @var{pattern} and replaces it with @var{replacement} in +the value of @code{var}, is available (@pxref{Shell Parameter Expansion}). + +@item +The expansion @code{$@{!@var{prefix}*@}} expansion, which expands to +the names of all shell variables whose names begin with @var{prefix}, +is available (@pxref{Shell Parameter Expansion}). + +@item +Bash has @var{indirect} variable expansion using @code{$@{!word@}} +(@pxref{Shell Parameter Expansion}). + +@item +Bash can expand positional parameters beyond @code{$9} using +@code{$@{@var{num}@}}. + +@item +The @sc{posix} @code{$()} form of command substitution +is implemented (@pxref{Command Substitution}), +and preferred to the Bourne shell's @code{``} (which +is also implemented for backwards compatibility). + +@item +Bash has process substitution (@pxref{Process Substitution}). + +@item +Bash automatically assigns variables that provide information about the +current user (@env{UID}, @env{EUID}, and @env{GROUPS}), the current host +(@env{HOSTTYPE}, @env{OSTYPE}, @env{MACHTYPE}, and @env{HOSTNAME}), +and the instance of Bash that is running (@env{BASH}, +@env{BASH_VERSION}, and @env{BASH_VERSINFO}). @xref{Bash Variables}, +for details. + +@item +The @env{IFS} variable is used to split only the results of expansion, +not all words (@pxref{Word Splitting}). +This closes a longstanding shell security hole. + +@item +The filename expansion bracket expression code uses @samp{!} and @samp{^} +to negate the set of characters between the brackets. +The Bourne shell uses only @samp{!}. + +@item +Bash implements the full set of @sc{posix} filename expansion operators, +including @var{character classes}, @var{equivalence classes}, and +@var{collating symbols} (@pxref{Filename Expansion}). + +@item +Bash implements extended pattern matching features when the @code{extglob} +shell option is enabled (@pxref{Pattern Matching}). + +@item +It is possible to have a variable and a function with the same name; +@code{sh} does not separate the two name spaces. + +@item +Bash functions are permitted to have local variables using the +@code{local} builtin, and thus useful recursive functions may be written +(@pxref{Bash Builtins}). + +@item +Variable assignments preceding commands affect only that command, even +builtins and functions (@pxref{Environment}). +In @code{sh}, all variable assignments +preceding commands are global unless the command is executed from the +file system. + +@item +Bash performs filename expansion on filenames specified as operands +to input and output redirection operators (@pxref{Redirections}). + +@item +Bash contains the @samp{<>} redirection operator, allowing a file to be +opened for both reading and writing, and the @samp{&>} redirection +operator, for directing standard output and standard error to the same +file (@pxref{Redirections}). + +@item +Bash includes the @samp{<<<} redirection operator, allowing a string to +be used as the standard input to a command. + +@item +Bash implements the @samp{[n]<&@var{word}} and @samp{[n]>&@var{word}} +redirection operators, which move one file descriptor to another. + +@item +Bash treats a number of filenames specially when they are +used in redirection operators (@pxref{Redirections}). + +@item +Bash can open network connections to arbitrary machines and services +with the redirection operators (@pxref{Redirections}). + +@item +The @code{noclobber} option is available to avoid overwriting existing +files with output redirection (@pxref{The Set Builtin}). +The @samp{>|} redirection operator may be used to override @code{noclobber}. + +@item +The Bash @code{cd} and @code{pwd} builtins (@pxref{Bourne Shell Builtins}) +each take @option{-L} and @option{-P} options to switch between logical and +physical modes. + +@item +Bash allows a function to override a builtin with the same name, and provides +access to that builtin's functionality within the function via the +@code{builtin} and @code{command} builtins (@pxref{Bash Builtins}). + +@item +The @code{command} builtin allows selective disabling of functions +when command lookup is performed (@pxref{Bash Builtins}). + +@item +Individual builtins may be enabled or disabled using the @code{enable} +builtin (@pxref{Bash Builtins}). + +@item +The Bash @code{exec} builtin takes additional options that allow users +to control the contents of the environment passed to the executed +command, and what the zeroth argument to the command is to be +(@pxref{Bourne Shell Builtins}). + +@item +Shell functions may be exported to children via the environment +using @code{export -f} (@pxref{Shell Functions}). + +@item +The Bash @code{export}, @code{readonly}, and @code{declare} builtins can +take a @option{-f} option to act on shell functions, a @option{-p} option to +display variables with various attributes set in a format that can be +used as shell input, a @option{-n} option to remove various variable +attributes, and @samp{name=value} arguments to set variable attributes +and values simultaneously. + +@item +The Bash @code{hash} builtin allows a name to be associated with +an arbitrary filename, even when that filename cannot be found by +searching the @env{$PATH}, using @samp{hash -p} +(@pxref{Bourne Shell Builtins}). + +@item +Bash includes a @code{help} builtin for quick reference to shell +facilities (@pxref{Bash Builtins}). + +@item +The @code{printf} builtin is available to display formatted output +(@pxref{Bash Builtins}). + +@item +The Bash @code{read} builtin (@pxref{Bash Builtins}) +will read a line ending in @samp{\} with +the @option{-r} option, and will use the @env{REPLY} variable as a +default if no non-option arguments are supplied. +The Bash @code{read} builtin +also accepts a prompt string with the @option{-p} option and will use +Readline to obtain the line when given the @option{-e} option. +The @code{read} builtin also has additional options to control input: +the @option{-s} option will turn off echoing of input characters as +they are read, the @option{-t} option will allow @code{read} to time out +if input does not arrive within a specified number of seconds, the +@option{-n} option will allow reading only a specified number of +characters rather than a full line, and the @option{-d} option will read +until a particular character rather than newline. + +@item +The @code{return} builtin may be used to abort execution of scripts +executed with the @code{.} or @code{source} builtins +(@pxref{Bourne Shell Builtins}). + +@item +Bash includes the @code{shopt} builtin, for finer control of shell +optional capabilities (@pxref{The Shopt Builtin}), and allows these options +to be set and unset at shell invocation (@pxref{Invoking Bash}). + +@item +Bash has much more optional behavior controllable with the @code{set} +builtin (@pxref{The Set Builtin}). + +@item +The @samp{-x} (@option{xtrace}) option displays commands other than +simple commands when performing an execution trace +(@pxref{The Set Builtin}). + +@item +The @code{test} builtin (@pxref{Bourne Shell Builtins}) +is slightly different, as it implements the @sc{posix} algorithm, +which specifies the behavior based on the number of arguments. + +@item +Bash includes the @code{caller} builtin, which displays the context of +any active subroutine call (a shell function or a script executed with +the @code{.} or @code{source} builtins). This supports the bash +debugger. + +@item +The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows a +@code{DEBUG} pseudo-signal specification, similar to @code{EXIT}. +Commands specified with a @code{DEBUG} trap are executed before every +simple command, @code{for} command, @code{case} command, +@code{select} command, every arithmetic @code{for} command, and before +the first command executes in a shell function. +The @code{DEBUG} trap is not inherited by shell functions unless the +function has been given the @code{trace} attribute or the +@code{functrace} option has been enabled using the @code{shopt} builtin. +The @code{extdebug} shell option has additional effects on the +@code{DEBUG} trap. + +The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows an +@code{ERR} pseudo-signal specification, similar to @code{EXIT} and @code{DEBUG}. +Commands specified with an @code{ERR} trap are executed after a simple +command fails, with a few exceptions. +The @code{ERR} trap is not inherited by shell functions unless the +@code{-o errtrace} option to the @code{set} builtin is enabled. + +The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows a +@code{RETURN} pseudo-signal specification, similar to +@code{EXIT} and @code{DEBUG}. +Commands specified with an @code{RETURN} trap are executed before +execution resumes after a shell function or a shell script executed with +@code{.} or @code{source} returns. +The @code{RETURN} trap is not inherited by shell functions unless the +function has been given the @code{trace} attribute or the +@code{functrace} option has been enabled using the @code{shopt} builtin. + +@item +The Bash @code{type} builtin is more extensive and gives more information +about the names it finds (@pxref{Bash Builtins}). + +@item +The Bash @code{umask} builtin permits a @option{-p} option to cause +the output to be displayed in the form of a @code{umask} command +that may be reused as input (@pxref{Bourne Shell Builtins}). + +@item +Bash implements a @code{csh}-like directory stack, and provides the +@code{pushd}, @code{popd}, and @code{dirs} builtins to manipulate it +(@pxref{The Directory Stack}). +Bash also makes the directory stack visible as the value of the +@env{DIRSTACK} shell variable. + +@item +Bash interprets special backslash-escaped characters in the prompt +strings when interactive (@pxref{Controlling the Prompt}). + +@item +The Bash restricted mode is more useful (@pxref{The Restricted Shell}); +the SVR4.2 shell restricted mode is too limited. + +@item +The @code{disown} builtin can remove a job from the internal shell +job table (@pxref{Job Control Builtins}) or suppress the sending +of @code{SIGHUP} to a job when the shell exits as the result of a +@code{SIGHUP}. + +@item +Bash includes a number of features to support a separate debugger for +shell scripts. + +@item +The SVR4.2 shell has two privilege-related builtins +(@code{mldmode} and @code{priv}) not present in Bash. + +@item +Bash does not have the @code{stop} or @code{newgrp} builtins. + +@item +Bash does not use the @env{SHACCT} variable or perform shell accounting. + +@item +The SVR4.2 @code{sh} uses a @env{TIMEOUT} variable like Bash uses +@env{TMOUT}. + +@end itemize + +@noindent +More features unique to Bash may be found in @ref{Bash Features}. + + +@appendixsec Implementation Differences From The SVR4.2 Shell + +Since Bash is a completely new implementation, it does not suffer from +many of the limitations of the SVR4.2 shell. For instance: + +@itemize @bullet + +@item +Bash does not fork a subshell when redirecting into or out of +a shell control structure such as an @code{if} or @code{while} +statement. + +@item +Bash does not allow unbalanced quotes. The SVR4.2 shell will silently +insert a needed closing quote at @code{EOF} under certain circumstances. +This can be the cause of some hard-to-find errors. + +@item +The SVR4.2 shell uses a baroque memory management scheme based on +trapping @code{SIGSEGV}. If the shell is started from a process with +@code{SIGSEGV} blocked (e.g., by using the @code{system()} C library +function call), it misbehaves badly. + +@item +In a questionable attempt at security, the SVR4.2 shell, +when invoked without the @option{-p} option, will alter its real +and effective @sc{uid} and @sc{gid} if they are less than some +magic threshold value, commonly 100. +This can lead to unexpected results. + +@item +The SVR4.2 shell does not allow users to trap @code{SIGSEGV}, +@code{SIGALRM}, or @code{SIGCHLD}. + +@item +The SVR4.2 shell does not allow the @env{IFS}, @env{MAILCHECK}, +@env{PATH}, @env{PS1}, or @env{PS2} variables to be unset. + +@item +The SVR4.2 shell treats @samp{^} as the undocumented equivalent of +@samp{|}. + +@item +Bash allows multiple option arguments when it is invoked (@code{-x -v}); +the SVR4.2 shell allows only one option argument (@code{-xv}). In +fact, some versions of the shell dump core if the second argument begins +with a @samp{-}. + +@item +The SVR4.2 shell exits a script if any builtin fails; Bash exits +a script only if one of the @sc{posix} special builtins fails, and +only for certain failures, as enumerated in the @sc{posix} standard. + +@item +The SVR4.2 shell behaves differently when invoked as @code{jsh} +(it turns on job control). +@end itemize + +@node GNU Free Documentation License +@appendix GNU Free Documentation License + +@include fdl.texi + +@node Indexes +@appendix Indexes + +@menu +* Builtin Index:: Index of Bash builtin commands. +* Reserved Word Index:: Index of Bash reserved words. +* Variable Index:: Quick reference helps you find the + variable you want. +* Function Index:: Index of bindable Readline functions. +* Concept Index:: General index for concepts described in + this manual. +@end menu + +@node Builtin Index +@appendixsec Index of Shell Builtin Commands +@printindex bt + +@node Reserved Word Index +@appendixsec Index of Shell Reserved Words +@printindex rw + +@node Variable Index +@appendixsec Parameter and Variable Index +@printindex vr + +@node Function Index +@appendixsec Function Index +@printindex fn + +@node Concept Index +@appendixsec Concept Index +@printindex cp + +@bye diff --git a/bash-5.1/doc/builtins.0 b/bash-5.1/doc/builtins.0 new file mode 100644 index 0000000000000000000000000000000000000000..614524eb08e993804b84c69f5dcb6d9ade481d25 --- /dev/null +++ b/bash-5.1/doc/builtins.0 @@ -0,0 +1,2014 @@ +BASH_BUILTINS(1) General Commands Manual BASH_BUILTINS(1) + + + +NNAAMMEE + bash, :, ., [, alias, bg, bind, break, builtin, caller, cd, command, + compgen, complete, compopt, continue, declare, dirs, disown, echo, en- + able, eval, exec, exit, export, false, fc, fg, getopts, hash, help, + history, jobs, kill, let, local, logout, mapfile, popd, printf, pushd, + pwd, read, readonly, return, set, shift, shopt, source, suspend, test, + times, trap, true, type, typeset, ulimit, umask, unalias, unset, wait - + bash built-in commands, see bbaasshh(1) + +BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS + Unless otherwise noted, each builtin command documented in this section + as accepting options preceded by -- accepts ---- to signify the end of the + options. The ::, ttrruuee, ffaallssee, and tteesstt/[[ builtins do not accept options + and do not treat ---- specially. The eexxiitt, llooggoouutt, rreettuurrnn, bbrreeaakk, ccoonn-- + ttiinnuuee, lleett, and sshhiifftt builtins accept and process arguments beginning + with -- without requiring ----. Other builtins that accept arguments but + are not specified as accepting options interpret arguments beginning + with -- as invalid options and require ---- to prevent this interpreta- + tion. + :: [_a_r_g_u_m_e_n_t_s] + No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s + and performing any specified redirections. The return status is + zero. + + .. _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s] + ssoouurrccee _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s] + Read and execute commands from _f_i_l_e_n_a_m_e in the current shell en- + vironment and return the exit status of the last command exe- + cuted from _f_i_l_e_n_a_m_e. If _f_i_l_e_n_a_m_e does not contain a slash, + filenames in PPAATTHH are used to find the directory containing + _f_i_l_e_n_a_m_e. The file searched for in PPAATTHH need not be executable. + When bbaasshh is not in _p_o_s_i_x _m_o_d_e, the current directory is + searched if no file is found in PPAATTHH. If the ssoouurrcceeppaatthh option + to the sshhoopptt builtin command is turned off, the PPAATTHH is not + searched. If any _a_r_g_u_m_e_n_t_s are supplied, they become the posi- + tional parameters when _f_i_l_e_n_a_m_e is executed. Otherwise the po- + sitional parameters are unchanged. If the --TT option is enabled, + ssoouurrccee inherits any trap on DDEEBBUUGG; if it is not, any DDEEBBUUGG trap + string is saved and restored around the call to ssoouurrccee, and + ssoouurrccee unsets the DDEEBBUUGG trap while it executes. If --TT is not + set, and the sourced file changes the DDEEBBUUGG trap, the new value + is retained when ssoouurrccee completes. The return status is the + status of the last command exited within the script (0 if no + commands are executed), and false if _f_i_l_e_n_a_m_e is not found or + cannot be read. + + aalliiaass [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] + AAlliiaass with no arguments or with the --pp option prints the list of + aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When + arguments are supplied, an alias is defined for each _n_a_m_e whose + _v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word + to be checked for alias substitution when the alias is expanded. + For each _n_a_m_e in the argument list for which no _v_a_l_u_e is sup- + plied, the name and value of the alias is printed. AAlliiaass re- + turns true unless a _n_a_m_e is given for which no alias has been + defined. + + bbgg [_j_o_b_s_p_e_c ...] + Resume each suspended job _j_o_b_s_p_e_c in the background, as if it + had been started with &&. If _j_o_b_s_p_e_c is not present, the shell's + notion of the _c_u_r_r_e_n_t _j_o_b is used. bbgg _j_o_b_s_p_e_c returns 0 unless + run when job control is disabled or, when run with job control + enabled, any specified _j_o_b_s_p_e_c was not found or was started + without job control. + + bbiinndd [--mm _k_e_y_m_a_p] [--llppssvvPPSSVVXX] + bbiinndd [--mm _k_e_y_m_a_p] [--qq _f_u_n_c_t_i_o_n] [--uu _f_u_n_c_t_i_o_n] [--rr _k_e_y_s_e_q] + bbiinndd [--mm _k_e_y_m_a_p] --ff _f_i_l_e_n_a_m_e + bbiinndd [--mm _k_e_y_m_a_p] --xx _k_e_y_s_e_q:_s_h_e_l_l_-_c_o_m_m_a_n_d + bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_f_u_n_c_t_i_o_n_-_n_a_m_e + bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d + Display current rreeaaddlliinnee key and function bindings, bind a key + sequence to a rreeaaddlliinnee function or macro, or set a rreeaaddlliinnee + variable. Each non-option argument is a command as it would ap- + pear in _._i_n_p_u_t_r_c, but each binding or command must be passed as + a separate argument; e.g., '"\C-x\C-r": re-read-init-file'. Op- + tions, if supplied, have the following meanings: + --mm _k_e_y_m_a_p + Use _k_e_y_m_a_p as the keymap to be affected by the subsequent + bindings. Acceptable _k_e_y_m_a_p names are _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_- + _d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d, + and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d (_v_i_-_m_o_v_e + is also a synonym); _e_m_a_c_s is equivalent to _e_m_a_c_s_-_s_t_a_n_- + _d_a_r_d. + --ll List the names of all rreeaaddlliinnee functions. + --pp Display rreeaaddlliinnee function names and bindings in such a + way that they can be re-read. + --PP List current rreeaaddlliinnee function names and bindings. + --ss Display rreeaaddlliinnee key sequences bound to macros and the + strings they output in such a way that they can be re- + read. + --SS Display rreeaaddlliinnee key sequences bound to macros and the + strings they output. + --vv Display rreeaaddlliinnee variable names and values in such a way + that they can be re-read. + --VV List current rreeaaddlliinnee variable names and values. + --ff _f_i_l_e_n_a_m_e + Read key bindings from _f_i_l_e_n_a_m_e. + --qq _f_u_n_c_t_i_o_n + Query about which keys invoke the named _f_u_n_c_t_i_o_n. + --uu _f_u_n_c_t_i_o_n + Unbind all keys bound to the named _f_u_n_c_t_i_o_n. + --rr _k_e_y_s_e_q + Remove any current binding for _k_e_y_s_e_q. + --xx _k_e_y_s_e_q::_s_h_e_l_l_-_c_o_m_m_a_n_d + Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is en- + tered. When _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets + the RREEAADDLLIINNEE__LLIINNEE variable to the contents of the rreeaadd-- + lliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT and RREEAADDLLIINNEE__MMAARRKK + variables to the current location of the insertion point + and the saved insertion point (the mark), respectively. + If the executed command changes the value of any of RREEAADD-- + LLIINNEE__LLIINNEE, RREEAADDLLIINNEE__PPOOIINNTT, or RREEAADDLLIINNEE__MMAARRKK, those new + values will be reflected in the editing state. + --XX List all key sequences bound to shell commands and the + associated commands in a format that can be reused as in- + put. + + The return value is 0 unless an unrecognized option is given or + an error occurred. + + bbrreeaakk [_n] + Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is + specified, break _n levels. _n must be >= 1. If _n is greater + than the number of enclosing loops, all enclosing loops are ex- + ited. The return value is 0 unless _n is not greater than or + equal to 1. + + bbuuiillttiinn _s_h_e_l_l_-_b_u_i_l_t_i_n [_a_r_g_u_m_e_n_t_s] + Execute the specified shell builtin, passing it _a_r_g_u_m_e_n_t_s, and + return its exit status. This is useful when defining a function + whose name is the same as a shell builtin, retaining the func- + tionality of the builtin within the function. The ccdd builtin is + commonly redefined this way. The return status is false if + _s_h_e_l_l_-_b_u_i_l_t_i_n is not a shell builtin command. + + ccaalllleerr [_e_x_p_r] + Returns the context of any active subroutine call (a shell func- + tion or a script executed with the .. or ssoouurrccee builtins). With- + out _e_x_p_r, ccaalllleerr displays the line number and source filename of + the current subroutine call. If a non-negative integer is sup- + plied as _e_x_p_r, ccaalllleerr displays the line number, subroutine name, + and source file corresponding to that position in the current + execution call stack. This extra information may be used, for + example, to print a stack trace. The current frame is frame 0. + The return value is 0 unless the shell is not executing a sub- + routine call or _e_x_p_r does not correspond to a valid position in + the call stack. + + ccdd [--LL|[--PP [--ee]] [-@]] [_d_i_r] + Change the current directory to _d_i_r. if _d_i_r is not supplied, + the value of the HHOOMMEE shell variable is the default. Any addi- + tional arguments following _d_i_r are ignored. The variable CCDDPPAATTHH + defines the search path for the directory containing _d_i_r: each + directory name in CCDDPPAATTHH is searched for _d_i_r. Alternative di- + rectory names in CCDDPPAATTHH are separated by a colon (:). A null + directory name in CCDDPPAATTHH is the same as the current directory, + i.e., ``..''. If _d_i_r begins with a slash (/), then CCDDPPAATTHH is not + used. The --PP option causes ccdd to use the physical directory + structure by resolving symbolic links while traversing _d_i_r and + before processing instances of _._. in _d_i_r (see also the --PP option + to the sseett builtin command); the --LL option forces symbolic links + to be followed by resolving the link after processing instances + of _._. in _d_i_r. If _._. appears in _d_i_r, it is processed by removing + the immediately previous pathname component from _d_i_r, back to a + slash or the beginning of _d_i_r. If the --ee option is supplied + with --PP, and the current working directory cannot be success- + fully determined after a successful directory change, ccdd will + return an unsuccessful status. On systems that support it, the + --@@ option presents the extended attributes associated with a + file as a directory. An argument of -- is converted to $$OOLLDDPPWWDD + before the directory change is attempted. If a non-empty direc- + tory name from CCDDPPAATTHH is used, or if -- is the first argument, + and the directory change is successful, the absolute pathname of + the new working directory is written to the standard output. + The return value is true if the directory was successfully + changed; false otherwise. + + ccoommmmaanndd [--ppVVvv] _c_o_m_m_a_n_d [_a_r_g ...] + Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function + lookup. Only builtin commands or commands found in the PPAATTHH are + executed. If the --pp option is given, the search for _c_o_m_m_a_n_d is + performed using a default value for PPAATTHH that is guaranteed to + find all of the standard utilities. If either the --VV or --vv op- + tion is supplied, a description of _c_o_m_m_a_n_d is printed. The --vv + option causes a single word indicating the command or filename + used to invoke _c_o_m_m_a_n_d to be displayed; the --VV option produces a + more verbose description. If the --VV or --vv option is supplied, + the exit status is 0 if _c_o_m_m_a_n_d was found, and 1 if not. If + neither option is supplied and an error occurred or _c_o_m_m_a_n_d can- + not be found, the exit status is 127. Otherwise, the exit sta- + tus of the ccoommmmaanndd builtin is the exit status of _c_o_m_m_a_n_d. + + ccoommppggeenn [_o_p_t_i_o_n] [_w_o_r_d] + Generate possible completion matches for _w_o_r_d according to the + _o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee + builtin with the exception of --pp and --rr, and write the matches + to the standard output. When using the --FF or --CC options, the + various shell variables set by the programmable completion fa- + cilities, while available, will not have useful values. + + The matches will be generated in the same way as if the program- + mable completion code had generated them directly from a comple- + tion specification with the same flags. If _w_o_r_d is specified, + only those completions matching _w_o_r_d will be displayed. + + The return value is true unless an invalid option is supplied, + or no matches were generated. + + ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEEII] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_- + _p_a_t] [--WW _w_o_r_d_l_i_s_t] + [--FF _f_u_n_c_t_i_o_n] [--CC _c_o_m_m_a_n_d] [--XX _f_i_l_t_e_r_p_a_t] [--PP _p_r_e_f_i_x] [--SS _s_u_f_- + _f_i_x] _n_a_m_e [_n_a_m_e _._._.] + ccoommpplleettee --pprr [--DDEEII] [_n_a_m_e ...] + Specify how arguments to each _n_a_m_e should be completed. If the + --pp option is supplied, or if no options are supplied, existing + completion specifications are printed in a way that allows them + to be reused as input. The --rr option removes a completion spec- + ification for each _n_a_m_e, or, if no _n_a_m_es are supplied, all com- + pletion specifications. The --DD option indicates that other sup- + plied options and actions should apply to the ``default'' com- + mand completion; that is, completion attempted on a command for + which no completion has previously been defined. The --EE option + indicates that other supplied options and actions should apply + to ``empty'' command completion; that is, completion attempted + on a blank line. The --II option indicates that other supplied + options and actions should apply to completion on the initial + non-assignment word on the line, or after a command delimiter + such as ;; or ||, which is usually command name completion. If + multiple options are supplied, the --DD option takes precedence + over --EE, and both take precedence over --II. If any of --DD, --EE, or + --II are supplied, any other _n_a_m_e arguments are ignored; these + completions only apply to the case specified by the option. + + The process of applying these completion specifications when + word completion is attempted is described above under PPrrooggrraamm-- + mmaabbllee CCoommpplleettiioonn. + + Other options, if specified, have the following meanings. The + arguments to the --GG, --WW, and --XX options (and, if necessary, the + --PP and --SS options) should be quoted to protect them from expan- + sion before the ccoommpplleettee builtin is invoked. + --oo _c_o_m_p_-_o_p_t_i_o_n + The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp- + spec's behavior beyond the simple generation of comple- + tions. _c_o_m_p_-_o_p_t_i_o_n may be one of: + bbaasshhddeeffaauulltt + Perform the rest of the default bbaasshh completions + if the compspec generates no matches. + ddeeffaauulltt Use readline's default filename completion if + the compspec generates no matches. + ddiirrnnaammeess + Perform directory name completion if the comp- + spec generates no matches. + ffiilleennaammeess + Tell readline that the compspec generates file- + names, so it can perform any filename-specific + processing (like adding a slash to directory + names, quoting special characters, or suppress- + ing trailing spaces). Intended to be used with + shell functions. + nnooqquuoottee Tell readline not to quote the completed words + if they are filenames (quoting filenames is the + default). + nnoossoorrtt Tell readline not to sort the list of possible + completions alphabetically. + nnoossppaaccee Tell readline not to append a space (the de- + fault) to words completed at the end of the + line. + pplluussddiirrss + After any matches defined by the compspec are + generated, directory name completion is at- + tempted and any matches are added to the results + of the other actions. + --AA _a_c_t_i_o_n + The _a_c_t_i_o_n may be one of the following to generate a + list of possible completions: + aalliiaass Alias names. May also be specified as --aa. + aarrrraayyvvaarr + Array variable names. + bbiinnddiinngg RReeaaddlliinnee key binding names. + bbuuiillttiinn Names of shell builtin commands. May also be + specified as --bb. + ccoommmmaanndd Command names. May also be specified as --cc. + ddiirreeccttoorryy + Directory names. May also be specified as --dd. + ddiissaabblleedd + Names of disabled shell builtins. + eennaabblleedd Names of enabled shell builtins. + eexxppoorrtt Names of exported shell variables. May also be + specified as --ee. + ffiillee File names. May also be specified as --ff. + ffuunnccttiioonn + Names of shell functions. + ggrroouupp Group names. May also be specified as --gg. + hheellppttooppiicc + Help topics as accepted by the hheellpp builtin. + hhoossttnnaammee + Hostnames, as taken from the file specified by + the HHOOSSTTFFIILLEE shell variable. + jjoobb Job names, if job control is active. May also + be specified as --jj. + kkeeyywwoorrdd Shell reserved words. May also be specified as + --kk. + rruunnnniinngg Names of running jobs, if job control is active. + sseerrvviiccee Service names. May also be specified as --ss. + sseettoopptt Valid arguments for the --oo option to the sseett + builtin. + sshhoopptt Shell option names as accepted by the sshhoopptt + builtin. + ssiiggnnaall Signal names. + ssttooppppeedd Names of stopped jobs, if job control is active. + uusseerr User names. May also be specified as --uu. + vvaarriiaabbllee + Names of all shell variables. May also be spec- + ified as --vv. + --CC _c_o_m_m_a_n_d + _c_o_m_m_a_n_d is executed in a subshell environment, and its + output is used as the possible completions. + --FF _f_u_n_c_t_i_o_n + The shell function _f_u_n_c_t_i_o_n is executed in the current + shell environment. When the function is executed, the + first argument ($$11) is the name of the command whose ar- + guments are being completed, the second argument ($$22) is + the word being completed, and the third argument ($$33) is + the word preceding the word being completed on the cur- + rent command line. When it finishes, the possible com- + pletions are retrieved from the value of the CCOOMMPPRREEPPLLYY + array variable. + --GG _g_l_o_b_p_a_t + The pathname expansion pattern _g_l_o_b_p_a_t is expanded to + generate the possible completions. + --PP _p_r_e_f_i_x + _p_r_e_f_i_x is added at the beginning of each possible com- + pletion after all other options have been applied. + --SS _s_u_f_f_i_x + _s_u_f_f_i_x is appended to each possible completion after all + other options have been applied. + --WW _w_o_r_d_l_i_s_t + The _w_o_r_d_l_i_s_t is split using the characters in the IIFFSS + special variable as delimiters, and each resultant word + is expanded. Shell quoting is honored within _w_o_r_d_l_i_s_t, + in order to provide a mechanism for the words to contain + shell metacharacters or characters in the value of IIFFSS. + The possible completions are the members of the resul- + tant list which match the word being completed. + --XX _f_i_l_t_e_r_p_a_t + _f_i_l_t_e_r_p_a_t is a pattern as used for pathname expansion. + It is applied to the list of possible completions gener- + ated by the preceding options and arguments, and each + completion matching _f_i_l_t_e_r_p_a_t is removed from the list. + A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this + case, any completion not matching _f_i_l_t_e_r_p_a_t is removed. + + The return value is true unless an invalid option is supplied, + an option other than --pp or --rr is supplied without a _n_a_m_e argu- + ment, an attempt is made to remove a completion specification + for a _n_a_m_e for which no specification exists, or an error occurs + adding a completion specification. + + ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEEII] [++oo _o_p_t_i_o_n] [_n_a_m_e] + Modify completion options for each _n_a_m_e according to the _o_p_- + _t_i_o_ns, or for the currently-executing completion if no _n_a_m_es are + supplied. If no _o_p_t_i_o_ns are given, display the completion op- + tions for each _n_a_m_e or the current completion. The possible + values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin de- + scribed above. The --DD option indicates that other supplied op- + tions should apply to the ``default'' command completion; that + is, completion attempted on a command for which no completion + has previously been defined. The --EE option indicates that other + supplied options should apply to ``empty'' command completion; + that is, completion attempted on a blank line. The --II option + indicates that other supplied options should apply to completion + on the initial non-assignment word on the line, or after a com- + mand delimiter such as ;; or ||, which is usually command name + completion. + + The return value is true unless an invalid option is supplied, + an attempt is made to modify the options for a _n_a_m_e for which no + completion specification exists, or an output error occurs. + + ccoonnttiinnuuee [_n] + Resume the next iteration of the enclosing ffoorr, wwhhiillee, uunnttiill, or + sseelleecctt loop. If _n is specified, resume at the _nth enclosing + loop. _n must be >= 1. If _n is greater than the number of en- + closing loops, the last enclosing loop (the ``top-level'' loop) + is resumed. The return value is 0 unless _n is not greater than + or equal to 1. + + ddeeccllaarree [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] + ttyyppeesseett [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] + Declare variables and/or give them attributes. If no _n_a_m_es are + given then display the values of variables. The --pp option will + display the attributes and values of each _n_a_m_e. When --pp is used + with _n_a_m_e arguments, additional options, other than --ff and --FF, + are ignored. When --pp is supplied without _n_a_m_e arguments, it + will display the attributes and values of all variables having + the attributes specified by the additional options. If no other + options are supplied with --pp, ddeeccllaarree will display the at- + tributes and values of all shell variables. The --ff option will + restrict the display to shell functions. The --FF option inhibits + the display of function definitions; only the function name and + attributes are printed. If the eexxttddeebbuugg shell option is enabled + using sshhoopptt, the source file name and line number where each + _n_a_m_e is defined are displayed as well. The --FF option implies + --ff. The --gg option forces variables to be created or modified at + the global scope, even when ddeeccllaarree is executed in a shell func- + tion. It is ignored in all other cases. The --II option causes + local variables to inherit the attributes (except the _n_a_m_e_r_e_f + attribute) and value of any existing variable with the same _n_a_m_e + at a surrounding scope. If there is no existing variable, the + local variable is initially unset. The following options can be + used to restrict output to variables with the specified attri- + bute or to give variables attributes: + --aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss + above). + --AA Each _n_a_m_e is an associative array variable (see AArrrraayyss + above). + --ff Use function names only. + --ii The variable is treated as an integer; arithmetic evalua- + tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when + the variable is assigned a value. + --ll When the variable is assigned a value, all upper-case + characters are converted to lower-case. The upper-case + attribute is disabled. + --nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name + reference to another variable. That other variable is + defined by the value of _n_a_m_e. All references, assign- + ments, and attribute modifications to _n_a_m_e, except those + using or changing the --nn attribute itself, are performed + on the variable referenced by _n_a_m_e's value. The nameref + attribute cannot be applied to array variables. + --rr Make _n_a_m_es readonly. These names cannot then be assigned + values by subsequent assignment statements or unset. + --tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions in- + herit the DDEEBBUUGG and RREETTUURRNN traps from the calling shell. + The trace attribute has no special meaning for variables. + --uu When the variable is assigned a value, all lower-case + characters are converted to upper-case. The lower-case + attribute is disabled. + --xx Mark _n_a_m_es for export to subsequent commands via the en- + vironment. + + Using `+' instead of `-' turns off the attribute instead, with + the exceptions that ++aa and ++AA may not be used to destroy array + variables and ++rr will not remove the readonly attribute. When + used in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e local, as + with the llooccaall command, unless the --gg option is supplied. If a + variable name is followed by =_v_a_l_u_e, the value of the variable + is set to _v_a_l_u_e. When using --aa or --AA and the compound assign- + ment syntax to create array variables, additional attributes do + not take effect until subsequent assignments. The return value + is 0 unless an invalid option is encountered, an attempt is made + to define a function using ``-f foo=bar'', an attempt is made to + assign a value to a readonly variable, an attempt is made to as- + sign a value to an array variable without using the compound as- + signment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a + valid shell variable name, an attempt is made to turn off read- + only status for a readonly variable, an attempt is made to turn + off array status for an array variable, or an attempt is made to + display a non-existent function with --ff. + + ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]] + Without options, displays the list of currently remembered di- + rectories. The default display is on a single line with direc- + tory names separated by spaces. Directories are added to the + list with the ppuusshhdd command; the ppooppdd command removes entries + from the list. The current directory is always the first direc- + tory in the stack. + --cc Clears the directory stack by deleting all of the en- + tries. + --ll Produces a listing using full pathnames; the default + listing format uses a tilde to denote the home directory. + --pp Print the directory stack with one entry per line. + --vv Print the directory stack with one entry per line, pre- + fixing each entry with its index in the stack. + ++_n Displays the _nth entry counting from the left of the list + shown by ddiirrss when invoked without options, starting with + zero. + --_n Displays the _nth entry counting from the right of the + list shown by ddiirrss when invoked without options, starting + with zero. + + The return value is 0 unless an invalid option is supplied or _n + indexes beyond the end of the directory stack. + + ddiissoowwnn [--aarr] [--hh] [_j_o_b_s_p_e_c ... | _p_i_d ... ] + Without options, remove each _j_o_b_s_p_e_c from the table of active + jobs. If _j_o_b_s_p_e_c is not present, and neither the --aa nor the --rr + option is supplied, the _c_u_r_r_e_n_t _j_o_b is used. If the --hh option + is given, each _j_o_b_s_p_e_c is not removed from the table, but is + marked so that SSIIGGHHUUPP is not sent to the job if the shell re- + ceives a SSIIGGHHUUPP. If no _j_o_b_s_p_e_c is supplied, the --aa option means + to remove or mark all jobs; the --rr option without a _j_o_b_s_p_e_c ar- + gument restricts operation to running jobs. The return value is + 0 unless a _j_o_b_s_p_e_c does not specify a valid job. + + eecchhoo [--nneeEE] [_a_r_g ...] + Output the _a_r_gs, separated by spaces, followed by a newline. + The return status is 0 unless a write error occurs. If --nn is + specified, the trailing newline is suppressed. If the --ee option + is given, interpretation of the following backslash-escaped + characters is enabled. The --EE option disables the interpreta- + tion of these escape characters, even on systems where they are + interpreted by default. The xxppgg__eecchhoo shell option may be used + to dynamically determine whether or not eecchhoo expands these es- + cape characters by default. eecchhoo does not interpret ---- to mean + the end of options. eecchhoo interprets the following escape se- + quences: + \\aa alert (bell) + \\bb backspace + \\cc suppress further output + \\ee + \\EE an escape character + \\ff form feed + \\nn new line + \\rr carriage return + \\tt horizontal tab + \\vv vertical tab + \\\\ backslash + \\00_n_n_n the eight-bit character whose value is the octal value + _n_n_n (zero to three octal digits) + \\xx_H_H the eight-bit character whose value is the hexadecimal + value _H_H (one or two hex digits) + \\uu_H_H_H_H the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H (one to four hex digits) + \\UU_H_H_H_H_H_H_H_H + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H_H_H_H_H (one to eight hex digits) + + eennaabbllee [--aa] [--ddnnppss] [--ff _f_i_l_e_n_a_m_e] [_n_a_m_e ...] + Enable and disable builtin shell commands. Disabling a builtin + allows a disk command which has the same name as a shell builtin + to be executed without specifying a full pathname, even though + the shell normally searches for builtins before disk commands. + If --nn is used, each _n_a_m_e is disabled; otherwise, _n_a_m_e_s are en- + abled. For example, to use the tteesstt binary found via the PPAATTHH + instead of the shell builtin version, run ``enable -n test''. + The --ff option means to load the new builtin command _n_a_m_e from + shared object _f_i_l_e_n_a_m_e, on systems that support dynamic loading. + The --dd option will delete a builtin previously loaded with --ff. + If no _n_a_m_e arguments are given, or if the --pp option is supplied, + a list of shell builtins is printed. With no other option argu- + ments, the list consists of all enabled shell builtins. If --nn + is supplied, only disabled builtins are printed. If --aa is sup- + plied, the list printed includes all builtins, with an indica- + tion of whether or not each is enabled. If --ss is supplied, the + output is restricted to the POSIX _s_p_e_c_i_a_l builtins. The return + value is 0 unless a _n_a_m_e is not a shell builtin or there is an + error loading a new builtin from a shared object. + + eevvaall [_a_r_g ...] + The _a_r_gs are read and concatenated together into a single com- + mand. This command is then read and executed by the shell, and + its exit status is returned as the value of eevvaall. If there are + no _a_r_g_s, or only null arguments, eevvaall returns 0. + + eexxeecc [--ccll] [--aa _n_a_m_e] [_c_o_m_m_a_n_d [_a_r_g_u_m_e_n_t_s]] + If _c_o_m_m_a_n_d is specified, it replaces the shell. No new process + is created. The _a_r_g_u_m_e_n_t_s become the arguments to _c_o_m_m_a_n_d. If + the --ll option is supplied, the shell places a dash at the begin- + ning of the zeroth argument passed to _c_o_m_m_a_n_d. This is what _l_o_- + _g_i_n(1) does. The --cc option causes _c_o_m_m_a_n_d to be executed with + an empty environment. If --aa is supplied, the shell passes _n_a_m_e + as the zeroth argument to the executed command. If _c_o_m_m_a_n_d can- + not be executed for some reason, a non-interactive shell exits, + unless the eexxeeccffaaiill shell option is enabled. In that case, it + returns failure. An interactive shell returns failure if the + file cannot be executed. A subshell exits unconditionally if + eexxeecc fails. If _c_o_m_m_a_n_d is not specified, any redirections take + effect in the current shell, and the return status is 0. If + there is a redirection error, the return status is 1. + + eexxiitt [_n] + Cause the shell to exit with a status of _n. If _n is omitted, + the exit status is that of the last command executed. A trap on + EEXXIITT is executed before the shell terminates. + + eexxppoorrtt [--ffnn] [_n_a_m_e[=_w_o_r_d]] ... + eexxppoorrtt --pp + The supplied _n_a_m_e_s are marked for automatic export to the envi- + ronment of subsequently executed commands. If the --ff option is + given, the _n_a_m_e_s refer to functions. If no _n_a_m_e_s are given, or + if the --pp option is supplied, a list of names of all exported + variables is printed. The --nn option causes the export property + to be removed from each _n_a_m_e. If a variable name is followed by + =_w_o_r_d, the value of the variable is set to _w_o_r_d. eexxppoorrtt returns + an exit status of 0 unless an invalid option is encountered, one + of the _n_a_m_e_s is not a valid shell variable name, or --ff is sup- + plied with a _n_a_m_e that is not a function. + + ffcc [--ee _e_n_a_m_e] [--llnnrr] [_f_i_r_s_t] [_l_a_s_t] + ffcc --ss [_p_a_t=_r_e_p] [_c_m_d] + The first form selects a range of commands from _f_i_r_s_t to _l_a_s_t + from the history list and displays or edits and re-executes + them. _F_i_r_s_t and _l_a_s_t may be specified as a string (to locate + the last command beginning with that string) or as a number (an + index into the history list, where a negative number is used as + an offset from the current command number). When listing, a + _f_i_r_s_t or _l_a_s_t of 0 is equivalent to -1 and -0 is equivalent to + the current command (usually the ffcc command); otherwise 0 is + equivalent to -1 and -0 is invalid. If _l_a_s_t is not specified, + it is set to the current command for listing (so that ``fc -l + -10'' prints the last 10 commands) and to _f_i_r_s_t otherwise. If + _f_i_r_s_t is not specified, it is set to the previous command for + editing and -16 for listing. + + The --nn option suppresses the command numbers when listing. The + --rr option reverses the order of the commands. If the --ll option + is given, the commands are listed on standard output. Other- + wise, the editor given by _e_n_a_m_e is invoked on a file containing + those commands. If _e_n_a_m_e is not given, the value of the FFCCEEDDIITT + variable is used, and the value of EEDDIITTOORR if FFCCEEDDIITT is not set. + If neither variable is set, _v_i is used. When editing is com- + plete, the edited commands are echoed and executed. + + In the second form, _c_o_m_m_a_n_d is re-executed after each instance + of _p_a_t is replaced by _r_e_p. _C_o_m_m_a_n_d is interpreted the same as + _f_i_r_s_t above. A useful alias to use with this is ``r="fc -s"'', + so that typing ``r cc'' runs the last command beginning with + ``cc'' and typing ``r'' re-executes the last command. + + If the first form is used, the return value is 0 unless an in- + valid option is encountered or _f_i_r_s_t or _l_a_s_t specify history + lines out of range. If the --ee option is supplied, the return + value is the value of the last command executed or failure if an + error occurs with the temporary file of commands. If the second + form is used, the return status is that of the command re-exe- + cuted, unless _c_m_d does not specify a valid history line, in + which case ffcc returns failure. + + ffgg [_j_o_b_s_p_e_c] + Resume _j_o_b_s_p_e_c in the foreground, and make it the current job. + If _j_o_b_s_p_e_c is not present, the shell's notion of the _c_u_r_r_e_n_t _j_o_b + is used. The return value is that of the command placed into + the foreground, or failure if run when job control is disabled + or, when run with job control enabled, if _j_o_b_s_p_e_c does not spec- + ify a valid job or _j_o_b_s_p_e_c specifies a job that was started + without job control. + + ggeettooppttss _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g _._._.] + ggeettooppttss is used by shell procedures to parse positional parame- + ters. _o_p_t_s_t_r_i_n_g contains the option characters to be recog- + nized; if a character is followed by a colon, the option is ex- + pected to have an argument, which should be separated from it by + white space. The colon and question mark characters may not be + used as option characters. Each time it is invoked, ggeettooppttss + places the next option in the shell variable _n_a_m_e, initializing + _n_a_m_e if it does not exist, and the index of the next argument to + be processed into the variable OOPPTTIINNDD. OOPPTTIINNDD is initialized to + 1 each time the shell or a shell script is invoked. When an op- + tion requires an argument, ggeettooppttss places that argument into the + variable OOPPTTAARRGG. The shell does not reset OOPPTTIINNDD automatically; + it must be manually reset between multiple calls to ggeettooppttss + within the same shell invocation if a new set of parameters is + to be used. + + When the end of options is encountered, ggeettooppttss exits with a re- + turn value greater than zero. OOPPTTIINNDD is set to the index of the + first non-option argument, and _n_a_m_e is set to ?. + + ggeettooppttss normally parses the positional parameters, but if more + arguments are supplied as _a_r_g values, ggeettooppttss parses those in- + stead. + + ggeettooppttss can report errors in two ways. If the first character + of _o_p_t_s_t_r_i_n_g is a colon, _s_i_l_e_n_t error reporting is used. In + normal operation, diagnostic messages are printed when invalid + options or missing option arguments are encountered. If the + variable OOPPTTEERRRR is set to 0, no error messages will be dis- + played, even if the first character of _o_p_t_s_t_r_i_n_g is not a colon. + + If an invalid option is seen, ggeettooppttss places ? into _n_a_m_e and, if + not silent, prints an error message and unsets OOPPTTAARRGG. If + ggeettooppttss is silent, the option character found is placed in OOPP-- + TTAARRGG and no diagnostic message is printed. + + If a required argument is not found, and ggeettooppttss is not silent, + a question mark (??) is placed in _n_a_m_e, OOPPTTAARRGG is unset, and a + diagnostic message is printed. If ggeettooppttss is silent, then a + colon (::) is placed in _n_a_m_e and OOPPTTAARRGG is set to the option + character found. + + ggeettooppttss returns true if an option, specified or unspecified, is + found. It returns false if the end of options is encountered or + an error occurs. + + hhaasshh [--llrr] [--pp _f_i_l_e_n_a_m_e] [--ddtt] [_n_a_m_e] + Each time hhaasshh is invoked, the full pathname of the command _n_a_m_e + is determined by searching the directories in $$PPAATTHH and remem- + bered. Any previously-remembered pathname is discarded. If the + --pp option is supplied, no path search is performed, and _f_i_l_e_n_a_m_e + is used as the full filename of the command. The --rr option + causes the shell to forget all remembered locations. The --dd op- + tion causes the shell to forget the remembered location of each + _n_a_m_e. If the --tt option is supplied, the full pathname to which + each _n_a_m_e corresponds is printed. If multiple _n_a_m_e arguments + are supplied with --tt, the _n_a_m_e is printed before the hashed full + pathname. The --ll option causes output to be displayed in a for- + mat that may be reused as input. If no arguments are given, or + if only --ll is supplied, information about remembered commands is + printed. The return status is true unless a _n_a_m_e is not found + or an invalid option is supplied. + + hheellpp [--ddmmss] [_p_a_t_t_e_r_n] + Display helpful information about builtin commands. If _p_a_t_t_e_r_n + is specified, hheellpp gives detailed help on all commands matching + _p_a_t_t_e_r_n; otherwise help for all the builtins and shell control + structures is printed. + --dd Display a short description of each _p_a_t_t_e_r_n + --mm Display the description of each _p_a_t_t_e_r_n in a manpage-like + format + --ss Display only a short usage synopsis for each _p_a_t_t_e_r_n + + The return status is 0 unless no command matches _p_a_t_t_e_r_n. + + hhiissttoorryy [[_n]] + hhiissttoorryy --cc + hhiissttoorryy --dd _o_f_f_s_e_t + hhiissttoorryy --dd _s_t_a_r_t-_e_n_d + hhiissttoorryy --aannrrww [_f_i_l_e_n_a_m_e] + hhiissttoorryy --pp _a_r_g [_a_r_g _._._.] + hhiissttoorryy --ss _a_r_g [_a_r_g _._._.] + With no options, display the command history list with line num- + bers. Lines listed with a ** have been modified. An argument of + _n lists only the last _n lines. If the shell variable HHIISSTTTTIIMMEE-- + FFOORRMMAATT is set and not null, it is used as a format string for + _s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis- + played history entry. No intervening blank is printed between + the formatted time stamp and the history line. If _f_i_l_e_n_a_m_e is + supplied, it is used as the name of the history file; if not, + the value of HHIISSTTFFIILLEE is used. Options, if supplied, have the + following meanings: + --cc Clear the history list by deleting all the entries. + --dd _o_f_f_s_e_t + Delete the history entry at position _o_f_f_s_e_t. If _o_f_f_s_e_t + is negative, it is interpreted as relative to one greater + than the last history position, so negative indices count + back from the end of the history, and an index of -1 + refers to the current hhiissttoorryy --dd command. + --dd _s_t_a_r_t-_e_n_d + Delete the history entries between positions _s_t_a_r_t and + _e_n_d, inclusive. Positive and negative values for _s_t_a_r_t + and _e_n_d are interpreted as described above. + --aa Append the ``new'' history lines to the history file. + These are history lines entered since the beginning of + the current bbaasshh session, but not already appended to the + history file. + --nn Read the history lines not already read from the history + file into the current history list. These are lines ap- + pended to the history file since the beginning of the + current bbaasshh session. + --rr Read the contents of the history file and append them to + the current history list. + --ww Write the current history list to the history file, over- + writing the history file's contents. + --pp Perform history substitution on the following _a_r_g_s and + display the result on the standard output. Does not + store the results in the history list. Each _a_r_g must be + quoted to disable normal history expansion. + --ss Store the _a_r_g_s in the history list as a single entry. + The last command in the history list is removed before + the _a_r_g_s are added. + + If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, the time stamp informa- + tion associated with each history entry is written to the his- + tory file, marked with the history comment character. When the + history file is read, lines beginning with the history comment + character followed immediately by a digit are interpreted as + timestamps for the following history entry. The return value is + 0 unless an invalid option is encountered, an error occurs while + reading or writing the history file, an invalid _o_f_f_s_e_t is sup- + plied as an argument to --dd, or the history expansion supplied as + an argument to --pp fails. + + jjoobbss [--llnnpprrss] [ _j_o_b_s_p_e_c ... ] + jjoobbss --xx _c_o_m_m_a_n_d [ _a_r_g_s ... ] + The first form lists the active jobs. The options have the fol- + lowing meanings: + --ll List process IDs in addition to the normal information. + --nn Display information only about jobs that have changed + status since the user was last notified of their status. + --pp List only the process ID of the job's process group + leader. + --rr Display only running jobs. + --ss Display only stopped jobs. + + If _j_o_b_s_p_e_c is given, output is restricted to information about + that job. The return status is 0 unless an invalid option is + encountered or an invalid _j_o_b_s_p_e_c is supplied. + + If the --xx option is supplied, jjoobbss replaces any _j_o_b_s_p_e_c found in + _c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and ex- + ecutes _c_o_m_m_a_n_d passing it _a_r_g_s, returning its exit status. + + kkiillll [--ss _s_i_g_s_p_e_c | --nn _s_i_g_n_u_m | --_s_i_g_s_p_e_c] [_p_i_d | _j_o_b_s_p_e_c] ... + kkiillll --ll|--LL [_s_i_g_s_p_e_c | _e_x_i_t___s_t_a_t_u_s] + Send the signal named by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes + named by _p_i_d or _j_o_b_s_p_e_c. _s_i_g_s_p_e_c is either a case-insensitive + signal name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or + a signal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not + present, then SSIIGGTTEERRMM is assumed. An argument of --ll lists the + signal names. If any arguments are supplied when --ll is given, + the names of the signals corresponding to the arguments are + listed, and the return status is 0. The _e_x_i_t___s_t_a_t_u_s argument to + --ll is a number specifying either a signal number or the exit + status of a process terminated by a signal. The --LL option is + equivalent to --ll. kkiillll returns true if at least one signal was + successfully sent, or false if an error occurs or an invalid op- + tion is encountered. + + lleett _a_r_g [_a_r_g ...] + Each _a_r_g is an arithmetic expression to be evaluated (see AARRIITTHH-- + MMEETTIICC EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett + returns 1; 0 is returned otherwise. + + llooccaall [_o_p_t_i_o_n] [_n_a_m_e[=_v_a_l_u_e] ... | - ] + For each argument, a local variable named _n_a_m_e is created, and + assigned _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted + by ddeeccllaarree. When llooccaall is used within a function, it causes the + variable _n_a_m_e to have a visible scope restricted to that func- + tion and its children. If _n_a_m_e is -, the set of shell options + is made local to the function in which llooccaall is invoked: shell + options changed using the sseett builtin inside the function are + restored to their original values when the function returns. + The restore is effected as if a series of sseett commands were exe- + cuted to restore the values that were in place before the func- + tion. With no operands, llooccaall writes a list of local variables + to the standard output. It is an error to use llooccaall when not + within a function. The return status is 0 unless llooccaall is used + outside a function, an invalid _n_a_m_e is supplied, or _n_a_m_e is a + readonly variable. + + llooggoouutt Exit a login shell. + + mmaappffiillee [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC + _c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y] + rreeaaddaarrrraayy [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC + _c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y] + Read lines from the standard input into the indexed array vari- + able _a_r_r_a_y, or from file descriptor _f_d if the --uu option is sup- + plied. The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if + supplied, have the following meanings: + --dd The first character of _d_e_l_i_m is used to terminate each + input line, rather than newline. If _d_e_l_i_m is the empty + string, mmaappffiillee will terminate a line when it reads a NUL + character. + --nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are + copied. + --OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default + index is 0. + --ss Discard the first _c_o_u_n_t lines read. + --tt Remove a trailing _d_e_l_i_m (default newline) from each line + read. + --uu Read lines from file descriptor _f_d instead of the stan- + dard input. + --CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The + --cc option specifies _q_u_a_n_t_u_m. + --cc Specify the number of lines read between each call to + _c_a_l_l_b_a_c_k. + + If --CC is specified without --cc, the default quantum is 5000. + When _c_a_l_l_b_a_c_k is evaluated, it is supplied the index of the next + array element to be assigned and the line to be assigned to that + element as additional arguments. _c_a_l_l_b_a_c_k is evaluated after + the line is read but before the array element is assigned. + + If not supplied with an explicit origin, mmaappffiillee will clear _a_r_- + _r_a_y before assigning to it. + + mmaappffiillee returns successfully unless an invalid option or option + argument is supplied, _a_r_r_a_y is invalid or unassignable, or if + _a_r_r_a_y is not an indexed array. + + ppooppdd [-nn] [+_n] [-_n] + Removes entries from the directory stack. With no arguments, + removes the top directory from the stack, and performs a ccdd to + the new top directory. Arguments, if supplied, have the follow- + ing meanings: + --nn Suppresses the normal change of directory when removing + directories from the stack, so that only the stack is ma- + nipulated. + ++_n Removes the _nth entry counting from the left of the list + shown by ddiirrss, starting with zero. For example: ``popd + +0'' removes the first directory, ``popd +1'' the second. + --_n Removes the _nth entry counting from the right of the list + shown by ddiirrss, starting with zero. For example: ``popd + -0'' removes the last directory, ``popd -1'' the next to + last. + + If the ppooppdd command is successful, a ddiirrss is performed as well, + and the return status is 0. ppooppdd returns false if an invalid + option is encountered, the directory stack is empty, a non-exis- + tent directory stack entry is specified, or the directory change + fails. + + pprriinnttff [--vv _v_a_r] _f_o_r_m_a_t [_a_r_g_u_m_e_n_t_s] + Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the + control of the _f_o_r_m_a_t. The --vv option causes the output to be + assigned to the variable _v_a_r rather than being printed to the + standard output. + + The _f_o_r_m_a_t is a character string which contains three types of + objects: plain characters, which are simply copied to standard + output, character escape sequences, which are converted and + copied to the standard output, and format specifications, each + of which causes printing of the next successive _a_r_g_u_m_e_n_t. In + addition to the standard _p_r_i_n_t_f(1) format specifications, pprriinnttff + interprets the following extensions: + %%bb causes pprriinnttff to expand backslash escape sequences in the + corresponding _a_r_g_u_m_e_n_t in the same way as eecchhoo --ee. + %%qq causes pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a + format that can be reused as shell input. + %%((_d_a_t_e_f_m_t))TT + causes pprriinnttff to output the date-time string resulting + from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3). + The corresponding _a_r_g_u_m_e_n_t is an integer representing the + number of seconds since the epoch. Two special argument + values may be used: -1 represents the current time, and + -2 represents the time the shell was invoked. If no ar- + gument is specified, conversion behaves as if -1 had been + given. This is an exception to the usual pprriinnttff behav- + ior. + + The %b, %q, and %T directives all use the field width and preci- + sion arguments from the format specification and write that many + bytes from (or use that wide a field for) the expanded argument, + which usually contains more characters than the original. + + Arguments to non-string format specifiers are treated as C con- + stants, except that a leading plus or minus sign is allowed, and + if the leading character is a single or double quote, the value + is the ASCII value of the following character. + + The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_- + _m_e_n_t_s. If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied, + the extra format specifications behave as if a zero value or + null string, as appropriate, had been supplied. The return + value is zero on success, non-zero on failure. + + ppuusshhdd [--nn] [+_n] [-_n] + ppuusshhdd [--nn] [_d_i_r] + Adds a directory to the top of the directory stack, or rotates + the stack, making the new top of the stack the current working + directory. With no arguments, ppuusshhdd exchanges the top two di- + rectories and returns 0, unless the directory stack is empty. + Arguments, if supplied, have the following meanings: + --nn Suppresses the normal change of directory when rotating + or adding directories to the stack, so that only the + stack is manipulated. + ++_n Rotates the stack so that the _nth directory (counting + from the left of the list shown by ddiirrss, starting with + zero) is at the top. + --_n Rotates the stack so that the _nth directory (counting + from the right of the list shown by ddiirrss, starting with + zero) is at the top. + _d_i_r Adds _d_i_r to the directory stack at the top, making it the + new current working directory as if it had been supplied + as the argument to the ccdd builtin. + + If the ppuusshhdd command is successful, a ddiirrss is performed as well. + If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r + fails. With the second form, ppuusshhdd returns 0 unless the direc- + tory stack is empty, a non-existent directory stack element is + specified, or the directory change to the specified new current + directory fails. + + ppwwdd [--LLPP] + Print the absolute pathname of the current working directory. + The pathname printed contains no symbolic links if the --PP option + is supplied or the --oo pphhyyssiiccaall option to the sseett builtin command + is enabled. If the --LL option is used, the pathname printed may + contain symbolic links. The return status is 0 unless an error + occurs while reading the name of the current directory or an in- + valid option is supplied. + + rreeaadd [--eerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [--ii _t_e_x_t] [--nn _n_c_h_a_r_s] [--NN _n_c_h_a_r_s] [--pp + _p_r_o_m_p_t] [--tt _t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...] + One line is read from the standard input, or from the file de- + scriptor _f_d supplied as an argument to the --uu option, split into + words as described above under WWoorrdd SSpplliittttiinngg, and the first + word is assigned to the first _n_a_m_e, the second word to the sec- + ond _n_a_m_e, and so on. If there are more words than names, the + remaining words and their intervening delimiters are assigned to + the last _n_a_m_e. If there are fewer words read from the input + stream than names, the remaining names are assigned empty val- + ues. The characters in IIFFSS are used to split the line into + words using the same rules the shell uses for expansion (de- + scribed above under WWoorrdd SSpplliittttiinngg). The backslash character + (\\) may be used to remove any special meaning for the next char- + acter read and for line continuation. Options, if supplied, + have the following meanings: + --aa _a_n_a_m_e + The words are assigned to sequential indices of the array + variable _a_n_a_m_e, starting at 0. _a_n_a_m_e is unset before any + new values are assigned. Other _n_a_m_e arguments are ig- + nored. + --dd _d_e_l_i_m + The first character of _d_e_l_i_m is used to terminate the in- + put line, rather than newline. If _d_e_l_i_m is the empty + string, rreeaadd will terminate a line when it reads a NUL + character. + --ee If the standard input is coming from a terminal, rreeaaddlliinnee + (see RREEAADDLLIINNEE above) is used to obtain the line. Read- + line uses the current (or default, if line editing was + not previously active) editing settings, but uses Read- + line's default filename completion. + --ii _t_e_x_t + If rreeaaddlliinnee is being used to read the line, _t_e_x_t is + placed into the editing buffer before editing begins. + --nn _n_c_h_a_r_s + rreeaadd returns after reading _n_c_h_a_r_s characters rather than + waiting for a complete line of input, but honors a delim- + iter if fewer than _n_c_h_a_r_s characters are read before the + delimiter. + --NN _n_c_h_a_r_s + rreeaadd returns after reading exactly _n_c_h_a_r_s characters + rather than waiting for a complete line of input, unless + EOF is encountered or rreeaadd times out. Delimiter charac- + ters encountered in the input are not treated specially + and do not cause rreeaadd to return until _n_c_h_a_r_s characters + are read. The result is not split on the characters in + IIFFSS; the intent is that the variable is assigned exactly + the characters read (with the exception of backslash; see + the --rr option below). + --pp _p_r_o_m_p_t + Display _p_r_o_m_p_t on standard error, without a trailing new- + line, before attempting to read any input. The prompt is + displayed only if input is coming from a terminal. + --rr Backslash does not act as an escape character. The back- + slash is considered to be part of the line. In particu- + lar, a backslash-newline pair may not then be used as a + line continuation. + --ss Silent mode. If input is coming from a terminal, charac- + ters are not echoed. + --tt _t_i_m_e_o_u_t + Cause rreeaadd to time out and return failure if a complete + line of input (or a specified number of characters) is + not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a deci- + mal number with a fractional portion following the deci- + mal point. This option is only effective if rreeaadd is + reading input from a terminal, pipe, or other special + file; it has no effect when reading from regular files. + If rreeaadd times out, rreeaadd saves any partial input read into + the specified variable _n_a_m_e. If _t_i_m_e_o_u_t is 0, rreeaadd re- + turns immediately, without trying to read any data. The + exit status is 0 if input is available on the specified + file descriptor, non-zero otherwise. The exit status is + greater than 128 if the timeout is exceeded. + --uu _f_d Read input from file descriptor _f_d. + + If no _n_a_m_e_s are supplied, the line read, without the ending de- + limiter but otherwise unmodified, is assigned to the variable + RREEPPLLYY. The exit status is zero, unless end-of-file is encoun- + tered, rreeaadd times out (in which case the status is greater than + 128), a variable assignment error (such as assigning to a read- + only variable) occurs, or an invalid file descriptor is supplied + as the argument to --uu. + + rreeaaddoonnllyy [--aaAAff] [--pp] [_n_a_m_e[=_w_o_r_d] ...] + The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s + may not be changed by subsequent assignment. If the --ff option + is supplied, the functions corresponding to the _n_a_m_e_s are so + marked. The --aa option restricts the variables to indexed ar- + rays; the --AA option restricts the variables to associative ar- + rays. If both options are supplied, --AA takes precedence. If no + _n_a_m_e arguments are given, or if the --pp option is supplied, a + list of all readonly names is printed. The other options may be + used to restrict the output to a subset of the set of readonly + names. The --pp option causes output to be displayed in a format + that may be reused as input. If a variable name is followed by + =_w_o_r_d, the value of the variable is set to _w_o_r_d. The return + status is 0 unless an invalid option is encountered, one of the + _n_a_m_e_s is not a valid shell variable name, or --ff is supplied with + a _n_a_m_e that is not a function. + + rreettuurrnn [_n] + Causes a function to stop executing and return the value speci- + fied by _n to its caller. If _n is omitted, the return status is + that of the last command executed in the function body. If rree-- + ttuurrnn is executed by a trap handler, the last command used to de- + termine the status is the last command executed before the trap + handler. If rreettuurrnn is executed during a DDEEBBUUGG trap, the last + command used to determine the status is the last command exe- + cuted by the trap handler before rreettuurrnn was invoked. If rreettuurrnn + is used outside a function, but during execution of a script by + the .. (ssoouurrccee) command, it causes the shell to stop executing + that script and return either _n or the exit status of the last + command executed within the script as the exit status of the + script. If _n is supplied, the return value is its least signif- + icant 8 bits. The return status is non-zero if rreettuurrnn is sup- + plied a non-numeric argument, or is used outside a function and + not during execution of a script by .. or ssoouurrccee. Any command + associated with the RREETTUURRNN trap is executed before execution re- + sumes after the function or script. + + sseett [----aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [--oo _o_p_t_i_o_n_-_n_a_m_e] [_a_r_g ...] + sseett [++aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [++oo _o_p_t_i_o_n_-_n_a_m_e] [_a_r_g ...] + Without options, the name and value of each shell variable are + displayed in a format that can be reused as input for setting or + resetting the currently-set variables. Read-only variables can- + not be reset. In _p_o_s_i_x _m_o_d_e, only shell variables are listed. + The output is sorted according to the current locale. When op- + tions are specified, they set or unset shell attributes. Any + arguments remaining after option processing are treated as val- + ues for the positional parameters and are assigned, in order, to + $$11, $$22, ...... $$_n. Options, if specified, have the following + meanings: + --aa Each variable or function that is created or modified is + given the export attribute and marked for export to the + environment of subsequent commands. + --bb Report the status of terminated background jobs immedi- + ately, rather than before the next primary prompt. This + is effective only when job control is enabled. + --ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a + single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d + (see SSHHEELLLL GGRRAAMMMMAARR above), exits with a non-zero status. + The shell does not exit if the command that fails is + part of the command list immediately following a wwhhiillee + or uunnttiill keyword, part of the test following the iiff or + eelliiff reserved words, part of any command executed in a + &&&& or |||| list except the command following the final &&&& + or ||||, any command in a pipeline but the last, or if the + command's return value is being inverted with !!. If a + compound command other than a subshell returns a non- + zero status because a command failed while --ee was being + ignored, the shell does not exit. A trap on EERRRR, if + set, is executed before the shell exits. This option + applies to the shell environment and each subshell envi- + ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT + above), and may cause subshells to exit before executing + all the commands in the subshell. + + If a compound command or shell function executes in a + context where --ee is being ignored, none of the commands + executed within the compound command or function body + will be affected by the --ee setting, even if --ee is set + and a command returns a failure status. If a compound + command or shell function sets --ee while executing in a + context where --ee is ignored, that setting will not have + any effect until the compound command or the command + containing the function call completes. + --ff Disable pathname expansion. + --hh Remember the location of commands as they are looked up + for execution. This is enabled by default. + --kk All arguments in the form of assignment statements are + placed in the environment for a command, not just those + that precede the command name. + --mm Monitor mode. Job control is enabled. This option is + on by default for interactive shells on systems that + support it (see JJOOBB CCOONNTTRROOLL above). All processes run + in a separate process group. When a background job com- + pletes, the shell prints a line containing its exit sta- + tus. + --nn Read commands but do not execute them. This may be used + to check a shell script for syntax errors. This is ig- + nored by interactive shells. + --oo _o_p_t_i_o_n_-_n_a_m_e + The _o_p_t_i_o_n_-_n_a_m_e can be one of the following: + aalllleexxppoorrtt + Same as --aa. + bbrraacceeeexxppaanndd + Same as --BB. + eemmaaccss Use an emacs-style command line editing inter- + face. This is enabled by default when the shell + is interactive, unless the shell is started with + the ----nnooeeddiittiinngg option. This also affects the + editing interface used for rreeaadd --ee. + eerrrreexxiitt Same as --ee. + eerrrrttrraaccee + Same as --EE. + ffuunnccttrraaccee + Same as --TT. + hhaasshhaallll Same as --hh. + hhiisstteexxppaanndd + Same as --HH. + hhiissttoorryy Enable command history, as described above under + HHIISSTTOORRYY. This option is on by default in inter- + active shells. + iiggnnoorreeeeooff + The effect is as if the shell command ``IG- + NOREEOF=10'' had been executed (see SShheellll VVaarrii-- + aabblleess above). + kkeeyywwoorrdd Same as --kk. + mmoonniittoorr Same as --mm. + nnoocclloobbbbeerr + Same as --CC. + nnooeexxeecc Same as --nn. + nnoogglloobb Same as --ff. + nnoolloogg Currently ignored. + nnoottiiffyy Same as --bb. + nnoouunnsseett Same as --uu. + oonneeccmmdd Same as --tt. + pphhyyssiiccaall + Same as --PP. + ppiippeeffaaiill + If set, the return value of a pipeline is the + value of the last (rightmost) command to exit + with a non-zero status, or zero if all commands + in the pipeline exit successfully. This option + is disabled by default. + ppoossiixx Change the behavior of bbaasshh where the default + operation differs from the POSIX standard to + match the standard (_p_o_s_i_x _m_o_d_e). See SSEEEE AALLSSOO + below for a reference to a document that details + how posix mode affects bash's behavior. + pprriivviilleeggeedd + Same as --pp. + vveerrbboossee Same as --vv. + vvii Use a vi-style command line editing interface. + This also affects the editing interface used for + rreeaadd --ee. + xxttrraaccee Same as --xx. + If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, the values of the + current options are printed. If ++oo is supplied with no + _o_p_t_i_o_n_-_n_a_m_e, a series of sseett commands to recreate the + current option settings is displayed on the standard + output. + --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the $$EENNVV and + $$BBAASSHH__EENNVV files are not processed, shell functions are + not inherited from the environment, and the SSHHEELLLLOOPPTTSS, + BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they ap- + pear in the environment, are ignored. If the shell is + started with the effective user (group) id not equal to + the real user (group) id, and the --pp option is not sup- + plied, these actions are taken and the effective user id + is set to the real user id. If the --pp option is sup- + plied at startup, the effective user id is not reset. + Turning this option off causes the effective user and + group ids to be set to the real user and group ids. + --tt Exit after reading and executing one command. + --uu Treat unset variables and parameters other than the spe- + cial parameters "@" and "*" as an error when performing + parameter expansion. If expansion is attempted on an + unset variable or parameter, the shell prints an error + message, and, if not interactive, exits with a non-zero + status. + --vv Print shell input lines as they are read. + --xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee + command, sseelleecctt command, or arithmetic ffoorr command, dis- + play the expanded value of PPSS44, followed by the command + and its expanded arguments or associated word list. + --BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn + above). This is on by default. + --CC If set, bbaasshh does not overwrite an existing file with + the >>, >>&&, and <<>> redirection operators. This may be + overridden when creating output files by using the redi- + rection operator >>|| instead of >>. + --EE If set, any trap on EERRRR is inherited by shell functions, + command substitutions, and commands executed in a sub- + shell environment. The EERRRR trap is normally not inher- + ited in such cases. + --HH Enable !! style history substitution. This option is on + by default when the shell is interactive. + --PP If set, the shell does not resolve symbolic links when + executing commands such as ccdd that change the current + working directory. It uses the physical directory + structure instead. By default, bbaasshh follows the logical + chain of directories when performing commands which + change the current directory. + --TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by + shell functions, command substitutions, and commands ex- + ecuted in a subshell environment. The DDEEBBUUGG and RREETTUURRNN + traps are normally not inherited in such cases. + ---- If no arguments follow this option, then the positional + parameters are unset. Otherwise, the positional parame- + ters are set to the _a_r_gs, even if some of them begin + with a --. + -- Signal the end of options, cause all remaining _a_r_gs to + be assigned to the positional parameters. The --xx and --vv + options are turned off. If there are no _a_r_gs, the posi- + tional parameters remain unchanged. + + The options are off by default unless otherwise noted. Using + + rather than - causes these options to be turned off. The op- + tions can also be specified as arguments to an invocation of the + shell. The current set of options may be found in $$--. The re- + turn status is always true unless an invalid option is encoun- + tered. + + sshhiifftt [_n] + The positional parameters from _n+1 ... are renamed to $$11 ........ + Parameters represented by the numbers $$## down to $$##-_n+1 are un- + set. _n must be a non-negative number less than or equal to $$##. + If _n is 0, no parameters are changed. If _n is not given, it is + assumed to be 1. If _n is greater than $$##, the positional param- + eters are not changed. The return status is greater than zero + if _n is greater than $$## or less than zero; otherwise 0. + + sshhoopptt [--ppqqssuu] [--oo] [_o_p_t_n_a_m_e ...] + Toggle the values of settings controlling optional shell behav- + ior. The settings can be either those listed below, or, if the + --oo option is used, those available with the --oo option to the sseett + builtin command. With no options, or with the --pp option, a list + of all settable options is displayed, with an indication of + whether or not each is set; if _o_p_t_n_a_m_e_s are supplied, the output + is restricted to those options. The --pp option causes output to + be displayed in a form that may be reused as input. Other op- + tions have the following meanings: + --ss Enable (set) each _o_p_t_n_a_m_e. + --uu Disable (unset) each _o_p_t_n_a_m_e. + --qq Suppresses normal output (quiet mode); the return status + indicates whether the _o_p_t_n_a_m_e is set or unset. If multi- + ple _o_p_t_n_a_m_e arguments are given with --qq, the return sta- + tus is zero if all _o_p_t_n_a_m_e_s are enabled; non-zero other- + wise. + --oo Restricts the values of _o_p_t_n_a_m_e to be those defined for + the --oo option to the sseett builtin. + + If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, sshhoopptt + shows only those options which are set or unset, respectively. + Unless otherwise noted, the sshhoopptt options are disabled (unset) + by default. + + The return status when listing options is zero if all _o_p_t_n_a_m_e_s + are enabled, non-zero otherwise. When setting or unsetting op- + tions, the return status is zero unless an _o_p_t_n_a_m_e is not a + valid shell option. + + The list of sshhoopptt options is: + + aassssoocc__eexxppaanndd__oonnccee + If set, the shell suppresses multiple evaluation of as- + sociative array subscripts during arithmetic expression + evaluation, while executing builtins that can perform + variable assignments, and while executing builtins that + perform array dereferencing. + aauuttooccdd If set, a command name that is the name of a directory + is executed as if it were the argument to the ccdd com- + mand. This option is only used by interactive shells. + ccddaabbllee__vvaarrss + If set, an argument to the ccdd builtin command that is + not a directory is assumed to be the name of a variable + whose value is the directory to change to. + ccddssppeellll If set, minor errors in the spelling of a directory com- + ponent in a ccdd command will be corrected. The errors + checked for are transposed characters, a missing charac- + ter, and one character too many. If a correction is + found, the corrected filename is printed, and the com- + mand proceeds. This option is only used by interactive + shells. + cchheecckkhhaasshh + If set, bbaasshh checks that a command found in the hash ta- + ble exists before trying to execute it. If a hashed + command no longer exists, a normal path search is per- + formed. + cchheecckkjjoobbss + If set, bbaasshh lists the status of any stopped and running + jobs before exiting an interactive shell. If any jobs + are running, this causes the exit to be deferred until a + second exit is attempted without an intervening command + (see JJOOBB CCOONNTTRROOLL above). The shell always postpones ex- + iting if any jobs are stopped. + cchheecckkwwiinnssiizzee + If set, bbaasshh checks the window size after each external + (non-builtin) command and, if necessary, updates the + values of LLIINNEESS and CCOOLLUUMMNNSS. This option is enabled by + default. + ccmmddhhiisstt If set, bbaasshh attempts to save all lines of a multiple- + line command in the same history entry. This allows + easy re-editing of multi-line commands. This option is + enabled by default, but only has an effect if command + history is enabled, as described above under HHIISSTTOORRYY. + ccoommppaatt3311 + ccoommppaatt3322 + ccoommppaatt4400 + ccoommppaatt4411 + ccoommppaatt4422 + ccoommppaatt4433 + ccoommppaatt4444 + These control aspects of the shell's compatibility mode + (see SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE below). + + ccoommpplleettee__ffuullllqquuoottee + If set, bbaasshh quotes all shell metacharacters in file- + names and directory names when performing completion. + If not set, bbaasshh removes metacharacters such as the dol- + lar sign from the set of characters that will be quoted + in completed filenames when these metacharacters appear + in shell variable references in words to be completed. + This means that dollar signs in variable names that ex- + pand to directories will not be quoted; however, any + dollar signs appearing in filenames will not be quoted, + either. This is active only when bash is using back- + slashes to quote completed filenames. This variable is + set by default, which is the default bash behavior in + versions through 4.2. + + ddiirreexxppaanndd + If set, bbaasshh replaces directory names with the results + of word expansion when performing filename completion. + This changes the contents of the readline editing buf- + fer. If not set, bbaasshh attempts to preserve what the + user typed. + + ddiirrssppeellll + If set, bbaasshh attempts spelling correction on directory + names during word completion if the directory name ini- + tially supplied does not exist. + + ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in + the results of pathname expansion. The filenames ````..'''' + and ````....'''' must always be matched explicitly, even if + ddoottgglloobb is set. + + eexxeeccffaaiill + If set, a non-interactive shell will not exit if it can- + not execute the file specified as an argument to the + eexxeecc builtin command. An interactive shell does not + exit if eexxeecc fails. + + eexxppaanndd__aalliiaasseess + If set, aliases are expanded as described above under + AALLIIAASSEESS. This option is enabled by default for interac- + tive shells. + + eexxttddeebbuugg + If set at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the ----ddeebbuuggggeerr option. If set af- + ter invocation, behavior intended for use by debuggers + is enabled: + + 11.. The --FF option to the ddeeccllaarree builtin displays the + source file name and line number corresponding to + each function name supplied as an argument. + + 22.. If the command run by the DDEEBBUUGG trap returns a + non-zero value, the next command is skipped and + not executed. + + 33.. If the command run by the DDEEBBUUGG trap returns a + value of 2, and the shell is executing in a sub- + routine (a shell function or a shell script exe- + cuted by the .. or ssoouurrccee builtins), the shell + simulates a call to rreettuurrnn. + + 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described + in their descriptions above. + + 55.. Function tracing is enabled: command substitu- + tion, shell functions, and subshells invoked with + (( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps. + + 66.. Error tracing is enabled: command substitution, + shell functions, and subshells invoked with (( + _c_o_m_m_a_n_d )) inherit the EERRRR trap. + + eexxttgglloobb If set, the extended pattern matching features described + above under PPaatthhnnaammee EExxppaannssiioonn are enabled. + + eexxttqquuoottee + If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed + within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double + quotes. This option is enabled by default. + + ffaaiillgglloobb + If set, patterns which fail to match filenames during + pathname expansion result in an expansion error. + + ffoorrccee__ffiiggnnoorree + If set, the suffixes specified by the FFIIGGNNOORREE shell + variable cause words to be ignored when performing word + completion even if the ignored words are the only possi- + ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS above for a de- + scription of FFIIGGNNOORREE. This option is enabled by de- + fault. + + gglloobbaasscciiiirraannggeess + If set, range expressions used in pattern matching + bracket expressions (see PPaatttteerrnn MMaattcchhiinngg above) behave + as if in the traditional C locale when performing com- + parisons. That is, the current locale's collating se- + quence is not taken into account, so bb will not collate + between AA and BB, and upper-case and lower-case ASCII + characters will collate together. + + gglloobbssttaarr + If set, the pattern **** used in a pathname expansion con- + text will match all files and zero or more directories + and subdirectories. If the pattern is followed by a //, + only directories and subdirectories match. + + ggnnuu__eerrrrffmmtt + If set, shell error messages are written in the standard + GNU error message format. + + hhiissttaappppeenndd + If set, the history list is appended to the file named + by the value of the HHIISSTTFFIILLEE variable when the shell ex- + its, rather than overwriting the file. + + hhiissttrreeeeddiitt + If set, and rreeaaddlliinnee is being used, a user is given the + opportunity to re-edit a failed history substitution. + + hhiissttvveerriiffyy + If set, and rreeaaddlliinnee is being used, the results of his- + tory substitution are not immediately passed to the + shell parser. Instead, the resulting line is loaded + into the rreeaaddlliinnee editing buffer, allowing further modi- + fication. + + hhoossttccoommpplleettee + If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to + perform hostname completion when a word containing a @@ + is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE + above). This is enabled by default. + + hhuuppoonneexxiitt + If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter- + active login shell exits. + + iinnhheerriitt__eerrrreexxiitt + If set, command substitution inherits the value of the + eerrrreexxiitt option, instead of unsetting it in the subshell + environment. This option is enabled when _p_o_s_i_x _m_o_d_e is + enabled. + + iinntteerraaccttiivvee__ccoommmmeennttss + If set, allow a word beginning with ## to cause that word + and all remaining characters on that line to be ignored + in an interactive shell (see CCOOMMMMEENNTTSS above). This op- + tion is enabled by default. + + llaassttppiippee + If set, and job control is not active, the shell runs + the last command of a pipeline not executed in the back- + ground in the current shell environment. + + lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line + commands are saved to the history with embedded newlines + rather than using semicolon separators where possible. + + llooccaallvvaarr__iinnhheerriitt + If set, local variables inherit the value and attributes + of a variable of the same name that exists at a previous + scope before any new value is assigned. The nameref at- + tribute is not inherited. + + llooccaallvvaarr__uunnsseett + If set, calling uunnsseett on local variables in previous + function scopes marks them so subsequent lookups find + them unset until that function returns. This is identi- + cal to the behavior of unsetting local variables at the + current function scope. + + llooggiinn__sshheellll + The shell sets this option if it is started as a login + shell (see IINNVVOOCCAATTIIOONN above). The value may not be + changed. + + mmaaiillwwaarrnn + If set, and a file that bbaasshh is checking for mail has + been accessed since the last time it was checked, the + message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis- + played. + + nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn + If set, and rreeaaddlliinnee is being used, bbaasshh will not at- + tempt to search the PPAATTHH for possible completions when + completion is attempted on an empty line. + + nnooccaasseegglloobb + If set, bbaasshh matches filenames in a case-insensitive + fashion when performing pathname expansion (see PPaatthhnnaammee + EExxppaannssiioonn above). + + nnooccaasseemmaattcchh + If set, bbaasshh matches patterns in a case-insensitive + fashion when performing matching while executing ccaassee or + [[[[ conditional commands, when performing pattern substi- + tution word expansions, or when filtering possible com- + pletions as part of programmable completion. + + nnuullllgglloobb + If set, bbaasshh allows patterns which match no files (see + PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string, + rather than themselves. + + pprrooggccoommpp + If set, the programmable completion facilities (see PPrroo-- + ggrraammmmaabbllee CCoommpplleettiioonn above) are enabled. This option is + enabled by default. + + pprrooggccoommpp__aalliiaass + If set, and programmable completion is enabled, bbaasshh + treats a command name that doesn't have any completions + as a possible alias and attempts alias expansion. If it + has an alias, bbaasshh attempts programmable completion us- + ing the command word resulting from the expanded alias. + + pprroommppttvvaarrss + If set, prompt strings undergo parameter expansion, com- + mand substitution, arithmetic expansion, and quote re- + moval after being expanded as described in PPRROOMMPPTTIINNGG + above. This option is enabled by default. + + rreessttrriicctteedd__sshheellll + The shell sets this option if it is started in re- + stricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value + may not be changed. This is not reset when the startup + files are executed, allowing the startup files to dis- + cover whether or not a shell is restricted. + + sshhiifftt__vveerrbboossee + If set, the sshhiifftt builtin prints an error message when + the shift count exceeds the number of positional parame- + ters. + + ssoouurrcceeppaatthh + If set, the ssoouurrccee (..) builtin uses the value of PPAATTHH to + find the directory containing the file supplied as an + argument. This option is enabled by default. + + xxppgg__eecchhoo + If set, the eecchhoo builtin expands backslash-escape se- + quences by default. + + ssuussppeenndd [--ff] + Suspend the execution of this shell until it receives a SSIIGGCCOONNTT + signal. A login shell cannot be suspended; the --ff option can be + used to override this and force the suspension. The return sta- + tus is 0 unless the shell is a login shell and --ff is not sup- + plied, or if job control is not enabled. + + tteesstt _e_x_p_r + [[ _e_x_p_r ]] + Return a status of 0 (true) or 1 (false) depending on the evalu- + ation of the conditional expression _e_x_p_r. Each operator and op- + erand must be a separate argument. Expressions are composed of + the primaries described in the bbaasshh manual page under CCOONNDDII-- + TTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not accept any options, nor does + it accept and ignore an argument of ---- as signifying the end of + options. + + Expressions may be combined using the following operators, + listed in decreasing order of precedence. The evaluation de- + pends on the number of arguments; see below. Operator prece- + dence is used when there are five or more arguments. + !! _e_x_p_r True if _e_x_p_r is false. + (( _e_x_p_r )) + Returns the value of _e_x_p_r. This may be used to override + the normal precedence of operators. + _e_x_p_r_1 -aa _e_x_p_r_2 + True if both _e_x_p_r_1 and _e_x_p_r_2 are true. + _e_x_p_r_1 -oo _e_x_p_r_2 + True if either _e_x_p_r_1 or _e_x_p_r_2 is true. + + tteesstt and [[ evaluate conditional expressions using a set of rules + based on the number of arguments. + + 0 arguments + The expression is false. + 1 argument + The expression is true if and only if the argument is not + null. + 2 arguments + If the first argument is !!, the expression is true if and + only if the second argument is null. If the first argu- + ment is one of the unary conditional operators listed + above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is + true if the unary test is true. If the first argument is + not a valid unary conditional operator, the expression is + false. + 3 arguments + The following conditions are applied in the order listed. + If the second argument is one of the binary conditional + operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the + result of the expression is the result of the binary test + using the first and third arguments as operands. The --aa + and --oo operators are considered binary operators when + there are three arguments. If the first argument is !!, + the value is the negation of the two-argument test using + the second and third arguments. If the first argument is + exactly (( and the third argument is exactly )), the result + is the one-argument test of the second argument. Other- + wise, the expression is false. + 4 arguments + If the first argument is !!, the result is the negation of + the three-argument expression composed of the remaining + arguments. Otherwise, the expression is parsed and eval- + uated according to precedence using the rules listed + above. + 5 or more arguments + The expression is parsed and evaluated according to + precedence using the rules listed above. + + When used with tteesstt or [[, the << and >> operators sort lexico- + graphically using ASCII ordering. + + ttiimmeess Print the accumulated user and system times for the shell and + for processes run from the shell. The return status is 0. + + ttrraapp [--llpp] [[_a_r_g] _s_i_g_s_p_e_c ...] + The command _a_r_g is to be read and executed when the shell re- + ceives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a sin- + gle _s_i_g_s_p_e_c) or --, each specified signal is reset to its origi- + nal disposition (the value it had upon entrance to the shell). + If _a_r_g is the null string the signal specified by each _s_i_g_s_p_e_c + is ignored by the shell and by the commands it invokes. If _a_r_g + is not present and --pp has been supplied, then the trap commands + associated with each _s_i_g_s_p_e_c are displayed. If no arguments are + supplied or if only --pp is given, ttrraapp prints the list of com- + mands associated with each signal. The --ll option causes the + shell to print a list of signal names and their corresponding + numbers. Each _s_i_g_s_p_e_c is either a signal name defined in <_s_i_g_- + _n_a_l_._h>, or a signal number. Signal names are case insensitive + and the SSIIGG prefix is optional. + + If a _s_i_g_s_p_e_c is EEXXIITT (0) the command _a_r_g is executed on exit + from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe- + cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command, + _s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the + first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR + above). Refer to the description of the eexxttddeebbuugg option to the + sshhoopptt builtin for details of its effect on the DDEEBBUUGG trap. If a + _s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is executed each time a shell + function or a script executed with the .. or ssoouurrccee builtins fin- + ishes executing. + + If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a + pipeline (which may consist of a single simple command), a list, + or a compound command returns a non-zero exit status, subject to + the following conditions. The EERRRR trap is not executed if the + failed command is part of the command list immediately following + a wwhhiillee or uunnttiill keyword, part of the test in an _i_f statement, + part of a command executed in a &&&& or |||| list except the command + following the final &&&& or ||||, any command in a pipeline but the + last, or if the command's return value is being inverted using + !!. These are the same conditions obeyed by the eerrrreexxiitt (--ee) op- + tion. + + Signals ignored upon entry to the shell cannot be trapped or re- + set. Trapped signals that are not being ignored are reset to + their original values in a subshell or subshell environment when + one is created. The return status is false if any _s_i_g_s_p_e_c is + invalid; otherwise ttrraapp returns true. + + ttyyppee [--aaffttppPP] _n_a_m_e [_n_a_m_e ...] + With no options, indicate how each _n_a_m_e would be interpreted if + used as a command name. If the --tt option is used, ttyyppee prints a + string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or + _f_i_l_e if _n_a_m_e is an alias, shell reserved word, function, + builtin, or disk file, respectively. If the _n_a_m_e is not found, + then nothing is printed, and an exit status of false is re- + turned. If the --pp option is used, ttyyppee either returns the name + of the disk file that would be executed if _n_a_m_e were specified + as a command name, or nothing if ``type -t name'' would not re- + turn _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e, + even if ``type -t name'' would not return _f_i_l_e. If a command is + hashed, --pp and --PP print the hashed value, which is not necessar- + ily the file that appears first in PPAATTHH. If the --aa option is + used, ttyyppee prints all of the places that contain an executable + named _n_a_m_e. This includes aliases and functions, if and only if + the --pp option is not also used. The table of hashed commands is + not consulted when using --aa. The --ff option suppresses shell + function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true + if all of the arguments are found, false if any are not found. + + uulliimmiitt [--HHSS] --aa + uulliimmiitt [--HHSS] [--bbccddeeffiikkllmmnnppqqrrssttuuvvxxPPRRTT [_l_i_m_i_t]] + Provides control over the resources available to the shell and + to processes started by it, on systems that allow such control. + The --HH and --SS options specify that the hard or soft limit is set + for the given resource. A hard limit cannot be increased by a + non-root user once it is set; a soft limit may be increased up + to the value of the hard limit. If neither --HH nor --SS is speci- + fied, both the soft and hard limits are set. The value of _l_i_m_i_t + can be a number in the unit specified for the resource or one of + the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which stand for the + current hard limit, the current soft limit, and no limit, re- + spectively. If _l_i_m_i_t is omitted, the current value of the soft + limit of the resource is printed, unless the --HH option is given. + When more than one resource is specified, the limit name and + unit, if appropriate, are printed before the value. Other op- + tions are interpreted as follows: + --aa All current limits are reported; no limits are set + --bb The maximum socket buffer size + --cc The maximum size of core files created + --dd The maximum size of a process's data segment + --ee The maximum scheduling priority ("nice") + --ff The maximum size of files written by the shell and its + children + --ii The maximum number of pending signals + --kk The maximum number of kqueues that may be allocated + --ll The maximum size that may be locked into memory + --mm The maximum resident set size (many systems do not honor + this limit) + --nn The maximum number of open file descriptors (most systems + do not allow this value to be set) + --pp The pipe size in 512-byte blocks (this may not be set) + --qq The maximum number of bytes in POSIX message queues + --rr The maximum real-time scheduling priority + --ss The maximum stack size + --tt The maximum amount of cpu time in seconds + --uu The maximum number of processes available to a single + user + --vv The maximum amount of virtual memory available to the + shell and, on some systems, to its children + --xx The maximum number of file locks + --PP The maximum number of pseudoterminals + --RR The maximum time a real-time process can run before + blocking, in microseconds + --TT The maximum number of threads + + If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the + new value of the specified resource. If no option is given, + then --ff is assumed. Values are in 1024-byte increments, except + for --tt, which is in seconds; --RR, which is in microseconds; --pp, + which is in units of 512-byte blocks; --PP, --TT, --bb, --kk, --nn, and + --uu, which are unscaled values; and, when in posix mode, --cc and + --ff, which are in 512-byte increments. The return status is 0 + unless an invalid option or argument is supplied, or an error + occurs while setting a new limit. + + uummaasskk [--pp] [--SS] [_m_o_d_e] + The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with + a digit, it is interpreted as an octal number; otherwise it is + interpreted as a symbolic mode mask similar to that accepted by + _c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is + printed. The --SS option causes the mask to be printed in sym- + bolic form; the default output is an octal number. If the --pp + option is supplied, and _m_o_d_e is omitted, the output is in a form + that may be reused as input. The return status is 0 if the mode + was successfully changed or if no _m_o_d_e argument was supplied, + and false otherwise. + + uunnaalliiaass [-aa] [_n_a_m_e ...] + Remove each _n_a_m_e from the list of defined aliases. If --aa is + supplied, all alias definitions are removed. The return value + is true unless a supplied _n_a_m_e is not a defined alias. + + uunnsseett [-ffvv] [-nn] [_n_a_m_e ...] + For each _n_a_m_e, remove the corresponding variable or function. + If the --vv option is given, each _n_a_m_e refers to a shell variable, + and that variable is removed. Read-only variables may not be + unset. If --ff is specified, each _n_a_m_e refers to a shell func- + tion, and the function definition is removed. If the --nn option + is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f attribute, + _n_a_m_e will be unset rather than the variable it references. --nn + has no effect if the --ff option is supplied. If no options are + supplied, each _n_a_m_e refers to a variable; if there is no vari- + able by that name, a function with that name, if any, is unset. + Each unset variable or function is removed from the environment + passed to subsequent commands. If any of BBAASSHH__AALLIIAASSEESS, + BBAASSHH__AARRGGVV00, BBAASSHH__CCMMDDSS, BBAASSHH__CCOOMMMMAANNDD, BBAASSHH__SSUUBBSSHHEELLLL, BBAASSHHPPIIDD, + CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, EEPPOOCCHHSSEECCOONNDDSS, FFUUNNCC-- + NNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECCOONNDDSS, or SSRRAANNDDOOMM are + unset, they lose their special properties, even if they are sub- + sequently reset. The exit status is true unless a _n_a_m_e is read- + only. + + wwaaiitt [--ffnn] [--pp _v_a_r_n_a_m_e] [_i_d _._._.] + Wait for each specified child process and return its termination + status. Each _i_d may be a process ID or a job specification; if + a job spec is given, all processes in that job's pipeline are + waited for. If _i_d is not given, wwaaiitt waits for all running + background jobs and the last-executed process substitution, if + its process id is the same as $$!!, and the return status is zero. + If the --nn option is supplied, wwaaiitt waits for a single job from + the list of _i_ds or, if no _i_ds are supplied, any job, to complete + and returns its exit status. If none of the supplied arguments + is a child of the shell, or if no arguments are supplied and the + shell has no unwaited-for children, the exit status is 127. If + the --pp option is supplied, the process or job identifier of the + job for which the exit status is returned is assigned to the + variable _v_a_r_n_a_m_e named by the option argument. The variable + will be unset initially, before any assignment. This is useful + only when the --nn option is supplied. Supplying the --ff option, + when job control is enabled, forces wwaaiitt to wait for _i_d to ter- + minate before returning its status, instead of returning when it + changes status. If _i_d specifies a non-existent process or job, + the return status is 127. Otherwise, the return status is the + exit status of the last process or job waited for. + +SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE + Bash-4.0 introduced the concept of a `shell compatibility level', spec- + ified as a set of options to the shopt builtin ccoommppaatt3311, ccoommppaatt3322, ccoomm-- + ppaatt4400, ccoommppaatt4411, and so on). There is only one current compatibility + level -- each option is mutually exclusive. The compatibility level is + intended to allow users to select behavior from previous versions that + is incompatible with newer versions while they migrate scripts to use + current features and behavior. It's intended to be a temporary solu- + tion. + + This section does not mention behavior that is standard for a particu- + lar version (e.g., setting ccoommppaatt3322 means that quoting the rhs of the + regexp matching operator quotes special regexp characters in the word, + which is default behavior in bash-3.2 and above). + + If a user enables, say, ccoommppaatt3322, it may affect the behavior of other + compatibility levels up to and including the current compatibility + level. The idea is that each compatibility level controls behavior + that changed in that version of bbaasshh, but that behavior may have been + present in earlier versions. For instance, the change to use locale- + based comparisons with the [[[[ command came in bash-4.1, and earlier + versions used ASCII-based comparisons, so enabling ccoommppaatt3322 will enable + ASCII-based comparisons as well. That granularity may not be suffi- + cient for all uses, and as a result users should employ compatibility + levels carefully. Read the documentation for a particular feature to + find out the current behavior. + + Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value as- + signed to this variable (a decimal version number like 4.2, or an inte- + ger corresponding to the ccoommppaatt_N_N option, like 42) determines the com- + patibility level. + + Starting with bash-4.4, Bash has begun deprecating older compatibility + levels. Eventually, the options will be removed in favor of BBAASSHH__CCOOMM-- + PPAATT. + + Bash-5.0 is the final version for which there will be an individual + shopt option for the previous version. Users should use BBAASSHH__CCOOMMPPAATT on + bash-5.0 and later versions. + + The following table describes the behavior changes controlled by each + compatibility level setting. The ccoommppaatt_N_N tag is used as shorthand for + setting the compatibility level to _N_N using one of the following mecha- + nisms. For versions prior to bash-5.0, the compatibility level may be + set using the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and + later versions, the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is re- + quired for bash-5.1 and later versions. + + ccoommppaatt3311 + +o quoting the rhs of the [[[[ command's regexp matching oper- + ator (=~) has no special effect + + ccoommppaatt3322 + +o interrupting a command list such as "a ; b ; c" causes + the execution of the next command in the list (in + bash-4.0 and later versions, the shell acts as if it re- + ceived the interrupt, so interrupting one command in a + list aborts the execution of the entire list) + + ccoommppaatt4400 + +o the << and >> operators to the [[[[ command do not consider + the current locale when comparing strings; they use ASCII + ordering. Bash versions prior to bash-4.1 use ASCII col- + lation and _s_t_r_c_m_p(3); bash-4.1 and later use the current + locale's collation sequence and _s_t_r_c_o_l_l(3). + + ccoommppaatt4411 + +o in _p_o_s_i_x mode, ttiimmee may be followed by options and still + be recognized as a reserved word (this is POSIX interpre- + tation 267) + +o in _p_o_s_i_x mode, the parser requires that an even number of + single quotes occur in the _w_o_r_d portion of a double- + quoted parameter expansion and treats them specially, so + that characters within the single quotes are considered + quoted (this is POSIX interpretation 221) + + ccoommppaatt4422 + +o the replacement string in double-quoted pattern substitu- + tion does not undergo quote removal, as it does in ver- + sions after bash-4.2 + +o in posix mode, single quotes are considered special when + expanding the _w_o_r_d portion of a double-quoted parameter + expansion and can be used to quote a closing brace or + other special character (this is part of POSIX interpre- + tation 221); in later versions, single quotes are not + special within double-quoted word expansions + + ccoommppaatt4433 + +o the shell does not print a warning message if an attempt + is made to use a quoted compound assignment as an argu- + ment to declare (declare -a foo='(1 2)'). Later versions + warn that this usage is deprecated + +o word expansion errors are considered non-fatal errors + that cause the current command to fail, even in posix + mode (the default behavior is to make them fatal errors + that cause the shell to exit) + +o when executing a shell function, the loop state + (while/until/etc.) is not reset, so bbrreeaakk or ccoonnttiinnuuee in + that function will break or continue loops in the calling + context. Bash-4.4 and later reset the loop state to pre- + vent this + + ccoommppaatt4444 + +o the shell sets up the values used by BBAASSHH__AARRGGVV and + BBAASSHH__AARRGGCC so they can expand to the shell's positional + parameters even if extended debugging mode is not enabled + +o a subshell inherits loops from its parent context, so + bbrreeaakk or ccoonnttiinnuuee will cause the subshell to exit. + Bash-5.0 and later reset the loop state to prevent the + exit + +o variable assignments preceding builtins like eexxppoorrtt and + rreeaaddoonnllyy that set attributes continue to affect variables + with the same name in the calling environment even if the + shell is not in posix mode + + ccoommppaatt5500 + +o Bash-5.1 changed the way $$RRAANNDDOOMM is generated to intro- + duce slightly more randomness. If the shell compatibility + level is set to 50 or lower, it reverts to the method + from bash-5.0 and previous versions, so seeding the ran- + dom number generator by assigning a value to RRAANNDDOOMM will + produce the same sequence as in bash-5.0 + +o If the command hash table is empty, bash versions prior + to bash-5.1 printed an informational message to that ef- + fect, even when producing output that can be reused as + input. Bash-5.1 suppresses that message when the --ll op- + tion is supplied. + +SSEEEE AALLSSOO + bash(1), sh(1) + + + +GNU Bash 5.0 2004 Apr 20 BASH_BUILTINS(1) diff --git a/bash-5.1/doc/builtins.1 b/bash-5.1/doc/builtins.1 new file mode 100644 index 0000000000000000000000000000000000000000..4413c76f019747dac80335d326c66c82c58db546 --- /dev/null +++ b/bash-5.1/doc/builtins.1 @@ -0,0 +1,24 @@ +.\" This is a hack to force bash builtins into the whatis database +.\" and to get the list of builtins to come up with the man command. +.\" +.\" File Name macro. This used to be `.PN', for Path Name, +.\" but Sun doesn't seem to like that very much. +.\" +.de FN +\fI\|\\$1\|\fP +.. +.TH BASH_BUILTINS 1 "2004 Apr 20" "GNU Bash 5.0" +.SH NAME +bash, :, ., [, alias, bg, bind, break, builtin, caller, +cd, command, compgen, complete, +compopt, continue, declare, dirs, disown, echo, enable, eval, exec, exit, +export, false, fc, fg, getopts, hash, help, history, jobs, kill, +let, local, logout, mapfile, popd, printf, pushd, pwd, read, +readonly, return, set, +shift, shopt, source, suspend, test, times, trap, true, type, typeset, +ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1) +.SH BASH BUILTIN COMMANDS +.nr zZ 1 +.so bash.1 +.SH SEE ALSO +bash(1), sh(1) diff --git a/bash-5.1/doc/builtins.ps b/bash-5.1/doc/builtins.ps new file mode 100644 index 0000000000000000000000000000000000000000..ae11c5449fd162703a7586f4d36071d7f677af2d --- /dev/null +++ b/bash-5.1/doc/builtins.ps @@ -0,0 +1,3318 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.22.4 +%%CreationDate: Wed Nov 18 15:13:06 2020 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Symbol +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.22 4 +%%Pages: 26 +%%PageOrder: Ascend +%%DocumentMedia: Default 612 792 0 () () +%%Orientation: Portrait +%%EndComments +%%BeginDefaults +%%PageMedia: Default +%%EndDefaults +%%BeginProlog +%%BeginResource: procset grops 1.22 4 +%!PS-Adobe-3.0 Resource-ProcSet +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +DEFS/BPhook known{DEFS begin BPhook end}if +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/setcmykcolor where{ +pop +/Fk{ +setcmykcolor fill +}bind def +}if +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/setcmykcolor where{ +pop +/Ck/setcmykcolor load def +}if +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne +2 index/UniqueID ne +and +{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +/setpagedevice{}def +mark +}bind def +/PEND{ +cleartomark +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%EndProlog +%%BeginSetup +%%BeginFeature: *PageSize Default +<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice +%%EndFeature +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Symbol +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier@0 ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE +/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S +(ME).219 E F0 .288(bash, :, ., [, alias, bg, bind, break, b)108 96 R +.287(uiltin, caller)-.2 F 2.787(,c)-.4 G .287 +(d, command, compgen, complete, compopt, continue, de-)-2.787 F .327 +(clare, dirs, diso)108 108 R .327(wn, echo, enable, e)-.25 F -.25(va) +-.25 G .327(l, e).25 F -.15(xe)-.15 G .327(c, e).15 F .327(xit, e)-.15 F +.327(xport, f)-.15 F .327(alse, fc, fg, getopts, hash, help, history)-.1 +F 2.827(,j)-.65 G .328(obs, kill,)-2.827 F .124(let, local, logout, map\ +\214le, popd, printf, pushd, pwd, read, readonly)108 120 R 2.624(,r)-.65 +G .124(eturn, set, shift, shopt, source, suspend,)-2.624 F 1.926(test, \ +times, trap, true, type, typeset, ulimit, umask, unalias, unset, w)108 +132 R 1.927(ait \255 bash b)-.1 F 1.927(uilt-in commands, see)-.2 F/F2 +10/Times-Bold@0 SF(bash)108 144 Q F0(\(1\))A F1 -.329(BA)72 160.8 S +(SH B).329 E(UIL)-.11 E(TIN COMMANDS)-1.007 E F0 .063 +(Unless otherwise noted, each b)108 172.8 R .062(uiltin command documen\ +ted in this section as accepting options preceded by)-.2 F F2108 +184.8 Q F0(accepts)3.077 E F23.077 E F0 .577 +(to signify the end of the options.)3.077 F(The)5.577 E F2(:)3.077 E F0 +(,)A F2(true)3.077 E F0(,)A F2(false)3.077 E F0 3.077(,a)C(nd)-3.077 E +F2(test)3.077 E F0(/)A F2([)A F0 -.2(bu)3.077 G .577 +(iltins do not accept options).2 F .462(and do not treat)108 196.8 R F2 +2.961 E F0(specially)2.961 E 5.461(.T)-.65 G(he)-5.461 E F2(exit) +2.961 E F0(,)A F2(logout)2.961 E F0(,)A F2 -.18(re)2.961 G(tur).18 E(n) +-.15 E F0(,)A F2(br)2.961 E(eak)-.18 E F0(,)A F2(continue)2.961 E F0(,)A +F2(let)2.961 E F0 2.961(,a)C(nd)-2.961 E F2(shift)2.961 E F0 -.2(bu) +2.961 G .461(iltins accept and).2 F .26(process ar)108 208.8 R .26 +(guments be)-.18 F .26(ginning with)-.15 F F22.76 E F0 .261 +(without requiring)2.76 F F22.761 E F0 5.261(.O)C .261(ther b) +-5.261 F .261(uiltins that accept ar)-.2 F .261(guments b)-.18 F .261 +(ut are not)-.2 F 1.154(speci\214ed as accepting options interpret ar) +108 220.8 R 1.154(guments be)-.18 F 1.154(ginning with)-.15 F F2 +3.654 E F0 1.154(as in)3.654 F -.25(va)-.4 G 1.154 +(lid options and require).25 F F23.654 E F0(to)3.654 E(pre)108 +232.8 Q -.15(ve)-.25 G(nt this interpretation.).15 E F2(:)108 250.8 Q F0 +([)2.5 E/F3 10/Times-Italic@0 SF(ar)A(guments)-.37 E F0(])A .451(No ef) +144 262.8 R .451(fect; the command does nothing be)-.25 F .452(yond e) +-.15 F(xpanding)-.15 E F3(ar)3.282 E(guments)-.37 E F0 .452 +(and performing an)3.222 F 2.952(ys)-.15 G(peci\214ed)-2.952 E 2.5 +(redirections. The)144 274.8 R(return status is zero.)2.5 E F2(.)110.5 +291.6 Q F3(\214lename)6.666 E F0([)2.5 E F3(ar)A(guments)-.37 E F0(])A +F2(sour)108 303.6 Q(ce)-.18 E F3(\214lename)2.5 E F0([)2.5 E F3(ar)A +(guments)-.37 E F0(])A 1.02(Read and e)144 315.6 R -.15(xe)-.15 G 1.02 +(cute commands from).15 F F3(\214lename)5.43 E F0 1.02 +(in the current shell en)3.7 F 1.02(vironment and return the e)-.4 F +(xit)-.15 E 1.33(status of the last command e)144 327.6 R -.15(xe)-.15 G +1.331(cuted from).15 F F3(\214lename)5.741 E F0 6.331(.I).18 G(f)-6.331 +E F3(\214lename)5.741 E F0 1.331(does not contain a slash, \214le-)4.011 +F .489(names in)144 339.6 R/F4 9/Times-Bold@0 SF -.666(PA)2.989 G(TH) +-.189 E F0 .489(are used to \214nd the directory containing)2.739 F F3 +(\214lename)4.899 E F0 5.488(.T).18 G .488(he \214le searched for in) +-5.488 F F4 -.666(PA)2.988 G(TH)-.189 E F0 .832(need not be e)144 351.6 +R -.15(xe)-.15 G 3.332(cutable. When).15 F F2(bash)3.332 E F0 .832 +(is not in)3.332 F F3 .832(posix mode)3.332 F F0 3.332(,t)C .833 +(he current directory is searched if no)-3.332 F .982 +(\214le is found in)144 363.6 R F4 -.666(PA)3.481 G(TH)-.189 E/F5 9 +/Times-Roman@0 SF(.)A F0 .981(If the)5.481 F F2(sour)3.481 E(cepath)-.18 +E F0 .981(option to the)3.481 F F2(shopt)3.481 E F0 -.2(bu)3.481 G .981 +(iltin command is turned of).2 F .981(f, the)-.25 F F4 -.666(PA)144 +375.6 S(TH)-.189 E F0 .112(is not searched.)2.362 F .112(If an)5.112 F +(y)-.15 E F3(ar)2.612 E(guments)-.37 E F0 .112(are supplied, the)2.612 F +2.612(yb)-.15 G .112(ecome the positional parameters when)-2.612 F F3 +(\214lename)144 387.6 Q F0 .485(is e)2.985 F -.15(xe)-.15 G 2.985 +(cuted. Otherwise).15 F .485(the positional parameters are unchanged.) +2.985 F .485(If the)5.485 F F22.985 E F0 .485(option is en-)2.985 +F(abled,)144 399.6 Q F2(sour)3.324 E(ce)-.18 E F0 .824(inherits an)3.324 +F 3.324(yt)-.15 G .824(rap on)-3.324 F F2(DEB)3.324 E(UG)-.1 E F0 3.324 +(;i)C 3.324(fi)-3.324 G 3.324(ti)-3.324 G 3.324(sn)-3.324 G .825(ot, an) +-3.324 F(y)-.15 E F2(DEB)3.325 E(UG)-.1 E F0 .825(trap string is sa) +3.325 F -.15(ve)-.2 G 3.325(da).15 G .825(nd re-)-3.325 F .817 +(stored around the call to)144 411.6 R F2(sour)3.317 E(ce)-.18 E F0 +3.317(,a)C(nd)-3.317 E F2(sour)3.317 E(ce)-.18 E F0 .817(unsets the) +3.317 F F2(DEB)3.317 E(UG)-.1 E F0 .817(trap while it e)3.317 F -.15(xe) +-.15 G 3.317(cutes. If).15 F F23.317 E F0(is)3.317 E 1.435 +(not set, and the sourced \214le changes the)144 423.6 R F2(DEB)3.935 E +(UG)-.1 E F0 1.435(trap, the ne)3.935 F 3.935(wv)-.25 G 1.435 +(alue is retained when)-4.185 F F2(sour)3.935 E(ce)-.18 E F0 3.763 +(completes. The)144 435.6 R 1.262 +(return status is the status of the last command e)3.763 F 1.262 +(xited within the script \(0 if no)-.15 F(commands are e)144 447.6 Q +-.15(xe)-.15 G(cuted\), and f).15 E(alse if)-.1 E F3(\214lename)4.41 E +F0(is not found or cannot be read.)2.68 E F2(alias)108 464.4 Q F0([)2.5 +E F2A F0 2.5(][)C F3(name)-2.5 E F0([=)A F3(value)A F0 2.5(].)C +(..])-2.5 E F2(Alias)144 476.4 Q F0 2.724(with no ar)5.224 F 2.724 +(guments or with the)-.18 F F25.224 E F0 2.724 +(option prints the list of aliases in the form)5.224 F F2(alias)5.225 E +F3(name)144 488.4 Q F0(=)A F3(value)A F0 .58(on standard output.)3.08 F +.58(When ar)5.58 F .58 +(guments are supplied, an alias is de\214ned for each)-.18 F F3(name) +3.08 E F0(whose)144 500.4 Q F3(value)2.508 E F0 .009(is gi)2.508 F -.15 +(ve)-.25 G 2.509(n. A).15 F .009(trailing space in)2.509 F F3(value) +2.509 E F0 .009(causes the ne)2.509 F .009(xt w)-.15 F .009 +(ord to be check)-.1 F .009(ed for alias substi-)-.1 F .579 +(tution when the alias is e)144 512.4 R 3.079(xpanded. F)-.15 F .579 +(or each)-.15 F F3(name)3.079 E F0 .579(in the ar)3.079 F .579 +(gument list for which no)-.18 F F3(value)3.079 E F0 .578(is sup-)3.078 +F 1.313(plied, the name and v)144 524.4 R 1.314 +(alue of the alias is printed.)-.25 F F2(Alias)6.314 E F0 1.314 +(returns true unless a)3.814 F F3(name)3.814 E F0 1.314(is gi)3.814 F +-.15(ve)-.25 G 3.814(nf).15 G(or)-3.814 E +(which no alias has been de\214ned.)144 536.4 Q F2(bg)108 553.2 Q F0([) +2.5 E F3(jobspec)A F0(...])2.5 E .745(Resume each suspended job)144 +565.2 R F3(jobspec)3.245 E F0 .745 +(in the background, as if it had been started with)3.245 F F2(&)3.244 E +F0 5.744(.I)C(f)-5.744 E F3(job-)4.984 E(spec)144 577.2 Q F0 .671 +(is not present, the shell')3.481 F 3.171(sn)-.55 G .672(otion of the) +-3.171 F F3(curr)3.172 E .672(ent job)-.37 F F0 .672(is used.)3.172 F F2 +(bg)5.672 E F3(jobspec)4.912 E F0 .672(returns 0 unless run)3.482 F .419 +(when job control is disabled or)144 589.2 R 2.919(,w)-.4 G .419 +(hen run with job control enabled, an)-2.919 F 2.918(ys)-.15 G +(peci\214ed)-2.918 E F3(jobspec)2.918 E F0 -.1(wa)2.918 G 2.918(sn).1 G +(ot)-2.918 E(found or w)144 601.2 Q(as started without job control.)-.1 +E F2(bind)108 618 Q F0([)2.5 E F2A F3 -.1(ke)2.5 G(ymap)-.2 E F0 +2.5(][)C F2(\255lpsvPSVX)-2.5 E F0(])A F2(bind)108 630 Q F0([)2.5 E F2 +A F3 -.1(ke)2.5 G(ymap)-.2 E F0 2.5(][)C F2-2.5 E F3 +(function)2.5 E F0 2.5(][)C F2-2.5 E F3(function)2.5 E F0 2.5(][)C +F2-2.5 E F3 -.1(ke)2.5 G(yseq)-.2 E F0(])A F2(bind)108 642 Q F0([) +2.5 E F2A F3 -.1(ke)2.5 G(ymap)-.2 E F0(])A F22.5 E F3 +(\214lename)2.5 E F2(bind)108 654 Q F0([)2.5 E F2A F3 -.1(ke)2.5 G +(ymap)-.2 E F0(])A F22.5 E F3 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F3 +(shell\255command)A F2(bind)108 666 Q F0([)2.5 E F2A F3 -.1(ke)2.5 +G(ymap)-.2 E F0(])A F3 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F3 +(function\255name)A F2(bind)108 678 Q F0([)2.5 E F2A F3 -.1(ke)2.5 +G(ymap)-.2 E F0(])A F3 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F3 -.37(re)C +(adline\255command).37 E F0 .238(Display current)144 690 R F2 -.18(re) +2.738 G(adline).18 E F0 -.1(ke)2.738 G 2.738(ya)-.05 G .239 +(nd function bindings, bind a k)-2.738 F .539 -.15(ey s)-.1 H .239 +(equence to a).15 F F2 -.18(re)2.739 G(adline).18 E F0 .239(function or) +2.739 F .476(macro, or set a)144 702 R F2 -.18(re)2.976 G(adline).18 E +F0 -.25(va)2.976 G 2.976(riable. Each).25 F .476(non-option ar)2.976 F +.475(gument is a command as it w)-.18 F .475(ould appear in)-.1 F F3 +(.inputr)144.23 714 Q(c)-.37 E F0 2.967(,b).31 G .467 +(ut each binding or command must be passed as a separate ar)-3.167 F +.468(gument; e.g., '"\\C\255x\\C\255r":)-.18 F 2.5 +(re\255read\255init\255\214le'. Options,)144 726 R(if supplied, ha)2.5 E +.3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E(GNU Bash 5.0)72 +768 Q(2004 Apr 20)149.565 E(1)203.725 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF144 84 Q/F2 10 +/Times-Italic@0 SF -.1(ke)2.5 G(ymap)-.2 E F0(Use)180 96 Q F2 -.1(ke) +5.159 G(ymap)-.2 E F0 2.659(as the k)5.349 F -.15(ey)-.1 G 2.658 +(map to be af).15 F 2.658(fected by the subsequent bindings.)-.25 F +(Acceptable)7.658 E F2 -.1(ke)180 108 S(ymap)-.2 E F0 3.192(names are) +5.882 F F2 3.192(emacs, emacs\255standar)5.692 F 3.193 +(d, emacs\255meta, emacs\255ctlx, vi, vi\255mo)-.37 F(ve)-.1 E(,)-.1 E +(vi\255command)180 120 Q F0 4.09(,a)C(nd)-4.09 E F2(vi\255insert)4.38 E +F0(.).68 E F2(vi)6.589 E F0 1.589(is equi)4.089 F -.25(va)-.25 G 1.589 +(lent to).25 F F2(vi\255command)4.089 E F0(\()4.089 E F2(vi\255mo)A(ve) +-.1 E F0 1.589(is also a syn-)4.089 F(on)180 132 Q(ym\);)-.15 E F2 +(emacs)2.5 E F0(is equi)2.5 E -.25(va)-.25 G(lent to).25 E F2 +(emacs\255standar)2.5 E(d)-.37 E F0(.)A F1144 144 Q F0 +(List the names of all)180 144 Q F1 -.18(re)2.5 G(adline).18 E F0 +(functions.)2.5 E F1144 156 Q F0(Display)180 156 Q F1 -.18(re)2.5 +G(adline).18 E F0(function names and bindings in such a w)2.5 E +(ay that the)-.1 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F1144 168 Q +F0(List current)180 168 Q F1 -.18(re)2.5 G(adline).18 E F0 +(function names and bindings.)2.5 E F1144 180 Q F0(Display)180 180 +Q F1 -.18(re)3.655 G(adline).18 E F0 -.1(ke)3.655 G 3.655(ys)-.05 G +1.155(equences bound to macros and the strings the)-3.655 F 3.655(yo) +-.15 G 1.155(utput in such a)-3.655 F -.1(wa)180 192 S 2.5(yt).1 G +(hat the)-2.5 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F1144 204 Q F0 +(Display)180 204 Q F1 -.18(re)2.5 G(adline).18 E F0 -.1(ke)2.5 G 2.5(ys) +-.05 G(equences bound to macros and the strings the)-2.5 E 2.5(yo)-.15 G +(utput.)-2.5 E F1144 216 Q F0(Display)180 216 Q F1 -.18(re)2.5 G +(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E +(alues in such a w)-.25 E(ay that the)-.1 E 2.5(yc)-.15 G +(an be re-read.)-2.5 E F1144 228 Q F0(List current)180 228 Q F1 +-.18(re)2.5 G(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E +(alues.)-.25 E F1144 240 Q F2(\214lename)2.5 E F0(Read k)180 252 Q +.3 -.15(ey b)-.1 H(indings from).15 E F2(\214lename)2.5 E F0(.)A F1 +144 264 Q F2(function)2.5 E F0(Query about which k)180 276 Q -.15 +(ey)-.1 G 2.5(si).15 G -1.9 -.4(nv o)-2.5 H .2 -.1(ke t).4 H(he named).1 +E F2(function)2.5 E F0(.)A F1144 288 Q F2(function)2.5 E F0 +(Unbind all k)180 300 Q -.15(ey)-.1 G 2.5(sb).15 G(ound to the named) +-2.5 E F2(function)2.5 E F0(.)A F1144 312 Q F2 -.1(ke)2.5 G(yseq) +-.2 E F0(Remo)180 324 Q .3 -.15(ve a)-.15 H .3 -.15(ny c).15 H +(urrent binding for).15 E F2 -.1(ke)2.5 G(yseq)-.2 E F0(.)A F1144 +336 Q F2 -.1(ke)2.5 G(yseq)-.2 E F1(:)A F2(shell\255command)A F0(Cause) +180 348 Q F2(shell\255command)4.325 E F0 1.825(to be e)4.325 F -.15(xe) +-.15 G 1.825(cuted whene).15 F -.15(ve)-.25 G(r).15 E F2 -.1(ke)4.325 G +(yseq)-.2 E F0 1.825(is entered.)4.325 F(When)6.825 E F2(shell\255com-) +4.325 E(mand)180 360 Q F0 1.764(is e)4.264 F -.15(xe)-.15 G 1.765 +(cuted, the shell sets the).15 F/F3 9/Times-Bold@0 SF(READLINE_LINE) +4.265 E F0 -.25(va)4.015 G 1.765(riable to the contents of the).25 F F1 +-.18(re)180 372 S(adline).18 E F0 .375(line b)2.875 F(uf)-.2 E .375 +(fer and the)-.25 F F3(READLINE_POINT)2.875 E F0(and)2.625 E F3 +(READLINE_MARK)2.875 E F0 -.25(va)2.625 G .375(riables to the).25 F +1.185(current location of the insertion point and the sa)180 384 R -.15 +(ve)-.2 G 3.686(di).15 G 1.186(nsertion point \(the mark\), respec-) +-3.686 F(ti)180 396 Q -.15(ve)-.25 G(ly).15 E 5.702(.I)-.65 G 3.202(ft) +-5.702 G .702(he e)-3.202 F -.15(xe)-.15 G .702 +(cuted command changes the v).15 F .701(alue of an)-.25 F 3.201(yo)-.15 +G(f)-3.201 E F3(READLINE_LINE)3.201 E/F4 9/Times-Roman@0 SF(,)A F3 +(READ-)2.951 E(LINE_POINT)180 408 Q F4(,)A F0(or)3.58 E F3 +(READLINE_MARK)3.83 E F4(,)A F0 1.33(those ne)3.58 F 3.83(wv)-.25 G +1.331(alues will be re\215ected in the editing)-4.08 F(state.)180 420 Q +F1144 432 Q F0 .83(List all k)180 432 R 1.13 -.15(ey s)-.1 H .829 +(equences bound to shell commands and the associated commands in a for) +.15 F(-)-.2 E(mat that can be reused as input.)180 444 Q(The return v) +144 460.8 Q(alue is 0 unless an unrecognized option is gi)-.25 E -.15 +(ve)-.25 G 2.5(no).15 G 2.5(ra)-2.5 G 2.5(ne)-2.5 G(rror occurred.)-2.5 +E F1(br)108 477.6 Q(eak)-.18 E F0([)2.5 E F2(n)A F0(])A .054 +(Exit from within a)144 489.6 R F1 -.25(fo)2.554 G(r).25 E F0(,)A F1 +(while)2.554 E F0(,)A F1(until)2.555 E F0 2.555(,o)C(r)-2.555 E F1 +(select)2.555 E F0 2.555(loop. If)2.555 F F2(n)2.555 E F0 .055 +(is speci\214ed, break)2.555 F F2(n)2.555 E F0(le)2.555 E -.15(ve)-.25 G +(ls.).15 E F2(n)5.415 E F0 .055(must be)2.795 F/F5 10/Symbol SF2.555 +E F0(1.)2.555 E(If)144 501.6 Q F2(n)3.075 E F0 .215(is greater than the\ + number of enclosing loops, all enclosing loops are e)2.955 F 2.714 +(xited. The)-.15 F .214(return v)2.714 F(alue)-.25 E(is 0 unless)144 +513.6 Q F2(n)2.5 E F0(is not greater than or equal to 1.)2.5 E F1 -.2 +(bu)108 530.4 S(iltin).2 E F2(shell\255b)2.5 E(uiltin)-.2 E F0([)2.5 E +F2(ar)A(guments)-.37 E F0(])A(Ex)144 542.4 Q .77 +(ecute the speci\214ed shell b)-.15 F .77(uiltin, passing it)-.2 F F2 +(ar)3.601 E(guments)-.37 E F0 3.271(,a).27 G .771(nd return its e)-3.271 +F .771(xit status.)-.15 F .771(This is useful)5.771 F .616 +(when de\214ning a function whose name is the same as a shell b)144 +554.4 R .615(uiltin, retaining the functionality of)-.2 F .57(the b)144 +566.4 R .57(uiltin within the function.)-.2 F(The)5.57 E F1(cd)3.07 E F0 +-.2(bu)3.07 G .57(iltin is commonly rede\214ned this w).2 F(ay)-.1 E +5.57(.T)-.65 G .57(he return status)-5.57 F(is f)144 578.4 Q(alse if)-.1 +E F2(shell\255b)2.84 E(uiltin)-.2 E F0(is not a shell b)2.74 E +(uiltin command.)-.2 E F1(caller)108 595.2 Q F0([)2.5 E F2 -.2(ex)C(pr) +.2 E F0(])A .254(Returns the conte)144 607.2 R .254(xt of an)-.15 F +2.754(ya)-.15 G(cti)-2.754 E .554 -.15(ve s)-.25 H .254 +(ubroutine call \(a shell function or a script e).15 F -.15(xe)-.15 G +.254(cuted with the).15 F F1(.)2.753 E F0(or)2.753 E F1(sour)144 619.2 Q +(ce)-.18 E F0 -.2(bu)2.824 G 2.824(iltins\). W).2 F(ithout)-.4 E F2 -.2 +(ex)2.824 G(pr).2 E F0(,)A F1(caller)2.824 E F0 .324 +(displays the line number and source \214lename of the current)2.824 F +.254(subroutine call.)144 631.2 R .254(If a non-ne)5.254 F -.05(ga)-.15 +G(ti).05 E .554 -.15(ve i)-.25 H(nte).15 E .253(ger is supplied as)-.15 +F F2 -.2(ex)2.753 G(pr).2 E F0(,)A F1(caller)2.753 E F0 .253 +(displays the line number)2.753 F 2.753(,s)-.4 G(ub-)-2.753 E 1.327(rou\ +tine name, and source \214le corresponding to that position in the curr\ +ent e)144 643.2 R -.15(xe)-.15 G 1.328(cution call stack.).15 F .001 +(This e)144 655.2 R .001(xtra information may be used, for e)-.15 F .001 +(xample, to print a stack trace.)-.15 F(The current frame is frame)5 E +3.019(0. The)144 667.2 R .519(return v)3.019 F .519 +(alue is 0 unless the shell is not e)-.25 F -.15(xe)-.15 G .52 +(cuting a subroutine call or).15 F F2 -.2(ex)3.02 G(pr).2 E F0 .52 +(does not corre-)3.02 F(spond to a v)144 679.2 Q +(alid position in the call stack.)-.25 E F1(cd)108 696 Q F0([)2.5 E F1 +A F0(|[)A F1A F0([)2.5 E F1A F0(]] [\255@]] [)A F2 +(dir)A F0(])A .322(Change the current directory to)144 708 R F2(dir) +2.822 E F0 5.322(.i)C(f)-5.322 E F2(dir)2.822 E F0 .321 +(is not supplied, the v)2.822 F .321(alue of the)-.25 F F3(HOME)2.821 E +F0 .321(shell v)2.571 F .321(ariable is)-.25 F 1.035(the def)144 720 R +3.535(ault. An)-.1 F 3.535(ya)-.15 G 1.035(dditional ar)-3.535 F 1.035 +(guments follo)-.18 F(wing)-.25 E F2(dir)3.535 E F0 1.035(are ignored.) +3.535 F 1.036(The v)6.035 F(ariable)-.25 E F3(CDP)3.536 E -.855(AT)-.666 +G(H).855 E F0(de\214nes)3.286 E(GNU Bash 5.0)72 768 Q(2004 Apr 20) +149.565 E(2)203.725 E 0 Cg EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E .827 +(the search path for the directory containing)144 84 R/F1 10 +/Times-Italic@0 SF(dir)3.676 E F0 3.326(:e).73 G .826 +(ach directory name in)-3.326 F/F2 9/Times-Bold@0 SF(CDP)3.326 E -.855 +(AT)-.666 G(H).855 E F0 .826(is searched for)3.076 F F1(dir)144 96 Q F0 +5.664(.A)C(lternati)-5.664 E .964 -.15(ve d)-.25 H .665 +(irectory names in).15 F F2(CDP)3.165 E -.855(AT)-.666 G(H).855 E F0 +.665(are separated by a colon \(:\).)2.915 F 3.165(An)5.665 G .665 +(ull directory name)-3.165 F(in)144 108 Q F2(CDP)3.102 E -.855(AT)-.666 +G(H).855 E F0 .602(is the same as the current directory)2.852 F 3.102 +(,i)-.65 G .602(.e., `)-3.102 F(`)-.74 E/F3 10/Times-Bold@0 SF(.)A F0 +-.74('')C 5.602(.I).74 G(f)-5.602 E F1(dir)3.451 E F0(be)3.831 E .601 +(gins with a slash \(/\), then)-.15 F F2(CD-)3.101 E -.666(PA)144 120 S +(TH)-.189 E F0 1.003(is not used.)3.253 F(The)6.003 E F33.503 E F0 +1.003(option causes)3.503 F F3(cd)3.503 E F0 1.003(to use the ph)3.503 F +1.003(ysical directory structure by resolving)-.05 F .123 +(symbolic links while tra)144 132 R -.15(ve)-.2 G(rsing).15 E F1(dir) +2.623 E F0 .123(and before processing instances of)2.623 F F1(..)2.623 E +F0(in)2.623 E F1(dir)2.623 E F0 .123(\(see also the)2.623 F F3 +2.623 E F0(op-)2.622 E .429(tion to the)144 144 R F3(set)2.929 E F0 -.2 +(bu)2.929 G .429(iltin command\); the).2 F F32.929 E F0 .43 +(option forces symbolic links to be follo)2.929 F .43(wed by resolving) +-.25 F .473(the link after processing instances of)144 156 R F1(..)2.973 +E F0(in)2.973 E F1(dir)2.973 E F0 5.473(.I)C(f)-5.473 E F1(..)2.973 E F0 +.473(appears in)2.973 F F1(dir)2.972 E F0 2.972(,i)C 2.972(ti)-2.972 G +2.972(sp)-2.972 G .472(rocessed by remo)-2.972 F .472(ving the)-.15 F +.948(immediately pre)144 168 R .948(vious pathname component from)-.25 F +F1(dir)3.448 E F0 3.448(,b)C .948(ack to a slash or the be)-3.448 F .948 +(ginning of)-.15 F F1(dir)3.448 E F0 5.948(.I)C(f)-5.948 E(the)144 180 Q +F32.868 E F0 .368(option is supplied with)2.868 F F32.868 E +F0 2.868(,a)C .368(nd the current w)-2.868 F .368 +(orking directory cannot be successfully deter)-.1 F(-)-.2 E .612 +(mined after a successful directory change,)144 192 R F3(cd)3.112 E F0 +.612(will return an unsuccessful status.)3.112 F .613(On systems that) +5.612 F .354(support it, the)144 204 R F32.854 E F0 .354 +(option presents the e)2.854 F .354(xtended attrib)-.15 F .354 +(utes associated with a \214le as a directory)-.2 F 5.353(.A)-.65 G(n) +-5.353 E(ar)144 216 Q .072(gument of)-.18 F F32.572 E F0 .072 +(is con)2.572 F -.15(ve)-.4 G .072(rted to).15 F F2($OLDPWD)2.572 E F0 +.072(before the directory change is attempted.)2.322 F .072 +(If a non-empty)5.072 F .055(directory name from)144 228 R F2(CDP)2.555 +E -.855(AT)-.666 G(H).855 E F0 .055(is used, or if)2.305 F F32.555 E +F0 .055(is the \214rst ar)2.555 F .054 +(gument, and the directory change is suc-)-.18 F .168 +(cessful, the absolute pathname of the ne)144 240 R 2.668(ww)-.25 G .168 +(orking directory is written to the standard output.)-2.768 F(The)5.168 +E(return v)144 252 Q(alue is true if the directory w)-.25 E +(as successfully changed; f)-.1 E(alse otherwise.)-.1 E F3(command)108 +268.8 Q F0([)2.5 E F3(\255pVv)A F0(])A F1(command)2.5 E F0([)2.5 E F1 +(ar)A(g)-.37 E F0(...])2.5 E(Run)144 280.8 Q F1(command)2.765 E F0(with) +3.335 E F1(ar)2.895 E(gs)-.37 E F0 .065 +(suppressing the normal shell function lookup.)2.835 F .064(Only b)5.064 +F .064(uiltin commands or)-.2 F .501(commands found in the)144 292.8 R +F2 -.666(PA)3.001 G(TH)-.189 E F0 .502(are e)2.751 F -.15(xe)-.15 G +3.002(cuted. If).15 F(the)3.002 E F33.002 E F0 .502(option is gi) +3.002 F -.15(ve)-.25 G .502(n, the search for).15 F F1(command)3.202 E +F0(is)3.772 E .4(performed using a def)144 304.8 R .4(ault v)-.1 F .4 +(alue for)-.25 F F2 -.666(PA)2.9 G(TH)-.189 E F0 .399 +(that is guaranteed to \214nd all of the standard utilities.)2.649 F(If) +5.399 E .174(either the)144 316.8 R F32.674 E F0(or)2.674 E F3 +2.674 E F0 .175(option is supplied, a description of)2.674 F F1 +(command)2.875 E F0 .175(is printed.)3.445 F(The)5.175 E F32.675 E +F0 .175(option causes)2.675 F 3.318(as)144 328.8 S .818(ingle w)-3.318 F +.817(ord indicating the command or \214lename used to in)-.1 F -.2(vo) +-.4 G -.1(ke).2 G F1(command)3.617 E F0 .817(to be displayed; the)4.087 +F F3144 340.8 Q F0 .249(option produces a more v)2.749 F .249 +(erbose description.)-.15 F .249(If the)5.249 F F32.749 E F0(or) +2.749 E F32.75 E F0 .25(option is supplied, the e)2.75 F .25 +(xit status)-.15 F 1.005(is 0 if)144 352.8 R F1(command)3.705 E F0 -.1 +(wa)4.275 G 3.505(sf).1 G 1.005(ound, and 1 if not.)-3.505 F 1.004 +(If neither option is supplied and an error occurred or)6.005 F F1 +(command)144.2 364.8 Q F0 1.598(cannot be found, the e)4.868 F 1.599 +(xit status is 127.)-.15 F 1.599(Otherwise, the e)6.599 F 1.599 +(xit status of the)-.15 F F3(command)4.099 E F0 -.2(bu)144 376.8 S +(iltin is the e).2 E(xit status of)-.15 E F1(command)2.7 E F0(.).77 E F3 +(compgen)108 393.6 Q F0([)2.5 E F1(option)A F0 2.5(][)C F1(wor)-2.5 E(d) +-.37 E F0(])A .013(Generate possible completion matches for)144 405.6 R +F1(wor)2.513 E(d)-.37 E F0 .013(according to the)2.513 F F1(option)2.513 +E F0 .013(s, which may be an)B 2.512(yo)-.15 G(ption)-2.512 E .981 +(accepted by the)144 417.6 R F3(complete)3.481 E F0 -.2(bu)3.481 G .981 +(iltin with the e).2 F .981(xception of)-.15 F F33.481 E F0(and) +3.481 E F33.481 E F0 3.481(,a)C .982(nd write the matches to the) +-3.481 F .131(standard output.)144 429.6 R .131(When using the)5.131 F +F32.631 E F0(or)2.631 E F32.631 E F0 .131(options, the v) +2.631 F .13(arious shell v)-.25 F .13(ariables set by the program-)-.25 +F(mable completion f)144 441.6 Q(acilities, while a)-.1 E -.25(va)-.2 G +(ilable, will not ha).25 E .3 -.15(ve u)-.2 H(seful v).15 E(alues.)-.25 +E .352(The matches will be generated in the same w)144 465.6 R .352 +(ay as if the programmable completion code had gen-)-.1 F .02(erated th\ +em directly from a completion speci\214cation with the same \215ags.)144 +477.6 R(If)5.02 E F1(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only) +2.52 F(those completions matching)144 489.6 Q F1(wor)2.5 E(d)-.37 E F0 +(will be displayed.)2.5 E(The return v)144 513.6 Q +(alue is true unless an in)-.25 E -.25(va)-.4 G +(lid option is supplied, or no matches were generated.).25 E F3 +(complete)108 530.4 Q F0([)2.5 E F3(\255abcdefgjksuv)A F0 2.5(][)C F3 +-2.5 E F1(comp-option)2.5 E F0 2.5(][)C F3(\255DEI)-2.5 E F0 2.5 +(][)C F3-2.5 E F1(action)2.5 E F0 2.5(][)C F3-2.5 E F1 +(globpat)2.5 E F0 2.5(][)C F3-2.5 E F1(wor)2.5 E(dlist)-.37 E F0 +(])A([)144 542.4 Q F3A F1(function)2.5 E F0 2.5(][)C F3-2.5 +E F1(command)2.5 E F0 2.5(][)C F3-2.5 E F1(\214lterpat)2.5 E F0 +2.5(][)C F3-2.5 E F1(pr)2.5 E(e\214x)-.37 E F0 2.5(][)C F3 +-2.5 E F1(suf)2.5 E<8c78>-.18 E F0(])A F1(name)2.5 E F0([)2.5 E F1 +(name ...)A F0(])A F3(complete \255pr)108 554.4 Q F0([)2.5 E F3(\255DEI) +A F0 2.5(][)C F1(name)-2.5 E F0(...])2.5 E .633(Specify ho)144 566.4 R +3.133(wa)-.25 G -.18(rg)-3.133 G .633(uments to each).18 F F1(name)3.133 +E F0 .633(should be completed.)3.133 F .634(If the)5.634 F F33.134 +E F0 .634(option is supplied, or if no)3.134 F .14 +(options are supplied, e)144 578.4 R .139 +(xisting completion speci\214cations are printed in a w)-.15 F .139 +(ay that allo)-.1 F .139(ws them to be)-.25 F .31(reused as input.)144 +590.4 R(The)5.31 E F32.81 E F0 .31(option remo)2.81 F -.15(ve)-.15 +G 2.81(sac).15 G .31(ompletion speci\214cation for each)-2.81 F F1(name) +2.81 E F0 2.81(,o)C 1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E F1 +(name)2.81 E F0(s)A 1.208 +(are supplied, all completion speci\214cations.)144 602.4 R(The)6.208 E +F33.708 E F0 1.207(option indicates that other supplied options) +3.707 F .5(and actions should apply to the `)144 614.4 R(`def)-.74 E +(ault')-.1 E 3('c)-.74 G .5 +(ommand completion; that is, completion attempted on)-3 F 3.455(ac)144 +626.4 S .955(ommand for which no completion has pre)-3.455 F .955 +(viously been de\214ned.)-.25 F(The)5.955 E F33.455 E F0 .955 +(option indicates that)3.455 F .876 +(other supplied options and actions should apply to `)144 638.4 R +(`empty')-.74 E 3.376('c)-.74 G .876(ommand completion; that is, com-) +-3.376 F .448(pletion attempted on a blank line.)144 650.4 R(The)5.447 E +F32.947 E F0 .447 +(option indicates that other supplied options and actions)2.947 F .123 +(should apply to completion on the initial non-assignment w)144 662.4 R +.123(ord on the line, or after a command de-)-.1 F 1.021 +(limiter such as)144 674.4 R F3(;)3.521 E F0(or)3.521 E F3(|)3.521 E F0 +3.521(,w)C 1.021(hich is usually command name completion.)-3.521 F 1.02 +(If multiple options are sup-)6.02 F .707(plied, the)144 686.4 R F3 +3.207 E F0 .707(option tak)3.207 F .707(es precedence o)-.1 F -.15 +(ve)-.15 G(r).15 E F33.208 E F0 3.208(,a)C .708(nd both tak)-3.208 +F 3.208(ep)-.1 G .708(recedence o)-3.208 F -.15(ve)-.15 G(r).15 E F3 +3.208 E F0 5.708(.I)C 3.208(fa)-5.708 G 1.008 -.15(ny o)-3.208 H +(f).15 E F33.208 E F0(,)A F3144 698.4 Q F0 2.604(,o)C(r) +-2.604 E F32.604 E F0 .103(are supplied, an)2.603 F 2.603(yo)-.15 +G(ther)-2.603 E F1(name)2.603 E F0(ar)2.603 E .103 +(guments are ignored; these completions only apply to the)-.18 F +(case speci\214ed by the option.)144 710.4 Q(GNU Bash 5.0)72 768 Q +(2004 Apr 20)149.565 E(3)203.725 E 0 Cg EP +%%Page: 4 4 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E .152 +(The process of applying these completion speci\214cations when w)144 84 +R .153(ord completion is attempted is de-)-.1 F(scribed abo)144 96 Q .3 +-.15(ve u)-.15 H(nder).15 E/F1 10/Times-Bold@0 SF(Pr)2.5 E +(ogrammable Completion)-.18 E F0(.)A .556 +(Other options, if speci\214ed, ha)144 120 R .856 -.15(ve t)-.2 H .555 +(he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F .555 +(guments to the)-.18 F F13.055 E F0(,)A F13.055 E F0 3.055 +(,a)C(nd)-3.055 E F13.055 E F0 .722(options \(and, if necessary) +144 132 R 3.222(,t)-.65 G(he)-3.222 E F13.222 E F0(and)3.222 E F1 +3.222 E F0 .723(options\) should be quoted to protect them from e) +3.222 F(xpan-)-.15 E(sion before the)144 144 Q F1(complete)2.5 E F0 -.2 +(bu)2.5 G(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F1144 +156 Q/F2 10/Times-Italic@0 SF(comp-option)2.5 E F0(The)184 168 Q F2 +(comp-option)2.791 E F0 .291(controls se)2.791 F -.15(ve)-.25 G .291 +(ral aspects of the compspec').15 F 2.791(sb)-.55 G(eha)-2.791 E .291 +(vior be)-.2 F .291(yond the simple)-.15 F(generation of completions.) +184 180 Q F2(comp-option)5 E F0(may be one of:)2.5 E F1(bashdefault)184 +192 Q F0 .281(Perform the rest of the def)224 204 R(ault)-.1 E F1(bash) +2.781 E F0 .281(completions if the compspec generates no)2.781 F +(matches.)224 216 Q F1(default)184 228 Q F0 2.876(Use readline')224 228 +R 5.376(sd)-.55 G(ef)-5.376 E 2.875 +(ault \214lename completion if the compspec generates no)-.1 F(matches.) +224 240 Q F1(dir)184 252 Q(names)-.15 E F0(Perform directory name compl\ +etion if the compspec generates no matches.)224 264 Q F1(\214lenames)184 +276 Q F0 -.7(Te)224 288 S .137(ll readline that the compspec generates \ +\214lenames, so it can perform an).7 F 2.637<798c>-.15 G(le-)-2.637 E +.134(name\255speci\214c processing \(lik)224 300 R 2.634(ea)-.1 G .134 +(dding a slash to directory names, quoting spe-)-2.634 F .45 +(cial characters, or suppressing trailing spaces\).)224 312 R .45 +(Intended to be used with shell)5.45 F(functions.)224 324 Q F1(noquote) +184 336 Q F0 -.7(Te)224 336 S .814 +(ll readline not to quote the completed w).7 F .814(ords if the)-.1 F +3.314(ya)-.15 G .814(re \214lenames \(quoting)-3.314 F +(\214lenames is the def)224 348 Q(ault\).)-.1 E F1(nosort)184 360 Q F0 +-.7(Te)224 360 S(ll readline not to sort the list of possible completio\ +ns alphabetically).7 E(.)-.65 E F1(nospace)184 372 Q F0 -.7(Te)224 372 S +.22(ll readline not to append a space \(the def).7 F .22(ault\) to w)-.1 +F .22(ords completed at the end)-.1 F(of the line.)224 384 Q F1 +(plusdirs)184 396 Q F0 1.985(After an)224 396 R 4.485(ym)-.15 G 1.985 +(atches de\214ned by the compspec are generated, directory name)-4.485 F +.583(completion is attempted and an)224 408 R 3.084(ym)-.15 G .584 +(atches are added to the results of the other)-3.084 F(actions.)224 420 +Q F1144 432 Q F2(action)2.5 E F0(The)184 444 Q F2(action)2.5 E F0 +(may be one of the follo)2.5 E +(wing to generate a list of possible completions:)-.25 E F1(alias)184 +456 Q F0(Alias names.)224 456 Q(May also be speci\214ed as)5 E F1 +2.5 E F0(.)A F1(arrayv)184 468 Q(ar)-.1 E F0(Array v)224 480 Q +(ariable names.)-.25 E F1(binding)184 492 Q(Readline)224 492 Q F0 -.1 +(ke)2.5 G 2.5(yb)-.05 G(inding names.)-2.5 E F1 -.2(bu)184 504 S(iltin) +.2 E F0(Names of shell b)224 504 Q(uiltin commands.)-.2 E +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1(command)184 516 +Q F0(Command names.)224 528 Q(May also be speci\214ed as)5 E F12.5 +E F0(.)A F1(dir)184 540 Q(ectory)-.18 E F0(Directory names.)224 552 Q +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1(disabled)184 564 +Q F0(Names of disabled shell b)224 576 Q(uiltins.)-.2 E F1(enabled)184 +588 Q F0(Names of enabled shell b)224 588 Q(uiltins.)-.2 E F1(export)184 +600 Q F0(Names of e)224 600 Q(xported shell v)-.15 E 2.5(ariables. May) +-.25 F(also be speci\214ed as)2.5 E F12.5 E F0(.)A F1(\214le)184 +612 Q F0(File names.)224 612 Q(May also be speci\214ed as)5 E F1 +2.5 E F0(.)A F1(function)184 624 Q F0(Names of shell functions.)224 636 +Q F1(gr)184 648 Q(oup)-.18 E F0(Group names.)224 648 Q +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1(helptopic)184 +660 Q F0(Help topics as accepted by the)224 672 Q F1(help)2.5 E F0 -.2 +(bu)2.5 G(iltin.).2 E F1(hostname)184 684 Q F0(Hostnames, as tak)224 696 +Q(en from the \214le speci\214ed by the)-.1 E/F3 9/Times-Bold@0 SF +(HOSTFILE)2.5 E F0(shell v)2.25 E(ariable.)-.25 E F1(job)184 708 Q F0 +(Job names, if job control is acti)224 708 Q -.15(ve)-.25 G 5(.M).15 G +(ay also be speci\214ed as)-5 E F12.5 E F0(.)A(GNU Bash 5.0)72 768 +Q(2004 Apr 20)149.565 E(4)203.725 E 0 Cg EP +%%Page: 5 5 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF -.1(ke)184 84 S(yw).1 +E(ord)-.1 E F0(Shell reserv)224 96 Q(ed w)-.15 E 2.5(ords. May)-.1 F +(also be speci\214ed as)2.5 E F12.5 E F0(.)A F1(running)184 108 Q +F0(Names of running jobs, if job control is acti)224 108 Q -.15(ve)-.25 +G(.).15 E F1(ser)184 120 Q(vice)-.1 E F0(Service names.)224 120 Q +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1(setopt)184 132 Q +F0 -1.11(Va)224 132 S(lid ar)1.11 E(guments for the)-.18 E F12.5 E +F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1 +(shopt)184 144 Q F0(Shell option names as accepted by the)224 144 Q F1 +(shopt)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(signal)184 156 Q F0 +(Signal names.)224 156 Q F1(stopped)184 168 Q F0 +(Names of stopped jobs, if job control is acti)224 168 Q -.15(ve)-.25 G +(.).15 E F1(user)184 180 Q F0(User names.)224 180 Q +(May also be speci\214ed as)5 E F12.5 E F0(.)A F1 -.1(va)184 192 S +(riable).1 E F0(Names of all shell v)224 192 Q 2.5(ariables. May)-.25 F +(also be speci\214ed as)2.5 E F12.5 E F0(.)A F1144 204 Q/F2 +10/Times-Italic@0 SF(command)2.5 E(command)184 216 Q F0 1.056(is e)3.556 +F -.15(xe)-.15 G 1.056(cuted in a subshell en).15 F 1.056 +(vironment, and its output is used as the possible)-.4 F(completions.) +184 228 Q F1144 240 Q F2(function)2.5 E F0 .113 +(The shell function)184 252 R F2(function)2.614 E F0 .114(is e)2.614 F +-.15(xe)-.15 G .114(cuted in the current shell en).15 F 2.614 +(vironment. When)-.4 F .114(the func-)2.614 F .817(tion is e)184 264 R +-.15(xe)-.15 G .817(cuted, the \214rst ar).15 F .817(gument \()-.18 F F1 +($1)A F0 3.316(\)i)C 3.316(st)-3.316 G .816 +(he name of the command whose ar)-3.316 F(guments)-.18 E 1.407 +(are being completed, the second ar)184 276 R 1.407(gument \()-.18 F F1 +($2)A F0 3.907(\)i)C 3.907(st)-3.907 G 1.407(he w)-3.907 F 1.407 +(ord being completed, and the)-.1 F .104(third ar)184 288 R .104 +(gument \()-.18 F F1($3)A F0 2.604(\)i)C 2.604(st)-2.604 G .104(he w) +-2.604 F .104(ord preceding the w)-.1 F .103 +(ord being completed on the current com-)-.1 F .101(mand line.)184 300 R +.101(When it \214nishes, the possible completions are retrie)5.101 F +-.15(ve)-.25 G 2.602(df).15 G .102(rom the v)-2.602 F .102(alue of the) +-.25 F/F3 9/Times-Bold@0 SF(COMPREPL)184 312 Q(Y)-.828 E F0(array v)2.25 +E(ariable.)-.25 E F1144 324 Q F2(globpat)2.5 E F0 1.008 +(The pathname e)184 336 R 1.008(xpansion pattern)-.15 F F2(globpat)3.507 +E F0 1.007(is e)3.507 F 1.007(xpanded to generate the possible comple-) +-.15 F(tions.)184 348 Q F1144 360 Q F2(pr)2.5 E(e\214x)-.37 E(pr) +184 372 Q(e\214x)-.37 E F0 .534(is added at the be)3.034 F .534 +(ginning of each possible completion after all other options ha)-.15 F +-.15(ve)-.2 G(been applied.)184 384 Q F1144 396 Q F2(suf)2.5 E +<8c78>-.18 E(suf)184 396 Q<8c78>-.18 E F0 +(is appended to each possible completion after all other options ha)2.5 +E .3 -.15(ve b)-.2 H(een applied.).15 E F1144 408 Q F2(wor)2.5 E +(dlist)-.37 E F0(The)184 420 Q F2(wor)3.64 E(dlist)-.37 E F0 1.14 +(is split using the characters in the)3.64 F F3(IFS)3.64 E F0 1.139 +(special v)3.39 F 1.139(ariable as delimiters, and)-.25 F .98 +(each resultant w)184 432 R .98(ord is e)-.1 F 3.481(xpanded. Shell)-.15 +F .981(quoting is honored within)3.481 F F2(wor)3.481 E(dlist)-.37 E F0 +3.481(,i)C 3.481(no)-3.481 G .981(rder to)-3.481 F(pro)184 444 Q .766 +(vide a mechanism for the w)-.15 F .765 +(ords to contain shell metacharacters or characters in the)-.1 F -.25 +(va)184 456 S 1.964(lue of).25 F F3(IFS)4.464 E/F4 9/Times-Roman@0 SF(.) +A F0 1.964 +(The possible completions are the members of the resultant list which) +6.464 F(match the w)184 468 Q(ord being completed.)-.1 E F1144 480 +Q F2(\214lterpat)2.5 E(\214lterpat)184 492 Q F0 .456 +(is a pattern as used for pathname e)2.956 F 2.956(xpansion. It)-.15 F +.455(is applied to the list of possible)2.956 F 1.596 +(completions generated by the preceding options and ar)184 504 R 1.596 +(guments, and each completion)-.18 F(matching)184 516 Q F2(\214lterpat) +3.205 E F0 .705(is remo)3.205 F -.15(ve)-.15 G 3.205(df).15 G .704 +(rom the list.)-3.205 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0 +(in)3.204 E F2(\214lterpat)3.204 E F0(ne)3.204 E -.05(ga)-.15 G .704 +(tes the pattern;).05 F(in this case, an)184 528 Q 2.5(yc)-.15 G +(ompletion not matching)-2.5 E F2(\214lterpat)2.5 E F0(is remo)2.5 E +-.15(ve)-.15 G(d.).15 E .466(The return v)144 544.8 R .466 +(alue is true unless an in)-.25 F -.25(va)-.4 G .466 +(lid option is supplied, an option other than).25 F F12.967 E F0 +(or)2.967 E F12.967 E F0 .467(is sup-)2.967 F 1.362 +(plied without a)144 556.8 R F2(name)3.862 E F0(ar)3.862 E 1.361 +(gument, an attempt is made to remo)-.18 F 1.661 -.15(ve a c)-.15 H +1.361(ompletion speci\214cation for a).15 F F2(name)144 568.8 Q F0 +(for which no speci\214cation e)2.5 E +(xists, or an error occurs adding a completion speci\214cation.)-.15 E +F1(compopt)108 585.6 Q F0([)2.5 E F1A F2(option)2.5 E F0 2.5(][)C +F1(\255DEI)-2.5 E F0 2.5(][)C F1(+o)-2.5 E F2(option)2.5 E F0 2.5(][)C +F2(name)-2.5 E F0(])A .447(Modify completion options for each)144 597.6 +R F2(name)2.947 E F0 .447(according to the)2.947 F F2(option)2.947 E F0 +.447(s, or for the currently-e)B -.15(xe)-.15 G(cuting).15 E .726 +(completion if no)144 609.6 R F2(name)3.226 E F0 3.226(sa)C .726 +(re supplied.)-3.226 F .725(If no)5.725 F F2(option)3.225 E F0 3.225(sa) +C .725(re gi)-3.225 F -.15(ve)-.25 G .725 +(n, display the completion options for).15 F(each)144 621.6 Q F2(name) +3.223 E F0 .723(or the current completion.)3.223 F .724(The possible v) +5.724 F .724(alues of)-.25 F F2(option)3.224 E F0 .724(are those v)3.224 +F .724(alid for the)-.25 F F1(com-)3.224 E(plete)144 633.6 Q F0 -.2(bu) +2.678 G .178(iltin described abo).2 F -.15(ve)-.15 G 5.178(.T).15 G(he) +-5.178 E F12.678 E F0 .178 +(option indicates that other supplied options should apply to)2.678 F +1.227(the `)144 645.6 R(`def)-.74 E(ault')-.1 E 3.727('c)-.74 G 1.228(o\ +mmand completion; that is, completion attempted on a command for which \ +no)-3.727 F 2.039(completion has pre)144 657.6 R 2.039 +(viously been de\214ned.)-.25 F(The)7.038 E F14.538 E F0 2.038 +(option indicates that other supplied options)4.538 F 1.538 +(should apply to `)144 669.6 R(`empty')-.74 E 4.038('c)-.74 G 1.539 +(ommand completion; that is, completion attempted on a blank line.) +-4.038 F(The)144 681.6 Q F13.02 E F0 .52(option indicates that ot\ +her supplied options should apply to completion on the initial non-)3.02 +F .867(assignment w)144 693.6 R .868 +(ord on the line, or after a command delimiter such as)-.1 F F1(;)3.368 +E F0(or)3.368 E F1(|)3.368 E F0 3.368(,w)C .868(hich is usually com-) +-3.368 F(mand name completion.)144 705.6 Q 1.388(The return v)144 729.6 +R 1.388(alue is true unless an in)-.25 F -.25(va)-.4 G 1.387 +(lid option is supplied, an attempt is made to modify the).25 F +(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(5)203.725 E 0 Cg EP +%%Page: 6 6 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E(options for a)144 84 Q/F1 10/Times-Italic@0 +SF(name)2.5 E F0(for which no completion speci\214cation e)2.5 E +(xists, or an output error occurs.)-.15 E/F2 10/Times-Bold@0 SF +(continue)108 100.8 Q F0([)2.5 E F1(n)A F0(])A .85(Resume the ne)144 +112.8 R .85(xt iteration of the enclosing)-.15 F F2 -.25(fo)3.35 G(r).25 +E F0(,)A F2(while)3.351 E F0(,)A F2(until)3.351 E F0 3.351(,o)C(r)-3.351 +E F2(select)3.351 E F0 3.351(loop. If)3.351 F F1(n)3.711 E F0 .851 +(is speci\214ed, re-)3.591 F .204(sume at the)144 124.8 R F1(n)2.704 E +F0 .204(th enclosing loop.)B F1(n)5.564 E F0 .204(must be)2.944 F/F3 10 +/Symbol SF2.704 E F0 2.703(1. If)2.704 F F1(n)3.063 E F0 .203 +(is greater than the number of enclosing loops,)2.943 F 1.183 +(the last enclosing loop \(the `)144 136.8 R(`top-le)-.74 E -.15(ve)-.25 +G(l').15 E 3.683('l)-.74 G 1.183(oop\) is resumed.)-3.683 F 1.184 +(The return v)6.184 F 1.184(alue is 0 unless)-.25 F F1(n)3.684 E F0 +1.184(is not)3.684 F(greater than or equal to 1.)144 148.8 Q F2(declar) +108 165.6 Q(e)-.18 E F0([)2.5 E F2(\255aAfFgiIlnrtux)A F0 2.5(][)C F2 +-2.5 E F0 2.5(][)C F1(name)-2.5 E F0([=)A F1(value)A F0 2.5(].)C +(..])-2.5 E F2(typeset)108 177.6 Q F0([)2.5 E F2(\255aAfFgiIlnrtux)A F0 +2.5(][)C F2-2.5 E F0 2.5(][)C F1(name)-2.5 E F0([=)A F1(value)A F0 +2.5(].)C(..])-2.5 E 1.265(Declare v)144 189.6 R 1.265 +(ariables and/or gi)-.25 F 1.565 -.15(ve t)-.25 H 1.265(hem attrib).15 F +3.765(utes. If)-.2 F(no)3.765 E F1(name)3.765 E F0 3.765(sa)C 1.265 +(re gi)-3.765 F -.15(ve)-.25 G 3.764(nt).15 G 1.264(hen display the v) +-3.764 F 1.264(alues of)-.25 F -.25(va)144 201.6 S 3.46(riables. The).25 +F F23.46 E F0 .96(option will display the attrib)3.46 F .96 +(utes and v)-.2 F .96(alues of each)-.25 F F1(name)3.82 E F0 5.96(.W).18 +G(hen)-5.96 E F23.46 E F0 .96(is used)3.46 F(with)144 213.6 Q F1 +(name)2.775 E F0(ar)2.775 E .275 +(guments, additional options, other than)-.18 F F22.775 E F0(and) +2.775 E F22.775 E F0 2.775(,a)C .274(re ignored.)-2.775 F(When) +5.274 E F22.774 E F0 .274(is supplied)2.774 F(without)144 225.6 Q +F1(name)3.789 E F0(ar)3.789 E 1.289(guments, it will display the attrib) +-.18 F 1.289(utes and v)-.2 F 1.29(alues of all v)-.25 F 1.29 +(ariables ha)-.25 F 1.29(ving the at-)-.2 F(trib)144 237.6 Q .38 +(utes speci\214ed by the additional options.)-.2 F .38 +(If no other options are supplied with)5.38 F F22.88 E F0(,)A F2 +(declar)2.88 E(e)-.18 E F0(will)2.88 E 1.106(display the attrib)144 +249.6 R 1.106(utes and v)-.2 F 1.106(alues of all shell v)-.25 F 3.606 +(ariables. The)-.25 F F23.606 E F0 1.107 +(option will restrict the display to)3.606 F .3(shell functions.)144 +261.6 R(The)5.3 E F22.8 E F0 .299(option inhibits the display of \ +function de\214nitions; only the function name)2.8 F 1.54(and attrib)144 +273.6 R 1.54(utes are printed.)-.2 F 1.54(If the)6.54 F F2(extdeb)4.04 E +(ug)-.2 E F0 1.54(shell option is enabled using)4.04 F F2(shopt)4.04 E +F0 4.04(,t)C 1.54(he source \214le)-4.04 F .648 +(name and line number where each)144 285.6 R F1(name)3.148 E F0 .648 +(is de\214ned are displayed as well.)3.148 F(The)5.648 E F23.148 E +F0 .648(option implies)3.148 F F2144 297.6 Q F0 5.836(.T)C(he) +-5.836 E F23.336 E F0 .836(option forces v)3.336 F .837 +(ariables to be created or modi\214ed at the global scope, e)-.25 F -.15 +(ve)-.25 G 3.337(nw).15 G(hen)-3.337 E F2(de-)3.337 E(clar)144 309.6 Q +(e)-.18 E F0 .819(is e)3.319 F -.15(xe)-.15 G .819 +(cuted in a shell function.).15 F .818 +(It is ignored in all other cases.)5.818 F(The)5.818 E F23.318 E +F0 .818(option causes local)3.318 F -.25(va)144 321.6 S .693 +(riables to inherit the attrib).25 F .693(utes \(e)-.2 F .693(xcept the) +-.15 F F1(namer)3.194 E(ef)-.37 E F0(attrib)3.194 E .694(ute\) and v)-.2 +F .694(alue of an)-.25 F 3.194(ye)-.15 G .694(xisting v)-3.344 F +(ariable)-.25 E .82(with the same)144 333.6 R F1(name)3.32 E F0 .82 +(at a surrounding scope.)3.32 F .82(If there is no e)5.82 F .82 +(xisting v)-.15 F .82(ariable, the local v)-.25 F .82(ariable is)-.25 F +.379(initially unset.)144 345.6 R .379(The follo)5.379 F .379 +(wing options can be used to restrict output to v)-.25 F .38 +(ariables with the speci\214ed)-.25 F(attrib)144 357.6 Q(ute or to gi) +-.2 E .3 -.15(ve v)-.25 H(ariables attrib)-.1 E(utes:)-.2 E F2144 +369.6 Q F0(Each)180 369.6 Q F1(name)2.5 E F0(is an inde)2.5 E -.15(xe) +-.15 G 2.5(da).15 G(rray v)-2.5 E(ariable \(see)-.25 E F2(Arrays)2.5 E +F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F2144 381.6 Q F0(Each)180 +381.6 Q F1(name)2.5 E F0(is an associati)2.5 E .3 -.15(ve a)-.25 H +(rray v).15 E(ariable \(see)-.25 E F2(Arrays)2.5 E F0(abo)2.5 E -.15(ve) +-.15 G(\).).15 E F2144 393.6 Q F0(Use function names only)180 +393.6 Q(.)-.65 E F2144 405.6 Q F0 .558(The v)180 405.6 R .558 +(ariable is treated as an inte)-.25 F .558(ger; arithmetic e)-.15 F -.25 +(va)-.25 G .558(luation \(see).25 F/F4 9/Times-Bold@0 SF .557 +(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E(TION)180 417.6 Q F0(abo) +2.25 E -.15(ve)-.15 G 2.5(\)i).15 G 2.5(sp)-2.5 G(erformed when the v) +-2.5 E(ariable is assigned a v)-.25 E(alue.)-.25 E F2144 429.6 Q +F0 .909(When the v)180 429.6 R .909(ariable is assigned a v)-.25 F .909 +(alue, all upper)-.25 F .909(-case characters are con)-.2 F -.15(ve)-.4 +G .91(rted to lo).15 F(wer)-.25 E(-)-.2 E 2.5(case. The)180 441.6 R +(upper)2.5 E(-case attrib)-.2 E(ute is disabled.)-.2 E F2144 453.6 +Q F0(Gi)180 453.6 Q 1.62 -.15(ve e)-.25 H(ach).15 E F1(name)3.82 E F0 +(the)3.82 E F1(namer)3.819 E(ef)-.37 E F0(attrib)3.819 E 1.319 +(ute, making it a name reference to another v)-.2 F(ariable.)-.25 E .477 +(That other v)180 465.6 R .478(ariable is de\214ned by the v)-.25 F .478 +(alue of)-.25 F F1(name)2.978 E F0 5.478(.A)C .478 +(ll references, assignments, and at-)-5.478 F(trib)180 477.6 Q .782 +(ute modi\214cations to)-.2 F F1(name)3.282 E F0 3.282(,e)C .782 +(xcept those using or changing the)-3.432 F F23.281 E F0(attrib) +3.281 E .781(ute itself, are)-.2 F .808(performed on the v)180 489.6 R +.808(ariable referenced by)-.25 F F1(name)3.308 E F0 1.908 -.55('s v)D +3.308(alue. The).3 F .809(nameref attrib)3.309 F .809(ute cannot be)-.2 +F(applied to array v)180 501.6 Q(ariables.)-.25 E F2144 513.6 Q F0 +(Mak)180 513.6 Q(e)-.1 E F1(name)3.655 E F0 3.655(sr)C(eadonly)-3.655 E +6.154(.T)-.65 G 1.154(hese names cannot then be assigned v)-6.154 F +1.154(alues by subsequent as-)-.25 F(signment statements or unset.)180 +525.6 Q F2144 537.6 Q F0(Gi)180 537.6 Q .729 -.15(ve e)-.25 H(ach) +.15 E F1(name)2.929 E F0(the)2.929 E F1(tr)2.929 E(ace)-.15 E F0(attrib) +2.929 E 2.929(ute. T)-.2 F .429(raced functions inherit the)-.35 F F2 +(DEB)2.929 E(UG)-.1 E F0(and)2.93 E F2(RETURN)2.93 E F0 +(traps from the calling shell.)180 549.6 Q(The trace attrib)5 E +(ute has no special meaning for v)-.2 E(ariables.)-.25 E F2144 +561.6 Q F0 .91(When the v)180 561.6 R .909(ariable is assigned a v)-.25 +F .909(alue, all lo)-.25 F(wer)-.25 E .909(-case characters are con)-.2 +F -.15(ve)-.4 G .909(rted to upper).15 F(-)-.2 E 2.5(case. The)180 573.6 +R(lo)2.5 E(wer)-.25 E(-case attrib)-.2 E(ute is disabled.)-.2 E F2 +144 585.6 Q F0(Mark)180 585.6 Q F1(name)2.5 E F0 2.5(sf)C(or e)-2.5 E +(xport to subsequent commands via the en)-.15 E(vironment.)-.4 E .143 +(Using `+' instead of `\255' turns of)144 602.4 R 2.643(ft)-.25 G .143 +(he attrib)-2.643 F .143(ute instead, with the e)-.2 F .144 +(xceptions that)-.15 F F2(+a)2.644 E F0(and)2.644 E F2(+A)2.644 E F0 +.144(may not)2.644 F .579(be used to destro)144 614.4 R 3.079(ya)-.1 G +.579(rray v)-3.079 F .579(ariables and)-.25 F F2(+r)3.079 E F0 .579 +(will not remo)3.079 F .879 -.15(ve t)-.15 H .579(he readonly attrib).15 +F 3.079(ute. When)-.2 F .578(used in a)3.078 F(function,)144 626.4 Q F2 +(declar)3.543 E(e)-.18 E F0(and)3.543 E F2(typeset)3.543 E F0(mak)3.543 +E 3.543(ee)-.1 G(ach)-3.543 E F1(name)3.543 E F0 1.043 +(local, as with the)3.543 F F2(local)3.544 E F0 1.044 +(command, unless the)3.544 F F23.544 E F0 1.205 +(option is supplied.)144 638.4 R 1.205(If a v)6.205 F 1.205 +(ariable name is follo)-.25 F 1.205(wed by =)-.25 F F1(value)A F0 3.705 +(,t)C 1.205(he v)-3.705 F 1.205(alue of the v)-.25 F 1.205 +(ariable is set to)-.25 F F1(value)144 650.4 Q F0 5.217(.W)C .217 +(hen using)-5.217 F F22.717 E F0(or)2.717 E F22.717 E F0 +.217(and the compound assignment syntax to create array v)2.717 F .218 +(ariables, addi-)-.25 F .882(tional attrib)144 662.4 R .882 +(utes do not tak)-.2 F 3.382(ee)-.1 G -.25(ff)-3.382 G .882 +(ect until subsequent assignments.).25 F .882(The return v)5.882 F .882 +(alue is 0 unless an)-.25 F(in)144 674.4 Q -.25(va)-.4 G .365(lid optio\ +n is encountered, an attempt is made to de\214ne a function using).25 F +/F5 10/Courier@0 SF .366(\255f foo=bar)2.866 F F0 2.866(,a)C 2.866(na) +-2.866 G(t-)-2.866 E .549(tempt is made to assign a v)144 686.4 R .549 +(alue to a readonly v)-.25 F .548 +(ariable, an attempt is made to assign a v)-.25 F .548(alue to an)-.25 F +1.748(array v)144 698.4 R 1.748 +(ariable without using the compound assignment syntax \(see)-.25 F F2 +(Arrays)4.249 E F0(abo)4.249 E -.15(ve)-.15 G 1.749(\), one of the).15 F +F1(names)144 710.4 Q F0 .359(is not a v)2.859 F .359(alid shell v)-.25 F +.359(ariable name, an attempt is made to turn of)-.25 F 2.859(fr)-.25 G +.359(eadonly status for a read-)-2.859 F 1.212(only v)144 722.4 R 1.213 +(ariable, an attempt is made to turn of)-.25 F 3.713(fa)-.25 G 1.213 +(rray status for an array v)-3.713 F 1.213(ariable, or an attempt is) +-.25 F(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(6)203.725 E 0 Cg EP +%%Page: 7 7 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E(made to display a non-e)144 84 Q +(xistent function with)-.15 E/F1 10/Times-Bold@0 SF2.5 E F0(.)A F1 +(dirs [\255clpv] [+)108 100.8 Q/F2 10/Times-Italic@0 SF(n)A F1 2.5(][)C +-2.5 E F2(n)A F1(])A F0 -.4(Wi)144 112.8 S .329 +(thout options, displays the list of currently remembered directories.) +.4 F .328(The def)5.328 F .328(ault display is on a)-.1 F 1.238 +(single line with directory names separated by spaces.)144 124.8 R 1.238 +(Directories are added to the list with the)6.238 F F1(pushd)144 136.8 Q +F0 .928(command; the)3.428 F F1(popd)3.428 E F0 .928(command remo)3.428 +F -.15(ve)-.15 G 3.428(se).15 G .928(ntries from the list.)-3.428 F .928 +(The current directory is al-)5.928 F -.1(wa)144 148.8 S +(ys the \214rst directory in the stack.).1 E F1144 160.8 Q F0 +(Clears the directory stack by deleting all of the entries.)180 160.8 Q +F1144 172.8 Q F0 .881 +(Produces a listing using full pathnames; the def)180 172.8 R .882 +(ault listing format uses a tilde to denote)-.1 F(the home directory)180 +184.8 Q(.)-.65 E F1144 196.8 Q F0 +(Print the directory stack with one entry per line.)180 196.8 Q F1 +144 208.8 Q F0 .273(Print the directory stack with one entry per line, \ +pre\214xing each entry with its inde)180 208.8 R 2.772(xi)-.15 G 2.772 +(nt)-2.772 G(he)-2.772 E(stack.)180 220.8 Q F1(+)144 232.8 Q F2(n)A F0 +1.564(Displays the)180 232.8 R F2(n)4.064 E F0 1.565 +(th entry counting from the left of the list sho)B 1.565(wn by)-.25 F F1 +(dirs)4.065 E F0 1.565(when in)4.065 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E +(without options, starting with zero.)180 244.8 Q F1144 256.8 Q F2 +(n)A F0 1.194(Displays the)180 256.8 R F2(n)3.694 E F0 1.194 +(th entry counting from the right of the list sho)B 1.194(wn by)-.25 F +F1(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E +(without options, starting with zero.)180 268.8 Q .257(The return v)144 +285.6 R .258(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258 +(lid option is supplied or).25 F F2(n)2.758 E F0(inde)2.758 E -.15(xe) +-.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-) +.15 F(tory stack.)144 297.6 Q F1(diso)108 314.4 Q(wn)-.1 E F0([)2.5 E F1 +(\255ar)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(jobspec)-2.5 E F0 +(... |)2.5 E F2(pid)2.5 E F0(... ])2.5 E -.4(Wi)144 326.4 S .122 +(thout options, remo).4 F .422 -.15(ve e)-.15 H(ach).15 E F2(jobspec) +4.362 E F0 .122(from the table of acti)2.932 F .422 -.15(ve j)-.25 H +2.622(obs. If).15 F F2(jobspec)4.362 E F0 .121(is not present, and)2.932 +F .096(neither the)144 338.4 R F12.596 E F0 .096(nor the)2.596 F +F12.596 E F0 .096(option is supplied, the)2.596 F F2(curr)2.596 E +.096(ent job)-.37 F F0 .096(is used.)2.596 F .096(If the)5.096 F F1 +2.596 E F0 .096(option is gi)2.596 F -.15(ve)-.25 G .096(n, each) +.15 F F2(jobspec)145.74 350.4 Q F0 .586(is not remo)3.396 F -.15(ve)-.15 +G 3.086(df).15 G .585(rom the table, b)-3.086 F .585(ut is mark)-.2 F +.585(ed so that)-.1 F/F3 9/Times-Bold@0 SF(SIGHUP)3.085 E F0 .585 +(is not sent to the job if the)2.835 F .962(shell recei)144 362.4 R -.15 +(ve)-.25 G 3.462(sa).15 G F3(SIGHUP)A/F4 9/Times-Roman@0 SF(.)A F0 .962 +(If no)5.462 F F2(jobspec)5.202 E F0 .962(is supplied, the)3.772 F F1 +3.462 E F0 .962(option means to remo)3.462 F 1.262 -.15(ve o)-.15 +H 3.462(rm).15 G .962(ark all)-3.462 F 1.359(jobs; the)144 374.4 R F1 +3.859 E F0 1.359(option without a)3.859 F F2(jobspec)5.599 E F0 +(ar)4.169 E 1.358(gument restricts operation to running jobs.)-.18 F +1.358(The return)6.358 F -.25(va)144 386.4 S(lue is 0 unless a).25 E F2 +(jobspec)4.24 E F0(does not specify a v)2.81 E(alid job)-.25 E(.)-.4 E +F1(echo)108 403.2 Q F0([)2.5 E F1(\255neE)A F0 2.5(][)C F2(ar)-2.5 E(g) +-.37 E F0(...])2.5 E .424(Output the)144 415.2 R F2(ar)2.924 E(g)-.37 E +F0 .424(s, separated by spaces, follo)B .424(wed by a ne)-.25 F 2.924 +(wline. The)-.25 F .424(return status is 0 unless a write)2.924 F .308 +(error occurs.)144 427.2 R(If)5.308 E F12.808 E F0 .308 +(is speci\214ed, the trailing ne)2.808 F .308(wline is suppressed.)-.25 +F .307(If the)5.308 F F12.807 E F0 .307(option is gi)2.807 F -.15 +(ve)-.25 G .307(n, inter).15 F(-)-.2 E .197(pretation of the follo)144 +439.2 R .198(wing backslash-escaped characters is enabled.)-.25 F(The) +5.198 E F12.698 E F0 .198(option disables the in-)2.698 F .067 +(terpretation of these escape characters, e)144 451.2 R -.15(ve)-.25 G +2.567(no).15 G 2.567(ns)-2.567 G .067(ystems where the)-2.567 F 2.567 +(ya)-.15 G .067(re interpreted by def)-2.567 F 2.567(ault. The)-.1 F F1 +(xpg_echo)144 463.2 Q F0 .601 +(shell option may be used to dynamically determine whether or not)3.101 +F F1(echo)3.102 E F0 -.15(ex)3.102 G .602(pands these).15 F .659 +(escape characters by def)144 475.2 R(ault.)-.1 E F1(echo)5.659 E F0 +.659(does not interpret)3.159 F F13.159 E F0 .659 +(to mean the end of options.)3.159 F F1(echo)5.658 E F0(inter)3.158 E(-) +-.2 E(prets the follo)144 487.2 Q(wing escape sequences:)-.25 E F1(\\a) +144 499.2 Q F0(alert \(bell\))180 499.2 Q F1(\\b)144 511.2 Q F0 +(backspace)180 511.2 Q F1(\\c)144 523.2 Q F0(suppress further output)180 +523.2 Q F1(\\e)144 535.2 Q(\\E)144 547.2 Q F0(an escape character)180 +547.2 Q F1(\\f)144 559.2 Q F0(form feed)180 559.2 Q F1(\\n)144 571.2 Q +F0(ne)180 571.2 Q 2.5(wl)-.25 G(ine)-2.5 E F1(\\r)144 583.2 Q F0 +(carriage return)180 583.2 Q F1(\\t)144 595.2 Q F0(horizontal tab)180 +595.2 Q F1(\\v)144 607.2 Q F0 -.15(ve)180 607.2 S(rtical tab).15 E F1 +(\\\\)144 619.2 Q F0(backslash)180 619.2 Q F1(\\0)144 631.2 Q F2(nnn)A +F0(the eight-bit character whose v)180 631.2 Q(alue is the octal v)-.25 +E(alue)-.25 E F2(nnn)2.5 E F0(\(zero to three octal digits\))2.5 E F1 +(\\x)144 643.2 Q F2(HH)A F0(the eight-bit character whose v)180 643.2 Q +(alue is the he)-.25 E(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0 +(\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1 +(\\u)144 655.2 Q F2(HHHH)A F0 1.506 +(the Unicode \(ISO/IEC 10646\) character whose v)180 667.2 R 1.507 +(alue is the he)-.25 F 1.507(xadecimal v)-.15 F(alue)-.25 E F2(HHHH) +4.007 E F0(\(one to four he)180 679.2 Q 2.5(xd)-.15 G(igits\))-2.5 E F1 +(\\U)144 691.2 Q F2(HHHHHHHH)A F0 .548 +(the Unicode \(ISO/IEC 10646\) character whose v)180 703.2 R .547 +(alue is the he)-.25 F .547(xadecimal v)-.15 F(alue)-.25 E F2(HHHHH-) +3.047 E(HHH)180 715.2 Q F0(\(one to eight he)2.5 E 2.5(xd)-.15 G +(igits\))-2.5 E(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(7)203.725 E +0 Cg EP +%%Page: 8 8 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF(enable)108 84 Q F0([) +2.5 E F1A F0 2.5(][)C F1(\255dnps)-2.5 E F0 2.5(][)C F1-2.5 +E/F2 10/Times-Italic@0 SF(\214lename)2.5 E F0 2.5(][)C F2(name)-2.5 E F0 +(...])2.5 E .277(Enable and disable b)144 96 R .278 +(uiltin shell commands.)-.2 F .278(Disabling a b)5.278 F .278 +(uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .834 +(the same name as a shell b)144 108 R .834(uiltin to be e)-.2 F -.15(xe) +-.15 G .834(cuted without specifying a full pathname, e).15 F -.15(ve) +-.25 G 3.333(nt).15 G(hough)-3.333 E .989 +(the shell normally searches for b)144 120 R .989 +(uiltins before disk commands.)-.2 F(If)5.989 E F13.489 E F0 .99 +(is used, each)3.49 F F2(name)3.49 E F0 .99(is dis-)3.49 F .649 +(abled; otherwise,)144 132 R F2(names)3.148 E F0 .648(are enabled.)3.148 +F -.15(Fo)5.648 G 3.148(re).15 G .648(xample, to use the)-3.298 F F1 +(test)3.148 E F0 .648(binary found via the)3.148 F/F3 9/Times-Bold@0 SF +-.666(PA)3.148 G(TH)-.189 E F0(in-)2.898 E .538(stead of the shell b)144 +144 R .538(uiltin v)-.2 F .538(ersion, run)-.15 F/F4 10/Courier@0 SF +.538(enable -n test)3.038 F F0 5.538(.T)C(he)-5.538 E F13.038 E F0 +.539(option means to load the ne)3.038 F(w)-.25 E -.2(bu)144 156 S 1.365 +(iltin command).2 F F2(name)4.225 E F0 1.365(from shared object)4.045 F +F2(\214lename)5.775 E F0 3.865(,o).18 G 3.865(ns)-3.865 G 1.365 +(ystems that support dynamic loading.)-3.865 F(The)144 168 Q F1 +2.866 E F0 .366(option will delete a b)2.866 F .366(uiltin pre)-.2 F +.366(viously loaded with)-.25 F F12.867 E F0 5.367(.I)C 2.867(fn) +-5.367 G(o)-2.867 E F2(name)2.867 E F0(ar)2.867 E .367(guments are gi) +-.18 F -.15(ve)-.25 G .367(n, or).15 F .399(if the)144 180 R F1 +2.899 E F0 .399(option is supplied, a list of shell b)2.899 F .399 +(uiltins is printed.)-.2 F -.4(Wi)5.399 G .399(th no other option ar).4 +F .398(guments, the)-.18 F .098(list consists of all enabled shell b)144 +192 R 2.598(uiltins. If)-.2 F F12.598 E F0 .098 +(is supplied, only disabled b)2.598 F .099(uiltins are printed.)-.2 F +(If)5.099 E F12.599 E F0 .906 +(is supplied, the list printed includes all b)144 204 R .905 +(uiltins, with an indication of whether or not each is en-)-.2 F 2.872 +(abled. If)144 216 R F12.872 E F0 .372 +(is supplied, the output is restricted to the POSIX)2.872 F F2(special) +2.873 E F0 -.2(bu)2.873 G 2.873(iltins. The).2 F .373(return v)2.873 F +.373(alue is)-.25 F 2.5(0u)144 228 S(nless a)-2.5 E F2(name)2.86 E F0 +(is not a shell b)2.68 E(uiltin or there is an error loading a ne)-.2 E +2.5(wb)-.25 G(uiltin from a shared object.)-2.7 E F1 -2.3 -.15(ev a)108 +244.8 T(l).15 E F0([)2.5 E F2(ar)A(g)-.37 E F0(...])2.5 E(The)144 256.8 +Q F2(ar)3.171 E(g)-.37 E F0 3.171(sa)C .671 +(re read and concatenated together into a single command.)-3.171 F .67 +(This command is then read)5.67 F .478(and e)144 268.8 R -.15(xe)-.15 G +.478(cuted by the shell, and its e).15 F .478 +(xit status is returned as the v)-.15 F .479(alue of)-.25 F F1 -2.3 -.15 +(ev a)2.979 H(l).15 E F0 5.479(.I)C 2.979(ft)-5.479 G .479(here are no) +-2.979 F F2(ar)3.309 E(gs)-.37 E F0(,).27 E(or only null ar)144 280.8 Q +(guments,)-.18 E F1 -2.3 -.15(ev a)2.5 H(l).15 E F0(returns 0.)2.5 E F1 +(exec)108 297.6 Q F0([)2.5 E F1(\255cl)A F0 2.5(][)C F1-2.5 E F2 +(name)2.5 E F0 2.5(][)C F2(command)-2.5 E F0([)2.5 E F2(ar)A(guments) +-.37 E F0(]])A(If)144 309.6 Q F2(command)3.006 E F0 .306 +(is speci\214ed, it replaces the shell.)3.576 F .305(No ne)5.305 F 2.805 +(wp)-.25 G .305(rocess is created.)-2.805 F(The)5.305 E F2(ar)3.135 E +(guments)-.37 E F0(become)3.075 E .176(the ar)144 321.6 R .176 +(guments to)-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)-5.176 G +(he)-2.676 E F12.676 E F0 .176 +(option is supplied, the shell places a dash at the be)2.676 F .177 +(ginning of)-.15 F .48(the zeroth ar)144 333.6 R .48(gument passed to) +-.18 F F2(command)3.18 E F0 5.48(.T).77 G .48(his is what)-5.48 F F2(lo) +3.07 E(gin)-.1 E F0 .48(\(1\) does.).24 F(The)5.48 E F12.98 E F0 +.48(option causes)2.98 F F2(com-)3.18 E(mand)144 345.6 Q F0 .638 +(to be e)3.908 F -.15(xe)-.15 G .638(cuted with an empty en).15 F 3.138 +(vironment. If)-.4 F F13.138 E F0 .638 +(is supplied, the shell passes)3.138 F F2(name)3.499 E F0 .639(as the) +3.319 F 1.078(zeroth ar)144 357.6 R 1.077(gument to the e)-.18 F -.15 +(xe)-.15 G 1.077(cuted command.).15 F(If)6.077 E F2(command)3.777 E F0 +1.077(cannot be e)4.347 F -.15(xe)-.15 G 1.077(cuted for some reason, a) +.15 F(non-interacti)144 369.6 Q .876 -.15(ve s)-.25 H .576(hell e).15 F +.576(xits, unless the)-.15 F F1(execfail)3.076 E F0 .577 +(shell option is enabled.)3.077 F .577(In that case, it returns f)5.577 +F(ail-)-.1 E 3.32(ure. An)144 381.6 R(interacti)3.32 E 1.12 -.15(ve s) +-.25 H .82(hell returns f).15 F .82(ailure if the \214le cannot be e)-.1 +F -.15(xe)-.15 G 3.32(cuted. A).15 F .82(subshell e)3.32 F .82 +(xits uncondi-)-.15 F .287(tionally if)144 393.6 R F1(exec)2.787 E F0 +-.1(fa)2.787 G 2.787(ils. If).1 F F2(command)2.987 E F0 .287 +(is not speci\214ed, an)3.557 F 2.788(yr)-.15 G .288(edirections tak) +-2.788 F 2.788(ee)-.1 G -.25(ff)-2.788 G .288(ect in the current shell,) +.25 F(and the return status is 0.)144 405.6 Q +(If there is a redirection error)5 E 2.5(,t)-.4 G +(he return status is 1.)-2.5 E F1(exit)108 422.4 Q F0([)2.5 E F2(n)A F0 +(])A .096(Cause the shell to e)144 422.4 R .096(xit with a status of) +-.15 F F2(n)2.596 E F0 5.096(.I)C(f)-5.096 E F2(n)2.955 E F0 .095 +(is omitted, the e)2.835 F .095(xit status is that of the last command) +-.15 F -.15(exe)144 434.4 S 2.5(cuted. A).15 F(trap on)2.5 E F3(EXIT)2.5 +E F0(is e)2.25 E -.15(xe)-.15 G(cuted before the shell terminates.).15 E +F1(export)108 451.2 Q F0([)2.5 E F1(\255fn)A F0 2.5(][).833 G F2(name) +-2.5 E F0([=)A F2(wor)A(d)-.37 E F0(]] ...)A F1(export \255p)108 463.2 Q +F0 .256(The supplied)144 475.2 R F2(names)3.117 E F0 .257(are mark)3.027 +F .257(ed for automatic e)-.1 F .257(xport to the en)-.15 F .257 +(vironment of subsequently e)-.4 F -.15(xe)-.15 G(cuted).15 E 2.627 +(commands. If)144 487.2 R(the)2.627 E F12.627 E F0 .127 +(option is gi)2.627 F -.15(ve)-.25 G .127(n, the).15 F F2(names)2.987 E +F0 .127(refer to functions.)2.897 F .127(If no)5.127 F F2(names)2.987 E +F0 .127(are gi)2.897 F -.15(ve)-.25 G .126(n, or if the).15 F F1 +144 499.2 Q F0 .048(option is supplied, a list of names of all e)2.547 F +.048(xported v)-.15 F .048(ariables is printed.)-.25 F(The)5.048 E F1 +2.548 E F0 .048(option causes the)2.548 F -.15(ex)144 511.2 S +1.447(port property to be remo).15 F -.15(ve)-.15 G 3.947(df).15 G 1.447 +(rom each)-3.947 F F2(name)3.947 E F0 6.447(.I)C 3.947(fav)-6.447 G +1.447(ariable name is follo)-4.197 F 1.447(wed by =)-.25 F F2(wor)A(d) +-.37 E F0 3.946(,t)C(he)-3.946 E -.25(va)144 523.2 S .741(lue of the v) +.25 F .741(ariable is set to)-.25 F F2(wor)3.241 E(d)-.37 E F0(.)A F1 +(export)5.741 E F0 .742(returns an e)3.242 F .742 +(xit status of 0 unless an in)-.15 F -.25(va)-.4 G .742(lid option is) +.25 F .032(encountered, one of the)144 535.2 R F2(names)2.532 E F0 .032 +(is not a v)2.532 F .032(alid shell v)-.25 F .032(ariable name, or)-.25 +F F12.531 E F0 .031(is supplied with a)2.531 F F2(name)2.891 E F0 +(that)2.711 E(is not a function.)144 547.2 Q F1(fc)108 564 Q F0([)2.5 E +F1A F2(ename)2.5 E F0 2.5(][)C F1(\255lnr)-2.5 E F0 2.5(][)C F2 +<8c72>-2.5 E(st)-.1 E F0 2.5(][)C F2(last)-2.5 E F0(])A F1(fc \255s)108 +576 Q F0([)2.5 E F2(pat)A F0(=)A F2 -.37(re)C(p).37 E F0 2.5(][)C F2 +(cmd)-2.5 E F0(])A .431 +(The \214rst form selects a range of commands from)144 588 R F2<8c72> +4.842 E(st)-.1 E F0(to)3.612 E F2(last)3.022 E F0 .432 +(from the history list and displays or)3.612 F .142(edits and re-e)144 +600 R -.15(xe)-.15 G .142(cutes them.).15 F F2 -.45(Fi)5.141 G -.1(rs) +.45 G(t).1 E F0(and)3.321 E F2(last)2.731 E F0 .141 +(may be speci\214ed as a string \(to locate the last command)3.321 F(be) +144 612 Q .31(ginning with that string\) or as a number \(an inde)-.15 F +2.811(xi)-.15 G .311(nto the history list, where a ne)-2.811 F -.05(ga) +-.15 G(ti).05 E .611 -.15(ve n)-.25 H(umber).15 E .071(is used as an of) +144 624 R .071(fset from the current command number\).)-.25 F .071 +(When listing, a)5.071 F F2<8c72>2.571 E(st)-.1 E F0(or)2.571 E F2(last) +2.571 E F0 .071(of 0 is equi)2.571 F -.25(va)-.25 G(-).25 E .653 +(lent to \2551 and \2550 is equi)144 636 R -.25(va)-.25 G .653 +(lent to the current command \(usually the).25 F F1(fc)3.153 E F0 .653 +(command\); otherwise 0 is)3.153 F(equi)144 648 Q -.25(va)-.25 G .242 +(lent to \2551 and \2550 is in).25 F -.25(va)-.4 G 2.742(lid. If).25 F +F2(last)2.832 E F0 .242 +(is not speci\214ed, it is set to the current command for list-)3.422 F +.092(ing \(so that)144 660 R F4 .092(fc \255l \25510)2.592 F F0 .093 +(prints the last 10 commands\) and to)2.592 F F2<8c72>4.503 E(st)-.1 E +F0 2.593(otherwise. If)3.273 F F2<8c72>4.503 E(st)-.1 E F0 .093 +(is not speci-)3.273 F(\214ed, it is set to the pre)144 672 Q +(vious command for editing and \25516 for listing.)-.25 E(The)144 696 Q +F12.522 E F0 .022 +(option suppresses the command numbers when listing.)2.522 F(The)5.022 E +F12.522 E F0 .022(option re)2.522 F -.15(ve)-.25 G .022 +(rses the order of).15 F .438(the commands.)144 708 R .438(If the)5.438 +F F12.938 E F0 .438(option is gi)2.938 F -.15(ve)-.25 G .438 +(n, the commands are listed on standard output.).15 F(Otherwise,)5.438 E +.335(the editor gi)144 720 R -.15(ve)-.25 G 2.835(nb).15 G(y)-2.835 E F2 +(ename)3.025 E F0 .335(is in)3.015 F -.2(vo)-.4 G -.1(ke).2 G 2.835(do) +.1 G 2.835(na\214)-2.835 G .335(le containing those commands.)-2.835 F +(If)5.334 E F2(ename)3.024 E F0 .334(is not gi)3.014 F -.15(ve)-.25 G +(n,).15 E(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(8)203.725 E 0 Cg +EP +%%Page: 9 9 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E .63(the v)144 84 R .63(alue of the)-.25 F +/F1 9/Times-Bold@0 SF(FCEDIT)3.13 E F0 -.25(va)2.88 G .631 +(riable is used, and the v).25 F .631(alue of)-.25 F F1(EDIT)3.131 E(OR) +-.162 E F0(if)2.881 E F1(FCEDIT)3.131 E F0 .631(is not set.)2.881 F .631 +(If nei-)5.631 F .006(ther v)144 96 R .006(ariable is set,)-.25 F/F2 10 +/Times-Italic@0 SF(vi)4.171 E F0 .005(is used.)4.171 F .005 +(When editing is complete, the edited commands are echoed and e)5.005 F +(x-)-.15 E(ecuted.)144 108 Q .788(In the second form,)144 132 R F2 +(command)3.288 E F0 .788(is re-e)3.288 F -.15(xe)-.15 G .788 +(cuted after each instance of).15 F F2(pat)3.288 E F0 .788 +(is replaced by)3.288 F F2 -.37(re)3.289 G(p).37 E F0(.)A F2(Com-)5.789 +E(mand)144 144 Q F0 .172(is interpreted the same as)2.672 F F2<8c72> +2.672 E(st)-.1 E F0(abo)2.672 E -.15(ve)-.15 G 5.172(.A).15 G .171 +(useful alias to use with this is)-2.5 F/F3 10/Courier@0 SF .171 +(r='fc \255s')2.671 F F0 2.671(,s)C 2.671(ot)-2.671 G(hat)-2.671 E +(typing)144 156 Q F3 7.165(rc)3.665 G(c)-7.165 E F0 1.165 +(runs the last command be)3.665 F 1.166(ginning with)-.15 F F3(cc)3.666 +E F0 1.166(and typing)3.666 F F3(r)3.666 E F0(re-e)3.666 E -.15(xe)-.15 +G 1.166(cutes the last com-).15 F(mand.)144 168 Q .142 +(If the \214rst form is used, the return v)144 192 R .142 +(alue is 0 unless an in)-.25 F -.25(va)-.4 G .142 +(lid option is encountered or).25 F F2<8c72>4.552 E(st)-.1 E F0(or)3.322 +E F2(last)2.732 E F0 .454(specify history lines out of range.)144 204 R +.454(If the)5.454 F/F4 10/Times-Bold@0 SF2.954 E F0 .454 +(option is supplied, the return v)2.954 F .455(alue is the v)-.25 F .455 +(alue of the)-.25 F .788(last command e)144 216 R -.15(xe)-.15 G .788 +(cuted or f).15 F .787 +(ailure if an error occurs with the temporary \214le of commands.)-.1 F +.787(If the)5.787 F 1.135 +(second form is used, the return status is that of the command re-e)144 +228 R -.15(xe)-.15 G 1.136(cuted, unless).15 F F2(cmd)3.836 E F0 1.136 +(does not)4.406 F(specify a v)144 240 Q +(alid history line, in which case)-.25 E F4(fc)2.5 E F0(returns f)2.5 E +(ailure.)-.1 E F4(fg)108 256.8 Q F0([)2.5 E F2(jobspec)A F0(])A(Resume) +144 268.8 Q F2(jobspec)5.654 E F0 1.413(in the fore)4.224 F 1.413 +(ground, and mak)-.15 F 3.913(ei)-.1 G 3.913(tt)-3.913 G 1.413 +(he current job)-3.913 F 6.413(.I)-.4 G(f)-6.413 E F2(jobspec)5.653 E F0 +1.413(is not present, the)4.223 F(shell')144 280.8 Q 3.116(sn)-.55 G +.616(otion of the)-3.116 F F2(curr)3.116 E .616(ent job)-.37 F F0 .617 +(is used.)3.116 F .617(The return v)5.617 F .617 +(alue is that of the command placed into the)-.25 F(fore)144 292.8 Q +.363(ground, or f)-.15 F .363 +(ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .362 +(hen run with job control enabled, if)-2.862 F F2(jobspec)145.74 304.8 Q +F0(does not specify a v)2.81 E(alid job or)-.25 E F2(jobspec)4.24 E F0 +(speci\214es a job that w)2.81 E(as started without job control.)-.1 E +F4(getopts)108 321.6 Q F2(optstring name)2.5 E F0([)2.5 E F2(ar)A 2.5 +(g.)-.37 G(..)-2.5 E F0(])A F4(getopts)144 333.6 Q F0 .793 +(is used by shell procedures to parse positional parameters.)3.293 F F2 +(optstring)6.023 E F0 .793(contains the option)3.513 F .15 +(characters to be recognized; if a character is follo)144 345.6 R .149 +(wed by a colon, the option is e)-.25 F .149(xpected to ha)-.15 F .449 +-.15(ve a)-.2 H(n).15 E(ar)144 357.6 Q .578 +(gument, which should be separated from it by white space.)-.18 F .579 +(The colon and question mark char)5.579 F(-)-.2 E .636 +(acters may not be used as option characters.)144 369.6 R .636 +(Each time it is in)5.636 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F4(getopts) +3.136 E F0 .636(places the ne)3.136 F .635(xt op-)-.15 F .029 +(tion in the shell v)144 381.6 R(ariable)-.25 E F2(name)2.889 E F0 2.529 +(,i).18 G(nitializing)-2.529 E F2(name)2.889 E F0 .029(if it does not e) +2.709 F .03(xist, and the inde)-.15 F 2.53(xo)-.15 G 2.53(ft)-2.53 G .03 +(he ne)-2.53 F .03(xt ar)-.15 F(gu-)-.18 E .066 +(ment to be processed into the v)144 393.6 R(ariable)-.25 E F1(OPTIND) +2.566 E/F5 9/Times-Roman@0 SF(.)A F1(OPTIND)4.566 E F0 .065 +(is initialized to 1 each time the shell or a)2.315 F .885 +(shell script is in)144 405.6 R -.2(vo)-.4 G -.1(ke).2 G 3.385(d. When) +.1 F .885(an option requires an ar)3.385 F(gument,)-.18 E F4(getopts) +3.385 E F0 .885(places that ar)3.385 F .885(gument into)-.18 F .567 +(the v)144 417.6 R(ariable)-.25 E F1(OPT)3.067 E(ARG)-.81 E F5(.)A F0 +.566(The shell does not reset)5.067 F F1(OPTIND)3.066 E F0 .566 +(automatically; it must be manually reset)2.816 F .389 +(between multiple calls to)144 429.6 R F4(getopts)2.889 E F0 .389 +(within the same shell in)2.889 F -.2(vo)-.4 G .39(cation if a ne).2 F +2.89(ws)-.25 G .39(et of parameters is to)-2.89 F(be used.)144 441.6 Q +2.044(When the end of options is encountered,)144 465.6 R F4(getopts) +4.543 E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.043 +(alue greater than zero.)-.25 F F1(OPTIND)144 477.6 Q F0 +(is set to the inde)2.25 E 2.5(xo)-.15 G 2.5(ft)-2.5 G +(he \214rst non-option ar)-2.5 E(gument, and)-.18 E F2(name)2.5 E F0 +(is set to ?.)2.5 E F4(getopts)144 501.6 Q F0 .485 +(normally parses the positional parameters, b)2.985 F .485 +(ut if more ar)-.2 F .485(guments are supplied as)-.18 F F2(ar)3.315 E +(g)-.37 E F0 -.25(va)3.205 G(l-).25 E(ues,)144 513.6 Q F4(getopts)2.5 E +F0(parses those instead.)2.5 E F4(getopts)144 537.6 Q F0 .345 +(can report errors in tw)2.845 F 2.845(ow)-.1 G 2.845(ays. If)-2.945 F +.345(the \214rst character of)2.845 F F2(optstring)3.075 E F0 .345 +(is a colon,)3.065 F F2(silent)3.185 E F0 .345(error re-)3.525 F 1.668 +(porting is used.)144 549.6 R 1.668 +(In normal operation, diagnostic messages are printed when in)6.668 F +-.25(va)-.4 G 1.669(lid options or).25 F .394(missing option ar)144 +561.6 R .394(guments are encountered.)-.18 F .394(If the v)5.394 F +(ariable)-.25 E F1(OPTERR)2.894 E F0 .394 +(is set to 0, no error messages)2.644 F(will be displayed, e)144 573.6 Q +-.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214rst character of)-2.5 E +F2(optstring)2.73 E F0(is not a colon.)2.72 E .666(If an in)144 597.6 R +-.25(va)-.4 G .666(lid option is seen,).25 F F4(getopts)3.166 E F0 .667 +(places ? into)3.167 F F2(name)3.527 E F0 .667 +(and, if not silent, prints an error message)3.347 F .4(and unsets)144 +609.6 R F1(OPT)2.9 E(ARG)-.81 E F5(.)A F0(If)4.899 E F4(getopts)2.899 E +F0 .399(is silent, the option character found is placed in)2.899 F F1 +(OPT)2.899 E(ARG)-.81 E F0 .399(and no)2.649 F +(diagnostic message is printed.)144 621.6 Q 1.241(If a required ar)144 +645.6 R 1.241(gument is not found, and)-.18 F F4(getopts)3.741 E F0 +1.241(is not silent, a question mark \()3.741 F F4(?).833 E F0 3.742 +(\)i).833 G 3.742(sp)-3.742 G 1.242(laced in)-3.742 F F2(name)144.36 +657.6 Q F0(,).18 E F1(OPT)2.714 E(ARG)-.81 E F0 .213 +(is unset, and a diagnostic message is printed.)2.463 F(If)5.213 E F4 +(getopts)2.713 E F0 .213(is silent, then a colon \()2.713 F F4(:).833 E +F0(\)).833 E(is placed in)144 669.6 Q F2(name)2.86 E F0(and)2.68 E F1 +(OPT)2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25 E F4 +(getopts)144 693.6 Q F0 .902 +(returns true if an option, speci\214ed or unspeci\214ed, is found.) +3.401 F .902(It returns f)5.902 F .902(alse if the end of)-.1 F +(options is encountered or an error occurs.)144 705.6 Q(GNU Bash 5.0)72 +768 Q(2004 Apr 20)149.565 E(9)203.725 E 0 Cg EP +%%Page: 10 10 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF(hash)108 84 Q F0([) +2.5 E F1(\255lr)A F0 2.5(][)C F1-2.5 E/F2 10/Times-Italic@0 SF +(\214lename)2.5 E F0 2.5(][)C F1(\255dt)-2.5 E F0 2.5(][)C F2(name)-2.5 +E F0(])A .858(Each time)144 96 R F1(hash)3.358 E F0 .858(is in)3.358 F +-.2(vo)-.4 G -.1(ke).2 G .858(d, the full pathname of the command).1 F +F2(name)3.718 E F0 .858(is determined by searching)3.538 F .956 +(the directories in)144 108 R F1($P)3.456 E -.95(AT)-.74 G(H).95 E F0 +.956(and remembered.)3.456 F(An)5.956 E 3.456(yp)-.15 G(re)-3.456 E .956 +(viously-remembered pathname is discarded.)-.25 F .243(If the)144 120 R +F12.743 E F0 .243 +(option is supplied, no path search is performed, and)2.743 F F2 +(\214lename)4.653 E F0 .242(is used as the full \214lename)2.923 F .615 +(of the command.)144 132 R(The)5.615 E F13.115 E F0 .615 +(option causes the shell to for)3.115 F .615 +(get all remembered locations.)-.18 F(The)5.615 E F13.115 E F0 +(op-)3.115 E .294(tion causes the shell to for)144 144 R .294 +(get the remembered location of each)-.18 F F2(name)2.793 E F0 5.293(.I) +C 2.793(ft)-5.293 G(he)-2.793 E F12.793 E F0 .293 +(option is supplied,)2.793 F .028(the full pathname to which each)144 +156 R F2(name)2.528 E F0 .028(corresponds is printed.)2.528 F .028 +(If multiple)5.028 F F2(name)2.528 E F0(ar)2.528 E .028 +(guments are sup-)-.18 F .176(plied with)144 168 R F12.676 E F0 +2.676(,t)C(he)-2.676 E F2(name)2.676 E F0 .175 +(is printed before the hashed full pathname.)2.676 F(The)5.175 E F1 +2.675 E F0 .175(option causes output to)2.675 F .783 +(be displayed in a format that may be reused as input.)144 180 R .783 +(If no ar)5.783 F .783(guments are gi)-.18 F -.15(ve)-.25 G .783 +(n, or if only).15 F F13.283 E F0(is)3.283 E .807 +(supplied, information about remembered commands is printed.)144 192 R +.807(The return status is true unless a)5.807 F F2(name)144.36 204 Q F0 +(is not found or an in)2.68 E -.25(va)-.4 G(lid option is supplied.).25 +E F1(help)108 220.8 Q F0([)2.5 E F1(\255dms)A F0 2.5(][)C F2(pattern) +-2.5 E F0(])A .866(Display helpful information about b)144 232.8 R .867 +(uiltin commands.)-.2 F(If)5.867 E F2(pattern)4.617 E F0 .867 +(is speci\214ed,)3.607 F F1(help)3.367 E F0(gi)3.367 E -.15(ve)-.25 G +3.367(sd).15 G(etailed)-3.367 E .224(help on all commands matching)144 +244.8 R F2(pattern)3.974 E F0 2.723(;o).24 G .223 +(therwise help for all the b)-2.723 F .223 +(uiltins and shell control struc-)-.2 F(tures is printed.)144 256.8 Q F1 +144 268.8 Q F0(Display a short description of each)180 268.8 Q F2 +(pattern)2.5 E F1144 280.8 Q F0(Display the description of each) +180 280.8 Q F2(pattern)2.5 E F0(in a manpage-lik)2.5 E 2.5(ef)-.1 G +(ormat)-2.5 E F1144 292.8 Q F0 +(Display only a short usage synopsis for each)180 292.8 Q F2(pattern)2.5 +E F0(The return status is 0 unless no command matches)144 309.6 Q F2 +(pattern)3.75 E F0(.).24 E F1(history [)108 326.4 Q F2(n)A F1(])A +(history \255c)108 338.4 Q(history \255d)108 350.4 Q F2(of)2.5 E(fset) +-.18 E F1(history \255d)108 362.4 Q F2(start)2.5 E F0A F2(end)A F1 +(history \255anrw)108 374.4 Q F0([)2.5 E F2(\214lename)A F0(])A F1 +(history \255p)108 386.4 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2(ar)A 2.5 +(g.)-.37 G(..)-2.5 E F0(])A F1(history \255s)108 398.4 Q F2(ar)2.5 E(g) +-.37 E F0([)2.5 E F2(ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A -.4(Wi)144 +410.4 S .752 +(th no options, display the command history list with line numbers.).4 F +.752(Lines listed with a)5.752 F F1(*)3.252 E F0(ha)3.252 E -.15(ve)-.2 +G .381(been modi\214ed.)144 422.4 R .38(An ar)5.38 F .38(gument of)-.18 +F F2(n)3.24 E F0 .38(lists only the last)3.12 F F2(n)3.24 E F0 2.88 +(lines. If)3.12 F .38(the shell v)2.88 F(ariable)-.25 E/F3 9 +/Times-Bold@0 SF(HISTTIMEFOR-)2.88 E(MA)144 434.4 Q(T)-.855 E F0 .264 +(is set and not null, it is used as a format string for)2.514 F F2 +(strftime)2.765 E F0 .265(\(3\) to display the time stamp asso-)B 1.02 +(ciated with each displayed history entry)144 446.4 R 6.019(.N)-.65 G +3.519(oi)-6.019 G(nterv)-3.519 E 1.019 +(ening blank is printed between the formatted)-.15 F .176 +(time stamp and the history line.)144 458.4 R(If)5.176 E F2(\214lename) +2.676 E F0 .176 +(is supplied, it is used as the name of the history \214le; if)2.676 F +(not, the v)144 470.4 Q(alue of)-.25 E F3(HISTFILE)2.5 E F0(is used.) +2.25 E(Options, if supplied, ha)5 E .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F1144 482.4 Q F0 +(Clear the history list by deleting all the entries.)180 482.4 Q F1 +144 494.4 Q F2(of)2.5 E(fset)-.18 E F0 .39 +(Delete the history entry at position)180 506.4 R F2(of)2.889 E(fset) +-.18 E F0 5.389(.I)C(f)-5.389 E F2(of)2.889 E(fset)-.18 E F0 .389(is ne) +2.889 F -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G 2.889(,i).15 G 2.889(ti) +-2.889 G 2.889(si)-2.889 G .389(nterpreted as relati)-2.889 F -.15(ve) +-.25 G .598(to one greater than the last history position, so ne)180 +518.4 R -.05(ga)-.15 G(ti).05 E .899 -.15(ve i)-.25 H .599 +(ndices count back from the end).15 F(of the history)180 530.4 Q 2.5(,a) +-.65 G(nd an inde)-2.5 E 2.5(xo)-.15 G 2.5<66ad>-2.5 G 2.5(1r)-2.5 G +(efers to the current)-2.5 E F1(history -d)2.5 E F0(command.)2.5 E F1 +144 542.4 Q F2(start)2.5 E F0A F2(end)A F0 .758 +(Delete the history entries between positions)180 554.4 R F2(start)3.258 +E F0(and)3.257 E F2(end)3.257 E F0 3.257(,i)C(nclusi)-3.257 E -.15(ve) +-.25 G 5.757(.P).15 G(ositi)-5.757 E 1.057 -.15(ve a)-.25 H .757(nd ne) +.15 F -.05(ga)-.15 G(-).05 E(ti)180 566.4 Q .3 -.15(ve v)-.25 H +(alues for)-.1 E F2(start)2.5 E F0(and)2.5 E F2(end)2.5 E F0 +(are interpreted as described abo)2.5 E -.15(ve)-.15 G(.).15 E F1 +144 578.4 Q F0 .564(Append the `)180 578.4 R(`ne)-.74 E(w')-.25 E 3.064 +('h)-.74 G .564(istory lines to the history \214le.)-3.064 F .565 +(These are history lines entered since)5.564 F(the be)180 590.4 Q +(ginning of the current)-.15 E F1(bash)2.5 E F0(session, b)2.5 E +(ut not already appended to the history \214le.)-.2 E F1144 602.4 +Q F0 .854(Read the history lines not already read from the history \214\ +le into the current history list.)180 602.4 R .772 +(These are lines appended to the history \214le since the be)180 614.4 R +.773(ginning of the current)-.15 F F1(bash)3.273 E F0(ses-)3.273 E +(sion.)180 626.4 Q F1144 638.4 Q F0(Read the contents of the hist\ +ory \214le and append them to the current history list.)180 638.4 Q F1 +144 650.4 Q F0 +(Write the current history list to the history \214le, o)180 650.4 Q +-.15(ve)-.15 G(rwriting the history \214le').15 E 2.5(sc)-.55 G +(ontents.)-2.5 E F1144 662.4 Q F0 .626 +(Perform history substitution on the follo)180 662.4 R(wing)-.25 E F2 +(ar)3.125 E(gs)-.37 E F0 .625(and display the result on the standard) +3.125 F 2.975(output. Does)180 674.4 R .475 +(not store the results in the history list.)2.975 F(Each)5.475 E F2(ar) +2.975 E(g)-.37 E F0 .475(must be quoted to disable)2.975 F +(normal history e)180 686.4 Q(xpansion.)-.15 E F1144 698.4 Q F0 +.363(Store the)180 698.4 R F2(ar)3.193 E(gs)-.37 E F0 .363 +(in the history list as a single entry)3.133 F 5.363(.T)-.65 G .362 +(he last command in the history list is)-5.363 F(remo)180 710.4 Q -.15 +(ve)-.15 G 2.5(db).15 G(efore the)-2.5 E F2(ar)2.83 E(gs)-.37 E F0 +(are added.)2.77 E .145(If the)144 727.2 R F3(HISTTIMEFORMA)2.645 E(T) +-.855 E F0 -.25(va)2.395 G .145 +(riable is set, the time stamp information associated with each history) +.25 F(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(10)198.725 E 0 Cg EP +%%Page: 11 11 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E .669 +(entry is written to the history \214le, mark)144 84 R .669 +(ed with the history comment character)-.1 F 5.668(.W)-.55 G .668 +(hen the history)-5.668 F .955(\214le is read, lines be)144 96 R .956 +(ginning with the history comment character follo)-.15 F .956 +(wed immediately by a digit)-.25 F .833 +(are interpreted as timestamps for the follo)144 108 R .833 +(wing history entry)-.25 F 5.832(.T)-.65 G .832(he return v)-5.832 F +.832(alue is 0 unless an in-)-.25 F -.25(va)144 120 S .168(lid option i\ +s encountered, an error occurs while reading or writing the history \ +\214le, an in).25 F -.25(va)-.4 G(lid).25 E/F1 10/Times-Italic@0 SF(of) +2.669 E(f-)-.18 E(set)144 132 Q F0(is supplied as an ar)2.5 E(gument to) +-.18 E/F2 10/Times-Bold@0 SF2.5 E F0 2.5(,o)C 2.5(rt)-2.5 G +(he history e)-2.5 E(xpansion supplied as an ar)-.15 E(gument to)-.18 E +F22.5 E F0 -.1(fa)2.5 G(ils.).1 E F2(jobs)108 148.8 Q F0([)2.5 E +F2(\255lnprs)A F0 2.5(][)C F1(jobspec)A F0(... ])2.5 E F2(jobs \255x)108 +160.8 Q F1(command)2.5 E F0([)2.5 E F1(ar)2.5 E(gs)-.37 E F0(... ])2.5 E +(The \214rst form lists the acti)144 172.8 Q .3 -.15(ve j)-.25 H 2.5 +(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F2144 184.8 Q F0 +(List process IDs in addition to the normal information.)180 184.8 Q F2 +144 196.8 Q F0 .194(Display information only about jobs that ha) +180 196.8 R .494 -.15(ve c)-.2 H .193(hanged status since the user w).15 +F .193(as last noti-)-.1 F(\214ed of their status.)180 208.8 Q F2 +144 220.8 Q F0(List only the process ID of the job')180 220.8 Q 2.5(sp) +-.55 G(rocess group leader)-2.5 E(.)-.55 E F2144 232.8 Q F0 +(Display only running jobs.)180 232.8 Q F2144 244.8 Q F0 +(Display only stopped jobs.)180 244.8 Q(If)144 261.6 Q F1(jobspec)4.553 +E F0 .313(is gi)3.123 F -.15(ve)-.25 G .313 +(n, output is restricted to information about that job).15 F 5.314(.T) +-.4 G .314(he return status is 0 unless)-5.314 F(an in)144 273.6 Q -.25 +(va)-.4 G(lid option is encountered or an in).25 E -.25(va)-.4 G(lid).25 +E F1(jobspec)4.24 E F0(is supplied.)2.81 E .395(If the)144 290.4 R F2 +2.895 E F0 .394(option is supplied,)2.894 F F2(jobs)2.894 E F0 +.394(replaces an)2.894 F(y)-.15 E F1(jobspec)4.634 E F0 .394(found in) +3.204 F F1(command)3.094 E F0(or)3.664 E F1(ar)3.224 E(gs)-.37 E F0 .394 +(with the corre-)3.164 F(sponding process group ID, and e)144 302.4 Q +-.15(xe)-.15 G(cutes).15 E F1(command)2.7 E F0(passing it)3.27 E F1(ar) +2.83 E(gs)-.37 E F0 2.5(,r).27 G(eturning its e)-2.5 E(xit status.)-.15 +E F2(kill)108 319.2 Q F0([)2.5 E F2A F1(sigspec)2.5 E F0(|)2.5 E +F22.5 E F1(signum)2.5 E F0(|)2.5 E F22.5 E F1(sigspec)A F0 2.5 +(][)C F1(pid)-2.5 E F0(|)2.5 E F1(jobspec)2.5 E F0 2.5(].)C(..)-2.5 E F2 +(kill \255l)108 331.2 Q F0(|)A F2A F0([)2.5 E F1(sigspec)A F0(|) +2.5 E F1 -.2(ex)2.5 G(it_status).2 E F0(])A .017 +(Send the signal named by)144 343.2 R F1(sigspec)2.857 E F0(or)2.827 E +F1(signum)2.857 E F0 .017(to the processes named by)2.837 F F1(pid)3.767 +E F0(or)3.287 E F1(jobspec)4.257 E F0(.).31 E F1(sigspec)5.357 E F0(is) +2.828 E .319(either a case-insensiti)144 355.2 R .619 -.15(ve s)-.25 H +.319(ignal name such as).15 F/F3 9/Times-Bold@0 SF(SIGKILL)2.819 E F0 +.318(\(with or without the)2.569 F F3(SIG)2.818 E F0 .318 +(pre\214x\) or a signal)2.568 F(number;)144 367.2 Q F1(signum)3.267 E F0 +.427(is a signal number)3.247 F 5.427(.I)-.55 G(f)-5.427 E F1(sigspec) +3.267 E F0 .427(is not present, then)3.237 F F3(SIGTERM)2.927 E F0 .427 +(is assumed.)2.677 F .428(An ar)5.427 F(-)-.2 E .314(gument of)144 379.2 +R F22.814 E F0 .314(lists the signal names.)2.814 F .314(If an) +5.314 F 2.814(ya)-.15 G -.18(rg)-2.814 G .314(uments are supplied when) +.18 F F22.814 E F0 .314(is gi)2.814 F -.15(ve)-.25 G .313 +(n, the names of).15 F .119(the signals corresponding to the ar)144 +391.2 R .119(guments are listed, and the return status is 0.)-.18 F(The) +5.12 E F1 -.2(ex)2.62 G(it_status).2 E F0(ar)2.62 E(-)-.2 E .8 +(gument to)144 403.2 R F23.3 E F0 .8 +(is a number specifying either a signal number or the e)3.3 F .799 +(xit status of a process termi-)-.15 F .962(nated by a signal.)144 415.2 +R(The)5.962 E F23.462 E F0 .962(option is equi)3.462 F -.25(va) +-.25 G .962(lent to).25 F F23.462 E F0(.)A F2(kill)5.962 E F0 .962 +(returns true if at least one signal w)3.462 F(as)-.1 E +(successfully sent, or f)144 427.2 Q(alse if an error occurs or an in) +-.1 E -.25(va)-.4 G(lid option is encountered.).25 E F2(let)108 444 Q F1 +(ar)2.5 E(g)-.37 E F0([)2.5 E F1(ar)A(g)-.37 E F0(...])2.5 E(Each)144 +456 Q F1(ar)3.027 E(g)-.37 E F0 .197(is an arithmetic e)2.917 F .197 +(xpression to be e)-.15 F -.25(va)-.25 G .196(luated \(see).25 F F3 .196 +(ARITHMETIC EV)2.696 F(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F0(abo) +2.446 E -.15(ve)-.15 G 2.696(\). If).15 F(the last)144 468 Q F1(ar)2.83 +E(g)-.37 E F0 -.25(eva)2.72 G(luates to 0,).25 E F2(let)2.5 E F0 +(returns 1; 0 is returned otherwise.)2.5 E F2(local)108 484.8 Q F0([)2.5 +E F1(option)A F0 2.5(][)C F1(name)-2.5 E F0([=)A F1(value)A F0 2.5(].)C +(.. | \255 ])-2.5 E -.15(Fo)144 496.8 S 2.541(re).15 G .041(ach ar) +-2.541 F .042(gument, a local v)-.18 F .042(ariable named)-.25 F F1 +(name)2.902 E F0 .042(is created, and assigned)2.722 F F1(value)2.832 E +F0 5.042(.T).18 G(he)-5.042 E F1(option)2.542 E F0 .042(can be)2.542 F +(an)144 508.8 Q 3.153(yo)-.15 G 3.153(ft)-3.153 G .653 +(he options accepted by)-3.153 F F2(declar)3.153 E(e)-.18 E F0 5.652(.W) +C(hen)-5.652 E F2(local)3.152 E F0 .652 +(is used within a function, it causes the v)3.152 F(ari-)-.25 E(able)144 +520.8 Q F1(name)3.281 E F0 .421(to ha)3.101 F .721 -.15(ve a v)-.2 H +.422(isible scope restricted to that function and its children.).15 F +(If)5.422 E F1(name)2.922 E F0 .422(is \255, the set)2.922 F .51 +(of shell options is made local to the function in which)144 532.8 R F2 +(local)3.009 E F0 .509(is in)3.009 F -.2(vo)-.4 G -.1(ke).2 G .509 +(d: shell options changed us-).1 F 1.17(ing the)144 544.8 R F2(set)3.67 +E F0 -.2(bu)3.67 G 1.171 +(iltin inside the function are restored to their original v).2 F 1.171 +(alues when the function re-)-.25 F 3.381(turns. The)144 556.8 R .881 +(restore is ef)3.381 F .881(fected as if a series of)-.25 F F2(set)3.381 +E F0 .88(commands were e)3.38 F -.15(xe)-.15 G .88 +(cuted to restore the v).15 F(alues)-.25 E .787 +(that were in place before the function.)144 568.8 R -.4(Wi)5.788 G .788 +(th no operands,).4 F F2(local)3.288 E F0 .788(writes a list of local v) +3.288 F .788(ariables to)-.25 F .655(the standard output.)144 580.8 R +.654(It is an error to use)5.655 F F2(local)3.154 E F0 .654 +(when not within a function.)3.154 F .654(The return status is 0)5.654 F +(unless)144 592.8 Q F2(local)2.5 E F0(is used outside a function, an in) +2.5 E -.25(va)-.4 G(lid).25 E F1(name)2.86 E F0(is supplied, or)2.68 E +F1(name)2.5 E F0(is a readonly v)2.5 E(ariable.)-.25 E F2(logout)108 +609.6 Q F0(Exit a login shell.)144 609.6 Q F2(map\214le)108 626.4 Q F0 +([)2.5 E F2A F1(delim)2.5 E F0 2.5(][)C F2-2.5 E F1(count) +2.5 E F0 2.5(][)C F2-2.5 E F1(origin)2.5 E F0 2.5(][)C F2 +-2.5 E F1(count)2.5 E F0 2.5(][)C F2-2.5 E F0 2.5(][)C F2 +-2.5 E F1(fd)2.5 E F0 2.5(][)C F2-2.5 E F1(callbac)2.5 E(k)-.2 E +F0 2.5(][)C F2-2.5 E F1(quantum)2.5 E F0 2.5(][)C F1(arr)-2.5 E +(ay)-.15 E F0(])A F2 -.18(re)108 638.4 S(adarray).18 E F0([)2.5 E F2 +A F1(delim)2.5 E F0 2.5(][)C F2-2.5 E F1(count)2.5 E F0 2.5 +(][)C F2-2.5 E F1(origin)2.5 E F0 2.5(][)C F2-2.5 E F1 +(count)2.5 E F0 2.5(][)C F2-2.5 E F0 2.5(][)C F2-2.5 E F1 +(fd)2.5 E F0 2.5(][)C F2-2.5 E F1(callbac)2.5 E(k)-.2 E F0 2.5(][) +C F2-2.5 E F1(quantum)2.5 E F0 2.5(][)C F1(arr)-2.5 E(ay)-.15 E F0 +(])A .158(Read lines from the standard input into the inde)144 650.4 R +-.15(xe)-.15 G 2.659(da).15 G .159(rray v)-2.659 F(ariable)-.25 E F1 +(arr)2.989 E(ay)-.15 E F0 2.659(,o).32 G 2.659(rf)-2.659 G .159 +(rom \214le descriptor)-2.659 F F1(fd)4.629 E F0 1.249(if the)144 662.4 +R F23.749 E F0 1.249(option is supplied.)3.749 F 1.249(The v)6.249 +F(ariable)-.25 E F3(MAPFILE)3.749 E F0 1.249(is the def)3.499 F(ault)-.1 +E F1(arr)3.748 E(ay)-.15 E F0 6.248(.O)C 1.248(ptions, if supplied,) +-6.248 F(ha)144 674.4 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F2144 686.4 Q F0 .91 +(The \214rst character of)180 686.4 R F1(delim)3.41 E F0 .911 +(is used to terminate each input line, rather than ne)3.41 F 3.411 +(wline. If)-.25 F F1(delim)180 698.4 Q F0(is the empty string,)2.5 E F2 +(map\214le)2.5 E F0(will terminate a line when it reads a NUL character) +2.5 E(.)-.55 E F2144 710.4 Q F0(Cop)180 710.4 Q 2.5(ya)-.1 G 2.5 +(tm)-2.5 G(ost)-2.5 E F1(count)2.7 E F0 2.5(lines. If)3.18 F F1(count) +2.5 E F0(is 0, all lines are copied.)2.5 E(GNU Bash 5.0)72 768 Q +(2004 Apr 20)149.565 E(11)198.725 E 0 Cg EP +%%Page: 12 12 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF144 84 Q F0(Be) +180 84 Q(gin assigning to)-.15 E/F2 10/Times-Italic@0 SF(arr)2.83 E(ay) +-.15 E F0(at inde)2.82 E(x)-.15 E F2(origin)2.73 E F0 5(.T).24 G(he def) +-5 E(ault inde)-.1 E 2.5(xi)-.15 G 2.5(s0)-2.5 G(.)-2.5 E F1144 96 +Q F0(Discard the \214rst)180 96 Q F2(count)2.5 E F0(lines read.)2.5 E F1 +144 108 Q F0(Remo)180 108 Q .3 -.15(ve a t)-.15 H(railing).15 E F2 +(delim)2.5 E F0(\(def)2.5 E(ault ne)-.1 E(wline\) from each line read.) +-.25 E F1144 120 Q F0(Read lines from \214le descriptor)180 120 Q +F2(fd)2.5 E F0(instead of the standard input.)2.5 E F1144 132 Q F0 +(Ev)180 132 Q(aluate)-.25 E F2(callbac)2.7 E(k)-.2 E F0(each time)3.17 E +F2(quantum)2.5 E F0(lines are read.)2.5 E(The)5 E F12.5 E F0 +(option speci\214es)2.5 E F2(quantum)2.75 E F0(.).32 E F1144 144 Q +F0(Specify the number of lines read between each call to)180 144 Q F2 +(callbac)2.7 E(k)-.2 E F0(.).67 E(If)144 160.8 Q F12.968 E F0 .467 +(is speci\214ed without)2.967 F F12.967 E F0 2.967(,t)C .467 +(he def)-2.967 F .467(ault quantum is 5000.)-.1 F(When)5.467 E F2 +(callbac)2.967 E(k)-.2 E F0 .467(is e)2.967 F -.25(va)-.25 G .467 +(luated, it is sup-).25 F .261(plied the inde)144 172.8 R 2.761(xo)-.15 +G 2.761(ft)-2.761 G .261(he ne)-2.761 F .262(xt array element to be ass\ +igned and the line to be assigned to that element)-.15 F .275 +(as additional ar)144 184.8 R(guments.)-.18 E F2(callbac)5.275 E(k)-.2 E +F0 .275(is e)2.775 F -.25(va)-.25 G .274 +(luated after the line is read b).25 F .274 +(ut before the array element is)-.2 F(assigned.)144 196.8 Q +(If not supplied with an e)144 213.6 Q(xplicit origin,)-.15 E F1 +(map\214le)2.5 E F0(will clear)2.5 E F2(arr)2.5 E(ay)-.15 E F0 +(before assigning to it.)2.5 E F1(map\214le)144 230.4 Q F0 .797 +(returns successfully unless an in)3.297 F -.25(va)-.4 G .797 +(lid option or option ar).25 F .797(gument is supplied,)-.18 F F2(arr) +3.297 E(ay)-.15 E F0 .798(is in-)3.298 F -.25(va)144 242.4 S +(lid or unassignable, or if).25 E F2(arr)2.5 E(ay)-.15 E F0 +(is not an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray)-2.5 E(.)-.65 E +F1(popd)108 259.2 Q F0<5bad>2.5 E F1(n)A F0 2.5(][)C(+)-2.5 E F2(n)A F0 +2.5(][)C-2.5 E F2(n)A F0(])A(Remo)144 271.2 Q -.15(ve)-.15 G 2.8(se) +.15 G .3(ntries from the directory stack.)-2.8 F -.4(Wi)5.299 G .299 +(th no ar).4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15 G +.299(he top directory from the)-2.799 F 1.478(stack, and performs a)144 +283.2 R F1(cd)3.978 E F0 1.479(to the ne)3.978 F 3.979(wt)-.25 G 1.479 +(op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.479 +(uments, if supplied, ha).18 F 1.779 -.15(ve t)-.2 H 1.479(he follo).15 +F(wing)-.25 E(meanings:)144 295.2 Q F1144 307.2 Q F0 .551 +(Suppresses the normal change of directory when remo)180 307.2 R .551 +(ving directories from the stack, so)-.15 F +(that only the stack is manipulated.)180 319.2 Q F1(+)144 331.2 Q F2(n)A +F0(Remo)180 331.2 Q -.15(ve)-.15 G 2.64(st).15 G(he)-2.64 E F2(n)2.64 E +F0 .14(th entry counting from the left of the list sho)B .14(wn by)-.25 +F F1(dirs)2.64 E F0 2.64(,s)C .14(tarting with zero.)-2.64 F -.15(Fo)180 +343.2 S 2.5(re).15 G(xample:)-2.65 E/F3 10/Courier@0 SF(popd +0)2.5 E F0 +(remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he \214rst directory)-2.5 E(,) +-.65 E F3(popd +1)2.5 E F0(the second.)2.5 E F1144 355.2 Q F2(n)A F0 +(Remo)180 355.2 Q -.15(ve)-.15 G 3.76(st).15 G(he)-3.76 E F2(n)3.76 E F0 +1.259(th entry counting from the right of the list sho)B 1.259(wn by) +-.25 F F1(dirs)3.759 E F0 3.759(,s)C 1.259(tarting with)-3.759 F 2.5 +(zero. F)180 367.2 R(or e)-.15 E(xample:)-.15 E F3(popd -0)2.5 E F0 +(remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 +E F3(popd -1)2.5 E F0(the ne)2.5 E(xt to last.)-.15 E .643(If the)144 +384 R F1(popd)3.143 E F0 .643(command is successful, a)3.143 F F1(dirs) +3.143 E F0 .644(is performed as well, and the return status is 0.)3.143 +F F1(popd)5.644 E F0 .416(returns f)144 396 R .416(alse if an in)-.1 F +-.25(va)-.4 G .415 +(lid option is encountered, the directory stack is empty).25 F 2.915 +(,an)-.65 G(on-e)-2.915 E .415(xistent direc-)-.15 F +(tory stack entry is speci\214ed, or the directory change f)144 408 Q +(ails.)-.1 E F1(printf)108 424.8 Q F0([)2.5 E F1A F2(var)2.5 E F0 +(])A F2(format)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A .357 +(Write the formatted)144 436.8 R F2(ar)2.857 E(guments)-.37 E F0 .357 +(to the standard output under the control of the)2.857 F F2(format)2.858 +E F0 5.358(.T)C(he)-5.358 E F12.858 E F0(op-)2.858 E .714 +(tion causes the output to be assigned to the v)144 448.8 R(ariable)-.25 +E F2(var)3.214 E F0 .714(rather than being printed to the standard)3.214 +F(output.)144 460.8 Q(The)144 484.8 Q F2(format)3.017 E F0 .517(is a ch\ +aracter string which contains three types of objects: plain characters,\ + which are)3.017 F .704(simply copied to standard output, character esc\ +ape sequences, which are con)144 496.8 R -.15(ve)-.4 G .703 +(rted and copied to).15 F .036(the standard output, and format speci\ +\214cations, each of which causes printing of the ne)144 508.8 R .037 +(xt successi)-.15 F -.15(ve)-.25 G F2(ar)144 520.8 Q(gument)-.37 E F0 +5.532(.I)C 3.032(na)-5.532 G .532(ddition to the standard)-3.032 F F2 +(printf)3.032 E F0 .532(\(1\) format speci\214cations,)B F1(printf)3.031 +E F0 .531(interprets the follo)3.031 F(w-)-.25 E(ing e)144 532.8 Q +(xtensions:)-.15 E F1(%b)144 544.8 Q F0(causes)180 544.8 Q F1(printf) +2.595 E F0 .096(to e)2.595 F .096 +(xpand backslash escape sequences in the corresponding)-.15 F F2(ar) +2.596 E(gument)-.37 E F0 .096(in the)2.596 F(same w)180 556.8 Q(ay as) +-.1 E F1(echo \255e)2.5 E F0(.)A F1(%q)144 568.8 Q F0(causes)180 568.8 Q +F1(printf)2.51 E F0 .01(to output the corresponding)2.51 F F2(ar)2.51 E +(gument)-.37 E F0 .01(in a format that can be reused as shell)2.51 F +(input.)180 580.8 Q F1(%\()144 592.8 Q F2(datefmt)A F1(\)T)A F0(causes) +180 604.8 Q F1(printf)4.403 E F0 1.904 +(to output the date-time string resulting from using)4.403 F F2(datefmt) +4.404 E F0 1.904(as a format)4.404 F .381(string for)180 616.8 R F2 +(strftime)2.881 E F0 2.881(\(3\). The)B(corresponding)2.881 E F2(ar) +2.881 E(gument)-.37 E F0 .381(is an inte)2.881 F .381 +(ger representing the number)-.15 F .292(of seconds since the epoch.)180 +628.8 R -1 -.8(Tw o)5.293 H .293(special ar)3.593 F .293(gument v)-.18 F +.293(alues may be used: \2551 represents the)-.25 F .694 +(current time, and \2552 represents the time the shell w)180 640.8 R +.693(as in)-.1 F -.2(vo)-.4 G -.1(ke).2 G 3.193(d. If).1 F .693(no ar) +3.193 F .693(gument is speci-)-.18 F .21(\214ed, con)180 652.8 R -.15 +(ve)-.4 G .21(rsion beha).15 F -.15(ve)-.2 G 2.71(sa).15 G 2.71(si)-2.71 +G 2.71<66ad>-2.71 G 2.71(1h)-2.71 G .21(ad been gi)-2.71 F -.15(ve)-.25 +G 2.71(n. This).15 F .21(is an e)2.71 F .21(xception to the usual)-.15 F +F1(printf)2.71 E F0(beha)180 664.8 Q(vior)-.2 E(.)-.55 E .902 +(The %b, %q, and %T directi)144 681.6 R -.15(ve)-.25 G 3.401(sa).15 G +.901(ll use the \214eld width and precision ar)-3.401 F .901 +(guments from the format)-.18 F .357(speci\214cation and write that man) +144 693.6 R 2.857(yb)-.15 G .358 +(ytes from \(or use that wide a \214eld for\) the e)-2.857 F .358 +(xpanded ar)-.15 F(gument,)-.18 E +(which usually contains more characters than the original.)144 705.6 Q +(Ar)144 722.4 Q .464(guments to non-string format speci\214ers are trea\ +ted as C constants, e)-.18 F .463(xcept that a leading plus or)-.15 F +(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(12)198.725 E 0 Cg EP +%%Page: 13 13 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E 1.258(minus sign is allo)144 84 R 1.259 +(wed, and if the leading character is a single or double quote, the v) +-.25 F 1.259(alue is the)-.25 F(ASCII v)144 96 Q(alue of the follo)-.25 +E(wing character)-.25 E(.)-.55 E(The)144 112.8 Q/F1 10/Times-Italic@0 SF +(format)2.515 E F0 .015(is reused as necessary to consume all of the) +2.515 F F1(ar)2.515 E(guments)-.37 E F0 5.015(.I)C 2.514(ft)-5.015 G(he) +-2.514 E F1(format)2.514 E F0 .014(requires more)2.514 F F1(ar)2.514 E +(-)-.2 E(guments)144 124.8 Q F0 .565(than are supplied, the e)3.065 F +.566(xtra format speci\214cations beha)-.15 F .866 -.15(ve a)-.2 H 3.066 +(si).15 G 3.066(faz)-3.066 G .566(ero v)-3.066 F .566 +(alue or null string,)-.25 F(as appropriate, had been supplied.)144 +136.8 Q(The return v)5 E(alue is zero on success, non-zero on f)-.25 E +(ailure.)-.1 E/F2 10/Times-Bold@0 SF(pushd)108 153.6 Q F0([)2.5 E F2 +A F0 2.5(][)C(+)-2.5 E F1(n)A F0 2.5(][)C-2.5 E F1(n)A F0(])A +F2(pushd)108 165.6 Q F0([)2.5 E F2A F0 2.5(][)C F1(dir)-2.5 E F0 +(])A .64(Adds a directory to the top of the directory stack, or rotates\ + the stack, making the ne)144 177.6 R 3.139(wt)-.25 G .639(op of the) +-3.139 F .416(stack the current w)144 189.6 R .416(orking directory)-.1 +F 5.416(.W)-.65 G .416(ith no ar)-5.816 F(guments,)-.18 E F2(pushd)2.916 +E F0 -.15(ex)2.916 G .416(changes the top tw).15 F 2.917(od)-.1 G +(irectories)-2.917 E 1.625 +(and returns 0, unless the directory stack is empty)144 201.6 R 6.625 +(.A)-.65 G -.18(rg)-6.625 G 1.625(uments, if supplied, ha).18 F 1.925 +-.15(ve t)-.2 H 1.625(he follo).15 F(wing)-.25 E(meanings:)144 213.6 Q +F2144 225.6 Q F0 1.811(Suppresses the normal change of directory \ +when rotating or adding directories to the)180 225.6 R +(stack, so that only the stack is manipulated.)180 237.6 Q F2(+)144 +249.6 Q F1(n)A F0 1.268(Rotates the stack so that the)180 249.6 R F1(n) +3.768 E F0 1.267(th directory \(counting from the left of the list sho)B +1.267(wn by)-.25 F F2(dirs)180 261.6 Q F0 2.5(,s)C +(tarting with zero\) is at the top.)-2.5 E F2144 273.6 Q F1(n)A F0 +.92(Rotates the stack so that the)180 273.6 R F1(n)3.42 E F0 .92 +(th directory \(counting from the right of the list sho)B .92(wn by)-.25 +F F2(dirs)180 285.6 Q F0 2.5(,s)C(tarting with zero\) is at the top.) +-2.5 E F1(dir)144.35 297.6 Q F0(Adds)180 297.6 Q F1(dir)3.138 E F0 .288 +(to the directory stack at the top, making it the ne)3.518 F 2.787(wc) +-.25 G .287(urrent w)-2.787 F .287(orking directory as)-.1 F +(if it had been supplied as the ar)180 309.6 Q(gument to the)-.18 E F2 +(cd)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .488(If the)144 326.4 R F2(pushd) +2.988 E F0 .488(command is successful, a)2.988 F F2(dirs)2.988 E F0 .488 +(is performed as well.)2.988 F .489(If the \214rst form is used,)5.488 F +F2(pushd)2.989 E F0 1.04(returns 0 unless the cd to)144 338.4 R F1(dir) +3.89 E F0 -.1(fa)4.27 G 3.539(ils. W).1 F 1.039(ith the second form,)-.4 +F F2(pushd)3.539 E F0 1.039(returns 0 unless the directory)3.539 F .846 +(stack is empty)144 350.4 R 3.346(,an)-.65 G(on-e)-3.346 E .847(xistent\ + directory stack element is speci\214ed, or the directory change to the) +-.15 F(speci\214ed ne)144 362.4 Q 2.5(wc)-.25 G(urrent directory f)-2.5 +E(ails.)-.1 E F2(pwd)108 379.2 Q F0([)2.5 E F2(\255LP)A F0(])A .845 +(Print the absolute pathname of the current w)144 391.2 R .845 +(orking directory)-.1 F 5.844(.T)-.65 G .844 +(he pathname printed contains no)-5.844 F .181(symbolic links if the)144 +403.2 R F22.681 E F0 .181(option is supplied or the)2.681 F F2 +.181(\255o ph)2.681 F(ysical)-.15 E F0 .181(option to the)2.681 F F2 +(set)2.681 E F0 -.2(bu)2.681 G .182(iltin command is).2 F 3.264 +(enabled. If)144 415.2 R(the)3.264 E F23.264 E F0 .763 +(option is used, the pathname printed may contain symbolic links.)3.264 +F .763(The return)5.763 F .405(status is 0 unless an error occurs while\ + reading the name of the current directory or an in)144 427.2 R -.25(va) +-.4 G .405(lid op-).25 F(tion is supplied.)144 439.2 Q F2 -.18(re)108 +456 S(ad).18 E F0([)3.817 E F2(\255ers)A F0 3.817(][)C F2-3.817 E +F1(aname)3.817 E F0 3.817(][)C F2-3.817 E F1(delim)3.817 E F0 +3.817(][)C F2-3.817 E F1(te)3.817 E(xt)-.2 E F0 3.817(][)C F2 +-3.817 E F1(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F2 +-3.816 E F1(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F2-3.816 E +F1(pr)3.816 E(ompt)-.45 E F0 3.816(][)C F2-3.816 E F1(timeout) +3.816 E F0 3.816(][)C F2-3.816 E F1(fd)3.816 E F0(])A([)108 468 Q +F1(name)A F0(...])2.5 E .516(One line is read from the standard input, \ +or from the \214le descriptor)144 480 R F1(fd)3.016 E F0 .516 +(supplied as an ar)3.016 F .517(gument to)-.18 F(the)144 492 Q F2 +2.936 E F0 .436(option, split into w)2.936 F .435(ords as described abo) +-.1 F .735 -.15(ve u)-.15 H(nder).15 E F2 -.75(Wo)2.935 G .435 +(rd Splitting).75 F F0 2.935(,a)C .435(nd the \214rst w)-2.935 F .435 +(ord is as-)-.1 F .375(signed to the \214rst)144 504 R F1(name)3.235 E +F0 2.876(,t).18 G .376(he second w)-2.876 F .376(ord to the second)-.1 F +F1(name)3.236 E F0 2.876(,a).18 G .376(nd so on.)-2.876 F .376 +(If there are more w)5.376 F(ords)-.1 E .237 +(than names, the remaining w)144 516 R .237(ords and their interv)-.1 F +.237(ening delimiters are assigned to the last)-.15 F F1(name)3.096 E F0 +5.236(.I).18 G(f)-5.236 E .874(there are fe)144 528 R .874(wer w)-.25 F +.875(ords read from the input stream than names, the remaining names ar\ +e assigned)-.1 F .518(empty v)144 540 R 3.018(alues. The)-.25 F .518 +(characters in)3.018 F/F3 9/Times-Bold@0 SF(IFS)3.018 E F0 .518 +(are used to split the line into w)2.768 F .517 +(ords using the same rules the)-.1 F .026(shell uses for e)144 552 R +.026(xpansion \(described abo)-.15 F .326 -.15(ve u)-.15 H(nder).15 E F2 +-.75(Wo)2.526 G .026(rd Splitting).75 F F0 2.526(\). The)B .026 +(backslash character \()2.526 F F2(\\)A F0 2.527(\)m)C(ay)-2.527 E .489 +(be used to remo)144 564 R .788 -.15(ve a)-.15 H .788 -.15(ny s).15 H +.488(pecial meaning for the ne).15 F .488 +(xt character read and for line continuation.)-.15 F(Op-)5.488 E +(tions, if supplied, ha)144 576 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F2144 588 Q F1(aname)2.5 E F0 1.025(The w) +180 600 R 1.026(ords are assigned to sequential indices of the array v) +-.1 F(ariable)-.25 E F1(aname)3.856 E F0 3.526(,s).18 G 1.026 +(tarting at 0.)-3.526 F F1(aname)180.33 612 Q F0(is unset before an)2.68 +E 2.5(yn)-.15 G .5 -.25(ew va)-2.5 H(lues are assigned.).25 E(Other)5 E +F1(name)2.5 E F0(ar)2.5 E(guments are ignored.)-.18 E F2144 624 Q +F1(delim)2.5 E F0 .281(The \214rst character of)180 636 R F1(delim)2.781 +E F0 .281(is used to terminate the input line, rather than ne)2.781 F +2.78(wline. If)-.25 F F1(de-)2.78 E(lim)180 648 Q F0 +(is the empty string,)2.5 E F2 -.18(re)2.5 G(ad).18 E F0 +(will terminate a line when it reads a NUL character)2.5 E(.)-.55 E F2 +144 660 Q F0 .372 +(If the standard input is coming from a terminal,)180 660 R F2 -.18(re) +2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.873 E F0(abo)2.623 E +-.15(ve)-.15 G 2.873(\)i).15 G 2.873(su)-2.873 G(sed)-2.873 E .218 +(to obtain the line.)180 672 R .218(Readline uses the current \(or def) +5.218 F .218(ault, if line editing w)-.1 F .218(as not pre)-.1 F +(viously)-.25 E(acti)180 684 Q -.15(ve)-.25 G 2.5(\)e).15 G +(diting settings, b)-2.5 E(ut uses Readline')-.2 E 2.5(sd)-.55 G(ef)-2.5 +E(ault \214lename completion.)-.1 E F2144 696 Q F1(te)2.5 E(xt)-.2 +E F0(If)180 696 Q F2 -.18(re)2.715 G(adline).18 E F0 .216 +(is being used to read the line,)2.715 F F1(te)2.716 E(xt)-.2 E F0 .216 +(is placed into the editing b)2.716 F(uf)-.2 E .216(fer before edit-) +-.25 F(ing be)180 708 Q(gins.)-.15 E(GNU Bash 5.0)72 768 Q(2004 Apr 20) +149.565 E(13)198.725 E 0 Cg EP +%%Page: 14 14 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF144 84 Q/F2 10 +/Times-Italic@0 SF(nc)2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 96 S(ad) +.18 E F0 .323(returns after reading)2.823 F F2(nc)2.823 E(har)-.15 E(s) +-.1 E F0 .323(characters rather than w)2.823 F .323 +(aiting for a complete line of in-)-.1 F(put, b)180 108 Q +(ut honors a delimiter if fe)-.2 E(wer than)-.25 E F2(nc)2.5 E(har)-.15 +E(s)-.1 E F0(characters are read before the delimiter)2.5 E(.)-.55 E F1 +144 120 Q F2(nc)2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 132 S(ad) +.18 E F0 1.269(returns after reading e)3.769 F(xactly)-.15 E F2(nc)3.769 +E(har)-.15 E(s)-.1 E F0 1.269(characters rather than w)3.769 F 1.27 +(aiting for a complete)-.1 F .275 +(line of input, unless EOF is encountered or)180 144 R F1 -.18(re)2.775 +G(ad).18 E F0 .274(times out.)2.774 F .274(Delimiter characters encoun-) +5.274 F 1.002 +(tered in the input are not treated specially and do not cause)180 156 R +F1 -.18(re)3.503 G(ad).18 E F0 1.003(to return until)3.503 F F2(nc)3.503 +E(har)-.15 E(s)-.1 E F0 .609(characters are read.)180 168 R .608 +(The result is not split on the characters in)5.609 F F1(IFS)3.108 E F0 +3.108(;t)C .608(he intent is that the)-3.108 F -.25(va)180 180 S .669 +(riable is assigned e).25 F .669 +(xactly the characters read \(with the e)-.15 F .67 +(xception of backslash; see the)-.15 F F1180 192 Q F0(option belo) +2.5 E(w\).)-.25 E F1144 204 Q F2(pr)2.5 E(ompt)-.45 E F0(Display) +180 216 Q F2(pr)3.661 E(ompt)-.45 E F0 1.161(on standard error)3.661 F +3.661(,w)-.4 G 1.161(ithout a trailing ne)-3.661 F 1.161 +(wline, before attempting to read)-.25 F(an)180 228 Q 2.5(yi)-.15 G 2.5 +(nput. The)-2.5 F +(prompt is displayed only if input is coming from a terminal.)2.5 E F1 +144 240 Q F0 .543(Backslash does not act as an escape character) +180 240 R 5.543(.T)-.55 G .544(he backslash is considered to be part of) +-5.543 F .493(the line.)180 252 R .493(In particular)5.493 F 2.993(,ab) +-.4 G(ackslash-ne)-2.993 E .493 +(wline pair may not then be used as a line continua-)-.25 F(tion.)180 +264 Q F1144 276 Q F0(Silent mode.)180 276 Q +(If input is coming from a terminal, characters are not echoed.)5 E F1 +144 288 Q F2(timeout)2.5 E F0(Cause)180 300 Q F1 -.18(re)2.928 G +(ad).18 E F0 .428(to time out and return f)2.928 F .428 +(ailure if a complete line of input \(or a speci\214ed num-)-.1 F .561 +(ber of characters\) is not read within)180 312 R F2(timeout)3.061 E F0 +(seconds.)3.061 E F2(timeout)5.561 E F0 .56(may be a decimal number) +3.061 F(with a fractional portion follo)180 324 Q +(wing the decimal point.)-.25 E(This option is only ef)5 E(fecti)-.25 E +.3 -.15(ve i)-.25 H(f).15 E F1 -.18(re)2.5 G(ad).18 E F0 .506(is readin\ +g input from a terminal, pipe, or other special \214le; it has no ef)180 +336 R .505(fect when reading)-.25 F .589(from re)180 348 R .589 +(gular \214les.)-.15 F(If)5.589 E F1 -.18(re)3.089 G(ad).18 E F0 .589 +(times out,)3.089 F F1 -.18(re)3.089 G(ad).18 E F0(sa)3.089 E -.15(ve) +-.2 G 3.089(sa).15 G .889 -.15(ny p)-3.089 H .59 +(artial input read into the speci\214ed).15 F -.25(va)180 360 S(riable) +.25 E F2(name)2.77 E F0 5.27(.I)C(f)-5.27 E F2(timeout)2.77 E F0 .27 +(is 0,)2.77 F F1 -.18(re)2.77 G(ad).18 E F0 .27(returns immediately)2.77 +F 2.77(,w)-.65 G .27(ithout trying to read an)-2.77 F 2.77(yd)-.15 G +(ata.)-2.77 E 1.12(The e)180 372 R 1.12(xit status is 0 if input is a) +-.15 F -.25(va)-.2 G 1.12(ilable on the speci\214ed \214le descriptor) +.25 F 3.62(,n)-.4 G 1.12(on-zero other)-3.62 F(-)-.2 E 2.5(wise. The)180 +384 R -.15(ex)2.5 G(it status is greater than 128 if the timeout is e) +.15 E(xceeded.)-.15 E F1144 396 Q F2(fd)2.5 E F0 +(Read input from \214le descriptor)180 396 Q F2(fd)2.5 E F0(.)A .522 +(If no)144 412.8 R F2(names)3.382 E F0 .522 +(are supplied, the line read, without the ending delimiter b)3.292 F +.522(ut otherwise unmodi\214ed, is)-.2 F 1.186(assigned to the v)144 +424.8 R(ariable)-.25 E/F3 9/Times-Bold@0 SF(REPL)3.686 E(Y)-.828 E/F4 9 +/Times-Roman@0 SF(.)A F0 1.186(The e)5.686 F 1.186 +(xit status is zero, unless end-of-\214le is encountered,)-.15 F F1 -.18 +(re)3.687 G(ad).18 E F0 .961 +(times out \(in which case the status is greater than 128\), a v)144 +436.8 R .96(ariable assignment error \(such as as-)-.25 F .706 +(signing to a readonly v)144 448.8 R .706(ariable\) occurs, or an in) +-.25 F -.25(va)-.4 G .706(lid \214le descriptor is supplied as the ar) +.25 F .707(gument to)-.18 F F1144 460.8 Q F0(.)A F1 -.18(re)108 +477.6 S(adonly).18 E F0([)2.5 E F1(\255aAf)A F0 2.5(][)C F1-2.5 E +F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(wor)A(d)-.37 E F0 2.5(].)C(..]) +-2.5 E .77(The gi)144 489.6 R -.15(ve)-.25 G(n).15 E F2(names)3.27 E F0 +.77(are mark)3.27 F .77(ed readonly; the v)-.1 F .77(alues of these)-.25 +F F2(names)3.63 E F0 .77(may not be changed by subse-)3.54 F 1.096 +(quent assignment.)144 501.6 R 1.096(If the)6.096 F F13.596 E F0 +1.097(option is supplied, the functions corresponding to the)3.596 F F2 +(names)3.597 E F0 1.097(are so)3.597 F(mark)144 513.6 Q 3.334(ed. The) +-.1 F F13.334 E F0 .834(option restricts the v)3.334 F .834 +(ariables to inde)-.25 F -.15(xe)-.15 G 3.334(da).15 G .834(rrays; the) +-3.334 F F13.334 E F0 .834(option restricts the v)3.334 F(ari-) +-.25 E .776(ables to associati)144 525.6 R 1.076 -.15(ve a)-.25 H 3.276 +(rrays. If).15 F .777(both options are supplied,)3.276 F F13.277 E +F0(tak)3.277 E .777(es precedence.)-.1 F .777(If no)5.777 F F2(name) +3.637 E F0(ar)3.457 E(gu-)-.18 E .522(ments are gi)144 537.6 R -.15(ve) +-.25 G .521(n, or if the).15 F F13.021 E F0 .521 +(option is supplied, a list of all readonly names is printed.)3.021 F +.521(The other)5.521 F .295(options may be used to restrict the output \ +to a subset of the set of readonly names.)144 549.6 R(The)5.296 E F1 +2.796 E F0(option)2.796 E .786 +(causes output to be displayed in a format that may be reused as input.) +144 561.6 R .786(If a v)5.786 F .785(ariable name is fol-)-.25 F(lo)144 +573.6 Q .717(wed by =)-.25 F F2(wor)A(d)-.37 E F0 3.218(,t)C .718(he v) +-3.218 F .718(alue of the v)-.25 F .718(ariable is set to)-.25 F F2(wor) +3.218 E(d)-.37 E F0 5.718(.T)C .718(he return status is 0 unless an in) +-5.718 F -.25(va)-.4 G(lid).25 E .26(option is encountered, one of the) +144 585.6 R F2(names)3.12 E F0 .26(is not a v)3.03 F .26(alid shell v) +-.25 F .26(ariable name, or)-.25 F F12.76 E F0 .26 +(is supplied with a)2.76 F F2(name)144.36 597.6 Q F0 +(that is not a function.)2.68 E F1 -.18(re)108 614.4 S(tur).18 E(n)-.15 +E F0([)2.5 E F2(n)A F0(])A .02(Causes a function to stop e)144 626.4 R +-.15(xe)-.15 G .02(cuting and return the v).15 F .021 +(alue speci\214ed by)-.25 F F2(n)2.881 E F0 .021(to its caller)2.761 F +5.021(.I)-.55 G(f)-5.021 E F2(n)2.881 E F0 .021(is omitted,)2.761 F .597 +(the return status is that of the last command e)144 638.4 R -.15(xe) +-.15 G .596(cuted in the function body).15 F 5.596(.I)-.65 G(f)-5.596 E +F1 -.18(re)3.096 G(tur).18 E(n)-.15 E F0 .596(is e)3.096 F -.15(xe)-.15 +G(cuted).15 E .267(by a trap handler)144 650.4 R 2.767(,t)-.4 G .267 +(he last command used to determine the status is the last command e) +-2.767 F -.15(xe)-.15 G .268(cuted be-).15 F .02(fore the trap handler) +144 662.4 R 5.02(.I)-.55 G(f)-5.02 E F1 -.18(re)2.52 G(tur).18 E(n)-.15 +E F0 .02(is e)2.52 F -.15(xe)-.15 G .02(cuted during a).15 F F1(DEB)2.52 +E(UG)-.1 E F0 .02(trap, the last command used to deter)2.52 F(-)-.2 E +.885(mine the status is the last command e)144 674.4 R -.15(xe)-.15 G +.886(cuted by the trap handler before).15 F F1 -.18(re)3.386 G(tur).18 E +(n)-.15 E F0 -.1(wa)3.386 G 3.386(si).1 G -1.9 -.4(nv o)-3.386 H -.1(ke) +.4 G 3.386(d. If).1 F F1 -.18(re)144 686.4 S(tur).18 E(n)-.15 E F0 .628 +(is used outside a function, b)3.128 F .628(ut during e)-.2 F -.15(xe) +-.15 G .628(cution of a script by the).15 F F1(.)3.127 E F0(\()5.627 E +F1(sour)A(ce)-.18 E F0 3.127(\)c)C .627(ommand, it)-3.127 F .588 +(causes the shell to stop e)144 698.4 R -.15(xe)-.15 G .588 +(cuting that script and return either).15 F F2(n)3.448 E F0 .589 +(or the e)3.329 F .589(xit status of the last com-)-.15 F .326(mand e) +144 710.4 R -.15(xe)-.15 G .326(cuted within the script as the e).15 F +.326(xit status of the script.)-.15 F(If)5.326 E F2(n)2.826 E F0 .325 +(is supplied, the return v)2.826 F .325(alue is)-.25 F 2.035 +(its least signi\214cant 8 bits.)144 722.4 R 2.035 +(The return status is non-zero if)7.035 F F1 -.18(re)4.536 G(tur).18 E +(n)-.15 E F0 2.036(is supplied a non-numeric)4.536 F(GNU Bash 5.0)72 768 +Q(2004 Apr 20)149.565 E(14)198.725 E 0 Cg EP +%%Page: 15 15 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E(ar)144 84 Q .706 +(gument, or is used outside a function and not during e)-.18 F -.15(xe) +-.15 G .705(cution of a script by).15 F/F1 10/Times-Bold@0 SF(.)3.205 E +F0(or)4.038 E F1(sour)3.205 E(ce)-.18 E F0 5.705(.A)C -.15(ny)-5.705 G +.365(command associated with the)144 96 R F1(RETURN)2.865 E F0 .365 +(trap is e)2.865 F -.15(xe)-.15 G .365(cuted before e).15 F -.15(xe)-.15 +G .366(cution resumes after the func-).15 F(tion or script.)144 108 Q F1 +(set)108 124.8 Q F0([)2.5 E F1(\255\255abefhkmnptuvxBCEHPT)A F0 2.5(][)C +F1-2.5 E/F2 10/Times-Italic@0 SF(option\255name)2.5 E F0 2.5(][)C +F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E F1(set)108 136.8 Q F0([)2.5 E F1 +(+abefhkmnptuvxBCEHPT)A F0 2.5(][)C F1(+o)-2.5 E F2(option\255name)2.5 E +F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E -.4(Wi)144 148.8 S .836 +(thout options, the name and v).4 F .835(alue of each shell v)-.25 F +.835(ariable are displayed in a format that can be)-.25 F .784 +(reused as input for setting or resetting the currently-set v)144 160.8 +R 3.284(ariables. Read-only)-.25 F -.25(va)3.284 G .784 +(riables cannot be).25 F 2.947(reset. In)144 172.8 R F2 .447(posix mode) +2.947 F F0 2.947(,o)C .447(nly shell v)-2.947 F .447 +(ariables are listed.)-.25 F .447 +(The output is sorted according to the current)5.447 F 3.53 +(locale. When)144 184.8 R 1.031(options are speci\214ed, the)3.53 F +3.531(ys)-.15 G 1.031(et or unset shell attrib)-3.531 F 3.531(utes. An) +-.2 F 3.531(ya)-.15 G -.18(rg)-3.531 G 1.031(uments remaining).18 F .585 +(after option processing are treated as v)144 196.8 R .584 +(alues for the positional parameters and are assigned, in or)-.25 F(-) +-.2 E(der)144 208.8 Q 2.5(,t)-.4 G(o)-2.5 E F1($1)2.5 E F0(,)A F1($2)2.5 +E F0(,)A F1 2.5(... $)2.5 F F2(n)A F0 5(.O)C(ptions, if speci\214ed, ha) +-5 E .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1144 +220.8 Q F0 1.377(Each v)184 220.8 R 1.377 +(ariable or function that is created or modi\214ed is gi)-.25 F -.15(ve) +-.25 G 3.877(nt).15 G 1.377(he e)-3.877 F 1.378(xport attrib)-.15 F +1.378(ute and)-.2 F(mark)184 232.8 Q(ed for e)-.1 E(xport to the en)-.15 +E(vironment of subsequent commands.)-.4 E F1144 244.8 Q F0 .132 +(Report the status of terminated background jobs immediately)184 244.8 R +2.632(,r)-.65 G .131(ather than before the ne)-2.632 F(xt)-.15 E +(primary prompt.)184 256.8 Q(This is ef)5 E(fecti)-.25 E .3 -.15(ve o) +-.25 H(nly when job control is enabled.).15 E F1144 268.8 Q F0 +.087(Exit immediately if a)184 268.8 R F2(pipeline)2.587 E F0 .087 +(\(which may consist of a single)2.587 F F2 .088(simple command)2.588 F +F0 .088(\), a)B F2(list)2.588 E F0 2.588(,o)C(r)-2.588 E(a)184 280.8 Q +F2 1.521(compound command)4.021 F F0(\(see)4.021 E/F3 9/Times-Bold@0 SF +1.521(SHELL GRAMMAR)4.021 F F0(abo)3.771 E -.15(ve)-.15 G 1.521(\), e) +.15 F 1.521(xits with a non-zero status.)-.15 F .079 +(The shell does not e)184 292.8 R .079(xit if the command that f)-.15 F +.08(ails is part of the command list immediately)-.1 F(follo)184 304.8 Q +1.655(wing a)-.25 F F1(while)4.155 E F0(or)4.155 E F1(until)4.155 E F0 +-.1(ke)4.155 G(yw)-.05 E 1.655(ord, part of the test follo)-.1 F 1.654 +(wing the)-.25 F F1(if)4.154 E F0(or)4.154 E F1(elif)4.154 E F0(reserv) +4.154 E(ed)-.15 E -.1(wo)184 316.8 S .581(rds, part of an).1 F 3.081(yc) +-.15 G .581(ommand e)-3.081 F -.15(xe)-.15 G .581(cuted in a).15 F F1 +(&&)3.081 E F0(or)3.081 E F1(||)3.081 E F0 .582(list e)3.082 F .582 +(xcept the command follo)-.15 F(wing)-.25 E .918(the \214nal)184 328.8 R +F1(&&)3.418 E F0(or)3.418 E F1(||)3.418 E F0 3.418(,a)C 1.218 -.15(ny c) +-3.418 H .918(ommand in a pipeline b).15 F .917 +(ut the last, or if the command')-.2 F 3.417(sr)-.55 G(eturn)-3.417 E +-.25(va)184 340.8 S .66(lue is being in).25 F -.15(ve)-.4 G .66 +(rted with).15 F F1(!)3.16 E F0 5.661(.I)C 3.161(fac)-5.661 G .661 +(ompound command other than a subshell returns a)-3.161 F 1.113 +(non-zero status because a command f)184 352.8 R 1.112(ailed while)-.1 F +F13.612 E F0 -.1(wa)3.612 G 3.612(sb).1 G 1.112 +(eing ignored, the shell does)-3.612 F .177(not e)184 364.8 R 2.677 +(xit. A)-.15 F .177(trap on)2.677 F F1(ERR)2.677 E F0 2.677(,i)C 2.678 +(fs)-2.677 G .178(et, is e)-2.678 F -.15(xe)-.15 G .178 +(cuted before the shell e).15 F 2.678(xits. This)-.15 F .178 +(option applies to)2.678 F .618(the shell en)184 376.8 R .617 +(vironment and each subshell en)-.4 F .617(vironment separately \(see) +-.4 F F3 .617(COMMAND EXE-)3.117 F .642(CUTION ENVIR)184 388.8 R(ONMENT) +-.27 E F0(abo)2.893 E -.15(ve)-.15 G .643 +(\), and may cause subshells to e).15 F .643(xit before e)-.15 F -.15 +(xe)-.15 G .643(cuting all).15 F(the commands in the subshell.)184 400.8 +Q .999(If a compound command or shell function e)184 418.8 R -.15(xe) +-.15 G .999(cutes in a conte).15 F .998(xt where)-.15 F F13.498 E +F0 .998(is being ig-)3.498 F .089(nored, none of the commands e)184 +430.8 R -.15(xe)-.15 G .089 +(cuted within the compound command or function body).15 F .503 +(will be af)184 442.8 R .503(fected by the)-.25 F F13.002 E F0 +.502(setting, e)3.002 F -.15(ve)-.25 G 3.002(ni).15 G(f)-3.002 E F1 +3.002 E F0 .502(is set and a command returns a f)3.002 F .502 +(ailure sta-)-.1 F 4.183(tus. If)184 454.8 R 4.183(ac)4.183 G 1.683 +(ompound command or shell function sets)-4.183 F F14.184 E F0 +1.684(while e)4.184 F -.15(xe)-.15 G 1.684(cuting in a conte).15 F(xt) +-.15 E(where)184 466.8 Q F13.154 E F0 .654 +(is ignored, that setting will not ha)3.154 F .953 -.15(ve a)-.2 H .953 +-.15(ny e).15 H -.25(ff).15 G .653(ect until the compound command).25 F +(or the command containing the function call completes.)184 478.8 Q F1 +144 490.8 Q F0(Disable pathname e)184 490.8 Q(xpansion.)-.15 E F1 +144 502.8 Q F0 .988(Remember the location of commands as the)184 +502.8 R 3.488(ya)-.15 G .988(re look)-3.488 F .988(ed up for e)-.1 F +-.15(xe)-.15 G 3.488(cution. This).15 F .988(is en-)3.488 F +(abled by def)184 514.8 Q(ault.)-.1 E F1144 526.8 Q F0 .514 +(All ar)184 526.8 R .514 +(guments in the form of assignment statements are placed in the en)-.18 +F .513(vironment for a)-.4 F +(command, not just those that precede the command name.)184 538.8 Q F1 +144 550.8 Q F0 .148(Monitor mode.)184 550.8 R .148 +(Job control is enabled.)5.148 F .149(This option is on by def)5.148 F +.149(ault for interacti)-.1 F .449 -.15(ve s)-.25 H(hells).15 E .651 +(on systems that support it \(see)184 562.8 R F3 .651(JOB CONTR)3.151 F +(OL)-.27 E F0(abo)2.901 E -.15(ve)-.15 G 3.151(\). All).15 F .65 +(processes run in a separate)3.151 F .678(process group.)184 574.8 R +.679(When a background job completes, the shell prints a line containin\ +g its)5.678 F -.15(ex)184 586.8 S(it status.).15 E F1144 598.8 Q +F0 .653(Read commands b)184 598.8 R .653(ut do not e)-.2 F -.15(xe)-.15 +G .653(cute them.).15 F .652 +(This may be used to check a shell script for)5.653 F(syntax errors.)184 +610.8 Q(This is ignored by interacti)5 E .3 -.15(ve s)-.25 H(hells.).15 +E F1144 622.8 Q F2(option\255name)2.5 E F0(The)184 634.8 Q F2 +(option\255name)2.5 E F0(can be one of the follo)2.5 E(wing:)-.25 E F1 +(allexport)184 646.8 Q F0(Same as)224 658.8 Q F12.5 E F0(.)A F1 +(braceexpand)184 670.8 Q F0(Same as)224 682.8 Q F12.5 E F0(.)A F1 +(emacs)184 694.8 Q F0 .089 +(Use an emacs-style command line editing interf)224 694.8 R 2.589 +(ace. This)-.1 F .089(is enabled by def)2.589 F(ault)-.1 E .95 +(when the shell is interacti)224 706.8 R -.15(ve)-.25 G 3.45(,u).15 G +.95(nless the shell is started with the)-3.45 F F1(\255\255noediting) +3.45 E F0 2.5(option. This)224 718.8 R(also af)2.5 E +(fects the editing interf)-.25 E(ace used for)-.1 E F1 -.18(re)2.5 G +(ad \255e).18 E F0(.)A(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(15) +198.725 E 0 Cg EP +%%Page: 16 16 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF(err)184 84 Q(exit) +-.18 E F0(Same as)224 84 Q F12.5 E F0(.)A F1(errtrace)184 96 Q F0 +(Same as)224 96 Q F12.5 E F0(.)A F1(functrace)184 108 Q F0 +(Same as)224 120 Q F12.5 E F0(.)A F1(hashall)184 132 Q F0(Same as) +224 132 Q F12.5 E F0(.)A F1(histexpand)184 144 Q F0(Same as)224 +156 Q F12.5 E F0(.)A F1(history)184 168 Q F0 .586 +(Enable command history)224 168 R 3.087(,a)-.65 G 3.087(sd)-3.087 G .587 +(escribed abo)-3.087 F .887 -.15(ve u)-.15 H(nder).15 E/F2 9 +/Times-Bold@0 SF(HIST)3.087 E(OR)-.162 E(Y)-.315 E/F3 9/Times-Roman@0 SF +(.)A F0 .587(This option is)5.087 F(on by def)224 180 Q +(ault in interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F1(ignor)184 +192 Q(eeof)-.18 E F0 1.657(The ef)224 204 R 1.657 +(fect is as if the shell command)-.25 F/F4 10/Courier@0 SF(IGNOREEOF=10) +4.156 E F0 1.656(had been e)4.156 F -.15(xe)-.15 G(cuted).15 E(\(see)224 +216 Q F1(Shell V)2.5 E(ariables)-.92 E F0(abo)2.5 E -.15(ve)-.15 G(\).) +.15 E F1 -.1(ke)184 228 S(yw).1 E(ord)-.1 E F0(Same as)224 240 Q F1 +2.5 E F0(.)A F1(monitor)184 252 Q F0(Same as)224 252 Q F12.5 +E F0(.)A F1(noclob)184 264 Q(ber)-.1 E F0(Same as)224 276 Q F12.5 +E F0(.)A F1(noexec)184 288 Q F0(Same as)224 288 Q F12.5 E F0(.)A +F1(noglob)184 300 Q F0(Same as)224 300 Q F12.5 E F0(.)A F1(nolog) +184 312 Q F0(Currently ignored.)224 312 Q F1(notify)184 324 Q F0 +(Same as)224 324 Q F12.5 E F0(.)A F1(nounset)184 336 Q F0(Same as) +224 336 Q F12.5 E F0(.)A F1(onecmd)184 348 Q F0(Same as)224 348 Q +F12.5 E F0(.)A F1(ph)184 360 Q(ysical)-.15 E F0(Same as)224 360 Q +F12.5 E F0(.)A F1(pipefail)184 372 Q F0 1.029 +(If set, the return v)224 372 R 1.029(alue of a pipeline is the v)-.25 F +1.03(alue of the last \(rightmost\) com-)-.25 F 1.137(mand to e)224 384 +R 1.136 +(xit with a non-zero status, or zero if all commands in the pipeline) +-.15 F -.15(ex)224 396 S(it successfully).15 E 5(.T)-.65 G +(his option is disabled by def)-5 E(ault.)-.1 E F1(posix)184 408 Q F0 +2.09(Change the beha)224 408 R 2.091(vior of)-.2 F F1(bash)4.591 E F0 +2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091 +(fers from the)-.25 F 1.212(POSIX standard to match the standard \()224 +420 R/F5 10/Times-Italic@0 SF 1.212(posix mode)B F0 3.712(\). See)B F2 +1.212(SEE ALSO)3.712 F F0(belo)3.462 E(w)-.25 E .954 +(for a reference to a document that details ho)224 432 R 3.455(wp)-.25 G +.955(osix mode af)-3.455 F .955(fects bash')-.25 F 3.455(sb)-.55 G(e-) +-3.455 E(ha)224 444 Q(vior)-.2 E(.)-.55 E F1(pri)184 456 Q(vileged)-.1 E +F0(Same as)224 468 Q F12.5 E F0(.)A F1 -.1(ve)184 480 S(rbose).1 E +F0(Same as)224 480 Q F12.5 E F0(.)A F1(vi)184 492 Q F0 .209 +(Use a vi-style command line editing interf)224 492 R 2.709(ace. This) +-.1 F .209(also af)2.709 F .209(fects the editing in-)-.25 F(terf)224 +504 Q(ace used for)-.1 E F1 -.18(re)2.5 G(ad \255e).18 E F0(.)A F1 +(xtrace)184 516 Q F0(Same as)224 516 Q F12.5 E F0(.)A(If)184 534 Q +F13.052 E F0 .552(is supplied with no)3.052 F F5(option\255name) +3.053 E F0 3.053(,t)C .553(he v)-3.053 F .553 +(alues of the current options are printed.)-.25 F(If)5.553 E F1(+o)184 +546 Q F0 1.072(is supplied with no)3.572 F F5(option\255name)3.572 E F0 +3.572(,a)C 1.071(series of)-.001 F F1(set)3.571 E F0 1.071 +(commands to recreate the current)3.571 F +(option settings is displayed on the standard output.)184 558 Q F1 +144 570 Q F0 -.45(Tu)184 570 S 1.071(rn on).45 F F5(privile)4.821 E -.1 +(ge)-.4 G(d).1 E F0 3.572(mode. In)4.341 F 1.072(this mode, the)3.572 F +F2($ENV)3.572 E F0(and)3.322 E F2($B)3.572 E(ASH_ENV)-.27 E F0 1.072 +(\214les are not pro-)3.322 F 1.501 +(cessed, shell functions are not inherited from the en)184 582 R 1.5 +(vironment, and the)-.4 F F2(SHELLOPTS)4 E F3(,)A F2 -.27(BA)184 594 S +(SHOPTS).27 E F3(,)A F2(CDP)2.774 E -.855(AT)-.666 G(H).855 E F3(,)A F0 +(and)2.774 E F2(GLOBIGNORE)3.024 E F0 -.25(va)2.774 G .524 +(riables, if the).25 F 3.025(ya)-.15 G .525(ppear in the en)-3.025 F +(vironment,)-.4 E .38(are ignored.)184 606 R .38 +(If the shell is started with the ef)5.38 F(fecti)-.25 E .679 -.15(ve u) +-.25 H .379(ser \(group\) id not equal to the real).15 F .461 +(user \(group\) id, and the)184 618 R F12.961 E F0 .461 +(option is not supplied, these actions are tak)2.961 F .462 +(en and the ef)-.1 F(fec-)-.25 E(ti)184 630 Q .695 -.15(ve u)-.25 H .395 +(ser id is set to the real user id.).15 F .395(If the)5.395 F F1 +2.895 E F0 .394(option is supplied at startup, the ef)2.895 F(fecti)-.25 +E -.15(ve)-.25 G .386(user id is not reset.)184 642 R -.45(Tu)5.386 G +.386(rning this option of).45 F 2.886(fc)-.25 G .387(auses the ef)-2.886 +F(fecti)-.25 E .687 -.15(ve u)-.25 H .387(ser and group ids to be).15 F +(set to the real user and group ids.)184 654 Q F1144 666 Q F0 +(Exit after reading and e)184 666 Q -.15(xe)-.15 G(cuting one command.) +.15 E F1144 678 Q F0 -.35(Tr)184 678 S .044(eat unset v).35 F .044 +(ariables and parameters other than the special parameters "@" and "*" \ +as an)-.25 F .182(error when performing parameter e)184 690 R 2.682 +(xpansion. If)-.15 F -.15(ex)2.682 G .183 +(pansion is attempted on an unset v).15 F(ari-)-.25 E .746 +(able or parameter)184 702 R 3.246(,t)-.4 G .746 +(he shell prints an error message, and, if not interacti)-3.246 F -.15 +(ve)-.25 G 3.246(,e).15 G .746(xits with a)-3.396 F(non-zero status.)184 +714 Q(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(16)198.725 E 0 Cg EP +%%Page: 17 17 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF144 84 Q F0 +(Print shell input lines as the)184 84 Q 2.5(ya)-.15 G(re read.)-2.5 E +F1144 96 Q F0 .315(After e)184 96 R .315(xpanding each)-.15 F/F2 +10/Times-Italic@0 SF .315(simple command)2.815 F F0(,)A F1 -.25(fo)2.815 +G(r).25 E F0(command,)2.815 E F1(case)2.815 E F0(command,)2.815 E F1 +(select)2.815 E F0(command,)2.815 E 1.236(or arithmetic)184 108 R F1 +-.25(fo)3.736 G(r).25 E F0 1.236(command, display the e)3.736 F 1.236 +(xpanded v)-.15 F 1.236(alue of)-.25 F/F3 9/Times-Bold@0 SF(PS4)3.736 E +/F4 9/Times-Roman@0 SF(,)A F0(follo)3.486 E 1.236(wed by the com-)-.25 F +(mand and its e)184 120 Q(xpanded ar)-.15 E(guments or associated w)-.18 +E(ord list.)-.1 E F1144 132 Q F0 1.205(The shell performs brace e) +184 132 R 1.205(xpansion \(see)-.15 F F1 1.205(Brace Expansion)3.705 F +F0(abo)3.705 E -.15(ve)-.15 G 3.706(\). This).15 F 1.206(is on by de-) +3.706 F -.1(fa)184 144 S(ult.).1 E F1144 156 Q F0 .214(If set,)184 +156 R F1(bash)2.714 E F0 .214(does not o)2.714 F -.15(ve)-.15 G .214 +(rwrite an e).15 F .214(xisting \214le with the)-.15 F F1(>)2.714 E F0 +(,)A F1(>&)2.714 E F0 2.713(,a)C(nd)-2.713 E F1(<>)2.713 E F0 .213 +(redirection opera-)2.713 F 3.053(tors. This)184 168 R .553(may be o) +3.053 F -.15(ve)-.15 G .553 +(rridden when creating output \214les by using the redirection opera-) +.15 F(tor)184 180 Q F1(>|)2.5 E F0(instead of)2.5 E F1(>)2.5 E F0(.)A F1 +144 192 Q F0 .104(If set, an)184 192 R 2.604(yt)-.15 G .104 +(rap on)-2.604 F F1(ERR)2.604 E F0 .103 +(is inherited by shell functions, command substitutions, and com-)2.604 +F .838(mands e)184 204 R -.15(xe)-.15 G .838(cuted in a subshell en).15 +F 3.338(vironment. The)-.4 F F1(ERR)3.338 E F0 .839 +(trap is normally not inherited in)3.339 F(such cases.)184 216 Q F1 +144 228 Q F0(Enable)184 228 Q F1(!)3.032 E F0 .532 +(style history substitution.)5.532 F .531(This option is on by def)5.532 +F .531(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 240 Q -.15 +(ve)-.25 G(.).15 E F1144 252 Q F0 .959 +(If set, the shell does not resolv)184 252 R 3.459(es)-.15 G .959 +(ymbolic links when e)-3.459 F -.15(xe)-.15 G .96 +(cuting commands such as).15 F F1(cd)3.46 E F0 1.453 +(that change the current w)184 264 R 1.453(orking directory)-.1 F 6.453 +(.I)-.65 G 3.952(tu)-6.453 G 1.452(ses the ph)-3.952 F 1.452 +(ysical directory structure in-)-.05 F 3.334(stead. By)184 276 R(def) +3.334 E(ault,)-.1 E F1(bash)3.334 E F0(follo)3.334 E .834 +(ws the logical chain of directories when performing com-)-.25 F +(mands which change the current directory)184 288 Q(.)-.65 E F1144 +300 Q F0 .89(If set, an)184 300 R 3.39(yt)-.15 G .89(raps on)-3.39 F F1 +(DEB)3.39 E(UG)-.1 E F0(and)3.39 E F1(RETURN)3.39 E F0 .89 +(are inherited by shell functions, command)3.39 F 1.932 +(substitutions, and commands e)184 312 R -.15(xe)-.15 G 1.932 +(cuted in a subshell en).15 F 4.432(vironment. The)-.4 F F1(DEB)4.432 E +(UG)-.1 E F0(and)4.432 E F1(RETURN)184 324 Q F0 +(traps are normally not inherited in such cases.)2.5 E F1144 336 Q +F0 .401(If no ar)184 336 R .401(guments follo)-.18 F 2.901(wt)-.25 G +.401(his option, then the positional parameters are unset.)-2.901 F +(Otherwise,)5.4 E(the positional parameters are set to the)184 348 Q F2 +(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G +(ome of them be)-2.5 E(gin with a)-.15 E F12.5 E F0(.)A F1144 +360 Q F0 .796(Signal the end of options, cause all remaining)184 360 R +F2(ar)3.297 E(g)-.37 E F0 3.297(st)C 3.297(ob)-3.297 G 3.297(ea)-3.297 G +.797(ssigned to the positional pa-)-3.297 F 3.022(rameters. The)184 372 +R F13.022 E F0(and)3.022 E F13.022 E F0 .522 +(options are turned of)3.022 F 3.022(f. If)-.25 F .522(there are no) +3.022 F F2(ar)3.022 E(g)-.37 E F0 .521(s, the positional pa-)B +(rameters remain unchanged.)184 384 Q .425(The options are of)144 400.8 +R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef)-2.925 E .425 +(ault unless otherwise noted.)-.1 F .425 +(Using + rather than \255 causes these options)5.425 F .178 +(to be turned of)144 412.8 R 2.678(f. The)-.25 F .178 +(options can also be speci\214ed as ar)2.678 F .178(guments to an in) +-.18 F -.2(vo)-.4 G .177(cation of the shell.).2 F(The)5.177 E .066 +(current set of options may be found in)144 424.8 R F1<24ad>2.566 E F0 +5.066(.T)C .066(he return status is al)-5.066 F -.1(wa)-.1 G .066 +(ys true unless an in).1 F -.25(va)-.4 G .067(lid option).25 F +(is encountered.)144 436.8 Q F1(shift)108 453.6 Q F0([)2.5 E F2(n)A F0 +(])A .429(The positional parameters from)144 465.6 R F2(n)2.929 E F0 +.429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.428 G +.428(rameters represented by the num-).15 F(bers)144 477.6 Q F1($#)2.582 +E F0(do)2.582 E .082(wn to)-.25 F F1($#)2.582 E F0A F2(n)A F0 .082 +(+1 are unset.)B F2(n)5.442 E F0 .082(must be a non-ne)2.822 F -.05(ga) +-.15 G(ti).05 E .383 -.15(ve n)-.25 H .083(umber less than or equal to) +.15 F F1($#)2.583 E F0 5.083(.I)C(f)-5.083 E F2(n)2.943 E F0 .06 +(is 0, no parameters are changed.)144 489.6 R(If)5.06 E F2(n)2.92 E F0 +.06(is not gi)2.8 F -.15(ve)-.25 G .06(n, it is assumed to be 1.).15 F +(If)5.06 E F2(n)2.92 E F0 .06(is greater than)2.8 F F1($#)2.56 E F0 2.56 +(,t)C(he)-2.56 E .143(positional parameters are not changed.)144 501.6 R +.144(The return status is greater than zero if)5.143 F F2(n)3.004 E F0 +.144(is greater than)2.884 F F1($#)2.644 E F0 +(or less than zero; otherwise 0.)144 513.6 Q F1(shopt)108 530.4 Q F0([) +2.5 E F1(\255pqsu)A F0 2.5(][)C F1-2.5 E F0 2.5(][)C F2(optname) +-2.5 E F0(...])2.5 E -.8(To)144 542.4 S .64(ggle the v).8 F .639 +(alues of settings controlling optional shell beha)-.25 F(vior)-.2 E +5.639(.T)-.55 G .639(he settings can be either those)-5.639 F .374 +(listed belo)144 554.4 R 1.674 -.65(w, o)-.25 H 1.174 -.4(r, i).65 H +2.874(ft).4 G(he)-2.874 E F12.874 E F0 .375 +(option is used, those a)2.875 F -.25(va)-.2 G .375(ilable with the).25 +F F12.875 E F0 .375(option to the)2.875 F F1(set)2.875 E F0 -.2 +(bu)2.875 G .375(iltin com-).2 F 2.566(mand. W)144 566.4 R .066 +(ith no options, or with the)-.4 F F12.566 E F0 .066 +(option, a list of all settable options is displayed, with an in-)2.566 +F .074(dication of whether or not each is set; if)144 578.4 R F2 +(optnames)2.574 E F0 .074 +(are supplied, the output is restricted to those op-)2.574 F 3.105 +(tions. The)144 590.4 R F13.105 E F0 .605(option causes output to\ + be displayed in a form that may be reused as input.)3.105 F(Other)5.605 +E(options ha)144 602.4 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F1144 614.4 Q F0(Enable \(set\) each)180 +614.4 Q F2(optname)2.5 E F0(.)A F1144 626.4 Q F0 +(Disable \(unset\) each)180 626.4 Q F2(optname)2.5 E F0(.)A F1144 +638.4 Q F0 .003(Suppresses normal output \(quiet mode\); the return sta\ +tus indicates whether the)180 638.4 R F2(optname)2.504 E F0(is)2.504 E +.256(set or unset.)180 650.4 R .256(If multiple)5.256 F F2(optname)2.756 +E F0(ar)2.756 E .256(guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G +(ith)-2.756 E F12.756 E F0 2.755(,t)C .255 +(he return status is zero if)-2.755 F(all)180 662.4 Q F2(optnames)2.5 E +F0(are enabled; non-zero otherwise.)2.5 E F1144 674.4 Q F0 +(Restricts the v)180 674.4 Q(alues of)-.25 E F2(optname)2.5 E F0 +(to be those de\214ned for the)2.5 E F12.5 E F0(option to the)2.5 +E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .624(If either)144 691.2 R F1 +3.124 E F0(or)3.124 E F13.124 E F0 .624(is used with no) +3.124 F F2(optname)3.124 E F0(ar)3.124 E(guments,)-.18 E F1(shopt)3.124 +E F0(sho)3.124 E .624(ws only those options which are)-.25 F .984 +(set or unset, respecti)144 703.2 R -.15(ve)-.25 G(ly).15 E 5.984(.U) +-.65 G .984(nless otherwise noted, the)-5.984 F F1(shopt)3.484 E F0 .983 +(options are disabled \(unset\) by de-)3.483 F -.1(fa)144 715.2 S(ult.) +.1 E(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(17)198.725 E 0 Cg EP +%%Page: 18 18 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E 1.544 +(The return status when listing options is zero if all)144 84 R/F1 10 +/Times-Italic@0 SF(optnames)4.044 E F0 1.545 +(are enabled, non-zero otherwise.)4.045 F .696 +(When setting or unsetting options, the return status is zero unless an) +144 96 R F1(optname)3.196 E F0 .696(is not a v)3.196 F .695(alid shell) +-.25 F(option.)144 108 Q(The list of)144 124.8 Q/F2 10/Times-Bold@0 SF +(shopt)2.5 E F0(options is:)2.5 E F2(assoc_expand_once)144 142.8 Q F0 +1.944(If set, the shell suppresses multiple e)184 154.8 R -.25(va)-.25 G +1.945(luation of associati).25 F 2.245 -.15(ve a)-.25 H 1.945 +(rray subscripts during).15 F .885(arithmetic e)184 166.8 R .885 +(xpression e)-.15 F -.25(va)-.25 G .885(luation, while e).25 F -.15(xe) +-.15 G .885(cuting b).15 F .885(uiltins that can perform v)-.2 F .885 +(ariable as-)-.25 F(signments, and while e)184 178.8 Q -.15(xe)-.15 G +(cuting b).15 E(uiltins that perform array dereferencing.)-.2 E F2 +(autocd)144 190.8 Q F0 .199 +(If set, a command name that is the name of a directory is e)184 190.8 R +-.15(xe)-.15 G .2(cuted as if it were the ar).15 F(gu-)-.18 E +(ment to the)184 202.8 Q F2(cd)2.5 E F0 2.5(command. This)2.5 F +(option is only used by interacti)2.5 E .3 -.15(ve s)-.25 H(hells.).15 E +F2(cdable_v)144 214.8 Q(ars)-.1 E F0 .156(If set, an ar)184 226.8 R .156 +(gument to the)-.18 F F2(cd)2.656 E F0 -.2(bu)2.656 G .155 +(iltin command that is not a directory is assumed to be the).2 F +(name of a v)184 238.8 Q(ariable whose v)-.25 E +(alue is the directory to change to.)-.25 E F2(cdspell)144 250.8 Q F0 +1.055 +(If set, minor errors in the spelling of a directory component in a)184 +250.8 R F2(cd)3.555 E F0 1.055(command will be)3.555 F 3.988 +(corrected. The)184 262.8 R 1.488(errors check)3.988 F 1.487 +(ed for are transposed characters, a missing character)-.1 F 3.987(,a) +-.4 G(nd)-3.987 E .77(one character too man)184 274.8 R 4.57 -.65(y. I) +-.15 H 3.27(fac).65 G .77 +(orrection is found, the corrected \214lename is printed, and)-3.27 F +(the command proceeds.)184 286.8 Q +(This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.) +.15 E F2(checkhash)144 298.8 Q F0 .737(If set,)184 310.8 R F2(bash)3.237 +E F0 .736(checks that a command found in the hash table e)3.237 F .736 +(xists before trying to e)-.15 F -.15(xe)-.15 G(-).15 E(cute it.)184 +322.8 Q(If a hashed command no longer e)5 E +(xists, a normal path search is performed.)-.15 E F2(checkjobs)144 334.8 +Q F0 .448(If set,)184 346.8 R F2(bash)2.948 E F0 .448 +(lists the status of an)2.948 F 2.949(ys)-.15 G .449 +(topped and running jobs before e)-2.949 F .449(xiting an interacti)-.15 +F -.15(ve)-.25 G 2.662(shell. If)184 358.8 R(an)2.662 E 2.661(yj)-.15 G +.161(obs are running, this causes the e)-2.661 F .161 +(xit to be deferred until a second e)-.15 F .161(xit is at-)-.15 F 1.472 +(tempted without an interv)184 370.8 R 1.473(ening command \(see)-.15 F +/F3 9/Times-Bold@0 SF 1.473(JOB CONTR)3.973 F(OL)-.27 E F0(abo)3.723 E +-.15(ve)-.15 G 3.973(\). The).15 F 1.473(shell al-)3.973 F -.1(wa)184 +382.8 S(ys postpones e).1 E(xiting if an)-.15 E 2.5(yj)-.15 G +(obs are stopped.)-2.5 E F2(checkwinsize)144 394.8 Q F0 1.09(If set,)184 +406.8 R F2(bash)3.59 E F0 1.09(checks the windo)3.59 F 3.59(ws)-.25 G +1.09(ize after each e)-3.59 F 1.09(xternal \(non-b)-.15 F 1.09 +(uiltin\) command and, if)-.2 F(necessary)184 418.8 Q 3.35(,u)-.65 G .85 +(pdates the v)-3.35 F .85(alues of)-.25 F F3(LINES)3.35 E F0(and)3.1 E +F3(COLUMNS)3.35 E/F4 9/Times-Roman@0 SF(.)A F0 .85 +(This option is enabled by de-)5.35 F -.1(fa)184 430.8 S(ult.).1 E F2 +(cmdhist)144 442.8 Q F0 .173(If set,)184 442.8 R F2(bash)2.673 E F0 .173 +(attempts to sa)2.673 F .473 -.15(ve a)-.2 H .172 +(ll lines of a multiple-line command in the same history en-).15 F(try) +184 454.8 Q 5.596(.T)-.65 G .597(his allo)-5.596 F .597 +(ws easy re-editing of multi-line commands.)-.25 F .597 +(This option is enabled by de-)5.597 F -.1(fa)184 466.8 S 1.288(ult, b) +.1 F 1.288(ut only has an ef)-.2 F 1.288 +(fect if command history is enabled, as described abo)-.25 F 1.587 -.15 +(ve u)-.15 H(nder).15 E F3(HIST)184 478.8 Q(OR)-.162 E(Y)-.315 E F4(.)A +F2(compat31)144 490.8 Q(compat32)144 502.8 Q(compat40)144 514.8 Q +(compat41)144 526.8 Q(compat42)144 538.8 Q(compat43)144 550.8 Q +(compat44)144 562.8 Q F0 .889(These control aspects of the shell')184 +574.8 R 3.389(sc)-.55 G .889(ompatibility mode \(see)-3.389 F F3 .889 +(SHELL COMP)3.389 F -.855(AT)-.666 G(IBILITY).855 E(MODE)184 586.8 Q F0 +(belo)2.25 E(w\).)-.25 E F2(complete_fullquote)144 603.6 Q F0 .654 +(If set,)184 615.6 R F2(bash)3.153 E F0 .653(quotes all shell metachara\ +cters in \214lenames and directory names when per)3.153 F(-)-.2 E 1.524 +(forming completion.)184 627.6 R 1.524(If not set,)6.524 F F2(bash)4.024 +E F0(remo)4.024 E -.15(ve)-.15 G 4.024(sm).15 G 1.524 +(etacharacters such as the dollar sign)-4.024 F 2.667(from the set of c\ +haracters that will be quoted in completed \214lenames when these)184 +639.6 R .028(metacharacters appear in shell v)184 651.6 R .028 +(ariable references in w)-.25 F .029(ords to be completed.)-.1 F .029 +(This means)5.029 F 1.073(that dollar signs in v)184 663.6 R 1.073 +(ariable names that e)-.25 F 1.073 +(xpand to directories will not be quoted; ho)-.15 F(w-)-.25 E -2.15 -.25 +(ev e)184 675.6 T 1.922 -.4(r, a).25 H 1.422 -.15(ny d).4 H 1.123 +(ollar signs appearing in \214lenames will not be quoted, either).15 F +6.123(.T)-.55 G 1.123(his is acti)-6.123 F -.15(ve)-.25 G .59 +(only when bash is using backslashes to quote completed \214lenames.)184 +687.6 R .59(This v)5.59 F .59(ariable is set)-.25 F(by def)184 699.6 Q +(ault, which is the def)-.1 E(ault bash beha)-.1 E(vior in v)-.2 E +(ersions through 4.2.)-.15 E(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E +(18)198.725 E 0 Cg EP +%%Page: 19 19 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF(dir)144 84 Q(expand) +-.18 E F0 .486(If set,)184 96 R F1(bash)2.986 E F0 .486 +(replaces directory names with the results of w)2.986 F .486(ord e)-.1 F +.487(xpansion when perform-)-.15 F .18(ing \214lename completion.)184 +108 R .179(This changes the contents of the readline editing b)5.18 F +(uf)-.2 E(fer)-.25 E 5.179(.I)-.55 G 2.679(fn)-5.179 G(ot)-2.679 E(set,) +184 120 Q F1(bash)2.5 E F0(attempts to preserv)2.5 E 2.5(ew)-.15 G +(hat the user typed.)-2.5 E F1(dirspell)144 136.8 Q F0 .858(If set,)184 +136.8 R F1(bash)3.358 E F0 .858 +(attempts spelling correction on directory names during w)3.358 F .859 +(ord completion if)-.1 F +(the directory name initially supplied does not e)184 148.8 Q(xist.)-.15 +E F1(dotglob)144 165.6 Q F0 .165(If set,)184 165.6 R F1(bash)2.665 E F0 +.165(includes \214lenames be)2.665 F .165(ginning with a `.)-.15 F 2.665 +('i)-.7 G 2.665(nt)-2.665 G .165(he results of pathname e)-2.665 F +(xpansion.)-.15 E(The \214lenames)184 177.6 Q F1 -.63(``)2.5 G -.55(.') +.63 G(')-.08 E F0(and)5 E F1 -.63(``)2.5 G(..).63 E -.63('')-.55 G F0 +(must al)5.63 E -.1(wa)-.1 G(ys be matched e).1 E(xplicitly)-.15 E 2.5 +(,e)-.65 G -.15(ve)-2.75 G 2.5(ni).15 G(f)-2.5 E F1(dotglob)2.5 E F0 +(is set.)2.5 E F1(execfail)144 194.4 Q F0 .516(If set, a non-interacti) +184 194.4 R .816 -.15(ve s)-.25 H .516(hell will not e).15 F .516 +(xit if it cannot e)-.15 F -.15(xe)-.15 G .517 +(cute the \214le speci\214ed as an ar).15 F(-)-.2 E(gument to the)184 +206.4 Q F1(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E(An interacti)5 +E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15 E F1(exec)2.5 E +F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 223.2 Q F0 .717 +(If set, aliases are e)184 235.2 R .717(xpanded as described abo)-.15 F +1.017 -.15(ve u)-.15 H(nder).15 E/F2 9/Times-Bold@0 SF(ALIASES)3.217 E +/F3 9/Times-Roman@0 SF(.)A F0 .716(This option is enabled)5.217 F +(by def)184 247.2 Q(ault for interacti)-.1 E .3 -.15(ve s)-.25 H(hells.) +.15 E F1(extdeb)144 264 Q(ug)-.2 E F0 .17(If set at shell in)184 276 R +-.2(vo)-.4 G .17(cation, or in a shell startup \214le, arrange to e).2 F +-.15(xe)-.15 G .17(cute the deb).15 F .17(ugger pro\214le)-.2 F 1.082 +(before the shell starts, identical to the)184 288 R F13.582 +E(ugger)-.2 E F0 3.581(option. If)3.581 F 1.081(set after in)3.581 F -.2 +(vo)-.4 G 1.081(cation, be-).2 F(ha)184 300 Q +(vior intended for use by deb)-.2 E(uggers is enabled:)-.2 E F1(1.)184 +316.8 Q F0(The)220 316.8 Q F14.25 E F0 1.75(option to the)4.25 F +F1(declar)4.251 E(e)-.18 E F0 -.2(bu)4.251 G 1.751 +(iltin displays the source \214le name and line).2 F +(number corresponding to each function name supplied as an ar)220 328.8 +Q(gument.)-.18 E F1(2.)184 345.6 Q F0 1.667(If the command run by the) +220 345.6 R F1(DEB)4.167 E(UG)-.1 E F0 1.667(trap returns a non-zero v) +4.167 F 1.667(alue, the ne)-.25 F(xt)-.15 E +(command is skipped and not e)220 357.6 Q -.15(xe)-.15 G(cuted.).15 E F1 +(3.)184 374.4 Q F0 .84(If the command run by the)220 374.4 R F1(DEB)3.34 +E(UG)-.1 E F0 .841(trap returns a v)3.341 F .841 +(alue of 2, and the shell is)-.25 F -.15(exe)220 386.4 S .488 +(cuting in a subroutine \(a shell function or a shell script e).15 F +-.15(xe)-.15 G .488(cuted by the).15 F F1(.)2.988 E F0(or)2.988 E F1 +(sour)220 398.4 Q(ce)-.18 E F0 -.2(bu)2.5 G +(iltins\), the shell simulates a call to).2 E F1 -.18(re)2.5 G(tur).18 E +(n)-.15 E F0(.)A F1(4.)184 415.2 Q F2 -.27(BA)220 415.2 S(SH_ARGC).27 E +F0(and)3.153 E F2 -.27(BA)3.403 G(SH_ARGV).27 E F0 .904 +(are updated as described in their descriptions)3.154 F(abo)220 427.2 Q +-.15(ve)-.15 G(.).15 E F1(5.)184 444 Q F0 1.637(Function tracing is ena\ +bled: command substitution, shell functions, and sub-)220 444 R +(shells in)220 456 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1 +(\()2.5 E/F4 10/Times-Italic@0 SF(command)2.5 E F1(\))2.5 E F0 +(inherit the)2.5 E F1(DEB)2.5 E(UG)-.1 E F0(and)2.5 E F1(RETURN)2.5 E F0 +(traps.)2.5 E F1(6.)184 472.8 Q F0 1.082(Error tracing is enabled: comm\ +and substitution, shell functions, and subshells)220 472.8 R(in)220 +484.8 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E F4 +(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1(ERR)2.5 E F0(trap.) +2.5 E F1(extglob)144 501.6 Q F0 .4(If set, the e)184 501.6 R .4 +(xtended pattern matching features described abo)-.15 F .7 -.15(ve u) +-.15 H(nder).15 E F1 -.1(Pa)2.9 G .4(thname Expan-).1 F(sion)184 513.6 Q +F0(are enabled.)2.5 E F1(extquote)144 530.4 Q F0 .86(If set,)184 542.4 R +F1($)3.36 E F0<08>A F4(string)A F0 3.36<0861>C(nd)-3.36 E F1($)3.36 E F0 +(")A F4(string)A F0 3.36("q)C .86(uoting is performed within)-3.36 F F1 +(${)3.36 E F4(par)A(ameter)-.15 E F1(})A F0 -.15(ex)3.36 G .86 +(pansions en-).15 F(closed in double quotes.)184 554.4 Q +(This option is enabled by def)5 E(ault.)-.1 E F1(failglob)144 571.2 Q +F0 .243(If set, patterns which f)184 571.2 R .243 +(ail to match \214lenames during pathname e)-.1 F .243 +(xpansion result in an e)-.15 F(x-)-.15 E(pansion error)184 583.2 Q(.) +-.55 E F1 -.25(fo)144 600 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F0 +.936(If set, the suf)184 612 R<8c78>-.25 E .936(es speci\214ed by the) +-.15 F F2(FIGNORE)3.436 E F0 .936(shell v)3.186 F .936(ariable cause w) +-.25 F .937(ords to be ignored)-.1 F .32(when performing w)184 624 R .32 +(ord completion e)-.1 F -.15(ve)-.25 G 2.82(ni).15 G 2.82(ft)-2.82 G .32 +(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 2.947 +(pletions. See)184 636 R F2 .447(SHELL V)2.947 F(ARIABLES)-1.215 E F0 +(abo)2.697 E .747 -.15(ve f)-.15 H .448(or a description of).15 F F2 +(FIGNORE)2.948 E F3(.)A F0 .448(This option is)4.948 F(enabled by def) +184 648 Q(ault.)-.1 E F1(globasciiranges)144 664.8 Q F0 2.519 +(If set, range e)184 676.8 R 2.519 +(xpressions used in pattern matching brack)-.15 F 2.518(et e)-.1 F 2.518 +(xpressions \(see)-.15 F F2 -.09(Pa)5.018 G(tter).09 E(n)-.135 E +(Matching)184 688.8 Q F0(abo)2.964 E -.15(ve)-.15 G 3.214(\)b).15 G(eha) +-3.214 E 1.014 -.15(ve a)-.2 H 3.214(si).15 G 3.214(fi)-3.214 G 3.214 +(nt)-3.214 G .714(he traditional C locale when performing comparisons.) +-3.214 F 1.02(That is, the current locale')184 700.8 R 3.52(sc)-.55 G +1.02(ollating sequence is not tak)-3.52 F 1.02(en into account, so)-.1 F +F1(b)3.52 E F0 1.02(will not)3.52 F .956(collate between)184 712.8 R F1 +(A)3.456 E F0(and)3.456 E F1(B)3.456 E F0 3.457(,a)C .957(nd upper) +-3.457 F .957(-case and lo)-.2 F(wer)-.25 E .957 +(-case ASCII characters will collate)-.2 F(together)184 724.8 Q(.)-.55 E +(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(19)198.725 E 0 Cg EP +%%Page: 20 20 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF(globstar)144 84 Q F0 +.519(If set, the pattern)184 84 R F1(**)3.019 E F0 .519 +(used in a pathname e)3.019 F .519(xpansion conte)-.15 F .518 +(xt will match all \214les and zero)-.15 F .431 +(or more directories and subdirectories.)184 96 R .431 +(If the pattern is follo)5.431 F .432(wed by a)-.25 F F1(/)2.932 E F0 +2.932(,o)C .432(nly directories)-2.932 F(and subdirectories match.)184 +108 Q F1(gnu_errfmt)144 124.8 Q F0(If set, shell error messages are wri\ +tten in the standard GNU error message format.)184 136.8 Q F1 +(histappend)144 153.6 Q F0 .676 +(If set, the history list is appended to the \214le named by the v)184 +165.6 R .676(alue of the)-.25 F/F2 9/Times-Bold@0 SF(HISTFILE)3.176 E F0 +-.25(va)2.926 G(ri-).25 E(able when the shell e)184 177.6 Q +(xits, rather than o)-.15 E -.15(ve)-.15 G(rwriting the \214le.).15 E F1 +(histr)144 194.4 Q(eedit)-.18 E F0 .575(If set, and)184 206.4 R F1 -.18 +(re)3.075 G(adline).18 E F0 .575(is being used, a user is gi)3.075 F +-.15(ve)-.25 G 3.075(nt).15 G .576(he opportunity to re-edit a f)-3.075 +F .576(ailed his-)-.1 F(tory substitution.)184 218.4 Q F1(histv)144 +235.2 Q(erify)-.1 E F0 .403(If set, and)184 247.2 R F1 -.18(re)2.903 G +(adline).18 E F0 .403 +(is being used, the results of history substitution are not immediately) +2.903 F .661(passed to the shell parser)184 259.2 R 5.661(.I)-.55 G .662 +(nstead, the resulting line is loaded into the)-5.661 F F1 -.18(re)3.162 +G(adline).18 E F0(editing)3.162 E -.2(bu)184 271.2 S -.25(ff).2 G(er).25 +E 2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1 +(hostcomplete)144 288 Q F0 1.182(If set, and)184 300 R F1 -.18(re)3.682 +G(adline).18 E F0 1.182(is being used,)3.682 F F1(bash)3.682 E F0 1.181 +(will attempt to perform hostname completion)3.681 F 1.38(when a w)184 +312 R 1.38(ord containing a)-.1 F F1(@)3.881 E F0 1.381 +(is being completed \(see)3.881 F F1(Completing)3.881 E F0(under)3.881 E +F2(READLINE)3.881 E F0(abo)184 324 Q -.15(ve)-.15 G 2.5(\). This).15 F +(is enabled by def)2.5 E(ault.)-.1 E F1(huponexit)144 340.8 Q F0 +(If set,)184 352.8 Q F1(bash)2.5 E F0(will send)2.5 E F2(SIGHUP)2.5 E F0 +(to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H(ogin shell e) +.15 E(xits.)-.15 E F1(inherit_err)144 369.6 Q(exit)-.18 E F0 .22 +(If set, command substitution inherits the v)184 381.6 R .219 +(alue of the)-.25 F F1(err)2.719 E(exit)-.18 E F0 .219 +(option, instead of unsetting)2.719 F(it in the subshell en)184 393.6 Q +2.5(vironment. This)-.4 F(option is enabled when)2.5 E/F3 10 +/Times-Italic@0 SF(posix mode)2.5 E F0(is enabled.)2.5 E F1(interacti) +144 410.4 Q -.1(ve)-.1 G(_comments).1 E F0 .33(If set, allo)184 422.4 R +2.83(waw)-.25 G .33(ord be)-2.93 F .33(ginning with)-.15 F F1(#)2.83 E +F0 .33(to cause that w)2.83 F .33(ord and all remaining characters on) +-.1 F .967(that line to be ignored in an interacti)184 434.4 R 1.267 +-.15(ve s)-.25 H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 +E -.15(ve)-.15 G 3.467(\). This).15 F .967(option is)3.467 F +(enabled by def)184 446.4 Q(ault.)-.1 E F1(lastpipe)144 463.2 Q F0 .066 +(If set, and job control is not acti)184 463.2 R -.15(ve)-.25 G 2.566 +(,t).15 G .066(he shell runs the last command of a pipeline not e)-2.566 +F -.15(xe)-.15 G(-).15 E +(cuted in the background in the current shell en)184 475.2 Q(vironment.) +-.4 E F1(lithist)144 492 Q F0 .655(If set, and the)184 492 R F1(cmdhist) +3.155 E F0 .654(option is enabled, multi-line commands are sa)3.154 F +-.15(ve)-.2 G 3.154(dt).15 G 3.154(ot)-3.154 G .654(he history)-3.154 F +(with embedded ne)184 504 Q +(wlines rather than using semicolon separators where possible.)-.25 E F1 +(localv)144 520.8 Q(ar_inherit)-.1 E F0 .421(If set, local v)184 532.8 R +.422(ariables inherit the v)-.25 F .422(alue and attrib)-.25 F .422 +(utes of a v)-.2 F .422(ariable of the same name that)-.25 F -.15(ex)184 +544.8 S .174(ists at a pre).15 F .174(vious scope before an)-.25 F 2.673 +(yn)-.15 G .673 -.25(ew va)-2.673 H .173(lue is assigned.).25 F .173 +(The nameref attrib)5.173 F .173(ute is not)-.2 F(inherited.)184 556.8 Q +F1(localv)144 573.6 Q(ar_unset)-.1 E F0 .328(If set, calling)184 585.6 R +F1(unset)2.828 E F0 .328(on local v)2.828 F .329(ariables in pre)-.25 F +.329(vious function scopes marks them so subse-)-.25 F .543(quent looku\ +ps \214nd them unset until that function returns. This is identical to \ +the beha)184 597.6 R(v-)-.2 E(ior of unsetting local v)184 609.6 Q +(ariables at the current function scope.)-.25 E F1(login_shell)144 626.4 +Q F0 .486 +(The shell sets this option if it is started as a login shell \(see)184 +638.4 R F2(INV)2.987 E(OCA)-.405 E(TION)-.855 E F0(abo)2.737 E -.15(ve) +-.15 G 2.987(\). The).15 F -.25(va)184 650.4 S(lue may not be changed.) +.25 E F1(mailwar)144 667.2 Q(n)-.15 E F0 .815(If set, and a \214le that) +184 679.2 R F1(bash)3.315 E F0 .814 +(is checking for mail has been accessed since the last time it)3.315 F +-.1(wa)184 691.2 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E +(`The mail in)-.74 E F3(mail\214le)2.5 E F0(has been read')2.5 E 2.5('i) +-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E(GNU Bash 5.0)72 768 Q(2004 Apr 20) +149.565 E(20)198.725 E 0 Cg EP +%%Page: 21 21 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF +(no_empty_cmd_completion)144 84 Q F0 .324(If set, and)184 96 R F1 -.18 +(re)2.824 G(adline).18 E F0 .324(is being used,)2.824 F F1(bash)2.824 E +F0 .324(will not attempt to search the)2.824 F/F2 9/Times-Bold@0 SF +-.666(PA)2.825 G(TH)-.189 E F0 .325(for possible)2.575 F +(completions when completion is attempted on an empty line.)184 108 Q F1 +(nocaseglob)144 124.8 Q F0 .437(If set,)184 136.8 R F1(bash)2.937 E F0 +.436(matches \214lenames in a case\255insensiti)2.937 F .736 -.15(ve f) +-.25 H .436(ashion when performing pathname).05 F -.15(ex)184 148.8 S +(pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E +-.15(ve)-.15 G(\).).15 E F1(nocasematch)144 165.6 Q F0 1.193(If set,)184 +177.6 R F1(bash)3.693 E F0 1.194 +(matches patterns in a case\255insensiti)3.693 F 1.494 -.15(ve f)-.25 H +1.194(ashion when performing matching).05 F .551(while e)184 189.6 R +-.15(xe)-.15 G(cuting).15 E F1(case)3.051 E F0(or)3.051 E F1([[)3.051 E +F0 .551(conditional commands, when performing pattern substitution)3.051 +F -.1(wo)184 201.6 S .622(rd e).1 F .623(xpansions, or when \214ltering\ + possible completions as part of programmable com-)-.15 F(pletion.)184 +213.6 Q F1(nullglob)144 230.4 Q F0 .855(If set,)184 242.4 R F1(bash) +3.355 E F0(allo)3.355 E .855(ws patterns which match no \214les \(see) +-.25 F F1 -.1(Pa)3.354 G .854(thname Expansion).1 F F0(abo)3.354 E -.15 +(ve)-.15 G 3.354(\)t).15 G(o)-3.354 E -.15(ex)184 254.4 S +(pand to a null string, rather than themselv).15 E(es.)-.15 E F1(pr)144 +271.2 Q(ogcomp)-.18 E F0 .676(If set, the programmable completion f)184 +283.2 R .677(acilities \(see)-.1 F F1(Pr)3.177 E .677 +(ogrammable Completion)-.18 F F0(abo)3.177 E -.15(ve)-.15 G(\)).15 E +(are enabled.)184 295.2 Q(This option is enabled by def)5 E(ault.)-.1 E +F1(pr)144 312 Q(ogcomp_alias)-.18 E F0 2.124 +(If set, and programmable completion is enabled,)184 324 R F1(bash)4.624 +E F0 2.124(treats a command name that)4.624 F(doesn')184 336 Q 3.288(th) +-.18 G -2.25 -.2(av e)-3.288 H(an)3.488 E 3.288(yc)-.15 G .789 +(ompletions as a possible alias and attempts alias e)-3.288 F .789 +(xpansion. If it has)-.15 F 1.473(an alias,)184 348 R F1(bash)3.973 E F0 +1.473(attempts programmable completion using the command w)3.973 F 1.473 +(ord resulting)-.1 F(from the e)184 360 Q(xpanded alias.)-.15 E F1(pr) +144 376.8 Q(omptv)-.18 E(ars)-.1 E F0 1.447 +(If set, prompt strings under)184 388.8 R 1.448(go parameter e)-.18 F +1.448(xpansion, command substitution, arithmetic)-.15 F -.15(ex)184 +400.8 S .171(pansion, and quote remo).15 F -.25(va)-.15 G 2.67(la).25 G +.17(fter being e)-2.67 F .17(xpanded as described in)-.15 F F2(PR)2.67 E +(OMPTING)-.27 E F0(abo)2.42 E -.15(ve)-.15 G(.).15 E +(This option is enabled by def)184 412.8 Q(ault.)-.1 E F1 -.18(re)144 +429.6 S(stricted_shell).18 E F0 1.069 +(The shell sets this option if it is started in restricted mode \(see) +184 441.6 R F2 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 453.6 Q 2.86 +(w\). The)-.25 F -.25(va)2.86 G .36(lue may not be changed.).25 F .36 +(This is not reset when the startup \214les are e)5.36 F -.15(xe)-.15 G +(-).15 E(cuted, allo)184 465.6 Q(wing the startup \214les to disco)-.25 +E -.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 +E F1(shift_v)144 482.4 Q(erbose)-.1 E F0 .501(If set, the)184 494.4 R F1 +(shift)3.001 E F0 -.2(bu)3.001 G .501 +(iltin prints an error message when the shift count e).2 F .502 +(xceeds the number)-.15 F(of positional parameters.)184 506.4 Q F1(sour) +144 523.2 Q(cepath)-.18 E F0 .771(If set, the)184 535.2 R F1(sour)3.271 +E(ce)-.18 E F0(\()3.271 E F1(.)A F0 3.271(\)b)C .771(uiltin uses the v) +-3.471 F .771(alue of)-.25 F F2 -.666(PA)3.27 G(TH)-.189 E F0 .77 +(to \214nd the directory containing the)3.02 F(\214le supplied as an ar) +184 547.2 Q 2.5(gument. This)-.18 F(option is enabled by def)2.5 E +(ault.)-.1 E F1(xpg_echo)144 564 Q F0(If set, the)184 576 Q F1(echo)2.5 +E F0 -.2(bu)2.5 G(iltin e).2 E(xpands backslash-escape sequences by def) +-.15 E(ault.)-.1 E F1(suspend)108 592.8 Q F0([)2.5 E F1A F0(])A +1.001(Suspend the e)144 604.8 R -.15(xe)-.15 G 1.001 +(cution of this shell until it recei).15 F -.15(ve)-.25 G 3.501(sa).15 G +F2(SIGCONT)A F0 3.502(signal. A)3.252 F 1.002(login shell cannot be) +3.502 F .023(suspended; the)144 616.8 R F12.523 E F0 .023 +(option can be used to o)2.523 F -.15(ve)-.15 G .022 +(rride this and force the suspension.).15 F .022(The return status is) +5.022 F 2.5(0u)144 628.8 S(nless the shell is a login shell and)-2.5 E +F12.5 E F0(is not supplied, or if job control is not enabled.)2.5 +E F1(test)108 645.6 Q/F3 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E F1([) +108 657.6 Q F3 -.2(ex)2.5 G(pr).2 E F1(])2.5 E F0 .877 +(Return a status of 0 \(true\) or 1 \(f)144 657.6 R .878 +(alse\) depending on the e)-.1 F -.25(va)-.25 G .878 +(luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex)144 669.6 +S(pr).2 E F0 5.53(.E).73 G .53 +(ach operator and operand must be a separate ar)-5.53 F 3.03 +(gument. Expressions)-.18 F .53(are composed of the)3.03 F .072 +(primaries described in the)144 681.6 R F1(bash)2.573 E F0 .073 +(manual page under)2.573 F F2(CONDITION)2.573 E .073(AL EXPRESSIONS)-.18 +F/F4 9/Times-Roman@0 SF(.)A F1(test)4.573 E F0 .073(does not)2.573 F +.695(accept an)144 693.6 R 3.195(yo)-.15 G .695 +(ptions, nor does it accept and ignore an ar)-3.195 F .694(gument of) +-.18 F F13.194 E F0 .694(as signifying the end of op-)3.194 F +(tions.)144 705.6 Q 3.141(Expressions may be combined using the follo) +144 723.6 R 3.141(wing operators, listed in decreasing order of)-.25 F +(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(21)198.725 E 0 Cg EP +%%Page: 22 22 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E 4.114(precedence. The)144 84 R -.25(eva) +4.114 G 1.613(luation depends on the number of ar).25 F 1.613 +(guments; see belo)-.18 F 5.413 -.65(w. O)-.25 H 1.613(perator prece-) +.65 F(dence is used when there are \214v)144 96 Q 2.5(eo)-.15 G 2.5(rm) +-2.5 G(ore ar)-2.5 E(guments.)-.18 E/F1 10/Times-Bold@0 SF(!)144 108 Q +/F2 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E F0 -.35(Tr)180 108 S +(ue if).35 E F2 -.2(ex)2.5 G(pr).2 E F0(is f)3.23 E(alse.)-.1 E F1(\() +144 120 Q F2 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0 .26(Returns the v)180 +120 R .26(alue of)-.25 F F2 -.2(ex)2.76 G(pr).2 E F0 5.26(.T)C .26 +(his may be used to o)-5.26 F -.15(ve)-.15 G .26 +(rride the normal precedence of opera-).15 F(tors.)180 132 Q F2 -.2(ex) +144 144 S(pr1).2 E F02.5 E F1(a)A F2 -.2(ex)2.5 G(pr2).2 E F0 -.35 +(Tr)180 156 S(ue if both).35 E F2 -.2(ex)2.5 G(pr1).2 E F0(and)2.5 E F2 +-.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E F2 -.2(ex)144 168 S(pr1).2 E +F02.5 E F1(o)A F2 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180 180 S +(ue if either).35 E F2 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F2 -.2(ex)2.5 G +(pr2).2 E F0(is true.)2.52 E F1(test)144 196.8 Q F0(and)2.5 E F1([)2.5 E +F0 -.25(eva)2.5 G(luate conditional e).25 E +(xpressions using a set of rules based on the number of ar)-.15 E +(guments.)-.18 E 2.5(0a)144 214.8 S -.18(rg)-2.5 G(uments).18 E(The e) +180 226.8 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 238.8 S -.18 +(rg)-2.5 G(ument).18 E(The e)180 250.8 Q +(xpression is true if and only if the ar)-.15 E(gument is not null.)-.18 +E 2.5(2a)144 262.8 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar) +180 274.8 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87 +F .37(xpression is true if and only if the second ar)-.15 F .37 +(gument is null.)-.18 F .379(If the \214rst ar)180 286.8 R .38 +(gument is one of the unary conditional operators listed abo)-.18 F .68 +-.15(ve u)-.15 H(nder).15 E/F3 9/Times-Bold@0 SF(CONDI-)2.88 E(TION)180 +298.8 Q .553(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(,)A F0 .552 +(the e)2.802 F .552(xpression is true if the unary test is true.)-.15 F +.552(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 310.8 Q +(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E +(xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 322.8 S -.18(rg)-2.5 G +(uments).18 E .236(The follo)180 334.8 R .236 +(wing conditions are applied in the order listed.)-.25 F .236 +(If the second ar)5.236 F .236(gument is one of)-.18 F .855 +(the binary conditional operators listed abo)180 346.8 R 1.155 -.15 +(ve u)-.15 H(nder).15 E F3(CONDITION)3.355 E .855(AL EXPRESSIONS)-.18 F +F4(,)A F0(the)3.104 E .578(result of the e)180 358.8 R .578(xpression i\ +s the result of the binary test using the \214rst and third ar)-.15 F +(guments)-.18 E 1.333(as operands.)180 370.8 R(The)6.333 E F13.833 +E F0(and)3.833 E F13.832 E F0 1.332 +(operators are considered binary operators when there are)3.832 F .558 +(three ar)180 382.8 R 3.058(guments. If)-.18 F .558(the \214rst ar)3.058 +F .558(gument is)-.18 F F1(!)3.058 E F0 3.058(,t)C .558(he v)-3.058 F +.558(alue is the ne)-.25 F -.05(ga)-.15 G .558(tion of the tw).05 F +(o-ar)-.1 E(gument)-.18 E .521(test using the second and third ar)180 +394.8 R 3.021(guments. If)-.18 F .521(the \214rst ar)3.021 F .52 +(gument is e)-.18 F(xactly)-.15 E F1(\()3.02 E F0 .52(and the third)3.02 +F(ar)180 406.8 Q .485(gument is e)-.18 F(xactly)-.15 E F1(\))2.985 E F0 +2.985(,t)C .485(he result is the one-ar)-2.985 F .485 +(gument test of the second ar)-.18 F 2.985(gument. Other)-.18 F(-)-.2 E +(wise, the e)180 418.8 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(4a)144 +430.8 S -.18(rg)-2.5 G(uments).18 E .385(If the \214rst ar)180 442.8 R +.385(gument is)-.18 F F1(!)2.885 E F0 2.885(,t)C .385 +(he result is the ne)-2.885 F -.05(ga)-.15 G .384(tion of the three-ar) +.05 F .384(gument e)-.18 F .384(xpression com-)-.15 F .284 +(posed of the remaining ar)180 454.8 R 2.784(guments. Otherwise,)-.18 F +.284(the e)2.784 F .284(xpression is parsed and e)-.15 F -.25(va)-.25 G +.285(luated ac-).25 F(cording to precedence using the rules listed abo) +180 466.8 Q -.15(ve)-.15 G(.).15 E 2.5(5o)144 478.8 S 2.5(rm)-2.5 G +(ore ar)-2.5 E(guments)-.18 E 1.635(The e)180 490.8 R 1.635 +(xpression is parsed and e)-.15 F -.25(va)-.25 G 1.635 +(luated according to precedence using the rules listed).25 F(abo)180 +502.8 Q -.15(ve)-.15 G(.).15 E(When used with)144 520.8 Q F1(test)2.5 E +F0(or)2.5 E F1([)2.5 E F0 2.5(,t)C(he)-2.5 E F1(<)2.5 E F0(and)2.5 E F1 +(>)2.5 E F0(operators sort le)2.5 E +(xicographically using ASCII ordering.)-.15 E F1(times)108 537.6 Q F0 +1.229(Print the accumulated user and system times for the shell and for\ + processes run from the shell.)144 537.6 R(The return status is 0.)144 +549.6 Q F1(trap)108 566.4 Q F0([)2.5 E F1(\255lp)A F0 2.5(][)C([)-2.5 E +F2(ar)A(g)-.37 E F0(])A F2(sigspec)2.5 E F0(...])2.5 E .683(The command) +144 578.4 R F2(ar)3.513 E(g)-.37 E F0 .683(is to be read and e)3.403 F +-.15(xe)-.15 G .682(cuted when the shell recei).15 F -.15(ve)-.25 G +3.182(ss).15 G(ignal\(s\))-3.182 E F2(sigspec)3.522 E F0 5.682(.I).31 G +(f)-5.682 E F2(ar)3.512 E(g)-.37 E F0(is)3.402 E .608 +(absent \(and there is a single)144 590.4 R F2(sigspec)3.108 E F0 3.108 +(\)o)C(r)-3.108 E F13.108 E F0 3.108(,e)C .608 +(ach speci\214ed signal is reset to its original disposition)-3.108 F +.659(\(the v)144 602.4 R .659(alue it had upon entrance to the shell\).) +-.25 F(If)5.658 E F2(ar)3.488 E(g)-.37 E F0 .658 +(is the null string the signal speci\214ed by each)3.378 F F2(sigspec) +144.34 614.4 Q F0 .58(is ignored by the shell and by the commands it in) +3.39 F -.2(vo)-.4 G -.1(ke).2 G 3.081(s. If).1 F F2(ar)3.411 E(g)-.37 E +F0 .581(is not present and)3.301 F F13.081 E F0(has)3.081 E 1.215 +(been supplied, then the trap commands associated with each)144 626.4 R +F2(sigspec)4.054 E F0 1.214(are displayed.)4.024 F 1.214(If no ar)6.214 +F(gu-)-.18 E .86(ments are supplied or if only)144 638.4 R F13.36 +E F0 .86(is gi)3.36 F -.15(ve)-.25 G(n,).15 E F1(trap)3.36 E F0 .86 +(prints the list of commands associated with each)3.36 F 2.83 +(signal. The)144 650.4 R F12.83 E F0 .33(option causes the shell \ +to print a list of signal names and their corresponding num-)2.83 F 4.31 +(bers. Each)144 662.4 R F2(sigspec)4.65 E F0 1.811 +(is either a signal name de\214ned in <)4.62 F F2(signal.h)A F0 1.811 +(>, or a signal number)B 6.811(.S)-.55 G(ignal)-6.811 E +(names are case insensiti)144 674.4 Q .3 -.15(ve a)-.25 H(nd the).15 E +F3(SIG)2.5 E F0(pre\214x is optional.)2.25 E .667(If a)144 692.4 R F2 +(sigspec)3.507 E F0(is)3.477 E F3(EXIT)3.167 E F0 .667 +(\(0\) the command)2.917 F F2(ar)3.496 E(g)-.37 E F0 .666(is e)3.386 F +-.15(xe)-.15 G .666(cuted on e).15 F .666(xit from the shell.)-.15 F +.666(If a)5.666 F F2(sigspec)3.506 E F0(is)3.476 E F3(DE-)3.166 E -.09 +(BU)144 704.4 S(G).09 E F4(,)A F0 .483(the command)2.733 F F2(ar)3.313 E +(g)-.37 E F0 .483(is e)3.203 F -.15(xe)-.15 G .484(cuted before e).15 F +-.15(ve)-.25 G(ry).15 E F2 .484(simple command)2.984 F F0(,)A F2(for) +2.984 E F0(command,)2.984 E F2(case)2.984 E F0(command,)2.984 E F2 +(select)144 716.4 Q F0 .563(command, e)3.063 F -.15(ve)-.25 G .563 +(ry arithmetic).15 F F2(for)3.063 E F0 .563 +(command, and before the \214rst command e)3.063 F -.15(xe)-.15 G .562 +(cutes in a shell).15 F .622(function \(see)144 728.4 R F3 .622 +(SHELL GRAMMAR)3.122 F F0(abo)2.872 E -.15(ve)-.15 G 3.122(\). Refer).15 +F .622(to the description of the)3.122 F F1(extdeb)3.122 E(ug)-.2 E F0 +.622(option to the)3.122 F(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E +(22)198.725 E 0 Cg EP +%%Page: 23 23 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF(shopt)144 84 Q F0 -.2 +(bu)2.996 G .496(iltin for details of its ef).2 F .496(fect on the)-.25 +F F1(DEB)2.996 E(UG)-.1 E F0 2.996(trap. If)2.996 F(a)2.996 E/F2 10 +/Times-Italic@0 SF(sigspec)3.336 E F0(is)3.306 E/F3 9/Times-Bold@0 SF +(RETURN)2.996 E/F4 9/Times-Roman@0 SF(,)A F0 .496(the command)2.746 F F2 +(ar)144.33 96 Q(g)-.37 E F0 .18(is e)2.9 F -.15(xe)-.15 G .18 +(cuted each time a shell function or a script e).15 F -.15(xe)-.15 G .18 +(cuted with the).15 F F1(.)2.68 E F0(or)2.68 E F1(sour)2.68 E(ce)-.18 E +F0 -.2(bu)2.68 G .18(iltins \214nishes).2 F -.15(exe)144 108 S(cuting.) +.15 E .961(If a)144 126 R F2(sigspec)3.801 E F0(is)3.771 E F3(ERR)3.461 +E F4(,)A F0 .961(the command)3.211 F F2(ar)3.791 E(g)-.37 E F0 .961 +(is e)3.681 F -.15(xe)-.15 G .961(cuted whene).15 F -.15(ve)-.25 G 3.461 +(ra).15 G .96(pipeline \(which may consist of a)-.001 F .185(single sim\ +ple command\), a list, or a compound command returns a non\255zero e)144 +138 R .185(xit status, subject to)-.15 F .452(the follo)144 150 R .452 +(wing conditions.)-.25 F(The)5.452 E F3(ERR)2.952 E F0 .451 +(trap is not e)2.701 F -.15(xe)-.15 G .451(cuted if the f).15 F .451 +(ailed command is part of the com-)-.1 F .387 +(mand list immediately follo)144 162 R .387(wing a)-.25 F F1(while)2.887 +E F0(or)2.887 E F1(until)2.888 E F0 -.1(ke)2.888 G(yw)-.05 E .388 +(ord, part of the test in an)-.1 F F2(if)2.898 E F0 .388 +(statement, part)4.848 F .778(of a command e)144 174 R -.15(xe)-.15 G +.778(cuted in a).15 F F1(&&)3.278 E F0(or)3.278 E F1(||)3.278 E F0 .778 +(list e)3.278 F .778(xcept the command follo)-.15 F .778 +(wing the \214nal)-.25 F F1(&&)3.278 E F0(or)3.278 E F1(||)3.277 E F0 +3.277(,a)C -.15(ny)-3.277 G 1.28(command in a pipeline b)144 186 R 1.28 +(ut the last, or if the command')-.2 F 3.78(sr)-.55 G 1.28(eturn v)-3.78 +F 1.28(alue is being in)-.25 F -.15(ve)-.4 G 1.28(rted using).15 F F1(!) +3.78 E F0(.)A(These are the same conditions obe)144 198 Q(yed by the) +-.15 E F1(err)2.5 E(exit)-.18 E F0(\()2.5 E F1A F0 2.5(\)o)C +(ption.)-2.5 E .133 +(Signals ignored upon entry to the shell cannot be trapped or reset.)144 +216 R -.35(Tr)5.132 G .132(apped signals that are not be-).35 F .117 +(ing ignored are reset to their original v)144 228 R .117 +(alues in a subshell or subshell en)-.25 F .117 +(vironment when one is cre-)-.4 F 2.5(ated. The)144 240 R +(return status is f)2.5 E(alse if an)-.1 E(y)-.15 E F2(sigspec)2.84 E F0 +(is in)2.81 E -.25(va)-.4 G(lid; otherwise).25 E F1(trap)2.5 E F0 +(returns true.)2.5 E F1(type)108 256.8 Q F0([)2.5 E F1(\255aftpP)A F0(]) +A F2(name)2.5 E F0([)2.5 E F2(name)A F0(...])2.5 E -.4(Wi)144 268.8 S +.174(th no options, indicate ho).4 F 2.674(we)-.25 G(ach)-2.674 E F2 +(name)3.034 E F0 -.1(wo)2.854 G .173 +(uld be interpreted if used as a command name.).1 F .173(If the)5.173 F +F1144 280.8 Q F0 .715(option is used,)3.215 F F1(type)3.215 E F0 +.715(prints a string which is one of)3.215 F F2(alias)3.545 E F0(,).27 E +F2 -.1(ke)3.215 G(ywor)-.2 E(d)-.37 E F0(,).77 E F2(function)5.185 E F0 +(,).24 E F2 -.2(bu)3.215 G(iltin).2 E F0 3.215(,o).24 G(r)-3.215 E F2 +(\214le)5.125 E F0(if)3.395 E F2(name)144.36 292.8 Q F0 .087 +(is an alias, shell reserv)2.767 F .087(ed w)-.15 F .087 +(ord, function, b)-.1 F .086(uiltin, or disk \214le, respecti)-.2 F -.15 +(ve)-.25 G(ly).15 E 5.086(.I)-.65 G 2.586(ft)-5.086 G(he)-2.586 E F2 +(name)2.946 E F0 .086(is not)2.766 F .118 +(found, then nothing is printed, and an e)144 304.8 R .118 +(xit status of f)-.15 F .118(alse is returned.)-.1 F .119(If the)5.119 F +F12.619 E F0 .119(option is used,)2.619 F F1(type)2.619 E F0 .855 +(either returns the name of the disk \214le that w)144 316.8 R .855 +(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F2(name)3.715 E F0 +.855(were speci\214ed as a com-)3.535 F .528(mand name, or nothing if) +144 328.8 R/F5 10/Courier@0 SF .528(type -t name)3.028 F F0 -.1(wo)3.028 +G .528(uld not return).1 F F2(\214le)4.938 E F0 5.528(.T).18 G(he)-5.528 +E F13.028 E F0 .529(option forces a)3.028 F F3 -.666(PA)3.029 G +(TH)-.189 E F0 .007(search for each)144 340.8 R F2(name)2.507 E F0 2.507 +(,e)C -.15(ve)-2.757 G 2.507(ni).15 G(f)-2.507 E F5 .007(type -t name) +2.507 F F0 -.1(wo)2.507 G .007(uld not return).1 F F2(\214le)4.417 E F0 +5.006(.I).18 G 2.506(fac)-5.006 G .006(ommand is hashed,)-2.506 F F1 +2.506 E F0(and)144 352.8 Q F13.23 E F0 .73 +(print the hashed v)3.23 F .731 +(alue, which is not necessarily the \214le that appears \214rst in)-.25 +F F3 -.666(PA)3.231 G(TH)-.189 E F4(.)A F0 .731(If the)5.231 F F1 +144 364.8 Q F0 .824(option is used,)3.324 F F1(type)3.324 E F0 .824 +(prints all of the places that contain an e)3.324 F -.15(xe)-.15 G .823 +(cutable named).15 F F2(name)3.683 E F0 5.823(.T).18 G .823(his in-) +-5.823 F 1.176(cludes aliases and functions, if and only if the)144 +376.8 R F13.676 E F0 1.176(option is not also used.)3.676 F 1.177 +(The table of hashed)6.176 F 1.223(commands is not consulted when using) +144 388.8 R F13.723 E F0 6.223(.T)C(he)-6.223 E F13.723 E F0 +1.223(option suppresses shell function lookup, as)3.723 F .325(with the) +144 400.8 R F1(command)2.825 E F0 -.2(bu)2.825 G(iltin.).2 E F1(type) +5.325 E F0 .325(returns true if all of the ar)2.825 F .326 +(guments are found, f)-.18 F .326(alse if an)-.1 F 2.826(ya)-.15 G .326 +(re not)-2.826 F(found.)144 412.8 Q F1(ulimit)108 429.6 Q F0([)2.5 E F1 +(\255HS)A F0(])A F12.5 E(ulimit)108 441.6 Q F0([)2.5 E F1(\255HS)A +F0 2.5(][)C F1(\255bcde\214klmnpqrstuvxPR)-2.5 E(T)-.4 E F0([)2.5 E F2 +(limit)A F0(]])A(Pro)144 453.6 Q .244(vides control o)-.15 F -.15(ve) +-.15 G 2.744(rt).15 G .244(he resources a)-2.744 F -.25(va)-.2 G .244 +(ilable to the shell and to processes started by it, on systems).25 F +.943(that allo)144 465.6 R 3.443(ws)-.25 G .943(uch control.)-3.443 F +(The)5.943 E F13.443 E F0(and)3.443 E F13.444 E F0 .944 +(options specify that the hard or soft limit is set for the)3.444 F(gi) +144 477.6 Q -.15(ve)-.25 G 2.709(nr).15 G 2.709(esource. A)-2.709 F .208 +(hard limit cannot be increased by a non-root user once it is set; a so\ +ft limit may)2.709 F .425(be increased up to the v)144 489.6 R .425 +(alue of the hard limit.)-.25 F .426(If neither)5.425 F F12.926 E +F0(nor)2.926 E F12.926 E F0 .426 +(is speci\214ed, both the soft and)2.926 F .139(hard limits are set.)144 +501.6 R .139(The v)5.139 F .139(alue of)-.25 F F2(limit)2.729 E F0 .139 +(can be a number in the unit speci\214ed for the resource or one)3.319 F +.741(of the special v)144 513.6 R(alues)-.25 E F1(hard)3.241 E F0(,)A F1 +(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F1(unlimited)3.241 E F0 3.241(,w) +C .741(hich stand for the current hard limit, the current)-3.241 F .024 +(soft limit, and no limit, respecti)144 525.6 R -.15(ve)-.25 G(ly).15 E +5.023(.I)-.65 G(f)-5.023 E F2(limit)2.613 E F0 .023 +(is omitted, the current v)3.203 F .023 +(alue of the soft limit of the re-)-.25 F .984 +(source is printed, unless the)144 537.6 R F13.484 E F0 .984 +(option is gi)3.484 F -.15(ve)-.25 G 3.484(n. When).15 F .985 +(more than one resource is speci\214ed, the)3.484 F .7 +(limit name and unit, if appropriate, are printed before the v)144 549.6 +R 3.2(alue. Other)-.25 F .7(options are interpreted as)3.2 F(follo)144 +561.6 Q(ws:)-.25 E F1144 573.6 Q F0 +(All current limits are reported; no limits are set)180 573.6 Q F1 +144 585.6 Q F0(The maximum sock)180 585.6 Q(et b)-.1 E(uf)-.2 E +(fer size)-.25 E F1144 597.6 Q F0 +(The maximum size of core \214les created)180 597.6 Q F1144 609.6 +Q F0(The maximum size of a process')180 609.6 Q 2.5(sd)-.55 G(ata se) +-2.5 E(gment)-.15 E F1144 621.6 Q F0 +(The maximum scheduling priority \("nice"\))180 621.6 Q F1144 +633.6 Q F0 +(The maximum size of \214les written by the shell and its children)180 +633.6 Q F1144 645.6 Q F0(The maximum number of pending signals)180 +645.6 Q F1144 657.6 Q F0 +(The maximum number of kqueues that may be allocated)180 657.6 Q F1 +144 669.6 Q F0(The maximum size that may be lock)180 669.6 Q +(ed into memory)-.1 E F1144 681.6 Q F0 +(The maximum resident set size \(man)180 681.6 Q 2.5(ys)-.15 G +(ystems do not honor this limit\))-2.5 E F1144 693.6 Q F0 .791(Th\ +e maximum number of open \214le descriptors \(most systems do not allo) +180 693.6 R 3.291(wt)-.25 G .791(his v)-3.291 F .791(alue to)-.25 F +(be set\))180 705.6 Q F1144 717.6 Q F0 +(The pipe size in 512-byte blocks \(this may not be set\))180 717.6 Q +(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(23)198.725 E 0 Cg EP +%%Page: 24 24 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF144 84 Q F0 +(The maximum number of bytes in POSIX message queues)180 84 Q F1 +144 96 Q F0(The maximum real-time scheduling priority)180 96 Q F1 +144 108 Q F0(The maximum stack size)180 108 Q F1144 120 Q F0 +(The maximum amount of cpu time in seconds)180 120 Q F1144 132 Q +F0(The maximum number of processes a)180 132 Q -.25(va)-.2 G +(ilable to a single user).25 E F1144 144 Q F0 .47 +(The maximum amount of virtual memory a)180 144 R -.25(va)-.2 G .47 +(ilable to the shell and, on some systems, to).25 F(its children)180 156 +Q F1144 168 Q F0(The maximum number of \214le locks)180 168 Q F1 +144 180 Q F0(The maximum number of pseudoterminals)180 180 Q F1 +144 192 Q F0(The maximum time a real-time process can run before \ +blocking, in microseconds)180 192 Q F1144 204 Q F0 +(The maximum number of threads)180 204 Q(If)144 220.8 Q/F2 10 +/Times-Italic@0 SF(limit)3.058 E F0 .468(is gi)3.648 F -.15(ve)-.25 G +.468(n, and the).15 F F12.968 E F0 .468(option is not used,)2.968 +F F2(limit)2.968 E F0 .468(is the ne)2.968 F 2.968(wv)-.25 G .468 +(alue of the speci\214ed resource.)-3.218 F(If)5.468 E .045 +(no option is gi)144 232.8 R -.15(ve)-.25 G .045(n, then).15 F F1 +2.545 E F0 .045(is assumed.)2.545 F -1.11(Va)5.045 G .045 +(lues are in 1024-byte increments, e)1.11 F .044(xcept for)-.15 F F1 +2.544 E F0 2.544(,w)C .044(hich is)-2.544 F .67(in seconds;)144 +244.8 R F13.17 E F0 3.17(,w)C .67(hich is in microseconds;)-3.17 F +F13.17 E F0 3.17(,w)C .67(hich is in units of 512-byte blocks;) +-3.17 F F13.17 E F0(,)A F13.17 E F0(,)A F13.17 E F0(,) +A F1144 256.8 Q F0(,)A F13.737 E F0 3.737(,a)C(nd)-3.737 E +F13.736 E F0 3.736(,w)C 1.236(hich are unscaled v)-3.736 F 1.236 +(alues; and, when in posix mode,)-.25 F F13.736 E F0(and)3.736 E +F13.736 E F0 3.736(,w)C 1.236(hich are in)-3.736 F .238 +(512-byte increments.)144 268.8 R .238 +(The return status is 0 unless an in)5.238 F -.25(va)-.4 G .238 +(lid option or ar).25 F .238(gument is supplied, or an)-.18 F +(error occurs while setting a ne)144 280.8 Q 2.5(wl)-.25 G(imit.)-2.5 E +F1(umask)108 297.6 Q F0([)2.5 E F1A F0 2.5(][)C F1-2.5 E F0 +2.5(][)C F2(mode)-2.5 E F0(])A .18 +(The user \214le-creation mask is set to)144 309.6 R F2(mode)3.06 E F0 +5.18(.I).18 G(f)-5.18 E F2(mode)3.06 E F0(be)2.86 E .18 +(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\ +therwise it is interpreted as a symbolic mode mask similar to that acce\ +pted by)144 321.6 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144 +333.6 Q F2(mode)3.263 E F0 .382(is omitted, the current v)3.063 F .382 +(alue of the mask is printed.)-.25 F(The)5.382 E F12.882 E F0 .382 +(option causes the mask to be)2.882 F .547 +(printed in symbolic form; the def)144 345.6 R .547 +(ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G +(he)-3.047 E F13.047 E F0 .547(option is supplied, and)3.047 F F2 +(mode)144.38 357.6 Q F0 .552 +(is omitted, the output is in a form that may be reused as input.)3.232 +F .551(The return status is 0 if the)5.551 F(mode w)144 369.6 Q +(as successfully changed or if no)-.1 E F2(mode)2.5 E F0(ar)2.5 E +(gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E F1 +(unalias)108 386.4 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C F2(name)-2.5 E F0 +(...])2.5 E(Remo)144 398.4 Q 1.057 -.15(ve e)-.15 H(ach).15 E F2(name) +3.257 E F0 .757(from the list of de\214ned aliases.)3.257 F(If)5.758 E +F13.258 E F0 .758(is supplied, all alias de\214nitions are re-) +3.258 F(mo)144 410.4 Q -.15(ve)-.15 G 2.5(d. The).15 F(return v)2.5 E +(alue is true unless a supplied)-.25 E F2(name)2.86 E F0 +(is not a de\214ned alias.)2.68 E F1(unset)108 427.2 Q F0<5bad>2.5 E F1 +(fv)A F0 2.5(][)C-2.5 E F1(n)A F0 2.5(][)C F2(name)-2.5 E F0(...]) +2.5 E -.15(Fo)144 439.2 S 3.804(re).15 G(ach)-3.804 E F2(name)4.164 E F0 +3.804(,r).18 G(emo)-3.804 E 1.604 -.15(ve t)-.15 H 1.304 +(he corresponding v).15 F 1.303(ariable or function.)-.25 F 1.303 +(If the)6.303 F F13.803 E F0 1.303(option is gi)3.803 F -.15(ve) +-.25 G 1.303(n, each).15 F F2(name)144.36 451.2 Q F0 .464 +(refers to a shell v)3.144 F .464(ariable, and that v)-.25 F .464 +(ariable is remo)-.25 F -.15(ve)-.15 G 2.965(d. Read-only).15 F -.25(va) +2.965 G .465(riables may not be un-).25 F 2.769(set. If)144 463.2 R F1 +2.769 E F0 .269(is speci\214ed, each)2.769 F F2(name)3.129 E F0 +.269(refers to a shell function, and the function de\214nition is remo) +2.949 F -.15(ve)-.15 G(d.).15 E .403(If the)144 475.2 R F12.903 E +F0 .404(option is supplied, and)2.904 F F2(name)2.904 E F0 .404(is a v) +2.904 F .404(ariable with the)-.25 F F2(namer)2.904 E(ef)-.37 E F0 +(attrib)2.904 E(ute,)-.2 E F2(name)2.904 E F0 .404(will be unset)2.904 F +.72(rather than the v)144 487.2 R .72(ariable it references.)-.25 F F1 +5.72 E F0 .72(has no ef)3.22 F .719(fect if the)-.25 F F1 +3.219 E F0 .719(option is supplied.)3.219 F .719(If no options)5.719 F +.736(are supplied, each)144 499.2 R F2(name)3.236 E F0 .736 +(refers to a v)3.236 F .737(ariable; if there is no v)-.25 F .737 +(ariable by that name, a function with)-.25 F 1.762(that name, if an)144 +511.2 R 3.062 -.65(y, i)-.15 H 4.262(su).65 G 4.261(nset. Each)-4.262 F +1.761(unset v)4.261 F 1.761(ariable or function is remo)-.25 F -.15(ve) +-.15 G 4.261(df).15 G 1.761(rom the en)-4.261 F(vironment)-.4 E 3.171 +(passed to subsequent commands.)144 523.2 R 3.172(If an)8.172 F 5.672 +(yo)-.15 G(f)-5.672 E/F3 9/Times-Bold@0 SF -.27(BA)5.672 G(SH_ALIASES) +.27 E/F4 9/Times-Roman@0 SF(,)A F3 -.27(BA)5.422 G(SH_ARGV0).27 E F4(,)A +F3 -.27(BA)5.422 G(SH_CMDS).27 E F4(,)A F3 -.27(BA)144 535.2 S +(SH_COMMAND).27 E F4(,)A F3 -.27(BA)11.482 G(SH_SUBSHELL).27 E F4(,)A F3 +-.27(BA)11.482 G(SHPID).27 E F4(,)A F3(COMP_W)11.482 E(ORDBREAKS)-.09 E +F4(,)A F3(DIRST)11.481 E -.495(AC)-.81 G(K).495 E F4(,)A F3(EPOCHREAL) +144 547.2 Q(TIME)-.828 E F4(,)A F3(EPOCHSECONDS)2.67 E F4(,)A F3(FUNCN) +2.67 E(AME)-.18 E F4(,)A F3(GR)2.67 E(OUPS)-.27 E F4(,)A F3(HISTCMD)2.67 +E F4(,)A F3(LINENO)2.67 E F4(,)A F3(RANDOM)2.67 E F4(,)A F3(SECONDS)144 +559.2 Q F4(,)A F0(or)4.03 E F3(SRANDOM)4.28 E F0 1.779(are unset, the) +4.03 F 4.279(yl)-.15 G 1.779(ose their special properties, e)-4.279 F +-.15(ve)-.25 G 4.279(ni).15 G 4.279(ft)-4.279 G(he)-4.279 E 4.279(ya) +-.15 G 1.779(re subse-)-4.279 F(quently reset.)144 571.2 Q(The e)5 E +(xit status is true unless a)-.15 E F2(name)2.86 E F0(is readonly)2.68 E +(.)-.65 E F1(wait)108 588 Q F0([)2.5 E F1(\255fn)A F0 2.5(][)C F1 +-2.5 E F2(varname)2.5 E F0 2.5(][)C F2(id ...)-2.5 E F0(])A -.8(Wa)144 +600 S .659(it for each speci\214ed child process and return its termina\ +tion status.).8 F(Each)5.659 E F2(id)3.169 E F0 .659(may be a process) +3.929 F .009(ID or a job speci\214cation; if a job spec is gi)144 612 R +-.15(ve)-.25 G .008(n, all processes in that job').15 F 2.508(sp)-.55 G +.008(ipeline are w)-2.508 F .008(aited for)-.1 F 5.008(.I)-.55 G(f) +-5.008 E F2(id)144.01 624 Q F0 .441(is not gi)3.711 F -.15(ve)-.25 G(n,) +.15 E F1(wait)2.941 E F0 -.1(wa)2.941 G .441 +(its for all running background jobs and the last-e).1 F -.15(xe)-.15 G +.442(cuted process substitu-).15 F .598 +(tion, if its process id is the same as)144 636 R F1($!)3.098 E F0 3.098 +(,a)C .598(nd the return status is zero.)-3.098 F .597(If the)5.597 F F1 +3.097 E F0 .597(option is supplied,)3.097 F F1(wait)144 648 Q F0 +-.1(wa)3.082 G .583(its for a single job from the list of).1 F F2(id) +3.083 E F0 3.083(so)C 1.383 -.4(r, i)-3.083 H 3.083(fn).4 G(o)-3.083 E +F2(id)3.083 E F0 3.083(sa)C .583(re supplied, an)-3.083 F 3.083(yj)-.15 +G .583(ob, to complete and)-3.083 F .404(returns its e)144 660 R .404 +(xit status.)-.15 F .403(If none of the supplied ar)5.403 F .403 +(guments is a child of the shell, or if no ar)-.18 F(guments)-.18 E .572 +(are supplied and the shell has no unw)144 672 R .573 +(aited-for children, the e)-.1 F .573(xit status is 127.)-.15 F .573 +(If the)5.573 F F13.073 E F0 .573(option is)3.073 F .39 +(supplied, the process or job identi\214er of the job for which the e) +144 684 R .39(xit status is returned is assigned to)-.15 F .905(the v) +144 696 R(ariable)-.25 E F2(varname)3.405 E F0 .905 +(named by the option ar)3.405 F 3.405(gument. The)-.18 F -.25(va)3.405 G +.905(riable will be unset initially).25 F 3.405(,b)-.65 G(efore)-3.405 E +(an)144 708 Q 3.89(ya)-.15 G 3.89(ssignment. This)-3.89 F 1.39 +(is useful only when the)3.89 F F13.89 E F0 1.39 +(option is supplied.)3.89 F 1.39(Supplying the)6.39 F F13.89 E F0 +(option,)3.89 E 1.461(when job control is enabled, forces)144 720 R F1 +(wait)3.961 E F0 1.461(to w)3.961 F 1.461(ait for)-.1 F F2(id)3.961 E F0 +1.462(to terminate before returning its status,)3.961 F(GNU Bash 5.0)72 +768 Q(2004 Apr 20)149.565 E(24)198.725 E 0 Cg EP +%%Page: 25 25 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E .149 +(instead of returning when it changes status.)144 84 R(If)5.149 E/F1 10 +/Times-Italic@0 SF(id)2.659 E F0 .149(speci\214es a non-e)3.419 F .148 +(xistent process or job, the return)-.15 F(status is 127.)144 96 Q +(Otherwise, the return status is the e)5 E +(xit status of the last process or job w)-.15 E(aited for)-.1 E(.)-.55 E +/F2 10.95/Times-Bold@0 SF(SHELL COMP)72 112.8 Q -1.04(AT)-.81 G +(IBILITY MODE)1.04 E F0 .911 +(Bash-4.0 introduced the concept of a `shell compatibility le)108 124.8 +R -.15(ve)-.25 G .912(l', speci\214ed as a set of options to the shopt) +.15 F -.2(bu)108 136.8 S(iltin).2 E/F3 10/Times-Bold@0 SF(compat31)3.378 +E F0(,)A F3(compat32)3.378 E F0(,)A F3(compat40)3.378 E F0(,)A F3 +(compat41)3.378 E F0 3.378(,a)C .878(nd so on\).)-3.378 F .877 +(There is only one current compatibility)5.878 F(le)108 148.8 Q -.15(ve) +-.25 G 3.253(l-).15 G 3.253(-e)-3.253 G .753(ach option is mutually e) +-3.253 F(xclusi)-.15 E -.15(ve)-.25 G 5.753(.T).15 G .753 +(he compatibility le)-5.753 F -.15(ve)-.25 G 3.254(li).15 G 3.254(si) +-3.254 G .754(ntended to allo)-3.254 F 3.254(wu)-.25 G .754 +(sers to select be-)-3.254 F(ha)108 160.8 Q 1.084(vior from pre)-.2 F +1.084(vious v)-.25 F 1.083(ersions that is incompatible with ne)-.15 F +1.083(wer v)-.25 F 1.083(ersions while the)-.15 F 3.583(ym)-.15 G 1.083 +(igrate scripts to use)-3.583 F(current features and beha)108 172.8 Q +(vior)-.2 E 2.5(.I)-.55 G(t')-2.5 E 2.5(si)-.55 G +(ntended to be a temporary solution.)-2.5 E 1.456 +(This section does not mention beha)108 189.6 R 1.457 +(vior that is standard for a particular v)-.2 F 1.457 +(ersion \(e.g., setting)-.15 F F3(compat32)3.957 E F0 .887 +(means that quoting the rhs of the re)108 201.6 R(ge)-.15 E .886 +(xp matching operator quotes special re)-.15 F(ge)-.15 E .886 +(xp characters in the w)-.15 F(ord,)-.1 E(which is def)108 213.6 Q +(ault beha)-.1 E(vior in bash-3.2 and abo)-.2 E -.15(ve)-.15 G(\).).15 E +.522(If a user enables, say)108 230.4 R(,)-.65 E F3(compat32)3.023 E F0 +3.023(,i)C 3.023(tm)-3.023 G .523(ay af)-3.023 F .523(fect the beha)-.25 +F .523(vior of other compatibility le)-.2 F -.15(ve)-.25 G .523 +(ls up to and includ-).15 F .26(ing the current compatibility le)108 +242.4 R -.15(ve)-.25 G 2.76(l. The).15 F .259 +(idea is that each compatibility le)2.759 F -.15(ve)-.25 G 2.759(lc).15 +G .259(ontrols beha)-2.759 F .259(vior that changed)-.2 F 1.645 +(in that v)108 254.4 R 1.646(ersion of)-.15 F F3(bash)4.146 E F0 4.146 +(,b)C 1.646(ut that beha)-4.346 F 1.646(vior may ha)-.2 F 1.946 -.15 +(ve b)-.2 H 1.646(een present in earlier v).15 F 4.146(ersions. F)-.15 F +1.646(or instance, the)-.15 F .761 +(change to use locale-based comparisons with the)108 266.4 R F3([[)3.261 +E F0 .76(command came in bash-4.1, and earlier v)3.261 F .76 +(ersions used)-.15 F 1.904(ASCII-based comparisons, so enabling)108 +278.4 R F3(compat32)4.404 E F0 1.905 +(will enable ASCII-based comparisons as well.)4.404 F(That)6.905 E .296 +(granularity may not be suf)108 290.4 R .296 +(\214cient for all uses, and as a result users should emplo)-.25 F 2.796 +(yc)-.1 G .295(ompatibility le)-2.796 F -.15(ve)-.25 G .295(ls care-).15 +F(fully)108 302.4 Q 5(.R)-.65 G(ead the documentation for a particular \ +feature to \214nd out the current beha)-5 E(vior)-.2 E(.)-.55 E .531 +(Bash-4.3 introduced a ne)108 319.2 R 3.031(ws)-.25 G .531(hell v)-3.031 +F(ariable:)-.25 E/F4 9/Times-Bold@0 SF -.27(BA)3.031 G(SH_COMP).27 E +-.855(AT)-.666 G/F5 9/Times-Roman@0 SF(.).855 E F0 .531(The v)5.031 F +.531(alue assigned to this v)-.25 F .532(ariable \(a decimal)-.25 F -.15 +(ve)108 331.2 S .108(rsion number lik).15 F 2.608(e4)-.1 G .108 +(.2, or an inte)-2.608 F .108(ger corresponding to the)-.15 F F3(compat) +2.607 E F1(NN)A F0 .107(option, lik)2.607 F 2.607(e4)-.1 G .107 +(2\) determines the com-)-2.607 F(patibility le)108 343.2 Q -.15(ve)-.25 +G(l.).15 E .387(Starting with bash-4.4, Bash has be)108 360 R .388 +(gun deprecating older compatibility le)-.15 F -.15(ve)-.25 G 2.888 +(ls. Ev).15 F(entually)-.15 E 2.888(,t)-.65 G .388(he options will) +-2.888 F(be remo)108 372 Q -.15(ve)-.15 G 2.5(di).15 G 2.5(nf)-2.5 G -.2 +(avo)-2.6 G 2.5(ro).2 G(f)-2.5 E F4 -.27(BA)2.5 G(SH_COMP).27 E -.855 +(AT)-.666 G F5(.).855 E F0 1.164(Bash-5.0 is the \214nal v)108 388.8 R +1.164(ersion for which there will be an indi)-.15 F 1.163 +(vidual shopt option for the pre)-.25 F 1.163(vious v)-.25 F(ersion.) +-.15 E(Users should use)108 400.8 Q F4 -.27(BA)2.5 G(SH_COMP).27 E -.855 +(AT)-.666 G F0(on bash-5.0 and later v)3.105 E(ersions.)-.15 E 1.613 +(The follo)108 417.6 R 1.613(wing table describes the beha)-.25 F 1.613 +(vior changes controlled by each compatibility le)-.2 F -.15(ve)-.25 G +4.113(ls).15 G 4.114(etting. The)-4.113 F F3(compat)108 429.6 Q F1(NN)A +F0 1.186(tag is used as shorthand for setting the compatibility le)3.686 +F -.15(ve)-.25 G 3.686(lt).15 G(o)-3.686 E F1(NN)3.686 E F0 1.186 +(using one of the follo)3.686 F(wing)-.25 E 3.806(mechanisms. F)108 +441.6 R 1.306(or v)-.15 F 1.306 +(ersions prior to bash-5.0, the compatibility le)-.15 F -.15(ve)-.25 G +3.807(lm).15 G 1.307(ay be set using the corresponding)-3.807 F F3 +(compat)108 453.6 Q F1(NN)A F0 .502(shopt option.)3.002 F -.15(Fo)5.502 +G 3.002(rb).15 G .502(ash-4.3 and later v)-3.002 F .502(ersions, the) +-.15 F F4 -.27(BA)3.002 G(SH_COMP).27 E -.855(AT)-.666 G F0 -.25(va) +3.607 G .502(riable is preferred, and it).25 F +(is required for bash-5.1 and later v)108 465.6 Q(ersions.)-.15 E F3 +(compat31)108 482.4 Q F0<83>144 494.4 Q(quoting the rhs of the)180 494.4 +Q F3([[)2.5 E F0(command')2.5 E 2.5(sr)-.55 G -.15(eg)-2.5 G -.15(ex).15 +G 2.5(pm).15 G(atching operator \(=~\) has no special ef)-2.5 E(fect) +-.25 E F3(compat32)108 511.2 Q F0<83>144 523.2 Q .35 +(interrupting a command list such as "a ; b ; c" causes the e)180 523.2 +R -.15(xe)-.15 G .35(cution of the ne).15 F .35(xt command)-.15 F .018 +(in the list \(in bash-4.0 and later v)180 535.2 R .018 +(ersions, the shell acts as if it recei)-.15 F -.15(ve)-.25 G 2.517(dt) +.15 G .017(he interrupt, so in-)-2.517 F +(terrupting one command in a list aborts the e)180 547.2 Q -.15(xe)-.15 +G(cution of the entire list\)).15 E F3(compat40)108 564 Q F0<83>144 576 +Q(the)180 576 Q F3(<)2.673 E F0(and)2.673 E F3(>)2.673 E F0 .173 +(operators to the)2.673 F F3([[)2.673 E F0 .173 +(command do not consider the current locale when compar)2.673 F(-)-.2 E +.068(ing strings; the)180 588 R 2.568(yu)-.15 G .068(se ASCII ordering.) +-2.568 F .068(Bash v)5.068 F .067 +(ersions prior to bash-4.1 use ASCII collation)-.15 F(and)180 600 Q F1 +(str)4.742 E(cmp)-.37 E F0 1.902 +(\(3\); bash-4.1 and later use the current locale').19 F 4.403(sc)-.55 G +1.903(ollation sequence and)-4.403 F F1(str)4.743 E(-)-.2 E(coll)180 612 +Q F0(\(3\).).51 E F3(compat41)108 628.8 Q F0<83>144 640.8 Q(in)180 640.8 +Q F1(posix)3.79 E F0(mode,)3.79 E F3(time)3.79 E F0 1.29(may be follo) +3.79 F 1.29(wed by options and still be recognized as a reserv)-.25 F +(ed)-.15 E -.1(wo)180 652.8 S(rd \(this is POSIX interpretation 267\)).1 +E<83>144 664.8 Q(in)180 664.8 Q F1(posix)2.708 E F0 .208 +(mode, the parser requires that an e)2.708 F -.15(ve)-.25 G 2.708(nn).15 +G .208(umber of single quotes occur in the)-2.708 F F1(wor)2.709 E(d) +-.37 E F0 .282(portion of a double-quoted parameter e)180 676.8 R .282 +(xpansion and treats them specially)-.15 F 2.781(,s)-.65 G 2.781(ot) +-2.781 G .281(hat charac-)-2.781 F(ters within the single quotes are co\ +nsidered quoted \(this is POSIX interpretation 221\))180 688.8 Q F3 +(compat42)108 705.6 Q F0<83>144 717.6 Q 1.055(the replacement string in\ + double-quoted pattern substitution does not under)180 717.6 R 1.056 +(go quote re-)-.18 F(mo)180 729.6 Q -.25(va)-.15 G(l, as it does in v) +.25 E(ersions after bash-4.2)-.15 E(GNU Bash 5.0)72 768 Q(2004 Apr 20) +149.565 E(25)198.725 E 0 Cg EP +%%Page: 26 26 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61 +(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35 +E(UIL)-.1 E(TINS\(1\))-.92 E<83>144 84 Q .021 +(in posix mode, single quotes are considered special when e)180 84 R +.021(xpanding the)-.15 F/F1 10/Times-Italic@0 SF(wor)2.52 E(d)-.37 E F0 +.02(portion of a)2.52 F .017(double-quoted parameter e)180 96 R .017 +(xpansion and can be used to quote a closing brace or other spe-)-.15 F +.999(cial character \(this is part of POSIX interpretation 221\); in la\ +ter v)180 108 R .998(ersions, single quotes)-.15 F +(are not special within double-quoted w)180 120 Q(ord e)-.1 E(xpansions) +-.15 E/F2 10/Times-Bold@0 SF(compat43)108 136.8 Q F0<83>144 148.8 Q 1.07 +(the shell does not print a w)180 148.8 R 1.071 +(arning message if an attempt is made to use a quoted com-)-.1 F .249 +(pound assignment as an ar)180 160.8 R .248 +(gument to declare \(declare -a foo='\(1 2\)'\). Later v)-.18 F .248 +(ersions w)-.15 F(arn)-.1 E(that this usage is deprecated)180 172.8 Q +<83>144 184.8 Q -.1(wo)180 184.8 S .5(rd e).1 F .501 +(xpansion errors are considered non-f)-.15 F .501 +(atal errors that cause the current command to)-.1 F -.1(fa)180 196.8 S +.605(il, e).1 F -.15(ve)-.25 G 3.105(ni).15 G 3.105(np)-3.105 G .605 +(osix mode \(the def)-3.105 F .605(ault beha)-.1 F .605(vior is to mak) +-.2 F 3.105(et)-.1 G .605(hem f)-3.105 F .605 +(atal errors that cause the)-.1 F(shell to e)180 208.8 Q(xit\))-.15 E +<83>144 220.8 Q .354(when e)180 220.8 R -.15(xe)-.15 G .354 +(cuting a shell function, the loop state \(while/until/etc.\)).15 F .355 +(is not reset, so)5.354 F F2(br)2.855 E(eak)-.18 E F0(or)2.855 E F2 +(continue)180 232.8 Q F0 .052 +(in that function will break or continue loops in the calling conte) +2.553 F .052(xt. Bash-4.4 and)-.15 F(later reset the loop state to pre) +180 244.8 Q -.15(ve)-.25 G(nt this).15 E F2(compat44)108 261.6 Q F0<83> +144 273.6 Q .719(the shell sets up the v)180 273.6 R .719(alues used by) +-.25 F/F3 9/Times-Bold@0 SF -.27(BA)3.219 G(SH_ARGV).27 E F0(and)2.969 E +F3 -.27(BA)3.219 G(SH_ARGC).27 E F0 .719(so the)2.969 F 3.219(yc)-.15 G +.719(an e)-3.219 F(xpand)-.15 E(to the shell')180 285.6 Q 2.5(sp)-.55 G +(ositional parameters e)-2.5 E -.15(ve)-.25 G 2.5(ni).15 G 2.5(fe)-2.5 G +(xtended deb)-2.65 E(ugging mode is not enabled)-.2 E<83>144 297.6 Q +2.635(as)180 297.6 S .135(ubshell inherits loops from its parent conte) +-2.635 F .135(xt, so)-.15 F F2(br)2.635 E(eak)-.18 E F0(or)2.635 E F2 +(continue)2.634 E F0 .134(will cause the sub-)2.634 F(shell to e)180 +309.6 Q 2.5(xit. Bash-5.0)-.15 F(and later reset the loop state to pre) +2.5 E -.15(ve)-.25 G(nt the e).15 E(xit)-.15 E<83>144 321.6 Q -.25(va) +180 321.6 S .618(riable assignments preceding b).25 F .618(uiltins lik) +-.2 F(e)-.1 E F2(export)3.118 E F0(and)3.118 E F2 -.18(re)3.118 G +(adonly).18 E F0 .618(that set attrib)3.118 F .619(utes con-)-.2 F .12 +(tinue to af)180 333.6 R .12(fect v)-.25 F .119 +(ariables with the same name in the calling en)-.25 F .119(vironment e) +-.4 F -.15(ve)-.25 G 2.619(ni).15 G 2.619(ft)-2.619 G .119(he shell is) +-2.619 F(not in posix mode)180 345.6 Q F2(compat50)108 362.4 Q F0<83>144 +374.4 Q 1.209(Bash-5.1 changed the w)180 374.4 R(ay)-.1 E F3($RANDOM) +3.709 E F0 1.209(is generated to introduce slightly more random-)3.459 F +1.019(ness. If the shell compatibility le)180 386.4 R -.15(ve)-.25 G +3.518(li).15 G 3.518(ss)-3.518 G 1.018(et to 50 or lo)-3.518 F(wer)-.25 +E 3.518(,i)-.4 G 3.518(tr)-3.518 G -2.15 -.25(ev e)-3.518 H 1.018 +(rts to the method from).25 F .732(bash-5.0 and pre)180 398.4 R .732 +(vious v)-.25 F .733 +(ersions, so seeding the random number generator by assigning a)-.15 F +-.25(va)180 410.4 S(lue to).25 E F3(RANDOM)2.5 E F0 +(will produce the same sequence as in bash-5.0)2.25 E<83>144 422.4 Q +.696(If the command hash table is empty)180 422.4 R 3.196(,b)-.65 G .696 +(ash v)-3.196 F .695(ersions prior to bash-5.1 printed an informa-)-.15 +F 1.32(tional message to that ef)180 434.4 R 1.321(fect, e)-.25 F -.15 +(ve)-.25 G 3.821(nw).15 G 1.321 +(hen producing output that can be reused as input.)-3.821 F +(Bash-5.1 suppresses that message when the)180 446.4 Q F22.5 E F0 +(option is supplied.)2.5 E/F4 10.95/Times-Bold@0 SF(SEE ALSO)72 463.2 Q +F0(bash\(1\), sh\(1\))108 475.2 Q(GNU Bash 5.0)72 768 Q(2004 Apr 20) +149.565 E(26)198.725 E 0 Cg EP +%%Trailer +end +%%EOF diff --git a/bash-5.1/doc/fdl.texi b/bash-5.1/doc/fdl.texi new file mode 100644 index 0000000000000000000000000000000000000000..8805f1a47d95e35dd768a735ccf9ec951ba29f06 --- /dev/null +++ b/bash-5.1/doc/fdl.texi @@ -0,0 +1,506 @@ +@c The GNU Free Documentation License. +@center Version 1.3, 3 November 2008 + +@c This file is intended to be included within another document, +@c hence no sectioning command or @node. + +@display +Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. +@uref{http://fsf.org/} + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +@end display + +@enumerate 0 +@item +PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document @dfn{free} in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of ``copyleft'', which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + +@item +APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A ``Modified Version'' of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A ``Secondary Section'' is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The ``Invariant Sections'' are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The ``Cover Texts'' are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A ``Transparent'' copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. + +Examples of suitable formats for Transparent copies include plain +@sc{ascii} without markup, Texinfo input format, La@TeX{} input +format, @acronym{SGML} or @acronym{XML} using a publicly available +@acronym{DTD}, and standard-conforming simple @acronym{HTML}, +PostScript or @acronym{PDF} designed for human modification. Examples +of transparent image formats include @acronym{PNG}, @acronym{XCF} and +@acronym{JPG}. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, @acronym{SGML} or +@acronym{XML} for which the @acronym{DTD} and/or processing tools are +not generally available, and the machine-generated @acronym{HTML}, +PostScript or @acronym{PDF} produced by some word processors for +output purposes only. + +The ``Title Page'' means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, ``Title Page'' means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The ``publisher'' means any person or entity that distributes copies +of the Document to the public. + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +@item +VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + +@item +COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + +@item +MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +@enumerate A +@item +Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +@item +List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. + +@item +State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +@item +Preserve all the copyright notices of the Document. + +@item +Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +@item +Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +@item +Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document's license notice. + +@item +Include an unaltered copy of this License. + +@item +Preserve the section Entitled ``History'', Preserve its Title, and add +to it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section Entitled ``History'' in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +@item +Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the ``History'' section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +@item +For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. + +@item +Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +@item +Delete any section Entitled ``Endorsements''. Such a section +may not be included in the Modified Version. + +@item +Do not retitle any existing section to be Entitled ``Endorsements'' or +to conflict in title with any Invariant Section. + +@item +Preserve any Warranty Disclaimers. +@end enumerate + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled ``Endorsements'', provided it contains +nothing but endorsements of your Modified Version by various +parties---for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + +@item +COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all +sections Entitled ``Endorsements.'' + +@item +COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + +@item +AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + +@item +TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + +@item +TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. + +@item +FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +@uref{http://www.gnu.org/copyleft/}. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +@item +RELICENSING + +``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the +site means any set of copyrightable works thus published on the MMC +site. + +``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +``Incorporate'' means to publish or republish a Document, in whole or +in part, as part of another Document. + +An MMC is ``eligible for relicensing'' if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + +@end enumerate + +@page +@heading ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample +@group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +@end group +@end smallexample + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with@dots{}Texts.'' line with this: + +@smallexample +@group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. +@end group +@end smallexample + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +@c Local Variables: +@c ispell-local-pdict: "ispell-dict" +@c End: + diff --git a/bash-5.1/doc/fdl.txt b/bash-5.1/doc/fdl.txt new file mode 100644 index 0000000000000000000000000000000000000000..2f7e03ca51654a99576dccda67fdfd77bfa58760 --- /dev/null +++ b/bash-5.1/doc/fdl.txt @@ -0,0 +1,451 @@ + + GNU Free Documentation License + Version 1.3, 3 November 2008 + + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of +the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no +other conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to +give them a chance to provide you with an updated version of the +Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other +documents released under this License, and replace the individual +copies of this License in the various documents with a single copy +that is included in the collection, provided that you follow the rules +of this License for verbatim copying of each of the documents in all +other respects. + +You may extract a single document from such a collection, and +distribute it individually under this License, provided you insert a +copy of this License into the extracted document, and follow this +License in all other respects regarding verbatim copying of that +document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the +GNU Free Documentation License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in +detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +"Massive Multiauthor Collaboration" (or "MMC") contained in the site +means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in +part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole or +in part into the MMC, (1) had no cover texts or invariant sections, and +(2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/bash-5.1/doc/htmlpost.sh b/bash-5.1/doc/htmlpost.sh new file mode 100755 index 0000000000000000000000000000000000000000..51241b17647781b57a00a0f8666be2a004f20b8e --- /dev/null +++ b/bash-5.1/doc/htmlpost.sh @@ -0,0 +1,19 @@ +#! /bin/sh +# +# Some of these should really be done by man2html +# +# The ~/xxx links don't really work -- netscape doesn't expand the home +# directory of the user running navigator +# + +sed -e 's|gnu.bash.bug|gnu.bash.bug|g' \ + -e 's|/bin/bash|/bin/bash|g' \ + -e 's|/etc/profile|/etc/profile|g' \ + -e 's|~/.bash_profile|~/.bash_profile|g' \ + -e 's|~/.bash_login|~/.bash_login|g' \ + -e 's|~/.profile|~/.profile|g' \ + -e 's|~/.bashrc|~/.bashrc|g' \ + -e 's|~/.bash_logout|~/.bash_logout|g' \ + -e 's|~/.bash_history|~/.bash_history|g' \ + -e 's|~/.inputrc|~/.inputrc|g' \ + -e 's|/etc/inputrc|/etc/inputrc|g' diff --git a/bash-5.1/doc/infopost.sh b/bash-5.1/doc/infopost.sh new file mode 100755 index 0000000000000000000000000000000000000000..85c49b4d4ffb3507d299f381a80699c99534ab54 --- /dev/null +++ b/bash-5.1/doc/infopost.sh @@ -0,0 +1,8 @@ +#! /bin/sh +# +# Some of these should really be done by options to makeinfo or by +# using @setfilename, but this way we can have both bashref.info and +# bash.info (for installing) +# + +sed -e 's|bashref.info|bash.info|g' diff --git a/bash-5.1/doc/rbash.0 b/bash-5.1/doc/rbash.0 new file mode 100644 index 0000000000000000000000000000000000000000..b602a70220e3bf73dce3bb5cc65f5466ee00ef82 --- /dev/null +++ b/bash-5.1/doc/rbash.0 @@ -0,0 +1,63 @@ +RBASH(1) General Commands Manual RBASH(1) + + + +NNAAMMEE + rbash - restricted bash, see bbaasshh(1) + +RREESSTTRRIICCTTEEDD SSHHEELLLL + If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at + invocation, the shell becomes restricted. A restricted shell is used + to set up an environment more controlled than the standard shell. It + behaves identically to bbaasshh with the exception that the following are + disallowed or not performed: + + +o changing directories with ccdd + + +o setting or unsetting the values of SSHHEELLLL, PPAATTHH, HHIISSTTFFIILLEE, EENNVV, + or BBAASSHH__EENNVV + + +o specifying command names containing // + + +o specifying a filename containing a // as an argument to the .. + builtin command + + +o specifying a filename containing a slash as an argument to the + hhiissttoorryy builtin command + + +o specifying a filename containing a slash as an argument to the + --pp option to the hhaasshh builtin command + + +o importing function definitions from the shell environment at + startup + + +o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at + startup + + +o redirecting output using the >, >|, <>, >&, &>, and >> redirect- + ion operators + + +o using the eexxeecc builtin command to replace the shell with another + command + + +o adding or deleting builtin commands with the --ff and --dd options + to the eennaabbllee builtin command + + +o using the eennaabbllee builtin command to enable disabled shell + builtins + + +o specifying the --pp option to the ccoommmmaanndd builtin command + + +o turning off restricted mode with sseett ++rr or sseett ++oo rreessttrriicctteedd. + + These restrictions are enforced after any startup files are read. + + When a command that is found to be a shell script is executed, rrbbaasshh + turns off any restrictions in the shell spawned to execute the script. + +SSEEEE AALLSSOO + bash(1) + + + +GNU Bash-4.0 2004 Apr 20 RBASH(1) diff --git a/bash-5.1/doc/rbash.1 b/bash-5.1/doc/rbash.1 new file mode 100644 index 0000000000000000000000000000000000000000..56e38fd030a516f3293f66a741d93bc1bb9fd396 --- /dev/null +++ b/bash-5.1/doc/rbash.1 @@ -0,0 +1,8 @@ +.TH RBASH 1 "2004 Apr 20" "GNU Bash-4.0" +.SH NAME +rbash \- restricted bash, see \fBbash\fR(1) +.SH RESTRICTED SHELL +.nr zY 1 +.so bash.1 +.SH SEE ALSO +bash(1) diff --git a/bash-5.1/doc/rbash.ps b/bash-5.1/doc/rbash.ps new file mode 100644 index 0000000000000000000000000000000000000000..45c9f66be158874bf23eb3fd15dc98cf5df4b18c --- /dev/null +++ b/bash-5.1/doc/rbash.ps @@ -0,0 +1,290 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.22.4 +%%CreationDate: Wed Nov 18 15:13:06 2020 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%DocumentSuppliedResources: procset grops 1.22 4 +%%Pages: 1 +%%PageOrder: Ascend +%%DocumentMedia: Default 612 792 0 () () +%%Orientation: Portrait +%%EndComments +%%BeginDefaults +%%PageMedia: Default +%%EndDefaults +%%BeginProlog +%%BeginResource: procset grops 1.22 4 +%!PS-Adobe-3.0 Resource-ProcSet +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +DEFS/BPhook known{DEFS begin BPhook end}if +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/setcmykcolor where{ +pop +/Fk{ +setcmykcolor fill +}bind def +}if +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/setcmykcolor where{ +pop +/Ck/setcmykcolor load def +}if +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne +2 index/UniqueID ne +and +{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +/setpagedevice{}def +mark +}bind def +/PEND{ +cleartomark +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%EndProlog +%%BeginSetup +%%BeginFeature: *PageSize Default +<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice +%%EndFeature +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(RB)72 48 Q 130.47(ASH\(1\) General)-.35 F +(Commands Manual)2.5 E(RB)132.97 E(ASH\(1\))-.35 E/F1 10.95/Times-Bold@0 +SF -.219(NA)72 84 S(ME).219 E F0(rbash \255 restricted bash, see)108 96 +Q/F2 10/Times-Bold@0 SF(bash)2.5 E F0(\(1\))A F1(RESTRICTED SHELL)72 +112.8 Q F0(If)108 124.8 Q F2(bash)3.582 E F0 1.081 +(is started with the name)3.581 F F2(rbash)3.581 E F0 3.581(,o)C 3.581 +(rt)-3.581 G(he)-3.581 E F23.581 E F0 1.081 +(option is supplied at in)3.581 F -.2(vo)-.4 G 1.081 +(cation, the shell becomes re-).2 F 2.976(stricted. A)108 136.8 R .476 +(restricted shell is used to set up an en)2.976 F .476 +(vironment more controlled than the standard shell.)-.4 F .477(It be-) +5.477 F(ha)108 148.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E +F2(bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E +(wing are disallo)-.25 E(wed or not performed:)-.25 E<83>108 165.6 Q +(changing directories with)144 165.6 Q F2(cd)2.5 E F0<83>108 182.4 Q +(setting or unsetting the v)144 182.4 Q(alues of)-.25 E/F3 9 +/Times-Bold@0 SF(SHELL)2.5 E/F4 9/Times-Roman@0 SF(,)A F3 -.666(PA)2.25 +G(TH)-.189 E F4(,)A F3(HISTFILE)2.25 E F4(,)A F3(ENV)2.25 E F4(,)A F0 +(or)2.25 E F3 -.27(BA)2.5 G(SH_ENV).27 E F0<83>108 199.2 Q +(specifying command names containing)144 199.2 Q F2(/)2.5 E F0<83>108 +216 Q(specifying a \214lename containing a)144 216 Q F2(/)2.5 E F0 +(as an ar)2.5 E(gument to the)-.18 E F2(.)2.5 E F0 -.2(bu)5 G +(iltin command).2 E<83>108 232.8 Q +(specifying a \214lename containing a slash as an ar)144 232.8 Q +(gument to the)-.18 E F2(history)2.5 E F0 -.2(bu)2.5 G(iltin command).2 +E<83>108 249.6 Q .45 +(specifying a \214lename containing a slash as an ar)144 249.6 R .449 +(gument to the)-.18 F F22.949 E F0 .449(option to the)2.949 F F2 +(hash)2.949 E F0 -.2(bu)2.949 G .449(iltin com-).2 F(mand)144 261.6 Q +<83>108 278.4 Q(importing function de\214nitions from the shell en)144 +278.4 Q(vironment at startup)-.4 E<83>108 295.2 Q(parsing the v)144 +295.2 Q(alue of)-.25 E F3(SHELLOPTS)2.5 E F0(from the shell en)2.25 E +(vironment at startup)-.4 E<83>108 312 Q(redirecting output using the >\ +, >|, <>, >&, &>, and >> redirection operators)144 312 Q<83>108 328.8 Q +(using the)144 328.8 Q F2(exec)2.5 E F0 -.2(bu)2.5 G +(iltin command to replace the shell with another command).2 E<83>108 +345.6 Q(adding or deleting b)144 345.6 Q(uiltin commands with the)-.2 E +F22.5 E F0(and)2.5 E F22.5 E F0(options to the)2.5 E F2 +(enable)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E<83>108 362.4 Q +(using the)144 362.4 Q F2(enable)2.5 E F0 -.2(bu)2.5 G +(iltin command to enable disabled shell b).2 E(uiltins)-.2 E<83>108 +379.2 Q(specifying the)144 379.2 Q F22.5 E F0(option to the)2.5 E +F2(command)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E<83>108 396 Q +(turning of)144 396 Q 2.5(fr)-.25 G(estricted mode with)-2.5 E F2 +(set +r)2.5 E F0(or)2.5 E F2(set +o r)2.5 E(estricted)-.18 E F0(.)A +(These restrictions are enforced after an)108 412.8 Q 2.5(ys)-.15 G +(tartup \214les are read.)-2.5 E .429 +(When a command that is found to be a shell script is e)108 429.6 R -.15 +(xe)-.15 G(cuted,).15 E F2(rbash)2.929 E F0 .429(turns of)2.929 F 2.929 +(fa)-.25 G .729 -.15(ny r)-2.929 H .429(estrictions in the shell).15 F +(spa)108 441.6 Q(wned to e)-.15 E -.15(xe)-.15 G(cute the script.).15 E +F1(SEE ALSO)72 458.4 Q F0(bash\(1\))108 470.4 Q(GNU Bash-4.0)72 768 Q +(2004 Apr 20)148.735 E(1)203.725 E 0 Cg EP +%%Trailer +end +%%EOF diff --git a/bash-5.1/doc/rose94.pdf b/bash-5.1/doc/rose94.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1772f543c53f92f9d4ca59f6d816f42424ad3bb3 Binary files /dev/null and b/bash-5.1/doc/rose94.pdf differ diff --git a/bash-5.1/doc/rose94.ps b/bash-5.1/doc/rose94.ps new file mode 100644 index 0000000000000000000000000000000000000000..1fff283eaa0b5c43a81777588737f8d2c492b1f9 --- /dev/null +++ b/bash-5.1/doc/rose94.ps @@ -0,0 +1,1581 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.08 +%%DocumentNeededResources: font Times-Bold +%%+ font Times-Italic +%%+ font Times-Roman +%%+ font Courier +%%+ font Symbol +%%DocumentSuppliedResources: procset grops 1.08 0 +%%Pages: 13 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.08 0 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/FL{ +currentgray exch setgray fill setgray +}bind def +/BL/fill load def +/LW/setlinewidth load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Times-Roman +%%IncludeResource: font Courier +%%IncludeResource: font Symbol +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL +792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron +/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space +/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft +/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four +/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C +/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash +/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q +/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase +/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger +/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus +/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu +/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright +/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde +/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute +/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls +/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute +/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve +/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex +/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 +ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 +/Times-Bold RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 12/Times-Bold@0 SF(Bash, the Bour)210.99 123 Q(ne\255Again Shell)-.18 E/F1 +10/Times-Italic@0 SF(Chet Rame)263.85 147 Q(y)-.3 E(Case W)221.72 159 Q +(estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 171 S(et@po.cwru.edu) +.15 E(ABSTRA)264.535 213 Q(CT)-.3 E/F2 10/Times-Roman@0 SF .019(An o)133 237 R +-.15(ve)-.15 G(rvie).15 E 2.519(wo)-.25 G 2.519(f/)191.918 237 S .018 +(bin/sh\255compatible shells is presented, as well as an introduction to) +200.547 237 R .128(the POSIX.2 shell and tools standard.)108 249 R .128 +(These serv)5.128 F 2.628(ea)-.15 G 2.628(sa)318.562 249 S 2.628(ni)329.52 249 +S .128(ntroduction to bash.)339.928 249 R 2.628(Ac)5.128 G(ompar)439.32 249 Q +(-)-.2 E .188(ison of bash to sh and ksh is presented, as well as a discussion\ + of features unique to bash.)108 261 R(Finally)108 273 Q 3.178(,s)-.65 G .678 +(ome of the changes and ne)145.258 273 R 3.178(wf)-.25 G .678 +(eatures to appear in the ne)268.486 273 R .678(xt bash release will be)-.15 F +(discussed.)108 285 Q/F3 10/Times-Bold@0 SF 2.5(1. Intr)72 321 R(oduction)-.18 +E(Bash)97 336.6 Q F2 .904(is the shell, or command language interpreter)3.404 F +3.404(,t)-.4 G .904(hat will appear in the GNU operating system.)316.032 336.6 +R .782(The name is an acron)72 348.6 R .782(ym for the `)-.15 F(`Bourne\255Ag) +-.74 E .782(ain SHell')-.05 F .782(', a pun on Ste)-.74 F 1.082 -.15(ve B)-.25 +H .783(ourne, the author of the direct).15 F .212(ancestor of the current)72 +360.6 R/F4 9/Times-Roman@0 SF(UNIX)2.712 E F2 2.712<8773>C(hell)199.131 360.6 Q +F1(/bin/sh)2.712 E F2 2.712(,w)C .212(hich appeared in the Se)256.505 360.6 R +-.15(ve)-.25 G .211(nth Edition Bell Labs Research v).15 F(er)-.15 E(-)-.2 E +(sion of)72 372.6 Q F4(UNIX)2.5 E F2([1].).833 E .191(Bash is an)97 388.2 R F3 +(sh)2.691 E F2 .192 +(\255compatible shell that incorporates useful features from the K)B .192 +(orn shell \()-.35 F F3(ksh)A F2 .833(\)[)C .192(2] and the)-.833 F 2.767(Cs)72 +400.2 S .267(hell \()85.327 400.2 R F3(csh)A F2 .833(\)[)C .267 +(3], described later in this article.)-.833 F .266 +(It is ultimately intended to be a conformant implementation)5.267 F 1.965 +(of the IEEE POSIX Shell and T)72 412.2 R 1.966(ools speci\214cation \(IEEE W) +-.8 F 1.966(orking Group 1003.2\).)-.8 F 1.966(It of)6.966 F 1.966 +(fers functional)-.25 F(impro)72 424.2 Q -.15(ve)-.15 G(ments o).15 E -.15(ve) +-.15 G 2.5(rs).15 G 2.5(hf)155.28 424.2 S(or both interacti)166.11 424.2 Q .3 +-.15(ve a)-.25 H(nd programming use.).15 E .802 +(While the GNU operating system will most lik)97 439.8 R .801(ely include a v) +-.1 F .801(ersion of the Berk)-.15 F(ele)-.1 E 3.301(ys)-.15 G .801 +(hell csh, bash)448.238 439.8 R .108(will be the def)72 451.8 R .108 +(ault shell.)-.1 F(Lik)5.108 E 2.608(eo)-.1 G .108(ther GNU softw)199.658 451.8 +R .108(are, bash is quite portable.)-.1 F .109(It currently runs on nearly e) +5.109 F -.15(ve)-.25 G(ry).15 E -.15(ve)72 463.8 S .367(rsion of).15 F F4(UNIX) +2.867 E F2 .367(and a fe)2.867 F 2.867(wo)-.25 G .367 +(ther operating systems \255 an independently-supported port e)187.933 463.8 R +.366(xists for OS/2, and)-.15 F .706(there are rumors of ports to DOS and W)72 +475.8 R(indo)-.4 E .706(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)295.97 475.8 +R F4(UNIX)3.206 E F2(-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix) +372.979 475.8 R(are part of the distrib)72 487.8 Q(ution.)-.2 E .51 +(The original author of bash w)97 503.4 R .51(as Brian F)-.1 F .509 +(ox, an emplo)-.15 F .509(yee of the Free Softw)-.1 F .509(are F)-.1 F 3.009 +(oundation. The)-.15 F(cur)3.009 E(-)-.2 E(rent de)72 515.4 Q -.15(ve)-.25 G +(loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15 H(olunteer who w) +.45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)458.91 515.4 Q +-.15(ve)-.25 G(rsity).15 E(.)-.65 E F3 2.5(2. What)72 539.4 R(is a shell?)2.5 E +F2 1.241(At its base, a shell is simply a macro processor that e)97 555 R -.15 +(xe)-.15 G 1.242(cutes commands.).15 F(A)6.242 E F4(UNIX)3.742 E F2 1.242 +(shell is both a)3.742 F .189(command interpreter)72 567 R 2.688(,w)-.4 G .188 +(hich pro)167.787 567 R .188(vides the user interf)-.15 F .188 +(ace to the rich set of)-.1 F F4(UNIX)2.688 E F2 .188 +(utilities, and a programming)2.688 F .751(language, allo)72 579 R .752 +(wing these utilitites to be combined.)-.25 F .752 +(The shell reads commands either from a terminal or a)5.752 F 2.52 +(\214le. Files)72 591 R .019 +(containing commands can be created, and become commands themselv)2.52 F 2.519 +(es. These)-.15 F(ne)2.519 E 2.519(wc)-.25 G(ommands)465.11 591 Q(ha)72 603 Q +.395 -.15(ve t)-.2 H .095(he same status as system commands in directories lik) +.15 F(e)-.1 E F3(/bin)2.595 E F2 2.595(,a)C(llo)342.575 603 Q .096 +(wing users or groups to establish cus-)-.25 F(tom en)72 615 Q(vironments.)-.4 +E F3 2.5(2.1. Command)72 639 R(Inter)2.5 E(pr)-.1 E(eter)-.18 E F2 2.926(As)97 +654.6 S .426(hell allo)111.036 654.6 R .426(ws e)-.25 F -.15(xe)-.15 G .426 +(cution of).15 F F4(UNIX)2.926 E F2 .426 +(commands, both synchronously and asynchronously)2.926 F 5.425(.T)-.65 G(he) +460.165 654.6 Q F1 -.37(re)2.925 G(dir).37 E(ec-)-.37 E(tion)72 666.6 Q F2 .334 +(constructs permit \214ne-grained control of the input and output of those com\ +mands, and the shell allo)2.833 F(ws)-.25 E .559(control o)72 678.6 R -.15(ve) +-.15 G 3.058(rt).15 G .558(he contents of their en)126.697 678.6 R(vironment.) +-.4 E F4(UNIX)5.558 E F2 .558(shells also pro)3.058 F .558 +(vide a small set of b)-.15 F .558(uilt-in commands)-.2 F(\()72 690.6 Q F1 -.2 +(bu)C(iltins).2 E F2 4.611(\)i)C 2.112 +(mplementing functionality impossible \(e.g.,)115.861 690.6 R F3(cd)4.612 E F2 +(,)A F3(br)4.612 E(eak)-.18 E F2(,)A F3(continue)4.612 E F2 4.612(,a)C(nd) +399.074 690.6 Q F3(exec)4.612 E F2 4.612(\)o)C 4.612(ri)444.948 690.6 S(ncon) +455.67 690.6 Q -.15(ve)-.4 G(nient).15 E .32 LW 76 700.6 72 700.6 DL 80 700.6 +76 700.6 DL 84 700.6 80 700.6 DL 88 700.6 84 700.6 DL 92 700.6 88 700.6 DL 96 +700.6 92 700.6 DL 100 700.6 96 700.6 DL 104 700.6 100 700.6 DL 108 700.6 104 +700.6 DL 112 700.6 108 700.6 DL 116 700.6 112 700.6 DL 120 700.6 116 700.6 DL +124 700.6 120 700.6 DL 128 700.6 124 700.6 DL 132 700.6 128 700.6 DL 136 700.6 +132 700.6 DL 140 700.6 136 700.6 DL 144 700.6 140 700.6 DL/F5 8/Times-Roman@0 +SF 2<8755>72 710.6 S(NIX is a trademark of X/OPEN)83.776 710.6 Q EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-2-)279.67 48 S(\()72 84 Q/F1 10/Times-Bold@0 SF +(history)A F0(,)A F1(getopts)3.505 E F0(,)A F1(kill)3.505 E F0 3.505(,o)C(r) +172.795 84 Q F1(pwd)3.505 E F0 3.505(,f)C 1.005(or e)207.305 84 R 1.005 +(xample\) to obtain via separate utilities.)-.15 F 1.005 +(Shells may be used interac-)6.005 F(ti)72 96 Q -.15(ve)-.25 G +(ly or non-interacti).15 E -.15(ve)-.25 G 2.5(ly: the).15 F 2.5(ya)-.15 G +(ccept input typed from the k)207.42 96 Q -.15(ey)-.1 G +(board or from a \214le.).15 E F1 2.5(2.2. Pr)72 120 R(ogramming Language)-.18 +E F0 .501(While e)97 135.6 R -.15(xe)-.15 G .501 +(cuting commands is essential, most of the po).15 F .501(wer \(and comple)-.25 +F .502(xity\) of shells is due to their)-.15 F .05 +(embedded programming languages.)72 147.6 R(Lik)5.049 E 2.549(ea)-.1 G .349 +-.15(ny h)245.398 147.6 T(igh-le).15 E -.15(ve)-.25 G 2.549(ll).15 G .049 +(anguage, the shell pro)303.276 147.6 R .049(vides v)-.15 F .049 +(ariables, \215o)-.25 F 2.549(wc)-.25 G(ontrol)480.11 147.6 Q +(constructs, quoting, and functions.)72 159.6 Q .475 +(The basic syntactic element is a)97 175.2 R/F2 10/Times-Italic@0 SF .475 +(simple command)2.975 F F0 5.475(.A)C .475 +(simple command consists of an optional set of)315.405 175.2 R -.25(va)72 187.2 +S .525(riable assignments, a command w).25 F .525 +(ord, and an optional list of ar)-.1 F 3.024(guments. Operators)-.18 F .524 +(to redirect input and)3.024 F(output may appear an)72 199.2 Q +(ywhere in a simple command.)-.15 E(Some e)5 E(xamples are:)-.15 E/F3 10 +/Courier@0 SF(who)97 211.2 Q(trn -e -S1 -N)97 223.2 Q(ls -l /bin > binfiles)97 +235.2 Q(make > make.out 2>make.errs)97 247.2 Q F0 2.518(Ap)97 262.8 S .018 +(ipeline is a sequence of tw)111.738 262.8 R 2.518(oo)-.1 G 2.518(rm)230.056 +262.8 S .018(ore commands separated by the character)243.684 262.8 R/F4 10 +/Symbol SF2.519 E F0 5.019(.T)C .019(he standard output)430.082 262.8 R +(of the \214rst command is connected to the standard input of the second.)72 +274.8 Q(Examples of pipelines include:)5 E F3(who | wc -l)97 286.8 Q +(ls -l | sort +3nr)97 298.8 Q F0 .578 +(Simple commands and pipelines may be combined into)97 314.4 R F2(lists)3.078 E +F0 5.578(.A)C .578(list is a sequence of pipelines sepa-)360.002 314.4 R .289 +(rated by one of)72 326.4 R F1(;)2.789 E F0(,)A F1(&)2.789 E F0(,)A F1(&&)2.789 +E F0 2.789(,o)C(r)185.103 326.4 Q F42.789 E F0 2.789(,a)C .289 +(nd optionally terminated by)210.831 326.4 R F1(;)2.789 E F0(,)A F1(&)2.789 E +F0 2.789(,o)C 2.789(ran)352.555 326.4 S -.25(ew)370.903 326.4 S 2.789 +(line. Commands).25 F .289(separated by)2.789 F F1(;)72 338.4 Q F0 .336(are e) +2.836 F -.15(xe)-.15 G .336(cuted sequentially; the shell w).15 F .335 +(aits for each to complete in turn.)-.1 F .335(If a command is terminated by) +5.335 F F1(&)2.835 E F0(,)A .007(the shell e)72 350.4 R -.15(xe)-.15 G .007 +(cutes it in the).15 F F2(bac)2.507 E(kgr)-.2 E(ound)-.45 E F0 2.508(,a)1.666 G +.008(nd does not w)236.076 350.4 R .008(ait for it to \214nish.)-.1 F .008 +(If tw)5.008 F 2.508(oc)-.1 G .008(ommands are separated by)397.616 350.4 R F1 +(&&)72 362.4 Q F0 3.008(,t)C .508(he second command e)96.948 362.4 R -.15(xe) +-.15 G .508(cutes only if the \214rst command succeeds.).15 F 3.007(As)5.508 G +.507(eparator of)383.575 362.4 R F43.007 E F0 .507(causes the sec-)3.007 +F(ond command to e)72 374.4 Q -.15(xe)-.15 G(cute only if the \214rst f).15 E +2.5(ails. Some)-.1 F -.15(ex)2.5 G(amples are:).15 E F3(who ; date)97 386.4 Q +(cd /usr/src || exit 1)97 398.4 Q(cd "$@" && xtitle $HOST: $PWD)97 410.4 Q F0 +1.36(The shell programming language pro)97 426 R 1.361(vides a v)-.15 F 1.361 +(ariety of \215o)-.25 F 3.861(wc)-.25 G 1.361(ontrol structures.)353.276 426 R +(The)6.361 E F1 -.25(fo)3.861 G(r).25 E F0(command)3.861 E(allo)72 438 Q .654 +(ws a list of commands to be e)-.25 F -.15(xe)-.15 G .654 +(cuted once for each w).15 F .654(ord in a w)-.1 F .654(ord list.)-.1 F(The) +5.654 E F1(case)3.154 E F0 .654(command allo)3.154 F .654(ws a)-.25 F .627 +(list to be e)72 450 R -.15(xe)-.15 G .628(cuted if a w).15 F .628 +(ord matches a speci\214ed pattern.)-.1 F(The)5.628 E F1(while)3.128 E F0(and) +3.128 E F1(until)3.128 E F0 .628(commands e)3.128 F -.15(xe)-.15 G .628 +(cute a list of).15 F 1.559 +(commands as long as a guard command completes successfully or f)72 462 R 1.559 +(ails, respecti)-.1 F -.15(ve)-.25 G(ly).15 E 6.559(.T)-.65 G(he)440.892 462 Q +F1(if)4.059 E F0(command)4.059 E(allo)72 474 Q(ws e)-.25 E -.15(xe)-.15 G +(cution of dif).15 E(ferent command lists depending on the e)-.25 E +(xit status of a guard command.)-.15 E(A)97 489.6 Q F2 .385(shell function) +2.885 F F0 .385(associates a list of commands with a name.)2.885 F .386 +(Each time the name is used as a simple)5.385 F .938(command, the list is e)72 +501.6 R -.15(xe)-.15 G 3.438(cuted. This).15 F -.15(exe)3.438 G .938 +(cution tak).15 F .938(es place in the current shell conte)-.1 F .937 +(xt; no ne)-.15 F 3.437(wp)-.25 G .937(rocess is)468.903 501.6 R 2.5 +(created. Functions)72 513.6 R(may ha)2.5 E .3 -.15(ve t)-.2 H(heir o).15 E +(wn ar)-.25 E(gument lists and local v)-.18 E(ariables, and may be recursi)-.25 +E -.15(ve)-.25 G(.).15 E .722(The shell language pro)97 529.2 R .722(vides v) +-.15 F .722(ariables, which may be both set and referenced.)-.25 F 3.222(An) +5.722 G .722(umber of special)435.906 529.2 R 1.02 +(parameters are present, such as)72 541.2 R F1($@)3.519 E F0 3.519(,w)C 1.019 +(hich returns the shell')231.257 541.2 R 3.519(sp)-.55 G 1.019 +(ositional parameters \(command-line ar)333.103 541.2 R(gu-)-.18 E(ments\),)72 +553.2 Q F1($?)2.906 E F0 2.906(,t)C .406(he e)122.812 553.2 R .406 +(xit status of the pre)-.15 F .406(vious command, and)-.25 F F1($$)2.906 E F0 +2.906(,t)C .406(he shell')322.436 553.2 R 2.906(sp)-.55 G .406(rocess I.D.) +368.248 553.2 R .407(In addition to pro)5.406 F(vid-)-.15 E .129 +(ing special parameters and user)72 565.2 R .129(-de\214ned v)-.2 F .129 +(ariables, the shell permits the v)-.25 F .128(alues of certain v)-.25 F .128 +(ariables to control)-.25 F .16(its beha)72 577.2 R(vior)-.2 E 5.16(.S)-.55 G +.16(ome of these v)131.57 577.2 R .16(ariables include)-.25 F F1(IFS)2.661 E F0 +2.661(,w)C .161(hich controls ho)284.202 577.2 R 2.661(wt)-.25 G .161 +(he shell splits w)361.375 577.2 R(ords,)-.1 E F1 -.74(PA)2.661 G(TH)-.21 E F0 +2.661(,w)C(hich)486.78 577.2 Q .392 +(tells the shell where to look for commands, and)72 589.2 R F1(PS1)2.892 E F0 +2.892(,w)C .392(hose v)297.01 589.2 R .392 +(alue is the string the shell uses to prompt for)-.25 F 3.371(commands. There) +72 601.2 R .871(are a fe)3.371 F 3.371(wv)-.25 G .871(ariables whose v)196.645 +601.2 R .871(alues are set by the shell and normally only referenced by)-.25 F +(users;)72 613.2 Q F1(PWD)3.663 E F0 3.663(,w)C 1.163(hose v)135.706 613.2 R +1.163(alue is the pathname of the shell')-.25 F 3.662(sc)-.55 G 1.162(urrent w) +313.068 613.2 R 1.162(orking directory)-.1 F 3.662(,i)-.65 G 3.662(so)421.894 +613.2 S 1.162(ne such v)434.446 613.2 R(ariable.)-.25 E -1.11(Va)72 625.2 S +.008(riables can be used in nearly an)1.11 F 2.509(ys)-.15 G .009(hell conte) +219.37 625.2 R .009(xt and are particularly v)-.15 F .009 +(aluable when used with control struc-)-.25 F(tures.)72 637.2 Q .583 +(There are se)97 652.8 R -.15(ve)-.25 G .583(ral shell).15 F F2 -.2(ex)3.083 G +(pansions).2 E F0 5.583(.A)C -.25(va)254.298 652.8 S(riable).25 E F2(name)3.083 +E F0 .583(is e)3.083 F .582(xpanded to its v)-.15 F .582(alue using ${)-.25 F +F2(name)A F0 .582(}, where)B 1.387(the braces are optional.)72 664.8 R 1.387 +(There are a number of parameter e)6.387 F 1.388(xpansions a)-.15 F -.25(va)-.2 +G 3.888(ilable. F).25 F 1.388(or e)-.15 F 1.388(xample, there are)-.15 F(${)72 +676.8 Q F2(name)A F0<3aad>A F2(wor)A(d)-.37 E F0 .891(}, which e)B .891 +(xpands to)-.15 F F2(wor)3.391 E(d)-.37 E F0(if)3.391 E F2(name)3.391 E F0 .891 +(is unset or null, and the in)3.391 F -.15(ve)-.4 G .89(rse ${).15 F F2(name)A +F0(:+)A F2(wor)A(d)-.37 E F0 .89(}, which)B -.15(ex)72 688.8 S 1.203(pands to) +.15 F F2(wor)3.703 E(d)-.37 E F0(if)3.703 E F2(name)3.703 E F0 1.203 +(is set and not null.)3.703 F F2 1.203(Command substitution)6.203 F F0(allo) +3.703 E 1.204(ws the output of a command to)-.25 F .918 +(replace the command name.)72 700.8 R .918(The syntax is `)5.918 F F2(command)A +F0(`.)A F2(Command)5.918 E F0 .918(is e)3.418 F -.15(xe)-.15 G .918 +(cuted and it and the backquotes).15 F .299 +(are replaced by its output, with trailing ne)72 712.8 R .299(wlines remo)-.25 +F -.15(ve)-.15 G(d.).15 E F2 -.8(Pa)5.299 G .299(thname e).8 F(xpansion)-.2 E +F0 .299(is a w)2.799 F .299(ay to e)-.1 F .299(xpand a w)-.15 F(ord)-.1 E 1.586 +(to a set of \214lenames.)72 724.8 R -.8(Wo)6.586 G 1.586(rds are re).8 F -.05 +(ga)-.15 G 1.586(rded as patterns, in which the characters).05 F F1(*)4.086 E +F0(,)A F1(?)4.086 E F0 4.085(,a)C(nd)432.115 724.8 Q F1([)4.085 E F0(ha)4.085 E +1.885 -.15(ve s)-.2 H(pecial).15 E EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-3-)279.67 48 S 2.845(meaning. W)72 84 R .346(ords\ + containing these special characters are replaced with a sorted list of matchi\ +ng pathnames.)-.8 F(If a w)72 96 Q +(ord generates no matches, it is left unchanged.)-.1 E/F1 10/Times-Italic@0 SF +(Quoting)97 111.6 Q F0 .85(is used to remo)3.35 F 1.15 -.15(ve t)-.15 H .85 +(he special meaning of characters or w).15 F 3.35(ords. It)-.1 F .85 +(can disable special treat-)3.35 F .314 +(ment for shell operators or other special characters, pre)72 123.6 R -.15(ve) +-.25 G .315(nt reserv).15 F .315(ed w)-.15 F .315 +(ords from being recognized as such,)-.1 F .683(and inhibit v)72 135.6 R .683 +(ariable e)-.25 F 3.183(xpansion. The)-.15 F .683 +(shell has three quoting mechanisms:)3.183 F 3.183(ab)5.683 G .683 +(ackslash preserv)387.413 135.6 R .682(es the literal)-.15 F -.25(va)72 147.6 S +.417(lue of the ne).25 F .417(xt character)-.15 F 2.917(,ap)-.4 G .417 +(air of single quotes preserv)196.712 147.6 R .417(es the literal v)-.15 F .418 +(alue of each character between the)-.25 F 1.426 +(quotes, and a pair of double quotes preserv)72 159.6 R 1.425 +(es the literal meaning of enclosed characters while allo)-.15 F(wing)-.25 E +(some e)72 171.6 Q(xpansions.)-.15 E 1.054(Some of the commands b)97 187.2 R +1.054(uilt into the shell are part of the programming language.)-.2 F(The)6.055 +E/F2 10/Times-Bold@0 SF(br)3.555 E(eak)-.18 E F0(and)3.555 E F2(continue)72 +199.2 Q F0 1.175(commands control loop e)3.675 F -.15(xe)-.15 G 1.175 +(cution as in the C language.).15 F(The)6.175 E F2 -2.3 -.15(ev a)3.675 H(l).15 +E F0 -.2(bu)3.675 G 1.174(iltin allo).2 F 1.174(ws a string to be)-.25 F .204 +(parsed and e)72 211.2 R -.15(xe)-.15 G .204(cuted as a command.).15 F F2 -.65 +(Wa)5.205 G(it).65 E F0 .205 +(tells the shell to pause until the processes speci\214ed as ar)2.705 F +(guments)-.18 E(ha)72 223.2 Q .3 -.15(ve ex)-.2 H(ited.).15 E F2 2.5 +(2.3. Interacti)72 247.2 R .2 -.1(ve F)-.1 H(eatur)-.15 E(es)-.18 E F0 .51 +(Shells ha)97 262.8 R .81 -.15(ve b)-.2 H -.15(eg).15 G .51(un of).15 F .51 +(fering features geared speci\214cally for interacti)-.25 F .81 -.15(ve u)-.25 +H .51(se rather than to augment the).15 F .76(programming language.)72 274.8 R +.761(These interacti)5.76 F 1.061 -.15(ve f)-.25 H .761 +(eatures include job control, command line editing, history and).15 F(aliases.) +72 286.8 Q .626(Job control is a f)97 302.4 R .626(acility pro)-.1 F .626 +(vided jointly by the shell and the)-.15 F/F3 9/Times-Roman@0 SF(UNIX)3.125 E +F0 -.1(ke)3.125 G .625(rnel that allo).1 F .625(ws users to selec-)-.25 F(ti)72 +314.4 Q -.15(ve)-.25 G .344 +(ly stop \(suspend\) and restart \(resume\) processes.).15 F .345 +(Each pipeline e)5.345 F -.15(xe)-.15 G .345 +(cuted by the shell is referred to as a).15 F F1(job)72 326.4 Q F0 2.989(.J)C +.488(obs may be suspended and restarted in either the fore)94.159 326.4 R .488 +(ground, where the)-.15 F 2.988(yh)-.15 G -2.25 -.2(av e)397.148 326.4 T .488 +(access to the terminal,)3.188 F .833(or background, where the)72 338.4 R 3.333 +(ya)-.15 G .834(re isolated and cannot read from the terminal.)189.312 338.4 R +-.8(Ty)5.834 G .834(ping the).8 F F1(suspend)3.334 E F0(character)5 E .459(whi\ +le a process is running stops that process and returns control to the shell.)72 +350.4 R .459(Once a job is suspended, the)5.459 F .392 +(user manipulates the job')72 362.4 R 2.892(ss)-.55 G .392(tate, using)184.118 +362.4 R F2(bg)2.892 E F0 .393(to continue it in the background,)2.892 F F2(fg) +2.893 E F0 .393(to return it to the fore)2.893 F(ground)-.15 E .891(and a)72 +374.4 R -.1(wa)-.15 G .891(it its completion, or).1 F F2(kill)3.391 E F0 .891 +(to send it a signal.)3.391 F(The)5.89 E F2(jobs)3.39 E F0 .89 +(command lists the status of jobs, and)3.39 F F2(wait)3.39 E F0 .407 +(will pause the shell until a speci\214ed job terminates.)72 386.4 R .407 +(The shell pro)5.407 F .407(vides a number of w)-.15 F .407 +(ays to refer to a job,)-.1 F(and will notify the user whene)72 398.4 Q -.15 +(ve)-.25 G 2.5(rab).15 G(ackground job terminates.)220.18 398.4 Q -.4(Wi)97 414 +S .956(th the adv).4 F .956(ent of more po)-.15 F .956 +(werful terminals and terminal emulators, more sophisticated interaction)-.25 F +.253(than that pro)72 426 R .253(vided by the)-.15 F F3(UNIX)2.753 E F0 -.1(ke) +2.754 G .254(rnel terminal dri).1 F -.15(ve)-.25 G 2.754(ri).15 G 2.754(sp) +293.592 426 S 2.754(ossible. Some)305.236 426 R .254(shells of)2.754 F .254 +(fer command line editing,)-.25 F 1.141 +(which permits a user to edit lines of input using f)72 438 R(amiliar)-.1 E F1 +(emacs)3.64 E F0(or)3.64 E F1(vi)3.64 E F0 1.14 +(-style commands before submitting)B .02(them to the shell.)72 450 R .02 +(Editors allo)5.02 F 2.52(wc)-.25 G .02(orrections to be made without ha)206.31 +450 R .021(ving to erase back to the point of error)-.2 F 2.521(,o)-.4 G(r) +500.67 450 Q .135(start the line ane)72 462 R 3.935 -.65(w. C)-.25 H .135 +(ommand line editors run the g).65 F .135(amut from a small \214x)-.05 F .134 +(ed set of commands and k)-.15 F .434 -.15(ey b)-.1 H(ind-).15 E +(ings to input f)72 474 Q(acilities which allo)-.1 E 2.5(wa)-.25 G +(rbitrary actions to be bound to a k)217.2 474 Q .3 -.15(ey o)-.1 H 2.5(rk).15 +G .3 -.15(ey s)379.88 474 T(equence.).15 E .145(Modern shells also k)97 489.6 R +.145(eep a history)-.1 F 2.645(,w)-.65 G .146 +(hich is the list of commands a user has typed.)243.49 489.6 R .146(Shell f) +5.146 F .146(acilities are)-.1 F -.2(av)72 501.6 S .368(ailable to recall pre) +-.05 F .367(vious commands and use portions of old commands when composing ne) +-.25 F 2.867(wo)-.25 G 2.867(nes. The)467.253 501.6 R 1.456 +(command history can be sa)72 513.6 R -.15(ve)-.2 G 3.957(dt).15 G 3.957 +(oa\214)207.522 513.6 S 1.457 +(le and read back in at shell startup, so it persists across sessions.)230.436 +513.6 R .675(Shells which pro)72 525.6 R .675 +(vide both command editing and history generally ha)-.15 F .974 -.15(ve e)-.2 H +.674(diting commands to interacti).15 F -.15(ve)-.25 G(ly).15 E(step forw)72 +537.6 Q(ard and backw)-.1 E(ard through the history list.)-.1 E .013 +(Aliases allo)97 553.2 R -5.012 2.513(wa s)-.25 H .014 +(tring to be substituted for a command name.)164.28 553.2 R(The)5.014 E 2.514 +(yc)-.15 G .014(an be used to create a mnemonic)373.396 553.2 R .568(for a)72 +565.2 R F3(UNIX)3.068 E F0 .568(command name \()3.068 F/F4 10/Courier@0 SF .568 +(alias del=rm)B F0 .568(\), to e)B .567(xpand a single w)-.15 F .567 +(ord to a comple)-.1 F 3.067(xc)-.15 G .567(ommand \()432.603 565.2 R F4(alias) +A .255(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 577.2 R F0 .255 +(\), or to ensure that a command)B(is in)72 589.2 Q -.2(vo)-.4 G -.1(ke).2 G +2.5(dw).1 G(ith a basic set of options \()122.41 589.2 Q F4 +(alias ls="/bin/ls -F")A F0(\).)A F2 2.5(3. The)72 613.2 R +(POSIX Shell Standard)2.5 E F1(POSIX)97 628.8 Q F0 .239 +(is a name originally coined by Richard Stallman for a f)4.405 F .239 +(amily of open system standards based)-.1 F(on)72 640.8 Q F3(UNIX)3.239 E F0 +5.739(.T)C .74(here are a number of aspects of)122.079 640.8 R F3(UNIX)3.24 E +F0 .74(under consideration for standardization, from the basic)3.24 F .192 +(system services at the system call and C library le)72 652.8 R -.15(ve)-.25 G +2.692(lt).15 G 2.692(oa)290.16 652.8 S .191 +(pplications and tools to system administration and)302.292 652.8 R 2.5 +(management. Each)72 664.8 R(area of standardization is assigned to a w)2.5 E +(orking group in the 1003 series.)-.1 E 3.602(The POSIX Shell and T)97 680.4 R +3.602(ools standard has been de)-.8 F -.15(ve)-.25 G 3.603(loped by IEEE W).15 +F 3.603(orking Group 1003.2)-.8 F -1.667(\(POSIX.2\) [4].)72 692.4 R 2.799 +(It concentrates on the command interpreter interf)7.799 F 2.799 +(ace and utility programs commonly)-.1 F -.15(exe)72 704.4 S 2.345 +(cuted from the command line or by other programs.).15 F 2.345(An initial v) +7.345 F 2.345(ersion of the standard has been)-.15 F(appro)72 716.4 Q -.15(ve) +-.15 G 2.915(da).15 G .414(nd published by the IEEE, and w)116.265 716.4 R .414 +(ork is currently underw)-.1 F .414(ay to update it.)-.1 F .414 +(There are four primary)5.414 F(areas of w)72 728.4 Q +(ork in the 1003.2 standard:)-.1 E EP +%%Page: 4 4 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-4-)279.67 48 S 21.5<8341>72 84 S .835 +(spects of the shell')104.22 84 R 3.335(ss)-.55 G .835 +(yntax and command language.)192 84 R 3.335(An)5.835 G .835(umber of special b) +338.095 84 R .835(uiltins such as)-.2 F/F1 10/Times-Bold@0 SF(cd)3.335 E F0 +(and)3.335 E F1(exec)97 96 Q F0 .545(are being speci\214ed as part of the shel\ +l, since their functionality usually cannot be implemented)3.046 F +(by a separate e)97 108 Q -.15(xe)-.15 G(cutable;).15 E 21.5<8341>72 123.6 S +.73(set of utilities to be called by shell scripts and applications.)107.45 +123.6 R .731(Examples are programs lik)5.731 F(e)-.1 E/F2 10/Times-Italic@0 SF +2.397(sed, tr)3.231 F(,)-1.11 E F0(and)97 135.6 Q F2(awk.)2.853 E F0 .352 +(Utilities commonly implemented as shell b)4.519 F .352 +(uiltins are described in this section, such as)-.2 F F1(test)2.852 E F0(and)97 +147.6 Q F1(kill)3.422 E F0 5.922(.A)C 3.422(ne)144.404 147.6 S .922 +(xpansion of this section')157.116 147.6 R 3.423(ss)-.55 G .923 +(cope, termed the User Portability Extension, or UPE, has)268.586 147.6 R +(standardized interacti)97 159.6 Q .3 -.15(ve p)-.25 H(rograms such as).15 E F2 +(vi)2.5 E F0(and)4.166 E F2(mailx;)2.5 E F0 21.5<8341>72 175.2 S .926 +(group of functional interf)107.646 175.2 R .926(aces to services pro)-.1 F +.926(vided by the shell, such as the traditional)-.15 F F2(system)3.425 E F0(C) +5.091 E .507(library function.)97 187.2 R .507 +(There are functions to perform shell w)5.507 F .508(ord e)-.1 F .508 +(xpansions, perform \214lename e)-.15 F(xpansion)-.15 E(\()97 199.2 Q F2 +(globbing)A F0 .58(\), obtain v)B .58 +(alues of POSIX.2 system con\214guration v)-.25 F .58(ariables, retrie)-.25 F +.88 -.15(ve v)-.25 H .58(alues of en)-.1 F(vironment)-.4 E -.25(va)97 211.2 S +(riables \().25 E F2 -.1(ge)C(ten).1 E(v\(\))-.4 E F0(\), and other services;) +.833 E 21.5<8341>72 226.8 S(suite of `)106.72 226.8 Q(`de)-.74 E -.15(ve)-.25 G +(lopment').15 E 2.5('u)-.74 G(tilities such as)209.54 226.8 Q F2(c89)2.5 E F0 +(\(the POSIX.2 v)4.166 E(ersion of)-.15 E F2(cc)2.5 E F0(\), and)A F2(yacc.)2.5 +E F0 .483(Bash is concerned with the aspects of the shell')97 242.4 R 2.983(sb) +-.55 G(eha)301.597 242.4 Q .484(vior de\214ned by POSIX.2.)-.2 F .484 +(The shell command)5.484 F 1.439 +(language has of course been standardized, including the basic \215o)72 254.4 R +3.938(wc)-.25 G 1.438(ontrol and program e)359.688 254.4 R -.15(xe)-.15 G 1.438 +(cution con-).15 F 1.145(structs, I/O redirection and pipelining, ar)72 266.4 R +1.145(gument handling, v)-.18 F 1.145(ariable e)-.25 F 1.146 +(xpansion, and quoting.)-.15 F(The)6.146 E F2(special)3.646 E F0 -.2(bu)72 +278.4 S .676(iltins, which must be implemented as part of the shell to pro).2 F +.676(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676(re speci\214ed) +457.504 278.4 R .7(as being part of the shell; e)72 290.4 R .7 +(xamples of these are)-.15 F F1 -2.3 -.15(ev a)3.201 H(l).15 E F0(and)3.201 E +F1(export)3.201 E F0 5.701(.O)C .701(ther utilities appear in the sections of) +352.034 290.4 R .256(POSIX.2 not de)72 302.4 R -.2(vo)-.25 G .256(ted to the s\ +hell which are commonly \(and in some cases must be\) implemented as b).2 F +(uiltin)-.2 E(commands, such as)72 314.4 Q F1 -.18(re)2.5 G(ad).18 E F0(and)2.5 +E F1(test)2.5 E F0(.)A .972(POSIX.2 also speci\214es aspects of the shell')97 +330 R 3.473(si)-.55 G(nteracti)286.016 330 Q 1.273 -.15(ve b)-.25 H(eha).15 E +.973(vior as part of the UPE, including job)-.2 F .233 +(control, command line editing, and history)72 342 R 5.233(.I)-.65 G .233 +(nterestingly enough, only)253.849 342 R F2(vi)2.733 E F0 .233 +(-style line editing commands ha)B -.15(ve)-.2 G(been standardized;)72 354 Q F2 +(emacs)2.5 E F0(editing commands were left out due to objections.)2.5 E .148 +(There were certain areas in which POSIX.2 felt standardization w)97 369.6 R +.149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)420.643 369.6 R .149 +(xisting imple-)-.15 F 1.598(mentation pro)72 381.6 R 1.598 +(vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w)251.56 +381.6 R 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597 +(nted and standardized functionality in).15 F .228(these areas.)72 393.6 R(The) +5.228 E F1(command)2.728 E F0 -.2(bu)2.728 G .228(iltin w).2 F .228(as in)-.1 F +-.15(ve)-.4 G .228(nted so that shell functions could be written to replace b) +.15 F(uiltins;)-.2 E 1.663(it mak)72 405.6 R 1.663 +(es the capabilities of the b)-.1 F 1.663(uiltin a)-.2 F -.25(va)-.2 G 1.663 +(ilable to the function.).25 F 1.663(The reserv)6.663 F 1.663(ed w)-.15 F 1.663 +(ord `)-.1 F(`!')-.74 E 4.163('w)-.74 G 1.663(as added to)455.685 405.6 R(ne)72 +417.6 Q -.05(ga)-.15 G .915(te the return v).05 F .915 +(alue of a command or pipeline; it w)-.25 F .916(as nearly impossible to e)-.1 +F .916(xpress `)-.15 F .916(`if not x')-.74 F 3.416('c)-.74 G(leanly)479.56 +417.6 Q .904(using the sh language.)72 429.6 R .904(There e)5.904 F .904 +(xist multiple incompatible implementations of the)-.15 F F1(test)3.403 E F0 +-.2(bu)3.403 G .903(iltin, which tests).2 F .28 +(\214les for type and other attrib)72 441.6 R .281 +(utes and performs arithmetic and string comparisons.)-.2 F .281 +(POSIX considered none)5.281 F .868(of these correct, so the standard beha)72 +453.6 R .868(vior w)-.2 F .868(as speci\214ed in terms of the number of ar)-.1 +F .867(guments to the com-)-.18 F 3.803(mand. POSIX.2)72 465.6 R 1.303 +(dictates e)3.803 F 1.303(xactly what will happen when four or fe)-.15 F 1.303 +(wer ar)-.25 F 1.303(guments are gi)-.18 F -.15(ve)-.25 G 3.803(nt).15 G(o) +459.462 465.6 Q F1(test)3.804 E F0 3.804(,a)C(nd)494 465.6 Q(lea)72 477.6 Q +-.15(ve)-.2 G 4.531(st).15 G 2.031(he beha)103.951 477.6 R 2.031 +(vior unde\214ned when more ar)-.2 F 2.031(guments are supplied.)-.18 F 2.03 +(Bash uses the POSIX.2 algorithm,)7.031 F(which w)72 489.6 Q(as concei)-.1 E +-.15(ve)-.25 G 2.5(db).15 G 2.5(yD)164.53 489.6 S -.2(av)179.25 489.6 S(id K).2 +E(orn.)-.35 E 1.128 +(While POSIX.2 includes much of what the shell has traditionally pro)97 505.2 R +1.129(vided, some important things)-.15 F(ha)72 517.2 Q .58 -.15(ve b)-.2 H .28 +(een omitted as being `).15 F(`be)-.74 E .28(yond its scope.)-.15 F 4.26 -.74 +('' T)-.7 H .28(here is, for instance, no mention of a dif).74 F .28 +(ference between)-.25 F(a)72 529.2 Q F2(lo)3.354 E(gin)-.1 E F0 .854 +(shell and an)5.02 F 3.354(yo)-.15 G .854(ther interacti)167.956 529.2 R 1.154 +-.15(ve s)-.25 H .854(hell \(since POSIX.2 does not specify a login program\).) +.15 F .855(No \214x)5.855 F(ed)-.15 E +(startup \214les are de\214ned, either \255 the standard does not mention)72 +541.2 Q F2(.pr)2.5 E(o\214le)-.45 E F0(.)1.666 E F1 2.5(4. Shell)72 565.2 R +(Comparison)2.5 E F0 .693(This section compares features of bash, sh, and ksh \ +\(the three shells closest to POSIX compliance\).)97 580.8 R .245(Since ksh an\ +d bash are supersets of sh, the features common to all three are co)72 592.8 R +-.15(ve)-.15 G .245(red \214rst.).15 F .245(Some of the fea-)5.245 F 1.198 +(tures bash and ksh contain which are not in sh will be discussed.)72 604.8 R +(Ne)6.198 E 1.198(xt, features unique to bash will be)-.15 F 2.866(listed. The) +72 616.8 R .366(\214rst three sections pro)2.866 F .366(vide a progressi)-.15 F +-.15(ve)-.25 G .366(ly more detailed o).15 F -.15(ve)-.15 G(rvie).15 E 2.866 +(wo)-.25 G 2.866(fb)395.706 616.8 S 2.866(ash. Finally)406.902 616.8 R 2.866 +(,f)-.65 G .366(eatures of)464.484 616.8 R(ksh-88 \(the currently-a)72 628.8 Q +-.25(va)-.2 G(ilable v).25 E(ersion\) not in sh or bash will be presented.)-.15 +E F1 2.5(4.1. Common)72 652.8 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 .021 +(All three shells ha)97 668.4 R .321 -.15(ve t)-.2 H .021 +(he same basic feature set, which is essentially that pro).15 F .02 +(vided by sh and described)-.15 F 1.026(in an)72 680.4 R 3.526(ys)-.15 G 3.526 +(hm)105.012 680.4 S 1.027 +(anual page. Bash and ksh are both sh supersets, and so all three pro)121.318 +680.4 R 1.027(vide the command inter)-.15 F(-)-.2 E .714 +(preter and programming language described earlier)72 692.4 R 3.214(.T)-.55 G +.714(he shell grammar)291.506 692.4 R 3.214(,s)-.4 G .714(yntax, \215o)371.568 +692.4 R 3.214(wc)-.25 G .714(ontrol, redirections,)424.686 692.4 R(and b)72 +704.4 Q(uiltins implemented by the Bourne shell are the baseline for subsequen\ +t discussion.)-.2 E EP +%%Page: 5 5 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-5-)279.67 48 S/F1 10/Times-Bold@0 SF 2.5(4.2. F)72 +84 R(eatur)-.25 E(es in bash and ksh)-.18 E F0 .458(Ksh and bash ha)97 99.6 R +.758 -.15(ve s)-.2 H -2.15 -.25(ev e).15 H .459(ral features in common be).25 F +.459(yond this base le)-.15 F -.15(ve)-.25 G 2.959(lo).15 G 2.959(ff)387.814 +99.6 S(unctionality)397.433 99.6 Q 5.459(.S)-.65 G .459(ome of this)458.082 +99.6 R(is due to the POSIX.2 standard.)72 111.6 Q(Other functions ha)5 E .3 +-.15(ve b)-.2 H(een implemented in bash using ksh as a guide.).15 E F1 2.5 +(4.2.1. V)72 135.6 R(ariables and V)-.92 E(ariable Expansion)-.92 E F0 .097 +(Bash and ksh ha)97 151.2 R .396 -.15(ve a)-.2 H .096(ugmented v).15 F .096 +(ariable e)-.25 F 2.596(xpansion. Arithmetic)-.15 F .096(substitution allo) +2.596 F .096(ws an e)-.25 F .096(xpression to be)-.15 F -.25(eva)72 163.2 S .6 +(luated and the result substituted.).25 F .6(Shell v)5.6 F .6 +(ariables may be used as operands, and the result of an e)-.25 F(xpres-)-.15 E +.41(sion may be assigned to a v)72 175.2 R 2.91(ariable. Nearly)-.25 F .41 +(all of the operators from the C language are a)2.91 F -.25(va)-.2 G .41 +(ilable, with the).25 F(same precedence rules:)72 187.2 Q/F2 10/Courier@0 SF 6 +($e)97 205.2 S(cho $\(\(3 + 5 * 32\)\))115 205.2 Q(163)97 217.2 Q F0 -1.11(Va) +72 238.8 S 1.445(riables may be declared as)1.11 F/F3 10/Times-Italic@0 SF +(inte)3.945 E -.1(ge)-.4 G(r).1 E F0 3.945(,w)1.666 G 1.446 +(hich causes arithmetic e)240.956 238.8 R -.25(va)-.25 G 1.446 +(luation to be performed on the v).25 F(alue)-.25 E(whene)72 250.8 Q -.15(ve) +-.25 G 2.5(rt).15 G(he)115.75 250.8 Q 2.5(ya)-.15 G(re assigned to.)136.98 +250.8 Q .483(There are ne)97 266.4 R 2.983(we)-.25 G .483 +(xpansions to obtain the length of a v)162.179 266.4 R(ariable')-.25 E 2.982 +(sv)-.55 G .482(alue and to remo)352.19 266.4 R .782 -.15(ve s)-.15 H .482 +(ubstrings match-).15 F .063(ing speci\214ed patterns from the be)72 278.4 R +.063(ginning and end of v)-.15 F .063(ariable v)-.25 F 2.563(alues. A)-.25 F +(ne)2.563 E 2.563(wf)-.25 G .064(orm of command substitution,)383.249 278.4 R +F1($\()72 290.4 Q F3(list)A F1(\))A F0 2.5(,i)C 2.5(sm)103.67 290.4 S +(uch easier to nest than `)117.84 290.4 Q F3(list)A F0 2.5(`a)C +(nd has simpli\214ed quoting rules.)235.04 290.4 Q .082(There are ne)97 306 R +2.582(wv)-.25 G .082(ariables to control the shell')161.436 306 R 2.581(sb)-.55 +G(eha)284.333 306 Q(vior)-.2 E 2.581(,a)-.4 G .081(nd additional v)323.244 306 +R .081(ariables set or interpreted spe-)-.25 F 1.038(cially by the shell.)72 +318 R F1(RANDOM)6.038 E F0(and)3.538 E F1(SECONDS)3.538 E F0(are)3.539 E F3 +(dynamic)3.539 E F0 -.25(va)3.539 G 3.539(riables: their).25 F -.25(va)3.539 G +1.039(lues are generated afresh).25 F 1.022(each time the)72 330 R 3.522(ya) +-.15 G 1.022(re referenced.)140.176 330 R F1(RANDOM)6.022 E F0 1.021 +(returns a dif)3.521 F 1.021(ferent random number each time it is referenced,) +-.25 F(and)72 342 Q F1(SECONDS)3.138 E F0 .638 +(returns the number of seconds since the shell w)3.138 F .638 +(as started or the v)-.1 F .639(ariable w)-.25 F .639(as assigned to,)-.1 F +1.448(plus an)72 354 R 3.948(yv)-.15 G 1.448(alue assigned.)115.606 354 R F1 +(PWD)6.448 E F0(and)3.948 E F1(OLDPWD)3.947 E F0 1.447 +(are set to the current and pre)3.947 F 1.447(vious w)-.25 F 1.447 +(orking directories,)-.1 F(respecti)72 366 Q -.15(ve)-.25 G(ly).15 E(.)-.65 E +F1(TMOUT)5.604 E F0 .604(controls ho)3.104 F 3.104(wl)-.25 G .604 +(ong the shell will w)226.436 366 R .604(ait at a prompt for input.)-.1 F(If) +5.604 E F1(TMOUT)3.104 E F0 .605(is set to a)3.105 F -.25(va)72 378 S 1.168 +(lue greater than zero, the shell e).25 F 1.168(xits after w)-.15 F 1.168 +(aiting that man)-.1 F 3.668(ys)-.15 G 1.167(econds for input.)337.478 378 R F1 +(REPL)6.167 E(Y)-.92 E F0 1.167(is the def)3.667 F(ault)-.1 E -.25(va)72 390 S +.991(riable for the).25 F F1 -.18(re)3.491 G(ad).18 E F0 -.2(bu)3.491 G .991 +(iltin; if no v).2 F .992(ariable names are supplied as ar)-.25 F .992 +(guments, the line read is assigned to)-.18 F F1(REPL)72 402 Q(Y)-.92 E F0(.)A +F1 2.5(4.2.2. New)72 426 R(and Modi\214ed Builtins)2.5 E F0 .652(Both shells e) +97 441.6 R .651(xpand the basic sh set of b)-.15 F .651(uiltin commands.)-.2 F +F1(Let)5.651 E F0(pro)3.151 E .651(vides a w)-.15 F .651 +(ay to perform arithmetic)-.1 F 2.767(on shell v)72 453.6 R 5.268 +(ariables. Shell)-.25 F 2.768(programmers use)5.268 F F1(typeset)5.268 E F0 +2.768(\(bash includes)5.268 F F1(declar)5.268 E(e)-.18 E F0 2.768(as a synon) +5.268 F 2.768(ym\) to assign)-.15 F(attrib)72 465.6 Q .295(utes such as)-.2 F +F3 -.2(ex)2.795 G(port).2 E F0(and)4.461 E F3 -.37(re)2.795 G(adonly).37 E F0 +.295(to v)4.461 F(ariables.)-.25 E F1(Getopts)5.295 E F0 .294 +(is used by shell scripts to parse script options)2.795 F .962(and ar)72 477.6 +R 3.462(guments. The)-.18 F F1(set)3.462 E F0 .962(command has a ne)3.462 F +3.462(wo)-.25 G(ption)266.446 477.6 Q F13.463 E F0 .963(which tak)3.463 F +.963(es option names as ar)-.1 F 3.463(guments. Option)-.18 F 1.28 +(names are synon)72 489.6 R 1.28(yms for the other set options \(e.g.,)-.15 F +F13.78 E F0(and)3.78 E F1 1.28(\255o noglob)3.78 F F0 3.78(\)o)C 3.78(rp) +375.97 489.6 S(ro)388.08 489.6 Q 1.28(vide ne)-.15 F 3.78(wf)-.25 G 1.28 +(unctionality \()440.78 489.6 R F1(-o)A(notify)72 501.6 Q F0 3.348(,f)C .849 +(or e)106.178 501.6 R 3.349(xample\). The)-.15 F F1 -.18(re)3.349 G(ad).18 E F0 +-.2(bu)3.349 G .849(iltin tak).2 F .849(es a ne)-.1 F(w)-.25 E F13.349 E +F0 .849(option to specify that a line ending in a backslash)3.349 F +(should not be continued.)72 513.6 Q F1 2.5(4.2.3. T)72 537.6 R(ilde Expansion) +-.18 E F0 -.35(Ti)97 553.2 S .252(lde e).35 F .251 +(xpansion is a feature adopted from the C shell.)-.15 F 2.751(At)5.251 G .251 +(ilde character at the be)331.172 553.2 R .251(ginning of a w)-.15 F .251 +(ord is)-.1 F -.15(ex)72 565.2 S(panded to either).15 E F1($HOME)2.5 E F0 +(or the home directory of another user)2.5 E 2.5(,d)-.4 G +(epending on what follo)345.84 565.2 Q(ws the tilde.)-.25 E F1 2.5 +(4.2.4. Interacti)72 589.2 R .2 -.1(ve I)-.1 H(mpr).1 E -.1(ove)-.18 G(ments).1 +E F0 .789(The most noticable impro)97 604.8 R -.15(ve)-.15 G .789(ments o).15 F +-.15(ve)-.15 G 3.289(rs).15 G 3.289(ha)263.385 604.8 S .789 +(re geared for interacti)276.114 604.8 R 1.089 -.15(ve u)-.25 H 3.29(se. Ksh) +.15 F .79(and bash pro)3.29 F .79(vide job)-.15 F .882(control in a v)72 616.8 +R .882(ery similar f)-.15 F .882 +(ashion, with the same options to enable and disable it \()-.1 F F1 .881 +(set -o monitor)B F0 3.381(\)a)C .881(nd the)478.399 616.8 R(same b)72 628.8 Q +(uiltin commands to manipulate jobs \()-.2 E F1(jobs/fg/bg/kill/wait)A F0(\).)A +.866(Command line editing, with emacs and vi-style k)97 644.4 R 1.166 -.15 +(ey b)-.1 H .866(indings, is a).15 F -.25(va)-.2 G .866(ilable in both shells.) +.25 F .866(The Bash)5.866 F F3 -.37(re)72 656.4 S(adline).37 E F0 1.578 +(library is considerably more sophisticated than the ksh editing library:)5.744 +F 1.577(it allo)6.577 F 1.577(ws arbitrary k)-.25 F -.15(ey)-.1 G 1.867 +(bindings, macros, a per)72 668.4 R 1.868(-user customization \214le \()-.2 F +F3(~/.inputr)A(c)-.37 E F0 1.868(\), a number of v)B 1.868 +(ariables to further customize)-.25 F(beha)72 680.4 Q(vior)-.2 E 3.538(,a)-.4 G +1.038(nd a much lar)116.868 680.4 R 1.038 +(ger set of bindable editing commands.)-.18 F 1.037 +(The ksh editing library pro)6.037 F 1.037(vides a small)-.15 F<8c78>72 692.4 Q +(ed command set and only clumsy macros.)-.15 E .706(Both shells of)97 708 R +.706(fer access to the command history)-.25 F 5.706(.T)-.65 G .706 +(he in-line editing options ha)307.278 708 R 1.006 -.15(ve d)-.2 H(ef).15 E +.706(ault k)-.1 F 1.006 -.15(ey b)-.1 H(ind-).15 E .624 +(ings to access the history list.)72 720 R(The)5.624 E F1(fc)3.124 E F0 .624 +(command is pro)3.124 F .624(vided to re-e)-.15 F -.15(xe)-.15 G .623(cute pre) +.15 F .623(vious commands and display)-.25 F EP +%%Page: 6 6 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-6-)279.67 48 S(the contents of the history list.) +72 84 Q/F1 10/Times-Bold@0 SF 2.5(4.2.5. Miscellaneous)72 108 R +(Changes and Impr)2.5 E -.1(ov)-.18 G(ments).1 E F0 .707(Other impro)97 123.6 R +-.15(ve)-.15 G .707(ments include aliases, the).15 F F1(select)3.207 E F0 .708 +(shell language construct, which supports the genera-)3.207 F 1.298 +(tion and presentation of simple menus, and e)72 135.6 R 1.298 +(xtensions to the)-.15 F F1(export)3.798 E F0(and)3.798 E F1 -.18(re)3.798 G +(adonly).18 E F0 -.2(bu)3.798 G 1.298(iltins which allo).2 F(w)-.25 E -.25(va) +72 147.6 S .017(riables to be assigned v).25 F .017 +(alues at the same time the attrib)-.25 F .017(utes are set.)-.2 F -.8(Wo)5.018 +G .018(rd splitting has changed:).8 F .018(if tw)5.018 F 2.518(oo)-.1 G(r) +500.67 147.6 Q .158(more adjacent w)72 159.6 R .157 +(ord splitting characters occur)-.1 F 2.657(,b)-.4 G .157 +(ash and ksh will generate null \214elds; sh mak)264.893 159.6 R .157 +(es runs of mul-)-.1 F .339 +(tiple \214eld separator charactors the same as a single separator)72 171.6 R +5.339(.B)-.55 G .34(ash and ksh split only the results of e)330.89 171.6 R +(xpan-)-.15 E(sion, rather than e)72 183.6 Q -.15(ve)-.25 G(ry w).15 E +(ord as sh does, closing a long-standing shell security hole.)-.1 E 1.234 +(Shell functions in bash and ksh may ha)97 199.2 R 1.534 -.15(ve l)-.2 H 1.234 +(ocal v).15 F 3.734(ariables. V)-.25 F 1.234(ariables declared with)-1.11 F F1 +(typeset)3.734 E F0 1.234(\(or the)3.734 F .001(bash synon)72 211.2 R(ym,)-.15 +E F1(local)2.501 E F0 .001(\), ha)B .301 -.15(ve a s)-.2 H .001 +(cope restricted to the function and its descendents, and may shado).15 F 2.502 +(wv)-.25 G(ariables)472.9 211.2 Q(de\214ned by the in)72 223.2 Q -.2(vo)-.4 G +(king shell.).2 E(Local v)5 E(ariables are remo)-.25 E -.15(ve)-.15 G 2.5(dw) +.15 G(hen a function completes.)317.75 223.2 Q F1 2.5(4.3. F)72 247.2 R(eatur) +-.25 E(es Unique to bash)-.18 E F0(Naturally)97 262.8 Q 2.895(,b)-.65 G .395 +(ash includes features not in sh or ksh.)144.515 262.8 R .395 +(This section discusses some of the features which)5.395 F(mak)72 274.8 Q 2.986 +(eb)-.1 G .486(ash unique.)101.546 274.8 R .486(Most of them pro)5.486 F .486 +(vide impro)-.15 F -.15(ve)-.15 G 2.986(di).15 G(nteracti)288.098 274.8 Q .787 +-.15(ve u)-.25 H .487(se, b).15 F .487(ut a fe)-.2 F 2.987(wp)-.25 G .487 +(rogramming impro)394.653 274.8 R -.15(ve)-.15 G(ments).15 E +(are present as well.)72 286.8 Q +(Full descriptions of these features can be found in the bash documentation.)5 +E F1 2.5(4.3.1. Startup)72 310.8 R(Files)2.5 E F0 .281(Bash e)97 326.4 R -.15 +(xe)-.15 G .281(cutes startup \214les dif).15 F .281 +(ferently than other shells.)-.25 F .281(The bash beha)5.281 F .28 +(vior is a compromise between)-.2 F .116 +(the csh principle of startup \214les with \214x)72 338.4 R .116(ed names e) +-.15 F -.15(xe)-.15 G .116(cuted for each shell and the sh `).15 F +(`minimalist')-.74 E 2.616('b)-.74 G(eha)472.26 338.4 Q(vior)-.2 E(.)-.55 E +2.956(An interacti)72 350.4 R 3.256 -.15(ve i)-.25 H 2.956 +(nstance of bash started as a login shell reads and e).15 F -.15(xe)-.15 G +(cutes).15 E/F2 10/Times-Italic@0 SF(~/.bash_pr)5.455 E(o\214le)-.45 E F0 2.955 +(\(the \214le)7.121 F F2(.bash_pr)72 362.4 Q(o\214le)-.45 E F0 .835 +(in the user')5 F 3.335(sh)-.55 G .835(ome directory\), if it e)187.385 362.4 R +3.335(xists. An)-.15 F(interacti)3.335 E 1.135 -.15(ve n)-.25 H .835 +(on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E F2(~/.bashr)72 +374.4 Q(c)-.37 E F0 5.538(.A)1.666 G(non-interacti)127.422 374.4 Q .838 -.15 +(ve s)-.25 H .538(hell \(one be).15 F .538(gun to e)-.15 F -.15(xe)-.15 G .538 +(cute a shell script, for e).15 F .537(xample\) reads no \214x)-.15 F .537 +(ed startup)-.15 F .139(\214le, b)72 386.4 R .139(ut uses the v)-.2 F .139 +(alue of the v)-.25 F(ariable)-.25 E F1(ENV)2.639 E F0 2.639(,i)C 2.639(fs) +253.361 386.4 S .139(et, as the name of a startup \214le.)263.22 386.4 R .139 +(The ksh practice of reading)5.139 F F1($ENV)72 398.4 Q F0 .69(for e)3.19 F +-.15(ve)-.25 G .69(ry shell, with the accompan).15 F .689(ying dif)-.15 F .689 +(\214culty of de\214ning the proper v)-.25 F .689(ariables and functions for) +-.25 F(interacti)72 410.4 Q .946 -.15(ve a)-.25 H .646(nd non-interacti).15 F +.946 -.15(ve s)-.25 H .646(hells or ha).15 F .646 +(ving the \214le read only for interacti)-.2 F .946 -.15(ve s)-.25 H .646 +(hells, w).15 F .646(as considered too)-.1 F(comple)72 422.4 Q(x.)-.15 E F1 2.5 +(4.3.2. New)72 446.4 R(Builtin Commands)2.5 E F0 1.119(There are a fe)97 462 R +3.619(wb)-.25 G 1.118(uiltins which are ne)170.986 462 R 3.618(wo)-.25 G 3.618 +(rh)268.528 462 S -2.25 -.2(av e)280.476 462 T 1.118(been e)3.818 F 1.118 +(xtended in bash.)-.15 F(The)6.118 E F1(enable)3.618 E F0 -.2(bu)3.618 G 1.118 +(iltin allo).2 F(ws)-.25 E -.2(bu)72 474 S .736 +(iltin commands to be turned on and of).2 F 3.236(fa)-.25 G(rbitrarily)250.198 +474 Q 5.736(.T)-.65 G 3.237(ou)298.644 474 S .737(se the v)311.881 474 R .737 +(ersion of)-.15 F F2(ec)3.237 E(ho)-.15 E F0 .737(found in a user')4.903 F +3.237(ss)-.55 G(earch)482.35 474 Q .013(path rather than the bash b)72 486 R +(uiltin,)-.2 E/F3 10/Courier@0 SF .013(enable -n echo)2.513 F F0(suf)2.513 E +2.513(\214ces. The)-.25 F F1(help)2.513 E F0 -.2(bu)2.513 G .013(iltin pro).2 F +.013(vides quick synopses of)-.15 F 1.382(the shell f)72 498 R 1.382 +(acilities without requiring access to a manual page.)-.1 F F1(Builtin)6.382 E +F0 1.383(is similar to)3.882 F F1(command)3.883 E F0 1.383(in that it)3.883 F +.342(bypasses shell functions and directly e)72 510 R -.15(xe)-.15 G .342 +(cutes b).15 F .342(uiltin commands.)-.2 F .342 +(Access to a csh-style stack of directories)5.342 F .072(is pro)72 522 R .073 +(vided via the)-.15 F F1(pushd)2.573 E F0(,)A F1(popd)2.573 E F0 2.573(,a)C(nd) +211.197 522 Q F1(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2 E F1(Pushd)5.073 E +F0(and)2.573 E F1(popd)2.573 E F0 .073(insert and remo)2.573 F .373 -.15(ve d) +-.15 H .073(irectories from the).15 F .094(stack, respecti)72 534 R -.15(ve) +-.25 G(ly).15 E 2.594(,a)-.65 G(nd)154.448 534 Q F1(dirs)2.594 E F0 .094 +(lists the stack contents.The)2.594 F F1(suspend)2.594 E F0 .094 +(command will stop the shell process when)2.594 F 1.329(job control is acti)72 +546 R -.15(ve)-.25 G 3.829(;m).15 G 1.329(ost other shells do not allo)169.136 +546 R 3.829(wt)-.25 G(hemselv)294.64 546 Q 1.33(es to be stopped lik)-.15 F +3.83(et)-.1 G(hat.)421.31 546 Q F1 -.74(Ty)6.33 G(pe,).74 E F0 1.33(the bash) +3.83 F(answer to)72 558 Q F1(which)2.5 E F0(and)2.5 E F1(whence,)2.5 E F0(sho) +2.5 E(ws what will happen when a w)-.25 E(ord is typed as a command:)-.1 E F3 6 +($t)97 576 S(ype export)115 576 Q(export is a shell builtin)97 588 Q 6($t)97 +600 S(ype -t export)115 600 Q(builtin)97 612 Q 6($t)97 624 S(ype bash)115 624 Q +(bash is /bin/bash)97 636 Q 6($t)97 648 S(ype cd)115 648 Q(cd is a function)97 +660 Q(cd \(\))97 672 Q({)97 684 Q(builtin cd "$@" && xtitle $HOST: $PWD)121 696 +Q(})97 708 Q EP +%%Page: 7 7 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-7-)279.67 48 S -1.11(Va)72 84 S .682 +(rious modes tell what a command w)1.11 F .681(ord is \(reserv)-.1 F .681(ed w) +-.15 F .681(ord, alias, function, b)-.1 F .681(uiltin, or \214le\) or which v) +-.2 F(er)-.15 E(-)-.2 E 1.15(sion of a command will be e)72 96 R -.15(xe)-.15 G +1.15(cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)305.7 96 R +1.15(Some of this functionality has been)6.15 F +(adopted by POSIX.2 and folded into the)72 108 Q/F1 10/Times-Bold@0 SF(command) +2.5 E F0(utility)2.5 E(.)-.65 E F1 2.5(4.3.3. Editing)72 132 R(and Completion) +2.5 E F0 .682(One area in which bash shines is command line editing.)97 147.6 R +.682(Bash uses the)5.682 F/F2 10/Times-Italic@0 SF -.37(re)3.182 G(adline).37 E +F0 .682(library to read and)4.848 F .102(edit lines when interacti)72 159.6 R +-.15(ve)-.25 G 5.102(.R).15 G .103(eadline is a po)191.438 159.6 R .103 +(werful and \215e)-.25 F .103(xible input f)-.15 F .103 +(acility that a user can con\214gure to his)-.1 F 2.506(tastes. It)72 171.6 R +(allo)2.506 E .006(ws lines to be edited using either emacs or vi commands, wh\ +ere those commands are appropri-)-.25 F 2.994(ate. The)72 183.6 R .494 +(full capability of emacs is not present \255 there is no w)2.994 F .495 +(ay to e)-.1 F -.15(xe)-.15 G .495(cute a named command with M-x,).15 F .222 +(for instance \255 b)72 195.6 R .222(ut the e)-.2 F .222 +(xisting commands are more than adequate.)-.15 F .221 +(The vi mode is compliant with the com-)5.222 F +(mand line editing standardized by POSIX.2.)72 207.6 Q 1.69 +(Readline is fully customizable.)97 223.2 R 1.691 +(In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H 1.691 +(indings, the library).15 F(allo)72 235.2 Q .83 +(ws users to de\214ne additional k)-.25 F 1.13 -.15(ey b)-.1 H .83 +(indings using a startup \214le.).15 F(The)5.83 E F2(inputr)3.329 E(c)-.37 E F0 +.829(\214le, which def)4.995 F .829(aults to the)-.1 F(\214le)72 247.2 Q F2 +(~/.inputr)4.287 E(c)-.37 E F0 4.287(,i)1.666 G 4.287(sr)137.43 247.2 S 1.788(\ +ead each time readline initializes, permitting users to maintain a consistent \ +interf)148.937 247.2 R(ace)-.1 E .547(across a set of programs.)72 259.2 R .546 +(Readline includes an e)5.546 F .546(xtensible interf)-.15 F .546 +(ace, so each program using the library can)-.1 F .23(add its o)72 271.2 R .23 +(wn bindable commands and program-speci\214c k)-.25 F .531 -.15(ey b)-.1 H +2.731(indings. Bash).15 F .231(uses this f)2.731 F .231 +(acility to add bindings)-.1 F(that perform history e)72 283.2 Q +(xpansion or shell w)-.15 E(ord e)-.1 E(xpansions on the current input line.) +-.15 E .707(Readline interprets a number of v)97 298.8 R .706 +(ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G .706 +(ariables e)408.432 298.8 R .706(xist to control)-.15 F .157 +(whether or not eight-bit characters are directly read as input or con)72 310.8 +R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F .458 -.15 +(ey s)-.1 H .158(equences \(a).15 F(meta-pre\214x)72 322.8 Q 1.575(ed k)-.15 F +1.875 -.15(ey s)-.1 H 1.575 +(equence consists of the character with the eighth bit zeroed, preceded by the) +.15 F F2(meta-)4.074 E(pr)72 334.8 Q(e\214x)-.37 E F0(character)4.45 E 2.784 +(,u)-.4 G .284(sually escape, which selects an alternate k)145.374 334.8 R -.15 +(ey)-.1 G .285(map\), to decide whether to output characters).15 F .485 +(with the eighth bit set directly or as a meta-pre\214x)72 346.8 R .485(ed k) +-.15 F .784 -.15(ey s)-.1 H .484(equence, whether or not to wrap to a ne).15 F +2.984(ws)-.25 G(creen)482.35 346.8 Q .157 +(line when a line being edited is longer than the screen width, the k)72 358.8 +R -.15(ey)-.1 G .158(map to which subsequent k).15 F .458 -.15(ey b)-.1 H +(indings).15 E .531(should apply)72 370.8 R 3.031(,o)-.65 G 3.031(re)133.802 +370.8 S -.15(ve)144.353 370.8 S 3.031(nw).15 G .531 +(hat happens when readline w)168.894 370.8 R .531(ants to ring the terminal') +-.1 F 3.03(sb)-.55 G 3.03(ell. All)399.37 370.8 R .53(of these v)3.03 F +(ariables)-.25 E(can be set in the inputrc \214le.)72 382.8 Q .284 +(The startup \214le understands a set of C preprocessor)97 398.4 R(-lik)-.2 E +2.785(ec)-.1 G .285(onditional constructs which allo)329.49 398.4 R 2.785(wv) +-.25 G(ariables)472.9 398.4 Q .12(or k)72 410.4 R .42 -.15(ey b)-.1 H .119(ind\ +ings to be assigned based on the application using readline, the terminal curr\ +ently being used, or).15 F .316(the editing mode.)72 422.4 R .317 +(Users can add program-speci\214c bindings to mak)5.317 F 2.817(et)-.1 G .317 +(heir li)352.808 422.4 R -.15(ve)-.25 G 2.817(se).15 G 2.817(asier: here) +396.922 422.4 R .317(are bindings to)2.817 F(edit the v)72 434.4 Q(alue of)-.25 +E F1 -.74(PA)2.5 G(TH)-.21 E F0(and double-quote the current or pre)2.5 E +(vious w)-.25 E(ord:)-.1 E/F3 10/Courier@0 SF 6(#M)97 452.4 S +(acros that are convenient for shell interaction)115 452.4 Q($if Bash)97 464.4 +Q 6(#e)97 476.4 S(dit the path)115 476.4 Q +("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 488.4 Q 6(#p)97 500.4 S +(repare to type a quoted word -- insert open and close double quotes)115 500.4 +Q 6(#a)97 512.4 S(nd move to just after the open quote)115 512.4 Q +("\\C-x\\"": "\\"\\"\\C-b")97 524.4 Q 6(#Q)97 536.4 S +(uote the current or previous word)115 536.4 Q("\\C-xq": "\\eb\\"\\ef\\"")97 +548.4 Q($endif)97 560.4 Q F0 .322(There is a readline command to re-read the \ +\214le, so users can edit the \214le, change some bindings, and be)72 582 R +(gin)-.15 E(to use them almost immediately)72 594 Q(.)-.65 E .851 +(Bash implements the)97 609.6 R F1(bind)3.351 E F0 -.2(bu)3.351 G .851 +(iltin for more dyamic control of readline than the startup \214le permits.).2 +F F1(Bind)72 621.6 Q F0 .167(is used in se)2.667 F -.15(ve)-.25 G .167(ral w) +.15 F 2.667(ays. In)-.1 F F2(list)2.667 E F0 .167 +(mode, it can display the current k)4.333 F .466 -.15(ey b)-.1 H .166 +(indings, list all the readline edit-).15 F .149(ing directi)72 633.6 R -.15 +(ve)-.25 G 2.649(sa).15 G -.25(va)132.798 633.6 S .149 +(ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G -1.9 -.4 +(nv o)282.352 633.6 T .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65(nd).25 G +(irecti)345.3 633.6 Q -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)385.04 633.6 S .15 +(utput the current set of k)396.02 633.6 R -.15(ey)-.1 G .526(bindings in a fo\ +rmat that can be incorporated directly into an inputrc \214le.)72 645.6 R(In) +5.526 E F2(batc)3.026 E(h)-.15 E F0 .526(mode, it reads a series)4.692 F .71 +(of k)72 657.6 R 1.01 -.15(ey b)-.1 H .71 +(indings directly from a \214le and passes them to readline.).15 F .71 +(In its most common usage,)5.71 F F1(bind)3.21 E F0(tak)3.21 E .71(es a)-.1 F +.534(single string and passes it directly to readline, which interprets the li\ +ne as if it had just been read from the)72 669.6 R(inputrc \214le.)72 681.6 Q +(Both k)5 E .3 -.15(ey b)-.1 H(indings and v).15 E +(ariable assignments can appear in the string gi)-.25 E -.15(ve)-.25 G 2.5(nt) +.15 G(o)424.4 681.6 Q F1(bind)2.5 E F0(.)A .401(The readline library also pro) +97 697.2 R .402(vides an interf)-.15 F .402(ace for)-.1 F F2(wor)2.902 E 2.902 +(dc)-.37 G(ompletion)328.546 697.2 Q F0 5.402(.W)C .402(hen the)385.888 697.2 R +F2(completion)2.902 E F0(character)4.568 E 1.261(\(usually T)72 709.2 R 1.261 +(AB\) is typed, readline looks at the w)-.93 F 1.26 +(ord currently being entered and computes the set of \214le-)-.1 F .523 +(names of which the current w)72 721.2 R .523(ord is a v)-.1 F .523 +(alid pre\214x.)-.25 F .524 +(If there is only one possible completion, the rest of the)5.523 F EP +%%Page: 8 8 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-8-)279.67 48 S .358 +(characters are inserted directly)72 84 R 2.858(,o)-.65 G .358(therwise the co\ +mmon pre\214x of the set of \214lenames is added to the current)205.232 84 R +-.1(wo)72 96 S 3.199(rd. A).1 F .699(second T)3.199 F .699(AB character entere\ +d immediately after a non-unique completion causes readline to list)-.93 F +1.814(the possible completions; there is an option to ha)72 108 R 2.113 -.15 +(ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65 G 1.813 +(eadline pro)436.517 108 R(vides)-.15 E .482 +(hooks so that applications can pro)72 120 R .482 +(vide speci\214c types of completion before the def)-.15 F .483 +(ault \214lename completion)-.1 F .132(is attempted.)72 132 R .132 +(This is quite \215e)5.132 F .132(xible, though it is not completely user)-.15 +F 2.632(-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F +.37(complete \214lenames, command names \(including aliases, b)72 144 R .37 +(uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37(ords, shell functions, and)-.1 +F -.15(exe)72 156 S .424(cutables found in the \214le system\), shell v).15 F +.424(ariables, usernames, and hostnames.)-.25 F .423 +(It uses a set of heuristics)5.424 F(that, while not perfect, is generally qui\ +te good at determining what type of completion to attempt.)72 168 Q/F1 10 +/Times-Bold@0 SF 2.5(4.3.4. History)72 192 R F0 .255 +(Access to the list of commands pre)97 207.6 R .255(viously entered \(the)-.25 +F/F2 10/Times-Italic@0 SF .255(command history)2.755 F F0 2.756(\)i)C 2.756(sp) +399.236 207.6 S(ro)410.882 207.6 Q .256(vided jointly by bash)-.15 F .095 +(and the readline library)72 219.6 R 5.094(.B)-.65 G .094(ash pro)178.928 219.6 +R .094(vides v)-.15 F .094(ariables \()-.25 F F1(HISTFILE)A F0(,)A F1(HISTSIZE) +2.594 E F0 2.594(,a)C(nd)382.068 219.6 Q F1(HISTCONTR)2.594 E(OL)-.3 E F0 2.594 +(\)a)C .094(nd the)479.186 219.6 R F1(history)72 231.6 Q F0(and)2.825 E F1(fc) +2.825 E F0 -.2(bu)2.825 G .325(iltins to manipulate the history list.).2 F .325 +(The v)5.325 F .325(alue of)-.25 F F1(HISTFILE)2.825 E F0 .326 +(specifes the \214le where bash)2.826 F .128(writes the command history on e)72 +243.6 R .128(xit and reads it on startup.)-.15 F F1(HISTSIZE)5.128 E F0 .128 +(is used to limit the number of com-)2.628 F .346(mands sa)72 255.6 R -.15(ve) +-.2 G 2.846(di).15 G 2.846(nt)129.002 255.6 S .346(he history)139.628 255.6 R +(.)-.65 E F1(HISTCONTR)5.346 E(OL)-.3 E F0(pro)2.846 E .346 +(vides a crude form of control o)-.15 F -.15(ve)-.15 G 2.846(rw).15 G .346 +(hich commands are)425.548 255.6 R(sa)72 267.6 Q -.15(ve)-.2 G 2.905(do).15 G +2.905(nt)102.325 267.6 S .405(he history list: a v)113.01 267.6 R .405(alue of) +-.25 F F2(ignor)2.905 E(espace)-.37 E F0 .405(means to not sa)4.571 F .705 -.15 +(ve c)-.2 H .405(ommands which be).15 F .405(gin with a space; a)-.15 F -.25 +(va)72 279.6 S .339(lue of).25 F F2(ignor)2.839 E(edups)-.37 E F0 .339 +(means to not sa)4.505 F .64 -.15(ve c)-.2 H .34 +(ommands identical to the last command sa).15 F -.15(ve)-.2 G(d.).15 E F1 +(HISTCONTR)5.34 E(OL)-.3 E F0 -.1(wa)72 291.6 S 3.15(sn).1 G(amed)95.6 291.6 Q +F1(history_contr)3.15 E(ol)-.18 E F0 .65(in earlier v)3.15 F .649 +(ersions of bash; the old name is still accepted for backw)-.15 F .649 +(ards com-)-.1 F(patibility)72 303.6 Q 5.723(.T)-.65 G(he)121.803 303.6 Q F1 +(history)3.223 E F0 .724(command can read or write \214les containing the hist\ +ory list and display the current)3.223 F .895(list contents.)72 315.6 R(The) +5.895 E F1(fc)3.395 E F0 -.2(bu)3.395 G .895 +(iltin, adopted from POSIX.2 and the K).2 F .894(orn Shell, allo)-.35 F .894 +(ws display and re-e)-.25 F -.15(xe)-.15 G(cution,).15 E .461 +(with optional editing, of commands from the history list.)72 327.6 R .462 +(The readline library of)5.462 F .462(fers a set of commands to)-.25 F .657(se\ +arch the history list for a portion of the current input line or a string type\ +d by the user)72 339.6 R 5.657(.F)-.55 G(inally)445.836 339.6 Q 3.157(,t)-.65 G +(he)476.403 339.6 Q F2(his-)3.157 E(tory)72 351.6 Q F0(library)4.196 E 2.53(,g) +-.65 G .03(enerally incorporated directly into the readline library)128.346 +351.6 R 2.53(,i)-.65 G .03(mplements a f)350.636 351.6 R .031 +(acility for history recall,)-.1 F -.15(ex)72 363.6 S .594(pansion, and re-e) +.15 F -.15(xe)-.15 G .594(cution of pre).15 F .594(vious commands v)-.25 F .594 +(ery similar to csh \(`)-.15 F .593(`bang history')-.74 F .593 +(', so called because)-.74 F(the e)72 375.6 Q +(xclamation point introduces a history substitution\):)-.15 E/F3 10/Courier@0 +SF 6($e)97 393.6 S(cho a b c d e)115 393.6 Q 6(abcde)97 405.6 S 6($!)97 417.6 S +6(!fghi)115 417.6 S(echo a b c d e f g h i)97 429.6 Q 6(abcdefghi)97 441.6 S 6 +($!)97 453.6 S(-2)115 453.6 Q(echo a b c d e)97 465.6 Q 6(abcde)97 477.6 S 6 +($e)97 489.6 S(cho !-2:1-4)115 489.6 Q(echo a b c d)97 501.6 Q 6(abcd)97 513.6 +S F0 1.456(The command history is only sa)72 535.2 R -.15(ve)-.2 G 3.957(dw).15 +G 1.457(hen the shell is interacti)232.599 535.2 R -.15(ve)-.25 G 3.957(,s).15 +G 3.957(oi)352.804 535.2 S 3.957(ti)364.541 535.2 S 3.957(sn)374.058 535.2 S +1.457(ot a)386.905 535.2 R -.25(va)-.2 G 1.457(ilable for use by shell).25 F +(scripts.)72 547.2 Q F1 2.5(4.3.5. New)72 571.2 R(Shell V)2.5 E(ariables)-.92 E +F0 .701(There are a number of con)97 586.8 R -.15(ve)-.4 G .701(nience v).15 F +.701(ariables that bash interprets to mak)-.25 F 3.2(el)-.1 G .7(ife easier) +402.76 586.8 R 5.7(.T)-.55 G .7(hese include)453.59 586.8 R F1(FIGNORE)72 598.8 +Q F0 3.973(,w)C 1.473(hich is a set of \214lename suf)132.363 598.8 R<8c78>-.25 +E 1.474(es identifying \214les to e)-.15 F 1.474 +(xclude when completing \214lenames;)-.15 F F1(HOSTTYPE)72 610.8 Q F0 3.03(,w)C +.53(hich is automatically set to a string describing the type of hardw)139.21 +610.8 R .53(are on which bash is cur)-.1 F(-)-.2 E .76(rently e)72 622.8 R -.15 +(xe)-.15 G(cuting;).15 E F1(OSTYPE)3.26 E F0 3.26(,t)C 3.26(ow)191.76 622.8 S +.76(hich bash assigns a v)207.24 622.8 R .761(alue that identi\214es the v)-.25 +F .761(ersion of)-.15 F/F4 9/Times-Roman@0 SF(UNIX)3.261 E F0(it')3.261 E 3.261 +(sr)-.55 G(unning)476.22 622.8 Q 1.354 +(on \(great for putting architecture-speci\214c binary directories into the)72 +634.8 R F1 -.74(PA)3.854 G(TH)-.21 E F0 1.354(\); and)B F1(IGNOREEOF)3.854 E F0 +3.854(,w)C(hose)485.67 634.8 Q -.25(va)72 646.8 S .062 +(lue indicates the number of consecuti).25 F .362 -.15(ve E)-.25 H .062 +(OF characters that an interacti).15 F .362 -.15(ve s)-.25 H .062 +(hell will read before e).15 F .062(xiting \255)-.15 F .114(an easy w)72 658.8 +R .113(ay to k)-.1 F .113(eep yourself from being logged out accidentally)-.1 F +5.113(.T)-.65 G(he)344.285 658.8 Q F1(auto_r)2.613 E(esume)-.18 E F0 -.25(va) +2.613 G .113(riable alters the w).25 F(ay)-.1 E .409 +(the shell treats simple command names: if job control is acti)72 670.8 R -.15 +(ve)-.25 G 2.909(,a).15 G .409(nd this v)335.516 670.8 R .409 +(ariable is set, single-w)-.25 F .409(ord simple)-.1 F .17(commands without re\ +directions cause the shell to \214rst look for a suspended job with that name \ +before start-)72 682.8 R(ing a ne)72 694.8 Q 2.5(wp)-.25 G(rocess.)118.13 694.8 +Q EP +%%Page: 9 9 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-9-)279.67 48 S/F1 10/Times-Bold@0 SF 2.5 +(4.3.6. Brace)72 84 R(Expansion)2.5 E F0 .653(Since sh of)97 99.6 R .653 +(fers no con)-.25 F -.15(ve)-.4 G .653(nient w).15 F .653 +(ay to generate arbitrary strings that share a common pre\214x or suf)-.1 F +<8c78>-.25 E 1.893(\(pathname e)72 111.6 R 1.893 +(xpansion requires that the \214lenames e)-.15 F 1.892(xist\), bash implements) +-.15 F/F2 10/Times-Italic@0 SF(br)4.392 E 1.892(ace e)-.15 F(xpansion)-.2 E F0 +4.392(,ac)C(apability)469 111.6 Q(pick)72 123.6 Q .496(ed up from csh.)-.1 F +.496(Brace e)5.496 F .496(xpansion is similar to pathname e)-.15 F .496 +(xpansion, b)-.15 F .497(ut the strings generated need not)-.2 F 1.107 +(correspond to e)72 135.6 R 1.107(xisting \214les.)-.15 F 3.607(Ab)6.107 G +1.107(race e)207.655 135.6 R 1.107(xpression consists of an optional)-.15 F F2 +(pr)3.606 E(eamble)-.37 E F0 3.606(,f)1.666 G(ollo)419.286 135.6 Q 1.106 +(wed by a pair of)-.25 F 2.809 +(braces enclosing a series of comma-separated strings, and an optional)72 147.6 +R F2(postamble)5.31 E F0 7.81(.T)1.666 G 2.81(he preamble is)440.06 147.6 R(pr\ +epended to each string within the braces, and the postamble is then appended t\ +o each resulting string:)72 159.6 Q/F3 10/Courier@0 SF 6($e)97 177.6 S +(cho a{d,c,b}e)115 177.6 Q(ade ace abe)97 189.6 Q F1 2.5(4.3.7. Pr)72 219.6 R +(ompt Customization)-.18 E F0 .077(One of the more popular interacti)97 235.2 R +.376 -.15(ve f)-.25 H .076(eatures that bash pro).15 F .076 +(vides is the ability to customize the prompt.)-.15 F(Both)72 247.2 Q F1(PS1) +3.305 E F0(and)3.305 E F1(PS2,)3.305 E F0 .805 +(the primary and secondary prompts, are e)3.305 F .805 +(xpanded before being displayed.)-.15 F -.15(Pa)5.805 G(rameter).15 E .324 +(and v)72 259.2 R .324(ariable e)-.25 F .324 +(xpansion is performed when the prompt string is e)-.15 F .323 +(xpanded, so the v)-.15 F .323(alue of an)-.25 F 2.823(ys)-.15 G .323(hell v) +454.217 259.2 R(ariable)-.25 E .728(can be put into the prompt \(e.g.,)72 271.2 +R F1($SHL)3.228 E(VL)-.92 E F0 3.228(,w)C .728(hich indicates ho)258.564 271.2 +R 3.228(wd)-.25 G .729(eeply the current shell is nested\).)342.988 271.2 R +(Bash)5.729 E 1.895 +(specially interprets characters in the prompt string preceded by a backslash.) +72 283.2 R 1.895(Some of these backslash)6.895 F .874 +(escapes are replaced with the current time, the date, the current w)72 295.2 R +.874(orking directory)-.1 F 3.374(,t)-.65 G .874(he username, and the)416.958 +295.2 R .781(command number or history number of the command being entered.)72 +307.2 R .78(There is e)5.781 F -.15(ve)-.25 G 3.28(nab).15 G .78 +(ackslash escape to)429.13 307.2 R .007 +(cause the shell to change its prompt when running as root after an)72 319.2 R +F2(su)2.507 E F0 5.007(.B)C .008(efore printing each primary prompt,)360.388 +319.2 R .27(bash e)72 331.2 R .27(xpands the v)-.15 F(ariable)-.25 E F1(PR)2.77 +E(OMPT_COMMAND)-.3 E F0 .269(and, if it has a v)2.77 F .269(alue, e)-.25 F -.15 +(xe)-.15 G .269(cutes the e).15 F .269(xpanded v)-.15 F .269(alue as a)-.25 F +.04(command, allo)72 343.2 R .041(wing additional prompt customization.)-.25 F +-.15(Fo)5.041 G 2.541(re).15 G .041 +(xample, this assignment causes the current user)311.964 343.2 R(,)-.4 E .99 +(the current host, the time, the last component of the current w)72 355.2 R +.989(orking directory)-.1 F 3.489(,t)-.65 G .989(he le)402.954 355.2 R -.15(ve) +-.25 G 3.489(lo).15 G 3.489(fs)443.412 355.2 S .989(hell nesting,)454.121 355.2 +R(and the history number of the current command to be embedded into the primar\ +y prompt:)72 367.2 Q F3 6($P)97 385.2 S +(S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')115 385.2 Q +(chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 397.2 Q +(chet@odin [21:03:54] src\(2:637\)$)97 409.2 Q F0 .619 +(The string being assigned is surrounded by single quotes so that if it is e)72 +430.8 R(xported,)-.15 E F1(SHL)3.119 E(VL)-.92 E F0 .619(will be updated)3.119 +F(by a child shell:)72 442.8 Q F3 +(chet@odin [21:13:35] src\(2:638\)$ export PS1)97 460.8 Q +(chet@odin [21:17:40] src\(2:639\)$ bash)97 472.8 Q +(chet@odin [21:17:46] src\(3:696\)$)97 484.8 Q F0(The)72 506.4 Q F1(\\$)2.5 E +F0(escape is displayed as `)2.5 E(`)-.74 E F1($)A F0 1.48 -.74('' w)D +(hen running as a normal user).74 E 2.5(,b)-.4 G(ut as `)342.08 506.4 Q(`)-.74 +E F1(#)A F0 1.48 -.74('' w)D(hen running as root.).74 E F1 2.5(4.3.8. POSIX)72 +530.4 R(Mode)2.5 E F0 .46(Although bash is intended to be POSIX.2 compliant, t\ +here are areas in which the def)97 546 R .46(ault beha)-.1 F .46(vior is)-.2 F +1.168(not compatible with the standard.)72 558 R -.15(Fo)6.169 G 3.669(ru).15 G +1.169(sers who wish to operate in a strict POSIX.2 en)238.85 558 R 1.169 +(vironment, bash)-.4 F .61(implements a)72 570 R F2 .61(POSIX mode)3.11 F F0 +5.61(.W)C .61(hen this mode is acti)199.42 570 R -.15(ve)-.25 G 3.109(,b).15 G +.609(ash modi\214es its def)303.727 570 R .609(ault operation where it dif)-.1 +F(fers)-.25 E .066(from POSIX.2 to match the standard.)72 582 R .067 +(POSIX mode is entered when bash is started with the)5.066 F F1 .067(-o posix) +2.567 F F0(option)2.567 E .382(or when)72 594 R F1 .382(set -o posix)2.882 F F0 +.381(is e)2.881 F -.15(xe)-.15 G 2.881(cuted. F).15 F .381 +(or compatibility with other GNU softw)-.15 F .381 +(are that attempts to be POSIX.2)-.1 F 5.752 +(compliant, bash also enters POSIX mode if either of the v)72 606 R(ariables) +-.25 E F1(POSIX_PED)8.253 E(ANTIC)-.35 E F0(or)8.253 E F1(POSIXL)72 618 Q +(Y_CORRECT)-.92 E F0 1.179(is set when bash is started or assigned a v)3.679 F +1.178(alue during e)-.25 F -.15(xe)-.15 G 3.678(cution. When).15 F 1.178 +(bash is)3.678 F .218(started in POSIX mode, for e)72 630 R .218(xample, the) +-.15 F F1(kill)2.718 E F0 -.2(bu)2.718 G(iltin').2 E(s)-.55 E F12.718 E +F0 .218(option beha)2.718 F -.15(ve)-.2 G 2.718(sd).15 G(if)370.166 630 Q .219 +(ferently: it lists the names of all)-.25 F 1.084(signals on a single line sep\ +arated by spaces, rather than listing the signal names and their corresponding) +72 642 R(numbers.)72 654 Q .865(Some of the def)97 669.6 R .865(ault bash beha) +-.1 F .865(vior dif)-.2 F .865 +(fers from other shells as a result of the POSIX standard.)-.25 F -.15(Fo)5.866 +G(r).15 E 1.16(instance, bash includes the)72 681.6 R F1(!)3.66 E F0(reserv) +6.16 E 1.16(ed w)-.15 F 1.16(ord to ne)-.1 F -.05(ga)-.15 G 1.16 +(te the return status of a pipeline because it has been).05 F +(de\214ned by POSIX.2.)72 693.6 Q +(Neither sh nor ksh has implemented that feature.)5 E EP +%%Page: 10 10 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(0-)288 48 S/F1 10/Times-Bold@0 +SF 2.5(4.4. F)72 84 R(eatur)-.25 E(es Unique to ksh)-.18 E F0 .177 +(Ksh includes a number of features not in the currently-released v)97 99.6 R +.178(ersion of bash, v)-.15 F .178(ersion 1.14.)-.15 F(Unless)5.178 E .822 +(noted, none of these features is in the POSIX.2 standard.)72 111.6 R .821 +(Where appropriate the equi)5.821 F -.25(va)-.25 G .821(lent bash features).25 +F(are noted.)72 123.6 Q F1 2.5(4.4.1. The)72 147.6 R(ksh Language)2.5 E F0 +2.955(An)97 163.2 S .955 -.25(ew c)112.175 163.2 T .455(ompound command folds) +.25 F F1(test)2.955 E F0 .456(into the ksh language, delimited by the reserv) +2.955 F .456(ed w)-.15 F(ords)-.1 E F1([[)2.956 E F0(and)2.956 E F1(]])72 175.2 +Q F0 5.726(.T)C .726(he syntax is identical to)92.996 175.2 R F1(test)3.225 E +F0 .725(with a fe)3.225 F 3.225(wc)-.25 G .725 +(hanges: for instance, instead of)262.855 175.2 R F13.225 E F0(and)3.225 +E F13.225 E F0(,)A F1(&&)3.225 E F0(and)3.225 E/F2 10/Symbol SF +3.225 E F0(are)3.225 E 3.32(used. The)72 187.2 R -.1(wo)3.32 G .82(rds between) +.1 F F1([[)3.32 E F0(and)3.32 E F1(]])3.32 E F0 .82(are not processed for w) +3.32 F .82(ord splitting or \214lename generation.)-.1 F .82(The ne)5.82 F(w) +-.25 E .926 +(command does pattern matching as well as string comparison, a la the)72 199.2 +R F1(case)3.425 E F0 3.425(command. This)3.425 F(ne)3.425 E 3.425(wc)-.25 G +(ontrol)480.11 199.2 Q .165(structure does ha)72 211.2 R .465 -.15(ve t)-.2 H +.165(he adv).15 F .166(antage of reducing common ar)-.25 F .166 +(gument problems encountered using test \(e.g.)-.18 F F1(test)2.666 E +("$string")72 223.2 Q F0 2.928(,w)C(here)125.748 223.2 Q F1($string)2.928 E F0 +-.15(ex)2.928 G .428(pands to).15 F F12.928 E F0 .428(\), b)B .428 +(ut at the cost of bloating the language.)-.2 F .427(The POSIX.2 test algo-) +5.427 F 2.752(rithm that bash uses, along with some programmer care, alle)72 +235.2 R 2.752(viates those problems in a backw)-.25 F(ards-)-.1 E .854 +(compatible w)72 247.2 R .853(ay with no additions to the language.)-.1 F .853 +(The one capability of)5.853 F F1 .853([[ ]])3.353 F F0 .853(not a)3.353 F -.25 +(va)-.2 G .853(ilable in bash is its).25 F(ability to test whether an indi)72 +259.2 Q(vidual)-.25 E F1(set \255o)2.5 E F0(option is turned on or of)2.5 E(f.) +-.25 E .339(Other parts of the ksh language are not common to bash.)97 274.8 R +(The)5.34 E F1(\(\(...\)\))2.84 E F0(operator)5.34 E 2.84(,e)-.4 G(qui)419.33 +274.8 Q -.25(va)-.25 G .34(lent to).25 F F1 .34(let "...")2.84 F F0(,)A .197 +(is unique to ksh, as are the concept of co-processes and the)72 286.8 R F1 +(time)2.697 E F0 -.1(ke)2.696 G(yw)-.05 E .196 +(ord to time commands and pipelines.)-.1 F F1 2.5(4.4.2. Functions)72 310.8 R +(and Aliases)2.5 E F0 1.022(The K)97 326.4 R 1.022(orn shell has)-.35 F/F3 10 +/Times-Italic@0 SF(autoloaded)3.522 E F0 3.522(functions. A)3.522 F 1.022 +(function mark)3.522 F 1.022(ed as)-.1 F F3(autoload)3.522 E F0 1.022 +(is not de\214ned until it is)5.188 F 1.042(\214rst e)72 338.4 R -.15(xe)-.15 G +3.542(cuted. When).15 F 1.042(such a function is e)3.542 F -.15(xe)-.15 G 1.042 +(cuted, a search is made through the directories in).15 F F1(FP)3.541 E -.95 +(AT)-.74 G(H).95 E F0(\(a)3.541 E .27 +(colon-separated list of directories similar to)72 350.4 R F1 -.74(PA)2.77 G +(TH)-.21 E F0 2.77(\)f)C .27(or a \214le with the same name as the function.) +285.78 350.4 R .27(That \214le)5.27 F .548(is then read in as with the)72 362.4 +R F1(.)3.881 E F0 .547(command; presumably the function is de\214ned therein.) +3.047 F .547(There is a pair of shell)5.547 F .886 +(functions included in the bash distrib)72 374.4 R .886(ution \()-.2 F F3 -.2 +(ex)C(amples/functions/autoload).2 E F0 5.886(\)t)C .886(hat pro)378.35 374.4 R +.886(vide much of this func-)-.15 F +(tionality without changing the shell itself.)72 386.4 Q .116 +(Ksh functions are scoped in such a w)97 402 R .116(ay that the en)-.1 F .116 +(vironment in which the)-.4 F 2.616(ya)-.15 G .116(re e)405.144 402 R -.15(xe) +-.15 G .115(cuted is closer to a).15 F .827(shell script en)72 414 R 3.327 +(vironment. Bash)-.4 F .827(uses the POSIX.2 scoping rules, which mak)3.327 F +3.327(et)-.1 G .827(he function e)392.517 414 R -.15(xe)-.15 G .828(cution en) +.15 F(vi-)-.4 E 1.2(ronment an e)72 426 R 1.2(xact cop)-.15 F 3.7(yo)-.1 G 3.7 +(ft)174.86 426 S 1.199(he shell en)184.67 426 R 1.199 +(vironment with the replacement of the shell')-.4 F 3.699(sp)-.55 G 1.199 +(ositional paramters)426.421 426 R(with the function ar)72 438 Q 2.5 +(guments. K)-.18 F +(orn shell functions do not share options or traps with the in)-.35 E -.2(vo) +-.4 G(king shell.).2 E .451(Ksh has)97 453.6 R F3(tr)2.951 E(ac)-.15 E -.1(ke) +-.2 G(d).1 E F0 .452(aliases, which alias a command name to its full pathname.) +2.952 F .452(Bash has true command)5.452 F(hashing.)72 465.6 Q F1 2.5 +(4.4.3. Arrays)72 489.6 R F0 .246 +(Arrays are an aspect of ksh that has no real bash equi)97 505.2 R -.25(va)-.25 +G 2.746(lent. The).25 F 2.746(ya)-.15 G .246(re easy to create and manipulate:) +371.42 505.2 R 1.637 +(an array is created automatically by using subscript assignment \()72 517.2 R +F1(name)A F0([)A F3(inde)A(x)-.2 E F0(]=)A F1 -.1(va)C(lue).1 E F0 1.637 +(\), and an)B 4.137(yv)-.15 G(ariable)476.79 517.2 Q 1.967 +(may be referred to as an array)72 529.2 R 6.967(.K)-.65 G 1.967(sh arrays, ho) +219.229 529.2 R(we)-.25 E -.15(ve)-.25 G 2.767 -.4(r, h).15 H -2.25 -.2(av e).4 +H(se)4.667 E -.15(ve)-.25 G 1.967(ral anno).15 F 1.967(ying limitations: the) +-.1 F 4.466(ym)-.15 G 1.966(ay be)480.654 529.2 R(inde)72 541.2 Q -.15(xe)-.15 +G 3.498(do).15 G .998(nly up to 512 or 1024 elements, depending on ho)111.858 +541.2 R 3.498(wt)-.25 G .999(he shell is compiled, and there is only the) +330.188 541.2 R(clumsy)72 553.2 Q F1 .223(set -A)2.723 F F0 .223 +(to assign a list of v)2.723 F .223(alues sequentially)-.25 F 5.223(.D)-.65 G +.223(espite these limits, arrays are useful, if underutilized)293.31 553.2 R +(by shell programmers.)72 565.2 Q F1 2.5(4.4.4. Builtin)72 589.2 R(Commands)2.5 +E F0 .112(Some of the b)97 604.8 R .112(uiltin commands ha)-.2 F .412 -.15 +(ve b)-.2 H .112(een e).15 F .112(xtended or are ne)-.15 F 2.612(wi)-.25 G +2.613(nk)351.402 604.8 S 2.613(sh. The)364.015 604.8 R F1(print)2.613 E F0 -.2 +(bu)2.613 G .113(iltin w).2 F .113(as included)-.1 F .242(to w)72 616.8 R .242 +(ork around the incompatibilities and limitations of)-.1 F F1(echo)2.741 E F0 +5.241(.T)C(he)328.234 616.8 Q F1(whence)2.741 E F0 .241(command tells what w) +2.741 F .241(ould hap-)-.1 F .418(pen if each ar)72 628.8 R .418 +(gument were typed as a command name.)-.18 F(The)5.418 E F1(cd)2.919 E F0 -.2 +(bu)2.919 G .419(iltin has been e).2 F .419(xtended to tak)-.15 F 2.919(eu)-.1 +G 2.919(pt)470.482 628.8 S 2.919(ot)481.181 628.8 S -.1(wo)491.88 628.8 S(ar)72 +640.8 Q 1.425(guments: if tw)-.18 F 3.925(oa)-.1 G -.18(rg)153.485 640.8 S +1.424(uments are supplied, the second is substituted for the \214rst in the cu\ +rrent directory).18 F 2.294 +(name and the shell changes to the resultant directory name.)72 652.8 R 2.295 +(The ksh)7.294 F F1(trap)4.795 E F0 -.2(bu)4.795 G 2.295(iltin accepts).2 F F1 +(ERR)4.795 E F0(and)4.795 E F1(DEB)72 664.8 Q(UG)-.1 E F0 .15(as trap names.) +2.65 F(The)5.15 E F1(ERR)2.65 E F0 .15(trap is e)2.65 F -.15(xe)-.15 G .15 +(cuted when a command f).15 F(ails;)-.1 E F1(DEB)2.65 E(UG)-.1 E F0 .15(is e) +2.65 F -.15(xe)-.15 G .15(cuted after e).15 F -.15(ve)-.25 G(ry).15 E +(simple command.)72 676.8 Q .05(The bash distrib)97 692.4 R .05 +(ution includes shell functions that implement)-.2 F F1(print)2.55 E F0(and) +2.55 E F1(whence)2.55 E F0 .05(and the e)2.55 F .05(xtensions to)-.15 F F1(cd) +72 704.4 Q F0(.)A EP +%%Page: 11 11 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(1-)288 48 S/F1 10/Times-Bold@0 +SF 2.5(4.4.5. Expansion)72 84 R F0 .282(The ksh \214lename generation \()97 +99.6 R/F2 10/Times-Italic@0 SF(globbing)A F0 2.782(\)f)C .282(acilities ha) +262.45 99.6 R .581 -.15(ve b)-.2 H .281(een e).15 F .281(xtended be)-.15 F .281 +(yond their bash and sh coun-)-.15 F 3.68(terparts. In)72 111.6 R 1.181 +(this area, ksh can be thought of as)3.681 F F2 -.4(eg)3.681 G -.37(re).4 G(p) +.37 E F0 1.181(to the bash)5.347 F F2(gr)3.681 E(ep)-.37 E F0 6.181(.K)1.666 G +1.181(sh globbing of)382.406 111.6 R 1.181(fers things lik)-.25 F(e)-.1 E 1.018 +(alternation, the ability to match zero or more instances of a pattern, and th\ +e ability to match e)72 123.6 R 1.018(xactly one)-.15 F(occurrence of an)72 +135.6 Q 2.5(yo)-.15 G 2.5(fal)150.98 135.6 S(ist of patterns.)166.53 135.6 Q F1 +2.5(4.4.6. Startup)72 159.6 R(Files)2.5 E F0 .977(Ksh and bash e)97 175.2 R +-.15(xe)-.15 G .977(cute startup \214les dif).15 F(ferently)-.25 E 5.977(.K) +-.65 G .977(sh e)297.879 175.2 R(xpands)-.15 E F1(ENV)3.478 E F0 .978 +(and sources the \214le it names for)3.478 F -2.15 -.25(ev e)72 187.2 T 1.85 +(ry shell.).25 F 1.85(Bash sources)6.85 F F1($ENV)4.35 E F0 1.85 +(only in non-interacti)4.35 F 2.15 -.15(ve s)-.25 H 1.85(hells; interacti).15 F +2.15 -.15(ve s)-.25 H 1.85(hells source \214x).15 F 1.85(ed \214les, as)-.15 F +-.15(ex)72 199.2 S 1.285(plained in the pre).15 F 1.285(vious section.)-.25 F +1.285(The POSIX standard has speci\214ed the ksh beha)6.285 F(vior)-.2 E 3.785 +(,s)-.4 G 3.785(ob)441.545 199.2 S 1.285(ash acts the)455.33 199.2 R +(same as ksh if started with the)72 211.2 Q F1(\255posix)2.5 E F0(or)2.5 E F1 +(\255o posix)2.5 E F0(options.)2.5 E F1 2.5(4.4.7. History)72 235.2 R F0 +(Finally)97 250.8 Q 3.372(,t)-.65 G .872(he ksh history implementation dif) +133.342 250.8 R .871(fers slightly from bash.)-.25 F .871 +(Each instance of bash k)5.871 F .871(eeps the)-.1 F .633 +(history list in memory and of)72 262.8 R .633(fers options to the)-.25 F F1 +(history)3.133 E F0 -.2(bu)3.133 G .634 +(iltin to write the list to or read it from a named).2 F 3.216(\214le. Ksh)72 +274.8 R -.1(ke)3.216 G .716 +(eps the history in a \214le, which it accesses each time a command is sa).1 F +-.15(ve)-.2 G 3.215(dt).15 G 3.215(oo)426.445 274.8 S 3.215(rr)439.66 274.8 S +(etrie)449.535 274.8 Q -.15(ve)-.25 G 3.215(df).15 G(rom)487.89 274.8 Q .338 +(the history)72 286.8 R 5.338(.K)-.65 G .338 +(sh history \214les may be shared among dif)129.246 286.8 R .338 +(ferent concurrent instances of ksh, which could be a)-.25 F +(bene\214t to the user)72 298.8 Q(.)-.55 E F1 2.5(5. F)72 322.8 R(eatur)-.25 E +(es in Bash-2.0)-.18 E F0 .657(The ne)97 338.4 R .657 +(xt release of bash, 2.0, will be a major o)-.15 F -.15(ve)-.15 G 3.157 +(rhaul. It).15 F .656(will include man)3.157 F 3.156(yn)-.15 G 1.156 -.25(ew f) +419.532 338.4 T .656(eatures, for both).25 F .705(programming and interacti)72 +350.4 R 1.005 -.15(ve u)-.25 H 3.205(se. Redundant).15 F -.15(ex)3.205 G .705 +(isting functions will be remo).15 F -.15(ve)-.15 G 3.206(d. There).15 F .706 +(are se)3.206 F -.15(ve)-.25 G .706(ral cases).15 F 1.34(where bash treats a v) +72 362.4 R 1.34(ariable specially to enable functionality a)-.25 F -.25(va)-.2 +G 1.34(ilable another w).25 F 1.34(ay \()-.1 F F1($nolinks)A F0(vs.)3.84 E F1 +1.34(set -o)3.84 F(ph)72 374.4 Q(ysical)-.15 E F0 2.5(,f)C(or e)115.19 374.4 Q +(xample\); the special treatment of the v)-.15 E(ariable name will be remo)-.25 +E -.15(ve)-.15 G(d.).15 E F1 2.5(5.1. Arrays)72 398.4 R F0 .546(Bash-2.0 will \ +include arrays which are a superset of those in ksh, with the size limitations\ + remo)97 414 R -.15(ve)-.15 G(d.).15 E(The)72 426 Q F1(declar)3.086 E(e)-.18 E +F0(,)A F1 -.18(re)3.086 G(adonly).18 E F0 3.086(,a)C(nd)174.768 426 Q F1 +(export)3.086 E F0 -.2(bu)3.086 G .586 +(iltins will accept options to specify arrays, and the).2 F F1 -.18(re)3.085 G +(ad).18 E F0 -.2(bu)3.085 G .585(iltin will).2 F(ha)72 438 Q .81 -.15(ve a)-.2 +H 3.01(no).15 G .51(ption to read a list of w)110.99 438 R .51 +(ords and assign them directly to an array)-.1 F 5.51(.T)-.65 G .51 +(here will also be a ne)386.23 438 R 3.01(wa)-.25 G(rray)487.9 438 Q F2 .262 +(compound assignment)72 450 R F0 .262(syntax a)2.762 F -.25(va)-.2 G .262 +(ilable for assignment statements and the).25 F F1(declar)2.761 E(e)-.18 E F0 +-.2(bu)2.761 G 2.761(iltin. This).2 F(ne)2.761 E 2.761(ws)-.25 G(yntax)481.78 +450 Q .441(has the form)72 462 R F2(name)2.941 E F0(=\()A F2(value1)A F0(...) +2.941 E F2(valueN)2.941 E F0 .441(\), where each)B F2(value)2.942 E F0 .442 +(has the form [)4.608 F F2(subscript)A F0(]=)A F2(string)A F0 5.442(.O)C .442 +(nly the)449.776 462 R F2(string)2.942 E F0 1.395(is required.)72 474 R 1.395 +(If the optional brack)6.395 F 1.395(ets and)-.1 F F2(subscript)3.894 E F0 +1.394(are included, that inde)3.894 F 3.894(xi)-.15 G 3.894(sa)388.714 474 S +1.394(ssigned to, otherwise the)400.938 474 R(inde)72 486 Q 3.656(xo)-.15 G +3.656(ft)102.726 486 S 1.156(he element assigned is the last inde)112.492 486 R +3.657(xa)-.15 G 1.157(ssigned to by the statement plus one.)272.917 486 R(Inde) +6.157 E 1.157(xing starts at)-.15 F 2.73(zero. The)72 498 R .23 +(same syntax is accepted by)2.73 F F1(declar)2.73 E(e)-.18 E F0 5.229(.I)C(ndi) +269.159 498 Q .229(vidual array elements may be assigned to using the ksh)-.25 +F F2(name)72 510 Q F0([)A F2(subscript)A F0(]=)A F2(value)A F0(.)A F1 2.5 +(5.2. Dynamic)72 534 R(Loading)2.5 E F0 .348(On systems that support the)97 +549.6 R F2(dlopen)2.848 E F0 .349(\(3\) library function, bash-2.0 will allo)B +2.849(wn)-.25 G .849 -.25(ew b)407.504 549.6 T .349(uiltins to be loaded).05 F +.049(into a running shell from a shared object \214le.)72 561.6 R .049(The ne) +5.049 F 2.549(wb)-.25 G .049(uiltins will ha)298.999 561.6 R .348 -.15(ve a)-.2 +H .048(ccess to the rest of the shell f).15 F(acil-)-.1 E .649(ities, b)72 +573.6 R .649(ut programmers will be subject to a fe)-.2 F 3.149(ws)-.25 G .649 +(tructural rules.)269.591 573.6 R .65(This will be pro)5.65 F .65 +(vided via a ne)-.15 F 3.15(wo)-.25 G .65(ption to)472.51 573.6 R F1(enable)72 +585.6 Q F0(.)A F1 2.5(5.3. Builtins)72 609.6 R F0 .889(Some of the e)97 625.2 R +.889(xisting b)-.15 F .889(uiltins will change in bash-2.0.)-.2 F .888(As pre) +5.888 F .888(viously noted,)-.25 F F1(declar)3.388 E(e)-.18 E F0(,)A F1(export) +3.388 E F0(,)A F1 -.18(re)3.388 G(ad-).18 E(only)72 637.2 Q F0 2.873(,a)C(nd) +100.153 637.2 Q F1 -.18(re)2.873 G(ad).18 E F0 .373(will accept ne)2.873 F +2.873(wo)-.25 G .374(ptions to specify arrays.)206.288 637.2 R(The)5.374 E F1 +(jobs)2.874 E F0 -.2(bu)2.874 G .374(iltin will be able to list only stopped).2 +F .323(or running jobs.)72 649.2 R(The)5.322 E F1(enable)2.822 E F0 .322 +(command will tak)2.822 F 2.822(ean)-.1 G -.25(ew)282.84 649.2 S F13.072 +E F0 .322(option to restrict its actions to the POSIX.2)2.822 F F2(spe-)2.822 E +(cial)72 661.2 Q F0 -.2(bu)3.14 G(iltins.).2 E F1(Kill)5.64 E F0 .64 +(will be able to list signal numbers corresponding to indi)3.14 F .64 +(vidual signal names.)-.25 F .64(The read-)5.64 F .703(line library interf)72 +673.2 R(ace,)-.1 E F1(bind)3.203 E F0 3.203(,w)C .703(ill ha)193.032 673.2 R +1.003 -.15(ve a)-.2 H 3.203(no).15 G .703(ption to remo)243.951 673.2 R 1.003 +-.15(ve t)-.15 H .703(he binding for an).15 F 3.203(yk)-.15 G 1.002 -.15(ey s) +398.032 673.2 T .702(equence \(which is not).15 F +(the same as binding it to self-insert\).)72 685.2 Q .494(There will be tw)97 +700.8 R 2.994(on)-.1 G .994 -.25(ew b)177.196 700.8 T .495 +(uiltin commands in bash-2.0.).05 F(The)5.495 E F1(diso)2.995 E(wn)-.1 E F0 +.495(command will remo)2.995 F .795 -.15(ve j)-.15 H .495(obs from).15 F(bash') +72 712.8 Q 3.445(si)-.55 G .945(nternal jobs table when job control is acti) +103.225 712.8 R -.15(ve)-.25 G 5.945(.A).15 G(diso)303.25 712.8 Q .944 +(wned job will not be listed by the jobs com-)-.25 F .666(mand, nor will its e) +72 724.8 R .666(xit status be reported.)-.15 F(Diso)5.667 E .667 +(wned jobs will not be sent a)-.25 F F1(SIGHUP)3.167 E F0 .667 +(when an interacti)3.167 F -.15(ve)-.25 G EP +%%Page: 12 12 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(2-)288 48 S .688(shell e)72 84 R +3.187(xits. Most)-.15 F .687(of the shell')3.187 F 3.187(so)-.55 G .687 +(ptional or)205.423 84 R/F1 10/Times-Italic@0 SF(to)3.187 E -.1(gg)-.1 G(led).1 +E F0 .687(functionality will be folded into the ne)3.187 F(w)-.25 E/F2 10 +/Times-Bold@0 SF(shopt)3.187 E F0 -.2(bu)3.187 G(iltin.).2 E(Man)72 96 Q 3.714 +(yo)-.15 G 3.714(ft)103.894 96 S 1.214(he v)113.718 96 R 1.214 +(ariables which alter the shell')-.25 F 3.714(sb)-.55 G(eha)266.282 96 Q 1.214 +(vior when set \(re)-.2 F -.05(ga)-.15 G 1.214(rdless of their v).05 F 1.215 +(alue\) will be made)-.25 F 6(options settable with)72 108 R F2(shopt)8.5 E F0 +11(.E)C 6(xamples of such v)218.23 108 R 6(ariables include)-.25 F F2(allo)8.5 +E(w_null_glob_expansion)-.1 E F0(,)A F2(glob_dot_\214lenames)72 120 Q F0 2.5 +(,a)C(nd)163.67 120 Q F2(MAIL_W)2.5 E(ARNING)-1.2 E F0(.)A F2 2.5(5.4. V)72 144 +R(ariables and V)-.92 E(ariable Expansion)-.92 E F0 .047 +(Bash-2.0 will implement se)97 159.6 R -.15(ve)-.25 G .048(ral ne).15 F 2.548 +(wv)-.25 G .048(ariable e)252.988 159.6 R 2.548(xpansions. These)-.15 F .048 +(will answer se)2.548 F -.15(ve)-.25 G .048(ral of the most per).15 F(-)-.2 E +.213(sistant requests for ne)72 171.6 R 2.713(wf)-.25 G 2.713(eatures. It) +172.582 171.6 R .213(will be possible to `)2.713 F .212(`indirectly reference') +-.74 F 2.712('av)-.74 G .212(ariable with an e)398.534 171.6 R(xpansion,)-.15 E +(lik)72 183.6 Q 3.01(eu)-.1 G(sing)94.91 183.6 Q/F3 10/Courier@0 SF .51 +(eval \\$${name})3.01 F F0 .51(to reference a v)3.01 F .51(ariable named by) +-.25 F F3(${name})3.01 E F0 5.51(.E)C .51(xpansions will be a)394.32 183.6 R +-.25(va)-.2 G(ilable).25 E .462(to retrie)72 195.6 R .762 -.15(ve s)-.25 H .462 +(ubstrings of v).15 F .461(ariables in an)-.25 F F1(awk)2.961 E F0(-lik)A 2.961 +(em)-.1 G .461(anner: starting at a speci\214c inde)277.692 195.6 R .461 +(x, retrie)-.15 F .461(ving some num-)-.25 F .941 +(ber of characters or the rest of the string.)72 207.6 R .941 +(It will be possible to retrie)5.941 F 1.241 -.15(ve s)-.25 H .941 +(equences of array elements lik).15 F(e)-.1 E .354(this, too.)72 219.6 R .354 +(It w)5.354 F .354(ould be nice to ha)-.1 F .654 -.15(ve a w)-.2 H .354 +(ay to replace portions of a v).05 F .353 +(ariable matching a pattern the same w)-.25 F(ay)-.1 E(leading or trailing sub\ +strings are presently stripped; that capability may be a)72 231.6 Q -.25(va)-.2 +G(ilable.).25 E .453(Another ne)97 247.2 R 2.953(we)-.25 G .453 +(xpansion will pro)156.376 247.2 R .453(vide a w)-.15 F .454 +(ay to create strings containing arbitrary characters, which is)-.1 F(incon)72 +259.2 Q -.15(ve)-.4 G 1.636(nient in the current v).15 F 4.136(ersion. W)-.15 F +1.635(ords of the form $')-.8 F F1(string)A F0 4.135('w)C 1.635(ill e)355.145 +259.2 R 1.635(xpand to)-.15 F F1(string)4.135 E F0 1.635(with backslash-)4.135 +F 1.231(escaped characters in)72 271.2 R F1(string)3.731 E F0 1.231 +(replaced as speci\214ed by the ANSI C standard.)3.731 F 1.232 +(As with other single-quoted)6.232 F +(shell strings, the only character that may not appear in)72 283.2 Q F1(string) +2.5 E F0(is a single quote.)2.5 E 1.436(The shell v)97 298.8 R 1.436 +(ariables will change also.)-.25 F 3.936(An)6.436 G 1.936 -.25(ew va)272.052 +298.8 T(riable).25 E F2(HISTIGNORE)3.936 E F0 1.435(will supersede)3.936 F F2 +(HISTCON-)3.935 E(TR)72 310.8 Q(OL)-.3 E F0(.)A F2(HISTIGNORE)5.327 E F0 .327 +(is the history analogy of)2.827 F F2(FIGNORE)2.828 E F0 2.828(:ac)C .328 +(olon-separated list of patterns specifying)339.938 310.8 R 1.082 +(commands to omit from the history list.)72 322.8 R 1.081 +(The special pattern '&' will match the pre)6.081 F 1.081 +(vious history line, to)-.25 F(pro)72 334.8 Q 1.568(vide the)-.15 F F2 +(HISTCONTR)4.068 E(OL)-.3 E F1(ignor)4.068 E(edups)-.37 E F0(beha)5.734 E(vior) +-.2 E 6.568(.M)-.55 G(an)303.546 334.8 Q 4.069(yv)-.15 G 1.569 +(ariables which modify the shell')326.655 334.8 R 4.069(sb)-.55 G(eha)474.21 +334.8 Q(vior)-.2 E .395(will lose their special meaning.)72 346.8 R -1.11(Va) +5.395 G .395(riables such as)1.11 F F2(notify)2.895 E F0(and)2.895 E F2(noclob) +2.895 E(ber)-.1 E F0 .395(which pro)2.895 F .395(vide functionality a)-.15 F +-.25(va)-.2 G(il-).25 E .931 +(able via other mechanisms will no longer be treated specially)72 358.8 R 5.931 +(.O)-.65 G .931(ther v)340.06 358.8 R .932(ariables will be folded into)-.25 F +F2(shopt)3.432 E F0(.)A(The)72 370.8 Q F2(history_contr)5.519 E(ol)-.18 E F0 +(and)5.519 E F2(hostname_completion_\214le)5.519 E F0 -.25(va)5.519 G 3.019 +(riables, superseded by).25 F F2(HISTCONTR)5.518 E(OL)-.3 E F0(and)5.518 E F2 +(HOSTFILE)72 382.8 Q F0(respecti)2.5 E -.15(ve)-.25 G(ly).15 E 2.5(,w)-.65 G +(ill be remo)185.12 382.8 Q -.15(ve)-.15 G(d.).15 E F2 2.5(5.5. Readline)72 +406.8 R F0(Naturally)97 422.4 Q 2.94(,t)-.65 G .44(here will be impro)142.34 +422.4 R -.15(ve)-.15 G .441(ments to readline as well.).15 F .441 +(All of the POSIX.2)5.441 F F1(vi)2.941 E F0 .441(-mode editing com-)B .33 +(mands will be implemented; missing commands lik)72 434.4 R 2.829(e`)-.1 G .329 +(m' to sa)290.599 434.4 R .629 -.15(ve t)-.2 H .329 +(he current cursor position \().15 F F1(mark)A F0 2.829(\)a)C .329(nd the) +478.951 434.4 R .36(`@' command for macro e)72 446.4 R .36(xpansion will be a) +-.15 F -.25(va)-.2 G 2.861(ilable. The).25 F .361 +(ability to set the mark and e)2.861 F .361(xchange the current)-.15 F .764 +(cursor position \()72 458.4 R F1(point)A F0 3.264(\)a)C .764 +(nd mark will be added to the readline emacs mode as well.)170.672 458.4 R .763 +(Since there are com-)5.764 F .196 +(mands to set the mark, commands to manipulate the re)72 470.4 R .197 +(gion \(the characters between the point and the mark\))-.15 F .111(will be a) +72 482.4 R -.25(va)-.2 G 2.611(ilable. Commands).25 F(ha)2.611 E .411 -.15 +(ve b)-.2 H .11 +(een added to the readline emacs mode for more complete ksh compati-).15 F +(bility)72 494.4 Q 2.5(,s)-.65 G(uch as the C-])101.36 494.4 Q F1(c)A F0 +(character search command.)2.5 E F2 2.5(5.6. Con\214guration)72 518.4 R F0 .318 +(Bash w)97 534 R .318 +(as the \214rst GNU program to completely autocon\214gure.)-.1 F .319 +(Its autocon\214guration mechanism pre-)5.319 F(dates)72 546 Q F1(autoconf)4.07 +E F0 4.07(,t)C 1.569 +(he current GNU con\214guration program, and needs updating.)140.97 546 R 1.569 +(Bash-2.0 may include an)6.569 F .603 +(autoconf-based con\214guration script, if necessary ne)72 558 R 3.103(wf)-.25 +G .603(unctionality can be added to autoconf, or its limita-)294.476 558 R +(tions bypassed.)72 570 Q F2 2.5(5.7. Miscellaneous)72 594 R F0 1.632 +(The POSIX mode will be impro)97 609.6 R -.15(ve)-.15 G 4.131(di).15 G 4.131 +(nb)254.26 609.6 S 1.631(ash-2.0; it will pro)268.391 609.6 R 1.631 +(vide a more complete superset of the)-.15 F(POSIX standard.)72 621.6 Q -.15 +(Fo)5 G 2.5(rt).15 G(he \214rst time, bash will recognize the e)163.79 621.6 Q +(xistance of the POSIX.2)-.15 E F1(special)2.5 E F0 -.2(bu)2.5 G(iltins.).2 E +2.627(An)97 637.2 S .627 -.25(ew t)111.847 637.2 T .127(rap v).25 F(alue,)-.25 +E F2(DEB)2.627 E(UG)-.1 E F0 2.627(,w)C .128(ill be present, as in ksh.)218.405 +637.2 R .128(Commands speci\214ed with a)5.128 F F2(DEB)2.628 E(UG)-.1 E F0 +.128(trap will)2.628 F 1.908(be e)72 649.2 R -.15(xe)-.15 G 1.908 +(cuted after e).15 F -.15(ve)-.25 G 1.908(ry simple command.).15 F 1.908 +(Since this mak)6.908 F 1.908(es shell script deb)-.1 F 1.908 +(uggers possible, I hope to)-.2 F(include a bash deb)72 661.2 Q +(ugger in the bash-2.0 release.)-.2 E F2 2.5(6. A)72 685.2 R -.1(va)-1 G +(ilability).1 E F0 5.997(The current v)97 700.8 R 5.997(ersion of bash is a) +-.15 F -.25(va)-.2 G 5.998(ilable for anon).25 F 5.998 +(ymous FTP from prep.ai.mit.edu as)-.15 F F1(/pub/gnu/bash-1.14.2.tar)72 712.8 +Q(.gz)-1.11 E F0(.)1.666 E EP +%%Page: 13 13 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(3-)288 48 S/F1 10/Times-Bold@0 +SF 2.5(7. Conclusion)72 84 R F0 .755(This paper has presented an o)97 99.6 R +-.15(ve)-.15 G(rvie).15 E 3.255(wo)-.25 G 3.255(fb)259.27 99.6 S .755 +(ash, compared its features with those of other shells, and)270.855 99.6 R +(hinted at features in the ne)72 111.6 Q(xt release, bash-2.0.)-.15 E .483 +(Bash is a solid replacement for sh.)97 127.2 R .483(It is suf)5.483 F .483 +(\214ciently portable to run on nearly e)-.25 F -.15(ve)-.25 G .484(ry v).15 F +.484(ersion of)-.15 F/F2 9/Times-Roman@0 SF(UNIX)2.984 E F0 .514 +(from 4.3 BSD to SVR4.2, and se)72 139.2 R -.15(ve)-.25 G(ral).15 E F2(UNIX) +3.013 E F0 -.1(wo)3.013 G(rkalik).1 E .513(es, and rob)-.1 F .513 +(ust enough to replace sh on most of those)-.2 F .771(systems, It is v)72 151.2 +R .771(ery close to POSIX.2-conformant in POSIX mode, and is getting f)-.15 F +(aster)-.1 E 5.771(.I)-.55 G 3.272(ti)436.684 151.2 S 3.272(sn)445.516 151.2 S +.772(ot, unfortu-)457.678 151.2 R(nately)72 163.2 Q 2.663(,g)-.65 G .163 +(etting smaller)105.953 163.2 R 2.663(,b)-.4 G .163(ut there are man)170.399 +163.2 R 2.663(yo)-.15 G .163(ptional features.)248.101 163.2 R .163(It is v) +5.163 F .162(ery easy to b)-.15 F .162(uild a small subset to use as)-.2 F 2.5 +(ad)72 175.2 S(irect replacement for /bin/sh.)83.94 175.2 Q .909 +(Bash has thousands of users w)97 190.8 R .909(orldwide, all of whom ha)-.1 F +1.209 -.15(ve h)-.2 H .91(elped to mak).15 F 3.41(ei)-.1 G 3.41(tb)409.34 190.8 +S(etter)420.53 190.8 Q 5.91(.A)-.55 G .91(nother testa-)453.38 190.8 R +(ment to the bene\214ts of free softw)72 202.8 Q(are.)-.1 E F1 2.5(8. Refer)72 +226.8 R(ences)-.18 E F0 .432([1] S. R. Bourne, `)72 242.4 R .432(`UNIX T)-.74 F +.432(ime-Sharing System:)-.35 F .431(The UNIX Shell')5.431 F(',)-.74 E/F3 10 +/Times-Italic@0 SF .431(Bell System T)2.931 F(ec)-.92 E .431(hnical J)-.15 F +(ournal)-.25 E F0 2.931(,5)C(7\(6\),)484.84 242.4 Q +(July-August, 1978, pp. 1971-1990.)72 254.4 Q .736([2] Morris Bolsk)72 270 R +3.237(ya)-.15 G .737(nd Da)153.22 270 R .737(vid K)-.2 F(orn,)-.35 E F3 .737 +(The K)3.237 F .737(ornShell Command and Pr)-.4 F -.1(og)-.45 G -.15(ra).1 G +.737(mming Langua).15 F -.1(ge)-.1 G F0 3.237(,P).1 G .737(rentice Hall,) +453.833 270 R(1989.)72 282 Q .142([3] Bill Jo)72 297.6 R 1.442 -.65(y, A)-.1 H +2.642(nI).65 G .141(ntroduction to the C Shell,)140.428 297.6 R F3 .141 +(UNIX User')2.641 F 2.641(sS)-.4 G .141(upplementary Documents)309.346 297.6 R +F0 2.641(,U)C(ni)424.328 297.6 Q -.15(ve)-.25 G .141(rsity of Califor).15 F(-) +-.2 E(nia at Berk)72 309.6 Q(ele)-.1 E 1.3 -.65(y, 1)-.15 H(986.).65 E .283 +([4] IEEE,)72 325.2 R F3 .283(IEEE Standar)2.783 F 2.783(df)-.37 G .283 +(or Information T)179.692 325.2 R(ec)-.92 E(hnolo)-.15 E .283(gy -- P)-.1 F +.283(ortable Oper)-.8 F .283(ating System Interface \(POSIX\) P)-.15 F(art)-.8 +E(2: Shell and Utilities)72 337.2 Q F0 2.5(,1)C(992.)165.06 337.2 Q F1 2.5 +(9. A)72 361.2 R(uthor Inf)-.5 E(ormation)-.25 E F0 .937(Chet Rame)97 376.8 R +3.437(yi)-.15 G 3.437(sas)153.724 376.8 S(oftw)172.818 376.8 Q .936 +(are engineer w)-.1 F .936(orking at Case W)-.1 F .936(estern Reserv)-.8 F +3.436(eU)-.15 G(ni)393.43 376.8 Q -.15(ve)-.25 G(rsity).15 E 5.936(.H)-.65 G +3.436(eh)443.036 376.8 S .936(as a B.S. in)455.912 376.8 R .072 +(Computer Engineering and an M.S. in Computer Science, both from CWR)72 388.8 R +2.573(U. He)-.4 F .073(has been w)2.573 F .073(orking on bash)-.1 F +(for six years, and the primary maintainer for one.)72 400.8 Q EP +%%Trailer +end +%%EOF diff --git a/bash-5.1/doc/texinfo.tex b/bash-5.1/doc/texinfo.tex new file mode 100644 index 0000000000000000000000000000000000000000..d494cce071646cf427c4bfd7fbc5c7f274fa6a48 --- /dev/null +++ b/bash-5.1/doc/texinfo.tex @@ -0,0 +1,11045 @@ +% texinfo.tex -- TeX macros to handle Texinfo files. +% +% Load plain if necessary, i.e., if running under initex. +\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi +% +\def\texinfoversion{2015-11-22.14} +% +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 +% Free Software Foundation, Inc. +% +% This texinfo.tex file 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 texinfo.tex file 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 . +% +% As a special exception, when this file is read by TeX when processing +% a Texinfo source document, you may use the result without +% restriction. This Exception is an additional permission under section 7 +% of the GNU General Public License, version 3 ("GPLv3"). +% +% Please try the latest version of texinfo.tex before submitting bug +% reports; you can get the latest version from: +% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +% http://www.gnu.org/software/texinfo/ (the Texinfo home page) +% The texinfo.tex in any given distribution could well be out +% of date, so if that's what you're using, please check. +% +% Send bug reports to bug-texinfo@gnu.org. Please include including a +% complete document in each bug report with which we can reproduce the +% problem. Patches are, of course, greatly appreciated. +% +% To process a Texinfo manual with TeX, it's most reliable to use the +% texi2dvi shell script that comes with the distribution. For a simple +% manual foo.texi, however, you can get away with this: +% tex foo.texi +% texindex foo.?? +% tex foo.texi +% tex foo.texi +% dvips foo.dvi -o # or whatever; this makes foo.ps. +% The extra TeX runs get the cross-reference information correct. +% Sometimes one run after texindex suffices, and sometimes you need more +% than two; texi2dvi does it as many times as necessary. +% +% It is possible to adapt texinfo.tex for other languages, to some +% extent. You can get the existing language-specific files from the +% full Texinfo distribution. +% +% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. + + +\message{Loading texinfo [version \texinfoversion]:} + +% If in a .fmt file, print the version number +% and turn on active characters that we couldn't do earlier because +% they might have appeared in the input file name. +\everyjob{\message{[Texinfo version \texinfoversion]}% + \catcode`+=\active \catcode`\_=\active} + +\chardef\other=12 + +% We never want plain's \outer definition of \+ in Texinfo. +% For @tex, we can use \tabalign. +\let\+ = \relax + +% Save some plain tex macros whose names we will redefine. +\let\ptexb=\b +\let\ptexbullet=\bullet +\let\ptexc=\c +\let\ptexcomma=\, +\let\ptexdot=\. +\let\ptexdots=\dots +\let\ptexend=\end +\let\ptexequiv=\equiv +\let\ptexexclam=\! +\let\ptexfootnote=\footnote +\let\ptexgtr=> +\let\ptexhat=^ +\let\ptexi=\i +\let\ptexindent=\indent +\let\ptexinsert=\insert +\let\ptexlbrace=\{ +\let\ptexless=< +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent +\let\ptexplus=+ +\let\ptexraggedright=\raggedright +\let\ptexrbrace=\} +\let\ptexslash=\/ +\let\ptexsp=\sp +\let\ptexstar=\* +\let\ptexsup=\sup +\let\ptext=\t +\let\ptextop=\top +{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode + +% If this character appears in an error message or help string, it +% starts a new line in the output. +\newlinechar = `^^J + +% Use TeX 3.0's \inputlineno to get the line number, for better error +% messages, but if we're using an old version of TeX, don't do anything. +% +\ifx\inputlineno\thisisundefined + \let\linenumber = \empty % Pre-3.0. +\else + \def\linenumber{l.\the\inputlineno:\space} +\fi + +% Set up fixed words for English if not already set. +\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi +\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi +\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi +\ifx\putwordin\undefined \gdef\putwordin{in}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi +\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi +\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi +\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi +\ifx\putwordof\undefined \gdef\putwordof{of}\fi +\ifx\putwordon\undefined \gdef\putwordon{on}\fi +\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi +\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi +\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi +\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi +\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi +\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi +\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi +% +\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi +\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi +\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi +\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi +\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi +\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi +\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi +\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi +\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi +\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi +\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi +\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi +% +\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi +\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi +\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi +\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi +\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi + +% Since the category of space is not known, we have to be careful. +\chardef\spacecat = 10 +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. +\chardef\ampChar = `\& +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dashChar = `\- +\chardef\dotChar = `\. +\chardef\exclamChar= `\! +\chardef\hashChar = `\# +\chardef\lquoteChar= `\` +\chardef\questChar = `\? +\chardef\rquoteChar= `\' +\chardef\semiChar = `\; +\chardef\slashChar = `\/ +\chardef\underChar = `\_ + +% Ignore a token. +% +\def\gobble#1{} + +% The following is used inside several \edef's. +\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} + +% Hyphenation fixes. +\hyphenation{ + Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script + ap-pen-dix bit-map bit-maps + data-base data-bases eshell fall-ing half-way long-est man-u-script + man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm + par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces + spell-ing spell-ings + stand-alone strong-est time-stamp time-stamps which-ever white-space + wide-spread wrap-around +} + +% Sometimes it is convenient to have everything in the transcript file +% and nothing on the terminal. We don't just call \tracingall here, +% since that produces some useless output on the terminal. We also make +% some effort to order the tracing commands to reduce output in the log +% file; cf. trace.sty in LaTeX. +% +\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +\def\loggingall{% + \tracingstats2 + \tracingpages1 + \tracinglostchars2 % 2 gives us more in etex + \tracingparagraphs1 + \tracingoutput1 + \tracingmacros2 + \tracingrestores1 + \showboxbreadth\maxdimen \showboxdepth\maxdimen + \ifx\eTeXversion\thisisundefined\else % etex gives us more logging + \tracingscantokens1 + \tracingifs1 + \tracinggroups1 + \tracingnesting2 + \tracingassigns1 + \fi + \tracingcommands3 % 3 gives us more in etex + \errorcontextlines16 +}% + +% @errormsg{MSG}. Do the index-like expansions on MSG, but if things +% aren't perfect, it's not the end of the world, being an error message, +% after all. +% +\def\errormsg{\begingroup \indexnofonts \doerrormsg} +\def\doerrormsg#1{\errmessage{#1}} + +% add check for \lastpenalty to plain's definitions. If the last thing +% we did was a \nobreak, we don't want to insert more space. +% +\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount + \removelastskip\penalty-50\smallskip\fi\fi} +\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount + \removelastskip\penalty-100\medskip\fi\fi} +\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount + \removelastskip\penalty-200\bigskip\fi\fi} + +% Output routine +% + +% For a final copy, take out the rectangles +% that mark overfull boxes (in case you have decided +% that the text looks ok even though it passes the margin). +% +\def\finalout{\overfullrule=0pt } + +% Do @cropmarks to get crop marks. +% +\newif\ifcropmarks +\let\cropmarks = \cropmarkstrue +% +% Dimensions to add cropmarks at corners. +% Added by P. A. MacKay, 12 Nov. 1986 +% +\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines +\newdimen\cornerlong \cornerlong=1pc +\newdimen\cornerthick \cornerthick=.3pt +\newdimen\topandbottommargin \topandbottommargin=.75in + +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. The solution is +% described on page 260 of The TeXbook. It involves outputting two +% marks for the sectioning macros, one before the section break, and +% one after. I won't pretend I can describe this better than DEK... +% +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 % 0: top marks (\last...) + \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...) + \noexpand\else \the\toks8 % 2: color marks + }% +} + +% \gettopheadingmarks, \getbottomheadingmarks - extract needed part of mark. +% +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\lastsection{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + +% Margin to add to right of even pages, to left of odd pages. +\newdimen\bindingoffset +\newdimen\normaloffset +\newdimen\pagewidth \newdimen\pageheight + +% Main output routine. +% +\chardef\PAGE = 255 +\output = {\onepageout{\pagecontents\PAGE}} + +\newbox\headlinebox +\newbox\footlinebox + +% \onepageout takes a vbox as an argument. +% \shipout a vbox for a single page, adding an optional header, footer, +% cropmarks, and footnote. This also causes index entries for this page +% to be written to the auxiliary files. +% +\def\onepageout#1{% + \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi + % + \ifodd\pageno \advance\hoffset by \bindingoffset + \else \advance\hoffset by -\bindingoffset\fi + % + % Common context changes for both heading and footing. + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). + \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} + % + % Retrieve the information for the headings from the marks in the page, + % and call Plain TeX's \makeheadline and \makefootline, which use the + % values in \headline and \footline. + % + % This is used to check if we are on the first page of a chapter. + \ifcase0\topmark\fi + \ifx\thischapter\empty + % See comment for \gettopheadingmarks + \ifcase0\firstmark\fi + \let\curchaptername\thischaptername + \ifcase1\firstmark\fi + \let\prevchaptername\thischaptername + \else + \let\curchaptername\thischaptername + \ifcase1\topmark\fi + \let\prevchaptername\thischaptername + \fi + % + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi + % + \ifx\curchaptername\prevchaptername + \let\thischapterheading\thischapter + \else + % \thischapterheading is the same as \thischapter except it is blank + % for the first page of a chapter. This is to prevent the chapter name + % being shown twice. + \def\thischapterheading{}% + \fi + % + \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% + \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% + % + {% + % Set context for writing to auxiliary files like index files. + % Have to do this stuff outside the \shipout because we want it to + % take effect in \write's, yet the group defined by the \vbox ends + % before the \shipout runs. + % + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\backslashcurfont }acronym} + \shipout\vbox{% + % Do this early so pdf references go to the beginning of the page. + \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi + % + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \vskip-\topandbottommargin + \vtop to0pt{% + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vss}% + \vskip\topandbottommargin + \line\bgroup + \hfil % center the page within the outer (page) hsize. + \ifodd\pageno\hskip\bindingoffset\fi + \vbox\bgroup + \fi + % + \unvbox\headlinebox + \pagebody{#1}% + \ifdim\ht\footlinebox > 0pt + % Only leave this space if the footline is nonempty. + % (We lessened \vsize for it in \oddfootingyyy.) + % The \baselineskip=24pt in plain's \makefootline has no effect. + \vskip 24pt + \unvbox\footlinebox + \fi + % + \ifcropmarks + \egroup % end of \vbox\bgroup + \hfil\egroup % end of (centering) \line\bgroup + \vskip\topandbottommargin plus1fill minus1fill + \boxmaxdepth = \cornerthick + \vbox to0pt{\vss + \line{% + \vbox{\moveleft\cornerthick\nsbot}% + \hfill + \vbox{\moveright\cornerthick\nsbot}% + }% + \nointerlineskip + \line{\ewbot\hfil\ewbot}% + }% + \egroup % \vbox from first cropmarks clause + \fi + }% end of \shipout\vbox + }% end of group with \indexdummies + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi +} + +\newinsert\margin \dimen\margin=\maxdimen + +% Main part of page, including any footnotes +\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} +{\catcode`\@ =11 +\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi +% marginal hacks, juha@viisa.uucp (Juha Takala) +\ifvoid\margin\else % marginal info is present + \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi +\dimen@=\dp#1\relax \unvbox#1\relax +\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi +\ifr@ggedbottom \kern-\dimen@ \vfil \fi} +} + +% Here are the rules for the cropmarks. Note that they are +% offset so that the space between them is truly \outerhsize or \outervsize +% (P. A. MacKay, 12 November, 1986) +% +\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} +\def\nstop{\vbox + {\hrule height\cornerthick depth\cornerlong width\cornerthick}} +\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} +\def\nsbot{\vbox + {\hrule height\cornerlong depth\cornerthick width\cornerthick}} + + +% Argument parsing + +% Parse an argument, then pass it to #1. The argument is the rest of +% the input line (except we remove a trailing comment). #1 should be a +% macro which expects an ordinary undelimited TeX argument. +% For example, \def\foo{\parsearg\fooxxx}. +% +\def\parsearg{\parseargusing{}} +\def\parseargusing#1#2{% + \def\argtorun{#2}% + \begingroup + \obeylines + \spaceisspace + #1% + \parseargline\empty% Insert the \empty token, see \finishparsearg below. +} + +{\obeylines % + \gdef\parseargline#1^^M{% + \endgroup % End of the group started in \parsearg. + \argremovecomment #1\comment\ArgTerm% + }% +} + +% First remove any @comment, then any @c comment. Also remove a @texinfoc +% comment (see \scanmacro for details). Pass the result on to \argcheckspaces. +\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm} +\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} + +% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. +% +% \argremovec might leave us with trailing space, e.g., +% @end itemize @c foo +% This space token undergoes the same procedure and is eventually removed +% by \finishparsearg. +% +\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} +\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} +\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% + \def\temp{#3}% + \ifx\temp\empty + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: + \let\temp\finishparsearg + \else + \let\temp\argcheckspaces + \fi + % Put the space token in: + \temp#1 #3\ArgTerm +} + +% If a _delimited_ argument is enclosed in braces, they get stripped; so +% to get _exactly_ the rest of the line, we had to prevent such situation. +% We prepended an \empty token at the very beginning and we expand it now, +% just before passing the control to \argtorun. +% (Similarly, we have to think about #3 of \argcheckspacesY above: it is +% either the null string, or it ends with \^^M---thus there is no danger +% that a pair of braces would be stripped. +% +% But first, we have to remove the trailing space token. +% +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} + + +% \parseargdef - define a command taking an argument on the line +% +% \parseargdef\foo{...} +% is roughly equivalent to +% \def\foo{\parsearg\Xfoo} +% \def\Xfoo#1{...} +\def\parseargdef#1{% + \expandafter \doparseargdef \csname\string#1\endcsname #1% +} +\def\doparseargdef#1#2{% + \def#2{\parsearg#1}% + \def#1##1% +} + +% Several utility definitions with active space: +{ + \obeyspaces + \gdef\obeyedspace{ } + + % Make each space character in the input produce a normal interword + % space in the output. Don't allow a line break at this space, as this + % is used only in environments like @example, where each line of input + % should produce a line of output anyway. + % + \gdef\sepspaces{\obeyspaces\let =\tie} + + % If an index command is used in an @example environment, any spaces + % therein should become regular spaces in the raw index file, not the + % expansion of \tie (\leavevmode \penalty \@M \ ). + \gdef\unsepspaces{\let =\space} +} + + +\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} + +% Define the framework for environments in texinfo.tex. It's used like this: +% +% \envdef\foo{...} +% \def\Efoo{...} +% +% It's the responsibility of \envdef to insert \begingroup before the +% actual body; @end closes the group after calling \Efoo. \envdef also +% defines \thisenv, so the current environment is known; @end checks +% whether the environment name matches. The \checkenv macro can also be +% used to check whether the current environment is the one expected. +% +% Non-false conditionals (@iftex, @ifset) don't fit into this, so they +% are not treated as environments; they don't open a group. (The +% implementation of @end takes care not to call \endgroup in this +% special case.) + + +% At run-time, environments start with this: +\def\startenvironment#1{\begingroup\def\thisenv{#1}} +% initialize +\let\thisenv\empty + +% ... but they get defined via ``\envdef\foo{...}'': +\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} +\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} + +% Check whether we're in the right environment: +\def\checkenv#1{% + \def\temp{#1}% + \ifx\thisenv\temp + \else + \badenverr + \fi +} + +% Environment mismatch, #1 expected: +\def\badenverr{% + \errhelp = \EMsimple + \errmessage{This command can appear only \inenvironment\temp, + not \inenvironment\thisenv}% +} +\def\inenvironment#1{% + \ifx#1\empty + outside of any environment% + \else + in environment \expandafter\string#1% + \fi +} + +% @end foo executes the definition of \Efoo. +% But first, it executes a specialized version of \checkenv +% +\parseargdef\end{% + \if 1\csname iscond.#1\endcsname + \else + % The general wording of \badenverr may not be ideal. + \expandafter\checkenv\csname#1\endcsname + \csname E#1\endcsname + \endgroup + \fi +} + +\newhelp\EMsimple{Press RETURN to continue.} + + +% Be sure we're in horizontal mode when doing a tie, since we make space +% equivalent to this in @example-like environments. Otherwise, a space +% at the beginning of a line will start with \penalty -- and +% since \penalty is valid in vertical mode, we'd end up putting the +% penalty on the vertical list instead of in the new paragraph. +{\catcode`@ = 11 + % Avoid using \@M directly, because that causes trouble + % if the definition is written into an index file. + \global\let\tiepenalty = \@M + \gdef\tie{\leavevmode\penalty\tiepenalty\ } +} + +% @: forces normal size whitespace following. +\def\:{\spacefactor=1000 } + +% @* forces a line break. +\def\*{\unskip\hfil\break\hbox{}\ignorespaces} + +% @/ allows a line break. +\let\/=\allowbreak + +% @. is an end-of-sentence period. +\def\.{.\spacefactor=\endofsentencespacefactor\space} + +% @! is an end-of-sentence bang. +\def\!{!\spacefactor=\endofsentencespacefactor\space} + +% @? is an end-of-sentence query. +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +% +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% + \fi\fi +} + +% @w prevents a word break. Without the \leavevmode, @w at the +% beginning of a paragraph, when TeX is still in vertical mode, would +% produce a whole line of output instead of starting the paragraph. +\def\w#1{\leavevmode\hbox{#1}} + +% @group ... @end group forces ... to be all on one page, by enclosing +% it in a TeX vbox. We use \vtop instead of \vbox to construct the box +% to keep its height that of a normal line. According to the rules for +% \topskip (p.114 of the TeXbook), the glue inserted is +% max (\topskip - \ht (first item), 0). If that height is large, +% therefore, no glue is inserted, and the space between the headline and +% the text is small, which looks bad. +% +% Another complication is that the group might be very large. This can +% cause the glue on the previous page to be unduly stretched, because it +% does not have much material. In this case, it's better to add an +% explicit \vfill so that the extra space is at the bottom. The +% threshold for doing this is if the group is more than \vfilllimit +% percent of a page (\vfilllimit can be changed inside of @tex). +% +\newbox\groupbox +\def\vfilllimit{0.7} +% +\envdef\group{% + \ifnum\catcode`\^^M=\active \else + \errhelp = \groupinvalidhelp + \errmessage{@group invalid in context where filling is enabled}% + \fi + \startsavinginserts + % + \setbox\groupbox = \vtop\bgroup + % Do @comment since we are called inside an environment such as + % @example, where each end-of-line in the input causes an + % end-of-line in the output. We don't want the end-of-line after + % the `@group' to put extra space in the output. Since @group + % should appear on a line by itself (according to the Texinfo + % manual), we don't worry about eating any user text. + \comment +} +% +% The \vtop produces a box with normal height and large depth; thus, TeX puts +% \baselineskip glue before it, and (when the next line of text is done) +% \lineskip glue after it. Thus, space below is not quite equal to space +% above. But it's pretty close. +\def\Egroup{% + % To get correct interline space between the last line of the group + % and the first line afterwards, we have to propagate \prevdepth. + \endgraf % Not \par, as it may have been set to \lisppar. + \global\dimen1 = \prevdepth + \egroup % End the \vtop. + \addgroupbox + \prevdepth = \dimen1 + \checkinserts +} + +\def\addgroupbox{ + % \dimen0 is the vertical size of the group's box. + \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox + % \dimen2 is how much space is left on the page (more or less). + \dimen2 = \pageheight \advance\dimen2 by -\pagetotal + % if the group doesn't fit on the current page, and it's a big big + % group, force a page break. + \ifdim \dimen0 > \dimen2 + \ifdim \pagetotal < \vfilllimit\pageheight + \page + \fi + \fi + \box\groupbox +} + +% +% TeX puts in an \escapechar (i.e., `@') at the beginning of the help +% message, so this ends up printing `@group can only ...'. +% +\newhelp\groupinvalidhelp{% +group can only be used in environments such as @example,^^J% +where each line of input produces a line of output.} + +% @need space-in-mils +% forces a page break if there is not space-in-mils remaining. + +\newdimen\mil \mil=0.001in + +\parseargdef\need{% + % Ensure vertical mode, so we don't make a big box in the middle of a + % paragraph. + \par + % + % If the @need value is less than one line space, it's useless. + \dimen0 = #1\mil + \dimen2 = \ht\strutbox + \advance\dimen2 by \dp\strutbox + \ifdim\dimen0 > \dimen2 + % + % Do a \strut just to make the height of this box be normal, so the + % normal leading is inserted relative to the preceding line. + % And a page break here is fine. + \vtop to #1\mil{\strut\vfil}% + % + % TeX does not even consider page breaks if a penalty added to the + % main vertical list is 10000 or more. But in order to see if the + % empty box we just added fits on the page, we must make it consider + % page breaks. On the other hand, we don't want to actually break the + % page after the empty box. So we use a penalty of 9999. + % + % There is an extremely small chance that TeX will actually break the + % page at this \penalty, if there are no other feasible breakpoints in + % sight. (If the user is using lots of big @group commands, which + % almost-but-not-quite fill up a page, TeX will have a hard time doing + % good page breaking, for example.) However, I could not construct an + % example where a page broke at this \penalty; if it happens in a real + % document, then we can reconsider our strategy. + \penalty9999 + % + % Back up by the size of the box, whether we did a page break or not. + \kern -#1\mil + % + % Do not allow a page break right after this kern. + \nobreak + \fi +} + +% @br forces paragraph break (and is undocumented). + +\let\br = \par + +% @page forces the start of a new page. +% +\def\page{\par\vfill\supereject} + +% @exdent text.... +% outputs text on separate line in roman font, starting at standard page margin + +% This records the amount of indent in the innermost environment. +% That's how much \exdent should take out. +\newskip\exdentamount + +% This defn is used inside fill environments such as @defun. +\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} + +% This defn is used inside nofill environments such as @example. +\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount + \leftline{\hskip\leftskip{\rm#1}}}} + +% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current +% paragraph. For more general purposes, use the \margin insertion +% class. WHICH is `l' or `r'. Not documented, written for gawk manual. +% +\newskip\inmarginspacing \inmarginspacing=1cm +\def\strutdepth{\dp\strutbox} +% +\def\doinmargin#1#2{\strut\vadjust{% + \nobreak + \kern-\strutdepth + \vtop to \strutdepth{% + \baselineskip=\strutdepth + \vss + % if you have multiple lines of stuff to put here, you'll need to + % make the vbox yourself of the appropriate size. + \ifx#1l% + \llap{\ignorespaces #2\hskip\inmarginspacing}% + \else + \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% + \fi + \null + }% +}} +\def\inleftmargin{\doinmargin l} +\def\inrightmargin{\doinmargin r} +% +% @inmargin{TEXT [, RIGHT-TEXT]} +% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; +% else use TEXT for both). +% +\def\inmargin#1{\parseinmargin #1,,\finish} +\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \def\lefttext{#1}% have both texts + \def\righttext{#2}% + \else + \def\lefttext{#1}% have only one text + \def\righttext{#1}% + \fi + % + \ifodd\pageno + \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin + \else + \def\temp{\inleftmargin\lefttext}% + \fi + \temp +} + +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). This command +% is not documented, not supported, and doesn't work. +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + +% @include FILE -- \input text of FILE. +% +\def\include{\parseargusing\filenamecatcodes\includezzz} +\def\includezzz#1{% + \pushthisfilestack + \def\thisfile{#1}% + {% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @include of #1^^J}% + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes + % definitions, etc. + \expandafter + }\temp + \popthisfilestack +} +\def\filenamecatcodes{% + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other + \catcode`-=\other + \catcode`\`=\other + \catcode`\'=\other +} + +\def\pushthisfilestack{% + \expandafter\pushthisfilestackX\popthisfilestack\StackTerm +} +\def\pushthisfilestackX{% + \expandafter\pushthisfilestackY\thisfile\StackTerm +} +\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% + \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% +} + +\def\popthisfilestack{\errthisfilestackempty} +\def\errthisfilestackempty{\errmessage{Internal error: + the stack of filenames is empty.}} +% +\def\thisfile{} + +% @center line +% outputs that line, centered. +% +\parseargdef\center{% + \ifhmode + \let\centersub\centerH + \else + \let\centersub\centerV + \fi + \centersub{\hfil \ignorespaces#1\unskip \hfil}% + \let\centersub\relax % don't let the definition persist, just in case +} +\def\centerH#1{{% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break +}} +% +\newcount\centerpenalty +\def\centerV#1{% + % The idea here is the same as in \startdefun, \cartouche, etc.: if + % @center is the first thing after a section heading, we need to wipe + % out the negative parskip inserted by \sectionheading, but still + % prevent a page break here. + \centerpenalty = \lastpenalty + \ifnum\centerpenalty>10000 \vskip\parskip \fi + \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi + \line{\kern\leftskip #1\kern\rightskip}% +} + +% @sp n outputs n lines of vertical space +% +\parseargdef\sp{\vskip #1\baselineskip} + +% @comment ...line which is ignored... +% @c is the same as @comment +% @ignore ... @end ignore is another way to write a comment +% +\def\comment{\begingroup \catcode`\^^M=\active% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}% + +{\catcode`\^^M=\active% +\gdef\commentxxx#1^^M{\endgroup% +\futurelet\nexttoken\commentxxxx}% +\gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}% +} + +\def\c{\begingroup \catcode`\^^M=\active% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% +\cxxx} +{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}} +% See comment in \scanmacro about why the definitions of @c and @comment differ + +% @paragraphindent NCHARS +% We'll use ems for NCHARS, close enough. +% NCHARS can also be the word `asis' or `none'. +% We cannot feasibly implement @paragraphindent asis, though. +% +\def\asisword{asis} % no translation, these are keywords +\def\noneword{none} +% +\parseargdef\paragraphindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \defaultparindent = 0pt + \else + \defaultparindent = #1em + \fi + \fi + \parindent = \defaultparindent +} + +% @exampleindent NCHARS +% We'll use ems for NCHARS like @paragraphindent. +% It seems @exampleindent asis isn't necessary, but +% I preserve it to make it similar to @paragraphindent. +\parseargdef\exampleindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \lispnarrowing = 0pt + \else + \lispnarrowing = #1em + \fi + \fi +} + +% @firstparagraphindent WORD +% If WORD is `none', then suppress indentation of the first paragraph +% after a section heading. If WORD is `insert', then do indent at such +% paragraphs. +% +% The paragraph indentation is suppressed or not by calling +% \suppressfirstparagraphindent, which the sectioning commands do. +% We switch the definition of this back and forth according to WORD. +% By default, we suppress indentation. +% +\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} +\def\insertword{insert} +% +\parseargdef\firstparagraphindent{% + \def\temp{#1}% + \ifx\temp\noneword + \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent + \else\ifx\temp\insertword + \let\suppressfirstparagraphindent = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @firstparagraphindent option `\temp'}% + \fi\fi +} + +% Here is how we actually suppress indentation. Redefine \everypar to +% \kern backwards by \parindent, and then reset itself to empty. +% +% We also make \indent itself not actually do anything until the next +% paragraph. +% +\gdef\dosuppressfirstparagraphindent{% + \gdef\indent {\restorefirstparagraphindent \indent}% + \gdef\noindent{\restorefirstparagraphindent \noindent}% + \global\everypar = {\kern -\parindent \restorefirstparagraphindent}% +} +% +\gdef\restorefirstparagraphindent{% + \global\let\indent = \ptexindent + \global\let\noindent = \ptexnoindent + \global\everypar = {}% +} + + +% @refill is a no-op. +\let\refill=\relax + +% @setfilename INFO-FILENAME - ignored +\let\setfilename=\comment + +% @bye. +\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} + + +\message{pdf,} +% adobe `portable' document format +\newcount\tempnum +\newcount\lnkcount +\newtoks\filename +\newcount\filenamelength +\newcount\pgn +\newtoks\toksA +\newtoks\toksB +\newtoks\toksC +\newtoks\toksD +\newbox\boxA +\newbox\boxB +\newcount\countA +\newif\ifpdf +\newif\ifpdfmakepagedest + +% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 +% can be set). So we test for \relax and 0 as well as being undefined. +\ifx\pdfoutput\thisisundefined +\else + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput + \else + \pdftrue + \fi + \fi +\fi + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and +% related messages. The final outcome is that it is up to the TeX user +% to double the backslashes and otherwise make the string valid, so +% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to +% do this reliably, so we use it. + +% #1 is a control sequence in which to do the replacements, +% which we \xdef. +\def\txiescapepdf#1{% + \ifx\pdfescapestring\thisisundefined + % No primitive available; should we give a warning or log? + % Many times it won't matter. + \else + % The expandable \pdfescapestring primitive escapes parentheses, + % backslashes, and other special chars. + \xdef#1{\pdfescapestring{#1}}% + \fi +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + +\ifpdf + % + % Color manipulation macros using ideas from pdfcolor.tex, + % except using rgb instead of cmyk; the latter is said to render as a + % very dark gray on-screen and a very dark halftone in print, instead + % of actual black. The dark red here is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. We use + % black by default, though. + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} + % + % k sets the color for filling (usual text, etc.); + % K sets the color for stroking (thin rules, e.g., normal _'s). + \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} + % + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\rgbBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\dopdfimage#1#2#3{% + \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \else \gdef\pdfimgext{PDF}% + \fi + \else \gdef\pdfimgext{pdf}% + \fi + \closein 1 + \endgroup + % + % without \immediate, ancient pdftex seg faults when the same image is + % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) + \ifnum\pdftexversion < 14 + \immediate\pdfimage + \else + \immediate\pdfximage + \fi + \ifdim \wd0 >0pt width \pdfimagewidth \fi + \ifdim \wd2 >0pt height \pdfimageheight \fi + \ifnum\pdftexversion<13 + #1.\pdfimgext + \else + {#1.\pdfimgext}% + \fi + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} + % + \def\pdfmkdest#1{{% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \turnoffactive + \makevalueexpandable + \def\pdfdestname{#1}% + \txiescapepdf\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1} + % + % by default, use black for everything. + \def\urlcolor{\rgbBlack} + \def\linkcolor{\rgbBlack} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % + % Adding outlines to PDF; macros for calculating structure of outlines + % come from Petr Olsak + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax + \advance\tempnum by 1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} + % + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number + % + \def\dopdfoutline#1#2#3#4{% + % Generate a link to the node text if that exists; else, use the + % page number. We could generate a destination for the section + % text in the case where a section has no node, but it doesn't + % seem worth the trouble, since most documents are normally structured. + \edef\pdfoutlinedest{#3}% + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% + \else + \txiescapepdf\pdfoutlinedest + \fi + % + % Also escape PDF chars in the display string. + \edef\pdfoutlinetext{#1}% + \txiescapepdf\pdfoutlinetext + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% + } + % + \def\pdfmakeoutlines{% + \begingroup + % Read toc silently, to get counts of subentries for \pdfoutline. + \def\partentry##1##2##3##4{}% ignore parts in the outlines + \def\numchapentry##1##2##3##4{% + \def\thischapnum{##2}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + }% + \def\numsecentry##1##2##3##4{% + \advancenumber{chap\thischapnum}% + \def\thissecnum{##2}% + \def\thissubsecnum{0}% + }% + \def\numsubsecentry##1##2##3##4{% + \advancenumber{sec\thissecnum}% + \def\thissubsecnum{##2}% + }% + \def\numsubsubsecentry##1##2##3##4{% + \advancenumber{subsec\thissubsecnum}% + }% + \def\thischapnum{0}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + % + % use \def rather than \let here because we redefine \chapentry et + % al. a second time, below. + \def\appentry{\numchapentry}% + \def\appsecentry{\numsecentry}% + \def\appsubsecentry{\numsubsecentry}% + \def\appsubsubsecentry{\numsubsubsecentry}% + \def\unnchapentry{\numchapentry}% + \def\unnsecentry{\numsecentry}% + \def\unnsubsecentry{\numsubsecentry}% + \def\unnsubsubsecentry{\numsubsubsecentry}% + \readdatafile{toc}% + % + % Read toc second time, this time actually producing the outlines. + % The `-' means take the \expnumber as the absolute number of + % subentries, which we calculated on our first read of the .toc above. + % + % We use the node names as the destinations. + \def\numchapentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% + \def\numsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% + \def\numsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% + \def\numsubsubsecentry##1##2##3##4{% count is always zero + \dopdfoutline{##1}{}{##3}{##4}}% + % + % PDF outlines are displayed using system fonts, instead of + % document fonts. Therefore we cannot use special characters, + % since the encoding is unknown. For example, the eogonek from + % Latin 2 (0xea) gets translated to a | character. Info from + % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. + % + % TODO this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Too + % much work for too little return. Just use the ASCII equivalents + % we use for the index sort strings. + % + \indexnofonts + \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup + } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] + % + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \nextsp} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } + \ifnum\pdftexversion < 14 + \let \startlink \pdfannotlink + \else + \let \startlink \pdfstartlink + \fi + % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + % do we want to go so far as to use \indexnofonts instead of just + % special-casing \var here? + \def\var##1{##1}% + % + \leavevmode\setcolor{\urlcolor}% + \startlink attr{/Border [0 0 0]}% + user{/Subtype /Link /A << /S /URI /URI (#1) >>}% + \endgroup} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} + \setcolor{\linkcolor}#1\endlink} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} +\else + % non-pdf mode + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble + \let\pdfmakeoutlines = \relax +\fi % \ifx\pdfoutput + + +\message{fonts,} + +% Change the current font style to #1, remembering it in \curfontstyle. +% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in +% italics, not bold italics. +% +\def\setfontstyle#1{% + \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. + \csname ten#1\endcsname % change the current font +} + +% Select #1 fonts with the current style. +% +\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} + +\def\rm{\fam=0 \setfontstyle{rm}} +\def\it{\fam=\itfam \setfontstyle{it}} +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} + +% Unfortunately, we have to override this for titles and the like, since +% in those cases "rm" is bold. Sigh. +\def\rmisbold{\rm\def\curfontstyle{bf}} + +% Texinfo sort of supports the sans serif font style, which plain TeX does not. +% So we set up a \sf. +\newfam\sffam +\def\sf{\fam=\sffam \setfontstyle{sf}} +\let\li = \sf % Sometimes we call it \li, not \sf. + +% We don't need math for this font style. +\def\ttsl{\setfontstyle{ttsl}} + + +% Set the baselineskip to #1, and the lineskip and strut size +% correspondingly. There is no deep meaning behind these magic numbers +% used as factors; they just match (closely enough) what Knuth defined. +% +\def\lineskipfactor{.08333} +\def\strutheightpercent{.70833} +\def\strutdepthpercent {.29167} +% +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% +\newdimen\textleading +\def\setleading#1{% + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 + \normallineskip = \lineskipfactor\normalbaselineskip + \normalbaselines + \setbox\strutbox =\hbox{% + \vrule width0pt height\strutheightpercent\baselineskip + depth \strutdepthpercent \baselineskip + }% +} + +% PDF CMaps. See also LaTeX's t1.cmap. +% +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\thisisundefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\fi\fi + + +% Set the font macro #1 to the font named \fontprefix#2. +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). +% Example: +% #1 = \textrm +% #2 = \rmshape +% #3 = 10 +% #4 = \mainmagstep +% #5 = OT1 +% +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble +% +% (end of cmaps) + +% Use cm as the default font prefix. +% To specify the font prefix, you must define \fontprefix +% before you read in texinfo.tex. +\ifx\fontprefix\thisisundefined +\def\fontprefix{cm} +\fi +% Support font families that don't use the same naming scheme as CM. +\def\rmshape{r} +\def\rmbshape{bx} % where the normal face is bold +\def\bfshape{b} +\def\bxshape{bx} +\def\ttshape{tt} +\def\ttbshape{tt} +\def\ttslshape{sltt} +\def\itshape{ti} +\def\itbshape{bxti} +\def\slshape{sl} +\def\slbshape{bxsl} +\def\sfshape{ss} +\def\sfbshape{ss} +\def\scshape{csc} +\def\scbshape{csc} + +% Definitions for a main text size of 11pt. (The default in Texinfo.) +% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defsl\slshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf +\let\tenttsl=\defttsl \let\tensl=\defsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter (and unnumbered) fonts (17.28pt). +\def\chapnominalsize{17pt} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} +\let\chapbf=\chaprm +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} +\font\chapi=cmmi12 scaled \magstep2 +\font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} + +% Section fonts (14.4pt). +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep2}{OT1} +\font\seci=cmmi12 scaled \magstep1 +\font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} + +% Subsection fonts (13.15pt). +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1315}{OT1} +\font\sseci=cmmi12 scaled \magstephalf +\font\ssecsy=cmsy10 scaled 1315 +\def\ssececsize{1200} + +% Reduced fonts for @acro in text (10pt). +\def\reducednominalsize{10pt} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 +\def\reducedecsize{1000} + +\textleading = 13.2pt % line spacing for 11pt CM +\textfonts % reset the current fonts +\rm +} % end of 11pt text font size definitions, \definetextfontsizexi + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defsl\slshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf +\let\tensl=\defsl \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 +\def\ssececsize{1000} + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + +\divide\parskip by 2 % reduce space between paragraphs +\textleading = 12pt % line spacing for 10pt CM +\textfonts % reset the current fonts +\rm +} % end of 10pt text font size definitions, \definetextfontsizex + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xiword{11} +\def\xword{10} +\def\xwordpt{10pt} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + %\wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + +% In order for the font changes to affect most math symbols and letters, +% we have to define the \textfont of the standard families. We don't +% bother to reset \scriptfont and \scriptscriptfont; awaiting user need. +% +\def\resetmathfonts{% + \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy + \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf + \textfont\ttfam=\tentt \textfont\sffam=\tensf +} + +% The font-changing commands redefine the meanings of \tenSTYLE, instead +% of just \STYLE. We do this because \STYLE needs to also set the +% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire +% \tenSTYLE to set the current font. +% +% Each font-changing command also sets the names \lsize (one size lower) +% and \lllsize (three sizes lower). These relative commands are used +% in, e.g., the LaTeX logo and acronyms. +% +% This all needs generalizing, badly. +% +\def\textfonts{% + \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl + \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc + \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy + \let\tenttsl=\textttsl + \def\curfontsize{text}% + \def\lsize{reduced}\def\lllsize{smaller}% + \resetmathfonts \setleading{\textleading}} +\def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl + \def\curfontsize{title}% + \def\lsize{chap}\def\lllsize{subsec}% + \resetmathfonts \setleading{27pt}} +\def\titlefont#1{{\titlefonts\rmisbold #1}} +\def\chapfonts{% + \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl + \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc + \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy + \let\tenttsl=\chapttsl + \def\curfontsize{chap}% + \def\lsize{sec}\def\lllsize{text}% + \resetmathfonts \setleading{19pt}} +\def\secfonts{% + \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl + \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc + \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy + \let\tenttsl=\secttsl + \def\curfontsize{sec}% + \def\lsize{subsec}\def\lllsize{reduced}% + \resetmathfonts \setleading{17pt}} +\def\subsecfonts{% + \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl + \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc + \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy + \let\tenttsl=\ssecttsl + \def\curfontsize{ssec}% + \def\lsize{text}\def\lllsize{small}% + \resetmathfonts \setleading{15pt}} +\let\subsubsecfonts = \subsecfonts +\def\reducedfonts{% + \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl + \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc + \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy + \let\tenttsl=\reducedttsl + \def\curfontsize{reduced}% + \def\lsize{small}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallfonts{% + \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl + \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc + \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy + \let\tenttsl=\smallttsl + \def\curfontsize{small}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallerfonts{% + \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl + \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc + \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy + \let\tenttsl=\smallerttsl + \def\curfontsize{smaller}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{9.5pt}} + +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +% Define these just so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + +% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample +% can fit this many characters: +% 8.5x11=86 smallbook=72 a4=90 a5=69 +% If we use \scriptfonts (8pt), then we can fit this many characters: +% 8.5x11=90+ smallbook=80 a4=90+ a5=77 +% For me, subjectively, the few extra characters that fit aren't worth +% the additional smallness of 8pt. So I'm making the default 9pt. +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 +% --karl, 24jan03. + +% Set up the default fonts, so we can use them for creating boxes. +% +\definetextfontsizexi + + +\message{markup,} + +% Check if we are currently using a typewriter font. Since all the +% Computer Modern typewriter fonts have zero interword stretch (and +% shrink), and it is reasonable to expect all typewriter fonts to have +% this property, we can check that font parameter. +% +\def\ifmonospace{\ifdim\fontdimen3\font=0pt } + +% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will +% define and register \INITMACRO to be called on markup style changes. +% \INITMACRO can check \currentmarkupstyle for the innermost +% style and the set of \ifmarkupSTYLE switches for all styles +% currently in effect. +\newif\ifmarkupvar +\newif\ifmarkupsamp +\newif\ifmarkupkey +%\newif\ifmarkupfile % @file == @samp. +%\newif\ifmarkupoption % @option == @samp. +\newif\ifmarkupcode +\newif\ifmarkupkbd +%\newif\ifmarkupenv % @env == @code. +%\newif\ifmarkupcommand % @command == @code. +\newif\ifmarkuptex % @tex (and part of @math, for now). +\newif\ifmarkupexample +\newif\ifmarkupverb +\newif\ifmarkupverbatim + +\let\currentmarkupstyle\empty + +\def\setupmarkupstyle#1{% + \csname markup#1true\endcsname + \def\currentmarkupstyle{#1}% + \markupstylesetup +} + +\let\markupstylesetup\empty + +\def\defmarkupstylesetup#1{% + \expandafter\def\expandafter\markupstylesetup + \expandafter{\markupstylesetup #1}% + \def#1% +} + +% Markup style setup for left and right quotes. +\defmarkupstylesetup\markupsetuplq{% + \expandafter\let\expandafter \temp + \csname markupsetuplq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuplqdefault \else \temp \fi +} + +\defmarkupstylesetup\markupsetuprq{% + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuprqdefault \else \temp \fi +} + +{ +\catcode`\'=\active +\catcode`\`=\active + +\gdef\markupsetuplqdefault{\let`\lq} +\gdef\markupsetuprqdefault{\let'\rq} + +\gdef\markupsetcodequoteleft{\let`\codequoteleft} +\gdef\markupsetcodequoteright{\let'\codequoteright} +} + +\let\markupsetuplqcode \markupsetcodequoteleft +\let\markupsetuprqcode \markupsetcodequoteright +% +\let\markupsetuplqexample \markupsetcodequoteleft +\let\markupsetuprqexample \markupsetcodequoteright +% +\let\markupsetuplqkbd \markupsetcodequoteleft +\let\markupsetuprqkbd \markupsetcodequoteright +% +\let\markupsetuplqsamp \markupsetcodequoteleft +\let\markupsetuprqsamp \markupsetcodequoteright +% +\let\markupsetuplqverb \markupsetcodequoteleft +\let\markupsetuprqverb \markupsetcodequoteright +% +\let\markupsetuplqverbatim \markupsetcodequoteleft +\let\markupsetuprqverbatim \markupsetcodequoteright + +% Allow an option to not use regular directed right quote/apostrophe +% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). +% The undirected quote is ugly, so don't make it the default, but it +% works for pasting with more pdf viewers (at least evince), the +% lilypond developers report. xpdf does work with the regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi + \else \char'22 \fi +} + +% Commands to set the quote options. +% +\parseargdef\codequoteundirected{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% + \fi\fi +} +% +\parseargdef\codequotebacktick{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% + \fi\fi +} + +% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. +\def\noligaturesquoteleft{\relax\lq} + +% Count depth in font-changes, for error checks +\newcount\fontdepth \fontdepth=0 + +% Font commands. + +% #1 is the font command (\sl or \it), #2 is the text to slant. +% If we are in a monospaced environment, however, 1) always use \ttsl, +% and 2) do not add an italic correction. +\def\dosmartslant#1#2{% + \ifusingtt + {{\ttsl #2}\let\next=\relax}% + {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% + \next +} +\def\smartslanted{\dosmartslant\sl} +\def\smartitalic{\dosmartslant\it} + +% Output an italic correction unless \next (presumed to be the following +% character) is such as not to need one. +\def\smartitaliccorrection{% + \ifx\next,% + \else\ifx\next-% + \else\ifx\next.% + \else\ifx\next\.% + \else\ifx\next\comma% + \else\ptexslash + \fi\fi\fi\fi\fi + \aftersmartic +} + +% Unconditional use \ttsl, and no ic. @var is set to this for defuns. +\def\ttslanted#1{{\ttsl #1}} + +% @cite is like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? +\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} + +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} + +\let\i=\smartitalic +\let\slanted=\smartslanted +\let\dfn=\smartslanted +\let\emph=\smartitalic + +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @b, explicit bold. Also @strong. +\def\b#1{{\bf #1}} +\let\strong=\b + +% @sansserif, explicit sans. +\def\sansserif#1{{\sf #1}} + +% We can't just use \exhyphenpenalty, because that only has effect at +% the end of a paragraph. Restore normal hyphenation at the end of the +% group within which \nohyphenation is presumably called. +% +\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} +\def\restorehyphenation{\hyphenchar\font = `- } + +% Set sfcode to normal for the chars that usually have another value. +% Can't use plain's \frenchspacing because it uses the `\x notation, and +% sometimes \x has an active definition that messes things up. +% +\catcode`@=11 + \def\plainfrenchspacing{% + \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m + \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends + } +\catcode`@=\other +\def\endofsentencespacefactor{3000}% default + +% @t, explicit typewriter. +\def\t#1{% + {\tt \rawbackslash \plainfrenchspacing #1}% + \null +} + +% @samp. +\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} + +% @indicateurl is \samp, that is, with quotes. +\let\indicateurl=\samp + +% @code (and similar) prints in typewriter, but with spaces the same +% size as normal in the surrounding text, without hyphenation, etc. +% This is a subroutine for that. +\def\tclose#1{% + {% + % Change normal interword space to be same as for the current font. + \spaceskip = \fontdimen2\font + % + % Switch to typewriter. + \tt + % + % But `\ ' produces the large typewriter interword space. + \def\ {{\spaceskip = 0pt{} }}% + % + % Turn off hyphenation. + \nohyphenation + % + \rawbackslash + \plainfrenchspacing + #1% + }% + \null % reset spacefactor to 1000 +} + +% We *must* turn on hyphenation at `-' and `_' in @code. +% (But see \codedashfinish below.) +% Otherwise, it is too hard to avoid overfull hboxes +% in the Emacs manual, the Library manual, etc. +% +% Unfortunately, TeX uses one parameter (\hyphenchar) to control +% both hyphenation at - and hyphenation within words. +% We must therefore turn them both off (\tclose does that) +% and arrange explicitly to hyphenate at a dash. -- rms. +{ + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active + \global\let'=\rq \global\let`=\lq % default definitions + % + \global\def\code{\begingroup + \setupmarkupstyle{code}% + % The following should really be moved into \setupmarkupstyle handlers. + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\normaldash + \let_\realunder + \fi + % Given -foo (with a single dash), we do not want to allow a break + % after the hyphen. + \global\let\codedashprev=\codedash + % + \codex + } + % + \gdef\codedash{\futurelet\next\codedashfinish} + \gdef\codedashfinish{% + \normaldash % always output the dash character itself. + % + % Now, output a discretionary to allow a line break, unless + % (a) the next character is a -, or + % (b) the preceding character is a -. + % E.g., given --posix, we do not want to allow a break after either -. + % Given --foo-bar, we do want to allow a break between the - and the b. + \ifx\next\codedash \else + \ifx\codedashprev\codedash + \else \discretionary{}{}{}\fi + \fi + % we need the space after the = for the case when \next itself is a + % space token; it would get swallowed otherwise. As in @code{- a}. + \global\let\codedashprev= \next + } +} +\def\normaldash{-} +% +\def\codex #1{\tclose{#1}\endgroup} + +\def\codeunder{% + % this is all so @math{@code{var_name}+1} can work. In math mode, _ + % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) + % will therefore expand the active definition of _, which is us + % (inside @code that is), therefore an endless loop. + \ifusingtt{\ifmmode + \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. + \else\normalunderscore \fi + \discretionary{}{}{}}% + {\_}% +} + +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is bad. +% @allowcodebreaks provides a document-level way to turn breaking at - +% and _ on and off. +% +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse + \else + \errhelp = \EMsimple + \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% + \fi\fi +} + +% For @command, @env, @file, @option quotes seem unnecessary, +% so use \code rather than \samp. +\let\command=\code +\let\env=\code +\let\file=\code +\let\option=\code + +% @uref (abbreviation for `urlref') aka @url takes an optional +% (comma-separated) second argument specifying the text to display and +% an optional third arg as text to display instead of (rather than in +% addition to) the url itself. First (mandatory) arg is the url. + +% TeX-only option to allow changing PDF output to show only the second +% arg (if given), and not the url (which is then just the link target). +\newif\ifurefurlonlylink + +% The main macro is \urefbreak, which allows breaking at expected +% places within the url. (There used to be another version, which +% didn't support automatic breaking.) +\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} +\let\uref=\urefbreak +% +\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} +\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% look for second arg + \ifdim\wd0 > 0pt + \ifpdf + \ifurefurlonlylink + % PDF plus option to not display url, show just arg + \unhbox0 + \else + % PDF, normally display both arg and url for consistency, + % visibility, if the pdf is eventually used to print, etc. + \unhbox0\ (\urefcode{#1})% + \fi + \else + \unhbox0\ (\urefcode{#1})% DVI, always show arg and url + \fi + \else + \urefcode{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% Allow line breaks around only a few characters (only). +\def\urefcatcodes{% + \catcode\ampChar=\active \catcode\dotChar=\active + \catcode\hashChar=\active \catcode\questChar=\active + \catcode\slashChar=\active +} +{ + \urefcatcodes + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \urefcatcodes + \let&\urefcodeamp + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequest + \let/\urefcodeslash + \codex + } + % + % By default, they are just regular characters. + \global\def&{\normalamp} + \global\def.{\normaldot} + \global\def#{\normalhash} + \global\def?{\normalquest} + \global\def/{\normalslash} +} + +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretchamount{.13em} +\def\urefpoststretchamount{.1em} +\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} +\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} + +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% +\parseargdef\urefbreakstyle{% + \def\txiarg{#1}% + \ifx\txiarg\wordnone + \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordbefore + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordafter + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} + \else + \errhelp = \EMsimple + \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\wordafter{after} +\def\wordbefore{before} +\def\wordnone{none} + +\urefbreakstyle after + +% @url synonym for @uref, since that's how everyone uses it. +% +\let\url=\uref + +% rms does not like angle brackets --karl, 17may97. +% So now @email is just like @uref, unless we are pdf. +% +%\def\email#1{\angleleft{\tt #1}\angleright} +\ifpdf + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} +\else + \let\email=\uref +\fi + +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is `distinct'. +\kbdinputstyle distinct + +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} + +\def\xkey{\key} +\def\kbdsub#1#2#3\par{% + \def\one{#1}\def\three{#3}\def\threex{??}% + \ifx\one\xkey\ifx\threex\three \key{#2}% + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +} + +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +% \vbox{\hrule\kern-0.4pt +% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +% \kern-0.4pt\hrule}% +% \kern-.06em\raise0.4pt\hbox{\angleright}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. +% +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} + +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} + +% Typeset a dimension, e.g., `in' or `pt'. The only reason for the +% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. +% +\def\dmn#1{\thinspace #1} + +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. +% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} + +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. +% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} + +% @asis just yields its argument. Used with @table, for example. +% +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot + % have to provide another name for sup operator + \let\mathopsup=\sup + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \catcode`' = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + \let' = \ptexquoteright + } +} + +% for @sub and @sup, if in math mode, just do a normal sub/superscript. +% If in text, use math to place as sub/superscript, but switch +% into text mode, with smaller fonts. This is a different font than the +% one used for real math sub/superscripts (8pt vs. 7pt), but let's not +% fix it (significant additions to font machinery) until someone notices. +% +\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi} +\def\finishsub#1{$\sb{\hbox{\selectfonts\lllsize #1}}$}% +% +\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi} +\def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}% + +% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. +% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, +% except specified as a normal braced arg, so no newlines to worry about. +% +\def\outfmtnametex{tex} +% +\long\def\inlinefmt#1{\doinlinefmt #1,\finish} +\long\def\doinlinefmt#1,#2,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi +} +% +% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if +% FMTNAME is tex, else ELSE-TEXT. +\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish} +\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi +} +% +% For raw, must switch into @tex before parsing the argument, to avoid +% setting catcodes prematurely. Doing it this way means that, for +% example, @inlineraw{html, foo{bar} gets a parse error instead of being +% ignored. But this isn't important because if people want a literal +% *right* brace they would have to use a command anyway, so they may as +% well use a command to get a left brace too. We could re-use the +% delimiter character idea from \verb, but it seems like overkill. +% +\long\def\inlineraw{\tex \doinlineraw} +\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} +\def\doinlinerawtwo#1,#2,\finish{% + \def\inlinerawname{#1}% + \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi + \endgroup % close group opened by \tex. +} + +% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set. +% +\long\def\inlineifset#1{\doinlineifset #1,\finish} +\long\def\doinlineifset#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax + \else\ignorespaces#2\fi +} + +% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set. +% +\long\def\inlineifclear#1{\doinlineifclear #1,\finish} +\long\def\doinlineifclear#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi +} + + +\message{glyphs,} +% and logos. + +% @@ prints an @, as does @atchar{}. +\def\@{\char64 } +\let\atchar=\@ + +% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. +% Unless we're in typewriter, use \ecfont because the CM text fonts do +% not have braces, and we don't want to switch into math. +\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} +\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} +\let\{=\mylbrace \let\lbracechar=\{ +\let\}=\myrbrace \let\rbracechar=\} +\begingroup + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux/toc files. + \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \ptexc +\let\dotaccent = \ptexdot +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \ptext +\let\ubaraccent = \ptexb +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} + +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \selectfonts\lllsize A% + \fi + }% + \vss + }}% + \kern-.15em + \TeX +} + +% Some math mode symbols. Define \ensuremath to switch into math mode +% unless we are already there. Expansion tricks may not be needed here, +% but safer, and can't hurt. +\def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi} +\def\ensuredmath#1{$\relax#1$} +% +\def\bullet{\ensuremath\ptexbullet} +\def\geq{\ensuremath\ge} +\def\leq{\ensuremath\le} +\def\minus{\ensuremath-} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, they should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} +\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\tentt \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% +\def\pounds{{\it\$}} + +% @euro{} comes from a separate font, depending on the current style. +% We use the free feym* fonts from the eurosym package by Henrik +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. +% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. +% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted +% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. +% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. +% +% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. + % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. + % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. + % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % + \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize + \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + +% Glyphs from the EC fonts. We don't use \let for the aliases, because +% sometimes we redefine the original macro, and the alias should reflect +% the redefinition. +% +% Use LaTeX names for the Icelandic letters. +\def\DH{{\ecfont \char"D0}} % Eth +\def\dh{{\ecfont \char"F0}} % eth +\def\TH{{\ecfont \char"DE}} % Thorn +\def\th{{\ecfont \char"FE}} % thorn +% +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +% This positioning is not perfect (see the ogonek LaTeX package), but +% we have the precomposed glyphs for the most common cases. We put the +% tests to use those glyphs in the single \ogonek macro so we have fewer +% dummy definitions to worry about for index entries, etc. +% +% ogonek is also used with other letters in Lithuanian (IOU), but using +% the precomposed glyphs for those is not so easy since they aren't in +% the same EC font. +\def\ogonek#1{{% + \def\temp{#1}% + \ifx\temp\macrocharA\Aogonek + \else\ifx\temp\macrochara\aogonek + \else\ifx\temp\macrocharE\Eogonek + \else\ifx\temp\macrochare\eogonek + \else + \ecfont \setbox0=\hbox{#1}% + \ifdim\ht0=1ex\accent"0C #1% + \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% + \fi + \fi\fi\fi\fi + }% +} +\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} +\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} +\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} +\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} +% +% Use the European Computer Modern fonts (cm-super in outline format) +% for non-CM glyphs. That is ec* for regular text and tc* for the text +% companion symbols (LaTeX TS1 encoding). Both are part of the ec +% package and follow the same conventions. +% +\def\ecfont{\etcfont{e}} +\def\tcfont{\etcfont{t}} +% +\def\etcfont#1{% + % We can't distinguish serif/sans and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifmonospace + % typewriter: + \font\thisecfont = #1ctt\ecsize \space at \nominalsize + \else + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \fi + \thisecfont +} + +% @registeredsymbol - R in a circle. The font for the R should really +% be smaller yet, but lllsize is the best we can do for now. +% Adapted from the plain.tex definition of \copyright. +% +\def\registeredsymbol{% + $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% + \hfil\crcr\Orb}}% + }$% +} + +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. +% +\ifx\Orb\thisisundefined +\def\Orb{\mathhexbox20D} +\fi + +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' + + +\message{page headings,} + +\newskip\titlepagetopglue \titlepagetopglue = 1.5in +\newskip\titlepagebottomglue \titlepagebottomglue = 2pc + +% First the title page. Must do @settitle before @titlepage. +\newif\ifseenauthor +\newif\iffinishedtitlepage + +% Do an implicit @contents or @shortcontents after @end titlepage if the +% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. +% +\newif\ifsetcontentsaftertitlepage + \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue +\newif\ifsetshortcontentsaftertitlepage + \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue + +\parseargdef\shorttitlepage{% + \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} + +\envdef\titlepage{% + % Open one extra group, as we want to close it in the middle of \Etitlepage. + \begingroup + \parindent=0pt \textfonts + % Leave some space at the very top of the page. + \vglue\titlepagetopglue + % No rule at page bottom unless we print one at the top with @title. + \finishedtitlepagetrue + % + % Most title ``pages'' are actually two pages long, with space + % at the top of the second. We don't want the ragged left on the second. + \let\oldpage = \page + \def\page{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + \let\page = \oldpage + \page + \null + }% +} + +\def\Etitlepage{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + % It is important to do the page break before ending the group, + % because the headline and footline are only empty inside the group. + % If we use the new definition of \page, we always get a blank page + % after the title page, which we certainly don't want. + \oldpage + \endgroup + % + % Need this before the \...aftertitlepage checks so that if they are + % in effect the toc pages will come out with page numbers. + \HEADINGSon + % + % If they want short, they certainly want long too. + \ifsetshortcontentsaftertitlepage + \shortcontents + \contents + \global\let\shortcontents = \relax + \global\let\contents = \relax + \fi + % + \ifsetcontentsaftertitlepage + \contents + \global\let\contents = \relax + \global\let\shortcontents = \relax + \fi +} + +\def\finishtitlepage{% + \vskip4pt \hrule height 2pt width \hsize + \vskip\titlepagebottomglue + \finishedtitlepagetrue +} + +% Settings used for typesetting titles: no hyphenation, no indentation, +% don't worry much about spacing, ragged right. This should be used +% inside a \vbox, and fonts need to be set appropriately first. Because +% it is always used for titles, nothing else, we call \rmisbold. \par +% should be specified before the end of the \vbox, since a vbox is a group. +% +\def\raggedtitlesettings{% + \rmisbold + \hyphenpenalty=10000 + \parindent=0pt + \tolerance=5000 + \ptexraggedright +} + +% Macros to be used within @titlepage: + +\let\subtitlerm=\tenrm +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + +\parseargdef\title{% + \checkenv\titlepage + \vbox{\titlefonts \raggedtitlesettings #1\par}% + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt +} + +\parseargdef\subtitle{% + \checkenv\titlepage + {\subtitlefont \rightline{#1}}% +} + +% @author should come last, but may come many times. +% It can also be used inside @quotation. +% +\parseargdef\author{% + \def\temp{\quotation}% + \ifx\thisenv\temp + \def\quotationauthor{#1}% printed in \Equotation. + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi + {\secfonts\rmisbold \leftline{#1}}% + \fi +} + + +% Set up page headings and footings. + +\let\thispage=\folio + +\newtoks\evenheadline % headline on even pages +\newtoks\oddheadline % headline on odd pages +\newtoks\evenfootline % footline on even pages +\newtoks\oddfootline % footline on odd pages + +% Now make \makeheadline and \makefootline in Plain TeX use those variables +\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline + \else \the\evenheadline \fi}} +\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline + \else \the\evenfootline \fi}\HEADINGShook} +\let\HEADINGShook=\relax + +% Commands to set those variables. +% For example, this is what @headings on does +% @evenheading @thistitle|@thispage|@thischapter +% @oddheading @thischapter|@thispage|@thistitle +% @evenfooting @thisfile|| +% @oddfooting ||@thisfile + + +\def\evenheading{\parsearg\evenheadingxxx} +\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} +\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% +\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddheading{\parsearg\oddheadingxxx} +\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} +\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% +\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% + +\def\evenfooting{\parsearg\evenfootingxxx} +\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} +\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% +\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddfooting{\parsearg\oddfootingxxx} +\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} +\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% + \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% + % + % Leave some space for the footline. Hopefully ok to assume + % @evenfooting will not be used by itself. + \global\advance\pageheight by -12pt + \global\advance\vsize by -12pt +} + +\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} + +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page +% +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +% These define \getoddheadingmarks, \getevenheadingmarks, +% \getoddfootingmarks, and \getevenfootingmarks, each to one of +% \gettopheadingmarks, \getbottomheadingmarks. +% +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom + +% @headings double turns headings on for double-sided printing. +% @headings single turns headings on for single-sided printing. +% @headings off turns them off. +% @headings on same as @headings double, retained for compatibility. +% @headings after turns on double-sided headings after this page. +% @headings doubleafter turns on double-sided headings after this page. +% @headings singleafter turns on single-sided headings after this page. +% By default, they are off at the start of a document, +% and turned `on' after @end titlepage. + +\def\headings #1 {\csname HEADINGS#1\endcsname} + +\def\headingsoff{% non-global headings elimination + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% +} + +\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting +\HEADINGSoff % it's the default + +% When we turn headings on, set the page number to 1. +% For double-sided printing, put current file name in lower left corner, +% chapter name on inside top of right hand pages, document +% title on inside top of left hand pages, and page numbers on outside top +% edge of all pages. +\def\HEADINGSdouble{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} +\let\contentsalignmacro = \chappager + +% For single-sided printing, chapter title goes across top left of page, +% page number on top right. +\def\HEADINGSsingle{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapterheading\hfil\folio}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} +\def\HEADINGSon{\HEADINGSdouble} + +\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} +\let\HEADINGSdoubleafter=\HEADINGSafter +\def\HEADINGSdoublex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} + +\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} +\def\HEADINGSsinglex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapterheading\hfil\folio}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} + +% Subroutines used in generating headings +% This produces Day Month Year style of output. +% Only define if not already defined, in case a txi-??.tex file has set +% up a different format (e.g., txi-cs.tex does this). +\ifx\today\thisisundefined +\def\today{% + \number\day\space + \ifcase\month + \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr + \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug + \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec + \fi + \space\number\year} +\fi + +% @settitle line... specifies the title of the document, for headings. +% It generates no output of its own. +\def\thistitle{\putwordNoTitle} +\def\settitle{\parsearg{\gdef\thistitle}} + + +\message{tables,} +% Tables -- @table, @ftable, @vtable, @item(x). + +% default indentation of table text +\newdimen\tableindent \tableindent=.8in +% default indentation of @itemize and @enumerate text +\newdimen\itemindent \itemindent=.3in +% margin between end of table item and start of table text. +\newdimen\itemmargin \itemmargin=.1in + +% used internally for \itemindent minus \itemmargin +\newdimen\itemmax + +% Note @table, @ftable, and @vtable define @item, @itemx, etc., with +% these defs. +% They also define \itemindex +% to index the item name in whatever manner is desired (perhaps none). + +\newif\ifitemxneedsnegativevskip + +\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} + +\def\internalBitem{\smallbreak \parsearg\itemzzz} +\def\internalBitemx{\itemxpar \parsearg\itemzzz} + +\def\itemzzz #1{\begingroup % + \advance\hsize by -\rightskip + \advance\hsize by -\tableindent + \setbox0=\hbox{\itemindicate{#1}}% + \itemindex{#1}% + \nobreak % This prevents a break before @itemx. + % + % If the item text does not fit in the space we have, put it on a line + % by itself, and do not allow a page break either before or after that + % line. We do not start a paragraph here because then if the next + % command is, e.g., @kindex, the whatsit would get put into the + % horizontal list on a line by itself, resulting in extra blank space. + \ifdim \wd0>\itemmax + % + % Make this a paragraph so we get the \parskip glue and wrapping, + % but leave it ragged-right. + \begingroup + \advance\leftskip by-\tableindent + \advance\hsize by\tableindent + \advance\rightskip by0pt plus1fil\relax + \leavevmode\unhbox0\par + \endgroup + % + % We're going to be starting a paragraph, but we don't want the + % \parskip glue -- logically it's part of the @item we just started. + \nobreak \vskip-\parskip + % + % Stop a page break at the \parskip glue coming up. However, if + % what follows is an environment such as @example, there will be no + % \parskip glue; then the negative vskip we just inserted would + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. + % + \penalty 10001 + \endgroup + \itemxneedsnegativevskipfalse + \else + % The item text fits into the space. Start a paragraph, so that the + % following text (if any) will end up on the same line. + \noindent + % Do this with kerns and \unhbox so that if there is a footnote in + % the item text, it can migrate to the main vertical list and + % eventually be printed. + \nobreak\kern-\tableindent + \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 + \unhbox0 + \nobreak\kern\dimen0 + \endgroup + \itemxneedsnegativevskiptrue + \fi +} + +\def\item{\errmessage{@item while not in a list environment}} +\def\itemx{\errmessage{@itemx while not in a list environment}} + +% @table, @ftable, @vtable. +\envdef\table{% + \let\itemindex\gobble + \tablecheck{table}% +} +\envdef\ftable{% + \def\itemindex ##1{\doind {fn}{\code{##1}}}% + \tablecheck{ftable}% +} +\envdef\vtable{% + \def\itemindex ##1{\doind {vr}{\code{##1}}}% + \tablecheck{vtable}% +} +\def\tablecheck#1{% + \ifnum \the\catcode`\^^M=\active + \endgroup + \errmessage{This command won't work in this context; perhaps the problem is + that we are \inenvironment\thisenv}% + \def\next{\doignore{#1}}% + \else + \let\next\tablex + \fi + \next +} +\def\tablex#1{% + \def\itemindicate{#1}% + \parsearg\tabley +} +\def\tabley#1{% + {% + \makevalueexpandable + \edef\temp{\noexpand\tablez #1\space\space\space}% + \expandafter + }\temp \endtablez +} +\def\tablez #1 #2 #3 #4\endtablez{% + \aboveenvbreak + \ifnum 0#1>0 \advance \leftskip by #1\mil \fi + \ifnum 0#2>0 \tableindent=#2\mil \fi + \ifnum 0#3>0 \advance \rightskip by #3\mil \fi + \itemmax=\tableindent + \advance \itemmax by -\itemmargin + \advance \leftskip by \tableindent + \exdentamount=\tableindent + \parindent = 0pt + \parskip = \smallskipamount + \ifdim \parskip=0pt \parskip=2pt \fi + \let\item = \internalBitem + \let\itemx = \internalBitemx +} +\def\Etable{\endgraf\afterenvbreak} +\let\Eftable\Etable +\let\Evtable\Etable +\let\Eitemize\Etable +\let\Eenumerate\Etable + +% This is the counter used by @enumerate, which is really @itemize + +\newcount \itemno + +\envdef\itemize{\parsearg\doitemize} + +\def\doitemize#1{% + \aboveenvbreak + \itemmax=\itemindent + \advance\itemmax by -\itemmargin + \advance\leftskip by \itemindent + \exdentamount=\itemindent + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi + % + % Try typesetting the item mark so that if the document erroneously says + % something like @itemize @samp (intending @table), there's an error + % right away at the @itemize. It's not the best error message in the + % world, but it's better than leaving it to the @item. This means if + % the user wants an empty mark, they have to say @w{} not just @w. + \def\itemcontents{#1}% + \setbox0 = \hbox{\itemcontents}% + % + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + % + \let\item=\itemizeitem +} + +% Definition of @item while inside @itemize and @enumerate. +% +\def\itemizeitem{% + \advance\itemno by 1 % for enumerations + {\let\par=\endgraf \smallbreak}% reasonable place to break + {% + % If the document has an @itemize directly after a section title, a + % \nobreak will be last on the list, and \sectionheading will have + % done a \vskip-\parskip. In that case, we don't want to zero + % parskip, or the item text will crash with the heading. On the + % other hand, when there is normal text preceding the item (as there + % usually is), we do want to zero parskip, or there would be too much + % space. In that case, we won't have a \nobreak before. At least + % that's the theory. + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + % + \ifinner\else + \vadjust{\penalty 1200}% not good to break after first line of item. + \fi + % We can be in inner vertical mode in a footnote, although an + % @itemize looks awful there. + }% + \flushcr +} + +% \splitoff TOKENS\endmark defines \first to be the first token in +% TOKENS, and \rest to be the remainder. +% +\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% + +% Allow an optional argument of an uppercase letter, lowercase letter, +% or number, to specify the first label in the enumerated list. No +% argument is the same as `1'. +% +\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} +\def\enumeratey #1 #2\endenumeratey{% + % If we were given no argument, pretend we were given `1'. + \def\thearg{#1}% + \ifx\thearg\empty \def\thearg{1}\fi + % + % Detect if the argument is a single token. If so, it might be a + % letter. Otherwise, the only valid thing it can be is a number. + % (We will always have one token, because of the test we just made. + % This is a good thing, since \splitoff doesn't work given nothing at + % all -- the first parameter is undelimited.) + \expandafter\splitoff\thearg\endmark + \ifx\rest\empty + % Only one token in the argument. It could still be anything. + % A ``lowercase letter'' is one whose \lccode is nonzero. + % An ``uppercase letter'' is one whose \lccode is both nonzero, and + % not equal to itself. + % Otherwise, we assume it's a number. + % + % We need the \relax at the end of the \ifnum lines to stop TeX from + % continuing to look for a . + % + \ifnum\lccode\expandafter`\thearg=0\relax + \numericenumerate % a number (we hope) + \else + % It's a letter. + \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax + \lowercaseenumerate % lowercase letter + \else + \uppercaseenumerate % uppercase letter + \fi + \fi + \else + % Multiple tokens in the argument. We hope it's a number. + \numericenumerate + \fi +} + +% An @enumerate whose labels are integers. The starting integer is +% given in \thearg. +% +\def\numericenumerate{% + \itemno = \thearg + \startenumeration{\the\itemno}% +} + +% The starting (lowercase) letter is in \thearg. +\def\lowercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more lowercase letters in @enumerate; get a bigger + alphabet}% + \fi + \char\lccode\itemno + }% +} + +% The starting (uppercase) letter is in \thearg. +\def\uppercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more uppercase letters in @enumerate; get a bigger + alphabet} + \fi + \char\uccode\itemno + }% +} + +% Call \doitemize, adding a period to the first argument and supplying the +% common last two arguments. Also subtract one from the initial value in +% \itemno, since @item increments \itemno. +% +\def\startenumeration#1{% + \advance\itemno by -1 + \doitemize{#1.}\flushcr +} + +% @alphaenumerate and @capsenumerate are abbreviations for giving an arg +% to @enumerate. +% +\def\alphaenumerate{\enumerate{a}} +\def\capsenumerate{\enumerate{A}} +\def\Ealphaenumerate{\Eenumerate} +\def\Ecapsenumerate{\Eenumerate} + + +% @multitable macros +% Amy Hendrickson, 8/18/94, 3/6/96 +% +% @multitable ... @end multitable will make as many columns as desired. +% Contents of each column will wrap at width given in preamble. Width +% can be specified either with sample text given in a template line, +% or in percent of \hsize, the current width of text on page. + +% Table can continue over pages but will only break between lines. + +% To make preamble: +% +% Either define widths of columns in terms of percent of \hsize: +% @multitable @columnfractions .25 .3 .45 +% @item ... +% +% Numbers following @columnfractions are the percent of the total +% current hsize to be used for each column. You may use as many +% columns as desired. + + +% Or use a template: +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item ... +% using the widest term desired in each column. + +% Each new table line starts with @item, each subsequent new column +% starts with @tab. Empty columns may be produced by supplying @tab's +% with nothing between them for as many times as empty columns are needed, +% ie, @tab@tab@tab will produce two empty columns. + +% @item, @tab do not need to be on their own lines, but it will not hurt +% if they are. + +% Sample multitable: + +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item first col stuff @tab second col stuff @tab third col +% @item +% first col stuff +% @tab +% second col stuff +% @tab +% third col +% @item first col stuff @tab second col stuff +% @tab Many paragraphs of text may be used in any column. +% +% They will wrap at the width determined by the template. +% @item@tab@tab This will be in third column. +% @end multitable + +% Default dimensions may be reset by user. +% @multitableparskip is vertical space between paragraphs in table. +% @multitableparindent is paragraph indent in table. +% @multitablecolmargin is horizontal space to be left between columns. +% @multitablelinespace is space to leave between table items, baseline +% to baseline. +% 0pt means it depends on current normal line spacing. +% +\newskip\multitableparskip +\newskip\multitableparindent +\newdimen\multitablecolspace +\newskip\multitablelinespace +\multitableparskip=0pt +\multitableparindent=6pt +\multitablecolspace=12pt +\multitablelinespace=0pt + +% Macros used to set up halign preamble: +% +\let\endsetuptable\relax +\def\xendsetuptable{\endsetuptable} +\let\columnfractions\relax +\def\xcolumnfractions{\columnfractions} +\newif\ifsetpercent + +% #1 is the @columnfraction, usually a decimal number like .5, but might +% be just 1. We just use it, whatever it is. +% +\def\pickupwholefraction#1 {% + \global\advance\colcount by 1 + \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% + \setuptable +} + +\newcount\colcount +\def\setuptable#1{% + \def\firstarg{#1}% + \ifx\firstarg\xendsetuptable + \let\go = \relax + \else + \ifx\firstarg\xcolumnfractions + \global\setpercenttrue + \else + \ifsetpercent + \let\go\pickupwholefraction + \else + \global\advance\colcount by 1 + \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a + % separator; typically that is always in the input, anyway. + \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \fi + \fi + \ifx\go\pickupwholefraction + % Put the argument back for the \pickupwholefraction call, so + % we'll always have a period there to be parsed. + \def\go{\pickupwholefraction#1}% + \else + \let\go = \setuptable + \fi% + \fi + \go +} + +% multitable-only commands. +% +% @headitem starts a heading row, which we typeset in bold. Assignments +% have to be global since we are inside the implicit group of an +% alignment entry. \everycr below resets \everytab so we don't have to +% undo it ourselves. +\def\headitemfont{\b}% for people to use in the template row; not changeable +\def\headitem{% + \checkenv\multitable + \crcr + \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings + \global\everytab={\bf}% can't use \headitemfont since the parsing differs + \the\everytab % for the first item +}% +% +% default for tables with no headings. +\let\headitemcrhook=\relax +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until +% we again encounter the problem the 1sp was intended to solve. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% + +% @multitable ... @end multitable definitions: +% +\newtoks\everytab % insert after every tab. +% +\envdef\multitable{% + \vskip\parskip + \startsavinginserts + % + % @item within a multitable starts a normal row. + % We use \def instead of \let so that if one of the multitable entries + % contains an @itemize, we don't choke on the \item (seen as \crcr aka + % \endtemplate) expanding \doitemize. + \def\item{\crcr}% + % + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing + \parskip=\multitableparskip + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 + % + \everycr = {% + \noalign{% + \global\everytab={}% Reset from possible headitem. + \global\colcount=0 % Reset the column counter. + % + % Check for saved footnotes, etc.: + \checkinserts + % + % Perhaps a \nobreak, then reset: + \headitemcrhook + \global\let\headitemcrhook=\relax + }% + }% + % + \parsearg\domultitable +} +\def\domultitable#1{% + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. + \halign\bgroup &% + \global\advance\colcount by 1 + \multistrut + \vtop{% + % Use the current \colcount to find the correct column width: + \hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip + \else + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace + \fi + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively + % marking characters. + \noindent\ignorespaces##\unskip\multistrut + }\cr +} +\def\Emultitable{% + \crcr + \egroup % end the \halign + \global\setpercentfalse +} + +\def\setmultitablespacing{% + \def\multistrut{\strut}% just use the standard line spacing + % + % Compute \multitablelinespace (if not defined by user) for use in + % \multitableparskip calculation. We used define \multistrut based on + % this, but (ironically) that caused the spacing to be off. + % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. +\ifdim\multitablelinespace=0pt +\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip +\global\advance\multitablelinespace by-\ht0 +\fi +% Test to see if parskip is larger than space between lines of +% table. If not, do nothing. +% If so, set to same dimension as multitablelinespace. +\ifdim\multitableparskip>\multitablelinespace +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. +\fi% +\ifdim\multitableparskip=0pt +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. +\fi} + + +\message{conditionals,} + +% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, +% @ifnotxml always succeed. They currently do nothing; we don't +% attempt to check whether the conditionals are properly nested. But we +% have to remember that they are conditionals, so that @end doesn't +% attempt to close an environment group. +% +\def\makecond#1{% + \expandafter\let\csname #1\endcsname = \relax + \expandafter\let\csname iscond.#1\endcsname = 1 +} +\makecond{iftex} +\makecond{ifnotdocbook} +\makecond{ifnothtml} +\makecond{ifnotinfo} +\makecond{ifnotplaintext} +\makecond{ifnotxml} + +% Ignore @ignore, @ifhtml, @ifinfo, and the like. +% +\def\direntry{\doignore{direntry}} +\def\documentdescription{\doignore{documentdescription}} +\def\docbook{\doignore{docbook}} +\def\html{\doignore{html}} +\def\ifdocbook{\doignore{ifdocbook}} +\def\ifhtml{\doignore{ifhtml}} +\def\ifinfo{\doignore{ifinfo}} +\def\ifnottex{\doignore{ifnottex}} +\def\ifplaintext{\doignore{ifplaintext}} +\def\ifxml{\doignore{ifxml}} +\def\ignore{\doignore{ignore}} +\def\menu{\doignore{menu}} +\def\xml{\doignore{xml}} + +% Ignore text until a line `@end #1', keeping track of nested conditionals. +% +% A count to remember the depth of nesting. +\newcount\doignorecount + +\def\doignore#1{\begingroup + % Scan in ``verbatim'' mode: + \obeylines + \catcode`\@ = \other + \catcode`\{ = \other + \catcode`\} = \other + % + % Make sure that spaces turn into tokens that match what \doignoretext wants. + \spaceisspace + % + % Count number of #1's that we've seen. + \doignorecount = 0 + % + % Swallow text until we reach the matching `@end #1'. + \dodoignore{#1}% +} + +{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. + \obeylines % + % + \gdef\dodoignore#1{% + % #1 contains the command name as a string, e.g., `ifinfo'. + % + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% + % + % And this command to find another #1 command, at the beginning of a + % line. (Otherwise, we would consider a line `@c @ifset', for + % example, to count as an @ifset for nesting.) + \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% + % + % And now expand that command. + \doignoretext ^^M% + }% +} + +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. + \let\next\doignoretextzzz + \else % Found a nested condition, ... + \advance\doignorecount by 1 + \let\next\doignoretextyyy % ..., look for another. + % If we're here, #1 ends with ^^M\ifinfo (for example). + \fi + \next #1% the token \_STOP_ is present just after this macro. +} + +% We have to swallow the remaining "\_STOP_". +% +\def\doignoretextzzz#1{% + \ifnum\doignorecount = 0 % We have just found the outermost @end. + \let\next\enddoignore + \else % Still inside a nested condition. + \advance\doignorecount by -1 + \let\next\doignoretext % Look for the next @end. + \fi + \next +} + +% Finish off ignored text. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% +} + + +% @set VAR sets the variable VAR to an empty value. +% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. +% +% Since we want to separate VAR from REST-OF-LINE (which might be +% empty), we can't just use \parsearg; we have to insert a space of our +% own to delimit the rest of the line, and then take it out again if we +% didn't need it. +% We rely on the fact that \parsearg sets \catcode`\ =10. +% +\parseargdef\set{\setyyy#1 \endsetyyy} +\def\setyyy#1 #2\endsetyyy{% + {% + \makevalueexpandable + \def\temp{#2}% + \edef\next{\gdef\makecsname{SET#1}}% + \ifx\temp\empty + \next{}% + \else + \setzzz#2\endsetzzz + \fi + }% +} +% Remove the trailing space \setxxx inserted. +\def\setzzz#1 \endsetzzz{\next{#1}} + +% @clear VAR clears (i.e., unsets) the variable VAR. +% +\parseargdef\clear{% + {% + \makevalueexpandable + \global\expandafter\let\csname SET#1\endcsname=\relax + }% +} + +% @value{foo} gets the text saved in variable foo. +\def\value{\begingroup\makevalueexpandable\valuexxx} +\def\valuexxx#1{\expandablevalue{#1}\endgroup} +{ + \catcode`\-=\active \catcode`\_=\active + % + \gdef\makevalueexpandable{% + \let\value = \expandablevalue + % We don't want these characters active, ... + \catcode`\-=\other \catcode`\_=\other + % ..., but we might end up with active ones in the argument if + % we're called from @code, as @code{@value{foo-bar_}}, though. + % So \let them to their normal equivalents. + \let-\normaldash \let_\normalunderscore + } +} + +% We have this subroutine so that we can handle at least some @value's +% properly in indexes (we call \makevalueexpandable in \indexdummies). +% The command has to be fully expandable (if the variable is set), since +% the result winds up in the index file. This means that if the +% variable's value contains other Texinfo commands, it's almost certain +% it will fail (although perhaps we could fix that with sufficient work +% to do a one-level expansion on the result, instead of complete). +% +% Unfortunately, this has the consequence that when _ is in the *value* +% of an @set, it does not print properly in the roman fonts (get the cmr +% dot accent at position 126 instead). No fix comes to mind, and it's +% been this way since 2003 or earlier, so just ignore it. +% +\def\expandablevalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {[No value for ``#1'']}% + \message{Variable `#1', used in @value, is not set.}% + \else + \csname SET#1\endcsname + \fi +} + +% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined +% with @set. +% +% To get the special treatment we need for `@end ifset,' we call +% \makecond and then redefine. +% +\makecond{ifset} +\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} +\def\doifset#1#2{% + {% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname SET#2\endcsname\relax + #1% If not set, redefine \next. + \fi + \expandafter + }\next +} +\def\ifsetfail{\doignore{ifset}} + +% @ifclear VAR ... @end executes the `...' iff VAR has never been +% defined with @set, or has been undefined with @clear. +% +% The `\else' inside the `\doifset' parameter is a trick to reuse the +% above code: if the variable is not set, do nothing, if it is set, +% then redefine \next to \ifclearfail. +% +\makecond{ifclear} +\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} +\def\ifclearfail{\doignore{ifclear}} + +% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written +% without the @) is in fact defined. We can only feasibly check at the +% TeX level, so something like `mathcode' is going to considered +% defined even though it is not a Texinfo command. +% +\makecond{ifcommanddefined} +\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} +% +\def\doifcmddefined#1#2{{% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname #2\endcsname\relax + #1% If not defined, \let\next as above. + \fi + \expandafter + }\next +} +\def\ifcmddefinedfail{\doignore{ifcommanddefined}} + +% @ifcommandnotdefined CMD ... handled similar to @ifclear above. +\makecond{ifcommandnotdefined} +\def\ifcommandnotdefined{% + \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} +\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} + +% Set the `txicommandconditionals' variable, so documents have a way to +% test if the @ifcommand...defined conditionals are available. +\set txicommandconditionals + +% @dircategory CATEGORY -- specify a category of the dir file +% which this file should belong to. Ignore this in TeX. +\let\dircategory=\comment + +% @defininfoenclose. +\let\definfoenclose=\comment + + +\message{indexing,} +% Index generation facilities + +% Define \newwrite to be identical to plain tex's \newwrite +% except not \outer, so it can be used within macros and \if's. +\edef\newwrite{\makecsname{ptexnewwrite}} + +% \newindex {foo} defines an index named IX. +% It automatically defines \IXindex such that +% \IXindex ...rest of line... puts an entry in the index IX. +% It also defines \IXindfile to be the number of the output channel for +% the file that accumulates this index. The file's extension is IX. +% The name of an index should be no more than 2 characters long +% for the sake of vms. +% +\def\newindex#1{% + \expandafter\chardef\csname#1indfile\endcsname=0 + \expandafter\xdef\csname#1index\endcsname{% % Define @#1index + \noexpand\doindex{#1}} +} + +% @defindex foo == \newindex{foo} +% +\def\defindex{\parsearg\newindex} + +% Define @defcodeindex, like @defindex except put all entries in @code. +% +\def\defcodeindex{\parsearg\newcodeindex} +% +\def\newcodeindex#1{% + \expandafter\chardef\csname#1indfile\endcsname=0 + \expandafter\xdef\csname#1index\endcsname{% + \noexpand\docodeindex{#1}}% +} + +% The default indices: +\newindex{cp}% concepts, +\newcodeindex{fn}% functions, +\newcodeindex{vr}% variables, +\newcodeindex{tp}% types, +\newcodeindex{ky}% keys +\newcodeindex{pg}% and programs. + + +% @synindex foo bar makes index foo feed into index bar. +% Do this instead of @defindex foo if you don't want it as a separate index. +% +% @syncodeindex foo bar similar, but put all entries made for index foo +% inside @code. +% +\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} +\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} + +% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), +% #3 the target index (bar). +\def\dosynindex#1#2#3{% + % Only do \closeout if we haven't already done it, else we'll end up + % closing the target index. + \expandafter \ifx\csname donesynindex#2\endcsname \relax + % The \closeout helps reduce unnecessary open files; the limit on the + % Acorn RISC OS is a mere 16 files. + \expandafter\closeout\csname#2indfile\endcsname + \expandafter\let\csname donesynindex#2\endcsname = 1 + \fi + % redefine \fooindfile: + \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname + \expandafter\let\csname#2indfile\endcsname=\temp + % redefine \fooindex: + \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% +} + +% Define \doindex, the driver for all index macros. +% Argument #1 is generated by the calling \fooindex macro, +% and it the two-letter name of the index. + +\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx} +\def\doindexxxx #1{\doind{\indexname}{#1}} + +% like the previous two, but they put @code around the argument. +\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} +\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} + +% Used when writing an index entry out to an index file, to prevent +% expansion of Texinfo commands that can appear in an index entry. +% +\def\indexdummies{% + \escapechar = `\\ % use backslash in output files. + \def\@{@}% change to @@ when we switch to @ as escape char in index files. + \def\ {\realbackslash\space }% + % + % Need these unexpandable (because we define \tt as a dummy) + % definitions when @{ or @} appear in index entry text. Also, more + % complicated, when \tex is in effect and \{ is a \delimiter again. + % We can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. Perhaps we + % should use @lbracechar and @rbracechar? + \def\{{{\tt\char123}}% + \def\}{{\tt\char125}}% + % + % Do the redefinitions. + \commondummies +} + +% For the aux and toc files, @ is the escape character. So we want to +% redefine everything using @ as the escape character (instead of +% \realbackslash, still used for index files). When everything uses @, +% this will be simpler. +% +\def\atdummies{% + \def\@{@@}% + \def\ {@ }% + \let\{ = \lbraceatcmd + \let\} = \rbraceatcmd + % + % Do the redefinitions. + \commondummies + \otherbackslash +} + +% Called from \indexdummies and \atdummies. +% +\def\commondummies{% + % \definedummyword defines \#1 as \string\#1\space, thus effectively + % preventing its expansion. This is used only for control words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word + % from whatever follows. + % + % For control letters, we have \definedummyletter, which omits the + % space. + % + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). + % + \def\definedummyword ##1{\def##1{\string##1\space}}% + \def\definedummyletter##1{\def##1{\string##1}}% + \let\definedummyaccent\definedummyletter + % + \commondummiesnofonts + % + \definedummyletter\_% + \definedummyletter\-% + % + % Non-English letters. + \definedummyword\AA + \definedummyword\AE + \definedummyword\DH + \definedummyword\L + \definedummyword\O + \definedummyword\OE + \definedummyword\TH + \definedummyword\aa + \definedummyword\ae + \definedummyword\dh + \definedummyword\exclamdown + \definedummyword\l + \definedummyword\o + \definedummyword\oe + \definedummyword\ordf + \definedummyword\ordm + \definedummyword\questiondown + \definedummyword\ss + \definedummyword\th + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt + % + \definedummyword\LaTeX + \definedummyword\TeX + % + % Assorted special characters. + \definedummyword\arrow + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\entrybreak + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright + \definedummyword\lbracechar + \definedummyword\leq + \definedummyword\mathopsup + \definedummyword\minus + \definedummyword\ogonek + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase + \definedummyword\rbracechar + \definedummyword\result + \definedummyword\sub + \definedummyword\sup + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist + % + \normalturnoffactive + % + % Handle some cases of @value -- where it does not contain any + % (non-fully-expandable) commands. + \makevalueexpandable +} + +% \commondummiesnofonts: common to \commondummies and \indexnofonts. +% Define \definedumyletter, \definedummyaccent and \definedummyword before +% using. +% +\def\commondummiesnofonts{% + % Control letters and accents. + \definedummyletter\!% + \definedummyaccent\"% + \definedummyaccent\'% + \definedummyletter\*% + \definedummyaccent\,% + \definedummyletter\.% + \definedummyletter\/% + \definedummyletter\:% + \definedummyaccent\=% + \definedummyletter\?% + \definedummyaccent\^% + \definedummyaccent\`% + \definedummyaccent\~% + \definedummyword\u + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent + \definedummyword\ogonek + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent + \definedummyword\udotaccent + \definedummyword\dotless + % + % Texinfo font commands. + \definedummyword\b + \definedummyword\i + \definedummyword\r + \definedummyword\sansserif + \definedummyword\sc + \definedummyword\slanted + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\abbr + \definedummyword\acronym + \definedummyword\anchor + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn + \definedummyword\dmn + \definedummyword\email + \definedummyword\emph + \definedummyword\env + \definedummyword\file + \definedummyword\image + \definedummyword\indicateurl + \definedummyword\inforef + \definedummyword\kbd + \definedummyword\key + \definedummyword\math + \definedummyword\option + \definedummyword\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\U + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref +} + +% For testing: output @{ and @} in index sort strings as \{ and \}. +\newif\ifusebracesinindexes + +\let\indexlbrace\relax +\let\indexrbrace\relax + +{\catcode`\@=0 +\catcode`\\=13 + @gdef@backslashdisappear{@def\{}} +} + +{ +\catcode`\<=13 +\catcode`\-=13 +\catcode`\`=13 + \gdef\indexnonalnumdisappear{% + \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else + % @set txiindexlquoteignore makes us ignore left quotes in the sort term. + % (Introduced for FSFS 2nd ed.) + \let`=\empty + \fi + % + \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else + \backslashdisappear + \fi + % + \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else + \def-{}% + \fi + \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else + \def<{}% + \fi + \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else + \def\@{}% + \fi + } + + \gdef\indexnonalnumreappear{% + \useindexbackslash + \let-\normaldash + \let<\normalless + \def\@{@}% + } +} + + +% \indexnofonts is used when outputting the strings to sort the index +% by, and when constructing control sequence names. It eliminates all +% control sequences and just writes whatever the best ASCII sort string +% would be for a given command (usually its argument). +% +\def\indexnofonts{% + % Accent commands should become @asis. + \def\definedummyaccent##1{\let##1\asis}% + % We can just ignore other control letters. + \def\definedummyletter##1{\let##1\empty}% + % All control words become @asis by default; overrides below. + \let\definedummyword\definedummyaccent + \commondummiesnofonts + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % + \def\ { }% + \def\@{@}% + \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + \def\lbracechar{{\indexlbrace}}% + \def\rbracechar{{\indexrbrace}}% + \let\{=\lbracechar + \let\}=\rbracechar + % + % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\DH{DZZ}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\TH{TH}% + \def\aa{aa}% + \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% + \def\l{l}% + \def\oe{oe}% + \def\ordf{a}% + \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{th}% + % + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% + % + % Assorted special characters. + % (The following {} will end up in the sort string, but that's ok.) + \def\arrow{->}% + \def\bullet{bullet}% + \def\comma{,}% + \def\copyright{copyright}% + \def\dots{...}% + \def\enddots{...}% + \def\equiv{==}% + \def\error{error}% + \def\euro{euro}% + \def\expansion{==>}% + \def\geq{>=}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% + \def\leq{<=}% + \def\minus{-}% + \def\point{.}% + \def\pounds{pounds}% + \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% + \def\quotedblright{"}% + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% + \def\registeredsymbol{R}% + \def\result{=>}% + \def\textdegree{o}% + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. + % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + % + \macrolist +} + + +\let\SETmarginindex=\relax % put index entries in margin (undocumented)? + +% Most index entries go through here, but \dosubind is the general case. +% #1 is the index name, #2 is the entry text. +\def\doind#1#2{\dosubind{#1}{#2}{}} + +% There is also \dosubind {index}{topic}{subtopic} +% which makes an entry in a two-level index such as the operation index. +% TODO: Two-level index? Operation index? + +% Workhorse for all indexes. +% #1 is name of index, #2 is stuff to put there, #3 is subentry -- +% empty if called from \doind, as we usually are (the main exception +% is with most defuns, which call us directly). +% +\def\dosubind#1#2#3{% + \iflinks + {% + \requireopenindexfile{#1}% + % Store the main index entry text (including the third arg). + \toks0 = {#2}% + % If third arg is present, precede it with a space. + \def\thirdarg{#3}% + \ifx\thirdarg\empty \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % + \edef\writeto{\csname#1indfile\endcsname}% + % + \safewhatsit\dosubindwrite + }% + \fi +} + +% Check if an index file has been opened, and if not, open it. +\def\requireopenindexfile#1{% +\ifnum\csname #1indfile\endcsname=0 + \expandafter\newwrite \csname#1indfile\endcsname + \edef\suffix{#1}% + % A .fls suffix would conflict with the file extension for the output + % of -recorder, so use .f1s instead. + \ifx\suffix\indexisfl\def\suffix{f1}\fi + % Open the file + \immediate\openout\csname#1indfile\endcsname \jobname.\suffix + % Using \immediate here prevents an object entering into the current box, + % which could confound checks such as those in \safewhatsit for preceding + % skips. +\fi} +\def\indexisfl{fl} + +% Output \ as {\indexbackslash}, because \ is an escape character in +% the index files. +\let\indexbackslash=\relax +{\catcode`\@=0 \catcode`\\=\active + @gdef@useindexbackslash{@def\{{@indexbackslash}}} +} + +% Definition for writing index entry text. +\def\sortas#1{\ignorespaces}% + +% Definition for writing index entry sort key. Should occur at the at +% the beginning of the index entry, like +% @cindex @sortas{september} \september +% The \ignorespaces takes care of following space, but there's no way +% to remove space before it. +{ +\catcode`\-=13 +\gdef\indexwritesortas{% + \begingroup + \indexnonalnumreappear + \indexwritesortasxxx} +\gdef\indexwritesortasxxx#1{% + \xdef\indexsortkey{#1}\endgroup} +} + + +% Write the entry in \toks0 to the index file. +% +\def\dosubindwrite{% + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% + \fi + % + % Remember, we are within a group. + \indexdummies % Must do this here, since \bf, etc expand at this stage + \useindexbackslash % \indexbackslash isn't defined now so it will be output + % as is; and it will print as backslash. + % Get the string to sort by, by processing the index entry with all + % font commands turned off. + {\indexnofonts + \indexnonalnumdisappear + \xdef\indexsortkey{}% + \let\sortas=\indexwritesortas + \edef\temp{\the\toks0}% + \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas + \ifx\indexsortkey\empty + \xdef\indexsortkey{\temp}% + \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi + \fi + }% + % + % Set up the complete index entry, with both the sort key and + % the original text, including any font commands. We write + % three arguments to \entry to the .?? file (four in the + % subentry case), texindex reduces to two when writing the .??s + % sorted result. + \edef\temp{% + \write\writeto{% + \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}% + }% + \temp +} +\newbox\dummybox % used above + +% Take care of unwanted page breaks/skips around a whatsit: +% +% If a skip is the last thing on the list now, preserve it +% by backing up by \lastskip, doing the \write, then inserting +% the skip again. Otherwise, the whatsit generated by the +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: +% @end defun +% @tindex whatever +% @defun ... +% will have extra space inserted, because the \medbreak in the +% start of the @defun won't see the skip inserted by the @end of +% the previous defun. +% +% But don't do any of this if we're not in vertical mode. We +% don't want to do a \vskip and prematurely end a paragraph. +% +% Avoid page breaks due to these extra skips, too. +% +% But wait, there is a catch there: +% We'll have to check whether \lastskip is zero skip. \ifdim is not +% sufficient for this purpose, as it ignores stretch and shrink parts +% of the skip. The only way seems to be to check the textual +% representation of the skip. +% +% The following is almost like \def\zeroskipmacro{0.0pt} except that +% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). +% +\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} +% +\newskip\whatsitskip +\newcount\whatsitpenalty +% +% ..., ready, GO: +% +\def\safewhatsit#1{\ifhmode + #1% + \else + % \lastskip and \lastpenalty cannot both be nonzero simultaneously. + \whatsitskip = \lastskip + \edef\lastskipmacro{\the\lastskip}% + \whatsitpenalty = \lastpenalty + % + % If \lastskip is nonzero, that means the last item was a + % skip. And since a skip is discardable, that means this + % -\whatsitskip glue we're inserting is preceded by a + % non-discardable item, therefore it is not a potential + % breakpoint, therefore no \nobreak needed. + \ifx\lastskipmacro\zeroskipmacro + \else + \vskip-\whatsitskip + \fi + % + #1% + % + \ifx\lastskipmacro\zeroskipmacro + % If \lastskip was zero, perhaps the last item was a penalty, and + % perhaps it was >=10000, e.g., a \nobreak. In that case, we want + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: + % @deffn deffn-whatever + % @vindex index-whatever + % Description. + % would allow a break between the index-whatever whatsit + % and the "Description." paragraph. + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi + \else + % On the other hand, if we had a nonzero \lastskip, + % this make-up glue would be preceded by a non-discardable item + % (the whatsit from the \write), so we must insert a \nobreak. + \nobreak\vskip\whatsitskip + \fi +\fi} + +% The index entry written in the file actually looks like +% \entry {sortstring}{page}{topic} +% or +% \entry {sortstring}{page}{topic}{subtopic} +% The texindex program reads in these files and writes files +% containing these kinds of lines: +% \initial {c} +% before the first topic whose initial is c +% \entry {topic}{pagelist} +% for a topic that is used without subtopics +% \primary {topic} +% for the beginning of a topic that is used with subtopics +% \secondary {subtopic}{pagelist} +% for each subtopic. + +% Define the user-accessible indexing commands +% @findex, @vindex, @kindex, @cindex. + +\def\findex {\fnindex} +\def\kindex {\kyindex} +\def\cindex {\cpindex} +\def\vindex {\vrindex} +\def\tindex {\tpindex} +\def\pindex {\pgindex} + +\def\cindexsub {\begingroup\obeylines\cindexsub} +{\obeylines % +\gdef\cindexsub "#1" #2^^M{\endgroup % +\dosubind{cp}{#2}{#1}}} + +% Define the macros used in formatting output of the sorted index material. + +% @printindex causes a particular index (the ??s file) to get printed. +% It does not print any chapter heading (usually an @unnumbered). +% +\parseargdef\printindex{\begingroup + \dobreak \chapheadingskip{10000}% + % + \smallfonts \rm + \tolerance = 9500 + \plainfrenchspacing + \everypar = {}% don't want the \kern\-parindent from indentation suppression. + % + % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 11 + % See comment in \requireopenindexfile. + \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi + \openin 1 \jobname.\indexname s + \ifeof 1 + % \enddoublecolumns gets confused if there is no text in the index, + % and it loses the chapter title and the aux file entries for the + % index. The easiest way to prevent this problem is to make sure + % there is some text. + \putwordIndexNonexistent + \else + \catcode`\\ = 0 + \escapechar = `\\ + % + % If the index file exists but is empty, then \openin leaves \ifeof + % false. We have to make TeX try to read something from the file, so + % it can discover if there is anything in it. + \read 1 to \thisline + \ifeof 1 + \putwordIndexIsEmpty + \else + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\ttbackslash}% + \let\indexlbrace\{ % Likewise, set these sequences for braces + \let\indexrbrace\} % used in the sort key. + \begindoublecolumns + \let\entryorphanpenalty=\indexorphanpenalty + % + % Read input from the index file line by line. + \loopdo + \ifeof1 + \let\firsttoken\relax + \else + \read 1 to \nextline + \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% + \act + \fi + \thisline + % + \ifeof1\else + \let\thisline\nextline + \repeat + %% + \enddoublecolumns + \fi + \fi + \closein 1 +\endgroup} + +\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} +\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} + +\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} +\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} + +% These macros are used by the sorted index file itself. +% Change them to control the appearance of the index. + +{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13 +\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13 +\catcode`\$=3 +\gdef\initialglyphs{% + % Some changes for non-alphabetic characters. Using the glyphs from the + % math fonts looks more consistent than the typewriter font used elsewhere + % for these characters. + \def\indexbackslash{\math{\backslash}}% + \let\\=\indexbackslash + % + % Can't get bold backslash so don't use bold forward slash + \catcode`\/=13 + \def/{{\secrmnotbold \normalslash}}% + \def-{{\normaldash\normaldash}}% en dash `--' + \def^{{\chapbf \normalcaret}}% + \def~{{\chapbf \normaltilde}}% + \def\_{% + \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }% + \def|{$\vert$}% + \def<{$\less$}% + \def>{$\gtr$}% + \def+{$\normalplus$}% +}} + +\def\initial{% + \bgroup + \initialglyphs + \initialx +} + +\def\initialx#1{% + % Remove any glue we may have, we'll be inserting our own. + \removelastskip + % + % We like breaks before the index initials, so insert a bonus. + % The glue before the bonus allows a little bit of space at the + % bottom of a column to reduce an increase in inter-line spacing. + \nobreak + \vskip 0pt plus 5\baselineskip + \penalty -300 + \vskip 0pt plus -5\baselineskip + % + % Typeset the initial. Making this add up to a whole number of + % baselineskips increases the chance of the dots lining up from column + % to column. It still won't often be perfect, because of the stretch + % we need before each entry, but it's better. + % + % No shrink because it confuses \balancecolumns. + \vskip 1.67\baselineskip plus 1\baselineskip + \leftline{\secfonts \kern-0.05em \secbf #1}% + % \secfonts is inside the argument of \leftline so that the change of + % \baselineskip will not affect any glue inserted before the vbox that + % \leftline creates. + % Do our best not to break after the initial. + \nobreak + \vskip .33\baselineskip plus .1\baselineskip + \egroup % \initialglyphs +} + +\newdimen\entryrightmargin +\entryrightmargin=0pt + +% \entry typesets a paragraph consisting of the text (#1), dot leaders, and +% then page number (#2) flushed to the right margin. It is used for index +% and table of contents entries. The paragraph is indented by \leftskip. +% +\def\entry{% + \begingroup + % + % Start a new paragraph if necessary, so our assignments below can't + % affect previous text. + \par + % + % No extra space above this paragraph. + \parskip = 0in + % + % When reading the text of entry, convert explicit line breaks + % from @* into spaces. The user might give these in long section + % titles, for instance. + \def\*{\unskip\space\ignorespaces}% + \def\entrybreak{\hfil\break}% An undocumented command + % + % A bit of stretch before each entry for the benefit of balancing + % columns. + \vskip 0pt plus0.5pt + % + % Swallow the left brace of the text (first parameter): + \afterassignment\doentry + \let\temp = +} +\def\entrybreak{\unskip\space\ignorespaces}% +\def\doentry{% + % Save the text of the entry + \global\setbox\boxA=\hbox\bgroup + \bgroup % Instead of the swallowed brace. + \noindent + \aftergroup\finishentry + % And now comes the text of the entry. + % Not absorbing as a macro argument reduces the chance of problems + % with catcodes occurring. +} +{\catcode`\@=11 +\gdef\finishentry#1{% + \egroup % end box A + \dimen@ = \wd\boxA % Length of text of entry + \global\setbox\boxA=\hbox\bgroup\unhbox\boxA + % #1 is the page number. + % + % Get the width of the page numbers, and only use + % leaders if they are present. + \global\setbox\boxB = \hbox{#1}% + \ifdim\wd\boxB = 0pt + \null\nobreak\hfill\ % + \else + % + \null\nobreak\indexdotfill % Have leaders before the page number. + % + \ifpdf + \pdfgettoks#1.% + \hskip\skip\thinshrinkable\the\toksA + \else + \hskip\skip\thinshrinkable #1% + \fi + \fi + \egroup % end \boxA + \ifdim\wd\boxB = 0pt + \global\setbox\entryindexbox=\box\boxA + \else + \global\setbox\entryindexbox=\vbox\bgroup\noindent + % We want the text of the entries to be aligned to the left, and the + % page numbers to be aligned to the right. + % + \advance\leftskip by 0pt plus 1fil + \advance\leftskip by 0pt plus -1fill + \rightskip = 0pt plus -1fil + \advance\rightskip by 0pt plus 1fill + % Cause last line, which could consist of page numbers on their own + % if the list of page numbers is long, to be aligned to the right. + \parfillskip=0pt plus -1fill + % + \hangindent=1em + % + \advance\rightskip by \entryrightmargin + % Determine how far we can stretch into the margin. + % This allows, e.g., "Appendix H GNU Free Documentation License" to + % fit on one line in @letterpaper format. + \ifdim\entryrightmargin>2.1em + \dimen@i=2.1em + \else + \dimen@i=0em + \fi + \advance \parfillskip by 0pt minus 1\dimen@i + % + \dimen@ii = \hsize + \advance\dimen@ii by -1\leftskip + \advance\dimen@ii by -1\entryrightmargin + \advance\dimen@ii by 1\dimen@i + \let\maybestrut=\relax + \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line + \let\maybestrut=\strut + \ifdim\dimen@ > 0.8\dimen@ii % due to long index text + \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly + \dimen@ii = \hsize + \advance \dimen@ii by -1em + \ifnum\dimen@>\dimen@ii + % If the entry is too long, use the whole line + \dimen@ = \dimen@ii + \fi + \advance\leftskip by 0pt plus 1fill % ragged right + \advance \dimen@ by 1\rightskip + \parshape = 2 0pt \dimen@ 1em \dimen@ii + % Ideally we'd add a finite glue at the end of the first line only, but + % TeX doesn't seem to provide a way to do such a thing. + \fi\fi + \maybestrut % Add a strut on the first and last lines + \unhbox\boxA + \maybestrut + % + % Do not prefer a separate line ending with a hyphen to fewer lines. + \finalhyphendemerits = 0 + % + % Word spacing - no stretch + \spaceskip=\fontdimen2\font minus \fontdimen4\font + % + \linepenalty=1000 % Discourage line breaks. + \hyphenpenalty=5000 % Discourage hyphenation. + % + \par % format the paragraph + \egroup % The \vbox + \fi + \endgroup + % delay text of entry until after penalty + \bgroup\aftergroup\insertindexentrybox + \entryorphanpenalty +}} + +\newskip\thinshrinkable +\skip\thinshrinkable=.15em minus .15em + +\newbox\entryindexbox +\def\insertindexentrybox{% +\lineskip=0pt % This comes into effect when the \vbox has a large + % height due to the paragraph in it having several + % lines. +\box\entryindexbox} + +% Default is no penalty +\let\entryorphanpenalty\egroup + +% Used from \printindex. \firsttoken should be the first token +% after the \entry. If it's not another \entry, we are at the last +% line of a group of index entries, so insert a penalty to discourage +% orphaned index entries. +\long\def\indexorphanpenalty{% + \def\isentry{\entry}% + \ifx\firsttoken\isentry + \else + \unskip\penalty 9000 + % The \unskip here stops breaking before the glue. It relies on the + % \vskip above being there, otherwise there is an error + % "You can't use `\unskip' in vertical mode". There has to be glue + % in the current vertical list that hasn't been added to the + % "current page". See Chapter 24 of the TeXbook. This contradicts + % Section 8.3.7 in "TeX by Topic," though. + \fi + \egroup % now comes the box added with \aftergroup +} + +% Like plain.tex's \dotfill, except uses up at least 1 em. +% The filll stretch here overpowers both the fil and fill stretch to push +% the page number to the right. +\def\indexdotfill{\cleaders + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll} + + +\def\primary #1{\line{#1\hfil}} + +\newskip\secondaryindent \secondaryindent=0.5cm +\def\secondary#1#2{{% + \parfillskip=0in + \parskip=0in + \hangindent=1in + \hangafter=1 + \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill + \ifpdf + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \else + #2 + \fi + \par +}} + +% Define two-column mode, which we use to typeset indexes. +% Adapted from the TeXbook, page 416, which is to say, +% the manmac.tex format used to print the TeXbook itself. +\catcode`\@=11 + +\newbox\partialpage +\newdimen\doublecolumnhsize +\newdimen\doublecolumntopgap +\doublecolumntopgap = 0pt + +\newtoks\savedtopmark % Used in \begindoublecolumns +\newtoks\savedfirstmark + +\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns + % Grab any single-column material above us. + \output = {% + % + % Here is a possibility not foreseen in manmac: if we accumulate a + % whole lot of material, we might end up calling this \output + % routine twice in a row (see the doublecol-lose test, which is + % essentially a couple of indexes with @setchapternewpage off). In + % that case we just ship out what is in \partialpage with the normal + % output routine. Generally, \partialpage will be empty when this + % runs and this will be a no-op. See the indexspread.tex test case. + \ifvoid\partialpage \else + \onepageout{\pagecontents\partialpage}% + \fi + % + \global\setbox\partialpage = \vbox{% + % Unvbox the main output page. + \unvbox\PAGE + \kern-\topskip \kern\baselineskip + }% + % Save \topmark and \firstmark + \global\savedtopmark=\expandafter{\topmark}% + \global\savedfirstmark=\expandafter{\firstmark}% + }% + \eject % run that output routine to set \partialpage + % + % We recover the two marks that the last output routine saved in order + % to propagate the information in marks added around a chapter heading, + % which could be otherwise be lost by the time the final page is output. + % + \mark{\the\savedtopmark}% Only mark in page passed to following \output. + \output = {% + \setbox0=\box\PAGE % clear box 255 + }abc\eject + % + \mark{\the\savedfirstmark}% + % + % Use the double-column output routine for subsequent pages. + \output = {\doublecolumnout}% + % + % Change the page size parameters. We could do this once outside this + % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 + % format, but then we repeat the same computation. Repeating a couple + % of assignments once per index is clearly meaningless for the + % execution time, so we may as well do it in one place. + % + % First we halve the line length, less a little for the gutter between + % the columns. We compute the gutter based on the line length, so it + % changes automatically with the paper format. The magic constant + % below is chosen so that the gutter has the same value (well, +-<1pt) + % as it did when we hard-coded it. + % + % We put the result in a separate register, \doublecolumhsize, so we + % can restore it in \pagesofar, after \hsize itself has (potentially) + % been clobbered. + % + \doublecolumnhsize = \hsize + \advance\doublecolumnhsize by -.04154\hsize + \divide\doublecolumnhsize by 2 + \hsize = \doublecolumnhsize + % + % Double the \vsize as well. (We don't need a separate register here, + % since nobody clobbers \vsize.) + \global\doublecolumntopgap = \topskip + \global\advance\doublecolumntopgap by -1\baselineskip + \global\advance\vsize by -1\doublecolumntopgap + \vsize = 2\vsize + \topskip=0pt +} + +% The double-column output routine for all double-column pages except +% the last, which is done by \balancecolumns. +% +\def\doublecolumnout{% + \splittopskip=\topskip \splitmaxdepth=\maxdepth + % Get the available space for the double columns -- the normal + % (undoubled) page height minus any material left over from the + % previous page. + \dimen@ = \vsize + \divide\dimen@ by 2 + \advance\dimen@ by -\ht\partialpage + % + % box0 will be the left-hand column, box2 the right. + \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ + \onepageout\pagesofar + \unvbox255 + \penalty\outputpenalty +} +% +% Re-output the contents of the output page -- any previous material, +% followed by the two boxes we just split, in box0 and box2. +\def\pagesofar{% + \unvbox\partialpage + % + \hsize = \doublecolumnhsize + \wd0=\hsize \wd2=\hsize + \vbox{% + \vskip\doublecolumntopgap + \hbox to\pagewidth{\box0\hfil\box2}}% +} + + +% Finished with with double columns. +\def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % + \output = {% + % Split the last of the double-column material. Leave it on the + % current page, no automatic page break. + \balancecolumns + % + % If we end up splitting too much material for the current page, + % though, there will be another page break right after this \output + % invocation ends. Having called \balancecolumns once, we do not + % want to call it again. Therefore, reset \output to its normal + % definition right away. (We hope \balancecolumns will never be + % called on to balance too much material, but if it is, this makes + % the output somewhat more palatable.) + \global\output = {\onepageout{\pagecontents\PAGE}}% + }% + \eject + \endgroup % started in \begindoublecolumns + % + % \pagegoal was set to the doubled \vsize above, since we restarted + % the current page. We're now back to normal single-column + % typesetting, so reset \pagegoal to the normal \vsize (after the + % \endgroup where \vsize got restored). + \pagegoal = \vsize +} +% +% Only called for the last of the double column material. \doublecolumnout +% does the others. +\def\balancecolumns{% + \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. + \dimen@ = \ht0 + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \ifdim\dimen@<14\baselineskip + % Don't split a short final column in two. + \setbox2=\vbox{}% + \else + \divide\dimen@ by 2 % target to split to + \dimen@ii = \dimen@ + \splittopskip = \topskip + % Loop until the second column is no higher than the first + {% + \vbadness = 10000 + \loop + \global\setbox3 = \copy0 + \global\setbox1 = \vsplit3 to \dimen@ + % Remove glue from bottom of first column to + % make sure it is higher than the second. + \global\setbox1 = \vbox{\unvbox1\unpenalty\unskip}% + \ifdim\ht3>\ht1 + \global\advance\dimen@ by 1pt + \repeat + }% + \multiply\dimen@ii by 4 + \divide\dimen@ii by 5 + \ifdim\ht3<\dimen@ii + % Column heights are too different, so don't make their bottoms + % flush with each other. The glue at the end of the second column + % allows a second column to stretch, reducing the difference in + % height between the two. + \setbox0=\vbox to\dimen@{\unvbox1\vfill}% + \setbox2=\vbox to\dimen@{\unvbox3\vskip 0pt plus 0.3\ht0}% + \else + \setbox0=\vbox to\dimen@{\unvbox1}% + \setbox2=\vbox to\dimen@{\unvbox3}% + \fi + \fi + % + \pagesofar +} +\catcode`\@ = \other + + +\message{sectioning,} +% Chapters, sections, etc. + +% Let's start with @part. +\outer\parseargdef\part{\partzzz{#1}} +\def\partzzz#1{% + \chapoddpage + \null + \vskip.3\vsize % move it down on the page a bit + \begingroup + \noindent \titlefonts\rmisbold #1\par % the text + \let\lastnode=\empty % no node to associate with + \writetocentry{part}{#1}{}% but put it in the toc + \headingsoff % no headline or footline on the part page + % This outputs a mark at the end of the page that clears \thischapter + % and \thissection, as is done in \startcontents. + \let\pchapsepmacro\relax + \chapmacro{}{Yomitfromtoc}{}% + \chapoddpage + \endgroup +} + +% \unnumberedno is an oxymoron. But we count the unnumbered +% sections so that we can refer to them unambiguously in the pdf +% outlines by their "section number". We avoid collisions with chapter +% numbers by starting them at 10000. (If a document ever has 10000 +% chapters, we're in trouble anyway, I'm sure.) +\newcount\unnumberedno \unnumberedno = 10000 +\newcount\chapno +\newcount\secno \secno=0 +\newcount\subsecno \subsecno=0 +\newcount\subsubsecno \subsubsecno=0 + +% This counter is funny since it counts through charcodes of letters A, B, ... +\newcount\appendixno \appendixno = `\@ +% +% \def\appendixletter{\char\the\appendixno} +% We do the following ugly conditional instead of the above simple +% construct for the sake of pdftex, which needs the actual +% letter in the expansion, not just typeset. +% +\def\appendixletter{% + \ifnum\appendixno=`A A% + \else\ifnum\appendixno=`B B% + \else\ifnum\appendixno=`C C% + \else\ifnum\appendixno=`D D% + \else\ifnum\appendixno=`E E% + \else\ifnum\appendixno=`F F% + \else\ifnum\appendixno=`G G% + \else\ifnum\appendixno=`H H% + \else\ifnum\appendixno=`I I% + \else\ifnum\appendixno=`J J% + \else\ifnum\appendixno=`K K% + \else\ifnum\appendixno=`L L% + \else\ifnum\appendixno=`M M% + \else\ifnum\appendixno=`N N% + \else\ifnum\appendixno=`O O% + \else\ifnum\appendixno=`P P% + \else\ifnum\appendixno=`Q Q% + \else\ifnum\appendixno=`R R% + \else\ifnum\appendixno=`S S% + \else\ifnum\appendixno=`T T% + \else\ifnum\appendixno=`U U% + \else\ifnum\appendixno=`V V% + \else\ifnum\appendixno=`W W% + \else\ifnum\appendixno=`X X% + \else\ifnum\appendixno=`Y Y% + \else\ifnum\appendixno=`Z Z% + % The \the is necessary, despite appearances, because \appendixletter is + % expanded while writing the .toc file. \char\appendixno is not + % expandable, thus it is written literally, thus all appendixes come out + % with the same letter (or @) in the toc without it. + \else\char\the\appendixno + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. +\def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} +\def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} + +\newcount\absseclevel % used to calculate proper heading level +\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count + +% @raisesections: treat @section as chapter, @subsection as section, etc. +\def\raisesections{\global\advance\secbase by -1} +\let\up=\raisesections % original BFox name + +% @lowersections: treat @chapter as section, @section as subsection, etc. +\def\lowersections{\global\advance\secbase by 1} +\let\down=\lowersections % original BFox name + +% we only have subsub. +\chardef\maxseclevel = 3 +% +% A numbered section within an unnumbered changes to unnumbered too. +% To achieve this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unnlevel = \maxseclevel +% +% Trace whether the current chapter is an appendix or not: +% \chapheadtype is "N" or "A", unnumbered chapters are ignored. +\def\chapheadtype{N} + +% Choose a heading macro +% #1 is heading type +% #2 is heading level +% #3 is text for heading +\def\genhead#1#2#3{% + % Compute the abs. sec. level: + \absseclevel=#2 + \advance\absseclevel by \secbase + % Make sure \absseclevel doesn't fall outside the range: + \ifnum \absseclevel < 0 + \absseclevel = 0 + \else + \ifnum \absseclevel > 3 + \absseclevel = 3 + \fi + \fi + % The heading type: + \def\headtype{#1}% + \if \headtype U% + \ifnum \absseclevel < \unnlevel + \chardef\unnlevel = \absseclevel + \fi + \else + % Check for appendix sections: + \ifnum \absseclevel = 0 + \edef\chapheadtype{\headtype}% + \else + \if \headtype A\if \chapheadtype N% + \errmessage{@appendix... within a non-appendix chapter}% + \fi\fi + \fi + % Check for numbered within unnumbered: + \ifnum \absseclevel > \unnlevel + \def\headtype{U}% + \else + \chardef\unnlevel = 3 + \fi + \fi + % Now print the heading: + \if \headtype U% + \ifcase\absseclevel + \unnumberedzzz{#3}% + \or \unnumberedseczzz{#3}% + \or \unnumberedsubseczzz{#3}% + \or \unnumberedsubsubseczzz{#3}% + \fi + \else + \if \headtype A% + \ifcase\absseclevel + \appendixzzz{#3}% + \or \appendixsectionzzz{#3}% + \or \appendixsubseczzz{#3}% + \or \appendixsubsubseczzz{#3}% + \fi + \else + \ifcase\absseclevel + \chapterzzz{#3}% + \or \seczzz{#3}% + \or \numberedsubseczzz{#3}% + \or \numberedsubsubseczzz{#3}% + \fi + \fi + \fi + \suppressfirstparagraphindent +} + +% an interface: +\def\numhead{\genhead N} +\def\apphead{\genhead A} +\def\unnmhead{\genhead U} + +% @chapter, @appendix, @unnumbered. Increment top-level counter, reset +% all lower-level sectioning counters to zero. +% +% Also set \chaplevelprefix, which we prepend to @float sequence numbers +% (e.g., figures), q.v. By default (before any chapter), that is empty. +\let\chaplevelprefix = \empty +% +\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz +\def\chapterzzz#1{% + % section resetting is \global in case the chapter is in a group, such + % as an @include file. + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\chapno by 1 + % + % Used for \float. + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % + % \putwordChapter can contain complex things in translations. + \toks0=\expandafter{\putwordChapter}% + \message{\the\toks0 \space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% + % + % So @section and the like are numbered underneath this chapter. + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec +} + +\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz +% +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % + % \putwordAppendix can contain complex things in translations. + \toks0=\expandafter{\putwordAppendix}% + \message{\the\toks0 \space \appendixletter}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec +} + +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} +\def\unnumberedzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\unnumberedno by 1 + % + % Since an unnumbered has no number, no prefix for figures. + \global\let\chaplevelprefix = \empty + \resetallfloatnos + % + % This used to be simply \message{#1}, but TeX fully expands the + % argument to \message. Therefore, if #1 contained @-commands, TeX + % expanded them. For example, in `@unnumbered The @cite{Book}', TeX + % expanded @cite (which turns out to cause errors because \cite is meant + % to be executed, not expanded). + % + % Anyway, we don't want the fully-expanded definition of @cite to appear + % as a result of the \message, we just want `@cite' itself. We use + % \the to achieve this: TeX expands \the only once, + % simply yielding the contents of . (We also do this for + % the toc entries.) + \toks0 = {#1}% + \message{(\the\toks0)}% + % + \chapmacro{#1}{Ynothing}{\the\unnumberedno}% + % + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec +} + +% @centerchap is like @unnumbered, but the heading is centered. +\outer\parseargdef\centerchap{% + \let\centerparametersmaybe = \centerparameters + \unnmhead0{#1}% + \let\centerparametersmaybe = \relax +} + +% @top is like @unnumbered. +\let\top\unnumbered + +% Sections. +% +\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz +\def\seczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% +} + +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} +\def\appendixsectionzzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% +} +\let\appendixsec\appendixsection + +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} +\def\unnumberedseczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% +} + +% Subsections. +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} +\def\numberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% +} + +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} +\def\appendixsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno}% +} + +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} +\def\unnumberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno}% +} + +% Subsubsections. +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} +\def\numberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynumbered}% + {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} +\def\appendixsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} +\def\unnumberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% These macros control what the section commands do, according +% to what kind of chapter we are in (ordinary, appendix, or unnumbered). +% Define them by default for a numbered chapter. +\let\section = \numberedsec +\let\subsection = \numberedsubsec +\let\subsubsection = \numberedsubsubsec + +% Define @majorheading, @heading and @subheading + +\def\majorheading{% + {\advance\chapheadingskip by 10pt \chapbreak }% + \parsearg\chapheadingzzz +} + +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip \nobreak + \suppressfirstparagraphindent +} + +% @heading, @subheading, @subsubheading. +\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} + +% These macros generate a chapter, section, etc. heading only +% (including whitespace, linebreaking, etc. around it), +% given all the information in convenient, parsed form. + +% Args are the skip and penalty (usually negative) +\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} + +% Parameter controlling skip before chapter headings (if needed) +\newskip\chapheadingskip + +% Define plain chapter starts, and page on/off switching for it. +\def\chapbreak{\dobreak \chapheadingskip {-4000}} + +% Start a new page +\def\chappager{\par\vfill\supereject} + +% \chapoddpage - start on an odd page for a new chapter +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \headingsoff + \null + \chappager + \endgroup + \fi +} + +\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} + +\def\CHAPPAGoff{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chapbreak +\global\let\pagealignmacro=\chappager} + +\def\CHAPPAGon{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chappager +\global\let\pagealignmacro=\chappager +\global\def\HEADINGSon{\HEADINGSsingle}} + +\def\CHAPPAGodd{% +\global\let\contentsalignmacro = \chapoddpage +\global\let\pchapsepmacro=\chapoddpage +\global\let\pagealignmacro=\chapoddpage +\global\def\HEADINGSon{\HEADINGSdouble}} + +\CHAPPAGon + +% \chapmacro - Chapter opening. +% +% #1 is the text, #2 is the section type (Ynumbered, Ynothing, +% Yappendix, Yomitfromtoc), #3 the chapter number. +% Not used for @heading series. +% +% To test against our argument. +\def\Ynothingkeyword{Ynothing} +\def\Yappendixkeyword{Yappendix} +\def\Yomitfromtockeyword{Yomitfromtoc} +% +\def\chapmacro#1#2#3{% + \checkenv{}% chapters, etc., should not start inside an environment. + % + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + % \noexpand\putwordAppendix avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + % \noexpand\putwordChapter avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordChapter{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. + \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % + {% + \chapfonts \rmisbold + \let\footnote=\errfootnoteheading % give better error message + % + % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called + % after \pchapsepmacro, or the headline will change too soon. + \gdef\lastsection{#1}% + % + % Only insert the separating space if we have a chapter/appendix + % number, and don't print the unnumbered ``number''. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unnchap}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% + \else + \setbox0 = \hbox{#3\enspace}% + \def\toctype{numchap}% + \fi\fi\fi + % + % Write the toc entry for this chapter. Must come before the + % \donoderef, because we include the current node name in the toc + % entry, and \donoderef resets it to empty. + \writetocentry{\toctype}{#1}{#3}% + % + % For pdftex, we have to write out the node definition (aka, make + % the pdfdest) after any page break, but before the actual text has + % been typeset. If the destination for the pdf outline is after the + % text, then jumping from the outline may wind up with the text not + % being visible, for instance under high magnification. + \donoderef{#2}% + % + % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. + \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe + \unhbox0 #1\par}% + }% + \nobreak\bigskip % no page break after a chapter title + \nobreak +} + +% @centerchap -- centered and unnumbered. +\let\centerparametersmaybe = \relax +\def\centerparameters{% + \advance\rightskip by 3\rightskip + \leftskip = \rightskip + \parfillskip = 0pt +} + + +% I don't think this chapter style is supported any more, so I'm not +% updating it with the new noderef stuff. We'll see. --karl, 11aug03. +% +\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} +% +\def\unnchfopen #1{% + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip\nobreak +} +\def\chfopen #1#2{\chapoddpage {\chapfonts +\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% +\par\penalty 5000 % +} +\def\centerchfopen #1{% + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% + \nobreak\bigskip \nobreak +} +\def\CHAPFopen{% + \global\let\chapmacro=\chfopen + \global\let\centerchapmacro=\centerchfopen} + + +% Section titles. These macros combine the section number parts and +% call the generic \sectionheading to do the printing. +% +\newskip\secheadingskip +\def\secheadingbreak{\dobreak \secheadingskip{-1000}} + +% Subsection titles. +\newskip\subsecheadingskip +\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} + +% Subsubsection titles. +\def\subsubsecheadingskip{\subsecheadingskip} +\def\subsubsecheadingbreak{\subsecheadingbreak} + + +% Print any size, any type, section title. +% +% #1 is the text of the title, +% #2 is the section level (sec/subsec/subsubsec), +% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc), +% #4 is the section number. +% +\def\seckeyword{sec} +% +\def\sectionheading#1#2#3#4{% + {% + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % It is ok for the @heading series commands to appear inside an + % environment (it's been historically allowed, though the logic is + % dubious), but not the others. + \ifx\temptype\Yomitfromtockeyword\else + \checkenv{}% non-@*heading should not be in an environment. + \fi + \let\footnote=\errfootnoteheading + % + % Switch to the right set of fonts. + \csname #2fonts\endcsname \rmisbold + % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Go into vertical mode. Usually we'll already be there, but we + % don't want the following whatsit to end up in a preceding paragraph + % if the document didn't happen to have a blank line. + \par + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert space above the heading. + \csname #2headingbreak\endcsname + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \global\let\prevsectiondefs=\lastsectiondefs + \domark + % + % Only insert the space after the number if we have a section number. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unn}% + \gdef\lastsection{#1}% + \else\ifx\temptype\Yomitfromtockeyword + % for @headings -- no section number, don't include in toc, + % and don't redefine \lastsection. + \setbox0 = \hbox{}% + \def\toctype{omit}% + \let\sectionlevel=\empty + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{#4\enspace}% + \def\toctype{app}% + \gdef\lastsection{#1}% + \else + \setbox0 = \hbox{#4\enspace}% + \def\toctype{num}% + \gdef\lastsection{#1}% + \fi\fi\fi + % + % Write the toc entry (before \donoderef). See comments in \chapmacro. + \writetocentry{\toctype\sectionlevel}{#1}{#4}% + % + % Write the node reference (= pdf destination for pdftex). + % Again, see comments in \chapmacro. + \donoderef{#3}% + % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % + % Output the actual section heading. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% + }% + % Add extra space after the heading -- half of whatever came above it. + % Don't allow stretch, though. + \kern .5 \csname #2headingskip\endcsname + % + % Do not let the kern be a potential breakpoint, as it would be if it + % was followed by glue. + \nobreak + % + % We'll almost certainly start a paragraph next, so don't let that + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) However, when a paragraph is not started next + % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out + % or the negative glue will cause weirdly wrong output, typically + % obscuring the section heading with something else. + \vskip-\parskip + % + % This is so the last item on the main vertical list is a known + % \penalty > 10000, so \startdefun, etc., can recognize the situation + % and do the needful. + \penalty 10001 +} + + +\message{toc,} +% Table of contents. +\newwrite\tocfile + +% Write an entry to the toc file, opening it if necessary. +% Called from @chapter, etc. +% +% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} +% We append the current node name (if any) and page number as additional +% arguments for the \{chap,sec,...}entry macros which will eventually +% read this. The node name is used in the pdf outlines as the +% destination to jump to. +% +% We open the .toc file for writing here instead of at @setfilename (or +% any other fixed time) so that @contents can be anywhere in the document. +% But if #1 is `omit', then we don't do anything. This is used for the +% table of contents chapter openings themselves. +% +\newif\iftocfileopened +\def\omitkeyword{omit}% +% +\def\writetocentry#1#2#3{% + \edef\writetoctype{#1}% + \ifx\writetoctype\omitkeyword \else + \iftocfileopened\else + \immediate\openout\tocfile = \jobname.toc + \global\tocfileopenedtrue + \fi + % + \iflinks + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% + \fi + \fi + % + % Tell \shipout to create a pdf destination on each page, if we're + % writing pdf. These are used in the table of contents. We can't + % just write one on every page because the title pages are numbered + % 1 and 2 (the page numbers aren't printed), and so are the first + % two pages of the document. Thus, we'd have two destinations named + % `1', and two named `2'. + \ifpdf \global\pdfmakepagedesttrue \fi +} + + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active + \catcode`\<=\active + \catcode`\>=\active + \catcode`\\=\active + \catcode`\^=\active + \catcode`\_=\active + \catcode`\|=\active + \catcode`\~=\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \tocreadfilename +} + +\newskip\contentsrightmargin \contentsrightmargin=1in +\newcount\savepageno +\newcount\lastnegativepageno \lastnegativepageno = -1 + +% Prepare to read what we've written to \tocfile. +% +\def\startcontents#1{% + % If @setchapternewpage on, and @headings double, the contents should + % start on an odd page, unlike chapters. Thus, we maintain + % \contentsalignmacro in parallel with \pagealignmacro. + % From: Torbjorn Granlund + \contentsalignmacro + \immediate\closeout\tocfile + % + % Don't need to put `Contents' or `Short Contents' in the headline. + % It is abundantly clear what they are. + \chapmacro{#1}{Yomitfromtoc}{}% + % + \savepageno = \pageno + \begingroup % Set up to handle contents files properly. + \raggedbottom % Worry more about breakpoints than the bottom. + \entryrightmargin=\contentsrightmargin % Don't use the full line length. + % + % Roman numerals for page numbers. + \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi +} + +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} + +% Normal (long) toc. +% +\def\contents{% + \startcontents{\putwordTOC}% + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \ifeof 1 \else + \pdfmakeoutlines + \fi + \closein 1 + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} + +% And just the chapters. +\def\summarycontents{% + \startcontents{\putwordShortTOC}% + % + \let\partentry = \shortpartentry + \let\numchapentry = \shortchapentry + \let\appentry = \shortchapentry + \let\unnchapentry = \shortunnchapentry + % We want a true roman here for the page numbers. + \secfonts + \let\rm=\shortcontrm \let\bf=\shortcontbf + \let\sl=\shortcontsl \let\tt=\shortconttt + \rm + \hyphenpenalty = 10000 + \advance\baselineskip by 1pt % Open it up a little. + \def\numsecentry##1##2##3##4{} + \let\appsecentry = \numsecentry + \let\unnsecentry = \numsecentry + \let\numsubsecentry = \numsecentry + \let\appsubsecentry = \numsecentry + \let\unnsubsecentry = \numsecentry + \let\numsubsubsecentry = \numsecentry + \let\appsubsubsecentry = \numsecentry + \let\unnsubsubsecentry = \numsecentry + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \closein 1 + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} +\let\shortcontents = \summarycontents + +% Typeset the label for a chapter or appendix for the short contents. +% The arg is, e.g., `A' for an appendix, or `3' for a chapter. +% +\def\shortchaplabel#1{% + % This space should be enough, since a single number is .5em, and the + % widest letter (M) is 1em, at least in the Computer Modern fonts. + % But use \hss just in case. + % (This space doesn't include the extra space that gets added after + % the label; that gets put in by \shortchapentry above.) + % + % We'd like to right-justify chapter numbers, but that looks strange + % with appendix letters. And right-justifying numbers and + % left-justifying letters looks strange when there is less than 10 + % chapters. Have to read the whole toc once to know how many chapters + % there are before deciding ... + \hbox to 1em{#1\hss}% +} + +% These macros generate individual entries in the table of contents. +% The first argument is the chapter or section name. +% The last argument is the page number. +% The arguments in between are the chapter number, section number, ... + +% Parts, in the main contents. Replace the part number, which doesn't +% exist, with an empty box. Let's hope all the numbers have the same width. +% Also ignore the page number, which is conventionally not printed. +\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} +\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +% +% Parts, in the short toc. +\def\shortpartentry#1#2#3#4{% + \penalty-300 + \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip + \shortchapentry{{\bf #1}}{\numeralbox}{}{}% +} + +% Chapters, in the main contents. +\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} + +% Chapters, in the short toc. +% See comments in \dochapentry re vbox and related settings. +\def\shortchapentry#1#2#3#4{% + \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% +} + +% Appendices, in the main contents. +% Need the word Appendix, and a fixed-size box. +% +\def\appendixbox#1{% + % We use M since it's probably the widest letter. + \setbox0 = \hbox{\putwordAppendix{} M}% + \hbox to \wd0{\putwordAppendix{} #1\hss}} +% +\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}} + +% Unnumbered chapters. +\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} +\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} + +% Sections. +\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} +\let\appsecentry=\numsecentry +\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} + +% Subsections. +\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} +\let\appsubsecentry=\numsubsecentry +\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} + +% And subsubsections. +\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} +\let\appsubsubsecentry=\numsubsubsecentry +\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} + +% This parameter controls the indentation of the various levels. +% Same as \defaultparindent. +\newdimen\tocindent \tocindent = 15pt + +% Now for the actual typesetting. In all these, #1 is the text and #2 is the +% page number. +% +% If the toc has to be broken over pages, we want it to be at chapters +% if at all possible; hence the \penalty. +\def\dochapentry#1#2{% + \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip + \begingroup + % Move the page numbers slightly to the right + \advance\entryrightmargin by -0.05em + \chapentryfonts + \tocentry{#1}{\dopageno\bgroup#2\egroup}% + \endgroup + \nobreak\vskip .25\baselineskip plus.1\baselineskip +} + +\def\dosecentry#1#2{\begingroup + \secentryfonts \leftskip=\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsecentry#1#2{\begingroup + \subsecentryfonts \leftskip=2\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsubsecentry#1#2{\begingroup + \subsubsecentryfonts \leftskip=3\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +% We use the same \entry macro as for the index entries. +\let\tocentry = \entry + +% Space between chapter (or whatever) number and the title. +\def\labelspace{\hskip1em \relax} + +\def\dopageno#1{{\rm #1}} +\def\doshortpageno#1{{\rm #1}} + +\def\chapentryfonts{\secfonts \rm} +\def\secentryfonts{\textfonts} +\def\subsecentryfonts{\textfonts} +\def\subsubsecentryfonts{\textfonts} + + +\message{environments,} +% @foo ... @end foo. + +% @tex ... @end tex escapes into raw TeX temporarily. +% One exception: @ is still an escape character, so that @end tex works. +% But \@ or @@ will get a plain @ character. + +\envdef\tex{% + \setupmarkupstyle{tex}% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 + \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie + \catcode `\%=14 + \catcode `\+=\other + \catcode `\"=\other + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other + \catcode `\`=\other + \catcode `\'=\other + \escapechar=`\\ + % + % ' is active in math mode (mathcode"8000). So reset it, and all our + % other math active characters (just in case), to plain's definitions. + \mathactive + % + % Inverse of the list at the beginning of the file. + \let\b=\ptexb + \let\bullet=\ptexbullet + \let\c=\ptexc + \let\,=\ptexcomma + \let\.=\ptexdot + \let\dots=\ptexdots + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \let\{=\ptexlbrace + \let\+=\tabalign + \let\}=\ptexrbrace + \let\/=\ptexslash + \let\sp=\ptexsp + \let\*=\ptexstar + %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode + \let\t=\ptext + \expandafter \let\csname top\endcsname=\ptextop % we've made it outer + \let\frenchspacing=\plainfrenchspacing + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% +} +% There is no need to define \Etex. + +% Define @lisp ... @end lisp. +% @lisp environment forms a group so it can rebind things, +% including the definition of @end lisp (which normally is erroneous). + +% Amount to narrow the margins by for @lisp. +\newskip\lispnarrowing \lispnarrowing=0.4in + +% This is the definition that ^^M gets inside @lisp, @example, and other +% such environments. \null is better than a space, since it doesn't +% have any width. +\def\lisppar{\null\endgraf} + +% This space is always present above and below environments. +\newskip\envskipamount \envskipamount = 0pt + +% Make spacing and below environment symmetrical. We use \parskip here +% to help in doing that, since in @example-like environments \parskip +% is reset to zero; thus the \afterenvbreak inserts no space -- but the +% start of the next paragraph will insert \parskip. +% +\def\aboveenvbreak{{% + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. + \ifnum \lastpenalty=10000 \else + \advance\envskipamount by \parskip + \endgraf + \ifdim\lastskip<\envskipamount + \removelastskip + \ifnum\lastpenalty<10000 + % Penalize breaking before the environment, because preceding text + % often leads into it. + \penalty100 + \fi + \vskip\envskipamount + \fi + \fi +}} + +\def\afterenvbreak{{% + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. + \ifnum \lastpenalty=10000 \else + \advance\envskipamount by \parskip + \endgraf + \ifdim\lastskip<\envskipamount + \removelastskip + % it's not a good place to break if the last penalty was \nobreak + % or better ... + \ifnum\lastpenalty<10000 \penalty-50 \fi + \vskip\envskipamount + \fi + \fi +}} + +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will +% also clear it, so that its embedded environments do the narrowing again. +\let\nonarrowing=\relax + +% @cartouche ... @end cartouche: draw rectangle w/rounded corners around +% environment contents. +\font\circle=lcircle10 +\newdimen\circthick +\newdimen\cartouter\newdimen\cartinner +\newskip\normbskip\newskip\normpskip\newskip\normlskip +\circthick=\fontdimen8\circle +% +\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth +\def\ctr{{\hskip 6pt\circle\char'010}} +\def\cbl{{\circle\char'012\hskip -6pt}} +\def\cbr{{\hskip 6pt\circle\char'011}} +\def\carttop{\hbox to \cartouter{\hskip\lskip + \ctl\leaders\hrule height\circthick\hfil\ctr + \hskip\rskip}} +\def\cartbot{\hbox to \cartouter{\hskip\lskip + \cbl\leaders\hrule height\circthick\hfil\cbr + \hskip\rskip}} +% +\newskip\lskip\newskip\rskip + +\envdef\cartouche{% + \ifhmode\par\fi % can't be in the midst of a paragraph. + \startsavinginserts + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt % we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18.4pt % allow for 3pt kerns on either + % side, and for 6pt waste from + % each corner char, and rule thickness + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % + % If this cartouche directly follows a sectioning command, we need the + % \parskip glue (backspaced over by default) or the cartouche can + % collide with the section heading. + \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi + % + \setbox\groupbox=\vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \kern3pt + \hsize=\cartinner + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip + \comment % For explanation, see the end of def\group. +} +\def\Ecartouche{% + \ifhmode\par\fi + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup + \addgroupbox + \checkinserts +} + + +% This macro is called at the beginning of all the @example variants, +% inside a group. +\newdimen\nonfillparindent +\def\nonfillstart{% + \aboveenvbreak + \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy + \sepspaces % Make spaces be word-separators rather than space tokens. + \let\par = \lisppar % don't ignore blank lines + \obeylines % each line of input is a line of output + \parskip = 0pt + % Turn off paragraph indentation but redefine \indent to emulate + % the normal \indent. + \nonfillparindent=\parindent + \parindent = 0pt + \let\indent\nonfillindent + % + \emergencystretch = 0pt % don't try to avoid overfull boxes + \ifx\nonarrowing\relax + \advance \leftskip by \lispnarrowing + \exdentamount=\lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \let\exdent=\nofillexdent +} + +\begingroup +\obeyspaces +% We want to swallow spaces (but not other tokens) after the fake +% @indent in our nonfill-environments, where spaces are normally +% active and set to @tie, resulting in them not being ignored after +% @indent. +\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% +\gdef\nonfillindentcheck{% +\ifx\temp % +\expandafter\nonfillindentgobble% +\else% +\leavevmode\nonfillindentbox% +\fi% +}% +\endgroup +\def\nonfillindentgobble#1{\nonfillindent} +\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} + +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: +% @example, @display, @format, @lisp +% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax +\def\setnormaldispenv{% + \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} + +% We often define two environments, @foo and @smallfoo. +% Let's do it in one command. #1 is the env name, #2 the definition. +\def\makedispenvdef#1#2{% + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% + \expandafter\let\csname E#1\endcsname \afterenvbreak + \expandafter\let\csname Esmall#1\endcsname \afterenvbreak +} + +% Define two environment synonyms (#1 and #2) for an environment. +\def\maketwodispenvdef#1#2#3{% + \makedispenvdef{#1}{#3}% + \makedispenvdef{#2}{#3}% +} +% +% @lisp: indented, narrowed, typewriter font; +% @example: same as @lisp. +% +% @smallexample and @smalllisp: use smaller fonts. +% Originally contributed by Pavel@xerox. +% +\maketwodispenvdef{lisp}{example}{% + \nonfillstart + \tt\setupmarkupstyle{example}% + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return +} +% @display/@smalldisplay: same as @lisp except keep current font. +% +\makedispenvdef{display}{% + \nonfillstart + \gobble +} + +% @format/@smallformat: same as @display except don't narrow margins. +% +\makedispenvdef{format}{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} + +% @flushleft: same as @format, but doesn't obey \SETdispenvsize. +\envdef\flushleft{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} +\let\Eflushleft = \afterenvbreak + +% @flushright. +% +\envdef\flushright{% + \let\nonarrowing = t% + \nonfillstart + \advance\leftskip by 0pt plus 1fill\relax + \gobble +} +\let\Eflushright = \afterenvbreak + + +% @raggedright does more-or-less normal line breaking but no right +% justification. From plain.tex. Don't stretch around special +% characters in urls in this environment, since the stretch at the right +% should be enough. +\envdef\raggedright{% + \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax + \def\urefprestretchamount{0pt}% + \def\urefpoststretchamount{0pt}% +} +\let\Eraggedright\par + +\envdef\raggedleft{% + \parindent=0pt \leftskip0pt plus2em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedleft\par + +\envdef\raggedcenter{% + \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedcenter\par + + +% @quotation does normal linebreaking (hence we can't use \nonfillstart) +% and narrows the margins. We keep \parskip nonzero in general, since +% we're doing normal filling. So, when using \aboveenvbreak and +% \afterenvbreak, temporarily make \parskip 0. +% +\makedispenvdef{quotation}{\quotationstart} +% +\def\quotationstart{% + \indentedblockstart % same as \indentedblock, but increase right margin too. + \ifx\nonarrowing\relax + \advance\rightskip by \lispnarrowing + \fi + \parsearg\quotationlabel +} + +% We have retained a nonzero parskip for the environment, since we're +% doing normal filling. +% +\def\Equotation{% + \par + \ifx\quotationauthor\thisisundefined\else + % indent a bit. + \leftline{\kern 2\leftskip \sl ---\quotationauthor}% + \fi + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallquotation{\Equotation} + +% If we're given an argument, typeset it in bold with a colon after. +\def\quotationlabel#1{% + \def\temp{#1}% + \ifx\temp\empty \else + {\bf #1: }% + \fi +} + +% @indentedblock is like @quotation, but indents only on the left and +% has no optional argument. +% +\makedispenvdef{indentedblock}{\indentedblockstart} +% +\def\indentedblockstart{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi +} + +% Keep a nonzero parskip for the environment, since we're doing normal filling. +% +\def\Eindentedblock{% + \par + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallindentedblock{\Eindentedblock} + + +% LaTeX-like @verbatim...@end verbatim and @verb{...} +% If we want to allow any as delimiter, +% we need the curly braces so that makeinfo sees the @verb command, eg: +% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org +% +% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. +% +% [Knuth] p.344; only we need to do the other characters Texinfo sets +% active too. Otherwise, they get lost as the first character on a +% verbatim line. +\def\dospecials{% + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% + % Don't do the quotes -- if we do, @set txicodequoteundirected and + % @set txicodequotebacktick will not have effect on @verb and + % @verbatim, and ?` and !` ligatures won't get disabled. + %\do\`\do\'% +} +% +% [Knuth] p. 380 +\def\uncatcodespecials{% + \def\do##1{\catcode`##1=\other}\dospecials} +% +% Setup for the @verb command. +% +% Eight spaces for a tab +\begingroup + \catcode`\^^I=\active + \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} +\endgroup +% +\def\setupverb{% + \tt % easiest (and conventionally used) font for verbatim + \def\par{\leavevmode\endgraf}% + \setupmarkupstyle{verb}% + \tabeightspaces + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces +} + +% Setup for the @verbatim environment +% +% Real tab expansion. +\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount +% +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} +% +\begingroup + \catcode`\^^I=\active + \gdef\tabexpand{% + \catcode`\^^I=\active + \def^^I{\leavevmode\egroup + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox + }% + } +\endgroup + +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% + \tabexpand + \setupmarkupstyle{verbatim}% + % Respect line breaks, + % print special symbols as themselves, and + % make each space count. + % Must do in this order: + \obeylines \uncatcodespecials \sepspaces + \everypar{\starttabbox}% +} + +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a +% right brace, after last delimiter expect closing brace: +% +% \def\doverb'{'#1'}'{#1} +% +% [Knuth] p. 382; only eat outer {} +\begingroup + \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other + \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] +\endgroup +% +\def\verb{\begingroup\setupverb\doverb} +% +% +% Do the @verbatim magic: define the macro \doverbatim so that +% the (first) argument ends when '@end verbatim' is reached, ie: +% +% \def\doverbatim#1@end verbatim{#1} +% +% For Texinfo it's a lot easier than for LaTeX, +% because texinfo's \verbatim doesn't stop at '\end{verbatim}': +% we need not redefine '\', '{' and '}'. +% +% Inspired by LaTeX's verbatim command set [latex.ltx] +% +\begingroup + \catcode`\ =\active + \obeylines % + % ignore everything up to the first ^^M, that's the newline at the end + % of the @verbatim input line itself. Otherwise we get an extra blank + % line in the output. + \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% + % We really want {...\end verbatim} in the body of the macro, but + % without the active space; thus we have to use \xdef and \gobble. +\endgroup +% +\envdef\verbatim{% + \setupverbatim\doverbatim +} +\let\Everbatim = \afterenvbreak + + +% @verbatiminclude FILE - insert text of file in verbatim environment. +% +\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} +% +\def\doverbatiminclude#1{% + {% + \makevalueexpandable + \setupverbatim + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% + \input #1 + \afterenvbreak + }% +} + +% @copying ... @end copying. +% Save the text away for @insertcopying later. +% +% We save the uninterpreted tokens, rather than creating a box. +% Saving the text in a box would be much easier, but then all the +% typesetting commands (@smallbook, font changes, etc.) have to be done +% beforehand -- and a) we want @copying to be done first in the source +% file; b) letting users define the frontmatter in as flexible order as +% possible is desirable. +% +\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} +\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} +% +\def\insertcopying{% + \begingroup + \parindent = 0pt % paragraph indentation looks wrong on title page + \scanexp\copyingtext + \endgroup +} + + +\message{defuns,} +% @defun etc. + +\newskip\defbodyindent \defbodyindent=.4in +\newskip\defargsindent \defargsindent=50pt +\newskip\deflastargmargin \deflastargmargin=18pt +\newcount\defunpenalty + +% Start the processing of @deffn: +\def\startdefun{% + \ifnum\lastpenalty<10000 + \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. + \else + % If there are two @def commands in a row, we'll have a \nobreak, + % which is there to keep the function description together with its + % header. But if there's nothing but headers, we need to allow a + % break somewhere. Check specifically for penalty 10002, inserted + % by \printdefunline, instead of 10000, since the sectioning + % commands also insert a nobreak penalty, and we don't want to allow + % a break between a section heading and a defun. + % + % As a further refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi + % + % Similarly, after a section heading, do not allow a break. + % But do insert the glue. + \medskip % preceded by discardable penalty, so not a breakpoint + \fi + % + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent +} + +\def\dodefunx#1{% + % First, check whether we are in the right environment: + \checkenv#1% + % + % As above, allow line break if we have multiple x headers in a row. + % It's not a great place, though. + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi + % + % And now, it's time to reuse the body of the original defun: + \expandafter\gobbledefun#1% +} +\def\gobbledefun#1\startdefun{} + +% \printdefunline \deffnheader{text} +% +\def\printdefunline#1#2{% + \begingroup + % call \deffnheader: + #1#2 \endheader + % common ending: + \interlinepenalty = 10000 + \advance\rightskip by 0pt plus 1fil\relax + \endgraf + \nobreak\vskip -\parskip + \penalty\defunpenalty % signal to \startdefun and \dodefunx + % Some of the @defun-type tags do not enable magic parentheses, + % rendering the following check redundant. But we don't optimize. + \checkparencounts + \endgroup +} + +\def\Edefun{\endgraf\medbreak} + +% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; +% the only thing remaining is to define \deffnheader. +% +\def\makedefun#1{% + \expandafter\let\csname E#1\endcsname = \Edefun + \edef\temp{\noexpand\domakedefun + \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% + \temp +} + +% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) } +% +% Define \deffn and \deffnx, without parameters. +% \deffnheader has to be defined explicitly. +% +\def\domakedefun#1#2#3{% + \envdef#1{% + \startdefun + \doingtypefnfalse % distinguish typed functions from all else + \parseargusing\activeparens{\printdefunline#3}% + }% + \def#2{\dodefunx#1}% + \def#3% +} + +\newif\ifdoingtypefn % doing typed function? +\newif\ifrettypeownline % typeset return type on its own line? + +% @deftypefnnewline on|off says whether the return type of typed functions +% are printed on their own line. This affects @deftypefn, @deftypefun, +% @deftypeop, and @deftypemethod. +% +\parseargdef\deftypefnnewline{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @txideftypefnnl value `\temp', + must be on|off}% + \fi\fi +} + +% Untyped functions: + +% @deffn category name args +\makedefun{deffn}{\deffngeneral{}} + +% @deffn category class name args +\makedefun{defop}#1 {\defopon{#1\ \putwordon}} + +% \defopon {category on}class name args +\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deffngeneral {subind}category name args +% +\def\deffngeneral#1#2 #3 #4\endheader{% + % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. + \dosubind{fn}{\code{#3}}{#1}% + \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% +} + +% Typed functions: + +% @deftypefn category type name args +\makedefun{deftypefn}{\deftypefngeneral{}} + +% @deftypeop category class type name args +\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} + +% \deftypeopon {category on}class type name args +\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deftypefngeneral {subind}category type name args +% +\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% + \dosubind{fn}{\code{#4}}{#1}% + \doingtypefntrue + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +% Typed variables: + +% @deftypevr category type var args +\makedefun{deftypevr}{\deftypecvgeneral{}} + +% @deftypecv category class type var args +\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} + +% \deftypecvof {category of}class type var args +\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } + +% \deftypecvgeneral {subind}category type var args +% +\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% + \dosubind{vr}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +% Untyped variables: + +% @defvr category var args +\makedefun{defvr}#1 {\deftypevrheader{#1} {} } + +% @defcv category class var args +\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} + +% \defcvof {category of}class var args +\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } + +% Types: + +% @deftp category name args +\makedefun{deftp}#1 #2 #3\endheader{% + \doind{tp}{\code{#2}}% + \defname{#1}{}{#2}\defunargs{#3\unskip}% +} + +% Remaining @defun-like shortcuts: +\makedefun{defun}{\deffnheader{\putwordDeffunc} } +\makedefun{defmac}{\deffnheader{\putwordDefmac} } +\makedefun{defspec}{\deffnheader{\putwordDefspec} } +\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } +\makedefun{defvar}{\defvrheader{\putwordDefvar} } +\makedefun{defopt}{\defvrheader{\putwordDefopt} } +\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } +\makedefun{defmethod}{\defopon\putwordMethodon} +\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} +\makedefun{defivar}{\defcvof\putwordInstanceVariableof} +\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} + +% \defname, which formats the name of the @def (not the args). +% #1 is the category, such as "Function". +% #2 is the return type, if any. +% #3 is the function name. +% +% We are followed by (but not passed) the arguments, if any. +% +\def\defname#1#2#3{% + \par + % Get the values of \leftskip and \rightskip as they were outside the @def... + \advance\leftskip by -\defbodyindent + % + % Determine if we are typesetting the return type of a typed function + % on a line by itself. + \rettypeownlinefalse + \ifdoingtypefn % doing a typed function specifically? + % then check user option for putting return type on its own line: + \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else + \rettypeownlinetrue + \fi + \fi + % + % How we'll format the category name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \def\temp{#1}% + \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} + % + % Figure out line sizes for the paragraph shape. We'll always have at + % least two. + \tempnum = 2 + % + % The first line needs space for \box0; but if \rightskip is nonzero, + % we need only space for the part of \box0 which exceeds it: + \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % + % If doing a return type on its own line, we'll have another line. + \ifrettypeownline + \advance\tempnum by 1 + \def\maybeshapeline{0in \hsize}% + \else + \def\maybeshapeline{}% + \fi + % + % The continuations: + \dimen2=\hsize \advance\dimen2 by -\defargsindent + % + % The final paragraph shape: + \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 + % + % Put the category name at the right margin. + \noindent + \hbox to 0pt{% + \hfil\box0 \kern-\hsize + % \hsize has to be shortened this way: + \kern\leftskip + % Intentionally do not respect \rightskip, since we need the space. + }% + % + % Allow all lines to be underfull without complaint: + \tolerance=10000 \hbadness=10000 + \exdentamount=\defbodyindent + {% + % defun fonts. We use typewriter by default (used to be bold) because: + % . we're printing identifiers, they should be in tt in principle. + % . in languages with many accents, such as Czech or French, it's + % common to leave accents off identifiers. The result looks ok in + % tt, but exceedingly strange in rm. + % . we don't want -- and --- to be treated as ligatures. + % . this still does not fix the ?` and !` ligatures, but so far no + % one has made identifiers using them :). + \df \tt + \def\temp{#2}% text of the return type + \ifx\temp\empty\else + \tclose{\temp}% typeset the return type + \ifrettypeownline + % put return type on its own line; prohibit line break following: + \hfil\vadjust{\nobreak}\break + \else + \space % type on same line, so just followed by a space + \fi + \fi % no return type + #3% output function name + }% + {\rm\enskip}% hskip 0.5 em of \tenrm + % + \boldbrax + % arguments will be output next, if any. +} + +% Print arguments in slanted roman (not ttsl), inconsistently with using +% tt for the name. This is because literal text is sometimes needed in +% the argument list (groff manual), and ttsl and tt are not very +% distinguishable. Prevent hyphenation at `-' chars. +% +\def\defunargs#1{% + % use sl by default (not ttsl), + % tt for the names. + \df \sl \hyphenchar\font=0 + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. We used to recommend @var for that, so + % leave the code in, but it's strange for @var to lead to typewriter. + % Nowadays we recommend @code, since the difference between a ttsl hyphen + % and a tt hyphen is pretty tiny. @code also disables ?` !`. + \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% + #1% + \sl\hyphenchar\font=45 +} + +% We want ()&[] to print specially on the defun line. +% +\def\activeparens{% + \catcode`\(=\active \catcode`\)=\active + \catcode`\[=\active \catcode`\]=\active + \catcode`\&=\active +} + +% Make control sequences which act like normal parenthesis chars. +\let\lparen = ( \let\rparen = ) + +% Be sure that we always have a definition for `(', etc. For example, +% if the fn name has parens in it, \boldbrax will not be in effect yet, +% so TeX would otherwise complain about undefined control sequence. +{ + \activeparens + \global\let(=\lparen \global\let)=\rparen + \global\let[=\lbrack \global\let]=\rbrack + \global\let& = \& + + \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} + \gdef\magicamp{\let&=\amprm} +} + +\newcount\parencount + +% If we encounter &foo, then turn on ()-hacking afterwards +\newif\ifampseen +\def\amprm#1 {\ampseentrue{\bf\ }} + +\def\parenfont{% + \ifampseen + % At the first level, print parens in roman, + % otherwise use the default font. + \ifnum \parencount=1 \rm \fi + \else + % The \sf parens (in \boldbrax) actually are a little bolder than + % the contained text. This is especially needed for [ and ] . + \sf + \fi +} +\def\infirstlevel#1{% + \ifampseen + \ifnum\parencount=1 + #1% + \fi + \fi +} +\def\bfafterword#1 {#1 \bf} + +\def\opnr{% + \global\advance\parencount by 1 + {\parenfont(}% + \infirstlevel \bfafterword +} +\def\clnr{% + {\parenfont)}% + \infirstlevel \sl + \global\advance\parencount by -1 +} + +\newcount\brackcount +\def\lbrb{% + \global\advance\brackcount by 1 + {\bf[}% +} +\def\rbrb{% + {\bf]}% + \global\advance\brackcount by -1 +} + +\def\checkparencounts{% + \ifnum\parencount=0 \else \badparencount \fi + \ifnum\brackcount=0 \else \badbrackcount \fi +} +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). +\def\badparencount{% + \message{Warning: unbalanced parentheses in @def...}% + \global\parencount=0 +} +\def\badbrackcount{% + \message{Warning: unbalanced square brackets in @def...}% + \global\brackcount=0 +} + + +\message{macros,} +% @macro. + +% To do this right we need a feature of e-TeX, \scantokens, +% which we arrange to emulate with a temporary file in ordinary TeX. +\ifx\eTeXversion\thisisundefined + \newwrite\macscribble + \def\scantokens#1{% + \toks0={#1}% + \immediate\openout\macscribble=\jobname.tmp + \immediate\write\macscribble{\the\toks0}% + \immediate\closeout\macscribble + \input \jobname.tmp + } +\fi + +\let\aftermacroxxx\relax +\def\aftermacro{\aftermacroxxx} + +% alias because \c means cedilla in @tex or @math +\let\texinfoc=\c + +% Used at the time of macro expansion. +% Argument is macro body with arguments substituted +\def\scanmacro#1{% + \newlinechar`\^^M + \def\xprocessmacroarg{\eatspaces}% + % + % Process the macro body under the current catcode regime. + \scantokens{#1\texinfoc}\aftermacro% + % + % The \c is to remove the \newlinechar added by \scantokens, and + % can be noticed by \parsearg. + % The \aftermacro allows a \comment at the end of the macro definition + % to duplicate itself past the final \newlinechar added by \scantokens: + % this is used in the definition of \group to comment out a newline. We + % don't do the same for \c to support Texinfo files with macros that ended + % with a @c, which should no longer be necessary. + % We avoid surrounding the call to \scantokens with \bgroup and \egroup + % to allow macros to open or close groups themselves. +} + +\def\scanexp#1{% + \bgroup + % Undo catcode changes of \startcontents and \printindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. + % FIXME: This may not be needed. + %\catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + \edef\temp{\noexpand\scanmacro{#1}}% + \temp + \egroup +} + +\newcount\paramno % Count of parameters +\newtoks\macname % Macro name +\newif\ifrecursive % Is it recursive? + +% List of all defined macros in the form +% \definedummyword\macro1\definedummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 = \expandafter{\macrolist\definedummyword#1}% + \xdef\macrolist{\the\toks0}% +} + +% Utility routines. +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). +% +\def\cslet#1#2{% + \expandafter\let + \csname#1\expandafter\endcsname + \csname#2\endcsname +} + +% Trim leading and trailing spaces off a string. +% Concepts from aro-bend problem 15 (see CTAN). +{\catcode`\@=11 +\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} +\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} +\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} +\def\unbrace#1{#1} +\unbrace{\gdef\trim@@@ #1 } #2@{#1} +} + +% Trim a single trailing ^^M off a string. +{\catcode`\^^M=\other \catcode`\Q=3% +\gdef\eatcr #1{\eatcra #1Q^^MQ}% +\gdef\eatcra#1^^MQ{\eatcrb#1Q}% +\gdef\eatcrb#1Q#2Q{#1}% +} + +% Macro bodies are absorbed as an argument in a context where +% all characters are catcode 10, 11 or 12, except \ which is active +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. +% +% It's necessary to have hard CRs when the macro is executed. This is +% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% body, and then making it the \newlinechar in \scanmacro. +% +\def\scanctxt{% used as subroutine + \catcode`\"=\other + \catcode`\+=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi +} + +\def\scanargctxt{% used for copying and captions, not macros. + \scanctxt + \catcode`\@=\other + \catcode`\\=\other + \catcode`\^^M=\other +} + +\def\macrobodyctxt{% used for @macro definitions + \scanctxt + \catcode`\ =\other + \catcode`\@=\other + \catcode`\{=\other + \catcode`\}=\other + \catcode`\^^M=\other + \usembodybackslash +} + +% Used when scanning braced macro arguments. Note, however, that catcode +% changes here are ineffectual if the macro invocation was nested inside +% an argument to another Texinfo command. +\def\macroargctxt{% + \scanctxt + \catcode`\ =\active + \catcode`\^^M=\other + \catcode`\\=\active +} + +\def\macrolineargctxt{% used for whole-line arguments without braces + \scanctxt + \catcode`\{=\other + \catcode`\}=\other +} + +% \mbodybackslash is the definition of \ in @macro bodies. +% It maps \foo\ => \csname macarg.foo\endcsname => #N +% where N is the macro parameter number. +% We define \csname macarg.\endcsname to be \realbackslash, so +% \\ in macro replacement text gets you a backslash. +% +{\catcode`@=0 @catcode`@\=@active + @gdef@usembodybackslash{@let\=@mbodybackslash} + @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} +} +\expandafter\def\csname macarg.\endcsname{\realbackslash} + +\def\margbackslash#1{\char`\#1 } + +\def\macro{\recursivefalse\parsearg\macroxxx} +\def\rmacro{\recursivetrue\parsearg\macroxxx} + +\def\macroxxx#1{% + \getargs{#1}% now \macname is the macname and \argl the arglist + \ifx\argl\empty % no arguments + \paramno=0\relax + \else + \expandafter\parsemargdef \argl;% + \if\paramno>256\relax + \ifx\eTeXversion\thisisundefined + \errhelp = \EMsimple + \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} + \fi + \fi + \fi + \if1\csname ismacro.\the\macname\endcsname + \message{Warning: redefining \the\macname}% + \else + \expandafter\ifx\csname \the\macname\endcsname \relax + \else \errmessage{Macro name \the\macname\space already defined}\fi + \global\cslet{macsave.\the\macname}{\the\macname}% + \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% + \addtomacrolist{\the\macname}% + \fi + \begingroup \macrobodyctxt + \ifrecursive \expandafter\parsermacbody + \else \expandafter\parsemacbody + \fi} + +\parseargdef\unmacro{% + \if1\csname ismacro.#1\endcsname + \global\cslet{#1}{macsave.#1}% + \global\expandafter\let \csname ismacro.#1\endcsname=0% + % Remove the macro name from \macrolist: + \begingroup + \expandafter\let\csname#1\endcsname \relax + \let\definedummyword\unmacrodo + \xdef\macrolist{\macrolist}% + \endgroup + \else + \errmessage{Macro #1 not defined}% + \fi +} + +% Called by \do from \dounmacro on each macro. The idea is to omit any +% macro definitions that have been changed to \relax. +% +\def\unmacrodo#1{% + \ifx #1\relax + % remove this + \else + \noexpand\definedummyword \noexpand#1% + \fi +} + +% \getargs -- Parse the arguments to a @macro line. Set \macname to +% the name of the macro, and \argl to the braced argument list. +\def\getargs#1{\getargsxxx#1{}} +\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} +\def\getmacname#1 #2\relax{\macname={#1}} +\def\getmacargs#1{\def\argl{#1}} +% This made use of the feature that if the last token of a +% is #, then the preceding argument is delimited by +% an opening brace, and that opening brace is not consumed. + +% Parse the optional {params} list to @macro or @rmacro. +% Set \paramno to the number of arguments, +% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a +% three-param macro.) Define \macarg.BLAH for each BLAH in the params +% list to some hook where the argument is to be expanded. If there are +% less than 10 arguments that hook is to be replaced by ##N where N +% is the position in that list, that is to say the macro arguments are to be +% defined `a la TeX in the macro body. +% +% That gets used by \mbodybackslash (above). +% +% If there are 10 or more arguments, a different technique is used: see +% \parsemmanyargdef. +% +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + % \hash is redefined to `#' later to get it into definitions + \let\processmacroarg\relax + \parsemargdefxxx#1,;,% + \ifnum\paramno<10\relax\else + \paramno0\relax + \parsemmanyargdef@@#1,;,% 10 or more arguments + \fi +} +\def\parsemargdefxxx#1,{% + \if#1;\let\next=\relax + \else \let\next=\parsemargdefxxx + \advance\paramno by 1 + \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname + {\processmacroarg{\hash\the\paramno}}% + \edef\paramlist{\paramlist\hash\the\paramno,}% + \fi\next} + +% \parsemacbody, \parsermacbody +% +% Read recursive and nonrecursive macro bodies. (They're different since +% rec and nonrec macros end differently.) +% +% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro +% body to be transformed. +% Set \macrobody to the body of the macro, and call \defmacro. +% +{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{% +\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% +{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{% +\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% + +% Make @ a letter, so that we can make private-to-Texinfo macro names. +\edef\texiatcatcode{\the\catcode`\@} +\catcode `@=11\relax + +%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%% + +% If there are 10 or more arguments, a different technique is used, where the +% hook remains in the body, and when macro is to be expanded the body is +% processed again to replace the arguments. +% +% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the +% argument N value and then \edef the body (nothing else will expand because of +% the catcode regime under which the body was input). +% +% If you compile with TeX (not eTeX), and you have macros with 10 or more +% arguments, no macro can have more than 256 arguments (else error). +% +% In case that there are 10 or more arguments we parse again the arguments +% list to set new definitions for the \macarg.BLAH macros corresponding to +% each BLAH argument. It was anyhow needed to parse already once this list +% in order to count the arguments, and as macros with at most 9 arguments +% are by far more frequent than macro with 10 or more arguments, defining +% twice the \macarg.BLAH macros does not cost too much processing power. +\def\parsemmanyargdef@@#1,{% + \if#1;\let\next=\relax + \else + \let\next=\parsemmanyargdef@@ + \edef\tempb{\eatspaces{#1}}% + \expandafter\def\expandafter\tempa + \expandafter{\csname macarg.\tempb\endcsname}% + % Note that we need some extra \noexpand\noexpand, this is because we + % don't want \the to be expanded in the \parsermacbody as it uses an + % \xdef . + \expandafter\edef\tempa + {\noexpand\noexpand\noexpand\the\toks\the\paramno}% + \advance\paramno by 1\relax + \fi\next} + + +\let\endargs@\relax +\let\nil@\relax +\def\nilm@{\nil@}% +\long\def\nillm@{\nil@}% + +% This macro is expanded during the Texinfo macro expansion, not during its +% definition. It gets all the arguments' values and assigns them to macros +% macarg.ARGNAME +% +% #1 is the macro name +% #2 is the list of argument names +% #3 is the list of argument values +\def\getargvals@#1#2#3{% + \def\macargdeflist@{}% + \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. + \def\paramlist{#2,\nil@}% + \def\macroname{#1}% + \begingroup + \macroargctxt + \def\argvaluelist{#3,\nil@}% + \def\@tempa{#3}% + \ifx\@tempa\empty + \setemptyargvalues@ + \else + \getargvals@@ + \fi +} +\def\getargvals@@{% + \ifx\paramlist\nilm@ + % Some sanity check needed here that \argvaluelist is also empty. + \ifx\argvaluelist\nillm@ + \else + \errhelp = \EMsimple + \errmessage{Too many arguments in macro `\macroname'!}% + \fi + \let\next\macargexpandinbody@ + \else + \ifx\argvaluelist\nillm@ + % No more arguments values passed to macro. Set remaining named-arg + % macros to empty. + \let\next\setemptyargvalues@ + \else + % pop current arg name into \@tempb + \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% + \expandafter\@tempa\expandafter{\paramlist}% + % pop current argument value into \@tempc + \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% + \expandafter\@tempa\expandafter{\argvaluelist}% + % Here \@tempb is the current arg name and \@tempc is the current arg value. + % First place the new argument macro definition into \@tempd + \expandafter\macname\expandafter{\@tempc}% + \expandafter\let\csname macarg.\@tempb\endcsname\relax + \expandafter\def\expandafter\@tempe\expandafter{% + \csname macarg.\@tempb\endcsname}% + \edef\@tempd{\long\def\@tempe{\the\macname}}% + \push@\@tempd\macargdeflist@ + \let\next\getargvals@@ + \fi + \fi + \next +} + +\def\push@#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#2% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}% +} + +% Replace arguments by their values in the macro body, and place the result +% in macro \@tempa. +% +\def\macvalstoargs@{% + % To do this we use the property that token registers that are \the'ed + % within an \edef expand only once. So we are going to place all argument + % values into respective token registers. + % + % First we save the token context, and initialize argument numbering. + \begingroup + \paramno0\relax + % Then, for each argument number #N, we place the corresponding argument + % value into a new token list register \toks#N + \expandafter\putargsintokens@\saveparamlist@,;,% + % Then, we expand the body so that argument are replaced by their + % values. The trick for values not to be expanded themselves is that they + % are within tokens and that tokens expand only once in an \edef . + \edef\@tempc{\csname mac.\macroname .body\endcsname}% + % Now we restore the token stack pointer to free the token list registers + % which we have used, but we make sure that expanded body is saved after + % group. + \expandafter + \endgroup + \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% + } + +% Define the named-macro outside of this group and then close this group. +% +\def\macargexpandinbody@{% + \expandafter + \endgroup + \macargdeflist@ + % First the replace in body the macro arguments by their values, the result + % is in \@tempa . + \macvalstoargs@ + % Then we point at the \norecurse or \gobble (for recursive) macro value + % with \@tempb . + \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname + % Depending on whether it is recursive or not, we need some tailing + % \egroup . + \ifx\@tempb\gobble + \let\@tempc\relax + \else + \let\@tempc\egroup + \fi + % And now we do the real job: + \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% + \@tempd +} + +\def\putargsintokens@#1,{% + \if#1;\let\next\relax + \else + \let\next\putargsintokens@ + % First we allocate the new token list register, and give it a temporary + % alias \@tempb . + \toksdef\@tempb\the\paramno + % Then we place the argument value into that token list register. + \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname + \expandafter\@tempb\expandafter{\@tempa}% + \advance\paramno by 1\relax + \fi + \next +} + +% Trailing missing arguments are set to empty. +% +\def\setemptyargvalues@{% + \ifx\paramlist\nilm@ + \let\next\macargexpandinbody@ + \else + \expandafter\setemptyargvaluesparser@\paramlist\endargs@ + \let\next\setemptyargvalues@ + \fi + \next +} + +\def\setemptyargvaluesparser@#1,#2\endargs@{% + \expandafter\def\expandafter\@tempa\expandafter{% + \expandafter\def\csname macarg.#1\endcsname{}}% + \push@\@tempa\macargdeflist@ + \def\paramlist{#2}% +} + +% #1 is the element target macro +% #2 is the list macro +% #3,#4\endargs@ is the list value +\def\pop@#1#2#3,#4\endargs@{% + \def#1{#3}% + \def#2{#4}% +} +\long\def\longpop@#1#2#3,#4\endargs@{% + \long\def#1{#3}% + \long\def#2{#4}% +} + + +%%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%% + + + +% Remove following spaces at the expansion stage. +% This works because spaces are discarded before each argument when TeX is +% getting the arguments for a macro. +% This must not be immediately followed by a }. +\long\def\gobblespaces#1{#1} + +% This defines a Texinfo @macro or @rmacro, called by \parsemacbody. +% \macrobody has the body of the macro in it, with placeholders for +% its parameters, looking like "\processmacroarg{\hash 1}". +% \paramno is the number of parameters +% \paramlist is a TeX parameter text, e.g. "#1,#2,#3," +% There are eight cases: recursive and nonrecursive macros of zero, one, +% up to nine, and many arguments. +% \xdef is used so that macro definitions will survive the file +% they're defined in: @include reads the file inside a group. +% +\def\defmacro{% + \let\hash=##% convert placeholders to macro parameter chars + \ifnum\paramno=1 + \def\processmacroarg{\gobblespaces}% + % This removes the pair of braces around the argument. We don't + % use \eatspaces, because this can cause ends of lines to be lost + % when the argument to \eatspaces is read, leading to line-based + % commands like "@itemize" not being read correctly. + \else + \def\processmacroarg{\xprocessmacroarg}% + \let\xprocessmacroarg\relax + \fi + \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\scanmacro{\macrobody}}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname @@@\endcsname}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname{% + \noexpand\gobblespaces##1\empty}% + % The \empty is for \gobblespaces in case #1 is empty + }% + \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% + \egroup\noexpand\scanmacro{\macrobody}}% + \else + \ifnum\paramno<10\relax % at most 9 + % See non-recursive section below for comments + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\expandafter + \noexpand\macroargctxt + \noexpand\expandafter + \expandafter\noexpand\csname\the\macname @@\endcsname}% + \expandafter\xdef\csname\the\macname @@\endcsname##1{% + \noexpand\passargtomacro + \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname @@@@\endcsname\paramlist{% + \egroup\noexpand\scanmacro{\macrobody}}% + \else % 10 or more + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble + \fi + \fi + \else %%%%%%%%%%%%%%%%%%%%%% Non-recursive %%%%%%%%%%%%%%%%%%%%%%%%%% + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\scanmacro{\macrobody}}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname @@@\endcsname}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname{% + \noexpand\gobblespaces##1\empty}% + % The \empty is for \gobblespaces in case #1 is empty + }% + \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% + \egroup + \noexpand\scanmacro{\macrobody}% + }% + \else % at most 9 + \ifnum\paramno<10\relax + % @MACNAME sets the context for reading the macro argument + % @MACNAME@@ gets the argument, processes backslashes and appends a + % comma. + % @MACNAME@@@ removes braces surrounding the argument list. + % @MACNAME@@@@ scans the macro body with arguments substituted. + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\expandafter % This \expandafter skip any spaces after the + \noexpand\macroargctxt % macro before we change the catcode of space. + \noexpand\expandafter + \expandafter\noexpand\csname\the\macname @@\endcsname}% + \expandafter\xdef\csname\the\macname @@\endcsname##1{% + \noexpand\passargtomacro + \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname @@@@\endcsname\paramlist{% + \egroup\noexpand\scanmacro{\macrobody}}% + \else % 10 or more: + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse + \fi + \fi + \fi} + +\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes + +\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +{\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape +@catcode`@_=11 % private names +@catcode`@!=11 % used as argument separator + +% \passargtomacro#1#2 - +% Call #1 with a list of tokens #2, with any doubled backslashes in #2 +% compressed to one. +% +% This implementation works by expansion, and not execution (so we cannot use +% \def or similar). This reduces the risk of this failing in contexts where +% complete expansion is done with no execution (for example, in writing out to +% an auxiliary file for an index entry). +% +% State is kept in the input stream: the argument passed to +% @look_ahead, @gobble_and_check_finish and @add_segment is +% +% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input) +% +% where: +% THE_MACRO - name of the macro we want to call +% ARG_RESULT - argument list we build to pass to that macro +% PENDING_BS - either a backslash or nothing +% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next + +@gdef@passargtomacro#1#2{% + @add_segment #1!{}@relax#2\@_finish\% +} +@gdef@_finish{@_finishx} @global@let@_finishx@relax + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 used to look ahead +% +% If the next token is not a backslash, process the rest of the argument; +% otherwise, remove the next token. +@gdef@look_ahead#1!#2#3#4{% + @ifx#4\% + @expandafter@gobble_and_check_finish + @else + @expandafter@add_segment + @fi#1!{#2}#4#4% +} + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 should be a backslash, which is gobbled. +% #5 looks ahead +% +% Double backslash found. Add a single backslash, and look ahead. +@gdef@gobble_and_check_finish#1!#2#3#4#5{% + @add_segment#1\!{}#5#5% +} + +@gdef@is_fi{@fi} + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 is input stream until next backslash +% +% Input stream is either at the start of the argument, or just after a +% backslash sequence, either a lone backslash, or a doubled backslash. +% NEXT_TOKEN contains the first token in the input stream: if it is \finish, +% finish; otherwise, append to ARG_RESULT the segment of the argument up until +% the next backslash. PENDING_BACKSLASH contains a backslash to represent +% a backslash just before the start of the input stream that has not been +% added to ARG_RESULT. +@gdef@add_segment#1!#2#3#4\{% +@ifx#3@_finish + @call_the_macro#1!% +@else + % append the pending backslash to the result, followed by the next segment + @expandafter@is_fi@look_ahead#1#2#4!{\}@fi + % this @fi is discarded by @look_ahead. + % we can't get rid of it with \expandafter because we don't know how + % long #4 is. +} + +% #1 - THE_MACRO +% #2 - ARG_RESULT +% #3 discards the res of the conditional in @add_segment, and @is_fi ends the +% conditional. +@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} + +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% \braceorline MAC is used for a one-argument macro MAC. It checks +% whether the next non-whitespace character is a {. It sets the context +% for reading the argument (slightly different in the two cases). Then, +% to read the argument, in the whole-line case, it then calls the regular +% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. +% +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} +\def\braceorlinexxx{% + \ifx\nchar\bgroup + \macroargctxt + \expandafter\passargtomacro + \else + \macrolineargctxt\expandafter\parsearg + \fi \macnamexxx} + + +% @alias. +% We need some trickery to remove the optional spaces around the equal +% sign. Make them active and then expand them all to nothing. +% +\def\alias{\parseargusing\obeyspaces\aliasxxx} +\def\aliasxxx #1{\aliasyyy#1\relax} +\def\aliasyyy #1=#2\relax{% + {% + \expandafter\let\obeyedspace=\empty + \addtomacrolist{#1}% + \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% + }% + \next +} + + +\message{cross references,} + +\newwrite\auxfile +\newif\ifhavexrefs % True if xref values are known. +\newif\ifwarnedxrefs % True if we warned once that they aren't known. + +% @inforef is relatively simple. +\def\inforef #1{\inforefzzz #1,,,,**} +\def\inforefzzz #1,#2,#3,#4**{% + \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + +% @node's only job in TeX is to define \lastnode, which is used in +% cross-references. The @node line might or might not have commas, and +% might or might not have spaces before the first comma, like: +% @node foo , bar , ... +% We don't want such trailing spaces in the node name. +% +\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} +% +% also remove a trailing comma, in case of something like this: +% @node Help-Cross, , , Cross-refs +\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} +\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} + +\let\nwnode=\node +\let\lastnode=\empty + +% Write a cross-reference definition for the current node. #1 is the +% type (Ynumbered, Yappendix, Ynothing). +% +\def\donoderef#1{% + \ifx\lastnode\empty\else + \setref{\lastnode}{#1}% + \global\let\lastnode=\empty + \fi +} + +% @anchor{NAME} -- define xref target at arbitrary point. +% +\newcount\savesfregister +% +\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} + +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), which consists of three parts: +% 1) NAME-title - the current sectioning name taken from \lastsection, +% or the anchor name. +% 2) NAME-snt - section number and type, passed as the SNT arg, or +% empty for anchors. +% 3) NAME-pg - the page number. +% +% This is called from \donoderef, \anchor, and \dofloat. In the case of +% floats, there is an additional part, which is not written here: +% 4) NAME-lof - the text as it should appear in a @listoffloats. +% +\def\setref#1#2{% + \pdfmkdest{#1}% + \iflinks + {% + \requireauxfile + \atdummies % preserve commands, but don't expand them + \edef\writexrdef##1##2{% + \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef + ##1}{##2}}% these are parameters of \writexrdef + }% + \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout + }% + \fi +} + +% @xrefautosectiontitle on|off says whether @section(ing) names are used +% automatically in xrefs, if the third arg is not explicitly specified. +% This was provided as a "secret" @set xref-automatic-section-title +% variable, now it's official. +% +\parseargdef\xrefautomaticsectiontitle{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', + must be on|off}% + \fi\fi +} + +% +% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is +% the node name, #2 the name of the Info cross-reference, #3 the printed +% node name, #4 the name of the Info file, #5 the name of the printed +% manual. All but the node name can be omitted. +% +\def\pxref{\putwordsee{} \xrefXX} +\def\xref{\putwordSee{} \xrefXX} +\def\ref{\xrefXX} + +\def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX} +\def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]} +% +\newbox\toprefbox +\newbox\printedrefnamebox +\newbox\infofilenamebox +\newbox\printedmanualbox +% +\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup + \unsepspaces + % + % Get args without leading/trailing spaces. + \def\printedrefname{\ignorespaces #3}% + \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% + % + \def\infofilename{\ignorespaces #4}% + \setbox\infofilenamebox = \hbox{\infofilename\unskip}% + % + \def\printedmanual{\ignorespaces #5}% + \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% + % + % If the printed reference name (arg #3) was not explicitly given in + % the @xref, figure out what we want to use. + \ifdim \wd\printedrefnamebox = 0pt + % No printed node name was explicitly given. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax + % Not auto section-title: use node name inside the square brackets. + \def\printedrefname{\ignorespaces #1}% + \else + % Auto section-title: use chapter/section title inside + % the square brackets if we have it. + \ifdim \wd\printedmanualbox > 0pt + % It is in another manual, so we don't have it; use node name. + \def\printedrefname{\ignorespaces #1}% + \else + \ifhavexrefs + % We (should) know the real title if we have the xref values. + \def\printedrefname{\refx{#1-title}{}}% + \else + % Otherwise just copy the Info node name. + \def\printedrefname{\ignorespaces #1}% + \fi% + \fi + \fi + \fi + % + % Make link in pdf output. + \ifpdf + {\indexnofonts + \turnoffactive + \makevalueexpandable + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. + \getfilename{#4}% + % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \edef\pdfxrefdest{#1}% + \ifx\pdfxrefdest\empty + \def\pdfxrefdest{Top}% no empty targets + \else + \txiescapepdf\pdfxrefdest % escape PDF special chars + \fi + % + \leavevmode + \startlink attr{/Border [0 0 0]}% + \ifnum\filenamelength>0 + goto file{\the\filename.pdf} name{\pdfxrefdest}% + \else + goto name{\pdfmkpgn{\pdfxrefdest}}% + \fi + }% + \setcolor{\linkcolor}% + \fi + % + % Float references are printed completely differently: "Figure 1.2" + % instead of "[somenode], p.3". We distinguish them by the + % LABEL-title being set to a magic string. + {% + % Have to otherify everything special to allow the \csname to + % include an _ in the xref name, etc. + \indexnofonts + \turnoffactive + \expandafter\global\expandafter\let\expandafter\Xthisreftitle + \csname XR#1-title\endcsname + }% + \iffloat\Xthisreftitle + % If the user specified the print name (third arg) to the ref, + % print it instead of our usual "Figure 1.2". + \ifdim\wd\printedrefnamebox = 0pt + \refx{#1-snt}{}% + \else + \printedrefname + \fi + % + % If the user also gave the printed manual name (fifth arg), append + % "in MANUALNAME". + \ifdim \wd\printedmanualbox > 0pt + \space \putwordin{} \cite{\printedmanual}% + \fi + \else + % node/anchor (non-float) references. + % + % If we use \unhbox to print the node names, TeX does not insert + % empty discretionaries after hyphens, which means that it will not + % find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, + % this is a loss. Therefore, we give the text of the node name + % again, so it is as if TeX is seeing it for the first time. + % + \ifdim \wd\printedmanualbox > 0pt + % Cross-manual reference with a printed manual name. + % + \crossmanualxref{\cite{\printedmanual\unskip}}% + % + \else\ifdim \wd\infofilenamebox > 0pt + % Cross-manual reference with only an info filename (arg 4), no + % printed manual name (arg 5). This is essentially the same as + % the case above; we output the filename, since we have nothing else. + % + \crossmanualxref{\code{\infofilename\unskip}}% + % + \else + % Reference within this manual. + % + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand + % into the usual \leavevmode...\vrule stuff for purposes of + % printing. So we \turnoffactive for the \refx-snt, back on for the + % printing, back off for the \refx-pg. + {\turnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% + % output the `[mynode]' via the macro below so it can be overridden. + \xrefprintnodename\printedrefname + % + % But we always want a comma and a space: + ,\space + % + % output the `page 3'. + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \ifx,\tokenafterxref + \else\ifx.\tokenafterxref + \else\ifx;\tokenafterxref + \else\ifx)\tokenafterxref + \else,% add a , if xref not followed by punctuation + \fi\fi\fi\fi + \fi\fi + \fi + \endlink +\endgroup} + +% Output a cross-manual xref to #1. Used just above (twice). +% +% Only include the text "Section ``foo'' in" if the foo is neither +% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply +% "see The Foo Manual", the idea being to refer to the whole manual. +% +% But, this being TeX, we can't easily compare our node name against the +% string "Top" while ignoring the possible spaces before and after in +% the input. By adding the arbitrary 7sp below, we make it much less +% likely that a real node name would have the same width as "Top" (e.g., +% in a monospaced font). Hopefully it will never happen in practice. +% +% For the same basic reason, we retypeset the "Top" at every +% reference, since the current font is indeterminate. +% +\def\crossmanualxref#1{% + \setbox\toprefbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp % nonempty? + \ifdim \wd2 = \wd\toprefbox \else % same as Top? + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + #1% +} + +% This macro is called from \xrefX for the `[nodename]' part of xref +% output. It's a separate macro only so it can be changed more easily, +% since square brackets don't work well in some documents. Particularly +% one that Bob is working on :). +% +\def\xrefprintnodename#1{[#1]} + +% Things referred to by \setref. +% +\def\Ynothing{} +\def\Yomitfromtoc{} +\def\Ynumbered{% + \ifnum\secno=0 + \putwordChapter@tie \the\chapno + \else \ifnum\subsecno=0 + \putwordSection@tie \the\chapno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno + \else + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} +\def\Yappendix{% + \ifnum\secno=0 + \putwordAppendix@tie @char\the\appendixno{}% + \else \ifnum\subsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno + \else + \putwordSection@tie + @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} + +% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. +% If its value is nonempty, SUFFIX is output afterward. +% +\def\refx#1#2{% + \requireauxfile + {% + \indexnofonts + \otherbackslash + \expandafter\global\expandafter\let\expandafter\thisrefX + \csname XR#1\endcsname + }% + \ifx\thisrefX\relax + % If not defined, say something at least. + \angleleft un\-de\-fined\angleright + \iflinks + \ifhavexrefs + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% + \else + \ifwarnedxrefs\else + \global\warnedxrefstrue + \message{Cross reference values unknown; you must run TeX again.}% + \fi + \fi + \fi + \else + % It's defined, so just use it. + \thisrefX + \fi + #2% Output the suffix in any case. +} + +% This is the macro invoked by entries in the aux file. Usually it's +% just a \def (we prepend XR to the control sequence name to avoid +% collisions). But if this is a float type, we have more work to do. +% +\def\xrdef#1#2{% + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref + % + % Was that xref control sequence that we just defined for a float? + \expandafter\iffloat\csname XR\safexrefname\endcsname + % it was a float, and we have the (safe) float type in \iffloattype. + \expandafter\let\expandafter\floatlist + \csname floatlist\iffloattype\endcsname + % + % Is this the first time we've seen this float type? + \expandafter\ifx\floatlist\relax + \toks0 = {\do}% yes, so just \do + \else + % had it before, so preserve previous elements in list. + \toks0 = \expandafter{\floatlist\do}% + \fi + % + % Remember this xref in the control sequence \floatlistFLOATTYPE, + % for later use in \listoffloats. + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% + \fi +} + +% If working on a large document in chapters, it is convenient to +% be able to disable indexing, cross-referencing, and contents, for test runs. +% This is done with @novalidate at the beginning of the file. +% +\newif\iflinks \linkstrue % by default we want the aux files. +\let\novalidate = \linksfalse + +% Used when writing to the aux file, or when using data from it. +\def\requireauxfile{% + \iflinks + \tryauxfile + % Open the new aux file. TeX will close it automatically at exit. + \immediate\openout\auxfile=\jobname.aux + \fi + \global\let\requireauxfile=\relax % Only do this once. +} + +% Read the last existing aux file, if any. No error if none exists. +% +\def\tryauxfile{% + \openin 1 \jobname.aux + \ifeof 1 \else + \readdatafile{aux}% + \global\havexrefstrue + \fi + \closein 1 +} + +\def\setupdatafile{% + \catcode`\^^@=\other + \catcode`\^^A=\other + \catcode`\^^B=\other + \catcode`\^^C=\other + \catcode`\^^D=\other + \catcode`\^^E=\other + \catcode`\^^F=\other + \catcode`\^^G=\other + \catcode`\^^H=\other + \catcode`\^^K=\other + \catcode`\^^L=\other + \catcode`\^^N=\other + \catcode`\^^P=\other + \catcode`\^^Q=\other + \catcode`\^^R=\other + \catcode`\^^S=\other + \catcode`\^^T=\other + \catcode`\^^U=\other + \catcode`\^^V=\other + \catcode`\^^W=\other + \catcode`\^^X=\other + \catcode`\^^Z=\other + \catcode`\^^[=\other + \catcode`\^^\=\other + \catcode`\^^]=\other + \catcode`\^^^=\other + \catcode`\^^_=\other + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. + % in xref tags, i.e., node names. But since ^^e4 notation isn't + % supported in the main text, it doesn't seem desirable. Furthermore, + % that is not enough: for node names that actually contain a ^ + % character, we would end up writing a line like this: 'xrdef {'hat + % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first + % argument, and \hat is not an expandable control sequence. It could + % all be worked out, but why? Either we support ^^ or we don't. + % + % The other change necessary for this was to define \auxhat: + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... + \catcode`\~=\other + \catcode`\[=\other + \catcode`\]=\other + \catcode`\"=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\$=\other + \catcode`\#=\other + \catcode`\&=\other + \catcode`\%=\other + \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % + % This is to support \ in node names and titles, since the \ + % characters end up in a \csname. It's easier than + % leaving it active and making its active definition an actual \ + % character. What I don't understand is why it works in the *value* + % of the xrdef. Seems like it should be a catcode12 \, and that + % should not typeset properly. But it works, so I'm moving on for + % now. --karl, 15jan04. + \catcode`\\=\other + % + % Make the characters 128-255 be printing characters. + {\setnonasciicharscatcodenonglobal\other}% + % + % @ is our escape character in .aux files, and we need braces. + \catcode`\{=1 + \catcode`\}=2 + \catcode`\@=0 +} + +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 +\endgroup} + + +\message{insertions,} +% including footnotes. + +\newcount \footnoteno + +% The trailing space in the following definition for supereject is +% vital for proper filling; pages come out unaligned when you do a +% pagealignmacro call if that space before the closing brace is +% removed. (Generally, numeric constants should always be followed by a +% space to prevent strange expansion errors.) +\def\supereject{\par\penalty -20000\footnoteno =0 } + +% @footnotestyle is meaningful for Info output only. +\let\footnotestyle=\comment + +{\catcode `\@=11 +% +% Auto-number footnotes. Otherwise like plain. +\gdef\footnote{% + \global\advance\footnoteno by \@ne + \edef\thisfootno{$^{\the\footnoteno}$}% + % + % In case the footnote comes at the end of a sentence, preserve the + % extra spacing after we do the footnote number. + \let\@sf\empty + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi + % + % Remove inadvertent blank space before typesetting the footnote number. + \unskip + \thisfootno\@sf + \dofootnote +}% + +% Don't bother with the trickery in plain.tex to not require the +% footnote text as a parameter. Our footnotes don't need to be so general. +% +% Oh yes, they do; otherwise, @ifset (and anything else that uses +% \parseargline) fails inside footnotes because the tokens are fixed when +% the footnote is read. --karl, 16nov96. +% +\gdef\dofootnote{% + \insert\footins\bgroup + % + % Nested footnotes are not supported in TeX, that would take a lot + % more work. (\startsavinginserts does not suffice.) + \let\footnote=\errfootnotenest + % + % We want to typeset this text as a normal paragraph, even if the + % footnote reference occurs in (for example) a display environment. + % So reset some parameters. + \hsize=\pagewidth + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip + \rightskip\z@skip + \spaceskip\z@skip + \xspaceskip\z@skip + \parindent\defaultparindent + % + \smallfonts \rm + % + % Because we use hanging indentation in footnotes, a @noindent appears + % to exdent this text, so make it be a no-op. makeinfo does not use + % hanging indentation so @noindent can still be needed within footnote + % text after an @example or the like (not that this is good style). + \let\noindent = \relax + % + % Hang the footnote text off the number. Use \everypar in case the + % footnote extends for more than one paragraph. + \everypar = {\hang}% + \textindent{\thisfootno}% + % + % Don't crash into the line above the footnote text. Since this + % expands into a box, it must come within the paragraph, lest it + % provide a place where TeX can split the footnote. + \footstrut + % + % Invoke rest of plain TeX footnote routine. + \futurelet\next\fo@t +} +}%end \catcode `\@=11 + +\def\errfootnotenest{% + \errhelp=\EMsimple + \errmessage{Nested footnotes not supported in texinfo.tex, + even though they work in makeinfo; sorry} +} + +\def\errfootnoteheading{% + \errhelp=\EMsimple + \errmessage{Footnotes in chapters, sections, etc., are not supported} +} + +% In case a @footnote appears in a vbox, save the footnote text and create +% the real \insert just after the vbox finished. Otherwise, the insertion +% would be lost. +% Similarly, if a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is finished. +% And the same can be done for other insert classes. --kasal, 16nov03. +% +% Replace the \insert primitive by a cheating macro. +% Deeper inside, just make sure that the saved insertions are not spilled +% out prematurely. +% +\def\startsavinginserts{% + \ifx \insert\ptexinsert + \let\insert\saveinsert + \else + \let\checkinserts\relax + \fi +} + +% This \insert replacement works for both \insert\footins{foo} and +% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. +% +\def\saveinsert#1{% + \edef\next{\noexpand\savetobox \makeSAVEname#1}% + \afterassignment\next + % swallow the left brace + \let\temp = +} +\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} +\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} + +\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} + +\def\placesaveins#1{% + \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname + {\box#1}% +} + +% eat @SAVE -- beware, all of them have catcode \other: +{ + \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) + \gdef\gobblesave @SAVE{} +} + +% initialization: +\def\newsaveins #1{% + \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% + \next +} +\def\newsaveinsX #1{% + \csname newbox\endcsname #1% + \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts + \checksaveins #1}% +} + +% initialize: +\let\checkinserts\empty +\newsaveins\footins +\newsaveins\margin + + +% @image. We use the macros from epsf.tex to support this. +% If epsf.tex is not installed and @image is used, we complain. +% +% Check for and read epsf.tex up front. If we read it only at @image +% time, we might be inside a group, and then its definitions would get +% undone and the next image would fail. +\openin 1 = epsf.tex +\ifeof 1 \else + % Do not bother showing banner with epsf.tex v2.7k (available in + % doc/epsf.tex and on ctan). + \def\epsfannounce{\toks0 = }% + \input epsf.tex +\fi +\closein 1 +% +% We will only complain once about lack of epsf.tex. +\newif\ifwarnednoepsf +\newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://tug.org/tex/epsf.tex.} +% +\def\image#1{% + \ifx\epsfbox\thisisundefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,,,\finish + \fi +} +% +% Arguments to @image: +% #1 is (mandatory) image filename; we tack on .eps extension. +% #2 is (optional) width, #3 is (optional) height. +% #4 is (ignored optional) html alt text. +% #5 is (ignored optional) extension. +% #6 is just the usual extra ignored arg for parsing stuff. +\newif\ifimagevmode +\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup + \catcode`\^^M = 5 % in case we're inside an example + \normalturnoffactive % allow _ et al. in names + \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro + % If the image is by itself, center it. + \ifvmode + \imagevmodetrue + \else \ifx\centersub\centerV + % for @center @image, we need a vbox so we can have our vertical space + \imagevmodetrue + \vbox\bgroup % vbox has better behavior than vtop herev + \fi\fi + % + \ifimagevmode + \nobreak\medskip + % Usually we'll have text after the image which will insert + % \parskip glue, so insert it here too to equalize the space + % above and below. + \nobreak\vskip\parskip + \nobreak + \fi + % + % Leave vertical mode so that indentation from an enclosing + % environment such as @quotation is respected. + % However, if we're at the top level, we don't want the + % normal paragraph indentation. + % On the other hand, if we are in the case of @center @image, we don't + % want to start a paragraph, which will create a hsize-width box and + % eradicate the centering. + \ifx\centersub\centerV\else \noindent \fi + % + % Output the image. + \ifpdf + \dopdfimage{#1}{#2}{#3}% + \else + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + \fi + % + \ifimagevmode + \medskip % space after a standalone image + \fi + \ifx\centersub\centerV \egroup \fi +\endgroup} + + +% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, +% etc. We don't actually implement floating yet, we always include the +% float "here". But it seemed the best name for the future. +% +\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} + +% There may be a space before second and/or third parameter; delete it. +\def\eatcommaspace#1, {#1,} + +% #1 is the optional FLOATTYPE, the text label for this float, typically +% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, +% this float will not be numbered and cannot be referred to. +% +% #2 is the optional xref label. Also must be present for the float to +% be referable. +% +% #3 is the optional positioning argument; for now, it is ignored. It +% will somehow specify the positions allowed to float to (here, top, bottom). +% +% We keep a separate counter for each FLOATTYPE, which we reset at each +% chapter-level command. +\let\resetallfloatnos=\empty +% +\def\dofloat#1,#2,#3,#4\finish{% + \let\thiscaption=\empty + \let\thisshortcaption=\empty + % + % don't lose footnotes inside @float. + % + % BEWARE: when the floats start float, we have to issue warning whenever an + % insert appears inside a float which could possibly float. --kasal, 26may04 + % + \startsavinginserts + % + % We can't be used inside a paragraph. + \par + % + \vtop\bgroup + \def\floattype{#1}% + \def\floatlabel{#2}% + \def\floatloc{#3}% we do nothing with this yet. + % + \ifx\floattype\empty + \let\safefloattype=\empty + \else + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + \fi + % + % If label is given but no type, we handle that as the empty type. + \ifx\floatlabel\empty \else + % We want each FLOATTYPE to be numbered separately (Figure 1, + % Table 1, Figure 2, ...). (And if no label, no number.) + % + \expandafter\getfloatno\csname\safefloattype floatno\endcsname + \global\advance\floatno by 1 + % + {% + % This magic value for \lastsection is output by \setref as the + % XREFLABEL-title value. \xrefX uses it to distinguish float + % labels (which have a completely different output format) from + % node and anchor labels. And \xrdef uses it to construct the + % lists of floats. + % + \edef\lastsection{\floatmagic=\safefloattype}% + \setref{\floatlabel}{Yfloat}% + }% + \fi + % + % start with \parskip glue, I guess. + \vskip\parskip + % + % Don't suppress indentation if a float happens to start a section. + \restorefirstparagraphindent +} + +% we have these possibilities: +% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap +% @float Foo,lbl & no caption: Foo 1.1 +% @float Foo & @caption{Cap}: Foo: Cap +% @float Foo & no caption: Foo +% @float ,lbl & Caption{Cap}: 1.1: Cap +% @float ,lbl & no caption: 1.1 +% @float & @caption{Cap}: Cap +% @float & no caption: +% +\def\Efloat{% + \let\floatident = \empty + % + % In all cases, if we have a float type, it comes first. + \ifx\floattype\empty \else \def\floatident{\floattype}\fi + % + % If we have an xref label, the number comes next. + \ifx\floatlabel\empty \else + \ifx\floattype\empty \else % if also had float type, need tie first. + \appendtomacro\floatident{\tie}% + \fi + % the number. + \appendtomacro\floatident{\chaplevelprefix\the\floatno}% + \fi + % + % Start the printed caption with what we've constructed in + % \floatident, but keep it separate; we need \floatident again. + \let\captionline = \floatident + % + \ifx\thiscaption\empty \else + \ifx\floatident\empty \else + \appendtomacro\captionline{: }% had ident, so need a colon between + \fi + % + % caption text. + \appendtomacro\captionline{\scanexp\thiscaption}% + \fi + % + % If we have anything to print, print it, with space before. + % Eventually this needs to become an \insert. + \ifx\captionline\empty \else + \vskip.5\parskip + \captionline + % + % Space below caption. + \vskip\parskip + \fi + % + % If have an xref label, write the list of floats info. Do this + % after the caption, to avoid chance of it being a breakpoint. + \ifx\floatlabel\empty \else + % Write the text that goes in the lof to the aux file as + % \floatlabel-lof. Besides \floatident, we include the short + % caption if specified, else the full caption if specified, else nothing. + {% + \requireauxfile + \atdummies + % + % since we read the caption text in the macro world, where ^^M + % is turned into a normal character, we have to scan it back, so + % we don't write the literal three characters "^^M" into the aux file. + \scanexp{% + \xdef\noexpand\gtemp{% + \ifx\thisshortcaption\empty + \thiscaption + \else + \thisshortcaption + \fi + }% + }% + \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident + \ifx\gtemp\empty \else : \gtemp \fi}}% + }% + \fi + \egroup % end of \vtop + % + % place the captured inserts + % + % BEWARE: when the floats start floating, we have to issue warning + % whenever an insert appears inside a float which could possibly + % float. --kasal, 26may04 + % + \checkinserts +} + +% Append the tokens #2 to the definition of macro #1, not expanding either. +% +\def\appendtomacro#1#2{% + \expandafter\def\expandafter#1\expandafter{#1#2}% +} + +% @caption, @shortcaption +% +\def\caption{\docaption\thiscaption} +\def\shortcaption{\docaption\thisshortcaption} +\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} +\def\defcaption#1#2{\egroup \def#1{#2}} + +% The parameter is the control sequence identifying the counter we are +% going to use. Create it if it doesn't exist and assign it to \floatno. +\def\getfloatno#1{% + \ifx#1\relax + % Haven't seen this figure type before. + \csname newcount\endcsname #1% + % + % Remember to reset this floatno at the next chap. + \expandafter\gdef\expandafter\resetallfloatnos + \expandafter{\resetallfloatnos #1=0 }% + \fi + \let\floatno#1% +} + +% \setref calls this to get the XREFLABEL-snt value. We want an @xref +% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we +% first read the @float command. +% +\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% + +% Magic string used for the XREFLABEL-title value, so \xrefX can +% distinguish floats from other xref types. +\def\floatmagic{!!float!!} + +% #1 is the control sequence we are passed; we expand into a conditional +% which is true if #1 represents a float ref. That is, the magic +% \lastsection value which we \setref above. +% +\def\iffloat#1{\expandafter\doiffloat#1==\finish} +% +% #1 is (maybe) the \floatmagic string. If so, #2 will be the +% (safe) float type for this float. We set \iffloattype to #2. +% +\def\doiffloat#1=#2=#3\finish{% + \def\temp{#1}% + \def\iffloattype{#2}% + \ifx\temp\floatmagic +} + +% @listoffloats FLOATTYPE - print a list of floats like a table of contents. +% +\parseargdef\listoffloats{% + \def\floattype{#1}% floattype + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + % + % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. + \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax + \ifhavexrefs + % if the user said @listoffloats foo but never @float foo. + \message{\linenumber No `\safefloattype' floats to list.}% + \fi + \else + \begingroup + \leftskip=\tocindent % indent these entries like a toc + \let\do=\listoffloatsdo + \csname floatlist\safefloattype\endcsname + \endgroup + \fi +} + +% This is called on each entry in a list of floats. We're passed the +% xref label, in the form LABEL-title, which is how we save it in the +% aux file. We strip off the -title and look up \XRLABEL-lof, which +% has the text we're supposed to typeset here. +% +% Figures without xref labels will not be included in the list (since +% they won't appear in the aux file). +% +\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} +\def\listoffloatsdoentry#1-title\finish{{% + % Can't fully expand XR#1-lof because it can contain anything. Just + % pass the control sequence. On the other hand, XR#1-pg is just the + % page number, and we want to fully expand that so we can get a link + % in pdf output. + \toksA = \expandafter{\csname XR#1-lof\endcsname}% + % + % use the same \entry macro we use to generate the TOC and index. + \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% + \writeentry +}} + + +\message{localization,} + +% For single-language documents, @documentlanguage is usually given very +% early, just after @documentencoding. Single argument is the language +% (de) or locale (de_DE) abbreviation. +% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{% + \tex % read txi-??.tex file in plain TeX. + % Read the file by the name they passed if it exists. + \let_ = \normalunderscore % normal _ character for filename test + \openin 1 txi-#1.tex + \ifeof 1 + \documentlanguagetrywithoutunderscore #1_\finish + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 + \endgroup % end raw TeX +} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex + \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 +} +}% end of special _ catcode +% +\newhelp\nolanghelp{The given language definition file cannot be found or +is empty. Maybe you need to install it? Putting it in the current +directory should work if nowhere else does.} + +% This macro is called from txi-??.tex files; the first argument is the +% \language name to set (without the "\lang@" prefix), the second and +% third args are \{left,right}hyphenmin. +% +% The language names to pass are determined when the format is built. +% See the etex.log file created at that time, e.g., +% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. +% +% With TeX Live 2008, etex now includes hyphenation patterns for all +% available languages. This means we can support hyphenation in +% Texinfo, at least to some extent. (This still doesn't solve the +% accented characters problem.) +% +\catcode`@=11 +\def\txisetlanguage#1#2#3{% + % do not set the language if the name is undefined in the current TeX. + \expandafter\ifx\csname lang@#1\endcsname \relax + \message{no patterns for #1}% + \else + \global\language = \csname lang@#1\endcsname + \fi + % but there is no harm in adjusting the hyphenmin values regardless. + \global\lefthyphenmin = #2\relax + \global\righthyphenmin = #3\relax +} + +% Helpers for encodings. +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz} +\def\documentencodingzzz#1{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + % since we already invoked \utfeightchardefs at the top level + % (below), do not re-invoke it, then our check for duplicated + % definitions triggers. Making non-ascii chars active is enough. + % + \else + \message{Ignoring unknown document encoding: #1.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} + +% emacs-page +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing, sorry: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{\tie} + \gdef^^a1{\exclamdown} + \gdef^^a2{{\tcfont \char162}} % cent + \gdef^^a3{\pounds} + \gdef^^a4{{\tcfont \char164}} % currency + \gdef^^a5{{\tcfont \char165}} % yen + \gdef^^a6{{\tcfont \char166}} % broken bar + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\guillemetleft} + \gdef^^ac{\ensuremath\lnot} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + \gdef^^b7{\ensuremath\cdot} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + \gdef^^bb{\guillemetright} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\DH} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\TH} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\dh} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\th} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{\tie} + \gdef^^a1{\ogonek{A}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\ogonek{a}} + \gdef^^b2{\ogonek{ }} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\ogonek{E}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\DH} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\ogonek{e}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'{\dotless{i}}} + \gdef^^ee{\^{\dotless{i}}} + \gdef^^ef{\v d} + % + \gdef^^f0{\dh} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\def\globallet{\global\let} % save some \expandafter's below + +% @U{xxxx} to produce U+xxxx, if we support it. +\def\U#1{% + \expandafter\ifx\csname uni:#1\endcsname \relax + \errhelp = \EMsimple + \errmessage{Unicode character U+#1 not supported, sorry}% + \else + \csname uni:#1\endcsname + \fi +} + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + % + \expandafter\ifx\csname uni:#1\endcsname \relax \else + \message{Internal error, already defined: #1}% + \fi + % + % define an additional control sequence for this code point. + \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M +% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) +% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) +% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A +% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B +% +% Many of our renditions are less than wonderful, and all the missing +% characters are available somewhere. Loading the necessary fonts +% awaits user request. We can't truly support Unicode without +% reimplementing everything that's been done in LaTeX for many years, +% plus probably using luatex or xetex, and who knows what else. +% We won't be doing that here in this simple file. But we can try to at +% least make most of the characters not bomb out. +% +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency + \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen + \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar + \DeclareUnicodeCharacter{00A7}{\S} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B1}{\ensuremath\pm} + \DeclareUnicodeCharacter{00B2}{$^2$} + \DeclareUnicodeCharacter{00B3}{$^3$} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B5}{$\mu$} + \DeclareUnicodeCharacter{00B6}{\P} + \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00B9}{$^1$} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BC}{$1\over4$} + \DeclareUnicodeCharacter{00BD}{$1\over2$} + \DeclareUnicodeCharacter{00BE}{$3\over4$} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D0}{\DH} + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D7}{\ensuremath\times} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DE}{\TH} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F0}{\dh} + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F7}{\ensuremath\div} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FE}{\th} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0104}{\ogonek{A}} + \DeclareUnicodeCharacter{0105}{\ogonek{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + \DeclareUnicodeCharacter{010F}{d'} + + \DeclareUnicodeCharacter{0110}{\DH} + \DeclareUnicodeCharacter{0111}{\dh} + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0122}{\cedilla{G}} + \DeclareUnicodeCharacter{0123}{\cedilla{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}} + \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + \DeclareUnicodeCharacter{012E}{\ogonek{I}} + \DeclareUnicodeCharacter{012F}{\ogonek{i}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0136}{\cedilla{K}} + \DeclareUnicodeCharacter{0137}{\cedilla{k}} + \DeclareUnicodeCharacter{0138}{\ensuremath\kappa} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + \DeclareUnicodeCharacter{013B}{\cedilla{L}} + \DeclareUnicodeCharacter{013C}{\cedilla{l}} + \DeclareUnicodeCharacter{013D}{L'}% should kern + \DeclareUnicodeCharacter{013E}{l'}% should kern + \DeclareUnicodeCharacter{013F}{L\U{00B7}} + + \DeclareUnicodeCharacter{0140}{l\U{00B7}} + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0145}{\cedilla{N}} + \DeclareUnicodeCharacter{0146}{\cedilla{n}} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{0149}{'n} + \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}} + \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0156}{\cedilla{R}} + \DeclareUnicodeCharacter{0157}{\cedilla{r}} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{T}} + \DeclareUnicodeCharacter{0163}{\cedilla{t}} + \DeclareUnicodeCharacter{0164}{\v{T}} + \DeclareUnicodeCharacter{0165}{\v{t}} + \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}} + \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}} + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0172}{\ogonek{U}} + \DeclareUnicodeCharacter{0173}{\ogonek{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{02DB}{\ogonek{ }} + + % Greek letters upper case + \DeclareUnicodeCharacter{0391}{{\it A}} + \DeclareUnicodeCharacter{0392}{{\it B}} + \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}} + \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}} + \DeclareUnicodeCharacter{0395}{{\it E}} + \DeclareUnicodeCharacter{0396}{{\it Z}} + \DeclareUnicodeCharacter{0397}{{\it H}} + \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}} + \DeclareUnicodeCharacter{0399}{{\it I}} + \DeclareUnicodeCharacter{039A}{{\it K}} + \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}} + \DeclareUnicodeCharacter{039C}{{\it M}} + \DeclareUnicodeCharacter{039D}{{\it N}} + \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}} + \DeclareUnicodeCharacter{039F}{{\it O}} + \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}} + \DeclareUnicodeCharacter{03A1}{{\it P}} + %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma + \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}} + \DeclareUnicodeCharacter{03A4}{{\it T}} + \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}} + \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}} + \DeclareUnicodeCharacter{03A7}{{\it X}} + \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}} + \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}} + + % Vowels with accents + \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}} + \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}} + \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}} + \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}} + \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}} + \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}} + + % Standalone accent + \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}} + + % Greek letters lower case + \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha} + \DeclareUnicodeCharacter{03B2}{\ensuremath\beta} + \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma} + \DeclareUnicodeCharacter{03B4}{\ensuremath\delta} + \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon} + \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta} + \DeclareUnicodeCharacter{03B7}{\ensuremath\eta} + \DeclareUnicodeCharacter{03B8}{\ensuremath\theta} + \DeclareUnicodeCharacter{03B9}{\ensuremath\iota} + \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa} + \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda} + \DeclareUnicodeCharacter{03BC}{\ensuremath\mu} + \DeclareUnicodeCharacter{03BD}{\ensuremath\nu} + \DeclareUnicodeCharacter{03BE}{\ensuremath\xi} + \DeclareUnicodeCharacter{03BF}{{\it o}} % omicron + \DeclareUnicodeCharacter{03C0}{\ensuremath\pi} + \DeclareUnicodeCharacter{03C1}{\ensuremath\rho} + \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma} + \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma} + \DeclareUnicodeCharacter{03C4}{\ensuremath\tau} + \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon} + \DeclareUnicodeCharacter{03C6}{\ensuremath\phi} + \DeclareUnicodeCharacter{03C7}{\ensuremath\chi} + \DeclareUnicodeCharacter{03C8}{\ensuremath\psi} + \DeclareUnicodeCharacter{03C9}{\ensuremath\omega} + + % More Greek vowels with accents + \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}} + \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}} + \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}} + \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}} + \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}} + + % Variant Greek letters + \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta} + \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi} + \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + % Punctuation + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2018}{\quoteleft} + \DeclareUnicodeCharacter{2019}{\quoteright} + \DeclareUnicodeCharacter{201A}{\quotesinglbase} + \DeclareUnicodeCharacter{201C}{\quotedblleft} + \DeclareUnicodeCharacter{201D}{\quotedblright} + \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2020}{\ensuremath\dagger} + \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{202F}{\thinspace} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{2039}{\guilsinglleft} + \DeclareUnicodeCharacter{203A}{\guilsinglright} + + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + % Mathematical symbols + \DeclareUnicodeCharacter{2200}{\ensuremath\forall} + \DeclareUnicodeCharacter{2203}{\ensuremath\exists} + \DeclareUnicodeCharacter{2208}{\ensuremath\in} + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\ast} + \DeclareUnicodeCharacter{221E}{\ensuremath\infty} + \DeclareUnicodeCharacter{2225}{\ensuremath\parallel} + \DeclareUnicodeCharacter{2227}{\ensuremath\wedge} + \DeclareUnicodeCharacter{2229}{\ensuremath\cap} + \DeclareUnicodeCharacter{2261}{\equiv} + \DeclareUnicodeCharacter{2264}{\ensuremath\leq} + \DeclareUnicodeCharacter{2265}{\ensuremath\geq} + \DeclareUnicodeCharacter{2282}{\ensuremath\subset} + \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq} + + \DeclareUnicodeCharacter{2016}{\ensuremath\Vert} + \DeclareUnicodeCharacter{2032}{\ensuremath\prime} + \DeclareUnicodeCharacter{210F}{\ensuremath\hbar} + \DeclareUnicodeCharacter{2111}{\ensuremath\Im} + \DeclareUnicodeCharacter{2113}{\ensuremath\ell} + \DeclareUnicodeCharacter{2118}{\ensuremath\wp} + \DeclareUnicodeCharacter{211C}{\ensuremath\Re} + \DeclareUnicodeCharacter{2127}{\ensuremath\mho} + \DeclareUnicodeCharacter{2135}{\ensuremath\aleph} + \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow} + \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow} + \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow} + \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow} + \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow} + \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow} + \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow} + \DeclareUnicodeCharacter{2198}{\ensuremath\searrow} + \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow} + \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto} + \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow} + \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow} + \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup} + \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown} + \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright} + \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup} + \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown} + \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons} + \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow} + \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow} + \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow} + \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow} + \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow} + \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto} + \DeclareUnicodeCharacter{2201}{\ensuremath\complement} + \DeclareUnicodeCharacter{2202}{\ensuremath\partial} + \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset} + \DeclareUnicodeCharacter{2207}{\ensuremath\nabla} + \DeclareUnicodeCharacter{2209}{\ensuremath\notin} + \DeclareUnicodeCharacter{220B}{\ensuremath\owns} + \DeclareUnicodeCharacter{220F}{\ensuremath\prod} + \DeclareUnicodeCharacter{2210}{\ensuremath\coprod} + \DeclareUnicodeCharacter{2211}{\ensuremath\sum} + \DeclareUnicodeCharacter{2213}{\ensuremath\mp} + \DeclareUnicodeCharacter{2218}{\ensuremath\circ} + \DeclareUnicodeCharacter{221A}{\ensuremath\surd} + \DeclareUnicodeCharacter{221D}{\ensuremath\propto} + \DeclareUnicodeCharacter{2220}{\ensuremath\angle} + \DeclareUnicodeCharacter{2223}{\ensuremath\mid} + \DeclareUnicodeCharacter{2228}{\ensuremath\vee} + \DeclareUnicodeCharacter{222A}{\ensuremath\cup} + \DeclareUnicodeCharacter{222B}{\ensuremath\smallint} + \DeclareUnicodeCharacter{222E}{\ensuremath\oint} + \DeclareUnicodeCharacter{223C}{\ensuremath\sim} + \DeclareUnicodeCharacter{2240}{\ensuremath\wr} + \DeclareUnicodeCharacter{2243}{\ensuremath\simeq} + \DeclareUnicodeCharacter{2245}{\ensuremath\cong} + \DeclareUnicodeCharacter{2248}{\ensuremath\approx} + \DeclareUnicodeCharacter{224D}{\ensuremath\asymp} + \DeclareUnicodeCharacter{2250}{\ensuremath\doteq} + \DeclareUnicodeCharacter{2260}{\ensuremath\neq} + \DeclareUnicodeCharacter{226A}{\ensuremath\ll} + \DeclareUnicodeCharacter{226B}{\ensuremath\gg} + \DeclareUnicodeCharacter{227A}{\ensuremath\prec} + \DeclareUnicodeCharacter{227B}{\ensuremath\succ} + \DeclareUnicodeCharacter{2283}{\ensuremath\supset} + \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq} + \DeclareUnicodeCharacter{228E}{\ensuremath\uplus} + \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset} + \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset} + \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq} + \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq} + \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap} + \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup} + \DeclareUnicodeCharacter{2295}{\ensuremath\oplus} + \DeclareUnicodeCharacter{2296}{\ensuremath\ominus} + \DeclareUnicodeCharacter{2297}{\ensuremath\otimes} + \DeclareUnicodeCharacter{2298}{\ensuremath\oslash} + \DeclareUnicodeCharacter{2299}{\ensuremath\odot} + \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash} + \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv} + \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop} + \DeclareUnicodeCharacter{22A5}{\ensuremath\bot} + \DeclareUnicodeCharacter{22A8}{\ensuremath\models} + \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd} + \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd} + \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge} + \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee} + \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap} + \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup} + \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond} + \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot} + \DeclareUnicodeCharacter{22C6}{\ensuremath\star} + \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie} + \DeclareUnicodeCharacter{2308}{\ensuremath\lceil} + \DeclareUnicodeCharacter{2309}{\ensuremath\rceil} + \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor} + \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor} + \DeclareUnicodeCharacter{2322}{\ensuremath\frown} + \DeclareUnicodeCharacter{2323}{\ensuremath\smile} + + \DeclareUnicodeCharacter{25A1}{\ensuremath\Box} + \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle} + \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright} + \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown} + \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft} + \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond} + \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit} + \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit} + \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit} + \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit} + \DeclareUnicodeCharacter{266D}{\ensuremath\flat} + \DeclareUnicodeCharacter{266E}{\ensuremath\natural} + \DeclareUnicodeCharacter{266F}{\ensuremath\sharp} + \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc} + \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle} + \DeclareUnicodeCharacter{27C2}{\ensuremath\perp} + \DeclareUnicodeCharacter{27E8}{\ensuremath\langle} + \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow} + \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow} + \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow} + \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto} + \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus} + \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot} + \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus} + \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes} + \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus} + \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup} + \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join} + \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg} + \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq} + \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq} + + \global\mathchardef\checkmark="1370 % actually the square root sign + \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark} +}% end of \utfeightchardefs + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Latin1 (ISO-8859-1) character definitions. +\def\nonasciistringdefs{% + \setnonasciicharscatcode\active + \def\defstringchar##1{\def##1{\string##1}}% + % + \defstringchar^^80\defstringchar^^81\defstringchar^^82\defstringchar^^83% + \defstringchar^^84\defstringchar^^85\defstringchar^^86\defstringchar^^87% + \defstringchar^^88\defstringchar^^89\defstringchar^^8a\defstringchar^^8b% + \defstringchar^^8c\defstringchar^^8d\defstringchar^^8e\defstringchar^^8f% + % + \defstringchar^^90\defstringchar^^91\defstringchar^^92\defstringchar^^93% + \defstringchar^^94\defstringchar^^95\defstringchar^^96\defstringchar^^97% + \defstringchar^^98\defstringchar^^99\defstringchar^^9a\defstringchar^^9b% + \defstringchar^^9c\defstringchar^^9d\defstringchar^^9e\defstringchar^^9f% + % + \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3% + \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7% + \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab% + \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af% + % + \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3% + \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7% + \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb% + \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf% + % + \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3% + \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7% + \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb% + \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf% + % + \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3% + \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7% + \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db% + \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df% + % + \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3% + \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7% + \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb% + \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef% + % + \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3% + \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7% + \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb% + \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff% +} + + +% define all the unicode characters we know about, for the sake of @U. +\utfeightchardefs + + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + +\newdimen\defaultparindent \defaultparindent = 15pt + +\chapheadingskip = 15pt plus 4pt minus 2pt +\secheadingskip = 12pt plus 3pt minus 2pt +\subsecheadingskip = 9pt plus 2pt minus 2pt + +% Prevent underfull vbox error messages. +\vbadness = 10000 + +% Don't be very finicky about underfull hboxes, either. +\hbadness = 6666 + +% Following George Bush, get rid of widows and orphans. +\widowpenalty=10000 +\clubpenalty=10000 + +% Use TeX 3.0's \emergencystretch to help line breaking, but if we're +% using an old version of TeX, don't do anything. We want the amount of +% stretch added to depend on the line length, hence the dependence on +% \hsize. We call this whenever the paper size is set. +% +\def\setemergencystretch{% + \ifx\emergencystretch\thisisundefined + % Allow us to assign to \emergencystretch anyway. + \def\emergencystretch{\dimen0}% + \else + \emergencystretch = .15\hsize + \fi +} + +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. +% +% We also call \setleading{\textleading}, so the caller should define +% \textleading. The caller should also set \parskip. +% +\def\internalpagesizes#1#2#3#4#5#6#7#8{% + \voffset = #3\relax + \topskip = #6\relax + \splittopskip = \topskip + % + \vsize = #1\relax + \advance\vsize by \topskip + \outervsize = \vsize + \advance\outervsize by 2\topandbottommargin + \pageheight = \vsize + % + \hsize = #2\relax + \outerhsize = \hsize + \advance\outerhsize by 0.5in + \pagewidth = \hsize + % + \normaloffset = #4\relax + \bindingoffset = #5\relax + % + \ifpdf + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in + \fi + % + \setleading{\textleading} + % + \parindent = \defaultparindent + \setemergencystretch +} + +% @letterpaper (the default). +\def\letterpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % If page is nothing but text, make it come out even. + \internalpagesizes{607.2pt}{6in}% that's 46 lines + {\voffset}{.25in}% + {\bindingoffset}{36pt}% + {11in}{8.5in}% +}} + +% Use @smallbook to reset parameters for 7x9.25 trim size. +\def\smallbook{{\globaldefs = 1 + \parskip = 2pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.5in}{5in}% + {-.2in}{0in}% + {\bindingoffset}{16pt}% + {9.25in}{7in}% + % + \lispnarrowing = 0.3in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .5cm +}} + +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs = 1 + \parskip = 1.5pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing = 0.25in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .4cm +}} + +% Use @afourpaper to print on European A4 paper. +\def\afourpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % Double-side printing via postscript on Laserjet 4050 + % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. + % To change the settings for a different printer or situation, adjust + % \normaloffset until the front-side and back-side texts align. Then + % do the same for \bindingoffset. You can set these for testing in + % your texinfo source file like this: + % @tex + % \global\normaloffset = -6mm + % \global\bindingoffset = 10mm + % @end tex + \internalpagesizes{673.2pt}{160mm}% that's 51 lines + {\voffset}{\hoffset}% + {\bindingoffset}{44pt}% + {297mm}{210mm}% + % + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = 5mm +}} + +% Use @afivepaper to print on European A5 paper. +% From romildo@urano.iceb.ufop.br, 2 July 2000. +% He also recommends making @example and @lisp be small. +\def\afivepaper{{\globaldefs = 1 + \parskip = 2pt plus 1pt minus 0.1pt + \textleading = 12.5pt + % + \internalpagesizes{160mm}{120mm}% + {\voffset}{\hoffset}% + {\bindingoffset}{8pt}% + {210mm}{148mm}% + % + \lispnarrowing = 0.2in + \tolerance = 800 + \hfuzz = 1.2pt + \contentsrightmargin = 0pt + \defbodyindent = 2mm + \tableindent = 12mm +}} + +% A specific text layout, 24x15cm overall, intended for A4 paper. +\def\afourlatex{{\globaldefs = 1 + \afourpaper + \internalpagesizes{237mm}{150mm}% + {\voffset}{4.6mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + % + % Must explicitly reset to 0 because we call \afourpaper. + \globaldefs = 0 +}} + +% Use @afourwide to print on A4 paper in landscape format. +\def\afourwide{{\globaldefs = 1 + \afourpaper + \internalpagesizes{241mm}{165mm}% + {\voffset}{-2.95mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + \globaldefs = 0 +}} + +% @pagesizes TEXTHEIGHT[,TEXTWIDTH] +% Perhaps we should allow setting the margins, \topskip, \parskip, +% and/or leading, also. Or perhaps we should compute them somehow. +% +\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} +\def\pagesizesyyy#1,#2,#3\finish{{% + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi + \globaldefs = 1 + % + \parskip = 3pt plus 2pt minus 1pt + \setleading{\textleading}% + % + \dimen0 = #1\relax + \advance\dimen0 by \voffset + % + \dimen2 = \hsize + \advance\dimen2 by \normaloffset + % + \internalpagesizes{#1}{\hsize}% + {\voffset}{\normaloffset}% + {\bindingoffset}{44pt}% + {\dimen0}{\dimen2}% +}} + +% Set default to letter. +% +\letterpaper + + +\message{and turning on texinfo input format.} + +\def^^L{\par} % remove \outer, so ^L can appear in an @comment + +% DEL is a comment character, in case @c does not suffice. +\catcode`\^^? = 14 + +% Define macros to output various characters with catcode for normal text. +\catcode`\"=\other \def\normaldoublequote{"} +\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix +\catcode`\+=\other \def\normalplus{+} +\catcode`\<=\other \def\normalless{<} +\catcode`\>=\other \def\normalgreater{>} +\catcode`\^=\other \def\normalcaret{^} +\catcode`\_=\other \def\normalunderscore{_} +\catcode`\|=\other \def\normalverticalbar{|} +\catcode`\~=\other \def\normaltilde{~} + +% This macro is used to make a character print one way in \tt +% (where it can probably be output as-is), and another way in other fonts, +% where something hairier probably needs to be done. +% +% #1 is what to print if we are indeed using \tt; #2 is what to print +% otherwise. Since all the Computer Modern typewriter fonts have zero +% interword stretch (and shrink), and it is reasonable to expect all +% typewriter fonts to have this, we can check that font parameter. +% +\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} + +% Same as above, but check for italic font. Actually this also catches +% non-italic slanted fonts since it is impossible to distinguish them from +% italic fonts. But since this is only used by $ and it uses \sl anyway +% this is not a problem. +\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} + +% Turn off all special characters except @ +% (and those which the user can use as if they were ordinary). +% Most of these we simply print from the \tt font, but for some, we can +% use math or other variants that look better in normal text. + +\catcode`\"=\active +\def\activedoublequote{{\tt\char34}} +\let"=\activedoublequote +\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde +\chardef\hatchar=`\^ +\catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat + +\catcode`\_=\active +\def_{\ifusingtt\normalunderscore\_} +\let\realunder=_ +% Subroutine for the previous macro. +\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } + +\catcode`\|=\active +\def|{{\tt\char124}} + +\chardef \less=`\< +\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless +\chardef \gtr=`\> +\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr +\catcode`\+=\active \def+{{\tt \char 43}} +\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix +\catcode`\-=\active \let-=\normaldash + + +% used for headline/footline in the output routine, in case the page +% breaks in the middle of an @tex block. +\def\texinfochars{% + \let< = \activeless + \let> = \activegtr + \let~ = \activetilde + \let^ = \activehat + \markupsetuplqdefault \markupsetuprqdefault + \let\b = \strong + \let\i = \smartitalic + % in principle, all other definitions in \tex have to be undone too. +} + +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + +\catcode`\@=0 + +% \backslashcurfont outputs one backslash character in current font, +% as in \char`\\. +\global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work + +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In Texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=\active % @ for escape char from now on. + +% Print a typewriter backslash. For math mode, we can't simply use +% \backslashcurfont: the story here is that in math mode, the \char +% of \backslashcurfont ends up printing the roman \ from the math symbol +% font (because \char in math mode uses the \mathcode, and plain.tex +% sets \mathcode`\\="026E). Hence we use an explicit \mathchar, +% which is the decimal equivalent of "715c (class 7, e.g., use \fam; +% ignored family value; char position "5C). We can't use " for the +% usual hex value because it has already been made active. + +@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} +@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents. + +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. We switch back and forth between these. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. +% +{@catcode`- = @active + @gdef@normalturnoffactive{% + @nonasciistringdefs + @let-=@normaldash + @let"=@normaldoublequote + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let~=@normaltilde + @let\=@ttbackslash + @markupsetuplqdefault + @markupsetuprqdefault + @unsepspaces + } +} + +% If a .fmt file is being used, characters that might appear in a file +% name cannot be active until we have parsed the command line. +% So turn them off again, and have @fixbackslash turn them back on. +@catcode`+=@other @catcode`@_=@other + +% \enablebackslashhack - allow file to begin `\input texinfo' +% +% If a .fmt file is being used, we don't want the `\input texinfo' to show up. +% That is what \eatinput is for; after that, the `\' should revert to printing +% a backslash. +% If the file did not have a `\input texinfo', then it is turned off after +% the first line; otherwise the first `\' in the file would cause an error. +% This is used on the very last line of this file, texinfo.tex. +% We also use @c to call @fixbackslash, in case ends of lines are hidden. +{ +@catcode`@^=7 +@catcode`@^^M=13@gdef@enablebackslashhack{% + @global@let\ = @eatinput% + @catcode`@^^M=13% + @def@c{@fixbackslash@c}% + @def ^^M{@let^^M@secondlinenl}% + @gdef @secondlinenl{@let^^M@thirdlinenl}% + @gdef @thirdlinenl{@fixbackslash}% +}} + +{@catcode`@^=7 @catcode`@^^M=13% +@gdef@eatinput input texinfo#1^^M{@fixbackslash}} + +@gdef@fixbackslash{% + @ifx\@eatinput @let\ = @ttbackslash @fi + @catcode13=5 % regular end of line + @let@c=@texinfoc + % Also turn back on active characters that might appear in the input + % file name, in case not using a pre-dumped format. + @catcode`+=@active + @catcode`@_=@active + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets + % called at the beginning of every Texinfo file. Not opening texinfo.cnf + % directly in this file, texinfo.tex, makes it possible to make a format + % file for Texinfo. + % + @openin 1 texinfo.cnf + @ifeof 1 @else @input texinfo.cnf @fi + @closein 1 +} + + +% Say @foo, not \foo, in error messages. +@escapechar = `@@ + +% These (along with & and #) are made active for url-breaking, so need +% active definitions as the normal characters. +@def@normaldot{.} +@def@normalquest{?} +@def@normalslash{/} + +% These look ok in all fonts, so just make them not special. +% @hashchar{} gets its own user-level command, because of #line. +@catcode`@& = @other @def@normalamp{&} +@catcode`@# = @other @def@normalhash{#} +@catcode`@% = @other @def@normalpercent{%} + +@let @hashchar = @normalhash + +@c Finally, make ` and ' active, so that txicodequoteundirected and +@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we +@c don't make ` and ' active, @code will not get them as active chars. +@c Do this last of all since we use ` in the previous @catcode assignments. +@catcode`@'=@active +@catcode`@`=@active +@markupsetuplqdefault +@markupsetuprqdefault + +@c Local variables: +@c eval: (add-hook 'write-file-hooks 'time-stamp) +@c page-delimiter: "^\\\\message\\|emacs-page" +@c time-stamp-start: "def\\\\texinfoversion{" +@c time-stamp-format: "%:y-%02m-%02d.%02H" +@c time-stamp-end: "}" +@c End: + +@c vim:sw=2: + +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore +@enablebackslashhack diff --git a/bash-5.1/doc/version.texi b/bash-5.1/doc/version.texi new file mode 100644 index 0000000000000000000000000000000000000000..561a6d0e1304064796037bdb7cb7155b536ed7ba --- /dev/null +++ b/bash-5.1/doc/version.texi @@ -0,0 +1,11 @@ +@ignore +Copyright (C) 1988-2020 Free Software Foundation, Inc. +@end ignore + +@set LASTCHANGE Thu Oct 29 16:18:54 EDT 2020 + +@set EDITION 5.1 +@set VERSION 5.1 + +@set UPDATED 29 October 2020 +@set UPDATED-MONTH October 2020 diff --git a/bash-5.1/error.c b/bash-5.1/error.c new file mode 100644 index 0000000000000000000000000000000000000000..7df4b146ccdd6f8ddc5535594553f90c7c6ccd2e --- /dev/null +++ b/bash-5.1/error.c @@ -0,0 +1,511 @@ +/* error.c -- Functions for handling errors. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (PREFER_STDARG) +# include +#else +# include +#endif + +#include + +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#include "bashansi.h" +#include "bashintl.h" + +#include "shell.h" +#include "execute_cmd.h" +#include "flags.h" +#include "input.h" + +#if defined (HISTORY) +# include "bashhist.h" +#endif + +extern int executing_line_number PARAMS((void)); + +#if defined (JOB_CONTROL) +extern pid_t shell_pgrp; +extern int give_terminal_to PARAMS((pid_t, int)); +#endif /* JOB_CONTROL */ + +#if defined (ARRAY_VARS) +extern const char * const bash_badsub_errmsg; +#endif + +static void error_prolog PARAMS((int)); + +/* The current maintainer of the shell. You change this in the + Makefile. */ +#if !defined (MAINTAINER) +#define MAINTAINER "bash-maintainers@gnu.org" +#endif + +const char * const the_current_maintainer = MAINTAINER; + +int gnu_error_format = 0; + +static void +error_prolog (print_lineno) + int print_lineno; +{ + char *ename; + int line; + + ename = get_name_for_error (); + line = (print_lineno && interactive_shell == 0) ? executing_line_number () : -1; + + if (line > 0) + fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : _(" line "), line); + else + fprintf (stderr, "%s: ", ename); +} + +/* Return the name of the shell or the shell script for error reporting. */ +char * +get_name_for_error () +{ + char *name; +#if defined (ARRAY_VARS) + SHELL_VAR *bash_source_v; + ARRAY *bash_source_a; +#endif + + name = (char *)NULL; + if (interactive_shell == 0) + { +#if defined (ARRAY_VARS) + bash_source_v = find_variable ("BASH_SOURCE"); + if (bash_source_v && array_p (bash_source_v) && + (bash_source_a = array_cell (bash_source_v))) + name = array_reference (bash_source_a, 0); + if (name == 0 || *name == '\0') /* XXX - was just name == 0 */ +#endif + name = dollar_vars[0]; + } + if (name == 0 && shell_name && *shell_name) + name = base_pathname (shell_name); + if (name == 0) +#if defined (PROGRAM) + name = PROGRAM; +#else + name = "bash"; +#endif + + return (name); +} + +/* Report an error having to do with FILENAME. This does not use + sys_error so the filename is not interpreted as a printf-style + format string. */ +void +file_error (filename) + const char *filename; +{ + report_error ("%s: %s", filename, strerror (errno)); +} + +void +#if defined (PREFER_STDARG) +programming_error (const char *format, ...) +#else +programming_error (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + char *h; + +#if defined (JOB_CONTROL) + give_terminal_to (shell_pgrp, 0); +#endif /* JOB_CONTROL */ + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + va_end (args); + +#if defined (HISTORY) + if (remember_on_history) + { + h = last_history_line (); + fprintf (stderr, _("last command: %s\n"), h ? h : "(null)"); + } +#endif + +#if 0 + fprintf (stderr, "Report this to %s\n", the_current_maintainer); +#endif + + fprintf (stderr, _("Aborting...")); + fflush (stderr); + + abort (); +} + +/* Print an error message and, if `set -e' has been executed, exit the + shell. Used in this file by file_error and programming_error. Used + outside this file mostly to report substitution and expansion errors, + and for bad invocation options. */ +void +#if defined (PREFER_STDARG) +report_error (const char *format, ...) +#else +report_error (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + error_prolog (1); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); + if (exit_immediately_on_error) + { + if (last_command_exit_value == 0) + last_command_exit_value = EXECUTION_FAILURE; + exit_shell (last_command_exit_value); + } +} + +void +#if defined (PREFER_STDARG) +fatal_error (const char *format, ...) +#else +fatal_error (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + error_prolog (0); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); + sh_exit (2); +} + +void +#if defined (PREFER_STDARG) +internal_error (const char *format, ...) +#else +internal_error (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + error_prolog (1); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); +} + +void +#if defined (PREFER_STDARG) +internal_warning (const char *format, ...) +#else +internal_warning (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + error_prolog (1); + fprintf (stderr, _("warning: ")); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); +} + +void +#if defined (PREFER_STDARG) +internal_inform (const char *format, ...) +#else +internal_inform (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + error_prolog (1); + /* TRANSLATORS: this is a prefix for informational messages. */ + fprintf (stderr, _("INFORM: ")); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); +} + +void +#if defined (PREFER_STDARG) +sys_error (const char *format, ...) +#else +sys_error (format, va_alist) + const char *format; + va_dcl +#endif +{ + int e; + va_list args; + + e = errno; + error_prolog (0); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, ": %s\n", strerror (e)); + + va_end (args); +} + +/* An error from the parser takes the general form + + shell_name: input file name: line number: message + + The input file name and line number are omitted if the shell is + currently interactive. If the shell is not currently interactive, + the input file name is inserted only if it is different from the + shell name. */ +void +#if defined (PREFER_STDARG) +parser_error (int lineno, const char *format, ...) +#else +parser_error (lineno, format, va_alist) + int lineno; + const char *format; + va_dcl +#endif +{ + va_list args; + char *ename, *iname; + + ename = get_name_for_error (); + iname = yy_input_name (); + + if (interactive) + fprintf (stderr, "%s: ", ename); + else if (interactive_shell) + fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : _(" line "), lineno); + else if (STREQ (ename, iname)) + fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : _(" line "), lineno); + else + fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : _(" line "), lineno); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); + + if (exit_immediately_on_error) + exit_shell (last_command_exit_value = 2); +} + +#ifdef DEBUG +/* This assumes ASCII and is suitable only for debugging */ +char * +strescape (str) + const char *str; +{ + char *r, *result; + unsigned char *s; + + r = result = (char *)xmalloc (strlen (str) * 2 + 1); + + for (s = (unsigned char *)str; s && *s; s++) + { + if (*s < ' ') + { + *r++ = '^'; + *r++ = *s+64; + } + else if (*s == 127) + { + *r++ = '^'; + *r++ = '?'; + } + else + *r++ = *s; + } + + *r = '\0'; + return result; +} + +void +#if defined (PREFER_STDARG) +itrace (const char *format, ...) +#else +itrace (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + fprintf(stderr, "TRACE: pid %ld: ", (long)getpid()); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); + + fflush(stderr); +} + +/* A trace function for silent debugging -- doesn't require a control + terminal. */ +void +#if defined (PREFER_STDARG) +trace (const char *format, ...) +#else +trace (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + static FILE *tracefp = (FILE *)NULL; + + if (tracefp == NULL) + tracefp = fopen("/tmp/bash-trace.log", "a+"); + + if (tracefp == NULL) + tracefp = stderr; + else + fcntl (fileno (tracefp), F_SETFD, 1); /* close-on-exec */ + + fprintf(tracefp, "TRACE: pid %ld: ", (long)getpid()); + + SH_VA_START (args, format); + + vfprintf (tracefp, format, args); + fprintf (tracefp, "\n"); + + va_end (args); + + fflush(tracefp); +} + +#endif /* DEBUG */ + +/* **************************************************************** */ +/* */ +/* Common error reporting */ +/* */ +/* **************************************************************** */ + + +static const char * const cmd_error_table[] = { + N_("unknown command error"), /* CMDERR_DEFAULT */ + N_("bad command type"), /* CMDERR_BADTYPE */ + N_("bad connector"), /* CMDERR_BADCONN */ + N_("bad jump"), /* CMDERR_BADJUMP */ + 0 +}; + +void +command_error (func, code, e, flags) + const char *func; + int code, e, flags; /* flags currently unused */ +{ + if (code > CMDERR_LAST) + code = CMDERR_DEFAULT; + + programming_error ("%s: %s: %d", func, _(cmd_error_table[code]), e); +} + +char * +command_errstr (code) + int code; +{ + if (code > CMDERR_LAST) + code = CMDERR_DEFAULT; + + return (_(cmd_error_table[code])); +} + +#ifdef ARRAY_VARS +void +err_badarraysub (s) + const char *s; +{ + report_error ("%s: %s", s, _(bash_badsub_errmsg)); +} +#endif + +void +err_unboundvar (s) + const char *s; +{ + report_error (_("%s: unbound variable"), s); +} + +void +err_readonly (s) + const char *s; +{ + report_error (_("%s: readonly variable"), s); +} diff --git a/bash-5.1/error.h b/bash-5.1/error.h new file mode 100644 index 0000000000000000000000000000000000000000..30828095b13b51eabbc59a2d406b35bdcd3ade5f --- /dev/null +++ b/bash-5.1/error.h @@ -0,0 +1,73 @@ +/* error.h -- External declarations of functions appearing in error.c. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_ERROR_H_) +#define _ERROR_H_ + +#include "stdc.h" + +/* Get the name of the shell or shell script for an error message. */ +extern char *get_name_for_error PARAMS((void)); + +/* Report an error having to do with FILENAME. */ +extern void file_error PARAMS((const char *)); + +/* Report a programmer's error, and abort. Pass REASON, and ARG1 ... ARG5. */ +extern void programming_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* General error reporting. Pass FORMAT and ARG1 ... ARG5. */ +extern void report_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* Error messages for parts of the parser that don't call report_syntax_error */ +extern void parser_error PARAMS((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); + +/* Report an unrecoverable error and exit. Pass FORMAT and ARG1 ... ARG5. */ +extern void fatal_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* Report a system error, like BSD warn(3). */ +extern void sys_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* Report an internal error. */ +extern void internal_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* Report an internal warning. */ +extern void internal_warning PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* Report an internal informational notice. */ +extern void internal_inform PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* Debugging functions, not enabled in released version. */ +extern char *strescape PARAMS((const char *)); +extern void itrace PARAMS((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); +extern void trace PARAMS((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); + +/* Report an error having to do with command parsing or execution. */ +extern void command_error PARAMS((const char *, int, int, int)); + +extern char *command_errstr PARAMS((int)); + +/* Specific error message functions that eventually call report_error or + internal_error. */ + +extern void err_badarraysub PARAMS((const char *)); +extern void err_unboundvar PARAMS((const char *)); +extern void err_readonly PARAMS((const char *)); + +#endif /* !_ERROR_H_ */ diff --git a/bash-5.1/eval.c b/bash-5.1/eval.c new file mode 100644 index 0000000000000000000000000000000000000000..f19703342b54570a5a16f0cad8bc727571fb8ef4 --- /dev/null +++ b/bash-5.1/eval.c @@ -0,0 +1,401 @@ +/* eval.c -- reading and evaluating commands. */ + +/* Copyright (C) 1996-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "bashansi.h" +#include + +#include + +#include "bashintl.h" + +#include "shell.h" +#include "parser.h" +#include "flags.h" +#include "trap.h" + +#include "builtins/common.h" + +#include "input.h" +#include "execute_cmd.h" + +#if defined (HISTORY) +# include "bashhist.h" +#endif + +static void send_pwd_to_eterm PARAMS((void)); +static sighandler alrm_catcher PARAMS((int)); + +/* Read and execute commands until EOF is reached. This assumes that + the input source has already been initialized. */ +int +reader_loop () +{ + int our_indirection_level; + COMMAND * volatile current_command; + + USE_VAR(current_command); + + current_command = (COMMAND *)NULL; + + our_indirection_level = ++indirection_level; + + if (just_one_command) + reset_readahead_token (); + + while (EOF_Reached == 0) + { + int code; + + code = setjmp_nosigs (top_level); + +#if defined (PROCESS_SUBSTITUTION) + unlink_fifo_list (); +#endif /* PROCESS_SUBSTITUTION */ + + /* XXX - why do we set this every time through the loop? And why do + it if SIGINT is trapped in an interactive shell? */ + if (interactive_shell && signal_is_ignored (SIGINT) == 0 && signal_is_trapped (SIGINT) == 0) + set_signal_handler (SIGINT, sigint_sighandler); + + if (code != NOT_JUMPED) + { + indirection_level = our_indirection_level; + + switch (code) + { + /* Some kind of throw to top_level has occurred. */ + case FORCE_EOF: + case ERREXIT: + case EXITPROG: + current_command = (COMMAND *)NULL; + if (exit_immediately_on_error) + variable_context = 0; /* not in a function */ + EOF_Reached = EOF; + goto exec_done; + + case DISCARD: + /* Make sure the exit status is reset to a non-zero value, but + leave existing non-zero values (e.g., > 128 on signal) + alone. */ + if (last_command_exit_value == 0) + set_exit_status (EXECUTION_FAILURE); + if (subshell_environment) + { + current_command = (COMMAND *)NULL; + EOF_Reached = EOF; + goto exec_done; + } + /* Obstack free command elements, etc. */ + if (current_command) + { + dispose_command (current_command); + current_command = (COMMAND *)NULL; + } + + restore_sigmask (); + break; + + default: + command_error ("reader_loop", CMDERR_BADJUMP, code, 0); + } + } + + executing = 0; + if (temporary_env) + dispose_used_env_vars (); + +#if (defined (ultrix) && defined (mips)) || defined (C_ALLOCA) + /* Attempt to reclaim memory allocated with alloca (). */ + (void) alloca (0); +#endif + + if (read_command () == 0) + { + + if (interactive_shell == 0 && (read_but_dont_execute && !rpm_requires)) + { + set_exit_status (EXECUTION_SUCCESS); + dispose_command (global_command); + global_command = (COMMAND *)NULL; + } + else if (current_command = global_command) + { + global_command = (COMMAND *)NULL; + + /* If the shell is interactive, expand and display $PS0 after reading a + command (possibly a list or pipeline) and before executing it. */ + if (interactive && ps0_prompt) + { + char *ps0_string; + + ps0_string = decode_prompt_string (ps0_prompt); + if (ps0_string && *ps0_string) + { + fprintf (stderr, "%s", ps0_string); + fflush (stderr); + } + free (ps0_string); + } + + current_command_number++; + + executing = 1; + stdin_redir = 0; + + execute_command (current_command); + + exec_done: + QUIT; + + if (current_command) + { + dispose_command (current_command); + current_command = (COMMAND *)NULL; + } + } + } + else + { + /* Parse error, maybe discard rest of stream if not interactive. */ + if (interactive == 0) + EOF_Reached = EOF; + } + if (just_one_command) + EOF_Reached = EOF; + } + indirection_level--; + return (last_command_exit_value); +} + +/* Pretty print shell scripts */ +int +pretty_print_loop () +{ + COMMAND *current_command; + char *command_to_print; + int code; + int global_posix_mode, last_was_newline; + + global_posix_mode = posixly_correct; + last_was_newline = 0; + while (EOF_Reached == 0) + { + code = setjmp_nosigs (top_level); + if (code) + return (EXECUTION_FAILURE); + if (read_command() == 0) + { + current_command = global_command; + global_command = 0; + posixly_correct = 1; /* print posix-conformant */ + if (current_command && (command_to_print = make_command_string (current_command))) + { + printf ("%s\n", command_to_print); /* for now */ + last_was_newline = 0; + } + else if (last_was_newline == 0) + { + printf ("\n"); + last_was_newline = 1; + } + posixly_correct = global_posix_mode; + dispose_command (current_command); + } + else + return (EXECUTION_FAILURE); + } + + return (EXECUTION_SUCCESS); +} + +static sighandler +alrm_catcher(i) + int i; +{ + char *msg; + + msg = _("\007timed out waiting for input: auto-logout\n"); + write (1, msg, strlen (msg)); + + bash_logout (); /* run ~/.bash_logout if this is a login shell */ + jump_to_top_level (EXITPROG); + SIGRETURN (0); +} + +/* Send an escape sequence to emacs term mode to tell it the + current working directory. */ +static void +send_pwd_to_eterm () +{ + char *pwd, *f; + + f = 0; + pwd = get_string_value ("PWD"); + if (pwd == 0) + f = pwd = get_working_directory ("eterm"); + fprintf (stderr, "\032/%s\n", pwd); + free (f); +} + +#if defined (ARRAY_VARS) +/* Caller ensures that A has a non-zero number of elements */ +int +execute_array_command (a, v) + ARRAY *a; + void *v; +{ + char *tag; + char **argv; + int argc, i; + + tag = (char *)v; + argc = 0; + argv = array_to_argv (a, &argc); + for (i = 0; i < argc; i++) + { + if (argv[i] && argv[i][0]) + execute_variable_command (argv[i], tag); + } + strvec_dispose (argv); + return 0; +} +#endif + +static void +execute_prompt_command () +{ + char *command_to_execute; + SHELL_VAR *pcv; +#if defined (ARRAY_VARS) + ARRAY *pcmds; +#endif + + pcv = find_variable ("PROMPT_COMMAND"); + if (pcv == 0 || var_isset (pcv) == 0 || invisible_p (pcv)) + return; +#if defined (ARRAY_VARS) + if (array_p (pcv)) + { + if ((pcmds = array_cell (pcv)) && array_num_elements (pcmds) > 0) + execute_array_command (pcmds, "PROMPT_COMMAND"); + return; + } + else if (assoc_p (pcv)) + return; /* currently don't allow associative arrays here */ +#endif + + command_to_execute = value_cell (pcv); + if (command_to_execute && *command_to_execute) + execute_variable_command (command_to_execute, "PROMPT_COMMAND"); +} + +/* Call the YACC-generated parser and return the status of the parse. + Input is read from the current input stream (bash_input). yyparse + leaves the parsed command in the global variable GLOBAL_COMMAND. + This is where PROMPT_COMMAND is executed. */ +int +parse_command () +{ + int r; + + need_here_doc = 0; + run_pending_traps (); + + /* Allow the execution of a random command just before the printing + of each primary prompt. If the shell variable PROMPT_COMMAND + is set then its value (array or string) is the command(s) to execute. */ + /* The tests are a combination of SHOULD_PROMPT() and prompt_again() + from parse.y, which are the conditions under which the prompt is + actually printed. */ + if (interactive && bash_input.type != st_string && parser_expanding_alias() == 0) + { +#if defined (READLINE) + if (no_line_editing || (bash_input.type == st_stdin && parser_will_prompt ())) +#endif + execute_prompt_command (); + + if (running_under_emacs == 2) + send_pwd_to_eterm (); /* Yuck */ + } + + current_command_line_count = 0; + r = yyparse (); + + if (need_here_doc) + gather_here_documents (); + + return (r); +} + +/* Read and parse a command, returning the status of the parse. The command + is left in the globval variable GLOBAL_COMMAND for use by reader_loop. + This is where the shell timeout code is executed. */ +int +read_command () +{ + SHELL_VAR *tmout_var; + int tmout_len, result; + SigHandler *old_alrm; + + set_current_prompt_level (1); + global_command = (COMMAND *)NULL; + + /* Only do timeouts if interactive. */ + tmout_var = (SHELL_VAR *)NULL; + tmout_len = 0; + old_alrm = (SigHandler *)NULL; + + if (interactive) + { + tmout_var = find_variable ("TMOUT"); + + if (tmout_var && var_isset (tmout_var)) + { + tmout_len = atoi (value_cell (tmout_var)); + if (tmout_len > 0) + { + old_alrm = set_signal_handler (SIGALRM, alrm_catcher); + alarm (tmout_len); + } + } + } + + QUIT; + + current_command_line_count = 0; + result = parse_command (); + + if (interactive && tmout_var && (tmout_len > 0)) + { + alarm(0); + set_signal_handler (SIGALRM, old_alrm); + } + + return (result); +} diff --git a/bash-5.1/examples/INDEX.html b/bash-5.1/examples/INDEX.html new file mode 100644 index 0000000000000000000000000000000000000000..bcca1f9e01fd188d439162264445d5f3cbf07a63 --- /dev/null +++ b/bash-5.1/examples/INDEX.html @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathDescriptionX-Ref
./obashdbDeprecated sample implementation of a bash debugger
./completeShell completion code
./functionsExample functions
./functions/array-stuffVarious array functions (ashift, array_sort, reverse).
./functions/array-to-stringConvert an array to a string.
./functions/autoloadAn almost ksh-compatible 'autoload' (no lazy load).ksh
./functions/autoload.v2An almost ksh-compatible 'autoload' (no lazy load).ksh
./functions/autoload.v3A more ksh-compatible 'autoload' (with lazy load).ksh
./functions/autoload.v3An updated ksh-compatible 'autoload'.ksh
./functions/basenameA replacement for basename(1).basename
./functions/csh-compatA C-shell compatibility package.csh
./functions/dirnameA replacement for dirname(1).dirname
./functions/dirstackDirectory stack functions.
./functions/exitstatDisplay the exit status of processes.
./functions/externalLike 'command' but FORCES use of external command.
./functions/factRecursive factorial function.
./functions/fsttyFront end to sync TERM changes to both stty(1) and readline 'bind'.stty.bash
./functions/inetaddrInternet address conversion (inet2hex & hex2inet).
./functions/inpathReturn zero if the argument is in the path and executable.inpath
./functions/isnum2Test user input on numeric values, with floating point.
./functions/isvalidipTest user input for valid IP Addresses.
./functions/ksh-cdksh-like 'cd': cd [-LP] [dir [change]].ksh
./functions/ksh-compat-testksh-like arithmetic test replacements.ksh
./functions/kshenvFunctions and aliases to provide the beginnings of a ksh environment for bash.ksh
./functions/loginReplace the 'login' and 'newgrp' builtins in old Bourne shells.
./functions/notify.bashNotify when jobs change status.
./functions/READMEREADME
./functions/seqGenerate a sequence from m to n, m defaults to 1.
./functions/seq2Generate a sequence from m to n, m defaults to 1.
./functions/shcatReadline-based pager.cat, readline pager
./functions/shcat2Readline-based pagers.cat, readline pager
./functions/sort-pos-paramsSort the positional parameters.
./functions/substrA function to emulate the ancient ksh builtin.ksh
./functions/substr2A function to emulate the ancient ksh builtin.ksh
./functions/whatisAn implementation of the 10th Edition Unix sh builtin 'whatis(1)' command.
./functions/whenceAn almost-ksh compatible 'whence(1)' command.
./functions/whichAn emulation of 'which(1)' as it appears in FreeBSD.
./loadables/Example loadable replacements
./loadables/basename.cReturn non-directory portion of pathname.basename
./loadables/cat.ccat(1) replacement with no options - the way cat was intended.cat, readline pager
./loadables/dirname.cReturn directory portion of pathname.dirname
./loadables/fdflags.cDisplay or modify file descriptor flags
./loadables/finfo.cPrint file info.
./loadables/head.cCopy first part of files.
./loadables/hello.cObligatory "Hello World" / sample loadable.
./loadables/id.cPOSIX.2 user identity.
./loadables/ln.cMake links.
./loadables/logname.cPrint login name of current user.
./loadables/Makefile.inSimple makefile for the sample loadable builtins.
./loadables/Makefile.inc.inSample makefile to use for loadable builtin development.
./loadables/mkdir.cMake directories.
./loadables/mypid.cDemonstrate how a loadable builtin can create and delete shell variables.
./loadables/necho.cecho without options or argument interpretation.
./loadables/pathchk.cCheck pathnames for validity and portability.
./loadables/print.cLoadable ksh-93 style print builtin.
./loadables/printenv.cMinimal builtin clone of BSD printenv(1).
./loadables/push.cAnyone remember TOPS-20?
./loadables/READMEREADME
./loadables/realpath.cCanonicalize pathnames, resolving symlinks.
./loadables/rm.cRemove file.
./loadables/rmdir.cRemove directory.
./loadables/setpgid.cSet a child process's process group. +
./loadables/sleep.csleep for fractions of a second.
./loadables/stat.cLoad an associative array with stat information about a file.
./loadables/strftime.cLoadable builtin interface to strftime(3).
./loadables/sync.cSync the disks by forcing pending filesystem writes to complete.
./loadables/tee.cDuplicate standard input.
./loadables/template.cExample template for loadable builtin.
./loadables/truefalse.cTrue and false builtins.
./loadables/tty.cReturn terminal name.
./loadables/uname.cPrint system information.
./loadables/unlink.cRemove a directory entry.
./loadables/whoami.cPrint out username of current user.
./loadables/perl/Illustrate how to build a Perl interpreter into bash.
./miscMiscellaneous
./misc/aliasconv.bashConvert csh aliases to bash aliases and functions.csh, xalias
./misc/aliasconv.shConvert csh aliases to bash aliases and functions.csh, xalias
./misc/cshtobashConvert csh aliases, environment variables, and variables to bash equivalents.csh, xalias
./misc/READMEREADME
./scriptsExample scripts
./scripts/cat.shReadline-based pager.cat, readline pager
./scripts/centerCenter - center a group of lines.
./scripts/inpathSearch $PATH for a file the same name as $1; return TRUE if found.inpath
./scripts/READMEREADME
./scripts/shpromptDisplay a prompt and get an answer satisfying certain criteria.ask
./scripts/spin.bashDisplay a 'spinning wheel' to show progress.
./scripts/xterm_titlePrint the contents of the xterm title bar.
./scripts/zprintfEmulate printf (obsolete since it's now a bash builtin).
./startup-filesExample Start-up files.
./startup-files/Bash_aliasesSome useful aliases (Fox).
./startup-files/Bash_profileSample startup file for bash login shells (Fox).
./startup-files/bash-profileSample startup file for bash login shells (Ramey).
./startup-files/bashrcSample Bourne Again SHell init file (Ramey).
./startup-files/Bashrc.bfoxSample Bourne Again SHell init file (Fox).
./startup-files/READMEREADME
diff --git a/bash-5.1/examples/INDEX.txt b/bash-5.1/examples/INDEX.txt new file mode 100644 index 0000000000000000000000000000000000000000..b47e2113a313e2a1b6c1474cafa9a108e26cc578 --- /dev/null +++ b/bash-5.1/examples/INDEX.txt @@ -0,0 +1,103 @@ +Path Description X-Ref +./obashdb Deprecated sample implementation of a bash debugger + +./complete Shell completion code + +./functions Example functions +./functions/array-stuff Various array functions (ashift, array_sort, reverse). +./functions/array-to-string Convert an array to a string. +./functions/autoload An almost ksh-compatible 'autoload' (no lazy load). ksh +./functions/autoload.v2 An almost ksh-compatible 'autoload' (no lazy load). ksh +./functions/autoload.v3 A more ksh-compatible 'autoload' (with lazy load). ksh +./functions/autoload.v4 An updated ksh-compatible 'autoload'. ksh +./functions/basename A replacement for basename(1). basename +./functions/csh-compat A C-shell compatibility package. csh +./functions/dirname A replacement for dirname(1). dirname +./functions/dirstack Directory stack functions. +./functions/exitstat Display the exit status of processes. +./functions/external Like 'command' but FORCES use of external command. +./functions/fact Recursive factorial function. +./functions/fstty Front end to sync TERM changes to both stty(1) and readline 'bind'. stty.bash +./functions/inetaddr Internet address conversion (inet2hex & hex2inet). +./functions/inpath Return zero if the argument is in the path and executable. inpath +./functions/isnum2 Test user input on numeric values, with floating point. +./functions/isvalidip Test user input for valid IP Addresses. +./functions/ksh-cd ksh-like 'cd': cd [-LP] [dir [change]]. ksh +./functions/ksh-compat-test ksh-like arithmetic test replacements. ksh +./functions/kshenv Functions and aliases to provide the beginnings of a ksh environment for bash. ksh +./functions/login Replace the 'login' and 'newgrp' builtins in old Bourne shells. +./functions/notify.bash Notify when jobs change status. +./functions/README README +./functions/seq Generate a sequence from m to n, m defaults to 1. +./functions/seq2 Generate a sequence from m to n, m defaults to 1. +./functions/shcat Readline-based pager. cat, readline pager +./functions/shcat2 Readline-based pagers. cat, readline pager +./functions/sort-pos-params Sort the positional parameters. +./functions/substr A function to emulate the ancient ksh builtin. ksh +./functions/substr2 A function to emulate the ancient ksh builtin. ksh +./functions/whatis An implementation of the 10th Edition Unix sh builtin 'whatis(1)' command. +./functions/whence An almost-ksh compatible 'whence(1)' command. +./functions/which An emulation of 'which(1)' as it appears in FreeBSD. + +./loadables/ Example loadable replacements +./loadables/basename.c Return non-directory portion of pathname. basename +./loadables/cat.c cat(1) replacement with no options - the way cat was intended. cat, readline pager +./loadables/dirname.c Return directory portion of pathname. dirname +./loadables/fdflags.c Display or modify file descriptor flags +./loadables/finfo.c Print file info. +./loadables/head.c Copy first part of files. +./loadables/hello.c Obligatory "Hello World" / sample loadable. +./loadables/id.c POSIX.2 user identity. +./loadables/ln.c Make links. +./loadables/logname.c Print login name of current user. +./loadables/Makefile.in Simple makefile for the sample loadable builtins. +./loadables/Makefile.inc.in Sample makefile to use for loadable builtin development. +./loadables/mkdir.c Make directories. +./loadables/mypid.c Demonstrate how a loadable builtin can create and delete shell variables. +./loadables/necho.c echo without options or argument interpretation. +./loadables/pathchk.c Check pathnames for validity and portability. +./loadables/print.c Loadable ksh-93 style print builtin. +./loadables/printenv.c Minimal builtin clone of BSD printenv(1). +./loadables/push.c Anyone remember TOPS-20? +./loadables/README README +./loadables/realpath.c Canonicalize pathnames, resolving symlinks. +./loadables/rm.c Remove file. +./loadables/rmdir.c Remove directory. +./loadables/setpgid.c Set a child process's process group. +./loadables/sleep.c sleep for fractions of a second. +./loadables/stat.c Load an associative array with stat information about a file. +./loadables/strftime.c Loadable builtin interface to strftime(3). +./loadables/sync.c Sync the disks by forcing pending filesystem writes to complete. +./loadables/tee.c Duplicate standard input. +./loadables/template.c Example template for loadable builtin. +./loadables/truefalse.c True and false builtins. +./loadables/tty.c Return terminal name. +./loadables/uname.c Print system information. +./loadables/unlink.c Remove a directory entry. +./loadables/whoami.c Print out username of current user. + +./loadables/perl/ Illustrate how to build a Perl interpreter into bash. + +./misc Miscellaneous +./misc/aliasconv.bash Convert csh aliases to bash aliases and functions. csh, xalias +./misc/aliasconv.sh Convert csh aliases to bash aliases and functions. csh, xalias +./misc/cshtobash Convert csh aliases, environment variables, and variables to bash equivalents. csh, xalias +./misc/README README + +./scripts Example scripts +./scripts/cat.sh Readline-based pager. cat, readline pager +./scripts/center Center - center a group of lines. +./scripts/inpath Search $PATH for a file the same name as $1; return TRUE if found. inpath +./scripts/shprompt Display a prompt and get an answer satisfying certain criteria. ask +./scripts/spin.bash Display a 'spinning wheel' to show progress. +./scripts/xterm_title Print the contents of the xterm title bar. +./scripts/zprintf Emulate printf (obsolete since it's now a bash builtin). + +./startup-files Example Start-up files. +./startup-files/Bash_aliases Some useful aliases (Fox). +./startup-files/Bash_profile Sample startup file for bash login shells (Fox). +./startup-files/bash-profile Sample startup file for bash login shells (Ramey). +./startup-files/bashrc Sample Bourne Again SHell init file (Ramey). +./startup-files/Bashrc.bfox Sample Bourne Again SHell init file (Fox). +./startup-files/README README + diff --git a/bash-5.1/examples/bash-completion/README b/bash-5.1/examples/bash-completion/README new file mode 100644 index 0000000000000000000000000000000000000000..fb5e7654dad4078496c44bd6e97238defa2f93fd --- /dev/null +++ b/bash-5.1/examples/bash-completion/README @@ -0,0 +1,7 @@ +Master source: https://github.com/scop/bash-completion + +This is the latest version of the bash-completion package, which provides +programmable completion specifications for a large number of commands. + +If you are a vendor installing bash or preparing a package containing bash, +please install the latest version of bash-completion when installing bash. diff --git a/bash-5.1/examples/bash-completion/bash-completion-2.5.tar.xz b/bash-5.1/examples/bash-completion/bash-completion-2.5.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..f5b90790ca0ec92dd6aaa9689fdf536220717502 Binary files /dev/null and b/bash-5.1/examples/bash-completion/bash-completion-2.5.tar.xz differ diff --git a/bash-5.1/examples/complete/bash_completion b/bash-5.1/examples/complete/bash_completion new file mode 100644 index 0000000000000000000000000000000000000000..b0cf4a85d665325605b278042c604ae9023923ae --- /dev/null +++ b/bash-5.1/examples/complete/bash_completion @@ -0,0 +1,9401 @@ +# bash_completion - programmable completion functions for bash 3.x +# (backwards compatible with bash 2.05b) +# +# $Id: bash_completion,v 1.872 2006/03/01 16:20:18 ianmacd Exp $ +# +# Copyright (C) Ian Macdonald +# +# 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 2, 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The latest version of this software can be obtained here: +# +# http://www.caliban.org/bash/index.shtml#completion +# +# RELEASE: 20060301 + +if [[ $- == *v* ]]; then + BASH_COMPLETION_ORIGINAL_V_VALUE="-v" +else + BASH_COMPLETION_ORIGINAL_V_VALUE="+v" +fi + +if [[ -n $BASH_COMPLETION_DEBUG ]]; then + set -v +else + set +v +fi + +# Alter the following to reflect the location of this file. +# +[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/etc/bash_completion +[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/etc/bash_completion.d +readonly BASH_COMPLETION BASH_COMPLETION_DIR + +# Set a couple of useful vars +# +UNAME=$( uname -s ) +# strip OS type and version under Cygwin (e.g. CYGWIN_NT-5.1 => Cygwin) +UNAME=${UNAME/CYGWIN_*/Cygwin} +RELEASE=$( uname -r ) + +# features supported by bash 2.05 and higher +if [ ${BASH_VERSINFO[0]} -eq 2 ] && [[ ${BASH_VERSINFO[1]} > 04 ]] || + [ ${BASH_VERSINFO[0]} -gt 2 ]; then + declare -r bash205=$BASH_VERSION 2>/dev/null || : + default="-o default" + dirnames="-o dirnames" + filenames="-o filenames" +fi +# features supported by bash 2.05b and higher +if [ ${BASH_VERSINFO[0]} -eq 2 ] && [[ ${BASH_VERSINFO[1]} = "05b" ]] || + [ ${BASH_VERSINFO[0]} -gt 2 ]; then + declare -r bash205b=$BASH_VERSION 2>/dev/null || : + nospace="-o nospace" +fi +# features supported by bash 3.0 and higher +if [ ${BASH_VERSINFO[0]} -gt 2 ]; then + declare -r bash3=$BASH_VERSION 2>/dev/null || : + bashdefault="-o bashdefault" + plusdirs="-o plusdirs" +fi + +# Turn on extended globbing and programmable completion +shopt -s extglob progcomp + +# A lot of the following one-liners were taken directly from the +# completion examples provided with the bash 2.04 source distribution + +# Make directory commands see only directories +complete -d pushd + +# The following section lists completions that are redefined later +# Do NOT break these over multiple lines. +# +# START exclude -- do NOT remove this line +complete -f -X '!*.?(t)bz?(2)' bunzip2 bzcat bzcmp bzdiff bzegrep bzfgrep bzgrep +complete -f -X '!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott)' unzip zipinfo +complete -f -X '*.Z' compress znew +complete -f -X '!*.@(Z|gz|tgz|Gz|dz)' gunzip zcmp zdiff zcat zegrep zfgrep zgrep zless zmore +complete -f -X '!*.Z' uncompress +complete -f -X '!*.@(gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX)' ee display +complete -f -X '!*.@(gif|jp?(e)g|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|GIF|JPG|JP?(E)G|TIF?(F)|PNG|P[BGP]M|BMP|X[BP]M|RLE|RGB|PCX|FITS|PM)' xv qiv +complete -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))' gv ggv kghostview +complete -f -X '!*.@(dvi|DVI)?(.@(gz|Z|bz2))' xdvi +complete -f -X '!*.@(dvi|DVI)?(.@(gz|bz2))' kdvi +complete -f -X '!*.@(dvi|DVI)' dvips dviselect dvitype dvipdf advi dvipdfm dvipdfmx +complete -f -X '!*.@(pdf|PDF)' acroread gpdf xpdf +complete -f -X '!*.@(?(e)ps|?(E)PS|pdf|PDF)' kpdf +complete -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ)|cb(r|z)|CB(R|Z)|djv?(u)|DJV?(U)||dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX)' evince +complete -f -X '!*.@(?(e)ps|?(E)PS)' ps2pdf +complete -f -X '!*.texi*' makeinfo texi2html +complete -f -X '!*.@(?(la)tex|?(LA)TEX|texi|TEXI|dtx|DTX|ins|INS)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi +complete -f -X '!*.@(mp3|MP3)' mpg123 mpg321 madplay +complete -f -X '!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|m4v|M4V|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG|srt)' xine aaxine fbxine kaffeine +complete -f -X '!*.@(avi|asf|wmv)' aviplay +complete -f -X '!*.@(rm?(j)|ra?(m)|smi?(l))' realplay +complete -f -X '!*.@(mpg|mpeg|avi|mov|qt)' xanim +complete -f -X '!*.@(ogg|OGG|m3u|flac|spx)' ogg123 +complete -f -X '!*.@(mp3|MP3|ogg|OGG|pls|m3u)' gqmpeg freeamp +complete -f -X '!*.fig' xfig +complete -f -X '!*.@(mid?(i)|MID?(I))' playmidi +complete -f -X '!*.@(mid?(i)|MID?(I)|rmi|RMI|rcp|RCP|[gr]36|[GR]36|g18|G18|mod|MOD|xm|XM|it|IT|x3m|X3M)' timidity +complete -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' vi vim gvim rvim view rview rgvim rgview gview +complete -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' emacs +complete -f -X '!*.@(exe|EXE|com|COM|scr|SCR|exe.so)' wine +complete -f -X '!*.@(zip|ZIP|z|Z|gz|GZ|tgz|TGZ)' bzme +complete -f -X '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx opera galeon curl dillo elinks amaya +complete -f -X '!*.@(sxw|stw|sxg|sgl|doc|dot|rtf|txt|htm|html|odt|ott|odm)' oowriter +complete -f -X '!*.@(sxi|sti|pps|ppt|pot|odp|otp)' ooimpress +complete -f -X '!*.@(sxc|stc|xls|xlw|xlt|csv|ods|ots)' oocalc +complete -f -X '!*.@(sxd|std|sda|sdd|odg|otg)' oodraw +complete -f -X '!*.@(sxm|smf|mml|odf)' oomath +complete -f -X '!*.odb' oobase +complete -f -X '!*.rpm' rpm2cpio +# FINISH exclude -- do not remove this line + +# start of section containing compspecs that can be handled within bash + +# user commands see only users +complete -u su usermod userdel passwd chage write chfn groups slay w sux + +# group commands see only groups +[ -n "$bash205" ] && complete -g groupmod groupdel newgrp 2>/dev/null + +# bg completes with stopped jobs +complete -A stopped -P '%' bg + +# other job commands +complete -j -P '%' fg jobs disown + +# readonly and unset complete with shell variables +complete -v readonly unset + +# set completes with set options +complete -A setopt set + +# shopt completes with shopt options +complete -A shopt shopt + +# helptopics +complete -A helptopic help + +# unalias completes with aliases +complete -a unalias + +# bind completes with readline bindings (make this more intelligent) +complete -A binding bind + +# type and which complete on commands +complete -c command type which + +# builtin completes on builtins +complete -b builtin + +# start of section containing completion functions called by other functions + +# This function checks whether we have a given program on the system. +# No need for bulky functions in memory if we don't. +# +have() +{ + unset -v have + PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null && + have="yes" +} + +# use GNU sed if we have it, since its extensions are still used in our code +# +[ $UNAME != Linux ] && have gsed && alias sed=gsed + +# This function checks whether a given readline variable +# is `on'. +# +_rl_enabled() +{ + [[ "$( bind -v )" = *$1+([[:space:]])on* ]] +} + +# This function shell-quotes the argument +quote() +{ + echo \'${1//\'/\'\\\'\'}\' #'# Help vim syntax highlighting +} + +# This function quotes the argument in a way so that readline dequoting +# results in the original argument +quote_readline() +{ + local t="${1//\\/\\\\}" + echo \'${t//\'/\'\\\'\'}\' #'# Help vim syntax highlighting +} + +# This function shell-dequotes the argument +dequote() +{ + eval echo "$1" +} + + +# Get the word to complete +# This is nicer than ${COMP_WORDS[$COMP_CWORD]}, since it handles cases +# where the user is completing in the middle of a word. +# (For example, if the line is "ls foobar", +# and the cursor is here --------> ^ +# it will complete just "foo", not "foobar", which is what the user wants.) +_get_cword() +{ + if [[ "${#COMP_WORDS[COMP_CWORD]}" -eq 0 ]] || [[ "$COMP_POINT" == "${#COMP_LINE}" ]]; then + echo "${COMP_WORDS[COMP_CWORD]}" + else + local i + local cur="$COMP_LINE" + local index="$COMP_POINT" + for (( i = 0; i <= COMP_CWORD; ++i )); do + while [[ "${#cur}" -ge ${#COMP_WORDS[i]} ]] && [[ "${cur:0:${#COMP_WORDS[i]}}" != "${COMP_WORDS[i]}" ]]; do + cur="${cur:1}" + index="$(( index - 1 ))" + done + if [[ "$i" -lt "$COMP_CWORD" ]]; then + local old_size="${#cur}" + cur="${cur#${COMP_WORDS[i]}}" + local new_size="${#cur}" + index="$(( index - old_size + new_size ))" + fi + done + + if [[ "${COMP_WORDS[COMP_CWORD]:0:${#cur}}" != "$cur" ]]; then + # We messed up! At least return the whole word so things keep working + echo "${COMP_WORDS[COMP_CWORD]}" + else + echo "${cur:0:$index}" + fi + fi +} + + +# This function performs file and directory completion. It's better than +# simply using 'compgen -f', because it honours spaces in filenames. +# If passed -d, it completes only on directories. If passed anything else, +# it's assumed to be a file glob to complete on. +# +_filedir() +{ + local IFS=$'\t\n' xspec + + _expand || return 0 + + local toks=( ) tmp + while read -r tmp; do + [[ -n $tmp ]] && toks[${#toks[@]}]=$tmp + done < <( compgen -d -- "$(quote_readline "$cur")" ) + + if [[ "$1" != -d ]]; then + xspec=${1:+"!*.$1"} + while read -r tmp; do + [[ -n $tmp ]] && toks[${#toks[@]}]=$tmp + done < <( compgen -f -X "$xspec" -- "$(quote_readline "$cur")" ) + fi + + COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" ) +} + +# This function completes on signal names +# +_signals() +{ + local i + + # standard signal completion is rather braindead, so we need + # to hack around to get what we want here, which is to + # complete on a dash, followed by the signal name minus + # the SIG prefix + COMPREPLY=( $( compgen -A signal SIG${cur#-} )) + for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do + COMPREPLY[i]=-${COMPREPLY[i]#SIG} + done +} + +# This function completes on configured network interfaces +# +_configured_interfaces() +{ + if [ -f /etc/debian_version ]; then + # Debian system + COMPREPLY=( $( sed -ne 's|^iface \([^ ]\+\).*$|\1|p' \ + /etc/network/interfaces ) ) + elif [ -f /etc/SuSE-release ]; then + # SuSE system + COMPREPLY=( $( command ls \ + /etc/sysconfig/network/ifcfg-* | \ + sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) ) + elif [ -f /etc/pld-release ]; then + # PLD Linux + COMPREPLY=( $( command ls -B \ + /etc/sysconfig/interfaces | \ + sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) ) + else + # Assume Red Hat + COMPREPLY=( $( command ls \ + /etc/sysconfig/network-scripts/ifcfg-* | \ + sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) ) + fi +} + +# This function completes on all available network interfaces +# -a: restrict to active interfaces only +# -w: restrict to wireless interfaces only +# +_available_interfaces() +{ + local cmd + + if [ "${1:-}" = -w ]; then + cmd="iwconfig" + elif [ "${1:-}" = -a ]; then + cmd="ifconfig" + else + cmd="ifconfig -a" + fi + + COMPREPLY=( $( eval $cmd 2>/dev/null | \ + sed -ne 's|^\('$cur'[^[:space:][:punct:]]\{1,\}\).*$|\1|p') ) +} + +# This function expands tildes in pathnames +# +_expand() +{ + # FIXME: Why was this here? + # [ "$cur" != "${cur%\\}" ] && cur="$cur\\" + + # expand ~username type directory specifications + if [[ "$cur" == \~*/* ]]; then + eval cur=$cur + elif [[ "$cur" == \~* ]]; then + cur=${cur#\~} + COMPREPLY=( $( compgen -P '~' -u $cur ) ) + return ${#COMPREPLY[@]} + fi +} + +# This function completes on process IDs. +# AIX and Solaris ps prefers X/Open syntax. +[ $UNAME = SunOS -o $UNAME = AIX ] && +_pids() +{ + COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- $cur )) +} || +_pids() +{ + COMPREPLY=( $( compgen -W '$( command ps axo pid | sed 1d )' -- $cur ) ) +} + +# This function completes on process group IDs. +# AIX and SunOS prefer X/Open, all else should be BSD. +[ $UNAME = SunOS -o $UNAME = AIX ] && +_pgids() +{ + COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- $cur )) +} || +_pgids() +{ + COMPREPLY=( $( compgen -W '$( command ps axo pgid | sed 1d )' -- $cur )) +} + +# This function completes on user IDs +# +_uids() +{ + if type getent &>/dev/null; then + COMPREPLY=( $( getent passwd | \ + awk -F: '{if ($3 ~ /^'$cur'/) print $3}' ) ) + elif type perl &>/dev/null; then + COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($uid) = (getpwent)[2]) { print $uid . "\n" }'"'"' )' -- $cur ) ) + else + # make do with /etc/passwd + COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($3 ~ /^'$cur'/) print $3}'\ + /etc/passwd ) ) + fi +} + +# This function completes on group IDs +# +_gids() +{ + if type getent &>/dev/null; then + COMPREPLY=( $( getent group | \ + awk -F: '{if ($3 ~ /^'$cur'/) print $3}' ) ) + elif type perl &>/dev/null; then + COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($gid) = (getgrent)[2]) { print $gid . "\n" }'"'"' )' -- $cur ) ) + else + # make do with /etc/group + COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($3 ~ /^'$cur'/) print $3}'\ + /etc/group ) ) + fi +} + +# This function completes on services +# +_services() +{ + local sysvdir famdir + [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d || sysvdir=/etc/init.d + famdir=/etc/xinetd.d + COMPREPLY=( $( builtin echo $sysvdir/!(*.rpmsave|*.rpmorig|*~|functions)) ) + + if [ -d $famdir ]; then + COMPREPLY=( "${COMPREPLY[@]}" $( builtin echo $famdir/!(*.rpmsave|*.rpmorig|*~)) ) + fi + + COMPREPLY=( $( compgen -W '${COMPREPLY[@]#@($sysvdir|$famdir)/}' -- $cur ) ) +} + +# This function complete on modules +# +_modules() +{ + local modpath + modpath=/lib/modules/$1 + COMPREPLY=( $( command ls -R $modpath | \ + sed -ne 's/^\('$cur'.*\)\.k\?o\(\|.gz\)$/\1/p') ) +} + +# this function complete on user:group format +# +_usergroup() +{ + local IFS=$'\n' + cur=${cur//\\\\ / } + if [[ $cur = *@(\\:|.)* ]] && [ -n "$bash205" ]; then + user=${cur%%*([^:.])} + COMPREPLY=( $(compgen -P ${user/\\\\} -g -- ${cur##*[.:]}) ) + elif [[ $cur = *:* ]] && [ -n "$bash205" ]; then + COMPREPLY=( $( compgen -g -- ${cur##*[.:]} ) ) + else + COMPREPLY=( $( compgen -S : -u -- $cur ) ) + fi +} + +# this function count the number of mandatory args +# +_count_args() +{ + args=1 + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" != -* ]]; then + args=$(($args+1)) + fi + done +} + +# start of section containing completion functions for bash built-ins + +# bash alias completion +# +_alias() +{ + local cur + + COMPREPLY=() + cur=${COMP_WORDS[$COMP_CWORD]} + + case "$COMP_LINE" in + *[^=]) + COMPREPLY=( $( compgen -A alias -S '=' -- $cur ) ) + ;; + *=) + COMPREPLY=( "$( alias ${cur%=} 2>/dev/null | \ + sed -e 's|^alias '$cur'\(.*\)$|\1|' )" ) + ;; + esac +} +complete -F _alias $nospace alias + +# bash export completion +# +_export() +{ + local cur + + COMPREPLY=() + cur=${COMP_WORDS[$COMP_CWORD]} + + case "$COMP_LINE" in + *=\$*) + COMPREPLY=( $( compgen -v -P '$' -- ${cur#*=\$} ) ) + ;; + *[^=]) + COMPREPLY=( $( compgen -v -S '=' -- $cur ) ) + ;; + *=) + COMPREPLY=( "$( eval echo -n \"$`echo ${cur%=}`\" | + ( echo -n \' + sed -e 's/'\''/'\''\\\'\'''\''/g' + echo -n \' ) )" ) + ;; + esac +} +complete -F _export $default $nospace export + +# bash shell function completion +# +_function() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [[ $1 == @(declare|typeset) ]]; then + if [ "$prev" = -f ]; then + COMPREPLY=( $( compgen -A function -- $cur ) ) + elif [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-a -f -F -i -r -x -p' -- \ + $cur ) ) + fi + elif [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -A function -- $cur ) ) + else + COMPREPLY=( "() $( type -- ${COMP_WORDS[1]} | sed -e 1,2d )" ) + fi +} +complete -F _function function declare typeset + +# bash complete completion +# +_complete() +{ + local cur prev options + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + -o) + options="default dirnames filenames" + [ -n "$bash205b" ] && options="$options nospace" + [ -n "$bash3" ] && options="$options bashdefault plusdirs" + COMPREPLY=( $( compgen -W "$options" -- $cur ) ) + return 0 + ;; + + -A) + COMPREPLY=( $( compgen -W 'alias arrayvar binding \ + builtin command directory disabled enabled \ + export file function group helptopic hostname \ + job keyword running service setopt shopt \ + signal stopped user variable' -- $cur ) ) + return 0 + ;; + + -C) + COMPREPLY=( $( compgen -A command -- $cur ) ) + return 0 + ;; + -F) + COMPREPLY=( $( compgen -A function -- $cur ) ) + return 0 + ;; + -@(p|r)) + COMPREPLY=( $( complete -p | sed -e 's|.* ||' | \ + grep "^$cur" ) ) + return 0 + ;; + + esac + + if [[ "$cur" == -* ]]; then + # relevant options completion + options="-a -b -c -d -e -f -g -j -k -s -v -u -A -G -W -P -S -X -F -C" + [ -n "$bash205" ] && options="$options -o" + COMPREPLY=( $( compgen -W "$options" -- $cur ) ) + else + COMPREPLY=( $( compgen -A command -- $cur ) ) + fi +} +complete -F _complete complete + +# start of section containing completion functions for external programs + +# a little help for FreeBSD ports users +[ $UNAME = FreeBSD ] && complete -W 'index search fetch fetch-list \ + extract patch configure build install reinstall \ + deinstall clean clean-depends kernel buildworld' make + +# This completes on a list of all available service scripts for the +# 'service' command and/or the SysV init.d directory, followed by +# that script's available commands +# +{ have service || [ -d /etc/init.d/ ]; } && +_service() +{ + local cur sysvdir + + COMPREPLY=() + prev=${COMP_WORDS[COMP_CWORD-1]} + cur=`_get_cword` + + # don't complete for things like killall, ssh and mysql if it's + # the standalone command, rather than the init script + [[ ${COMP_WORDS[0]} != @(*init.d/!(functions|~)|service) ]] && return 0 + + # don't complete past 2nd token + [ $COMP_CWORD -gt 2 ] && return 0 + + [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \ + || sysvdir=/etc/init.d + + if [[ $COMP_CWORD -eq 1 ]] && [[ $prev == "service" ]]; then + _services + else + COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \ + s/^.*Usage.*{\(.*\)}.*$/\1/p" \ + $sysvdir/${prev##*/} 2>/dev/null`' -- $cur ) ) + fi + + return 0 +} && +complete -F _service service +[ -d /etc/init.d/ ] && complete -F _service $default \ + $(for i in /etc/init.d/*; do echo ${i##*/}; done) + +# chown(1) completion +# +_chown() +{ + local cur + cur=`_get_cword` + + # options completion + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \ + --dereference --no-dereference --from= --silent --quiet \ + --reference= --recursive --verbose --help --version' -- $cur ) ) + else + _count_args + + case $args in + 1) + _usergroup + ;; + *) + _filedir + ;; + esac + fi +} +complete -F _chown $filenames chown + +# chgrp(1) completion +# +_chgrp() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + cur=${cur//\\\\/} + prev=${COMP_WORDS[COMP_CWORD-1]} + + # options completion + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \ + --dereference --no-dereference --silent --quiet \ + --reference= --recursive --verbose --help --version' -- $cur ) ) + return 0 + fi + + # first parameter on line or first since an option? + if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]] || \ + [[ "$prev" == -* ]] && [ -n "$bash205" ]; then + local IFS=$'\n' + COMPREPLY=( $( compgen -g $cur 2>/dev/null ) ) + else + _filedir || return 0 + fi + + return 0 +} +complete -F _chgrp $filenames chgrp + +# umount(8) completion. This relies on the mount point being the third +# space-delimited field in the output of mount(8) +# +_umount() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + OLDIFS="$IFS" + IFS="\n" + COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- $cur ) ) + IFS="$OLDIFS" + + return 0 +} +complete -F _umount $dirnames umount + +# mount(8) completion. This will pull a list of possible mounts out of +# /etc/{,v}fstab, unless the word being completed contains a ':', which +# would indicate the specification of an NFS server. In that case, we +# query the server for a list of all available exports and complete on +# that instead. +# +_mount() +{ local cur i sm host + + COMPREPLY=() + cur=`_get_cword` + [[ "$cur" == \\ ]] && cur="/" + + for i in {,/usr}/{,s}bin/showmount; do [ -x $i ] && sm=$i && break; done + + if [ -n "$sm" ] && [[ "$cur" == *:* ]]; then + COMPREPLY=( $( $sm -e ${cur%%:*} | sed 1d | \ + grep ^${cur#*:} | awk '{print $1}' ) ) + elif [[ "$cur" == //* ]]; then + host=${cur#//} + host=${host%%/*} + if [ -n "$host" ]; then + COMPREPLY=( $( compgen -W "$( echo $( smbclient -d 0 -NL $host 2>/dev/null| + sed -ne '/^['"$'\t '"']*Sharename/,/^$/p' | + sed -ne '3,$s|^[^A-Za-z]*\([^'"$'\t '"']*\).*$|//'$host'/\1|p' ) )" -- "$cur" ) ) + fi + elif [ -r /etc/vfstab ]; then + # Solaris + COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' \ + /etc/vfstab | grep "^$cur" ) ) + elif [ ! -e /etc/fstab ]; then + # probably Cygwin + COMPREPLY=( $( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' \ + | grep "^$cur" ) ) + else + # probably Linux + COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' \ + /etc/fstab | grep "^$cur" ) ) + fi + + return 0 +} +complete -F _mount $default $filenames mount + +# Linux rmmod(8) completion. This completes on a list of all currently +# installed kernel modules. +# +have rmmod && { +_rmmod() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + COMPREPLY=( $( /sbin/lsmod | \ + awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' 2>/dev/null )) + return 0 +} +complete -F _rmmod rmmod + +# Linux insmod(8), modprobe(8) and modinfo(8) completion. This completes on a +# list of all available modules for the version of the kernel currently +# running. +# +_insmod() +{ + local cur prev modpath + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + # behave like lsmod for modprobe -r + if [ $1 = "modprobe" ] && + [ "${COMP_WORDS[1]}" = "-r" ]; then + COMPREPLY=( $( /sbin/lsmod | \ + awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' ) ) + return 0 + fi + + # do filename completion if we're giving a path to a module + if [[ "$cur" == */* ]]; then + _filedir '@(?(k)o?(.gz))' + return 0 + fi + + if [ $COMP_CWORD -gt 1 ] && + [[ "${COMP_WORDS[COMP_CWORD-1]}" != -* ]]; then + # do module parameter completion + COMPREPLY=( $( /sbin/modinfo -p ${COMP_WORDS[1]} 2>/dev/null | \ + awk '{if ($1 ~ /^parm:/ && $2 ~ /^'$cur'/) { print $2 } \ + else if ($1 !~ /:/ && $1 ~ /^'$cur'/) { print $1 }}' ) ) + else + _modules $(uname -r) + fi + + return 0 +} +complete -F _insmod $filenames insmod modprobe modinfo +} + +# man(1) completion +# +[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \ + -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \ + -o $UNAME = OpenBSD ] && +_man() +{ + local cur prev sect manpath UNAME + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + _expand || return 0 + + # default completion if parameter contains / + if [[ "$cur" == */* ]]; then + _filedir + return 0 + fi + + UNAME=$( uname -s ) + # strip OS type and version under Cygwin + UNAME=${UNAME/CYGWIN_*/Cygwin} + if [ $UNAME = GNU -o $UNAME = Linux -o $UNAME = FreeBSD \ + -o $UNAME = Cygwin ]; then + manpath=$( manpath 2>/dev/null || command man --path ) + else + manpath=$MANPATH + fi + + if [ -z "$manpath" ]; then + COMPREPLY=( $( compgen -c -- $cur ) ) + return 0 + fi + + # determine manual section to search + [[ "$prev" == [0-9ln] ]] && sect=$prev || sect='*' + + manpath=$manpath: + if [ -n "$cur" ]; then + manpath="${manpath//://*man$sect/$cur* } ${manpath//://*cat$sect/$cur* }" + else + manpath="${manpath//://*man$sect/ } ${manpath//://*cat$sect/ }" + fi + + # redirect stderr for when path doesn't exist + COMPREPLY=( $( eval command ls "$manpath" 2>/dev/null ) ) + # weed out directory path names and paths to man pages + COMPREPLY=( ${COMPREPLY[@]##*/?(:)} ) + # strip suffix from man pages + COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2)} ) + COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) ) + + [[ "$prev" != [0-9ln] ]] && _filedir '[0-9ln]' + + return 0 +} +[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \ + -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \ + -o $UNAME = OpenBSD ] && \ +complete -F _man $filenames man apropos whatis + +# renice(8) completion +# +_renice() +{ + local command cur curopt i + + COMPREPLY=() + cur=`_get_cword` + command=$1 + + i=0 + # walk back through command line and find last option + while [ $i -le $COMP_CWORD -a ${#COMPREPLY[@]} -eq 0 ]; do + curopt=${COMP_WORDS[COMP_CWORD-$i]} + case "$curopt" in + -u) + COMPREPLY=( $( compgen -u -- $cur ) ) + ;; + -g) + _pgids + ;; + -p|$command) + _pids + ;; + esac + i=$(( ++i )) + done +} +complete -F _renice renice + +# kill(1) completion +# +_kill() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then + # return list of available signals + _signals + else + # return list of available PIDs + _pids + fi +} +complete -F _kill kill + +# Linux and FreeBSD killall(1) completion. +# +[ $UNAME = Linux -o $UNAME = FreeBSD ] && +_killall() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then + _signals + else + COMPREPLY=( $( compgen -W '$( command ps axo command | \ + sed -ne "1d; s/^\[\?\([^-][^] ]*\).*$/\1/p" | \ + sed -e "s/.*\///" )' -- $cur ) ) + fi + + return 0 +} +[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _killall killall pkill + +# Linux and FreeBSD pgrep(1) completion. +# +[ $UNAME = Linux -o $UNAME = FreeBSD ] && +_pgrep() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + COMPREPLY=( $( compgen -W '$( command ps axo command | \ + sed -ne "1d; s/^\[\?\([^-][^] ]*\).*$/\1/p" | \ + sed -e "s/.*\///" )' -- $cur ) ) + + return 0 +} +[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _pgrep pgrep +# Linux pidof(8) completion. +[ $UNAME = Linux ] && complete -F _pgrep pidof + +# GNU find(1) completion. This makes heavy use of ksh style extended +# globs and contains Linux specific code for completing the parameter +# to the -fstype option. +# +_find() +{ + local cur prev i exprfound onlyonce + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(max|min)depth) + COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- $cur ) ) + return 0 + ;; + -?(a|c)newer|-fls|-fprint?(0|f)|-?(i)?(l)name|-?(i)wholename) + _filedir + return 0 + ;; + -fstype) + # this is highly non-portable + [ -e /proc/filesystems ] && + COMPREPLY=( $( cut -d$'\t' -f 2 /proc/filesystems | \ + grep "^$cur" ) ) + return 0 + ;; + -gid) + _gids + return 0 + ;; + -group) + if [ -n "$bash205" ]; then + COMPREPLY=( $( compgen -g -- $cur 2>/dev/null) ) + fi + return 0 + ;; + -?(x)type) + COMPREPLY=( $( compgen -W 'b c d p f l s' -- $cur ) ) + return 0 + ;; + -uid) + _uids + return 0 + ;; + -user) + COMPREPLY=( $( compgen -u -- $cur ) ) + return 0 + ;; + -exec|-ok) + COMP_WORDS=(COMP_WORDS[0] $cur) + COMP_CWORD=1 + _command + return 0 + ;; + -[acm]min|-[acm]time|-?(i)?(l)name|-inum|-?(i)path|-?(i)regex| \ + -links|-perm|-size|-used|-printf) + # do nothing, just wait for a parameter to be given + return 0 + ;; + esac + + _expand || return 0 + + # set exprfound to 1 if there is already an expression present + for i in ${COMP_WORDS[@]}; do + [[ "$i" = [-\(\),\!]* ]] && exprfound=1 && break + done + + # handle case where first parameter is not a dash option + if [ "$exprfound" != 1 ] && [[ "$cur" != [-\(\),\!]* ]]; then + _filedir -d + return 0 + fi + + # complete using basic options + COMPREPLY=( $( compgen -W '-daystart -depth -follow -help -maxdepth \ + -mindepth -mount -noleaf -version -xdev -amin -anewer \ + -atime -cmin -cnewer -ctime -empty -false -fstype \ + -gid -group -ilname -iname -inum -ipath -iregex \ + -wholename \ + -links -lname -mmin -mtime -name -newer -nouser \ + -nogroup -perm -regex -size -true -type -uid -used \ + -user -xtype -exec -fls -fprint -fprint0 -fprintf -ok \ + -print -print0 -printf -prune -ls' -- $cur ) ) + + # this removes any options from the list of completions that have + # already been specified somewhere on the command line, as long as + # these options can only be used once (in a word, "options", in + # opposition to "tests" and "actions", as in the find(1) manpage). + onlyonce=' -daystart -depth -follow -help -maxdepth -mindepth -mount \ + -noleaf -version -xdev ' + COMPREPLY=( $( echo "${COMP_WORDS[@]}" | \ + (while read -d ' ' i; do + [ "$i" == "" ] || + [ "${onlyonce/ ${i%% *} / }" == "$onlyonce" ] && + continue + # flatten array with spaces on either side, + # otherwise we cannot grep on word boundaries of + # first and last word + COMPREPLY=" ${COMPREPLY[@]} " + # remove word from list of completions + COMPREPLY=( ${COMPREPLY/ ${i%% *} / } ) + done + echo "${COMPREPLY[@]}") + ) ) + + _filedir + + return 0 +} +complete -F _find $filenames find + +# Linux iwconfig(8) completion +# +[ $UNAME = Linux ] && have iwconfig && +_iwconfig() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + mode) + COMPREPLY=( $( compgen -W 'managed ad-hoc master \ + repeater secondary monitor' -- $cur ) ) + return 0 + ;; + essid) + COMPREPLY=( $( compgen -W 'on off any' -- $cur ) ) + if [ -n "${COMP_IWLIST_SCAN:-}" ]; then + COMPREPLY=( "${COMPREPLY[@]}" \ + $( iwlist ${COMP_WORDS[1]} scan | \ + awk -F '"' '/ESSID/ {print $2}' | \ + grep "^$cur" )) + fi + return 0 + ;; + nwid) + COMPREPLY=( $( compgen -W 'on off' -- $cur ) ) + return 0 + ;; + channel) + COMPREPLY=( $( iwlist ${COMP_WORDS[1]} channel | \ + awk '/^[[:space:]]*Channel/ {print $2}' | \ + grep "^$cur" ) ) + return 0 + ;; + + freq) + COMPREPLY=( $( iwlist ${COMP_WORDS[1]} channel | \ + awk '/^[[:space:]]*Channel/ {print $4"G"}' | \ + grep "^$cur" ) ) + return 0 + ;; + ap) + COMPREPLY=( $( compgen -W 'on off any' -- $cur ) ) + if [ -n "${COMP_IWLIST_SCAN:-}" ]; then + COMPREPLY=( "${COMPREPLY[@]}" \ + $( iwlist ${COMP_WORDS[1]} scan | \ + awk -F ': ' '/Address/ {print $2}' | \ + grep "^$cur" ) ) + fi + return 0 + ;; + rate) + COMPREPLY=( $( compgen -W 'auto fixed' -- $cur ) ) + COMPREPLY=( "${COMPREPLY[@]}" \ + $( iwlist ${COMP_WORDS[1]} rate | \ + awk '/^[[:space:]]*[0-9]/ {print $1"M"}' | \ + grep "^$cur" ) ) + return 0 + ;; + rts) + COMPREPLY=( $( compgen -W 'auto fixed off' -- $cur ) ) + return 0 + ;; + frag) + COMPREPLY=( $( compgen -W 'auto fixed off' -- $cur ) ) + return 0 + ;; + key) + COMPREPLY=( $( compgen -W 'off on open restricted' -- $cur ) ) + return 0 + ;; + enc) + COMPREPLY=( $( compgen -W 'off on open restricted' -- $cur ) ) + return 0 + ;; + power) + COMPREPLY=( $( compgen -W 'period timeout off on' -- $cur ) ) + return 0 + ;; + txpower) + COMPREPLY=( $( compgen -W 'off on auto' -- $cur ) ) + return 0 + ;; + retry) + COMPREPLY=( $( compgen -W 'limit lifetime' -- $cur ) ) + return 0 + ;; + esac + + if [ $COMP_CWORD -eq 1 ]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--help --version' -- $cur ) ) + else + _available_interfaces -w + fi + else + COMPREPLY=( $( compgen -W 'essid nwid mode freq channel sens mode \ + ap nick rate rts frag enc key power txpower commit' -- $cur ) ) + fi + +} && +complete -F _iwconfig iwconfig + +# Linux iwlist(8) completion +# +[ $UNAME = Linux ] && have iwlist && +_iwlist() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [ $COMP_CWORD -eq 1 ]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--help --version' -- $cur ) ) + else + _available_interfaces -w + fi + else + COMPREPLY=( $( compgen -W 'scan scanning freq frequency \ + channel rate bit bitrate key enc encryption power \ + txpower retry ap accesspoint peers event' -- $cur ) ) + fi +} && +complete -F _iwlist iwlist + +# Linux iwspy(8) completion +# +[ $UNAME = Linux ] && have iwspy && +_iwspy() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD -eq 1 ]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--help --version' -- $cur ) ) + else + _available_interfaces -w + fi + else + COMPREPLY=( $( compgen -W 'setthr getthr off' -- $cur ) ) + fi +} && +complete -F _iwspy iwspy + +# Linux iwpriv(8) completion +# +[ $UNAME = Linux ] && have iwpriv && +_iwpriv() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + roam) + COMPREPLY=( $( compgen -W 'on off' -- $cur ) ) + return 0 + ;; + port) + COMPREPLY=( $( compgen -W 'ad-hoc managed' -- $cur ) ) + return 0 + ;; + esac + + if [ $COMP_CWORD -eq 1 ]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--help --version' -- $cur ) ) + else + _available_interfaces -w + fi + else + COMPREPLY=( $( compgen -W '--all roam port' -- $cur ) ) + fi +} && +complete -F _iwpriv iwpriv + +# RedHat & Debian GNU/Linux if{up,down} completion +# +[ $UNAME = Linux ] && { have ifup || have ifdown; } && +_ifupdown() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD -eq 1 ]; then + _configured_interfaces + COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") ) + fi + + return 0 +} && +complete -F _ifupdown ifup ifdown +[ $UNAME = Linux ] && have ifstatus && complete -F _ifupdown ifstatus + +# Linux ipsec(8) completion (for FreeS/WAN) +# +[ $UNAME = Linux ] && have ipsec && +_ipsec() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look \ + manual pluto ranbits rsasigkey \ + setup showdefaults showhostkey spi \ + spigrp tncfg whack' -- $cur ) ) + return 0 + fi + + case ${COMP_WORDS[1]} in + auto) + COMPREPLY=( $( compgen -W '--asynchronous --up --add --delete \ + --replace --down --route --unroute \ + --ready --status --rereadsecrets' \ + -- $cur ) ) + ;; + manual) + COMPREPLY=( $( compgen -W '--up --down --route --unroute \ + --union' -- $cur ) ) + ;; + ranbits) + COMPREPLY=( $( compgen -W '--quick --continuous --bytes' \ + -- $cur ) ) + ;; + setup) + COMPREPLY=( $( compgen -W '--start --stop --restart' -- $cur ) ) + ;; + + *) + ;; + esac + + return 0 +} && +complete -F _ipsec ipsec + +# Postfix completion. +# +have postfix && { +# postfix(1) +# +_postfix() +{ + local cur prev + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [[ $cur == '-' ]]; then + COMPREPLY=(-c -D -v) + return 0 + fi + if [[ $prev == '-c' ]]; then + _filedir -d + return 0 + fi + if [[ $prev == '-D' ]]; then + COMPREPLY=( $( compgen -W 'start' -- "`get_cword`" ) ) + return 0 + fi + COMPREPLY=( $( compgen -W 'start stop reload abort flush check' -- \ + "`get_cword`" ) ) +} +complete -F _postfix postfix + +# postalias(1) and postmap(1) +# +_postmap() +{ + local cur prev len idx + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [[ $cur == '-' ]]; then + COMPREPLY=(-N -f -i -n -o -p -r -v -w -c -d -q) + return 0 + fi + if [[ $prev == '-c' ]]; then + _filedir -d + return 0 + fi + if [[ $prev == -[dq] ]]; then + return 0 + fi + + if [[ "$cur" == *:* ]]; then + COMPREPLY=( $( compgen -f -- ${cur#*:} ) ) + else + len=${#cur} + idx=0 + for pval in $( /usr/sbin/postconf -m ); do + if [[ "$cur" == "${pval:0:$len}" ]]; then + COMPREPLY[$idx]="$pval:" + idx=$(($idx+1)) + fi + done + if [[ $idx -eq 0 ]]; then + COMPREPLY=( $( compgen -f -- "$cur" ) ) + fi + fi + return 0 +} +complete -F _postmap postmap postalias + +# postcat(1) +# +_postcat() +{ + local cur prev pval len idx qfile + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [[ $cur == '-' ]]; then + COMPREPLY=(-c -q -v) + return 0 + fi + if [[ $prev == '-c' ]]; then + _filedir -d + return 0 + fi + + qfile=0 + for idx in "${COMP_WORDS[@]}"; do + [[ "$idx" = -q ]] && qfile=1 && break + done + if [[ $qfile == 1 ]]; then + len=${#cur} + idx=0 + for pval in $( mailq | \ + sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* !].*$//' ); do + if [[ "$cur" == "${pval:0:$len}" ]]; then + COMPREPLY[$idx]=$pval + idx=$(($idx+1)) + fi + done + return 0 + else + _filedir + return 0 + fi +} +complete -F _postcat postcat + +# postconf(1) +# +_postconf() +{ + local cur prev pval len idx eqext + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + if [[ $cur == '-' ]]; then + COMPREPLY=(-c -d -e -h -m -l -n -v) + return 0 + fi + if [[ $prev == '-c' ]]; then + _filedir -d + return 0 + fi + if [[ $prev == '-e' ]]; then + cur=${cur#[\"\']} + eqext='=' + fi + len=${#cur} + idx=0 + for pval in $( /usr/sbin/postconf | cut -d ' ' -f 1 ); do + if [[ "$cur" == "${pval:0:$len}" ]]; then + COMPREPLY[$idx]="$pval$eqext" + idx=$(($idx+1)) + fi + done + return 0 +} +complete -F _postconf postconf + +# postsuper(1) +# +_postsuper() +{ + local cur prev pval len idx + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [[ $cur == '-' ]]; then + COMPREPLY=(-c -d -h -H -p -r -s -v) + return 0 + fi + case $prev in + -[dr]) + len=${#cur} + idx=0 + for pval in $( echo ALL; mailq | \ + sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* !].*$//' ); do + if [[ "$cur" == "${pval:0:$len}" ]]; then + COMPREPLY[$idx]=$pval + idx=$(($idx+1)) + fi + done + return 0 + ;; + -h) + len=${#cur} + idx=0 + for pval in $( echo ALL; mailq | \ + sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* ].*$//; /!$/d' ); do + if [[ "$cur" == "${pval:0:$len}" ]]; then + COMPREPLY[$idx]=$pval + idx=$(($idx+1)) + fi + done + return 0 + ;; + -H) + len=${#cur} + idx=0 + for pval in $( echo ALL; mailq | \ + sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//' ); do + if [[ "$cur" == "${pval:0:$len}" ]]; then + COMPREPLY[$idx]=$pval + idx=$(($idx+1)) + fi + done + return 0 + ;; + esac + COMPREPLY=( $( compgen -W 'hold incoming active deferred' -- $cur ) ) + return 0 +} +complete -F _postsuper postsuper +} + +# cvs(1) completion +# +have cvs && { +set_prefix() +{ + [ -z ${prefix:-} ] || prefix=${cur%/*}/ + [ -r ${prefix:-}CVS/Entries ] || prefix="" +} + +get_entries() +{ + local IFS=$'\n' + [ -r ${prefix:-}CVS/Entries ] && \ + entries=$(cut -d/ -f2 -s ${prefix:-}CVS/Entries) +} + +get_modules() +{ + if [ -n "$prefix" ]; then + COMPREPLY=( $( command ls -d ${cvsroot}/${prefix}/!(CVSROOT) ) ) + else + COMPREPLY=( $( command ls -d ${cvsroot}/!(CVSROOT) ) ) + fi +} + +_cvs() +{ + local cur count mode i cvsroot cvsroots pwd + local -a flags miss files entries changed newremoved + + COMPREPLY=() + cur=`_get_cword` + + count=0 + for i in "${COMP_WORDS[@]}"; do + [ $count -eq $COMP_CWORD ] && break + # Last parameter was the CVSROOT, now go back to mode selection + if [ "${COMP_WORDS[((count))]}" == "$cvsroot" -a "$mode" == "cvsroot" ]; then + mode="" + fi + if [ -z "$mode" ]; then + case $i in + -d) + mode=cvsroot + cvsroot=${COMP_WORDS[((count+1))]} + ;; + @(ad?(d)|new)) + mode=add + ;; + @(adm?(in)|rcs)) + mode=admin + ;; + ann?(notate)) + mode=annotate + ;; + @(checkout|co|get)) + mode=checkout + ;; + @(com?(mit)|ci)) + mode=commit + ;; + di?(f?(f))) + mode=diff + ;; + ex?(p?(ort))) + mode=export + ;; + ?(un)edit) + mode=$i + ;; + hi?(s?(tory))) + mode=history + ;; + im?(p?(ort))) + mode=import + ;; + re?(l?(ease))) + mode=release + ;; + ?(r)log) + mode=log + ;; + @(rdiff|patch)) + mode=rdiff + ;; + @(remove|rm|delete)) + mode=remove + ;; + @(rtag|rfreeze)) + mode=rtag + ;; + st?(at?(us))) + mode=status + ;; + @(tag|freeze)) + mode=tag + ;; + up?(d?(ate))) + mode=update + ;; + *) + ;; + esac + elif [[ "$i" = -* ]]; then + flags=( "${flags[@]}" $i ) + fi + count=$((++count)) + done + + case "$mode" in + add) + if [[ "$cur" != -* ]]; then + set_prefix + if [ $COMP_CWORD -gt 1 -a -r ${prefix:-}CVS/Entries ]; then + get_entries + [ -z "$cur" ] && \ + files=$( command ls -Ad !(CVS) ) || \ + files=$( command ls -d ${cur}* 2>/dev/null ) + for i in "${entries[@]}"; do + files=( ${files[@]/#$i//} ) + done + COMPREPLY=( $( compgen -W '${files[@]}' -- \ + $cur ) ) + fi + else + COMPREPLY=( $( compgen -W '-k -m' -- $cur ) ) + fi + ;; + admin) + if [[ "$cur" = -* ]]; then + COMPREPLY=( $( compgen -W '-i -a -A -e -b -c -k -l -u \ + -L -U -m -M -n -N -o -q -I \ + -s -t -t- -T -V -x -z' -- \ + $cur ) ) + fi + ;; + annotate) + if [[ "$cur" = -* ]]; then + COMPREPLY=( $( compgen -W '-D -F -f -l -R -r' -- $cur ) ) + else + get_entries + COMPREPLY=( $( compgen -W '${entries[@]}' -- $cur ) ) + fi + ;; + checkout) + if [[ "$cur" != -* ]]; then + [ -z "$cvsroot" ] && cvsroot=$CVSROOT + COMPREPLY=( $( cvs -d "$cvsroot" co -c 2> /dev/null | \ + awk '{print $1}' ) ) + COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) ) + else + COMPREPLY=( $( compgen -W '-A -N -P -R -c -f -l -n -p \ + -s -r -D -d -k -j' -- $cur ) ) + fi + ;; + commit) + set_prefix + + if [[ "$cur" != -* ]] && [ -r ${prefix:-}CVS/Entries ]; then + # if $COMP_CVS_REMOTE is not null, 'cvs commit' will + # complete on remotely checked-out files (requires + # passwordless access to the remote repository + if [ -n "${COMP_CVS_REMOTE:-}" ]; then + # this is the least computationally intensive + # way found so far, but other changes + # (something other than changed/removed/new) + # may be missing + changed=( $( cvs -q diff --brief 2>&1 | \ + sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' ) ) + newremoved=( $( cvs -q diff --brief 2>&1 | \ + sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' ) ) + COMPREPLY=( $( compgen -W '${changed[@]:-} \ + ${newremoved[@]:-}' -- $cur ) ) + else + _filedir + fi + else + COMPREPLY=( $( compgen -W '-n -R -l -f -F -m -r' -- \ + $cur ) ) + fi + ;; + cvsroot) + if [ -r ~/.cvspass ]; then + # Ugly escaping because of bash treating ':' specially + cvsroots=$( sed 's/^[^ ]* //; s/:/\\:/g' ~/.cvspass ) + COMPREPLY=( $( compgen -W '$cvsroots' -- $cur ) ) + fi + ;; + export) + if [[ "$cur" != -* ]]; then + [ -z "$cvsroot" ] && cvsroot=$CVSROOT + COMPREPLY=( $( cvs -d "$cvsroot" co -c | awk '{print $1}' ) ) + COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) ) + else + COMPREPLY=( $( compgen -W '-N -f -l -R -n \ + -r -D -d -k' -- $cur ) ) + fi + ;; + diff) + if [[ "$cur" == -* ]]; then + _longopt diff + else + get_entries + COMPREPLY=( $( compgen -W '${entries[@]:-}' -- $cur ) ) + fi + ;; + remove) + if [[ "$cur" != -* ]]; then + set_prefix + if [ $COMP_CWORD -gt 1 -a -r ${prefix:-}CVS/Entries ]; then + get_entries + # find out what files are missing + for i in "${entries[@]}"; do + [ ! -r "$i" ] && miss=( "${miss[@]}" $i ) + done + COMPREPLY=( $(compgen -W '${miss[@]:-}' -- $cur) ) + fi + else + COMPREPLY=( $( compgen -W '-f -l -R' -- $cur ) ) + fi + ;; + import) + if [[ "$cur" != -* ]]; then + # starts with same algorithm as checkout + [ -z "$cvsroot" ] && cvsroot=$CVSROOT + prefix=${cur%/*} + if [ -r ${cvsroot}/${prefix} ]; then + get_modules + COMPREPLY=( ${COMPREPLY[@]#$cvsroot} ) + COMPREPLY=( ${COMPREPLY[@]#\/} ) + fi + pwd=$( pwd ) + pwd=${pwd##*/} + COMPREPLY=( $( compgen -W '${COMPREPLY[@]} $pwd' -- \ + $cur ) ) + else + COMPREPLY=( $( compgen -W '-d -k -I -b -m -W' -- $cur )) + fi + ;; + update) + if [[ "$cur" = -* ]]; then + COMPREPLY=( $( compgen -W '-A -P -C -d -f -l -R -p \ + -k -r -D -j -I -W' -- \ + $cur ) ) + fi + ;; + "") + COMPREPLY=( $( compgen -W 'add admin annotate checkout ci co \ + commit diff delete edit export \ + freeze get history import log new \ + patch rcs rdiff release remove \ + rfreeze rlog rm rtag stat status \ + tag unedit up update -H -Q -q -b \ + -d -e -f -l -n -t -r -v -w -x -z \ + --help --version' -- $cur ) ) + ;; + *) + ;; + esac + + return 0 +} +complete -F _cvs $default cvs +} + +have rpm && { +# helper functions for rpm completion +# +_rpm_installed_packages() +{ + local ver nodig nosig + + if [ -r /var/log/rpmpkgs -a \ + /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then + # using RHL 7.2 or later - this is quicker than querying the DB + COMPREPLY=( $( sed -ne \ + 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \ + /var/log/rpmpkgs ) ) + else + nodig="" + nosig="" + ver=$(rpm --version) + ver=${ver##* } + + if [[ "$ver" > "4.0.4" ]]; then + nodig="--nodigest" + fi + if [[ "$ver" > "4.0.99" ]]; then + nosig="--nosignature" + fi + + COMPREPLY=( $( rpm -qa $nodig $nosig | sed -ne \ + 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+$|\1|p' ) ) + fi +} + +_rpm_groups() +{ + local IFS=$'\t' + # remove trailing backslash, or grep will complain + cur=${cur%"\\"} + COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat '%{group}\n' | \ + grep "^$cur" ) ) + # backslash escape spaces and translate newlines to tabs + COMPREPLY=( $( echo "${COMPREPLY[@]}" | sed 's/ /\\ /g' | tr '\n' '\t' ) ) +} + +# rpm(8) completion +# +_rpm() +{ + local cur prev ver nodig nosig + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + nodig="" + nosig="" + ver=$(rpm --version); ver=${ver##* } + + if [[ "$ver" > "4.0.4" ]]; then + nodig="--nodigest" + fi + if [[ "$ver" > "4.0.99" ]]; then + nosig="--nosignature" + fi + + if [ $COMP_CWORD -eq 1 ]; then + # first parameter on line + case "$cur" in + -b*) + COMPREPLY=( $( compgen -W '-ba -bb -bc -bi -bl -bp -bs'\ + -- $cur ) ) + ;; + -t*) + COMPREPLY=( $( compgen -W '-ta -tb -tc -ti -tl -tp -ts'\ + -- $cur ) ) + ;; + --*) + COMPREPLY=( $( compgen -W '--help --version --initdb \ + --checksig --recompile --rebuild --resign --addsign \ + --rebuilddb --showrc --setperms --setugids --tarbuild \ + --eval --install --upgrade --query --freshen --erase \ + --verify --querytags --rmsource --rmspec --clean \ + --import' -- $cur ) ) + ;; + *) + COMPREPLY=( $( compgen -W '-b -e -F -i -q -t -U -V' \ + -- $cur ) ) + ;; + esac + + return 0 + fi + + case "$prev" in + --@(@(db|exclude)path|prefix|relocate|root)) + _filedir -d + return 0 + ;; + --eval) + # get a list of macros + COMPREPLY=( $( sed -ne 's|^\(%'${cur#\%}'[^ '$'\t'']*\).*$|\1|p' \ + /usr/lib/rpm/macros ) ) + return 0 + ;; + --pipe) + COMPREPLY=( $( compgen -c -- $cur ) ) + return 0 + ;; + --rcfile) + _filedir + return 0 + ;; + --specfile) + # complete on .spec files + _filedir spec + return 0 + ;; + --whatprovides) + if [[ "$cur" == */* ]]; then + _filedir + else + # complete on capabilities + COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat \ + '%{providename}\n' | grep "^$cur" ) ) + fi + return 0 + ;; + --whatrequires) + # complete on capabilities + COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat \ + '%{requirename}\n' | grep "^$cur" ) ) + return 0 + ;; + esac + + case "${COMP_WORDS[1]}" in + -@([iFU]*|-install|-freshen|-upgrade)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--percent --force --test \ + --replacepkgs --replacefiles --root --excludedocs \ + --includedocs --noscripts --rcfile --ignorearch \ + --dbpath --prefix --ignoreos --nodeps --allfiles \ + --ftpproxy --ftpport --justdb --httpproxy --httpport \ + --noorder --relocate --badreloc --notriggers \ + --excludepath --ignoresize --oldpackage --define \ + --eval --pipe --queryformat --repackage --nosuggests \ + --nodigest --nosignature' -- $cur ) ) + else + _filedir 'rpm' + fi + ;; + -@(e|-erase)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--allmatches --noscripts \ + --notriggers --nodeps --test --repackage' -- $cur ) ) + else + _rpm_installed_packages + fi + ;; + -@(q*|-query)) + # check whether we're doing file completion + if [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--scripts --root \ + --rcfile --requires --ftpport --ftpproxy \ + --httpproxy --httpport --provides --triggers \ + --dump --changelog --dbpath \ + --last --filesbypkg \ + --info --list --state \ + --docfiles --configfiles --queryformat \ + --conflicts --obsoletes \ + --nodigest --nosignature \ + --triggerscripts' -- $cur ) ) + else + _filedir + fi + elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then + _rpm_groups + elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then + # uninstalled package completion + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--scripts --root \ + --rcfile --whatprovides --whatrequires \ + --requires --triggeredby --ftpport --ftpproxy \ + --httpproxy --httpport --provides --triggers \ + --dump --changelog --dbpath --filesbypkg \ + --define --eval --pipe --showrc --info --list \ + --state --docfiles --configfiles --queryformat\ + --conflicts --obsoletes --nodigest \ + --nosignature' -- $cur ) ) + else + _filedir 'rpm' + fi + else + # installed package completion + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--scripts --root \ + --rcfile --whatprovides --whatrequires \ + --requires --triggeredby --ftpport --ftpproxy \ + --httpproxy --httpport --provides --triggers \ + --dump --changelog --dbpath --specfile \ + --querybynumber --last --filesbypkg --define \ + --eval --pipe --showrc --info --list --state \ + --docfiles --configfiles --queryformat \ + --conflicts --obsoletes --pkgid --hdrid \ + --fileid --tid --nodigest --nosignature \ + --triggerscripts' -- $cur ) ) + elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then + _rpm_installed_packages + fi + fi + ;; + -@(K*|-checksig)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5 \ + --nodigest --nosignature' -- $cur ) ) + else + _filedir 'rpm' + fi + ;; + -@([Vy]*|-verify)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--root --rcfile --dbpath \ + --nodeps --nogroup --nolinkto --nomode --nomtime \ + --nordev --nouser --nofiles --noscripts --nomd5 \ + --querytags --specfile --whatrequires --whatprovides \ + --nodigest --nosignature' -- $cur ) ) + # check whether we're doing file completion + elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then + _filedir + elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then + _rpm_groups + elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then + _filedir 'rpm' + else + _rpm_installed_packages + fi + ;; + -[bt]*) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--short-circuit --timecheck \ + --clean --rmsource --rmspec --test --sign --buildroot \ + --target -- buildarch --buildos --nobuild --nodeps \ + --nodirtokens' -- $cur ) ) + elif [[ ${COMP_WORDS[1]} == -b* ]]; then + _filedir 'spec' + else + _filedir '@(tgz|tar.@(gz|bz2))' + fi + ;; + --re@(build|compile)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--nodeps --rmsource \ + --rmspec --sign --nodirtokens --target' -- $cur ) ) + else + _filedir '?(no)src.rpm' + fi + ;; + --tarbuild) + _filedir '@(tgz|tar.@(gz|bz2))' + ;; + --@(re|add)sign) + _filedir 'rpm' + ;; + --set@(perms|gids)) + _rpm_installed_packages + ;; + --@(clean|rms@(ource|pec))) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--clean --rmsource \ + --rmspec' -- $cur ) ) + else + _filedir 'spec' + fi + ;; + --@(import|dbpath|root)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--import --dbpath --root' \ + -- $cur ) ) + else + _filedir + fi + ;; + esac + + return 0 +} +complete -F _rpm $filenames rpm rpmbuild +} + +# Debian apt-get(8) completion. +# +have apt-get && +_apt_get() +{ + local cur prev special i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @(install|remove|purge|source|build-dep) ]]; then + special=${COMP_WORDS[i]} + fi + done + + if [ -n "$special" ]; then + case $special in + remove|purge) + if [ -f /etc/debian_version ]; then + # Debian system + COMPREPLY=( $( _comp_dpkg_installed_packages \ + $cur ) ) + else + # assume RPM based + _rpm_installed_packages + fi + return 0 + ;; + *) + COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) ) + return 0 + ;; + + esac + fi + + case "$prev" in + -@(c|-config-file)) + _filedir + return 0 + ;; + + -@(t|-target-release|-default-release)) + COMPREPLY=( $( apt-cache policy | \ + grep "release.o=Debian,a=$cur" | \ + sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2> /dev/null) ) + return 0 + ;; + + esac + + if [[ "$cur" == -* ]]; then + + COMPREPLY=( $( compgen -W '-d -f -h -v -m -q -s -y \ + -u -t -b -c -o --download-only --fix-broken \ + --help --version --ignore-missing \ + --fix-missing --no-download --quiet --simulate \ + --just-print --dry-run --recon --no-act --yes \ + --assume-yes --show-upgraded --only-source \ + --compile --build --ignore-hold \ + --target-release --no-upgrade --force-yes \ + --print-uris --purge --reinstall \ + --list-cleanup --default-release \ + --trivial-only --no-remove --diff-only \ + --tar-only --config-file --option --auto-remove' -- $cur ) ) + else + + COMPREPLY=( $( compgen -W 'update upgrade dselect-upgrade \ + dist-upgrade install remove purge source \ + build-dep check clean autoclean autoremove' \ + -- $cur ) ) + + fi + + + return 0 +} && +complete -F _apt_get $filenames apt-get + +# Debian apt-cache(8) completion. +# +have apt-cache && +_apt_cache() +{ + local cur prev special i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + + if [ "$cur" != show ]; then + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @(add|depends|dotty|policy|rdepends|madison|show?(pkg|src|)) ]]; then + special=${COMP_WORDS[i]} + fi + done + fi + + + if [ -n "$special" ]; then + case $special in + add) + _filedir + return 0 + ;; + + *) + COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) ) + return 0 + ;; + + esac + fi + + + case "$prev" in + -@(c|p|s|-config-file|-@(pkg|src)-cache)) + _filedir + return 0 + ;; + search) + if [[ "$cur" != -* ]]; then + return 0 + fi + ;; + esac + + if [[ "$cur" == -* ]]; then + + COMPREPLY=( $( compgen -W '-h -v -p -s -q -i -f -a -g -c \ + -o --help --version --pkg-cache --src-cache \ + --quiet --important --full --all-versions \ + --no-all-versions --generate --no-generate \ + --names-only --all-names --recurse \ + --config-file --option' -- $cur ) ) + else + + COMPREPLY=( $( compgen -W 'add gencaches show showpkg showsrc \ + stats dump dumpavail unmet search search \ + depends rdepends pkgnames dotty xvcg \ + policy madison' -- $cur ) ) + + fi + + + return 0 +} && +complete -F _apt_cache $filenames apt-cache + + +# Debian aptitude(1) completion +# +have aptitude && { +have grep-status && { +_comp_dpkg_hold_packages() +{ + grep-status -P -e "^$1" -a -FStatus 'hold' -n -s Package +} +} || { +_comp_dpkg_hold_packages() +{ + grep -B 2 'hold' /var/lib/dpkg/status | grep "Package: $1" \ + | cut -d\ -f2 +} +} + +_aptitude() +{ + local cur dashoptions prev special i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + + dashoptions='-S -u -i -h --help --version -s --simulate -d \ + --download-only -P --prompt -y --assume-yes -F \ + --display-format -O --sort -w --width -f -r -g \ + --with-recommends --with-suggests -R -G \ + --without-recommends --without-suggests -t \ + --target-release -V --show-versions -D --show-deps\ + -Z -v --verbose --purge-unused' + + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @(install|reinstall|hold|unhold|markauto|unmarkauto|dist-upgrade|full-upgrade|download|show|forbid-version|purge|remove|changelog|why|why-not|keep|keep-all) ]]; then + special=${COMP_WORDS[i]} + fi + #exclude some mutually exclusive options + [[ ${COMP_WORDS[i]} == '-u' ]] && dashoptions=${dashoptions/-i} + [[ ${COMP_WORDS[i]} == '-i' ]] && dashoptions=${dashoptions/-u} + done + + if [[ -n "$special" ]]; then + case $special in + @(install|hold|markauto|unmarkauto|dist-upgrade|full-upgrade|download|show|changelog|why|why-not)) + COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) ) + return 0 + ;; + @(purge|remove|reinstall|forbid-version)) + COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) ) + return 0 + ;; + unhold) + COMPREPLY=( $( _comp_dpkg_hold_packages $cur ) ) + return 0 + ;; + + esac + fi + + case $prev in + # don't complete anything if these options are found + @(autoclean|clean|forget-new|search|upgrade|safe-upgrade|update|keep-all)) + return 0 + ;; + + -S) + _filedir + return 0 + ;; + + -@(t|-target-release|-default-release)) + COMPREPLY=( $( apt-cache policy | \ + grep "release.o=Debian,a=$cur" | \ + sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2> /dev/null ) ) + return 0 + ;; + + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "$dashoptions" -- $cur ) ) + else + COMPREPLY=( $( compgen -W 'update upgrade safe-upgrade forget-new clean \ + autoclean install reinstall remove \ + hold unhold purge markauto unmarkauto why why-not \ + dist-upgrade full-upgrade download search show \ + forbid-version changelog keep-all' -- $cur ) ) + fi + + + return 0 +} +complete -F _aptitude $default aptitude +} + +# Debian apt-build(1) completion. +# +have apt-build && +_apt_build() +{ + local cur prev special i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @(install|remove|source|info|clean) ]]; then + special=${COMP_WORDS[i]} + fi + done + + if [ -n "$special" ]; then + case $special in + @(install|source|info)) + COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) ) + return 0 + ;; + remove) + COMPREPLY=( $( _comp_dpkg_installed_packages \ + $cur ) ) + return 0 + ;; + *) + return 0 + ;; + esac + fi + + case "$prev" in + + --@(patch|build-dir|repository-dir)) + _filedir + return 0 + ;; + + -@(h|-help)) + return 0 + ;; + + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--help --show-upgraded -u --build-dir \ + --repository-dir --build-only \ + --build-command --reinstall --rebuild \ + --remove-builddep --no-wrapper --purge \ + --patch --patch-strip -p --yes -y \ + --version -v --no-source' -- $cur ) ) + + else + COMPREPLY=( $( compgen -W 'update upgrade install remove \ + source dist-upgrade world clean info \ + clean-build update-repository ' -- $cur ) ) + fi + + + return 0 +} && +complete -F _apt_build $filenames apt-build + +# chsh(1) completion +# +_chsh() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [ "$prev" = "-s" ]; then + if [ -f /etc/debian_version ]; then + COMPREPLY=( $( /dev/null ) ) + fi + if [ ${#khd[@]} -gt 0 ]; then + # Needs to look for files called + # .../.ssh2/key_22_.pub + # dont fork any processes, because in a cluster environment, + # there can be hundreds of hostkeys + for i in "${khd[@]}" ; do + if [[ "$i" == *key_22_$curd*.pub ]] && [ -r "$i" ] ; then + host=${i/#*key_22_/} + host=${host/%.pub/} + COMPREPLY=( "${COMPREPLY[@]}" $host ) + fi + done + fi + + # append any available aliases from config files + if [ ${#config[@]} -gt 0 ] && [ -n "$aliases" ]; then + local host_aliases=$( sed -ne 's/^[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?['"$'\t '"']\+\([^*?]*\)$/\2/p' "${config[@]}" ) + hosts=$( compgen -W "$host_aliases" -- $ocur ) + COMPREPLY=( "${COMPREPLY[@]}" $hosts ) + fi + + # Now add results of normal hostname completion + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -A hostname -- $ocur ) ) + + # apply suffix + for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do + COMPREPLY[i]=$user${COMPREPLY[i]}$suffix + done + else + # Just do normal hostname completion + COMPREPLY=( $( compgen -A hostname -S "$suffix" -- $cur ) ) + fi + + return 0 +} +complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 \ + ping ping6 fping fping6 telnet host nslookup rsh rlogin ftp dig ssh-installkeys mtr + +# ssh(1) completion +# +have ssh && { +_ssh() +{ + local cur prev + local -a config + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -*c) + COMPREPLY=( $( compgen -W 'blowfish 3des 3des-cbc blowfish-cbc \ + arcfour cast128-cbc' -- $cur ) ) + ;; + -*i) + _filedir + ;; + -*l) + COMPREPLY=( $( compgen -u -- $cur ) ) + ;; + *) + _known_hosts -a + + [ $COMP_CWORD -eq 1 ] || \ + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -c -- $cur ) ) + esac + + return 0 +} +shopt -u hostcomplete && complete -F _ssh ssh slogin sftp xhost autossh + +# scp(1) completion +# +_scp() +{ + local cur userhost path + + COMPREPLY=() + cur=`_get_cword` + + _expand || return 0 + + if [[ "$cur" == *:* ]]; then + local IFS=$'\t\n' + # remove backslash escape from : + cur=${cur/\\:/:} + userhost=${cur%%?(\\):*} + path=${cur#*:} + # unescape spaces + path=${path//\\\\\\\\ / } + if [ -z "$path" ]; then + # default to home dir of specified user on remote host + path=$(ssh -o 'Batchmode yes' $userhost pwd 2>/dev/null) + fi + # escape spaces; remove executables, aliases, pipes and sockets; + # add space at end of file names + COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \ + command ls -aF1d "$path*" 2>/dev/null | \ + sed -e "s/[][(){}<>\",:;^&!$&=?\`|\\ ']/\\\\\\\\\\\\&/g" \ + -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) ) + return 0 + fi + + [[ "$cur" == */* ]] || _known_hosts -c -a + local IFS=$'\t\n' + COMPREPLY=( "${COMPREPLY[@]}" $( command ls -aF1d $cur* \ + 2>/dev/null | sed \ + -e "s/[][(){}<>\",:;^&!$&=?\`|\\ ']/\\\\&/g" \ + -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) ) + return 0 +} +complete -F _scp $nospace scp +} + +# rsync(1) completion +# +have rsync && +_rsync() +{ + local cur prev shell i userhost path + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + _expand || return 0 + + case "$prev" in + --@(config|password-file|include-from|exclude-from)) + _filedir + return 0 + ;; + -@(T|-temp-dir|-compare-dest)) + _filedir -d + return 0 + ;; + -@(e|-rsh)) + COMPREPLY=( $( compgen -W 'rsh ssh' -- $cur ) ) + return 0 + ;; + esac + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W '-v -q -c -a -r -R -b -u -l -L -H \ + -p -o -g -D -t -S -n -W -x -B -e -C -I -T -P \ + -z -h -4 -6 --verbose --quiet --checksum \ + --archive --recursive --relative --backup \ + --backup-dir --suffix= --update --links \ + --copy-links --copy-unsafe-links --safe-links \ + --hard-links --perms --owner --group --devices\ + --times --sparse --dry-run --whole-file \ + --no-whole-file --one-file-system \ + --block-size= --rsh= --rsync-path= \ + --cvs-exclude --existing --ignore-existing \ + --delete --delete-excluded --delete-after \ + --ignore-errors --max-delete= --partial \ + --force --numeric-ids --timeout= \ + --ignore-times --size-only --modify-window= \ + --temp-dir= --compare-dest= --compress \ + --exclude= --exclude-from= --include= \ + --include-from= --version --daemon --no-detach\ + --address= --config= --port= --blocking-io \ + --no-blocking-io --stats --progress \ + --log-format= --password-file= --bwlimit= \ + --write-batch= --read-batch= --help' -- $cur )) + ;; + *:*) + # find which remote shell is used + shell=rsh + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" == -@(e|-rsh) ]]; then + shell=${COMP_WORDS[i+1]} + break + fi + done + if [[ "$shell" == ssh ]]; then + # remove backslash escape from : + cur=${cur/\\:/:} + userhost=${cur%%?(\\):*} + path=${cur#*:} + # unescape spaces + path=${path//\\\\\\\\ / } + if [ -z "$path" ]; then + # default to home dir of specified + # user on remote host + path=$(ssh -o 'Batchmode yes' \ + $userhost pwd 2>/dev/null) + fi + # escape spaces; remove executables, aliases, pipes + # and sockets; add space at end of file names + COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \ + command ls -aF1d "$path*" 2>/dev/null | \ + sed -e 's/ /\\\\\\\ /g' -e 's/[*@|=]$//g' \ + -e 's/[^\/]$/& /g' ) ) + fi + ;; + *) + _known_hosts -c -a + _filedir + ;; + esac + + return 0 +} && +complete -F _rsync $nospace $filenames rsync + +# Linux route(8) completion +# +[ $UNAME = Linux ] && +_route() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [ "$prev" = dev ]; then + COMPREPLY=( $( ifconfig -a | sed -ne 's|^\('$cur'[^ ]*\).*$|\1|p' )) + return 0 + fi + + COMPREPLY=( $( compgen -W 'add del -host -net netmask metric mss \ + window irtt reject mod dyn reinstate dev \ + default gw' -- $cur ) ) + + COMPREPLY=( $( echo " ${COMP_WORDS[@]}" | \ + (while read -d ' ' i; do + [ "$i" == "" ] && continue + # flatten array with spaces on either side, + # otherwise we cannot grep on word + # boundaries of first and last word + COMPREPLY=" ${COMPREPLY[@]} " + # remove word from list of completions + COMPREPLY=( ${COMPREPLY/ $i / } ) + done + echo "${COMPREPLY[@]}") + ) ) + return 0 +} +[ $UNAME = Linux ] && complete -F _route route + +# GNU make(1) completion +# +have make || have gmake || have gnumake || have pmake && +_make() +{ + local file makef makef_dir="." makef_inc cur prev i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + # --name value style option + case $prev in + -@(f|o|W)) + _filedir + return 0 + ;; + -@(I|C)) + _filedir -d + return 0 + ;; + esac + + # --name=value style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case "$prev" in + --@(file|makefile)) + _filedir + return 0 + ;; + --@(directory|include-dir)) + _filedir -d + return 0 + ;; + esac + fi + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-b -m -B -C -d -e -f -h -i -I\ + -j -l -k -n -o -p -q -r -R - s -S -t -v -w -W \ + --always-make --directory= --debug \ + --environment-overrides --file= --makefile= --help \ + --ignore-errors --include-dir= --jobs --load-average \ + --max-load --keep-going --just-print --dry-run \ + --recon --old-file= --assume-old= --print-data-base \ + --question --no-builtin-rules --no-builtin-variables \ + --silent --quiet --no-keep-goind --stop --touch \ + --version --print-directory --no-print-directory \ + --what-if= --new-file= --assume-new= \ + --warn-undefined-variables' -- $cur ) ) + else + # before we check for makefiles, see if a path was specified + # with -C + for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do + if [[ ${COMP_WORDS[i]} == -C ]]; then + # eval for tilde expansion + eval makef_dir=${COMP_WORDS[i+1]} + break + fi + done + + # make reads `GNUmakefile', then `makefile', then `Makefile' + if [ -f ${makef_dir}/GNUmakefile ]; then + makef=${makef_dir}/GNUmakefile + elif [ -f ${makef_dir}/makefile ]; then + makef=${makef_dir}/makefile + elif [ -f ${makef_dir}/Makefile ]; then + makef=${makef_dir}/Makefile + else + makef=${makef_dir}/*.mk # local convention + fi + + # before we scan for targets, see if a Makefile name was + # specified with -f + for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do + if [[ ${COMP_WORDS[i]} == -f ]]; then + # eval for tilde expansion + eval makef=${COMP_WORDS[i+1]} + break + fi + done + + [ ! -f $makef ] && return 0 + + # deal with included Makefiles + makef_inc=$( grep -E '^-?include' $makef | sed -e "s,^.* ,"$makef_dir"/," ) + + for file in $makef_inc; do + [ -f $file ] && makef="$makef $file" + done + + COMPREPLY=( $( awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \ + {split($1,A,/ /);for(i in A)print A[i]}' \ + $makef 2>/dev/null | command grep "^$cur" )) + fi +} && +complete -f -F _make $filenames make gmake gnumake pmake + +# GNU tar(1) completion +# +_tar() +{ + local cur ext regex tar untar + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W 'c t x u r d A' -- $cur ) ) + return 0 + fi + + case "${COMP_WORDS[1]}" in + ?(-)[cr]*f) + _filedir + return 0 + ;; + +([^IZzjy])f) + ext='t@(ar?(.@(Z|gz|bz?(2)))|gz|bz?(2))' + regex='t\(ar\(\.\(Z\|gz\|bz2\?\)\)\?\|gz\|bz2\?\)' + ;; + *[Zz]*f) + ext='t?(ar.)@(gz|Z)' + regex='t\(ar\.\)\?\(gz\|Z\)' + ;; + *[Ijy]*f) + ext='t?(ar.)bz?(2)' + regex='t\(ar\.\)\?bz2\?' + ;; + *) + _filedir + return 0 + ;; + + esac + + if [[ "$COMP_LINE" == *$ext' ' ]]; then + # complete on files in tar file + # + # get name of tar file from command line + tar=$( echo "$COMP_LINE" | \ + sed -e 's/^.* \([^ ]*'$regex'\) .*$/\1/' ) + # devise how to untar and list it + untar=t${COMP_WORDS[1]//[^Izjyf]/} + + COMPREPLY=( $( compgen -W "$( echo $( tar $untar $tar \ + 2>/dev/null ) )" -- "$cur" ) ) + return 0 + fi + + # file completion on relevant files + _filedir "$ext" + + return 0 +} +[ -n "${COMP_TAR_INTERNAL_PATHS:-}" ] && complete -F _tar $dirnames tar || + complete -F _tar $filenames tar + +# jar(1) completion +# +have jar && +_jar() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD = 1 ]; then + COMPREPLY=( $( compgen -W 'c t x u' -- $cur ) ) + return 0 + fi + + case "${COMP_WORDS[1]}" in + *c*f) + _filedir + ;; + *f) + _filedir '?(e|j|w)ar' + ;; + *) + _filedir + ;; + esac +} && +complete -F _jar $filenames jar + +# Linux iptables(8) completion +# +have iptables && +_iptables() +{ + local cur prev table chain + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + chain='s/^Chain \([^ ]\+\).*$/\1/p' + + if [[ $COMP_LINE == *-t\ *filter* ]]; then + table="-t filter" + elif [[ $COMP_LINE == *-t\ *nat* ]]; then + table="-t nat" + elif [[ $COMP_LINE == *-t\ *mangle* ]]; then + table="-t mangle" + fi + + case "$prev" in + -*[AIDRPFXLZ]) + COMPREPLY=( $( compgen -W '`iptables $table -nL | \ + sed -ne "s/^Chain \([^ ]\+\).*$/\1/p"`' -- $cur ) ) + ;; + -*t) + COMPREPLY=( $( compgen -W 'nat filter mangle' -- $cur ) ) + ;; + -j) + if [ "$table" = "-t filter" -o "$table" = "" ]; then + COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \ + `iptables $table -nL | sed -ne "$chain" \ + -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \ + $cur ) ) + elif [ "$table" = "-t nat" ]; then + COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \ + MIRROR SNAT DNAT MASQUERADE `iptables $table -nL | \ + sed -ne "$chain" -e "s/OUTPUT|PREROUTING|POSTROUTING//"`' \ + -- $cur ) ) + elif [ "$table" = "-t mangle" ]; then + COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \ + MARK TOS `iptables $table -nL | sed -ne "$chain" \ + -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \ + $cur ) ) + fi + ;; + *) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-i -o -s -d -p -f -m --append \ + --delete --insert --replace --list --flush --zero --new \ + --delete-chain --policy --rename-chain --proto --source \ + --destination --in-interface --jump --match --numeric \ + --out-interface --table --verbose --line-numbers --exact \ + --fragment --modprobe= --set-counters --version' -- "$cur") ) + fi + ;; + esac + +} && +complete -F _iptables iptables + +# tcpdump(8) completion +# +have tcpdump && +_tcpdump() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(r|w|F)) + _filedir + return 0 + ;; + -i) + _available_interfaces -a + return 0 + ;; + esac + + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-a -d -e -f -l -n -N -O -p \ + -q -R -S -t -u -v -x -C -F -i -m -r -s -T -w \ + -E' -- $cur ) ) + fi + +} && +complete -F _tcpdump tcpdump + +# autorpm(8) completion +# +have autorpm && +_autorpm() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + COMPREPLY=( $( compgen -W '--notty --debug --help --version \ + auto add fullinfo info help install list \ + remove set' -- $cur ) ) + +} && +complete -F _autorpm autorpm + +# This meta-cd function observes the CDPATH variable, so that cd additionally +# completes on directories under those specified in CDPATH. +# +_cd() +{ + local IFS=$'\t\n' cur=`_get_cword` i j k + + # try to allow variable completion + if [[ "$cur" == ?(\\)\$* ]]; then + COMPREPLY=( $( compgen -v -P '$' -- "${cur#?(\\)$}" ) ) + return 0 + fi + + # Use standard dir completion if no CDPATH or parameter starts with /, + # ./ or ../ + if [ -z "${CDPATH:-}" ] || [[ "$cur" == ?(.)?(.)/* ]]; then + _filedir -d + return 0 + fi + + local -r mark_dirs=$(_rl_enabled mark-directories && echo y) + local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y) + + # we have a CDPATH, so loop on its contents + for i in ${CDPATH//:/$'\t'}; do + # create an array of matched subdirs + k="${#COMPREPLY[@]}" + for j in $( compgen -d $i/$cur ); do + if [[ ( $mark_symdirs && -h $j || $mark_dirs && ! -h $j ) && ! -d ${j#$i/} ]]; then + j="${j}/" + fi + COMPREPLY[k++]=${j#$i/} + done + done + + _filedir -d + + if [[ ${#COMPREPLY[@]} -eq 1 ]]; then + i=${COMPREPLY[0]} + if [ "$i" == "$cur" ] && [[ $i != "*/" ]]; then + COMPREPLY[0]="${i}/" + fi + fi + + return 0 +} +if shopt -q cdable_vars; then + complete -v -F _cd $nospace $filenames cd +else + complete -F _cd $nospace $filenames cd +fi + +_remove_comp_word() +{ + if [[ COMP_CWORD -eq 0 ]]; then + return + elif [[ ${#COMP_WORDS[@]} -ge 2 ]]; then + local old_cw0="${COMP_WORDS[0]}" + local new_cw0="${COMP_WORDS[1]}" + local old_length="${#COMP_LINE}" + COMP_LINE=${COMP_LINE#${old_cw0}} + local head=${COMP_LINE:0:${#new_cw0}} + local i=1 + while [[ $head != $new_cw0 ]]; do + COMP_LINE=${COMP_LINE:1} + head=${COMP_LINE:0:${#new_cw0}} + if (( ++i > 10 )); then + break + fi + done + local new_length="${#COMP_LINE}" + COMP_POINT=$(( COMP_POINT + new_length - old_length)) + + COMP_CWORD=$(( COMP_CWORD - 1 )) + for (( i=0; i < ${#COMP_WORDS[@]} - 1; ++i )); do + COMP_WORDS[i]="${COMP_WORDS[i+1]}" + done + unset COMP_WORDS[${#COMP_WORDS[@]}-1] + else + return + fi +} + +# A meta-command completion function for commands like sudo(8), which need to +# first complete on a command, then complete according to that command's own +# completion definition - currently not quite foolproof (e.g. mount and umount +# don't work properly), but still quite useful. +# +_command() +{ + local cur func cline cspec noglob cmd done i \ + _COMMAND_FUNC _COMMAND_FUNC_ARGS + + _remove_comp_word + COMPREPLY=() + cur=`_get_cword` + # If the the first arguments following our meta-command-invoker are + # switches, get rid of them. Most definitely not foolproof. + done= + while [ -z $done ] ; do + cmd=${COMP_WORDS[0]} + if [[ "$cmd" == -* ]] && [ $COMP_CWORD -ge 1 ]; then + _remove_comp_word + elif [[ "$cmd" == -* ]] && [[ $COMP_CWORD -eq 0 ]]; then + return + else + done=1 + fi + done + + if [ $COMP_CWORD -eq 0 ]; then + COMPREPLY=( $( compgen -c -- $cur ) ) + elif complete -p $cmd &>/dev/null; then + cspec=$( complete -p $cmd ) + if [ "${cspec#* -F }" != "$cspec" ]; then + # COMP_CWORD and COMP_WORDS() are not read-only, + # so we can set them before handing off to regular + # completion routine + + # get function name + func=${cspec#*-F } + func=${func%% *} + + if [[ ${#COMP_WORDS[@]} -ge 2 ]]; then + $func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}" "${COMP_WORDS[${#COMP_WORDS[@]}-2]}" + else + $func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}" + fi + + # remove any \: generated by a command that doesn't + # default to filenames or dirnames (e.g. sudo chown) + # FIXME: I'm pretty sure this does not work! + if [ "${cspec#*-o }" != "$cspec" ]; then + cspec=${cspec#*-o } + cspec=${cspec%% *} + if [[ "$cspec" != @(dir|file)names ]]; then + COMPREPLY=("${COMPREPLY[@]//\\\\:/:}") + fi + fi + elif [ -n "$cspec" ]; then + cspec=${cspec#complete}; + cspec=${cspec%%$cmd}; + COMPREPLY=( $( eval compgen "$cspec" -- "$cur" ) ); + fi + fi + + [ ${#COMPREPLY[@]} -eq 0 ] && _filedir +} +complete -F _command $filenames nohup exec nice eval strace time ltrace then \ + else do vsound command xargs + +_root_command() +{ + PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin _command $1 $2 $3 +} +complete -F _root_command $filenames sudo fakeroot really + +# ant(1) completion +# +have ant && { +_ant() +{ + local cur prev buildfile i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -buildfile|-f) + _filedir 'xml' + return 0 + ;; + -logfile) + _filedir + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + # relevant options completion + COMPREPLY=( $( compgen -W '-help -projecthelp -version -quiet \ + -verbose -debug -emacs -logfile -logger \ + -listener -buildfile -f -D -find' -- $cur ) ) + else + # available targets completion + # find which buildfile to use + buildfile=build.xml + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" == -buildfile ]]; then + buildfile=${COMP_WORDS[i+1]} + break + fi + done + [ ! -f $buildfile ] && return 0 + + # parse buildfile for targets + COMPREPLY=( $( awk -F'"' '//dev/null | \ + sed -e '1,/^-/d' -e '/^(/,$d' | \ + awk '{print $1}' | grep "^$cur" ) ) +} + +_pg_users() +{ + #COMPREPLY=( $( psql -qtc 'select usename from pg_user' template1 2>/dev/null | \ + # grep "^ $cur" ) ) + #[ ${#COMPREPLY[@]} -eq 0 ] && + COMPREPLY=( $( compgen -u -- $cur ) ) +} + +# createdb(1) completion +# +_createdb() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(h|-host=)) + _known_hosts + return 0 + ;; + -@(U|-username=)) + _pg_users + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-D -T -E -h -p -U -W -e -q \ + --location= --template= --encoding= --host= --port= \ + --username= --password --echo --quiet --help' -- $cur )) + else + _pg_databases + fi +} +complete -F _createdb $default createdb + +# dropdb(1) completion +# +_dropdb() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(h|-host=)) + _known_hosts + return 0 + ;; + -@(U|-username=)) + _pg_users + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-h -p -U -W -e -q \ + --host= --port= --username= --password \ + --interactive --echo --quiet --help' -- $cur ) ) + else + _pg_databases + fi +} +complete -F _dropdb $default dropdb + +# psql(1) completion +# +_psql() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -h|--host) + _known_hosts + return 0 + ;; + -U|--username) + _pg_users + return 0 + ;; + -d|--dbname) + _pg_databases + return 0 + ;; + -@(o|f)|--output|--file) + _filedir + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + # return list of available options + COMPREPLY=( $( compgen -W '-a --echo-all -A --no-align \ + -c --command -d --dbname -e --echo-queries \ + -E --echo-hidden -f --file -F --filed-separator \ + -h --host -H --html -l --list -n -o --output \ + -p --port -P --pset -q -R --record-separator \ + -s --single-step -S --single-line -t --tuples-only \ + -T --table-attr -U --username -v --variable \ + -V --version -W --password -x --expanded -X --nopsqlrc \ + -? --help ' -- $cur ) ) + else + # return list of available databases + _pg_databases + fi +} +complete -F _psql $default psql +} + +_longopt() +{ + local cur opt + + cur=`_get_cword` + + if [[ "$cur" == --*=* ]]; then + opt=${cur%%=*} + # cut backslash that gets inserted before '=' sign + opt=${opt%\\*} + cur=${cur#*=} + _filedir + COMPREPLY=( $( compgen -P "$opt=" -W '${COMPREPLY[@]}' -- $cur)) + return 0 + fi + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( $1 --help 2>&1 | sed -e '/--/!d' \ + -e 's/.*\(--[-A-Za-z0-9]\+=\?\).*/\1/' | \ + command grep "^$cur" | sort -u ) ) + elif [[ "$1" == @(mk|rm)dir ]]; then + _filedir -d + else + _filedir + fi +} +# makeinfo and texi2dvi are defined elsewhere. +for i in a2ps autoconf automake bc gprof ld nm objcopy objdump readelf strip \ + bison cpio diff patch enscript cp df dir du ln ls mkfifo mknod mv rm \ + touch vdir awk gperf grep grub indent less m4 sed shar date \ + tee who texindex cat csplit cut expand fmt fold head \ + md5sum nl od paste pr ptx sha1sum sort split tac tail tr unexpand \ + uniq wc ldd bash id irb mkdir rmdir; do + have $i && complete -F _longopt $filenames $i +done + +# These commands use filenames, so '-o filenames' is not needed. +for i in env netstat seq uname units wget; do + have $i && complete -F _longopt $default $i +done +unset i + +# gcc(1) completion +# +# The only unusual feature is that we don't parse "gcc --help -v" output +# directly, because that would include the options of all the other backend +# tools (linker, assembler, preprocessor, etc) without any indication that +# you cannot feed such options to the gcc driver directly. (For example, the +# linker takes a -z option, but you must type -Wl,-z for gcc.) Instead, we +# ask the driver ("g++") for the name of the compiler ("cc1"), and parse the +# --help output of the compiler. +# +have gcc && +_gcc() +{ + local cur cc backend + + COMPREPLY=() + cur=`_get_cword` + + _expand || return 0 + + case "$1" in + gcj) + backend=jc1 + ;; + gpc) + backend=gpc1 + ;; + *77) + backend=f771 + ;; + *) + backend=cc1 # (near-)universal backend + ;; + esac + + if [[ "$cur" == -* ]]; then + cc=$( $1 -print-prog-name=$backend ) + # sink stderr: + # for C/C++/ObjectiveC it's useless + # for FORTRAN/Java it's an error + COMPREPLY=( $( $cc --help 2>/dev/null | tr '\t' ' ' | \ + sed -e '/^ *-/!d' -e 's/ *-\([^ ]*\).*/-\1/' | \ + command grep "^$cur" | sort -u ) ) + else + _filedir + fi +} && +complete $filenames -F _gcc gcc g++ c++ g77 gcj gpc +[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Cygwin ] && \ +[ -n "${have:-}" ] && complete $filenames -F _gcc cc + +# Linux cardctl(8) completion +# +have cardctl && +_cardctl() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W 'status config ident suspend \ + resume reset eject insert scheme' \ + -- $cur ) ) + fi +} && +complete -F _cardctl cardctl + +# This function is required by _dpkg() and _dpkg-reconfigure() +# +have dpkg && { +_comp_dpkg_installed_packages() +{ + grep -A 1 "Package: $1" /var/lib/dpkg/status | \ + grep -B 1 -E "ok installed|half-installed|unpacked| \ + half-configured|config-files" | \ + grep "Package: $1" | cut -d\ -f2 +} + +# Debian dpkg(8) completion +# +_dpkg() +{ + local cur prev i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + i=$COMP_CWORD + + _expand || return 0 + + # find the last option flag + if [[ $cur != -* ]]; then + while [[ $prev != -* && $i != 1 ]]; do + i=$((i-1)) + prev=${COMP_WORDS[i-1]} + done + fi + + case "$prev" in + -@(c|i|A|I|f|e|x|X|-@(install|unpack|record-avail|contents|info|fsys-tarfile|field|control|extract))) + _filedir '?(u)deb' + return 0 + ;; + -@(b|-build)) + _filedir -d + return 0 + ;; + -@(s|p|l|-@(status|print-avail|list))) + COMPREPLY=( $( apt-cache pkgnames $cur 2>/dev/null ) ) + return 0 + ;; + -@(S|-search)) + _filedir + return 0 + ;; + -@(r|L|P|-@(remove|purge|listfiles))) + COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) ) + return 0 + ;; + *) + + COMPREPLY=( $( compgen -W '-i --install --unpack -A --record-avail \ + --configure -r --remove -P --purge --get-selections \ + --set-selections --update-avail --merge-avail \ + --clear-avail --command-fd --forget-old-unavail -s \ + --status -p --print-avail -L --listfiles -l --list \ + -S --search -C --audit --print-architecture \ + --print-gnu-build-architecture \ + --print-installation-architecture \ + --compare-versions --help --version --force-help \ + --force-all --force-auto-select --force-downgrade \ + --force-configure-any --force-hold --force-bad-path \ + --force-not-root --force-overwrite \ + --force-overwrite-diverted --force-bad-verify \ + --force-depends-version --force-depends \ + --force-confnew --force-confold --force-confdef \ + --force-confmiss --force-conflicts --force-architecture\ + --force-overwrite-dir --force-remove-reinstreq \ + --force-remove-essential -Dh \ + --debug=help --licence --admindir= --root= --instdir= \ + -O --selected-only -E --skip-same-version \ + -G --refuse-downgrade -B --auto-deconfigure \ + --no-debsig --no-act -D --debug= --status-fd \ + -b --build -I --info -f --field -c --contents \ + -x --extract -X --vextract --fsys-tarfile -e --control \ + --ignore-depends= --abort-after' -- $cur ) ) + ;; + esac + + +} +complete -F _dpkg $filenames dpkg dpkg-deb +} + +# Debian GNU dpkg-reconfigure(8) completion +# +have dpkg-reconfigure && +_dpkg_reconfigure() +{ + local cur prev opt + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + + case "$prev" in + -@(f|-frontend)) + opt=( $( echo /usr/share/perl5/Debconf/FrontEnd/* ) ) + opt=( ${opt[@]##*/} ) + opt=( ${opt[@]%.pm} ) + COMPREPLY=( $( compgen -W '${opt[@]}' -- $cur ) ) + return 0 + ;; + -@(p|-priority)) + COMPREPLY=( $( compgen -W 'low medium high critical' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-f --frontend -p --priority -a --all \ + -u --unseen-only -h --help -s --showold \ + --force --terse' -- $cur ) ) + else + COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) ) + fi +} && +complete -F _dpkg_reconfigure $default dpkg-reconfigure + +# Debian dpkg-source completion +# +have dpkg-source && +_dpkg_source() +{ + local cur prev options work i action packopts unpackopts + + packopts="-c -l -F -V -T -D -U -W -E -sa -i -I -sk -sp -su -sr -ss -sn -sA -sK -sP -sU -sR" + unpackopts="-sp -sn -su" + options=`echo "-x -b $packopts $unpackopts" | xargs echo | sort -u | xargs echo` + + COMPREPLY=() + if [ "$1" != "dpkg-source" ]; then + exit 1 + fi + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + action="options" + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[$i]} == "-x" ]]; then + action=unpack + elif [[ ${COMP_WORDS[$i]} == "-b" ]]; then + action=pack + elif [[ ${COMP_WORDS[$i]} == "-h" ]]; then + action=help + fi + done + # if currently seeing a complete option, return just itself. + for i in $options; do + if [ "$cur" = "$i" ]; then + COMPREPLY=( "$cur" ) + return 0 + fi + done + case "$action" in + "unpack") + if [ "$cur" = "-" -o "$cur" = "-s" ]; then + COMPREPLY=( $unpackots ) + return 0 + fi + case "$prev" in + "-x") + COMPREPLY=( $( compgen -d -- "$cur" ) \ + $( compgen -f -X '!*.dsc' -- "$cur" ) ) + return 0 + ;; + *) + COMPREPLY=( $unpackopts $(compgen -d -f -- "$cur" ) ) + return 0 + ;; + esac + return 0 + ;; + "pack") + if [ "$cur" = "-" ]; then + COMPREPLY=( $packopts ) + return 0 + fi + if [ "$cur" = "-s" ]; then + COMPREPLY=( "-sa" "-sk" "-sp" "-su" "-sr" "-ss" "-sn" \ + "-sA" "-sK" "-sP" "-sU" "-sR" ) + return 0 + fi + case "$prev" in + "-b") + COMPREPLY=( $( compgen -d -- "$cur" ) ) + return 0 + ;; + "-c"|"-l"|"-T"|"-i"|"-I") + # -c: get controlfile + # -l: get per-version info from this file + # -T: read variables here, not debian/substvars + # -i: filter out files to ignore diffs of. + # -I: filter out files when building tarballs. + # return directory names and file names + COMPREPLY=( $( compgen -d -f ) ) + return 0 + ;; + "-F") + # -F: force change log format + COMPREPLY=( $( ( cd /usr/lib/dpkg/parsechangelog; compgen -f "$cur" ) ) ) + return 0 + ;; + "-V"|"-D") + # -V: set a substitution variable + # we don't know anything about possible variables or values + # so we don't try to suggest any completion. + COMPREPLY=() + return 0 + ;; + "-D") + # -D: override or add a .dsc field and value + # if $cur doesn't contain a = yet, suggest variable names + if echo -- "$cur" | grep -q "="; then + # $cur contains a "=" + COMPREPLY=() + return 0 + else + COMPREPLY=( Format Source Version Binary Maintainer Uploader Architecture Standards-Version Build-Depends Files ) + return 0 + fi + ;; + "-U") + # -U: remove a field + # Suggest possible fieldnames + COMPREPLY=( Format Source Version Binary Maintainer Uploader Architecture Standards-Version Build-Depends Files ) + return 0 + ;; + *) + COMPREPLY=( $packopts ) + return 0 + ;; + esac + return 0 + ;; + *) + # if seeing a partial option, return possible completions. + if [ "$cur" = "-s" ]; then + COMPREPLY=( "-sa" "-sk" "-sp" "-su" "-sr" "-ss" "-sn" \ + "-sA" "-sK" "-sP" "-sU" "-sR" ) + return 0 + fi + # else return all possible options. + COMPREPLY=( $options ) + return 0 + ;; + esac +} && +complete -F _dpkg_source dpkg-source + +# Debian Linux dselect(8) completion. +# +have dselect && +_dselect() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + --admindir) + _filedir -d + return 0 + ;; + + -@(D|debug)) + _filedir + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--admindir --help --version --licence \ + --license --expert --debug' -- $cur ) ) + else + COMPREPLY=( $( compgen -W 'access update select install config \ + remove quit' -- $cur ) ) + fi + + + return 0 +} && +complete -F _dselect $filenames dselect + +# Java completion +# + +# available path elements completion +have java && { +_java_path() +{ + cur=${cur##*:} + _filedir '@(jar|zip)' +} + +# exact classpath determination +_java_find_classpath() +{ + local i + + # search first in current options + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" == -@(cp|classpath) ]]; then + classpath=${COMP_WORDS[i+1]} + break + fi + done + + # default to environment + [ -z "$classpath" ] && classpath=$CLASSPATH + + # default to current directory + [ -z "$classpath" ] && classpath=. +} + +# exact sourcepath determination +_java_find_sourcepath() +{ + local i + + # search first in current options + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" == -sourcepath ]]; then + sourcepath=${COMP_WORDS[i+1]} + break + fi + done + + # default to classpath + [ -z "$sourcepath" ] && _java_find_classpath + sourcepath=$classpath +} + +# available classes completion +_java_classes() +{ + local classpath i + + # find which classpath to use + _java_find_classpath + + # convert package syntax to path syntax + cur=${cur//.//} + # parse each classpath element for classes + for i in ${classpath//:/ }; do + if [ -r $i ] && [[ "$i" == *.@(jar|zip) ]]; then + if type zipinfo &> /dev/null; then + COMPREPLY=( "${COMPREPLY[@]}" $( zipinfo -1 \ + "$i" | grep "^$cur" | grep '\.class$' | \ + grep -v "\\$" ) ) + else + COMPREPLY=( "${COMPREPLY[@]}" $( jar tf "$i" \ + "$cur" | grep "\.class$" | grep -v "\\$" ) ) + fi + + elif [ -d $i ]; then + i=${i%/} + COMPREPLY=( "${COMPREPLY[@]}" $( find "$i" -type f \ + -path "$i/$cur*.class" 2>/dev/null | \ + grep -v "\\$" | sed -e "s|^$i/||" ) ) + fi + done + + # remove class extension + COMPREPLY=( ${COMPREPLY[@]%.class} ) + # convert path syntax to package syntax + COMPREPLY=( ${COMPREPLY[@]//\//.} ) +} + +# available packages completion +_java_packages() +{ + local sourcepath i + + # find wich sourcepath to use + _java_find_sourcepath + + # convert package syntax to path syntax + cur=${cur//.//} + # parse each sourcepath element for packages + for i in ${sourcepath//:/ }; do + if [ -d $i ]; then + COMPREPLY=( "${COMPREPLY[@]}" $( command ls -F -d \ + $i/$cur* 2>/dev/null | sed -e 's|^'$i'/||' ) ) + fi + done + # keep only packages + COMPREPLY=( $( echo "${COMPREPLY[@]}" | tr " " "\n" | grep "/$" ) ) + # remove packages extension + COMPREPLY=( ${COMPREPLY[@]%/} ) + # convert path syntax to package syntax + cur=${COMPREPLY[@]//\//.} +} + +# java completion +# +_java() +{ + local cur prev i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + for ((i=1; i < $COMP_CWORD; i++)); do + case ${COMP_WORDS[$i]} in + -cp|-classpath) + ((i++)) # skip the classpath string. + ;; + -*) + # this is an option, not a class/jarfile name. + ;; + *) + # once we've seen a class, just do filename completion + _filedir + return 0 + ;; + esac + done + + case $prev in + -@(cp|classpath)) + _java_path + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + # relevant options completion + COMPREPLY=( $( compgen -W '-client -hotspot -server -classic \ + -cp -classpath -D -verbose -verbose:class \ + -verbose:gc -version:jni -version \ + -showversion -? -help -X -jar \ + -ea -enableassertions -da -disableassertions \ + -esa -enablesystemassertions \ + -dsa -disablesystemassertions ' -- $cur ) ) + else + if [[ "$prev" == -jar ]]; then + # jar file completion + _filedir jar + else + # classes completion + _java_classes + fi + fi +} +complete -F _java $filenames java +} + +# javadoc completion +# +have javadoc && +_javadoc() +{ + COMPREPLY=() + local cur prev + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + -@(overview|helpfile|stylesheetfile)) + _filedir + return 0 + ;; + -d) + _filedir -d + return 0 + ;; + -@(classpath|bootclasspath|docletpath|sourcepath|extdirs)) + _java_path + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + # relevant options completion + COMPREPLY=( $( compgen -W '-overview -public -protected \ + -package -private -help -doclet -docletpath \ + -sourcepath -classpath -exclude -subpackages \ + -breakiterator -bootclasspath -source -extdirs \ + -verbose -locale -encoding -J -d -use -version \ + -author -docfilessubdirs -splitindex \ + -windowtitle -doctitle -header -footer -bottom \ + -link -linkoffline -excludedocfilessubdir \ + -group -nocomment -nodeprecated -noqualifier \ + -nosince -nodeprecatedlist -notree -noindex \ + -nohelp -nonavbar -quiet -serialwarn -tag \ + -taglet -tagletpath -charset -helpfile \ + -linksource -stylesheetfile -docencoding' -- \ + $cur ) ) + else + # source files completion + _filedir java + # packages completion + _java_packages + fi +} && +complete -F _javadoc $filenames javadoc + +# javac completion +# +have javac && +_javac() +{ + COMPREPLY=() + local cur prev + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + -d) + _filedir -d + return 0 + ;; + -@(classpath|bootclasspath|sourcepath|extdirs)) + _java_path + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + # relevant options completion + COMPREPLY=( $( compgen -W '-g -g:none -g:lines -g:vars\ + -g:source -O -nowarn -verbose -deprecation -classpath\ + -sourcepath -bootclasspath -extdirs -d -encoding -source\ + -target -help' -- $cur ) ) + else + # source files completion + _filedir java + fi +} && +complete -F _javac $filenames javac + +# PINE address-book completion +# +have pine && +_pineaddr() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + COMPREPLY=( $( compgen -W '$( awk "{print \$1}" ~/.addressbook 2>/dev/null)' \ + -- $cur ) ) +} && +complete -F _pineaddr $default pine + +# mutt completion +# +# Mutt doesn't have an "addressbook" like Pine, but it has aliases and +# a "query" function to retrieve addresses, so that's what we use here. +have mutt || have muttng && { +_muttaddr() +{ + _muttaliases + _muttquery + return 0 +} + +_muttconffiles() +{ + local file sofar + local -a newconffiles + + sofar=" $1 " + shift + while [[ "$1" ]]; do + newconffiles=( $(sed -rn 's|^source[[:space:]]+([^[:space:]]+).*$|\1|p' $(eval echo $1) ) ) + for file in "${newconffiles[@]}"; do + [[ ! "$file" ]] || [[ "${sofar/ ${file} / }" != "$sofar" ]] && + continue + sofar="$sofar $file" + sofar=" $(eval _muttconffiles \"$sofar\" $file) " + done + shift + done + echo $sofar +} + +_muttaliases() +{ + local cur muttrc + local -a conffiles aliases + cur=`_get_cword` + + [ -f ~/.${muttcmd}/${muttcmd}rc ] && muttrc="~/.${muttcmd}/${muttcmd}rc" + [ -f ~/.${muttcmd}rc ] && muttrc="~/.${muttcmd}rc" + [ -z "$muttrc" ] && return 0 + + conffiles=( $(eval _muttconffiles $muttrc $muttrc) ) + aliases=( $( sed -rn 's|^alias[[:space:]]+([^[:space:]]+).*$|\1|p' \ + $(eval echo "${conffiles[@]}") ) ) + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "${aliases[*]}" -- $cur ) ) + + return 0 +} + +_muttquery() +{ + local cur querycmd + local -a queryresults + cur=`_get_cword` + + querycmd="$( $muttcmd -Q query_command | sed -r 's|^query_command=\"(.*)\"$|\1|; s|%s|'$cur'|' )" + if [ -z "$cur" -o -z "$querycmd" ]; then + queryresults=() + else + queryresults=( $( $querycmd | \ + sed -nr '2,$s|^([^[:space:]]+).*|\1|p' ) ) + fi + + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "${queryresults[*]}" \ + -- $cur ) ) + + return 0 +} + +_muttfiledir() +{ + local cur folder spoolfile + cur=`_get_cword` + + # This is currently not working so well. Perhaps this function should + # just call _filedir() for the moment. + if [[ $cur == [=+]* ]]; then + folder="$( $muttcmd -Q folder | sed -r 's|^folder=\"(.*)\"$|\1|' )" + : folder:=~/Mail + + # Match any file in $folder beginning with $cur + # (minus the leading '=' sign). + COMPREPLY=( $( compgen -f -- "$folder/${cur:1}" ) ) + COMPREPLY=( ${COMPREPLY[@]#$folder/} ) + return 0 + elif [ "$cur" == !* ]; then + spoolfile="$( $muttcmd -Q spoolfile | sed -r 's|^spoolfile=\"(.*)\"$|\1|' )" + [ ! -z "$spoolfile" ] && eval cur="${cur/^!/$spoolfile}"; + fi + _filedir + + return 0 +} + +_mutt() +{ + local cur prev + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + COMPREPLY=() + + [ ${COMP_WORDS[0]} == muttng ] && muttcmd="muttng" || muttcmd="mutt" + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W '-A -a -b -c -e -f -F -H -i -m -n \ + -p -Q -R -s -v -x -y -z -Z -h' \ + -- $cur ) ) + return 0 + ;; + *) + case "$prev" in + -@(a|f|F|H|i)) + _muttfiledir + return 0 + ;; + -A) + _muttaliases + return 0 + ;; + -@(e|m|Q|s|h|p|R|v|y|z|Z)) + return 0 + ;; + *) + _muttaddr + return 0 + ;; + esac + ;; + esac + +} +complete -F _mutt $default $filenames mutt muttng +} + +_configure_func() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + # if $COMP_CONFIGURE_HINTS is not null, then completions of the form + # --option=SETTING will include 'SETTING' as a contextual hint + [[ "$cur" != -* ]] && return 0 + + if [ -n "$COMP_CONFIGURE_HINTS" ]; then + COMPREPLY=( $( $1 --help | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,].*//g' | grep ^$cur ) ) + + else + COMPREPLY=( $( $1 --help | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,=].*//g' | grep ^$cur ) ) + fi +} +complete -F _configure_func $default configure + +# Debian reportbug(1) completion +# +have reportbug && +_reportbug() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -f|--filename|-i|--include|--mta|-o|--output) + _filedir + return 0 + ;; + -B|--bts) + COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \ + $cur )) + return 0 + ;; + -e|--editor|--mua) + COMP_WORDS=(COMP_WORDS[0] $cur) + COMP_CWORD=1 + _command + return 0 + ;; + --mode) + COMPREPLY=( $( compgen -W "novice standard expert" -- $cur ) ) + return 0 + ;; + -S|--severity) + COMPREPLY=( $( compgen -W "grave serious important normal \ + minor wishlist" -- $cur ) ) + return 0 + ;; + -u|--ui|--interface) + COMPREPLY=( $( compgen -W "newt text gnome" -- $cur ) ) + return 0 + ;; + -t|--type) + COMPREPLY=( $( compgen -W "gnats debbugs" -- $cur ) ) + return 0 + ;; + -T|--tags) + COMPREPLY=( $( compgen -W "none patch security upstream sid \ + woody potato sarge fixed" -- $cur )) + return 0 + ;; + *) + ;; + esac + + COMPREPLY=($( compgen -W '-h --help -v --version -a --af -b \ + --no-query-bts --query-bts -B --bts -c --configure \ + --no-config-files --check-available -d --debug \ + --no-check-available -e --editor --email -f \ + --filename -g --gnupg -H --header -i --include -j \ + --justification -l --ldap --no-ldap -L --list-cc -m \ + --maintonly --mode --mua --mta --mutt -n --mh --nmh \ + -o --output -p --print -P --pgp --proxy --http_proxy\ + -q --quiet -Q --query-only --realname --report-quiet \ + --reply-to --replyto -s --subject -S --severity \ + --smtphost -t --type -T --tags --template -V -x \ + --no-cc --package-version -z --no-compress \ + --ui --interface -u \ + wnpp boot-floppies kernel-image' -- $cur ) \ + $( apt-cache pkgnames -- $cur 2> /dev/null ) ) + _filedir + return 0 +} && +complete -F _reportbug $filenames reportbug + +# Debian querybts(1) completion +# +have querybts && +_querybts() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -B|--bts) + COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \ + $cur )) + return 0 + ;; + -u|--ui|--interface) + COMPREPLY=($( compgen -W "newt text gnome" -- $cur )) + return 0 + ;; + *) + ;; + esac + + COMPREPLY=($( compgen -W '-h --help -v --version -A --archive \ + -B --bts -l --ldap --no-ldap --proxy= --http_proxy= \ + -s --source -w --web -u --ui --interface \ + wnpp boot-floppies' -- $cur ) \ + $( apt-cache pkgnames -- $cur 2> /dev/null ) ) +} && +complete -F _querybts $filenames querybts + +# update-alternatives completion +# +have update-alternatives && { +installed_alternatives() +{ + local admindir + # find the admin dir + for i in alternatives dpkg/alternatives rpm/alternatives; do + [ -d /var/lib/$i ] && admindir=/var/lib/$i && break + done + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" == --admindir ]]; then + admindir=${COMP_WORDS[i+1]} + break + fi + done + COMPREPLY=( $( command ls $admindir | grep "^$cur" ) ) +} + +_update_alternatives() +{ + local cur prev mode args i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + --@(altdir|admindir)) + _filedir -d + return 0 + ;; + --@(help|version)) + return 0 + ;; + esac + + # find wich mode to use and how many real args used so far + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" == --@(install|remove|auto|display|config|remove-all) ]]; then + mode=${COMP_WORDS[i]} + args=$(($COMP_CWORD - i)) + break + fi + done + + case $mode in + --install) + case $args in + 1) + _filedir + ;; + 2) + installed_alternatives + ;; + 3) + _filedir + ;; + esac + ;; + --remove) + case $args in + 1) + installed_alternatives + ;; + 2) + _filedir + ;; + esac + ;; + --auto) + installed_alternatives + ;; + --remove-all) + installed_alternatives + ;; + --display) + installed_alternatives + ;; + --config) + installed_alternatives + ;; + *) + COMPREPLY=( $( compgen -W '--verbose --quiet --help --version \ + --altdir --admindir' -- $cur ) \ + $( compgen -W '--install --remove --auto --display \ + --config' -- $cur ) ) + esac +} +complete -F _update_alternatives update-alternatives +} + +# Python completion +# +have python && +_python() +{ + local prev cur + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]##*/} + + case "$prev" in + -Q) + COMPREPLY=( $( compgen -W "old new warn warnall" -- $cur ) ) + return 0 + ;; + -W) + COMPREPLY=( $( compgen -W "ignore default all module once error" -- $cur ) ) + return 0 + ;; + -c) + _filedir '@(py|pyc|pyo)' + return 0 + ;; + !(python|-?)) + [[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir + ;; + esac + + + # if '-c' is already given, complete all kind of files. + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == -c ]]; then + _filedir + fi + done + + + if [[ "$cur" != -* ]]; then + _filedir '@(py|pyc|pyo)' + else + COMPREPLY=( $( compgen -W "- -d -E -h -i -O -Q -S -t -u \ + -U -v -V -W -x -c" -- $cur ) ) + fi + + + + return 0 +} && +complete -F _python $filenames python + +# Perl completion +# +have perl && +{ +_perlmodules() +{ + COMPREPLY=( $( compgen -P "$prefix" -W "$( perl -e 'sub mods { my ($base,$dir)=@_; return if $base !~ /^\Q$ENV{cur}/; chdir($dir) or return; for (glob(q[*.pm])) {s/\.pm$//; print qq[$base$_\n]}; mods(/^(?:[.\d]+|$Config{archname}-$Config{osname}|auto)$/ ? undef : qq[${base}${_}\\\\:\\\\:],qq[$dir/$_]) for grep {-d} glob(q[*]); } mods(undef,$_) for @INC;' )" -- $cur ) ) +} + +_perl() +{ + local cur prev prefix temp + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + prefix="" + + # completing an option (may or may not be separated by a space) + if [[ "$cur" == -?* ]]; then + temp=$cur + prev=${temp:0:2} + cur=${temp:2} + prefix=$prev + fi + + # only handle module completion for now + case "$prev" in + -I|-x) + COMPREPLY=( $( compgen -d -P "$prev" -- "$cur" ) ) + return 0 + ;; + -m|-M) + _perlmodules + return 0 + ;; + esac + + # handle case where first parameter is not a dash option + if [[ "${COMP_WORDS[COMP_CWORD]}" != -* ]]; then + _filedir + return 0 + fi + + # complete using basic options + COMPREPLY=( $( compgen -W '-C -s -T -u -U -W -X -h -v -V -c -w -d -D -p \ + -n -a -F -l -0 -I -m -M -P -S -x -i -e ' -- $cur ) ) + return 0 +} +complete -F _perl $filenames perl + +_perldoc() +{ + local cur prev prefix temp + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + prefix="" + + # completing an option (may or may not be separated by a space) + if [[ "$cur" == -?* ]]; then + temp=$cur + prev=${temp:0:2} + cur=${temp:2} + prefix=$prev + fi + + # complete builtin perl functions + case $prev in + -f) + COMPREPLY=( $( compgen -W 'chomp chop chr crypt hex index lc \ + lcfirst length oct ord pack q qq reverse rindex sprintf \ + substr tr uc ucfirst y m pos quotemeta s split study qr abs \ + atan2 cos exp hex int log oct rand sin sqrt srand pop push \ + shift splice unshift grep join map qw reverse sort unpack \ + delete each exists keys values binmode close closedir \ + dbmclose dbmopen die eof fileno flock format getc print \ + printf read readdir rewinddir seek seekdir select syscall \ + sysread sysseek syswrite tell telldir truncate warn write \ + pack read syscall sysread syswrite unpack vec -X chdir chmod \ + chown chroot fcntl glob ioctl link lstat mkdir open opendir \ + readlink rename rmdir stat symlink umask unlink utime caller \ + continue do dump eval exit goto last next redo return \ + sub wantarray caller import local my our package use defined \ + formline reset scalar undef \ + alarm exec fork getpgrp getppid getpriority kill pipe qx \ + setpgrp setpriority sleep system times wait waitpid \ + import no package require use bless dbmclose dbmopen package \ + ref tie tied untie use accept bind connect getpeername \ + getsockname getsockopt listen recv send setsockopt shutdown \ + socket socketpair msgctl msgget msgrcv msgsnd semctl semget \ + semop shmctl shmget shmread shmwrite endgrent endhostent \ + endnetent endpwent getgrent getgrgid getgrnam getlogin \ + getpwent getpwnam getpwuid setgrent setpwent endprotoent \ + endservent gethostbyaddr gethostbyname gethostent \ + getnetbyaddr getnetbyname getnetent getprotobyname \ + getprotobynumber getprotoent getservbyname getservbyport \ + getservent sethostent setnetent setprotoent setservent \ + gmtime localtime time times' -- $cur ) ) + return 0 + ;; + esac + + case $cur in + -*) + COMPREPLY=( $( compgen -W '-h -v -t -u -m -l -F -X -f -q' -- $cur )) + return 0 + ;; + */*) + return 0 + ;; + *) + _perlmodules + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '$( PAGER=cat man perl 2>/dev/null | sed -ne "/perl.*Perl overview/,/perlwin32/s/^[^a-z0-9]*\([a-z0-9]*\).*$/\1/p")' -- $cur ) ) + + return 0 + ;; + esac +} +complete -F _perldoc $default perldoc +} + +# rcs(1) completion +# +have rcs && +_rcs() +{ + local cur prev file dir i + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + file=${cur##*/} + dir=${cur%/*} + + # deal with relative directory + [ "$file" = "$dir" ] && dir=. + + COMPREPLY=( $( compgen -f "$dir/RCS/$file" ) ) + + for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do + file=${COMPREPLY[$i]##*/} + dir=${COMPREPLY[$i]%RCS/*} + COMPREPLY[$i]=$dir$file + done + + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -G "$dir/$file*,v" ) ) + + for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do + COMPREPLY[$i]=${COMPREPLY[$i]%,v} + done + + # default to files if nothing returned and we're checking in. + # otherwise, default to directories + [ ${#COMPREPLY[@]} -eq 0 -a $1 = ci ] && _filedir || _filedir -d +} && +complete -F _rcs $filenames ci co rlog rcs rcsdiff + +# lilo(8) completion +# +have lilo && { +_lilo_labels() +{ + COMPREPLY=( $( awk -F'=' '/label/ {print $2}' \ + /etc/lilo.conf | sed -e 's/"//g' | grep "^$cur" ) ) +} + +_lilo() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + -@(C|i|m|s|S)) + _filedir + return 0 + ;; + -r) + _filedir -d + return 0 + ;; + -@(I|D|R)) + # label completion + _lilo_labels + return 0 + ;; + -@(A|b|M|u|U)) + # device completion + cur=${cur:=/dev/} + _filedir + return 0 + ;; + -T) + # topic completion + COMPREPLY=( $( compgen -W 'help ChRul EBDA geom geom= \ + table= video' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + # relevant options completion + COMPREPLY=( $( compgen -W '-A -b -c -C -d -f -g -i -I -l -L -m \ + -M -p -P -q -r -R -s -S -t -T -u -U -v -V -w -x -z' -- \ + $cur ) ) + fi +} +complete -F _lilo lilo +} + +# links completion +# +have links && +_links() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + case "$cur" in + --*) + COMPREPLY=( $( compgen -W '--help' -- $cur ) ) + ;; + -*) + COMPREPLY=( $( compgen -W '-async-dns -max-connections \ + -max-connections-to-host -retries \ + -receive-timeout -unrestartable-receive-timeout\ + -format-cache-size -memory-cache-size \ + -http-proxy -ftp-proxy -download-dir \ + -assume-codepage -anonymous -dump -no-connect \ + -source -version -help' -- $cur ) ) + ;; + *) + if [ -r ~/.links/links.his ]; then + COMPREPLY=( $( compgen -W '$( < ~/.links/links.his )' \ + -- $cur ) ) + fi + _filedir '@(htm|html)' + return 0 + ;; + esac + + return 0 +} && +complete -F _links $filenames links + +[ $UNAME = FreeBSD ] && { +# FreeBSD package management tool completion +# +_pkg_delete() +{ + local cur pkgdir prev + + pkgdir=${PKG_DBDIR:-/var/db/pkg}/ + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + [ "$prev" = "-o" -o "$prev" = "-p" -o "$prev" = "-W" ] && return 0 + + COMPREPLY=( $( compgen -d $pkgdir$cur ) ) + COMPREPLY=( ${COMPREPLY[@]#$pkgdir} ) + + return 0 +} +complete -F _pkg_delete $dirnames pkg_delete pkg_info +have pkg_deinstall && complete -F _pkg_delete $dirnames pkg_deinstall + +# FreeBSD kernel module commands +# +_kldload() +{ + local cur moddir + + moddir=/modules/ + [ -d $moddir ] || moddir=/boot/kernel/ + cur=`_get_cword` + + COMPREPLY=( $( compgen -f $moddir$cur ) ) + COMPREPLY=( ${COMPREPLY[@]#$moddir} ) + COMPREPLY=( ${COMPREPLY[@]%.ko} ) + + return 0 +} +complete -F _kldload $filenames kldload + +_kldunload() +{ + local cur + cur=`_get_cword` + COMPREPLY=( $(kldstat | sed -ne "s/^.*[ \t]\+\($cur[a-z_]\+\).ko$/\1/p") ) +} +complete -F _kldunload $filenames kldunload +} + +# FreeBSD portupgrade completion +# +have portupgrade && +_portupgrade() +{ + local cur pkgdir prev + + pkgdir=${PKG_DBDIR:-/var/db/pkg}/ + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + [ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0 + + COMPREPLY=( $( compgen -d $pkgdir$cur ) ) + COMPREPLY=( ${COMPREPLY[@]#$pkgdir} ) + COMPREPLY=( ${COMPREPLY[@]%-*} ) + + return 0 +} && +complete -F _portupgrade $dirnames portupgrade + +# FreeBSD portinstall completion +# +have portinstall && +_portinstall() +{ + local cur portsdir prev indexfile + local -a COMPREPLY2 + + portsdir=${PORTSDIR:-/usr/ports}/ + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + # First try INDEX-5 + indexfile=$portsdir/INDEX-5 + # Then INDEX if INDEX-5 does not exist or system is not FreeBSD 5.x + [ "${OSTYPE%.*}" = "freebsd5" -a -f $indexfile ] || + indexfile=$portsdir/INDEX + + [ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0 + + COMPREPLY=( $( egrep "^$cur" < $indexfile | cut -d'|' -f1 ) ) + COMPREPLY2=( $( egrep "^[^\|]+\|$portsdir$cur" < $indexfile | \ + cut -d'|' -f2 ) ) + COMPREPLY2=( ${COMPREPLY2[@]#$portsdir} ) + COMPREPLY=( "${COMPREPLY[@]}" "${COMPREPLY2[@]}" ) + + return 0 +} && +complete -F _portinstall $dirnames portinstall + +# Slackware Linux removepkg completion +# +have removepkg && [ -f /etc/slackware-version ] && +_removepkg() +{ + local packages cur + + COMPREPLY=() + cur=`_get_cword` + + COMPREPLY=( $( (cd /var/log/packages; compgen -f -- "$cur") ) ) +} && +complete -F _removepkg $filenames removepkg && + complete $dirnames -f -X '!*.tgz' installpkg upgradepkg explodepkg + +# look(1) completion +# +have look && +_look() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD = 1 ]; then + COMPREPLY=( $( compgen -W '$(look $cur)' ) ) + fi +} && +complete -F _look $default look + +# ypcat(1) and ypmatch(1) completion +# +have ypmatch && +_ypmatch() +{ + local cur map + + COMPREPLY=() + cur=`_get_cword` + + [ $1 = ypcat ] && [ $COMP_CWORD -gt 1 ] && return 0 + [ $1 = ypmatch ] && [ $COMP_CWORD -gt 2 ] && return 0 + + if [ $1 = ypmatch ] && [ $COMP_CWORD -eq 1 ] && \ + [ ${#COMP_WORDS[@]} -eq 3 ]; then + map=${COMP_WORDS[2]} + COMPREPLY=( $( compgen -W '$( ypcat $map | \ + cut -d':' -f 1 )' -- $cur) ) + else + [ $1 = ypmatch ] && [ $COMP_CWORD -ne 2 ] && return 0 + COMPREPLY=( $( compgen -W \ + '$( echo $(ypcat -x | cut -d"\"" -f 2))' -- $cur)) + fi + + return 0 +} && +complete -F _ypmatch ypmatch ypcat + +# mplayer(1) completion +# +have mplayer && { +_mplayer_options_list() +{ + cur=${cur%\\} + COMPREPLY=( $( $1 $2 help 2> /dev/null | \ + sed -e '1,/^Available/d' | awk '{print $1}' | \ + sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' | \ + grep "^$cur" ) ) +} + +_mplayer() +{ + local cmd cur prev skinsdir IFS=$' \t\n' i j k=0 + + COMPREPLY=() + cmd=${COMP_WORDS[0]} + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(ac|afm|vc|vfm|ao|vo|vop|fstype)) + _mplayer_options_list mplayer $prev + return 0 + ;; + -@(oac|ovc|of)) + _mplayer_options_list mencoder $prev + return 0 + ;; + -audiofile) + _filedir '@(mp3|MP3|mpg|MPG|ogg|OGG|wav|WAV|mid|MID|flac|FLAC|mka|MKA)' + return 0 + ;; + -font) + _filedir '@(desc|ttf)' + return 0 + ;; + -sub) + _filedir '@(srt|SRT|sub|SUB|txt|TXT|utf|UTF|rar|RAR|mpsub|smi|js|ssa|SSA|aas|AAS)' + return 0 + ;; + -vobsub) + _filedir '@(idx|IDX|ifo|IFO|sub|SUB)' + IFS=$'\t\n' + COMPREPLY=( $( for i in "${COMPREPLY[@]}"; do + if [ -f $i -a -r $i ]; then + echo ${i%.*} + else + echo $i + fi + done ) ) + IFS=$' \t\n' + return 0 + ;; + -ifo) + _filedir '@(ifo|IFO)' + return 0 + ;; + -cuefile) + _filedir '@(bin|BIN|cue|CUE)' + return 0 + ;; + -skin) + # if you don't have installed mplayer in /usr/local you + # may want to set the MPLAYER_SKINS_DIR global variable + if [ -n "$MPLAYER_SKINS_DIR" ]; then + skinsdir=$MPLAYER_SKINS_DIR + else + skinsdir=/usr/local/share/mplayer/Skin + fi + + IFS=$'\t\n' + for i in ~/.mplayer/Skin $skinsdir; do + if [ -d $i -a -r $i ]; then + for j in $( compgen -d $i/$cur ); do + COMPREPLY[$k]=${j#$i/} + k=$((++k)) + done + fi + done + IFS=$' \t\n' + return 0 + ;; + -@(mixer|@(cdrom|dvd)-device|dvdauth|fb|zrdev)) + cur=${cur:=/dev/} + _filedir + return 0 + ;; + -@(edl?(out)|lircconf|menu-cfg|playlist|csslib|dumpfile)| \ + -@(subfile|vobsub|aofile|fbmodeconfig|include|o|dvdkey)| \ + -passlogfile) + _filedir + return 0 + ;; + -@(auto@(q|sync)|loop|menu-root|speed|sstep|aid|alang)| \ + -@(?(@(audio|sub)-)demuxer|bandwidth|cache|chapter)| \ + -@(dvd?(angle)|fps|frames|mc|passwd|user|sb|srate|ss|vcd)| \ + -@(vi?(d|vo)|ffactor|sid|slang|spu@(align|aa|gauss))| \ + -@(vobsubid|delay|bpp|brightness|contrast|dfbopts|display)| \ + -@(fbmode|geometry|guiwid|hue|icelayer|screen[wh]|wid)| \ + -@(monitor@(aspect|-@(dotclock|[hv]freq))|panscan|saturation)| \ + -@(xineramascreen|zr@(crop|norm|quality|[xy]doff|[vh]dec))| \ + -@(aspect|pp|x|y|xy|z|stereo|audio-@(density|delay|preload))| \ + -@(endpos|osdlevel|ffourcc|sws|channels|skiplimit|format)| \ + -@(ofps|aa@(driver|@(osd|sub)color)|vobsubout?(i@(ndex|d)))| \ + -sub@(-bg-@(alpha|color)|cp|delay|fps|pos|align|width)| \ + -sub@(font-@(blur|outline|autoscale|encoding|@(osd|text)-scale))) + return 0 + ;; + -lavdopts) + COMPREPLY=( $( compgen -W 'ec er= bug= idct= gray' \ + -- $cur ) ) + return 0 + ;; + -lavcopts) + COMPREPLY=( $( compgen -W 'vcodec= vqmin= vqscale= \ + vqmax= mbqmin= mbqmax= vqdiff= \ + vmax_b_frames= vme= vhq v4mv \ + keyint= vb_strategy= vpass= \ + aspect= vbitrate= vratetol= \ + vrc_maxrate= vrc_minrate= \ + vrc_buf_size= vb_qfactor= vi_qfactor= \ + vb_qoffset= vi_qoffset= vqblur= \ + vqcomp= vrc_eq= vrc_override= \ + vrc_init_cplx= vqsquish= vlelim= \ + vcelim= vstrict= vdpart vpsize= gray \ + vfdct= idct= lumi_mask= dark_mask= \ + tcplx_mask= scplx_mask= naq ildct \ + format= pred qpel precmp= cmp= \ + subcmp= predia= dia= trell last_pred= \ + preme= subq= psnr mpeg_quant aic umv' \ + -- $cur ) ) + return 0 + ;; + -ssf) + COMPREPLY=( $( compgen -W 'lgb= cgb= ls= cs= chs= \ + cvs=' -- $cur ) ) + return 0 + ;; + -jpeg) + COMPREPLY=( $( compgen -W 'noprogressive progressive \ + nobaseline baseline optimize= \ + smooth= quality= outdir=' -- $cur ) ) + return 0 + ;; + -xvidopts) + COMPREPLY=( $( compgen -W 'dr2 nodr2' -- $cur ) ) + return 0 + ;; + -xvidencopts) + COMPREPLY=( $( compgen -W 'pass= bitrate= \ + fixed_quant= me_quality= 4mv \ + rc_reaction_delay_factor= \ + rc_averaging_period= rc_buffer= \ + quant_range= min_key_interval= \ + max_key_interval= mpeg_quant \ + mod_quant lumi_mask hintedme \ + hintfile debug keyframe_boost= \ + kfthreshold= kfreduction=' -- $cur ) ) + return 0 + ;; + -divx4opts) + COMPREPLY=( $( compgen -W 'br= key= deinterlace q= \ + min_quant= max_quant= rc_period= \ + rc_reaction_period= crispness= \ + rc_reaction_ratio= pass= vbrpass= \ + help' -- $cur ) ) + return 0 + ;; + -info) + COMPREPLY=( $( compgen -W 'name= artist= genre= \ + subject= copyright= srcform= \ + comment= help' -- $cur ) ) + return 0 + ;; + -lameopts) + COMPREPLY=( $( compgen -W 'vbr= abr cbr br= q= aq= \ + ratio= vol= mode= padding= fast \ + preset= help' -- $cur ) ) + return 0 + ;; + -rawaudio) + COMPREPLY=( $( compgen -W 'on channels= rate= \ + samplesize= format=' -- $cur ) ) + return 0 + ;; + -rawvideo) + COMPREPLY=( $( compgen -W 'on fps= sqcif qcif cif \ + 4cif pal ntsc w= h= y420 yv12 yuy2 \ + y8 format= size=' -- $cur ) ) + return 0 + ;; + -aop) + COMPREPLY=( $( compgen -W 'list= delay= format= fout= \ + volume= mul= softclip' -- $cur ) ) + return 0 + ;; + -dxr2) + COMPREPLY=( $( compgen -W 'ar-mode= iec958-encoded \ + iec958-decoded mute ucode= 75ire bw \ + color interlaced macrovision= norm= \ + square-pixel ccir601-pixel cr-left= \ + cr-right= cr-top= cr-bot= ck-rmin= \ + ck-gmin= ck-bmin= ck-rmax= ck-gmax= \ + ck-bmax= ck-r= ck-g= ck-b= \ + ignore-cache= ol-osd= olh-cor= \ + olw-cor= olx-cor= oly-cor= overlay \ + overlay-ratio= update-cache' -- $cur )) + return 0 + ;; + -tv) + COMPREPLY=( $( compgen -W 'on noaudio driver= device= \ + input= freq= outfmt= width= height= \ + buffersize= norm= channel= chanlist= \ + audiorate= forceaudio alsa amode= \ + forcechan= adevice= audioid= volume= \ + bass= treble= balance= fps= \ + channels= immediatemode=' -- $cur ) ) + return 0 + ;; + -mf) + COMPREPLY=( $( compgen -W 'on w= h= fps= type=' \ + -- $cur ) ) + return 0 + ;; + -cdda) + COMPREPLY=( $( compgen -W 'speed= paranoia= \ + generic-dev= sector-size= overlap= \ + toc-bias toc-offset= skip noskip' \ + -- $cur ) ) + return 0 + ;; + -input) + COMPREPLY=( $( compgen -W 'conf= ar-delay ar-rate \ + keylist cmdlist js-dev file' -- $cur ) ) + return 0 + ;; + -af) + COMPREPLY=( $( compgen -W 'resample resample= \ + channels channels= format format= \ + volume volume= delay delay= pan \ + pan= sub sub= surround surround=' \ + -- $cur ) ) + return 0 + ;; + -af-adv) + COMPREPLY=( $( compgen -W 'force= list=' -- $cur ) ) + return 0 + ;; + esac + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W '-aid -alang -audio-demuxer \ + -audiofile -cdrom-device -cache -cdda \ + -channels -chapter -csslib -demuxer \ + -dvd -dvd-device -dvdangle -dvdauth \ + -dvdkey -dvdnav -forceidx -fps -frames \ + -hr-mp3-seek -idx -mc -mf -ni -nobps \ + -passwd -rawaudio -rtsp-stream-over-tcp\ + -skipopening -sb -srate -ss -tv -user \ + -vcd -vid -vivo -ifo -ffactor -font \ + -noautosub -nooverlapsub -sid -slang \ + -sub -subcc -subcp -sub-demuxer \ + -subdelay -subfont-autoscale \ + -subfont-blur -subfont-encoding \ + -subfont-osd-scale -subfont-outline \ + -subfont-text-scale -subfps -subfile \ + -subpos -unicode -utf8 -vobsub \ + -vobsubid -ac -afm -aspect -flip \ + -lavdopts -noaspect -nosound -pp -ssf \ + -stereo -sws -vc -vfm -vop -xvidopts\ + -xy -zoom -bandwidth -cuefile \ + -noextbased -rawvideo -overlapsub \ + -sub-bg-alpha -sub-bg-color -subalign \ + -subwidth -sub-no-text-pp -spualign \ + -spuaa -spugauss -pphelp -verbose -v \ + -noni -noidx -nohr-mp3-seek -extbased \ + -bps -oldpp -nozoom -noflip -nounicode \ + -noutf8' -- $cur ) ) + # add mplayer specific options + [[ "$cmd" == @(?(g)mplayer) ]] && COMPREPLY=( "${COMPREPLY[@]}" \ + $(compgen -W '-autoq -autosync -benchmark \ + -framedrop -h -help -hardframedrop \ + -identify -input -lircconf -loop \ + -nojoystick -nolirc -nortc -playlist \ + -quiet -really-quiet -rnd -sdp -skin \ + -slave -softsleep -speed -sstep \ + -use-stdin -dumpaudio -dumpfile \ + -dumpstream -dumpvideo -dumpmicrodvdsub\ + -dumpmpsub -dumpsrtsub -dumpjacosub \ + -dumpsami -dumpsub -osdlevel -af \ + -af-adv -ao -aofile -aop -delay -mixer \ + -nowaveheader -bpp -brightness \ + -contrast -display -double -dr -dxr2 \ + -fb -fbmode -fbmodeconfig -forcexv -fs \ + -geometry -hue -icelayer -jpeg \ + -monitor-dotclock -monitor-hfreq \ + -monitor-vfreq -monitoraspect \ + -nograbpointer -noslices -panscan \ + -rootwin -saturation -screenw -screenh \ + -stop-xscreensaver -vm -vo -vsync -wid \ + -xineramascreen -z -zrbw -zrcrop \ + -zrdev -zrfd -zrhelp -zrnorm -zrquality \ + -zrvdec -zrhdec -zrxdoff -zrydoff -y \ + -edl -edlout -enqueue -fixed-vo \ + -menu -menu-root -menu-cfg -shuffle \ + -format -aahelp -dfbopts -fstype \ + -guiwid -nokeepaspect -x --help \ + -aaosdcolor -aasubcolor -aadriver \ + -aaextended -aaeight' -- $cur) ) + # add mencoder specific options + [[ "$cmd" = mencoder ]] && COMPREPLY=( "${COMPREPLY[@]}" \ + $(compgen -W '-audio-density -audio-delay \ + -audio-preload -divx4opts -endpos \ + -ffourcc -include -info -lameopts \ + -lavcopts -noskip -o -oac -ofps -ovc \ + -passlogfile -skiplimit -vobsubout \ + -vobsuboutindex -vobsuboutid \ + -xvidencopts -of --verbose' -- $cur) ) + ;; + *) + _filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fli|FLI|flv|FLV|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|m4v|M4V|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mk[av]|MK[AV]|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|flv|FLV|divx|DIVX)' + ;; + esac + + return 0 +} +complete $filenames -F _mplayer mplayer mencoder gmplayer kplayer +} + +# KDE dcop completion +# +have dcop && +_dcop() +{ + local cur compstr + + COMPREPLY=() + cur=`_get_cword` + if [ -z $cur ]; then + compstr=${COMP_WORDS[*]} + else + compstr=$( command echo ${COMP_WORDS[*]} | sed "s/ $cur$//" ) + fi + COMPREPLY=( $( compgen -W '$( command $compstr | sed s/\(.*\)// )' -- $cur ) ) +} && +complete -F _dcop dcop + +# wvdial(1) completion +# +have wvdial && +_wvdial() +{ + local cur prev config i IFS=$'\t\n' + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + --config) + _filedir + return 0 + ;; + esac + + case $cur in + -*) + COMPREPLY=( $( compgen -W '--config --chat \ + --remotename --help --version --no-syslog' \ + -- $cur ) ) + ;; + *) + # start with global and personal config files + config="/etc/wvdial.conf"$'\t'"$HOME/.wvdialrc" + # replace with command line config file if present + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" == "--config" ]]; then + config=${COMP_WORDS[i+1]} + break + fi + done + # parse config files for sections and + # remove default section + COMPREPLY=( $( sed -ne \ + "s|^\[Dialer \($cur.*\)\]$|\1|p" \ + $config 2>/dev/null |grep -v '^Defaults$')) + # escape spaces + COMPREPLY=${COMPREPLY// /\\ } + ;; + esac + +} && +complete -F _wvdial wvdial + +# gpg(1) completion +# +have gpg && +_gpg() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(s|-sign|-clearsign|-decrypt-files|-load-extension)) + _filedir + return 0 + ;; + --@(export|@(?(l|nr|nrl)sign|edit)-key)) + # return list of public keys + COMPREPLY=( $( compgen -W "$( gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*/\([^ ]*\).*\(<\([^>]*\)>\).*$@\1 \3@p')" -- "$cur" )) + return 0 + ;; + -@(r|-recipient)) + COMPREPLY=( $( compgen -W "$( gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*<\([^>]*\)>.*$@\1@p')" -- "$cur" )) + if [ -e ~/.gnupg/gpg.conf ]; then + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$( sed -ne 's@^[ \t]*group[ \t][ \t]*\([^=]*\).*$@\1@p' ~/.gnupg/gpg.conf )" -- "$cur") ) + fi + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-s -b -e -f -c -d -a -r -u -Z -o -v\ + -q -n -N $(gpg --dump-options)' -- $cur ) ) + fi + +} && +complete -F _gpg $default gpg + +# iconv(1) completion +# +have iconv && +_iconv() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(f|t|-@(from|to)-code)) + COMPREPLY=( $( compgen -W \ + '$( iconv --list | sed -e "s@//@@;" )' -- "$cur" ) ) + return 0 + ;; + esac + + + if [[ "$cur" = -* ]]; then + COMPREPLY=( $( compgen -W '--from-code -f --to-code -t --list + --output -o --verbose' -- "$cur" ) ) + return 0 + fi +} && +complete -F _iconv $default iconv + +# dict(1) completion +# +{ have dict || have rdict; } && { +_dictdata() +{ + dict $host $port $1 2>/dev/null | sed -ne \ + 's/^['$'\t '']['$'\t '']*\([^'$'\t '']*\).*$/\1/p' +} + +_dict() +{ + local cur prev host port db dictfile + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + dictfile=/usr/share/dict/words + + for (( i=1; i < COMP_CWORD; i++ )); do + case "${COMP_WORDS[i]}" in + -@(h|--host)) + host=${COMP_WORDS[i+1]} + [ -n "$host" ] && host="-h $host" + i=$((++i)) + ;; + -@(p|-port)) + port=${COMP_WORDS[i+1]} + [ -n "$port" ] && port="-p $port" + i=$((++i)) + ;; + -@(d|-database)) + db=${COMP_WORDS[i+1]} + [ -n "$db" ] && host="-d $db" + i=$((++i)) + ;; + *) + ;; + esac + done + + if [[ "$cur" = -* ]]; then + COMPREPLY=( $( compgen -W '-h --host -p --port -d --database \ + -m --match -s --strategy -c --config -C \ + --nocorrect -D --dbs -S --strats -H \ + --serverhelp -i --info -I --serverinfo \ + -a --noauth -u --user -k --key -V --version \ + -L --license --help -v --verbose -r --raw \ + -P --pager --debug --html --pipesize --client' \ + -- "$cur" ) ) + return 0 + fi + + case "$prev" in + -@(d|-database|i|info)) + COMPREPLY=( $( compgen -W '$( _dictdata -D )' -- "$cur" ) ) + return 0 + ;; + -@(s|-strategy)) + COMPREPLY=( $( compgen -W '$( _dictdata -S )' -- "$cur" ) ) + return 0 + ;; + *) + ;; + esac + + [ -r $dictfile ] && \ + COMPREPLY=( $( compgen -W '$( cat $dictfile )' -- "$cur" ) ) +} +complete -F _dict $default dict rdict +} + +# cdrecord(1) completion +# +have cdrecord && +_cdrecord() +{ + local cur prev i generic_options track_options track_mode + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + # foo=bar style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case "$prev" in + @(text|cue)file) + _filedir + return 0 + ;; + blank) + COMPREPLY=( $( compgen -W 'help all fast \ + track unreserve trtail unclose session' \ + -- $cur ) ) + return 0 + ;; + driveropts) + COMPREPLY=( $( compgen -W 'burnfree noburnfree\ + varirec= audiomaster forcespeed noforcespeed\ + speedread nospeedread singlesession \ + nosinglesession hidecdr nohidecdr tattooinfo\ + tattoofile=' -- $cur ) ) + return 0 + ;; + esac + fi + + generic_options=(-version -v -V -d -silent -s -force -immed -dummy \ + -dao -raw -raw96r -raw96p -raw16 -multi -msinfo -toc \ + -atip -fix -nofix -waiti -load -lock -eject -format \ + -setdropts -checkdrive -prcap -inq -scanbus -reset \ + -abort -overburn -ignsize -useinfo -packet -noclose \ + -text debug= kdebug= kd= minbuf= speed= blank= fs= \ + dev= gracetime= timeout= driver= driveropts= \ + defpregap= pktsize= mcn= textfile= cuefile=) + track_options=(-audio -swab -data -mode2 -xa -xa1 -xa2 -xamix -cdi \ + -isosize -pad padsize= -nopad -shorttrack -noshorttrack\ + pregap= -preemp -nopreemp -copy -nocopy -scms tcsize= \ + isrc= index=) + # look if previous was either a file or a track option + track_mode=0 + if [ $COMP_CWORD -gt 1 ]; then + if [ -f "$prev" ]; then + track_mode=1 + else + for (( i=0; i < ${#track_options[@]}; i++ )); do + if [[ "${track_options[i]}" == "$prev" ]]; then + track_mode=1 + break + fi + done + fi + fi + + # files are always eligible completion + _filedir + # track options are always available + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '${track_options[@]}' -- $cur ) ) + # general options are no more available after file or track option + if [ $track_mode -eq 0 ]; then + COMPREPLY=( "${COMPREPLY[@]}" \ + $( compgen -W '${generic_options[@]}' -- $cur ) ) + fi + +} && +complete -F _cdrecord $filenames cdrecord + +# mkisofs(8) completion +# +have mkisofs && +_mkisofs() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(o|abstract|biblio|check-session|copyright|log-file|root-info|prep-boot|*-list)) + _filedir + return 0 + ;; + -*-charset) + COMPREPLY=( $( mkisofs -input-charset help 2>&1 | \ + tail +3 | grep "^$cur") ) + return 0 + ;; + -uid) + _uids + return 0 + ;; + -gid) + _gids + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-abstract -A -allow-lowercase \ + -allow-multidot -biblio -cache-inodes \ + -no-cache-inodes -b -eltorito-alt-boot -B -G \ + -hard-disk-boot -no-emul-boot -no-boot \ + -boot-load-seg -boot-load-size \ + -boot-info-table -C -c -check-oldname \ + -check-session -copyright -d -D -dir-mode \ + -dvd-video -f -file-mode -gid -gui \ + -graft-points -hide -hide-list -hidden \ + -hidden-list -hide-joliet -hide-joliet-list \ + -hide-joliet-trans-tbl -hide-rr-moved \ + -input-charset -output-charset -iso-level -J \ + -joliet-long -jcharset -l -L -log-file -m \ + -exclude-list -max-iso9660-filenames -M -N \ + -new-dir-mode -nobak -no-bak -force-rr -no-rr \ + -no-split-symlink-components \ + -no-split-symlink-fields -o -pad -no-pad \ + -path-list -P -p -print-size -quiet -R -r \ + -relaxed-filenames -sort -split-output \ + -stream-media-size -stream-file-name -sysid -T\ + -table-name -ucs-level -udf -uid \ + -use-fileversion -U -no-iso-translate -V \ + -volset -volset-size -volset-seqno -v -x -z \ + -hfs -apple -map -magic -hfs-creator \ + -hfs-type -probe -no-desktop -mac-name \ + -boot-hfs-file -part -auto -cluster-size \ + -hide-hfs -hide-hfs-list -hfs-volid \ + -icon-position -root-info -prep-boot \ + -input-hfs-charset -output-hfs-charset \ + -hfs-unlock -hfs-bless -hfs-parms --cap \ + --netatalk --double --ethershare --ushare \ + --exchange --sgi --xinet --macbin --single \ + --dave --sfm --osx-double --osx-hfs' -- $cur )) + else + _filedir + fi + +} && +complete -F _mkisofs $filenames mkisofs + +# mc(1) completion +# +have mc && +_mc() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + # -name value style option + case "$prev" in + -@(e|v|l|P)) + _filedir + return 0 + ;; + esac + + # --name=value style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case "$prev" in + --@(edit|view|ftplog|printwd)) + _filedir + return 0 + ;; + esac + fi + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-a --stickchars -b --nocolor -c \ + --color -C --colors= -d --nomouse -e --edit= -f \ + --datadir -k --resetsoft -l --ftplog= -P --printwd= \ + -s --slow -t --termcap -u --nosubshell -U --subshell \ + -v --view= -V --version -x --xterm -h --help' -- $cur ) ) + else + _filedir -d + fi +} && +complete -F _mc $filenames mc + +# yum(8) completion +# +have yum && { +_yum() +{ + local cur prev special + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @(install|update|upgrade|remove|erase|deplist) ]]; then + special=${COMP_WORDS[i]} + fi + done + + if [ -n "$special" ]; then + case $special in + install|deplist) + COMPREPLY=( $( compgen -W '$( yum -C list | cut -d" " -f1 )' -- $cur ) ) + return 0 + ;; + *) + _rpm_installed_packages + return 0 + ;; + esac + fi + + case $cur in + --*) + COMPREPLY=( $( compgen -W '--installroot --version --help --enablerepo --disablerepo --exclude --obsoletes --noplugins' -- $cur ) ) + return 0 + ;; + -*) + COMPREPLY=( $( compgen -W '-c -e -d -y -t -R -C -h' -- $cur ) ) + return 0 + ;; + esac + + case $prev in + list) + COMPREPLY=( $( compgen -W 'all available updates installed extras obsoletes recent' -- $cur ) ) + ;; + clean) + COMPREPLY=( $( compgen -W 'packages headers metadata cache dbcache all' -- $cur ) ) + ;; + localinstall) + _filedir rpm + ;; + -c) + _filedir + ;; + --installroot) + _filedir -d + ;; + *) + COMPREPLY=( $( compgen -W 'install update check-update upgrade remove list \ + search info provides clean groupinstall groupupdate \ + grouplist deplist erase groupinfo groupremove \ + localinstall localupdate makecache resolvedep \ + shell whatprovides' -- $cur ) ) + ;; + esac +} +complete -F _yum $filenames yum + +# yum-arch(8) completion +# +_yum_arch() +{ + local cur + COMPREPLY=() + cur=`_get_cword` + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W '-d -v -vv -n -c -z -s -l -q' -- $cur ) ) + ;; + *) + _filedir -d + ;; + esac + + return 0 + +} +complete -F _yum_arch $filenames yum-arch +} + +# ImageMagick completion +# +have convert && { +_ImageMagick() +{ + local prev + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -channel) + COMPREPLY=( $( compgen -W 'Red Green Blue Opacity \ + Matte Cyan Magenta Yellow Black' -- $cur ) ) + return 0 + ;; + -colormap) + COMPREPLY=( $( compgen -W 'shared private' -- $cur ) ) + return 0 + ;; + -colorspace) + COMPREPLY=( $( compgen -W 'GRAY OHTA RGB Transparent \ + XYZ YCbCr YIQ YPbPr YUV CMYK' -- $cur ) ) + return 0 + ;; + -compose) + COMPREPLY=( $( compgen -W 'Over In Out Atop Xor Plus \ + Minus Add Subtract Difference Multiply Bumpmap\ + Copy CopyRed CopyGreen CopyBlue CopyOpacity' \ + -- $cur ) ) + return 0 + ;; + -compress) + COMPREPLY=( $( compgen -W 'None BZip Fax Group4 JPEG \ + Lossless LZW RLE Zip' -- $cur ) ) + return 0 + ;; + -dispose) + COMPREPLY=( $( compgen -W 'Undefined None Background \ + Previous' -- $cur ) ) + return 0 + ;; + -encoding) + COMPREPLY=( $( compgen -W 'AdobeCustom AdobeExpert \ + AdobeStandard AppleRoman BIG5 GB2312 Latin2 \ + None SJIScode Symbol Unicode Wansung' -- $cur)) + return 0 + ;; + -endian) + COMPREPLY=( $( compgen -W 'MSB LSB' -- $cur ) ) + return 0 + ;; + -filter) + COMPREPLY=( $( compgen -W 'Point Box Triangle Hermite \ + Hanning Hamming Blackman Gaussian Quadratic \ + Cubic Catrom Mitchell Lanczos Bessel Sinc' \ + -- $cur ) ) + return 0 + ;; + -format) + COMPREPLY=( $( convert -list format | \ + awk '/ [r-][w-][+-] / {print $1}' | \ + tr -d '*' | tr [:upper:] [:lower:] | \ + grep "^$cur" ) ) + return 0 + ;; + -gravity) + COMPREPLY=( $( compgen -W 'Northwest North NorthEast \ + West Center East SouthWest South SouthEast' \ + -- $cur ) ) + return 0 + ;; + -intent) + COMPREPLY=( $( compgen -W 'Absolute Perceptual \ + Relative Saturation' -- $cur ) ) + return 0 + ;; + -interlace) + COMPREPLY=( $( compgen -W 'None Line Plane Partition' \ + -- $cur ) ) + return 0 + ;; + -limit) + COMPREPLY=( $( compgen -W 'Disk File Map Memory' \ + -- $cur ) ) + return 0 + ;; + -list) + COMPREPLY=( $( compgen -W 'Delegate Format Magic \ + Module Resource Type' -- $cur ) ) + return 0 + ;; + -map) + COMPREPLY=( $( compgen -W 'best default gray red \ + green blue' -- $cur ) ) + _filedir + return 0 + ;; + -noise) + COMPREPLY=( $( compgen -W 'Uniform Gaussian \ + Multiplicative \ + Impulse Laplacian Poisson' -- $cur ) ) + return 0 + ;; + -preview) + COMPREPLY=( $( compgen -W 'Rotate Shear Roll Hue \ + Saturation Brightness Gamma Spiff \ + Dull Grayscale Quantize Despeckle \ + ReduceNoise AddNoise Sharpen Blur \ + Treshold EdgeDetect Spread Shade \ + Raise Segment Solarize Swirl Implode \ + Wave OilPaint CharcoalDrawing JPEG' \ + -- $cur ) ) + return 0 + ;; + -@(mask|profile|texture|tile|write)) + _filedir + return 0 + ;; + -type) + COMPREPLY=( $( compgen -W 'Bilevel Grayscale Palette \ + PaletteMatte TrueColor TrueColorMatte \ + ColorSeparation ColorSeparationlMatte \ + Optimize' -- $cur ) ) + return 0 + ;; + -units) + COMPREPLY=( $( compgen -W 'Undefined PixelsPerInch \ + PixelsPerCentimeter' -- $cur ) ) + return 0 + ;; + -virtual-pixel) + COMPREPLY=( $( compgen -W 'Constant Edge mirror tile' \ + -- $cur ) ) + return 0 + ;; + -visual) + COMPREPLY=( $( compgen -W 'StaticGray GrayScale \ + StaticColor PseudoColor TrueColor \ + DirectColor defaut visualid' -- $cur )) + return 0 + ;; + esac +} + +_convert() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + _ImageMagick + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-adjoin -affine -antialias -append \ + -authenticate -average -background -black-threshold \ + -blue-primary -blur -border -bordercolor -channel \ + -charcoal -chop -clip -coalesce -colorize -colors \ + -colorspace -comment -compress -contrast -convolve \ + -crop -cycle -debug -deconstruct -delay -density \ + -depth -despeckle -display -dispose -dither -draw \ + -edge -emboss -encoding -endian -enhance -equalize \ + -extract -fill -filter -flatten -flip -flop -font \ + -frame -fuzz -gamma -gaussian -geometry \ + -green-primary -gravity -help -implode -intent \ + -interlace -label -lat -level -limit -list -log -loop \ + -map -mask -matte -median -modulate -monochrome \ + -morph -mosaic -negate -noop -noise -normalize \ + -opaque -ordered-dither -page -paint -ping -pointsize \ + -preview -profile -quality -raise -random-threshold \ + -region -raise -red-primary -render -resize -resample \ + -roll -rotate -sample -sampling-factor -scale -scene \ + -seed -segment -shade -sharpen -shave -shear -size \ + -solarize -spread -stroke -strokewidth -swirl \ + -texture -threshold -thumbnail -tile -transform \ + -transparent -treedepth -trim -type -undercolor \ + -units -unsharp -verbose -version -view \ + -virtual-pixel -wave -white-point -white-threshold \ + -write' -- $cur ) ) + elif [[ "$cur" == +* ]]; then + COMPREPLY=( $( compgen -W '+adjoin +append +compress \ + +contrast +debug +dither +endian +gamma +label +map \ + +mask +matte +negate +noise +page +raise +render \ + +write' -- $cur ) ) + else + _filedir + fi +} +complete -F _convert $filenames convert + +_mogrify() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + _ImageMagick + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-affine -antialias -authenticate \ + -background -black-threshold -blue-primary -blur \ + -border -bordercolor -channel -charcoal -chop \ + -colorize -colors -colorspace -comment -compress \ + -contrast -convolve -crop -cycle -debug -delay \ + -density -depth -despeckle -display -dispose -dither \ + -draw -edge -emboss -encoding -endian -enhance \ + -equalize -extract -fill -filter -flip -flop -font \ + -format -frame -fuzz -gamma -gaussian -geometry \ + -green-primary -implode -interlace -help -label -lat \ + -level -limit -list -log -loop -map -mask -matte \ + -median -modulate -monochrome -negate -noop \ + -normalize -opaque -page -paint -fill -ordered-dither \ + -pointsize -profile -quality -raise -random-threshold \ + -red-primary -region -resample -resize -roll -rotate \ + -sample -sampling-factor -scale -scene -seed -segment \ + -shade -sharpen -shear -size -solarize -spread \ + -stroke -strokewidth -swirl -texture -threshold \ + -thumbnail -tile -transform -transparent -treedepth \ + -trim -type -undercolor -units -unsharp -verbose \ + -version -view -virtual-pixel -wave -white-point \ + -white-threshold' -- $cur ) ) + elif [[ "$cur" == +* ]]; then + COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \ + +endian +gamma +label +map +mask +matte +negate +page \ + +raise' -- $cur ) ) + else + _filedir + fi +} +complete -F _mogrify $filenames mogrify + +_display() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + _ImageMagick + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-authenticate -backdrop -border \ + -colormap -colors -colorspace -comment -compress \ + -contrast -crop -debug -delay -density -depth \ + -despeckle -display -dispose -dither -edge -endian \ + -enhance -extract -filter -flip -flop -frame -gamma \ + -geometry -help -immutable -interlace -label -limit \ + -log -map -matte -monochrome -negate -noop -page \ + -quality -raise -remote -roll -rotate -sample \ + -sampling-factor -scene -segment -sharpen -size \ + -texture -treedepth -trim -update -verbose -version \ + -virtual-pixel -window -window_group -write' -- $cur)) + elif [[ "$cur" == +* ]]; then + COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \ + +endian +gamma +label +map +matte +negate +page \ + +raise +write' -- $cur ) ) + else + _filedir + fi +} +complete -F _display $filenames display + +_animate() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + _ImageMagick + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-authenticate -backdrop -colormap \ + -colors -colorspace -crop -debug -delay -density \ + -depth -display -dither -extract -gamma -geometry \ + -help -interlace -limit -log -matte -map -monochrome \ + -noop -pause -remote -rotate -sampling-factor -scene \ + -size -treedepth -trim -verbose -version -visual \ + -virtual-pixel -window' -- $cur ) ) + elif [[ "$cur" == +* ]]; then + COMPREPLY=( $( compgen -W '+debug +dither +gamma +map +matte' -- $cur ) ) + else + _filedir + fi +} +complete -F _animate $filenames animate + +_identify() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + _ImageMagick + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-authenticate -debug -density \ + -depth -extract -format -help -interlace -limit -list \ + -log -size -sampling-factor -verbose -version \ + -virtual-pixel' -- $cur ) ) + elif [[ "$cur" == +* ]]; then + COMPREPLY=( $( compgen -W '+debug ' -- $cur ) ) + else + _filedir + fi +} +complete -F _identify $filenames identify + +_montage() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + _ImageMagick + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-adjoin -affine -authenticate \ + -blue-primary -blur -colors -colorspace -comment \ + -compose -compress -crop -debug -density -depth \ + -display -dispose -dither -draw -encoding -endian \ + -extract -fill -filter -flip -flop -frame -gamma \ + -geometry -gravity -green-primary -interlace -help \ + -label -limit -log -matte -mode -monochrome -noop \ + -page -pointsize -quality -red-primary -resize \ + -rotate -sampling-factor -scene -shadow -size \ + -stroke -texture -thumbnail -tile -transform \ + -transparent -treedepth -trim -type -verbose \ + -version -virtual-pixel -white-point' -- $cur ) ) + elif [[ "$cur" == +* ]]; then + COMPREPLY=( $( compgen -W '+adjoin +compress +debug +dither \ + +endian +gamma +label +matte +page' -- $cur ) ) + else + _filedir + fi +} +complete -F _montage $filenames montage + +_composite() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + _ImageMagick + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-affine -authenticate \ + -blue-primary -colors -colorspace -comment -compose \ + -compress -debug -density -depth -displace -display \ + -dispose -dissolve -dither -encoding -endian -extract \ + -filter -font -geometry -gravity -green-primary -help \ + -interlace -label -limit -log -matte -monochrome \ + -negate -page -profile -quality -red-primary -rotate \ + -resize -sampling-factor -scene -sharpen -size \ + -stegano -stereo -thumbnail -tile -transform \ + -treedepth -type -units -unsharp -verbose -version \ + -virtual-pixel -watermark -white-point -write' \ + -- $cur ) ) + elif [[ "$cur" == +* ]]; then + COMPREPLY=( $( compgen -W '+compress +debug +dither +endian +label \ + +matte +negate +page +write' -- $cur ) ) + else + _filedir + fi +} +complete -F _composite $filenames composite +} + +# dd(1) completion +# +have dd && +_dd() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + case "$cur" in + if=*|of=*) + cur=${cur#*=} + _filedir + return 0 + ;; + conv=*) + cur=${cur#*=} + COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock \ + lcase notrunc ucase swab noerror sync' \ + -- $cur ) ) + return 0 + ;; + esac + + _expand || return 0 + + COMPREPLY=( $( compgen -W '--help --version' -- $cur ) \ + $( compgen -W 'bs cbs conv count ibs if obs of seek skip'\ + -S '=' -- $cur ) ) +} && +complete -F _dd $nospace $filenames dd + +# CUPS cancel(1) completion +# +have cancel && +_cancel() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + COMPREPLY=( $( lpstat | cut -d' ' -f1 | grep "^$cur" ) ) +} && +complete -F _cancel $filenames cancel + +# aspell(1) completion +# +have aspell && { +_aspell_dictionary() +{ + local datadir + datadir=/usr/lib/aspell + COMPREPLY=( $( command ls $datadir/*.@(multi|alias) ) ) + COMPREPLY=( ${COMPREPLY[@]%.@(multi|alias)} ) + COMPREPLY=( $( compgen -W '${COMPREPLY[@]#$datadir/}' -- $cur ) ) +} + +_aspell() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + # --name value style option + case "$prev" in + @(-c|-p|check)) + _filedir + return 0 + ;; + @(dump|create|merge)) + COMPREPLY=( $( compgen -W 'master personal repl' -- $cur ) ) + return 0 + ;; + -d) + _aspell_dictionary + return 0 + ;; + esac + + # --name=value style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case "$prev" in + --@(conf|personal|repl|per-conf)) + _filedir + return 0 + ;; + --@(conf-dir|data-dir|dict-dir|home-dir|local-data-dir|prefix)) + _filedir -d + return 0 + ;; + --master) + _aspell_dictionary + return 0 + ;; + --mode) + COMPREPLY=( $( compgen -W 'none url email sgml tex' -- $cur ) ) + return 0 + ;; + --sug-mode) + COMPREPLY=( $( compgen -W 'ultra fast normal bad-speller' -- $cur ) ) + return 0 + ;; + --keymapping) + COMPREPLY=( $( compgen -W 'aspell ispell' -- $cur ) ) + return 0 + ;; + esac + fi + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--conf= --conf-dir= --data-dir= --dict-dir= \ + --encoding= --add-filter= --rem-filter= --mode= -e \ + -H -t --add-extra-dicts= --rem-extra-dicts= \ + --home-dir= -W --ignore= --ignore-accents \ + --dont-ignore-accents --ignore-case --dont-ignore-case \ + --ignore-repl --dont-ignore-repl --jargon= --keyboard= \ + --lang= --language-tag= --local-data-dir= -d --master= \ + --module= --add-module-search-order= \ + --rem-module-search-order= --per-conf= -p --personal= \ + --prefix= --repl= -C -B --run-together --dont-run-together \ + --run-together-limit= --run-together-min= --save-repl \ + --dont-save-repl --set-prefix --dont-set-prefix --size= \ + --spelling= --strip-accents --dont-strip-accents \ + --sug-mode= --add-word-list-path= --rem-word-list-path= \ + -b -x --backup -b|-x --dont-backup --reverse --dont-reverse \ + --time --dont-time --keymapping= --add-email-quote= \ + --rem-email-quote= --email-margin= --add-tex-command= \ + --rem-tex-command= --tex-check-comments \ + --dont-tex-check-comments --add-tex-extension= \ + --rem-tex-extension= --add-sgml-check= --rem-sgml-check= \ + --add-sgml-extension= --rem-sgml-extension=' -- $cur ) ) + else + COMPREPLY=( $( compgen -W '-? help -c check -a pipe -l list \ + config config soundslike filter -v version dump \ + create merge' -- $cur ) ) + fi + +} +complete -F _aspell $filenames aspell +} + +# xmms(1) completion +# +have xmms && +_xmms() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-h --help -r --rew -p --play \ + -u --pause -s --stop -t --play-pause -f --fwd -e \ + --enqueue -m --show-main-window -i --sm-client-id \ + -v --version' -- $cur ) ) + else + _filedir '@(mp[23]|MP[23]|ogg|OGG|wav|WAV|pls|m3u|xm|mod|s[3t]m|it|mtm|ult|flac)' + + fi + +} && +complete -F _xmms $filenames xmms + +# info(1) completion +# +have info && +_info() +{ + local cur infopath UNAME + + COMPREPLY=() + cur=`_get_cword` + + _expand || return 0 + + # default completion if parameter contains / + if [[ "$cur" == */* ]]; then + _filedir + return 0 + fi + + infopath='/usr/share/info' + + if [ "${INFOPATH: -1:1}" == ':' ]; then + infopath=${INFOPATH}${infopath} + elif [ ${INFOPATH:+set} ]; then + infopath=$INFOPATH + fi + + infopath=$infopath: + if [ -n "$cur" ]; then + infopath="${infopath//://$cur* }" + else + infopath="${infopath//:// }" + fi + + # redirect stderr for when path doesn't exist + COMPREPLY=( $( eval command ls "$infopath" 2>/dev/null ) ) + # weed out directory path names and paths to info pages + COMPREPLY=( ${COMPREPLY[@]##*/?(:)} ) + # weed out info dir file + for (( i=0 ; i < ${#COMPREPLY[@]} ; ++i )); do + if [ "${COMPREPLY[$i]}" == 'dir' ]; then + unset COMPREPLY[$i]; + fi; + done + # strip suffix from info pages + COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2)} ) + COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) ) + + return 0 +} && +complete -F _info $filenames info + +# dhclient(1) completion +# +have dhclient && _dhclient() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(cf|lf|pf|sf)) + _filedir + return 0 + ;; + -s) + _known_hosts + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-p -d -q -1 -r -lf -pf \ + -cf -sf -s -g -n -nw -w' -- $cur ) ) + else + _available_interfaces + fi +} && +complete -F _dhclient dhclient + +# lvm(8) completion +# +have lvm && { +_volumegroups() +{ + COMPREPLY=( $(compgen -W "$( vgscan 2>/dev/null | \ + sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p' )" -- $cur ) ) +} + +_physicalvolumes() +{ + COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \ + sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p' )" -- $cur ) ) +} + +_logicalvolumes() +{ + COMPREPLY=( $(compgen -W "$( lvscan 2>/dev/null | \ + sed -n -e "s|^.*'\(.*\)'.*$|\1|p" )" -- $cur ) ) +} + +_units() +{ + COMPREPLY=( $( compgen -W 'h s b k m g t H K M G T' -- $cur ) ) +} + +_sizes() +{ + COMPREPLY=( $( compgen -W 'k K m M g G t T' -- $cur ) ) +} + +_args() +{ + args=0 + if [[ "${COMP_WORDS[0]}" == lvm ]]; then + offset=2 + else + offset=1 + fi + for (( i=$offset; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" != -* ]]; then + args=$(($args + 1)) + fi + done +} + +_lvmdiskscan() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -h -? --help -l \ + --lvmpartition -v --verbose --version' -- $cur ) ) + fi +} +complete -F _lvmdiskscan lvmdiskscan + +_pvscan() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -e \ + --exported -n --novolumegroup -h -? \ + --help --ignorelockingfailure -P \ + --partial -s --short -u --uuid -v \ + --verbose --version' -- $cur ) ) + fi +} +complete -F _pvscan pvscan + +_pvs() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(o|O|-options|-sort)) + COMPREPLY=( $( compgen -W 'pv_fmt pv_uuid \ + pv_size pv_free pv_used pv_name \ + pv_attr pv_pe_count \ + pv_pe_alloc_count' -- $cur ) ) + return 0 + ;; + --units) + _units + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--aligned -a --all -d --debug \ + -h -? --help --ignorelockingfailure --noheadings \ + --nosuffix -o --options -O --sort \ + --separator --unbuffered --units \ + -v --verbose --version' -- $cur ) ) + else + _physicalvolumes + fi +} +complete -F _pvs pvs + +_pvdisplay() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + --units) + _units + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \ + -v --verbose -d --debug -h --help --version' -- $cur ) ) + else + _physicalvolumes + fi +} +complete -F _pvdisplay pvdisplay + +_pvchange() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|x|-autobackup|--allocatable)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-a --all -A --autobackup \ + -d --debug -h --help -t --test -u --uuid -x \ + --allocatable -v --verbose --addtag --deltag \ + --version' -- $cur ) ) + else + _physicalvolumes + fi +} +complete -F _pvchange pvchange + +_pvcreate() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + --restorefile) + _filedir + return 0 + ;; + -@(M|-metadatatype)) + COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) + return 0 + ;; + --metadatacopies) + COMPREPLY=( $( compgen -W '0 1 2' -- $cur ) ) + return 0 + ;; + --@(metadatasize|setphysicalvolumesize)) + _sizes + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--restorefile -d --debug -f \ + --force -h -? --help --labelsector -M --metadatatype \ + --metadatacopies --metadatasize \ + --setphysicalvolumesize -t --test -u --uuid uuid -v \ + --verbose -y --yes --version' -- $cur ) ) + else + _physicalvolumes + fi +} +complete -F _pvcreate pvcreate + +_pvmove() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(n|-name)) + _logicalvolumes + return 0 + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--abort -A --autobackup \ + -b --background -d --debug -f --force -h -? \ + --help -i --interval -t --test -v --verbose \ + --version -n --name' -- $cur ) ) + else + _physicalvolumes + fi +} +complete -F _pvmove pvmove + +_pvremove() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -f --force -h -? \ + --help -y --yes -t --test -v --verbose \ + --version' -- $cur ) ) + else + _physicalvolumes + fi +} +complete -F _pvremove pvremove + +_vgscan() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -h --help \ + --ignorelockingfailure --mknodes -P \ + --partial -v --verbose --version' -- $cur ) ) + fi +} +complete -F _vgscan vgscan + +_vgs() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(o|O|-options|-sort)) + COMPREPLY=( $( compgen -W 'vg_fmt vg_uuid vg_name \ + vg_attr vg_size vg_free vg_sysid \ + vg_extent_size vg_extent_count vg_free_count \ + max_lv max_pv pv_count lv_count snap_count \ + vg_seqno' -- $cur ) ) + return 0 + ;; + --units) + _units + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--aligned -d --debug \ + -h --help --ignorelockingfailure --noheadings \ + --nosuffix -o --options -O --sort -P --partial \ + --separator --unbuffered --units \ + -v --verbose --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgs vgs + +_vgdisplay() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + --units) + _units + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \ + -P --partial -A --activevolumegroups -v --verbose \ + -d --debug -h --help --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgdisplay vgdisplay + +_vgchange() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(a|A|x|-available|-autobackup|-resizeable)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup --alloc -P \ + --partial -d --debug -h --help --ignorelockingfailure \ + -t --test -u --uuid -v --verbose --version -a \ + --available -x --resizeable -l --logicalvolume \ + --addtag --deltag' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgchange vgchange + +_vgcreate() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(M|-metadatatype)) + COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) + return 0 + ;; + -@(s|-physicalextentsize)) + _sizes + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup --addtag \ + --alloc -d --debug -h --help -l --maxlogicalvolumes \ + -M --metadatatype -p --maxphysicalvolumes -s \ + --physicalextentsize -t --test -v --verbose \ + --version' -- $cur ) ) + else + _args + if [ $args -eq 0 ]; then + _volumegroups + else + _physicalvolumes + fi + fi +} +complete -F _vgcreate vgcreate + +_vgremove() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -h --help -t --test \ + -v --verbose --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgremove vgremove + +_vgrename() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \ + -? --help -t --test -v --verbose --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgrename vgrename + +_vgreduce() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-a --all -A --autobackup -d \ + --debug -h --help --removemissing -t --test -v \ + --verbose --version' -- $cur ) ) + + else + _args + if [ $args -eq 0 ]; then + _volumegroups + else + _physicalvolumes + fi + fi +} +complete -F _vgreduce vgreduce + +_vgextend() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(L|-size)) + _sizes + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \ + -? --help -t --test -v --verbose --version' -- $cur ) ) + else + _args + if [ $args -eq 0 ]; then + _volumegroups + else + _physicalvolumes + fi + fi +} +complete -F _vgextend vgextend + +_vgport() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-a --all -d --debug -h \ + -? --help -v --verbose --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgport vgimport vgexport + +_vgck() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -h \ + -? --help -v --verbose --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgck vgck + +_vgconvert() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(M|-metadatatype)) + COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) + return 0 + ;; + --metadatacopies) + COMPREPLY=( $( compgen -W '0 1 2' -- $cur ) ) + return 0 + ;; + --metadatasize) + _sizes + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -h --help --labelsector \ + -M --metadatatype --metadatacopies --metadatasize \ + -t --test -v --verbose --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgconvert vgconvert + +_vgcfgbackup() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(f|-file)) + _filedir + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -f --file -h --help \ + --ignorelockingfailure -P --partial -v --verbose \ + --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgcfgbackup vgcfgbackup + +_vgcfgrestore() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(f|-file)) + _filedir + return 0 + ;; + -@(M|-metadatatype)) + COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) + return 0 + ;; + -@(n|-name)) + _volumegroups + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -f --file -l --list \ + -h --help -M --Metadatatype -n --name -t --test \ + -v --verbose --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgcfgrestore vgcfgrestore + +_vgmerge() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \ + -h --help -l --list -t --test -v --verbose \ + --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgmerge vgmerge + +_vgsplit() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(M|-metadatatype)) + COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \ + -h --help -l --list -M --metadatatype -t --test \ + -v --verbose --version' -- $cur ) ) + else + _args + if [ $args -eq 0 -o $args -eq 1 ]; then + _volumegroups + else + _physicalvolumes + fi + fi +} +complete -F _vgsplit vgsplit + +_vgmknodes() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-d --debug -h --help -v --verbose \ + --version' -- $cur ) ) + else + _volumegroups + fi +} +complete -F _vgmknodes vgmknodes + +_lvscan() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-b --blockdevice -d --debug \ + -h -? --help --ignorelockingfailure -P \ + --partial -v --verbose --version' -- $cur ) ) + fi +} +complete -F _lvscan lvscan + +_lvs() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(o|O|-options|-sort)) + COMPREPLY=( $( compgen -W 'lv_uuid lv_name \ + lv_attr lv_minor lv_size seg_count \ + origin snap_percent segtype stripes \ + stripesize chunksize seg_start \ + seg_size' -- $cur ) ) + return 0 + ;; + --units) + _units + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--aligned -d --debug \ + -h --help --ignorelockingfailure --noheadings \ + --nosuffix -o --options -O --sort -P --partial \ + --segments --separator --unbuffered --units \ + -v --verbose --version' -- $cur ) ) + else + _logicalvolumes + fi +} +complete -F _lvs lvs + +_lvdisplay() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + --units) + _units + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \ + -P --partial -m --maps -v --verbose -d --debug -h \ + --help --version' -- $cur ) ) + else + _logicalvolumes + fi +} +complete -F _lvdisplay lvdisplay + +_lvchange() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(a|A|C|M|-available|-autobackup|-continguous|-persistent)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(p|-permission)) + COMPREPLY=( $( compgen -W 'r rw' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup -a --available \ + --addtag --alloc -C --contiguous -d --debug --deltag \ + -f --force -h --help --ignorelockingfailure -M \ + --persistent --major major --minor minor -P --partial \ + -p --permission -r --readahead --refresh -t --test \ + -v --verbose --version' -- $cur ) ) + else + _logicalvolumes + fi +} +complete -F _lvchange lvchange + +_lvcreate() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|C|M|Z|-autobackup|-continguous|-persistent|-zero)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(L|-size)) + _sizes + return 0 + ;; + -@(p|-permission)) + COMPREPLY=( $( compgen -W 'r rw' -- $cur ) ) + return 0 + ;; + -@(n|-name)) + _logicalvolumes + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup --addtag --alloc \ + -C --contiguous -d --debug -h -? --help -i --stripes \ + -I --stripesize -l --extents -L --size -M --persistent \ + --major --minor -n --name -p --permission -r \ + --readahead -t --test --type -v --verbose -Z --zero \ + --version' -- $cur ) ) + else + _args + if [ $args -eq 0 ]; then + _volumegroups + else + _physicalvolumes + fi + fi +} +complete -F _lvcreate lvcreate + +_lvremove() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -f \ + --force -h -? --help -t --test -v --verbose \ + --version' -- $cur ) ) + else + _logicalvolumes + fi +} +complete -F _lvremove lvremove + +_lvrename() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \ + -? --help -t --test -v --verbose --version' -- $cur ) ) + else + _logicalvolumes + fi +} +complete -F _lvrename lvrename + +_lvreduce() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(L|-size)) + _sizes + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup -d \ + --debug -f --force -h --help -l --extents \ + -L --size -n --nofsck -r --resizefs -t --test \ + -v --verbose --version' -- $cur ) ) + else + _logicalvolumes + fi +} +complete -F _lvreduce lvreduce + +_lvresize() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(L|-size)) + _sizes + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \ + --debug -h --help -i --stripes -I --stripesize \ + -l --extents -L --size -n --nofsck -r --resizefs \ + -t --test --type -v --verbose --version' -- $cur ) ) + else + _args + if [ $args -eq 0 ]; then + _logicalvolumes + else + _physicalvolumes + fi + fi +} +complete -F _lvresize lvresize + +_lvextend() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -@(A|-autobackup)) + COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) + return 0 + ;; + -@(L|-size)) + _sizes + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \ + --debug -h --help -i --stripes -I --stripesize \ + -l --extents -L --size -n --nofsck -r --resizefs \ + -t --test --type -v --verbose --version' -- $cur ) ) + else + _args + if [ $args -eq 0 ]; then + _logicalvolumes + else + _physicalvolumes + fi + fi +} +complete -F _lvextend lvextend + +_lvm() +{ + local prev + + COMPREPLY=() + cur=`_get_cword` + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W 'dumpconfig help lvchange \ + lvcreate lvdisplay lvextend lvmchange \ + lvmdiskscan lvmsadc lvmsar lvreduce \ + lvremove lvrename lvresize lvs lvscan \ + pvchange pvcreate pvdata pvdisplay pvmove \ + pvremove pvresize pvs pvscan vgcfgbackup \ + vgcfgrestore vgchange vgck vgconvert \ + vgcreate vgdisplay vgexport vgextend \ + vgimport vgmerge vgmknodes vgreduce \ + vgremove vgrename vgs vgscan vgsplit \ + version' -- $cur ) ) + else + case ${COMP_WORDS[1]} in + pvchange) + _pvchange + ;; + pvcreate) + _pvcreate + ;; + pvdisplay) + _pvdisplay + ;; + pvmove) + _pvmove + ;; + pvremove) + _pvremove + ;; + pvresize) + _pvresize + ;; + pvs) + _pvs + ;; + pvscan) + _pvscan + ;; + vgcfgbackup) + _vgcfgbackup + ;; + vgcfgrestore) + _vgcfgrestore + ;; + vgchange) + _vgchange + ;; + vgck) + _vgck + ;; + vgconvert) + _vgconvert + ;; + vgcreate) + _vgcreate + ;; + vgdisplay) + _vgdisplay + ;; + vgexport) + _vgexport + ;; + vgextend) + _vgextend + ;; + vgimport) + _vgimport + ;; + vgmerge) + _vgmerge + ;; + vgmknodes) + _vgmknodes + ;; + vgreduce) + _vgreduce + ;; + vgremove) + _vgremove + ;; + vgrename) + _vgrename + ;; + vgs) + _vgs + ;; + vgscan) + _vgscan + ;; + vgsplit) + _vgsplit + ;; + lvchange) + _lvchange + ;; + lvcreate) + _lvcreate + ;; + lvdisplay) + _lvdisplay + ;; + lvextend) + _lvextend + ;; + lvreduce) + _lvreduce + ;; + lvremove) + _lvremove + ;; + lvrename) + _lvrename + ;; + lvresize) + _lvresize + ;; + lvs) + _lvs + ;; + lvscan) + _lvscan + ;; + esac + fi +} +complete -F _lvm lvm +} + +# mkinitrd(8) completion +# +have mkinitrd && +_mkinitrd() +{ + local cur args + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + # --name value style option + case "$prev" in + --preload) + _modules + return 0 + ;; + esac + + # --name=value style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case "$prev" in + --@(with|builtin)) + _modules + return 0 + ;; + --@(fstab|dsdt)) + _filedir + return 0 + ;; + --tmpdir) + _filedir -d + return 0 + ;; + esac + fi + + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--version -v -f --preload \ + --with= --omit-scsi-modules --omit-raid-modules \ + --images-version --fstab= --nocompress --builtin= \ + --nopivot --noudev --allow-missing --tmpdir= \ + --initrdfs= --dsdt= --lvm-version= --froce-usb' \ + -- $cur ) ) + else + _count_args + + case $args in + 1) + _filedir + ;; + 2) + COMPREPLY=( $( command ls /lib/modules | grep "^$cur" ) ) + ;; + esac + fi + +} && +complete -F _mkinitrd mkinitrd + +# pkgconfig(1) completion +# +have pkg-config && +_pkg_config() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + # return list of available options + COMPREPLY=( $( compgen -W '-version --modversion \ + --atleast-pkgconfig-version= --libs --libs-only-l \ + --libs-only-other --libs-only-L --cflags \ + --cflags-only-I --cflags-only-other --variable= \ + --define-variable= --exists --uninstalled \ + --atleast-version= --exact-version= --max-version= \ + --list-all --debug --print-errors --silence-errors \ + --errors-to-stdout -? --help --usage' -- $cur)) + else + COMPREPLY=( $( pkg-config --list-all 2>/dev/null | \ + awk '{print $1}' | grep "^$cur" ) ) + fi +} && +complete -F _pkg_config pkg-config + + +# cpio(1) completion +# +have cpio && { +_cpio_format() +{ + COMPREPLY=( $( compgen -W 'bin odc newc crc tar ustar hpbin hpodc' -- $cur ) ) +} + +_cpio() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + # --name value style option + case $prev in + -H) + _cpio_format + return 0 + ;; + -@(E|F|I)) + _filedir + return 0 + ;; + -R) + _usergroup + return 0 + ;; + esac + + # --name=value style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case $prev in + --format) + _cpio_format + return 0 + ;; + --@(file|pattern-file)) + _filedir + return 0 + ;; + --owner) + _usergroup + return 0 + ;; + --rsh-command) + COMPREPLY=( $( compgen -c -- $cur ) ) + return 0 + ;; + esac + fi + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W '-o --create -i --extract -p --pass-through' -- $cur) ) + else + case ${COMP_WORDS[1]} in + -@(o|-create)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-0 -a -c -v -A -B\ + -L -V -C -H -M -O -F --file= --format=\ + --message= --null --reset-access-time\ + --verbose --dot --append --block-size=\ + --dereference --io-size= --quiet\ + --force-local --rsh-command= --help\ + --version' -- $cur ) ) + fi + ;; + -@(i|-extract)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-b -c -d -f -m -n -r\ + -t -s -u -v -B -S -V -C -E -H -M -R -I\ + -F --file= --make-directories\ + --nonmatching\ + --preserve-modification-time\ + --numeric-uid-gid --rename -t --list\ + --swap-bytes --swap --dot\ + --unconditional --verbose --block-size=\ + --swap-halfwords --io-size=\ + --pattern-file= --format= --owner=\ + --no-preserve-owner --message=\ + --force-local --no-absolute-filenames\ + --sparse --only-verify-crc --quiet\ + --rsh-command= --help\ + --version' -- $cur ) ) + fi + ;; + -@(p|-pass-through)) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-0 -a -d -l -m -u -v\ + -L -V -R --null --reset-access-time\ + --make-directories --link --quiet\ + --preserve-modification-time\ + --unconditional --verbose --dot\ + --dereference --owner=\ + --no-preserve-owner --sparse --help\ + --version' -- $cur ) ) + else + _filedir -d + fi + ;; + esac + fi +} +complete -F _cpio cpio +} + +# id(1) completion +# +have id && +_id() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-a -g --group -G --groups -n --name\ + -r --real -u --user --help --version' -- $cur ) ) + else + COMPREPLY=( $( compgen -u $cur ) ) + fi +} && +complete -F _id id + +# getent(1) completion +# +have getent && +_getent() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + passwd) + COMPREPLY=( $( compgen -u $cur ) ) + return 0 + ;; + group) + COMPREPLY=( $( compgen -g $cur ) ) + return 0 + ;; + services) + COMPREPLY=( $( compgen -s $cur ) ) + return 0 + ;; + hosts) + COMPREPLY=( $( compgen -A hostname $cur ) ) + return 0 + ;; + protocols) + COMPREPLY=( $( getent protocols | awk '{print $1}' | grep "^$cur" ) ) + return 0 + ;; + networks) + COMPREPLY=( $( getent networks | awk '{print $1}' | grep "^$cur" ) ) + return 0 + ;; + esac + + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W 'passwd group hosts services protocols networks' -- $cur ) ) + fi +} && +complete -F _getent getent + +# ntpdate(1) completion +# +have ntpdate && +_ntpdate() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + -k) + _filedir + return 0 + ;; + -U) + COMPREPLY=( $( compgen -u $cur ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\ + -e -k -p -o -r -t' -- $cur ) ) + else + _known_hosts + fi +} && +complete -F _ntpdate ntpdate + +# smartctl(8) completion +# +have smartctl && { +_smartctl_quietmode() +{ + COMPREPLY=( $( compgen -W 'errorsonly silent' -- $cur ) ) +} +_smartctl_device() +{ + COMPREPLY=( $( compgen -W 'ata scsi 3ware' -- $cur ) ) +} +_smartctl_tolerance() +{ + COMPREPLY=( $( compgen -W 'warn exit ignore' -- $cur ) ) +} +_smartctl_badsum() +{ + COMPREPLY=( $( compgen -W 'normal conservative permissive verypermissive' -- $cur ) ) +} +_smartctl_report() +{ + COMPREPLY=( $( compgen -W 'ioctl ataioctl scsiioctl' -- $cur ) ) +} +_smartctl_feature() +{ + COMPREPLY=( $( compgen -W 'on off' -- $cur ) ) +} +_smartctl_log() +{ + COMPREPLY=( $( compgen -W 'error selftest selective directory' -- $cur ) ) +} +_smartctl_vendorattribute() +{ + COMPREPLY=( $( compgen -W 'help 9,minutes 9,seconds 9,halfminutes \ + 9,temp 192,emergencyretractcyclect 193,loadunload \ + 194,10xCelsius 194,unknown 198,offlinescanuncsectorct \ + 200,writeerrorcount 201,detectedtacount 220,temp' -- $cur ) ) +} +_smartctl_firmwarebug() +{ + COMPREPLY=( $( compgen -W 'none samsung samsung2' -- $cur ) ) +} +_smartctl_presets() +{ + COMPREPLY=( $( compgen -W 'use ignore show showall' -- $cur ) ) +} +_smartctl_test() +{ + COMPREPLY=( $( compgen -W 'offline short long conveyance select afterselect,on afterselect,off pending' -- $cur ) ) +} + +_smartctl() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + # --name value style option + case "$prev" in + -q) + _smartctl_quietmode + ;; + -d) + _smartctl_device + return 0 + ;; + -t) + _smartctl_tolerance + return 0 + ;; + -b) + _smartctl_badsum + return 0 + ;; + -r) + _smartctl_report + return 0 + ;; + -s) + _smartctl_feature + return 0 + ;; + -o) + _smartctl_feature + return 0 + ;; + -S) + _smartctl_feature + return 0 + ;; + -l) + _smartctl_log + return 0 + ;; + -v) + _smartctl_vendorattribute + return 0 + ;; + -F) + _smartctl_firmwarebug + return 0 + ;; + -P) + _smartctl_presets + return 0 + ;; + -t) + _smartctl_test + return 0 + ;; + esac + + # --name=value style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case "$prev" in + --quietmode) + _smartctl_quietmode + return 0 + ;; + --device) + _smartctl_device + return 0 + ;; + --tolerance) + _smartctl_tolerance + return 0 + ;; + --badsum) + _smartctl_badsum + return 0 + ;; + --report) + _smartctl_report + return 0 + ;; + --smart) + _smartctl_feature + return 0 + ;; + --offlineauto) + _smartctl_feature + return 0 + ;; + --saveauto) + _smartctl_feature + return 0 + ;; + --log) + _smartctl_log + return 0 + ;; + --vendorattribute) + _smartctl_vendorattribute + return 0 + ;; + --firmwarebug) + _smartctl_firmwarebug + return 0 + ;; + --presets) + _smartctl_presets + return 0 + ;; + --test) + _smartctl_test + return 0 + ;; + esac + fi + + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-h --help --usage -V --version \ + --copyright --license-i --info -a --all -q \ + --quietmode= -d --device= -T --tolerance= -b --badsum= \ + -r --report= -s --smart= -o --offlineauto= -S \ + --saveauto= -H --health -c --capabilities -A \ + --attributes -l --log= -v --vendorattribute= -F \ + --firmwarebug= -P --presets= -t --test= -C \ + --captive -X --abort' -- $cur ) ) + else + cur=${cur:=/dev/} + _filedir + fi +} +complete -F _smartctl smartctl +} + +# vncviewer(1) completion +# +have vncviewer && +_vncviewer() +{ + local cur prev + local -a config + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + -via) + _known_hosts -a + ;; + *) + # ssh into the the server, find and ping the broadcast address, then + # sort and show the results. + COMPREPLY=( $( ssh -o 'Batchmode yes' $prev \ + "ping -bnc 4 255.255.255.255" 2>/dev/null | \ + awk -F ' ' '{print $4}' | \ + sort -n | uniq | egrep '[0-9]+\.[0-9]+\.' 2>/dev/null ) ) + esac + + return 0 +} && +complete -F _vncviewer vncviewer + +# sysctl(8) completion +# +have sysctl && +_sysctl() +{ + local cur + + COMPREPLY=() + cur=`_get_cword` + + COMPREPLY=( $( compgen -W "$(sysctl -N -a 2>/dev/null)" -- $cur ) ) + + return 0 +} && +complete -F _sysctl sysctl + +# update-rc.d(8) completion +# +# Copyright (C) 2004 Servilio Afre Puentes +# +have update-rc.d && +_update_rc_d() +{ + local cur prev sysvdir services options valid_options + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \ + || sysvdir=/etc/init.d + + services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpm*)) ) + services=( ${services[@]#$sysvdir/} ) + options=( -f -n ) + + if [[ $COMP_CWORD -eq 1 || "$prev" == -* ]]; then + valid_options=( $( \ + echo "${COMP_WORDS[@]} ${options[@]}" \ + | tr " " "\n" \ + | sed -ne "/$( echo "${options[@]}" | sed "s/ /\\|/g" )/p" \ + | sort | uniq -u \ + ) ) + COMPREPLY=( $( compgen -W '${options[@]} ${services[@]}' \ + -X '$( echo ${COMP_WORDS[@]} | tr " " "|" )' -- $cur ) ) + elif [[ "$prev" == ?($( echo ${services[@]} | tr " " "|" )) ]]; then + COMPREPLY=( $( compgen -W 'remove defaults start stop' -- $cur ) ) + elif [[ "$prev" == defaults && "$cur" == [0-9] ]]; then + COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 ) + elif [[ "$prev" == defaults && "$cur" == [sk]?([0-9]) ]]; then + COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 ) + elif [[ "$prev" == defaults && -z "$cur" ]]; then + COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 s k ) + elif [[ "$prev" == ?(start|stop) ]]; then + if [[ "$cur" == [0-9] || -z "$cur" ]]; then + COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 ) + elif [[ "$cur" == [0-9][0-9] ]]; then + COMPREPLY=( $cur ) + else + COMPREPLY=() + fi + elif [[ "$prev" == ?([0-9][0-9]|[0-6S]) ]]; then + if [[ -z "$cur" ]]; then + if [[ $prev == [0-9][0-9] ]]; then + COMPREPLY=( 0 1 2 3 4 5 6 S ) + else + COMPREPLY=( 0 1 2 3 4 5 6 S . ) + fi + elif [[ "$cur" == [0-6S.] ]]; then + COMPREPLY=( $cur ) + else + COMPREPLY=() + fi + elif [[ "$prev" == "." ]]; then + COMPREPLY=( $(compgen -W "start stop" -- $cur) ) + else + COMPREPLY=() + fi + + return 0 +} && +complete -F _update_rc_d update-rc.d + +# invoke-rc.d(8) completion +# +# Copyright (C) 2004 Servilio Afre Puentes +# +have invoke-rc.d && +_invoke_rc_d() +{ + local cur prev sysvdir services options valid_options + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \ + || sysvdir=/etc/init.d + + services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpm*)) ) + services=( ${services[@]#$sysvdir/} ) + options=( --help --quiet --force --try-anyway --disclose-deny --query --no-fallback ) + + if [[ ($COMP_CWORD -eq 1) || ("$prev" == --* ) ]]; then + valid_options=( $( \ + echo ${COMP_WORDS[@]} ${options[@]} \ + | tr " " "\n" \ + | sed -ne "/$( echo ${options[@]} | sed "s/ /\\\\|/g" )/p" \ + | sort | uniq -u \ + ) ) + COMPREPLY=( $( compgen -W '${valid_options[@]} ${services[@]}' -- \ + $cur ) ) + elif [ -x $sysvdir/$prev ]; then + COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \ + s/^.*Usage:[ ]*[^ ]*[ ]*{*\([^}\"]*\).*$/\1/p" \ + $sysvdir/$prev`' -- \ + $cur ) ) + else + COMPREPLY=() + fi + + return 0 +} && +complete -F _invoke_rc_d invoke-rc.d + +# minicom(1) completion +# +have minicom && +_minicom() +{ + local cur prev + + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + case $prev in + -@(a|c)) + COMPREPLY=( $( compgen -W 'on off' -- $cur ) ) + return 0 + ;; + -@(S|C)) + _filedir + return 0 + ;; + -P) + COMPREPLY=( $( command ls /dev/tty* ) ) + COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' -- $cur ) ) + return 0 + ;; + esac + + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '-s -o -m -M -z -l -L -w -a -t \ + -c -S -d -p -C -T -8' -- $cur ) ) + else + COMPREPLY=( $( command ls /etc/minicom/minirc.* 2>/dev/null | sed -e 's|/etc/minicom/minirc.||' | grep "^$cur" ) ) + fi +} && +complete -F _minicom minicom + +# svn completion +# +have svn && +{ +_svn() +{ + local cur prev commands options command + + COMPREPLY=() + cur=`_get_cword` + + commands='add blame praise annotate ann cat checkout co cleanup commit \ + ci copy cp delete del remove rm diff di export help ? h import \ + info list ls lock log merge mkdir move mv rename ren \ + propdel pdel pd propedit pedit pe propget pget pg \ + proplist plist pl propset pset ps resolved revert \ + status stat st switch sw unlock update up' + + if [[ $COMP_CWORD -eq 1 ]] ; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--version' -- $cur ) ) + else + COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) + fi + else + + prev=${COMP_WORDS[COMP_CWORD-1]} + case $prev in + --config-dir) + _filedir -d + return 0; + ;; + -@(F|-file|-targets)) + _filedir + return 0; + ;; + --encoding) + COMPREPLY=( $( compgen -W \ + '$( iconv --list | sed -e "s@//@@;" )' \ + -- "$cur" ) ) + return 0; + ;; + --@(editor|diff|diff3)-cmd) + COMP_WORDS=(COMP_WORDS[0] $cur) + COMP_CWORD=1 + _command + return 0; + ;; + esac + + command=${COMP_WORDS[1]} + + if [[ "$cur" == -* ]]; then + # possible options for the command + case $command in + add) + options='--auto-props --no-auto-props \ + --force --targets --no-ignore \ + --non-recursive -N -q --quiet' + ;; + @(blame|annotate|ann|praise)) + options='-r --revisions --username \ + --password --no-auth-cache \ + --non-interactive -v \ + --verbose --incremental --xml' + ;; + cat) + options='-r --revision --username \ + --password --no-auth-cache \ + --non-interactive' + ;; + @(checkout|co)) + options='-r --revision -q --quiet -N \ + --non-recursive --username \ + --password --no-auth-cache \ + --non-interactive \ + --ignore-externals' + ;; + cleanup) + options='--diff3-cmd' + ;; + @(commit|ci)) + options='-m --message -F --file \ + --encoding --force-log -q \ + --quiet --non-recursive -N \ + --targets --editor-cmd \ + --username --password \ + --no-auth-cache \ + --non-interactive --no-unlock' + ;; + @(copy|cp)) + options='-m --message -F --file \ + --encoding --force-log -r \ + --revision -q --quiet \ + --editor-cmd -username \ + --password --no-auth-cache \ + --non-interactive' + ;; + @(delete|del|remove|rm)) + options='--force -m --message -F \ + --file --encoding --force-log \ + -q --quiet --targets \ + --editor-cmd -username \ + --password --no-auth-cache \ + --non-interactive' + ;; + @(diff|di)) + options='-r --revision -x --extensions \ + --diff-cmd --no-diff-deleted \ + -N --non-recursive --username \ + --password --no-auth-cache \ + --non-interactive --force \ + --old --new --notice-ancestry' + ;; + export) + options='-r --revision -q --quiet \ + --username --password \ + --no-auth-cache \ + --non-interactive -N \ + --non-recursive --force \ + --native-eol --ignore-externals' + ;; + import) + options='--auto-props --no-auto-props \ + -m --message -F --file \ + --encoding --force-log -q \ + --quiet --non-recursive \ + --no-ignore --editor-cmd \ + --username --password \ + --no-auth-cache \ + --non-interactive' + ;; + info) + options='--username --password \ + --no-auth-cache \ + --non-interactive -r \ + --revision --xml --targets \ + -R --recursive --incremental' + ;; + @(list|ls)) + options='-r --revision -v --verbose -R \ + --recursive --username \ + --password --no-auth-cache \ + --non-interactive \ + --incremental --xml' + ;; + lock) + options='-m --message -F --file \ + --encoding --force-log \ + --targets --force --username \ + --password --no-auth-cache \ + --non-interactive' + ;; + log) + options='-r --revision -v --verbose \ + --targets --username \ + --password --no-auth-cache \ + --non-interactive \ + --stop-on-copy --incremental \ + --xml -q --quiet --limit' + ;; + merge) + options='-r --revision -N \ + --non-recursive -q --quiet \ + --force --dry-run --diff3-cmd \ + --username --password \ + --no-auth-cache \ + --non-interactive \ + --ignore-ancestry' + ;; + mkdir) + options='-m --message -F --file \ + --encoding --force-log -q \ + --quiet --editor-cmd \ + --username --password \ + --no-auth-cache \ + --non-interactive' + ;; + @(move|mv|rename|ren)) + options='-m --message -F --file \ + --encoding --force-log -r \ + --revision -q --quiet \ + --force --editor-cmd \ + --username --password \ + --no-auth-cache \ + --non-interactive' + ;; + @(propdel|pdel|pd)) + options='-q --quiet -R --recursive -r \ + --revision --revprop \ + --username --password \ + --no-auth-cache \ + --non-interactive' + ;; + @(propedit|pedit|pe)) + options='-r --revision --revprop \ + --encoding --editor-cmd \ + --username --password \ + --no-auth-cache \ + --non-interactive --force' + ;; + @(propget|pget|pg)) + options='-R --recursive -r --revision \ + --revprop --strict --username \ + --password --no-auth-cache \ + --non-interactive' + ;; + @(proplist|plist|pl)) + options='-v --verbose -R --recursive \ + -r --revision --revprop -q \ + --quiet --username --password \ + --no-auth-cache \ + --non-interactive' + ;; + @(propset|pset|ps)) + options='-F --file -q --quiet \ + --targets -R --recursive \ + --revprop --encoding \ + --username --password \ + --no-auth-cache \ + --non-interactive -r \ + --revision --force' + ;; + resolved) + options='--targets -R --recursive -q \ + --quiet' + ;; + revert) + options='--targets -R --recursive -q \ + --quiet' + ;; + @(status|stat|st)) + options='-u --show-updates -v \ + --verbose -N --non-recursive \ + -q --quiet --username \ + --password --no-auth-cache \ + --non-interactive --no-ignore \ + --ignore-externals \ + --incremental --xml' + ;; + @(switch|sw)) + options='--relocate -r --revision -N \ + --non-recursive -q --quiet \ + --username --password \ + --no-auth-cache \ + --non-interactive --diff3-cmd' + ;; + unlock) + options='--targets --force --username \ + --password --no-auth-cache \ + --non-interactive' + ;; + @(update|up)) + options='-r --revision -N \ + --non-recursive -q --quiet \ + --username --password \ + --no-auth-cache \ + --non-interactive \ + --diff3-cmd --ignore-externals' + ;; + esac + options="$options --help -h --config-dir" + + COMPREPLY=( $( compgen -W "$options" -- $cur ) ) + else + if [[ "$command" == @(help|h|\?) ]]; then + COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) + else + _filedir + fi + fi + fi + + return 0 +} +complete -F _svn $default svn + +_svnadmin() +{ + local cur prev commands options mode + + COMPREPLY=() + cur=`_get_cword` + + commands='create deltify dump help ? hotcopy list-dblogs \ + list-unused-dblogs load lslocks lstxns recover rmlocks \ + rmtxns setlog verify' + + if [[ $COMP_CWORD -eq 1 ]] ; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--version' -- $cur ) ) + else + COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) + fi + else + prev=${COMP_WORDS[COMP_CWORD-1]} + case $prev in + --config-dir) + _filedir -d + return 0; + ;; + --fs-type) + COMPREPLY=( $( compgen -W 'fsfs bdb' -- $cur ) ) + return 0; + ;; + esac + + command=${COMP_WORDS[1]} + + if [[ "$cur" == -* ]]; then + # possible options for the command + case $command in + create) + options='--bdb-txn-nosync \ + --bdb-log-keep --config-dir \ + --fs-type' + ;; + deltify) + options='-r --revision -q --quiet' + ;; + dump) + options='-r --revision --incremental \ + -q --quiet --deltas' + ;; + hotcopy) + options='--clean-logs' + ;; + load) + options='--ignore-uuid --force-uuid \ + --parent-dir -q --quiet \ + --use-pre-commit-hook \ + --use-post-commit-hook' + ;; + rmtxns) + options='-q --quiet' + ;; + setlog) + options='-r --revision --bypass-hooks' + ;; + esac + + options="$options --help -h" + COMPREPLY=( $( compgen -W "$options" -- $cur ) ) + else + if [[ "$command" == @(help|h|\?) ]]; then + COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) + else + _filedir + fi + fi + fi + + return 0 +} +complete -F _svnadmin $default svnadmin + +_svnlook() +{ + local cur prev commands options mode + + COMPREPLY=() + cur=`_get_cword` + + commands='author cat changed date diff dirs-changed help ? h history \ + info lock log propget pget pg proplist plist pl tree uuid \ + youngest' + + if [[ $COMP_CWORD -eq 1 ]] ; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--version' -- $cur ) ) + else + COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) + fi + else + command=${COMP_WORDS[1]} + + if [[ "$cur" == -* ]]; then + # possible options for the command + case $command in + @(author|cat|date|dirs-changed|info|log)) + options='-r --revision -t \ + --transaction' + ;; + changed) + options='-r --revision -t \ + --transaction --copy-info' + ;; + diff) + options='-r --revision -t \ + --transaction \ + --no-diff-deleted \ + --no-diff-added \ + --diff-copy-from' + ;; + history) + options='-r --revision --show-ids' + ;; + prop@(get|list)) + options='-r --revision -t \ + --transaction --revprop' + ;; + tree) + options='-r --revision -t \ + --transaction --show-ids \ + --full-paths' + ;; + esac + + options="$options --help -h" + COMPREPLY=( $( compgen -W "$options" -- $cur ) ) + else + if [[ "$command" == @(help|h|\?) ]]; then + COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) + else + _filedir + fi + fi + fi + + return 0 +} +complete -F _svnlook $default svnlook +} + +_filedir_xspec() +{ + local IFS cur xspec + + IFS=$'\t\n' + COMPREPLY=() + cur=`_get_cword` + + _expand || return 0 + + # get first exclusion compspec that matches this command + xspec=$( sed -ne $'/^complete .*[ \t]'${1##*/}$'\([ \t]\|$\)/{p;q;}' \ + $BASH_COMPLETION ) + # prune to leave nothing but the -X spec + xspec=${xspec#*-X } + xspec=${xspec%% *} + + local toks=( ) tmp + + while read -r tmp; do + [[ -n $tmp ]] && toks[${#toks[@]}]=$tmp + done < <( compgen -d -- "$(quote_readline "$cur")" ) + + while read -r tmp; do + [[ -n $tmp ]] && toks[${#toks[@]}]=$tmp + done < <( eval compgen -f -X $xspec -- "\$(quote_readline "\$cur")" ) + + COMPREPLY=( "${toks[@]}" ) +} +list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \ + $BASH_COMPLETION | \ + # read exclusion compspecs + ( + while read line + do + # ignore compspecs that are commented out + if [ "${line#\#}" != "$line" ]; then continue; fi + line=${line%# START exclude*} + line=${line%# FINISH exclude*} + line=${line##*\'} + list=( "${list[@]}" $line ) + done + echo "${list[@]}" + ) + ) ) +# remove previous compspecs +if [ ${#list[@]} -gt 0 ]; then + eval complete -r ${list[@]} + # install new compspecs + eval complete -F _filedir_xspec $filenames "${list[@]}" +fi +unset list + +# source completion directory definitions +if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \ + -x $BASH_COMPLETION_DIR ]; then + for i in $BASH_COMPLETION_DIR/*; do + [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|.rpm*) ]] && + [ \( -f $i -o -h $i \) -a -r $i ] && . $i + done +fi +unset i + +# source user completion file +[ $BASH_COMPLETION != ~/.bash_completion -a -r ~/.bash_completion ] \ + && . ~/.bash_completion +unset -f have +unset UNAME RELEASE default dirnames filenames have nospace bashdefault \ + plusdirs + +set $BASH_COMPLETION_ORIGINAL_V_VALUE +unset BASH_COMPLETION_ORIGINAL_V_VALUE + +### Local Variables: +### mode: shell-script +### End: diff --git a/bash-5.1/examples/complete/bashcc-1.0.1.tar.gz b/bash-5.1/examples/complete/bashcc-1.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d68043581b0d34255b1e104c2b04be90f4fdfcaa Binary files /dev/null and b/bash-5.1/examples/complete/bashcc-1.0.1.tar.gz differ diff --git a/bash-5.1/examples/complete/cdfunc b/bash-5.1/examples/complete/cdfunc new file mode 100644 index 0000000000000000000000000000000000000000..439edaf857ebd976e6f2d8caa093a15195018e70 --- /dev/null +++ b/bash-5.1/examples/complete/cdfunc @@ -0,0 +1,76 @@ +# cdfunc - example completion function for cd +# +# based on the cd completion function from the bash_completion package +# +# Chet Ramey +# +# Copyright 2011 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +_comp_cd() +{ + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, with side effect of expanding tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=${CDPATH/#:/.:} + _cdpath=${_cdpath//::/:.:} + _cdpath=${_cdpath/%:/:.} + for i in ${_cdpath//:/$'\n'}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="${#COMPREPLY[@]}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=${j#$i/} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + # append slash to passed directory name that is the only completion. + # readline will not do this if we complete from CDPATH + if [[ ${#COMPREPLY[@]} -eq 1 ]]; then + i=${COMPREPLY[0]} # shorthand + if [[ "$cur" == "$i" ]] && [[ "$i" != "*/" ]]; then + COMPREPLY[0]+=/ + fi + fi + return 0 +} + +complete -o filenames -o nospace -o bashdefault -F _comp_cd cd diff --git a/bash-5.1/examples/complete/complete-examples b/bash-5.1/examples/complete/complete-examples new file mode 100644 index 0000000000000000000000000000000000000000..8a0746d535a7daa9432514bc64db160f98e60a78 --- /dev/null +++ b/bash-5.1/examples/complete/complete-examples @@ -0,0 +1,512 @@ +# +# Completion examples +# +# Chet Ramey +# +# Copyright 2002 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# This encapsulates the default bash completion code +# call with the word to be completed as $1 +# +# Since programmable completion does not use the bash default completions +# or the readline default of filename completion when the compspec does +# not generate any matches, this may be used as a `last resort' in a +# completion function to mimic the default bash completion behavior. +# +_bash_def_completion () +{ + local h t + COMPREPLY=() + + # command substitution + if [[ "$1" == \$\(* ]]; then + t=${1#??} + COMPREPLY=( $(compgen -c -P '$(' $t) ) + fi + # variables with a leading `${' + if [ ${#COMPREPLY[@]} -eq 0 ] && [[ "$1" == \$\{* ]]; then + t=${1#??} + COMPREPLY=( $(compgen -v -P '${' -S '}' $t) ) + fi + # variables with a leading `$' + if [ ${#COMPREPLY[@]} -eq 0 ] && [[ "$1" == \$* ]]; then + t=${1#?} + COMPREPLY=( $(compgen -v -P '$' $t ) ) + fi + # username expansion + if [ ${#COMPREPLY[@]} -eq 0 ] && [[ "$1" == ~* ]] && [[ "$1" != */* ]]; then + t=${1#?} + COMPREPLY=( $( compgen -u -P '~' $t ) ) + fi + # hostname + if [ ${#COMPREPLY[@]} -eq 0 ] && [[ "$1" == *@* ]]; then + h=${1%%@*} + t=${1#*@} + COMPREPLY=( $( compgen -A hostname -P "${h}@" $t ) ) + fi + # glob pattern + if [ ${#COMPREPLY[@]} -eq 0 ]; then + # sh-style glob pattern + if [[ $1 == *[*?[]* ]]; then + COMPREPLY=( $( compgen -G "$1" ) ) + # ksh-style extended glob pattern - must be complete + elif shopt -q extglob && [[ $1 == *[?*+\!@]\(*\)* ]]; then + COMPREPLY=( $( compgen -G "$1" ) ) + fi + fi + + # final default is filename completion + if [ ${#COMPREPLY[@]} -eq 0 ]; then + COMPREPLY=( $(compgen -f "$1" ) ) + fi +} + +# +# Return 1 if $1 appears to contain a redirection operator. Handles backslash +# quoting (barely). +# +_redir_op() +{ + case "$1" in + *\\'[\<\>]'*) return 1;; + *[\<\>]*) return 0;; + *) return 1;; + esac +} + + +# _redir_test tests the current word ($1) and the previous word ($2) for +# redirection operators and does filename completion on the current word +# if either one contains a redirection operator +_redir_test() +{ + if _redir_op "$1" ; then + COMPREPLY=( $( compgen -f "$1" ) ) + return 0 + elif _redir_op "$2" ; then + COMPREPLY=( $( compgen -f "$1" ) ) + return 0 + fi + return 1 +} + +# optional, but without this you can't use extended glob patterns +shopt -s extglob + +# +# Easy ones for the shell builtins +# +# nothing for: alias, break, continue, dirs, echo, eval, exit, getopts, +# let, logout, popd, printf, pwd, return, shift, suspend, test, times, +# umask +# + +complete -f -- . source +complete -A enabled builtin +complete -d cd + +# this isn't exactly right yet -- needs to skip shell functions and +# do $PATH lookup (or do compgen -c and filter out matches that also +# appear in compgen -A function) +complete -c command + +# could add -S '=', but that currently screws up because readline appends +# a space unconditionally + +complete -v export local readonly +complete -A helptopic help # currently same as builtins + +complete -d pushd + +complete -A shopt shopt + +complete -c type + +complete -a unalias +complete -v unset + +# +# Job control builtins: fg, bg, disown, kill, wait +# kill not done yet +# + +complete -A stopped -P '%' bg +complete -j -P '%' fg jobs disown + +# this is not quite right at this point + +_wait_func () +{ + local cur + cur=${COMP_WORDS[COMP_CWORD]} + + case "$cur" in + %*) COMPREPLY=( $(compgen -A running -P '%' ${cur#?} ) ) ;; + [0-9]*) COMPREPLY=( $(jobs -p | grep ^${cur}) ) ;; + *) COMPREPLY=( $(compgen -A running -P '%') $(jobs -p) ) + ;; + esac +} +complete -F _wait_func wait + +# +# more complicated things, several as yet unimplemented +# + +#complete -F _bind_func bind + +_declare_func() +{ + local cur prev nflag opts + + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + COMPREPLY=() + if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then + COMPREPLY=(-a -f -F -i -p -r -t -x) + return 0; + fi + if [[ $cur == '+' ]]; then + COMPREPLY=(+i +t +x) + return 0; + fi + if [[ $prev == '-p' ]]; then + COMPREPLY=( $(compgen -v $cur) ) + return 0; + fi + return 1 +} +complete -F _declare_func declare typeset + +_enable_func() +{ + local cur prev nflag opts + + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + COMPREPLY=() + if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then + COMPREPLY=(-a -d -f -n -p -s) + return 0; + fi + if [[ $prev == '-f' ]]; then + COMPREPLY=( $( compgen -f $cur ) ) + return 0; + fi + for opts in "${COMP_WORDS[@]}" ; do + if [[ $opts == -*n* ]]; then nflag=1; fi + done + + if [ -z "$nflag" ] ; then + COMPREPLY=( $( compgen -A enabled $cur ) ) + else + COMPREPLY=( $( compgen -A disabled $cur ) ) + fi + return 0; +} +complete -F _enable_func enable + +_exec_func() +{ + local cur prev + + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then + COMPREPLY=(-a -c -l) + return 0; + fi + if [[ $prev != -*a* ]]; then + COMPREPLY=( $( compgen -c $cur ) ) + return 0 + fi + return 1; +} +complete -F _exec_func exec + +_fc_func() +{ + local cur prev + + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then + COMPREPLY=(-e -n -l -r -s) + return 0; + fi + if [[ $prev == -*e ]]; then + COMPREPLY=( $(compgen -c $cur) ) + return 0 + fi + return 1 +} +complete -F _fc_func fc + +_hash_func() +{ + local cur prev + + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then + COMPREPLY=(-p -r -t) + return 0; + fi + + if [[ $prev == '-p' ]]; then + COMPREPLY=( $( compgen -f $cur ) ) + return 0; + fi + COMPREPLY=( $( compgen -c $cur ) ) + return 0 +} +complete -F _hash_func hash + +_history_func() +{ + local cur prev + + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + COMPREPLY=() + if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then + COMPREPLY=(-a -c -d -n -r -w -p -s) + return 0; + fi + if [[ $prev == -[anrw] ]]; then + COMPREPLY=( $( compgen -f $cur ) ) + fi + return 0 +} +complete -F _history_func history + +#complete -F _read_func read + +_set_func () +{ + local cur prev + + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + COMPREPLY=() + + _redir_test "$cur" "$prev" && return 0; + + if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then + COMPREPLY=(-a -b -e -f -k -m -n -o -p -t -u -v -x -B -C -H -P --) + return 0; + fi + if [[ $cur == '+' ]]; then + COMPREPLY=(+a +b +e +f +k +m +n +o +p +t +u +v +x +B +C +H +P) + return 0; + fi + if [[ $prev == [+-]o ]]; then + COMPREPLY=( $(compgen -A setopt $cur) ) + return 0; + fi + return 1; +} +complete -F _set_func set + +_trap_func () +{ + local cur + cur=${COMP_WORDS[COMP_CWORD]} + + if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then + COMPREPLY=(-l -p) + return 0; + fi + COMPREPLY=( $( compgen -A signal ${cur}) ) + return 0 +} +complete -F _trap_func trap + +# +# meta-completion (completion for complete/compgen) +# +_complete_meta_func() +{ + local cur prev cmd + COMPREPLY=() + + cmd=$1 + + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + _redir_test "$cur" "$prev" && return 0; + + if (( $COMP_CWORD <= 1 )) || [[ "$cur" == '-' ]]; then + case "$cmd" in + complete) COMPREPLY=(-a -b -c -d -e -f -j -k -s -v -u -r -p -A -G -W -P -S -X -F -C);; + compgen) COMPREPLY=(-a -b -c -d -e -f -j -k -s -v -u -A -G -W -P -S -X -F -C);; + esac + return 0 + fi + + if [[ $prev == -A ]]; then + COMPREPLY=(alias arrayvar binding builtin command directory \ +disabled enabled export file 'function' helptopic hostname job keyword \ +running service setopt shopt signal stopped variable) + return 0 + elif [[ $prev == -F ]]; then + COMPREPLY=( $( compgen -A function $cur ) ) + elif [[ $prev == -C ]]; then + COMPREPLY=( $( compgen -c $cur ) ) + else + COMPREPLY=( $( compgen -c $cur ) ) + fi + return 0 +} +complete -F _complete_meta_func complete compgen + +# +# some completions for shell reserved words +# +#complete -c -k time do if then else elif '{' + +# +# external commands +# + +complete -e printenv + +complete -c nohup exec nice eval trace truss strace sotruss gdb + +_make_targets () +{ + local mdef makef gcmd cur prev i + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + # if prev argument is -f, return possible filename completions. + # we could be a little smarter here and return matches against + # `makefile Makefile *.mk', whatever exists + case "$prev" in + -*f) COMPREPLY=( $(compgen -f $cur ) ); return 0;; + esac + + # if we want an option, return the possible posix options + case "$cur" in + -) COMPREPLY=(-e -f -i -k -n -p -q -r -S -s -t); return 0;; + esac + + # make reads `makefile' before `Makefile' + # GNU make reads `GNUmakefile' before all other makefiles, but we + # check that we're completing `gmake' before checking for it + if [ -f GNUmakefile ] && [ ${COMP_WORDS[0]} == gmake ]; then + mdef=GNUmakefile + elif [ -f makefile ]; then + mdef=makefile + elif [ -f Makefile ]; then + mdef=Makefile + else + mdef=*.mk # local convention + fi + + # before we scan for targets, see if a makefile name was specified + # with -f + for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do + if [[ ${COMP_WORDS[i]} == -*f ]]; then + eval makef=${COMP_WORDS[i+1]} # eval for tilde expansion + break + fi + done + + [ -z "$makef" ] && makef=$mdef + + # if we have a partial word to complete, restrict completions to + # matches of that word + if [ -n "$2" ]; then gcmd='grep "^$2"' ; else gcmd=cat ; fi + + # if we don't want to use *.mk, we can take out the cat and use + # test -f $makef and input redirection + COMPREPLY=( $(cat $makef 2>/dev/null | awk 'BEGIN {FS=":"} /^[^.# ][^=]*:/ {print $1}' | tr -s ' ' '\012' | sort -u | eval $gcmd ) ) +} +complete -F _make_targets -X '+($*|*.[cho])' make gmake pmake + +_umount_func () +{ + COMPREPLY=( $(mount | awk '{print $1}') ) +} +complete -F _umount_func umount + +_configure_func () +{ + case "$2" in + -*) ;; + *) return ;; + esac + + case "$1" in + \~*) eval cmd=$1 ;; + *) cmd="$1" ;; + esac + + COMPREPLY=( $("$cmd" --help | awk '{if ($1 ~ /--.*/) print $1}' | grep ^"$2" | sort -u) ) +} +complete -F _configure_func configure + +complete -W '"${GROUPS[@]}"' newgrp + +complete -f chown ln more cat +complete -d mkdir rmdir +complete -f strip + +complete -f -X '*.gz' gzip +complete -f -X '*.bz2' bzip2 +complete -f -X '*.Z' compress +complete -f -X '!*.+(gz|tgz|Gz)' gunzip gzcat zcat zmore +complete -f -X '!*.Z' uncompress zmore zcat +complete -f -X '!*.bz2' bunzip2 bzcat +complete -f -X '!*.zip' unzip +complete -f -X '!*.+(gif|jpg|jpeg|GIF|JPG|JPEG|bmp)' xv + +complete -f -X '!*.pl' perl perl5 + +complete -A hostname rsh telnet rlogin ftp ping xping host traceroute nslookup +complete -A hostname rxterm rxterm3 rxvt2 + +complete -u su +complete -g newgrp groupdel groupmod + +complete -f -X '!*.+(ps|PS)' gs gv ghostview psselect pswrap +complete -f -X '!*.+(dvi|DVI)' dvips xdvi dviselect dvitype catdvi +complete -f -X '!*.+(pdf|PDF)' acroread4 +complete -f -X '!*.texi*' makeinfo texi2dvi texi2html +complete -f -X '!*.+(tex|TEX)' tex latex slitex + +complete -f -X '!*.+(mp3|MP3)' mpg123 +complete -f -X '!*.+(htm|html)' links w3m lynx + +# +# other possibilities, left as exercises +# +#complete -F _find_func find +#complete -F _man_func man +#complete -F _stty_func stty diff --git a/bash-5.1/examples/functions/array-stuff b/bash-5.1/examples/functions/array-stuff new file mode 100644 index 0000000000000000000000000000000000000000..e6316c76dbd6c814aa0e84e9f52b9e5c01dd4f57 --- /dev/null +++ b/bash-5.1/examples/functions/array-stuff @@ -0,0 +1,122 @@ +# +# Chet Ramey +# +# Copyright 1999 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# usage: reverse arrayname +reverse() +{ + local -a R + local -i i + local rlen temp + + # make r a copy of the array whose name is passed as an arg + eval R=\( \"\$\{$1\[@\]\}\" \) + + # reverse R + rlen=${#R[@]} + + for ((i=0; i < rlen/2; i++ )) + do + temp=${R[i]} + R[i]=${R[rlen-i-1]} + R[rlen-i-1]=$temp + done + + # and assign R back to array whose name is passed as an arg + eval $1=\( \"\$\{R\[@\]\}\" \) +} + +A=(1 2 3 4 5 6 7) +echo "${A[@]}" +reverse A +echo "${A[@]}" +reverse A +echo "${A[@]}" + +# unset last element of A +alen=${#A[@]} +unset A[$alen-1] +echo "${A[@]}" + +# ashift -- like shift, but for arrays + +ashift() +{ + local -a R + local n + + case $# in + 1) n=1 ;; + 2) n=$2 ;; + *) echo "$FUNCNAME: usage: $FUNCNAME array [count]" >&2 + exit 2;; + esac + + # make r a copy of the array whose name is passed as an arg + eval R=\( \"\$\{$1\[@\]\}\" \) + + # shift R + R=( "${R[@]:$n}" ) + + # and assign R back to array whose name is passed as an arg + eval $1=\( \"\$\{R\[@\]\}\" \) +} + +ashift A 2 +echo "${A[@]}" + +ashift A +echo "${A[@]}" + +ashift A 7 +echo "${A[@]}" + +# Sort the members of the array whose name is passed as the first non-option +# arg. If -u is the first arg, remove duplicate array members. +array_sort() +{ + local -a R + local u + + case "$1" in + -u) u=-u ; shift ;; + esac + + if [ $# -eq 0 ]; then + echo "array_sort: argument expected" >&2 + return 1 + fi + + # make r a copy of the array whose name is passed as an arg + eval R=\( \"\$\{$1\[@\]\}\" \) + + # sort R + R=( $( printf "%s\n" "${A[@]}" | sort $u) ) + + # and assign R back to array whose name is passed as an arg + eval $1=\( \"\$\{R\[@\]\}\" \) + return 0 +} + +A=(3 1 4 1 5 9 2 6 5 3 2) +array_sort A +echo "${A[@]}" + +A=(3 1 4 1 5 9 2 6 5 3 2) +array_sort -u A +echo "${A[@]}" diff --git a/bash-5.1/examples/functions/array-to-string b/bash-5.1/examples/functions/array-to-string new file mode 100644 index 0000000000000000000000000000000000000000..0d2fbe50552f566a9cd13f82072a7706ede5b66b --- /dev/null +++ b/bash-5.1/examples/functions/array-to-string @@ -0,0 +1,15 @@ +#! /bin/bash + +# Format: array_to_string vname_of_array vname_of_string separator +array_to_string() +{ + (( ($# < 2) || ($# > 3) )) && { + "$FUNCNAME: usage: $FUNCNAME arrayname stringname [separator]" + return 2 + } + + local array=$1 string=$2 + ((3==$#)) && [[ $3 = ? ]] && local IFS="${3}${IFS}" + eval $string="\"\${$array[*]}\"" + return 0 +} diff --git a/bash-5.1/examples/functions/arrayops.bash b/bash-5.1/examples/functions/arrayops.bash new file mode 100644 index 0000000000000000000000000000000000000000..d34353ae261b2836c326142cb944d0abcb718ea1 --- /dev/null +++ b/bash-5.1/examples/functions/arrayops.bash @@ -0,0 +1,146 @@ +# arrayops.bash --- hide some of the nasty syntax for manipulating bash arrays +# Author: Noah Friedman +# Created: 2016-07-08 +# Public domain + +# $Id: arrayops.bash,v 1.3 2016/07/28 15:38:55 friedman Exp $ + +# Commentary: + +# These functions try to tame the syntactic nightmare that is bash array +# syntax, which makes perl's almost look reasonable. +# +# For example the apush function below lets you write: +# +# apush arrayvar newval +# +# instead of +# +# ${arrayvar[${#arrayvar[@]}]}=newval +# +# Because seriously, you've got to be kidding me. + +# These functions avoid the use of local variables as much as possible +# (especially wherever modification occurs) because those variable names +# might shadow the array name passed in. Dynamic scope! + +# Code: + +#:docstring apush: +# Usage: apush arrayname val1 {val2 {...}} +# +# Appends VAL1 and any remaining arguments to the end of the array +# ARRAYNAME as new elements. +#:end docstring: +apush() +{ + eval "$1=(\"\${$1[@]}\" \"\${@:2}\")" +} + +#:docstring apop: +# Usage: apop arrayname {n} +# +# Removes the last element from ARRAYNAME. +# Optional argument N means remove the last N elements. +#:end docstring: +apop() +{ + eval "$1=(\"\${$1[@]:0:\${#$1[@]}-${2-1}}\")" +} + +#:docstring aunshift: +# Usage: aunshift arrayname val1 {val2 {...}} +# +# Prepends VAL1 and any remaining arguments to the beginning of the array +# ARRAYNAME as new elements. The new elements will appear in the same order +# as given to this function, rather than inserting them one at a time. +# +# For example: +# +# foo=(a b c) +# aunshift foo 1 2 3 +# => foo is now (1 2 3 a b c) +# but +# +# foo=(a b c) +# aunshift foo 1 +# aunshift foo 2 +# aunshift foo 3 +# => foo is now (3 2 1 a b c) +# +#:end docstring: +aunshift() +{ + eval "$1=(\"\${@:2}\" \"\${$1[@]}\")" +} + +#:docstring ashift: +# Usage: ashift arrayname {n} +# +# Removes the first element from ARRAYNAME. +# Optional argument N means remove the first N elements. +#:end docstring: +ashift() +{ + eval "$1=(\"\${$1[@]: -\${#$1[@]}+${2-1}}\")" +} + +#:docstring aset: +# Usage: aset arrayname idx newval +# +# Assigns ARRAYNAME[IDX]=NEWVAL +#:end docstring: +aset() +{ + eval "$1[\$2]=${@:3}" +} + +#:docstring aref: +# Usage: aref arrayname idx {idx2 {...}} +# +# Echoes the value of ARRAYNAME at index IDX to stdout. +# If more than one IDX is specified, each one is echoed. +# +# Unfortunately bash functions cannot return arbitrary values in the usual way. +#:end docstring: +aref() +{ + eval local "v=(\"\${$1[@]}\")" + local x + for x in ${@:2} ; do echo "${v[$x]}"; done +} + +#:docstring aref: +# Usage: alen arrayname +# +# Echoes the length of the number of elements in ARRAYNAME. +# +# It also returns number as a numeric value, but return values are limited +# by a maximum of 255 so don't rely on this unless you know your arrays are +# relatively small. +#:end docstring: +alen() +{ + eval echo "\${#$1[@]}" + eval return "\${#$1[@]}" +} + +#:docstring anreverse: +# Usage: anreverse arrayname +# +# Reverse the order of the elements in ARRAYNAME. +# The array variable is altered by this operation. +#:end docstring: +anreverse() +{ + eval set $1 "\"\${$1[@]}\"" + eval unset $1 + while [ $# -gt 1 ]; do + eval "$1=(\"$2\" \"\${$1[@]}\")" + set $1 "${@:3}" + done +} + +#provide arrayops + +# arrayops.bash ends here diff --git a/bash-5.1/examples/functions/autoload b/bash-5.1/examples/functions/autoload new file mode 100644 index 0000000000000000000000000000000000000000..cb3a673ec03ea97d7544104b9ab88af5c88e389e --- /dev/null +++ b/bash-5.1/examples/functions/autoload @@ -0,0 +1,111 @@ +# +# An almost ksh-compatible `autoload'. A function declared as `autoload' will +# be read in from a file the same name as the function found by searching the +# $FPATH (which works the same as $PATH), then that definition will be run. +# +# To do this without source support, we define a dummy function that, when +# executed, will load the file (thereby re-defining the function), then +# execute that newly-redefined function with the original arguments. +# +# It's not identical to ksh because ksh apparently does lazy evaluation +# and looks for the file to load from only when the function is referenced. +# This one requires that the file exist when the function is declared as +# `autoload'. +# +# usage: autoload func [func...] +# +# The first cut of this was by Bill Trost, trost@reed.bitnet +# +# Chet Ramey +# chet@ins.CWRU.Edu + +# +# Declare a function ($1) to be autoloaded from a file ($2) when it is first +# called. This defines a `temporary' function that will `.' the file +# containing the real function definition, then execute that new definition with +# the arguments given to this `fake' function. The autoload function defined +# by the file and the file itself *must* be named identically. +# + +aload() +{ + eval $1 '() { . '$2' ; '$1' "$@" ; return $? ; }' +} + +# +# Search $FPATH for a file the same name as the function given as $1, and +# autoload the function from that file. There is no default $FPATH. +# + +autoload() +{ + # + # Save the list of functions; we're going to blow away the arguments + # in a second. If any of the names contain white space, TFB. + # + + local args="$*" + + # + # This should, I think, list the functions marked as autoload and not + # yet defined, but we don't have enough information to do that here. + # + if [ $# -eq 0 ] ; then + echo "usage: autoload function [function...]" >&2 + return 1 + fi + + # + # If there is no $FPATH, there is no work to be done + # + + if [ -z "$FPATH" ] ; then + echo autoload: FPATH not set or null >&2 + return 1 + fi + + # + # This treats FPATH exactly like PATH: a null field anywhere in the + # FPATH is treated the same as the current directory. + # + # The path splitting command is taken from Kernighan and Pike + # + +# fp=$(echo $FPATH | sed 's/^:/.:/ +# s/::/:.:/g +# s/:$/:./ +# s/:/ /g') + + # replaced with builtin mechanisms 2001 Oct 10 + + fp=${FPATH/#:/.:} + fp=${fp//::/:.:} + fp=${fp/%:/:.} + fp=${fp//:/ } + + for FUNC in $args ; do + # + # We're blowing away the arguments to autoload here... + # We have to; there are no arrays (well, there are, but + # this doesn't use them yet). + # + set -- $fp + + while [ $# -ne 0 ] ; do + if [ -f $1/$FUNC ] ; then + break # found it! + fi + shift + done + + if [ $# -eq 0 ] ; then + echo "$FUNC: autoload function not found" >&2 + continue + fi + +# echo auto-loading $FUNC from $1/$FUNC + aload $FUNC $1/$FUNC + done + + return 0 +} diff --git a/bash-5.1/examples/functions/autoload.v2 b/bash-5.1/examples/functions/autoload.v2 new file mode 100644 index 0000000000000000000000000000000000000000..e29c69582d8ed7ac78763c35e1110b4d0ff686cc --- /dev/null +++ b/bash-5.1/examples/functions/autoload.v2 @@ -0,0 +1,192 @@ +# +# An almost ksh-compatible `autoload'. A function declared as `autoload' will +# be read in from a file the same name as the function found by searching the +# $FPATH (which works the same as $PATH), then that definition will be run. +# +# To do this without source support, we define a dummy function that, when +# executed, will load the file (thereby re-defining the function), then +# execute that newly-redefined function with the original arguments. +# +# It's not identical to ksh because ksh apparently does lazy evaluation +# and looks for the file to load from only when the function is referenced. +# This one requires that the file exist when the function is declared as +# `autoload'. +# +# usage: autoload [-pu] [func ...] +# +# options: +# -p print in a format that can be reused as input +# -u unset each function and remove it from the autoload list +# +# The first cut of this was by Bill Trost, trost@reed.edu +# +# Chet Ramey +# chet@ins.CWRU.Edu + +unset _AUTOLOADS +_aindex=0 + +# +# Declare a function ($1) to be autoloaded from a file ($2) when it is first +# called. This defines a `temporary' function that will `.' the file +# containing the real function definition, then execute that new definition with +# the arguments given to this `fake' function. The autoload function defined +# by the file and the file itself *must* be named identically. +# + +_aload() +{ + eval $1 '() { . '$2' ; '$1' "$@" ; return $? ; }' + _autoload_addlist "$1" +} + +_autoload_addlist() +{ + local i=0 + + while (( i < $_aindex )); do + case "${_AUTOLOADS[i]}" in + "$1") return 1 ;; + esac + (( i += 1 )) + done + _AUTOLOADS[_aindex]="$1" + (( _aindex += 1 )) + return 0 +} + +_autoload_dump() +{ + local func + + for func in ${_AUTOLOADS[@]}; do + [ -n "$1" ] && echo -n "autoload " + echo "$func" + done +} + +# Remove $1 from the list of autoloaded functions +_autoload_remove_one() +{ + local i=0 nnl=0 + local -a nlist + + while (( i < _aindex )); do + case "${_AUTOLOADS[i]}" in + "$1") ;; + *) nlist[nnl]="${_AUTOLOADS[i]}" ; (( nnl += 1 ));; + esac + (( i += 1 )) + done + unset _AUTOLOADS _aindex + eval _AUTOLOADS=( ${nlist[@]} ) + _aindex=$nnl +} + +# Remove all function arguments from the list of autoloaded functions +_autoload_remove() +{ + local func i es=0 + + # first unset the autoloaded functions + for func; do + i=0 + while (( i < _aindex )); do + case "${_AUTOLOADS[i]}" in + "$func") unset -f $func ; break ;; + esac + (( i += 1 )) + done + if (( i == _aindex )); then + echo "autoload: $func: not an autoloaded function" >&2 + es=1 + fi + done + + # then rebuild the list of autoloaded functions + for func ; do + _autoload_remove_one "$func" + done + + return $es +} + +# +# Search $FPATH for a file the same name as the function given as $1, and +# autoload the function from that file. There is no default $FPATH. +# + +autoload() +{ + local -a fp + local _autoload_unset nfp i + + if (( $# == 0 )) ; then + _autoload_dump + return 0 + fi + + OPTIND=1 + while getopts pu opt + do + case "$opt" in + p) _autoload_dump printable; return 0;; + u) _autoload_unset=y ;; + *) echo "autoload: usage: autoload [-pu] [function ...]" >&2 + return 1 ;; + esac + done + + shift $(( $OPTIND - 1 )) + + if [ -n "$_autoload_unset" ]; then + _autoload_remove "$@" + return $? + fi + + # + # If there is no $FPATH, there is no work to be done + # + + if [ -z "$FPATH" ] ; then + echo "autoload: FPATH not set or null" >&2 + return 1 + fi + + # + # This treats FPATH exactly like PATH: a null field anywhere in the + # FPATH is treated the same as the current directory. + # + # This turns $FPATH into an array, substituting `.' for `' + # + eval fp=( $( + IFS=':' + set -- ${FPATH} + for p in "$@" ; do echo -n "${p:-.} "; done + ) + ) + + nfp=${#fp[@]} + + for FUNC ; do + i=0; + while (( i < nfp )) ; do + if [ -f ${fp[i]}/$FUNC ] ; then + break # found it! + fi + (( i += 1 )) + done + + if (( i == nfp )) ; then + echo "autoload: $FUNC: autoload function not found" >&2 + es=1 + continue + fi + +# echo auto-loading $FUNC from ${fp[i]}/$FUNC + _aload $FUNC ${fp[i]}/$FUNC + es=0 + done + + return $es +} diff --git a/bash-5.1/examples/functions/autoload.v3 b/bash-5.1/examples/functions/autoload.v3 new file mode 100644 index 0000000000000000000000000000000000000000..b1e5dfe2a1dd52fd99c6e3b88e2d47911c2c6b0a --- /dev/null +++ b/bash-5.1/examples/functions/autoload.v3 @@ -0,0 +1,125 @@ +#From: Mark Kennedy () +#Message-ID: <35E2B899.63A02DF5@ny.ubs.com> +#Date: Tue, 25 Aug 1998 09:14:01 -0400 +#To: chet@nike.ins.cwru.edu +#Subject: a newer version of the ksh-style 'autoload' + +#enclosed you'll find 'autoload.v3', a version of the autoloader +#that emulates the ksh semantics of delaying the resolution (and loading) of the function +#until its first use. i took the liberty of simplifying the code a bit although it still uses the +#same functional breakdown. i recently went through the exercise of converting +#my ksh-based environment to bash (a very, very pleasant experience) +#and this popped out. + +# the psuedo-ksh autoloader. + +# The first cut of this was by Bill Trost, trost@reed.bitnet. +# The second cut came from Chet Ramey, chet@ins.CWRU.Edu +# The third cut came from Mark Kennedy, mtk@ny.ubs.com. 1998/08/25 + +unset _AUTOLOADS + +_aload() +{ + local func + for func; do + eval $func '() + { + local f=$(_autoload_resolve '$func') + if [[ $f ]]; then + . $f + '$func' "$@" + return $? + else + return 1 + fi + }' + _autoload_addlist $func + done +} + +_autoload_addlist() +{ + local func + + for func in ${_AUTOLOADS[@]}; do + [[ $func = "$1" ]] && return + done + + _AUTOLOADS[${#_AUTOLOADS[@]}]=$1 +} + +_autoload_dump() +{ + local func + + for func in ${_AUTOLOADS[@]}; do + [[ $1 ]] && echo -n "autoload " + echo $func + done +} + +_autoload_remove_one() +{ + local func + local -a NEW_AUTOLOADS + + for func in ${_AUTOLOADS[@]}; do + [[ $func != "$1" ]] && NEW_AUTOLOADS[${#NEW_AUTOLOADS[@]}]=$func + done + + _AUTOLOADS=( ${NEW_AUTOLOADS[@]} ) +} + +_autoload_remove() +{ + local victim func + + for victim; do + for func in ${_AUTOLOADS[@]}; do + [[ $victim = "$func" ]] && unset -f $func && continue 2 + done + echo "autoload: $func: not an autoloaded function" >&2 + done + + for func; do + _autoload_remove_one $func + done +} + +_autoload_resolve() +{ + if [[ ! "$FPATH" ]]; then + echo "autoload: FPATH not set or null" >&2 + return + fi + + local p + + for p in $( (IFS=':'; set -- ${FPATH}; echo "$@") ); do + p=${p:-.} + if [ -f $p/$1 ]; then echo $p/$1; return; fi + done + + echo "autoload: $1: function source file not found" >&2 +} + +autoload() +{ + if (( $# == 0 )) ; then _autoload_dump; return; fi + + local opt OPTIND + + while getopts pu opt + do + case $opt in + p) _autoload_dump printable; return;; + u) shift $((OPTIND-1)); _autoload_remove "$@"; return;; + *) echo "autoload: usage: autoload [-pu] [function ...]" >&2; return;; + esac + done + + shift $(($OPTIND-1)) + + _aload "$@" +} diff --git a/bash-5.1/examples/functions/autoload.v4 b/bash-5.1/examples/functions/autoload.v4 new file mode 100644 index 0000000000000000000000000000000000000000..7f60563bd80ed15137883d86b203008eec7144dc --- /dev/null +++ b/bash-5.1/examples/functions/autoload.v4 @@ -0,0 +1,556 @@ +## -*- sh -*- + +# The psuedo-ksh autoloader. + +# How to use: +# o One function per file. +# o File and function name match exactly. +# o File is located in a directory that is in FPATH. +# o This script (autoload) must be sourced in as early as possible. This +# implies that any code in this script should NOT rely on any library of local +# or self-defined functions having already been loaded. +# o autoload must be called for each function before the function can be used. If +# autoloads are in directories where there are nothing but autoloads, then +# 'autoload /path/to/files/*' suffices (but see options -a and -f). +# o The call must be made in the current environment, not a subshell. +# o The command line suffices as "current environment". If you have autoload +# calls in a script, that script must be dotted into the process. + +# The first cut of this was by Bill Trost, trost@reed.bitnet. +# The second cut came from Chet Ramey, chet@ins.CWRU.Edu +# The third cut came from Mark Kennedy, mtk@ny.ubs.com. 1998/08/25 +# The fourth cut came from Matthew Persico, matthew.persico@gmail.com 2017/August + +autoload_calc_shimsize () +{ + echo $((AUTOLOAD_SHIM_OVERHEAD + 3 * ${#1})) +} + +_autoload_split_fpath () +{ + (IFS=':'; set -- ${FPATH}; echo "$@") +} + +_aload() +{ + local opt OPTIND + local doexport=0 + local doreload=0 + local doverbose=0 + local doevalshim=0 + local loadthese + local optimize=0 + local loaded=0 + local exported=0 + local optimized=0 + local summary=0 + local dofpath=0 + while getopts xrvla:oyf opt; do + case $opt in + x) doexport=1;; + r) doreload=1;; + v) doverbose=1;; + l) doevalshim=1;; + a) loadthese=$(find $OPTARG -maxdepth 1 -type f -printf '%f ');; + o) optimize=1;; + y) summary=1;; + f) loadthese=$(find $(_autoload_split_fpath) -maxdepth 1 -type f -printf '%f ');; + *) echo "_aload: usage: _aload [-xrvlyf] [-a dir] [function ...]" >&2; return;; + esac + done + + shift $(($OPTIND-1)) + + [ -z "$loadthese" ] && loadthese="$@" + + local func + for func in $loadthese; do + local exists_fn + exists_fn=$(declare -F $func) + if [ -n "$exists_fn" ] && ((doreload==0)) && ((doevalshim==0)) + then + if ((doverbose)) + then + echo "autoload: function '$func' already exists" + fi + else + local andevaled='' + local andexported='' + local evalstat=0 + local doshim=1 + local funcfile + funcfile=$(_autoload_resolve $func) + if [[ $funcfile ]] ; then + ## The file was found for $func. Process it. + + if ((optimize)); then + ## For the first function loaded, we will not know + ## AUTOLOAD_SHIM_OVERHEAD. We can only calculate it after + ## we have loaded one function. + if [[ $AUTOLOAD_SHIM_OVERHEAD ]]; then + local size=$(wc -c $funcfile| sed 's/ .*//') + local shimsize=$(autoload_calc_shimsize $func) + if (( size <= shimsize)); then + doshim=0 + andevaled=', optimized' + ((optimized+=1)) + fi + fi + fi + + if ((doevalshim)); then + doshim=0 + andevaled=', evaled' + fi + + ## 'brand' as in branding a cow with a mark. We add a local + ## variable to each function we autoload so that we can tell + ## later on it is an autoloaded function without having to + ## maintain some bash array or hash that cannot be passed to + ## and used by subshells. + local brandtext + brandtext="eval \"\$(type $func | sed -e 1d -e 4ilocal\\ AUTOLOADED=\'$func\')\"" + if ((doshim)); then + ## Don't bother trying to save space by shoving all the + ## eval text below onto one unreadable line; new lines will + ## be added at your semicolons and any indentation below + ## seems to be ignored anyway if you export the function; + ## look at its BASH_FUNCTION representation. + eval $func '() + { + local IS_SHIM="$func" + local file=$(_autoload_resolve '$func') + if [[ $file ]] + then + . $file + '$brandtext' + '$func' "$@" + return $? + else + return 1; + fi + }' + else + . $funcfile + eval "$brandtext" + fi + evalstat=$? + if((evalstat==0)) + then + ((loaded+=1)) + ((doexport)) && export -f $func && andexported=', exported' && ((exported+=1)) + ((doverbose)) && echo "$func autoloaded${andexported}${andevaled}" + if [[ ! $AUTOLOAD_SHIM_OVERHEAD ]] && ((doshim)); then + ## ...we have just loaded the first function shim into + ## memory. Let's calc the AUTOLOAD_SHIM_OVERHEAD size + ## to use going forward. In theory, we could check + ## again here to see if we should optimize and source + ## in this function, now that we now the + ## AUTOLOAD_SHIM_OVERHEAD. In practice, it's not worth + ## duping that code or creating a function to do so for + ## one function. + AUTOLOAD_SHIM_OVERHEAD=$(type $func | grep -v -E "^$1 is a function" | sed "s/$func//g"| wc -c) + export AUTOLOAD_SHIM_OVERHEAD + fi + else + echo "$func failed to load" >&2 + fi + fi + fi + done + ((summary)) && echo "autoload: loaded:$loaded exported:$exported optimized:$optimized overhead:$AUTOLOAD_SHIM_OVERHEAD bytes" +} + +_autoload_dump() +{ + local opt OPTIND + local opt_p='' + local opt_s='' + while getopts ps opt + do + case $opt in + p ) opt_p=1;; + s ) opt_s=1;; + esac + done + + shift $(($OPTIND-1)) + + local exported='' + local executed='' + local func + for func in $(declare | grep -E 'local\\{0,1} AUTOLOADED' | sed -e "s/.*AUTOLOADED=//" -e 's/\\//g' -e 's/[");]//g' -e "s/'//g") + do + if [ -n "$opt_p" ]; then echo -n "autoload "; fi + if [ -n "$opt_s" ] + then + exported=$(declare -F | grep -E "${func}$" | sed 's/declare -f\(x\{0,1\}\).*/\1/') + [ "$exported" = 'x' ] && exported=' exported' || exported=' not exported' + executed=$(type $func | grep 'local IS_SHIM') + [ -z "$executed" ] && executed=' executed' || executed=' not executed' + fi + echo "${func}${exported}${executed}" + done +} + +_autoload_resolve() +{ + if [[ ! "$FPATH" ]]; then + echo "autoload: FPATH not set or null" >&2 + return + fi + + local p # for 'path'. The $() commands in the for loop split the FPATH + # string into its constituents so that each one may be processed. + + for p in $( _autoload_split_fpath ); do + p=${p:-.} + if [ -f $p/$1 ]; then echo $p/$1; return; fi + done + + echo "autoload: $1: function source file not found" >&2 +} + +_autoload_edit() +{ + [ -z "$EDITOR" ] && echo "Error: no EDITOR defined" && return 1 + local toedit + local func + for func in "$@" + do + local file=$(_autoload_resolve $func) + if [[ $file ]] + then + toedit="$toedit $file" + else + echo "$funcname not found in FPATH funcfile. Skipping." + fi + done + + [ -z "$toedit" ] && return 1 + + local timemarker=$(mktemp) + + $EDITOR $toedit + + local i + for i in $toedit + do + if [ $i -nt $timemarker ] + then + local f=$(basename $i) + echo Reloading $f + autoload -r $f + fi + done +} + +_autoload_page() +{ + [ -z "$PAGER" ] && echo "Error: no PAGER defined" && return 1 + local topage + local func + for func in "$@" + do + local file=$(_autoload_resolve $func) + if [[ $file ]] + then + topage="$topage $file" + else + echo "$funcname not found in FPATH funcfile. Skipping." + fi + done + + [ -z "$topage" ] && return 1 + + $PAGER $topage +} + +_autoload_remove() +{ + unset -f "$@" +} + +_autoload_help() +{ + cat <&2; return;; + esac + done + + shift $(($OPTIND-1)) + if [ -n "$dumpopt" ] + then + _autoload_dump $dumpopt + else + _aload $passthru "$@" + fi +} + +autoreload () +{ + autoload -r "$@" +} + +## When we source in autoload, we export (but NOT autoload) the autoload +## functions so that they are available in subshells and you don't have to +## source in the autoload file in subshells. +export -f _aload \ + _autoload_dump \ + _autoload_edit \ + _autoload_help \ + _autoload_page \ + _autoload_resolve \ + _autoload_split_fpath \ + autoload \ + autoload_calc_shimsize \ + autoreload diff --git a/bash-5.1/examples/functions/autoload.v4.t b/bash-5.1/examples/functions/autoload.v4.t new file mode 100644 index 0000000000000000000000000000000000000000..6d35d141185dec1b755457cee0503ca11d9c695f --- /dev/null +++ b/bash-5.1/examples/functions/autoload.v4.t @@ -0,0 +1,184 @@ +#!/bin/bash + +workdir=$(mktemp -d) + +cp autoload $workdir + +cd $workdir +pwd + +. ./autoload + +funclist='ALTEST_func1 ALTEST_funcexport ALTEST_funcu' +for funcname in $funclist; do + cat < $funcname +$funcname () +{ +echo this is $funcname + +} +EOFFUNC + +done + +export FPATH=$workdir + +autoload ALTEST_func1 ALTEST_funcu +autoload -x ALTEST_funcexport + +ok=0 +failed=0 + +for funcname in $funclist; do + + testname="$funcname loaded" + got=$(type $funcname 2>&1) + if [[ $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname" + ((failed+=1)) + else + echo "ok - $testname" + ((ok+=1)) + + testname="$funcname is a shim" + if [[ ! $got =~ "IS_SHIM" ]]; then + echo "## Failed $testname" + ((failed+=1)) + else + echo "ok - $testname" + ((ok+=1)) + + testname="$funcname shim executed" + $funcname > /dev/null + got=$(type $funcname 2>&1) + if [[ $got =~ "IS_SHIM" ]]; then + echo "## Failed $testname" + ((failed+=1)) + else + echo "ok - $testname" + ((ok+=1)) + fi + fi + fi +done + +funcname=ALTEST_func1 +testname="$funcname shim reloaded" +autoload -r $funcname +got=$(type $funcname 2>&1) +if [[ ! $got =~ "IS_SHIM" ]]; then + echo "## Failed $testname" + ((failed+=1)) +else + echo "ok - $testname" + ((ok+=1)) +fi + +funcname=ALTEST_funcu +testname="$funcname shim unloaded" +autoload -u $funcname +got=$(type $funcname 2>&1) +if [[ ! $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname" + ((failed+=1)) +else + echo "ok - $testname" + ((ok+=1)) +fi + +testname="autoload -p" +got=$(autoload -p | grep ALTEST) +if [[ ! $got =~ "autoload ALTEST_func1" ]] || \ + [[ ! $got =~ "autoload ALTEST_funcexport" ]] ; then +echo "## Failed $testname" + ((failed+=1)) +else + echo "ok - $testname" + ((ok+=1)) +fi + +testname="autoload -s" +echo "Executing $testname, could take a long time..." +got=$(autoload -s | grep ALTEST) +if [[ ! $got =~ "ALTEST_func1 not exported not executed" ]] || \ + [[ ! $got =~ "ALTEST_funcexport exported executed" ]] ; then + echo "## Failed $testname" + echo "## got: $got" + ((failed+=1)) +else + echo "ok - $testname" + ((ok+=1)) +fi + +testname="autoload -r -a $FPATH" +autoload -r -a $FPATH +localfailed=0 +localok=0 +for funcname in $funclist; do + got=$(type $funcname 2>&1) + if [[ $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname - $funcname" + ((localfailed+=1)) + else + ((localok+=1)) + if [[ ! $got =~ "IS_SHIM" ]]; then + ((localfailed+=1)) + else + ((localok+=1)) + fi + fi +done +if ((localfailed==0)); then + echo "ok - $testname" + ((ok+=1)) +else + ((failed+=1)) +fi + +testname="autoload -u $funclist" +autoload -u $funclist +localfailed=0 +localok=0 +for funcname in $funclist; do + got=$(type $funcname 2>&1) + if [[ ! $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname - $funcname" + ((localfailed+=1)) + else + ((localok+=1)) + fi +done +if ((localfailed==0)); then + echo "ok - $testname" + ((ok+=1)) +else + ((failed+=1)) +fi + +testname="autoload -r -f" +autoload -r -f +localfailed=0 +localok=0 +for funcname in $funclist; do + got=$(type $funcname 2>&1) + if [[ $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname - $funcname" + ((localfailed+=1)) + else + ((localok+=1)) + if [[ ! $got =~ "IS_SHIM" ]]; then + ((localfailed+=1)) + else + ((localok+=1)) + fi + fi +done +if ((localfailed==0)); then + echo "ok - $testname" + ((ok+=1)) +else + ((failed+=1)) +fi + +echo $ok passed, $failed failed +exit $failed diff --git a/bash-5.1/examples/functions/basename b/bash-5.1/examples/functions/basename new file mode 100644 index 0000000000000000000000000000000000000000..a5413495d4e05ec8724d1236f2030a1e6929ba27 --- /dev/null +++ b/bash-5.1/examples/functions/basename @@ -0,0 +1,23 @@ +# Date: Fri, 11 Oct 91 11:22:36 edt +# From: friedman@gnu.ai.mit.edu +# To: bfox@gnu.ai.mit.edu + +# A replacement for basename(1). Not all the systems I use have this +# program. Usage: basename [path] {extension} +function basename () +{ + local path="$1" + local suffix="$2" + local tpath="${path%/}" + + # Strip trailing '/' characters from path (unusual that this should + # ever occur, but basename(1) seems to deal with it.) + while [ "${tpath}" != "${path}" ]; do + tpath="${path}" + path="${tpath%/}" + done + + path="${path##*/}" # Strip off pathname + echo ${path%${suffix}} # Also strip off extension, if any. +} + diff --git a/bash-5.1/examples/functions/csh-compat b/bash-5.1/examples/functions/csh-compat new file mode 100644 index 0000000000000000000000000000000000000000..54c8488c9e18a5901d7e899c477f0ffc2278ae2f --- /dev/null +++ b/bash-5.1/examples/functions/csh-compat @@ -0,0 +1,48 @@ +# C-shell compatibilty package. +# setenv VAR VALUE +function setenv () +{ + export $1="$2" +} + +function unsetenv () +{ + unset $1 +} + +# Can't write foreach yet. Need pattern matching, and a few extras. +function foreach () { +echo 'Can'\''t do `foreach'\'' yet. Type "help for".' +} + +# Make this work like csh's. Special case "term" and "path". +#set () { +#} + +chdir () +{ + builtin cd "$@" +} + +# alias - convert csh alias commands to bash functions +# from Mohit Aron +# posted to usenet as <4i5p17$bnu@larry.rice.edu> +function alias () +{ + if [ "x$2" = "x" ] + then + declare -f $1 + else + case $2 in + *[#\!]*) + comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g + s/\\!:\([1-9]\)/\"$\1\"/g + s/#/\\#/g') + ;; + *) + comm="$2 \"\$@\"" ;; + esac + + eval function $1 \(\) "{" command "$comm" "; }" + fi +} diff --git a/bash-5.1/examples/functions/dirname b/bash-5.1/examples/functions/dirname new file mode 100644 index 0000000000000000000000000000000000000000..ccb8c841bde583536e90000beecfd1b756455674 --- /dev/null +++ b/bash-5.1/examples/functions/dirname @@ -0,0 +1,21 @@ +# Date: Fri, 11 Oct 91 11:22:36 edt +# From: friedman@gnu.ai.mit.edu +# To: bfox@gnu.ai.mit.edu + +# A replacement for dirname(1). This one appears less often on some +# systems I use than basename(1), and I really depend on it for some +# things. Usage: dirname [path] +function dirname () +{ + local dir="$1" + local tdir="${dir%/}" + + # Strip trailing '/' characters from dir (unusual that this should + # ever occur, but dirname(1) seems to deal with it.) + while [ "${tdir}" != "${dir}" ]; do + tdir="${dir}" + dir="${tdir%/}" + done + + echo "${dir%/*}" +} diff --git a/bash-5.1/examples/functions/dirstack b/bash-5.1/examples/functions/dirstack new file mode 100644 index 0000000000000000000000000000000000000000..d68e6198fbae11bab93c0a4efa28c61e41968fb1 --- /dev/null +++ b/bash-5.1/examples/functions/dirstack @@ -0,0 +1,160 @@ +#!/bin/bash +# @(#) dirstack + +### +# Another implementation of the directory manipulation functions +# published in the Bolsky & Korn book : "The new Korn shell" : +# cd, to change current directory +# d, to display the stack content +# Eric Sanchis (eric.sanchis@iut-rodez.fr), 2012 +# +# 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 . +# +### + + +shopt -s expand_aliases +shopt -s extglob +shopt -s cdable_vars + +alias integer='declare -i' + +integer MAX=32 +integer INDMAX=MAX-1 +integer INDTOP=0 + +unalias cd 2>/dev/null +alias cd=cdir + +unset tab +tab[INDTOP]="$(pwd)" + + +function cdir +{ + local -i ind + local dir + +dir="${1:-$HOME}" +case "$dir" in + - ) # cd - => equivalent to : cd -1 + ind=INDTOP-1 + cd_by_number $ind + ;; + -+([[:digit:]]) ) # cd -n + ind=$INDTOP-${dir#-} + cd_by_number $ind + ;; + *) # cd ~ or cd dir_name + cd_by_name "$dir" +esac +} + + +function cd_by_number +{ + local -i k=$1 + local -i j + local dirtmp + +if (( k < 0 )) + then + echo Impossible to change directory >&2 + return 1 + else + dirtmp="${tab[k]}" + j=k+1 + while (( j <= INDTOP )) + do + tab[j-1]="${tab[j]}" + j=j+1 + done + tab[INDTOP]="$dirtmp" + \cd "${tab[INDTOP]}" +fi +} + + +function cd_by_name +{ + local -i i + local rep + +rep=$( \cd "$1" &>/dev/null && pwd) +if [[ -z "$rep" ]] + then + echo cd : "$1" unknown >&2 + return 1 +fi + + i=$INDTOP + while (( i >= 0 )) + do + if [[ "${tab[i]}" == "$rep" ]] + then break + fi + i=i-1 + done + +if (( i == INDTOP )) + then # cd -0 => we do nothing ! + return 0 + elif (( i == -1 )) + then # the directory isn't in the stack + if (( INDTOP == INDMAX )) + then # the stack is FULL + # the oldest directory is removed + local -i m + + m=1 + while (( m <= INDMAX )) + do + tab[m-1]="${tab[m]}" + m=m+1 + done + else # the new directory is added to the top of the stack + INDTOP=INDTOP+1 + fi + tab[INDTOP]="$rep" + \cd "${tab[INDTOP]}" + return 0 + + else # the directory is already in the stack + # $i gives its index + cd_by_number $i +fi +} + + +function d # display the directory stack +{ + local -i i + local rep + +i=0 +while (( $i <= $INDTOP )) + do + rep="${tab[INDTOP-i]#$HOME/}" + case "$rep" in + $HOME) rep="~" ;; + /* ) : ;; + * ) rep="~/$rep" + esac + + echo "$i ) $rep" + i=i+1 + done +} + + diff --git a/bash-5.1/examples/functions/exitstat b/bash-5.1/examples/functions/exitstat new file mode 100644 index 0000000000000000000000000000000000000000..f49ebf588911eb506e651c73b77374628c659e00 --- /dev/null +++ b/bash-5.1/examples/functions/exitstat @@ -0,0 +1,22 @@ +# Contributed by Noah Friedman and Roland McGrath. + +# To be run by the PROMPT_COMMAND variable, so that one can see what +# the exit status of processes are. + +function check_exit_status () +{ + local status="$?" + local signal="" + + if [ ${status} -ne 0 ] && [ ${status} != 128 ]; then + # If process exited by a signal, determine name of signal. + if [ ${status} -gt 128 ]; then + signal="$(builtin kill -l $((${status} - 128)) 2>/dev/null)" + if [ "$signal" ]; then signal="($signal)"; fi + fi + echo "[Exit ${status} ${signal}]" 1>&2 + fi + return 0 +} + +PROMPT_COMMAND=check_exit_status diff --git a/bash-5.1/examples/functions/external b/bash-5.1/examples/functions/external new file mode 100644 index 0000000000000000000000000000000000000000..c2e52cddc313655a932e724047ecdf9353d60327 --- /dev/null +++ b/bash-5.1/examples/functions/external @@ -0,0 +1,50 @@ +# Contributed by Noah Friedman. + +# To avoid using a function in bash, you can use the `builtin' or +# `command' builtins, but neither guarantees that you use an external +# program instead of a bash builtin if there's a builtin by that name. So +# this function can be used like `command' except that it guarantees the +# program is external by first disabling any builtin by that name. After +# the command is done executing, the state of the builtin is restored. +function external () +{ + local state="" + local exit_status + + if builtin_p "$1"; then + state="builtin" + enable -n "$1" + fi + + command "$@" + exit_status=$? + + if [ "$state" = "builtin" ]; then + enable "$1" + fi + + return ${exit_status} +} + +# What is does is tell you if a particular keyword is currently enabled as +# a shell builtin. It does NOT tell you if invoking that keyword will +# necessarily run the builtin. For that, do something like +# +# test "$(builtin type -type [keyword])" = "builtin" +# +# Note also, that disabling a builtin with "enable -n" will make builtin_p +# return false, since the builtin is no longer available. +function builtin_p () +{ + local word + + set $(builtin type -all -type "$1") + + for word in "$@" ; do + if [ "${word}" = "builtin" ]; then + return 0 + fi + done + + return 1 +} diff --git a/bash-5.1/examples/functions/fact b/bash-5.1/examples/functions/fact new file mode 100644 index 0000000000000000000000000000000000000000..97efd49874083a8dbdac32cb487c92879db9e6ea --- /dev/null +++ b/bash-5.1/examples/functions/fact @@ -0,0 +1,13 @@ +# Who said shells can't use recursion? Here is a factorial function. +# You call it with a number as an argument, and it returns the factorial +# of that number. + +fact () +{ + local num=$1; + if [ "$num" = 1 ] ; then + echo 1 + return ; + fi; + echo $(( $num * $(fact $(( $num - 1 )) ) )) +} diff --git a/bash-5.1/examples/functions/fstty b/bash-5.1/examples/functions/fstty new file mode 100644 index 0000000000000000000000000000000000000000..5ed594f04f6b391d40c2b921e19b1f057b93b4ee --- /dev/null +++ b/bash-5.1/examples/functions/fstty @@ -0,0 +1,77 @@ +# +# A function that works as a front end for both stty and the `bind' +# builtin, so the tty driver and readline see the same changes +# +# +# Chet Ramey +# +# Copyright 2011 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# Convert between the stty ^H control character form and the readline \C-H +# form +# +cvt() +{ + echo "$@" | cat -v | sed 's/\^/\\C-/' +} + +# +# stty front-end. Parses the argument list and creates two command strings, +# one for stty, another for bind. +# +fstty() +{ + local cmd="" bargs="" + local e + + while [ $# -gt 0 ] + do + case "$1" in + -a) cmd="$cmd everything" + ;; + erase) shift; + e=$(cvt "$1") + cmd="$cmd erase $1" + bargs="$bargs '\"$e\": backward-delete-char'" + ;; + kill) shift + e=$(cvt "$1") + cmd="$cmd kill $1" + bargs="$bargs '\"$e\": unix-line-discard'" + ;; + werase) shift; + e=$(cvt "$1") + cmd="$cmd erase $1" + bargs="$bargs '\"$e\": backward-kill-word'" + ;; + lnext) shift; + e=$(cvt "$1") + cmd="$cmd erase $1" + bargs="$bargs '\"$e\": quoted-insert'" + ;; + *) cmd="$cmd $1" + ;; + esac + shift + done + + command stty $cmd + if [ -n "$bargs" ]; then + builtin bind $bargs + fi +} diff --git a/bash-5.1/examples/functions/func b/bash-5.1/examples/functions/func new file mode 100644 index 0000000000000000000000000000000000000000..e7696f71365b7d064c1ef6744db14bbd68fa0cbf --- /dev/null +++ b/bash-5.1/examples/functions/func @@ -0,0 +1,43 @@ +# +# func -- print out definitions for functions named by arguments +# +# usage: func name [name ...] +# +# Chet Ramey +# +# Copyright 1991 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +func() +{ + local status=0 + + if [ $# -eq 0 ] ; then + echo "usage: func name [name...]" 1>&2 + return 1 + fi + + for f + do + if [ "$(builtin type -type $f)" != "function" ] ; then + echo "func: $f: not a function" 1>&2 + status=1 # one failed + continue + fi + builtin type $f | sed 1d + done + return $status +} diff --git a/bash-5.1/examples/functions/inetaddr b/bash-5.1/examples/functions/inetaddr new file mode 100644 index 0000000000000000000000000000000000000000..9e7261398b950156d9daf2cec5bf47f7720eabda --- /dev/null +++ b/bash-5.1/examples/functions/inetaddr @@ -0,0 +1,79 @@ +# +# Chet Ramey +# +# Copyright 2002 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# inet2hex - Internet address conversion, dotted-decimal to hex +# +inet2hex () +{ + local IFS + + IFS=. + set -- $1 + + if (( $# != 4 )); then + echo "inet2hex: incorrect input format: $1" >&2 + echo "inet2hex: usage: inet2hex XX.XX.XX.XX" >&2 + return 2 + fi + + printf "0x%02x%02x%02x%02x\n" $1 $2 $3 $4 +} + +# +# hex2inet - Internet address conversion, hex to dotted-decimal +# +hex2inet () +{ + local x1 x2 x3 x4 + local rev + + OPTIND=1 + while getopts "r" o + do + case "$o" in + r) rev=true;; + *) echo "hex2inet: usage: hex2inet [-r] [0x]XXXXXXXX" >&2 ; exit 2;; + esac + done + shift $(( $OPTIND - 1 )) + + case "$1" in + 0x*) h=${1#??} ;; + *) h=$1 ;; + esac + + if (( ${#h} != 8 )); then + echo "hex2inet: $h not in inet format" >&2 + echo "hex2inet: usage: hex2inet [0x]XXXXXXXX" >&2 + return 2 + fi + + x1=$(( 0x${h:0:2} )) + x2=$(( 0x${h:2:2} )) + x3=$(( 0x${h:4:2} )) + x4=$(( 0x${h:6:2} )) + + if [ -z "$rev" ] ; then + printf "%d.%d.%d.%d\n" $x1 $x2 $x3 $x4 + else + printf "%d.%d.%d.%d\n" $x4 $x3 $x2 $x1 + fi + return 0 +} diff --git a/bash-5.1/examples/functions/inpath b/bash-5.1/examples/functions/inpath new file mode 100644 index 0000000000000000000000000000000000000000..cb4c93da336d2dfc9206f3ebe3316badb11ecba7 --- /dev/null +++ b/bash-5.1/examples/functions/inpath @@ -0,0 +1,14 @@ +inpath() +{ + local PROG + path=$(echo $PATH | sed 's/^:/.:/ + s/::/:.:/g + s/:$/:./ + s/:/ /g') + + for x in $path + do + [ -x $x/$1 ] && { PROG=$x/$1; break; } + done + [ -n "$PROG" ] +} diff --git a/bash-5.1/examples/functions/isnum2 b/bash-5.1/examples/functions/isnum2 new file mode 100644 index 0000000000000000000000000000000000000000..b21974db4b0782c5b50565505e64878cfa57bcaa --- /dev/null +++ b/bash-5.1/examples/functions/isnum2 @@ -0,0 +1,41 @@ +# +# Chet Ramey +# +# Copyright 1998 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +isnum2() +{ + case "$1" in + [-+] | '') return 1;; # empty or bare `-' or `+' + [-+]*[!0-9]*) return 1;; # non-digit with leading sign + [-+]*) return 0;; # OK + *[!0-9]*) return 1;; # non-digit + *) return 0;; # OK + esac +} + +# this one handles floating point +isnum3() +{ + case "$1" in + '') return 1;; # empty + *[!0-9.+-]*) return 1;; # non-digit, +, -, or . + *?[-+]*) return 1;; # sign as second or later char + *.*.*) return 1;; # multiple decimal points + *) return 0;; # OK + esac +} diff --git a/bash-5.1/examples/functions/isvalidip b/bash-5.1/examples/functions/isvalidip new file mode 100644 index 0000000000000000000000000000000000000000..0b2dafedfb558a02447accf529099fc5fdc513de --- /dev/null +++ b/bash-5.1/examples/functions/isvalidip @@ -0,0 +1,14 @@ +# Thanks to Chris F. A. Johnson for this one +is_validip() +{ + case "$*" in + ""|*[!0-9.]*|*[!0-9]) return 1 ;; + esac + + local IFS=. + set -- $* + + [ $# -eq 4 ] && + [ ${1:-666} -le 255 ] && [ ${2:-666} -le 255 ] && + [ ${3:-666} -le 255 ] && [ ${4:-666} -le 254 ] +} diff --git a/bash-5.1/examples/functions/ksh-cd b/bash-5.1/examples/functions/ksh-cd new file mode 100644 index 0000000000000000000000000000000000000000..26b00a990a070571d9e4ef67365578ccfcf2c932 --- /dev/null +++ b/bash-5.1/examples/functions/ksh-cd @@ -0,0 +1,54 @@ +# +# Chet Ramey +# +# Copyright 2001 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# ksh-like `cd': cd [-LP] [dir [change]] +# +cd() +{ + OPTIND=1 + while getopts "LP" opt + do + case $opt in + L|P) CDOPTS="$CDOPTS -$opt" ;; + *) echo "$FUNCNAME: usage: $FUNCNAME [-LP] [dir] [change]" >&2 + return 2;; + esac + done + + shift $(( $OPTIND - 1 )) + + case $# in + 0) builtin cd $CDOPTS "$HOME" ;; + 1) builtin cd $CDOPTS "$@" ;; + 2) old="$1" new="$2" + case "$PWD" in + *$old*) ;; + *) echo "${0##*/}: $FUNCNAME: bad substitution" >&2 ; return 1 ;; + esac + + dir=${PWD//$old/$new} + + builtin cd $CDOPTS "$dir" && echo "$PWD" + + ;; + *) echo "${0##*/}: $FUNCNAME: usage: $FUNCNAME [-LP] [dir] [change]" >&2 + return 2 ;; + esac +} diff --git a/bash-5.1/examples/functions/ksh-compat-test b/bash-5.1/examples/functions/ksh-compat-test new file mode 100644 index 0000000000000000000000000000000000000000..919d82bcd304ef9e505e1b795c12db2d21533685 --- /dev/null +++ b/bash-5.1/examples/functions/ksh-compat-test @@ -0,0 +1,58 @@ +# +# Chet Ramey +# +# Copyright 1999 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# replacements for test/[ that do arithmetic expansion on the operands to +# the arithmetic operators, like ksh. +# +function test() +{ + local -i n1 n3 + case "$#" in + 3) case "$2" in + -lt|-gt|-eq|-ne|-le|-ge) n1=$(( $1 )) + n3=$(( $3 )) + builtin test "$n1" $2 "$n3" + return $?;; + *) builtin test "$@" ;; + esac;; + *) builtin test "$@" ;; + esac +} + +function [() +{ + local -i n1 n3 + case "$#" in + 4) case "$2" in + -lt|-gt|-eq|-ne|-le|-ge) n1=$(( $1 )) + n3=$(( $3 )) + builtin [ "$n1" $2 "$n3" ] + return $?;; + *) builtin [ "$@" ;; + esac;; + *) builtin [ "$@" ;; + esac +} + +q=7 + +[ q -lt 10 ] +echo $? +[ $q -lt 10 ] +echo $? diff --git a/bash-5.1/examples/functions/kshenv b/bash-5.1/examples/functions/kshenv new file mode 100644 index 0000000000000000000000000000000000000000..9faba08cd71f01ba54aa30675f556339428000ad --- /dev/null +++ b/bash-5.1/examples/functions/kshenv @@ -0,0 +1,246 @@ +# +# .kshenv -- functions and aliases to provide the beginnings of a ksh +# environment for bash. +# +# Chet Ramey +# chet@ins.CWRU.Edu +# + +# +# Copyright 2002 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# +# These are definitions for the ksh compiled-in `exported aliases'. There +# are others, but we already have substitutes for them: "history", "type", +# and "hash". +# +alias r="fc -s" +alias functions="typeset -f" +alias integer="typeset -i" +alias nohup="nohup " +alias command="command " +alias stop="kill -s STOP" +alias redirect="command exec" +alias hist="fc" + +# +# An almost-ksh compatible `whence' command. This is as hairy as it is +# because of the desire to exactly mimic ksh (whose behavior was determined +# empirically). +# +# This depends somewhat on knowing the format of the output of the bash +# `builtin type' command. +# + +whence() +{ + local vflag pflag fflag defarg c + local path + + vflag= aflag= pflag= fflag= + path= + if [ "$#" = "0" ] ; then + echo "whence: usage: whence [-afpv] name..." >&2 + return 2 + fi + + OPTIND=1 + while getopts "avfp" c + do + case "$c" in + a) defarg=-a ;; + f) fflag=1 ;; # no-op + p) pflag=1 ;; + v) vflag=1 ;; + ?) echo "whence: $1: unknown option" >&2 + echo "whence: usage: whence [-afpv] name..." >&2 + return 2 ;; + esac + done + + shift $(( $OPTIND - 1 )) + + if [ "$#" = "0" ] ; then + echo "whence: usage: whence [-afpv] name..." >&2 + return 2 + fi + + for cmd + do + if [ "$vflag" ] ; then + if [ -z "$defarg" ]; then + builtin type $cmd | sed 1q + else + if builtin type $defarg -t $cmd | grep 'function$' >/dev/null 2>&1; then + # HAIRY awk script to suppress + # printing of function body -- could + # do it with sed, but I don't have + # that kind of time + builtin type $defarg $cmd | awk ' +BEGIN {printit = 1;} +$1 == "'$cmd'" && $2 == "()" {printit=0; next; } +/^}$/ { if (printit == 0) printit=1 ; else print $0; next ; } +/.*/ { if (printit) print $0; }' + else + builtin type $defarg $cmd + fi + fi + else + path=$(builtin type $defarg -p $cmd) + if [ "$path" ] ; then + echo $path + else + case "$cmd" in + /*) echo "" ;; + *) case "$(builtin type -t $cmd)" in + "") echo "" ;; + *) echo "$cmd" ;; + esac + ;; + esac + fi + fi + done + return 0 +} + +# +# For real ksh homeboy fanatics, redefine the `type' builtin with a ksh +# version. +# +#type() +#{ +# whence -v "$*" +#} + +# +# ksh-like `cd': cd [-LP] [dir [change]] +# +cd() +{ + OPTIND=1 + while getopts "LP" opt + do + case $opt in + L|P) CDOPTS="$CDOPTS -$opt" ;; + *) echo "$FUNCNAME: usage: $FUNCNAME [-LP] [dir] [change]" >&2 + return 2;; + esac + done + + shift $(( $OPTIND - 1 )) + + case $# in + 0) builtin cd $CDOPTS "$HOME" ;; + 1) builtin cd $CDOPTS "$@" ;; + 2) old="$1" new="$2" + case "$PWD" in + *$old*) ;; + *) echo "${0##*/}: $FUNCNAME: bad substitution" >&2 ; return 1 ;; + esac + + dir=${PWD//$old/$new} + + builtin cd $CDOPTS "$dir" && echo "$PWD" + + ;; + *) echo "${0##*/}: $FUNCNAME: usage: $FUNCNAME [-LP] [dir] [change]" >&2 + return 2 ;; + esac +} + +# +# ksh print emulation +# +# print [-Rnprsu[n]] [-f format] [arg ...] +# +# - end of options +# -R BSD-style -- only accept -n, no escapes +# -n do not add trailing newline +# -p no-op (no coprocesses) +# -r no escapes +# -s print to the history file +# -u n redirect output to fd n +# -f format printf "$format" "$@" +# + +print() +{ + local eflag=-e + local nflag= fflag= c + local fd=1 + + OPTIND=1 + while getopts "fRnprsu:" c + do + case $c in + R) eflag= ;; + r) eflag= ;; + n) nflag=-n ;; + s) sflag=y ;; + f) fflag=y ;; + u) fd=$OPTARG ;; + p) ;; + esac + done + shift $(( $OPTIND - 1 )) + + if [ -n "$fflag" ]; then + builtin printf "$@" >&$fd + return + fi + + case "$sflag" in + y) builtin history -s "$*" ;; + *) builtin echo $eflag $nflag "$@" >&$fd + esac +} + +# substring function +# this function should be equivalent to the substring built-in which was +# eliminated after the 06/29/84 version +substring () +{ + local lpat flag str #local variables + set -f + case $1 in + -l|-L) + flag=$1 + lpat=$2 + shift 2 + ;; + esac + # test for too few or too many arguments + if [ x"$1" = x ] || [ $# -gt 2 ]; then + print -u2 'substring: bad argument count' + return 1 + fi + str=$1 + if [ x"$flag" = x-l ]; then #substring -l lpat + str=${str#$lpat} + elif [ x"$flag" = x-L ]; then + str=${str##$lpat} #substring -L lpat + fi + + if [ x"$2" != x ]; then + echo ${str%$2} + else + echo $str + fi + + return 0 +} diff --git a/bash-5.1/examples/functions/login b/bash-5.1/examples/functions/login new file mode 100644 index 0000000000000000000000000000000000000000..3d596838fb56c60a4fba5e59564ccaccbe4ef1dc --- /dev/null +++ b/bash-5.1/examples/functions/login @@ -0,0 +1,11 @@ +# replace the `login' and `newgrp' builtins in old bourne shells + +login() +{ + exec login "$@" +} + +newgrp() +{ + exec newgrp "$@" +} diff --git a/bash-5.1/examples/functions/notify.bash b/bash-5.1/examples/functions/notify.bash new file mode 100644 index 0000000000000000000000000000000000000000..ed4377ce9296c2d547430badd80fb6b873f89009 --- /dev/null +++ b/bash-5.1/examples/functions/notify.bash @@ -0,0 +1,77 @@ +# +# Chet Ramey +# +# Copyright 1992 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +trap _notify CHLD +NOTIFY_ALL=false +unset NOTIFY_LIST +unalias false + +false() +{ + return 1 +} + +_notify () +{ + local i j + local newlist= + + if $NOTIFY_ALL + then + return # let bash take care of this itself + elif [ -z "$NOTIFY_LIST" ]; then + return + else + set -- $NOTIFY_LIST + for i in "$@" + do + j=$(jobs -n %$i) + if [ -n "$j" ]; then + echo "$j" + jobs -n %$i >/dev/null + else + newlist="newlist $i" + fi + done + NOTIFY_LIST="$newlist" + fi +} + +notify () +{ + local i j + + if [ $# -eq 0 ]; then + NOTIFY_ALL=: + set -b + return + else + for i in "$@" + do + # turn a valid job spec into a job number + j=$(jobs $i) + case "$j" in + [*) j=${j%%]*} + j=${j#[} + NOTIFY_LIST="$NOTIFY_LIST $j" + ;; + esac + done + fi +} diff --git a/bash-5.1/examples/functions/seq b/bash-5.1/examples/functions/seq new file mode 100644 index 0000000000000000000000000000000000000000..c1953eec91aeff8c9b02878e8f64c6b0a8eecc89 --- /dev/null +++ b/bash-5.1/examples/functions/seq @@ -0,0 +1,48 @@ +# +# Chet Ramey +# +# Copyright 1995 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Generate a sequence from m to n, m defaults to 1. + +seq () +{ + declare -i lo hi i # makes local + local _SEQ + + case $# in + 1) seq 1 "$1" ; return $? ;; + 2) lo=$1 hi=$2 + i=$lo _SEQ="" + while let "i <= hi"; do + _SEQ="${_SEQ}$i " + let i+=1 + done + echo "${_SEQ# }" + return 0 ;; + *) echo seq: usage: seq [low] high 1>&2 ; return 2 ;; + esac +} + +# like the APL `iota' function (or at least how I remember it :-) +iota() +{ + case $# in + 1) seq 1 "$1"; return $?;; + *) echo "iota: usage: iota high" 1>&2; return 2;; + esac +} diff --git a/bash-5.1/examples/functions/seq2 b/bash-5.1/examples/functions/seq2 new file mode 100644 index 0000000000000000000000000000000000000000..4a544988d7b25da84a34bdf4dee9cc6e07fbc309 --- /dev/null +++ b/bash-5.1/examples/functions/seq2 @@ -0,0 +1,56 @@ +# +# Chet Ramey +# +# Copyright 1998 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Generate a sequence from m to n, m defaults to 1. + +seq () +{ + declare -i lo hi i # makes local + local _SEQ INIT COMPARE STEP + + case "$1" in + -r) INIT='i=$hi _SEQ=""' COMPARE='let "i >= $lo"' STEP='let i-=1' ; shift ;; + *) INIT='i=$lo _SEQ=""' COMPARE='let "i <= $hi"' STEP='let i+=1' ;; + esac + + case $# in + 1) lo=1 hi="$1" ;; + 2) lo=$1 hi=$2 ;; + *) echo seq: usage: seq [-r] [low] high 1>&2 ; return 2 ;; + esac + + # equivalent to the as-yet-unimplemented + # for (( "$INIT" ; "$COMPARE" ; "$STEP" )); do _SEQ="${_SEQ}$i "; done + eval "$INIT" + while eval "$COMPARE"; do + _SEQ="${_SEQ}$i " + eval "$STEP" + done + echo "${_SEQ# }" + return 0 +} + +# like the APL `iota' function (or at least how I remember it :-) +iota() +{ + case $# in + 1) seq 1 "$1"; return $?;; + *) echo "iota: usage: iota high" 1>&2; return 2;; + esac +} diff --git a/bash-5.1/examples/functions/shcat b/bash-5.1/examples/functions/shcat new file mode 100644 index 0000000000000000000000000000000000000000..84f0391eeab1cc36f656a3655de0c22dd2c27dc1 --- /dev/null +++ b/bash-5.1/examples/functions/shcat @@ -0,0 +1,7 @@ +shcat() +{ + while IFS= read -r line + do + echo "$line" + done +} diff --git a/bash-5.1/examples/functions/shcat2 b/bash-5.1/examples/functions/shcat2 new file mode 100644 index 0000000000000000000000000000000000000000..8ceff330b9e53d1921c1ff0b58bbddb45230c6e7 --- /dev/null +++ b/bash-5.1/examples/functions/shcat2 @@ -0,0 +1,19 @@ +shcat() +{ + while read -r + do + echo "$REPLY" + done +} + +shcat2() +{ + while [ $# -ge 1 ]; do + case "$1" in + -) shcat ;; + *) shcat < "$1" ;; + esac + shift + done + exit 0 +} diff --git a/bash-5.1/examples/functions/sort-pos-params b/bash-5.1/examples/functions/sort-pos-params new file mode 100644 index 0000000000000000000000000000000000000000..95acd85f2c69274b39c22b367fe649fd0211794a --- /dev/null +++ b/bash-5.1/examples/functions/sort-pos-params @@ -0,0 +1,69 @@ +# +# Chet Ramey +# +# Copyright 2001 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Sort the positional parameters. +# Make sure the positional parameters are passed as arguments to the function. +# If -u is the first arg, remove duplicate array members. +sort_posparams() +{ + local -a R + local u + + case "$1" in + -u) u=-u ; shift ;; + esac + + # if you want the case of no positional parameters to return success, + # remove the error message and return 0 + if [ $# -eq 0 ]; then + echo "$FUNCNAME: argument expected" >&2 + return 1 + fi + + # make R a copy of the positional parameters + R=( "${@}" ) + + # sort R. + R=( $( printf "%s\n" "${R[@]}" | sort $u) ) + + printf "%s\n" "${R[@]}" + return 0 +} + +# will print everything on separate lines +set -- 3 1 4 1 5 9 2 6 5 3 2 +sort_posparams "$@" + +# sets without preserving quoted parameters +set -- $( sort_posparams "$@" ) +echo "$@" +echo $# + +# sets preserving quoted parameters, beware pos params with embedded newlines +set -- 'a b' 'a c' 'x z' + +oifs=$IFS +IFS=$'\n' +set -- $( sort_posparams "$@" ) +IFS="$oifs" + +echo "$@" +echo $# + +sort_posparams diff --git a/bash-5.1/examples/functions/substr b/bash-5.1/examples/functions/substr new file mode 100644 index 0000000000000000000000000000000000000000..f19f5d7ec0db13afcbe5a8d1bc89d05232735eb8 --- /dev/null +++ b/bash-5.1/examples/functions/substr @@ -0,0 +1,97 @@ +# +# Chet Ramey +# +# Copyright 2002 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# substr -- a function to emulate the ancient ksh builtin +# + +# +# -l == shortest from left +# -L == longest from left +# -r == shortest from right (the default) +# -R == longest from right + +substr() +{ + local flag pat str + local usage="usage: substr -lLrR pat string or substr string pat" + + case "$1" in + -l | -L | -r | -R) + flag="$1" + pat="$2" + shift 2 + ;; + -*) + echo "substr: unknown option: $1" + echo "$usage" + return 1 + ;; + *) + flag="-r" + pat="$2" + ;; + esac + + if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then + echo "substr: bad argument count" + return 2 + fi + + str="$1" + + # + # We don't want -f, but we don't want to turn it back on if + # we didn't have it already + # + case "$-" in + "*f*") + ;; + *) + fng=1 + set -f + ;; + esac + + case "$flag" in + -l) + str="${str#$pat}" # substr -l pat string + ;; + -L) + str="${str##$pat}" # substr -L pat string + ;; + -r) + str="${str%$pat}" # substr -r pat string + ;; + -R) + str="${str%%$pat}" # substr -R pat string + ;; + *) + str="${str%$2}" # substr string pat + ;; + esac + + echo "$str" + + # + # If we had file name generation when we started, re-enable it + # + if [ "$fng" = "1" ] ; then + set +f + fi +} diff --git a/bash-5.1/examples/functions/substr2 b/bash-5.1/examples/functions/substr2 new file mode 100644 index 0000000000000000000000000000000000000000..fc21b986ba5fa1a8d80fc1be0a54ca1ec1d8ed33 --- /dev/null +++ b/bash-5.1/examples/functions/substr2 @@ -0,0 +1,99 @@ +# +# Chet Ramey +# +# Copyright 2002 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# substr -- a function to emulate the ancient ksh builtin +# + +# -l == remove shortest from left +# -L == remove longest from left +# -r == remove shortest from right (the default) +# -R == remove longest from right + +substr() +{ + local flag pat str + local usage="usage: substr -lLrR pat string or substr string pat" + local options="l:L:r:R:" + + OPTIND=1 + while getopts "$options" c + do + case "$c" in + l | L | r | R) + flag="-$c" + pat="$OPTARG" + ;; + '?') + echo "$usage" + return 1 + ;; + esac + done + + if [ "$OPTIND" -gt 1 ] ; then + shift $(( $OPTIND -1 )) + fi + + if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then + echo "substr: bad argument count" + return 2 + fi + + str="$1" + + # + # We don't want -f, but we don't want to turn it back on if + # we didn't have it already + # + case "$-" in + "*f*") + ;; + *) + fng=1 + set -f + ;; + esac + + case "$flag" in + -l) + str="${str#$pat}" # substr -l pat string + ;; + -L) + str="${str##$pat}" # substr -L pat string + ;; + -r) + str="${str%$pat}" # substr -r pat string + ;; + -R) + str="${str%%$pat}" # substr -R pat string + ;; + *) + str="${str%$2}" # substr string pat + ;; + esac + + echo "$str" + + # + # If we had file name generation when we started, re-enable it + # + if [ "$fng" = "1" ] ; then + set +f + fi +} diff --git a/bash-5.1/examples/functions/whatis b/bash-5.1/examples/functions/whatis new file mode 100644 index 0000000000000000000000000000000000000000..570c5854d0ff0a3933c5bd05edec45dea0920986 --- /dev/null +++ b/bash-5.1/examples/functions/whatis @@ -0,0 +1,71 @@ +# +# whatis -- and implementation of the 10th Edition Unix sh builtin `whatis' +# command. +# +# usage: whatis arg [...] +# +# For each argument, whatis prints the associated value as a parameter, +# builtin, function, alias, or executable file as appropriate. In each +# case, the value is printed in a form which would yield the same value +# if typed as input to the shell itself. +# +# +# Chet Ramey +# +# Copyright 1994 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +whatis() +{ + local wusage='usage: whatis arg [arg...]' + local fail=0 + + if [ $# -eq 0 ] ; then + echo "$wusage" + return 1 + fi + + for arg + do + case $(builtin type -type $arg 2>/dev/null) in + "alias") + builtin alias "$arg" + ;; + "function") + builtin type "$arg" | sed 1d + ;; + "builtin") + echo builtin "$arg" + ;; + "file") + builtin type -path "$arg" + ;; + *) + # OK, we could have a variable, or we could have nada + if [ "$(eval echo \${$arg+set})" = "set" ] ; then + # It is a variable, and it is set + echo -n "$arg=" + eval echo '\"'\$$arg'\"' + else + echo whatis: $arg: not found + fail=1 + fi + ;; + esac + done + return $fail +} diff --git a/bash-5.1/examples/functions/whence b/bash-5.1/examples/functions/whence new file mode 100644 index 0000000000000000000000000000000000000000..ba27b00d37e0599a6152eba1ba8c6d575f5d43fb --- /dev/null +++ b/bash-5.1/examples/functions/whence @@ -0,0 +1,78 @@ +# +# An almost-ksh compatible `whence' command. This is as hairy as it is +# because of the desire to exactly mimic ksh. +# +# This depends somewhat on knowing the format of the output of the bash +# `builtin type' command. +# +# Chet Ramey +# chet@ins.CWRU.Edu +# +# +# Chet Ramey +# +# Copyright 1994 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +whence() +{ + local vflag= path= + + if [ "$#" = "0" ] ; then + echo "whence: argument expected" + return 1 + fi + case "$1" in + -v) vflag=1 + shift 1 + ;; + -*) echo "whence: bad option: $1" + return 1 + ;; + *) ;; + esac + + if [ "$#" = "0" ] ; then + echo "whence: bad argument count" + return 1 + fi + + for cmd + do + if [ "$vflag" ] ; then + echo $(builtin type $cmd | sed 1q) + else + path=$(builtin type -path $cmd) + if [ "$path" ] ; then + echo $path + else + case "$cmd" in + /*) if [ -x "$cmd" ]; then + echo "$cmd" + fi + ;; + *) case "$(builtin type -type $cmd)" in + "") ;; + *) echo "$cmd" + ;; + esac + ;; + esac + fi + fi + done + return 0 +} diff --git a/bash-5.1/examples/functions/which b/bash-5.1/examples/functions/which new file mode 100644 index 0000000000000000000000000000000000000000..f0db290c836d764caf577658f98c470ab9cb6a73 --- /dev/null +++ b/bash-5.1/examples/functions/which @@ -0,0 +1,62 @@ +# +# which - emulation of `which' as it appears in FreeBSD +# +# usage: which [-as] command [command...] +# +# +# Chet Ramey +# +# Copyright 1999 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +which() +{ + local aflag sflag ES a opt + + OPTIND=1 + while builtin getopts as opt ; do + case "$opt" in + a) aflag=-a ;; + s) sflag=1 ;; + ?) echo "which: usage: which [-as] command [command ...]" >&2 + exit 2 ;; + esac + done + + (( $OPTIND > 1 )) && shift $(( $OPTIND - 1 )) + + # without command arguments, exit with status 1 + ES=1 + + # exit status is 0 if all commands are found, 1 if any are not found + for command; do + # if $command is a function, make sure we add -a so type + # will look in $PATH after finding the function + a=$aflag + case "$(builtin type -t $command)" in + "function") a=-a;; + esac + + if [ -n "$sflag" ]; then + builtin type -p $a $command >/dev/null 2>&1 + else + builtin type -p $a $command + fi + ES=$? + done + + return $ES +} diff --git a/bash-5.1/examples/loadables/Makefile.in b/bash-5.1/examples/loadables/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..7ffeef25ca42b96e30f5f8206a8ccbf9a000e598 --- /dev/null +++ b/bash-5.1/examples/loadables/Makefile.in @@ -0,0 +1,324 @@ +# +# Simple makefile for the sample loadable builtins +# +# Copyright (C) 1996-2019 Free Software Foundation, Inc. + +# 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 . +# + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +# Include some boilerplate Gnu makefile definitions. +prefix = @prefix@ + +exec_prefix = @exec_prefix@ +bindir = @bindir@ +libdir = @libdir@ +infodir = @infodir@ +includedir = @includedir@ + +datarootdir = @datarootdir@ + +loadablesdir = @loadablesdir@ +headersdir = @headersdir@ + +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +# Support an alternate destination root directory for package building +DESTDIR = + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALLMODE= -m 0755 + +@SET_MAKE@ +CC = @CC@ +RM = rm -f + +SHELL = @MAKE_SHELL@ + +host_os = @host_os@ +host_cpu = @host_cpu@ +host_vendor = @host_vendor@ + +CFLAGS = -O2 -g +LOCAL_CFLAGS = @LOCAL_CFLAGS@ +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +CPPFLAGS = @CPPFLAGS@ + +BASHINCDIR = ${topdir}/include + +SUPPORT_SRC = $(topdir)/support/ + +LIBBUILD = ${BUILD_DIR}/lib + +INTL_LIBSRC = ${topdir}/lib/intl +INTL_BUILDDIR = ${LIBBUILD}/intl +INTL_INC = @INTL_INC@ +LIBINTL_H = @LIBINTL_H@ + +CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(CFLAGS) + +# +# These values are generated for configure by ${topdir}/support/shobj-conf. +# If your system is not supported by that script, but includes facilities for +# dynamic loading of shared objects, please update the script and send the +# changes to bash-maintainers@gnu.org. +# +SHOBJ_CC = @SHOBJ_CC@ +SHOBJ_CFLAGS = @SHOBJ_CFLAGS@ +SHOBJ_LD = @SHOBJ_LD@ +SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ @LDFLAGS@ +SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ +SHOBJ_LIBS = @SHOBJ_LIBS@ +SHOBJ_STATUS = @SHOBJ_STATUS@ + +INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins -I${srcdir} \ + -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \ + -I$(BUILD_DIR)/builtins $(INTL_INC) + +.c.o: + $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< + + +ALLPROG = print truefalse sleep finfo logname basename dirname fdflags \ + tty pathchk tee head mkdir rmdir mkfifo mktemp printenv id whoami \ + uname sync push ln unlink realpath strftime mypid setpgid seq rm \ + accept csv cut +OTHERPROG = necho hello cat pushd stat asort + +all: $(SHOBJ_STATUS) + +supported: $(ALLPROG) +others: $(OTHERPROG) + +unsupported: + @echo "Your system (${host_os}) is not supported by the" + @echo "${topdir}/support/shobj-conf script." + @echo "If your operating system provides facilities for dynamic" + @echo "loading of shared objects using the dlopen(3) interface," + @echo "please update the script and re-run configure." + @echo "Please send the changes you made to bash-maintainers@gnu.org" + @echo "for inclusion in future bash releases." + +everything: supported others + +print: print.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ print.o $(SHOBJ_LIBS) + +necho: necho.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS) + +hello: hello.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ hello.o $(SHOBJ_LIBS) + +truefalse: truefalse.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ truefalse.o $(SHOBJ_LIBS) + +accept: accept.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ accept.o $(SHOBJ_LIBS) + +sleep: sleep.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sleep.o $(SHOBJ_LIBS) + +finfo: finfo.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ finfo.o $(SHOBJ_LIBS) + +cat: cat.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cat.o $(SHOBJ_LIBS) + +rm: rm.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rm.o $(SHOBJ_LIBS) + +fdflags: fdflags.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ fdflags.o $(SHOBJ_LIBS) + +seq: seq.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ seq.o $(SHOBJ_LIBS) + +logname: logname.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ logname.o $(SHOBJ_LIBS) + +basename: basename.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ basename.o $(SHOBJ_LIBS) + +dirname: dirname.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ dirname.o $(SHOBJ_LIBS) + +tty: tty.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tty.o $(SHOBJ_LIBS) + +pathchk: pathchk.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pathchk.o $(SHOBJ_LIBS) + +tee: tee.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tee.o $(SHOBJ_LIBS) + +mkdir: mkdir.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mkdir.o $(SHOBJ_LIBS) + +rmdir: rmdir.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rmdir.o $(SHOBJ_LIBS) + +mkfifo: mkfifo.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mkfifo.o $(SHOBJ_LIBS) + +mktemp: mktemp.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mktemp.o $(SHOBJ_LIBS) + +head: head.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ head.o $(SHOBJ_LIBS) + +printenv: printenv.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ printenv.o $(SHOBJ_LIBS) + +id: id.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ id.o $(SHOBJ_LIBS) + +whoami: whoami.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ whoami.o $(SHOBJ_LIBS) + +uname: uname.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ uname.o $(SHOBJ_LIBS) + +sync: sync.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sync.o $(SHOBJ_LIBS) + +push: push.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ push.o $(SHOBJ_LIBS) + +ln: ln.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ ln.o $(SHOBJ_LIBS) + +unlink: unlink.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ unlink.o $(SHOBJ_LIBS) + +realpath: realpath.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS) + +csv: csv.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ csv.o $(SHOBJ_LIBS) + +cut: cut.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS) + +strftime: strftime.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ strftime.o $(SHOBJ_LIBS) + +mypid: mypid.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mypid.o $(SHOBJ_LIBS) + +setpgid: setpgid.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ setpgid.o $(SHOBJ_LIBS) + +stat: stat.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ stat.o $(SHOBJ_LIBS) + +asort: asort.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ asort.o $(SHOBJ_LIBS) + +# pushd is a special case. We use the same source that the builtin version +# uses, with special compilation options. +# +pushd.c: ${topdir}/builtins/pushd.def + $(RM) $@ + ${BUILD_DIR}/builtins/mkbuiltins -D ${topdir}/builtins ${topdir}/builtins/pushd.def + +pushd.o: pushd.c + $(RM) $@ + $(SHOBJ_CC) -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $< + +pushd: pushd.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS) + +clean: + $(RM) $(ALLPROG) $(OTHERPROG) *.o + -( cd perl && ${MAKE} ${MFLAGS} $@ ) + +mostlyclean: clean + -( cd perl && ${MAKE} ${MFLAGS} $@ ) + +distclean maintainer-clean: clean + $(RM) Makefile Makefile.inc pushd.c + -( cd perl && ${MAKE} ${MFLAGS} $@ ) + +installdirs: + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(loadablesdir) + +install-dev: installdirs + @$(INSTALL_DATA) Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.inc + @$(INSTALL_DATA) $(srcdir)/loadables.h $(DESTDIR)$(loadablesdir)/loadables.h + @( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" install-headers) + +install-supported: all installdirs install-dev + @echo installing example loadable builtins in $(DESTDIR)${loadablesdir} + @for prog in ${ALLPROG}; do \ + echo $$prog ; \ + $(INSTALL_PROGRAM) $(INSTALLMODE) $$prog $(DESTDIR)$(loadablesdir)/$$prog ;\ + done + +uninstall-dev: + -$(RM) $(DESTDIR)$(loadablesdir)/Makefile.inc $(DESTDIR)$(loadablesdir)/loadables.h + -( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" uninstall-headers) + +uninstall-supported: uninstall-dev + -( cd $(DESTDIR)${loadablesdir} && $(RM) ${ALLPROG} ) + +install-unsupported: +uninstall-unsupported: + +install: install-$(SHOBJ_STATUS) +uninstall: uninstall-$(SHOBJ_STATUS) + +print.o: print.c +truefalse.o: truefalse.c +accept.o: accept.c +sleep.o: sleep.c +finfo.o: finfo.c +logname.o: logname.c +basename.o: basename.c +dirname.o: dirname.c +tty.o: tty.c +pathchk.o: pathchk.c +tee.o: tee.c +head.o: head.c +rmdir.o: rmdir.c +necho.o: necho.c +hello.o: hello.c +cat.o: cat.c +csv.o: csv.c +cut.o: cut.c +printenv.o: printenv.c +id.o: id.c +whoami.o: whoami.c +uname.o: uname.c +sync.o: sync.c +push.o: push.c +mkdir.o: mkdir.c +mktemp.o: mktemp.c +realpath.o: realpath.c +strftime.o: strftime.c +setpgid.o: setpgid.c +stat.o: stat.c +fdflags.o: fdflags.c +seq.o: seq.c +asort.o: asort.c diff --git a/bash-5.1/examples/loadables/Makefile.inc.in b/bash-5.1/examples/loadables/Makefile.inc.in new file mode 100644 index 0000000000000000000000000000000000000000..8b419a78de2a3fd81c02e6a3172a2ceaaa227be1 --- /dev/null +++ b/bash-5.1/examples/loadables/Makefile.inc.in @@ -0,0 +1,108 @@ +# +# Sample makefile for bash loadable builtin development +# +# Copyright (C) 2015 Free Software Foundation, Inc. + +# 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 . +# + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ + +# Include some boilerplate Gnu makefile definitions. +prefix = @prefix@ + +exec_prefix = @exec_prefix@ +bindir = @bindir@ +libdir = @libdir@ +infodir = @infodir@ +includedir = @includedir@ + +datarootdir = @datarootdir@ + +loadablesdir = @loadablesdir@ +headersdir = @headersdir@ + +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +# Support an alternate destination root directory for package building +DESTDIR = + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALLMODE= -m 0755 + +@SET_MAKE@ +CC = @CC@ +RM = rm -f + +SHELL = @MAKE_SHELL@ + +host_os = @host_os@ +host_cpu = @host_cpu@ +host_vendor = @host_vendor@ + +CFLAGS = @CFLAGS@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +CPPFLAGS = @CPPFLAGS@ + +BASHINCDIR = ${topdir}/include + +SUPPORT_SRC = $(topdir)/support/ + +LIBBUILD = ${BUILD_DIR}/lib + +INTL_LIBSRC = ${topdir}/lib/intl +INTL_BUILDDIR = ${LIBBUILD}/intl +INTL_INC = @INTL_INC@ +LIBINTL_H = @LIBINTL_H@ + +CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS) + +# +# These values are generated for configure by ${topdir}/support/shobj-conf. +# If your system is not supported by that script, but includes facilities for +# dynamic loading of shared objects, please update the script and send the +# changes to bash-maintainers@gnu.org. +# +SHOBJ_CC = @SHOBJ_CC@ +SHOBJ_CFLAGS = @SHOBJ_CFLAGS@ +SHOBJ_LD = @SHOBJ_LD@ +SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ @LDFLAGS@ +SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ +SHOBJ_LIBS = @SHOBJ_LIBS@ +SHOBJ_STATUS = @SHOBJ_STATUS@ + +INC = -I$(headersdir) -I$(headersdir)/include -I$(headersdir)/builtins + +.c.o: + $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< + +all: example + +example: example.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS) + +example.o: example.c diff --git a/bash-5.1/examples/loadables/README b/bash-5.1/examples/loadables/README new file mode 100644 index 0000000000000000000000000000000000000000..6820c9604272748a5e3152fc6ddcdbf227f66837 --- /dev/null +++ b/bash-5.1/examples/loadables/README @@ -0,0 +1,76 @@ +Some examples of ready-to-dynamic-load builtins. Most of the +examples given are reimplementations of standard commands whose +execution time is dominated by process startup time. The +exceptions are sleep, which allows you to sleep for fractions +of a second, finfo, which provides access to the rest of the +elements of the `stat' structure that `test' doesn't let you +see, and pushd/popd/dirs, which allows you to compile them out +of the shell. + +All of the new builtins in ksh93 that bash didn't already have +are included here, as is the ksh `print' builtin. + +The configure script in the top-level source directory uses the +support/shobj-conf script to set the right values in the Makefile, +so you should not need to change the Makefile. If your system +is not supported by support/shobj-conf, and it has the necessary +facilities for building shared objects and support for the +dlopen/dlsyn/dlclose/dlerror family of functions, please make +the necessary changes to support/shobj-conf and send the changes +to bash-maintainers@gnu.org. + +Loadable builtins are loaded into a running shell with + + enable -f filename builtin-name + +enable uses a simple reference-counting scheme to avoid unloading a +shared object that implements more than one loadable builtin before +all loadable builtins implemented in the object are removed. + +Many of the details needed by builtin writers are found in hello.c, +the canonical example. There is no real `builtin writers' programming +guide'. The file template.c provides a template to use for creating +new loadable builtins. + +The file "Makefile.inc" is created using the same values that configure +writes into Makefile.in, and is installed in the same directory as the +rest of the example builtins. It's intended to be a start at something +that can be modified or included to help you build your own loadables +without having to search for the right CFLAGS and LDFLAGS. + +basename.c Return non-directory portion of pathname. +cat.c cat(1) replacement with no options - the way cat was intended. +dirname.c Return directory portion of pathname. +fdflags.c Change the flag associated with one of bash's open file descriptors. +finfo.c Print file info. +head.c Copy first part of files. +hello.c Obligatory "Hello World" / sample loadable. +id.c POSIX.2 user identity. +ln.c Make links. +loadables.h File loadable builtins can include for shell definitions. +logname.c Print login name of current user. +Makefile.in Simple makefile for the sample loadable builtins. +Makefile.inc.in Sample makefile to use for loadable builtin development. +mkdir.c Make directories. +mypid.c Add $MYPID variable, demonstrate use of unload hook functio.n +necho.c echo without options or argument interpretation. +pathchk.c Check pathnames for validity and portability. +print.c Loadable ksh-93 style print builtin. +printenv.c Minimal builtin clone of BSD printenv(1). +push.c Anyone remember TOPS-20? +realpath.c Canonicalize pathnames, resolving symlinks. +rm.c Remove files and directories. +rmdir.c Remove directory. +seq.c Print a sequence of decimal or floating point numbers. +setpgid.c Set a process's pgrp; example of how to wrap a system call. +sleep.c sleep for fractions of a second. +stat.c populate an associative array with information about a file +strftime.c Loadable builtin interface to strftime(3). +sync.c Sync the disks by forcing pending filesystem writes to complete. +tee.c Duplicate standard input. +template.c Example template for loadable builtin. +truefalse.c True and false builtins. +tty.c Return terminal name. +uname.c Print system information. +unlink.c Remove a directory entry. +whoami.c Print out username of current user. diff --git a/bash-5.1/examples/loadables/accept.c b/bash-5.1/examples/loadables/accept.c new file mode 100644 index 0000000000000000000000000000000000000000..54cf38c8ab4b409d8778dd86b6c24e208b9623ee --- /dev/null +++ b/bash-5.1/examples/loadables/accept.c @@ -0,0 +1,234 @@ +/* accept - listen for and accept a remote network connection on a given port */ + +/* + Copyright (C) 2020 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include +#include "bashtypes.h" +#include +#include +#include "typemax.h" + +#include +#include +#include + +#include "loadables.h" + +static int accept_bind_variable (char *, int); + +int +accept_builtin (list) + WORD_LIST *list; +{ + WORD_LIST *l; + SHELL_VAR *v; + intmax_t iport; + int opt; + char *tmoutarg, *fdvar, *rhostvar, *rhost; + unsigned short uport; + int servsock, clisock; + struct sockaddr_in server, client; + socklen_t clientlen; + struct timeval timeval; + struct linger linger = { 0, 0 }; + + rhostvar = tmoutarg = fdvar = rhost = (char *)NULL; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "r:t:v:")) != -1) + { + switch (opt) + { + case 'r': + rhostvar = list_optarg; + break; + case 't': + tmoutarg = list_optarg; + break; + case 'v': + fdvar = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + /* Validate input and variables */ + if (tmoutarg) + { + long ival, uval; + opt = uconvert (tmoutarg, &ival, &uval, (char **)0); + if (opt == 0 || ival < 0 || uval < 0) + { + builtin_error ("%s: invalid timeout specification", tmoutarg); + return (EXECUTION_FAILURE); + } + timeval.tv_sec = ival; + timeval.tv_usec = uval; + /* XXX - should we warn if ival == uval == 0 ? */ + } + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + if (legal_number (list->word->word, &iport) == 0 || iport < 0 || iport > TYPE_MAXIMUM (unsigned short)) + { + builtin_error ("%s: invalid port number", list->word->word); + return (EXECUTION_FAILURE); + } + uport = (unsigned short)iport; + + if (fdvar == 0) + fdvar = "ACCEPT_FD"; + + unbind_variable (fdvar); + if (rhostvar) + unbind_variable (rhostvar); + + if ((servsock = socket (AF_INET, SOCK_STREAM, IPPROTO_IP)) < 0) + { + builtin_error ("cannot create socket: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + + memset ((char *)&server, 0, sizeof (server)); + server.sin_family = AF_INET; + server.sin_port = htons(uport); + server.sin_addr.s_addr = htonl(INADDR_ANY); + + if (bind (servsock, (struct sockaddr *)&server, sizeof (server)) < 0) + { + builtin_error ("socket bind failure: %s", strerror (errno)); + close (servsock); + return (EXECUTION_FAILURE); + } + + opt = 1; + setsockopt (servsock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof (opt)); + setsockopt (servsock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof (linger)); + + if (listen (servsock, 1) < 0) + { + builtin_error ("listen failure: %s", strerror (errno)); + close (servsock); + return (EXECUTION_FAILURE); + } + + if (tmoutarg) + { + fd_set iofds; + + FD_ZERO(&iofds); + FD_SET(servsock, &iofds); + + opt = select (servsock+1, &iofds, 0, 0, &timeval); + if (opt < 0) + builtin_error ("select failure: %s", strerror (errno)); + if (opt <= 0) + { + close (servsock); + return (EXECUTION_FAILURE); + } + } + + clientlen = sizeof (client); + if ((clisock = accept (servsock, (struct sockaddr *)&client, &clientlen)) < 0) + { + builtin_error ("client accept failure: %s", strerror (errno)); + close (servsock); + return (EXECUTION_FAILURE); + } + + close (servsock); + + accept_bind_variable (fdvar, clisock); + if (rhostvar) + { + rhost = inet_ntoa (client.sin_addr); + v = builtin_bind_variable (rhostvar, rhost, 0); + if (v == 0 || readonly_p (v) || noassign_p (v)) + builtin_error ("%s: cannot set variable", rhostvar); + } + + return (EXECUTION_SUCCESS); +} + +static int +accept_bind_variable (varname, intval) + char *varname; + int intval; +{ + SHELL_VAR *v; + char ibuf[INT_STRLEN_BOUND (int) + 1], *p; + + p = fmtulong (intval, 10, ibuf, sizeof (ibuf), 0); + v = builtin_bind_variable (varname, p, 0); + if (v == 0 || readonly_p (v) || noassign_p (v)) + builtin_error ("%s: cannot set variable", varname); + return (v != 0); +} + +char *accept_doc[] = { + "Accept a network connection on a specified port.", + "" + "This builtin allows a bash script to act as a TCP/IP server.", + "", + "Options, if supplied, have the following meanings:", + " -t timeout wait TIMEOUT seconds for a connection. TIMEOUT may", + " be a decimal number including a fractional portion", + " -v varname store the numeric file descriptor of the connected", + " socket into VARNAME. The default VARNAME is ACCEPT_FD", + " -r rhost store the IP address of the remote host into the shell", + " variable RHOST, in dotted-decimal notation", + "", + "If successful, the shell variable ACCEPT_FD, or the variable named by the", + "-v option, will be set to the fd of the connected socket, suitable for", + "use as 'read -u$ACCEPT_FD'. RHOST, if supplied, will hold the IP address", + "of the remote client. The return status is 0.", + "", + "On failure, the return status is 1 and ACCEPT_FD (or VARNAME) and RHOST,", + "if supplied, will be unset.", + "", + "The server socket fd will be closed before accept returns.", + (char *) NULL +}; + +struct builtin accept_struct = { + "accept", /* builtin name */ + accept_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + accept_doc, /* array of long documentation strings. */ + "accept [-t timeout] [-v varname] [-r addrvar ] port", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/asort.c b/bash-5.1/examples/loadables/asort.c new file mode 100644 index 0000000000000000000000000000000000000000..e847ef8680c3c1fee0eedfb25a547d697cc5d40e --- /dev/null +++ b/bash-5.1/examples/loadables/asort.c @@ -0,0 +1,279 @@ +/* + Copyright (C) 2020 Free Software Foundation, Inc. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ +#include +#include +#include + +#include "bashtypes.h" +#include "shell.h" +#include "builtins.h" +#include "common.h" +#include "xmalloc.h" +#include "bashgetopt.h" + +typedef struct sort_element { + ARRAY_ELEMENT *v; // used when sorting array in-place + char *key; // used when sorting assoc array + char *value; // points to value of array element or assoc entry + double num; // used for numeric sort +} sort_element; + +static int reverse_flag; +static int numeric_flag; + +static int +compare(const void *p1, const void *p2) { + const sort_element e1 = *(sort_element *) p1; + const sort_element e2 = *(sort_element *) p2; + + if (numeric_flag) { + if (reverse_flag) + return (e2.num > e1.num) ? 1 : (e2.num < e1.num) ? -1 : 0; + else + return (e1.num > e2.num) ? 1 : (e1.num < e2.num) ? -1 : 0; + } + else { + if (reverse_flag) + return strcoll(e2.value, e1.value); + else + return strcoll(e1.value, e2.value); + } +} + +static int +sort_index(SHELL_VAR *dest, SHELL_VAR *source) { + HASH_TABLE *hash; + BUCKET_CONTENTS *bucket; + sort_element *sa; + ARRAY *array, *dest_array; + ARRAY_ELEMENT *ae; + size_t i, j, n; + char ibuf[INT_STRLEN_BOUND (intmax_t) + 1]; // used by fmtulong + char *key; + + dest_array = array_cell(dest); + + if (assoc_p(source)) { + hash = assoc_cell(source); + n = hash->nentries; + sa = xmalloc(n * sizeof(sort_element)); + i = 0; + for ( j = 0; j < hash->nbuckets; ++j ) { + bucket = hash->bucket_array[j]; + while ( bucket ) { + sa[i].v = NULL; + sa[i].key = bucket->key; + if ( numeric_flag ) + sa[i].num = strtod(bucket->data, NULL); + else + sa[i].value = bucket->data; + i++; + bucket = bucket->next; + } + } + } + else { + array = array_cell(source); + n = array_num_elements(array); + sa = xmalloc(n * sizeof(sort_element)); + i = 0; + + for (ae = element_forw(array->head); ae != array->head; ae = element_forw(ae)) { + sa[i].v = ae; + if (numeric_flag) + sa[i].num = strtod(element_value(ae), NULL); + else + sa[i].value = element_value(ae); + i++; + } + } + + // sanity check + if ( i != n ) { + builtin_error("%s: corrupt array", source->name); + return EXECUTION_FAILURE; + } + + qsort(sa, n, sizeof(sort_element), compare); + + array_flush(dest_array); + + for ( i = 0; i < n; ++i ) { + if ( assoc_p(source) ) + key = sa[i].key; + else + key = fmtulong((long unsigned)sa[i].v->ind, 10, ibuf, sizeof(ibuf), 0); + + array_insert(dest_array, i, key); + } + + return EXECUTION_SUCCESS; +} + +static int +sort_inplace(SHELL_VAR *var) { + size_t i, n; + ARRAY *a; + ARRAY_ELEMENT *ae; + sort_element *sa = 0; + + a = array_cell(var); + n = array_num_elements(a); + + if ( n == 0 ) + return EXECUTION_SUCCESS; + + sa = xmalloc(n * sizeof(sort_element)); + + i = 0; + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + sa[i].v = ae; + if (numeric_flag) + sa[i].num = strtod(element_value(ae), NULL); + else + sa[i].value = element_value(ae); + i++; + } + + // sanity check + if ( i != n ) { + builtin_error("%s: corrupt array", var->name); + return EXECUTION_FAILURE; + } + + qsort(sa, n, sizeof(sort_element), compare); + + // for in-place sort, simply "rewire" the array elements + sa[0].v->prev = sa[n-1].v->next = a->head; + a->head->next = sa[0].v; + a->head->prev = sa[n-1].v; + a->max_index = n - 1; + for (i = 0; i < n; i++) { + sa[i].v->ind = i; + if (i > 0) + sa[i].v->prev = sa[i-1].v; + if (i < n - 1) + sa[i].v->next = sa[i+1].v; + } + xfree(sa); + return EXECUTION_SUCCESS; +} + +int +asort_builtin(WORD_LIST *list) { + SHELL_VAR *var, *var2; + char *word; + int opt, ret; + int index_flag = 0; + + numeric_flag = 0; + reverse_flag = 0; + + reset_internal_getopt(); + while ((opt = internal_getopt(list, "inr")) != -1) { + switch (opt) { + case 'i': index_flag = 1; break; + case 'n': numeric_flag = 1; break; + case 'r': reverse_flag = 1; break; + CASE_HELPOPT; + default: + builtin_usage(); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) { + builtin_usage(); + return EX_USAGE; + } + + if (legal_identifier (list->word->word) == 0) { + sh_invalidid (list->word->word); + return EXECUTION_FAILURE; + } + + if ( index_flag ) { + if ( list->next == 0 || list->next->next ) { + builtin_usage(); + return EX_USAGE; + } + if (legal_identifier (list->next->word->word) == 0) { + sh_invalidid (list->next->word->word); + return EXECUTION_FAILURE; + } + var = find_or_make_array_variable(list->word->word, 1); + if (var == 0) + return EXECUTION_FAILURE; + var2 = find_variable(list->next->word->word); + if ( !var2 || ( !array_p(var2) && !assoc_p(var2) ) ) { + builtin_error("%s: Not an array", list->next->word->word); + return EXECUTION_FAILURE; + } + return sort_index(var, var2); + } + + while (list) { + word = list->word->word; + var = find_variable(word); + list = list->next; + + if (var == 0 || array_p(var) == 0) { + builtin_error("%s: Not an array", word); + continue; + } + if (readonly_p(var) || noassign_p(var)) { + if (readonly_p(var)) + err_readonly(word); + continue; + } + + if ( (ret = sort_inplace(var)) != EXECUTION_SUCCESS ) + return ret; + } + return EXECUTION_SUCCESS; + +} + +char *asort_doc[] = { + "Sort arrays in-place.", + "", + "Options:", + " -n compare according to string numerical value", + " -r reverse the result of comparisons", + " -i sort using indices/keys", + "", + "If -i is supplied, SOURCE is not sorted in-place, but the indices (or keys", + "if associative) of SOURCE, after sorting it by its values, are placed as", + "values in the indexed array DEST", + "", + "Associative arrays may not be sorted in-place.", + "", + "Exit status:", + "Return value is zero unless an error happened (like invalid variable name", + "or readonly array).", + (char *)NULL +}; + +struct builtin asort_struct = { + "asort", + asort_builtin, + BUILTIN_ENABLED, + asort_doc, + "asort [-nr] array ... or asort [-nr] -i dest source", + 0 +}; diff --git a/bash-5.1/examples/loadables/basename.c b/bash-5.1/examples/loadables/basename.c new file mode 100644 index 0000000000000000000000000000000000000000..29dd1a6db68ef833fabf68a04227861de5b93bf4 --- /dev/null +++ b/bash-5.1/examples/loadables/basename.c @@ -0,0 +1,131 @@ +/* basename - return nondirectory portion of pathname */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include "builtins.h" +#include "shell.h" +#include "common.h" +#include "bashgetopt.h" + +int +basename_builtin (list) + WORD_LIST *list; +{ + int slen, sufflen, off; + char *string, *suffix, *fn; + + if (no_options (list)) + return (EX_USAGE); + list = loptend; + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + string = list->word->word; + suffix = (char *)NULL; + if (list->next) + { + list = list->next; + suffix = list->word->word; + } + + if (list->next) + { + builtin_usage (); + return (EX_USAGE); + } + + slen = strlen (string); + + /* Strip trailing slashes */ + while (slen > 0 && string[slen - 1] == '/') + slen--; + + /* (2) If string consists entirely of slash characters, string shall be + set to a single slash character. In this case, skip steps (3) + through (5). */ + if (slen == 0) + { + fputs ("/\n", stdout); + return (EXECUTION_SUCCESS); + } + + /* (3) If there are any trailing slash characters in string, they + shall be removed. */ + string[slen] = '\0'; + + /* (4) If there are any slash characters remaining in string, the prefix + of string up to an including the last slash character in string + shall be removed. */ + while (--slen >= 0) + if (string[slen] == '/') + break; + + fn = string + slen + 1; + + /* (5) If the suffix operand is present, is not identical to the + characters remaining in string, and is identical to a suffix + of the characters remaining in string, the suffix suffix + shall be removed from string. Otherwise, string shall not be + modified by this step. */ + if (suffix) + { + sufflen = strlen (suffix); + slen = strlen (fn); + if (sufflen < slen) + { + off = slen - sufflen; + if (strcmp (fn + off, suffix) == 0) + fn[off] = '\0'; + } + } + printf ("%s\n", fn); + return (EXECUTION_SUCCESS); +} + +char *basename_doc[] = { + "Return non-directory portion of pathname.", + "", + "The STRING is converted to a filename corresponding to the last", + "pathname component in STRING. If the suffix string SUFFIX is", + "supplied, it is removed.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. */ +struct builtin basename_struct = { + "basename", /* builtin name */ + basename_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + basename_doc, /* array of long documentation strings. */ + "basename string [suffix]", /* usage synopsis */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/cat.c b/bash-5.1/examples/loadables/cat.c new file mode 100644 index 0000000000000000000000000000000000000000..be99c4cd997ae09ac115da6b38cf49ed1da808ba --- /dev/null +++ b/bash-5.1/examples/loadables/cat.c @@ -0,0 +1,122 @@ +/* + * cat replacement + * + * no options - the way cat was intended + */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include + +#include "builtins.h" +#include "shell.h" + +#ifndef errno +extern int errno; +#endif + +extern char *strerror (); +extern char **make_builtin_argv (); + +static int +fcopy(fd) +int fd; +{ + char buf[1024], *s; + int n, w, e; + + while (n = read(fd, buf, sizeof (buf))) { + w = write(1, buf, n); + if (w != n) { + e = errno; + write(2, "cat: write error: ", 18); + s = strerror(e); + write(2, s, strlen(s)); + write(2, "\n", 1); + return 1; + } + } + return 0; +} + +int +cat_main (argc, argv) +int argc; +char **argv; +{ + int i, fd, r; + char *s; + + if (argc == 1) + return (fcopy(0)); + + for (i = r = 1; i < argc; i++) { + if (argv[i][0] == '-' && argv[i][1] == '\0') + fd = 0; + else { + fd = open(argv[i], O_RDONLY, 0666); + if (fd < 0) { + s = strerror(errno); + write(2, "cat: cannot open ", 17); + write(2, argv[i], strlen(argv[i])); + write(2, ": ", 2); + write(2, s, strlen(s)); + write(2, "\n", 1); + continue; + } + } + r = fcopy(fd); + if (fd != 0) + close(fd); + } + return (r); +} + +int +cat_builtin(list) +WORD_LIST *list; +{ + char **v; + int c, r; + + v = make_builtin_argv(list, &c); + r = cat_main(c, v); + free(v); + + return r; +} + +char *cat_doc[] = { + "Display files.", + "", + "Read each FILE and display it on the standard output. If any", + "FILE is `-' or if no FILE argument is given, the standard input", + "is read.", + (char *)0 +}; + +struct builtin cat_struct = { + "cat", + cat_builtin, + BUILTIN_ENABLED, + cat_doc, + "cat [-] [file ...]", + 0 +}; diff --git a/bash-5.1/examples/loadables/csv.c b/bash-5.1/examples/loadables/csv.c new file mode 100644 index 0000000000000000000000000000000000000000..11228f1ab30daa8ea7d83d6aa85991079aa99249 --- /dev/null +++ b/bash-5.1/examples/loadables/csv.c @@ -0,0 +1,206 @@ +/* csv - process a line of csv data and populate an indexed array with the + fields */ + +/* + Copyright (C) 2020 Free Software Foundation, Inc. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* See Makefile for compilation details. */ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "bashansi.h" +#include + +#include "loadables.h" + +#define CSV_ARRAY_DEFAULT "CSV" + +#define NQUOTE 0 +#define DQUOTE 1 + +/* Split LINE into comma-separated fields, storing each field into a separate + element of array variable CSV, starting at index 0. The format of LINE is + as described in RFC 4180. */ +static int +csvsplit (csv, line) + SHELL_VAR *csv; + char *line; +{ + arrayind_t ind; + char *field, *prev, *buf, *xbuf; + int delim, qstate; + int b, rval; + + xbuf = 0; + ind = 0; + field = prev = line; + + do + { + if (*prev == '"') + { + if (xbuf == 0) + xbuf = xmalloc (strlen (prev) + 1); + buf = xbuf; + b = 0; + qstate = DQUOTE; + for (field = ++prev; *field; field++) + { + if (qstate == DQUOTE && *field == '"' && field[1] == '"') + buf[b++] = *field++; /* skip double quote */ + else if (qstate == DQUOTE && *field == '"') + qstate = NQUOTE; + else if (qstate == NQUOTE && *field == ',') + break; + else + /* This copies any text between a closing double quote and the + delimiter. If you want to change that, make sure to do the + copy only if qstate == DQUOTE. */ + buf[b++] = *field; + } + buf[b] = '\0'; + } + else + { + buf = prev; + field = prev + strcspn (prev, ","); + } + + delim = *field; + *field = '\0'; + + bind_array_element (csv, ind, buf, 0); + ind++; + + *field = delim; + + if (delim == ',') + prev = field + 1; + } + while (delim == ','); + + if (xbuf) + free (xbuf); + + return (rval = ind); /* number of fields */ +} + +int +csv_builtin (list) + WORD_LIST *list; +{ + int opt, rval; + char *array_name, *csvstring; + SHELL_VAR *v; + + array_name = 0; + rval = EXECUTION_SUCCESS; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "a:")) != -1) + { + switch (opt) + { + case 'a': + array_name = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (array_name == 0) + array_name = CSV_ARRAY_DEFAULT; + + if (legal_identifier (array_name) == 0) + { + sh_invalidid (array_name); + return (EXECUTION_FAILURE); + } + + if (list == 0) + { + builtin_error ("csv string argument required"); + return (EX_USAGE); + } + + v = find_or_make_array_variable (array_name, 1); + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + if (v && readonly_p (v)) + err_readonly (array_name); + return (EXECUTION_FAILURE); + } + else if (array_p (v) == 0) + { + builtin_error ("%s: not an indexed array", array_name); + return (EXECUTION_FAILURE); + } + if (invisible_p (v)) + VUNSETATTR (v, att_invisible); + array_flush (array_cell (v)); + + csvstring = list->word->word; + + if (csvstring == 0 || *csvstring == 0) + return (EXECUTION_SUCCESS); + + opt = csvsplit (v, csvstring); + /* Maybe do something with OPT here, it's the number of fields */ + + return (rval); +} + +/* Called when builtin is enabled and loaded from the shared object. If this + function returns 0, the load fails. */ +int +csv_builtin_load (name) + char *name; +{ + return (1); +} + +/* Called when builtin is disabled. */ +void +csv_builtin_unload (name) + char *name; +{ +} + +char *csv_doc[] = { + "Read comma-separated fields from a string.", + "", + "Parse STRING, a line of comma-separated values, into individual fields,", + "and store them into the indexed array ARRAYNAME starting at index 0.", + "If ARRAYNAME is not supplied, \"CSV\" is the default array name.", + (char *)NULL +}; + +struct builtin csv_struct = { + "csv", /* builtin name */ + csv_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + csv_doc, /* array of long documentation strings. */ + "csv [-a ARRAY] string", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/cut.c b/bash-5.1/examples/loadables/cut.c new file mode 100644 index 0000000000000000000000000000000000000000..ad9a83357a266d1d4eb27092756b95545b3dc4ef --- /dev/null +++ b/bash-5.1/examples/loadables/cut.c @@ -0,0 +1,625 @@ +/* cut,lcut - extract specified fields from a line and assign them to an array + or print them to the standard output */ + +/* + Copyright (C) 2020 Free Software Foundation, Inc. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* See Makefile for compilation details. */ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "bashansi.h" +#include +#include +#include + +#include "loadables.h" +#include "shmbutil.h" + +#define CUT_ARRAY_DEFAULT "CUTFIELDS" + +#define NOPOS -2 /* sentinel for unset startpos/endpos */ + +#define BOL 0 +#define EOL INT_MAX +#define NORANGE -1 /* just a position, no range */ + +#define BFLAG (1 << 0) +#define CFLAG (1 << 1) +#define DFLAG (1 << 2) +#define FFLAG (1 << 3) +#define SFLAG (1 << 4) + +struct cutpos +{ + int startpos, endpos; /* zero-based, correction done in getlist() */ +}; + +struct cutop +{ + int flags; + int delim; + int npos; + struct cutpos *poslist; +}; + +static int +poscmp (a, b) + void *a, *b; +{ + struct cutpos *p1, *p2; + + p1 = (struct cutpos *)a; + p2 = (struct cutpos *)b; + return (p1->startpos - p2->startpos); +} + +static int +getlist (arg, opp) + char *arg; + struct cutpos **opp; +{ + char *ntok, *ltok, *larg; + int s, e; + intmax_t num; + struct cutpos *poslist; + int npos, nsize; + + poslist = 0; + nsize = npos = 0; + s = e = 0; + larg = arg; + while (ltok = strsep (&larg, ",")) + { + if (*ltok == 0) + continue; + + ntok = strsep (<ok, "-"); + if (*ntok == 0) + s = BOL; + else + { + if (legal_number (ntok, &num) == 0 || (int)num != num || num <= 0) + { + builtin_error ("%s: invalid list value", ntok); + *opp = poslist; + return -1; + } + s = num; + s--; /* fields are 1-based */ + } + if (ltok == 0) + e = NORANGE; + else if (*ltok == 0) + e = EOL; + else + { + if (legal_number (ltok, &num) == 0 || (int)num != num || num <= 0) + { + builtin_error ("%s: invalid list value", ltok); + *opp = poslist; + return -1; + } + e = num; + e--; + if (e == s) + e = NORANGE; + } + + if (npos == nsize) + { + nsize += 4; + poslist = (struct cutpos *)xrealloc (poslist, nsize * sizeof (struct cutpos)); + } + poslist[npos].startpos = s; + poslist[npos].endpos = e; + npos++; + } + if (npos == 0) + { + builtin_error ("missing list of positions"); + *opp = poslist; + return -1; + } + + qsort (poslist, npos, sizeof(poslist[0]), poscmp); + *opp = poslist; + + return npos; +} + +static int +cutbytes (v, line, ops) + SHELL_VAR *v; + char *line; + struct cutop *ops; +{ + arrayind_t ind; + char *buf, *bmap; + size_t llen; + int i, b, n, s, e; + + llen = strlen (line); + buf = xmalloc (llen + 1); + bmap = xmalloc (llen + 1); + memset (bmap, 0, llen); + + for (n = 0; n < ops->npos; n++) + { + s = ops->poslist[n].startpos; /* no translation needed yet */ + e = ops->poslist[n].endpos; + if (e == NORANGE) + e = s; + else if (e == EOL || e >= llen) + e = llen - 1; + /* even if a column is specified multiple times, it will only be printed + once */ + for (i = s; i <= e; i++) + bmap[i] = 1; + } + + b = 0; + for (i = 0; i < llen; i++) + if (bmap[i]) + buf[b++] = line[i]; + buf[b] = 0; + + if (v) + { + ind = 0; + bind_array_element (v, ind, buf, 0); + ind++; + } + else + printf ("%s\n", buf); + + free (buf); + free (bmap); + + return ind; +} + +static int +cutchars (v, line, ops) + SHELL_VAR *v; + char *line; + struct cutop *ops; +{ + arrayind_t ind; + char *buf, *bmap; + wchar_t *wbuf, *wb2; + size_t llen, wlen; + int i, b, n, s, e; + + if (MB_CUR_MAX == 1) + return (cutbytes (v, line, ops)); + if (locale_utf8locale && utf8_mbsmbchar (line) == 0) + return (cutbytes (v, line, ops)); + + llen = strlen (line); + wbuf = (wchar_t *)xmalloc ((llen + 1) * sizeof (wchar_t)); + + wlen = mbstowcs (wbuf, line, llen); + if (MB_INVALIDCH (wlen)) + { + free (wbuf); + return (cutbytes (v, line, ops)); + } + + bmap = xmalloc (llen + 1); + memset (bmap, 0, llen); + + for (n = 0; n < ops->npos; n++) + { + s = ops->poslist[n].startpos; /* no translation needed yet */ + e = ops->poslist[n].endpos; + if (e == NORANGE) + e = s; + else if (e == EOL || e >= wlen) + e = wlen - 1; + /* even if a column is specified multiple times, it will only be printed + once */ + for (i = s; i <= e; i++) + bmap[i] = 1; + } + + wb2 = (wchar_t *)xmalloc ((wlen + 1) * sizeof (wchar_t)); + b = 0; + for (i = 0; i < wlen; i++) + if (bmap[i]) + wb2[b++] = wbuf[i]; + wb2[b] = 0; + + free (wbuf); + + buf = bmap; + n = wcstombs (buf, wb2, llen); + + if (v) + { + ind = 0; + bind_array_element (v, ind, buf, 0); + ind++; + } + else + printf ("%s\n", buf); + + free (buf); + free (wb2); + + return ind; +} + +/* The basic strategy is to cut the line into fields using strsep, populate + an array of fields from 0..nf, then select those fields using the same + bitmap approach as cut{bytes,chars} and assign them to the array variable + V or print them on stdout. This function obeys SFLAG. */ +static int +cutfields (v, line, ops) + SHELL_VAR *v; + char *line; + struct cutop *ops; +{ + arrayind_t ind; + char *buf, *bmap, *field, **fields, delim[2]; + size_t llen, fsize; + int i, b, n, s, e, nf; + + ind = 0; + + delim[0] = ops->delim; + delim[1] = '\0'; + + fields = 0; + nf = 0; + fsize = 0; + + field = buf = line; + do + { + field = strsep (&buf, delim); /* destructive */ + if (nf == fsize) + { + fsize += 8; + fields = xrealloc (fields, fsize * sizeof (char *)); + } + fields[nf] = field; + if (field) + nf++; + } + while (field); + + if (nf == 1) + { + free (fields); + if (ops->flags & SFLAG) + return ind; + if (v) + { + bind_array_element (v, ind, line, 0); + ind++; + } + else + printf ("%s\n", line); + return ind; + } + + bmap = xmalloc (nf + 1); + memset (bmap, 0, nf); + + for (n = 0; n < ops->npos; n++) + { + s = ops->poslist[n].startpos; /* no translation needed yet */ + e = ops->poslist[n].endpos; + if (e == NORANGE) + e = s; + else if (e == EOL || e >= nf) + e = nf - 1; + /* even if a column is specified multiple times, it will only be printed + once */ + for (i = s; i <= e; i++) + bmap[i] = 1; + } + + for (i = 1, b = 0; b < nf; b++) + { + if (bmap[b] == 0) + continue; + if (v) + { + bind_array_element (v, ind, fields[b], 0); + ind++; + } + else + { + if (i == 0) + putchar (ops->delim); + printf ("%s", fields[b]); + } + i = 0; + } + if (v == 0) + putchar ('\n'); + + return nf; +} + +static int +cutline (v, line, ops) + SHELL_VAR *v; + char *line; + struct cutop *ops; +{ + int rval; + + if (ops->flags & BFLAG) + rval = cutbytes (v, line, ops); + else if (ops->flags & CFLAG) + rval = cutchars (v, line, ops); + else + rval = cutfields (v, line, ops); + + return (rval >= 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +} + +static int +cutfile (v, list, ops) + SHELL_VAR *v; + WORD_LIST *list; + struct cutop *ops; +{ + int fd, unbuffered_read; + char *line, *b; + size_t llen; + WORD_LIST *l; + ssize_t n; + + line = 0; + llen = 0; + + l = list; + do + { + /* for each file */ + if (l == 0 || (l->word->word[0] == '-' && l->word->word[1] == '\0')) + fd = 0; + else + fd = open (l->word->word, O_RDONLY); + if (fd < 0) + { + file_error (l->word->word); + return (EXECUTION_FAILURE); + } + +#ifndef __CYGWIN__ + unbuffered_read = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); +#else + unbuffered_read = 1; +#endif + + while ((n = zgetline (fd, &line, &llen, '\n', unbuffered_read)) != -1) + cutline (v, line, ops); /* can modify line */ + if (fd > 0) + close (fd); + + if (l) + l = l->next; + } + while (l); + + free (line); + return EXECUTION_SUCCESS; +} + +#define OPTSET(x) ((cutflags & (x)) ? 1 : 0) + +static int +cut_internal (which, list) + int which; /* not used yet */ + WORD_LIST *list; +{ + int opt, rval, cutflags, delim, npos; + char *array_name, *cutstring, *list_arg; + SHELL_VAR *v; + struct cutop op; + struct cutpos *poslist; + + v = 0; + rval = EXECUTION_SUCCESS; + + cutflags = 0; + array_name = 0; + list_arg = 0; + delim = '\t'; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "a:b:c:d:f:sn")) != -1) + { + switch (opt) + { + case 'a': + array_name = list_optarg; + break; + case 'b': + cutflags |= BFLAG; + list_arg = list_optarg; + break; + case 'c': + cutflags |= CFLAG; + list_arg = list_optarg; + break; + case 'd': + cutflags |= DFLAG; + delim = list_optarg[0]; + if (delim == 0 || list_optarg[1]) + { + builtin_error ("delimiter must be a single non-null character"); + return (EX_USAGE); + } + break; + case 'f': + cutflags |= FFLAG; + list_arg = list_optarg; + break; + case 'n': + break; + case 's': + cutflags |= SFLAG; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (array_name && (legal_identifier (array_name) == 0)) + { + sh_invalidid (array_name); + return (EXECUTION_FAILURE); + } + + if (list == 0 && which == 0) + { + builtin_error ("string argument required"); + return (EX_USAGE); + } + + /* options are mutually exclusive and one is required */ + if ((OPTSET (BFLAG) + OPTSET (CFLAG) + OPTSET (FFLAG)) != 1) + { + builtin_usage (); + return (EX_USAGE); + } + + if ((npos = getlist (list_arg, &poslist)) < 0) + { + free (poslist); + return (EXECUTION_FAILURE); + } + + if (array_name) + { + v = find_or_make_array_variable (array_name, 1); + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + if (v && readonly_p (v)) + err_readonly (array_name); + return (EXECUTION_FAILURE); + } + else if (array_p (v) == 0) + { + builtin_error ("%s: not an indexed array", array_name); + return (EXECUTION_FAILURE); + } + if (invisible_p (v)) + VUNSETATTR (v, att_invisible); + array_flush (array_cell (v)); + } + + op.flags = cutflags; + op.delim = delim; + op.npos = npos; + op.poslist = poslist; + + /* we implement cut as a builtin with a cutfile() function that opens each + filename in LIST as a filename (or `-' for stdin) and runs cutline on + every line in the file. */ + if (which == 0) + { + cutstring = list->word->word; + if (cutstring == 0 || *cutstring == 0) + { + free (poslist); + return (EXECUTION_SUCCESS); + } + rval = cutline (v, cutstring, &op); + } + else + rval = cutfile (v, list, &op); + + return (rval); +} + +int +lcut_builtin (list) + WORD_LIST *list; +{ + return (cut_internal (0, list)); +} + +int +cut_builtin (list) + WORD_LIST *list; +{ + return (cut_internal (1, list)); +} + +char *lcut_doc[] = { + "Extract selected fields from a string.", + "", + "Select portions of LINE (as specified by LIST) and assign them to", + "elements of the indexed array ARRAY starting at index 0, or write", + "them to the standard output if -a is not specified.", + "", + "Items specified by LIST are either column positions or fields delimited", + "by a special character, and are described more completely in cut(1).", + "", + "Columns correspond to bytes (-b), characters (-c), or fields (-f). The", + "field delimiter is specified by -d (default TAB). Column numbering", + "starts at 1.", + (char *)NULL +}; + +struct builtin lcut_struct = { + "lcut", /* builtin name */ + lcut_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + lcut_doc, /* array of long documentation strings. */ + "lcut [-a ARRAY] [-b LIST] [-c LIST] [-f LIST] [-d CHAR] [-sn] line", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; + +char *cut_doc[] = { + "Extract selected fields from each line of a file.", + "", + "Select portions of each line (as specified by LIST) from each FILE", + "and write them to the standard output. cut reads from the standard", + "input if no FILE arguments are specified or if a FILE argument is a", + "single hyphen.", + "", + "Items specified by LIST are either column positions or fields delimited", + "by a special character, and are described more completely in cut(1).", + "", + "Columns correspond to bytes (-b), characters (-c), or fields (-f). The", + "field delimiter is specified by -d (default TAB). Column numbering", + "starts at 1.", + (char *)NULL +}; + +struct builtin cut_struct = { + "cut", /* builtin name */ + cut_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + cut_doc, /* array of long documentation strings. */ + "cut [-a ARRAY] [-b LIST] [-c LIST] [-f LIST] [-d CHAR] [-sn] [file ...]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/dirname.c b/bash-5.1/examples/loadables/dirname.c new file mode 100644 index 0000000000000000000000000000000000000000..d802ca77c116464c71661a83e380e21bba1e7157 --- /dev/null +++ b/bash-5.1/examples/loadables/dirname.c @@ -0,0 +1,119 @@ +/* dirname - return directory portion of pathname */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include "builtins.h" +#include "shell.h" +#include "common.h" +#include "bashgetopt.h" + +int +dirname_builtin (list) + WORD_LIST *list; +{ + int slen; + char *string; + + if (no_options (list)) + return (EX_USAGE); + list = loptend; + + if (list == 0 || list->next) + { + builtin_usage (); + return (EX_USAGE); + } + + string = list->word->word; + slen = strlen (string); + + /* Strip trailing slashes */ + while (slen > 0 && string[slen - 1] == '/') + slen--; + + /* (2) If string consists entirely of slash characters, string shall be + set to a single slash character. In this case, skip steps (3) + through (8). */ + if (slen == 0) + { + fputs ("/\n", stdout); + return (EXECUTION_SUCCESS); + } + + /* (3) If there are any trailing slash characters in string, they + shall be removed. */ + string[slen] = '\0'; + + /* (4) If there are no slash characters remaining in string, string + shall be set to a single period character. In this case, skip + steps (5) through (8). + + (5) If there are any trailing nonslash characters in string, + they shall be removed. */ + + while (--slen >= 0) + if (string[slen] == '/') + break; + + if (slen < 0) + { + fputs (".\n", stdout); + return (EXECUTION_SUCCESS); + } + + /* (7) If there are any trailing slash characters in string, they + shall be removed. */ + while (--slen >= 0) + if (string[slen] != '/') + break; + string[++slen] = '\0'; + + /* (8) If the remaining string is empty, string shall be set to a single + slash character. */ + printf ("%s\n", (slen == 0) ? "/" : string); + return (EXECUTION_SUCCESS); +} + +char *dirname_doc[] = { + "Display directory portion of pathname.", + "", + "The STRING is converted to the name of the directory containing", + "the filename corresponding to the last pathname component in STRING.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. */ +struct builtin dirname_struct = { + "dirname", /* builtin name */ + dirname_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + dirname_doc, /* array of long documentation strings. */ + "dirname string", /* usage synopsis */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/fdflags.c b/bash-5.1/examples/loadables/fdflags.c new file mode 100644 index 0000000000000000000000000000000000000000..fbe52304c96463400476997230e14a111ad365cb --- /dev/null +++ b/bash-5.1/examples/loadables/fdflags.c @@ -0,0 +1,374 @@ +/* Loadable builtin to get and set file descriptor flags. */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 2017,2018,2019 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include +#include +#include "bashansi.h" +#include + +#include "loadables.h" + +#ifndef FD_CLOEXEC +# define FD_CLOEXEC 1 +#endif + +static const struct +{ + const char *name; + int value; +} file_flags[] = +{ +#ifdef O_APPEND + { "append", O_APPEND }, +#else +# define O_APPEND 0 +#endif +#ifdef O_ASYNC + { "async", O_ASYNC }, +#else +# define O_ASYNC 0 +#endif +#ifdef O_SYNC + { "sync", O_SYNC }, +#else +# define O_SYNC 0 +#endif +#ifdef O_NONBLOCK + { "nonblock", O_NONBLOCK }, +#else +# define O_NONBLOCK 0 +#endif +#ifdef O_FSYNC + { "fsync", O_FSYNC }, +#else +# define O_FSYNC 0 +#endif +#ifdef O_DSYNC + { "dsync", O_DSYNC }, +#else +# define O_DSYNC 0 +#endif +#ifdef O_RSYNC + { "rsync", O_RSYNC }, +#else +# define O_RSYNC 0 +#endif +#ifdef O_ALT_IO + { "altio", O_ALT_IO }, +#else +# define O_ALT_IO 0 +#endif +#ifdef O_DIRECT + { "direct", O_DIRECT }, +#else +# define O_DIRECT 0 +#endif +#ifdef O_NOATIME + { "noatime", O_NOATIME }, +#else +# define O_NOATIME 0 +#endif +#ifdef O_NOSIGPIPE + { "nosigpipe", O_NOSIGPIPE }, +#else +# define O_NOSIGPIPE 0 +#endif + +#ifndef O_CLOEXEC +# define ALLFLAGS (O_APPEND|O_ASYNC|O_SYNC|O_NONBLOCK|O_FSYNC|O_DSYNC|\ + O_RSYNC|O_ALT_IO|O_DIRECT|O_NOATIME|O_NOSIGPIPE) + +/* An unsed bit in the file status flags word we can use to pass around the + state of close-on-exec. */ +# define O_CLOEXEC ((~ALLFLAGS) ^ ((~ALLFLAGS) & ((~ALLFLAGS) - 1))) +#endif + +#ifdef O_CLOEXEC + { "cloexec", O_CLOEXEC }, +#endif +}; + +#define N_FLAGS (sizeof (file_flags) / sizeof (file_flags[0])) + +#ifndef errno +extern int errno; +#endif + +/* FIX THIS */ +static int +getallflags () +{ + int i, allflags; + + for (i = allflags = 0; i < N_FLAGS; i++) + allflags |= file_flags[i].value; + return allflags; +} + +static int +getflags(int fd, int p) +{ + int c, f; + int allflags; + + if ((c = fcntl(fd, F_GETFD)) == -1) + { + if (p) + builtin_error("can't get status for fd %d: %s", fd, strerror(errno)); + return -1; + } + + if ((f = fcntl(fd, F_GETFL)) == -1) + { + if (p) + builtin_error("Can't get flags for fd %d: %s", fd, strerror(errno)); + return -1; + } + + if (c) + f |= O_CLOEXEC; + + return f & getallflags(); +} + +static void +printone(int fd, int p, int verbose) +{ + int f; + size_t i; + + if ((f = getflags(fd, p)) == -1) + return; + + printf ("%d:", fd); + + for (i = 0; i < N_FLAGS; i++) + { + if (f & file_flags[i].value) + { + printf ("%s%s", verbose ? "+" : "", file_flags[i].name); + f &= ~file_flags[i].value; + } + else if (verbose) + printf ( "-%s", file_flags[i].name); + else + continue; + + if (f || (verbose && i != N_FLAGS - 1)) + putchar (','); + } + printf ("\n"); +} + +static int +parseflags(char *s, int *p, int *n) +{ + int f, *v; + size_t i; + + f = 0; + *p = *n = 0; + + for (s = strtok(s, ","); s; s = strtok(NULL, ",")) + { + switch (*s) + { + case '+': + v = p; + s++; + break; + case '-': + v = n; + s++; + break; + default: + v = &f; + break; + } + + for (i = 0; i < N_FLAGS; i++) + if (strcmp(s, file_flags[i].name) == 0) + { + *v |= file_flags[i].value; + break; + } + if (i == N_FLAGS) + builtin_error("invalid flag `%s'", s); + } + + return f; +} + +static void +setone(int fd, char *v, int verbose) +{ + int f, n, pos, neg, cloexec; + + f = getflags(fd, 1); + if (f == -1) + return; + + parseflags(v, &pos, &neg); + + cloexec = -1; + + if ((pos & O_CLOEXEC) && (f & O_CLOEXEC) == 0) + cloexec = FD_CLOEXEC; + if ((neg & O_CLOEXEC) && (f & O_CLOEXEC)) + cloexec = 0; + + if (cloexec != -1 && fcntl(fd, F_SETFD, cloexec) == -1) + builtin_error("can't set status for fd %d: %s", fd, strerror(errno)); + + pos &= ~O_CLOEXEC; + neg &= ~O_CLOEXEC; + f &= ~O_CLOEXEC; + + n = f; + n |= pos; + n &= ~neg; + + if (n != f && fcntl(fd, F_SETFL, n) == -1) + builtin_error("can't set flags for fd %d: %s", fd, strerror(errno)); +} + +static int +getmaxfd () +{ + int maxfd, ignore; + +#ifdef F_MAXFD + maxfd = fcntl (0, F_MAXFD); + if (maxfd > 0) + return maxfd; +#endif + + maxfd = getdtablesize (); + if (maxfd <= 0) + maxfd = HIGH_FD_MAX; + for (maxfd--; maxfd > 0; maxfd--) + if (fcntl (maxfd, F_GETFD, &ignore) != -1) + break; + + return maxfd; +} + +int +fdflags_builtin (WORD_LIST *list) +{ + int opt, maxfd, i, num, verbose, setflag; + char *setspec; + WORD_LIST *l; + intmax_t inum; + + setflag = verbose = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "s:v")) != -1) + { + switch (opt) + { + case 's': + setflag = 1; + setspec = list_optarg; + break; + case 'v': + verbose = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + + } + list = loptend; + + /* Maybe we could provide some default here, but we don't yet. */ + if (list == 0 && setflag) + return (EXECUTION_SUCCESS); + + if (list == 0) + { + maxfd = getmaxfd (); + if (maxfd < 0) + { + builtin_error ("can't get max fd: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + for (i = 0; i < maxfd; i++) + printone (i, 0, verbose); + return (EXECUTION_SUCCESS); + } + + opt = EXECUTION_SUCCESS; + for (l = list; l; l = l->next) + { + if (legal_number (l->word->word, &inum) == 0 || inum < 0) + { + builtin_error ("%s: invalid file descriptor", l->word->word); + opt = EXECUTION_FAILURE; + continue; + } + num = inum; /* truncate to int */ + if (setflag) + setone (num, setspec, verbose); + else + printone (num, 1, verbose); + } + + return (opt); +} + +char *fdflags_doc[] = +{ + "Display and modify file descriptor flags.", + "", + "Display or, if the -s option is supplied, set flags for each file", + "descriptor supplied as an argument. If the -v option is supplied,", + "the display is verbose, including each settable option name in the", + "form of a string such as that accepted by the -s option.", + "", + "The -s option accepts a string with a list of flag names, each preceded", + "by a `+' (set) or `-' (unset). Those changes are applied to each file", + "descriptor supplied as an argument.", + "", + "If no file descriptor arguments are supplied, the displayed information", + "consists of the status of flags for each of the shell's open files.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. The flags must include BUILTIN_ENABLED so the + builtin can be used. */ +struct builtin fdflags_struct = { + "fdflags", /* builtin name */ + fdflags_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + fdflags_doc, /* array of long documentation strings. */ + "fdflags [-v] [-s flags_string] [fd ...]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/finfo.c b/bash-5.1/examples/loadables/finfo.c new file mode 100644 index 0000000000000000000000000000000000000000..8c278c3578765afe9b465119a8d1c0d31ee1ae8e --- /dev/null +++ b/bash-5.1/examples/loadables/finfo.c @@ -0,0 +1,629 @@ +/* + * finfo - print file info + * + * Chet Ramey + * chet@po.cwru.edu + */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#ifdef MAJOR_IN_MKDEV +# include +#endif +#ifdef MAJOR_IN_SYSMACROS +# include +#endif +#include "posixstat.h" +#include +#include +#include +#include +#include "posixtime.h" + +#include "bashansi.h" +#include "shell.h" +#include "builtins.h" +#include "common.h" +#include "getopt.h" + +#ifndef errno +extern int errno; +#endif + +extern char **make_builtin_argv (); + +static void perms(); +static int printst(); +static int printsome(); +static void printmode(); +static int printfinfo(); +static int finfo_main(); + +extern int sh_optind; +extern char *sh_optarg; +extern char *this_command_name; + +static char *prog; +static int pmask; + +#define OPT_UID 0x00001 +#define OPT_GID 0x00002 +#define OPT_DEV 0x00004 +#define OPT_INO 0x00008 +#define OPT_PERM 0x00010 +#define OPT_LNKNAM 0x00020 +#define OPT_FID 0x00040 +#define OPT_NLINK 0x00080 +#define OPT_RDEV 0x00100 +#define OPT_SIZE 0x00200 +#define OPT_ATIME 0x00400 +#define OPT_MTIME 0x00800 +#define OPT_CTIME 0x01000 +#define OPT_BLKSIZE 0x02000 +#define OPT_BLKS 0x04000 +#define OPT_FTYPE 0x08000 +#define OPT_PMASK 0x10000 +#define OPT_OPERM 0x20000 + +#define OPT_ASCII 0x1000000 + +#define OPTIONS "acdgiflmnopsuACGMP:U" + +static int +octal(s) +char *s; +{ + int r; + + r = *s - '0'; + while (*++s >= '0' && *s <= '7') + r = (r * 8) + (*s - '0'); + return r; +} + +static int +finfo_main(argc, argv) +int argc; +char **argv; +{ + register int i; + int mode, flags, opt; + + sh_optind = 0; /* XXX */ + prog = base_pathname(argv[0]); + if (argc == 1) { + builtin_usage(); + return(1); + } + flags = 0; + while ((opt = sh_getopt(argc, argv, OPTIONS)) != EOF) { + switch(opt) { + case 'a': flags |= OPT_ATIME; break; + case 'A': flags |= OPT_ATIME|OPT_ASCII; break; + case 'c': flags |= OPT_CTIME; break; + case 'C': flags |= OPT_CTIME|OPT_ASCII; break; + case 'd': flags |= OPT_DEV; break; + case 'i': flags |= OPT_INO; break; + case 'f': flags |= OPT_FID; break; + case 'g': flags |= OPT_GID; break; + case 'G': flags |= OPT_GID|OPT_ASCII; break; + case 'l': flags |= OPT_LNKNAM; break; + case 'm': flags |= OPT_MTIME; break; + case 'M': flags |= OPT_MTIME|OPT_ASCII; break; + case 'n': flags |= OPT_NLINK; break; + case 'o': flags |= OPT_OPERM; break; + case 'p': flags |= OPT_PERM; break; + case 'P': flags |= OPT_PMASK; pmask = octal(sh_optarg); break; + case 's': flags |= OPT_SIZE; break; + case 'u': flags |= OPT_UID; break; + case 'U': flags |= OPT_UID|OPT_ASCII; break; + default: builtin_usage (); return(1); + } + } + + argc -= sh_optind; + argv += sh_optind; + + if (argc == 0) { + builtin_usage(); + return(1); + } + + for (i = 0; i < argc; i++) + opt = flags ? printsome (argv[i], flags) : printfinfo(argv[i]); + + return(opt); +} + +static struct stat * +getstat(f) +char *f; +{ + static struct stat st; + int fd, r; + intmax_t lfd; + + if (strncmp(f, "/dev/fd/", 8) == 0) { + if ((legal_number(f + 8, &lfd) == 0) || (int)lfd != lfd) { + builtin_error("%s: invalid fd", f + 8); + return ((struct stat *)0); + } + fd = lfd; + r = fstat(fd, &st); + } else +#ifdef HAVE_LSTAT + r = lstat(f, &st); +#else + r = stat(f, &st); +#endif + if (r < 0) { + builtin_error("%s: cannot stat: %s", f, strerror(errno)); + return ((struct stat *)0); + } + return (&st); +} + +static int +printfinfo(f) +char *f; +{ + struct stat *st; + + st = getstat(f); + return (st ? printst(st) : 1); +} + +static int +getperm(m) +int m; +{ + return (m & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID)); +} + +static void +perms(m) +int m; +{ + char ubits[4], gbits[4], obits[4]; /* u=rwx,g=rwx,o=rwx */ + int i; + + i = 0; + if (m & S_IRUSR) + ubits[i++] = 'r'; + if (m & S_IWUSR) + ubits[i++] = 'w'; + if (m & S_IXUSR) + ubits[i++] = 'x'; + ubits[i] = '\0'; + + i = 0; + if (m & S_IRGRP) + gbits[i++] = 'r'; + if (m & S_IWGRP) + gbits[i++] = 'w'; + if (m & S_IXGRP) + gbits[i++] = 'x'; + gbits[i] = '\0'; + + i = 0; + if (m & S_IROTH) + obits[i++] = 'r'; + if (m & S_IWOTH) + obits[i++] = 'w'; + if (m & S_IXOTH) + obits[i++] = 'x'; + obits[i] = '\0'; + + if (m & S_ISUID) + ubits[2] = (m & S_IXUSR) ? 's' : 'S'; + if (m & S_ISGID) + gbits[2] = (m & S_IXGRP) ? 's' : 'S'; + if (m & S_ISVTX) + obits[2] = (m & S_IXOTH) ? 't' : 'T'; + + printf ("u=%s,g=%s,o=%s", ubits, gbits, obits); +} + +static void +printmode(mode) +int mode; +{ + if (S_ISBLK(mode)) + printf("S_IFBLK "); + if (S_ISCHR(mode)) + printf("S_IFCHR "); + if (S_ISDIR(mode)) + printf("S_IFDIR "); + if (S_ISREG(mode)) + printf("S_IFREG "); + if (S_ISFIFO(mode)) + printf("S_IFIFO "); + if (S_ISLNK(mode)) + printf("S_IFLNK "); + if (S_ISSOCK(mode)) + printf("S_IFSOCK "); +#ifdef S_ISWHT + if (S_ISWHT(mode)) + printf("S_ISWHT "); +#endif + perms(getperm(mode)); + printf("\n"); +} + +static int +printst(st) +struct stat *st; +{ + struct passwd *pw; + struct group *gr; + char *owner; + int ma, mi, d; + + ma = major (st->st_rdev); + mi = minor (st->st_rdev); +#if defined (makedev) + d = makedev (ma, mi); +#else + d = st->st_rdev & 0xFF; +#endif + printf("Device (major/minor): %d (%d/%d)\n", d, ma, mi); + + printf("Inode: %d\n", (int) st->st_ino); + printf("Mode: (%o) ", (int) st->st_mode); + printmode((int) st->st_mode); + printf("Link count: %d\n", (int) st->st_nlink); + pw = getpwuid(st->st_uid); + owner = pw ? pw->pw_name : "unknown"; + printf("Uid of owner: %d (%s)\n", (int) st->st_uid, owner); + gr = getgrgid(st->st_gid); + owner = gr ? gr->gr_name : "unknown"; + printf("Gid of owner: %d (%s)\n", (int) st->st_gid, owner); + printf("Device type: %d\n", (int) st->st_rdev); + printf("File size: %ld\n", (long) st->st_size); + printf("File last access time: %s", ctime (&st->st_atime)); + printf("File last modify time: %s", ctime (&st->st_mtime)); + printf("File last status change time: %s", ctime (&st->st_ctime)); + fflush(stdout); + return(0); +} + +static int +printsome(f, flags) +char *f; +int flags; +{ + struct stat *st; + struct passwd *pw; + struct group *gr; + int p; + char *b; + + st = getstat(f); + if (st == NULL) + return (1); + + /* Print requested info */ + if (flags & OPT_ATIME) { + if (flags & OPT_ASCII) + printf("%s", ctime(&st->st_atime)); + else + printf("%ld\n", st->st_atime); + } else if (flags & OPT_MTIME) { + if (flags & OPT_ASCII) + printf("%s", ctime(&st->st_mtime)); + else + printf("%ld\n", st->st_mtime); + } else if (flags & OPT_CTIME) { + if (flags & OPT_ASCII) + printf("%s", ctime(&st->st_ctime)); + else + printf("%ld\n", st->st_ctime); + } else if (flags & OPT_DEV) + printf("%lu\n", (unsigned long)st->st_dev); + else if (flags & OPT_INO) + printf("%lu\n", (unsigned long)st->st_ino); + else if (flags & OPT_FID) + printf("%lu:%lu\n", (unsigned long)st->st_dev, (unsigned long)st->st_ino); + else if (flags & OPT_NLINK) + printf("%lu\n", (unsigned long)st->st_nlink); + else if (flags & OPT_LNKNAM) { +#ifdef S_ISLNK + b = xmalloc(4096); + p = readlink(f, b, 4096); + if (p >= 0 && p < 4096) + b[p] = '\0'; + else { + p = errno; + strcpy(b, prog); + strcat(b, ": "); + strcat(b, strerror(p)); + } + printf("%s\n", b); + free(b); +#else + printf("%s\n", f); +#endif + } else if (flags & OPT_PERM) { + perms(st->st_mode); + printf("\n"); + } else if (flags & OPT_OPERM) + printf("%o\n", getperm(st->st_mode)); + else if (flags & OPT_PMASK) + printf("%o\n", getperm(st->st_mode) & pmask); + else if (flags & OPT_UID) { + pw = getpwuid(st->st_uid); + if (flags & OPT_ASCII) + printf("%s\n", pw ? pw->pw_name : "unknown"); + else + printf("%d\n", st->st_uid); + } else if (flags & OPT_GID) { + gr = getgrgid(st->st_gid); + if (flags & OPT_ASCII) + printf("%s\n", gr ? gr->gr_name : "unknown"); + else + printf("%d\n", st->st_gid); + } else if (flags & OPT_SIZE) + printf("%ld\n", (long) st->st_size); + + return (0); +} + +#ifndef NOBUILTIN +int +finfo_builtin(list) + WORD_LIST *list; +{ + int c, r; + char **v; + WORD_LIST *l; + + v = make_builtin_argv (list, &c); + r = finfo_main (c, v); + free (v); + + return r; +} + +static char *finfo_doc[] = { + "Display information about file attributes.", + "", + "Display information about each FILE. Only single operators should", + "be supplied. If no options are supplied, a summary of the info", + "available about each FILE is printed. If FILE is of the form", + "/dev/fd/XX, file descriptor XX is described. Operators, if supplied,", + "have the following meanings:", + "", + " -a last file access time", + " -A last file access time in ctime format", + " -c last file status change time", + " -C last file status change time in ctime format", + " -m last file modification time", + " -M last file modification time in ctime format", + " -d device", + " -i inode", + " -f composite file identifier (device:inode)", + " -g gid of owner", + " -G group name of owner", + " -l name of file pointed to by symlink", + " -n link count", + " -o permissions in octal", + " -p permissions in ascii", + " -P mask permissions ANDed with MASK (like with umask)", + " -s file size in bytes", + " -u uid of owner", + " -U user name of owner", + (char *)0 +}; + +struct builtin finfo_struct = { + "finfo", + finfo_builtin, + BUILTIN_ENABLED, + finfo_doc, + "finfo [-acdgiflmnopsuACGMPU] file [file...]", + 0 +}; +#endif + +#ifdef NOBUILTIN +#if defined (PREFER_STDARG) +# include +#else +# if defined (PREFER_VARARGS) +# include +# endif +#endif + +char *this_command_name; + +main(argc, argv) +int argc; +char **argv; +{ + this_command_name = argv[0]; + exit(finfo_main(argc, argv)); +} + +void +builtin_usage() +{ + fprintf(stderr, "%s: usage: %s [-%s] [file ...]\n", prog, prog, OPTIONS); +} + +#ifndef HAVE_STRERROR +char * +strerror(e) +int e; +{ + static char ebuf[40]; + extern int sys_nerr; + extern char *sys_errlist[]; + + if (e < 0 || e > sys_nerr) { + sprintf(ebuf,"Unknown error code %d", e); + return (&ebuf[0]); + } + return (sys_errlist[e]); +} +#endif + +char * +xmalloc(s) +size_t s; +{ + char *ret; + extern char *malloc(); + + ret = malloc(s); + if (ret) + return (ret); + fprintf(stderr, "%s: cannot malloc %d bytes\n", prog, s); + exit(1); +} + +char * +base_pathname(p) +char *p; +{ + char *t; + + if (t = strrchr(p, '/')) + return(++t); + return(p); +} + +int +legal_number (string, result) + char *string; + long *result; +{ + int sign; + long value; + + sign = 1; + value = 0; + + if (result) + *result = 0; + + /* Skip leading whitespace characters. */ + while (whitespace (*string)) + string++; + + if (!*string) + return (0); + + /* We allow leading `-' or `+'. */ + if (*string == '-' || *string == '+') + { + if (!digit (string[1])) + return (0); + + if (*string == '-') + sign = -1; + + string++; + } + + while (digit (*string)) + { + if (result) + value = (value * 10) + digit_value (*string); + string++; + } + + /* Skip trailing whitespace, if any. */ + while (whitespace (*string)) + string++; + + /* Error if not at end of string. */ + if (*string) + return (0); + + if (result) + *result = value * sign; + + return (1); +} + +int sh_optind; +char *sh_optarg; +int sh_opterr; + +extern int optind; +extern char *optarg; + +int +sh_getopt(c, v, o) +int c; +char **v, *o; +{ + int r; + + r = getopt(c, v, o); + sh_optind = optind; + sh_optarg = optarg; + return r; +} + +#if defined (USE_VARARGS) +void +#if defined (PREFER_STDARG) +builtin_error (const char *format, ...) +#else +builtin_error (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + if (this_command_name && *this_command_name) + fprintf (stderr, "%s: ", this_command_name); + +#if defined (PREFER_STDARG) + va_start (args, format); +#else + va_start (args); +#endif + + vfprintf (stderr, format, args); + va_end (args); + fprintf (stderr, "\n"); +} +#else +void +builtin_error (format, arg1, arg2, arg3, arg4, arg5) + char *format, *arg1, *arg2, *arg3, *arg4, *arg5; +{ + if (this_command_name && *this_command_name) + fprintf (stderr, "%s: ", this_command_name); + + fprintf (stderr, format, arg1, arg2, arg3, arg4, arg5); + fprintf (stderr, "\n"); + fflush (stderr); +} +#endif /* !USE_VARARGS */ + +#endif diff --git a/bash-5.1/examples/loadables/head.c b/bash-5.1/examples/loadables/head.c new file mode 100644 index 0000000000000000000000000000000000000000..1edca6c555b9a8d1265af66112f6a8acc743f0e3 --- /dev/null +++ b/bash-5.1/examples/loadables/head.c @@ -0,0 +1,167 @@ +/* head - copy first part of files. */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include "posixstat.h" +#include "filecntl.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" + +#include +#include +#include "chartypes.h" + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +static void +munge_list (list) + WORD_LIST *list; +{ + WORD_LIST *l, *nl; + WORD_DESC *wd; + char *arg; + + for (l = list; l; l = l->next) + { + arg = l->word->word; + if (arg[0] != '-' || arg[1] == '-' || (DIGIT(arg[1]) == 0)) + return; + /* We have -[0-9]* */ + wd = make_bare_word (arg+1); + nl = make_word_list (wd, l->next); + l->word->word[1] = 'n'; + l->word->word[2] = '\0'; + l->next = nl; + l = nl; /* skip over new argument */ + } +} + +static int +file_head (fp, cnt) + FILE *fp; + int cnt; +{ + int ch; + + while (cnt--) + { + while ((ch = getc (fp)) != EOF) + { + if (putchar (ch) == EOF) + { + builtin_error ("write error: %s", strerror (errno)); + return EXECUTION_FAILURE; + } + if (ch == '\n') + break; + } + } + return (EXECUTION_SUCCESS); +} + +int +head_builtin (list) + WORD_LIST *list; +{ + int nline, opt, rval; + WORD_LIST *l; + FILE *fp; + + char *t; + + munge_list (list); /* change -num into -n num */ + + reset_internal_getopt (); + nline = 10; + while ((opt = internal_getopt (list, "n:")) != -1) + { + switch (opt) + { + case 'n': + nline = atoi (list_optarg); + if (nline <= 0) + { + builtin_error ("bad line count: %s", list_optarg); + return (EX_USAGE); + } + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + return (file_head (stdin, nline)); + + for (rval = EXECUTION_SUCCESS, opt = 1, l = list; l; l = l->next) + { + fp = fopen (l->word->word, "r"); + if (fp == NULL) + { + builtin_error ("%s: %s", l->word->word, strerror (errno)); + continue; + } + if (list->next) /* more than one file */ + { + printf ("%s==> %s <==\n", opt ? "" : "\n", l->word->word); + opt = 0; + } + rval = file_head (fp, nline); + fclose (fp); + } + + return (rval); +} + +char *head_doc[] = { + "Display lines from beginning of file.", + "", + "Copy the first N lines from the input files to the standard output.", + "N is supplied as an argument to the `-n' option. If N is not given,", + "the first ten lines are copied.", + (char *)NULL +}; + +struct builtin head_struct = { + "head", /* builtin name */ + head_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + head_doc, /* array of long documentation strings. */ + "head [-n num] [file ...]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/hello.c b/bash-5.1/examples/loadables/hello.c new file mode 100644 index 0000000000000000000000000000000000000000..b09362bf31b1737bdf2ca8800b8d1bc4dccd9c3a --- /dev/null +++ b/bash-5.1/examples/loadables/hello.c @@ -0,0 +1,96 @@ +/* Sample builtin to be dynamically loaded with enable -f and create a new + builtin. */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include "loadables.h" + +/* A builtin `xxx' is normally implemented with an `xxx_builtin' function. + If you're converting a command that uses the normal Unix argc/argv + calling convention, use argv = make_builtin_argv (list, &argc) and call + the original `main' something like `xxx_main'. Look at cat.c for an + example. + + Builtins should use internal_getopt to parse options. It is the same as + getopt(3), but it takes a WORD_LIST *. Look at print.c for an example + of its use. + + If the builtin takes no options, call no_options(list) before doing + anything else. If it returns a non-zero value, your builtin should + immediately return EX_USAGE. Look at logname.c for an example. + + A builtin command returns EXECUTION_SUCCESS for success and + EXECUTION_FAILURE to indicate failure. */ +int +hello_builtin (list) + WORD_LIST *list; +{ + printf("hello world\n"); + fflush (stdout); + return (EXECUTION_SUCCESS); +} + +int +hello_builtin_load (s) + char *s; +{ + printf ("hello builtin loaded\n"); + fflush (stdout); + return (1); +} + +void +hello_builtin_unload (s) + char *s; +{ + printf ("hello builtin unloaded\n"); + fflush (stdout); +} + +/* An array of strings forming the `long' documentation for a builtin xxx, + which is printed by `help xxx'. It must end with a NULL. By convention, + the first line is a short description. */ +char *hello_doc[] = { + "Sample builtin.", + "", + "this is the long doc for the sample hello builtin", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. The flags must include BUILTIN_ENABLED so the + builtin can be used. */ +struct builtin hello_struct = { + "hello", /* builtin name */ + hello_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + hello_doc, /* array of long documentation strings. */ + "hello", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/id.c b/bash-5.1/examples/loadables/id.c new file mode 100644 index 0000000000000000000000000000000000000000..f857b54752a7e4c7516a0a891aad3c72bf23f9de --- /dev/null +++ b/bash-5.1/examples/loadables/id.c @@ -0,0 +1,329 @@ +/* + * id - POSIX.2 user identity + * + * (INCOMPLETE -- supplementary groups for other users not yet done) + * + * usage: id [-Ggu] [-nr] [user] + * + * The default output format looks something like: + * uid=xxx(chet) gid=xx groups=aa(aname), bb(bname), cc(cname) + */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include +#include "bashtypes.h" +#include +#include +#include "bashansi.h" + +#ifdef HAVE_LIMITS_H +# include +#else +# include +#endif + +#if !defined (HAVE_GETPW_DECLS) +extern struct passwd *getpwuid (); +#endif +extern struct group *getgrgid (); + +#include "shell.h" +#include "builtins.h" +#include "stdc.h" +#include "common.h" +#include "bashgetopt.h" + +#define ID_ALLGROUPS 0x001 /* -G */ +#define ID_GIDONLY 0x002 /* -g */ +#define ID_USENAME 0x004 /* -n */ +#define ID_USEREAL 0x008 /* -r */ +#define ID_USERONLY 0x010 /* -u */ + +#define ID_FLAGSET(s) ((id_flags & (s)) != 0) + +static int id_flags; + +static uid_t ruid, euid; +static gid_t rgid, egid; + +static char *id_user; + +static int inituser (); + +static int id_pruser (); +static int id_prgrp (); +static int id_prgroups (); +static int id_prall (); + +int +id_builtin (list) + WORD_LIST *list; +{ + int opt; + char *user; + + id_flags = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "Ggnru")) != -1) + { + switch (opt) + { + case 'G': id_flags |= ID_ALLGROUPS; break; + case 'g': id_flags |= ID_GIDONLY; break; + case 'n': id_flags |= ID_USENAME; break; + case 'r': id_flags |= ID_USEREAL; break; + case 'u': id_flags |= ID_USERONLY; break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + user = list ? list->word->word : (char *)NULL; + + /* Check for some invalid option combinations */ + opt = ID_FLAGSET (ID_ALLGROUPS) + ID_FLAGSET (ID_GIDONLY) + ID_FLAGSET (ID_USERONLY); + if (opt > 1 || (opt == 0 && ((id_flags & (ID_USEREAL|ID_USENAME)) != 0))) + { + builtin_usage (); + return (EX_USAGE); + } + + if (list && list->next) + { + builtin_usage (); + return (EX_USAGE); + } + + if (inituser (user) < 0) + return (EXECUTION_FAILURE); + + opt = 0; + if (id_flags & ID_USERONLY) + opt += id_pruser ((id_flags & ID_USEREAL) ? ruid : euid); + else if (id_flags & ID_GIDONLY) + opt += id_prgrp ((id_flags & ID_USEREAL) ? rgid : egid); + else if (id_flags & ID_ALLGROUPS) + opt += id_prgroups (user); + else + opt += id_prall (user); + putchar ('\n'); + fflush (stdout); + + return (opt == 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +} + +static int +inituser (uname) + char *uname; +{ + struct passwd *pwd; + + if (uname) + { + pwd = getpwnam (uname); + if (pwd == 0) + { + builtin_error ("%s: no such user", uname); + return -1; + } + ruid = euid = pwd->pw_uid; + rgid = egid = pwd->pw_gid; + } + else + { + ruid = current_user.uid; + euid = current_user.euid; + rgid = current_user.gid; + egid = current_user.egid; + } + return 0; +} + +/* Print the name or value of user ID UID. */ +static int +id_pruser (uid) + int uid; +{ + struct passwd *pwd = NULL; + int r; + + r = 0; + if (id_flags & ID_USENAME) + { + pwd = getpwuid (uid); + if (pwd == NULL) + r = 1; + } + if (pwd) + printf ("%s", pwd->pw_name); + else + printf ("%u", (unsigned) uid); + + return r; +} + +/* Print the name or value of group ID GID. */ + +static int +id_prgrp (gid) + int gid; +{ + struct group *grp = NULL; + int r; + + r = 0; + if (id_flags & ID_USENAME) + { + grp = getgrgid (gid); + if (grp == NULL) + r = 1; + } + + if (grp) + printf ("%s", grp->gr_name); + else + printf ("%u", (unsigned) gid); + + return r; +} + +static int +id_prgroups (uname) + char *uname; +{ + int *glist, ng, i, r; + + r = 0; + id_prgrp (rgid); + if (egid != rgid) + { + putchar (' '); + id_prgrp (egid); + } + + if (uname) + { + builtin_error ("supplementary groups for other users not yet implemented"); + glist = (int *)NULL; + ng = 0; + r = 1; + } + else + glist = get_group_array (&ng); + + for (i = 0; i < ng; i++) + if (glist[i] != rgid && glist[i] != egid) + { + putchar (' '); + id_prgrp (glist[i]); + } + + return r; +} + +static int +id_prall (uname) + char *uname; +{ + int r, i, ng, *glist; + struct passwd *pwd; + struct group *grp; + + r = 0; + printf ("uid=%u", (unsigned) ruid); + pwd = getpwuid (ruid); + if (pwd == NULL) + r = 1; + else + printf ("(%s)", pwd->pw_name); + + printf (" gid=%u", (unsigned) rgid); + grp = getgrgid (rgid); + if (grp == NULL) + r = 1; + else + printf ("(%s)", grp->gr_name); + + if (euid != ruid) + { + printf (" euid=%u", (unsigned) euid); + pwd = getpwuid (euid); + if (pwd == NULL) + r = 1; + else + printf ("(%s)", pwd->pw_name); + } + + if (egid != rgid) + { + printf (" egid=%u", (unsigned) egid); + grp = getgrgid (egid); + if (grp == NULL) + r = 1; + else + printf ("(%s)", grp->gr_name); + } + + if (uname) + { + builtin_error ("supplementary groups for other users not yet implemented"); + glist = (int *)NULL; + ng = 0; + r = 1; + } + else + glist = get_group_array (&ng); + + if (ng > 0) + printf (" groups="); + for (i = 0; i < ng; i++) + { + if (i > 0) + printf (", "); + printf ("%u", (unsigned) glist[i]); + grp = getgrgid (glist[i]); + if (grp == NULL) + r = 1; + else + printf ("(%s)", grp->gr_name); + } + + return r; +} + +char *id_doc[] = { + "Display information about user." + "", + "Return information about user identity", + (char *)NULL +}; + +struct builtin id_struct = { + "id", + id_builtin, + BUILTIN_ENABLED, + id_doc, + "id [user]\n\tid -G [-n] [user]\n\tid -g [-nr] [user]\n\tid -u [-nr] [user]", + 0 +}; diff --git a/bash-5.1/examples/loadables/ln.c b/bash-5.1/examples/loadables/ln.c new file mode 100644 index 0000000000000000000000000000000000000000..874e9db886f8c717ee63bfeda3008f21eaad063c --- /dev/null +++ b/bash-5.1/examples/loadables/ln.c @@ -0,0 +1,236 @@ +/* ln - make links */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "posixstat.h" + +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +typedef int unix_link_syscall_t PARAMS((const char *, const char *)); + +#define LN_SYMLINK 0x01 +#define LN_UNLINK 0x02 +#define LN_NOFOLLOW 0x04 + +static unix_link_syscall_t *linkfn; +static int dolink (); + +int +ln_builtin (list) + WORD_LIST *list; +{ + int rval, opt, flags; + WORD_LIST *l; + char *sdir; + struct stat sb; + + flags = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "fs")) != -1) + { + switch (opt) + { + case 'f': + flags |= LN_UNLINK; + break; + case 's': + flags |= LN_SYMLINK; + break; + case 'h': + case 'n': + flags |= LN_NOFOLLOW; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + linkfn = (flags & LN_SYMLINK) ? symlink : link; + + if (list->next == 0) /* ln target, equivalent to ln target . */ + return (dolink (list->word->word, ".", flags)); + + if (list->next->next == 0) /* ln target source */ + return (dolink (list->word->word, list->next->word->word, flags)); + + /* ln target1 target2 ... directory */ + + /* find last argument: target directory, and make sure it's an existing + directory. */ + for (l = list; l->next; l = l->next) + ; + sdir = l->word->word; + + if (stat(sdir, &sb) < 0) + { + builtin_error ("%s", sdir); + return (EXECUTION_FAILURE); + } + + if (S_ISDIR (sb.st_mode) == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + for (rval = EXECUTION_SUCCESS; list != l; list = list->next) + rval += dolink (list->word->word, sdir, flags); + + return rval; +} + +static char * +mkdirpath (dir, file) + char *dir, *file; +{ + int dlen, flen; + char *ret; + + dlen = strlen (dir); + flen = strlen (file); + + ret = xmalloc (2 + dlen + flen); + + strcpy (ret, dir); + if (ret[dlen - 1] != '/') + ret[dlen++] = '/'; + strcpy (ret + dlen, file); + return ret; +} + +#if defined (HAVE_LSTAT) +# define LSTAT lstat +# define LSTAT_OR_STAT_IF(c, f, b) ((c) ? lstat((f), (b)) : stat((f), (b))) +#else +# define LSTAT stat +# define LSTAT_OR_STAT_IF(c, f, b) (stat((f), (b))) +#endif + +static int +dolink (src, dst, flags) + char *src, *dst; + int flags; +{ + struct stat ssb, dsb; + int exists; + char *dst_path, *p; + + /* If we're not doing symlinks, the source must exist and not be a + directory. */ + if ((flags & LN_SYMLINK) == 0) + { + if (stat (src, &ssb) != 0) + { + builtin_error ("%s: %s", src, strerror (errno)); + return (EXECUTION_FAILURE); + } + if (S_ISDIR (ssb.st_mode)) + { + errno = EISDIR; + builtin_error ("%s: %s", src, strerror (errno)); + return (EXECUTION_FAILURE); + } + } + + /* If the destination is a directory, create the final filename by appending + the basename of the source to the destination. */ + dst_path = 0; + if ((LSTAT_OR_STAT_IF((flags & LN_NOFOLLOW), dst, &dsb) == 0) && S_ISDIR (dsb.st_mode)) + { + if ((p = strrchr (src, '/')) == 0) + p = src; + else + p++; + + dst_path = mkdirpath (dst, p); + dst = dst_path; + } + + exists = LSTAT (dst, &dsb) == 0; + + /* If -f was specified, and the destination exists, unlink it. */ + if ((flags & LN_UNLINK) && exists && unlink (dst) != 0) + { + builtin_error ("%s: cannot unlink: %s", dst, strerror (errno)); + FREE (dst_path); + return (EXECUTION_FAILURE); + } + + /* Perform the link. */ + if ((*linkfn) (src, dst) != 0) + { + builtin_error ("cannot link %s to %s: %s", dst, src, strerror (errno)); + FREE (dst_path); + return (EXECUTION_FAILURE); + } + + FREE (dst_path); + return (EXECUTION_SUCCESS); +} + +char *ln_doc[] = { + "Link files.", + "", + "Create a new directory entry with the same modes as the original", + "file. The -f option means to unlink any existing file, permitting", + "the link to occur. The -s option means to create a symbolic link.", + "By default, ln makes hard links. Specifying -n or its synonym -h", + "causes ln to not resolve symlinks in the target file or directory.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. */ +struct builtin ln_struct = { + "ln", /* builtin name */ + ln_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + ln_doc, /* array of long documentation strings. */ + "ln [-fhns] file1 [file2] OR ln [-fhns] file ... directory", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/loadables.h b/bash-5.1/examples/loadables/loadables.h new file mode 100644 index 0000000000000000000000000000000000000000..c73035720f29d4cfde5cae04f0148cef0bf8a850 --- /dev/null +++ b/bash-5.1/examples/loadables/loadables.h @@ -0,0 +1,34 @@ +/* loadables.h -- Include files needed by all loadable builtins */ + +/* Copyright (C) 2015 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + + +#ifndef __LOADABLES_H_ +#define __LOADABLES_H_ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#endif diff --git a/bash-5.1/examples/loadables/logname.c b/bash-5.1/examples/loadables/logname.c new file mode 100644 index 0000000000000000000000000000000000000000..27e6591be98f281eec691d19ae0fae210063fb7a --- /dev/null +++ b/bash-5.1/examples/loadables/logname.c @@ -0,0 +1,74 @@ +/* logname - print login name of current user */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +int +logname_builtin (list) + WORD_LIST *list; +{ + char *np; + + if (no_options (list)) + return (EX_USAGE); + + np = getlogin (); + if (np == 0) + { + builtin_error ("cannot find username: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + printf ("%s\n", np); + return (EXECUTION_SUCCESS); +} + +char *logname_doc[] = { + "Display user login name.", + "", + "Write the current user's login name to the standard output", + "and exit. logname ignores the LOGNAME and USER variables.", + "logname ignores any non-option arguments.", + (char *)NULL +}; + +struct builtin logname_struct = { + "logname", + logname_builtin, + BUILTIN_ENABLED, + logname_doc, + "logname", + 0 +}; + diff --git a/bash-5.1/examples/loadables/mkdir.c b/bash-5.1/examples/loadables/mkdir.c new file mode 100644 index 0000000000000000000000000000000000000000..d5d395510b7c224116960fee1892a3d6b7c4c19b --- /dev/null +++ b/bash-5.1/examples/loadables/mkdir.c @@ -0,0 +1,245 @@ +/* mkdir - make directories */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include "bashtypes.h" +#include "posixstat.h" +#include +#include +#include "bashansi.h" +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +#define ISOCTAL(c) ((c) >= '0' && (c) <= '7') + +extern int parse_symbolic_mode (); + +static int make_path (); + +static int original_umask; + +int +mkdir_builtin (list) + WORD_LIST *list; +{ + int opt, pflag, mflag, omode, rval, nmode, parent_mode; + char *mode; + WORD_LIST *l; + + reset_internal_getopt (); + pflag = mflag = 0; + mode = (char *)NULL; + while ((opt = internal_getopt(list, "m:p")) != -1) + switch (opt) + { + case 'p': + pflag = 1; + break; + case 'm': + mflag = 1; + mode = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage(); + return (EX_USAGE); + } + list = loptend; + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + if (mode == NULL) + omode = S_IRWXU | S_IRWXG | S_IRWXO; /* a=rwx */ + else if (ISOCTAL (*mode)) /* octal number */ + { + omode = read_octal (mode); + if (omode < 0) + { + builtin_error ("invalid file mode: %s", mode); + return (EXECUTION_FAILURE); + } + } + else /* symbolic mode */ + { + /* initial bits are a=rwx; the mode argument modifies them */ + omode = parse_symbolic_mode (mode, S_IRWXU | S_IRWXG | S_IRWXO); + if (omode < 0) + { + builtin_error ("invalid file mode: %s", mode); + return (EXECUTION_FAILURE); + } + } + + /* Make the new mode */ + original_umask = umask (0); + umask (original_umask); + + nmode = (S_IRWXU | S_IRWXG | S_IRWXO) & ~original_umask; + parent_mode = nmode | (S_IWUSR|S_IXUSR); /* u+wx */ + + /* Adjust new mode based on mode argument */ + nmode &= omode; + + for (rval = EXECUTION_SUCCESS, l = list; l; l = l->next) + { + if (pflag && make_path (l->word->word, mflag, nmode, parent_mode)) + { + rval = EXECUTION_FAILURE; + continue; + } + else if (pflag == 0 && mkdir (l->word->word, nmode) < 0) + { + builtin_error ("cannot create directory `%s': %s", l->word->word, strerror (errno)); + rval = EXECUTION_FAILURE; + } + } + return rval; +} + +/* Make all the directories leading up to PATH, then create PATH. Note that + this changes the process's umask; make sure that all paths leading to a + return reset it to ORIGINAL_UMASK */ +static int +make_path (path, user_mode, nmode, parent_mode) + char *path; + int user_mode; + int nmode, parent_mode; +{ + int oumask; + struct stat sb; + char *p, *npath; + + if (stat (path, &sb) == 0) + { + if (S_ISDIR (sb.st_mode) == 0) + { + builtin_error ("`%s': file exists but is not a directory", path); + return 1; + } + + if (user_mode && chmod (path, nmode)) + { + builtin_error ("%s: %s", path, strerror (errno)); + return 1; + } + + return 0; + } + + oumask = umask (0); + npath = savestring (path); /* So we can write to it. */ + + /* Check whether or not we need to do anything with intermediate dirs. */ + + /* Skip leading slashes. */ + p = npath; + while (*p == '/') + p++; + + while (p = strchr (p, '/')) + { + *p = '\0'; + if (stat (npath, &sb) != 0) + { + if (mkdir (npath, 0)) + { + builtin_error ("cannot create directory `%s': %s", npath, strerror (errno)); + umask (original_umask); + free (npath); + return 1; + } + if (chmod (npath, parent_mode) != 0) + { + builtin_error ("cannot chmod directory `%s': %s", npath, strerror (errno)); + umask (original_umask); + free (npath); + return 1; + } + } + else if (S_ISDIR (sb.st_mode) == 0) + { + builtin_error ("`%s': file exists but is not a directory", npath); + umask (original_umask); + free (npath); + return 1; + } + + *p++ = '/'; /* restore slash */ + while (*p == '/') + p++; + } + + /* Create the final directory component. */ + if (stat (npath, &sb) && mkdir (npath, nmode)) + { + builtin_error ("cannot create directory `%s': %s", npath, strerror (errno)); + umask (original_umask); + free (npath); + return 1; + } + + umask (original_umask); + free (npath); + return 0; +} + +char *mkdir_doc[] = { + "Create directories.", + "", + "Make directories. Create the directories named as arguments, in", + "the order specified, using mode rwxrwxrwx as modified by the current", + "umask (see `help umask'). The -m option causes the file permission", + "bits of the final directory to be MODE. The MODE argument may be", + "an octal number or a symbolic mode like that used by chmod(1). If", + "a symbolic mode is used, the operations are interpreted relative to", + "an initial mode of \"a=rwx\". The -p option causes any required", + "intermediate directories in PATH to be created. The directories", + "are created with permssion bits of rwxrwxrwx as modified by the current", + "umask, plus write and search permissions for the owner. mkdir", + "returns 0 if the directories are created successfully, and non-zero", + "if an error occurs.", + (char *)NULL +}; + +struct builtin mkdir_struct = { + "mkdir", + mkdir_builtin, + BUILTIN_ENABLED, + mkdir_doc, + "mkdir [-p] [-m mode] directory [directory ...]", + 0 +}; diff --git a/bash-5.1/examples/loadables/mkfifo.c b/bash-5.1/examples/loadables/mkfifo.c new file mode 100644 index 0000000000000000000000000000000000000000..2bc4e98ac017ad220c7ff4b7fd8fda91238d74e9 --- /dev/null +++ b/bash-5.1/examples/loadables/mkfifo.c @@ -0,0 +1,146 @@ +/* mkfifo - make FIFOs */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include "bashtypes.h" +#include "posixstat.h" +#include +#include +#include "bashansi.h" +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +#define ISOCTAL(c) ((c) >= '0' && (c) <= '7') + +extern int parse_symbolic_mode (); + +static int original_umask; + +int +mkfifo_builtin (list) + WORD_LIST *list; +{ + int opt, mflag, omode, rval, nmode, basemode; + char *mode; + WORD_LIST *l; + + mflag = 0; + mode = (char *)NULL; + + reset_internal_getopt (); + while ((opt = internal_getopt(list, "m:")) != -1) + switch (opt) + { + case 'm': + mflag = 1; + mode = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage(); + return (EX_USAGE); + } + list = loptend; + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + basemode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; + if (mode == NULL) + omode = basemode; + else if (ISOCTAL (*mode)) /* octal number */ + { + omode = read_octal (mode); + if (omode < 0) + { + builtin_error ("invalid file mode: %s", mode); + return (EXECUTION_FAILURE); + } + } + else /* symbolic mode */ + { + /* initial bits are a=rwx; the mode argument modifies them */ + omode = parse_symbolic_mode (mode, basemode); + if (omode < 0) + { + builtin_error ("invalid file mode: %s", mode); + return (EXECUTION_FAILURE); + } + } + + /* Make the new mode */ + original_umask = umask (0); + umask (original_umask); + + nmode = basemode & ~original_umask; + /* Adjust new mode based on mode argument */ + nmode &= omode; + + for (rval = EXECUTION_SUCCESS, l = list; l; l = l->next) + { + if (mkfifo (l->word->word, nmode) < 0) + { + builtin_error ("cannot create FIFO `%s': %s", l->word->word, strerror (errno)); + rval = EXECUTION_FAILURE; + } + } + return rval; +} + + +char *mkfifo_doc[] = { + "Create FIFOs (named pipes).", + "", + "Make FIFOs. Create the FIFOs named as arguments, in", + "the order specified, using mode a=rw as modified by the current", + "umask (see `help umask'). The -m option causes the file permission", + "bits of the final FIFO to be MODE. The MODE argument may be", + "an octal number or a symbolic mode like that used by chmod(1). If", + "a symbolic mode is used, the operations are interpreted relative to", + "an initial mode of \"a=rw\". mkfifo returns 0 if the FIFOs are", + "umask, plus write and search permissions for the owner. mkdir", + "created successfully, and non-zero if an error occurs.", + (char *)NULL +}; + +struct builtin mkfifo_struct = { + "mkfifo", + mkfifo_builtin, + BUILTIN_ENABLED, + mkfifo_doc, + "mkfifo [-m mode] fifo_name [fifo_name ...]", + 0 +}; diff --git a/bash-5.1/examples/loadables/mktemp.c b/bash-5.1/examples/loadables/mktemp.c new file mode 100644 index 0000000000000000000000000000000000000000..1f7c9ad39a59148651dc3e75a1d1aeee7941ec57 --- /dev/null +++ b/bash-5.1/examples/loadables/mktemp.c @@ -0,0 +1,212 @@ +/* mktemp - create temporary file or directory */ + +/* + Copyright (C) 2019 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include "bashansi.h" + +#include "loadables.h" + +#define DEFAULT_PREFIX "shtmp" + +int +mktemp_builtin (list) + WORD_LIST *list; +{ + WORD_LIST *l; + int rval, opt, fd, mflags, base_mflags; + int dflag, qflag, tflag, uflag, onetime; + char *prefix, *varname, *filename, *template; + SHELL_VAR *v; + + dflag = qflag = uflag = tflag = onetime = 0; + prefix = varname = 0; + rval = EXECUTION_SUCCESS; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "dqut:v:")) != -1) + { + switch (opt) + { + case 'd': + dflag = 1; + break; + case 'q': + qflag = 1; + break; + case 't': + tflag = 1; + prefix = list_optarg; + break; + case 'u': + uflag = 1; + break; + case 'v': + varname = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (varname) /* check for validity, not readonly */ + { + if (legal_identifier (varname) == 0) + { + if (qflag == 0) + sh_invalidid (varname); + return (EXECUTION_FAILURE); + } + v = find_variable (varname); + if (v && readonly_p (v)) + { + if (qflag == 0) + sh_readonly (varname); + return (EXECUTION_FAILURE); + } + } + + onetime = (list == 0); /* once through the loop, $TMPDIR/prefix.XXXXXX */ + + if (prefix == 0) + prefix = DEFAULT_PREFIX; + base_mflags = MT_USETMPDIR|MT_USERANDOM; /* USERANDOM not strictly needed */ + + while (list || onetime) + { + mflags = base_mflags; + onetime = 0; +#if defined (USE_MKTEMP) && defined (USE_MKSTEMP) + if (list) + { + template = list->word->word; + mflags |= MT_TEMPLATE; + } +#else + /* This is sub-optimal. */ + if (list) + { + /* Treat the basename as a prefix */ + template = strrchr (list->word->word, '/'); + if (template) + template++; + else + template = list->word->word; + } +#endif + else + template = prefix; + + if (dflag) + { + filename = sh_mktmpdir (template, mflags); + if (filename == 0) + { + if (qflag == 0) + builtin_error ("%s: cannot create directory", template); + rval = EXECUTION_FAILURE; + } + else + { + if (uflag) + rmdir (filename); + printf ("%s\n", filename); + } + } + else /* filename */ + { + fd = sh_mktmpfd (template, mflags, &filename); + if (fd < 0) + { + if (qflag == 0) + builtin_error ("%s: cannot create file", template); + rval = EXECUTION_FAILURE; + } + else + { + close (fd); + if (uflag) + unlink (filename); + printf ("%s\n", filename); + } + } + + /* Assign variable if requested */ + if (filename && varname) + { + v = builtin_bind_variable (varname, filename, 0); + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + builtin_error ("%s: cannot set variable", varname); + rval = EXECUTION_FAILURE; + } + } + + FREE (filename); + + if (list) + list = list->next; + } + + return (rval); +} + +char *mktemp_doc[] = { + "Make unique temporary file name", + "", + "Take each supplied filename template and overwrite a portion of it", + "to create a filename, which is unique and may be used by the calling", + "script. TEMPLATE is a string ending in some number of 'X's. If", + "TEMPLATE is not supplied, shtmp.XXXXXX is used and $TMPDIR is used as", + "the name of the containing directory. Files are created u+rw; directories", + "are created u+rwx.", + "", + "Options, if supplied, have the following meanings:", + "", + " -d Create a directory instead of a file", + " -q Do not print error messages about file creation failure", + " -t PREFIX Use PREFIX as the directory in which to create files", + " -u Do not create anything; simply print a name", + " -v VAR Store the generated name into shell variable VAR", + "", + "Any PREFIX supplied with -t is ignored if TEMPLATE is supplied.", + "", + "The return status is true if the file or directory was created successfully;", + "false if an error occurs or VAR is invalid or readonly.", + + (char *)NULL +}; + +struct builtin mktemp_struct = { + "mktemp", /* builtin name */ + mktemp_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + mktemp_doc, /* array of long documentation strings. */ + "mktemp [-d] [-q] [-t prefix] [-u] [-v varname] [template] ...", + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/mypid.c b/bash-5.1/examples/loadables/mypid.c new file mode 100644 index 0000000000000000000000000000000000000000..fc1b267afe54128f1808ba4efee7eccfbc15ea92 --- /dev/null +++ b/bash-5.1/examples/loadables/mypid.c @@ -0,0 +1,89 @@ +/* This module should be dynamically loaded with enable -f + * which would create a new builtin named mypid. You'll need + * the source code for GNU bash to recompile this module. + * + * Then, from within bash, enable -f ./mypid enable_mypid, where ./mypid + * is the binary obtained from running make. Hereafter, `${MYPID}' + * is a shell builtin variable. + * + * This defines an unload hook function that is called when the builtin is + * deleted with enable -d that will unbind the MYPID variable so future + * references to it do not attempt to access memory that is no longer part + * of this process's address space. + */ +#include + +#include +#include +#include + +#include "builtins.h" +#include "shell.h" + +#define INIT_DYNAMIC_VAR(var, val, gfunc, afunc) \ + do \ + { SHELL_VAR *v = bind_variable (var, (val), 0); \ + if (v) \ + { \ + v->dynamic_value = gfunc; \ + v->assign_func = afunc; \ + } \ + } \ + while (0) + +static SHELL_VAR * +assign_mypid ( + SHELL_VAR *self, + char *value, + arrayind_t unused, + char *key ) +{ + return (self); +} + +static SHELL_VAR * +get_mypid (SHELL_VAR *var) +{ + int rv; + char *p; + + rv = getpid(); + p = itos (rv); + + FREE (value_cell (var)); + + VSETATTR (var, att_integer); + var_setvalue (var, p); + return (var); +} + +int +enable_mypid_builtin(WORD_LIST *list) +{ + INIT_DYNAMIC_VAR ("MYPID", (char *)NULL, get_mypid, assign_mypid); + + return 0; +} + +void +enable_mypid_builtin_unload (char *s) +{ + unbind_variable ("MYPID"); +} + +char const *enable_mypid_doc[] = { + "Enable $MYPID.", + "", + "Enables use of the ${MYPID} dynamic variable. ", + "It will yield the current pid of a subshell.", + (char *)0 +}; + +struct builtin enable_mypid_struct = { + "enable_mypid", + enable_mypid_builtin, + BUILTIN_ENABLED, + (char**)(void*)enable_mypid_doc, + "enable_mypid N", + 0 +}; diff --git a/bash-5.1/examples/loadables/necho.c b/bash-5.1/examples/loadables/necho.c new file mode 100644 index 0000000000000000000000000000000000000000..dd2092b07e0951e33052cad58c60429d78a0bf9b --- /dev/null +++ b/bash-5.1/examples/loadables/necho.c @@ -0,0 +1,54 @@ +/* necho - echo without options or argument interpretation */ + +/* Sample builtin to be dynamically loaded with enable -f and replace an + existing builtin. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include "builtins.h" +#include "shell.h" + +int +necho_builtin (list) +WORD_LIST *list; +{ + print_word_list (list, " "); + printf("\n"); + fflush (stdout); + return (EXECUTION_SUCCESS); +} + +char *necho_doc[] = { + "Display arguments.", + "", + "Print the arguments to the standard output separated", + "by space characters and terminated with a newline.", + (char *)NULL +}; + +struct builtin necho_struct = { + "echo", + necho_builtin, + BUILTIN_ENABLED, + necho_doc, + "echo [args]", + 0 +}; + diff --git a/bash-5.1/examples/loadables/pathchk.c b/bash-5.1/examples/loadables/pathchk.c new file mode 100644 index 0000000000000000000000000000000000000000..c1151db4260a8347c76dbfbb0de28d939d3878c2 --- /dev/null +++ b/bash-5.1/examples/loadables/pathchk.c @@ -0,0 +1,381 @@ +/* pathchk - check pathnames for validity and portability */ + +/* Usage: pathchk [-p] path ... + + For each PATH, print a message if any of these conditions are false: + * all existing leading directories in PATH have search (execute) permission + * strlen (PATH) <= PATH_MAX + * strlen (each_directory_in_PATH) <= NAME_MAX + + Exit status: + 0 All PATH names passed all of the tests. + 1 An error occurred. + + Options: + -p Instead of performing length checks on the + underlying filesystem, test the length of the + pathname and its components against the POSIX.1 + minimum limits for portability, _POSIX_NAME_MAX + and _POSIX_PATH_MAX in 2.9.2. Also check that + the pathname contains no character not in the + portable filename character set. */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_LIMITS_H) +# include +#endif + +#include "bashansi.h" + +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "stdc.h" +#include "bashgetopt.h" +#include "maxpath.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +#if !defined (_POSIX_PATH_MAX) +# define _POSIX_PATH_MAX 255 +#endif +#if !defined (_POSIX_NAME_MAX) +# define _POSIX_NAME_MAX 14 +#endif + +/* How do we get PATH_MAX? */ +#if defined (_POSIX_VERSION) && !defined (PATH_MAX) +# define PATH_MAX_FOR(p) pathconf ((p), _PC_PATH_MAX) +#endif + +/* How do we get NAME_MAX? */ +#if defined (_POSIX_VERSION) && !defined (NAME_MAX) +# define NAME_MAX_FOR(p) pathconf ((p), _PC_NAME_MAX) +#endif + +#if !defined (PATH_MAX_FOR) +# define PATH_MAX_FOR(p) PATH_MAX +#endif + +#if !defined (NAME_MAX_FOR) +# define NAME_MAX_FOR(p) NAME_MAX +#endif + +extern char *strerror (); + +static int validate_path (); + +int +pathchk_builtin (list) + WORD_LIST *list; +{ + int retval, pflag, opt; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "p")) != -1) + { + switch (opt) + { + case 'p': + pflag = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + for (retval = 0; list; list = list->next) + retval |= validate_path (list->word->word, pflag); + + return (retval ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} + +char *pathchk_doc[] = { + "Check pathnames for validity.", + "", + "Check each pathname argument for validity (i.e., it may be used to", + "create or access a file without causing syntax errors) and portability", + "(i.e., no filename truncation will result). If the `-p' option is", + "supplied, more extensive portability checks are performed.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. */ +struct builtin pathchk_struct = { + "pathchk", /* builtin name */ + pathchk_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + pathchk_doc, /* array of long documentation strings. */ + "pathchk [-p] pathname ...", /* usage synopsis */ + 0 /* reserved for internal use */ +}; + +/* The remainder of this file is stolen shamelessly from `pathchk.c' in + the sh-utils-1.12 distribution, by + + David MacKenzie + and Jim Meyering */ + +/* Each element is nonzero if the corresponding ASCII character is + in the POSIX portable character set, and zero if it is not. + In addition, the entry for `/' is nonzero to simplify checking. */ +static char const portable_chars[256] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0-15 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16-31 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, /* 32-47 */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 48-63 */ + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 64-79 */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 80-95 */ + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 96-111 */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 112-127 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* If PATH contains only portable characters, return 1, else 0. */ + +static int +portable_chars_only (path) + const char *path; +{ + const char *p; + + for (p = path; *p; ++p) + if (portable_chars[(const unsigned char) *p] == 0) + { + builtin_error ("path `%s' contains nonportable character `%c'", path, *p); + return 0; + } + return 1; +} + +/* On some systems, stat can return EINTR. */ + +#ifndef EINTR +# define SAFE_STAT(name, buf) stat (name, buf) +#else +# define SAFE_STAT(name, buf) safe_stat (name, buf) +static inline int +safe_stat (name, buf) + const char *name; + struct stat *buf; +{ + int ret; + + do + ret = stat (name, buf); + while (ret < 0 && errno == EINTR); + + return ret; +} +#endif + +/* Return 1 if PATH is a usable leading directory, 0 if not, + 2 if it doesn't exist. */ + +static int +dir_ok (path) + const char *path; +{ + struct stat stats; + + if (SAFE_STAT (path, &stats)) + return 2; + + if (!S_ISDIR (stats.st_mode)) + { + builtin_error ("`%s' is not a directory", path); + return 0; + } + + /* Use access to test for search permission because + testing permission bits of st_mode can lose with new + access control mechanisms. Of course, access loses if you're + running setuid. */ + if (access (path, X_OK) != 0) + { + if (errno == EACCES) + builtin_error ("directory `%s' is not searchable", path); + else + builtin_error ("%s: %s", path, strerror (errno)); + return 0; + } + + return 1; +} + +static char * +xstrdup (s) + char *s; +{ + return (savestring (s)); +} + +/* Make sure that + strlen (PATH) <= PATH_MAX + && strlen (each-existing-directory-in-PATH) <= NAME_MAX + + If PORTABILITY is nonzero, compare against _POSIX_PATH_MAX and + _POSIX_NAME_MAX instead, and make sure that PATH contains no + characters not in the POSIX portable filename character set, which + consists of A-Z, a-z, 0-9, ., _, -. + + Make sure that all leading directories along PATH that exist have + `x' permission. + + Return 0 if all of these tests are successful, 1 if any fail. */ + +static int +validate_path (path, portability) + char *path; + int portability; +{ + int path_max; + int last_elem; /* Nonzero if checking last element of path. */ + int exists; /* 2 if the path element exists. */ + char *slash; + char *parent; /* Last existing leading directory so far. */ + + if (portability && !portable_chars_only (path)) + return 1; + + if (*path == '\0') + return 0; + +#ifdef lint + /* Suppress `used before initialized' warning. */ + exists = 0; +#endif + + /* Figure out the parent of the first element in PATH. */ + parent = xstrdup (*path == '/' ? "/" : "."); + + slash = path; + last_elem = 0; + while (1) + { + int name_max; + int length; /* Length of partial path being checked. */ + char *start; /* Start of path element being checked. */ + + /* Find the end of this element of the path. + Then chop off the rest of the path after this element. */ + while (*slash == '/') + slash++; + start = slash; + slash = strchr (slash, '/'); + if (slash != NULL) + *slash = '\0'; + else + { + last_elem = 1; + slash = strchr (start, '\0'); + } + + if (!last_elem) + { + exists = dir_ok (path); + if (exists == 0) + { + free (parent); + return 1; + } + } + + length = slash - start; + /* Since we know that `parent' is a directory, it's ok to call + pathconf with it as the argument. (If `parent' isn't a directory + or doesn't exist, the behavior of pathconf is undefined.) + But if `parent' is a directory and is on a remote file system, + it's likely that pathconf can't give us a reasonable value + and will return -1. (NFS and tempfs are not POSIX . . .) + In that case, we have no choice but to assume the pessimal + POSIX minimums. */ + name_max = portability ? _POSIX_NAME_MAX : NAME_MAX_FOR (parent); + if (name_max < 0) + name_max = _POSIX_NAME_MAX; + if (length > name_max) + { + builtin_error ("name `%s' has length %d; exceeds limit of %d", + start, length, name_max); + free (parent); + return 1; + } + + if (last_elem) + break; + + if (exists == 1) + { + free (parent); + parent = xstrdup (path); + } + + *slash++ = '/'; + } + + /* `parent' is now the last existing leading directory in the whole path, + so it's ok to call pathconf with it as the argument. */ + path_max = portability ? _POSIX_PATH_MAX : PATH_MAX_FOR (parent); + if (path_max < 0) + path_max = _POSIX_PATH_MAX; + free (parent); + if (strlen (path) > path_max) + { + builtin_error ("path `%s' has length %lu; exceeds limit of %d", + path, (unsigned long)strlen (path), path_max); + return 1; + } + + return 0; +} diff --git a/bash-5.1/examples/loadables/perl/Makefile.in b/bash-5.1/examples/loadables/perl/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..aa93b50f4aff1d2c90f6c0a19c6b311a95fa0109 --- /dev/null +++ b/bash-5.1/examples/loadables/perl/Makefile.in @@ -0,0 +1,99 @@ +# +# Makefile for builtin perl interpreter +# +# +# Copyright (C) 1998 Free Software Foundation, Inc. +# +# 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 . +# + +# Include some boilerplate Gnu makefile definitions. +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +libdir = @libdir@ +infodir = @infodir@ +includedir = @includedir@ + +datarootdir = @datarootdir@ + +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +@SET_MAKE@ +CC = @CC@ +RM = rm -f + +SHELL = @MAKE_SHELL@ + +PERL5 = perl5 + +CFLAGS = -O2 -g + +# +# These values are generated for configure by ${topdir}/support/shobj-conf. +# If your system is not supported by that script, but includes facilities for +# dynamic loading of shared objects, please update the script and send the +# changes to bash-maintainers@gnu.org. +# +SHOBJ_CC = @SHOBJ_CC@ +SHOBJ_CFLAGS = @SHOBJ_CFLAGS@ +SHOBJ_LD = @SHOBJ_LD@ +SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ +SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ +SHOBJ_LIBS = @SHOBJ_LIBS@ +SHOBJ_STATUS = @SHOBJ_STATUS@ + +# Values used for compiling the perl files +PERL_LDOPTS = `${PERL5} -MExtUtils::Embed -e ldopts` +PERL_CFLAGS = ${CCFLAGS} `${PERL5} -MExtUtils::Embed -e ccopts` + +SRC = bperl.c iperl.c perlxsi.c +OBJ = bperl.o iperl.o perlxsi.o + +BUILTIN = bperl5 + +INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \ + -I$(topdir)/include -I$(BUILD_DIR) -I$(BUILD_DIR)/lib \ + -I$(BUILD_DIR)/builtins + + +${BUILTIN}: ${OBJ} + ${RM} $@ + ${SHOBJ_LD} ${SHOBJ_LDFLAGS} ${SHOBJ_XLDFLAGS} -o $@ ${OBJ} ${PERL_LDOPTS} ${SHOBJ_LIBS} + +bperl.o: bperl.c + ${RM} $@ + $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CFLAGS) $(INC) -c -o $@ ${srcdir}/bperl.c + +iperl.o: iperl.c + ${RM} $@ + $(SHOBJ_CC) ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ ${srcdir}/iperl.c + +perlxsi.c: + ${PERL5} -MExtUtils::Embed -e xsinit -- -o $@ + +perlxsi.o: perlxsi.c + ${RM} $@ + ${SHOBJ_CC} ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ perlxsi.c + +clean mostlyclean: + ${RM} ${OBJ} + ${RM} ${BUILTIN} + +distclean maintainer-clean: clean + ${RM} perlxsi.c diff --git a/bash-5.1/examples/loadables/perl/README b/bash-5.1/examples/loadables/perl/README new file mode 100644 index 0000000000000000000000000000000000000000..a70a99b565c4261f33e2cbf739a2322684f89fde --- /dev/null +++ b/bash-5.1/examples/loadables/perl/README @@ -0,0 +1,6 @@ +This illustrates how to build a perl interpreter into bash. It's not +especially useful; more a proof of concept (it provides none of the +bash internals to the perl interpreter, for example). + +This *may* require adding "-rpath /path/to/perl/CORE" and -lperl options +when compiling bash itself. diff --git a/bash-5.1/examples/loadables/perl/bperl.c b/bash-5.1/examples/loadables/perl/bperl.c new file mode 100644 index 0000000000000000000000000000000000000000..77e3f7c1b1013efba884035a37d6c92f8d924034 --- /dev/null +++ b/bash-5.1/examples/loadables/perl/bperl.c @@ -0,0 +1,46 @@ +/* + * perl builtin + */ +#include + +#include +#include + +#include "builtins.h" +#include "shell.h" + +#ifndef errno +extern int errno; +#endif + +extern char **make_builtin_argv (); +extern char **export_env; + +extern int perl_main(); + +bperl_builtin(list) +WORD_LIST *list; +{ + char **v; + int c, r; + + v = make_builtin_argv(list, &c); + r = perl_main(c, v, export_env); + free(v); + + return r; +} + +char *bperl_doc[] = { + "An interface to a perl5 interpreter.", + (char *)0 +}; + +struct builtin bperl_struct = { + "bperl", + bperl_builtin, + BUILTIN_ENABLED, + bperl_doc, + "bperl [perl options] [file ...]", + 0 +}; diff --git a/bash-5.1/examples/loadables/perl/iperl.c b/bash-5.1/examples/loadables/perl/iperl.c new file mode 100644 index 0000000000000000000000000000000000000000..92a60387d8d928e894af987c12ab380b7e9e120a --- /dev/null +++ b/bash-5.1/examples/loadables/perl/iperl.c @@ -0,0 +1,24 @@ +#include /* from the Perl distribution */ +#include /* from the Perl distribution */ + +extern void xs_init _((void)); + +static PerlInterpreter *iperl; /*** The Perl interpreter ***/ + +int +perl_main(int argc, char **argv, char **env) +{ + int r; + + iperl = perl_alloc(); + perl_construct(iperl); + perl_parse(iperl, xs_init, argc, argv, (char **)NULL); + r = perl_run(iperl); + +PerlIO_flush(PerlIO_stdout()); +PerlIO_flush(PerlIO_stderr()); + + perl_destruct(iperl); + perl_free(iperl); + return (r); +} diff --git a/bash-5.1/examples/loadables/print.c b/bash-5.1/examples/loadables/print.c new file mode 100644 index 0000000000000000000000000000000000000000..0120dbf41bccd7a37b8e2838ca4a6956a1f21f3e --- /dev/null +++ b/bash-5.1/examples/loadables/print.c @@ -0,0 +1,192 @@ +/* + * print -- loadable ksh-93 style print builtin + */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "bashtypes.h" + +#include +#include +#include + +#include "bashansi.h" +#include "shell.h" +#include "builtins.h" +#include "stdc.h" +#include "bashgetopt.h" +#include "builtext.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +int print_builtin (); +static int printargs (); + +static FILE *ofp; + +extern char *this_command_name; + +static char *print_doc[] = { + "Display arguments.", + "", + "Output the arguments. The -f option means to use the argument as a", + "format string as would be supplied to printf(1). The rest of the", + "options are as in ksh.", + (char *)NULL +}; + +struct builtin print_struct = { + "print", + print_builtin, + BUILTIN_ENABLED, + print_doc, + "print [-Rnprs] [-u unit] [-f format] [arguments]", + (char *)0 +}; + +#ifndef ISOPTION +#define ISOPTION(s, c) (s[0] == '-' && s[2] == '\0' && s[1] == c) +#endif + +int +print_builtin (list) + WORD_LIST *list; +{ + int c, r, nflag, raw, ofd, sflag; + intmax_t lfd; + char **v, *pfmt, *arg; + WORD_LIST *l; + + nflag = raw = sflag = 0; + ofd = 1; + pfmt = 0; + + reset_internal_getopt (); + while ((c = internal_getopt (list, "Rnprsu:f:")) != -1) + { + switch (c) + { + case 'R': + raw = 2; + loptend = lcurrent; + if (loptend && ISOPTION (loptend->word->word, 'n')) + { + loptend = loptend->next; + nflag = 1; + } + goto opt_end; + case 'r': + raw = 1; + break; + case 'n': + nflag = 1; + break; + case 's': + sflag = 1; + break; + case 'p': + break; /* NOP */ + case 'u': + if (all_digits (list_optarg) && legal_number (list_optarg, &lfd) && lfd == (int)lfd) + ofd = lfd; + else + { + for (l = list; l->next && l->next != lcurrent; l = l->next); + lcurrent = loptend = l; + goto opt_end; + } + break; + case 'f': + pfmt = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + +opt_end: + list = loptend; + + ofp = (ofd == 1) ? stdout : fdopen (dup (ofd), "w"); + + if (pfmt) + { + WORD_DESC *w; + WORD_LIST *nlist; + + w = make_word (pfmt); + nlist = make_word_list (w, list); + r = printf_builtin (nlist); + nlist->next = (WORD_LIST *)NULL; + dispose_words (nlist); + return (r); + } + + if (raw) + { + for (l = list; l; l = l->next) + { + fprintf (ofp, "%s", l->word->word); + if (l->next) + fprintf (ofp, " "); + } + if (nflag == 0) + fprintf (ofp, "\n"); + fflush (ofp); + return (0); + } + + r = printargs (list, ofp); + if (r && nflag == 0) + fprintf (ofp, "\n"); + if (ofd != 1) + fclose (ofp); + return 0; +} + +static int +printargs (list, ofp) + WORD_LIST *list; + FILE *ofp; +{ + WORD_LIST *l; + char *ostr; + int sawc; + + for (sawc = 0, l = list; l; l = l->next) + { + ostr = ansicstr (l->word->word, strlen (l->word->word), 0, &sawc, (int *)0); + fprintf (ofp, "%s", ostr); + free (ostr); + if (sawc) + return (0); + if (l->next) + fprintf (ofp, " "); + } + return (1); +} diff --git a/bash-5.1/examples/loadables/printenv.c b/bash-5.1/examples/loadables/printenv.c new file mode 100644 index 0000000000000000000000000000000000000000..8c7f72019941aa268dd9dcc4da1f28ccd770aa72 --- /dev/null +++ b/bash-5.1/examples/loadables/printenv.c @@ -0,0 +1,94 @@ +/* + * printenv -- minimal builtin clone of BSD printenv(1). + * + * usage: printenv [varname] + * + */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +extern char **export_env; + +int +printenv_builtin (list) + WORD_LIST *list; +{ + register char **envp; + int opt; + SHELL_VAR *var; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "")) != -1) + { + switch (opt) + { + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + /* printenv */ + if (list == 0) + { + maybe_make_export_env (); /* this allows minimal code */ + for (envp = export_env; *envp; envp++) + printf ("%s\n", *envp); + return (EXECUTION_SUCCESS); + } + + /* printenv varname */ + var = find_variable (list->word->word); + if (var == 0 || (exported_p (var) == 0)) + return (EXECUTION_FAILURE); + + if (function_p (var)) + print_var_function (var); + else + print_var_value (var, 0); + + printf("\n"); + return (EXECUTION_SUCCESS); +} + +char *printenv_doc[] = { + "Display environment.", + "", + "Print names and values of environment variables", + (char *)NULL +}; + +struct builtin printenv_struct = { + "printenv", + printenv_builtin, + BUILTIN_ENABLED, + printenv_doc, + "printenv [varname]", + 0 +}; diff --git a/bash-5.1/examples/loadables/push.c b/bash-5.1/examples/loadables/push.c new file mode 100644 index 0000000000000000000000000000000000000000..b27455b454bbe7a49f44e30ba613ca8aa2c94a2e --- /dev/null +++ b/bash-5.1/examples/loadables/push.c @@ -0,0 +1,117 @@ +/* + * push - anyone remember TOPS-20? + * + */ + +/* + Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "jobs.h" +#include "bashgetopt.h" +#include "common.h" + +#ifndef errno +extern int errno; +#endif + +extern pid_t dollar_dollar_pid; +extern int last_command_exit_value; + +int +push_builtin (list) + WORD_LIST *list; +{ + pid_t pid; + int xstatus, opt; + + xstatus = EXECUTION_SUCCESS; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "")) != -1) + { + switch (opt) + { + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + pid = make_child (savestring ("push"), 0); + if (pid == -1) + { + builtin_error ("cannot fork: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + else if (pid == 0) + { + /* Shell variable adjustments: $SHLVL, $$, $PPID, $! */ + adjust_shell_level (1); + dollar_dollar_pid = getpid (); + set_ppid (); + + /* Clean up job control stuff. */ + stop_making_children (); + cleanup_the_pipeline (); + delete_all_jobs (0); + + last_asynchronous_pid = NO_PID; + + /* Make sure the job control code has the right values for + the shell's process group and tty process group, and that + the signals are set correctly for job control. */ + initialize_job_control (0); + initialize_job_signals (); + + /* And read commands until exit. */ + reader_loop (); + exit_shell (last_command_exit_value); + } + else + { + stop_pipeline (0, (COMMAND *)NULL); + xstatus = wait_for (pid, 0); + return (xstatus); + } +} + +char *push_doc[] = { + "Create child shell.", + "", + "Create a child that is an exact duplicate of the running shell", + "and wait for it to exit. The $SHLVL, $!, $$, and $PPID variables", + "are adjusted in the child. The return value is the exit status", + "of the child.", + (char *)NULL +}; + +struct builtin push_struct = { + "push", + push_builtin, + BUILTIN_ENABLED, + push_doc, + "push", + 0 +}; diff --git a/bash-5.1/examples/loadables/realpath.c b/bash-5.1/examples/loadables/realpath.c new file mode 100644 index 0000000000000000000000000000000000000000..0974ac41b15a344a46a09b7cc9d75b4a9a60eb23 --- /dev/null +++ b/bash-5.1/examples/loadables/realpath.c @@ -0,0 +1,145 @@ +/* + * realpath -- canonicalize pathnames, resolving symlinks + * + * usage: realpath [-csv] pathname [pathname...] + * + * options: -c check whether or not each resolved path exists + * -s no output, exit status determines whether path is valid + * -v produce verbose output + * + * + * exit status: 0 if all pathnames resolved + * 1 if any of the pathname arguments could not be resolved + * + * + * Bash loadable builtin version + * + * Chet Ramey + * chet@po.cwru.edu + */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include +#include + +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include "bashansi.h" +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#ifndef errno +extern int errno; +#endif + +extern char *sh_realpath(); + +int +realpath_builtin(list) +WORD_LIST *list; +{ + int opt, cflag, vflag, sflag, es; + char *r, realbuf[PATH_MAX], *p; + struct stat sb; + + if (list == 0) { + builtin_usage(); + return (EX_USAGE); + } + + vflag = cflag = sflag = 0; + reset_internal_getopt(); + while ((opt = internal_getopt (list, "csv")) != -1) { + switch (opt) { + case 'c': + cflag = 1; + break; + case 's': + sflag = 1; + break; + case 'v': + vflag = 1; + break; + CASE_HELPOPT; + default: + builtin_usage(); + return (EX_USAGE); + } + } + + list = loptend; + + if (list == 0) { + builtin_usage(); + return (EX_USAGE); + } + + for (es = EXECUTION_SUCCESS; list; list = list->next) { + p = list->word->word; + r = sh_realpath(p, realbuf); + if (r == 0) { + es = EXECUTION_FAILURE; + if (sflag == 0) + builtin_error("%s: cannot resolve: %s", p, strerror(errno)); + continue; + } + if (cflag && (stat(realbuf, &sb) < 0)) { + es = EXECUTION_FAILURE; + if (sflag == 0) + builtin_error("%s: %s", p, strerror(errno)); + continue; + } + if (sflag == 0) { + if (vflag) + printf ("%s -> ", p); + printf("%s\n", realbuf); + } + } + return es; +} + +char *realpath_doc[] = { + "Display pathname in canonical form.", + "", + "Display the canonicalized version of each PATHNAME argument, resolving", + "symbolic links. The -c option checks whether or not each resolved name", + "exists. The -s option produces no output; the exit status determines the", + "validity of each PATHNAME. The -v option produces verbose output. The", + "exit status is 0 if each PATHNAME was resolved; non-zero otherwise.", + (char *)NULL +}; + +struct builtin realpath_struct = { + "realpath", /* builtin name */ + realpath_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + realpath_doc, /* array of long documentation strings */ + "realpath [-csv] pathname [pathname...]", /* usage synopsis */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/rm.c b/bash-5.1/examples/loadables/rm.c new file mode 100644 index 0000000000000000000000000000000000000000..0af5493c8065c8f42d93289c6d178c9d3fba33cc --- /dev/null +++ b/bash-5.1/examples/loadables/rm.c @@ -0,0 +1,181 @@ +/* rm - remove files and directories with -r */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 2016 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include +#include +#include +#include "builtins.h" +#include "shell.h" +#include "common.h" +#include "bashgetopt.h" + +#if !defined (errno) +extern int errno; +#endif + +static int rm_file(const char *fname); + +static int force, recursive; + +static int +_remove_directory(const char *dirname) +{ + DIR *dir; + struct dirent *dp; + size_t dirlen; + int err; + + dirlen = strlen (dirname); + err = 0; + + if ((dir = opendir(dirname))) + { + while ((dp = readdir(dir))) + { +#ifdef __GNUC__ + char fname[dirlen + 1 + strlen (dp->d_name) + 1]; +#else + char *fname; + int fnsize; +#endif + + if (*dp->d_name == '.' && (dp->d_name[1] == 0 || (dp->d_name[1] == '.' && dp->d_name[2] == 0))) + continue; + +#ifdef __GNUC__ + snprintf(fname, sizeof (fname), "%s/%s", dirname, dp->d_name); +#else + fnsize = dirlen + 1 + strlen (dp->d_name) + 1; + fname = xmalloc (fnsize); + snprintf(fname, fnsize, "%s/%s", dirname, dp->d_name); +#endif + + if (rm_file (fname) && force == 0) + err = 1; +#ifndef __GNUC__ + free (fname); +#endif + } + + closedir(dir); + + if (err == 0 && rmdir (dirname) && force == 0) + err = 1; + } + else if (force == 0) + err = 1; + + if (err) + builtin_error ("%s: %s", dirname, strerror (errno)); + + return err; +} + +static int +rm_file(const char *fname) +{ + if (unlink (fname) == 0) + return 0; + + /* If FNAME is a directory glibc returns EISDIR but correct POSIX value + would be EPERM. If we get that error and FNAME is a directory and -r + was supplied, recursively remove the directory and its contents */ + if ((errno == EISDIR || errno == EPERM) && recursive && file_isdir (fname)) + return _remove_directory(fname); + else if (force) + return 0; + + builtin_error ("%s: %s", fname, strerror (errno)); + return 1; +} + +int +rm_builtin (list) + WORD_LIST *list; +{ + const char *name; + WORD_LIST *l; + int rval, opt; + + recursive = force = 0; + rval = EXECUTION_SUCCESS; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "Rrfi")) != -1) + { + switch (opt) + { + case 'R': + case 'r': + recursive = 1; + break; + case 'f': + force = 1; + break; + case 'i': + return (EX_DISKFALLBACK); + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + { + if (force == 0) + { + builtin_usage (); + return (EXECUTION_FAILURE); + } + return (EXECUTION_SUCCESS); + } + + for (l = list; l; l = l->next) + { + if (rm_file(l->word->word) && force == 0) + rval = EXECUTION_FAILURE; + } + + return rval; +} + +char *rm_doc[] = { + "Remove files.", + "", + "rm removes the files specified as arguments.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. */ +struct builtin rm_struct = { + "rm", /* builtin name */ + rm_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + rm_doc, /* array of long documentation strings. */ + "rm [-rf] file ...", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/rmdir.c b/bash-5.1/examples/loadables/rmdir.c new file mode 100644 index 0000000000000000000000000000000000000000..001c2bd9b303801f70a7766f7424d9fd5ab60b71 --- /dev/null +++ b/bash-5.1/examples/loadables/rmdir.c @@ -0,0 +1,72 @@ +/* rmdir - remove directory */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include +#include +#include "builtins.h" +#include "shell.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +int +rmdir_builtin (list) + WORD_LIST *list; +{ + int rval; + WORD_LIST *l; + + if (no_options (list)) + return (EX_USAGE); + + for (rval = EXECUTION_SUCCESS, l = list; l; l = l->next) + if (rmdir (l->word->word) < 0) + { + builtin_error ("%s: %s", l->word->word, strerror (errno)); + rval = EXECUTION_FAILURE; + } + + return rval; +} + +char *rmdir_doc[] = { + "Remove directory.", + "", + "rmdir removes the directory entry specified by each argument,", + "provided the directory is empty.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. */ +struct builtin rmdir_struct = { + "rmdir", /* builtin name */ + rmdir_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + rmdir_doc, /* array of long documentation strings. */ + "rmdir directory ...", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/seq.c b/bash-5.1/examples/loadables/seq.c new file mode 100644 index 0000000000000000000000000000000000000000..e56240791f9510d078db01ac7d92480a82905891 --- /dev/null +++ b/bash-5.1/examples/loadables/seq.c @@ -0,0 +1,490 @@ +/* seq - print sequence of numbers to standard output. + Copyright (C) 2018-2020 Free Software Foundation, Inc. + + 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 . */ + +/* Written as bash builtin by Chet Ramey. Portions from seq.c by Ulrich Drepper. */ + +#include + +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include + +#include "bashansi.h" +#include "loadables.h" +#include "bashintl.h" + +#ifndef errno +extern int errno; +#endif + +#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN) +typedef long double floatmax_t; +# define FLOATMAX_CONV "L" +# define strtofltmax strtold +# define FLOATMAX_FMT "%Lg" +# define FLOATMAX_WFMT "%0.Lf" +# define USE_LONG_DOUBLE +#else +typedef double floatmax_t; +# define FLOATMAX_CONV "" +# define strtofltmax strtod +# define FLOATMAX_FMT "%g" +# define FLOATMAX_WFMT "%0.f" +#endif +static floatmax_t getfloatmax PARAMS((const char *)); +static char *genformat PARAMS((floatmax_t, floatmax_t, floatmax_t)); + +#define MAX(a, b) (((a) < (b))? (b) : (a)) + +static int conversion_error = 0; + +/* If true print all number with equal width. */ +static int equal_width; + +/* The string used to separate two numbers. */ +static char const *separator; + +/* The string output after all numbers have been output. */ +static char const terminator[] = "\n"; + +static char decimal_point; + +/* Pretty much the same as the version in builtins/printf.def */ +static floatmax_t +getfloatmax (arg) + const char *arg; +{ + floatmax_t ret; + char *ep; + + errno = 0; + ret = strtofltmax (arg, &ep); + + if (*ep) + { + sh_invalidnum ((char *)arg); + conversion_error = 1; + } + else if (errno == ERANGE) + { + builtin_error ("warning: %s: %s", arg, strerror(ERANGE)); + conversion_error = 1; + } + + if (ret == -0.0) + ret = 0.0; + + return (ret); +} + +/* If FORMAT is a valid printf format for a double argument, return + its long double equivalent, allocated from dynamic storage. This + was written by Ulrich Drepper, taken from coreutils:seq.c */ +static char * +long_double_format (char const *fmt) +{ + size_t i; + size_t length_modifier_offset; + int has_L; + + for (i = 0; ! (fmt[i] == '%' && fmt[i + 1] != '%'); i += (fmt[i] == '%') + 1) + { + if (!fmt[i]) + { + builtin_error ("format %s has no %% directive", fmt); + return 0; + } + } + + i++; + i += strspn (fmt + i, "-+#0 '"); /* zero or more flags */ + i += strspn (fmt + i, "0123456789"); /* optional minimum field width */ + if (fmt[i] == '.') /* optional precision */ + { + i++; + i += strspn (fmt + i, "0123456789"); + } + + length_modifier_offset = i; /* optional length modifier */ + /* we could ignore an 'l' length modifier here */ + has_L = (fmt[i] == 'L'); + i += has_L; + switch (fmt[i]) + { + case '\0': + builtin_error ("format %s ends in %%", fmt); + return 0; + case 'A': + case 'a': + case 'e': + case 'E': + case 'f': + case 'F': + case 'g': + case 'G': + break; + default: + builtin_error ("format %s has unknown `%%%c' directive", fmt, fmt[i]); + return 0; + } + for (i++; ; i += (fmt[i] == '%') + 1) + if (fmt[i] == '%' && fmt[i + 1] != '%') + { + builtin_error ("format %s has too many %% directives", fmt); + return 0; + } + else if (fmt[i] == 0) + { + size_t format_size = i + 1; + char *ldfmt = xmalloc (format_size + 1); + memcpy (ldfmt, fmt, length_modifier_offset); +#ifdef USE_LONG_DOUBLE + ldfmt[length_modifier_offset] = 'L'; + strcpy (ldfmt + length_modifier_offset + 1, + fmt + length_modifier_offset + has_L); +#else + strcpy (ldfmt + length_modifier_offset, fmt + length_modifier_offset); +#endif + return ldfmt; + } +} + +/* Return the number of digits following the decimal point in NUMBUF */ +static int +getprec (numbuf) + const char *numbuf; +{ + int p; + char *dp; + + if (dp = strchr (numbuf, decimal_point)) + dp++; /* skip over decimal point */ + for (p = 0; dp && *dp && ISDIGIT (*dp); dp++) + p++; + return p; +} + +/* Return the default format given FIRST, INCR, and LAST. */ +static char * +genformat (first, incr, last) + floatmax_t first, incr, last; +{ + static char buf[6 + 2 * INT_STRLEN_BOUND (int)]; + int wfirst, wlast, width; + int iprec, fprec, lprec, prec; + + if (equal_width == 0) + return (FLOATMAX_FMT); + + /* OK, we have to figure out the largest number of decimal places. This is + a little more expensive than using the original strings. */ + snprintf (buf, sizeof (buf), FLOATMAX_FMT, incr); + iprec = getprec (buf); + + wfirst = snprintf (buf, sizeof (buf), FLOATMAX_FMT, first); + fprec = getprec (buf); + + prec = MAX (fprec, iprec); + + wlast = snprintf (buf, sizeof (buf), FLOATMAX_FMT, last); + lprec = getprec (buf); + + /* increase first width by any increased precision in increment */ + wfirst += (prec - fprec); + + /* adjust last width to use precision from first/incr */ + wlast += (prec - lprec); + + if (lprec && prec == 0) + wlast--; /* no decimal point */ + if (lprec == 0 && prec) + wlast++; /* include decimal point */ + if (fprec == 0 && prec) + wfirst++; /* include decimal point */ + + width = MAX (wfirst, wlast); + if (width) + sprintf (buf, "%%0%d.%d%sf", width, prec, FLOATMAX_CONV); + else + sprintf (buf, "%%.%d%sf", prec, FLOATMAX_CONV); + + return buf; +} + +int +print_fltseq (fmt, first, last, incr) + const char *fmt; + floatmax_t first, last, incr; +{ + int n; + floatmax_t next; + const char *s; + + n = 0; /* iteration counter */ + s = ""; + for (next = first; incr >= 0 ? (next <= last) : (next >= last); next = first + n * incr) + { + QUIT; + if (*s && fputs (s, stdout) == EOF) + return (sh_chkwrite (EXECUTION_FAILURE)); + if (printf (fmt, next) < 0) + return (sh_chkwrite (EXECUTION_FAILURE)); + s = separator; + n++; + } + + if (n > 0 && fputs (terminator, stdout) == EOF) + return (sh_chkwrite (EXECUTION_FAILURE)); + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +/* must be <= INT_STRLEN_BOUND(intmax_t) */ +int +width_needed (num) + intmax_t num; +{ + int ret; + + ret = num < 0; /* sign */ + if (ret) + num = -num; + do + ret++; + while (num /= 10); + return ret; +} + +int +print_intseq (ifirst, ilast, iincr) + intmax_t ifirst, ilast, iincr; +{ + char intwfmt[6 + INT_STRLEN_BOUND(int) + sizeof (PRIdMAX)]; + const char *s; + intmax_t i, next; + + /* compute integer format string */ + if (equal_width) /* -w supplied */ + { + int wfirst, wlast, width; + + wfirst = width_needed (ifirst); + wlast = width_needed (ilast); + width = MAX(wfirst, wlast); + + /* The leading %s is for the separator */ + snprintf (intwfmt, sizeof (intwfmt), "%%s%%0%u" PRIdMAX, width); + } + + /* We could use braces.c:mkseq here but that allocates lots of memory */ + s = ""; + for (i = ifirst; (ifirst <= ilast) ? (i <= ilast) : (i >= ilast); i = next) + { + QUIT; + /* The leading %s is for the separator */ + if (printf (equal_width ? intwfmt : "%s%" PRIdMAX, s, i) < 0) + return (sh_chkwrite (EXECUTION_FAILURE)); + s = separator; + next = i + iincr; + } + + if (fputs (terminator, stdout) == EOF) + return (sh_chkwrite (EXECUTION_FAILURE)); + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +int +seq_builtin (list) + WORD_LIST *list; +{ + floatmax_t first, last, incr; + intmax_t ifirst, ilast, iincr; + WORD_LIST *l; + int opt, nargs, intseq, freefmt; + char *first_str, *incr_str, *last_str; + char const *fmtstr; /* The printf(3) format used for output. */ + + equal_width = 0; + separator = "\n"; + fmtstr = NULL; + + first = 1.0; + last = 0.0; + incr = 0.0; /* set later */ + ifirst = ilast = iincr = 0; + first_str = incr_str = last_str = 0; + + intseq = freefmt = 0; + opt = 0; + + reset_internal_getopt (); + while (opt != -1) + { + l = lcurrent ? lcurrent : list; + if (l && l->word && l->word->word && l->word->word[0] == '-' && + (l->word->word[1] == '.' || DIGIT (l->word->word[1]))) + { + loptend = l; + break; /* negative number */ + } + if ((opt = internal_getopt (list, "f:s:w")) == -1) + break; + + switch (opt) + { + case 'f': + fmtstr = list_optarg; + break; + case 's': + separator = list_optarg; + break; + case 'w': + equal_width = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + { + builtin_usage (); + return (EXECUTION_FAILURE); + } + + for (nargs = 1, l = list; l->next; l = l->next) + nargs++; + if (nargs > 3) + { + builtin_usage (); + return (EXECUTION_FAILURE); + } + + /* LAST */ + conversion_error = 0; + last = getfloatmax (last_str = l->word->word); + if (conversion_error) + return (EXECUTION_FAILURE); + + /* FIRST LAST */ + if (nargs > 1) + { + conversion_error = 0; + first = getfloatmax (first_str = list->word->word); + if (conversion_error) + return (EXECUTION_FAILURE); + } + + /* FIRST INCR LAST */ + if (nargs > 2) + { + conversion_error = 0; + incr = getfloatmax (incr_str = list->next->word->word); + if (conversion_error) + return (EXECUTION_FAILURE); + if (incr == 0.0) + { + builtin_error ("zero %screment", (first < last) ? "in" : "de"); + return (EXECUTION_FAILURE); + } + } + + /* Sanitize arguments */ + if (incr == 0.0) + incr = (first <= last) ? 1.0 : -1.0; + if ((incr < 0.0 && first < last) || (incr > 0 && first > last)) + { + builtin_error ("incorrect %screment", (first < last) ? "in" : "de"); + return (EXECUTION_FAILURE); + } + + /* validate format here */ + if (fmtstr) + { + fmtstr = long_double_format (fmtstr); + freefmt = 1; + if (fmtstr == 0) + return (EXECUTION_FAILURE); + } + + if (fmtstr != NULL && equal_width) + { + builtin_warning ("-w ignored when the format string is specified"); + equal_width = 0; + } + + /* Placeholder for later additional conditions */ + if (last_str && all_digits (last_str) && + (first_str == 0 || all_digits (first_str)) && + (incr_str == 0 || all_digits (incr_str)) && + fmtstr == NULL) + intseq = 1; + + if (intseq) + { + ifirst = (intmax_t)first; /* truncation */ + ilast = (intmax_t)last; + iincr = (intmax_t)incr; + + return (print_intseq (ifirst, ilast, iincr)); + } + + decimal_point = locale_decpoint (); + if (fmtstr == NULL) + fmtstr = genformat (first, incr, last); + + print_fltseq (fmtstr, first, last, incr); + + if (freefmt) + free ((void *)fmtstr); + return sh_chkwrite (EXECUTION_SUCCESS); +} + +/* Taken largely from GNU seq. */ +char *seq_doc[] = { + "Print numbers from FIRST to LAST, in steps of INCREMENT.", + "", + "-f FORMAT use printf style floating-point FORMAT", + "-s STRING use STRING to separate numbers (default: \\n)", + "-w equalize width by padding with leading zeroes", + "", + "If FIRST or INCREMENT is omitted, it defaults to 1. However, an", + "omitted INCREMENT defaults to -1 when LAST is smaller than FIRST.", + "The sequence of numbers ends when the sum of the current number and", + "INCREMENT would become greater than LAST.", + "FIRST, INCREMENT, and LAST are interpreted as floating point values.", + "", + "FORMAT must be suitable for printing one argument of type 'double';", + "it defaults to %.PRECf if FIRST, INCREMENT, and LAST are all fixed point", + "decimal numbers with maximum precision PREC, and to %g otherwise.", + (char *)NULL +}; + +struct builtin seq_struct = { + "seq", + seq_builtin, + BUILTIN_ENABLED, + seq_doc, + "seq [-f format] [-s separator] [-w] [FIRST [INCR]] LAST", + 0 +}; diff --git a/bash-5.1/examples/loadables/setpgid.c b/bash-5.1/examples/loadables/setpgid.c new file mode 100644 index 0000000000000000000000000000000000000000..e56fd51ed3d34166f0a6db179b52ff3e6b1f4457 --- /dev/null +++ b/bash-5.1/examples/loadables/setpgid.c @@ -0,0 +1,121 @@ +/* setpgid.c: bash loadable wrapper for setpgid system call + + An example of how to wrap a system call with a loadable builtin. + + Originally contributed by Jason Vas Dias + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include +#include + +#include "bashtypes.h" +#include "posixtime.h" + +#include + +#include "builtins.h" +#include "shell.h" +#include "common.h" + +#include "bashgetopt.h" + +#if !defined (_POSIX_VERSION) +# define setpgid(pid, pgrp) setpgrp (pid, pgrp) +#endif + +int +setpgid_builtin (list) + WORD_LIST *list; +{ + register WORD_LIST *wl; + intmax_t pid_arg, pgid_arg; + pid_t pid, pgid; + char *pidstr, *pgidstr; + + wl = list; + pid = pgid = 0; + + if (wl == 0 || wl->next == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + pidstr = wl->word ? wl->word->word : 0; + pgidstr = wl->next->word ? wl->next->word->word : 0; + + if (pidstr == 0 || pgidstr == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + if (legal_number (pidstr, &pid_arg) == 0) + { + builtin_error ("%s: pid argument must be numeric", pidstr); + return (EXECUTION_FAILURE); + } + if (pid_arg < 0) + { + builtin_error("%s: negative pid values not allowed", pidstr); + return (EXECUTION_FAILURE); + } + pid = pid_arg; + + if (legal_number (pgidstr, &pgid_arg) == 0) + { + builtin_error ("%s: pgrp argument must be numeric", pgidstr); + return (EXECUTION_FAILURE); + } + if (pgid_arg < 0) + { + builtin_error ("%s: negative pgrp values not allowed", pgidstr); + return (EXECUTION_FAILURE); + } + pgid = pgid_arg; + + errno = 0; + if (setpgid(pid, pgid) < 0) + { + builtin_error("setpgid failed: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + return (EXECUTION_SUCCESS); +} + +const char *setpgid_doc[] = { + "invoke the setpgid(2) system call", + "", + "Arguments:", + " pid : numeric process identifier, >= 0", + " pgrpid: numeric process group identifier, >=0", + "See the setpgid(2) manual page.", + (const char *)NULL +}; + +struct builtin setpgid_struct = { + "setpgid", + setpgid_builtin, + BUILTIN_ENABLED, + (char **)setpgid_doc, + "setpgid pid pgrpid", + 0 +}; diff --git a/bash-5.1/examples/loadables/sleep.c b/bash-5.1/examples/loadables/sleep.c new file mode 100644 index 0000000000000000000000000000000000000000..fc2203d4a8962ec3e9cf52ef075a64fc85d1063e --- /dev/null +++ b/bash-5.1/examples/loadables/sleep.c @@ -0,0 +1,101 @@ +/* + * sleep -- sleep for fractions of a second + * + * usage: sleep seconds[.fraction] + */ + +/* + Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (TIME_WITH_SYS_TIME) +# include +# include +#else +# if defined (HAVE_SYS_TIME_H) +# include +# else +# include +# endif +#endif + +#if defined (HAVE_UNISTD_H) +#include +#endif + +#include +#include "chartypes.h" + +#include "shell.h" +#include "builtins.h" +#include "common.h" + +int +sleep_builtin (list) +WORD_LIST *list; +{ + long sec, usec; + char *ep; + int r, mul; + time_t t; + + if (list == 0) { + builtin_usage(); + return(EX_USAGE); + } + + /* Skip over `--' */ + if (list->word && ISOPTION (list->word->word, '-')) + list = list->next; + + if (*list->word->word == '-' || list->next) { + builtin_usage (); + return (EX_USAGE); + } + + r = uconvert(list->word->word, &sec, &usec, &ep); + /* Maybe postprocess conversion failures here based on EP */ + + if (r) { + fsleep(sec, usec); + QUIT; + return(EXECUTION_SUCCESS); + } + + builtin_error("%s: bad sleep interval", list->word->word); + return (EXECUTION_FAILURE); +} + +static char *sleep_doc[] = { + "Suspend execution for specified period.", + "" + "sleep suspends execution for a minimum of SECONDS[.FRACTION] seconds.", + (char *)NULL +}; + +struct builtin sleep_struct = { + "sleep", + sleep_builtin, + BUILTIN_ENABLED, + sleep_doc, + "sleep seconds[.fraction]", + 0 +}; diff --git a/bash-5.1/examples/loadables/stat.c b/bash-5.1/examples/loadables/stat.c new file mode 100644 index 0000000000000000000000000000000000000000..52b9580fb6743c72f4af11ff9e248ab0fabad5ce --- /dev/null +++ b/bash-5.1/examples/loadables/stat.c @@ -0,0 +1,430 @@ +/* stat - load up an associative array with stat information about a file */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 2016 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include +#include "posixstat.h" +#include +#include +#include +#include +#include "posixtime.h" + +#include "bashansi.h" +#include "shell.h" +#include "builtins.h" +#include "common.h" +#include "bashgetopt.h" + +#ifndef errno +extern int errno; +#endif + +#define ST_NAME 0 +#define ST_DEV 1 +#define ST_INO 2 +#define ST_MODE 3 +#define ST_NLINK 4 +#define ST_UID 5 +#define ST_GID 6 +#define ST_RDEV 7 +#define ST_SIZE 8 +#define ST_ATIME 9 +#define ST_MTIME 10 +#define ST_CTIME 11 +#define ST_BLKSIZE 12 +#define ST_BLOCKS 13 +#define ST_CHASELINK 14 +#define ST_PERMS 15 + +#define ST_END 16 + +static char *arraysubs[] = + { + "name", "device", "inode", "type", "nlink", "uid", "gid", "rdev", + "size", "atime", "mtime", "ctime", "blksize", "blocks", "link", "perms", + 0 + }; + +static int +getstat (fname, flags, sp) + const char *fname; + int flags; + struct stat *sp; +{ + intmax_t lfd; + int fd, r; + + if (strncmp (fname, "/dev/fd/", 8) == 0) + { + if ((legal_number(fname + 8, &lfd) == 0) || (int)lfd != lfd) + { + errno = EINVAL; + return -1; + } + fd = lfd; + r = fstat(fd, sp); + } +#ifdef HAVE_LSTAT + else if (flags & 1) + r = lstat(fname, sp); +#endif + else + r = stat(fname, sp); + + return r; +} + +static char * +statlink (fname, sp) + char *fname; + struct stat *sp; +{ +#if defined (HAVE_READLINK) + char linkbuf[PATH_MAX]; + int n; + + if (fname && S_ISLNK (sp->st_mode) && (n = readlink (fname, linkbuf, PATH_MAX)) > 0) + { + linkbuf[n] = '\0'; + return (savestring (linkbuf)); + } + else +#endif + return (savestring (fname)); +} + +static char * +octalperms (m) + int m; +{ + int operms; + char *ret; + + operms = 0; + + if (m & S_IRUSR) + operms |= 0400; + if (m & S_IWUSR) + operms |= 0200; + if (m & S_IXUSR) + operms |= 0100; + + if (m & S_IRGRP) + operms |= 0040; + if (m & S_IWGRP) + operms |= 0020; + if (m & S_IXGRP) + operms |= 0010; + + if (m & S_IROTH) + operms |= 0004; + if (m & S_IWOTH) + operms |= 0002; + if (m & S_IXOTH) + operms |= 0001; + + if (m & S_ISUID) + operms |= 04000; + if (m & S_ISGID) + operms |= 02000; + if (m & S_ISVTX) + operms |= 01000; + + ret = (char *)xmalloc (16); + snprintf (ret, 16, "%04o", operms); + return ret; +} + +static char * +statperms (m) + int m; +{ + char ubits[4], gbits[4], obits[4]; /* u=rwx,g=rwx,o=rwx */ + int i; + char *ret; + + i = 0; + if (m & S_IRUSR) + ubits[i++] = 'r'; + if (m & S_IWUSR) + ubits[i++] = 'w'; + if (m & S_IXUSR) + ubits[i++] = 'x'; + ubits[i] = '\0'; + + i = 0; + if (m & S_IRGRP) + gbits[i++] = 'r'; + if (m & S_IWGRP) + gbits[i++] = 'w'; + if (m & S_IXGRP) + gbits[i++] = 'x'; + gbits[i] = '\0'; + + i = 0; + if (m & S_IROTH) + obits[i++] = 'r'; + if (m & S_IWOTH) + obits[i++] = 'w'; + if (m & S_IXOTH) + obits[i++] = 'x'; + obits[i] = '\0'; + + if (m & S_ISUID) + ubits[2] = (m & S_IXUSR) ? 's' : 'S'; + if (m & S_ISGID) + gbits[2] = (m & S_IXGRP) ? 's' : 'S'; + if (m & S_ISVTX) + obits[2] = (m & S_IXOTH) ? 't' : 'T'; + + ret = (char *)xmalloc (32); + snprintf (ret, 32, "u=%s,g=%s,o=%s", ubits, gbits, obits); + return ret; +} + +static char * +statmode(mode) + int mode; +{ + char *modestr, *m; + + modestr = m = (char *)xmalloc (8); + if (S_ISBLK (mode)) + *m++ = 'b'; + if (S_ISCHR (mode)) + *m++ = 'c'; + if (S_ISDIR (mode)) + *m++ = 'd'; + if (S_ISREG(mode)) + *m++ = '-'; + if (S_ISFIFO(mode)) + *m++ = 'p'; + if (S_ISLNK(mode)) + *m++ = 'l'; + if (S_ISSOCK(mode)) + *m++ = 's'; + +#ifdef S_ISDOOR + if (S_ISDOOR (mode)) + *m++ = 'D'; +#endif +#ifdef S_ISWHT + if (S_ISWHT(mode)) + *m++ = 'W'; +#endif +#ifdef S_ISNWK + if (S_ISNWK(mode)) + *m++ = 'n'; +#endif +#ifdef S_ISMPC + if (S_ISMPC (mode)) + *m++ = 'm'; +#endif + + *m = '\0'; + return (modestr); +} + +static char * +stattime (t) + time_t t; +{ + char *tbuf, *ret; + size_t tlen; + + tbuf = ctime (&t); + tlen = strlen (tbuf); + ret = savestring (tbuf); + ret[tlen-1] = '\0'; + return ret; +} + +static char * +statval (which, fname, flags, sp) + int which; + char *fname; + int flags; + struct stat *sp; +{ + int temp; + + switch (which) + { + case ST_NAME: + return savestring (fname); + case ST_DEV: + return itos (sp->st_dev); + case ST_INO: + return itos (sp->st_ino); + case ST_MODE: + return (statmode (sp->st_mode)); + case ST_NLINK: + return itos (sp->st_nlink); + case ST_UID: + return itos (sp->st_uid); + case ST_GID: + return itos (sp->st_gid); + case ST_RDEV: + return itos (sp->st_rdev); + case ST_SIZE: + return itos (sp->st_size); + case ST_ATIME: + return ((flags & 2) ? stattime (sp->st_atime) : itos (sp->st_atime)); + case ST_MTIME: + return ((flags & 2) ? stattime (sp->st_mtime) : itos (sp->st_mtime)); + case ST_CTIME: + return ((flags & 2) ? stattime (sp->st_ctime) : itos (sp->st_ctime)); + case ST_BLKSIZE: + return itos (sp->st_blksize); + case ST_BLOCKS: + return itos (sp->st_blocks); + case ST_CHASELINK: + return (statlink (fname, sp)); + case ST_PERMS: + temp = sp->st_mode & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID); + return (flags & 2) ? statperms (temp) : octalperms (temp); + default: + return savestring ("42"); + } +} + +static int +loadstat (vname, var, fname, flags, sp) + char *vname; + SHELL_VAR *var; + char *fname; + int flags; + struct stat *sp; +{ + int i; + char *key, *value; + SHELL_VAR *v; + + for (i = 0; arraysubs[i]; i++) + { + key = savestring (arraysubs[i]); + value = statval (i, fname, flags, sp); + v = bind_assoc_variable (var, vname, key, value, ASS_FORCE); + } + return 0; +} + +int +stat_builtin (list) + WORD_LIST *list; +{ + int opt, flags; + char *aname, *fname; + struct stat st; + SHELL_VAR *v; + + aname = "STAT"; + flags = 0; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "A:Ll")) != -1) + { + switch (opt) + { + case 'A': + aname = list_optarg; + break; + case 'L': + flags |= 1; /* operate on links rather than resolving them */ + break; + case 'l': + flags |= 2; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + fname = list->word->word; + + if (getstat (fname, flags, &st) < 0) + { + builtin_error ("%s: cannot stat: %s", fname, strerror (errno)); + return (EXECUTION_FAILURE); + } + + unbind_variable (aname); + v = make_new_assoc_variable (aname); + if (v == 0) + { + builtin_error ("%s: cannot create variable", aname); + return (EXECUTION_FAILURE); + } + if (loadstat (aname, v, fname, flags, &st) < 0) + { + builtin_error ("%s: cannot assign file status information", aname); + unbind_variable (aname); + return (EXECUTION_FAILURE); + } + + return (EXECUTION_SUCCESS); +} + +/* An array of strings forming the `long' documentation for a builtin xxx, + which is printed by `help xxx'. It must end with a NULL. By convention, + the first line is a short description. */ +char *stat_doc[] = { + "Load an associative array with file status information.", + "", + "Take a filename and load the status information returned by a", + "stat(2) call on that file into the associative array specified", + "by the -A option. The default array name is STAT. If the -L", + "option is supplied, stat does not resolve symbolic links and", + "reports information about the link itself. The -l option results", + "in longer-form listings for some of the fields. The exit status is 0", + "unless the stat fails or assigning the array is unsuccessful.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. The flags must include BUILTIN_ENABLED so the + builtin can be used. */ +struct builtin stat_struct = { + "stat", /* builtin name */ + stat_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + stat_doc, /* array of long documentation strings. */ + "stat [-lL] [-A aname] file", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/strftime.c b/bash-5.1/examples/loadables/strftime.c new file mode 100644 index 0000000000000000000000000000000000000000..f4e194e6ba471c21ba289ed9a3c2cbb2101ca01f --- /dev/null +++ b/bash-5.1/examples/loadables/strftime.c @@ -0,0 +1,128 @@ +/* strftime - loadable builtin interface to strftime(3) */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashtypes.h" +#include "posixtime.h" + +#include + +#include "builtins.h" +#include "shell.h" +#include "common.h" +#include "bashgetopt.h" + +int +strftime_builtin (list) + WORD_LIST *list; +{ + char *format, *tbuf; + size_t tbsize, tsize; + time_t secs; + struct tm *t; + int n; + intmax_t i; + + if (no_options (list)) + return (EX_USAGE); + list = loptend; + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + format = list->word->word; + if (format == 0 || *format == 0) + { + printf ("\n"); + return (EXECUTION_SUCCESS); + } + + list = list->next; + + if (list && list->word->word) + { + n = legal_number (list->word->word, &i); + if (n == 0 || i < 0 || i != (time_t)i) + { + sh_invalidnum (list->word->word); + return (EXECUTION_FAILURE); + } + else + secs = i; + } + else + secs = NOW; + + t = localtime (&secs); + + tbsize = strlen (format) * 4; + tbuf = 0; + + /* Now try to figure out how big the buffer should really be. strftime(3) + will return the number of bytes placed in the buffer unless it's greater + than MAXSIZE, in which case it returns 0. */ + for (n = 1; n <= 8; n++) + { + tbuf = xrealloc (tbuf, tbsize * n); + tsize = strftime (tbuf, tbsize * n, format, t); + if (tsize) + break; + } + + if (tsize) + printf ("%s\n", tbuf); + free (tbuf); + + return (EXECUTION_SUCCESS); +} + +/* An array of strings forming the `long' documentation for a builtin xxx, + which is printed by `help xxx'. It must end with a NULL. */ +char *strftime_doc[] = { + "Display formatted time.", + "", + "Converts date and time format to a string and displays it on the", + "standard output. If the optional second argument is supplied, it", + "is used as the number of seconds since the epoch to use in the", + "conversion, otherwise the current time is used.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. The flags must include BUILTIN_ENABLED so the + builtin can be used. */ +struct builtin strftime_struct = { + "strftime", /* builtin name */ + strftime_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + strftime_doc, /* array of long documentation strings. */ + "strftime format [seconds]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/sync.c b/bash-5.1/examples/loadables/sync.c new file mode 100644 index 0000000000000000000000000000000000000000..4fbeee1c4c74e3a7d44f6f4f33fe0a72a47066d4 --- /dev/null +++ b/bash-5.1/examples/loadables/sync.c @@ -0,0 +1,53 @@ +/* sync - sync the disks by forcing pending filesystem writes to complete */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" + +int +sync_builtin (list) + WORD_LIST *list; +{ + sync(); + return (EXECUTION_SUCCESS); +} + +char *sync_doc[] = { + "Sync disks.", + "" + "Force completion of pending disk writes", + (char *)NULL +}; + +struct builtin sync_struct = { + "sync", /* builtin name */ + sync_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + sync_doc, /* array of long documentation strings. */ + "sync", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/tee.c b/bash-5.1/examples/loadables/tee.c new file mode 100644 index 0000000000000000000000000000000000000000..283f23f1acc695f755af40b13e0abe013c263b65 --- /dev/null +++ b/bash-5.1/examples/loadables/tee.c @@ -0,0 +1,180 @@ +/* tee - duplicate standard input */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include "posixstat.h" +#include "filecntl.h" + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" + +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#if !defined (errno) +extern int errno; +#endif + +typedef struct flist { + struct flist *next; + int fd; + char *fname; +} FLIST; + +static FLIST *tee_flist; + +#define TEE_BUFSIZE 8192 + +extern int interrupt_immediately; + +extern char *strerror (); + +int +tee_builtin (list) + WORD_LIST *list; +{ + int opt, append, nointr, rval, fd, fflags; + int n, nr, nw; + FLIST *fl; + char *buf, *bp; + + char *t; + + reset_internal_getopt (); + append = nointr = 0; + tee_flist = (FLIST *)NULL; + while ((opt = internal_getopt (list, "ai")) != -1) + { + switch (opt) + { + case 'a': + append = 1; + break; + case 'i': + nointr = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (nointr == 0) + interrupt_immediately++; + + buf = xmalloc (TEE_BUFSIZE); + + /* Initialize output file list. */ + fl = tee_flist = (FLIST *)xmalloc (sizeof(FLIST)); + tee_flist->fd = 1; + tee_flist->fname = "stdout"; + tee_flist->next = (FLIST *)NULL; + + /* Add file arguments to list of output files. */ + fflags = append ? O_WRONLY|O_CREAT|O_APPEND : O_WRONLY|O_CREAT|O_TRUNC; + for (rval = EXECUTION_SUCCESS; list; list = list->next) + { + fd = open (list->word->word, fflags, 0666); + if (fd < 0) + { + builtin_error ("%s: cannot open: %s", list->word->word, strerror (errno)); + rval = EXECUTION_FAILURE; + } + else + { + fl->next = (FLIST *)xmalloc (sizeof(FLIST)); + fl->next->fd = fd; + fl->next->fname = list->word->word; + fl = fl->next; + fl->next = (FLIST *)NULL; + } + } + + while ((nr = read(0, buf, TEE_BUFSIZE)) > 0) + for (fl = tee_flist; fl; fl = fl->next) + { + n = nr; + bp = buf; + do + { + if ((nw = write (fl->fd, bp, n)) == -1) + { + builtin_error ("%s: write error: %s", fl->fname, strerror (errno)); + rval = EXECUTION_FAILURE; + break; + } + bp += nw; + } + while (n -= nw); + } + if (nr < 0) + builtin_error ("read error: %s", strerror (errno)); + + /* Deallocate resources -- this is a builtin command. */ + tee_flist = tee_flist->next; /* skip bogus close of stdout */ + while (tee_flist) + { + fl = tee_flist; + if (close (fl->fd) < 0) + { + builtin_error ("%s: close_error: %s", fl->fname, strerror (errno)); + rval = EXECUTION_FAILURE; + } + tee_flist = tee_flist->next; + free (fl); + } + + return (rval); +} + +char *tee_doc[] = { + "Duplicate standard output.", + "", + "Copy standard input to standard output, making a copy in each", + "filename argument. If the `-a' option is given, the specified", + "files are appended to, otherwise they are overwritten. If the", + "`-i' option is supplied, tee ignores interrupts.", + (char *)NULL +}; + +struct builtin tee_struct = { + "tee", /* builtin name */ + tee_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + tee_doc, /* array of long documentation strings. */ + "tee [-ai] [file ...]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/template.c b/bash-5.1/examples/loadables/template.c new file mode 100644 index 0000000000000000000000000000000000000000..094b80ce93ce9e79b06cdaad19dc9273774682b5 --- /dev/null +++ b/bash-5.1/examples/loadables/template.c @@ -0,0 +1,75 @@ +/* template - example template for loadable builtin */ + +/* See Makefile for compilation details. */ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "bashansi.h" +#include +#include + +#include "loadables.h" + +#if !defined (errno) +extern int errno; +#endif + +extern char *strerror (); + +int +template_builtin (list) + WORD_LIST *list; +{ + int opt, rval; + + rval = EXECUTION_SUCCESS; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "")) != -1) + { + switch (opt) + { + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + return (rval); +} + +/* Called when `template' is enabled and loaded from the shared object. If this + function returns 0, the load fails. */ +int +template_builtin_load (name) + char *name; +{ + return (1); +} + +/* Called when `template' is disabled. */ +void +template_builtin_unload (name) + char *name; +{ +} + +char *template_doc[] = { + "Short description.", + "" + "Longer description of builtin and usage.", + (char *)NULL +}; + +struct builtin template_struct = { + "template", /* builtin name */ + template_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + template_doc, /* array of long documentation strings. */ + "template", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/truefalse.c b/bash-5.1/examples/loadables/truefalse.c new file mode 100644 index 0000000000000000000000000000000000000000..e011fa1f955c97e8f7443bb1b1fae3572eaaf5cc --- /dev/null +++ b/bash-5.1/examples/loadables/truefalse.c @@ -0,0 +1,72 @@ +/* true and false builtins */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include "bashtypes.h" +#include "shell.h" +#include "builtins.h" +#include "common.h" + +int +true_builtin (list) + WORD_LIST *list; +{ + return EXECUTION_SUCCESS; +} + +int +false_builtin (list) + WORD_LIST *list; +{ + return EXECUTION_FAILURE; +} + +static char *true_doc[] = { + "Exit successfully.", + "", + "Return a successful result.", + (char *)NULL +}; + +static char *false_doc[] = { + "Exit unsuccessfully.", + "", + "Return an unsuccessful result.", + (char *)NULL +}; + +struct builtin true_struct = { + "true", + true_builtin, + BUILTIN_ENABLED, + true_doc, + "true", + 0 +}; + +struct builtin false_struct = { + "false", + false_builtin, + BUILTIN_ENABLED, + false_doc, + "false", + 0 +}; diff --git a/bash-5.1/examples/loadables/tty.c b/bash-5.1/examples/loadables/tty.c new file mode 100644 index 0000000000000000000000000000000000000000..febf518ba4ee5fb025e43d1dfd5f0619bbc49d39 --- /dev/null +++ b/bash-5.1/examples/loadables/tty.c @@ -0,0 +1,82 @@ +/* tty - return terminal name */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +extern char *ttyname (); + +int +tty_builtin (list) + WORD_LIST *list; +{ + int opt, sflag; + char *t; + + reset_internal_getopt (); + sflag = 0; + while ((opt = internal_getopt (list, "s")) != -1) + { + switch (opt) + { + case 's': + sflag = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + t = ttyname (0); + if (sflag == 0) + puts (t ? t : "not a tty"); + return (t ? EXECUTION_SUCCESS : EXECUTION_FAILURE); +} + +char *tty_doc[] = { + "Display terminal name.", + "", + "tty writes the name of the terminal that is opened for standard", + "input to standard output. If the `-s' option is supplied, nothing", + "is written; the exit status determines whether or not the standard", + "input is connected to a tty.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. */ +struct builtin tty_struct = { + "tty", /* builtin name */ + tty_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + tty_doc, /* array of long documentation strings. */ + "tty [-s]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/uname.c b/bash-5.1/examples/loadables/uname.c new file mode 100644 index 0000000000000000000000000000000000000000..106a1c8db5c1d59765a85b69aa2af301ea144808 --- /dev/null +++ b/bash-5.1/examples/loadables/uname.c @@ -0,0 +1,162 @@ +/* + * uname - print system information + * + * usage: uname [-amnrsv] + * + */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include + +#include "bashtypes.h" + +#if defined (HAVE_UNAME) +# include +#else +struct utsname { + char sysname[32]; + char nodename[32]; + char release[32]; + char version[32]; + char machine[32]; +}; +#endif + +#include + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#define FLAG_SYSNAME 0x01 /* -s */ +#define FLAG_NODENAME 0x02 /* -n */ +#define FLAG_RELEASE 0x04 /* -r */ +#define FLAG_VERSION 0x08 /* -v */ +#define FLAG_MACHINE 0x10 /* -m, -p */ + +#define FLAG_ALL 0x1f + +#ifndef errno +extern int errno; +#endif + +static void uprint(); + +static int uname_flags; + +int +uname_builtin (list) + WORD_LIST *list; +{ + int opt, r; + struct utsname uninfo; + + uname_flags = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "amnprsv")) != -1) + { + switch (opt) + { + case 'a': + uname_flags |= FLAG_ALL; + break; + case 'm': + case 'p': + uname_flags |= FLAG_MACHINE; + break; + case 'n': + uname_flags |= FLAG_NODENAME; + break; + case 'r': + uname_flags |= FLAG_RELEASE; + break; + case 's': + uname_flags |= FLAG_SYSNAME; + break; + case 'v': + uname_flags |= FLAG_VERSION; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list) + { + builtin_usage (); + return (EX_USAGE); + } + + if (uname_flags == 0) + uname_flags = FLAG_SYSNAME; + + /* Only ancient systems will not have uname(2). */ +#ifdef HAVE_UNAME + if (uname (&uninfo) < 0) + { + builtin_error ("cannot get system name: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } +#else + builtin_error ("cannot get system information: uname(2) not available"); + return (EXECUTION_FAILURE); +#endif + + uprint (FLAG_SYSNAME, uninfo.sysname); + uprint (FLAG_NODENAME, uninfo.nodename); + uprint (FLAG_RELEASE, uninfo.release); + uprint (FLAG_VERSION, uninfo.version); + uprint (FLAG_MACHINE, uninfo.machine); + + return (EXECUTION_SUCCESS); +} + +static void +uprint (flag, info) + int flag; + char *info; +{ + if (uname_flags & flag) + { + uname_flags &= ~flag; + printf ("%s%c", info, uname_flags ? ' ' : '\n'); + } +} + +char *uname_doc[] = { + "Display system information.", + "", + "Display information about the system hardware and OS.", + (char *)NULL +}; + +struct builtin uname_struct = { + "uname", + uname_builtin, + BUILTIN_ENABLED, + uname_doc, + "uname [-amnrsv]", + 0 +}; diff --git a/bash-5.1/examples/loadables/unlink.c b/bash-5.1/examples/loadables/unlink.c new file mode 100644 index 0000000000000000000000000000000000000000..ff2a78a03fb7fb7e18e2617b1bace7bf4ed5e413 --- /dev/null +++ b/bash-5.1/examples/loadables/unlink.c @@ -0,0 +1,74 @@ +/* unlink - remove a directory entry */ + +/* Should only be used to remove directories by a superuser prepared to let + fsck clean up the file system. */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "common.h" + +#ifndef errno +extern int errno; +#endif + +int +unlink_builtin (list) + WORD_LIST *list; +{ + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + if (unlink (list->word->word) != 0) + { + builtin_error ("%s: cannot unlink: %s", list->word->word, strerror (errno)); + return (EXECUTION_FAILURE); + } + + return (EXECUTION_SUCCESS); +} + +char *unlink_doc[] = { + "Remove a directory entry.", + "", + "Forcibly remove a directory entry, even if it's a directory.", + (char *)NULL +}; + +struct builtin unlink_struct = { + "unlink", /* builtin name */ + unlink_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + unlink_doc, /* array of long documentation strings. */ + "unlink name", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/bash-5.1/examples/loadables/whoami.c b/bash-5.1/examples/loadables/whoami.c new file mode 100644 index 0000000000000000000000000000000000000000..3e7e36e4bad97093a040544240286968b67cb798 --- /dev/null +++ b/bash-5.1/examples/loadables/whoami.c @@ -0,0 +1,75 @@ +/* + * whoami - print out username of current user + */ + +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#include + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +int +whoami_builtin (list) + WORD_LIST *list; +{ + int opt; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "")) != -1) + { + switch (opt) + { + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + if (list) + { + builtin_usage (); + return (EX_USAGE); + } + + if (current_user.user_name == 0) + get_current_user_info (); + printf ("%s\n", current_user.user_name); + return (EXECUTION_SUCCESS); +} + +char *whoami_doc[] = { + "Print user name", + "", + "Display name of current user.", + (char *)NULL +}; + +struct builtin whoami_struct = { + "whoami", + whoami_builtin, + BUILTIN_ENABLED, + whoami_doc, + "whoami", + 0 +}; diff --git a/bash-5.1/examples/misc/aliasconv.bash b/bash-5.1/examples/misc/aliasconv.bash new file mode 100755 index 0000000000000000000000000000000000000000..22a0447242c53aad513401137f6e4901c814a999 --- /dev/null +++ b/bash-5.1/examples/misc/aliasconv.bash @@ -0,0 +1,44 @@ +#! /bin/bash +# +# aliasconv.bash - convert csh aliases to bash aliases and functions +# +# usage: aliasconv.bash +# +# Chet Ramey +# chet@po.cwru.edu +# +trap 'rm -f $TMPFILE' 0 1 2 3 6 15 + +TMPFILE=$(mktemp -t cb.XXXXXX) || exit 1 + +T=$'\t' + +cat << \EOF >$TMPFILE +mkalias () +{ + case $2 in + '') echo alias ${1}="''" ;; + *[#\!]*) + comm=$(echo $2 | sed 's/\!\*/"$\@"/g + s/\!:\([1-9]\)/"$\1"/g + s/#/\#/g') + echo $1 \(\) "{" command "$comm" "; }" + ;; + *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':g")\' ;; + esac +} +EOF + +# the first thing we want to do is to protect single quotes in the alias, +# since they whole thing is going to be surrounded by single quotes when +# passed to mkalias + +sed -e "s:':\\'\\\'\\':" -e "s/^\([a-zA-Z0-9_-]*\)$T\(.*\)$/mkalias \1 '\2'/" >>$TMPFILE + +$BASH $TMPFILE | sed -e 's/\$cwd/\$PWD/g' \ + -e 's/\$term/\$TERM/g' \ + -e 's/\$home/\$HOME/g' \ + -e 's/\$user/\$USER/g' \ + -e 's/\$prompt/\$PS1/g' + +exit 0 diff --git a/bash-5.1/examples/misc/aliasconv.sh b/bash-5.1/examples/misc/aliasconv.sh new file mode 100755 index 0000000000000000000000000000000000000000..fe975d66f1a3bf5ae2d4883aefe11fd4a827e493 --- /dev/null +++ b/bash-5.1/examples/misc/aliasconv.sh @@ -0,0 +1,42 @@ +#! /bin/bash +# +# aliasconv.sh - convert csh aliases to bash aliases and functions +# +# usage: aliasconv.sh +# +# Chet Ramey +# chet@po.cwru.edu +# +trap 'rm -f $TMPFILE' 0 1 2 3 6 15 +TMPFILE=$(mktemp -t cb.XXXXXX) || exit 1 +T=' ' + +cat << \EOF >$TMPFILE +mkalias () +{ + case $2 in + '') echo alias ${1}="''" ;; + *[#\!]*) + comm=`echo $2 | sed 's/\\!\*/"$\@"/g + s/\\!:\([1-9]\)/"$\1"/g + s/#/\#/g'` + echo $1 \(\) "{" command "$comm" "; }" + ;; + *) echo alias ${1}=\'`echo "${2}" | sed "s:':'\\\\\\\\'':"`\' ;; + esac +} +EOF + +# the first thing we want to do is to protect single quotes in the alias, +# since they whole thing is going to be surrounded by single quotes when +# passed to mkalias + +sed -e "s:':\\'\\\'\\':" -e "s/^\([a-zA-Z0-9_-]*\)$T\(.*\)$/mkalias \1 '\2'/" >>$TMPFILE + +sh $TMPFILE | sed -e 's/\$cwd/\$PWD/g' \ + -e 's/\$term/\$TERM/g' \ + -e 's/\$home/\$HOME/g' \ + -e 's/\$user/\$USER/g' \ + -e 's/\$prompt/\$PS1/g' + +exit 0 diff --git a/bash-5.1/examples/misc/cshtobash b/bash-5.1/examples/misc/cshtobash new file mode 100755 index 0000000000000000000000000000000000000000..ce49bfc9f0b1df8f280d95938cf7a6a78434331e --- /dev/null +++ b/bash-5.1/examples/misc/cshtobash @@ -0,0 +1,139 @@ +#! /bin/bash +# +# cshtobash - convert csh aliases, environment variables, and variables to +# bash equivalents +# +# usage: cshtobash [filename] +# +# If filename is given, that file is sourced. Note that csh always +# sources .cshrc. To recreate your csh login environment, run +# `cshtobash ~/.login'. +# +# Inspired by (and some borrowed from) a similar program distributed with +# zsh-3.0. +# +# Chet Ramey +# chet@po.cwru.edu +# +trap 'rm -f $TMPFILE1 $TMPFILEa $TMPFILEe $TMPFILEv $TMPFILEco $TMPFILEci' 0 1 2 3 6 15 + +{ TMPFILE1=$(mktemp -t cb.1.XXXXXX) && + TMPFILEa=$(mktemp -t cb.a.XXXXXX) && + TMPFILEe=$(mktemp -t cb.e.XXXXXX) && + TMPFILEv=$(mktemp -t cb.v.XXXXXX) && + TMPFILEco=$(mktemp -t cshout.XXXXXX) && + TMPFILEci=$(mktemp -t cshin.XXXXXX) +} || exit 1 + + +T=$'\t' + +SOURCE="${1:+source $1}" + +cat << EOF >$TMPFILEci +$SOURCE +alias >! $TMPFILEa +setenv >! $TMPFILEe +set >! $TMPFILEv +EOF + +# give csh a minimal environment, similar to what login would provide +/usr/bin/env - USER=$USER HOME=$HOME PATH=/usr/bin:/bin:/usr/ucb:. TERM=$TERM SHELL=$SHELL /bin/csh -i < $TMPFILEci > $TMPFILEco 2>&1 + +# First convert aliases + +cat << \EOF >$TMPFILE1 +mkalias () +{ + case $2 in + '') echo alias ${1}="''" ;; + *[#\!]*) + comm=$(echo $2 | sed 's/\!\*/"$\@"/g + s/\!:\([1-9]\)/"$\1"/g + s/#/\#/g') + echo $1 \(\) "{" command "$comm" "; }" + ;; + *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ;; + esac +} +EOF + +sed "s/^\([a-zA-Z0-9_]*\)$T\(.*\)$/mkalias \1 '\2'/" < $TMPFILEa >>$TMPFILE1 + +echo '# csh aliases' +echo + +$BASH $TMPFILE1 | sed -e 's/\$cwd/\$PWD/g' \ + -e 's/\$term/\$TERM/g' \ + -e 's/\$home/\$HOME/g' \ + -e 's/\$user/\$USER/g' \ + -e 's/\$prompt/\$PS1/g' + +# Next, convert environment variables +echo +echo '# csh environment variables' +echo + +# Would be nice to deal with embedded newlines, e.g. in TERMCAP, but ... +sed -e '/^SHLVL/d' \ + -e '/^PWD/d' \ + -e "s/'/'"\\\\"''"/g \ + -e "s/^\([A-Za-z0-9_]*=\)/export \1'/" \ + -e "s/$/'/" < $TMPFILEe + +# Finally, convert local variables +echo +echo '# csh variables' +echo + +sed -e 's/'"$T"'/=/' \ + -e "s/'/'"\\\\"''"/g \ + -e '/^[A-Za-z0-9_]*=[^(]/{ + s/=/='"'/"' + s/$/'"'/"' + }' < $TMPFILEv | +sed -e '/^argv=/d' -e '/^cwd=/d' -e '/^filec=/d' -e '/^status=/d' \ + -e '/^verbose=/d' \ + -e '/^term=/d' \ + -e '/^home=/d' \ + -e '/^path=/d' \ + -e '/^user=/d' \ + -e '/^shell=/d' \ + -e '/^cdpath=/d' \ + -e '/^mail=/d' \ + -e '/^home=/s//HOME=/' \ + -e '/^prompt=/s//PS1=/' \ + -e '/^histfile=/s//HISTFILE=/' \ + -e '/^history=/s//HISTSIZE=/' \ + -e '/^savehist=$/s//HISTFILESIZE=${HISTSIZE-500}/' \ + -e '/^savehist=/s//HISTFILESIZE=/' \ + -e '/^ignoreeof=$/s/^.*$/set -o ignoreeof # ignoreeof/' \ + -e '/^ignoreeof=/s//IGNOREEOF=/' \ + -e '/^noclobber=/s/^.*$/set -C # noclobber/' \ + -e '/^notify=/s/^.*$/set -b # notify/' \ + -e '/^noglob=/s/^.*$/set -f # noglob/' \ + + +# now some special csh variables converted to bash equivalents +echo +echo '# special csh variables converted to bash equivalents' +echo + +sed -e 's/'"$T"'/=/' < $TMPFILEv | +grep "^cdpath=" | +sed 's/(// + s/ /:/g + s/)// + s/cdpath=/CDPATH=/' + + +sed -e 's/'"$T"'/=/' < $TMPFILEv | +grep "^mail=" | +sed 's/(// + s/ /:/g + s/)// + s/mail=/MAILPATH=/' | +sed -e 's/MAILPATH=\([0-9][0-9][^:]*\)$/MAILCHECK=\1/' \ + -e 's/MAILPATH=\([0-9][0-9][^:]*\):\(.*\)/MAILCHECK=\1 MAILPATH=\2/' + +exit 0 diff --git a/bash-5.1/examples/scripts/cat.sh b/bash-5.1/examples/scripts/cat.sh new file mode 100644 index 0000000000000000000000000000000000000000..3e65b3fc174f4f9a5c5b315c6596d79156067d26 --- /dev/null +++ b/bash-5.1/examples/scripts/cat.sh @@ -0,0 +1,12 @@ +shcat() +{ + while read -r ; do + printf "%s\n" "$REPLY" + done +} + +if [ -n "$1" ]; then + shcat < "$1" +else + shcat +fi diff --git a/bash-5.1/examples/scripts/center b/bash-5.1/examples/scripts/center new file mode 100644 index 0000000000000000000000000000000000000000..dbe613363874b63bceae69f81c3dae018dedf1a4 --- /dev/null +++ b/bash-5.1/examples/scripts/center @@ -0,0 +1,41 @@ +#! /bin/bash +# +# center - center a group of lines +# +# tabs in the lines might cause this to look a little bit off +# +# +# Chet Ramey +# +# Copyright 1999 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +width=${COLUMNS:-80} + +if [[ $# == 0 ]] +then + set -- /dev/stdin +fi + +for file +do + while read -r + do + printf "%*s\n" $(( (width+${#REPLY})/2 )) "$REPLY" + done < $file +done + +exit 0 diff --git a/bash-5.1/examples/scripts/inpath b/bash-5.1/examples/scripts/inpath new file mode 100755 index 0000000000000000000000000000000000000000..95f28bc1652185125b0d4e4021e3fe3f5e87d784 --- /dev/null +++ b/bash-5.1/examples/scripts/inpath @@ -0,0 +1,19 @@ +#! /bin/sh +# +# Search $PATH for a file the same name as $1; return TRUE if found. +# + +command=$1 +[ -n "$command" ] || exit 1 + +set `echo $PATH | sed 's/^:/.:/ + s/::/:.:/g + s/:$/:./ + s/:/ /g'` + +while [ $# -ne 0 ] ; do + [ -f $1/$command ] && exit 0 # test -x not universal + shift +done + +exit 1 diff --git a/bash-5.1/examples/scripts/shprompt b/bash-5.1/examples/scripts/shprompt new file mode 100755 index 0000000000000000000000000000000000000000..098c45f0465b3e612dd9437a476a3d7019f84424 --- /dev/null +++ b/bash-5.1/examples/scripts/shprompt @@ -0,0 +1,153 @@ +# +# shprompt -- give a prompt and get an answer satisfying certain criteria +# +# shprompt [-dDfFsy] prompt +# s = prompt for string +# f = prompt for filename +# F = prompt for full pathname to a file or directory +# d = prompt for a directory name +# D = prompt for a full pathname to a directory +# y = prompt for y or n answer +# +# Chet Ramey +# chet@ins.CWRU.Edu +# +# Copyright 2002 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +type=file + +OPTS=dDfFsy + +succeed() +{ + echo "$1" + exit 0 +} + +while getopts "$OPTS" c +do + case "$c" in + s) type=string + ;; + f) type=file + ;; + F) type=path + ;; + d) type=dir + ;; + D) type=dirpath + ;; + y) type=yesno + ;; + ?) echo "usage: $0 [-$OPTS] prompt" 1>&2 + exit 2 + ;; + esac +done + +if [ "$OPTIND" -gt 1 ] ; then + shift $(( $OPTIND - 1 )) +fi + +while : +do + case "$type" in + string) + echo -n "$1" 1>&2 + read ans || exit 1 + if [ -n "$ans" ] ; then + succeed "$ans" + fi + ;; + file|path) + echo -n "$1" 1>&2 + read ans || exit 1 + # + # use `fn' and eval so that bash will do tilde expansion for + # me + # + eval fn="$ans" + case "$fn" in + /*) if test -e "$fn" ; then + succeed "$fn" + else + echo "$0: '$fn' does not exist" 1>&2 + fi + ;; + *) if [ "$type" = "path" ] ; then + echo "$0: must give full pathname to file" 1>&2 + else + if test -e "$fn" ; then + succeed "$fn" + else + echo "$0: '$fn' does not exist" 1>&2 + fi + fi + ;; + esac + ;; + dir|dirpath) + echo -n "$1" 1>&2 + read ans || exit 1 + # + # use `fn' and eval so that bash will do tilde expansion for + # me + # + eval fn="$ans" + case "$fn" in + /*) if test -d "$fn" ; then + succeed "$fn" + elif test -e "$fn" ; then + echo "$0 '$fn' is not a directory" 1>&2 + else + echo "$0: '$fn' does not exist" 1>&2 + fi + ;; + *) if [ "$type" = "dirpath" ] ; then + echo "$0: must give full pathname to directory" 1>&2 + else + if test -d "$fn" ; then + succeed "$fn" + elif test -e "$fn" ; then + echo "$0 '$fn' is not a directory" 1>&2 + else + echo "$0: '$fn' does not exist" 1>&2 + fi + fi + ;; + esac + ;; + yesno) + echo -n "$1" 1>&2 + read ans || exit 1 + case "$ans" in + y|Y|[yY][eE][sS]) + succeed "yes" + ;; + n|N|[nN][oO]) + succeed "no" + exit 0 + ;; + *) + echo "$0: yes or no required" 1>&2 + ;; + esac + ;; + esac +done + +exit 1 diff --git a/bash-5.1/examples/scripts/spin.bash b/bash-5.1/examples/scripts/spin.bash new file mode 100644 index 0000000000000000000000000000000000000000..9fa91250386a649afc711b5fa119f4de04e9ecc9 --- /dev/null +++ b/bash-5.1/examples/scripts/spin.bash @@ -0,0 +1,37 @@ +#!/bin/bash +# +# spin.bash -- provide a `spinning wheel' to show progress +# +# Chet Ramey +# chet@po.cwru.edu +# +# Copyright 1997 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +bs=$'\b' + +chars="|${bs} \\${bs} -${bs} /${bs}" + +# Infinite loop for demo. purposes +while : +do + for letter in $chars + do + echo -n ${letter} + done +done + +exit 0 diff --git a/bash-5.1/examples/scripts/xterm_title b/bash-5.1/examples/scripts/xterm_title new file mode 100755 index 0000000000000000000000000000000000000000..839003fe229e8a8326d13aca47dcd2b4e66dd633 --- /dev/null +++ b/bash-5.1/examples/scripts/xterm_title @@ -0,0 +1,44 @@ +#! /bin/bash +# +# xterm_title - print the contents of the xterm title bar +# +# Derived from http://www.clark.net/pub/dickey/xterm/xterm.faq.html#how2_title +# + +# Copyright 1997 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +P=${0##*/} +[ -z "$DISPLAY" ] && { + echo "${P}: not running X" >&2 + exit 1 +} + +if [ -z "$TERM" ] || [ "$TERM" != "xterm" ]; then + echo "${P}: not running in an xterm" >&2 + exit 1 +fi + +exec /dev/tty +IFS='' read -r a +stty $old +b=${a#???} +echo "${b%??}" + +exit 0 diff --git a/bash-5.1/examples/scripts/zprintf b/bash-5.1/examples/scripts/zprintf new file mode 100755 index 0000000000000000000000000000000000000000..86f9e95fa9c9ec58e633a67a6c60deb3d1be7cac --- /dev/null +++ b/bash-5.1/examples/scripts/zprintf @@ -0,0 +1,43 @@ +#! /bin/bash +# +# zprintf - function that calls gawk to do printf for those systems that +# don't have a printf executable +# +# The format and arguments can have trailing commas, just like gawk +# +# example: +# zprintf 'Eat %x %x and suck %x!\n' 57005 48879 64206 +# +# Chet Ramey +# chet@po.cwru.edu + +# Copyright 1996 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +[ $# -lt 1 ] && { + echo "zprintf: usage: zprintf format [args ...]" >&2 + exit 2 +} + +fmt="${1%,}" +shift + +for a in "$@"; do + args="$args,\"${a%,}\"" +done + +gawk "BEGIN { printf \"$fmt\" $args }" diff --git a/bash-5.1/examples/startup-files/Bash_aliases b/bash-5.1/examples/startup-files/Bash_aliases new file mode 100644 index 0000000000000000000000000000000000000000..2abb93ee9ab8b6e5684fb097fc00a96f060efc0a --- /dev/null +++ b/bash-5.1/examples/startup-files/Bash_aliases @@ -0,0 +1,63 @@ +# Some useful aliases. +alias texclean='rm -f *.toc *.aux *.log *.cp *.fn *.tp *.vr *.pg *.ky' +alias clean='echo -n "Really clean this directory?"; + read yorn; + if test "$yorn" = "y"; then + rm -f \#* *~ .*~ *.bak .*.bak *.tmp .*.tmp core a.out; + echo "Cleaned."; + else + echo "Not cleaned."; + fi' +alias h='history' +alias j="jobs -l" +alias l="ls -l " +alias ll="ls -l" +alias ls="ls -F" +alias pu="pushd" +alias po="popd" + +# +# Csh compatibility: +# +alias unsetenv=unset +function setenv () { + export $1="$2" +} + +# Function which adds an alias to the current shell and to +# the ~/.bash_aliases file. +add-alias () +{ + local name=$1 value="$2" + echo alias $name=\'$value\' >>~/.bash_aliases + eval alias $name=\'$value\' + alias $name +} + +# "repeat" command. Like: +# +# repeat 10 echo foo +repeat () +{ + local count="$1" i; + shift; + for i in $(seq 1 "$count"); + do + eval "$@"; + done +} + +# Subfunction needed by `repeat'. +seq () +{ + local lower upper output; + lower=$1 upper=$2; + + if [ $lower -ge $upper ]; then return; fi + while [ $lower -le $upper ]; + do + echo -n "$lower " + lower=$(($lower + 1)) + done + echo "$lower" +} diff --git a/bash-5.1/examples/startup-files/Bash_profile b/bash-5.1/examples/startup-files/Bash_profile new file mode 100644 index 0000000000000000000000000000000000000000..141e8df1286bffdfba4974e4b2a695201b259555 --- /dev/null +++ b/bash-5.1/examples/startup-files/Bash_profile @@ -0,0 +1,18 @@ +# Startup file for bash login shells. +# +default_dir=/usr/local/lib/ + +if [ -n "$PS1" ]; then + PS1='\u@\h(\#)\$ ' + IGNOREEOF=3 +fi + +LOGIN_SHELL=true + +# If the user has her own init file, then use that one, else use the +# canonical one. +if [ -f ~/.bashrc ]; then + . ~/.bashrc +elif [ -f ${default_dir}Bashrc ]; then + . ${default_dir}Bashrc; +fi diff --git a/bash-5.1/examples/startup-files/Bashrc.bfox b/bash-5.1/examples/startup-files/Bashrc.bfox new file mode 100644 index 0000000000000000000000000000000000000000..efe7d88b85036820734eb32cc32ec14f5ffa1fb1 --- /dev/null +++ b/bash-5.1/examples/startup-files/Bashrc.bfox @@ -0,0 +1,70 @@ +# Bourne Again SHell init file. +# +# Files you make look like rw-rw-r +umask 002 + +# Don't make useless coredump files. If you want a coredump, +# say "ulimit -c unlimited" and then cause a segmentation fault. +ulimit -c 0 + +# Sometimes, there are lots of places that one can find tex inputs. +export TEXINPUTS=.:$HOME/bin:/usr/lib/tex/inputs:/usr/local/lib/tex/inputs + +# Where's the Gnu stuff at? +GNU=/usr/gnu/bin +X11=/usr/bin/X11 + +UTIL_PATH=$GNU:$X11 +STANDARD_PATH=/usr/local/bin:/usr/ucb:/bin:/usr/bin:/usr/etc:/etc:/usr/games + +if [ -d $HOME/bin/$HOSTTYPE ]; then + MY_PATH=$HOME/bin/$HOSTTYPE +fi + +if [ -d $HOME/bin ]; then + MY_PATH=$MY_PATH:$HOME/bin +fi + +if [ -d /usr/hosts ]; then + STANDARD_PATH=$STANDARD_PATH:/usr/hosts +fi + +PATH=.:$MY_PATH:$UTIL_PATH:$STANDARD_PATH + +# If not running interactively, then return +if [ -z "$PS1" ]; then + return +fi + +# Set ignoreeof if you don't want EOF as the sole input to the shell to +# immediately signal a quit condition. This only happens at the start +# of a line if the line is empty, and you haven't just deleted a character +# with C-d. I turn this on in ~/.bash_profile so that only login shells +# have the right to be obnoxious. +# set -o ignoreeof + +# Set auto_resume if you want to resume on "emacs", as well as on +# "%emacs". +auto_resume=exact + +# Set notify if you want to be asynchronously notified about background +# job completion. +set -o notify + +# Make it so that failed `exec' commands don't flush this shell. +shopt -s execfail + +if [ -z "$LOGIN_SHELL" ]; then + PS1="\u@\h\$ " +fi + +HISTSIZE=256 +MAILCHECK=60 + +# A couple of default aliases. +alias j='jobs -l' +alias po=popd +alias pu=pushd +alias ls='ls -F' + +[ -f ~/.bash_aliases ] && . ~/.bash_aliases diff --git a/bash-5.1/examples/startup-files/README b/bash-5.1/examples/startup-files/README new file mode 100644 index 0000000000000000000000000000000000000000..00df0414dc5d10b09c0cb41cafbe207b20bfb801 --- /dev/null +++ b/bash-5.1/examples/startup-files/README @@ -0,0 +1,12 @@ +Some sample startup files. The ones starting with capital letters +are originally from Brian Fox. The ones starting with lowercase +letters are from Chet Ramey. + +They will require changes for your environment. + +Bash_aliases Some useful aliases (Fox). +Bash_profile Sample startup file for bash login shells (Fox). +bash-profile Sample startup file for bash login shells (Ramey). +bashrc Sample Bourne Again SHell init file (Ramey). +Bashrc.bfox Sample Bourne Again SHell init file (Fox). +README README diff --git a/bash-5.1/examples/startup-files/bash-profile b/bash-5.1/examples/startup-files/bash-profile new file mode 100644 index 0000000000000000000000000000000000000000..e811df88fa959b6b4e80af91a7c5b7fbae485d29 --- /dev/null +++ b/bash-5.1/examples/startup-files/bash-profile @@ -0,0 +1,39 @@ +# This is the filename where your incoming mail arrives. +MAIL=~/mbox +MAILCHECK=30 + +HISTFILE=~/.history/history.$HOSTNAME + +PATH1=/usr/homes/chet/bin.$HOSTTYPE:/usr/local/bin/gnu: +PATH2=/usr/local/bin:/usr/ucb:/bin:/usr/bin/X11:. +PATH3=/usr/bin:/usr/new/bin:/usr/contrib/bin +PATH=$PATH1:$PATH2:$PATH3 + +EDITOR=/usr/local/bin/ce VISUAL=/usr/local/bin/ce FCEDIT=/usr/local/bin/ce + +SHELL=${SHELL:-${BASH:-/bin/bash}} + +PAGER=/usr/local/bin/less +LESS='-i -e -M -P%t?f%f :stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...' +# +# Bogus 1003.2 variables. This should really be in /etc/profile +# +LOGNAME=${USER-$(whoami)} +TZ=US/Eastern + +export HOME VISUAL EDITOR MAIL SHELL PATH TERM +export PAGER LESS TERMCAP HISTSIZE HISTFILE MAIL MAILCHECK LOGNAME TZ + +PS1="${HOSTNAME}\$ " +PS2='> ' +export PS1 PS2 + +umask 022 + +if [ -f /unix ] ; then + stty intr ^c # bogus +fi + +if [ -f ~/.bashrc ] ; then + . ~/.bashrc +fi diff --git a/bash-5.1/examples/startup-files/bashrc b/bash-5.1/examples/startup-files/bashrc new file mode 100644 index 0000000000000000000000000000000000000000..2d8d37b6ea92891b7d1d4e7be649349f655c6ee6 --- /dev/null +++ b/bash-5.1/examples/startup-files/bashrc @@ -0,0 +1,133 @@ +case $- in +*i*) ;; +*) return ;; +esac + +# bogus +if [ -f /unix ] ; then + alias ls='/bin/ls -CF' +else + alias ls='/bin/ls -F' +fi +alias ll='ls -l' +alias dir='ls -ba' + +alias ss="ps -aux" +alias dot='ls .[a-zA-Z0-9_]*' +alias news="xterm -g 80x45 -e trn -e -S1 -N &" + +alias c="clear" +alias m="more" +alias j="jobs" + +# common misspellings +alias mroe=more +alias pdw=pwd + +hash -p /usr/bin/mail mail + +if [ -z "$HOST" ] ; then + export HOST=${HOSTNAME} +fi + +HISTIGNORE="[ ]*:&:bg:fg" + +psgrep() +{ + ps -aux | grep $1 | grep -v grep +} + +# +# This is a little like `zap' from Kernighan and Pike +# + +pskill() +{ + local pid + + pid=$(ps -ax | grep $1 | grep -v grep | awk '{ print $1 }') + echo -n "killing $1 (process $pid)..." + kill -9 $pid + echo "slaughtered." +} + +term() +{ + TERM=$1 + export TERM + tset +} + +xtitle () +{ + echo -n -e "\033]0;$*\007" +} + +cd() +{ + builtin cd "$@" && xtitle $HOST: $PWD +} + +bold() +{ + tput smso +} + +unbold() +{ + tput rmso +} + +if [ -f /unix ] ; then +clear() +{ + tput clear +} +fi + +rot13() +{ + if [ $# = 0 ] ; then + tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]" + else + tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]" < $1 + fi +} + +watch() +{ + if [ $# -ne 1 ] ; then + tail -f nohup.out + else + tail -f $1 + fi +} + +# +# Remote login passing all 8 bits (so meta key will work) +# +rl() +{ + rlogin $* -8 +} + +function setenv() +{ + if [ $# -ne 2 ] ; then + echo "setenv: Too few arguments" + else + export $1="$2" + fi +} + +function chmog() +{ + if [ $# -ne 4 ] ; then + echo "usage: chmog mode owner group file" + return 1 + else + chmod $1 $4 + chown $2 $4 + chgrp $3 $4 + fi +} diff --git a/bash-5.1/execute_cmd.c b/bash-5.1/execute_cmd.c new file mode 100644 index 0000000000000000000000000000000000000000..c86c1a079e4f8f588e2dee545c7bb90279466550 --- /dev/null +++ b/bash-5.1/execute_cmd.c @@ -0,0 +1,6326 @@ +/* execute_cmd.c -- Execute a COMMAND structure. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX) + #pragma alloca +#endif /* _AIX && RISC6000 && !__GNUC__ */ + +#include +#include "chartypes.h" +#include "bashtypes.h" +#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include "filecntl.h" +#include "posixstat.h" +#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#ifdef HAVE_ELF_H +# include +#endif + +#include "posixtime.h" + +#if defined (HAVE_SYS_RESOURCE_H) && !defined (RLIMTYPE) +# include +#endif + +#if defined (HAVE_SYS_TIMES_H) && defined (HAVE_TIMES) +# include +#endif + +#include + +#if !defined (errno) +extern int errno; +#endif + +#define NEED_FPURGE_DECL +#define NEED_SH_SETLINEBUF_DECL + +#include "bashansi.h" +#include "bashintl.h" + +#include "memalloc.h" +#include "shell.h" +#include /* use <...> so we pick it up from the build directory */ +#include "parser.h" +#include "flags.h" +#include "builtins.h" +#include "hashlib.h" +#include "jobs.h" +#include "execute_cmd.h" +#include "findcmd.h" +#include "redir.h" +#include "trap.h" +#include "pathexp.h" +#include "hashcmd.h" + +#if defined (COND_COMMAND) +# include "test.h" +#endif + +#include "builtins/common.h" +#include "builtins/builtext.h" /* list of builtins */ + +#include "builtins/getopt.h" + +#include +#include + +#if defined (BUFFERED_INPUT) +# include "input.h" +#endif + +#if defined (ALIAS) +# include "alias.h" +#endif + +#if defined (HISTORY) +# include "bashhist.h" +#endif + +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif + +extern int command_string_index; +extern char *the_printed_command; +extern time_t shell_start_time; +#if defined (HAVE_GETTIMEOFDAY) +extern struct timeval shellstart; +#endif +#if 0 +extern char *glob_argv_flags; +#endif + +extern int close PARAMS((int)); + +/* Static functions defined and used in this file. */ +static void close_pipes PARAMS((int, int)); +static void do_piping PARAMS((int, int)); +static void bind_lastarg PARAMS((char *)); +static int shell_control_structure PARAMS((enum command_type)); +static void cleanup_redirects PARAMS((REDIRECT *)); + +#if defined (JOB_CONTROL) +static int restore_signal_mask PARAMS((sigset_t *)); +#endif + +static int builtin_status PARAMS((int)); + +static int execute_for_command PARAMS((FOR_COM *)); +#if defined (SELECT_COMMAND) +static int displen PARAMS((const char *)); +static int print_index_and_element PARAMS((int, int, WORD_LIST *)); +static void indent PARAMS((int, int)); +static void print_select_list PARAMS((WORD_LIST *, int, int, int)); +static char *select_query PARAMS((WORD_LIST *, int, char *, int)); +static int execute_select_command PARAMS((SELECT_COM *)); +#endif +#if defined (DPAREN_ARITHMETIC) +static int execute_arith_command PARAMS((ARITH_COM *)); +#endif +#if defined (COND_COMMAND) +static int execute_cond_node PARAMS((COND_COM *)); +static int execute_cond_command PARAMS((COND_COM *)); +#endif +#if defined (COMMAND_TIMING) +static int mkfmt PARAMS((char *, int, int, time_t, int)); +static void print_formatted_time PARAMS((FILE *, char *, + time_t, int, time_t, int, + time_t, int, int)); +static int time_command PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); +#endif +#if defined (ARITH_FOR_COMMAND) +static intmax_t eval_arith_for_expr PARAMS((WORD_LIST *, int *)); +static int execute_arith_for_command PARAMS((ARITH_FOR_COM *)); +#endif +static int execute_case_command PARAMS((CASE_COM *)); +static int execute_while_command PARAMS((WHILE_COM *)); +static int execute_until_command PARAMS((WHILE_COM *)); +static int execute_while_or_until PARAMS((WHILE_COM *, int)); +static int execute_if_command PARAMS((IF_COM *)); +static int execute_null_command PARAMS((REDIRECT *, int, int, int)); +static void fix_assignment_words PARAMS((WORD_LIST *)); +static int execute_simple_command PARAMS((SIMPLE_COM *, int, int, int, struct fd_bitmap *)); +static int execute_builtin PARAMS((sh_builtin_func_t *, WORD_LIST *, int, int)); +static int execute_function PARAMS((SHELL_VAR *, WORD_LIST *, int, struct fd_bitmap *, int, int)); +static int execute_builtin_or_function PARAMS((WORD_LIST *, sh_builtin_func_t *, + SHELL_VAR *, + REDIRECT *, struct fd_bitmap *, int)); +static void execute_subshell_builtin_or_function PARAMS((WORD_LIST *, REDIRECT *, + sh_builtin_func_t *, + SHELL_VAR *, + int, int, int, + struct fd_bitmap *, + int)); +static int execute_disk_command PARAMS((WORD_LIST *, REDIRECT *, char *, + int, int, int, struct fd_bitmap *, int)); + +static char *getinterp PARAMS((char *, int, int *)); +static void initialize_subshell PARAMS((void)); +static int execute_in_subshell PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); +#if defined (COPROCESS_SUPPORT) +static void coproc_setstatus PARAMS((struct coproc *, int)); +static int execute_coproc PARAMS((COMMAND *, int, int, struct fd_bitmap *)); +#endif + +static int execute_pipeline PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); + +static int execute_connection PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); + +static int execute_intern_function PARAMS((WORD_DESC *, FUNCTION_DEF *)); + +/* Set to 1 if fd 0 was the subject of redirection to a subshell. Global + so that reader_loop can set it to zero before executing a command. */ +int stdin_redir; + +/* The name of the command that is currently being executed. + `test' needs this, for example. */ +char *this_command_name; + +/* The printed representation of the currently-executing command (same as + the_printed_command), except when a trap is being executed. Useful for + a debugger to know where exactly the program is currently executing. */ +char *the_printed_command_except_trap; + +/* For catching RETURN in a function. */ +int return_catch_flag; +int return_catch_value; +procenv_t return_catch; + +/* The value returned by the last synchronous command. */ +volatile int last_command_exit_value; + +/* Whether or not the last command (corresponding to last_command_exit_value) + was terminated by a signal, and, if so, which one. */ +int last_command_exit_signal; + +/* Are we currently ignoring the -e option for the duration of a builtin's + execution? */ +int builtin_ignoring_errexit = 0; + +/* The list of redirections to perform which will undo the redirections + that I made in the shell. */ +REDIRECT *redirection_undo_list = (REDIRECT *)NULL; + +/* The list of redirections to perform which will undo the internal + redirections performed by the `exec' builtin. These are redirections + that must be undone even when exec discards redirection_undo_list. */ +REDIRECT *exec_redirection_undo_list = (REDIRECT *)NULL; + +/* When greater than zero, value is the `level' of builtins we are + currently executing (e.g. `eval echo a' would have it set to 2). */ +int executing_builtin = 0; + +/* Non-zero if we are executing a command list (a;b;c, etc.) */ +int executing_list = 0; + +/* Non-zero if failing commands in a command substitution should not exit the + shell even if -e is set. Used to pass the CMD_IGNORE_RETURN flag down to + commands run in command substitutions by parse_and_execute. */ +int comsub_ignore_return = 0; + +/* Non-zero if we have just forked and are currently running in a subshell + environment. */ +int subshell_environment; + +/* Count of nested subshells, like SHLVL. Available via $BASH_SUBSHELL */ +int subshell_level = 0; + +/* Currently-executing shell function. */ +SHELL_VAR *this_shell_function; + +/* If non-zero, matches in case and [[ ... ]] are case-insensitive */ +int match_ignore_case = 0; + +int executing_command_builtin = 0; + +struct stat SB; /* used for debugging */ + +static int special_builtin_failed; + +static COMMAND *currently_executing_command; + +/* The line number that the currently executing function starts on. */ +static int function_line_number; + +/* XXX - set to 1 if we're running the DEBUG trap and we want to show the line + number containing the function name. Used by executing_line_number to + report the correct line number. Kind of a hack. */ +static int showing_function_line; + +static int connection_count; + +/* $LINENO ($BASH_LINENO) for use by an ERR trap. Global so parse_and_execute + can save and restore it. */ +int line_number_for_err_trap; + +/* A sort of function nesting level counter */ +int funcnest = 0; +int funcnest_max = 0; + +int evalnest = 0; +int evalnest_max = EVALNEST_MAX; + +int sourcenest = 0; +int sourcenest_max = SOURCENEST_MAX; + +volatile int from_return_trap = 0; + +int lastpipe_opt = 0; + +struct fd_bitmap *current_fds_to_close = (struct fd_bitmap *)NULL; + +#define FD_BITMAP_DEFAULT_SIZE 32 + +/* Functions to allocate and deallocate the structures used to pass + information from the shell to its children about file descriptors + to close. */ +struct fd_bitmap * +new_fd_bitmap (size) + int size; +{ + struct fd_bitmap *ret; + + ret = (struct fd_bitmap *)xmalloc (sizeof (struct fd_bitmap)); + + ret->size = size; + + if (size) + { + ret->bitmap = (char *)xmalloc (size); + memset (ret->bitmap, '\0', size); + } + else + ret->bitmap = (char *)NULL; + return (ret); +} + +void +dispose_fd_bitmap (fdbp) + struct fd_bitmap *fdbp; +{ + FREE (fdbp->bitmap); + free (fdbp); +} + +void +close_fd_bitmap (fdbp) + struct fd_bitmap *fdbp; +{ + register int i; + + if (fdbp) + { + for (i = 0; i < fdbp->size; i++) + if (fdbp->bitmap[i]) + { + close (i); + fdbp->bitmap[i] = 0; + } + } +} + +/* Return the line number of the currently executing command. */ +int +executing_line_number () +{ + if (executing && showing_function_line == 0 && + (variable_context == 0 || interactive_shell == 0) && + currently_executing_command) + { +#if defined (COND_COMMAND) + if (currently_executing_command->type == cm_cond) + return currently_executing_command->value.Cond->line; +#endif +#if defined (DPAREN_ARITHMETIC) + if (currently_executing_command->type == cm_arith) + return currently_executing_command->value.Arith->line; +#endif +#if defined (ARITH_FOR_COMMAND) + if (currently_executing_command->type == cm_arith_for) + return currently_executing_command->value.ArithFor->line; +#endif + + return line_number; + } + else + return line_number; +} + +/* Execute the command passed in COMMAND. COMMAND is exactly what + read_command () places into GLOBAL_COMMAND. See "command.h" for the + details of the command structure. + + EXECUTION_SUCCESS or EXECUTION_FAILURE are the only possible + return values. Executing a command with nothing in it returns + EXECUTION_SUCCESS. */ +int +execute_command (command) + COMMAND *command; +{ + struct fd_bitmap *bitmap; + int result; + + current_fds_to_close = (struct fd_bitmap *)NULL; + bitmap = new_fd_bitmap (FD_BITMAP_DEFAULT_SIZE); + begin_unwind_frame ("execute-command"); + add_unwind_protect (dispose_fd_bitmap, (char *)bitmap); + + /* Just do the command, but not asynchronously. */ + result = execute_command_internal (command, 0, NO_PIPE, NO_PIPE, bitmap); + + dispose_fd_bitmap (bitmap); + discard_unwind_frame ("execute-command"); + +#if defined (PROCESS_SUBSTITUTION) + /* don't unlink fifos if we're in a shell function; wait until the function + returns. */ + if (variable_context == 0 && executing_list == 0) + unlink_fifo_list (); +#endif /* PROCESS_SUBSTITUTION */ + + QUIT; + return (result); +} + +/* Return 1 if TYPE is a shell control structure type. */ +static int +shell_control_structure (type) + enum command_type type; +{ + switch (type) + { +#if defined (ARITH_FOR_COMMAND) + case cm_arith_for: +#endif +#if defined (SELECT_COMMAND) + case cm_select: +#endif +#if defined (DPAREN_ARITHMETIC) + case cm_arith: +#endif +#if defined (COND_COMMAND) + case cm_cond: +#endif + case cm_case: + case cm_while: + case cm_until: + case cm_if: + case cm_for: + case cm_group: + case cm_function_def: + return (1); + + default: + return (0); + } +} + +/* A function to use to unwind_protect the redirection undo list + for loops. */ +static void +cleanup_redirects (list) + REDIRECT *list; +{ + do_redirections (list, RX_ACTIVE); + dispose_redirects (list); +} + +void +undo_partial_redirects () +{ + if (redirection_undo_list) + { + cleanup_redirects (redirection_undo_list); + redirection_undo_list = (REDIRECT *)NULL; + } +} + +#if 0 +/* Function to unwind_protect the redirections for functions and builtins. */ +static void +cleanup_func_redirects (list) + REDIRECT *list; +{ + do_redirections (list, RX_ACTIVE); +} +#endif + +void +dispose_exec_redirects () +{ + if (exec_redirection_undo_list) + { + dispose_redirects (exec_redirection_undo_list); + exec_redirection_undo_list = (REDIRECT *)NULL; + } +} + +void +dispose_partial_redirects () +{ + if (redirection_undo_list) + { + dispose_redirects (redirection_undo_list); + redirection_undo_list = (REDIRECT *)NULL; + } +} + +#if defined (JOB_CONTROL) +/* A function to restore the signal mask to its proper value when the shell + is interrupted or errors occur while creating a pipeline. */ +static int +restore_signal_mask (set) + sigset_t *set; +{ + return (sigprocmask (SIG_SETMASK, set, (sigset_t *)NULL)); +} +#endif /* JOB_CONTROL */ + +#ifdef DEBUG +/* A debugging function that can be called from gdb, for instance. */ +void +open_files () +{ + register int i; + int f, fd_table_size; + + fd_table_size = getdtablesize (); + + fprintf (stderr, "pid %ld open files:", (long)getpid ()); + for (i = 3; i < fd_table_size; i++) + { + if ((f = fcntl (i, F_GETFD, 0)) != -1) + fprintf (stderr, " %d (%s)", i, f ? "close" : "open"); + } + fprintf (stderr, "\n"); +} +#endif + +void +async_redirect_stdin () +{ + int fd; + + fd = open ("/dev/null", O_RDONLY); + if (fd > 0) + { + dup2 (fd, 0); + close (fd); + } + else if (fd < 0) + internal_error (_("cannot redirect standard input from /dev/null: %s"), strerror (errno)); +} + +#define DESCRIBE_PID(pid) do { if (interactive) describe_pid (pid); } while (0) + +extern int rpm_requires; + +/* Execute the command passed in COMMAND, perhaps doing it asynchronously. + COMMAND is exactly what read_command () places into GLOBAL_COMMAND. + ASYNCHRONOUS, if non-zero, says to do this command in the background. + PIPE_IN and PIPE_OUT are file descriptors saying where input comes + from and where it goes. They can have the value of NO_PIPE, which means + I/O is stdin/stdout. + FDS_TO_CLOSE is a list of file descriptors to close once the child has + been forked. This list often contains the unusable sides of pipes, etc. + + EXECUTION_SUCCESS or EXECUTION_FAILURE are the only possible + return values. Executing a command with nothing in it returns + EXECUTION_SUCCESS. */ +int +execute_command_internal (command, asynchronous, pipe_in, pipe_out, + fds_to_close) + COMMAND *command; + int asynchronous; + int pipe_in, pipe_out; + struct fd_bitmap *fds_to_close; +{ + int exec_result, user_subshell, invert, ignore_return, was_error_trap, fork_flags; + REDIRECT *my_undo_list, *exec_undo_list; + char *tcmd; + volatile int save_line_number; +#if defined (PROCESS_SUBSTITUTION) + volatile int ofifo, nfifo, osize, saved_fifo; + volatile void *ofifo_list; +#endif + + if (breaking || continuing) + return (last_command_exit_value); + if (command == 0 || (read_but_dont_execute && !rpm_requires)) + return (EXECUTION_SUCCESS); + if (rpm_requires && command->type == cm_function_def) + return last_command_exit_value = + execute_intern_function (command->value.Function_def->name, + command->value.Function_def); + if (read_but_dont_execute) + return (EXECUTION_SUCCESS); + + QUIT; + run_pending_traps (); + +#if 0 + if (running_trap == 0) +#endif + currently_executing_command = command; + + invert = (command->flags & CMD_INVERT_RETURN) != 0; + + /* If we're inverting the return value and `set -e' has been executed, + we don't want a failing command to inadvertently cause the shell + to exit. */ + if (exit_immediately_on_error && invert) /* XXX */ + command->flags |= CMD_IGNORE_RETURN; /* XXX */ + + exec_result = EXECUTION_SUCCESS; + + /* If a command was being explicitly run in a subshell, or if it is + a shell control-structure, and it has a pipe, then we do the command + in a subshell. */ + if (command->type == cm_subshell && (command->flags & CMD_NO_FORK)) + return (execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)); + +#if defined (COPROCESS_SUPPORT) + if (command->type == cm_coproc) + return (last_command_exit_value = execute_coproc (command, pipe_in, pipe_out, fds_to_close)); +#endif + + user_subshell = command->type == cm_subshell || ((command->flags & CMD_WANT_SUBSHELL) != 0); + +#if defined (TIME_BEFORE_SUBSHELL) + if ((command->flags & CMD_TIME_PIPELINE) && user_subshell && asynchronous == 0) + { + command->flags |= CMD_FORCE_SUBSHELL; + exec_result = time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close); + currently_executing_command = (COMMAND *)NULL; + return (exec_result); + } +#endif + + if (command->type == cm_subshell || + (command->flags & (CMD_WANT_SUBSHELL|CMD_FORCE_SUBSHELL)) || + (shell_control_structure (command->type) && + (pipe_out != NO_PIPE || pipe_in != NO_PIPE || asynchronous))) + { + pid_t paren_pid; + int s; + char *p; + + /* Fork a subshell, turn off the subshell bit, turn off job + control and call execute_command () on the command again. */ + save_line_number = line_number; + if (command->type == cm_subshell) + line_number_for_err_trap = line_number = command->value.Subshell->line; /* XXX - save value? */ + /* Otherwise we defer setting line_number */ + tcmd = make_command_string (command); + fork_flags = asynchronous ? FORK_ASYNC : 0; + paren_pid = make_child (p = savestring (tcmd), fork_flags); + + if (user_subshell && signal_is_trapped (ERROR_TRAP) && + signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + if (paren_pid == 0) + { +#if defined (JOB_CONTROL) + FREE (p); /* child doesn't use pointer */ +#endif + /* We want to run the exit trap for forced {} subshells, and we + want to note this before execute_in_subshell modifies the + COMMAND struct. Need to keep in mind that execute_in_subshell + runs the exit trap for () subshells itself. */ + /* This handles { command; } & */ + s = user_subshell == 0 && command->type == cm_group && pipe_in == NO_PIPE && pipe_out == NO_PIPE && asynchronous; + /* run exit trap for : | { ...; } and { ...; } | : */ + /* run exit trap for : | ( ...; ) and ( ...; ) | : */ + s += user_subshell == 0 && command->type == cm_group && (pipe_in != NO_PIPE || pipe_out != NO_PIPE) && asynchronous == 0; + + last_command_exit_value = execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close); + if (s) + subshell_exit (last_command_exit_value); + else + sh_exit (last_command_exit_value); + /* NOTREACHED */ + } + else + { + close_pipes (pipe_in, pipe_out); + +#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD) + if (variable_context == 0) /* wait until shell function completes */ + unlink_fifo_list (); +#endif + /* If we are part of a pipeline, and not the end of the pipeline, + then we should simply return and let the last command in the + pipe be waited for. If we are not in a pipeline, or are the + last command in the pipeline, then we wait for the subshell + and return its exit status as usual. */ + if (pipe_out != NO_PIPE) + return (EXECUTION_SUCCESS); + + stop_pipeline (asynchronous, (COMMAND *)NULL); + + line_number = save_line_number; + + if (asynchronous == 0) + { + was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0; + invert = (command->flags & CMD_INVERT_RETURN) != 0; + ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0; + + exec_result = wait_for (paren_pid, 0); + + /* If we have to, invert the return value. */ + if (invert) + exec_result = ((exec_result == EXECUTION_SUCCESS) + ? EXECUTION_FAILURE + : EXECUTION_SUCCESS); + + last_command_exit_value = exec_result; + if (user_subshell && was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS) + { + save_line_number = line_number; + line_number = line_number_for_err_trap; + run_error_trap (); + line_number = save_line_number; + } + + if (user_subshell && ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS) + { + run_pending_traps (); + jump_to_top_level (ERREXIT); + } + + return (last_command_exit_value); + } + else + { + DESCRIBE_PID (paren_pid); + + run_pending_traps (); + + /* Posix 2013 2.9.3.1: "the exit status of an asynchronous list + shall be zero." */ + last_command_exit_value = 0; + return (EXECUTION_SUCCESS); + } + } + } + +#if defined (COMMAND_TIMING) + if (command->flags & CMD_TIME_PIPELINE) + { + if (asynchronous) + { + command->flags |= CMD_FORCE_SUBSHELL; + exec_result = execute_command_internal (command, 1, pipe_in, pipe_out, fds_to_close); + } + else + { + exec_result = time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close); +#if 0 + if (running_trap == 0) +#endif + currently_executing_command = (COMMAND *)NULL; + } + return (exec_result); + } +#endif /* COMMAND_TIMING */ + + if (shell_control_structure (command->type) && command->redirects) + stdin_redir = stdin_redirects (command->redirects); + +#if defined (PROCESS_SUBSTITUTION) +# if !defined (HAVE_DEV_FD) + reap_procsubs (); +# endif + + /* XXX - also if sourcelevel != 0? */ + if (variable_context != 0 || executing_list) + { + ofifo = num_fifos (); + ofifo_list = copy_fifo_list ((int *)&osize); + begin_unwind_frame ("internal_fifos"); + if (ofifo_list) + add_unwind_protect (xfree, ofifo_list); + saved_fifo = 1; + } + else + saved_fifo = 0; +#endif + + /* Handle WHILE FOR CASE etc. with redirections. (Also '&' input + redirection.) */ + was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0; + ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0; + + if (do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE) != 0) + { + undo_partial_redirects (); + dispose_exec_redirects (); +#if defined (PROCESS_SUBSTITUTION) + if (saved_fifo) + { + free ((void *)ofifo_list); + discard_unwind_frame ("internal_fifos"); + } +#endif + + /* Handle redirection error as command failure if errexit set. */ + last_command_exit_value = EXECUTION_FAILURE; + if (ignore_return == 0 && invert == 0 && pipe_in == NO_PIPE && pipe_out == NO_PIPE) + { + if (was_error_trap) + { + save_line_number = line_number; + line_number = line_number_for_err_trap; + run_error_trap (); + line_number = save_line_number; + } + if (exit_immediately_on_error) + { + run_pending_traps (); + jump_to_top_level (ERREXIT); + } + } + return (last_command_exit_value); + } + + my_undo_list = redirection_undo_list; + redirection_undo_list = (REDIRECT *)NULL; + + exec_undo_list = exec_redirection_undo_list; + exec_redirection_undo_list = (REDIRECT *)NULL; + + if (my_undo_list || exec_undo_list) + begin_unwind_frame ("loop_redirections"); + + if (my_undo_list) + add_unwind_protect ((Function *)cleanup_redirects, my_undo_list); + + if (exec_undo_list) + add_unwind_protect ((Function *)dispose_redirects, exec_undo_list); + + QUIT; + + switch (command->type) + { + case cm_simple: + { + save_line_number = line_number; + /* We can't rely on variables retaining their values across a + call to execute_simple_command if a longjmp occurs as the + result of a `return' builtin. This is true for sure with gcc. */ +#if defined (RECYCLES_PIDS) + last_made_pid = NO_PID; +#endif + was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0; + + if (ignore_return && command->value.Simple) + command->value.Simple->flags |= CMD_IGNORE_RETURN; + if (command->flags & CMD_STDIN_REDIR) + command->value.Simple->flags |= CMD_STDIN_REDIR; + + line_number_for_err_trap = line_number = command->value.Simple->line; + exec_result = + execute_simple_command (command->value.Simple, pipe_in, pipe_out, + asynchronous, fds_to_close); + line_number = save_line_number; + + /* The temporary environment should be used for only the simple + command immediately following its definition. */ + dispose_used_env_vars (); + +#if (defined (ultrix) && defined (mips)) || defined (C_ALLOCA) + /* Reclaim memory allocated with alloca () on machines which + may be using the alloca emulation code. */ + (void) alloca (0); +#endif /* (ultrix && mips) || C_ALLOCA */ + + /* If we forked to do the command, then we must wait_for () + the child. */ + + /* XXX - this is something to watch out for if there are problems + when the shell is compiled without job control. Don't worry about + whether or not last_made_pid == last_pid; already_making_children + tells us whether or not there are unwaited-for children to wait + for and reap. */ + if (already_making_children && pipe_out == NO_PIPE) + { + stop_pipeline (asynchronous, (COMMAND *)NULL); + + if (asynchronous) + { + DESCRIBE_PID (last_made_pid); + exec_result = EXECUTION_SUCCESS; + invert = 0; /* async commands always succeed */ + } + else +#if !defined (JOB_CONTROL) + /* Do not wait for asynchronous processes started from + startup files. */ + if (last_made_pid != NO_PID && last_made_pid != last_asynchronous_pid) +#else + if (last_made_pid != NO_PID) +#endif + /* When executing a shell function that executes other + commands, this causes the last simple command in + the function to be waited for twice. This also causes + subshells forked to execute builtin commands (e.g., in + pipelines) to be waited for twice. */ + exec_result = wait_for (last_made_pid, 0); + } + } + + /* 2009/02/13 -- pipeline failure is processed elsewhere. This handles + only the failure of a simple command. We don't want to run the error + trap if the command run by the `command' builtin fails; we want to + defer that until the command builtin itself returns failure. */ + /* 2020/07/14 -- this changes with how the command builtin is handled */ + if (was_error_trap && ignore_return == 0 && invert == 0 && + pipe_in == NO_PIPE && pipe_out == NO_PIPE && + (command->value.Simple->flags & CMD_COMMAND_BUILTIN) == 0 && + exec_result != EXECUTION_SUCCESS) + { + last_command_exit_value = exec_result; + line_number = line_number_for_err_trap; + run_error_trap (); + line_number = save_line_number; + } + + if (ignore_return == 0 && invert == 0 && + ((posixly_correct && interactive == 0 && special_builtin_failed) || + (exit_immediately_on_error && pipe_in == NO_PIPE && pipe_out == NO_PIPE && exec_result != EXECUTION_SUCCESS))) + { + last_command_exit_value = exec_result; + run_pending_traps (); + + /* Undo redirections before running exit trap on the way out of + set -e. Report by Mark Farrell 5/19/2014 */ + if (exit_immediately_on_error && signal_is_trapped (0) && + unwind_protect_tag_on_stack ("saved-redirects")) + run_unwind_frame ("saved-redirects"); + + jump_to_top_level (ERREXIT); + } + + break; + + case cm_for: + if (ignore_return) + command->value.For->flags |= CMD_IGNORE_RETURN; + exec_result = execute_for_command (command->value.For); + break; + +#if defined (ARITH_FOR_COMMAND) + case cm_arith_for: + if (ignore_return) + command->value.ArithFor->flags |= CMD_IGNORE_RETURN; + exec_result = execute_arith_for_command (command->value.ArithFor); + break; +#endif + +#if defined (SELECT_COMMAND) + case cm_select: + if (ignore_return) + command->value.Select->flags |= CMD_IGNORE_RETURN; + exec_result = execute_select_command (command->value.Select); + break; +#endif + + case cm_case: + if (ignore_return) + command->value.Case->flags |= CMD_IGNORE_RETURN; + exec_result = execute_case_command (command->value.Case); + break; + + case cm_while: + if (ignore_return) + command->value.While->flags |= CMD_IGNORE_RETURN; + exec_result = execute_while_command (command->value.While); + break; + + case cm_until: + if (ignore_return) + command->value.While->flags |= CMD_IGNORE_RETURN; + exec_result = execute_until_command (command->value.While); + break; + + case cm_if: + if (ignore_return) + command->value.If->flags |= CMD_IGNORE_RETURN; + exec_result = execute_if_command (command->value.If); + break; + + case cm_group: + + /* This code can be executed from either of two paths: an explicit + '{}' command, or via a function call. If we are executed via a + function call, we have already taken care of the function being + executed in the background (down there in execute_simple_command ()), + and this command should *not* be marked as asynchronous. If we + are executing a regular '{}' group command, and asynchronous == 1, + we must want to execute the whole command in the background, so we + need a subshell, and we want the stuff executed in that subshell + (this group command) to be executed in the foreground of that + subshell (i.e. there will not be *another* subshell forked). + + What we do is to force a subshell if asynchronous, and then call + execute_command_internal again with asynchronous still set to 1, + but with the original group command, so the printed command will + look right. + + The code above that handles forking off subshells will note that + both subshell and async are on, and turn off async in the child + after forking the subshell (but leave async set in the parent, so + the normal call to describe_pid is made). This turning off + async is *crucial*; if it is not done, this will fall into an + infinite loop of executions through this spot in subshell after + subshell until the process limit is exhausted. */ + + if (asynchronous) + { + command->flags |= CMD_FORCE_SUBSHELL; + exec_result = + execute_command_internal (command, 1, pipe_in, pipe_out, + fds_to_close); + } + else + { + if (ignore_return && command->value.Group->command) + command->value.Group->command->flags |= CMD_IGNORE_RETURN; + exec_result = + execute_command_internal (command->value.Group->command, + asynchronous, pipe_in, pipe_out, + fds_to_close); + } + break; + + case cm_connection: + exec_result = execute_connection (command, asynchronous, + pipe_in, pipe_out, fds_to_close); + if (asynchronous) + invert = 0; /* XXX */ + + break; + +#if defined (DPAREN_ARITHMETIC) + case cm_arith: +#endif +#if defined (COND_COMMAND) + case cm_cond: +#endif + case cm_function_def: + was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0; +#if defined (DPAREN_ARITHMETIC) + if (ignore_return && command->type == cm_arith) + command->value.Arith->flags |= CMD_IGNORE_RETURN; +#endif +#if defined (COND_COMMAND) + if (ignore_return && command->type == cm_cond) + command->value.Cond->flags |= CMD_IGNORE_RETURN; +#endif + + line_number_for_err_trap = save_line_number = line_number; +#if defined (DPAREN_ARITHMETIC) + if (command->type == cm_arith) + exec_result = execute_arith_command (command->value.Arith); + else +#endif +#if defined (COND_COMMAND) + if (command->type == cm_cond) + exec_result = execute_cond_command (command->value.Cond); + else +#endif + if (command->type == cm_function_def) + exec_result = execute_intern_function (command->value.Function_def->name, + command->value.Function_def); + line_number = save_line_number; + + if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS) + { + last_command_exit_value = exec_result; + save_line_number = line_number; + line_number = line_number_for_err_trap; + run_error_trap (); + line_number = save_line_number; + } + + if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS) + { + last_command_exit_value = exec_result; + run_pending_traps (); + jump_to_top_level (ERREXIT); + } + + break; + + default: + command_error ("execute_command", CMDERR_BADTYPE, command->type, 0); + } + + if (my_undo_list) + cleanup_redirects (my_undo_list); + + if (exec_undo_list) + dispose_redirects (exec_undo_list); + + if (my_undo_list || exec_undo_list) + discard_unwind_frame ("loop_redirections"); + +#if defined (PROCESS_SUBSTITUTION) + if (saved_fifo) + { + nfifo = num_fifos (); + if (nfifo > ofifo) + close_new_fifos ((void *)ofifo_list, osize); + free ((void *)ofifo_list); + discard_unwind_frame ("internal_fifos"); + } +#endif + + /* Invert the return value if we have to */ + if (invert) + exec_result = (exec_result == EXECUTION_SUCCESS) + ? EXECUTION_FAILURE + : EXECUTION_SUCCESS; + +#if defined (DPAREN_ARITHMETIC) || defined (COND_COMMAND) + /* This is where we set PIPESTATUS from the exit status of the appropriate + compound commands (the ones that look enough like simple commands to + cause confusion). We might be able to optimize by not doing this if + subshell_environment != 0. */ + switch (command->type) + { +# if defined (DPAREN_ARITHMETIC) + case cm_arith: +# endif +# if defined (COND_COMMAND) + case cm_cond: +# endif + set_pipestatus_from_exit (exec_result); + break; + default: + break; + } +#endif + + last_command_exit_value = exec_result; + run_pending_traps (); + currently_executing_command = (COMMAND *)NULL; + + return (last_command_exit_value); +} + +#if defined (COMMAND_TIMING) + +#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY) +extern struct timeval *difftimeval PARAMS((struct timeval *, struct timeval *, struct timeval *)); +extern struct timeval *addtimeval PARAMS((struct timeval *, struct timeval *, struct timeval *)); +extern int timeval_to_cpu PARAMS((struct timeval *, struct timeval *, struct timeval *)); +#endif + +#define POSIX_TIMEFORMAT "real %2R\nuser %2U\nsys %2S" +#define BASH_TIMEFORMAT "\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS" + +static const int precs[] = { 0, 100, 10, 1 }; + +/* Expand one `%'-prefixed escape sequence from a time format string. */ +static int +mkfmt (buf, prec, lng, sec, sec_fraction) + char *buf; + int prec, lng; + time_t sec; + int sec_fraction; +{ + time_t min; + char abuf[INT_STRLEN_BOUND(time_t) + 1]; + int ind, aind; + + ind = 0; + abuf[sizeof(abuf) - 1] = '\0'; + + /* If LNG is non-zero, we want to decompose SEC into minutes and seconds. */ + if (lng) + { + min = sec / 60; + sec %= 60; + aind = sizeof(abuf) - 2; + do + abuf[aind--] = (min % 10) + '0'; + while (min /= 10); + aind++; + while (abuf[aind]) + buf[ind++] = abuf[aind++]; + buf[ind++] = 'm'; + } + + /* Now add the seconds. */ + aind = sizeof (abuf) - 2; + do + abuf[aind--] = (sec % 10) + '0'; + while (sec /= 10); + aind++; + while (abuf[aind]) + buf[ind++] = abuf[aind++]; + + /* We want to add a decimal point and PREC places after it if PREC is + nonzero. PREC is not greater than 3. SEC_FRACTION is between 0 + and 999. */ + if (prec != 0) + { + buf[ind++] = locale_decpoint (); + for (aind = 1; aind <= prec; aind++) + { + buf[ind++] = (sec_fraction / precs[aind]) + '0'; + sec_fraction %= precs[aind]; + } + } + + if (lng) + buf[ind++] = 's'; + buf[ind] = '\0'; + + return (ind); +} + +/* Interpret the format string FORMAT, interpolating the following escape + sequences: + %[prec][l][RUS] + + where the optional `prec' is a precision, meaning the number of + characters after the decimal point, the optional `l' means to format + using minutes and seconds (MMmNN[.FF]s), like the `times' builtin', + and the last character is one of + + R number of seconds of `real' time + U number of seconds of `user' time + S number of seconds of `system' time + + An occurrence of `%%' in the format string is translated to a `%'. The + result is printed to FP, a pointer to a FILE. The other variables are + the seconds and thousandths of a second of real, user, and system time, + resectively. */ +static void +print_formatted_time (fp, format, rs, rsf, us, usf, ss, ssf, cpu) + FILE *fp; + char *format; + time_t rs; + int rsf; + time_t us; + int usf; + time_t ss; + int ssf, cpu; +{ + int prec, lng, len; + char *str, *s, ts[INT_STRLEN_BOUND (time_t) + sizeof ("mSS.FFFF")]; + time_t sum; + int sum_frac; + int sindex, ssize; + + len = strlen (format); + ssize = (len + 64) - (len % 64); + str = (char *)xmalloc (ssize); + sindex = 0; + + for (s = format; *s; s++) + { + if (*s != '%' || s[1] == '\0') + { + RESIZE_MALLOCED_BUFFER (str, sindex, 1, ssize, 64); + str[sindex++] = *s; + } + else if (s[1] == '%') + { + s++; + RESIZE_MALLOCED_BUFFER (str, sindex, 1, ssize, 64); + str[sindex++] = *s; + } + else if (s[1] == 'P') + { + s++; +#if 0 + /* clamp CPU usage at 100% */ + if (cpu > 10000) + cpu = 10000; +#endif + sum = cpu / 100; + sum_frac = (cpu % 100) * 10; + len = mkfmt (ts, 2, 0, sum, sum_frac); + RESIZE_MALLOCED_BUFFER (str, sindex, len, ssize, 64); + strcpy (str + sindex, ts); + sindex += len; + } + else + { + prec = 3; /* default is three places past the decimal point. */ + lng = 0; /* default is to not use minutes or append `s' */ + s++; + if (DIGIT (*s)) /* `precision' */ + { + prec = *s++ - '0'; + if (prec > 3) prec = 3; + } + if (*s == 'l') /* `length extender' */ + { + lng = 1; + s++; + } + if (*s == 'R' || *s == 'E') + len = mkfmt (ts, prec, lng, rs, rsf); + else if (*s == 'U') + len = mkfmt (ts, prec, lng, us, usf); + else if (*s == 'S') + len = mkfmt (ts, prec, lng, ss, ssf); + else + { + internal_error (_("TIMEFORMAT: `%c': invalid format character"), *s); + free (str); + return; + } + RESIZE_MALLOCED_BUFFER (str, sindex, len, ssize, 64); + strcpy (str + sindex, ts); + sindex += len; + } + } + + str[sindex] = '\0'; + fprintf (fp, "%s\n", str); + fflush (fp); + + free (str); +} + +static int +time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close) + COMMAND *command; + int asynchronous, pipe_in, pipe_out; + struct fd_bitmap *fds_to_close; +{ + int rv, posix_time, old_flags, nullcmd, code; + time_t rs, us, ss; + int rsf, usf, ssf; + int cpu; + char *time_format; + volatile procenv_t save_top_level; + +#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY) + struct timeval real, user, sys; + struct timeval before, after; +# if defined (HAVE_STRUCT_TIMEZONE) + struct timezone dtz; /* posix doesn't define this */ +# endif + struct rusage selfb, selfa, kidsb, kidsa; /* a = after, b = before */ +#else +# if defined (HAVE_TIMES) + clock_t tbefore, tafter, real, user, sys; + struct tms before, after; +# endif +#endif + +#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY) +# if defined (HAVE_STRUCT_TIMEZONE) + gettimeofday (&before, &dtz); +# else + gettimeofday (&before, (void *)NULL); +# endif /* !HAVE_STRUCT_TIMEZONE */ + getrusage (RUSAGE_SELF, &selfb); + getrusage (RUSAGE_CHILDREN, &kidsb); +#else +# if defined (HAVE_TIMES) + tbefore = times (&before); +# endif +#endif + + posix_time = command && (command->flags & CMD_TIME_POSIX); + + nullcmd = (command == 0) || (command->type == cm_simple && command->value.Simple->words == 0 && command->value.Simple->redirects == 0); + if (posixly_correct && nullcmd) + { +#if defined (HAVE_GETRUSAGE) + selfb.ru_utime.tv_sec = kidsb.ru_utime.tv_sec = selfb.ru_stime.tv_sec = kidsb.ru_stime.tv_sec = 0; + selfb.ru_utime.tv_usec = kidsb.ru_utime.tv_usec = selfb.ru_stime.tv_usec = kidsb.ru_stime.tv_usec = 0; + before = shellstart; +#else + before.tms_utime = before.tms_stime = before.tms_cutime = before.tms_cstime = 0; + tbefore = shell_start_time; +#endif + } + + old_flags = command->flags; + COPY_PROCENV (top_level, save_top_level); + command->flags &= ~(CMD_TIME_PIPELINE|CMD_TIME_POSIX); + code = setjmp_nosigs (top_level); + if (code == NOT_JUMPED) + { + rv = execute_command_internal (command, asynchronous, pipe_in, pipe_out, fds_to_close); + command->flags = old_flags; + } + COPY_PROCENV (save_top_level, top_level); + + rs = us = ss = 0; + rsf = usf = ssf = cpu = 0; + +#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY) +# if defined (HAVE_STRUCT_TIMEZONE) + gettimeofday (&after, &dtz); +# else + gettimeofday (&after, (void *)NULL); +# endif /* !HAVE_STRUCT_TIMEZONE */ + getrusage (RUSAGE_SELF, &selfa); + getrusage (RUSAGE_CHILDREN, &kidsa); + + difftimeval (&real, &before, &after); + timeval_to_secs (&real, &rs, &rsf); + + addtimeval (&user, difftimeval(&after, &selfb.ru_utime, &selfa.ru_utime), + difftimeval(&before, &kidsb.ru_utime, &kidsa.ru_utime)); + timeval_to_secs (&user, &us, &usf); + + addtimeval (&sys, difftimeval(&after, &selfb.ru_stime, &selfa.ru_stime), + difftimeval(&before, &kidsb.ru_stime, &kidsa.ru_stime)); + timeval_to_secs (&sys, &ss, &ssf); + + cpu = timeval_to_cpu (&real, &user, &sys); +#else +# if defined (HAVE_TIMES) + tafter = times (&after); + + real = tafter - tbefore; + clock_t_to_secs (real, &rs, &rsf); + + user = (after.tms_utime - before.tms_utime) + (after.tms_cutime - before.tms_cutime); + clock_t_to_secs (user, &us, &usf); + + sys = (after.tms_stime - before.tms_stime) + (after.tms_cstime - before.tms_cstime); + clock_t_to_secs (sys, &ss, &ssf); + + cpu = (real == 0) ? 0 : ((user + sys) * 10000) / real; + +# else + rs = us = ss = 0; + rsf = usf = ssf = cpu = 0; +# endif +#endif + + if (posix_time) + time_format = POSIX_TIMEFORMAT; + else if ((time_format = get_string_value ("TIMEFORMAT")) == 0) + { + if (posixly_correct && nullcmd) + time_format = "user\t%2lU\nsys\t%2lS"; + else + time_format = BASH_TIMEFORMAT; + } + + if (time_format && *time_format) + print_formatted_time (stderr, time_format, rs, rsf, us, usf, ss, ssf, cpu); + + if (code) + sh_longjmp (top_level, code); + + return rv; +} +#endif /* COMMAND_TIMING */ + +/* Execute a command that's supposed to be in a subshell. This must be + called after make_child and we must be running in the child process. + The caller will return or exit() immediately with the value this returns. */ +static int +execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) + COMMAND *command; + int asynchronous; + int pipe_in, pipe_out; + struct fd_bitmap *fds_to_close; +{ + volatile int user_subshell, user_coproc, invert; + int return_code, function_value, should_redir_stdin, ois, result; + volatile COMMAND *tcom; + + USE_VAR(user_subshell); + USE_VAR(user_coproc); + USE_VAR(invert); + USE_VAR(tcom); + USE_VAR(asynchronous); + + subshell_level++; + should_redir_stdin = (asynchronous && (command->flags & CMD_STDIN_REDIR) && + pipe_in == NO_PIPE && + stdin_redirects (command->redirects) == 0); + + invert = (command->flags & CMD_INVERT_RETURN) != 0; + user_subshell = command->type == cm_subshell || ((command->flags & CMD_WANT_SUBSHELL) != 0); + user_coproc = command->type == cm_coproc; + + command->flags &= ~(CMD_FORCE_SUBSHELL | CMD_WANT_SUBSHELL | CMD_INVERT_RETURN); + + /* If a command is asynchronous in a subshell (like ( foo ) & or + the special case of an asynchronous GROUP command where the + the subshell bit is turned on down in case cm_group: below), + turn off `asynchronous', so that two subshells aren't spawned. + XXX - asynchronous used to be set to 0 in this block, but that + means that setup_async_signals was never run. Now it's set to + 0 after subshell_environment is set appropriately and setup_async_signals + is run. + + This seems semantically correct to me. For example, + ( foo ) & seems to say ``do the command `foo' in a subshell + environment, but don't wait for that subshell to finish'', + and "{ foo ; bar ; } &" seems to me to be like functions or + builtins in the background, which executed in a subshell + environment. I just don't see the need to fork two subshells. */ + + /* Don't fork again, we are already in a subshell. A `doubly + async' shell is not interactive, however. */ + if (asynchronous) + { +#if defined (JOB_CONTROL) + /* If a construct like ( exec xxx yyy ) & is given while job + control is active, we want to prevent exec from putting the + subshell back into the original process group, carefully + undoing all the work we just did in make_child. */ + original_pgrp = -1; +#endif /* JOB_CONTROL */ + ois = interactive_shell; + interactive_shell = 0; + /* This test is to prevent alias expansion by interactive shells that + run `(command) &' but to allow scripts that have enabled alias + expansion with `shopt -s expand_alias' to continue to expand + aliases. */ + if (ois != interactive_shell) + expand_aliases = 0; + } + + /* Subshells are neither login nor interactive. */ + login_shell = interactive = 0; + + /* And we're no longer in a loop. See Posix interp 842 (we are not in the + "same execution environment"). */ + if (shell_compatibility_level > 44) + loop_level = 0; + + if (user_subshell) + { + subshell_environment = SUBSHELL_PAREN; /* XXX */ + if (asynchronous) + subshell_environment |= SUBSHELL_ASYNC; + } + else + { + subshell_environment = 0; /* XXX */ + if (asynchronous) + subshell_environment |= SUBSHELL_ASYNC; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + subshell_environment |= SUBSHELL_PIPE; + if (user_coproc) + subshell_environment |= SUBSHELL_COPROC; + } + + QUIT; + CHECK_TERMSIG; + + reset_terminating_signals (); /* in sig.c */ + /* Cancel traps, in trap.c. */ + /* Reset the signal handlers in the child, but don't free the + trap strings. Set a flag noting that we have to free the + trap strings if we run trap to change a signal disposition. */ + clear_pending_traps (); + reset_signal_handlers (); + subshell_environment |= SUBSHELL_RESETTRAP; + + /* We are in a subshell, so forget that we are running a trap handler or + that the signal handler has changed (we haven't changed it!) */ + if (running_trap > 0) + { + run_trap_cleanup (running_trap - 1); + running_trap = 0; /* XXX - maybe leave this */ + } + + /* Make sure restore_original_signals doesn't undo the work done by + make_child to ensure that asynchronous children are immune to SIGINT + and SIGQUIT. Turn off asynchronous to make sure more subshells are + not spawned. */ + if (asynchronous) + { + setup_async_signals (); + asynchronous = 0; + } + else + set_sigint_handler (); + +#if defined (JOB_CONTROL) + set_sigchld_handler (); +#endif /* JOB_CONTROL */ + + /* Delete all traces that there were any jobs running. This is + only for subshells. */ + without_job_control (); + + if (fds_to_close) + close_fd_bitmap (fds_to_close); + + do_piping (pipe_in, pipe_out); + +#if defined (COPROCESS_SUPPORT) + coproc_closeall (); +#endif + +#if defined (PROCESS_SUBSTITUTION) + clear_fifo_list (); /* XXX- we haven't created any FIFOs */ +#endif + + /* If this is a user subshell, set a flag if stdin was redirected. + This is used later to decide whether to redirect fd 0 to + /dev/null for async commands in the subshell. This adds more + sh compatibility, but I'm not sure it's the right thing to do. + Note that an input pipe to a compound command suffices to inhibit + the implicit /dev/null redirection for asynchronous commands + executed as part of that compound command. */ + if (user_subshell) + { + stdin_redir = stdin_redirects (command->redirects) || pipe_in != NO_PIPE; +#if 0 + restore_default_signal (EXIT_TRAP); /* XXX - reset_signal_handlers above */ +#endif + } + else if (shell_control_structure (command->type) && pipe_in != NO_PIPE) + stdin_redir = 1; + + /* If this is an asynchronous command (command &), we want to + redirect the standard input from /dev/null in the absence of + any specific redirection involving stdin. */ + if (should_redir_stdin && stdin_redir == 0) + async_redirect_stdin (); + +#if defined (BUFFERED_INPUT) + /* In any case, we are not reading our command input from stdin. */ + default_buffered_input = -1; +#endif + +#if 0 /* TAG: bash-5.2 */ + if (user_subshell && command->type == cm_subshell) + optimize_subshell_command (command->value.Subshell->command); +#endif + + /* Do redirections, then dispose of them before recursive call. */ + if (command->redirects) + { + if (do_redirections (command->redirects, RX_ACTIVE) != 0) + exit (invert ? EXECUTION_SUCCESS : EXECUTION_FAILURE); + + dispose_redirects (command->redirects); + command->redirects = (REDIRECT *)NULL; + } + + if (command->type == cm_subshell) + tcom = command->value.Subshell->command; + else if (user_coproc) + tcom = command->value.Coproc->command; + else + tcom = command; + + if (command->flags & CMD_TIME_PIPELINE) + tcom->flags |= CMD_TIME_PIPELINE; + if (command->flags & CMD_TIME_POSIX) + tcom->flags |= CMD_TIME_POSIX; + + /* Make sure the subshell inherits any CMD_IGNORE_RETURN flag. */ + if ((command->flags & CMD_IGNORE_RETURN) && tcom != command) + tcom->flags |= CMD_IGNORE_RETURN; + + /* If this is a simple command, tell execute_disk_command that it + might be able to get away without forking and simply exec. + This means things like ( sleep 10 ) will only cause one fork. + If we're timing the command or inverting its return value, however, + we cannot do this optimization. */ + if ((user_subshell || user_coproc) && (tcom->type == cm_simple || tcom->type == cm_subshell) && + ((tcom->flags & CMD_TIME_PIPELINE) == 0) && + ((tcom->flags & CMD_INVERT_RETURN) == 0)) + { + tcom->flags |= CMD_NO_FORK; + if (tcom->type == cm_simple) + tcom->value.Simple->flags |= CMD_NO_FORK; + } + + invert = (tcom->flags & CMD_INVERT_RETURN) != 0; + tcom->flags &= ~CMD_INVERT_RETURN; + + result = setjmp_nosigs (top_level); + + /* If we're inside a function while executing this subshell, we + need to handle a possible `return'. */ + function_value = 0; + if (return_catch_flag) + function_value = setjmp_nosigs (return_catch); + + /* If we're going to exit the shell, we don't want to invert the return + status. */ + if (result == EXITPROG) + invert = 0, return_code = last_command_exit_value; + else if (result) + return_code = (last_command_exit_value == EXECUTION_SUCCESS) ? EXECUTION_FAILURE : last_command_exit_value; + else if (function_value) + return_code = return_catch_value; + else + return_code = execute_command_internal ((COMMAND *)tcom, asynchronous, NO_PIPE, NO_PIPE, fds_to_close); + + /* If we are asked to, invert the return value. */ + if (invert) + return_code = (return_code == EXECUTION_SUCCESS) ? EXECUTION_FAILURE + : EXECUTION_SUCCESS; + + + /* If we were explicitly placed in a subshell with (), we need + to do the `shell cleanup' things, such as running traps[0]. */ + if (user_subshell && signal_is_trapped (0)) + { + last_command_exit_value = return_code; + return_code = run_exit_trap (); + } + +#if 0 + subshell_level--; /* don't bother, caller will just exit */ +#endif + return (return_code); + /* NOTREACHED */ +} + +#if defined (COPROCESS_SUPPORT) +#define COPROC_MAX 16 + +typedef struct cpelement + { + struct cpelement *next; + struct coproc *coproc; + } +cpelement_t; + +typedef struct cplist + { + struct cpelement *head; + struct cpelement *tail; + int ncoproc; + int lock; + } +cplist_t; + +static struct cpelement *cpe_alloc PARAMS((struct coproc *)); +static void cpe_dispose PARAMS((struct cpelement *)); +static struct cpelement *cpl_add PARAMS((struct coproc *)); +static struct cpelement *cpl_delete PARAMS((pid_t)); +static void cpl_reap PARAMS((void)); +static void cpl_flush PARAMS((void)); +static void cpl_closeall PARAMS((void)); +static struct cpelement *cpl_search PARAMS((pid_t)); +static struct cpelement *cpl_searchbyname PARAMS((const char *)); +static void cpl_prune PARAMS((void)); + +static void coproc_free PARAMS((struct coproc *)); + +/* Will go away when there is fully-implemented support for multiple coprocs. */ +Coproc sh_coproc = { 0, NO_PID, -1, -1, 0, 0, 0, 0, 0 }; + +cplist_t coproc_list = {0, 0, 0}; + +/* Functions to manage the list of coprocs */ + +static struct cpelement * +cpe_alloc (cp) + Coproc *cp; +{ + struct cpelement *cpe; + + cpe = (struct cpelement *)xmalloc (sizeof (struct cpelement)); + cpe->coproc = cp; + cpe->next = (struct cpelement *)0; + return cpe; +} + +static void +cpe_dispose (cpe) + struct cpelement *cpe; +{ + free (cpe); +} + +static struct cpelement * +cpl_add (cp) + Coproc *cp; +{ + struct cpelement *cpe; + + cpe = cpe_alloc (cp); + + if (coproc_list.head == 0) + { + coproc_list.head = coproc_list.tail = cpe; + coproc_list.ncoproc = 0; /* just to make sure */ + } + else + { + coproc_list.tail->next = cpe; + coproc_list.tail = cpe; + } + coproc_list.ncoproc++; + + return cpe; +} + +static struct cpelement * +cpl_delete (pid) + pid_t pid; +{ + struct cpelement *prev, *p; + + for (prev = p = coproc_list.head; p; prev = p, p = p->next) + if (p->coproc->c_pid == pid) + { + prev->next = p->next; /* remove from list */ + break; + } + + if (p == 0) + return 0; /* not found */ + +#if defined (DEBUG) + itrace("cpl_delete: deleting %d", pid); +#endif + + /* Housekeeping in the border cases. */ + if (p == coproc_list.head) + coproc_list.head = coproc_list.head->next; + else if (p == coproc_list.tail) + coproc_list.tail = prev; + + coproc_list.ncoproc--; + if (coproc_list.ncoproc == 0) + coproc_list.head = coproc_list.tail = 0; + else if (coproc_list.ncoproc == 1) + coproc_list.tail = coproc_list.head; /* just to make sure */ + + return (p); +} + +static void +cpl_reap () +{ + struct cpelement *p, *next, *nh, *nt; + + /* Build a new list by removing dead coprocs and fix up the coproc_list + pointers when done. */ + nh = nt = next = (struct cpelement *)0; + for (p = coproc_list.head; p; p = next) + { + next = p->next; + if (p->coproc->c_flags & COPROC_DEAD) + { + coproc_list.ncoproc--; /* keep running count, fix up pointers later */ + +#if defined (DEBUG) + itrace("cpl_reap: deleting %d", p->coproc->c_pid); +#endif + + coproc_dispose (p->coproc); + cpe_dispose (p); + } + else if (nh == 0) + nh = nt = p; + else + { + nt->next = p; + nt = nt->next; + } + } + + if (coproc_list.ncoproc == 0) + coproc_list.head = coproc_list.tail = 0; + else + { + if (nt) + nt->next = 0; + coproc_list.head = nh; + coproc_list.tail = nt; + if (coproc_list.ncoproc == 1) + coproc_list.tail = coproc_list.head; /* just to make sure */ + } +} + +/* Clear out the list of saved statuses */ +static void +cpl_flush () +{ + struct cpelement *cpe, *p; + + for (cpe = coproc_list.head; cpe; ) + { + p = cpe; + cpe = cpe->next; + + coproc_dispose (p->coproc); + cpe_dispose (p); + } + + coproc_list.head = coproc_list.tail = 0; + coproc_list.ncoproc = 0; +} + +static void +cpl_closeall () +{ + struct cpelement *cpe; + + for (cpe = coproc_list.head; cpe; cpe = cpe->next) + coproc_close (cpe->coproc); +} + +static void +cpl_fdchk (fd) + int fd; +{ + struct cpelement *cpe; + + for (cpe = coproc_list.head; cpe; cpe = cpe->next) + coproc_checkfd (cpe->coproc, fd); +} + +/* Search for PID in the list of coprocs; return the cpelement struct if + found. If not found, return NULL. */ +static struct cpelement * +cpl_search (pid) + pid_t pid; +{ + struct cpelement *cpe; + + for (cpe = coproc_list.head ; cpe; cpe = cpe->next) + if (cpe->coproc->c_pid == pid) + return cpe; + return (struct cpelement *)NULL; +} + +/* Search for the coproc named NAME in the list of coprocs; return the + cpelement struct if found. If not found, return NULL. */ +static struct cpelement * +cpl_searchbyname (name) + const char *name; +{ + struct cpelement *cp; + + for (cp = coproc_list.head ; cp; cp = cp->next) + if (STREQ (cp->coproc->c_name, name)) + return cp; + return (struct cpelement *)NULL; +} + +static pid_t +cpl_firstactive () +{ + struct cpelement *cpe; + + for (cpe = coproc_list.head ; cpe; cpe = cpe->next) + if ((cpe->coproc->c_flags & COPROC_DEAD) == 0) + return cpe->coproc->c_pid; + return (pid_t)NO_PID; +} + +#if 0 +static void +cpl_prune () +{ + struct cpelement *cp; + + while (coproc_list.head && coproc_list.ncoproc > COPROC_MAX) + { + cp = coproc_list.head; + coproc_list.head = coproc_list.head->next; + coproc_dispose (cp->coproc); + cpe_dispose (cp); + coproc_list.ncoproc--; + } +} +#endif + +/* These currently use a single global "shell coproc" but are written in a + way to not preclude additional coprocs later (using the list management + package above). */ + +struct coproc * +getcoprocbypid (pid) + pid_t pid; +{ +#if MULTIPLE_COPROCS + struct cpelement *p; + + p = cpl_search (pid); + return (p ? p->coproc : 0); +#else + return (pid == sh_coproc.c_pid ? &sh_coproc : 0); +#endif +} + +struct coproc * +getcoprocbyname (name) + const char *name; +{ +#if MULTIPLE_COPROCS + struct cpelement *p; + + p = cpl_searchbyname (name); + return (p ? p->coproc : 0); +#else + return ((sh_coproc.c_name && STREQ (sh_coproc.c_name, name)) ? &sh_coproc : 0); +#endif +} + +void +coproc_init (cp) + struct coproc *cp; +{ + cp->c_name = 0; + cp->c_pid = NO_PID; + cp->c_rfd = cp->c_wfd = -1; + cp->c_rsave = cp->c_wsave = -1; + cp->c_flags = cp->c_status = cp->c_lock = 0; +} + +struct coproc * +coproc_alloc (name, pid) + char *name; + pid_t pid; +{ + struct coproc *cp; + +#if MULTIPLE_COPROCS + cp = (struct coproc *)xmalloc (sizeof (struct coproc)); +#else + cp = &sh_coproc; +#endif + coproc_init (cp); + cp->c_lock = 2; + + cp->c_pid = pid; + cp->c_name = savestring (name); +#if MULTIPLE_COPROCS + cpl_add (cp); +#endif + cp->c_lock = 0; + return (cp); +} + +static void +coproc_free (cp) + struct coproc *cp; +{ + free (cp); +} + +void +coproc_dispose (cp) + struct coproc *cp; +{ + sigset_t set, oset; + + if (cp == 0) + return; + + BLOCK_SIGNAL (SIGCHLD, set, oset); + cp->c_lock = 3; + coproc_unsetvars (cp); + FREE (cp->c_name); + coproc_close (cp); +#if MULTIPLE_COPROCS + coproc_free (cp); +#else + coproc_init (cp); + cp->c_lock = 0; +#endif + UNBLOCK_SIGNAL (oset); +} + +/* Placeholder for now. Will require changes for multiple coprocs */ +void +coproc_flush () +{ +#if MULTIPLE_COPROCS + cpl_flush (); +#else + coproc_dispose (&sh_coproc); +#endif +} + +void +coproc_close (cp) + struct coproc *cp; +{ + if (cp->c_rfd >= 0) + { + close (cp->c_rfd); + cp->c_rfd = -1; + } + if (cp->c_wfd >= 0) + { + close (cp->c_wfd); + cp->c_wfd = -1; + } + cp->c_rsave = cp->c_wsave = -1; +} + +void +coproc_closeall () +{ +#if MULTIPLE_COPROCS + cpl_closeall (); +#else + coproc_close (&sh_coproc); /* XXX - will require changes for multiple coprocs */ +#endif +} + +void +coproc_reap () +{ +#if MULTIPLE_COPROCS + cpl_reap (); +#else + struct coproc *cp; + + cp = &sh_coproc; /* XXX - will require changes for multiple coprocs */ + if (cp && (cp->c_flags & COPROC_DEAD)) + coproc_dispose (cp); +#endif +} + +void +coproc_rclose (cp, fd) + struct coproc *cp; + int fd; +{ + if (cp->c_rfd >= 0 && cp->c_rfd == fd) + { + close (cp->c_rfd); + cp->c_rfd = -1; + } +} + +void +coproc_wclose (cp, fd) + struct coproc *cp; + int fd; +{ + if (cp->c_wfd >= 0 && cp->c_wfd == fd) + { + close (cp->c_wfd); + cp->c_wfd = -1; + } +} + +void +coproc_checkfd (cp, fd) + struct coproc *cp; + int fd; +{ + int update; + + update = 0; + if (cp->c_rfd >= 0 && cp->c_rfd == fd) + update = cp->c_rfd = -1; + if (cp->c_wfd >= 0 && cp->c_wfd == fd) + update = cp->c_wfd = -1; + if (update) + coproc_setvars (cp); +} + +void +coproc_fdchk (fd) + int fd; +{ +#if MULTIPLE_COPROCS + cpl_fdchk (fd); +#else + coproc_checkfd (&sh_coproc, fd); +#endif +} + +void +coproc_fdclose (cp, fd) + struct coproc *cp; + int fd; +{ + coproc_rclose (cp, fd); + coproc_wclose (cp, fd); + coproc_setvars (cp); +} + +void +coproc_fdsave (cp) + struct coproc *cp; +{ + cp->c_rsave = cp->c_rfd; + cp->c_wsave = cp->c_wfd; +} + +void +coproc_fdrestore (cp) + struct coproc *cp; +{ + cp->c_rfd = cp->c_rsave; + cp->c_wfd = cp->c_wsave; +} + +static void +coproc_setstatus (cp, status) + struct coproc *cp; + int status; +{ + cp->c_lock = 4; + cp->c_status = status; + cp->c_flags |= COPROC_DEAD; + cp->c_flags &= ~COPROC_RUNNING; + /* Don't dispose the coproc or unset the COPROC_XXX variables because + this is executed in a signal handler context. Wait until coproc_reap + takes care of it. */ + cp->c_lock = 0; +} + +void +coproc_pidchk (pid, status) + pid_t pid; + int status; +{ + struct coproc *cp; + +#if MULTIPLE_COPROCS + struct cpelement *cpe; + + /* We're not disposing the coproc because this is executed in a signal + handler context */ + cpe = cpl_search (pid); + cp = cpe ? cpe->coproc : 0; +#else + cp = getcoprocbypid (pid); +#endif + if (cp) + coproc_setstatus (cp, status); +} + +pid_t +coproc_active () +{ +#if MULTIPLE_COPROCS + return (cpl_firstactive ()); +#else + return ((sh_coproc.c_flags & COPROC_DEAD) ? NO_PID : sh_coproc.c_pid); +#endif +} +void +coproc_setvars (cp) + struct coproc *cp; +{ + SHELL_VAR *v; + char *namevar, *t; + int l; + WORD_DESC w; +#if defined (ARRAY_VARS) + arrayind_t ind; +#endif + + if (cp->c_name == 0) + return; + + /* We could do more here but right now we only check the name, warn if it's + not a valid identifier, and refuse to create variables with invalid names + if a coproc with such a name is supplied. */ + w.word = cp->c_name; + w.flags = 0; + if (check_identifier (&w, 1) == 0) + return; + + l = strlen (cp->c_name); + namevar = xmalloc (l + 16); + +#if defined (ARRAY_VARS) + v = find_variable (cp->c_name); + + /* This is the same code as in find_or_make_array_variable */ + if (v == 0) + { + v = find_variable_nameref_for_create (cp->c_name, 1); + if (v == INVALID_NAMEREF_VALUE) + { + free (namevar); + return; + } + if (v && nameref_p (v)) + { + free (cp->c_name); + cp->c_name = savestring (nameref_cell (v)); + v = make_new_array_variable (cp->c_name); + } + } + + if (v && (readonly_p (v) || noassign_p (v))) + { + if (readonly_p (v)) + err_readonly (cp->c_name); + free (namevar); + return; + } + if (v == 0) + v = make_new_array_variable (cp->c_name); + if (array_p (v) == 0) + v = convert_var_to_array (v); + + t = itos (cp->c_rfd); + ind = 0; + v = bind_array_variable (cp->c_name, ind, t, 0); + free (t); + + t = itos (cp->c_wfd); + ind = 1; + v = bind_array_variable (cp->c_name, ind, t, 0); + free (t); +#else + sprintf (namevar, "%s_READ", cp->c_name); + t = itos (cp->c_rfd); + bind_variable (namevar, t, 0); + free (t); + sprintf (namevar, "%s_WRITE", cp->c_name); + t = itos (cp->c_wfd); + bind_variable (namevar, t, 0); + free (t); +#endif + + sprintf (namevar, "%s_PID", cp->c_name); + t = itos (cp->c_pid); + v = bind_variable (namevar, t, 0); + free (t); + + free (namevar); +} + +void +coproc_unsetvars (cp) + struct coproc *cp; +{ + int l; + char *namevar; + + if (cp->c_name == 0) + return; + + l = strlen (cp->c_name); + namevar = xmalloc (l + 16); + + sprintf (namevar, "%s_PID", cp->c_name); + unbind_variable_noref (namevar); + +#if defined (ARRAY_VARS) + check_unbind_variable (cp->c_name); +#else + sprintf (namevar, "%s_READ", cp->c_name); + unbind_variable (namevar); + sprintf (namevar, "%s_WRITE", cp->c_name); + unbind_variable (namevar); +#endif + + free (namevar); +} + +static int +execute_coproc (command, pipe_in, pipe_out, fds_to_close) + COMMAND *command; + int pipe_in, pipe_out; + struct fd_bitmap *fds_to_close; +{ + int rpipe[2], wpipe[2], estat, invert; + pid_t coproc_pid; + Coproc *cp; + char *tcmd, *p, *name; + sigset_t set, oset; + + /* XXX -- can be removed after changes to handle multiple coprocs */ +#if !MULTIPLE_COPROCS + if (sh_coproc.c_pid != NO_PID && (sh_coproc.c_rfd >= 0 || sh_coproc.c_wfd >= 0)) + internal_warning (_("execute_coproc: coproc [%d:%s] still exists"), sh_coproc.c_pid, sh_coproc.c_name); + coproc_init (&sh_coproc); +#endif + + invert = (command->flags & CMD_INVERT_RETURN) != 0; + + /* expand name without splitting - could make this dependent on a shopt option */ + name = expand_string_unsplit_to_string (command->value.Coproc->name, 0); + /* Optional check -- could be relaxed */ + if (legal_identifier (name) == 0) + { + internal_error (_("`%s': not a valid identifier"), name); + return (invert ? EXECUTION_SUCCESS : EXECUTION_FAILURE); + } + else + { + free (command->value.Coproc->name); + command->value.Coproc->name = name; + } + + command_string_index = 0; + tcmd = make_command_string (command); + + sh_openpipe ((int *)&rpipe); /* 0 = parent read, 1 = child write */ + sh_openpipe ((int *)&wpipe); /* 0 = child read, 1 = parent write */ + + BLOCK_SIGNAL (SIGCHLD, set, oset); + + coproc_pid = make_child (p = savestring (tcmd), FORK_ASYNC); + + if (coproc_pid == 0) + { + close (rpipe[0]); + close (wpipe[1]); + +#if defined (JOB_CONTROL) + FREE (p); +#endif + + UNBLOCK_SIGNAL (oset); + estat = execute_in_subshell (command, 1, wpipe[0], rpipe[1], fds_to_close); + + fflush (stdout); + fflush (stderr); + + exit (estat); + } + + close (rpipe[1]); + close (wpipe[0]); + + cp = coproc_alloc (command->value.Coproc->name, coproc_pid); + cp->c_rfd = rpipe[0]; + cp->c_wfd = wpipe[1]; + + cp->c_flags |= COPROC_RUNNING; + + SET_CLOSE_ON_EXEC (cp->c_rfd); + SET_CLOSE_ON_EXEC (cp->c_wfd); + + coproc_setvars (cp); + + UNBLOCK_SIGNAL (oset); + +#if 0 + itrace ("execute_coproc (%s): [%d] %s", command->value.Coproc->name, coproc_pid, the_printed_command); +#endif + + close_pipes (pipe_in, pipe_out); +#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD) + unlink_fifo_list (); +#endif + stop_pipeline (1, (COMMAND *)NULL); + DESCRIBE_PID (coproc_pid); + run_pending_traps (); + + return (invert ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} +#endif + +static void +restore_stdin (s) + int s; +{ + dup2 (s, 0); + close (s); +} + +/* Catch-all cleanup function for lastpipe code for unwind-protects */ +static void +lastpipe_cleanup (s) + int s; +{ + set_jobs_list_frozen (s); +} + +static int +execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) + COMMAND *command; + int asynchronous, pipe_in, pipe_out; + struct fd_bitmap *fds_to_close; +{ + int prev, fildes[2], new_bitmap_size, dummyfd, ignore_return, exec_result; + int lstdin, lastpipe_flag, lastpipe_jid, old_frozen; + COMMAND *cmd; + struct fd_bitmap *fd_bitmap; + pid_t lastpid; + +#if defined (JOB_CONTROL) + sigset_t set, oset; + BLOCK_CHILD (set, oset); +#endif /* JOB_CONTROL */ + + ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0; + + prev = pipe_in; + cmd = command; + + while (cmd && cmd->type == cm_connection && + cmd->value.Connection && cmd->value.Connection->connector == '|') + { + /* Make a pipeline between the two commands. */ + if (pipe (fildes) < 0) + { + sys_error (_("pipe error")); +#if defined (JOB_CONTROL) + terminate_current_pipeline (); + kill_current_pipeline (); + UNBLOCK_CHILD (oset); +#endif /* JOB_CONTROL */ + last_command_exit_value = EXECUTION_FAILURE; + /* The unwind-protects installed below will take care + of closing all of the open file descriptors. */ + throw_to_top_level (); + return (EXECUTION_FAILURE); /* XXX */ + } + + /* Here is a problem: with the new file close-on-exec + code, the read end of the pipe (fildes[0]) stays open + in the first process, so that process will never get a + SIGPIPE. There is no way to signal the first process + that it should close fildes[0] after forking, so it + remains open. No SIGPIPE is ever sent because there + is still a file descriptor open for reading connected + to the pipe. We take care of that here. This passes + around a bitmap of file descriptors that must be + closed after making a child process in execute_simple_command. */ + + /* We need fd_bitmap to be at least as big as fildes[0]. + If fildes[0] is less than fds_to_close->size, then + use fds_to_close->size. */ + new_bitmap_size = (fildes[0] < fds_to_close->size) + ? fds_to_close->size + : fildes[0] + 8; + + fd_bitmap = new_fd_bitmap (new_bitmap_size); + + /* Now copy the old information into the new bitmap. */ + xbcopy ((char *)fds_to_close->bitmap, (char *)fd_bitmap->bitmap, fds_to_close->size); + + /* And mark the pipe file descriptors to be closed. */ + fd_bitmap->bitmap[fildes[0]] = 1; + + /* In case there are pipe or out-of-processes errors, we + want all these file descriptors to be closed when + unwind-protects are run, and the storage used for the + bitmaps freed up. */ + begin_unwind_frame ("pipe-file-descriptors"); + add_unwind_protect (dispose_fd_bitmap, fd_bitmap); + add_unwind_protect (close_fd_bitmap, fd_bitmap); + if (prev >= 0) + add_unwind_protect (close, prev); + dummyfd = fildes[1]; + add_unwind_protect (close, dummyfd); + +#if defined (JOB_CONTROL) + add_unwind_protect (restore_signal_mask, &oset); +#endif /* JOB_CONTROL */ + + if (ignore_return && cmd->value.Connection->first) + cmd->value.Connection->first->flags |= CMD_IGNORE_RETURN; + execute_command_internal (cmd->value.Connection->first, asynchronous, + prev, fildes[1], fd_bitmap); + + if (prev >= 0) + close (prev); + + prev = fildes[0]; + close (fildes[1]); + + dispose_fd_bitmap (fd_bitmap); + discard_unwind_frame ("pipe-file-descriptors"); + + cmd = cmd->value.Connection->second; + } + + lastpid = last_made_pid; + + /* Now execute the rightmost command in the pipeline. */ + if (ignore_return && cmd) + cmd->flags |= CMD_IGNORE_RETURN; + + lastpipe_flag = 0; + + begin_unwind_frame ("lastpipe-exec"); + lstdin = -1; + /* If the `lastpipe' option is set with shopt, and job control is not + enabled, execute the last element of non-async pipelines in the + current shell environment. */ + if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { + lstdin = move_to_high_fd (0, 1, -1); + if (lstdin > 0) + { + do_piping (prev, pipe_out); + prev = NO_PIPE; + add_unwind_protect (restore_stdin, lstdin); + lastpipe_flag = 1; + old_frozen = freeze_jobs_list (); + lastpipe_jid = stop_pipeline (0, (COMMAND *)NULL); /* XXX */ + add_unwind_protect (lastpipe_cleanup, old_frozen); +#if defined (JOB_CONTROL) + UNBLOCK_CHILD (oset); /* XXX */ +#endif + } + if (cmd) + cmd->flags |= CMD_LASTPIPE; + } + if (prev >= 0) + add_unwind_protect (close, prev); + + exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close); + + if (lstdin > 0) + restore_stdin (lstdin); + + if (prev >= 0) + close (prev); + +#if defined (JOB_CONTROL) + UNBLOCK_CHILD (oset); +#endif + + QUIT; + + if (lastpipe_flag) + { +#if defined (JOB_CONTROL) + if (INVALID_JOB (lastpipe_jid) == 0) + { + append_process (savestring (the_printed_command_except_trap), dollar_dollar_pid, exec_result, lastpipe_jid); + lstdin = wait_for (lastpid, 0); + } + else + lstdin = wait_for_single_pid (lastpid, 0); /* checks bgpids list */ +#else + lstdin = wait_for (lastpid, 0); +#endif + +#if defined (JOB_CONTROL) + /* If wait_for removes the job from the jobs table, use result of last + command as pipeline's exit status as usual. The jobs list can get + frozen and unfrozen at inconvenient times if there are multiple pipelines + running simultaneously. */ + if (INVALID_JOB (lastpipe_jid) == 0) + exec_result = job_exit_status (lastpipe_jid); + else if (pipefail_opt) + exec_result = exec_result | lstdin; /* XXX */ + /* otherwise we use exec_result */ +#endif + + set_jobs_list_frozen (old_frozen); + } + + discard_unwind_frame ("lastpipe-exec"); + + return (exec_result); +} + +static int +execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) + COMMAND *command; + int asynchronous, pipe_in, pipe_out; + struct fd_bitmap *fds_to_close; +{ + COMMAND *tc, *second; + int ignore_return, exec_result, was_error_trap, invert; + volatile int save_line_number; + + ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0; + + switch (command->value.Connection->connector) + { + /* Do the first command asynchronously. */ + case '&': + tc = command->value.Connection->first; + if (tc == 0) + return (EXECUTION_SUCCESS); + + if (ignore_return) + tc->flags |= CMD_IGNORE_RETURN; + tc->flags |= CMD_AMPERSAND; + + /* If this shell was compiled without job control support, + if we are currently in a subshell via `( xxx )', or if job + control is not active then the standard input for an + asynchronous command is forced to /dev/null. */ +#if defined (JOB_CONTROL) + if ((subshell_environment || !job_control) && !stdin_redir) +#else + if (!stdin_redir) +#endif /* JOB_CONTROL */ + tc->flags |= CMD_STDIN_REDIR; + + exec_result = execute_command_internal (tc, 1, pipe_in, pipe_out, fds_to_close); + QUIT; + + if (tc->flags & CMD_STDIN_REDIR) + tc->flags &= ~CMD_STDIN_REDIR; + + second = command->value.Connection->second; + if (second) + { + if (ignore_return) + second->flags |= CMD_IGNORE_RETURN; + + exec_result = execute_command_internal (second, asynchronous, pipe_in, pipe_out, fds_to_close); + } + + break; + + /* Just call execute command on both sides. */ + case ';': + if (ignore_return) + { + if (command->value.Connection->first) + command->value.Connection->first->flags |= CMD_IGNORE_RETURN; + if (command->value.Connection->second) + command->value.Connection->second->flags |= CMD_IGNORE_RETURN; + } + executing_list++; + QUIT; + +#if 1 + execute_command (command->value.Connection->first); +#else + execute_command_internal (command->value.Connection->first, + asynchronous, pipe_in, pipe_out, + fds_to_close); +#endif + + QUIT; + optimize_fork (command); /* XXX */ + exec_result = execute_command_internal (command->value.Connection->second, + asynchronous, pipe_in, pipe_out, + fds_to_close); + executing_list--; + break; + + case '|': + was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0; + invert = (command->flags & CMD_INVERT_RETURN) != 0; + ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0; + + line_number_for_err_trap = line_number; /* XXX - save value? */ + exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close); + + if (asynchronous) + { + exec_result = EXECUTION_SUCCESS; + invert = 0; + } + + if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS) + { + last_command_exit_value = exec_result; + save_line_number = line_number; + line_number = line_number_for_err_trap; + run_error_trap (); + line_number = save_line_number; + } + + if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS) + { + last_command_exit_value = exec_result; + run_pending_traps (); + jump_to_top_level (ERREXIT); + } + + break; + + case AND_AND: + case OR_OR: + if (asynchronous) + { + /* If we have something like `a && b &' or `a || b &', run the + && or || stuff in a subshell. Force a subshell and just call + execute_command_internal again. Leave asynchronous on + so that we get a report from the parent shell about the + background job. */ + command->flags |= CMD_FORCE_SUBSHELL; + exec_result = execute_command_internal (command, 1, pipe_in, pipe_out, fds_to_close); + break; + } + + /* Execute the first command. If the result of that is successful + and the connector is AND_AND, or the result is not successful + and the connector is OR_OR, then execute the second command, + otherwise return. */ + + executing_list++; + if (command->value.Connection->first) + command->value.Connection->first->flags |= CMD_IGNORE_RETURN; + +#if 1 + exec_result = execute_command (command->value.Connection->first); +#else + exec_result = execute_command_internal (command->value.Connection->first, 0, NO_PIPE, NO_PIPE, fds_to_close); +#endif + QUIT; + if (((command->value.Connection->connector == AND_AND) && + (exec_result == EXECUTION_SUCCESS)) || + ((command->value.Connection->connector == OR_OR) && + (exec_result != EXECUTION_SUCCESS))) + { + optimize_fork (command); + + second = command->value.Connection->second; + if (ignore_return && second) + second->flags |= CMD_IGNORE_RETURN; + + exec_result = execute_command (second); + } + executing_list--; + break; + + default: + command_error ("execute_connection", CMDERR_BADCONN, command->value.Connection->connector, 0); + jump_to_top_level (DISCARD); + exec_result = EXECUTION_FAILURE; + } + + return exec_result; +} + +/* The test used to be only for interactive_shell, but we don't want to report + job status when the shell is not interactive or when job control isn't + enabled. */ +#define REAP() \ + do \ + { \ + if (job_control == 0 || interactive_shell == 0) \ + reap_dead_jobs (); \ + } \ + while (0) + +/* Execute a FOR command. The syntax is: FOR word_desc IN word_list; + DO command; DONE */ +static int +execute_for_command (for_command) + FOR_COM *for_command; +{ + register WORD_LIST *releaser, *list; + SHELL_VAR *v; + char *identifier; + int retval, save_line_number; +#if 0 + SHELL_VAR *old_value = (SHELL_VAR *)NULL; /* Remember the old value of x. */ +#endif + + save_line_number = line_number; + if (check_identifier (for_command->name, 1) == 0) + { + if (posixly_correct && interactive_shell == 0 && rpm_requires == 0) + { + last_command_exit_value = EX_BADUSAGE; + jump_to_top_level (ERREXIT); + } + return (EXECUTION_FAILURE); + } + + loop_level++; + identifier = for_command->name->word; + + line_number = for_command->line; /* for expansion error messages */ + list = releaser = expand_words_no_vars (for_command->map_list); + + begin_unwind_frame ("for"); + add_unwind_protect (dispose_words, releaser); + +#if 0 + if (lexical_scoping) + { + old_value = copy_variable (find_variable (identifier)); + if (old_value) + add_unwind_protect (dispose_variable, old_value); + } +#endif + + if (for_command->flags & CMD_IGNORE_RETURN) + for_command->action->flags |= CMD_IGNORE_RETURN; + + for (retval = EXECUTION_SUCCESS; list; list = list->next) + { + QUIT; + + line_number = for_command->line; + + /* Remember what this command looks like, for debugger. */ + command_string_index = 0; + print_for_command_head (for_command); + + if (echo_command_at_execute) + xtrace_print_for_command_head (for_command); + + /* Save this command unless it's a trap command and we're not running + a debug trap. */ + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + retval = run_debug_trap (); +#if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && retval != EXECUTION_SUCCESS) + continue; +#endif + + this_command_name = (char *)NULL; + /* XXX - special ksh93 for command index variable handling */ + v = find_variable_last_nameref (identifier, 1); + if (v && nameref_p (v)) + { + if (valid_nameref_value (list->word->word, 1) == 0) + { + sh_invalidid (list->word->word); + v = 0; + } + else if (readonly_p (v)) + err_readonly (name_cell (v)); + else + v = bind_variable_value (v, list->word->word, ASS_NAMEREF); + } + else + v = bind_variable (identifier, list->word->word, 0); + + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + line_number = save_line_number; + if (v && readonly_p (v) && interactive_shell == 0 && posixly_correct) + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (FORCE_EOF); + } + else + { + dispose_words (releaser); + discard_unwind_frame ("for"); + loop_level--; + return (EXECUTION_FAILURE); + } + } + + if (ifsname (identifier)) + setifs (v); + else + stupidly_hack_special_variables (identifier); + + retval = execute_command (for_command->action); + REAP (); + QUIT; + + if (breaking) + { + breaking--; + break; + } + + if (continuing) + { + continuing--; + if (continuing) + break; + } + } + + loop_level--; + line_number = save_line_number; + +#if 0 + if (lexical_scoping) + { + if (!old_value) + unbind_variable (identifier); + else + { + SHELL_VAR *new_value; + + new_value = bind_variable (identifier, value_cell (old_value), 0); + new_value->attributes = old_value->attributes; + dispose_variable (old_value); + } + } +#endif + + dispose_words (releaser); + discard_unwind_frame ("for"); + return (retval); +} + +#if defined (ARITH_FOR_COMMAND) +/* Execute an arithmetic for command. The syntax is + + for (( init ; step ; test )) + do + body + done + + The execution should be exactly equivalent to + + eval \(\( init \)\) + while eval \(\( test \)\) ; do + body; + eval \(\( step \)\) + done +*/ +static intmax_t +eval_arith_for_expr (l, okp) + WORD_LIST *l; + int *okp; +{ + WORD_LIST *new; + intmax_t expresult; + int r; + + new = expand_words_no_vars (l); + if (new) + { + if (echo_command_at_execute) + xtrace_print_arith_cmd (new); + this_command_name = "(("; /* )) for expression error messages */ + + command_string_index = 0; + print_arith_command (new); + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + r = run_debug_trap (); + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ +#if defined (DEBUGGER) + if (debugging_mode == 0 || r == EXECUTION_SUCCESS) + expresult = evalexp (new->word->word, EXP_EXPANDED, okp); + else + { + expresult = 0; + if (okp) + *okp = 1; + } +#else + expresult = evalexp (new->word->word, EXP_EXPANDED, okp); +#endif + dispose_words (new); + } + else + { + expresult = 0; + if (okp) + *okp = 1; + } + return (expresult); +} + +static int +execute_arith_for_command (arith_for_command) + ARITH_FOR_COM *arith_for_command; +{ + intmax_t expresult; + int expok, body_status, arith_lineno, save_lineno; + + body_status = EXECUTION_SUCCESS; + loop_level++; + save_lineno = line_number; + + if (arith_for_command->flags & CMD_IGNORE_RETURN) + arith_for_command->action->flags |= CMD_IGNORE_RETURN; + + this_command_name = "(("; /* )) for expression error messages */ + + /* save the starting line number of the command so we can reset + line_number before executing each expression -- for $LINENO + and the DEBUG trap. */ + line_number = arith_lineno = arith_for_command->line; + if (variable_context && interactive_shell && sourcelevel == 0) + { + /* line numbers in a function start at 1 */ + line_number -= function_line_number - 1; + if (line_number <= 0) + line_number = 1; + } + + /* Evaluate the initialization expression. */ + expresult = eval_arith_for_expr (arith_for_command->init, &expok); + if (expok == 0) + { + line_number = save_lineno; + return (EXECUTION_FAILURE); + } + + while (1) + { + /* Evaluate the test expression. */ + line_number = arith_lineno; + expresult = eval_arith_for_expr (arith_for_command->test, &expok); + line_number = save_lineno; + + if (expok == 0) + { + body_status = EXECUTION_FAILURE; + break; + } + REAP (); + if (expresult == 0) + break; + + /* Execute the body of the arithmetic for command. */ + QUIT; + body_status = execute_command (arith_for_command->action); + QUIT; + + /* Handle any `break' or `continue' commands executed by the body. */ + if (breaking) + { + breaking--; + break; + } + + if (continuing) + { + continuing--; + if (continuing) + break; + } + + /* Evaluate the step expression. */ + line_number = arith_lineno; + expresult = eval_arith_for_expr (arith_for_command->step, &expok); + line_number = save_lineno; + + if (expok == 0) + { + body_status = EXECUTION_FAILURE; + break; + } + } + + loop_level--; + line_number = save_lineno; + + return (body_status); +} +#endif + +#if defined (SELECT_COMMAND) +static int LINES, COLS, tabsize; + +#define RP_SPACE ") " +#define RP_SPACE_LEN 2 + +/* XXX - does not handle numbers > 1000000 at all. */ +#define NUMBER_LEN(s) \ +((s < 10) ? 1 \ + : ((s < 100) ? 2 \ + : ((s < 1000) ? 3 \ + : ((s < 10000) ? 4 \ + : ((s < 100000) ? 5 \ + : 6))))) + +static int +displen (s) + const char *s; +{ +#if defined (HANDLE_MULTIBYTE) + wchar_t *wcstr; + size_t slen; + int wclen; + + wcstr = 0; + slen = mbstowcs (wcstr, s, 0); + if (slen == -1) + slen = 0; + wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (slen + 1)); + mbstowcs (wcstr, s, slen + 1); + wclen = wcswidth (wcstr, slen); + free (wcstr); + return (wclen < 0 ? STRLEN(s) : wclen); +#else + return (STRLEN (s)); +#endif +} + +static int +print_index_and_element (len, ind, list) + int len, ind; + WORD_LIST *list; +{ + register WORD_LIST *l; + register int i; + + if (list == 0) + return (0); + for (i = ind, l = list; l && --i; l = l->next) + ; + if (l == 0) /* don't think this can happen */ + return (0); + fprintf (stderr, "%*d%s%s", len, ind, RP_SPACE, l->word->word); + return (displen (l->word->word)); +} + +static void +indent (from, to) + int from, to; +{ + while (from < to) + { + if ((to / tabsize) > (from / tabsize)) + { + putc ('\t', stderr); + from += tabsize - from % tabsize; + } + else + { + putc (' ', stderr); + from++; + } + } +} + +static void +print_select_list (list, list_len, max_elem_len, indices_len) + WORD_LIST *list; + int list_len, max_elem_len, indices_len; +{ + int ind, row, elem_len, pos, cols, rows; + int first_column_indices_len, other_indices_len; + + if (list == 0) + { + putc ('\n', stderr); + return; + } + + cols = max_elem_len ? COLS / max_elem_len : 1; + if (cols == 0) + cols = 1; + rows = list_len ? list_len / cols + (list_len % cols != 0) : 1; + cols = list_len ? list_len / rows + (list_len % rows != 0) : 1; + + if (rows == 1) + { + rows = cols; + cols = 1; + } + + first_column_indices_len = NUMBER_LEN (rows); + other_indices_len = indices_len; + + for (row = 0; row < rows; row++) + { + ind = row; + pos = 0; + while (1) + { + indices_len = (pos == 0) ? first_column_indices_len : other_indices_len; + elem_len = print_index_and_element (indices_len, ind + 1, list); + elem_len += indices_len + RP_SPACE_LEN; + ind += rows; + if (ind >= list_len) + break; + indent (pos + elem_len, pos + max_elem_len); + pos += max_elem_len; + } + putc ('\n', stderr); + } +} + +/* Print the elements of LIST, one per line, preceded by an index from 1 to + LIST_LEN. Then display PROMPT and wait for the user to enter a number. + If the number is between 1 and LIST_LEN, return that selection. If EOF + is read, return a null string. If a blank line is entered, or an invalid + number is entered, the loop is executed again. */ +static char * +select_query (list, list_len, prompt, print_menu) + WORD_LIST *list; + int list_len; + char *prompt; + int print_menu; +{ + int max_elem_len, indices_len, len, r, oe; + intmax_t reply; + WORD_LIST *l; + char *repl_string, *t; + + COLS = default_columns (); + +#if 0 + t = get_string_value ("TABSIZE"); + tabsize = (t && *t) ? atoi (t) : 8; + if (tabsize <= 0) + tabsize = 8; +#else + tabsize = 8; +#endif + + max_elem_len = 0; + for (l = list; l; l = l->next) + { + len = displen (l->word->word); + if (len > max_elem_len) + max_elem_len = len; + } + indices_len = NUMBER_LEN (list_len); + max_elem_len += indices_len + RP_SPACE_LEN + 2; + + while (1) + { + if (print_menu) + print_select_list (list, list_len, max_elem_len, indices_len); + fprintf (stderr, "%s", prompt); + fflush (stderr); + QUIT; + + oe = executing_builtin; + executing_builtin = 1; + r = read_builtin ((WORD_LIST *)NULL); + executing_builtin = oe; + if (r != EXECUTION_SUCCESS) + { + putchar ('\n'); + return ((char *)NULL); + } + repl_string = get_string_value ("REPLY"); + if (repl_string == 0) + return ((char *)NULL); + if (*repl_string == 0) + { + print_menu = 1; + continue; + } + if (legal_number (repl_string, &reply) == 0) + return ""; + if (reply < 1 || reply > list_len) + return ""; + + for (l = list; l && --reply; l = l->next) + ; + return (l->word->word); /* XXX - can't be null? */ + } +} + +/* Execute a SELECT command. The syntax is: + SELECT word IN list DO command_list DONE + Only `break' or `return' in command_list will terminate + the command. */ +static int +execute_select_command (select_command) + SELECT_COM *select_command; +{ + WORD_LIST *releaser, *list; + SHELL_VAR *v; + char *identifier, *ps3_prompt, *selection; + int retval, list_len, show_menu, save_line_number; + + if (check_identifier (select_command->name, 1) == 0) + return (EXECUTION_FAILURE); + + save_line_number = line_number; + line_number = select_command->line; + + command_string_index = 0; + print_select_command_head (select_command); + + if (echo_command_at_execute) + xtrace_print_select_command_head (select_command); + +#if 0 + if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))) +#else + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) +#endif + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + retval = run_debug_trap (); +#if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && retval != EXECUTION_SUCCESS) + return (EXECUTION_SUCCESS); +#endif + + loop_level++; + identifier = select_command->name->word; + + /* command and arithmetic substitution, parameter and variable expansion, + word splitting, pathname expansion, and quote removal. */ + list = releaser = expand_words_no_vars (select_command->map_list); + list_len = list_length (list); + if (list == 0 || list_len == 0) + { + if (list) + dispose_words (list); + line_number = save_line_number; + return (EXECUTION_SUCCESS); + } + + begin_unwind_frame ("select"); + add_unwind_protect (dispose_words, releaser); + + if (select_command->flags & CMD_IGNORE_RETURN) + select_command->action->flags |= CMD_IGNORE_RETURN; + + retval = EXECUTION_SUCCESS; + show_menu = 1; + + while (1) + { + line_number = select_command->line; + ps3_prompt = get_string_value ("PS3"); + if (ps3_prompt == 0) + ps3_prompt = "#? "; + + QUIT; + selection = select_query (list, list_len, ps3_prompt, show_menu); + QUIT; + if (selection == 0) + { + /* select_query returns EXECUTION_FAILURE if the read builtin + fails, so we want to return failure in this case. */ + retval = EXECUTION_FAILURE; + break; + } + + v = bind_variable (identifier, selection, 0); + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + if (v && readonly_p (v) && interactive_shell == 0 && posixly_correct) + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (FORCE_EOF); + } + else + { + dispose_words (releaser); + discard_unwind_frame ("select"); + loop_level--; + line_number = save_line_number; + return (EXECUTION_FAILURE); + } + } + + stupidly_hack_special_variables (identifier); + + retval = execute_command (select_command->action); + + REAP (); + QUIT; + + if (breaking) + { + breaking--; + break; + } + + if (continuing) + { + continuing--; + if (continuing) + break; + } + +#if defined (KSH_COMPATIBLE_SELECT) + show_menu = 0; + selection = get_string_value ("REPLY"); + if (selection && *selection == '\0') + show_menu = 1; +#endif + } + + loop_level--; + line_number = save_line_number; + + dispose_words (releaser); + discard_unwind_frame ("select"); + return (retval); +} +#endif /* SELECT_COMMAND */ + +/* Execute a CASE command. The syntax is: CASE word_desc IN pattern_list ESAC. + The pattern_list is a linked list of pattern clauses; each clause contains + some patterns to compare word_desc against, and an associated command to + execute. */ +static int +execute_case_command (case_command) + CASE_COM *case_command; +{ + register WORD_LIST *list; + WORD_LIST *wlist, *es; + PATTERN_LIST *clauses; + char *word, *pattern; + int retval, match, ignore_return, save_line_number, qflags; + + save_line_number = line_number; + line_number = case_command->line; + + command_string_index = 0; + print_case_command_head (case_command); + + if (echo_command_at_execute) + xtrace_print_case_command_head (case_command); + +#if 0 + if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))) +#else + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) +#endif + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + retval = run_debug_trap(); +#if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && retval != EXECUTION_SUCCESS) + { + line_number = save_line_number; + return (EXECUTION_SUCCESS); + } +#endif + + /* Use the same expansions (the ones POSIX specifies) as the patterns; + dequote the resulting string (as POSIX specifies) since the quotes in + patterns are handled specially below. We have to do it in this order + because we're not supposed to perform word splitting. */ + wlist = expand_word_leave_quoted (case_command->word, 0); + if (wlist) + { + char *t; + t = string_list (wlist); + word = dequote_string (t); + free (t); + } + else + word = savestring (""); + dispose_words (wlist); + + retval = EXECUTION_SUCCESS; + ignore_return = case_command->flags & CMD_IGNORE_RETURN; + + begin_unwind_frame ("case"); + add_unwind_protect (xfree, word); + +#define EXIT_CASE() goto exit_case_command + + for (clauses = case_command->clauses; clauses; clauses = clauses->next) + { + QUIT; + for (list = clauses->patterns; list; list = list->next) + { + es = expand_word_leave_quoted (list->word, 0); + + if (es && es->word && es->word->word && *(es->word->word)) + { + /* Convert quoted null strings into empty strings. */ + qflags = QGLOB_CVTNULL; + + /* We left CTLESC in place quoting CTLESC and CTLNUL after the + call to expand_word_leave_quoted; tell quote_string_for_globbing + to remove those here. This works for both unquoted portions of + the word (which call quote_escapes) and quoted portions + (which call quote_string). */ + qflags |= QGLOB_CTLESC; + pattern = quote_string_for_globbing (es->word->word, qflags); + } + else + { + pattern = (char *)xmalloc (1); + pattern[0] = '\0'; + } + + /* Since the pattern does not undergo quote removal (as per + Posix.2, section 3.9.4.3), the strmatch () call must be able + to recognize backslashes as escape characters. */ + match = strmatch (pattern, word, FNMATCH_EXTFLAG|FNMATCH_IGNCASE) != FNM_NOMATCH; + free (pattern); + + dispose_words (es); + + if (match) + { + do + { + if (clauses->action && ignore_return) + clauses->action->flags |= CMD_IGNORE_RETURN; + retval = execute_command (clauses->action); + } + while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next)); + if (clauses == 0 || (clauses->flags & CASEPAT_TESTNEXT) == 0) + EXIT_CASE (); + else + break; + } + + QUIT; + } + } + +exit_case_command: + free (word); + discard_unwind_frame ("case"); + line_number = save_line_number; + return (retval); +} + +#define CMD_WHILE 0 +#define CMD_UNTIL 1 + +/* The WHILE command. Syntax: WHILE test DO action; DONE. + Repeatedly execute action while executing test produces + EXECUTION_SUCCESS. */ +static int +execute_while_command (while_command) + WHILE_COM *while_command; +{ + return (execute_while_or_until (while_command, CMD_WHILE)); +} + +/* UNTIL is just like WHILE except that the test result is negated. */ +static int +execute_until_command (while_command) + WHILE_COM *while_command; +{ + return (execute_while_or_until (while_command, CMD_UNTIL)); +} + +/* The body for both while and until. The only difference between the + two is that the test value is treated differently. TYPE is + CMD_WHILE or CMD_UNTIL. The return value for both commands should + be EXECUTION_SUCCESS if no commands in the body are executed, and + the status of the last command executed in the body otherwise. */ +static int +execute_while_or_until (while_command, type) + WHILE_COM *while_command; + int type; +{ + int return_value, body_status; + + body_status = EXECUTION_SUCCESS; + loop_level++; + + while_command->test->flags |= CMD_IGNORE_RETURN; + if (while_command->flags & CMD_IGNORE_RETURN) + while_command->action->flags |= CMD_IGNORE_RETURN; + + while (1) + { + return_value = execute_command (while_command->test); + REAP (); + + /* Need to handle `break' in the test when we would break out of the + loop. The job control code will set `breaking' to loop_level + when a job in a loop is stopped with SIGTSTP. If the stopped job + is in the loop test, `breaking' will not be reset unless we do + this, and the shell will cease to execute commands. The same holds + true for `continue'. */ + if (type == CMD_WHILE && return_value != EXECUTION_SUCCESS) + { + if (breaking) + breaking--; + if (continuing) + continuing--; + break; + } + if (type == CMD_UNTIL && return_value == EXECUTION_SUCCESS) + { + if (breaking) + breaking--; + if (continuing) + continuing--; + break; + } + + QUIT; + body_status = execute_command (while_command->action); + QUIT; + + if (breaking) + { + breaking--; + break; + } + + if (continuing) + { + continuing--; + if (continuing) + break; + } + } + loop_level--; + + return (body_status); +} + +/* IF test THEN command [ELSE command]. + IF also allows ELIF in the place of ELSE IF, but + the parser makes *that* stupidity transparent. */ +static int +execute_if_command (if_command) + IF_COM *if_command; +{ + int return_value, save_line_number; + + save_line_number = line_number; + if_command->test->flags |= CMD_IGNORE_RETURN; + return_value = execute_command (if_command->test); + line_number = save_line_number; + + if (return_value == EXECUTION_SUCCESS) + { + QUIT; + + if (if_command->true_case && (if_command->flags & CMD_IGNORE_RETURN)) + if_command->true_case->flags |= CMD_IGNORE_RETURN; + + return (execute_command (if_command->true_case)); + } + else + { + QUIT; + + if (if_command->false_case && (if_command->flags & CMD_IGNORE_RETURN)) + if_command->false_case->flags |= CMD_IGNORE_RETURN; + + return (execute_command (if_command->false_case)); + } +} + +#if defined (DPAREN_ARITHMETIC) +static int +execute_arith_command (arith_command) + ARITH_COM *arith_command; +{ + int expok, save_line_number, retval; + intmax_t expresult; + WORD_LIST *new; + char *exp, *t; + + expresult = 0; + + save_line_number = line_number; + this_command_name = "(("; /* )) */ + line_number_for_err_trap = line_number = arith_command->line; + /* If we're in a function, update the line number information. */ + if (variable_context && interactive_shell && sourcelevel == 0) + { + /* line numbers in a function start at 1 */ + line_number -= function_line_number - 1; + if (line_number <= 0) + line_number = 1; + } + + command_string_index = 0; + print_arith_command (arith_command->exp); + + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + /* Run the debug trap before each arithmetic command, but do it after we + update the line number information and before we expand the various + words in the expression. */ + retval = run_debug_trap (); +#if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && retval != EXECUTION_SUCCESS) + { + line_number = save_line_number; + return (EXECUTION_SUCCESS); + } +#endif + + t = (char *)NULL; + new = arith_command->exp; + if (new->next) + exp = t = string_list (new); /* just in case */ + else + exp = new->word->word; + + exp = expand_arith_string (exp, Q_DOUBLE_QUOTES|Q_ARITH); + + /* If we're tracing, make a new word list with `((' at the front and `))' + at the back and print it. Change xtrace_print_arith_cmd to take a string + when I change eval_arith_for_expr to use expand_arith_string(). */ + if (echo_command_at_execute) + { + new = make_word_list (make_word (exp ? exp : ""), (WORD_LIST *)NULL); + xtrace_print_arith_cmd (new); + dispose_words (new); + } + + if (exp) + { + expresult = evalexp (exp, EXP_EXPANDED, &expok); + line_number = save_line_number; + free (exp); + } + else + { + expresult = 0; + expok = 1; + } + FREE (t); + + if (expok == 0) + return (EXECUTION_FAILURE); + + return (expresult == 0 ? EXECUTION_FAILURE : EXECUTION_SUCCESS); +} +#endif /* DPAREN_ARITHMETIC */ + +#if defined (COND_COMMAND) + +static char * const nullstr = ""; + +/* XXX - can COND ever be NULL when this is called? */ +static int +execute_cond_node (cond) + COND_COM *cond; +{ + int result, invert, patmatch, rmatch, mflags, ignore; + char *arg1, *arg2; +#if 0 + char *t1, *t2; +#endif + + invert = (cond->flags & CMD_INVERT_RETURN); + ignore = (cond->flags & CMD_IGNORE_RETURN); + if (ignore) + { + if (cond->left) + cond->left->flags |= CMD_IGNORE_RETURN; + if (cond->right) + cond->right->flags |= CMD_IGNORE_RETURN; + } + + if (cond->type == COND_EXPR) + result = execute_cond_node (cond->left); + else if (cond->type == COND_OR) + { + result = execute_cond_node (cond->left); + if (result != EXECUTION_SUCCESS) + result = execute_cond_node (cond->right); + } + else if (cond->type == COND_AND) + { + result = execute_cond_node (cond->left); + if (result == EXECUTION_SUCCESS) + result = execute_cond_node (cond->right); + } + else if (cond->type == COND_UNARY) + { + if (ignore) + comsub_ignore_return++; + arg1 = cond_expand_word (cond->left->op, 0); + if (ignore) + comsub_ignore_return--; + if (arg1 == 0) + arg1 = nullstr; + if (echo_command_at_execute) + xtrace_print_cond_term (cond->type, invert, cond->op, arg1, (char *)NULL); + result = unary_test (cond->op->word, arg1) ? EXECUTION_SUCCESS : EXECUTION_FAILURE; + if (arg1 != nullstr) + free (arg1); + } + else if (cond->type == COND_BINARY) + { + rmatch = 0; + patmatch = (((cond->op->word[1] == '=') && (cond->op->word[2] == '\0') && + (cond->op->word[0] == '!' || cond->op->word[0] == '=')) || + (cond->op->word[0] == '=' && cond->op->word[1] == '\0')); +#if defined (COND_REGEXP) + rmatch = (cond->op->word[0] == '=' && cond->op->word[1] == '~' && + cond->op->word[2] == '\0'); +#endif + + if (ignore) + comsub_ignore_return++; + arg1 = cond_expand_word (cond->left->op, 0); + if (ignore) + comsub_ignore_return--; + if (arg1 == 0) + arg1 = nullstr; + if (ignore) + comsub_ignore_return++; + arg2 = cond_expand_word (cond->right->op, + (rmatch && shell_compatibility_level > 31) ? 2 : (patmatch ? 1 : 0)); + if (ignore) + comsub_ignore_return--; + if (arg2 == 0) + arg2 = nullstr; + + if (echo_command_at_execute) + xtrace_print_cond_term (cond->type, invert, cond->op, arg1, arg2); + +#if defined (COND_REGEXP) + if (rmatch) + { + mflags = SHMAT_PWARN; +#if defined (ARRAY_VARS) + mflags |= SHMAT_SUBEXP; +#endif + +#if 0 + t1 = strescape(arg1); + t2 = strescape(arg2); + itrace("execute_cond_node: sh_regmatch on `%s' and `%s'", t1, t2); + free(t1); + free(t2); +#endif + + result = sh_regmatch (arg1, arg2, mflags); + } + else +#endif /* COND_REGEXP */ + { + int oe; + oe = extended_glob; + extended_glob = 1; + result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE) + ? EXECUTION_SUCCESS + : EXECUTION_FAILURE; + extended_glob = oe; + } + if (arg1 != nullstr) + free (arg1); + if (arg2 != nullstr) + free (arg2); + } + else + { + command_error ("execute_cond_node", CMDERR_BADTYPE, cond->type, 0); + jump_to_top_level (DISCARD); + result = EXECUTION_FAILURE; + } + + if (invert) + result = (result == EXECUTION_SUCCESS) ? EXECUTION_FAILURE : EXECUTION_SUCCESS; + + return result; +} + +static int +execute_cond_command (cond_command) + COND_COM *cond_command; +{ + int retval, save_line_number; + + save_line_number = line_number; + + this_command_name = "[["; + line_number_for_err_trap = line_number = cond_command->line; + /* If we're in a function, update the line number information. */ + if (variable_context && interactive_shell && sourcelevel == 0) + { + /* line numbers in a function start at 1 */ + line_number -= function_line_number - 1; + if (line_number <= 0) + line_number = 1; + } + command_string_index = 0; + print_cond_command (cond_command); + + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + /* Run the debug trap before each conditional command, but do it after we + update the line number information. */ + retval = run_debug_trap (); +#if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && retval != EXECUTION_SUCCESS) + { + line_number = save_line_number; + return (EXECUTION_SUCCESS); + } +#endif + +#if 0 + debug_print_cond_command (cond_command); +#endif + + last_command_exit_value = retval = execute_cond_node (cond_command); + line_number = save_line_number; + return (retval); +} +#endif /* COND_COMMAND */ + +static void +bind_lastarg (arg) + char *arg; +{ + SHELL_VAR *var; + + if (arg == 0) + arg = ""; + var = bind_variable ("_", arg, 0); + if (var) + VUNSETATTR (var, att_exported); +} + +/* Execute a null command. Fork a subshell if the command uses pipes or is + to be run asynchronously. This handles all the side effects that are + supposed to take place. */ +static int +execute_null_command (redirects, pipe_in, pipe_out, async) + REDIRECT *redirects; + int pipe_in, pipe_out, async; +{ + int r; + int forcefork, fork_flags; + REDIRECT *rd; + + for (forcefork = 0, rd = redirects; rd; rd = rd->next) + { + forcefork += rd->rflags & REDIR_VARASSIGN; + /* Safety */ + forcefork += (rd->redirector.dest == 0 || fd_is_bash_input (rd->redirector.dest)) && (INPUT_REDIRECT (rd->instruction) || TRANSLATE_REDIRECT (rd->instruction) || rd->instruction == r_close_this); + } + + if (forcefork || pipe_in != NO_PIPE || pipe_out != NO_PIPE || async) + { + /* We have a null command, but we really want a subshell to take + care of it. Just fork, do piping and redirections, and exit. */ + fork_flags = async ? FORK_ASYNC : 0; + if (make_child ((char *)NULL, fork_flags) == 0) + { + /* Cancel traps, in trap.c. */ + restore_original_signals (); /* XXX */ + + do_piping (pipe_in, pipe_out); + +#if defined (COPROCESS_SUPPORT) + coproc_closeall (); +#endif + + interactive = 0; /* XXX */ + + subshell_environment = 0; + if (async) + subshell_environment |= SUBSHELL_ASYNC; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + subshell_environment |= SUBSHELL_PIPE; + + if (do_redirections (redirects, RX_ACTIVE) == 0) + exit (EXECUTION_SUCCESS); + else + exit (EXECUTION_FAILURE); + } + else + { + close_pipes (pipe_in, pipe_out); +#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD) + if (pipe_out == NO_PIPE) + unlink_fifo_list (); +#endif + return (EXECUTION_SUCCESS); + } + } + else + { + /* Even if there aren't any command names, pretend to do the + redirections that are specified. The user expects the side + effects to take place. If the redirections fail, then return + failure. Otherwise, if a command substitution took place while + expanding the command or a redirection, return the value of that + substitution. Otherwise, return EXECUTION_SUCCESS. */ + + r = do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE); + cleanup_redirects (redirection_undo_list); + redirection_undo_list = (REDIRECT *)NULL; + + if (r != 0) + return (EXECUTION_FAILURE); + else if (last_command_subst_pid != NO_PID) + return (last_command_exit_value); + else + return (EXECUTION_SUCCESS); + } +} + +/* This is a hack to suppress word splitting for assignment statements + given as arguments to builtins with the ASSIGNMENT_BUILTIN flag set. */ +static void +fix_assignment_words (words) + WORD_LIST *words; +{ + WORD_LIST *w, *wcmd; + struct builtin *b; + int assoc, global, array, integer; + + if (words == 0) + return; + + b = 0; + assoc = global = array = integer = 0; + + /* Skip over assignment statements preceding a command name */ + wcmd = words; + for (wcmd = words; wcmd; wcmd = wcmd->next) + if ((wcmd->word->flags & W_ASSIGNMENT) == 0) + break; + /* Posix (post-2008) says that `command' doesn't change whether + or not the builtin it shadows is a `declaration command', even + though it removes other special builtin properties. In Posix + mode, we skip over one or more instances of `command' and + deal with the next word as the assignment builtin. */ + while (posixly_correct && wcmd && wcmd->word && wcmd->word->word && STREQ (wcmd->word->word, "command")) + wcmd = wcmd->next; + + for (w = wcmd; w; w = w->next) + if (w->word->flags & W_ASSIGNMENT) + { + /* Lazy builtin lookup, only do it if we find an assignment */ + if (b == 0) + { + b = builtin_address_internal (wcmd->word->word, 0); + if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0) + return; + else if (b && (b->flags & ASSIGNMENT_BUILTIN)) + wcmd->word->flags |= W_ASSNBLTIN; + } + w->word->flags |= (W_NOSPLIT|W_NOGLOB|W_TILDEEXP|W_ASSIGNARG); +#if defined (ARRAY_VARS) + if (assoc) + w->word->flags |= W_ASSIGNASSOC; + if (array) + w->word->flags |= W_ASSIGNARRAY; +#endif + if (global) + w->word->flags |= W_ASSNGLOBAL; + + /* If we have an assignment builtin that does not create local variables, + make sure we create global variables even if we internally call + `declare'. The CHKLOCAL flag means to set attributes or values on + an existing local variable, if there is one. */ + if (b && ((b->flags & (ASSIGNMENT_BUILTIN|LOCALVAR_BUILTIN)) == ASSIGNMENT_BUILTIN)) + w->word->flags |= W_ASSNGLOBAL|W_CHKLOCAL; + else if (b && (b->flags & ASSIGNMENT_BUILTIN) && (b->flags & LOCALVAR_BUILTIN) && variable_context) + w->word->flags |= W_FORCELOCAL; + } +#if defined (ARRAY_VARS) + /* Note that we saw an associative array option to a builtin that takes + assignment statements. This is a bit of a kludge. */ + else if (w->word->word[0] == '-' && (strpbrk (w->word->word+1, "Aag") != 0)) +#else + else if (w->word->word[0] == '-' && strchr (w->word->word+1, 'g')) +#endif + { + if (b == 0) + { + b = builtin_address_internal (wcmd->word->word, 0); + if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0) + return; + else if (b && (b->flags & ASSIGNMENT_BUILTIN)) + wcmd->word->flags |= W_ASSNBLTIN; + } + if ((wcmd->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'A')) + assoc = 1; + else if ((wcmd->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'a')) + array = 1; + if ((wcmd->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'g')) + global = 1; + } +} + +#ifndef ISOPTION +# define ISOPTION(s, c) (s[0] == '-' && s[1] == c && s[2] == 0) +#endif + +#define RETURN_NOT_COMMAND() \ + do { if (typep) *typep = 0; return words; } while (0) + +/* Make sure we have `command [-p] command_name [args]', and handle skipping + over the usual `--' that ends the options. Returns the updated WORDS with + the command and options stripped and sets *TYPEP to a non-zero value. If + any other options are supplied, or there is not a command_name, we punt + and return a zero value in *TYPEP without updating WORDS. */ +static WORD_LIST * +check_command_builtin (words, typep) + WORD_LIST *words; + int *typep; +{ + int type; + WORD_LIST *w; + + w = words->next; + type = 1; + + if (w && ISOPTION (w->word->word, 'p')) /* command -p */ + { +#if defined (RESTRICTED_SHELL) + if (restricted) + RETURN_NOT_COMMAND(); +#endif + w = w->next; + type = 2; + } + + if (w && ISOPTION (w->word->word, '-')) /* command [-p] -- */ + w = w->next; + else if (w && w->word->word[0] == '-') /* any other option */ + RETURN_NOT_COMMAND(); + + if (w == 0 || w->word->word == 0) /* must have a command_name */ + RETURN_NOT_COMMAND(); + + if (typep) + *typep = type; + return w; +} + +/* Return 1 if the file found by searching $PATH for PATHNAME, defaulting + to PATHNAME, is a directory. Used by the autocd code below. */ +static int +is_dirname (pathname) + char *pathname; +{ + char *temp; + int ret; + + temp = search_for_command (pathname, 0); + ret = temp ? file_isdir (temp) : file_isdir (pathname); + free (temp); + return ret; +} + +/* The meaty part of all the executions. We have to start hacking the + real execution of commands here. Fork a process, set things up, + execute the command. */ +static int +execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) + SIMPLE_COM *simple_command; + int pipe_in, pipe_out, async; + struct fd_bitmap *fds_to_close; +{ + WORD_LIST *words, *lastword; + char *command_line, *lastarg, *temp; + int first_word_quoted, result, builtin_is_special, already_forked, dofork; + int fork_flags, cmdflags; + pid_t old_last_async_pid; + sh_builtin_func_t *builtin; + SHELL_VAR *func; + volatile int old_builtin, old_command_builtin; + + result = EXECUTION_SUCCESS; + special_builtin_failed = builtin_is_special = 0; + command_line = (char *)0; + + QUIT; + + /* If we're in a function, update the line number information. */ + if (variable_context && interactive_shell && sourcelevel == 0) + { + /* line numbers in a function start at 1 */ + line_number -= function_line_number - 1; + if (line_number <= 0) + line_number = 1; + } + + /* Remember what this command line looks like at invocation. */ + command_string_index = 0; + print_simple_command (simple_command); + +#if 0 + if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))) +#else + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) +#endif + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = the_printed_command ? savestring (the_printed_command) : (char *)0; + } + + /* Run the debug trap before each simple command, but do it after we + update the line number information. */ + result = run_debug_trap (); +#if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && result != EXECUTION_SUCCESS) + return (EXECUTION_SUCCESS); +#endif + + cmdflags = simple_command->flags; + + first_word_quoted = + simple_command->words ? (simple_command->words->word->flags & W_QUOTED) : 0; + + last_command_subst_pid = NO_PID; + old_last_async_pid = last_asynchronous_pid; + + already_forked = 0; + + /* If we're in a pipeline or run in the background, set DOFORK so we + make the child early, before word expansion. This keeps assignment + statements from affecting the parent shell's environment when they + should not. */ + dofork = pipe_in != NO_PIPE || pipe_out != NO_PIPE || async; + + /* Something like `%2 &' should restart job 2 in the background, not cause + the shell to fork here. */ + if (dofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE && + simple_command->words && simple_command->words->word && + simple_command->words->word->word && + (simple_command->words->word->word[0] == '%')) + dofork = 0; + + if (dofork) + { + char *p; + + /* Do this now, because execute_disk_command will do it anyway in the + vast majority of cases. */ + maybe_make_export_env (); + + /* Don't let a DEBUG trap overwrite the command string to be saved with + the process/job associated with this child. */ + fork_flags = async ? FORK_ASYNC : 0; + if (make_child (p = savestring (the_printed_command_except_trap), fork_flags) == 0) + { + already_forked = 1; + cmdflags |= CMD_NO_FORK; + + subshell_environment = SUBSHELL_FORK; /* XXX */ + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + subshell_environment |= SUBSHELL_PIPE; + if (async) + subshell_environment |= SUBSHELL_ASYNC; + + /* We need to do this before piping to handle some really + pathological cases where one of the pipe file descriptors + is < 2. */ + if (fds_to_close) + close_fd_bitmap (fds_to_close); + + /* If we fork because of an input pipe, note input pipe for later to + inhibit async commands from redirecting stdin from /dev/null */ + stdin_redir |= pipe_in != NO_PIPE; + + do_piping (pipe_in, pipe_out); + pipe_in = pipe_out = NO_PIPE; +#if defined (COPROCESS_SUPPORT) + coproc_closeall (); +#endif + + last_asynchronous_pid = old_last_async_pid; + + if (async) + subshell_level++; /* not for pipes yet */ + +#if defined (JOB_CONTROL) + FREE (p); /* child doesn't use pointer */ +#endif + } + else + { + /* Don't let simple commands that aren't the last command in a + pipeline change $? for the rest of the pipeline (or at all). */ + if (pipe_out != NO_PIPE) + result = last_command_exit_value; + close_pipes (pipe_in, pipe_out); + command_line = (char *)NULL; /* don't free this. */ + return (result); + } + } + + QUIT; /* XXX */ + + /* If we are re-running this as the result of executing the `command' + builtin, do not expand the command words a second time. */ + if ((cmdflags & CMD_INHIBIT_EXPANSION) == 0) + { + current_fds_to_close = fds_to_close; + fix_assignment_words (simple_command->words); + /* Pass the ignore return flag down to command substitutions */ + if (cmdflags & CMD_IGNORE_RETURN) /* XXX */ + comsub_ignore_return++; + words = expand_words (simple_command->words); + if (cmdflags & CMD_IGNORE_RETURN) + comsub_ignore_return--; + current_fds_to_close = (struct fd_bitmap *)NULL; + } + else + words = copy_word_list (simple_command->words); + + /* It is possible for WORDS not to have anything left in it. + Perhaps all the words consisted of `$foo', and there was + no variable `$foo'. */ + if (words == 0) + { + this_command_name = 0; + result = execute_null_command (simple_command->redirects, + pipe_in, pipe_out, + already_forked ? 0 : async); + if (already_forked) + sh_exit (result); + else + { + bind_lastarg ((char *)NULL); + set_pipestatus_from_exit (result); + return (result); + } + } + + lastarg = (char *)NULL; + + begin_unwind_frame ("simple-command"); + + if (echo_command_at_execute && (cmdflags & CMD_COMMAND_BUILTIN) == 0) + xtrace_print_word_list (words, 1); + + builtin = (sh_builtin_func_t *)NULL; + func = (SHELL_VAR *)NULL; + + /* This test is still here in case we want to change the command builtin + handler code below to recursively call execute_simple_command (after + modifying the simple_command struct). */ + if ((cmdflags & CMD_NO_FUNCTIONS) == 0) + { + /* Posix.2 says special builtins are found before functions. We + don't set builtin_is_special anywhere other than here, because + this path is followed only when the `command' builtin is *not* + being used, and we don't want to exit the shell if a special + builtin executed with `command builtin' fails. `command' is not + a special builtin. */ + if (posixly_correct) + { + builtin = find_special_builtin (words->word->word); + if (builtin) + builtin_is_special = 1; + } + if (builtin == 0) + func = find_function (words->word->word); + } + + /* In POSIX mode, assignment errors in the temporary environment cause a + non-interactive shell to exit. */ +#if 1 + if (posixly_correct && builtin_is_special && interactive_shell == 0 && tempenv_assign_error) +#else + /* This is for strict posix conformance. */ + if (posixly_correct && interactive_shell == 0 && tempenv_assign_error) +#endif + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (ERREXIT); + } + tempenv_assign_error = 0; /* don't care about this any more */ + + /* This is where we handle the command builtin as a pseudo-reserved word + prefix. This allows us to optimize away forks if we can. */ + old_command_builtin = -1; + if (builtin == 0 && func == 0) + { + WORD_LIST *disposer, *l; + int cmdtype; + + builtin = find_shell_builtin (words->word->word); + while (builtin == command_builtin) + { + disposer = words; + cmdtype = 0; + words = check_command_builtin (words, &cmdtype); + if (cmdtype > 0) /* command -p [--] words */ + { + for (l = disposer; l->next != words; l = l->next) + ; + l->next = 0; + dispose_words (disposer); + cmdflags |= CMD_COMMAND_BUILTIN | CMD_NO_FUNCTIONS; + if (cmdtype == 2) + cmdflags |= CMD_STDPATH; + builtin = find_shell_builtin (words->word->word); + } + else + break; + } + if (cmdflags & CMD_COMMAND_BUILTIN) + { + old_command_builtin = executing_command_builtin; + unwind_protect_int (executing_command_builtin); + executing_command_builtin |= 1; + } + builtin = 0; + } + + add_unwind_protect (dispose_words, words); + QUIT; + + /* Bind the last word in this command to "$_" after execution. */ + for (lastword = words; lastword->next; lastword = lastword->next) + ; + lastarg = lastword->word->word; + +#if defined (JOB_CONTROL) + /* Is this command a job control related thing? */ + if (words->word->word[0] == '%' && already_forked == 0) + { + this_command_name = async ? "bg" : "fg"; + last_shell_builtin = this_shell_builtin; + this_shell_builtin = builtin_address (this_command_name); + result = (*this_shell_builtin) (words); + goto return_result; + } + + /* One other possibililty. The user may want to resume an existing job. + If they do, find out whether this word is a candidate for a running + job. */ + if (job_control && already_forked == 0 && async == 0 && + !first_word_quoted && + !words->next && + words->word->word[0] && + !simple_command->redirects && + pipe_in == NO_PIPE && + pipe_out == NO_PIPE && + (temp = get_string_value ("auto_resume"))) + { + int job, jflags, started_status; + + jflags = JM_STOPPED|JM_FIRSTMATCH; + if (STREQ (temp, "exact")) + jflags |= JM_EXACT; + else if (STREQ (temp, "substring")) + jflags |= JM_SUBSTRING; + else + jflags |= JM_PREFIX; + job = get_job_by_name (words->word->word, jflags); + if (job != NO_JOB) + { + run_unwind_frame ("simple-command"); + this_command_name = "fg"; + last_shell_builtin = this_shell_builtin; + this_shell_builtin = builtin_address ("fg"); + + started_status = start_job (job, 1); + return ((started_status < 0) ? EXECUTION_FAILURE : started_status); + } + } +#endif /* JOB_CONTROL */ + +run_builtin: + /* Remember the name of this command globally. */ + this_command_name = words->word->word; + + QUIT; + + /* This command could be a shell builtin or a user-defined function. + We have already found special builtins by this time, so we do not + set builtin_is_special. If this is a function or builtin, and we + have pipes, then fork a subshell in here. Otherwise, just execute + the command directly. */ + if (func == 0 && builtin == 0) + builtin = find_shell_builtin (this_command_name); + + last_shell_builtin = this_shell_builtin; + this_shell_builtin = builtin; + + if (builtin || func) + { + if (builtin) + { + old_builtin = executing_builtin; + unwind_protect_int (executing_builtin); /* modified in execute_builtin */ + if (old_command_builtin == -1) /* sentinel, can be set above */ + { + old_command_builtin = executing_command_builtin; + unwind_protect_int (executing_command_builtin); /* ditto and set above */ + } + } + if (already_forked) + { + /* reset_terminating_signals (); */ /* XXX */ + /* Reset the signal handlers in the child, but don't free the + trap strings. Set a flag noting that we have to free the + trap strings if we run trap to change a signal disposition. */ + reset_signal_handlers (); + subshell_environment |= SUBSHELL_RESETTRAP; + + if (async) + { + if ((cmdflags & CMD_STDIN_REDIR) && + pipe_in == NO_PIPE && + (stdin_redirects (simple_command->redirects) == 0)) + async_redirect_stdin (); + setup_async_signals (); + } + + if (async == 0) + subshell_level++; + execute_subshell_builtin_or_function + (words, simple_command->redirects, builtin, func, + pipe_in, pipe_out, async, fds_to_close, + cmdflags); + subshell_level--; + } + else + { + result = execute_builtin_or_function + (words, builtin, func, simple_command->redirects, fds_to_close, + cmdflags); + if (builtin) + { + if (result > EX_SHERRBASE) + { + switch (result) + { + case EX_REDIRFAIL: + case EX_BADASSIGN: + case EX_EXPFAIL: + /* These errors cause non-interactive posix mode shells to exit */ + if (posixly_correct && builtin_is_special && interactive_shell == 0) + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (ERREXIT); + } + break; + case EX_DISKFALLBACK: + /* XXX - experimental */ + executing_builtin = old_builtin; + executing_command_builtin = old_command_builtin; + builtin = 0; + /* XXX - redirections will have to be performed again */ + goto execute_from_filesystem; + } + result = builtin_status (result); + if (builtin_is_special) + special_builtin_failed = 1; /* XXX - take command builtin into account? */ + } + /* In POSIX mode, if there are assignment statements preceding + a special builtin, they persist after the builtin + completes. */ + if (posixly_correct && builtin_is_special && temporary_env) + merge_temporary_env (); + } + else /* function */ + { + if (result == EX_USAGE) + result = EX_BADUSAGE; + else if (result > EX_SHERRBASE) + result = builtin_status (result); + } + + set_pipestatus_from_exit (result); + + goto return_result; + } + } + + if (autocd && interactive && words->word && is_dirname (words->word->word)) + { + words = make_word_list (make_word ("--"), words); + words = make_word_list (make_word ("cd"), words); + xtrace_print_word_list (words, 0); + func = find_function ("cd"); + goto run_builtin; + } + +execute_from_filesystem: + if (command_line == 0) + command_line = savestring (the_printed_command_except_trap ? the_printed_command_except_trap : ""); + +#if defined (PROCESS_SUBSTITUTION) + /* The old code did not test already_forked and only did this if + subshell_environment&SUBSHELL_COMSUB != 0 (comsubs and procsubs). Other + uses of the no-fork optimization left FIFOs in $TMPDIR */ + if (already_forked == 0 && (cmdflags & CMD_NO_FORK) && fifos_pending() > 0) + cmdflags &= ~CMD_NO_FORK; +#endif + result = execute_disk_command (words, simple_command->redirects, command_line, + pipe_in, pipe_out, async, fds_to_close, + cmdflags); + + return_result: + bind_lastarg (lastarg); + FREE (command_line); + dispose_words (words); + if (builtin) + { + executing_builtin = old_builtin; + executing_command_builtin = old_command_builtin; + } + discard_unwind_frame ("simple-command"); + this_command_name = (char *)NULL; /* points to freed memory now */ + return (result); +} + +/* Translate the special builtin exit statuses. We don't really need a + function for this; it's a placeholder for future work. */ +static int +builtin_status (result) + int result; +{ + int r; + + switch (result) + { + case EX_USAGE: + case EX_BADSYNTAX: + r = EX_BADUSAGE; + break; + case EX_REDIRFAIL: + case EX_BADASSIGN: + case EX_EXPFAIL: + r = EXECUTION_FAILURE; + break; + default: + /* other special exit statuses not yet defined */ + r = (result > EX_SHERRBASE) ? EXECUTION_FAILURE : EXECUTION_SUCCESS; + break; + } + return (r); +} + +static int +execute_builtin (builtin, words, flags, subshell) + sh_builtin_func_t *builtin; + WORD_LIST *words; + int flags, subshell; +{ + int result, eval_unwind, ignexit_flag; + int isbltinenv, should_keep; + char *error_trap; + + error_trap = 0; + should_keep = 0; + + /* The eval builtin calls parse_and_execute, which does not know about + the setting of flags, and always calls the execution functions with + flags that will exit the shell on an error if -e is set. If the + eval builtin is being called, and we're supposed to ignore the exit + value of the command, we turn the -e flag off ourselves and disable + the ERR trap, then restore them when the command completes. This is + also a problem (as below) for the command and source/. builtins. */ + if (subshell == 0 && (flags & CMD_IGNORE_RETURN) && + (builtin == eval_builtin || (flags & CMD_COMMAND_BUILTIN) || builtin == source_builtin)) + { + begin_unwind_frame ("eval_builtin"); + unwind_protect_int (exit_immediately_on_error); + unwind_protect_int (builtin_ignoring_errexit); + error_trap = TRAP_STRING (ERROR_TRAP); + if (error_trap) + { + error_trap = savestring (error_trap); + add_unwind_protect (xfree, error_trap); + add_unwind_protect (set_error_trap, error_trap); + restore_default_signal (ERROR_TRAP); + } + exit_immediately_on_error = 0; + ignexit_flag = builtin_ignoring_errexit; + builtin_ignoring_errexit = 1; + eval_unwind = 1; + } + else + eval_unwind = 0; + + /* The temporary environment for a builtin is supposed to apply to + all commands executed by that builtin. Currently, this is a + problem only with the `unset', `source' and `eval' builtins. + `mapfile' is a special case because it uses evalstring (same as + eval or source) to run its callbacks. */ + /* SHOULD_KEEP is for the pop_scope call below; it only matters when + posixly_correct is set, but we should propagate the temporary environment + to the enclosing environment only for special builtins. */ + isbltinenv = (builtin == source_builtin || builtin == eval_builtin || builtin == unset_builtin || builtin == mapfile_builtin); + should_keep = isbltinenv && builtin != mapfile_builtin; +#if defined (HISTORY) && defined (READLINE) + if (builtin == fc_builtin || builtin == read_builtin) + { + isbltinenv = 1; + should_keep = 0; + } +#endif + + if (isbltinenv) + { + if (subshell == 0) + begin_unwind_frame ("builtin_env"); + + if (temporary_env) + { + push_scope (VC_BLTNENV, temporary_env); + if (flags & CMD_COMMAND_BUILTIN) + should_keep = 0; + if (subshell == 0) + add_unwind_protect (pop_scope, should_keep ? "1" : 0); + temporary_env = (HASH_TABLE *)NULL; + } + } + + if (subshell == 0 && builtin == eval_builtin) + { + if (evalnest_max > 0 && evalnest >= evalnest_max) + { + internal_error (_("eval: maximum eval nesting level exceeded (%d)"), evalnest); + evalnest = 0; + jump_to_top_level (DISCARD); + } + unwind_protect_int (evalnest); + /* The test for subshell == 0 above doesn't make a difference */ + evalnest++; /* execute_subshell_builtin_or_function sets this to 0 */ + } + else if (subshell == 0 && builtin == source_builtin) + { + if (sourcenest_max > 0 && sourcenest >= sourcenest_max) + { + internal_error (_("%s: maximum source nesting level exceeded (%d)"), this_command_name, sourcenest); + sourcenest = 0; + jump_to_top_level (DISCARD); + } + unwind_protect_int (sourcenest); + /* The test for subshell == 0 above doesn't make a difference */ + sourcenest++; /* execute_subshell_builtin_or_function sets this to 0 */ + } + + /* `return' does a longjmp() back to a saved environment in execute_function. + If a variable assignment list preceded the command, and the shell is + running in POSIX mode, we need to merge that into the shell_variables + table, since `return' is a POSIX special builtin. We don't do this if + it's being run by the `command' builtin, since that's supposed to inhibit + the special builtin properties. */ + if (posixly_correct && subshell == 0 && builtin == return_builtin && (flags & CMD_COMMAND_BUILTIN) == 0 && temporary_env) + { + begin_unwind_frame ("return_temp_env"); + add_unwind_protect (merge_temporary_env, (char *)NULL); + } + + executing_builtin++; + executing_command_builtin |= builtin == command_builtin; + result = ((*builtin) (words->next)); + + /* This shouldn't happen, but in case `return' comes back instead of + longjmp'ing, we need to unwind. */ + if (posixly_correct && subshell == 0 && builtin == return_builtin && temporary_env) + discard_unwind_frame ("return_temp_env"); + + if (subshell == 0 && isbltinenv) + run_unwind_frame ("builtin_env"); + + if (eval_unwind) + { + builtin_ignoring_errexit = ignexit_flag; + exit_immediately_on_error = builtin_ignoring_errexit ? 0 : errexit_flag; + if (error_trap) + { + set_error_trap (error_trap); + free (error_trap); + } + discard_unwind_frame ("eval_builtin"); + } + + return (result); +} + +static void +maybe_restore_getopt_state (gs) + sh_getopt_state_t *gs; +{ + /* If we have a local copy of OPTIND and it's at the right (current) + context, then we restore getopt's internal state. If not, we just + let it go. We know there is a local OPTIND if gs->gs_flags & 1. + This is set below in execute_function() before the context is run. */ + if (gs->gs_flags & 1) + sh_getopt_restore_istate (gs); + else + free (gs); +} + +#if defined (ARRAY_VARS) +void +restore_funcarray_state (fa) + struct func_array_state *fa; +{ + SHELL_VAR *nfv; + ARRAY *funcname_a; + + array_pop (fa->source_a); + array_pop (fa->lineno_a); + + GET_ARRAY_FROM_VAR ("FUNCNAME", nfv, funcname_a); + if (nfv == fa->funcname_v) + array_pop (funcname_a); + + free (fa); +} +#endif + +static int +execute_function (var, words, flags, fds_to_close, async, subshell) + SHELL_VAR *var; + WORD_LIST *words; + int flags; + struct fd_bitmap *fds_to_close; + int async, subshell; +{ + int return_val, result; + COMMAND *tc, *fc, *save_current; + char *debug_trap, *error_trap, *return_trap; +#if defined (ARRAY_VARS) + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; + ARRAY *funcname_a; + volatile ARRAY *bash_source_a; + volatile ARRAY *bash_lineno_a; + struct func_array_state *fa; +#endif + FUNCTION_DEF *shell_fn; + char *sfile, *t; + sh_getopt_state_t *gs; + SHELL_VAR *gv; + + USE_VAR(fc); + + if (funcnest_max > 0 && funcnest >= funcnest_max) + { + internal_error (_("%s: maximum function nesting level exceeded (%d)"), var->name, funcnest); + funcnest = 0; /* XXX - should we reset it somewhere else? */ + jump_to_top_level (DISCARD); + } + +#if defined (ARRAY_VARS) + GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a); +#endif + + tc = (COMMAND *)copy_command (function_cell (var)); + if (tc && (flags & CMD_IGNORE_RETURN)) + tc->flags |= CMD_IGNORE_RETURN; + + /* A limited attempt at optimization: shell functions at the end of command + substitutions that are already marked NO_FORK. */ + if (tc && (flags & CMD_NO_FORK) && (subshell_environment & SUBSHELL_COMSUB)) + optimize_shell_function (tc); + + gs = sh_getopt_save_istate (); + if (subshell == 0) + { + begin_unwind_frame ("function_calling"); + /* If the shell is in posix mode, this will push the variables in + the temporary environment to the "current shell environment" (the + global scope), and dispose the temporary env before setting it to + NULL later. This behavior has disappeared from the latest edition + of the standard, so I will eventually remove it from variables.c: + push_var_context. */ + push_context (var->name, subshell, temporary_env); + /* This has to be before the pop_context(), because the unwinding of + local variables may cause the restore of a local declaration of + OPTIND to force a getopts state reset. */ + add_unwind_protect (maybe_restore_getopt_state, gs); + add_unwind_protect (pop_context, (char *)NULL); + unwind_protect_int (line_number); + unwind_protect_int (line_number_for_err_trap); + unwind_protect_int (function_line_number); + unwind_protect_int (return_catch_flag); + unwind_protect_jmp_buf (return_catch); + add_unwind_protect (dispose_command, (char *)tc); + unwind_protect_pointer (this_shell_function); + unwind_protect_int (funcnest); + unwind_protect_int (loop_level); + } + else + push_context (var->name, subshell, temporary_env); /* don't unwind-protect for subshells */ + + temporary_env = (HASH_TABLE *)NULL; + + this_shell_function = var; + make_funcname_visible (1); + + debug_trap = TRAP_STRING(DEBUG_TRAP); + error_trap = TRAP_STRING(ERROR_TRAP); + return_trap = TRAP_STRING(RETURN_TRAP); + + /* The order of the unwind protects for debug_trap, error_trap and + return_trap is important here! unwind-protect commands are run + in reverse order of registration. If this causes problems, take + out the xfree unwind-protect calls and live with the small memory leak. */ + + /* function_trace_mode != 0 means that all functions inherit the DEBUG trap. + if the function has the trace attribute set, it inherits the DEBUG trap */ + if (debug_trap && ((trace_p (var) == 0) && function_trace_mode == 0)) + { + if (subshell == 0) + { + debug_trap = savestring (debug_trap); + add_unwind_protect (xfree, debug_trap); + add_unwind_protect (maybe_set_debug_trap, debug_trap); + } + restore_default_signal (DEBUG_TRAP); + } + + /* error_trace_mode != 0 means that functions inherit the ERR trap. */ + if (error_trap && error_trace_mode == 0) + { + if (subshell == 0) + { + error_trap = savestring (error_trap); + add_unwind_protect (xfree, error_trap); + add_unwind_protect (maybe_set_error_trap, error_trap); + } + restore_default_signal (ERROR_TRAP); + } + + /* Shell functions inherit the RETURN trap if function tracing is on + globally or on individually for this function. */ + if (return_trap && (signal_in_progress (DEBUG_TRAP) || ((trace_p (var) == 0) && function_trace_mode == 0))) + { + if (subshell == 0) + { + return_trap = savestring (return_trap); + add_unwind_protect (xfree, return_trap); + add_unwind_protect (maybe_set_return_trap, return_trap); + } + restore_default_signal (RETURN_TRAP); + } + + funcnest++; +#if defined (ARRAY_VARS) + /* This is quite similar to the code in shell.c and elsewhere. */ + shell_fn = find_function_def (this_shell_function->name); + sfile = shell_fn ? shell_fn->source_file : ""; + array_push ((ARRAY *)funcname_a, this_shell_function->name); + + array_push ((ARRAY *)bash_source_a, sfile); + t = itos (executing_line_number ()); + array_push ((ARRAY *)bash_lineno_a, t); + free (t); +#endif + +#if defined (ARRAY_VARS) + fa = (struct func_array_state *)xmalloc (sizeof (struct func_array_state)); + fa->source_a = (ARRAY *)bash_source_a; + fa->source_v = bash_source_v; + fa->lineno_a = (ARRAY *)bash_lineno_a; + fa->lineno_v = bash_lineno_v; + fa->funcname_a = (ARRAY *)funcname_a; + fa->funcname_v = funcname_v; + if (subshell == 0) + add_unwind_protect (restore_funcarray_state, fa); +#endif + + /* The temporary environment for a function is supposed to apply to + all commands executed within the function body. */ + + /* Initialize BASH_ARGC and BASH_ARGV before we blow away the positional + parameters */ + if (debugging_mode || shell_compatibility_level <= 44) + init_bash_argv (); + + remember_args (words->next, 1); + + /* Update BASH_ARGV and BASH_ARGC */ + if (debugging_mode) + { + push_args (words->next); + if (subshell == 0) + add_unwind_protect (pop_args, 0); + } + + /* Number of the line on which the function body starts. */ + line_number = function_line_number = tc->line; + +#if defined (JOB_CONTROL) + if (subshell) + stop_pipeline (async, (COMMAND *)NULL); +#endif + + if (shell_compatibility_level > 43) + loop_level = 0; + + fc = tc; + + from_return_trap = 0; + + return_catch_flag++; + return_val = setjmp_nosigs (return_catch); + + if (return_val) + { + result = return_catch_value; + /* Run the RETURN trap in the function's context. */ + save_current = currently_executing_command; + if (from_return_trap == 0) + run_return_trap (); + currently_executing_command = save_current; + } + else + { + /* Run the debug trap here so we can trap at the start of a function's + execution rather than the execution of the body's first command. */ + showing_function_line = 1; + save_current = currently_executing_command; + result = run_debug_trap (); +#if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode == 0 || result == EXECUTION_SUCCESS) + { + showing_function_line = 0; + currently_executing_command = save_current; + result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close); + + /* Run the RETURN trap in the function's context */ + save_current = currently_executing_command; + run_return_trap (); + currently_executing_command = save_current; + } +#else + result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close); + + save_current = currently_executing_command; + run_return_trap (); + currently_executing_command = save_current; +#endif + showing_function_line = 0; + } + + /* If we have a local copy of OPTIND, note it in the saved getopts state. */ + gv = find_variable ("OPTIND"); + if (gv && gv->context == variable_context) + gs->gs_flags |= 1; + + if (subshell == 0) + run_unwind_frame ("function_calling"); +#if defined (ARRAY_VARS) + else + { + restore_funcarray_state (fa); + /* Restore BASH_ARGC and BASH_ARGV */ + if (debugging_mode) + pop_args (); + } +#endif + + if (variable_context == 0 || this_shell_function == 0) + { + make_funcname_visible (0); +#if defined (PROCESS_SUBSTITUTION) + unlink_fifo_list (); +#endif + } + + return (result); +} + +/* A convenience routine for use by other parts of the shell to execute + a particular shell function. */ +int +execute_shell_function (var, words) + SHELL_VAR *var; + WORD_LIST *words; +{ + int ret; + struct fd_bitmap *bitmap; + + bitmap = new_fd_bitmap (FD_BITMAP_DEFAULT_SIZE); + begin_unwind_frame ("execute-shell-function"); + add_unwind_protect (dispose_fd_bitmap, (char *)bitmap); + + ret = execute_function (var, words, 0, bitmap, 0, 0); + + dispose_fd_bitmap (bitmap); + discard_unwind_frame ("execute-shell-function"); + + return ret; +} + +/* Execute a shell builtin or function in a subshell environment. This + routine does not return; it only calls exit(). If BUILTIN is non-null, + it points to a function to call to execute a shell builtin; otherwise + VAR points at the body of a function to execute. WORDS is the arguments + to the command, REDIRECTS specifies redirections to perform before the + command is executed. */ +static void +execute_subshell_builtin_or_function (words, redirects, builtin, var, + pipe_in, pipe_out, async, fds_to_close, + flags) + WORD_LIST *words; + REDIRECT *redirects; + sh_builtin_func_t *builtin; + SHELL_VAR *var; + int pipe_in, pipe_out, async; + struct fd_bitmap *fds_to_close; + int flags; +{ + int result, r, funcvalue; +#if defined (JOB_CONTROL) + int jobs_hack; + + jobs_hack = (builtin == jobs_builtin) && + ((subshell_environment & SUBSHELL_ASYNC) == 0 || pipe_out != NO_PIPE); +#endif + + /* A subshell is neither a login shell nor interactive. */ + login_shell = interactive = 0; + if (builtin == eval_builtin) + evalnest = 0; + else if (builtin == source_builtin) + sourcenest = 0; + + if (async) + subshell_environment |= SUBSHELL_ASYNC; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + subshell_environment |= SUBSHELL_PIPE; + + maybe_make_export_env (); /* XXX - is this needed? */ + +#if defined (JOB_CONTROL) + /* Eradicate all traces of job control after we fork the subshell, so + all jobs begun by this subshell are in the same process group as + the shell itself. */ + + /* Allow the output of `jobs' to be piped. */ + if (jobs_hack) + kill_current_pipeline (); + else + without_job_control (); + + set_sigchld_handler (); +#else + without_job_control (); +#endif /* JOB_CONTROL */ + + set_sigint_handler (); + + if (fds_to_close) + close_fd_bitmap (fds_to_close); + + do_piping (pipe_in, pipe_out); + + if (do_redirections (redirects, RX_ACTIVE) != 0) + exit (EXECUTION_FAILURE); + + if (builtin) + { + /* Give builtins a place to jump back to on failure, + so we don't go back up to main(). */ + result = setjmp_nosigs (top_level); + + /* Give the return builtin a place to jump to when executed in a subshell + or pipeline */ + funcvalue = 0; + if (return_catch_flag && builtin == return_builtin) + funcvalue = setjmp_nosigs (return_catch); + + if (result == EXITPROG) + subshell_exit (last_command_exit_value); + else if (result) + subshell_exit (EXECUTION_FAILURE); + else if (funcvalue) + subshell_exit (return_catch_value); + else + { + r = execute_builtin (builtin, words, flags, 1); + fflush (stdout); + if (r == EX_USAGE) + r = EX_BADUSAGE; + /* XXX - experimental */ + else if (r == EX_DISKFALLBACK) + { + char *command_line; + + command_line = savestring (the_printed_command_except_trap ? the_printed_command_except_trap : ""); + r = execute_disk_command (words, (REDIRECT *)0, command_line, + -1, -1, async, (struct fd_bitmap *)0, flags|CMD_NO_FORK); + } + subshell_exit (r); + } + } + else + { + r = execute_function (var, words, flags, fds_to_close, async, 1); + fflush (stdout); + subshell_exit (r); + } +} + +/* Execute a builtin or function in the current shell context. If BUILTIN + is non-null, it is the builtin command to execute, otherwise VAR points + to the body of a function. WORDS are the command's arguments, REDIRECTS + are the redirections to perform. FDS_TO_CLOSE is the usual bitmap of + file descriptors to close. + + If BUILTIN is exec_builtin, the redirections specified in REDIRECTS are + not undone before this function returns. */ +static int +execute_builtin_or_function (words, builtin, var, redirects, + fds_to_close, flags) + WORD_LIST *words; + sh_builtin_func_t *builtin; + SHELL_VAR *var; + REDIRECT *redirects; + struct fd_bitmap *fds_to_close; + int flags; +{ + int result; + REDIRECT *saved_undo_list; +#if defined (PROCESS_SUBSTITUTION) + int ofifo, nfifo, osize; + void *ofifo_list; +#endif + +#if defined (PROCESS_SUBSTITUTION) + begin_unwind_frame ("saved_fifos"); + /* If we return, we longjmp and don't get a chance to restore the old + fifo list, so we add an unwind protect to free it */ + ofifo = num_fifos (); + ofifo_list = copy_fifo_list (&osize); + if (ofifo_list) + add_unwind_protect (xfree, ofifo_list); +#endif + + if (do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE) != 0) + { + undo_partial_redirects (); + dispose_exec_redirects (); +#if defined (PROCESS_SUBSTITUTION) + free (ofifo_list); +#endif + return (EX_REDIRFAIL); /* was EXECUTION_FAILURE */ + } + + saved_undo_list = redirection_undo_list; + + /* Calling the "exec" builtin changes redirections forever. */ + if (builtin == exec_builtin) + { + dispose_redirects (saved_undo_list); + saved_undo_list = exec_redirection_undo_list; + exec_redirection_undo_list = (REDIRECT *)NULL; + } + else + dispose_exec_redirects (); + + if (saved_undo_list) + { + begin_unwind_frame ("saved-redirects"); + add_unwind_protect (cleanup_redirects, (char *)saved_undo_list); + } + + redirection_undo_list = (REDIRECT *)NULL; + + if (builtin) + result = execute_builtin (builtin, words, flags, 0); + else + result = execute_function (var, words, flags, fds_to_close, 0, 0); + + /* We do this before undoing the effects of any redirections. */ + fflush (stdout); + fpurge (stdout); + if (ferror (stdout)) + clearerr (stdout); + + /* If we are executing the `command' builtin, but this_shell_builtin is + set to `exec_builtin', we know that we have something like + `command exec [redirection]', since otherwise `exec' would have + overwritten the shell and we wouldn't get here. In this case, we + want to behave as if the `command' builtin had not been specified + and preserve the redirections. */ + if (builtin == command_builtin && this_shell_builtin == exec_builtin) + { + int discard; + + discard = 0; + if (saved_undo_list) + { + dispose_redirects (saved_undo_list); + discard = 1; + } + redirection_undo_list = exec_redirection_undo_list; + saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL; + if (discard) + discard_unwind_frame ("saved-redirects"); + } + + if (saved_undo_list) + { + redirection_undo_list = saved_undo_list; + discard_unwind_frame ("saved-redirects"); + } + + undo_partial_redirects (); + +#if defined (PROCESS_SUBSTITUTION) + /* Close any FIFOs created by this builtin or function. */ + nfifo = num_fifos (); + if (nfifo > ofifo) + close_new_fifos (ofifo_list, osize); + if (ofifo_list) + free (ofifo_list); + discard_unwind_frame ("saved_fifos"); +#endif + + return (result); +} + +void +setup_async_signals () +{ +#if defined (__BEOS__) + set_signal_handler (SIGHUP, SIG_IGN); /* they want csh-like behavior */ +#endif + +#if defined (JOB_CONTROL) + if (job_control == 0) +#endif + { + /* Make sure we get the original signal dispositions now so we don't + confuse the trap builtin later if the subshell tries to use it to + reset SIGINT/SIGQUIT. Don't call set_signal_ignored; that sets + the value of original_signals to SIG_IGN. Posix interpretation 751. */ + get_original_signal (SIGINT); + set_signal_handler (SIGINT, SIG_IGN); + + get_original_signal (SIGQUIT); + set_signal_handler (SIGQUIT, SIG_IGN); + } +} + +/* Execute a simple command that is hopefully defined in a disk file + somewhere. + + 1) fork () + 2) connect pipes + 3) look up the command + 4) do redirections + 5) execve () + 6) If the execve failed, see if the file has executable mode set. + If so, and it isn't a directory, then execute its contents as + a shell script. + + Note that the filename hashing stuff has to take place up here, + in the parent. This is probably why the Bourne style shells + don't handle it, since that would require them to go through + this gnarly hair, for no good reason. + + NOTE: callers expect this to fork or exit(). */ + +/* Name of a shell function to call when a command name is not found. */ +#ifndef NOTFOUND_HOOK +# define NOTFOUND_HOOK "command_not_found_handle" +#endif + +static int +execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, + async, fds_to_close, cmdflags) + WORD_LIST *words; + REDIRECT *redirects; + char *command_line; + int pipe_in, pipe_out, async; + struct fd_bitmap *fds_to_close; + int cmdflags; +{ + char *pathname, *command, **args, *p; + int nofork, stdpath, result, fork_flags; + pid_t pid; + SHELL_VAR *hookf; + WORD_LIST *wl; + + stdpath = (cmdflags & CMD_STDPATH); /* use command -p path */ + nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */ + pathname = words->word->word; + + p = 0; + result = EXECUTION_SUCCESS; +#if defined (RESTRICTED_SHELL) + command = (char *)NULL; + if (restricted && mbschr (pathname, '/')) + { + internal_error (_("%s: restricted: cannot specify `/' in command names"), + pathname); + result = last_command_exit_value = EXECUTION_FAILURE; + + /* If we're not going to fork below, we must already be in a child + process or a context in which it's safe to call exit(2). */ + if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE) + exit (last_command_exit_value); + else + goto parent_return; + } +#endif /* RESTRICTED_SHELL */ + + command = search_for_command (pathname, CMDSRCH_HASH|(stdpath ? CMDSRCH_STDPATH : 0)); + QUIT; + + if (command) + { + /* If we're optimizing out the fork (implicit `exec'), decrement the + shell level like `exec' would do. */ +#if 0 /* TAG: bash-5.2 psmith 10/11/2020 */ + if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE && (subshell_environment & SUBSHELL_PIPE) == 0) +#else + if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE) +#endif + adjust_shell_level (-1); + + maybe_make_export_env (); + put_command_name_into_env (command); + } + + /* We have to make the child before we check for the non-existence + of COMMAND, since we want the error messages to be redirected. */ + /* If we can get away without forking and there are no pipes to deal with, + don't bother to fork, just directly exec the command. */ + if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE) + pid = 0; + else + { + fork_flags = async ? FORK_ASYNC : 0; + pid = make_child (p = savestring (command_line), fork_flags); + } + + if (pid == 0) + { + int old_interactive; + + reset_terminating_signals (); /* XXX */ + /* Cancel traps, in trap.c. */ + restore_original_signals (); + +#if defined (JOB_CONTROL) + FREE (p); +#endif + + /* restore_original_signals may have undone the work done + by make_child to ensure that SIGINT and SIGQUIT are ignored + in asynchronous children. */ + if (async) + { + if ((cmdflags & CMD_STDIN_REDIR) && + pipe_in == NO_PIPE && + (stdin_redirects (redirects) == 0)) + async_redirect_stdin (); + setup_async_signals (); + } + + /* This functionality is now provided by close-on-exec of the + file descriptors manipulated by redirection and piping. + Some file descriptors still need to be closed in all children + because of the way bash does pipes; fds_to_close is a + bitmap of all such file descriptors. */ + if (fds_to_close) + close_fd_bitmap (fds_to_close); + + do_piping (pipe_in, pipe_out); + + old_interactive = interactive; + if (async) + interactive = 0; + + subshell_environment |= SUBSHELL_FORK; /* XXX - was just = */ + +#if defined (PROCESS_SUBSTITUTION) && !defined (HAVE_DEV_FD) + clear_fifo_list (); /* XXX - we haven't created any FIFOs */ +#endif + + if (redirects && (do_redirections (redirects, RX_ACTIVE) != 0)) + { +#if defined (PROCESS_SUBSTITUTION) + /* Try to remove named pipes that may have been created as the + result of redirections. */ + unlink_fifo_list (); +#endif /* PROCESS_SUBSTITUTION */ + exit (EXECUTION_FAILURE); + } + + if (async) + interactive = old_interactive; + + if (command == 0) + { + hookf = find_function (NOTFOUND_HOOK); + if (hookf == 0) + { + /* Make sure filenames are displayed using printable characters */ + pathname = printable_filename (pathname, 0); + internal_error (_("%s: command not found"), pathname); + exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */ + } + + /* We don't want to manage process groups for processes we start + from here, so we turn off job control and don't attempt to + manipulate the terminal's process group. */ + without_job_control (); + +#if defined (JOB_CONTROL) + set_sigchld_handler (); +#endif + + wl = make_word_list (make_word (NOTFOUND_HOOK), words); + exit (execute_shell_function (hookf, wl)); + } + + /* Execve expects the command name to be in args[0]. So we + leave it there, in the same format that the user used to + type it in. */ + args = strvec_from_word_list (words, 0, 0, (int *)NULL); + exit (shell_execve (command, args, export_env)); + } + else + { +parent_return: + QUIT; + + /* Make sure that the pipes are closed in the parent. */ + close_pipes (pipe_in, pipe_out); +#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD) +#if 0 + if (variable_context == 0) + unlink_fifo_list (); +#endif +#endif + FREE (command); + return (result); + } +} + +/* CPP defines to decide whether a particular index into the #! line + corresponds to a valid interpreter name or argument character, or + whitespace. The MSDOS define is to allow \r to be treated the same + as \n. */ + +#if !defined (MSDOS) +# define STRINGCHAR(ind) \ + (ind < sample_len && !whitespace (sample[ind]) && sample[ind] != '\n') +# define WHITECHAR(ind) \ + (ind < sample_len && whitespace (sample[ind])) +#else /* MSDOS */ +# define STRINGCHAR(ind) \ + (ind < sample_len && !whitespace (sample[ind]) && sample[ind] != '\n' && sample[ind] != '\r') +# define WHITECHAR(ind) \ + (ind < sample_len && whitespace (sample[ind])) +#endif /* MSDOS */ + +static char * +getinterp (sample, sample_len, endp) + char *sample; + int sample_len, *endp; +{ + register int i; + char *execname; + int start; + + /* Find the name of the interpreter to exec. */ + for (i = 2; i < sample_len && whitespace (sample[i]); i++) + ; + + for (start = i; STRINGCHAR(i); i++) + ; + + execname = substring (sample, start, i); + + if (endp) + *endp = i; + return execname; +} + +#if !defined (HAVE_HASH_BANG_EXEC) +/* If the operating system on which we're running does not handle + the #! executable format, then help out. SAMPLE is the text read + from the file, SAMPLE_LEN characters. COMMAND is the name of + the script; it and ARGS, the arguments given by the user, will + become arguments to the specified interpreter. ENV is the environment + to pass to the interpreter. + + The word immediately following the #! is the interpreter to execute. + A single argument to the interpreter is allowed. */ + +static int +execute_shell_script (sample, sample_len, command, args, env) + char *sample; + int sample_len; + char *command; + char **args, **env; +{ + char *execname, *firstarg; + int i, start, size_increment, larry; + + /* Find the name of the interpreter to exec. */ + execname = getinterp (sample, sample_len, &i); + size_increment = 1; + + /* Now the argument, if any. */ + for (firstarg = (char *)NULL, start = i; WHITECHAR(i); i++) + ; + + /* If there is more text on the line, then it is an argument for the + interpreter. */ + + if (STRINGCHAR(i)) + { + for (start = i; STRINGCHAR(i); i++) + ; + firstarg = substring ((char *)sample, start, i); + size_increment = 2; + } + + larry = strvec_len (args) + size_increment; + args = strvec_resize (args, larry + 1); + + for (i = larry - 1; i; i--) + args[i] = args[i - size_increment]; + + args[0] = execname; + if (firstarg) + { + args[1] = firstarg; + args[2] = command; + } + else + args[1] = command; + + args[larry] = (char *)NULL; + + return (shell_execve (execname, args, env)); +} +#undef STRINGCHAR +#undef WHITECHAR + +#endif /* !HAVE_HASH_BANG_EXEC */ + +static void +initialize_subshell () +{ +#if defined (ALIAS) + /* Forget about any aliases that we knew of. We are in a subshell. */ + delete_all_aliases (); +#endif /* ALIAS */ + +#if defined (HISTORY) + /* Forget about the history lines we have read. This is a non-interactive + subshell. */ + history_lines_this_session = 0; +#endif + + /* Forget about the way job control was working. We are in a subshell. */ + without_job_control (); + +#if defined (JOB_CONTROL) + set_sigchld_handler (); + init_job_stats (); +#endif /* JOB_CONTROL */ + + /* Reset the values of the shell flags and options. */ + reset_shell_flags (); + reset_shell_options (); + reset_shopt_options (); + + /* Zero out builtin_env, since this could be a shell script run from a + sourced file with a temporary environment supplied to the `source/.' + builtin. Such variables are not supposed to be exported (empirical + testing with sh and ksh). Just throw it away; don't worry about a + memory leak. */ + if (vc_isbltnenv (shell_variables)) + shell_variables = shell_variables->down; + + clear_unwind_protect_list (0); + /* XXX -- are there other things we should be resetting here? */ + parse_and_execute_level = 0; /* nothing left to restore it */ + + /* We're no longer inside a shell function. */ + variable_context = return_catch_flag = funcnest = evalnest = sourcenest = 0; + + executing_list = 0; /* XXX */ + + /* If we're not interactive, close the file descriptor from which we're + reading the current shell script. */ + if (interactive_shell == 0) + unset_bash_input (0); +} + +#if defined (HAVE_SETOSTYPE) && defined (_POSIX_SOURCE) +# define SETOSTYPE(x) __setostype(x) +#else +# define SETOSTYPE(x) +#endif + +#define HASH_BANG_BUFSIZ 128 + +#define READ_SAMPLE_BUF(file, buf, len) \ + do \ + { \ + fd = open(file, O_RDONLY); \ + if (fd >= 0) \ + { \ + len = read (fd, buf, HASH_BANG_BUFSIZ); \ + close (fd); \ + } \ + else \ + len = -1; \ + } \ + while (0) + +/* Call execve (), handling interpreting shell scripts, and handling + exec failures. */ +int +shell_execve (command, args, env) + char *command; + char **args, **env; +{ + int larray, i, fd; + char sample[HASH_BANG_BUFSIZ]; + int sample_len; + + SETOSTYPE (0); /* Some systems use for USG/POSIX semantics */ + execve (command, args, env); + i = errno; /* error from execve() */ + CHECK_TERMSIG; + SETOSTYPE (1); + + /* If we get to this point, then start checking out the file. + Maybe it is something we can hack ourselves. */ + if (i != ENOEXEC) + { + /* make sure this is set correctly for file_error/report_error */ + last_command_exit_value = (i == ENOENT) ? EX_NOTFOUND : EX_NOEXEC; /* XXX Posix.2 says that exit status is 126 */ + if (file_isdir (command)) +#if defined (EISDIR) + internal_error (_("%s: %s"), command, strerror (EISDIR)); +#else + internal_error (_("%s: is a directory"), command); +#endif + else if (executable_file (command) == 0) + { + errno = i; + file_error (command); + } + /* errors not involving the path argument to execve. */ + else if (i == E2BIG || i == ENOMEM) + { + errno = i; + file_error (command); + } + else + { + /* The file has the execute bits set, but the kernel refuses to + run it for some reason. See why. */ +#if defined (HAVE_HASH_BANG_EXEC) || defined (HAVE_ELF_H) + int fd = open (command, O_RDONLY); + + if (fd >= 0) + sample_len = read (fd, sample, sizeof (sample)); + else + sample_len = -1; +#endif +#if defined (HAVE_HASH_BANG_EXEC) + READ_SAMPLE_BUF (command, sample, sample_len); + if (sample_len > 0) + sample[sample_len - 1] = '\0'; + if (sample_len > 2 && sample[0] == '#' && sample[1] == '!') + { + char *interp; + int ilen; + + close (fd); + interp = getinterp (sample, sample_len, (int *)NULL); + ilen = strlen (interp); + errno = i; + if (interp[ilen - 1] == '\r') + { + interp = xrealloc (interp, ilen + 2); + interp[ilen - 1] = '^'; + interp[ilen] = 'M'; + interp[ilen + 1] = '\0'; + } + sys_error (_("%s: %s: bad interpreter"), command, interp ? interp : ""); + FREE (interp); + return (EX_NOEXEC); + } +#endif +#if defined (HAVE_ELF_H) + if (i == ENOENT + && sample_len > EI_NIDENT + && memcmp (sample, ELFMAG, SELFMAG) == 0) + { + off_t offset = -1; + int dynamic_nobits = 0; + + /* It is an ELF file. Now determine whether it is dynamically + linked and if yes, get the offset of the interpreter + string. */ + if (sample[EI_CLASS] == ELFCLASS32 + && sample_len > sizeof (Elf32_Ehdr)) + { + Elf32_Ehdr ehdr; + Elf32_Phdr *phdr; + Elf32_Shdr *shdr; + Elf32_Half nphdr, nshdr; + + /* We have to copy the data since the sample buffer + might not be aligned correctly to be accessed as + an Elf32_Ehdr struct. */ + memcpy (&ehdr, sample, sizeof (Elf32_Ehdr)); + + nshdr = ehdr.e_shnum; + shdr = (Elf32_Shdr *) malloc ((size_t)nshdr * (size_t)ehdr.e_shentsize); + + if (shdr != NULL) + { +#ifdef HAVE_PREAD + sample_len = pread (fd, shdr, (size_t)nshdr * (size_t)ehdr.e_shentsize, + ehdr.e_shoff); +#else + if (lseek (fd, ehdr.e_shoff, SEEK_SET) != -1) + sample_len = read (fd, shdr, + nshdr * ehdr.e_shentsize); + else + sample_len = -1; +#endif + if (sample_len == nshdr * ehdr.e_shentsize) + { + char *strings = (char *) malloc (shdr[ehdr.e_shstrndx].sh_size); + if (strings != NULL) + { +#ifdef HAVE_PREAD + sample_len = pread (fd, strings, + shdr[ehdr.e_shstrndx].sh_size, + shdr[ehdr.e_shstrndx].sh_offset); +#else + if (lseek (fd, shdr[ehdr.e_shstrndx].sh_offset, + SEEK_SET) != -1) + sample_len = read (fd, strings, + shdr[ehdr.e_shstrndx].sh_size); + else + sample_len = -1; +#endif + if (sample_len == shdr[ehdr.e_shstrndx].sh_size) + while (nshdr-- > 0) + if (strcmp (strings + shdr[nshdr].sh_name, + ".interp") == 0 && + shdr[nshdr].sh_type == SHT_NOBITS) + { + dynamic_nobits++; + break; + } + free (strings); + } + } + free (shdr); + } + + nphdr = ehdr.e_phnum; + phdr = (Elf32_Phdr *) malloc ((size_t)nphdr * (size_t)ehdr.e_phentsize); + if (phdr != NULL) + { +#ifdef HAVE_PREAD + sample_len = pread (fd, phdr, (size_t)nphdr * (size_t)ehdr.e_phentsize, + ehdr.e_phoff); +#else + if (lseek (fd, ehdr.e_phoff, SEEK_SET) != -1) + sample_len = read (fd, phdr, + nphdr * ehdr.e_phentsize); + else + sample_len = -1; +#endif + if (sample_len == nphdr * ehdr.e_phentsize) + while (nphdr-- > 0) + if (phdr[nphdr].p_type == PT_INTERP) + { + offset = phdr[nphdr].p_offset; + break; + } + free (phdr); + } + } + else if (sample[EI_CLASS] == ELFCLASS64 + && sample_len > sizeof (Elf64_Ehdr)) + { + Elf64_Ehdr ehdr; + Elf64_Phdr *phdr; + Elf64_Shdr *shdr; + Elf32_Half nphdr, nshdr; + + /* We have to copy the data since the sample buffer + might not be aligned correctly to be accessed as + an Elf64_Ehdr struct. */ + memcpy (&ehdr, sample, sizeof (Elf64_Ehdr)); + + nshdr = ehdr.e_shnum; + shdr = (Elf64_Shdr *) malloc ((size_t)nshdr * (size_t)ehdr.e_shentsize); + if (shdr != NULL) + { +#ifdef HAVE_PREAD + sample_len = pread (fd, shdr, (size_t)nshdr * (size_t)ehdr.e_shentsize, + ehdr.e_shoff); +#else + if (lseek (fd, ehdr.e_shoff, SEEK_SET) != -1) + sample_len = read (fd, shdr, + nshdr * ehdr.e_shentsize); + else + sample_len = -1; +#endif + if (sample_len == nshdr * ehdr.e_shentsize) + { + char *strings = (char *) malloc (shdr[ehdr.e_shstrndx].sh_size); + if (strings != NULL) + { +#ifdef HAVE_PREAD + sample_len = pread (fd, strings, + shdr[ehdr.e_shstrndx].sh_size, + shdr[ehdr.e_shstrndx].sh_offset); +#else + if (lseek (fd, shdr[ehdr.e_shstrndx].sh_offset, + SEEK_SET) != -1) + sample_len = read (fd, strings, + shdr[ehdr.e_shstrndx].sh_size); + else + sample_len = -1; +#endif + if (sample_len == shdr[ehdr.e_shstrndx].sh_size) + while (nshdr-- > 0) + if (strcmp (strings + shdr[nshdr].sh_name, + ".interp") == 0 && + shdr[nshdr].sh_type == SHT_NOBITS) + { + dynamic_nobits++; + break; + } + free (strings); + } + } + free (shdr); + } + + nphdr = ehdr.e_phnum; + phdr = (Elf64_Phdr *) malloc ((size_t)nphdr * (size_t)ehdr.e_phentsize); + if (phdr != NULL) + { +#ifdef HAVE_PREAD + sample_len = pread (fd, phdr, (size_t)nphdr * (size_t)ehdr.e_phentsize, + ehdr.e_phoff); +#else + if (lseek (fd, ehdr.e_phoff, SEEK_SET) != -1) + sample_len = read (fd, phdr, + nphdr * ehdr.e_phentsize); + else + sample_len = -1; +#endif + if (sample_len == nphdr * ehdr.e_phentsize) + while (nphdr-- > 0) + if (phdr[nphdr].p_type == PT_INTERP) + { + offset = phdr[nphdr].p_offset; + break; + } + free (phdr); + } + } + + if (offset != -1) + { + ssize_t maxlen = 0; + ssize_t actlen = 0; + char *interp = NULL; + + do + { + if (actlen == maxlen) + { + char *newinterp = realloc (interp, maxlen += 200); + if (newinterp == NULL) + { + actlen = 0; + break; + } + interp = newinterp; + +#ifdef HAVE_PREAD + actlen = pread (fd, interp, maxlen, offset); +#else + if (lseek (fd, offset, SEEK_SET) != -1) + actlen = read (fd, interp, maxlen); + else + actlen = -1; +#endif + } + } + while (actlen > 0 && memchr (interp, '\0', actlen) == NULL); + + if (actlen > 0) + { + close (fd); + errno = i; + if (dynamic_nobits > 0) + { + sys_error ("%s: bad ELF interpreter", command); + } + else + { + sys_error ("%s: %s: bad ELF interpreter", command, + interp); + } + free (interp); + return (EX_NOEXEC); + } + + free (interp); + } + } +#endif +#if defined (HAVE_HASH_BANG_EXEC) || defined (HAVE_ELF_H) + if (fd >= 0) + close (fd); +#endif + + errno = i; + file_error (command); + } + return (last_command_exit_value); + } + + /* This file is executable. + If it begins with #!, then help out people with losing operating + systems. Otherwise, check to see if it is a binary file by seeing + if the contents of the first line (or up to 80 characters) are in the + ASCII set. If it's a text file, execute the contents as shell commands, + otherwise return 126 (EX_BINARY_FILE). */ + READ_SAMPLE_BUF (command, sample, sample_len); + + if (sample_len == 0) + return (EXECUTION_SUCCESS); + + /* Is this supposed to be an executable script? + If so, the format of the line is "#! interpreter [argument]". + A single argument is allowed. The BSD kernel restricts + the length of the entire line to 32 characters (32 bytes + being the size of the BSD exec header), but we allow 80 + characters. */ + if (sample_len > 0) + { +#if !defined (HAVE_HASH_BANG_EXEC) + if (sample_len > 2 && sample[0] == '#' && sample[1] == '!') + return (execute_shell_script (sample, sample_len, command, args, env)); + else +#endif + if (check_binary_file (sample, sample_len)) + { + internal_error (_("%s: cannot execute binary file: %s"), command, strerror (i)); + errno = i; + return (EX_BINARY_FILE); + } + } + + /* We have committed to attempting to execute the contents of this file + as shell commands. */ + + reset_parser (); + initialize_subshell (); + + set_sigint_handler (); + + /* Insert the name of this shell into the argument list. */ + larray = strvec_len (args) + 1; + args = strvec_resize (args, larray + 1); + + for (i = larray - 1; i; i--) + args[i] = args[i - 1]; + + args[0] = shell_name; + args[1] = command; + args[larray] = (char *)NULL; + + if (args[0][0] == '-') + args[0]++; + +#if defined (RESTRICTED_SHELL) + if (restricted) + change_flag ('r', FLAG_OFF); +#endif + + if (subshell_argv) + { + /* Can't free subshell_argv[0]; that is shell_name. */ + for (i = 1; i < subshell_argc; i++) + free (subshell_argv[i]); + free (subshell_argv); + } + + dispose_command (currently_executing_command); /* XXX */ + currently_executing_command = (COMMAND *)NULL; + + subshell_argc = larray; + subshell_argv = args; + subshell_envp = env; + + unbind_args (); /* remove the positional parameters */ + +#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD) + clear_fifo_list (); /* pipe fds are what they are now */ +#endif + + sh_longjmp (subshell_top_level, 1); + /*NOTREACHED*/ +} + +static int +execute_intern_function (name, funcdef) + WORD_DESC *name; + FUNCTION_DEF *funcdef; +{ + SHELL_VAR *var; + char *t; + + if (check_identifier (name, posixly_correct) == 0) + { + if (posixly_correct && interactive_shell == 0) + { + last_command_exit_value = EX_BADUSAGE; + jump_to_top_level (ERREXIT); + } + return (EXECUTION_FAILURE); + } + + if (strchr (name->word, CTLESC)) /* WHY? */ + { + t = dequote_escapes (name->word); + free (name->word); + name->word = t; + } + + /* Posix interpretation 383 */ + if (posixly_correct && find_special_builtin (name->word)) + { + internal_error (_("`%s': is a special builtin"), name->word); + last_command_exit_value = EX_BADUSAGE; + jump_to_top_level (interactive_shell ? DISCARD : ERREXIT); + } + + var = find_function (name->word); + if (var && (readonly_p (var) || noassign_p (var))) + { + if (readonly_p (var)) + internal_error (_("%s: readonly function"), var->name); + return (EXECUTION_FAILURE); + } + +#if defined (DEBUGGER) + bind_function_def (name->word, funcdef, 1); +#endif + + bind_function (name->word, funcdef->command); + return (EXECUTION_SUCCESS); +} + +#if defined (INCLUDE_UNUSED) +#if defined (PROCESS_SUBSTITUTION) +void +close_all_files () +{ + register int i, fd_table_size; + + fd_table_size = getdtablesize (); + if (fd_table_size > 256) /* clamp to a reasonable value */ + fd_table_size = 256; + + for (i = 3; i < fd_table_size; i++) + close (i); +} +#endif /* PROCESS_SUBSTITUTION */ +#endif + +static void +close_pipes (in, out) + int in, out; +{ + if (in >= 0) + close (in); + if (out >= 0) + close (out); +} + +static void +dup_error (oldd, newd) + int oldd, newd; +{ + sys_error (_("cannot duplicate fd %d to fd %d"), oldd, newd); +} + +/* Redirect input and output to be from and to the specified pipes. + NO_PIPE and REDIRECT_BOTH are handled correctly. */ +static void +do_piping (pipe_in, pipe_out) + int pipe_in, pipe_out; +{ + if (pipe_in != NO_PIPE) + { + if (dup2 (pipe_in, 0) < 0) + dup_error (pipe_in, 0); + if (pipe_in > 0) + close (pipe_in); +#ifdef __CYGWIN__ + /* Let stdio know the fd may have changed from text to binary mode. */ + freopen (NULL, "r", stdin); +#endif /* __CYGWIN__ */ + } + if (pipe_out != NO_PIPE) + { + if (pipe_out != REDIRECT_BOTH) + { + if (dup2 (pipe_out, 1) < 0) + dup_error (pipe_out, 1); + if (pipe_out == 0 || pipe_out > 1) + close (pipe_out); + } + else + { + if (dup2 (1, 2) < 0) + dup_error (1, 2); + } +#ifdef __CYGWIN__ + /* Let stdio know the fd may have changed from text to binary mode, and + make sure to preserve stdout line buffering. */ + freopen (NULL, "w", stdout); + sh_setlinebuf (stdout); +#endif /* __CYGWIN__ */ + } +} diff --git a/bash-5.1/execute_cmd.h b/bash-5.1/execute_cmd.h new file mode 100644 index 0000000000000000000000000000000000000000..9c7fd1cc342d9bbda6c1d0d6927a924e87b92877 --- /dev/null +++ b/bash-5.1/execute_cmd.h @@ -0,0 +1,126 @@ +/* execute_cmd.h - functions from execute_cmd.c. */ + +/* Copyright (C) 1993-2017 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_EXECUTE_CMD_H_) +#define _EXECUTE_CMD_H_ + +#include "stdc.h" +#include "variables.h" +#include "command.h" + + +#if defined (ARRAY_VARS) +struct func_array_state + { + ARRAY *funcname_a; + SHELL_VAR *funcname_v; + ARRAY *source_a; + SHELL_VAR *source_v; + ARRAY *lineno_a; + SHELL_VAR *lineno_v; + }; +#endif + +/* Placeholder for later expansion to include more execution state */ +/* XXX - watch out for pid_t */ +struct execstate + { + pid_t pid; + int subshell_env; + }; + + +/* Variables declared in execute_cmd.c, used by many other files */ +extern int return_catch_flag; +extern int return_catch_value; +extern volatile int last_command_exit_value; +extern int last_command_exit_signal; +extern int builtin_ignoring_errexit; +extern int executing_builtin; +extern int executing_list; +extern int comsub_ignore_return; +extern int subshell_level; +extern int match_ignore_case; +extern int executing_command_builtin; +extern int funcnest, funcnest_max; +extern int evalnest, evalnest_max; +extern int sourcenest, sourcenest_max; +extern int stdin_redir; +extern int line_number_for_err_trap; + +extern char *the_printed_command_except_trap; + +extern char *this_command_name; +extern SHELL_VAR *this_shell_function; + +/* Functions declared in execute_cmd.c, used by many other files */ + +extern struct fd_bitmap *new_fd_bitmap PARAMS((int)); +extern void dispose_fd_bitmap PARAMS((struct fd_bitmap *)); +extern void close_fd_bitmap PARAMS((struct fd_bitmap *)); +extern int executing_line_number PARAMS((void)); +extern int execute_command PARAMS((COMMAND *)); +extern int execute_command_internal PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); +extern int shell_execve PARAMS((char *, char **, char **)); +extern void setup_async_signals PARAMS((void)); +extern void async_redirect_stdin PARAMS((void)); + +extern void undo_partial_redirects PARAMS((void)); +extern void dispose_partial_redirects PARAMS((void)); +extern void dispose_exec_redirects PARAMS((void)); + +extern int execute_shell_function PARAMS((SHELL_VAR *, WORD_LIST *)); + +extern struct coproc *getcoprocbypid PARAMS((pid_t)); +extern struct coproc *getcoprocbyname PARAMS((const char *)); + +extern void coproc_init PARAMS((struct coproc *)); +extern struct coproc *coproc_alloc PARAMS((char *, pid_t)); +extern void coproc_dispose PARAMS((struct coproc *)); +extern void coproc_flush PARAMS((void)); +extern void coproc_close PARAMS((struct coproc *)); +extern void coproc_closeall PARAMS((void)); +extern void coproc_reap PARAMS((void)); +extern pid_t coproc_active PARAMS((void)); + +extern void coproc_rclose PARAMS((struct coproc *, int)); +extern void coproc_wclose PARAMS((struct coproc *, int)); +extern void coproc_fdclose PARAMS((struct coproc *, int)); + +extern void coproc_checkfd PARAMS((struct coproc *, int)); +extern void coproc_fdchk PARAMS((int)); + +extern void coproc_pidchk PARAMS((pid_t, int)); + +extern void coproc_fdsave PARAMS((struct coproc *)); +extern void coproc_fdrestore PARAMS((struct coproc *)); + +extern void coproc_setvars PARAMS((struct coproc *)); +extern void coproc_unsetvars PARAMS((struct coproc *)); + +#if defined (PROCESS_SUBSTITUTION) +extern void close_all_files PARAMS((void)); +#endif + +#if defined (ARRAY_VARS) +extern void restore_funcarray_state PARAMS((struct func_array_state *)); +#endif + +#endif /* _EXECUTE_CMD_H_ */ diff --git a/bash-5.1/expr.c b/bash-5.1/expr.c new file mode 100644 index 0000000000000000000000000000000000000000..bbff95e93121787fbfa785b859c3ab921332b7ae --- /dev/null +++ b/bash-5.1/expr.c @@ -0,0 +1,1671 @@ +/* expr.c -- arithmetic expression evaluation. */ + +/* Copyright (C) 1990-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* + All arithmetic is done as intmax_t integers with no checking for overflow + (though division by 0 is caught and flagged as an error). + + The following operators are handled, grouped into a set of levels in + order of decreasing precedence. + + "id++", "id--" [post-increment and post-decrement] + "-", "+" [(unary operators)] + "++id", "--id" [pre-increment and pre-decrement] + "!", "~" + "**" [(exponentiation)] + "*", "/", "%" + "+", "-" + "<<", ">>" + "<=", ">=", "<", ">" + "==", "!=" + "&" + "^" + "|" + "&&" + "||" + "expr ? expr : expr" + "=", "*=", "/=", "%=", "+=", "-=", "<<=", ">>=", "&=", "^=", "|=" + , [comma] + + (Note that most of these operators have special meaning to bash, and an + entire expression should be quoted, e.g. "a=$a+1" or "a=a+1" to ensure + that it is passed intact to the evaluator when using `let'. When using + the $[] or $(( )) forms, the text between the `[' and `]' or `((' and `))' + is treated as if in double quotes.) + + Sub-expressions within parentheses have a precedence level greater than + all of the above levels and are evaluated first. Within a single prece- + dence group, evaluation is left-to-right, except for the arithmetic + assignment operator (`='), which is evaluated right-to-left (as in C). + + The expression evaluator returns the value of the expression (assignment + statements have as a value what is returned by the RHS). The `let' + builtin, on the other hand, returns 0 if the last expression evaluates to + a non-zero, and 1 otherwise. + + Implementation is a recursive-descent parser. + + Chet Ramey + chet@po.cwru.edu +*/ + +#include "config.h" + +#include +#include "bashansi.h" + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "chartypes.h" +#include "bashintl.h" + +#include "shell.h" +#include "arrayfunc.h" +#include "execute_cmd.h" +#include "flags.h" +#include "subst.h" +#include "typemax.h" /* INTMAX_MAX, INTMAX_MIN */ + +/* Because of the $((...)) construct, expressions may include newlines. + Here is a macro which accepts newlines, tabs and spaces as whitespace. */ +#define cr_whitespace(c) (whitespace(c) || ((c) == '\n')) + +/* Size be which the expression stack grows when necessary. */ +#define EXPR_STACK_GROW_SIZE 10 + +/* Maximum amount of recursion allowed. This prevents a non-integer + variable such as "num=num+2" from infinitely adding to itself when + "let num=num+2" is given. */ +#define MAX_EXPR_RECURSION_LEVEL 1024 + +/* The Tokens. Singing "The Lion Sleeps Tonight". */ + +#define EQEQ 1 /* "==" */ +#define NEQ 2 /* "!=" */ +#define LEQ 3 /* "<=" */ +#define GEQ 4 /* ">=" */ +#define STR 5 /* string */ +#define NUM 6 /* number */ +#define LAND 7 /* "&&" Logical AND */ +#define LOR 8 /* "||" Logical OR */ +#define LSH 9 /* "<<" Left SHift */ +#define RSH 10 /* ">>" Right SHift */ +#define OP_ASSIGN 11 /* op= expassign as in Posix.2 */ +#define COND 12 /* exp1 ? exp2 : exp3 */ +#define POWER 13 /* exp1**exp2 */ +#define PREINC 14 /* ++var */ +#define PREDEC 15 /* --var */ +#define POSTINC 16 /* var++ */ +#define POSTDEC 17 /* var-- */ +#define EQ '=' +#define GT '>' +#define LT '<' +#define PLUS '+' +#define MINUS '-' +#define MUL '*' +#define DIV '/' +#define MOD '%' +#define NOT '!' +#define LPAR '(' +#define RPAR ')' +#define BAND '&' /* Bitwise AND */ +#define BOR '|' /* Bitwise OR. */ +#define BXOR '^' /* Bitwise eXclusive OR. */ +#define BNOT '~' /* Bitwise NOT; Two's complement. */ +#define QUES '?' +#define COL ':' +#define COMMA ',' + +/* This should be the function corresponding to the operator with the + highest precedence. */ +#define EXP_HIGHEST expcomma + +#ifndef MAX_INT_LEN +# define MAX_INT_LEN 32 +#endif + +struct lvalue +{ + char *tokstr; /* possibly-rewritten lvalue if not NULL */ + intmax_t tokval; /* expression evaluated value */ + SHELL_VAR *tokvar; /* variable described by array or var reference */ + intmax_t ind; /* array index if not -1 */ +}; + +/* A structure defining a single expression context. */ +typedef struct { + int curtok, lasttok; + char *expression, *tp, *lasttp; + intmax_t tokval; + char *tokstr; + int noeval; + struct lvalue lval; +} EXPR_CONTEXT; + +static char *expression; /* The current expression */ +static char *tp; /* token lexical position */ +static char *lasttp; /* pointer to last token position */ +static int curtok; /* the current token */ +static int lasttok; /* the previous token */ +static int assigntok; /* the OP in OP= */ +static char *tokstr; /* current token string */ +static intmax_t tokval; /* current token value */ +static int noeval; /* set to 1 if no assignment to be done */ +static procenv_t evalbuf; + +/* set to 1 if the expression has already been run through word expansion */ +static int already_expanded; + +static struct lvalue curlval = {0, 0, 0, -1}; +static struct lvalue lastlval = {0, 0, 0, -1}; + +static int _is_arithop PARAMS((int)); +static void readtok PARAMS((void)); /* lexical analyzer */ + +static void init_lvalue PARAMS((struct lvalue *)); +static struct lvalue *alloc_lvalue PARAMS((void)); +static void free_lvalue PARAMS((struct lvalue *)); + +static intmax_t expr_streval PARAMS((char *, int, struct lvalue *)); +static intmax_t strlong PARAMS((char *)); +static void evalerror PARAMS((const char *)); + +static void pushexp PARAMS((void)); +static void popexp PARAMS((void)); +static void expr_unwind PARAMS((void)); +static void expr_bind_variable PARAMS((char *, char *)); +#if defined (ARRAY_VARS) +static void expr_bind_array_element PARAMS((char *, arrayind_t, char *)); +#endif + +static intmax_t subexpr PARAMS((char *)); + +static intmax_t expcomma PARAMS((void)); +static intmax_t expassign PARAMS((void)); +static intmax_t expcond PARAMS((void)); +static intmax_t explor PARAMS((void)); +static intmax_t expland PARAMS((void)); +static intmax_t expbor PARAMS((void)); +static intmax_t expbxor PARAMS((void)); +static intmax_t expband PARAMS((void)); +static intmax_t exp5 PARAMS((void)); +static intmax_t exp4 PARAMS((void)); +static intmax_t expshift PARAMS((void)); +static intmax_t exp3 PARAMS((void)); +static intmax_t expmuldiv PARAMS((void)); +static intmax_t exppower PARAMS((void)); +static intmax_t exp1 PARAMS((void)); +static intmax_t exp0 PARAMS((void)); + +/* Global var which contains the stack of expression contexts. */ +static EXPR_CONTEXT **expr_stack; +static int expr_depth; /* Location in the stack. */ +static int expr_stack_size; /* Number of slots already allocated. */ + +#if defined (ARRAY_VARS) +extern const char * const bash_badsub_errmsg; +#endif + +#define SAVETOK(X) \ + do { \ + (X)->curtok = curtok; \ + (X)->lasttok = lasttok; \ + (X)->tp = tp; \ + (X)->lasttp = lasttp; \ + (X)->tokval = tokval; \ + (X)->tokstr = tokstr; \ + (X)->noeval = noeval; \ + (X)->lval = curlval; \ + } while (0) + +#define RESTORETOK(X) \ + do { \ + curtok = (X)->curtok; \ + lasttok = (X)->lasttok; \ + tp = (X)->tp; \ + lasttp = (X)->lasttp; \ + tokval = (X)->tokval; \ + tokstr = (X)->tokstr; \ + noeval = (X)->noeval; \ + curlval = (X)->lval; \ + } while (0) + +/* Push and save away the contents of the globals describing the + current expression context. */ +static void +pushexp () +{ + EXPR_CONTEXT *context; + + if (expr_depth >= MAX_EXPR_RECURSION_LEVEL) + evalerror (_("expression recursion level exceeded")); + + if (expr_depth >= expr_stack_size) + { + expr_stack_size += EXPR_STACK_GROW_SIZE; + expr_stack = (EXPR_CONTEXT **)xrealloc (expr_stack, expr_stack_size * sizeof (EXPR_CONTEXT *)); + } + + context = (EXPR_CONTEXT *)xmalloc (sizeof (EXPR_CONTEXT)); + + context->expression = expression; + SAVETOK(context); + + expr_stack[expr_depth++] = context; +} + +/* Pop the the contents of the expression context stack into the + globals describing the current expression context. */ +static void +popexp () +{ + EXPR_CONTEXT *context; + + if (expr_depth <= 0) + { + /* See the comment at the top of evalexp() for an explanation of why + this is done. */ + expression = lasttp = 0; + evalerror (_("recursion stack underflow")); + } + + context = expr_stack[--expr_depth]; + + expression = context->expression; + RESTORETOK (context); + + free (context); +} + +static void +expr_unwind () +{ + while (--expr_depth > 0) + { + if (expr_stack[expr_depth]->tokstr) + free (expr_stack[expr_depth]->tokstr); + + if (expr_stack[expr_depth]->expression) + free (expr_stack[expr_depth]->expression); + + free (expr_stack[expr_depth]); + } + if (expr_depth == 0) + free (expr_stack[expr_depth]); /* free the allocated EXPR_CONTEXT */ + + noeval = 0; /* XXX */ +} + +static void +expr_bind_variable (lhs, rhs) + char *lhs, *rhs; +{ + SHELL_VAR *v; + int aflags; + + if (lhs == 0 || *lhs == 0) + return; /* XXX */ + +#if defined (ARRAY_VARS) + aflags = (assoc_expand_once && already_expanded) ? ASS_NOEXPAND : 0; +#else + aflags = 0; +#endif + v = bind_int_variable (lhs, rhs, aflags); + if (v && (readonly_p (v) || noassign_p (v))) + sh_longjmp (evalbuf, 1); /* variable assignment error */ + stupidly_hack_special_variables (lhs); +} + +#if defined (ARRAY_VARS) +/* This is similar to the logic in arrayfunc.c:valid_array_subscript when + you pass VA_NOEXPAND. */ +static int +expr_skipsubscript (vp, cp) + char *vp, *cp; +{ + int flags, isassoc; + SHELL_VAR *entry; + + isassoc = 0; + entry = 0; + if (assoc_expand_once & already_expanded) + { + *cp = '\0'; + isassoc = legal_identifier (vp) && (entry = find_variable (vp)) && assoc_p (entry); + *cp = '['; /* ] */ + } + flags = (isassoc && assoc_expand_once && already_expanded) ? VA_NOEXPAND : 0; + return (skipsubscript (cp, 0, flags)); +} + +/* Rewrite tok, which is of the form vname[expression], to vname[ind], where + IND is the already-calculated value of expression. */ +static void +expr_bind_array_element (tok, ind, rhs) + char *tok; + arrayind_t ind; + char *rhs; +{ + char *lhs, *vname; + size_t llen; + char ibuf[INT_STRLEN_BOUND (arrayind_t) + 1], *istr; + + istr = fmtumax (ind, 10, ibuf, sizeof (ibuf), 0); + vname = array_variable_name (tok, 0, (char **)NULL, (int *)NULL); + + llen = strlen (vname) + sizeof (ibuf) + 3; + lhs = xmalloc (llen); + + sprintf (lhs, "%s[%s]", vname, istr); /* XXX */ + +/*itrace("expr_bind_array_element: %s=%s", lhs, rhs);*/ + expr_bind_variable (lhs, rhs); + free (vname); + free (lhs); +} +#endif /* ARRAY_VARS */ + +/* Evaluate EXPR, and return the arithmetic result. If VALIDP is + non-null, a zero is stored into the location to which it points + if the expression is invalid, non-zero otherwise. If a non-zero + value is returned in *VALIDP, the return value of evalexp() may + be used. + + The `while' loop after the longjmp is caught relies on the above + implementation of pushexp and popexp leaving in expr_stack[0] the + values that the variables had when the program started. That is, + the first things saved are the initial values of the variables that + were assigned at program startup or by the compiler. Therefore, it is + safe to let the loop terminate when expr_depth == 0, without freeing up + any of the expr_depth[0] stuff. */ +intmax_t +evalexp (expr, flags, validp) + char *expr; + int flags; + int *validp; +{ + intmax_t val; + int c; + procenv_t oevalbuf; + + val = 0; + noeval = 0; + already_expanded = (flags&EXP_EXPANDED); + + FASTCOPY (evalbuf, oevalbuf, sizeof (evalbuf)); + + c = setjmp_nosigs (evalbuf); + + if (c) + { + FREE (tokstr); + FREE (expression); + tokstr = expression = (char *)NULL; + + expr_unwind (); + expr_depth = 0; /* XXX - make sure */ + + /* We copy in case we've called evalexp recursively */ + FASTCOPY (oevalbuf, evalbuf, sizeof (evalbuf)); + + if (validp) + *validp = 0; + return (0); + } + + val = subexpr (expr); + + if (validp) + *validp = 1; + + FASTCOPY (oevalbuf, evalbuf, sizeof (evalbuf)); + + return (val); +} + +static intmax_t +subexpr (expr) + char *expr; +{ + intmax_t val; + char *p; + + for (p = expr; p && *p && cr_whitespace (*p); p++) + ; + + if (p == NULL || *p == '\0') + return (0); + + pushexp (); + expression = savestring (expr); + tp = expression; + + curtok = lasttok = 0; + tokstr = (char *)NULL; + tokval = 0; + init_lvalue (&curlval); + lastlval = curlval; + + readtok (); + + val = EXP_HIGHEST (); + + if (curtok != 0) + evalerror (_("syntax error in expression")); + + FREE (tokstr); + FREE (expression); + + popexp (); + + return val; +} + +static intmax_t +expcomma () +{ + register intmax_t value; + + value = expassign (); + while (curtok == COMMA) + { + readtok (); + value = expassign (); + } + + return value; +} + +static intmax_t +expassign () +{ + register intmax_t value; + char *lhs, *rhs; + arrayind_t lind; +#if defined (HAVE_IMAXDIV) + imaxdiv_t idiv; +#endif + + value = expcond (); + if (curtok == EQ || curtok == OP_ASSIGN) + { + int special, op; + intmax_t lvalue; + + special = curtok == OP_ASSIGN; + + if (lasttok != STR) + evalerror (_("attempted assignment to non-variable")); + + if (special) + { + op = assigntok; /* a OP= b */ + lvalue = value; + } + + if (tokstr == 0) + evalerror (_("syntax error in variable assignment")); + + /* XXX - watch out for pointer aliasing issues here */ + lhs = savestring (tokstr); + /* save ind in case rhs is string var and evaluation overwrites it */ + lind = curlval.ind; + readtok (); + value = expassign (); + + if (special) + { + if ((op == DIV || op == MOD) && value == 0) + { + if (noeval == 0) + evalerror (_("division by 0")); + else + value = 1; + } + + switch (op) + { + case MUL: + /* Handle INTMAX_MIN and INTMAX_MAX * -1 specially here? */ + lvalue *= value; + break; + case DIV: + case MOD: + if (lvalue == INTMAX_MIN && value == -1) + lvalue = (op == DIV) ? INTMAX_MIN : 0; + else +#if HAVE_IMAXDIV + { + idiv = imaxdiv (lvalue, value); + lvalue = (op == DIV) ? idiv.quot : idiv.rem; + } +#else + lvalue = (op == DIV) ? lvalue / value : lvalue % value; +#endif + break; + case PLUS: + lvalue += value; + break; + case MINUS: + lvalue -= value; + break; + case LSH: + lvalue <<= value; + break; + case RSH: + lvalue >>= value; + break; + case BAND: + lvalue &= value; + break; + case BOR: + lvalue |= value; + break; + case BXOR: + lvalue ^= value; + break; + default: + free (lhs); + evalerror (_("bug: bad expassign token")); + break; + } + value = lvalue; + } + + rhs = itos (value); + if (noeval == 0) + { +#if defined (ARRAY_VARS) + if (lind != -1) + expr_bind_array_element (lhs, lind, rhs); + else +#endif + expr_bind_variable (lhs, rhs); + } + if (curlval.tokstr && curlval.tokstr == tokstr) + init_lvalue (&curlval); + + free (rhs); + free (lhs); + FREE (tokstr); + tokstr = (char *)NULL; /* For freeing on errors. */ + } + + return (value); +} + +/* Conditional expression (expr?expr:expr) */ +static intmax_t +expcond () +{ + intmax_t cval, val1, val2, rval; + int set_noeval; + + set_noeval = 0; + rval = cval = explor (); + if (curtok == QUES) /* found conditional expr */ + { + if (cval == 0) + { + set_noeval = 1; + noeval++; + } + + readtok (); + if (curtok == 0 || curtok == COL) + evalerror (_("expression expected")); + + val1 = EXP_HIGHEST (); + + if (set_noeval) + noeval--; + if (curtok != COL) + evalerror (_("`:' expected for conditional expression")); + + set_noeval = 0; + if (cval) + { + set_noeval = 1; + noeval++; + } + + readtok (); + if (curtok == 0) + evalerror (_("expression expected")); + val2 = expcond (); + + if (set_noeval) + noeval--; + rval = cval ? val1 : val2; + lasttok = COND; + } + return rval; +} + +/* Logical OR. */ +static intmax_t +explor () +{ + register intmax_t val1, val2; + int set_noeval; + + val1 = expland (); + + while (curtok == LOR) + { + set_noeval = 0; + if (val1 != 0) + { + noeval++; + set_noeval = 1; + } + readtok (); + val2 = expland (); + if (set_noeval) + noeval--; + val1 = val1 || val2; + lasttok = LOR; + } + + return (val1); +} + +/* Logical AND. */ +static intmax_t +expland () +{ + register intmax_t val1, val2; + int set_noeval; + + val1 = expbor (); + + while (curtok == LAND) + { + set_noeval = 0; + if (val1 == 0) + { + set_noeval = 1; + noeval++; + } + readtok (); + val2 = expbor (); + if (set_noeval) + noeval--; + val1 = val1 && val2; + lasttok = LAND; + } + + return (val1); +} + +/* Bitwise OR. */ +static intmax_t +expbor () +{ + register intmax_t val1, val2; + + val1 = expbxor (); + + while (curtok == BOR) + { + readtok (); + val2 = expbxor (); + val1 = val1 | val2; + lasttok = NUM; + } + + return (val1); +} + +/* Bitwise XOR. */ +static intmax_t +expbxor () +{ + register intmax_t val1, val2; + + val1 = expband (); + + while (curtok == BXOR) + { + readtok (); + val2 = expband (); + val1 = val1 ^ val2; + lasttok = NUM; + } + + return (val1); +} + +/* Bitwise AND. */ +static intmax_t +expband () +{ + register intmax_t val1, val2; + + val1 = exp5 (); + + while (curtok == BAND) + { + readtok (); + val2 = exp5 (); + val1 = val1 & val2; + lasttok = NUM; + } + + return (val1); +} + +static intmax_t +exp5 () +{ + register intmax_t val1, val2; + + val1 = exp4 (); + + while ((curtok == EQEQ) || (curtok == NEQ)) + { + int op = curtok; + + readtok (); + val2 = exp4 (); + if (op == EQEQ) + val1 = (val1 == val2); + else if (op == NEQ) + val1 = (val1 != val2); + lasttok = NUM; + } + return (val1); +} + +static intmax_t +exp4 () +{ + register intmax_t val1, val2; + + val1 = expshift (); + while ((curtok == LEQ) || + (curtok == GEQ) || + (curtok == LT) || + (curtok == GT)) + { + int op = curtok; + + readtok (); + val2 = expshift (); + + if (op == LEQ) + val1 = val1 <= val2; + else if (op == GEQ) + val1 = val1 >= val2; + else if (op == LT) + val1 = val1 < val2; + else /* (op == GT) */ + val1 = val1 > val2; + lasttok = NUM; + } + return (val1); +} + +/* Left and right shifts. */ +static intmax_t +expshift () +{ + register intmax_t val1, val2; + + val1 = exp3 (); + + while ((curtok == LSH) || (curtok == RSH)) + { + int op = curtok; + + readtok (); + val2 = exp3 (); + + if (op == LSH) + val1 = val1 << val2; + else + val1 = val1 >> val2; + lasttok = NUM; + } + + return (val1); +} + +static intmax_t +exp3 () +{ + register intmax_t val1, val2; + + val1 = expmuldiv (); + + while ((curtok == PLUS) || (curtok == MINUS)) + { + int op = curtok; + + readtok (); + val2 = expmuldiv (); + + if (op == PLUS) + val1 += val2; + else if (op == MINUS) + val1 -= val2; + lasttok = NUM; + } + return (val1); +} + +static intmax_t +expmuldiv () +{ + register intmax_t val1, val2; +#if defined (HAVE_IMAXDIV) + imaxdiv_t idiv; +#endif + + val1 = exppower (); + + while ((curtok == MUL) || + (curtok == DIV) || + (curtok == MOD)) + { + int op = curtok; + char *stp, *sltp; + + stp = tp; + readtok (); + + val2 = exppower (); + + /* Handle division by 0 and twos-complement arithmetic overflow */ + if (((op == DIV) || (op == MOD)) && (val2 == 0)) + { + if (noeval == 0) + { + sltp = lasttp; + lasttp = stp; + while (lasttp && *lasttp && whitespace (*lasttp)) + lasttp++; + evalerror (_("division by 0")); + lasttp = sltp; + } + else + val2 = 1; + } + else if (op == MOD && val1 == INTMAX_MIN && val2 == -1) + { + val1 = 0; + continue; + } + else if (op == DIV && val1 == INTMAX_MIN && val2 == -1) + val2 = 1; + + if (op == MUL) + val1 *= val2; + else if (op == DIV || op == MOD) +#if defined (HAVE_IMAXDIV) + { + idiv = imaxdiv (val1, val2); + val1 = (op == DIV) ? idiv.quot : idiv.rem; + } +#else + val1 = (op == DIV) ? val1 / val2 : val1 % val2; +#endif + lasttok = NUM; + } + return (val1); +} + +static intmax_t +ipow (base, exp) + intmax_t base, exp; +{ + intmax_t result; + + result = 1; + while (exp) + { + if (exp & 1) + result *= base; + exp >>= 1; + base *= base; + } + return result; +} + +static intmax_t +exppower () +{ + register intmax_t val1, val2, c; + + val1 = exp1 (); + while (curtok == POWER) + { + readtok (); + val2 = exppower (); /* exponentiation is right-associative */ + lasttok = NUM; + if (val2 == 0) + return (1); + if (val2 < 0) + evalerror (_("exponent less than 0")); + val1 = ipow (val1, val2); + } + return (val1); +} + +static intmax_t +exp1 () +{ + register intmax_t val; + + if (curtok == NOT) + { + readtok (); + val = !exp1 (); + lasttok = NUM; + } + else if (curtok == BNOT) + { + readtok (); + val = ~exp1 (); + lasttok = NUM; + } + else if (curtok == MINUS) + { + readtok (); + val = - exp1 (); + lasttok = NUM; + } + else if (curtok == PLUS) + { + readtok (); + val = exp1 (); + lasttok = NUM; + } + else + val = exp0 (); + + return (val); +} + +static intmax_t +exp0 () +{ + register intmax_t val = 0, v2; + char *vincdec; + int stok; + EXPR_CONTEXT ec; + + /* XXX - might need additional logic here to decide whether or not + pre-increment or pre-decrement is legal at this point. */ + if (curtok == PREINC || curtok == PREDEC) + { + stok = lasttok = curtok; + readtok (); + if (curtok != STR) + /* readtok() catches this */ + evalerror (_("identifier expected after pre-increment or pre-decrement")); + + v2 = tokval + ((stok == PREINC) ? 1 : -1); + vincdec = itos (v2); + if (noeval == 0) + { +#if defined (ARRAY_VARS) + if (curlval.ind != -1) + expr_bind_array_element (curlval.tokstr, curlval.ind, vincdec); + else +#endif + if (tokstr) + expr_bind_variable (tokstr, vincdec); + } + free (vincdec); + val = v2; + + curtok = NUM; /* make sure --x=7 is flagged as an error */ + readtok (); + } + else if (curtok == LPAR) + { + /* XXX - save curlval here? Or entire expression context? */ + readtok (); + val = EXP_HIGHEST (); + + if (curtok != RPAR) /* ( */ + evalerror (_("missing `)'")); + + /* Skip over closing paren. */ + readtok (); + } + else if ((curtok == NUM) || (curtok == STR)) + { + val = tokval; + if (curtok == STR) + { + SAVETOK (&ec); + tokstr = (char *)NULL; /* keep it from being freed */ + noeval = 1; + readtok (); + stok = curtok; + + /* post-increment or post-decrement */ + if (stok == POSTINC || stok == POSTDEC) + { + /* restore certain portions of EC */ + tokstr = ec.tokstr; + noeval = ec.noeval; + curlval = ec.lval; + lasttok = STR; /* ec.curtok */ + + v2 = val + ((stok == POSTINC) ? 1 : -1); + vincdec = itos (v2); + if (noeval == 0) + { +#if defined (ARRAY_VARS) + if (curlval.ind != -1) + expr_bind_array_element (curlval.tokstr, curlval.ind, vincdec); + else +#endif + expr_bind_variable (tokstr, vincdec); + } + free (vincdec); + curtok = NUM; /* make sure x++=7 is flagged as an error */ + } + else + { + /* XXX - watch out for pointer aliasing issues here */ + if (stok == STR) /* free new tokstr before old one is restored */ + FREE (tokstr); + RESTORETOK (&ec); + } + } + + readtok (); + } + else + evalerror (_("syntax error: operand expected")); + + return (val); +} + +static void +init_lvalue (lv) + struct lvalue *lv; +{ + lv->tokstr = 0; + lv->tokvar = 0; + lv->tokval = lv->ind = -1; +} + +static struct lvalue * +alloc_lvalue () +{ + struct lvalue *lv; + + lv = xmalloc (sizeof (struct lvalue)); + init_lvalue (lv); + return (lv); +} + +static void +free_lvalue (lv) + struct lvalue *lv; +{ + free (lv); /* should be inlined */ +} + +static intmax_t +expr_streval (tok, e, lvalue) + char *tok; + int e; + struct lvalue *lvalue; +{ + SHELL_VAR *v; + char *value; + intmax_t tval; + int initial_depth; +#if defined (ARRAY_VARS) + arrayind_t ind; + int tflag, aflag; +#endif + +/*itrace("expr_streval: %s: noeval = %d expanded=%d", tok, noeval, already_expanded);*/ + /* If we are suppressing evaluation, just short-circuit here instead of + going through the rest of the evaluator. */ + if (noeval) + return (0); + + initial_depth = expr_depth; + +#if defined (ARRAY_VARS) + tflag = assoc_expand_once && already_expanded; /* for a start */ +#endif + + /* [[[[[ */ +#if defined (ARRAY_VARS) + aflag = (tflag) ? AV_NOEXPAND : 0; + v = (e == ']') ? array_variable_part (tok, tflag, (char **)0, (int *)0) : find_variable (tok); +#else + v = find_variable (tok); +#endif + if (v == 0 && e != ']') + v = find_variable_last_nameref (tok, 0); + + if ((v == 0 || invisible_p (v)) && unbound_vars_is_error) + { +#if defined (ARRAY_VARS) + value = (e == ']') ? array_variable_name (tok, tflag, (char **)0, (int *)0) : tok; +#else + value = tok; +#endif + + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (value); + +#if defined (ARRAY_VARS) + if (e == ']') + FREE (value); /* array_variable_name returns new memory */ +#endif + + if (no_longjmp_on_fatal_error && interactive_shell) + sh_longjmp (evalbuf, 1); + + if (interactive_shell) + { + expr_unwind (); + top_level_cleanup (); + jump_to_top_level (DISCARD); + } + else + jump_to_top_level (FORCE_EOF); + } + +#if defined (ARRAY_VARS) + ind = -1; + /* If the second argument to get_array_value doesn't include AV_ALLOWALL, + we don't allow references like array[@]. In this case, get_array_value + is just like get_variable_value in that it does not return newly-allocated + memory or quote the results. AFLAG is set above and is either AV_NOEXPAND + or 0. */ + value = (e == ']') ? get_array_value (tok, aflag, (int *)NULL, &ind) : get_variable_value (v); +#else + value = get_variable_value (v); +#endif + + if (expr_depth < initial_depth) + { + if (no_longjmp_on_fatal_error && interactive_shell) + sh_longjmp (evalbuf, 1); + return (0); + } + + tval = (value && *value) ? subexpr (value) : 0; + + if (lvalue) + { + lvalue->tokstr = tok; /* XXX */ + lvalue->tokval = tval; + lvalue->tokvar = v; /* XXX */ +#if defined (ARRAY_VARS) + lvalue->ind = ind; +#else + lvalue->ind = -1; +#endif + } + + return (tval); +} + +static int +_is_multiop (c) + int c; +{ + switch (c) + { + case EQEQ: + case NEQ: + case LEQ: + case GEQ: + case LAND: + case LOR: + case LSH: + case RSH: + case OP_ASSIGN: + case COND: + case POWER: + case PREINC: + case PREDEC: + case POSTINC: + case POSTDEC: + return 1; + default: + return 0; + } +} + +static int +_is_arithop (c) + int c; +{ + switch (c) + { + case EQ: + case GT: + case LT: + case PLUS: + case MINUS: + case MUL: + case DIV: + case MOD: + case NOT: + case LPAR: + case RPAR: + case BAND: + case BOR: + case BXOR: + case BNOT: + return 1; /* operator tokens */ + case QUES: + case COL: + case COMMA: + return 1; /* questionable */ + default: + return 0; /* anything else is invalid */ + } +} + +/* Lexical analyzer/token reader for the expression evaluator. Reads the + next token and puts its value into curtok, while advancing past it. + Updates value of tp. May also set tokval (for number) or tokstr (for + string). */ +static void +readtok () +{ + register char *cp, *xp; + register unsigned char c, c1; + register int e; + struct lvalue lval; + + /* Skip leading whitespace. */ + cp = tp; + c = e = 0; + while (cp && (c = *cp) && (cr_whitespace (c))) + cp++; + + if (c) + cp++; + + if (c == '\0') + { + lasttok = curtok; + curtok = 0; + tp = cp; + return; + } + lasttp = tp = cp - 1; + + if (legal_variable_starter (c)) + { + /* variable names not preceded with a dollar sign are shell variables. */ + char *savecp; + EXPR_CONTEXT ec; + int peektok; + + while (legal_variable_char (c)) + c = *cp++; + + c = *--cp; + +#if defined (ARRAY_VARS) + if (c == '[') + { + e = expr_skipsubscript (tp, cp); /* XXX - was skipsubscript */ + if (cp[e] == ']') + { + cp += e + 1; + c = *cp; + e = ']'; + } + else + evalerror (bash_badsub_errmsg); + } +#endif /* ARRAY_VARS */ + + *cp = '\0'; + /* XXX - watch out for pointer aliasing issues here */ + if (curlval.tokstr && curlval.tokstr == tokstr) + init_lvalue (&curlval); + + FREE (tokstr); + tokstr = savestring (tp); + *cp = c; + + /* XXX - make peektok part of saved token state? */ + SAVETOK (&ec); + tokstr = (char *)NULL; /* keep it from being freed */ + tp = savecp = cp; + noeval = 1; + curtok = STR; + readtok (); + peektok = curtok; + if (peektok == STR) /* free new tokstr before old one is restored */ + FREE (tokstr); + RESTORETOK (&ec); + cp = savecp; + + /* The tests for PREINC and PREDEC aren't strictly correct, but they + preserve old behavior if a construct like --x=9 is given. */ + if (lasttok == PREINC || lasttok == PREDEC || peektok != EQ) + { + lastlval = curlval; + tokval = expr_streval (tokstr, e, &curlval); + } + else + tokval = 0; + + lasttok = curtok; + curtok = STR; + } + else if (DIGIT(c)) + { + while (ISALNUM (c) || c == '#' || c == '@' || c == '_') + c = *cp++; + + c = *--cp; + *cp = '\0'; + + tokval = strlong (tp); + *cp = c; + lasttok = curtok; + curtok = NUM; + } + else + { + c1 = *cp++; + if ((c == EQ) && (c1 == EQ)) + c = EQEQ; + else if ((c == NOT) && (c1 == EQ)) + c = NEQ; + else if ((c == GT) && (c1 == EQ)) + c = GEQ; + else if ((c == LT) && (c1 == EQ)) + c = LEQ; + else if ((c == LT) && (c1 == LT)) + { + if (*cp == '=') /* a <<= b */ + { + assigntok = LSH; + c = OP_ASSIGN; + cp++; + } + else + c = LSH; + } + else if ((c == GT) && (c1 == GT)) + { + if (*cp == '=') + { + assigntok = RSH; /* a >>= b */ + c = OP_ASSIGN; + cp++; + } + else + c = RSH; + } + else if ((c == BAND) && (c1 == BAND)) + c = LAND; + else if ((c == BOR) && (c1 == BOR)) + c = LOR; + else if ((c == '*') && (c1 == '*')) + c = POWER; + else if ((c == '-' || c == '+') && c1 == c && curtok == STR) + c = (c == '-') ? POSTDEC : POSTINC; + else if ((c == '-' || c == '+') && c1 == c && curtok == NUM && (lasttok == PREINC || lasttok == PREDEC)) + { + /* This catches something like --FOO++ */ + if (c == '-') + evalerror ("--: assignment requires lvalue"); + else + evalerror ("++: assignment requires lvalue"); + } + else if ((c == '-' || c == '+') && c1 == c) + { + /* Quickly scan forward to see if this is followed by optional + whitespace and an identifier. */ + xp = cp; + while (xp && *xp && cr_whitespace (*xp)) + xp++; + if (legal_variable_starter ((unsigned char)*xp)) + c = (c == '-') ? PREDEC : PREINC; + else + /* Could force parsing as preinc or predec and throw an error */ +#if 0 + { + /* Posix says unary plus and minus have higher priority than + preinc and predec. */ + /* This catches something like --4++ */ + if (c == '-') + evalerror ("--: assignment requires lvalue"); + else + evalerror ("++: assignment requires lvalue"); + } +#else + cp--; /* not preinc or predec, so unget the character */ +#endif + } + else if (c1 == EQ && member (c, "*/%+-&^|")) + { + assigntok = c; /* a OP= b */ + c = OP_ASSIGN; + } + else if (_is_arithop (c) == 0) + { + cp--; + /* use curtok, since it hasn't been copied to lasttok yet */ + if (curtok == 0 || _is_arithop (curtok) || _is_multiop (curtok)) + evalerror (_("syntax error: operand expected")); + else + evalerror (_("syntax error: invalid arithmetic operator")); + } + else + cp--; /* `unget' the character */ + + /* Should check here to make sure that the current character is one + of the recognized operators and flag an error if not. Could create + a character map the first time through and check it on subsequent + calls. */ + lasttok = curtok; + curtok = c; + } + tp = cp; +} + +static void +evalerror (msg) + const char *msg; +{ + char *name, *t; + + name = this_command_name; + for (t = expression; t && whitespace (*t); t++) + ; + internal_error (_("%s%s%s: %s (error token is \"%s\")"), + name ? name : "", name ? ": " : "", + t ? t : "", msg, (lasttp && *lasttp) ? lasttp : ""); + sh_longjmp (evalbuf, 1); +} + +/* Convert a string to an intmax_t integer, with an arbitrary base. + 0nnn -> base 8 + 0[Xx]nn -> base 16 + Anything else: [base#]number (this is implemented to match ksh93) + + Base may be >=2 and <=64. If base is <= 36, the numbers are drawn + from [0-9][a-zA-Z], and lowercase and uppercase letters may be used + interchangeably. If base is > 36 and <= 64, the numbers are drawn + from [0-9][a-z][A-Z]_@ (a = 10, z = 35, A = 36, Z = 61, @ = 62, _ = 63 -- + you get the picture). */ + +#define VALID_NUMCHAR(c) (ISALNUM(c) || ((c) == '_') || ((c) == '@')) + +static intmax_t +strlong (num) + char *num; +{ + register char *s; + register unsigned char c; + int base, foundbase; + intmax_t val; + + s = num; + + base = 10; + foundbase = 0; + if (*s == '0') + { + s++; + + if (*s == '\0') + return 0; + + /* Base 16? */ + if (*s == 'x' || *s == 'X') + { + base = 16; + s++; + } + else + base = 8; + foundbase++; + } + + val = 0; + for (c = *s++; c; c = *s++) + { + if (c == '#') + { + if (foundbase) + evalerror (_("invalid number")); + + /* Illegal base specifications raise an evaluation error. */ + if (val < 2 || val > 64) + evalerror (_("invalid arithmetic base")); + + base = val; + val = 0; + foundbase++; + + /* Make sure a base# is followed by a character that can compose a + valid integer constant. Jeremy Townshend */ + if (VALID_NUMCHAR (*s) == 0) + evalerror (_("invalid integer constant")); + } + else if (VALID_NUMCHAR (c)) + { + if (DIGIT(c)) + c = TODIGIT(c); + else if (c >= 'a' && c <= 'z') + c -= 'a' - 10; + else if (c >= 'A' && c <= 'Z') + c -= 'A' - ((base <= 36) ? 10 : 36); + else if (c == '@') + c = 62; + else if (c == '_') + c = 63; + + if (c >= base) + evalerror (_("value too great for base")); + + val = (val * base) + c; + } + else + break; + } + + return (val); +} + +#if defined (EXPR_TEST) +void * +xmalloc (n) + int n; +{ + return (malloc (n)); +} + +void * +xrealloc (s, n) + char *s; + int n; +{ + return (realloc (s, n)); +} + +SHELL_VAR *find_variable () { return 0;} +SHELL_VAR *bind_variable () { return 0; } + +char *get_string_value () { return 0; } + +procenv_t top_level; + +main (argc, argv) + int argc; + char **argv; +{ + register int i; + intmax_t v; + int expok; + + if (setjmp (top_level)) + exit (0); + + for (i = 1; i < argc; i++) + { + v = evalexp (argv[i], 0, &expok); + if (expok == 0) + fprintf (stderr, _("%s: expression error\n"), argv[i]); + else + printf ("'%s' -> %ld\n", argv[i], v); + } + exit (0); +} + +int +builtin_error (format, arg1, arg2, arg3, arg4, arg5) + char *format; +{ + fprintf (stderr, "expr: "); + fprintf (stderr, format, arg1, arg2, arg3, arg4, arg5); + fprintf (stderr, "\n"); + return 0; +} + +char * +itos (n) + intmax_t n; +{ + return ("42"); +} + +#endif /* EXPR_TEST */ diff --git a/bash-5.1/externs.h b/bash-5.1/externs.h new file mode 100644 index 0000000000000000000000000000000000000000..3d7716c6d1f58d979ac6361b8628b1b71683116a --- /dev/null +++ b/bash-5.1/externs.h @@ -0,0 +1,548 @@ +/* externs.h -- extern function declarations which do not appear in their + own header file. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Make sure that this is included *after* config.h! */ + +#if !defined (_EXTERNS_H_) +# define _EXTERNS_H_ + +#include "stdc.h" + +/* Functions from expr.c. */ +#define EXP_EXPANDED 0x01 + +extern intmax_t evalexp PARAMS((char *, int, int *)); + +/* Functions from print_cmd.c. */ +#define FUNC_MULTILINE 0x01 +#define FUNC_EXTERNAL 0x02 + +extern char *make_command_string PARAMS((COMMAND *)); +extern char *named_function_string PARAMS((char *, COMMAND *, int)); + +extern void print_command PARAMS((COMMAND *)); +extern void print_simple_command PARAMS((SIMPLE_COM *)); +extern void print_word_list PARAMS((WORD_LIST *, char *)); + +/* debugger support */ +extern void print_for_command_head PARAMS((FOR_COM *)); +#if defined (SELECT_COMMAND) +extern void print_select_command_head PARAMS((SELECT_COM *)); +#endif +extern void print_case_command_head PARAMS((CASE_COM *)); +#if defined (DPAREN_ARITHMETIC) +extern void print_arith_command PARAMS((WORD_LIST *)); +#endif +#if defined (COND_COMMAND) +extern void print_cond_command PARAMS((COND_COM *)); +#endif + +/* set -x support */ +extern void xtrace_init PARAMS((void)); +#ifdef NEED_XTRACE_SET_DECL +extern void xtrace_set PARAMS((int, FILE *)); +#endif +extern void xtrace_fdchk PARAMS((int)); +extern void xtrace_reset PARAMS((void)); +extern char *indirection_level_string PARAMS((void)); +extern void xtrace_print_assignment PARAMS((char *, char *, int, int)); +extern void xtrace_print_word_list PARAMS((WORD_LIST *, int)); +extern void xtrace_print_for_command_head PARAMS((FOR_COM *)); +#if defined (SELECT_COMMAND) +extern void xtrace_print_select_command_head PARAMS((SELECT_COM *)); +#endif +extern void xtrace_print_case_command_head PARAMS((CASE_COM *)); +#if defined (DPAREN_ARITHMETIC) +extern void xtrace_print_arith_cmd PARAMS((WORD_LIST *)); +#endif +#if defined (COND_COMMAND) +extern void xtrace_print_cond_term PARAMS((int, int, WORD_DESC *, char *, char *)); +#endif + +/* Functions from shell.c. */ +extern void exit_shell PARAMS((int)) __attribute__((__noreturn__)); +extern void sh_exit PARAMS((int)) __attribute__((__noreturn__)); +extern void subshell_exit PARAMS((int)) __attribute__((__noreturn__)); +extern void set_exit_status PARAMS((int)); +extern void disable_priv_mode PARAMS((void)); +extern void unbind_args PARAMS((void)); + +#if defined (RESTRICTED_SHELL) +extern int shell_is_restricted PARAMS((char *)); +extern int maybe_make_restricted PARAMS((char *)); +#endif + +extern void unset_bash_input PARAMS((int)); +extern void get_current_user_info PARAMS((void)); + +/* Functions from eval.c. */ +extern int reader_loop PARAMS((void)); +extern int pretty_print_loop PARAMS((void)); +extern int parse_command PARAMS((void)); +extern int read_command PARAMS((void)); + +/* Functions from braces.c. */ +#if defined (BRACE_EXPANSION) +extern char **brace_expand PARAMS((char *)); +#endif + +/* Miscellaneous functions from parse.y */ +extern int yyparse PARAMS((void)); +extern int return_EOF PARAMS((void)); +extern void push_token PARAMS((int)); +extern char *xparse_dolparen PARAMS((char *, char *, int *, int)); +extern void reset_parser PARAMS((void)); +extern void reset_readahead_token PARAMS((void)); +extern WORD_LIST *parse_string_to_word_list PARAMS((char *, int, const char *)); + +extern int parser_will_prompt PARAMS((void)); +extern int parser_in_command_position PARAMS((void)); + +extern void free_pushed_string_input PARAMS((void)); + +extern int parser_expanding_alias PARAMS((void)); +extern void parser_save_alias PARAMS((void)); +extern void parser_restore_alias PARAMS((void)); + +extern void clear_shell_input_line PARAMS((void)); + +extern char *decode_prompt_string PARAMS((char *)); + +extern int get_current_prompt_level PARAMS((void)); +extern void set_current_prompt_level PARAMS((int)); + +#if defined (HISTORY) +extern char *history_delimiting_chars PARAMS((const char *)); +#endif + +/* Declarations for functions defined in locale.c */ +extern void set_default_locale PARAMS((void)); +extern void set_default_locale_vars PARAMS((void)); +extern int set_locale_var PARAMS((char *, char *)); +extern int set_lang PARAMS((char *, char *)); +extern void set_default_lang PARAMS((void)); +extern char *get_locale_var PARAMS((char *)); +extern char *localetrans PARAMS((char *, int, int *)); +extern char *mk_msgstr PARAMS((char *, int *)); +extern char *localeexpand PARAMS((char *, int, int, int, int *)); +#ifndef locale_decpoint +extern int locale_decpoint PARAMS((void)); +#endif + +/* Declarations for functions defined in list.c. */ +extern void list_walk PARAMS((GENERIC_LIST *, sh_glist_func_t *)); +extern void wlist_walk PARAMS((WORD_LIST *, sh_icpfunc_t *)); +extern GENERIC_LIST *list_reverse (); +extern int list_length (); +extern GENERIC_LIST *list_append (); +extern GENERIC_LIST *list_remove (); + +/* Declarations for functions defined in stringlib.c */ +extern int find_string_in_alist PARAMS((char *, STRING_INT_ALIST *, int)); +extern char *find_token_in_alist PARAMS((int, STRING_INT_ALIST *, int)); +extern int find_index_in_alist PARAMS((char *, STRING_INT_ALIST *, int)); + +extern char *substring PARAMS((const char *, int, int)); +extern char *strsub PARAMS((char *, char *, char *, int)); +extern char *strcreplace PARAMS((char *, int, const char *, int)); +extern void strip_leading PARAMS((char *)); +extern void strip_trailing PARAMS((char *, int, int)); +extern void xbcopy PARAMS((char *, char *, int)); + +/* Functions from version.c. */ +extern char *shell_version_string PARAMS((void)); +extern void show_shell_version PARAMS((int)); + +/* Functions from the bash library, lib/sh/libsh.a. These should really + go into a separate include file. */ + +/* declarations for functions defined in lib/sh/casemod.c */ +extern char *sh_modcase PARAMS((const char *, char *, int)); + +/* Defines for flags argument to sh_modcase. These need to agree with what's + in lib/sh/casemode.c */ +#define CASE_LOWER 0x0001 +#define CASE_UPPER 0x0002 +#define CASE_CAPITALIZE 0x0004 +#define CASE_UNCAP 0x0008 +#define CASE_TOGGLE 0x0010 +#define CASE_TOGGLEALL 0x0020 +#define CASE_UPFIRST 0x0040 +#define CASE_LOWFIRST 0x0080 + +#define CASE_USEWORDS 0x1000 + +/* declarations for functions defined in lib/sh/clktck.c */ +extern long get_clk_tck PARAMS((void)); + +/* declarations for functions defined in lib/sh/clock.c */ +extern void clock_t_to_secs (); +extern void print_clock_t (); + +/* Declarations for functions defined in lib/sh/dprintf.c */ +#if !defined (HAVE_DPRINTF) +extern void dprintf PARAMS((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); +#endif + +/* Declarations for functions defined in lib/sh/fmtulong.c */ +#define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */ +#define FL_ADDBASE 0x02 /* add base# prefix to converted value */ +#define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */ +#define FL_UNSIGNED 0x08 /* don't add any sign */ + +extern char *fmtulong PARAMS((unsigned long int, int, char *, size_t, int)); + +/* Declarations for functions defined in lib/sh/fmtulong.c */ +#if defined (HAVE_LONG_LONG) +extern char *fmtullong PARAMS((unsigned long long int, int, char *, size_t, int)); +#endif + +/* Declarations for functions defined in lib/sh/fmtumax.c */ +extern char *fmtumax PARAMS((uintmax_t, int, char *, size_t, int)); + +/* Declarations for functions defined in lib/sh/fnxform.c */ +extern char *fnx_fromfs PARAMS((char *, size_t)); +extern char *fnx_tofs PARAMS((char *, size_t)); + +/* Declarations for functions defined in lib/sh/fpurge.c */ + +#if defined NEED_FPURGE_DECL +#if !HAVE_DECL_FPURGE + +#if HAVE_FPURGE +# define fpurge _bash_fpurge +#endif +extern int fpurge PARAMS((FILE *stream)); + +#endif /* HAVE_DECL_FPURGE */ +#endif /* NEED_FPURGE_DECL */ + +/* Declarations for functions defined in lib/sh/getcwd.c */ +#if !defined (HAVE_GETCWD) +extern char *getcwd PARAMS((char *, size_t)); +#endif + +/* Declarations for functions defined in lib/sh/input_avail.c */ +extern int input_avail PARAMS((int)); + +/* Declarations for functions defined in lib/sh/itos.c */ +extern char *inttostr PARAMS((intmax_t, char *, size_t)); +extern char *itos PARAMS((intmax_t)); +extern char *mitos PARAMS((intmax_t)); +extern char *uinttostr PARAMS((uintmax_t, char *, size_t)); +extern char *uitos PARAMS((uintmax_t)); + +/* declarations for functions defined in lib/sh/makepath.c */ +#define MP_DOTILDE 0x01 +#define MP_DOCWD 0x02 +#define MP_RMDOT 0x04 +#define MP_IGNDOT 0x08 + +extern char *sh_makepath PARAMS((const char *, const char *, int)); + +/* declarations for functions defined in lib/sh/mbscasecmp.c */ +#if !defined (HAVE_MBSCASECMP) +extern char *mbscasecmp PARAMS((const char *, const char *)); +#endif + +/* declarations for functions defined in lib/sh/mbschr.c */ +#if !defined (HAVE_MBSCHR) +extern char *mbschr PARAMS((const char *, int)); +#endif + +/* declarations for functions defined in lib/sh/mbscmp.c */ +#if !defined (HAVE_MBSCMP) +extern char *mbscmp PARAMS((const char *, const char *)); +#endif + +/* declarations for functions defined in lib/sh/netconn.c */ +extern int isnetconn PARAMS((int)); + +/* declarations for functions defined in lib/sh/netopen.c */ +extern int netopen PARAMS((char *)); + +/* Declarations for functions defined in lib/sh/oslib.c */ + +#if !defined (HAVE_DUP2) || defined (DUP2_BROKEN) +extern int dup2 PARAMS((int, int)); +#endif + +#if !defined (HAVE_GETDTABLESIZE) +extern int getdtablesize PARAMS((void)); +#endif /* !HAVE_GETDTABLESIZE */ + +#if !defined (HAVE_GETHOSTNAME) +extern int gethostname PARAMS((char *, int)); +#endif /* !HAVE_GETHOSTNAME */ + +extern int getmaxgroups PARAMS((void)); +extern long getmaxchild PARAMS((void)); + +/* declarations for functions defined in lib/sh/pathcanon.c */ +#define PATH_CHECKDOTDOT 0x0001 +#define PATH_CHECKEXISTS 0x0002 +#define PATH_HARDPATH 0x0004 +#define PATH_NOALLOC 0x0008 + +extern char *sh_canonpath PARAMS((char *, int)); + +/* declarations for functions defined in lib/sh/pathphys.c */ +extern char *sh_physpath PARAMS((char *, int)); +extern char *sh_realpath PARAMS((const char *, char *)); + +/* declarations for functions defined in lib/sh/random.c */ +extern int brand PARAMS((void)); +extern void sbrand PARAMS((unsigned long)); /* set bash random number generator. */ +extern void seedrand PARAMS((void)); /* seed generator randomly */ +extern void seedrand32 PARAMS((void)); +extern u_bits32_t get_urandom32 PARAMS((void)); + +/* declarations for functions defined in lib/sh/setlinebuf.c */ +#ifdef NEED_SH_SETLINEBUF_DECL +extern int sh_setlinebuf PARAMS((FILE *)); +#endif + +/* declarations for functions defined in lib/sh/shaccess.c */ +extern int sh_eaccess PARAMS((const char *, int)); + +/* declarations for functions defined in lib/sh/shmatch.c */ +extern int sh_regmatch PARAMS((const char *, const char *, int)); + +/* defines for flags argument to sh_regmatch. */ +#define SHMAT_SUBEXP 0x001 /* save subexpressions in SH_REMATCH */ +#define SHMAT_PWARN 0x002 /* print a warning message on invalid regexp */ + +/* declarations for functions defined in lib/sh/shmbchar.c */ +extern size_t mbstrlen PARAMS((const char *)); +extern char *mbsmbchar PARAMS((const char *)); +extern int sh_mbsnlen PARAMS((const char *, size_t, int)); + +/* declarations for functions defined in lib/sh/shquote.c */ +extern char *sh_single_quote PARAMS((const char *)); +extern char *sh_double_quote PARAMS((const char *)); +extern char *sh_mkdoublequoted PARAMS((const char *, int, int)); +extern char *sh_un_double_quote PARAMS((char *)); +extern char *sh_backslash_quote PARAMS((char *, const char *, int)); +extern char *sh_backslash_quote_for_double_quotes PARAMS((char *)); +extern char *sh_quote_reusable PARAMS((char *, int)); +extern int sh_contains_shell_metas PARAMS((const char *)); +extern int sh_contains_quotes PARAMS((const char *)); + +/* declarations for functions defined in lib/sh/spell.c */ +extern int spname PARAMS((char *, char *)); +extern char *dirspell PARAMS((char *)); + +/* declarations for functions defined in lib/sh/strcasecmp.c */ +#if !defined (HAVE_STRCASECMP) +extern int strncasecmp PARAMS((const char *, const char *, size_t)); +extern int strcasecmp PARAMS((const char *, const char *)); +#endif /* HAVE_STRCASECMP */ + +/* declarations for functions defined in lib/sh/strcasestr.c */ +#if ! HAVE_STRCASESTR +extern char *strcasestr PARAMS((const char *, const char *)); +#endif + +/* declarations for functions defined in lib/sh/strchrnul.c */ +#if ! HAVE_STRCHRNUL +extern char *strchrnul PARAMS((const char *, int)); +#endif + +/* declarations for functions defined in lib/sh/strerror.c */ +#if !defined (HAVE_STRERROR) && !defined (strerror) +extern char *strerror PARAMS((int)); +#endif + +/* declarations for functions defined in lib/sh/strftime.c */ +#if !defined (HAVE_STRFTIME) && defined (NEED_STRFTIME_DECL) +extern size_t strftime PARAMS((char *, size_t, const char *, const struct tm *)); +#endif + +/* declarations for functions and structures defined in lib/sh/stringlist.c */ + +/* This is a general-purpose argv-style array struct. */ +typedef struct _list_of_strings { + char **list; + int list_size; + int list_len; +} STRINGLIST; + +typedef int sh_strlist_map_func_t PARAMS((char *)); + +extern STRINGLIST *strlist_create PARAMS((int)); +extern STRINGLIST *strlist_resize PARAMS((STRINGLIST *, int)); +extern void strlist_flush PARAMS((STRINGLIST *)); +extern void strlist_dispose PARAMS((STRINGLIST *)); +extern int strlist_remove PARAMS((STRINGLIST *, char *)); +extern STRINGLIST *strlist_copy PARAMS((STRINGLIST *)); +extern STRINGLIST *strlist_merge PARAMS((STRINGLIST *, STRINGLIST *)); +extern STRINGLIST *strlist_append PARAMS((STRINGLIST *, STRINGLIST *)); +extern STRINGLIST *strlist_prefix_suffix PARAMS((STRINGLIST *, char *, char *)); +extern void strlist_print PARAMS((STRINGLIST *, char *)); +extern void strlist_walk PARAMS((STRINGLIST *, sh_strlist_map_func_t *)); +extern void strlist_sort PARAMS((STRINGLIST *)); + +/* declarations for functions defined in lib/sh/stringvec.c */ + +extern char **strvec_create PARAMS((int)); +extern char **strvec_resize PARAMS((char **, int)); +extern char **strvec_mcreate PARAMS((int)); +extern char **strvec_mresize PARAMS((char **, int)); +extern void strvec_flush PARAMS((char **)); +extern void strvec_dispose PARAMS((char **)); +extern int strvec_remove PARAMS((char **, char *)); +extern int strvec_len PARAMS((char **)); +extern int strvec_search PARAMS((char **, char *)); +extern char **strvec_copy PARAMS((char **)); +extern int strvec_posixcmp PARAMS((char **, char **)); +extern int strvec_strcmp PARAMS((char **, char **)); +extern void strvec_sort PARAMS((char **, int)); + +extern char **strvec_from_word_list PARAMS((WORD_LIST *, int, int, int *)); +extern WORD_LIST *strvec_to_word_list PARAMS((char **, int, int)); + +/* declarations for functions defined in lib/sh/strnlen.c */ +#if !defined (HAVE_STRNLEN) +extern size_t strnlen PARAMS((const char *, size_t)); +#endif + +/* declarations for functions defined in lib/sh/strpbrk.c */ +#if !defined (HAVE_STRPBRK) +extern char *strpbrk PARAMS((const char *, const char *)); +#endif + +/* declarations for functions defined in lib/sh/strtod.c */ +#if !defined (HAVE_STRTOD) +extern double strtod PARAMS((const char *, char **)); +#endif + +/* declarations for functions defined in lib/sh/strtol.c */ +#if !HAVE_DECL_STRTOL +extern long strtol PARAMS((const char *, char **, int)); +#endif + +/* declarations for functions defined in lib/sh/strtoll.c */ +#if defined (HAVE_LONG_LONG) && !HAVE_DECL_STRTOLL +extern long long strtoll PARAMS((const char *, char **, int)); +#endif + +/* declarations for functions defined in lib/sh/strtoul.c */ +#if !HAVE_DECL_STRTOUL +extern unsigned long strtoul PARAMS((const char *, char **, int)); +#endif + +/* declarations for functions defined in lib/sh/strtoull.c */ +#if defined (HAVE_LONG_LONG) && !HAVE_DECL_STRTOULL +extern unsigned long long strtoull PARAMS((const char *, char **, int)); +#endif + +/* declarations for functions defined in lib/sh/strimax.c */ +#if !HAVE_DECL_STRTOIMAX +extern intmax_t strtoimax PARAMS((const char *, char **, int)); +#endif + +/* declarations for functions defined in lib/sh/strumax.c */ +#if !HAVE_DECL_STRTOUMAX +extern uintmax_t strtoumax PARAMS((const char *, char **, int)); +#endif + +/* declarations for functions defined in lib/sh/strtrans.c */ +extern char *ansicstr PARAMS((char *, int, int, int *, int *)); +extern char *ansic_quote PARAMS((char *, int, int *)); +extern int ansic_shouldquote PARAMS((const char *)); +extern char *ansiexpand PARAMS((char *, int, int, int *)); + +/* declarations for functions defined in lib/sh/timeval.c. No prototypes + so we don't have to count on having a definition of struct timeval in + scope when this file is included. */ +extern void timeval_to_secs (); +extern void print_timeval (); + +/* declarations for functions defined in lib/sh/tmpfile.c */ +#define MT_USETMPDIR 0x0001 +#define MT_READWRITE 0x0002 +#define MT_USERANDOM 0x0004 +#define MT_TEMPLATE 0x0008 + +extern char *sh_mktmpname PARAMS((char *, int)); +extern int sh_mktmpfd PARAMS((char *, int, char **)); +/* extern FILE *sh_mktmpfp PARAMS((char *, int, char **)); */ +extern char *sh_mktmpdir PARAMS((char *, int)); + +/* declarations for functions defined in lib/sh/uconvert.c */ +extern int uconvert PARAMS((char *, long *, long *, char **)); + +/* declarations for functions defined in lib/sh/ufuncs.c */ +extern unsigned int falarm PARAMS((unsigned int, unsigned int)); +extern unsigned int fsleep PARAMS((unsigned int, unsigned int)); + +/* declarations for functions defined in lib/sh/unicode.c */ +extern int u32cconv PARAMS((unsigned long, char *)); +extern void u32reset PARAMS((void)); + +/* declarations for functions defined in lib/sh/utf8.c */ +extern char *utf8_mbschr PARAMS((const char *, int)); +extern int utf8_mbscmp PARAMS((const char *, const char *)); +extern char *utf8_mbsmbchar PARAMS((const char *)); +extern int utf8_mbsnlen PARAMS((const char *, size_t, int)); +extern int utf8_mblen PARAMS((const char *, size_t)); +extern size_t utf8_mbstrlen PARAMS((const char *)); + +/* declarations for functions defined in lib/sh/wcsnwidth.c */ +#if defined (HANDLE_MULTIBYTE) +extern int wcsnwidth PARAMS((const wchar_t *, size_t, int)); +#endif + +/* declarations for functions defined in lib/sh/winsize.c */ +extern void get_new_window_size PARAMS((int, int *, int *)); + +/* declarations for functions defined in lib/sh/zcatfd.c */ +extern int zcatfd PARAMS((int, int, char *)); + +/* declarations for functions defined in lib/sh/zgetline.c */ +extern ssize_t zgetline PARAMS((int, char **, size_t *, int, int)); + +/* declarations for functions defined in lib/sh/zmapfd.c */ +extern int zmapfd PARAMS((int, char **, char *)); + +/* declarations for functions defined in lib/sh/zread.c */ +extern ssize_t zread PARAMS((int, char *, size_t)); +extern ssize_t zreadretry PARAMS((int, char *, size_t)); +extern ssize_t zreadintr PARAMS((int, char *, size_t)); +extern ssize_t zreadc PARAMS((int, char *)); +extern ssize_t zreadcintr PARAMS((int, char *)); +extern ssize_t zreadn PARAMS((int, char *, size_t)); +extern void zreset PARAMS((void)); +extern void zsyncfd PARAMS((int)); + +/* declarations for functions defined in lib/sh/zwrite.c */ +extern int zwrite PARAMS((int, char *, size_t)); + +/* declarations for functions defined in lib/glob/gmisc.c */ +extern int match_pattern_char PARAMS((char *, char *, int)); +extern int umatchlen PARAMS((char *, size_t)); + +#if defined (HANDLE_MULTIBYTE) +extern int match_pattern_wchar PARAMS((wchar_t *, wchar_t *, int)); +extern int wmatchlen PARAMS((wchar_t *, size_t)); +#endif + +#endif /* _EXTERNS_H_ */ diff --git a/bash-5.1/findcmd.c b/bash-5.1/findcmd.c new file mode 100644 index 0000000000000000000000000000000000000000..e235705a37e0e5ecf1ca28caedaad2b7e62d75dc --- /dev/null +++ b/bash-5.1/findcmd.c @@ -0,0 +1,688 @@ +/* findcmd.c -- Functions to search for commands by name. */ + +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include +#include "chartypes.h" +#include "bashtypes.h" +#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include "filecntl.h" +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include + +#include "bashansi.h" + +#include "memalloc.h" +#include "shell.h" +#include "execute_cmd.h" +#include "flags.h" +#include "hashlib.h" +#include "pathexp.h" +#include "hashcmd.h" +#include "findcmd.h" /* matching prototypes and declarations */ + +#include + +#if !defined (errno) +extern int errno; +#endif + +/* Static functions defined and used in this file. */ +static char *_find_user_command_internal PARAMS((const char *, int)); +static char *find_user_command_internal PARAMS((const char *, int)); +static char *find_user_command_in_path PARAMS((const char *, char *, int)); +static char *find_in_path_element PARAMS((const char *, char *, int, int, struct stat *)); +static char *find_absolute_program PARAMS((const char *, int)); + +static char *get_next_path_element PARAMS((char *, int *)); + +/* The file name which we would try to execute, except that it isn't + possible to execute it. This is the first file that matches the + name that we are looking for while we are searching $PATH for a + suitable one to execute. If we cannot find a suitable executable + file, then we use this one. */ +static char *file_to_lose_on; + +/* Non-zero if we should stat every command found in the hash table to + make sure it still exists. */ +int check_hashed_filenames = CHECKHASH_DEFAULT; + +/* DOT_FOUND_IN_SEARCH becomes non-zero when find_user_command () + encounters a `.' as the directory pathname while scanning the + list of possible pathnames; i.e., if `.' comes before the directory + containing the file of interest. */ +int dot_found_in_search = 0; + +/* Set up EXECIGNORE; a blacklist of patterns that executable files should not + match. */ +static struct ignorevar execignore = +{ + "EXECIGNORE", + NULL, + 0, + NULL, + NULL +}; + +void +setup_exec_ignore (varname) + char *varname; +{ + setup_ignore_patterns (&execignore); +} + +static int +exec_name_should_ignore (name) + const char *name; +{ + struct ign *p; + + for (p = execignore.ignores; p && p->val; p++) + if (strmatch (p->val, (char *)name, FNMATCH_EXTFLAG|FNM_CASEFOLD) != FNM_NOMATCH) + return 1; + return 0; +} + +/* Return some flags based on information about this file. + The EXISTS bit is non-zero if the file is found. + The EXECABLE bit is non-zero the file is executble. + Zero is returned if the file is not found. */ +int +file_status (name) + const char *name; +{ + struct stat finfo; + int r; + + /* Determine whether this file exists or not. */ + if (stat (name, &finfo) < 0) + return (0); + + /* If the file is a directory, then it is not "executable" in the + sense of the shell. */ + if (S_ISDIR (finfo.st_mode)) + return (FS_EXISTS|FS_DIRECTORY); + + r = FS_EXISTS; + +#if defined (HAVE_EACCESS) + /* Use eaccess(2) if we have it to take things like ACLs and other + file access mechanisms into account. eaccess uses the effective + user and group IDs, not the real ones. We could use sh_eaccess, + but we don't want any special treatment for /dev/fd. */ + if (exec_name_should_ignore (name) == 0 && eaccess (name, X_OK) == 0) + r |= FS_EXECABLE; + if (eaccess (name, R_OK) == 0) + r |= FS_READABLE; + + return r; +#elif defined (AFS) + /* We have to use access(2) to determine access because AFS does not + support Unix file system semantics. This may produce wrong + answers for non-AFS files when ruid != euid. I hate AFS. */ + if (exec_name_should_ignore (name) == 0 && access (name, X_OK) == 0) + r |= FS_EXECABLE; + if (access (name, R_OK) == 0) + r |= FS_READABLE; + + return r; +#else /* !HAVE_EACCESS && !AFS */ + + /* Find out if the file is actually executable. By definition, the + only other criteria is that the file has an execute bit set that + we can use. The same with whether or not a file is readable. */ + + /* Root only requires execute permission for any of owner, group or + others to be able to exec a file, and can read any file. */ + if (current_user.euid == (uid_t)0) + { + r |= FS_READABLE; + if (exec_name_should_ignore (name) == 0 && (finfo.st_mode & S_IXUGO)) + r |= FS_EXECABLE; + return r; + } + + /* If we are the owner of the file, the owner bits apply. */ + if (current_user.euid == finfo.st_uid) + { + if (exec_name_should_ignore (name) == 0 && (finfo.st_mode & S_IXUSR)) + r |= FS_EXECABLE; + if (finfo.st_mode & S_IRUSR) + r |= FS_READABLE; + } + + /* If we are in the owning group, the group permissions apply. */ + else if (group_member (finfo.st_gid)) + { + if (exec_name_should_ignore (name) == 0 && (finfo.st_mode & S_IXGRP)) + r |= FS_EXECABLE; + if (finfo.st_mode & S_IRGRP) + r |= FS_READABLE; + } + + /* Else we check whether `others' have permission to execute the file */ + else + { + if (exec_name_should_ignore (name) == 0 && finfo.st_mode & S_IXOTH) + r |= FS_EXECABLE; + if (finfo.st_mode & S_IROTH) + r |= FS_READABLE; + } + + return r; +#endif /* !AFS */ +} + +/* Return non-zero if FILE exists and is executable. + Note that this function is the definition of what an + executable file is; do not change this unless YOU know + what an executable file is. */ +int +executable_file (file) + const char *file; +{ + int s; + + s = file_status (file); +#if defined (EISDIR) + if (s & FS_DIRECTORY) + errno = EISDIR; /* let's see if we can improve error messages */ +#endif + return ((s & FS_EXECABLE) && ((s & FS_DIRECTORY) == 0)); +} + +int +is_directory (file) + const char *file; +{ + return (file_status (file) & FS_DIRECTORY); +} + +int +executable_or_directory (file) + const char *file; +{ + int s; + + s = file_status (file); + return ((s & FS_EXECABLE) || (s & FS_DIRECTORY)); +} + +/* Locate the executable file referenced by NAME, searching along + the contents of the shell PATH variable. Return a new string + which is the full pathname to the file, or NULL if the file + couldn't be found. If a file is found that isn't executable, + and that is the only match, then return that. */ +char * +find_user_command (name) + const char *name; +{ + return (find_user_command_internal (name, FS_EXEC_PREFERRED|FS_NODIRS)); +} + +/* Locate the file referenced by NAME, searching along the contents + of the shell PATH variable. Return a new string which is the full + pathname to the file, or NULL if the file couldn't be found. This + returns the first readable file found; designed to be used to look + for shell scripts or files to source. */ +char * +find_path_file (name) + const char *name; +{ + return (find_user_command_internal (name, FS_READABLE)); +} + +static char * +_find_user_command_internal (name, flags) + const char *name; + int flags; +{ + char *path_list, *cmd; + SHELL_VAR *var; + + /* Search for the value of PATH in both the temporary environments and + in the regular list of variables. */ + if (var = find_variable_tempenv ("PATH")) /* XXX could be array? */ + path_list = value_cell (var); + else + path_list = (char *)NULL; + + if (path_list == 0 || *path_list == '\0') + return (savestring (name)); + + cmd = find_user_command_in_path (name, path_list, flags); + + return (cmd); +} + +static char * +find_user_command_internal (name, flags) + const char *name; + int flags; +{ +#ifdef __WIN32__ + char *res, *dotexe; + + dotexe = (char *)xmalloc (strlen (name) + 5); + strcpy (dotexe, name); + strcat (dotexe, ".exe"); + res = _find_user_command_internal (dotexe, flags); + free (dotexe); + if (res == 0) + res = _find_user_command_internal (name, flags); + return res; +#else + return (_find_user_command_internal (name, flags)); +#endif +} + +/* Return the next element from PATH_LIST, a colon separated list of + paths. PATH_INDEX_POINTER is the address of an index into PATH_LIST; + the index is modified by this function. + Return the next element of PATH_LIST or NULL if there are no more. */ +static char * +get_next_path_element (path_list, path_index_pointer) + char *path_list; + int *path_index_pointer; +{ + char *path; + + path = extract_colon_unit (path_list, path_index_pointer); + + if (path == 0) + return (path); + + if (*path == '\0') + { + free (path); + path = savestring ("."); + } + + return (path); +} + +/* Look for PATHNAME in $PATH. Returns either the hashed command + corresponding to PATHNAME or the first instance of PATHNAME found + in $PATH. If (FLAGS&CMDSRCH_HASH) is non-zero, insert the instance of + PATHNAME found in $PATH into the command hash table. If (FLAGS&CMDSRCH_STDPATH) + is non-zero, we are running in a `command -p' environment and should use + the Posix standard path. + Returns a newly-allocated string. */ +char * +search_for_command (pathname, flags) + const char *pathname; + int flags; +{ + char *hashed_file, *command, *path_list; + int temp_path, st; + SHELL_VAR *path; + + hashed_file = command = (char *)NULL; + + /* If PATH is in the temporary environment for this command, don't use the + hash table to search for the full pathname. */ + path = find_variable_tempenv ("PATH"); + temp_path = path && tempvar_p (path); + + /* Don't waste time trying to find hashed data for a pathname + that is already completely specified or if we're using a command- + specific value for PATH. */ + if (temp_path == 0 && absolute_program (pathname) == 0) + hashed_file = phash_search (pathname); + + /* If a command found in the hash table no longer exists, we need to + look for it in $PATH. Thank you Posix.2. This forces us to stat + every command found in the hash table. */ + + if (hashed_file && (posixly_correct || check_hashed_filenames)) + { + st = file_status (hashed_file); + if ((st & (FS_EXISTS|FS_EXECABLE)) != (FS_EXISTS|FS_EXECABLE)) + { + phash_remove (pathname); + free (hashed_file); + hashed_file = (char *)NULL; + } + } + + if (hashed_file) + command = hashed_file; + else if (absolute_program (pathname)) + /* A command containing a slash is not looked up in PATH or saved in + the hash table. */ + command = savestring (pathname); + else + { + if (flags & CMDSRCH_STDPATH) + path_list = conf_standard_path (); + else if (temp_path || path) + path_list = value_cell (path); + else + path_list = 0; + + command = find_user_command_in_path (pathname, path_list, FS_EXEC_PREFERRED|FS_NODIRS); + + if (command && hashing_enabled && temp_path == 0 && (flags & CMDSRCH_HASH)) + { + /* If we found the full pathname the same as the command name, the + command probably doesn't exist. Don't put it into the hash + table. */ + if (STREQ (command, pathname)) + { + st = file_status (command); + if (st & FS_EXECABLE) + phash_insert ((char *)pathname, command, dot_found_in_search, 1); + } + /* If we're in posix mode, don't add files without the execute bit + to the hash table. */ + else if (posixly_correct) + { + st = file_status (command); + if (st & FS_EXECABLE) + phash_insert ((char *)pathname, command, dot_found_in_search, 1); + } + else + phash_insert ((char *)pathname, command, dot_found_in_search, 1); + } + + if (flags & CMDSRCH_STDPATH) + free (path_list); + } + + return (command); +} + +char * +user_command_matches (name, flags, state) + const char *name; + int flags, state; +{ + register int i; + int path_index, name_len; + char *path_list, *path_element, *match; + struct stat dotinfo; + static char **match_list = NULL; + static int match_list_size = 0; + static int match_index = 0; + + if (state == 0) + { + /* Create the list of matches. */ + if (match_list == 0) + { + match_list_size = 5; + match_list = strvec_create (match_list_size); + } + + /* Clear out the old match list. */ + for (i = 0; i < match_list_size; i++) + match_list[i] = 0; + + /* We haven't found any files yet. */ + match_index = 0; + + if (absolute_program (name)) + { + match_list[0] = find_absolute_program (name, flags); + match_list[1] = (char *)NULL; + path_list = (char *)NULL; + } + else + { + name_len = strlen (name); + file_to_lose_on = (char *)NULL; + dot_found_in_search = 0; + if (stat (".", &dotinfo) < 0) + dotinfo.st_dev = dotinfo.st_ino = 0; /* so same_file won't match */ + path_list = get_string_value ("PATH"); + path_index = 0; + } + + while (path_list && path_list[path_index]) + { + path_element = get_next_path_element (path_list, &path_index); + + if (path_element == 0) + break; + + match = find_in_path_element (name, path_element, flags, name_len, &dotinfo); + + free (path_element); + + if (match == 0) + continue; + + if (match_index + 1 == match_list_size) + { + match_list_size += 10; + match_list = strvec_resize (match_list, (match_list_size + 1)); + } + + match_list[match_index++] = match; + match_list[match_index] = (char *)NULL; + FREE (file_to_lose_on); + file_to_lose_on = (char *)NULL; + } + + /* We haven't returned any strings yet. */ + match_index = 0; + } + + match = match_list[match_index]; + + if (match) + match_index++; + + return (match); +} + +static char * +find_absolute_program (name, flags) + const char *name; + int flags; +{ + int st; + + st = file_status (name); + + /* If the file doesn't exist, quit now. */ + if ((st & FS_EXISTS) == 0) + return ((char *)NULL); + + /* If we only care about whether the file exists or not, return + this filename. Otherwise, maybe we care about whether this + file is executable. If it is, and that is what we want, return it. */ + if ((flags & FS_EXISTS) || ((flags & FS_EXEC_ONLY) && (st & FS_EXECABLE))) + return (savestring (name)); + + return (NULL); +} + +static char * +find_in_path_element (name, path, flags, name_len, dotinfop) + const char *name; + char *path; + int flags, name_len; + struct stat *dotinfop; +{ + int status; + char *full_path, *xpath; + + xpath = (posixly_correct == 0 && *path == '~') ? bash_tilde_expand (path, 0) : path; + + /* Remember the location of "." in the path, in all its forms + (as long as they begin with a `.', e.g. `./.') */ + if (dot_found_in_search == 0 && *xpath == '.') + dot_found_in_search = same_file (".", xpath, dotinfop, (struct stat *)NULL); + + full_path = sh_makepath (xpath, name, 0); + + status = file_status (full_path); + + if (xpath != path) + free (xpath); + + if ((status & FS_EXISTS) == 0) + { + free (full_path); + return ((char *)NULL); + } + + /* The file exists. If the caller simply wants the first file, here it is. */ + if (flags & FS_EXISTS) + return (full_path); + + /* If we have a readable file, and the caller wants a readable file, this + is it. */ + if ((flags & FS_READABLE) && (status & FS_READABLE)) + return (full_path); + + /* If the file is executable, then it satisfies the cases of + EXEC_ONLY and EXEC_PREFERRED. Return this file unconditionally. */ + if ((status & FS_EXECABLE) && (flags & (FS_EXEC_ONLY|FS_EXEC_PREFERRED)) && + (((flags & FS_NODIRS) == 0) || ((status & FS_DIRECTORY) == 0))) + { + FREE (file_to_lose_on); + file_to_lose_on = (char *)NULL; + return (full_path); + } + + /* The file is not executable, but it does exist. If we prefer + an executable, then remember this one if it is the first one + we have found. */ + if ((flags & FS_EXEC_PREFERRED) && file_to_lose_on == 0 && exec_name_should_ignore (full_path) == 0) + file_to_lose_on = savestring (full_path); + + /* If we want only executable files, or we don't want directories and + this file is a directory, or we want a readable file and this file + isn't readable, fail. */ + if ((flags & (FS_EXEC_ONLY|FS_EXEC_PREFERRED)) || + ((flags & FS_NODIRS) && (status & FS_DIRECTORY)) || + ((flags & FS_READABLE) && (status & FS_READABLE) == 0)) + { + free (full_path); + return ((char *)NULL); + } + else + return (full_path); +} + +/* This does the dirty work for find_user_command_internal () and + user_command_matches (). + NAME is the name of the file to search for. + PATH_LIST is a colon separated list of directories to search. + FLAGS contains bit fields which control the files which are eligible. + Some values are: + FS_EXEC_ONLY: The file must be an executable to be found. + FS_EXEC_PREFERRED: If we can't find an executable, then the + the first file matching NAME will do. + FS_EXISTS: The first file found will do. + FS_NODIRS: Don't find any directories. +*/ +static char * +find_user_command_in_path (name, path_list, flags) + const char *name; + char *path_list; + int flags; +{ + char *full_path, *path; + int path_index, name_len; + struct stat dotinfo; + + /* We haven't started looking, so we certainly haven't seen + a `.' as the directory path yet. */ + dot_found_in_search = 0; + + if (absolute_program (name)) + { + full_path = find_absolute_program (name, flags); + return (full_path); + } + + if (path_list == 0 || *path_list == '\0') + return (savestring (name)); /* XXX */ + + file_to_lose_on = (char *)NULL; + name_len = strlen (name); + if (stat (".", &dotinfo) < 0) + dotinfo.st_dev = dotinfo.st_ino = 0; + path_index = 0; + + while (path_list[path_index]) + { + /* Allow the user to interrupt out of a lengthy path search. */ + QUIT; + + path = get_next_path_element (path_list, &path_index); + if (path == 0) + break; + + /* Side effects: sets dot_found_in_search, possibly sets + file_to_lose_on. */ + full_path = find_in_path_element (name, path, flags, name_len, &dotinfo); + free (path); + + /* This should really be in find_in_path_element, but there isn't the + right combination of flags. */ + if (full_path && is_directory (full_path)) + { + free (full_path); + continue; + } + + if (full_path) + { + FREE (file_to_lose_on); + return (full_path); + } + } + + /* We didn't find exactly what the user was looking for. Return + the contents of FILE_TO_LOSE_ON which is NULL when the search + required an executable, or non-NULL if a file was found and the + search would accept a non-executable as a last resort. If the + caller specified FS_NODIRS, and file_to_lose_on is a directory, + return NULL. */ + if (file_to_lose_on && (flags & FS_NODIRS) && is_directory (file_to_lose_on)) + { + free (file_to_lose_on); + file_to_lose_on = (char *)NULL; + } + + return (file_to_lose_on); +} + +/* External interface to find a command given a $PATH. Separate from + find_user_command_in_path to allow future customization. */ +char * +find_in_path (name, path_list, flags) + const char *name; + char *path_list; + int flags; +{ + return (find_user_command_in_path (name, path_list, flags)); +} diff --git a/bash-5.1/findcmd.h b/bash-5.1/findcmd.h new file mode 100644 index 0000000000000000000000000000000000000000..bf457814e24f4899f7666b95381086f735ff2292 --- /dev/null +++ b/bash-5.1/findcmd.h @@ -0,0 +1,47 @@ +/* findcmd.h - functions from findcmd.c. */ + +/* Copyright (C) 1997-2015,2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_FINDCMD_H_) +#define _FINDCMD_H_ + +#include "stdc.h" + +/* Flags for search_for_command */ +#define CMDSRCH_HASH 0x01 +#define CMDSRCH_STDPATH 0x02 +#define CMDSRCH_TEMPENV 0x04 + +extern int file_status PARAMS((const char *)); +extern int executable_file PARAMS((const char *)); +extern int is_directory PARAMS((const char *)); +extern int executable_or_directory PARAMS((const char *)); +extern char *find_user_command PARAMS((const char *)); +extern char *find_in_path PARAMS((const char *, char *, int)); +extern char *find_path_file PARAMS((const char *)); +extern char *search_for_command PARAMS((const char *, int)); +extern char *user_command_matches PARAMS((const char *, int, int)); +extern void setup_exec_ignore PARAMS((char *)); + +extern int dot_found_in_search; + +/* variables managed via shopt */ +extern int check_hashed_filenames; + +#endif /* _FINDCMD_H_ */ diff --git a/bash-5.1/flags.c b/bash-5.1/flags.c new file mode 100644 index 0000000000000000000000000000000000000000..983f9a507c8040de00e8b64b4c579a1a381ac809 --- /dev/null +++ b/bash-5.1/flags.c @@ -0,0 +1,385 @@ +/* flags.c -- Everything about flags except the `set' command. That + is in builtins.c */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "shell.h" +#include "execute_cmd.h" +#include "flags.h" + +#if defined (BANG_HISTORY) +# include "bashhist.h" +#endif + +#if defined (JOB_CONTROL) +extern int set_job_control PARAMS((int)); +#endif + +/* **************************************************************** */ +/* */ +/* The Standard sh Flags. */ +/* */ +/* **************************************************************** */ + +/* Non-zero means automatically mark variables which are modified or created + as auto export variables. */ +int mark_modified_vars = 0; + +/* Non-zero causes asynchronous job notification. Otherwise, job state + notification only takes place just before a primary prompt is printed. */ +int asynchronous_notification = 0; + +/* Non-zero means exit immediately if a command exits with a non-zero + exit status. The first is what controls set -e; the second is what + bash uses internally. */ +int errexit_flag = 0; +int exit_immediately_on_error = 0; + +/* Non-zero means disable filename globbing. */ +int disallow_filename_globbing = 0; + +/* Non-zero means that all keyword arguments are placed into the environment + for a command, not just those that appear on the line before the command + name. */ +int place_keywords_in_env = 0; + +/* Non-zero means read commands, but don't execute them. This is useful + for debugging shell scripts that should do something hairy and possibly + destructive. */ +int read_but_dont_execute = 0; + +/* Non-zero means end of file is after one command. */ +int just_one_command = 0; + +/* Non-zero means don't overwrite existing files while doing redirections. */ +int noclobber = 0; + +/* Non-zero means trying to get the value of $i where $i is undefined + causes an error, instead of a null substitution. */ +int unbound_vars_is_error = 0; + +/* Non-zero means type out input lines after you read them. */ +int echo_input_at_read = 0; +int verbose_flag = 0; + +/* Non-zero means type out the command definition after reading, but + before executing. */ +int echo_command_at_execute = 0; + +/* Non-zero means turn on the job control features. */ +int jobs_m_flag = 0; + +/* Non-zero means this shell is interactive, even if running under a + pipe. */ +int forced_interactive = 0; + +/* By default, follow the symbolic links as if they were real directories + while hacking the `cd' command. This means that `cd ..' moves up in + the string of symbolic links that make up the current directory, instead + of the absolute directory. The shell variable `nolinks' also controls + this flag. */ +int no_symbolic_links = 0; + +/* **************************************************************** */ +/* */ +/* Non-Standard Flags Follow Here. */ +/* */ +/* **************************************************************** */ + +#if 0 +/* Non-zero means do lexical scoping in the body of a FOR command. */ +int lexical_scoping = 0; +#endif + +/* Non-zero means look up and remember command names in a hash table, */ +int hashing_enabled = 1; + +#if defined (BANG_HISTORY) +/* Non-zero means that we are doing history expansion. The default. + This means !22 gets the 22nd line of history. */ +int history_expansion = HISTEXPAND_DEFAULT; +int histexp_flag = 0; +#endif /* BANG_HISTORY */ + +/* Non-zero means that we allow comments to appear in interactive commands. */ +int interactive_comments = 1; + +#if defined (RESTRICTED_SHELL) +/* Non-zero means that this shell is `restricted'. A restricted shell + disallows: changing directories, command or path names containing `/', + unsetting or resetting the values of $PATH and $SHELL, and any type of + output redirection. */ +int restricted = 0; /* currently restricted */ +int restricted_shell = 0; /* shell was started in restricted mode. */ +#endif /* RESTRICTED_SHELL */ + +/* Non-zero means that this shell is running in `privileged' mode. This + is required if the shell is to run setuid. If the `-p' option is + not supplied at startup, and the real and effective uids or gids + differ, disable_priv_mode is called to relinquish setuid status. */ +int privileged_mode = 0; + +#if defined (BRACE_EXPANSION) +/* Zero means to disable brace expansion: foo{a,b} -> fooa foob */ +int brace_expansion = 1; +#endif + +/* Non-zero means that shell functions inherit the DEBUG trap. */ +int function_trace_mode = 0; + +/* Non-zero means that shell functions inherit the ERR trap. */ +int error_trace_mode = 0; + +/* Non-zero means that the rightmost non-zero exit status in a pipeline + is the exit status of the entire pipeline. If each processes exits + with a 0 status, the status of the pipeline is 0. */ +int pipefail_opt = 0; + +/* **************************************************************** */ +/* */ +/* The Flags ALIST. */ +/* */ +/* **************************************************************** */ + +const struct flags_alist shell_flags[] = { + /* Standard sh flags. */ + { 'a', &mark_modified_vars }, +#if defined (JOB_CONTROL) + { 'b', &asynchronous_notification }, +#endif /* JOB_CONTROL */ + { 'e', &errexit_flag }, + { 'f', &disallow_filename_globbing }, + { 'h', &hashing_enabled }, + { 'i', &forced_interactive }, + { 'k', &place_keywords_in_env }, +#if defined (JOB_CONTROL) + { 'm', &jobs_m_flag }, +#endif /* JOB_CONTROL */ + { 'n', &read_but_dont_execute }, + { 'p', &privileged_mode }, +#if defined (RESTRICTED_SHELL) + { 'r', &restricted }, +#endif /* RESTRICTED_SHELL */ + { 't', &just_one_command }, + { 'u', &unbound_vars_is_error }, + { 'v', &verbose_flag }, + { 'x', &echo_command_at_execute }, + + /* New flags that control non-standard things. */ +#if 0 + { 'l', &lexical_scoping }, +#endif +#if defined (BRACE_EXPANSION) + { 'B', &brace_expansion }, +#endif + { 'C', &noclobber }, + { 'E', &error_trace_mode }, +#if defined (BANG_HISTORY) + { 'H', &histexp_flag }, +#endif /* BANG_HISTORY */ + { 'P', &no_symbolic_links }, + { 'T', &function_trace_mode }, + {0, (int *)NULL} +}; + +#define NUM_SHELL_FLAGS (sizeof (shell_flags) / sizeof (struct flags_alist)) + +char optflags[NUM_SHELL_FLAGS+4] = { '+' }; + +int * +find_flag (name) + int name; +{ + int i; + for (i = 0; shell_flags[i].name; i++) + { + if (shell_flags[i].name == name) + return (shell_flags[i].value); + } + return (FLAG_UNKNOWN); +} + +/* Change the state of a flag, and return it's original value, or return + FLAG_ERROR if there is no flag FLAG. ON_OR_OFF must be either + FLAG_ON or FLAG_OFF. */ +int +change_flag (flag, on_or_off) + int flag; + int on_or_off; +{ + int *value, old_value; + +#if defined (RESTRICTED_SHELL) + /* Don't allow "set +r" in a shell which is `restricted'. */ + if (restricted && flag == 'r' && on_or_off == FLAG_OFF) + return (FLAG_ERROR); +#endif /* RESTRICTED_SHELL */ + + value = find_flag (flag); + + if ((value == (int *)FLAG_UNKNOWN) || (on_or_off != FLAG_ON && on_or_off != FLAG_OFF)) + return (FLAG_ERROR); + + old_value = *value; + *value = (on_or_off == FLAG_ON) ? 1 : 0; + + /* Special cases for a few flags. */ + switch (flag) + { +#if defined (BANG_HISTORY) + case 'H': + history_expansion = histexp_flag; + if (on_or_off == FLAG_ON) + bash_initialize_history (); + break; +#endif + +#if defined (JOB_CONTROL) + case 'm': + set_job_control (on_or_off == FLAG_ON); + break; +#endif /* JOB_CONTROL */ + + case 'e': + if (builtin_ignoring_errexit == 0) + exit_immediately_on_error = errexit_flag; + break; + + case 'n': + if (interactive_shell) + read_but_dont_execute = 0; + break; + + case 'p': + if (on_or_off == FLAG_OFF) + disable_priv_mode (); + break; + +#if defined (RESTRICTED_SHELL) + case 'r': + if (on_or_off == FLAG_ON && shell_initialized) + maybe_make_restricted (shell_name); + break; +#endif + + case 'v': + echo_input_at_read = verbose_flag; + break; + } + + return (old_value); +} + +/* Return a string which is the names of all the currently + set shell flags. */ +char * +which_set_flags () +{ + char *temp; + int i, string_index; + + temp = (char *)xmalloc (1 + NUM_SHELL_FLAGS + read_from_stdin + want_pending_command); + for (i = string_index = 0; shell_flags[i].name; i++) + if (*(shell_flags[i].value)) + temp[string_index++] = shell_flags[i].name; + + if (want_pending_command) + temp[string_index++] = 'c'; + if (read_from_stdin) + temp[string_index++] = 's'; + + temp[string_index] = '\0'; + return (temp); +} + +char * +get_current_flags () +{ + char *temp; + int i; + + temp = (char *)xmalloc (1 + NUM_SHELL_FLAGS); + for (i = 0; shell_flags[i].name; i++) + temp[i] = *(shell_flags[i].value); + temp[i] = '\0'; + return (temp); +} + +void +set_current_flags (bitmap) + const char *bitmap; +{ + int i; + + if (bitmap == 0) + return; + for (i = 0; shell_flags[i].name; i++) + *(shell_flags[i].value) = bitmap[i]; +} + +void +reset_shell_flags () +{ + mark_modified_vars = disallow_filename_globbing = 0; + place_keywords_in_env = read_but_dont_execute = just_one_command = 0; + noclobber = unbound_vars_is_error = 0; + echo_command_at_execute = jobs_m_flag = forced_interactive = 0; + no_symbolic_links = 0; + privileged_mode = pipefail_opt = 0; + + error_trace_mode = function_trace_mode = 0; + + exit_immediately_on_error = errexit_flag = 0; + echo_input_at_read = verbose_flag = 0; + + hashing_enabled = interactive_comments = 1; + +#if defined (JOB_CONTROL) + asynchronous_notification = 0; +#endif + +#if defined (BANG_HISTORY) + histexp_flag = 0; +#endif + +#if defined (BRACE_EXPANSION) + brace_expansion = 1; +#endif + +#if defined (RESTRICTED_SHELL) + restricted = 0; +#endif +} + +void +initialize_flags () +{ + register int i; + + for (i = 0; shell_flags[i].name; i++) + optflags[i+1] = shell_flags[i].name; + optflags[++i] = 'o'; + optflags[++i] = ';'; + optflags[i+1] = '\0'; +} diff --git a/bash-5.1/flags.h b/bash-5.1/flags.h new file mode 100644 index 0000000000000000000000000000000000000000..a3b5daa94f638cb7f297584bb9b4c8d77a75478f --- /dev/null +++ b/bash-5.1/flags.h @@ -0,0 +1,87 @@ +/* flags.h -- a list of all the flags that the shell knows about. You add + a flag to this program by adding the name here, and in flags.c. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_FLAGS_H_) +#define _FLAGS_H_ + +#include "stdc.h" + +/* Welcome to the world of Un*x, where everything is slightly backwards. */ +#define FLAG_ON '-' +#define FLAG_OFF '+' + +#define FLAG_ERROR -1 +#define FLAG_UNKNOWN (int *)0 + +/* The thing that we build the array of flags out of. */ +struct flags_alist { + char name; + int *value; +}; + +extern const struct flags_alist shell_flags[]; +extern char optflags[]; + +extern int + mark_modified_vars, errexit_flag, exit_immediately_on_error, + disallow_filename_globbing, + place_keywords_in_env, read_but_dont_execute, + just_one_command, unbound_vars_is_error, echo_input_at_read, verbose_flag, + echo_command_at_execute, noclobber, + hashing_enabled, forced_interactive, privileged_mode, jobs_m_flag, + asynchronous_notification, interactive_comments, no_symbolic_links, + function_trace_mode, error_trace_mode, pipefail_opt; + +/* -c, -s invocation options -- not really flags, but they show up in $- */ +extern int want_pending_command, read_from_stdin; + +#if 0 +extern int lexical_scoping; +#endif + +#if defined (BRACE_EXPANSION) +extern int brace_expansion; +#endif + +#if defined (BANG_HISTORY) +extern int history_expansion; +extern int histexp_flag; +#endif /* BANG_HISTORY */ + +#if defined (RESTRICTED_SHELL) +extern int restricted; +extern int restricted_shell; +#endif /* RESTRICTED_SHELL */ + +extern int *find_flag PARAMS((int)); +extern int change_flag PARAMS((int, int)); +extern char *which_set_flags PARAMS((void)); +extern void reset_shell_flags PARAMS((void)); + +extern char *get_current_flags PARAMS((void)); +extern void set_current_flags PARAMS((const char *)); + +extern void initialize_flags PARAMS((void)); + +/* A macro for efficiency. */ +#define change_flag_char(flag, on_or_off) change_flag (flag, on_or_off) + +#endif /* _FLAGS_H_ */ diff --git a/bash-5.1/general.c b/bash-5.1/general.c new file mode 100644 index 0000000000000000000000000000000000000000..50d52167cea847e6bd389f1681cec35bb0a83805 --- /dev/null +++ b/bash-5.1/general.c @@ -0,0 +1,1441 @@ +/* general.c -- Stuff that is used by all files. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#if defined (HAVE_SYS_PARAM_H) +# include +#endif +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "filecntl.h" +#include "bashansi.h" +#include +#include "chartypes.h" +#include + +#include "bashintl.h" + +#include "shell.h" +#include "parser.h" +#include "flags.h" +#include "findcmd.h" +#include "test.h" +#include "trap.h" +#include "pathexp.h" + +#include "builtins/common.h" + +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif + +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#ifdef __CYGWIN__ +# include +#endif + +static char *bash_special_tilde_expansions PARAMS((char *)); +static int unquoted_tilde_word PARAMS((const char *)); +static void initialize_group_array PARAMS((void)); + +/* A standard error message to use when getcwd() returns NULL. */ +const char * const bash_getcwd_errstr = N_("getcwd: cannot access parent directories"); + +/* Do whatever is necessary to initialize `Posix mode'. This currently + modifies the following variables which are controlled via shopt: + interactive_comments + source_uses_path + expand_aliases + inherit_errexit + print_shift_error + posixglob + + and the following variables which cannot be user-modified: + + source_searches_cwd + + If we add to the first list, we need to change the table and functions + below */ + +static struct { + int *posix_mode_var; +} posix_vars[] = +{ + &interactive_comments, + &source_uses_path, + &expand_aliases, + &inherit_errexit, + &print_shift_error, + 0 +}; + +static char *saved_posix_vars = 0; + +void +posix_initialize (on) + int on; +{ + /* Things that should be turned on when posix mode is enabled. */ + if (on != 0) + { + interactive_comments = source_uses_path = expand_aliases = 1; + inherit_errexit = 1; + source_searches_cwd = 0; + print_shift_error = 1; + } + + /* Things that should be turned on when posix mode is disabled. */ + else if (saved_posix_vars) /* on == 0, restore saved settings */ + { + set_posix_options (saved_posix_vars); + free (saved_posix_vars); + saved_posix_vars = 0; + } + else /* on == 0, restore a default set of settings */ + { + source_searches_cwd = 1; + expand_aliases = interactive_shell; + print_shift_error = 0; + } +} + +int +num_posix_options () +{ + return ((sizeof (posix_vars) / sizeof (posix_vars[0])) - 1); +} + +char * +get_posix_options (bitmap) + char *bitmap; +{ + register int i; + + if (bitmap == 0) + bitmap = (char *)xmalloc (num_posix_options ()); /* no trailing NULL */ + for (i = 0; posix_vars[i].posix_mode_var; i++) + bitmap[i] = *(posix_vars[i].posix_mode_var); + return bitmap; +} + +#undef save_posix_options +void +save_posix_options () +{ + saved_posix_vars = get_posix_options (saved_posix_vars); +} + +void +set_posix_options (bitmap) + const char *bitmap; +{ + register int i; + + for (i = 0; posix_vars[i].posix_mode_var; i++) + *(posix_vars[i].posix_mode_var) = bitmap[i]; +} + +/* **************************************************************** */ +/* */ +/* Functions to convert to and from and display non-standard types */ +/* */ +/* **************************************************************** */ + +#if defined (RLIMTYPE) +RLIMTYPE +string_to_rlimtype (s) + char *s; +{ + RLIMTYPE ret; + int neg; + + ret = 0; + neg = 0; + while (s && *s && whitespace (*s)) + s++; + if (s && (*s == '-' || *s == '+')) + { + neg = *s == '-'; + s++; + } + for ( ; s && *s && DIGIT (*s); s++) + ret = (ret * 10) + TODIGIT (*s); + return (neg ? -ret : ret); +} + +void +print_rlimtype (n, addnl) + RLIMTYPE n; + int addnl; +{ + char s[INT_STRLEN_BOUND (RLIMTYPE) + 1], *p; + + p = s + sizeof(s); + *--p = '\0'; + + if (n < 0) + { + do + *--p = '0' - n % 10; + while ((n /= 10) != 0); + + *--p = '-'; + } + else + { + do + *--p = '0' + n % 10; + while ((n /= 10) != 0); + } + + printf ("%s%s", p, addnl ? "\n" : ""); +} +#endif /* RLIMTYPE */ + +/* **************************************************************** */ +/* */ +/* Input Validation Functions */ +/* */ +/* **************************************************************** */ + +/* Return non-zero if all of the characters in STRING are digits. */ +int +all_digits (string) + const char *string; +{ + register const char *s; + + for (s = string; *s; s++) + if (DIGIT (*s) == 0) + return (0); + + return (1); +} + +/* Return non-zero if the characters pointed to by STRING constitute a + valid number. Stuff the converted number into RESULT if RESULT is + not null. */ +int +legal_number (string, result) + const char *string; + intmax_t *result; +{ + intmax_t value; + char *ep; + + if (result) + *result = 0; + + if (string == 0) + return 0; + + errno = 0; + value = strtoimax (string, &ep, 10); + if (errno || ep == string) + return 0; /* errno is set on overflow or underflow */ + + /* Skip any trailing whitespace, since strtoimax does not. */ + while (whitespace (*ep)) + ep++; + + /* If *string is not '\0' but *ep is '\0' on return, the entire string + is valid. */ + if (*string && *ep == '\0') + { + if (result) + *result = value; + /* The SunOS4 implementation of strtol() will happily ignore + overflow conditions, so this cannot do overflow correctly + on those systems. */ + return 1; + } + + return (0); +} + +/* Return 1 if this token is a legal shell `identifier'; that is, it consists + solely of letters, digits, and underscores, and does not begin with a + digit. */ +int +legal_identifier (name) + const char *name; +{ + register const char *s; + unsigned char c; + + if (!name || !(c = *name) || (legal_variable_starter (c) == 0)) + return (0); + + for (s = name + 1; (c = *s) != 0; s++) + { + if (legal_variable_char (c) == 0) + return (0); + } + return (1); +} + +/* Return 1 if NAME is a valid value that can be assigned to a nameref + variable. FLAGS can be 2, in which case the name is going to be used + to create a variable. Other values are currently unused, but could + be used to allow values to be stored and indirectly referenced, but + not used in assignments. */ +int +valid_nameref_value (name, flags) + const char *name; + int flags; +{ + if (name == 0 || *name == 0) + return 0; + + /* valid identifier */ +#if defined (ARRAY_VARS) + if (legal_identifier (name) || (flags != 2 && valid_array_reference (name, 0))) +#else + if (legal_identifier (name)) +#endif + return 1; + + return 0; +} + +int +check_selfref (name, value, flags) + const char *name; + char *value; + int flags; +{ + char *t; + + if (STREQ (name, value)) + return 1; + +#if defined (ARRAY_VARS) + if (valid_array_reference (value, 0)) + { + t = array_variable_name (value, 0, (char **)NULL, (int *)NULL); + if (t && STREQ (name, t)) + { + free (t); + return 1; + } + free (t); + } +#endif + + return 0; /* not a self reference */ +} + +/* Make sure that WORD is a valid shell identifier, i.e. + does not contain a dollar sign, nor is quoted in any way. + If CHECK_WORD is non-zero, + the word is checked to ensure that it consists of only letters, + digits, and underscores, and does not consist of all digits. */ +int +check_identifier (word, check_word) + WORD_DESC *word; + int check_word; +{ + if (word->flags & (W_HASDOLLAR|W_QUOTED)) /* XXX - HASDOLLAR? */ + { + internal_error (_("`%s': not a valid identifier"), word->word); + return (0); + } + else if (check_word && (all_digits (word->word) || legal_identifier (word->word) == 0)) + { + internal_error (_("`%s': not a valid identifier"), word->word); + return (0); + } + else + return (1); +} + +/* Return 1 if STRING is a function name that the shell will import from + the environment. Currently we reject attempts to import shell functions + containing slashes, beginning with newlines or containing blanks. In + Posix mode, we require that STRING be a valid shell identifier. Not + used yet. */ +int +importable_function_name (string, len) + const char *string; + size_t len; +{ + if (absolute_program (string)) /* don't allow slash */ + return 0; + if (*string == '\n') /* can't start with a newline */ + return 0; + if (shellblank (*string) || shellblank(string[len-1])) + return 0; + return (posixly_correct ? legal_identifier (string) : 1); +} + +int +exportable_function_name (string) + const char *string; +{ + if (absolute_program (string)) + return 0; + if (mbschr (string, '=') != 0) + return 0; + return 1; +} + +/* Return 1 if STRING comprises a valid alias name. The shell accepts + essentially all characters except those which must be quoted to the + parser (which disqualifies them from alias expansion anyway) and `/'. */ +int +legal_alias_name (string, flags) + const char *string; + int flags; +{ + register const char *s; + + for (s = string; *s; s++) + if (shellbreak (*s) || shellxquote (*s) || shellexp (*s) || (*s == '/')) + return 0; + return 1; +} + +/* Returns non-zero if STRING is an assignment statement. The returned value + is the index of the `=' sign. If FLAGS&1 we are expecting a compound assignment + and require an array subscript before the `=' to denote an assignment + statement. */ +int +assignment (string, flags) + const char *string; + int flags; +{ + register unsigned char c; + register int newi, indx; + + c = string[indx = 0]; + +#if defined (ARRAY_VARS) + /* If parser_state includes PST_COMPASSIGN, FLAGS will include 1, so we are + parsing the contents of a compound assignment. If parser_state includes + PST_REPARSE, we are in the middle of an assignment statement and breaking + the words between the parens into words and assignment statements, but + we don't need to check for that right now. Within a compound assignment, + the subscript is required to make the word an assignment statement. If + we don't have a subscript, even if the word is a valid assignment + statement otherwise, we don't want to treat it as one. */ + if ((flags & 1) && c != '[') /* ] */ + return (0); + else if ((flags & 1) == 0 && legal_variable_starter (c) == 0) +#else + if (legal_variable_starter (c) == 0) +#endif + return (0); + + while (c = string[indx]) + { + /* The following is safe. Note that '=' at the start of a word + is not an assignment statement. */ + if (c == '=') + return (indx); + +#if defined (ARRAY_VARS) + if (c == '[') + { + newi = skipsubscript (string, indx, (flags & 2) ? 1 : 0); + /* XXX - why not check for blank subscripts here, if we do in + valid_array_reference? */ + if (string[newi++] != ']') + return (0); + if (string[newi] == '+' && string[newi+1] == '=') + return (newi + 1); + return ((string[newi] == '=') ? newi : 0); + } +#endif /* ARRAY_VARS */ + + /* Check for `+=' */ + if (c == '+' && string[indx+1] == '=') + return (indx + 1); + + /* Variable names in assignment statements may contain only letters, + digits, and `_'. */ + if (legal_variable_char (c) == 0) + return (0); + + indx++; + } + return (0); +} + +int +line_isblank (line) + const char *line; +{ + register int i; + + if (line == 0) + return 0; /* XXX */ + for (i = 0; line[i]; i++) + if (isblank ((unsigned char)line[i]) == 0) + break; + return (line[i] == '\0'); +} + +/* **************************************************************** */ +/* */ +/* Functions to manage files and file descriptors */ +/* */ +/* **************************************************************** */ + +/* A function to unset no-delay mode on a file descriptor. Used in shell.c + to unset it on the fd passed as stdin. Should be called on stdin if + readline gets an EAGAIN or EWOULDBLOCK when trying to read input. */ + +#if !defined (O_NDELAY) +# if defined (FNDELAY) +# define O_NDELAY FNDELAY +# endif +#endif /* O_NDELAY */ + +/* Make sure no-delay mode is not set on file descriptor FD. */ +int +sh_unset_nodelay_mode (fd) + int fd; +{ + int flags, bflags; + + if ((flags = fcntl (fd, F_GETFL, 0)) < 0) + return -1; + + bflags = 0; + + /* This is defined to O_NDELAY in filecntl.h if O_NONBLOCK is not present + and O_NDELAY is defined. */ +#ifdef O_NONBLOCK + bflags |= O_NONBLOCK; +#endif + +#ifdef O_NDELAY + bflags |= O_NDELAY; +#endif + + if (flags & bflags) + { + flags &= ~bflags; + return (fcntl (fd, F_SETFL, flags)); + } + + return 0; +} + +/* Just a wrapper for the define in include/filecntl.h */ +int +sh_setclexec (fd) + int fd; +{ + return (SET_CLOSE_ON_EXEC (fd)); +} + +/* Return 1 if file descriptor FD is valid; 0 otherwise. */ +int +sh_validfd (fd) + int fd; +{ + return (fcntl (fd, F_GETFD, 0) >= 0); +} + +int +fd_ispipe (fd) + int fd; +{ + errno = 0; + return ((lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE)); +} + +/* There is a bug in the NeXT 2.1 rlogind that causes opens + of /dev/tty to fail. */ + +#if defined (__BEOS__) +/* On BeOS, opening in non-blocking mode exposes a bug in BeOS, so turn it + into a no-op. This should probably go away in the future. */ +# undef O_NONBLOCK +# define O_NONBLOCK 0 +#endif /* __BEOS__ */ + +void +check_dev_tty () +{ + int tty_fd; + char *tty; + + tty_fd = open ("/dev/tty", O_RDWR|O_NONBLOCK); + + if (tty_fd < 0) + { + tty = (char *)ttyname (fileno (stdin)); + if (tty == 0) + return; + tty_fd = open (tty, O_RDWR|O_NONBLOCK); + } + if (tty_fd >= 0) + close (tty_fd); +} + +/* Return 1 if PATH1 and PATH2 are the same file. This is kind of + expensive. If non-NULL STP1 and STP2 point to stat structures + corresponding to PATH1 and PATH2, respectively. */ +int +same_file (path1, path2, stp1, stp2) + const char *path1, *path2; + struct stat *stp1, *stp2; +{ + struct stat st1, st2; + + if (stp1 == NULL) + { + if (stat (path1, &st1) != 0) + return (0); + stp1 = &st1; + } + + if (stp2 == NULL) + { + if (stat (path2, &st2) != 0) + return (0); + stp2 = &st2; + } + + return ((stp1->st_dev == stp2->st_dev) && (stp1->st_ino == stp2->st_ino)); +} + +/* Move FD to a number close to the maximum number of file descriptors + allowed in the shell process, to avoid the user stepping on it with + redirection and causing us extra work. If CHECK_NEW is non-zero, + we check whether or not the file descriptors are in use before + duplicating FD onto them. MAXFD says where to start checking the + file descriptors. If it's less than 20, we get the maximum value + available from getdtablesize(2). */ +int +move_to_high_fd (fd, check_new, maxfd) + int fd, check_new, maxfd; +{ + int script_fd, nfds, ignore; + + if (maxfd < 20) + { + nfds = getdtablesize (); + if (nfds <= 0) + nfds = 20; + if (nfds > HIGH_FD_MAX) + nfds = HIGH_FD_MAX; /* reasonable maximum */ + } + else + nfds = maxfd; + + for (nfds--; check_new && nfds > 3; nfds--) + if (fcntl (nfds, F_GETFD, &ignore) == -1) + break; + + if (nfds > 3 && fd != nfds && (script_fd = dup2 (fd, nfds)) != -1) + { + if (check_new == 0 || fd != fileno (stderr)) /* don't close stderr */ + close (fd); + return (script_fd); + } + + /* OK, we didn't find one less than our artificial maximum; return the + original file descriptor. */ + return (fd); +} + +/* Return non-zero if the characters from SAMPLE are not all valid + characters to be found in the first line of a shell script. We + check up to the first newline, or SAMPLE_LEN, whichever comes first. + All of the characters must be printable or whitespace. */ + +int +check_binary_file (sample, sample_len) + const char *sample; + int sample_len; +{ + register int i; + unsigned char c; + + for (i = 0; i < sample_len; i++) + { + c = sample[i]; + if (c == '\n') + return (0); + if (c == '\0') + return (1); + } + + return (0); +} + +/* **************************************************************** */ +/* */ +/* Functions to manipulate pipes */ +/* */ +/* **************************************************************** */ + +int +sh_openpipe (pv) + int *pv; +{ + int r; + + if ((r = pipe (pv)) < 0) + return r; + + pv[0] = move_to_high_fd (pv[0], 1, 64); + pv[1] = move_to_high_fd (pv[1], 1, 64); + + return 0; +} + +int +sh_closepipe (pv) + int *pv; +{ + if (pv[0] >= 0) + close (pv[0]); + + if (pv[1] >= 0) + close (pv[1]); + + pv[0] = pv[1] = -1; + return 0; +} + +/* **************************************************************** */ +/* */ +/* Functions to inspect pathnames */ +/* */ +/* **************************************************************** */ + +int +file_exists (fn) + const char *fn; +{ + struct stat sb; + + return (stat (fn, &sb) == 0); +} + +int +file_isdir (fn) + const char *fn; +{ + struct stat sb; + + return ((stat (fn, &sb) == 0) && S_ISDIR (sb.st_mode)); +} + +int +file_iswdir (fn) + const char *fn; +{ + return (file_isdir (fn) && sh_eaccess (fn, W_OK) == 0); +} + +/* Return 1 if STRING is "." or "..", optionally followed by a directory + separator */ +int +path_dot_or_dotdot (string) + const char *string; +{ + if (string == 0 || *string == '\0' || *string != '.') + return (0); + + /* string[0] == '.' */ + if (PATHSEP(string[1]) || (string[1] == '.' && PATHSEP(string[2]))) + return (1); + + return (0); +} + +/* Return 1 if STRING contains an absolute pathname, else 0. Used by `cd' + to decide whether or not to look up a directory name in $CDPATH. */ +int +absolute_pathname (string) + const char *string; +{ + if (string == 0 || *string == '\0') + return (0); + + if (ABSPATH(string)) + return (1); + + if (string[0] == '.' && PATHSEP(string[1])) /* . and ./ */ + return (1); + + if (string[0] == '.' && string[1] == '.' && PATHSEP(string[2])) /* .. and ../ */ + return (1); + + return (0); +} + +/* Return 1 if STRING is an absolute program name; it is absolute if it + contains any slashes. This is used to decide whether or not to look + up through $PATH. */ +int +absolute_program (string) + const char *string; +{ + return ((char *)mbschr (string, '/') != (char *)NULL); +} + +/* **************************************************************** */ +/* */ +/* Functions to manipulate pathnames */ +/* */ +/* **************************************************************** */ + +/* Turn STRING (a pathname) into an absolute pathname, assuming that + DOT_PATH contains the symbolic location of `.'. This always + returns a new string, even if STRING was an absolute pathname to + begin with. */ +char * +make_absolute (string, dot_path) + const char *string, *dot_path; +{ + char *result; + + if (dot_path == 0 || ABSPATH(string)) +#ifdef __CYGWIN__ + { + char pathbuf[PATH_MAX + 1]; + + /* WAS cygwin_conv_to_full_posix_path (string, pathbuf); */ + cygwin_conv_path (CCP_WIN_A_TO_POSIX, string, pathbuf, PATH_MAX); + result = savestring (pathbuf); + } +#else + result = savestring (string); +#endif + else + result = sh_makepath (dot_path, string, 0); + + return (result); +} + +/* Return the `basename' of the pathname in STRING (the stuff after the + last '/'). If STRING is `/', just return it. */ +char * +base_pathname (string) + char *string; +{ + char *p; + +#if 0 + if (absolute_pathname (string) == 0) + return (string); +#endif + + if (string[0] == '/' && string[1] == 0) + return (string); + + p = (char *)strrchr (string, '/'); + return (p ? ++p : string); +} + +/* Return the full pathname of FILE. Easy. Filenames that begin + with a '/' are returned as themselves. Other filenames have + the current working directory prepended. A new string is + returned in either case. */ +char * +full_pathname (file) + char *file; +{ + char *ret; + + file = (*file == '~') ? bash_tilde_expand (file, 0) : savestring (file); + + if (ABSPATH(file)) + return (file); + + ret = sh_makepath ((char *)NULL, file, (MP_DOCWD|MP_RMDOT)); + free (file); + + return (ret); +} + +/* A slightly related function. Get the prettiest name of this + directory possible. */ +static char tdir[PATH_MAX]; + +/* Return a pretty pathname. If the first part of the pathname is + the same as $HOME, then replace that with `~'. */ +char * +polite_directory_format (name) + char *name; +{ + char *home; + int l; + + home = get_string_value ("HOME"); + l = home ? strlen (home) : 0; + if (l > 1 && strncmp (home, name, l) == 0 && (!name[l] || name[l] == '/')) + { + strncpy (tdir + 1, name + l, sizeof(tdir) - 2); + tdir[0] = '~'; + tdir[sizeof(tdir) - 1] = '\0'; + return (tdir); + } + else + return (name); +} + +/* Trim NAME. If NAME begins with `~/', skip over tilde prefix. Trim to + keep any tilde prefix and PROMPT_DIRTRIM trailing directory components + and replace the intervening characters with `...' */ +char * +trim_pathname (name, maxlen) + char *name; + int maxlen; +{ + int nlen, ndirs; + intmax_t nskip; + char *nbeg, *nend, *ntail, *v; + + if (name == 0 || (nlen = strlen (name)) == 0) + return name; + nend = name + nlen; + + v = get_string_value ("PROMPT_DIRTRIM"); + if (v == 0 || *v == 0) + return name; + if (legal_number (v, &nskip) == 0 || nskip <= 0) + return name; + + /* Skip over tilde prefix */ + nbeg = name; + if (name[0] == '~') + for (nbeg = name; *nbeg; nbeg++) + if (*nbeg == '/') + { + nbeg++; + break; + } + if (*nbeg == 0) + return name; + + for (ndirs = 0, ntail = nbeg; *ntail; ntail++) + if (*ntail == '/') + ndirs++; + if (ndirs < nskip) + return name; + + for (ntail = (*nend == '/') ? nend : nend - 1; ntail > nbeg; ntail--) + { + if (*ntail == '/') + nskip--; + if (nskip == 0) + break; + } + if (ntail == nbeg) + return name; + + /* Now we want to return name[0..nbeg]+"..."+ntail, modifying name in place */ + nlen = ntail - nbeg; + if (nlen <= 3) + return name; + + *nbeg++ = '.'; + *nbeg++ = '.'; + *nbeg++ = '.'; + + nlen = nend - ntail; + memmove (nbeg, ntail, nlen); + nbeg[nlen] = '\0'; + + return name; +} + +/* Return a printable representation of FN without special characters. The + caller is responsible for freeing memory if this returns something other + than its argument. If FLAGS is non-zero, we are printing for portable + re-input and should single-quote filenames appropriately. */ +char * +printable_filename (fn, flags) + char *fn; + int flags; +{ + char *newf; + + if (ansic_shouldquote (fn)) + newf = ansic_quote (fn, 0, NULL); + else if (flags && sh_contains_shell_metas (fn)) + newf = sh_single_quote (fn); + else + newf = fn; + + return newf; +} + +/* Given a string containing units of information separated by colons, + return the next one pointed to by (P_INDEX), or NULL if there are no more. + Advance (P_INDEX) to the character after the colon. */ +char * +extract_colon_unit (string, p_index) + char *string; + int *p_index; +{ + int i, start, len; + char *value; + + if (string == 0) + return (string); + + len = strlen (string); + if (*p_index >= len) + return ((char *)NULL); + + i = *p_index; + + /* Each call to this routine leaves the index pointing at a colon if + there is more to the path. If I is > 0, then increment past the + `:'. If I is 0, then the path has a leading colon. Trailing colons + are handled OK by the `else' part of the if statement; an empty + string is returned in that case. */ + if (i && string[i] == ':') + i++; + + for (start = i; string[i] && string[i] != ':'; i++) + ; + + *p_index = i; + + if (i == start) + { + if (string[i]) + (*p_index)++; + /* Return "" in the case of a trailing `:'. */ + value = (char *)xmalloc (1); + value[0] = '\0'; + } + else + value = substring (string, start, i); + + return (value); +} + +/* **************************************************************** */ +/* */ +/* Tilde Initialization and Expansion */ +/* */ +/* **************************************************************** */ + +#if defined (PUSHD_AND_POPD) +extern char *get_dirstack_from_string PARAMS((char *)); +#endif + +static char **bash_tilde_prefixes; +static char **bash_tilde_prefixes2; +static char **bash_tilde_suffixes; +static char **bash_tilde_suffixes2; + +/* If tilde_expand hasn't been able to expand the text, perhaps it + is a special shell expansion. This function is installed as the + tilde_expansion_preexpansion_hook. It knows how to expand ~- and ~+. + If PUSHD_AND_POPD is defined, ~[+-]N expands to directories from the + directory stack. */ +static char * +bash_special_tilde_expansions (text) + char *text; +{ + char *result; + + result = (char *)NULL; + + if (text[0] == '+' && text[1] == '\0') + result = get_string_value ("PWD"); + else if (text[0] == '-' && text[1] == '\0') + result = get_string_value ("OLDPWD"); +#if defined (PUSHD_AND_POPD) + else if (DIGIT (*text) || ((*text == '+' || *text == '-') && DIGIT (text[1]))) + result = get_dirstack_from_string (text); +#endif + + return (result ? savestring (result) : (char *)NULL); +} + +/* Initialize the tilde expander. In Bash, we handle `~-' and `~+', as + well as handling special tilde prefixes; `:~" and `=~' are indications + that we should do tilde expansion. */ +void +tilde_initialize () +{ + static int times_called = 0; + + /* Tell the tilde expander that we want a crack first. */ + tilde_expansion_preexpansion_hook = bash_special_tilde_expansions; + + /* Tell the tilde expander about special strings which start a tilde + expansion, and the special strings that end one. Only do this once. + tilde_initialize () is called from within bashline_reinitialize (). */ + if (times_called++ == 0) + { + bash_tilde_prefixes = strvec_create (3); + bash_tilde_prefixes[0] = "=~"; + bash_tilde_prefixes[1] = ":~"; + bash_tilde_prefixes[2] = (char *)NULL; + + bash_tilde_prefixes2 = strvec_create (2); + bash_tilde_prefixes2[0] = ":~"; + bash_tilde_prefixes2[1] = (char *)NULL; + + tilde_additional_prefixes = bash_tilde_prefixes; + + bash_tilde_suffixes = strvec_create (3); + bash_tilde_suffixes[0] = ":"; + bash_tilde_suffixes[1] = "=~"; /* XXX - ?? */ + bash_tilde_suffixes[2] = (char *)NULL; + + tilde_additional_suffixes = bash_tilde_suffixes; + + bash_tilde_suffixes2 = strvec_create (2); + bash_tilde_suffixes2[0] = ":"; + bash_tilde_suffixes2[1] = (char *)NULL; + } +} + +/* POSIX.2, 3.6.1: A tilde-prefix consists of an unquoted tilde character + at the beginning of the word, followed by all of the characters preceding + the first unquoted slash in the word, or all the characters in the word + if there is no slash...If none of the characters in the tilde-prefix are + quoted, the characters in the tilde-prefix following the tilde shell be + treated as a possible login name. */ + +#define TILDE_END(c) ((c) == '\0' || (c) == '/' || (c) == ':') + +static int +unquoted_tilde_word (s) + const char *s; +{ + const char *r; + + for (r = s; TILDE_END(*r) == 0; r++) + { + switch (*r) + { + case '\\': + case '\'': + case '"': + return 0; + } + } + return 1; +} + +/* Find the end of the tilde-prefix starting at S, and return the tilde + prefix in newly-allocated memory. Return the length of the string in + *LENP. FLAGS tells whether or not we're in an assignment context -- + if so, `:' delimits the end of the tilde prefix as well. */ +char * +bash_tilde_find_word (s, flags, lenp) + const char *s; + int flags, *lenp; +{ + const char *r; + char *ret; + int l; + + for (r = s; *r && *r != '/'; r++) + { + /* Short-circuit immediately if we see a quote character. Even though + POSIX says that `the first unquoted slash' (or `:') terminates the + tilde-prefix, in practice, any quoted portion of the tilde prefix + will cause it to not be expanded. */ + if (*r == '\\' || *r == '\'' || *r == '"') + { + ret = savestring (s); + if (lenp) + *lenp = 0; + return ret; + } + else if (flags && *r == ':') + break; + } + l = r - s; + ret = xmalloc (l + 1); + strncpy (ret, s, l); + ret[l] = '\0'; + if (lenp) + *lenp = l; + return ret; +} + +/* Tilde-expand S by running it through the tilde expansion library. + ASSIGN_P is 1 if this is a variable assignment, so the alternate + tilde prefixes should be enabled (`=~' and `:~', see above). If + ASSIGN_P is 2, we are expanding the rhs of an assignment statement, + so `=~' is not valid. */ +char * +bash_tilde_expand (s, assign_p) + const char *s; + int assign_p; +{ + int r; + char *ret; + + tilde_additional_prefixes = assign_p == 0 ? (char **)0 + : (assign_p == 2 ? bash_tilde_prefixes2 : bash_tilde_prefixes); + if (assign_p == 2) + tilde_additional_suffixes = bash_tilde_suffixes2; + + r = (*s == '~') ? unquoted_tilde_word (s) : 1; + ret = r ? tilde_expand (s) : savestring (s); + + QUIT; + + return (ret); +} + +/* **************************************************************** */ +/* */ +/* Functions to manipulate and search the group list */ +/* */ +/* **************************************************************** */ + +static int ngroups, maxgroups; + +/* The set of groups that this user is a member of. */ +static GETGROUPS_T *group_array = (GETGROUPS_T *)NULL; + +#if !defined (NOGROUP) +# define NOGROUP (gid_t) -1 +#endif + +static void +initialize_group_array () +{ + register int i; + + if (maxgroups == 0) + maxgroups = getmaxgroups (); + + ngroups = 0; + group_array = (GETGROUPS_T *)xrealloc (group_array, maxgroups * sizeof (GETGROUPS_T)); + +#if defined (HAVE_GETGROUPS) + ngroups = getgroups (maxgroups, group_array); +#endif + + /* If getgroups returns nothing, or the OS does not support getgroups(), + make sure the groups array includes at least the current gid. */ + if (ngroups == 0) + { + group_array[0] = current_user.gid; + ngroups = 1; + } + + /* If the primary group is not in the groups array, add it as group_array[0] + and shuffle everything else up 1, if there's room. */ + for (i = 0; i < ngroups; i++) + if (current_user.gid == (gid_t)group_array[i]) + break; + if (i == ngroups && ngroups < maxgroups) + { + for (i = ngroups; i > 0; i--) + group_array[i] = group_array[i - 1]; + group_array[0] = current_user.gid; + ngroups++; + } + + /* If the primary group is not group_array[0], swap group_array[0] and + whatever the current group is. The vast majority of systems should + not need this; a notable exception is Linux. */ + if (group_array[0] != current_user.gid) + { + for (i = 0; i < ngroups; i++) + if (group_array[i] == current_user.gid) + break; + if (i < ngroups) + { + group_array[i] = group_array[0]; + group_array[0] = current_user.gid; + } + } +} + +/* Return non-zero if GID is one that we have in our groups list. */ +int +#if defined (__STDC__) || defined ( _MINIX) +group_member (gid_t gid) +#else +group_member (gid) + gid_t gid; +#endif /* !__STDC__ && !_MINIX */ +{ +#if defined (HAVE_GETGROUPS) + register int i; +#endif + + /* Short-circuit if possible, maybe saving a call to getgroups(). */ + if (gid == current_user.gid || gid == current_user.egid) + return (1); + +#if defined (HAVE_GETGROUPS) + if (ngroups == 0) + initialize_group_array (); + + /* In case of error, the user loses. */ + if (ngroups <= 0) + return (0); + + /* Search through the list looking for GID. */ + for (i = 0; i < ngroups; i++) + if (gid == (gid_t)group_array[i]) + return (1); +#endif + + return (0); +} + +char ** +get_group_list (ngp) + int *ngp; +{ + static char **group_vector = (char **)NULL; + register int i; + + if (group_vector) + { + if (ngp) + *ngp = ngroups; + return group_vector; + } + + if (ngroups == 0) + initialize_group_array (); + + if (ngroups <= 0) + { + if (ngp) + *ngp = 0; + return (char **)NULL; + } + + group_vector = strvec_create (ngroups); + for (i = 0; i < ngroups; i++) + group_vector[i] = itos (group_array[i]); + + if (ngp) + *ngp = ngroups; + return group_vector; +} + +int * +get_group_array (ngp) + int *ngp; +{ + int i; + static int *group_iarray = (int *)NULL; + + if (group_iarray) + { + if (ngp) + *ngp = ngroups; + return (group_iarray); + } + + if (ngroups == 0) + initialize_group_array (); + + if (ngroups <= 0) + { + if (ngp) + *ngp = 0; + return (int *)NULL; + } + + group_iarray = (int *)xmalloc (ngroups * sizeof (int)); + for (i = 0; i < ngroups; i++) + group_iarray[i] = (int)group_array[i]; + + if (ngp) + *ngp = ngroups; + return group_iarray; +} + +/* **************************************************************** */ +/* */ +/* Miscellaneous functions */ +/* */ +/* **************************************************************** */ + +/* Return a value for PATH that is guaranteed to find all of the standard + utilities. This uses Posix.2 configuration variables, if present. It + uses a value defined in config.h as a last resort. */ +char * +conf_standard_path () +{ +#if defined (_CS_PATH) && defined (HAVE_CONFSTR) + char *p; + size_t len; + + len = (size_t)confstr (_CS_PATH, (char *)NULL, (size_t)0); + if (len > 0) + { + p = (char *)xmalloc (len + 2); + *p = '\0'; + confstr (_CS_PATH, p, len); + return (p); + } + else + return (savestring (STANDARD_UTILS_PATH)); +#else /* !_CS_PATH || !HAVE_CONFSTR */ +# if defined (CS_PATH) + return (savestring (CS_PATH)); +# else + return (savestring (STANDARD_UTILS_PATH)); +# endif /* !CS_PATH */ +#endif /* !_CS_PATH || !HAVE_CONFSTR */ +} + +int +default_columns () +{ + char *v; + int c; + + c = -1; + v = get_string_value ("COLUMNS"); + if (v && *v) + { + c = atoi (v); + if (c > 0) + return c; + } + + if (check_window_size) + get_new_window_size (0, (int *)0, &c); + + return (c > 0 ? c : 80); +} + + diff --git a/bash-5.1/general.h b/bash-5.1/general.h new file mode 100644 index 0000000000000000000000000000000000000000..7e4db8e6796691f2ae0aef1b98f8c97b5993d0ef --- /dev/null +++ b/bash-5.1/general.h @@ -0,0 +1,371 @@ +/* general.h -- defines that everybody likes to use. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_GENERAL_H_) +#define _GENERAL_H_ + +#include "stdc.h" + +#include "bashtypes.h" +#include "chartypes.h" + +#if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE) +# if defined (HAVE_SYS_TIME_H) +# include +# endif +# include +#endif + +#if defined (HAVE_STRING_H) +# include +#else +# include +#endif /* !HAVE_STRING_H */ + +#if defined (HAVE_LIMITS_H) +# include +#endif + +#include "xmalloc.h" + +/* NULL pointer type. */ +#if !defined (NULL) +# if defined (__STDC__) +# define NULL ((void *) 0) +# else +# define NULL 0x0 +# endif /* !__STDC__ */ +#endif /* !NULL */ + +/* Hardly used anymore */ +#define pointer_to_int(x) (int)((char *)x - (char *)0) + +#if defined (alpha) && defined (__GNUC__) && !defined (strchr) && !defined (__STDC__) +extern char *strchr (), *strrchr (); +#endif + +#if !defined (strcpy) && (defined (HAVE_DECL_STRCPY) && !HAVE_DECL_STRCPY) +extern char *strcpy PARAMS((char *, const char *)); +#endif + +#if !defined (savestring) +# define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x)) +#endif + +#ifndef member +# define member(c, s) ((c) ? ((char *)mbschr ((s), (c)) != (char *)NULL) : 0) +#endif + +#ifndef whitespace +#define whitespace(c) (((c) == ' ') || ((c) == '\t')) +#endif + +#ifndef CHAR_MAX +# ifdef __CHAR_UNSIGNED__ +# define CHAR_MAX 0xff +# else +# define CHAR_MAX 0x7f +# endif +#endif + +#ifndef CHAR_BIT +# define CHAR_BIT 8 +#endif + +/* Nonzero if the integer type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* The width in bits of the integer type or expression T. + Padding bits are not supported; this is checked at compile-time below. */ +#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) + +/* Bound on length of the string representing an unsigned integer + value representable in B bits. log10 (2.0) < 146/485. The + smallest value of B where this bound is not tight is 2621. */ +#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) + +/* Bound on length of the string representing an integer value of type T. + Subtract one for the sign bit if T is signed; + 302 / 1000 is log10 (2) rounded up; + add one for integer division truncation; + add one more for a minus sign if t is signed. */ +#define INT_STRLEN_BOUND(t) \ + ((TYPE_WIDTH (t) - TYPE_SIGNED (t)) * 302 / 1000 \ + + 1 + TYPE_SIGNED (t)) + +/* Updated version adapted from gnulib/intprops.h, not used right now. + Changes the approximation of log10(2) from 302/1000 to 146/485. */ +#if 0 +#define INT_STRLEN_BOUND(t) \ + (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - TYPE_SIGNED (t)) + TYPE_SIGNED(t)) +#endif + +/* Bound on buffer size needed to represent an integer type or expression T, + including the terminating null. */ +#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) + +/* Define exactly what a legal shell identifier consists of. */ +#define legal_variable_starter(c) (ISALPHA(c) || (c == '_')) +#define legal_variable_char(c) (ISALNUM(c) || c == '_') + +/* Definitions used in subst.c and by the `read' builtin for field + splitting. */ +#define spctabnl(c) ((c) == ' ' || (c) == '\t' || (c) == '\n') + +/* All structs which contain a `next' field should have that field + as the first field in the struct. This means that functions + can be written to handle the general case for linked lists. */ +typedef struct g_list { + struct g_list *next; +} GENERIC_LIST; + +/* Here is a generic structure for associating character strings + with integers. It is used in the parser for shell tokenization. */ +typedef struct { + char *word; + int token; +} STRING_INT_ALIST; + +/* A macro to avoid making an unnecessary function call. */ +#define REVERSE_LIST(list, type) \ + ((list && list->next) ? (type)list_reverse ((GENERIC_LIST *)list) \ + : (type)(list)) + +#if __GNUC__ > 1 +# define FASTCOPY(s, d, n) __builtin_memcpy ((d), (s), (n)) +#else /* !__GNUC__ */ +# if !defined (HAVE_BCOPY) +# if !defined (HAVE_MEMMOVE) +# define FASTCOPY(s, d, n) memcpy ((d), (s), (n)) +# else +# define FASTCOPY(s, d, n) memmove ((d), (s), (n)) +# endif /* !HAVE_MEMMOVE */ +# else /* HAVE_BCOPY */ +# define FASTCOPY(s, d, n) bcopy ((s), (d), (n)) +# endif /* HAVE_BCOPY */ +#endif /* !__GNUC__ */ + +/* String comparisons that possibly save a function call each. */ +#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0) +#define STREQN(a, b, n) ((n == 0) ? (1) \ + : ((a)[0] == (b)[0] && strncmp(a, b, n) == 0)) + +/* More convenience definitions that possibly save system or libc calls. */ +#define STRLEN(s) (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) +#define FREE(s) do { if (s) free (s); } while (0) +#define MEMBER(c, s) (((c) && c == (s)[0] && !(s)[1]) || (member(c, s))) + +/* A fairly hairy macro to check whether an allocated string has more room, + and to resize it using xrealloc if it does not. + STR is the string (char *) + CIND is the current index into the string (int) + ROOM is the amount of additional room we need in the string (int) + CSIZE is the currently-allocated size of STR (int) + SINCR is how much to increment CSIZE before calling xrealloc (int) */ + +#define RESIZE_MALLOCED_BUFFER(str, cind, room, csize, sincr) \ + do { \ + if ((cind) + (room) >= csize) \ + { \ + while ((cind) + (room) >= csize) \ + csize += (sincr); \ + str = xrealloc (str, csize); \ + } \ + } while (0) + +/* Function pointers can be declared as (Function *)foo. */ +#if !defined (_FUNCTION_DEF) +# define _FUNCTION_DEF +typedef int Function (); +typedef void VFunction (); +typedef char *CPFunction (); /* no longer used */ +typedef char **CPPFunction (); /* no longer used */ +#endif /* _FUNCTION_DEF */ + +#ifndef SH_FUNCTION_TYPEDEF +# define SH_FUNCTION_TYPEDEF + +/* Shell function typedefs with prototypes */ +/* `Generic' function pointer typedefs */ + +typedef int sh_intfunc_t PARAMS((int)); +typedef int sh_ivoidfunc_t PARAMS((void)); +typedef int sh_icpfunc_t PARAMS((char *)); +typedef int sh_icppfunc_t PARAMS((char **)); +typedef int sh_iptrfunc_t PARAMS((PTR_T)); + +typedef void sh_voidfunc_t PARAMS((void)); +typedef void sh_vintfunc_t PARAMS((int)); +typedef void sh_vcpfunc_t PARAMS((char *)); +typedef void sh_vcppfunc_t PARAMS((char **)); +typedef void sh_vptrfunc_t PARAMS((PTR_T)); + +typedef int sh_wdesc_func_t PARAMS((WORD_DESC *)); +typedef int sh_wlist_func_t PARAMS((WORD_LIST *)); + +typedef int sh_glist_func_t PARAMS((GENERIC_LIST *)); + +typedef char *sh_string_func_t PARAMS((char *)); /* like savestring, et al. */ + +typedef int sh_msg_func_t PARAMS((const char *, ...)); /* printf(3)-like */ +typedef void sh_vmsg_func_t PARAMS((const char *, ...)); /* printf(3)-like */ + +/* Specific function pointer typedefs. Most of these could be done + with #defines. */ +typedef void sh_sv_func_t PARAMS((char *)); /* sh_vcpfunc_t */ +typedef void sh_free_func_t PARAMS((PTR_T)); /* sh_vptrfunc_t */ +typedef void sh_resetsig_func_t PARAMS((int)); /* sh_vintfunc_t */ + +typedef int sh_ignore_func_t PARAMS((const char *)); /* sh_icpfunc_t */ + +typedef int sh_assign_func_t PARAMS((const char *)); +typedef int sh_wassign_func_t PARAMS((WORD_DESC *, int)); + +typedef int sh_load_func_t PARAMS((char *)); +typedef void sh_unload_func_t PARAMS((char *)); + +typedef int sh_builtin_func_t PARAMS((WORD_LIST *)); /* sh_wlist_func_t */ + +#endif /* SH_FUNCTION_TYPEDEF */ + +#define NOW ((time_t) time ((time_t *) 0)) +#define GETTIME(tv) gettimeofday(&(tv), NULL) + +/* Some defines for calling file status functions. */ +#define FS_EXISTS 0x1 +#define FS_EXECABLE 0x2 +#define FS_EXEC_PREFERRED 0x4 +#define FS_EXEC_ONLY 0x8 +#define FS_DIRECTORY 0x10 +#define FS_NODIRS 0x20 +#define FS_READABLE 0x40 + +/* Default maximum for move_to_high_fd */ +#define HIGH_FD_MAX 256 + +/* The type of function passed as the fourth argument to qsort(3). */ +#ifdef __STDC__ +typedef int QSFUNC (const void *, const void *); +#else +typedef int QSFUNC (); +#endif + +/* Some useful definitions for Unix pathnames. Argument convention: + x == string, c == character */ + +#if !defined (__CYGWIN__) +# define ABSPATH(x) ((x)[0] == '/') +# define RELPATH(x) ((x)[0] != '/') +#else /* __CYGWIN__ */ +# define ABSPATH(x) (((x)[0] && ISALPHA((unsigned char)(x)[0]) && (x)[1] == ':') || ISDIRSEP((x)[0])) +# define RELPATH(x) (ABSPATH(x) == 0) +#endif /* __CYGWIN__ */ + +#define ROOTEDPATH(x) (ABSPATH(x)) + +#define DIRSEP '/' +#if !defined (__CYGWIN__) +# define ISDIRSEP(c) ((c) == '/') +#else +# define ISDIRSEP(c) ((c) == '/' || (c) == '\\') +#endif /* __CYGWIN__ */ +#define PATHSEP(c) (ISDIRSEP(c) || (c) == 0) + +#define DOT_OR_DOTDOT(s) (s[0] == '.' && (s[1] == 0 || (s[1] == '.' && s[2] == 0))) +#if defined (HANDLE_MULTIBYTE) +#define WDOT_OR_DOTDOT(w) (w[0] == L'.' && (w[1] == L'\0' || (w[1] == L'.' && w[2] == L'\0'))) +#endif + +#if 0 +/* Declarations for functions defined in xmalloc.c */ +extern PTR_T xmalloc PARAMS((size_t)); +extern PTR_T xrealloc PARAMS((void *, size_t)); +extern void xfree PARAMS((void *)); +#endif + +/* Declarations for functions defined in general.c */ +extern void posix_initialize PARAMS((int)); + +extern int num_posix_options PARAMS((void)); +extern char *get_posix_options PARAMS((char *)); +extern void set_posix_options PARAMS((const char *)); + +extern void save_posix_options PARAMS((void)); + +#if defined (RLIMTYPE) +extern RLIMTYPE string_to_rlimtype PARAMS((char *)); +extern void print_rlimtype PARAMS((RLIMTYPE, int)); +#endif + +extern int all_digits PARAMS((const char *)); +extern int legal_number PARAMS((const char *, intmax_t *)); +extern int legal_identifier PARAMS((const char *)); +extern int importable_function_name PARAMS((const char *, size_t)); +extern int exportable_function_name PARAMS((const char *)); +extern int check_identifier PARAMS((WORD_DESC *, int)); +extern int valid_nameref_value PARAMS((const char *, int)); +extern int check_selfref PARAMS((const char *, char *, int)); +extern int legal_alias_name PARAMS((const char *, int)); +extern int line_isblank PARAMS((const char *)); +extern int assignment PARAMS((const char *, int)); + +extern int sh_unset_nodelay_mode PARAMS((int)); +extern int sh_setclexec PARAMS((int)); +extern int sh_validfd PARAMS((int)); +extern int fd_ispipe PARAMS((int)); +extern void check_dev_tty PARAMS((void)); +extern int move_to_high_fd PARAMS((int, int, int)); +extern int check_binary_file PARAMS((const char *, int)); + +#ifdef _POSIXSTAT_H_ +extern int same_file PARAMS((const char *, const char *, struct stat *, struct stat *)); +#endif + +extern int sh_openpipe PARAMS((int *)); +extern int sh_closepipe PARAMS((int *)); + +extern int file_exists PARAMS((const char *)); +extern int file_isdir PARAMS((const char *)); +extern int file_iswdir PARAMS((const char *)); +extern int path_dot_or_dotdot PARAMS((const char *)); +extern int absolute_pathname PARAMS((const char *)); +extern int absolute_program PARAMS((const char *)); + +extern char *make_absolute PARAMS((const char *, const char *)); +extern char *base_pathname PARAMS((char *)); +extern char *full_pathname PARAMS((char *)); +extern char *polite_directory_format PARAMS((char *)); +extern char *trim_pathname PARAMS((char *, int)); +extern char *printable_filename PARAMS((char *, int)); + +extern char *extract_colon_unit PARAMS((char *, int *)); + +extern void tilde_initialize PARAMS((void)); +extern char *bash_tilde_find_word PARAMS((const char *, int, int *)); +extern char *bash_tilde_expand PARAMS((const char *, int)); + +extern int group_member PARAMS((gid_t)); +extern char **get_group_list PARAMS((int *)); +extern int *get_group_array PARAMS((int *)); + +extern char *conf_standard_path PARAMS((void)); +extern int default_columns PARAMS((void)); + +#endif /* _GENERAL_H_ */ diff --git a/bash-5.1/hashcmd.c b/bash-5.1/hashcmd.c new file mode 100644 index 0000000000000000000000000000000000000000..da3af005c206cb160d2e231f347469b285d7f794 --- /dev/null +++ b/bash-5.1/hashcmd.c @@ -0,0 +1,195 @@ +/* hashcmd.c - functions for managing a hash table mapping command names to + full pathnames. */ + +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include "bashtypes.h" +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" + +#include "shell.h" +#include "flags.h" +#include "findcmd.h" +#include "hashcmd.h" + +HASH_TABLE *hashed_filenames = (HASH_TABLE *)NULL; + +static void phash_freedata PARAMS((PTR_T)); + +void +phash_create () +{ + if (hashed_filenames == 0) + hashed_filenames = hash_create (FILENAME_HASH_BUCKETS); +} + +static void +phash_freedata (data) + PTR_T data; +{ + free (((PATH_DATA *)data)->path); + free (data); +} + +void +phash_flush () +{ + if (hashed_filenames) + hash_flush (hashed_filenames, phash_freedata); +} + +/* Remove FILENAME from the table of hashed commands. */ +int +phash_remove (filename) + const char *filename; +{ + register BUCKET_CONTENTS *item; + + if (hashing_enabled == 0 || hashed_filenames == 0) + return 0; + + item = hash_remove (filename, hashed_filenames, 0); + if (item) + { + if (item->data) + phash_freedata (item->data); + free (item->key); + free (item); + return 0; + } + return 1; +} + +/* Place FILENAME (key) and FULL_PATH (data->path) into the + hash table. CHECK_DOT if non-null is for future calls to + phash_search (); it means that this file was found + in a directory in $PATH that is not an absolute pathname. + FOUND is the initial value for times_found. */ +void +phash_insert (filename, full_path, check_dot, found) + char *filename, *full_path; + int check_dot, found; +{ + register BUCKET_CONTENTS *item; + + if (hashing_enabled == 0) + return; + + if (hashed_filenames == 0) + phash_create (); + + item = hash_insert (filename, hashed_filenames, 0); + if (item->data) + free (pathdata(item)->path); + else + { + item->key = savestring (filename); + item->data = xmalloc (sizeof (PATH_DATA)); + } + pathdata(item)->path = savestring (full_path); + pathdata(item)->flags = 0; + if (check_dot) + pathdata(item)->flags |= HASH_CHKDOT; + if (*full_path != '/') + pathdata(item)->flags |= HASH_RELPATH; + item->times_found = found; +} + +/* Return the full pathname that FILENAME hashes to. If FILENAME + is hashed, but (data->flags & HASH_CHKDOT) is non-zero, check + ./FILENAME and return that if it is executable. This always + returns a newly-allocated string; the caller is responsible + for freeing it. */ +char * +phash_search (filename) + const char *filename; +{ + register BUCKET_CONTENTS *item; + char *path, *dotted_filename, *tail; + int same; + + if (hashing_enabled == 0 || hashed_filenames == 0) + return ((char *)NULL); + + item = hash_search (filename, hashed_filenames, 0); + + if (item == NULL) + return ((char *)NULL); + + /* If this filename is hashed, but `.' comes before it in the path, + see if ./filename is executable. If the hashed value is not an + absolute pathname, see if ./`hashed-value' exists. */ + path = pathdata(item)->path; + if (pathdata(item)->flags & (HASH_CHKDOT|HASH_RELPATH)) + { + tail = (pathdata(item)->flags & HASH_RELPATH) ? path : (char *)filename; /* XXX - fix const later */ + /* If the pathname does not start with a `./', add a `./' to it. */ + if (tail[0] != '.' || tail[1] != '/') + { + dotted_filename = (char *)xmalloc (3 + strlen (tail)); + dotted_filename[0] = '.'; dotted_filename[1] = '/'; + strcpy (dotted_filename + 2, tail); + } + else + dotted_filename = savestring (tail); + + if (executable_file (dotted_filename)) + return (dotted_filename); + + free (dotted_filename); + +#if 0 + if (pathdata(item)->flags & HASH_RELPATH) + return ((char *)NULL); +#endif + + /* Watch out. If this file was hashed to "./filename", and + "./filename" is not executable, then return NULL. */ + + /* Since we already know "./filename" is not executable, what + we're really interested in is whether or not the `path' + portion of the hashed filename is equivalent to the current + directory, but only if it starts with a `.'. (This catches + ./. and so on.) same_file () tests general Unix file + equivalence -- same device and inode. */ + if (*path == '.') + { + same = 0; + tail = (char *)strrchr (path, '/'); + + if (tail) + { + *tail = '\0'; + same = same_file (".", path, (struct stat *)NULL, (struct stat *)NULL); + *tail = '/'; + } + + return same ? (char *)NULL : savestring (path); + } + } + + return (savestring (path)); +} diff --git a/bash-5.1/hashcmd.h b/bash-5.1/hashcmd.h new file mode 100644 index 0000000000000000000000000000000000000000..2459f200414c45499311556853dcfdc29afd994e --- /dev/null +++ b/bash-5.1/hashcmd.h @@ -0,0 +1,43 @@ +/* hashcmd.h - Common defines for hashing filenames. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "stdc.h" +#include "hashlib.h" + +#define FILENAME_HASH_BUCKETS 256 /* must be power of two */ + +extern HASH_TABLE *hashed_filenames; + +typedef struct _pathdata { + char *path; /* The full pathname of the file. */ + int flags; +} PATH_DATA; + +#define HASH_RELPATH 0x01 /* this filename is a relative pathname. */ +#define HASH_CHKDOT 0x02 /* check `.' since it was earlier in $PATH */ + +#define pathdata(x) ((PATH_DATA *)(x)->data) + +extern void phash_create PARAMS((void)); +extern void phash_flush PARAMS((void)); + +extern void phash_insert PARAMS((char *, char *, int, int)); +extern int phash_remove PARAMS((const char *)); +extern char *phash_search PARAMS((const char *)); diff --git a/bash-5.1/hashlib.c b/bash-5.1/hashlib.c new file mode 100644 index 0000000000000000000000000000000000000000..4a7e8132bc551b8ac6d926debadb78c11da29f86 --- /dev/null +++ b/bash-5.1/hashlib.c @@ -0,0 +1,545 @@ +/* hashlib.c -- functions to manage and access hash tables for bash. */ + +/* Copyright (C) 1987,1989,1991,1995,1998,2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include "bashansi.h" + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include + +#include "shell.h" +#include "hashlib.h" + +/* tunable constants for rehashing */ +#define HASH_REHASH_MULTIPLIER 4 +#define HASH_REHASH_FACTOR 2 + +#define HASH_SHOULDGROW(table) \ + ((table)->nentries >= (table)->nbuckets * HASH_REHASH_FACTOR) + +/* an initial approximation */ +#define HASH_SHOULDSHRINK(table) \ + (((table)->nbuckets > DEFAULT_HASH_BUCKETS) && \ + ((table)->nentries < (table)->nbuckets / HASH_REHASH_MULTIPLIER)) + +/* Rely on properties of unsigned division (unsigned/int -> unsigned) and + don't discard the upper 32 bits of the value, if present. */ +#define HASH_BUCKET(s, t, h) (((h) = hash_string (s)) & ((t)->nbuckets - 1)) + +static BUCKET_CONTENTS *copy_bucket_array PARAMS((BUCKET_CONTENTS *, sh_string_func_t *)); + +static void hash_rehash PARAMS((HASH_TABLE *, int)); +static void hash_grow PARAMS((HASH_TABLE *)); +static void hash_shrink PARAMS((HASH_TABLE *)); + +/* Make a new hash table with BUCKETS number of buckets. Initialize + each slot in the table to NULL. */ +HASH_TABLE * +hash_create (buckets) + int buckets; +{ + HASH_TABLE *new_table; + register int i; + + new_table = (HASH_TABLE *)xmalloc (sizeof (HASH_TABLE)); + if (buckets == 0) + buckets = DEFAULT_HASH_BUCKETS; + + new_table->bucket_array = + (BUCKET_CONTENTS **)xmalloc (buckets * sizeof (BUCKET_CONTENTS *)); + new_table->nbuckets = buckets; + new_table->nentries = 0; + + for (i = 0; i < buckets; i++) + new_table->bucket_array[i] = (BUCKET_CONTENTS *)NULL; + + return (new_table); +} + +int +hash_size (table) + HASH_TABLE *table; +{ + return (HASH_ENTRIES(table)); +} + +static BUCKET_CONTENTS * +copy_bucket_array (ba, cpdata) + BUCKET_CONTENTS *ba; + sh_string_func_t *cpdata; /* data copy function */ +{ + BUCKET_CONTENTS *new_bucket, *n, *e; + + if (ba == 0) + return ((BUCKET_CONTENTS *)0); + + for (n = (BUCKET_CONTENTS *)0, e = ba; e; e = e->next) + { + if (n == 0) + { + new_bucket = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS)); + n = new_bucket; + } + else + { + n->next = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS)); + n = n->next; + } + + n->key = savestring (e->key); + n->data = e->data ? (cpdata ? (*cpdata) (e->data) : savestring (e->data)) + : NULL; + n->khash = e->khash; + n->times_found = e->times_found; + n->next = (BUCKET_CONTENTS *)NULL; + } + + return new_bucket; +} + +static void +hash_rehash (table, nsize) + HASH_TABLE *table; + int nsize; +{ + int osize, i, j; + BUCKET_CONTENTS **old_bucket_array, *item, *next; + + if (table == NULL || nsize == table->nbuckets) + return; + + osize = table->nbuckets; + old_bucket_array = table->bucket_array; + + table->nbuckets = nsize; + table->bucket_array = (BUCKET_CONTENTS **)xmalloc (table->nbuckets * sizeof (BUCKET_CONTENTS *)); + for (i = 0; i < table->nbuckets; i++) + table->bucket_array[i] = (BUCKET_CONTENTS *)NULL; + + for (j = 0; j < osize; j++) + { + for (item = old_bucket_array[j]; item; item = next) + { + next = item->next; + i = item->khash & (table->nbuckets - 1); + item->next = table->bucket_array[i]; + table->bucket_array[i] = item; + } + } + + free (old_bucket_array); +} + +static void +hash_grow (table) + HASH_TABLE *table; +{ + int nsize; + + nsize = table->nbuckets * HASH_REHASH_MULTIPLIER; + if (nsize > 0) /* overflow */ + hash_rehash (table, nsize); +} + +static void +hash_shrink (table) + HASH_TABLE *table; +{ + int nsize; + + nsize = table->nbuckets / HASH_REHASH_MULTIPLIER; + hash_rehash (table, nsize); +} + +HASH_TABLE * +hash_copy (table, cpdata) + HASH_TABLE *table; + sh_string_func_t *cpdata; +{ + HASH_TABLE *new_table; + int i; + + if (table == 0) + return ((HASH_TABLE *)NULL); + + new_table = hash_create (table->nbuckets); + + for (i = 0; i < table->nbuckets; i++) + new_table->bucket_array[i] = copy_bucket_array (table->bucket_array[i], cpdata); + + new_table->nentries = table->nentries; + return new_table; +} + +/* This is the best 32-bit string hash function I found. It's one of the + Fowler-Noll-Vo family (FNV-1). + + The magic is in the interesting relationship between the special prime + 16777619 (2^24 + 403) and 2^32 and 2^8. */ + +#define FNV_OFFSET 2166136261 +#define FNV_PRIME 16777619 + +/* If you want to use 64 bits, use +FNV_OFFSET 14695981039346656037 +FNV_PRIME 1099511628211 +*/ + +/* The `khash' check below requires that strings that compare equally with + strcmp hash to the same value. */ +unsigned int +hash_string (s) + const char *s; +{ + register unsigned int i; + + for (i = FNV_OFFSET; *s; s++) + { + /* FNV-1a has the XOR first, traditional FNV-1 has the multiply first */ + + /* was i *= FNV_PRIME */ + i += (i<<1) + (i<<4) + (i<<7) + (i<<8) + (i<<24); + i ^= *s; + } + + return i; +} + +/* Return the location of the bucket which should contain the data + for STRING. TABLE is a pointer to a HASH_TABLE. */ + +int +hash_bucket (string, table) + const char *string; + HASH_TABLE *table; +{ + unsigned int h; + + return (HASH_BUCKET (string, table, h)); +} + +/* Return a pointer to the hashed item. If the HASH_CREATE flag is passed, + create a new hash table entry for STRING, otherwise return NULL. */ +BUCKET_CONTENTS * +hash_search (string, table, flags) + const char *string; + HASH_TABLE *table; + int flags; +{ + BUCKET_CONTENTS *list; + int bucket; + unsigned int hv; + + if (table == 0 || ((flags & HASH_CREATE) == 0 && HASH_ENTRIES (table) == 0)) + return (BUCKET_CONTENTS *)NULL; + + bucket = HASH_BUCKET (string, table, hv); + + for (list = table->bucket_array ? table->bucket_array[bucket] : 0; list; list = list->next) + { + /* This is the comparison function */ + if (hv == list->khash && STREQ (list->key, string)) + { + list->times_found++; + return (list); + } + } + + if (flags & HASH_CREATE) + { + if (HASH_SHOULDGROW (table)) + { + hash_grow (table); + bucket = HASH_BUCKET (string, table, hv); + } + + list = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS)); + list->next = table->bucket_array[bucket]; + table->bucket_array[bucket] = list; + + list->data = NULL; + list->key = (char *)string; /* XXX fix later */ + list->khash = hv; + list->times_found = 0; + + table->nentries++; + return (list); + } + + return (BUCKET_CONTENTS *)NULL; +} + +/* Remove the item specified by STRING from the hash table TABLE. + The item removed is returned, so you can free its contents. If + the item isn't in this table NULL is returned. */ +BUCKET_CONTENTS * +hash_remove (string, table, flags) + const char *string; + HASH_TABLE *table; + int flags; +{ + int bucket; + BUCKET_CONTENTS *prev, *temp; + unsigned int hv; + + if (table == 0 || HASH_ENTRIES (table) == 0) + return (BUCKET_CONTENTS *)NULL; + + bucket = HASH_BUCKET (string, table, hv); + prev = (BUCKET_CONTENTS *)NULL; + for (temp = table->bucket_array[bucket]; temp; temp = temp->next) + { + if (hv == temp->khash && STREQ (temp->key, string)) + { + if (prev) + prev->next = temp->next; + else + table->bucket_array[bucket] = temp->next; + + table->nentries--; + return (temp); + } + prev = temp; + } + return ((BUCKET_CONTENTS *) NULL); +} + +/* Create an entry for STRING, in TABLE. If the entry already + exists, then return it (unless the HASH_NOSRCH flag is set). */ +BUCKET_CONTENTS * +hash_insert (string, table, flags) + char *string; + HASH_TABLE *table; + int flags; +{ + BUCKET_CONTENTS *item; + int bucket; + unsigned int hv; + + if (table == 0) + table = hash_create (0); + + item = (flags & HASH_NOSRCH) ? (BUCKET_CONTENTS *)NULL + : hash_search (string, table, 0); + + if (item == 0) + { + if (HASH_SHOULDGROW (table)) + hash_grow (table); + + bucket = HASH_BUCKET (string, table, hv); + + item = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS)); + item->next = table->bucket_array[bucket]; + table->bucket_array[bucket] = item; + + item->data = NULL; + item->key = string; + item->khash = hv; + item->times_found = 0; + + table->nentries++; + } + + return (item); +} + +/* Remove and discard all entries in TABLE. If FREE_DATA is non-null, it + is a function to call to dispose of a hash item's data. Otherwise, + free() is called. */ +void +hash_flush (table, free_data) + HASH_TABLE *table; + sh_free_func_t *free_data; +{ + int i; + register BUCKET_CONTENTS *bucket, *item; + + if (table == 0 || HASH_ENTRIES (table) == 0) + return; + + for (i = 0; i < table->nbuckets; i++) + { + bucket = table->bucket_array[i]; + + while (bucket) + { + item = bucket; + bucket = bucket->next; + + if (free_data) + (*free_data) (item->data); + else + free (item->data); + free (item->key); + free (item); + } + table->bucket_array[i] = (BUCKET_CONTENTS *)NULL; + } + + table->nentries = 0; +} + +/* Free the hash table pointed to by TABLE. */ +void +hash_dispose (table) + HASH_TABLE *table; +{ + free (table->bucket_array); + free (table); +} + +void +hash_walk (table, func) + HASH_TABLE *table; + hash_wfunc *func; +{ + register int i; + BUCKET_CONTENTS *item; + + if (table == 0 || HASH_ENTRIES (table) == 0) + return; + + for (i = 0; i < table->nbuckets; i++) + { + for (item = hash_items (i, table); item; item = item->next) + if ((*func) (item) < 0) + return; + } +} + +#if defined (DEBUG) || defined (TEST_HASHING) +void +hash_pstats (table, name) + HASH_TABLE *table; + char *name; +{ + register int slot, bcount; + register BUCKET_CONTENTS *bc; + + if (name == 0) + name = "unknown hash table"; + + fprintf (stderr, "%s: %d buckets; %d items\n", name, table->nbuckets, table->nentries); + + /* Print out a count of how many strings hashed to each bucket, so we can + see how even the distribution is. */ + for (slot = 0; slot < table->nbuckets; slot++) + { + bc = hash_items (slot, table); + + fprintf (stderr, "\tslot %3d: ", slot); + for (bcount = 0; bc; bc = bc->next) + bcount++; + + fprintf (stderr, "%d\n", bcount); + } +} +#endif + +#ifdef TEST_HASHING + +/* link with xmalloc.o and lib/malloc/libmalloc.a */ +#undef NULL +#include + +#ifndef NULL +#define NULL 0 +#endif + +HASH_TABLE *table, *ntable; + +int interrupt_immediately = 0; +int running_trap = 0; + +int +signal_is_trapped (s) + int s; +{ + return (0); +} + +void +programming_error (const char *format, ...) +{ + abort(); +} + +void +fatal_error (const char *format, ...) +{ + abort(); +} + +void +internal_warning (const char *format, ...) +{ +} + +int +main () +{ + char string[256]; + int count = 0; + BUCKET_CONTENTS *tt; + +#if defined (TEST_NBUCKETS) + table = hash_create (TEST_NBUCKETS); +#else + table = hash_create (0); +#endif + + for (;;) + { + char *temp_string; + if (fgets (string, sizeof (string), stdin) == 0) + break; + if (!*string) + break; + temp_string = savestring (string); + tt = hash_insert (temp_string, table, 0); + if (tt->times_found) + { + fprintf (stderr, "You have already added item `%s'\n", string); + free (temp_string); + } + else + { + count++; + } + } + + hash_pstats (table, "hash test"); + + ntable = hash_copy (table, (sh_string_func_t *)NULL); + hash_flush (table, (sh_free_func_t *)NULL); + hash_pstats (ntable, "hash copy test"); + + exit (0); +} + +#endif /* TEST_HASHING */ diff --git a/bash-5.1/hashlib.h b/bash-5.1/hashlib.h new file mode 100644 index 0000000000000000000000000000000000000000..cf2de9884006aba08e82fb126d18e2e2d47b2f3e --- /dev/null +++ b/bash-5.1/hashlib.h @@ -0,0 +1,92 @@ +/* hashlib.h -- the data structures used in hashing in Bash. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_HASHLIB_H_) +#define _HASHLIB_H_ + +#include "stdc.h" + +#ifndef PTR_T +# ifdef __STDC__ +# define PTR_T void * +# else +# define PTR_T char * +# endif +#endif + +typedef struct bucket_contents { + struct bucket_contents *next; /* Link to next hashed key in this bucket. */ + char *key; /* What we look up. */ + PTR_T data; /* What we really want. */ + unsigned int khash; /* What key hashes to */ + int times_found; /* Number of times this item has been found. */ +} BUCKET_CONTENTS; + +typedef struct hash_table { + BUCKET_CONTENTS **bucket_array; /* Where the data is kept. */ + int nbuckets; /* How many buckets does this table have. */ + int nentries; /* How many entries does this table have. */ +} HASH_TABLE; + +typedef int hash_wfunc PARAMS((BUCKET_CONTENTS *)); + +/* Operations on tables as a whole */ +extern HASH_TABLE *hash_create PARAMS((int)); +extern HASH_TABLE *hash_copy PARAMS((HASH_TABLE *, sh_string_func_t *)); +extern void hash_flush PARAMS((HASH_TABLE *, sh_free_func_t *)); +extern void hash_dispose PARAMS((HASH_TABLE *)); +extern void hash_walk PARAMS((HASH_TABLE *, hash_wfunc *)); + +/* Operations to extract information from or pieces of tables */ +extern int hash_bucket PARAMS((const char *, HASH_TABLE *)); +extern int hash_size PARAMS((HASH_TABLE *)); + +/* Operations on hash table entries */ +extern BUCKET_CONTENTS *hash_search PARAMS((const char *, HASH_TABLE *, int)); +extern BUCKET_CONTENTS *hash_insert PARAMS((char *, HASH_TABLE *, int)); +extern BUCKET_CONTENTS *hash_remove PARAMS((const char *, HASH_TABLE *, int)); + +/* Miscellaneous */ +extern unsigned int hash_string PARAMS((const char *)); + +/* Redefine the function as a macro for speed. */ +#define hash_items(bucket, table) \ + ((table && (bucket < table->nbuckets)) ? \ + table->bucket_array[bucket] : \ + (BUCKET_CONTENTS *)NULL) + +/* Default number of buckets in the hash table. */ +#define DEFAULT_HASH_BUCKETS 128 /* must be power of two */ + +#define HASH_ENTRIES(ht) ((ht) ? (ht)->nentries : 0) + +/* flags for hash_search and hash_insert */ +#define HASH_NOSRCH 0x01 +#define HASH_CREATE 0x02 + +#if !defined (NULL) +# if defined (__STDC__) +# define NULL ((void *) 0) +# else +# define NULL 0x0 +# endif /* !__STDC__ */ +#endif /* !NULL */ + +#endif /* _HASHLIB_H */ diff --git a/bash-5.1/include/ansi_stdlib.h b/bash-5.1/include/ansi_stdlib.h new file mode 100644 index 0000000000000000000000000000000000000000..7dc2ee0cf4990fb54083c2a7349ca4c93e9f79c8 --- /dev/null +++ b/bash-5.1/include/ansi_stdlib.h @@ -0,0 +1,54 @@ +/* ansi_stdlib.h -- An ANSI Standard stdlib.h. */ +/* A minimal stdlib.h containing extern declarations for those functions + that bash uses. */ + +/* Copyright (C) 1993 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_STDLIB_H_) +#define _STDLIB_H_ 1 + +/* String conversion functions. */ +extern int atoi (); + +extern double atof (); +extern double strtod (); + +/* Memory allocation functions. */ +/* Generic pointer type. */ +#ifndef PTR_T + +#if defined (__STDC__) +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* PTR_T */ + +extern PTR_T malloc (); +extern PTR_T realloc (); +extern void free (); + +/* Other miscellaneous functions. */ +extern void abort (); +extern void exit (); +extern char *getenv (); +extern void qsort (); + +#endif /* _STDLIB_H */ diff --git a/bash-5.1/include/chartypes.h b/bash-5.1/include/chartypes.h new file mode 100644 index 0000000000000000000000000000000000000000..098cfb96731f15c1131203cfe7bd0576fb114b61 --- /dev/null +++ b/bash-5.1/include/chartypes.h @@ -0,0 +1,113 @@ +/* chartypes.h -- extend ctype.h */ + +/* Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _SH_CHARTYPES_H +#define _SH_CHARTYPES_H + +#include + +/* Jim Meyering writes: + + "... Some ctype macros are valid only for character codes that + isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when + using /bin/cc or gcc but without giving an ansi option). So, all + ctype uses should be through macros like ISPRINT... If + STDC_HEADERS is defined, then autoconf has verified that the ctype + macros don't need to be guarded with references to isascii. ... + Defining IN_CTYPE_DOMAIN to 1 should let any compiler worth its salt + eliminate the && through constant folding." + Solaris defines some of these symbols so we must undefine them first. */ + +#if STDC_HEADERS || (!defined (isascii) && !HAVE_ISASCII) +# define IN_CTYPE_DOMAIN(c) 1 +#else +# define IN_CTYPE_DOMAIN(c) isascii(c) +#endif + +#if !defined (isspace) && !defined (HAVE_ISSPACE) +# define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\f') +#endif + +#if !defined (isprint) && !defined (HAVE_ISPRINT) +# define isprint(c) (isalpha((unsigned char)c) || isdigit((unsigned char)c) || ispunct((unsigned char)c)) +#endif + +#if defined (isblank) || defined (HAVE_ISBLANK) +# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank ((unsigned char)c)) +#else +# define ISBLANK(c) ((c) == ' ' || (c) == '\t') +#endif + +#if defined (isgraph) || defined (HAVE_ISGRAPH) +# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c)) +#else +# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c) && !isspace ((unsigned char)c)) +#endif + +#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) +# define isxdigit(c) (((c) >= '0' && (c) <= '9') || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) +#endif + +#undef ISPRINT + +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c)) +#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit ((unsigned char)c)) +#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum ((unsigned char)c)) +#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha ((unsigned char)c)) +#define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl ((unsigned char)c)) +#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower ((unsigned char)c)) +#define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct ((unsigned char)c)) +#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace ((unsigned char)c)) +#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper ((unsigned char)c)) +#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit ((unsigned char)c)) + +#define ISLETTER(c) (ISALPHA(c)) + +#define DIGIT(c) ((c) >= '0' && (c) <= '9') + +#define ISWORD(c) (ISLETTER(c) || DIGIT(c) || ((c) == '_')) + +#define HEXVALUE(c) \ + (((c) >= 'a' && (c) <= 'f') \ + ? (c)-'a'+10 \ + : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') + +#ifndef ISOCTAL +# define ISOCTAL(c) ((c) >= '0' && (c) <= '7') +#endif +#define OCTVALUE(c) ((c) - '0') + +#define TODIGIT(c) ((c) - '0') +#define TOCHAR(c) ((c) + '0') + +#define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c)) +#define TOUPPER(c) (ISLOWER(c) ? toupper(c) : (c)) + +#ifndef TOCTRL + /* letter to control char -- ASCII. The TOUPPER is in there so \ce and + \cE will map to the same character in $'...' expansions. */ +# define TOCTRL(x) ((x) == '?' ? 0x7f : (TOUPPER(x) & 0x1f)) +#endif +#ifndef UNCTRL + /* control char to letter -- ASCII */ +# define UNCTRL(x) (TOUPPER(x) ^ 0x40) +#endif + +#endif /* _SH_CHARTYPES_H */ diff --git a/bash-5.1/include/filecntl.h b/bash-5.1/include/filecntl.h new file mode 100644 index 0000000000000000000000000000000000000000..9bcbab8d545cb2fd8518b277d858ed27a55b39c0 --- /dev/null +++ b/bash-5.1/include/filecntl.h @@ -0,0 +1,53 @@ +/* filecntl.h - Definitions to set file descriptors to close-on-exec. */ + +/* Copyright (C) 1993 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_FILECNTL_H_) +#define _FILECNTL_H_ + +#include + +/* Definitions to set file descriptors to close-on-exec, the Posix way. */ +#if !defined (FD_CLOEXEC) +#define FD_CLOEXEC 1 +#endif + +#define FD_NCLOEXEC 0 + +#define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC)) +#define SET_OPEN_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_NCLOEXEC)) + +/* How to open a file in non-blocking mode, the Posix.1 way. */ +#if !defined (O_NONBLOCK) +# if defined (O_NDELAY) +# define O_NONBLOCK O_NDELAY +# else +# define O_NONBLOCK 0 +# endif +#endif + +/* Make sure O_BINARY and O_TEXT are defined to avoid Windows-specific code. */ +#if !defined (O_BINARY) +# define O_BINARY 0 +#endif +#if !defined (O_TEXT) +# define O_TEXT 0 +#endif + +#endif /* ! _FILECNTL_H_ */ diff --git a/bash-5.1/include/gettext.h b/bash-5.1/include/gettext.h new file mode 100644 index 0000000000000000000000000000000000000000..97a1f36d6cbd79795c30c6bd8f5a52ebfbc7c265 --- /dev/null +++ b/bash-5.1/include/gettext.h @@ -0,0 +1,70 @@ +/* Convenience header for conditional use of GNU . + Copyright (C) 1995-1998, 2000-2002, 2008,2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +/* Get declarations of GNU message catalog functions. */ +# include + +#else + +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of a NOP. We don't include + as well because people using "gettext.h" will not include , + and also including would fail on SunOS 4, whereas + is OK. */ +#if defined(__sun) +# include +#endif + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +# define gettext(Msgid) ((const char *) (Msgid)) +# define dgettext(Domainname, Msgid) ((const char *) (Msgid)) +# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define textdomain(Domainname) ((const char *) (Domainname)) +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) +# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) + +#endif + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + +#endif /* _LIBGETTEXT_H */ diff --git a/bash-5.1/include/maxpath.h b/bash-5.1/include/maxpath.h new file mode 100644 index 0000000000000000000000000000000000000000..db2e1fb42e6ed913168932eaf67df7ec53df4932 --- /dev/null +++ b/bash-5.1/include/maxpath.h @@ -0,0 +1,75 @@ +/* maxpath.h - Find out what this system thinks PATH_MAX and NAME_MAX are. */ + +/* Copyright (C) 1993 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_MAXPATH_H_) +#define _MAXPATH_H_ + +/* These values are supposed to be in or one of the files + it includes. */ +#if defined (HAVE_LIMITS_H) +# include +#endif /* !HAVE_LIMITS_H */ + +/* If PATH_MAX is not defined, look for MAXPATHLEN */ +#if !defined (PATH_MAX) +# if defined (HAVE_SYS_PARAM_H) +# include +# define maxpath_param_h +# endif +# if defined (MAXPATHLEN) && !defined (PATH_MAX) +# define PATH_MAX MAXPATHLEN +# endif /* MAXPATHLEN && !PATH_MAX */ +#endif /* !PATH_MAX */ + +/* If NAME_MAX is not defined, look for MAXNAMLEN */ +#if !defined (NAME_MAX) +# if defined (HAVE_SYS_PARAM_H) && !defined (maxpath_param_h) +# include +# endif +# if defined (MAXNAMLEN) && !defined (NAME_MAX) +# define NAME_MAX MAXNAMLEN +# endif /* MAXNAMLEN && !NAME_MAX */ +#endif /* !NAME_MAX */ + +/* Default POSIX values */ +#if !defined (PATH_MAX) && defined (_POSIX_PATH_MAX) +# define PATH_MAX _POSIX_PATH_MAX +#endif + +#if !defined (NAME_MAX) && defined (_POSIX_NAME_MAX) +# define NAME_MAX _POSIX_NAME_MAX +#endif + + +/* Default values */ +#if !defined (PATH_MAX) +# define PATH_MAX 1024 +#endif + +#if !defined (NAME_MAX) +# define NAME_MAX 14 +#endif + +#if PATH_MAX < 1024 +# undef PATH_MAX +# define PATH_MAX 1024 +#endif + +#endif /* _MAXPATH_H_ */ diff --git a/bash-5.1/include/memalloc.h b/bash-5.1/include/memalloc.h new file mode 100644 index 0000000000000000000000000000000000000000..57318b9d31c4845368c390be9d305984b0f9210c --- /dev/null +++ b/bash-5.1/include/memalloc.h @@ -0,0 +1,62 @@ +/* memalloc.h -- consolidate code for including alloca.h or malloc.h and + defining alloca. */ + +/* Copyright (C) 1993 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_MEMALLOC_H_) +# define _MEMALLOC_H_ + +#if defined (sparc) && defined (sun) && !defined (HAVE_ALLOCA_H) +# define HAVE_ALLOCA_H +#endif + +#if defined (__GNUC__) && !defined (HAVE_ALLOCA) +# define HAVE_ALLOCA +#endif + +#if defined (HAVE_ALLOCA_H) && !defined (HAVE_ALLOCA) && !defined (C_ALLOCA) +# define HAVE_ALLOCA +#endif /* HAVE_ALLOCA_H && !HAVE_ALLOCA */ + +#if defined (__GNUC__) && !defined (C_ALLOCA) +# undef alloca +# define alloca __builtin_alloca +#else /* !__GNUC__ || C_ALLOCA */ +# if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA) +# if defined (IBMESA) +# include +# else /* !IBMESA */ +# include +# endif /* !IBMESA */ +# else /* !HAVE_ALLOCA_H || C_ALLOCA */ +# if defined (__hpux) && defined (__STDC__) && !defined (alloca) +extern void *alloca (); +# else +# if !defined (alloca) +# if defined (__STDC__) +extern void *alloca (size_t); +# else +extern char *alloca (); +# endif /* !__STDC__ */ +# endif /* !alloca */ +# endif /* !__hpux || !__STDC__ && !alloca */ +# endif /* !HAVE_ALLOCA_H || C_ALLOCA */ +#endif /* !__GNUC__ || C_ALLOCA */ + +#endif /* _MEMALLOC_H_ */ diff --git a/bash-5.1/include/ocache.h b/bash-5.1/include/ocache.h new file mode 100644 index 0000000000000000000000000000000000000000..c596c272577432951507e6328e393ac725162cfd --- /dev/null +++ b/bash-5.1/include/ocache.h @@ -0,0 +1,133 @@ +/* ocache.h -- a minimal object caching implementation. */ + +/* Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_OCACHE_H_) +#define _OCACHE_H_ 1 + +#ifndef PTR_T + +#if defined (__STDC__) +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* PTR_T */ + +#define OC_MEMSET(memp, xch, nbytes) \ +do { \ + if ((nbytes) <= 32) { \ + register char * mzp = (char *)(memp); \ + unsigned long mctmp = (nbytes); \ + register long mcn; \ + if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \ + switch (mctmp) { \ + case 0: for(;;) { *mzp++ = xch; \ + case 7: *mzp++ = xch; \ + case 6: *mzp++ = xch; \ + case 5: *mzp++ = xch; \ + case 4: *mzp++ = xch; \ + case 3: *mzp++ = xch; \ + case 2: *mzp++ = xch; \ + case 1: *mzp++ = xch; if(mcn <= 0) break; mcn--; } \ + } \ + } else \ + memset ((memp), (xch), (nbytes)); \ +} while(0) + +typedef struct objcache { + PTR_T data; + int cs; /* cache size, number of objects */ + int nc; /* number of cache entries */ +} sh_obj_cache_t; + +/* Create an object cache C of N pointers to OTYPE. */ +#define ocache_create(c, otype, n) \ + do { \ + (c).data = xmalloc((n) * sizeof (otype *)); \ + (c).cs = (n); \ + (c).nc = 0; \ + } while (0) + +/* Destroy an object cache C. */ +#define ocache_destroy(c) \ + do { \ + if ((c).data) \ + xfree ((c).data); \ + (c).data = 0; \ + (c).cs = (c).nc = 0; \ + } while (0) + +/* Free all cached items, which are pointers to OTYPE, in object cache C. */ +#define ocache_flush(c, otype) \ + do { \ + while ((c).nc > 0) \ + xfree (((otype **)((c).data))[--(c).nc]); \ + } while (0) + +/* + * Allocate a new item of type pointer to OTYPE, using data from object + * cache C if any cached items exist, otherwise calling xmalloc. Return + * the object in R. + */ +#define ocache_alloc(c, otype, r) \ + do { \ + if ((c).nc > 0) { \ + (r) = (otype *)((otype **)((c).data))[--(c).nc]; \ + } else \ + (r) = (otype *)xmalloc (sizeof (otype)); \ + } while (0) + +/* + * Free an item R of type pointer to OTYPE, adding to object cache C if + * there is room and calling xfree if the cache is full. If R is added + * to the object cache, the contents are scrambled. + */ +#define ocache_free(c, otype, r) \ + do { \ + if ((c).nc < (c).cs) { \ + OC_MEMSET ((r), 0xdf, sizeof(otype)); \ + ((otype **)((c).data))[(c).nc++] = (r); \ + } else \ + xfree (r); \ + } while (0) + +/* + * One may declare and use an object cache as (for instance): + * + * sh_obj_cache_t wdcache = {0, 0, 0}; + * sh_obj_cache_t wlcache = {0, 0, 0}; + * + * ocache_create(wdcache, WORD_DESC, 30); + * ocache_create(wlcache, WORD_LIST, 30); + * + * WORD_DESC *wd; + * ocache_alloc (wdcache, WORD_DESC, wd); + * + * WORD_LIST *wl; + * ocache_alloc (wlcache, WORD_LIST, wl); + * + * ocache_free(wdcache, WORD_DESC, wd); + * ocache_free(wlcache, WORD_LIST, wl); + * + * The use is almost arbitrary. + */ + +#endif /* _OCACHE_H */ diff --git a/bash-5.1/include/posixdir.h b/bash-5.1/include/posixdir.h new file mode 100644 index 0000000000000000000000000000000000000000..af5be8012b347eee3b62ba0e78f36109619999e0 --- /dev/null +++ b/bash-5.1/include/posixdir.h @@ -0,0 +1,71 @@ +/* posixdir.h -- Posix directory reading includes and defines. */ + +/* Copyright (C) 1987,1991,2012 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* This file should be included instead of or . */ + +#if !defined (_POSIXDIR_H_) +#define _POSIXDIR_H_ + +#if defined (HAVE_DIRENT_H) +# include +# if defined (HAVE_STRUCT_DIRENT_D_NAMLEN) +# define D_NAMLEN(d) ((d)->d_namlen) +# else +# define D_NAMLEN(d) (strlen ((d)->d_name)) +# endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */ +#else +# if defined (HAVE_SYS_NDIR_H) +# include +# endif +# if defined (HAVE_SYS_DIR_H) +# include +# endif +# if defined (HAVE_NDIR_H) +# include +# endif +# if !defined (dirent) +# define dirent direct +# endif /* !dirent */ +# define D_NAMLEN(d) ((d)->d_namlen) +#endif /* !HAVE_DIRENT_H */ + +/* The bash code fairly consistently uses d_fileno; make sure it's available */ +#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO) +# define d_fileno d_ino +#endif + +/* Posix does not require that the d_ino field be present, and some + systems do not provide it. */ +#if !defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO) +# define REAL_DIR_ENTRY(dp) 1 +#else +# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) +#endif /* _POSIX_SOURCE */ + +#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (BROKEN_DIRENT_D_INO) +# define D_INO_AVAILABLE +#endif + +/* Signal the rest of the code that it can safely use dirent.d_fileno */ +#if defined (D_INO_AVAILABLE) || defined (HAVE_STRUCT_DIRENT_D_FILENO) +# define D_FILENO_AVAILABLE 1 +#endif + +#endif /* !_POSIXDIR_H_ */ diff --git a/bash-5.1/include/posixjmp.h b/bash-5.1/include/posixjmp.h new file mode 100644 index 0000000000000000000000000000000000000000..9c7e99ed42f01bb85482e7933a4d8431c9b313cb --- /dev/null +++ b/bash-5.1/include/posixjmp.h @@ -0,0 +1,46 @@ +/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ + +/* Copyright (C) 1987,1991-2015 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _POSIXJMP_H_ +#define _POSIXJMP_H_ + +#include + +/* This *must* be included *after* config.h */ + +#if defined (HAVE_POSIX_SIGSETJMP) +# define procenv_t sigjmp_buf + +# define setjmp_nosigs(x) sigsetjmp((x), 0) +# define setjmp_sigs(x) sigsetjmp((x), 1) + +# define _rl_longjmp(x, n) siglongjmp((x), (n)) +# define sh_longjmp(x, n) siglongjmp((x), (n)) +#else +# define procenv_t jmp_buf + +# define setjmp_nosigs setjmp +# define setjmp_sigs setjmp + +# define _rl_longjmp(x, n) longjmp((x), (n)) +# define sh_longjmp(x, n) longjmp((x), (n)) +#endif + +#endif /* _POSIXJMP_H_ */ diff --git a/bash-5.1/include/posixselect.h b/bash-5.1/include/posixselect.h new file mode 100644 index 0000000000000000000000000000000000000000..da6a1ace0c41ea2ddc7bb1692a79db02e38082ef --- /dev/null +++ b/bash-5.1/include/posixselect.h @@ -0,0 +1,47 @@ +/* posixselect.h -- wrapper for select(2) includes and definitions */ + +/* Copyright (C) 2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _POSIXSELECT_H_ +#define _POSIXSELECT_H_ + +#if defined (FD_SET) && !defined (HAVE_SELECT) +# define HAVE_SELECT 1 +#endif + +#if defined (HAVE_SELECT) +# if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX) +# include +# endif +#endif /* HAVE_SELECT */ +#if defined (HAVE_SYS_SELECT_H) +# include +#endif + +#ifndef USEC_PER_SEC +# define USEC_PER_SEC 1000000 +#endif + +#define USEC_TO_TIMEVAL(us, tv) \ +do { \ + (tv).tv_sec = (us) / USEC_PER_SEC; \ + (tv).tv_usec = (us) % USEC_PER_SEC; \ +} while (0) + +#endif /* _POSIXSELECT_H_ */ diff --git a/bash-5.1/include/posixstat.h b/bash-5.1/include/posixstat.h new file mode 100644 index 0000000000000000000000000000000000000000..b60778606b65bedbb911ff105e1e4851af080075 --- /dev/null +++ b/bash-5.1/include/posixstat.h @@ -0,0 +1,162 @@ +/* posixstat.h -- Posix stat(2) definitions for systems that + don't have them. */ + +/* Copyright (C) 1987-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* This file should be included instead of . + It relies on the local sys/stat.h to work though. */ +#if !defined (_POSIXSTAT_H_) +#define _POSIXSTAT_H_ + +#include + +#if defined (STAT_MACROS_BROKEN) +# undef S_ISBLK +# undef S_ISCHR +# undef S_ISDIR +# undef S_ISFIFO +# undef S_ISREG +# undef S_ISLNK +#endif /* STAT_MACROS_BROKEN */ + +/* These are guaranteed to work only on isc386 */ +#if !defined (S_IFDIR) && !defined (S_ISDIR) +# define S_IFDIR 0040000 +#endif /* !S_IFDIR && !S_ISDIR */ +#if !defined (S_IFMT) +# define S_IFMT 0170000 +#endif /* !S_IFMT */ + +/* Posix 1003.1 5.6.1.1 file types */ + +/* Some Posix-wannabe systems define _S_IF* macros instead of S_IF*, but + do not provide the S_IS* macros that Posix requires. */ + +#if defined (_S_IFMT) && !defined (S_IFMT) +#define S_IFMT _S_IFMT +#endif +#if defined (_S_IFIFO) && !defined (S_IFIFO) +#define S_IFIFO _S_IFIFO +#endif +#if defined (_S_IFCHR) && !defined (S_IFCHR) +#define S_IFCHR _S_IFCHR +#endif +#if defined (_S_IFDIR) && !defined (S_IFDIR) +#define S_IFDIR _S_IFDIR +#endif +#if defined (_S_IFBLK) && !defined (S_IFBLK) +#define S_IFBLK _S_IFBLK +#endif +#if defined (_S_IFREG) && !defined (S_IFREG) +#define S_IFREG _S_IFREG +#endif +#if defined (_S_IFLNK) && !defined (S_IFLNK) +#define S_IFLNK _S_IFLNK +#endif +#if defined (_S_IFSOCK) && !defined (S_IFSOCK) +#define S_IFSOCK _S_IFSOCK +#endif + +/* Test for each symbol individually and define the ones necessary (some + systems claiming Posix compatibility define some but not all). */ + +#if defined (S_IFBLK) && !defined (S_ISBLK) +#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */ +#endif + +#if defined (S_IFCHR) && !defined (S_ISCHR) +#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */ +#endif + +#if defined (S_IFDIR) && !defined (S_ISDIR) +#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */ +#endif + +#if defined (S_IFREG) && !defined (S_ISREG) +#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */ +#endif + +#if defined (S_IFIFO) && !defined (S_ISFIFO) +#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */ +#endif + +#if defined (S_IFLNK) && !defined (S_ISLNK) +#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */ +#endif + +#if defined (S_IFSOCK) && !defined (S_ISSOCK) +#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */ +#endif + +/* + * POSIX 1003.1 5.6.1.2 File Modes + */ + +#if !defined (S_IRWXU) +# if !defined (S_IREAD) +# define S_IREAD 00400 +# define S_IWRITE 00200 +# define S_IEXEC 00100 +# endif /* S_IREAD */ + +# if !defined (S_IRUSR) +# define S_IRUSR S_IREAD /* read, owner */ +# define S_IWUSR S_IWRITE /* write, owner */ +# define S_IXUSR S_IEXEC /* execute, owner */ + +# define S_IRGRP (S_IREAD >> 3) /* read, group */ +# define S_IWGRP (S_IWRITE >> 3) /* write, group */ +# define S_IXGRP (S_IEXEC >> 3) /* execute, group */ + +# define S_IROTH (S_IREAD >> 6) /* read, other */ +# define S_IWOTH (S_IWRITE >> 6) /* write, other */ +# define S_IXOTH (S_IEXEC >> 6) /* execute, other */ +# endif /* !S_IRUSR */ + +# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) +# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +#else /* !S_IRWXU */ + /* S_IRWXU is defined, but "group" and "other" bits might not be + (happens in certain versions of MinGW). */ +# if !defined (S_IRGRP) +# define S_IRGRP (S_IREAD >> 3) /* read, group */ +# define S_IWGRP (S_IWRITE >> 3) /* write, group */ +# define S_IXGRP (S_IEXEC >> 3) /* execute, group */ +# endif /* !S_IRGRP */ + +# if !defined (S_IROTH) +# define S_IROTH (S_IREAD >> 6) /* read, other */ +# define S_IWOTH (S_IWRITE >> 6) /* write, other */ +# define S_IXOTH (S_IEXEC >> 6) /* execute, other */ +# endif /* !S_IROTH */ +# if !defined (S_IRWXG) +# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +# endif +# if !defined (S_IRWXO) +# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +# endif +#endif /* !S_IRWXU */ + +/* These are non-standard, but are used in builtins.c$symbolic_umask() */ +#define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) +#define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH) +#define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) + +#endif /* _POSIXSTAT_H_ */ diff --git a/bash-5.1/include/posixtime.h b/bash-5.1/include/posixtime.h new file mode 100644 index 0000000000000000000000000000000000000000..a83e436bbced8900c5d8803c8ec1d8166659bdfb --- /dev/null +++ b/bash-5.1/include/posixtime.h @@ -0,0 +1,61 @@ +/* posixtime.h -- wrapper for time.h, sys/times.h mess. */ + +/* Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _POSIXTIME_H_ +#define _POSIXTIME_H_ + +/* include this after config.h */ +/* Some systems require this, mostly for the definition of `struct timezone'. + For example, Dynix/ptx has that definition in rather than + sys/time.h */ +#if defined (TIME_WITH_SYS_TIME) +# include +# include +#else +# if defined (HAVE_SYS_TIME_H) +# include +# else +# include +# endif +#endif + +#if !defined (HAVE_SYSCONF) || !defined (_SC_CLK_TCK) +# if !defined (CLK_TCK) +# if defined (HZ) +# define CLK_TCK HZ +# else +# define CLK_TCK 60 /* 60HZ */ +# endif +# endif /* !CLK_TCK */ +#endif /* !HAVE_SYSCONF && !_SC_CLK_TCK */ + +#if !HAVE_TIMEVAL +struct timeval +{ + time_t tv_sec; + long int tv_usec; +}; +#endif + +#if !HAVE_GETTIMEOFDAY +extern int gettimeofday PARAMS((struct timeval *, void *)); +#endif + +#endif /* _POSIXTIME_H_ */ diff --git a/bash-5.1/include/posixwait.h b/bash-5.1/include/posixwait.h new file mode 100644 index 0000000000000000000000000000000000000000..63b59c24a8814ca94cd1f6b66d87d90905c14234 --- /dev/null +++ b/bash-5.1/include/posixwait.h @@ -0,0 +1,107 @@ +/* posixwait.h -- job control definitions from POSIX 1003.1 */ + +/* Copyright (C) 1997 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_POSIXWAIT_H_) +# define _POSIXWAIT_H_ + +/* If _POSIX_VERSION is not defined, we assume that defines + a `union wait' and various macros used to manipulate it. Look in + unionwait.h for the things we expect to find. */ +#if defined (HAVE_SYS_WAIT_H) +# include +#else /* !HAVE_SYS_WAIT_H */ +# if !defined (_POSIX_VERSION) +# include "unionwait.h" +# endif +#endif /* !HAVE_SYS_WAIT_H */ + +/* How to get the status of a job. For Posix, this is just an + int, but for other systems we have to crack the union wait. */ +#if !defined (_POSIX_VERSION) +typedef union wait WAIT; +# define WSTATUS(t) (t.w_status) +#else /* _POSIX_VERSION */ +typedef int WAIT; +# define WSTATUS(t) (t) +#endif /* _POSIX_VERSION */ + +/* Make sure that parameters to wait3 are defined. */ +#if !defined (WNOHANG) +# define WNOHANG 1 +# define WUNTRACED 2 +#endif /* WNOHANG */ + +/* More Posix P1003.1 definitions. In the POSIX versions, the parameter is + passed as an `int', in the non-POSIX version, as `union wait'. */ +#if defined (_POSIX_VERSION) + +# if !defined (WSTOPSIG) +# define WSTOPSIG(s) ((s) >> 8) +# endif /* !WSTOPSIG */ + +# if !defined (WTERMSIG) +# define WTERMSIG(s) ((s) & 0177) +# endif /* !WTERMSIG */ + +# if !defined (WEXITSTATUS) +# define WEXITSTATUS(s) ((s) >> 8) +# endif /* !WEXITSTATUS */ + +# if !defined (WIFSTOPPED) +# define WIFSTOPPED(s) (((s) & 0177) == 0177) +# endif /* !WIFSTOPPED */ + +# if !defined (WIFEXITED) +# define WIFEXITED(s) (((s) & 0377) == 0) +# endif /* !WIFEXITED */ + +# if !defined (WIFSIGNALED) +# define WIFSIGNALED(s) (!WIFSTOPPED(s) && !WIFEXITED(s)) +# endif /* !WIFSIGNALED */ + +# if !defined (WIFCORED) +# if defined (WCOREDUMP) +# define WIFCORED(s) (WCOREDUMP(s)) +# else +# define WIFCORED(s) ((s) & 0200) +# endif +# endif /* !WIFCORED */ + +#else /* !_POSIX_VERSION */ + +# if !defined (WSTOPSIG) +# define WSTOPSIG(s) ((s).w_stopsig) +# endif /* !WSTOPSIG */ + +# if !defined (WTERMSIG) +# define WTERMSIG(s) ((s).w_termsig) +# endif /* !WTERMSIG */ + +# if !defined (WEXITSTATUS) +# define WEXITSTATUS(s) ((s).w_retcode) +# endif /* !WEXITSTATUS */ + +# if !defined (WIFCORED) +# define WIFCORED(s) ((s).w_coredump) +# endif /* !WIFCORED */ + +#endif /* !_POSIX_VERSION */ + +#endif /* !_POSIXWAIT_H_ */ diff --git a/bash-5.1/include/shmbchar.h b/bash-5.1/include/shmbchar.h new file mode 100644 index 0000000000000000000000000000000000000000..a4f3f2472cfc1aa249db769b3ceaf8a1b2333f5f --- /dev/null +++ b/bash-5.1/include/shmbchar.h @@ -0,0 +1,112 @@ +/* Multibyte character data type. + Copyright (C) 2001, 2005-2007, 2009-2010 Free Software Foundation, Inc. + + 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 . */ + +/* Written by Bruno Haible . */ + +#ifndef _SHMBCHAR_H +#define _SHMBCHAR_H 1 + +#if defined (HANDLE_MULTIBYTE) + +#include + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.1 has a bug: and must be included before + . */ +#include +#include +#include +#include + + +/* is_basic(c) tests whether the single-byte character c is in the + ISO C "basic character set". */ + +#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) +/* The character set is ISO-646, not EBCDIC. */ +# define IS_BASIC_ASCII 1 + +extern const unsigned int is_basic_table[]; + +static inline int +is_basic (char c) +{ + return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) + & 1; +} + +#else + +static inline int +is_basic (char c) +{ + switch (c) + { + case '\b': case '\r': case '\n': + case '\t': case '\v': case '\f': + case ' ': case '!': case '"': case '#': case '%': + case '&': case '\'': case '(': case ')': case '*': + case '+': case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': + case '?': + case 'A': case 'B': case 'C': case 'D': case 'E': + case 'F': case 'G': case 'H': case 'I': case 'J': + case 'K': case 'L': case 'M': case 'N': case 'O': + case 'P': case 'Q': case 'R': case 'S': case 'T': + case 'U': case 'V': case 'W': case 'X': case 'Y': + case 'Z': + case '[': case '\\': case ']': case '^': case '_': + case 'a': case 'b': case 'c': case 'd': case 'e': + case 'f': case 'g': case 'h': case 'i': case 'j': + case 'k': case 'l': case 'm': case 'n': case 'o': + case 'p': case 'q': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'y': + case 'z': case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +} + +#endif + +#endif /* HANDLE_MULTIBYTE */ +#endif /* _SHMBCHAR_H */ diff --git a/bash-5.1/include/shmbutil.h b/bash-5.1/include/shmbutil.h new file mode 100644 index 0000000000000000000000000000000000000000..835fb80cdb6ee23f2e70216fb1fb8bb3e438bd82 --- /dev/null +++ b/bash-5.1/include/shmbutil.h @@ -0,0 +1,551 @@ +/* shmbutil.h -- utility functions for multibyte characters. */ + +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_SH_MBUTIL_H_) +#define _SH_MBUTIL_H_ + +#include "stdc.h" + +/* Include config.h for HANDLE_MULTIBYTE */ +#include + +#if defined (HANDLE_MULTIBYTE) +#include "shmbchar.h" + +extern size_t xwcsrtombs PARAMS((char *, const wchar_t **, size_t, mbstate_t *)); +extern size_t xmbsrtowcs PARAMS((wchar_t *, const char **, size_t, mbstate_t *)); +extern size_t xdupmbstowcs PARAMS((wchar_t **, char ***, const char *)); + +extern size_t mbstrlen PARAMS((const char *)); + +extern char *xstrchr PARAMS((const char *, int)); + +extern int locale_mb_cur_max; /* XXX */ +extern int locale_utf8locale; /* XXX */ + +#ifndef MB_INVALIDCH +#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) +#define MB_NULLWCH(x) ((x) == 0) +#endif + +#define MBSLEN(s) (((s) && (s)[0]) ? ((s)[1] ? mbstrlen (s) : 1) : 0) +#define MB_STRLEN(s) ((MB_CUR_MAX > 1) ? MBSLEN (s) : STRLEN (s)) + +#define MBLEN(s, n) ((MB_CUR_MAX > 1) ? mblen ((s), (n)) : 1) +#define MBRLEN(s, n, p) ((MB_CUR_MAX > 1) ? mbrlen ((s), (n), (p)) : 1) + +#define UTF8_SINGLEBYTE(c) (((c) & 0x80) == 0) +#define UTF8_MBFIRSTCHAR(c) (((c) & 0xc0) == 0xc0) +#define UTF8_MBCHAR(c) (((c) & 0xc0) == 0x80) + +#else /* !HANDLE_MULTIBYTE */ + +#undef MB_LEN_MAX +#undef MB_CUR_MAX + +#define MB_LEN_MAX 1 +#define MB_CUR_MAX 1 + +#undef xstrchr +#define xstrchr(s, c) strchr(s, c) + +#ifndef MB_INVALIDCH +#define MB_INVALIDCH(x) (0) +#define MB_NULLWCH(x) (0) +#endif + +#define MB_STRLEN(s) (STRLEN(s)) + +#define MBLEN(s, n) 1 +#define MBRLEN(s, n, p) 1 + +#ifndef wchar_t +# define wchar_t int +#endif + +#define UTF8_SINGLEBYTE(c) (1) +#define UTF8_MBFIRSTCHAR(c) (0) + +#endif /* !HANDLE_MULTIBYTE */ + +/* Declare and initialize a multibyte state. Call must be terminated + with `;'. */ +#if defined (HANDLE_MULTIBYTE) +# define DECLARE_MBSTATE \ + mbstate_t state; \ + memset (&state, '\0', sizeof (mbstate_t)) +#else +# define DECLARE_MBSTATE +#endif /* !HANDLE_MULTIBYTE */ + +/* Initialize or reinitialize a multibyte state named `state'. Call must be + terminated with `;'. */ +#if defined (HANDLE_MULTIBYTE) +# define INITIALIZE_MBSTATE memset (&state, '\0', sizeof (mbstate_t)) +#else +# define INITIALIZE_MBSTATE +#endif /* !HANDLE_MULTIBYTE */ + +/* Advance one (possibly multi-byte) character in string _STR of length + _STRSIZE, starting at index _I. STATE must have already been declared. */ +#if defined (HANDLE_MULTIBYTE) +# define ADVANCE_CHAR(_str, _strsize, _i) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + int _f; \ +\ + _f = is_basic ((_str)[_i]); \ + if (_f) \ + mblength = 1; \ + else if (locale_utf8locale && (((_str)[_i] & 0x80) == 0)) \ + mblength = (_str)[_i] != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_str) + (_i), (_strsize) - (_i), &state); \ + } \ +\ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + (_i)++; \ + } \ + else if (mblength == 0) \ + (_i)++; \ + else \ + (_i) += mblength; \ + } \ + else \ + (_i)++; \ + } \ + while (0) +#else +# define ADVANCE_CHAR(_str, _strsize, _i) (_i)++ +#endif /* !HANDLE_MULTIBYTE */ + +/* Advance one (possibly multibyte) character in the string _STR of length + _STRSIZE. + SPECIAL: assume that _STR will be incremented by 1 after this call. */ +#if defined (HANDLE_MULTIBYTE) +# define ADVANCE_CHAR_P(_str, _strsize) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + int _f; \ +\ + _f = is_basic (*(_str)); \ + if (_f) \ + mblength = 1; \ + else if (locale_utf8locale && ((*(_str) & 0x80) == 0)) \ + mblength = *(_str) != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_str), (_strsize), &state); \ + } \ +\ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + else \ + (_str) += (mblength < 1) ? 0 : (mblength - 1); \ + } \ + } \ + while (0) +#else +# define ADVANCE_CHAR_P(_str, _strsize) +#endif /* !HANDLE_MULTIBYTE */ + +/* Back up one (possibly multi-byte) character in string _STR of length + _STRSIZE, starting at index _I. STATE must have already been declared. */ +#if defined (HANDLE_MULTIBYTE) +# define BACKUP_CHAR(_str, _strsize, _i) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + int _x, _p; /* _x == temp index into string, _p == prev index */ \ +\ + _x = _p = 0; \ + while (_x < (_i)) \ + { \ + state_bak = state; \ + mblength = mbrlen ((_str) + (_x), (_strsize) - (_x), &state); \ +\ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + _x++; \ + } \ + else if (mblength == 0) \ + _x++; \ + else \ + { \ + _p = _x; /* _p == start of prev mbchar */ \ + _x += mblength; \ + } \ + } \ + (_i) = _p; \ + } \ + else \ + (_i)--; \ + } \ + while (0) +#else +# define BACKUP_CHAR(_str, _strsize, _i) (_i)-- +#endif /* !HANDLE_MULTIBYTE */ + +/* Back up one (possibly multibyte) character in the string _BASE of length + _STRSIZE starting at _STR (_BASE <= _STR <= (_BASE + _STRSIZE) ). + SPECIAL: DO NOT assume that _STR will be decremented by 1 after this call. */ +#if defined (HANDLE_MULTIBYTE) +# define BACKUP_CHAR_P(_base, _strsize, _str) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + char *_x, _p; /* _x == temp pointer into string, _p == prev pointer */ \ +\ + _x = _p = _base; \ + while (_x < (_str)) \ + { \ + state_bak = state; \ + mblength = mbrlen (_x, (_strsize) - _x, &state); \ +\ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + _x++; \ + } \ + else if (mblength == 0) \ + _x++; \ + else \ + { \ + _p = _x; /* _p == start of prev mbchar */ \ + _x += mblength; \ + } \ + } \ + (_str) = _p; \ + } \ + else \ + (_str)--; \ + } \ + while (0) +#else +# define BACKUP_CHAR_P(_base, _strsize, _str) (_str)-- +#endif /* !HANDLE_MULTIBYTE */ + +/* Copy a single character from the string _SRC to the string _DST. + _SRCEND is a pointer to the end of _SRC. */ +#if defined (HANDLE_MULTIBYTE) +# define COPY_CHAR_P(_dst, _src, _srcend) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + int _k; \ +\ + _k = is_basic (*(_src)); \ + if (_k) \ + mblength = 1; \ + else if (locale_utf8locale && ((*(_src) & 0x80) == 0)) \ + mblength = *(_src) != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src), (_srcend) - (_src), &state); \ + } \ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + else \ + mblength = (mblength < 1) ? 1 : mblength; \ +\ + for (_k = 0; _k < mblength; _k++) \ + *(_dst)++ = *(_src)++; \ + } \ + else \ + *(_dst)++ = *(_src)++; \ + } \ + while (0) +#else +# define COPY_CHAR_P(_dst, _src, _srcend) *(_dst)++ = *(_src)++ +#endif /* !HANDLE_MULTIBYTE */ + +/* Copy a single character from the string _SRC at index _SI to the string + _DST at index _DI. _SRCEND is a pointer to the end of _SRC. */ +#if defined (HANDLE_MULTIBYTE) +# define COPY_CHAR_I(_dst, _di, _src, _srcend, _si) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + int _k; \ +\ + _k = is_basic (*((_src) + (_si))); \ + if (_k) \ + mblength = 1; \ + else \ + {\ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src)+(_si)), &state); \ + } \ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + else \ + mblength = (mblength < 1) ? 1 : mblength; \ +\ + for (_k = 0; _k < mblength; _k++) \ + _dst[_di++] = _src[_si++]; \ + } \ + else \ + _dst[_di++] = _src[_si++]; \ + } \ + while (0) +#else +# define COPY_CHAR_I(_dst, _di, _src, _srcend, _si) _dst[_di++] = _src[_si++] +#endif /* !HANDLE_MULTIBYTE */ + +/**************************************************************** + * * + * The following are only guaranteed to work in subst.c * + * * + ****************************************************************/ + +#if defined (HANDLE_MULTIBYTE) +# define SCOPY_CHAR_I(_dst, _escchar, _sc, _src, _si, _slen) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + int _i; \ +\ + _i = is_basic (*((_src) + (_si))); \ + if (_i) \ + mblength = 1; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_slen) - (_si), &state); \ + } \ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + else \ + mblength = (mblength < 1) ? 1 : mblength; \ +\ + temp = xmalloc (mblength + 2); \ + temp[0] = _escchar; \ + for (_i = 0; _i < mblength; _i++) \ + temp[_i + 1] = _src[_si++]; \ + temp[mblength + 1] = '\0'; \ +\ + goto add_string; \ + } \ + else \ + { \ + _dst[0] = _escchar; \ + _dst[1] = _sc; \ + } \ + } \ + while (0) +#else +# define SCOPY_CHAR_I(_dst, _escchar, _sc, _src, _si, _slen) \ + _dst[0] = _escchar; \ + _dst[1] = _sc +#endif /* !HANDLE_MULTIBYTE */ + +#if defined (HANDLE_MULTIBYTE) +# define SCOPY_CHAR_M(_dst, _src, _srcend, _si) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + int _i; \ +\ + _i = is_basic (*((_src) + (_si))); \ + if (_i) \ + mblength = 1; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src) + (_si)), &state); \ + } \ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + else \ + mblength = (mblength < 1) ? 1 : mblength; \ +\ + FASTCOPY(((_src) + (_si)), (_dst), mblength); \ +\ + (_dst) += mblength; \ + (_si) += mblength; \ + } \ + else \ + { \ + *(_dst)++ = _src[(_si)]; \ + (_si)++; \ + } \ + } \ + while (0) +#else +# define SCOPY_CHAR_M(_dst, _src, _srcend, _si) \ + *(_dst)++ = _src[(_si)]; \ + (_si)++ +#endif /* !HANDLE_MULTIBYTE */ + +#if HANDLE_MULTIBYTE +# define SADD_MBCHAR(_dst, _src, _si, _srcsize) \ + do \ + { \ + if (locale_mb_cur_max > 1) \ + { \ + int i; \ + mbstate_t state_bak; \ + size_t mblength; \ +\ + i = is_basic (*((_src) + (_si))); \ + if (i) \ + mblength = 1; \ + else if (locale_utf8locale && (((_src)[_si] & 0x80) == 0)) \ + mblength = (_src)[_si] != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ + } \ + if (mblength == (size_t)-1 || mblength == (size_t)-2) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + if (mblength < 1) \ + mblength = 1; \ +\ + _dst = (char *)xmalloc (mblength + 1); \ + for (i = 0; i < mblength; i++) \ + (_dst)[i] = (_src)[(_si)++]; \ + (_dst)[mblength] = '\0'; \ +\ + goto add_string; \ + } \ + } \ + while (0) + +#else +# define SADD_MBCHAR(_dst, _src, _si, _srcsize) +#endif + +/* Watch out when using this -- it's just straight textual substitution */ +#if defined (HANDLE_MULTIBYTE) +# define SADD_MBQCHAR_BODY(_dst, _src, _si, _srcsize) \ +\ + int i; \ + mbstate_t state_bak; \ + size_t mblength; \ +\ + i = is_basic (*((_src) + (_si))); \ + if (i) \ + mblength = 1; \ + else if (locale_utf8locale && (((_src)[_si] & 0x80) == 0)) \ + mblength = (_src)[_si] != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ + } \ + if (mblength == (size_t)-1 || mblength == (size_t)-2) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + if (mblength < 1) \ + mblength = 1; \ +\ + (_dst) = (char *)xmalloc (mblength + 2); \ + (_dst)[0] = CTLESC; \ + for (i = 0; i < mblength; i++) \ + (_dst)[i+1] = (_src)[(_si)++]; \ + (_dst)[mblength+1] = '\0'; \ +\ + goto add_string + +# define SADD_MBCHAR_BODY(_dst, _src, _si, _srcsize) \ +\ + int i; \ + mbstate_t state_bak; \ + size_t mblength; \ +\ + i = is_basic (*((_src) + (_si))); \ + if (i) \ + mblength = 1; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ + } \ + if (mblength == (size_t)-1 || mblength == (size_t)-2) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + if (mblength < 1) \ + mblength = 1; \ +\ + (_dst) = (char *)xmalloc (mblength + 1); \ + for (i = 0; i < mblength; i++) \ + (_dst)[i+1] = (_src)[(_si)++]; \ + (_dst)[mblength+1] = '\0'; \ +\ + goto add_string + +#endif /* HANDLE_MULTIBYTE */ +#endif /* _SH_MBUTIL_H_ */ diff --git a/bash-5.1/include/shtty.h b/bash-5.1/include/shtty.h new file mode 100644 index 0000000000000000000000000000000000000000..fdf379b892af5fa669b05ddfb41efde3a5c3c57d --- /dev/null +++ b/bash-5.1/include/shtty.h @@ -0,0 +1,112 @@ +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. */ + +/* This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* + * shtty.h -- include the correct system-dependent files to manipulate the + * tty + */ + +#ifndef __SH_TTY_H_ +#define __SH_TTY_H_ + +#include "stdc.h" + +#if defined (_POSIX_VERSION) && defined (HAVE_TERMIOS_H) && defined (HAVE_TCGETATTR) && !defined (TERMIOS_MISSING) +# define TERMIOS_TTY_DRIVER +#else +# if defined (HAVE_TERMIO_H) +# define TERMIO_TTY_DRIVER +# else +# define NEW_TTY_DRIVER +# endif +#endif + +/* + * The _POSIX_SOURCE define is to avoid multiple symbol definitions + * between sys/ioctl.h and termios.h. Ditto for the test against SunOS4 + * and the undefining of several symbols. + */ + +#ifdef TERMIOS_TTY_DRIVER +# if (defined (SunOS4) || defined (SunOS5)) && !defined (_POSIX_SOURCE) +# define _POSIX_SOURCE +# endif +# if defined (SunOS4) +# undef ECHO +# undef NOFLSH +# undef TOSTOP +# endif /* SunOS4 */ +# include +# define TTYSTRUCT struct termios +#else +# ifdef TERMIO_TTY_DRIVER +# include +# define TTYSTRUCT struct termio +# else /* NEW_TTY_DRIVER */ +# include +# define TTYSTRUCT struct sgttyb +# endif +#endif + +/* Functions imported from lib/sh/shtty.c */ + +/* Get and set terminal attributes for the file descriptor passed as + an argument. */ +extern int ttgetattr PARAMS((int, TTYSTRUCT *)); +extern int ttsetattr PARAMS((int, TTYSTRUCT *)); + +/* Save and restore the terminal's attributes from static storage. */ +extern void ttsave PARAMS((void)); +extern void ttrestore PARAMS((void)); + +/* Return the attributes corresponding to the file descriptor (0 or 1) + passed as an argument. */ +extern TTYSTRUCT *ttattr PARAMS((int)); + +/* These functions only operate on the passed TTYSTRUCT; they don't + actually change anything with the kernel's current tty settings. */ +extern int tt_setonechar PARAMS((TTYSTRUCT *)); +extern int tt_setnoecho PARAMS((TTYSTRUCT *)); +extern int tt_seteightbit PARAMS((TTYSTRUCT *)); +extern int tt_setnocanon PARAMS((TTYSTRUCT *)); +extern int tt_setcbreak PARAMS((TTYSTRUCT *)); + +/* These functions are all generally mutually exclusive. If you call + more than one (bracketed with calls to ttsave and ttrestore, of + course), the right thing will happen, but more system calls will be + executed than absolutely necessary. You can do all of this yourself + with the other functions; these are only conveniences. */ + +/* These functions work with a given file descriptor and set terminal + attributes */ +extern int ttfd_onechar PARAMS((int, TTYSTRUCT *)); +extern int ttfd_noecho PARAMS((int, TTYSTRUCT *)); +extern int ttfd_eightbit PARAMS((int, TTYSTRUCT *)); +extern int ttfd_nocanon PARAMS((int, TTYSTRUCT *)); + +extern int ttfd_cbreak PARAMS((int, TTYSTRUCT *)); + +/* These functions work with fd 0 and the TTYSTRUCT saved with ttsave () */ +extern int ttonechar PARAMS((void)); +extern int ttnoecho PARAMS((void)); +extern int tteightbit PARAMS((void)); +extern int ttnocanon PARAMS((void)); + +extern int ttcbreak PARAMS((void)); + +#endif diff --git a/bash-5.1/include/stat-time.h b/bash-5.1/include/stat-time.h new file mode 100644 index 0000000000000000000000000000000000000000..e04cc619ee2333fc873ee79fae573cda86575a85 --- /dev/null +++ b/bash-5.1/include/stat-time.h @@ -0,0 +1,214 @@ +/* stat-related time functions. + + Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. + + 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 . */ + +/* Written by Paul Eggert. */ + +#ifndef STAT_TIME_H +#define STAT_TIME_H 1 + +#include + +#if defined (TIME_H_DEFINES_STRUCT_TIMESPEC) +# include +#elif defined (SYS_TIME_H_DEFINES_STRUCT_TIMESPEC) +# include +#elif defined (PTHREAD_H_DEFINES_STRUCT_TIMESPEC) +# include +#endif + +#ifndef HAVE_STRUCT_TIMESPEC +struct timespec +{ + time_t tv_sec; + long int tv_nsec; +}; +#endif + +/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type + struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, + ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, + if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim + for access, status change, data modification, or birth (creation) + time respectively. + + These macros are private to stat-time.h. */ +#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC +# ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) +# else +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec) +# endif +#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec) +#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec) +#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec) +#endif + +/* Return the nanosecond component of *ST's access time. */ +static inline long int +get_stat_atime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_atim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's status change time. */ +static inline long int +get_stat_ctime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_ctim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's data modification time. */ +static inline long int +get_stat_mtime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_mtim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's birth time. */ +static inline long int +get_stat_birthtime_ns (struct stat const *st) +{ +# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + return STAT_TIMESPEC (st, st_birthtim).tv_nsec; +# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + return STAT_TIMESPEC_NS (st, st_birthtim); +# else + /* Avoid a "parameter unused" warning. */ + (void) st; + return 0; +# endif +} + +/* Return *ST's access time. */ +static inline struct timespec +get_stat_atime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim); +#else + struct timespec t; + t.tv_sec = st->st_atime; + t.tv_nsec = get_stat_atime_ns (st); + return t; +#endif +} + +/* Return *ST's status change time. */ +static inline struct timespec +get_stat_ctime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim); +#else + struct timespec t; + t.tv_sec = st->st_ctime; + t.tv_nsec = get_stat_ctime_ns (st); + return t; +#endif +} + +/* Return *ST's data modification time. */ +static inline struct timespec +get_stat_mtime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim); +#else + struct timespec t; + t.tv_sec = st->st_mtime; + t.tv_nsec = get_stat_mtime_ns (st); + return t; +#endif +} + +static inline int +timespec_cmp (struct timespec a, struct timespec b) +{ + return (a.tv_sec < b.tv_sec + ? -1 + : (a.tv_sec > b.tv_sec + ? 1 + : (int) (a.tv_nsec - b.tv_nsec))); +} + +/* Return *ST's birth time, if available; otherwise return a value + with tv_sec and tv_nsec both equal to -1. */ +static inline struct timespec +get_stat_birthtime (struct stat const *st) +{ + struct timespec t; + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC) + t = STAT_TIMESPEC (st, st_birthtim); +#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + t.tv_sec = st->st_birthtime; + t.tv_nsec = st->st_birthtimensec; +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* Native Windows platforms (but not Cygwin) put the "file creation + time" in st_ctime (!). See + . */ + t.tv_sec = st->st_ctime; + t.tv_nsec = 0; +#else + /* Birth time is not supported. */ + t.tv_sec = -1; + t.tv_nsec = -1; + /* Avoid a "parameter unused" warning. */ + (void) st; +#endif + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) + /* FreeBSD and NetBSD sometimes signal the absence of knowledge by + using zero. Attempt to work around this problem. Alas, this can + report failure even for valid time stamps. Also, NetBSD + sometimes returns junk in the birth time fields; work around this + bug if it is detected. */ + if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000)) + { + t.tv_sec = -1; + t.tv_nsec = -1; + } +#endif + + return t; +} + +#endif diff --git a/bash-5.1/include/stdc.h b/bash-5.1/include/stdc.h new file mode 100644 index 0000000000000000000000000000000000000000..7b9282cc721e5fbf69547134067b0be35cf0f950 --- /dev/null +++ b/bash-5.1/include/stdc.h @@ -0,0 +1,89 @@ +/* stdc.h -- macros to make source compile on both ANSI C and K&R C + compilers. */ + +/* Copyright (C) 1993 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_STDC_H_) +#define _STDC_H_ + +/* Adapted from BSD /usr/include/sys/cdefs.h. */ + +/* A function can be defined using prototypes and compile on both ANSI C + and traditional C compilers with something like this: + extern char *func PARAMS((char *, char *, int)); */ + +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +/* Fortify, at least, has trouble with this definition */ +#if defined (HAVE_STRINGIZE) +# define CPP_STRING(x) #x +#else +# define CPP_STRING(x) "x" +#endif + +#if !defined (__STDC__) + +#if defined (__GNUC__) /* gcc with -traditional */ +# if !defined (signed) +# define signed __signed +# endif +# if !defined (volatile) +# define volatile __volatile +# endif +#else /* !__GNUC__ */ +# if !defined (inline) +# define inline +# endif +# if !defined (signed) +# define signed +# endif +# if !defined (volatile) +# define volatile +# endif +#endif /* !__GNUC__ */ + +#endif /* !__STDC__ */ + +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) +# define __attribute__(x) +# endif +#endif + +/* For those situations when gcc handles inlining a particular function but + other compilers complain. */ +#ifdef __GNUC__ +# define INLINE inline +#else +# define INLINE +#endif + +#if defined (PREFER_STDARG) +# define SH_VA_START(va, arg) va_start(va, arg) +#else +# define SH_VA_START(va, arg) va_start(va) +#endif + +#endif /* !_STDC_H_ */ diff --git a/bash-5.1/include/systimes.h b/bash-5.1/include/systimes.h new file mode 100644 index 0000000000000000000000000000000000000000..aefcab7f2f1fe3a346daff68de9212380c6e8334 --- /dev/null +++ b/bash-5.1/include/systimes.h @@ -0,0 +1,55 @@ +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* + * POSIX Standard: 4.5.2 Process Times + */ + +/* + * If we don't have a standard system clock_t type, this must be included + * after config.h + */ + +#ifndef _BASH_SYSTIMES_H +#define _BASH_SYSTIMES_H 1 + +#if defined (HAVE_SYS_TIMES_H) +# include +#else /* !HAVE_SYS_TIMES_H */ + +#include + +/* Structure describing CPU time used by a process and its children. */ +struct tms + { + clock_t tms_utime; /* User CPU time. */ + clock_t tms_stime; /* System CPU time. */ + + clock_t tms_cutime; /* User CPU time of dead children. */ + clock_t tms_cstime; /* System CPU time of dead children. */ + }; + +/* Store the CPU time used by this process and all its + dead descendants in BUFFER. + Return the elapsed real time from an arbitrary point in the + past (the bash emulation uses the epoch), or (clock_t) -1 for + errors. All times are in CLK_TCKths of a second. */ +extern clock_t times PARAMS((struct tms *buffer)); + +#endif /* !HAVE_SYS_TIMES_H */ +#endif /* _BASH_SYSTIMES_H */ diff --git a/bash-5.1/include/typemax.h b/bash-5.1/include/typemax.h new file mode 100644 index 0000000000000000000000000000000000000000..9853d5674ecbd1e50803f0998a4b071ac6ebaf35 --- /dev/null +++ b/bash-5.1/include/typemax.h @@ -0,0 +1,131 @@ +/* typemax.h -- encapsulate max values for long, long long, etc. */ + +/* Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* + * NOTE: This should be included after config.h, limits.h, stdint.h, and + * inttypes.h + */ + +#ifndef _SH_TYPEMAX_H +#define _SH_TYPEMAX_H + +#ifndef CHAR_BIT +# define CHAR_BIT 8 +#endif + +/* Nonzero if the integer type T is signed. */ +#ifndef TYPE_SIGNED +# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) +#endif + +#ifndef TYPE_SIGNED_MAGNITUDE +# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) +#endif + +#ifndef TYPE_WIDTH +# define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) +#endif + +#ifndef TYPE_MINIMUM +# define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) +#endif + +#ifndef TYPE_MAXIMUM +# define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) +#endif + +#ifdef HAVE_LONG_LONG +# ifndef LLONG_MAX +# define LLONG_MAX TYPE_MAXIMUM(long long int) +# define LLONG_MIN TYPE_MINIMUM(long long int) +# endif +# ifndef ULLONG_MAX +# define ULLONG_MAX TYPE_MAXIMUM(unsigned long long int) +# endif +#endif + +#ifndef ULONG_MAX +# define ULONG_MAX ((unsigned long) ~(unsigned long) 0) +#endif + +#ifndef LONG_MAX +# define LONG_MAX ((long int) (ULONG_MAX >> 1)) +# define LONG_MIN ((long int) (-LONG_MAX - 1L)) +#endif + +#ifndef INT_MAX /* ouch */ +# define INT_MAX TYPE_MAXIMUM(int) +# define INT_MIN TYPE_MINIMUM(int) +# define UINT_MAX ((unsigned int) ~(unsigned int)0) +#endif + +/* workaround for gcc bug in versions < 2.7 */ +#if defined (HAVE_LONG_LONG) && __GNUC__ == 2 && __GNUC_MINOR__ < 7 +static const unsigned long long int maxquad = ULLONG_MAX; +# undef ULLONG_MAX +# define ULLONG_MAX maxquad +#endif + +#if !defined (INTMAX_MAX) || !defined (INTMAX_MIN) + +#if SIZEOF_INTMAX_T == SIZEOF_LONG_LONG +# define INTMAX_MAX LLONG_MAX +# define INTMAX_MIN LLONG_MIN +#elif SIZEOF_INTMAX_T == SIZEOF_LONG +# define INTMAX_MAX LONG_MAX +# define INTMAX_MIN LONG_MIN +#else +# define INTMAX_MAX INT_MAX +# define INTMAX_MIN INT_MIN +#endif + +#endif + +#ifndef SSIZE_MAX +# define SSIZE_MAX 32767 /* POSIX minimum max */ +#endif + +#ifndef SIZE_MAX +# define SIZE_MAX 65535 /* POSIX minimum max */ +#endif + +#ifndef sh_imaxabs +# define sh_imaxabs(x) (((x) >= 0) ? (x) : -(x)) +#endif + +/* Handle signed arithmetic overflow and underflow. Have to do it this way + to avoid compilers optimizing out simpler overflow checks. */ + +/* Make sure that a+b does not exceed MAXV or is smaller than MINV (if b < 0). + Assumes that b > 0 if a > 0 and b < 0 if a < 0 */ +#define ADDOVERFLOW(a,b,minv,maxv) \ + ((((a) > 0) && ((b) > ((maxv) - (a)))) || \ + (((a) < 0) && ((b) < ((minv) - (a))))) + +/* Make sure that a-b is not smaller than MINV or exceeds MAXV (if b < 0). + Assumes that b > 0 if a > 0 and b < 0 if a < 0 */ +#define SUBOVERFLOW(a,b,minv,maxv) \ + ((((b) > 0) && ((a) < ((minv) + (b)))) || \ + (((b) < 0) && ((a) > ((maxv) + (b))))) + +#endif /* _SH_TYPEMAX_H */ diff --git a/bash-5.1/include/unionwait.h b/bash-5.1/include/unionwait.h new file mode 100644 index 0000000000000000000000000000000000000000..b1b4dfaff7d7adce09d0651562f38e08e47e3872 --- /dev/null +++ b/bash-5.1/include/unionwait.h @@ -0,0 +1,98 @@ +/* unionwait.h -- definitions for using a `union wait' on systems without + one. */ + +/* Copyright (C) 1996 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _UNIONWAIT_H +#define _UNIONWAIT_H + +#if !defined (WORDS_BIGENDIAN) +union wait + { + int w_status; /* used in syscall */ + + /* Terminated process status. */ + struct + { + unsigned short + w_Termsig : 7, /* termination signal */ + w_Coredump : 1, /* core dump indicator */ + w_Retcode : 8, /* exit code if w_termsig==0 */ + w_Fill1 : 16; /* high 16 bits unused */ + } w_T; + + /* Stopped process status. Returned + only for traced children unless requested + with the WUNTRACED option bit. */ + struct + { + unsigned short + w_Stopval : 8, /* == W_STOPPED if stopped */ + w_Stopsig : 8, /* actually zero on XENIX */ + w_Fill2 : 16; /* high 16 bits unused */ + } w_S; + }; + +#else /* WORDS_BIGENDIAN */ + +/* This is for big-endian machines like the IBM RT, HP 9000, or Sun-3 */ + +union wait + { + int w_status; /* used in syscall */ + + /* Terminated process status. */ + struct + { + unsigned short w_Fill1 : 16; /* high 16 bits unused */ + unsigned w_Retcode : 8; /* exit code if w_termsig==0 */ + unsigned w_Coredump : 1; /* core dump indicator */ + unsigned w_Termsig : 7; /* termination signal */ + } w_T; + + /* Stopped process status. Returned + only for traced children unless requested + with the WUNTRACED option bit. */ + struct + { + unsigned short w_Fill2 : 16; /* high 16 bits unused */ + unsigned w_Stopsig : 8; /* signal that stopped us */ + unsigned w_Stopval : 8; /* == W_STOPPED if stopped */ + } w_S; + }; + +#endif /* WORDS_BIGENDIAN */ + +#define w_termsig w_T.w_Termsig +#define w_coredump w_T.w_Coredump +#define w_retcode w_T.w_Retcode +#define w_stopval w_S.w_Stopval +#define w_stopsig w_S.w_Stopsig + +#define WSTOPPED 0177 +#define WIFSTOPPED(x) ((x).w_stopval == WSTOPPED) +#define WIFEXITED(x) ((x).w_stopval != WSTOPPED && (x).w_termsig == 0) +#define WIFSIGNALED(x) ((x).w_stopval != WSTOPPED && (x).w_termsig != 0) + +#define WTERMSIG(x) ((x).w_termsig) +#define WSTOPSIG(x) ((x).w_stopsig) +#define WEXITSTATUS(x) ((x).w_retcode) +#define WIFCORED(x) ((x).w_coredump) + +#endif /* _UNIONWAIT_H */ diff --git a/bash-5.1/input.c b/bash-5.1/input.c new file mode 100644 index 0000000000000000000000000000000000000000..c57e81c362f9514b07aedf6d4c8d5d5d06635b45 --- /dev/null +++ b/bash-5.1/input.c @@ -0,0 +1,677 @@ +/* input.c -- functions to perform buffered input with synchronization. */ + +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include "filecntl.h" +#include "posixstat.h" +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" +#include "bashintl.h" + +#include "shell.h" +#include "input.h" +#include "externs.h" +#include "trap.h" + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if defined (EAGAIN) +# define X_EAGAIN EAGAIN +#else +# define X_EAGAIN -99 +#endif + +#if defined (EWOULDBLOCK) +# define X_EWOULDBLOCK EWOULDBLOCK +#else +# define X_EWOULDBLOCK -99 +#endif + +extern void termsig_handler PARAMS((int)); + +/* Functions to handle reading input on systems that don't restart read(2) + if a signal is received. */ + +static char localbuf[1024]; +static int local_index = 0, local_bufused = 0; + +/* Posix and USG systems do not guarantee to restart read () if it is + interrupted by a signal. We do the read ourselves, and restart it + if it returns EINTR. */ +int +getc_with_restart (stream) + FILE *stream; +{ + unsigned char uc; + + CHECK_TERMSIG; + + /* Try local buffering to reduce the number of read(2) calls. */ + if (local_index == local_bufused || local_bufused == 0) + { + while (1) + { + QUIT; + run_pending_traps (); + + local_bufused = read (fileno (stream), localbuf, sizeof(localbuf)); + if (local_bufused > 0) + break; + else if (local_bufused == 0) + { + local_index = 0; + return EOF; + } + else if (errno == X_EAGAIN || errno == X_EWOULDBLOCK) + { + if (sh_unset_nodelay_mode (fileno (stream)) < 0) + { + sys_error (_("cannot reset nodelay mode for fd %d"), fileno (stream)); + local_index = local_bufused = 0; + return EOF; + } + continue; + } + else if (errno != EINTR) + { + local_index = local_bufused = 0; + return EOF; + } + else if (interrupt_state || terminating_signal) /* QUIT; */ + local_index = local_bufused = 0; + } + local_index = 0; + } + uc = localbuf[local_index++]; + return uc; +} + +int +ungetc_with_restart (c, stream) + int c; + FILE *stream; +{ + if (local_index == 0 || c == EOF) + return EOF; + localbuf[--local_index] = c; + return c; +} + +#if defined (BUFFERED_INPUT) + +/* A facility similar to stdio, but input-only. */ + +#if defined (USING_BASH_MALLOC) +# define MAX_INPUT_BUFFER_SIZE 8172 +#else +# define MAX_INPUT_BUFFER_SIZE 8192 +#endif + +#if !defined (SEEK_CUR) +# define SEEK_CUR 1 +#endif /* !SEEK_CUR */ + +#ifdef max +# undef max +#endif +#define max(a, b) (((a) > (b)) ? (a) : (b)) +#ifdef min +# undef min +#endif +#define min(a, b) ((a) > (b) ? (b) : (a)) + +int bash_input_fd_changed; + +/* This provides a way to map from a file descriptor to the buffer + associated with that file descriptor, rather than just the other + way around. This is needed so that buffers are managed properly + in constructs like 3<&4. buffers[x]->b_fd == x -- that is how the + correspondence is maintained. */ +static BUFFERED_STREAM **buffers = (BUFFERED_STREAM **)NULL; +static int nbuffers; + +#define ALLOCATE_BUFFERS(n) \ + do { if ((n) >= nbuffers) allocate_buffers (n); } while (0) + +/* Make sure `buffers' has at least N elements. */ +static void +allocate_buffers (n) + int n; +{ + register int i, orig_nbuffers; + + orig_nbuffers = nbuffers; + nbuffers = n + 20; + buffers = (BUFFERED_STREAM **)xrealloc + (buffers, nbuffers * sizeof (BUFFERED_STREAM *)); + + /* Zero out the new buffers. */ + for (i = orig_nbuffers; i < nbuffers; i++) + buffers[i] = (BUFFERED_STREAM *)NULL; +} + +/* Construct and return a BUFFERED_STREAM corresponding to file descriptor + FD, using BUFFER. */ +static BUFFERED_STREAM * +make_buffered_stream (fd, buffer, bufsize) + int fd; + char *buffer; + size_t bufsize; +{ + BUFFERED_STREAM *bp; + + bp = (BUFFERED_STREAM *)xmalloc (sizeof (BUFFERED_STREAM)); + ALLOCATE_BUFFERS (fd); + buffers[fd] = bp; + bp->b_fd = fd; + bp->b_buffer = buffer; + bp->b_size = bufsize; + bp->b_used = bp->b_inputp = bp->b_flag = 0; + if (bufsize == 1) + bp->b_flag |= B_UNBUFF; + if (O_TEXT && (fcntl (fd, F_GETFL) & O_TEXT) != 0) + bp->b_flag |= B_TEXT; + return (bp); +} + +/* Allocate a new BUFFERED_STREAM, copy BP to it, and return the new copy. */ +static BUFFERED_STREAM * +copy_buffered_stream (bp) + BUFFERED_STREAM *bp; +{ + BUFFERED_STREAM *nbp; + + if (!bp) + return ((BUFFERED_STREAM *)NULL); + + nbp = (BUFFERED_STREAM *)xmalloc (sizeof (BUFFERED_STREAM)); + xbcopy ((char *)bp, (char *)nbp, sizeof (BUFFERED_STREAM)); + return (nbp); +} + +int +set_bash_input_fd (fd) + int fd; +{ + if (bash_input.type == st_bstream) + bash_input.location.buffered_fd = fd; + else if (interactive_shell == 0) + default_buffered_input = fd; + return 0; +} + +int +fd_is_bash_input (fd) + int fd; +{ + if (bash_input.type == st_bstream && bash_input.location.buffered_fd == fd) + return 1; + else if (interactive_shell == 0 && default_buffered_input == fd) + return 1; + return 0; +} + +/* Save the buffered stream corresponding to file descriptor FD (which bash + is using to read input) to a buffered stream associated with NEW_FD. If + NEW_FD is -1, a new file descriptor is allocated with fcntl. The new + file descriptor is returned on success, -1 on error. */ +int +save_bash_input (fd, new_fd) + int fd, new_fd; +{ + int nfd; + + /* Sync the stream so we can re-read from the new file descriptor. We + might be able to avoid this by copying the buffered stream verbatim + to the new file descriptor. */ + if (buffers[fd]) + sync_buffered_stream (fd); + + /* Now take care of duplicating the file descriptor that bash is + using for input, so we can reinitialize it later. */ + nfd = (new_fd == -1) ? fcntl (fd, F_DUPFD, 10) : new_fd; + if (nfd == -1) + { + if (fcntl (fd, F_GETFD, 0) == 0) + sys_error (_("cannot allocate new file descriptor for bash input from fd %d"), fd); + return -1; + } + + if (nfd < nbuffers && buffers[nfd]) + { + /* What's this? A stray buffer without an associated open file + descriptor? Free up the buffer and report the error. */ + internal_error (_("save_bash_input: buffer already exists for new fd %d"), nfd); + if (buffers[nfd]->b_flag & B_SHAREDBUF) + buffers[nfd]->b_buffer = (char *)NULL; + free_buffered_stream (buffers[nfd]); + } + + /* Reinitialize bash_input.location. */ + if (bash_input.type == st_bstream) + { + bash_input.location.buffered_fd = nfd; + fd_to_buffered_stream (nfd); + close_buffered_fd (fd); /* XXX */ + } + else + /* If the current input type is not a buffered stream, but the shell + is not interactive and therefore using a buffered stream to read + input (e.g. with an `eval exec 3>output' inside a script), note + that the input fd has been changed. pop_stream() looks at this + value and adjusts the input fd to the new value of + default_buffered_input accordingly. */ + bash_input_fd_changed++; + + if (default_buffered_input == fd) + default_buffered_input = nfd; + + SET_CLOSE_ON_EXEC (nfd); + return nfd; +} + +/* Check that file descriptor FD is not the one that bash is currently + using to read input from a script. FD is about to be duplicated onto, + which means that the kernel will close it for us. If FD is the bash + input file descriptor, we need to seek backwards in the script (if + possible and necessary -- scripts read from stdin are still unbuffered), + allocate a new file descriptor to use for bash input, and re-initialize + the buffered stream. Make sure the file descriptor used to save bash + input is set close-on-exec. Returns 0 on success, -1 on failure. This + works only if fd is > 0 -- if fd == 0 and bash is reading input from + fd 0, sync_buffered_stream is used instead, to cooperate with input + redirection (look at redir.c:add_undo_redirect()). */ +int +check_bash_input (fd) + int fd; +{ + if (fd_is_bash_input (fd)) + { + if (fd > 0) + return ((save_bash_input (fd, -1) == -1) ? -1 : 0); + else if (fd == 0) + return ((sync_buffered_stream (fd) == -1) ? -1 : 0); + } + return 0; +} + +/* This is the buffered stream analogue of dup2(fd1, fd2). The + BUFFERED_STREAM corresponding to fd2 is deallocated, if one exists. + BUFFERS[fd1] is copied to BUFFERS[fd2]. This is called by the + redirect code for constructs like 4<&0 and 3b_buffer && buffers[fd1]->b_buffer == buffers[fd2]->b_buffer) + buffers[fd2] = (BUFFERED_STREAM *)NULL; + /* If this buffer is shared with another fd, don't free the buffer */ + else if (buffers[fd2]->b_flag & B_SHAREDBUF) + { + buffers[fd2]->b_buffer = (char *)NULL; + free_buffered_stream (buffers[fd2]); + } + else + free_buffered_stream (buffers[fd2]); + } + buffers[fd2] = copy_buffered_stream (buffers[fd1]); + if (buffers[fd2]) + buffers[fd2]->b_fd = fd2; + + if (is_bash_input) + { + if (!buffers[fd2]) + fd_to_buffered_stream (fd2); + buffers[fd2]->b_flag |= B_WASBASHINPUT; + } + + if (fd_is_bash_input (fd1) || (buffers[fd1] && (buffers[fd1]->b_flag & B_SHAREDBUF))) + buffers[fd2]->b_flag |= B_SHAREDBUF; + + return (fd2); +} + +/* Return 1 if a seek on FD will succeed. */ +#define fd_is_seekable(fd) (lseek ((fd), 0L, SEEK_CUR) >= 0) + +/* Take FD, a file descriptor, and create and return a buffered stream + corresponding to it. If something is wrong and the file descriptor + is invalid, return a NULL stream. */ +BUFFERED_STREAM * +fd_to_buffered_stream (fd) + int fd; +{ + char *buffer; + size_t size; + struct stat sb; + + if (fstat (fd, &sb) < 0) + { + close (fd); + return ((BUFFERED_STREAM *)NULL); + } + + size = (fd_is_seekable (fd)) ? min (sb.st_size, MAX_INPUT_BUFFER_SIZE) : 1; + if (size == 0) + size = 1; + buffer = (char *)xmalloc (size); + + return (make_buffered_stream (fd, buffer, size)); +} + +/* Return a buffered stream corresponding to FILE, a file name. */ +BUFFERED_STREAM * +open_buffered_stream (file) + char *file; +{ + int fd; + + fd = open (file, O_RDONLY); + return ((fd >= 0) ? fd_to_buffered_stream (fd) : (BUFFERED_STREAM *)NULL); +} + +/* Deallocate a buffered stream and free up its resources. Make sure we + zero out the slot in BUFFERS that points to BP. */ +void +free_buffered_stream (bp) + BUFFERED_STREAM *bp; +{ + int n; + + if (!bp) + return; + + n = bp->b_fd; + if (bp->b_buffer) + free (bp->b_buffer); + free (bp); + buffers[n] = (BUFFERED_STREAM *)NULL; +} + +/* Close the file descriptor associated with BP, a buffered stream, and free + up the stream. Return the status of closing BP's file descriptor. */ +int +close_buffered_stream (bp) + BUFFERED_STREAM *bp; +{ + int fd; + + if (!bp) + return (0); + fd = bp->b_fd; + if (bp->b_flag & B_SHAREDBUF) + bp->b_buffer = (char *)NULL; + free_buffered_stream (bp); + return (close (fd)); +} + +/* Deallocate the buffered stream associated with file descriptor FD, and + close FD. Return the status of the close on FD. */ +int +close_buffered_fd (fd) + int fd; +{ + if (fd < 0) + { + errno = EBADF; + return -1; + } + if (fd >= nbuffers || !buffers || !buffers[fd]) + return (close (fd)); + return (close_buffered_stream (buffers[fd])); +} + +/* Make the BUFFERED_STREAM associated with buffers[FD] be BP, and return + the old BUFFERED_STREAM. */ +BUFFERED_STREAM * +set_buffered_stream (fd, bp) + int fd; + BUFFERED_STREAM *bp; +{ + BUFFERED_STREAM *ret; + + ret = buffers[fd]; + buffers[fd] = bp; + return ret; +} + +/* Read a buffer full of characters from BP, a buffered stream. */ +static int +b_fill_buffer (bp) + BUFFERED_STREAM *bp; +{ + ssize_t nr; + off_t o; + + CHECK_TERMSIG; + /* In an environment where text and binary files are treated differently, + compensate for lseek() on text files returning an offset different from + the count of characters read() returns. Text-mode streams have to be + treated as unbuffered. */ + if ((bp->b_flag & (B_TEXT | B_UNBUFF)) == B_TEXT) + { + o = lseek (bp->b_fd, 0, SEEK_CUR); + nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); + if (nr > 0 && nr < lseek (bp->b_fd, 0, SEEK_CUR) - o) + { + lseek (bp->b_fd, o, SEEK_SET); + bp->b_flag |= B_UNBUFF; + bp->b_size = 1; + nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); + } + } + else + nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); + if (nr <= 0) + { + bp->b_used = bp->b_inputp = 0; + bp->b_buffer[0] = 0; + if (nr == 0) + bp->b_flag |= B_EOF; + else + bp->b_flag |= B_ERROR; + return (EOF); + } + + bp->b_used = nr; + bp->b_inputp = 0; + return (bp->b_buffer[bp->b_inputp++] & 0xFF); +} + +/* Get a character from buffered stream BP. */ +#define bufstream_getc(bp) \ + (bp->b_inputp == bp->b_used || !bp->b_used) \ + ? b_fill_buffer (bp) \ + : bp->b_buffer[bp->b_inputp++] & 0xFF + +/* Push C back onto buffered stream BP. */ +static int +bufstream_ungetc(c, bp) + int c; + BUFFERED_STREAM *bp; +{ + if (c == EOF || bp == 0 || bp->b_inputp == 0) + return (EOF); + + bp->b_buffer[--bp->b_inputp] = c; + return (c); +} + +/* Seek backwards on file BFD to synchronize what we've read so far + with the underlying file pointer. */ +int +sync_buffered_stream (bfd) + int bfd; +{ + BUFFERED_STREAM *bp; + off_t chars_left; + + if (buffers == 0 || (bp = buffers[bfd]) == 0) + return (-1); + + chars_left = bp->b_used - bp->b_inputp; + if (chars_left) + lseek (bp->b_fd, -chars_left, SEEK_CUR); + bp->b_used = bp->b_inputp = 0; + return (0); +} + +int +buffered_getchar () +{ + CHECK_TERMSIG; + + if (bash_input.location.buffered_fd < 0 || buffers[bash_input.location.buffered_fd] == 0) + return EOF; + +#if !defined (DJGPP) + return (bufstream_getc (buffers[bash_input.location.buffered_fd])); +#else + /* On DJGPP, ignore \r. */ + int ch; + while ((ch = bufstream_getc (buffers[bash_input.location.buffered_fd])) == '\r') + ; + return ch; +#endif +} + +int +buffered_ungetchar (c) + int c; +{ + return (bufstream_ungetc (c, buffers[bash_input.location.buffered_fd])); +} + +/* Make input come from file descriptor BFD through a buffered stream. */ +void +with_input_from_buffered_stream (bfd, name) + int bfd; + char *name; +{ + INPUT_STREAM location; + BUFFERED_STREAM *bp; + + location.buffered_fd = bfd; + /* Make sure the buffered stream exists. */ + bp = fd_to_buffered_stream (bfd); + init_yy_io (bp == 0 ? return_EOF : buffered_getchar, + buffered_ungetchar, st_bstream, name, location); +} + +#if defined (TEST) +void * +xmalloc(s) +int s; +{ + return (malloc (s)); +} + +void * +xrealloc(s, size) +char *s; +int size; +{ + if (!s) + return(malloc (size)); + else + return(realloc (s, size)); +} + +void +init_yy_io () +{ +} + +process(bp) +BUFFERED_STREAM *bp; +{ + int c; + + while ((c = bufstream_getc(bp)) != EOF) + putchar(c); +} + +BASH_INPUT bash_input; + +struct stat dsb; /* can be used from gdb */ + +/* imitate /bin/cat */ +main(argc, argv) +int argc; +char **argv; +{ + register int i; + BUFFERED_STREAM *bp; + + if (argc == 1) { + bp = fd_to_buffered_stream (0); + process(bp); + exit(0); + } + for (i = 1; i < argc; i++) { + if (argv[i][0] == '-' && argv[i][1] == '\0') { + bp = fd_to_buffered_stream (0); + if (!bp) + continue; + process(bp); + free_buffered_stream (bp); + } else { + bp = open_buffered_stream (argv[i]); + if (!bp) + continue; + process(bp); + close_buffered_stream (bp); + } + } + exit(0); +} +#endif /* TEST */ +#endif /* BUFFERED_INPUT */ diff --git a/bash-5.1/input.h b/bash-5.1/input.h new file mode 100644 index 0000000000000000000000000000000000000000..cb3eee4252f5e224e1b5754bc366cfbe1543cf55 --- /dev/null +++ b/bash-5.1/input.h @@ -0,0 +1,135 @@ +/* input.h -- Structures and unions used for reading input. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_INPUT_H_) +#define _INPUT_H_ + +#include "stdc.h" + +/* Function pointers can be declared as (Function *)foo. */ +#if !defined (_FUNCTION_DEF) +# define _FUNCTION_DEF +typedef int Function (); +typedef void VFunction (); +typedef char *CPFunction (); /* no longer used */ +typedef char **CPPFunction (); /* no longer used */ +#endif /* _FUNCTION_DEF */ + +typedef int sh_cget_func_t PARAMS((void)); /* sh_ivoidfunc_t */ +typedef int sh_cunget_func_t PARAMS((int)); /* sh_intfunc_t */ + +enum stream_type {st_none, st_stdin, st_stream, st_string, st_bstream}; + +#if defined (BUFFERED_INPUT) + +/* Possible values for b_flag. */ +#undef B_EOF +#undef B_ERROR /* There are some systems with this define */ +#undef B_UNBUFF + +#define B_EOF 0x01 +#define B_ERROR 0x02 +#define B_UNBUFF 0x04 +#define B_WASBASHINPUT 0x08 +#define B_TEXT 0x10 +#define B_SHAREDBUF 0x20 /* shared input buffer */ + +/* A buffered stream. Like a FILE *, but with our own buffering and + synchronization. Look in input.c for the implementation. */ +typedef struct BSTREAM +{ + int b_fd; + char *b_buffer; /* The buffer that holds characters read. */ + size_t b_size; /* How big the buffer is. */ + size_t b_used; /* How much of the buffer we're using, */ + int b_flag; /* Flag values. */ + size_t b_inputp; /* The input pointer, index into b_buffer. */ +} BUFFERED_STREAM; + +#if 0 +extern BUFFERED_STREAM **buffers; +#endif + +extern int default_buffered_input; +extern int bash_input_fd_changed; + +#endif /* BUFFERED_INPUT */ + +typedef union { + FILE *file; + char *string; +#if defined (BUFFERED_INPUT) + int buffered_fd; +#endif +} INPUT_STREAM; + +typedef struct { + enum stream_type type; + char *name; + INPUT_STREAM location; + sh_cget_func_t *getter; + sh_cunget_func_t *ungetter; +} BASH_INPUT; + +extern BASH_INPUT bash_input; + +/* Functions from parse.y whose use directly or indirectly depends on the + definitions in this file. */ +extern void initialize_bash_input PARAMS((void)); +extern void init_yy_io PARAMS((sh_cget_func_t *, sh_cunget_func_t *, enum stream_type, const char *, INPUT_STREAM)); +extern char *yy_input_name PARAMS((void)); +extern void with_input_from_stdin PARAMS((void)); +extern void with_input_from_string PARAMS((char *, const char *)); +extern void with_input_from_stream PARAMS((FILE *, const char *)); +extern void push_stream PARAMS((int)); +extern void pop_stream PARAMS((void)); +extern int stream_on_stack PARAMS((enum stream_type)); +extern char *read_secondary_line PARAMS((int)); +extern int find_reserved_word PARAMS((char *)); +extern void gather_here_documents PARAMS((void)); +extern void execute_variable_command PARAMS((char *, char *)); + +extern int *save_token_state PARAMS((void)); +extern void restore_token_state PARAMS((int *)); + +/* Functions from input.c */ +extern int getc_with_restart PARAMS((FILE *)); +extern int ungetc_with_restart PARAMS((int, FILE *)); + +#if defined (BUFFERED_INPUT) +/* Functions from input.c. */ +extern int fd_is_bash_input PARAMS((int)); +extern int set_bash_input_fd PARAMS((int)); +extern int save_bash_input PARAMS((int, int)); +extern int check_bash_input PARAMS((int)); +extern int duplicate_buffered_stream PARAMS((int, int)); +extern BUFFERED_STREAM *fd_to_buffered_stream PARAMS((int)); +extern BUFFERED_STREAM *set_buffered_stream PARAMS((int, BUFFERED_STREAM *)); +extern BUFFERED_STREAM *open_buffered_stream PARAMS((char *)); +extern void free_buffered_stream PARAMS((BUFFERED_STREAM *)); +extern int close_buffered_stream PARAMS((BUFFERED_STREAM *)); +extern int close_buffered_fd PARAMS((int)); +extern int sync_buffered_stream PARAMS((int)); +extern int buffered_getchar PARAMS((void)); +extern int buffered_ungetchar PARAMS((int)); +extern void with_input_from_buffered_stream PARAMS((int, char *)); +#endif /* BUFFERED_INPUT */ + +#endif /* _INPUT_H_ */ diff --git a/bash-5.1/jobs.c b/bash-5.1/jobs.c new file mode 100644 index 0000000000000000000000000000000000000000..a581f3053fdab36820288d3f64b8eb22c81db863 --- /dev/null +++ b/bash-5.1/jobs.c @@ -0,0 +1,5136 @@ +/* jobs.c - functions that make children, remember them, and handle their termination. */ + +/* This file works with both POSIX and BSD systems. It implements job + control. */ + +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include "trap.h" +#include +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "posixtime.h" + +#if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_WAIT3) && !defined (_POSIX_VERSION) && !defined (RLIMTYPE) +# include +#endif /* !_POSIX_VERSION && HAVE_SYS_RESOURCE_H && HAVE_WAIT3 && !RLIMTYPE */ + +#if defined (HAVE_SYS_FILE_H) +# include +#endif + +#include "filecntl.h" +#include +#if defined (HAVE_SYS_PARAM_H) +#include +#endif + +#if defined (BUFFERED_INPUT) +# include "input.h" +#endif + +/* Need to include this up here for *_TTY_DRIVER definitions. */ +#include "shtty.h" + +/* Define this if your output is getting swallowed. It's a no-op on + machines with the termio or termios tty drivers. */ +/* #define DRAIN_OUTPUT */ + +/* For the TIOCGPGRP and TIOCSPGRP ioctl parameters on HP-UX */ +#if defined (hpux) && !defined (TERMIOS_TTY_DRIVER) +# include +#endif /* hpux && !TERMIOS_TTY_DRIVER */ + +#include "bashansi.h" +#include "bashintl.h" +#include "shell.h" +#include "parser.h" +#include "jobs.h" +#include "execute_cmd.h" +#include "flags.h" + +#include "typemax.h" + +#include "builtins/builtext.h" +#include "builtins/common.h" + +#if defined (READLINE) +# include +#endif + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if !defined (HAVE_KILLPG) +extern int killpg PARAMS((pid_t, int)); +#endif + +#if !DEFAULT_CHILD_MAX +# define DEFAULT_CHILD_MAX 4096 +#endif + +#if !MAX_CHILD_MAX +# define MAX_CHILD_MAX 32768 +#endif + +#if !defined (DEBUG) +#define MAX_JOBS_IN_ARRAY 4096 /* production */ +#else +#define MAX_JOBS_IN_ARRAY 128 /* testing */ +#endif + +/* XXX for now */ +#define PIDSTAT_TABLE_SZ 4096 +#define BGPIDS_TABLE_SZ 512 + +/* Flag values for second argument to delete_job */ +#define DEL_WARNSTOPPED 1 /* warn about deleting stopped jobs */ +#define DEL_NOBGPID 2 /* don't add pgrp leader to bgpids */ + +/* Take care of system dependencies that must be handled when waiting for + children. The arguments to the WAITPID macro match those to the Posix.1 + waitpid() function. */ + +#if defined (ultrix) && defined (mips) && defined (_POSIX_VERSION) +# define WAITPID(pid, statusp, options) \ + wait3 ((union wait *)statusp, options, (struct rusage *)0) +#else +# if defined (_POSIX_VERSION) || defined (HAVE_WAITPID) +# define WAITPID(pid, statusp, options) \ + waitpid ((pid_t)pid, statusp, options) +# else +# if defined (HAVE_WAIT3) +# define WAITPID(pid, statusp, options) \ + wait3 (statusp, options, (struct rusage *)0) +# else +# define WAITPID(pid, statusp, options) \ + wait3 (statusp, options, (int *)0) +# endif /* HAVE_WAIT3 */ +# endif /* !_POSIX_VERSION && !HAVE_WAITPID*/ +#endif /* !(Ultrix && mips && _POSIX_VERSION) */ + +/* getpgrp () varies between systems. Even systems that claim to be + Posix.1 compatible lie sometimes (Ultrix, SunOS4, apollo). */ +#if defined (GETPGRP_VOID) +# define getpgid(p) getpgrp () +#else +# define getpgid(p) getpgrp (p) +#endif /* !GETPGRP_VOID */ + +/* If the system needs it, REINSTALL_SIGCHLD_HANDLER will reinstall the + handler for SIGCHLD. */ +#if defined (MUST_REINSTALL_SIGHANDLERS) +# define REINSTALL_SIGCHLD_HANDLER signal (SIGCHLD, sigchld_handler) +#else +# define REINSTALL_SIGCHLD_HANDLER +#endif /* !MUST_REINSTALL_SIGHANDLERS */ + +/* Some systems let waitpid(2) tell callers about stopped children. */ +#if !defined (WCONTINUED) || defined (WCONTINUED_BROKEN) +# undef WCONTINUED +# define WCONTINUED 0 +#endif +#if !defined (WIFCONTINUED) +# define WIFCONTINUED(s) (0) +#endif + +/* The number of additional slots to allocate when we run out. */ +#define JOB_SLOTS 8 + +typedef int sh_job_map_func_t PARAMS((JOB *, int, int, int)); + +/* Variables used here but defined in other files. */ +extern WORD_LIST *subst_assign_varlist; + +extern SigHandler **original_signals; + +extern void set_original_signal PARAMS((int, SigHandler *)); + +static struct jobstats zerojs = { -1L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NO_JOB, NO_JOB, 0, 0 }; +struct jobstats js = { -1L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NO_JOB, NO_JOB, 0, 0 }; + +ps_index_t pidstat_table[PIDSTAT_TABLE_SZ]; +struct bgpids bgpids = { 0, 0, 0, 0 }; + +struct procchain procsubs = { 0, 0, 0 }; + +/* The array of known jobs. */ +JOB **jobs = (JOB **)NULL; + +#if 0 +/* The number of slots currently allocated to JOBS. */ +int job_slots = 0; +#endif + +/* The controlling tty for this shell. */ +int shell_tty = -1; + +/* The shell's process group. */ +pid_t shell_pgrp = NO_PID; + +/* The terminal's process group. */ +pid_t terminal_pgrp = NO_PID; + +/* The process group of the shell's parent. */ +pid_t original_pgrp = NO_PID; + +/* The process group of the pipeline currently being made. */ +pid_t pipeline_pgrp = (pid_t)0; + +#if defined (PGRP_PIPE) +/* Pipes which each shell uses to communicate with the process group leader + until all of the processes in a pipeline have been started. Then the + process leader is allowed to continue. */ +int pgrp_pipe[2] = { -1, -1 }; +#endif + +/* Last child made by the shell. */ +volatile pid_t last_made_pid = NO_PID; + +/* Pid of the last asynchronous child. */ +volatile pid_t last_asynchronous_pid = NO_PID; + +/* The pipeline currently being built. */ +PROCESS *the_pipeline = (PROCESS *)NULL; + +/* If this is non-zero, do job control. */ +int job_control = 1; + +/* Are we running in background? (terminal_pgrp != shell_pgrp) */ +int running_in_background = 0; + +/* Call this when you start making children. */ +int already_making_children = 0; + +/* If this is non-zero, $LINES and $COLUMNS are reset after every process + exits from get_tty_state(). */ +int check_window_size = CHECKWINSIZE_DEFAULT; + +PROCESS *last_procsub_child = (PROCESS *)NULL; + +/* Functions local to this file. */ + +void debug_print_pgrps (void); + +static sighandler wait_sigint_handler PARAMS((int)); +static sighandler sigchld_handler PARAMS((int)); +static sighandler sigcont_sighandler PARAMS((int)); +static sighandler sigstop_sighandler PARAMS((int)); + +static int waitchld PARAMS((pid_t, int)); + +static PROCESS *find_pid_in_pipeline PARAMS((pid_t, PROCESS *, int)); +static PROCESS *find_pipeline PARAMS((pid_t, int, int *)); +static PROCESS *find_process PARAMS((pid_t, int, int *)); + +static char *current_working_directory PARAMS((void)); +static char *job_working_directory PARAMS((void)); +static char *j_strsignal PARAMS((int)); +static char *printable_job_status PARAMS((int, PROCESS *, int)); + +static PROCESS *find_last_proc PARAMS((int, int)); +static pid_t find_last_pid PARAMS((int, int)); + +static int set_new_line_discipline PARAMS((int)); +static int map_over_jobs PARAMS((sh_job_map_func_t *, int, int)); +static int job_last_stopped PARAMS((int)); +static int job_last_running PARAMS((int)); +static int most_recent_job_in_state PARAMS((int, JOB_STATE)); +static int find_job PARAMS((pid_t, int, PROCESS **)); +static int print_job PARAMS((JOB *, int, int, int)); +static int process_exit_status PARAMS((WAIT)); +static int process_exit_signal PARAMS((WAIT)); +static int set_job_status_and_cleanup PARAMS((int)); + +static WAIT job_signal_status PARAMS((int)); +static WAIT raw_job_exit_status PARAMS((int)); + +static void notify_of_job_status PARAMS((void)); +static void reset_job_indices PARAMS((void)); +static void cleanup_dead_jobs PARAMS((void)); +static int processes_in_job PARAMS((int)); +static void realloc_jobs_list PARAMS((void)); +static int compact_jobs_list PARAMS((int)); +static void add_process PARAMS((char *, pid_t)); +static void print_pipeline PARAMS((PROCESS *, int, int, FILE *)); +static void pretty_print_job PARAMS((int, int, FILE *)); +static void set_current_job PARAMS((int)); +static void reset_current PARAMS((void)); +static void set_job_running PARAMS((int)); +static void setjstatus PARAMS((int)); +static int maybe_give_terminal_to PARAMS((pid_t, pid_t, int)); +static void mark_all_jobs_as_dead PARAMS((void)); +static void mark_dead_jobs_as_notified PARAMS((int)); +static void restore_sigint_handler PARAMS((void)); +#if defined (PGRP_PIPE) +static void pipe_read PARAMS((int *)); +#endif + +/* Hash table manipulation */ + +static ps_index_t *pshash_getbucket PARAMS((pid_t)); +static void pshash_delindex PARAMS((ps_index_t)); + +/* Saved background process status management */ +static struct pidstat *bgp_add PARAMS((pid_t, int)); +static int bgp_delete PARAMS((pid_t)); +static void bgp_clear PARAMS((void)); +static int bgp_search PARAMS((pid_t)); + +static struct pipeline_saver *alloc_pipeline_saver PARAMS((void)); + +static ps_index_t bgp_getindex PARAMS((void)); +static void bgp_resize PARAMS((void)); /* XXX */ + +#if defined (ARRAY_VARS) +static int *pstatuses; /* list of pipeline statuses */ +static int statsize; +#endif + +/* Used to synchronize between wait_for and other functions and the SIGCHLD + signal handler. */ +static int sigchld; +static int queue_sigchld; + +#define QUEUE_SIGCHLD(os) (os) = sigchld, queue_sigchld++ + +/* We set queue_sigchld around the call to waitchld to protect data structures + from a SIGCHLD arriving while waitchld is executing. */ +#define UNQUEUE_SIGCHLD(os) \ + do { \ + queue_sigchld--; \ + if (queue_sigchld == 0 && os != sigchld) \ + { \ + queue_sigchld = 1; \ + waitchld (-1, 0); \ + queue_sigchld = 0; \ + } \ + } while (0) + +static SigHandler *old_tstp, *old_ttou, *old_ttin; +static SigHandler *old_cont = (SigHandler *)SIG_DFL; + +/* A place to temporarily save the current pipeline. */ +static struct pipeline_saver *saved_pipeline; +static int saved_already_making_children; + +/* Set this to non-zero whenever you don't want the jobs list to change at + all: no jobs deleted and no status change notifications. This is used, + for example, when executing SIGCHLD traps, which may run arbitrary + commands. */ +static int jobs_list_frozen; + +static char retcode_name_buffer[64]; + +#if !defined (_POSIX_VERSION) + +/* These are definitions to map POSIX 1003.1 functions onto existing BSD + library functions and system calls. */ +#define setpgid(pid, pgrp) setpgrp (pid, pgrp) +#define tcsetpgrp(fd, pgrp) ioctl ((fd), TIOCSPGRP, &(pgrp)) + +pid_t +tcgetpgrp (fd) + int fd; +{ + pid_t pgrp; + + /* ioctl will handle setting errno correctly. */ + if (ioctl (fd, TIOCGPGRP, &pgrp) < 0) + return (-1); + return (pgrp); +} + +#endif /* !_POSIX_VERSION */ + +/* Initialize the global job stats structure and other bookkeeping variables */ +void +init_job_stats () +{ + js = zerojs; +} + +/* Return the working directory for the current process. Unlike + job_working_directory, this does not call malloc (), nor do any + of the functions it calls. This is so that it can safely be called + from a signal handler. */ +static char * +current_working_directory () +{ + char *dir; + static char d[PATH_MAX]; + + dir = get_string_value ("PWD"); + + if (dir == 0 && the_current_working_directory && no_symbolic_links) + dir = the_current_working_directory; + + if (dir == 0) + { + dir = getcwd (d, sizeof(d)); + if (dir) + dir = d; + } + + return (dir == 0) ? "" : dir; +} + +/* Return the working directory for the current process. */ +static char * +job_working_directory () +{ + char *dir; + + dir = get_string_value ("PWD"); + if (dir) + return (savestring (dir)); + + dir = get_working_directory ("job-working-directory"); + if (dir) + return (dir); + + return (savestring ("")); +} + +void +making_children () +{ + if (already_making_children) + return; + + already_making_children = 1; + start_pipeline (); +} + +void +stop_making_children () +{ + already_making_children = 0; +} + +void +cleanup_the_pipeline () +{ + PROCESS *disposer; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + disposer = the_pipeline; + the_pipeline = (PROCESS *)NULL; + UNBLOCK_CHILD (oset); + + if (disposer) + discard_pipeline (disposer); +} + +/* Not used right now */ +void +discard_last_procsub_child () +{ + PROCESS *disposer; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + disposer = last_procsub_child; + last_procsub_child = (PROCESS *)NULL; + UNBLOCK_CHILD (oset); + + if (disposer) + discard_pipeline (disposer); +} + +static struct pipeline_saver * +alloc_pipeline_saver () +{ + struct pipeline_saver *ret; + + ret = (struct pipeline_saver *)xmalloc (sizeof (struct pipeline_saver)); + ret->pipeline = 0; + ret->next = 0; + return ret; +} + +void +save_pipeline (clear) + int clear; +{ + sigset_t set, oset; + struct pipeline_saver *saver; + + BLOCK_CHILD (set, oset); + saver = alloc_pipeline_saver (); + saver->pipeline = the_pipeline; + saver->next = saved_pipeline; + saved_pipeline = saver; + if (clear) + the_pipeline = (PROCESS *)NULL; + saved_already_making_children = already_making_children; + UNBLOCK_CHILD (oset); +} + +PROCESS * +restore_pipeline (discard) + int discard; +{ + PROCESS *old_pipeline; + sigset_t set, oset; + struct pipeline_saver *saver; + + BLOCK_CHILD (set, oset); + old_pipeline = the_pipeline; + the_pipeline = saved_pipeline->pipeline; + saver = saved_pipeline; + saved_pipeline = saved_pipeline->next; + free (saver); + already_making_children = saved_already_making_children; + UNBLOCK_CHILD (oset); + + if (discard && old_pipeline) + { + discard_pipeline (old_pipeline); + return ((PROCESS *)NULL); + } + return old_pipeline; +} + +/* Start building a pipeline. */ +void +start_pipeline () +{ + if (the_pipeline) + { + cleanup_the_pipeline (); + /* If job_control == 0, pipeline_pgrp will always be equal to shell_pgrp; + if job_control != 0, pipeline_pgrp == shell_pgrp for command and + process substitution, in which case we want it to be the same as + shell_pgrp for the lifetime of this shell instance. */ + if (pipeline_pgrp != shell_pgrp) + pipeline_pgrp = 0; +#if defined (PGRP_PIPE) + sh_closepipe (pgrp_pipe); +#endif + } + +#if defined (PGRP_PIPE) + if (job_control) + { + if (pipe (pgrp_pipe) == -1) + sys_error (_("start_pipeline: pgrp pipe")); + } +#endif +} + +/* Stop building a pipeline. Install the process list in the job array. + This returns the index of the newly installed job. + DEFERRED is a command structure to be executed upon satisfactory + execution exit of this pipeline. */ +int +stop_pipeline (async, deferred) + int async; + COMMAND *deferred; +{ + register int i, j; + JOB *newjob; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + +#if defined (PGRP_PIPE) + /* The parent closes the process group synchronization pipe. */ + sh_closepipe (pgrp_pipe); +#endif + + cleanup_dead_jobs (); + + if (js.j_jobslots == 0) + { + js.j_jobslots = JOB_SLOTS; + jobs = (JOB **)xmalloc (js.j_jobslots * sizeof (JOB *)); + + /* Now blank out these new entries. */ + for (i = 0; i < js.j_jobslots; i++) + jobs[i] = (JOB *)NULL; + + js.j_firstj = js.j_lastj = js.j_njobs = 0; + } + + /* Scan from the last slot backward, looking for the next free one. */ + /* XXX - revisit this interactive assumption */ + /* XXX - this way for now */ + if (interactive) + { + for (i = js.j_jobslots; i; i--) + if (jobs[i - 1]) + break; + } + else + { +#if 0 + /* This wraps around, but makes it inconvenient to extend the array */ + for (i = js.j_lastj+1; i != js.j_lastj; i++) + { + if (i >= js.j_jobslots) + i = 0; + if (jobs[i] == 0) + break; + } + if (i == js.j_lastj) + i = js.j_jobslots; +#else + /* This doesn't wrap around yet. */ + for (i = js.j_lastj ? js.j_lastj + 1 : js.j_lastj; i < js.j_jobslots; i++) + if (jobs[i] == 0) + break; +#endif + } + + /* Do we need more room? */ + + /* First try compaction */ + if ((interactive_shell == 0 || subshell_environment) && i == js.j_jobslots && js.j_jobslots >= MAX_JOBS_IN_ARRAY) + i = compact_jobs_list (0); + + /* If we can't compact, reallocate */ + if (i == js.j_jobslots) + { + js.j_jobslots += JOB_SLOTS; + jobs = (JOB **)xrealloc (jobs, (js.j_jobslots * sizeof (JOB *))); + + for (j = i; j < js.j_jobslots; j++) + jobs[j] = (JOB *)NULL; + } + + /* Add the current pipeline to the job list. */ + if (the_pipeline) + { + register PROCESS *p; + int any_running, any_stopped, n; + + newjob = (JOB *)xmalloc (sizeof (JOB)); + + for (n = 1, p = the_pipeline; p->next != the_pipeline; n++, p = p->next) + ; + p->next = (PROCESS *)NULL; + newjob->pipe = REVERSE_LIST (the_pipeline, PROCESS *); + for (p = newjob->pipe; p->next; p = p->next) + ; + p->next = newjob->pipe; + + the_pipeline = (PROCESS *)NULL; + newjob->pgrp = pipeline_pgrp; + if (pipeline_pgrp != shell_pgrp) + pipeline_pgrp = 0; + + newjob->flags = 0; + if (pipefail_opt) + newjob->flags |= J_PIPEFAIL; + + /* Flag to see if in another pgrp. */ + if (job_control) + newjob->flags |= J_JOBCONTROL; + + /* Set the state of this pipeline. */ + p = newjob->pipe; + any_running = any_stopped = 0; + do + { + any_running |= PRUNNING (p); + any_stopped |= PSTOPPED (p); + p = p->next; + } + while (p != newjob->pipe); + + newjob->state = any_running ? JRUNNING : (any_stopped ? JSTOPPED : JDEAD); + newjob->wd = job_working_directory (); + newjob->deferred = deferred; + + newjob->j_cleanup = (sh_vptrfunc_t *)NULL; + newjob->cleanarg = (PTR_T) NULL; + + jobs[i] = newjob; + if (newjob->state == JDEAD && (newjob->flags & J_FOREGROUND)) + setjstatus (i); + if (newjob->state == JDEAD) + { + js.c_reaped += n; /* wouldn't have been done since this was not part of a job */ + js.j_ndead++; + } + js.c_injobs += n; + + js.j_lastj = i; + js.j_njobs++; + } + else + newjob = (JOB *)NULL; + + if (newjob) + js.j_lastmade = newjob; + + if (async) + { + if (newjob) + { + newjob->flags &= ~J_FOREGROUND; + newjob->flags |= J_ASYNC; + js.j_lastasync = newjob; + } + reset_current (); + } + else + { + if (newjob) + { + newjob->flags |= J_FOREGROUND; + /* + * !!!!! NOTE !!!!! (chet@po.cwru.edu) + * + * The currently-accepted job control wisdom says to set the + * terminal's process group n+1 times in an n-step pipeline: + * once in the parent and once in each child. This is where + * the parent gives it away. + * + * Don't give the terminal away if this shell is an asynchronous + * subshell or if we're a (presumably non-interactive) shell running + * in the background. + * + */ + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0 && running_in_background == 0) + maybe_give_terminal_to (shell_pgrp, newjob->pgrp, 0); + } + } + + stop_making_children (); + UNBLOCK_CHILD (oset); + return (newjob ? i : js.j_current); +} + +/* Functions to manage the list of exited background pids whose status has + been saved. + + pidstat_table: + + The current implementation is a hash table using a single (separate) arena + for storage that can be allocated and freed as a unit. The size of the hash + table is a multiple of PIDSTAT_TABLE_SZ (4096) and multiple PIDs that hash + to the same value are chained through the bucket_next and bucket_prev + pointers (basically coalesced hashing for collision resolution). + + bgpids.storage: + + All pid/status storage is done using the circular buffer bgpids.storage. + This must contain at least js.c_childmax entries. The circular buffer is + used to supply the ordered list Posix requires ("the last CHILD_MAX + processes"). To avoid searching the entire storage table for a given PID, + the hash table (pidstat_table) holds pointers into the storage arena and + uses a doubly-linked list of cells (bucket_next/bucket_prev, also pointers + into the arena) to implement collision resolution. */ + +/* The number of elements in bgpids.storage always has to be > js.c_childmax for + the circular buffer to work right. */ +static void +bgp_resize () +{ + ps_index_t nsize, nsize_cur, nsize_max; + ps_index_t psi; + + if (bgpids.nalloc == 0) + { + /* invalidate hash table when bgpids table is reallocated */ + for (psi = 0; psi < PIDSTAT_TABLE_SZ; psi++) + pidstat_table[psi] = NO_PIDSTAT; + nsize = BGPIDS_TABLE_SZ; /* should be power of 2 */ + bgpids.head = 0; + } + else + nsize = bgpids.nalloc; + + nsize_max = TYPE_MAXIMUM (ps_index_t); + nsize_cur = (ps_index_t)js.c_childmax; + if (nsize_cur < 0) /* overflow */ + nsize_cur = MAX_CHILD_MAX; + + while (nsize > 0 && nsize < nsize_cur) /* > 0 should catch overflow */ + nsize <<= 1; + if (nsize > nsize_max || nsize <= 0) /* overflow? */ + nsize = nsize_max; + if (nsize > MAX_CHILD_MAX) + nsize = nsize_max = MAX_CHILD_MAX; /* hard cap */ + + if (bgpids.nalloc < nsize_cur && bgpids.nalloc < nsize_max) + { + bgpids.storage = (struct pidstat *)xrealloc (bgpids.storage, nsize * sizeof (struct pidstat)); + + for (psi = bgpids.nalloc; psi < nsize; psi++) + bgpids.storage[psi].pid = NO_PID; + + bgpids.nalloc = nsize; + + } + else if (bgpids.head >= bgpids.nalloc) /* wrap around */ + bgpids.head = 0; +} + +static ps_index_t +bgp_getindex () +{ + if (bgpids.nalloc < (ps_index_t)js.c_childmax || bgpids.head >= bgpids.nalloc) + bgp_resize (); + + pshash_delindex (bgpids.head); /* XXX - clear before reusing */ + return bgpids.head++; +} + +static ps_index_t * +pshash_getbucket (pid) + pid_t pid; +{ + unsigned long hash; /* XXX - u_bits32_t */ + + hash = pid * 0x9e370001UL; + return (&pidstat_table[hash % PIDSTAT_TABLE_SZ]); +} + +static struct pidstat * +bgp_add (pid, status) + pid_t pid; + int status; +{ + ps_index_t *bucket, psi; + struct pidstat *ps; + + /* bucket == existing chain of pids hashing to same value + psi = where were going to put this pid/status */ + + bucket = pshash_getbucket (pid); /* index into pidstat_table */ + psi = bgp_getindex (); /* bgpids.head, index into storage */ + + /* XXX - what if psi == *bucket? */ + if (psi == *bucket) + { +#ifdef DEBUG + internal_warning ("hashed pid %d (pid %d) collides with bgpids.head, skipping", psi, pid); +#endif + bgpids.storage[psi].pid = NO_PID; /* make sure */ + psi = bgp_getindex (); /* skip to next one */ + } + + ps = &bgpids.storage[psi]; + + ps->pid = pid; + ps->status = status; + ps->bucket_next = *bucket; + ps->bucket_prev = NO_PIDSTAT; + + bgpids.npid++; + +#if 0 + if (bgpids.npid > js.c_childmax) + bgp_prune (); +#endif + + if (ps->bucket_next != NO_PIDSTAT) + bgpids.storage[ps->bucket_next].bucket_prev = psi; + + *bucket = psi; /* set chain head in hash table */ + + return ps; +} + +static void +pshash_delindex (psi) + ps_index_t psi; +{ + struct pidstat *ps; + ps_index_t *bucket; + + ps = &bgpids.storage[psi]; + if (ps->pid == NO_PID) + return; + + if (ps->bucket_next != NO_PIDSTAT) + bgpids.storage[ps->bucket_next].bucket_prev = ps->bucket_prev; + if (ps->bucket_prev != NO_PIDSTAT) + bgpids.storage[ps->bucket_prev].bucket_next = ps->bucket_next; + else + { + bucket = pshash_getbucket (ps->pid); + *bucket = ps->bucket_next; /* deleting chain head in hash table */ + } + + /* clear out this cell, in case it gets reused. */ + ps->pid = NO_PID; + ps->bucket_next = ps->bucket_prev = NO_PIDSTAT; +} + +static int +bgp_delete (pid) + pid_t pid; +{ + ps_index_t psi, orig_psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) + return 0; + + /* Search chain using hash to find bucket in pidstat_table */ + for (orig_psi = psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) + { + if (bgpids.storage[psi].pid == pid) + break; + if (orig_psi == bgpids.storage[psi].bucket_next) /* catch reported bug */ + { + internal_warning (_("bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next"), psi); + return 0; + } + } + + if (psi == NO_PIDSTAT) + return 0; /* not found */ + +#if defined (DEBUG) + itrace("bgp_delete: deleting %d", pid); +#endif + + pshash_delindex (psi); /* hash table management */ + + bgpids.npid--; + return 1; +} + +/* Clear out the list of saved statuses */ +static void +bgp_clear () +{ + if (bgpids.storage == 0 || bgpids.nalloc == 0) + return; + + free (bgpids.storage); + + bgpids.storage = 0; + bgpids.nalloc = 0; + bgpids.head = 0; + + bgpids.npid = 0; +} + +/* Search for PID in the list of saved background pids; return its status if + found. If not found, return -1. We hash to the right spot in pidstat_table + and follow the bucket chain to the end. */ +static int +bgp_search (pid) + pid_t pid; +{ + ps_index_t psi, orig_psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) + return -1; + + /* Search chain using hash to find bucket in pidstat_table */ + for (orig_psi = psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) + { + if (bgpids.storage[psi].pid == pid) + return (bgpids.storage[psi].status); + if (orig_psi == bgpids.storage[psi].bucket_next) /* catch reported bug */ + { + internal_warning (_("bgp_search: LOOP: psi (%d) == storage[psi].bucket_next"), psi); + return -1; + } + } + + return -1; +} + +#if 0 +static void +bgp_prune () +{ + return; +} +#endif + +/* External interface to bgp_add; takes care of blocking and unblocking + SIGCHLD. Not really used. */ +void +save_proc_status (pid, status) + pid_t pid; + int status; +{ + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + bgp_add (pid, status); + UNBLOCK_CHILD (oset); +} + +#if defined (PROCESS_SUBSTITUTION) +/* Functions to add and remove PROCESS * children from the list of running + asynchronous process substitutions. The list is currently a simple singly + linked list of PROCESS *, so it works with the set of callers that want + a child. subst.c:process_substitute adds to the list, the various wait* + functions manipulate child->running and child->status, and processes are + eventually removed from the list and added to the bgpids table. */ + +static void +procsub_free (p) + PROCESS *p; +{ + FREE (p->command); + free (p); +} + +PROCESS * +procsub_add (p) + PROCESS *p; +{ + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + if (procsubs.head == 0) + { + procsubs.head = procsubs.end = p; + procsubs.nproc = 0; + } + else + { + procsubs.end->next = p; + procsubs.end = p; + } + procsubs.nproc++; + UNBLOCK_CHILD (oset); + + return p; +} + +PROCESS * +procsub_search (pid) + pid_t pid; +{ + PROCESS *p; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + for (p = procsubs.head; p; p = p->next) + if (p->pid == pid) + break; + UNBLOCK_CHILD (oset); + + return p; +} + +PROCESS * +procsub_delete (pid) + pid_t pid; +{ + PROCESS *p, *prev; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + for (p = prev = procsubs.head; p; prev = p, p = p->next) + if (p->pid == pid) + { + prev->next = p->next; + break; + } + + if (p == 0) + { + UNBLOCK_CHILD (oset); + return p; + } + + if (p == procsubs.head) + procsubs.head = procsubs.head->next; + else if (p == procsubs.end) + procsubs.end = prev; + + procsubs.nproc--; + if (procsubs.nproc == 0) + procsubs.head = procsubs.end = 0; + else if (procsubs.nproc == 1) /* XXX */ + procsubs.end = procsubs.head; + + /* this can't be called anywhere in a signal handling path */ + bgp_add (p->pid, process_exit_status (p->status)); + UNBLOCK_CHILD (oset); + return (p); +} + +int +procsub_waitpid (pid) + pid_t pid; +{ + PROCESS *p; + int r; + + p = procsub_search (pid); + if (p == 0) + return -1; + if (p->running == PS_DONE) + return (p->status); + r = wait_for (p->pid, 0); + return (r); /* defer removing until later */ +} + +void +procsub_waitall () +{ + PROCESS *p; + int r; + + for (p = procsubs.head; p; p = p->next) + { + if (p->running == PS_DONE) + continue; + r = wait_for (p->pid, 0); + } +} + +void +procsub_clear () +{ + PROCESS *p, *ps; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + + for (ps = procsubs.head; ps; ) + { + p = ps; + ps = ps->next; + procsub_free (p); + } + procsubs.head = procsubs.end = 0; + procsubs.nproc = 0; + UNBLOCK_CHILD (oset); +} + +/* Must be called with SIGCHLD blocked. */ +void +procsub_prune () +{ + PROCESS *ohead, *oend, *ps, *p; + int onproc; + + if (procsubs.nproc == 0) + return; + + ohead = procsubs.head; + oend = procsubs.end; + onproc = procsubs.nproc; + + procsubs.head = procsubs.end = 0; + procsubs.nproc = 0; + + for (p = ohead; p; ) + { + ps = p->next; + p->next = 0; + if (p->running == PS_DONE) + { + bgp_add (p->pid, process_exit_status (p->status)); + procsub_free (p); + } + else + procsub_add (p); + p = ps; + } +} +#endif + +/* Reset the values of js.j_lastj and js.j_firstj after one or both have + been deleted. The caller should check whether js.j_njobs is 0 before + calling this. This wraps around, but the rest of the code does not. At + this point, it should not matter. */ +static void +reset_job_indices () +{ + int old; + + if (jobs[js.j_firstj] == 0) + { + old = js.j_firstj++; + if (old >= js.j_jobslots) + old = js.j_jobslots - 1; + while (js.j_firstj != old) + { + if (js.j_firstj >= js.j_jobslots) + js.j_firstj = 0; + if (jobs[js.j_firstj] || js.j_firstj == old) /* needed if old == 0 */ + break; + js.j_firstj++; + } + if (js.j_firstj == old) + js.j_firstj = js.j_lastj = js.j_njobs = 0; + } + if (jobs[js.j_lastj] == 0) + { + old = js.j_lastj--; + if (old < 0) + old = 0; + while (js.j_lastj != old) + { + if (js.j_lastj < 0) + js.j_lastj = js.j_jobslots - 1; + if (jobs[js.j_lastj] || js.j_lastj == old) /* needed if old == js.j_jobslots */ + break; + js.j_lastj--; + } + if (js.j_lastj == old) + js.j_firstj = js.j_lastj = js.j_njobs = 0; + } +} + +/* Delete all DEAD jobs that the user had received notification about. */ +static void +cleanup_dead_jobs () +{ + register int i; + int os; + PROCESS *discard; + + if (js.j_jobslots == 0 || jobs_list_frozen) + return; + + QUEUE_SIGCHLD(os); + + /* XXX could use js.j_firstj and js.j_lastj here */ + for (i = 0; i < js.j_jobslots; i++) + { +#if defined (DEBUG) + if (i < js.j_firstj && jobs[i]) + itrace("cleanup_dead_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("cleanup_dead_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); +#endif + + if (jobs[i] && DEADJOB (i) && IS_NOTIFIED (i)) + delete_job (i, 0); + } + +#if defined (PROCESS_SUBSTITUTION) + procsub_prune (); + last_procsub_child = (PROCESS *)NULL; +#endif + +#if defined (COPROCESS_SUPPORT) + coproc_reap (); +#endif + + UNQUEUE_SIGCHLD(os); +} + +static int +processes_in_job (job) + int job; +{ + int nproc; + register PROCESS *p; + + nproc = 0; + p = jobs[job]->pipe; + do + { + p = p->next; + nproc++; + } + while (p != jobs[job]->pipe); + + return nproc; +} + +static void +delete_old_job (pid) + pid_t pid; +{ + PROCESS *p; + int job; + + job = find_job (pid, 0, &p); + if (job != NO_JOB) + { +#ifdef DEBUG + itrace ("delete_old_job: found pid %d in job %d with state %d", pid, job, jobs[job]->state); +#endif + if (JOBSTATE (job) == JDEAD) + delete_job (job, DEL_NOBGPID); + else + { +#ifdef DEBUG + internal_warning (_("forked pid %d appears in running job %d"), pid, job+1); +#endif + if (p) + p->pid = 0; + } + } +} + +/* Reallocate and compress the jobs list. This returns with a jobs array + whose size is a multiple of JOB_SLOTS and can hold the current number of + jobs. Heuristics are used to minimize the number of new reallocs. */ +static void +realloc_jobs_list () +{ + sigset_t set, oset; + int nsize, i, j, ncur, nprev; + JOB **nlist; + + ncur = nprev = NO_JOB; + nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS); + nsize *= JOB_SLOTS; + i = js.j_njobs % JOB_SLOTS; + if (i == 0 || i > (JOB_SLOTS >> 1)) + nsize += JOB_SLOTS; + + BLOCK_CHILD (set, oset); + nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *)); + + js.c_reaped = js.j_ndead = 0; + for (i = j = 0; i < js.j_jobslots; i++) + if (jobs[i]) + { + if (i == js.j_current) + ncur = j; + if (i == js.j_previous) + nprev = j; + nlist[j++] = jobs[i]; + if (jobs[i]->state == JDEAD) + { + js.j_ndead++; + js.c_reaped += processes_in_job (i); + } + } + +#if 0 + itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize); + itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0); + itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, j); + itrace ("realloc_jobs_list: js.j_ndead %d js.c_reaped %d", js.j_ndead, js.c_reaped); +#endif + + js.j_firstj = 0; + js.j_lastj = (j > 0) ? j - 1 : 0; + js.j_njobs = j; + js.j_jobslots = nsize; + + /* Zero out remaining slots in new jobs list */ + for ( ; j < nsize; j++) + nlist[j] = (JOB *)NULL; + + if (jobs != nlist) + { + free (jobs); + jobs = nlist; + } + + if (ncur != NO_JOB) + js.j_current = ncur; + if (nprev != NO_JOB) + js.j_previous = nprev; + + /* Need to reset these */ + if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj) + reset_current (); + +#if 0 + itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous); +#endif + + UNBLOCK_CHILD (oset); +} + +/* Compact the jobs list by removing dead jobs. Assume that we have filled + the jobs array to some predefined maximum. Called when the shell is not + the foreground process (subshell_environment != 0). Returns the first + available slot in the compacted list. If that value is js.j_jobslots, then + the list needs to be reallocated. The jobs array may be in new memory if + this returns > 0 and < js.j_jobslots. FLAGS is reserved for future use. */ +static int +compact_jobs_list (flags) + int flags; +{ + if (js.j_jobslots == 0 || jobs_list_frozen) + return js.j_jobslots; + + reap_dead_jobs (); + realloc_jobs_list (); + +#if 0 + itrace("compact_jobs_list: returning %d", (js.j_lastj || jobs[js.j_lastj]) ? js.j_lastj + 1 : 0); +#endif + + return ((js.j_lastj || jobs[js.j_lastj]) ? js.j_lastj + 1 : 0); +} + +/* Delete the job at INDEX from the job list. Must be called + with SIGCHLD blocked. */ +void +delete_job (job_index, dflags) + int job_index, dflags; +{ + register JOB *temp; + PROCESS *proc; + int ndel; + + if (js.j_jobslots == 0 || jobs_list_frozen) + return; + + if ((dflags & DEL_WARNSTOPPED) && subshell_environment == 0 && STOPPED (job_index)) + internal_warning (_("deleting stopped job %d with process group %ld"), job_index+1, (long)jobs[job_index]->pgrp); + temp = jobs[job_index]; + if (temp == 0) + return; + + if ((dflags & DEL_NOBGPID) == 0 && (temp->flags & (J_ASYNC|J_FOREGROUND)) == J_ASYNC) + { + proc = find_last_proc (job_index, 0); + if (proc) + bgp_add (proc->pid, process_exit_status (proc->status)); + } + + jobs[job_index] = (JOB *)NULL; + if (temp == js.j_lastmade) + js.j_lastmade = 0; + else if (temp == js.j_lastasync) + js.j_lastasync = 0; + + free (temp->wd); + ndel = discard_pipeline (temp->pipe); + + js.c_injobs -= ndel; + if (temp->state == JDEAD) + { + /* XXX - save_pipeline and restore_pipeline (e.g., for DEBUG trap) can + mess with this total. */ + js.c_reaped -= ndel; /* assumes proc hadn't been reaped earlier */ + js.j_ndead--; + if (js.c_reaped < 0) + { +#ifdef DEBUG + itrace("delete_job (%d pgrp %d): js.c_reaped (%d) < 0 ndel = %d js.j_ndead = %d", job_index, temp->pgrp, js.c_reaped, ndel, js.j_ndead); +#endif + js.c_reaped = 0; + } + } + + if (temp->deferred) + dispose_command (temp->deferred); + + free (temp); + + js.j_njobs--; + if (js.j_njobs == 0) + js.j_firstj = js.j_lastj = 0; + else if (jobs[js.j_firstj] == 0 || jobs[js.j_lastj] == 0) + reset_job_indices (); + + if (job_index == js.j_current || job_index == js.j_previous) + reset_current (); +} + +/* Must be called with SIGCHLD blocked. */ +void +nohup_job (job_index) + int job_index; +{ + register JOB *temp; + + if (js.j_jobslots == 0) + return; + + if (temp = jobs[job_index]) + temp->flags |= J_NOHUP; +} + +/* Get rid of the data structure associated with a process chain. */ +int +discard_pipeline (chain) + register PROCESS *chain; +{ + register PROCESS *this, *next; + int n; + + this = chain; + n = 0; + do + { + next = this->next; + FREE (this->command); + free (this); + n++; + this = next; + } + while (this != chain); + + return n; +} + +/* Add this process to the chain being built in the_pipeline. + NAME is the command string that will be exec'ed later. + PID is the process id of the child. */ +static void +add_process (name, pid) + char *name; + pid_t pid; +{ + PROCESS *t, *p; + +#if defined (RECYCLES_PIDS) + int j; + p = find_process (pid, 0, &j); + if (p) + { +# ifdef DEBUG + if (j == NO_JOB) + internal_warning ("add_process: process %5ld (%s) in the_pipeline", (long)p->pid, p->command); +# endif + if (PALIVE (p)) + internal_warning (_("add_process: pid %5ld (%s) marked as still alive"), (long)p->pid, p->command); + p->running = PS_RECYCLED; /* mark as recycled */ + } +#endif + + t = (PROCESS *)xmalloc (sizeof (PROCESS)); + t->next = the_pipeline; + t->pid = pid; + WSTATUS (t->status) = 0; + t->running = PS_RUNNING; + t->command = name; + the_pipeline = t; + + if (t->next == 0) + t->next = t; + else + { + p = t->next; + while (p->next != t->next) + p = p->next; + p->next = t; + } +} + +/* Create a (dummy) PROCESS with NAME, PID, and STATUS, and make it the last + process in jobs[JID]->pipe. Used by the lastpipe code. */ +void +append_process (name, pid, status, jid) + char *name; + pid_t pid; + int status; + int jid; +{ + PROCESS *t, *p; + + t = (PROCESS *)xmalloc (sizeof (PROCESS)); + t->next = (PROCESS *)NULL; + t->pid = pid; + /* set process exit status using offset discovered by configure */ + t->status = (status & 0xff) << WEXITSTATUS_OFFSET; + t->running = PS_DONE; + t->command = name; + + js.c_reaped++; /* XXX */ + + for (p = jobs[jid]->pipe; p->next != jobs[jid]->pipe; p = p->next) + ; + p->next = t; + t->next = jobs[jid]->pipe; +} + +#if 0 +/* Take the last job and make it the first job. Must be called with + SIGCHLD blocked. */ +int +rotate_the_pipeline () +{ + PROCESS *p; + + if (the_pipeline->next == the_pipeline) + return; + for (p = the_pipeline; p->next != the_pipeline; p = p->next) + ; + the_pipeline = p; +} + +/* Reverse the order of the processes in the_pipeline. Must be called with + SIGCHLD blocked. */ +int +reverse_the_pipeline () +{ + PROCESS *p, *n; + + if (the_pipeline->next == the_pipeline) + return; + + for (p = the_pipeline; p->next != the_pipeline; p = p->next) + ; + p->next = (PROCESS *)NULL; + + n = REVERSE_LIST (the_pipeline, PROCESS *); + + the_pipeline = n; + for (p = the_pipeline; p->next; p = p->next) + ; + p->next = the_pipeline; +} +#endif + +/* Map FUNC over the list of jobs. If FUNC returns non-zero, + then it is time to stop mapping, and that is the return value + for map_over_jobs. FUNC is called with a JOB, arg1, arg2, + and INDEX. */ +static int +map_over_jobs (func, arg1, arg2) + sh_job_map_func_t *func; + int arg1, arg2; +{ + register int i; + int result; + sigset_t set, oset; + + if (js.j_jobslots == 0) + return 0; + + BLOCK_CHILD (set, oset); + + /* XXX could use js.j_firstj here */ + for (i = result = 0; i < js.j_jobslots; i++) + { +#if defined (DEBUG) + if (i < js.j_firstj && jobs[i]) + itrace("map_over_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("map_over_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); +#endif + if (jobs[i]) + { + result = (*func)(jobs[i], arg1, arg2, i); + if (result) + break; + } + } + + UNBLOCK_CHILD (oset); + + return (result); +} + +/* Cause all the jobs in the current pipeline to exit. */ +void +terminate_current_pipeline () +{ + if (pipeline_pgrp && pipeline_pgrp != shell_pgrp) + { + killpg (pipeline_pgrp, SIGTERM); + killpg (pipeline_pgrp, SIGCONT); + } +} + +/* Cause all stopped jobs to exit. */ +void +terminate_stopped_jobs () +{ + register int i; + + /* XXX could use js.j_firstj here */ + for (i = 0; i < js.j_jobslots; i++) + { + if (jobs[i] && STOPPED (i)) + { + killpg (jobs[i]->pgrp, SIGTERM); + killpg (jobs[i]->pgrp, SIGCONT); + } + } +} + +/* Cause all jobs, running or stopped, to receive a hangup signal. If + a job is marked J_NOHUP, don't send the SIGHUP. */ +void +hangup_all_jobs () +{ + register int i; + + /* XXX could use js.j_firstj here */ + for (i = 0; i < js.j_jobslots; i++) + { + if (jobs[i]) + { + if (jobs[i]->flags & J_NOHUP) + continue; + killpg (jobs[i]->pgrp, SIGHUP); + if (STOPPED (i)) + killpg (jobs[i]->pgrp, SIGCONT); + } + } +} + +void +kill_current_pipeline () +{ + stop_making_children (); + start_pipeline (); +} + +static PROCESS * +find_pid_in_pipeline (pid, pipeline, alive_only) + pid_t pid; + PROCESS *pipeline; + int alive_only; +{ + PROCESS *p; + + p = pipeline; + do + { + /* Return it if we found it. Don't ever return a recycled pid. */ + if (p->pid == pid && ((alive_only == 0 && PRECYCLED(p) == 0) || PALIVE(p))) + return (p); + + p = p->next; + } + while (p != pipeline); + return ((PROCESS *)NULL); +} + +/* Return the pipeline that PID belongs to. Note that the pipeline + doesn't have to belong to a job. Must be called with SIGCHLD blocked. + If JOBP is non-null, return the index of the job containing PID. */ +static PROCESS * +find_pipeline (pid, alive_only, jobp) + pid_t pid; + int alive_only; + int *jobp; /* index into jobs list or NO_JOB */ +{ + int job; + PROCESS *p; + struct pipeline_saver *save; + + /* See if this process is in the pipeline that we are building. */ + p = (PROCESS *)NULL; + if (jobp) + *jobp = NO_JOB; + + if (the_pipeline && (p = find_pid_in_pipeline (pid, the_pipeline, alive_only))) + return (p); + + /* Is this process in a saved pipeline? */ + for (save = saved_pipeline; save; save = save->next) + if (save->pipeline && (p = find_pid_in_pipeline (pid, save->pipeline, alive_only))) + return (p); + +#if defined (PROCESS_SUBSTITUTION) + if (procsubs.nproc > 0 && (p = procsub_search (pid)) && ((alive_only == 0 && PRECYCLED(p) == 0) || PALIVE(p))) + return (p); +#endif + + job = find_job (pid, alive_only, &p); + if (jobp) + *jobp = job; + return (job == NO_JOB) ? (PROCESS *)NULL : jobs[job]->pipe; +} + +/* Return the PROCESS * describing PID. If JOBP is non-null return the index + into the jobs array of the job containing PID. Must be called with + SIGCHLD blocked. */ +static PROCESS * +find_process (pid, alive_only, jobp) + pid_t pid; + int alive_only; + int *jobp; /* index into jobs list or NO_JOB */ +{ + PROCESS *p; + + p = find_pipeline (pid, alive_only, jobp); + while (p && p->pid != pid) + p = p->next; + return p; +} + +/* Return the job index that PID belongs to, or NO_JOB if it doesn't + belong to any job. Must be called with SIGCHLD blocked. */ +static int +find_job (pid, alive_only, procp) + pid_t pid; + int alive_only; + PROCESS **procp; +{ + register int i; + PROCESS *p; + + /* XXX could use js.j_firstj here, and should check js.j_lastj */ + for (i = 0; i < js.j_jobslots; i++) + { +#if defined (DEBUG) + if (i < js.j_firstj && jobs[i]) + itrace("find_job: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("find_job: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); +#endif + if (jobs[i]) + { + p = jobs[i]->pipe; + + do + { + if (p->pid == pid && ((alive_only == 0 && PRECYCLED(p) == 0) || PALIVE(p))) + { + if (procp) + *procp = p; + return (i); + } + + p = p->next; + } + while (p != jobs[i]->pipe); + } + } + + return (NO_JOB); +} + +/* Find a job given a PID. If BLOCK is non-zero, block SIGCHLD as + required by find_job. */ +int +get_job_by_pid (pid, block, procp) + pid_t pid; + int block; + PROCESS **procp; +{ + int job; + sigset_t set, oset; + + if (block) + BLOCK_CHILD (set, oset); + + job = find_job (pid, 0, procp); + + if (block) + UNBLOCK_CHILD (oset); + + return job; +} + +/* Print descriptive information about the job with leader pid PID. */ +void +describe_pid (pid) + pid_t pid; +{ + int job; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + + job = find_job (pid, 0, NULL); + + if (job != NO_JOB) + fprintf (stderr, "[%d] %ld\n", job + 1, (long)pid); + else + programming_error (_("describe_pid: %ld: no such pid"), (long)pid); + + UNBLOCK_CHILD (oset); +} + +static char * +j_strsignal (s) + int s; +{ + char *x; + + x = strsignal (s); + if (x == 0) + { + x = retcode_name_buffer; + snprintf (x, sizeof(retcode_name_buffer), _("Signal %d"), s); + } + return x; +} + +static char * +printable_job_status (j, p, format) + int j; + PROCESS *p; + int format; +{ + static char *temp; + int es; + + temp = _("Done"); + + if (STOPPED (j) && format == 0) + { + if (posixly_correct == 0 || p == 0 || (WIFSTOPPED (p->status) == 0)) + temp = _("Stopped"); + else + { + temp = retcode_name_buffer; + snprintf (temp, sizeof(retcode_name_buffer), _("Stopped(%s)"), signal_name (WSTOPSIG (p->status))); + } + } + else if (RUNNING (j)) + temp = _("Running"); + else + { + if (WIFSTOPPED (p->status)) + temp = j_strsignal (WSTOPSIG (p->status)); + else if (WIFSIGNALED (p->status)) + temp = j_strsignal (WTERMSIG (p->status)); + else if (WIFEXITED (p->status)) + { + temp = retcode_name_buffer; + es = WEXITSTATUS (p->status); + if (es == 0) + { + strncpy (temp, _("Done"), sizeof (retcode_name_buffer) - 1); + temp[sizeof (retcode_name_buffer) - 1] = '\0'; + } + else if (posixly_correct) + snprintf (temp, sizeof(retcode_name_buffer), _("Done(%d)"), es); + else + snprintf (temp, sizeof(retcode_name_buffer), _("Exit %d"), es); + } + else + temp = _("Unknown status"); + } + + return temp; +} + +/* This is the way to print out information on a job if you + know the index. FORMAT is: + + JLIST_NORMAL) [1]+ Running emacs + JLIST_LONG ) [1]+ 2378 Running emacs + -1 ) [1]+ 2378 emacs + + JLIST_NORMAL) [1]+ Stopped ls | more + JLIST_LONG ) [1]+ 2369 Stopped ls + 2367 | more + JLIST_PID_ONLY) + Just list the pid of the process group leader (really + the process group). + JLIST_CHANGED_ONLY) + Use format JLIST_NORMAL, but list only jobs about which + the user has not been notified. */ + +/* Print status for pipeline P. If JOB_INDEX is >= 0, it is the index into + the JOBS array corresponding to this pipeline. FORMAT is as described + above. Must be called with SIGCHLD blocked. + + If you're printing a pipeline that's not in the jobs array, like the + current pipeline as it's being created, pass -1 for JOB_INDEX */ +static void +print_pipeline (p, job_index, format, stream) + PROCESS *p; + int job_index, format; + FILE *stream; +{ + PROCESS *first, *last, *show; + int es, name_padding; + char *temp; + + if (p == 0) + return; + + first = last = p; + while (last->next != first) + last = last->next; + + for (;;) + { + if (p != first) + fprintf (stream, format ? " " : " |"); + + if (format != JLIST_STANDARD) + fprintf (stream, "%5ld", (long)p->pid); + + fprintf (stream, " "); + + if (format > -1 && job_index >= 0) + { + show = format ? p : last; + temp = printable_job_status (job_index, show, format); + + if (p != first) + { + if (format) + { + if (show->running == first->running && + WSTATUS (show->status) == WSTATUS (first->status)) + temp = ""; + } + else + temp = (char *)NULL; + } + + if (temp) + { + fprintf (stream, "%s", temp); + + es = STRLEN (temp); + if (es == 0) + es = 2; /* strlen ("| ") */ + name_padding = LONGEST_SIGNAL_DESC - es; + + fprintf (stream, "%*s", name_padding, ""); + + if ((WIFSTOPPED (show->status) == 0) && + (WIFCONTINUED (show->status) == 0) && + WIFCORED (show->status)) + fprintf (stream, _("(core dumped) ")); + } + } + + if (p != first && format) + fprintf (stream, "| "); + + if (p->command) + fprintf (stream, "%s", p->command); + + if (p == last && job_index >= 0) + { + temp = current_working_directory (); + + if (RUNNING (job_index) && (IS_FOREGROUND (job_index) == 0)) + fprintf (stream, " &"); + + if (strcmp (temp, jobs[job_index]->wd) != 0) + fprintf (stream, + _(" (wd: %s)"), polite_directory_format (jobs[job_index]->wd)); + } + + if (format || (p == last)) + { + /* We need to add a CR only if this is an interactive shell, and + we're reporting the status of a completed job asynchronously. + We can't really check whether this particular job is being + reported asynchronously, so just add the CR if the shell is + currently interactive and asynchronous notification is enabled. */ + if (asynchronous_notification && interactive) + putc ('\r', stream); + fprintf (stream, "\n"); + } + + if (p == last) + break; + p = p->next; + } + fflush (stream); +} + +/* Print information to STREAM about jobs[JOB_INDEX] according to FORMAT. + Must be called with SIGCHLD blocked or queued with queue_sigchld */ +static void +pretty_print_job (job_index, format, stream) + int job_index, format; + FILE *stream; +{ + register PROCESS *p; + + /* Format only pid information about the process group leader? */ + if (format == JLIST_PID_ONLY) + { + fprintf (stream, "%ld\n", (long)jobs[job_index]->pipe->pid); + return; + } + + if (format == JLIST_CHANGED_ONLY) + { + if (IS_NOTIFIED (job_index)) + return; + format = JLIST_STANDARD; + } + + if (format != JLIST_NONINTERACTIVE) + fprintf (stream, "[%d]%c ", job_index + 1, + (job_index == js.j_current) ? '+': + (job_index == js.j_previous) ? '-' : ' '); + + if (format == JLIST_NONINTERACTIVE) + format = JLIST_LONG; + + p = jobs[job_index]->pipe; + + print_pipeline (p, job_index, format, stream); + + /* We have printed information about this job. When the job's + status changes, waitchld () sets the notification flag to 0. */ + jobs[job_index]->flags |= J_NOTIFIED; +} + +static int +print_job (job, format, state, job_index) + JOB *job; + int format, state, job_index; +{ + if (state == -1 || (JOB_STATE)state == job->state) + pretty_print_job (job_index, format, stdout); + return (0); +} + +void +list_one_job (job, format, ignore, job_index) + JOB *job; + int format, ignore, job_index; +{ + pretty_print_job (job_index, format, stdout); + cleanup_dead_jobs (); +} + +void +list_stopped_jobs (format) + int format; +{ + cleanup_dead_jobs (); + map_over_jobs (print_job, format, (int)JSTOPPED); +} + +void +list_running_jobs (format) + int format; +{ + cleanup_dead_jobs (); + map_over_jobs (print_job, format, (int)JRUNNING); +} + +/* List jobs. If FORMAT is non-zero, then the long form of the information + is printed, else just a short version. */ +void +list_all_jobs (format) + int format; +{ + cleanup_dead_jobs (); + map_over_jobs (print_job, format, -1); +} + +/* Fork, handling errors. Returns the pid of the newly made child, or 0. + COMMAND is just for remembering the name of the command; we don't do + anything else with it. ASYNC_P says what to do with the tty. If + non-zero, then don't give it away. */ +pid_t +make_child (command, flags) + char *command; + int flags; +{ + int async_p, forksleep; + sigset_t set, oset, termset, chldset, oset_copy; + pid_t pid; + SigHandler *oterm; + + sigemptyset (&oset_copy); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &oset_copy); + sigaddset (&oset_copy, SIGTERM); + + /* Block SIGTERM here and unblock in child after fork resets the + set of pending signals. */ + sigemptyset (&set); + sigaddset (&set, SIGCHLD); + sigaddset (&set, SIGINT); + sigaddset (&set, SIGTERM); + + sigemptyset (&oset); + sigprocmask (SIG_BLOCK, &set, &oset); + + /* Blocked in the parent, child will receive it after unblocking SIGTERM */ + if (interactive_shell) + oterm = set_signal_handler (SIGTERM, SIG_DFL); + + making_children (); + + async_p = (flags & FORK_ASYNC); + forksleep = 1; + +#if defined (BUFFERED_INPUT) + /* If default_buffered_input is active, we are reading a script. If + the command is asynchronous, we have already duplicated /dev/null + as fd 0, but have not changed the buffered stream corresponding to + the old fd 0. We don't want to sync the stream in this case. */ + if (default_buffered_input != -1 && + (!async_p || default_buffered_input > 0)) + sync_buffered_stream (default_buffered_input); +#endif /* BUFFERED_INPUT */ + + /* Create the child, handle severe errors. Retry on EAGAIN. */ + while ((pid = fork ()) < 0 && errno == EAGAIN && forksleep < FORKSLEEP_MAX) + { + /* bash-4.2 */ + /* keep SIGTERM blocked until we reset the handler to SIG_IGN */ + sigprocmask (SIG_SETMASK, &oset_copy, (sigset_t *)NULL); + /* If we can't create any children, try to reap some dead ones. */ + waitchld (-1, 0); + + errno = EAGAIN; /* restore errno */ + sys_error ("fork: retry"); + + if (sleep (forksleep) != 0) + break; + forksleep <<= 1; + + if (interrupt_state) + break; + sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL); + } + + if (pid != 0) + if (interactive_shell) + set_signal_handler (SIGTERM, oterm); + + if (pid < 0) + { + sys_error ("fork"); + + /* Kill all of the processes in the current pipeline. */ + terminate_current_pipeline (); + + /* Discard the current pipeline, if any. */ + if (the_pipeline) + kill_current_pipeline (); + + set_exit_status (EX_NOEXEC); + throw_to_top_level (); /* Reset signals, etc. */ + } + + if (pid == 0) + { + /* In the child. Give this child the right process group, set the + signals to the default state for a new process. */ + pid_t mypid; + + /* If this ends up being changed to modify or use `command' in the + child process, go back and change callers who free `command' in + the child process when this returns. */ + mypid = getpid (); +#if defined (BUFFERED_INPUT) + /* Close default_buffered_input if it's > 0. We don't close it if it's + 0 because that's the file descriptor used when redirecting input, + and it's wrong to close the file in that case. */ + unset_bash_input (0); +#endif /* BUFFERED_INPUT */ + + CLRINTERRUPT; /* XXX - children have their own interrupt state */ + + /* Restore top-level signal mask, including unblocking SIGTERM */ + restore_sigmask (); + + if (job_control) + { + /* All processes in this pipeline belong in the same + process group. */ + + if (pipeline_pgrp == 0) /* This is the first child. */ + pipeline_pgrp = mypid; + + /* Check for running command in backquotes. */ + if (pipeline_pgrp == shell_pgrp) + ignore_tty_job_signals (); + else + default_tty_job_signals (); + + /* Set the process group before trying to mess with the terminal's + process group. This is mandated by POSIX. */ + /* This is in accordance with the Posix 1003.1 standard, + section B.7.2.4, which says that trying to set the terminal + process group with tcsetpgrp() to an unused pgrp value (like + this would have for the first child) is an error. Section + B.4.3.3, p. 237 also covers this, in the context of job control + shells. */ + if (setpgid (mypid, pipeline_pgrp) < 0) + sys_error (_("child setpgid (%ld to %ld)"), (long)mypid, (long)pipeline_pgrp); + + /* By convention (and assumption above), if + pipeline_pgrp == shell_pgrp, we are making a child for + command substitution. + In this case, we don't want to give the terminal to the + shell's process group (we could be in the middle of a + pipeline, for example). */ + if ((flags & FORK_NOTERM) == 0 && async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&(SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0) && running_in_background == 0) + give_terminal_to (pipeline_pgrp, 0); + +#if defined (PGRP_PIPE) + if (pipeline_pgrp == mypid) + pipe_read (pgrp_pipe); +#endif + } + else /* Without job control... */ + { + if (pipeline_pgrp == 0) + pipeline_pgrp = shell_pgrp; + + /* If these signals are set to SIG_DFL, we encounter the curious + situation of an interactive ^Z to a running process *working* + and stopping the process, but being unable to do anything with + that process to change its state. On the other hand, if they + are set to SIG_IGN, jobs started from scripts do not stop when + the shell running the script gets a SIGTSTP and stops. */ + + default_tty_job_signals (); + } + +#if defined (PGRP_PIPE) + /* Release the process group pipe, since our call to setpgid () + is done. The last call to sh_closepipe is done in stop_pipeline. */ + sh_closepipe (pgrp_pipe); +#endif /* PGRP_PIPE */ + + /* Don't set last_asynchronous_pid in the child */ + +#if defined (RECYCLES_PIDS) + if (last_asynchronous_pid == mypid) + /* Avoid pid aliasing. 1 seems like a safe, unusual pid value. */ + last_asynchronous_pid = 1; +#endif + } + else + { + /* In the parent. Remember the pid of the child just created + as the proper pgrp if this is the first child. */ + + if (job_control) + { + if (pipeline_pgrp == 0) + { + pipeline_pgrp = pid; + /* Don't twiddle terminal pgrps in the parent! This is the bug, + not the good thing of twiddling them in the child! */ + /* give_terminal_to (pipeline_pgrp, 0); */ + } + /* This is done on the recommendation of the Rationale section of + the POSIX 1003.1 standard, where it discusses job control and + shells. It is done to avoid possible race conditions. (Ref. + 1003.1 Rationale, section B.4.3.3, page 236). */ + setpgid (pid, pipeline_pgrp); + } + else + { + if (pipeline_pgrp == 0) + pipeline_pgrp = shell_pgrp; + } + + /* Place all processes into the jobs array regardless of the + state of job_control. */ + add_process (command, pid); + + if (async_p) + last_asynchronous_pid = pid; +#if defined (RECYCLES_PIDS) + else if (last_asynchronous_pid == pid) + /* Avoid pid aliasing. 1 seems like a safe, unusual pid value. */ + last_asynchronous_pid = 1; +#endif + + /* Delete the saved status for any job containing this PID in case it's + been reused. */ + delete_old_job (pid); + + /* Perform the check for pid reuse unconditionally. Some systems reuse + PIDs before giving a process CHILD_MAX/_SC_CHILD_MAX unique ones. */ + bgp_delete (pid); /* new process, discard any saved status */ + + last_made_pid = pid; + + /* keep stats */ + js.c_totforked++; + js.c_living++; + + /* Unblock SIGTERM, SIGINT, and SIGCHLD unless creating a pipeline, in + which case SIGCHLD remains blocked until all commands in the pipeline + have been created (execute_cmd.c:execute_pipeline()). */ + sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); + } + + return (pid); +} + +/* These two functions are called only in child processes. */ +void +ignore_tty_job_signals () +{ + set_signal_handler (SIGTSTP, SIG_IGN); + set_signal_handler (SIGTTIN, SIG_IGN); + set_signal_handler (SIGTTOU, SIG_IGN); +} + +/* Reset the tty-generated job control signals to SIG_DFL unless that signal + was ignored at entry to the shell, in which case we need to set it to + SIG_IGN in the child. We can't rely on resetting traps, since the hard + ignored signals can't be trapped. */ +void +default_tty_job_signals () +{ + if (signal_is_trapped (SIGTSTP) == 0 && signal_is_hard_ignored (SIGTSTP)) + set_signal_handler (SIGTSTP, SIG_IGN); + else + set_signal_handler (SIGTSTP, SIG_DFL); + + if (signal_is_trapped (SIGTTIN) == 0 && signal_is_hard_ignored (SIGTTIN)) + set_signal_handler (SIGTTIN, SIG_IGN); + else + set_signal_handler (SIGTTIN, SIG_DFL); + + if (signal_is_trapped (SIGTTOU) == 0 && signal_is_hard_ignored (SIGTTOU)) + set_signal_handler (SIGTTOU, SIG_IGN); + else + set_signal_handler (SIGTTOU, SIG_DFL); +} + +/* Called once in a parent process. */ +void +get_original_tty_job_signals () +{ + static int fetched = 0; + + if (fetched == 0) + { + if (interactive_shell) + { + set_original_signal (SIGTSTP, SIG_DFL); + set_original_signal (SIGTTIN, SIG_DFL); + set_original_signal (SIGTTOU, SIG_DFL); + } + else + { + get_original_signal (SIGTSTP); + get_original_signal (SIGTTIN); + get_original_signal (SIGTTOU); + } + fetched = 1; + } +} + +/* When we end a job abnormally, or if we stop a job, we set the tty to the + state kept in here. When a job ends normally, we set the state in here + to the state of the tty. */ + +static TTYSTRUCT shell_tty_info; + +#if defined (NEW_TTY_DRIVER) +static struct tchars shell_tchars; +static struct ltchars shell_ltchars; +#endif /* NEW_TTY_DRIVER */ + +#if defined (NEW_TTY_DRIVER) && defined (DRAIN_OUTPUT) +/* Since the BSD tty driver does not allow us to change the tty modes + while simultaneously waiting for output to drain and preserving + typeahead, we have to drain the output ourselves before calling + ioctl. We cheat by finding the length of the output queue, and + using select to wait for an appropriate length of time. This is + a hack, and should be labeled as such (it's a hastily-adapted + mutation of a `usleep' implementation). It's only reason for + existing is the flaw in the BSD tty driver. */ + +static int ttspeeds[] = +{ + 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, + 1800, 2400, 4800, 9600, 19200, 38400 +}; + +static void +draino (fd, ospeed) + int fd, ospeed; +{ + register int delay = ttspeeds[ospeed]; + int n; + + if (!delay) + return; + + while ((ioctl (fd, TIOCOUTQ, &n) == 0) && n) + { + if (n > (delay / 100)) + { + struct timeval tv; + + n *= 10; /* 2 bits more for conservativeness. */ + tv.tv_sec = n / delay; + tv.tv_usec = ((n % delay) * 1000000) / delay; + select (fd, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv); + } + else + break; + } +} +#endif /* NEW_TTY_DRIVER && DRAIN_OUTPUT */ + +/* Return the fd from which we are actually getting input. */ +#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr) + +/* Fill the contents of shell_tty_info with the current tty info. */ +int +get_tty_state () +{ + int tty; + + tty = input_tty (); + if (tty != -1) + { +#if defined (NEW_TTY_DRIVER) + ioctl (tty, TIOCGETP, &shell_tty_info); + ioctl (tty, TIOCGETC, &shell_tchars); + ioctl (tty, TIOCGLTC, &shell_ltchars); +#endif /* NEW_TTY_DRIVER */ + +#if defined (TERMIO_TTY_DRIVER) + ioctl (tty, TCGETA, &shell_tty_info); +#endif /* TERMIO_TTY_DRIVER */ + +#if defined (TERMIOS_TTY_DRIVER) + if (tcgetattr (tty, &shell_tty_info) < 0) + { +#if 0 + /* Only print an error message if we're really interactive at + this time. */ + if (interactive) + sys_error ("[%ld: %d (%d)] tcgetattr", (long)getpid (), shell_level, tty); +#endif + return -1; + } +#endif /* TERMIOS_TTY_DRIVER */ + if (check_window_size) + get_new_window_size (0, (int *)0, (int *)0); + } + return 0; +} + +/* Make the current tty use the state in shell_tty_info. */ +int +set_tty_state () +{ + int tty; + + tty = input_tty (); + if (tty != -1) + { +#if defined (NEW_TTY_DRIVER) +# if defined (DRAIN_OUTPUT) + draino (tty, shell_tty_info.sg_ospeed); +# endif /* DRAIN_OUTPUT */ + ioctl (tty, TIOCSETN, &shell_tty_info); + ioctl (tty, TIOCSETC, &shell_tchars); + ioctl (tty, TIOCSLTC, &shell_ltchars); +#endif /* NEW_TTY_DRIVER */ + +#if defined (TERMIO_TTY_DRIVER) + ioctl (tty, TCSETAW, &shell_tty_info); +#endif /* TERMIO_TTY_DRIVER */ + +#if defined (TERMIOS_TTY_DRIVER) + if (tcsetattr (tty, TCSADRAIN, &shell_tty_info) < 0) + { + /* Only print an error message if we're really interactive at + this time. */ + if (interactive) + sys_error ("[%ld: %d (%d)] tcsetattr", (long)getpid (), shell_level, tty); + return -1; + } +#endif /* TERMIOS_TTY_DRIVER */ + } + return 0; +} + +/* Given an index into the jobs array JOB, return the PROCESS struct of the last + process in that job's pipeline. This is the one whose exit status + counts. Must be called with SIGCHLD blocked or queued. */ +static PROCESS * +find_last_proc (job, block) + int job; + int block; +{ + register PROCESS *p; + sigset_t set, oset; + + if (block) + BLOCK_CHILD (set, oset); + + p = jobs[job]->pipe; + while (p && p->next != jobs[job]->pipe) + p = p->next; + + if (block) + UNBLOCK_CHILD (oset); + + return (p); +} + +static pid_t +find_last_pid (job, block) + int job; + int block; +{ + PROCESS *p; + + p = find_last_proc (job, block); + /* Possible race condition here. */ + return p->pid; +} + +/* Wait for a particular child of the shell to finish executing. + This low-level function prints an error message if PID is not + a child of this shell. It returns -1 if it fails, or whatever + wait_for returns otherwise. If the child is not found in the + jobs table, it returns 127. If FLAGS doesn't include JWAIT_PERROR, + we suppress the error message if PID isn't found. */ + +int +wait_for_single_pid (pid, flags) + pid_t pid; + int flags; +{ + register PROCESS *child; + sigset_t set, oset; + int r, job, alive; + + BLOCK_CHILD (set, oset); + child = find_pipeline (pid, 0, (int *)NULL); + UNBLOCK_CHILD (oset); + + if (child == 0) + { + r = bgp_search (pid); + if (r >= 0) + return r; + } + + if (child == 0) + { + if (flags & JWAIT_PERROR) + internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid); + return (127); + } + + alive = 0; + do + { + r = wait_for (pid, 0); + if ((flags & JWAIT_FORCE) == 0) + break; + + BLOCK_CHILD (set, oset); + alive = PALIVE (child); + UNBLOCK_CHILD (oset); + } + while (alive); + + /* POSIX.2: if we just waited for a job, we can remove it from the jobs + table. */ + BLOCK_CHILD (set, oset); + job = find_job (pid, 0, NULL); + if (job != NO_JOB && jobs[job] && DEADJOB (job)) + jobs[job]->flags |= J_NOTIFIED; + UNBLOCK_CHILD (oset); + + /* If running in posix mode, remove the job from the jobs table immediately */ + if (posixly_correct) + { + cleanup_dead_jobs (); + bgp_delete (pid); + } + + /* Check for a trapped signal interrupting the wait builtin and jump out */ + CHECK_WAIT_INTR; + + return r; +} + +/* Wait for all of the background processes started by this shell to finish. */ +void +wait_for_background_pids (ps) + struct procstat *ps; +{ + register int i, r; + int any_stopped, check_async; + sigset_t set, oset; + pid_t pid; + + for (any_stopped = 0, check_async = 1;;) + { + BLOCK_CHILD (set, oset); + + /* find first running job; if none running in foreground, break */ + /* XXX could use js.j_firstj and js.j_lastj here */ + for (i = 0; i < js.j_jobslots; i++) + { +#if defined (DEBUG) + if (i < js.j_firstj && jobs[i]) + itrace("wait_for_background_pids: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("wait_for_background_pids: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); +#endif + if (jobs[i] && STOPPED (i)) + { + builtin_warning ("job %d[%d] stopped", i+1, find_last_pid (i, 0)); + any_stopped = 1; + } + + if (jobs[i] && RUNNING (i) && IS_FOREGROUND (i) == 0) + break; + } + if (i == js.j_jobslots) + { + UNBLOCK_CHILD (oset); + break; + } + + /* now wait for the last pid in that job. */ + pid = find_last_pid (i, 0); + UNBLOCK_CHILD (oset); + QUIT; + errno = 0; /* XXX */ + r = wait_for_single_pid (pid, JWAIT_PERROR); + if (ps) + { + ps->pid = pid; + ps->status = (r < 0) ? 127 : r; + } + if (r == -1 && errno == ECHILD) + { + /* If we're mistaken about job state, compensate. */ + check_async = 0; + mark_all_jobs_as_dead (); + } + } + +#if defined (PROCESS_SUBSTITUTION) + procsub_waitall (); +#endif + + /* POSIX.2 says the shell can discard the statuses of all completed jobs if + `wait' is called with no arguments. */ + mark_dead_jobs_as_notified (1); + cleanup_dead_jobs (); + bgp_clear (); +} + +/* Make OLD_SIGINT_HANDLER the SIGINT signal handler. */ +#define INVALID_SIGNAL_HANDLER (SigHandler *)wait_for_background_pids +static SigHandler *old_sigint_handler = INVALID_SIGNAL_HANDLER; + +static int wait_sigint_received; +static int child_caught_sigint; + +int waiting_for_child; + +/* Clean up state after longjmp to wait_intr_buf */ +void +wait_sigint_cleanup () +{ + queue_sigchld = 0; + waiting_for_child = 0; +} + +static void +restore_sigint_handler () +{ + if (old_sigint_handler != INVALID_SIGNAL_HANDLER) + { + set_signal_handler (SIGINT, old_sigint_handler); + old_sigint_handler = INVALID_SIGNAL_HANDLER; + waiting_for_child = 0; + } +} + +/* Handle SIGINT while we are waiting for children in a script to exit. + The `wait' builtin should be interruptible, but all others should be + effectively ignored (i.e. not cause the shell to exit). */ +static sighandler +wait_sigint_handler (sig) + int sig; +{ + SigHandler *sigint_handler; + + if (this_shell_builtin && this_shell_builtin == wait_builtin) + { + set_exit_status (128+SIGINT); + restore_sigint_handler (); + /* If we got a SIGINT while in `wait', and SIGINT is trapped, do + what POSIX.2 says (see builtins/wait.def for more info). */ + if (this_shell_builtin && this_shell_builtin == wait_builtin && + signal_is_trapped (SIGINT) && + ((sigint_handler = trap_to_sighandler (SIGINT)) == trap_handler)) + { + trap_handler (SIGINT); /* set pending_traps[SIGINT] */ + wait_signal_received = SIGINT; + if (wait_intr_flag) + sh_longjmp (wait_intr_buf, 1); + else + /* Let CHECK_WAIT_INTR handle it in wait_for/waitchld */ + SIGRETURN (0); + } + else /* wait_builtin but signal not trapped, treat as interrupt */ + kill (getpid (), SIGINT); + } + + /* XXX - should this be interrupt_state? If it is, the shell will act + as if it got the SIGINT interrupt. */ + if (waiting_for_child) + wait_sigint_received = 1; + else + { + set_exit_status (128+SIGINT); + restore_sigint_handler (); + kill (getpid (), SIGINT); + } + + /* Otherwise effectively ignore the SIGINT and allow the running job to + be killed. */ + SIGRETURN (0); +} + +static int +process_exit_signal (status) + WAIT status; +{ + return (WIFSIGNALED (status) ? WTERMSIG (status) : 0); +} + +static int +process_exit_status (status) + WAIT status; +{ + if (WIFSIGNALED (status)) + return (128 + WTERMSIG (status)); + else if (WIFSTOPPED (status) == 0) + return (WEXITSTATUS (status)); + else + return (EXECUTION_SUCCESS); +} + +static WAIT +job_signal_status (job) + int job; +{ + register PROCESS *p; + WAIT s; + + p = jobs[job]->pipe; + do + { + s = p->status; + if (WIFSIGNALED(s) || WIFSTOPPED(s)) + break; + p = p->next; + } + while (p != jobs[job]->pipe); + + return s; +} + +/* Return the exit status of the last process in the pipeline for job JOB. + This is the exit status of the entire job. */ +static WAIT +raw_job_exit_status (job) + int job; +{ + register PROCESS *p; + int fail; + WAIT ret; + + if (jobs[job]->flags & J_PIPEFAIL) + { + fail = 0; + p = jobs[job]->pipe; + do + { + if (WSTATUS (p->status) != EXECUTION_SUCCESS) + fail = WSTATUS(p->status); + p = p->next; + } + while (p != jobs[job]->pipe); + WSTATUS (ret) = fail; + return ret; + } + + for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next) + ; + return (p->status); +} + +/* Return the exit status of job JOB. This is the exit status of the last + (rightmost) process in the job's pipeline, modified if the job was killed + by a signal or stopped. */ +int +job_exit_status (job) + int job; +{ + return (process_exit_status (raw_job_exit_status (job))); +} + +int +job_exit_signal (job) + int job; +{ + return (process_exit_signal (raw_job_exit_status (job))); +} + +#define FIND_CHILD(pid, child) \ + do \ + { \ + child = find_pipeline (pid, 0, (int *)NULL); \ + if (child == 0) \ + { \ + give_terminal_to (shell_pgrp, 0); \ + UNBLOCK_CHILD (oset); \ + internal_error (_("wait_for: No record of process %ld"), (long)pid); \ + restore_sigint_handler (); \ + return (termination_state = 127); \ + } \ + } \ + while (0) + +/* Wait for pid (one of our children) to terminate, then + return the termination state. Returns 127 if PID is not found in + the jobs table. Returns -1 if waitchld() returns -1, indicating + that there are no unwaited-for child processes. */ +int +wait_for (pid, flags) + pid_t pid; + int flags; +{ + int job, termination_state, r; + WAIT s; + register PROCESS *child; + sigset_t set, oset; + + /* In the case that this code is interrupted, and we longjmp () out of it, + we are relying on the code in throw_to_top_level () to restore the + top-level signal mask. */ + child = 0; + BLOCK_CHILD (set, oset); + + /* Ignore interrupts while waiting for a job run without job control + to finish. We don't want the shell to exit if an interrupt is + received, only if one of the jobs run is killed via SIGINT. If + job control is not set, the job will be run in the same pgrp as + the shell, and the shell will see any signals the job gets. In + fact, we want this set every time the waiting shell and the waited- + for process are in the same process group, including command + substitution. */ + + /* This is possibly a race condition -- should it go in stop_pipeline? */ + wait_sigint_received = child_caught_sigint = 0; + if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB)) + { + SigHandler *temp_sigint_handler; + + temp_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + if (temp_sigint_handler == wait_sigint_handler) + { +#if defined (DEBUG) + internal_warning ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap); +#endif + } + else + old_sigint_handler = temp_sigint_handler; + waiting_for_child = 0; + if (old_sigint_handler == SIG_IGN) + set_signal_handler (SIGINT, old_sigint_handler); + } + + termination_state = last_command_exit_value; + + if (interactive && job_control == 0) + QUIT; + /* Check for terminating signals and exit the shell if we receive one */ + CHECK_TERMSIG; + + /* Check for a trapped signal interrupting the wait builtin and jump out */ + CHECK_WAIT_INTR; + + /* If we say wait_for (), then we have a record of this child somewhere. + If it and none of its peers are running, don't call waitchld(). */ + + job = NO_JOB; + do + { + if (pid != ANY_PID) + FIND_CHILD (pid, child); + + /* If this child is part of a job, then we are really waiting for the + job to finish. Otherwise, we are waiting for the child to finish. + We check for JDEAD in case the job state has been set by waitchld + after receipt of a SIGCHLD. */ + if (job == NO_JOB && pid != ANY_PID) /* XXX -- && pid != ANY_PID ? */ + job = find_job (pid, 0, NULL); + + /* waitchld() takes care of setting the state of the job. If the job + has already exited before this is called, sigchld_handler will have + called waitchld and the state will be set to JDEAD. */ + + if (pid == ANY_PID || PRUNNING(child) || (job != NO_JOB && RUNNING (job))) + { + int old_waiting; + + queue_sigchld = 1; + old_waiting = waiting_for_child; + waiting_for_child = 1; + /* XXX - probably not strictly necessary but we want to catch + everything that happened before we switch the behavior of + trap_handler to longjmp on a trapped signal (waiting_for_child) */ + CHECK_WAIT_INTR; + r = waitchld (pid, 1); /* XXX */ + waiting_for_child = old_waiting; +#if 0 +itrace("wait_for: blocking wait for %d returns %d child = %p", (int)pid, r, child); +#endif + queue_sigchld = 0; + if (r == -1 && errno == ECHILD && this_shell_builtin == wait_builtin) + { + termination_state = -1; + /* XXX - restore sigint handler here */ + restore_sigint_handler (); + goto wait_for_return; + } + + /* If child is marked as running, but waitpid() returns -1/ECHILD, + there is something wrong. Somewhere, wait should have returned + that child's pid. Mark the child as not running and the job, + if it exists, as JDEAD. */ + if (r == -1 && errno == ECHILD) + { + if (child) + { + child->running = PS_DONE; + WSTATUS (child->status) = 0; /* XXX -- can't find true status */ + } + js.c_living = 0; /* no living child processes */ + if (job != NO_JOB) + { + jobs[job]->state = JDEAD; + js.c_reaped++; + js.j_ndead++; + } + if (pid == ANY_PID) + { + termination_state = -1; + break; + } + } + } + + /* If the shell is interactive, and job control is disabled, see + if the foreground process has died due to SIGINT and jump out + of the wait loop if it has. waitchld has already restored the + old SIGINT signal handler. */ + if (interactive && job_control == 0) + QUIT; + /* Check for terminating signals and exit the shell if we receive one */ + CHECK_TERMSIG; + + /* Check for a trapped signal interrupting the wait builtin and jump out */ + CHECK_WAIT_INTR; + + if (pid == ANY_PID) + { + /* XXX - could set child but we don't have a handle on what waitchld + reaps. Leave termination_state alone. */ + restore_sigint_handler (); + goto wait_for_return; + } + } + while (PRUNNING (child) || (job != NO_JOB && RUNNING (job))); + + /* Restore the original SIGINT signal handler before we return. */ + restore_sigint_handler (); + + /* The exit state of the command is either the termination state of the + child, or the termination state of the job. If a job, the status + of the last child in the pipeline is the significant one. If the command + or job was terminated by a signal, note that value also. */ + termination_state = (job != NO_JOB) ? job_exit_status (job) + : (child ? process_exit_status (child->status) : EXECUTION_SUCCESS); + last_command_exit_signal = (job != NO_JOB) ? job_exit_signal (job) + : (child ? process_exit_signal (child->status) : 0); + + /* XXX */ + if ((job != NO_JOB && JOBSTATE (job) == JSTOPPED) || (child && WIFSTOPPED (child->status))) + termination_state = 128 + WSTOPSIG (child->status); + + if (job == NO_JOB || IS_JOBCONTROL (job)) + { + /* XXX - under what circumstances is a job not present in the jobs + table (job == NO_JOB)? + 1. command substitution + + In the case of command substitution, at least, it's probably not + the right thing to give the terminal to the shell's process group, + even though there is code in subst.c:command_substitute to work + around it. + + Things that don't: + $PROMPT_COMMAND execution + process substitution + */ +#if 0 +if (job == NO_JOB) + itrace("wait_for: job == NO_JOB, giving the terminal to shell_pgrp (%ld)", (long)shell_pgrp); +#endif + /* Don't modify terminal pgrp if we are running in background or a + subshell. Make sure subst.c:command_substitute uses the same + conditions to determine whether or not it should undo this and + give the terminal to pipeline_pgrp. */ + + if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 && + (subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0) + give_terminal_to (shell_pgrp, 0); + } + + /* If the command did not exit cleanly, or the job is just + being stopped, then reset the tty state back to what it + was before this command. Reset the tty state and notify + the user of the job termination only if the shell is + interactive. Clean up any dead jobs in either case. */ + if (job != NO_JOB) + { + if (interactive_shell && subshell_environment == 0) + { + /* This used to use `child->status'. That's wrong, however, for + pipelines. `child' is the first process in the pipeline. It's + likely that the process we want to check for abnormal termination + or stopping is the last process in the pipeline, especially if + it's long-lived and the first process is short-lived. Since we + know we have a job here, we can check all the processes in this + job's pipeline and see if one of them stopped or terminated due + to a signal. We might want to change this later to just check + the last process in the pipeline. If no process exits due to a + signal, S is left as the status of the last job in the pipeline. */ + s = job_signal_status (job); + + if (WIFSIGNALED (s) || WIFSTOPPED (s)) + { + set_tty_state (); + + /* If the current job was stopped or killed by a signal, and + the user has requested it, get a possibly new window size */ + if (check_window_size && (job == js.j_current || IS_FOREGROUND (job))) + get_new_window_size (0, (int *)0, (int *)0); + } + else +#if defined (READLINE) + /* We don't want to do this if we are running a process during + programmable completion. */ + if (RL_ISSTATE (RL_STATE_COMPLETING) == 0) +#endif + get_tty_state (); + + /* If job control is enabled, the job was started with job + control, the job was the foreground job, and it was killed + by SIGINT, then print a newline to compensate for the kernel + printing the ^C without a trailing newline. */ + if (job_control && IS_JOBCONTROL (job) && IS_FOREGROUND (job) && + WIFSIGNALED (s) && WTERMSIG (s) == SIGINT) + { + /* If SIGINT is not trapped and the shell is in a for, while, + or until loop, act as if the shell received SIGINT as + well, so the loop can be broken. This doesn't call the + SIGINT signal handler; maybe it should. */ + if (signal_is_trapped (SIGINT) == 0 && (loop_level || (shell_compatibility_level > 32 && executing_list))) + ADDINTERRUPT; + /* Call any SIGINT trap handler if the shell is running a loop, so + the loop can be broken. This seems more useful and matches the + behavior when the shell is running a builtin command in a loop + when it is interrupted. Change ADDINTERRUPT to + trap_handler (SIGINT) to run the trap without interrupting the + loop. */ + else if (signal_is_trapped (SIGINT) && loop_level) + ADDINTERRUPT; + /* If an interactive shell with job control enabled is sourcing + a file, allow the interrupt to terminate the file sourcing. */ + else if (interactive_shell && signal_is_trapped (SIGINT) == 0 && sourcelevel) + ADDINTERRUPT; + else + { + putchar ('\n'); + fflush (stdout); + } + } + } + else if ((subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PIPE)) && wait_sigint_received) + { + /* If waiting for a job in a subshell started to do command + substitution or to run a pipeline element that consists of + something like a while loop or a for loop, simulate getting + and being killed by the SIGINT to pass the status back to our + parent. */ + if (child_caught_sigint == 0 && signal_is_trapped (SIGINT) == 0) + { + UNBLOCK_CHILD (oset); + old_sigint_handler = set_signal_handler (SIGINT, SIG_DFL); + if (old_sigint_handler == SIG_IGN) + restore_sigint_handler (); + else + kill (getpid (), SIGINT); + } + } + else if (interactive_shell == 0 && subshell_environment == 0 && IS_FOREGROUND (job)) + { + s = job_signal_status (job); + + /* If we are non-interactive, but job control is enabled, and the job + died due to SIGINT, pretend we got the SIGINT */ + if (job_control && IS_JOBCONTROL (job) && WIFSIGNALED (s) && WTERMSIG (s) == SIGINT) + { + ADDINTERRUPT; /* For now */ + } + + if (check_window_size) + get_new_window_size (0, (int *)0, (int *)0); + } + + /* Moved here from set_job_status_and_cleanup, which is in the SIGCHLD + signal handler path */ + if (DEADJOB (job) && IS_FOREGROUND (job) /*&& subshell_environment == 0*/) + setjstatus (job); + + /* If this job is dead, notify the user of the status. If the shell + is interactive, this will display a message on the terminal. If + the shell is not interactive, make sure we turn on the notify bit + so we don't get an unwanted message about the job's termination, + and so delete_job really clears the slot in the jobs table. */ + notify_and_cleanup (); + } + +wait_for_return: + + UNBLOCK_CHILD (oset); + + return (termination_state); +} + +/* Wait for the last process in the pipeline for JOB. Returns whatever + wait_for returns: the last process's termination state or -1 if there + are no unwaited-for child processes or an error occurs. If FLAGS + includes JWAIT_FORCE, we wait for the job to terminate, no just change + state */ +int +wait_for_job (job, flags, ps) + int job, flags; + struct procstat *ps; +{ + pid_t pid; + int r, state; + sigset_t set, oset; + + BLOCK_CHILD(set, oset); + state = JOBSTATE (job); + if (state == JSTOPPED) + internal_warning (_("wait_for_job: job %d is stopped"), job+1); + + pid = find_last_pid (job, 0); + UNBLOCK_CHILD(oset); + + do + { + r = wait_for (pid, 0); + if (r == -1 && errno == ECHILD) + mark_all_jobs_as_dead (); + + CHECK_WAIT_INTR; + + if ((flags & JWAIT_FORCE) == 0) + break; + + BLOCK_CHILD (set, oset); + state = (job != NO_JOB && jobs[job]) ? JOBSTATE (job) : JDEAD; + UNBLOCK_CHILD (oset); + } + while (state != JDEAD); + + /* POSIX.2: we can remove the job from the jobs table if we just waited + for it. */ + BLOCK_CHILD (set, oset); + if (job != NO_JOB && jobs[job] && DEADJOB (job)) + jobs[job]->flags |= J_NOTIFIED; + UNBLOCK_CHILD (oset); + + if (ps) + { + ps->pid = pid; + ps->status = (r < 0) ? 127 : r; + } + return r; +} + +/* Wait for any background job started by this shell to finish. Very + similar to wait_for_background_pids(). Returns the exit status of + the next exiting job, -1 if there are no background jobs. The caller + is responsible for translating -1 into the right return value. RPID, + if non-null, gets the pid of the job's process leader. */ +int +wait_for_any_job (flags, ps) + int flags; + struct procstat *ps; +{ + pid_t pid; + int i, r; + sigset_t set, oset; + + if (jobs_list_frozen) + return -1; + + /* First see if there are any unnotified dead jobs that we can report on */ + BLOCK_CHILD (set, oset); + for (i = 0; i < js.j_jobslots; i++) + { + if ((flags & JWAIT_WAITING) && jobs[i] && IS_WAITING (i) == 0) + continue; /* if we don't want it, skip it */ + if (jobs[i] && DEADJOB (i) && IS_NOTIFIED (i) == 0) + { +return_job: + r = job_exit_status (i); + pid = find_last_pid (i, 0); + if (ps) + { + ps->pid = pid; + ps->status = r; + } + notify_of_job_status (); /* XXX */ + delete_job (i, 0); +#if defined (COPROCESS_SUPPORT) + coproc_reap (); +#endif + UNBLOCK_CHILD (oset); + return r; + } + } + UNBLOCK_CHILD (oset); + + /* At this point, we have no dead jobs in the jobs table. Wait until we + get one, even if it takes multiple pids exiting. */ + for (;;) + { + /* Make sure there is a background job to wait for */ + BLOCK_CHILD (set, oset); + for (i = 0; i < js.j_jobslots; i++) + if (jobs[i] && RUNNING (i) && IS_FOREGROUND (i) == 0) + break; + if (i == js.j_jobslots) + { + UNBLOCK_CHILD (oset); + return -1; + } + + UNBLOCK_CHILD (oset); + + QUIT; + CHECK_TERMSIG; + CHECK_WAIT_INTR; + + errno = 0; + r = wait_for (ANY_PID, 0); /* special sentinel value for wait_for */ + if (r == -1 && errno == ECHILD) + mark_all_jobs_as_dead (); + + /* Now we see if we have any dead jobs and return the first one */ + BLOCK_CHILD (set, oset); + for (i = 0; i < js.j_jobslots; i++) + { + if ((flags & JWAIT_WAITING) && jobs[i] && IS_WAITING (i) == 0) + continue; /* if we don't want it, skip it */ + if (jobs[i] && DEADJOB (i)) + goto return_job; + } + UNBLOCK_CHILD (oset); + } + + return -1; +} + +/* Print info about dead jobs, and then delete them from the list + of known jobs. This does not actually delete jobs when the + shell is not interactive, because the dead jobs are not marked + as notified. */ +void +notify_and_cleanup () +{ + if (jobs_list_frozen) + return; + + if (interactive || interactive_shell == 0 || sourcelevel) + notify_of_job_status (); + + cleanup_dead_jobs (); +} + +/* Make dead jobs disappear from the jobs array without notification. + This is used when the shell is not interactive. */ +void +reap_dead_jobs () +{ + mark_dead_jobs_as_notified (0); + cleanup_dead_jobs (); +} + +/* Return the next closest (chronologically) job to JOB which is in + STATE. STATE can be JSTOPPED, JRUNNING. NO_JOB is returned if + there is no next recent job. */ +static int +most_recent_job_in_state (job, state) + int job; + JOB_STATE state; +{ + register int i, result; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + + for (result = NO_JOB, i = job - 1; i >= 0; i--) + { + if (jobs[i] && (JOBSTATE (i) == state)) + { + result = i; + break; + } + } + + UNBLOCK_CHILD (oset); + + return (result); +} + +/* Return the newest *stopped* job older than JOB, or NO_JOB if not + found. */ +static int +job_last_stopped (job) + int job; +{ + return (most_recent_job_in_state (job, JSTOPPED)); +} + +/* Return the newest *running* job older than JOB, or NO_JOB if not + found. */ +static int +job_last_running (job) + int job; +{ + return (most_recent_job_in_state (job, JRUNNING)); +} + +/* Make JOB be the current job, and make previous be useful. Must be + called with SIGCHLD blocked. */ +static void +set_current_job (job) + int job; +{ + int candidate; + + if (js.j_current != job) + { + js.j_previous = js.j_current; + js.j_current = job; + } + + /* First choice for previous job is the old current job. */ + if (js.j_previous != js.j_current && + js.j_previous != NO_JOB && + jobs[js.j_previous] && + STOPPED (js.j_previous)) + return; + + /* Second choice: Newest stopped job that is older than + the current job. */ + candidate = NO_JOB; + if (STOPPED (js.j_current)) + { + candidate = job_last_stopped (js.j_current); + + if (candidate != NO_JOB) + { + js.j_previous = candidate; + return; + } + } + + /* If we get here, there is either only one stopped job, in which case it is + the current job and the previous job should be set to the newest running + job, or there are only running jobs and the previous job should be set to + the newest running job older than the current job. We decide on which + alternative to use based on whether or not JOBSTATE(js.j_current) is + JSTOPPED. */ + + candidate = RUNNING (js.j_current) ? job_last_running (js.j_current) + : job_last_running (js.j_jobslots); + + if (candidate != NO_JOB) + { + js.j_previous = candidate; + return; + } + + /* There is only a single job, and it is both `+' and `-'. */ + js.j_previous = js.j_current; +} + +/* Make current_job be something useful, if it isn't already. */ + +/* Here's the deal: The newest non-running job should be `+', and the + next-newest non-running job should be `-'. If there is only a single + stopped job, the js.j_previous is the newest non-running job. If there + are only running jobs, the newest running job is `+' and the + next-newest running job is `-'. Must be called with SIGCHLD blocked. */ + +static void +reset_current () +{ + int candidate; + + if (js.j_jobslots && js.j_current != NO_JOB && jobs[js.j_current] && STOPPED (js.j_current)) + candidate = js.j_current; + else + { + candidate = NO_JOB; + + /* First choice: the previous job. */ + if (js.j_previous != NO_JOB && jobs[js.j_previous] && STOPPED (js.j_previous)) + candidate = js.j_previous; + + /* Second choice: the most recently stopped job. */ + if (candidate == NO_JOB) + candidate = job_last_stopped (js.j_jobslots); + + /* Third choice: the newest running job. */ + if (candidate == NO_JOB) + candidate = job_last_running (js.j_jobslots); + } + + /* If we found a job to use, then use it. Otherwise, there + are no jobs period. */ + if (candidate != NO_JOB) + set_current_job (candidate); + else + js.j_current = js.j_previous = NO_JOB; +} + +/* Set up the job structures so we know the job and its processes are + all running. */ +static void +set_job_running (job) + int job; +{ + register PROCESS *p; + + /* Each member of the pipeline is now running. */ + p = jobs[job]->pipe; + + do + { + if (WIFSTOPPED (p->status)) + p->running = PS_RUNNING; /* XXX - could be PS_STOPPED */ + p = p->next; + } + while (p != jobs[job]->pipe); + + /* This means that the job is running. */ + JOBSTATE (job) = JRUNNING; +} + +/* Start a job. FOREGROUND if non-zero says to do that. Otherwise, + start the job in the background. JOB is a zero-based index into + JOBS. Returns -1 if it is unable to start a job, and the return + status of the job otherwise. */ +int +start_job (job, foreground) + int job, foreground; +{ + register PROCESS *p; + int already_running; + sigset_t set, oset; + char *wd, *s; + static TTYSTRUCT save_stty; + + BLOCK_CHILD (set, oset); + + if ((subshell_environment & SUBSHELL_COMSUB) && (pipeline_pgrp == shell_pgrp)) + { + internal_error (_("%s: no current jobs"), this_command_name); + UNBLOCK_CHILD (oset); + return (-1); + } + + if (DEADJOB (job)) + { + internal_error (_("%s: job has terminated"), this_command_name); + UNBLOCK_CHILD (oset); + return (-1); + } + + already_running = RUNNING (job); + + if (foreground == 0 && already_running) + { + internal_error (_("%s: job %d already in background"), this_command_name, job + 1); + UNBLOCK_CHILD (oset); + return (0); /* XPG6/SUSv3 says this is not an error */ + } + + wd = current_working_directory (); + + /* You don't know about the state of this job. Do you? */ + jobs[job]->flags &= ~J_NOTIFIED; + + if (foreground) + { + set_current_job (job); + jobs[job]->flags |= J_FOREGROUND; + } + + /* Tell the outside world what we're doing. */ + p = jobs[job]->pipe; + + if (foreground == 0) + { + /* POSIX.2 says `bg' doesn't give any indication about current or + previous job. */ + if (posixly_correct == 0) + s = (job == js.j_current) ? "+ ": ((job == js.j_previous) ? "- " : " "); + else + s = " "; + printf ("[%d]%s", job + 1, s); + } + + do + { + printf ("%s%s", + p->command ? p->command : "", + p->next != jobs[job]->pipe? " | " : ""); + p = p->next; + } + while (p != jobs[job]->pipe); + + if (foreground == 0) + printf (" &"); + + if (strcmp (wd, jobs[job]->wd) != 0) + printf (" (wd: %s)", polite_directory_format (jobs[job]->wd)); + + printf ("\n"); + + /* Run the job. */ + if (already_running == 0) + set_job_running (job); + + /* Save the tty settings before we start the job in the foreground. */ + if (foreground) + { + get_tty_state (); + save_stty = shell_tty_info; + /* Give the terminal to this job. */ + if (IS_JOBCONTROL (job)) + give_terminal_to (jobs[job]->pgrp, 0); + } + else + jobs[job]->flags &= ~J_FOREGROUND; + + /* If the job is already running, then don't bother jump-starting it. */ + if (already_running == 0) + { + jobs[job]->flags |= J_NOTIFIED; + killpg (jobs[job]->pgrp, SIGCONT); + } + + if (foreground) + { + pid_t pid; + int st; + + pid = find_last_pid (job, 0); + UNBLOCK_CHILD (oset); + st = wait_for (pid, 0); + shell_tty_info = save_stty; + set_tty_state (); + return (st); + } + else + { + reset_current (); + UNBLOCK_CHILD (oset); + return (0); + } +} + +/* Give PID SIGNAL. This determines what job the pid belongs to (if any). + If PID does belong to a job, and the job is stopped, then CONTinue the + job after giving it SIGNAL. Returns -1 on failure. If GROUP is non-null, + then kill the process group associated with PID. */ +int +kill_pid (pid, sig, group) + pid_t pid; + int sig, group; +{ + register PROCESS *p; + int job, result, negative; + sigset_t set, oset; + + if (pid < -1) + { + pid = -pid; + group = negative = 1; + } + else + negative = 0; + + result = EXECUTION_SUCCESS; + if (group) + { + BLOCK_CHILD (set, oset); + p = find_pipeline (pid, 0, &job); + + if (job != NO_JOB) + { + jobs[job]->flags &= ~J_NOTIFIED; + + /* Kill process in backquotes or one started without job control? */ + + /* If we're passed a pid < -1, just call killpg and see what happens */ + if (negative && jobs[job]->pgrp == shell_pgrp) + result = killpg (pid, sig); + /* If we're killing using job control notification, for example, + without job control active, we have to do things ourselves. */ + else if (jobs[job]->pgrp == shell_pgrp) + { + p = jobs[job]->pipe; + do + { + if (PALIVE (p) == 0) + continue; /* avoid pid recycling problem */ + kill (p->pid, sig); + if (PEXITED (p) && (sig == SIGTERM || sig == SIGHUP)) + kill (p->pid, SIGCONT); + p = p->next; + } + while (p != jobs[job]->pipe); + } + else + { + result = killpg (jobs[job]->pgrp, sig); + if (p && STOPPED (job) && (sig == SIGTERM || sig == SIGHUP)) + killpg (jobs[job]->pgrp, SIGCONT); + /* If we're continuing a stopped job via kill rather than bg or + fg, emulate the `bg' behavior. */ + if (p && STOPPED (job) && (sig == SIGCONT)) + { + set_job_running (job); + jobs[job]->flags &= ~J_FOREGROUND; + jobs[job]->flags |= J_NOTIFIED; + } + } + } + else + result = killpg (pid, sig); + + UNBLOCK_CHILD (oset); + } + else + result = kill (pid, sig); + + return (result); +} + +/* sigchld_handler () flushes at least one of the children that we are + waiting for. It gets run when we have gotten a SIGCHLD signal. */ +static sighandler +sigchld_handler (sig) + int sig; +{ + int n, oerrno; + + oerrno = errno; + REINSTALL_SIGCHLD_HANDLER; + sigchld++; + n = 0; + if (queue_sigchld == 0) + n = waitchld (-1, 0); + errno = oerrno; + SIGRETURN (n); +} + +/* waitchld() reaps dead or stopped children. It's called by wait_for and + sigchld_handler, and runs until there aren't any children terminating any + more. + If BLOCK is 1, this is to be a blocking wait for a single child, although + an arriving SIGCHLD could cause the wait to be non-blocking. It returns + the number of children reaped, or -1 if there are no unwaited-for child + processes. */ +static int +waitchld (wpid, block) + pid_t wpid; + int block; +{ + WAIT status; + PROCESS *child; + pid_t pid; + int ind; + + int call_set_current, last_stopped_job, job, children_exited, waitpid_flags; + static int wcontinued = WCONTINUED; /* run-time fix for glibc problem */ + + call_set_current = children_exited = 0; + last_stopped_job = NO_JOB; + + do + { + /* We don't want to be notified about jobs stopping if job control + is not active. XXX - was interactive_shell instead of job_control */ + waitpid_flags = (job_control && subshell_environment == 0) + ? (WUNTRACED|wcontinued) + : 0; + if (sigchld || block == 0) + waitpid_flags |= WNOHANG; + + /* Check for terminating signals and exit the shell if we receive one */ + CHECK_TERMSIG; + /* Check for a trapped signal interrupting the wait builtin and jump out */ + CHECK_WAIT_INTR; + + if (block == 1 && queue_sigchld == 0 && (waitpid_flags & WNOHANG) == 0) + { + internal_warning (_("waitchld: turning on WNOHANG to avoid indefinite block")); + waitpid_flags |= WNOHANG; + } + + pid = WAITPID (-1, &status, waitpid_flags); + +#if 0 +if (wpid != -1 && block) + itrace("waitchld: blocking waitpid returns %d", pid); +#endif +#if 0 +if (wpid != -1) + itrace("waitchld: %s waitpid returns %d", block?"blocking":"non-blocking", pid); +#endif + /* WCONTINUED may be rejected by waitpid as invalid even when defined */ + if (wcontinued && pid < 0 && errno == EINVAL) + { + wcontinued = 0; + continue; /* jump back to the test and retry without WCONTINUED */ + } + + /* The check for WNOHANG is to make sure we decrement sigchld only + if it was non-zero before we called waitpid. */ + if (sigchld > 0 && (waitpid_flags & WNOHANG)) + sigchld--; + + /* If waitpid returns -1 with errno == ECHILD, there are no more + unwaited-for child processes of this shell. */ + if (pid < 0 && errno == ECHILD) + { + if (children_exited == 0) + return -1; + else + break; + } + +#if 0 +itrace("waitchld: waitpid returns %d block = %d children_exited = %d", pid, block, children_exited); +#endif + /* If waitpid returns 0, there are running children. If it returns -1, + the only other error POSIX says it can return is EINTR. */ + CHECK_TERMSIG; + CHECK_WAIT_INTR; + + /* If waitpid returns -1/EINTR and the shell saw a SIGINT, then we + assume the child has blocked or handled SIGINT. In that case, we + require the child to actually die due to SIGINT to act on the + SIGINT we received; otherwise we assume the child handled it and + let it go. */ + if (pid < 0 && errno == EINTR && wait_sigint_received) + child_caught_sigint = 1; + + if (pid <= 0) + continue; /* jumps right to the test */ + + /* Linux kernels appear to signal the parent but not interrupt the + waitpid() (or restart it even without SA_RESTART) on SIGINT, so if + we saw a SIGINT and the process exited or died due to some other + signal, assume the child caught the SIGINT. */ + if (wait_sigint_received && (WIFSIGNALED (status) == 0 || WTERMSIG (status) != SIGINT)) + child_caught_sigint = 1; + + /* If the child process did die due to SIGINT, forget our assumption + that it caught or otherwise handled it. */ + if (WIFSIGNALED (status) && WTERMSIG (status) == SIGINT) + child_caught_sigint = 0; + + /* children_exited is used to run traps on SIGCHLD. We don't want to + run the trap if a process is just being continued. */ + if (WIFCONTINUED(status) == 0) + { + children_exited++; + js.c_living--; + } + + /* Locate our PROCESS for this pid. */ + child = find_process (pid, 1, &job); /* want living procs only */ + +#if defined (COPROCESS_SUPPORT) + coproc_pidchk (pid, WSTATUS(status)); +#endif + +#if defined (PROCESS_SUBSTITUTION) + /* Only manipulate the list of process substitutions while SIGCHLD + is blocked. We only use this as a hint that we can remove FIFOs + or close file descriptors corresponding to terminated process + substitutions. */ + if ((ind = find_procsub_child (pid)) >= 0) + set_procsub_status (ind, pid, WSTATUS (status)); +#endif + + /* It is not an error to have a child terminate that we did + not have a record of. This child could have been part of + a pipeline in backquote substitution. Even so, I'm not + sure child is ever non-zero. */ + if (child == 0) + { + if (WIFEXITED (status) || WIFSIGNALED (status)) + js.c_reaped++; + continue; + } + + /* Remember status, and whether or not the process is running. */ + child->status = status; + child->running = WIFCONTINUED(status) ? PS_RUNNING : PS_DONE; + + if (PEXITED (child)) + { + js.c_totreaped++; + if (job != NO_JOB) + js.c_reaped++; + } + + if (job == NO_JOB) + continue; + + call_set_current += set_job_status_and_cleanup (job); + + if (STOPPED (job)) + last_stopped_job = job; + else if (DEADJOB (job) && last_stopped_job == job) + last_stopped_job = NO_JOB; + } + while ((sigchld || block == 0) && pid > (pid_t)0); + + /* If a job was running and became stopped, then set the current + job. Otherwise, don't change a thing. */ + if (call_set_current) + { + if (last_stopped_job != NO_JOB) + set_current_job (last_stopped_job); + else + reset_current (); + } + + /* Call a SIGCHLD trap handler for each child that exits, if one is set. */ + if (children_exited && + (signal_is_trapped (SIGCHLD) || trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER) && + trap_list[SIGCHLD] != (char *)IGNORE_SIG) + { + if (posixly_correct && this_shell_builtin && this_shell_builtin == wait_builtin) + { + /* This was trap_handler (SIGCHLD) but that can lose traps if + children_exited > 1 */ + queue_sigchld_trap (children_exited); + wait_signal_received = SIGCHLD; + /* If we're in a signal handler, let CHECK_WAIT_INTR pick it up; + run_pending_traps will call run_sigchld_trap later */ + if (sigchld == 0 && wait_intr_flag) + sh_longjmp (wait_intr_buf, 1); + } + /* If not in posix mode and not executing the wait builtin, queue the + signal for later handling. Run the trap immediately if we are + executing the wait builtin, but don't break out of `wait'. */ + else if (sigchld) /* called from signal handler */ + queue_sigchld_trap (children_exited); + else if (signal_in_progress (SIGCHLD)) + queue_sigchld_trap (children_exited); + else if (trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER) + queue_sigchld_trap (children_exited); + else if (running_trap) + queue_sigchld_trap (children_exited); + else if (this_shell_builtin == wait_builtin) + run_sigchld_trap (children_exited); /* XXX */ + else + queue_sigchld_trap (children_exited); + } + + /* We have successfully recorded the useful information about this process + that has just changed state. If we notify asynchronously, and the job + that this process belongs to is no longer running, then notify the user + of that fact now. */ + if (asynchronous_notification && interactive && executing_builtin == 0) + notify_of_job_status (); + + return (children_exited); +} + +/* Set the status of JOB and perform any necessary cleanup if the job is + marked as JDEAD. + + Currently, the cleanup activity is restricted to handling any SIGINT + received while waiting for a foreground job to finish. */ +static int +set_job_status_and_cleanup (job) + int job; +{ + PROCESS *child; + int tstatus, job_state, any_stopped, any_tstped, call_set_current; + SigHandler *temp_handler; + + child = jobs[job]->pipe; + jobs[job]->flags &= ~J_NOTIFIED; + + call_set_current = 0; + + /* + * COMPUTE JOB STATUS + */ + + /* If all children are not running, but any of them is stopped, then + the job is stopped, not dead. */ + job_state = any_stopped = any_tstped = 0; + do + { + job_state |= PRUNNING (child); +#if 0 + if (PEXITED (child) && (WIFSTOPPED (child->status))) +#else + /* Only checking for WIFSTOPPED now, not for PS_DONE */ + if (PSTOPPED (child)) +#endif + { + any_stopped = 1; + any_tstped |= job_control && (WSTOPSIG (child->status) == SIGTSTP); + } + child = child->next; + } + while (child != jobs[job]->pipe); + + /* If job_state != 0, the job is still running, so don't bother with + setting the process exit status and job state unless we're + transitioning from stopped to running. */ + if (job_state != 0 && JOBSTATE(job) != JSTOPPED) + return 0; + + /* + * SET JOB STATUS + */ + + /* The job is either stopped or dead. Set the state of the job accordingly. */ + if (any_stopped) + { + jobs[job]->state = JSTOPPED; + jobs[job]->flags &= ~J_FOREGROUND; + call_set_current++; + /* Suspending a job with SIGTSTP breaks all active loops. */ + if (any_tstped && loop_level) + breaking = loop_level; + } + else if (job_state != 0) /* was stopped, now running */ + { + jobs[job]->state = JRUNNING; + call_set_current++; + } + else + { + jobs[job]->state = JDEAD; + js.j_ndead++; + +#if 0 + if (IS_FOREGROUND (job)) + setjstatus (job); +#endif + + /* If this job has a cleanup function associated with it, call it + with `cleanarg' as the single argument, then set the function + pointer to NULL so it is not inadvertently called twice. The + cleanup function is responsible for deallocating cleanarg. */ + if (jobs[job]->j_cleanup) + { + (*jobs[job]->j_cleanup) (jobs[job]->cleanarg); + jobs[job]->j_cleanup = (sh_vptrfunc_t *)NULL; + } + } + + /* + * CLEANUP + * + * Currently, we just do special things if we got a SIGINT while waiting + * for a foreground job to complete + */ + + if (JOBSTATE (job) == JDEAD) + { + /* If we're running a shell script and we get a SIGINT with a + SIGINT trap handler, but the foreground job handles it and + does not exit due to SIGINT, run the trap handler but do not + otherwise act as if we got the interrupt. */ + if (wait_sigint_received && interactive_shell == 0 && + child_caught_sigint && IS_FOREGROUND (job) && + signal_is_trapped (SIGINT)) + { + int old_frozen; + wait_sigint_received = 0; + last_command_exit_value = process_exit_status (child->status); + + old_frozen = jobs_list_frozen; + jobs_list_frozen = 1; + tstatus = maybe_call_trap_handler (SIGINT); + jobs_list_frozen = old_frozen; + } + + /* If the foreground job is killed by SIGINT when job control is not + active, we need to perform some special handling. + + The check of wait_sigint_received is a way to determine if the + SIGINT came from the keyboard (in which case the shell has already + seen it, and wait_sigint_received is non-zero, because keyboard + signals are sent to process groups) or via kill(2) to the foreground + process by another process (or itself). If the shell did receive the + SIGINT, it needs to perform normal SIGINT processing. XXX - should + this change its behavior depending on whether the last command in an + pipeline exited due to SIGINT, or any process in the pipeline? Right + now it does this if any process in the pipeline exits due to SIGINT. */ + else if (wait_sigint_received && + child_caught_sigint == 0 && + IS_FOREGROUND (job) && IS_JOBCONTROL (job) == 0) + { + int old_frozen; + + wait_sigint_received = 0; + + /* If SIGINT is trapped, set the exit status so that the trap + handler can see it. */ + if (signal_is_trapped (SIGINT)) + last_command_exit_value = process_exit_status (child->status); + + /* If the signal is trapped, let the trap handler get it no matter + what and simply return if the trap handler returns. + maybe_call_trap_handler() may cause dead jobs to be removed from + the job table because of a call to execute_command. We work + around this by setting JOBS_LIST_FROZEN. */ + old_frozen = jobs_list_frozen; + jobs_list_frozen = 1; + tstatus = maybe_call_trap_handler (SIGINT); + jobs_list_frozen = old_frozen; + if (tstatus == 0 && old_sigint_handler != INVALID_SIGNAL_HANDLER) + { + /* wait_sigint_handler () has already seen SIGINT and + allowed the wait builtin to jump out. We need to + call the original SIGINT handler, if necessary. If + the original handler is SIG_DFL, we need to resend + the signal to ourselves. */ + + temp_handler = old_sigint_handler; + + /* Bogus. If we've reset the signal handler as the result + of a trap caught on SIGINT, then old_sigint_handler + will point to trap_handler, which now knows nothing about + SIGINT (if we reset the sighandler to the default). + In this case, we have to fix things up. What a crock. */ + if (temp_handler == trap_handler && signal_is_trapped (SIGINT) == 0) + temp_handler = trap_to_sighandler (SIGINT); + restore_sigint_handler (); + if (temp_handler == SIG_DFL) + termsig_handler (SIGINT); /* XXX */ + else if (temp_handler != SIG_IGN) + (*temp_handler) (SIGINT); + } + } + } + + return call_set_current; +} + +/* Build the array of values for the $PIPESTATUS variable from the set of + exit statuses of all processes in the job J. */ +static void +setjstatus (j) + int j; +{ +#if defined (ARRAY_VARS) + register int i; + register PROCESS *p; + + for (i = 1, p = jobs[j]->pipe; p->next != jobs[j]->pipe; p = p->next, i++) + ; + i++; + if (statsize < i) + { + pstatuses = (int *)xrealloc (pstatuses, i * sizeof (int)); + statsize = i; + } + i = 0; + p = jobs[j]->pipe; + do + { + pstatuses[i++] = process_exit_status (p->status); + p = p->next; + } + while (p != jobs[j]->pipe); + + pstatuses[i] = -1; /* sentinel */ + set_pipestatus_array (pstatuses, i); +#endif +} + +void +run_sigchld_trap (nchild) + int nchild; +{ + char *trap_command; + int i; + + /* Turn off the trap list during the call to parse_and_execute () + to avoid potentially infinite recursive calls. Preserve the + values of last_command_exit_value, last_made_pid, and the_pipeline + around the execution of the trap commands. */ + trap_command = savestring (trap_list[SIGCHLD]); + + begin_unwind_frame ("SIGCHLD trap"); + unwind_protect_int (last_command_exit_value); + unwind_protect_int (last_command_exit_signal); + unwind_protect_var (last_made_pid); + unwind_protect_int (jobs_list_frozen); + unwind_protect_pointer (the_pipeline); + unwind_protect_pointer (subst_assign_varlist); + unwind_protect_pointer (this_shell_builtin); + unwind_protect_pointer (temporary_env); + + /* We have to add the commands this way because they will be run + in reverse order of adding. We don't want maybe_set_sigchld_trap () + to reference freed memory. */ + add_unwind_protect (xfree, trap_command); + add_unwind_protect (maybe_set_sigchld_trap, trap_command); + + subst_assign_varlist = (WORD_LIST *)NULL; + the_pipeline = (PROCESS *)NULL; + temporary_env = 0; /* traps should not run with temporary env */ + + running_trap = SIGCHLD + 1; + + set_impossible_sigchld_trap (); + jobs_list_frozen = 1; + for (i = 0; i < nchild; i++) + { + parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE); + } + + run_unwind_frame ("SIGCHLD trap"); + running_trap = 0; +} + +/* Function to call when you want to notify people of changes + in job status. This prints out all jobs which are pending + notification to stderr, and marks those printed as already + notified, thus making them candidates for cleanup. */ +static void +notify_of_job_status () +{ + register int job, termsig; + char *dir; + sigset_t set, oset; + WAIT s; + + if (jobs == 0 || js.j_jobslots == 0) + return; + + if (old_ttou != 0) + { + sigemptyset (&set); + sigaddset (&set, SIGCHLD); + sigaddset (&set, SIGTTOU); + sigemptyset (&oset); + sigprocmask (SIG_BLOCK, &set, &oset); + } + else + queue_sigchld++; + + /* XXX could use js.j_firstj here */ + for (job = 0, dir = (char *)NULL; job < js.j_jobslots; job++) + { + if (jobs[job] && IS_NOTIFIED (job) == 0) + { + s = raw_job_exit_status (job); + termsig = WTERMSIG (s); + + /* POSIX.2 says we have to hang onto the statuses of at most the + last CHILD_MAX background processes if the shell is running a + script. If the shell is running a script, either from a file + or standard input, don't print anything unless the job was + killed by a signal. */ + if (startup_state == 0 && WIFSIGNALED (s) == 0 && + ((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job))) + continue; + + /* If job control is disabled, don't print the status messages. + Mark dead jobs as notified so that they get cleaned up. If + startup_state == 2 and subshell_environment has the + SUBSHELL_COMSUB bit turned on, we were started to run a command + substitution, so don't print anything. + Otherwise, if the shell is not interactive, POSIX says that `jobs' + is the only way to notify of job status. */ + if ((job_control == 0 && interactive_shell) || + (startup_state == 2 && (subshell_environment & SUBSHELL_COMSUB)) || + (startup_state == 2 && posixly_correct && (subshell_environment & SUBSHELL_COMSUB) == 0)) + { + /* POSIX.2 compatibility: if the shell is not interactive, + hang onto the job corresponding to the last asynchronous + pid until the user has been notified of its status or does + a `wait'. */ + if (DEADJOB (job) && (interactive_shell || (find_last_pid (job, 0) != last_asynchronous_pid))) + jobs[job]->flags |= J_NOTIFIED; + continue; + } + + /* Print info on jobs that are running in the background, + and on foreground jobs that were killed by anything + except SIGINT (and possibly SIGPIPE). */ + switch (JOBSTATE (job)) + { + case JDEAD: + if (interactive_shell == 0 && termsig && WIFSIGNALED (s) && + termsig != SIGINT && +#if defined (DONT_REPORT_SIGTERM) + termsig != SIGTERM && +#endif +#if defined (DONT_REPORT_SIGPIPE) + termsig != SIGPIPE && +#endif + signal_is_trapped (termsig) == 0) + { + /* Don't print `0' for a line number. */ + fprintf (stderr, _("%s: line %d: "), get_name_for_error (), (line_number == 0) ? 1 : line_number); + pretty_print_job (job, JLIST_NONINTERACTIVE, stderr); + } + else if (IS_FOREGROUND (job)) + { +#if !defined (DONT_REPORT_SIGPIPE) + if (termsig && WIFSIGNALED (s) && termsig != SIGINT) +#else + if (termsig && WIFSIGNALED (s) && termsig != SIGINT && termsig != SIGPIPE) +#endif + { + fprintf (stderr, "%s", j_strsignal (termsig)); + + if (WIFCORED (s)) + fprintf (stderr, _(" (core dumped)")); + + fprintf (stderr, "\n"); + } + } + else if (job_control) /* XXX job control test added */ + { + if (dir == 0) + dir = current_working_directory (); + pretty_print_job (job, JLIST_STANDARD, stderr); + if (dir && strcmp (dir, jobs[job]->wd) != 0) + fprintf (stderr, + _("(wd now: %s)\n"), polite_directory_format (dir)); + } + + jobs[job]->flags |= J_NOTIFIED; + break; + + case JSTOPPED: + fprintf (stderr, "\n"); + if (dir == 0) + dir = current_working_directory (); + pretty_print_job (job, JLIST_STANDARD, stderr); + if (dir && (strcmp (dir, jobs[job]->wd) != 0)) + fprintf (stderr, + _("(wd now: %s)\n"), polite_directory_format (dir)); + jobs[job]->flags |= J_NOTIFIED; + break; + + case JRUNNING: + case JMIXED: + break; + + default: + programming_error ("notify_of_job_status"); + } + } + } + if (old_ttou != 0) + sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); + else + queue_sigchld--; +} + +/* Initialize the job control mechanism, and set up the tty stuff. */ +int +initialize_job_control (force) + int force; +{ + pid_t t; + int t_errno, tty_sigs; + + t_errno = -1; + shell_pgrp = getpgid (0); + + if (shell_pgrp == -1) + { + sys_error (_("initialize_job_control: getpgrp failed")); + exit (1); + } + + /* We can only have job control if we are interactive unless we force it. */ + if (interactive == 0 && force == 0) + { + job_control = 0; + original_pgrp = NO_PID; + shell_tty = fileno (stderr); + terminal_pgrp = tcgetpgrp (shell_tty); /* for checking later */ + } + else + { + shell_tty = -1; + + /* If forced_interactive is set, we skip the normal check that stderr + is attached to a tty, so we need to check here. If it's not, we + need to see whether we have a controlling tty by opening /dev/tty, + since trying to use job control tty pgrp manipulations on a non-tty + is going to fail. */ + if (forced_interactive && isatty (fileno (stderr)) == 0) + shell_tty = open ("/dev/tty", O_RDWR|O_NONBLOCK); + + /* Get our controlling terminal. If job_control is set, or + interactive is set, then this is an interactive shell no + matter where fd 2 is directed. */ + if (shell_tty == -1) + shell_tty = dup (fileno (stderr)); /* fd 2 */ + + if (shell_tty != -1) + shell_tty = move_to_high_fd (shell_tty, 1, -1); + + /* Compensate for a bug in systems that compiled the BSD + rlogind with DEBUG defined, like NeXT and Alliant. */ + if (shell_pgrp == 0) + { + shell_pgrp = getpid (); + setpgid (0, shell_pgrp); + if (shell_tty != -1) + tcsetpgrp (shell_tty, shell_pgrp); + } + + tty_sigs = 0; + while ((terminal_pgrp = tcgetpgrp (shell_tty)) != -1) + { + if (shell_pgrp != terminal_pgrp) + { + SigHandler *ottin; + + CHECK_TERMSIG; + ottin = set_signal_handler (SIGTTIN, SIG_DFL); + kill (0, SIGTTIN); + set_signal_handler (SIGTTIN, ottin); + if (tty_sigs++ > 16) + { + sys_error (_("initialize_job_control: no job control in background")); + job_control = 0; + original_pgrp = terminal_pgrp; /* for eventual give_terminal_to */ + goto just_bail; + } + continue; + } + break; + } + + if (terminal_pgrp == -1) + t_errno = errno; + + /* Make sure that we are using the new line discipline. */ + if (set_new_line_discipline (shell_tty) < 0) + { + sys_error (_("initialize_job_control: line discipline")); + job_control = 0; + } + else + { + original_pgrp = shell_pgrp; + shell_pgrp = getpid (); + + if ((original_pgrp != shell_pgrp) && (setpgid (0, shell_pgrp) < 0)) + { + sys_error (_("initialize_job_control: setpgid")); + shell_pgrp = original_pgrp; + } + + job_control = 1; + + /* If (and only if) we just set our process group to our pid, + thereby becoming a process group leader, and the terminal + is not in the same process group as our (new) process group, + then set the terminal's process group to our (new) process + group. If that fails, set our process group back to what it + was originally (so we can still read from the terminal) and + turn off job control. */ + if (shell_pgrp != original_pgrp && shell_pgrp != terminal_pgrp) + { + if (give_terminal_to (shell_pgrp, 0) < 0) + { + t_errno = errno; + setpgid (0, original_pgrp); + shell_pgrp = original_pgrp; + errno = t_errno; + sys_error (_("cannot set terminal process group (%d)"), shell_pgrp); + job_control = 0; + } + } + + if (job_control && ((t = tcgetpgrp (shell_tty)) == -1 || t != shell_pgrp)) + { + if (t_errno != -1) + errno = t_errno; + sys_error (_("cannot set terminal process group (%d)"), t); + job_control = 0; + } + } + if (job_control == 0) + internal_error (_("no job control in this shell")); + } + +just_bail: + running_in_background = terminal_pgrp != shell_pgrp; + + if (shell_tty != fileno (stderr)) + SET_CLOSE_ON_EXEC (shell_tty); + + set_signal_handler (SIGCHLD, sigchld_handler); + + change_flag ('m', job_control ? '-' : '+'); + + if (interactive) + get_tty_state (); + + set_maxchild (0); + + return job_control; +} + +#ifdef DEBUG +void +debug_print_pgrps () +{ + itrace("original_pgrp = %ld shell_pgrp = %ld terminal_pgrp = %ld", + (long)original_pgrp, (long)shell_pgrp, (long)terminal_pgrp); + itrace("tcgetpgrp(%d) -> %ld, getpgid(0) -> %ld", + shell_tty, (long)tcgetpgrp (shell_tty), (long)getpgid(0)); +} +#endif + +/* Set the line discipline to the best this system has to offer. + Return -1 if this is not possible. */ +static int +set_new_line_discipline (tty) + int tty; +{ +#if defined (NEW_TTY_DRIVER) + int ldisc; + + if (ioctl (tty, TIOCGETD, &ldisc) < 0) + return (-1); + + if (ldisc != NTTYDISC) + { + ldisc = NTTYDISC; + + if (ioctl (tty, TIOCSETD, &ldisc) < 0) + return (-1); + } + return (0); +#endif /* NEW_TTY_DRIVER */ + +#if defined (TERMIO_TTY_DRIVER) +# if defined (TERMIO_LDISC) && (NTTYDISC) + if (ioctl (tty, TCGETA, &shell_tty_info) < 0) + return (-1); + + if (shell_tty_info.c_line != NTTYDISC) + { + shell_tty_info.c_line = NTTYDISC; + if (ioctl (tty, TCSETAW, &shell_tty_info) < 0) + return (-1); + } +# endif /* TERMIO_LDISC && NTTYDISC */ + return (0); +#endif /* TERMIO_TTY_DRIVER */ + +#if defined (TERMIOS_TTY_DRIVER) +# if defined (TERMIOS_LDISC) && defined (NTTYDISC) + if (tcgetattr (tty, &shell_tty_info) < 0) + return (-1); + + if (shell_tty_info.c_line != NTTYDISC) + { + shell_tty_info.c_line = NTTYDISC; + if (tcsetattr (tty, TCSADRAIN, &shell_tty_info) < 0) + return (-1); + } +# endif /* TERMIOS_LDISC && NTTYDISC */ + return (0); +#endif /* TERMIOS_TTY_DRIVER */ + +#if !defined (NEW_TTY_DRIVER) && !defined (TERMIO_TTY_DRIVER) && !defined (TERMIOS_TTY_DRIVER) + return (-1); +#endif +} + +/* Setup this shell to handle C-C, etc. */ +void +initialize_job_signals () +{ + if (interactive) + { + set_signal_handler (SIGINT, sigint_sighandler); + set_signal_handler (SIGTSTP, SIG_IGN); + set_signal_handler (SIGTTOU, SIG_IGN); + set_signal_handler (SIGTTIN, SIG_IGN); + } + else if (job_control) + { + old_tstp = set_signal_handler (SIGTSTP, sigstop_sighandler); + old_ttin = set_signal_handler (SIGTTIN, sigstop_sighandler); + old_ttou = set_signal_handler (SIGTTOU, sigstop_sighandler); + } + /* Leave disposition unmodified for non-interactive shells without job + control. */ +} + +/* Here we handle CONT signals. */ +static sighandler +sigcont_sighandler (sig) + int sig; +{ + initialize_job_signals (); + set_signal_handler (SIGCONT, old_cont); + kill (getpid (), SIGCONT); + + SIGRETURN (0); +} + +/* Here we handle stop signals while we are running not as a login shell. */ +static sighandler +sigstop_sighandler (sig) + int sig; +{ + set_signal_handler (SIGTSTP, old_tstp); + set_signal_handler (SIGTTOU, old_ttou); + set_signal_handler (SIGTTIN, old_ttin); + + old_cont = set_signal_handler (SIGCONT, sigcont_sighandler); + + give_terminal_to (shell_pgrp, 0); + + kill (getpid (), sig); + + SIGRETURN (0); +} + +/* Give the terminal to PGRP. */ +int +give_terminal_to (pgrp, force) + pid_t pgrp; + int force; +{ + sigset_t set, oset; + int r, e; + + r = 0; + if (job_control || force) + { + sigemptyset (&set); + sigaddset (&set, SIGTTOU); + sigaddset (&set, SIGTTIN); + sigaddset (&set, SIGTSTP); + sigaddset (&set, SIGCHLD); + sigemptyset (&oset); + sigprocmask (SIG_BLOCK, &set, &oset); + + if (tcsetpgrp (shell_tty, pgrp) < 0) + { + /* Maybe we should print an error message? */ +#if 0 + sys_error ("tcsetpgrp(%d) failed: pid %ld to pgrp %ld", + shell_tty, (long)getpid(), (long)pgrp); +#endif + r = -1; + e = errno; + } + else + terminal_pgrp = pgrp; + sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); + } + + if (r == -1) + errno = e; + + return r; +} + +/* Give terminal to NPGRP iff it's currently owned by OPGRP. FLAGS are the + flags to pass to give_terminal_to(). */ +static int +maybe_give_terminal_to (opgrp, npgrp, flags) + pid_t opgrp, npgrp; + int flags; +{ + int tpgrp; + + tpgrp = tcgetpgrp (shell_tty); + if (tpgrp < 0 && errno == ENOTTY) + return -1; + if (tpgrp == npgrp) + { + terminal_pgrp = npgrp; + return 0; + } + else if (tpgrp != opgrp) + { +#if defined (DEBUG) + internal_warning ("%d: maybe_give_terminal_to: terminal pgrp == %d shell pgrp = %d new pgrp = %d in_background = %d", (int)getpid(), tpgrp, opgrp, npgrp, running_in_background); +#endif + return -1; + } + else + return (give_terminal_to (npgrp, flags)); +} + +/* Clear out any jobs in the job array. This is intended to be used by + children of the shell, who should not have any job structures as baggage + when they start executing (forking subshells for parenthesized execution + and functions with pipes are the two that spring to mind). If RUNNING_ONLY + is nonzero, only running jobs are removed from the table. */ +void +delete_all_jobs (running_only) + int running_only; +{ + register int i; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + + /* XXX - need to set j_lastj, j_firstj appropriately if running_only != 0. */ + if (js.j_jobslots) + { + js.j_current = js.j_previous = NO_JOB; + + /* XXX could use js.j_firstj here */ + for (i = 0; i < js.j_jobslots; i++) + { +#if defined (DEBUG) + if (i < js.j_firstj && jobs[i]) + itrace("delete_all_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("delete_all_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); +#endif + if (jobs[i] && (running_only == 0 || (running_only && RUNNING(i)))) + /* We don't want to add any of these pids to bgpids. If running_only + is non-zero, we don't want to add running jobs to the list. + If we are interested in all jobs, not just running jobs, and + we are going to clear the bgpids list below (bgp_clear()), we + don't need to bother. */ + delete_job (i, DEL_WARNSTOPPED|DEL_NOBGPID); + } + if (running_only == 0) + { + free ((char *)jobs); + js.j_jobslots = 0; + js.j_firstj = js.j_lastj = js.j_njobs = 0; + } + } + + if (running_only == 0) + bgp_clear (); + + UNBLOCK_CHILD (oset); +} + +/* Mark all jobs in the job array so that they don't get a SIGHUP when the + shell gets one. If RUNNING_ONLY is nonzero, mark only running jobs. */ +void +nohup_all_jobs (running_only) + int running_only; +{ + register int i; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + + if (js.j_jobslots) + { + /* XXX could use js.j_firstj here */ + for (i = 0; i < js.j_jobslots; i++) + if (jobs[i] && (running_only == 0 || (running_only && RUNNING(i)))) + nohup_job (i); + } + + UNBLOCK_CHILD (oset); +} + +int +count_all_jobs () +{ + int i, n; + sigset_t set, oset; + + /* This really counts all non-dead jobs. */ + BLOCK_CHILD (set, oset); + /* XXX could use js.j_firstj here */ + for (i = n = 0; i < js.j_jobslots; i++) + { +#if defined (DEBUG) + if (i < js.j_firstj && jobs[i]) + itrace("count_all_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("count_all_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); +#endif + if (jobs[i] && DEADJOB(i) == 0) + n++; + } + UNBLOCK_CHILD (oset); + return n; +} + +static void +mark_all_jobs_as_dead () +{ + register int i; + sigset_t set, oset; + + if (js.j_jobslots == 0) + return; + + BLOCK_CHILD (set, oset); + + /* XXX could use js.j_firstj here */ + for (i = 0; i < js.j_jobslots; i++) + if (jobs[i]) + { + jobs[i]->state = JDEAD; + js.j_ndead++; + } + + UNBLOCK_CHILD (oset); +} + +/* Mark all dead jobs as notified, so delete_job () cleans them out + of the job table properly. POSIX.2 says we need to save the + status of the last CHILD_MAX jobs, so we count the number of dead + jobs and mark only enough as notified to save CHILD_MAX statuses. */ +static void +mark_dead_jobs_as_notified (force) + int force; +{ + register int i, ndead, ndeadproc; + sigset_t set, oset; + + if (js.j_jobslots == 0) + return; + + BLOCK_CHILD (set, oset); + + /* If FORCE is non-zero, we don't have to keep CHILD_MAX statuses + around; just run through the array. */ + if (force) + { + /* XXX could use js.j_firstj here */ + for (i = 0; i < js.j_jobslots; i++) + { + if (jobs[i] && DEADJOB (i) && (interactive_shell || (find_last_pid (i, 0) != last_asynchronous_pid))) + jobs[i]->flags |= J_NOTIFIED; + } + UNBLOCK_CHILD (oset); + return; + } + + /* Mark enough dead jobs as notified to keep CHILD_MAX processes left in the + array with the corresponding not marked as notified. This is a better + way to avoid pid aliasing and reuse problems than keeping the POSIX- + mandated CHILD_MAX jobs around. delete_job() takes care of keeping the + bgpids list regulated. */ + + /* Count the number of dead jobs */ + /* XXX could use js.j_firstj here */ + for (i = ndead = ndeadproc = 0; i < js.j_jobslots; i++) + { +#if defined (DEBUG) + if (i < js.j_firstj && jobs[i]) + itrace("mark_dead_jobs_as_notified: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("mark_dead_jobs_as_notified: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); +#endif + if (jobs[i] && DEADJOB (i)) + { + ndead++; + ndeadproc += processes_in_job (i); + } + } + +#ifdef DEBUG +# if 0 + if (ndeadproc != js.c_reaped) + itrace("mark_dead_jobs_as_notified: ndeadproc (%d) != js.c_reaped (%d)", ndeadproc, js.c_reaped); +# endif + if (ndead != js.j_ndead) + itrace("mark_dead_jobs_as_notified: ndead (%d) != js.j_ndead (%d)", ndead, js.j_ndead); +#endif + + if (js.c_childmax < 0) + set_maxchild (0); + + /* Don't do anything if the number of dead processes is less than CHILD_MAX + and we're not forcing a cleanup. */ + if (ndeadproc <= js.c_childmax) + { + UNBLOCK_CHILD (oset); + return; + } + +#if 0 +itrace("mark_dead_jobs_as_notified: child_max = %d ndead = %d ndeadproc = %d", js.c_childmax, ndead, ndeadproc); +#endif + + /* Mark enough dead jobs as notified that we keep CHILD_MAX jobs in + the list. This isn't exactly right yet; changes need to be made + to stop_pipeline so we don't mark the newer jobs after we've + created CHILD_MAX slots in the jobs array. This needs to be + integrated with a way to keep the jobs array from growing without + bound. Maybe we wrap back around to 0 after we reach some max + limit, and there are sufficient job slots free (keep track of total + size of jobs array (js.j_jobslots) and running count of number of jobs + in jobs array. Then keep a job index corresponding to the `oldest job' + and start this loop there, wrapping around as necessary. In effect, + we turn the list into a circular buffer. */ + /* XXX could use js.j_firstj here */ + for (i = 0; i < js.j_jobslots; i++) + { + if (jobs[i] && DEADJOB (i) && (interactive_shell || (find_last_pid (i, 0) != last_asynchronous_pid))) + { +#if defined (DEBUG) + if (i < js.j_firstj && jobs[i]) + itrace("mark_dead_jobs_as_notified: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("mark_dead_jobs_as_notified: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); +#endif + /* If marking this job as notified would drop us down below + child_max, don't mark it so we can keep at least child_max + statuses. XXX -- need to check what Posix actually says + about keeping statuses. */ + if ((ndeadproc -= processes_in_job (i)) <= js.c_childmax) + break; + jobs[i]->flags |= J_NOTIFIED; + } + } + + UNBLOCK_CHILD (oset); +} + +/* Here to allow other parts of the shell (like the trap stuff) to + freeze and unfreeze the jobs list. */ +int +freeze_jobs_list () +{ + int o; + + o = jobs_list_frozen; + jobs_list_frozen = 1; + return o; +} + +void +unfreeze_jobs_list () +{ + jobs_list_frozen = 0; +} + +void +set_jobs_list_frozen (s) + int s; +{ + jobs_list_frozen = s; +} + +/* Allow or disallow job control to take place. Returns the old value + of job_control. */ +int +set_job_control (arg) + int arg; +{ + int old; + + old = job_control; + job_control = arg; + + if (terminal_pgrp == NO_PID) + terminal_pgrp = tcgetpgrp (shell_tty); + + /* If we're turning on job control we're going to want to know the shell's + process group. */ + if (job_control != old && job_control) + shell_pgrp = getpgid (0); + + running_in_background = (terminal_pgrp != shell_pgrp); + +#if 0 + if (interactive_shell == 0 && running_in_background == 0 && job_control != old) + { + if (job_control) + initialize_job_signals (); + else + default_tty_job_signals (); + } +#endif + + /* If we're turning on job control, reset pipeline_pgrp so make_child will + put new child processes into the right pgrp */ + if (job_control != old && job_control) + pipeline_pgrp = 0; + + return (old); +} + +/* Turn off all traces of job control. This is run by children of the shell + which are going to do shellsy things, like wait (), etc. */ +void +without_job_control () +{ + stop_making_children (); + start_pipeline (); +#if defined (PGRP_PIPE) + sh_closepipe (pgrp_pipe); +#endif + delete_all_jobs (0); + set_job_control (0); +} + +/* If this shell is interactive, terminate all stopped jobs and + restore the original terminal process group. This is done + before the `exec' builtin calls shell_execve. */ +void +end_job_control () +{ + if (job_control) + terminate_stopped_jobs (); + + if (original_pgrp >= 0 && terminal_pgrp != original_pgrp) + give_terminal_to (original_pgrp, 1); + + if (original_pgrp >= 0 && setpgid (0, original_pgrp) == 0) + shell_pgrp = original_pgrp; +} + +/* Restart job control by closing shell tty and reinitializing. This is + called after an exec fails in an interactive shell and we do not exit. */ +void +restart_job_control () +{ + if (shell_tty != -1) + close (shell_tty); + initialize_job_control (0); +} + +/* Set the maximum number of background children we keep track of to NCHILD. + If the caller passes NCHILD as 0 or -1, this ends up setting it to + LMAXCHILD, which is initialized the first time through. */ +void +set_maxchild (nchild) + int nchild; +{ + static int lmaxchild = -1; + + /* Initialize once. */ + if (lmaxchild < 0) + { + errno = 0; + lmaxchild = getmaxchild (); + if (lmaxchild < 0 && errno == 0) + lmaxchild = MAX_CHILD_MAX; /* assume unlimited */ + } + if (lmaxchild < 0) + lmaxchild = DEFAULT_CHILD_MAX; + + /* Clamp value we set. Minimum is what Posix requires, maximum is defined + above as MAX_CHILD_MAX. */ + if (nchild < lmaxchild) + nchild = lmaxchild; + else if (nchild > MAX_CHILD_MAX) + nchild = MAX_CHILD_MAX; + + js.c_childmax = nchild; +} + +/* Set the handler to run when the shell receives a SIGCHLD signal. */ +void +set_sigchld_handler () +{ + set_signal_handler (SIGCHLD, sigchld_handler); +} + +#if defined (PGRP_PIPE) +/* Read from the read end of a pipe. This is how the process group leader + blocks until all of the processes in a pipeline have been made. */ +static void +pipe_read (pp) + int *pp; +{ + char ch; + + if (pp[1] >= 0) + { + close (pp[1]); + pp[1] = -1; + } + + if (pp[0] >= 0) + { + while (read (pp[0], &ch, 1) == -1 && errno == EINTR) + ; + } +} + +/* Functional interface closes our local-to-job-control pipes. */ +void +close_pgrp_pipe () +{ + sh_closepipe (pgrp_pipe); +} + +void +save_pgrp_pipe (p, clear) + int *p; + int clear; +{ + p[0] = pgrp_pipe[0]; + p[1] = pgrp_pipe[1]; + if (clear) + pgrp_pipe[0] = pgrp_pipe[1] = -1; +} + +void +restore_pgrp_pipe (p) + int *p; +{ + pgrp_pipe[0] = p[0]; + pgrp_pipe[1] = p[1]; +} + +#endif /* PGRP_PIPE */ diff --git a/bash-5.1/jobs.h b/bash-5.1/jobs.h new file mode 100644 index 0000000000000000000000000000000000000000..43ba8c23b291623230a5230e0ba55ee73ac78522 --- /dev/null +++ b/bash-5.1/jobs.h @@ -0,0 +1,321 @@ +/* jobs.h -- structures and definitions used by the jobs.c file. */ + +/* Copyright (C) 1993-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_JOBS_H_) +# define _JOBS_H_ + +#include "quit.h" +#include "siglist.h" + +#include "stdc.h" + +#include "posixwait.h" + +/* Defines controlling the fashion in which jobs are listed. */ +#define JLIST_STANDARD 0 +#define JLIST_LONG 1 +#define JLIST_PID_ONLY 2 +#define JLIST_CHANGED_ONLY 3 +#define JLIST_NONINTERACTIVE 4 + +/* I looked it up. For pretty_print_job (). The real answer is 24. */ +#define LONGEST_SIGNAL_DESC 24 + +/* Defines for the wait_for_* functions and for the wait builtin to use */ +#define JWAIT_PERROR (1 << 0) +#define JWAIT_FORCE (1 << 1) +#define JWAIT_NOWAIT (1 << 2) /* don't waitpid(), just return status if already exited */ +#define JWAIT_WAITING (1 << 3) /* wait for jobs marked J_WAITING only */ + +/* flags for wait_for */ +#define JWAIT_NOTERM (1 << 8) /* wait_for doesn't give terminal away */ + +/* The max time to sleep while retrying fork() on EAGAIN failure */ +#define FORKSLEEP_MAX 16 + +/* We keep an array of jobs. Each entry in the array is a linked list + of processes that are piped together. The first process encountered is + the group leader. */ + +/* Values for the `running' field of a struct process. */ +#define PS_DONE 0 +#define PS_RUNNING 1 +#define PS_STOPPED 2 +#define PS_RECYCLED 4 + +/* Each child of the shell is remembered in a STRUCT PROCESS. A circular + chain of such structures is a pipeline. */ +typedef struct process { + struct process *next; /* Next process in the pipeline. A circular chain. */ + pid_t pid; /* Process ID. */ + WAIT status; /* The status of this command as returned by wait. */ + int running; /* Non-zero if this process is running. */ + char *command; /* The particular program that is running. */ +} PROCESS; + +struct pipeline_saver { + struct process *pipeline; + struct pipeline_saver *next; +}; + +/* PALIVE really means `not exited' */ +#define PSTOPPED(p) (WIFSTOPPED((p)->status)) +#define PRUNNING(p) ((p)->running == PS_RUNNING) +#define PALIVE(p) (PRUNNING(p) || PSTOPPED(p)) + +#define PEXITED(p) ((p)->running == PS_DONE) +#if defined (RECYCLES_PIDS) +# define PRECYCLED(p) ((p)->running == PS_RECYCLED) +#else +# define PRECYCLED(p) (0) +#endif +#define PDEADPROC(p) (PEXITED(p) || PRECYCLED(p)) + +#define get_job_by_jid(ind) (jobs[(ind)]) + +/* A description of a pipeline's state. */ +typedef enum { JNONE = -1, JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, JMIXED = 8 } JOB_STATE; +#define JOBSTATE(job) (jobs[(job)]->state) +#define J_JOBSTATE(j) ((j)->state) + +#define STOPPED(j) (jobs[(j)]->state == JSTOPPED) +#define RUNNING(j) (jobs[(j)]->state == JRUNNING) +#define DEADJOB(j) (jobs[(j)]->state == JDEAD) + +#define INVALID_JOB(j) ((j) < 0 || (j) >= js.j_jobslots || get_job_by_jid(j) == 0) + +/* Values for the FLAGS field in the JOB struct below. */ +#define J_FOREGROUND 0x01 /* Non-zero if this is running in the foreground. */ +#define J_NOTIFIED 0x02 /* Non-zero if already notified about job state. */ +#define J_JOBCONTROL 0x04 /* Non-zero if this job started under job control. */ +#define J_NOHUP 0x08 /* Don't send SIGHUP to job if shell gets SIGHUP. */ +#define J_STATSAVED 0x10 /* A process in this job had status saved via $! */ +#define J_ASYNC 0x20 /* Job was started asynchronously */ +#define J_PIPEFAIL 0x40 /* pipefail set when job was started */ +#define J_WAITING 0x80 /* one of a list of jobs for which we are waiting */ + +#define IS_FOREGROUND(j) ((jobs[j]->flags & J_FOREGROUND) != 0) +#define IS_NOTIFIED(j) ((jobs[j]->flags & J_NOTIFIED) != 0) +#define IS_JOBCONTROL(j) ((jobs[j]->flags & J_JOBCONTROL) != 0) +#define IS_ASYNC(j) ((jobs[j]->flags & J_ASYNC) != 0) +#define IS_WAITING(j) ((jobs[j]->flags & J_WAITING) != 0) + +typedef struct job { + char *wd; /* The working directory at time of invocation. */ + PROCESS *pipe; /* The pipeline of processes that make up this job. */ + pid_t pgrp; /* The process ID of the process group (necessary). */ + JOB_STATE state; /* The state that this job is in. */ + int flags; /* Flags word: J_NOTIFIED, J_FOREGROUND, or J_JOBCONTROL. */ +#if defined (JOB_CONTROL) + COMMAND *deferred; /* Commands that will execute when this job is done. */ + sh_vptrfunc_t *j_cleanup; /* Cleanup function to call when job marked JDEAD */ + PTR_T cleanarg; /* Argument passed to (*j_cleanup)() */ +#endif /* JOB_CONTROL */ +} JOB; + +struct jobstats { + /* limits */ + long c_childmax; + /* child process statistics */ + int c_living; /* running or stopped child processes */ + int c_reaped; /* exited child processes still in jobs list */ + int c_injobs; /* total number of child processes in jobs list */ + /* child process totals */ + int c_totforked; /* total number of children this shell has forked */ + int c_totreaped; /* total number of children this shell has reaped */ + /* job counters and indices */ + int j_jobslots; /* total size of jobs array */ + int j_lastj; /* last (newest) job allocated */ + int j_firstj; /* first (oldest) job allocated */ + int j_njobs; /* number of non-NULL jobs in jobs array */ + int j_ndead; /* number of JDEAD jobs in jobs array */ + /* */ + int j_current; /* current job */ + int j_previous; /* previous job */ + /* */ + JOB *j_lastmade; /* last job allocated by stop_pipeline */ + JOB *j_lastasync; /* last async job allocated by stop_pipeline */ +}; + +/* Revised to accommodate new hash table bgpids implementation. */ +typedef pid_t ps_index_t; + +struct pidstat { + ps_index_t bucket_next; + ps_index_t bucket_prev; + + pid_t pid; + bits16_t status; /* only 8 bits really needed */ +}; + +struct bgpids { + struct pidstat *storage; /* storage arena */ + + ps_index_t head; + ps_index_t nalloc; + + int npid; +}; + +#define NO_PIDSTAT (ps_index_t)-1 + +/* standalone process status struct, without bgpids indexes */ +struct procstat { + pid_t pid; + bits16_t status; +}; + +/* A standalone singly-linked list of PROCESS *, used in various places + including keeping track of process substitutions. */ +struct procchain { + PROCESS *head; + PROCESS *end; + int nproc; +}; + +#define NO_JOB -1 /* An impossible job array index. */ +#define DUP_JOB -2 /* A possible return value for get_job_spec (). */ +#define BAD_JOBSPEC -3 /* Bad syntax for job spec. */ + +/* A value which cannot be a process ID. */ +#define NO_PID (pid_t)-1 + +#define ANY_PID (pid_t)-1 + +/* flags for make_child () */ +#define FORK_SYNC 0 /* normal synchronous process */ +#define FORK_ASYNC 1 /* background process */ +#define FORK_NOJOB 2 /* don't put process in separate pgrp */ +#define FORK_NOTERM 4 /* don't give terminal to any pgrp */ + +/* System calls. */ +#if !defined (HAVE_UNISTD_H) +extern pid_t fork (), getpid (), getpgrp (); +#endif /* !HAVE_UNISTD_H */ + +/* Stuff from the jobs.c file. */ +extern struct jobstats js; + +extern pid_t original_pgrp, shell_pgrp, pipeline_pgrp; +extern volatile pid_t last_made_pid, last_asynchronous_pid; +extern int asynchronous_notification; + +extern int already_making_children; +extern int running_in_background; + +extern PROCESS *last_procsub_child; + +extern JOB **jobs; + +extern void making_children PARAMS((void)); +extern void stop_making_children PARAMS((void)); +extern void cleanup_the_pipeline PARAMS((void)); +extern void discard_last_procsub_child PARAMS((void)); +extern void save_pipeline PARAMS((int)); +extern PROCESS *restore_pipeline PARAMS((int)); +extern void start_pipeline PARAMS((void)); +extern int stop_pipeline PARAMS((int, COMMAND *)); +extern int discard_pipeline PARAMS((PROCESS *)); +extern void append_process PARAMS((char *, pid_t, int, int)); + +extern void save_proc_status PARAMS((pid_t, int)); + +extern PROCESS *procsub_add PARAMS((PROCESS *)); +extern PROCESS *procsub_search PARAMS((pid_t)); +extern PROCESS *procsub_delete PARAMS((pid_t)); +extern int procsub_waitpid PARAMS((pid_t)); +extern void procsub_waitall PARAMS((void)); +extern void procsub_clear PARAMS((void)); +extern void procsub_prune PARAMS((void)); + +extern void delete_job PARAMS((int, int)); +extern void nohup_job PARAMS((int)); +extern void delete_all_jobs PARAMS((int)); +extern void nohup_all_jobs PARAMS((int)); + +extern int count_all_jobs PARAMS((void)); + +extern void terminate_current_pipeline PARAMS((void)); +extern void terminate_stopped_jobs PARAMS((void)); +extern void hangup_all_jobs PARAMS((void)); +extern void kill_current_pipeline PARAMS((void)); + +#if defined (__STDC__) && defined (pid_t) +extern int get_job_by_pid PARAMS((int, int, PROCESS **)); +extern void describe_pid PARAMS((int)); +#else +extern int get_job_by_pid PARAMS((pid_t, int, PROCESS **)); +extern void describe_pid PARAMS((pid_t)); +#endif + +extern void list_one_job PARAMS((JOB *, int, int, int)); +extern void list_all_jobs PARAMS((int)); +extern void list_stopped_jobs PARAMS((int)); +extern void list_running_jobs PARAMS((int)); + +extern pid_t make_child PARAMS((char *, int)); + +extern int get_tty_state PARAMS((void)); +extern int set_tty_state PARAMS((void)); + +extern int job_exit_status PARAMS((int)); +extern int job_exit_signal PARAMS((int)); + +extern int wait_for_single_pid PARAMS((pid_t, int)); +extern void wait_for_background_pids PARAMS((struct procstat *)); +extern int wait_for PARAMS((pid_t, int)); +extern int wait_for_job PARAMS((int, int, struct procstat *)); +extern int wait_for_any_job PARAMS((int, struct procstat *)); + +extern void wait_sigint_cleanup PARAMS((void)); + +extern void notify_and_cleanup PARAMS((void)); +extern void reap_dead_jobs PARAMS((void)); +extern int start_job PARAMS((int, int)); +extern int kill_pid PARAMS((pid_t, int, int)); +extern int initialize_job_control PARAMS((int)); +extern void initialize_job_signals PARAMS((void)); +extern int give_terminal_to PARAMS((pid_t, int)); + +extern void run_sigchld_trap PARAMS((int)); + +extern int freeze_jobs_list PARAMS((void)); +extern void unfreeze_jobs_list PARAMS((void)); +extern void set_jobs_list_frozen PARAMS((int)); +extern int set_job_control PARAMS((int)); +extern void without_job_control PARAMS((void)); +extern void end_job_control PARAMS((void)); +extern void restart_job_control PARAMS((void)); +extern void set_sigchld_handler PARAMS((void)); +extern void ignore_tty_job_signals PARAMS((void)); +extern void default_tty_job_signals PARAMS((void)); +extern void get_original_tty_job_signals PARAMS((void)); + +extern void init_job_stats PARAMS((void)); + +extern void close_pgrp_pipe PARAMS((void)); +extern void save_pgrp_pipe PARAMS((int *, int)); +extern void restore_pgrp_pipe PARAMS((int *)); + +extern void set_maxchild PARAMS((int)); + +extern int job_control; /* set to 0 in nojobs.c */ + +#endif /* _JOBS_H_ */ diff --git a/bash-5.1/lib/glob/Makefile.in b/bash-5.1/lib/glob/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..314622f13e54d65f0a13989ef4c7e384365a816f --- /dev/null +++ b/bash-5.1/lib/glob/Makefile.in @@ -0,0 +1,168 @@ +## -*- text -*- #################################################### +# # +# Makefile for the GNU Glob Library. # +# # +#################################################################### +# +# Copyright (C) 1996-2009 Free Software Foundation, Inc. + +# 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 . + +srcdir = @srcdir@ +VPATH = @srcdir@ +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CC = @CC@ +RANLIB = @RANLIB@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +RM = rm -f +CP = cp +MV = mv + +SHELL = @MAKE_SHELL@ + +PROFILE_FLAGS = @PROFILE_FLAGS@ + +CFLAGS = @CFLAGS@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ + +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +BASHINCDIR = ${topdir}/include + +INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib + +CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) ${INCLUDES} $(CPPFLAGS) \ + $(LOCAL_CFLAGS) $(CFLAGS) ${ADDON_CFLAGS} + +# Here is a rule for making .o files from .c files that doesn't force +# the type of the machine (like -sun3) into the flags. +.c.o: + $(RM) $@ + $(CC) -c $(CCFLAGS) $< + +# The name of the library target. +LIBRARY_NAME = libglob.a + +# The C code source files for this library. +CSOURCES = $(srcdir)/glob.c $(srcdir)/strmatch.c $(srcdir)/smatch.c \ + $(srcdir)/xmbsrtowcs.c + +# The header files for this library. +HSOURCES = $(srcdir)/strmatch.h + +OBJECTS = glob.o strmatch.o smatch.o xmbsrtowcs.o gmisc.o + +# The texinfo files which document this library. +DOCSOURCE = doc/glob.texi +DOCOBJECT = doc/glob.dvi +DOCSUPPORT = doc/Makefile +DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) + +SUPPORT = Makefile ChangeLog $(DOCSUPPORT) + +SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) + +THINGS_TO_TAR = $(SOURCES) $(SUPPORT) + +###################################################################### + +all: $(LIBRARY_NAME) + +$(LIBRARY_NAME): $(OBJECTS) + $(RM) -f $@ + $(AR) $(ARFLAGS) $@ $(OBJECTS) + -test -n "$(RANLIB)" && $(RANLIB) $@ + +what-tar: + @for file in $(THINGS_TO_TAR); do \ + echo $(selfdir)$$file; \ + done + +documentation: force + -(cd doc; $(MAKE) $(MFLAGS)) +force: + +# The rule for 'includes' is written funny so that the if statement +# always returns TRUE unless there really was an error installing the +# include files. +install: + +clean: + rm -f $(OBJECTS) $(LIBRARY_NAME) + -(cd doc && $(MAKE) $(MFLAGS) $@ ) + +realclean distclean maintainer-clean: clean + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + $(RM) -f Makefile + +mostlyclean: clean + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + +${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile + -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h ) + +###################################################################### +# # +# Dependencies for the object files which make up this library. # +# # +###################################################################### + +smatch.o: strmatch.h +smatch.o: $(BUILD_DIR)/config.h +smatch.o: $(BASHINCDIR)/chartypes.h +smatch.o: $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h +smatch.o: $(BASHINCDIR)/shmbutil.h +smatch.o: $(topdir)/xmalloc.h + +strmatch.o: strmatch.h +strmatch.o: $(BUILD_DIR)/config.h +strmatch.o: $(BASHINCDIR)/stdc.h + +glob.o: $(BUILD_DIR)/config.h +glob.o: $(topdir)/shell.h $(BUILD_DIR)/pathnames.h +glob.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h +glob.o: $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/memalloc.h +glob.o: strmatch.h glob.h +glob.o: $(BASHINCDIR)/shmbutil.h +glob.o: $(topdir)/xmalloc.h + +gmisc.o: $(BUILD_DIR)/config.h +gmisc.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h +gmisc.o: $(BASHINCDIR)/shmbutil.h + +xmbsrtowcs.o: ${BUILD_DIR}/config.h +xmbsrtowcs.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +xmbsrtowcs.o: ${BASHINCDIR}/shmbutil.h + +# Rules for deficient makes, like SunOS and Solaris +glob.o: glob.c +gmisc.o: gmisc.c +strmatch.o: strmatch.c +smatch.o: smatch.c +xmbsrtowcs.o: xmbsrtowcs.c + +# dependencies for C files that include other C files +glob.o: glob_loop.c +gmisc.o: gm_loop.c +smatch.o: sm_loop.c diff --git a/bash-5.1/lib/glob/collsyms.h b/bash-5.1/lib/glob/collsyms.h new file mode 100644 index 0000000000000000000000000000000000000000..d56df611387df0e8ca6eba5d33e342e2ea748d69 --- /dev/null +++ b/bash-5.1/lib/glob/collsyms.h @@ -0,0 +1,140 @@ +/* collsyms.h -- collating symbol names and their corresponding characters + (in ascii) as given by POSIX.2 in table 2.8. */ + +/* Copyright (C) 1997-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* The upper-case letters, lower-case letters, and digits are omitted from + this table. The digits are not included in the table in the POSIX.2 + spec. The upper and lower case letters are translated by the code + in smatch.c:collsym(). */ + +typedef struct _COLLSYM { + XCHAR *name; + CHAR code; +} __COLLSYM; + +static __COLLSYM POSIXCOLL [] = +{ + { L("NUL"), L('\0') }, + { L("SOH"), L('\001') }, + { L("STX"), L('\002') }, + { L("ETX"), L('\003') }, + { L("EOT"), L('\004') }, + { L("ENQ"), L('\005') }, + { L("ACK"), L('\006') }, +#ifdef __STDC__ + { L("alert"), L('\a') }, +#else + { L("alert"), L('\007') }, +#endif + { L("BS"), L('\010') }, + { L("backspace"), L('\b') }, + { L("HT"), L('\011') }, + { L("tab"), L('\t') }, + { L("LF"), L('\012') }, + { L("newline"), L('\n') }, + { L("VT"), L('\013') }, + { L("vertical-tab"), L('\v') }, + { L("FF"), L('\014') }, + { L("form-feed"), L('\f') }, + { L("CR"), L('\015') }, + { L("carriage-return"), L('\r') }, + { L("SO"), L('\016') }, + { L("SI"), L('\017') }, + { L("DLE"), L('\020') }, + { L("DC1"), L('\021') }, + { L("DC2"), L('\022') }, + { L("DC3"), L('\023') }, + { L("DC4"), L('\024') }, + { L("NAK"), L('\025') }, + { L("SYN"), L('\026') }, + { L("ETB"), L('\027') }, + { L("CAN"), L('\030') }, + { L("EM"), L('\031') }, + { L("SUB"), L('\032') }, + { L("ESC"), L('\033') }, + { L("IS4"), L('\034') }, + { L("FS"), L('\034') }, + { L("IS3"), L('\035') }, + { L("GS"), L('\035') }, + { L("IS2"), L('\036') }, + { L("RS"), L('\036') }, + { L("IS1"), L('\037') }, + { L("US"), L('\037') }, + { L("space"), L(' ') }, + { L("exclamation-mark"), L('!') }, + { L("quotation-mark"), L('"') }, + { L("number-sign"), L('#') }, + { L("dollar-sign"), L('$') }, + { L("percent-sign"), L('%') }, + { L("ampersand"), L('&') }, + { L("apostrophe"), L('\'') }, + { L("left-parenthesis"), L('(') }, + { L("right-parenthesis"), L(')') }, + { L("asterisk"), L('*') }, + { L("plus-sign"), L('+') }, + { L("comma"), L(',') }, + { L("hyphen"), L('-') }, + { L("hyphen-minus"), L('-') }, + { L("minus"), L('-') }, /* extension from POSIX.2 */ + { L("dash"), L('-') }, /* extension from POSIX.2 */ + { L("period"), L('.') }, + { L("full-stop"), L('.') }, + { L("slash"), L('/') }, + { L("solidus"), L('/') }, /* extension from POSIX.2 */ + { L("zero"), L('0') }, + { L("one"), L('1') }, + { L("two"), L('2') }, + { L("three"), L('3') }, + { L("four"), L('4') }, + { L("five"), L('5') }, + { L("six"), L('6') }, + { L("seven"), L('7') }, + { L("eight"), L('8') }, + { L("nine"), L('9') }, + { L("colon"), L(':') }, + { L("semicolon"), L(';') }, + { L("less-than-sign"), L('<') }, + { L("equals-sign"), L('=') }, + { L("greater-than-sign"), L('>') }, + { L("question-mark"), L('?') }, + { L("commercial-at"), L('@') }, + /* upper-case letters omitted */ + { L("left-square-bracket"), L('[') }, + { L("backslash"), L('\\') }, + { L("reverse-solidus"), L('\\') }, + { L("right-square-bracket"), L(']') }, + { L("circumflex"), L('^') }, + { L("circumflex-accent"), L('^') }, /* extension from POSIX.2 */ + { L("underscore"), L('_') }, + { L("grave-accent"), L('`') }, + /* lower-case letters omitted */ + { L("left-brace"), L('{') }, /* extension from POSIX.2 */ + { L("left-curly-bracket"), L('{') }, + { L("vertical-line"), L('|') }, + { L("right-brace"), L('}') }, /* extension from POSIX.2 */ + { L("right-curly-bracket"), L('}') }, + { L("tilde"), L('~') }, + { L("DEL"), L('\177') }, + { 0, 0 }, +}; + +#undef _COLLSYM +#undef __COLLSYM +#undef POSIXCOLL diff --git a/bash-5.1/lib/glob/doc/Makefile b/bash-5.1/lib/glob/doc/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..8dca606739d449b466647473fdda5024099560dd --- /dev/null +++ b/bash-5.1/lib/glob/doc/Makefile @@ -0,0 +1,5 @@ +all: + cp glob.texi glob.info + +clean distclean mostlyclean maintainer-clean: + rm -f glob.?? glob.info diff --git a/bash-5.1/lib/glob/doc/glob.texi b/bash-5.1/lib/glob/doc/glob.texi new file mode 100644 index 0000000000000000000000000000000000000000..0262ef1133ac45a7d3c601cb0246016a8cb09a21 --- /dev/null +++ b/bash-5.1/lib/glob/doc/glob.texi @@ -0,0 +1 @@ +Nothing happens here. diff --git a/bash-5.1/lib/glob/glob.c b/bash-5.1/lib/glob/glob.c new file mode 100644 index 0000000000000000000000000000000000000000..eb6277f0458f9626e8221c71bf3beb3545e2ae62 --- /dev/null +++ b/bash-5.1/lib/glob/glob.c @@ -0,0 +1,1554 @@ +/* glob.c -- file-name wildcard pattern matching for Bash. + + Copyright (C) 1985-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* To whomever it may concern: I have never seen the code which most + Unix programs use to perform this function. I wrote this from scratch + based on specifications for the pattern matching. --RMS. */ + +#include + +#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX) + #pragma alloca +#endif /* _AIX && RISC6000 && !__GNUC__ */ + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" +#include "posixdir.h" +#include "posixstat.h" +#include "shmbutil.h" +#include "xmalloc.h" + +#include "filecntl.h" +#if !defined (F_OK) +# define F_OK 0 +#endif + +#include "stdc.h" +#include "memalloc.h" + +#include + +#include "shell.h" +#include "general.h" + +#include "glob.h" +#include "strmatch.h" + +#if !defined (HAVE_BCOPY) && !defined (bcopy) +# define bcopy(s, d, n) ((void) memcpy ((d), (s), (n))) +#endif /* !HAVE_BCOPY && !bcopy */ + +#if !defined (NULL) +# if defined (__STDC__) +# define NULL ((void *) 0) +# else +# define NULL 0x0 +# endif /* __STDC__ */ +#endif /* !NULL */ + +#if !defined (FREE) +# define FREE(x) if (x) free (x) +#endif + +/* Don't try to alloca() more than this much memory for `struct globval' + in glob_vector() */ +#ifndef ALLOCA_MAX +# define ALLOCA_MAX 100000 +#endif + +struct globval + { + struct globval *next; + char *name; + }; + +extern void throw_to_top_level PARAMS((void)); +extern int sh_eaccess PARAMS((const char *, int)); +extern char *sh_makepath PARAMS((const char *, const char *, int)); +extern int signal_is_pending PARAMS((int)); +extern void run_pending_traps PARAMS((void)); + +extern int extended_glob; + +/* Global variable which controls whether or not * matches .*. + Non-zero means don't match .*. */ +int noglob_dot_filenames = 1; + +/* Global variable which controls whether or not filename globbing + is done without regard to case. */ +int glob_ignore_case = 0; + +/* Global variable controlling whether globbing ever returns . or .. + regardless of the pattern. If set to 1, no glob pattern will ever + match `.' or `..'. Disabled by default. */ +int glob_always_skip_dot_and_dotdot = 0; + +/* Global variable to return to signify an error in globbing. */ +char *glob_error_return; + +static struct globval finddirs_error_return; + +/* Some forward declarations. */ +static int skipname PARAMS((char *, char *, int)); +#if HANDLE_MULTIBYTE +static int mbskipname PARAMS((char *, char *, int)); +#endif +void udequote_pathname PARAMS((char *)); +#if HANDLE_MULTIBYTE +void wcdequote_pathname PARAMS((wchar_t *)); +static void wdequote_pathname PARAMS((char *)); +#else +# define dequote_pathname udequote_pathname +#endif +static void dequote_pathname PARAMS((char *)); +static int glob_testdir PARAMS((char *, int)); +static char **glob_dir_to_array PARAMS((char *, char **, int)); + +/* Make sure these names continue to agree with what's in smatch.c */ +extern char *glob_patscan PARAMS((char *, char *, int)); +extern wchar_t *glob_patscan_wc PARAMS((wchar_t *, wchar_t *, int)); + +/* And this from gmisc.c/gm_loop.c */ +extern int wextglob_pattern_p PARAMS((wchar_t *)); + +extern char *glob_dirscan PARAMS((char *, int)); + +/* Compile `glob_loop.c' for single-byte characters. */ +#define GCHAR unsigned char +#define CHAR char +#define INT int +#define L(CS) CS +#define INTERNAL_GLOB_PATTERN_P internal_glob_pattern_p +#include "glob_loop.c" + +/* Compile `glob_loop.c' again for multibyte characters. */ +#if HANDLE_MULTIBYTE + +#define GCHAR wchar_t +#define CHAR wchar_t +#define INT wint_t +#define L(CS) L##CS +#define INTERNAL_GLOB_PATTERN_P internal_glob_wpattern_p +#include "glob_loop.c" + +#endif /* HANDLE_MULTIBYTE */ + +/* And now a function that calls either the single-byte or multibyte version + of internal_glob_pattern_p. */ +int +glob_pattern_p (pattern) + const char *pattern; +{ +#if HANDLE_MULTIBYTE + size_t n; + wchar_t *wpattern; + int r; + + if (MB_CUR_MAX == 1 || mbsmbchar (pattern) == 0) + return (internal_glob_pattern_p ((unsigned char *)pattern)); + + /* Convert strings to wide chars, and call the multibyte version. */ + n = xdupmbstowcs (&wpattern, NULL, pattern); + if (n == (size_t)-1) + /* Oops. Invalid multibyte sequence. Try it as single-byte sequence. */ + return (internal_glob_pattern_p ((unsigned char *)pattern)); + + r = internal_glob_wpattern_p (wpattern); + free (wpattern); + + return r; +#else + return (internal_glob_pattern_p ((unsigned char *)pattern)); +#endif +} + +#if EXTENDED_GLOB +/* Return 1 if all subpatterns in the extended globbing pattern PAT indicate + that the name should be skipped. XXX - doesn't handle pattern negation, + not sure if it should */ +static int +extglob_skipname (pat, dname, flags) + char *pat, *dname; + int flags; +{ + char *pp, *pe, *t, *se; + int n, r, negate, wild, nullpat; + + negate = *pat == '!'; + wild = *pat == '*' || *pat == '?'; + pp = pat + 2; + se = pp + strlen (pp) - 1; /* end of string */ + pe = glob_patscan (pp, se, 0); /* end of extglob pattern (( */ + /* we should check for invalid extglob pattern here */ + if (pe == 0) + return 0; + + /* if pe != se we have more of the pattern at the end of the extglob + pattern. Check the easy case first ( */ + if (pe == se && *pe == ')' && (t = strchr (pp, '|')) == 0) + { + *pe = '\0'; +#if defined (HANDLE_MULTIBYTE) + r = mbskipname (pp, dname, flags); +#else + r = skipname (pp, dname, flags); /*(*/ +#endif + *pe = ')'; + if (wild && pe[1]) /* if we can match zero instances, check further */ + return (skipname (pe+1, dname, flags)); + return r; + } + + /* Is the extglob pattern between the parens the null pattern? The null + pattern can match nothing, so should we check any remaining portion of + the pattern? */ + nullpat = pe >= (pat + 2) && pe[-2] == '(' && pe[-1] == ')'; + + /* check every subpattern */ + while (t = glob_patscan (pp, pe, '|')) + { + n = t[-1]; /* ( */ + if (extglob_pattern_p (pp) && n == ')') + t[-1] = n; /* no-op for now */ + else + t[-1] = '\0'; +#if defined (HANDLE_MULTIBYTE) + r = mbskipname (pp, dname, flags); +#else + r = skipname (pp, dname, flags); +#endif + t[-1] = n; + if (r == 0) /* if any pattern says not skip, we don't skip */ + return r; + pp = t; + } /*(*/ + + /* glob_patscan might find end of string */ + if (pp == se) + return r; + + /* but if it doesn't then we didn't match a leading dot */ + if (wild && *pe) /* if we can match zero instances, check further */ + return (skipname (pe, dname, flags)); + return 1; +} +#endif + +/* Return 1 if DNAME should be skipped according to PAT. Mostly concerned + with matching leading `.'. */ +static int +skipname (pat, dname, flags) + char *pat; + char *dname; + int flags; +{ +#if EXTENDED_GLOB + if (extglob_pattern_p (pat)) /* XXX */ + return (extglob_skipname (pat, dname, flags)); +#endif + + if (glob_always_skip_dot_and_dotdot && DOT_OR_DOTDOT (dname)) + return 1; + + /* If a leading dot need not be explicitly matched, and the pattern + doesn't start with a `.', don't match `.' or `..' */ + if (noglob_dot_filenames == 0 && pat[0] != '.' && + (pat[0] != '\\' || pat[1] != '.') && + DOT_OR_DOTDOT (dname)) + return 1; + + /* If a dot must be explicitly matched, check to see if they do. */ + else if (noglob_dot_filenames && dname[0] == '.' && pat[0] != '.' && + (pat[0] != '\\' || pat[1] != '.')) + return 1; + + return 0; +} + +#if HANDLE_MULTIBYTE + +static int +wskipname (pat, dname, flags) + wchar_t *pat, *dname; + int flags; +{ + if (glob_always_skip_dot_and_dotdot && WDOT_OR_DOTDOT (dname)) + return 1; + + /* If a leading dot need not be explicitly matched, and the + pattern doesn't start with a `.', don't match `.' or `..' */ + if (noglob_dot_filenames == 0 && pat[0] != L'.' && + (pat[0] != L'\\' || pat[1] != L'.') && + WDOT_OR_DOTDOT (dname)) + return 1; + + /* If a leading dot must be explicitly matched, check to see if the + pattern and dirname both have one. */ + else if (noglob_dot_filenames && dname[0] == L'.' && + pat[0] != L'.' && + (pat[0] != L'\\' || pat[1] != L'.')) + return 1; + + return 0; +} + +static int +wextglob_skipname (pat, dname, flags) + wchar_t *pat, *dname; + int flags; +{ +#if EXTENDED_GLOB + wchar_t *pp, *pe, *t, n, *se; + int r, negate, wild, nullpat; + + negate = *pat == L'!'; + wild = *pat == L'*' || *pat == L'?'; + pp = pat + 2; + se = pp + wcslen (pp) - 1; /*(*/ + pe = glob_patscan_wc (pp, se, 0); + + if (pe == se && *pe == ')' && (t = wcschr (pp, L'|')) == 0) + { + *pe = L'\0'; + r = wskipname (pp, dname, flags); /*(*/ + *pe = L')'; + if (wild && pe[1] != L'\0') + return (wskipname (pe+1, dname, flags)); + return r; + } + + /* Is the extglob pattern between the parens the null pattern? The null + pattern can match nothing, so should we check any remaining portion of + the pattern? */ + nullpat = pe >= (pat + 2) && pe[-2] == L'(' && pe[-1] == L')'; + + /* check every subpattern */ + while (t = glob_patscan_wc (pp, pe, '|')) + { + n = t[-1]; /* ( */ + if (wextglob_pattern_p (pp) && n == L')') + t[-1] = n; /* no-op for now */ + else + t[-1] = L'\0'; + r = wskipname (pp, dname, flags); + t[-1] = n; + if (r == 0) + return 0; + pp = t; + } + + if (pp == pe) /* glob_patscan_wc might find end of pattern */ + return r; + + /* but if it doesn't then we didn't match a leading dot */ + if (wild && *pe != L'\0') + return (wskipname (pe, dname, flags)); + return 1; +#else + return (wskipname (pat, dname, flags)); +#endif +} + +/* Return 1 if DNAME should be skipped according to PAT. Handles multibyte + characters in PAT and DNAME. Mostly concerned with matching leading `.'. */ +static int +mbskipname (pat, dname, flags) + char *pat, *dname; + int flags; +{ + int ret, ext; + wchar_t *pat_wc, *dn_wc; + size_t pat_n, dn_n; + + if (mbsmbchar (dname) == 0 && mbsmbchar (pat) == 0) + return (skipname (pat, dname, flags)); + + ext = 0; +#if EXTENDED_GLOB + ext = extglob_pattern_p (pat); +#endif + + pat_wc = dn_wc = (wchar_t *)NULL; + + pat_n = xdupmbstowcs (&pat_wc, NULL, pat); + if (pat_n != (size_t)-1) + dn_n = xdupmbstowcs (&dn_wc, NULL, dname); + + ret = 0; + if (pat_n != (size_t)-1 && dn_n !=(size_t)-1) + ret = ext ? wextglob_skipname (pat_wc, dn_wc, flags) : wskipname (pat_wc, dn_wc, flags); + else + ret = skipname (pat, dname, flags); + + FREE (pat_wc); + FREE (dn_wc); + + return ret; +} +#endif /* HANDLE_MULTIBYTE */ + +/* Remove backslashes quoting characters in PATHNAME by modifying PATHNAME. */ +void +udequote_pathname (pathname) + char *pathname; +{ + register int i, j; + + for (i = j = 0; pathname && pathname[i]; ) + { + if (pathname[i] == '\\') + i++; + + pathname[j++] = pathname[i++]; + + if (pathname[i - 1] == 0) + break; + } + if (pathname) + pathname[j] = '\0'; +} + +#if HANDLE_MULTIBYTE +/* Remove backslashes quoting characters in PATHNAME by modifying PATHNAME. */ +void +wcdequote_pathname (wpathname) + wchar_t *wpathname; +{ + int i, j; + + for (i = j = 0; wpathname && wpathname[i]; ) + { + if (wpathname[i] == L'\\') + i++; + + wpathname[j++] = wpathname[i++]; + + if (wpathname[i - 1] == L'\0') + break; + } + if (wpathname) + wpathname[j] = L'\0'; +} + +static void +wdequote_pathname (pathname) + char *pathname; +{ + mbstate_t ps; + size_t len, n; + wchar_t *wpathname; + int i, j; + wchar_t *orig_wpathname; + + if (mbsmbchar (pathname) == 0) + { + udequote_pathname (pathname); + return; + } + + len = strlen (pathname); + /* Convert the strings into wide characters. */ + n = xdupmbstowcs (&wpathname, NULL, pathname); + if (n == (size_t) -1) + { + /* Something wrong. Fall back to single-byte */ + udequote_pathname (pathname); + return; + } + orig_wpathname = wpathname; + + wcdequote_pathname (wpathname); + + /* Convert the wide character string into unibyte character set. */ + memset (&ps, '\0', sizeof(mbstate_t)); + n = wcsrtombs(pathname, (const wchar_t **)&wpathname, len, &ps); + if (n == (size_t)-1 || (wpathname && *wpathname != 0)) /* what? now you tell me? */ + { + wpathname = orig_wpathname; + memset (&ps, '\0', sizeof(mbstate_t)); + n = xwcsrtombs (pathname, (const wchar_t **)&wpathname, len, &ps); + } + pathname[len] = '\0'; + + /* Can't just free wpathname here; wcsrtombs changes it in many cases. */ + free (orig_wpathname); +} + +static void +dequote_pathname (pathname) + char *pathname; +{ + if (MB_CUR_MAX > 1) + wdequote_pathname (pathname); + else + udequote_pathname (pathname); +} +#endif /* HANDLE_MULTIBYTE */ + +/* Test whether NAME exists. */ + +#if defined (HAVE_LSTAT) +# define GLOB_TESTNAME(name) (lstat (name, &finfo)) +#else /* !HAVE_LSTAT */ +# if !defined (AFS) +# define GLOB_TESTNAME(name) (sh_eaccess (name, F_OK)) +# else /* AFS */ +# define GLOB_TESTNAME(name) (access (name, F_OK)) +# endif /* AFS */ +#endif /* !HAVE_LSTAT */ + +/* Return 0 if DIR is a directory, -2 if DIR is a symlink, -1 otherwise. */ +static int +glob_testdir (dir, flags) + char *dir; + int flags; +{ + struct stat finfo; + int r; + +/*itrace("glob_testdir: testing %s" flags = %d, dir, flags);*/ +#if defined (HAVE_LSTAT) + r = (flags & GX_ALLDIRS) ? lstat (dir, &finfo) : stat (dir, &finfo); +#else + r = stat (dir, &finfo); +#endif + if (r < 0) + return (-1); + +#if defined (S_ISLNK) + if (S_ISLNK (finfo.st_mode)) + return (-2); +#endif + + if (S_ISDIR (finfo.st_mode) == 0) + return (-1); + + return (0); +} + +/* Recursively scan SDIR for directories matching PAT (PAT is always `**'). + FLAGS is simply passed down to the recursive call to glob_vector. Returns + a list of matching directory names. EP, if non-null, is set to the last + element of the returned list. NP, if non-null, is set to the number of + directories in the returned list. These two variables exist for the + convenience of the caller (always glob_vector). */ +static struct globval * +finddirs (pat, sdir, flags, ep, np) + char *pat; + char *sdir; + int flags; + struct globval **ep; + int *np; +{ + char **r, *n; + int ndirs; + struct globval *ret, *e, *g; + +/*itrace("finddirs: pat = `%s' sdir = `%s' flags = 0x%x", pat, sdir, flags);*/ + e = ret = 0; + r = glob_vector (pat, sdir, flags); + if (r == 0 || r[0] == 0) + { + if (np) + *np = 0; + if (ep) + *ep = 0; + if (r && r != &glob_error_return) + free (r); + return (struct globval *)0; + } + for (ndirs = 0; r[ndirs] != 0; ndirs++) + { + g = (struct globval *) malloc (sizeof (struct globval)); + if (g == 0) + { + while (ret) /* free list built so far */ + { + g = ret->next; + free (ret); + ret = g; + } + + free (r); + if (np) + *np = 0; + if (ep) + *ep = 0; + return (&finddirs_error_return); + } + if (e == 0) + e = g; + + g->next = ret; + ret = g; + + g->name = r[ndirs]; + } + + free (r); + if (ep) + *ep = e; + if (np) + *np = ndirs; + + return ret; +} + +/* Return a vector of names of files in directory DIR + whose names match glob pattern PAT. + The names are not in any particular order. + Wildcards at the beginning of PAT do not match an initial period. + + The vector is terminated by an element that is a null pointer. + + To free the space allocated, first free the vector's elements, + then free the vector. + + Return 0 if cannot get enough memory to hold the pointer + and the names. + + Return -1 if cannot access directory DIR. + Look in errno for more information. */ + +char ** +glob_vector (pat, dir, flags) + char *pat; + char *dir; + int flags; +{ + DIR *d; + register struct dirent *dp; + struct globval *lastlink, *e, *dirlist; + register struct globval *nextlink; + register char *nextname, *npat, *subdir; + unsigned int count; + int lose, skip, ndirs, isdir, sdlen, add_current, patlen; + register char **name_vector; + register unsigned int i; + int mflags; /* Flags passed to strmatch (). */ + int pflags; /* flags passed to sh_makepath () */ + int hasglob; /* return value from glob_pattern_p */ + int nalloca; + struct globval *firstmalloc, *tmplink; + char *convfn; + + lastlink = 0; + count = lose = skip = add_current = 0; + + firstmalloc = 0; + nalloca = 0; + + name_vector = NULL; + +/*itrace("glob_vector: pat = `%s' dir = `%s' flags = 0x%x", pat, dir, flags);*/ + /* If PAT is empty, skip the loop, but return one (empty) filename. */ + if (pat == 0 || *pat == '\0') + { + if (glob_testdir (dir, 0) < 0) + return ((char **) &glob_error_return); + + nextlink = (struct globval *)alloca (sizeof (struct globval)); + if (nextlink == NULL) + return ((char **) NULL); + + nextlink->next = (struct globval *)0; + nextname = (char *) malloc (1); + if (nextname == 0) + lose = 1; + else + { + lastlink = nextlink; + nextlink->name = nextname; + nextname[0] = '\0'; + count = 1; + } + + skip = 1; + } + + patlen = (pat && *pat) ? strlen (pat) : 0; + + /* If the filename pattern (PAT) does not contain any globbing characters, + or contains a pattern with only backslash escapes (hasglob == 2), + we can dispense with reading the directory, and just see if there is + a filename `DIR/PAT'. If there is, and we can access it, just make the + vector to return and bail immediately. */ + hasglob = 0; + if (skip == 0 && ((hasglob = glob_pattern_p (pat)) == 0 || hasglob == 2)) + { + int dirlen; + struct stat finfo; + + if (glob_testdir (dir, 0) < 0) + return ((char **) &glob_error_return); + + dirlen = strlen (dir); + nextname = (char *)malloc (dirlen + patlen + 2); + npat = (char *)malloc (patlen + 1); + if (nextname == 0 || npat == 0) + { + FREE (nextname); + FREE (npat); + lose = 1; + } + else + { + strcpy (npat, pat); + dequote_pathname (npat); + + strcpy (nextname, dir); + nextname[dirlen++] = '/'; + strcpy (nextname + dirlen, npat); + + if (GLOB_TESTNAME (nextname) >= 0) + { + free (nextname); + nextlink = (struct globval *)alloca (sizeof (struct globval)); + if (nextlink) + { + nextlink->next = (struct globval *)0; + lastlink = nextlink; + nextlink->name = npat; + count = 1; + } + else + { + free (npat); + lose = 1; + } + } + else + { + free (nextname); + free (npat); + } + } + + skip = 1; + } + + if (skip == 0) + { + /* Open the directory, punting immediately if we cannot. If opendir + is not robust (i.e., it opens non-directories successfully), test + that DIR is a directory and punt if it's not. */ +#if defined (OPENDIR_NOT_ROBUST) + if (glob_testdir (dir, 0) < 0) + return ((char **) &glob_error_return); +#endif + + d = opendir (dir); + if (d == NULL) + return ((char **) &glob_error_return); + + /* Compute the flags that will be passed to strmatch(). We don't + need to do this every time through the loop. */ + mflags = (noglob_dot_filenames ? FNM_PERIOD : 0) | FNM_PATHNAME; + +#ifdef FNM_CASEFOLD + if (glob_ignore_case) + mflags |= FNM_CASEFOLD; +#endif + + if (extended_glob) + mflags |= FNM_EXTMATCH; + + add_current = ((flags & (GX_ALLDIRS|GX_ADDCURDIR)) == (GX_ALLDIRS|GX_ADDCURDIR)); + + /* Scan the directory, finding all names that match. + For each name that matches, allocate a struct globval + on the stack and store the name in it. + Chain those structs together; lastlink is the front of the chain. */ + while (1) + { + /* Make globbing interruptible in the shell. */ + if (interrupt_state || terminating_signal) + { + lose = 1; + break; + } + else if (signal_is_pending (SIGINT)) /* XXX - make SIGINT traps responsive */ + { + lose = 1; + break; + } + + dp = readdir (d); + if (dp == NULL) + break; + + /* If this directory entry is not to be used, try again. */ + if (REAL_DIR_ENTRY (dp) == 0) + continue; + +#if 0 + if (dp->d_name == 0 || *dp->d_name == 0) + continue; +#endif + +#if HANDLE_MULTIBYTE + if (MB_CUR_MAX > 1 && mbskipname (pat, dp->d_name, flags)) + continue; + else +#endif + if (skipname (pat, dp->d_name, flags)) + continue; + + /* If we're only interested in directories, don't bother with files */ + if (flags & (GX_MATCHDIRS|GX_ALLDIRS)) + { + pflags = (flags & GX_ALLDIRS) ? MP_RMDOT : 0; + if (flags & GX_NULLDIR) + pflags |= MP_IGNDOT; + subdir = sh_makepath (dir, dp->d_name, pflags); + isdir = glob_testdir (subdir, flags); + if (isdir < 0 && (flags & GX_MATCHDIRS)) + { + free (subdir); + continue; + } + } + + if (flags & GX_ALLDIRS) + { + if (isdir == 0) + { + dirlist = finddirs (pat, subdir, (flags & ~GX_ADDCURDIR), &e, &ndirs); + if (dirlist == &finddirs_error_return) + { + free (subdir); + lose = 1; + break; + } + if (ndirs) /* add recursive directories to list */ + { + if (firstmalloc == 0) + firstmalloc = e; + e->next = lastlink; + lastlink = dirlist; + count += ndirs; + } + } + + /* XXX - should we even add this if it's not a directory? */ + nextlink = (struct globval *) malloc (sizeof (struct globval)); + if (firstmalloc == 0) + firstmalloc = nextlink; + sdlen = strlen (subdir); + nextname = (char *) malloc (sdlen + 1); + if (nextlink == 0 || nextname == 0) + { + FREE (nextlink); + FREE (nextname); + free (subdir); + lose = 1; + break; + } + nextlink->next = lastlink; + lastlink = nextlink; + nextlink->name = nextname; + bcopy (subdir, nextname, sdlen + 1); + free (subdir); + ++count; + continue; + } + else if (flags & GX_MATCHDIRS) + free (subdir); + + convfn = fnx_fromfs (dp->d_name, D_NAMLEN (dp)); + if (strmatch (pat, convfn, mflags) != FNM_NOMATCH) + { + if (nalloca < ALLOCA_MAX) + { + nextlink = (struct globval *) alloca (sizeof (struct globval)); + nalloca += sizeof (struct globval); + } + else + { + nextlink = (struct globval *) malloc (sizeof (struct globval)); + if (firstmalloc == 0) + firstmalloc = nextlink; + } + + nextname = (char *) malloc (D_NAMLEN (dp) + 1); + if (nextlink == 0 || nextname == 0) + { + FREE (nextlink); + FREE (nextname); + lose = 1; + break; + } + nextlink->next = lastlink; + lastlink = nextlink; + nextlink->name = nextname; + bcopy (dp->d_name, nextname, D_NAMLEN (dp) + 1); + ++count; + } + } + + (void) closedir (d); + } + + /* compat: if GX_ADDCURDIR, add the passed directory also. Add an empty + directory name as a placeholder if GX_NULLDIR (in which case the passed + directory name is "."). */ + if (add_current) + { + sdlen = strlen (dir); + nextname = (char *)malloc (sdlen + 1); + nextlink = (struct globval *) malloc (sizeof (struct globval)); + if (nextlink == 0 || nextname == 0) + { + FREE (nextlink); + FREE (nextname); + lose = 1; + } + else + { + nextlink->name = nextname; + nextlink->next = lastlink; + lastlink = nextlink; + if (flags & GX_NULLDIR) + nextname[0] = '\0'; + else + bcopy (dir, nextname, sdlen + 1); + ++count; + } + } + + if (lose == 0) + { + name_vector = (char **) malloc ((count + 1) * sizeof (char *)); + lose |= name_vector == NULL; + } + + /* Have we run out of memory? */ + if (lose) + { + tmplink = 0; + + /* Here free the strings we have got. */ + while (lastlink) + { + /* Since we build the list in reverse order, the first N entries + will be allocated with malloc, if firstmalloc is set, from + lastlink to firstmalloc. */ + if (firstmalloc) + { + if (lastlink == firstmalloc) + firstmalloc = 0; + tmplink = lastlink; + } + else + tmplink = 0; + free (lastlink->name); + lastlink = lastlink->next; + FREE (tmplink); + } + + /* Don't call QUIT; here; let higher layers deal with it. */ + + return ((char **)NULL); + } + + /* Copy the name pointers from the linked list into the vector. */ + for (tmplink = lastlink, i = 0; i < count; ++i) + { + name_vector[i] = tmplink->name; + tmplink = tmplink->next; + } + + name_vector[count] = NULL; + + /* If we allocated some of the struct globvals, free them now. */ + if (firstmalloc) + { + tmplink = 0; + while (lastlink) + { + tmplink = lastlink; + if (lastlink == firstmalloc) + lastlink = firstmalloc = 0; + else + lastlink = lastlink->next; + free (tmplink); + } + } + + return (name_vector); +} + +/* Return a new array which is the concatenation of each string in ARRAY + to DIR. This function expects you to pass in an allocated ARRAY, and + it takes care of free()ing that array. Thus, you might think of this + function as side-effecting ARRAY. This should handle GX_MARKDIRS. */ +static char ** +glob_dir_to_array (dir, array, flags) + char *dir, **array; + int flags; +{ + register unsigned int i, l; + int add_slash; + char **result, *new; + struct stat sb; + + l = strlen (dir); + if (l == 0) + { + if (flags & GX_MARKDIRS) + for (i = 0; array[i]; i++) + { + if ((stat (array[i], &sb) == 0) && S_ISDIR (sb.st_mode)) + { + l = strlen (array[i]); + new = (char *)realloc (array[i], l + 2); + if (new == 0) + return NULL; + new[l] = '/'; + new[l+1] = '\0'; + array[i] = new; + } + } + return (array); + } + + add_slash = dir[l - 1] != '/'; + + i = 0; + while (array[i] != NULL) + ++i; + + result = (char **) malloc ((i + 1) * sizeof (char *)); + if (result == NULL) + return (NULL); + + for (i = 0; array[i] != NULL; i++) + { + /* 3 == 1 for NUL, 1 for slash at end of DIR, 1 for GX_MARKDIRS */ + result[i] = (char *) malloc (l + strlen (array[i]) + 3); + + if (result[i] == NULL) + { + int ind; + for (ind = 0; ind < i; ind++) + free (result[ind]); + free (result); + return (NULL); + } + + strcpy (result[i], dir); + if (add_slash) + result[i][l] = '/'; + if (array[i][0]) + { + strcpy (result[i] + l + add_slash, array[i]); + if (flags & GX_MARKDIRS) + { + if ((stat (result[i], &sb) == 0) && S_ISDIR (sb.st_mode)) + { + size_t rlen; + rlen = strlen (result[i]); + result[i][rlen] = '/'; + result[i][rlen+1] = '\0'; + } + } + } + else + result[i][l+add_slash] = '\0'; + } + result[i] = NULL; + + /* Free the input array. */ + for (i = 0; array[i] != NULL; i++) + free (array[i]); + free ((char *) array); + + return (result); +} + +/* Do globbing on PATHNAME. Return an array of pathnames that match, + marking the end of the array with a null-pointer as an element. + If no pathnames match, then the array is empty (first element is null). + If there isn't enough memory, then return NULL. + If a file system error occurs, return -1; `errno' has the error code. */ +char ** +glob_filename (pathname, flags) + char *pathname; + int flags; +{ + char **result, **new_result; + unsigned int result_size; + char *directory_name, *filename, *dname, *fn; + unsigned int directory_len; + int free_dirname; /* flag */ + int dflags, hasglob; + + result = (char **) malloc (sizeof (char *)); + result_size = 1; + if (result == NULL) + return (NULL); + + result[0] = NULL; + + directory_name = NULL; + + /* Find the filename. */ + filename = strrchr (pathname, '/'); +#if defined (EXTENDED_GLOB) + if (filename && extended_glob) + { + fn = glob_dirscan (pathname, '/'); +#if DEBUG_MATCHING + if (fn != filename) + fprintf (stderr, "glob_filename: glob_dirscan: fn (%s) != filename (%s)\n", fn ? fn : "(null)", filename); +#endif + filename = fn; + } +#endif + + if (filename == NULL) + { + filename = pathname; + directory_name = ""; + directory_len = 0; + free_dirname = 0; + } + else + { + directory_len = (filename - pathname) + 1; + directory_name = (char *) malloc (directory_len + 1); + + if (directory_name == 0) /* allocation failed? */ + { + free (result); + return (NULL); + } + + bcopy (pathname, directory_name, directory_len); + directory_name[directory_len] = '\0'; + ++filename; + free_dirname = 1; + } + + hasglob = 0; + /* If directory_name contains globbing characters, then we + have to expand the previous levels. Just recurse. + If glob_pattern_p returns != [0,1] we have a pattern that has backslash + quotes but no unquoted glob pattern characters. We dequote it below. */ + if (directory_len > 0 && (hasglob = glob_pattern_p (directory_name)) == 1) + { + char **directories, *d, *p; + register unsigned int i; + int all_starstar, last_starstar; + + all_starstar = last_starstar = 0; + d = directory_name; + dflags = flags & ~GX_MARKDIRS; + /* Collapse a sequence of ** patterns separated by one or more slashes + to a single ** terminated by a slash or NUL */ + if ((flags & GX_GLOBSTAR) && d[0] == '*' && d[1] == '*' && (d[2] == '/' || d[2] == '\0')) + { + p = d; + while (d[0] == '*' && d[1] == '*' && (d[2] == '/' || d[2] == '\0')) + { + p = d; + if (d[2]) + { + d += 3; + while (*d == '/') + d++; + if (*d == 0) + break; + } + } + if (*d == 0) + all_starstar = 1; + d = p; + dflags |= GX_ALLDIRS|GX_ADDCURDIR; + directory_len = strlen (d); + } + + /* If there is a non [star][star]/ component in directory_name, we + still need to collapse trailing sequences of [star][star]/ into + a single one and note that the directory name ends with [star][star], + so we can compensate if filename is [star][star] */ + if ((flags & GX_GLOBSTAR) && all_starstar == 0) + { + int dl, prev; + prev = dl = directory_len; + while (dl >= 4 && d[dl - 1] == '/' && + d[dl - 2] == '*' && + d[dl - 3] == '*' && + d[dl - 4] == '/') + prev = dl, dl -= 3; + if (dl != directory_len) + last_starstar = 1; + directory_len = prev; + } + + /* If the directory name ends in [star][star]/ but the filename is + [star][star], just remove the final [star][star] from the directory + so we don't have to scan everything twice. */ + if (last_starstar && directory_len > 4 && + filename[0] == '*' && filename[1] == '*' && filename[2] == 0) + { + directory_len -= 3; + } + + if (d[directory_len - 1] == '/') + d[directory_len - 1] = '\0'; + + directories = glob_filename (d, dflags|GX_RECURSE); + + if (free_dirname) + { + free (directory_name); + directory_name = NULL; + } + + if (directories == NULL) + goto memory_error; + else if (directories == (char **)&glob_error_return) + { + free ((char *) result); + return ((char **) &glob_error_return); + } + else if (*directories == NULL) + { + free ((char *) directories); + free ((char *) result); + return ((char **) &glob_error_return); + } + + /* If we have something like [star][star]/[star][star], it's no use to + glob **, then do it again, and throw half the results away. */ + if (all_starstar && filename[0] == '*' && filename[1] == '*' && filename[2] == 0) + { + free ((char *) directories); + free (directory_name); + directory_name = NULL; + directory_len = 0; + goto only_filename; + } + + /* We have successfully globbed the preceding directory name. + For each name in DIRECTORIES, call glob_vector on it and + FILENAME. Concatenate the results together. */ + for (i = 0; directories[i] != NULL; ++i) + { + char **temp_results; + int shouldbreak; + + shouldbreak = 0; + /* XXX -- we've recursively scanned any directories resulting from + a `**', so turn off the flag. We turn it on again below if + filename is `**' */ + /* Scan directory even on a NULL filename. That way, `*h/' + returns only directories ending in `h', instead of all + files ending in `h' with a `/' appended. */ + dname = directories[i]; + dflags = flags & ~(GX_MARKDIRS|GX_ALLDIRS|GX_ADDCURDIR); + /* last_starstar? */ + if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') + dflags |= GX_ALLDIRS|GX_ADDCURDIR; + if (dname[0] == '\0' && filename[0]) + { + dflags |= GX_NULLDIR; + dname = "."; /* treat null directory name and non-null filename as current directory */ + } + + /* Special handling for symlinks to directories with globstar on */ + if (all_starstar && (dflags & GX_NULLDIR) == 0) + { + int dlen; + + /* If we have a directory name that is not null (GX_NULLDIR above) + and is a symlink to a directory, we return the symlink if + we're not `descending' into it (filename[0] == 0) and return + glob_error_return (which causes the code below to skip the + name) otherwise. I should fold this into a test that does both + checks instead of calling stat twice. */ + if (glob_testdir (dname, flags|GX_ALLDIRS) == -2 && glob_testdir (dname, 0) == 0) + { + if (filename[0] != 0) + temp_results = (char **)&glob_error_return; /* skip */ + else + { + /* Construct array to pass to glob_dir_to_array */ + temp_results = (char **)malloc (2 * sizeof (char *)); + if (temp_results == NULL) + goto memory_error; + temp_results[0] = (char *)malloc (1); + if (temp_results[0] == 0) + { + free (temp_results); + goto memory_error; + } + **temp_results = '\0'; + temp_results[1] = NULL; + dflags |= GX_SYMLINK; /* mostly for debugging */ + } + } + else + temp_results = glob_vector (filename, dname, dflags); + } + else + temp_results = glob_vector (filename, dname, dflags); + + /* Handle error cases. */ + if (temp_results == NULL) + goto memory_error; + else if (temp_results == (char **)&glob_error_return) + /* This filename is probably not a directory. Ignore it. */ + ; + else + { + char **array; + register unsigned int l; + + /* If we're expanding **, we don't need to glue the directory + name to the results; we've already done it in glob_vector */ + if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && (filename[2] == '\0' || filename[2] == '/')) + { + /* When do we remove null elements from temp_results? And + how to avoid duplicate elements in the final result? */ + /* If (dflags & GX_NULLDIR) glob_filename potentially left a + NULL placeholder in the temp results just in case + glob_vector/glob_dir_to_array did something with it, but + if it didn't, and we're not supposed to be passing them + through for some reason ((flags & GX_NULLDIR) == 0) we + need to remove all the NULL elements from the beginning + of TEMP_RESULTS. */ + /* If we have a null directory name and ** as the filename, + we have just searched for everything from the current + directory on down. Break now (shouldbreak = 1) to avoid + duplicate entries in the final result. */ +#define NULL_PLACEHOLDER(x) ((x) && *(x) && **(x) == 0) + if ((dflags & GX_NULLDIR) && (flags & GX_NULLDIR) == 0 && + NULL_PLACEHOLDER (temp_results)) +#undef NULL_PLACEHOLDER + { + register int i, n; + for (n = 0; temp_results[n] && *temp_results[n] == 0; n++) + ; + i = n; + do + temp_results[i - n] = temp_results[i]; + while (temp_results[i++] != 0); + array = temp_results; + shouldbreak = 1; + } + else + array = temp_results; + } + else if (dflags & GX_SYMLINK) + array = glob_dir_to_array (directories[i], temp_results, flags); + else + array = glob_dir_to_array (directories[i], temp_results, flags); + l = 0; + while (array[l] != NULL) + ++l; + + new_result = (char **)realloc (result, (result_size + l) * sizeof (char *)); + + if (new_result == NULL) + { + for (l = 0; array[l]; ++l) + free (array[l]); + free ((char *)array); + goto memory_error; + } + result = new_result; + + for (l = 0; array[l] != NULL; ++l) + result[result_size++ - 1] = array[l]; + + result[result_size - 1] = NULL; + + /* Note that the elements of ARRAY are not freed. */ + if (array != temp_results) + free ((char *) array); + else if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') + free (temp_results); /* expanding ** case above */ + + if (shouldbreak) + break; + } + } + /* Free the directories. */ + for (i = 0; directories[i]; i++) + free (directories[i]); + + free ((char *) directories); + + return (result); + } + +only_filename: + /* If there is only a directory name, return it. */ + if (*filename == '\0') + { + result = (char **) realloc ((char *) result, 2 * sizeof (char *)); + if (result == NULL) + { + if (free_dirname) + free (directory_name); + return (NULL); + } + /* If we have a directory name with quoted characters, and we are + being called recursively to glob the directory portion of a pathname, + we need to dequote the directory name before returning it so the + caller can read the directory */ + if (directory_len > 0 && hasglob == 2 && (flags & GX_RECURSE) != 0) + { + dequote_pathname (directory_name); + directory_len = strlen (directory_name); + } + + /* We could check whether or not the dequoted directory_name is a + directory and return it here, returning the original directory_name + if not, but we don't do that. We do return the dequoted directory + name if we're not being called recursively and the dequoted name + corresponds to an actual directory. For better backwards compatibility, + we can return &glob_error_return unconditionally in this case. */ + + if (directory_len > 0 && hasglob == 2 && (flags & GX_RECURSE) == 0) + { + dequote_pathname (directory_name); + if (glob_testdir (directory_name, 0) < 0) + { + if (free_dirname) + free (directory_name); + return ((char **)&glob_error_return); + } + } + + /* Handle GX_MARKDIRS here. */ + result[0] = (char *) malloc (directory_len + 1); + if (result[0] == NULL) + goto memory_error; + bcopy (directory_name, result[0], directory_len + 1); + if (free_dirname) + free (directory_name); + result[1] = NULL; + return (result); + } + else + { + char **temp_results; + + /* There are no unquoted globbing characters in DIRECTORY_NAME. + Dequote it before we try to open the directory since there may + be quoted globbing characters which should be treated verbatim. */ + if (directory_len > 0) + dequote_pathname (directory_name); + + /* We allocated a small array called RESULT, which we won't be using. + Free that memory now. */ + free (result); + + /* Just return what glob_vector () returns appended to the + directory name. */ + /* If flags & GX_ALLDIRS, we're called recursively */ + dflags = flags & ~GX_MARKDIRS; + if (directory_len == 0) + dflags |= GX_NULLDIR; + if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') + { + dflags |= GX_ALLDIRS|GX_ADDCURDIR; +#if 0 + /* If we want all directories (dflags & GX_ALLDIRS) and we're not + being called recursively as something like `echo [star][star]/[star].o' + ((flags & GX_ALLDIRS) == 0), we want to prevent glob_vector from + adding a null directory name to the front of the temp_results + array. We turn off ADDCURDIR if not called recursively and + dlen == 0 */ +#endif + if (directory_len == 0 && (flags & GX_ALLDIRS) == 0) + dflags &= ~GX_ADDCURDIR; + } + temp_results = glob_vector (filename, + (directory_len == 0 ? "." : directory_name), + dflags); + + if (temp_results == NULL || temp_results == (char **)&glob_error_return) + { + if (free_dirname) + free (directory_name); + QUIT; /* XXX - shell */ + run_pending_traps (); + return (temp_results); + } + + result = glob_dir_to_array ((dflags & GX_ALLDIRS) ? "" : directory_name, temp_results, flags); + + if (free_dirname) + free (directory_name); + return (result); + } + + /* We get to memory_error if the program has run out of memory, or + if this is the shell, and we have been interrupted. */ + memory_error: + if (result != NULL) + { + register unsigned int i; + for (i = 0; result[i] != NULL; ++i) + free (result[i]); + free ((char *) result); + } + + if (free_dirname && directory_name) + free (directory_name); + + QUIT; + run_pending_traps (); + + return (NULL); +} + +#if defined (TEST) + +main (argc, argv) + int argc; + char **argv; +{ + unsigned int i; + + for (i = 1; i < argc; ++i) + { + char **value = glob_filename (argv[i], 0); + if (value == NULL) + puts ("Out of memory."); + else if (value == &glob_error_return) + perror (argv[i]); + else + for (i = 0; value[i] != NULL; i++) + puts (value[i]); + } + + exit (0); +} +#endif /* TEST. */ diff --git a/bash-5.1/lib/glob/glob.h b/bash-5.1/lib/glob/glob.h new file mode 100644 index 0000000000000000000000000000000000000000..ca3a66cf1e218b3cff856fd1608c7a4e1241deb7 --- /dev/null +++ b/bash-5.1/lib/glob/glob.h @@ -0,0 +1,46 @@ +/* File-name wildcard pattern matching for GNU. + Copyright (C) 1985-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _GLOB_H_ +#define _GLOB_H_ + +#include "stdc.h" + +#define GX_MARKDIRS 0x001 /* mark directory names with trailing `/' */ +#define GX_NOCASE 0x002 /* ignore case */ +#define GX_MATCHDOT 0x004 /* match `.' literally */ +#define GX_MATCHDIRS 0x008 /* match only directory names */ +#define GX_ALLDIRS 0x010 /* match all directory names, no others */ +#define GX_NULLDIR 0x100 /* internal -- no directory preceding pattern */ +#define GX_ADDCURDIR 0x200 /* internal -- add passed directory name */ +#define GX_GLOBSTAR 0x400 /* turn on special handling of ** */ +#define GX_RECURSE 0x800 /* internal -- glob_filename called recursively */ +#define GX_SYMLINK 0x1000 /* internal -- symlink to a directory */ + +extern int glob_pattern_p PARAMS((const char *)); +extern char **glob_vector PARAMS((char *, char *, int)); +extern char **glob_filename PARAMS((char *, int)); + +extern int extglob_pattern_p PARAMS((const char *)); + +extern char *glob_error_return; +extern int noglob_dot_filenames; +extern int glob_ignore_case; + +#endif /* _GLOB_H_ */ diff --git a/bash-5.1/lib/glob/glob_loop.c b/bash-5.1/lib/glob/glob_loop.c new file mode 100644 index 0000000000000000000000000000000000000000..467e7ae3372d318a13be343fdb181f71f99ffd74 --- /dev/null +++ b/bash-5.1/lib/glob/glob_loop.c @@ -0,0 +1,84 @@ +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +static int INTERNAL_GLOB_PATTERN_P PARAMS((const GCHAR *)); + +/* Return nonzero if PATTERN has any special globbing chars in it. + Compiled twice, once each for single-byte and multibyte characters. */ +static int +INTERNAL_GLOB_PATTERN_P (pattern) + const GCHAR *pattern; +{ + register const GCHAR *p; + register GCHAR c; + int bopen, bsquote; + + p = pattern; + bopen = bsquote = 0; + + while ((c = *p++) != L('\0')) + switch (c) + { + case L('?'): + case L('*'): + return 1; + + case L('['): /* Only accept an open brace if there is a close */ + bopen++; /* brace to match it. Bracket expressions must be */ + continue; /* complete, according to Posix.2 */ + case L(']'): + if (bopen) + return 1; + continue; + + case L('+'): /* extended matching operators */ + case L('@'): + case L('!'): + if (*p == L('(')) /*) */ + return 1; + continue; + + case L('\\'): + /* Don't let the pattern end in a backslash (GMATCH returns no match + if the pattern ends in a backslash anyway), but otherwise note that + we have seen this, since the matching engine uses backslash as an + escape character and it can be removed. We return 2 later if we + have seen only backslash-escaped characters, so interested callers + know they can shortcut and just dequote the pathname. */ + if (*p != L('\0')) + { + p++; + bsquote = 1; + continue; + } + else /* (*p == L('\0')) */ + return 0; + } + +#if 0 + return bsquote ? 2 : 0; +#else + return (0); +#endif +} + +#undef INTERNAL_GLOB_PATTERN_P +#undef L +#undef INT +#undef CHAR +#undef GCHAR diff --git a/bash-5.1/lib/glob/gm_loop.c b/bash-5.1/lib/glob/gm_loop.c new file mode 100644 index 0000000000000000000000000000000000000000..ac516f82c785766eff1274b8b0c08851516bf0fc --- /dev/null +++ b/bash-5.1/lib/glob/gm_loop.c @@ -0,0 +1,208 @@ +/* Copyright (C) 1991-2017 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if EXTENDED_GLOB +int +EXTGLOB_PATTERN_P (pat) + const CHAR *pat; +{ + switch (pat[0]) + { + case L('*'): + case L('+'): + case L('!'): + case L('@'): + case L('?'): + return (pat[1] == L('(')); /* ) */ + default: + return 0; + } + + return 0; +} +#endif + +/* Return 1 of the first character of STRING could match the first + character of pattern PAT. Compiled to both single and wiide character + versions. FLAGS is a subset of strmatch flags; used to do case-insensitive + matching for now. */ +int +MATCH_PATTERN_CHAR (pat, string, flags) + CHAR *pat, *string; + int flags; +{ + CHAR c; + + if (*string == 0) + return (*pat == L('*')); /* XXX - allow only * to match empty string */ + + switch (c = *pat++) + { + default: + return (FOLD(*string) == FOLD(c)); + case L('\\'): + return (FOLD(*string) == FOLD(*pat)); + case L('?'): + return (*pat == L('(') ? 1 : (*string != L'\0')); + case L('*'): + return (1); + case L('+'): + case L('!'): + case L('@'): + return (*pat == L('(') ? 1 : (FOLD(*string) == FOLD(c))); + case L('['): + return (*string != L('\0')); + } +} + +int +MATCHLEN (pat, max) + CHAR *pat; + size_t max; +{ + CHAR c; + int matlen, bracklen, t, in_cclass, in_collsym, in_equiv; + + if (*pat == 0) + return (0); + + matlen = in_cclass = in_collsym = in_equiv = 0; + while (c = *pat++) + { + switch (c) + { + default: + matlen++; + break; + case L('\\'): + if (*pat == 0) + return ++matlen; + else + { + matlen++; + pat++; + } + break; + case L('?'): + if (*pat == LPAREN) + return (matlen = -1); /* XXX for now */ + else + matlen++; + break; + case L('*'): + return (matlen = -1); + case L('+'): + case L('!'): + case L('@'): + if (*pat == LPAREN) + return (matlen = -1); /* XXX for now */ + else + matlen++; + break; + case L('['): + /* scan for ending `]', skipping over embedded [:...:] */ + bracklen = 1; + c = *pat++; + do + { + if (c == 0) + { + pat--; /* back up to NUL */ + matlen += bracklen; + goto bad_bracket; + } + else if (c == L('\\')) + { + /* *pat == backslash-escaped character */ + bracklen++; + /* If the backslash or backslash-escape ends the string, + bail. The ++pat skips over the backslash escape */ + if (*pat == 0 || *++pat == 0) + { + matlen += bracklen; + goto bad_bracket; + } + } + else if (c == L('[') && *pat == L(':')) /* character class */ + { + pat++; + bracklen++; + in_cclass = 1; + } + else if (in_cclass && c == L(':') && *pat == L(']')) + { + pat++; + bracklen++; + in_cclass = 0; + } + else if (c == L('[') && *pat == L('.')) /* collating symbol */ + { + pat++; + bracklen++; + if (*pat == L(']')) /* right bracket can appear as collating symbol */ + { + pat++; + bracklen++; + } + in_collsym = 1; + } + else if (in_collsym && c == L('.') && *pat == L(']')) + { + pat++; + bracklen++; + in_collsym = 0; + } + else if (c == L('[') && *pat == L('=')) /* equivalence class */ + { + pat++; + bracklen++; + if (*pat == L(']')) /* right bracket can appear as equivalence class */ + { + pat++; + bracklen++; + } + in_equiv = 1; + } + else if (in_equiv && c == L('=') && *pat == L(']')) + { + pat++; + bracklen++; + in_equiv = 0; + } + else + bracklen++; + } + while ((c = *pat++) != L(']')); + matlen++; /* bracket expression can only match one char */ +bad_bracket: + break; + } + } + + return matlen; +} + +#undef EXTGLOB_PATTERN_P +#undef MATCH_PATTERN_CHAR +#undef MATCHLEN +#undef FOLD +#undef L +#undef LPAREN +#undef RPAREN +#undef INT +#undef CHAR diff --git a/bash-5.1/lib/glob/gmisc.c b/bash-5.1/lib/glob/gmisc.c new file mode 100644 index 0000000000000000000000000000000000000000..f3d74cea5bf6c8784322338aad8e45a1ebf332fc --- /dev/null +++ b/bash-5.1/lib/glob/gmisc.c @@ -0,0 +1,108 @@ +/* gmisc.c -- miscellaneous pattern matching utility functions for Bash. + + Copyright (C) 2010-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" +#include "shmbutil.h" +#include "chartypes.h" + +#include "stdc.h" + +#ifndef FNM_CASEFOLD +# include "strmatch.h" +#endif +#include "glob.h" + +/* Make sure these names continue to agree with what's in smatch.c */ +extern char *glob_patscan PARAMS((char *, char *, int)); + +/* Compile `gm_loop.c' for single-byte characters. */ +#define CHAR char +#define INT int +#define L(CS) CS +#define EXTGLOB_PATTERN_P extglob_pattern_p +#define MATCH_PATTERN_CHAR match_pattern_char +#define MATCHLEN umatchlen +#define FOLD(c) ((flags & FNM_CASEFOLD) \ + ? TOLOWER ((unsigned char)c) \ + : ((unsigned char)c)) +#ifndef LPAREN +#define LPAREN '(' +#define RPAREN ')' +#endif +#include "gm_loop.c" + +/* Compile `gm_loop.c' again for multibyte characters. */ +#if HANDLE_MULTIBYTE + +#define CHAR wchar_t +#define INT wint_t +#define L(CS) L##CS +#define EXTGLOB_PATTERN_P wextglob_pattern_p +#define MATCH_PATTERN_CHAR match_pattern_wchar +#define MATCHLEN wmatchlen + +#define FOLD(c) ((flags & FNM_CASEFOLD) && iswupper (c) ? towlower (c) : (c)) +#define LPAREN L'(' +#define RPAREN L')' +#include "gm_loop.c" + +#endif /* HANDLE_MULTIBYTE */ + + +#if defined (EXTENDED_GLOB) +/* Skip characters in PAT and return the final occurrence of DIRSEP. This + is only called when extended_glob is set, so we have to skip over extglob + patterns x(...) */ +char * +glob_dirscan (pat, dirsep) + char *pat; + int dirsep; +{ + char *p, *d, *pe, *se; + + d = pe = se = 0; + for (p = pat; p && *p; p++) + { + if (extglob_pattern_p (p)) + { + if (se == 0) + se = p + strlen (p) - 1; + pe = glob_patscan (p + 2, se, 0); + if (pe == 0) + continue; + else if (*pe == 0) + break; + p = pe - 1; /* will do increment above */ + continue; + } + if (*p == dirsep) + d = p; + } + return d; +} +#endif /* EXTENDED_GLOB */ diff --git a/bash-5.1/lib/glob/ndir.h b/bash-5.1/lib/glob/ndir.h new file mode 100644 index 0000000000000000000000000000000000000000..31261eb026ac7534227b3ffde42ff168ef7572f3 --- /dev/null +++ b/bash-5.1/lib/glob/ndir.h @@ -0,0 +1,50 @@ +/* -- definitions for 4.2BSD-compatible directory access. + last edit: 09-Jul-1983 D A Gwyn. */ + +#if defined (VMS) +# if !defined (FAB$C_BID) +# include +# endif +# if !defined (NAM$C_BID) +# include +# endif +# if !defined (RMS$_SUC) +# include +# endif +# include "dir.h" +#endif /* VMS */ + +/* Size of directory block. */ +#define DIRBLKSIZ 512 + +/* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ + +#if defined (VMS) +# define MAXNAMLEN (DIR$S_NAME + 7) /* 80 plus room for version #. */ +# define MAXFULLSPEC NAM$C_MAXRSS /* Maximum full spec */ +#else +# define MAXNAMLEN 15 /* Maximum filename length. */ +#endif /* VMS */ + +/* Data from readdir (). */ +struct direct { + long d_ino; /* Inode number of entry. */ + unsigned short d_reclen; /* Length of this record. */ + unsigned short d_namlen; /* Length of string in d_name. */ + char d_name[MAXNAMLEN + 1]; /* Name of file. */ +}; + +/* Stream data from opendir (). */ +typedef struct { + int dd_fd; /* File descriptor. */ + int dd_loc; /* Offset in block. */ + int dd_size; /* Amount of valid data. */ + char dd_buf[DIRBLKSIZ]; /* Directory block. */ +} DIR; + +extern DIR *opendir (); +extern struct direct *readdir (); +extern long telldir (); +extern void seekdir (), closedir (); + +#define rewinddir(dirp) seekdir (dirp, 0L) diff --git a/bash-5.1/lib/glob/sm_loop.c b/bash-5.1/lib/glob/sm_loop.c new file mode 100644 index 0000000000000000000000000000000000000000..a98c14bd578b6482875834f68c4dd13ca394e5a3 --- /dev/null +++ b/bash-5.1/lib/glob/sm_loop.c @@ -0,0 +1,942 @@ +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +struct STRUCT +{ + CHAR *pattern; + CHAR *string; +}; + +int FCT PARAMS((CHAR *, CHAR *, int)); + +static int GMATCH PARAMS((CHAR *, CHAR *, CHAR *, CHAR *, struct STRUCT *, int)); +static CHAR *PARSE_COLLSYM PARAMS((CHAR *, INT *)); +static CHAR *BRACKMATCH PARAMS((CHAR *, U_CHAR, int)); +static int EXTMATCH PARAMS((INT, CHAR *, CHAR *, CHAR *, CHAR *, int)); + +extern void DEQUOTE_PATHNAME PARAMS((CHAR *)); + +/*static*/ CHAR *PATSCAN PARAMS((CHAR *, CHAR *, INT)); + +int +FCT (pattern, string, flags) + CHAR *pattern; + CHAR *string; + int flags; +{ + CHAR *se, *pe; + + if (string == 0 || pattern == 0) + return FNM_NOMATCH; + + se = string + STRLEN ((XCHAR *)string); + pe = pattern + STRLEN ((XCHAR *)pattern); + + return (GMATCH (string, se, pattern, pe, (struct STRUCT *)NULL, flags)); +} + +/* Match STRING against the filename pattern PATTERN, returning zero if + it matches, FNM_NOMATCH if not. */ +static int +GMATCH (string, se, pattern, pe, ends, flags) + CHAR *string, *se; + CHAR *pattern, *pe; + struct STRUCT *ends; + int flags; +{ + CHAR *p, *n; /* pattern, string */ + INT c; /* current pattern character - XXX U_CHAR? */ + INT sc; /* current string character - XXX U_CHAR? */ + + p = pattern; + n = string; + + if (string == 0 || pattern == 0) + return FNM_NOMATCH; + +#if DEBUG_MATCHING +fprintf(stderr, "gmatch: string = %s; se = %s\n", string, se); +fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); +#endif + + while (p < pe) + { + c = *p++; + c = FOLD (c); + + sc = n < se ? *n : '\0'; + +#ifdef EXTENDED_GLOB + /* EXTMATCH () will handle recursively calling GMATCH, so we can + just return what EXTMATCH() returns. */ + if ((flags & FNM_EXTMATCH) && *p == L('(') && + (c == L('+') || c == L('*') || c == L('?') || c == L('@') || c == L('!'))) /* ) */ + { + int lflags; + /* If we're not matching the start of the string, we're not + concerned about the special cases for matching `.' */ + lflags = (n == string) ? flags : (flags & ~FNM_PERIOD); + return (EXTMATCH (c, n, se, p, pe, lflags)); + } +#endif /* EXTENDED_GLOB */ + + switch (c) + { + case L('?'): /* Match single character */ + if (sc == '\0') + return FNM_NOMATCH; + else if ((flags & FNM_PATHNAME) && sc == L('/')) + /* If we are matching a pathname, `?' can never match a `/'. */ + return FNM_NOMATCH; + else if ((flags & FNM_PERIOD) && sc == L('.') && + (n == string || ((flags & FNM_PATHNAME) && n[-1] == L('/')))) + /* `?' cannot match a `.' if it is the first character of the + string or if it is the first character following a slash and + we are matching a pathname. */ + return FNM_NOMATCH; + break; + + case L('\\'): /* backslash escape removes special meaning */ + if (p == pe && sc == '\\' && (n+1 == se)) + break; + + if (p == pe) + return FNM_NOMATCH; + + if ((flags & FNM_NOESCAPE) == 0) + { + c = *p++; + /* A trailing `\' cannot match. */ + if (p > pe) + return FNM_NOMATCH; + c = FOLD (c); + } + if (FOLD (sc) != (U_CHAR)c) + return FNM_NOMATCH; + break; + + case L('*'): /* Match zero or more characters */ + /* See below for the reason for using this. It avoids backtracking + back to a previous `*'. Picked up from glibc. */ + if (ends != NULL) + { + ends->pattern = p - 1; + ends->string = n; + return (0); + } + + if ((flags & FNM_PERIOD) && sc == L('.') && + (n == string || ((flags & FNM_PATHNAME) && n[-1] == L('/')))) + /* `*' cannot match a `.' if it is the first character of the + string or if it is the first character following a slash and + we are matching a pathname. */ + return FNM_NOMATCH; + + if (p == pe) + return 0; + + /* Collapse multiple consecutive `*' and `?', but make sure that + one character of the string is consumed for each `?'. */ + for (c = *p++; (c == L('?') || c == L('*')); c = *p++) + { + if ((flags & FNM_PATHNAME) && sc == L('/')) + /* A slash does not match a wildcard under FNM_PATHNAME. */ + return FNM_NOMATCH; +#ifdef EXTENDED_GLOB + else if ((flags & FNM_EXTMATCH) && c == L('?') && *p == L('(')) /* ) */ + { + CHAR *newn; + + /* We can match 0 or 1 times. If we match, return success */ + if (EXTMATCH (c, n, se, p, pe, flags) == 0) + return (0); + + /* We didn't match the extended glob pattern, but + that's OK, since we can match 0 or 1 occurrences. + We need to skip the glob pattern and see if we + match the rest of the string. */ + newn = PATSCAN (p + 1, pe, 0); + /* If NEWN is 0, we have an ill-formed pattern. */ + p = newn ? newn : pe; + } +#endif + else if (c == L('?')) + { + if (sc == L('\0')) + return FNM_NOMATCH; + /* One character of the string is consumed in matching + this ? wildcard, so *??? won't match if there are + fewer than three characters. */ + n++; + sc = n < se ? *n : '\0'; + } + +#ifdef EXTENDED_GLOB + /* Handle ******(patlist) */ + if ((flags & FNM_EXTMATCH) && c == L('*') && *p == L('(')) /*)*/ + { + CHAR *newn; + /* We need to check whether or not the extended glob + pattern matches the remainder of the string. + If it does, we match the entire pattern. */ + for (newn = n; newn < se; ++newn) + { + if (EXTMATCH (c, newn, se, p, pe, flags) == 0) + return (0); + } + /* We didn't match the extended glob pattern, but + that's OK, since we can match 0 or more occurrences. + We need to skip the glob pattern and see if we + match the rest of the string. */ + newn = PATSCAN (p + 1, pe, 0); + /* If NEWN is 0, we have an ill-formed pattern. */ + p = newn ? newn : pe; + } +#endif + if (p == pe) + break; + } + + /* The wildcards are the last element of the pattern. The name + cannot match completely if we are looking for a pathname and + it contains another slash, unless FNM_LEADING_DIR is set. */ + if (c == L('\0')) + { + int r = (flags & FNM_PATHNAME) == 0 ? 0 : FNM_NOMATCH; + if (flags & FNM_PATHNAME) + { + if (flags & FNM_LEADING_DIR) + r = 0; + else if (MEMCHR (n, L('/'), se - n) == NULL) + r = 0; + } + return r; + } + + /* If we've hit the end of the pattern and the last character of + the pattern was handled by the loop above, we've succeeded. + Otherwise, we need to match that last character. */ + if (p == pe && (c == L('?') || c == L('*'))) + return (0); + + /* If we've hit the end of the string and the rest of the pattern + is something that matches the empty string, we can succeed. */ +#if defined (EXTENDED_GLOB) + if (n == se && ((flags & FNM_EXTMATCH) && (c == L('!') || c == L('?')) && *p == L('('))) + { + --p; + if (EXTMATCH (c, n, se, p, pe, flags) == 0) + return (c == L('!') ? FNM_NOMATCH : 0); + return (c == L('!') ? 0 : FNM_NOMATCH); + } +#endif + + /* If we stop at a slash in the pattern and we are looking for a + pathname ([star]/foo), then consume enough of the string to stop + at any slash and then try to match the rest of the pattern. If + the string doesn't contain a slash, fail */ + if (c == L('/') && (flags & FNM_PATHNAME)) + { + while (n < se && *n != L('/')) + ++n; + if (n < se && *n == L('/') && (GMATCH (n+1, se, p, pe, NULL, flags) == 0)) + return 0; + return FNM_NOMATCH; /* XXX */ + } + + /* General case, use recursion. */ + { + U_CHAR c1; + const CHAR *endp; + struct STRUCT end; + + end.pattern = NULL; + endp = MEMCHR (n, (flags & FNM_PATHNAME) ? L('/') : L('\0'), se - n); + if (endp == 0) + endp = se; + + c1 = ((flags & FNM_NOESCAPE) == 0 && c == L('\\')) ? *p : c; + c1 = FOLD (c1); + for (--p; n < endp; ++n) + { + /* Only call strmatch if the first character indicates a + possible match. We can check the first character if + we're not doing an extended glob match. */ + if ((flags & FNM_EXTMATCH) == 0 && c != L('[') && FOLD (*n) != c1) /*]*/ + continue; + + /* If we're doing an extended glob match and the pattern is not + one of the extended glob patterns, we can check the first + character. */ + if ((flags & FNM_EXTMATCH) && p[1] != L('(') && /*)*/ + STRCHR (L("?*+@!"), *p) == 0 && c != L('[') && FOLD (*n) != c1) /*]*/ + continue; + + /* Otherwise, we just recurse. */ + if (GMATCH (n, se, p, pe, &end, flags & ~FNM_PERIOD) == 0) + { + if (end.pattern == NULL) + return (0); + break; + } + } + /* This is a clever idea from glibc, used to avoid backtracking + to a `*' that appears earlier in the pattern. We get away + without saving se and pe because they are always the same, + even in the recursive calls to gmatch */ + if (end.pattern != NULL) + { + p = end.pattern; + n = end.string; + continue; + } + + return FNM_NOMATCH; + } + + case L('['): + { + if (sc == L('\0') || n == se) + return FNM_NOMATCH; + + /* A character class cannot match a `.' if it is the first + character of the string or if it is the first character + following a slash and we are matching a pathname. */ + if ((flags & FNM_PERIOD) && sc == L('.') && + (n == string || ((flags & FNM_PATHNAME) && n[-1] == L('/')))) + return (FNM_NOMATCH); + + p = BRACKMATCH (p, sc, flags); + if (p == 0) + return FNM_NOMATCH; + } + break; + + default: + if ((U_CHAR)c != FOLD (sc)) + return (FNM_NOMATCH); + } + + ++n; + } + + if (n == se) + return (0); + + if ((flags & FNM_LEADING_DIR) && *n == L('/')) + /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ + return 0; + + return (FNM_NOMATCH); +} + +/* Parse a bracket expression collating symbol ([.sym.]) starting at P, find + the value of the symbol, and move P past the collating symbol expression. + The value is returned in *VP, if VP is not null. */ +static CHAR * +PARSE_COLLSYM (p, vp) + CHAR *p; + INT *vp; +{ + register int pc; + INT val; + + p++; /* move past the `.' */ + + for (pc = 0; p[pc]; pc++) + if (p[pc] == L('.') && p[pc+1] == L(']')) + break; + if (p[pc] == 0) + { + if (vp) + *vp = INVALID; + return (p + pc); + } + val = COLLSYM (p, pc); + if (vp) + *vp = val; + return (p + pc + 2); +} + +/* Use prototype definition here because of type promotion. */ +static CHAR * +#if defined (PROTOTYPES) +BRACKMATCH (CHAR *p, U_CHAR test, int flags) +#else +BRACKMATCH (p, test, flags) + CHAR *p; + U_CHAR test; + int flags; +#endif +{ + register CHAR cstart, cend, c; + register int not; /* Nonzero if the sense of the character class is inverted. */ + int brcnt, forcecoll, isrange; + INT pc; + CHAR *savep; + CHAR *brchrp; + U_CHAR orig_test; + + orig_test = test; + test = FOLD (orig_test); + + savep = p; + + /* POSIX.2 3.13.1 says that an exclamation mark (`!') shall replace the + circumflex (`^') in its role in a `nonmatching list'. A bracket + expression starting with an unquoted circumflex character produces + unspecified results. This implementation treats the two identically. */ + if (not = (*p == L('!') || *p == L('^'))) + ++p; + + c = *p++; + for (;;) + { + /* Initialize cstart and cend in case `-' is the last + character of the pattern. */ + cstart = cend = c; + forcecoll = 0; + + /* POSIX.2 equivalence class: [=c=]. See POSIX.2 2.8.3.2. Find + the end of the equivalence class, move the pattern pointer past + it, and check for equivalence. XXX - this handles only + single-character equivalence classes, which is wrong, or at + least incomplete. */ + if (c == L('[') && *p == L('=') && p[2] == L('=') && p[3] == L(']')) + { + pc = FOLD (p[1]); + p += 4; + if (COLLEQUIV (test, pc)) + { +/*[*/ /* Move past the closing `]', since the first thing we do at + the `matched:' label is back p up one. */ + p++; + goto matched; + } + else + { + c = *p++; + if (c == L('\0')) + return ((test == L('[')) ? savep : (CHAR *)0); /*]*/ + c = FOLD (c); + continue; + } + } + + /* POSIX.2 character class expression. See POSIX.2 2.8.3.2. */ + if (c == L('[') && *p == L(':')) + { + CHAR *close, *ccname; + + pc = 0; /* make sure invalid char classes don't match. */ + /* Find end of character class name */ + for (close = p + 1; *close != '\0'; close++) + if (*close == L(':') && *(close+1) == L(']')) + break; + + if (*close != L('\0')) + { + ccname = (CHAR *)malloc ((close - p) * sizeof (CHAR)); + if (ccname == 0) + pc = 0; + else + { + bcopy (p + 1, ccname, (close - p - 1) * sizeof (CHAR)); + *(ccname + (close - p - 1)) = L('\0'); + /* As a result of a POSIX discussion, char class names are + allowed to be quoted (?) */ + DEQUOTE_PATHNAME (ccname); + pc = IS_CCLASS (orig_test, (XCHAR *)ccname); + } + if (pc == -1) + { + /* CCNAME is not a valid character class in the current + locale. In addition to noting no match (pc = 0), we have + a choice about what to do with the invalid charclass. + Posix leaves the behavior unspecified, but we're going + to skip over the charclass and keep going instead of + testing ORIG_TEST against each character in the class + string. If we don't want to do that, take out the update + of P. */ + pc = 0; + p = close + 2; + } + else + p = close + 2; /* move past the closing `]' */ + + free (ccname); + } + + if (pc) + { +/*[*/ /* Move past the closing `]', since the first thing we do at + the `matched:' label is back p up one. */ + p++; + goto matched; + } + else + { + /* continue the loop here, since this expression can't be + the first part of a range expression. */ + c = *p++; + if (c == L('\0')) + return ((test == L('[')) ? savep : (CHAR *)0); + else if (c == L(']')) + break; + c = FOLD (c); + continue; + } + } + + /* POSIX.2 collating symbols. See POSIX.2 2.8.3.2. Find the end of + the symbol name, make sure it is terminated by `.]', translate + the name to a character using the external table, and do the + comparison. */ + if (c == L('[') && *p == L('.')) + { + p = PARSE_COLLSYM (p, &pc); + /* An invalid collating symbol cannot be the first point of a + range. If it is, we set cstart to one greater than `test', + so any comparisons later will fail. */ + cstart = (pc == INVALID) ? test + 1 : pc; + forcecoll = 1; + } + + if (!(flags & FNM_NOESCAPE) && c == L('\\')) + { + if (*p == '\0') + return (CHAR *)0; + cstart = cend = *p++; + } + + cstart = cend = FOLD (cstart); + isrange = 0; + + /* POSIX.2 2.8.3.1.2 says: `An expression containing a `[' that + is not preceded by a backslash and is not part of a bracket + expression produces undefined results.' This implementation + treats the `[' as just a character to be matched if there is + not a closing `]'. */ + if (c == L('\0')) + return ((test == L('[')) ? savep : (CHAR *)0); + + c = *p++; + c = FOLD (c); + + if (c == L('\0')) + return ((test == L('[')) ? savep : (CHAR *)0); + + if ((flags & FNM_PATHNAME) && c == L('/')) + /* [/] can never match when matching a pathname. */ + return (CHAR *)0; + + /* This introduces a range, unless the `-' is the last + character of the class. Find the end of the range + and move past it. */ + if (c == L('-') && *p != L(']')) + { + cend = *p++; + if (!(flags & FNM_NOESCAPE) && cend == L('\\')) + cend = *p++; + if (cend == L('\0')) + return (CHAR *)0; + if (cend == L('[') && *p == L('.')) + { + p = PARSE_COLLSYM (p, &pc); + /* An invalid collating symbol cannot be the second part of a + range expression. If we get one, we set cend to one fewer + than the test character to make sure the range test fails. */ + cend = (pc == INVALID) ? test - 1 : pc; + forcecoll = 1; + } + cend = FOLD (cend); + + c = *p++; + + /* POSIX.2 2.8.3.2: ``The ending range point shall collate + equal to or higher than the starting range point; otherwise + the expression shall be treated as invalid.'' Note that this + applies to only the range expression; the rest of the bracket + expression is still checked for matches. */ + if (RANGECMP (cstart, cend, forcecoll) > 0) + { + if (c == L(']')) + break; + c = FOLD (c); + continue; + } + isrange = 1; + } + + if (isrange == 0 && test == cstart) + goto matched; + if (isrange && RANGECMP (test, cstart, forcecoll) >= 0 && RANGECMP (test, cend, forcecoll) <= 0) + goto matched; + + if (c == L(']')) + break; + } + /* No match. */ + return (!not ? (CHAR *)0 : p); + +matched: + /* Skip the rest of the [...] that already matched. */ + c = *--p; + brcnt = 1; + brchrp = 0; + while (brcnt > 0) + { + int oc; + + /* A `[' without a matching `]' is just another character to match. */ + if (c == L('\0')) + return ((test == L('[')) ? savep : (CHAR *)0); + + oc = c; + c = *p++; + if (c == L('[') && (*p == L('=') || *p == L(':') || *p == L('.'))) + { + brcnt++; + brchrp = p++; /* skip over the char after the left bracket */ + if ((c = *p) == L('\0')) + return ((test == L('[')) ? savep : (CHAR *)0); + /* If *brchrp == ':' we should check that the rest of the characters + form a valid character class name. We don't do that yet, but we + keep BRCHRP in case we want to. */ + } + /* We only want to check brchrp if we set it above. */ + else if (c == L(']') && brcnt > 1 && brchrp != 0 && oc == *brchrp) + { + brcnt--; + brchrp = 0; /* just in case */ + } + /* Left bracket loses its special meaning inside a bracket expression. + It is only valid when followed by a `.', `=', or `:', which we check + for above. Technically the right bracket can appear in a collating + symbol, so we check for that here. Otherwise, it terminates the + bracket expression. */ + else if (c == L(']') && (brchrp == 0 || *brchrp != L('.')) && brcnt >= 1) + brcnt = 0; + else if (!(flags & FNM_NOESCAPE) && c == L('\\')) + { + if (*p == '\0') + return (CHAR *)0; + /* XXX 1003.2d11 is unclear if this is right. */ + ++p; + } + } + return (not ? (CHAR *)0 : p); +} + +#if defined (EXTENDED_GLOB) +/* ksh-like extended pattern matching: + + [?*+@!](pat-list) + + where pat-list is a list of one or patterns separated by `|'. Operation + is as follows: + + ?(patlist) match zero or one of the given patterns + *(patlist) match zero or more of the given patterns + +(patlist) match one or more of the given patterns + @(patlist) match exactly one of the given patterns + !(patlist) match anything except one of the given patterns +*/ + +/* Scan a pattern starting at STRING and ending at END, keeping track of + embedded () and []. If DELIM is 0, we scan until a matching `)' + because we're scanning a `patlist'. Otherwise, we scan until we see + DELIM. In all cases, we never scan past END. The return value is the + first character after the matching DELIM or NULL if the pattern is + empty or invalid. */ +/*static*/ CHAR * +PATSCAN (string, end, delim) + CHAR *string, *end; + INT delim; +{ + int pnest, bnest, skip; + INT cchar; + CHAR *s, c, *bfirst; + + pnest = bnest = skip = 0; + cchar = 0; + bfirst = NULL; + + if (string == end) + return (NULL); + + for (s = string; c = *s; s++) + { + if (s >= end) + return (s); + if (skip) + { + skip = 0; + continue; + } + switch (c) + { + case L('\\'): + skip = 1; + break; + + case L('\0'): + return ((CHAR *)NULL); + + /* `[' is not special inside a bracket expression, but it may + introduce one of the special POSIX bracket expressions + ([.SYM.], [=c=], [: ... :]) that needs special handling. */ + case L('['): + if (bnest == 0) + { + bfirst = s + 1; + if (*bfirst == L('!') || *bfirst == L('^')) + bfirst++; + bnest++; + } + else if (s[1] == L(':') || s[1] == L('.') || s[1] == L('=')) + cchar = s[1]; + break; + + /* `]' is not special if it's the first char (after a leading `!' + or `^') in a bracket expression or if it's part of one of the + special POSIX bracket expressions ([.SYM.], [=c=], [: ... :]) */ + case L(']'): + if (bnest) + { + if (cchar && s[-1] == cchar) + cchar = 0; + else if (s != bfirst) + { + bnest--; + bfirst = 0; + } + } + break; + + case L('('): + if (bnest == 0) + pnest++; + break; + + case L(')'): + if (bnest == 0 && pnest-- <= 0) + return ++s; + break; + + case L('|'): + if (bnest == 0 && pnest == 0 && delim == L('|')) + return ++s; + break; + } + } + + return (NULL); +} + +/* Return 0 if dequoted pattern matches S in the current locale. */ +static int +STRCOMPARE (p, pe, s, se) + CHAR *p, *pe, *s, *se; +{ + int ret; + CHAR c1, c2; + int l1, l2; + + l1 = pe - p; + l2 = se - s; + + if (l1 != l2) + return (FNM_NOMATCH); /* unequal lengths, can't be identical */ + + c1 = *pe; + c2 = *se; + + if (c1 != 0) + *pe = '\0'; + if (c2 != 0) + *se = '\0'; + +#if HAVE_MULTIBYTE || defined (HAVE_STRCOLL) + ret = STRCOLL ((XCHAR *)p, (XCHAR *)s); +#else + ret = STRCMP ((XCHAR *)p, (XCHAR *)s); +#endif + + if (c1 != 0) + *pe = c1; + if (c2 != 0) + *se = c2; + + return (ret == 0 ? ret : FNM_NOMATCH); +} + +/* Match a ksh extended pattern specifier. Return FNM_NOMATCH on failure or + 0 on success. This is handed the entire rest of the pattern and string + the first time an extended pattern specifier is encountered, so it calls + gmatch recursively. */ +static int +EXTMATCH (xc, s, se, p, pe, flags) + INT xc; /* select which operation */ + CHAR *s, *se; + CHAR *p, *pe; + int flags; +{ + CHAR *prest; /* pointer to rest of pattern */ + CHAR *psub; /* pointer to sub-pattern */ + CHAR *pnext; /* pointer to next sub-pattern */ + CHAR *srest; /* pointer to rest of string */ + int m1, m2, xflags; /* xflags = flags passed to recursive matches */ + +#if DEBUG_MATCHING +fprintf(stderr, "extmatch: xc = %c\n", xc); +fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se); +fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); +fprintf(stderr, "extmatch: flags = %d\n", flags); +#endif + + prest = PATSCAN (p + (*p == L('(')), pe, 0); /* ) */ + if (prest == 0) + /* If PREST is 0, we failed to scan a valid pattern. In this + case, we just want to compare the two as strings. */ + return (STRCOMPARE (p - 1, pe, s, se)); + + switch (xc) + { + case L('+'): /* match one or more occurrences */ + case L('*'): /* match zero or more occurrences */ + /* If we can get away with no matches, don't even bother. Just + call GMATCH on the rest of the pattern and return success if + it succeeds. */ + if (xc == L('*') && (GMATCH (s, se, prest, pe, NULL, flags) == 0)) + return 0; + + /* OK, we have to do this the hard way. First, we make sure one of + the subpatterns matches, then we try to match the rest of the + string. */ + for (psub = p + 1; ; psub = pnext) + { + pnext = PATSCAN (psub, pe, L('|')); + for (srest = s; srest <= se; srest++) + { + /* Match this substring (S -> SREST) against this + subpattern (psub -> pnext - 1) */ + m1 = GMATCH (s, srest, psub, pnext - 1, NULL, flags) == 0; + /* OK, we matched a subpattern, so make sure the rest of the + string matches the rest of the pattern. Also handle + multiple matches of the pattern. */ + if (m1) + { + /* if srest > s, we are not at start of string */ + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; + m2 = (GMATCH (srest, se, prest, pe, NULL, xflags) == 0) || + (s != srest && GMATCH (srest, se, p - 1, pe, NULL, xflags) == 0); + } + if (m1 && m2) + return (0); + } + if (pnext == prest) + break; + } + return (FNM_NOMATCH); + + case L('?'): /* match zero or one of the patterns */ + case L('@'): /* match one (or more) of the patterns */ + /* If we can get away with no matches, don't even bother. Just + call gmatch on the rest of the pattern and return success if + it succeeds. */ + if (xc == L('?') && (GMATCH (s, se, prest, pe, NULL, flags) == 0)) + return 0; + + /* OK, we have to do this the hard way. First, we see if one of + the subpatterns matches, then, if it does, we try to match the + rest of the string. */ + for (psub = p + 1; ; psub = pnext) + { + pnext = PATSCAN (psub, pe, L('|')); + srest = (prest == pe) ? se : s; + for ( ; srest <= se; srest++) + { + /* if srest > s, we are not at start of string */ + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; + if (GMATCH (s, srest, psub, pnext - 1, NULL, flags) == 0 && + GMATCH (srest, se, prest, pe, NULL, xflags) == 0) + return (0); + } + if (pnext == prest) + break; + } + return (FNM_NOMATCH); + + case '!': /* match anything *except* one of the patterns */ + for (srest = s; srest <= se; srest++) + { + m1 = 0; + for (psub = p + 1; ; psub = pnext) + { + pnext = PATSCAN (psub, pe, L('|')); + /* If one of the patterns matches, just bail immediately. */ + if (m1 = (GMATCH (s, srest, psub, pnext - 1, NULL, flags) == 0)) + break; + if (pnext == prest) + break; + } + + /* If nothing matched, but the string starts with a period and we + need to match periods explicitly, don't return this as a match, + even for negation. Might need to do this only if srest == s. */ + if (m1 == 0 && *s == '.' && (flags & FNM_PERIOD)) + return (FNM_NOMATCH); + + /* if srest > s, we are not at start of string */ + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; + if (m1 == 0 && GMATCH (srest, se, prest, pe, NULL, xflags) == 0) + return (0); + } + return (FNM_NOMATCH); + } + + return (FNM_NOMATCH); +} +#endif /* EXTENDED_GLOB */ + +#undef IS_CCLASS +#undef FOLD +#undef CHAR +#undef U_CHAR +#undef XCHAR +#undef INT +#undef INVALID +#undef FCT +#undef GMATCH +#undef COLLSYM +#undef PARSE_COLLSYM +#undef PATSCAN +#undef STRCOMPARE +#undef EXTMATCH +#undef DEQUOTE_PATHNAME +#undef STRUCT +#undef BRACKMATCH +#undef STRCHR +#undef STRCOLL +#undef STRLEN +#undef STRCMP +#undef MEMCHR +#undef COLLEQUIV +#undef RANGECMP +#undef L diff --git a/bash-5.1/lib/glob/smatch.c b/bash-5.1/lib/glob/smatch.c new file mode 100644 index 0000000000000000000000000000000000000000..a58456d7e613bc56858af3e649172d1a22ac3da9 --- /dev/null +++ b/bash-5.1/lib/glob/smatch.c @@ -0,0 +1,617 @@ +/* strmatch.c -- ksh-like extended pattern matching for the shell and filename + globbing. */ + +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include /* for debugging */ + +#include "strmatch.h" +#include + +#include "bashansi.h" +#include "shmbutil.h" +#include "xmalloc.h" + +#include + +#if !defined (errno) +extern int errno; +#endif + +#if FNMATCH_EQUIV_FALLBACK +/* We don't include in order to avoid namespace collisions; the + internal strmatch still uses the FNM_ constants. */ +extern int fnmatch (const char *, const char *, int); +#endif + +/* First, compile `sm_loop.c' for single-byte characters. */ +#define CHAR unsigned char +#define U_CHAR unsigned char +#define XCHAR char +#define INT int +#define L(CS) CS +#define INVALID -1 + +#undef STREQ +#undef STREQN +#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0) +#define STREQN(a, b, n) ((a)[0] == (b)[0] && strncmp(a, b, n) == 0) + +#ifndef GLOBASCII_DEFAULT +# define GLOBASCII_DEFAULT 0 +#endif + +int glob_asciirange = GLOBASCII_DEFAULT; + +#if FNMATCH_EQUIV_FALLBACK +/* Construct a string w1 = "c1" and a pattern w2 = "[[=c2=]]" and pass them + to fnmatch to see if wide characters c1 and c2 collate as members of the + same equivalence class. We can't really do this portably any other way */ +static int +_fnmatch_fallback (s, p) + int s, p; /* string char, patchar */ +{ + char s1[2]; /* string */ + char s2[8]; /* constructed pattern */ + + s1[0] = (unsigned char)s; + s1[1] = '\0'; + + /* reconstruct the pattern */ + s2[0] = s2[1] = '['; + s2[2] = '='; + s2[3] = (unsigned char)p; + s2[4] = '='; + s2[5] = s2[6] = ']'; + s2[7] = '\0'; + + return (fnmatch ((const char *)s2, (const char *)s1, 0)); +} +#endif + +/* We use strcoll(3) for range comparisons in bracket expressions, + even though it can have unwanted side effects in locales + other than POSIX or US. For instance, in the de locale, [A-Z] matches + all characters. If GLOB_ASCIIRANGE is non-zero, and we're not forcing + the use of strcoll (e.g., for explicit collating symbols), we use + straight ordering as if in the C locale. */ + +#if defined (HAVE_STRCOLL) +/* Helper functions for collating symbol equivalence. */ + +/* Return 0 if C1 == C2 or collates equally if FORCECOLL is non-zero. */ +static int +charcmp (c1, c2, forcecoll) + int c1, c2; + int forcecoll; +{ + static char s1[2] = { ' ', '\0' }; + static char s2[2] = { ' ', '\0' }; + int ret; + + /* Eight bits only. Period. */ + c1 &= 0xFF; + c2 &= 0xFF; + + if (c1 == c2) + return (0); + + if (forcecoll == 0 && glob_asciirange) + return (c1 - c2); + + s1[0] = c1; + s2[0] = c2; + + return (strcoll (s1, s2)); +} + +static int +rangecmp (c1, c2, forcecoll) + int c1, c2; + int forcecoll; +{ + int r; + + r = charcmp (c1, c2, forcecoll); + + /* We impose a total ordering here by returning c1-c2 if charcmp returns 0 */ + if (r != 0) + return r; + return (c1 - c2); /* impose total ordering */ +} +#else /* !HAVE_STRCOLL */ +# define rangecmp(c1, c2, f) ((int)(c1) - (int)(c2)) +#endif /* !HAVE_STRCOLL */ + +#if defined (HAVE_STRCOLL) +/* Returns 1 if chars C and EQUIV collate equally in the current locale. */ +static int +collequiv (c, equiv) + int c, equiv; +{ + if (charcmp (c, equiv, 1) == 0) + return 1; + +#if FNMATCH_EQUIV_FALLBACK + return (_fnmatch_fallback (c, equiv) == 0); +#else + return 0; +#endif + +} +#else +# define collequiv(c, equiv) ((c) == (equiv)) +#endif + +#define _COLLSYM _collsym +#define __COLLSYM __collsym +#define POSIXCOLL posix_collsyms +#include "collsyms.h" + +static int +collsym (s, len) + CHAR *s; + int len; +{ + register struct _collsym *csp; + char *x; + + x = (char *)s; + for (csp = posix_collsyms; csp->name; csp++) + { + if (STREQN(csp->name, x, len) && csp->name[len] == '\0') + return (csp->code); + } + if (len == 1) + return s[0]; + return INVALID; +} + +/* unibyte character classification */ +#if !defined (isascii) && !defined (HAVE_ISASCII) +# define isascii(c) ((unsigned int)(c) <= 0177) +#endif + +enum char_class + { + CC_NO_CLASS = 0, + CC_ASCII, CC_ALNUM, CC_ALPHA, CC_BLANK, CC_CNTRL, CC_DIGIT, CC_GRAPH, + CC_LOWER, CC_PRINT, CC_PUNCT, CC_SPACE, CC_UPPER, CC_WORD, CC_XDIGIT + }; + +static char const *const cclass_name[] = + { + "", + "ascii", "alnum", "alpha", "blank", "cntrl", "digit", "graph", + "lower", "print", "punct", "space", "upper", "word", "xdigit" + }; + +#define N_CHAR_CLASS (sizeof(cclass_name) / sizeof (cclass_name[0])) + +static enum char_class +is_valid_cclass (name) + const char *name; +{ + enum char_class ret; + int i; + + ret = CC_NO_CLASS; + + for (i = 1; i < N_CHAR_CLASS; i++) + { + if (STREQ (name, cclass_name[i])) + { + ret = (enum char_class)i; + break; + } + } + + return ret; +} + +static int +cclass_test (c, char_class) + int c; + enum char_class char_class; +{ + int result; + + switch (char_class) + { + case CC_ASCII: + result = isascii (c); + break; + case CC_ALNUM: + result = ISALNUM (c); + break; + case CC_ALPHA: + result = ISALPHA (c); + break; + case CC_BLANK: + result = ISBLANK (c); + break; + case CC_CNTRL: + result = ISCNTRL (c); + break; + case CC_DIGIT: + result = ISDIGIT (c); + break; + case CC_GRAPH: + result = ISGRAPH (c); + break; + case CC_LOWER: + result = ISLOWER (c); + break; + case CC_PRINT: + result = ISPRINT (c); + break; + case CC_PUNCT: + result = ISPUNCT (c); + break; + case CC_SPACE: + result = ISSPACE (c); + break; + case CC_UPPER: + result = ISUPPER (c); + break; + case CC_WORD: + result = (ISALNUM (c) || c == '_'); + break; + case CC_XDIGIT: + result = ISXDIGIT (c); + break; + default: + result = -1; + break; + } + + return result; +} + +static int +is_cclass (c, name) + int c; + const char *name; +{ + enum char_class char_class; + int result; + + char_class = is_valid_cclass (name); + if (char_class == CC_NO_CLASS) + return -1; + + result = cclass_test (c, char_class); + return (result); +} + +/* Now include `sm_loop.c' for single-byte characters. */ +/* The result of FOLD is an `unsigned char' */ +# define FOLD(c) ((flags & FNM_CASEFOLD) \ + ? TOLOWER ((unsigned char)c) \ + : ((unsigned char)c)) + +#define FCT internal_strmatch +#define GMATCH gmatch +#define COLLSYM collsym +#define PARSE_COLLSYM parse_collsym +#define BRACKMATCH brackmatch +#define PATSCAN glob_patscan +#define STRCOMPARE strcompare +#define EXTMATCH extmatch +#define DEQUOTE_PATHNAME udequote_pathname +#define STRUCT smat_struct +#define STRCHR(S, C) strchr((S), (C)) +#define MEMCHR(S, C, N) memchr((S), (C), (N)) +#define STRCOLL(S1, S2) strcoll((S1), (S2)) +#define STRLEN(S) strlen(S) +#define STRCMP(S1, S2) strcmp((S1), (S2)) +#define RANGECMP(C1, C2, F) rangecmp((C1), (C2), (F)) +#define COLLEQUIV(C1, C2) collequiv((C1), (C2)) +#define CTYPE_T enum char_class +#define IS_CCLASS(C, S) is_cclass((C), (S)) +#include "sm_loop.c" + +#if HANDLE_MULTIBYTE + +# define CHAR wchar_t +# define U_CHAR wint_t +# define XCHAR wchar_t +# define INT wint_t +# define L(CS) L##CS +# define INVALID WEOF + +# undef STREQ +# undef STREQN +# define STREQ(s1, s2) ((wcscmp (s1, s2) == 0)) +# define STREQN(a, b, n) ((a)[0] == (b)[0] && wcsncmp(a, b, n) == 0) + +extern char *mbsmbchar PARAMS((const char *)); + +#if FNMATCH_EQUIV_FALLBACK +/* Construct a string w1 = "c1" and a pattern w2 = "[[=c2=]]" and pass them + to fnmatch to see if wide characters c1 and c2 collate as members of the + same equivalence class. We can't really do this portably any other way */ +static int +_fnmatch_fallback_wc (c1, c2) + wchar_t c1, c2; /* string char, patchar */ +{ + char w1[MB_LEN_MAX+1]; /* string */ + char w2[MB_LEN_MAX+8]; /* constructed pattern */ + int l1, l2; + + l1 = wctomb (w1, c1); + if (l1 == -1) + return (2); + w1[l1] = '\0'; + + /* reconstruct the pattern */ + w2[0] = w2[1] = '['; + w2[2] = '='; + l2 = wctomb (w2+3, c2); + if (l2 == -1) + return (2); + w2[l2+3] = '='; + w2[l2+4] = w2[l2+5] = ']'; + w2[l2+6] = '\0'; + + return (fnmatch ((const char *)w2, (const char *)w1, 0)); +} +#endif + +static int +charcmp_wc (c1, c2, forcecoll) + wint_t c1, c2; + int forcecoll; +{ + static wchar_t s1[2] = { L' ', L'\0' }; + static wchar_t s2[2] = { L' ', L'\0' }; + int r; + + if (c1 == c2) + return 0; + + if (forcecoll == 0 && glob_asciirange && c1 <= UCHAR_MAX && c2 <= UCHAR_MAX) + return ((int)(c1 - c2)); + + s1[0] = c1; + s2[0] = c2; + + return (wcscoll (s1, s2)); +} + +static int +rangecmp_wc (c1, c2, forcecoll) + wint_t c1, c2; + int forcecoll; +{ + int r; + + r = charcmp_wc (c1, c2, forcecoll); + + /* We impose a total ordering here by returning c1-c2 if charcmp returns 0, + as we do above in the single-byte case. */ + if (r != 0 || forcecoll) + return r; + return ((int)(c1 - c2)); /* impose total ordering */ +} + +/* Returns 1 if wide chars C and EQUIV collate equally in the current locale. */ +static int +collequiv_wc (c, equiv) + wint_t c, equiv; +{ + wchar_t s, p; + + if (charcmp_wc (c, equiv, 1) == 0) + return 1; + +#if FNMATCH_EQUIV_FALLBACK +/* We check explicitly for success (fnmatch returns 0) to avoid problems if + our local definition of FNM_NOMATCH (strmatch.h) doesn't match the + system's (fnmatch.h). We don't care about error return values here. */ + + s = c; + p = equiv; + return (_fnmatch_fallback_wc (s, p) == 0); +#else + return 0; +#endif +} + +/* Helper function for collating symbol. */ +# define _COLLSYM _collwcsym +# define __COLLSYM __collwcsym +# define POSIXCOLL posix_collwcsyms +# include "collsyms.h" + +static wint_t +collwcsym (s, len) + wchar_t *s; + int len; +{ + register struct _collwcsym *csp; + + for (csp = posix_collwcsyms; csp->name; csp++) + { + if (STREQN(csp->name, s, len) && csp->name[len] == L'\0') + return (csp->code); + } + if (len == 1) + return s[0]; + return INVALID; +} + +static int +is_wcclass (wc, name) + wint_t wc; + wchar_t *name; +{ + char *mbs; + mbstate_t state; + size_t mbslength; + wctype_t desc; + int want_word; + + if ((wctype ("ascii") == (wctype_t)0) && (wcscmp (name, L"ascii") == 0)) + { + int c; + + if ((c = wctob (wc)) == EOF) + return 0; + else + return (c <= 0x7F); + } + + want_word = (wcscmp (name, L"word") == 0); + if (want_word) + name = L"alnum"; + + memset (&state, '\0', sizeof (mbstate_t)); + mbs = (char *) malloc (wcslen(name) * MB_CUR_MAX + 1); + if (mbs == 0) + return -1; + mbslength = wcsrtombs (mbs, (const wchar_t **)&name, (wcslen(name) * MB_CUR_MAX + 1), &state); + + if (mbslength == (size_t)-1 || mbslength == (size_t)-2) + { + free (mbs); + return -1; + } + desc = wctype (mbs); + free (mbs); + + if (desc == (wctype_t)0) + return -1; + + if (want_word) + return (iswctype (wc, desc) || wc == L'_'); + else + return (iswctype (wc, desc)); +} + +/* Return 1 if there are no char class [:class:] expressions (degenerate case) + or only posix-specified (C locale supported) char class expressions in + PATTERN. These are the ones where it's safe to punt to the single-byte + code, since wide character support allows locale-defined char classes. + This only uses single-byte code, but is only needed to support multibyte + locales. */ +static int +posix_cclass_only (pattern) + char *pattern; +{ + char *p, *p1; + char cc[16]; /* sufficient for all valid posix char class names */ + enum char_class valid; + + p = pattern; + while (p = strchr (p, '[')) + { + if (p[1] != ':') + { + p++; + continue; + } + p += 2; /* skip past "[:" */ + /* Find end of char class expression */ + for (p1 = p; *p1; p1++) + if (*p1 == ':' && p1[1] == ']') + break; + if (*p1 == 0) /* no char class expression found */ + break; + /* Find char class name and validate it against posix char classes */ + if ((p1 - p) >= sizeof (cc)) + return 0; + bcopy (p, cc, p1 - p); + cc[p1 - p] = '\0'; + valid = is_valid_cclass (cc); + if (valid == CC_NO_CLASS) + return 0; /* found unrecognized char class name */ + + p = p1 + 2; /* found posix char class name */ + } + + return 1; /* no char class names or only posix */ +} + +/* Now include `sm_loop.c' for multibyte characters. */ +#define FOLD(c) ((flags & FNM_CASEFOLD) && iswupper (c) ? towlower (c) : (c)) +#define FCT internal_wstrmatch +#define GMATCH gmatch_wc +#define COLLSYM collwcsym +#define PARSE_COLLSYM parse_collwcsym +#define BRACKMATCH brackmatch_wc +#define PATSCAN glob_patscan_wc +#define STRCOMPARE wscompare +#define EXTMATCH extmatch_wc +#define DEQUOTE_PATHNAME wcdequote_pathname +#define STRUCT wcsmat_struct +#define STRCHR(S, C) wcschr((S), (C)) +#define MEMCHR(S, C, N) wmemchr((S), (C), (N)) +#define STRCOLL(S1, S2) wcscoll((S1), (S2)) +#define STRLEN(S) wcslen(S) +#define STRCMP(S1, S2) wcscmp((S1), (S2)) +#define RANGECMP(C1, C2, F) rangecmp_wc((C1), (C2), (F)) +#define COLLEQUIV(C1, C2) collequiv_wc((C1), (C2)) +#define CTYPE_T enum char_class +#define IS_CCLASS(C, S) is_wcclass((C), (S)) +#include "sm_loop.c" + +#endif /* HAVE_MULTIBYTE */ + +int +xstrmatch (pattern, string, flags) + char *pattern; + char *string; + int flags; +{ +#if HANDLE_MULTIBYTE + int ret; + size_t n; + wchar_t *wpattern, *wstring; + size_t plen, slen, mplen, mslen; + + if (MB_CUR_MAX == 1) + return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); + + if (mbsmbchar (string) == 0 && mbsmbchar (pattern) == 0 && posix_cclass_only (pattern)) + return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); + + n = xdupmbstowcs (&wpattern, NULL, pattern); + if (n == (size_t)-1 || n == (size_t)-2) + return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); + + n = xdupmbstowcs (&wstring, NULL, string); + if (n == (size_t)-1 || n == (size_t)-2) + { + free (wpattern); + return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); + } + + ret = internal_wstrmatch (wpattern, wstring, flags); + + free (wpattern); + free (wstring); + + return ret; +#else + return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); +#endif /* !HANDLE_MULTIBYTE */ +} diff --git a/bash-5.1/lib/glob/strmatch.c b/bash-5.1/lib/glob/strmatch.c new file mode 100644 index 0000000000000000000000000000000000000000..5b7b49fb26a331dfa735ef09ef5e2b3ff2babd7f --- /dev/null +++ b/bash-5.1/lib/glob/strmatch.c @@ -0,0 +1,79 @@ +/* strmatch.c -- ksh-like extended pattern matching for the shell and filename + globbing. */ + +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include "stdc.h" +#include "strmatch.h" + +extern int xstrmatch PARAMS((char *, char *, int)); +#if defined (HANDLE_MULTIBYTE) +extern int internal_wstrmatch PARAMS((wchar_t *, wchar_t *, int)); +#endif + +int +strmatch (pattern, string, flags) + char *pattern; + char *string; + int flags; +{ + if (string == 0 || pattern == 0) + return FNM_NOMATCH; + + return (xstrmatch (pattern, string, flags)); +} + +#if defined (HANDLE_MULTIBYTE) +int +wcsmatch (wpattern, wstring, flags) + wchar_t *wpattern; + wchar_t *wstring; + int flags; +{ + if (wstring == 0 || wpattern == 0) + return (FNM_NOMATCH); + + return (internal_wstrmatch (wpattern, wstring, flags)); +} +#endif + +#ifdef TEST +main (c, v) + int c; + char **v; +{ + char *string, *pat; + + string = v[1]; + pat = v[2]; + + if (strmatch (pat, string, 0) == 0) + { + printf ("%s matches %s\n", string, pat); + exit (0); + } + else + { + printf ("%s does not match %s\n", string, pat); + exit (1); + } +} +#endif diff --git a/bash-5.1/lib/glob/strmatch.h b/bash-5.1/lib/glob/strmatch.h new file mode 100644 index 0000000000000000000000000000000000000000..fa7be7bb2f76974b7846ceb7cc6da4e9eb0abf55 --- /dev/null +++ b/bash-5.1/lib/glob/strmatch.h @@ -0,0 +1,64 @@ +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _STRMATCH_H +#define _STRMATCH_H 1 + +#include + +#include "stdc.h" + +/* We #undef these before defining them because some losing systems + (HP-UX A.08.07 for example) define these in . */ +#undef FNM_PATHNAME +#undef FNM_NOESCAPE +#undef FNM_PERIOD + +/* Bits set in the FLAGS argument to `strmatch'. */ + +/* standard flags are like fnmatch(3). */ +#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ +#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ +#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ + +/* extended flags not available in most libc fnmatch versions, but we undef + them to avoid any possible warnings. */ +#undef FNM_LEADING_DIR +#undef FNM_CASEFOLD +#undef FNM_EXTMATCH + +#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ +#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ +#define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */ + +#define FNM_FIRSTCHAR (1 << 6) /* Match only the first character */ + +/* Value returned by `strmatch' if STRING does not match PATTERN. */ +#undef FNM_NOMATCH + +#define FNM_NOMATCH 1 + +/* Match STRING against the filename pattern PATTERN, + returning zero if it matches, FNM_NOMATCH if not. */ +extern int strmatch PARAMS((char *, char *, int)); + +#if HANDLE_MULTIBYTE +extern int wcsmatch PARAMS((wchar_t *, wchar_t *, int)); +#endif + +#endif /* _STRMATCH_H */ diff --git a/bash-5.1/lib/glob/xmbsrtowcs.c b/bash-5.1/lib/glob/xmbsrtowcs.c new file mode 100644 index 0000000000000000000000000000000000000000..17250c303b9c14e9e8979197e1d1bbfcef7b20af --- /dev/null +++ b/bash-5.1/lib/glob/xmbsrtowcs.c @@ -0,0 +1,523 @@ +/* xmbsrtowcs.c -- replacement function for mbsrtowcs */ + +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Ask for GNU extensions to get extern declaration for mbsnrtowcs if + available via glibc. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#include + +#include + +/* , and are included in "shmbutil.h". + If , , mbsrtowcs(), exist, HANDLE_MULTIBYTE + is defined as 1. */ +#include + +#if HANDLE_MULTIBYTE + +#include +#if !defined (errno) +extern int errno; +#endif + +#define WSBUF_INC 32 + +#ifndef FREE +# define FREE(x) do { if (x) free (x); } while (0) +#endif + +#if ! HAVE_STRCHRNUL +extern char *strchrnul PARAMS((const char *, int)); +#endif + +/* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>. + So, this function is made for converting 0x5c to U<0x5c>. */ + +static mbstate_t local_state; +static int local_state_use = 0; + +size_t +xmbsrtowcs (dest, src, len, pstate) + wchar_t *dest; + const char **src; + size_t len; + mbstate_t *pstate; +{ + mbstate_t *ps; + size_t mblength, wclength, n; + + ps = pstate; + if (pstate == NULL) + { + if (!local_state_use) + { + memset (&local_state, '\0', sizeof(mbstate_t)); + local_state_use = 1; + } + ps = &local_state; + } + + n = strlen (*src); + + if (dest == NULL) + { + wchar_t *wsbuf; + const char *mbs; + mbstate_t psbuf; + + /* It doesn't matter if malloc fails here, since mbsrtowcs should do + the right thing with a NULL first argument. */ + wsbuf = (wchar_t *) malloc ((n + 1) * sizeof(wchar_t)); + mbs = *src; + psbuf = *ps; + + wclength = mbsrtowcs (wsbuf, &mbs, n, &psbuf); + + if (wsbuf) + free (wsbuf); + return wclength; + } + + for (wclength = 0; wclength < len; wclength++, dest++) + { + if (mbsinit(ps)) + { + if (**src == '\0') + { + *dest = L'\0'; + *src = NULL; + return (wclength); + } + else if (**src == '\\') + { + *dest = L'\\'; + mblength = 1; + } + else + mblength = mbrtowc(dest, *src, n, ps); + } + else + mblength = mbrtowc(dest, *src, n, ps); + + /* Cannot convert multibyte character to wide character. */ + if (mblength == (size_t)-1 || mblength == (size_t)-2) + return (size_t)-1; + + *src += mblength; + n -= mblength; + + /* The multibyte string has been completely converted, + including the terminating '\0'. */ + if (*dest == L'\0') + { + *src = NULL; + break; + } + } + + return (wclength); +} + +#if HAVE_MBSNRTOWCS +/* Convert a multibyte string to a wide character string. Memory for the + new wide character string is obtained with malloc. + + Fast multiple-character version of xdupmbstowcs used when the indices are + not required and mbsnrtowcs is available. */ + +static size_t +xdupmbstowcs2 (destp, src) + wchar_t **destp; /* Store the pointer to the wide character string */ + const char *src; /* Multibyte character string */ +{ + const char *p; /* Conversion start position of src */ + wchar_t *wsbuf; /* Buffer for wide characters. */ + size_t wsbuf_size; /* Size of WSBUF */ + size_t wcnum; /* Number of wide characters in WSBUF */ + mbstate_t state; /* Conversion State */ + size_t n, wcslength; /* Number of wide characters produced by the conversion. */ + const char *end_or_backslash; + size_t nms; /* Number of multibyte characters to convert at one time. */ + mbstate_t tmp_state; + const char *tmp_p; + + memset (&state, '\0', sizeof(mbstate_t)); + + wsbuf_size = 0; + wsbuf = NULL; + + p = src; + wcnum = 0; + do + { + end_or_backslash = strchrnul(p, '\\'); + nms = end_or_backslash - p; + if (*end_or_backslash == '\0') + nms++; + + /* Compute the number of produced wide-characters. */ + tmp_p = p; + tmp_state = state; + + if (nms == 0 && *p == '\\') /* special initial case */ + nms = wcslength = 1; + else + wcslength = mbsnrtowcs (NULL, &tmp_p, nms, 0, &tmp_state); + + if (wcslength == 0) + { + tmp_p = p; /* will need below */ + tmp_state = state; + wcslength = 1; /* take a single byte */ + } + + /* Conversion failed. */ + if (wcslength == (size_t)-1) + { + free (wsbuf); + *destp = NULL; + return (size_t)-1; + } + + /* Resize the buffer if it is not large enough. */ + if (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */ + { + wchar_t *wstmp; + + while (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */ + wsbuf_size += WSBUF_INC; + + wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t)); + if (wstmp == NULL) + { + free (wsbuf); + *destp = NULL; + return (size_t)-1; + } + wsbuf = wstmp; + } + + /* Perform the conversion. This is assumed to return 'wcslength'. + It may set 'p' to NULL. */ + n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state); + + if (n == 0 && p == 0) + { + wsbuf[wcnum] = L'\0'; + break; + } + + /* Compensate for taking single byte on wcs conversion failure above. */ + if (wcslength == 1 && (n == 0 || n == (size_t)-1)) + { + state = tmp_state; + p = tmp_p; + wsbuf[wcnum] = *p; + if (*p == 0) + break; + else + { + wcnum++; p++; + } + } + else + wcnum += wcslength; + + if (mbsinit (&state) && (p != NULL) && (*p == '\\')) + { + wsbuf[wcnum++] = L'\\'; + p++; + } + } + while (p != NULL); + + *destp = wsbuf; + + /* Return the length of the wide character string, not including `\0'. */ + return wcnum; +} +#endif /* HAVE_MBSNRTOWCS */ + +/* Convert a multibyte string to a wide character string. Memory for the + new wide character string is obtained with malloc. + + The return value is the length of the wide character string. Returns a + pointer to the wide character string in DESTP. If INDICESP is not NULL, + INDICESP stores the pointer to the pointer array. Each pointer is to + the first byte of each multibyte character. Memory for the pointer array + is obtained with malloc, too. + If conversion is failed, the return value is (size_t)-1 and the values + of DESTP and INDICESP are NULL. */ + +size_t +xdupmbstowcs (destp, indicesp, src) + wchar_t **destp; /* Store the pointer to the wide character string */ + char ***indicesp; /* Store the pointer to the pointer array. */ + const char *src; /* Multibyte character string */ +{ + const char *p; /* Conversion start position of src */ + wchar_t wc; /* Created wide character by conversion */ + wchar_t *wsbuf; /* Buffer for wide characters. */ + char **indices; /* Buffer for indices. */ + size_t wsbuf_size; /* Size of WSBUF */ + size_t wcnum; /* Number of wide characters in WSBUF */ + mbstate_t state; /* Conversion State */ + + /* In case SRC or DESP is NULL, conversion doesn't take place. */ + if (src == NULL || destp == NULL) + { + if (destp) + *destp = NULL; + if (indicesp) + *indicesp = NULL; + return (size_t)-1; + } + +#if HAVE_MBSNRTOWCS + if (indicesp == NULL) + return (xdupmbstowcs2 (destp, src)); +#endif + + memset (&state, '\0', sizeof(mbstate_t)); + wsbuf_size = WSBUF_INC; + + wsbuf = (wchar_t *) malloc (wsbuf_size * sizeof(wchar_t)); + if (wsbuf == NULL) + { + *destp = NULL; + if (indicesp) + *indicesp = NULL; + return (size_t)-1; + } + + indices = NULL; + if (indicesp) + { + indices = (char **) malloc (wsbuf_size * sizeof(char *)); + if (indices == NULL) + { + free (wsbuf); + *destp = NULL; + *indicesp = NULL; + return (size_t)-1; + } + } + + p = src; + wcnum = 0; + do + { + size_t mblength; /* Byte length of one multibyte character. */ + + if (mbsinit (&state)) + { + if (*p == '\0') + { + wc = L'\0'; + mblength = 1; + } + else if (*p == '\\') + { + wc = L'\\'; + mblength = 1; + } + else + mblength = mbrtowc(&wc, p, MB_LEN_MAX, &state); + } + else + mblength = mbrtowc(&wc, p, MB_LEN_MAX, &state); + + /* Conversion failed. */ + if (MB_INVALIDCH (mblength)) + { + free (wsbuf); + FREE (indices); + *destp = NULL; + if (indicesp) + *indicesp = NULL; + return (size_t)-1; + } + + ++wcnum; + + /* Resize buffers when they are not large enough. */ + if (wsbuf_size < wcnum) + { + wchar_t *wstmp; + char **idxtmp; + + wsbuf_size += WSBUF_INC; + + wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t)); + if (wstmp == NULL) + { + free (wsbuf); + FREE (indices); + *destp = NULL; + if (indicesp) + *indicesp = NULL; + return (size_t)-1; + } + wsbuf = wstmp; + + if (indicesp) + { + idxtmp = (char **) realloc (indices, wsbuf_size * sizeof (char *)); + if (idxtmp == NULL) + { + free (wsbuf); + free (indices); + *destp = NULL; + if (indicesp) + *indicesp = NULL; + return (size_t)-1; + } + indices = idxtmp; + } + } + + wsbuf[wcnum - 1] = wc; + if (indices) + indices[wcnum - 1] = (char *)p; + p += mblength; + } + while (MB_NULLWCH (wc) == 0); + + /* Return the length of the wide character string, not including `\0'. */ + *destp = wsbuf; + if (indicesp != NULL) + *indicesp = indices; + + return (wcnum - 1); +} + +/* Convert wide character string to multibyte character string. Treat invalid + wide characters as bytes. Used only in unusual circumstances. + + Written by Bruno Haible , 2008, adapted by Chet Ramey + for use in Bash. */ + +/* Convert wide character string *SRCP to a multibyte character string and + store the result in DEST. Store at most LEN bytes in DEST. */ +size_t +xwcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) +{ + const wchar_t *src; + size_t cur_max; /* XXX - locale_cur_max */ + char buf[64], *destptr, *tmp_dest; + unsigned char uc; + mbstate_t prev_state; + + cur_max = MB_CUR_MAX; + if (cur_max > sizeof (buf)) /* Holy cow. */ + return (size_t)-1; + + src = *srcp; + + if (dest != NULL) + { + destptr = dest; + + for (; len > 0; src++) + { + wchar_t wc; + size_t ret; + + wc = *src; + /* If we have room, store directly into DEST. */ + tmp_dest = destptr; + ret = wcrtomb (len >= cur_max ? destptr : buf, wc, ps); + + if (ret == (size_t)(-1)) /* XXX */ + { + /* Since this is used for globbing and other uses of filenames, + treat invalid wide character sequences as bytes. This is + intended to be symmetric with xdupmbstowcs2. */ +handle_byte: + destptr = tmp_dest; /* in case wcrtomb modified it */ + uc = wc; + ret = 1; + if (len >= cur_max) + *destptr = uc; + else + buf[0] = uc; + if (ps) + memset (ps, 0, sizeof (mbstate_t)); + } + + if (ret > cur_max) /* Holy cow */ + goto bad_input; + + if (len < ret) + break; + + if (len < cur_max) + memcpy (destptr, buf, ret); + + if (wc == 0) + { + src = NULL; + /* Here mbsinit (ps). */ + break; + } + destptr += ret; + len -= ret; + } + *srcp = src; + return destptr - dest; + } + else + { + /* Ignore dest and len, don't store *srcp at the end, and + don't clobber *ps. */ + mbstate_t state = *ps; + size_t totalcount = 0; + + for (;; src++) + { + wchar_t wc; + size_t ret; + + wc = *src; + ret = wcrtomb (buf, wc, &state); + + if (ret == (size_t)(-1)) + goto bad_input2; + if (wc == 0) + { + /* Here mbsinit (&state). */ + break; + } + totalcount += ret; + } + return totalcount; + } + +bad_input: + *srcp = src; +bad_input2: + errno = EILSEQ; + return (size_t)(-1); +} + +#endif /* HANDLE_MULTIBYTE */ diff --git a/bash-5.1/lib/intl/ChangeLog b/bash-5.1/lib/intl/ChangeLog new file mode 100644 index 0000000000000000000000000000000000000000..eed2d21a4c6ce61a8164f008c373b1e658ebd060 --- /dev/null +++ b/bash-5.1/lib/intl/ChangeLog @@ -0,0 +1,4 @@ +2003-05-22 GNU + + * Version 0.12.1 released. + diff --git a/bash-5.1/lib/intl/Makefile.in b/bash-5.1/lib/intl/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..00fdb61266c76371ddd79cd1d47efbec51244e04 --- /dev/null +++ b/bash-5.1/lib/intl/Makefile.in @@ -0,0 +1,472 @@ +# Makefile for directory with message catalog handling library of GNU gettext +# Copyright (C) 1995-1998, 2000-2003, 2008,2009 Free Software Foundation, Inc. +# + +# 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 . + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @BUILD_DIR@ +VPATH = $(srcdir) + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +transform = @program_transform_name@ + +datarootdir = @datarootdir@ + +libdir = @libdir@ +includedir = @includedir@ +datadir = @datadir@ +localedir = @localedir@ + +gettextsrcdir = $(datadir)/gettext/intl +aliaspath = $(localedir) +subdir = intl + +@SET_MAKE@ + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + +l = @INTL_LIBTOOL_SUFFIX_PREFIX@ + +AR = @AR@ +CC = @CC@ +LIBTOOL = @LIBTOOL@ +RANLIB = @RANLIB@ +YACC = @INTLBISON@ -y -d +YFLAGS = --name-prefix=__gettext + +ARFLAGS = @ARFLAGS@ + +LOCAL_DEFS = @LOCAL_DEFS@ + +DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ +-DLIBDIR=\"$(prefix)/libdata\" -DIN_LIBINTL \ +-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ +-Dset_relocation_prefix=libintl_set_relocation_prefix \ +-Drelocate=libintl_relocate \ +-DDEPENDS_ON_LIBICONV=1 @DEFS@ ${LOCAL_DEFS} +CPPFLAGS = @CPPFLAGS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +HEADERS = \ + gmo.h \ + gettextP.h \ + hash-string.h \ + loadinfo.h \ + plural-exp.h \ + eval-plural.h \ + localcharset.h \ + relocatable.h \ + os2compat.h \ + libgnuintl.h.in +SOURCES = \ + bindtextdom.c \ + dcgettext.c \ + dgettext.c \ + gettext.c \ + finddomain.c \ + loadmsgcat.c \ + localealias.c \ + textdomain.c \ + l10nflist.c \ + explodename.c \ + dcigettext.c \ + dcngettext.c \ + dngettext.c \ + ngettext.c \ + plural.y \ + plural-exp.c \ + localcharset.c \ + relocatable.c \ + localename.c \ + log.c \ + osdep.c \ + os2compat.c \ + intl-compat.c +OBJECTS = \ + bindtextdom.$lo \ + dcgettext.$lo \ + dgettext.$lo \ + gettext.$lo \ + finddomain.$lo \ + loadmsgcat.$lo \ + localealias.$lo \ + textdomain.$lo \ + l10nflist.$lo \ + explodename.$lo \ + dcigettext.$lo \ + dcngettext.$lo \ + dngettext.$lo \ + ngettext.$lo \ + plural.$lo \ + plural-exp.$lo \ + localcharset.$lo \ + relocatable.$lo \ + localename.$lo \ + log.$lo \ + osdep.$lo \ + intl-compat.$lo +DISTFILES.common = Makefile.in \ +config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) +DISTFILES.generated = plural.c +DISTFILES.normal = VERSION +DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \ +Makefile.vms libgnuintl.h.msvc-shared README.woe32 Makefile.msvc +DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ +COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h + +all: all-@USE_INCLUDED_LIBINTL@ +all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed +all-no: all-no-@BUILD_INCLUDED_LIBINTL@ +all-no-yes: libgnuintl.$la +all-no-no: + +libintl.a libgnuintl.a: $(OBJECTS) + rm -f $@ + $(AR) $(ARFLAGS) $@ $(OBJECTS) + $(RANLIB) $@ + +libintl.la libgnuintl.la: $(OBJECTS) + $(LIBTOOL) --mode=link \ + $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ + $(OBJECTS) @LTLIBICONV@ $(LIBS) \ + -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ + -rpath $(libdir) \ + -no-undefined + +# Libtool's library version information for libintl. +# Before making a gettext release, the gettext maintainer must change this +# according to the libtool documentation, section "Library interface versions". +# Maintainers of other packages that include the intl directory must *not* +# change these values. +LTV_CURRENT=5 +LTV_REVISION=0 +LTV_AGE=3 + +.SUFFIXES: +.SUFFIXES: .c .y .o .lo .sin .sed + +.c.o: + $(COMPILE) $< + +.y.c: + $(YACC) $(YFLAGS) --output $@ $< + rm -f $*.h + +bindtextdom.lo: $(srcdir)/bindtextdom.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c +dcgettext.lo: $(srcdir)/dcgettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c +dgettext.lo: $(srcdir)/dgettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c +gettext.lo: $(srcdir)/gettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c +finddomain.lo: $(srcdir)/finddomain.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c +loadmsgcat.lo: $(srcdir)/loadmsgcat.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c +localealias.lo: $(srcdir)/localealias.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c +textdomain.lo: $(srcdir)/textdomain.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c +l10nflist.lo: $(srcdir)/l10nflist.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c +explodename.lo: $(srcdir)/explodename.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c +dcigettext.lo: $(srcdir)/dcigettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c +dcngettext.lo: $(srcdir)/dcngettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c +dngettext.lo: $(srcdir)/dngettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c +ngettext.lo: $(srcdir)/ngettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c +plural.lo: $(srcdir)/plural.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c +plural-exp.lo: $(srcdir)/plural-exp.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c +localcharset.lo: $(srcdir)/localcharset.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c +relocatable.lo: $(srcdir)/relocatable.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c +localename.lo: $(srcdir)/localename.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c +log.lo: $(srcdir)/log.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c +osdep.lo: $(srcdir)/osdep.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c +intl-compat.lo: $(srcdir)/intl-compat.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c + +ref-add.sed: $(srcdir)/ref-add.sin + sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed + mv t-ref-add.sed ref-add.sed +ref-del.sed: $(srcdir)/ref-del.sin + sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed + mv t-ref-del.sed ref-del.sed + +INCLUDES = -I. -I$(srcdir) -I${top_builddir} -I${top_srcdir} + +libgnuintl.h: $(srcdir)/libgnuintl.h.in + cp $(srcdir)/libgnuintl.h.in libgnuintl.h + +libintl.h: libgnuintl.h + cmp libgnuintl.h libintl.h || cp libgnuintl.h libintl.h + +charset.alias: $(srcdir)/config.charset + $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ + mv t-$@ $@ + +check: all + +# We must not install the libintl.h/libintl.a files if we are on a +# system which has the GNU gettext() function in its C library or in a +# separate library. +# If you want to use the one which comes with this version of the +# package, you have to use `configure --with-included-gettext'. +install: install-exec install-data +install-exec: all + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ + && test '@USE_INCLUDED_LIBINTL@' = yes; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ + $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ + $(LIBTOOL) --mode=install \ + $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ + if test "@RELOCATABLE@" = yes; then \ + dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \ + if test -n "$dependencies"; then \ + rm -f $(DESTDIR)$(libdir)/libintl.la; \ + fi; \ + fi; \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools" \ + && test '@USE_INCLUDED_LIBINTL@' = no; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir); \ + $(LIBTOOL) --mode=install \ + $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \ + rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ + $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \ + $(LIBTOOL) --mode=uninstall \ + rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \ + else \ + : ; \ + fi + if test '@USE_INCLUDED_LIBINTL@' = yes; then \ + $(mkinstalldirs) $(DESTDIR)$(localedir); \ + test -f $(DESTDIR)$(localedir)/locale.alias \ + && orig=$(DESTDIR)$(localedir)/locale.alias \ + || orig=$(srcdir)/locale.alias; \ + temp=$(DESTDIR)$(localedir)/t-locale.alias; \ + dest=$(DESTDIR)$(localedir)/locale.alias; \ + sed -f ref-add.sed $$orig > $$temp; \ + $(INSTALL_DATA) $$temp $$dest; \ + rm -f $$temp; \ + else \ + : ; \ + fi +install-data: all + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ + $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ + dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ + for file in $$dists; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \ + dists="$(DISTFILES.generated)"; \ + for file in $$dists; do \ + if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ + $(INSTALL_DATA) $$dir/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + dists="$(DISTFILES.obsolete)"; \ + for file in $$dists; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + +install-strip: install + +installdirs: + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ + && test '@USE_INCLUDED_LIBINTL@' = yes; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools" \ + && test '@USE_INCLUDED_LIBINTL@' = no; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir); \ + else \ + : ; \ + fi + if test '@USE_INCLUDED_LIBINTL@' = yes; then \ + test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ + $(mkinstalldirs) $(DESTDIR)$(localedir); \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ + && test '@USE_INCLUDED_LIBINTL@' = yes; then \ + rm -f $(DESTDIR)$(includedir)/libintl.h; \ + $(LIBTOOL) --mode=uninstall \ + rm -f $(DESTDIR)$(libdir)/libintl.$la; \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools" \ + && test '@USE_INCLUDED_LIBINTL@' = no; then \ + rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ + else \ + : ; \ + fi + if test '@USE_INCLUDED_LIBINTL@' = yes; then \ + if test -f $(DESTDIR)$(prefix)/libdata/charset.alias; then \ + temp=$(DESTDIR)$(prefix)/libdata/t-charset.alias; \ + dest=$(DESTDIR)$(prefix)/libdata/charset.alias; \ + sed -f ref-del.sed $$dest > $$temp; \ + if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ + rm -f $$dest; \ + else \ + $(INSTALL_DATA) $$temp $$dest; \ + fi; \ + rm -f $$temp; \ + fi; \ + if test -f $(DESTDIR)$(localedir)/locale.alias; then \ + temp=$(DESTDIR)$(localedir)/t-locale.alias; \ + dest=$(DESTDIR)$(localedir)/locale.alias; \ + sed -f ref-del.sed $$dest > $$temp; \ + if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ + rm -f $$dest; \ + else \ + $(INSTALL_DATA) $$temp $$dest; \ + fi; \ + rm -f $$temp; \ + fi; \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + +info dvi ps pdf html: + +$(OBJECTS): ${top_builddir}/config.h libgnuintl.h +bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h +dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h +explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h +dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h +dcigettext.$lo: $(srcdir)/eval-plural.h +localcharset.$lo: $(srcdir)/localcharset.h +localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h + +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) + +ctags: CTAGS + +CTAGS: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) + +id: ID + +ID: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) + + +mostlyclean: + rm -f *.a *.la *.o *.obj *.lo core core.* + rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed + rm -f -r .libs _libs + +clean: mostlyclean + +distclean: clean + rm -f Makefile ID TAGS + if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ + rm -f ChangeLog.inst $(DISTFILES.normal); \ + else \ + : ; \ + fi + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + + +# GNU gettext needs not contain the file `VERSION' but contains some +# other files which should not be distributed in other packages. +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: Makefile + if test "$(PACKAGE)" = "gettext-tools"; then \ + : ; \ + else \ + if test "$(PACKAGE)" = "gettext-runtime"; then \ + additional="$(DISTFILES.gettext)"; \ + else \ + additional="$(DISTFILES.normal)"; \ + fi; \ + $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ + for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ + if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ + cp -p $$dir/$$file $(distdir); \ + done; \ + fi + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status +# This would be more efficient, but doesn't work any more with autoconf-2.57, +# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used. +# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/bash-5.1/lib/intl/VERSION b/bash-5.1/lib/intl/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..130318357bbec430d9b26966fabbe1038100e3c3 --- /dev/null +++ b/bash-5.1/lib/intl/VERSION @@ -0,0 +1 @@ +GNU gettext library from gettext-0.12.1 diff --git a/bash-5.1/lib/intl/bindtextdom.c b/bash-5.1/lib/intl/bindtextdom.c new file mode 100644 index 0000000000000000000000000000000000000000..ef5479e32ef1c00380ceba20532a2c07cc9c76fd --- /dev/null +++ b/bash-5.1/lib/intl/bindtextdom.c @@ -0,0 +1,376 @@ +/* bindtextdom.c - Implementation of the bindtextdomain(3) function */ + +/* Copyright (C) 1995-1998, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif +#include "gettextP.h" + +#ifdef _LIBC +/* We have to handle multi-threaded applications. */ +# include +#else +/* Provide dummy implementation if this is outside glibc. */ +# define __libc_rwlock_define(CLASS, NAME) +# define __libc_rwlock_wrlock(NAME) +# define __libc_rwlock_unlock(NAME) +#endif + +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_dirname libintl_nl_default_dirname +# define _nl_domain_bindings libintl_nl_domain_bindings +#endif + +/* Some compilers, like SunOS4 cc, don't have offsetof in . */ +#ifndef offsetof +# define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) +#endif + +/* @@ end of prolog @@ */ + +/* Contains the default location of the message catalogs. */ +extern const char _nl_default_dirname[]; +#ifdef _LIBC +extern const char _nl_default_dirname_internal[] attribute_hidden; +#else +# define INTUSE(name) name +#endif + +/* List with bindings of specific domains. */ +extern struct binding *_nl_domain_bindings; + +/* Lock variable to protect the global data in the gettext implementation. */ +__libc_rwlock_define (extern, _nl_state_lock attribute_hidden) + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define BINDTEXTDOMAIN __bindtextdomain +# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define BINDTEXTDOMAIN libintl_bindtextdomain +# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset +#endif + +/* Prototypes for local functions. */ +static void set_binding_values PARAMS ((const char *domainname, + const char **dirnamep, + const char **codesetp)); + +/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP + to be used for the DOMAINNAME message catalog. + If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not + modified, only the current value is returned. + If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither + modified nor returned. */ +static void +set_binding_values (domainname, dirnamep, codesetp) + const char *domainname; + const char **dirnamep; + const char **codesetp; +{ + struct binding *binding; + int modified; + + /* Some sanity checks. */ + if (domainname == NULL || domainname[0] == '\0') + { + if (dirnamep) + *dirnamep = NULL; + if (codesetp) + *codesetp = NULL; + return; + } + + __libc_rwlock_wrlock (_nl_state_lock); + + modified = 0; + + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding != NULL) + { + if (dirnamep) + { + const char *dirname = *dirnamep; + + if (dirname == NULL) + /* The current binding has be to returned. */ + *dirnamep = binding->dirname; + else + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + char *result = binding->dirname; + if (strcmp (dirname, result) != 0) + { + if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) + result = (char *) INTUSE(_nl_default_dirname); + else + { +#if defined _LIBC || defined HAVE_STRDUP + result = strdup (dirname); +#else + size_t len = strlen (dirname) + 1; + result = (char *) malloc (len); + if (__builtin_expect (result != NULL, 1)) + memcpy (result, dirname, len); +#endif + } + + if (__builtin_expect (result != NULL, 1)) + { + if (binding->dirname != INTUSE(_nl_default_dirname)) + free (binding->dirname); + + binding->dirname = result; + modified = 1; + } + } + *dirnamep = result; + } + } + + if (codesetp) + { + const char *codeset = *codesetp; + + if (codeset == NULL) + /* The current binding has be to returned. */ + *codesetp = binding->codeset; + else + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + char *result = binding->codeset; + if (result == NULL || strcmp (codeset, result) != 0) + { +#if defined _LIBC || defined HAVE_STRDUP + result = strdup (codeset); +#else + size_t len = strlen (codeset) + 1; + result = (char *) malloc (len); + if (__builtin_expect (result != NULL, 1)) + memcpy (result, codeset, len); +#endif + + if (__builtin_expect (result != NULL, 1)) + { + if (binding->codeset != NULL) + free (binding->codeset); + + binding->codeset = result; + binding->codeset_cntr++; + modified = 1; + } + } + *codesetp = result; + } + } + } + else if ((dirnamep == NULL || *dirnamep == NULL) + && (codesetp == NULL || *codesetp == NULL)) + { + /* Simply return the default values. */ + if (dirnamep) + *dirnamep = INTUSE(_nl_default_dirname); + if (codesetp) + *codesetp = NULL; + } + else + { + /* We have to create a new binding. */ + size_t len = strlen (domainname) + 1; + struct binding *new_binding = + (struct binding *) malloc (offsetof (struct binding, domainname) + len); + + if (__builtin_expect (new_binding == NULL, 0)) + goto failed; + + memcpy (new_binding->domainname, domainname, len); + + if (dirnamep) + { + const char *dirname = *dirnamep; + + if (dirname == NULL) + /* The default value. */ + dirname = INTUSE(_nl_default_dirname); + else + { + if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) + dirname = INTUSE(_nl_default_dirname); + else + { + char *result; +#if defined _LIBC || defined HAVE_STRDUP + result = strdup (dirname); + if (__builtin_expect (result == NULL, 0)) + goto failed_dirname; +#else + size_t len = strlen (dirname) + 1; + result = (char *) malloc (len); + if (__builtin_expect (result == NULL, 0)) + goto failed_dirname; + memcpy (result, dirname, len); +#endif + dirname = result; + } + } + *dirnamep = dirname; + new_binding->dirname = (char *) dirname; + } + else + /* The default value. */ + new_binding->dirname = (char *) INTUSE(_nl_default_dirname); + + new_binding->codeset_cntr = 0; + + if (codesetp) + { + const char *codeset = *codesetp; + + if (codeset != NULL) + { + char *result; + +#if defined _LIBC || defined HAVE_STRDUP + result = strdup (codeset); + if (__builtin_expect (result == NULL, 0)) + goto failed_codeset; +#else + size_t len = strlen (codeset) + 1; + result = (char *) malloc (len); + if (__builtin_expect (result == NULL, 0)) + goto failed_codeset; + memcpy (result, codeset, len); +#endif + codeset = result; + new_binding->codeset_cntr++; + } + *codesetp = codeset; + new_binding->codeset = (char *) codeset; + } + else + new_binding->codeset = NULL; + + /* Now enqueue it. */ + if (_nl_domain_bindings == NULL + || strcmp (domainname, _nl_domain_bindings->domainname) < 0) + { + new_binding->next = _nl_domain_bindings; + _nl_domain_bindings = new_binding; + } + else + { + binding = _nl_domain_bindings; + while (binding->next != NULL + && strcmp (domainname, binding->next->domainname) > 0) + binding = binding->next; + + new_binding->next = binding->next; + binding->next = new_binding; + } + + modified = 1; + + /* Here we deal with memory allocation failures. */ + if (0) + { + failed_codeset: + if (new_binding->dirname != INTUSE(_nl_default_dirname)) + free (new_binding->dirname); + failed_dirname: + free (new_binding); + failed: + if (dirnamep) + *dirnamep = NULL; + if (codesetp) + *codesetp = NULL; + } + } + + /* If we modified any binding, we flush the caches. */ + if (modified) + ++_nl_msg_cat_cntr; + + __libc_rwlock_unlock (_nl_state_lock); +} + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +char * +BINDTEXTDOMAIN (domainname, dirname) + const char *domainname; + const char *dirname; +{ + set_binding_values (domainname, &dirname, NULL); + return (char *) dirname; +} + +/* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ +char * +BIND_TEXTDOMAIN_CODESET (domainname, codeset) + const char *domainname; + const char *codeset; +{ + set_binding_values (domainname, NULL, &codeset); + return (char *) codeset; +} + +#ifdef _LIBC +/* Aliases for function names in GNU C Library. */ +weak_alias (__bindtextdomain, bindtextdomain); +weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset); +#endif diff --git a/bash-5.1/lib/intl/config.charset b/bash-5.1/lib/intl/config.charset new file mode 100644 index 0000000000000000000000000000000000000000..10c443970222a9e335c7070b25627eebfc85f333 --- /dev/null +++ b/bash-5.1/lib/intl/config.charset @@ -0,0 +1,465 @@ +#! /bin/sh +# Output a system dependent table of character encoding aliases. +# +# Copyright (C) 2000-2009 Free Software Foundation, Inc. +# +# 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 . +# +# The table consists of lines of the form +# ALIAS CANONICAL +# +# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". +# ALIAS is compared in a case sensitive way. +# +# CANONICAL is the GNU canonical name for this character encoding. +# It must be an encoding supported by libiconv. Support by GNU libc is +# also desirable. CANONICAL is case insensitive. Usually an upper case +# MIME charset name is preferred. +# The current list of GNU canonical charset names is as follows. +# +# name used by which systems a MIME name? +# ASCII, ANSI_X3.4-1968 glibc solaris freebsd +# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes +# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes +# ISO-8859-3 glibc solaris yes +# ISO-8859-4 osf solaris freebsd yes +# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes +# ISO-8859-6 glibc aix hpux solaris yes +# ISO-8859-7 glibc aix hpux irix osf solaris yes +# ISO-8859-8 glibc aix hpux osf solaris yes +# ISO-8859-9 glibc aix hpux irix osf solaris yes +# ISO-8859-13 glibc +# ISO-8859-14 glibc +# ISO-8859-15 glibc aix osf solaris freebsd +# KOI8-R glibc solaris freebsd yes +# KOI8-U glibc freebsd yes +# KOI8-T glibc +# CP437 dos +# CP775 dos +# CP850 aix osf dos +# CP852 dos +# CP855 dos +# CP856 aix +# CP857 dos +# CP861 dos +# CP862 dos +# CP864 dos +# CP865 dos +# CP866 freebsd dos +# CP869 dos +# CP874 woe32 dos +# CP922 aix +# CP932 aix woe32 dos +# CP943 aix +# CP949 osf woe32 dos +# CP950 woe32 dos +# CP1046 aix +# CP1124 aix +# CP1125 dos +# CP1129 aix +# CP1250 woe32 +# CP1251 glibc solaris woe32 +# CP1252 aix woe32 +# CP1253 woe32 +# CP1254 woe32 +# CP1255 glibc woe32 +# CP1256 woe32 +# CP1257 woe32 +# GB2312 glibc aix hpux irix solaris freebsd yes +# EUC-JP glibc aix hpux irix osf solaris freebsd yes +# EUC-KR glibc aix hpux irix osf solaris freebsd yes +# EUC-TW glibc aix hpux irix osf solaris +# BIG5 glibc aix hpux osf solaris freebsd yes +# BIG5-HKSCS glibc solaris +# GBK glibc aix osf solaris woe32 dos +# GB18030 glibc solaris +# SHIFT_JIS hpux osf solaris freebsd yes +# JOHAB glibc solaris woe32 +# TIS-620 glibc aix hpux osf solaris +# VISCII glibc yes +# TCVN5712-1 glibc +# GEORGIAN-PS glibc +# HP-ROMAN8 hpux +# HP-ARABIC8 hpux +# HP-GREEK8 hpux +# HP-HEBREW8 hpux +# HP-TURKISH8 hpux +# HP-KANA8 hpux +# DEC-KANJI osf +# DEC-HANYU osf +# UTF-8 glibc aix hpux osf solaris yes +# +# Note: Names which are not marked as being a MIME name should not be used in +# Internet protocols for information interchange (mail, news, etc.). +# +# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications +# must understand both names and treat them as equivalent. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + +host="$1" +os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` +echo "# This file contains a table of character encoding aliases," +echo "# suitable for operating system '${os}'." +echo "# It was automatically generated from config.charset." +# List of references, updated during installation: +echo "# Packages using this file: " +case "$os" in + linux* | *-gnu*) + # With glibc-2.1 or newer, we don't need any canonicalization, + # because glibc has iconv and both glibc and libiconv support all + # GNU canonical names directly. Therefore, the Makefile does not + # need to install the alias file at all. + # The following applies only to glibc-2.0.x and older libcs. + echo "ISO_646.IRV:1983 ASCII" + ;; + aix*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-6 ISO-8859-6" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "IBM-850 CP850" + echo "IBM-856 CP856" + echo "IBM-921 ISO-8859-13" + echo "IBM-922 CP922" + echo "IBM-932 CP932" + echo "IBM-943 CP943" + echo "IBM-1046 CP1046" + echo "IBM-1124 CP1124" + echo "IBM-1129 CP1129" + echo "IBM-1252 CP1252" + echo "IBM-eucCN GB2312" + echo "IBM-eucJP EUC-JP" + echo "IBM-eucKR EUC-KR" + echo "IBM-eucTW EUC-TW" + echo "big5 BIG5" + echo "GBK GBK" + echo "TIS-620 TIS-620" + echo "UTF-8 UTF-8" + ;; + hpux*) + echo "iso88591 ISO-8859-1" + echo "iso88592 ISO-8859-2" + echo "iso88595 ISO-8859-5" + echo "iso88596 ISO-8859-6" + echo "iso88597 ISO-8859-7" + echo "iso88598 ISO-8859-8" + echo "iso88599 ISO-8859-9" + echo "iso885915 ISO-8859-15" + echo "roman8 HP-ROMAN8" + echo "arabic8 HP-ARABIC8" + echo "greek8 HP-GREEK8" + echo "hebrew8 HP-HEBREW8" + echo "turkish8 HP-TURKISH8" + echo "kana8 HP-KANA8" + echo "tis620 TIS-620" + echo "big5 BIG5" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "hp15CN GB2312" + #echo "ccdc ?" # what is this? + echo "SJIS SHIFT_JIS" + echo "utf8 UTF-8" + ;; + irix*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-9 ISO-8859-9" + echo "eucCN GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + ;; + osf*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "cp850 CP850" + echo "big5 BIG5" + echo "dechanyu DEC-HANYU" + echo "dechanzi GB2312" + echo "deckanji DEC-KANJI" + echo "deckorean EUC-KR" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "GBK GBK" + echo "KSC5601 CP949" + echo "sdeckanji EUC-JP" + echo "SJIS SHIFT_JIS" + echo "TACTIS TIS-620" + echo "UTF-8 UTF-8" + ;; + solaris*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-3 ISO-8859-3" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-6 ISO-8859-6" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "koi8-r KOI8-R" + echo "ansi-1251 CP1251" + echo "BIG5 BIG5" + echo "Big5-HKSCS BIG5-HKSCS" + echo "gb2312 GB2312" + echo "GBK GBK" + echo "GB18030 GB18030" + echo "cns11643 EUC-TW" + echo "5601 EUC-KR" + echo "ko_KR.johap92 JOHAB" + echo "eucJP EUC-JP" + echo "PCK SHIFT_JIS" + echo "TIS620.2533 TIS-620" + #echo "sun_eu_greek ?" # what is this? + echo "UTF-8 UTF-8" + ;; + freebsd* | os2*) + # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just + # reuse FreeBSD's locale data for OS/2. + echo "C ASCII" + echo "US-ASCII ASCII" + for l in la_LN lt_LN; do + echo "$l.ASCII ASCII" + done + for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ + lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do + echo "$l.ISO_8859-1 ISO-8859-1" + echo "$l.DIS_8859-15 ISO-8859-15" + done + for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do + echo "$l.ISO_8859-2 ISO-8859-2" + done + for l in la_LN lt_LT; do + echo "$l.ISO_8859-4 ISO-8859-4" + done + for l in ru_RU ru_SU; do + echo "$l.KOI8-R KOI8-R" + echo "$l.ISO_8859-5 ISO-8859-5" + echo "$l.CP866 CP866" + done + echo "uk_UA.KOI8-U KOI8-U" + echo "zh_TW.BIG5 BIG5" + echo "zh_TW.Big5 BIG5" + echo "zh_CN.EUC GB2312" + echo "ja_JP.EUC EUC-JP" + echo "ja_JP.SJIS SHIFT_JIS" + echo "ja_JP.Shift_JIS SHIFT_JIS" + echo "ko_KR.EUC EUC-KR" + ;; + netbsd*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-15 ISO-8859-15" + echo "eucCN GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "BIG5 BIG5" + echo "SJIS SHIFT_JIS" + ;; + beos*) + # BeOS has a single locale, and it has UTF-8 encoding. + echo "* UTF-8" + ;; + msdosdjgpp*) + # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + echo "#" + echo "# The encodings given here may not all be correct." + echo "# If you find that the encoding given for your language and" + echo "# country is not the one your DOS machine actually uses, just" + echo "# correct it in this file, and send a mail to" + echo "# Juan Manuel Guerrero " + echo "# and Bruno Haible ." + echo "#" + echo "C ASCII" + # ISO-8859-1 languages + echo "ca CP850" + echo "ca_ES CP850" + echo "da CP865" # not CP850 ?? + echo "da_DK CP865" # not CP850 ?? + echo "de CP850" + echo "de_AT CP850" + echo "de_CH CP850" + echo "de_DE CP850" + echo "en CP850" + echo "en_AU CP850" # not CP437 ?? + echo "en_CA CP850" + echo "en_GB CP850" + echo "en_NZ CP437" + echo "en_US CP437" + echo "en_ZA CP850" # not CP437 ?? + echo "es CP850" + echo "es_AR CP850" + echo "es_BO CP850" + echo "es_CL CP850" + echo "es_CO CP850" + echo "es_CR CP850" + echo "es_CU CP850" + echo "es_DO CP850" + echo "es_EC CP850" + echo "es_ES CP850" + echo "es_GT CP850" + echo "es_HN CP850" + echo "es_MX CP850" + echo "es_NI CP850" + echo "es_PA CP850" + echo "es_PY CP850" + echo "es_PE CP850" + echo "es_SV CP850" + echo "es_UY CP850" + echo "es_VE CP850" + echo "et CP850" + echo "et_EE CP850" + echo "eu CP850" + echo "eu_ES CP850" + echo "fi CP850" + echo "fi_FI CP850" + echo "fr CP850" + echo "fr_BE CP850" + echo "fr_CA CP850" + echo "fr_CH CP850" + echo "fr_FR CP850" + echo "ga CP850" + echo "ga_IE CP850" + echo "gd CP850" + echo "gd_GB CP850" + echo "gl CP850" + echo "gl_ES CP850" + echo "id CP850" # not CP437 ?? + echo "id_ID CP850" # not CP437 ?? + echo "is CP861" # not CP850 ?? + echo "is_IS CP861" # not CP850 ?? + echo "it CP850" + echo "it_CH CP850" + echo "it_IT CP850" + echo "lt CP775" + echo "lt_LT CP775" + echo "lv CP775" + echo "lv_LV CP775" + echo "nb CP865" # not CP850 ?? + echo "nb_NO CP865" # not CP850 ?? + echo "nl CP850" + echo "nl_BE CP850" + echo "nl_NL CP850" + echo "nn CP865" # not CP850 ?? + echo "nn_NO CP865" # not CP850 ?? + echo "no CP865" # not CP850 ?? + echo "no_NO CP865" # not CP850 ?? + echo "pt CP850" + echo "pt_BR CP850" + echo "pt_PT CP850" + echo "sv CP850" + echo "sv_SE CP850" + # ISO-8859-2 languages + echo "cs CP852" + echo "cs_CZ CP852" + echo "hr CP852" + echo "hr_HR CP852" + echo "hu CP852" + echo "hu_HU CP852" + echo "pl CP852" + echo "pl_PL CP852" + echo "ro CP852" + echo "ro_RO CP852" + echo "sk CP852" + echo "sk_SK CP852" + echo "sl CP852" + echo "sl_SI CP852" + echo "sq CP852" + echo "sq_AL CP852" + echo "sr CP852" # CP852 or CP866 or CP855 ?? + echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? + # ISO-8859-3 languages + echo "mt CP850" + echo "mt_MT CP850" + # ISO-8859-5 languages + echo "be CP866" + echo "be_BE CP866" + echo "bg CP866" # not CP855 ?? + echo "bg_BG CP866" # not CP855 ?? + echo "mk CP866" # not CP855 ?? + echo "mk_MK CP866" # not CP855 ?? + echo "ru CP866" + echo "ru_RU CP866" + echo "uk CP1125" + echo "uk_UA CP1125" + # ISO-8859-6 languages + echo "ar CP864" + echo "ar_AE CP864" + echo "ar_DZ CP864" + echo "ar_EG CP864" + echo "ar_IQ CP864" + echo "ar_IR CP864" + echo "ar_JO CP864" + echo "ar_KW CP864" + echo "ar_MA CP864" + echo "ar_OM CP864" + echo "ar_QA CP864" + echo "ar_SA CP864" + echo "ar_SY CP864" + # ISO-8859-7 languages + echo "el CP869" + echo "el_GR CP869" + # ISO-8859-8 languages + echo "he CP862" + echo "he_IL CP862" + # ISO-8859-9 languages + echo "tr CP857" + echo "tr_TR CP857" + # Japanese + echo "ja CP932" + echo "ja_JP CP932" + # Chinese + echo "zh_CN GBK" + echo "zh_TW CP950" # not CP938 ?? + # Korean + echo "kr CP949" # not CP934 ?? + echo "kr_KR CP949" # not CP934 ?? + # Thai + echo "th CP874" + echo "th_TH CP874" + # Other + echo "eo CP850" + echo "eo_EO CP850" + ;; +esac diff --git a/bash-5.1/lib/intl/dcgettext.c b/bash-5.1/lib/intl/dcgettext.c new file mode 100644 index 0000000000000000000000000000000000000000..c156ca24edd769b59b0cba5188b81be2539e2388 --- /dev/null +++ b/bash-5.1/lib/intl/dcgettext.c @@ -0,0 +1,61 @@ +/* dcgettext.c - Implementation of the dcgettext(3) function. */ + +/* Copyright (C) 1995-1999, 2000, 2001, 2002, 2006-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DCGETTEXT __dcgettext +# define DCIGETTEXT __dcigettext +#else +# define DCGETTEXT libintl_dcgettext +# define DCIGETTEXT libintl_dcigettext +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +char * +DCGETTEXT (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ + return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +INTDEF(__dcgettext) +weak_alias (__dcgettext, dcgettext); +#endif diff --git a/bash-5.1/lib/intl/dcigettext.c b/bash-5.1/lib/intl/dcigettext.c new file mode 100644 index 0000000000000000000000000000000000000000..c0f347e39c79db34a5ee069c889201bb50a2f388 --- /dev/null +++ b/bash-5.1/lib/intl/dcigettext.c @@ -0,0 +1,1248 @@ +/* dcigettext.c - Implementation of the internal dcigettext function. */ + +/* Copyright (C) 1995-1999, 2000-2003, 2006-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Tell glibc's to provide a prototype for mempcpy(). + This must come before because may include + , and once has been included, it's too late. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +#include +#ifndef errno +extern int errno; +#endif +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#include +#include +#include + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include + +#ifdef _LIBC + /* Guess whether integer division by zero raises signal SIGFPE. + Set to 1 only if you know for sure. In case of doubt, set to 0. */ +# if defined __alpha__ || defined __arm__ || defined __i386__ \ + || defined __m68k__ || defined __s390__ +# define INTDIV0_RAISES_SIGFPE 1 +# else +# define INTDIV0_RAISES_SIGFPE 0 +# endif +#endif +#if !INTDIV0_RAISES_SIGFPE +# include +#endif + +#if defined HAVE_SYS_PARAM_H || defined _LIBC +# include +#endif + +#include "gettextP.h" +#include "plural-exp.h" +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif +#include "hash-string.h" + +/* Thread safetyness. */ +#ifdef _LIBC +# include +#else +/* Provide dummy implementation if this is outside glibc. */ +# define __libc_lock_define_initialized(CLASS, NAME) +# define __libc_lock_lock(NAME) +# define __libc_lock_unlock(NAME) +# define __libc_rwlock_define_initialized(CLASS, NAME) +# define __libc_rwlock_rdlock(NAME) +# define __libc_rwlock_unlock(NAME) +#endif + +/* Alignment of types. */ +#if defined __GNUC__ && __GNUC__ >= 2 +# define alignof(TYPE) __alignof__ (TYPE) +#else +# define alignof(TYPE) \ + ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) +#endif + +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_default_domain libintl_nl_default_default_domain +# define _nl_current_default_domain libintl_nl_current_default_domain +# define _nl_default_dirname libintl_nl_default_dirname +# define _nl_domain_bindings libintl_nl_domain_bindings +#endif + +/* Some compilers, like SunOS4 cc, don't have offsetof in . */ +#ifndef offsetof +# define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) +#endif + +/* @@ end of prolog @@ */ + +#if defined (SHELL) && !defined (HAVE_GETCWD) +# define HAVE_GETCWD +#endif + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define getcwd __getcwd +# ifndef stpcpy +# define stpcpy __stpcpy +# endif +# define tfind __tfind +#else +# if !defined HAVE_GETCWD +char *getwd (); +# define getcwd(buf, max) getwd (buf) +# else +char *getcwd (); +# endif +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +# ifndef HAVE_MEMPCPY +static void *mempcpy PARAMS ((void *dest, const void *src, size_t n)); +# endif +#endif + +/* Amount to increase buffer size by in each try. */ +#define PATH_INCR 32 + +/* The following is from pathmax.h. */ +/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define + PATH_MAX but might cause redefinition warnings when sys/param.h is + later included (as on MORE/BSD 4.3). */ +#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__) +# include +#endif + +#ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 255 +#endif + +#if !defined PATH_MAX && defined _PC_PATH_MAX +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) +#endif + +/* Don't include sys/param.h if it already has been. */ +#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +#endif + +#if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +#endif + +#ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +#endif + +/* Pathname support. + ISSLASH(C) tests whether C is a directory separator character. + IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, + it may be concatenated to a directory pathname. + IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. + */ +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +# define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ + && (P)[1] == ':') +# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) +# define IS_PATH_WITH_DIR(P) \ + (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) +#else + /* Unix */ +# define ISSLASH(C) ((C) == '/') +# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) +# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) +#endif + +/* This is the type used for the search tree where known translations + are stored. */ +struct known_translation_t +{ + /* Domain in which to search. */ + char *domainname; + + /* The category. */ + int category; + + /* State of the catalog counter at the point the string was found. */ + int counter; + + /* Catalog where the string was found. */ + struct loaded_l10nfile *domain; + + /* And finally the translation. */ + const char *translation; + size_t translation_length; + + /* Pointer to the string in question. */ + char msgid[ZERO]; +}; + +/* Root of the search tree with known translations. We can use this + only if the system provides the `tsearch' function family. */ +#if defined HAVE_TSEARCH || defined _LIBC +# include + +static void *root; + +# ifdef _LIBC +# define tsearch __tsearch +# endif + +/* Function to compare two entries in the table of known translations. */ +static int transcmp PARAMS ((const void *p1, const void *p2)); +static int +transcmp (p1, p2) + const void *p1; + const void *p2; +{ + const struct known_translation_t *s1; + const struct known_translation_t *s2; + int result; + + s1 = (const struct known_translation_t *) p1; + s2 = (const struct known_translation_t *) p2; + + result = strcmp (s1->msgid, s2->msgid); + if (result == 0) + { + result = strcmp (s1->domainname, s2->domainname); + if (result == 0) + /* We compare the category last (though this is the cheapest + operation) since it is hopefully always the same (namely + LC_MESSAGES). */ + result = s1->category - s2->category; + } + + return result; +} +#endif + +#ifndef INTVARDEF +# define INTVARDEF(name) +#endif +#ifndef INTUSE +# define INTUSE(name) name +#endif + +/* Name of the default domain used for gettext(3) prior any call to + textdomain(3). The default value for this is "messages". */ +const char _nl_default_default_domain[] attribute_hidden = "messages"; + +/* Value used as the default domain for gettext(3). */ +const char *_nl_current_default_domain attribute_hidden + = _nl_default_default_domain; + +/* Contains the default location of the message catalogs. */ +#if defined __EMX__ +extern const char _nl_default_dirname[]; +#else +const char _nl_default_dirname[] = LOCALEDIR; +INTVARDEF (_nl_default_dirname) +#endif + +/* List with bindings of specific domains created by bindtextdomain() + calls. */ +struct binding *_nl_domain_bindings; + +/* Prototypes for local functions. */ +static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain, + unsigned long int n, + const char *translation, + size_t translation_len)) + internal_function; +static const char *guess_category_value PARAMS ((int category, + const char *categoryname)) + internal_function; +#ifdef _LIBC +# include "../locale/localeinfo.h" +# define category_to_name(category) _nl_category_names[category] +#else +static const char *category_to_name PARAMS ((int category)) internal_function; +#endif + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define freea(p) /* nothing */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old->address); \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +# define freea(p) free (p) +#endif /* have alloca */ + + +#ifdef _LIBC +/* List of blocks allocated for translations. */ +typedef struct transmem_list +{ + struct transmem_list *next; + char data[ZERO]; +} transmem_block_t; +static struct transmem_list *transmem_list; +#else +typedef unsigned char transmem_block_t; +#endif + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DCIGETTEXT __dcigettext +#else +# define DCIGETTEXT libintl_dcigettext +#endif + +/* Lock variable to protect the global data in the gettext implementation. */ +#ifdef _LIBC +__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden) +#endif + +/* Checking whether the binaries runs SUID must be done and glibc provides + easier methods therefore we make a difference here. */ +#ifdef _LIBC +# define ENABLE_SECURE __libc_enable_secure +# define DETERMINE_SECURE +#else +# ifndef HAVE_GETUID +# define getuid() 0 +# endif +# ifndef HAVE_GETGID +# define getgid() 0 +# endif +# ifndef HAVE_GETEUID +# define geteuid() getuid() +# endif +# ifndef HAVE_GETEGID +# define getegid() getgid() +# endif +static int enable_secure; +# define ENABLE_SECURE (enable_secure == 1) +# define DETERMINE_SECURE \ + if (enable_secure == 0) \ + { \ + if (getuid () != geteuid () || getgid () != getegid ()) \ + enable_secure = 1; \ + else \ + enable_secure = -1; \ + } +#endif + +#ifndef HAVE_RAISE +# define raise(x) kill (getpid (), (x)) +#endif + +/* Get the function to evaluate the plural expression. */ +#include "eval-plural.h" + +/* Look up MSGID in the DOMAINNAME message catalog for the current + CATEGORY locale and, if PLURAL is nonzero, search over string + depending on the plural form determined by N. */ +char * +DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category) + const char *domainname; + const char *msgid1; + const char *msgid2; + int plural; + unsigned long int n; + int category; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + struct loaded_l10nfile *domain; + struct binding *binding; + const char *categoryname; + const char *categoryvalue; + char *dirname, *xdomainname; + char *single_locale; + char *retval; + size_t retlen; + int saved_errno; +#if defined HAVE_TSEARCH || defined _LIBC + struct known_translation_t *search; + struct known_translation_t **foundp = NULL; + size_t msgid_len; +#endif + size_t domainname_len; + + /* If no real MSGID is given return NULL. */ + if (msgid1 == NULL) + return NULL; + +#ifdef _LIBC + if (category < 0 || category >= __LC_LAST || category == LC_ALL) + /* Bogus. */ + return (plural == 0 + ? (char *) msgid1 + /* Use the Germanic plural rule. */ + : n == 1 ? (char *) msgid1 : (char *) msgid2); +#endif + + __libc_rwlock_rdlock (_nl_state_lock); + + /* If DOMAINNAME is NULL, we are interested in the default domain. If + CATEGORY is not LC_MESSAGES this might not make much sense but the + definition left this undefined. */ + if (domainname == NULL) + domainname = _nl_current_default_domain; + + /* OS/2 specific: backward compatibility with older libintl versions */ +#ifdef LC_MESSAGES_COMPAT + if (category == LC_MESSAGES_COMPAT) + category = LC_MESSAGES; +#endif + +#if defined HAVE_TSEARCH || defined _LIBC + msgid_len = strlen (msgid1) + 1; + + /* Try to find the translation among those which we found at + some time. */ + search = (struct known_translation_t *) + alloca (offsetof (struct known_translation_t, msgid) + msgid_len); + memcpy (search->msgid, msgid1, msgid_len); + search->domainname = (char *) domainname; + search->category = category; + + foundp = (struct known_translation_t **) tfind (search, &root, transcmp); + freea (search); + if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr) + { + /* Now deal with plural. */ + if (plural) + retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation, + (*foundp)->translation_length); + else + retval = (char *) (*foundp)->translation; + + __libc_rwlock_unlock (_nl_state_lock); + return retval; + } +#endif + + /* Preserve the `errno' value. */ + saved_errno = errno; + + /* See whether this is a SUID binary or not. */ + DETERMINE_SECURE; + + /* First find matching binding. */ + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding == NULL) + dirname = (char *) INTUSE(_nl_default_dirname); + else if (IS_ABSOLUTE_PATH (binding->dirname)) + dirname = binding->dirname; + else + { + /* We have a relative path. Make it absolute now. */ + size_t dirname_len = strlen (binding->dirname) + 1; + size_t path_max; + char *ret; + + path_max = (unsigned int) PATH_MAX; + path_max += 2; /* The getcwd docs say to do this. */ + + for (;;) + { + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + + __set_errno (0); + ret = getcwd (dirname, path_max); + if (ret != NULL || errno != ERANGE) + break; + + path_max += path_max / 2; + path_max += PATH_INCR; + } + + if (ret == NULL) + /* We cannot get the current working directory. Don't signal an + error but simply return the default string. */ + goto return_untranslated; + + stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); + } + + /* Now determine the symbolic name of CATEGORY and its value. */ + categoryname = category_to_name (category); + categoryvalue = guess_category_value (category, categoryname); + + domainname_len = strlen (domainname); + xdomainname = (char *) alloca (strlen (categoryname) + + domainname_len + 5); + ADD_BLOCK (block_list, xdomainname); + + stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), + domainname, domainname_len), + ".mo"); + + /* Creating working area. */ + single_locale = (char *) alloca (strlen (categoryvalue) + 1); + ADD_BLOCK (block_list, single_locale); + + + /* Search for the given string. This is a loop because we perhaps + got an ordered list of languages to consider for the translation. */ + while (1) + { + /* Make CATEGORYVALUE point to the next element of the list. */ + while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') + ++categoryvalue; + if (categoryvalue[0] == '\0') + { + /* The whole contents of CATEGORYVALUE has been searched but + no valid entry has been found. We solve this situation + by implicitly appending a "C" entry, i.e. no translation + will take place. */ + single_locale[0] = 'C'; + single_locale[1] = '\0'; + } + else + { + char *cp = single_locale; + while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') + *cp++ = *categoryvalue++; + *cp = '\0'; + + /* When this is a SUID binary we must not allow accessing files + outside the dedicated directories. */ + if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale)) + /* Ingore this entry. */ + continue; + } + + /* If the current locale value is C (or POSIX) we don't load a + domain. Return the MSGID. */ + if (strcmp (single_locale, "C") == 0 + || strcmp (single_locale, "POSIX") == 0) + break; + + /* Find structure describing the message catalog matching the + DOMAINNAME and CATEGORY. */ + domain = _nl_find_domain (dirname, single_locale, xdomainname, binding); + + if (domain != NULL) + { + retval = _nl_find_msg (domain, binding, msgid1, &retlen); + + if (retval == NULL) + { + int cnt; + + for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) + { + retval = _nl_find_msg (domain->successor[cnt], binding, + msgid1, &retlen); + + if (retval != NULL) + { + domain = domain->successor[cnt]; + break; + } + } + } + + if (retval != NULL) + { + /* Found the translation of MSGID1 in domain DOMAIN: + starting at RETVAL, RETLEN bytes. */ + FREE_BLOCKS (block_list); +#if defined HAVE_TSEARCH || defined _LIBC + if (foundp == NULL) + { + /* Create a new entry and add it to the search tree. */ + struct known_translation_t *newp; + + newp = (struct known_translation_t *) + malloc (offsetof (struct known_translation_t, msgid) + + msgid_len + domainname_len + 1); + if (newp != NULL) + { + newp->domainname = + mempcpy (newp->msgid, msgid1, msgid_len); + memcpy (newp->domainname, domainname, domainname_len + 1); + newp->category = category; + newp->counter = _nl_msg_cat_cntr; + newp->domain = domain; + newp->translation = retval; + newp->translation_length = retlen; + + /* Insert the entry in the search tree. */ + foundp = (struct known_translation_t **) + tsearch (newp, &root, transcmp); + if (foundp == NULL + || __builtin_expect (*foundp != newp, 0)) + /* The insert failed. */ + free (newp); + } + } + else + { + /* We can update the existing entry. */ + (*foundp)->counter = _nl_msg_cat_cntr; + (*foundp)->domain = domain; + (*foundp)->translation = retval; + (*foundp)->translation_length = retlen; + } +#endif + __set_errno (saved_errno); + + /* Now deal with plural. */ + if (plural) + retval = plural_lookup (domain, n, retval, retlen); + + __libc_rwlock_unlock (_nl_state_lock); + return retval; + } + } + } + + return_untranslated: + /* Return the untranslated MSGID. */ + FREE_BLOCKS (block_list); + __libc_rwlock_unlock (_nl_state_lock); +#ifndef _LIBC + if (!ENABLE_SECURE) + { + extern void _nl_log_untranslated PARAMS ((const char *logfilename, + const char *domainname, + const char *msgid1, + const char *msgid2, + int plural)); + const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); + + if (logfilename != NULL && logfilename[0] != '\0') + _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural); + } +#endif + __set_errno (saved_errno); + return (plural == 0 + ? (char *) msgid1 + /* Use the Germanic plural rule. */ + : n == 1 ? (char *) msgid1 : (char *) msgid2); +} + + +char * +internal_function +_nl_find_msg (domain_file, domainbinding, msgid, lengthp) + struct loaded_l10nfile *domain_file; + struct binding *domainbinding; + const char *msgid; + size_t *lengthp; +{ + struct loaded_domain *domain; + nls_uint32 nstrings; + size_t act; + char *result; + size_t resultlen; + + if (domain_file->decided == 0) + _nl_load_domain (domain_file, domainbinding); + + if (domain_file->data == NULL) + return NULL; + + domain = (struct loaded_domain *) domain_file->data; + + nstrings = domain->nstrings; + + /* Locate the MSGID and its translation. */ + if (domain->hash_tab != NULL) + { + /* Use the hashing table. */ + nls_uint32 len = strlen (msgid); + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + + while (1) + { + nls_uint32 nstr = + W (domain->must_swap_hash_tab, domain->hash_tab[idx]); + + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + nstr--; + + /* Compare msgid with the original string at index nstr. + We compare the lengths with >=, not ==, because plural entries + are represented by strings with an embedded NUL. */ + if (nstr < nstrings + ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len + && (strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr].offset)) + == 0) + : domain->orig_sysdep_tab[nstr - nstrings].length > len + && (strcmp (msgid, + domain->orig_sysdep_tab[nstr - nstrings].pointer) + == 0)) + { + act = nstr; + goto found; + } + + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + } + /* NOTREACHED */ + } + else + { + /* Try the default method: binary search in the sorted array of + messages. */ + size_t top, bottom; + + bottom = 0; + top = nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp (msgid, (domain->data + + W (domain->must_swap, + domain->orig_tab[act].offset))); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + goto found; + } + /* No translation was found. */ + return NULL; + } + + found: + /* The translation was found at index ACT. If we have to convert the + string to use a different character set, this is the time. */ + if (act < nstrings) + { + result = (char *) + (domain->data + W (domain->must_swap, domain->trans_tab[act].offset)); + resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1; + } + else + { + result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer; + resultlen = domain->trans_sysdep_tab[act - nstrings].length; + } + +#if defined _LIBC || HAVE_ICONV + if (domain->codeset_cntr + != (domainbinding != NULL ? domainbinding->codeset_cntr : 0)) + { + /* The domain's codeset has changed through bind_textdomain_codeset() + since the message catalog was initialized or last accessed. We + have to reinitialize the converter. */ + _nl_free_domain_conv (domain); + _nl_init_domain_conv (domain_file, domain, domainbinding); + } + + if ( +# ifdef _LIBC + domain->conv != (__gconv_t) -1 +# else +# if HAVE_ICONV + domain->conv != (iconv_t) -1 +# endif +# endif + ) + { + /* We are supposed to do a conversion. First allocate an + appropriate table with the same structure as the table + of translations in the file, where we can put the pointers + to the converted strings in. + There is a slight complication with plural entries. They + are represented by consecutive NUL terminated strings. We + handle this case by converting RESULTLEN bytes, including + NULs. */ + + if (domain->conv_tab == NULL + && ((domain->conv_tab = + (char **) calloc (nstrings + domain->n_sysdep_strings, + sizeof (char *))) + == NULL)) + /* Mark that we didn't succeed allocating a table. */ + domain->conv_tab = (char **) -1; + + if (__builtin_expect (domain->conv_tab == (char **) -1, 0)) + /* Nothing we can do, no more memory. */ + goto converted; + + if (domain->conv_tab[act] == NULL) + { + /* We haven't used this string so far, so it is not + translated yet. Do this now. */ + /* We use a bit more efficient memory handling. + We allocate always larger blocks which get used over + time. This is faster than many small allocations. */ + __libc_lock_define_initialized (static, lock) +# define INITIAL_BLOCK_SIZE 4080 + static unsigned char *freemem; + static size_t freemem_size; + + const unsigned char *inbuf; + unsigned char *outbuf; + int malloc_count; +# ifndef _LIBC + transmem_block_t *transmem_list = NULL; +# endif + + __libc_lock_lock (lock); + + inbuf = (const unsigned char *) result; + outbuf = freemem + sizeof (size_t); + + malloc_count = 0; + while (1) + { + transmem_block_t *newmem; +# ifdef _LIBC + size_t non_reversible; + int res; + + if (freemem_size < sizeof (size_t)) + goto resize_freemem; + + res = __gconv (domain->conv, + &inbuf, inbuf + resultlen, + &outbuf, + outbuf + freemem_size - sizeof (size_t), + &non_reversible); + + if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT) + break; + + if (res != __GCONV_FULL_OUTPUT) + { + __libc_lock_unlock (lock); + goto converted; + } + + inbuf = result; +# else +# if HAVE_ICONV + const char *inptr = (const char *) inbuf; + size_t inleft = resultlen; + char *outptr = (char *) outbuf; + size_t outleft; + + if (freemem_size < sizeof (size_t)) + goto resize_freemem; + + outleft = freemem_size - sizeof (size_t); + if (iconv (domain->conv, + (ICONV_CONST char **) &inptr, &inleft, + &outptr, &outleft) + != (size_t) (-1)) + { + outbuf = (unsigned char *) outptr; + break; + } + if (errno != E2BIG) + { + __libc_lock_unlock (lock); + goto converted; + } +# endif +# endif + + resize_freemem: + /* We must allocate a new buffer or resize the old one. */ + if (malloc_count > 0) + { + ++malloc_count; + freemem_size = malloc_count * INITIAL_BLOCK_SIZE; + newmem = (transmem_block_t *) realloc (transmem_list, + freemem_size); +# ifdef _LIBC + if (newmem != NULL) + transmem_list = transmem_list->next; + else + { + struct transmem_list *old = transmem_list; + + transmem_list = transmem_list->next; + free (old); + } +# endif + } + else + { + malloc_count = 1; + freemem_size = INITIAL_BLOCK_SIZE; + newmem = (transmem_block_t *) malloc (freemem_size); + } + if (__builtin_expect (newmem == NULL, 0)) + { + freemem = NULL; + freemem_size = 0; + __libc_lock_unlock (lock); + goto converted; + } + +# ifdef _LIBC + /* Add the block to the list of blocks we have to free + at some point. */ + newmem->next = transmem_list; + transmem_list = newmem; + + freemem = newmem->data; + freemem_size -= offsetof (struct transmem_list, data); +# else + transmem_list = newmem; + freemem = newmem; +# endif + + outbuf = freemem + sizeof (size_t); + } + + /* We have now in our buffer a converted string. Put this + into the table of conversions. */ + *(size_t *) freemem = outbuf - freemem - sizeof (size_t); + domain->conv_tab[act] = (char *) freemem; + /* Shrink freemem, but keep it aligned. */ + freemem_size -= outbuf - freemem; + freemem = outbuf; + freemem += freemem_size & (alignof (size_t) - 1); + freemem_size = freemem_size & ~ (alignof (size_t) - 1); + + __libc_lock_unlock (lock); + } + + /* Now domain->conv_tab[act] contains the translation of all + the plural variants. */ + result = domain->conv_tab[act] + sizeof (size_t); + resultlen = *(size_t *) domain->conv_tab[act]; + } + + converted: + /* The result string is converted. */ + +#endif /* _LIBC || HAVE_ICONV */ + + *lengthp = resultlen; + return result; +} + + +/* Look up a plural variant. */ +static char * +internal_function +plural_lookup (domain, n, translation, translation_len) + struct loaded_l10nfile *domain; + unsigned long int n; + const char *translation; + size_t translation_len; +{ + struct loaded_domain *domaindata = (struct loaded_domain *) domain->data; + unsigned long int index; + const char *p; + + index = plural_eval (domaindata->plural, n); + if (index >= domaindata->nplurals) + /* This should never happen. It means the plural expression and the + given maximum value do not match. */ + index = 0; + + /* Skip INDEX strings at TRANSLATION. */ + p = translation; + while (index-- > 0) + { +#ifdef _LIBC + p = __rawmemchr (p, '\0'); +#else + p = strchr (p, '\0'); +#endif + /* And skip over the NUL byte. */ + p++; + + if (p >= translation + translation_len) + /* This should never happen. It means the plural expression + evaluated to a value larger than the number of variants + available for MSGID1. */ + return (char *) translation; + } + return (char *) p; +} + +#ifndef _LIBC +/* Return string representation of locale CATEGORY. */ +static const char * +internal_function +category_to_name (category) + int category; +{ + const char *retval; + + switch (category) + { +#ifdef LC_COLLATE + case LC_COLLATE: + retval = "LC_COLLATE"; + break; +#endif +#ifdef LC_CTYPE + case LC_CTYPE: + retval = "LC_CTYPE"; + break; +#endif +#ifdef LC_MONETARY + case LC_MONETARY: + retval = "LC_MONETARY"; + break; +#endif +#ifdef LC_NUMERIC + case LC_NUMERIC: + retval = "LC_NUMERIC"; + break; +#endif +#ifdef LC_TIME + case LC_TIME: + retval = "LC_TIME"; + break; +#endif +#ifdef LC_MESSAGES + case LC_MESSAGES: + retval = "LC_MESSAGES"; + break; +#endif +#ifdef LC_RESPONSE + case LC_RESPONSE: + retval = "LC_RESPONSE"; + break; +#endif +#ifdef LC_ALL + case LC_ALL: + /* This might not make sense but is perhaps better than any other + value. */ + retval = "LC_ALL"; + break; +#endif + default: + /* If you have a better idea for a default value let me know. */ + retval = "LC_XXX"; + } + + return retval; +} +#endif + +/* Guess value of current locale from value of the environment variables. */ +static const char * +internal_function +guess_category_value (category, categoryname) + int category; + const char *categoryname; +{ + const char *language; + const char *retval; + + /* The highest priority value is the `LANGUAGE' environment + variable. But we don't use the value if the currently selected + locale is the C locale. This is a GNU extension. */ + language = getenv ("LANGUAGE"); + if (language != NULL && language[0] == '\0') + language = NULL; + + /* We have to proceed with the POSIX methods of looking to `LC_ALL', + `LC_xxx', and `LANG'. On some systems this can be done by the + `setlocale' function itself. */ +#ifdef _LIBC + retval = __current_locale_name (category); +#else + retval = _nl_locale_name (category, categoryname); +#endif + + /* Ignore LANGUAGE if the locale is set to "C" because + 1. "C" locale usually uses the ASCII encoding, and most international + messages use non-ASCII characters. These characters get displayed + as question marks (if using glibc's iconv()) or as invalid 8-bit + characters (because other iconv()s refuse to convert most non-ASCII + characters to ASCII). In any case, the output is ugly. + 2. The precise output of some programs in the "C" locale is specified + by POSIX and should not depend on environment variables like + "LANGUAGE". We allow such programs to use gettext(). */ + return language != NULL && strcmp (retval, "C") != 0 ? language : retval; +} + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif + +#if !_LIBC && !HAVE_MEMPCPY +static void * +mempcpy (dest, src, n) + void *dest; + const void *src; + size_t n; +{ + return (void *) ((char *) memcpy (dest, src, n) + n); +} +#endif + + +#ifdef _LIBC +/* If we want to free all resources we have to do some work at + program's end. */ +libc_freeres_fn (free_mem) +{ + void *old; + + while (_nl_domain_bindings != NULL) + { + struct binding *oldp = _nl_domain_bindings; + _nl_domain_bindings = _nl_domain_bindings->next; + if (oldp->dirname != INTUSE(_nl_default_dirname)) + /* Yes, this is a pointer comparison. */ + free (oldp->dirname); + free (oldp->codeset); + free (oldp); + } + + if (_nl_current_default_domain != _nl_default_default_domain) + /* Yes, again a pointer comparison. */ + free ((char *) _nl_current_default_domain); + + /* Remove the search tree with the known translations. */ + __tdestroy (root, free); + root = NULL; + + while (transmem_list != NULL) + { + old = transmem_list; + transmem_list = transmem_list->next; + free (old); + } +} +#endif diff --git a/bash-5.1/lib/intl/dcngettext.c b/bash-5.1/lib/intl/dcngettext.c new file mode 100644 index 0000000000000000000000000000000000000000..3d70b18fefd025e5d9e7b64351e6a87bbe6be1de --- /dev/null +++ b/bash-5.1/lib/intl/dcngettext.c @@ -0,0 +1,62 @@ +/* dcngettext.c - Implementation of the dcngettext(3) function. */ + +/* Copyright (C) 1995-1999, 2000, 2001, 2002, 2006-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DCNGETTEXT __dcngettext +# define DCIGETTEXT __dcigettext +#else +# define DCNGETTEXT libintl_dcngettext +# define DCIGETTEXT libintl_dcigettext +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +char * +DCNGETTEXT (domainname, msgid1, msgid2, n, category) + const char *domainname; + const char *msgid1; + const char *msgid2; + unsigned long int n; + int category; +{ + return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dcngettext, dcngettext); +#endif diff --git a/bash-5.1/lib/intl/dgettext.c b/bash-5.1/lib/intl/dgettext.c new file mode 100644 index 0000000000000000000000000000000000000000..53516314f894530edd4845f221de69bef1eb4643 --- /dev/null +++ b/bash-5.1/lib/intl/dgettext.c @@ -0,0 +1,61 @@ +/* dgettext.c - Implementation of the dgettext(3) function. */ + +/* Copyright (C) 1995-1997, 2000, 2001, 2002, 2006-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DGETTEXT __dgettext +# define DCGETTEXT INTUSE(__dcgettext) +#else +# define DGETTEXT libintl_dgettext +# define DCGETTEXT libintl_dcgettext +#endif + +/* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale. */ +char * +DGETTEXT (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return DCGETTEXT (domainname, msgid, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dgettext, dgettext); +#endif diff --git a/bash-5.1/lib/intl/dngettext.c b/bash-5.1/lib/intl/dngettext.c new file mode 100644 index 0000000000000000000000000000000000000000..4276f3b24fce7a24527e82287b5057bb44a6fad4 --- /dev/null +++ b/bash-5.1/lib/intl/dngettext.c @@ -0,0 +1,63 @@ +/* dngettext.c - Implementation of the dngettext(3) function. */ + +/* Copyright (C) 1995-1997, 2000, 2001, 2002, 2005, 2006, 2008,2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DNGETTEXT __dngettext +# define DCNGETTEXT __dcngettext +#else +# define DNGETTEXT libintl_dngettext +# define DCNGETTEXT libintl_dcngettext +#endif + +/* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale and skip message according to the plural form. */ +char * +DNGETTEXT (domainname, msgid1, msgid2, n) + const char *domainname; + const char *msgid1; + const char *msgid2; + unsigned long int n; +{ + return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dngettext, dngettext); +#endif diff --git a/bash-5.1/lib/intl/eval-plural.h b/bash-5.1/lib/intl/eval-plural.h new file mode 100644 index 0000000000000000000000000000000000000000..3441c74e55b323cca4f9e0da6eae3ff4fdee9f16 --- /dev/null +++ b/bash-5.1/lib/intl/eval-plural.h @@ -0,0 +1,116 @@ +/* eval-plural.c - Plural expression evaluation. */ + +/* Copyright (C) 2000-2002, 2006-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef STATIC +#define STATIC static +#endif + +/* Evaluate the plural expression and return an index value. */ +STATIC unsigned long int plural_eval PARAMS ((struct expression *pexp, + unsigned long int n)) + internal_function; + +STATIC +unsigned long int +internal_function +plural_eval (pexp, n) + struct expression *pexp; + unsigned long int n; +{ + switch (pexp->nargs) + { + case 0: + switch (pexp->operation) + { + case var: + return n; + case num: + return pexp->val.num; + default: + break; + } + /* NOTREACHED */ + break; + case 1: + { + /* pexp->operation must be lnot. */ + unsigned long int arg = plural_eval (pexp->val.args[0], n); + return ! arg; + } + case 2: + { + unsigned long int leftarg = plural_eval (pexp->val.args[0], n); + if (pexp->operation == lor) + return leftarg || plural_eval (pexp->val.args[1], n); + else if (pexp->operation == land) + return leftarg && plural_eval (pexp->val.args[1], n); + else + { + unsigned long int rightarg = plural_eval (pexp->val.args[1], n); + + switch (pexp->operation) + { + case mult: + return leftarg * rightarg; + case divide: +#if !INTDIV0_RAISES_SIGFPE + if (rightarg == 0) + raise (SIGFPE); +#endif + return leftarg / rightarg; + case module: +#if !INTDIV0_RAISES_SIGFPE + if (rightarg == 0) + raise (SIGFPE); +#endif + return leftarg % rightarg; + case plus: + return leftarg + rightarg; + case minus: + return leftarg - rightarg; + case less_than: + return leftarg < rightarg; + case greater_than: + return leftarg > rightarg; + case less_or_equal: + return leftarg <= rightarg; + case greater_or_equal: + return leftarg >= rightarg; + case equal: + return leftarg == rightarg; + case not_equal: + return leftarg != rightarg; + default: + break; + } + } + /* NOTREACHED */ + break; + } + case 3: + { + /* pexp->operation must be qmop. */ + unsigned long int boolarg = plural_eval (pexp->val.args[0], n); + return plural_eval (pexp->val.args[boolarg ? 1 : 2], n); + } + } + /* NOTREACHED */ + return 0; +} diff --git a/bash-5.1/lib/intl/explodename.c b/bash-5.1/lib/intl/explodename.c new file mode 100644 index 0000000000000000000000000000000000000000..adc36402bb91547d840b4608a086a7a73d527bc1 --- /dev/null +++ b/bash-5.1/lib/intl/explodename.c @@ -0,0 +1,195 @@ +/* explodename.c */ + +/* Copyright (C) 1995-1998, 2000, 2001, 2005-2009 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +char * +_nl_find_language (name) + const char *name; +{ + while (name[0] != '\0' && name[0] != '_' && name[0] != '@' + && name[0] != '+' && name[0] != ',') + ++name; + + return (char *) name; +} + + +int +_nl_explode_name (name, language, modifier, territory, codeset, + normalized_codeset, special, sponsor, revision) + char *name; + const char **language; + const char **modifier; + const char **territory; + const char **codeset; + const char **normalized_codeset; + const char **special; + const char **sponsor; + const char **revision; +{ + enum { undecided, xpg, cen } syntax; + char *cp; + int mask; + + *modifier = NULL; + *territory = NULL; + *codeset = NULL; + *normalized_codeset = NULL; + *special = NULL; + *sponsor = NULL; + *revision = NULL; + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = 0; + syntax = undecided; + *language = cp = name; + cp = _nl_find_language (*language); + + if (*language == cp) + /* This does not make sense: language has to be specified. Use + this entry as it is without exploding. Perhaps it is an alias. */ + cp = strchr (*language, '\0'); + else if (cp[0] == '_') + { + /* Next is the territory. */ + cp[0] = '\0'; + *territory = ++cp; + + while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= TERRITORY; + + if (cp[0] == '.') + { + /* Next is the codeset. */ + syntax = xpg; + cp[0] = '\0'; + *codeset = ++cp; + + while (cp[0] != '\0' && cp[0] != '@') + ++cp; + + mask |= XPG_CODESET; + + if (*codeset != cp && (*codeset)[0] != '\0') + { + *normalized_codeset = _nl_normalize_codeset (*codeset, + cp - *codeset); + if (strcmp (*codeset, *normalized_codeset) == 0) + free ((char *) *normalized_codeset); + else + mask |= XPG_NORM_CODESET; + } + } + } + + if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) + { + /* Next is the modifier. */ + syntax = cp[0] == '@' ? xpg : cen; + cp[0] = '\0'; + *modifier = ++cp; + + while (syntax == cen && cp[0] != '\0' && cp[0] != '+' + && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= XPG_MODIFIER | CEN_AUDIENCE; + } + + if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) + { + syntax = cen; + + if (cp[0] == '+') + { + /* Next is special application (CEN syntax). */ + cp[0] = '\0'; + *special = ++cp; + + while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= CEN_SPECIAL; + } + + if (cp[0] == ',') + { + /* Next is sponsor (CEN syntax). */ + cp[0] = '\0'; + *sponsor = ++cp; + + while (cp[0] != '\0' && cp[0] != '_') + ++cp; + + mask |= CEN_SPONSOR; + } + + if (cp[0] == '_') + { + /* Next is revision (CEN syntax). */ + cp[0] = '\0'; + *revision = ++cp; + + mask |= CEN_REVISION; + } + } + + /* For CEN syntax values it might be important to have the + separator character in the file name, not for XPG syntax. */ + if (syntax == xpg) + { + if (*territory != NULL && (*territory)[0] == '\0') + mask &= ~TERRITORY; + + if (*codeset != NULL && (*codeset)[0] == '\0') + mask &= ~XPG_CODESET; + + if (*modifier != NULL && (*modifier)[0] == '\0') + mask &= ~XPG_MODIFIER; + } + + return mask; +} diff --git a/bash-5.1/lib/intl/finddomain.c b/bash-5.1/lib/intl/finddomain.c new file mode 100644 index 0000000000000000000000000000000000000000..69a3586e07d4830161202c90bb1ad660f440f861 --- /dev/null +++ b/bash-5.1/lib/intl/finddomain.c @@ -0,0 +1,197 @@ +/* finddomain.c - Handle list of needed message catalogs */ + +/* Copyright (C) 1995-1999, 2000, 2001, 2005-2009 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif + +/* @@ end of prolog @@ */ +/* List of already loaded domains. */ +static struct loaded_l10nfile *_nl_loaded_domains; + + +/* Return a data structure describing the message catalog described by + the DOMAINNAME and CATEGORY parameters with respect to the currently + established bindings. */ +struct loaded_l10nfile * +internal_function +_nl_find_domain (dirname, locale, domainname, domainbinding) + const char *dirname; + char *locale; + const char *domainname; + struct binding *domainbinding; +{ + struct loaded_l10nfile *retval; + const char *language; + const char *modifier; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *special; + const char *sponsor; + const char *revision; + const char *alias_value; + int mask; + + /* LOCALE can consist of up to four recognized parts for the XPG syntax: + + language[_territory[.codeset]][@modifier] + + and six parts for the CEN syntax: + + language[_territory][+audience][+special][,[sponsor][_revision]] + + Beside the first part all of them are allowed to be missing. If + the full specified locale is not found, the less specific one are + looked for. The various parts will be stripped off according to + the following order: + (1) revision + (2) sponsor + (3) special + (4) codeset + (5) normalized codeset + (6) territory + (7) audience/modifier + */ + + /* If we have already tested for this locale entry there has to + be one data set in the list of loaded domains. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, 0, locale, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, domainname, 0); + if (retval != NULL) + { + /* We know something about this locale. */ + int cnt; + + if (retval->decided == 0) + _nl_load_domain (retval, domainbinding); + + if (retval->data != NULL) + return retval; + + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt], domainbinding); + + if (retval->successor[cnt]->data != NULL) + break; + } + return cnt >= 0 ? retval : NULL; + /* NOTREACHED */ + } + + /* See whether the locale value is an alias. If yes its value + *overwrites* the alias name. No test for the original value is + done. */ + alias_value = _nl_expand_alias (locale); + if (alias_value != NULL) + { +#if defined _LIBC || defined HAVE_STRDUP + locale = strdup (alias_value); + if (locale == NULL) + return NULL; +#else + size_t len = strlen (alias_value) + 1; + locale = (char *) malloc (len); + if (locale == NULL) + return NULL; + + memcpy (locale, alias_value, len); +#endif + } + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = _nl_explode_name (locale, &language, &modifier, &territory, + &codeset, &normalized_codeset, &special, + &sponsor, &revision); + + /* Create all possible locale entries which might be interested in + generalization. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, mask, language, territory, + codeset, normalized_codeset, modifier, special, + sponsor, revision, domainname, 1); + if (retval == NULL) + /* This means we are out of core. */ + return NULL; + + if (retval->decided == 0) + _nl_load_domain (retval, domainbinding); + if (retval->data == NULL) + { + int cnt; + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt], domainbinding); + if (retval->successor[cnt]->data != NULL) + break; + } + } + + /* The room for an alias was dynamically allocated. Free it now. */ + if (alias_value != NULL) + free (locale); + + /* The space for normalized_codeset is dynamically allocated. Free it. */ + if (mask & XPG_NORM_CODESET) + free ((void *) normalized_codeset); + + return retval; +} + + +#ifdef _LIBC +libc_freeres_fn (free_mem) +{ + struct loaded_l10nfile *runp = _nl_loaded_domains; + + while (runp != NULL) + { + struct loaded_l10nfile *here = runp; + if (runp->data != NULL) + _nl_unload_domain ((struct loaded_domain *) runp->data); + runp = runp->next; + free ((char *) here->filename); + free (here); + } +} +#endif diff --git a/bash-5.1/lib/intl/gettext.c b/bash-5.1/lib/intl/gettext.c new file mode 100644 index 0000000000000000000000000000000000000000..fd3fa0fff95c2c77196f46a774b6d2f990a9ad25 --- /dev/null +++ b/bash-5.1/lib/intl/gettext.c @@ -0,0 +1,66 @@ +/* gettext.c - Implementation of gettext(3) function. */ + +/* Copyright (C) 1995, 1997, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef _LIBC +# define __need_NULL +# include +#else +# include /* Just for NULL. */ +#endif + +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define GETTEXT __gettext +# define DCGETTEXT INTUSE(__dcgettext) +#else +# define GETTEXT libintl_gettext +# define DCGETTEXT libintl_dcgettext +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +char * +GETTEXT (msgid) + const char *msgid; +{ + return DCGETTEXT (NULL, msgid, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__gettext, gettext); +#endif diff --git a/bash-5.1/lib/intl/gettextP.h b/bash-5.1/lib/intl/gettextP.h new file mode 100644 index 0000000000000000000000000000000000000000..5c137e514c0689bf9f39d56b2d3bffc7fb74dca6 --- /dev/null +++ b/bash-5.1/lib/intl/gettextP.h @@ -0,0 +1,226 @@ +/* gettextP.h - Header describing internals of libintl library. */ + +/* Copyright (C) 1995-1999, 2000-2003, 2005-2009 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _GETTEXTP_H +#define _GETTEXTP_H + +#include /* Get size_t. */ + +#ifdef _LIBC +# include "../iconv/gconv_int.h" +#else +# if HAVE_ICONV +# include +# endif +#endif + +#include "loadinfo.h" + +#include "gmo.h" /* Get nls_uint32. */ + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef internal_function +# define internal_function +#endif + +#ifndef attribute_hidden +# define attribute_hidden +#endif + +/* Tell the compiler when a conditional or integer expression is + almost always true or almost always false. */ +#ifndef HAVE_BUILTIN_EXPECT +# define __builtin_expect(expr, val) (expr) +#endif + +#ifndef W +# define W(flag, data) ((flag) ? SWAP (data) : (data)) +#endif + + +#ifdef _LIBC +# include +# define SWAP(i) bswap_32 (i) +#else +static inline nls_uint32 +SWAP (i) + nls_uint32 i; +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} +#endif + + +/* In-memory representation of system dependent string. */ +struct sysdep_string_desc +{ + /* Length of addressed string, including the trailing NUL. */ + size_t length; + /* Pointer to addressed string. */ + const char *pointer; +}; + +/* The representation of an opened message catalog. */ +struct loaded_domain +{ + /* Pointer to memory containing the .mo file. */ + const char *data; + /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ + int use_mmap; + /* Size of mmap()ed memory. */ + size_t mmap_size; + /* 1 if the .mo file uses a different endianness than this machine. */ + int must_swap; + /* Pointer to additional malloc()ed memory. */ + void *malloced; + + /* Number of static strings pairs. */ + nls_uint32 nstrings; + /* Pointer to descriptors of original strings in the file. */ + const struct string_desc *orig_tab; + /* Pointer to descriptors of translated strings in the file. */ + const struct string_desc *trans_tab; + + /* Number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Pointer to descriptors of original sysdep strings. */ + const struct sysdep_string_desc *orig_sysdep_tab; + /* Pointer to descriptors of translated sysdep strings. */ + const struct sysdep_string_desc *trans_sysdep_tab; + + /* Size of hash table. */ + nls_uint32 hash_size; + /* Pointer to hash table. */ + const nls_uint32 *hash_tab; + /* 1 if the hash table uses a different endianness than this machine. */ + int must_swap_hash_tab; + + int codeset_cntr; +#ifdef _LIBC + __gconv_t conv; +#else +# if HAVE_ICONV + iconv_t conv; +# endif +#endif + char **conv_tab; + + struct expression *plural; + unsigned long int nplurals; +}; + +/* We want to allocate a string at the end of the struct. But ISO C + doesn't allow zero sized arrays. */ +#ifdef __GNUC__ +# define ZERO 0 +#else +# define ZERO 1 +#endif + +/* A set of settings bound to a message domain. Used to store settings + from bindtextdomain() and bind_textdomain_codeset(). */ +struct binding +{ + struct binding *next; + char *dirname; + int codeset_cntr; /* Incremented each time codeset changes. */ + char *codeset; + char domainname[ZERO]; +}; + +/* A counter which is incremented each time some previous translations + become invalid. + This variable is part of the external ABI of the GNU libintl. */ +extern int _nl_msg_cat_cntr; + +#ifndef _LIBC +const char *_nl_locale_name PARAMS ((int category, const char *categoryname)); +#endif + +struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, + char *__locale, + const char *__domainname, + struct binding *__domainbinding)) + internal_function; +void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain, + struct binding *__domainbinding)) + internal_function; +void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) + internal_function; +const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file, + struct loaded_domain *__domain, + struct binding *__domainbinding)) + internal_function; +void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain)) + internal_function; + +char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file, + struct binding *domainbinding, + const char *msgid, size_t *lengthp)) + internal_function; + +#ifdef _LIBC +extern char *__gettext PARAMS ((const char *__msgid)); +extern char *__dgettext PARAMS ((const char *__domainname, + const char *__msgid)); +extern char *__dcgettext PARAMS ((const char *__domainname, + const char *__msgid, int __category)); +extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2, + unsigned long int __n)); +extern char *__dngettext PARAMS ((const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int n)); +extern char *__dcngettext PARAMS ((const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category)); +extern char *__dcigettext PARAMS ((const char *__domainname, + const char *__msgid1, const char *__msgid2, + int __plural, unsigned long int __n, + int __category)); +extern char *__textdomain PARAMS ((const char *__domainname)); +extern char *__bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); +extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname, + const char *__codeset)); +#else +/* Declare the exported libintl_* functions, in a way that allows us to + call them under their real name. */ +# define _INTL_REDIRECT_MACROS +# include "libgnuintl.h" +extern char *libintl_dcigettext PARAMS ((const char *__domainname, + const char *__msgid1, + const char *__msgid2, + int __plural, unsigned long int __n, + int __category)); +#endif + +/* @@ begin of epilog @@ */ + +#endif /* gettextP.h */ diff --git a/bash-5.1/lib/intl/gmo.h b/bash-5.1/lib/intl/gmo.h new file mode 100644 index 0000000000000000000000000000000000000000..2c5785123c4beab38b9c1775ea5635ee549871d4 --- /dev/null +++ b/bash-5.1/lib/intl/gmo.h @@ -0,0 +1,150 @@ +/* gmo.h - Description of GNU message catalog format: general file layout. */ + +/* Copyright (C) 1995, 1997, 2000-2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _GETTEXT_H +#define _GETTEXT_H 1 + +#include + +/* @@ end of prolog @@ */ + +/* The magic number of the GNU message catalog format. */ +#define _MAGIC 0x950412de +#define _MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work + when cross-compiling. */ + +#if __STDC__ +# define UINT_MAX_32_BITS 4294967295U +#else +# define UINT_MAX_32_BITS 0xFFFFFFFF +#endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have ) have 64+-bit integral types. */ + +#ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +#endif + +#if UINT_MAX == UINT_MAX_32_BITS +typedef unsigned nls_uint32; +#else +# if USHRT_MAX == UINT_MAX_32_BITS +typedef unsigned short nls_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS +typedef unsigned long nls_uint32; +# else + /* The following line is intended to throw an error. Using #error is + not portable enough. */ + "Cannot determine unsigned 32-bit data type." +# endif +# endif +#endif + + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + nls_uint32 magic; + /* The revision number of the file format. */ + nls_uint32 revision; + + /* The following are only used in .mo files with major revision 0. */ + + /* The number of strings pairs. */ + nls_uint32 nstrings; + /* Offset of table with start offsets of original strings. */ + nls_uint32 orig_tab_offset; + /* Offset of table with start offsets of translated strings. */ + nls_uint32 trans_tab_offset; + /* Size of hash table. */ + nls_uint32 hash_tab_size; + /* Offset of first hash table entry. */ + nls_uint32 hash_tab_offset; + + /* The following are only used in .mo files with minor revision >= 1. */ + + /* The number of system dependent segments. */ + nls_uint32 n_sysdep_segments; + /* Offset of table describing system dependent segments. */ + nls_uint32 sysdep_segments_offset; + /* The number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Offset of table with start offsets of original sysdep strings. */ + nls_uint32 orig_sysdep_tab_offset; + /* Offset of table with start offsets of translated sysdep strings. */ + nls_uint32 trans_sysdep_tab_offset; +}; + +/* Descriptor for static string contained in the binary .mo file. */ +struct string_desc +{ + /* Length of addressed string, not including the trailing NUL. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* The following are only used in .mo files with minor revision >= 1. */ + +/* Descriptor for system dependent string segment. */ +struct sysdep_segment +{ + /* Length of addressed string, including the trailing NUL. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* Descriptor for system dependent string. */ +struct sysdep_string +{ + /* Offset of static string segments in file. */ + nls_uint32 offset; + /* Alternating sequence of static and system dependent segments. + The last segment is a static segment, including the trailing NUL. */ + struct segment_pair + { + /* Size of static segment. */ + nls_uint32 segsize; + /* Reference to system dependent string segment, or ~0 at the end. */ + nls_uint32 sysdepref; + } segments[1]; +}; + +/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF, + regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ +#define SEGMENTS_END ((nls_uint32) ~0) + +/* @@ begin of epilog @@ */ + +#endif /* gettext.h */ diff --git a/bash-5.1/lib/intl/hash-string.h b/bash-5.1/lib/intl/hash-string.h new file mode 100644 index 0000000000000000000000000000000000000000..b5a7d4132c45a85bea86e3e1c464d1fde4b97be1 --- /dev/null +++ b/bash-5.1/lib/intl/hash-string.h @@ -0,0 +1,61 @@ +/* hash-string.h - Description of GNU message catalog format: string hashing function. */ + +/* Copyright (C) 1995, 1997, 1998, 2000, 2001, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +#endif + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + + +/* Defines the so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ +static unsigned long int hash_string PARAMS ((const char *__str_param)); + +static inline unsigned long int +hash_string (str_param) + const char *str_param; +{ + unsigned long int hval, g; + const char *str = str_param; + + /* Compute the hash value for the given string. */ + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long int) *str++; + g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; +} diff --git a/bash-5.1/lib/intl/intl-compat.c b/bash-5.1/lib/intl/intl-compat.c new file mode 100644 index 0000000000000000000000000000000000000000..7f32349919777408f45e573c485e1c1db176e48a --- /dev/null +++ b/bash-5.1/lib/intl/intl-compat.c @@ -0,0 +1,152 @@ +/* intl-compat.c - Stub functions to call gettext functions from GNU gettext library. */ + +/* Copyright (C) 1995, 2000-2003, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +/* This file redirects the gettext functions (without prefix) to those + defined in the included GNU libintl library (with "libintl_" prefix). + It is compiled into libintl in order to make the AM_GNU_GETTEXT test + of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which + has the redirections primarily in the include file. + It is also compiled into libgnuintl so that libgnuintl.so can be used + as LD_PRELOADable library on glibc systems, to provide the extra + features that the functions in the libc don't have (namely, logging). */ + + +#undef gettext +#undef dgettext +#undef dcgettext +#undef ngettext +#undef dngettext +#undef dcngettext +#undef textdomain +#undef bindtextdomain +#undef bind_textdomain_codeset + + +/* When building a DLL, we must export some functions. Note that because + the functions are only defined for binary backward compatibility, we + don't need to use __declspec(dllimport) in any case. */ +#if defined _MSC_VER && BUILDING_DLL +# define DLL_EXPORTED __declspec(dllexport) +#else +# define DLL_EXPORTED +#endif + + +DLL_EXPORTED +char * +gettext (msgid) + const char *msgid; +{ + return libintl_gettext (msgid); +} + + +DLL_EXPORTED +char * +dgettext (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return libintl_dgettext (domainname, msgid); +} + + +DLL_EXPORTED +char * +dcgettext (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ + return libintl_dcgettext (domainname, msgid, category); +} + + +DLL_EXPORTED +char * +ngettext (msgid1, msgid2, n) + const char *msgid1; + const char *msgid2; + unsigned long int n; +{ + return libintl_ngettext (msgid1, msgid2, n); +} + + +DLL_EXPORTED +char * +dngettext (domainname, msgid1, msgid2, n) + const char *domainname; + const char *msgid1; + const char *msgid2; + unsigned long int n; +{ + return libintl_dngettext (domainname, msgid1, msgid2, n); +} + + +DLL_EXPORTED +char * +dcngettext (domainname, msgid1, msgid2, n, category) + const char *domainname; + const char *msgid1; + const char *msgid2; + unsigned long int n; + int category; +{ + return libintl_dcngettext (domainname, msgid1, msgid2, n, category); +} + + +DLL_EXPORTED +char * +textdomain (domainname) + const char *domainname; +{ + return libintl_textdomain (domainname); +} + + +DLL_EXPORTED +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ + return libintl_bindtextdomain (domainname, dirname); +} + + +DLL_EXPORTED +char * +bind_textdomain_codeset (domainname, codeset) + const char *domainname; + const char *codeset; +{ + return libintl_bind_textdomain_codeset (domainname, codeset); +} diff --git a/bash-5.1/lib/intl/l10nflist.c b/bash-5.1/lib/intl/l10nflist.c new file mode 100644 index 0000000000000000000000000000000000000000..4ce284a2b9aa10862fd33d9aba4a2c7961c2850b --- /dev/null +++ b/bash-5.1/lib/intl/l10nflist.c @@ -0,0 +1,459 @@ +/* l10nflist.c - make localization file list. */ + +/* Copyright (C) 1995-1999, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Tell glibc's to provide a prototype for stpcpy(). + This must come before because may include + , and once has been included, it's too late. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#if defined _LIBC || defined HAVE_ARGZ_H +# include +#endif +#include +#include +#include + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# ifndef stpcpy +# define stpcpy(dest, src) __stpcpy(dest, src) +# endif +#else +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Pathname support. + ISSLASH(C) tests whether C is a directory separator character. + IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, + it may be concatenated to a directory pathname. + */ +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +# define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ + && (P)[1] == ':') +# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) +#else + /* Unix */ +# define ISSLASH(C) ((C) == '/') +# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) +#endif + +/* Define function which are usually not available. */ + +#if !defined _LIBC && !defined HAVE___ARGZ_COUNT +/* Returns the number of strings in ARGZ. */ +static size_t argz_count__ PARAMS ((const char *argz, size_t len)); + +static size_t +argz_count__ (argz, len) + const char *argz; + size_t len; +{ + size_t count = 0; + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len + 1; + len -= part_len + 1; + count++; + } + return count; +} +# undef __argz_count +# define __argz_count(argz, len) argz_count__ (argz, len) +#else +# ifdef _LIBC +# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) +# endif +#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ + +#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY +/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's + except the last into the character SEP. */ +static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); + +static void +argz_stringify__ (argz, len, sep) + char *argz; + size_t len; + int sep; +{ + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len; + len -= part_len + 1; + if (len > 0) + *argz++ = sep; + } +} +# undef __argz_stringify +# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) +#else +# ifdef _LIBC +# define __argz_stringify(argz, len, sep) \ + INTUSE(__argz_stringify) (argz, len, sep) +# endif +#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ + +#if !defined _LIBC && !defined HAVE___ARGZ_NEXT +static char *argz_next__ PARAMS ((char *argz, size_t argz_len, + const char *entry)); + +static char * +argz_next__ (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; +{ + if (entry) + { + if (entry < argz + argz_len) + entry = strchr (entry, '\0') + 1; + + return entry >= argz + argz_len ? NULL : (char *) entry; + } + else + if (argz_len > 0) + return argz; + else + return 0; +} +# undef __argz_next +# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) +#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ + + +/* Return number of bits set in X. */ +static int pop PARAMS ((int x)); + +static inline int +pop (x) + int x; +{ + /* We assume that no more than 16 bits are used. */ + x = ((x & ~0x5555) >> 1) + (x & 0x5555); + x = ((x & ~0x3333) >> 2) + (x & 0x3333); + x = ((x >> 4) + x) & 0x0f0f; + x = ((x >> 8) + x) & 0xff; + + return x; +} + + +struct loaded_l10nfile * +_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + territory, codeset, normalized_codeset, modifier, special, + sponsor, revision, filename, do_allocate) + struct loaded_l10nfile **l10nfile_list; + const char *dirlist; + size_t dirlist_len; + int mask; + const char *language; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *modifier; + const char *special; + const char *sponsor; + const char *revision; + const char *filename; + int do_allocate; +{ + char *abs_filename; + struct loaded_l10nfile **lastp; + struct loaded_l10nfile *retval; + char *cp; + size_t dirlist_count; + size_t entries; + int cnt; + + /* If LANGUAGE contains an absolute directory specification, we ignore + DIRLIST. */ + if (IS_ABSOLUTE_PATH (language)) + dirlist_len = 0; + + /* Allocate room for the full file name. */ + abs_filename = (char *) malloc (dirlist_len + + strlen (language) + + ((mask & TERRITORY) != 0 + ? strlen (territory) + 1 : 0) + + ((mask & XPG_CODESET) != 0 + ? strlen (codeset) + 1 : 0) + + ((mask & XPG_NORM_CODESET) != 0 + ? strlen (normalized_codeset) + 1 : 0) + + (((mask & XPG_MODIFIER) != 0 + || (mask & CEN_AUDIENCE) != 0) + ? strlen (modifier) + 1 : 0) + + ((mask & CEN_SPECIAL) != 0 + ? strlen (special) + 1 : 0) + + (((mask & CEN_SPONSOR) != 0 + || (mask & CEN_REVISION) != 0) + ? (1 + ((mask & CEN_SPONSOR) != 0 + ? strlen (sponsor) : 0) + + ((mask & CEN_REVISION) != 0 + ? strlen (revision) + 1 : 0)) : 0) + + 1 + strlen (filename) + 1); + + if (abs_filename == NULL) + return NULL; + + /* Construct file name. */ + cp = abs_filename; + if (dirlist_len > 0) + { + memcpy (cp, dirlist, dirlist_len); + __argz_stringify (cp, dirlist_len, PATH_SEPARATOR); + cp += dirlist_len; + cp[-1] = '/'; + } + + cp = stpcpy (cp, language); + + if ((mask & TERRITORY) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, territory); + } + if ((mask & XPG_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, codeset); + } + if ((mask & XPG_NORM_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, normalized_codeset); + } + if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) + { + /* This component can be part of both syntaxes but has different + leading characters. For CEN we use `+', else `@'. */ + *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; + cp = stpcpy (cp, modifier); + } + if ((mask & CEN_SPECIAL) != 0) + { + *cp++ = '+'; + cp = stpcpy (cp, special); + } + if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) + { + *cp++ = ','; + if ((mask & CEN_SPONSOR) != 0) + cp = stpcpy (cp, sponsor); + if ((mask & CEN_REVISION) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, revision); + } + } + + *cp++ = '/'; + stpcpy (cp, filename); + + /* Look in list of already loaded domains whether it is already + available. */ + lastp = l10nfile_list; + for (retval = *l10nfile_list; retval != NULL; retval = retval->next) + if (retval->filename != NULL) + { + int compare = strcmp (retval->filename, abs_filename); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It's not in the list. */ + retval = NULL; + break; + } + + lastp = &retval->next; + } + + if (retval != NULL || do_allocate == 0) + { + free (abs_filename); + return retval; + } + + dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1); + + /* Allocate a new loaded_l10nfile. */ + retval = + (struct loaded_l10nfile *) + malloc (sizeof (*retval) + + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0)) + * sizeof (struct loaded_l10nfile *))); + if (retval == NULL) + { + free (abs_filename); + return NULL; + } + + retval->filename = abs_filename; + + /* We set retval->data to NULL here; it is filled in later. + Setting retval->decided to 1 here means that retval does not + correspond to a real file (dirlist_count > 1) or is not worth + looking up (if an unnormalized codeset was specified). */ + retval->decided = (dirlist_count > 1 + || ((mask & XPG_CODESET) != 0 + && (mask & XPG_NORM_CODESET) != 0)); + retval->data = NULL; + + retval->next = *lastp; + *lastp = retval; + + entries = 0; + /* Recurse to fill the inheritance list of RETVAL. + If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL + entry does not correspond to a real file; retval->filename contains + colons. In this case we loop across all elements of DIRLIST and + across all bit patterns dominated by MASK. + If the DIRLIST is a single directory or entirely redundant (i.e. + DIRLIST_COUNT == 1), we loop across all bit patterns dominated by + MASK, excluding MASK itself. + In either case, we loop down from MASK to 0. This has the effect + that the extra bits in the locale name are dropped in this order: + first the modifier, then the territory, then the codeset, then the + normalized_codeset. */ + for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt) + if ((cnt & ~mask) == 0 + && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) + && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) + { + if (dirlist_count > 1) + { + /* Iterate over all elements of the DIRLIST. */ + char *dir = NULL; + + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) + != NULL) + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, + cnt, language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + else + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, + cnt, language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + retval->successor[entries] = NULL; + + return retval; +} + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. The return value is dynamically allocated and has to be + freed by the caller. */ +const char * +_nl_normalize_codeset (codeset, name_len) + const char *codeset; + size_t name_len; +{ + int len = 0; + int only_digit = 1; + char *retval; + char *wp; + size_t cnt; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalnum ((unsigned char) codeset[cnt])) + { + ++len; + + if (isalpha ((unsigned char) codeset[cnt])) + only_digit = 0; + } + + retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); + + if (retval != NULL) + { + if (only_digit) + wp = stpcpy (retval, "iso"); + else + wp = retval; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalpha ((unsigned char) codeset[cnt])) + *wp++ = tolower ((unsigned char) codeset[cnt]); + else if (isdigit ((unsigned char) codeset[cnt])) + *wp++ = codeset[cnt]; + + *wp = '\0'; + } + + return (const char *) retval; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/bash-5.1/lib/intl/libgnuintl.h.in b/bash-5.1/lib/intl/libgnuintl.h.in new file mode 100644 index 0000000000000000000000000000000000000000..14f9cf9728699183055034f456813d589e9ced81 --- /dev/null +++ b/bash-5.1/lib/intl/libgnuintl.h.in @@ -0,0 +1,311 @@ +/* libgnuintl.h - Message catalogs for internationalization. */ + +/* Copyright (C) 1995-1997, 2000-2003, 2004-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +#include + +/* The LC_MESSAGES locale category is the category used by the functions + gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. + On systems that don't define it, use an arbitrary value instead. + On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) + then includes (i.e. this file!) and then only defines + LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES + in this case. */ +#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) +# define LC_MESSAGES 1729 +#endif + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +/* Provide information about the supported file formats. Returns the + maximum minor revision number supported for a given major revision. */ +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ + ((major) == 0 ? 1 : -1) + +/* Resolve a platform specific conflict on DJGPP. GNU gettext takes + precedence over _conio_gettext. */ +#ifdef __DJGPP__ +# undef gettext +#endif + +/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers + used by programs. Similarly, test __PROTOTYPES, not PROTOTYPES. */ +#ifndef _INTL_PARAMS +# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES +# define _INTL_PARAMS(args) args +# else +# define _INTL_PARAMS(args) () +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +/* We redirect the functions to those prefixed with "libintl_". This is + necessary, because some systems define gettext/textdomain/... in the C + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). + If we used the unprefixed names, there would be cases where the + definition in the C library would override the one in the libintl.so + shared library. Recall that on ELF systems, the symbols are looked + up in the following order: + 1. in the executable, + 2. in the shared libraries specified on the link command line, in order, + 3. in the dependencies of the shared libraries specified on the link + command line, + 4. in the dlopen()ed shared libraries, in the order in which they were + dlopen()ed. + The definition in the C library would override the one in libintl.so if + either + * -lc is given on the link command line and -lintl isn't, or + * -lc is given on the link command line before -lintl, or + * libintl.so is a dependency of a dlopen()ed shared library but not + linked to the executable at link time. + Since Solaris gettext() behaves differently than GNU gettext(), this + would be unacceptable. + + The redirection happens by default through macros in C, so that &gettext + is independent of the compilation unit, but through inline functions in + C++, in order not to interfere with the name mangling of class fields or + class methods called 'gettext'. */ + +/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. + If he doesn't, we choose the method. A third possible method is + _INTL_REDIRECT_ASM, supported only by GCC. */ +#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) +# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus) +# define _INTL_REDIRECT_ASM +# else +# ifdef __cplusplus +# define _INTL_REDIRECT_INLINE +# else +# define _INTL_REDIRECT_MACROS +# endif +# endif +#endif +/* Auxiliary macros. */ +#ifdef _INTL_REDIRECT_ASM +# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) +# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring +# define _INTL_STRINGIFY(prefix) #prefix +#else +# define _INTL_ASM(cname) +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_gettext (const char *__msgid); +static inline char *gettext (const char *__msgid) +{ + return libintl_gettext (__msgid); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +#endif +extern char *gettext _INTL_PARAMS ((const char *__msgid)) + _INTL_ASM (libintl_gettext); +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dgettext (const char *__domainname, const char *__msgid); +static inline char *dgettext (const char *__domainname, const char *__msgid) +{ + return libintl_dgettext (__domainname, __msgid); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +#endif +extern char *dgettext _INTL_PARAMS ((const char *__domainname, + const char *__msgid)) + _INTL_ASM (libintl_dgettext); +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, + int __category); +static inline char *dcgettext (const char *__domainname, const char *__msgid, + int __category) +{ + return libintl_dcgettext (__domainname, __msgid, __category); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +#endif +extern char *dcgettext _INTL_PARAMS ((const char *__domainname, + const char *__msgid, + int __category)) + _INTL_ASM (libintl_dcgettext); +#endif + + +/* Similar to `gettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n); +static inline char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) +{ + return libintl_ngettext (__msgid1, __msgid2, __n); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +#endif +extern char *ngettext _INTL_PARAMS ((const char *__msgid1, + const char *__msgid2, + unsigned long int __n)) + _INTL_ASM (libintl_ngettext); +#endif + +/* Similar to `dgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n); +static inline char *dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) +{ + return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +#endif +extern char *dngettext _INTL_PARAMS ((const char *__domainname, + const char *__msgid1, + const char *__msgid2, + unsigned long int __n)) + _INTL_ASM (libintl_dngettext); +#endif + +/* Similar to `dcgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category); +static inline char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) +{ + return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +#endif +extern char *dcngettext _INTL_PARAMS ((const char *__domainname, + const char *__msgid1, + const char *__msgid2, + unsigned long int __n, + int __category)) + _INTL_ASM (libintl_dcngettext); +#endif + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_textdomain (const char *__domainname); +static inline char *textdomain (const char *__domainname) +{ + return libintl_textdomain (__domainname); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +#endif +extern char *textdomain _INTL_PARAMS ((const char *__domainname)) + _INTL_ASM (libintl_textdomain); +#endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bindtextdomain (const char *__domainname, + const char *__dirname); +static inline char *bindtextdomain (const char *__domainname, + const char *__dirname) +{ + return libintl_bindtextdomain (__domainname, __dirname); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +#endif +extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname, + const char *__dirname)) + _INTL_ASM (libintl_bindtextdomain); +#endif + +/* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bind_textdomain_codeset (const char *__domainname, + const char *__codeset); +static inline char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) +{ + return libintl_bind_textdomain_codeset (__domainname, __codeset); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +#endif +extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname, + const char *__codeset)) + _INTL_ASM (libintl_bind_textdomain_codeset); +#endif + + +/* Support for relocatable packages. */ + +/* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +#define libintl_set_relocation_prefix libintl_set_relocation_prefix +extern void + libintl_set_relocation_prefix _INTL_PARAMS ((const char *orig_prefix, + const char *curr_prefix)); + + +#ifdef __cplusplus +} +#endif + +#endif /* libintl.h */ diff --git a/bash-5.1/lib/intl/loadinfo.h b/bash-5.1/lib/intl/loadinfo.h new file mode 100644 index 0000000000000000000000000000000000000000..d06a2773fc72600f8c1fe62555de949e9a5ff73c --- /dev/null +++ b/bash-5.1/lib/intl/loadinfo.h @@ -0,0 +1,159 @@ +/* loadinfo.c */ + +/* Copyright (C) 1996-1999, 2000-2002, 2005-2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _LOADINFO_H +#define _LOADINFO_H 1 + +/* Declarations of locale dependent catalog lookup functions. + Implemented in + + localealias.c Possibly replace a locale name by another. + explodename.c Split a locale name into its various fields. + l10nflist.c Generate a list of filenames of possible message catalogs. + finddomain.c Find and open the relevant message catalogs. + + The main function _nl_find_domain() in finddomain.c is declared + in gettextP.h. + */ + +#ifndef PARAMS +# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef internal_function +# define internal_function +#endif + +/* Tell the compiler when a conditional or integer expression is + almost always true or almost always false. */ +#ifndef HAVE_BUILTIN_EXPECT +# define __builtin_expect(expr, val) (expr) +#endif + +/* Separator in PATH like lists of pathnames. */ +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ +# define PATH_SEPARATOR ';' +#else + /* Unix */ +# define PATH_SEPARATOR ':' +#endif + +/* Encoding of locale name parts. */ +#define CEN_REVISION 1 +#define CEN_SPONSOR 2 +#define CEN_SPECIAL 4 +#define XPG_NORM_CODESET 8 +#define XPG_CODESET 16 +#define TERRITORY 32 +#define CEN_AUDIENCE 64 +#define XPG_MODIFIER 128 + +#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) +#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) + + +struct loaded_l10nfile +{ + const char *filename; + int decided; + + const void *data; + + struct loaded_l10nfile *next; + struct loaded_l10nfile *successor[1]; +}; + + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. The return value is dynamically allocated and has to be + freed by the caller. */ +extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, + size_t name_len)); + +/* Lookup a locale dependent file. + *L10NFILE_LIST denotes a pool of lookup results of locale dependent + files of the same kind, sorted in decreasing order of ->filename. + DIRLIST and DIRLIST_LEN are an argz list of directories in which to + look, containing at least one directory (i.e. DIRLIST_LEN > 0). + MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER, + SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as + produced by _nl_explode_name(). FILENAME is the filename suffix. + The return value is the lookup result, either found in *L10NFILE_LIST, + or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL. + If the return value is non-NULL, it is added to *L10NFILE_LIST, and + its ->next field denotes the chaining inside *L10NFILE_LIST, and + furthermore its ->successor[] field contains a list of other lookup + results from which this lookup result inherits. */ +extern struct loaded_l10nfile * +_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, int mask, + const char *language, const char *territory, + const char *codeset, + const char *normalized_codeset, + const char *modifier, const char *special, + const char *sponsor, const char *revision, + const char *filename, int do_allocate)); + +/* Lookup the real locale name for a locale alias NAME, or NULL if + NAME is not a locale alias (but possibly a real locale name). + The return value is statically allocated and must not be freed. */ +extern const char *_nl_expand_alias PARAMS ((const char *name)); + +/* Split a locale name NAME into its pieces: language, modifier, + territory, codeset, special, sponsor, revision. + NAME gets destructively modified: NUL bytes are inserted here and + there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY, + *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a + pointer into the old NAME string, or NULL. *NORMALIZED_CODESET + gets assigned the expanded *CODESET, if it is different from *CODESET; + this one is dynamically allocated and has to be freed by the caller. + The return value is a bitmask, where each bit corresponds to one + filled-in value: + XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER, + TERRITORY for *TERRITORY, + XPG_CODESET for *CODESET, + XPG_NORM_CODESET for *NORMALIZED_CODESET, + CEN_SPECIAL for *SPECIAL, + CEN_SPONSOR for *SPONSOR, + CEN_REVISION for *REVISION. + */ +extern int _nl_explode_name PARAMS ((char *name, const char **language, + const char **modifier, + const char **territory, + const char **codeset, + const char **normalized_codeset, + const char **special, + const char **sponsor, + const char **revision)); + +/* Split a locale name NAME into a leading language part and all the + rest. Return a pointer to the first character after the language, + i.e. to the first byte of the rest. */ +extern char *_nl_find_language PARAMS ((const char *name)); + +#endif /* loadinfo.h */ diff --git a/bash-5.1/lib/intl/loadmsgcat.c b/bash-5.1/lib/intl/loadmsgcat.c new file mode 100644 index 0000000000000000000000000000000000000000..adbd7b4fe59f09e1b6b5feb97baf4096e0d474d9 --- /dev/null +++ b/bash-5.1/lib/intl/loadmsgcat.c @@ -0,0 +1,1336 @@ +/* loadmsgcat.c - Load needed message catalogs. */ + +/* Copyright (C) 1995-1999, 2000-2003, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Tell glibc's to provide a prototype for mempcpy(). + This must come before because may include + , and once has been included, it's too late. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include + +#ifdef __GNUC__ +# undef alloca +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +#include +#include + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#ifdef _LIBC +# include +# include +#endif + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || (defined _LIBC && defined _POSIX_MAPPED_FILES) +# include +# undef HAVE_MMAP +# define HAVE_MMAP 1 +#else +# undef HAVE_MMAP +#endif + +#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC +# include +#endif +#if defined HAVE_INTTYPES_H || defined _LIBC +# include +#endif + +#include "gmo.h" +#include "gettextP.h" +#include "hash-string.h" +#include "plural-exp.h" + +#ifdef _LIBC +# include "../locale/localeinfo.h" +#endif + +/* Provide fallback values for macros that ought to be defined in . + Note that our fallback values need not be literal strings, because we don't + use them with preprocessor string concatenation. */ +#if !defined PRId8 || PRI_MACROS_BROKEN +# undef PRId8 +# define PRId8 "d" +#endif +#if !defined PRIi8 || PRI_MACROS_BROKEN +# undef PRIi8 +# define PRIi8 "i" +#endif +#if !defined PRIo8 || PRI_MACROS_BROKEN +# undef PRIo8 +# define PRIo8 "o" +#endif +#if !defined PRIu8 || PRI_MACROS_BROKEN +# undef PRIu8 +# define PRIu8 "u" +#endif +#if !defined PRIx8 || PRI_MACROS_BROKEN +# undef PRIx8 +# define PRIx8 "x" +#endif +#if !defined PRIX8 || PRI_MACROS_BROKEN +# undef PRIX8 +# define PRIX8 "X" +#endif +#if !defined PRId16 || PRI_MACROS_BROKEN +# undef PRId16 +# define PRId16 "d" +#endif +#if !defined PRIi16 || PRI_MACROS_BROKEN +# undef PRIi16 +# define PRIi16 "i" +#endif +#if !defined PRIo16 || PRI_MACROS_BROKEN +# undef PRIo16 +# define PRIo16 "o" +#endif +#if !defined PRIu16 || PRI_MACROS_BROKEN +# undef PRIu16 +# define PRIu16 "u" +#endif +#if !defined PRIx16 || PRI_MACROS_BROKEN +# undef PRIx16 +# define PRIx16 "x" +#endif +#if !defined PRIX16 || PRI_MACROS_BROKEN +# undef PRIX16 +# define PRIX16 "X" +#endif +#if !defined PRId32 || PRI_MACROS_BROKEN +# undef PRId32 +# define PRId32 "d" +#endif +#if !defined PRIi32 || PRI_MACROS_BROKEN +# undef PRIi32 +# define PRIi32 "i" +#endif +#if !defined PRIo32 || PRI_MACROS_BROKEN +# undef PRIo32 +# define PRIo32 "o" +#endif +#if !defined PRIu32 || PRI_MACROS_BROKEN +# undef PRIu32 +# define PRIu32 "u" +#endif +#if !defined PRIx32 || PRI_MACROS_BROKEN +# undef PRIx32 +# define PRIx32 "x" +#endif +#if !defined PRIX32 || PRI_MACROS_BROKEN +# undef PRIX32 +# define PRIX32 "X" +#endif +#if !defined PRId64 || PRI_MACROS_BROKEN +# undef PRId64 +# define PRId64 (sizeof (long) == 8 ? "ld" : "lld") +#endif +#if !defined PRIi64 || PRI_MACROS_BROKEN +# undef PRIi64 +# define PRIi64 (sizeof (long) == 8 ? "li" : "lli") +#endif +#if !defined PRIo64 || PRI_MACROS_BROKEN +# undef PRIo64 +# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo") +#endif +#if !defined PRIu64 || PRI_MACROS_BROKEN +# undef PRIu64 +# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu") +#endif +#if !defined PRIx64 || PRI_MACROS_BROKEN +# undef PRIx64 +# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx") +#endif +#if !defined PRIX64 || PRI_MACROS_BROKEN +# undef PRIX64 +# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX") +#endif +#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN +# undef PRIdLEAST8 +# define PRIdLEAST8 "d" +#endif +#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN +# undef PRIiLEAST8 +# define PRIiLEAST8 "i" +#endif +#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN +# undef PRIoLEAST8 +# define PRIoLEAST8 "o" +#endif +#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN +# undef PRIuLEAST8 +# define PRIuLEAST8 "u" +#endif +#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN +# undef PRIxLEAST8 +# define PRIxLEAST8 "x" +#endif +#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN +# undef PRIXLEAST8 +# define PRIXLEAST8 "X" +#endif +#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN +# undef PRIdLEAST16 +# define PRIdLEAST16 "d" +#endif +#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN +# undef PRIiLEAST16 +# define PRIiLEAST16 "i" +#endif +#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN +# undef PRIoLEAST16 +# define PRIoLEAST16 "o" +#endif +#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN +# undef PRIuLEAST16 +# define PRIuLEAST16 "u" +#endif +#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN +# undef PRIxLEAST16 +# define PRIxLEAST16 "x" +#endif +#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN +# undef PRIXLEAST16 +# define PRIXLEAST16 "X" +#endif +#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN +# undef PRIdLEAST32 +# define PRIdLEAST32 "d" +#endif +#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN +# undef PRIiLEAST32 +# define PRIiLEAST32 "i" +#endif +#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN +# undef PRIoLEAST32 +# define PRIoLEAST32 "o" +#endif +#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN +# undef PRIuLEAST32 +# define PRIuLEAST32 "u" +#endif +#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN +# undef PRIxLEAST32 +# define PRIxLEAST32 "x" +#endif +#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN +# undef PRIXLEAST32 +# define PRIXLEAST32 "X" +#endif +#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN +# undef PRIdLEAST64 +# define PRIdLEAST64 PRId64 +#endif +#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN +# undef PRIiLEAST64 +# define PRIiLEAST64 PRIi64 +#endif +#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN +# undef PRIoLEAST64 +# define PRIoLEAST64 PRIo64 +#endif +#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN +# undef PRIuLEAST64 +# define PRIuLEAST64 PRIu64 +#endif +#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN +# undef PRIxLEAST64 +# define PRIxLEAST64 PRIx64 +#endif +#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN +# undef PRIXLEAST64 +# define PRIXLEAST64 PRIX64 +#endif +#if !defined PRIdFAST8 || PRI_MACROS_BROKEN +# undef PRIdFAST8 +# define PRIdFAST8 "d" +#endif +#if !defined PRIiFAST8 || PRI_MACROS_BROKEN +# undef PRIiFAST8 +# define PRIiFAST8 "i" +#endif +#if !defined PRIoFAST8 || PRI_MACROS_BROKEN +# undef PRIoFAST8 +# define PRIoFAST8 "o" +#endif +#if !defined PRIuFAST8 || PRI_MACROS_BROKEN +# undef PRIuFAST8 +# define PRIuFAST8 "u" +#endif +#if !defined PRIxFAST8 || PRI_MACROS_BROKEN +# undef PRIxFAST8 +# define PRIxFAST8 "x" +#endif +#if !defined PRIXFAST8 || PRI_MACROS_BROKEN +# undef PRIXFAST8 +# define PRIXFAST8 "X" +#endif +#if !defined PRIdFAST16 || PRI_MACROS_BROKEN +# undef PRIdFAST16 +# define PRIdFAST16 "d" +#endif +#if !defined PRIiFAST16 || PRI_MACROS_BROKEN +# undef PRIiFAST16 +# define PRIiFAST16 "i" +#endif +#if !defined PRIoFAST16 || PRI_MACROS_BROKEN +# undef PRIoFAST16 +# define PRIoFAST16 "o" +#endif +#if !defined PRIuFAST16 || PRI_MACROS_BROKEN +# undef PRIuFAST16 +# define PRIuFAST16 "u" +#endif +#if !defined PRIxFAST16 || PRI_MACROS_BROKEN +# undef PRIxFAST16 +# define PRIxFAST16 "x" +#endif +#if !defined PRIXFAST16 || PRI_MACROS_BROKEN +# undef PRIXFAST16 +# define PRIXFAST16 "X" +#endif +#if !defined PRIdFAST32 || PRI_MACROS_BROKEN +# undef PRIdFAST32 +# define PRIdFAST32 "d" +#endif +#if !defined PRIiFAST32 || PRI_MACROS_BROKEN +# undef PRIiFAST32 +# define PRIiFAST32 "i" +#endif +#if !defined PRIoFAST32 || PRI_MACROS_BROKEN +# undef PRIoFAST32 +# define PRIoFAST32 "o" +#endif +#if !defined PRIuFAST32 || PRI_MACROS_BROKEN +# undef PRIuFAST32 +# define PRIuFAST32 "u" +#endif +#if !defined PRIxFAST32 || PRI_MACROS_BROKEN +# undef PRIxFAST32 +# define PRIxFAST32 "x" +#endif +#if !defined PRIXFAST32 || PRI_MACROS_BROKEN +# undef PRIXFAST32 +# define PRIXFAST32 "X" +#endif +#if !defined PRIdFAST64 || PRI_MACROS_BROKEN +# undef PRIdFAST64 +# define PRIdFAST64 PRId64 +#endif +#if !defined PRIiFAST64 || PRI_MACROS_BROKEN +# undef PRIiFAST64 +# define PRIiFAST64 PRIi64 +#endif +#if !defined PRIoFAST64 || PRI_MACROS_BROKEN +# undef PRIoFAST64 +# define PRIoFAST64 PRIo64 +#endif +#if !defined PRIuFAST64 || PRI_MACROS_BROKEN +# undef PRIuFAST64 +# define PRIuFAST64 PRIu64 +#endif +#if !defined PRIxFAST64 || PRI_MACROS_BROKEN +# undef PRIxFAST64 +# define PRIxFAST64 PRIx64 +#endif +#if !defined PRIXFAST64 || PRI_MACROS_BROKEN +# undef PRIXFAST64 +# define PRIXFAST64 PRIX64 +#endif +#if !defined PRIdMAX || PRI_MACROS_BROKEN +# undef PRIdMAX +# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld") +#endif +#if !defined PRIiMAX || PRI_MACROS_BROKEN +# undef PRIiMAX +# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli") +#endif +#if !defined PRIoMAX || PRI_MACROS_BROKEN +# undef PRIoMAX +# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo") +#endif +#if !defined PRIuMAX || PRI_MACROS_BROKEN +# undef PRIuMAX +# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu") +#endif +#if !defined PRIxMAX || PRI_MACROS_BROKEN +# undef PRIxMAX +# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx") +#endif +#if !defined PRIXMAX || PRI_MACROS_BROKEN +# undef PRIXMAX +# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX") +#endif +#if !defined PRIdPTR || PRI_MACROS_BROKEN +# undef PRIdPTR +# define PRIdPTR \ + (sizeof (void *) == sizeof (long) ? "ld" : \ + sizeof (void *) == sizeof (int) ? "d" : \ + "lld") +#endif +#if !defined PRIiPTR || PRI_MACROS_BROKEN +# undef PRIiPTR +# define PRIiPTR \ + (sizeof (void *) == sizeof (long) ? "li" : \ + sizeof (void *) == sizeof (int) ? "i" : \ + "lli") +#endif +#if !defined PRIoPTR || PRI_MACROS_BROKEN +# undef PRIoPTR +# define PRIoPTR \ + (sizeof (void *) == sizeof (long) ? "lo" : \ + sizeof (void *) == sizeof (int) ? "o" : \ + "llo") +#endif +#if !defined PRIuPTR || PRI_MACROS_BROKEN +# undef PRIuPTR +# define PRIuPTR \ + (sizeof (void *) == sizeof (long) ? "lu" : \ + sizeof (void *) == sizeof (int) ? "u" : \ + "llu") +#endif +#if !defined PRIxPTR || PRI_MACROS_BROKEN +# undef PRIxPTR +# define PRIxPTR \ + (sizeof (void *) == sizeof (long) ? "lx" : \ + sizeof (void *) == sizeof (int) ? "x" : \ + "llx") +#endif +#if !defined PRIXPTR || PRI_MACROS_BROKEN +# undef PRIXPTR +# define PRIXPTR \ + (sizeof (void *) == sizeof (long) ? "lX" : \ + sizeof (void *) == sizeof (int) ? "X" : \ + "llX") +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ISO C functions. This is required by the standard + because some ISO C functions will require linking with this object + file and the name space must not be polluted. */ +# define open __open +# define close __close +# define read __read +# define mmap __mmap +# define munmap __munmap +#endif + +/* For those losing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +# define freea(p) /* nothing */ +#else +# define alloca(n) malloc (n) +# define freea(p) free (p) +#endif + +/* For systems that distinguish between text and binary I/O. + O_BINARY is usually declared in . */ +#if !defined O_BINARY && defined _O_BINARY + /* For MSC-compatible compilers. */ +# define O_BINARY _O_BINARY +# define O_TEXT _O_TEXT +#endif +#ifdef __BEOS__ + /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ +# undef O_BINARY +# undef O_TEXT +#endif +/* On reasonable systems, binary I/O is the default. */ +#ifndef O_BINARY +# define O_BINARY 0 +#endif + + +/* Prototypes for local functions. Needed to ensure compiler checking of + function argument counts despite of K&R C function definition syntax. */ +static const char *get_sysdep_segment_value PARAMS ((const char *name)); + + +/* We need a sign, whether a new catalog was loaded, which can be associated + with all translations. This is important if the translations are + cached by one of GCC's features. */ +int _nl_msg_cat_cntr; + + +/* Expand a system dependent string segment. Return NULL if unsupported. */ +static const char * +get_sysdep_segment_value (name) + const char *name; +{ + /* Test for an ISO C 99 section 7.8.1 format string directive. + Syntax: + P R I { d | i | o | u | x | X } + { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */ + /* We don't use a table of 14 times 6 'const char *' strings here, because + data relocations cost startup time. */ + if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I') + { + if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u' + || name[3] == 'x' || name[3] == 'X') + { + if (name[4] == '8' && name[5] == '\0') + { + if (name[3] == 'd') + return PRId8; + if (name[3] == 'i') + return PRIi8; + if (name[3] == 'o') + return PRIo8; + if (name[3] == 'u') + return PRIu8; + if (name[3] == 'x') + return PRIx8; + if (name[3] == 'X') + return PRIX8; + abort (); + } + if (name[4] == '1' && name[5] == '6' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId16; + if (name[3] == 'i') + return PRIi16; + if (name[3] == 'o') + return PRIo16; + if (name[3] == 'u') + return PRIu16; + if (name[3] == 'x') + return PRIx16; + if (name[3] == 'X') + return PRIX16; + abort (); + } + if (name[4] == '3' && name[5] == '2' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId32; + if (name[3] == 'i') + return PRIi32; + if (name[3] == 'o') + return PRIo32; + if (name[3] == 'u') + return PRIu32; + if (name[3] == 'x') + return PRIx32; + if (name[3] == 'X') + return PRIX32; + abort (); + } + if (name[4] == '6' && name[5] == '4' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId64; + if (name[3] == 'i') + return PRIi64; + if (name[3] == 'o') + return PRIo64; + if (name[3] == 'u') + return PRIu64; + if (name[3] == 'x') + return PRIx64; + if (name[3] == 'X') + return PRIX64; + abort (); + } + if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A' + && name[7] == 'S' && name[8] == 'T') + { + if (name[9] == '8' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST8; + if (name[3] == 'i') + return PRIiLEAST8; + if (name[3] == 'o') + return PRIoLEAST8; + if (name[3] == 'u') + return PRIuLEAST8; + if (name[3] == 'x') + return PRIxLEAST8; + if (name[3] == 'X') + return PRIXLEAST8; + abort (); + } + if (name[9] == '1' && name[10] == '6' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST16; + if (name[3] == 'i') + return PRIiLEAST16; + if (name[3] == 'o') + return PRIoLEAST16; + if (name[3] == 'u') + return PRIuLEAST16; + if (name[3] == 'x') + return PRIxLEAST16; + if (name[3] == 'X') + return PRIXLEAST16; + abort (); + } + if (name[9] == '3' && name[10] == '2' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST32; + if (name[3] == 'i') + return PRIiLEAST32; + if (name[3] == 'o') + return PRIoLEAST32; + if (name[3] == 'u') + return PRIuLEAST32; + if (name[3] == 'x') + return PRIxLEAST32; + if (name[3] == 'X') + return PRIXLEAST32; + abort (); + } + if (name[9] == '6' && name[10] == '4' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST64; + if (name[3] == 'i') + return PRIiLEAST64; + if (name[3] == 'o') + return PRIoLEAST64; + if (name[3] == 'u') + return PRIuLEAST64; + if (name[3] == 'x') + return PRIxLEAST64; + if (name[3] == 'X') + return PRIXLEAST64; + abort (); + } + } + if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S' + && name[7] == 'T') + { + if (name[8] == '8' && name[9] == '\0') + { + if (name[3] == 'd') + return PRIdFAST8; + if (name[3] == 'i') + return PRIiFAST8; + if (name[3] == 'o') + return PRIoFAST8; + if (name[3] == 'u') + return PRIuFAST8; + if (name[3] == 'x') + return PRIxFAST8; + if (name[3] == 'X') + return PRIXFAST8; + abort (); + } + if (name[8] == '1' && name[9] == '6' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST16; + if (name[3] == 'i') + return PRIiFAST16; + if (name[3] == 'o') + return PRIoFAST16; + if (name[3] == 'u') + return PRIuFAST16; + if (name[3] == 'x') + return PRIxFAST16; + if (name[3] == 'X') + return PRIXFAST16; + abort (); + } + if (name[8] == '3' && name[9] == '2' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST32; + if (name[3] == 'i') + return PRIiFAST32; + if (name[3] == 'o') + return PRIoFAST32; + if (name[3] == 'u') + return PRIuFAST32; + if (name[3] == 'x') + return PRIxFAST32; + if (name[3] == 'X') + return PRIXFAST32; + abort (); + } + if (name[8] == '6' && name[9] == '4' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST64; + if (name[3] == 'i') + return PRIiFAST64; + if (name[3] == 'o') + return PRIoFAST64; + if (name[3] == 'u') + return PRIuFAST64; + if (name[3] == 'x') + return PRIxFAST64; + if (name[3] == 'X') + return PRIXFAST64; + abort (); + } + } + if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X' + && name[7] == '\0') + { + if (name[3] == 'd') + return PRIdMAX; + if (name[3] == 'i') + return PRIiMAX; + if (name[3] == 'o') + return PRIoMAX; + if (name[3] == 'u') + return PRIuMAX; + if (name[3] == 'x') + return PRIxMAX; + if (name[3] == 'X') + return PRIXMAX; + abort (); + } + if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R' + && name[7] == '\0') + { + if (name[3] == 'd') + return PRIdPTR; + if (name[3] == 'i') + return PRIiPTR; + if (name[3] == 'o') + return PRIoPTR; + if (name[3] == 'u') + return PRIuPTR; + if (name[3] == 'x') + return PRIxPTR; + if (name[3] == 'X') + return PRIXPTR; + abort (); + } + } + } + /* Other system dependent strings are not valid. */ + return NULL; +} + +/* Initialize the codeset dependent parts of an opened message catalog. + Return the header entry. */ +const char * +internal_function +_nl_init_domain_conv (domain_file, domain, domainbinding) + struct loaded_l10nfile *domain_file; + struct loaded_domain *domain; + struct binding *domainbinding; +{ + /* Find out about the character set the file is encoded with. + This can be found (in textual form) in the entry "". If this + entry does not exist or if this does not contain the `charset=' + information, we will assume the charset matches the one the + current locale and we don't have to perform any conversion. */ + char *nullentry; + size_t nullentrylen; + + /* Preinitialize fields, to avoid recursion during _nl_find_msg. */ + domain->codeset_cntr = + (domainbinding != NULL ? domainbinding->codeset_cntr : 0); +#ifdef _LIBC + domain->conv = (__gconv_t) -1; +#else +# if HAVE_ICONV + domain->conv = (iconv_t) -1; +# endif +#endif + domain->conv_tab = NULL; + + /* Get the header entry. */ + nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen); + + if (nullentry != NULL) + { +#if defined _LIBC || HAVE_ICONV + const char *charsetstr; + + charsetstr = strstr (nullentry, "charset="); + if (charsetstr != NULL) + { + size_t len; + char *charset; + const char *outcharset; + + charsetstr += strlen ("charset="); + len = strcspn (charsetstr, " \t\n"); + + charset = (char *) alloca (len + 1); +# if defined _LIBC || HAVE_MEMPCPY + *((char *) mempcpy (charset, charsetstr, len)) = '\0'; +# else + memcpy (charset, charsetstr, len); + charset[len] = '\0'; +# endif + + /* The output charset should normally be determined by the + locale. But sometimes the locale is not used or not correctly + set up, so we provide a possibility for the user to override + this. Moreover, the value specified through + bind_textdomain_codeset overrides both. */ + if (domainbinding != NULL && domainbinding->codeset != NULL) + outcharset = domainbinding->codeset; + else + { + outcharset = getenv ("OUTPUT_CHARSET"); + if (outcharset == NULL || outcharset[0] == '\0') + { +# ifdef _LIBC + outcharset = _NL_CURRENT (LC_CTYPE, CODESET); +# else +# if HAVE_ICONV + extern const char *locale_charset PARAMS ((void)); + outcharset = locale_charset (); +# endif +# endif + } + } + +# ifdef _LIBC + /* We always want to use transliteration. */ + outcharset = norm_add_slashes (outcharset, "TRANSLIT"); + charset = norm_add_slashes (charset, NULL); + if (__gconv_open (outcharset, charset, &domain->conv, + GCONV_AVOID_NOCONV) + != __GCONV_OK) + domain->conv = (__gconv_t) -1; +# else +# if HAVE_ICONV + /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5, + we want to use transliteration. */ +# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \ + || _LIBICONV_VERSION >= 0x0105 + if (strchr (outcharset, '/') == NULL) + { + char *tmp; + + len = strlen (outcharset); + tmp = (char *) alloca (len + 10 + 1); + memcpy (tmp, outcharset, len); + memcpy (tmp + len, "//TRANSLIT", 10 + 1); + outcharset = tmp; + + domain->conv = iconv_open (outcharset, charset); + + freea (outcharset); + } + else +# endif + domain->conv = iconv_open (outcharset, charset); +# endif +# endif + + freea (charset); + } +#endif /* _LIBC || HAVE_ICONV */ + } + + return nullentry; +} + +/* Frees the codeset dependent parts of an opened message catalog. */ +void +internal_function +_nl_free_domain_conv (domain) + struct loaded_domain *domain; +{ + if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) + free (domain->conv_tab); + +#ifdef _LIBC + if (domain->conv != (__gconv_t) -1) + __gconv_close (domain->conv); +#else +# if HAVE_ICONV + if (domain->conv != (iconv_t) -1) + iconv_close (domain->conv); +# endif +#endif +} + +/* Load the message catalogs specified by FILENAME. If it is no valid + message catalog do nothing. */ +void +internal_function +_nl_load_domain (domain_file, domainbinding) + struct loaded_l10nfile *domain_file; + struct binding *domainbinding; +{ + int fd; + size_t size; +#ifdef _LIBC + struct stat64 st; +#else + struct stat st; +#endif + struct mo_file_header *data = (struct mo_file_header *) -1; + int use_mmap = 0; + struct loaded_domain *domain; + int revision; + const char *nullentry; + + domain_file->decided = 1; + domain_file->data = NULL; + + /* Note that it would be useless to store domainbinding in domain_file + because domainbinding might be == NULL now but != NULL later (after + a call to bind_textdomain_codeset). */ + + /* If the record does not represent a valid locale the FILENAME + might be NULL. This can happen when according to the given + specification the locale file name is different for XPG and CEN + syntax. */ + if (domain_file->filename == NULL) + return; + + /* Try to open the addressed file. */ + fd = open (domain_file->filename, O_RDONLY | O_BINARY); + if (fd == -1) + return; + + /* We must know about the size of the file. */ + if ( +#ifdef _LIBC + __builtin_expect (fstat64 (fd, &st) != 0, 0) +#else + __builtin_expect (fstat (fd, &st) != 0, 0) +#endif + || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0) + || __builtin_expect (size < sizeof (struct mo_file_header), 0)) + { + /* Something went wrong. */ + close (fd); + return; + } + +#ifdef HAVE_MMAP + /* Now we are ready to load the file. If mmap() is available we try + this first. If not available or it failed we try to load it. */ + data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, + MAP_PRIVATE, fd, 0); + + if (__builtin_expect (data != (struct mo_file_header *) -1, 1)) + { + /* mmap() call was successful. */ + close (fd); + use_mmap = 1; + } +#endif + + /* If the data is not yet available (i.e. mmap'ed) we try to load + it manually. */ + if (data == (struct mo_file_header *) -1) + { + size_t to_read; + char *read_ptr; + + data = (struct mo_file_header *) malloc (size); + if (data == NULL) + { + if (use_mmap == 0) + close (fd); + return; + } + + to_read = size; + read_ptr = (char *) data; + do + { + long int nb = (long int) read (fd, read_ptr, to_read); + if (nb <= 0) + { +#ifdef EINTR + if (nb == -1 && errno == EINTR) + continue; +#endif + close (fd); + return; + } + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + + close (fd); + } + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED, + 0)) + { + /* The magic number is wrong: not a message catalog file. */ +#ifdef HAVE_MMAP + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + return; + } + + domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); + if (domain == NULL) + { +#ifdef HAVE_MMAP + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + return; + } + domain_file->data = domain; + + domain->data = (char *) data; + domain->use_mmap = use_mmap; + domain->mmap_size = size; + domain->must_swap = data->magic != _MAGIC; + domain->malloced = NULL; + + /* Fill in the information about the available tables. */ + revision = W (domain->must_swap, data->revision); + /* We support only the major revision 0. */ + switch (revision >> 16) + { + case 0: + domain->nstrings = W (domain->must_swap, data->nstrings); + domain->orig_tab = (const struct string_desc *) + ((char *) data + W (domain->must_swap, data->orig_tab_offset)); + domain->trans_tab = (const struct string_desc *) + ((char *) data + W (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = W (domain->must_swap, data->hash_tab_size); + domain->hash_tab = + (domain->hash_size > 2 + ? (const nls_uint32 *) + ((char *) data + W (domain->must_swap, data->hash_tab_offset)) + : NULL); + domain->must_swap_hash_tab = domain->must_swap; + + /* Now dispatch on the minor revision. */ + switch (revision & 0xffff) + { + case 0: + domain->n_sysdep_strings = 0; + domain->orig_sysdep_tab = NULL; + domain->trans_sysdep_tab = NULL; + break; + case 1: + default: + { + nls_uint32 n_sysdep_strings; + + if (domain->hash_tab == NULL) + /* This is invalid. These minor revisions need a hash table. */ + goto invalid; + + n_sysdep_strings = + W (domain->must_swap, data->n_sysdep_strings); + if (n_sysdep_strings > 0) + { + nls_uint32 n_sysdep_segments; + const struct sysdep_segment *sysdep_segments; + const char **sysdep_segment_values; + const nls_uint32 *orig_sysdep_tab; + const nls_uint32 *trans_sysdep_tab; + size_t memneed; + char *mem; + struct sysdep_string_desc *inmem_orig_sysdep_tab; + struct sysdep_string_desc *inmem_trans_sysdep_tab; + nls_uint32 *inmem_hash_tab; + unsigned int i; + + /* Get the values of the system dependent segments. */ + n_sysdep_segments = + W (domain->must_swap, data->n_sysdep_segments); + sysdep_segments = (const struct sysdep_segment *) + ((char *) data + + W (domain->must_swap, data->sysdep_segments_offset)); + sysdep_segment_values = + alloca (n_sysdep_segments * sizeof (const char *)); + for (i = 0; i < n_sysdep_segments; i++) + { + const char *name = + (char *) data + + W (domain->must_swap, sysdep_segments[i].offset); + nls_uint32 namelen = + W (domain->must_swap, sysdep_segments[i].length); + + if (!(namelen > 0 && name[namelen - 1] == '\0')) + { + freea (sysdep_segment_values); + goto invalid; + } + + sysdep_segment_values[i] = get_sysdep_segment_value (name); + } + + orig_sysdep_tab = (const nls_uint32 *) + ((char *) data + + W (domain->must_swap, data->orig_sysdep_tab_offset)); + trans_sysdep_tab = (const nls_uint32 *) + ((char *) data + + W (domain->must_swap, data->trans_sysdep_tab_offset)); + + /* Compute the amount of additional memory needed for the + system dependent strings and the augmented hash table. */ + memneed = 2 * n_sysdep_strings + * sizeof (struct sysdep_string_desc) + + domain->hash_size * sizeof (nls_uint32); + for (i = 0; i < 2 * n_sysdep_strings; i++) + { + const struct sysdep_string *sysdep_string = + (const struct sysdep_string *) + ((char *) data + + W (domain->must_swap, + i < n_sysdep_strings + ? orig_sysdep_tab[i] + : trans_sysdep_tab[i - n_sysdep_strings])); + size_t need = 0; + const struct segment_pair *p = sysdep_string->segments; + + if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) + for (p = sysdep_string->segments;; p++) + { + nls_uint32 sysdepref; + + need += W (domain->must_swap, p->segsize); + + sysdepref = W (domain->must_swap, p->sysdepref); + if (sysdepref == SEGMENTS_END) + break; + + if (sysdepref >= n_sysdep_segments) + { + /* Invalid. */ + freea (sysdep_segment_values); + goto invalid; + } + + need += strlen (sysdep_segment_values[sysdepref]); + } + + memneed += need; + } + + /* Allocate additional memory. */ + mem = (char *) malloc (memneed); + if (mem == NULL) + goto invalid; + + domain->malloced = mem; + inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; + mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); + inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; + mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); + inmem_hash_tab = (nls_uint32 *) mem; + mem += domain->hash_size * sizeof (nls_uint32); + + /* Compute the system dependent strings. */ + for (i = 0; i < 2 * n_sysdep_strings; i++) + { + const struct sysdep_string *sysdep_string = + (const struct sysdep_string *) + ((char *) data + + W (domain->must_swap, + i < n_sysdep_strings + ? orig_sysdep_tab[i] + : trans_sysdep_tab[i - n_sysdep_strings])); + const char *static_segments = + (char *) data + + W (domain->must_swap, sysdep_string->offset); + const struct segment_pair *p = sysdep_string->segments; + + /* Concatenate the segments, and fill + inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and + inmem_trans_sysdep_tab[i-n_sysdep_strings] (for + i >= n_sysdep_strings). */ + + if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END) + { + /* Only one static segment. */ + inmem_orig_sysdep_tab[i].length = + W (domain->must_swap, p->segsize); + inmem_orig_sysdep_tab[i].pointer = static_segments; + } + else + { + inmem_orig_sysdep_tab[i].pointer = mem; + + for (p = sysdep_string->segments;; p++) + { + nls_uint32 segsize = + W (domain->must_swap, p->segsize); + nls_uint32 sysdepref = + W (domain->must_swap, p->sysdepref); + size_t n; + + if (segsize > 0) + { + memcpy (mem, static_segments, segsize); + mem += segsize; + static_segments += segsize; + } + + if (sysdepref == SEGMENTS_END) + break; + + n = strlen (sysdep_segment_values[sysdepref]); + memcpy (mem, sysdep_segment_values[sysdepref], n); + mem += n; + } + + inmem_orig_sysdep_tab[i].length = + mem - inmem_orig_sysdep_tab[i].pointer; + } + } + + /* Compute the augmented hash table. */ + for (i = 0; i < domain->hash_size; i++) + inmem_hash_tab[i] = + W (domain->must_swap_hash_tab, domain->hash_tab[i]); + for (i = 0; i < n_sysdep_strings; i++) + { + const char *msgid = inmem_orig_sysdep_tab[i].pointer; + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + + for (;;) + { + if (inmem_hash_tab[idx] == 0) + { + /* Hash table entry is empty. Use it. */ + inmem_hash_tab[idx] = 1 + domain->nstrings + i; + break; + } + + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + } + } + + freea (sysdep_segment_values); + + domain->n_sysdep_strings = n_sysdep_strings; + domain->orig_sysdep_tab = inmem_orig_sysdep_tab; + domain->trans_sysdep_tab = inmem_trans_sysdep_tab; + + domain->hash_tab = inmem_hash_tab; + domain->must_swap_hash_tab = 0; + } + else + { + domain->n_sysdep_strings = 0; + domain->orig_sysdep_tab = NULL; + domain->trans_sysdep_tab = NULL; + } + } + break; + } + break; + default: + /* This is an invalid revision. */ + invalid: + /* This is an invalid .mo file. */ + if (domain->malloced) + free (domain->malloced); +#ifdef HAVE_MMAP + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + free (domain); + domain_file->data = NULL; + return; + } + + /* Now initialize the character set converter from the character set + the file is encoded with (found in the header entry) to the domain's + specified character set or the locale's character set. */ + nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding); + + /* Also look for a plural specification. */ + EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals); +} + + +#ifdef _LIBC +void +internal_function +_nl_unload_domain (domain) + struct loaded_domain *domain; +{ + if (domain->plural != &__gettext_germanic_plural) + __gettext_free_exp (domain->plural); + + _nl_free_domain_conv (domain); + + if (domain->malloced) + free (domain->malloced); + +# ifdef _POSIX_MAPPED_FILES + if (domain->use_mmap) + munmap ((caddr_t) domain->data, domain->mmap_size); + else +# endif /* _POSIX_MAPPED_FILES */ + free ((void *) domain->data); + + free (domain); +} +#endif diff --git a/bash-5.1/lib/intl/localcharset.c b/bash-5.1/lib/intl/localcharset.c new file mode 100644 index 0000000000000000000000000000000000000000..6983d0bf0a8cca651a68ceabc7e97d76f30a35be --- /dev/null +++ b/bash-5.1/lib/intl/localcharset.c @@ -0,0 +1,399 @@ +/* localcharset.c - Determine a canonical name for the current locale's character encoding. */ + +/* Copyright (C) 2000-2003, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Written by Bruno Haible . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +/* Specification. */ +#include "localcharset.h" + +#if HAVE_STDDEF_H +# include +#endif + +#include +#if HAVE_STRING_H +# include +#else +# include +#endif +#if HAVE_STDLIB_H +# include +#endif + +#if defined _WIN32 || defined __WIN32__ +# undef WIN32 /* avoid warning on mingw32 */ +# define WIN32 +#endif + +#if defined __EMX__ +/* Assume EMX program runs on OS/2, even if compiled under DOS. */ +# define OS2 +#endif + +#if !defined WIN32 +# if HAVE_LANGINFO_CODESET +# include +# else +# if HAVE_SETLOCALE +# include +# endif +# endif +#elif defined WIN32 +# define WIN32_LEAN_AND_MEAN +# include +#endif +#if defined OS2 +# define INCL_DOS +# include +#endif + +#if ENABLE_RELOCATABLE +# include "relocatable.h" +#else +# define relocate(pathname) (pathname) +#endif + +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +#endif + +#ifndef DIRECTORY_SEPARATOR +# define DIRECTORY_SEPARATOR '/' +#endif + +#ifndef ISSLASH +# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) +#endif + +#ifdef HAVE_GETC_UNLOCKED +# undef getc +# define getc getc_unlocked +#endif + +/* The following static variable is declared 'volatile' to avoid a + possible multithread problem in the function get_charset_aliases. If we + are running in a threaded environment, and if two threads initialize + 'charset_aliases' simultaneously, both will produce the same value, + and everything will be ok if the two assignments to 'charset_aliases' + are atomic. But I don't know what will happen if the two assignments mix. */ +#if __STDC__ != 1 +# define volatile /* empty */ +#endif +/* Pointer to the contents of the charset.alias file, if it has already been + read, else NULL. Its format is: + ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ +static const char * volatile charset_aliases; + +/* Return a pointer to the contents of the charset.alias file. */ +static const char * +get_charset_aliases () +{ + const char *cp; + + cp = charset_aliases; + if (cp == NULL) + { +#if !(defined VMS || defined WIN32) + FILE *fp; + const char *dir = relocate (LIBDIR); + const char *base = "charset.alias"; + char *file_name; + + /* Concatenate dir and base into freshly allocated file_name. */ + { + size_t dir_len = strlen (dir); + size_t base_len = strlen (base); + int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); + file_name = (char *) malloc (dir_len + add_slash + base_len + 1); + if (file_name != NULL) + { + memcpy (file_name, dir, dir_len); + if (add_slash) + file_name[dir_len] = DIRECTORY_SEPARATOR; + memcpy (file_name + dir_len + add_slash, base, base_len + 1); + } + } + + if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) + /* Out of memory or file not found, treat it as empty. */ + cp = ""; + else + { + /* Parse the file's contents. */ + int c; + char buf1[50+1]; + char buf2[50+1]; + char *res_ptr = NULL; + size_t res_size = 0; + size_t l1, l2; + + for (;;) + { + c = getc (fp); + if (c == EOF) + break; + if (c == '\n' || c == ' ' || c == '\t') + continue; + if (c == '#') + { + /* Skip comment, to end of line. */ + do + c = getc (fp); + while (!(c == EOF || c == '\n')); + if (c == EOF) + break; + continue; + } + ungetc (c, fp); + if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) + break; + l1 = strlen (buf1); + l2 = strlen (buf2); + if (res_size == 0) + { + res_size = l1 + 1 + l2 + 1; + res_ptr = (char *) malloc (res_size + 1); + } + else + { + res_size += l1 + 1 + l2 + 1; + res_ptr = (char *) realloc (res_ptr, res_size + 1); + } + if (res_ptr == NULL) + { + /* Out of memory. */ + res_size = 0; + break; + } + strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); + strcpy (res_ptr + res_size - (l2 + 1), buf2); + } + fclose (fp); + if (res_size == 0) + cp = ""; + else + { + *(res_ptr + res_size) = '\0'; + cp = res_ptr; + } + } + + if (file_name != NULL) + free (file_name); + +#else + +# if defined VMS + /* To avoid the troubles of an extra file charset.alias_vms in the + sources of many GNU packages, simply inline the aliases here. */ + /* The list of encodings is taken from the OpenVMS 7.3-1 documentation + "Compaq C Run-Time Library Reference Manual for OpenVMS systems" + section 10.7 "Handling Different Character Sets". */ + cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" + "ISO8859-2" "\0" "ISO-8859-2" "\0" + "ISO8859-5" "\0" "ISO-8859-5" "\0" + "ISO8859-7" "\0" "ISO-8859-7" "\0" + "ISO8859-8" "\0" "ISO-8859-8" "\0" + "ISO8859-9" "\0" "ISO-8859-9" "\0" + /* Japanese */ + "eucJP" "\0" "EUC-JP" "\0" + "SJIS" "\0" "SHIFT_JIS" "\0" + "DECKANJI" "\0" "DEC-KANJI" "\0" + "SDECKANJI" "\0" "EUC-JP" "\0" + /* Chinese */ + "eucTW" "\0" "EUC-TW" "\0" + "DECHANYU" "\0" "DEC-HANYU" "\0" + "DECHANZI" "\0" "GB2312" "\0" + /* Korean */ + "DECKOREAN" "\0" "EUC-KR" "\0"; +# endif + +# if defined WIN32 + /* To avoid the troubles of installing a separate file in the same + directory as the DLL and of retrieving the DLL's directory at + runtime, simply inline the aliases here. */ + + cp = "CP936" "\0" "GBK" "\0" + "CP1361" "\0" "JOHAB" "\0" + "CP20127" "\0" "ASCII" "\0" + "CP20866" "\0" "KOI8-R" "\0" + "CP21866" "\0" "KOI8-RU" "\0" + "CP28591" "\0" "ISO-8859-1" "\0" + "CP28592" "\0" "ISO-8859-2" "\0" + "CP28593" "\0" "ISO-8859-3" "\0" + "CP28594" "\0" "ISO-8859-4" "\0" + "CP28595" "\0" "ISO-8859-5" "\0" + "CP28596" "\0" "ISO-8859-6" "\0" + "CP28597" "\0" "ISO-8859-7" "\0" + "CP28598" "\0" "ISO-8859-8" "\0" + "CP28599" "\0" "ISO-8859-9" "\0" + "CP28605" "\0" "ISO-8859-15" "\0"; +# endif +#endif + + charset_aliases = cp; + } + + return cp; +} + +/* Determine the current locale's character encoding, and canonicalize it + into one of the canonical names listed in config.charset. + The result must not be freed; it is statically allocated. + If the canonical name cannot be determined, the result is a non-canonical + name. */ + +#ifdef STATIC +STATIC +#endif +const char * +locale_charset () +{ + const char *codeset; + const char *aliases; + +#if !(defined WIN32 || defined OS2) + +# if HAVE_LANGINFO_CODESET + + /* Most systems support nl_langinfo (CODESET) nowadays. */ + codeset = nl_langinfo (CODESET); + +# else + + /* On old systems which lack it, use setlocale or getenv. */ + const char *locale = NULL; + + /* But most old systems don't have a complete set of locales. Some + (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't + use setlocale here; it would return "C" when it doesn't support the + locale name the user has set. */ +# if HAVE_SETLOCALE && 0 + locale = setlocale (LC_CTYPE, NULL); +# endif + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + } + } + + /* On some old systems, one used to set locale = "iso8859_1". On others, + you set it to "language_COUNTRY.charset". In any case, we resolve it + through the charset.alias file. */ + codeset = locale; + +# endif + +#elif defined WIN32 + + static char buf[2 + 10 + 1]; + + /* Woe32 has a function returning the locale's codepage as a number. */ + sprintf (buf, "CP%u", GetACP ()); + codeset = buf; + +#elif defined OS2 + + const char *locale; + static char buf[2 + 10 + 1]; + ULONG cp[3]; + ULONG cplen; + + /* Allow user to override the codeset, as set in the operating system, + with standard language environment variables. */ + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + } + if (locale != NULL && locale[0] != '\0') + { + /* If the locale name contains an encoding after the dot, return it. */ + const char *dot = strchr (locale, '.'); + + if (dot != NULL) + { + const char *modifier; + + dot++; + /* Look for the possible @... trailer and remove it, if any. */ + modifier = strchr (dot, '@'); + if (modifier == NULL) + return dot; + if (modifier - dot < sizeof (buf)) + { + memcpy (buf, dot, modifier - dot); + buf [modifier - dot] = '\0'; + return buf; + } + } + + /* Resolve through the charset.alias file. */ + codeset = locale; + } + else + { + /* OS/2 has a function returning the locale's codepage as a number. */ + if (DosQueryCp (sizeof (cp), cp, &cplen)) + codeset = ""; + else + { + sprintf (buf, "CP%u", cp[0]); + codeset = buf; + } + } + +#endif + + if (codeset == NULL) + /* The canonical name cannot be determined. */ + codeset = ""; + + /* Resolve alias. */ + for (aliases = get_charset_aliases (); + *aliases != '\0'; + aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) + if (strcmp (codeset, aliases) == 0 + || (aliases[0] == '*' && aliases[1] == '\0')) + { + codeset = aliases + strlen (aliases) + 1; + break; + } + + /* Don't return an empty string. GNU libc and GNU libiconv interpret + the empty string as denoting "the locale's character encoding", + thus GNU libiconv would call this function a second time. */ + if (codeset[0] == '\0') + codeset = "ASCII"; + + return codeset; +} diff --git a/bash-5.1/lib/intl/localcharset.h b/bash-5.1/lib/intl/localcharset.h new file mode 100644 index 0000000000000000000000000000000000000000..e5299589bee9f752a77934a9fb9016fca4677e62 --- /dev/null +++ b/bash-5.1/lib/intl/localcharset.h @@ -0,0 +1,43 @@ +/* localcharset.h - Determine a canonical name for the current locale's character encoding. */ + +/* Copyright (C) 2000-2003, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _LOCALCHARSET_H +#define _LOCALCHARSET_H + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Determine the current locale's character encoding, and canonicalize it + into one of the canonical names listed in config.charset. + The result must not be freed; it is statically allocated. + If the canonical name cannot be determined, the result is a non-canonical + name. */ +extern const char * locale_charset (void); + + +#ifdef __cplusplus +} +#endif + + +#endif /* _LOCALCHARSET_H */ diff --git a/bash-5.1/lib/intl/locale.alias b/bash-5.1/lib/intl/locale.alias new file mode 100644 index 0000000000000000000000000000000000000000..51dd21e78343cc59c69196ab980844d1eb875115 --- /dev/null +++ b/bash-5.1/lib/intl/locale.alias @@ -0,0 +1,78 @@ +# locale.alias - Locale name alias data base. +# +# Copyright (C) 1996,1997,1998,1999,2000,2001,2005-2009 Free Software Foundation, Inc. +# +# 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 . +# + +# The format of this file is the same as for the corresponding file of +# the X Window System, which normally can be found in +# /usr/lib/X11/locale/locale.alias +# A single line contains two fields: an alias and a substitution value. +# All entries are case independent. + +# Note: This file is far from being complete. If you have a value for +# your own site which you think might be useful for others too, share +# it with the rest of us. Send it using the `glibcbug' script to +# bugs@gnu.org. + +# Packages using this file: + +bokmal no_NO.ISO-8859-1 +bokml no_NO.ISO-8859-1 +catalan ca_ES.ISO-8859-1 +croatian hr_HR.ISO-8859-2 +czech cs_CZ.ISO-8859-2 +danish da_DK.ISO-8859-1 +dansk da_DK.ISO-8859-1 +deutsch de_DE.ISO-8859-1 +dutch nl_NL.ISO-8859-1 +eesti et_EE.ISO-8859-1 +estonian et_EE.ISO-8859-1 +finnish fi_FI.ISO-8859-1 +franais fr_FR.ISO-8859-1 +french fr_FR.ISO-8859-1 +galego gl_ES.ISO-8859-1 +galician gl_ES.ISO-8859-1 +german de_DE.ISO-8859-1 +greek el_GR.ISO-8859-7 +hebrew he_IL.ISO-8859-8 +hrvatski hr_HR.ISO-8859-2 +hungarian hu_HU.ISO-8859-2 +icelandic is_IS.ISO-8859-1 +italian it_IT.ISO-8859-1 +japanese ja_JP.eucJP +japanese.euc ja_JP.eucJP +ja_JP ja_JP.eucJP +ja_JP.ujis ja_JP.eucJP +japanese.sjis ja_JP.SJIS +korean ko_KR.eucKR +korean.euc ko_KR.eucKR +ko_KR ko_KR.eucKR +lithuanian lt_LT.ISO-8859-13 +nb_NO no_NO.ISO-8859-1 +nb_NO.ISO-8859-1 no_NO.ISO-8859-1 +norwegian no_NO.ISO-8859-1 +nynorsk nn_NO.ISO-8859-1 +polish pl_PL.ISO-8859-2 +portuguese pt_PT.ISO-8859-1 +romanian ro_RO.ISO-8859-2 +russian ru_RU.ISO-8859-5 +slovak sk_SK.ISO-8859-2 +slovene sl_SI.ISO-8859-2 +slovenian sl_SI.ISO-8859-2 +spanish es_ES.ISO-8859-1 +swedish sv_SE.ISO-8859-1 +thai th_TH.TIS-620 +turkish tr_TR.ISO-8859-9 diff --git a/bash-5.1/lib/intl/localealias.c b/bash-5.1/lib/intl/localealias.c new file mode 100644 index 0000000000000000000000000000000000000000..7a730dbf3842340d57ae3f017f5da5bad6e85aaf --- /dev/null +++ b/bash-5.1/lib/intl/localealias.c @@ -0,0 +1,427 @@ +/* localealias.c - Handle aliases for locale names. */ + +/* Copyright (C) 1995-1999, 2000-2001, 2003, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Tell glibc's to provide a prototype for mempcpy(). + This must come before because may include + , and once has been included, it's too late. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#if defined _LIBC || defined HAVE___FSETLOCKING +# include +#endif +#include + +#ifdef __GNUC__ +# undef alloca +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +#include +#include + +#include "gettextP.h" + +#if ENABLE_RELOCATABLE +# include "relocatable.h" +#else +# define relocate(pathname) (pathname) +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define strcasecmp __strcasecmp + +# ifndef mempcpy +# define mempcpy __mempcpy +# endif +# define HAVE_MEMPCPY 1 +# define HAVE___FSETLOCKING 1 + +/* We need locking here since we can be called from different places. */ +# include + +__libc_lock_define_initialized (static, lock); +#endif + +#ifndef internal_function +# define internal_function +#endif + +/* Some optimizations for glibc. */ +#ifdef _LIBC +# define FEOF(fp) feof_unlocked (fp) +# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp) +#else +# define FEOF(fp) feof (fp) +# define FGETS(buf, n, fp) fgets (buf, n, fp) +#endif + +/* For those losing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +# define freea(p) /* nothing */ +#else +# define alloca(n) malloc (n) +# define freea(p) free (p) +#endif + +#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED +# undef fgets +# define fgets(buf, len, s) fgets_unlocked (buf, len, s) +#endif +#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED +# undef feof +# define feof(s) feof_unlocked (s) +#endif + + +struct alias_map +{ + const char *alias; + const char *value; +}; + + +#ifndef _LIBC +# define libc_freeres_ptr(decl) decl +#endif + +libc_freeres_ptr (static char *string_space); +static size_t string_space_act; +static size_t string_space_max; +libc_freeres_ptr (static struct alias_map *map); +static size_t nmap; +static size_t maxmap; + + +/* Prototypes for local functions. */ +static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) + internal_function; +static int extend_alias_table PARAMS ((void)); +static int alias_compare PARAMS ((const struct alias_map *map1, + const struct alias_map *map2)); + + +const char * +_nl_expand_alias (name) + const char *name; +{ + static const char *locale_alias_path; + struct alias_map *retval; + const char *result = NULL; + size_t added; + +#ifdef _LIBC + __libc_lock_lock (lock); +#endif + + if (locale_alias_path == NULL) + locale_alias_path = LOCALE_ALIAS_PATH; + + do + { + struct alias_map item; + + item.alias = name; + + if (nmap > 0) + retval = (struct alias_map *) bsearch (&item, map, nmap, + sizeof (struct alias_map), + (int (*) PARAMS ((const void *, + const void *)) + ) alias_compare); + else + retval = NULL; + + /* We really found an alias. Return the value. */ + if (retval != NULL) + { + result = retval->value; + break; + } + + /* Perhaps we can find another alias file. */ + added = 0; + while (added == 0 && locale_alias_path[0] != '\0') + { + const char *start; + + while (locale_alias_path[0] == PATH_SEPARATOR) + ++locale_alias_path; + start = locale_alias_path; + + while (locale_alias_path[0] != '\0' + && locale_alias_path[0] != PATH_SEPARATOR) + ++locale_alias_path; + + if (start < locale_alias_path) + added = read_alias_file (start, locale_alias_path - start); + } + } + while (added != 0); + +#ifdef _LIBC + __libc_lock_unlock (lock); +#endif + + return result; +} + + +static size_t +internal_function +read_alias_file (fname, fname_len) + const char *fname; + int fname_len; +{ + FILE *fp; + char *full_fname; + size_t added; + static const char aliasfile[] = "/locale.alias"; + + full_fname = (char *) alloca (fname_len + sizeof aliasfile); +#ifdef HAVE_MEMPCPY + mempcpy (mempcpy (full_fname, fname, fname_len), + aliasfile, sizeof aliasfile); +#else + memcpy (full_fname, fname, fname_len); + memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); +#endif + + fp = fopen (relocate (full_fname), "r"); + freea (full_fname); + if (fp == NULL) + return 0; + +#ifdef HAVE___FSETLOCKING + /* No threads present. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); +#endif + + added = 0; + while (!FEOF (fp)) + { + /* It is a reasonable approach to use a fix buffer here because + a) we are only interested in the first two fields + b) these fields must be usable as file names and so must not + be that long + We avoid a multi-kilobyte buffer here since this would use up + stack space which we might not have if the program ran out of + memory. */ + char buf[400]; + char *alias; + char *value; + char *cp; + + if (FGETS (buf, sizeof buf, fp) == NULL) + /* EOF reached. */ + break; + + cp = buf; + /* Ignore leading white space. */ + while (isspace ((unsigned char) cp[0])) + ++cp; + + /* A leading '#' signals a comment line. */ + if (cp[0] != '\0' && cp[0] != '#') + { + alias = cp++; + while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) + ++cp; + /* Terminate alias name. */ + if (cp[0] != '\0') + *cp++ = '\0'; + + /* Now look for the beginning of the value. */ + while (isspace ((unsigned char) cp[0])) + ++cp; + + if (cp[0] != '\0') + { + size_t alias_len; + size_t value_len; + + value = cp++; + while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) + ++cp; + /* Terminate value. */ + if (cp[0] == '\n') + { + /* This has to be done to make the following test + for the end of line possible. We are looking for + the terminating '\n' which do not overwrite here. */ + *cp++ = '\0'; + *cp = '\n'; + } + else if (cp[0] != '\0') + *cp++ = '\0'; + + if (nmap >= maxmap) + if (__builtin_expect (extend_alias_table (), 0)) + { + fclose (fp); + return added; + } + + alias_len = strlen (alias) + 1; + value_len = strlen (value) + 1; + + if (string_space_act + alias_len + value_len > string_space_max) + { + /* Increase size of memory pool. */ + size_t new_size = (string_space_max + + (alias_len + value_len > 1024 + ? alias_len + value_len : 1024)); + char *new_pool = (char *) realloc (string_space, new_size); + if (new_pool == NULL) + { + fclose (fp); + return added; + } + + if (__builtin_expect (string_space != new_pool, 0)) + { + size_t i; + + for (i = 0; i < nmap; i++) + { + map[i].alias += new_pool - string_space; + map[i].value += new_pool - string_space; + } + } + + string_space = new_pool; + string_space_max = new_size; + } + + map[nmap].alias = memcpy (&string_space[string_space_act], + alias, alias_len); + string_space_act += alias_len; + + map[nmap].value = memcpy (&string_space[string_space_act], + value, value_len); + string_space_act += value_len; + + ++nmap; + ++added; + } + } + + /* Possibly not the whole line fits into the buffer. Ignore + the rest of the line. */ + while (strchr (buf, '\n') == NULL) + if (FGETS (buf, sizeof buf, fp) == NULL) + /* Make sure the inner loop will be left. The outer loop + will exit at the `feof' test. */ + break; + } + + /* Should we test for ferror()? I think we have to silently ignore + errors. --drepper */ + fclose (fp); + + if (added > 0) + qsort (map, nmap, sizeof (struct alias_map), + (int (*) PARAMS ((const void *, const void *))) alias_compare); + + return added; +} + + +static int +extend_alias_table () +{ + size_t new_size; + struct alias_map *new_map; + + new_size = maxmap == 0 ? 100 : 2 * maxmap; + new_map = (struct alias_map *) realloc (map, (new_size + * sizeof (struct alias_map))); + if (new_map == NULL) + /* Simply don't extend: we don't have any more core. */ + return -1; + + map = new_map; + maxmap = new_size; + return 0; +} + + +static int +alias_compare (map1, map2) + const struct alias_map *map1; + const struct alias_map *map2; +{ +#if defined _LIBC || defined HAVE_STRCASECMP + return strcasecmp (map1->alias, map2->alias); +#else + const unsigned char *p1 = (const unsigned char *) map1->alias; + const unsigned char *p2 = (const unsigned char *) map2->alias; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + /* I know this seems to be odd but the tolower() function in + some systems libc cannot handle nonalpha characters. */ + c1 = isupper (*p1) ? tolower (*p1) : *p1; + c2 = isupper (*p2) ? tolower (*p2) : *p2; + if (c1 == '\0') + break; + ++p1; + ++p2; + } + while (c1 == c2); + + return c1 - c2; +#endif +} diff --git a/bash-5.1/lib/intl/localename.c b/bash-5.1/lib/intl/localename.c new file mode 100644 index 0000000000000000000000000000000000000000..795a34fb9e619cd1cbb9b71f89bb265412ee6336 --- /dev/null +++ b/bash-5.1/lib/intl/localename.c @@ -0,0 +1,774 @@ +/* localename.c - Determine the current selected locale. */ + +/* Copyright (C) 1995-1999, 2000-2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Written by Ulrich Drepper , 1995. */ +/* Win32 code written by Tor Lillqvist . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#if defined _WIN32 || defined __WIN32__ +# undef WIN32 /* avoid warning on mingw32 */ +# define WIN32 +#endif + +#ifdef WIN32 +# define WIN32_LEAN_AND_MEAN +# include +/* Mingw headers don't have latest language and sublanguage codes. */ +# ifndef LANG_AFRIKAANS +# define LANG_AFRIKAANS 0x36 +# endif +# ifndef LANG_ALBANIAN +# define LANG_ALBANIAN 0x1c +# endif +# ifndef LANG_ARABIC +# define LANG_ARABIC 0x01 +# endif +# ifndef LANG_ARMENIAN +# define LANG_ARMENIAN 0x2b +# endif +# ifndef LANG_ASSAMESE +# define LANG_ASSAMESE 0x4d +# endif +# ifndef LANG_AZERI +# define LANG_AZERI 0x2c +# endif +# ifndef LANG_BASQUE +# define LANG_BASQUE 0x2d +# endif +# ifndef LANG_BELARUSIAN +# define LANG_BELARUSIAN 0x23 +# endif +# ifndef LANG_BENGALI +# define LANG_BENGALI 0x45 +# endif +# ifndef LANG_CATALAN +# define LANG_CATALAN 0x03 +# endif +# ifndef LANG_DIVEHI +# define LANG_DIVEHI 0x65 +# endif +# ifndef LANG_ESTONIAN +# define LANG_ESTONIAN 0x25 +# endif +# ifndef LANG_FAEROESE +# define LANG_FAEROESE 0x38 +# endif +# ifndef LANG_FARSI +# define LANG_FARSI 0x29 +# endif +# ifndef LANG_GALICIAN +# define LANG_GALICIAN 0x56 +# endif +# ifndef LANG_GEORGIAN +# define LANG_GEORGIAN 0x37 +# endif +# ifndef LANG_GUJARATI +# define LANG_GUJARATI 0x47 +# endif +# ifndef LANG_HEBREW +# define LANG_HEBREW 0x0d +# endif +# ifndef LANG_HINDI +# define LANG_HINDI 0x39 +# endif +# ifndef LANG_INDONESIAN +# define LANG_INDONESIAN 0x21 +# endif +# ifndef LANG_KANNADA +# define LANG_KANNADA 0x4b +# endif +# ifndef LANG_KASHMIRI +# define LANG_KASHMIRI 0x60 +# endif +# ifndef LANG_KAZAK +# define LANG_KAZAK 0x3f +# endif +# ifndef LANG_KONKANI +# define LANG_KONKANI 0x57 +# endif +# ifndef LANG_KYRGYZ +# define LANG_KYRGYZ 0x40 +# endif +# ifndef LANG_LATVIAN +# define LANG_LATVIAN 0x26 +# endif +# ifndef LANG_LITHUANIAN +# define LANG_LITHUANIAN 0x27 +# endif +# ifndef LANG_MACEDONIAN +# define LANG_MACEDONIAN 0x2f +# endif +# ifndef LANG_MALAY +# define LANG_MALAY 0x3e +# endif +# ifndef LANG_MALAYALAM +# define LANG_MALAYALAM 0x4c +# endif +# ifndef LANG_MANIPURI +# define LANG_MANIPURI 0x58 +# endif +# ifndef LANG_MARATHI +# define LANG_MARATHI 0x4e +# endif +# ifndef LANG_MONGOLIAN +# define LANG_MONGOLIAN 0x50 +# endif +# ifndef LANG_NEPALI +# define LANG_NEPALI 0x61 +# endif +# ifndef LANG_ORIYA +# define LANG_ORIYA 0x48 +# endif +# ifndef LANG_PUNJABI +# define LANG_PUNJABI 0x46 +# endif +# ifndef LANG_SANSKRIT +# define LANG_SANSKRIT 0x4f +# endif +# ifndef LANG_SERBIAN +# define LANG_SERBIAN 0x1a +# endif +# ifndef LANG_SINDHI +# define LANG_SINDHI 0x59 +# endif +# ifndef LANG_SLOVAK +# define LANG_SLOVAK 0x1b +# endif +# ifndef LANG_SORBIAN +# define LANG_SORBIAN 0x2e +# endif +# ifndef LANG_SWAHILI +# define LANG_SWAHILI 0x41 +# endif +# ifndef LANG_SYRIAC +# define LANG_SYRIAC 0x5a +# endif +# ifndef LANG_TAMIL +# define LANG_TAMIL 0x49 +# endif +# ifndef LANG_TATAR +# define LANG_TATAR 0x44 +# endif +# ifndef LANG_TELUGU +# define LANG_TELUGU 0x4a +# endif +# ifndef LANG_THAI +# define LANG_THAI 0x1e +# endif +# ifndef LANG_UKRAINIAN +# define LANG_UKRAINIAN 0x22 +# endif +# ifndef LANG_URDU +# define LANG_URDU 0x20 +# endif +# ifndef LANG_UZBEK +# define LANG_UZBEK 0x43 +# endif +# ifndef LANG_VIETNAMESE +# define LANG_VIETNAMESE 0x2a +# endif +# ifndef SUBLANG_ARABIC_SAUDI_ARABIA +# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 +# endif +# ifndef SUBLANG_ARABIC_IRAQ +# define SUBLANG_ARABIC_IRAQ 0x02 +# endif +# ifndef SUBLANG_ARABIC_EGYPT +# define SUBLANG_ARABIC_EGYPT 0x03 +# endif +# ifndef SUBLANG_ARABIC_LIBYA +# define SUBLANG_ARABIC_LIBYA 0x04 +# endif +# ifndef SUBLANG_ARABIC_ALGERIA +# define SUBLANG_ARABIC_ALGERIA 0x05 +# endif +# ifndef SUBLANG_ARABIC_MOROCCO +# define SUBLANG_ARABIC_MOROCCO 0x06 +# endif +# ifndef SUBLANG_ARABIC_TUNISIA +# define SUBLANG_ARABIC_TUNISIA 0x07 +# endif +# ifndef SUBLANG_ARABIC_OMAN +# define SUBLANG_ARABIC_OMAN 0x08 +# endif +# ifndef SUBLANG_ARABIC_YEMEN +# define SUBLANG_ARABIC_YEMEN 0x09 +# endif +# ifndef SUBLANG_ARABIC_SYRIA +# define SUBLANG_ARABIC_SYRIA 0x0a +# endif +# ifndef SUBLANG_ARABIC_JORDAN +# define SUBLANG_ARABIC_JORDAN 0x0b +# endif +# ifndef SUBLANG_ARABIC_LEBANON +# define SUBLANG_ARABIC_LEBANON 0x0c +# endif +# ifndef SUBLANG_ARABIC_KUWAIT +# define SUBLANG_ARABIC_KUWAIT 0x0d +# endif +# ifndef SUBLANG_ARABIC_UAE +# define SUBLANG_ARABIC_UAE 0x0e +# endif +# ifndef SUBLANG_ARABIC_BAHRAIN +# define SUBLANG_ARABIC_BAHRAIN 0x0f +# endif +# ifndef SUBLANG_ARABIC_QATAR +# define SUBLANG_ARABIC_QATAR 0x10 +# endif +# ifndef SUBLANG_AZERI_LATIN +# define SUBLANG_AZERI_LATIN 0x01 +# endif +# ifndef SUBLANG_AZERI_CYRILLIC +# define SUBLANG_AZERI_CYRILLIC 0x02 +# endif +# ifndef SUBLANG_CHINESE_MACAU +# define SUBLANG_CHINESE_MACAU 0x05 +# endif +# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA +# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 +# endif +# ifndef SUBLANG_ENGLISH_JAMAICA +# define SUBLANG_ENGLISH_JAMAICA 0x08 +# endif +# ifndef SUBLANG_ENGLISH_CARIBBEAN +# define SUBLANG_ENGLISH_CARIBBEAN 0x09 +# endif +# ifndef SUBLANG_ENGLISH_BELIZE +# define SUBLANG_ENGLISH_BELIZE 0x0a +# endif +# ifndef SUBLANG_ENGLISH_TRINIDAD +# define SUBLANG_ENGLISH_TRINIDAD 0x0b +# endif +# ifndef SUBLANG_ENGLISH_ZIMBABWE +# define SUBLANG_ENGLISH_ZIMBABWE 0x0c +# endif +# ifndef SUBLANG_ENGLISH_PHILIPPINES +# define SUBLANG_ENGLISH_PHILIPPINES 0x0d +# endif +# ifndef SUBLANG_FRENCH_LUXEMBOURG +# define SUBLANG_FRENCH_LUXEMBOURG 0x05 +# endif +# ifndef SUBLANG_FRENCH_MONACO +# define SUBLANG_FRENCH_MONACO 0x06 +# endif +# ifndef SUBLANG_GERMAN_LUXEMBOURG +# define SUBLANG_GERMAN_LUXEMBOURG 0x04 +# endif +# ifndef SUBLANG_GERMAN_LIECHTENSTEIN +# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +# endif +# ifndef SUBLANG_KASHMIRI_INDIA +# define SUBLANG_KASHMIRI_INDIA 0x02 +# endif +# ifndef SUBLANG_MALAY_MALAYSIA +# define SUBLANG_MALAY_MALAYSIA 0x01 +# endif +# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM +# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +# endif +# ifndef SUBLANG_NEPALI_INDIA +# define SUBLANG_NEPALI_INDIA 0x02 +# endif +# ifndef SUBLANG_SERBIAN_LATIN +# define SUBLANG_SERBIAN_LATIN 0x02 +# endif +# ifndef SUBLANG_SERBIAN_CYRILLIC +# define SUBLANG_SERBIAN_CYRILLIC 0x03 +# endif +# ifndef SUBLANG_SPANISH_GUATEMALA +# define SUBLANG_SPANISH_GUATEMALA 0x04 +# endif +# ifndef SUBLANG_SPANISH_COSTA_RICA +# define SUBLANG_SPANISH_COSTA_RICA 0x05 +# endif +# ifndef SUBLANG_SPANISH_PANAMA +# define SUBLANG_SPANISH_PANAMA 0x06 +# endif +# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC +# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 +# endif +# ifndef SUBLANG_SPANISH_VENEZUELA +# define SUBLANG_SPANISH_VENEZUELA 0x08 +# endif +# ifndef SUBLANG_SPANISH_COLOMBIA +# define SUBLANG_SPANISH_COLOMBIA 0x09 +# endif +# ifndef SUBLANG_SPANISH_PERU +# define SUBLANG_SPANISH_PERU 0x0a +# endif +# ifndef SUBLANG_SPANISH_ARGENTINA +# define SUBLANG_SPANISH_ARGENTINA 0x0b +# endif +# ifndef SUBLANG_SPANISH_ECUADOR +# define SUBLANG_SPANISH_ECUADOR 0x0c +# endif +# ifndef SUBLANG_SPANISH_CHILE +# define SUBLANG_SPANISH_CHILE 0x0d +# endif +# ifndef SUBLANG_SPANISH_URUGUAY +# define SUBLANG_SPANISH_URUGUAY 0x0e +# endif +# ifndef SUBLANG_SPANISH_PARAGUAY +# define SUBLANG_SPANISH_PARAGUAY 0x0f +# endif +# ifndef SUBLANG_SPANISH_BOLIVIA +# define SUBLANG_SPANISH_BOLIVIA 0x10 +# endif +# ifndef SUBLANG_SPANISH_EL_SALVADOR +# define SUBLANG_SPANISH_EL_SALVADOR 0x11 +# endif +# ifndef SUBLANG_SPANISH_HONDURAS +# define SUBLANG_SPANISH_HONDURAS 0x12 +# endif +# ifndef SUBLANG_SPANISH_NICARAGUA +# define SUBLANG_SPANISH_NICARAGUA 0x13 +# endif +# ifndef SUBLANG_SPANISH_PUERTO_RICO +# define SUBLANG_SPANISH_PUERTO_RICO 0x14 +# endif +# ifndef SUBLANG_SWEDISH_FINLAND +# define SUBLANG_SWEDISH_FINLAND 0x02 +# endif +# ifndef SUBLANG_URDU_PAKISTAN +# define SUBLANG_URDU_PAKISTAN 0x01 +# endif +# ifndef SUBLANG_URDU_INDIA +# define SUBLANG_URDU_INDIA 0x02 +# endif +# ifndef SUBLANG_UZBEK_LATIN +# define SUBLANG_UZBEK_LATIN 0x01 +# endif +# ifndef SUBLANG_UZBEK_CYRILLIC +# define SUBLANG_UZBEK_CYRILLIC 0x02 +# endif +#endif + +/* XPG3 defines the result of 'setlocale (category, NULL)' as: + "Directs 'setlocale()' to query 'category' and return the current + setting of 'local'." + However it does not specify the exact format. Neither do SUSV2 and + ISO C 99. So we can use this feature only on selected systems (e.g. + those using GNU C Library). */ +#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2) +# define HAVE_LOCALE_NULL +#endif + +/* Determine the current locale's name, and canonicalize it into XPG syntax + language[_territory[.codeset]][@modifier] + The codeset part in the result is not reliable; the locale_charset() + should be used for codeset information instead. + The result must not be freed; it is statically allocated. */ + +const char * +_nl_locale_name (category, categoryname) + int category; + const char *categoryname; +{ + const char *retval; + +#ifndef WIN32 + + /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. + On some systems this can be done by the 'setlocale' function itself. */ +# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + retval = setlocale (category, NULL); +# else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval == NULL || retval[0] == '\0') + { + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval == NULL || retval[0] == '\0') + { + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval == NULL || retval[0] == '\0') + /* We use C as the default domain. POSIX says this is + implementation defined. */ + retval = "C"; + } + } +# endif + + return retval; + +#else /* WIN32 */ + + /* Return an XPG style locale name language[_territory][@modifier]. + Don't even bother determining the codeset; it's not useful in this + context, because message catalogs are not specific to a single + codeset. */ + + LCID lcid; + LANGID langid; + int primary, sub; + + /* Let the user override the system settings through environment + variables, as on POSIX systems. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Use native Win32 API locale ID. */ + lcid = GetThreadLocale (); + + /* Strip off the sorting rules, keep only the language part. */ + langid = LANGIDFROMLCID (lcid); + + /* Split into language and territory part. */ + primary = PRIMARYLANGID (langid); + sub = SUBLANGID (langid); + + /* Dispatch on language. + See also http://www.unicode.org/unicode/onlinedat/languages.html . + For details about languages, see http://www.ethnologue.com/ . */ + switch (primary) + { + case LANG_AFRIKAANS: return "af_ZA"; + case LANG_ALBANIAN: return "sq_AL"; + case 0x5e: /* AMHARIC */ return "am_ET"; + case LANG_ARABIC: + switch (sub) + { + case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; + case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; + case SUBLANG_ARABIC_EGYPT: return "ar_EG"; + case SUBLANG_ARABIC_LIBYA: return "ar_LY"; + case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; + case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; + case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; + case SUBLANG_ARABIC_OMAN: return "ar_OM"; + case SUBLANG_ARABIC_YEMEN: return "ar_YE"; + case SUBLANG_ARABIC_SYRIA: return "ar_SY"; + case SUBLANG_ARABIC_JORDAN: return "ar_JO"; + case SUBLANG_ARABIC_LEBANON: return "ar_LB"; + case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; + case SUBLANG_ARABIC_UAE: return "ar_AE"; + case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; + case SUBLANG_ARABIC_QATAR: return "ar_QA"; + } + return "ar"; + case LANG_ARMENIAN: return "hy_AM"; + case LANG_ASSAMESE: return "as_IN"; + case LANG_AZERI: + switch (sub) + { + /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ + case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; + case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; + } + return "az"; + case LANG_BASQUE: + return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ + case LANG_BELARUSIAN: return "be_BY"; + case LANG_BENGALI: return "bn_IN"; + case LANG_BULGARIAN: return "bg_BG"; + case 0x55: /* BURMESE */ return "my_MM"; + case 0x53: /* CAMBODIAN */ return "km_KH"; + case LANG_CATALAN: return "ca_ES"; + case 0x5c: /* CHEROKEE */ return "chr_US"; + case LANG_CHINESE: + switch (sub) + { + case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; + case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; + case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; + case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; + case SUBLANG_CHINESE_MACAU: return "zh_MO"; + } + return "zh"; + case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN + * What used to be called Serbo-Croatian + * should really now be two separate + * languages because of political reasons. + * (Says tml, who knows nothing about Serbian + * or Croatian.) + * (I can feel those flames coming already.) + */ + switch (sub) + { + case SUBLANG_DEFAULT: return "hr_HR"; + case SUBLANG_SERBIAN_LATIN: return "sr_YU"; + case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic"; + } + return "hr"; + case LANG_CZECH: return "cs_CZ"; + case LANG_DANISH: return "da_DK"; + case LANG_DIVEHI: return "div_MV"; + case LANG_DUTCH: + switch (sub) + { + case SUBLANG_DUTCH: return "nl_NL"; + case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; + } + return "nl"; + case 0x66: /* EDO */ return "bin_NG"; + case LANG_ENGLISH: + switch (sub) + { + /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought + * English was the language spoken in England. + * Oh well. + */ + case SUBLANG_ENGLISH_US: return "en_US"; + case SUBLANG_ENGLISH_UK: return "en_GB"; + case SUBLANG_ENGLISH_AUS: return "en_AU"; + case SUBLANG_ENGLISH_CAN: return "en_CA"; + case SUBLANG_ENGLISH_NZ: return "en_NZ"; + case SUBLANG_ENGLISH_EIRE: return "en_IE"; + case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; + case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; + case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ + case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; + case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; + case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; + case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; + } + return "en"; + case LANG_ESTONIAN: return "et_EE"; + case LANG_FAEROESE: return "fo_FO"; + case LANG_FARSI: return "fa_IR"; + case LANG_FINNISH: return "fi_FI"; + case LANG_FRENCH: + switch (sub) + { + case SUBLANG_FRENCH: return "fr_FR"; + case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; + case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; + case SUBLANG_FRENCH_SWISS: return "fr_CH"; + case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; + case SUBLANG_FRENCH_MONACO: return "fr_MC"; + } + return "fr"; + case 0x62: /* FRISIAN */ return "fy_NL"; + case 0x67: /* FULFULDE */ return "ful_NG"; + case 0x3c: /* GAELIC */ + switch (sub) + { + case 0x01: /* SCOTTISH */ return "gd_GB"; + case 0x02: /* IRISH */ return "ga_IE"; + } + return "C"; + case LANG_GALICIAN: return "gl_ES"; + case LANG_GEORGIAN: return "ka_GE"; + case LANG_GERMAN: + switch (sub) + { + case SUBLANG_GERMAN: return "de_DE"; + case SUBLANG_GERMAN_SWISS: return "de_CH"; + case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; + case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; + case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; + } + return "de"; + case LANG_GREEK: return "el_GR"; + case 0x74: /* GUARANI */ return "gn_PY"; + case LANG_GUJARATI: return "gu_IN"; + case 0x68: /* HAUSA */ return "ha_NG"; + case 0x75: /* HAWAIIAN */ + /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) + or Hawaii Creole English ("cpe_US", 600000 speakers)? */ + return "cpe_US"; + case LANG_HEBREW: return "he_IL"; + case LANG_HINDI: return "hi_IN"; + case LANG_HUNGARIAN: return "hu_HU"; + case 0x69: /* IBIBIO */ return "nic_NG"; + case LANG_ICELANDIC: return "is_IS"; + case 0x70: /* IGBO */ return "ibo_NG"; + case LANG_INDONESIAN: return "id_ID"; + case 0x5d: /* INUKTITUT */ return "iu_CA"; + case LANG_ITALIAN: + switch (sub) + { + case SUBLANG_ITALIAN: return "it_IT"; + case SUBLANG_ITALIAN_SWISS: return "it_CH"; + } + return "it"; + case LANG_JAPANESE: return "ja_JP"; + case LANG_KANNADA: return "kn_IN"; + case 0x71: /* KANURI */ return "kau_NG"; + case LANG_KASHMIRI: + switch (sub) + { + case SUBLANG_DEFAULT: return "ks_PK"; + case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; + } + return "ks"; + case LANG_KAZAK: return "kk_KZ"; + case LANG_KONKANI: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "kok_IN"; + case LANG_KOREAN: return "ko_KR"; + case LANG_KYRGYZ: return "ky_KG"; + case 0x54: /* LAO */ return "lo_LA"; + case 0x76: /* LATIN */ return "la_VA"; + case LANG_LATVIAN: return "lv_LV"; + case LANG_LITHUANIAN: return "lt_LT"; + case LANG_MACEDONIAN: return "mk_MK"; + case LANG_MALAY: + switch (sub) + { + case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; + case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; + } + return "ms"; + case LANG_MALAYALAM: return "ml_IN"; + case 0x3a: /* MALTESE */ return "mt_MT"; + case LANG_MANIPURI: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "mni_IN"; + case LANG_MARATHI: return "mr_IN"; + case LANG_MONGOLIAN: + return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ + case LANG_NEPALI: + switch (sub) + { + case SUBLANG_DEFAULT: return "ne_NP"; + case SUBLANG_NEPALI_INDIA: return "ne_IN"; + } + return "ne"; + case LANG_NORWEGIAN: + switch (sub) + { + case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO"; + case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; + } + return "no"; + case LANG_ORIYA: return "or_IN"; + case 0x72: /* OROMO */ return "om_ET"; + case 0x79: /* PAPIAMENTU */ return "pap_AN"; + case 0x63: /* PASHTO */ + return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ + case LANG_POLISH: return "pl_PL"; + case LANG_PORTUGUESE: + switch (sub) + { + case SUBLANG_PORTUGUESE: return "pt_PT"; + /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. + Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ + case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; + } + return "pt"; + case LANG_PUNJABI: return "pa_IN"; + case 0x17: /* RHAETO-ROMANCE */ return "rm_CH"; + case LANG_ROMANIAN: return "ro_RO"; + case LANG_RUSSIAN: + return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */ + case 0x3b: /* SAMI */ return "se_NO"; + case LANG_SANSKRIT: return "sa_IN"; + case LANG_SINDHI: return "sd"; + case 0x5b: /* SINHALESE */ return "si_LK"; + case LANG_SLOVAK: return "sk_SK"; + case LANG_SLOVENIAN: return "sl_SI"; + case 0x77: /* SOMALI */ return "so_SO"; + case LANG_SORBIAN: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "wen_DE"; + case LANG_SPANISH: + switch (sub) + { + case SUBLANG_SPANISH: return "es_ES"; + case SUBLANG_SPANISH_MEXICAN: return "es_MX"; + case SUBLANG_SPANISH_MODERN: + return "es_ES@modern"; /* not seen on Unix */ + case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; + case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; + case SUBLANG_SPANISH_PANAMA: return "es_PA"; + case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; + case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; + case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; + case SUBLANG_SPANISH_PERU: return "es_PE"; + case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; + case SUBLANG_SPANISH_ECUADOR: return "es_EC"; + case SUBLANG_SPANISH_CHILE: return "es_CL"; + case SUBLANG_SPANISH_URUGUAY: return "es_UY"; + case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; + case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; + case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; + case SUBLANG_SPANISH_HONDURAS: return "es_HN"; + case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; + case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; + } + return "es"; + case 0x30: /* SUTU */ return "bnt_TZ"; + case LANG_SWAHILI: return "sw_KE"; + case LANG_SWEDISH: + switch (sub) + { + case SUBLANG_DEFAULT: return "sv_SE"; + case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; + } + return "sv"; + case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ + case 0x64: /* TAGALOG */ return "tl_PH"; + case 0x28: /* TAJIK */ return "tg_TJ"; + case 0x5f: /* TAMAZIGHT */ return "ber_MA"; + case LANG_TAMIL: + return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ + case LANG_TATAR: return "tt_RU"; + case LANG_TELUGU: return "te_IN"; + case LANG_THAI: return "th_TH"; + case 0x51: /* TIBETAN */ return "bo_CN"; + case 0x73: /* TIGRINYA */ return "ti_ET"; + case 0x31: /* TSONGA */ return "ts_ZA"; + case LANG_TURKISH: return "tr_TR"; + case 0x42: /* TURKMEN */ return "tk_TM"; + case LANG_UKRAINIAN: return "uk_UA"; + case LANG_URDU: + switch (sub) + { + case SUBLANG_URDU_PAKISTAN: return "ur_PK"; + case SUBLANG_URDU_INDIA: return "ur_IN"; + } + return "ur"; + case LANG_UZBEK: + switch (sub) + { + /* FIXME: Adjust this when Uzbek locales appear on Unix. */ + case SUBLANG_UZBEK_LATIN: return "uz_UZ@latin"; + case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; + } + return "uz"; + case 0x33: /* VENDA */ return "ven_ZA"; + case LANG_VIETNAMESE: return "vi_VN"; + case 0x52: /* WELSH */ return "cy_GB"; + case 0x34: /* XHOSA */ return "xh_ZA"; + case 0x78: /* YI */ return "sit_CN"; + case 0x3d: /* YIDDISH */ return "yi_IL"; + case 0x6a: /* YORUBA */ return "yo_NG"; + case 0x35: /* ZULU */ return "zu_ZA"; + default: return "C"; + } + +#endif +} diff --git a/bash-5.1/lib/intl/log.c b/bash-5.1/lib/intl/log.c new file mode 100644 index 0000000000000000000000000000000000000000..e527e879c229ea4ae8476bbfed2816e4c90c1154 --- /dev/null +++ b/bash-5.1/lib/intl/log.c @@ -0,0 +1,106 @@ +/* log.c - Log file output. */ + +/* Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Written by Bruno Haible . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +/* Print an ASCII string with quotes and escape sequences where needed. */ +static void +print_escaped (stream, str) + FILE *stream; + const char *str; +{ + putc ('"', stream); + for (; *str != '\0'; str++) + if (*str == '\n') + { + fputs ("\\n\"", stream); + if (str[1] == '\0') + return; + fputs ("\n\"", stream); + } + else + { + if (*str == '"' || *str == '\\') + putc ('\\', stream); + putc (*str, stream); + } + putc ('"', stream); +} + +/* Add to the log file an entry denoting a failed translation. */ +void +_nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural) + const char *logfilename; + const char *domainname; + const char *msgid1; + const char *msgid2; + int plural; +{ + static char *last_logfilename = NULL; + static FILE *last_logfile = NULL; + FILE *logfile; + + /* Can we reuse the last opened logfile? */ + if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0) + { + /* Close the last used logfile. */ + if (last_logfilename != NULL) + { + if (last_logfile != NULL) + { + fclose (last_logfile); + last_logfile = NULL; + } + free (last_logfilename); + last_logfilename = NULL; + } + /* Open the logfile. */ + last_logfilename = (char *) malloc (strlen (logfilename) + 1); + if (last_logfilename == NULL) + return; + strcpy (last_logfilename, logfilename); + last_logfile = fopen (logfilename, "a"); + if (last_logfile == NULL) + return; + } + logfile = last_logfile; + + fprintf (logfile, "domain "); + print_escaped (logfile, domainname); + fprintf (logfile, "\nmsgid "); + print_escaped (logfile, msgid1); + if (plural) + { + fprintf (logfile, "\nmsgid_plural "); + print_escaped (logfile, msgid2); + fprintf (logfile, "\nmsgstr[0] \"\"\n"); + } + else + fprintf (logfile, "\nmsgstr \"\"\n"); + putc ('\n', logfile); +} diff --git a/bash-5.1/lib/intl/ngettext.c b/bash-5.1/lib/intl/ngettext.c new file mode 100644 index 0000000000000000000000000000000000000000..95aafccddb0dcfbbf1f74440d8a28f2f95c89b4e --- /dev/null +++ b/bash-5.1/lib/intl/ngettext.c @@ -0,0 +1,70 @@ +/* ngettext.c - Implementation of ngettext(3) function. */ + +/* Copyright (C) 1995, 1997, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef _LIBC +# define __need_NULL +# include +#else +# include /* Just for NULL. */ +#endif + +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif + +#include + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define NGETTEXT __ngettext +# define DCNGETTEXT __dcngettext +#else +# define NGETTEXT libintl_ngettext +# define DCNGETTEXT libintl_dcngettext +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +char * +NGETTEXT (msgid1, msgid2, n) + const char *msgid1; + const char *msgid2; + unsigned long int n; +{ + return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__ngettext, ngettext); +#endif diff --git a/bash-5.1/lib/intl/os2compat.c b/bash-5.1/lib/intl/os2compat.c new file mode 100644 index 0000000000000000000000000000000000000000..1aa9dff84ecefbc76165491e570f201085578258 --- /dev/null +++ b/bash-5.1/lib/intl/os2compat.c @@ -0,0 +1,100 @@ +/* os2compat.c - OS/2 compatibility functions. */ + +/* Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#define OS2_AWARE +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +/* A version of getenv() that works from DLLs */ +extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue); + +char * +_nl_getenv (const char *name) +{ + unsigned char *value; + if (DosScanEnv (name, &value)) + return NULL; + else + return value; +} + +/* A fixed size buffer. */ +char libintl_nl_default_dirname[MAXPATHLEN+1]; + +char *_nlos2_libdir = NULL; +char *_nlos2_localealiaspath = NULL; +char *_nlos2_localedir = NULL; + +static __attribute__((constructor)) void +nlos2_initialize () +{ + char *root = getenv ("UNIXROOT"); + char *gnulocaledir = getenv ("GNULOCALEDIR"); + + _nlos2_libdir = gnulocaledir; + if (!_nlos2_libdir) + { + if (root) + { + size_t sl = strlen (root); + _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1); + memcpy (_nlos2_libdir, root, sl); + memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); + } + else + _nlos2_libdir = LIBDIR; + } + + _nlos2_localealiaspath = gnulocaledir; + if (!_nlos2_localealiaspath) + { + if (root) + { + size_t sl = strlen (root); + _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1); + memcpy (_nlos2_localealiaspath, root, sl); + memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); + } + else + _nlos2_localealiaspath = LOCALE_ALIAS_PATH; + } + + _nlos2_localedir = gnulocaledir; + if (!_nlos2_localedir) + { + if (root) + { + size_t sl = strlen (root); + _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1); + memcpy (_nlos2_localedir, root, sl); + memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); + } + else + _nlos2_localedir = LOCALEDIR; + } + + if (strlen (_nlos2_localedir) <= MAXPATHLEN) + strcpy (libintl_nl_default_dirname, _nlos2_localedir); +} diff --git a/bash-5.1/lib/intl/os2compat.h b/bash-5.1/lib/intl/os2compat.h new file mode 100644 index 0000000000000000000000000000000000000000..8de3183071f841917ea44931eed21ae27b098c5a --- /dev/null +++ b/bash-5.1/lib/intl/os2compat.h @@ -0,0 +1,48 @@ +/* os2compat.h - OS/2 compatibility defines. */ + +/* This file is intended to be included from config.h + Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* When included from os2compat.h we need all the original definitions */ +#ifndef OS2_AWARE + +#undef LIBDIR +#define LIBDIR _nlos2_libdir +extern char *_nlos2_libdir; + +#undef LOCALEDIR +#define LOCALEDIR _nlos2_localedir +extern char *_nlos2_localedir; + +#undef LOCALE_ALIAS_PATH +#define LOCALE_ALIAS_PATH _nlos2_localealiaspath +extern char *_nlos2_localealiaspath; + +#endif + +#undef HAVE_STRCASECMP +#define HAVE_STRCASECMP 1 +#define strcasecmp stricmp +#define strncasecmp strnicmp + +/* We have our own getenv() which works even if library is compiled as DLL */ +#define getenv _nl_getenv + +/* Older versions of gettext used -1 as the value of LC_MESSAGES */ +#define LC_MESSAGES_COMPAT (-1) diff --git a/bash-5.1/lib/intl/osdep.c b/bash-5.1/lib/intl/osdep.c new file mode 100644 index 0000000000000000000000000000000000000000..b0300222d18af40a9701642830e8b806f76d3414 --- /dev/null +++ b/bash-5.1/lib/intl/osdep.c @@ -0,0 +1,26 @@ +/* osdep.c - OS dependent parts of libintl. */ + +/* Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined __EMX__ +# include "os2compat.c" +#else +/* Avoid AIX compiler warning. */ +typedef int dummy; +#endif diff --git a/bash-5.1/lib/intl/plural-exp.c b/bash-5.1/lib/intl/plural-exp.c new file mode 100644 index 0000000000000000000000000000000000000000..9ed3b16ff948884b1cbbf46478072cc46dc72ca1 --- /dev/null +++ b/bash-5.1/lib/intl/plural-exp.c @@ -0,0 +1,158 @@ +/* plural-exp.c - Expression parsing for plural form selection. */ + +/* Copyright (C) 2000, 2001, 2005-2009 Free Software Foundation, Inc. + Written by Ulrich Drepper , 2000. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include "plural-exp.h" + +#if (defined __GNUC__ && !defined __APPLE_CC__) \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) + +/* These structs are the constant expression for the germanic plural + form determination. It represents the expression "n != 1". */ +static const struct expression plvar = +{ + .nargs = 0, + .operation = var, +}; +static const struct expression plone = +{ + .nargs = 0, + .operation = num, + .val = + { + .num = 1 + } +}; +struct expression GERMANIC_PLURAL = +{ + .nargs = 2, + .operation = not_equal, + .val = + { + .args = + { + [0] = (struct expression *) &plvar, + [1] = (struct expression *) &plone + } + } +}; + +# define INIT_GERMANIC_PLURAL() + +#else + +/* For compilers without support for ISO C 99 struct/union initializers: + Initialization at run-time. */ + +static struct expression plvar; +static struct expression plone; +struct expression GERMANIC_PLURAL; + +static void +init_germanic_plural () +{ + if (plone.val.num == 0) + { + plvar.nargs = 0; + plvar.operation = var; + + plone.nargs = 0; + plone.operation = num; + plone.val.num = 1; + + GERMANIC_PLURAL.nargs = 2; + GERMANIC_PLURAL.operation = not_equal; + GERMANIC_PLURAL.val.args[0] = &plvar; + GERMANIC_PLURAL.val.args[1] = &plone; + } +} + +# define INIT_GERMANIC_PLURAL() init_germanic_plural () + +#endif + +void +internal_function +EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp) + const char *nullentry; + struct expression **pluralp; + unsigned long int *npluralsp; +{ + if (nullentry != NULL) + { + const char *plural; + const char *nplurals; + + plural = strstr (nullentry, "plural="); + nplurals = strstr (nullentry, "nplurals="); + if (plural == NULL || nplurals == NULL) + goto no_plural; + else + { + char *endp; + unsigned long int n; + struct parse_args args; + + /* First get the number. */ + nplurals += 9; + while (*nplurals != '\0' && isspace ((unsigned char) *nplurals)) + ++nplurals; + if (!(*nplurals >= '0' && *nplurals <= '9')) + goto no_plural; +#if defined HAVE_STRTOUL || defined _LIBC + n = strtoul (nplurals, &endp, 10); +#else + for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++) + n = n * 10 + (*endp - '0'); +#endif + if (nplurals == endp) + goto no_plural; + *npluralsp = n; + + /* Due to the restrictions bison imposes onto the interface of the + scanner function we have to put the input string and the result + passed up from the parser into the same structure which address + is passed down to the parser. */ + plural += 7; + args.cp = plural; + if (PLURAL_PARSE (&args) != 0) + goto no_plural; + *pluralp = args.res; + } + } + else + { + /* By default we are using the Germanic form: singular form only + for `one', the plural form otherwise. Yes, this is also what + English is using since English is a Germanic language. */ + no_plural: + INIT_GERMANIC_PLURAL (); + *pluralp = &GERMANIC_PLURAL; + *npluralsp = 2; + } +} diff --git a/bash-5.1/lib/intl/plural-exp.h b/bash-5.1/lib/intl/plural-exp.h new file mode 100644 index 0000000000000000000000000000000000000000..dcb0dae0b072ce7f35e0a580c5621ede9f1dfa73 --- /dev/null +++ b/bash-5.1/lib/intl/plural-exp.h @@ -0,0 +1,128 @@ +/* plural-exp.h - defines for expression parsing and evaluation for plural form selection. */ + +/* Copyright (C) 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc. + Written by Ulrich Drepper , 2000. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _PLURAL_EXP_H +#define _PLURAL_EXP_H + +#ifndef PARAMS +# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef internal_function +# define internal_function +#endif + +#ifndef attribute_hidden +# define attribute_hidden +#endif + + +/* This is the representation of the expressions to determine the + plural form. */ +struct expression +{ + int nargs; /* Number of arguments. */ + enum operator + { + /* Without arguments: */ + var, /* The variable "n". */ + num, /* Decimal number. */ + /* Unary operators: */ + lnot, /* Logical NOT. */ + /* Binary operators: */ + mult, /* Multiplication. */ + divide, /* Division. */ + module, /* Modulo operation. */ + plus, /* Addition. */ + minus, /* Subtraction. */ + less_than, /* Comparison. */ + greater_than, /* Comparison. */ + less_or_equal, /* Comparison. */ + greater_or_equal, /* Comparison. */ + equal, /* Comparison for equality. */ + not_equal, /* Comparison for inequality. */ + land, /* Logical AND. */ + lor, /* Logical OR. */ + /* Ternary operators: */ + qmop /* Question mark operator. */ + } operation; + union + { + unsigned long int num; /* Number value for `num'. */ + struct expression *args[3]; /* Up to three arguments. */ + } val; +}; + +/* This is the data structure to pass information to the parser and get + the result in a thread-safe way. */ +struct parse_args +{ + const char *cp; + struct expression *res; +}; + + +/* Names for the libintl functions are a problem. This source code is used + 1. in the GNU C Library library, + 2. in the GNU libintl library, + 3. in the GNU gettext tools. + The function names in each situation must be different, to allow for + binary incompatible changes in 'struct expression'. Furthermore, + 1. in the GNU C Library library, the names have a __ prefix, + 2.+3. in the GNU libintl library and in the GNU gettext tools, the names + must follow ANSI C and not start with __. + So we have to distinguish the three cases. */ +#ifdef _LIBC +# define FREE_EXPRESSION __gettext_free_exp +# define PLURAL_PARSE __gettextparse +# define GERMANIC_PLURAL __gettext_germanic_plural +# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural +#elif defined (IN_LIBINTL) +# define FREE_EXPRESSION libintl_gettext_free_exp +# define PLURAL_PARSE libintl_gettextparse +# define GERMANIC_PLURAL libintl_gettext_germanic_plural +# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural +#else +# define FREE_EXPRESSION free_plural_expression +# define PLURAL_PARSE parse_plural_expression +# define GERMANIC_PLURAL germanic_plural +# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression +#endif + +extern void FREE_EXPRESSION PARAMS ((struct expression *exp)) + internal_function; +extern int PLURAL_PARSE PARAMS ((void *arg)); +extern struct expression GERMANIC_PLURAL attribute_hidden; +extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry, + struct expression **pluralp, + unsigned long int *npluralsp)) + internal_function; + +#if !defined (_LIBC) && !defined (IN_LIBINTL) +extern unsigned long int plural_eval PARAMS ((struct expression *pexp, + unsigned long int n)); +#endif + +#endif /* _PLURAL_EXP_H */ diff --git a/bash-5.1/lib/intl/plural.c b/bash-5.1/lib/intl/plural.c new file mode 100644 index 0000000000000000000000000000000000000000..a0031513c7ebabbd0568c22e0fb5a43c01098940 --- /dev/null +++ b/bash-5.1/lib/intl/plural.c @@ -0,0 +1,1679 @@ +/* A Bison parser, made by GNU Bison 2.0. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* Substitute the variable and function names. */ +#define yyparse __gettextparse +#define yylex __gettextlex +#define yyerror __gettexterror +#define yylval __gettextlval +#define yychar __gettextchar +#define yydebug __gettextdebug +#define yynerrs __gettextnerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + EQUOP2 = 258, + CMPOP2 = 259, + ADDOP2 = 260, + MULOP2 = 261, + NUMBER = 262 + }; +#endif +#define EQUOP2 258 +#define CMPOP2 259 +#define ADDOP2 260 +#define MULOP2 261 +#define NUMBER 262 + + + + +/* Copy the first part of user declarations. */ +#line 1 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + +/* plural.y - Expression parsing for plural form selection. */ + +/* Copyright (C) 2000, 2001, 2005-2009 Free Software Foundation, Inc. + Written by Ulrich Drepper , 2000. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* The bison generated parser uses alloca. AIX 3 forces us to put this + declaration at the beginning of the file. The declaration in bison's + skeleton file comes too late. This must come before + because may include arbitrary system headers. */ +#if defined _AIX && !defined __GNUC__ + #pragma alloca +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "plural-exp.h" + +/* The main function generated by the parser is called __gettextparse, + but we want it to be called PLURAL_PARSE. */ +#ifndef _LIBC +# define __gettextparse PLURAL_PARSE +#endif + +#define YYLEX_PARAM &((struct parse_args *) arg)->cp +#define YYPARSE_PARAM arg + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 51 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" +typedef union YYSTYPE { + unsigned long int num; + enum operator op; + struct expression *exp; +} YYSTYPE; +/* Line 190 of yacc.c. */ +#line 152 "/usr/src/local/bash/bash-20080814/lib/intl/plural.c" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ +#line 57 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + +/* Prototypes for local functions. */ +static struct expression *new_exp PARAMS ((int nargs, enum operator op, + struct expression * const *args)); +static inline struct expression *new_exp_0 PARAMS ((enum operator op)); +static inline struct expression *new_exp_1 PARAMS ((enum operator op, + struct expression *right)); +static struct expression *new_exp_2 PARAMS ((enum operator op, + struct expression *left, + struct expression *right)); +static inline struct expression *new_exp_3 PARAMS ((enum operator op, + struct expression *bexp, + struct expression *tbranch, + struct expression *fbranch)); +static int yylex PARAMS ((YYSTYPE *lval, const char **pexp)); +static void yyerror PARAMS ((const char *str)); + +/* Allocation of expressions. */ + +static struct expression * +new_exp (nargs, op, args) + int nargs; + enum operator op; + struct expression * const *args; +{ + int i; + struct expression *newp; + + /* If any of the argument could not be malloc'ed, just return NULL. */ + for (i = nargs - 1; i >= 0; i--) + if (args[i] == NULL) + goto fail; + + /* Allocate a new expression. */ + newp = (struct expression *) malloc (sizeof (*newp)); + if (newp != NULL) + { + newp->nargs = nargs; + newp->operation = op; + for (i = nargs - 1; i >= 0; i--) + newp->val.args[i] = args[i]; + return newp; + } + + fail: + for (i = nargs - 1; i >= 0; i--) + FREE_EXPRESSION (args[i]); + + return NULL; +} + +static inline struct expression * +new_exp_0 (op) + enum operator op; +{ + return new_exp (0, op, NULL); +} + +static inline struct expression * +new_exp_1 (op, right) + enum operator op; + struct expression *right; +{ + struct expression *args[1]; + + args[0] = right; + return new_exp (1, op, args); +} + +static struct expression * +new_exp_2 (op, left, right) + enum operator op; + struct expression *left; + struct expression *right; +{ + struct expression *args[2]; + + args[0] = left; + args[1] = right; + return new_exp (2, op, args); +} + +static inline struct expression * +new_exp_3 (op, bexp, tbranch, fbranch) + enum operator op; + struct expression *bexp; + struct expression *tbranch; + struct expression *fbranch; +{ + struct expression *args[3]; + + args[0] = bexp; + args[1] = tbranch; + args[2] = fbranch; + return new_exp (3, op, args); +} + + + +/* Line 213 of yacc.c. */ +#line 262 "/usr/src/local/bash/bash-20080814/lib/intl/plural.c" + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +# ifndef YYFREE +# define YYFREE free +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# endif + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# else +# define YYSTACK_ALLOC alloca +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short int yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined (__GNUC__) && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 9 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 54 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 16 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 3 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 13 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 27 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 262 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned char yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 10, 2, 2, 2, 2, 5, 2, + 14, 15, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, + 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 6, 7, + 8, 9, 11 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned char yyprhs[] = +{ + 0, 0, 3, 5, 11, 15, 19, 23, 27, 31, + 35, 38, 40, 42 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = +{ + 17, 0, -1, 18, -1, 18, 3, 18, 12, 18, + -1, 18, 4, 18, -1, 18, 5, 18, -1, 18, + 6, 18, -1, 18, 7, 18, -1, 18, 8, 18, + -1, 18, 9, 18, -1, 10, 18, -1, 13, -1, + 11, -1, 14, 18, 15, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned char yyrline[] = +{ + 0, 176, 176, 184, 188, 192, 196, 200, 204, 208, + 212, 216, 220, 225 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2", + "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'", + "$accept", "start", "exp", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short int yytoknum[] = +{ + 0, 256, 257, 63, 124, 38, 258, 259, 260, 261, + 33, 262, 58, 110, 40, 41 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 16, 17, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 1, 5, 3, 3, 3, 3, 3, 3, + 2, 1, 1, 3 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned char yydefact[] = +{ + 0, 0, 12, 11, 0, 0, 2, 10, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 13, 0, 4, + 5, 6, 7, 8, 9, 0, 3 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yysigned_char yydefgoto[] = +{ + -1, 5, 6 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -10 +static const yysigned_char yypact[] = +{ + -9, -9, -10, -10, -9, 8, 36, -10, 13, -10, + -9, -9, -9, -9, -9, -9, -9, -10, 26, 41, + 45, 18, -2, 14, -10, -9, 36 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yysigned_char yypgoto[] = +{ + -10, -10, -1 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const unsigned char yytable[] = +{ + 7, 1, 2, 8, 3, 4, 15, 16, 9, 18, + 19, 20, 21, 22, 23, 24, 10, 11, 12, 13, + 14, 15, 16, 16, 26, 14, 15, 16, 17, 10, + 11, 12, 13, 14, 15, 16, 0, 0, 25, 10, + 11, 12, 13, 14, 15, 16, 12, 13, 14, 15, + 16, 13, 14, 15, 16 +}; + +static const yysigned_char yycheck[] = +{ + 1, 10, 11, 4, 13, 14, 8, 9, 0, 10, + 11, 12, 13, 14, 15, 16, 3, 4, 5, 6, + 7, 8, 9, 9, 25, 7, 8, 9, 15, 3, + 4, 5, 6, 7, 8, 9, -1, -1, 12, 3, + 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, + 9, 6, 7, 8, 9 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 10, 11, 13, 14, 17, 18, 18, 18, 0, + 3, 4, 5, 6, 7, 8, 9, 15, 18, 18, + 18, 18, 18, 18, 18, 12, 18 +}; + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up");\ + YYERROR; \ + } \ +while (0) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short int *bottom, short int *top) +#else +static void +yy_stack_print (bottom, top) + short int *bottom; + short int *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (/* Nothing. */; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; +#endif +{ + int yyi; + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +#endif /* !YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM); +# else +int yyparse (); +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + /* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + register short int *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + + + +#define YYPOPSTACK (yyvsp--, yyssp--) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + + yyvsp[0] = yylval; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short int *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyoverflowlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + short int *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyoverflowlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a look-ahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to look-ahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 177 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + if ((yyvsp[0].exp) == NULL) + YYABORT; + ((struct parse_args *) arg)->res = (yyvsp[0].exp); + } + break; + + case 3: +#line 185 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_3 (qmop, (yyvsp[-4].exp), (yyvsp[-2].exp), (yyvsp[0].exp)); + } + break; + + case 4: +#line 189 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_2 (lor, (yyvsp[-2].exp), (yyvsp[0].exp)); + } + break; + + case 5: +#line 193 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_2 (land, (yyvsp[-2].exp), (yyvsp[0].exp)); + } + break; + + case 6: +#line 197 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp)); + } + break; + + case 7: +#line 201 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp)); + } + break; + + case 8: +#line 205 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp)); + } + break; + + case 9: +#line 209 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp)); + } + break; + + case 10: +#line 213 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_1 (lnot, (yyvsp[0].exp)); + } + break; + + case 11: +#line 217 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = new_exp_0 (var); + } + break; + + case 12: +#line 221 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + if (((yyval.exp) = new_exp_0 (num)) != NULL) + (yyval.exp)->val.num = (yyvsp[0].num); + } + break; + + case 13: +#line 226 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + { + (yyval.exp) = (yyvsp[-1].exp); + } + break; + + + } + +/* Line 1037 of yacc.c. */ +#line 1270 "/usr/src/local/bash/bash-20080814/lib/intl/plural.c" + + yyvsp -= yylen; + yyssp -= yylen; + + + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + const char* yyprefix; + char *yymsg; + int yyx; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 0; + + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) + { + yysize = 0; + break; + } + } + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); + + if (yycount < 5) + { + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yyp = yystpcpy (yyp, yyprefix); + yyp = yystpcpy (yyp, yytname[yyx]); + yyprefix = " or "; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("syntax error; also virtual memory exhausted"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror ("syntax error"); + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ + if (yychar == YYEOF) + for (;;) + { + + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + yydestruct ("Error: popping", + yystos[*yyssp], yyvsp); + } + } + else + { + yydestruct ("Error: discarding", yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + +#ifdef __GNUC__ + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ + if (0) + goto yyerrorlab; +#endif + +yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yydestruct ("Error: discarding lookahead", + yytoken, &yylval); + yychar = YYEMPTY; + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + return yyresult; +} + + +#line 231 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y" + + +void +internal_function +FREE_EXPRESSION (exp) + struct expression *exp; +{ + if (exp == NULL) + return; + + /* Handle the recursive case. */ + switch (exp->nargs) + { + case 3: + FREE_EXPRESSION (exp->val.args[2]); + /* FALLTHROUGH */ + case 2: + FREE_EXPRESSION (exp->val.args[1]); + /* FALLTHROUGH */ + case 1: + FREE_EXPRESSION (exp->val.args[0]); + /* FALLTHROUGH */ + default: + break; + } + + free (exp); +} + + +static int +yylex (lval, pexp) + YYSTYPE *lval; + const char **pexp; +{ + const char *exp = *pexp; + int result; + + while (1) + { + if (exp[0] == '\0') + { + *pexp = exp; + return YYEOF; + } + + if (exp[0] != ' ' && exp[0] != '\t') + break; + + ++exp; + } + + result = *exp++; + switch (result) + { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + unsigned long int n = result - '0'; + while (exp[0] >= '0' && exp[0] <= '9') + { + n *= 10; + n += exp[0] - '0'; + ++exp; + } + lval->num = n; + result = NUMBER; + } + break; + + case '=': + if (exp[0] == '=') + { + ++exp; + lval->op = equal; + result = EQUOP2; + } + else + result = YYERRCODE; + break; + + case '!': + if (exp[0] == '=') + { + ++exp; + lval->op = not_equal; + result = EQUOP2; + } + break; + + case '&': + case '|': + if (exp[0] == result) + ++exp; + else + result = YYERRCODE; + break; + + case '<': + if (exp[0] == '=') + { + ++exp; + lval->op = less_or_equal; + } + else + lval->op = less_than; + result = CMPOP2; + break; + + case '>': + if (exp[0] == '=') + { + ++exp; + lval->op = greater_or_equal; + } + else + lval->op = greater_than; + result = CMPOP2; + break; + + case '*': + lval->op = mult; + result = MULOP2; + break; + + case '/': + lval->op = divide; + result = MULOP2; + break; + + case '%': + lval->op = module; + result = MULOP2; + break; + + case '+': + lval->op = plus; + result = ADDOP2; + break; + + case '-': + lval->op = minus; + result = ADDOP2; + break; + + case 'n': + case '?': + case ':': + case '(': + case ')': + /* Nothing, just return the character. */ + break; + + case ';': + case '\n': + case '\0': + /* Be safe and let the user call this function again. */ + --exp; + result = YYEOF; + break; + + default: + result = YYERRCODE; +#if YYDEBUG != 0 + --exp; +#endif + break; + } + + *pexp = exp; + + return result; +} + + +static void +yyerror (str) + const char *str; +{ + /* Do nothing. We don't print error messages here. */ +} diff --git a/bash-5.1/lib/intl/plural.y b/bash-5.1/lib/intl/plural.y new file mode 100644 index 0000000000000000000000000000000000000000..8b8cec7e83dddd62715346dfa4fdeac6a6a889a8 --- /dev/null +++ b/bash-5.1/lib/intl/plural.y @@ -0,0 +1,411 @@ +%{ +/* plural.y - Expression parsing for plural form selection. */ + +/* Copyright (C) 2000, 2001, 2005-2009 Free Software Foundation, Inc. + Written by Ulrich Drepper , 2000. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* The bison generated parser uses alloca. AIX 3 forces us to put this + declaration at the beginning of the file. The declaration in bison's + skeleton file comes too late. This must come before + because may include arbitrary system headers. */ +#if defined _AIX && !defined __GNUC__ + #pragma alloca +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "plural-exp.h" + +/* The main function generated by the parser is called __gettextparse, + but we want it to be called PLURAL_PARSE. */ +#ifndef _LIBC +# define __gettextparse PLURAL_PARSE +#endif + +#define YYLEX_PARAM &((struct parse_args *) arg)->cp +#define YYPARSE_PARAM arg +%} +%pure_parser +%expect 7 + +%union { + unsigned long int num; + enum operator op; + struct expression *exp; +} + +%{ +/* Prototypes for local functions. */ +static struct expression *new_exp PARAMS ((int nargs, enum operator op, + struct expression * const *args)); +static inline struct expression *new_exp_0 PARAMS ((enum operator op)); +static inline struct expression *new_exp_1 PARAMS ((enum operator op, + struct expression *right)); +static struct expression *new_exp_2 PARAMS ((enum operator op, + struct expression *left, + struct expression *right)); +static inline struct expression *new_exp_3 PARAMS ((enum operator op, + struct expression *bexp, + struct expression *tbranch, + struct expression *fbranch)); +static int yylex PARAMS ((YYSTYPE *lval, const char **pexp)); +static void yyerror PARAMS ((const char *str)); + +/* Allocation of expressions. */ + +static struct expression * +new_exp (nargs, op, args) + int nargs; + enum operator op; + struct expression * const *args; +{ + int i; + struct expression *newp; + + /* If any of the argument could not be malloc'ed, just return NULL. */ + for (i = nargs - 1; i >= 0; i--) + if (args[i] == NULL) + goto fail; + + /* Allocate a new expression. */ + newp = (struct expression *) malloc (sizeof (*newp)); + if (newp != NULL) + { + newp->nargs = nargs; + newp->operation = op; + for (i = nargs - 1; i >= 0; i--) + newp->val.args[i] = args[i]; + return newp; + } + + fail: + for (i = nargs - 1; i >= 0; i--) + FREE_EXPRESSION (args[i]); + + return NULL; +} + +static inline struct expression * +new_exp_0 (op) + enum operator op; +{ + return new_exp (0, op, NULL); +} + +static inline struct expression * +new_exp_1 (op, right) + enum operator op; + struct expression *right; +{ + struct expression *args[1]; + + args[0] = right; + return new_exp (1, op, args); +} + +static struct expression * +new_exp_2 (op, left, right) + enum operator op; + struct expression *left; + struct expression *right; +{ + struct expression *args[2]; + + args[0] = left; + args[1] = right; + return new_exp (2, op, args); +} + +static inline struct expression * +new_exp_3 (op, bexp, tbranch, fbranch) + enum operator op; + struct expression *bexp; + struct expression *tbranch; + struct expression *fbranch; +{ + struct expression *args[3]; + + args[0] = bexp; + args[1] = tbranch; + args[2] = fbranch; + return new_exp (3, op, args); +} + +%} + +/* This declares that all operators have the same associativity and the + precedence order as in C. See [Harbison, Steele: C, A Reference Manual]. + There is no unary minus and no bitwise operators. + Operators with the same syntactic behaviour have been merged into a single + token, to save space in the array generated by bison. */ +%right '?' /* ? */ +%left '|' /* || */ +%left '&' /* && */ +%left EQUOP2 /* == != */ +%left CMPOP2 /* < > <= >= */ +%left ADDOP2 /* + - */ +%left MULOP2 /* * / % */ +%right '!' /* ! */ + +%token EQUOP2 CMPOP2 ADDOP2 MULOP2 +%token NUMBER +%type exp + +%% + +start: exp + { + if ($1 == NULL) + YYABORT; + ((struct parse_args *) arg)->res = $1; + } + ; + +exp: exp '?' exp ':' exp + { + $$ = new_exp_3 (qmop, $1, $3, $5); + } + | exp '|' exp + { + $$ = new_exp_2 (lor, $1, $3); + } + | exp '&' exp + { + $$ = new_exp_2 (land, $1, $3); + } + | exp EQUOP2 exp + { + $$ = new_exp_2 ($2, $1, $3); + } + | exp CMPOP2 exp + { + $$ = new_exp_2 ($2, $1, $3); + } + | exp ADDOP2 exp + { + $$ = new_exp_2 ($2, $1, $3); + } + | exp MULOP2 exp + { + $$ = new_exp_2 ($2, $1, $3); + } + | '!' exp + { + $$ = new_exp_1 (lnot, $2); + } + | 'n' + { + $$ = new_exp_0 (var); + } + | NUMBER + { + if (($$ = new_exp_0 (num)) != NULL) + $$->val.num = $1; + } + | '(' exp ')' + { + $$ = $2; + } + ; + +%% + +void +internal_function +FREE_EXPRESSION (exp) + struct expression *exp; +{ + if (exp == NULL) + return; + + /* Handle the recursive case. */ + switch (exp->nargs) + { + case 3: + FREE_EXPRESSION (exp->val.args[2]); + /* FALLTHROUGH */ + case 2: + FREE_EXPRESSION (exp->val.args[1]); + /* FALLTHROUGH */ + case 1: + FREE_EXPRESSION (exp->val.args[0]); + /* FALLTHROUGH */ + default: + break; + } + + free (exp); +} + + +static int +yylex (lval, pexp) + YYSTYPE *lval; + const char **pexp; +{ + const char *exp = *pexp; + int result; + + while (1) + { + if (exp[0] == '\0') + { + *pexp = exp; + return YYEOF; + } + + if (exp[0] != ' ' && exp[0] != '\t') + break; + + ++exp; + } + + result = *exp++; + switch (result) + { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + unsigned long int n = result - '0'; + while (exp[0] >= '0' && exp[0] <= '9') + { + n *= 10; + n += exp[0] - '0'; + ++exp; + } + lval->num = n; + result = NUMBER; + } + break; + + case '=': + if (exp[0] == '=') + { + ++exp; + lval->op = equal; + result = EQUOP2; + } + else + result = YYERRCODE; + break; + + case '!': + if (exp[0] == '=') + { + ++exp; + lval->op = not_equal; + result = EQUOP2; + } + break; + + case '&': + case '|': + if (exp[0] == result) + ++exp; + else + result = YYERRCODE; + break; + + case '<': + if (exp[0] == '=') + { + ++exp; + lval->op = less_or_equal; + } + else + lval->op = less_than; + result = CMPOP2; + break; + + case '>': + if (exp[0] == '=') + { + ++exp; + lval->op = greater_or_equal; + } + else + lval->op = greater_than; + result = CMPOP2; + break; + + case '*': + lval->op = mult; + result = MULOP2; + break; + + case '/': + lval->op = divide; + result = MULOP2; + break; + + case '%': + lval->op = module; + result = MULOP2; + break; + + case '+': + lval->op = plus; + result = ADDOP2; + break; + + case '-': + lval->op = minus; + result = ADDOP2; + break; + + case 'n': + case '?': + case ':': + case '(': + case ')': + /* Nothing, just return the character. */ + break; + + case ';': + case '\n': + case '\0': + /* Be safe and let the user call this function again. */ + --exp; + result = YYEOF; + break; + + default: + result = YYERRCODE; +#if YYDEBUG != 0 + --exp; +#endif + break; + } + + *pexp = exp; + + return result; +} + + +static void +yyerror (str) + const char *str; +{ + /* Do nothing. We don't print error messages here. */ +} diff --git a/bash-5.1/lib/intl/ref-add.sin b/bash-5.1/lib/intl/ref-add.sin new file mode 100755 index 0000000000000000000000000000000000000000..6fd32ed9bd85ef85a9e4eee2569bbaf3cc797ec8 --- /dev/null +++ b/bash-5.1/lib/intl/ref-add.sin @@ -0,0 +1,29 @@ +# Add this package to a list of references stored in a text file. +# +# Copyright (C) 2000 Free Software Foundation, Inc. +# +# 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 . +# +# Written by Bruno Haible . +# +/^# Packages using this file: / { + s/# Packages using this file:// + ta + :a + s/ @PACKAGE@ / @PACKAGE@ / + tb + s/ $/ @PACKAGE@ / + :b + s/^/# Packages using this file:/ +} diff --git a/bash-5.1/lib/intl/ref-del.sin b/bash-5.1/lib/intl/ref-del.sin new file mode 100755 index 0000000000000000000000000000000000000000..65ce9afa1f364740a3ab1e94b8976c4e445bddf6 --- /dev/null +++ b/bash-5.1/lib/intl/ref-del.sin @@ -0,0 +1,24 @@ +# Remove this package from a list of references stored in a text file. +# +# Copyright (C) 2000 Free Software Foundation, Inc. +# +# 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 . +# +# Written by Bruno Haible . +# +/^# Packages using this file: / { + s/# Packages using this file:// + s/ @PACKAGE@ / / + s/^/# Packages using this file:/ +} diff --git a/bash-5.1/lib/intl/relocatable.c b/bash-5.1/lib/intl/relocatable.c new file mode 100644 index 0000000000000000000000000000000000000000..34b2b183bc19a4a4b919ce197fe6508694673b70 --- /dev/null +++ b/bash-5.1/lib/intl/relocatable.c @@ -0,0 +1,440 @@ +/* relocatable.c - Provide relocatable packages. */ + +/* Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Tell glibc's to provide a prototype for getline(). + This must come before because may include + , and once has been included, it's too late. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +/* Specification. */ +#include "relocatable.h" + +#if ENABLE_RELOCATABLE + +#include +#include +#include +#include + +#ifdef NO_XMALLOC +# define xmalloc malloc +#else +# include "xmalloc.h" +#endif + +#if DEPENDS_ON_LIBCHARSET +# include +#endif +#if DEPENDS_ON_LIBICONV && HAVE_ICONV +# include +#endif +#if DEPENDS_ON_LIBINTL && ENABLE_NLS +# include +#endif + +/* Faked cheap 'bool'. */ +#undef bool +#undef false +#undef true +#define bool int +#define false 0 +#define true 1 + +/* Pathname support. + ISSLASH(C) tests whether C is a directory separator character. + IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. + */ +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +# define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ + && (P)[1] == ':') +# define IS_PATH_WITH_DIR(P) \ + (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) +# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) +#else + /* Unix */ +# define ISSLASH(C) ((C) == '/') +# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) +# define FILESYSTEM_PREFIX_LEN(P) 0 +#endif + +/* Original installation prefix. */ +static char *orig_prefix; +static size_t orig_prefix_len; +/* Current installation prefix. */ +static char *curr_prefix; +static size_t curr_prefix_len; +/* These prefixes do not end in a slash. Anything that will be concatenated + to them must start with a slash. */ + +/* Sets the original and the current installation prefix of this module. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +static void +set_this_relocation_prefix (const char *orig_prefix_arg, + const char *curr_prefix_arg) +{ + if (orig_prefix_arg != NULL && curr_prefix_arg != NULL + /* Optimization: if orig_prefix and curr_prefix are equal, the + relocation is a nop. */ + && strcmp (orig_prefix_arg, curr_prefix_arg) != 0) + { + /* Duplicate the argument strings. */ + char *memory; + + orig_prefix_len = strlen (orig_prefix_arg); + curr_prefix_len = strlen (curr_prefix_arg); + memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1); +#ifdef NO_XMALLOC + if (memory != NULL) +#endif + { + memcpy (memory, orig_prefix_arg, orig_prefix_len + 1); + orig_prefix = memory; + memory += orig_prefix_len + 1; + memcpy (memory, curr_prefix_arg, curr_prefix_len + 1); + curr_prefix = memory; + return; + } + } + orig_prefix = NULL; + curr_prefix = NULL; + /* Don't worry about wasted memory here - this function is usually only + called once. */ +} + +/* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +void +set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) +{ + set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg); + + /* Now notify all dependent libraries. */ +#if DEPENDS_ON_LIBCHARSET + libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); +#endif +#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109 + libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); +#endif +#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix + libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); +#endif +} + +/* Convenience function: + Computes the current installation prefix, based on the original + installation prefix, the original installation directory of a particular + file, and the current pathname of this file. Returns NULL upon failure. */ +#ifdef IN_LIBRARY +#define compute_curr_prefix local_compute_curr_prefix +static +#endif +const char * +compute_curr_prefix (const char *orig_installprefix, + const char *orig_installdir, + const char *curr_pathname) +{ + const char *curr_installdir; + const char *rel_installdir; + + if (curr_pathname == NULL) + return NULL; + + /* Determine the relative installation directory, relative to the prefix. + This is simply the difference between orig_installprefix and + orig_installdir. */ + if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) + != 0) + /* Shouldn't happen - nothing should be installed outside $(prefix). */ + return NULL; + rel_installdir = orig_installdir + strlen (orig_installprefix); + + /* Determine the current installation directory. */ + { + const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname); + const char *p = curr_pathname + strlen (curr_pathname); + char *q; + + while (p > p_base) + { + p--; + if (ISSLASH (*p)) + break; + } + + q = (char *) xmalloc (p - curr_pathname + 1); +#ifdef NO_XMALLOC + if (q == NULL) + return NULL; +#endif + memcpy (q, curr_pathname, p - curr_pathname); + q[p - curr_pathname] = '\0'; + curr_installdir = q; + } + + /* Compute the current installation prefix by removing the trailing + rel_installdir from it. */ + { + const char *rp = rel_installdir + strlen (rel_installdir); + const char *cp = curr_installdir + strlen (curr_installdir); + const char *cp_base = + curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir); + + while (rp > rel_installdir && cp > cp_base) + { + bool same = false; + const char *rpi = rp; + const char *cpi = cp; + + while (rpi > rel_installdir && cpi > cp_base) + { + rpi--; + cpi--; + if (ISSLASH (*rpi) || ISSLASH (*cpi)) + { + if (ISSLASH (*rpi) && ISSLASH (*cpi)) + same = true; + break; + } +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS - case insignificant filesystem */ + if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) + != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) + break; +#else + if (*rpi != *cpi) + break; +#endif + } + if (!same) + break; + /* The last pathname component was the same. opi and cpi now point + to the slash before it. */ + rp = rpi; + cp = cpi; + } + + if (rp > rel_installdir) + /* Unexpected: The curr_installdir does not end with rel_installdir. */ + return NULL; + + { + size_t curr_prefix_len = cp - curr_installdir; + char *curr_prefix; + + curr_prefix = (char *) xmalloc (curr_prefix_len + 1); +#ifdef NO_XMALLOC + if (curr_prefix == NULL) + return NULL; +#endif + memcpy (curr_prefix, curr_installdir, curr_prefix_len); + curr_prefix[curr_prefix_len] = '\0'; + + return curr_prefix; + } + } +} + +#if defined PIC && defined INSTALLDIR + +/* Full pathname of shared library, or NULL. */ +static char *shared_library_fullname; + +#if defined _WIN32 || defined __WIN32__ + +/* Determine the full pathname of the shared library when it is loaded. */ + +BOOL WINAPI +DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) +{ + (void) reserved; + + if (event == DLL_PROCESS_ATTACH) + { + /* The DLL is being loaded into an application's address range. */ + static char location[MAX_PATH]; + + if (!GetModuleFileName (module_handle, location, sizeof (location))) + /* Shouldn't happen. */ + return FALSE; + + if (!IS_PATH_WITH_DIR (location)) + /* Shouldn't happen. */ + return FALSE; + + shared_library_fullname = strdup (location); + } + + return TRUE; +} + +#else /* Unix */ + +static void +find_shared_library_fullname () +{ +#ifdef __linux__ + FILE *fp; + + /* Open the current process' maps file. It describes one VMA per line. */ + fp = fopen ("/proc/self/maps", "r"); + if (fp) + { + unsigned long address = (unsigned long) &find_shared_library_fullname; + for (;;) + { + unsigned long start, end; + int c; + + if (fscanf (fp, "%lx-%lx", &start, &end) != 2) + break; + if (address >= start && address <= end - 1) + { + /* Found it. Now see if this line contains a filename. */ + while (c = getc (fp), c != EOF && c != '\n' && c != '/') + continue; + if (c == '/') + { + size_t size; + int len; + + ungetc (c, fp); + shared_library_fullname = NULL; size = 0; + len = getline (&shared_library_fullname, &size, fp); + if (len >= 0) + { + /* Success: filled shared_library_fullname. */ + if (len > 0 && shared_library_fullname[len - 1] == '\n') + shared_library_fullname[len - 1] = '\0'; + } + } + break; + } + while (c = getc (fp), c != EOF && c != '\n') + continue; + } + fclose (fp); + } +#endif +} + +#endif /* WIN32 / Unix */ + +/* Return the full pathname of the current shared library. + Return NULL if unknown. + Guaranteed to work only on Linux and Woe32. */ +static char * +get_shared_library_fullname () +{ +#if !(defined _WIN32 || defined __WIN32__) + static bool tried_find_shared_library_fullname; + if (!tried_find_shared_library_fullname) + { + find_shared_library_fullname (); + tried_find_shared_library_fullname = true; + } +#endif + return shared_library_fullname; +} + +#endif /* PIC */ + +/* Returns the pathname, relocated according to the current installation + directory. */ +const char * +relocate (const char *pathname) +{ +#if defined PIC && defined INSTALLDIR + static int initialized; + + /* Initialization code for a shared library. */ + if (!initialized) + { + /* At this point, orig_prefix and curr_prefix likely have already been + set through the main program's set_program_name_and_installdir + function. This is sufficient in the case that the library has + initially been installed in the same orig_prefix. But we can do + better, to also cover the cases that 1. it has been installed + in a different prefix before being moved to orig_prefix and (later) + to curr_prefix, 2. unlike the program, it has not moved away from + orig_prefix. */ + const char *orig_installprefix = INSTALLPREFIX; + const char *orig_installdir = INSTALLDIR; + const char *curr_prefix_better; + + curr_prefix_better = + compute_curr_prefix (orig_installprefix, orig_installdir, + get_shared_library_fullname ()); + if (curr_prefix_better == NULL) + curr_prefix_better = curr_prefix; + + set_relocation_prefix (orig_installprefix, curr_prefix_better); + + initialized = 1; + } +#endif + + /* Note: It is not necessary to perform case insensitive comparison here, + even for DOS-like filesystems, because the pathname argument was + typically created from the same Makefile variable as orig_prefix came + from. */ + if (orig_prefix != NULL && curr_prefix != NULL + && strncmp (pathname, orig_prefix, orig_prefix_len) == 0) + { + if (pathname[orig_prefix_len] == '\0') + /* pathname equals orig_prefix. */ + return curr_prefix; + if (ISSLASH (pathname[orig_prefix_len])) + { + /* pathname starts with orig_prefix. */ + const char *pathname_tail = &pathname[orig_prefix_len]; + char *result = + (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); + +#ifdef NO_XMALLOC + if (result != NULL) +#endif + { + memcpy (result, curr_prefix, curr_prefix_len); + strcpy (result + curr_prefix_len, pathname_tail); + return result; + } + } + } + /* Nothing to relocate. */ + return pathname; +} + +#endif diff --git a/bash-5.1/lib/intl/relocatable.h b/bash-5.1/lib/intl/relocatable.h new file mode 100644 index 0000000000000000000000000000000000000000..de57f446db5e3513a387434825c5c987c40e7141 --- /dev/null +++ b/bash-5.1/lib/intl/relocatable.h @@ -0,0 +1,69 @@ +/* relocatable.h - Provide relocatable packages. */ + +/* Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _RELOCATABLE_H +#define _RELOCATABLE_H + +/* This can be enabled through the configure --enable-relocatable option. */ +#if ENABLE_RELOCATABLE + +/* When building a DLL, we must export some functions. Note that because + this is a private .h file, we don't need to use __declspec(dllimport) + in any case. */ +#if defined _MSC_VER && BUILDING_DLL +# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) +#else +# define RELOCATABLE_DLL_EXPORTED +#endif + +/* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +extern RELOCATABLE_DLL_EXPORTED void + set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + +/* Returns the pathname, relocated according to the current installation + directory. */ +extern const char * relocate (const char *pathname); + +/* Memory management: relocate() leaks memory, because it has to construct + a fresh pathname. If this is a problem because your program calls + relocate() frequently, think about caching the result. */ + +/* Convenience function: + Computes the current installation prefix, based on the original + installation prefix, the original installation directory of a particular + file, and the current pathname of this file. Returns NULL upon failure. */ +extern const char * compute_curr_prefix (const char *orig_installprefix, + const char *orig_installdir, + const char *curr_pathname); + +#else + +/* By default, we use the hardwired pathnames. */ +#define relocate(pathname) (pathname) + +#endif + +#endif /* _RELOCATABLE_H */ diff --git a/bash-5.1/lib/intl/textdomain.c b/bash-5.1/lib/intl/textdomain.c new file mode 100644 index 0000000000000000000000000000000000000000..4bb0e800a68ea50df54bfb58dde7f0a98ddde86e --- /dev/null +++ b/bash-5.1/lib/intl/textdomain.c @@ -0,0 +1,144 @@ +/* textdomain.c - Implementation of the textdomain(3) function. */ + +/* Copyright (C) 1995-1998, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#ifdef _LIBC +# include +#else +# include "libgnuintl.h" +#endif +#include "gettextP.h" + +#ifdef _LIBC +/* We have to handle multi-threaded applications. */ +# include +#else +/* Provide dummy implementation if this is outside glibc. */ +# define __libc_rwlock_define(CLASS, NAME) +# define __libc_rwlock_wrlock(NAME) +# define __libc_rwlock_unlock(NAME) +#endif + +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_default_domain libintl_nl_default_default_domain +# define _nl_current_default_domain libintl_nl_current_default_domain +#endif + +/* @@ end of prolog @@ */ + +/* Name of the default text domain. */ +extern const char _nl_default_default_domain[] attribute_hidden; + +/* Default text domain in which entries for gettext(3) are to be found. */ +extern const char *_nl_current_default_domain attribute_hidden; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define TEXTDOMAIN __textdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define TEXTDOMAIN libintl_textdomain +#endif + +/* Lock variable to protect the global data in the gettext implementation. */ +__libc_rwlock_define (extern, _nl_state_lock attribute_hidden) + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +char * +TEXTDOMAIN (domainname) + const char *domainname; +{ + char *new_domain; + char *old_domain; + + /* A NULL pointer requests the current setting. */ + if (domainname == NULL) + return (char *) _nl_current_default_domain; + + __libc_rwlock_wrlock (_nl_state_lock); + + old_domain = (char *) _nl_current_default_domain; + + /* If domain name is the null string set to default domain "messages". */ + if (domainname[0] == '\0' + || strcmp (domainname, _nl_default_default_domain) == 0) + { + _nl_current_default_domain = _nl_default_default_domain; + new_domain = (char *) _nl_current_default_domain; + } + else if (strcmp (domainname, old_domain) == 0) + /* This can happen and people will use it to signal that some + environment variable changed. */ + new_domain = old_domain; + else + { + /* If the following malloc fails `_nl_current_default_domain' + will be NULL. This value will be returned and so signals we + are out of core. */ +#if defined _LIBC || defined HAVE_STRDUP + new_domain = strdup (domainname); +#else + size_t len = strlen (domainname) + 1; + new_domain = (char *) malloc (len); + if (new_domain != NULL) + memcpy (new_domain, domainname, len); +#endif + + if (new_domain != NULL) + _nl_current_default_domain = new_domain; + } + + /* We use this possibility to signal a change of the loaded catalogs + since this is most likely the case and there is no other easy we + to do it. Do it only when the call was successful. */ + if (new_domain != NULL) + { + ++_nl_msg_cat_cntr; + + if (old_domain != new_domain && old_domain != _nl_default_default_domain) + free (old_domain); + } + + __libc_rwlock_unlock (_nl_state_lock); + + return new_domain; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__textdomain, textdomain); +#endif diff --git a/bash-5.1/lib/malloc/Makefile.in b/bash-5.1/lib/malloc/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..0ef3cfd5362ea500d3ee00f93a7f0b4c53d838a4 --- /dev/null +++ b/bash-5.1/lib/malloc/Makefile.in @@ -0,0 +1,138 @@ +# Skeleton Makefile for the GNU malloc code +# +# Copyright (C) 1996-2009 Free Software Foundation, Inc. + +# 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 . + +srcdir = @srcdir@ +VPATH = @srcdir@ +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CC = @CC@ +RANLIB = @RANLIB@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +RM = rm -f +CP = cp +MV = mv + +SHELL = @MAKE_SHELL@ + +PROFILE_FLAGS = @PROFILE_FLAGS@ + +CFLAGS = @CFLAGS@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ + +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +LIBBUILD = ${BUILD_DIR}/lib + +BASHINCDIR = ${topdir}/include + +INTL_LIBSRC = ${topdir}/lib/intl +INTL_BUILDDIR = ${LIBBUILD}/intl +INTL_INC = @INTL_INC@ +LIBINTL_H = @LIBINTL_H@ + +INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib $(INTL_INC) + +CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \ + $(CFLAGS) $(MALLOC_CFLAGS) $(CPPFLAGS) + +.c.o: + $(CC) $(CCFLAGS) -c $< + +.s.o: + $(CC) $(CCFLAGS) -c $< + +MALLOC_SOURCE = malloc.c +STUB_SOURCE = stub.c + +ALLOCA_SOURCE = alloca.c +ALLOCA_OBJECT = alloca.o + +MALLOC_SRC = @MALLOC_SRC@ +MALLOC = @MALLOC@ +ALLOCA = @ALLOCA@ + +MALLOC_OBJS = malloc.o $(ALLOCA) trace.o stats.o table.o watch.o +STUB_OBJS = $(ALLOCA) stub.o + +.PHONY: malloc stubmalloc + +all: malloc + +malloc: ${MALLOC_OBJS} + ${RM} libmalloc.a + ${AR} ${ARFLAGS} libmalloc.a ${MALLOC_OBJS} + -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a + +stubmalloc: ${STUB_OBJS} + ${RM} libmalloc.a + ${AR} ${ARFLAGS} libmalloc.a ${STUB_OBJS} + -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a + +alloca: ${ALLOCA} + ${RM} libmalloc.a + ${AR} ${ARFLAGS} libmalloc.a ${ALLOCA} + -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a + +alloca.o: $(srcdir)/$(ALLOCA_SOURCE) + $(CC) $(CCFLAGS) -c $(srcdir)/$(ALLOCA_SOURCE) + @- if test "$(ALLOCA_OBJECT)" != alloca.o ; then \ + mv $(ALLOCA_OBJECT) alloca.o >/dev/null 2>&1 ; \ + fi + +mostlyclean clean: + $(RM) *.o libmalloc.a + +distclean realclean maintainer-clean: clean + $(RM) Makefile + +alloca.o: $(BUILD_DIR)/config.h +malloc.o: $(BUILD_DIR)/config.h $(topdir)/bashtypes.h getpagesize.h +xmalloc.o: $(BUILD_DIR)/config.h $(BASHINCDIR)/ansi_stdlib.h +trace.o: ${BUILD_DIR}/config.h +stats.o: ${BUILD_DIR}/config.h +table.o: ${BUILD_DIR}/config.h +watch.o: ${BUILD_DIR}/config.h + +malloc.o: ${srcdir}/imalloc.h ${srcdir}/mstats.h +malloc.o: ${srcdir}/table.h ${srcdir}/watch.h +stats.o: ${srcdir}/imalloc.h ${srcdir}/mstats.h +trace.o: ${srcdir}/imalloc.h +table.o: ${srcdir}/imalloc.h ${srcdir}/table.h +watch.o: ${srcdir}/imalloc.h ${srcdir}/watch.h + +malloc.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h +stats.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h +trace.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h +table.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h +watch.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + +# Rules for deficient makes, like SunOS and Solaris +stub.o: stub.c +malloc.o: malloc.c +table.o: table.c +trace.o: trace.c +stats.o: stats.c +watch.o: watch.c diff --git a/bash-5.1/lib/malloc/alloca.c b/bash-5.1/lib/malloc/alloca.c new file mode 100644 index 0000000000000000000000000000000000000000..26319c2d38cead3516c8e7ad3eca1125ec2df4b7 --- /dev/null +++ b/bash-5.1/lib/malloc/alloca.c @@ -0,0 +1,482 @@ +/* alloca.c -- allocate automatically reclaimed memory + (Mostly) portable public-domain implementation -- D A Gwyn + + This implementation of the PWB library alloca function, + which is used to allocate space off the run-time stack so + that it is automatically reclaimed upon procedure exit, + was inspired by discussions with J. Q. Johnson of Cornell. + J.Otto Tennant contributed the Cray support. + + There are some preprocessor constants that can + be defined when compiling for your specific system, for + improved efficiency; however, the defaults should be okay. + + The general concept of this implementation is to keep + track of all alloca-allocated blocks, and reclaim any + that are found to be deeper in the stack than the current + invocation. This heuristic does not reclaim storage as + soon as it becomes invalid, but it will do so eventually. + + As a special case, alloca(0) reclaims storage without + allocating any. It is a good idea to use alloca(0) in + your main control loop, etc. to force garbage collection. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* If compiling with GCC 2, this file's not needed. */ +#if !defined (__GNUC__) || __GNUC__ < 2 + +#include /* for size_t */ + +/* If alloca is defined somewhere, this file is not needed. */ +#ifndef alloca + +#ifdef emacs +#ifdef static +/* actually, only want this if static is defined as "" + -- this is for usg, in which emacs must undefine static + in order to make unexec workable + */ +#ifndef STACK_DIRECTION +you +lose +-- must know STACK_DIRECTION at compile-time +#endif /* STACK_DIRECTION undefined */ +#endif /* static */ +#endif /* emacs */ + +/* If your stack is a linked list of frames, you have to + provide an "address metric" ADDRESS_FUNCTION macro. */ + +#if defined (CRAY) && defined (CRAY_STACKSEG_END) +long i00afunc (); +#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) +#else +#define ADDRESS_FUNCTION(arg) &(arg) +#endif /* CRAY && CRAY_STACKSEG_END */ + +#if __STDC__ +typedef void *pointer; +#else +typedef char *pointer; +#endif + +#define NULL 0 + +/* Different portions of Emacs need to call different versions of + malloc. The Emacs executable needs alloca to call xmalloc, because + ordinary malloc isn't protected from input signals. On the other + hand, the utilities in lib-src need alloca to call malloc; some of + them are very simple, and don't have an xmalloc routine. + + Non-Emacs programs expect this to call use xmalloc. + + Callers below should use malloc. */ + +#ifndef emacs +#define malloc xmalloc +extern pointer xmalloc (); +#endif + +/* Define STACK_DIRECTION if you know the direction of stack + growth for your system; otherwise it will be automatically + deduced at run-time. + + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ + +#ifndef STACK_DIRECTION +#define STACK_DIRECTION 0 /* Direction unknown. */ +#endif + +#if STACK_DIRECTION != 0 + +#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ + +#else /* STACK_DIRECTION == 0; need run-time code. */ + +static int stack_dir; /* 1 or -1 once known. */ +#define STACK_DIR stack_dir + +static void +find_stack_direction () +{ + static char *addr = NULL; /* Address of first `dummy', once known. */ + auto char dummy; /* To get stack address. */ + + if (addr == NULL) + { /* Initial entry. */ + addr = ADDRESS_FUNCTION (dummy); + + find_stack_direction (); /* Recurse once. */ + } + else + { + /* Second entry. */ + if (ADDRESS_FUNCTION (dummy) > addr) + stack_dir = 1; /* Stack grew upward. */ + else + stack_dir = -1; /* Stack grew downward. */ + } +} + +#endif /* STACK_DIRECTION == 0 */ + +/* An "alloca header" is used to: + (a) chain together all alloca'ed blocks; + (b) keep track of stack depth. + + It is very important that sizeof(header) agree with malloc + alignment chunk size. The following default should work okay. */ + +#ifndef ALIGN_SIZE +#define ALIGN_SIZE sizeof(double) +#endif + +typedef union hdr +{ + char align[ALIGN_SIZE]; /* To force sizeof(header). */ + struct + { + union hdr *next; /* For chaining headers. */ + char *deep; /* For stack depth measure. */ + } h; +} header; + +static header *last_alloca_header = NULL; /* -> last alloca header. */ + +/* Return a pointer to at least SIZE bytes of storage, + which will be automatically reclaimed upon exit from + the procedure that called alloca. Originally, this space + was supposed to be taken from the current stack frame of the + caller, but that method cannot be made to work for some + implementations of C, for example under Gould's UTX/32. */ + +pointer +alloca (size) + size_t size; +{ + auto char probe; /* Probes stack depth: */ + register char *depth = ADDRESS_FUNCTION (probe); + +#if STACK_DIRECTION == 0 + if (STACK_DIR == 0) /* Unknown growth direction. */ + find_stack_direction (); +#endif + + /* Reclaim garbage, defined as all alloca'd storage that + was allocated from deeper in the stack than currently. */ + + { + register header *hp; /* Traverses linked list. */ + + for (hp = last_alloca_header; hp != NULL;) + if ((STACK_DIR > 0 && hp->h.deep > depth) + || (STACK_DIR < 0 && hp->h.deep < depth)) + { + register header *np = hp->h.next; + + free ((pointer) hp); /* Collect garbage. */ + + hp = np; /* -> next header. */ + } + else + break; /* Rest are not deeper. */ + + last_alloca_header = hp; /* -> last valid storage. */ + } + + if (size == 0) + return NULL; /* No allocation required. */ + + /* Allocate combined header + user data storage. */ + + { + register pointer new = malloc (sizeof (header) + size); + /* Address of header. */ + + ((header *) new)->h.next = last_alloca_header; + ((header *) new)->h.deep = depth; + + last_alloca_header = (header *) new; + + /* User storage begins just after header. */ + + return (pointer) ((char *) new + sizeof (header)); + } +} + +#if defined (CRAY) && defined (CRAY_STACKSEG_END) + +#ifdef DEBUG_I00AFUNC +#include +#endif + +#ifndef CRAY_STACK +#define CRAY_STACK +#ifndef CRAY2 +/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ +struct stack_control_header + { + long shgrow:32; /* Number of times stack has grown. */ + long shaseg:32; /* Size of increments to stack. */ + long shhwm:32; /* High water mark of stack. */ + long shsize:32; /* Current size of stack (all segments). */ + }; + +/* The stack segment linkage control information occurs at + the high-address end of a stack segment. (The stack + grows from low addresses to high addresses.) The initial + part of the stack segment linkage control information is + 0200 (octal) words. This provides for register storage + for the routine which overflows the stack. */ + +struct stack_segment_linkage + { + long ss[0200]; /* 0200 overflow words. */ + long sssize:32; /* Number of words in this segment. */ + long ssbase:32; /* Offset to stack base. */ + long:32; + long sspseg:32; /* Offset to linkage control of previous + segment of stack. */ + long:32; + long sstcpt:32; /* Pointer to task common address block. */ + long sscsnm; /* Private control structure number for + microtasking. */ + long ssusr1; /* Reserved for user. */ + long ssusr2; /* Reserved for user. */ + long sstpid; /* Process ID for pid based multi-tasking. */ + long ssgvup; /* Pointer to multitasking thread giveup. */ + long sscray[7]; /* Reserved for Cray Research. */ + long ssa0; + long ssa1; + long ssa2; + long ssa3; + long ssa4; + long ssa5; + long ssa6; + long ssa7; + long sss0; + long sss1; + long sss2; + long sss3; + long sss4; + long sss5; + long sss6; + long sss7; + }; + +#else /* CRAY2 */ +/* The following structure defines the vector of words + returned by the STKSTAT library routine. */ +struct stk_stat + { + long now; /* Current total stack size. */ + long maxc; /* Amount of contiguous space which would + be required to satisfy the maximum + stack demand to date. */ + long high_water; /* Stack high-water mark. */ + long overflows; /* Number of stack overflow ($STKOFEN) calls. */ + long hits; /* Number of internal buffer hits. */ + long extends; /* Number of block extensions. */ + long stko_mallocs; /* Block allocations by $STKOFEN. */ + long underflows; /* Number of stack underflow calls ($STKRETN). */ + long stko_free; /* Number of deallocations by $STKRETN. */ + long stkm_free; /* Number of deallocations by $STKMRET. */ + long segments; /* Current number of stack segments. */ + long maxs; /* Maximum number of stack segments so far. */ + long pad_size; /* Stack pad size. */ + long current_address; /* Current stack segment address. */ + long current_size; /* Current stack segment size. This + number is actually corrupted by STKSTAT to + include the fifteen word trailer area. */ + long initial_address; /* Address of initial segment. */ + long initial_size; /* Size of initial segment. */ + }; + +/* The following structure describes the data structure which trails + any stack segment. I think that the description in 'asdef' is + out of date. I only describe the parts that I am sure about. */ + +struct stk_trailer + { + long this_address; /* Address of this block. */ + long this_size; /* Size of this block (does not include + this trailer). */ + long unknown2; + long unknown3; + long link; /* Address of trailer block of previous + segment. */ + long unknown5; + long unknown6; + long unknown7; + long unknown8; + long unknown9; + long unknown10; + long unknown11; + long unknown12; + long unknown13; + long unknown14; + }; + +#endif /* CRAY2 */ +#endif /* not CRAY_STACK */ + +#ifdef CRAY2 +/* Determine a "stack measure" for an arbitrary ADDRESS. + I doubt that "lint" will like this much. */ + +static long +i00afunc (long *address) +{ + struct stk_stat status; + struct stk_trailer *trailer; + long *block, size; + long result = 0; + + /* We want to iterate through all of the segments. The first + step is to get the stack status structure. We could do this + more quickly and more directly, perhaps, by referencing the + $LM00 common block, but I know that this works. */ + + STKSTAT (&status); + + /* Set up the iteration. */ + + trailer = (struct stk_trailer *) (status.current_address + + status.current_size + - 15); + + /* There must be at least one stack segment. Therefore it is + a fatal error if "trailer" is null. */ + + if (trailer == 0) + abort (); + + /* Discard segments that do not contain our argument address. */ + + while (trailer != 0) + { + block = (long *) trailer->this_address; + size = trailer->this_size; + if (block == 0 || size == 0) + abort (); + trailer = (struct stk_trailer *) trailer->link; + if ((block <= address) && (address < (block + size))) + break; + } + + /* Set the result to the offset in this segment and add the sizes + of all predecessor segments. */ + + result = address - block; + + if (trailer == 0) + { + return result; + } + + do + { + if (trailer->this_size <= 0) + abort (); + result += trailer->this_size; + trailer = (struct stk_trailer *) trailer->link; + } + while (trailer != 0); + + /* We are done. Note that if you present a bogus address (one + not in any segment), you will get a different number back, formed + from subtracting the address of the first block. This is probably + not what you want. */ + + return (result); +} + +#else /* not CRAY2 */ +/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. + Determine the number of the cell within the stack, + given the address of the cell. The purpose of this + routine is to linearize, in some sense, stack addresses + for alloca. */ + +static long +i00afunc (long address) +{ + long stkl = 0; + + long size, pseg, this_segment, stack; + long result = 0; + + struct stack_segment_linkage *ssptr; + + /* Register B67 contains the address of the end of the + current stack segment. If you (as a subprogram) store + your registers on the stack and find that you are past + the contents of B67, you have overflowed the segment. + + B67 also points to the stack segment linkage control + area, which is what we are really interested in. */ + + /* This might be _getb67() or GETB67 () or getb67 () */ + stkl = CRAY_STACKSEG_END (); + ssptr = (struct stack_segment_linkage *) stkl; + + /* If one subtracts 'size' from the end of the segment, + one has the address of the first word of the segment. + + If this is not the first segment, 'pseg' will be + nonzero. */ + + pseg = ssptr->sspseg; + size = ssptr->sssize; + + this_segment = stkl - size; + + /* It is possible that calling this routine itself caused + a stack overflow. Discard stack segments which do not + contain the target address. */ + + while (!(this_segment <= address && address <= stkl)) + { +#ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); +#endif + if (pseg == 0) + break; + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + this_segment = stkl - size; + } + + result = address - this_segment; + + /* If you subtract pseg from the current end of the stack, + you get the address of the previous stack segment's end. + This seems a little convoluted to me, but I'll bet you save + a cycle somewhere. */ + + while (pseg != 0) + { +#ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o\n", pseg, size); +#endif + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + result += size; + } + return (result); +} + +#endif /* not CRAY2 */ +#endif /* CRAY && CRAY_STACKSEG_END */ + +#endif /* no alloca */ +#endif /* !__GNUC__ || __GNUC__ < 2 */ diff --git a/bash-5.1/lib/malloc/getpagesize.h b/bash-5.1/lib/malloc/getpagesize.h new file mode 100644 index 0000000000000000000000000000000000000000..a59eabebe2f8526ad0a684d147ed67b2f3595e73 --- /dev/null +++ b/bash-5.1/lib/malloc/getpagesize.h @@ -0,0 +1,60 @@ +/* Emulation of getpagesize() for systems that need it. + Copyright (C) 1991-2003 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +# if defined (_SC_PAGESIZE) +# define getpagesize() sysconf(_SC_PAGESIZE) +# else +# if defined (_SC_PAGE_SIZE) +# define getpagesize() sysconf(_SC_PAGE_SIZE) +# endif /* _SC_PAGE_SIZE */ +# endif /* _SC_PAGESIZE */ +#endif + +#if !defined (getpagesize) +# if defined (HAVE_SYS_PARAM_H) +# include +# endif +# if defined (PAGESIZE) +# define getpagesize() PAGESIZE +# else /* !PAGESIZE */ +# if defined (EXEC_PAGESIZE) +# define getpagesize() EXEC_PAGESIZE +# else /* !EXEC_PAGESIZE */ +# if defined (NBPG) +# if !defined (CLSIZE) +# define CLSIZE 1 +# endif /* !CLSIZE */ +# define getpagesize() (NBPG * CLSIZE) +# else /* !NBPG */ +# if defined (NBPC) +# define getpagesize() NBPC +# endif /* NBPC */ +# endif /* !NBPG */ +# endif /* !EXEC_PAGESIZE */ +# endif /* !PAGESIZE */ +#endif /* !getpagesize */ + +#if !defined (getpagesize) +# define getpagesize() 4096 /* Just punt and use reasonable value */ +#endif diff --git a/bash-5.1/lib/malloc/i386-alloca.s b/bash-5.1/lib/malloc/i386-alloca.s new file mode 100644 index 0000000000000000000000000000000000000000..01b2cfed8e78c7a5bd54f616a120ff074cf041d2 --- /dev/null +++ b/bash-5.1/lib/malloc/i386-alloca.s @@ -0,0 +1,16 @@ + .file "alloca.s" + .text + .align 4 + .def alloca; .val alloca; .scl 2; .type 044; .endef + .globl alloca +alloca: + popl %edx + popl %eax + addl $3,%eax + andl $0xfffffffc,%eax + subl %eax,%esp + movl %esp,%eax + pushl %eax + pushl %edx + ret + .def alloca; .val .; .scl -1; .endef diff --git a/bash-5.1/lib/malloc/imalloc.h b/bash-5.1/lib/malloc/imalloc.h new file mode 100644 index 0000000000000000000000000000000000000000..d07adac2a211eb68d553d24adc076e020be13bf0 --- /dev/null +++ b/bash-5.1/lib/malloc/imalloc.h @@ -0,0 +1,173 @@ +/* imalloc.h -- internal malloc definitions shared by source files. */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Must be included *after* config.h */ + +#ifndef _IMALLOC_H +#define _IMALLOC_H + +#ifdef MALLOC_DEBUG +#define MALLOC_STATS +#define MALLOC_TRACE +#define MALLOC_REGISTER +#define MALLOC_WATCH +#endif + +#define MALLOC_WRAPFUNCS + +/* Generic pointer type. */ +#ifndef PTR_T +# if defined (__STDC__) +# define PTR_T void * +# else +# define PTR_T char * +# endif +#endif + +#if !defined (NULL) +# define NULL 0 +#endif + +#if !defined (CPP_STRING) +# if defined (HAVE_STRINGIZE) +# define CPP_STRING(x) #x +# else +# define CPP_STRING(x) "x" +# endif /* !HAVE_STRINGIZE */ +#endif /* !__STRING */ + +#if __GNUC__ > 1 +# define FASTCOPY(s, d, n) __builtin_memcpy (d, s, n) +#else /* !__GNUC__ */ +# if !defined (HAVE_BCOPY) +# if !defined (HAVE_MEMMOVE) +# define FASTCOPY(s, d, n) memcpy (d, s, n) +# else +# define FASTCOPY(s, d, n) memmove (d, s, n) +# endif /* !HAVE_MEMMOVE */ +# else /* HAVE_BCOPY */ +# define FASTCOPY(s, d, n) bcopy (s, d, n) +# endif /* HAVE_BCOPY */ +#endif /* !__GNUC__ */ + +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +/* Use Duff's device for good zeroing/copying performance. DO NOT call the + Duff's device macros with NBYTES == 0. */ + +#define MALLOC_BZERO(charp, nbytes) \ +do { \ + if ((nbytes) <= 32) { \ + size_t * mzp = (size_t *)(charp); \ + unsigned long mctmp = (nbytes)/sizeof(size_t); \ + long mcn; \ + if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \ + switch (mctmp) { \ + case 0: for(;;) { *mzp++ = 0; \ + case 7: *mzp++ = 0; \ + case 6: *mzp++ = 0; \ + case 5: *mzp++ = 0; \ + case 4: *mzp++ = 0; \ + case 3: *mzp++ = 0; \ + case 2: *mzp++ = 0; \ + case 1: *mzp++ = 0; if(mcn <= 0) break; mcn--; } \ + } \ + else \ + memset ((charp), 0, (nbytes)); \ +} while(0) + +#define MALLOC_ZERO(charp, nbytes) \ +do { \ + size_t mzsz = (nbytes); \ + if (mzsz <= 9 * sizeof(mzsz) { \ + size_t *mz = (size_t *)(charp); \ + if(mzsz >= 5*sizeof(mzsz)) { *mz++ = 0; \ + *mz++ = 0; \ + if(mzsz >= 7*sizeof(mzsz)) { *mz++ = 0; \ + *mz++ = 0; \ + if(mzsz >= 9*sizeof(mzsz)) { *mz++ = 0; \ + *mz++ = 0; }}} \ + *mz++ = 0; \ + *mz++ = 0; \ + *mz = 0; \ + } else \ + memset ((charp), 0, mzsz); \ +} while (0) + +#define MALLOC_MEMSET(charp, xch, nbytes) \ +do { \ + if ((nbytes) <= 32) { \ + register char * mzp = (charp); \ + unsigned long mctmp = (nbytes); \ + register long mcn; \ + if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \ + switch (mctmp) { \ + case 0: for(;;) { *mzp++ = xch; \ + case 7: *mzp++ = xch; \ + case 6: *mzp++ = xch; \ + case 5: *mzp++ = xch; \ + case 4: *mzp++ = xch; \ + case 3: *mzp++ = xch; \ + case 2: *mzp++ = xch; \ + case 1: *mzp++ = xch; if(mcn <= 0) break; mcn--; } \ + } \ + } else \ + memset ((charp), (xch), (nbytes)); \ +} while(0) + +#define MALLOC_MEMCPY(dest,src,nbytes) \ +do { \ + if ((nbytes) <= 32) { \ + size_t* mcsrc = (size_t*) src; \ + size_t* mcdst = (size_t*) dest; \ + unsigned long mctmp = (nbytes)/sizeof(size_t); \ + long mcn; \ + if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \ + switch (mctmp) { \ + case 0: for(;;) { *mcdst++ = *mcsrc++; \ + case 7: *mcdst++ = *mcsrc++; \ + case 6: *mcdst++ = *mcsrc++; \ + case 5: *mcdst++ = *mcsrc++; \ + case 4: *mcdst++ = *mcsrc++; \ + case 3: *mcdst++ = *mcsrc++; \ + case 2: *mcdst++ = *mcsrc++; \ + case 1: *mcdst++ = *mcsrc++; if(mcn <= 0) break; mcn--; } \ + } else \ + memcpy ((dest), (src), (nbytes)) \ +} while(0) + +#if defined (SHELL) +# include "bashintl.h" +#else +# define _(x) x +#endif + +#include + +extern void _malloc_block_signals PARAMS((sigset_t *, sigset_t *)); +extern void _malloc_unblock_signals PARAMS((sigset_t *, sigset_t *)); + +#endif /* _IMALLOC_H */ diff --git a/bash-5.1/lib/malloc/malloc.c b/bash-5.1/lib/malloc/malloc.c new file mode 100644 index 0000000000000000000000000000000000000000..439f8ef11af247b5e53f0512543a0e6ddd122002 --- /dev/null +++ b/bash-5.1/lib/malloc/malloc.c @@ -0,0 +1,1481 @@ +/* malloc.c - dynamic memory allocation for bash. */ + +/* Copyright (C) 1985-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* + * @(#)nmalloc.c 1 (Caltech) 2/21/82 + * + * U of M Modified: 20 Jun 1983 ACT: strange hacks for Emacs + * + * Nov 1983, Mike@BRL, Added support for 4.1C/4.2 BSD. + * + * [VERY] old explanation: + * + * This is a very fast storage allocator. It allocates blocks of a small + * number of different sizes, and keeps free lists of each size. Blocks + * that don't exactly fit are passed up to the next larger size. In this + * implementation, the available sizes are (2^n)-4 (or -16) bytes long. + * This is designed for use in a program that uses vast quantities of + * memory, but bombs when it runs out. To make it a little better, it + * warns the user when he starts to get near the end. + * + * June 84, ACT: modified rcheck code to check the range given to malloc, + * rather than the range determined by the 2-power used. + * + * Jan 85, RMS: calls malloc_warning to issue warning on nearly full. + * No longer Emacs-specific; can serve as all-purpose malloc for GNU. + * You should call malloc_init to reinitialize after loading dumped Emacs. + * Call malloc_stats to get info on memory stats if MALLOC_STATS turned on. + * realloc knows how to return same block given, just changing its size, + * if the power of 2 is correct. + */ + +/* + * nextf[i] is the pointer to the next free block of size 2^(i+3). The + * smallest allocatable block is 8 bytes. The overhead information will + * go in the first int of the block, and the returned pointer will point + * to the second. + */ + +/* Define MEMSCRAMBLE to have free() write 0xcf into memory as it's freed, to + uncover callers that refer to freed memory, and to have malloc() write 0xdf + into memory as it's allocated to avoid referring to previous contents. */ + +/* SCO 3.2v4 getcwd and possibly other libc routines fail with MEMSCRAMBLE; + handled by configure. */ + +#if defined (HAVE_CONFIG_H) +# include +#endif /* HAVE_CONFIG_H */ + +#if defined (SHELL) +# include "bashtypes.h" +# include "stdc.h" +#else +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +/* Determine which kind of system this is. */ +#include + +#if defined (HAVE_STRING_H) +# include +#else +# include +#endif +#include +#include + +#if !defined (botch) +#include +#endif + +#if defined (HAVE_MMAP) +#include +#endif + +/* Define getpagesize () if the system does not. */ +#ifndef HAVE_GETPAGESIZE +# include "getpagesize.h" +#endif + +#include "imalloc.h" +#ifdef MALLOC_STATS +# include "mstats.h" +#endif +#ifdef MALLOC_REGISTER +# include "table.h" +#endif +#ifdef MALLOC_WATCH +# include "watch.h" +#endif + +#ifdef powerof2 +# undef powerof2 +#endif +/* Could also use (((x) & -(x)) == (x)) */ +#define powerof2(x) ((((x) - 1) & (x)) == 0) + +/* System-specific omissions. */ +#ifdef HPUX +# define NO_VALLOC +#endif + +/* SIZEOF_LONG * 4 - 2, usable bins from 1..NBUCKETS-1 */ +#define NBUCKETS 30 + +#define ISALLOC ((char) 0xf7) /* magic byte that implies allocation */ +#define ISFREE ((char) 0x54) /* magic byte that implies free block */ + /* this is for error checking only */ +#define ISMEMALIGN ((char) 0xd6) /* Stored before the value returned by + memalign, with the rest of the word + being the distance to the true + beginning of the block. */ + + +/* We have a flag indicating whether memory is allocated, an index in + nextf[], a size field, and a sentinel value to determine whether or + not a caller wrote before the start of allocated memory; to realloc() + memory we either copy mh_nbytes or just change mh_nbytes if there is + enough room in the block for the new size. Range checking is always + done. */ +union mhead { +#if SIZEOF_CHAR_P == 8 + bits64_t mh_align[2]; /* 16 */ +#else + bits64_t mh_align; /* 8 */ +#endif + struct { + char mi_alloc; /* ISALLOC or ISFREE */ /* 1 */ + char mi_index; /* index in nextf[] */ /* 1 */ + /* Remainder are valid only when block is allocated */ + u_bits16_t mi_magic2; /* should be == MAGIC2 */ /* 2 */ + u_bits32_t mi_nbytes; /* # of bytes allocated */ /* 4 */ +#if SIZEOF_CHAR_P == 8 + char mi_magic8[8]; /* MAGIC1 guard bytes */ /* 8 */ +#endif + } minfo; +}; +#define mh_alloc minfo.mi_alloc +#define mh_index minfo.mi_index +#define mh_nbytes minfo.mi_nbytes +#define mh_magic2 minfo.mi_magic2 +#define mh_magic8 minfo.mi_magic8 + +#define MOVERHEAD sizeof(union mhead) + +#if SIZEOF_CHAR_P == 8 +#define MALIGN_MASK 15 +#else +#define MALIGN_MASK 7 /* one less than desired alignment */ +#endif + +typedef union _malloc_guard { + char s[4]; + u_bits32_t i; +} mguard_t; + +/* Access free-list pointer of a block. + It is stored at block + sizeof (char *). + This is not a field in the minfo structure member of union mhead + because we want sizeof (union mhead) + to describe the overhead for when the block is in use, + and we do not want the free-list pointer to count in that. */ + +/* If SIZEOF_CHAR_P == 8, this goes into the mh_magic8 buffer at the end of + the rest of the struct. This may need adjusting. */ +#define CHAIN(a) \ + (*(union mhead **) (sizeof (char *) + (char *) (a))) + +/* To implement range checking, we write magic values in at the beginning + and end of each allocated block, and make sure they are undisturbed + whenever a free or a realloc occurs. */ + +/* Written in the bytes before the block's real space (-SIZEOF_CHAR_P bytes) */ +#define MAGIC1 0x55 +#define MAGIC2 0x5555 +#define MSLOP 4 /* 4 bytes extra for u_bits32_t size */ + +/* How many bytes are actually allocated for a request of size N -- + rounded up to nearest multiple of 2*SIZEOF_CHAR_P after accounting for + malloc overhead. */ +#define ALLOCATED_BYTES(n) \ + (((n) + MOVERHEAD + MSLOP + MALIGN_MASK) & ~MALIGN_MASK) + +#define ASSERT(p) \ + do \ + { \ + if (!(p)) xbotch((PTR_T)0, ERR_ASSERT_FAILED, CPP_STRING(p), file, line); \ + } \ + while (0) + +/* Minimum and maximum bucket indices for block splitting (and to bound + the search for a block to split). */ +#define SPLIT_MIN 2 /* XXX - was 3 */ +#define SPLIT_MID 11 +#define SPLIT_MAX 14 + +/* Minimum and maximum bucket indices for block coalescing. */ +#define COMBINE_MIN 2 +#define COMBINE_MAX (pagebucket - 1) /* XXX */ + +#define LESSCORE_MIN 10 +#define LESSCORE_FRC 13 + +#define STARTBUCK 1 + +/* Should we use mmap for large allocations? */ +#if defined (HAVE_MMAP) +# if defined (MAP_ANON) && !defined (MAP_ANONYMOUS) +# define MAP_ANONYMOUS MAP_ANON +# endif +#endif + +#if defined (HAVE_MMAP) && defined (MAP_ANONYMOUS) +# define USE_MMAP +#endif + +#if defined (USE_MMAP) +# define MMAP_THRESHOLD 14 /* must be >= SPLIT_MAX, COMBINE_MAX */ +#else +# define MMAP_THRESHOLD (8 * SIZEOF_LONG) +#endif + +/* Flags for the internal functions. */ +#define MALLOC_WRAPPER 0x01 /* wrapper function */ +#define MALLOC_INTERNAL 0x02 /* internal function calling another */ +#define MALLOC_NOTRACE 0x04 /* don't trace this allocation or free */ +#define MALLOC_NOREG 0x08 /* don't register this allocation or free */ + +/* Future use. */ +#define ERR_DUPFREE 0x01 +#define ERR_UNALLOC 0x02 +#define ERR_UNDERFLOW 0x04 +#define ERR_ASSERT_FAILED 0x08 + +/* Evaluates to true if NB is appropriate for bucket NU. NB is adjusted + appropriately by the caller to account for malloc overhead. This only + checks that the recorded size is not too big for the bucket. We + can't check whether or not it's in between NU and NU-1 because we + might have encountered a busy bucket when allocating and moved up to + the next size. */ +#define IN_BUCKET(nb, nu) ((nb) <= binsizes[(nu)]) + +/* Use this when we want to be sure that NB is in bucket NU. */ +#define RIGHT_BUCKET(nb, nu) \ + (((nb) > binsizes[(nu)-1]) && ((nb) <= binsizes[(nu)])) + +/* nextf[i] is free list of blocks of size 2**(i + 3) */ + +static union mhead *nextf[NBUCKETS]; + +/* busy[i] is nonzero while allocation or free of block size i is in progress. */ + +static char busy[NBUCKETS]; + +static int pagesz; /* system page size. */ +static int pagebucket; /* bucket for requests a page in size */ +static int maxbuck; /* highest bucket receiving allocation request. */ + +static char *memtop; /* top of heap */ + +static const unsigned long binsizes[NBUCKETS] = { + 8UL, 16UL, 32UL, 64UL, 128UL, 256UL, 512UL, 1024UL, 2048UL, 4096UL, + 8192UL, 16384UL, 32768UL, 65536UL, 131072UL, 262144UL, 524288UL, + 1048576UL, 2097152UL, 4194304UL, 8388608UL, 16777216UL, 33554432UL, + 67108864UL, 134217728UL, 268435456UL, 536870912UL, 1073741824UL, + 2147483648UL, 4294967295UL +}; + +/* binsizes[x] == (1 << ((x) + 3)) */ +#define binsize(x) binsizes[(x)] + +#if !defined (errno) +extern int errno; +#endif + +/* Declarations for internal functions */ +static PTR_T internal_malloc PARAMS((size_t, const char *, int, int)); +static PTR_T internal_realloc PARAMS((PTR_T, size_t, const char *, int, int)); +static void internal_free PARAMS((PTR_T, const char *, int, int)); +static PTR_T internal_memalign PARAMS((size_t, size_t, const char *, int, int)); +#ifndef NO_CALLOC +static PTR_T internal_calloc PARAMS((size_t, size_t, const char *, int, int)); +static void internal_cfree PARAMS((PTR_T, const char *, int, int)); +#endif +#ifndef NO_VALLOC +static PTR_T internal_valloc PARAMS((size_t, const char *, int, int)); +#endif + +#if defined (botch) +extern void botch (); +#else +static void botch PARAMS((const char *, const char *, int)); +#endif +static void xbotch PARAMS((PTR_T, int, const char *, const char *, int)); + +#if !HAVE_DECL_SBRK +extern char *sbrk (); +#endif /* !HAVE_DECL_SBRK */ + +#ifdef SHELL +extern int running_trap; +extern int signal_is_trapped PARAMS((int)); +#endif + +#ifdef MALLOC_STATS +struct _malstats _mstats; +#endif /* MALLOC_STATS */ + +/* Debugging variables available to applications. */ +int malloc_flags = 0; /* future use */ +int malloc_trace = 0; /* trace allocations and frees to stderr */ +int malloc_register = 0; /* future use */ + +/* Use a variable in case we want to dynamically adapt it in the future */ +int malloc_mmap_threshold = MMAP_THRESHOLD; + +#ifdef MALLOC_TRACE +char _malloc_trace_buckets[NBUCKETS]; + +/* These should really go into a header file. */ +extern void mtrace_alloc PARAMS((const char *, PTR_T, size_t, const char *, int)); +extern void mtrace_free PARAMS((PTR_T, int, const char *, int)); +#endif + +#if !defined (botch) +static void +botch (s, file, line) + const char *s; + const char *file; + int line; +{ + fprintf (stderr, _("malloc: failed assertion: %s\n"), s); + (void)fflush (stderr); + abort (); +} +#endif + +/* print the file and line number that caused the assertion failure and + call botch() to do whatever the application wants with the information */ +static void +xbotch (mem, e, s, file, line) + PTR_T mem; + int e; + const char *s; + const char *file; + int line; +{ + fprintf (stderr, _("\r\nmalloc: %s:%d: assertion botched\r\n"), + file ? file : _("unknown"), line); +#ifdef MALLOC_REGISTER + if (mem != NULL && malloc_register) + mregister_describe_mem (mem, stderr); +#endif + (void)fflush (stderr); + botch(s, file, line); +} + +/* Coalesce two adjacent free blocks off the free list for size NU - 1, + as long as we can find two adjacent free blocks. nextf[NU -1] is + assumed to not be busy; the caller (morecore()) checks for this. + BUSY[NU] must be set to 1. */ +static void +bcoalesce (nu) + register int nu; +{ + register union mhead *mp, *mp1, *mp2; + register int nbuck; + unsigned long siz; + + nbuck = nu - 1; + if (nextf[nbuck] == 0 || busy[nbuck]) + return; + + busy[nbuck] = 1; + siz = binsize (nbuck); + + mp2 = mp1 = nextf[nbuck]; + mp = CHAIN (mp1); + while (mp && mp != (union mhead *)((char *)mp1 + siz)) + { + mp2 = mp1; + mp1 = mp; + mp = CHAIN (mp); + } + + if (mp == 0) + { + busy[nbuck] = 0; + return; + } + + /* OK, now we have mp1 pointing to the block we want to add to nextf[NU]. + CHAIN(mp2) must equal mp1. Check that mp1 and mp are adjacent. */ + if (mp2 != mp1 && CHAIN(mp2) != mp1) + { + busy[nbuck] = 0; + xbotch ((PTR_T)0, 0, "bcoalesce: CHAIN(mp2) != mp1", (char *)NULL, 0); + } + +#ifdef MALLOC_DEBUG + if (CHAIN (mp1) != (union mhead *)((char *)mp1 + siz)) + { + busy[nbuck] = 0; + return; /* not adjacent */ + } +#endif + + /* Since they are adjacent, remove them from the free list */ + if (mp1 == nextf[nbuck]) + nextf[nbuck] = CHAIN (mp); + else + CHAIN (mp2) = CHAIN (mp); + busy[nbuck] = 0; + +#ifdef MALLOC_STATS + _mstats.tbcoalesce++; + _mstats.ncoalesce[nbuck]++; +#endif + + /* And add the combined two blocks to nextf[NU]. */ + mp1->mh_alloc = ISFREE; + mp1->mh_index = nu; + CHAIN (mp1) = nextf[nu]; + nextf[nu] = mp1; +} + +/* Split a block at index > NU (but less than SPLIT_MAX) into a set of + blocks of the correct size, and attach them to nextf[NU]. nextf[NU] + is assumed to be empty. Must be called with signals blocked (e.g., + by morecore()). BUSY[NU] must be set to 1. */ +static void +bsplit (nu) + register int nu; +{ + register union mhead *mp; + int nbuck, nblks, split_max; + unsigned long siz; + + split_max = (maxbuck > SPLIT_MAX) ? maxbuck : SPLIT_MAX; + + if (nu >= SPLIT_MID) + { + for (nbuck = split_max; nbuck > nu; nbuck--) + { + if (busy[nbuck] || nextf[nbuck] == 0) + continue; + break; + } + } + else + { + for (nbuck = nu + 1; nbuck <= split_max; nbuck++) + { + if (busy[nbuck] || nextf[nbuck] == 0) + continue; + break; + } + } + + if (nbuck > split_max || nbuck <= nu) + return; + + /* XXX might want to split only if nextf[nbuck] has >= 2 blocks free + and nbuck is below some threshold. */ + + /* Remove the block from the chain of larger blocks. */ + busy[nbuck] = 1; + mp = nextf[nbuck]; + nextf[nbuck] = CHAIN (mp); + busy[nbuck] = 0; + +#ifdef MALLOC_STATS + _mstats.tbsplit++; + _mstats.nsplit[nbuck]++; +#endif + + /* Figure out how many blocks we'll get. */ + siz = binsize (nu); + nblks = binsize (nbuck) / siz; + + /* Split the block and put it on the requested chain. */ + nextf[nu] = mp; + while (1) + { + mp->mh_alloc = ISFREE; + mp->mh_index = nu; + if (--nblks <= 0) break; + CHAIN (mp) = (union mhead *)((char *)mp + siz); + mp = (union mhead *)((char *)mp + siz); + } + CHAIN (mp) = 0; +} + +/* Take the memory block MP and add it to a chain < NU. NU is the right bucket, + but is busy. This avoids memory orphaning. */ +static void +xsplit (mp, nu) + union mhead *mp; + int nu; +{ + union mhead *nh; + int nbuck, nblks, split_max; + unsigned long siz; + + nbuck = nu - 1; + while (nbuck >= SPLIT_MIN && busy[nbuck]) + nbuck--; + if (nbuck < SPLIT_MIN) + return; + +#ifdef MALLOC_STATS + _mstats.tbsplit++; + _mstats.nsplit[nu]++; +#endif + + /* Figure out how many blocks we'll get. */ + siz = binsize (nu); /* original block size */ + nblks = siz / binsize (nbuck); /* should be 2 most of the time */ + + /* And add it to nextf[nbuck] */ + siz = binsize (nbuck); /* XXX - resetting here */ + nh = mp; + while (1) + { + mp->mh_alloc = ISFREE; + mp->mh_index = nbuck; + if (--nblks <= 0) break; + CHAIN (mp) = (union mhead *)((char *)mp + siz); + mp = (union mhead *)((char *)mp + siz); + } + busy[nbuck] = 1; + CHAIN (mp) = nextf[nbuck]; + nextf[nbuck] = nh; + busy[nbuck] = 0; +} + +void +_malloc_block_signals (setp, osetp) + sigset_t *setp, *osetp; +{ +#ifdef HAVE_POSIX_SIGNALS + sigfillset (setp); + sigemptyset (osetp); + sigprocmask (SIG_BLOCK, setp, osetp); +#else +# if defined (HAVE_BSD_SIGNALS) + *osetp = sigsetmask (-1); +# endif +#endif +} + +void +_malloc_unblock_signals (setp, osetp) + sigset_t *setp, *osetp; +{ +#ifdef HAVE_POSIX_SIGNALS + sigprocmask (SIG_SETMASK, osetp, (sigset_t *)NULL); +#else +# if defined (HAVE_BSD_SIGNALS) + sigsetmask (*osetp); +# endif +#endif +} + +/* Return some memory to the system by reducing the break. This is only + called with NU > pagebucket, so we're always assured of giving back + more than one page of memory. */ +static void +lesscore (nu) /* give system back some memory */ + register int nu; /* size index we're discarding */ +{ + long siz; + + siz = binsize (nu); + /* Should check for errors here, I guess. */ + sbrk (-siz); + memtop -= siz; + +#ifdef MALLOC_STATS + _mstats.nsbrk++; + _mstats.tsbrk -= siz; + _mstats.nlesscore[nu]++; +#endif +} + +/* Ask system for more memory; add to NEXTF[NU]. BUSY[NU] must be set to 1. */ +static void +morecore (nu) + register int nu; /* size index to get more of */ +{ + register union mhead *mp; + register int nblks; + register long siz; + long sbrk_amt; /* amount to get via sbrk() */ + sigset_t set, oset; + int blocked_sigs; + + /* Block all signals in case we are executed from a signal handler. */ + blocked_sigs = 0; +#ifdef SHELL +# if defined (SIGCHLD) + if (running_trap || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD)) +# else + if (running_trap || signal_is_trapped (SIGINT)) +# endif +#endif + { + _malloc_block_signals (&set, &oset); + blocked_sigs = 1; + } + + siz = binsize (nu); /* size of desired block for nextf[nu] */ + + if (siz < 0) + goto morecore_done; /* oops */ + +#ifdef MALLOC_STATS + _mstats.nmorecore[nu]++; +#endif + + /* Try to split a larger block here, if we're within the range of sizes + to split. */ + if (nu >= SPLIT_MIN && nu <= malloc_mmap_threshold) + { + bsplit (nu); + if (nextf[nu] != 0) + goto morecore_done; + } + + /* Try to coalesce two adjacent blocks from the free list on nextf[nu - 1], + if we can, and we're within the range of the block coalescing limits. */ + if (nu >= COMBINE_MIN && nu < COMBINE_MAX && nu <= malloc_mmap_threshold && busy[nu - 1] == 0 && nextf[nu - 1]) + { + bcoalesce (nu); + if (nextf[nu] != 0) + goto morecore_done; + } + + /* Take at least a page, and figure out how many blocks of the requested + size we're getting. */ + if (siz <= pagesz) + { + sbrk_amt = pagesz; + nblks = sbrk_amt / siz; + } + else + { + /* We always want to request an integral multiple of the page size + from the kernel, so let's compute whether or not `siz' is such + an amount. If it is, we can just request it. If not, we want + the smallest integral multiple of pagesize that is larger than + `siz' and will satisfy the request. */ + sbrk_amt = siz & (pagesz - 1); + if (sbrk_amt == 0) + sbrk_amt = siz; + else + sbrk_amt = siz + pagesz - sbrk_amt; + nblks = 1; + } + +#if defined (USE_MMAP) + if (nu > malloc_mmap_threshold) + { + mp = (union mhead *)mmap (0, sbrk_amt, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + if ((void *)mp == MAP_FAILED) + goto morecore_done; + nextf[nu] = mp; + mp->mh_alloc = ISFREE; + mp->mh_index = nu; + CHAIN (mp) = 0; +#ifdef MALLOC_STATS + _mstats.nmmap++; + _mstats.tmmap += sbrk_amt; +#endif + goto morecore_done; + } +#endif + + +#ifdef MALLOC_STATS + _mstats.nsbrk++; + _mstats.tsbrk += sbrk_amt; +#endif + + mp = (union mhead *) sbrk (sbrk_amt); + + /* Totally out of memory. */ + if ((long)mp == -1) + goto morecore_done; + + memtop += sbrk_amt; + + /* shouldn't happen, but just in case -- require 8- or 16-byte alignment */ + if ((long)mp & MALIGN_MASK) + { + mp = (union mhead *) (((long)mp + MALIGN_MASK) & ~MALIGN_MASK); + nblks--; + } + + /* save new header and link the nblks blocks together */ + nextf[nu] = mp; + while (1) + { + mp->mh_alloc = ISFREE; + mp->mh_index = nu; + if (--nblks <= 0) break; + CHAIN (mp) = (union mhead *)((char *)mp + siz); + mp = (union mhead *)((char *)mp + siz); + } + CHAIN (mp) = 0; + +morecore_done: + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); +} + +static void +malloc_debug_dummy () +{ + write (1, "malloc_debug_dummy\n", 19); +} + +#if SIZEOF_CHAR_P == 8 +#define PREPOP_BIN 3 +#define PREPOP_SIZE 64 +#else +#define PREPOP_BIN 2 +#define PREPOP_SIZE 32 +#endif + +static int +pagealign () +{ + register int nunits; + register union mhead *mp; + long sbrk_needed; + char *curbrk; + + pagesz = getpagesize (); + if (pagesz < 1024) + pagesz = 1024; + + /* OK, how much do we need to allocate to make things page-aligned? + Some of this partial page will be wasted space, but we'll use as + much as we can. Once we figure out how much to advance the break + pointer, go ahead and do it. */ + memtop = curbrk = sbrk (0); + sbrk_needed = pagesz - ((long)curbrk & (pagesz - 1)); /* sbrk(0) % pagesz */ + if (sbrk_needed < 0) + sbrk_needed += pagesz; + + /* Now allocate the wasted space. */ + if (sbrk_needed) + { +#ifdef MALLOC_STATS + _mstats.nsbrk++; + _mstats.tsbrk += sbrk_needed; +#endif + curbrk = sbrk (sbrk_needed); + if ((long)curbrk == -1) + return -1; + memtop += sbrk_needed; + + /* Take the memory which would otherwise be wasted and populate the most + popular bin (3 == 64 bytes) with it. Add whatever we need to curbrk + to make things 64-byte aligned, compute how many 64-byte chunks we're + going to get, and set up the bin. */ + curbrk += sbrk_needed & (PREPOP_SIZE - 1); + sbrk_needed -= sbrk_needed & (PREPOP_SIZE - 1); + nunits = sbrk_needed / PREPOP_SIZE; + + if (nunits > 0) + { + mp = (union mhead *)curbrk; + + nextf[PREPOP_BIN] = mp; + while (1) + { + mp->mh_alloc = ISFREE; + mp->mh_index = PREPOP_BIN; + if (--nunits <= 0) break; + CHAIN(mp) = (union mhead *)((char *)mp + PREPOP_SIZE); + mp = (union mhead *)((char *)mp + PREPOP_SIZE); + } + CHAIN(mp) = 0; + } + } + + /* compute which bin corresponds to the page size. */ + for (nunits = 7; nunits < NBUCKETS; nunits++) + if (pagesz <= binsize(nunits)) + break; + pagebucket = nunits; + + return 0; +} + +static PTR_T +internal_malloc (n, file, line, flags) /* get a block */ + size_t n; + const char *file; + int line, flags; +{ + register union mhead *p; + register int nunits; + register char *m, *z; + long nbytes; + mguard_t mg; + + /* Get the system page size and align break pointer so future sbrks will + be page-aligned. The page size must be at least 1K -- anything + smaller is increased. */ + if (pagesz == 0) + if (pagealign () < 0) + return ((PTR_T)NULL); + + /* Figure out how many bytes are required, rounding up to the nearest + multiple of 8, then figure out which nextf[] area to use. Try to + be smart about where to start searching -- if the number of bytes + needed is greater than the page size, we can start at pagebucket. */ + nbytes = ALLOCATED_BYTES(n); + nunits = (nbytes <= (pagesz >> 1)) ? STARTBUCK : pagebucket; + for ( ; nunits < NBUCKETS; nunits++) + if (nbytes <= binsize(nunits)) + break; + + /* Silently reject too-large requests. XXX - can increase this if HAVE_MMAP */ + if (nunits >= NBUCKETS) + return ((PTR_T) NULL); + + /* In case this is reentrant use of malloc from signal handler, + pick a block size that no other malloc level is currently + trying to allocate. That's the easiest harmless way not to + interfere with the other level of execution. */ +#ifdef MALLOC_STATS + if (busy[nunits]) _mstats.nrecurse++; +#endif + while (busy[nunits]) nunits++; + busy[nunits] = 1; + + if (nunits > maxbuck) + maxbuck = nunits; + + /* If there are no blocks of the appropriate size, go get some */ + if (nextf[nunits] == 0) + morecore (nunits); + + /* Get one block off the list, and set the new list head */ + if ((p = nextf[nunits]) == NULL) + { + busy[nunits] = 0; + return NULL; + } + nextf[nunits] = CHAIN (p); + busy[nunits] = 0; + + /* Check for free block clobbered */ + /* If not for this check, we would gobble a clobbered free chain ptr + and bomb out on the NEXT allocate of this size block */ + if (p->mh_alloc != ISFREE || p->mh_index != nunits) + xbotch ((PTR_T)(p+1), 0, _("malloc: block on free list clobbered"), file, line); + + /* Fill in the info, and set up the magic numbers for range checking. */ + p->mh_alloc = ISALLOC; + p->mh_magic2 = MAGIC2; + p->mh_nbytes = n; + +#if SIZEOF_CHAR_P == 8 + /* Begin guard */ + MALLOC_MEMSET ((char *)p->mh_magic8, MAGIC1, 8); +#endif + + /* End guard */ + mg.i = n; + z = mg.s; + m = (char *) (p + 1) + n; + *m++ = *z++, *m++ = *z++, *m++ = *z++, *m++ = *z++; + +#ifdef MEMSCRAMBLE + if (n) + MALLOC_MEMSET ((char *)(p + 1), 0xdf, n); /* scramble previous contents */ +#endif +#ifdef MALLOC_STATS + _mstats.nmalloc[nunits]++; + _mstats.tmalloc[nunits]++; + _mstats.nmal++; + _mstats.bytesreq += n; +#endif /* MALLOC_STATS */ + +#ifdef MALLOC_TRACE + if (malloc_trace && (flags & MALLOC_NOTRACE) == 0) + mtrace_alloc ("malloc", p + 1, n, file, line); + else if (_malloc_trace_buckets[nunits]) + mtrace_alloc ("malloc", p + 1, n, file, line); +#endif + +#ifdef MALLOC_REGISTER + if (malloc_register && (flags & MALLOC_NOREG) == 0) + mregister_alloc ("malloc", p + 1, n, file, line); +#endif + +#ifdef MALLOC_WATCH + if (_malloc_nwatch > 0) + _malloc_ckwatch (p + 1, file, line, W_ALLOC, n); +#endif + +#if defined (MALLOC_DEBUG) + z = (char *) (p + 1); + /* Check alignment of returned pointer */ + if ((unsigned long)z & MALIGN_MASK) + fprintf (stderr, "malloc: %s:%d: warning: request for %d bytes not aligned on %d byte boundary\r\n", + file ? file : _("unknown"), line, p->mh_nbytes, MALIGN_MASK+1); +#endif + + return (PTR_T) (p + 1); +} + +static void +internal_free (mem, file, line, flags) + PTR_T mem; + const char *file; + int line, flags; +{ + register union mhead *p; + register char *ap, *z; + register int nunits; + register unsigned int nbytes; + int ubytes; /* caller-requested size */ + mguard_t mg; + + if ((ap = (char *)mem) == 0) + return; + + p = (union mhead *) ap - 1; + + if (p->mh_alloc == ISMEMALIGN) + { + ap -= p->mh_nbytes; + p = (union mhead *) ap - 1; + } + +#if defined (MALLOC_TRACE) || defined (MALLOC_REGISTER) || defined (MALLOC_WATCH) + if (malloc_trace || malloc_register || _malloc_nwatch > 0) + ubytes = p->mh_nbytes; +#endif + + if (p->mh_alloc != ISALLOC) + { + if (p->mh_alloc == ISFREE) + xbotch (mem, ERR_DUPFREE, + _("free: called with already freed block argument"), file, line); + else + xbotch (mem, ERR_UNALLOC, + _("free: called with unallocated block argument"), file, line); + } + + ASSERT (p->mh_magic2 == MAGIC2); + + nunits = p->mh_index; + nbytes = ALLOCATED_BYTES(p->mh_nbytes); + /* Since the sizeof(u_bits32_t) bytes before the memory handed to the user + are now used for the number of bytes allocated, a simple check of + mh_magic2 is no longer sufficient to catch things like p[-1] = 'x'. + We sanity-check the value of mh_nbytes against the size of the blocks + in the appropriate bucket before we use it. This can still cause problems + and obscure errors if mh_nbytes is wrong but still within range; the + checks against the size recorded at the end of the chunk will probably + fail then. Using MALLOC_REGISTER will help here, since it saves the + original number of bytes requested. */ + + if (IN_BUCKET(nbytes, nunits) == 0) + xbotch (mem, ERR_UNDERFLOW, + _("free: underflow detected; mh_nbytes out of range"), file, line); +#if SIZEOF_CHAR_P == 8 + { + int i; + for (i = 0, z = p->mh_magic8; i < 8; i++) + if (*z++ != MAGIC1) + xbotch (mem, ERR_UNDERFLOW, + _("free: underflow detected; magic8 corrupted"), file, line); + } +#endif + + ap += p->mh_nbytes; + z = mg.s; + *z++ = *ap++, *z++ = *ap++, *z++ = *ap++, *z++ = *ap++; + if (mg.i != p->mh_nbytes) + xbotch (mem, ERR_ASSERT_FAILED, _("free: start and end chunk sizes differ"), file, line); + +#if defined (USE_MMAP) + if (nunits > malloc_mmap_threshold) + { + munmap (p, binsize (nunits)); +#if defined (MALLOC_STATS) + _mstats.nlesscore[nunits]++; +#endif + goto free_return; + } +#endif + +#if GLIBC21 + if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == sbrk (0))) +#else + if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == memtop)) +#endif + { + /* If above LESSCORE_FRC, give back unconditionally. This should be set + high enough to be infrequently encountered. If between LESSCORE_MIN + and LESSCORE_FRC, call lesscore if the bucket is marked as busy or if + there's already a block on the free list. */ + if ((nunits >= LESSCORE_FRC) || busy[nunits] || nextf[nunits] != 0) + { + lesscore (nunits); + /* keeps the tracing and registering code in one place */ + goto free_return; + } + } + +#ifdef MEMSCRAMBLE + if (p->mh_nbytes) + MALLOC_MEMSET (mem, 0xcf, p->mh_nbytes); +#endif + + ASSERT (nunits < NBUCKETS); + + if (busy[nunits] == 1) + { + xsplit (p, nunits); /* split block and add to different chain */ + goto free_return; + } + + p->mh_alloc = ISFREE; + /* Protect against signal handlers calling malloc. */ + busy[nunits] = 1; + /* Put this block on the free list. */ + CHAIN (p) = nextf[nunits]; + nextf[nunits] = p; + busy[nunits] = 0; + +free_return: + ; /* Empty statement in case this is the end of the function */ + +#ifdef MALLOC_STATS + _mstats.nmalloc[nunits]--; + _mstats.nfre++; +#endif /* MALLOC_STATS */ + +#ifdef MALLOC_TRACE + if (malloc_trace && (flags & MALLOC_NOTRACE) == 0) + mtrace_free (mem, ubytes, file, line); + else if (_malloc_trace_buckets[nunits]) + mtrace_free (mem, ubytes, file, line); +#endif + +#ifdef MALLOC_REGISTER + if (malloc_register && (flags & MALLOC_NOREG) == 0) + mregister_free (mem, ubytes, file, line); +#endif + +#ifdef MALLOC_WATCH + if (_malloc_nwatch > 0) + _malloc_ckwatch (mem, file, line, W_FREE, ubytes); +#endif +} + +static PTR_T +internal_realloc (mem, n, file, line, flags) + PTR_T mem; + register size_t n; + const char *file; + int line, flags; +{ + register union mhead *p; + register u_bits32_t tocopy; + register unsigned int nbytes; + register int nunits; + register char *m, *z; + mguard_t mg; + +#ifdef MALLOC_STATS + _mstats.nrealloc++; +#endif + + if (n == 0) + { + internal_free (mem, file, line, MALLOC_INTERNAL); + return (NULL); + } + if ((p = (union mhead *) mem) == 0) + return internal_malloc (n, file, line, MALLOC_INTERNAL); + + p--; + nunits = p->mh_index; + ASSERT (nunits < NBUCKETS); + + if (p->mh_alloc != ISALLOC) + xbotch (mem, ERR_UNALLOC, + _("realloc: called with unallocated block argument"), file, line); + + ASSERT (p->mh_magic2 == MAGIC2); + nbytes = ALLOCATED_BYTES(p->mh_nbytes); + /* Since the sizeof(u_bits32_t) bytes before the memory handed to the user + are now used for the number of bytes allocated, a simple check of + mh_magic2 is no longer sufficient to catch things like p[-1] = 'x'. + We sanity-check the value of mh_nbytes against the size of the blocks + in the appropriate bucket before we use it. This can still cause problems + and obscure errors if mh_nbytes is wrong but still within range; the + checks against the size recorded at the end of the chunk will probably + fail then. Using MALLOC_REGISTER will help here, since it saves the + original number of bytes requested. */ + if (IN_BUCKET(nbytes, nunits) == 0) + xbotch (mem, ERR_UNDERFLOW, + _("realloc: underflow detected; mh_nbytes out of range"), file, line); +#if SIZEOF_CHAR_P == 8 + { + int i; + for (i = 0, z = p->mh_magic8; i < 8; i++) + if (*z++ != MAGIC1) + xbotch (mem, ERR_UNDERFLOW, + _("realloc: underflow detected; magic8 corrupted"), file, line); + + } +#endif + + m = (char *)mem + (tocopy = p->mh_nbytes); + z = mg.s; + *z++ = *m++, *z++ = *m++, *z++ = *m++, *z++ = *m++; + if (mg.i != p->mh_nbytes) + xbotch (mem, ERR_ASSERT_FAILED, _("realloc: start and end chunk sizes differ"), file, line); + +#ifdef MALLOC_WATCH + if (_malloc_nwatch > 0) + _malloc_ckwatch (p + 1, file, line, W_REALLOC, n); +#endif +#ifdef MALLOC_STATS + _mstats.bytesreq += (n < tocopy) ? 0 : n - tocopy; +#endif + + /* If we're reallocating to the same size as previously, return now */ + if (n == p->mh_nbytes) + return mem; + + /* See if desired size rounds to same power of 2 as actual size. */ + nbytes = ALLOCATED_BYTES(n); + + /* If ok, use the same block, just marking its size as changed. */ + if (RIGHT_BUCKET(nbytes, nunits) || RIGHT_BUCKET(nbytes, nunits-1)) + { + /* Compensate for increment above. */ + m -= 4; + + *m++ = 0; *m++ = 0; *m++ = 0; *m++ = 0; + m = (char *)mem + (p->mh_nbytes = n); + + mg.i = n; + z = mg.s; + *m++ = *z++, *m++ = *z++, *m++ = *z++, *m++ = *z++; + + return mem; + } + + if (n < tocopy) + tocopy = n; + +#ifdef MALLOC_STATS + _mstats.nrcopy++; +#endif + + /* If we are using mmap and have mremap, we could use it here. */ + + if ((m = internal_malloc (n, file, line, MALLOC_INTERNAL|MALLOC_NOTRACE|MALLOC_NOREG)) == 0) + return 0; + FASTCOPY (mem, m, tocopy); + internal_free (mem, file, line, MALLOC_INTERNAL); + +#ifdef MALLOC_TRACE + if (malloc_trace && (flags & MALLOC_NOTRACE) == 0) + mtrace_alloc ("realloc", m, n, file, line); + else if (_malloc_trace_buckets[nunits]) + mtrace_alloc ("realloc", m, n, file, line); +#endif + +#ifdef MALLOC_REGISTER + if (malloc_register && (flags & MALLOC_NOREG) == 0) + mregister_alloc ("realloc", m, n, file, line); +#endif + +#ifdef MALLOC_WATCH + if (_malloc_nwatch > 0) + _malloc_ckwatch (m, file, line, W_RESIZED, n); +#endif + + return m; +} + +static PTR_T +internal_memalign (alignment, size, file, line, flags) + size_t alignment; + size_t size; + const char *file; + int line, flags; +{ + register char *ptr; + register char *aligned; + register union mhead *p; + + ptr = internal_malloc (size + alignment, file, line, MALLOC_INTERNAL); + + if (ptr == 0) + return 0; + /* If entire block has the desired alignment, just accept it. */ + if (((long) ptr & (alignment - 1)) == 0) + return ptr; + /* Otherwise, get address of byte in the block that has that alignment. */ + aligned = (char *) (((long) ptr + alignment - 1) & (~alignment + 1)); + + /* Store a suitable indication of how to free the block, + so that free can find the true beginning of it. */ + p = (union mhead *) aligned - 1; + p->mh_nbytes = aligned - ptr; + p->mh_alloc = ISMEMALIGN; + + return aligned; +} + +int +posix_memalign (memptr, alignment, size) + void **memptr; + size_t alignment, size; +{ + void *mem; + + /* Perform posix-mandated error checking here */ + if ((alignment % sizeof (void *) != 0) || alignment == 0) + return EINVAL; + else if (powerof2 (alignment) == 0) + return EINVAL; + + mem = internal_memalign (alignment, size, (char *)0, 0, 0); + if (mem != 0) + { + *memptr = mem; + return 0; + } + return ENOMEM; +} + +size_t +malloc_usable_size (mem) + void *mem; +{ + register union mhead *p; + register char *ap; + register int maxbytes; + + + if ((ap = (char *)mem) == 0) + return 0; + + /* Find the true start of the memory block to discover which bin */ + p = (union mhead *) ap - 1; + if (p->mh_alloc == ISMEMALIGN) + { + ap -= p->mh_nbytes; + p = (union mhead *) ap - 1; + } + + /* XXX - should we return 0 if ISFREE? */ + maxbytes = binsize(p->mh_index); + + /* So the usable size is the maximum number of bytes in the bin less the + malloc overhead */ + maxbytes -= MOVERHEAD + MSLOP; + return (maxbytes); +} + +#if !defined (NO_VALLOC) +/* This runs into trouble with getpagesize on HPUX, and Multimax machines. + Patching out seems cleaner than the ugly fix needed. */ +static PTR_T +internal_valloc (size, file, line, flags) + size_t size; + const char *file; + int line, flags; +{ + return internal_memalign (getpagesize (), size, file, line, flags|MALLOC_INTERNAL); +} +#endif /* !NO_VALLOC */ + +#ifndef NO_CALLOC +static PTR_T +internal_calloc (n, s, file, line, flags) + size_t n, s; + const char *file; + int line, flags; +{ + size_t total; + PTR_T result; + + total = n * s; + result = internal_malloc (total, file, line, flags|MALLOC_INTERNAL); + if (result) + memset (result, 0, total); + return result; +} + +static void +internal_cfree (p, file, line, flags) + PTR_T p; + const char *file; + int line, flags; +{ + internal_free (p, file, line, flags|MALLOC_INTERNAL); +} +#endif /* !NO_CALLOC */ + +#ifdef MALLOC_STATS +int +malloc_free_blocks (size) + int size; +{ + int nfree; + register union mhead *p; + + nfree = 0; + for (p = nextf[size]; p; p = CHAIN (p)) + nfree++; + + return nfree; +} +#endif + +#if defined (MALLOC_WRAPFUNCS) +PTR_T +sh_malloc (bytes, file, line) + size_t bytes; + const char *file; + int line; +{ + return internal_malloc (bytes, file, line, MALLOC_WRAPPER); +} + +PTR_T +sh_realloc (ptr, size, file, line) + PTR_T ptr; + size_t size; + const char *file; + int line; +{ + return internal_realloc (ptr, size, file, line, MALLOC_WRAPPER); +} + +void +sh_free (mem, file, line) + PTR_T mem; + const char *file; + int line; +{ + internal_free (mem, file, line, MALLOC_WRAPPER); +} + +PTR_T +sh_memalign (alignment, size, file, line) + size_t alignment; + size_t size; + const char *file; + int line; +{ + return internal_memalign (alignment, size, file, line, MALLOC_WRAPPER); +} + +#ifndef NO_CALLOC +PTR_T +sh_calloc (n, s, file, line) + size_t n, s; + const char *file; + int line; +{ + return internal_calloc (n, s, file, line, MALLOC_WRAPPER); +} + +void +sh_cfree (mem, file, line) + PTR_T mem; + const char *file; + int line; +{ + internal_cfree (mem, file, line, MALLOC_WRAPPER); +} +#endif + +#ifndef NO_VALLOC +PTR_T +sh_valloc (size, file, line) + size_t size; + const char *file; + int line; +{ + return internal_valloc (size, file, line, MALLOC_WRAPPER); +} +#endif /* !NO_VALLOC */ + +#endif /* MALLOC_WRAPFUNCS */ + +/* Externally-available functions that call their internal counterparts. */ + +PTR_T +malloc (size) + size_t size; +{ + return internal_malloc (size, (char *)NULL, 0, 0); +} + +PTR_T +realloc (mem, nbytes) + PTR_T mem; + size_t nbytes; +{ + return internal_realloc (mem, nbytes, (char *)NULL, 0, 0); +} + +void +free (mem) + PTR_T mem; +{ + internal_free (mem, (char *)NULL, 0, 0); +} + +PTR_T +memalign (alignment, size) + size_t alignment; + size_t size; +{ + return internal_memalign (alignment, size, (char *)NULL, 0, 0); +} + +#ifndef NO_VALLOC +PTR_T +valloc (size) + size_t size; +{ + return internal_valloc (size, (char *)NULL, 0, 0); +} +#endif + +#ifndef NO_CALLOC +PTR_T +calloc (n, s) + size_t n, s; +{ + return internal_calloc (n, s, (char *)NULL, 0, 0); +} + +void +cfree (mem) + PTR_T mem; +{ + internal_cfree (mem, (char *)NULL, 0, 0); +} +#endif diff --git a/bash-5.1/lib/malloc/mstats.h b/bash-5.1/lib/malloc/mstats.h new file mode 100644 index 0000000000000000000000000000000000000000..ce8aaeca7b781db173fcbde9a9fe4c37cb5f5e18 --- /dev/null +++ b/bash-5.1/lib/malloc/mstats.h @@ -0,0 +1,114 @@ +/* mstats.h - definitions for malloc statistics */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _MSTATS_H +#define _MSTATS_H + +#include "imalloc.h" + +#ifdef MALLOC_STATS + +/* This needs to change if the definition in malloc.c changes */ +#ifndef NBUCKETS +# define NBUCKETS 30 +#endif + +/* + * NMALLOC[i] is the difference between the number of mallocs and frees + * for a given block size. TMALLOC[i] is the total number of mallocs for + * a given block size. NMORECORE[i] is the total number of calls to + * morecore(i). NLESSCORE[i] is the total number of calls to lesscore(i). + * + * NMAL and NFRE are counts of the number of calls to malloc() and free(), + * respectively. NREALLOC is the total number of calls to realloc(); + * NRCOPY is the number of times realloc() had to allocate new memory and + * copy to it. NRECURSE is a count of the number of recursive calls to + * malloc() for the same bucket size, which can be caused by calls to + * malloc() from a signal handler. + * + * NSBRK is the number of calls to sbrk() (whether by morecore() or for + * alignment); TSBRK is the total number of bytes requested from the kernel + * with sbrk(). + * + * BYTESUSED is the total number of bytes consumed by blocks currently in + * use; BYTESFREE is the total number of bytes currently on all of the free + * lists. BYTESREQ is the total number of bytes requested by the caller + * via calls to malloc() and realloc(). + * + * TBSPLIT is the number of times a larger block was split to satisfy a + * smaller request. NSPLIT[i] is the number of times a block of size I was + * split. + * + * TBCOALESCE is the number of times two adjacent smaller blocks off the free + * list were combined to satisfy a larger request. + */ +struct _malstats { + int nmalloc[NBUCKETS]; + int tmalloc[NBUCKETS]; + int nmorecore[NBUCKETS]; + int nlesscore[NBUCKETS]; + int nmal; + int nfre; + int nrealloc; + int nrcopy; + int nrecurse; + int nsbrk; + bits32_t tsbrk; + bits32_t bytesused; + bits32_t bytesfree; + u_bits32_t bytesreq; + int tbsplit; + int nsplit[NBUCKETS]; + int tbcoalesce; + int ncoalesce[NBUCKETS]; + int nmmap; + bits32_t tmmap; +}; + +/* Return statistics describing allocation of blocks of size BLOCKSIZE. + NFREE is the number of free blocks for this allocation size. NUSED + is the number of blocks in use. NMAL is the number of requests for + blocks of size BLOCKSIZE. NMORECORE is the number of times we had + to call MORECORE to repopulate the free list for this bucket. + NLESSCORE is the number of times we gave memory back to the system + from this bucket. NSPLIT is the number of times a block of this size + was split to satisfy a smaller request. NCOALESCE is the number of + times two blocks of this size were combined to satisfy a larger + request. */ +struct bucket_stats { + u_bits32_t blocksize; + int nfree; + int nused; + int nmal; + int nmorecore; + int nlesscore; + int nsplit; + int ncoalesce; + int nmmap; /* currently unused */ +}; + +extern struct bucket_stats malloc_bucket_stats PARAMS((int)); +extern struct _malstats malloc_stats PARAMS((void)); +extern void print_malloc_stats PARAMS((char *)); +extern void trace_malloc_stats PARAMS((char *, char *)); + +#endif /* MALLOC_STATS */ + +#endif /* _MSTATS_H */ diff --git a/bash-5.1/lib/malloc/shmalloc.h b/bash-5.1/lib/malloc/shmalloc.h new file mode 100644 index 0000000000000000000000000000000000000000..d51193eb04a443c5289460a10f87018e038c7737 --- /dev/null +++ b/bash-5.1/lib/malloc/shmalloc.h @@ -0,0 +1,70 @@ +/* Functions (currently) for use by the shell to do malloc debugging and + tracking. */ +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _SH_MALLOC_H +#define _SH_MALLOC_H + +#ifndef PARAMS +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +/* Generic pointer type. */ +#ifndef PTR_T + +#if defined (__STDC__) +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* PTR_T */ + + +extern PTR_T sh_malloc PARAMS((size_t, const char *, int)); +extern PTR_T sh_realloc PARAMS((PTR_T, size_t, const char *, int)); +extern void sh_free PARAMS((PTR_T, const char *, int)); + +extern PTR_T sh_memalign PARAMS((size_t, size_t, const char *, int)); + +extern PTR_T sh_calloc PARAMS((size_t, size_t, const char *, int)); +extern void sh_cfree PARAMS((PTR_T, const char *, int)); + +extern PTR_T sh_valloc PARAMS((size_t, const char *, int)); + +/* trace.c */ +extern int malloc_set_trace PARAMS((int)); +extern void malloc_set_tracefp (); /* full prototype requires stdio.h */ +extern void malloc_set_tracefn PARAMS((char *, char *)); + +/* table.c */ +extern void mregister_dump_table PARAMS((void)); +extern void mregister_table_init PARAMS((void)); +extern int malloc_set_register PARAMS((int)); + +/* stats.c */ +extern void print_malloc_stats PARAMS((char *)); +extern void fprint_malloc_stats (); /* full prototype requires stdio.h */ +extern void trace_malloc_stats PARAMS((char *, char *)); + +#endif diff --git a/bash-5.1/lib/malloc/stats.c b/bash-5.1/lib/malloc/stats.c new file mode 100644 index 0000000000000000000000000000000000000000..b38df9f4d450f0a2fa5a3b88764bca9a00a474db --- /dev/null +++ b/bash-5.1/lib/malloc/stats.c @@ -0,0 +1,213 @@ +/* stats.c - malloc statistics */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "imalloc.h" + +#ifdef MALLOC_STATS + +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include + +#include "mstats.h" + +extern int malloc_free_blocks PARAMS((int)); + +extern int malloc_mmap_threshold; + +extern struct _malstats _mstats; + +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); + +struct bucket_stats +malloc_bucket_stats (size) + int size; +{ + struct bucket_stats v; + + v.nfree = 0; + + if (size < 0 || size >= NBUCKETS) + { + v.blocksize = 0; + v.nused = v.nmal = v.nmorecore = v.nlesscore = v.nsplit = 0; + return v; + } + + v.blocksize = 1 << (size + 3); + v.nused = _mstats.nmalloc[size]; + v.nmal = _mstats.tmalloc[size]; + v.nmorecore = _mstats.nmorecore[size]; + v.nlesscore = _mstats.nlesscore[size]; + v.nsplit = _mstats.nsplit[size]; + v.ncoalesce = _mstats.ncoalesce[size]; + + v.nfree = malloc_free_blocks (size); /* call back to malloc.c */ + + return v; +} + +/* Return a copy of _MSTATS, with two additional fields filled in: + BYTESFREE is the total number of bytes on free lists. BYTESUSED + is the total number of bytes in use. These two fields are fairly + expensive to compute, so we do it only when asked to. */ +struct _malstats +malloc_stats () +{ + struct _malstats result; + struct bucket_stats v; + register int i; + + result = _mstats; + result.bytesused = result.bytesfree = 0; + for (i = 0; i < NBUCKETS; i++) + { + v = malloc_bucket_stats (i); + result.bytesfree += v.nfree * v.blocksize; + result.bytesused += v.nused * v.blocksize; + } + return (result); +} + +static void +_print_malloc_stats (s, fp) + char *s; + FILE *fp; +{ + register int i; + unsigned long totused, totfree; + struct bucket_stats v; + + fprintf (fp, "Memory allocation statistics: %s\n size\tfree\tin use\ttotal\tmorecore lesscore split\tcoalesce\n", s ? s : ""); + for (i = totused = totfree = 0; i < NBUCKETS; i++) + { + v = malloc_bucket_stats (i); + /* Show where the mmap threshold is; sizes greater than this use mmap to + allocate and munmap to free (munmap shows up as lesscore). */ + if (i == malloc_mmap_threshold+1) + fprintf (fp, "--------\n"); + if (v.nmal > 0) + fprintf (fp, "%8lu\t%4d\t%6d\t%5d%8d\t%8d %5d %8d\n", (unsigned long)v.blocksize, v.nfree, v.nused, v.nmal, v.nmorecore, v.nlesscore, v.nsplit, v.ncoalesce); + totfree += v.nfree * v.blocksize; + totused += v.nused * v.blocksize; + } + fprintf (fp, "\nTotal bytes in use: %lu, total bytes free: %lu\n", + totused, totfree); + fprintf (fp, "\nTotal bytes requested by application: %lu\n", (unsigned long)_mstats.bytesreq); + fprintf (fp, "Total mallocs: %d, total frees: %d, total reallocs: %d (%d copies)\n", + _mstats.nmal, _mstats.nfre, _mstats.nrealloc, _mstats.nrcopy); + fprintf (fp, "Total sbrks: %d, total bytes via sbrk: %d\n", + _mstats.nsbrk, _mstats.tsbrk); + fprintf (fp, "Total mmaps: %d, total bytes via mmap: %d\n", + _mstats.nmmap, _mstats.tmmap); + fprintf (fp, "Total blocks split: %d, total block coalesces: %d\n", + _mstats.tbsplit, _mstats.tbcoalesce); +} + +void +print_malloc_stats (s) + char *s; +{ + _print_malloc_stats (s, stderr); +} + +void +fprint_malloc_stats (s, fp) + char *s; + FILE *fp; +{ + _print_malloc_stats (s, fp); +} + +#define TRACEROOT "/var/tmp/maltrace/stats." + +void +trace_malloc_stats (s, fn) + char *s, *fn; +{ + FILE *fp; + char defname[sizeof (TRACEROOT) + 64]; + static char mallbuf[1024]; + + fp = _imalloc_fopen (s, fn, TRACEROOT, defname, sizeof (defname)); + if (fp) + { + setvbuf (fp, mallbuf, _IOFBF, sizeof (mallbuf)); + _print_malloc_stats (s, fp); + fflush(fp); + fclose(fp); + } +} + +#endif /* MALLOC_STATS */ + +#if defined (MALLOC_STATS) || defined (MALLOC_TRACE) +FILE * +_imalloc_fopen (s, fn, def, defbuf, defsiz) + char *s; + char *fn; + char *def; + char *defbuf; + size_t defsiz; +{ + char fname[1024]; + long l; + FILE *fp; + + l = (long)getpid (); + if (fn == 0) + { + sprintf (defbuf, "%s%ld", def, l); + fp = fopen(defbuf, "w"); + } + else + { + char *p, *q, *r; + char pidbuf[32]; + int sp; + + sprintf (pidbuf, "%ld", l); + if ((strlen (pidbuf) + strlen (fn) + 2) >= sizeof (fname)) + return ((FILE *)0); + for (sp = 0, p = fname, q = fn; *q; ) + { + if (sp == 0 && *q == '%' && q[1] == 'p') + { + sp = 1; + for (r = pidbuf; *r; ) + *p++ = *r++; + q += 2; + } + else + *p++ = *q++; + } + *p = '\0'; + fp = fopen (fname, "w"); + } + + return fp; +} +#endif /* MALLOC_STATS || MALLOC_TRACE */ diff --git a/bash-5.1/lib/malloc/stub.c b/bash-5.1/lib/malloc/stub.c new file mode 100644 index 0000000000000000000000000000000000000000..a60a624aa7f901f2f5720ac9d6352ab773fe82ee --- /dev/null +++ b/bash-5.1/lib/malloc/stub.c @@ -0,0 +1,22 @@ +/* Copyright (C) 1993-2003 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +void +bash_malloc_stub() +{ +} diff --git a/bash-5.1/lib/malloc/table.c b/bash-5.1/lib/malloc/table.c new file mode 100644 index 0000000000000000000000000000000000000000..e6acbf4ac355a40fe3935295237d9af10b77d6be --- /dev/null +++ b/bash-5.1/lib/malloc/table.c @@ -0,0 +1,429 @@ +/* table.c - bookkeeping functions for allocated memory */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include "imalloc.h" +#include "table.h" + +#ifdef SHELL +extern int running_trap; +extern int signal_is_trapped PARAMS((int)); +#endif + +extern int malloc_register; + +#ifdef MALLOC_REGISTER + +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); + +#define FIND_ALLOC 0x01 /* find slot for new allocation */ +#define FIND_EXIST 0x02 /* find slot for existing entry for free() or search */ + +static int table_count = 0; +static int table_allocated = 0; +static int table_bucket_index = REG_TABLE_SIZE-1; +static mr_table_t mem_table[REG_TABLE_SIZE]; +static mr_table_t mem_overflow; + +#ifndef STREQ +#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0) +#endif + +static int location_table_index = 0; +static int location_table_count = 0; +static ma_table_t mlocation_table[REG_TABLE_SIZE]; + +/* + * NOTE: taken from dmalloc (http://dmalloc.com) and modified. + */ +static unsigned int +mt_hash (key) + const PTR_T key; +{ + unsigned int a, b, c; + unsigned long x; + + /* set up the internal state */ + a = 0x9e3779b9; /* the golden ratio; an arbitrary value */ + x = (unsigned long)key; /* truncation is OK */ + b = x >> 8; + c = x >> 3; /* XXX - was >> 4 */ + + HASH_MIX(a, b, c); + return c; +} + +#if 0 +static unsigned int +which_bucket (mem) + PTR_T mem; +{ + return (mt_hash ((unsigned char *)mem) & (REG_TABLE_SIZE-1)); +} + +#else +#define which_bucket(mem) (mt_hash ((unsigned char *)(mem)) & (REG_TABLE_SIZE-1)); + +#define next_bucket() ((table_bucket_index + 1) & (REG_TABLE_SIZE-1)) +#define next_entry(mem) ((mem == mem_table + REG_TABLE_SIZE - 1) ? mem_table : ++mem) + +#define prev_bucket() (table_bucket_index == 0 ? REG_TABLE_SIZE-1 : table_bucket_index-1) +#define prev_entry(mem) ((mem == mem_table) ? mem_table + REG_TABLE_SIZE - 1 : mem - 1) +#endif + +static mr_table_t * +find_entry (mem, flags) + PTR_T mem; + int flags; +{ + unsigned int bucket; + register mr_table_t *tp; + mr_table_t *endp; + + if (mem_overflow.mem == mem) + return (&mem_overflow); + + /* If we want to insert an allocation entry just use the next slot */ + if (flags & FIND_ALLOC) + { + table_bucket_index = next_bucket(); + table_count++; + tp = mem_table + table_bucket_index; + memset(tp, 0, sizeof (mr_table_t)); /* overwrite next existing entry */ + return tp; + } + + tp = endp = mem_table + table_bucket_index; + + /* search for last allocation corresponding to MEM, return entry pointer */ + while (1) + { + if (tp->mem == mem) + return (tp); + + tp = prev_entry (tp); + + /* if we went all the way around and didn't find it, return NULL */ + if (tp == endp) + return ((mr_table_t *)NULL); + } + + return (mr_table_t *)NULL; +} + +mr_table_t * +mr_table_entry (mem) + PTR_T mem; +{ + return (find_entry (mem, FIND_EXIST)); +} + +void +mregister_describe_mem (mem, fp) + PTR_T mem; + FILE *fp; +{ + mr_table_t *entry; + + entry = find_entry (mem, FIND_EXIST); + if (entry == 0) + return; + fprintf (fp, "malloc: %p: %s: last %s from %s:%d\n", + mem, + (entry->flags & MT_ALLOC) ? "allocated" : "free", + (entry->flags & MT_ALLOC) ? "allocated" : "freed", + entry->file ? entry->file : "unknown", + entry->line); +} + +void +mregister_alloc (tag, mem, size, file, line) + const char *tag; + PTR_T mem; + size_t size; + const char *file; + int line; +{ + mr_table_t *tentry; + sigset_t set, oset; + int blocked_sigs; + + /* Block all signals in case we are executed from a signal handler. */ + blocked_sigs = 0; +#ifdef SHELL + if (running_trap || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD)) +#endif + { + _malloc_block_signals (&set, &oset); + blocked_sigs = 1; + } + + mlocation_register_alloc (file, line); + + tentry = find_entry (mem, FIND_ALLOC); + + if (tentry == 0) + { + /* oops. table is full. punt. */ + fprintf (stderr, _("register_alloc: alloc table is full with FIND_ALLOC?\n")); + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); + return; + } + + if (tentry->flags & MT_ALLOC) + { + /* oops. bad bookkeeping. ignore for now */ + fprintf (stderr, _("register_alloc: %p already in table as allocated?\n"), mem); + } + + tentry->mem = mem; + tentry->size = size; + tentry->func = tag; + tentry->flags = MT_ALLOC; + tentry->file = file; + tentry->line = line; + tentry->nalloc++; + + if (tentry != &mem_overflow) + table_allocated++; + + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); +} + +void +mregister_free (mem, size, file, line) + PTR_T mem; + int size; + const char *file; + int line; +{ + mr_table_t *tentry; + sigset_t set, oset; + int blocked_sigs; + + /* Block all signals in case we are executed from a signal handler. */ + blocked_sigs = 0; +#ifdef SHELL + if (running_trap || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD)) +#endif + { + _malloc_block_signals (&set, &oset); + blocked_sigs = 1; + } + + tentry = find_entry (mem, FIND_EXIST); + if (tentry == 0) + { + /* oops. not found. */ +#if 0 + fprintf (stderr, "register_free: %p not in allocation table?\n", mem); +#endif + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); + return; + } + if (tentry->flags & MT_FREE) + { + /* oops. bad bookkeeping. ignore for now */ + fprintf (stderr, _("register_free: %p already in table as free?\n"), mem); + } + + tentry->flags = MT_FREE; + tentry->func = "free"; + tentry->file = file; + tentry->line = line; + tentry->nfree++; + + if (tentry != &mem_overflow) + table_allocated--; + + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); +} + +/* If we ever add more flags, this will require changes. */ +static char * +_entry_flags(x) + int x; +{ + if (x & MT_FREE) + return "free"; + else if (x & MT_ALLOC) + return "allocated"; + else + return "undetermined?"; +} + +static void +_register_dump_table(fp) + FILE *fp; +{ + register int i; + mr_table_t entry; + + for (i = 0; i < REG_TABLE_SIZE; i++) + { + entry = mem_table[i]; + if (entry.mem) + fprintf (fp, "%s[%d] %p:%zu:%s:%s:%s:%d:%d:%d\n", + (i == table_bucket_index) ? "*" : "", + i, + entry.mem, entry.size, + _entry_flags(entry.flags), + entry.func ? entry.func : "unknown", + entry.file ? entry.file : "unknown", + entry.line, + entry.nalloc, entry.nfree); + } +} + +void +mregister_dump_table() +{ + _register_dump_table (stderr); +} + +void +mregister_table_init () +{ + memset (mem_table, 0, sizeof(mr_table_t) * REG_TABLE_SIZE); + memset (&mem_overflow, 0, sizeof (mr_table_t)); + table_count = 0; +} + +/* Simple for now */ + +static ma_table_t * +find_location_entry (file, line) + const char *file; + int line; +{ + register ma_table_t *tp, *endp; + + endp = mlocation_table + location_table_count; + for (tp = mlocation_table; tp <= endp; tp++) + { + if (tp->line == line && STREQ (file, tp->file)) + return tp; + } + return (ma_table_t *)NULL; +} + +void +mlocation_register_alloc (file, line) + const char *file; + int line; +{ + ma_table_t *lentry; + const char *nfile; + + if (file == 0) + { + mlocation_table[0].nalloc++; + return; + } + + nfile = strrchr (file, '/'); + if (nfile) + nfile++; + else + nfile = file; + + lentry = find_location_entry (nfile, line); + if (lentry == 0) + { + location_table_index++; + if (location_table_index == REG_TABLE_SIZE) + location_table_index = 1; /* slot 0 reserved */ + lentry = mlocation_table + location_table_index; + lentry->file = nfile; + lentry->line = line; + lentry->nalloc = 1; + if (location_table_count < REG_TABLE_SIZE) + location_table_count++; /* clamp at REG_TABLE_SIZE for now */ + } + else + lentry->nalloc++; +} + +static void +_location_dump_table (fp) + FILE *fp; +{ + register ma_table_t *tp, *endp; + + endp = mlocation_table + location_table_count; + for (tp = mlocation_table; tp < endp; tp++) + fprintf (fp, "%s:%d\t%d\n", tp->file ? tp->file : "unknown", + tp->line ? tp->line : 0, + tp->nalloc); +} + +void +mlocation_dump_table () +{ + _location_dump_table (stderr); +} + +#define LOCROOT "/var/tmp/maltrace/locations." + +void +mlocation_write_table () +{ + FILE *fp; + char defname[sizeof (LOCROOT) + 64]; + + fp = _imalloc_fopen ((char *)NULL, (char *)NULL, LOCROOT, defname, sizeof (defname)); + if (fp == 0) + return; /* XXX - no error message yet */ + _location_dump_table (fp); + fclose (fp); +} + +void +mlocation_table_init () +{ + memset (mlocation_table, 0, sizeof (ma_table_t) * REG_TABLE_SIZE); + mlocation_table[0].file = ""; /* reserve slot 0 for unknown locations */ + mlocation_table[0].line = 0; + mlocation_table[0].nalloc = 0; + location_table_count = 1; +} + +#endif /* MALLOC_REGISTER */ + +int +malloc_set_register(n) + int n; +{ + int old; + + old = malloc_register; + malloc_register = n; + return old; +} diff --git a/bash-5.1/lib/malloc/table.h b/bash-5.1/lib/malloc/table.h new file mode 100644 index 0000000000000000000000000000000000000000..92866cf28c41551dd3d627f50ab3a836b4f13685 --- /dev/null +++ b/bash-5.1/lib/malloc/table.h @@ -0,0 +1,116 @@ +/* table.h - definitions for tables for keeping track of allocated memory */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _MTABLE_H +#define _MTABLE_H + +#include "imalloc.h" + +#ifdef MALLOC_REGISTER + +/* values for flags byte. */ +#define MT_ALLOC 0x01 +#define MT_FREE 0x02 + +/* + * Memory table entry. + * + * MEM is the address of the allocated pointer. + * SIZE is the requested allocation size. + * FLAGS includes either MT_ALLOC (MEM is allocated) or MT_FREE (MEM is + * not allocated). Other flags later. + * FUNC is set to the name of the function doing the allocation (from the + * `tag' argument to register_alloc(). + * FILE and LINE are the filename and line number of the last allocation + * and free (depending on STATUS) of MEM. + * NALLOC and NFREE are incremented on each allocation that returns MEM or + * each free of MEM, respectively (way to keep track of memory reuse + * and how well the free lists are working). + * + */ +typedef struct mr_table { + PTR_T mem; + size_t size; + char flags; + const char *func; + const char *file; + int line; + int nalloc, nfree; +} mr_table_t; + +#define REG_TABLE_SIZE 8192 + +extern mr_table_t *mr_table_entry PARAMS((PTR_T)); +extern void mregister_alloc PARAMS((const char *, PTR_T, size_t, const char *, int)); +extern void mregister_free PARAMS((PTR_T, int, const char *, int)); +extern void mregister_describe_mem (); +extern void mregister_dump_table PARAMS((void)); +extern void mregister_table_init PARAMS((void)); + +typedef struct ma_table { + const char *file; + int line; + int nalloc; +} ma_table_t; + +extern void mlocation_register_alloc PARAMS((const char *, int)); +extern void mlocation_table_init PARAMS((void)); +extern void mlocation_dump_table PARAMS((void)); +extern void mlocation_write_table PARAMS((void)); + +/* NOTE: HASH_MIX taken from dmalloc (http://dmalloc.com) */ + +/* + * void HASH_MIX + * + * DESCRIPTION: + * + * Mix 3 32-bit values reversibly. For every delta with one or two + * bits set, and the deltas of all three high bits or all three low + * bits, whether the original value of a,b,c is almost all zero or is + * uniformly distributed. + * + * If HASH_MIX() is run forward or backward, at least 32 bits in a,b,c + * have at least 1/4 probability of changing. If mix() is run + * forward, every bit of c will change between 1/3 and 2/3 of the + * time. (Well, 22/100 and 78/100 for some 2-bit deltas.) + * + * HASH_MIX() takes 36 machine instructions, but only 18 cycles on a + * superscalar machine (like a Pentium or a Sparc). No faster mixer + * seems to work, that's the result of my brute-force search. There + * were about 2^68 hashes to choose from. I only tested about a + * billion of those. + */ +#define HASH_MIX(a, b, c) \ + do { \ + a -= b; a -= c; a ^= (c >> 13); \ + b -= c; b -= a; b ^= (a << 8); \ + c -= a; c -= b; c ^= (b >> 13); \ + a -= b; a -= c; a ^= (c >> 12); \ + b -= c; b -= a; b ^= (a << 16); \ + c -= a; c -= b; c ^= (b >> 5); \ + a -= b; a -= c; a ^= (c >> 3); \ + b -= c; b -= a; b ^= (a << 10); \ + c -= a; c -= b; c ^= (b >> 15); \ + } while(0) + +#endif /* MALLOC_REGISTER */ + +#endif /* _MTABLE_H */ diff --git a/bash-5.1/lib/malloc/trace.c b/bash-5.1/lib/malloc/trace.c new file mode 100644 index 0000000000000000000000000000000000000000..391ca9d8978629e4cbebefa14a3c1252b58174c3 --- /dev/null +++ b/bash-5.1/lib/malloc/trace.c @@ -0,0 +1,126 @@ +/* trace.c - tracing functions for malloc */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "imalloc.h" + +extern int malloc_trace; + +static int _mtrace_verbose = 0; + +#ifdef MALLOC_TRACE + +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); + +FILE *_mtrace_fp = NULL; +extern char _malloc_trace_buckets[]; + +void +mtrace_alloc (tag, mem, size, file, line) + const char *tag; + PTR_T mem; + size_t size; + const char *file; + int line; +{ + if (_mtrace_fp == NULL) + _mtrace_fp = stderr; + + if (_mtrace_verbose) + fprintf (_mtrace_fp, "alloc: %s: %p (%zu bytes) from '%s:%d'\n", + tag, mem, size, file ? file : "unknown", line); + else + fprintf (_mtrace_fp, "alloc:%p:%zu:%s:%d\n", + mem, size, file ? file : "unknown", line); +} + +void +mtrace_free (mem, size, file, line) + PTR_T mem; + int size; + const char *file; + int line; +{ + if (_mtrace_fp == NULL) + _mtrace_fp = stderr; + + if (_mtrace_verbose) + fprintf (_mtrace_fp, "free: %p (%d bytes) from '%s:%d'\n", + mem, size, file ? file : "unknown", line); + else + fprintf (_mtrace_fp, "free:%p:%d:%s:%d\n", + mem, size, file ? file : "unknown", line); +} +#endif /* MALLOC_TRACE */ + +int +malloc_set_trace (n) + int n; +{ + int old; + + old = malloc_trace; + malloc_trace = n; + _mtrace_verbose = (n > 1); + return old; +} + +void +malloc_set_tracefp (fp) + FILE *fp; +{ +#ifdef MALLOC_TRACE + _mtrace_fp = fp ? fp : stderr; +#endif +} + +void +malloc_trace_bin (n) + int n; +{ +#ifdef MALLOC_TRACE + _malloc_trace_buckets[n] = 1; +#endif +} + +#define TRACEROOT "/var/tmp/maltrace/trace." + +void +malloc_set_tracefn (s, fn) + char *s; + char *fn; +{ +#ifdef MALLOC_TRACE + FILE *fp; + char defname[sizeof (TRACEROOT) + 64]; + + fp = _imalloc_fopen (s, fn, TRACEROOT, defname, sizeof (defname)); + if (fp) + malloc_set_tracefp (fp); +#endif +} diff --git a/bash-5.1/lib/malloc/watch.c b/bash-5.1/lib/malloc/watch.c new file mode 100644 index 0000000000000000000000000000000000000000..00c8a8248b4e9bc317be38115439f0dc911d85cc --- /dev/null +++ b/bash-5.1/lib/malloc/watch.c @@ -0,0 +1,151 @@ +/* watch.c - watchpoint functions for malloc */ + +/* Copyright (C) 2001-2003 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include "imalloc.h" + +#ifdef MALLOC_WATCH +#include "watch.h" + +#define WATCH_MAX 32 + +int _malloc_nwatch; +static PTR_T _malloc_watch_list[WATCH_MAX]; + +static void +watch_warn (addr, file, line, type, data) + PTR_T addr; + const char *file; + int line, type; + unsigned long data; +{ + char *tag; + + if (type == W_ALLOC) + tag = "allocated"; + else if (type == W_FREE) + tag = "freed"; + else if (type == W_REALLOC) + tag = "requesting resize"; + else if (type == W_RESIZED) + tag = "just resized"; + else + tag = "bug: unknown operation"; + + fprintf (stderr, "malloc: watch alert: %p %s ", addr, tag); + if (data != (unsigned long)-1) + fprintf (stderr, "(size %lu) ", data); + fprintf (stderr, "from '%s:%d'\n", file ? file : "unknown", line); +} + +void +_malloc_ckwatch (addr, file, line, type, data) + PTR_T addr; + const char *file; + int line, type; + unsigned long data; +{ + register int i; + + for (i = _malloc_nwatch - 1; i >= 0; i--) + { + if (_malloc_watch_list[i] == addr) + { + watch_warn (addr, file, line, type, data); + return; + } + } +} +#endif /* MALLOC_WATCH */ + +PTR_T +malloc_watch (addr) + PTR_T addr; +{ + register int i; + PTR_T ret; + + if (addr == 0) + return addr; + ret = (PTR_T)0; + +#ifdef MALLOC_WATCH + for (i = _malloc_nwatch - 1; i >= 0; i--) + { + if (_malloc_watch_list[i] == addr) + break; + } + if (i < 0) + { + if (_malloc_nwatch == WATCH_MAX) /* full, take out first */ + { + ret = _malloc_watch_list[0]; + _malloc_nwatch--; + for (i = 0; i < _malloc_nwatch; i++) + _malloc_watch_list[i] = _malloc_watch_list[i+1]; + } + _malloc_watch_list[_malloc_nwatch++] = addr; + } +#endif + + return ret; +} + +/* Remove a watchpoint set on ADDR. If ADDR is NULL, remove all + watchpoints. Returns ADDR if everything went OK, NULL if ADDR was + not being watched. */ +PTR_T +malloc_unwatch (addr) + PTR_T addr; +{ +#ifdef MALLOC_WATCH + register int i; + + if (addr == 0) + { + for (i = 0; i < _malloc_nwatch; i++) + _malloc_watch_list[i] = (PTR_T)0; + _malloc_nwatch = 0; + return ((PTR_T)0); + } + else + { + for (i = 0; i < _malloc_nwatch; i++) + { + if (_malloc_watch_list[i] == addr) + break; + } + if (i == _malloc_nwatch) + return ((PTR_T)0); /* not found */ + /* shuffle everything from i+1 to end down 1 */ + _malloc_nwatch--; + for ( ; i < _malloc_nwatch; i++) + _malloc_watch_list[i] = _malloc_watch_list[i+1]; + return addr; + } +#else + return ((PTR_T)0); +#endif +} diff --git a/bash-5.1/lib/malloc/watch.h b/bash-5.1/lib/malloc/watch.h new file mode 100644 index 0000000000000000000000000000000000000000..2a0f4970ad9a35896efc886921bd45970bd1fc6c --- /dev/null +++ b/bash-5.1/lib/malloc/watch.h @@ -0,0 +1,41 @@ +/* watch.h - definitions for tables for keeping track of allocated memory */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _MWATCH_H +#define _MWATCH_H + +#include "imalloc.h" + +#ifdef MALLOC_WATCH + +/* `Events' for watchpoints */ + +#define W_ALLOC 0x01 +#define W_FREE 0x02 +#define W_REALLOC 0x04 +#define W_RESIZED 0x08 + +extern int _malloc_nwatch; + +extern void _malloc_ckwatch PARAMS((PTR_T, const char *, int, int, unsigned long)); + +#endif /* MALLOC_WATCH */ + +#endif /* _MWATCH_H */ diff --git a/bash-5.1/lib/malloc/x386-alloca.s b/bash-5.1/lib/malloc/x386-alloca.s new file mode 100644 index 0000000000000000000000000000000000000000..112d33cc48fc19af4e5ee9976f771a6381e7fb37 --- /dev/null +++ b/bash-5.1/lib/malloc/x386-alloca.s @@ -0,0 +1,63 @@ +;; alloca386.s 1.2 +;; GNU-compatible stack allocation function for Xenix/386. +;; Written by Chip Salzenberg at ComDev. +;; Last modified 90/01/11 +;;> Is your alloca clearly better than the one in i386-alloca.s? I haven't +;;> looked at either. +;; +;;They're different because Xenix/386 has a different assembler. SCO +;;Xenix has the Microsoft C compiler and the Microsoft macro assembler, +;;called "masm". MASM's assembler syntax is quite different from AT&T's +;;in all sorts of ways. Xenix people can't use the AT&T version. +;;-- +;;Chip Salzenberg at ComDev/TCT , + + TITLE $alloca386 + + .386 +DGROUP GROUP CONST, _BSS, _DATA +_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' +_DATA ENDS +_BSS SEGMENT DWORD USE32 PUBLIC 'BSS' +_BSS ENDS +CONST SEGMENT DWORD USE32 PUBLIC 'CONST' +CONST ENDS +_TEXT SEGMENT DWORD USE32 PUBLIC 'CODE' + ASSUME CS: _TEXT, DS: DGROUP, SS: DGROUP, ES: DGROUP + + PUBLIC _alloca +_alloca PROC NEAR + +; Get argument. + pop edx ; edx -> return address + pop eax ; eax = amount to allocate + +; Validate allocation amount. + add eax,3 + and eax,not 3 + cmp eax,0 + jg aa_size_ok + mov eax,4 +aa_size_ok: + +; Allocate stack space. + mov ecx,esp ; ecx -> old stack pointer + sub esp,eax ; perform allocation + mov eax,esp ; eax -> new stack pointer + +; Copy the three saved register variables from old stack top to new stack top. +; They may not be there. So we waste twelve bytes. Big fat hairy deal. + push DWORD PTR 8[ecx] + push DWORD PTR 4[ecx] + push DWORD PTR 0[ecx] + +; Push something so the caller can pop it off. + push eax + +; Return to caller. + jmp edx + +_alloca ENDP + +_TEXT ENDS + END diff --git a/bash-5.1/lib/malloc/xleaktrace b/bash-5.1/lib/malloc/xleaktrace new file mode 100755 index 0000000000000000000000000000000000000000..d7e3cd55576d44e69b19e430f7d6bc9b6c66af12 --- /dev/null +++ b/bash-5.1/lib/malloc/xleaktrace @@ -0,0 +1,47 @@ +#! /usr/bin/awk -f +# +# xleaktrace - print unfreed memory using input generated by compact malloc +# tracing (malloc_set_trace(1)) +# +# NOTE: we ignore `realloc' tags because they're just extra information +# +# Copyright (c) 2001 Chester Ramey +# Permission is hereby granted to deal in this Software without restriction. +# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. +# +# Chet Ramey +# chet@po.cwru.edu +# +BEGIN { + FS=":"; +} + +$1 == "alloc" { + alloc[$2] = 1; + + size[$2] = $3; + file[$2] = $4; + line[$2] = $5; + +# printf "allocated: %s %d %d %s %d\n", $2, alloc[$2], size[$2], file[$2], line[$2]; + } + +$1 == "free" { + if ($2 in alloc) { + alloc[$2] = 0; +# printf "freed: %s %d\n", $2, alloc[$2]; + } else + printf "freeing unallocated pointer: %s\n", $2; + + } + +END { + printf "unfreed memory\n"; + for (ptr in alloc) { + if (alloc[ptr] == 1) { + printf "%s (%d) from %s:%d\n", ptr, size[ptr], file[ptr], line[ptr]; + } + } +} + + diff --git a/bash-5.1/lib/malloc/xmalloc.c b/bash-5.1/lib/malloc/xmalloc.c new file mode 100644 index 0000000000000000000000000000000000000000..f6dec67a8953e6812f98b27a4feba4670186d9e7 --- /dev/null +++ b/bash-5.1/lib/malloc/xmalloc.c @@ -0,0 +1,94 @@ +/* xmalloc.c -- safe versions of malloc and realloc */ + +/* Copyright (C) 1991-2003 Free Software Foundation, Inc. + + This file is part of GNU Readline, a library for reading lines + of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +#include +#endif + +#include + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +/* Generic pointer type. */ +#ifndef PTR_T + +#if defined (__STDC__) +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* PTR_T */ + +/* **************************************************************** */ +/* */ +/* Memory Allocation and Deallocation. */ +/* */ +/* **************************************************************** */ + +static void +memory_error_and_abort (fname) + char *fname; +{ + fprintf (stderr, "%s: out of virtual memory\n", fname); + exit (2); +} + +/* Return a pointer to free()able block of memory large enough + to hold BYTES number of bytes. If the memory cannot be allocated, + print an error message and abort. */ +PTR_T +xmalloc (bytes) + size_t bytes; +{ + PTR_T temp; + + temp = malloc (bytes); + if (temp == 0) + memory_error_and_abort ("xmalloc"); + return (temp); +} + +PTR_T +xrealloc (pointer, bytes) + PTR_T pointer; + size_t bytes; +{ + PTR_T temp; + + temp = pointer ? realloc (pointer, bytes) : malloc (bytes); + + if (temp == 0) + memory_error_and_abort ("xrealloc"); + return (temp); +} + +void +xfree (string) + PTR_T string; +{ + if (string) + free (string); +} diff --git a/bash-5.1/lib/readline/COPYING b/bash-5.1/lib/readline/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..94a9ed024d3859793618152ea559a168bbcbb5e2 --- /dev/null +++ b/bash-5.1/lib/readline/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/bash-5.1/lib/readline/ChangeLog b/bash-5.1/lib/readline/ChangeLog new file mode 100644 index 0000000000000000000000000000000000000000..1cf0c004af56b7dac4d47a7d19e719a9019f4fe8 --- /dev/null +++ b/bash-5.1/lib/readline/ChangeLog @@ -0,0 +1,403 @@ +Tue Mar 23 14:36:51 1993 Brian Fox (bfox@eos.crseo.ucsb.edu) + + * readline.c (rl_copy): Changed name to rl_copy_text. + +Mon Mar 22 19:16:05 1993 Brian Fox (bfox@eos.crseo.ucsb.edu) + + * dispose_cmd.c, several other files. Declare dispose_xxx () as + "void". + + * builtins/hashcom.h: Make declarations of hashed_filenames be + "extern" to keep the SGI compiler happy. + + * readline.c (rl_initialize_everything): Assign values to + out_stream and in_stream immediately, since + output_character_function () can be called before + readline_internal () is called. + +Tue Dec 8 09:30:56 1992 Brian Fox (bfox@cubit) + + * readline.c (rl_init_terminal) Set PC from BC, not from *buffer. + +Mon Nov 30 09:35:47 1992 Brian Fox (bfox@cubit) + + * readline.c (invoking_keyseqs_in_map, rl_parse_and_bind) Allow + backslash to quote characters, such as backslash, double quote, + and space. Backslash quotes all character indiscriminately. + + * funmap.c (vi_keymap) Fix type in "vi-replace" declaration. + +Fri Nov 20 10:55:05 1992 Brian Fox (bfox@cubit) + + * readline.c (init_terminal_io, rl_prep_terminal): FINALLY! + Declare and use termcap variable `ospeed' when setting up terminal + parameters. + +Thu Oct 8 08:53:07 1992 Brian J. Fox (bfox@helios) + + * Makefile, this directory: Include (as links to the canonical + sources), tilde.c, tilde.h, posixstat.h and xmalloc.c. + +Tue Sep 29 13:07:21 1992 Brian J. Fox (bfox@helios) + + * readline.c (init_terminal_io) Don't set arrow keys if the key + sequences that represent them are already set. + + * readline.c (rl_function_of_keyseq) New function returns the first + function (or macro) found while searching a key sequence. + +Mon Sep 28 00:34:04 1992 Brian J. Fox (bfox@helios) + + * readline.c (LibraryVersion) New static char * contains current + version number. Version is at 2.0. + + * readline.c (rl_complete_internal): Incorporated clean changes + from gilmore (gnu@cygnus.com) to support quoted substrings within + completion functions. + + * readline.c (many locations) Added support for the _GO32_, + whatever that is. Patches supplied by Cygnus, typed in by hand, + with cleanups. + +Sun Aug 16 12:46:24 1992 Brian Fox (bfox@cubit) + + * readline.c (init_terminal_io): Find out the values of the keypad + arrows and bind them to appropriate RL functions if present. + +Mon Aug 10 18:13:24 1992 Brian Fox (bfox@cubit) + + * history.c (stifle_history): A negative argument to stifle + becomes zero. + +Tue Jul 28 09:28:41 1992 Brian Fox (bfox@cubit) + + * readline.c (rl_variable_bind): New local structure describes + booleans by name and address; code in rl_variable_bind () looks at + structure to set simple variables. + + * parens.c (rl_insert_close): New variable rl_blink_matching_paren + is non-zero if we want to blink the matching open when a close is + inserted. If FD_SET is defined, rl_blink_matching_paren defaults + to 1, else 0. If FD_SET is not defined, and + rl_blink_matching_paren is non-zero, the close character(s) are/is + simply inserted. + +Wed Jul 22 20:03:59 1992 Brian Fox (bfox@cubit) + + * history.c, readline.c, vi_mode.c: Cause the functions strchr () + and strrchr () to be used instead of index () and rindex () + throughout the source. + +Mon Jul 13 11:34:07 1992 Brian Fox (bfox@cubit) + + * readline.c: (rl_variable_bind) New variable "meta-flag" if "on" + means force the use of the 8th bit as Meta bit. Internal variable + is called meta_flag. + +Thu Jul 9 10:37:56 1992 Brian Fox (bfox@cubit) + + * history.c (get_history_event) Change INDEX to LOCAL_INDEX. If + compiling for the shell, allow shell metacharacters to separate + history tokens as they would for shell tokens. + +Sat Jul 4 19:29:12 1992 Brian Fox (bfox@cubit) + + * vi_keymap.c: According to Posix, TAB self-inserts instead of + doing completion. + + * vi_mode.c: (rl_vi_yank_arg) Enter VI insert mode after yanking + an arg from the previous line. + + * search.c: New file takes over vi style searching and implements + non-incremental searching the history. + + Makefile: Add search.c and search.o. + + funmap.c: Add names for non-incremental-forward-search-history and + non-incremental-reverse-search-history. + + readline.h: Add extern definitions for non-incremental searching. + + vi_mode.c: Remove old search code; add calls to code in search.c. + +Fri Jul 3 10:36:33 1992 Brian Fox (bfox@cubit) + + * readline.c (rl_delete_horizontal_space); New function deletes + all whitespace surrounding point. + + funmap.c: Add "delete-horizontal-space". + emacs_keymap.c: Put rl_delete_horizontal_space () on M-\. + + * readline.c (rl_set_signals, rl_clear_signals); New function + rl_set_sighandler () is either defined in a Posix way (if + HAVE_POSIX_SIGNALS is defined) or in a BSD way. Function is + called from rl_set_signals () and rl_clear_signals (). + +Fri May 8 12:50:15 1992 Brian Fox (bfox@cubit) + + * readline.c: (readline_default_bindings) Do comparisons with + _POSIX_VDISABLE casted to `unsigned char'. Change tty characters + to be unsigned char. + +Thu Apr 30 12:36:35 1992 Brian Fox (bfox@cubit) + + * readline.c: (rl_getc) Handle "read would block" error on + non-blocking IO streams. + + * readline.c: (rl_signal_handler): Unblock only the signal that we + have caught, not all signals. + +Sun Feb 23 03:33:09 1992 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: Many functions. Use only the macros META_CHAR and + UNMETA to deal with meta characters. Prior to this, we used + numeric values and tests. + + * readline.c (rl_complete_internal) Report exactly the number of + possible completions, not the number + 1. + + * vi_mode.c (rl_do_move) Do not change the cursor position when + using `cw' or `cW'. + + * vi_mode.c (rl_vi_complete) Enter insert mode after completing + with `*' or `\'. + +Fri Feb 21 05:58:18 1992 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c (rl_dispatch) Increment rl_key_sequence_length for + meta characters that map onto ESC map. + +Mon Feb 10 01:41:35 1992 Brian Fox (bfox at gnuwest.fsf.org) + + * history.c (history_do_write) Build a buffer of all of the lines + to write and write them in one fell swoop (lower overhead than + calling write () for each line). Suggested by Peter Ho. + + * readline.c: Include hbullx20 as well as hpux for determining + USGr3ness. + + * readline.c (rl_unix_word_rubout) As per the "Now REMEMBER" + comment, pass arguments to rl_kill_text () in the correct order to + preserve prepending and appending of killed text. + + * readline.c (rl_search_history) malloc (), realloc (), and free + () SEARCH_STRING so that there are no static limits on searching. + + * vi_mode.c (rl_vi_subst) Don't forget to end the undo group. + +Fri Jan 31 14:51:02 1992 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c (rl_signal_handler): Zero the current history entry's + pointer after freeing the undo_list when SIGINT received. + Reformat a couple of functions. + +Sat Jan 25 13:47:35 1992 Brian Fox (bfox at bears) + + * readline.c (parser_if): free () TNAME after use. + +Tue Jan 21 01:01:35 1992 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c (rl_redisplay) and (rl_character_len): Display + Control characters as "^c" and Meta characters as "\234", instead + of "C-C" and "M-C". + +Sun Dec 29 10:59:00 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c (init_terminal_io) Default to environment variables + LINES and COLUMNS before termcap entry values. If all else fails, + then assume 80x24 terminal. + +Sat Dec 28 16:33:11 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: If this machine is USG and it is hpux, then define + USGr3. + + * history.c: Cosmetic fixes. + +Thu Nov 21 00:10:12 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * vi_mode.c: (rl_do_move) Place cursor at end of line, never at + next to last character. + +Thu Nov 14 05:08:01 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * history.c (get_history_event) Non-anchored searches can have a + return index of greater than zero from get_history_event (). + +Fri Nov 1 07:02:13 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c (rl_translate_keyseq) Make C-? translate to RUBOUT + unconditionally. + +Mon Oct 28 11:34:52 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c; Use Posix directory routines and macros. + + * funmap.c; Add entry for call-last-kbd-macro. + + * readline.c (rl_prep_term); Use system EOF character on POSIX + systems also. + +Thu Oct 3 16:19:53 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c; Make a distinction between having a TERMIOS tty + driver, and having POSIX signal handling. You might one without + the other. New defines used HAVE_POSIX_SIGNALS, and + TERMIOS_TTY_DRIVER. + +Tue Jul 30 22:37:26 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: rl_getc () If a call to read () returns without an + error, but with zero characters, the file is empty, so return EOF. + +Thu Jul 11 20:58:38 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: (rl_get_next_history, rl_get_previous_history) + Reallocate the buffer space if the line being moved to is longer + the the current space allocated. Amazing that no one has found + this bug until now. + +Sun Jul 7 02:37:05 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c:(rl_parse_and_bind) Allow leading whitespace. + Make sure TERMIO and TERMIOS systems treat CR and NL + disctinctly. + +Tue Jun 25 04:09:27 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: Rework parsing conditionals to pay attention to the + prior states of the conditional stack. This makes $if statements + work correctly. + +Mon Jun 24 20:45:59 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: support for displaying key binding information + includes the functions rl_list_funmap_names (), + invoking_keyseqs_in_map (), rl_invoking_keyseqs (), + rl_dump_functions (), and rl_function_dumper (). + + funmap.c: support for same includes rl_funmap_names (). + + readline.c, funmap.c: no longer define STATIC_MALLOC. However, + update both version of xrealloc () to handle a null pointer. + +Thu Apr 25 12:03:49 1991 Brian Fox (bfox at gnuwest.fsf.org) + + * vi_mode.c (rl_vi_fword, fWord, etc. All functions use + the macro `isident()'. Fixed movement bug which prevents + continious movement through the text. + +Fri Jul 27 16:47:01 1990 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c (parser_if) Allow "$if term=foo" construct. + +Wed May 23 16:10:33 1990 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c (rl_dispatch) Correctly remember the last command + executed. Fixed typo in username_completion_function (). + +Mon Apr 9 19:55:48 1990 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: username_completion_function (); For text passed in + with a leading `~', remember that this could be a filename (after + it is completed). + +Thu Apr 5 13:44:24 1990 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: rl_search_history (): Correctly handle case of an + unfound search string, but a graceful exit (as with ESC). + + * readline.c: rl_restart_output (); The Apollo passes the address + of the file descriptor to TIOCSTART, not the descriptor itself. + +Tue Mar 20 05:38:55 1990 Brian Fox (bfox at gnuwest.fsf.org) + + * readline.c: rl_complete (); second call in a row causes possible + completions to be listed. + + * readline.c: rl_redisplay (), added prompt_this_line variable + which is the first character character following \n in prompt. + +Sun Mar 11 04:32:03 1990 Brian Fox (bfox at gnuwest.fsf.org) + + * Signals are now supposedly handled inside of SYSV compilation. + +Wed Jan 17 19:24:09 1990 Brian Fox (bfox at sbphy.ucsb.edu) + + * history.c: history_expand (); fixed overwriting memory error, + added needed argument to call to get_history_event (). + +Thu Jan 11 10:54:04 1990 Brian Fox (bfox at sbphy.ucsb.edu) + + * readline.c: added mark_modified_lines to control the + display of an asterisk on modified history lines. Also + added a user variable called mark-modified-lines to the + `set' command. + +Thu Jan 4 10:38:05 1990 Brian Fox (bfox at sbphy.ucsb.edu) + + * readline.c: start_insert (). Only use IC if we don't have an im + capability. + +Fri Sep 8 09:00:45 1989 Brian Fox (bfox at aurel) + + * readline.c: rl_prep_terminal (). Only turn on 8th bit + as meta-bit iff the terminal is not using parity. + +Sun Sep 3 08:57:40 1989 Brian Fox (bfox at aurel) + + * readline.c: start_insert (). Uses multiple + insertion call in cases where that makes sense. + + rl_insert (). Read type-ahead buffer for additional + keys that are bound to rl_insert, and insert them + all at once. Make insertion of single keys given + with an argument much more efficient. + +Tue Aug 8 18:13:57 1989 Brian Fox (bfox at aurel) + + * readline.c: Changed handling of EOF. readline () returns + (char *)EOF or consed string. The EOF character is read from the + tty, or if the tty doesn't have one, defaults to C-d. + + * readline.c: Added support for event driven programs. + rl_event_hook is the address of a function you want called + while Readline is waiting for input. + + * readline.c: Cleanup time. Functions without type declarations + do not use return with a value. + + * history.c: history_expand () has new variable which is the + characters to ignore immediately following history_expansion_char. + +Sun Jul 16 08:14:00 1989 Brian Fox (bfox at aurel) + + * rl_prep_terminal () + BSD version turns off C-s, C-q, C-y, C-v. + + * readline.c -- rl_prep_terminal () + SYSV version hacks readline_echoing_p. + BSD version turns on passing of the 8th bit for the duration + of reading the line. + +Tue Jul 11 06:25:01 1989 Brian Fox (bfox at aurel) + + * readline.c: new variable rl_tilde_expander. + If non-null, this contains the address of a function to call if + the standard meaning for expanding a tilde fails. The function is + called with the text sans tilde (as in "foo"), and returns a + malloc()'ed string which is the expansion, or a NULL pointer if + there is no expansion. + + * readline.h - new file chardefs.h + Separates things that only readline.c needs from the standard + header file publishing interesting things about readline. + + * readline.c: + readline_default_bindings () now looks at terminal chararacters + and binds those as well. + +Wed Jun 28 20:20:51 1989 Brian Fox (bfox at aurel) + + * Made readline and history into independent libraries. + diff --git a/bash-5.1/lib/readline/Makefile.in b/bash-5.1/lib/readline/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..b2358c67ac2c18a1a5ef1dc0375994dfc64b0f7d --- /dev/null +++ b/bash-5.1/lib/readline/Makefile.in @@ -0,0 +1,396 @@ +## -*- text -*- ############################################################# +# # +# Makefile for the Bash versions of the GNU Readline and History Libraries. # +# # +############################################################################# + +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + +# 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 . + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_VERSION = @PACKAGE_VERSION@ + +srcdir = @srcdir@ +VPATH = @srcdir@ +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ + +datarootdir = @datarootdir@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CC = @CC@ +RANLIB = @RANLIB@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +RM = rm -f +CP = cp +MV = mv + +SHELL = @MAKE_SHELL@ + +# Programs to make tags files. +ETAGS = etags -tw +CTAGS = ctags -tw + +DEBUG = @DEBUG@ + +CFLAGS = @CFLAGS@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ + +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +INCLUDES = -I. -I$(BUILD_DIR) -I$(topdir) -I$(topdir)/lib + +CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} \ + $(LOCAL_CFLAGS) $(CFLAGS) ${ADDON_CFLAGS} + +.c.o: + ${RM} $@ + $(CC) -c $(CCFLAGS) $< + +# The name of the main library target. +LIBRARY_NAME = libreadline.a + +# The C code source files for this library. +CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ + $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ + $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \ + $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \ + $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \ + $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \ + $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \ + $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \ + $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ + $(srcdir)/shell.c $(srcdir)/tilde.c $(srcdir)/savestring.c \ + $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ + $(srcdir)/colors.c $(srcdir)/parse-colors.c \ + $(srcdir)/mbutil.c $(srcdir)/xfree.c + +# The header files for this library. +HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ + posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \ + ansi_stdlib.h rlstdc.h tcap.h xmalloc.h rlprivate.h rlshell.h \ + rltypedefs.h rlmbutil.h colors.h parse-colors.h + +HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o savestring.o \ + mbutil.o +TILDEOBJ = tilde.o +COLORSOBJ = colors.o parse-colors.o +OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ + rltty.o complete.o bind.o isearch.o display.o signals.o \ + util.o kill.o undo.o macro.o input.o callback.o terminal.o \ + text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) $(COLORSOBJ) \ + xmalloc.o xfree.o compat.o + +# The texinfo files which document this library. +DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo +DOCOBJECT = doc/readline.dvi +DOCSUPPORT = doc/Makefile +DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) + +SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]* + +SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) + +THINGS_TO_TAR = $(SOURCES) $(SUPPORT) + +INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \ + rlstdc.h rlconf.h rltypedefs.h + +########################################################################## + +all: libreadline.a libhistory.a + +libreadline.a: $(OBJECTS) + $(RM) $@ + $(AR) $(ARFLAGS) $@ $(OBJECTS) + -test -n "$(RANLIB)" && $(RANLIB) $@ + +libhistory.a: $(HISTOBJ) xmalloc.o xfree.o + $(RM) $@ + $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o + -test -n "$(RANLIB)" && $(RANLIB) $@ + +documentation: force + test -d doc || mkdir doc + -( cd doc && $(MAKE) $(MFLAGS) ) + +# Since tilde.c is shared between readline and bash, make sure we compile +# it with the right flags when it's built as part of readline +tilde.o: tilde.c + rm -f $@ + $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c + +force: + +install: + @echo "This version of the readline library should not be installed." + +uninstall: + @echo "This version of the readline library should not be installed." + +TAGS: force + $(ETAGS) $(CSOURCES) $(HSOURCES) + +tags: force + $(CTAGS) $(CSOURCES) $(HSOURCES) + +clean: force + $(RM) $(OBJECTS) *.a + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + +mostlyclean: clean + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + +distclean maintainer-clean: clean + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + $(RM) Makefile + $(RM) TAGS tags + +# Dependencies +bind.o: ansi_stdlib.h posixstat.h +bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +bind.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +bind.o: history.h rlstdc.h +callback.o: rlconf.h ansi_stdlib.h +callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h +compat.o: ${BUILD_DIR}/config.h +compat.o: rlstdc.h rltypedefs.h +complete.o: ansi_stdlib.h posixdir.h posixstat.h +complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h +complete.o: colors.h +display.o: ansi_stdlib.h posixstat.h +display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +display.o: tcap.h +display.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +display.o: history.h rlstdc.h +funmap.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +funmap.o: rlconf.h ansi_stdlib.h rlstdc.h +funmap.o: ${BUILD_DIR}/config.h +histexpand.o: ansi_stdlib.h +histexpand.o: history.h histlib.h rlstdc.h +histexpand.o: ${BUILD_DIR}/config.h +histfile.o: ansi_stdlib.h +histfile.o: history.h histlib.h rlstdc.h +histfile.o: ${BUILD_DIR}/config.h +history.o: ansi_stdlib.h +history.o: history.h histlib.h rlstdc.h +history.o: ${BUILD_DIR}/config.h +histsearch.o: ansi_stdlib.h +histsearch.o: history.h histlib.h rlstdc.h +histsearch.o: ${BUILD_DIR}/config.h +input.o: ansi_stdlib.h +input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +input.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h +isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +isearch.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +isearch.o: ansi_stdlib.h history.h rlstdc.h +keymaps.o: emacs_keymap.c vi_keymap.c +keymaps.o: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h +keymaps.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +keymaps.o: ${BUILD_DIR}/config.h rlstdc.h +kill.o: ansi_stdlib.h +kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +kill.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +kill.o: history.h rlstdc.h +macro.o: ansi_stdlib.h +macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +macro.o: history.h rlstdc.h +mbutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rlmbutil.h +mbutil.o: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h +misc.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +misc.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +misc.o: history.h rlstdc.h ansi_stdlib.h +nls.o: ansi_stdlib.h +nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +nls.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +nls.o: history.h rlstdc.h +parens.o: rlconf.h +parens.o: ${BUILD_DIR}/config.h +parens.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h +readline.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +readline.o: history.h rlstdc.h +readline.o: posixstat.h ansi_stdlib.h posixjmp.h +rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +rltty.o: rltty.h +rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h +savestring.o: ${BUILD_DIR}/config.h +search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +search.o: ansi_stdlib.h history.h rlstdc.h +shell.o: ${BUILD_DIR}/config.h ansi_stdlib.h +signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +signals.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +signals.o: history.h rlstdc.h +terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +terminal.o: tcap.h +terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +terminal.o: history.h rlstdc.h +text.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +text.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +text.o: history.h rlstdc.h ansi_stdlib.h +rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +tilde.o: ansi_stdlib.h +tilde.o: ${BUILD_DIR}/config.h +tilde.o: tilde.h +undo.o: ansi_stdlib.h +undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +undo.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +undo.o: history.h rlstdc.h xmalloc.h +util.o: posixjmp.h ansi_stdlib.h +util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h +vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h +vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h +vi_mode.o: history.h ansi_stdlib.h rlstdc.h +xmalloc.o: ${BUILD_DIR}/config.h ansi_stdlib.h +xfree.o: ${BUILD_DIR}/config.h ansi_stdlib.h + +colors.o: ${BUILD_DIR}/config.h colors.h +colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h +colors.o: rlconf.h +colors.o: ansi_stdlib.h posixstat.h +parse-colors.o: ${BUILD_DIR}/config.h colors.h parse-colors.h +parse-colors.o: rldefs.h rlconf.h +parse-colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h + +bind.o: rlshell.h +histfile.o: rlshell.h +nls.o: rlshell.h +readline.o: rlshell.h +shell.o: rlshell.h +terminal.o: rlshell.h +histexpand.o: rlshell.h + +bind.o: rlprivate.h +callback.o: rlprivate.h +complete.o: rlprivate.h +display.o: rlprivate.h +input.o: rlprivate.h +isearch.o: rlprivate.h +kill.o: rlprivate.h +macro.o: rlprivate.h +mbutil.o: rlprivate.h +misc.o: rlprivate.h +nls.o: rlprivate.h +parens.o: rlprivate.h +readline.o: rlprivate.h +rltty.o: rlprivate.h +search.o: rlprivate.h +signals.o: rlprivate.h +terminal.o: rlprivate.h +text.o: rlprivate.h +undo.o: rlprivate.h +util.o: rlprivate.h +vi_mode.o: rlprivate.h +colors.o: rlprivate.h +parse-colors.o: rlprivate.h + +bind.o: xmalloc.h +complete.o: xmalloc.h +display.o: xmalloc.h +funmap.o: xmalloc.h +histexpand.o: xmalloc.h +histfile.o: xmalloc.h +history.o: xmalloc.h +input.o: xmalloc.h +isearch.o: xmalloc.h +keymaps.o: xmalloc.h +kill.o: xmalloc.h +macro.o: xmalloc.h +mbutil.o: xmalloc.h +misc.o: xmalloc.h +readline.o: xmalloc.h +savestring.o: xmalloc.h +search.o: xmalloc.h +shell.o: xmalloc.h +terminal.o: xmalloc.h +text.o: xmalloc.h +tilde.o: xmalloc.h +undo.o: xmalloc.h +util.o: xmalloc.h +vi_mode.o: xmalloc.h +xfree.o: xmalloc.h +xmalloc.o: xmalloc.h +colors.o: xmalloc.h +parse-colors.o: xmalloc.h + +complete.o: rlmbutil.h +display.o: rlmbutil.h +histexpand.o: rlmbutil.h +input.o: rlmbutil.h +isearch.o: rlmbutil.h +mbutil.o: rlmbutil.h +misc.o: rlmbutil.h +readline.o: rlmbutil.h +search.o: rlmbutil.h +text.o: rlmbutil.h +vi_mode.o: rlmbutil.h +colors.o: rlmbutil.h +parse-colors.o: rlmbutil.h + +# Rules for deficient makes, like SunOS and Solaris +bind.o: bind.c +callback.o: callback.c +compat.o: compat.c +complete.o: complete.c +display.o: display.c +funmap.o: funmap.c +input.o: input.c +isearch.o: isearch.c +keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c +kill.o: kill.c +macro.o: macro.c +mbutil.o: mbutil.c +misc.o: misc.c +nls.o: nls.c +parens.o: parens.c +readline.o: readline.c +rltty.o: rltty.c +savestring.o: savestring.c +search.o: search.c +shell.o: shell.c +signals.o: signals.c +terminal.o: terminal.c +text.o: text.c +tilde.o: tilde.c +undo.o: undo.c +util.o: util.c +vi_mode.o: vi_mode.c +xfree.o: xfree.c +xmalloc.o: xmalloc.c + +colors.o: colors.c +parse-colors.o: parse-colors.c + +histexpand.o: histexpand.c +histfile.o: histfile.c +history.o: history.c +histsearch.o: histsearch.c diff --git a/bash-5.1/lib/readline/README b/bash-5.1/lib/readline/README new file mode 100644 index 0000000000000000000000000000000000000000..131471ca83547b29fde999383d2037cf53017ad1 --- /dev/null +++ b/bash-5.1/lib/readline/README @@ -0,0 +1,6 @@ +This is the distribution of the Gnu Readline library. See the file +STANDALONE for a description of the #defines that can be passed via +the makefile to build readline on different systems. + +The file rlconf.h contains defines that enable and disable certain +readline features. diff --git a/bash-5.1/lib/readline/STANDALONE b/bash-5.1/lib/readline/STANDALONE new file mode 100644 index 0000000000000000000000000000000000000000..c6b5cbd34a05a769bc415922643950a6860d42b3 --- /dev/null +++ b/bash-5.1/lib/readline/STANDALONE @@ -0,0 +1,2 @@ +This is not to be built as a standalone library to be installed in some +public place; get the full readline distribution instead. diff --git a/bash-5.1/lib/readline/ansi_stdlib.h b/bash-5.1/lib/readline/ansi_stdlib.h new file mode 100644 index 0000000000000000000000000000000000000000..7dc2ee0cf4990fb54083c2a7349ca4c93e9f79c8 --- /dev/null +++ b/bash-5.1/lib/readline/ansi_stdlib.h @@ -0,0 +1,54 @@ +/* ansi_stdlib.h -- An ANSI Standard stdlib.h. */ +/* A minimal stdlib.h containing extern declarations for those functions + that bash uses. */ + +/* Copyright (C) 1993 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_STDLIB_H_) +#define _STDLIB_H_ 1 + +/* String conversion functions. */ +extern int atoi (); + +extern double atof (); +extern double strtod (); + +/* Memory allocation functions. */ +/* Generic pointer type. */ +#ifndef PTR_T + +#if defined (__STDC__) +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* PTR_T */ + +extern PTR_T malloc (); +extern PTR_T realloc (); +extern void free (); + +/* Other miscellaneous functions. */ +extern void abort (); +extern void exit (); +extern char *getenv (); +extern void qsort (); + +#endif /* _STDLIB_H */ diff --git a/bash-5.1/lib/readline/bind.c b/bash-5.1/lib/readline/bind.c new file mode 100644 index 0000000000000000000000000000000000000000..87596dcec95ad161743c6adf84e25f15ba7401b3 --- /dev/null +++ b/bash-5.1/lib/readline/bind.c @@ -0,0 +1,2970 @@ +/* bind.c -- key binding and startup file support for the readline library. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (__TANDEM) +# include +#endif + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include +#include +#if defined (HAVE_SYS_FILE_H) +# include +#endif /* HAVE_SYS_FILE_H */ + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#include "posixstat.h" + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +#if !defined (strchr) && !defined (__STDC__) +extern char *strchr (), *strrchr (); +#endif /* !strchr && !__STDC__ */ + +/* Variables exported by this file. */ +Keymap rl_binding_keymap; + +static int _rl_skip_to_delim PARAMS((char *, int, int)); + +#if defined (USE_VARARGS) && defined (PREFER_STDARG) +static void _rl_init_file_error (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +#else +static void _rl_init_file_error (); +#endif + +static rl_command_func_t *_rl_function_of_keyseq_internal PARAMS((const char *, size_t, Keymap, int *)); + +static char *_rl_read_file PARAMS((char *, size_t *)); +static int _rl_read_init_file PARAMS((const char *, int)); +static int glean_key_from_name PARAMS((char *)); + +static int find_boolean_var PARAMS((const char *)); +static int find_string_var PARAMS((const char *)); + +static const char *boolean_varname PARAMS((int)); +static const char *string_varname PARAMS((int)); + +static char *_rl_get_string_variable_value PARAMS((const char *)); +static int substring_member_of_array PARAMS((const char *, const char * const *)); + +static int _rl_get_keymap_by_name PARAMS((const char *)); +static int _rl_get_keymap_by_map PARAMS((Keymap)); + +static int currently_reading_init_file; + +/* used only in this file */ +static int _rl_prefer_visible_bell = 1; + +#define OP_EQ 1 +#define OP_NE 2 +#define OP_GT 3 +#define OP_GE 4 +#define OP_LT 5 +#define OP_LE 6 + +#define OPSTART(c) ((c) == '=' || (c) == '!' || (c) == '<' || (c) == '>') +#define CMPSTART(c) ((c) == '=' || (c) == '!') + +/* **************************************************************** */ +/* */ +/* Binding keys */ +/* */ +/* **************************************************************** */ + +/* rl_add_defun (char *name, rl_command_func_t *function, int key) + Add NAME to the list of named functions. Make FUNCTION be the function + that gets called. If KEY is not -1, then bind it. */ +int +rl_add_defun (const char *name, rl_command_func_t *function, int key) +{ + if (key != -1) + rl_bind_key (key, function); + rl_add_funmap_entry (name, function); + return 0; +} + +/* Bind KEY to FUNCTION. Returns non-zero if KEY is out of range. */ +int +rl_bind_key (int key, rl_command_func_t *function) +{ + char keyseq[4]; + int l; + + if (key < 0 || key > largest_char) + return (key); + + /* Want to make this a multi-character key sequence with an ESC prefix */ + if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii) + { + if (_rl_keymap[ESC].type == ISKMAP) + { + Keymap escmap; + + escmap = FUNCTION_TO_KEYMAP (_rl_keymap, ESC); + key = UNMETA (key); + escmap[key].type = ISFUNC; + escmap[key].function = function; + return (0); + } + + /* Otherwise, let's just let rl_generic_bind handle the key sequence. + We start it off with ESC here and let the code below add the rest + of the sequence. */ + keyseq[0] = ESC; + l = 1; + key = UNMETA(key); + goto bind_keyseq; + } + + /* If it's bound to a function or macro, just overwrite. Otherwise we have + to treat it as a key sequence so rl_generic_bind handles shadow keymaps + for us. If we are binding '\' or \C-@ (NUL) make sure to escape it so + it makes it through the call to rl_translate_keyseq. */ + if (_rl_keymap[key].type != ISKMAP) + { + if (_rl_keymap[key].type == ISMACR) + xfree ((char *)_rl_keymap[key].function); + _rl_keymap[key].type = ISFUNC; + _rl_keymap[key].function = function; + } + else + { + l = 0; +bind_keyseq: + if (key == '\\') + { + keyseq[l++] = '\\'; + keyseq[l++] = '\\'; + } + else if (key == '\0') + { + keyseq[l++] = '\\'; + keyseq[l++] = '0'; + } + else + keyseq[l++] = key; + keyseq[l] = '\0'; + rl_bind_keyseq (keyseq, function); + } + rl_binding_keymap = _rl_keymap; + return (0); +} + +/* Bind KEY to FUNCTION in MAP. Returns non-zero in case of invalid + KEY. */ +int +rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) +{ + int result; + Keymap oldmap; + + oldmap = _rl_keymap; + _rl_keymap = map; + result = rl_bind_key (key, function); + _rl_keymap = oldmap; + return (result); +} + +/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right + now, this is always used to attempt to bind the arrow keys. */ +int +rl_bind_key_if_unbound_in_map (int key, rl_command_func_t *default_func, Keymap kmap) +{ + char *keyseq; + + keyseq = rl_untranslate_keyseq ((unsigned char)key); + return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap)); +} + +int +rl_bind_key_if_unbound (int key, rl_command_func_t *default_func) +{ + char *keyseq; + + keyseq = rl_untranslate_keyseq ((unsigned char)key); + return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap)); +} + +/* Make KEY do nothing in the currently selected keymap. + Returns non-zero in case of error. This is not the same as self-insert; + this makes it a dead key. */ +int +rl_unbind_key (int key) +{ + return (rl_bind_key (key, (rl_command_func_t *)NULL)); +} + +/* Make KEY do nothing in MAP. Returns non-zero in case of error. */ +int +rl_unbind_key_in_map (int key, Keymap map) +{ + return (rl_bind_key_in_map (key, (rl_command_func_t *)NULL, map)); +} + +/* Unbind all keys bound to FUNCTION in MAP. */ +int +rl_unbind_function_in_map (rl_command_func_t *func, Keymap map) +{ + register int i, rval; + + for (i = rval = 0; i < KEYMAP_SIZE; i++) + { + if (map[i].type == ISFUNC && map[i].function == func) + { + map[i].function = (rl_command_func_t *)NULL; + rval = 1; + } + else if (map[i].type == ISKMAP) /* TAG:readline-8.1 */ + { + int r; + r = rl_unbind_function_in_map (func, FUNCTION_TO_KEYMAP (map, i)); + if (r == 1) + rval = 1; + } + } + return rval; +} + +/* Unbind all keys bound to COMMAND, which is a bindable command name, in MAP */ +int +rl_unbind_command_in_map (const char *command, Keymap map) +{ + rl_command_func_t *func; + + func = rl_named_function (command); + if (func == 0) + return 0; + return (rl_unbind_function_in_map (func, map)); +} + +/* Bind the key sequence represented by the string KEYSEQ to + FUNCTION, starting in the current keymap. This makes new + keymaps as necessary. */ +int +rl_bind_keyseq (const char *keyseq, rl_command_func_t *function) +{ + return (rl_generic_bind (ISFUNC, keyseq, (char *)function, _rl_keymap)); +} + +/* Bind the key sequence represented by the string KEYSEQ to + FUNCTION. This makes new keymaps as necessary. The initial + place to do bindings is in MAP. */ +int +rl_bind_keyseq_in_map (const char *keyseq, rl_command_func_t *function, Keymap map) +{ + return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map)); +} + +/* Backwards compatibility; equivalent to rl_bind_keyseq_in_map() */ +int +rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) +{ + return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map)); +} + +/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right + now, this is always used to attempt to bind the arrow keys, hence the + check for rl_vi_movement_mode. */ +int +rl_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *default_func, Keymap kmap) +{ + rl_command_func_t *func; + char *keys; + int keys_len; + + if (keyseq) + { + /* Handle key sequences that require translations and `raw' ones that + don't. This might be a problem with backslashes. */ + keys = (char *)xmalloc (1 + (2 * strlen (keyseq))); + if (rl_translate_keyseq (keyseq, keys, &keys_len)) + { + xfree (keys); + return -1; + } + func = rl_function_of_keyseq_len (keys, keys_len, kmap, (int *)NULL); + xfree (keys); +#if defined (VI_MODE) + if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode) +#else + if (!func || func == rl_do_lowercase_version) +#endif + return (rl_bind_keyseq_in_map (keyseq, default_func, kmap)); + else + return 1; + } + return 0; +} + +int +rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *default_func) +{ + return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap)); +} + +/* Bind the key sequence represented by the string KEYSEQ to + the string of characters MACRO. This makes new keymaps as + necessary. The initial place to do bindings is in MAP. */ +int +rl_macro_bind (const char *keyseq, const char *macro, Keymap map) +{ + char *macro_keys; + int macro_keys_len; + + macro_keys = (char *)xmalloc ((2 * strlen (macro)) + 1); + + if (rl_translate_keyseq (macro, macro_keys, ¯o_keys_len)) + { + xfree (macro_keys); + return -1; + } + rl_generic_bind (ISMACR, keyseq, macro_keys, map); + return 0; +} + +/* Bind the key sequence represented by the string KEYSEQ to + the arbitrary pointer DATA. TYPE says what kind of data is + pointed to by DATA, right now this can be a function (ISFUNC), + a macro (ISMACR), or a keymap (ISKMAP). This makes new keymaps + as necessary. The initial place to do bindings is in MAP. */ +int +rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) +{ + char *keys; + int keys_len, prevkey, ic; + register int i; + KEYMAP_ENTRY k; + Keymap prevmap; + + k.function = 0; + + /* If no keys to bind to, exit right away. */ + if (keyseq == 0 || *keyseq == 0) + { + if (type == ISMACR) + xfree (data); + return -1; + } + + keys = (char *)xmalloc (1 + (2 * strlen (keyseq))); + + /* Translate the ASCII representation of KEYSEQ into an array of + characters. Stuff the characters into KEYS, and the length of + KEYS into KEYS_LEN. */ + if (rl_translate_keyseq (keyseq, keys, &keys_len)) + { + xfree (keys); + return -1; + } + + prevmap = map; + prevkey = keys[0]; + + /* Bind keys, making new keymaps as necessary. */ + for (i = 0; i < keys_len; i++) + { + unsigned char uc = keys[i]; + + if (i > 0) + prevkey = ic; + + ic = uc; + if (ic < 0 || ic >= KEYMAP_SIZE) + { + xfree (keys); + return -1; + } + + /* We now rely on rl_translate_keyseq to do this conversion, so this + check is superfluous. */ +#if 0 + if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) + { + ic = UNMETA (ic); + if (map[ESC].type == ISKMAP) + { + prevmap = map; + map = FUNCTION_TO_KEYMAP (map, ESC); + } + } +#endif + + if ((i + 1) < keys_len) + { + if (map[ic].type != ISKMAP) + { + /* We allow subsequences of keys. If a keymap is being + created that will `shadow' an existing function or macro + key binding, we save that keybinding into the ANYOTHERKEY + index in the new map. The dispatch code will look there + to find the function to execute if the subsequence is not + matched. ANYOTHERKEY was chosen to be greater than + UCHAR_MAX. */ + k = map[ic]; + + map[ic].type = ISKMAP; + map[ic].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap()); + } + prevmap = map; + map = FUNCTION_TO_KEYMAP (map, ic); + /* The dispatch code will return this function if no matching + key sequence is found in the keymap. This (with a little + help from the dispatch code in readline.c) allows `a' to be + mapped to something, `abc' to be mapped to something else, + and the function bound to `a' to be executed when the user + types `abx', leaving `bx' in the input queue. */ + if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR)) + { + map[ANYOTHERKEY] = k; + k.function = 0; + } + } + else + { + if (map[ic].type == ISKMAP) + { + prevmap = map; + map = FUNCTION_TO_KEYMAP (map, ic); + ic = ANYOTHERKEY; + /* If we're trying to override a keymap with a null function + (e.g., trying to unbind it), we can't use a null pointer + here because that's indistinguishable from having not been + overridden. We use a special bindable function that does + nothing. */ + if (type == ISFUNC && data == 0) + data = (char *)_rl_null_function; + } + if (map[ic].type == ISMACR) + xfree ((char *)map[ic].function); + + map[ic].function = KEYMAP_TO_FUNCTION (data); + map[ic].type = type; + } + + rl_binding_keymap = map; + + } + + /* If we unbound a key (type == ISFUNC, data == 0), and the prev keymap + points to the keymap where we unbound the key (sanity check), and the + current binding keymap is empty (rl_empty_keymap() returns non-zero), + and the binding keymap has ANYOTHERKEY set with type == ISFUNC + (overridden function), delete the now-empty keymap, take the previously- + overridden function and remove the override. */ + /* Right now, this only works one level back. */ + if (type == ISFUNC && data == 0 && + prevmap[prevkey].type == ISKMAP && + (FUNCTION_TO_KEYMAP(prevmap, prevkey) == rl_binding_keymap) && + rl_binding_keymap[ANYOTHERKEY].type == ISFUNC && + rl_empty_keymap (rl_binding_keymap)) + { + prevmap[prevkey].type = rl_binding_keymap[ANYOTHERKEY].type; + prevmap[prevkey].function = rl_binding_keymap[ANYOTHERKEY].function; + rl_discard_keymap (rl_binding_keymap); + rl_binding_keymap = prevmap; + } + + xfree (keys); + return 0; +} + +/* Translate the ASCII representation of SEQ, stuffing the values into ARRAY, + an array of characters. LEN gets the final length of ARRAY. Return + non-zero if there was an error parsing SEQ. */ +int +rl_translate_keyseq (const char *seq, char *array, int *len) +{ + register int i, l, temp; + int has_control, has_meta; + unsigned char c; + + has_control = 0; + has_meta = 0; + + /* When there are incomplete prefixes \C- or \M- (has_control || has_meta) + without base character at the end of SEQ, they are processed as the + prefixes for '\0'. + */ + for (i = l = 0; (c = seq[i]) || has_control || has_meta; i++) + { + /* Only backslashes followed by a non-null character are handled + specially. Trailing backslash (backslash followed by '\0') is + processed as a normal character. + */ + if (c == '\\' && seq[i + 1] != '\0') + { + c = seq[++i]; + + /* Handle \C- and \M- prefixes. */ + if (c == 'C' && seq[i + 1] == '-') + { + i++; + has_control = 1; + continue; + } + else if (c == 'M' && seq[i + 1] == '-') + { + i++; + has_meta = 1; + continue; + } + + /* Translate other backslash-escaped characters. These are the + same escape sequences that bash's `echo' and `printf' builtins + handle, with the addition of \d -> RUBOUT. A backslash + preceding a character that is not special is stripped. */ + switch (c) + { + case 'a': + c = '\007'; + break; + case 'b': + c = '\b'; + break; + case 'd': + c = RUBOUT; /* readline-specific */ + break; + case 'e': + c = ESC; + break; + case 'f': + c = '\f'; + break; + case 'n': + c = NEWLINE; + break; + case 'r': + c = RETURN; + break; + case 't': + c = TAB; + break; + case 'v': + c = 0x0B; + break; + case '\\': + c = '\\'; + break; + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + i++; + for (temp = 2, c -= '0'; ISOCTAL ((unsigned char)seq[i]) && temp--; i++) + c = (c * 8) + OCTVALUE (seq[i]); + i--; /* auto-increment in for loop */ + c &= largest_char; + break; + case 'x': + i++; + for (temp = 2, c = 0; ISXDIGIT ((unsigned char)seq[i]) && temp--; i++) + c = (c * 16) + HEXVALUE (seq[i]); + if (temp == 2) + c = 'x'; + i--; /* auto-increment in for loop */ + c &= largest_char; + break; + default: /* backslashes before non-special chars just add the char */ + c &= largest_char; + break; /* the backslash is stripped */ + } + } + + /* Process \C- and \M- flags */ + if (has_control) + { + /* Special treatment for C-? */ + c = (c == '?') ? RUBOUT : CTRL (_rl_to_upper (c)); + has_control = 0; + } + if (has_meta) + { + c = META (c); + has_meta = 0; + } + + /* If convert-meta is turned on, convert a meta char to a key sequence */ + if (META_CHAR (c) && _rl_convert_meta_chars_to_ascii) + { + array[l++] = ESC; /* ESC is meta-prefix */ + array[l++] = UNMETA (c); + } + else + array[l++] = (c); + + /* Null characters may be processed for incomplete prefixes at the end of + sequence */ + if (seq[i] == '\0') + break; + } + + *len = l; + array[l] = '\0'; + return (0); +} + +static int +_rl_isescape (int c) +{ + switch (c) + { + case '\007': + case '\b': + case '\f': + case '\n': + case '\r': + case TAB: + case 0x0b: return (1); + default: return (0); + } +} + +static int +_rl_escchar (int c) +{ + switch (c) + { + case '\007': return ('a'); + case '\b': return ('b'); + case '\f': return ('f'); + case '\n': return ('n'); + case '\r': return ('r'); + case TAB: return ('t'); + case 0x0b: return ('v'); + default: return (c); + } +} + +char * +rl_untranslate_keyseq (int seq) +{ + static char kseq[16]; + int i, c; + + i = 0; + c = seq; + if (META_CHAR (c)) + { + kseq[i++] = '\\'; + kseq[i++] = 'M'; + kseq[i++] = '-'; + c = UNMETA (c); + } + else if (c == ESC) + { + kseq[i++] = '\\'; + c = 'e'; + } + else if (CTRL_CHAR (c)) + { + kseq[i++] = '\\'; + kseq[i++] = 'C'; + kseq[i++] = '-'; + c = _rl_to_lower (UNCTRL (c)); + } + else if (c == RUBOUT) + { + kseq[i++] = '\\'; + kseq[i++] = 'C'; + kseq[i++] = '-'; + c = '?'; + } + + if (c == ESC) + { + kseq[i++] = '\\'; + c = 'e'; + } + else if (c == '\\' || c == '"') + { + kseq[i++] = '\\'; + } + + kseq[i++] = (unsigned char) c; + kseq[i] = '\0'; + return kseq; +} + +char * +_rl_untranslate_macro_value (char *seq, int use_escapes) +{ + char *ret, *r, *s; + int c; + + r = ret = (char *)xmalloc (7 * strlen (seq) + 1); + for (s = seq; *s; s++) + { + c = *s; + if (META_CHAR (c)) + { + *r++ = '\\'; + *r++ = 'M'; + *r++ = '-'; + c = UNMETA (c); + } + else if (c == ESC) + { + *r++ = '\\'; + c = 'e'; + } + else if (CTRL_CHAR (c)) + { + *r++ = '\\'; + if (use_escapes && _rl_isescape (c)) + c = _rl_escchar (c); + else + { + *r++ = 'C'; + *r++ = '-'; + c = _rl_to_lower (UNCTRL (c)); + } + } + else if (c == RUBOUT) + { + *r++ = '\\'; + *r++ = 'C'; + *r++ = '-'; + c = '?'; + } + + if (c == ESC) + { + *r++ = '\\'; + c = 'e'; + } + else if (c == '\\' || c == '"') + *r++ = '\\'; + + *r++ = (unsigned char)c; + } + *r = '\0'; + return ret; +} + +/* Return a pointer to the function that STRING represents. + If STRING doesn't have a matching function, then a NULL pointer + is returned. The string match is case-insensitive. */ +rl_command_func_t * +rl_named_function (const char *string) +{ + register int i; + + rl_initialize_funmap (); + + for (i = 0; funmap[i]; i++) + if (_rl_stricmp (funmap[i]->name, string) == 0) + return (funmap[i]->function); + return ((rl_command_func_t *)NULL); +} + +/* Return the function (or macro) definition which would be invoked via + KEYSEQ if executed in MAP. If MAP is NULL, then the current keymap is + used. TYPE, if non-NULL, is a pointer to an int which will receive the + type of the object pointed to. One of ISFUNC (function), ISKMAP (keymap), + or ISMACR (macro). */ +static rl_command_func_t * +_rl_function_of_keyseq_internal (const char *keyseq, size_t len, Keymap map, int *type) +{ + register int i; + + if (map == 0) + map = _rl_keymap; + + for (i = 0; keyseq && i < len; i++) + { + unsigned char ic = keyseq[i]; + + if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) + { + if (map[ESC].type == ISKMAP) + { + map = FUNCTION_TO_KEYMAP (map, ESC); + ic = UNMETA (ic); + } + /* XXX - should we just return NULL here, since this obviously + doesn't match? */ + else + { + if (type) + *type = map[ESC].type; + + return (map[ESC].function); + } + } + + if (map[ic].type == ISKMAP) + { + /* If this is the last key in the key sequence, return the + map. */ + if (i + 1 == len) + { + if (type) + *type = ISKMAP; + + return (map[ic].function); + } + else + map = FUNCTION_TO_KEYMAP (map, ic); + } + /* If we're not at the end of the key sequence, and the current key + is bound to something other than a keymap, then the entire key + sequence is not bound. */ + else if (map[ic].type != ISKMAP && i+1 < len) + return ((rl_command_func_t *)NULL); + else /* map[ic].type != ISKMAP && i+1 == len */ + { + if (type) + *type = map[ic].type; + + return (map[ic].function); + } + } + return ((rl_command_func_t *) NULL); +} + +rl_command_func_t * +rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) +{ + return _rl_function_of_keyseq_internal (keyseq, strlen (keyseq), map, type); +} + +rl_command_func_t * +rl_function_of_keyseq_len (const char *keyseq, size_t len, Keymap map, int *type) +{ + return _rl_function_of_keyseq_internal (keyseq, len, map, type); +} + +/* The last key bindings file read. */ +static char *last_readline_init_file = (char *)NULL; + +/* The file we're currently reading key bindings from. */ +static const char *current_readline_init_file; +static int current_readline_init_include_level; +static int current_readline_init_lineno; + +/* Read FILENAME into a locally-allocated buffer and return the buffer. + The size of the buffer is returned in *SIZEP. Returns NULL if any + errors were encountered. */ +static char * +_rl_read_file (char *filename, size_t *sizep) +{ + struct stat finfo; + size_t file_size; + char *buffer; + int i, file; + + file = -1; + if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0)) + { + if (file >= 0) + close (file); + return ((char *)NULL); + } + + file_size = (size_t)finfo.st_size; + + /* check for overflow on very large files */ + if (file_size != finfo.st_size || file_size + 1 < file_size) + { + if (file >= 0) + close (file); +#if defined (EFBIG) + errno = EFBIG; +#endif + return ((char *)NULL); + } + + /* Read the file into BUFFER. */ + buffer = (char *)xmalloc (file_size + 1); + i = read (file, buffer, file_size); + close (file); + + if (i < 0) + { + xfree (buffer); + return ((char *)NULL); + } + + RL_CHECK_SIGNALS (); + + buffer[i] = '\0'; + if (sizep) + *sizep = i; + + return (buffer); +} + +/* Re-read the current keybindings file. */ +int +rl_re_read_init_file (int count, int ignore) +{ + int r; + r = rl_read_init_file ((const char *)NULL); + rl_set_keymap_from_edit_mode (); + return r; +} + +/* Do key bindings from a file. If FILENAME is NULL it defaults + to the first non-null filename from this list: + 1. the filename used for the previous call + 2. the value of the shell variable `INPUTRC' + 3. ~/.inputrc + 4. /etc/inputrc + If the file existed and could be opened and read, 0 is returned, + otherwise errno is returned. */ +int +rl_read_init_file (const char *filename) +{ + /* Default the filename. */ + if (filename == 0) + filename = last_readline_init_file; + if (filename == 0) + filename = sh_get_env_value ("INPUTRC"); + if (filename == 0 || *filename == 0) + { + filename = DEFAULT_INPUTRC; + /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */ + if (_rl_read_init_file (filename, 0) == 0) + return 0; + filename = SYS_INPUTRC; + } + +#if defined (__MSDOS__) + if (_rl_read_init_file (filename, 0) == 0) + return 0; + filename = "~/_inputrc"; +#endif + return (_rl_read_init_file (filename, 0)); +} + +static int +_rl_read_init_file (const char *filename, int include_level) +{ + register int i; + char *buffer, *openname, *line, *end; + size_t file_size; + + current_readline_init_file = filename; + current_readline_init_include_level = include_level; + + openname = tilde_expand (filename); + buffer = _rl_read_file (openname, &file_size); + xfree (openname); + + RL_CHECK_SIGNALS (); + if (buffer == 0) + return (errno); + + if (include_level == 0 && filename != last_readline_init_file) + { + FREE (last_readline_init_file); + last_readline_init_file = savestring (filename); + } + + currently_reading_init_file = 1; + + /* Loop over the lines in the file. Lines that start with `#' are + comments; all other lines are commands for readline initialization. */ + current_readline_init_lineno = 1; + line = buffer; + end = buffer + file_size; + while (line < end) + { + /* Find the end of this line. */ + for (i = 0; line + i != end && line[i] != '\n'; i++); + +#if defined (__CYGWIN__) + /* ``Be liberal in what you accept.'' */ + if (line[i] == '\n' && line[i-1] == '\r') + line[i - 1] = '\0'; +#endif + + /* Mark end of line. */ + line[i] = '\0'; + + /* Skip leading whitespace. */ + while (*line && whitespace (*line)) + { + line++; + i--; + } + + /* If the line is not a comment, then parse it. */ + if (*line && *line != '#') + rl_parse_and_bind (line); + + /* Move to the next line. */ + line += i + 1; + current_readline_init_lineno++; + } + + xfree (buffer); + currently_reading_init_file = 0; + return (0); +} + +static void +#if defined (PREFER_STDARG) +_rl_init_file_error (const char *format, ...) +#else +_rl_init_file_error (va_alist) + va_dcl +#endif +{ + va_list args; +#if defined (PREFER_VARARGS) + char *format; +#endif + +#if defined (PREFER_STDARG) + va_start (args, format); +#else + va_start (args); + format = va_arg (args, char *); +#endif + + fprintf (stderr, "readline: "); + if (currently_reading_init_file) + fprintf (stderr, "%s: line %d: ", current_readline_init_file, + current_readline_init_lineno); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + fflush (stderr); + + va_end (args); +} + +/* **************************************************************** */ +/* */ +/* Parser Helper Functions */ +/* */ +/* **************************************************************** */ + +static int +parse_comparison_op (s, indp) + const char *s; + int *indp; +{ + int i, peekc, op; + + if (OPSTART (s[*indp]) == 0) + return -1; + i = *indp; + peekc = s[i] ? s[i+1] : 0; + op = -1; + + if (s[i] == '=') + { + op = OP_EQ; + if (peekc == '=') + i++; + i++; + } + else if (s[i] == '!' && peekc == '=') + { + op = OP_NE; + i += 2; + } + else if (s[i] == '<' && peekc == '=') + { + op = OP_LE; + i += 2; + } + else if (s[i] == '>' && peekc == '=') + { + op = OP_GE; + i += 2; + } + else if (s[i] == '<') + { + op = OP_LT; + i += 1; + } + else if (s[i] == '>') + { + op = OP_GT; + i += 1; + } + + *indp = i; + return op; +} + +/* **************************************************************** */ +/* */ +/* Parser Directives */ +/* */ +/* **************************************************************** */ + +typedef int _rl_parser_func_t PARAMS((char *)); + +/* Things that mean `Control'. */ +const char * const _rl_possible_control_prefixes[] = { + "Control-", "C-", "CTRL-", (const char *)NULL +}; + +const char * const _rl_possible_meta_prefixes[] = { + "Meta", "M-", (const char *)NULL +}; + +/* Conditionals. */ + +/* Calling programs set this to have their argv[0]. */ +const char *rl_readline_name = "other"; + +/* Stack of previous values of parsing_conditionalized_out. */ +static unsigned char *if_stack = (unsigned char *)NULL; +static int if_stack_depth; +static int if_stack_size; + +/* Push _rl_parsing_conditionalized_out, and set parser state based + on ARGS. */ +static int +parser_if (char *args) +{ + int i, llen, boolvar, strvar; + + boolvar = strvar = -1; + + /* Push parser state. */ + if (if_stack_depth + 1 >= if_stack_size) + { + if (!if_stack) + if_stack = (unsigned char *)xmalloc (if_stack_size = 20); + else + if_stack = (unsigned char *)xrealloc (if_stack, if_stack_size += 20); + } + if_stack[if_stack_depth++] = _rl_parsing_conditionalized_out; + + /* If parsing is turned off, then nothing can turn it back on except + for finding the matching endif. In that case, return right now. */ + if (_rl_parsing_conditionalized_out) + return 0; + + llen = strlen (args); + + /* Isolate first argument. */ + for (i = 0; args[i] && !whitespace (args[i]); i++); + + if (args[i]) + args[i++] = '\0'; + + /* Handle "$if term=foo" and "$if mode=emacs" constructs. If this + isn't term=foo, or mode=emacs, then check to see if the first + word in ARGS is the same as the value stored in rl_readline_name. */ + if (rl_terminal_name && _rl_strnicmp (args, "term=", 5) == 0) + { + char *tem, *tname; + + /* Terminals like "aaa-60" are equivalent to "aaa". */ + tname = savestring (rl_terminal_name); + tem = strchr (tname, '-'); + if (tem) + *tem = '\0'; + + /* Test the `long' and `short' forms of the terminal name so that + if someone has a `sun-cmd' and does not want to have bindings + that will be executed if the terminal is a `sun', they can put + `$if term=sun-cmd' into their .inputrc. */ + _rl_parsing_conditionalized_out = _rl_stricmp (args + 5, tname) && + _rl_stricmp (args + 5, rl_terminal_name); + xfree (tname); + } +#if defined (VI_MODE) + else if (_rl_strnicmp (args, "mode=", 5) == 0) + { + int mode; + + if (_rl_stricmp (args + 5, "emacs") == 0) + mode = emacs_mode; + else if (_rl_stricmp (args + 5, "vi") == 0) + mode = vi_mode; + else + mode = no_mode; + + _rl_parsing_conditionalized_out = mode != rl_editing_mode; + } +#endif /* VI_MODE */ + else if (_rl_strnicmp (args, "version", 7) == 0) + { + int rlversion, versionarg, op, previ, major, minor; + + _rl_parsing_conditionalized_out = 1; + rlversion = RL_VERSION_MAJOR*10 + RL_VERSION_MINOR; + /* if "version" is separated from the operator by whitespace, or the + operand is separated from the operator by whitespace, restore it. + We're more liberal with allowed whitespace for this variable. */ + if (i > 0 && i <= llen && args[i-1] == '\0') + args[i-1] = ' '; + args[llen] = '\0'; /* just in case */ + for (i = 7; whitespace (args[i]); i++) + ; + if (OPSTART(args[i]) == 0) + { + _rl_init_file_error ("comparison operator expected, found `%s'", args[i] ? args + i : "end-of-line"); + return 0; + } + previ = i; + op = parse_comparison_op (args, &i); + if (op <= 0) + { + _rl_init_file_error ("comparison operator expected, found `%s'", args+previ); + return 0; + } + for ( ; args[i] && whitespace (args[i]); i++) + ; + if (args[i] == 0 || _rl_digit_p (args[i]) == 0) + { + _rl_init_file_error ("numeric argument expected, found `%s'", args+i); + return 0; + } + major = minor = 0; + previ = i; + for ( ; args[i] && _rl_digit_p (args[i]); i++) + major = major*10 + _rl_digit_value (args[i]); + if (args[i] == '.') + { + if (args[i + 1] && _rl_digit_p (args [i + 1]) == 0) + { + _rl_init_file_error ("numeric argument expected, found `%s'", args+previ); + return 0; + } + for (++i; args[i] && _rl_digit_p (args[i]); i++) + minor = minor*10 + _rl_digit_value (args[i]); + } + /* optional - check for trailing garbage on the line, allow whitespace + and a trailing comment */ + previ = i; + for ( ; args[i] && whitespace (args[i]); i++) + ; + if (args[i] && args[i] != '#') + { + _rl_init_file_error ("trailing garbage on line: `%s'", args+previ); + return 0; + } + versionarg = major*10 + minor; + + switch (op) + { + case OP_EQ: + _rl_parsing_conditionalized_out = rlversion == versionarg; + break; + case OP_NE: + _rl_parsing_conditionalized_out = rlversion != versionarg; + break; + case OP_GT: + _rl_parsing_conditionalized_out = rlversion > versionarg; + break; + case OP_GE: + _rl_parsing_conditionalized_out = rlversion >= versionarg; + break; + case OP_LT: + _rl_parsing_conditionalized_out = rlversion < versionarg; + break; + case OP_LE: + _rl_parsing_conditionalized_out = rlversion <= versionarg; + break; + } + } + /* Check to see if the first word in ARGS is the same as the + value stored in rl_readline_name. */ + else if (_rl_stricmp (args, rl_readline_name) == 0) + _rl_parsing_conditionalized_out = 0; + else if ((boolvar = find_boolean_var (args)) >= 0 || (strvar = find_string_var (args)) >= 0) + { + int op, previ; + size_t vlen; + const char *vname; + char *valuearg, *vval, prevc; + + _rl_parsing_conditionalized_out = 1; + vname = (boolvar >= 0) ? boolean_varname (boolvar) : string_varname (strvar); + vlen = strlen (vname); + if (i > 0 && i <= llen && args[i-1] == '\0') + args[i-1] = ' '; + args[llen] = '\0'; /* just in case */ + for (i = vlen; whitespace (args[i]); i++) + ; + if (CMPSTART(args[i]) == 0) + { + _rl_init_file_error ("equality comparison operator expected, found `%s'", args[i] ? args + i : "end-of-line"); + return 0; + } + previ = i; + op = parse_comparison_op (args, &i); + if (op != OP_EQ && op != OP_NE) + { + _rl_init_file_error ("equality comparison operator expected, found `%s'", args+previ); + return 0; + } + for ( ; args[i] && whitespace (args[i]); i++) + ; + if (args[i] == 0) + { + _rl_init_file_error ("argument expected, found `%s'", args+i); + return 0; + } + previ = i; + valuearg = args + i; + for ( ; args[i] && whitespace (args[i]) == 0; i++) + ; + prevc = args[i]; + args[i] = '\0'; /* null-terminate valuearg */ + vval = rl_variable_value (vname); + if (op == OP_EQ) + _rl_parsing_conditionalized_out = _rl_stricmp (vval, valuearg) != 0; + else if (op == OP_NE) + _rl_parsing_conditionalized_out = _rl_stricmp (vval, valuearg) == 0; + args[i] = prevc; + } + else + _rl_parsing_conditionalized_out = 1; + return 0; +} + +/* Invert the current parser state if there is anything on the stack. */ +static int +parser_else (char *args) +{ + register int i; + + if (if_stack_depth == 0) + { + _rl_init_file_error ("$else found without matching $if"); + return 0; + } + +#if 0 + /* Check the previous (n - 1) levels of the stack to make sure that + we haven't previously turned off parsing. */ + for (i = 0; i < if_stack_depth - 1; i++) +#else + /* Check the previous (n) levels of the stack to make sure that + we haven't previously turned off parsing. */ + for (i = 0; i < if_stack_depth; i++) +#endif + if (if_stack[i] == 1) + return 0; + + /* Invert the state of parsing if at top level. */ + _rl_parsing_conditionalized_out = !_rl_parsing_conditionalized_out; + return 0; +} + +/* Terminate a conditional, popping the value of + _rl_parsing_conditionalized_out from the stack. */ +static int +parser_endif (char *args) +{ + if (if_stack_depth) + _rl_parsing_conditionalized_out = if_stack[--if_stack_depth]; + else + _rl_init_file_error ("$endif without matching $if"); + return 0; +} + +static int +parser_include (char *args) +{ + const char *old_init_file; + char *e; + int old_line_number, old_include_level, r; + + if (_rl_parsing_conditionalized_out) + return (0); + + old_init_file = current_readline_init_file; + old_line_number = current_readline_init_lineno; + old_include_level = current_readline_init_include_level; + + e = strchr (args, '\n'); + if (e) + *e = '\0'; + r = _rl_read_init_file ((const char *)args, old_include_level + 1); + + current_readline_init_file = old_init_file; + current_readline_init_lineno = old_line_number; + current_readline_init_include_level = old_include_level; + + return r; +} + +/* Associate textual names with actual functions. */ +static const struct { + const char * const name; + _rl_parser_func_t *function; +} parser_directives [] = { + { "if", parser_if }, + { "endif", parser_endif }, + { "else", parser_else }, + { "include", parser_include }, + { (char *)0x0, (_rl_parser_func_t *)0x0 } +}; + +/* Handle a parser directive. STATEMENT is the line of the directive + without any leading `$'. */ +static int +handle_parser_directive (char *statement) +{ + register int i; + char *directive, *args; + + /* Isolate the actual directive. */ + + /* Skip whitespace. */ + for (i = 0; whitespace (statement[i]); i++); + + directive = &statement[i]; + + for (; statement[i] && !whitespace (statement[i]); i++); + + if (statement[i]) + statement[i++] = '\0'; + + for (; statement[i] && whitespace (statement[i]); i++); + + args = &statement[i]; + + /* Lookup the command, and act on it. */ + for (i = 0; parser_directives[i].name; i++) + if (_rl_stricmp (directive, parser_directives[i].name) == 0) + { + (*parser_directives[i].function) (args); + return (0); + } + + /* display an error message about the unknown parser directive */ + _rl_init_file_error ("%s: unknown parser directive", directive); + return (1); +} + +/* Start at STRING[START] and look for DELIM. Return I where STRING[I] == + DELIM or STRING[I] == 0. DELIM is usually a double quote. */ +static int +_rl_skip_to_delim (char *string, int start, int delim) +{ + int i, c, passc; + + for (i = start,passc = 0; c = string[i]; i++) + { + if (passc) + { + passc = 0; + if (c == 0) + break; + continue; + } + + if (c == '\\') + { + passc = 1; + continue; + } + + if (c == delim) + break; + } + + return i; +} + +/* Read the binding command from STRING and perform it. + A key binding command looks like: Keyname: function-name\0, + a variable binding command looks like: set variable value. + A new-style keybinding looks like "\C-x\C-x": exchange-point-and-mark. */ +int +rl_parse_and_bind (char *string) +{ + char *funname, *kname; + register int c, i; + int key, equivalency, foundmod, foundsep; + + while (string && whitespace (*string)) + string++; + + if (string == 0 || *string == 0 || *string == '#') + return 0; + + /* If this is a parser directive, act on it. */ + if (*string == '$') + { + handle_parser_directive (&string[1]); + return 0; + } + + /* If we aren't supposed to be parsing right now, then we're done. */ + if (_rl_parsing_conditionalized_out) + return 0; + + i = 0; + /* If this keyname is a complex key expression surrounded by quotes, + advance to after the matching close quote. This code allows the + backslash to quote characters in the key expression. */ + if (*string == '"') + { + i = _rl_skip_to_delim (string, 1, '"'); + + /* If we didn't find a closing quote, abort the line. */ + if (string[i] == '\0') + { + _rl_init_file_error ("%s: no closing `\"' in key binding", string); + return 1; + } + else + i++; /* skip past closing double quote */ + } + + /* Advance to the colon (:) or whitespace which separates the two objects. */ + for (; (c = string[i]) && c != ':' && c != ' ' && c != '\t'; i++ ); + + if (i == 0) + { + _rl_init_file_error ("`%s': invalid key binding: missing key sequence", string); + return 1; + } + + equivalency = (c == ':' && string[i + 1] == '='); + + foundsep = c != 0; + + /* Mark the end of the command (or keyname). */ + if (string[i]) + string[i++] = '\0'; + + /* If doing assignment, skip the '=' sign as well. */ + if (equivalency) + string[i++] = '\0'; + + /* If this is a command to set a variable, then do that. */ + if (_rl_stricmp (string, "set") == 0) + { + char *var, *value, *e; + int s; + + var = string + i; + /* Make VAR point to start of variable name. */ + while (*var && whitespace (*var)) var++; + + /* Make VALUE point to start of value string. */ + value = var; + while (*value && whitespace (*value) == 0) value++; + if (*value) + *value++ = '\0'; + while (*value && whitespace (*value)) value++; + + /* Strip trailing whitespace from values of boolean variables. */ + if (find_boolean_var (var) >= 0) + { + /* just read a whitespace-delimited word or empty string */ + for (e = value; *e && whitespace (*e) == 0; e++) + ; + if (e > value) + *e = '\0'; /* cut off everything trailing */ + } + else if ((i = find_string_var (var)) >= 0) + { + /* Allow quoted strings in variable values */ + if (*value == '"') + { + i = _rl_skip_to_delim (value, 1, *value); + value[i] = '\0'; + value++; /* skip past the quote */ + } + else + { + /* remove trailing whitespace */ + e = value + strlen (value) - 1; + while (e >= value && whitespace (*e)) + e--; + e++; /* skip back to whitespace or EOS */ + + if (*e && e >= value) + *e = '\0'; + } + } + else + { + /* avoid calling rl_variable_bind just to find this out */ + _rl_init_file_error ("%s: unknown variable name", var); + return 1; + } + + rl_variable_bind (var, value); + return 0; + } + + /* Skip any whitespace between keyname and funname. */ + for (; string[i] && whitespace (string[i]); i++); + funname = &string[i]; + + /* Now isolate funname. + For straight function names just look for whitespace, since + that will signify the end of the string. But this could be a + macro definition. In that case, the string is quoted, so skip + to the matching delimiter. We allow the backslash to quote the + delimiter characters in the macro body. */ + /* This code exists to allow whitespace in macro expansions, which + would otherwise be gobbled up by the next `for' loop.*/ + /* XXX - it may be desirable to allow backslash quoting only if " is + the quoted string delimiter, like the shell. */ + if (*funname == '\'' || *funname == '"') + { + i = _rl_skip_to_delim (string, i+1, *funname); + if (string[i]) + i++; + else + { + _rl_init_file_error ("`%s': missing closing quote for macro", funname); + return 1; + } + } + + /* Advance to the end of the string. */ + for (; string[i] && whitespace (string[i]) == 0; i++); + + /* No extra whitespace at the end of the string. */ + string[i] = '\0'; + + /* Handle equivalency bindings here. Make the left-hand side be exactly + whatever the right-hand evaluates to, including keymaps. */ + if (equivalency) + { + return 0; + } + + if (foundsep == 0) + { + _rl_init_file_error ("%s: no key sequence terminator", string); + return 1; + } + + /* If this is a new-style key-binding, then do the binding with + rl_bind_keyseq (). Otherwise, let the older code deal with it. */ + if (*string == '"') + { + char *seq; + register int j, k, passc; + + seq = (char *)xmalloc (1 + strlen (string)); + for (j = 1, k = passc = 0; string[j]; j++) + { + /* Allow backslash to quote characters, but leave them in place. + This allows a string to end with a backslash quoting another + backslash, or with a backslash quoting a double quote. The + backslashes are left in place for rl_translate_keyseq (). */ + if (passc || (string[j] == '\\')) + { + seq[k++] = string[j]; + passc = !passc; + continue; + } + + if (string[j] == '"') + break; + + seq[k++] = string[j]; + } + seq[k] = '\0'; + + /* Binding macro? */ + if (*funname == '\'' || *funname == '"') + { + j = strlen (funname); + + /* Remove the delimiting quotes from each end of FUNNAME. */ + if (j && funname[j - 1] == *funname) + funname[j - 1] = '\0'; + + rl_macro_bind (seq, &funname[1], _rl_keymap); + } + else + rl_bind_keyseq (seq, rl_named_function (funname)); + + xfree (seq); + return 0; + } + + /* Get the actual character we want to deal with. */ + kname = strrchr (string, '-'); + if (kname == 0) + kname = string; + else + kname++; + + key = glean_key_from_name (kname); + + /* Add in control and meta bits. */ + foundmod = 0; + if (substring_member_of_array (string, _rl_possible_control_prefixes)) + { + key = CTRL (_rl_to_upper (key)); + foundmod = 1; + } + + if (substring_member_of_array (string, _rl_possible_meta_prefixes)) + { + key = META (key); + foundmod = 1; + } + + if (foundmod == 0 && kname != string) + { + _rl_init_file_error ("%s: unknown key modifier", string); + return 1; + } + + /* Temporary. Handle old-style keyname with macro-binding. */ + if (*funname == '\'' || *funname == '"') + { + char useq[2]; + int fl = strlen (funname); + + useq[0] = key; useq[1] = '\0'; + if (fl && funname[fl - 1] == *funname) + funname[fl - 1] = '\0'; + + rl_macro_bind (useq, &funname[1], _rl_keymap); + } +#if defined (PREFIX_META_HACK) + /* Ugly, but working hack to keep prefix-meta around. */ + else if (_rl_stricmp (funname, "prefix-meta") == 0) + { + char seq[2]; + + seq[0] = key; + seq[1] = '\0'; + rl_generic_bind (ISKMAP, seq, (char *)emacs_meta_keymap, _rl_keymap); + } +#endif /* PREFIX_META_HACK */ + else + rl_bind_key (key, rl_named_function (funname)); + + return 0; +} + +/* Simple structure for boolean readline variables (i.e., those that can + have one of two values; either "On" or 1 for truth, or "Off" or 0 for + false. */ + +#define V_SPECIAL 0x1 + +static const struct { + const char * const name; + int *value; + int flags; +} boolean_varlist [] = { + { "bind-tty-special-chars", &_rl_bind_stty_chars, 0 }, + { "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL }, + { "byte-oriented", &rl_byte_oriented, 0 }, +#if defined (COLOR_SUPPORT) + { "colored-completion-prefix",&_rl_colored_completion_prefix, 0 }, + { "colored-stats", &_rl_colored_stats, 0 }, +#endif + { "completion-ignore-case", &_rl_completion_case_fold, 0 }, + { "completion-map-case", &_rl_completion_case_map, 0 }, + { "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 }, + { "disable-completion", &rl_inhibit_completion, 0 }, + { "echo-control-characters", &_rl_echo_control_chars, 0 }, + { "enable-bracketed-paste", &_rl_enable_bracketed_paste, V_SPECIAL }, + { "enable-keypad", &_rl_enable_keypad, 0 }, + { "enable-meta-key", &_rl_enable_meta, 0 }, + { "expand-tilde", &rl_complete_with_tilde_expansion, 0 }, + { "history-preserve-point", &_rl_history_preserve_point, 0 }, + { "horizontal-scroll-mode", &_rl_horizontal_scroll_mode, 0 }, + { "input-meta", &_rl_meta_flag, 0 }, + { "mark-directories", &_rl_complete_mark_directories, 0 }, + { "mark-modified-lines", &_rl_mark_modified_lines, 0 }, + { "mark-symlinked-directories", &_rl_complete_mark_symlink_dirs, 0 }, + { "match-hidden-files", &_rl_match_hidden_files, 0 }, + { "menu-complete-display-prefix", &_rl_menu_complete_prefix_first, 0 }, + { "meta-flag", &_rl_meta_flag, 0 }, + { "output-meta", &_rl_output_meta_chars, 0 }, + { "page-completions", &_rl_page_completions, 0 }, + { "prefer-visible-bell", &_rl_prefer_visible_bell, V_SPECIAL }, + { "print-completions-horizontally", &_rl_print_completions_horizontally, 0 }, + { "revert-all-at-newline", &_rl_revert_all_at_newline, 0 }, + { "show-all-if-ambiguous", &_rl_complete_show_all, 0 }, + { "show-all-if-unmodified", &_rl_complete_show_unmodified, 0 }, + { "show-mode-in-prompt", &_rl_show_mode_in_prompt, 0 }, + { "skip-completed-text", &_rl_skip_completed_text, 0 }, +#if defined (VISIBLE_STATS) + { "visible-stats", &rl_visible_stats, 0 }, +#endif /* VISIBLE_STATS */ + { (char *)NULL, (int *)NULL, 0 } +}; + +static int +find_boolean_var (const char *name) +{ + register int i; + + for (i = 0; boolean_varlist[i].name; i++) + if (_rl_stricmp (name, boolean_varlist[i].name) == 0) + return i; + return -1; +} + +static const char * +boolean_varname (int i) +{ + return ((i >= 0) ? boolean_varlist[i].name : (char *)NULL); +} + +/* Hooks for handling special boolean variables, where a + function needs to be called or another variable needs + to be changed when they're changed. */ +static void +hack_special_boolean_var (int i) +{ + const char *name; + + name = boolean_varlist[i].name; + + if (_rl_stricmp (name, "blink-matching-paren") == 0) + _rl_enable_paren_matching (rl_blink_matching_paren); + else if (_rl_stricmp (name, "prefer-visible-bell") == 0) + { + if (_rl_prefer_visible_bell) + _rl_bell_preference = VISIBLE_BELL; + else + _rl_bell_preference = AUDIBLE_BELL; + } + else if (_rl_stricmp (name, "show-mode-in-prompt") == 0) + _rl_reset_prompt (); + else if (_rl_stricmp (name, "enable-bracketed-paste") == 0) + _rl_enable_active_region = _rl_enable_bracketed_paste; +} + +typedef int _rl_sv_func_t PARAMS((const char *)); + +/* These *must* correspond to the array indices for the appropriate + string variable. (Though they're not used right now.) */ +#define V_BELLSTYLE 0 +#define V_COMBEGIN 1 +#define V_EDITMODE 2 +#define V_ISRCHTERM 3 +#define V_KEYMAP 4 + +#define V_STRING 1 +#define V_INT 2 + +/* Forward declarations */ +static int sv_bell_style PARAMS((const char *)); +static int sv_combegin PARAMS((const char *)); +static int sv_dispprefix PARAMS((const char *)); +static int sv_compquery PARAMS((const char *)); +static int sv_compwidth PARAMS((const char *)); +static int sv_editmode PARAMS((const char *)); +static int sv_emacs_modestr PARAMS((const char *)); +static int sv_histsize PARAMS((const char *)); +static int sv_isrchterm PARAMS((const char *)); +static int sv_keymap PARAMS((const char *)); +static int sv_seqtimeout PARAMS((const char *)); +static int sv_viins_modestr PARAMS((const char *)); +static int sv_vicmd_modestr PARAMS((const char *)); + +static const struct { + const char * const name; + int flags; + _rl_sv_func_t *set_func; +} string_varlist[] = { + { "bell-style", V_STRING, sv_bell_style }, + { "comment-begin", V_STRING, sv_combegin }, + { "completion-display-width", V_INT, sv_compwidth }, + { "completion-prefix-display-length", V_INT, sv_dispprefix }, + { "completion-query-items", V_INT, sv_compquery }, + { "editing-mode", V_STRING, sv_editmode }, + { "emacs-mode-string", V_STRING, sv_emacs_modestr }, + { "history-size", V_INT, sv_histsize }, + { "isearch-terminators", V_STRING, sv_isrchterm }, + { "keymap", V_STRING, sv_keymap }, + { "keyseq-timeout", V_INT, sv_seqtimeout }, + { "vi-cmd-mode-string", V_STRING, sv_vicmd_modestr }, + { "vi-ins-mode-string", V_STRING, sv_viins_modestr }, + { (char *)NULL, 0, (_rl_sv_func_t *)0 } +}; + +static int +find_string_var (const char *name) +{ + register int i; + + for (i = 0; string_varlist[i].name; i++) + if (_rl_stricmp (name, string_varlist[i].name) == 0) + return i; + return -1; +} + +static const char * +string_varname (int i) +{ + return ((i >= 0) ? string_varlist[i].name : (char *)NULL); +} + +/* A boolean value that can appear in a `set variable' command is true if + the value is null or empty, `on' (case-insensitive), or "1". All other + values result in 0 (false). */ +static int +bool_to_int (const char *value) +{ + return (value == 0 || *value == '\0' || + (_rl_stricmp (value, "on") == 0) || + (value[0] == '1' && value[1] == '\0')); +} + +char * +rl_variable_value (const char *name) +{ + register int i; + + /* Check for simple variables first. */ + i = find_boolean_var (name); + if (i >= 0) + return (*boolean_varlist[i].value ? "on" : "off"); + + i = find_string_var (name); + if (i >= 0) + return (_rl_get_string_variable_value (string_varlist[i].name)); + + /* Unknown variable names return NULL. */ + return (char *)NULL; +} + +int +rl_variable_bind (const char *name, const char *value) +{ + register int i; + int v; + + /* Check for simple variables first. */ + i = find_boolean_var (name); + if (i >= 0) + { + *boolean_varlist[i].value = bool_to_int (value); + if (boolean_varlist[i].flags & V_SPECIAL) + hack_special_boolean_var (i); + return 0; + } + + i = find_string_var (name); + + /* For the time being, string names without a handler function are simply + ignored. */ + if (i < 0 || string_varlist[i].set_func == 0) + { + if (i < 0) + _rl_init_file_error ("%s: unknown variable name", name); + return 0; + } + + v = (*string_varlist[i].set_func) (value); + if (v != 0) + _rl_init_file_error ("%s: could not set value to `%s'", name, value); + return v; +} + +static int +sv_editmode (const char *value) +{ + if (_rl_strnicmp (value, "vi", 2) == 0) + { +#if defined (VI_MODE) + _rl_keymap = vi_insertion_keymap; + rl_editing_mode = vi_mode; +#endif /* VI_MODE */ + return 0; + } + else if (_rl_strnicmp (value, "emacs", 5) == 0) + { + _rl_keymap = emacs_standard_keymap; + rl_editing_mode = emacs_mode; + return 0; + } + return 1; +} + +static int +sv_combegin (const char *value) +{ + if (value && *value) + { + FREE (_rl_comment_begin); + _rl_comment_begin = savestring (value); + return 0; + } + return 1; +} + +static int +sv_dispprefix (const char *value) +{ + int nval = 0; + + if (value && *value) + { + nval = atoi (value); + if (nval < 0) + nval = 0; + } + _rl_completion_prefix_display_length = nval; + return 0; +} + +static int +sv_compquery (const char *value) +{ + int nval = 100; + + if (value && *value) + { + nval = atoi (value); + if (nval < 0) + nval = 0; + } + rl_completion_query_items = nval; + return 0; +} + +static int +sv_compwidth (const char *value) +{ + int nval = -1; + + if (value && *value) + nval = atoi (value); + + _rl_completion_columns = nval; + return 0; +} + +static int +sv_histsize (const char *value) +{ + int nval; + + nval = 500; + if (value && *value) + { + nval = atoi (value); + if (nval < 0) + { + unstifle_history (); + return 0; + } + } + stifle_history (nval); + return 0; +} + +static int +sv_keymap (const char *value) +{ + Keymap kmap; + + kmap = rl_get_keymap_by_name (value); + if (kmap) + { + rl_set_keymap (kmap); + return 0; + } + return 1; +} + +static int +sv_seqtimeout (const char *value) +{ + int nval; + + nval = 0; + if (value && *value) + { + nval = atoi (value); + if (nval < 0) + nval = 0; + } + _rl_keyseq_timeout = nval; + return 0; +} + +static int +sv_bell_style (const char *value) +{ + if (value == 0 || *value == '\0') + _rl_bell_preference = AUDIBLE_BELL; + else if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0) + _rl_bell_preference = NO_BELL; + else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0) + _rl_bell_preference = AUDIBLE_BELL; + else if (_rl_stricmp (value, "visible") == 0) + _rl_bell_preference = VISIBLE_BELL; + else + return 1; + return 0; +} + +static int +sv_isrchterm (const char *value) +{ + int beg, end, delim; + char *v; + + if (value == 0) + return 1; + + /* Isolate the value and translate it into a character string. */ + v = savestring (value); + FREE (_rl_isearch_terminators); + if (v[0] == '"' || v[0] == '\'') + { + delim = v[0]; + for (beg = end = 1; v[end] && v[end] != delim; end++) + ; + } + else + { + for (beg = end = 0; v[end] && whitespace (v[end]) == 0; end++) + ; + } + + v[end] = '\0'; + + /* The value starts at v + beg. Translate it into a character string. */ + _rl_isearch_terminators = (char *)xmalloc (2 * strlen (v) + 1); + rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end); + _rl_isearch_terminators[end] = '\0'; + + xfree (v); + return 0; +} + +extern char *_rl_emacs_mode_str; + +static int +sv_emacs_modestr (const char *value) +{ + if (value && *value) + { + FREE (_rl_emacs_mode_str); + _rl_emacs_mode_str = (char *)xmalloc (2 * strlen (value) + 1); + rl_translate_keyseq (value, _rl_emacs_mode_str, &_rl_emacs_modestr_len); + _rl_emacs_mode_str[_rl_emacs_modestr_len] = '\0'; + return 0; + } + else if (value) + { + FREE (_rl_emacs_mode_str); + _rl_emacs_mode_str = (char *)xmalloc (1); + _rl_emacs_mode_str[_rl_emacs_modestr_len = 0] = '\0'; + return 0; + } + else if (value == 0) + { + FREE (_rl_emacs_mode_str); + _rl_emacs_mode_str = 0; /* prompt_modestr does the right thing */ + _rl_emacs_modestr_len = 0; + return 0; + } + return 1; +} + +static int +sv_viins_modestr (const char *value) +{ + if (value && *value) + { + FREE (_rl_vi_ins_mode_str); + _rl_vi_ins_mode_str = (char *)xmalloc (2 * strlen (value) + 1); + rl_translate_keyseq (value, _rl_vi_ins_mode_str, &_rl_vi_ins_modestr_len); + _rl_vi_ins_mode_str[_rl_vi_ins_modestr_len] = '\0'; + return 0; + } + else if (value) + { + FREE (_rl_vi_ins_mode_str); + _rl_vi_ins_mode_str = (char *)xmalloc (1); + _rl_vi_ins_mode_str[_rl_vi_ins_modestr_len = 0] = '\0'; + return 0; + } + else if (value == 0) + { + FREE (_rl_vi_ins_mode_str); + _rl_vi_ins_mode_str = 0; /* prompt_modestr does the right thing */ + _rl_vi_ins_modestr_len = 0; + return 0; + } + return 1; +} + +static int +sv_vicmd_modestr (const char *value) +{ + if (value && *value) + { + FREE (_rl_vi_cmd_mode_str); + _rl_vi_cmd_mode_str = (char *)xmalloc (2 * strlen (value) + 1); + rl_translate_keyseq (value, _rl_vi_cmd_mode_str, &_rl_vi_cmd_modestr_len); + _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0'; + return 0; + } + else if (value) + { + FREE (_rl_vi_cmd_mode_str); + _rl_vi_cmd_mode_str = (char *)xmalloc (1); + _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len = 0] = '\0'; + return 0; + } + else if (value == 0) + { + FREE (_rl_vi_cmd_mode_str); + _rl_vi_cmd_mode_str = 0; /* prompt_modestr does the right thing */ + _rl_vi_cmd_modestr_len = 0; + return 0; + } + return 1; +} + +/* Return the character which matches NAME. + For example, `Space' returns ' '. */ + +typedef struct { + const char * const name; + int value; +} assoc_list; + +static const assoc_list name_key_alist[] = { + { "DEL", 0x7f }, + { "ESC", '\033' }, + { "Escape", '\033' }, + { "LFD", '\n' }, + { "Newline", '\n' }, + { "RET", '\r' }, + { "Return", '\r' }, + { "Rubout", 0x7f }, + { "SPC", ' ' }, + { "Space", ' ' }, + { "Tab", 0x09 }, + { (char *)0x0, 0 } +}; + +static int +glean_key_from_name (char *name) +{ + register int i; + + for (i = 0; name_key_alist[i].name; i++) + if (_rl_stricmp (name, name_key_alist[i].name) == 0) + return (name_key_alist[i].value); + + return (*(unsigned char *)name); /* XXX was return (*name) */ +} + +/* Auxiliary functions to manage keymaps. */ +struct name_and_keymap { + char *name; + Keymap map; +}; + +static struct name_and_keymap builtin_keymap_names[] = { + { "emacs", emacs_standard_keymap }, + { "emacs-standard", emacs_standard_keymap }, + { "emacs-meta", emacs_meta_keymap }, + { "emacs-ctlx", emacs_ctlx_keymap }, +#if defined (VI_MODE) + { "vi", vi_movement_keymap }, + { "vi-move", vi_movement_keymap }, + { "vi-command", vi_movement_keymap }, + { "vi-insert", vi_insertion_keymap }, +#endif /* VI_MODE */ + { (char *)0x0, (Keymap)0x0 } +}; + +/* -1 for NULL entry */ +#define NUM_BUILTIN_KEYMAPS (sizeof (builtin_keymap_names) / sizeof (builtin_keymap_names[0]) - 1) + +static struct name_and_keymap *keymap_names = builtin_keymap_names; + +static int +_rl_get_keymap_by_name (const char *name) +{ + register int i; + + for (i = 0; keymap_names[i].name; i++) + if (_rl_stricmp (name, keymap_names[i].name) == 0) + return (i); + return -1; +} + +Keymap +rl_get_keymap_by_name (const char *name) +{ + int i; + + i = _rl_get_keymap_by_name (name); + return ((i >= 0) ? keymap_names[i].map : (Keymap) NULL); +} + +static int +_rl_get_keymap_by_map (Keymap map) +{ + register int i; + + for (i = 0; keymap_names[i].name; i++) + if (map == keymap_names[i].map) + return (i); + return -1; +} + +char * +rl_get_keymap_name (Keymap map) +{ + int i; + + i = _rl_get_keymap_by_map (map); + return ((i >= 0) ? keymap_names[i].name : (char *)NULL); +} + +int +rl_set_keymap_name (const char *name, Keymap map) +{ + int i, ni, mi; + + /* First check whether or not we're trying to rename a builtin keymap */ + mi = _rl_get_keymap_by_map (map); + if (mi >= 0 && mi < NUM_BUILTIN_KEYMAPS) + return -1; + + /* Then reject attempts to set one of the builtin names to a new map */ + ni = _rl_get_keymap_by_name (name); + if (ni >= 0 && ni < NUM_BUILTIN_KEYMAPS) + return -1; + + /* Renaming a keymap we already added */ + if (mi >= 0) /* XXX - could be >= NUM_BUILTIN_KEYMAPS */ + { + xfree (keymap_names[mi].name); + keymap_names[mi].name = savestring (name); + return mi; + } + + /* Associating new keymap with existing name */ + if (ni >= 0) + { + keymap_names[ni].map = map; + return ni; + } + + for (i = 0; keymap_names[i].name; i++) + ; + + if (keymap_names == builtin_keymap_names) + { + keymap_names = xmalloc ((i + 2) * sizeof (struct name_and_keymap)); + memcpy (keymap_names, builtin_keymap_names, i * sizeof (struct name_and_keymap)); + } + else + keymap_names = xrealloc (keymap_names, (i + 2) * sizeof (struct name_and_keymap)); + + keymap_names[i].name = savestring (name); + keymap_names[i].map = map; + + keymap_names[i+1].name = NULL; + keymap_names[i+1].map = NULL; + + return i; +} + +void +rl_set_keymap (Keymap map) +{ + if (map) + _rl_keymap = map; +} + +Keymap +rl_get_keymap (void) +{ + return (_rl_keymap); +} + +void +rl_set_keymap_from_edit_mode (void) +{ + if (rl_editing_mode == emacs_mode) + _rl_keymap = emacs_standard_keymap; +#if defined (VI_MODE) + else if (rl_editing_mode == vi_mode) + _rl_keymap = vi_insertion_keymap; +#endif /* VI_MODE */ +} + +char * +rl_get_keymap_name_from_edit_mode (void) +{ + if (rl_editing_mode == emacs_mode) + return "emacs"; +#if defined (VI_MODE) + else if (rl_editing_mode == vi_mode) + return "vi"; +#endif /* VI_MODE */ + else + return "none"; +} + +/* **************************************************************** */ +/* */ +/* Key Binding and Function Information */ +/* */ +/* **************************************************************** */ + +/* Each of the following functions produces information about the + state of keybindings and functions known to Readline. The info + is always printed to rl_outstream, and in such a way that it can + be read back in (i.e., passed to rl_parse_and_bind ()). */ + +/* Print the names of functions known to Readline. */ +void +rl_list_funmap_names (void) +{ + register int i; + const char **funmap_names; + + funmap_names = rl_funmap_names (); + + if (!funmap_names) + return; + + for (i = 0; funmap_names[i]; i++) + fprintf (rl_outstream, "%s\n", funmap_names[i]); + + xfree (funmap_names); +} + +static char * +_rl_get_keyname (int key) +{ + char *keyname; + int i, c; + + keyname = (char *)xmalloc (8); + + c = key; + /* Since this is going to be used to write out keysequence-function + pairs for possible inclusion in an inputrc file, we don't want to + do any special meta processing on KEY. */ + +#if 1 + /* XXX - Experimental */ + /* We might want to do this, but the old version of the code did not. */ + + /* If this is an escape character, we don't want to do any more processing. + Just add the special ESC key sequence and return. */ + if (c == ESC) + { + keyname[0] = '\\'; + keyname[1] = 'e'; + keyname[2] = '\0'; + return keyname; + } +#endif + + /* RUBOUT is translated directly into \C-? */ + if (key == RUBOUT) + { + keyname[0] = '\\'; + keyname[1] = 'C'; + keyname[2] = '-'; + keyname[3] = '?'; + keyname[4] = '\0'; + return keyname; + } + + i = 0; + /* Now add special prefixes needed for control characters. This can + potentially change C. */ + if (CTRL_CHAR (c)) + { + keyname[i++] = '\\'; + keyname[i++] = 'C'; + keyname[i++] = '-'; + c = _rl_to_lower (UNCTRL (c)); + } + + /* XXX experimental code. Turn the characters that are not ASCII or + ISO Latin 1 (128 - 159) into octal escape sequences (\200 - \237). + This changes C. */ + if (c >= 128 && c <= 159) + { + keyname[i++] = '\\'; + keyname[i++] = '2'; + c -= 128; + keyname[i++] = (c / 8) + '0'; + c = (c % 8) + '0'; + } + + /* Now, if the character needs to be quoted with a backslash, do that. */ + if (c == '\\' || c == '"') + keyname[i++] = '\\'; + + /* Now add the key, terminate the string, and return it. */ + keyname[i++] = (char) c; + keyname[i] = '\0'; + + return keyname; +} + +/* Return a NULL terminated array of strings which represent the key + sequences that are used to invoke FUNCTION in MAP. */ +char ** +rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) +{ + register int key; + char **result; + int result_index, result_size; + + result = (char **)NULL; + result_index = result_size = 0; + + for (key = 0; key < KEYMAP_SIZE; key++) + { + switch (map[key].type) + { + case ISMACR: + /* Macros match, if, and only if, the pointers are identical. + Thus, they are treated exactly like functions in here. */ + case ISFUNC: + /* If the function in the keymap is the one we are looking for, + then add the current KEY to the list of invoking keys. */ + if (map[key].function == function) + { + char *keyname; + + keyname = _rl_get_keyname (key); + + if (result_index + 2 > result_size) + { + result_size += 10; + result = (char **)xrealloc (result, result_size * sizeof (char *)); + } + + result[result_index++] = keyname; + result[result_index] = (char *)NULL; + } + break; + + case ISKMAP: + { + char **seqs; + register int i; + + /* Find the list of keyseqs in this map which have FUNCTION as + their target. Add the key sequences found to RESULT. */ + if (map[key].function) + seqs = + rl_invoking_keyseqs_in_map (function, FUNCTION_TO_KEYMAP (map, key)); + else + break; + + if (seqs == 0) + break; + + for (i = 0; seqs[i]; i++) + { + char *keyname = (char *)xmalloc (6 + strlen (seqs[i])); + + if (key == ESC) + { + /* If ESC is the meta prefix and we're converting chars + with the eighth bit set to ESC-prefixed sequences, then + we can use \M-. Otherwise we need to use the sequence + for ESC. */ + if (_rl_convert_meta_chars_to_ascii && map[ESC].type == ISKMAP) + sprintf (keyname, "\\M-"); + else + sprintf (keyname, "\\e"); + } + else + { + int c = key, l = 0; + if (CTRL_CHAR (c) || c == RUBOUT) + { + keyname[l++] = '\\'; + keyname[l++] = 'C'; + keyname[l++] = '-'; + c = (c == RUBOUT) ? '?' : _rl_to_lower (UNCTRL (c)); + } + + if (c == '\\' || c == '"') + keyname[l++] = '\\'; + + keyname[l++] = (char) c; + keyname[l++] = '\0'; + } + + strcat (keyname, seqs[i]); + xfree (seqs[i]); + + if (result_index + 2 > result_size) + { + result_size += 10; + result = (char **)xrealloc (result, result_size * sizeof (char *)); + } + + result[result_index++] = keyname; + result[result_index] = (char *)NULL; + } + + xfree (seqs); + } + break; + } + } + return (result); +} + +/* Return a NULL terminated array of strings which represent the key + sequences that can be used to invoke FUNCTION using the current keymap. */ +char ** +rl_invoking_keyseqs (rl_command_func_t *function) +{ + return (rl_invoking_keyseqs_in_map (function, _rl_keymap)); +} + +/* Print all of the functions and their bindings to rl_outstream. If + PRINT_READABLY is non-zero, then print the output in such a way + that it can be read back in. */ +void +rl_function_dumper (int print_readably) +{ + register int i; + const char **names; + const char *name; + + names = rl_funmap_names (); + + fprintf (rl_outstream, "\n"); + + for (i = 0; name = names[i]; i++) + { + rl_command_func_t *function; + char **invokers; + + function = rl_named_function (name); + invokers = rl_invoking_keyseqs_in_map (function, _rl_keymap); + + if (print_readably) + { + if (!invokers) + fprintf (rl_outstream, "# %s (not bound)\n", name); + else + { + register int j; + + for (j = 0; invokers[j]; j++) + { + fprintf (rl_outstream, "\"%s\": %s\n", + invokers[j], name); + xfree (invokers[j]); + } + + xfree (invokers); + } + } + else + { + if (!invokers) + fprintf (rl_outstream, "%s is not bound to any keys\n", + name); + else + { + register int j; + + fprintf (rl_outstream, "%s can be found on ", name); + + for (j = 0; invokers[j] && j < 5; j++) + { + fprintf (rl_outstream, "\"%s\"%s", invokers[j], + invokers[j + 1] ? ", " : ".\n"); + } + + if (j == 5 && invokers[j]) + fprintf (rl_outstream, "...\n"); + + for (j = 0; invokers[j]; j++) + xfree (invokers[j]); + + xfree (invokers); + } + } + } + + xfree (names); +} + +/* Print all of the current functions and their bindings to + rl_outstream. If an explicit argument is given, then print + the output in such a way that it can be read back in. */ +int +rl_dump_functions (int count, int key) +{ + if (rl_dispatching) + fprintf (rl_outstream, "\r\n"); + rl_function_dumper (rl_explicit_arg); + rl_on_new_line (); + return (0); +} + +static void +_rl_macro_dumper_internal (int print_readably, Keymap map, char *prefix) +{ + register int key; + char *keyname, *out; + int prefix_len; + + for (key = 0; key < KEYMAP_SIZE; key++) + { + switch (map[key].type) + { + case ISMACR: + keyname = _rl_get_keyname (key); + out = _rl_untranslate_macro_value ((char *)map[key].function, 0); + + if (print_readably) + fprintf (rl_outstream, "\"%s%s\": \"%s\"\n", prefix ? prefix : "", + keyname, + out ? out : ""); + else + fprintf (rl_outstream, "%s%s outputs %s\n", prefix ? prefix : "", + keyname, + out ? out : ""); + xfree (keyname); + xfree (out); + break; + case ISFUNC: + break; + case ISKMAP: + prefix_len = prefix ? strlen (prefix) : 0; + if (key == ESC) + { + keyname = (char *)xmalloc (3 + prefix_len); + if (prefix) + strcpy (keyname, prefix); + keyname[prefix_len] = '\\'; + keyname[prefix_len + 1] = 'e'; + keyname[prefix_len + 2] = '\0'; + } + else + { + keyname = _rl_get_keyname (key); + if (prefix) + { + out = (char *)xmalloc (strlen (keyname) + prefix_len + 1); + strcpy (out, prefix); + strcpy (out + prefix_len, keyname); + xfree (keyname); + keyname = out; + } + } + + _rl_macro_dumper_internal (print_readably, FUNCTION_TO_KEYMAP (map, key), keyname); + xfree (keyname); + break; + } + } +} + +void +rl_macro_dumper (int print_readably) +{ + _rl_macro_dumper_internal (print_readably, _rl_keymap, (char *)NULL); +} + +int +rl_dump_macros (int count, int key) +{ + if (rl_dispatching) + fprintf (rl_outstream, "\r\n"); + rl_macro_dumper (rl_explicit_arg); + rl_on_new_line (); + return (0); +} + +static char * +_rl_get_string_variable_value (const char *name) +{ + static char numbuf[32]; + char *ret; + + if (_rl_stricmp (name, "bell-style") == 0) + { + switch (_rl_bell_preference) + { + case NO_BELL: + return "none"; + case VISIBLE_BELL: + return "visible"; + case AUDIBLE_BELL: + default: + return "audible"; + } + } + else if (_rl_stricmp (name, "comment-begin") == 0) + return (_rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); + else if (_rl_stricmp (name, "completion-display-width") == 0) + { + sprintf (numbuf, "%d", _rl_completion_columns); + return (numbuf); + } + else if (_rl_stricmp (name, "completion-prefix-display-length") == 0) + { + sprintf (numbuf, "%d", _rl_completion_prefix_display_length); + return (numbuf); + } + else if (_rl_stricmp (name, "completion-query-items") == 0) + { + sprintf (numbuf, "%d", rl_completion_query_items); + return (numbuf); + } + else if (_rl_stricmp (name, "editing-mode") == 0) + return (rl_get_keymap_name_from_edit_mode ()); + else if (_rl_stricmp (name, "history-size") == 0) + { + sprintf (numbuf, "%d", history_is_stifled() ? history_max_entries : 0); + return (numbuf); + } + else if (_rl_stricmp (name, "isearch-terminators") == 0) + { + if (_rl_isearch_terminators == 0) + return 0; + ret = _rl_untranslate_macro_value (_rl_isearch_terminators, 0); + if (ret) + { + strncpy (numbuf, ret, sizeof (numbuf) - 1); + xfree (ret); + numbuf[sizeof(numbuf) - 1] = '\0'; + } + else + numbuf[0] = '\0'; + return numbuf; + } + else if (_rl_stricmp (name, "keymap") == 0) + { + ret = rl_get_keymap_name (_rl_keymap); + if (ret == 0) + ret = rl_get_keymap_name_from_edit_mode (); + return (ret ? ret : "none"); + } + else if (_rl_stricmp (name, "keyseq-timeout") == 0) + { + sprintf (numbuf, "%d", _rl_keyseq_timeout); + return (numbuf); + } + else if (_rl_stricmp (name, "emacs-mode-string") == 0) + return (_rl_emacs_mode_str ? _rl_emacs_mode_str : RL_EMACS_MODESTR_DEFAULT); + else if (_rl_stricmp (name, "vi-cmd-mode-string") == 0) + return (_rl_vi_cmd_mode_str ? _rl_vi_cmd_mode_str : RL_VI_CMD_MODESTR_DEFAULT); + else if (_rl_stricmp (name, "vi-ins-mode-string") == 0) + return (_rl_vi_ins_mode_str ? _rl_vi_ins_mode_str : RL_VI_INS_MODESTR_DEFAULT); + else + return (0); +} + +void +rl_variable_dumper (int print_readably) +{ + int i; + char *v; + + for (i = 0; boolean_varlist[i].name; i++) + { + if (print_readably) + fprintf (rl_outstream, "set %s %s\n", boolean_varlist[i].name, + *boolean_varlist[i].value ? "on" : "off"); + else + fprintf (rl_outstream, "%s is set to `%s'\n", boolean_varlist[i].name, + *boolean_varlist[i].value ? "on" : "off"); + } + + for (i = 0; string_varlist[i].name; i++) + { + v = _rl_get_string_variable_value (string_varlist[i].name); + if (v == 0) /* _rl_isearch_terminators can be NULL */ + continue; + if (print_readably) + fprintf (rl_outstream, "set %s %s\n", string_varlist[i].name, v); + else + fprintf (rl_outstream, "%s is set to `%s'\n", string_varlist[i].name, v); + } +} + +/* Print all of the current variables and their values to + rl_outstream. If an explicit argument is given, then print + the output in such a way that it can be read back in. */ +int +rl_dump_variables (int count, int key) +{ + if (rl_dispatching) + fprintf (rl_outstream, "\r\n"); + rl_variable_dumper (rl_explicit_arg); + rl_on_new_line (); + return (0); +} + +/* Return non-zero if any members of ARRAY are a substring in STRING. */ +static int +substring_member_of_array (const char *string, const char * const *array) +{ + while (*array) + { + if (_rl_strindex (string, *array)) + return (1); + array++; + } + return (0); +} diff --git a/bash-5.1/lib/readline/callback.c b/bash-5.1/lib/readline/callback.c new file mode 100644 index 0000000000000000000000000000000000000000..a466cf9b6ef1a5712a00f8837e86c23c55165e34 --- /dev/null +++ b/bash-5.1/lib/readline/callback.c @@ -0,0 +1,360 @@ +/* callback.c -- functions to use readline as an X `callback' mechanism. */ + +/* Copyright (C) 1987-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include "rlconf.h" + +#if defined (READLINE_CALLBACKS) + +#include + +#ifdef HAVE_STDLIB_H +# include +#else +# include "ansi_stdlib.h" +#endif + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "readline.h" +#include "rlprivate.h" +#include "xmalloc.h" + +/* Private data for callback registration functions. See comments in + rl_callback_read_char for more details. */ +_rl_callback_func_t *_rl_callback_func = 0; +_rl_callback_generic_arg *_rl_callback_data = 0; + +/* Applications can set this to non-zero to have readline's signal handlers + installed during the entire duration of reading a complete line, as in + readline-6.2. This should be used with care, because it can result in + readline receiving signals and not handling them until it's called again + via rl_callback_read_char, thereby stealing them from the application. + By default, signal handlers are only active while readline is active. */ +int rl_persistent_signal_handlers = 0; + +/* **************************************************************** */ +/* */ +/* Callback Readline Functions */ +/* */ +/* **************************************************************** */ + +/* Allow using readline in situations where a program may have multiple + things to handle at once, and dispatches them via select(). Call + rl_callback_handler_install() with the prompt and a function to call + whenever a complete line of input is ready. The user must then + call rl_callback_read_char() every time some input is available, and + rl_callback_read_char() will call the user's function with the complete + text read in at each end of line. The terminal is kept prepped + all the time, except during calls to the user's function. Signal + handlers are only installed when the application calls back into + readline, so readline doesn't `steal' signals from the application. */ + +rl_vcpfunc_t *rl_linefunc; /* user callback function */ +static int in_handler; /* terminal_prepped and signals set? */ + +/* Make sure the terminal is set up, initialize readline, and prompt. */ +static void +_rl_callback_newline (void) +{ + rl_initialize (); + + if (in_handler == 0) + { + in_handler = 1; + + if (rl_prep_term_function) + (*rl_prep_term_function) (_rl_meta_flag); + +#if defined (HANDLE_SIGNALS) + if (rl_persistent_signal_handlers) + rl_set_signals (); +#endif + } + + readline_internal_setup (); + RL_CHECK_SIGNALS (); +} + +/* Install a readline handler, set up the terminal, and issue the prompt. */ +void +rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *linefunc) +{ + rl_set_prompt (prompt); + RL_SETSTATE (RL_STATE_CALLBACK); + rl_linefunc = linefunc; + _rl_callback_newline (); +} + +#if defined (HANDLE_SIGNALS) +#define CALLBACK_READ_RETURN() \ + do { \ + if (rl_persistent_signal_handlers == 0) \ + rl_clear_signals (); \ + return; \ + } while (0) +#else +#define CALLBACK_READ_RETURN() return +#endif + +/* Read one character, and dispatch to the handler if it ends the line. */ +void +rl_callback_read_char (void) +{ + char *line; + int eof, jcode; + static procenv_t olevel; + + if (rl_linefunc == NULL) + { + _rl_errmsg ("readline_callback_read_char() called with no handler!"); + abort (); + } + + memcpy ((void *)olevel, (void *)_rl_top_level, sizeof (procenv_t)); +#if defined (HAVE_POSIX_SIGSETJMP) + jcode = sigsetjmp (_rl_top_level, 0); +#else + jcode = setjmp (_rl_top_level); +#endif + if (jcode) + { + (*rl_redisplay_function) (); + _rl_want_redisplay = 0; + memcpy ((void *)_rl_top_level, (void *)olevel, sizeof (procenv_t)); + CALLBACK_READ_RETURN (); + } + +#if defined (HANDLE_SIGNALS) + /* Install signal handlers only when readline has control. */ + if (rl_persistent_signal_handlers == 0) + rl_set_signals (); +#endif + + do + { + RL_CHECK_SIGNALS (); + if (RL_ISSTATE (RL_STATE_ISEARCH)) + { + eof = _rl_isearch_callback (_rl_iscxt); + if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) + rl_callback_read_char (); + + CALLBACK_READ_RETURN (); + } + else if (RL_ISSTATE (RL_STATE_NSEARCH)) + { + eof = _rl_nsearch_callback (_rl_nscxt); + + CALLBACK_READ_RETURN (); + } +#if defined (VI_MODE) + /* States that can occur while in state VIMOTION have to be checked + before RL_STATE_VIMOTION */ + else if (RL_ISSTATE (RL_STATE_CHARSEARCH)) + { + int k; + + k = _rl_callback_data->i2; + + eof = (*_rl_callback_func) (_rl_callback_data); + /* If the function `deregisters' itself, make sure the data is + cleaned up. */ + if (_rl_callback_func == 0) /* XXX - just sanity check */ + { + if (_rl_callback_data) + { + _rl_callback_data_dispose (_rl_callback_data); + _rl_callback_data = 0; + } + } + + /* Messy case where vi motion command can be char search */ + if (RL_ISSTATE (RL_STATE_VIMOTION)) + { + _rl_vi_domove_motion_cleanup (k, _rl_vimvcxt); + _rl_internal_char_cleanup (); + CALLBACK_READ_RETURN (); + } + + _rl_internal_char_cleanup (); + } + else if (RL_ISSTATE (RL_STATE_VIMOTION)) + { + eof = _rl_vi_domove_callback (_rl_vimvcxt); + /* Should handle everything, including cleanup, numeric arguments, + and turning off RL_STATE_VIMOTION */ + if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) + _rl_internal_char_cleanup (); + + CALLBACK_READ_RETURN (); + } +#endif + else if (RL_ISSTATE (RL_STATE_NUMERICARG)) + { + eof = _rl_arg_callback (_rl_argcxt); + if (eof == 0 && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) + rl_callback_read_char (); + /* XXX - this should handle _rl_last_command_was_kill better */ + else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) + _rl_internal_char_cleanup (); + + CALLBACK_READ_RETURN (); + } + else if (RL_ISSTATE (RL_STATE_MULTIKEY)) + { + eof = _rl_dispatch_callback (_rl_kscxt); /* For now */ + while ((eof == -1 || eof == -2) && RL_ISSTATE (RL_STATE_MULTIKEY) && _rl_kscxt && (_rl_kscxt->flags & KSEQ_DISPATCHED)) + eof = _rl_dispatch_callback (_rl_kscxt); + if (RL_ISSTATE (RL_STATE_MULTIKEY) == 0) + { + _rl_internal_char_cleanup (); + _rl_want_redisplay = 1; + } + } + else if (_rl_callback_func) + { + /* This allows functions that simply need to read an additional + character (like quoted-insert) to register a function to be + called when input is available. _rl_callback_data is a + pointer to a struct that has the argument count originally + passed to the registering function and space for any additional + parameters. */ + eof = (*_rl_callback_func) (_rl_callback_data); + /* If the function `deregisters' itself, make sure the data is + cleaned up. */ + if (_rl_callback_func == 0) + { + if (_rl_callback_data) + { + _rl_callback_data_dispose (_rl_callback_data); + _rl_callback_data = 0; + } + _rl_internal_char_cleanup (); + } + } + else + eof = readline_internal_char (); + + RL_CHECK_SIGNALS (); + if (rl_done == 0 && _rl_want_redisplay) + { + (*rl_redisplay_function) (); + _rl_want_redisplay = 0; + } + + if (rl_done) + { + line = readline_internal_teardown (eof); + + if (rl_deprep_term_function) + (*rl_deprep_term_function) (); +#if defined (HANDLE_SIGNALS) + rl_clear_signals (); +#endif + in_handler = 0; + (*rl_linefunc) (line); + + /* If the user did not clear out the line, do it for him. */ + if (rl_line_buffer[0]) + _rl_init_line_state (); + + /* Redisplay the prompt if readline_handler_{install,remove} + not called. */ + if (in_handler == 0 && rl_linefunc) + _rl_callback_newline (); + } + } + while (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT)); + + CALLBACK_READ_RETURN (); +} + +/* Remove the handler, and make sure the terminal is in its normal state. */ +void +rl_callback_handler_remove (void) +{ + rl_linefunc = NULL; + RL_UNSETSTATE (RL_STATE_CALLBACK); + RL_CHECK_SIGNALS (); + if (in_handler) + { + in_handler = 0; + if (rl_deprep_term_function) + (*rl_deprep_term_function) (); +#if defined (HANDLE_SIGNALS) + rl_clear_signals (); +#endif + } +} + +_rl_callback_generic_arg * +_rl_callback_data_alloc (int count) +{ + _rl_callback_generic_arg *arg; + + arg = (_rl_callback_generic_arg *)xmalloc (sizeof (_rl_callback_generic_arg)); + arg->count = count; + + arg->i1 = arg->i2 = 0; + + return arg; +} + +void +_rl_callback_data_dispose (_rl_callback_generic_arg *arg) +{ + xfree (arg); +} + +/* Make sure that this agrees with cases in rl_callback_read_char */ +void +rl_callback_sigcleanup (void) +{ + if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) + return; + + if (RL_ISSTATE (RL_STATE_ISEARCH)) + _rl_isearch_cleanup (_rl_iscxt, 0); + else if (RL_ISSTATE (RL_STATE_NSEARCH)) + _rl_nsearch_cleanup (_rl_nscxt, 0); + else if (RL_ISSTATE (RL_STATE_VIMOTION)) + RL_UNSETSTATE (RL_STATE_VIMOTION); + else if (RL_ISSTATE (RL_STATE_NUMERICARG)) + { + _rl_argcxt = 0; + RL_UNSETSTATE (RL_STATE_NUMERICARG); + } + else if (RL_ISSTATE (RL_STATE_MULTIKEY)) + RL_UNSETSTATE (RL_STATE_MULTIKEY); + if (RL_ISSTATE (RL_STATE_CHARSEARCH)) + RL_UNSETSTATE (RL_STATE_CHARSEARCH); + + _rl_callback_func = 0; +} +#endif diff --git a/bash-5.1/lib/readline/chardefs.h b/bash-5.1/lib/readline/chardefs.h new file mode 100644 index 0000000000000000000000000000000000000000..3cf1326aab7515d572d405ad3330a4757735331c --- /dev/null +++ b/bash-5.1/lib/readline/chardefs.h @@ -0,0 +1,164 @@ +/* chardefs.h -- Character definitions for readline. */ + +/* Copyright (C) 1994-2015 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#ifndef _CHARDEFS_H_ +#define _CHARDEFS_H_ + +#include + +#if defined (HAVE_CONFIG_H) +# if defined (HAVE_STRING_H) +# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) +# include +# endif +# include +# endif /* HAVE_STRING_H */ +# if defined (HAVE_STRINGS_H) +# include +# endif /* HAVE_STRINGS_H */ +#else +# include +#endif /* !HAVE_CONFIG_H */ + +#ifndef whitespace +#define whitespace(c) (((c) == ' ') || ((c) == '\t')) +#endif + +#ifdef CTRL +# undef CTRL +#endif +#ifdef UNCTRL +# undef UNCTRL +#endif + +/* Some character stuff. */ +#define control_character_threshold 0x020 /* Smaller than this is control. */ +#define control_character_mask 0x1f /* 0x20 - 1 */ +#define meta_character_threshold 0x07f /* Larger than this is Meta. */ +#define control_character_bit 0x40 /* 0x000000, must be off. */ +#define meta_character_bit 0x080 /* x0000000, must be on. */ +#define largest_char 255 /* Largest character value. */ + +#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0)) +#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char) + +#define CTRL(c) ((c) & control_character_mask) +#define META(c) ((c) | meta_character_bit) + +#define UNMETA(c) ((c) & (~meta_character_bit)) +#define UNCTRL(c) _rl_to_upper(((c)|control_character_bit)) + +#if defined STDC_HEADERS || (!defined (isascii) && !defined (HAVE_ISASCII)) +# define IN_CTYPE_DOMAIN(c) 1 +#else +# define IN_CTYPE_DOMAIN(c) isascii(c) +#endif + +#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus) +# define isxdigit(c) (isdigit((unsigned char)(c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) +#endif + +#if defined (CTYPE_NON_ASCII) +# define NON_NEGATIVE(c) 1 +#else +# define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) +#endif + +/* Some systems define these; we want our definitions. */ +#undef ISPRINT + +/* Beware: these only work with single-byte ASCII characters. */ + +#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum ((unsigned char)c)) +#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha ((unsigned char)c)) +#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit ((unsigned char)c)) +#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower ((unsigned char)c)) +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c)) +#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper ((unsigned char)c)) +#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit ((unsigned char)c)) + +#define _rl_lowercase_p(c) (NON_NEGATIVE(c) && ISLOWER(c)) +#define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c)) +#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') + +#define _rl_pure_alphabetic(c) (NON_NEGATIVE(c) && ISALPHA(c)) +#define ALPHABETIC(c) (NON_NEGATIVE(c) && ISALNUM(c)) + +#ifndef _rl_to_upper +# define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : (c)) +# define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : (c)) +#endif + +#ifndef _rl_digit_value +# define _rl_digit_value(x) ((x) - '0') +#endif + +#ifndef _rl_isident +# define _rl_isident(c) (ISALNUM(c) || (c) == '_') +#endif + +#ifndef ISOCTAL +# define ISOCTAL(c) ((c) >= '0' && (c) <= '7') +#endif +#define OCTVALUE(c) ((c) - '0') + +#define HEXVALUE(c) \ + (((c) >= 'a' && (c) <= 'f') \ + ? (c)-'a'+10 \ + : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') + +#ifndef NEWLINE +#define NEWLINE '\n' +#endif + +#ifndef RETURN +#define RETURN CTRL('M') +#endif + +#ifndef RUBOUT +#define RUBOUT 0x7f +#endif + +#ifndef TAB +#define TAB '\t' +#endif + +#ifdef ABORT_CHAR +#undef ABORT_CHAR +#endif +#define ABORT_CHAR CTRL('G') + +#ifdef PAGE +#undef PAGE +#endif +#define PAGE CTRL('L') + +#ifdef SPACE +#undef SPACE +#endif +#define SPACE ' ' /* XXX - was 0x20 */ + +#ifdef ESC +#undef ESC +#endif +#define ESC CTRL('[') + +#endif /* _CHARDEFS_H_ */ diff --git a/bash-5.1/lib/readline/colors.c b/bash-5.1/lib/readline/colors.c new file mode 100644 index 0000000000000000000000000000000000000000..9e37527ef3509ce4ae33094fd26d67831c9551ce --- /dev/null +++ b/bash-5.1/lib/readline/colors.c @@ -0,0 +1,301 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015, 2017, 2019 + Free Software Foundation, Inc. + + 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 . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include "rlconf.h" + +#if defined __TANDEM +# define _XOPEN_SOURCE_EXTENDED 1 +# define _TANDEM_SOURCE 1 +# include +# include +#endif + +#include + +#include "posixstat.h" // stat related macros (S_ISREG, ...) +#include // S_ISUID + +#ifndef S_ISDIR +# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + +// strlen() +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +// abort() +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "readline.h" +#include "rldefs.h" + +#ifdef COLOR_SUPPORT + +#include "xmalloc.h" +#include "colors.h" + +static bool is_colored (enum indicator_no type); +static void restore_default_color (void); + +COLOR_EXT_TYPE *_rl_color_ext_list = 0; + +/* Output a color indicator (which may contain nulls). */ +void +_rl_put_indicator (const struct bin_str *ind) +{ + fwrite (ind->string, ind->len, 1, rl_outstream); +} + +static bool +is_colored (enum indicator_no colored_filetype) +{ + size_t len = _rl_color_indicator[colored_filetype].len; + char const *s = _rl_color_indicator[colored_filetype].string; + return ! (len == 0 + || (len == 1 && strncmp (s, "0", 1) == 0) + || (len == 2 && strncmp (s, "00", 2) == 0)); +} + +static void +restore_default_color (void) +{ + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); +} + +void +_rl_set_normal_color (void) +{ + if (is_colored (C_NORM)) + { + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (&_rl_color_indicator[C_NORM]); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); + } +} + +bool +_rl_print_prefix_color (void) +{ + struct bin_str *s; + + /* What do we want to use for the prefix? Let's try cyan first, see colors.h */ + s = &_rl_color_indicator[C_PREFIX]; + if (s->string != NULL) + { + if (is_colored (C_NORM)) + restore_default_color (); + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (s); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); + return 0; + } + else + return 1; +} + +/* Returns whether any color sequence was printed. */ +bool +_rl_print_color_indicator (const char *f) +{ + enum indicator_no colored_filetype; + COLOR_EXT_TYPE *ext; /* Color extension */ + size_t len; /* Length of name */ + + const char* name; + char *filename; + struct stat astat, linkstat; + mode_t mode; + int linkok; /* 1 == ok, 0 == dangling symlink, -1 == missing */ + int stat_ok; + + name = f; + + /* This should already have undergone tilde expansion */ + filename = 0; + if (rl_filename_stat_hook) + { + filename = savestring (f); + (*rl_filename_stat_hook) (&filename); + name = filename; + } + +#if defined (HAVE_LSTAT) + stat_ok = lstat(name, &astat); +#else + stat_ok = stat(name, &astat); +#endif + if (stat_ok == 0) + { + mode = astat.st_mode; +#if defined (HAVE_LSTAT) + if (S_ISLNK (mode)) + { + linkok = stat (name, &linkstat) == 0; + if (linkok && strncmp (_rl_color_indicator[C_LINK].string, "target", 6) == 0) + mode = linkstat.st_mode; + } + else +#endif + linkok = 1; + } + else + linkok = -1; + + /* Is this a nonexistent file? If so, linkok == -1. */ + + if (linkok == -1 && _rl_color_indicator[C_MISSING].string != NULL) + colored_filetype = C_MISSING; + else if (linkok == 0 && _rl_color_indicator[C_ORPHAN].string != NULL) + colored_filetype = C_ORPHAN; /* dangling symlink */ + else if(stat_ok != 0) + { + static enum indicator_no filetype_indicator[] = FILETYPE_INDICATORS; + colored_filetype = filetype_indicator[normal]; //f->filetype]; + } + else + { + if (S_ISREG (mode)) + { + colored_filetype = C_FILE; + +#if defined (S_ISUID) + if ((mode & S_ISUID) != 0 && is_colored (C_SETUID)) + colored_filetype = C_SETUID; + else +#endif +#if defined (S_ISGID) + if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) + colored_filetype = C_SETGID; + else +#endif + if (is_colored (C_CAP) && 0) //f->has_capability) + colored_filetype = C_CAP; + else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC)) + colored_filetype = C_EXEC; + else if ((1 < astat.st_nlink) && is_colored (C_MULTIHARDLINK)) + colored_filetype = C_MULTIHARDLINK; + } + else if (S_ISDIR (mode)) + { + colored_filetype = C_DIR; + +#if defined (S_ISVTX) + if ((mode & S_ISVTX) && (mode & S_IWOTH) + && is_colored (C_STICKY_OTHER_WRITABLE)) + colored_filetype = C_STICKY_OTHER_WRITABLE; + else +#endif + if ((mode & S_IWOTH) != 0 && is_colored (C_OTHER_WRITABLE)) + colored_filetype = C_OTHER_WRITABLE; +#if defined (S_ISVTX) + else if ((mode & S_ISVTX) != 0 && is_colored (C_STICKY)) + colored_filetype = C_STICKY; +#endif + } +#if defined (S_ISLNK) + else if (S_ISLNK (mode)) + colored_filetype = C_LINK; +#endif + else if (S_ISFIFO (mode)) + colored_filetype = C_FIFO; +#if defined (S_ISSOCK) + else if (S_ISSOCK (mode)) + colored_filetype = C_SOCK; +#endif + else if (S_ISBLK (mode)) + colored_filetype = C_BLK; + else if (S_ISCHR (mode)) + colored_filetype = C_CHR; + else + { + /* Classify a file of some other type as C_ORPHAN. */ + colored_filetype = C_ORPHAN; + } + } + + /* Check the file's suffix only if still classified as C_FILE. */ + ext = NULL; + if (colored_filetype == C_FILE) + { + /* Test if NAME has a recognized suffix. */ + len = strlen (name); + name += len; /* Pointer to final \0. */ + for (ext = _rl_color_ext_list; ext != NULL; ext = ext->next) + { + if (ext->ext.len <= len + && strncmp (name - ext->ext.len, ext->ext.string, + ext->ext.len) == 0) + break; + } + } + + free (filename); /* NULL or savestring return value */ + + { + const struct bin_str *const s + = ext ? &(ext->seq) : &_rl_color_indicator[colored_filetype]; + if (s->string != NULL) + { + /* Need to reset so not dealing with attribute combinations */ + if (is_colored (C_NORM)) + restore_default_color (); + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (s); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); + return 0; + } + else + return 1; + } +} + +void +_rl_prep_non_filename_text (void) +{ + if (_rl_color_indicator[C_END].string != NULL) + _rl_put_indicator (&_rl_color_indicator[C_END]); + else + { + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (&_rl_color_indicator[C_RESET]); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); + } +} +#endif /* COLOR_SUPPORT */ diff --git a/bash-5.1/lib/readline/colors.h b/bash-5.1/lib/readline/colors.h new file mode 100644 index 0000000000000000000000000000000000000000..6561ad90c1cf7c017bb1bdde130b655fe69e6110 --- /dev/null +++ b/bash-5.1/lib/readline/colors.h @@ -0,0 +1,126 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015 + Free Software Foundation, Inc. + + 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 . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#ifndef _COLORS_H_ +#define _COLORS_H_ + +#include // size_t + +#if defined(__TANDEM) && defined(HAVE_STDBOOL_H) && (__STDC_VERSION__ < 199901L) +typedef int _Bool; +#endif + +#if defined (HAVE_STDBOOL_H) +# include // bool +#else +typedef int _rl_bool_t; + +#ifdef bool +# undef bool +#endif +#define bool _rl_bool_t + +#ifndef true +# define true 1 +# define false 0 +#endif + +#endif /* !HAVE_STDBOOL_H */ + +/* Null is a valid character in a color indicator (think about Epson + printers, for example) so we have to use a length/buffer string + type. */ +struct bin_str + { + size_t len; + const char *string; + }; + +/* file type indicators (dir, sock, fifo, ...) + Default value is initialized in parse-colors.c. + It is then modified from the values of $LS_COLORS. */ +extern struct bin_str _rl_color_indicator[]; + +/* The LS_COLORS variable is in a termcap-like format. */ +typedef struct _color_ext_type + { + struct bin_str ext; /* The extension we're looking for */ + struct bin_str seq; /* The sequence to output when we do */ + struct _color_ext_type *next; /* Next in list */ + } COLOR_EXT_TYPE; + +/* file extensions indicators (.txt, .log, .jpg, ...) + Values are taken from $LS_COLORS in rl_parse_colors(). */ +extern COLOR_EXT_TYPE *_rl_color_ext_list; + +#define FILETYPE_INDICATORS \ + { \ + C_ORPHAN, C_FIFO, C_CHR, C_DIR, C_BLK, C_FILE, \ + C_LINK, C_SOCK, C_FILE, C_DIR \ + } + +/* Whether we used any colors in the output so far. If so, we will + need to restore the default color later. If not, we will need to + call prep_non_filename_text before using color for the first time. */ + +enum indicator_no + { + C_LEFT, C_RIGHT, C_END, C_RESET, C_NORM, C_FILE, C_DIR, C_LINK, + C_FIFO, C_SOCK, + C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC, C_DOOR, C_SETUID, C_SETGID, + C_STICKY, C_OTHER_WRITABLE, C_STICKY_OTHER_WRITABLE, C_CAP, C_MULTIHARDLINK, + C_CLR_TO_EOL + }; + + +#if !S_IXUGO +# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) +#endif + +enum filetype + { + unknown, + fifo, + chardev, + directory, + blockdev, + normal, + symbolic_link, + sock, + whiteout, + arg_directory + }; + +/* Prefix color, currently same as socket */ +#define C_PREFIX C_SOCK + +extern void _rl_put_indicator (const struct bin_str *ind); +extern void _rl_set_normal_color (void); +extern bool _rl_print_prefix_color (void); +extern bool _rl_print_color_indicator (const char *f); +extern void _rl_prep_non_filename_text (void); + +#endif /* !_COLORS_H_ */ diff --git a/bash-5.1/lib/readline/compat.c b/bash-5.1/lib/readline/compat.c new file mode 100644 index 0000000000000000000000000000000000000000..3ade3629aef440a4d8bec22cc1419e49704c4eef --- /dev/null +++ b/bash-5.1/lib/readline/compat.c @@ -0,0 +1,106 @@ +/* compat.c -- backwards compatibility functions. */ + +/* Copyright (C) 2000-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#include "rlstdc.h" +#include "rltypedefs.h" + +extern void rl_free_undo_list PARAMS((void)); +extern int rl_maybe_save_line PARAMS((void)); +extern int rl_maybe_unsave_line PARAMS((void)); +extern int rl_maybe_replace_line PARAMS((void)); + +extern int rl_crlf PARAMS((void)); +extern int rl_ding PARAMS((void)); +extern int rl_alphabetic PARAMS((int)); + +extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); +extern char *rl_username_completion_function PARAMS((const char *, int)); +extern char *rl_filename_completion_function PARAMS((const char *, int)); + +/* Provide backwards-compatible entry points for old function names. */ + +void +free_undo_list (void) +{ + rl_free_undo_list (); +} + +int +maybe_replace_line (void) +{ + return rl_maybe_replace_line (); +} + +int +maybe_save_line (void) +{ + return rl_maybe_save_line (); +} + +int +maybe_unsave_line (void) +{ + return rl_maybe_unsave_line (); +} + +int +ding (void) +{ + return rl_ding (); +} + +int +crlf (void) +{ + return rl_crlf (); +} + +int +alphabetic (int c) +{ + return rl_alphabetic (c); +} + +char ** +completion_matches (const char *s, rl_compentry_func_t *f) +{ + return rl_completion_matches (s, f); +} + +char * +username_completion_function (const char *s, int i) +{ + return rl_username_completion_function (s, i); +} + +char * +filename_completion_function (const char *s, int i) +{ + return rl_filename_completion_function (s, i); +} diff --git a/bash-5.1/lib/readline/complete.c b/bash-5.1/lib/readline/complete.c new file mode 100644 index 0000000000000000000000000000000000000000..fc5c3adb3564d6408214f74a0a3e64a0f0437cd4 --- /dev/null +++ b/bash-5.1/lib/readline/complete.c @@ -0,0 +1,2990 @@ +/* complete.c -- filename completion for readline. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (__TANDEM) +# define _XOPEN_SOURCE_EXTENDED 1 +#endif + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#if defined (__TANDEM) +# include +#endif +#include +#if defined (HAVE_SYS_FILE_H) +# include +#endif + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include + +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if defined (HAVE_PWD_H) +#include +#endif + +#include "posixdir.h" +#include "posixstat.h" + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "xmalloc.h" +#include "rlprivate.h" + +#if defined (COLOR_SUPPORT) +# include "colors.h" +#endif + +#ifdef __STDC__ +typedef int QSFUNC (const void *, const void *); +#else +typedef int QSFUNC (); +#endif + +#ifdef HAVE_LSTAT +# define LSTAT lstat +#else +# define LSTAT stat +#endif + +/* Unix version of a hidden file. Could be different on other systems. */ +#define HIDDEN_FILE(fname) ((fname)[0] == '.') + +/* Most systems don't declare getpwent in if _POSIX_SOURCE is + defined. */ +#if defined (HAVE_GETPWENT) && (!defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE)) +extern struct passwd *getpwent PARAMS((void)); +#endif /* HAVE_GETPWENT && (!HAVE_GETPW_DECLS || _POSIX_SOURCE) */ + +/* If non-zero, then this is the address of a function to call when + completing a word would normally display the list of possible matches. + This function is called instead of actually doing the display. + It takes three arguments: (char **matches, int num_matches, int max_length) + where MATCHES is the array of strings that matched, NUM_MATCHES is the + number of strings in that array, and MAX_LENGTH is the length of the + longest string in that array. */ +rl_compdisp_func_t *rl_completion_display_matches_hook = (rl_compdisp_func_t *)NULL; + +#if defined (VISIBLE_STATS) || defined (COLOR_SUPPORT) +# if !defined (X_OK) +# define X_OK 1 +# endif +#endif + +#if defined (VISIBLE_STATS) +static int stat_char PARAMS((char *)); +#endif + +#if defined (COLOR_SUPPORT) +static int colored_stat_start PARAMS((const char *)); +static void colored_stat_end PARAMS((void)); +static int colored_prefix_start PARAMS((void)); +static void colored_prefix_end PARAMS((void)); +#endif + +static int path_isdir PARAMS((const char *)); + +static char *rl_quote_filename PARAMS((char *, int, char *)); + +static void _rl_complete_sigcleanup PARAMS((int, void *)); + +static void set_completion_defaults PARAMS((int)); +static int get_y_or_n PARAMS((int)); +static int _rl_internal_pager PARAMS((int)); +static char *printable_part PARAMS((char *)); +static int fnwidth PARAMS((const char *)); +static int fnprint PARAMS((const char *, int, const char *)); +static int print_filename PARAMS((char *, char *, int)); + +static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int)); + +static char **remove_duplicate_matches PARAMS((char **)); +static void insert_match PARAMS((char *, int, int, char *)); +static int append_to_match PARAMS((char *, int, int, int)); +static void insert_all_matches PARAMS((char **, int, char *)); +static int complete_fncmp PARAMS((const char *, int, const char *, int)); +static void display_matches PARAMS((char **)); +static int compute_lcd_of_matches PARAMS((char **, int, const char *)); +static int postprocess_matches PARAMS((char ***, int)); +static int compare_match PARAMS((char *, const char *)); +static int complete_get_screenwidth PARAMS((void)); + +static char *make_quoted_replacement PARAMS((char *, int, char *)); + +/* **************************************************************** */ +/* */ +/* Completion matching, from readline's point of view. */ +/* */ +/* **************************************************************** */ + +/* Variables known only to the readline library. */ + +/* If non-zero, non-unique completions always show the list of matches. */ +int _rl_complete_show_all = 0; + +/* If non-zero, non-unique completions show the list of matches, unless it + is not possible to do partial completion and modify the line. */ +int _rl_complete_show_unmodified = 0; + +/* If non-zero, completed directory names have a slash appended. */ +int _rl_complete_mark_directories = 1; + +/* If non-zero, the symlinked directory completion behavior introduced in + readline-4.2a is disabled, and symlinks that point to directories have + a slash appended (subject to the value of _rl_complete_mark_directories). + This is user-settable via the mark-symlinked-directories variable. */ +int _rl_complete_mark_symlink_dirs = 0; + +/* If non-zero, completions are printed horizontally in alphabetical order, + like `ls -x'. */ +int _rl_print_completions_horizontally; + +/* Non-zero means that case is not significant in filename completion. */ +#if (defined (__MSDOS__) && !defined (__DJGPP__)) || (defined (_WIN32) && !defined (__CYGWIN__)) +int _rl_completion_case_fold = 1; +#else +int _rl_completion_case_fold = 0; +#endif + +/* Non-zero means that `-' and `_' are equivalent when comparing filenames + for completion. */ +int _rl_completion_case_map = 0; + +/* If zero, don't match hidden files (filenames beginning with a `.' on + Unix) when doing filename completion. */ +int _rl_match_hidden_files = 1; + +/* Length in characters of a common prefix replaced with an ellipsis (`...') + when displaying completion matches. Matches whose printable portion has + more than this number of displaying characters in common will have the common + display prefix replaced with an ellipsis. */ +int _rl_completion_prefix_display_length = 0; + +/* The readline-private number of screen columns to use when displaying + matches. If < 0 or > _rl_screenwidth, it is ignored. */ +int _rl_completion_columns = -1; + +#if defined (COLOR_SUPPORT) +/* Non-zero means to use colors to indicate file type when listing possible + completions. The colors used are taken from $LS_COLORS, if set. */ +int _rl_colored_stats = 0; + +/* Non-zero means to use a color (currently magenta) to indicate the common + prefix of a set of possible word completions. */ +int _rl_colored_completion_prefix = 0; +#endif + +/* If non-zero, when completing in the middle of a word, don't insert + characters from the match that match characters following point in + the word. This means, for instance, completing when the cursor is + after the `e' in `Makefile' won't result in `Makefilefile'. */ +int _rl_skip_completed_text = 0; + +/* If non-zero, menu completion displays the common prefix first in the + cycle of possible completions instead of the last. */ +int _rl_menu_complete_prefix_first = 0; + +/* Global variables available to applications using readline. */ + +#if defined (VISIBLE_STATS) +/* Non-zero means add an additional character to each filename displayed + during listing completion iff rl_filename_completion_desired which helps + to indicate the type of file being listed. */ +int rl_visible_stats = 0; +#endif /* VISIBLE_STATS */ + +/* If non-zero, then this is the address of a function to call when + completing on a directory name. The function is called with + the address of a string (the current directory name) as an arg. */ +rl_icppfunc_t *rl_directory_completion_hook = (rl_icppfunc_t *)NULL; + +rl_icppfunc_t *rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; + +rl_icppfunc_t *rl_filename_stat_hook = (rl_icppfunc_t *)NULL; + +/* If non-zero, this is the address of a function to call when reading + directory entries from the filesystem for completion and comparing + them to the partial word to be completed. The function should + either return its first argument (if no conversion takes place) or + newly-allocated memory. This can, for instance, convert filenames + between character sets for comparison against what's typed at the + keyboard. The returned value is what is added to the list of + matches. The second argument is the length of the filename to be + converted. */ +rl_dequote_func_t *rl_filename_rewrite_hook = (rl_dequote_func_t *)NULL; + +/* Non-zero means readline completion functions perform tilde expansion. */ +int rl_complete_with_tilde_expansion = 0; + +/* Pointer to the generator function for completion_matches (). + NULL means to use rl_filename_completion_function (), the default filename + completer. */ +rl_compentry_func_t *rl_completion_entry_function = (rl_compentry_func_t *)NULL; + +/* Pointer to generator function for rl_menu_complete (). NULL means to use + *rl_completion_entry_function (see above). */ +rl_compentry_func_t *rl_menu_completion_entry_function = (rl_compentry_func_t *)NULL; + +/* Pointer to alternative function to create matches. + Function is called with TEXT, START, and END. + START and END are indices in RL_LINE_BUFFER saying what the boundaries + of TEXT are. + If this function exists and returns NULL then call the value of + rl_completion_entry_function to try to match, otherwise use the + array of strings returned. */ +rl_completion_func_t *rl_attempted_completion_function = (rl_completion_func_t *)NULL; + +/* Non-zero means to suppress normal filename completion after the + user-specified completion function has been called. */ +int rl_attempted_completion_over = 0; + +/* Set to a character indicating the type of completion being performed + by rl_complete_internal, available for use by application completion + functions. */ +int rl_completion_type = 0; + +/* Up to this many items will be displayed in response to a + possible-completions call. After that, we ask the user if + she is sure she wants to see them all. A negative value means + don't ask. */ +int rl_completion_query_items = 100; + +int _rl_page_completions = 1; + +/* The basic list of characters that signal a break between words for the + completer routine. The contents of this variable is what breaks words + in the shell, i.e. " \t\n\"\\'`@$><=" */ +const char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; /* }) */ + +/* List of basic quoting characters. */ +const char *rl_basic_quote_characters = "\"'"; + +/* The list of characters that signal a break between words for + rl_complete_internal. The default list is the contents of + rl_basic_word_break_characters. */ +/*const*/ char *rl_completer_word_break_characters = (/*const*/ char *)NULL; + +/* Hook function to allow an application to set the completion word + break characters before readline breaks up the line. Allows + position-dependent word break characters. */ +rl_cpvfunc_t *rl_completion_word_break_hook = (rl_cpvfunc_t *)NULL; + +/* List of characters which can be used to quote a substring of the line. + Completion occurs on the entire substring, and within the substring + rl_completer_word_break_characters are treated as any other character, + unless they also appear within this list. */ +const char *rl_completer_quote_characters = (const char *)NULL; + +/* List of characters that should be quoted in filenames by the completer. */ +const char *rl_filename_quote_characters = (const char *)NULL; + +/* List of characters that are word break characters, but should be left + in TEXT when it is passed to the completion function. The shell uses + this to help determine what kind of completing to do. */ +const char *rl_special_prefixes = (const char *)NULL; + +/* If non-zero, then disallow duplicates in the matches. */ +int rl_ignore_completion_duplicates = 1; + +/* Non-zero means that the results of the matches are to be treated + as filenames. This is ALWAYS zero on entry, and can only be changed + within a completion entry finder function. */ +int rl_filename_completion_desired = 0; + +/* Non-zero means that the results of the matches are to be quoted using + double quotes (or an application-specific quoting mechanism) if the + filename contains any characters in rl_filename_quote_chars. This is + ALWAYS non-zero on entry, and can only be changed within a completion + entry finder function. */ +int rl_filename_quoting_desired = 1; + +/* This function, if defined, is called by the completer when real + filename completion is done, after all the matching names have been + generated. It is passed a (char**) known as matches in the code below. + It consists of a NULL-terminated array of pointers to potential + matching strings. The 1st element (matches[0]) is the maximal + substring that is common to all matches. This function can re-arrange + the list of matches as required, but all elements of the array must be + free()'d if they are deleted. The main intent of this function is + to implement FIGNORE a la SunOS csh. */ +rl_compignore_func_t *rl_ignore_some_completions_function = (rl_compignore_func_t *)NULL; + +/* Set to a function to quote a filename in an application-specific fashion. + Called with the text to quote, the type of match found (single or multiple) + and a pointer to the quoting character to be used, which the function can + reset if desired. */ +rl_quote_func_t *rl_filename_quoting_function = rl_quote_filename; + +/* Function to call to remove quoting characters from a filename. Called + before completion is attempted, so the embedded quotes do not interfere + with matching names in the file system. Readline doesn't do anything + with this; it's set only by applications. */ +rl_dequote_func_t *rl_filename_dequoting_function = (rl_dequote_func_t *)NULL; + +/* Function to call to decide whether or not a word break character is + quoted. If a character is quoted, it does not break words for the + completer. */ +rl_linebuf_func_t *rl_char_is_quoted_p = (rl_linebuf_func_t *)NULL; + +/* If non-zero, the completion functions don't append anything except a + possible closing quote. This is set to 0 by rl_complete_internal and + may be changed by an application-specific completion function. */ +int rl_completion_suppress_append = 0; + +/* Character appended to completed words when at the end of the line. The + default is a space. */ +int rl_completion_append_character = ' '; + +/* If non-zero, the completion functions don't append any closing quote. + This is set to 0 by rl_complete_internal and may be changed by an + application-specific completion function. */ +int rl_completion_suppress_quote = 0; + +/* Set to any quote character readline thinks it finds before any application + completion function is called. */ +int rl_completion_quote_character; + +/* Set to a non-zero value if readline found quoting anywhere in the word to + be completed; set before any application completion function is called. */ +int rl_completion_found_quote; + +/* If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + mark-directories variable (which is user-settable). This exists so + that application completion functions can override the user's preference + (set via the mark-symlinked-directories variable) if appropriate. + It's set to the value of _rl_complete_mark_symlink_dirs in + rl_complete_internal before any application-specific completion + function is called, so without that function doing anything, the user's + preferences are honored. */ +int rl_completion_mark_symlink_dirs; + +/* If non-zero, inhibit completion (temporarily). */ +int rl_inhibit_completion; + +/* Set to the last key used to invoke one of the completion functions */ +int rl_completion_invoking_key; + +/* If non-zero, sort the completion matches. On by default. */ +int rl_sort_completion_matches = 1; + +/* Variables local to this file. */ + +/* Local variable states what happened during the last completion attempt. */ +static int completion_changed_buffer; +static int last_completion_failed = 0; + +/* The result of the query to the user about displaying completion matches */ +static int completion_y_or_n; + +static int _rl_complete_display_matches_interrupt = 0; + +/*************************************/ +/* */ +/* Bindable completion functions */ +/* */ +/*************************************/ + +/* Complete the word at or before point. You have supplied the function + that does the initial simple matching selection algorithm (see + rl_completion_matches ()). The default is to do filename completion. */ +int +rl_complete (int ignore, int invoking_key) +{ + rl_completion_invoking_key = invoking_key; + + if (rl_inhibit_completion) + return (_rl_insert_char (ignore, invoking_key)); +#if 0 + else if (rl_last_func == rl_complete && completion_changed_buffer == 0 && last_completion_failed == 0) +#else + else if (rl_last_func == rl_complete && completion_changed_buffer == 0) +#endif + return (rl_complete_internal ('?')); + else if (_rl_complete_show_all) + return (rl_complete_internal ('!')); + else if (_rl_complete_show_unmodified) + return (rl_complete_internal ('@')); + else + return (rl_complete_internal (TAB)); +} + +/* List the possible completions. See description of rl_complete (). */ +int +rl_possible_completions (int ignore, int invoking_key) +{ + rl_completion_invoking_key = invoking_key; + return (rl_complete_internal ('?')); +} + +int +rl_insert_completions (int ignore, int invoking_key) +{ + rl_completion_invoking_key = invoking_key; + return (rl_complete_internal ('*')); +} + +/* Return the correct value to pass to rl_complete_internal performing + the same tests as rl_complete. This allows consecutive calls to an + application's completion function to list possible completions and for + an application-specific completion function to honor the + show-all-if-ambiguous readline variable. */ +int +rl_completion_mode (rl_command_func_t *cfunc) +{ + if (rl_last_func == cfunc && !completion_changed_buffer) + return '?'; + else if (_rl_complete_show_all) + return '!'; + else if (_rl_complete_show_unmodified) + return '@'; + else + return TAB; +} + +/************************************/ +/* */ +/* Completion utility functions */ +/* */ +/************************************/ + +/* Reset public readline state on a signal or other event. */ +void +_rl_reset_completion_state (void) +{ + rl_completion_found_quote = 0; + rl_completion_quote_character = 0; +} + +static void +_rl_complete_sigcleanup (int sig, void *ptr) +{ + if (sig == SIGINT) /* XXX - for now */ + { + _rl_free_match_list ((char **)ptr); + _rl_complete_display_matches_interrupt = 1; + } +} + +/* Set default values for readline word completion. These are the variables + that application completion functions can change or inspect. */ +static void +set_completion_defaults (int what_to_do) +{ + /* Only the completion entry function can change these. */ + rl_filename_completion_desired = 0; + rl_filename_quoting_desired = 1; + rl_completion_type = what_to_do; + rl_completion_suppress_append = rl_completion_suppress_quote = 0; + rl_completion_append_character = ' '; + + /* The completion entry function may optionally change this. */ + rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs; + + /* Reset private state. */ + _rl_complete_display_matches_interrupt = 0; +} + +/* The user must press "y" or "n". Non-zero return means "y" pressed. */ +static int +get_y_or_n (int for_pager) +{ + int c; + + /* For now, disable pager in callback mode, until we later convert to state + driven functions. Have to wait until next major version to add new + state definition, since it will change value of RL_STATE_DONE. */ +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + return 1; +#endif + + for (;;) + { + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (c == 'y' || c == 'Y' || c == ' ') + return (1); + if (c == 'n' || c == 'N' || c == RUBOUT) + return (0); + if (c == ABORT_CHAR || c < 0) + _rl_abort_internal (); + if (for_pager && (c == NEWLINE || c == RETURN)) + return (2); + if (for_pager && (c == 'q' || c == 'Q')) + return (0); + rl_ding (); + } +} + +static int +_rl_internal_pager (int lines) +{ + int i; + + fprintf (rl_outstream, "--More--"); + fflush (rl_outstream); + i = get_y_or_n (1); + _rl_erase_entire_line (); + if (i == 0) + return -1; + else if (i == 2) + return (lines - 1); + else + return 0; +} + +static int +path_isdir (const char *filename) +{ + struct stat finfo; + + return (stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode)); +} + +#if defined (VISIBLE_STATS) +/* Return the character which best describes FILENAME. + `@' for symbolic links + `/' for directories + `*' for executables + `=' for sockets + `|' for FIFOs + `%' for character special devices + `#' for block special devices */ +static int +stat_char (char *filename) +{ + struct stat finfo; + int character, r; + char *f; + const char *fn; + + /* Short-circuit a //server on cygwin, since that will always behave as + a directory. */ +#if __CYGWIN__ + if (filename[0] == '/' && filename[1] == '/' && strchr (filename+2, '/') == 0) + return '/'; +#endif + + f = 0; + if (rl_filename_stat_hook) + { + f = savestring (filename); + (*rl_filename_stat_hook) (&f); + fn = f; + } + else + fn = filename; + +#if defined (HAVE_LSTAT) && defined (S_ISLNK) + r = lstat (fn, &finfo); +#else + r = stat (fn, &finfo); +#endif + + if (r == -1) + { + xfree (f); + return (0); + } + + character = 0; + if (S_ISDIR (finfo.st_mode)) + character = '/'; +#if defined (S_ISCHR) + else if (S_ISCHR (finfo.st_mode)) + character = '%'; +#endif /* S_ISCHR */ +#if defined (S_ISBLK) + else if (S_ISBLK (finfo.st_mode)) + character = '#'; +#endif /* S_ISBLK */ +#if defined (S_ISLNK) + else if (S_ISLNK (finfo.st_mode)) + character = '@'; +#endif /* S_ISLNK */ +#if defined (S_ISSOCK) + else if (S_ISSOCK (finfo.st_mode)) + character = '='; +#endif /* S_ISSOCK */ +#if defined (S_ISFIFO) + else if (S_ISFIFO (finfo.st_mode)) + character = '|'; +#endif + else if (S_ISREG (finfo.st_mode)) + { +#if defined (_WIN32) && !defined (__CYGWIN__) + char *ext; + + /* Windows doesn't do access and X_OK; check file extension instead */ + ext = strrchr (fn, '.'); + if (ext && (_rl_stricmp (ext, ".exe") == 0 || + _rl_stricmp (ext, ".cmd") == 0 || + _rl_stricmp (ext, ".bat") == 0 || + _rl_stricmp (ext, ".com") == 0)) + character = '*'; +#else + if (access (filename, X_OK) == 0) + character = '*'; +#endif + } + + xfree (f); + return (character); +} +#endif /* VISIBLE_STATS */ + +#if defined (COLOR_SUPPORT) +static int +colored_stat_start (const char *filename) +{ + _rl_set_normal_color (); + return (_rl_print_color_indicator (filename)); +} + +static void +colored_stat_end (void) +{ + _rl_prep_non_filename_text (); + _rl_put_indicator (&_rl_color_indicator[C_CLR_TO_EOL]); +} + +static int +colored_prefix_start (void) +{ + _rl_set_normal_color (); + return (_rl_print_prefix_color ()); +} + +static void +colored_prefix_end (void) +{ + colored_stat_end (); /* for now */ +} +#endif + +/* Return the portion of PATHNAME that should be output when listing + possible completions. If we are hacking filename completion, we + are only interested in the basename, the portion following the + final slash. Otherwise, we return what we were passed. Since + printing empty strings is not very informative, if we're doing + filename completion, and the basename is the empty string, we look + for the previous slash and return the portion following that. If + there's no previous slash, we just return what we were passed. */ +static char * +printable_part (char *pathname) +{ + char *temp, *x; + + if (rl_filename_completion_desired == 0) /* don't need to do anything */ + return (pathname); + + temp = strrchr (pathname, '/'); +#if defined (__MSDOS__) || defined (_WIN32) + if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':') + temp = pathname + 1; +#endif + + if (temp == 0 || *temp == '\0') + return (pathname); + else if (temp[1] == 0 && temp == pathname) + return (pathname); + /* If the basename is NULL, we might have a pathname like '/usr/src/'. + Look for a previous slash and, if one is found, return the portion + following that slash. If there's no previous slash, just return the + pathname we were passed. */ + else if (temp[1] == '\0') + { + for (x = temp - 1; x > pathname; x--) + if (*x == '/') + break; + return ((*x == '/') ? x + 1 : pathname); + } + else + return ++temp; +} + +/* Compute width of STRING when displayed on screen by print_filename */ +static int +fnwidth (const char *string) +{ + int width, pos; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + int left, w; + size_t clen; + wchar_t wc; + + left = strlen (string) + 1; + memset (&ps, 0, sizeof (mbstate_t)); +#endif + + width = pos = 0; + while (string[pos]) + { + if (CTRL_CHAR (string[pos]) || string[pos] == RUBOUT) + { + width += 2; + pos++; + } + else + { +#if defined (HANDLE_MULTIBYTE) + clen = mbrtowc (&wc, string + pos, left - pos, &ps); + if (MB_INVALIDCH (clen)) + { + width++; + pos++; + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (MB_NULLWCH (clen)) + break; + else + { + pos += clen; + w = WCWIDTH (wc); + width += (w >= 0) ? w : 1; + } +#else + width++; + pos++; +#endif + } + } + + return width; +} + +#define ELLIPSIS_LEN 3 + +static int +fnprint (const char *to_print, int prefix_bytes, const char *real_pathname) +{ + int printed_len, w; + const char *s; + int common_prefix_len, print_len; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + const char *end; + size_t tlen; + int width; + wchar_t wc; + + print_len = strlen (to_print); + end = to_print + print_len + 1; + memset (&ps, 0, sizeof (mbstate_t)); +#else + print_len = strlen (to_print); +#endif + + printed_len = common_prefix_len = 0; + + /* Don't print only the ellipsis if the common prefix is one of the + possible completions. Only cut off prefix_bytes if we're going to be + printing the ellipsis, which takes precedence over coloring the + completion prefix (see print_filename() below). */ + if (_rl_completion_prefix_display_length > 0 && prefix_bytes >= print_len) + prefix_bytes = 0; + +#if defined (COLOR_SUPPORT) + if (_rl_colored_stats && (prefix_bytes == 0 || _rl_colored_completion_prefix <= 0)) + colored_stat_start (real_pathname); +#endif + + if (prefix_bytes && _rl_completion_prefix_display_length > 0) + { + char ellipsis; + + ellipsis = (to_print[prefix_bytes] == '.') ? '_' : '.'; + for (w = 0; w < ELLIPSIS_LEN; w++) + putc (ellipsis, rl_outstream); + printed_len = ELLIPSIS_LEN; + } +#if defined (COLOR_SUPPORT) + else if (prefix_bytes && _rl_colored_completion_prefix > 0) + { + common_prefix_len = prefix_bytes; + prefix_bytes = 0; + /* XXX - print color indicator start here */ + colored_prefix_start (); + } +#endif + + s = to_print + prefix_bytes; + while (*s) + { + if (CTRL_CHAR (*s)) + { + putc ('^', rl_outstream); + putc (UNCTRL (*s), rl_outstream); + printed_len += 2; + s++; +#if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); +#endif + } + else if (*s == RUBOUT) + { + putc ('^', rl_outstream); + putc ('?', rl_outstream); + printed_len += 2; + s++; +#if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); +#endif + } + else + { +#if defined (HANDLE_MULTIBYTE) + tlen = mbrtowc (&wc, s, end - s, &ps); + if (MB_INVALIDCH (tlen)) + { + tlen = 1; + width = 1; + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (MB_NULLWCH (tlen)) + break; + else + { + w = WCWIDTH (wc); + width = (w >= 0) ? w : 1; + } + fwrite (s, 1, tlen, rl_outstream); + s += tlen; + printed_len += width; +#else + putc (*s, rl_outstream); + s++; + printed_len++; +#endif + } + if (common_prefix_len > 0 && (s - to_print) >= common_prefix_len) + { +#if defined (COLOR_SUPPORT) + /* printed bytes = s - to_print */ + /* printed bytes should never be > but check for paranoia's sake */ + colored_prefix_end (); + if (_rl_colored_stats) + colored_stat_start (real_pathname); /* XXX - experiment */ +#endif + common_prefix_len = 0; + } + } + +#if defined (COLOR_SUPPORT) + /* XXX - unconditional for now */ + if (_rl_colored_stats) + colored_stat_end (); +#endif + + return printed_len; +} + +/* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and we + are using it, check for and output a single character for `special' + filenames. Return the number of characters we output. */ + +static int +print_filename (char *to_print, char *full_pathname, int prefix_bytes) +{ + int printed_len, extension_char, slen, tlen; + char *s, c, *new_full_pathname, *dn; + + extension_char = 0; +#if defined (COLOR_SUPPORT) + /* Defer printing if we want to prefix with a color indicator */ + if (_rl_colored_stats == 0 || rl_filename_completion_desired == 0) +#endif + printed_len = fnprint (to_print, prefix_bytes, to_print); + + if (rl_filename_completion_desired && ( +#if defined (VISIBLE_STATS) + rl_visible_stats || +#endif +#if defined (COLOR_SUPPORT) + _rl_colored_stats || +#endif + _rl_complete_mark_directories)) + { + /* If to_print != full_pathname, to_print is the basename of the + path passed. In this case, we try to expand the directory + name before checking for the stat character. */ + if (to_print != full_pathname) + { + /* Terminate the directory name. */ + c = to_print[-1]; + to_print[-1] = '\0'; + + /* If setting the last slash in full_pathname to a NUL results in + full_pathname being the empty string, we are trying to complete + files in the root directory. If we pass a null string to the + bash directory completion hook, for example, it will expand it + to the current directory. We just want the `/'. */ + if (full_pathname == 0 || *full_pathname == 0) + dn = "/"; + else if (full_pathname[0] != '/') + dn = full_pathname; + else if (full_pathname[1] == 0) + dn = "//"; /* restore trailing slash to `//' */ + else if (full_pathname[1] == '/' && full_pathname[2] == 0) + dn = "/"; /* don't turn /// into // */ + else + dn = full_pathname; + s = tilde_expand (dn); + if (rl_directory_completion_hook) + (*rl_directory_completion_hook) (&s); + + slen = strlen (s); + tlen = strlen (to_print); + new_full_pathname = (char *)xmalloc (slen + tlen + 2); + strcpy (new_full_pathname, s); + if (s[slen - 1] == '/') + slen--; + else + new_full_pathname[slen] = '/'; + strcpy (new_full_pathname + slen + 1, to_print); + +#if defined (VISIBLE_STATS) + if (rl_visible_stats) + extension_char = stat_char (new_full_pathname); + else +#endif + if (_rl_complete_mark_directories) + { + dn = 0; + if (rl_directory_completion_hook == 0 && rl_filename_stat_hook) + { + dn = savestring (new_full_pathname); + (*rl_filename_stat_hook) (&dn); + xfree (new_full_pathname); + new_full_pathname = dn; + } + if (path_isdir (new_full_pathname)) + extension_char = '/'; + } + + /* Move colored-stats code inside fnprint() */ +#if defined (COLOR_SUPPORT) + if (_rl_colored_stats) + printed_len = fnprint (to_print, prefix_bytes, new_full_pathname); +#endif + + xfree (new_full_pathname); + to_print[-1] = c; + } + else + { + s = tilde_expand (full_pathname); +#if defined (VISIBLE_STATS) + if (rl_visible_stats) + extension_char = stat_char (s); + else +#endif + if (_rl_complete_mark_directories && path_isdir (s)) + extension_char = '/'; + + /* Move colored-stats code inside fnprint() */ +#if defined (COLOR_SUPPORT) + if (_rl_colored_stats) + printed_len = fnprint (to_print, prefix_bytes, s); +#endif + } + + xfree (s); + if (extension_char) + { + putc (extension_char, rl_outstream); + printed_len++; + } + } + + return printed_len; +} + +static char * +rl_quote_filename (char *s, int rtype, char *qcp) +{ + char *r; + + r = (char *)xmalloc (strlen (s) + 2); + *r = *rl_completer_quote_characters; + strcpy (r + 1, s); + if (qcp) + *qcp = *rl_completer_quote_characters; + return r; +} + +/* Find the bounds of the current word for completion purposes, and leave + rl_point set to the end of the word. This function skips quoted + substrings (characters between matched pairs of characters in + rl_completer_quote_characters). First we try to find an unclosed + quoted substring on which to do matching. If one is not found, we use + the word break characters to find the boundaries of the current word. + We call an application-specific function to decide whether or not a + particular word break character is quoted; if that function returns a + non-zero result, the character does not break a word. This function + returns the opening quote character if we found an unclosed quoted + substring, '\0' otherwise. FP, if non-null, is set to a value saying + which (shell-like) quote characters we found (single quote, double + quote, or backslash) anywhere in the string. DP, if non-null, is set to + the value of the delimiter character that caused a word break. */ + +char +_rl_find_completion_word (int *fp, int *dp) +{ + int scan, end, found_quote, delimiter, pass_next, isbrk; + char quote_char, *brkchars; + + end = rl_point; + found_quote = delimiter = 0; + quote_char = '\0'; + + brkchars = 0; + if (rl_completion_word_break_hook) + brkchars = (*rl_completion_word_break_hook) (); + if (brkchars == 0) + brkchars = rl_completer_word_break_characters; + + if (rl_completer_quote_characters) + { + /* We have a list of characters which can be used in pairs to + quote substrings for the completer. Try to find the start + of an unclosed quoted substring. */ + /* FOUND_QUOTE is set so we know what kind of quotes we found. */ + for (scan = pass_next = 0; scan < end; scan = MB_NEXTCHAR (rl_line_buffer, scan, 1, MB_FIND_ANY)) + { + if (pass_next) + { + pass_next = 0; + continue; + } + + /* Shell-like semantics for single quotes -- don't allow backslash + to quote anything in single quotes, especially not the closing + quote. If you don't like this, take out the check on the value + of quote_char. */ + if (quote_char != '\'' && rl_line_buffer[scan] == '\\') + { + pass_next = 1; + found_quote |= RL_QF_BACKSLASH; + continue; + } + + if (quote_char != '\0') + { + /* Ignore everything until the matching close quote char. */ + if (rl_line_buffer[scan] == quote_char) + { + /* Found matching close. Abandon this substring. */ + quote_char = '\0'; + rl_point = end; + } + } + else if (strchr (rl_completer_quote_characters, rl_line_buffer[scan])) + { + /* Found start of a quoted substring. */ + quote_char = rl_line_buffer[scan]; + rl_point = scan + 1; + /* Shell-like quoting conventions. */ + if (quote_char == '\'') + found_quote |= RL_QF_SINGLE_QUOTE; + else if (quote_char == '"') + found_quote |= RL_QF_DOUBLE_QUOTE; + else + found_quote |= RL_QF_OTHER_QUOTE; + } + } + } + + if (rl_point == end && quote_char == '\0') + { + /* We didn't find an unclosed quoted substring upon which to do + completion, so use the word break characters to find the + substring on which to complete. */ + while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY)) + { + scan = rl_line_buffer[rl_point]; + + if (strchr (brkchars, scan) == 0) + continue; + + /* Call the application-specific function to tell us whether + this word break character is quoted and should be skipped. */ + if (rl_char_is_quoted_p && found_quote && + (*rl_char_is_quoted_p) (rl_line_buffer, rl_point)) + continue; + + /* Convoluted code, but it avoids an n^2 algorithm with calls + to char_is_quoted. */ + break; + } + } + + /* If we are at an unquoted word break, then advance past it. */ + scan = rl_line_buffer[rl_point]; + + /* If there is an application-specific function to say whether or not + a character is quoted and we found a quote character, let that + function decide whether or not a character is a word break, even + if it is found in rl_completer_word_break_characters. Don't bother + if we're at the end of the line, though. */ + if (scan) + { + if (rl_char_is_quoted_p) + isbrk = (found_quote == 0 || + (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) && + strchr (brkchars, scan) != 0; + else + isbrk = strchr (brkchars, scan) != 0; + + if (isbrk) + { + /* If the character that caused the word break was a quoting + character, then remember it as the delimiter. */ + if (rl_basic_quote_characters && + strchr (rl_basic_quote_characters, scan) && + (end - rl_point) > 1) + delimiter = scan; + + /* If the character isn't needed to determine something special + about what kind of completion to perform, then advance past it. */ + if (rl_special_prefixes == 0 || strchr (rl_special_prefixes, scan) == 0) + rl_point++; + } + } + + if (fp) + *fp = found_quote; + if (dp) + *dp = delimiter; + + return (quote_char); +} + +static char ** +gen_completion_matches (char *text, int start, int end, rl_compentry_func_t *our_func, int found_quote, int quote_char) +{ + char **matches; + + rl_completion_found_quote = found_quote; + rl_completion_quote_character = quote_char; + + /* If the user wants to TRY to complete, but then wants to give + up and use the default completion function, they set the + variable rl_attempted_completion_function. */ + if (rl_attempted_completion_function) + { + matches = (*rl_attempted_completion_function) (text, start, end); + if (RL_SIG_RECEIVED()) + { + _rl_free_match_list (matches); + matches = 0; + RL_CHECK_SIGNALS (); + } + + if (matches || rl_attempted_completion_over) + { + rl_attempted_completion_over = 0; + return (matches); + } + } + + /* XXX -- filename dequoting moved into rl_filename_completion_function */ + + /* rl_completion_matches will check for signals as well to avoid a long + delay while reading a directory. */ + matches = rl_completion_matches (text, our_func); + if (RL_SIG_RECEIVED()) + { + _rl_free_match_list (matches); + matches = 0; + RL_CHECK_SIGNALS (); + } + return matches; +} + +/* Filter out duplicates in MATCHES. This frees up the strings in + MATCHES. */ +static char ** +remove_duplicate_matches (char **matches) +{ + char *lowest_common; + int i, j, newlen; + char dead_slot; + char **temp_array; + + /* Sort the items. */ + for (i = 0; matches[i]; i++) + ; + + /* Sort the array without matches[0], since we need it to + stay in place no matter what. */ + if (i && rl_sort_completion_matches) + qsort (matches+1, i-1, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); + + /* Remember the lowest common denominator for it may be unique. */ + lowest_common = savestring (matches[0]); + + for (i = newlen = 0; matches[i + 1]; i++) + { + if (strcmp (matches[i], matches[i + 1]) == 0) + { + xfree (matches[i]); + matches[i] = (char *)&dead_slot; + } + else + newlen++; + } + + /* We have marked all the dead slots with (char *)&dead_slot. + Copy all the non-dead entries into a new array. */ + temp_array = (char **)xmalloc ((3 + newlen) * sizeof (char *)); + for (i = j = 1; matches[i]; i++) + { + if (matches[i] != (char *)&dead_slot) + temp_array[j++] = matches[i]; + } + temp_array[j] = (char *)NULL; + + if (matches[0] != (char *)&dead_slot) + xfree (matches[0]); + + /* Place the lowest common denominator back in [0]. */ + temp_array[0] = lowest_common; + + /* If there is one string left, and it is identical to the + lowest common denominator, then the LCD is the string to + insert. */ + if (j == 2 && strcmp (temp_array[0], temp_array[1]) == 0) + { + xfree (temp_array[1]); + temp_array[1] = (char *)NULL; + } + return (temp_array); +} + +/* Find the common prefix of the list of matches, and put it into + matches[0]. */ +static int +compute_lcd_of_matches (char **match_list, int matches, const char *text) +{ + register int i, c1, c2, si; + int low; /* Count of max-matched characters. */ + int lx; + char *dtext; /* dequoted TEXT, if needed */ +#if defined (HANDLE_MULTIBYTE) + int v; + size_t v1, v2; + mbstate_t ps1, ps2; + wchar_t wc1, wc2; +#endif + + /* If only one match, just use that. Otherwise, compare each + member of the list with the next, finding out where they + stop matching. */ + if (matches == 1) + { + match_list[0] = match_list[1]; + match_list[1] = (char *)NULL; + return 1; + } + + for (i = 1, low = 100000; i < matches; i++) + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + memset (&ps1, 0, sizeof (mbstate_t)); + memset (&ps2, 0, sizeof (mbstate_t)); + } +#endif + for (si = 0; (c1 = match_list[i][si]) && (c2 = match_list[i + 1][si]); si++) + { + if (_rl_completion_case_fold) + { + c1 = _rl_to_lower (c1); + c2 = _rl_to_lower (c2); + } +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + v1 = mbrtowc(&wc1, match_list[i]+si, strlen (match_list[i]+si), &ps1); + v2 = mbrtowc (&wc2, match_list[i+1]+si, strlen (match_list[i+1]+si), &ps2); + if (MB_INVALIDCH (v1) || MB_INVALIDCH (v2)) + { + if (c1 != c2) /* do byte comparison */ + break; + continue; + } + if (_rl_completion_case_fold) + { + wc1 = towlower (wc1); + wc2 = towlower (wc2); + } + if (wc1 != wc2) + break; + else if (v1 > 1) + si += v1 - 1; + } + else +#endif + if (c1 != c2) + break; + } + + if (low > si) + low = si; + } + + /* If there were multiple matches, but none matched up to even the + first character, and the user typed something, use that as the + value of matches[0]. */ + if (low == 0 && text && *text) + { + match_list[0] = (char *)xmalloc (strlen (text) + 1); + strcpy (match_list[0], text); + } + else + { + match_list[0] = (char *)xmalloc (low + 1); + + /* XXX - this might need changes in the presence of multibyte chars */ + + /* If we are ignoring case, try to preserve the case of the string + the user typed in the face of multiple matches differing in case. */ + if (_rl_completion_case_fold) + { + /* We're making an assumption here: + IF we're completing filenames AND + the application has defined a filename dequoting function AND + we found a quote character AND + the application has requested filename quoting + THEN + we assume that TEXT was dequoted before checking against + the file system and needs to be dequoted here before we + check against the list of matches + FI */ + dtext = (char *)NULL; + if (rl_filename_completion_desired && + rl_filename_dequoting_function && + rl_completion_found_quote && + rl_filename_quoting_desired) + { + dtext = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character); + text = dtext; + } + + /* sort the list to get consistent answers. */ + if (rl_sort_completion_matches) + qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare); + + si = strlen (text); + lx = (si <= low) ? si : low; /* check shorter of text and matches */ + /* Try to preserve the case of what the user typed in the presence of + multiple matches: check each match for something that matches + what the user typed taking case into account; use it up to common + length of matches if one is found. If not, just use first match. */ + for (i = 1; i <= matches; i++) + if (strncmp (match_list[i], text, lx) == 0) + { + strncpy (match_list[0], match_list[i], low); + break; + } + /* no casematch, use first entry */ + if (i > matches) + strncpy (match_list[0], match_list[1], low); + + FREE (dtext); + } + else + strncpy (match_list[0], match_list[1], low); + + match_list[0][low] = '\0'; + } + + return matches; +} + +static int +postprocess_matches (char ***matchesp, int matching_filenames) +{ + char *t, **matches, **temp_matches; + int nmatch, i; + + matches = *matchesp; + + if (matches == 0) + return 0; + + /* It seems to me that in all the cases we handle we would like + to ignore duplicate possibilities. Scan for the text to + insert being identical to the other completions. */ + if (rl_ignore_completion_duplicates) + { + temp_matches = remove_duplicate_matches (matches); + xfree (matches); + matches = temp_matches; + } + + /* If we are matching filenames, then here is our chance to + do clever processing by re-examining the list. Call the + ignore function with the array as a parameter. It can + munge the array, deleting matches as it desires. */ + if (rl_ignore_some_completions_function && matching_filenames) + { + for (nmatch = 1; matches[nmatch]; nmatch++) + ; + (void)(*rl_ignore_some_completions_function) (matches); + if (matches == 0 || matches[0] == 0) + { + FREE (matches); + *matchesp = (char **)0; + return 0; + } + else + { + /* If we removed some matches, recompute the common prefix. */ + for (i = 1; matches[i]; i++) + ; + if (i > 1 && i < nmatch) + { + t = matches[0]; + compute_lcd_of_matches (matches, i - 1, t); + FREE (t); + } + } + } + + *matchesp = matches; + return (1); +} + +static int +complete_get_screenwidth (void) +{ + int cols; + char *envcols; + + cols = _rl_completion_columns; + if (cols >= 0 && cols <= _rl_screenwidth) + return cols; + envcols = getenv ("COLUMNS"); + if (envcols && *envcols) + cols = atoi (envcols); + if (cols >= 0 && cols <= _rl_screenwidth) + return cols; + return _rl_screenwidth; +} + +/* A convenience function for displaying a list of strings in + columnar format on readline's output stream. MATCHES is the list + of strings, in argv format, LEN is the number of strings in MATCHES, + and MAX is the length of the longest string in MATCHES. */ +void +rl_display_match_list (char **matches, int len, int max) +{ + int count, limit, printed_len, lines, cols; + int i, j, k, l, common_length, sind; + char *temp, *t; + + /* Find the length of the prefix common to all items: length as displayed + characters (common_length) and as a byte index into the matches (sind) */ + common_length = sind = 0; + if (_rl_completion_prefix_display_length > 0) + { + t = printable_part (matches[0]); + /* check again in case of /usr/src/ */ + temp = rl_filename_completion_desired ? strrchr (t, '/') : 0; + common_length = temp ? fnwidth (temp) : fnwidth (t); + sind = temp ? strlen (temp) : strlen (t); + if (common_length > max || sind > max) + common_length = sind = 0; + + if (common_length > _rl_completion_prefix_display_length && common_length > ELLIPSIS_LEN) + max -= common_length - ELLIPSIS_LEN; + else + common_length = sind = 0; + } +#if defined (COLOR_SUPPORT) + else if (_rl_colored_completion_prefix > 0) + { + t = printable_part (matches[0]); + temp = rl_filename_completion_desired ? strrchr (t, '/') : 0; + common_length = temp ? fnwidth (temp) : fnwidth (t); + sind = temp ? RL_STRLEN (temp+1) : RL_STRLEN (t); /* want portion after final slash */ + if (common_length > max || sind > max) + common_length = sind = 0; + } +#endif + + /* How many items of MAX length can we fit in the screen window? */ + cols = complete_get_screenwidth (); + max += 2; + limit = cols / max; + if (limit != 1 && (limit * max == cols)) + limit--; + + /* If cols == 0, limit will end up -1 */ + if (cols < _rl_screenwidth && limit < 0) + limit = 1; + + /* Avoid a possible floating exception. If max > cols, + limit will be 0 and a divide-by-zero fault will result. */ + if (limit == 0) + limit = 1; + + /* How many iterations of the printing loop? */ + count = (len + (limit - 1)) / limit; + + /* Watch out for special case. If LEN is less than LIMIT, then + just do the inner printing loop. + 0 < len <= limit implies count = 1. */ + + /* Sort the items if they are not already sorted. */ + if (rl_ignore_completion_duplicates == 0 && rl_sort_completion_matches) + qsort (matches + 1, len, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); + + rl_crlf (); + + lines = 0; + if (_rl_print_completions_horizontally == 0) + { + /* Print the sorted items, up-and-down alphabetically, like ls. */ + for (i = 1; i <= count; i++) + { + for (j = 0, l = i; j < limit; j++) + { + if (l > len || matches[l] == 0) + break; + else + { + temp = printable_part (matches[l]); + printed_len = print_filename (temp, matches[l], sind); + + if (j + 1 < limit) + { + if (max <= printed_len) + putc (' ', rl_outstream); + else + for (k = 0; k < max - printed_len; k++) + putc (' ', rl_outstream); + } + } + l += count; + } + rl_crlf (); +#if defined (SIGWINCH) + if (RL_SIG_RECEIVED () && RL_SIGWINCH_RECEIVED() == 0) +#else + if (RL_SIG_RECEIVED ()) +#endif + return; + lines++; + if (_rl_page_completions && lines >= (_rl_screenheight - 1) && i < count) + { + lines = _rl_internal_pager (lines); + if (lines < 0) + return; + } + } + } + else + { + /* Print the sorted items, across alphabetically, like ls -x. */ + for (i = 1; matches[i]; i++) + { + temp = printable_part (matches[i]); + printed_len = print_filename (temp, matches[i], sind); + /* Have we reached the end of this line? */ +#if defined (SIGWINCH) + if (RL_SIG_RECEIVED () && RL_SIGWINCH_RECEIVED() == 0) +#else + if (RL_SIG_RECEIVED ()) +#endif + return; + if (matches[i+1]) + { + if (limit == 1 || (i && (limit > 1) && (i % limit) == 0)) + { + rl_crlf (); + lines++; + if (_rl_page_completions && lines >= _rl_screenheight - 1) + { + lines = _rl_internal_pager (lines); + if (lines < 0) + return; + } + } + else if (max <= printed_len) + putc (' ', rl_outstream); + else + for (k = 0; k < max - printed_len; k++) + putc (' ', rl_outstream); + } + } + rl_crlf (); + } +} + +/* Display MATCHES, a list of matching filenames in argv format. This + handles the simple case -- a single match -- first. If there is more + than one match, we compute the number of strings in the list and the + length of the longest string, which will be needed by the display + function. If the application wants to handle displaying the list of + matches itself, it sets RL_COMPLETION_DISPLAY_MATCHES_HOOK to the + address of a function, and we just call it. If we're handling the + display ourselves, we just call rl_display_match_list. We also check + that the list of matches doesn't exceed the user-settable threshold, + and ask the user if he wants to see the list if there are more matches + than RL_COMPLETION_QUERY_ITEMS. */ +static void +display_matches (char **matches) +{ + int len, max, i; + char *temp; + + /* Move to the last visible line of a possibly-multiple-line command. */ + _rl_move_vert (_rl_vis_botlin); + + /* Handle simple case first. What if there is only one answer? */ + if (matches[1] == 0) + { + temp = printable_part (matches[0]); + rl_crlf (); + print_filename (temp, matches[0], 0); + rl_crlf (); + + rl_forced_update_display (); + rl_display_fixed = 1; + + return; + } + + /* There is more than one answer. Find out how many there are, + and find the maximum printed length of a single entry. */ + for (max = 0, i = 1; matches[i]; i++) + { + temp = printable_part (matches[i]); + len = fnwidth (temp); + + if (len > max) + max = len; + } + + len = i - 1; + + /* If the caller has defined a display hook, then call that now. */ + if (rl_completion_display_matches_hook) + { + (*rl_completion_display_matches_hook) (matches, len, max); + return; + } + + /* If there are many items, then ask the user if she really wants to + see them all. */ + if (rl_completion_query_items > 0 && len >= rl_completion_query_items) + { + rl_crlf (); + fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len); + fflush (rl_outstream); + if ((completion_y_or_n = get_y_or_n (0)) == 0) + { + rl_crlf (); + + rl_forced_update_display (); + rl_display_fixed = 1; + + return; + } + } + + rl_display_match_list (matches, len, max); + + rl_forced_update_display (); + rl_display_fixed = 1; +} + +/* qc == pointer to quoting character, if any */ +static char * +make_quoted_replacement (char *match, int mtype, char *qc) +{ + int should_quote, do_replace; + char *replacement; + + /* If we are doing completion on quoted substrings, and any matches + contain any of the completer_word_break_characters, then auto- + matically prepend the substring with a quote character (just pick + the first one from the list of such) if it does not already begin + with a quote string. FIXME: Need to remove any such automatically + inserted quote character when it no longer is necessary, such as + if we change the string we are completing on and the new set of + matches don't require a quoted substring. */ + replacement = match; + + should_quote = match && rl_completer_quote_characters && + rl_filename_completion_desired && + rl_filename_quoting_desired; + + if (should_quote) + should_quote = should_quote && (!qc || !*qc || + (rl_completer_quote_characters && strchr (rl_completer_quote_characters, *qc))); + + if (should_quote) + { + /* If there is a single match, see if we need to quote it. + This also checks whether the common prefix of several + matches needs to be quoted. */ + should_quote = rl_filename_quote_characters + ? (_rl_strpbrk (match, rl_filename_quote_characters) != 0) + : 0; + + do_replace = should_quote ? mtype : NO_MATCH; + /* Quote the replacement, since we found an embedded + word break character in a potential match. */ + if (do_replace != NO_MATCH && rl_filename_quoting_function) + replacement = (*rl_filename_quoting_function) (match, do_replace, qc); + } + return (replacement); +} + +static void +insert_match (char *match, int start, int mtype, char *qc) +{ + char *replacement, *r; + char oqc; + int end, rlen; + + oqc = qc ? *qc : '\0'; + replacement = make_quoted_replacement (match, mtype, qc); + + /* Now insert the match. */ + if (replacement) + { + rlen = strlen (replacement); + /* Don't double an opening quote character. */ + if (qc && *qc && start && rl_line_buffer[start - 1] == *qc && + replacement[0] == *qc) + start--; + /* If make_quoted_replacement changed the quoting character, remove + the opening quote and insert the (fully-quoted) replacement. */ + else if (qc && (*qc != oqc) && start && rl_line_buffer[start - 1] == oqc && + replacement[0] != oqc) + start--; + end = rl_point - 1; + /* Don't double a closing quote character */ + if (qc && *qc && end && rl_line_buffer[rl_point] == *qc && replacement[rlen - 1] == *qc) + end++; + if (_rl_skip_completed_text) + { + r = replacement; + while (start < rl_end && *r && rl_line_buffer[start] == *r) + { + start++; + r++; + } + if (start <= end || *r) + _rl_replace_text (r, start, end); + rl_point = start + strlen (r); + } + else + _rl_replace_text (replacement, start, end); + if (replacement != match) + xfree (replacement); + } +} + +/* Append any necessary closing quote and a separator character to the + just-inserted match. If the user has specified that directories + should be marked by a trailing `/', append one of those instead. The + default trailing character is a space. Returns the number of characters + appended. If NONTRIVIAL_MATCH is set, we test for a symlink (if the OS + has them) and don't add a suffix for a symlink to a directory. A + nontrivial match is one that actually adds to the word being completed. + The variable rl_completion_mark_symlink_dirs controls this behavior + (it's initially set to the what the user has chosen, indicated by the + value of _rl_complete_mark_symlink_dirs, but may be modified by an + application's completion function). */ +static int +append_to_match (char *text, int delimiter, int quote_char, int nontrivial_match) +{ + char temp_string[4], *filename, *fn; + int temp_string_index, s; + struct stat finfo; + + temp_string_index = 0; + if (quote_char && rl_point && rl_completion_suppress_quote == 0 && + rl_line_buffer[rl_point - 1] != quote_char) + temp_string[temp_string_index++] = quote_char; + + if (delimiter) + temp_string[temp_string_index++] = delimiter; + else if (rl_completion_suppress_append == 0 && rl_completion_append_character) + temp_string[temp_string_index++] = rl_completion_append_character; + + temp_string[temp_string_index++] = '\0'; + + if (rl_filename_completion_desired) + { + filename = tilde_expand (text); + if (rl_filename_stat_hook) + { + fn = savestring (filename); + (*rl_filename_stat_hook) (&fn); + xfree (filename); + filename = fn; + } + s = (nontrivial_match && rl_completion_mark_symlink_dirs == 0) + ? LSTAT (filename, &finfo) + : stat (filename, &finfo); + if (s == 0 && S_ISDIR (finfo.st_mode)) + { + if (_rl_complete_mark_directories /* && rl_completion_suppress_append == 0 */) + { + /* This is clumsy. Avoid putting in a double slash if point + is at the end of the line and the previous character is a + slash. */ + if (rl_point && rl_line_buffer[rl_point] == '\0' && rl_line_buffer[rl_point - 1] == '/') + ; + else if (rl_line_buffer[rl_point] != '/') + rl_insert_text ("/"); + } + } +#ifdef S_ISLNK + /* Don't add anything if the filename is a symlink and resolves to a + directory. */ + else if (s == 0 && S_ISLNK (finfo.st_mode) && path_isdir (filename)) + ; +#endif + else + { + if (rl_point == rl_end && temp_string_index) + rl_insert_text (temp_string); + } + xfree (filename); + } + else + { + if (rl_point == rl_end && temp_string_index) + rl_insert_text (temp_string); + } + + return (temp_string_index); +} + +static void +insert_all_matches (char **matches, int point, char *qc) +{ + int i; + char *rp; + + rl_begin_undo_group (); + /* remove any opening quote character; make_quoted_replacement will add + it back. */ + if (qc && *qc && point && rl_line_buffer[point - 1] == *qc) + point--; + rl_delete_text (point, rl_point); + rl_point = point; + + if (matches[1]) + { + for (i = 1; matches[i]; i++) + { + rp = make_quoted_replacement (matches[i], SINGLE_MATCH, qc); + rl_insert_text (rp); + rl_insert_text (" "); + if (rp != matches[i]) + xfree (rp); + } + } + else + { + rp = make_quoted_replacement (matches[0], SINGLE_MATCH, qc); + rl_insert_text (rp); + rl_insert_text (" "); + if (rp != matches[0]) + xfree (rp); + } + rl_end_undo_group (); +} + +void +_rl_free_match_list (char **matches) +{ + register int i; + + if (matches == 0) + return; + + for (i = 0; matches[i]; i++) + xfree (matches[i]); + xfree (matches); +} + +/* Compare a possibly-quoted filename TEXT from the line buffer and a possible + MATCH that is the product of filename completion, which acts on the dequoted + text. */ +static int +compare_match (char *text, const char *match) +{ + char *temp; + int r; + + if (rl_filename_completion_desired && rl_filename_quoting_desired && + rl_completion_found_quote && rl_filename_dequoting_function) + { + temp = (*rl_filename_dequoting_function) (text, rl_completion_quote_character); + r = strcmp (temp, match); + free (temp); + return r; + } + return (strcmp (text, match)); +} + +/* Complete the word at or before point. + WHAT_TO_DO says what to do with the completion. + `?' means list the possible completions. + TAB means do standard completion. + `*' means insert all of the possible completions. + `!' means to do standard completion, and list all possible completions if + there is more than one. + `@' means to do standard completion, and list all possible completions if + there is more than one and partial completion is not possible. */ +int +rl_complete_internal (int what_to_do) +{ + char **matches; + rl_compentry_func_t *our_func; + int start, end, delimiter, found_quote, i, nontrivial_lcd; + char *text, *saved_line_buffer; + char quote_char; + int tlen, mlen, saved_last_completion_failed; + + RL_SETSTATE(RL_STATE_COMPLETING); + + saved_last_completion_failed = last_completion_failed; + + set_completion_defaults (what_to_do); + + saved_line_buffer = rl_line_buffer ? savestring (rl_line_buffer) : (char *)NULL; + our_func = rl_completion_entry_function + ? rl_completion_entry_function + : rl_filename_completion_function; + /* We now look backwards for the start of a filename/variable word. */ + end = rl_point; + found_quote = delimiter = 0; + quote_char = '\0'; + + if (rl_point) + /* This (possibly) changes rl_point. If it returns a non-zero char, + we know we have an open quote. */ + quote_char = _rl_find_completion_word (&found_quote, &delimiter); + + start = rl_point; + rl_point = end; + + text = rl_copy_text (start, end); + matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); + /* nontrivial_lcd is set if the common prefix adds something to the word + being completed. */ + nontrivial_lcd = matches && compare_match (text, matches[0]) != 0; + if (what_to_do == '!' || what_to_do == '@') + tlen = strlen (text); + xfree (text); + + if (matches == 0) + { + rl_ding (); + FREE (saved_line_buffer); + completion_changed_buffer = 0; + last_completion_failed = 1; + RL_UNSETSTATE(RL_STATE_COMPLETING); + _rl_reset_completion_state (); + return (0); + } + + /* If we are matching filenames, the attempted completion function will + have set rl_filename_completion_desired to a non-zero value. The basic + rl_filename_completion_function does this. */ + i = rl_filename_completion_desired; + + if (postprocess_matches (&matches, i) == 0) + { + rl_ding (); + FREE (saved_line_buffer); + completion_changed_buffer = 0; + last_completion_failed = 1; + RL_UNSETSTATE(RL_STATE_COMPLETING); + _rl_reset_completion_state (); + return (0); + } + + if (matches && matches[0] && *matches[0]) + last_completion_failed = 0; + + switch (what_to_do) + { + case TAB: + case '!': + case '@': + /* Insert the first match with proper quoting. */ + if (what_to_do == TAB) + { + if (*matches[0]) + insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); + } + else if (*matches[0] && matches[1] == 0) + /* should we perform the check only if there are multiple matches? */ + insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); + else if (*matches[0]) /* what_to_do != TAB && multiple matches */ + { + mlen = *matches[0] ? strlen (matches[0]) : 0; + if (mlen >= tlen) + insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); + } + + /* If there are more matches, ring the bell to indicate. + If we are in vi mode, Posix.2 says to not ring the bell. + If the `show-all-if-ambiguous' variable is set, display + all the matches immediately. Otherwise, if this was the + only match, and we are hacking files, check the file to + see if it was a directory. If so, and the `mark-directories' + variable is set, add a '/' to the name. If not, and we + are at the end of the line, then add a space. */ + if (matches[1]) + { + if (what_to_do == '!') + { + display_matches (matches); + break; + } + else if (what_to_do == '@') + { + if (nontrivial_lcd == 0) + display_matches (matches); + break; + } + else if (rl_editing_mode != vi_mode) + rl_ding (); /* There are other matches remaining. */ + } + else + append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd); + + break; + + case '*': + insert_all_matches (matches, start, "e_char); + break; + + case '?': + /* Let's try to insert a single match here if the last completion failed + but this attempt returned a single match. */ + if (saved_last_completion_failed && matches[0] && *matches[0] && matches[1] == 0) + { + insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); + append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd); + break; + } + + if (rl_completion_display_matches_hook == 0) + { + _rl_sigcleanup = _rl_complete_sigcleanup; + _rl_sigcleanarg = matches; + _rl_complete_display_matches_interrupt = 0; + } + display_matches (matches); + if (_rl_complete_display_matches_interrupt) + { + matches = 0; /* already freed by rl_complete_sigcleanup */ + _rl_complete_display_matches_interrupt = 0; + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); /* XXX */ + } + _rl_sigcleanup = 0; + _rl_sigcleanarg = 0; + break; + + default: + _rl_ttymsg ("bad value %d for what_to_do in rl_complete", what_to_do); + rl_ding (); + FREE (saved_line_buffer); + RL_UNSETSTATE(RL_STATE_COMPLETING); + _rl_free_match_list (matches); + _rl_reset_completion_state (); + return 1; + } + + _rl_free_match_list (matches); + + /* Check to see if the line has changed through all of this manipulation. */ + if (saved_line_buffer) + { + completion_changed_buffer = strcmp (rl_line_buffer, saved_line_buffer) != 0; + xfree (saved_line_buffer); + } + + RL_UNSETSTATE(RL_STATE_COMPLETING); + _rl_reset_completion_state (); + + RL_CHECK_SIGNALS (); + return 0; +} + +/***************************************************************/ +/* */ +/* Application-callable completion match generator functions */ +/* */ +/***************************************************************/ + +/* Return an array of (char *) which is a list of completions for TEXT. + If there are no completions, return a NULL pointer. + The first entry in the returned array is the substitution for TEXT. + The remaining entries are the possible completions. + The array is terminated with a NULL pointer. + + ENTRY_FUNCTION is a function of two args, and returns a (char *). + The first argument is TEXT. + The second is a state argument; it should be zero on the first call, and + non-zero on subsequent calls. It returns a NULL pointer to the caller + when there are no more matches. + */ +char ** +rl_completion_matches (const char *text, rl_compentry_func_t *entry_function) +{ + register int i; + + /* Number of slots in match_list. */ + int match_list_size; + + /* The list of matches. */ + char **match_list; + + /* Number of matches actually found. */ + int matches; + + /* Temporary string binder. */ + char *string; + + matches = 0; + match_list_size = 10; + match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *)); + match_list[1] = (char *)NULL; + + while (string = (*entry_function) (text, matches)) + { + if (RL_SIG_RECEIVED ()) + { + /* Start at 1 because we don't set matches[0] in this function. + Only free the list members if we're building match list from + rl_filename_completion_function, since we know that doesn't + free the strings it returns. */ + if (entry_function == rl_filename_completion_function) + { + for (i = 1; match_list[i]; i++) + xfree (match_list[i]); + } + xfree (match_list); + match_list = 0; + match_list_size = 0; + matches = 0; + RL_CHECK_SIGNALS (); + } + + if (matches + 1 >= match_list_size) + match_list = (char **)xrealloc + (match_list, ((match_list_size += 10) + 1) * sizeof (char *)); + + if (match_list == 0) + return (match_list); + + match_list[++matches] = string; + match_list[matches + 1] = (char *)NULL; + } + + /* If there were any matches, then look through them finding out the + lowest common denominator. That then becomes match_list[0]. */ + if (matches) + compute_lcd_of_matches (match_list, matches, text); + else /* There were no matches. */ + { + xfree (match_list); + match_list = (char **)NULL; + } + return (match_list); +} + +/* A completion function for usernames. + TEXT contains a partial username preceded by a random + character (usually `~'). */ +char * +rl_username_completion_function (const char *text, int state) +{ +#if defined (__WIN32__) || defined (__OPENNT) + return (char *)NULL; +#else /* !__WIN32__ && !__OPENNT) */ + static char *username = (char *)NULL; + static struct passwd *entry; + static int namelen, first_char, first_char_loc; + char *value; + + if (state == 0) + { + FREE (username); + + first_char = *text; + first_char_loc = first_char == '~'; + + username = savestring (&text[first_char_loc]); + namelen = strlen (username); +#if defined (HAVE_GETPWENT) + setpwent (); +#endif + } + +#if defined (HAVE_GETPWENT) + while (entry = getpwent ()) + { + /* Null usernames should result in all users as possible completions. */ + if (namelen == 0 || (STREQN (username, entry->pw_name, namelen))) + break; + } +#endif + + if (entry == 0) + { +#if defined (HAVE_GETPWENT) + endpwent (); +#endif + return ((char *)NULL); + } + else + { + value = (char *)xmalloc (2 + strlen (entry->pw_name)); + + *value = *text; + + strcpy (value + first_char_loc, entry->pw_name); + + if (first_char == '~') + rl_filename_completion_desired = 1; + + return (value); + } +#endif /* !__WIN32__ && !__OPENNT */ +} + +/* Return non-zero if CONVFN matches FILENAME up to the length of FILENAME + (FILENAME_LEN). If _rl_completion_case_fold is set, compare without + regard to the alphabetic case of characters. If + _rl_completion_case_map is set, make `-' and `_' equivalent. CONVFN is + the possibly-converted directory entry; FILENAME is what the user typed. */ +static int +complete_fncmp (const char *convfn, int convlen, const char *filename, int filename_len) +{ + register char *s1, *s2; + int d, len; +#if defined (HANDLE_MULTIBYTE) + size_t v1, v2; + mbstate_t ps1, ps2; + wchar_t wc1, wc2; +#endif + +#if defined (HANDLE_MULTIBYTE) + memset (&ps1, 0, sizeof (mbstate_t)); + memset (&ps2, 0, sizeof (mbstate_t)); +#endif + + if (filename_len == 0) + return 1; + if (convlen < filename_len) + return 0; + + len = filename_len; + s1 = (char *)convfn; + s2 = (char *)filename; + + /* Otherwise, if these match up to the length of filename, then + it is a match. */ + if (_rl_completion_case_fold && _rl_completion_case_map) + { + /* Case-insensitive comparison treating _ and - as equivalent */ +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + do + { + v1 = mbrtowc (&wc1, s1, convlen, &ps1); + v2 = mbrtowc (&wc2, s2, filename_len, &ps2); + if (v1 == 0 && v2 == 0) + return 1; + else if (MB_INVALIDCH (v1) || MB_INVALIDCH (v2)) + { + if (*s1 != *s2) /* do byte comparison */ + return 0; + else if ((*s1 == '-' || *s1 == '_') && (*s2 == '-' || *s2 == '_')) + return 0; + s1++; s2++; len--; + continue; + } + wc1 = towlower (wc1); + wc2 = towlower (wc2); + s1 += v1; + s2 += v1; + len -= v1; + if ((wc1 == L'-' || wc1 == L'_') && (wc2 == L'-' || wc2 == L'_')) + continue; + if (wc1 != wc2) + return 0; + } + while (len != 0); + } + else +#endif + { + do + { + d = _rl_to_lower (*s1) - _rl_to_lower (*s2); + /* *s1 == [-_] && *s2 == [-_] */ + if ((*s1 == '-' || *s1 == '_') && (*s2 == '-' || *s2 == '_')) + d = 0; + if (d != 0) + return 0; + s1++; s2++; /* already checked convlen >= filename_len */ + } + while (--len != 0); + } + + return 1; + } + else if (_rl_completion_case_fold) + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + do + { + v1 = mbrtowc (&wc1, s1, convlen, &ps1); + v2 = mbrtowc (&wc2, s2, filename_len, &ps2); + if (v1 == 0 && v2 == 0) + return 1; + else if (MB_INVALIDCH (v1) || MB_INVALIDCH (v2)) + { + if (*s1 != *s2) /* do byte comparison */ + return 0; + s1++; s2++; len--; + continue; + } + wc1 = towlower (wc1); + wc2 = towlower (wc2); + if (wc1 != wc2) + return 0; + s1 += v1; + s2 += v1; + len -= v1; + } + while (len != 0); + return 1; + } + else +#endif + if ((_rl_to_lower (convfn[0]) == _rl_to_lower (filename[0])) && + (convlen >= filename_len) && + (_rl_strnicmp (filename, convfn, filename_len) == 0)) + return 1; + } + else + { + if ((convfn[0] == filename[0]) && + (convlen >= filename_len) && + (strncmp (filename, convfn, filename_len) == 0)) + return 1; + } + return 0; +} + +/* Okay, now we write the entry_function for filename completion. In the + general case. Note that completion in the shell is a little different + because of all the pathnames that must be followed when looking up the + completion for a command. */ +char * +rl_filename_completion_function (const char *text, int state) +{ + static DIR *directory = (DIR *)NULL; + static char *filename = (char *)NULL; + static char *dirname = (char *)NULL; + static char *users_dirname = (char *)NULL; + static int filename_len; + char *temp, *dentry, *convfn; + int dirlen, dentlen, convlen; + int tilde_dirname; + struct dirent *entry; + + /* If we don't have any state, then do some initialization. */ + if (state == 0) + { + /* If we were interrupted before closing the directory or reading + all of its contents, close it. */ + if (directory) + { + closedir (directory); + directory = (DIR *)NULL; + } + FREE (dirname); + FREE (filename); + FREE (users_dirname); + + filename = savestring (text); + if (*text == 0) + text = "."; + dirname = savestring (text); + + temp = strrchr (dirname, '/'); + +#if defined (__MSDOS__) || defined (_WIN32) + /* special hack for //X/... */ + if (dirname[0] == '/' && dirname[1] == '/' && ISALPHA ((unsigned char)dirname[2]) && dirname[3] == '/') + temp = strrchr (dirname + 3, '/'); +#endif + + if (temp) + { + strcpy (filename, ++temp); + *temp = '\0'; + } +#if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN__)) + /* searches from current directory on the drive */ + else if (ISALPHA ((unsigned char)dirname[0]) && dirname[1] == ':') + { + strcpy (filename, dirname + 2); + dirname[2] = '\0'; + } +#endif + else + { + dirname[0] = '.'; + dirname[1] = '\0'; + } + + /* We aren't done yet. We also support the "~user" syntax. */ + + /* Save the version of the directory that the user typed, dequoting + it if necessary. */ + if (rl_completion_found_quote && rl_filename_dequoting_function) + users_dirname = (*rl_filename_dequoting_function) (dirname, rl_completion_quote_character); + else + users_dirname = savestring (dirname); + + tilde_dirname = 0; + if (*dirname == '~') + { + temp = tilde_expand (dirname); + xfree (dirname); + dirname = temp; + tilde_dirname = 1; + } + + /* We have saved the possibly-dequoted version of the directory name + the user typed. Now transform the directory name we're going to + pass to opendir(2). The directory rewrite hook modifies only the + directory name; the directory completion hook modifies both the + directory name passed to opendir(2) and the version the user + typed. Both the directory completion and rewrite hooks should perform + any necessary dequoting. The hook functions return 1 if they modify + the directory name argument. If either hook returns 0, it should + not modify the directory name pointer passed as an argument. */ + if (rl_directory_rewrite_hook) + (*rl_directory_rewrite_hook) (&dirname); + else if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname)) + { + xfree (users_dirname); + users_dirname = savestring (dirname); + } + else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function) + { + /* delete single and double quotes */ + xfree (dirname); + dirname = savestring (users_dirname); + } + directory = opendir (dirname); + + /* Now dequote a non-null filename. FILENAME will not be NULL, but may + be empty. */ + if (*filename && rl_completion_found_quote && rl_filename_dequoting_function) + { + /* delete single and double quotes */ + temp = (*rl_filename_dequoting_function) (filename, rl_completion_quote_character); + xfree (filename); + filename = temp; + } + filename_len = strlen (filename); + + rl_filename_completion_desired = 1; + } + + /* At this point we should entertain the possibility of hacking wildcarded + filenames, like /usr/man/man/te. If the directory name + contains globbing characters, then build an array of directories, and + then map over that list while completing. */ + /* *** UNIMPLEMENTED *** */ + + /* Now that we have some state, we can read the directory. */ + + entry = (struct dirent *)NULL; + while (directory && (entry = readdir (directory))) + { + convfn = dentry = entry->d_name; + convlen = dentlen = D_NAMLEN (entry); + + if (rl_filename_rewrite_hook) + { + convfn = (*rl_filename_rewrite_hook) (dentry, dentlen); + convlen = (convfn == dentry) ? dentlen : strlen (convfn); + } + + /* Special case for no filename. If the user has disabled the + `match-hidden-files' variable, skip filenames beginning with `.'. + All other entries except "." and ".." match. */ + if (filename_len == 0) + { + if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn)) + continue; + + if (convfn[0] != '.' || + (convfn[1] && (convfn[1] != '.' || convfn[2]))) + break; + } + else + { + if (complete_fncmp (convfn, convlen, filename, filename_len)) + break; + } + } + + if (entry == 0) + { + if (directory) + { + closedir (directory); + directory = (DIR *)NULL; + } + if (dirname) + { + xfree (dirname); + dirname = (char *)NULL; + } + if (filename) + { + xfree (filename); + filename = (char *)NULL; + } + if (users_dirname) + { + xfree (users_dirname); + users_dirname = (char *)NULL; + } + + return (char *)NULL; + } + else + { + /* dirname && (strcmp (dirname, ".") != 0) */ + if (dirname && (dirname[0] != '.' || dirname[1])) + { + if (rl_complete_with_tilde_expansion && *users_dirname == '~') + { + dirlen = strlen (dirname); + temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry)); + strcpy (temp, dirname); + /* Canonicalization cuts off any final slash present. We + may need to add it back. */ + if (dirname[dirlen - 1] != '/') + { + temp[dirlen++] = '/'; + temp[dirlen] = '\0'; + } + } + else + { + dirlen = strlen (users_dirname); + temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry)); + strcpy (temp, users_dirname); + /* Make sure that temp has a trailing slash here. */ + if (users_dirname[dirlen - 1] != '/') + temp[dirlen++] = '/'; + } + + strcpy (temp + dirlen, convfn); + } + else + temp = savestring (convfn); + + if (convfn != dentry) + xfree (convfn); + + return (temp); + } +} + +/* An initial implementation of a menu completion function a la tcsh. The + first time (if the last readline command was not rl_old_menu_complete), we + generate the list of matches. This code is very similar to the code in + rl_complete_internal -- there should be a way to combine the two. Then, + for each item in the list of matches, we insert the match in an undoable + fashion, with the appropriate character appended (this happens on the + second and subsequent consecutive calls to rl_old_menu_complete). When we + hit the end of the match list, we restore the original unmatched text, + ring the bell, and reset the counter to zero. */ +int +rl_old_menu_complete (int count, int invoking_key) +{ + rl_compentry_func_t *our_func; + int matching_filenames, found_quote; + + static char *orig_text; + static char **matches = (char **)0; + static int match_list_index = 0; + static int match_list_size = 0; + static int orig_start, orig_end; + static char quote_char; + static int delimiter; + + /* The first time through, we generate the list of matches and set things + up to insert them. */ + if (rl_last_func != rl_old_menu_complete) + { + /* Clean up from previous call, if any. */ + FREE (orig_text); + if (matches) + _rl_free_match_list (matches); + + match_list_index = match_list_size = 0; + matches = (char **)NULL; + + rl_completion_invoking_key = invoking_key; + + RL_SETSTATE(RL_STATE_COMPLETING); + + /* Only the completion entry function can change these. */ + set_completion_defaults ('%'); + + our_func = rl_menu_completion_entry_function; + if (our_func == 0) + our_func = rl_completion_entry_function + ? rl_completion_entry_function + : rl_filename_completion_function; + + /* We now look backwards for the start of a filename/variable word. */ + orig_end = rl_point; + found_quote = delimiter = 0; + quote_char = '\0'; + + if (rl_point) + /* This (possibly) changes rl_point. If it returns a non-zero char, + we know we have an open quote. */ + quote_char = _rl_find_completion_word (&found_quote, &delimiter); + + orig_start = rl_point; + rl_point = orig_end; + + orig_text = rl_copy_text (orig_start, orig_end); + matches = gen_completion_matches (orig_text, orig_start, orig_end, + our_func, found_quote, quote_char); + + /* If we are matching filenames, the attempted completion function will + have set rl_filename_completion_desired to a non-zero value. The basic + rl_filename_completion_function does this. */ + matching_filenames = rl_filename_completion_desired; + + if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) + { + rl_ding (); + FREE (matches); + matches = (char **)0; + FREE (orig_text); + orig_text = (char *)0; + completion_changed_buffer = 0; + RL_UNSETSTATE(RL_STATE_COMPLETING); + return (0); + } + + RL_UNSETSTATE(RL_STATE_COMPLETING); + + for (match_list_size = 0; matches[match_list_size]; match_list_size++) + ; + /* matches[0] is lcd if match_list_size > 1, but the circular buffer + code below should take care of it. */ + + if (match_list_size > 1 && _rl_complete_show_all) + display_matches (matches); + } + + /* Now we have the list of matches. Replace the text between + rl_line_buffer[orig_start] and rl_line_buffer[rl_point] with + matches[match_list_index], and add any necessary closing char. */ + + if (matches == 0 || match_list_size == 0) + { + rl_ding (); + FREE (matches); + matches = (char **)0; + completion_changed_buffer = 0; + return (0); + } + + match_list_index += count; + if (match_list_index < 0) + { + while (match_list_index < 0) + match_list_index += match_list_size; + } + else + match_list_index %= match_list_size; + + if (match_list_index == 0 && match_list_size > 1) + { + rl_ding (); + insert_match (orig_text, orig_start, MULT_MATCH, "e_char); + } + else + { + insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); + append_to_match (matches[match_list_index], delimiter, quote_char, + compare_match (orig_text, matches[match_list_index])); + } + + completion_changed_buffer = 1; + return (0); +} + +/* The current version of menu completion. + The differences between this function and the original are: + +1. It honors the maximum number of completions variable (completion-query-items) +2. It appends to the word as usual if there is only one match +3. It displays the common prefix if there is one, and makes it the first menu + choice if the menu-complete-display-prefix option is enabled +*/ + +int +rl_menu_complete (int count, int ignore) +{ + rl_compentry_func_t *our_func; + int matching_filenames, found_quote; + + static char *orig_text; + static char **matches = (char **)0; + static int match_list_index = 0; + static int match_list_size = 0; + static int nontrivial_lcd = 0; + static int full_completion = 0; /* set to 1 if menu completion should reinitialize on next call */ + static int orig_start, orig_end; + static char quote_char; + static int delimiter, cstate; + + /* The first time through, we generate the list of matches and set things + up to insert them. */ + if ((rl_last_func != rl_menu_complete && rl_last_func != rl_backward_menu_complete) || full_completion) + { + /* Clean up from previous call, if any. */ + FREE (orig_text); + if (matches) + _rl_free_match_list (matches); + + match_list_index = match_list_size = 0; + matches = (char **)NULL; + + full_completion = 0; + + RL_SETSTATE(RL_STATE_COMPLETING); + + /* Only the completion entry function can change these. */ + set_completion_defaults ('%'); + + our_func = rl_menu_completion_entry_function; + if (our_func == 0) + our_func = rl_completion_entry_function + ? rl_completion_entry_function + : rl_filename_completion_function; + + /* We now look backwards for the start of a filename/variable word. */ + orig_end = rl_point; + found_quote = delimiter = 0; + quote_char = '\0'; + + if (rl_point) + /* This (possibly) changes rl_point. If it returns a non-zero char, + we know we have an open quote. */ + quote_char = _rl_find_completion_word (&found_quote, &delimiter); + + orig_start = rl_point; + rl_point = orig_end; + + orig_text = rl_copy_text (orig_start, orig_end); + matches = gen_completion_matches (orig_text, orig_start, orig_end, + our_func, found_quote, quote_char); + + nontrivial_lcd = matches && compare_match (orig_text, matches[0]) != 0; + + /* If we are matching filenames, the attempted completion function will + have set rl_filename_completion_desired to a non-zero value. The basic + rl_filename_completion_function does this. */ + matching_filenames = rl_filename_completion_desired; + + if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) + { + rl_ding (); + FREE (matches); + matches = (char **)0; + FREE (orig_text); + orig_text = (char *)0; + completion_changed_buffer = 0; + RL_UNSETSTATE(RL_STATE_COMPLETING); + return (0); + } + + RL_UNSETSTATE(RL_STATE_COMPLETING); + + for (match_list_size = 0; matches[match_list_size]; match_list_size++) + ; + + if (match_list_size == 0) + { + rl_ding (); + FREE (matches); + matches = (char **)0; + match_list_index = 0; + completion_changed_buffer = 0; + return (0); + } + + /* matches[0] is lcd if match_list_size > 1, but the circular buffer + code below should take care of it. */ + if (*matches[0]) + { + insert_match (matches[0], orig_start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); + orig_end = orig_start + strlen (matches[0]); + completion_changed_buffer = STREQ (orig_text, matches[0]) == 0; + } + + if (match_list_size > 1 && _rl_complete_show_all) + { + display_matches (matches); + /* If there are so many matches that the user has to be asked + whether or not he wants to see the matches, menu completion + is unwieldy. */ + if (rl_completion_query_items > 0 && match_list_size >= rl_completion_query_items) + { + rl_ding (); + FREE (matches); + matches = (char **)0; + full_completion = 1; + return (0); + } + else if (_rl_menu_complete_prefix_first) + { + rl_ding (); + return (0); + } + } + else if (match_list_size <= 1) + { + append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd); + full_completion = 1; + return (0); + } + else if (_rl_menu_complete_prefix_first && match_list_size > 1) + { + rl_ding (); + return (0); + } + } + + /* Now we have the list of matches. Replace the text between + rl_line_buffer[orig_start] and rl_line_buffer[rl_point] with + matches[match_list_index], and add any necessary closing char. */ + + if (matches == 0 || match_list_size == 0) + { + rl_ding (); + FREE (matches); + matches = (char **)0; + completion_changed_buffer = 0; + return (0); + } + + match_list_index += count; + if (match_list_index < 0) + { + while (match_list_index < 0) + match_list_index += match_list_size; + } + else + match_list_index %= match_list_size; + + if (match_list_index == 0 && match_list_size > 1) + { + rl_ding (); + insert_match (matches[0], orig_start, MULT_MATCH, "e_char); + } + else + { + insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); + append_to_match (matches[match_list_index], delimiter, quote_char, + compare_match (orig_text, matches[match_list_index])); + } + + completion_changed_buffer = 1; + return (0); +} + +int +rl_backward_menu_complete (int count, int key) +{ + /* Positive arguments to backward-menu-complete translate into negative + arguments for menu-complete, and vice versa. */ + return (rl_menu_complete (-count, key)); +} diff --git a/bash-5.1/lib/readline/display.c b/bash-5.1/lib/readline/display.c new file mode 100644 index 0000000000000000000000000000000000000000..38b3d0e761369b3c7c71721c733af64805a72bb2 --- /dev/null +++ b/bash-5.1/lib/readline/display.c @@ -0,0 +1,3557 @@ +/* display.c -- readline redisplay facility. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#include "posixstat.h" + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include + +#ifdef __MSDOS__ +# include +#endif + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +/* Termcap library stuff. */ +#include "tcap.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +#if !defined (strchr) && !defined (__STDC__) +extern char *strchr (), *strrchr (); +#endif /* !strchr && !__STDC__ */ + +static void putc_face PARAMS((int, int, char *)); +static void puts_face PARAMS((const char *, const char *, int)); +static void norm_face PARAMS((char *, int)); + +static void update_line PARAMS((char *, char *, char *, char *, int, int, int, int)); +static void space_to_eol PARAMS((int)); +static void delete_chars PARAMS((int)); +static void insert_some_chars PARAMS((char *, int, int)); +static void open_some_spaces PARAMS((int)); +static void cr PARAMS((void)); +static void redraw_prompt PARAMS((char *)); +static void _rl_move_cursor_relative PARAMS((int, const char *, const char *)); + +/* Values for FLAGS */ +#define PMT_MULTILINE 0x01 + +static char *expand_prompt PARAMS((char *, int, int *, int *, int *, int *)); + +#define DEFAULT_LINE_BUFFER_SIZE 1024 + +/* State of visible and invisible lines. */ +struct line_state + { + char *line; + char *lface; + int *lbreaks; + int lbsize; +#if defined (HANDLE_MULTIBYTE) + int wbsize; + int *wrapped_line; +#endif + }; + +/* The line display buffers. One is the line currently displayed on + the screen. The other is the line about to be displayed. */ +static struct line_state line_state_array[2]; +static struct line_state *line_state_visible = &line_state_array[0]; +static struct line_state *line_state_invisible = &line_state_array[1]; +static int line_structures_initialized = 0; + +/* Backwards-compatible names. */ +#define inv_lbreaks (line_state_invisible->lbreaks) +#define inv_lbsize (line_state_invisible->lbsize) +#define vis_lbreaks (line_state_visible->lbreaks) +#define vis_lbsize (line_state_visible->lbsize) + +#define visible_line (line_state_visible->line) +#define vis_face (line_state_visible->lface) +#define invisible_line (line_state_invisible->line) +#define inv_face (line_state_invisible->lface) + +#if defined (HANDLE_MULTIBYTE) +static int _rl_col_width PARAMS((const char *, int, int, int)); +#else +# define _rl_col_width(l, s, e, f) (((e) <= (s)) ? 0 : (e) - (s)) +#endif + +/* Heuristic used to decide whether it is faster to move from CUR to NEW + by backing up or outputting a carriage return and moving forward. CUR + and NEW are either both buffer positions or absolute screen positions. */ +#define CR_FASTER(new, cur) (((new) + 1) < ((cur) - (new))) + +/* _rl_last_c_pos is an absolute cursor position in multibyte locales and a + buffer index in others. This macro is used when deciding whether the + current cursor position is in the middle of a prompt string containing + invisible characters. XXX - might need to take `modmark' into account. */ +/* XXX - only valid when tested against _rl_last_c_pos; buffer indices need + to use prompt_last_invisible directly. */ +#define PROMPT_ENDING_INDEX \ + ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) ? prompt_physical_chars : prompt_last_invisible+1) + +#define FACE_NORMAL '0' +#define FACE_STANDOUT '1' +#define FACE_INVALID ((char)1) + +/* **************************************************************** */ +/* */ +/* Display stuff */ +/* */ +/* **************************************************************** */ + +/* This is the stuff that is hard for me. I never seem to write good + display routines in C. Let's see how I do this time. */ + +/* (PWP) Well... Good for a simple line updater, but totally ignores + the problems of input lines longer than the screen width. + + update_line and the code that calls it makes a multiple line, + automatically wrapping line update. Careful attention needs + to be paid to the vertical position variables. */ + +/* Keep two buffers; one which reflects the current contents of the + screen, and the other to draw what we think the new contents should + be. Then compare the buffers, and make whatever changes to the + screen itself that we should. Finally, make the buffer that we + just drew into be the one which reflects the current contents of the + screen, and place the cursor where it belongs. + + Commands that want to can fix the display themselves, and then let + this function know that the display has been fixed by setting the + RL_DISPLAY_FIXED variable. This is good for efficiency. */ + +/* Application-specific redisplay function. */ +rl_voidfunc_t *rl_redisplay_function = rl_redisplay; + +/* Global variables declared here. */ +/* What YOU turn on when you have handled all redisplay yourself. */ +int rl_display_fixed = 0; + +/* The stuff that gets printed out before the actual text of the line. + This is usually pointing to rl_prompt. */ +char *rl_display_prompt = (char *)NULL; + +/* Variables used to include the editing mode in the prompt. */ +char *_rl_emacs_mode_str; +int _rl_emacs_modestr_len; + +char *_rl_vi_ins_mode_str; +int _rl_vi_ins_modestr_len; + +char *_rl_vi_cmd_mode_str; +int _rl_vi_cmd_modestr_len; + +/* Pseudo-global variables declared here. */ + +/* Hints for other parts of readline to give to the display engine. */ +int _rl_suppress_redisplay = 0; +int _rl_want_redisplay = 0; + +/* The visible cursor position. If you print some text, adjust this. */ +/* NOTE: _rl_last_c_pos is used as a buffer index when not in a locale + supporting multibyte characters, and an absolute cursor position when + in such a locale. This is an artifact of the donated multibyte support. + Care must be taken when modifying its value. */ +int _rl_last_c_pos = 0; +int _rl_last_v_pos = 0; + +/* Number of physical lines consumed by the current line buffer currently + on screen minus 1. */ +int _rl_vis_botlin = 0; + +static int _rl_quick_redisplay = 0; + +/* This is a hint update_line gives to rl_redisplay that it has adjusted the + value of _rl_last_c_pos *and* taken the presence of any invisible chars in + the prompt into account. rl_redisplay notes this and does not do the + adjustment itself. */ +static int cpos_adjusted; + +/* The index into the line buffer corresponding to the cursor position */ +static int cpos_buffer_position; + +/* A flag to note when we're displaying the first line of the prompt */ +static int displaying_prompt_first_line; +/* The number of multibyte characters in the prompt, if any */ +static int prompt_multibyte_chars; + +static int _rl_inv_botlin = 0; + +/* Variables used only in this file. */ +/* The last left edge of text that was displayed. This is used when + doing horizontal scrolling. It shifts in thirds of a screenwidth. */ +static int last_lmargin; + +/* A buffer for `modeline' messages. */ +static char *msg_buf = 0; +static int msg_bufsiz = 0; + +/* Non-zero forces the redisplay even if we thought it was unnecessary. */ +static int forced_display; + +/* Default and initial buffer size. Can grow. */ +static int line_size = 0; + +/* Set to a non-zero value if horizontal scrolling has been enabled + automatically because the terminal was resized to height 1. */ +static int horizontal_scrolling_autoset = 0; /* explicit initialization */ + +/* Variables to keep track of the expanded prompt string, which may + include invisible characters. */ + +static char *local_prompt, *local_prompt_prefix; +static int local_prompt_len; +static int prompt_prefix_length; +/* Number of chars in the buffer that contribute to visible chars on the screen. + This might be different from the number of physical chars in the presence + of multibyte characters */ +static int prompt_visible_length; + +/* The number of invisible characters in the line currently being + displayed on the screen. */ +static int visible_wrap_offset; + +/* The number of invisible characters in the prompt string. Static so it + can be shared between rl_redisplay and update_line */ +static int wrap_offset; + +/* The index of the last invisible character in the prompt string. */ +static int prompt_last_invisible; + +/* The length (buffer offset) of the first line of the last (possibly + multi-line) buffer displayed on the screen. */ +static int visible_first_line_len; + +/* Number of invisible characters on the first physical line of the prompt. + Only valid when the number of physical characters in the prompt exceeds + (or is equal to) _rl_screenwidth. */ +static int prompt_invis_chars_first_line; + +static int prompt_last_screen_line; + +static int prompt_physical_chars; + +/* An array of indexes into the prompt string where we will break physical + screen lines. It's easier to compute in expand_prompt and use later in + rl_redisplay instead of having rl_redisplay try to guess about invisible + characters in the prompt or use heuristics about where they are. */ +static int *local_prompt_newlines; + +/* set to a non-zero value by rl_redisplay if we are marking modified history + lines and the current line is so marked. */ +static int modmark; + +static int line_totbytes; + +/* Variables to save and restore prompt and display information. */ + +/* These are getting numerous enough that it's time to create a struct. */ + +static char *saved_local_prompt; +static char *saved_local_prefix; +static int *saved_local_prompt_newlines; + +static int saved_last_invisible; +static int saved_visible_length; +static int saved_prefix_length; +static int saved_local_length; +static int saved_invis_chars_first_line; +static int saved_physical_chars; + +/* Return a string indicating the editing mode, for use in the prompt. */ + +static char * +prompt_modestr (int *lenp) +{ + if (rl_editing_mode == emacs_mode) + { + if (lenp) + *lenp = _rl_emacs_mode_str ? _rl_emacs_modestr_len : RL_EMACS_MODESTR_DEFLEN; + return _rl_emacs_mode_str ? _rl_emacs_mode_str : RL_EMACS_MODESTR_DEFAULT; + } + else if (_rl_keymap == vi_insertion_keymap) + { + if (lenp) + *lenp = _rl_vi_ins_mode_str ? _rl_vi_ins_modestr_len : RL_VI_INS_MODESTR_DEFLEN; + return _rl_vi_ins_mode_str ? _rl_vi_ins_mode_str : RL_VI_INS_MODESTR_DEFAULT; /* vi insert mode */ + } + else + { + if (lenp) + *lenp = _rl_vi_cmd_mode_str ? _rl_vi_cmd_modestr_len : RL_VI_CMD_MODESTR_DEFLEN; + return _rl_vi_cmd_mode_str ? _rl_vi_cmd_mode_str : RL_VI_CMD_MODESTR_DEFAULT; /* vi command mode */ + } +} + +/* Expand the prompt string S and return the number of visible + characters in *LP, if LP is not null. This is currently more-or-less + a placeholder for expansion. LIP, if non-null is a place to store the + index of the last invisible character in the returned string. NIFLP, + if non-zero, is a place to store the number of invisible characters in + the first prompt line. The previous are used as byte counts -- indexes + into a character buffer. *VLP gets the number of physical characters in + the expanded prompt (visible length) */ + +/* Current implementation: + \001 (^A) start non-visible characters + \002 (^B) end non-visible characters + all characters except \001 and \002 (following a \001) are copied to + the returned string; all characters except those between \001 and + \002 are assumed to be `visible'. */ + +/* Possible values for FLAGS: + PMT_MULTILINE caller indicates that this is part of a multiline prompt +*/ + +/* This approximates the number of lines the prompt will take when displayed */ +#define APPROX_DIV(n, d) (((n) < (d)) ? 1 : ((n) / (d)) + 1) + +static char * +expand_prompt (char *pmt, int flags, int *lp, int *lip, int *niflp, int *vlp) +{ + char *r, *ret, *p, *igstart, *nprompt, *ms; + int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars; + int mlen, newlines, newlines_guess, bound; + int mb_cur_max; + + /* We only expand the mode string for the last line of a multiline prompt + (a prompt with embedded newlines). */ + ms = (((pmt == rl_prompt) ^ (flags & PMT_MULTILINE)) && _rl_show_mode_in_prompt) ? prompt_modestr (&mlen) : 0; + if (ms) + { + l = strlen (pmt); + nprompt = (char *)xmalloc (l + mlen + 1); + memcpy (nprompt, ms, mlen); + strcpy (nprompt + mlen, pmt); + } + else + nprompt = pmt; + + mb_cur_max = MB_CUR_MAX; + + if (_rl_screenwidth == 0) + _rl_get_screen_size (0, 0); /* avoid division by zero */ + + /* Short-circuit if we can. We can do this if we are treating the prompt as + a sequence of bytes and there are no invisible characters in the prompt + to deal with. Since we populate local_prompt_newlines, we have to run + through the rest of the function if this prompt looks like it's going to + be longer than one screen line. */ + if ((mb_cur_max <= 1 || rl_byte_oriented) && strchr (nprompt, RL_PROMPT_START_IGNORE) == 0) + { + l = strlen (nprompt); + if (l < (_rl_screenwidth > 0 ? _rl_screenwidth : 80)) + { + r = (nprompt == pmt) ? savestring (pmt) : nprompt; + if (lp) + *lp = l; + if (lip) + *lip = 0; + if (niflp) + *niflp = 0; + if (vlp) + *vlp = l; + + local_prompt_newlines = (int *) xrealloc (local_prompt_newlines, sizeof (int) * 2); + local_prompt_newlines[0] = 0; + local_prompt_newlines[1] = -1; + + return r; + } + } + + l = strlen (nprompt); /* XXX */ + r = ret = (char *)xmalloc (l + 1); + + /* Guess at how many screen lines the prompt will take to size the array that + keeps track of where the line wraps happen */ + newlines_guess = (_rl_screenwidth > 0) ? APPROX_DIV(l, _rl_screenwidth) : APPROX_DIV(l, 80); + local_prompt_newlines = (int *) xrealloc (local_prompt_newlines, sizeof (int) * (newlines_guess + 1)); + local_prompt_newlines[newlines = 0] = 0; + for (rl = 1; rl <= newlines_guess; rl++) + local_prompt_newlines[rl] = -1; + + rl = physchars = 0; /* mode string now part of nprompt */ + invfl = 0; /* invisible chars in first line of prompt */ + invflset = 0; /* we only want to set invfl once */ + igstart = 0; /* we're not ignoring any characters yet */ + + for (ignoring = last = ninvis = 0, p = nprompt; p && *p; p++) + { + /* This code strips the invisible character string markers + RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */ + if (ignoring == 0 && *p == RL_PROMPT_START_IGNORE) /* XXX - check ignoring? */ + { + ignoring = 1; + igstart = p; + continue; + } + else if (ignoring && *p == RL_PROMPT_END_IGNORE) + { + ignoring = 0; + if (p != (igstart + 1)) + last = r - ret - 1; + continue; + } + else + { +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + pind = p - nprompt; + ind = _rl_find_next_mbchar (nprompt, pind, 1, MB_FIND_NONZERO); + l = ind - pind; + while (l--) + *r++ = *p++; + if (!ignoring) + { + /* rl ends up being assigned to prompt_visible_length, + which is the number of characters in the buffer that + contribute to characters on the screen, which might + not be the same as the number of physical characters + on the screen in the presence of multibyte characters */ + rl += ind - pind; + physchars += _rl_col_width (nprompt, pind, ind, 0); + } + else + ninvis += ind - pind; + p--; /* compensate for later increment */ + } + else +#endif + { + *r++ = *p; + if (!ignoring) + { + rl++; /* visible length byte counter */ + physchars++; + } + else + ninvis++; /* invisible chars byte counter */ + } + + if (invflset == 0 && physchars >= _rl_screenwidth) + { + invfl = ninvis; + invflset = 1; + } + + if (physchars >= (bound = (newlines + 1) * _rl_screenwidth) && local_prompt_newlines[newlines+1] == -1) + { + int new; + if (physchars > bound) /* should rarely happen */ + { +#if defined (HANDLE_MULTIBYTE) + *r = '\0'; /* need null-termination for strlen */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + new = _rl_find_prev_mbchar (ret, r - ret, MB_FIND_ANY); + else +#endif + new = r - ret - (physchars - bound); /* XXX */ + } + else + new = r - ret; + local_prompt_newlines[++newlines] = new; + } + } + } + + if (rl < _rl_screenwidth) + invfl = ninvis; + + *r = '\0'; + if (lp) + *lp = rl; + if (lip) + *lip = last; + if (niflp) + *niflp = invfl; + if (vlp) + *vlp = physchars; + + if (nprompt != pmt) + free (nprompt); + + return ret; +} + +/* Just strip out RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE from + PMT and return the rest of PMT. */ +char * +_rl_strip_prompt (char *pmt) +{ + char *ret; + + ret = expand_prompt (pmt, 0, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL); + return ret; +} + +void +_rl_reset_prompt (void) +{ + rl_visible_prompt_length = rl_expand_prompt (rl_prompt); +} + +/* + * Expand the prompt string into the various display components, if + * necessary. + * + * local_prompt = expanded last line of string in rl_display_prompt + * (portion after the final newline) + * local_prompt_prefix = portion before last newline of rl_display_prompt, + * expanded via expand_prompt + * prompt_visible_length = number of visible characters in local_prompt + * prompt_prefix_length = number of visible characters in local_prompt_prefix + * + * It also tries to keep track of the number of invisible characters in the + * prompt string, and where they are. + * + * This function is called once per call to readline(). It may also be + * called arbitrarily to expand the primary prompt. + * + * The return value is the number of visible characters on the last line + * of the (possibly multi-line) prompt. In this case, multi-line means + * there are embedded newlines in the prompt string itself, not that the + * number of physical characters exceeds the screen width and the prompt + * wraps. + */ +int +rl_expand_prompt (char *prompt) +{ + char *p, *t; + int c; + + /* Clear out any saved values. */ + FREE (local_prompt); + FREE (local_prompt_prefix); + + local_prompt = local_prompt_prefix = (char *)0; + local_prompt_len = 0; + prompt_last_invisible = prompt_invis_chars_first_line = 0; + prompt_visible_length = prompt_physical_chars = 0; + + if (prompt == 0 || *prompt == 0) + return (0); + + p = strrchr (prompt, '\n'); + if (p == 0) + { + /* The prompt is only one logical line, though it might wrap. */ + local_prompt = expand_prompt (prompt, 0, &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line, + &prompt_physical_chars); + local_prompt_prefix = (char *)0; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; + return (prompt_visible_length); + } + else + { + /* The prompt spans multiple lines. */ + t = ++p; + c = *t; *t = '\0'; + /* The portion of the prompt string up to and including the + final newline is now null-terminated. */ + local_prompt_prefix = expand_prompt (prompt, PMT_MULTILINE, + &prompt_prefix_length, + (int *)NULL, + (int *)NULL, + (int *)NULL); + *t = c; + + local_prompt = expand_prompt (p, PMT_MULTILINE, + &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line, + &prompt_physical_chars); + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; + return (prompt_prefix_length); + } +} + +/* Allocate the various line structures, making sure they can hold MINSIZE + bytes. If the existing line size can accommodate MINSIZE bytes, don't do + anything. */ +static void +realloc_line (int minsize) +{ + int minimum_size; + int newsize, delta; + + minimum_size = DEFAULT_LINE_BUFFER_SIZE; + if (minsize < minimum_size) + minsize = minimum_size; + if (minsize <= _rl_screenwidth) /* XXX - for gdb */ + minsize = _rl_screenwidth + 1; + if (line_size >= minsize) + return; + + newsize = minimum_size; + while (newsize < minsize) + newsize *= 2; + + visible_line = (char *)xrealloc (visible_line, newsize); + vis_face = (char *)xrealloc (vis_face, newsize); + + invisible_line = (char *)xrealloc (invisible_line, newsize); + inv_face = (char *)xrealloc (inv_face, newsize); + + delta = newsize - line_size; + memset (visible_line + line_size, 0, delta); + memset (vis_face + line_size, FACE_NORMAL, delta); + memset (invisible_line + line_size, 1, delta); + memset (inv_face + line_size, FACE_INVALID, delta); + + line_size = newsize; +} + +/* Initialize the VISIBLE_LINE and INVISIBLE_LINE arrays, and their associated + arrays of line break markers. MINSIZE is the minimum size of VISIBLE_LINE + and INVISIBLE_LINE; if it is greater than LINE_SIZE, LINE_SIZE is + increased. If the lines have already been allocated, this ensures that + they can hold at least MINSIZE characters. */ +static void +init_line_structures (int minsize) +{ + if (invisible_line == 0) /* initialize it */ + { + if (line_size > minsize) + minsize = line_size; + } + realloc_line (minsize); + + if (vis_lbreaks == 0) + { + /* should be enough. */ + inv_lbsize = vis_lbsize = 256; + +#if defined (HANDLE_MULTIBYTE) + line_state_visible->wbsize = vis_lbsize; + line_state_visible->wrapped_line = (int *)xmalloc (line_state_visible->wbsize * sizeof (int)); + + line_state_invisible->wbsize = inv_lbsize; + line_state_invisible->wrapped_line = (int *)xmalloc (line_state_invisible->wbsize * sizeof (int)); +#endif + + inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int)); + vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int)); + inv_lbreaks[0] = vis_lbreaks[0] = 0; + } + + line_structures_initialized = 1; +} + +/* Convenience functions to add chars to the invisible line that update the + face information at the same time. */ +static void /* XXX - change this */ +invis_addc (int *outp, char c, char face) +{ + realloc_line (*outp + 1); + invisible_line[*outp] = c; + inv_face[*outp] = face; + *outp += 1; +} + +static void +invis_adds (int *outp, const char *str, int n, char face) +{ + int i; + + for (i = 0; i < n; i++) + invis_addc (outp, str[i], face); +} + +static void +invis_nul (int *outp) +{ + invis_addc (outp, '\0', 0); + *outp -= 1; +} + +static void +set_active_region (int *beg, int *end) +{ + if (rl_point >= 0 && rl_point <= rl_end && rl_mark >= 0 && rl_mark <= rl_end) + { + *beg = (rl_mark < rl_point) ? rl_mark : rl_point; + *end = (rl_mark < rl_point) ? rl_point : rl_mark; + } +} + +/* Do whatever tests are necessary and tell update_line that it can do a + quick, dumb redisplay on the assumption that there are so many + differences between the old and new lines that it would be a waste to + compute all the differences. + Right now, it just sets _rl_quick_redisplay if the current visible line + is a single line (so we don't have to move vertically or mess with line + wrapping). */ +void +_rl_optimize_redisplay (void) +{ + if (_rl_vis_botlin == 0) + _rl_quick_redisplay = 1; +} + +/* Basic redisplay algorithm. See comments inline. */ +void +rl_redisplay (void) +{ + int in, out, c, linenum, cursor_linenum; + int inv_botlin, lb_botlin, lb_linenum, o_cpos; + int newlines, lpos, temp, n0, num, prompt_lines_estimate; + char *prompt_this_line; + char cur_face; + int hl_begin, hl_end; + int mb_cur_max = MB_CUR_MAX; +#if defined (HANDLE_MULTIBYTE) + wchar_t wc; + size_t wc_bytes; + int wc_width; + mbstate_t ps; + int _rl_wrapped_multicolumn = 0; +#endif + + if (_rl_echoing_p == 0) + return; + + /* Block keyboard interrupts because this function manipulates global + data structures. */ + _rl_block_sigint (); + RL_SETSTATE (RL_STATE_REDISPLAYING); + + cur_face = FACE_NORMAL; + /* Can turn this into an array for multiple highlighted objects in addition + to the region */ + hl_begin = hl_end = -1; + + if (rl_mark_active_p ()) + set_active_region (&hl_begin, &hl_end); + + if (!rl_display_prompt) + rl_display_prompt = ""; + + if (line_structures_initialized == 0) + { + init_line_structures (0); + rl_on_new_line (); + } + else if (line_size <= _rl_screenwidth) + init_line_structures (_rl_screenwidth + 1); + + /* Enable horizontal scrolling automatically for terminals of height 1 + where wrapping lines doesn't work. Disable it as soon as the terminal + height is increased again if it was automatically enabled. */ + if (_rl_screenheight <= 1) + { + if (_rl_horizontal_scroll_mode == 0) + horizontal_scrolling_autoset = 1; + _rl_horizontal_scroll_mode = 1; + } + else if (horizontal_scrolling_autoset) + _rl_horizontal_scroll_mode = 0; + + /* Draw the line into the buffer. */ + cpos_buffer_position = -1; + + prompt_multibyte_chars = prompt_visible_length - prompt_physical_chars; + + out = inv_botlin = 0; + + /* Mark the line as modified or not. We only do this for history + lines. */ + modmark = 0; + if (_rl_mark_modified_lines && current_history () && rl_undo_list) + { + invis_addc (&out, '*', cur_face); + invis_nul (&out); + modmark = 1; + } + + /* If someone thought that the redisplay was handled, but the currently + visible line has a different modification state than the one about + to become visible, then correct the caller's misconception. */ + if (visible_line[0] != invisible_line[0]) + rl_display_fixed = 0; + + /* If the prompt to be displayed is the `primary' readline prompt (the + one passed to readline()), use the values we have already expanded. + If not, use what's already in rl_display_prompt. WRAP_OFFSET is the + number of non-visible characters (bytes) in the prompt string. */ + /* This is where we output the characters in the prompt before the last + newline, if any. If there aren't any embedded newlines, we don't + write anything. Copy the last line of the prompt string into the line in + any case */ + if (rl_display_prompt == rl_prompt || local_prompt) + { + if (local_prompt_prefix && forced_display) + _rl_output_some_chars (local_prompt_prefix, strlen (local_prompt_prefix)); + + if (local_prompt_len > 0) + invis_adds (&out, local_prompt, local_prompt_len, cur_face); + invis_nul (&out); + wrap_offset = local_prompt_len - prompt_visible_length; + } + else + { + int pmtlen; + prompt_this_line = strrchr (rl_display_prompt, '\n'); + if (!prompt_this_line) + prompt_this_line = rl_display_prompt; + else + { + prompt_this_line++; + pmtlen = prompt_this_line - rl_display_prompt; /* temp var */ + if (forced_display) + { + _rl_output_some_chars (rl_display_prompt, pmtlen); + /* Make sure we are at column zero even after a newline, + regardless of the state of terminal output processing. */ + if (pmtlen < 2 || prompt_this_line[-2] != '\r') + cr (); + } + } + + prompt_physical_chars = pmtlen = strlen (prompt_this_line); /* XXX */ + invis_adds (&out, prompt_this_line, pmtlen, cur_face); + invis_nul (&out); + wrap_offset = prompt_invis_chars_first_line = 0; + } + +#if defined (HANDLE_MULTIBYTE) +#define CHECK_INV_LBREAKS() \ + do { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + } \ + if (newlines >= (line_state_invisible->wbsize - 2)) \ + { \ + line_state_invisible->wbsize *= 2; \ + line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, line_state_invisible->wbsize * sizeof(int)); \ + } \ + } while (0) +#else +#define CHECK_INV_LBREAKS() \ + do { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + } \ + } while (0) +#endif /* !HANDLE_MULTIBYTE */ + +#if defined (HANDLE_MULTIBYTE) +#define CHECK_LPOS() \ + do { \ + lpos++; \ + if (lpos >= _rl_screenwidth) \ + { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + } \ + inv_lbreaks[++newlines] = out; \ + if (newlines >= (line_state_invisible->wbsize - 2)) \ + { \ + line_state_invisible->wbsize *= 2; \ + line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, line_state_invisible->wbsize * sizeof(int)); \ + } \ + line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; \ + lpos = 0; \ + } \ + } while (0) +#else +#define CHECK_LPOS() \ + do { \ + lpos++; \ + if (lpos >= _rl_screenwidth) \ + { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + } \ + inv_lbreaks[++newlines] = out; \ + lpos = 0; \ + } \ + } while (0) +#endif + + /* inv_lbreaks[i] is where line i starts in the buffer. */ + inv_lbreaks[newlines = 0] = 0; + /* lpos is a physical cursor position, so it needs to be adjusted by the + number of invisible characters in the prompt, per line. We compute + the line breaks in the prompt string in expand_prompt, taking invisible + characters into account, and if lpos exceeds the screen width, we copy + the data in the loop below. */ + lpos = prompt_physical_chars + modmark; + +#if defined (HANDLE_MULTIBYTE) + memset (line_state_invisible->wrapped_line, 0, line_state_invisible->wbsize * sizeof (int)); + num = 0; +#endif + + /* prompt_invis_chars_first_line is the number of invisible characters (bytes) + in the first physical line of the prompt. + wrap_offset - prompt_invis_chars_first_line is usually the number of + invis chars on the second (or, more generally, last) line. */ + + /* This is zero-based, used to set the newlines */ + prompt_lines_estimate = lpos / _rl_screenwidth; + + /* what if lpos is already >= _rl_screenwidth before we start drawing the + contents of the command line? */ + if (lpos >= _rl_screenwidth) + { + temp = 0; + + /* first copy the linebreaks array we computed in expand_prompt */ + while (local_prompt_newlines[newlines+1] != -1) + { + temp = local_prompt_newlines[newlines+1]; + inv_lbreaks[++newlines] = temp; + } + + /* Now set lpos from the last newline */ + if (mb_cur_max > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0) + lpos = _rl_col_width (local_prompt, temp, local_prompt_len, 1) - (wrap_offset - prompt_invis_chars_first_line); + else + lpos -= (_rl_screenwidth * newlines); + } + + prompt_last_screen_line = newlines; + + /* Draw the rest of the line (after the prompt) into invisible_line, keeping + track of where the cursor is (cpos_buffer_position), the number of the + line containing the cursor (lb_linenum), the last line number (lb_botlin + and inv_botlin). + It maintains an array of line breaks for display (inv_lbreaks). + This handles expanding tabs for display and displaying meta characters. */ + lb_linenum = 0; +#if defined (HANDLE_MULTIBYTE) + in = 0; + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_utf8locale && UTF8_SINGLEBYTE(rl_line_buffer[0])) + { + wc = (wchar_t)rl_line_buffer[0]; + wc_bytes = 1; + } + else + wc_bytes = mbrtowc (&wc, rl_line_buffer, rl_end, &ps); + } + else + wc_bytes = 1; + while (in < rl_end) +#else + for (in = 0; in < rl_end; in++) +#endif + { + if (in == hl_begin) + cur_face = FACE_STANDOUT; + else if (in == hl_end) + cur_face = FACE_NORMAL; + + c = (unsigned char)rl_line_buffer[in]; + +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + if (MB_INVALIDCH (wc_bytes)) + { + /* Byte sequence is invalid or shortened. Assume that the + first byte represents a character. */ + wc_bytes = 1; + /* Assume that a character occupies a single column. */ + wc_width = 1; + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (MB_NULLWCH (wc_bytes)) + break; /* Found '\0' */ + else + { + temp = WCWIDTH (wc); + wc_width = (temp >= 0) ? temp : 1; + } + } +#endif + + if (in == rl_point) + { + cpos_buffer_position = out; + lb_linenum = newlines; + } + +#if defined (HANDLE_MULTIBYTE) + if (META_CHAR (c) && _rl_output_meta_chars == 0) /* XXX - clean up */ +#else + if (META_CHAR (c)) +#endif + { + if (_rl_output_meta_chars == 0) + { + char obuf[5]; + int olen; + + olen = sprintf (obuf, "\\%o", c); + + if (lpos + olen >= _rl_screenwidth) + { + temp = _rl_screenwidth - lpos; + CHECK_INV_LBREAKS (); + inv_lbreaks[++newlines] = out + temp; +#if defined (HANDLE_MULTIBYTE) + line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; +#endif + lpos = olen - temp; + } + else + lpos += olen; + + for (temp = 0; temp < olen; temp++) + { + invis_addc (&out, obuf[temp], cur_face); + CHECK_LPOS (); + } + } + else + { + invis_addc (&out, c, cur_face); + CHECK_LPOS(); + } + } +#if defined (DISPLAY_TABS) + else if (c == '\t') + { + register int newout; + + newout = out + 8 - lpos % 8; + temp = newout - out; + if (lpos + temp >= _rl_screenwidth) + { + register int temp2; + temp2 = _rl_screenwidth - lpos; + CHECK_INV_LBREAKS (); + inv_lbreaks[++newlines] = out + temp2; +#if defined (HANDLE_MULTIBYTE) + line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; +#endif + lpos = temp - temp2; + while (out < newout) + invis_addc (&out, ' ', cur_face); + } + else + { + while (out < newout) + invis_addc (&out, ' ', cur_face); + lpos += temp; + } + } +#endif + else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) + { + invis_addc (&out, '\0', cur_face); + CHECK_INV_LBREAKS (); + inv_lbreaks[++newlines] = out; +#if defined (HANDLE_MULTIBYTE) + line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; +#endif + lpos = 0; + } + else if (CTRL_CHAR (c) || c == RUBOUT) + { + invis_addc (&out, '^', cur_face); + CHECK_LPOS(); + invis_addc (&out, CTRL_CHAR (c) ? UNCTRL (c) : '?', cur_face); + CHECK_LPOS(); + } + else + { +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + register int i; + + _rl_wrapped_multicolumn = 0; + + if (_rl_screenwidth < lpos + wc_width) + for (i = lpos; i < _rl_screenwidth; i++) + { + /* The space will be removed in update_line() */ + invis_addc (&out, ' ', cur_face); + _rl_wrapped_multicolumn++; + CHECK_LPOS(); + } + if (in == rl_point) + { + cpos_buffer_position = out; + lb_linenum = newlines; + } + for (i = in; i < in+wc_bytes; i++) + invis_addc (&out, rl_line_buffer[i], cur_face); + for (i = 0; i < wc_width; i++) + CHECK_LPOS(); + } + else + { + invis_addc (&out, c, cur_face); + CHECK_LPOS(); + } +#else + invis_addc (&out, c, cur_face); + CHECK_LPOS(); +#endif + } + +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + in += wc_bytes; + if (_rl_utf8locale && UTF8_SINGLEBYTE(rl_line_buffer[in])) + { + wc = (wchar_t)rl_line_buffer[in]; + wc_bytes = 1; + memset (&ps, 0, sizeof (mbstate_t)); /* re-init state */ + } + else + wc_bytes = mbrtowc (&wc, rl_line_buffer + in, rl_end - in, &ps); + } + else + in++; +#endif + } + invis_nul (&out); + line_totbytes = out; + if (cpos_buffer_position < 0) + { + cpos_buffer_position = out; + lb_linenum = newlines; + } + + /* If we are switching from one line to multiple wrapped lines, we don't + want to do a dumb update (or we want to make it smarter). */ + if (_rl_quick_redisplay && newlines > 0) + _rl_quick_redisplay = 0; + + inv_botlin = lb_botlin = _rl_inv_botlin = newlines; + CHECK_INV_LBREAKS (); + inv_lbreaks[newlines+1] = out; +#if defined (HANDLE_MULTIBYTE) + /* This should be 0 anyway */ + line_state_invisible->wrapped_line[newlines+1] = _rl_wrapped_multicolumn; +#endif + cursor_linenum = lb_linenum; + + /* CPOS_BUFFER_POSITION == position in buffer where cursor should be placed. + CURSOR_LINENUM == line number where the cursor should be placed. */ + + /* PWP: now is when things get a bit hairy. The visible and invisible + line buffers are really multiple lines, which would wrap every + (screenwidth - 1) characters. Go through each in turn, finding + the changed region and updating it. The line order is top to bottom. */ + + /* If we can move the cursor up and down, then use multiple lines, + otherwise, let long lines display in a single terminal line, and + horizontally scroll it. */ + displaying_prompt_first_line = 1; + if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) + { + int nleft, pos, changed_screen_line, tx; + + if (!rl_display_fixed || forced_display) + { + forced_display = 0; + + /* If we have more than a screenful of material to display, then + only display a screenful. We should display the last screen, + not the first. */ + if (out >= _rl_screenchars) + { +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + out = _rl_find_prev_mbchar (invisible_line, _rl_screenchars, MB_FIND_ANY); + else +#endif + out = _rl_screenchars - 1; + } + + /* The first line is at character position 0 in the buffer. The + second and subsequent lines start at inv_lbreaks[N], offset by + OFFSET (which has already been calculated above). */ + +#define INVIS_FIRST() (prompt_physical_chars > _rl_screenwidth ? prompt_invis_chars_first_line : wrap_offset) +#define WRAP_OFFSET(line, offset) ((line == 0) \ + ? (offset ? INVIS_FIRST() : 0) \ + : ((line == prompt_last_screen_line) ? wrap_offset-prompt_invis_chars_first_line : 0)) +#define W_OFFSET(line, offset) ((line) == 0 ? offset : 0) +#define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l])) +#define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l]) +#define VIS_CHARS(line) (visible_line + vis_lbreaks[line]) +#define VIS_FACE(line) (vis_face + vis_lbreaks[line]) +#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line) +#define VIS_LINE_FACE(line) ((line) > _rl_vis_botlin) ? "" : VIS_FACE(line) +#define INV_LINE(line) (invisible_line + inv_lbreaks[line]) +#define INV_LINE_FACE(line) (inv_face + inv_lbreaks[line]) + +#define OLD_CPOS_IN_PROMPT() (cpos_adjusted == 0 && \ + _rl_last_c_pos != o_cpos && \ + _rl_last_c_pos > wrap_offset && \ + o_cpos < prompt_last_invisible) + + + /* We don't want to highlight anything that's going to be off the top + of the display; if the current line takes up more than an entire + screen, just mark the lines that won't be displayed as having a + `normal' face. + It's imperfect, but better than display corruption. */ + if (rl_mark_active_p () && inv_botlin > _rl_screenheight) + { + int extra; + + extra = inv_botlin - _rl_screenheight; + for (linenum = 0; linenum <= extra; linenum++) + norm_face (INV_LINE_FACE(linenum), INV_LLEN (linenum)); + } + + /* For each line in the buffer, do the updating display. */ + for (linenum = 0; linenum <= inv_botlin; linenum++) + { + /* This can lead us astray if we execute a program that changes + the locale from a non-multibyte to a multibyte one. */ + o_cpos = _rl_last_c_pos; + cpos_adjusted = 0; + update_line (VIS_LINE(linenum), VIS_LINE_FACE(linenum), + INV_LINE(linenum), INV_LINE_FACE(linenum), + linenum, + VIS_LLEN(linenum), INV_LLEN(linenum), inv_botlin); + + /* update_line potentially changes _rl_last_c_pos, but doesn't + take invisible characters into account, since _rl_last_c_pos + is an absolute cursor position in a multibyte locale. We + choose to (mostly) compensate for that here, rather than + change update_line itself. There are several cases in which + update_line adjusts _rl_last_c_pos itself (so it can pass + _rl_move_cursor_relative accurate values); it communicates + this back by setting cpos_adjusted. If we assume that + _rl_last_c_pos is correct (an absolute cursor position) each + time update_line is called, then we can assume in our + calculations that o_cpos does not need to be adjusted by + wrap_offset. */ + if (linenum == 0 && (mb_cur_max > 1 && rl_byte_oriented == 0) && OLD_CPOS_IN_PROMPT()) + _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ + else if (cpos_adjusted == 0 && + linenum == prompt_last_screen_line && + prompt_physical_chars > _rl_screenwidth && + (mb_cur_max > 1 && rl_byte_oriented == 0) && + _rl_last_c_pos != o_cpos && + _rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line)) /* XXX - rethink this last one */ + /* This assumes that all the invisible characters are split + between the first and last lines of the prompt, if the + prompt consumes more than two lines. It's usually right */ + /* XXX - not sure this is ever executed */ + _rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line); + + /* If this is the line with the prompt, we might need to + compensate for invisible characters in the new line. Do + this only if there is not more than one new line (which + implies that we completely overwrite the old visible line) + and the new line is shorter than the old. Make sure we are + at the end of the new line before clearing. */ + if (linenum == 0 && + inv_botlin == 0 && _rl_last_c_pos == out && + (wrap_offset > visible_wrap_offset) && + (_rl_last_c_pos < visible_first_line_len)) + { + if (mb_cur_max > 1 && rl_byte_oriented == 0) + nleft = _rl_screenwidth - _rl_last_c_pos; + else + nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos; + if (nleft) + _rl_clear_to_eol (nleft); + } +#if 0 + /* This segment is intended to handle the case where the old + visible prompt has invisible characters and the new line + to be displayed needs to clear the rest of the old characters + out (e.g., when printing the i-search prompt): in general, + the case of the new line being shorter than the old. We need + to be at the end of the new line and the old line needs to be + longer than the current cursor position. It's not perfect, + since it uses the byte length of the first line, but this will + at worst result in some extra clear-to-end-of-lines. We can't + use the prompt length variables because they may not + correspond to the visible line (see printing the i-search + prompt above). The tests for differing numbers of invisible + characters may not matter and can probably be removed. */ + else if (linenum == 0 && + linenum == prompt_last_screen_line && + _rl_last_c_pos == out && + _rl_last_c_pos < visible_first_line_len && + visible_wrap_offset && + visible_wrap_offset != wrap_offset) + { + if (mb_cur_max > 1 && rl_byte_oriented == 0) + nleft = _rl_screenwidth - _rl_last_c_pos; + else + nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos; + if (nleft) + _rl_clear_to_eol (nleft); + } +#endif + + /* Since the new first line is now visible, save its length. */ + if (linenum == 0) + visible_first_line_len = (inv_botlin > 0) ? inv_lbreaks[1] : out - wrap_offset; + } + + /* We may have deleted some lines. If so, clear the left over + blank ones at the bottom out. */ + if (_rl_vis_botlin > inv_botlin) + { + char *tt; + for (; linenum <= _rl_vis_botlin; linenum++) + { + tt = VIS_CHARS (linenum); + _rl_move_vert (linenum); + _rl_move_cursor_relative (0, tt, VIS_FACE(linenum)); + _rl_clear_to_eol + ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth); + } + } + _rl_vis_botlin = inv_botlin; + + /* CHANGED_SCREEN_LINE is set to 1 if we have moved to a + different screen line during this redisplay. */ + changed_screen_line = _rl_last_v_pos != cursor_linenum; + if (changed_screen_line) + { + _rl_move_vert (cursor_linenum); + /* If we moved up to the line with the prompt using _rl_term_up, + the physical cursor position on the screen stays the same, + but the buffer position needs to be adjusted to account + for invisible characters. */ + if ((mb_cur_max == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset) + _rl_last_c_pos += wrap_offset; + } + + /* Now we move the cursor to where it needs to be. First, make + sure we are on the correct line (cursor_linenum). */ + + /* We have to reprint the prompt if it contains invisible + characters, since it's not generally OK to just reprint + the characters from the current cursor position. But we + only need to reprint it if the cursor is before the last + invisible character in the prompt string. */ + /* XXX - why not use local_prompt_len? */ + nleft = prompt_visible_length + wrap_offset; + if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 && + _rl_last_c_pos < PROMPT_ENDING_INDEX && local_prompt) + { + _rl_cr (); + if (modmark) + _rl_output_some_chars ("*", 1); + + _rl_output_some_chars (local_prompt, nleft); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft, 1) - wrap_offset + modmark; + else + _rl_last_c_pos = nleft + modmark; + } + + /* Where on that line? And where does that line start + in the buffer? */ + pos = inv_lbreaks[cursor_linenum]; + /* nleft == number of characters (bytes) in the line buffer between + the start of the line and the desired cursor position. */ + nleft = cpos_buffer_position - pos; + + /* NLEFT is now a number of characters in a buffer. When in a + multibyte locale, however, _rl_last_c_pos is an absolute cursor + position that doesn't take invisible characters in the prompt + into account. We use a fudge factor to compensate. */ + + /* Since _rl_backspace() doesn't know about invisible characters in + the prompt, and there's no good way to tell it, we compensate for + those characters here and call _rl_backspace() directly if + necessary */ + if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos) + { + /* TX == new physical cursor position in multibyte locale. */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + tx = _rl_col_width (&visible_line[pos], 0, nleft, 1) - visible_wrap_offset; + else + tx = nleft; + if (tx >= 0 && _rl_last_c_pos > tx) + { + _rl_backspace (_rl_last_c_pos - tx); /* XXX */ + _rl_last_c_pos = tx; + } + } + + /* We need to note that in a multibyte locale we are dealing with + _rl_last_c_pos as an absolute cursor position, but moving to a + point specified by a buffer position (NLEFT) that doesn't take + invisible characters into account. */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + _rl_move_cursor_relative (nleft, &invisible_line[pos], &inv_face[pos]); + else if (nleft != _rl_last_c_pos) + _rl_move_cursor_relative (nleft, &invisible_line[pos], &inv_face[pos]); + } + } + else /* Do horizontal scrolling. Much simpler */ + { +#define M_OFFSET(margin, offset) ((margin) == 0 ? offset : 0) + int lmargin, ndisp, nleft, phys_c_pos, t; + + /* Always at top line. */ + _rl_last_v_pos = 0; + + /* Compute where in the buffer the displayed line should start. This + will be LMARGIN. */ + + /* The number of characters that will be displayed before the cursor. */ + ndisp = cpos_buffer_position - wrap_offset; + nleft = prompt_visible_length + wrap_offset; + /* Where the new cursor position will be on the screen. This can be + longer than SCREENWIDTH; if it is, lmargin will be adjusted. */ + phys_c_pos = cpos_buffer_position - (last_lmargin ? last_lmargin : wrap_offset); + t = _rl_screenwidth / 3; + + /* If the number of characters had already exceeded the screenwidth, + last_lmargin will be > 0. */ + + /* If the number of characters to be displayed is more than the screen + width, compute the starting offset so that the cursor is about + two-thirds of the way across the screen. */ + if (phys_c_pos > _rl_screenwidth - 2) + { + lmargin = cpos_buffer_position - (2 * t); + if (lmargin < 0) + lmargin = 0; + /* If the left margin would be in the middle of a prompt with + invisible characters, don't display the prompt at all. */ + if (wrap_offset && lmargin > 0 && lmargin < nleft) + lmargin = nleft; + } + else if (ndisp < _rl_screenwidth - 2) /* XXX - was -1 */ + lmargin = 0; + else if (phys_c_pos < 1) + { + /* If we are moving back towards the beginning of the line and + the last margin is no longer correct, compute a new one. */ + lmargin = ((cpos_buffer_position - 1) / t) * t; /* XXX */ + if (wrap_offset && lmargin > 0 && lmargin < nleft) + lmargin = nleft; + } + else + lmargin = last_lmargin; + + displaying_prompt_first_line = lmargin < nleft; + + /* If the first character on the screen isn't the first character + in the display line, indicate this with a special character. */ + if (lmargin > 0) + invisible_line[lmargin] = '<'; + + /* If SCREENWIDTH characters starting at LMARGIN do not encompass + the whole line, indicate that with a special character at the + right edge of the screen. If LMARGIN is 0, we need to take the + wrap offset into account. */ + t = lmargin + M_OFFSET (lmargin, wrap_offset) + _rl_screenwidth; + if (t > 0 && t < out) + invisible_line[t - 1] = '>'; + + if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin) + { + forced_display = 0; + o_cpos = _rl_last_c_pos; + cpos_adjusted = 0; + update_line (&visible_line[last_lmargin], &vis_face[last_lmargin], + &invisible_line[lmargin], &inv_face[lmargin], + 0, + _rl_screenwidth + visible_wrap_offset, + _rl_screenwidth + (lmargin ? 0 : wrap_offset), + 0); + + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && + displaying_prompt_first_line && OLD_CPOS_IN_PROMPT()) + _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ + + /* If the visible new line is shorter than the old, but the number + of invisible characters is greater, and we are at the end of + the new line, we need to clear to eol. */ + t = _rl_last_c_pos - M_OFFSET (lmargin, wrap_offset); + if ((M_OFFSET (lmargin, wrap_offset) > visible_wrap_offset) && + (_rl_last_c_pos == out) && displaying_prompt_first_line && + t < visible_first_line_len) + { + nleft = _rl_screenwidth - t; + _rl_clear_to_eol (nleft); + } + visible_first_line_len = out - lmargin - M_OFFSET (lmargin, wrap_offset); + if (visible_first_line_len > _rl_screenwidth) + visible_first_line_len = _rl_screenwidth; + + _rl_move_cursor_relative (cpos_buffer_position - lmargin, &invisible_line[lmargin], &inv_face[lmargin]); + last_lmargin = lmargin; + } + } + fflush (rl_outstream); + + /* Swap visible and non-visible lines. */ + { + struct line_state *vtemp = line_state_visible; + + line_state_visible = line_state_invisible; + line_state_invisible = vtemp; + + rl_display_fixed = 0; + /* If we are displaying on a single line, and last_lmargin is > 0, we + are not displaying any invisible characters, so set visible_wrap_offset + to 0. */ + if (_rl_horizontal_scroll_mode && last_lmargin) + visible_wrap_offset = 0; + else + visible_wrap_offset = wrap_offset; + + _rl_quick_redisplay = 0; + } + + RL_UNSETSTATE (RL_STATE_REDISPLAYING); + _rl_release_sigint (); +} + +static void +putc_face (int c, int face, char *cur_face) +{ + char cf; + cf = *cur_face; + if (cf != face) + { + if (cf != FACE_NORMAL && cf != FACE_STANDOUT) + return; + if (face != FACE_NORMAL && face != FACE_STANDOUT) + return; + if (face == FACE_STANDOUT && cf == FACE_NORMAL) + _rl_standout_on (); + if (face == FACE_NORMAL && cf == FACE_STANDOUT) + _rl_standout_off (); + *cur_face = face; + } + if (c != EOF) + putc (c, rl_outstream); +} + +static void +puts_face (const char *str, const char *face, int n) +{ + int i; + char cur_face; + + for (cur_face = FACE_NORMAL, i = 0; i < n; i++) + putc_face (str[i], face[i], &cur_face); + putc_face (EOF, FACE_NORMAL, &cur_face); +} + +static void +norm_face (char *face, int n) +{ + memset (face, FACE_NORMAL, n); +} + +#define ADJUST_CPOS(x) do { _rl_last_c_pos -= (x) ; cpos_adjusted = 1; } while (0) + +/* PWP: update_line() is based on finding the middle difference of each + line on the screen; vis: + + /old first difference + /beginning of line | /old last same /old EOL + v v v v +old: eddie> Oh, my little gruntle-buggy is to me, as lurgid as +new: eddie> Oh, my little buggy says to me, as lurgid as + ^ ^ ^ ^ + \beginning of line | \new last same \new end of line + \new first difference + + All are character pointers for the sake of speed. Special cases for + no differences, as well as for end of line additions must be handled. + + Could be made even smarter, but this works well enough */ +static void +update_line (char *old, char *old_face, char *new, char *new_face, int current_line, int omax, int nmax, int inv_botlin) +{ + char *ofd, *ols, *oe, *nfd, *nls, *ne; + char *ofdf, *nfdf, *olsf, *nlsf; + int temp, lendiff, wsatend, od, nd, twidth, o_cpos; + int current_invis_chars; + int col_lendiff, col_temp; + int bytes_to_insert; + int mb_cur_max = MB_CUR_MAX; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps_new, ps_old; + int new_offset, old_offset; +#endif + + /* If we're at the right edge of a terminal that supports xn, we're + ready to wrap around, so do so. This fixes problems with knowing + the exact cursor position and cut-and-paste with certain terminal + emulators. In this calculation, TEMP is the physical screen + position of the cursor. */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + temp = _rl_last_c_pos; + else + temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset); + if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode + && _rl_last_v_pos == current_line - 1) + { + /* We're going to wrap around by writing the first character of NEW to + the screen and dealing with changes to what's visible by modifying + OLD to match it. Complicated by the presence of multi-width + characters at the end of the line or beginning of the new one. */ + /* old is always somewhere in visible_line; new is always somewhere in + invisible_line. These should always be null-terminated. */ +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + wchar_t wc; + mbstate_t ps; + int oldwidth, newwidth; + int oldbytes, newbytes; + size_t ret; + + /* This fixes only double-column characters, but if the wrapped + character consumes more than three columns, spaces will be + inserted in the string buffer. */ + /* XXX remember that we are working on the invisible line right now; + we don't swap visible and invisible until just before rl_redisplay + returns */ + /* This will remove the extra placeholder space we added with + _rl_wrapped_multicolumn */ + if (current_line < line_state_invisible->wbsize && line_state_invisible->wrapped_line[current_line] > 0) + _rl_clear_to_eol (line_state_invisible->wrapped_line[current_line]); + + /* 1. how many screen positions does first char in old consume? */ + memset (&ps, 0, sizeof (mbstate_t)); + ret = mbrtowc (&wc, old, mb_cur_max, &ps); + oldbytes = ret; + if (MB_INVALIDCH (ret)) + { + oldwidth = 1; + oldbytes = 1; + } + else if (MB_NULLWCH (ret)) + oldwidth = 0; + else + oldwidth = WCWIDTH (wc); + if (oldwidth < 0) + oldwidth = 1; + + /* 2. how many screen positions does the first char in new consume? */ + memset (&ps, 0, sizeof (mbstate_t)); + ret = mbrtowc (&wc, new, mb_cur_max, &ps); + newbytes = ret; + if (MB_INVALIDCH (ret)) + { + newwidth = 1; + newbytes = 1; + } + else if (MB_NULLWCH (ret)) + newwidth = 0; + else + newwidth = WCWIDTH (wc); + if (newwidth < 0) + newwidth = 1; + + /* 3. if the new width is less than the old width, we need to keep + going in new until we have consumed at least that many screen + positions, and figure out how many bytes that will take */ + while (newbytes < nmax && newwidth < oldwidth) + { + int t; + + ret = mbrtowc (&wc, new+newbytes, mb_cur_max, &ps); + if (MB_INVALIDCH (ret)) + { + newwidth += 1; + newbytes += 1; + } + else if (MB_NULLWCH (ret)) + break; + else + { + t = WCWIDTH (wc); + newwidth += (t >= 0) ? t : 1; + newbytes += ret; + } + } + /* 4. If the new width is more than the old width, keep going in old + until we have consumed exactly that many screen positions, and + figure out how many bytes that will take. This is an optimization */ + while (oldbytes < omax && oldwidth < newwidth) + { + int t; + + ret = mbrtowc (&wc, old+oldbytes, mb_cur_max, &ps); + if (MB_INVALIDCH (ret)) + { + oldwidth += 1; + oldbytes += 1; + } + else if (MB_NULLWCH (ret)) + break; + else + { + t = WCWIDTH (wc); + oldwidth += (t >= 0) ? t : 1; + oldbytes += ret; + } + } + /* 5. write the first newbytes of new, which takes newwidth. This is + where the screen wrapping takes place, and we are now writing + characters onto the new line. We need to fix up old so it + accurately reflects what is on the screen after the + _rl_output_some_chars below. */ + if (newwidth > 0) + { + int count, i, j; + char *optr; + + puts_face (new, new_face, newbytes); + _rl_last_c_pos = newwidth; + _rl_last_v_pos++; + + /* 5a. If the number of screen positions doesn't match, punt + and do a dumb update. + 5b. If the number of bytes is greater in the new line than + the old, do a dumb update, because there is no guarantee we + can extend the old line enough to fit the new bytes. */ + if (newwidth != oldwidth || newbytes > oldbytes) + { + oe = old + omax; + ne = new + nmax; + nd = newbytes; + nfd = new + nd; + ofdf = old_face + oldbytes; + nfdf = new_face + newbytes; + + goto dumb_update; + } + if (oldbytes != 0 && newbytes != 0) + { + /* We have written as many bytes from new as we need to + consume the first character of old. Fix up `old' so it + reflects the new screen contents. We use +1 in the + memmove call to copy the trailing NUL. */ + /* (strlen(old+oldbytes) == (omax - oldbytes - 1)) */ + + /* Don't bother trying to fit the bytes if the number of bytes + doesn't change. */ + if (oldbytes != newbytes) + { + memmove (old+newbytes, old+oldbytes, strlen (old+oldbytes) + 1); + memmove (old_face+newbytes, old_face+oldbytes, strlen (old+oldbytes) + 1); + } + memcpy (old, new, newbytes); + memcpy (old_face, new_face, newbytes); + j = newbytes - oldbytes; + omax += j; + /* Fix up indices if we copy data from one line to another */ + for (i = current_line+1; j != 0 && i <= inv_botlin+1 && i <=_rl_vis_botlin+1; i++) + vis_lbreaks[i] += j; + } + } + else + { + putc (' ', rl_outstream); + _rl_last_c_pos = 1; + _rl_last_v_pos++; + if (old[0] && new[0]) + { + old[0] = new[0]; + old_face[0] = new_face[0]; + } + } + } + else +#endif + { + if (new[0]) + puts_face (new, new_face, 1); + else + putc (' ', rl_outstream); + _rl_last_c_pos = 1; + _rl_last_v_pos++; + if (old[0] && new[0]) + { + old[0] = new[0]; + old_face[0] = new_face[0]; + } + } + } + + /* We know that we are dealing with a single screen line here */ + if (_rl_quick_redisplay) + { + nfd = new; + nfdf = new_face; + ofd = old; + ofdf = old_face; + for (od = 0, oe = ofd; od < omax && *oe; oe++, od++); + for (nd = 0, ne = nfd; nd < nmax && *ne; ne++, nd++); + od = nd = 0; + _rl_move_cursor_relative (0, old, old_face); + + bytes_to_insert = ne - nfd; + if (bytes_to_insert < local_prompt_len) /* ??? */ + goto dumb_update; + + /* output the prompt, output the line contents, clear the rest */ + _rl_output_some_chars (nfd, local_prompt_len); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = prompt_physical_chars; + else + _rl_last_c_pos = local_prompt_len; + + bytes_to_insert -= local_prompt_len; + if (bytes_to_insert > 0) + { + puts_face (new+local_prompt_len, nfdf+local_prompt_len, bytes_to_insert); + if (mb_cur_max > 1 && rl_byte_oriented) + _rl_last_c_pos += _rl_col_width (new, local_prompt_len, ne-new, 1); + else + _rl_last_c_pos += bytes_to_insert; + } + + /* See comments at dumb_update: for an explanation of this heuristic */ + if (nmax < omax) + goto clear_rest_of_line; + else if ((nmax - W_OFFSET(current_line, wrap_offset)) < (omax - W_OFFSET (current_line, visible_wrap_offset))) + goto clear_rest_of_line; + else + return; + } + + /* Find first difference. */ +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + /* See if the old line is a subset of the new line, so that the + only change is adding characters. */ + temp = (omax < nmax) ? omax : nmax; + if (memcmp (old, new, temp) == 0 && memcmp (old_face, new_face, temp) == 0) + { + new_offset = old_offset = temp; /* adding at the end */ + ofd = old + temp; + ofdf = old_face + temp; + nfd = new + temp; + nfdf = new_face + temp; + } + else + { + memset (&ps_new, 0, sizeof(mbstate_t)); + memset (&ps_old, 0, sizeof(mbstate_t)); + + /* Are the old and new lines the same? */ + if (omax == nmax && memcmp (new, old, omax) == 0 && memcmp (new_face, old_face, omax) == 0) + { + old_offset = omax; + new_offset = nmax; + ofd = old + omax; + ofdf = old_face + omax; + nfd = new + nmax; + nfdf = new_face + nmax; + } + else + { + /* Go through the line from the beginning and find the first + difference. We assume that faces change at (possibly multi- + byte) character boundaries. */ + new_offset = old_offset = 0; + for (ofd = old, ofdf = old_face, nfd = new, nfdf = new_face; + (ofd - old < omax) && *ofd && + _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new) && + *ofdf == *nfdf; ) + { + old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY); + new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY); + + ofd = old + old_offset; + ofdf = old_face + old_offset; + nfd = new + new_offset; + nfdf = new_face + new_offset; + } + } + } + } + else +#endif + for (ofd = old, ofdf = old_face, nfd = new, nfdf = new_face; + (ofd - old < omax) && *ofd && (*ofd == *nfd) && (*ofdf == *nfdf); + ofd++, nfd++, ofdf++, nfdf++) + ; + + /* Move to the end of the screen line. ND and OD are used to keep track + of the distance between ne and new and oe and old, respectively, to + move a subtraction out of each loop. */ + for (od = ofd - old, oe = ofd; od < omax && *oe; oe++, od++); + for (nd = nfd - new, ne = nfd; nd < nmax && *ne; ne++, nd++); + + /* If no difference, continue to next line. */ + if (ofd == oe && nfd == ne) + return; + +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0 && _rl_utf8locale) + { + wchar_t wc; + mbstate_t ps = { 0 }; + int t; + + /* If the first character in the difference is a zero-width character, + assume it's a combining character and back one up so the two base + characters no longer compare equivalently. */ + t = mbrtowc (&wc, ofd, mb_cur_max, &ps); + if (t > 0 && UNICODE_COMBINING_CHAR (wc) && WCWIDTH (wc) == 0) + { + old_offset = _rl_find_prev_mbchar (old, ofd - old, MB_FIND_ANY); + new_offset = _rl_find_prev_mbchar (new, nfd - new, MB_FIND_ANY); + ofd = old + old_offset; /* equal by definition */ + ofdf = old_face + old_offset; + nfd = new + new_offset; + nfdf = new_face + new_offset; + } + } +#endif + + wsatend = 1; /* flag for trailing whitespace */ + +#if defined (HANDLE_MULTIBYTE) + /* Find the last character that is the same between the two lines. This + bounds the region that needs to change. */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + ols = old + _rl_find_prev_mbchar (old, oe - old, MB_FIND_ANY); + olsf = old_face + (ols - old); + nls = new + _rl_find_prev_mbchar (new, ne - new, MB_FIND_ANY); + nlsf = new_face + (nls - new); + + while ((ols > ofd) && (nls > nfd)) + { + memset (&ps_old, 0, sizeof (mbstate_t)); + memset (&ps_new, 0, sizeof (mbstate_t)); + + if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0 || + *olsf != *nlsf) + break; + + if (*ols == ' ') + wsatend = 0; + + ols = old + _rl_find_prev_mbchar (old, ols - old, MB_FIND_ANY); + olsf = old_face + (ols - old); + nls = new + _rl_find_prev_mbchar (new, nls - new, MB_FIND_ANY); + nlsf = new_face + (nls - new); + } + } + else + { +#endif /* HANDLE_MULTIBYTE */ + ols = oe - 1; /* find last same */ + olsf = old_face + (ols - old); + nls = ne - 1; + nlsf = new_face + (nls - new); + while ((ols > ofd) && (nls > nfd) && (*ols == *nls) && (*olsf == *nlsf)) + { + if (*ols != ' ') + wsatend = 0; + ols--; olsf--; + nls--; nlsf--; + } +#if defined (HANDLE_MULTIBYTE) + } +#endif + + if (wsatend) + { + ols = oe; + olsf = old_face + (ols - old); + nls = ne; + nlsf = new_face + (nls - new); + } +#if defined (HANDLE_MULTIBYTE) + /* This may not work for stateful encoding, but who cares? To handle + stateful encoding properly, we have to scan each string from the + beginning and compare. */ + else if (_rl_compare_chars (ols, 0, NULL, nls, 0, NULL) == 0 || *olsf != *nlsf) +#else + else if (*ols != *nls || *olsf != *nlsf) +#endif + { + if (*ols) /* don't step past the NUL */ + { + if (mb_cur_max > 1 && rl_byte_oriented == 0) + ols = old + _rl_find_next_mbchar (old, ols - old, 1, MB_FIND_ANY); + else + ols++; + } + if (*nls) + { + if (mb_cur_max > 1 && rl_byte_oriented == 0) + nls = new + _rl_find_next_mbchar (new, nls - new, 1, MB_FIND_ANY); + else + nls++; + } + olsf = old_face + (ols - old); + nlsf = new_face + (nls - new); + } + + /* count of invisible characters in the current invisible line. */ + current_invis_chars = W_OFFSET (current_line, wrap_offset); + if (_rl_last_v_pos != current_line) + { + _rl_move_vert (current_line); + /* We have moved up to a new screen line. This line may or may not have + invisible characters on it, but we do our best to recalculate + visible_wrap_offset based on what we know. */ + if (current_line == 0) + visible_wrap_offset = prompt_invis_chars_first_line; /* XXX */ +#if 0 /* XXX - not yet */ + else if (current_line == prompt_last_screen_line && wrap_offset > prompt_invis_chars_first_line) + visible_wrap_offset = wrap_offset - prompt_invis_chars_first_line +#endif + if ((mb_cur_max == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset) + _rl_last_c_pos += visible_wrap_offset; + } + + /* If this is the first line and there are invisible characters in the + prompt string, and the prompt string has not changed, and the current + cursor position is before the last invisible character in the prompt, + and the index of the character to move to is past the end of the prompt + string, then redraw the entire prompt string. We can only do this + reliably if the terminal supports a `cr' capability. + + This can also happen if the prompt string has changed, and the first + difference in the line is in the middle of the prompt string, after a + sequence of invisible characters (worst case) and before the end of + the prompt. In this case, we have to redraw the entire prompt string + so that the entire sequence of invisible characters is drawn. We need + to handle the worst case, when the difference is after (or in the middle + of) a sequence of invisible characters that changes the text color and + before the sequence that restores the text color to normal. Then we have + to make sure that the lines still differ -- if they don't, we can + return immediately. + + This is not an efficiency hack -- there is a problem with redrawing + portions of the prompt string if they contain terminal escape + sequences (like drawing the `unbold' sequence without a corresponding + `bold') that manifests itself on certain terminals. */ + + lendiff = local_prompt_len; + if (lendiff > nmax) + lendiff = nmax; + od = ofd - old; /* index of first difference in visible line */ + nd = nfd - new; /* nd, od are buffer indexes */ + if (current_line == 0 && !_rl_horizontal_scroll_mode && + _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 && + (((od > 0 || nd > 0) && (od <= prompt_last_invisible || nd <= prompt_last_invisible)) || + ((od >= lendiff) && _rl_last_c_pos < PROMPT_ENDING_INDEX))) + { + _rl_cr (); + if (modmark) + _rl_output_some_chars ("*", 1); + _rl_output_some_chars (local_prompt, lendiff); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + /* If we just output the entire prompt string we can take advantage + of knowing the number of physical characters in the prompt. If + the prompt wraps lines (lendiff clamped at nmax), we can't. */ + if (lendiff == local_prompt_len) + _rl_last_c_pos = prompt_physical_chars + modmark; + else + /* We take wrap_offset into account here so we can pass correct + information to _rl_move_cursor_relative. */ + _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff, 1) - wrap_offset + modmark; + cpos_adjusted = 1; + } + else + _rl_last_c_pos = lendiff + modmark; + + /* Now if we have printed the prompt string because the first difference + was within the prompt, see if we need to recompute where the lines + differ. Check whether where we are now is past the last place where + the old and new lines are the same and short-circuit now if we are. */ + if ((od <= prompt_last_invisible || nd <= prompt_last_invisible) && + omax == nmax && + lendiff > (ols-old) && lendiff > (nls-new)) + return; + + /* XXX - we need to fix up our calculations if we are now past the + old ofd/nfd and the prompt length (or line length) has changed. + We punt on the problem and do a dumb update. We'd like to be able + to just output the prompt from the beginning of the line up to the + first difference, but you don't know the number of invisible + characters in that case. + This needs a lot of work to be efficient, but it usually doesn't matter. */ + if ((od <= prompt_last_invisible || nd <= prompt_last_invisible)) + { + nfd = new + lendiff; /* number of characters we output above */ + nfdf = new_face + lendiff; + nd = lendiff; + + /* Do a dumb update and return */ +dumb_update: + temp = ne - nfd; + if (temp > 0) + { + puts_face (nfd, nfdf, temp); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + _rl_last_c_pos += _rl_col_width (new, nd, ne - new, 1); + /* Need to adjust here based on wrap_offset. Guess that if + this is the line containing the last line of the prompt + we need to adjust by + wrap_offset-prompt_invis_chars_first_line + on the assumption that this is the number of invisible + characters in the last line of the prompt. */ + if (wrap_offset > prompt_invis_chars_first_line && + current_line == prompt_last_screen_line && + prompt_physical_chars > _rl_screenwidth && + _rl_horizontal_scroll_mode == 0) + ADJUST_CPOS (wrap_offset - prompt_invis_chars_first_line); + + /* If we just output a new line including the prompt, and + the prompt includes invisible characters, we need to + account for them in the _rl_last_c_pos calculation, since + _rl_col_width does not. This happens when other code does + a goto dumb_update; */ + else if (current_line == 0 && + nfd == new && + prompt_invis_chars_first_line && + local_prompt_len <= temp && + wrap_offset >= prompt_invis_chars_first_line && + _rl_horizontal_scroll_mode == 0) + ADJUST_CPOS (prompt_invis_chars_first_line); + } + else + _rl_last_c_pos += temp; + } + /* This is a useful heuristic, but what we really want is to clear + if the new number of visible screen characters is less than the + old number of visible screen characters. If the prompt has changed, + we don't really have enough information about the visible line to + know for sure, so we use another heuristic calclulation below. */ + if (nmax < omax) + goto clear_rest_of_line; /* XXX */ + else if ((nmax - W_OFFSET(current_line, wrap_offset)) < (omax - W_OFFSET (current_line, visible_wrap_offset))) + goto clear_rest_of_line; + else + return; + } + } + + o_cpos = _rl_last_c_pos; + + /* When this function returns, _rl_last_c_pos is correct, and an absolute + cursor position in multibyte mode, but a buffer index when not in a + multibyte locale. */ + _rl_move_cursor_relative (od, old, old_face); + +#if defined (HANDLE_MULTIBYTE) + /* We need to indicate that the cursor position is correct in the presence of + invisible characters in the prompt string. Let's see if setting this when + we make sure we're at the end of the drawn prompt string works. */ + if (current_line == 0 && mb_cur_max > 1 && rl_byte_oriented == 0 && + (_rl_last_c_pos > 0 || o_cpos > 0) && + _rl_last_c_pos == prompt_physical_chars) + cpos_adjusted = 1; +#endif + + /* if (len (new) > len (old)) + lendiff == difference in buffer (bytes) + col_lendiff == difference on screen (columns) + When not using multibyte characters, these are equal */ + lendiff = (nls - nfd) - (ols - ofd); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + int newchars, newwidth, newind; + int oldchars, oldwidth, oldind; + + newchars = nls - new; + oldchars = ols - old; + + /* If we can do it, try to adjust nls and ols so that nls-new will + contain the entire new prompt string. That way we can use + prompt_physical_chars and not have to recompute column widths. + _rl_col_width adds wrap_offset and expects the caller to compensate, + which we do below, so we do the same thing if we don't call + _rl_col_width. + We don't have to compare, since we know the characters are the same. + The check of differing numbers of invisible chars may be extraneous. + XXX - experimental */ + if (current_line == 0 && nfd == new && newchars > prompt_last_invisible && + newchars <= local_prompt_len && + local_prompt_len <= nmax && + current_invis_chars != visible_wrap_offset) + { + while (newchars < nmax && oldchars < omax && newchars < local_prompt_len) + { +#if defined (HANDLE_MULTIBYTE) + newind = _rl_find_next_mbchar (new, newchars, 1, MB_FIND_NONZERO); + oldind = _rl_find_next_mbchar (old, oldchars, 1, MB_FIND_NONZERO); + + nls += newind - newchars; + ols += oldind - oldchars; + + newchars = newind; + oldchars = oldind; +#else + nls++; ols++; + newchars++; oldchars++; +#endif + } + newwidth = (newchars == local_prompt_len) ? prompt_physical_chars + wrap_offset + : _rl_col_width (new, 0, nls - new, 1); + /* if we changed nls and ols, we need to recompute lendiff */ + lendiff = (nls - nfd) - (ols - ofd); + + nlsf = new_face + (nls - new); + olsf = old_face + (ols - old); + } + else + newwidth = _rl_col_width (new, nfd - new, nls - new, 1); + + oldwidth = _rl_col_width (old, ofd - old, ols - old, 1); + + col_lendiff = newwidth - oldwidth; + } + else + col_lendiff = lendiff; + + /* col_lendiff uses _rl_col_width(), which doesn't know about whether or not + the multibyte characters it counts are invisible, so unless we're printing + the entire prompt string (in which case we can use prompt_physical_chars) + the count is short by the number of bytes in the invisible multibyte + characters - the number of multibyte characters. + + We don't have a good way to solve this without moving to something like + a bitmap that indicates which characters are visible and which are + invisible. We fix it up (imperfectly) in the caller and by trying to use + the entire prompt string wherever we can. */ + + /* If we are changing the number of invisible characters in a line, and + the spot of first difference is before the end of the invisible chars, + lendiff needs to be adjusted. */ + if (current_line == 0 && current_invis_chars != visible_wrap_offset) + { + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + lendiff += visible_wrap_offset - current_invis_chars; + col_lendiff += visible_wrap_offset - current_invis_chars; + } + else + { + lendiff += visible_wrap_offset - current_invis_chars; + col_lendiff = lendiff; + } + } + + /* We use temp as a count of the number of bytes from the first difference + to the end of the new line. col_temp is the corresponding number of + screen columns. A `dumb' update moves to the spot of first difference + and writes TEMP bytes. */ + /* Insert (diff (len (old), len (new)) ch. */ + temp = ne - nfd; + if (mb_cur_max > 1 && rl_byte_oriented == 0) + col_temp = _rl_col_width (new, nfd - new, ne - new, 1); + else + col_temp = temp; + + /* how many bytes from the new line buffer to write to the display */ + bytes_to_insert = nls - nfd; + + /* col_lendiff > 0 if we are adding characters to the line */ + if (col_lendiff > 0) /* XXX - was lendiff */ + { + /* Non-zero if we're increasing the number of lines. */ + int gl = current_line >= _rl_vis_botlin && inv_botlin > _rl_vis_botlin; + + /* If col_lendiff is > 0, implying that the new string takes up more + screen real estate than the old, but lendiff is < 0, meaning that it + takes fewer bytes, we need to just output the characters starting + from the first difference. These will overwrite what is on the + display, so there's no reason to do a smart update. This can really + only happen in a multibyte environment. */ + if (lendiff < 0) + { + puts_face (nfd, nfdf, temp); + _rl_last_c_pos += col_temp; + /* If nfd begins before any invisible characters in the prompt, + adjust _rl_last_c_pos to account for wrap_offset and set + cpos_adjusted to let the caller know. */ + if (current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (wrap_offset); /* XXX - prompt_invis_chars_first_line? */ + return; + } + /* Sometimes it is cheaper to print the characters rather than + use the terminal's capabilities. If we're growing the number + of lines, make sure we actually cause the new line to wrap + around on auto-wrapping terminals. */ + else if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff || _rl_term_IC) && (!_rl_term_autowrap || !gl)) + { + /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and + _rl_horizontal_scroll_mode == 1, inserting the characters with + _rl_term_IC or _rl_term_ic will screw up the screen because of the + invisible characters. We need to just draw them. */ + /* The same thing happens if we're trying to draw before the last + invisible character in the prompt string or we're increasing the + number of invisible characters in the line and we're not drawing + the entire prompt string. */ + if (*ols && ((_rl_horizontal_scroll_mode && + _rl_last_c_pos == 0 && + lendiff > prompt_visible_length && + current_invis_chars > 0) == 0) && + (((mb_cur_max > 1 && rl_byte_oriented == 0) && + current_line == 0 && wrap_offset && + ((nfd - new) <= prompt_last_invisible) && + (col_lendiff < prompt_visible_length)) == 0) && + (visible_wrap_offset >= current_invis_chars)) + { + open_some_spaces (col_lendiff); + puts_face (nfd, nfdf, bytes_to_insert); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + _rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1); + else + _rl_last_c_pos += bytes_to_insert; + } + else if ((mb_cur_max == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0) + { + /* At the end of a line the characters do not have to + be "inserted". They can just be placed on the screen. */ + puts_face (nfd, nfdf, temp); + _rl_last_c_pos += col_temp; + return; + } + else /* just write from first difference to end of new line */ + { + puts_face (nfd, nfdf, temp); + _rl_last_c_pos += col_temp; + /* If nfd begins before the last invisible character in the + prompt, adjust _rl_last_c_pos to account for wrap_offset + and set cpos_adjusted to let the caller know. */ + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (wrap_offset); /* XXX - prompt_invis_chars_first_line? */ + return; + } + + if (bytes_to_insert > lendiff) + { + /* If nfd begins before the last invisible character in the + prompt, adjust _rl_last_c_pos to account for wrap_offset + and set cpos_adjusted to let the caller know. */ + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (wrap_offset); /* XXX - prompt_invis_chars_first_line? */ + } + } + else + { + /* cannot insert chars, write to EOL */ + puts_face (nfd, nfdf, temp); + _rl_last_c_pos += col_temp; + /* If we're in a multibyte locale and were before the last invisible + char in the current line (which implies we just output some invisible + characters) we need to adjust _rl_last_c_pos, since it represents + a physical character position. */ + /* The current_line*rl_screenwidth+prompt_invis_chars_first_line is a + crude attempt to compute how far into the new line buffer we are. + It doesn't work well in the face of multibyte characters and needs + to be rethought. XXX */ + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && + current_line == prompt_last_screen_line && wrap_offset && + displaying_prompt_first_line && + wrap_offset != prompt_invis_chars_first_line && + ((nfd-new) < (prompt_last_invisible-(current_line*_rl_screenwidth+prompt_invis_chars_first_line)))) + ADJUST_CPOS (wrap_offset - prompt_invis_chars_first_line); + + /* XXX - what happens if wrap_offset == prompt_invis_chars_first_line + and we are drawing the first line (current_line == 0)? We should + adjust by _rl_last_c_pos -= prompt_invis_chars_first_line */ + } + } + else /* Delete characters from line. */ + { + /* If possible and inexpensive to use terminal deletion, then do so. */ + if (_rl_term_dc && (2 * col_temp) >= -col_lendiff) + { + /* If all we're doing is erasing the invisible characters in the + prompt string, don't bother. It screws up the assumptions + about what's on the screen. */ + if (_rl_horizontal_scroll_mode && _rl_last_c_pos == 0 && + displaying_prompt_first_line && + -lendiff == visible_wrap_offset) + col_lendiff = 0; + + /* If we have moved lmargin and we're shrinking the line, we've + already moved the cursor to the first character of the new line, + so deleting -col_lendiff characters will mess up the cursor + position calculation */ + if (_rl_horizontal_scroll_mode && displaying_prompt_first_line == 0 && + col_lendiff && _rl_last_c_pos < -col_lendiff) + col_lendiff = 0; + + if (col_lendiff) + delete_chars (-col_lendiff); /* delete (diff) characters */ + + /* Copy (new) chars to screen from first diff to last match, + overwriting what is there. */ + if (bytes_to_insert > 0) + { + /* If nfd begins at the prompt, or before the invisible + characters in the prompt, we need to adjust _rl_last_c_pos + in a multibyte locale to account for the wrap offset and + set cpos_adjusted accordingly. */ + puts_face (nfd, nfdf, bytes_to_insert); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + /* This still doesn't take into account whether or not the + characters that this counts are invisible. */ + _rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1); + if (current_line == 0 && wrap_offset && + displaying_prompt_first_line && + prompt_invis_chars_first_line && + _rl_last_c_pos >= prompt_invis_chars_first_line && + ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (prompt_invis_chars_first_line); + +#if 1 +#ifdef HANDLE_MULTIBYTE + /* If we write a non-space into the last screen column, + remove the note that we added a space to compensate for + a multibyte double-width character that didn't fit, since + it's only valid for what was previously there. */ + /* XXX - watch this */ + if (_rl_last_c_pos == _rl_screenwidth && + line_state_invisible->wrapped_line[current_line+1] && + nfd[bytes_to_insert-1] != ' ') + line_state_invisible->wrapped_line[current_line+1] = 0; +#endif +#endif + } + else + _rl_last_c_pos += bytes_to_insert; + + /* XXX - we only want to do this if we are at the end of the line + so we move there with _rl_move_cursor_relative */ + if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new))) + { + _rl_move_cursor_relative (ne-new, new, new_face); + goto clear_rest_of_line; + } + } + } + /* Otherwise, print over the existing material. */ + else + { + if (temp > 0) + { + /* If nfd begins at the prompt, or before the invisible + characters in the prompt, we need to adjust _rl_last_c_pos + in a multibyte locale to account for the wrap offset and + set cpos_adjusted accordingly. */ + puts_face (nfd, nfdf, temp); + _rl_last_c_pos += col_temp; /* XXX */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + if (current_line == 0 && wrap_offset && + displaying_prompt_first_line && + _rl_last_c_pos > wrap_offset && + ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (wrap_offset); /* XXX - prompt_invis_chars_first_line? */ + } + } +clear_rest_of_line: + lendiff = (oe - old) - (ne - new); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + col_lendiff = _rl_col_width (old, 0, oe - old, 1) - _rl_col_width (new, 0, ne - new, 1); + else + col_lendiff = lendiff; + + /* If we've already printed over the entire width of the screen, + including the old material, then col_lendiff doesn't matter and + space_to_eol will insert too many spaces. XXX - maybe we should + adjust col_lendiff based on the difference between _rl_last_c_pos + and _rl_screenwidth */ + if (col_lendiff && ((mb_cur_max == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth))) + { + if (_rl_term_autowrap && current_line < inv_botlin) + space_to_eol (col_lendiff); + else + _rl_clear_to_eol (col_lendiff); + } + } + } +} + +/* Tell the update routines that we have moved onto a new (empty) line. */ +int +rl_on_new_line (void) +{ + if (visible_line) + visible_line[0] = '\0'; + + _rl_last_c_pos = _rl_last_v_pos = 0; + _rl_vis_botlin = last_lmargin = 0; + if (vis_lbreaks) + vis_lbreaks[0] = vis_lbreaks[1] = 0; + visible_wrap_offset = 0; + return 0; +} + +/* Clear all screen lines occupied by the current readline line buffer + (visible line) */ +int +rl_clear_visible_line (void) +{ + int curr_line; + + /* Make sure we move to column 0 so we clear the entire line */ + _rl_cr (); + _rl_last_c_pos = 0; + + /* Move to the last screen line of the current visible line */ + _rl_move_vert (_rl_vis_botlin); + + /* And erase screen lines going up to line 0 (first visible line) */ + for (curr_line = _rl_last_v_pos; curr_line >= 0; curr_line--) + { + _rl_move_vert (curr_line); + _rl_clear_to_eol (0); + } + + return 0; +} + +/* Tell the update routines that we have moved onto a new line with the + prompt already displayed. Code originally from the version of readline + distributed with CLISP. rl_expand_prompt must have already been called + (explicitly or implicitly). This still doesn't work exactly right; it + should use expand_prompt() */ +int +rl_on_new_line_with_prompt (void) +{ + int prompt_size, i, l, real_screenwidth, newlines; + char *prompt_last_line, *lprompt; + + /* Initialize visible_line and invisible_line to ensure that they can hold + the already-displayed prompt. */ + prompt_size = strlen (rl_prompt) + 1; + init_line_structures (prompt_size); + + /* Make sure the line structures hold the already-displayed prompt for + redisplay. */ + lprompt = local_prompt ? local_prompt : rl_prompt; + strcpy (visible_line, lprompt); + strcpy (invisible_line, lprompt); + + /* If the prompt contains newlines, take the last tail. */ + prompt_last_line = strrchr (rl_prompt, '\n'); + if (!prompt_last_line) + prompt_last_line = rl_prompt; + + l = strlen (prompt_last_line); + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l, 1); /* XXX */ + else + _rl_last_c_pos = l; + + /* Dissect prompt_last_line into screen lines. Note that here we have + to use the real screenwidth. Readline's notion of screenwidth might be + one less, see terminal.c. */ + real_screenwidth = _rl_screenwidth + (_rl_term_autowrap ? 0 : 1); + _rl_last_v_pos = l / real_screenwidth; + /* If the prompt length is a multiple of real_screenwidth, we don't know + whether the cursor is at the end of the last line, or already at the + beginning of the next line. Output a newline just to be safe. */ + if (l > 0 && (l % real_screenwidth) == 0) + _rl_output_some_chars ("\n", 1); + last_lmargin = 0; + + newlines = 0; i = 0; + while (i <= l) + { + _rl_vis_botlin = newlines; + vis_lbreaks[newlines++] = i; + i += real_screenwidth; + } + vis_lbreaks[newlines] = l; + visible_wrap_offset = 0; + + rl_display_prompt = rl_prompt; /* XXX - make sure it's set */ + + return 0; +} + +/* Actually update the display, period. */ +int +rl_forced_update_display (void) +{ + register char *temp; + + if (visible_line) + { + temp = visible_line; + while (*temp) + *temp++ = '\0'; + } + rl_on_new_line (); + forced_display++; + (*rl_redisplay_function) (); + return 0; +} + +/* Redraw only the last line of a multi-line prompt. */ +void +rl_redraw_prompt_last_line (void) +{ + char *t; + + t = strrchr (rl_display_prompt, '\n'); + if (t) + redraw_prompt (++t); + else + rl_forced_update_display (); +} + +/* Move the cursor from _rl_last_c_pos to NEW, which are buffer indices. + (Well, when we don't have multibyte characters, _rl_last_c_pos is a + buffer index.) + DATA is the contents of the screen line of interest; i.e., where + the movement is being done. + DATA is always the visible line or the invisible line */ +static void +_rl_move_cursor_relative (int new, const char *data, const char *dataf) +{ + register int i; + int woff; /* number of invisible chars on current line */ + int cpos, dpos; /* current and desired cursor positions */ + int adjust; + int in_invisline; + int mb_cur_max = MB_CUR_MAX; + + woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset); + cpos = _rl_last_c_pos; + + if (cpos == 0 && cpos == new) + return; + +#if defined (HANDLE_MULTIBYTE) + /* If we have multibyte characters, NEW is indexed by the buffer point in + a multibyte string, but _rl_last_c_pos is the display position. In + this case, NEW's display position is not obvious and must be + calculated. We need to account for invisible characters in this line, + as long as we are past them and they are counted by _rl_col_width. */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + adjust = 1; + /* Try to short-circuit common cases and eliminate a bunch of multibyte + character function calls. */ + /* 1. prompt string */ + if (new == local_prompt_len && memcmp (data, local_prompt, new) == 0) + { + dpos = prompt_physical_chars; + cpos_adjusted = 1; + adjust = 0; + } + /* 2. prompt_string + line contents */ + else if (new > local_prompt_len && local_prompt && memcmp (data, local_prompt, local_prompt_len) == 0) + { + dpos = prompt_physical_chars + _rl_col_width (data, local_prompt_len, new, 1); + cpos_adjusted = 1; + adjust = 0; + } + else + dpos = _rl_col_width (data, 0, new, 1); + + if (displaying_prompt_first_line == 0) + adjust = 0; + + /* yet another special case: printing the last line of a prompt with + multibyte characters and invisible characters whose printable length + exceeds the screen width with the last invisible character + (prompt_last_invisible) in the last line. IN_INVISLINE is the + offset of DATA in invisible_line */ + in_invisline = 0; + if (data > invisible_line && data < invisible_line+inv_lbreaks[_rl_inv_botlin+1]) + in_invisline = data - invisible_line; + + /* Use NEW when comparing against the last invisible character in the + prompt string, since they're both buffer indices and DPOS is a + desired display position. */ + /* NEW is relative to the current displayed line, while + PROMPT_LAST_INVISIBLE is relative to the entire (wrapped) line. + Need a way to reconcile these two variables by turning NEW into a + buffer position relative to the start of the line */ + if (adjust && ((new > prompt_last_invisible) || /* XXX - don't use woff here */ + (new+in_invisline > prompt_last_invisible) || /* invisible line */ + (prompt_physical_chars >= _rl_screenwidth && /* visible line */ + _rl_last_v_pos == prompt_last_screen_line && + wrap_offset >= woff && dpos >= woff && + new > (prompt_last_invisible-(vis_lbreaks[_rl_last_v_pos])-wrap_offset)))) + /* XXX last comparison might need to be >= */ + { + dpos -= woff; + /* Since this will be assigned to _rl_last_c_pos at the end (more + precisely, _rl_last_c_pos == dpos when this function returns), + let the caller know. */ + cpos_adjusted = 1; + } + } + else +#endif + dpos = new; + + /* If we don't have to do anything, then return. */ + if (cpos == dpos) + return; + + /* It may be faster to output a CR, and then move forwards instead + of moving backwards. */ + /* i == current physical cursor position. */ +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + i = _rl_last_c_pos; + else +#endif + i = _rl_last_c_pos - woff; + if (dpos == 0 || CR_FASTER (dpos, _rl_last_c_pos) || + (_rl_term_autowrap && i == _rl_screenwidth)) + { + _rl_cr (); + cpos = _rl_last_c_pos = 0; + } + + if (cpos < dpos) + { + /* Move the cursor forward. We do it by printing the command + to move the cursor forward if there is one, else print that + portion of the output buffer again. Which is cheaper? */ + + /* The above comment is left here for posterity. It is faster + to print one character (non-control) than to print a control + sequence telling the terminal to move forward one character. + That kind of control is for people who don't know what the + data is underneath the cursor. */ + + /* However, we need a handle on where the current display position is + in the buffer for the immediately preceding comment to be true. + In multibyte locales, we don't currently have that info available. + Without it, we don't know where the data we have to display begins + in the buffer and we have to go back to the beginning of the screen + line. In this case, we can use the terminal sequence to move forward + if it's available. */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + if (_rl_term_forward_char) + { + for (i = cpos; i < dpos; i++) + tputs (_rl_term_forward_char, 1, _rl_output_character_function); + } + else + { + _rl_cr (); + puts_face (data, dataf, new); + } + } + else + puts_face (data + cpos, dataf + cpos, new - cpos); + } + +#if defined (HANDLE_MULTIBYTE) + /* NEW points to the buffer point, but _rl_last_c_pos is the display point. + The byte length of the string is probably bigger than the column width + of the string, which means that if NEW == _rl_last_c_pos, then NEW's + display point is less than _rl_last_c_pos. */ +#endif + else if (cpos > dpos) + _rl_backspace (cpos - dpos); + + _rl_last_c_pos = dpos; +} + +/* PWP: move the cursor up or down. */ +void +_rl_move_vert (int to) +{ + register int delta, i; + + if (_rl_last_v_pos == to || to > _rl_screenheight) + return; + + if ((delta = to - _rl_last_v_pos) > 0) + { + for (i = 0; i < delta; i++) + putc ('\n', rl_outstream); + _rl_cr (); + _rl_last_c_pos = 0; + } + else + { /* delta < 0 */ +#ifdef __DJGPP__ + int row, col; + + fflush (rl_outstream); + ScreenGetCursor (&row, &col); + ScreenSetCursor (row + delta, col); + i = -delta; +#else + if (_rl_term_up && *_rl_term_up) + for (i = 0; i < -delta; i++) + tputs (_rl_term_up, 1, _rl_output_character_function); +#endif /* !__DJGPP__ */ + } + + _rl_last_v_pos = to; /* Now TO is here */ +} + +/* Physically print C on rl_outstream. This is for functions which know + how to optimize the display. Return the number of characters output. */ +int +rl_show_char (int c) +{ + int n = 1; + if (META_CHAR (c) && (_rl_output_meta_chars == 0)) + { + fprintf (rl_outstream, "M-"); + n += 2; + c = UNMETA (c); + } + +#if defined (DISPLAY_TABS) + if ((CTRL_CHAR (c) && c != '\t') || c == RUBOUT) +#else + if (CTRL_CHAR (c) || c == RUBOUT) +#endif /* !DISPLAY_TABS */ + { + fprintf (rl_outstream, "C-"); + n += 2; + c = CTRL_CHAR (c) ? UNCTRL (c) : '?'; + } + + putc (c, rl_outstream); + fflush (rl_outstream); + return n; +} + +int +rl_character_len (int c, int pos) +{ + unsigned char uc; + + uc = (unsigned char)c; + + if (META_CHAR (uc)) + return ((_rl_output_meta_chars == 0) ? 4 : 1); + + if (uc == '\t') + { +#if defined (DISPLAY_TABS) + return (((pos | 7) + 1) - pos); +#else + return (2); +#endif /* !DISPLAY_TABS */ + } + + if (CTRL_CHAR (c) || c == RUBOUT) + return (2); + + return ((ISPRINT (uc)) ? 1 : 2); +} +/* How to print things in the "echo-area". The prompt is treated as a + mini-modeline. */ +static int msg_saved_prompt = 0; + +#if defined (USE_VARARGS) +int +#if defined (PREFER_STDARG) +rl_message (const char *format, ...) +#else +rl_message (va_alist) + va_dcl +#endif +{ + va_list args; +#if defined (PREFER_VARARGS) + char *format; +#endif +#if defined (HAVE_VSNPRINTF) + int bneed; +#endif + +#if defined (PREFER_STDARG) + va_start (args, format); +#else + va_start (args); + format = va_arg (args, char *); +#endif + + if (msg_buf == 0) + msg_buf = xmalloc (msg_bufsiz = 128); + +#if defined (HAVE_VSNPRINTF) + bneed = vsnprintf (msg_buf, msg_bufsiz, format, args); + if (bneed >= msg_bufsiz - 1) + { + msg_bufsiz = bneed + 1; + msg_buf = xrealloc (msg_buf, msg_bufsiz); + va_end (args); + +#if defined (PREFER_STDARG) + va_start (args, format); +#else + va_start (args); + format = va_arg (args, char *); +#endif + vsnprintf (msg_buf, msg_bufsiz - 1, format, args); + } +#else + vsprintf (msg_buf, format, args); + msg_buf[msg_bufsiz - 1] = '\0'; /* overflow? */ +#endif + va_end (args); + + if (saved_local_prompt == 0) + { + rl_save_prompt (); + msg_saved_prompt = 1; + } + else if (local_prompt != saved_local_prompt) + { + FREE (local_prompt); + FREE (local_prompt_prefix); + local_prompt = (char *)NULL; + } + rl_display_prompt = msg_buf; + local_prompt = expand_prompt (msg_buf, 0, &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line, + &prompt_physical_chars); + local_prompt_prefix = (char *)NULL; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; + (*rl_redisplay_function) (); + + return 0; +} +#else /* !USE_VARARGS */ +int +rl_message (format, arg1, arg2) + char *format; +{ + if (msg_buf == 0) + msg_buf = xmalloc (msg_bufsiz = 128); + + sprintf (msg_buf, format, arg1, arg2); + msg_buf[msg_bufsiz - 1] = '\0'; /* overflow? */ + + rl_display_prompt = msg_buf; + if (saved_local_prompt == 0) + { + rl_save_prompt (); + msg_saved_prompt = 1; + } + else if (local_prompt != saved_local_prompt) + { + FREE (local_prompt); + FREE (local_prompt_prefix); + local_prompt = (char *)NULL; + } + local_prompt = expand_prompt (msg_buf, 0, &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line, + &prompt_physical_chars); + local_prompt_prefix = (char *)NULL; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; + (*rl_redisplay_function) (); + + return 0; +} +#endif /* !USE_VARARGS */ + +/* How to clear things from the "echo-area". */ +int +rl_clear_message (void) +{ + rl_display_prompt = rl_prompt; + if (msg_saved_prompt) + { + rl_restore_prompt (); + msg_saved_prompt = 0; + } + (*rl_redisplay_function) (); + return 0; +} + +int +rl_reset_line_state (void) +{ + rl_on_new_line (); + + rl_display_prompt = rl_prompt ? rl_prompt : ""; + forced_display = 1; + return 0; +} + +/* Save all of the variables associated with the prompt and its display. Most + of the complexity is dealing with the invisible characters in the prompt + string and where they are. There are enough of these that I should consider + a struct. */ +void +rl_save_prompt (void) +{ + saved_local_prompt = local_prompt; + saved_local_prefix = local_prompt_prefix; + saved_prefix_length = prompt_prefix_length; + saved_local_length = local_prompt_len; + saved_last_invisible = prompt_last_invisible; + saved_visible_length = prompt_visible_length; + saved_invis_chars_first_line = prompt_invis_chars_first_line; + saved_physical_chars = prompt_physical_chars; + saved_local_prompt_newlines = local_prompt_newlines; + + local_prompt = local_prompt_prefix = (char *)0; + local_prompt_len = 0; + local_prompt_newlines = (int *)0; + + prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0; + prompt_invis_chars_first_line = prompt_physical_chars = 0; +} + +void +rl_restore_prompt (void) +{ + FREE (local_prompt); + FREE (local_prompt_prefix); + FREE (local_prompt_newlines); + + local_prompt = saved_local_prompt; + local_prompt_prefix = saved_local_prefix; + local_prompt_len = saved_local_length; + local_prompt_newlines = saved_local_prompt_newlines; + + prompt_prefix_length = saved_prefix_length; + prompt_last_invisible = saved_last_invisible; + prompt_visible_length = saved_visible_length; + prompt_invis_chars_first_line = saved_invis_chars_first_line; + prompt_physical_chars = saved_physical_chars; + + /* can test saved_local_prompt to see if prompt info has been saved. */ + saved_local_prompt = saved_local_prefix = (char *)0; + saved_local_length = 0; + saved_last_invisible = saved_visible_length = saved_prefix_length = 0; + saved_invis_chars_first_line = saved_physical_chars = 0; + saved_local_prompt_newlines = 0; +} + +char * +_rl_make_prompt_for_search (int pchar) +{ + int len; + char *pmt, *p; + + rl_save_prompt (); + + /* We've saved the prompt, and can do anything with the various prompt + strings we need before they're restored. We want the unexpanded + portion of the prompt string after any final newline. */ + p = rl_prompt ? strrchr (rl_prompt, '\n') : 0; + if (p == 0) + { + len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; + pmt = (char *)xmalloc (len + 2); + if (len) + strcpy (pmt, rl_prompt); + pmt[len] = pchar; + pmt[len+1] = '\0'; + } + else + { + p++; + len = strlen (p); + pmt = (char *)xmalloc (len + 2); + if (len) + strcpy (pmt, p); + pmt[len] = pchar; + pmt[len+1] = '\0'; + } + + /* will be overwritten by expand_prompt, called from rl_message */ + prompt_physical_chars = saved_physical_chars + 1; + return pmt; +} + +/* Quick redisplay hack when erasing characters at the end of the line. */ +void +_rl_erase_at_end_of_line (int l) +{ + register int i; + + _rl_backspace (l); + for (i = 0; i < l; i++) + putc (' ', rl_outstream); + _rl_backspace (l); + for (i = 0; i < l; i++) + visible_line[--_rl_last_c_pos] = '\0'; + rl_display_fixed++; +} + +/* Clear to the end of the line. COUNT is the minimum + number of character spaces to clear, but we use a terminal escape + sequence if available. */ +void +_rl_clear_to_eol (int count) +{ +#ifndef __MSDOS__ + if (_rl_term_clreol) + tputs (_rl_term_clreol, 1, _rl_output_character_function); + else +#endif + if (count) + space_to_eol (count); +} + +/* Clear to the end of the line using spaces. COUNT is the minimum + number of character spaces to clear, */ +static void +space_to_eol (int count) +{ + register int i; + + for (i = 0; i < count; i++) + putc (' ', rl_outstream); + + _rl_last_c_pos += count; +} + +void +_rl_clear_screen (int clrscr) +{ +#if defined (__DJGPP__) + ScreenClear (); + ScreenSetCursor (0, 0); +#else + if (_rl_term_clrpag) + { + tputs (_rl_term_clrpag, 1, _rl_output_character_function); + if (clrscr && _rl_term_clrscroll) + tputs (_rl_term_clrscroll, 1, _rl_output_character_function); + } + else + rl_crlf (); +#endif /* __DJGPP__ */ +} + +/* Insert COUNT characters from STRING to the output stream at column COL. */ +static void +insert_some_chars (char *string, int count, int col) +{ + open_some_spaces (col); + _rl_output_some_chars (string, count); +} + +/* Insert COL spaces, keeping the cursor at the same position. We follow the + ncurses documentation and use either im/ei with explicit spaces, or IC/ic + by itself. We assume there will either be ei or we don't need to use it. */ +static void +open_some_spaces (int col) +{ +#if !defined (__MSDOS__) && (!defined (__MINGW32__) || defined (NCURSES_VERSION)) + char *buffer; + register int i; + + /* If IC is defined, then we do not have to "enter" insert mode. */ + if (_rl_term_IC) + { + buffer = tgoto (_rl_term_IC, 0, col); + tputs (buffer, 1, _rl_output_character_function); + } + else if (_rl_term_im && *_rl_term_im) + { + tputs (_rl_term_im, 1, _rl_output_character_function); + /* just output the desired number of spaces */ + for (i = col; i--; ) + _rl_output_character_function (' '); + /* If there is a string to turn off insert mode, use it now. */ + if (_rl_term_ei && *_rl_term_ei) + tputs (_rl_term_ei, 1, _rl_output_character_function); + /* and move back the right number of spaces */ + _rl_backspace (col); + } + else if (_rl_term_ic && *_rl_term_ic) + { + /* If there is a special command for inserting characters, then + use that first to open up the space. */ + for (i = col; i--; ) + tputs (_rl_term_ic, 1, _rl_output_character_function); + } +#endif /* !__MSDOS__ && (!__MINGW32__ || NCURSES_VERSION)*/ +} + +/* Delete COUNT characters from the display line. */ +static void +delete_chars (int count) +{ + if (count > _rl_screenwidth) /* XXX */ + return; + +#if !defined (__MSDOS__) && (!defined (__MINGW32__) || defined (NCURSES_VERSION)) + if (_rl_term_DC && *_rl_term_DC) + { + char *buffer; + buffer = tgoto (_rl_term_DC, count, count); + tputs (buffer, count, _rl_output_character_function); + } + else + { + if (_rl_term_dc && *_rl_term_dc) + while (count--) + tputs (_rl_term_dc, 1, _rl_output_character_function); + } +#endif /* !__MSDOS__ && (!__MINGW32__ || NCURSES_VERSION)*/ +} + +void +_rl_update_final (void) +{ + int full_lines, woff, botline_length; + + if (line_structures_initialized == 0) + return; + + full_lines = 0; + /* If the cursor is the only thing on an otherwise-blank last line, + compensate so we don't print an extra CRLF. */ + if (_rl_vis_botlin && _rl_last_c_pos == 0 && + visible_line[vis_lbreaks[_rl_vis_botlin]] == 0) + { + _rl_vis_botlin--; + full_lines = 1; + } + _rl_move_vert (_rl_vis_botlin); + woff = W_OFFSET(_rl_vis_botlin, wrap_offset); + botline_length = VIS_LLEN(_rl_vis_botlin) - woff; + /* If we've wrapped lines, remove the final xterm line-wrap flag. */ + if (full_lines && _rl_term_autowrap && botline_length == _rl_screenwidth) + { + char *last_line, *last_face; + + /* LAST_LINE includes invisible characters, so if you want to get the + last character of the first line, you have to take WOFF into account. + This needs to be done for both calls to _rl_move_cursor_relative, + which takes a buffer position as the first argument, and any direct + subscripts of LAST_LINE. */ + last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; /* = VIS_CHARS(_rl_vis_botlin); */ + last_face = &vis_face[vis_lbreaks[_rl_vis_botlin]]; /* = VIS_CHARS(_rl_vis_botlin); */ + cpos_buffer_position = -1; /* don't know where we are in buffer */ + _rl_move_cursor_relative (_rl_screenwidth - 1 + woff, last_line, last_face); /* XXX */ + _rl_clear_to_eol (0); + puts_face (&last_line[_rl_screenwidth - 1 + woff], + &last_face[_rl_screenwidth - 1 + woff], 1); + } + _rl_vis_botlin = 0; + if (botline_length > 0 || _rl_last_c_pos > 0) + rl_crlf (); + fflush (rl_outstream); + rl_display_fixed++; +} + +/* Move to the start of the current line. */ +static void +cr (void) +{ + _rl_cr (); + _rl_last_c_pos = 0; +} + +/* Redraw the last line of a multi-line prompt that may possibly contain + terminal escape sequences. Called with the cursor at column 0 of the + line to draw the prompt on. */ +static void +redraw_prompt (char *t) +{ + char *oldp; + + oldp = rl_display_prompt; + rl_save_prompt (); + + rl_display_prompt = t; + local_prompt = expand_prompt (t, PMT_MULTILINE, + &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line, + &prompt_physical_chars); + local_prompt_prefix = (char *)NULL; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; + + rl_forced_update_display (); + + rl_display_prompt = oldp; + rl_restore_prompt(); +} + +/* Redisplay the current line after a SIGWINCH is received. */ +void +_rl_redisplay_after_sigwinch (void) +{ + char *t; + + /* Clear the last line (assuming that the screen size change will result in + either more or fewer characters on that line only) and put the cursor at + column 0. Make sure the right thing happens if we have wrapped to a new + screen line. */ + if (_rl_term_cr) + { + _rl_move_vert (_rl_vis_botlin); + + _rl_cr (); + _rl_last_c_pos = 0; + +#if !defined (__MSDOS__) + if (_rl_term_clreol) + tputs (_rl_term_clreol, 1, _rl_output_character_function); + else +#endif + { + space_to_eol (_rl_screenwidth); + _rl_cr (); + } + + if (_rl_last_v_pos > 0) + _rl_move_vert (0); + } + else + rl_crlf (); + + /* Redraw only the last line of a multi-line prompt. */ + t = strrchr (rl_display_prompt, '\n'); + if (t) + redraw_prompt (++t); + else + rl_forced_update_display (); +} + +void +_rl_clean_up_for_exit (void) +{ + if (_rl_echoing_p) + { + if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */ + _rl_move_vert (_rl_vis_botlin); + _rl_vis_botlin = 0; + fflush (rl_outstream); + rl_restart_output (1, 0); + } +} + +void +_rl_erase_entire_line (void) +{ + cr (); + _rl_clear_to_eol (0); + cr (); + fflush (rl_outstream); +} + +void +_rl_ttyflush (void) +{ + fflush (rl_outstream); +} + +/* return the `current display line' of the cursor -- the number of lines to + move up to get to the first screen line of the current readline line. */ +int +_rl_current_display_line (void) +{ + int ret, nleft; + + /* Find out whether or not there might be invisible characters in the + editing buffer. */ + if (rl_display_prompt == rl_prompt) + nleft = _rl_last_c_pos - _rl_screenwidth - rl_visible_prompt_length; + else + nleft = _rl_last_c_pos - _rl_screenwidth; + + if (nleft > 0) + ret = 1 + nleft / _rl_screenwidth; + else + ret = 0; + + return ret; +} + +void +_rl_refresh_line (void) +{ + rl_clear_visible_line (); + rl_redraw_prompt_last_line (); + rl_keep_mark_active (); +} + +#if defined (HANDLE_MULTIBYTE) +/* Calculate the number of screen columns occupied by STR from START to END. + In the case of multibyte characters with stateful encoding, we have to + scan from the beginning of the string to take the state into account. */ +static int +_rl_col_width (const char *str, int start, int end, int flags) +{ + wchar_t wc; + mbstate_t ps; + int tmp, point, width, max; + + if (end <= start) + return 0; + if (MB_CUR_MAX == 1 || rl_byte_oriented) + /* this can happen in some cases where it's inconvenient to check */ + return (end - start); + + memset (&ps, 0, sizeof (mbstate_t)); + + point = 0; + max = end; + + /* Try to short-circuit common cases. The adjustment to remove wrap_offset + is done by the caller. */ + /* 1. prompt string */ + if (flags && start == 0 && end == local_prompt_len && memcmp (str, local_prompt, local_prompt_len) == 0) + return (prompt_physical_chars + wrap_offset); + /* 2. prompt string + line contents */ + else if (flags && start == 0 && local_prompt_len > 0 && end > local_prompt_len && local_prompt && memcmp (str, local_prompt, local_prompt_len) == 0) + { + tmp = prompt_physical_chars + wrap_offset; + /* XXX - try to call ourselves recursively with non-prompt portion */ + tmp += _rl_col_width (str, local_prompt_len, end, flags); + return (tmp); + } + + while (point < start) + { + if (_rl_utf8locale && UTF8_SINGLEBYTE(str[point])) + { + memset (&ps, 0, sizeof (mbstate_t)); + tmp = 1; + } + else + tmp = mbrlen (str + point, max, &ps); + if (MB_INVALIDCH ((size_t)tmp)) + { + /* In this case, the bytes are invalid or too short to compose a + multibyte character, so we assume that the first byte represents + a single character. */ + point++; + max--; + + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (MB_NULLWCH (tmp)) + break; /* Found '\0' */ + else + { + point += tmp; + max -= tmp; + } + } + + /* If START is not a byte that starts a character, then POINT will be + greater than START. In this case, assume that (POINT - START) gives + a byte count that is the number of columns of difference. */ + width = point - start; + + while (point < end) + { + if (_rl_utf8locale && UTF8_SINGLEBYTE(str[point])) + { + tmp = 1; + wc = (wchar_t) str[point]; + } + else + tmp = mbrtowc (&wc, str + point, max, &ps); + if (MB_INVALIDCH ((size_t)tmp)) + { + /* In this case, the bytes are invalid or too short to compose a + multibyte character, so we assume that the first byte represents + a single character. */ + point++; + max--; + + /* and assume that the byte occupies a single column. */ + width++; + + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (MB_NULLWCH (tmp)) + break; /* Found '\0' */ + else + { + point += tmp; + max -= tmp; + tmp = WCWIDTH(wc); + width += (tmp >= 0) ? tmp : 1; + } + } + + width += point - end; + + return width; +} +#endif /* HANDLE_MULTIBYTE */ diff --git a/bash-5.1/lib/readline/doc/Makefile b/bash-5.1/lib/readline/doc/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..af5ee3e572815f0020f371e3fd4f888f3bce878b --- /dev/null +++ b/bash-5.1/lib/readline/doc/Makefile @@ -0,0 +1,145 @@ +# Derived by hand from the generated readline-src/doc/Makefile +# This makefile for Readline library documentation is in -*- text -*- mode. +# Emacs likes it that way. + +# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# +# 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 . +# + + +topdir = . +srcdir = . +VPATH = . + +prefix = /usr/local +infodir = ${prefix}/info + +mandir = ${prefix}/man +manpfx = man + +man1ext = 1 +man1dir = $(mandir)/$(manpfx)$(man1ext) +man3ext = 3 +man3dir = $(mandir)/$(manpfx)$(man3ext) + +SHELL = /bin/sh +RM = rm -f + +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 + +BUILD_DIR = . +TEXINPUTDIR = $(srcdir) + +MAKEINFO = LANGUAGE= makeinfo +TEXI2DVI = $(srcdir)/texi2dvi +TEXI2HTML = $(srcdir)/texi2html +QUIETPS = #set this to -q to shut up dvips +PSDPI = 300 # I don't have any 600-dpi printers +DVIPS = dvips -D ${PSDPI} $(QUIETPS) -o $@ # tricky + +RLSRC = $(srcdir)/rlman.texi $(srcdir)/rluser.texi \ + $(srcdir)/rltech.texi $(srcdir)/version.texi \ + $(srcdir)/rluserman.texi +HISTSRC = $(srcdir)/history.texi $(srcdir)/hsuser.texi \ + $(srcdir)/hstech.texi $(srcdir)/version.texi + +# This should be a program that converts troff to an ascii-readable format +NROFF = groff -Tascii + +# This should be a program that converts troff to postscript +GROFF = groff + +DVIOBJ = readline.dvi history.dvi rluserman.dvi +INFOOBJ = readline.info history.info rluserman.info +PSOBJ = readline.ps history.ps rluserman.ps +HTMLOBJ = readline.html history.html rluserman.html + +INTERMEDIATE_OBJ = rlman.dvi + +CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) + +.SUFFIXES: .ps .txt .dvi + +all: info dvi html ps +nodvi: info html + +readline.dvi: $(RLSRC) + TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi + mv rlman.dvi readline.dvi + +readline.info: $(RLSRC) + $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi + +rluserman.dvi: $(RLSRC) + TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi + +rluserman.info: $(RLSRC) + $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi + +history.dvi: ${HISTSRC} + TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi + +history.info: ${HISTSRC} + $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi + +readline.ps: readline.dvi + $(RM) $@ + $(DVIPS) readline.dvi + +rluserman.ps: rluserman.dvi + $(RM) $@ + $(DVIPS) rluserman.dvi + +history.ps: history.dvi + $(RM) $@ + $(DVIPS) history.dvi + +readline.html: ${RLSRC} + $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi + sed -e 's:rlman.html:readline.html:' rlman.html > readline.html + $(RM) rlman.html + +rluserman.html: ${RLSRC} + $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi + +history.html: ${HISTSRC} + $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi + +info: $(INFOOBJ) +dvi: $(DVIOBJ) +ps: $(PSOBJ) +html: $(HTMLOBJ) + +clean: + $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \ + *.fns *.kys *.tps *.vrs *.o core + +distclean: clean + $(RM) $(CREATED_DOCS) + $(RM) $(INTERMEDIATE_OBJ) + $(RM) Makefile + +mostlyclean: clean + +maintainer-clean: clean + $(RM) $(CREATED_DOCS) + $(RM) $(INTERMEDIATE_OBJ) + $(RM) Makefile + +install: + @echo "This documentation should not be installed." + +uninstall: diff --git a/bash-5.1/lib/readline/doc/fdl.texi b/bash-5.1/lib/readline/doc/fdl.texi new file mode 100644 index 0000000000000000000000000000000000000000..8805f1a47d95e35dd768a735ccf9ec951ba29f06 --- /dev/null +++ b/bash-5.1/lib/readline/doc/fdl.texi @@ -0,0 +1,506 @@ +@c The GNU Free Documentation License. +@center Version 1.3, 3 November 2008 + +@c This file is intended to be included within another document, +@c hence no sectioning command or @node. + +@display +Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. +@uref{http://fsf.org/} + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +@end display + +@enumerate 0 +@item +PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document @dfn{free} in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of ``copyleft'', which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + +@item +APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A ``Modified Version'' of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A ``Secondary Section'' is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The ``Invariant Sections'' are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The ``Cover Texts'' are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A ``Transparent'' copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. + +Examples of suitable formats for Transparent copies include plain +@sc{ascii} without markup, Texinfo input format, La@TeX{} input +format, @acronym{SGML} or @acronym{XML} using a publicly available +@acronym{DTD}, and standard-conforming simple @acronym{HTML}, +PostScript or @acronym{PDF} designed for human modification. Examples +of transparent image formats include @acronym{PNG}, @acronym{XCF} and +@acronym{JPG}. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, @acronym{SGML} or +@acronym{XML} for which the @acronym{DTD} and/or processing tools are +not generally available, and the machine-generated @acronym{HTML}, +PostScript or @acronym{PDF} produced by some word processors for +output purposes only. + +The ``Title Page'' means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, ``Title Page'' means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The ``publisher'' means any person or entity that distributes copies +of the Document to the public. + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +@item +VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + +@item +COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + +@item +MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +@enumerate A +@item +Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +@item +List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. + +@item +State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +@item +Preserve all the copyright notices of the Document. + +@item +Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +@item +Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +@item +Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document's license notice. + +@item +Include an unaltered copy of this License. + +@item +Preserve the section Entitled ``History'', Preserve its Title, and add +to it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section Entitled ``History'' in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +@item +Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the ``History'' section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +@item +For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. + +@item +Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +@item +Delete any section Entitled ``Endorsements''. Such a section +may not be included in the Modified Version. + +@item +Do not retitle any existing section to be Entitled ``Endorsements'' or +to conflict in title with any Invariant Section. + +@item +Preserve any Warranty Disclaimers. +@end enumerate + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled ``Endorsements'', provided it contains +nothing but endorsements of your Modified Version by various +parties---for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + +@item +COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all +sections Entitled ``Endorsements.'' + +@item +COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + +@item +AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + +@item +TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + +@item +TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. + +@item +FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +@uref{http://www.gnu.org/copyleft/}. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +@item +RELICENSING + +``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the +site means any set of copyrightable works thus published on the MMC +site. + +``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +``Incorporate'' means to publish or republish a Document, in whole or +in part, as part of another Document. + +An MMC is ``eligible for relicensing'' if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + +@end enumerate + +@page +@heading ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample +@group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +@end group +@end smallexample + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with@dots{}Texts.'' line with this: + +@smallexample +@group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. +@end group +@end smallexample + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +@c Local Variables: +@c ispell-local-pdict: "ispell-dict" +@c End: + diff --git a/bash-5.1/lib/readline/doc/history.texi b/bash-5.1/lib/readline/doc/history.texi new file mode 100644 index 0000000000000000000000000000000000000000..7a3a4767e7a591ded5f14e0b4879cd4a28358e37 --- /dev/null +++ b/bash-5.1/lib/readline/doc/history.texi @@ -0,0 +1,85 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header (This is for running Texinfo on a region.) +@setfilename history.info +@settitle GNU History Library +@include version.texi + +@c %**end of header (This is for running Texinfo on a region.) + +@copying +This document describes the GNU History library +(version @value{VERSION}, @value{UPDATED}), +a programming tool that provides a consistent user interface for +recalling lines of previously typed input. + +Copyright @copyright{} 1988--2020 Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``GNU Free Documentation License''. + +@end quotation +@end copying + +@dircategory Libraries +@direntry +* History: (history). The GNU history library API. +@end direntry + +@titlepage +@title GNU History Library +@subtitle Edition @value{EDITION}, for @code{History Library} Version @value{VERSION}. +@subtitle @value{UPDATED-MONTH} +@author Chet Ramey, Case Western Reserve University +@author Brian Fox, Free Software Foundation + +@page + +@vskip 0pt plus 1filll +@insertcopying + +@end titlepage + +@contents + +@ifnottex +@node Top +@top GNU History Library + +This document describes the GNU History library, a programming tool that +provides a consistent user interface for recalling lines of previously +typed input. + +@menu +* Using History Interactively:: GNU History User's Manual. +* Programming with GNU History:: GNU History Programmer's Manual. +* GNU Free Documentation License:: License for copying this manual. +* Concept Index:: Index of concepts described in this manual. +* Function and Variable Index:: Index of externally visible functions + and variables. +@end menu +@end ifnottex + +@syncodeindex fn vr + +@include hsuser.texi +@include hstech.texi + +@node GNU Free Documentation License +@appendix GNU Free Documentation License + +@include fdl.texi + +@node Concept Index +@appendix Concept Index +@printindex cp + +@node Function and Variable Index +@appendix Function and Variable Index +@printindex vr + +@bye diff --git a/bash-5.1/lib/readline/doc/hstech.texi b/bash-5.1/lib/readline/doc/hstech.texi new file mode 100644 index 0000000000000000000000000000000000000000..7ac11953df304255a3f64424ab073656ab731e84 --- /dev/null +++ b/bash-5.1/lib/readline/doc/hstech.texi @@ -0,0 +1,602 @@ +@ignore +This file documents the user interface to the GNU History library. + +Copyright (C) 1988-2020 Free Software Foundation, Inc. +Authored by Brian Fox and Chet Ramey. + +Permission is granted to make and distribute verbatim copies of this manual +provided the copyright notice and this permission notice are preserved on +all copies. + +Permission is granted to process this file through Tex and print the +results, provided the printed document carries copying permission notice +identical to this one except for the removal of this paragraph (this +paragraph not being relevant to the printed manual). + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +GNU Copyright statement is available to the distributee, and provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions. +@end ignore + +@node Programming with GNU History +@chapter Programming with GNU History + +This chapter describes how to interface programs that you write +with the @sc{gnu} History Library. +It should be considered a technical guide. +For information on the interactive use of @sc{gnu} History, @pxref{Using +History Interactively}. + +@menu +* Introduction to History:: What is the GNU History library for? +* History Storage:: How information is stored. +* History Functions:: Functions that you can use. +* History Variables:: Variables that control behaviour. +* History Programming Example:: Example of using the GNU History Library. +@end menu + +@node Introduction to History +@section Introduction to History + +Many programs read input from the user a line at a time. The @sc{gnu} +History library is able to keep track of those lines, associate arbitrary +data with each line, and utilize information from previous lines in +composing new ones. + +A programmer using the History library has available functions +for remembering lines on a history list, associating arbitrary data +with a line, removing lines from the list, searching through the list +for a line containing an arbitrary text string, and referencing any line +in the list directly. In addition, a history @dfn{expansion} function +is available which provides for a consistent user interface across +different programs. + +The user using programs written with the History library has the +benefit of a consistent user interface with a set of well-known +commands for manipulating the text of previous lines and using that text +in new commands. The basic history manipulation commands are similar to +the history substitution provided by @code{csh}. + +The programmer can also use the Readline library, which +includes some history manipulation by default, and has the added +advantage of command line editing. + +Before declaring any functions using any functionality the History +library provides in other code, an application writer should include +the file @code{} in any file that uses the +History library's features. It supplies extern declarations for all +of the library's public functions and variables, and declares all of +the public data structures. + +@node History Storage +@section History Storage + +The history list is an array of history entries. A history entry is +declared as follows: + +@example +typedef void *histdata_t; + +typedef struct _hist_entry @{ + char *line; + char *timestamp; + histdata_t data; +@} HIST_ENTRY; +@end example + +The history list itself might therefore be declared as + +@example +HIST_ENTRY **the_history_list; +@end example + +The state of the History library is encapsulated into a single structure: + +@example +/* + * A structure used to pass around the current state of the history. + */ +typedef struct _hist_state @{ + HIST_ENTRY **entries; /* Pointer to the entries themselves. */ + int offset; /* The location pointer within this array. */ + int length; /* Number of elements within this array. */ + int size; /* Number of slots allocated to this array. */ + int flags; +@} HISTORY_STATE; +@end example + +If the flags member includes @code{HS_STIFLED}, the history has been +stifled. + +@node History Functions +@section History Functions + +This section describes the calling sequence for the various functions +exported by the @sc{gnu} History library. + +@menu +* Initializing History and State Management:: Functions to call when you + want to use history in a + program. +* History List Management:: Functions used to manage the list + of history entries. +* Information About the History List:: Functions returning information about + the history list. +* Moving Around the History List:: Functions used to change the position + in the history list. +* Searching the History List:: Functions to search the history list + for entries containing a string. +* Managing the History File:: Functions that read and write a file + containing the history list. +* History Expansion:: Functions to perform csh-like history + expansion. +@end menu + +@node Initializing History and State Management +@subsection Initializing History and State Management + +This section describes functions used to initialize and manage +the state of the History library when you want to use the history +functions in your program. + +@deftypefun void using_history (void) +Begin a session in which the history functions might be used. This +initializes the interactive variables. +@end deftypefun + +@deftypefun {HISTORY_STATE *} history_get_history_state (void) +Return a structure describing the current state of the input history. +@end deftypefun + +@deftypefun void history_set_history_state (HISTORY_STATE *state) +Set the state of the history list according to @var{state}. +@end deftypefun + +@node History List Management +@subsection History List Management + +These functions manage individual entries on the history list, or set +parameters managing the list itself. + +@deftypefun void add_history (const char *string) +Place @var{string} at the end of the history list. The associated data +field (if any) is set to @code{NULL}. +If the maximum number of history entries has been set using +@code{stifle_history()}, and the new number of history entries would exceed +that maximum, the oldest history entry is removed. +@end deftypefun + +@deftypefun void add_history_time (const char *string) +Change the time stamp associated with the most recent history entry to +@var{string}. +@end deftypefun + +@deftypefun {HIST_ENTRY *} remove_history (int which) +Remove history entry at offset @var{which} from the history. The +removed element is returned so you can free the line, data, +and containing structure. +@end deftypefun + +@deftypefun {histdata_t} free_history_entry (HIST_ENTRY *histent) +Free the history entry @var{histent} and any history library private +data associated with it. Returns the application-specific data +so the caller can dispose of it. +@end deftypefun + +@deftypefun {HIST_ENTRY *} replace_history_entry (int which, const char *line, histdata_t data) +Make the history entry at offset @var{which} have @var{line} and @var{data}. +This returns the old entry so the caller can dispose of any +application-specific data. In the case +of an invalid @var{which}, a @code{NULL} pointer is returned. +@end deftypefun + +@deftypefun void clear_history (void) +Clear the history list by deleting all the entries. +@end deftypefun + +@deftypefun void stifle_history (int max) +Stifle the history list, remembering only the last @var{max} entries. +The history list will contain only @var{max} entries at a time. +@end deftypefun + +@deftypefun int unstifle_history (void) +Stop stifling the history. This returns the previously-set +maximum number of history entries (as set by @code{stifle_history()}). +The value is positive if the history was +stifled, negative if it wasn't. +@end deftypefun + +@deftypefun int history_is_stifled (void) +Returns non-zero if the history is stifled, zero if it is not. +@end deftypefun + +@node Information About the History List +@subsection Information About the History List + +These functions return information about the entire history list or +individual list entries. + +@deftypefun {HIST_ENTRY **} history_list (void) +Return a @code{NULL} terminated array of @code{HIST_ENTRY *} which is the +current input history. Element 0 of this list is the beginning of time. +If there is no history, return @code{NULL}. +@end deftypefun + +@deftypefun int where_history (void) +Returns the offset of the current history element. +@end deftypefun + +@deftypefun {HIST_ENTRY *} current_history (void) +Return the history entry at the current position, as determined by +@code{where_history()}. If there is no entry there, return a @code{NULL} +pointer. +@end deftypefun + +@deftypefun {HIST_ENTRY *} history_get (int offset) +Return the history entry at position @var{offset}. +The range of valid +values of @var{offset} starts at @code{history_base} and ends at +@var{history_length} - 1 (@pxref{History Variables}). +If there is no entry there, or if @var{offset} is outside the valid +range, return a @code{NULL} pointer. +@end deftypefun + +@deftypefun time_t history_get_time (HIST_ENTRY *entry) +Return the time stamp associated with the history entry @var{entry}. +If the timestamp is missing or invalid, return 0. +@end deftypefun + +@deftypefun int history_total_bytes (void) +Return the number of bytes that the primary history entries are using. +This function returns the sum of the lengths of all the lines in the +history. +@end deftypefun + +@node Moving Around the History List +@subsection Moving Around the History List + +These functions allow the current index into the history list to be +set or changed. + +@deftypefun int history_set_pos (int pos) +Set the current history offset to @var{pos}, an absolute index +into the list. +Returns 1 on success, 0 if @var{pos} is less than zero or greater +than the number of history entries. +@end deftypefun + +@deftypefun {HIST_ENTRY *} previous_history (void) +Back up the current history offset to the previous history entry, and +return a pointer to that entry. If there is no previous entry, return +a @code{NULL} pointer. +@end deftypefun + +@deftypefun {HIST_ENTRY *} next_history (void) +If the current history offset refers to a valid history entry, +increment the current history offset. +If the possibly-incremented history offset refers to a valid history +entry, return a pointer to that entry; +otherwise, return a @code{BNULL} pointer. +@end deftypefun + +@node Searching the History List +@subsection Searching the History List +@cindex History Searching + +These functions allow searching of the history list for entries containing +a specific string. Searching may be performed both forward and backward +from the current history position. The search may be @dfn{anchored}, +meaning that the string must match at the beginning of the history entry. +@cindex anchored search + +@deftypefun int history_search (const char *string, int direction) +Search the history for @var{string}, starting at the current history offset. +If @var{direction} is less than 0, then the search is through +previous entries, otherwise through subsequent entries. +If @var{string} is found, then +the current history index is set to that history entry, and the value +returned is the offset in the line of the entry where +@var{string} was found. Otherwise, nothing is changed, and a -1 is +returned. +@end deftypefun + +@deftypefun int history_search_prefix (const char *string, int direction) +Search the history for @var{string}, starting at the current history +offset. The search is anchored: matching lines must begin with +@var{string}. If @var{direction} is less than 0, then the search is +through previous entries, otherwise through subsequent entries. +If @var{string} is found, then the +current history index is set to that entry, and the return value is 0. +Otherwise, nothing is changed, and a -1 is returned. +@end deftypefun + +@deftypefun int history_search_pos (const char *string, int direction, int pos) +Search for @var{string} in the history list, starting at @var{pos}, an +absolute index into the list. If @var{direction} is negative, the search +proceeds backward from @var{pos}, otherwise forward. Returns the absolute +index of the history element where @var{string} was found, or -1 otherwise. +@end deftypefun + +@node Managing the History File +@subsection Managing the History File + +The History library can read the history from and write it to a file. +This section documents the functions for managing a history file. + +@deftypefun int read_history (const char *filename) +Add the contents of @var{filename} to the history list, a line at a time. +If @var{filename} is @code{NULL}, then read from @file{~/.history}. +Returns 0 if successful, or @code{errno} if not. +@end deftypefun + +@deftypefun int read_history_range (const char *filename, int from, int to) +Read a range of lines from @var{filename}, adding them to the history list. +Start reading at line @var{from} and end at @var{to}. +If @var{from} is zero, start at the beginning. If @var{to} is less than +@var{from}, then read until the end of the file. If @var{filename} is +@code{NULL}, then read from @file{~/.history}. Returns 0 if successful, +or @code{errno} if not. +@end deftypefun + +@deftypefun int write_history (const char *filename) +Write the current history to @var{filename}, overwriting @var{filename} +if necessary. +If @var{filename} is @code{NULL}, then write the history list to +@file{~/.history}. +Returns 0 on success, or @code{errno} on a read or write error. +@end deftypefun + +@deftypefun int append_history (int nelements, const char *filename) +Append the last @var{nelements} of the history list to @var{filename}. +If @var{filename} is @code{NULL}, then append to @file{~/.history}. +Returns 0 on success, or @code{errno} on a read or write error. +@end deftypefun + +@deftypefun int history_truncate_file (const char *filename, int nlines) +Truncate the history file @var{filename}, leaving only the last +@var{nlines} lines. +If @var{filename} is @code{NULL}, then @file{~/.history} is truncated. +Returns 0 on success, or @code{errno} on failure. +@end deftypefun + +@node History Expansion +@subsection History Expansion + +These functions implement history expansion. + +@deftypefun int history_expand (char *string, char **output) +Expand @var{string}, placing the result into @var{output}, a pointer +to a string (@pxref{History Interaction}). Returns: +@table @code +@item 0 +If no expansions took place (or, if the only change in +the text was the removal of escape characters preceding the history expansion +character); +@item 1 +if expansions did take place; +@item -1 +if there was an error in expansion; +@item 2 +if the returned line should be displayed, but not executed, +as with the @code{:p} modifier (@pxref{Modifiers}). +@end table + +If an error occurred in expansion, then @var{output} contains a descriptive +error message. +@end deftypefun + +@deftypefun {char *} get_history_event (const char *string, int *cindex, int qchar) +Returns the text of the history event beginning at @var{string} + +@var{*cindex}. @var{*cindex} is modified to point to after the event +specifier. At function entry, @var{cindex} points to the index into +@var{string} where the history event specification begins. @var{qchar} +is a character that is allowed to end the event specification in addition +to the ``normal'' terminating characters. +@end deftypefun + +@deftypefun {char **} history_tokenize (const char *string) +Return an array of tokens parsed out of @var{string}, much as the +shell might. The tokens are split on the characters in the +@var{history_word_delimiters} variable, +and shell quoting conventions are obeyed as described below. +@end deftypefun + +@deftypefun {char *} history_arg_extract (int first, int last, const char *string) +Extract a string segment consisting of the @var{first} through @var{last} +arguments present in @var{string}. Arguments are split using +@code{history_tokenize}. +@end deftypefun + +@node History Variables +@section History Variables + +This section describes the externally-visible variables exported by +the @sc{gnu} History Library. + +@deftypevar int history_base +The logical offset of the first entry in the history list. +@end deftypevar + +@deftypevar int history_length +The number of entries currently stored in the history list. +@end deftypevar + +@deftypevar int history_max_entries +The maximum number of history entries. This must be changed using +@code{stifle_history()}. +@end deftypevar + +@deftypevar int history_write_timestamps +If non-zero, timestamps are written to the history file, so they can be +preserved between sessions. The default value is 0, meaning that +timestamps are not saved. + +The current timestamp format uses the value of @var{history_comment_char} +to delimit timestamp entries in the history file. If that variable does +not have a value (the default), timestamps will not be written. +@end deftypevar + +@deftypevar char history_expansion_char +The character that introduces a history event. The default is @samp{!}. +Setting this to 0 inhibits history expansion. +@end deftypevar + +@deftypevar char history_subst_char +The character that invokes word substitution if found at the start of +a line. The default is @samp{^}. +@end deftypevar + +@deftypevar char history_comment_char +During tokenization, if this character is seen as the first character +of a word, then it and all subsequent characters up to a newline are +ignored, suppressing history expansion for the remainder of the line. +This is disabled by default. +@end deftypevar + +@deftypevar {char *} history_word_delimiters +The characters that separate tokens for @code{history_tokenize()}. +The default value is @code{" \t\n()<>;&|"}. +@end deftypevar + +@deftypevar {char *} history_search_delimiter_chars +The list of additional characters which can delimit a history search +string, in addition to space, TAB, @samp{:} and @samp{?} in the case of +a substring search. The default is empty. +@end deftypevar + +@deftypevar {char *} history_no_expand_chars +The list of characters which inhibit history expansion if found immediately +following @var{history_expansion_char}. The default is space, tab, newline, +carriage return, and @samp{=}. +@end deftypevar + +@deftypevar int history_quotes_inhibit_expansion +If non-zero, the history expansion code implements shell-like quoting: +single-quoted words are not scanned for the history expansion +character or the history comment character, and double-quoted words may +have history expansion performed, since single quotes are not special +within double quotes. +The default value is 0. +@end deftypevar + +@deftypevar int history_quoting_state +An application may set this variable to indicate that the current line +being expanded is subject to existing quoting. If set to @samp{'}, the +history expansion function will assume that the line is single-quoted and +inhibit expansion until it reads an unquoted closing single quote; if set +to @samp{"}, history expansion will assume the line is double quoted until +it reads an unquoted closing double quote. If set to zero, the default, +the history expansion function will assume the line is not quoted and +treat quote characters within the line as described above. +This is only effective if @var{history_quotes_inhibit_expansion} is set. +@end deftypevar + +@deftypevar {rl_linebuf_func_t *} history_inhibit_expansion_function +This should be set to the address of a function that takes two arguments: +a @code{char *} (@var{string}) +and an @code{int} index into that string (@var{i}). +It should return a non-zero value if the history expansion starting at +@var{string[i]} should not be performed; zero if the expansion should +be done. +It is intended for use by applications like Bash that use the history +expansion character for additional purposes. +By default, this variable is set to @code{NULL}. +@end deftypevar + +@node History Programming Example +@section History Programming Example + +The following program demonstrates simple use of the @sc{gnu} History Library. + +@smallexample +#include +#include + +main (argc, argv) + int argc; + char **argv; +@{ + char line[1024], *t; + int len, done = 0; + + line[0] = 0; + + using_history (); + while (!done) + @{ + printf ("history$ "); + fflush (stdout); + t = fgets (line, sizeof (line) - 1, stdin); + if (t && *t) + @{ + len = strlen (t); + if (t[len - 1] == '\n') + t[len - 1] = '\0'; + @} + + if (!t) + strcpy (line, "quit"); + + if (line[0]) + @{ + char *expansion; + int result; + + result = history_expand (line, &expansion); + if (result) + fprintf (stderr, "%s\n", expansion); + + if (result < 0 || result == 2) + @{ + free (expansion); + continue; + @} + + add_history (expansion); + strncpy (line, expansion, sizeof (line) - 1); + free (expansion); + @} + + if (strcmp (line, "quit") == 0) + done = 1; + else if (strcmp (line, "save") == 0) + write_history ("history_file"); + else if (strcmp (line, "read") == 0) + read_history ("history_file"); + else if (strcmp (line, "list") == 0) + @{ + register HIST_ENTRY **the_list; + register int i; + + the_list = history_list (); + if (the_list) + for (i = 0; the_list[i]; i++) + printf ("%d: %s\n", i + history_base, the_list[i]->line); + @} + else if (strncmp (line, "delete", 6) == 0) + @{ + int which; + if ((sscanf (line + 6, "%d", &which)) == 1) + @{ + HIST_ENTRY *entry = remove_history (which); + if (!entry) + fprintf (stderr, "No such entry %d\n", which); + else + @{ + free (entry->line); + free (entry); + @} + @} + else + @{ + fprintf (stderr, "non-numeric arg given to `delete'\n"); + @} + @} + @} +@} +@end smallexample diff --git a/bash-5.1/lib/readline/doc/hsuser.texi b/bash-5.1/lib/readline/doc/hsuser.texi new file mode 100644 index 0000000000000000000000000000000000000000..b8fedf331f10a9577cf195a95c69ce7c6b089fbb --- /dev/null +++ b/bash-5.1/lib/readline/doc/hsuser.texi @@ -0,0 +1,527 @@ +@ignore +This file documents the user interface to the GNU History library. + +Copyright (C) 1988--2020 Free Software Foundation, Inc. +Authored by Brian Fox and Chet Ramey. + +Permission is granted to make and distribute verbatim copies of this manual +provided the copyright notice and this permission notice are preserved on +all copies. + +Permission is granted to process this file through Tex and print the +results, provided the printed document carries copying permission notice +identical to this one except for the removal of this paragraph (this +paragraph not being relevant to the printed manual). + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +GNU Copyright statement is available to the distributee, and provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions. +@end ignore + +@node Using History Interactively +@chapter Using History Interactively + +@ifclear BashFeatures +@defcodeindex bt +@end ifclear + +@ifset BashFeatures +This chapter describes how to use the @sc{gnu} History Library +interactively, from a user's standpoint. +It should be considered a user's guide. +For information on using the @sc{gnu} History Library in other programs, +see the @sc{gnu} Readline Library Manual. +@end ifset +@ifclear BashFeatures +This chapter describes how to use the @sc{gnu} History Library interactively, +from a user's standpoint. It should be considered a user's guide. For +information on using the @sc{gnu} History Library in your own programs, +@pxref{Programming with GNU History}. +@end ifclear + +@ifset BashFeatures +@menu +* Bash History Facilities:: How Bash lets you manipulate your command + history. +* Bash History Builtins:: The Bash builtin commands that manipulate + the command history. +* History Interaction:: What it feels like using History as a user. +@end menu +@end ifset +@ifclear BashFeatures +@menu +* History Interaction:: What it feels like using History as a user. +@end menu +@end ifclear + +@ifset BashFeatures +@node Bash History Facilities +@section Bash History Facilities +@cindex command history +@cindex history list + +When the @option{-o history} option to the @code{set} builtin +is enabled (@pxref{The Set Builtin}), +the shell provides access to the @dfn{command history}, +the list of commands previously typed. +The value of the @env{HISTSIZE} shell variable is used as the +number of commands to save in a history list. +The text of the last @env{$HISTSIZE} +commands (default 500) is saved. +The shell stores each command in the history list prior to +parameter and variable expansion +but after history expansion is performed, subject to the +values of the shell variables +@env{HISTIGNORE} and @env{HISTCONTROL}. + +When the shell starts up, the history is initialized from the +file named by the @env{HISTFILE} variable (default @file{~/.bash_history}). +The file named by the value of @env{HISTFILE} is truncated, if +necessary, to contain no more than the number of lines specified by +the value of the @env{HISTFILESIZE} variable. +When a shell with history enabled exits, the last +@env{$HISTSIZE} lines are copied from the history list to the file +named by @env{$HISTFILE}. +If the @code{histappend} shell option is set (@pxref{Bash Builtins}), +the lines are appended to the history file, +otherwise the history file is overwritten. +If @env{HISTFILE} +is unset, or if the history file is unwritable, the history is not saved. +After saving the history, the history file is truncated +to contain no more than @env{$HISTFILESIZE} lines. +If @env{HISTFILESIZE} is unset, or set to null, a non-numeric value, or +a numeric value less than zero, the history file is not truncated. + +If the @env{HISTTIMEFORMAT} is set, the time stamp information +associated with each history entry is written to the history file, +marked with the history comment character. +When the history file is read, lines beginning with the history +comment character followed immediately by a digit are interpreted +as timestamps for the following history entry. + +The builtin command @code{fc} may be used to list or edit and re-execute +a portion of the history list. +The @code{history} builtin may be used to display or modify the history +list and manipulate the history file. +When using command-line editing, search commands +are available in each editing mode that provide access to the +history list (@pxref{Commands For History}). + +The shell allows control over which commands are saved on the history +list. The @env{HISTCONTROL} and @env{HISTIGNORE} +variables may be set to cause the shell to save only a subset of the +commands entered. +The @code{cmdhist} +shell option, if enabled, causes the shell to attempt to save each +line of a multi-line command in the same history entry, adding +semicolons where necessary to preserve syntactic correctness. +The @code{lithist} +shell option causes the shell to save the command with embedded newlines +instead of semicolons. +The @code{shopt} builtin is used to set these options. +@xref{The Shopt Builtin}, for a description of @code{shopt}. + +@node Bash History Builtins +@section Bash History Builtins +@cindex history builtins + +Bash provides two builtin commands which manipulate the +history list and history file. + +@table @code + +@item fc +@btindex fc +@example +@code{fc [-e @var{ename}] [-lnr] [@var{first}] [@var{last}]} +@code{fc -s [@var{pat}=@var{rep}] [@var{command}]} +@end example + +The first form selects a range of commands from @var{first} to +@var{last} from the history list and displays or edits and re-executes +them. +Both @var{first} and +@var{last} may be specified as a string (to locate the most recent +command beginning with that string) or as a number (an index into the +history list, where a negative number is used as an offset from the +current command number). + +When listing, a @var{first} or @var{last} of 0 is equivalent to -1 +and -0 is equivalent to the current command (usually the @code{fc} +command); +otherwise 0 is equivalent to -1 and -0 is invalid. + +If @var{last} is not specified, it is set to +@var{first}. If @var{first} is not specified, it is set to the previous +command for editing and @minus{}16 for listing. If the @option{-l} flag is +given, the commands are listed on standard output. The @option{-n} flag +suppresses the command numbers when listing. The @option{-r} flag +reverses the order of the listing. Otherwise, the editor given by +@var{ename} is invoked on a file containing those commands. If +@var{ename} is not given, the value of the following variable expansion +is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the +value of the @env{FCEDIT} variable if set, or the value of the +@env{EDITOR} variable if that is set, or @code{vi} if neither is set. +When editing is complete, the edited commands are echoed and executed. + +In the second form, @var{command} is re-executed after each instance +of @var{pat} in the selected command is replaced by @var{rep}. +@var{command} is interpreted the same as @var{first} above. + +A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so +that typing @samp{r cc} runs the last command beginning with @code{cc} +and typing @samp{r} re-executes the last command (@pxref{Aliases}). + +@item history +@btindex history +@example +history [@var{n}] +history -c +history -d @var{offset} +history -d @var{start}-@var{end} +history [-anrw] [@var{filename}] +history -ps @var{arg} +@end example + +With no options, display the history list with line numbers. +Lines prefixed with a @samp{*} have been modified. +An argument of @var{n} lists only the last @var{n} lines. +If the shell variable @env{HISTTIMEFORMAT} is set and not null, +it is used as a format string for @var{strftime} to display +the time stamp associated with each displayed history entry. +No intervening blank is printed between the formatted time stamp +and the history line. + +Options, if supplied, have the following meanings: + +@table @code +@item -c +Clear the history list. This may be combined +with the other options to replace the history list completely. + +@item -d @var{offset} +Delete the history entry at position @var{offset}. +If @var{offset} is positive, it should be specified as it appears when +the history is displayed. +If @var{offset} is negative, it is interpreted as relative to one greater +than the last history position, so negative indices count back from the +end of the history, and an index of @samp{-1} refers to the current +@code{history -d} command. + +@item -d @var{start}-@var{end} +Delete the history entries between positions @var{start} and @var{end}, +inclusive. Positive and negative values for @var{start} and @var{end} +are interpreted as described above. + +@item -a +Append the new history lines to the history file. +These are history lines entered since the beginning of the current +Bash session, but not already appended to the history file. + +@item -n +Append the history lines not already read from the history file +to the current history list. These are lines appended to the history +file since the beginning of the current Bash session. + +@item -r +Read the history file and append its contents to +the history list. + +@item -w +Write out the current history list to the history file. + +@item -p +Perform history substitution on the @var{arg}s and display the result +on the standard output, without storing the results in the history list. + +@item -s +The @var{arg}s are added to the end of +the history list as a single entry. + +@end table + +When any of the @option{-w}, @option{-r}, @option{-a}, or @option{-n} options is +used, if @var{filename} +is given, then it is used as the history file. If not, then +the value of the @env{HISTFILE} variable is used. + +@end table +@end ifset + +@node History Interaction +@section History Expansion +@cindex history expansion + +The History library provides a history expansion feature that is similar +to the history expansion provided by @code{csh}. This section +describes the syntax used to manipulate the history information. + +History expansions introduce words from the history list into +the input stream, making it easy to repeat commands, insert the +arguments to a previous command into the current input line, or +fix errors in previous commands quickly. + +@ifset BashFeatures +History expansion is performed immediately after a complete line +is read, before the shell breaks it into words, and is performed +on each line individually. Bash attempts to inform the history +expansion functions about quoting still in effect from previous lines. +@end ifset + +History expansion takes place in two parts. The first is to determine +which line from the history list should be used during substitution. +The second is to select portions of that line for inclusion into the +current one. The line selected from the history is called the +@dfn{event}, and the portions of that line that are acted upon are +called @dfn{words}. Various @dfn{modifiers} are available to manipulate +the selected words. The line is broken into words in the same fashion +that Bash does, so that several words +surrounded by quotes are considered one word. +History expansions are introduced by the appearance of the +history expansion character, which is @samp{!} by default. + +History expansion implements shell-like quoting conventions: +a backslash can be used to remove the special handling for the next character; +single quotes enclose verbatim sequences of characters, and can be used to +inhibit history expansion; +and characters enclosed within double quotes may be subject to history +expansion, since backslash can escape the history expansion character, +but single quotes may not, since they are not treated specially within +double quotes. + +@ifset BashFeatures +When using the shell, only @samp{\} and @samp{'} may be used to escape the +history expansion character, but the history expansion character is +also treated as quoted if it immediately precedes the closing double quote +in a double-quoted string. +@end ifset + +@ifset BashFeatures +Several shell options settable with the @code{shopt} +builtin (@pxref{The Shopt Builtin}) may be used to tailor +the behavior of history expansion. If the +@code{histverify} shell option is enabled, and Readline +is being used, history substitutions are not immediately passed to +the shell parser. +Instead, the expanded line is reloaded into the Readline +editing buffer for further modification. +If Readline is being used, and the @code{histreedit} +shell option is enabled, a failed history expansion will be +reloaded into the Readline editing buffer for correction. +The @option{-p} option to the @code{history} builtin command +may be used to see what a history expansion will do before using it. +The @option{-s} option to the @code{history} builtin may be used to +add commands to the end of the history list without actually executing +them, so that they are available for subsequent recall. +This is most useful in conjunction with Readline. + +The shell allows control of the various characters used by the +history expansion mechanism with the @code{histchars} variable, +as explained above (@pxref{Bash Variables}). The shell uses +the history comment character to mark history timestamps when +writing the history file. +@end ifset + +@menu +* Event Designators:: How to specify which history line to use. +* Word Designators:: Specifying which words are of interest. +* Modifiers:: Modifying the results of substitution. +@end menu + +@node Event Designators +@subsection Event Designators +@cindex event designators + +An event designator is a reference to a command line entry in the +history list. +Unless the reference is absolute, events are relative to the current +position in the history list. +@cindex history events + +@table @asis + +@item @code{!} +@ifset BashFeatures +Start a history substitution, except when followed by a space, tab, +the end of the line, @samp{=} or @samp{(} (when the +@code{extglob} shell option is enabled using the @code{shopt} builtin). +@end ifset +@ifclear BashFeatures +Start a history substitution, except when followed by a space, tab, +the end of the line, or @samp{=}. +@end ifclear + +@item @code{!@var{n}} +Refer to command line @var{n}. + +@item @code{!-@var{n}} +Refer to the command @var{n} lines back. + +@item @code{!!} +Refer to the previous command. This is a synonym for @samp{!-1}. + +@item @code{!@var{string}} +Refer to the most recent command +preceding the current position in the history list +starting with @var{string}. + +@item @code{!?@var{string}[?]} +Refer to the most recent command +preceding the current position in the history list +containing @var{string}. +The trailing +@samp{?} may be omitted if the @var{string} is followed immediately by +a newline. +If @var{string} is missing, the string from the most recent search is used; +it is an error if there is no previous search string. + +@item @code{^@var{string1}^@var{string2}^} +Quick Substitution. Repeat the last command, replacing @var{string1} +with @var{string2}. Equivalent to +@code{!!:s^@var{string1}^@var{string2}^}. + +@item @code{!#} +The entire command line typed so far. + +@end table + +@node Word Designators +@subsection Word Designators + +Word designators are used to select desired words from the event. +A @samp{:} separates the event specification from the word designator. It +may be omitted if the word designator begins with a @samp{^}, @samp{$}, +@samp{*}, @samp{-}, or @samp{%}. Words are numbered from the beginning +of the line, with the first word being denoted by 0 (zero). Words are +inserted into the current line separated by single spaces. + +@need 0.75 +For example, + +@table @code +@item !! +designates the preceding command. When you type this, the preceding +command is repeated in toto. + +@item !!:$ +designates the last argument of the preceding command. This may be +shortened to @code{!$}. + +@item !fi:2 +designates the second argument of the most recent command starting with +the letters @code{fi}. +@end table + +@need 0.75 +Here are the word designators: + +@table @code + +@item 0 (zero) +The @code{0}th word. For many applications, this is the command word. + +@item @var{n} +The @var{n}th word. + +@item ^ +The first argument; that is, word 1. + +@item $ +The last argument. + +@item % +The first word matched by the most recent @samp{?@var{string}?} search, +if the search string begins with a character that is part of a word. + +@item @var{x}-@var{y} +A range of words; @samp{-@var{y}} abbreviates @samp{0-@var{y}}. + +@item * +All of the words, except the @code{0}th. This is a synonym for @samp{1-$}. +It is not an error to use @samp{*} if there is just one word in the event; +the empty string is returned in that case. + +@item @var{x}* +Abbreviates @samp{@var{x}-$} + +@item @var{x}- +Abbreviates @samp{@var{x}-$} like @samp{@var{x}*}, but omits the last word. +If @samp{x} is missing, it defaults to 0. + +@end table + +If a word designator is supplied without an event specification, the +previous command is used as the event. + +@node Modifiers +@subsection Modifiers + +After the optional word designator, you can add a sequence of one or more +of the following modifiers, each preceded by a @samp{:}. +These modify, or edit, the word or words selected from the history event. + +@table @code + +@item h +Remove a trailing pathname component, leaving only the head. + +@item t +Remove all leading pathname components, leaving the tail. + +@item r +Remove a trailing suffix of the form @samp{.@var{suffix}}, leaving +the basename. + +@item e +Remove all but the trailing suffix. + +@item p +Print the new command but do not execute it. + +@ifset BashFeatures +@item q +Quote the substituted words, escaping further substitutions. + +@item x +Quote the substituted words as with @samp{q}, +but break into words at spaces, tabs, and newlines. +The @samp{q} and @samp{x} modifiers are mutually exclusive; the last one +supplied is used. +@end ifset + +@item s/@var{old}/@var{new}/ +Substitute @var{new} for the first occurrence of @var{old} in the +event line. +Any character may be used as the delimiter in place of @samp{/}. +The delimiter may be quoted in @var{old} and @var{new} +with a single backslash. If @samp{&} appears in @var{new}, +it is replaced by @var{old}. A single backslash will quote +the @samp{&}. +If @var{old} is null, it is set to the last @var{old} +substituted, or, if no previous history substitutions took place, +the last @var{string} +in a !?@var{string}@code{[?]} +search. +If @var{new} is is null, each matching @var{old} is deleted. +The final delimiter is optional if it is the last +character on the input line. + +@item & +Repeat the previous substitution. + +@item g +@itemx a +Cause changes to be applied over the entire event line. Used in +conjunction with @samp{s}, as in @code{gs/@var{old}/@var{new}/}, +or with @samp{&}. + +@item G +Apply the following @samp{s} or @samp{&} modifier once to each word +in the event. + +@end table diff --git a/bash-5.1/lib/readline/doc/rlman.texi b/bash-5.1/lib/readline/doc/rlman.texi new file mode 100644 index 0000000000000000000000000000000000000000..ec7487b7a78812f10d236078f88fd1b431aa03c5 --- /dev/null +++ b/bash-5.1/lib/readline/doc/rlman.texi @@ -0,0 +1,84 @@ +\input texinfo @c -*-texinfo-*- +@comment %**start of header (This is for running Texinfo on a region.) +@setfilename readline.info +@settitle GNU Readline Library +@include version.texi + +@comment %**end of header (This is for running Texinfo on a region.) +@synindex vr fn + +@copying +This manual describes the GNU Readline Library +(version @value{VERSION}, @value{UPDATED}), a library which aids in the +consistency of user interface across discrete programs which provide +a command line interface. + +Copyright @copyright{} 1988--2020 Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``GNU Free Documentation License''. + +@end quotation +@end copying + +@dircategory Libraries +@direntry +* Readline: (readline). The GNU readline library API. +@end direntry + +@titlepage +@title GNU Readline Library +@subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}. +@subtitle @value{UPDATED-MONTH} +@author Chet Ramey, Case Western Reserve University +@author Brian Fox, Free Software Foundation + +@page +@vskip 0pt plus 1filll +@insertcopying + +@end titlepage + +@contents + +@ifnottex +@node Top +@top GNU Readline Library + +This document describes the GNU Readline Library, a utility which aids +in the consistency of user interface across discrete programs which +provide a command line interface. +The Readline home page is @url{http://www.gnu.org/software/readline/}. + +@menu +* Command Line Editing:: GNU Readline User's Manual. +* Programming with GNU Readline:: GNU Readline Programmer's Manual. +* GNU Free Documentation License:: License for copying this manual. +* Concept Index:: Index of concepts described in this manual. +* Function and Variable Index:: Index of externally visible functions + and variables. +@end menu +@end ifnottex + +@include rluser.texi +@include rltech.texi + +@node GNU Free Documentation License +@appendix GNU Free Documentation License + +@include fdl.texi + +@node Concept Index +@unnumbered Concept Index +@printindex cp + +@node Function and Variable Index +@unnumbered Function and Variable Index +@printindex fn + +@bye diff --git a/bash-5.1/lib/readline/doc/rltech.texi b/bash-5.1/lib/readline/doc/rltech.texi new file mode 100644 index 0000000000000000000000000000000000000000..bbf57c239c92fad7286aa15ee3508ca08fc277b3 --- /dev/null +++ b/bash-5.1/lib/readline/doc/rltech.texi @@ -0,0 +1,2757 @@ +@comment %**start of header (This is for running Texinfo on a region.) +@setfilename rltech.info +@comment %**end of header (This is for running Texinfo on a region.) + +@ifinfo +This document describes the GNU Readline Library, a utility for aiding +in the consistency of user interface across discrete programs that need +to provide a command line interface. + +Copyright (C) 1988--2020 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +pare preserved on all copies. + +@ignore +Permission is granted to process this file through TeX and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). +@end ignore + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation approved +by the Foundation. +@end ifinfo + +@node Programming with GNU Readline +@chapter Programming with GNU Readline + +This chapter describes the interface between the @sc{gnu} Readline Library and +other programs. If you are a programmer, and you wish to include the +features found in @sc{gnu} Readline +such as completion, line editing, and interactive history manipulation +in your own programs, this section is for you. + +@menu +* Basic Behavior:: Using the default behavior of Readline. +* Custom Functions:: Adding your own functions to Readline. +* Readline Variables:: Variables accessible to custom + functions. +* Readline Convenience Functions:: Functions which Readline supplies to + aid in writing your own custom + functions. +* Readline Signal Handling:: How Readline behaves when it receives signals. +* Custom Completers:: Supplanting or supplementing Readline's + completion functions. +@end menu + +@node Basic Behavior +@section Basic Behavior + +Many programs provide a command line interface, such as @code{mail}, +@code{ftp}, and @code{sh}. For such programs, the default behaviour of +Readline is sufficient. This section describes how to use Readline in +the simplest way possible, perhaps to replace calls in your code to +@code{gets()} or @code{fgets()}. + +@findex readline +@cindex readline, function + +The function @code{readline()} prints a prompt @var{prompt} +and then reads and returns a single line of text from the user. +If @var{prompt} is @code{NULL} or the empty string, no prompt is displayed. +The line @code{readline} returns is allocated with @code{malloc()}; +the caller should @code{free()} the line when it has finished with it. +The declaration for @code{readline} in ANSI C is + +@example +@code{char *readline (const char *@var{prompt});} +@end example + +@noindent +So, one might say +@example +@code{char *line = readline ("Enter a line: ");} +@end example +@noindent +in order to read a line of text from the user. +The line returned has the final newline removed, so only the +text remains. + +If @code{readline} encounters an @code{EOF} while reading the line, and the +line is empty at that point, then @code{(char *)NULL} is returned. +Otherwise, the line is ended just as if a newline had been typed. + +Readline performs some expansion on the @var{prompt} before it is +displayed on the screen. See the description of @code{rl_expand_prompt} +(@pxref{Redisplay}) for additional details, especially if @var{prompt} +will contain characters that do not consume physical screen space when +displayed. + +If you want the user to be able to get at the line later, (with +@key{C-p} for example), you must call @code{add_history()} to save the +line away in a @dfn{history} list of such lines. + +@example +@code{add_history (line)}; +@end example + +@noindent +For full details on the GNU History Library, see the associated manual. + +It is preferable to avoid saving empty lines on the history list, since +users rarely have a burning need to reuse a blank line. Here is +a function which usefully replaces the standard @code{gets()} library +function, and has the advantage of no static buffer to overflow: + +@example +/* A static variable for holding the line. */ +static char *line_read = (char *)NULL; + +/* Read a string, and return a pointer to it. + Returns NULL on EOF. */ +char * +rl_gets () +@{ + /* If the buffer has already been allocated, + return the memory to the free pool. */ + if (line_read) + @{ + free (line_read); + line_read = (char *)NULL; + @} + + /* Get a line from the user. */ + line_read = readline (""); + + /* If the line has any text in it, + save it on the history. */ + if (line_read && *line_read) + add_history (line_read); + + return (line_read); +@} +@end example + +This function gives the user the default behaviour of @key{TAB} +completion: completion on file names. If you do not want Readline to +complete on filenames, you can change the binding of the @key{TAB} key +with @code{rl_bind_key()}. + +@example +@code{int rl_bind_key (int @var{key}, rl_command_func_t *@var{function});} +@end example + +@code{rl_bind_key()} takes two arguments: @var{key} is the character that +you want to bind, and @var{function} is the address of the function to +call when @var{key} is pressed. Binding @key{TAB} to @code{rl_insert()} +makes @key{TAB} insert itself. +@code{rl_bind_key()} returns non-zero if @var{key} is not a valid +ASCII character code (between 0 and 255). + +Thus, to disable the default @key{TAB} behavior, the following suffices: +@example +@code{rl_bind_key ('\t', rl_insert);} +@end example + +This code should be executed once at the start of your program; you +might write a function called @code{initialize_readline()} which +performs this and other desired initializations, such as installing +custom completers (@pxref{Custom Completers}). + +@node Custom Functions +@section Custom Functions + +Readline provides many functions for manipulating the text of +the line, but it isn't possible to anticipate the needs of all +programs. This section describes the various functions and variables +defined within the Readline library which allow a user program to add +customized functionality to Readline. + +Before declaring any functions that customize Readline's behavior, or +using any functionality Readline provides in other code, an +application writer should include the file @code{} +in any file that uses Readline's features. Since some of the definitions +in @code{readline.h} use the @code{stdio} library, the file +@code{} should be included before @code{readline.h}. + +@code{readline.h} defines a C preprocessor variable that should +be treated as an integer, @code{RL_READLINE_VERSION}, which may +be used to conditionally compile application code depending on +the installed Readline version. The value is a hexadecimal +encoding of the major and minor version numbers of the library, +of the form 0x@var{MMmm}. @var{MM} is the two-digit major +version number; @var{mm} is the two-digit minor version number. +For Readline 4.2, for example, the value of +@code{RL_READLINE_VERSION} would be @code{0x0402}. + +@menu +* Readline Typedefs:: C declarations to make code readable. +* Function Writing:: Variables and calling conventions. +@end menu + +@node Readline Typedefs +@subsection Readline Typedefs + +For readability, we declare a number of new object types, all pointers +to functions. + +The reason for declaring these new types is to make it easier to write +code describing pointers to C functions with appropriately prototyped +arguments and return values. + +For instance, say we want to declare a variable @var{func} as a pointer +to a function which takes two @code{int} arguments and returns an +@code{int} (this is the type of all of the Readline bindable functions). +Instead of the classic C declaration + +@code{int (*func)();} + +@noindent +or the ANSI-C style declaration + +@code{int (*func)(int, int);} + +@noindent +we may write + +@code{rl_command_func_t *func;} + +The full list of function pointer types available is + +@table @code +@item typedef int rl_command_func_t (int, int); + +@item typedef char *rl_compentry_func_t (const char *, int); + +@item typedef char **rl_completion_func_t (const char *, int, int); + +@item typedef char *rl_quote_func_t (char *, int, char *); + +@item typedef char *rl_dequote_func_t (char *, int); + +@item typedef int rl_compignore_func_t (char **); + +@item typedef void rl_compdisp_func_t (char **, int, int); + +@item typedef int rl_hook_func_t (void); + +@item typedef int rl_getc_func_t (FILE *); + +@item typedef int rl_linebuf_func_t (char *, int); + +@item typedef int rl_intfunc_t (int); +@item #define rl_ivoidfunc_t rl_hook_func_t +@item typedef int rl_icpfunc_t (char *); +@item typedef int rl_icppfunc_t (char **); + +@item typedef void rl_voidfunc_t (void); +@item typedef void rl_vintfunc_t (int); +@item typedef void rl_vcpfunc_t (char *); +@item typedef void rl_vcppfunc_t (char **); + +@end table + +@node Function Writing +@subsection Writing a New Function + +In order to write new functions for Readline, you need to know the +calling conventions for keyboard-invoked functions, and the names of the +variables that describe the current state of the line read so far. + +The calling sequence for a command @code{foo} looks like + +@example +@code{int foo (int count, int key)} +@end example + +@noindent +where @var{count} is the numeric argument (or 1 if defaulted) and +@var{key} is the key that invoked this function. + +It is completely up to the function as to what should be done with the +numeric argument. Some functions use it as a repeat count, some +as a flag, and others to choose alternate behavior (refreshing the current +line as opposed to refreshing the screen, for example). Some choose to +ignore it. In general, if a +function uses the numeric argument as a repeat count, it should be able +to do something useful with both negative and positive arguments. +At the very least, it should be aware that it can be passed a +negative argument. + +A command function should return 0 if its action completes successfully, +and a value greater than zero if some error occurs. +This is the convention obeyed by all of the builtin Readline bindable +command functions. + +@node Readline Variables +@section Readline Variables + +These variables are available to function writers. + +@deftypevar {char *} rl_line_buffer +This is the line gathered so far. You are welcome to modify the +contents of the line, but see @ref{Allowing Undoing}. The +function @code{rl_extend_line_buffer} is available to increase +the memory allocated to @code{rl_line_buffer}. +@end deftypevar + +@deftypevar int rl_point +The offset of the current cursor position in @code{rl_line_buffer} +(the @emph{point}). +@end deftypevar + +@deftypevar int rl_end +The number of characters present in @code{rl_line_buffer}. When +@code{rl_point} is at the end of the line, @code{rl_point} and +@code{rl_end} are equal. +@end deftypevar + +@deftypevar int rl_mark +The @var{mark} (saved position) in the current line. If set, the mark +and point define a @emph{region}. +@end deftypevar + +@deftypevar int rl_done +Setting this to a non-zero value causes Readline to return the current +line immediately. +@end deftypevar + +@deftypevar int rl_num_chars_to_read +Setting this to a positive value before calling @code{readline()} causes +Readline to return after accepting that many characters, rather +than reading up to a character bound to @code{accept-line}. +@end deftypevar + +@deftypevar int rl_pending_input +Setting this to a value makes it the next keystroke read. This is a +way to stuff a single character into the input stream. +@end deftypevar + +@deftypevar int rl_dispatching +Set to a non-zero value if a function is being called from a key binding; +zero otherwise. Application functions can test this to discover whether +they were called directly or by Readline's dispatching mechanism. +@end deftypevar + +@deftypevar int rl_erase_empty_line +Setting this to a non-zero value causes Readline to completely erase +the current line, including any prompt, any time a newline is typed as +the only character on an otherwise-empty line. The cursor is moved to +the beginning of the newly-blank line. +@end deftypevar + +@deftypevar {char *} rl_prompt +The prompt Readline uses. This is set from the argument to +@code{readline()}, and should not be assigned to directly. +The @code{rl_set_prompt()} function (@pxref{Redisplay}) may +be used to modify the prompt string after calling @code{readline()}. +@end deftypevar + +@deftypevar {char *} rl_display_prompt +The string displayed as the prompt. This is usually identical to +@var{rl_prompt}, but may be changed temporarily by functions that +use the prompt string as a message area, such as incremental search. +@end deftypevar + +@deftypevar int rl_already_prompted +If an application wishes to display the prompt itself, rather than have +Readline do it the first time @code{readline()} is called, it should set +this variable to a non-zero value after displaying the prompt. +The prompt must also be passed as the argument to @code{readline()} so +the redisplay functions can update the display properly. +The calling application is responsible for managing the value; Readline +never sets it. +@end deftypevar + +@deftypevar {const char *} rl_library_version +The version number of this revision of the library. +@end deftypevar + +@deftypevar int rl_readline_version +An integer encoding the current version of the library. The encoding is +of the form 0x@var{MMmm}, where @var{MM} is the two-digit major version +number, and @var{mm} is the two-digit minor version number. +For example, for Readline-4.2, @code{rl_readline_version} would have the +value 0x0402. +@end deftypevar + +@deftypevar {int} rl_gnu_readline_p +Always set to 1, denoting that this is @sc{gnu} readline rather than some +emulation. +@end deftypevar + +@deftypevar {const char *} rl_terminal_name +The terminal type, used for initialization. If not set by the application, +Readline sets this to the value of the @env{TERM} environment variable +the first time it is called. +@end deftypevar + +@deftypevar {const char *} rl_readline_name +This variable is set to a unique name by each application using Readline. +The value allows conditional parsing of the inputrc file +(@pxref{Conditional Init Constructs}). +@end deftypevar + +@deftypevar {FILE *} rl_instream +The stdio stream from which Readline reads input. +If @code{NULL}, Readline defaults to @var{stdin}. +@end deftypevar + +@deftypevar {FILE *} rl_outstream +The stdio stream to which Readline performs output. +If @code{NULL}, Readline defaults to @var{stdout}. +@end deftypevar + +@deftypevar int rl_prefer_env_winsize +If non-zero, Readline gives values found in the @env{LINES} and +@env{COLUMNS} environment variables greater precedence than values fetched +from the kernel when computing the screen dimensions. +@end deftypevar + +@deftypevar {rl_command_func_t *} rl_last_func +The address of the last command function Readline executed. May be used to +test whether or not a function is being executed twice in succession, for +example. +@end deftypevar + +@deftypevar {rl_hook_func_t *} rl_startup_hook +If non-zero, this is the address of a function to call just +before @code{readline} prints the first prompt. +@end deftypevar + +@deftypevar {rl_hook_func_t *} rl_pre_input_hook +If non-zero, this is the address of a function to call after +the first prompt has been printed and just before @code{readline} +starts reading input characters. +@end deftypevar + +@deftypevar {rl_hook_func_t *} rl_event_hook +If non-zero, this is the address of a function to call periodically +when Readline is waiting for terminal input. +By default, this will be called at most ten times a second if there +is no keyboard input. +@end deftypevar + +@deftypevar {rl_getc_func_t *} rl_getc_function +If non-zero, Readline will call indirectly through this pointer +to get a character from the input stream. By default, it is set to +@code{rl_getc}, the default Readline character input function +(@pxref{Character Input}). +In general, an application that sets @var{rl_getc_function} should consider +setting @var{rl_input_available_hook} as well. +@end deftypevar + +@deftypevar {rl_hook_func_t *} rl_signal_event_hook +If non-zero, this is the address of a function to call if a read system +call is interrupted when Readline is reading terminal input. +@end deftypevar + +@deftypevar {rl_hook_func_t *} rl_input_available_hook +If non-zero, Readline will use this function's return value when it needs +to determine whether or not there is available input on the current input +source. +The default hook checks @code{rl_instream}; if an application is using a +different input source, it should set the hook appropriately. +Readline queries for available input when implementing intra-key-sequence +timeouts during input and incremental searches. +This may use an application-specific timeout before returning a value; +Readline uses the value passed to @code{rl_set_keyboard_input_timeout()} +or the value of the user-settable @var{keyseq-timeout} variable. +This is designed for use by applications using Readline's callback interface +(@pxref{Alternate Interface}), which may not use the traditional +@code{read(2)} and file descriptor interface, or other applications using +a different input mechanism. +If an application uses an input mechanism or hook that can potentially exceed +the value of @var{keyseq-timeout}, it should increase the timeout or set +this hook appropriately even when not using the callback interface. +In general, an application that sets @var{rl_getc_function} should consider +setting @var{rl_input_available_hook} as well. +@end deftypevar + +@deftypevar {rl_voidfunc_t *} rl_redisplay_function +If non-zero, Readline will call indirectly through this pointer +to update the display with the current contents of the editing buffer. +By default, it is set to @code{rl_redisplay}, the default Readline +redisplay function (@pxref{Redisplay}). +@end deftypevar + +@deftypevar {rl_vintfunc_t *} rl_prep_term_function +If non-zero, Readline will call indirectly through this pointer +to initialize the terminal. The function takes a single argument, an +@code{int} flag that says whether or not to use eight-bit characters. +By default, this is set to @code{rl_prep_terminal} +(@pxref{Terminal Management}). +@end deftypevar + +@deftypevar {rl_voidfunc_t *} rl_deprep_term_function +If non-zero, Readline will call indirectly through this pointer +to reset the terminal. This function should undo the effects of +@code{rl_prep_term_function}. +By default, this is set to @code{rl_deprep_terminal} +(@pxref{Terminal Management}). +@end deftypevar + +@deftypevar {Keymap} rl_executing_keymap +This variable is set to the keymap (@pxref{Keymaps}) in which the +currently executing readline function was found. +@end deftypevar + +@deftypevar {Keymap} rl_binding_keymap +This variable is set to the keymap (@pxref{Keymaps}) in which the +last key binding occurred. +@end deftypevar + +@deftypevar {char *} rl_executing_macro +This variable is set to the text of any currently-executing macro. +@end deftypevar + +@deftypevar int rl_executing_key +The key that caused the dispatch to the currently-executing Readline function. +@end deftypevar + +@deftypevar {char *} rl_executing_keyseq +The full key sequence that caused the dispatch to the currently-executing +Readline function. +@end deftypevar + +@deftypevar int rl_key_sequence_length +The number of characters in @var{rl_executing_keyseq}. +@end deftypevar + +@deftypevar {int} rl_readline_state +A variable with bit values that encapsulate the current Readline state. +A bit is set with the @code{RL_SETSTATE} macro, and unset with the +@code{RL_UNSETSTATE} macro. Use the @code{RL_ISSTATE} macro to test +whether a particular state bit is set. Current state bits include: + +@table @code +@item RL_STATE_NONE +Readline has not yet been called, nor has it begun to initialize. +@item RL_STATE_INITIALIZING +Readline is initializing its internal data structures. +@item RL_STATE_INITIALIZED +Readline has completed its initialization. +@item RL_STATE_TERMPREPPED +Readline has modified the terminal modes to do its own input and redisplay. +@item RL_STATE_READCMD +Readline is reading a command from the keyboard. +@item RL_STATE_METANEXT +Readline is reading more input after reading the meta-prefix character. +@item RL_STATE_DISPATCHING +Readline is dispatching to a command. +@item RL_STATE_MOREINPUT +Readline is reading more input while executing an editing command. +@item RL_STATE_ISEARCH +Readline is performing an incremental history search. +@item RL_STATE_NSEARCH +Readline is performing a non-incremental history search. +@item RL_STATE_SEARCH +Readline is searching backward or forward through the history for a string. +@item RL_STATE_NUMERICARG +Readline is reading a numeric argument. +@item RL_STATE_MACROINPUT +Readline is currently getting its input from a previously-defined keyboard +macro. +@item RL_STATE_MACRODEF +Readline is currently reading characters defining a keyboard macro. +@item RL_STATE_OVERWRITE +Readline is in overwrite mode. +@item RL_STATE_COMPLETING +Readline is performing word completion. +@item RL_STATE_SIGHANDLER +Readline is currently executing the readline signal handler. +@item RL_STATE_UNDOING +Readline is performing an undo. +@item RL_STATE_INPUTPENDING +Readline has input pending due to a call to @code{rl_execute_next()}. +@item RL_STATE_TTYCSAVED +Readline has saved the values of the terminal's special characters. +@item RL_STATE_CALLBACK +Readline is currently using the alternate (callback) interface +(@pxref{Alternate Interface}). +@item RL_STATE_VIMOTION +Readline is reading the argument to a vi-mode "motion" command. +@item RL_STATE_MULTIKEY +Readline is reading a multiple-keystroke command. +@item RL_STATE_VICMDONCE +Readline has entered vi command (movement) mode at least one time during +the current call to @code{readline()}. +@item RL_STATE_DONE +Readline has read a key sequence bound to @code{accept-line} +and is about to return the line to the caller. +@end table + +@end deftypevar + +@deftypevar {int} rl_explicit_arg +Set to a non-zero value if an explicit numeric argument was specified by +the user. Only valid in a bindable command function. +@end deftypevar + +@deftypevar {int} rl_numeric_arg +Set to the value of any numeric argument explicitly specified by the user +before executing the current Readline function. Only valid in a bindable +command function. +@end deftypevar + +@deftypevar {int} rl_editing_mode +Set to a value denoting Readline's current editing mode. A value of +@var{1} means Readline is currently in emacs mode; @var{0} +means that vi mode is active. +@end deftypevar + + +@node Readline Convenience Functions +@section Readline Convenience Functions + +@menu +* Function Naming:: How to give a function you write a name. +* Keymaps:: Making keymaps. +* Binding Keys:: Changing Keymaps. +* Associating Function Names and Bindings:: Translate function names to + key sequences. +* Allowing Undoing:: How to make your functions undoable. +* Redisplay:: Functions to control line display. +* Modifying Text:: Functions to modify @code{rl_line_buffer}. +* Character Input:: Functions to read keyboard input. +* Terminal Management:: Functions to manage terminal settings. +* Utility Functions:: Generally useful functions and hooks. +* Miscellaneous Functions:: Functions that don't fall into any category. +* Alternate Interface:: Using Readline in a `callback' fashion. +* A Readline Example:: An example Readline function. +* Alternate Interface Example:: An example program using the alternate interface. +@end menu + +@node Function Naming +@subsection Naming a Function + +The user can dynamically change the bindings of keys while using +Readline. This is done by representing the function with a descriptive +name. The user is able to type the descriptive name when referring to +the function. Thus, in an init file, one might find + +@example +Meta-Rubout: backward-kill-word +@end example + +This binds the keystroke @key{Meta-Rubout} to the function +@emph{descriptively} named @code{backward-kill-word}. You, as the +programmer, should bind the functions you write to descriptive names as +well. Readline provides a function for doing that: + +@deftypefun int rl_add_defun (const char *name, rl_command_func_t *function, int key) +Add @var{name} to the list of named functions. Make @var{function} be +the function that gets called. If @var{key} is not -1, then bind it to +@var{function} using @code{rl_bind_key()}. +@end deftypefun + +Using this function alone is sufficient for most applications. +It is the recommended way to add a few functions to the default +functions that Readline has built in. +If you need to do something other than adding a function to Readline, +you may need to use the underlying functions described below. + +@node Keymaps +@subsection Selecting a Keymap + +Key bindings take place on a @dfn{keymap}. The keymap is the +association between the keys that the user types and the functions that +get run. You can make your own keymaps, copy existing keymaps, and tell +Readline which keymap to use. + +@deftypefun Keymap rl_make_bare_keymap (void) +Returns a new, empty keymap. The space for the keymap is allocated with +@code{malloc()}; the caller should free it by calling +@code{rl_free_keymap()} when done. +@end deftypefun + +@deftypefun Keymap rl_copy_keymap (Keymap map) +Return a new keymap which is a copy of @var{map}. +@end deftypefun + +@deftypefun Keymap rl_make_keymap (void) +Return a new keymap with the printing characters bound to rl_insert, +the lowercase Meta characters bound to run their equivalents, and +the Meta digits bound to produce numeric arguments. +@end deftypefun + +@deftypefun void rl_discard_keymap (Keymap keymap) +Free the storage associated with the data in @var{keymap}. +The caller should free @var{keymap}. +@end deftypefun + +@deftypefun void rl_free_keymap (Keymap keymap) +Free all storage associated with @var{keymap}. This calls +@code{rl_discard_keymap} to free subordindate keymaps and macros. +@end deftypefun + +@deftypefun int rl_empty_keymap (Keymap keymap) +Return non-zero if there are no keys bound to functions in @var{keymap}; +zero if there are any keys bound. +@end deftypefun + +Readline has several internal keymaps. These functions allow you to +change which keymap is active. + +@deftypefun Keymap rl_get_keymap (void) +Returns the currently active keymap. +@end deftypefun + +@deftypefun void rl_set_keymap (Keymap keymap) +Makes @var{keymap} the currently active keymap. +@end deftypefun + +@deftypefun Keymap rl_get_keymap_by_name (const char *name) +Return the keymap matching @var{name}. @var{name} is one which would +be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}). +@end deftypefun + +@deftypefun {char *} rl_get_keymap_name (Keymap keymap) +Return the name matching @var{keymap}. @var{name} is one which would +be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}). +@end deftypefun + +@deftypefun int rl_set_keymap_name (const char *name, Keymap keymap) +Set the name of @var{keymap}. This name will then be "registered" and +available for use in a @code{set keymap} inputrc directive +@pxref{Readline Init File}). +The @var{name} may not be one of Readline's builtin keymap names; +you may not add a different name for one of Readline's builtin keymaps. +You may replace the name associated with a given keymap by calling this +function more than once with the same @var{keymap} argument. +You may associate a registered @var{name} with a new keymap by calling this +function more than once with the same @var{name} argument. +There is no way to remove a named keymap once the name has been +registered. +Readline will make a copy of @var{name}. +The return value is greater than zero unless @var{name} is one of +Readline's builtin keymap names or @var{keymap} is one of Readline's +builtin keymaps. +@end deftypefun + +@node Binding Keys +@subsection Binding Keys + +Key sequences are associate with functions through the keymap. +Readline has several internal keymaps: @code{emacs_standard_keymap}, +@code{emacs_meta_keymap}, @code{emacs_ctlx_keymap}, +@code{vi_movement_keymap}, and @code{vi_insertion_keymap}. +@code{emacs_standard_keymap} is the default, and the examples in +this manual assume that. + +Since @code{readline()} installs a set of default key bindings the first +time it is called, there is always the danger that a custom binding +installed before the first call to @code{readline()} will be overridden. +An alternate mechanism is to install custom key bindings in an +initialization function assigned to the @code{rl_startup_hook} variable +(@pxref{Readline Variables}). + +These functions manage key bindings. + +@deftypefun int rl_bind_key (int key, rl_command_func_t *function) +Binds @var{key} to @var{function} in the currently active keymap. +Returns non-zero in the case of an invalid @var{key}. +@end deftypefun + +@deftypefun int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) +Bind @var{key} to @var{function} in @var{map}. +Returns non-zero in the case of an invalid @var{key}. +@end deftypefun + +@deftypefun int rl_bind_key_if_unbound (int key, rl_command_func_t *function) +Binds @var{key} to @var{function} if it is not already bound in the +currently active keymap. +Returns non-zero in the case of an invalid @var{key} or if @var{key} is +already bound. +@end deftypefun + +@deftypefun int rl_bind_key_if_unbound_in_map (int key, rl_command_func_t *function, Keymap map) +Binds @var{key} to @var{function} if it is not already bound in @var{map}. +Returns non-zero in the case of an invalid @var{key} or if @var{key} is +already bound. +@end deftypefun + +@deftypefun int rl_unbind_key (int key) +Bind @var{key} to the null function in the currently active keymap. +Returns non-zero in case of error. +@end deftypefun + +@deftypefun int rl_unbind_key_in_map (int key, Keymap map) +Bind @var{key} to the null function in @var{map}. +Returns non-zero in case of error. +@end deftypefun + +@deftypefun int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map) +Unbind all keys that execute @var{function} in @var{map}. +@end deftypefun + +@deftypefun int rl_unbind_command_in_map (const char *command, Keymap map) +Unbind all keys that are bound to @var{command} in @var{map}. +@end deftypefun + +@deftypefun int rl_bind_keyseq (const char *keyseq, rl_command_func_t *function) +Bind the key sequence represented by the string @var{keyseq} to the function +@var{function}, beginning in the current keymap. +This makes new keymaps as necessary. +The return value is non-zero if @var{keyseq} is invalid. +@end deftypefun + +@deftypefun int rl_bind_keyseq_in_map (const char *keyseq, rl_command_func_t *function, Keymap map) +Bind the key sequence represented by the string @var{keyseq} to the function +@var{function}. This makes new keymaps as necessary. +Initial bindings are performed in @var{map}. +The return value is non-zero if @var{keyseq} is invalid. +@end deftypefun + +@deftypefun int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) +Equivalent to @code{rl_bind_keyseq_in_map}. +@end deftypefun + +@deftypefun int rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *function) +Binds @var{keyseq} to @var{function} if it is not already bound in the +currently active keymap. +Returns non-zero in the case of an invalid @var{keyseq} or if @var{keyseq} is +already bound. +@end deftypefun + +@deftypefun int rl_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *function, Keymap map) +Binds @var{keyseq} to @var{function} if it is not already bound in @var{map}. +Returns non-zero in the case of an invalid @var{keyseq} or if @var{keyseq} is +already bound. +@end deftypefun + +@deftypefun int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) +Bind the key sequence represented by the string @var{keyseq} to the arbitrary +pointer @var{data}. @var{type} says what kind of data is pointed to by +@var{data}; this can be a function (@code{ISFUNC}), a macro +(@code{ISMACR}), or a keymap (@code{ISKMAP}). This makes new keymaps as +necessary. The initial keymap in which to do bindings is @var{map}. +@end deftypefun + +@deftypefun int rl_parse_and_bind (char *line) +Parse @var{line} as if it had been read from the @code{inputrc} file and +perform any key bindings and variable assignments found +(@pxref{Readline Init File}). +@end deftypefun + +@deftypefun int rl_read_init_file (const char *filename) +Read keybindings and variable assignments from @var{filename} +(@pxref{Readline Init File}). +@end deftypefun + +@node Associating Function Names and Bindings +@subsection Associating Function Names and Bindings + +These functions allow you to find out what keys invoke named functions +and the functions invoked by a particular key sequence. You may also +associate a new function name with an arbitrary function. + +@deftypefun {rl_command_func_t *} rl_named_function (const char *name) +Return the function with name @var{name}. +@end deftypefun + +@deftypefun {rl_command_func_t *} rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) +Return the function invoked by @var{keyseq} in keymap @var{map}. +If @var{map} is @code{NULL}, the current keymap is used. If @var{type} is +not @code{NULL}, the type of the object is returned in the @code{int} variable +it points to (one of @code{ISFUNC}, @code{ISKMAP}, or @code{ISMACR}). +It takes a "translated" key sequence and should not be used if the key sequence +can include NUL. +@end deftypefun + +@deftypefun {rl_command_func_t *} rl_function_of_keyseq_len (const char *keyseq, size_t len, Keymap map, int *type) +Return the function invoked by @var{keyseq} of length @var{len} +in keymap @var{map}. Equivalent to @code{rl_function_of_keyseq} with the +addition of the @var{len} parameter. +It takes a "translated" key sequence and should be used if the key sequence +can include NUL. +@end deftypefun + +@deftypefun {char **} rl_invoking_keyseqs (rl_command_func_t *function) +Return an array of strings representing the key sequences used to +invoke @var{function} in the current keymap. +@end deftypefun + +@deftypefun {char **} rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) +Return an array of strings representing the key sequences used to +invoke @var{function} in the keymap @var{map}. +@end deftypefun + +@deftypefun void rl_function_dumper (int readable) +Print the readline function names and the key sequences currently +bound to them to @code{rl_outstream}. If @var{readable} is non-zero, +the list is formatted in such a way that it can be made part of an +@code{inputrc} file and re-read. +@end deftypefun + +@deftypefun void rl_list_funmap_names (void) +Print the names of all bindable Readline functions to @code{rl_outstream}. +@end deftypefun + +@deftypefun {const char **} rl_funmap_names (void) +Return a NULL terminated array of known function names. The array is +sorted. The array itself is allocated, but not the strings inside. You +should free the array, but not the pointers, using @code{free} or +@code{rl_free} when you are done. +@end deftypefun + +@deftypefun int rl_add_funmap_entry (const char *name, rl_command_func_t *function) +Add @var{name} to the list of bindable Readline command names, and make +@var{function} the function to be called when @var{name} is invoked. +@end deftypefun + +@node Allowing Undoing +@subsection Allowing Undoing + +Supporting the undo command is a painless thing, and makes your +functions much more useful. It is certainly easy to try +something if you know you can undo it. + +If your function simply inserts text once, or deletes text once, and +uses @code{rl_insert_text()} or @code{rl_delete_text()} to do it, then +undoing is already done for you automatically. + +If you do multiple insertions or multiple deletions, or any combination +of these operations, you should group them together into one operation. +This is done with @code{rl_begin_undo_group()} and +@code{rl_end_undo_group()}. + +The types of events that can be undone are: + +@smallexample +enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @}; +@end smallexample + +Notice that @code{UNDO_DELETE} means to insert some text, and +@code{UNDO_INSERT} means to delete some text. That is, the undo code +tells what to undo, not how to undo it. @code{UNDO_BEGIN} and +@code{UNDO_END} are tags added by @code{rl_begin_undo_group()} and +@code{rl_end_undo_group()}. + +@deftypefun int rl_begin_undo_group (void) +Begins saving undo information in a group construct. The undo +information usually comes from calls to @code{rl_insert_text()} and +@code{rl_delete_text()}, but could be the result of calls to +@code{rl_add_undo()}. +@end deftypefun + +@deftypefun int rl_end_undo_group (void) +Closes the current undo group started with @code{rl_begin_undo_group +()}. There should be one call to @code{rl_end_undo_group()} +for each call to @code{rl_begin_undo_group()}. +@end deftypefun + +@deftypefun void rl_add_undo (enum undo_code what, int start, int end, char *text) +Remember how to undo an event (according to @var{what}). The affected +text runs from @var{start} to @var{end}, and encompasses @var{text}. +@end deftypefun + +@deftypefun void rl_free_undo_list (void) +Free the existing undo list. +@end deftypefun + +@deftypefun int rl_do_undo (void) +Undo the first thing on the undo list. Returns @code{0} if there was +nothing to undo, non-zero if something was undone. +@end deftypefun + +Finally, if you neither insert nor delete text, but directly modify the +existing text (e.g., change its case), call @code{rl_modifying()} +once, just before you modify the text. You must supply the indices of +the text range that you are going to modify. + +@deftypefun int rl_modifying (int start, int end) +Tell Readline to save the text between @var{start} and @var{end} as a +single undo unit. It is assumed that you will subsequently modify +that text. +@end deftypefun + +@node Redisplay +@subsection Redisplay + +@deftypefun void rl_redisplay (void) +Change what's displayed on the screen to reflect the current contents +of @code{rl_line_buffer}. +@end deftypefun + +@deftypefun int rl_forced_update_display (void) +Force the line to be updated and redisplayed, whether or not +Readline thinks the screen display is correct. +@end deftypefun + +@deftypefun int rl_on_new_line (void) +Tell the update functions that we have moved onto a new (empty) line, +usually after outputting a newline. +@end deftypefun + +@deftypefun int rl_on_new_line_with_prompt (void) +Tell the update functions that we have moved onto a new line, with +@var{rl_prompt} already displayed. +This could be used by applications that want to output the prompt string +themselves, but still need Readline to know the prompt string length for +redisplay. +It should be used after setting @var{rl_already_prompted}. +@end deftypefun + +@deftypefun int rl_clear_visible_line (void) +Clear the screen lines corresponding to the current line's contents. +@end deftypefun + +@deftypefun int rl_reset_line_state (void) +Reset the display state to a clean state and redisplay the current line +starting on a new line. +@end deftypefun + +@deftypefun int rl_crlf (void) +Move the cursor to the start of the next screen line. +@end deftypefun + +@deftypefun int rl_show_char (int c) +Display character @var{c} on @code{rl_outstream}. +If Readline has not been set to display meta characters directly, this +will convert meta characters to a meta-prefixed key sequence. +This is intended for use by applications which wish to do their own +redisplay. +@end deftypefun + +@deftypefun int rl_message (const char *, @dots{}) +The arguments are a format string as would be supplied to @code{printf}, +possibly containing conversion specifications such as @samp{%d}, and +any additional arguments necessary to satisfy the conversion specifications. +The resulting string is displayed in the @dfn{echo area}. The echo area +is also used to display numeric arguments and search strings. +You should call @code{rl_save_prompt} to save the prompt information +before calling this function. +@end deftypefun + +@deftypefun int rl_clear_message (void) +Clear the message in the echo area. If the prompt was saved with a call to +@code{rl_save_prompt} before the last call to @code{rl_message}, +call @code{rl_restore_prompt} before calling this function. +@end deftypefun + +@deftypefun void rl_save_prompt (void) +Save the local Readline prompt display state in preparation for +displaying a new message in the message area with @code{rl_message()}. +@end deftypefun + +@deftypefun void rl_restore_prompt (void) +Restore the local Readline prompt display state saved by the most +recent call to @code{rl_save_prompt}. +if @code{rl_save_prompt} was called to save the prompt before a call +to @code{rl_message}, this function should be called before the +corresponding call to @code{rl_clear_message}. +@end deftypefun + +@deftypefun int rl_expand_prompt (char *prompt) +Expand any special character sequences in @var{prompt} and set up the +local Readline prompt redisplay variables. +This function is called by @code{readline()}. It may also be called to +expand the primary prompt if the @code{rl_on_new_line_with_prompt()} +function or @code{rl_already_prompted} variable is used. +It returns the number of visible characters on the last line of the +(possibly multi-line) prompt. +Applications may indicate that the prompt contains characters that take +up no physical screen space when displayed by bracketing a sequence of +such characters with the special markers @code{RL_PROMPT_START_IGNORE} +and @code{RL_PROMPT_END_IGNORE} (declared in @file{readline.h}). This may +be used to embed terminal-specific escape sequences in prompts. +@end deftypefun + +@deftypefun int rl_set_prompt (const char *prompt) +Make Readline use @var{prompt} for subsequent redisplay. This calls +@code{rl_expand_prompt()} to expand the prompt and sets @code{rl_prompt} +to the result. +@end deftypefun + +@node Modifying Text +@subsection Modifying Text + +@deftypefun int rl_insert_text (const char *text) +Insert @var{text} into the line at the current cursor position. +Returns the number of characters inserted. +@end deftypefun + +@deftypefun int rl_delete_text (int start, int end) +Delete the text between @var{start} and @var{end} in the current line. +Returns the number of characters deleted. +@end deftypefun + +@deftypefun {char *} rl_copy_text (int start, int end) +Return a copy of the text between @var{start} and @var{end} in +the current line. +@end deftypefun + +@deftypefun int rl_kill_text (int start, int end) +Copy the text between @var{start} and @var{end} in the current line +to the kill ring, appending or prepending to the last kill if the +last command was a kill command. The text is deleted. +If @var{start} is less than @var{end}, +the text is appended, otherwise prepended. If the last command was +not a kill, a new kill ring slot is used. +@end deftypefun + +@deftypefun int rl_push_macro_input (char *macro) +Cause @var{macro} to be inserted into the line, as if it had been invoked +by a key bound to a macro. Not especially useful; use +@code{rl_insert_text()} instead. +@end deftypefun + +@node Character Input +@subsection Character Input + +@deftypefun int rl_read_key (void) +Return the next character available from Readline's current input stream. +This handles input inserted into +the input stream via @var{rl_pending_input} (@pxref{Readline Variables}) +and @code{rl_stuff_char()}, macros, and characters read from the keyboard. +While waiting for input, this function will call any function assigned to +the @code{rl_event_hook} variable. +@end deftypefun + +@deftypefun int rl_getc (FILE *stream) +Return the next character available from @var{stream}, which is assumed to +be the keyboard. +@end deftypefun + +@deftypefun int rl_stuff_char (int c) +Insert @var{c} into the Readline input stream. It will be "read" +before Readline attempts to read characters from the terminal with +@code{rl_read_key()}. Up to 512 characters may be pushed back. +@code{rl_stuff_char} returns 1 if the character was successfully inserted; +0 otherwise. +@end deftypefun + +@deftypefun int rl_execute_next (int c) +Make @var{c} be the next command to be executed when @code{rl_read_key()} +is called. This sets @var{rl_pending_input}. +@end deftypefun + +@deftypefun int rl_clear_pending_input (void) +Unset @var{rl_pending_input}, effectively negating the effect of any +previous call to @code{rl_execute_next()}. This works only if the +pending input has not already been read with @code{rl_read_key()}. +@end deftypefun + +@deftypefun int rl_set_keyboard_input_timeout (int u) +While waiting for keyboard input in @code{rl_read_key()}, Readline will +wait for @var{u} microseconds for input before calling any function +assigned to @code{rl_event_hook}. @var{u} must be greater than or equal +to zero (a zero-length timeout is equivalent to a poll). +The default waiting period is one-tenth of a second. +Returns the old timeout value. +@end deftypefun + +@node Terminal Management +@subsection Terminal Management + +@deftypefun void rl_prep_terminal (int meta_flag) +Modify the terminal settings for Readline's use, so @code{readline()} +can read a single character at a time from the keyboard. +The @var{meta_flag} argument should be non-zero if Readline should +read eight-bit input. +@end deftypefun + +@deftypefun void rl_deprep_terminal (void) +Undo the effects of @code{rl_prep_terminal()}, leaving the terminal in +the state in which it was before the most recent call to +@code{rl_prep_terminal()}. +@end deftypefun + +@deftypefun void rl_tty_set_default_bindings (Keymap kmap) +Read the operating system's terminal editing characters (as would be +displayed by @code{stty}) to their Readline equivalents. +The bindings are performed in @var{kmap}. +@end deftypefun + +@deftypefun void rl_tty_unset_default_bindings (Keymap kmap) +Reset the bindings manipulated by @code{rl_tty_set_default_bindings} so +that the terminal editing characters are bound to @code{rl_insert}. +The bindings are performed in @var{kmap}. +@end deftypefun + +@deftypefun int rl_tty_set_echoing (int value) +Set Readline's idea of whether or not it is echoing output to its output +stream (@var{rl_outstream}). If @var{value} is 0, Readline does not display +output to @var{rl_outstream}; any other value enables output. The initial +value is set when Readline initializes the terminal settings. +This function returns the previous value. +@end deftypefun + +@deftypefun int rl_reset_terminal (const char *terminal_name) +Reinitialize Readline's idea of the terminal settings using +@var{terminal_name} as the terminal type (e.g., @code{vt100}). +If @var{terminal_name} is @code{NULL}, the value of the @code{TERM} +environment variable is used. +@end deftypefun + +@node Utility Functions +@subsection Utility Functions + +@deftypefun int rl_save_state (struct readline_state *sp) +Save a snapshot of Readline's internal state to @var{sp}. +The contents of the @var{readline_state} structure are documented +in @file{readline.h}. +The caller is responsible for allocating the structure. +@end deftypefun + +@deftypefun int rl_restore_state (struct readline_state *sp) +Restore Readline's internal state to that stored in @var{sp}, which must +have been saved by a call to @code{rl_save_state}. +The contents of the @var{readline_state} structure are documented +in @file{readline.h}. +The caller is responsible for freeing the structure. +@end deftypefun + +@deftypefun void rl_free (void *mem) +Deallocate the memory pointed to by @var{mem}. @var{mem} must have been +allocated by @code{malloc}. +@end deftypefun + +@deftypefun void rl_replace_line (const char *text, int clear_undo) +Replace the contents of @code{rl_line_buffer} with @var{text}. +The point and mark are preserved, if possible. +If @var{clear_undo} is non-zero, the undo list associated with the +current line is cleared. +@end deftypefun + +@deftypefun void rl_extend_line_buffer (int len) +Ensure that @code{rl_line_buffer} has enough space to hold @var{len} +characters, possibly reallocating it if necessary. +@end deftypefun + +@deftypefun int rl_initialize (void) +Initialize or re-initialize Readline's internal state. +It's not strictly necessary to call this; @code{readline()} calls it before +reading any input. +@end deftypefun + +@deftypefun int rl_ding (void) +Ring the terminal bell, obeying the setting of @code{bell-style}. +@end deftypefun + +@deftypefun int rl_alphabetic (int c) +Return 1 if @var{c} is an alphabetic character. +@end deftypefun + +@deftypefun void rl_display_match_list (char **matches, int len, int max) +A convenience function for displaying a list of strings in +columnar format on Readline's output stream. @code{matches} is the list +of strings, in argv format, such as a list of completion matches. +@code{len} is the number of strings in @code{matches}, and @code{max} +is the length of the longest string in @code{matches}. This function uses +the setting of @code{print-completions-horizontally} to select how the +matches are displayed (@pxref{Readline Init File Syntax}). +When displaying completions, this function sets the number of columns used +for display to the value of @code{completion-display-width}, the value of +the environment variable @env{COLUMNS}, or the screen width, in that order. +@end deftypefun + +The following are implemented as macros, defined in @code{chardefs.h}. +Applications should refrain from using them. + +@deftypefun int _rl_uppercase_p (int c) +Return 1 if @var{c} is an uppercase alphabetic character. +@end deftypefun + +@deftypefun int _rl_lowercase_p (int c) +Return 1 if @var{c} is a lowercase alphabetic character. +@end deftypefun + +@deftypefun int _rl_digit_p (int c) +Return 1 if @var{c} is a numeric character. +@end deftypefun + +@deftypefun int _rl_to_upper (int c) +If @var{c} is a lowercase alphabetic character, return the corresponding +uppercase character. +@end deftypefun + +@deftypefun int _rl_to_lower (int c) +If @var{c} is an uppercase alphabetic character, return the corresponding +lowercase character. +@end deftypefun + +@deftypefun int _rl_digit_value (int c) +If @var{c} is a number, return the value it represents. +@end deftypefun + +@node Miscellaneous Functions +@subsection Miscellaneous Functions + +@deftypefun int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) +Bind the key sequence @var{keyseq} to invoke the macro @var{macro}. +The binding is performed in @var{map}. When @var{keyseq} is invoked, the +@var{macro} will be inserted into the line. This function is deprecated; +use @code{rl_generic_bind()} instead. +@end deftypefun + +@deftypefun void rl_macro_dumper (int readable) +Print the key sequences bound to macros and their values, using +the current keymap, to @code{rl_outstream}. +If @var{readable} is non-zero, the list is formatted in such a way +that it can be made part of an @code{inputrc} file and re-read. +@end deftypefun + +@deftypefun int rl_variable_bind (const char *variable, const char *value) +Make the Readline variable @var{variable} have @var{value}. +This behaves as if the readline command +@samp{set @var{variable} @var{value}} had been executed in an @code{inputrc} +file (@pxref{Readline Init File Syntax}). +@end deftypefun + +@deftypefun {char *} rl_variable_value (const char *variable) +Return a string representing the value of the Readline variable @var{variable}. +For boolean variables, this string is either @samp{on} or @samp{off}. +@end deftypefun + +@deftypefun void rl_variable_dumper (int readable) +Print the readline variable names and their current values +to @code{rl_outstream}. +If @var{readable} is non-zero, the list is formatted in such a way +that it can be made part of an @code{inputrc} file and re-read. +@end deftypefun + +@deftypefun int rl_set_paren_blink_timeout (int u) +Set the time interval (in microseconds) that Readline waits when showing +a balancing character when @code{blink-matching-paren} has been enabled. +@end deftypefun + +@deftypefun {char *} rl_get_termcap (const char *cap) +Retrieve the string value of the termcap capability @var{cap}. +Readline fetches the termcap entry for the current terminal name and +uses those capabilities to move around the screen line and perform other +terminal-specific operations, like erasing a line. Readline does not +use all of a terminal's capabilities, and this function will return +values for only those capabilities Readline uses. +@end deftypefun + +@deftypefun {void} rl_clear_history (void) +Clear the history list by deleting all of the entries, in the same manner +as the History library's @code{clear_history()} function. +This differs from @code{clear_history} because it frees private data +Readline saves in the history list. +@end deftypefun + +@deftypefun {void} rl_activate_mark (void) +Enable an @emph{active} mark. +When this is enabled, the text between point and mark (the @var{region}) is +displayed in the terminal's standout mode (a @var{face}). +This is called by various readline functions that set the mark and insert +text, and is available for applications to call. +@end deftypefun + +@deftypefun {void} rl_deactivate_mark (void) +Turn off the active mark. +@end deftypefun + +@deftypefun {void} rl_keep_mark_active (void) +Indicate that the mark should remain active when the current readline function +completes and after redisplay occurs. +In most cases, the mark remains active for only the duration of a single +bindable readline function. +@end deftypefun + +@deftypefun {int} rl_mark_active_p (void) +Return a non-zero value if the mark is currently active; zero otherwise. +@end deftypefun + +@node Alternate Interface +@subsection Alternate Interface + +An alternate interface is available to plain @code{readline()}. Some +applications need to interleave keyboard I/O with file, device, or +window system I/O, typically by using a main loop to @code{select()} +on various file descriptors. To accommodate this need, readline can +also be invoked as a `callback' function from an event loop. There +are functions available to make this easy. + +@deftypefun void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) +Set up the terminal for readline I/O and display the initial +expanded value of @var{prompt}. Save the value of @var{lhandler} to +use as a handler function to call when a complete line of input has been +entered. +The handler function receives the text of the line as an argument. +As with @code{readline()}, the handler function should @code{free} the +line when it it finished with it. +@end deftypefun + +@deftypefun void rl_callback_read_char (void) +Whenever an application determines that keyboard input is available, it +should call @code{rl_callback_read_char()}, which will read the next +character from the current input source. +If that character completes the line, @code{rl_callback_read_char} will +invoke the @var{lhandler} function installed by +@code{rl_callback_handler_install} to process the line. +Before calling the @var{lhandler} function, the terminal settings are +reset to the values they had before calling +@code{rl_callback_handler_install}. +If the @var{lhandler} function returns, +and the line handler remains installed, +the terminal settings are modified for Readline's use again. +@code{EOF} is indicated by calling @var{lhandler} with a +@code{NULL} line. +@end deftypefun + +@deftypefun void rl_callback_sigcleanup (void) +Clean up any internal state the callback interface uses to maintain state +between calls to rl_callback_read_char (e.g., the state of any active +incremental searches). This is intended to be used by applications that +wish to perform their own signal handling; Readline's internal signal handler +calls this when appropriate. +@end deftypefun + +@deftypefun void rl_callback_handler_remove (void) +Restore the terminal to its initial state and remove the line handler. +You may call this function from within a callback as well as independently. +If the @var{lhandler} installed by @code{rl_callback_handler_install} +does not exit the program, either this function or the function referred +to by the value of @code{rl_deprep_term_function} should be called before +the program exits to reset the terminal settings. +@end deftypefun + +@node A Readline Example +@subsection A Readline Example + +Here is a function which changes lowercase characters to their uppercase +equivalents, and uppercase characters to lowercase. If +this function was bound to @samp{M-c}, then typing @samp{M-c} would +change the case of the character under point. Typing @samp{M-1 0 M-c} +would change the case of the following 10 characters, leaving the cursor on +the last character changed. + +@example +/* Invert the case of the COUNT following characters. */ +int +invert_case_line (count, key) + int count, key; +@{ + register int start, end, i; + + start = rl_point; + + if (rl_point >= rl_end) + return (0); + + if (count < 0) + @{ + direction = -1; + count = -count; + @} + else + direction = 1; + + /* Find the end of the range to modify. */ + end = start + (count * direction); + + /* Force it to be within range. */ + if (end > rl_end) + end = rl_end; + else if (end < 0) + end = 0; + + if (start == end) + return (0); + + if (start > end) + @{ + int temp = start; + start = end; + end = temp; + @} + + /* Tell readline that we are modifying the line, + so it will save the undo information. */ + rl_modifying (start, end); + + for (i = start; i != end; i++) + @{ + if (_rl_uppercase_p (rl_line_buffer[i])) + rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]); + else if (_rl_lowercase_p (rl_line_buffer[i])) + rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]); + @} + /* Move point to on top of the last character changed. */ + rl_point = (direction == 1) ? end - 1 : start; + return (0); +@} +@end example + +@node Alternate Interface Example +@subsection Alternate Interface Example + +Here is a complete program that illustrates Readline's alternate interface. +It reads lines from the terminal and displays them, providing the +standard history and TAB completion functions. +It understands the EOF character or "exit" to exit the program. + +@example +/* Standard include files. stdio.h is required. */ +#include +#include +#include +#include + +/* Used for select(2) */ +#include +#include + +#include + +#include + +/* Standard readline include files. */ +#include +#include + +static void cb_linehandler (char *); +static void sighandler (int); + +int running; +int sigwinch_received; +const char *prompt = "rltest$ "; + +/* Handle SIGWINCH and window size changes when readline is not active and + reading a character. */ +static void +sighandler (int sig) +@{ + sigwinch_received = 1; +@} + +/* Callback function called for each line when accept-line executed, EOF + seen, or EOF character read. This sets a flag and returns; it could + also call exit(3). */ +static void +cb_linehandler (char *line) +@{ + /* Can use ^D (stty eof) or `exit' to exit. */ + if (line == NULL || strcmp (line, "exit") == 0) + @{ + if (line == 0) + printf ("\n"); + printf ("exit\n"); + /* This function needs to be called to reset the terminal settings, + and calling it from the line handler keeps one extra prompt from + being displayed. */ + rl_callback_handler_remove (); + + running = 0; + @} + else + @{ + if (*line) + add_history (line); + printf ("input line: %s\n", line); + free (line); + @} +@} + +int +main (int c, char **v) +@{ + fd_set fds; + int r; + + /* Set the default locale values according to environment variables. */ + setlocale (LC_ALL, ""); + + /* Handle window size changes when readline is not active and reading + characters. */ + signal (SIGWINCH, sighandler); + + /* Install the line handler. */ + rl_callback_handler_install (prompt, cb_linehandler); + + /* Enter a simple event loop. This waits until something is available + to read on readline's input stream (defaults to standard input) and + calls the builtin character read callback to read it. It does not + have to modify the user's terminal settings. */ + running = 1; + while (running) + @{ + FD_ZERO (&fds); + FD_SET (fileno (rl_instream), &fds); + + r = select (FD_SETSIZE, &fds, NULL, NULL, NULL); + if (r < 0 && errno != EINTR) + @{ + perror ("rltest: select"); + rl_callback_handler_remove (); + break; + @} + if (sigwinch_received) + @{ + rl_resize_terminal (); + sigwinch_received = 0; + @} + if (r < 0) + continue; + + if (FD_ISSET (fileno (rl_instream), &fds)) + rl_callback_read_char (); + @} + + printf ("rltest: Event loop has exited\n"); + return 0; +@} +@end example + +@node Readline Signal Handling +@section Readline Signal Handling + +Signals are asynchronous events sent to a process by the Unix kernel, +sometimes on behalf of another process. They are intended to indicate +exceptional events, like a user pressing the interrupt key on his terminal, +or a network connection being broken. There is a class of signals that can +be sent to the process currently reading input from the keyboard. Since +Readline changes the terminal attributes when it is called, it needs to +perform special processing when such a signal is received in order to +restore the terminal to a sane state, or provide application writers with +functions to do so manually. + +Readline contains an internal signal handler that is installed for a +number of signals (@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, +@code{SIGHUP}, +@code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}). +When one of these signals is received, the signal handler +will reset the terminal attributes to those that were in effect before +@code{readline()} was called, reset the signal handling to what it was +before @code{readline()} was called, and resend the signal to the calling +application. +If and when the calling application's signal handler returns, Readline +will reinitialize the terminal and continue to accept input. +When a @code{SIGINT} is received, the Readline signal handler performs +some additional work, which will cause any partially-entered line to be +aborted (see the description of @code{rl_free_line_state()} below). + +There is an additional Readline signal handler, for @code{SIGWINCH}, which +the kernel sends to a process whenever the terminal's size changes (for +example, if a user resizes an @code{xterm}). The Readline @code{SIGWINCH} +handler updates Readline's internal screen size information, and then calls +any @code{SIGWINCH} signal handler the calling application has installed. +Readline calls the application's @code{SIGWINCH} signal handler without +resetting the terminal to its original state. If the application's signal +handler does more than update its idea of the terminal size and return (for +example, a @code{longjmp} back to a main processing loop), it @emph{must} +call @code{rl_cleanup_after_signal()} (described below), to restore the +terminal state. + +When an application is using the callback interface +(@pxref{Alternate Interface}), Readline installs signal handlers only for +the duration of the call to @code{rl_callback_read_char}. Applications +using the callback interface should be prepared to clean up Readline's +state if they wish to handle the signal before the line handler completes +and restores the terminal state. + +If an application using the callback interface wishes to have Readline +install its signal handlers at the time the application calls +@code{rl_callback_handler_install} and remove them only when a complete +line of input has been read, it should set the +@code{rl_persistent_signal_handlers} variable to a non-zero value. +This allows an application to defer all of the handling of the signals +Readline catches to Readline. +Applications should use this variable with care; it can result in Readline +catching signals and not acting on them (or allowing the application to react +to them) until the application calls @code{rl_callback_read_char}. This +can result in an application becoming less responsive to keyboard signals +like SIGINT. +If an application does not want or need to perform any signal handling, or +does not need to do any processing between calls to @code{rl_callback_read_char}, +setting this variable may be desirable. + +Readline provides two variables that allow application writers to +control whether or not it will catch certain signals and act on them +when they are received. It is important that applications change the +values of these variables only when calling @code{readline()}, not in +a signal handler, so Readline's internal signal state is not corrupted. + +@deftypevar int rl_catch_signals +If this variable is non-zero, Readline will install signal handlers for +@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGHUP}, @code{SIGALRM}, +@code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}. + +The default value of @code{rl_catch_signals} is 1. +@end deftypevar + +@deftypevar int rl_catch_sigwinch +If this variable is set to a non-zero value, +Readline will install a signal handler for @code{SIGWINCH}. + +The default value of @code{rl_catch_sigwinch} is 1. +@end deftypevar + +@deftypevar int rl_persistent_signal_handlers +If an application using the callback interface wishes Readline's signal +handlers to be installed and active during the set of calls to +@code{rl_callback_read_char} that constitutes an entire single line, +it should set this variable to a non-zero value. + +The default value of @code{rl_persistent_signal_handlers} is 0. +@end deftypevar + +@deftypevar int rl_change_environment +If this variable is set to a non-zero value, +and Readline is handling @code{SIGWINCH}, Readline will modify the +@var{LINES} and @var{COLUMNS} environment variables upon receipt of a +@code{SIGWINCH} + +The default value of @code{rl_change_environment} is 1. +@end deftypevar + +If an application does not wish to have Readline catch any signals, or +to handle signals other than those Readline catches (@code{SIGHUP}, +for example), +Readline provides convenience functions to do the necessary terminal +and internal state cleanup upon receipt of a signal. + +@deftypefun int rl_pending_signal (void) +Return the signal number of the most recent signal Readline received but +has not yet handled, or 0 if there is no pending signal. +@end deftypefun + +@deftypefun void rl_cleanup_after_signal (void) +This function will reset the state of the terminal to what it was before +@code{readline()} was called, and remove the Readline signal handlers for +all signals, depending on the values of @code{rl_catch_signals} and +@code{rl_catch_sigwinch}. +@end deftypefun + +@deftypefun void rl_free_line_state (void) +This will free any partial state associated with the current input line +(undo information, any partial history entry, any partially-entered +keyboard macro, and any partially-entered numeric argument). This +should be called before @code{rl_cleanup_after_signal()}. The +Readline signal handler for @code{SIGINT} calls this to abort the +current input line. +@end deftypefun + +@deftypefun void rl_reset_after_signal (void) +This will reinitialize the terminal and reinstall any Readline signal +handlers, depending on the values of @code{rl_catch_signals} and +@code{rl_catch_sigwinch}. +@end deftypefun + +If an application wants to force Readline to handle any signals that +have arrived while it has been executing, @code{rl_check_signals()} +will call Readline's internal signal handler if there are any pending +signals. This is primarily intended for those applications that use +a custom @code{rl_getc_function} (@pxref{Readline Variables}) and wish +to handle signals received while waiting for input. + +@deftypefun void rl_check_signals (void) +If there are any pending signals, call Readline's internal signal handling +functions to process them. @code{rl_pending_signal()} can be used independently +to determine whether or not there are any pending signals. +@end deftypefun + +If an application does not wish Readline to catch @code{SIGWINCH}, it may +call @code{rl_resize_terminal()} or @code{rl_set_screen_size()} to force +Readline to update its idea of the terminal size when it receives +a @code{SIGWINCH}. + +@deftypefun void rl_echo_signal_char (int sig) +If an application wishes to install its own signal handlers, but still +have readline display characters that generate signals, calling this +function with @var{sig} set to @code{SIGINT}, @code{SIGQUIT}, or +@code{SIGTSTP} will display the character generating that signal. +@end deftypefun + +@deftypefun void rl_resize_terminal (void) +Update Readline's internal screen size by reading values from the kernel. +@end deftypefun + +@deftypefun void rl_set_screen_size (int rows, int cols) +Set Readline's idea of the terminal size to @var{rows} rows and +@var{cols} columns. If either @var{rows} or @var{columns} is less than +or equal to 0, Readline's idea of that terminal dimension is unchanged. +This is intended to tell Readline the physical dimensions of the terminal, +and is used internally to calculate the maximum number of characters that +may appear on a single line and on the screen. +@end deftypefun + +If an application does not want to install a @code{SIGWINCH} handler, but +is still interested in the screen dimensions, it may query Readline's idea +of the screen size. + +@deftypefun void rl_get_screen_size (int *rows, int *cols) +Return Readline's idea of the terminal's size in the +variables pointed to by the arguments. +@end deftypefun + +@deftypefun void rl_reset_screen_size (void) +Cause Readline to reobtain the screen size and recalculate its dimensions. +@end deftypefun + +The following functions install and remove Readline's signal handlers. + +@deftypefun int rl_set_signals (void) +Install Readline's signal handler for @code{SIGINT}, @code{SIGQUIT}, +@code{SIGTERM}, @code{SIGHUP}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, +@code{SIGTTOU}, and @code{SIGWINCH}, depending on the values of +@code{rl_catch_signals} and @code{rl_catch_sigwinch}. +@end deftypefun + +@deftypefun int rl_clear_signals (void) +Remove all of the Readline signal handlers installed by +@code{rl_set_signals()}. +@end deftypefun + +@node Custom Completers +@section Custom Completers +@cindex application-specific completion functions + +Typically, a program that reads commands from the user has a way of +disambiguating commands and data. If your program is one of these, then +it can provide completion for commands, data, or both. +The following sections describe how your program and Readline +cooperate to provide this service. + +@menu +* How Completing Works:: The logic used to do completion. +* Completion Functions:: Functions provided by Readline. +* Completion Variables:: Variables which control completion. +* A Short Completion Example:: An example of writing completer subroutines. +@end menu + +@node How Completing Works +@subsection How Completing Works + +In order to complete some text, the full list of possible completions +must be available. That is, it is not possible to accurately +expand a partial word without knowing all of the possible words +which make sense in that context. The Readline library provides +the user interface to completion, and two of the most common +completion functions: filename and username. For completing other types +of text, you must write your own completion function. This section +describes exactly what such functions must do, and provides an example. + +There are three major functions used to perform completion: + +@enumerate +@item +The user-interface function @code{rl_complete()}. This function is +called with the same arguments as other bindable Readline functions: +@var{count} and @var{invoking_key}. +It isolates the word to be completed and calls +@code{rl_completion_matches()} to generate a list of possible completions. +It then either lists the possible completions, inserts the possible +completions, or actually performs the +completion, depending on which behavior is desired. + +@item +The internal function @code{rl_completion_matches()} uses an +application-supplied @dfn{generator} function to generate the list of +possible matches, and then returns the array of these matches. +The caller should place the address of its generator function in +@code{rl_completion_entry_function}. + +@item +The generator function is called repeatedly from +@code{rl_completion_matches()}, returning a string each time. The +arguments to the generator function are @var{text} and @var{state}. +@var{text} is the partial word to be completed. @var{state} is zero the +first time the function is called, allowing the generator to perform +any necessary initialization, and a positive non-zero integer for +each subsequent call. The generator function returns +@code{(char *)NULL} to inform @code{rl_completion_matches()} that there are +no more possibilities left. Usually the generator function computes the +list of possible completions when @var{state} is zero, and returns them +one at a time on subsequent calls. Each string the generator function +returns as a match must be allocated with @code{malloc()}; Readline +frees the strings when it has finished with them. +Such a generator function is referred to as an +@dfn{application-specific completion function}. + +@end enumerate + +@deftypefun int rl_complete (int ignore, int invoking_key) +Complete the word at or before point. You have supplied the function +that does the initial simple matching selection algorithm (see +@code{rl_completion_matches()}). The default is to do filename completion. +@end deftypefun + +@deftypevar {rl_compentry_func_t *} rl_completion_entry_function +This is a pointer to the generator function for +@code{rl_completion_matches()}. +If the value of @code{rl_completion_entry_function} is +@code{NULL} then the default filename generator +function, @code{rl_filename_completion_function()}, is used. +An @dfn{application-specific completion function} is a function whose +address is assigned to @code{rl_completion_entry_function} and whose +return values are used to generate possible completions. +@end deftypevar + +@node Completion Functions +@subsection Completion Functions + +Here is the complete list of callable completion functions present in +Readline. + +@deftypefun int rl_complete_internal (int what_to_do) +Complete the word at or before point. @var{what_to_do} says what to do +with the completion. A value of @samp{?} means list the possible +completions. @samp{TAB} means do standard completion. @samp{*} means +insert all of the possible completions. @samp{!} means to display +all of the possible completions, if there is more than one, as well as +performing partial completion. @samp{@@} is similar to @samp{!}, but +possible completions are not listed if the possible completions share +a common prefix. +@end deftypefun + +@deftypefun int rl_complete (int ignore, int invoking_key) +Complete the word at or before point. You have supplied the function +that does the initial simple matching selection algorithm (see +@code{rl_completion_matches()} and @code{rl_completion_entry_function}). +The default is to do filename +completion. This calls @code{rl_complete_internal()} with an +argument depending on @var{invoking_key}. +@end deftypefun + +@deftypefun int rl_possible_completions (int count, int invoking_key) +List the possible completions. See description of @code{rl_complete +()}. This calls @code{rl_complete_internal()} with an argument of +@samp{?}. +@end deftypefun + +@deftypefun int rl_insert_completions (int count, int invoking_key) +Insert the list of possible completions into the line, deleting the +partially-completed word. See description of @code{rl_complete()}. +This calls @code{rl_complete_internal()} with an argument of @samp{*}. +@end deftypefun + +@deftypefun int rl_completion_mode (rl_command_func_t *cfunc) +Returns the appropriate value to pass to @code{rl_complete_internal()} +depending on whether @var{cfunc} was called twice in succession and +the values of the @code{show-all-if-ambiguous} and +@code{show-all-if-unmodified} variables. +Application-specific completion functions may use this function to present +the same interface as @code{rl_complete()}. +@end deftypefun + +@deftypefun {char **} rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) +Returns an array of strings which is a list of completions for +@var{text}. If there are no completions, returns @code{NULL}. +The first entry in the returned array is the substitution for @var{text}. +The remaining entries are the possible completions. The array is +terminated with a @code{NULL} pointer. + +@var{entry_func} is a function of two args, and returns a +@code{char *}. The first argument is @var{text}. The second is a +state argument; it is zero on the first call, and non-zero on subsequent +calls. @var{entry_func} returns a @code{NULL} pointer to the caller +when there are no more matches. +@end deftypefun + +@deftypefun {char *} rl_filename_completion_function (const char *text, int state) +A generator function for filename completion in the general case. +@var{text} is a partial filename. +The Bash source is a useful reference for writing application-specific +completion functions (the Bash completion functions call this and other +Readline functions). +@end deftypefun + +@deftypefun {char *} rl_username_completion_function (const char *text, int state) +A completion generator for usernames. @var{text} contains a partial +username preceded by a random character (usually @samp{~}). As with all +completion generators, @var{state} is zero on the first call and non-zero +for subsequent calls. +@end deftypefun + +@node Completion Variables +@subsection Completion Variables + +@deftypevar {rl_compentry_func_t *} rl_completion_entry_function +A pointer to the generator function for @code{rl_completion_matches()}. +@code{NULL} means to use @code{rl_filename_completion_function()}, +the default filename completer. +@end deftypevar + +@deftypevar {rl_completion_func_t *} rl_attempted_completion_function +A pointer to an alternative function to create matches. +The function is called with @var{text}, @var{start}, and @var{end}. +@var{start} and @var{end} are indices in @code{rl_line_buffer} defining +the boundaries of @var{text}, which is a character string. +If this function exists and returns @code{NULL}, or if this variable is +set to @code{NULL}, then @code{rl_complete()} will call the value of +@code{rl_completion_entry_function} to generate matches, otherwise the +array of strings returned will be used. +If this function sets the @code{rl_attempted_completion_over} +variable to a non-zero value, Readline will not perform its default +completion even if this function returns no matches. +@end deftypevar + +@deftypevar {rl_quote_func_t *} rl_filename_quoting_function +A pointer to a function that will quote a filename in an +application-specific fashion. This is called if filename completion is being +attempted and one of the characters in @code{rl_filename_quote_characters} +appears in a completed filename. The function is called with +@var{text}, @var{match_type}, and @var{quote_pointer}. The @var{text} +is the filename to be quoted. The @var{match_type} is either +@code{SINGLE_MATCH}, if there is only one completion match, or +@code{MULT_MATCH}. Some functions use this to decide whether or not to +insert a closing quote character. The @var{quote_pointer} is a pointer +to any opening quote character the user typed. Some functions choose +to reset this character. +@end deftypevar + +@deftypevar {rl_dequote_func_t *} rl_filename_dequoting_function +A pointer to a function that will remove application-specific quoting +characters from a filename before completion is attempted, so those +characters do not interfere with matching the text against names in +the filesystem. It is called with @var{text}, the text of the word +to be dequoted, and @var{quote_char}, which is the quoting character +that delimits the filename (usually @samp{'} or @samp{"}). If +@var{quote_char} is zero, the filename was not in an embedded string. +@end deftypevar + +@deftypevar {rl_linebuf_func_t *} rl_char_is_quoted_p +A pointer to a function to call that determines whether or not a specific +character in the line buffer is quoted, according to whatever quoting +mechanism the program calling Readline uses. The function is called with +two arguments: @var{text}, the text of the line, and @var{index}, the +index of the character in the line. It is used to decide whether a +character found in @code{rl_completer_word_break_characters} should be +used to break words for the completer. +@end deftypevar + +@deftypevar {rl_compignore_func_t *} rl_ignore_some_completions_function +This function, if defined, is called by the completer when real filename +completion is done, after all the matching names have been generated. +It is passed a @code{NULL} terminated array of matches. +The first element (@code{matches[0]}) is the +maximal substring common to all matches. This function can +re-arrange the list of matches as required, but each element deleted +from the array must be freed. +@end deftypevar + +@deftypevar {rl_icppfunc_t *} rl_directory_completion_hook +This function, if defined, is allowed to modify the directory portion +of filenames Readline completes. +It could be used to expand symbolic links or shell variables in pathnames. +It is called with the address of a string (the current directory name) as an +argument, and may modify that string. +If the string is replaced with a new string, the old value should be freed. +Any modified directory name should have a trailing slash. +The modified value will be used as part of the completion, replacing +the directory portion of the pathname the user typed. +At the least, even if no other expansion is performed, this function should +remove any quote characters from the directory name, because its result will +be passed directly to @code{opendir()}. + +The directory completion hook returns an integer that should be non-zero if +the function modifies its directory argument. +The function should not modify the directory argument if it returns 0. +@end deftypevar + +@deftypevar {rl_icppfunc_t *} rl_directory_rewrite_hook; +If non-zero, this is the address of a function to call when completing +a directory name. This function takes the address of the directory name +to be modified as an argument. Unlike @code{rl_directory_completion_hook}, +it only modifies the directory name used in @code{opendir}, not what is +displayed when the possible completions are printed or inserted. It is +called before rl_directory_completion_hook. +At the least, even if no other expansion is performed, this function should +remove any quote characters from the directory name, because its result will +be passed directly to @code{opendir()}. + +The directory rewrite hook returns an integer that should be non-zero if +the function modifies its directory argument. +The function should not modify the directory argument if it returns 0. +@end deftypevar + +@deftypevar {rl_icppfunc_t *} rl_filename_stat_hook +If non-zero, this is the address of a function for the completer to +call before deciding which character to append to a completed name. +This function modifies its filename name argument, and the modified value +is passed to @code{stat()} to determine the file's type and characteristics. +This function does not need to remove quote characters from the filename. + +The stat hook returns an integer that should be non-zero if +the function modifies its directory argument. +The function should not modify the directory argument if it returns 0. +@end deftypevar + +@deftypevar {rl_dequote_func_t *} rl_filename_rewrite_hook +If non-zero, this is the address of a function called when reading +directory entries from the filesystem for completion and comparing +them to the partial word to be completed. The function should +perform any necessary application or system-specific conversion on +the filename, such as converting between character sets or converting +from a filesystem format to a character input format. +The function takes two arguments: @var{fname}, the filename to be converted, +and @var{fnlen}, its length in bytes. +It must either return its first argument (if no conversion takes place) +or the converted filename in newly-allocated memory. The converted +form is used to compare against the word to be completed, and, if it +matches, is added to the list of matches. Readline will free the +allocated string. +@end deftypevar + +@deftypevar {rl_compdisp_func_t *} rl_completion_display_matches_hook +If non-zero, then this is the address of a function to call when +completing a word would normally display the list of possible matches. +This function is called in lieu of Readline displaying the list. +It takes three arguments: +(@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length}) +where @var{matches} is the array of matching strings, +@var{num_matches} is the number of strings in that array, and +@var{max_length} is the length of the longest string in that array. +Readline provides a convenience function, @code{rl_display_match_list}, +that takes care of doing the display to Readline's output stream. +You may call that function from this hook. +@end deftypevar + +@deftypevar {const char *} rl_basic_word_break_characters +The basic list of characters that signal a break between words for the +completer routine. The default value of this variable is the characters +which break words for completion in Bash: +@code{" \t\n\"\\'`@@$><=;|&@{("}. +@end deftypevar + +@deftypevar {const char *} rl_basic_quote_characters +A list of quote characters which can cause a word break. +@end deftypevar + +@deftypevar {const char *} rl_completer_word_break_characters +The list of characters that signal a break between words for +@code{rl_complete_internal()}. The default list is the value of +@code{rl_basic_word_break_characters}. +@end deftypevar + +@deftypevar {rl_cpvfunc_t *} rl_completion_word_break_hook +If non-zero, this is the address of a function to call when Readline is +deciding where to separate words for word completion. It should return +a character string like @code{rl_completer_word_break_characters} to be +used to perform the current completion. The function may choose to set +@code{rl_completer_word_break_characters} itself. If the function +returns @code{NULL}, @code{rl_completer_word_break_characters} is used. +@end deftypevar + +@deftypevar {const char *} rl_completer_quote_characters +A list of characters which can be used to quote a substring of the line. +Completion occurs on the entire substring, and within the substring +@code{rl_completer_word_break_characters} are treated as any other character, +unless they also appear within this list. +@end deftypevar + +@deftypevar {const char *} rl_filename_quote_characters +A list of characters that cause a filename to be quoted by the completer +when they appear in a completed filename. The default is the null string. +@end deftypevar + +@deftypevar {const char *} rl_special_prefixes +The list of characters that are word break characters, but should be +left in @var{text} when it is passed to the completion function. +Programs can use this to help determine what kind of completing to do. +For instance, Bash sets this variable to "$@@" so that it can complete +shell variables and hostnames. +@end deftypevar + +@deftypevar int rl_completion_query_items +Up to this many items will be displayed in response to a +possible-completions call. After that, readline asks the user if she is sure +she wants to see them all. The default value is 100. A negative value +indicates that Readline should never ask the user. +@end deftypevar + +@deftypevar {int} rl_completion_append_character +When a single completion alternative matches at the end of the command +line, this character is appended to the inserted completion text. The +default is a space character (@samp{ }). Setting this to the null +character (@samp{\0}) prevents anything being appended automatically. +This can be changed in application-specific completion functions to +provide the ``most sensible word separator character'' according to +an application-specific command line syntax specification. +It is set to the default before any application-specific completion function +is called, and may only be changed within such a function. +@end deftypevar + +@deftypevar int rl_completion_suppress_append +If non-zero, @var{rl_completion_append_character} is not appended to +matches at the end of the command line, as described above. +It is set to 0 before any application-specific completion function +is called, and may only be changed within such a function. +@end deftypevar + +@deftypevar int rl_completion_quote_character +When Readline is completing quoted text, as delimited by one of the +characters in @var{rl_completer_quote_characters}, it sets this variable +to the quoting character found. +This is set before any application-specific completion function is called. +@end deftypevar + +@deftypevar int rl_completion_suppress_quote +If non-zero, Readline does not append a matching quote character when +performing completion on a quoted string. +It is set to 0 before any application-specific completion function +is called, and may only be changed within such a function. +@end deftypevar + +@deftypevar int rl_completion_found_quote +When Readline is completing quoted text, it sets this variable +to a non-zero value if the word being completed contains or is delimited +by any quoting characters, including backslashes. +This is set before any application-specific completion function is called. +@end deftypevar + +@deftypevar int rl_completion_mark_symlink_dirs +If non-zero, a slash will be appended to completed filenames that are +symbolic links to directory names, subject to the value of the +user-settable @var{mark-directories} variable. +This variable exists so that application-specific completion functions +can override the user's global preference (set via the +@var{mark-symlinked-directories} Readline variable) if appropriate. +This variable is set to the user's preference before any +application-specific completion function is called, so unless that +function modifies the value, the user's preferences are honored. +@end deftypevar + +@deftypevar int rl_ignore_completion_duplicates +If non-zero, then duplicates in the matches are removed. +The default is 1. +@end deftypevar + +@deftypevar int rl_filename_completion_desired +Non-zero means that the results of the matches are to be treated as +filenames. This is @emph{always} zero when completion is attempted, +and can only be changed +within an application-specific completion function. If it is set to a +non-zero value by such a function, directory names have a slash appended +and Readline attempts to quote completed filenames if they contain any +characters in @code{rl_filename_quote_characters} and +@code{rl_filename_quoting_desired} is set to a non-zero value. +@end deftypevar + +@deftypevar int rl_filename_quoting_desired +Non-zero means that the results of the matches are to be quoted using +double quotes (or an application-specific quoting mechanism) if the +completed filename contains any characters in +@code{rl_filename_quote_chars}. This is @emph{always} non-zero +when completion is attempted, and can only be changed within an +application-specific completion function. +The quoting is effected via a call to the function pointed to +by @code{rl_filename_quoting_function}. +@end deftypevar + +@deftypevar int rl_attempted_completion_over +If an application-specific completion function assigned to +@code{rl_attempted_completion_function} sets this variable to a non-zero +value, Readline will not perform its default filename completion even +if the application's completion function returns no matches. +It should be set only by an application's completion function. +@end deftypevar + +@deftypevar int rl_sort_completion_matches +If an application sets this variable to 0, Readline will not sort the +list of completions (which implies that it cannot remove any duplicate +completions). The default value is 1, which means that Readline will +sort the completions and, depending on the value of +@code{rl_ignore_completion_duplicates}, will attempt to remove duplicate +matches. +@end deftypevar + +@deftypevar int rl_completion_type +Set to a character describing the type of completion Readline is currently +attempting; see the description of @code{rl_complete_internal()} +(@pxref{Completion Functions}) for the list of characters. +This is set to the appropriate value before any application-specific +completion function is called, allowing such functions to present +the same interface as @code{rl_complete()}. +@end deftypevar + +@deftypevar int rl_completion_invoking_key +Set to the final character in the key sequence that invoked one of the +completion functions that call @code{rl_complete_internal()}. This is +set to the appropriate value before any application-specific completion +function is called. +@end deftypevar + +@deftypevar int rl_inhibit_completion +If this variable is non-zero, completion is inhibited. The completion +character will be inserted as any other bound to @code{self-insert}. +@end deftypevar + +@node A Short Completion Example +@subsection A Short Completion Example + +Here is a small application demonstrating the use of the GNU Readline +library. It is called @code{fileman}, and the source code resides in +@file{examples/fileman.c}. This sample application provides +completion of command names, line editing features, and access to the +history list. + +@page +@smallexample +/* fileman.c -- A tiny application which demonstrates how to use the + GNU Readline library. This application interactively allows users + to manipulate files and their modes. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#ifdef HAVE_SYS_FILE_H +# include +#endif +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include +#include + +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +#ifdef HAVE_STDLIB_H +# include +#endif + +#include + +#include +#include + +extern char *xmalloc PARAMS((size_t)); + +/* The names of functions that actually do the manipulation. */ +int com_list PARAMS((char *)); +int com_view PARAMS((char *)); +int com_rename PARAMS((char *)); +int com_stat PARAMS((char *)); +int com_pwd PARAMS((char *)); +int com_delete PARAMS((char *)); +int com_help PARAMS((char *)); +int com_cd PARAMS((char *)); +int com_quit PARAMS((char *)); + +/* A structure which contains information on the commands this program + can understand. */ + +typedef struct @{ + char *name; /* User printable name of the function. */ + rl_icpfunc_t *func; /* Function to call to do the job. */ + char *doc; /* Documentation for this function. */ +@} COMMAND; + +COMMAND commands[] = @{ + @{ "cd", com_cd, "Change to directory DIR" @}, + @{ "delete", com_delete, "Delete FILE" @}, + @{ "help", com_help, "Display this text" @}, + @{ "?", com_help, "Synonym for `help'" @}, + @{ "list", com_list, "List files in DIR" @}, + @{ "ls", com_list, "Synonym for `list'" @}, + @{ "pwd", com_pwd, "Print the current working directory" @}, + @{ "quit", com_quit, "Quit using Fileman" @}, + @{ "rename", com_rename, "Rename FILE to NEWNAME" @}, + @{ "stat", com_stat, "Print out statistics on FILE" @}, + @{ "view", com_view, "View the contents of FILE" @}, + @{ (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL @} +@}; + +/* Forward declarations. */ +char *stripwhite (); +COMMAND *find_command (); + +/* The name of this program, as taken from argv[0]. */ +char *progname; + +/* When non-zero, this global means the user is done using this program. */ +int done; + +char * +dupstr (s) + char *s; +@{ + char *r; + + r = xmalloc (strlen (s) + 1); + strcpy (r, s); + return (r); +@} + +main (argc, argv) + int argc; + char **argv; +@{ + char *line, *s; + + progname = argv[0]; + + initialize_readline (); /* Bind our completer. */ + + /* Loop reading and executing lines until the user quits. */ + for ( ; done == 0; ) + @{ + line = readline ("FileMan: "); + + if (!line) + break; + + /* Remove leading and trailing whitespace from the line. + Then, if there is anything left, add it to the history list + and execute it. */ + s = stripwhite (line); + + if (*s) + @{ + add_history (s); + execute_line (s); + @} + + free (line); + @} + exit (0); +@} + +/* Execute a command line. */ +int +execute_line (line) + char *line; +@{ + register int i; + COMMAND *command; + char *word; + + /* Isolate the command word. */ + i = 0; + while (line[i] && whitespace (line[i])) + i++; + word = line + i; + + while (line[i] && !whitespace (line[i])) + i++; + + if (line[i]) + line[i++] = '\0'; + + command = find_command (word); + + if (!command) + @{ + fprintf (stderr, "%s: No such command for FileMan.\n", word); + return (-1); + @} + + /* Get argument to command, if any. */ + while (whitespace (line[i])) + i++; + + word = line + i; + + /* Call the function. */ + return ((*(command->func)) (word)); +@} + +/* Look up NAME as the name of a command, and return a pointer to that + command. Return a NULL pointer if NAME isn't a command name. */ +COMMAND * +find_command (name) + char *name; +@{ + register int i; + + for (i = 0; commands[i].name; i++) + if (strcmp (name, commands[i].name) == 0) + return (&commands[i]); + + return ((COMMAND *)NULL); +@} + +/* Strip whitespace from the start and end of STRING. Return a pointer + into STRING. */ +char * +stripwhite (string) + char *string; +@{ + register char *s, *t; + + for (s = string; whitespace (*s); s++) + ; + + if (*s == 0) + return (s); + + t = s + strlen (s) - 1; + while (t > s && whitespace (*t)) + t--; + *++t = '\0'; + + return s; +@} + +/* **************************************************************** */ +/* */ +/* Interface to Readline Completion */ +/* */ +/* **************************************************************** */ + +char *command_generator PARAMS((const char *, int)); +char **fileman_completion PARAMS((const char *, int, int)); + +/* Tell the GNU Readline library how to complete. We want to try to complete + on command names if this is the first word in the line, or on filenames + if not. */ +initialize_readline () +@{ + /* Allow conditional parsing of the ~/.inputrc file. */ + rl_readline_name = "FileMan"; + + /* Tell the completer that we want a crack first. */ + rl_attempted_completion_function = fileman_completion; +@} + +/* Attempt to complete on the contents of TEXT. START and END bound the + region of rl_line_buffer that contains the word to complete. TEXT is + the word to complete. We can use the entire contents of rl_line_buffer + in case we want to do some simple parsing. Return the array of matches, + or NULL if there aren't any. */ +char ** +fileman_completion (text, start, end) + const char *text; + int start, end; +@{ + char **matches; + + matches = (char **)NULL; + + /* If this word is at the start of the line, then it is a command + to complete. Otherwise it is the name of a file in the current + directory. */ + if (start == 0) + matches = rl_completion_matches (text, command_generator); + + return (matches); +@} + +/* Generator function for command completion. STATE lets us know whether + to start from scratch; without any state (i.e. STATE == 0), then we + start at the top of the list. */ +char * +command_generator (text, state) + const char *text; + int state; +@{ + static int list_index, len; + char *name; + + /* If this is a new word to complete, initialize now. This includes + saving the length of TEXT for efficiency, and initializing the index + variable to 0. */ + if (!state) + @{ + list_index = 0; + len = strlen (text); + @} + + /* Return the next name which partially matches from the command list. */ + while (name = commands[list_index].name) + @{ + list_index++; + + if (strncmp (name, text, len) == 0) + return (dupstr(name)); + @} + + /* If no names matched, then return NULL. */ + return ((char *)NULL); +@} + +/* **************************************************************** */ +/* */ +/* FileMan Commands */ +/* */ +/* **************************************************************** */ + +/* String to pass to system (). This is for the LIST, VIEW and RENAME + commands. */ +static char syscom[1024]; + +/* List the file(s) named in arg. */ +com_list (arg) + char *arg; +@{ + if (!arg) + arg = ""; + + sprintf (syscom, "ls -FClg %s", arg); + return (system (syscom)); +@} + +com_view (arg) + char *arg; +@{ + if (!valid_argument ("view", arg)) + return 1; + +#if defined (__MSDOS__) + /* more.com doesn't grok slashes in pathnames */ + sprintf (syscom, "less %s", arg); +#else + sprintf (syscom, "more %s", arg); +#endif + return (system (syscom)); +@} + +com_rename (arg) + char *arg; +@{ + too_dangerous ("rename"); + return (1); +@} + +com_stat (arg) + char *arg; +@{ + struct stat finfo; + + if (!valid_argument ("stat", arg)) + return (1); + + if (stat (arg, &finfo) == -1) + @{ + perror (arg); + return (1); + @} + + printf ("Statistics for `%s':\n", arg); + + printf ("%s has %d link%s, and is %d byte%s in length.\n", + arg, + finfo.st_nlink, + (finfo.st_nlink == 1) ? "" : "s", + finfo.st_size, + (finfo.st_size == 1) ? "" : "s"); + printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime)); + printf (" Last access at: %s", ctime (&finfo.st_atime)); + printf (" Last modified at: %s", ctime (&finfo.st_mtime)); + return (0); +@} + +com_delete (arg) + char *arg; +@{ + too_dangerous ("delete"); + return (1); +@} + +/* Print out help for ARG, or for all of the commands if ARG is + not present. */ +com_help (arg) + char *arg; +@{ + register int i; + int printed = 0; + + for (i = 0; commands[i].name; i++) + @{ + if (!*arg || (strcmp (arg, commands[i].name) == 0)) + @{ + printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc); + printed++; + @} + @} + + if (!printed) + @{ + printf ("No commands match `%s'. Possibilities are:\n", arg); + + for (i = 0; commands[i].name; i++) + @{ + /* Print in six columns. */ + if (printed == 6) + @{ + printed = 0; + printf ("\n"); + @} + + printf ("%s\t", commands[i].name); + printed++; + @} + + if (printed) + printf ("\n"); + @} + return (0); +@} + +/* Change to the directory ARG. */ +com_cd (arg) + char *arg; +@{ + if (chdir (arg) == -1) + @{ + perror (arg); + return 1; + @} + + com_pwd (""); + return (0); +@} + +/* Print out the current working directory. */ +com_pwd (ignore) + char *ignore; +@{ + char dir[1024], *s; + + s = getcwd (dir, sizeof(dir) - 1); + if (s == 0) + @{ + printf ("Error getting pwd: %s\n", dir); + return 1; + @} + + printf ("Current directory is %s\n", dir); + return 0; +@} + +/* The user wishes to quit using this program. Just set DONE non-zero. */ +com_quit (arg) + char *arg; +@{ + done = 1; + return (0); +@} + +/* Function which tells you that you can't do this. */ +too_dangerous (caller) + char *caller; +@{ + fprintf (stderr, + "%s: Too dangerous for me to distribute. Write it yourself.\n", + caller); +@} + +/* Return non-zero if ARG is a valid argument for CALLER, else print + an error message and return zero. */ +int +valid_argument (caller, arg) + char *caller, *arg; +@{ + if (!arg || !*arg) + @{ + fprintf (stderr, "%s: Argument required.\n", caller); + return (0); + @} + + return (1); +@} +@end smallexample diff --git a/bash-5.1/lib/readline/doc/rluser.texi b/bash-5.1/lib/readline/doc/rluser.texi new file mode 100644 index 0000000000000000000000000000000000000000..26b0ff072c7a8503f3e9e567ca4cfecdd3dcc506 --- /dev/null +++ b/bash-5.1/lib/readline/doc/rluser.texi @@ -0,0 +1,2422 @@ +@comment %**start of header (This is for running Texinfo on a region.) +@setfilename rluser.info +@comment %**end of header (This is for running Texinfo on a region.) + +@ignore +This file documents the end user interface to the GNU command line +editing features. It is to be an appendix to manuals for programs which +use these features. There is a document entitled "readline.texinfo" +which contains both end-user and programmer documentation for the +GNU Readline Library. + +Copyright (C) 1988--2020 Free Software Foundation, Inc. + +Authored by Brian Fox and Chet Ramey. + +Permission is granted to process this file through Tex and print the +results, provided the printed document carries copying permission notice +identical to this one except for the removal of this paragraph (this +paragraph not being relevant to the printed manual). + +Permission is granted to make and distribute verbatim copies of this manual +provided the copyright notice and this permission notice are preserved on +all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +GNU Copyright statement is available to the distributee, and provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions. +@end ignore + +@comment If you are including this manual as an appendix, then set the +@comment variable readline-appendix. + +@ifclear BashFeatures +@defcodeindex bt +@end ifclear + +@node Command Line Editing +@chapter Command Line Editing + +This chapter describes the basic features of the @sc{gnu} +command line editing interface. +@ifset BashFeatures +Command line editing is provided by the Readline library, which is +used by several different programs, including Bash. +Command line editing is enabled by default when using an interactive shell, +unless the @option{--noediting} option is supplied at shell invocation. +Line editing is also used when using the @option{-e} option to the +@code{read} builtin command (@pxref{Bash Builtins}). +By default, the line editing commands are similar to those of Emacs. +A vi-style line editing interface is also available. +Line editing can be enabled at any time using the @option{-o emacs} or +@option{-o vi} options to the @code{set} builtin command +(@pxref{The Set Builtin}), or disabled using the @option{+o emacs} or +@option{+o vi} options to @code{set}. +@end ifset + +@menu +* Introduction and Notation:: Notation used in this text. +* Readline Interaction:: The minimum set of commands for editing a line. +* Readline Init File:: Customizing Readline from a user's view. +* Bindable Readline Commands:: A description of most of the Readline commands + available for binding +* Readline vi Mode:: A short description of how to make Readline + behave like the vi editor. +@ifset BashFeatures +* Programmable Completion:: How to specify the possible completions for + a specific command. +* Programmable Completion Builtins:: Builtin commands to specify how to + complete arguments for a particular command. +* A Programmable Completion Example:: An example shell function for + generating possible completions. +@end ifset +@end menu + +@node Introduction and Notation +@section Introduction to Line Editing + +The following paragraphs describe the notation used to represent +keystrokes. + +The text @kbd{C-k} is read as `Control-K' and describes the character +produced when the @key{k} key is pressed while the Control key +is depressed. + +The text @kbd{M-k} is read as `Meta-K' and describes the character +produced when the Meta key (if you have one) is depressed, and the @key{k} +key is pressed. +The Meta key is labeled @key{ALT} on many keyboards. +On keyboards with two keys labeled @key{ALT} (usually to either side of +the space bar), the @key{ALT} on the left side is generally set to +work as a Meta key. +The @key{ALT} key on the right may also be configured to work as a +Meta key or may be configured as some other modifier, such as a +Compose key for typing accented characters. + +If you do not have a Meta or @key{ALT} key, or another key working as +a Meta key, the identical keystroke can be generated by typing @key{ESC} +@emph{first}, and then typing @key{k}. +Either process is known as @dfn{metafying} the @key{k} key. + +The text @kbd{M-C-k} is read as `Meta-Control-k' and describes the +character produced by @dfn{metafying} @kbd{C-k}. + +In addition, several keys have their own names. Specifically, +@key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all +stand for themselves when seen in this text, or in an init file +(@pxref{Readline Init File}). +If your keyboard lacks a @key{LFD} key, typing @key{C-j} will +produce the desired character. +The @key{RET} key may be labeled @key{Return} or @key{Enter} on +some keyboards. + +@node Readline Interaction +@section Readline Interaction +@cindex interaction, readline + +Often during an interactive session you type in a long line of text, +only to notice that the first word on the line is misspelled. The +Readline library gives you a set of commands for manipulating the text +as you type it in, allowing you to just fix your typo, and not forcing +you to retype the majority of the line. Using these editing commands, +you move the cursor to the place that needs correction, and delete or +insert the text of the corrections. Then, when you are satisfied with +the line, you simply press @key{RET}. You do not have to be at the +end of the line to press @key{RET}; the entire line is accepted +regardless of the location of the cursor within the line. + +@menu +* Readline Bare Essentials:: The least you need to know about Readline. +* Readline Movement Commands:: Moving about the input line. +* Readline Killing Commands:: How to delete text, and how to get it back! +* Readline Arguments:: Giving numeric arguments to commands. +* Searching:: Searching through previous lines. +@end menu + +@node Readline Bare Essentials +@subsection Readline Bare Essentials +@cindex notation, readline +@cindex command editing +@cindex editing command lines + +In order to enter characters into the line, simply type them. The typed +character appears where the cursor was, and then the cursor moves one +space to the right. If you mistype a character, you can use your +erase character to back up and delete the mistyped character. + +Sometimes you may mistype a character, and +not notice the error until you have typed several other characters. In +that case, you can type @kbd{C-b} to move the cursor to the left, and then +correct your mistake. Afterwards, you can move the cursor to the right +with @kbd{C-f}. + +When you add text in the middle of a line, you will notice that characters +to the right of the cursor are `pushed over' to make room for the text +that you have inserted. Likewise, when you delete text behind the cursor, +characters to the right of the cursor are `pulled back' to fill in the +blank space created by the removal of the text. A list of the bare +essentials for editing the text of an input line follows. + +@table @asis +@item @kbd{C-b} +Move back one character. +@item @kbd{C-f} +Move forward one character. +@item @key{DEL} or @key{Backspace} +Delete the character to the left of the cursor. +@item @kbd{C-d} +Delete the character underneath the cursor. +@item @w{Printing characters} +Insert the character into the line at the cursor. +@item @kbd{C-_} or @kbd{C-x C-u} +Undo the last editing command. You can undo all the way back to an +empty line. +@end table + +@noindent +(Depending on your configuration, the @key{Backspace} key be set to +delete the character to the left of the cursor and the @key{DEL} key set +to delete the character underneath the cursor, like @kbd{C-d}, rather +than the character to the left of the cursor.) + +@node Readline Movement Commands +@subsection Readline Movement Commands + + +The above table describes the most basic keystrokes that you need +in order to do editing of the input line. For your convenience, many +other commands have been added in addition to @kbd{C-b}, @kbd{C-f}, +@kbd{C-d}, and @key{DEL}. Here are some commands for moving more rapidly +about the line. + +@table @kbd +@item C-a +Move to the start of the line. +@item C-e +Move to the end of the line. +@item M-f +Move forward a word, where a word is composed of letters and digits. +@item M-b +Move backward a word. +@item C-l +Clear the screen, reprinting the current line at the top. +@end table + +Notice how @kbd{C-f} moves forward a character, while @kbd{M-f} moves +forward a word. It is a loose convention that control keystrokes +operate on characters while meta keystrokes operate on words. + +@node Readline Killing Commands +@subsection Readline Killing Commands + +@cindex killing text +@cindex yanking text + +@dfn{Killing} text means to delete the text from the line, but to save +it away for later use, usually by @dfn{yanking} (re-inserting) +it back into the line. +(`Cut' and `paste' are more recent jargon for `kill' and `yank'.) + +If the description for a command says that it `kills' text, then you can +be sure that you can get the text back in a different (or the same) +place later. + +When you use a kill command, the text is saved in a @dfn{kill-ring}. +Any number of consecutive kills save all of the killed text together, so +that when you yank it back, you get it all. The kill +ring is not line specific; the text that you killed on a previously +typed line is available to be yanked back later, when you are typing +another line. +@cindex kill ring + +Here is the list of commands for killing text. + +@table @kbd +@item C-k +Kill the text from the current cursor position to the end of the line. + +@item M-d +Kill from the cursor to the end of the current word, or, if between +words, to the end of the next word. +Word boundaries are the same as those used by @kbd{M-f}. + +@item M-@key{DEL} +Kill from the cursor the start of the current word, or, if between +words, to the start of the previous word. +Word boundaries are the same as those used by @kbd{M-b}. + +@item C-w +Kill from the cursor to the previous whitespace. This is different than +@kbd{M-@key{DEL}} because the word boundaries differ. + +@end table + +Here is how to @dfn{yank} the text back into the line. Yanking +means to copy the most-recently-killed text from the kill buffer. + +@table @kbd +@item C-y +Yank the most recently killed text back into the buffer at the cursor. + +@item M-y +Rotate the kill-ring, and yank the new top. You can only do this if +the prior command is @kbd{C-y} or @kbd{M-y}. +@end table + +@node Readline Arguments +@subsection Readline Arguments + +You can pass numeric arguments to Readline commands. Sometimes the +argument acts as a repeat count, other times it is the @i{sign} of the +argument that is significant. If you pass a negative argument to a +command which normally acts in a forward direction, that command will +act in a backward direction. For example, to kill text back to the +start of the line, you might type @samp{M-- C-k}. + +The general way to pass numeric arguments to a command is to type meta +digits before the command. If the first `digit' typed is a minus +sign (@samp{-}), then the sign of the argument will be negative. Once +you have typed one meta digit to get the argument started, you can type +the remainder of the digits, and then the command. For example, to give +the @kbd{C-d} command an argument of 10, you could type @samp{M-1 0 C-d}, +which will delete the next ten characters on the input line. + +@node Searching +@subsection Searching for Commands in the History + +Readline provides commands for searching through the command history +@ifset BashFeatures +(@pxref{Bash History Facilities}) +@end ifset +for lines containing a specified string. +There are two search modes: @dfn{incremental} and @dfn{non-incremental}. + +Incremental searches begin before the user has finished typing the +search string. +As each character of the search string is typed, Readline displays +the next entry from the history matching the string typed so far. +An incremental search requires only as many characters as needed to +find the desired history entry. +To search backward in the history for a particular string, type +@kbd{C-r}. Typing @kbd{C-s} searches forward through the history. +The characters present in the value of the @code{isearch-terminators} variable +are used to terminate an incremental search. +If that variable has not been assigned a value, the @key{ESC} and +@kbd{C-J} characters will terminate an incremental search. +@kbd{C-g} will abort an incremental search and restore the original line. +When the search is terminated, the history entry containing the +search string becomes the current line. + +To find other matching entries in the history list, type @kbd{C-r} or +@kbd{C-s} as appropriate. +This will search backward or forward in the history for the next +entry matching the search string typed so far. +Any other key sequence bound to a Readline command will terminate +the search and execute that command. +For instance, a @key{RET} will terminate the search and accept +the line, thereby executing the command from the history list. +A movement command will terminate the search, make the last line found +the current line, and begin editing. + +Readline remembers the last incremental search string. If two +@kbd{C-r}s are typed without any intervening characters defining a new +search string, any remembered search string is used. + +Non-incremental searches read the entire search string before starting +to search for matching history lines. The search string may be +typed by the user or be part of the contents of the current line. + +@node Readline Init File +@section Readline Init File +@cindex initialization file, readline + +Although the Readline library comes with a set of Emacs-like +keybindings installed by default, it is possible to use a different set +of keybindings. +Any user can customize programs that use Readline by putting +commands in an @dfn{inputrc} file, conventionally in his home directory. +The name of this +@ifset BashFeatures +file is taken from the value of the shell variable @env{INPUTRC}. If +@end ifset +@ifclear BashFeatures +file is taken from the value of the environment variable @env{INPUTRC}. If +@end ifclear +that variable is unset, the default is @file{~/.inputrc}. If that +file does not exist or cannot be read, the ultimate default is +@file{/etc/inputrc}. +@ifset BashFeatures +The @w{@code{bind}} builtin command can also be used to set Readline +keybindings and variables. +@xref{Bash Builtins}. +@end ifset + +When a program which uses the Readline library starts up, the +init file is read, and the key bindings are set. + +In addition, the @code{C-x C-r} command re-reads this init file, thus +incorporating any changes that you might have made to it. + +@menu +* Readline Init File Syntax:: Syntax for the commands in the inputrc file. + +* Conditional Init Constructs:: Conditional key bindings in the inputrc file. + +* Sample Init File:: An example inputrc file. +@end menu + +@node Readline Init File Syntax +@subsection Readline Init File Syntax + +There are only a few basic constructs allowed in the +Readline init file. Blank lines are ignored. +Lines beginning with a @samp{#} are comments. +Lines beginning with a @samp{$} indicate conditional +constructs (@pxref{Conditional Init Constructs}). Other lines +denote variable settings and key bindings. + +@table @asis +@item Variable Settings +You can modify the run-time behavior of Readline by +altering the values of variables in Readline +using the @code{set} command within the init file. +The syntax is simple: + +@example +set @var{variable} @var{value} +@end example + +@noindent +Here, for example, is how to +change from the default Emacs-like key binding to use +@code{vi} line editing commands: + +@example +set editing-mode vi +@end example + +Variable names and values, where appropriate, are recognized without regard +to case. Unrecognized variable names are ignored. + +Boolean variables (those that can be set to on or off) are set to on if +the value is null or empty, @var{on} (case-insensitive), or 1. Any other +value results in the variable being set to off. + +@ifset BashFeatures +The @w{@code{bind -V}} command lists the current Readline variable names +and values. @xref{Bash Builtins}. +@end ifset + +A great deal of run-time behavior is changeable with the following +variables. + +@cindex variables, readline +@table @code + +@item bell-style +@vindex bell-style +Controls what happens when Readline wants to ring the terminal bell. +If set to @samp{none}, Readline never rings the bell. If set to +@samp{visible}, Readline uses a visible bell if one is available. +If set to @samp{audible} (the default), Readline attempts to ring +the terminal's bell. + +@item bind-tty-special-chars +@vindex bind-tty-special-chars +If set to @samp{on} (the default), Readline attempts to bind the control +characters treated specially by the kernel's terminal driver to their +Readline equivalents. + +@item blink-matching-paren +@vindex blink-matching-paren +If set to @samp{on}, Readline attempts to briefly move the cursor to an +opening parenthesis when a closing parenthesis is inserted. The default +is @samp{off}. + +@item colored-completion-prefix +@vindex colored-completion-prefix +If set to @samp{on}, when listing completions, Readline displays the +common prefix of the set of possible completions using a different color. +The color definitions are taken from the value of the @env{LS_COLORS} +environment variable. +The default is @samp{off}. + +@item colored-stats +@vindex colored-stats +If set to @samp{on}, Readline displays possible completions using different +colors to indicate their file type. +The color definitions are taken from the value of the @env{LS_COLORS} +environment variable. +The default is @samp{off}. + +@item comment-begin +@vindex comment-begin +The string to insert at the beginning of the line when the +@code{insert-comment} command is executed. The default value +is @code{"#"}. + +@item completion-display-width +@vindex completion-display-width +The number of screen columns used to display possible matches +when performing completion. +The value is ignored if it is less than 0 or greater than the terminal +screen width. +A value of 0 will cause matches to be displayed one per line. +The default value is -1. + +@item completion-ignore-case +@vindex completion-ignore-case +If set to @samp{on}, Readline performs filename matching and completion +in a case-insensitive fashion. +The default value is @samp{off}. + +@item completion-map-case +@vindex completion-map-case +If set to @samp{on}, and @var{completion-ignore-case} is enabled, Readline +treats hyphens (@samp{-}) and underscores (@samp{_}) as equivalent when +performing case-insensitive filename matching and completion. +The default value is @samp{off}. + +@item completion-prefix-display-length +@vindex completion-prefix-display-length +The length in characters of the common prefix of a list of possible +completions that is displayed without modification. When set to a +value greater than zero, common prefixes longer than this value are +replaced with an ellipsis when displaying possible completions. + +@item completion-query-items +@vindex completion-query-items +The number of possible completions that determines when the user is +asked whether the list of possibilities should be displayed. +If the number of possible completions is greater than or equal to this value, +Readline will ask whether or not the user wishes to view them; +otherwise, they are simply listed. +This variable must be set to an integer value greater than or equal to 0. +A negative value means Readline should never ask. +The default limit is @code{100}. + +@item convert-meta +@vindex convert-meta +If set to @samp{on}, Readline will convert characters with the +eighth bit set to an @sc{ascii} key sequence by stripping the eighth +bit and prefixing an @key{ESC} character, converting them to a +meta-prefixed key sequence. The default value is @samp{on}, but +will be set to @samp{off} if the locale is one that contains +eight-bit characters. + +@item disable-completion +@vindex disable-completion +If set to @samp{On}, Readline will inhibit word completion. +Completion characters will be inserted into the line as if they had +been mapped to @code{self-insert}. The default is @samp{off}. + +@item echo-control-characters +@vindex echo-control-characters +When set to @samp{on}, on operating systems that indicate they support it, +readline echoes a character corresponding to a signal generated from the +keyboard. The default is @samp{on}. + +@item editing-mode +@vindex editing-mode +The @code{editing-mode} variable controls which default set of +key bindings is used. By default, Readline starts up in Emacs editing +mode, where the keystrokes are most similar to Emacs. This variable can be +set to either @samp{emacs} or @samp{vi}. + +@item emacs-mode-string +@vindex emacs-mode-string +If the @var{show-mode-in-prompt} variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when emacs editing mode is active. The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the @samp{\1} and @samp{\2} escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is @samp{@@}. + +@item enable-bracketed-paste +@vindex enable-bracketed-paste +When set to @samp{On}, Readline will configure the terminal in a way +that will enable it to insert each paste into the editing buffer as a +single string of characters, instead of treating each character as if +it had been read from the keyboard. This can prevent pasted characters +from being interpreted as editing commands. The default is @samp{On}. + +@item enable-keypad +@vindex enable-keypad +When set to @samp{on}, Readline will try to enable the application +keypad when it is called. Some systems need this to enable the +arrow keys. The default is @samp{off}. + +@item enable-meta-key +When set to @samp{on}, Readline will try to enable any meta modifier +key the terminal claims to support when it is called. On many terminals, +the meta key is used to send eight-bit characters. +The default is @samp{on}. + +@item expand-tilde +@vindex expand-tilde +If set to @samp{on}, tilde expansion is performed when Readline +attempts word completion. The default is @samp{off}. + +@item history-preserve-point +@vindex history-preserve-point +If set to @samp{on}, the history code attempts to place the point (the +current cursor position) at the +same location on each history line retrieved with @code{previous-history} +or @code{next-history}. The default is @samp{off}. + +@item history-size +@vindex history-size +Set the maximum number of history entries saved in the history list. +If set to zero, any existing history entries are deleted and no new entries +are saved. +If set to a value less than zero, the number of history entries is not +limited. +By default, the number of history entries is not limited. +If an attempt is made to set @var{history-size} to a non-numeric value, +the maximum number of history entries will be set to 500. + +@item horizontal-scroll-mode +@vindex horizontal-scroll-mode +This variable can be set to either @samp{on} or @samp{off}. Setting it +to @samp{on} means that the text of the lines being edited will scroll +horizontally on a single screen line when they are longer than the width +of the screen, instead of wrapping onto a new screen line. +This variable is automatically set to @samp{on} for terminals of height 1. +By default, this variable is set to @samp{off}. + +@item input-meta +@vindex input-meta +@vindex meta-flag +If set to @samp{on}, Readline will enable eight-bit input (it +will not clear the eighth bit in the characters it reads), +regardless of what the terminal claims it can support. The +default value is @samp{off}, but Readline will set it to @samp{on} if the +locale contains eight-bit characters. +The name @code{meta-flag} is a synonym for this variable. + +@item isearch-terminators +@vindex isearch-terminators +The string of characters that should terminate an incremental search without +subsequently executing the character as a command (@pxref{Searching}). +If this variable has not been given a value, the characters @key{ESC} and +@kbd{C-J} will terminate an incremental search. + +@item keymap +@vindex keymap +Sets Readline's idea of the current keymap for key binding commands. +Built-in @code{keymap} names are +@code{emacs}, +@code{emacs-standard}, +@code{emacs-meta}, +@code{emacs-ctlx}, +@code{vi}, +@code{vi-move}, +@code{vi-command}, and +@code{vi-insert}. +@code{vi} is equivalent to @code{vi-command} (@code{vi-move} is also a +synonym); @code{emacs} is equivalent to @code{emacs-standard}. +Applications may add additional names. +The default value is @code{emacs}. +The value of the @code{editing-mode} variable also affects the +default keymap. + +@item keyseq-timeout +Specifies the duration Readline will wait for a character when reading an +ambiguous key sequence (one that can form a complete key sequence using +the input read so far, or can take additional input to complete a longer +key sequence). +If no input is received within the timeout, Readline will use the shorter +but complete key sequence. +Readline uses this value to determine whether or not input is +available on the current input source (@code{rl_instream} by default). +The value is specified in milliseconds, so a value of 1000 means that +Readline will wait one second for additional input. +If this variable is set to a value less than or equal to zero, or to a +non-numeric value, Readline will wait until another key is pressed to +decide which key sequence to complete. +The default value is @code{500}. + +@item mark-directories +If set to @samp{on}, completed directory names have a slash +appended. The default is @samp{on}. + +@item mark-modified-lines +@vindex mark-modified-lines +This variable, when set to @samp{on}, causes Readline to display an +asterisk (@samp{*}) at the start of history lines which have been modified. +This variable is @samp{off} by default. + +@item mark-symlinked-directories +@vindex mark-symlinked-directories +If set to @samp{on}, completed names which are symbolic links +to directories have a slash appended (subject to the value of +@code{mark-directories}). +The default is @samp{off}. + +@item match-hidden-files +@vindex match-hidden-files +This variable, when set to @samp{on}, causes Readline to match files whose +names begin with a @samp{.} (hidden files) when performing filename +completion. +If set to @samp{off}, the leading @samp{.} must be +supplied by the user in the filename to be completed. +This variable is @samp{on} by default. + +@item menu-complete-display-prefix +@vindex menu-complete-display-prefix +If set to @samp{on}, menu completion displays the common prefix of the +list of possible completions (which may be empty) before cycling through +the list. The default is @samp{off}. + +@item output-meta +@vindex output-meta +If set to @samp{on}, Readline will display characters with the +eighth bit set directly rather than as a meta-prefixed escape +sequence. +The default is @samp{off}, but Readline will set it to @samp{on} if the +locale contains eight-bit characters. + +@item page-completions +@vindex page-completions +If set to @samp{on}, Readline uses an internal @code{more}-like pager +to display a screenful of possible completions at a time. +This variable is @samp{on} by default. + +@item print-completions-horizontally +If set to @samp{on}, Readline will display completions with matches +sorted horizontally in alphabetical order, rather than down the screen. +The default is @samp{off}. + +@item revert-all-at-newline +@vindex revert-all-at-newline +If set to @samp{on}, Readline will undo all changes to history lines +before returning when @code{accept-line} is executed. By default, +history lines may be modified and retain individual undo lists across +calls to @code{readline}. The default is @samp{off}. + +@item show-all-if-ambiguous +@vindex show-all-if-ambiguous +This alters the default behavior of the completion functions. If +set to @samp{on}, +words which have more than one possible completion cause the +matches to be listed immediately instead of ringing the bell. +The default value is @samp{off}. + +@item show-all-if-unmodified +@vindex show-all-if-unmodified +This alters the default behavior of the completion functions in +a fashion similar to @var{show-all-if-ambiguous}. +If set to @samp{on}, +words which have more than one possible completion without any +possible partial completion (the possible completions don't share +a common prefix) cause the matches to be listed immediately instead +of ringing the bell. +The default value is @samp{off}. + +@item show-mode-in-prompt +@vindex show-mode-in-prompt +If set to @samp{on}, add a string to the beginning of the prompt +indicating the editing mode: emacs, vi command, or vi insertion. +The mode strings are user-settable (e.g., @var{emacs-mode-string}). +The default value is @samp{off}. + +@item skip-completed-text +@vindex skip-completed-text +If set to @samp{on}, this alters the default completion behavior when +inserting a single match into the line. It's only active when +performing completion in the middle of a word. If enabled, readline +does not insert characters from the completion that match characters +after point in the word being completed, so portions of the word +following the cursor are not duplicated. +For instance, if this is enabled, attempting completion when the cursor +is after the @samp{e} in @samp{Makefile} will result in @samp{Makefile} +rather than @samp{Makefilefile}, assuming there is a single possible +completion. +The default value is @samp{off}. + +@item vi-cmd-mode-string +@vindex vi-cmd-mode-string +If the @var{show-mode-in-prompt} variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in command mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the @samp{\1} and @samp{\2} escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is @samp{(cmd)}. + +@item vi-ins-mode-string +@vindex vi-ins-mode-string +If the @var{show-mode-in-prompt} variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in insertion mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the @samp{\1} and @samp{\2} escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is @samp{(ins)}. + +@item visible-stats +@vindex visible-stats +If set to @samp{on}, a character denoting a file's type +is appended to the filename when listing possible +completions. The default is @samp{off}. + +@end table + +@item Key Bindings +The syntax for controlling key bindings in the init file is +simple. First you need to find the name of the command that you +want to change. The following sections contain tables of the command +name, the default keybinding, if any, and a short description of what +the command does. + +Once you know the name of the command, simply place on a line +in the init file the name of the key +you wish to bind the command to, a colon, and then the name of the +command. +There can be no space between the key name and the colon -- that will be +interpreted as part of the key name. +The name of the key can be expressed in different ways, depending on +what you find most comfortable. + +In addition to command names, readline allows keys to be bound +to a string that is inserted when the key is pressed (a @var{macro}). + +@ifset BashFeatures +The @w{@code{bind -p}} command displays Readline function names and +bindings in a format that can put directly into an initialization file. +@xref{Bash Builtins}. +@end ifset + +@table @asis +@item @w{@var{keyname}: @var{function-name} or @var{macro}} +@var{keyname} is the name of a key spelled out in English. For example: +@example +Control-u: universal-argument +Meta-Rubout: backward-kill-word +Control-o: "> output" +@end example + +In the example above, @kbd{C-u} is bound to the function +@code{universal-argument}, +@kbd{M-DEL} is bound to the function @code{backward-kill-word}, and +@kbd{C-o} is bound to run the macro +expressed on the right hand side (that is, to insert the text +@samp{> output} into the line). + +A number of symbolic character names are recognized while +processing this key binding syntax: +@var{DEL}, +@var{ESC}, +@var{ESCAPE}, +@var{LFD}, +@var{NEWLINE}, +@var{RET}, +@var{RETURN}, +@var{RUBOUT}, +@var{SPACE}, +@var{SPC}, +and +@var{TAB}. + +@item @w{"@var{keyseq}": @var{function-name} or @var{macro}} +@var{keyseq} differs from @var{keyname} above in that strings +denoting an entire key sequence can be specified, by placing +the key sequence in double quotes. Some @sc{gnu} Emacs style key +escapes can be used, as in the following example, but the +special character names are not recognized. + +@example +"\C-u": universal-argument +"\C-x\C-r": re-read-init-file +"\e[11~": "Function Key 1" +@end example + +In the above example, @kbd{C-u} is again bound to the function +@code{universal-argument} (just as it was in the first example), +@samp{@kbd{C-x} @kbd{C-r}} is bound to the function @code{re-read-init-file}, +and @samp{@key{ESC} @key{[} @key{1} @key{1} @key{~}} is bound to insert +the text @samp{Function Key 1}. + +@end table + +The following @sc{gnu} Emacs style escape sequences are available when +specifying key sequences: + +@table @code +@item @kbd{\C-} +control prefix +@item @kbd{\M-} +meta prefix +@item @kbd{\e} +an escape character +@item @kbd{\\} +backslash +@item @kbd{\"} +@key{"}, a double quotation mark +@item @kbd{\'} +@key{'}, a single quote or apostrophe +@end table + +In addition to the @sc{gnu} Emacs style escape sequences, a second +set of backslash escapes is available: + +@table @code +@item \a +alert (bell) +@item \b +backspace +@item \d +delete +@item \f +form feed +@item \n +newline +@item \r +carriage return +@item \t +horizontal tab +@item \v +vertical tab +@item \@var{nnn} +the eight-bit character whose value is the octal value @var{nnn} +(one to three digits) +@item \x@var{HH} +the eight-bit character whose value is the hexadecimal value @var{HH} +(one or two hex digits) +@end table + +When entering the text of a macro, single or double quotes must +be used to indicate a macro definition. +Unquoted text is assumed to be a function name. +In the macro body, the backslash escapes described above are expanded. +Backslash will quote any other character in the macro text, +including @samp{"} and @samp{'}. +For example, the following binding will make @samp{@kbd{C-x} \} +insert a single @samp{\} into the line: +@example +"\C-x\\": "\\" +@end example + +@end table + +@node Conditional Init Constructs +@subsection Conditional Init Constructs + +Readline implements a facility similar in spirit to the conditional +compilation features of the C preprocessor which allows key +bindings and variable settings to be performed as the result +of tests. There are four parser directives used. + +@table @code +@item $if +The @code{$if} construct allows bindings to be made based on the +editing mode, the terminal being used, or the application using +Readline. The text of the test, after any comparison operator, +extends to the end of the line; +unless otherwise noted, no characters are required to isolate it. + +@table @code +@item mode +The @code{mode=} form of the @code{$if} directive is used to test +whether Readline is in @code{emacs} or @code{vi} mode. +This may be used in conjunction +with the @samp{set keymap} command, for instance, to set bindings in +the @code{emacs-standard} and @code{emacs-ctlx} keymaps only if +Readline is starting out in @code{emacs} mode. + +@item term +The @code{term=} form may be used to include terminal-specific +key bindings, perhaps to bind the key sequences output by the +terminal's function keys. The word on the right side of the +@samp{=} is tested against both the full name of the terminal and +the portion of the terminal name before the first @samp{-}. This +allows @code{sun} to match both @code{sun} and @code{sun-cmd}, +for instance. + +@item version +The @code{version} test may be used to perform comparisons against +specific Readline versions. +The @code{version} expands to the current Readline version. +The set of comparison operators includes +@samp{=} (and @samp{==}), @samp{!=}, @samp{<=}, @samp{>=}, @samp{<}, +and @samp{>}. +The version number supplied on the right side of the operator consists +of a major version number, an optional decimal point, and an optional +minor version (e.g., @samp{7.1}). If the minor version is omitted, it +is assumed to be @samp{0}. +The operator may be separated from the string @code{version} and +from the version number argument by whitespace. +The following example sets a variable if the Readline version being used +is 7.0 or newer: +@example +$if version >= 7.0 +set show-mode-in-prompt on +$endif +@end example + +@item application +The @var{application} construct is used to include +application-specific settings. Each program using the Readline +library sets the @var{application name}, and you can test for +a particular value. +This could be used to bind key sequences to functions useful for +a specific program. For instance, the following command adds a +key sequence that quotes the current or previous word in Bash: +@example +$if Bash +# Quote the current or previous word +"\C-xq": "\eb\"\ef\"" +$endif +@end example + +@item variable +The @var{variable} construct provides simple equality tests for Readline +variables and values. +The permitted comparison operators are @samp{=}, @samp{==}, and @samp{!=}. +The variable name must be separated from the comparison operator by +whitespace; the operator may be separated from the value on the right hand +side by whitespace. +Both string and boolean variables may be tested. Boolean variables must be +tested against the values @var{on} and @var{off}. +The following example is equivalent to the @code{mode=emacs} test described +above: +@example +$if editing-mode == emacs +set show-mode-in-prompt on +$endif +@end example +@end table + +@item $endif +This command, as seen in the previous example, terminates an +@code{$if} command. + +@item $else +Commands in this branch of the @code{$if} directive are executed if +the test fails. + +@item $include +This directive takes a single filename as an argument and reads commands +and bindings from that file. +For example, the following directive reads from @file{/etc/inputrc}: +@example +$include /etc/inputrc +@end example +@end table + +@node Sample Init File +@subsection Sample Init File + +Here is an example of an @var{inputrc} file. This illustrates key +binding, variable assignment, and conditional syntax. + +@example +@page +# This file controls the behaviour of line input editing for +# programs that use the GNU Readline library. Existing +# programs include FTP, Bash, and GDB. +# +# You can re-read the inputrc file with C-x C-r. +# Lines beginning with '#' are comments. +# +# First, include any system-wide bindings and variable +# assignments from /etc/Inputrc +$include /etc/Inputrc + +# +# Set various bindings for emacs mode. + +set editing-mode emacs + +$if mode=emacs + +Meta-Control-h: backward-kill-word Text after the function name is ignored + +# +# Arrow keys in keypad mode +# +#"\M-OD": backward-char +#"\M-OC": forward-char +#"\M-OA": previous-history +#"\M-OB": next-history +# +# Arrow keys in ANSI mode +# +"\M-[D": backward-char +"\M-[C": forward-char +"\M-[A": previous-history +"\M-[B": next-history +# +# Arrow keys in 8 bit keypad mode +# +#"\M-\C-OD": backward-char +#"\M-\C-OC": forward-char +#"\M-\C-OA": previous-history +#"\M-\C-OB": next-history +# +# Arrow keys in 8 bit ANSI mode +# +#"\M-\C-[D": backward-char +#"\M-\C-[C": forward-char +#"\M-\C-[A": previous-history +#"\M-\C-[B": next-history + +C-q: quoted-insert + +$endif + +# An old-style binding. This happens to be the default. +TAB: complete + +# Macros that are convenient for shell interaction +$if Bash +# edit the path +"\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f" +# prepare to type a quoted word -- +# insert open and close double quotes +# and move to just after the open quote +"\C-x\"": "\"\"\C-b" +# insert a backslash (testing backslash escapes +# in sequences and macros) +"\C-x\\": "\\" +# Quote the current or previous word +"\C-xq": "\eb\"\ef\"" +# Add a binding to refresh the line, which is unbound +"\C-xr": redraw-current-line +# Edit variable on current line. +"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" +$endif + +# use a visible bell if one is available +set bell-style visible + +# don't strip characters to 7 bits when reading +set input-meta on + +# allow iso-latin1 characters to be inserted rather +# than converted to prefix-meta sequences +set convert-meta off + +# display characters with the eighth bit set directly +# rather than as meta-prefixed characters +set output-meta on + +# if there are 150 or more possible completions for a word, +# ask whether or not the user wants to see all of them +set completion-query-items 150 + +# For FTP +$if Ftp +"\C-xg": "get \M-?" +"\C-xt": "put \M-?" +"\M-.": yank-last-arg +$endif +@end example + +@node Bindable Readline Commands +@section Bindable Readline Commands + +@menu +* Commands For Moving:: Moving about the line. +* Commands For History:: Getting at previous lines. +* Commands For Text:: Commands for changing text. +* Commands For Killing:: Commands for killing and yanking. +* Numeric Arguments:: Specifying numeric arguments, repeat counts. +* Commands For Completion:: Getting Readline to do the typing for you. +* Keyboard Macros:: Saving and re-executing typed characters +* Miscellaneous Commands:: Other miscellaneous commands. +@end menu + +This section describes Readline commands that may be bound to key +sequences. +@ifset BashFeatures +You can list your key bindings by executing +@w{@code{bind -P}} or, for a more terse format, suitable for an +@var{inputrc} file, @w{@code{bind -p}}. (@xref{Bash Builtins}.) +@end ifset +Command names without an accompanying key sequence are unbound by default. + +In the following descriptions, @dfn{point} refers to the current cursor +position, and @dfn{mark} refers to a cursor position saved by the +@code{set-mark} command. +The text between the point and mark is referred to as the @dfn{region}. + +@node Commands For Moving +@subsection Commands For Moving +@ftable @code +@item beginning-of-line (C-a) +Move to the start of the current line. + +@item end-of-line (C-e) +Move to the end of the line. + +@item forward-char (C-f) +Move forward a character. + +@item backward-char (C-b) +Move back a character. + +@item forward-word (M-f) +Move forward to the end of the next word. +Words are composed of letters and digits. + +@item backward-word (M-b) +Move back to the start of the current or previous word. +Words are composed of letters and digits. + +@ifset BashFeatures +@item shell-forward-word (M-C-f) +Move forward to the end of the next word. +Words are delimited by non-quoted shell metacharacters. + +@item shell-backward-word (M-C-b) +Move back to the start of the current or previous word. +Words are delimited by non-quoted shell metacharacters. +@end ifset + +@item previous-screen-line () +Attempt to move point to the same physical screen column on the previous +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if point is not +greater than the length of the prompt plus the screen width. + +@item next-screen-line () +Attempt to move point to the same physical screen column on the next +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if the length +of the current Readline line is not greater than the length of the prompt +plus the screen width. + +@item clear-display (M-C-l) +Clear the screen and, if possible, the terminal's scrollback buffer, +then redraw the current line, +leaving the current line at the top of the screen. + +@item clear-screen (C-l) +Clear the screen, +then redraw the current line, +leaving the current line at the top of the screen. + +@item redraw-current-line () +Refresh the current line. By default, this is unbound. + +@end ftable + +@node Commands For History +@subsection Commands For Manipulating The History + +@ftable @code +@item accept-line (Newline or Return) +@ifset BashFeatures +Accept the line regardless of where the cursor is. +If this line is +non-empty, add it to the history list according to the setting of +the @env{HISTCONTROL} and @env{HISTIGNORE} variables. +If this line is a modified history line, then restore the history line +to its original state. +@end ifset +@ifclear BashFeatures +Accept the line regardless of where the cursor is. +If this line is +non-empty, it may be added to the history list for future recall with +@code{add_history()}. +If this line is a modified history line, the history line is restored +to its original state. +@end ifclear + +@item previous-history (C-p) +Move `back' through the history list, fetching the previous command. + +@item next-history (C-n) +Move `forward' through the history list, fetching the next command. + +@item beginning-of-history (M-<) +Move to the first line in the history. + +@item end-of-history (M->) +Move to the end of the input history, i.e., the line currently +being entered. + +@item reverse-search-history (C-r) +Search backward starting at the current line and moving `up' through +the history as necessary. This is an incremental search. +This command sets the region to the matched text and activates the mark. + +@item forward-search-history (C-s) +Search forward starting at the current line and moving `down' through +the history as necessary. This is an incremental search. +This command sets the region to the matched text and activates the mark. + +@item non-incremental-reverse-search-history (M-p) +Search backward starting at the current line and moving `up' +through the history as necessary using a non-incremental search +for a string supplied by the user. +The search string may match anywhere in a history line. + +@item non-incremental-forward-search-history (M-n) +Search forward starting at the current line and moving `down' +through the history as necessary using a non-incremental search +for a string supplied by the user. +The search string may match anywhere in a history line. + +@item history-search-forward () +Search forward through the history for the string of characters +between the start of the current line and the point. +The search string must match at the beginning of a history line. +This is a non-incremental search. +By default, this command is unbound. + +@item history-search-backward () +Search backward through the history for the string of characters +between the start of the current line and the point. +The search string must match at the beginning of a history line. +This is a non-incremental search. +By default, this command is unbound. + +@item history-substring-search-forward () +Search forward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search. +By default, this command is unbound. + +@item history-substring-search-backward () +Search backward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search. +By default, this command is unbound. + +@item yank-nth-arg (M-C-y) +Insert the first argument to the previous command (usually +the second word on the previous line) at point. +With an argument @var{n}, +insert the @var{n}th word from the previous command (the words +in the previous command begin with word 0). A negative argument +inserts the @var{n}th word from the end of the previous command. +Once the argument @var{n} is computed, the argument is extracted +as if the @samp{!@var{n}} history expansion had been specified. + +@item yank-last-arg (M-. or M-_) +Insert last argument to the previous command (the last word of the +previous history entry). +With a numeric argument, behave exactly like @code{yank-nth-arg}. +Successive calls to @code{yank-last-arg} move back through the history +list, inserting the last word (or the word specified by the argument to +the first call) of each line in turn. +Any numeric argument supplied to these successive calls determines +the direction to move through the history. A negative argument switches +the direction through the history (back or forward). +The history expansion facilities are used to extract the last argument, +as if the @samp{!$} history expansion had been specified. + +@item operate-and-get-next (C-o) +Accept the current line for return to the calling application as if a +newline had been entered, +and fetch the next line relative to the current line from the history +for editing. +A numeric argument, if supplied, specifies the history entry to use instead +of the current line. + +@end ftable + +@node Commands For Text +@subsection Commands For Changing Text + +@ftable @code + +@item @i{end-of-file} (usually C-d) +The character indicating end-of-file as set, for example, by +@code{stty}. If this character is read when there are no characters +on the line, and point is at the beginning of the line, Readline +interprets it as the end of input and returns @sc{eof}. + +@item delete-char (C-d) +Delete the character at point. If this function is bound to the +same character as the tty @sc{eof} character, as @kbd{C-d} +commonly is, see above for the effects. + +@item backward-delete-char (Rubout) +Delete the character behind the cursor. A numeric argument means +to kill the characters instead of deleting them. + +@item forward-backward-delete-char () +Delete the character under the cursor, unless the cursor is at the +end of the line, in which case the character behind the cursor is +deleted. By default, this is not bound to a key. + +@item quoted-insert (C-q or C-v) +Add the next character typed to the line verbatim. This is +how to insert key sequences like @kbd{C-q}, for example. + +@ifclear BashFeatures +@item tab-insert (M-@key{TAB}) +Insert a tab character. +@end ifclear + +@item self-insert (a, b, A, 1, !, @dots{}) +Insert yourself. + +@item bracketed-paste-begin () +This function is intended to be bound to the "bracketed paste" escape +sequence sent by some terminals, and such a binding is assigned by default. +It allows Readline to insert the pasted text as a single unit without treating +each character as if it had been read from the keyboard. The characters +are inserted as if each one was bound to @code{self-insert} instead of +executing any editing commands. + +Bracketed paste sets the region (the characters between point and the mark) +to the inserted text. It uses the concept of an @emph{active mark}: when the +mark is active, Readline redisplay uses the terminal's standout mode to +denote the region. + +@item transpose-chars (C-t) +Drag the character before the cursor forward over +the character at the cursor, moving the +cursor forward as well. If the insertion point +is at the end of the line, then this +transposes the last two characters of the line. +Negative arguments have no effect. + +@item transpose-words (M-t) +Drag the word before point past the word after point, +moving point past that word as well. +If the insertion point is at the end of the line, this transposes +the last two words on the line. + +@item upcase-word (M-u) +Uppercase the current (or following) word. With a negative argument, +uppercase the previous word, but do not move the cursor. + +@item downcase-word (M-l) +Lowercase the current (or following) word. With a negative argument, +lowercase the previous word, but do not move the cursor. + +@item capitalize-word (M-c) +Capitalize the current (or following) word. With a negative argument, +capitalize the previous word, but do not move the cursor. + +@item overwrite-mode () +Toggle overwrite mode. With an explicit positive numeric argument, +switches to overwrite mode. With an explicit non-positive numeric +argument, switches to insert mode. This command affects only +@code{emacs} mode; @code{vi} mode does overwrite differently. +Each call to @code{readline()} starts in insert mode. + +In overwrite mode, characters bound to @code{self-insert} replace +the text at point rather than pushing the text to the right. +Characters bound to @code{backward-delete-char} replace the character +before point with a space. + +By default, this command is unbound. + +@end ftable + +@node Commands For Killing +@subsection Killing And Yanking + +@ftable @code + +@item kill-line (C-k) +Kill the text from point to the end of the line. +With a negative numeric argument, kill backward from the cursor to the +beginning of the current line. + +@item backward-kill-line (C-x Rubout) +Kill backward from the cursor to the beginning of the current line. +With a negative numeric argument, kill forward from the cursor to the +end of the current line. + +@item unix-line-discard (C-u) +Kill backward from the cursor to the beginning of the current line. + +@item kill-whole-line () +Kill all characters on the current line, no matter where point is. +By default, this is unbound. + +@item kill-word (M-d) +Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as @code{forward-word}. + +@item backward-kill-word (M-@key{DEL}) +Kill the word behind point. +Word boundaries are the same as @code{backward-word}. + +@ifset BashFeatures +@item shell-kill-word (M-C-d) +Kill from point to the end of the current word, or if between +words, to the end of the next word. +Word boundaries are the same as @code{shell-forward-word}. + +@item shell-backward-kill-word () +Kill the word behind point. +Word boundaries are the same as @code{shell-backward-word}. +@end ifset + +@item shell-transpose-words (M-C-t) +Drag the word before point past the word after point, +moving point past that word as well. +If the insertion point is at the end of the line, this transposes +the last two words on the line. +Word boundaries are the same as @code{shell-forward-word} and +@code{shell-backward-word}. + +@item unix-word-rubout (C-w) +Kill the word behind point, using white space as a word boundary. +The killed text is saved on the kill-ring. + +@item unix-filename-rubout () +Kill the word behind point, using white space and the slash character +as the word boundaries. +The killed text is saved on the kill-ring. + +@item delete-horizontal-space () +Delete all spaces and tabs around point. By default, this is unbound. + +@item kill-region () +Kill the text in the current region. +By default, this command is unbound. + +@item copy-region-as-kill () +Copy the text in the region to the kill buffer, so it can be yanked +right away. By default, this command is unbound. + +@item copy-backward-word () +Copy the word before point to the kill buffer. +The word boundaries are the same as @code{backward-word}. +By default, this command is unbound. + +@item copy-forward-word () +Copy the word following point to the kill buffer. +The word boundaries are the same as @code{forward-word}. +By default, this command is unbound. + +@item yank (C-y) +Yank the top of the kill ring into the buffer at point. + +@item yank-pop (M-y) +Rotate the kill-ring, and yank the new top. You can only do this if +the prior command is @code{yank} or @code{yank-pop}. +@end ftable + +@node Numeric Arguments +@subsection Specifying Numeric Arguments +@ftable @code + +@item digit-argument (@kbd{M-0}, @kbd{M-1}, @dots{} @kbd{M--}) +Add this digit to the argument already accumulating, or start a new +argument. @kbd{M--} starts a negative argument. + +@item universal-argument () +This is another way to specify an argument. +If this command is followed by one or more digits, optionally with a +leading minus sign, those digits define the argument. +If the command is followed by digits, executing @code{universal-argument} +again ends the numeric argument, but is otherwise ignored. +As a special case, if this command is immediately followed by a +character that is neither a digit nor minus sign, the argument count +for the next command is multiplied by four. +The argument count is initially one, so executing this function the +first time makes the argument count four, a second time makes the +argument count sixteen, and so on. +By default, this is not bound to a key. +@end ftable + +@node Commands For Completion +@subsection Letting Readline Type For You + +@ftable @code +@item complete (@key{TAB}) +Attempt to perform completion on the text before point. +The actual completion performed is application-specific. +@ifset BashFeatures +Bash attempts completion treating the text as a variable (if the +text begins with @samp{$}), username (if the text begins with +@samp{~}), hostname (if the text begins with @samp{@@}), or +command (including aliases and functions) in turn. If none +of these produces a match, filename completion is attempted. +@end ifset +@ifclear BashFeatures +The default is filename completion. +@end ifclear + +@item possible-completions (M-?) +List the possible completions of the text before point. +When displaying completions, Readline sets the number of columns used +for display to the value of @code{completion-display-width}, the value of +the environment variable @env{COLUMNS}, or the screen width, in that order. + +@item insert-completions (M-*) +Insert all completions of the text before point that would have +been generated by @code{possible-completions}. + +@item menu-complete () +Similar to @code{complete}, but replaces the word to be completed +with a single match from the list of possible completions. +Repeated execution of @code{menu-complete} steps through the list +of possible completions, inserting each match in turn. +At the end of the list of completions, the bell is rung +(subject to the setting of @code{bell-style}) +and the original text is restored. +An argument of @var{n} moves @var{n} positions forward in the list +of matches; a negative argument may be used to move backward +through the list. +This command is intended to be bound to @key{TAB}, but is unbound +by default. + +@item menu-complete-backward () +Identical to @code{menu-complete}, but moves backward through the list +of possible completions, as if @code{menu-complete} had been given a +negative argument. + +@item delete-char-or-list () +Deletes the character under the cursor if not at the beginning or +end of the line (like @code{delete-char}). +If at the end of the line, behaves identically to +@code{possible-completions}. +This command is unbound by default. + +@ifset BashFeatures +@item complete-filename (M-/) +Attempt filename completion on the text before point. + +@item possible-filename-completions (C-x /) +List the possible completions of the text before point, +treating it as a filename. + +@item complete-username (M-~) +Attempt completion on the text before point, treating +it as a username. + +@item possible-username-completions (C-x ~) +List the possible completions of the text before point, +treating it as a username. + +@item complete-variable (M-$) +Attempt completion on the text before point, treating +it as a shell variable. + +@item possible-variable-completions (C-x $) +List the possible completions of the text before point, +treating it as a shell variable. + +@item complete-hostname (M-@@) +Attempt completion on the text before point, treating +it as a hostname. + +@item possible-hostname-completions (C-x @@) +List the possible completions of the text before point, +treating it as a hostname. + +@item complete-command (M-!) +Attempt completion on the text before point, treating +it as a command name. Command completion attempts to +match the text against aliases, reserved words, shell +functions, shell builtins, and finally executable filenames, +in that order. + +@item possible-command-completions (C-x !) +List the possible completions of the text before point, +treating it as a command name. + +@item dynamic-complete-history (M-@key{TAB}) +Attempt completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. + +@item dabbrev-expand () +Attempt menu completion on the text before point, comparing +the text against lines from the history list for possible +completion matches. + +@item complete-into-braces (M-@{) +Perform filename completion and insert the list of possible completions +enclosed within braces so the list is available to the shell +(@pxref{Brace Expansion}). + +@end ifset +@end ftable + +@node Keyboard Macros +@subsection Keyboard Macros +@ftable @code + +@item start-kbd-macro (C-x () +Begin saving the characters typed into the current keyboard macro. + +@item end-kbd-macro (C-x )) +Stop saving the characters typed into the current keyboard macro +and save the definition. + +@item call-last-kbd-macro (C-x e) +Re-execute the last keyboard macro defined, by making the characters +in the macro appear as if typed at the keyboard. + +@item print-last-kbd-macro () +Print the last keboard macro defined in a format suitable for the +@var{inputrc} file. + +@end ftable + +@node Miscellaneous Commands +@subsection Some Miscellaneous Commands +@ftable @code + +@item re-read-init-file (C-x C-r) +Read in the contents of the @var{inputrc} file, and incorporate +any bindings or variable assignments found there. + +@item abort (C-g) +Abort the current editing command and +ring the terminal's bell (subject to the setting of +@code{bell-style}). + +@item do-lowercase-version (M-A, M-B, M-@var{x}, @dots{}) +If the metafied character @var{x} is upper case, run the command +that is bound to the corresponding metafied lower case character. +The behavior is undefined if @var{x} is already lower case. + +@item prefix-meta (@key{ESC}) +Metafy the next character typed. This is for keyboards +without a meta key. Typing @samp{@key{ESC} f} is equivalent to typing +@kbd{M-f}. + +@item undo (C-_ or C-x C-u) +Incremental undo, separately remembered for each line. + +@item revert-line (M-r) +Undo all changes made to this line. This is like executing the @code{undo} +command enough times to get back to the beginning. + +@ifset BashFeatures +@item tilde-expand (M-&) +@end ifset +@ifclear BashFeatures +@item tilde-expand (M-~) +@end ifclear +Perform tilde expansion on the current word. + +@item set-mark (C-@@) +Set the mark to the point. If a +numeric argument is supplied, the mark is set to that position. + +@item exchange-point-and-mark (C-x C-x) +Swap the point with the mark. The current cursor position is set to +the saved position, and the old cursor position is saved as the mark. + +@item character-search (C-]) +A character is read and point is moved to the next occurrence of that +character. A negative count searches for previous occurrences. + +@item character-search-backward (M-C-]) +A character is read and point is moved to the previous occurrence +of that character. A negative count searches for subsequent +occurrences. + +@item skip-csi-sequence () +Read enough characters to consume a multi-key sequence such as those +defined for keys like Home and End. Such sequences begin with a +Control Sequence Indicator (CSI), usually ESC-[. If this sequence is +bound to "\e[", keys producing such sequences will have no effect +unless explicitly bound to a readline command, instead of inserting +stray characters into the editing buffer. This is unbound by default, +but usually bound to ESC-[. + +@item insert-comment (M-#) +Without a numeric argument, the value of the @code{comment-begin} +variable is inserted at the beginning of the current line. +If a numeric argument is supplied, this command acts as a toggle: if +the characters at the beginning of the line do not match the value +of @code{comment-begin}, the value is inserted, otherwise +the characters in @code{comment-begin} are deleted from the beginning of +the line. +In either case, the line is accepted as if a newline had been typed. +@ifset BashFeatures +The default value of @code{comment-begin} causes this command +to make the current line a shell comment. +If a numeric argument causes the comment character to be removed, the line +will be executed by the shell. +@end ifset + +@item dump-functions () +Print all of the functions and their key bindings to the +Readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an @var{inputrc} file. This command is unbound by default. + +@item dump-variables () +Print all of the settable variables and their values to the +Readline output stream. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an @var{inputrc} file. This command is unbound by default. + +@item dump-macros () +Print all of the Readline key sequences bound to macros and the +strings they output. If a numeric argument is supplied, +the output is formatted in such a way that it can be made part +of an @var{inputrc} file. This command is unbound by default. + +@ifset BashFeatures +@item glob-complete-word (M-g) +The word before point is treated as a pattern for pathname expansion, +with an asterisk implicitly appended. This pattern is used to +generate a list of matching file names for possible completions. + +@item glob-expand-word (C-x *) +The word before point is treated as a pattern for pathname expansion, +and the list of matching file names is inserted, replacing the word. +If a numeric argument is supplied, a @samp{*} is appended before +pathname expansion. + +@item glob-list-expansions (C-x g) +The list of expansions that would have been generated by +@code{glob-expand-word} is displayed, and the line is redrawn. +If a numeric argument is supplied, a @samp{*} is appended before +pathname expansion. + +@item display-shell-version (C-x C-v) +Display version information about the current instance of Bash. + +@item shell-expand-line (M-C-e) +Expand the line as the shell does. +This performs alias and history expansion as well as all of the shell +word expansions (@pxref{Shell Expansions}). + +@item history-expand-line (M-^) +Perform history expansion on the current line. + +@item magic-space () +Perform history expansion on the current line and insert a space +(@pxref{History Interaction}). + +@item alias-expand-line () +Perform alias expansion on the current line (@pxref{Aliases}). + +@item history-and-alias-expand-line () +Perform history and alias expansion on the current line. + +@item insert-last-argument (M-. or M-_) +A synonym for @code{yank-last-arg}. + +@item edit-and-execute-command (C-x C-e) +Invoke an editor on the current command line, and execute the result as shell +commands. +Bash attempts to invoke +@code{$VISUAL}, @code{$EDITOR}, and @code{emacs} +as the editor, in that order. + +@end ifset + +@ifclear BashFeatures +@item emacs-editing-mode (C-e) +When in @code{vi} command mode, this causes a switch to @code{emacs} +editing mode. + +@item vi-editing-mode (M-C-j) +When in @code{emacs} editing mode, this causes a switch to @code{vi} +editing mode. + +@end ifclear + +@end ftable + +@node Readline vi Mode +@section Readline vi Mode + +While the Readline library does not have a full set of @code{vi} +editing functions, it does contain enough to allow simple editing +of the line. The Readline @code{vi} mode behaves as specified in +the @sc{posix} standard. + +@ifset BashFeatures +In order to switch interactively between @code{emacs} and @code{vi} +editing modes, use the @samp{set -o emacs} and @samp{set -o vi} +commands (@pxref{The Set Builtin}). +@end ifset +@ifclear BashFeatures +In order to switch interactively between @code{emacs} and @code{vi} +editing modes, use the command @kbd{M-C-j} (bound to emacs-editing-mode +when in @code{vi} mode and to vi-editing-mode in @code{emacs} mode). +@end ifclear +The Readline default is @code{emacs} mode. + +When you enter a line in @code{vi} mode, you are already placed in +`insertion' mode, as if you had typed an @samp{i}. Pressing @key{ESC} +switches you into `command' mode, where you can edit the text of the +line with the standard @code{vi} movement keys, move to previous +history lines with @samp{k} and subsequent lines with @samp{j}, and +so forth. + +@ifset BashFeatures +@node Programmable Completion +@section Programmable Completion +@cindex programmable completion + +When word completion is attempted for an argument to a command for +which a completion specification (a @var{compspec}) has been defined +using the @code{complete} builtin (@pxref{Programmable Completion Builtins}), +the programmable completion facilities are invoked. + +First, the command name is identified. +If a compspec has been defined for that command, the +compspec is used to generate the list of possible completions for the word. +If the command word is the empty string (completion attempted at the +beginning of an empty line), any compspec defined with +the @option{-E} option to @code{complete} is used. +If the command word is a full pathname, a compspec for the full +pathname is searched for first. +If no compspec is found for the full pathname, an attempt is made to +find a compspec for the portion following the final slash. +If those searches do not result in a compspec, any compspec defined with +the @option{-D} option to @code{complete} is used as the default. +If there is no default compspec, Bash attempts alias expansion +on the command word as a final resort, and attempts to find a compspec +for the command word from any successful expansion + +Once a compspec has been found, it is used to generate the list of +matching words. +If a compspec is not found, the default Bash completion +described above (@pxref{Commands For Completion}) is performed. + +First, the actions specified by the compspec are used. +Only matches which are prefixed by the word being completed are +returned. +When the @option{-f} or @option{-d} option is used for filename or +directory name completion, the shell variable @env{FIGNORE} is +used to filter the matches. +@xref{Bash Variables}, for a description of @env{FIGNORE}. + +Any completions specified by a filename expansion pattern to the +@option{-G} option are generated next. +The words generated by the pattern need not match the word being completed. +The @env{GLOBIGNORE} shell variable is not used to filter the matches, +but the @env{FIGNORE} shell variable is used. + +Next, the string specified as the argument to the @option{-W} option +is considered. +The string is first split using the characters in the @env{IFS} +special variable as delimiters. +Shell quoting is honored within the string, in order to provide a +mechanism for the words to contain shell metacharacters or characters +in the value of @env{IFS}. +Each word is then expanded using +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, and arithmetic expansion, +as described above (@pxref{Shell Expansions}). +The results are split using the rules described above +(@pxref{Word Splitting}). +The results of the expansion are prefix-matched against the word being +completed, and the matching words become the possible completions. + +After these matches have been generated, any shell function or command +specified with the @option{-F} and @option{-C} options is invoked. +When the command or function is invoked, the @env{COMP_LINE}, +@env{COMP_POINT}, @env{COMP_KEY}, and @env{COMP_TYPE} variables are +assigned values as described above (@pxref{Bash Variables}). +If a shell function is being invoked, the @env{COMP_WORDS} and +@env{COMP_CWORD} variables are also set. +When the function or command is invoked, the first argument ($1) is the +name of the command whose arguments are being completed, the +second argument ($2) is the word being completed, and the third argument +($3) is the word preceding the word being completed on the current command +line. +No filtering of the generated completions against the word being completed +is performed; the function or command has complete freedom in generating +the matches. + +Any function specified with @option{-F} is invoked first. +The function may use any of the shell facilities, including the +@code{compgen} and @code{compopt} builtins described below +(@pxref{Programmable Completion Builtins}), to generate the matches. +It must put the possible completions in the @env{COMPREPLY} array +variable, one per array element. + +Next, any command specified with the @option{-C} option is invoked +in an environment equivalent to command substitution. +It should print a list of completions, one per line, to +the standard output. +Backslash may be used to escape a newline, if necessary. + +After all of the possible completions are generated, any filter +specified with the @option{-X} option is applied to the list. +The filter is a pattern as used for pathname expansion; a @samp{&} +in the pattern is replaced with the text of the word being completed. +A literal @samp{&} may be escaped with a backslash; the backslash +is removed before attempting a match. +Any completion that matches the pattern will be removed from the list. +A leading @samp{!} negates the pattern; in this case any completion +not matching the pattern will be removed. +If the @code{nocasematch} shell option +(see the description of @code{shopt} in @ref{The Shopt Builtin}) +is enabled, the match is performed without regard to the case +of alphabetic characters. + +Finally, any prefix and suffix specified with the @option{-P} and @option{-S} +options are added to each member of the completion list, and the result is +returned to the Readline completion code as the list of possible +completions. + +If the previously-applied actions do not generate any matches, and the +@option{-o dirnames} option was supplied to @code{complete} when the +compspec was defined, directory name completion is attempted. + +If the @option{-o plusdirs} option was supplied to @code{complete} when +the compspec was defined, directory name completion is attempted and any +matches are added to the results of the other actions. + +By default, if a compspec is found, whatever it generates is returned to +the completion code as the full set of possible completions. +The default Bash completions are not attempted, and the Readline default +of filename completion is disabled. +If the @option{-o bashdefault} option was supplied to @code{complete} when +the compspec was defined, the default Bash completions are attempted +if the compspec generates no matches. +If the @option{-o default} option was supplied to @code{complete} when the +compspec was defined, Readline's default completion will be performed +if the compspec (and, if attempted, the default Bash completions) +generate no matches. + +When a compspec indicates that directory name completion is desired, +the programmable completion functions force Readline to append a slash +to completed names which are symbolic links to directories, subject to +the value of the @var{mark-directories} Readline variable, regardless +of the setting of the @var{mark-symlinked-directories} Readline variable. + +There is some support for dynamically modifying completions. This is +most useful when used in combination with a default completion specified +with @option{-D}. It's possible for shell functions executed as completion +handlers to indicate that completion should be retried by returning an +exit status of 124. If a shell function returns 124, and changes +the compspec associated with the command on which completion is being +attempted (supplied as the first argument when the function is executed), +programmable completion restarts from the beginning, with an +attempt to find a new compspec for that command. This allows a set of +completions to be built dynamically as completion is attempted, rather than +being loaded all at once. + +For instance, assuming that there is a library of compspecs, each kept in a +file corresponding to the name of the command, the following default +completion function would load completions dynamically: + +@example +_completion_loader() +@{ + . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 +@} +complete -D -F _completion_loader -o bashdefault -o default +@end example + +@node Programmable Completion Builtins +@section Programmable Completion Builtins +@cindex completion builtins + +Three builtin commands are available to manipulate the programmable completion +facilities: one to specify how the arguments to a particular command are to +be completed, and two to modify the completion as it is happening. + +@table @code +@item compgen +@btindex compgen +@example +@code{compgen [@var{option}] [@var{word}]} +@end example + +Generate possible completion matches for @var{word} according to +the @var{option}s, which may be any option accepted by the +@code{complete} +builtin with the exception of @option{-p} and @option{-r}, and write +the matches to the standard output. +When using the @option{-F} or @option{-C} options, the various shell variables +set by the programmable completion facilities, while available, will not +have useful values. + +The matches will be generated in the same way as if the programmable +completion code had generated them directly from a completion specification +with the same flags. +If @var{word} is specified, only those completions matching @var{word} +will be displayed. + +The return value is true unless an invalid option is supplied, or no +matches were generated. + +@item complete +@btindex complete +@example +@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-DEI] [-A @var{action}] [-G @var{globpat}] +[-W @var{wordlist}] [-F @var{function}] [-C @var{command}] [-X @var{filterpat}] +[-P @var{prefix}] [-S @var{suffix}] @var{name} [@var{name} @dots{}]} +@code{complete -pr [-DEI] [@var{name} @dots{}]} +@end example + +Specify how arguments to each @var{name} should be completed. +If the @option{-p} option is supplied, or if no options are supplied, existing +completion specifications are printed in a way that allows them to be +reused as input. +The @option{-r} option removes a completion specification for +each @var{name}, or, if no @var{name}s are supplied, all +completion specifications. +The @option{-D} option indicates that other supplied options and actions should +apply to the ``default'' command completion; that is, completion attempted +on a command for which no completion has previously been defined. +The @option{-E} option indicates that other supplied options and actions should +apply to ``empty'' command completion; that is, completion attempted on a +blank line. +The @option{-I} option indicates that other supplied options and actions should +apply to completion on the initial non-assignment word on the line, or after a +command delimiter such as @samp{;} or @samp{|}, which is usually command +name completion. +If multiple options are supplied, the @option{-D} option takes precedence +over @option{-E}, and both take precedence over @option{-I}. +If any of @option{-D}, @option{-E}, or @option{-I} are supplied, any other +@var{name} arguments are ignored; these completions only apply to the case +specified by the option. + +The process of applying these completion specifications when word completion +is attempted is described above (@pxref{Programmable Completion}). + +Other options, if specified, have the following meanings. +The arguments to the @option{-G}, @option{-W}, and @option{-X} options +(and, if necessary, the @option{-P} and @option{-S} options) +should be quoted to protect them from expansion before the +@code{complete} builtin is invoked. + + +@table @code +@item -o @var{comp-option} +The @var{comp-option} controls several aspects of the compspec's behavior +beyond the simple generation of completions. +@var{comp-option} may be one of: + +@table @code + +@item bashdefault +Perform the rest of the default Bash completions if the compspec +generates no matches. + +@item default +Use Readline's default filename completion if the compspec generates +no matches. + +@item dirnames +Perform directory name completion if the compspec generates no matches. + +@item filenames +Tell Readline that the compspec generates filenames, so it can perform any +filename-specific processing (like adding a slash to directory names, +quoting special characters, or suppressing trailing spaces). +This option is intended to be used with shell functions specified +with @option{-F}. + +@item noquote +Tell Readline not to quote the completed words if they are filenames +(quoting filenames is the default). + +@item nosort +Tell Readline not to sort the list of possible completions alphabetically. + +@item nospace +Tell Readline not to append a space (the default) to words completed at +the end of the line. + +@item plusdirs +After any matches defined by the compspec are generated, +directory name completion is attempted and any +matches are added to the results of the other actions. + +@end table + +@item -A @var{action} +The @var{action} may be one of the following to generate a list of possible +completions: + +@table @code +@item alias +Alias names. May also be specified as @option{-a}. + +@item arrayvar +Array variable names. + +@item binding +Readline key binding names (@pxref{Bindable Readline Commands}). + +@item builtin +Names of shell builtin commands. May also be specified as @option{-b}. + +@item command +Command names. May also be specified as @option{-c}. + +@item directory +Directory names. May also be specified as @option{-d}. + +@item disabled +Names of disabled shell builtins. + +@item enabled +Names of enabled shell builtins. + +@item export +Names of exported shell variables. May also be specified as @option{-e}. + +@item file +File names. May also be specified as @option{-f}. + +@item function +Names of shell functions. + +@item group +Group names. May also be specified as @option{-g}. + +@item helptopic +Help topics as accepted by the @code{help} builtin (@pxref{Bash Builtins}). + +@item hostname +Hostnames, as taken from the file specified by the +@env{HOSTFILE} shell variable (@pxref{Bash Variables}). + +@item job +Job names, if job control is active. May also be specified as @option{-j}. + +@item keyword +Shell reserved words. May also be specified as @option{-k}. + +@item running +Names of running jobs, if job control is active. + +@item service +Service names. May also be specified as @option{-s}. + +@item setopt +Valid arguments for the @option{-o} option to the @code{set} builtin +(@pxref{The Set Builtin}). + +@item shopt +Shell option names as accepted by the @code{shopt} builtin +(@pxref{Bash Builtins}). + +@item signal +Signal names. + +@item stopped +Names of stopped jobs, if job control is active. + +@item user +User names. May also be specified as @option{-u}. + +@item variable +Names of all shell variables. May also be specified as @option{-v}. +@end table + +@item -C @var{command} +@var{command} is executed in a subshell environment, and its output is +used as the possible completions. + +@item -F @var{function} +The shell function @var{function} is executed in the current shell +environment. +When it is executed, $1 is the name of the command whose arguments are +being completed, $2 is the word being completed, and $3 is the word +preceding the word being completed, as described above +(@pxref{Programmable Completion}). +When it finishes, the possible completions are retrieved from the value +of the @env{COMPREPLY} array variable. + +@item -G @var{globpat} +The filename expansion pattern @var{globpat} is expanded to generate +the possible completions. + +@item -P @var{prefix} +@var{prefix} is added at the beginning of each possible completion +after all other options have been applied. + +@item -S @var{suffix} +@var{suffix} is appended to each possible completion +after all other options have been applied. + +@item -W @var{wordlist} +The @var{wordlist} is split using the characters in the +@env{IFS} special variable as delimiters, and each resultant word +is expanded. +The possible completions are the members of the resultant list which +match the word being completed. + +@item -X @var{filterpat} +@var{filterpat} is a pattern as used for filename expansion. +It is applied to the list of possible completions generated by the +preceding options and arguments, and each completion matching +@var{filterpat} is removed from the list. +A leading @samp{!} in @var{filterpat} negates the pattern; in this +case, any completion not matching @var{filterpat} is removed. +@end table + +The return value is true unless an invalid option is supplied, an option +other than @option{-p} or @option{-r} is supplied without a @var{name} +argument, an attempt is made to remove a completion specification for +a @var{name} for which no specification exists, or +an error occurs adding a completion specification. + +@item compopt +@btindex compopt +@example +@code{compopt} [-o @var{option}] [-DEI] [+o @var{option}] [@var{name}] +@end example +Modify completion options for each @var{name} according to the +@var{option}s, or for the currently-executing completion if no @var{name}s +are supplied. +If no @var{option}s are given, display the completion options for each +@var{name} or the current completion. +The possible values of @var{option} are those valid for the @code{complete} +builtin described above. +The @option{-D} option indicates that other supplied options should +apply to the ``default'' command completion; that is, completion attempted +on a command for which no completion has previously been defined. +The @option{-E} option indicates that other supplied options should +apply to ``empty'' command completion; that is, completion attempted on a +blank line. +The @option{-I} option indicates that other supplied options should +apply to completion on the initial non-assignment word on the line, or after a +command delimiter such as @samp{;} or @samp{|}, which is usually command +name completion. + +If multiple options are supplied, the @option{-D} option takes precedence +over @option{-E}, and both take precedence over @option{-I} + +The return value is true unless an invalid option is supplied, an attempt +is made to modify the options for a @var{name} for which no completion +specification exists, or an output error occurs. + +@end table + +@node A Programmable Completion Example +@section A Programmable Completion Example + +The most common way to obtain additional completion functionality beyond +the default actions @code{complete} and @code{compgen} provide is to use +a shell function and bind it to a particular command using @code{complete -F}. + +The following function provides completions for the @code{cd} builtin. +It is a reasonably good example of what shell functions must do when +used for completion. This function uses the word passed as @code{$2} +to determine the directory name to complete. You can also use the +@code{COMP_WORDS} array variable; the current word is indexed by the +@code{COMP_CWORD} variable. + +The function relies on the @code{complete} and @code{compgen} builtins +to do much of the work, adding only the things that the Bash @code{cd} +does beyond accepting basic directory names: +tilde expansion (@pxref{Tilde Expansion}), +searching directories in @var{$CDPATH}, which is described above +(@pxref{Bourne Shell Builtins}), +and basic support for the @code{cdable_vars} shell option +(@pxref{The Shopt Builtin}). +@code{_comp_cd} modifies the value of @var{IFS} so that it contains only +a newline to accommodate file names containing spaces and tabs -- +@code{compgen} prints the possible completions it generates one per line. + +Possible completions go into the @var{COMPREPLY} array variable, one +completion per array element. The programmable completion system retrieves +the completions from there when the function returns. + +@example +# A completion function for the cd builtin +# based on the cd completion function from the bash_completion package +_comp_cd() +@{ + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, which also expands tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "$@{CDPATH:-@}" ]] || [[ "$cur" == @@(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=$@{CDPATH/#:/.:@} + _cdpath=$@{_cdpath//::/:.:@} + _cdpath=$@{_cdpath/%:/:.@} + for i in $@{_cdpath//:/$'\n'@}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="$@{#COMPREPLY[@@]@}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=$@{j#$i/@} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ $@{#COMPREPLY[@@]@} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + return 0 +@} +@end example + +We install the completion function using the @option{-F} option to +@code{complete}: + +@example +# Tell readline to quote appropriate and append slashes to directories; +# use the bash default completion for other arguments +complete -o filenames -o nospace -o bashdefault -F _comp_cd cd +@end example + +@noindent +Since we'd like Bash and Readline to take care of some +of the other details for us, we use several other options to tell Bash +and Readline what to do. The @option{-o filenames} option tells Readline +that the possible completions should be treated as filenames, and quoted +appropriately. That option will also cause Readline to append a slash to +filenames it can determine are directories (which is why we might want to +extend @code{_comp_cd} to append a slash if we're using directories found +via @var{CDPATH}: Readline can't tell those completions are directories). +The @option{-o nospace} option tells Readline to not append a space +character to the directory name, in case we want to append to it. +The @option{-o bashdefault} option brings in the rest of the "Bash default" +completions -- possible completion that Bash adds to the default Readline +set. These include things like command name completion, variable completion +for words beginning with @samp{$} or @samp{$@{}, completions containing pathname +expansion patterns (@pxref{Filename Expansion}), and so on. + +Once installed using @code{complete}, @code{_comp_cd} will be called every +time we attempt word completion for a @code{cd} command. + +Many more examples -- an extensive collection of completions for most of +the common GNU, Unix, and Linux commands -- are available as part of the +bash_completion project. This is installed by default on many GNU/Linux +distributions. Originally written by Ian Macdonald, the project now lives +at @url{https://github.com/scop/bash-completion/}. There are ports for +other systems such as Solaris and Mac OS X. + +An older version of the bash_completion package is distributed with bash +in the @file{examples/complete} subdirectory. + +@end ifset diff --git a/bash-5.1/lib/readline/doc/rluserman.texi b/bash-5.1/lib/readline/doc/rluserman.texi new file mode 100644 index 0000000000000000000000000000000000000000..6e8e848b6e5ae993259eb3a964e8573fe3a73fc5 --- /dev/null +++ b/bash-5.1/lib/readline/doc/rluserman.texi @@ -0,0 +1,70 @@ +\input texinfo @c -*-texinfo-*- +@comment %**start of header (This is for running Texinfo on a region.) +@setfilename rluserman.info +@settitle GNU Readline Library +@include version.texi + +@comment %**end of header (This is for running Texinfo on a region.) + +@copying +This manual describes the end user interface of the GNU Readline Library +(version @value{VERSION}, @value{UPDATED}), a library which aids in the +consistency of user interface across discrete programs which provide +a command line interface. + +Copyright @copyright{} 1988--2020 Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled +``GNU Free Documentation License''. + +@end quotation +@end copying + +@dircategory Libraries +@direntry +* RLuserman: (rluserman). The GNU readline library User's Manual. +@end direntry + +@titlepage +@title GNU Readline Library User Interface +@subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}. +@subtitle @value{UPDATED-MONTH} +@author Chet Ramey, Case Western Reserve University +@author Brian Fox, Free Software Foundation + +@page +@vskip 0pt plus 1filll +@insertcopying + +@end titlepage + +@contents + +@ifnottex +@node Top +@top GNU Readline Library + +This document describes the end user interface of the GNU Readline Library, +a utility which aids in the consistency of user interface across discrete +programs which provide a command line interface. +The Readline home page is @url{http://www.gnu.org/software/readline/}. + +@menu +* Command Line Editing:: GNU Readline User's Manual. +* GNU Free Documentation License:: License for copying this manual. +@end menu +@end ifnottex + +@include rluser.texi + +@node GNU Free Documentation License +@appendix GNU Free Documentation License + +@include fdl.texi + +@bye diff --git a/bash-5.1/lib/readline/doc/version.texi b/bash-5.1/lib/readline/doc/version.texi new file mode 100644 index 0000000000000000000000000000000000000000..abb9cb6ba573493530f878612d271b4c80848fce --- /dev/null +++ b/bash-5.1/lib/readline/doc/version.texi @@ -0,0 +1,10 @@ +@ignore +Copyright (C) 1988-2020 Free Software Foundation, Inc. +@end ignore + +@set EDITION 8.1 +@set VERSION 8.1 +@set UPDATED 29 October 2020 +@set UPDATED-MONTH October 2020 + +@set LASTCHANGE Thu Oct 29 16:49:01 EDT 2020 diff --git a/bash-5.1/lib/readline/emacs_keymap.c b/bash-5.1/lib/readline/emacs_keymap.c new file mode 100644 index 0000000000000000000000000000000000000000..02597dad31a4811bb55d44a30914b7b955eb2871 --- /dev/null +++ b/bash-5.1/lib/readline/emacs_keymap.c @@ -0,0 +1,872 @@ +/* emacs_keymap.c -- the keymap for emacs_mode in readline (). */ + +/* Copyright (C) 1987-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (BUFSIZ) +#include +#endif /* !BUFSIZ */ + +#include "readline.h" + +/* An array of function pointers, one for each possible key. + If the type byte is ISKMAP, then the pointer is the address of + a keymap. */ + +KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { + + /* Control keys. */ + { ISFUNC, rl_set_mark }, /* Control-@ */ + { ISFUNC, rl_beg_of_line }, /* Control-a */ + { ISFUNC, rl_backward_char }, /* Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ + { ISFUNC, rl_delete }, /* Control-d */ + { ISFUNC, rl_end_of_line }, /* Control-e */ + { ISFUNC, rl_forward_char }, /* Control-f */ + { ISFUNC, rl_abort }, /* Control-g */ + { ISFUNC, rl_rubout }, /* Control-h */ + { ISFUNC, rl_complete }, /* Control-i */ + { ISFUNC, rl_newline }, /* Control-j */ + { ISFUNC, rl_kill_line }, /* Control-k */ + { ISFUNC, rl_clear_screen }, /* Control-l */ + { ISFUNC, rl_newline }, /* Control-m */ + { ISFUNC, rl_get_next_history }, /* Control-n */ + { ISFUNC, rl_operate_and_get_next }, /* Control-o */ + { ISFUNC, rl_get_previous_history }, /* Control-p */ + { ISFUNC, rl_quoted_insert }, /* Control-q */ + { ISFUNC, rl_reverse_search_history }, /* Control-r */ + { ISFUNC, rl_forward_search_history }, /* Control-s */ + { ISFUNC, rl_transpose_chars }, /* Control-t */ + { ISFUNC, rl_unix_line_discard }, /* Control-u */ + { ISFUNC, rl_quoted_insert }, /* Control-v */ + { ISFUNC, rl_unix_word_rubout }, /* Control-w */ + { ISKMAP, (rl_command_func_t *)emacs_ctlx_keymap }, /* Control-x */ + { ISFUNC, rl_yank }, /* Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ + { ISKMAP, (rl_command_func_t *)emacs_meta_keymap }, /* Control-[ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ + { ISFUNC, rl_char_search }, /* Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ + { ISFUNC, rl_undo_command }, /* Control-_ */ + + /* The start of printing characters. */ + { ISFUNC, rl_insert }, /* SPACE */ + { ISFUNC, rl_insert }, /* ! */ + { ISFUNC, rl_insert }, /* " */ + { ISFUNC, rl_insert }, /* # */ + { ISFUNC, rl_insert }, /* $ */ + { ISFUNC, rl_insert }, /* % */ + { ISFUNC, rl_insert }, /* & */ + { ISFUNC, rl_insert }, /* ' */ + { ISFUNC, rl_insert }, /* ( */ + { ISFUNC, rl_insert }, /* ) */ + { ISFUNC, rl_insert }, /* * */ + { ISFUNC, rl_insert }, /* + */ + { ISFUNC, rl_insert }, /* , */ + { ISFUNC, rl_insert }, /* - */ + { ISFUNC, rl_insert }, /* . */ + { ISFUNC, rl_insert }, /* / */ + + /* Regular digits. */ + { ISFUNC, rl_insert }, /* 0 */ + { ISFUNC, rl_insert }, /* 1 */ + { ISFUNC, rl_insert }, /* 2 */ + { ISFUNC, rl_insert }, /* 3 */ + { ISFUNC, rl_insert }, /* 4 */ + { ISFUNC, rl_insert }, /* 5 */ + { ISFUNC, rl_insert }, /* 6 */ + { ISFUNC, rl_insert }, /* 7 */ + { ISFUNC, rl_insert }, /* 8 */ + { ISFUNC, rl_insert }, /* 9 */ + + /* A little more punctuation. */ + { ISFUNC, rl_insert }, /* : */ + { ISFUNC, rl_insert }, /* ; */ + { ISFUNC, rl_insert }, /* < */ + { ISFUNC, rl_insert }, /* = */ + { ISFUNC, rl_insert }, /* > */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* @ */ + + /* Uppercase alphabet. */ + { ISFUNC, rl_insert }, /* A */ + { ISFUNC, rl_insert }, /* B */ + { ISFUNC, rl_insert }, /* C */ + { ISFUNC, rl_insert }, /* D */ + { ISFUNC, rl_insert }, /* E */ + { ISFUNC, rl_insert }, /* F */ + { ISFUNC, rl_insert }, /* G */ + { ISFUNC, rl_insert }, /* H */ + { ISFUNC, rl_insert }, /* I */ + { ISFUNC, rl_insert }, /* J */ + { ISFUNC, rl_insert }, /* K */ + { ISFUNC, rl_insert }, /* L */ + { ISFUNC, rl_insert }, /* M */ + { ISFUNC, rl_insert }, /* N */ + { ISFUNC, rl_insert }, /* O */ + { ISFUNC, rl_insert }, /* P */ + { ISFUNC, rl_insert }, /* Q */ + { ISFUNC, rl_insert }, /* R */ + { ISFUNC, rl_insert }, /* S */ + { ISFUNC, rl_insert }, /* T */ + { ISFUNC, rl_insert }, /* U */ + { ISFUNC, rl_insert }, /* V */ + { ISFUNC, rl_insert }, /* W */ + { ISFUNC, rl_insert }, /* X */ + { ISFUNC, rl_insert }, /* Y */ + { ISFUNC, rl_insert }, /* Z */ + + /* Some more punctuation. */ + { ISFUNC, rl_insert }, /* [ */ + { ISFUNC, rl_insert }, /* \ */ + { ISFUNC, rl_insert }, /* ] */ + { ISFUNC, rl_insert }, /* ^ */ + { ISFUNC, rl_insert }, /* _ */ + { ISFUNC, rl_insert }, /* ` */ + + /* Lowercase alphabet. */ + { ISFUNC, rl_insert }, /* a */ + { ISFUNC, rl_insert }, /* b */ + { ISFUNC, rl_insert }, /* c */ + { ISFUNC, rl_insert }, /* d */ + { ISFUNC, rl_insert }, /* e */ + { ISFUNC, rl_insert }, /* f */ + { ISFUNC, rl_insert }, /* g */ + { ISFUNC, rl_insert }, /* h */ + { ISFUNC, rl_insert }, /* i */ + { ISFUNC, rl_insert }, /* j */ + { ISFUNC, rl_insert }, /* k */ + { ISFUNC, rl_insert }, /* l */ + { ISFUNC, rl_insert }, /* m */ + { ISFUNC, rl_insert }, /* n */ + { ISFUNC, rl_insert }, /* o */ + { ISFUNC, rl_insert }, /* p */ + { ISFUNC, rl_insert }, /* q */ + { ISFUNC, rl_insert }, /* r */ + { ISFUNC, rl_insert }, /* s */ + { ISFUNC, rl_insert }, /* t */ + { ISFUNC, rl_insert }, /* u */ + { ISFUNC, rl_insert }, /* v */ + { ISFUNC, rl_insert }, /* w */ + { ISFUNC, rl_insert }, /* x */ + { ISFUNC, rl_insert }, /* y */ + { ISFUNC, rl_insert }, /* z */ + + /* Final punctuation. */ + { ISFUNC, rl_insert }, /* { */ + { ISFUNC, rl_insert }, /* | */ + { ISFUNC, rl_insert }, /* } */ + { ISFUNC, rl_insert }, /* ~ */ + { ISFUNC, rl_rubout }, /* RUBOUT */ + +#if KEYMAP_SIZE > 128 + /* Pure 8-bit characters (128 - 159). + These might be used in some + character sets. */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + + /* ISO Latin-1 characters (160 - 255) */ + { ISFUNC, rl_insert }, /* No-break space */ + { ISFUNC, rl_insert }, /* Inverted exclamation mark */ + { ISFUNC, rl_insert }, /* Cent sign */ + { ISFUNC, rl_insert }, /* Pound sign */ + { ISFUNC, rl_insert }, /* Currency sign */ + { ISFUNC, rl_insert }, /* Yen sign */ + { ISFUNC, rl_insert }, /* Broken bar */ + { ISFUNC, rl_insert }, /* Section sign */ + { ISFUNC, rl_insert }, /* Diaeresis */ + { ISFUNC, rl_insert }, /* Copyright sign */ + { ISFUNC, rl_insert }, /* Feminine ordinal indicator */ + { ISFUNC, rl_insert }, /* Left pointing double angle quotation mark */ + { ISFUNC, rl_insert }, /* Not sign */ + { ISFUNC, rl_insert }, /* Soft hyphen */ + { ISFUNC, rl_insert }, /* Registered sign */ + { ISFUNC, rl_insert }, /* Macron */ + { ISFUNC, rl_insert }, /* Degree sign */ + { ISFUNC, rl_insert }, /* Plus-minus sign */ + { ISFUNC, rl_insert }, /* Superscript two */ + { ISFUNC, rl_insert }, /* Superscript three */ + { ISFUNC, rl_insert }, /* Acute accent */ + { ISFUNC, rl_insert }, /* Micro sign */ + { ISFUNC, rl_insert }, /* Pilcrow sign */ + { ISFUNC, rl_insert }, /* Middle dot */ + { ISFUNC, rl_insert }, /* Cedilla */ + { ISFUNC, rl_insert }, /* Superscript one */ + { ISFUNC, rl_insert }, /* Masculine ordinal indicator */ + { ISFUNC, rl_insert }, /* Right pointing double angle quotation mark */ + { ISFUNC, rl_insert }, /* Vulgar fraction one quarter */ + { ISFUNC, rl_insert }, /* Vulgar fraction one half */ + { ISFUNC, rl_insert }, /* Vulgar fraction three quarters */ + { ISFUNC, rl_insert }, /* Inverted questionk mark */ + { ISFUNC, rl_insert }, /* Latin capital letter a with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter a with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter a with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter a with tilde */ + { ISFUNC, rl_insert }, /* Latin capital letter a with diaeresis */ + { ISFUNC, rl_insert }, /* Latin capital letter a with ring above */ + { ISFUNC, rl_insert }, /* Latin capital letter ae */ + { ISFUNC, rl_insert }, /* Latin capital letter c with cedilla */ + { ISFUNC, rl_insert }, /* Latin capital letter e with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter e with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter e with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter e with diaeresis */ + { ISFUNC, rl_insert }, /* Latin capital letter i with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter i with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter i with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter i with diaeresis */ + { ISFUNC, rl_insert }, /* Latin capital letter eth (Icelandic) */ + { ISFUNC, rl_insert }, /* Latin capital letter n with tilde */ + { ISFUNC, rl_insert }, /* Latin capital letter o with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter o with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter o with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter o with tilde */ + { ISFUNC, rl_insert }, /* Latin capital letter o with diaeresis */ + { ISFUNC, rl_insert }, /* Multiplication sign */ + { ISFUNC, rl_insert }, /* Latin capital letter o with stroke */ + { ISFUNC, rl_insert }, /* Latin capital letter u with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter u with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter u with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter u with diaeresis */ + { ISFUNC, rl_insert }, /* Latin capital letter Y with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */ + { ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */ + { ISFUNC, rl_insert }, /* Latin small letter a with grave */ + { ISFUNC, rl_insert }, /* Latin small letter a with acute */ + { ISFUNC, rl_insert }, /* Latin small letter a with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter a with tilde */ + { ISFUNC, rl_insert }, /* Latin small letter a with diaeresis */ + { ISFUNC, rl_insert }, /* Latin small letter a with ring above */ + { ISFUNC, rl_insert }, /* Latin small letter ae */ + { ISFUNC, rl_insert }, /* Latin small letter c with cedilla */ + { ISFUNC, rl_insert }, /* Latin small letter e with grave */ + { ISFUNC, rl_insert }, /* Latin small letter e with acute */ + { ISFUNC, rl_insert }, /* Latin small letter e with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter e with diaeresis */ + { ISFUNC, rl_insert }, /* Latin small letter i with grave */ + { ISFUNC, rl_insert }, /* Latin small letter i with acute */ + { ISFUNC, rl_insert }, /* Latin small letter i with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter i with diaeresis */ + { ISFUNC, rl_insert }, /* Latin small letter eth (Icelandic) */ + { ISFUNC, rl_insert }, /* Latin small letter n with tilde */ + { ISFUNC, rl_insert }, /* Latin small letter o with grave */ + { ISFUNC, rl_insert }, /* Latin small letter o with acute */ + { ISFUNC, rl_insert }, /* Latin small letter o with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter o with tilde */ + { ISFUNC, rl_insert }, /* Latin small letter o with diaeresis */ + { ISFUNC, rl_insert }, /* Division sign */ + { ISFUNC, rl_insert }, /* Latin small letter o with stroke */ + { ISFUNC, rl_insert }, /* Latin small letter u with grave */ + { ISFUNC, rl_insert }, /* Latin small letter u with acute */ + { ISFUNC, rl_insert }, /* Latin small letter u with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter u with diaeresis */ + { ISFUNC, rl_insert }, /* Latin small letter y with acute */ + { ISFUNC, rl_insert }, /* Latin small letter thorn (Icelandic) */ + { ISFUNC, rl_insert } /* Latin small letter y with diaeresis */ +#endif /* KEYMAP_SIZE > 128 */ +}; + +KEYMAP_ENTRY_ARRAY emacs_meta_keymap = { + + /* Meta keys. Just like above, but the high bit is set. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-f */ + { ISFUNC, rl_abort }, /* Meta-Control-g */ + { ISFUNC, rl_backward_kill_word }, /* Meta-Control-h */ + { ISFUNC, rl_tab_insert }, /* Meta-Control-i */ + { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-k */ + { ISFUNC, rl_clear_display }, /* Meta-Control-l */ + { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-q */ + { ISFUNC, rl_revert_line }, /* Meta-Control-r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-t */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-x */ + { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-z */ + + { ISFUNC, rl_complete }, /* Meta-Control-[ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-\ */ + { ISFUNC, rl_backward_char_search }, /* Meta-Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-^ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-_ */ + + /* The start of printing characters. */ + { ISFUNC, rl_set_mark }, /* Meta-SPACE */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-! */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-" */ + { ISFUNC, rl_insert_comment }, /* Meta-# */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-$ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-% */ + { ISFUNC, rl_tilde_expand }, /* Meta-& */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-' */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-( */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-) */ + { ISFUNC, rl_insert_completions }, /* Meta-* */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-+ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-, */ + { ISFUNC, rl_digit_argument }, /* Meta-- */ + { ISFUNC, rl_yank_last_arg}, /* Meta-. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-/ */ + + /* Regular digits. */ + { ISFUNC, rl_digit_argument }, /* Meta-0 */ + { ISFUNC, rl_digit_argument }, /* Meta-1 */ + { ISFUNC, rl_digit_argument }, /* Meta-2 */ + { ISFUNC, rl_digit_argument }, /* Meta-3 */ + { ISFUNC, rl_digit_argument }, /* Meta-4 */ + { ISFUNC, rl_digit_argument }, /* Meta-5 */ + { ISFUNC, rl_digit_argument }, /* Meta-6 */ + { ISFUNC, rl_digit_argument }, /* Meta-7 */ + { ISFUNC, rl_digit_argument }, /* Meta-8 */ + { ISFUNC, rl_digit_argument }, /* Meta-9 */ + + /* A little more punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-: */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-; */ + { ISFUNC, rl_beginning_of_history }, /* Meta-< */ + { ISFUNC, rl_possible_completions }, /* Meta-= */ + { ISFUNC, rl_end_of_history }, /* Meta-> */ + { ISFUNC, rl_possible_completions }, /* Meta-? */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-@ */ + + /* Uppercase alphabet. */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-A */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-B */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-C */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-D */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-E */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-F */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-G */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-H */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-I */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-J */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-K */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-L */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-M */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-N */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-O */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-P */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-Q */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-R */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-S */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-T */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-U */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-V */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-W */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-X */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-Y */ + { ISFUNC, rl_do_lowercase_version }, /* Meta-Z */ + + /* Some more punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-[ */ /* was rl_arrow_keys */ + { ISFUNC, rl_delete_horizontal_space }, /* Meta-\ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-^ */ + { ISFUNC, rl_yank_last_arg }, /* Meta-_ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-` */ + + /* Lowercase alphabet. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-a */ + { ISFUNC, rl_backward_word }, /* Meta-b */ + { ISFUNC, rl_capitalize_word }, /* Meta-c */ + { ISFUNC, rl_kill_word }, /* Meta-d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-e */ + { ISFUNC, rl_forward_word }, /* Meta-f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-i */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-k */ + { ISFUNC, rl_downcase_word }, /* Meta-l */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-m */ + { ISFUNC, rl_noninc_forward_search }, /* Meta-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-o */ /* was rl_arrow_keys */ + { ISFUNC, rl_noninc_reverse_search }, /* Meta-p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-q */ + { ISFUNC, rl_revert_line }, /* Meta-r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-s */ + { ISFUNC, rl_transpose_words }, /* Meta-t */ + { ISFUNC, rl_upcase_word }, /* Meta-u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-x */ + { ISFUNC, rl_yank_pop }, /* Meta-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-z */ + + /* Final punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-{ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-| */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-} */ + { ISFUNC, rl_tilde_expand }, /* Meta-~ */ + { ISFUNC, rl_backward_kill_word }, /* Meta-rubout */ + +#if KEYMAP_SIZE > 128 + /* Undefined keys. */ + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 } +#endif /* KEYMAP_SIZE > 128 */ +}; + +KEYMAP_ENTRY_ARRAY emacs_ctlx_keymap = { + + /* Control keys. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ + { ISFUNC, rl_abort }, /* Control-g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */ + { ISFUNC, rl_re_read_init_file }, /* Control-r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */ + { ISFUNC, rl_undo_command }, /* Control-u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */ + { ISFUNC, rl_exchange_point_and_mark }, /* Control-x */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-_ */ + + /* The start of printing characters. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* # */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* % */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* & */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ + { ISFUNC, rl_start_kbd_macro }, /* ( */ + { ISFUNC, rl_end_kbd_macro }, /* ) */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* * */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* + */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* , */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* - */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* . */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* / */ + + /* Regular digits. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 0 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 1 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 2 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 3 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 4 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 5 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 6 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 7 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 8 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 9 */ + + /* A little more punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* = */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ + + /* Uppercase alphabet. */ + { ISFUNC, rl_do_lowercase_version }, /* A */ + { ISFUNC, rl_do_lowercase_version }, /* B */ + { ISFUNC, rl_do_lowercase_version }, /* C */ + { ISFUNC, rl_do_lowercase_version }, /* D */ + { ISFUNC, rl_do_lowercase_version }, /* E */ + { ISFUNC, rl_do_lowercase_version }, /* F */ + { ISFUNC, rl_do_lowercase_version }, /* G */ + { ISFUNC, rl_do_lowercase_version }, /* H */ + { ISFUNC, rl_do_lowercase_version }, /* I */ + { ISFUNC, rl_do_lowercase_version }, /* J */ + { ISFUNC, rl_do_lowercase_version }, /* K */ + { ISFUNC, rl_do_lowercase_version }, /* L */ + { ISFUNC, rl_do_lowercase_version }, /* M */ + { ISFUNC, rl_do_lowercase_version }, /* N */ + { ISFUNC, rl_do_lowercase_version }, /* O */ + { ISFUNC, rl_do_lowercase_version }, /* P */ + { ISFUNC, rl_do_lowercase_version }, /* Q */ + { ISFUNC, rl_do_lowercase_version }, /* R */ + { ISFUNC, rl_do_lowercase_version }, /* S */ + { ISFUNC, rl_do_lowercase_version }, /* T */ + { ISFUNC, rl_do_lowercase_version }, /* U */ + { ISFUNC, rl_do_lowercase_version }, /* V */ + { ISFUNC, rl_do_lowercase_version }, /* W */ + { ISFUNC, rl_do_lowercase_version }, /* X */ + { ISFUNC, rl_do_lowercase_version }, /* Y */ + { ISFUNC, rl_do_lowercase_version }, /* Z */ + + /* Some more punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */ + + /* Lowercase alphabet. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* d */ + { ISFUNC, rl_call_last_kbd_macro }, /* e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* i */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* l */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* t */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* x */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ + + /* Final punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* | */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */ + { ISFUNC, rl_backward_kill_line }, /* RUBOUT */ + +#if KEYMAP_SIZE > 128 + /* Undefined keys. */ + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 } +#endif /* KEYMAP_SIZE > 128 */ +}; diff --git a/bash-5.1/lib/readline/examples/Inputrc b/bash-5.1/lib/readline/examples/Inputrc new file mode 100644 index 0000000000000000000000000000000000000000..a358bc476d7a75580efbf99326b59bb5bd0a015e --- /dev/null +++ b/bash-5.1/lib/readline/examples/Inputrc @@ -0,0 +1,81 @@ +# My ~/.inputrc file is in -*- text -*- for easy editing with Emacs. +# +# Notice the various bindings which are conditionalized depending +# on which program is running, or what terminal is active. +# + +# Copyright (C) 1989-2009 Free Software Foundation, Inc. +# +# 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 . +# + +# In all programs, all terminals, make sure this is bound. +"\C-x\C-r": re-read-init-file + +# Hp terminals (and some others) have ugly default behaviour for C-h. +"\C-h": backward-delete-char +"\e\C-h": backward-kill-word +"\C-xd": dump-functions + +# In xterm windows, make the arrow keys do the right thing. +$if TERM=xterm +"\e[A": previous-history +"\e[B": next-history +"\e[C": forward-char +"\e[D": backward-char + +# alternate arrow key prefix +"\eOA": previous-history +"\eOB": next-history +"\eOC": forward-char +"\eOD": backward-char + +# Under Xterm in Bash, we bind local Function keys to do something useful. +$if Bash +"\e[11~": "Function Key 1" +"\e[12~": "Function Key 2" +"\e[13~": "Function Key 3" +"\e[14~": "Function Key 4" +"\e[15~": "Function Key 5" + +# I know the following escape sequence numbers are 1 greater than +# the function key. Don't ask me why, I didn't design the xterm terminal. +"\e[17~": "Function Key 6" +"\e[18~": "Function Key 7" +"\e[19~": "Function Key 8" +"\e[20~": "Function Key 9" +"\e[21~": "Function Key 10" +$endif +$endif + +# For Bash, all terminals, add some Bash specific hacks. +$if Bash +"\C-xv": show-bash-version +"\C-x\C-e": shell-expand-line + +# Here is one for editing my path. +"\C-xp": "$PATH\C-x\C-e\C-e\"\C-aPATH=\":\C-b" + +# Make C-x r read my mail in emacs. +# "\C-xr": "emacs -f rmail\C-j" +$endif + +# For FTP, different hacks: +$if Ftp +"\C-xg": "get \M-?" +"\C-xt": "put \M-?" +"\M-.": yank-last-arg +$endif + +" ": self-insert diff --git a/bash-5.1/lib/readline/examples/Makefile b/bash-5.1/lib/readline/examples/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..2df2240710dcd4006baf40c564be428bb0a2a31b --- /dev/null +++ b/bash-5.1/lib/readline/examples/Makefile @@ -0,0 +1,44 @@ +# This is the Makefile for the examples subdirectory of readline. -*- text -*- +# +# Copyright (C) 1994 Free Software Foundation, Inc. + +# 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 . +# + +EXECUTABLES = fileman rltest rl +CFLAGS = -g -I../.. -I.. -DREADLINE_LIBRARY +LDFLAGS = -g -L.. + +.c.o: + $(CC) $(CFLAGS) -c $< + +all: $(EXECUTABLES) + + +rl: rl.o + $(CC) $(LDFLAGS) -o $@ rl.o -lreadline -ltermcap + +fileman: fileman.o + $(CC) $(LDFLAGS) -o $@ fileman.o -lreadline -ltermcap + +rltest: rltest.o + $(CC) $(LDFLAGS) -o $@ rltest.o -lreadline -ltermcap + +rlcat: rlcat.o + $(CC) $(LDFLAGS) -o $@ rlcat.o -lreadline -ltermcap + +fileman.o: fileman.c +rltest.o: rltest.c +rl.o: rl.c +rlcat.o: rlcat.c diff --git a/bash-5.1/lib/readline/examples/excallback.c b/bash-5.1/lib/readline/examples/excallback.c new file mode 100644 index 0000000000000000000000000000000000000000..4206acfca4a518c8081d1e5389e2fdcb1b51bb8c --- /dev/null +++ b/bash-5.1/lib/readline/examples/excallback.c @@ -0,0 +1,196 @@ +/* +From: Jeff Solomon +Date: Fri, 9 Apr 1999 10:13:27 -0700 (PDT) +To: chet@po.cwru.edu +Subject: new readline example +Message-ID: <14094.12094.527305.199695@mrclean.Stanford.EDU> + +Chet, + +I've been using readline 4.0. Specifically, I've been using the perl +version Term::ReadLine::Gnu. It works great. + +Anyway, I've been playing around the alternate interface and I wanted +to contribute a little C program, callback.c, to you that you could +use as an example of the alternate interface in the /examples +directory of the readline distribution. + +My example shows how, using the alternate interface, you can +interactively change the prompt (which is very nice imo). Also, I +point out that you must roll your own terminal setting when using the +alternate interface because readline depreps (using your parlance) the +terminal while in the user callback. I try to demostrate what I mean +with an example. I've included the program below. + +To compile, I just put the program in the examples directory and made +the appropriate changes to the EXECUTABLES and OBJECTS line and added +an additional target 'callback'. + +I compiled on my Sun Solaris2.6 box using Sun's cc. + +Let me know what you think. + +Jeff +*/ +/* +Copyright (C) 1999 Jeff Solomon +*/ + +#if defined (HAVE_CONFIG_H) +#include +#endif + +#include + +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +#include +#include /* xxx - should make this more general */ + +#ifdef READLINE_LIBRARY +# include "readline.h" +#else +# include +#endif + +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +#endif + +/* This little examples demonstrates the alternate interface to using readline. + * In the alternate interface, the user maintains control over program flow and + * only calls readline when STDIN is readable. Using the alternate interface, + * you can do anything else while still using readline (like talking to a + * network or another program) without blocking. + * + * Specifically, this program highlights two importants features of the + * alternate interface. The first is the ability to interactively change the + * prompt, which can't be done using the regular interface since rl_prompt is + * read-only. + * + * The second feature really highlights a subtle point when using the alternate + * interface. That is, readline will not alter the terminal when inside your + * callback handler. So let's so, your callback executes a user command that + * takes a non-trivial amount of time to complete (seconds). While your + * executing the command, the user continues to type keystrokes and expects them + * to be re-echoed on the new prompt when it returns. Unfortunately, the default + * terminal configuration doesn't do this. After the prompt returns, the user + * must hit one additional keystroke and then will see all of his previous + * keystrokes. To illustrate this, compile and run this program. Type "sleep" at + * the prompt and then type "bar" before the prompt returns (you have 3 + * seconds). Notice how "bar" is re-echoed on the prompt after the prompt + * returns? This is what you expect to happen. Now comment out the 4 lines below + * the line that says COMMENT LINE BELOW. Recompile and rerun the program and do + * the same thing. When the prompt returns, you should not see "bar". Now type + * "f", see how "barf" magically appears? This behavior is un-expected and not + * desired. + */ + +void process_line(char *line); +int change_prompt(void); +char *get_prompt(void); + +int prompt = 1; +char prompt_buf[40], line_buf[256]; +tcflag_t old_lflag; +cc_t old_vtime; +struct termios term; + +int +main() +{ + fd_set fds; + + /* Adjust the terminal slightly before the handler is installed. Disable + * canonical mode processing and set the input character time flag to be + * non-blocking. + */ + if( tcgetattr(STDIN_FILENO, &term) < 0 ) { + perror("tcgetattr"); + exit(1); + } + old_lflag = term.c_lflag; + old_vtime = term.c_cc[VTIME]; + term.c_lflag &= ~ICANON; + term.c_cc[VTIME] = 1; + /* COMMENT LINE BELOW - see above */ + if( tcsetattr(STDIN_FILENO, TCSANOW, &term) < 0 ) { + perror("tcsetattr"); + exit(1); + } + + rl_add_defun("change-prompt", change_prompt, CTRL('t')); + rl_callback_handler_install(get_prompt(), process_line); + + while(1) { + FD_ZERO(&fds); + FD_SET(fileno(stdin), &fds); + + if( select(FD_SETSIZE, &fds, NULL, NULL, NULL) < 0) { + perror("select"); + exit(1); + } + + if( FD_ISSET(fileno(stdin), &fds) ) { + rl_callback_read_char(); + } + } +} + +void +process_line(char *line) +{ + if( line == NULL ) { + fprintf(stderr, "\n", line); + + /* reset the old terminal setting before exiting */ + term.c_lflag = old_lflag; + term.c_cc[VTIME] = old_vtime; + if( tcsetattr(STDIN_FILENO, TCSANOW, &term) < 0 ) { + perror("tcsetattr"); + exit(1); + } + exit(0); + } + + if( strcmp(line, "sleep") == 0 ) { + sleep(3); + } else { + fprintf(stderr, "|%s|\n", line); + } + + free (line); +} + +int +change_prompt(void) +{ + /* toggle the prompt variable */ + prompt = !prompt; + + /* save away the current contents of the line */ + strcpy(line_buf, rl_line_buffer); + + /* install a new handler which will change the prompt and erase the current line */ + rl_callback_handler_install(get_prompt(), process_line); + + /* insert the old text on the new line */ + rl_insert_text(line_buf); + + /* redraw the current line - this is an undocumented function. It invokes the + * redraw-current-line command. + */ + rl_refresh_line(0, 0); +} + +char * +get_prompt(void) +{ + /* The prompts can even be different lengths! */ + sprintf(prompt_buf, "%s", + prompt ? "Hit ctrl-t to toggle prompt> " : "Pretty cool huh?> "); + return prompt_buf; +} diff --git a/bash-5.1/lib/readline/examples/fileman.c b/bash-5.1/lib/readline/examples/fileman.c new file mode 100644 index 0000000000000000000000000000000000000000..2a8b097ad146b74abce85369c906a6cf426280ac --- /dev/null +++ b/bash-5.1/lib/readline/examples/fileman.c @@ -0,0 +1,506 @@ +/* fileman.c - file manager example for readline library. */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library for + reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +/* fileman.c -- A tiny application which demonstrates how to use the + GNU Readline library. This application interactively allows users + to manipulate files and their modes. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#ifdef HAVE_SYS_FILE_H +# include +#endif +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include +#include + +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +#ifdef HAVE_STDLIB_H +# include +#endif + +#include + +#ifdef READLINE_LIBRARY +# include "readline.h" +# include "history.h" +#else +# include +# include +#endif + +extern char *xmalloc PARAMS((size_t)); + +void initialize_readline PARAMS((void)); +void too_dangerous PARAMS((char *)); + +int execute_line PARAMS((char *)); +int valid_argument PARAMS((char *, char *)); + +/* The names of functions that actually do the manipulation. */ +int com_list PARAMS((char *)); +int com_view PARAMS((char *)); +int com_rename PARAMS((char *)); +int com_stat PARAMS((char *)); +int com_pwd PARAMS((char *)); +int com_delete PARAMS((char *)); +int com_help PARAMS((char *)); +int com_cd PARAMS((char *)); +int com_quit PARAMS((char *)); + +/* A structure which contains information on the commands this program + can understand. */ + +typedef struct { + char *name; /* User printable name of the function. */ + rl_icpfunc_t *func; /* Function to call to do the job. */ + char *doc; /* Documentation for this function. */ +} COMMAND; + +COMMAND commands[] = { + { "cd", com_cd, "Change to directory DIR" }, + { "delete", com_delete, "Delete FILE" }, + { "help", com_help, "Display this text" }, + { "?", com_help, "Synonym for `help'" }, + { "list", com_list, "List files in DIR" }, + { "ls", com_list, "Synonym for `list'" }, + { "pwd", com_pwd, "Print the current working directory" }, + { "quit", com_quit, "Quit using Fileman" }, + { "rename", com_rename, "Rename FILE to NEWNAME" }, + { "stat", com_stat, "Print out statistics on FILE" }, + { "view", com_view, "View the contents of FILE" }, + { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } +}; + +/* Forward declarations. */ +char *stripwhite (); +COMMAND *find_command (); + +/* The name of this program, as taken from argv[0]. */ +char *progname; + +/* When non-zero, this global means the user is done using this program. */ +int done; + +char * +dupstr (s) + char *s; +{ + char *r; + + r = xmalloc (strlen (s) + 1); + strcpy (r, s); + return (r); +} + +int +main (argc, argv) + int argc; + char **argv; +{ + char *line, *s; + + progname = argv[0]; + + initialize_readline (); /* Bind our completer. */ + + /* Loop reading and executing lines until the user quits. */ + for ( ; done == 0; ) + { + line = readline ("FileMan: "); + + if (!line) + break; + + /* Remove leading and trailing whitespace from the line. + Then, if there is anything left, add it to the history list + and execute it. */ + s = stripwhite (line); + + if (*s) + { + add_history (s); + execute_line (s); + } + + free (line); + } + exit (0); +} + +/* Execute a command line. */ +int +execute_line (line) + char *line; +{ + register int i; + COMMAND *command; + char *word; + + /* Isolate the command word. */ + i = 0; + while (line[i] && whitespace (line[i])) + i++; + word = line + i; + + while (line[i] && !whitespace (line[i])) + i++; + + if (line[i]) + line[i++] = '\0'; + + command = find_command (word); + + if (!command) + { + fprintf (stderr, "%s: No such command for FileMan.\n", word); + return (-1); + } + + /* Get argument to command, if any. */ + while (whitespace (line[i])) + i++; + + word = line + i; + + /* Call the function. */ + return ((*(command->func)) (word)); +} + +/* Look up NAME as the name of a command, and return a pointer to that + command. Return a NULL pointer if NAME isn't a command name. */ +COMMAND * +find_command (name) + char *name; +{ + register int i; + + for (i = 0; commands[i].name; i++) + if (strcmp (name, commands[i].name) == 0) + return (&commands[i]); + + return ((COMMAND *)NULL); +} + +/* Strip whitespace from the start and end of STRING. Return a pointer + into STRING. */ +char * +stripwhite (string) + char *string; +{ + register char *s, *t; + + for (s = string; whitespace (*s); s++) + ; + + if (*s == 0) + return (s); + + t = s + strlen (s) - 1; + while (t > s && whitespace (*t)) + t--; + *++t = '\0'; + + return s; +} + +/* **************************************************************** */ +/* */ +/* Interface to Readline Completion */ +/* */ +/* **************************************************************** */ + +char *command_generator PARAMS((const char *, int)); +char **fileman_completion PARAMS((const char *, int, int)); + +/* Tell the GNU Readline library how to complete. We want to try to complete + on command names if this is the first word in the line, or on filenames + if not. */ +void +initialize_readline () +{ + /* Allow conditional parsing of the ~/.inputrc file. */ + rl_readline_name = "FileMan"; + + /* Tell the completer that we want a crack first. */ + rl_attempted_completion_function = fileman_completion; +} + +/* Attempt to complete on the contents of TEXT. START and END bound the + region of rl_line_buffer that contains the word to complete. TEXT is + the word to complete. We can use the entire contents of rl_line_buffer + in case we want to do some simple parsing. Return the array of matches, + or NULL if there aren't any. */ +char ** +fileman_completion (text, start, end) + const char *text; + int start, end; +{ + char **matches; + + matches = (char **)NULL; + + /* If this word is at the start of the line, then it is a command + to complete. Otherwise it is the name of a file in the current + directory. */ + if (start == 0) + matches = rl_completion_matches (text, command_generator); + + return (matches); +} + +/* Generator function for command completion. STATE lets us know whether + to start from scratch; without any state (i.e. STATE == 0), then we + start at the top of the list. */ +char * +command_generator (text, state) + const char *text; + int state; +{ + static int list_index, len; + char *name; + + /* If this is a new word to complete, initialize now. This includes + saving the length of TEXT for efficiency, and initializing the index + variable to 0. */ + if (!state) + { + list_index = 0; + len = strlen (text); + } + + /* Return the next name which partially matches from the command list. */ + while (name = commands[list_index].name) + { + list_index++; + + if (strncmp (name, text, len) == 0) + return (dupstr(name)); + } + + /* If no names matched, then return NULL. */ + return ((char *)NULL); +} + +/* **************************************************************** */ +/* */ +/* FileMan Commands */ +/* */ +/* **************************************************************** */ + +/* String to pass to system (). This is for the LIST, VIEW and RENAME + commands. */ +static char syscom[1024]; + +/* List the file(s) named in arg. */ +int +com_list (arg) + char *arg; +{ + if (!arg) + arg = ""; + + sprintf (syscom, "ls -FClg %s", arg); + return (system (syscom)); +} + +int +com_view (arg) + char *arg; +{ + if (!valid_argument ("view", arg)) + return 1; + +#if defined (__MSDOS__) + /* more.com doesn't grok slashes in pathnames */ + sprintf (syscom, "less %s", arg); +#else + sprintf (syscom, "more %s", arg); +#endif + return (system (syscom)); +} + +int +com_rename (arg) + char *arg; +{ + too_dangerous ("rename"); + return (1); +} + +int +com_stat (arg) + char *arg; +{ + struct stat finfo; + + if (!valid_argument ("stat", arg)) + return (1); + + if (stat (arg, &finfo) == -1) + { + perror (arg); + return (1); + } + + printf ("Statistics for `%s':\n", arg); + + printf ("%s has %d link%s, and is %lu byte%s in length.\n", + arg, + finfo.st_nlink, + (finfo.st_nlink == 1) ? "" : "s", + (unsigned long)finfo.st_size, + (finfo.st_size == 1) ? "" : "s"); + printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime)); + printf (" Last access at: %s", ctime (&finfo.st_atime)); + printf (" Last modified at: %s", ctime (&finfo.st_mtime)); + return (0); +} + +int +com_delete (arg) + char *arg; +{ + too_dangerous ("delete"); + return (1); +} + +/* Print out help for ARG, or for all of the commands if ARG is + not present. */ +int +com_help (arg) + char *arg; +{ + register int i; + int printed = 0; + + for (i = 0; commands[i].name; i++) + { + if (!*arg || (strcmp (arg, commands[i].name) == 0)) + { + printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc); + printed++; + } + } + + if (!printed) + { + printf ("No commands match `%s'. Possibilities are:\n", arg); + + for (i = 0; commands[i].name; i++) + { + /* Print in six columns. */ + if (printed == 6) + { + printed = 0; + printf ("\n"); + } + + printf ("%s\t", commands[i].name); + printed++; + } + + if (printed) + printf ("\n"); + } + return (0); +} + +/* Change to the directory ARG. */ +int +com_cd (arg) + char *arg; +{ + if (chdir (arg) == -1) + { + perror (arg); + return 1; + } + + com_pwd (""); + return (0); +} + +/* Print out the current working directory. */ +int +com_pwd (ignore) + char *ignore; +{ + char dir[1024], *s; + + s = getcwd (dir, sizeof(dir) - 1); + if (s == 0) + { + printf ("Error getting pwd: %s\n", dir); + return 1; + } + + printf ("Current directory is %s\n", dir); + return 0; +} + +/* The user wishes to quit using this program. Just set DONE non-zero. */ +int +com_quit (arg) + char *arg; +{ + done = 1; + return (0); +} + +/* Function which tells you that you can't do this. */ +void +too_dangerous (caller) + char *caller; +{ + fprintf (stderr, + "%s: Too dangerous for me to distribute. Write it yourself.\n", + caller); +} + +/* Return non-zero if ARG is a valid argument for CALLER, else print + an error message and return zero. */ +int +valid_argument (caller, arg) + char *caller, *arg; +{ + if (!arg || !*arg) + { + fprintf (stderr, "%s: Argument required.\n", caller); + return (0); + } + + return (1); +} diff --git a/bash-5.1/lib/readline/examples/histexamp.c b/bash-5.1/lib/readline/examples/histexamp.c new file mode 100644 index 0000000000000000000000000000000000000000..3b43674f79dd9142a7e4ae798a84fdecd7a684ac --- /dev/null +++ b/bash-5.1/lib/readline/examples/histexamp.c @@ -0,0 +1,125 @@ +/* histexamp.c - history library example program. */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library for + reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#include + +#ifdef READLINE_LIBRARY +# include "history.h" +#else +# include +#endif + +#include + +main (argc, argv) + int argc; + char **argv; +{ + char line[1024], *t; + int len, done; + + line[0] = 0; + done = 0; + + using_history (); + while (!done) + { + printf ("history$ "); + fflush (stdout); + t = fgets (line, sizeof (line) - 1, stdin); + if (t && *t) + { + len = strlen (t); + if (t[len - 1] == '\n') + t[len - 1] = '\0'; + } + + if (!t) + strcpy (line, "quit"); + + if (line[0]) + { + char *expansion; + int result; + + using_history (); + + result = history_expand (line, &expansion); + if (result) + fprintf (stderr, "%s\n", expansion); + + if (result < 0 || result == 2) + { + free (expansion); + continue; + } + + add_history (expansion); + strncpy (line, expansion, sizeof (line) - 1); + free (expansion); + } + + if (strcmp (line, "quit") == 0) + done = 1; + else if (strcmp (line, "save") == 0) + write_history ("history_file"); + else if (strcmp (line, "read") == 0) + read_history ("history_file"); + else if (strcmp (line, "list") == 0) + { + register HIST_ENTRY **the_list; + register int i; + time_t tt; + char timestr[128]; + + the_list = history_list (); + if (the_list) + for (i = 0; the_list[i]; i++) + { + tt = history_get_time (the_list[i]); + if (tt) + strftime (timestr, sizeof (timestr), "%a %R", localtime(&tt)); + else + strcpy (timestr, "??"); + printf ("%d: %s: %s\n", i + history_base, timestr, the_list[i]->line); + } + } + else if (strncmp (line, "delete", 6) == 0) + { + int which; + if ((sscanf (line + 6, "%d", &which)) == 1) + { + HIST_ENTRY *entry = remove_history (which); + if (!entry) + fprintf (stderr, "No such entry %d\n", which); + else + { + free (entry->line); + free (entry); + } + } + else + { + fprintf (stderr, "non-numeric arg given to `delete'\n"); + } + } + } +} diff --git a/bash-5.1/lib/readline/examples/manexamp.c b/bash-5.1/lib/readline/examples/manexamp.c new file mode 100644 index 0000000000000000000000000000000000000000..351c6285ed7ecc8bf65bcd574189da65264452b6 --- /dev/null +++ b/bash-5.1/lib/readline/examples/manexamp.c @@ -0,0 +1,111 @@ +/* manexamp.c -- The examples which appear in the documentation are here. */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library for + reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#include +#include + +/* **************************************************************** */ +/* */ +/* How to Emulate gets () */ +/* */ +/* **************************************************************** */ + +/* A static variable for holding the line. */ +static char *line_read = (char *)NULL; + +/* Read a string, and return a pointer to it. Returns NULL on EOF. */ +char * +rl_gets () +{ + /* If the buffer has already been allocated, return the memory + to the free pool. */ + if (line_read) + { + free (line_read); + line_read = (char *)NULL; + } + + /* Get a line from the user. */ + line_read = readline (""); + + /* If the line has any text in it, save it on the history. */ + if (line_read && *line_read) + add_history (line_read); + + return (line_read); +} + +/* **************************************************************** */ +/* */ +/* Writing a Function to be Called by Readline. */ +/* */ +/* **************************************************************** */ + +/* Invert the case of the COUNT following characters. */ +invert_case_line (count, key) + int count, key; +{ + register int start, end; + + start = rl_point; + + if (count < 0) + { + direction = -1; + count = -count; + } + else + direction = 1; + + /* Find the end of the range to modify. */ + end = start + (count * direction); + + /* Force it to be within range. */ + if (end > rl_end) + end = rl_end; + else if (end < 0) + end = -1; + + if (start > end) + { + int temp = start; + start = end; + end = temp; + } + + if (start == end) + return; + + /* Tell readline that we are modifying the line, so save the undo + information. */ + rl_modifying (start, end); + + for (; start != end; start += direction) + { + if (_rl_uppercase_p (rl_line_buffer[start])) + rl_line_buffer[start] = _rl_to_lower (rl_line_buffer[start]); + else if (_rl_lowercase_p (rl_line_buffer[start])) + rl_line_buffer[start] = _rl_to_upper (rl_line_buffer[start]); + } + + /* Move point to on top of the last character changed. */ + rl_point = end - direction; +} diff --git a/bash-5.1/lib/readline/examples/rl-callbacktest.c b/bash-5.1/lib/readline/examples/rl-callbacktest.c new file mode 100644 index 0000000000000000000000000000000000000000..0f00e57c564e6b98b58f920cde02333a25157d8c --- /dev/null +++ b/bash-5.1/lib/readline/examples/rl-callbacktest.c @@ -0,0 +1,90 @@ +/* Standard include files. stdio.h is required. */ +#include +#include +#include + +/* Used for select(2) */ +#include +#include + +#include +#include + +/* Standard readline include files. */ +#if defined (READLINE_LIBRARY) +# include "readline.h" +# include "history.h" +#else +# include +# include +#endif + +extern int errno; + +static void cb_linehandler (char *); + +int running; +const char *prompt = "rltest$ "; + +/* Callback function called for each line when accept-line executed, EOF + seen, or EOF character read. This sets a flag and returns; it could + also call exit(3). */ +static void +cb_linehandler (char *line) +{ + /* Can use ^D (stty eof) or `exit' to exit. */ + if (line == NULL || strcmp (line, "exit") == 0) + { + if (line == 0) + printf ("\n"); + printf ("exit\n"); + /* This function needs to be called to reset the terminal settings, + and calling it from the line handler keeps one extra prompt from + being displayed. */ + rl_callback_handler_remove (); + + running = 0; + } + else + { + if (*line) + add_history (line); + printf ("input line: %s\n", line); + free (line); + } +} + +int +main (int c, char **v) +{ + fd_set fds; + int r; + + /* Install the line handler. */ + rl_callback_handler_install (prompt, cb_linehandler); + + /* Enter a simple event loop. This waits until something is available + to read on readline's input stream (defaults to standard input) and + calls the builtin character read callback to read it. It does not + have to modify the user's terminal settings. */ + running = 1; + while (running) + { + FD_ZERO (&fds); + FD_SET (fileno (rl_instream), &fds); + + r = select (FD_SETSIZE, &fds, NULL, NULL, NULL); + if (r < 0 && errno != EINTR) + { + perror ("rltest: select"); + rl_callback_handler_remove (); + break; + } + + if (FD_ISSET (fileno (rl_instream), &fds)) + rl_callback_read_char (); + } + + printf ("rltest: Event loop has exited\n"); + return 0; +} diff --git a/bash-5.1/lib/readline/examples/rl.c b/bash-5.1/lib/readline/examples/rl.c new file mode 100644 index 0000000000000000000000000000000000000000..a5cf276cb943afcf88a12691c2d7c160dcb11262 --- /dev/null +++ b/bash-5.1/lib/readline/examples/rl.c @@ -0,0 +1,158 @@ +/* + * rl - command-line interface to read a line from the standard input + * (or another fd) using readline. + * + * usage: rl [-p prompt] [-u unit] [-d default] [-n nchars] + */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library for + reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include +#include + +#ifdef HAVE_STDLIB_H +# include +#else +extern void exit(); +#endif + +#if defined (READLINE_LIBRARY) +# include "posixstat.h" +# include "readline.h" +# include "history.h" +#else +# include +# include +# include +#endif + +extern int optind; +extern char *optarg; + +#if !defined (strchr) && !defined (__STDC__) +extern char *strrchr(); +#endif + +static char *progname; +static char *deftext; + +static int +set_deftext () +{ + if (deftext) + { + rl_insert_text (deftext); + deftext = (char *)NULL; + rl_startup_hook = (rl_hook_func_t *)NULL; + } + return 0; +} + +static void +usage() +{ + fprintf (stderr, "%s: usage: %s [-p prompt] [-u unit] [-d default] [-n nchars]\n", + progname, progname); +} + +int +main (argc, argv) + int argc; + char **argv; +{ + char *temp, *prompt; + struct stat sb; + int opt, fd, nch; + FILE *ifp; + + progname = strrchr(argv[0], '/'); + if (progname == 0) + progname = argv[0]; + else + progname++; + + /* defaults */ + prompt = "readline$ "; + fd = nch = 0; + deftext = (char *)0; + + while ((opt = getopt(argc, argv, "p:u:d:n:")) != EOF) + { + switch (opt) + { + case 'p': + prompt = optarg; + break; + case 'u': + fd = atoi(optarg); + if (fd < 0) + { + fprintf (stderr, "%s: bad file descriptor `%s'\n", progname, optarg); + exit (2); + } + break; + case 'd': + deftext = optarg; + break; + case 'n': + nch = atoi(optarg); + if (nch < 0) + { + fprintf (stderr, "%s: bad value for -n: `%s'\n", progname, optarg); + exit (2); + } + break; + default: + usage (); + exit (2); + } + } + + if (fd != 0) + { + if (fstat (fd, &sb) < 0) + { + fprintf (stderr, "%s: %d: bad file descriptor\n", progname, fd); + exit (1); + } + ifp = fdopen (fd, "r"); + rl_instream = ifp; + } + + if (deftext && *deftext) + rl_startup_hook = set_deftext; + + if (nch > 0) + rl_num_chars_to_read = nch; + + temp = readline (prompt); + + /* Test for EOF. */ + if (temp == 0) + exit (1); + + printf ("%s\n", temp); + exit (0); +} diff --git a/bash-5.1/lib/readline/examples/rlcat.c b/bash-5.1/lib/readline/examples/rlcat.c new file mode 100644 index 0000000000000000000000000000000000000000..b4942413f8bebb6d08b83e035ce7dde3a9c52bf7 --- /dev/null +++ b/bash-5.1/lib/readline/examples/rlcat.c @@ -0,0 +1,179 @@ +/* + * rlcat - cat(1) using readline + * + * usage: rlcat + */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library for + reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include "posixstat.h" + +#include +#include +#include +#include + +#ifdef HAVE_STDLIB_H +# include +#else +extern void exit(); +#endif + +#ifndef errno +extern int errno; +#endif + +#if defined (READLINE_LIBRARY) +# include "readline.h" +# include "history.h" +#else +# include +# include +#endif + +extern int optind; +extern char *optarg; + +static int stdcat(); + +static char *progname; +static int vflag; + +static void +usage() +{ + fprintf (stderr, "%s: usage: %s [-vEVN] [filename]\n", progname, progname); +} + +int +main (argc, argv) + int argc; + char **argv; +{ + char *temp; + int opt, Vflag, Nflag; + + progname = strrchr(argv[0], '/'); + if (progname == 0) + progname = argv[0]; + else + progname++; + + vflag = Vflag = Nflag = 0; + while ((opt = getopt(argc, argv, "vEVN")) != EOF) + { + switch (opt) + { + case 'v': + vflag = 1; + break; + case 'V': + Vflag = 1; + break; + case 'E': + Vflag = 0; + break; + case 'N': + Nflag = 1; + break; + default: + usage (); + exit (2); + } + } + + argc -= optind; + argv += optind; + + if (isatty(0) == 0 || argc || Nflag) + return stdcat(argc, argv); + + rl_variable_bind ("editing-mode", Vflag ? "vi" : "emacs"); + while (temp = readline ("")) + { + if (*temp) + add_history (temp); + printf ("%s\n", temp); + } + + return (ferror (stdout)); +} + +static int +fcopy(fp) + FILE *fp; +{ + int c; + char *x; + + while ((c = getc(fp)) != EOF) + { + if (vflag && isascii ((unsigned char)c) && isprint((unsigned char)c) == 0) + { + x = rl_untranslate_keyseq (c); + if (fputs (x, stdout) == EOF) + return 1; + } + else if (putchar (c) == EOF) + return 1; + } + return (ferror (stdout)); +} + +int +stdcat (argc, argv) + int argc; + char **argv; +{ + int i, fd, r; + char *s; + FILE *fp; + + if (argc == 0) + return (fcopy(stdin)); + + for (i = 0, r = 1; i < argc; i++) + { + if (*argv[i] == '-' && argv[i][1] == 0) + fp = stdin; + else + { + fp = fopen (argv[i], "r"); + if (fp == 0) + { + fprintf (stderr, "%s: %s: cannot open: %s\n", progname, argv[i], strerror(errno)); + continue; + } + } + r = fcopy (fp); + if (fp != stdin) + fclose(fp); + } + return r; +} diff --git a/bash-5.1/lib/readline/examples/rltest.c b/bash-5.1/lib/readline/examples/rltest.c new file mode 100644 index 0000000000000000000000000000000000000000..65abe87cc044d39175d58408d60ad27674c3e8be --- /dev/null +++ b/bash-5.1/lib/readline/examples/rltest.c @@ -0,0 +1,93 @@ +/* **************************************************************** */ +/* */ +/* Testing Readline */ +/* */ +/* **************************************************************** */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library for + reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +#include +#endif + +#include +#include + +#ifdef HAVE_STDLIB_H +# include +#else +extern void exit(); +#endif + +#ifdef READLINE_LIBRARY +# include "readline.h" +# include "history.h" +#else +# include +# include +#endif + +extern HIST_ENTRY **history_list (); + +int +main () +{ + char *temp, *prompt; + int done; + + temp = (char *)NULL; + prompt = "readline$ "; + done = 0; + + while (!done) + { + temp = readline (prompt); + + /* Test for EOF. */ + if (!temp) + exit (1); + + /* If there is anything on the line, print it and remember it. */ + if (*temp) + { + fprintf (stderr, "%s\r\n", temp); + add_history (temp); + } + + /* Check for `command' that we handle. */ + if (strcmp (temp, "quit") == 0) + done = 1; + + if (strcmp (temp, "list") == 0) + { + HIST_ENTRY **list; + register int i; + + list = history_list (); + if (list) + { + for (i = 0; list[i]; i++) + fprintf (stderr, "%d: %s\r\n", i, list[i]->line); + } + } + free (temp); + } + exit (0); +} diff --git a/bash-5.1/lib/readline/funmap.c b/bash-5.1/lib/readline/funmap.c new file mode 100644 index 0000000000000000000000000000000000000000..eca49a3e4f61c0e57289d10352219830c59214ba --- /dev/null +++ b/bash-5.1/lib/readline/funmap.c @@ -0,0 +1,271 @@ +/* funmap.c -- attach names to functions. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if !defined (BUFSIZ) +#include +#endif /* BUFSIZ */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "rlconf.h" +#include "readline.h" + +#include "xmalloc.h" + +#ifdef __STDC__ +typedef int QSFUNC (const void *, const void *); +#else +typedef int QSFUNC (); +#endif + +extern int _rl_qsort_string_compare PARAMS((char **, char **)); + +FUNMAP **funmap; +static int funmap_size; +static int funmap_entry; + +/* After initializing the function map, this is the index of the first + program specific function. */ +int funmap_program_specific_entry_start; + +static const FUNMAP default_funmap[] = { + { "abort", rl_abort }, + { "accept-line", rl_newline }, + { "arrow-key-prefix", rl_arrow_keys }, + { "backward-byte", rl_backward_byte }, + { "backward-char", rl_backward_char }, + { "backward-delete-char", rl_rubout }, + { "backward-kill-line", rl_backward_kill_line }, + { "backward-kill-word", rl_backward_kill_word }, + { "backward-word", rl_backward_word }, + { "beginning-of-history", rl_beginning_of_history }, + { "beginning-of-line", rl_beg_of_line }, + { "bracketed-paste-begin", rl_bracketed_paste_begin }, + { "call-last-kbd-macro", rl_call_last_kbd_macro }, + { "capitalize-word", rl_capitalize_word }, + { "character-search", rl_char_search }, + { "character-search-backward", rl_backward_char_search }, + { "clear-display", rl_clear_display }, + { "clear-screen", rl_clear_screen }, + { "complete", rl_complete }, + { "copy-backward-word", rl_copy_backward_word }, + { "copy-forward-word", rl_copy_forward_word }, + { "copy-region-as-kill", rl_copy_region_to_kill }, + { "delete-char", rl_delete }, + { "delete-char-or-list", rl_delete_or_show_completions }, + { "delete-horizontal-space", rl_delete_horizontal_space }, + { "digit-argument", rl_digit_argument }, + { "do-lowercase-version", rl_do_lowercase_version }, + { "downcase-word", rl_downcase_word }, + { "dump-functions", rl_dump_functions }, + { "dump-macros", rl_dump_macros }, + { "dump-variables", rl_dump_variables }, + { "emacs-editing-mode", rl_emacs_editing_mode }, + { "end-kbd-macro", rl_end_kbd_macro }, + { "end-of-history", rl_end_of_history }, + { "end-of-line", rl_end_of_line }, + { "exchange-point-and-mark", rl_exchange_point_and_mark }, + { "forward-backward-delete-char", rl_rubout_or_delete }, + { "forward-byte", rl_forward_byte }, + { "forward-char", rl_forward_char }, + { "forward-search-history", rl_forward_search_history }, + { "forward-word", rl_forward_word }, + { "history-search-backward", rl_history_search_backward }, + { "history-search-forward", rl_history_search_forward }, + { "history-substring-search-backward", rl_history_substr_search_backward }, + { "history-substring-search-forward", rl_history_substr_search_forward }, + { "insert-comment", rl_insert_comment }, + { "insert-completions", rl_insert_completions }, + { "kill-whole-line", rl_kill_full_line }, + { "kill-line", rl_kill_line }, + { "kill-region", rl_kill_region }, + { "kill-word", rl_kill_word }, + { "menu-complete", rl_menu_complete }, + { "menu-complete-backward", rl_backward_menu_complete }, + { "next-history", rl_get_next_history }, + { "next-screen-line", rl_next_screen_line }, + { "non-incremental-forward-search-history", rl_noninc_forward_search }, + { "non-incremental-reverse-search-history", rl_noninc_reverse_search }, + { "non-incremental-forward-search-history-again", rl_noninc_forward_search_again }, + { "non-incremental-reverse-search-history-again", rl_noninc_reverse_search_again }, + { "old-menu-complete", rl_old_menu_complete }, + { "operate-and-get-next", rl_operate_and_get_next }, + { "overwrite-mode", rl_overwrite_mode }, +#if defined (_WIN32) + { "paste-from-clipboard", rl_paste_from_clipboard }, +#endif + { "possible-completions", rl_possible_completions }, + { "previous-history", rl_get_previous_history }, + { "previous-screen-line", rl_previous_screen_line }, + { "print-last-kbd-macro", rl_print_last_kbd_macro }, + { "quoted-insert", rl_quoted_insert }, + { "re-read-init-file", rl_re_read_init_file }, + { "redraw-current-line", rl_refresh_line}, + { "reverse-search-history", rl_reverse_search_history }, + { "revert-line", rl_revert_line }, + { "self-insert", rl_insert }, + { "set-mark", rl_set_mark }, + { "skip-csi-sequence", rl_skip_csi_sequence }, + { "start-kbd-macro", rl_start_kbd_macro }, + { "tab-insert", rl_tab_insert }, + { "tilde-expand", rl_tilde_expand }, + { "transpose-chars", rl_transpose_chars }, + { "transpose-words", rl_transpose_words }, + { "tty-status", rl_tty_status }, + { "undo", rl_undo_command }, + { "universal-argument", rl_universal_argument }, + { "unix-filename-rubout", rl_unix_filename_rubout }, + { "unix-line-discard", rl_unix_line_discard }, + { "unix-word-rubout", rl_unix_word_rubout }, + { "upcase-word", rl_upcase_word }, + { "yank", rl_yank }, + { "yank-last-arg", rl_yank_last_arg }, + { "yank-nth-arg", rl_yank_nth_arg }, + { "yank-pop", rl_yank_pop }, + +#if defined (VI_MODE) + { "vi-append-eol", rl_vi_append_eol }, + { "vi-append-mode", rl_vi_append_mode }, + { "vi-arg-digit", rl_vi_arg_digit }, + { "vi-back-to-indent", rl_vi_back_to_indent }, + { "vi-backward-bigword", rl_vi_bWord }, + { "vi-backward-word", rl_vi_bword }, + { "vi-bWord", rl_vi_bWord }, + { "vi-bword", rl_vi_bword }, /* BEWARE: name matching is case insensitive */ + { "vi-change-case", rl_vi_change_case }, + { "vi-change-char", rl_vi_change_char }, + { "vi-change-to", rl_vi_change_to }, + { "vi-char-search", rl_vi_char_search }, + { "vi-column", rl_vi_column }, + { "vi-complete", rl_vi_complete }, + { "vi-delete", rl_vi_delete }, + { "vi-delete-to", rl_vi_delete_to }, + { "vi-eWord", rl_vi_eWord }, + { "vi-editing-mode", rl_vi_editing_mode }, + { "vi-end-bigword", rl_vi_eWord }, + { "vi-end-word", rl_vi_end_word }, + { "vi-eof-maybe", rl_vi_eof_maybe }, + { "vi-eword", rl_vi_eword }, /* BEWARE: name matching is case insensitive */ + { "vi-fWord", rl_vi_fWord }, + { "vi-fetch-history", rl_vi_fetch_history }, + { "vi-first-print", rl_vi_first_print }, + { "vi-forward-bigword", rl_vi_fWord }, + { "vi-forward-word", rl_vi_fword }, + { "vi-fword", rl_vi_fword }, /* BEWARE: name matching is case insensitive */ + { "vi-goto-mark", rl_vi_goto_mark }, + { "vi-insert-beg", rl_vi_insert_beg }, + { "vi-insertion-mode", rl_vi_insert_mode }, + { "vi-match", rl_vi_match }, + { "vi-movement-mode", rl_vi_movement_mode }, + { "vi-next-word", rl_vi_next_word }, + { "vi-overstrike", rl_vi_overstrike }, + { "vi-overstrike-delete", rl_vi_overstrike_delete }, + { "vi-prev-word", rl_vi_prev_word }, + { "vi-put", rl_vi_put }, + { "vi-redo", rl_vi_redo }, + { "vi-replace", rl_vi_replace }, + { "vi-rubout", rl_vi_rubout }, + { "vi-search", rl_vi_search }, + { "vi-search-again", rl_vi_search_again }, + { "vi-set-mark", rl_vi_set_mark }, + { "vi-subst", rl_vi_subst }, + { "vi-tilde-expand", rl_vi_tilde_expand }, + { "vi-unix-word-rubout", rl_vi_unix_word_rubout }, + { "vi-yank-arg", rl_vi_yank_arg }, + { "vi-yank-pop", rl_vi_yank_pop }, + { "vi-yank-to", rl_vi_yank_to }, +#endif /* VI_MODE */ + + {(char *)NULL, (rl_command_func_t *)NULL } +}; + +int +rl_add_funmap_entry (const char *name, rl_command_func_t *function) +{ + if (funmap_entry + 2 >= funmap_size) + { + funmap_size += 64; + funmap = (FUNMAP **)xrealloc (funmap, funmap_size * sizeof (FUNMAP *)); + } + + funmap[funmap_entry] = (FUNMAP *)xmalloc (sizeof (FUNMAP)); + funmap[funmap_entry]->name = name; + funmap[funmap_entry]->function = function; + + funmap[++funmap_entry] = (FUNMAP *)NULL; + return funmap_entry; +} + +static int funmap_initialized; + +/* Make the funmap contain all of the default entries. */ +void +rl_initialize_funmap (void) +{ + register int i; + + if (funmap_initialized) + return; + + for (i = 0; default_funmap[i].name; i++) + rl_add_funmap_entry (default_funmap[i].name, default_funmap[i].function); + + funmap_initialized = 1; + funmap_program_specific_entry_start = i; +} + +/* Produce a NULL terminated array of known function names. The array + is sorted. The array itself is allocated, but not the strings inside. + You should free () the array when you done, but not the pointers. */ +const char ** +rl_funmap_names (void) +{ + const char **result; + int result_size, result_index; + + /* Make sure that the function map has been initialized. */ + rl_initialize_funmap (); + + for (result_index = result_size = 0, result = (const char **)NULL; funmap[result_index]; result_index++) + { + if (result_index + 2 > result_size) + { + result_size += 20; + result = (const char **)xrealloc (result, result_size * sizeof (char *)); + } + + result[result_index] = funmap[result_index]->name; + result[result_index + 1] = (char *)NULL; + } + + qsort (result, result_index, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); + return (result); +} diff --git a/bash-5.1/lib/readline/histexpand.c b/bash-5.1/lib/readline/histexpand.c new file mode 100644 index 0000000000000000000000000000000000000000..b986dba0513f4cf4e28c167953df53f3ae5fa505 --- /dev/null +++ b/bash-5.1/lib/readline/histexpand.c @@ -0,0 +1,1695 @@ +/* histexpand.c -- history expansion. */ + +/* Copyright (C) 1989-2018 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. + + History 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. + + History 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 History. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_UNISTD_H) +# ifndef _MINIX +# include +# endif +# include +#endif + +#include "rlmbutil.h" + +#include "history.h" +#include "histlib.h" +#include "chardefs.h" + +#include "rlshell.h" +#include "xmalloc.h" + +#define HISTORY_WORD_DELIMITERS " \t\n;&()|<>" +#define HISTORY_QUOTE_CHARACTERS "\"'`" +#define HISTORY_EVENT_DELIMITERS "^$*%-" + +#define slashify_in_quotes "\\`\"$" + +#define fielddelim(c) (whitespace(c) || (c) == '\n') + +typedef int _hist_search_func_t PARAMS((const char *, int)); + +static char error_pointer; + +static char *subst_lhs; +static char *subst_rhs; +static int subst_lhs_len; +static int subst_rhs_len; + +/* Characters that delimit history event specifications and separate event + specifications from word designators. Static for now */ +static char *history_event_delimiter_chars = HISTORY_EVENT_DELIMITERS; + +static char *get_history_word_specifier PARAMS((char *, char *, int *)); +static int history_tokenize_word PARAMS((const char *, int)); +static char **history_tokenize_internal PARAMS((const char *, int, int *)); +static char *history_substring PARAMS((const char *, int, int)); +static void freewords PARAMS((char **, int)); +static char *history_find_word PARAMS((char *, int)); + +static char *quote_breaks PARAMS((char *)); + +/* Variables exported by this file. */ +/* The character that represents the start of a history expansion + request. This is usually `!'. */ +char history_expansion_char = '!'; + +/* The character that invokes word substitution if found at the start of + a line. This is usually `^'. */ +char history_subst_char = '^'; + +/* During tokenization, if this character is seen as the first character + of a word, then it, and all subsequent characters up to a newline are + ignored. For a Bourne shell, this should be '#'. Bash special cases + the interactive comment character to not be a comment delimiter. */ +char history_comment_char = '\0'; + +/* The list of characters which inhibit the expansion of text if found + immediately following history_expansion_char. */ +char *history_no_expand_chars = " \t\n\r="; + +/* If set to a non-zero value, single quotes inhibit history expansion. + The default is 0. */ +int history_quotes_inhibit_expansion = 0; + +/* Used to split words by history_tokenize_internal. */ +char *history_word_delimiters = HISTORY_WORD_DELIMITERS; + +/* If set, this points to a function that is called to verify that a + particular history expansion should be performed. */ +rl_linebuf_func_t *history_inhibit_expansion_function; + +int history_quoting_state = 0; + +/* **************************************************************** */ +/* */ +/* History Expansion */ +/* */ +/* **************************************************************** */ + +/* Hairy history expansion on text, not tokens. This is of general + use, and thus belongs in this library. */ + +/* The last string searched for by a !?string? search. */ +static char *search_string; +/* The last string matched by a !?string? search. */ +static char *search_match; + +/* Return the event specified at TEXT + OFFSET modifying OFFSET to + point to after the event specifier. Just a pointer to the history + line is returned; NULL is returned in the event of a bad specifier. + You pass STRING with *INDEX equal to the history_expansion_char that + begins this specification. + DELIMITING_QUOTE is a character that is allowed to end the string + specification for what to search for in addition to the normal + characters `:', ` ', `\t', `\n', and sometimes `?'. + So you might call this function like: + line = get_history_event ("!echo:p", &index, 0); */ +char * +get_history_event (const char *string, int *caller_index, int delimiting_quote) +{ + register int i; + register char c; + HIST_ENTRY *entry; + int which, sign, local_index, substring_okay; + _hist_search_func_t *search_func; + char *temp; + + /* The event can be specified in a number of ways. + + !! the previous command + !n command line N + !-n current command-line minus N + !str the most recent command starting with STR + !?str[?] + the most recent command containing STR + + All values N are determined via HISTORY_BASE. */ + + i = *caller_index; + + if (string[i] != history_expansion_char) + return ((char *)NULL); + + /* Move on to the specification. */ + i++; + + sign = 1; + substring_okay = 0; + +#define RETURN_ENTRY(e, w) \ + return ((e = history_get (w)) ? e->line : (char *)NULL) + + /* Handle !! case. */ + if (string[i] == history_expansion_char) + { + i++; + which = history_base + (history_length - 1); + *caller_index = i; + RETURN_ENTRY (entry, which); + } + + /* Hack case of numeric line specification. */ + if (string[i] == '-' && _rl_digit_p (string[i+1])) + { + sign = -1; + i++; + } + + if (_rl_digit_p (string[i])) + { + /* Get the extent of the digits and compute the value. */ + for (which = 0; _rl_digit_p (string[i]); i++) + which = (which * 10) + _rl_digit_value (string[i]); + + *caller_index = i; + + if (sign < 0) + which = (history_length + history_base) - which; + + RETURN_ENTRY (entry, which); + } + + /* This must be something to search for. If the spec begins with + a '?', then the string may be anywhere on the line. Otherwise, + the string must be found at the start of a line. */ + if (string[i] == '?') + { + substring_okay++; + i++; + } + + /* Only a closing `?' or a newline delimit a substring search string. */ + for (local_index = i; c = string[i]; i++) + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int v; + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); + /* These produce warnings because we're passing a const string to a + function that takes a non-const string. */ + _rl_adjust_point ((char *)string, i, &ps); + if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1) + { + i += v - 1; + continue; + } + } + +#endif /* HANDLE_MULTIBYTE */ + if ((!substring_okay && + (whitespace (c) || c == ':' || + (i > local_index && history_event_delimiter_chars && c == '-') || + (c != '-' && history_event_delimiter_chars && member (c, history_event_delimiter_chars)) || + (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) || + string[i] == delimiting_quote)) || + string[i] == '\n' || + (substring_okay && string[i] == '?')) + break; + } + + which = i - local_index; + temp = (char *)xmalloc (1 + which); + if (which) + strncpy (temp, string + local_index, which); + temp[which] = '\0'; + + if (substring_okay && string[i] == '?') + i++; + + *caller_index = i; + +#define FAIL_SEARCH() \ + do { \ + history_offset = history_length; xfree (temp) ; return (char *)NULL; \ + } while (0) + + /* If there is no search string, try to use the previous search string, + if one exists. If not, fail immediately. */ + if (*temp == '\0' && substring_okay) + { + if (search_string) + { + xfree (temp); + temp = savestring (search_string); + } + else + FAIL_SEARCH (); + } + + search_func = substring_okay ? history_search : history_search_prefix; + while (1) + { + local_index = (*search_func) (temp, -1); + + if (local_index < 0) + FAIL_SEARCH (); + + if (local_index == 0 || substring_okay) + { + entry = current_history (); + if (entry == 0) + FAIL_SEARCH (); + history_offset = history_length; + + /* If this was a substring search, then remember the + string that we matched for word substitution. */ + if (substring_okay) + { + FREE (search_string); + search_string = temp; + + FREE (search_match); + search_match = history_find_word (entry->line, local_index); + } + else + xfree (temp); + + return (entry->line); + } + + if (history_offset) + history_offset--; + else + FAIL_SEARCH (); + } +#undef FAIL_SEARCH +#undef RETURN_ENTRY +} + +/* Function for extracting single-quoted strings. Used for inhibiting + history expansion within single quotes. */ + +/* Extract the contents of STRING as if it is enclosed in single quotes. + SINDEX, when passed in, is the offset of the character immediately + following the opening single quote; on exit, SINDEX is left pointing + to the closing single quote. FLAGS currently used to allow backslash + to escape a single quote (e.g., for bash $'...'). */ +static void +hist_string_extract_single_quoted (char *string, int *sindex, int flags) +{ + register int i; + + for (i = *sindex; string[i] && string[i] != '\''; i++) + { + if ((flags & 1) && string[i] == '\\' && string[i+1]) + i++; + } + + *sindex = i; +} + +static char * +quote_breaks (char *s) +{ + register char *p, *r; + char *ret; + int len = 3; + + for (p = s; p && *p; p++, len++) + { + if (*p == '\'') + len += 3; + else if (whitespace (*p) || *p == '\n') + len += 2; + } + + r = ret = (char *)xmalloc (len); + *r++ = '\''; + for (p = s; p && *p; ) + { + if (*p == '\'') + { + *r++ = '\''; + *r++ = '\\'; + *r++ = '\''; + *r++ = '\''; + p++; + } + else if (whitespace (*p) || *p == '\n') + { + *r++ = '\''; + *r++ = *p++; + *r++ = '\''; + } + else + *r++ = *p++; + } + *r++ = '\''; + *r = '\0'; + return ret; +} + +static char * +hist_error(char *s, int start, int current, int errtype) +{ + char *temp; + const char *emsg; + int ll, elen; + + ll = current - start; + + switch (errtype) + { + case EVENT_NOT_FOUND: + emsg = "event not found"; + elen = 15; + break; + case BAD_WORD_SPEC: + emsg = "bad word specifier"; + elen = 18; + break; + case SUBST_FAILED: + emsg = "substitution failed"; + elen = 19; + break; + case BAD_MODIFIER: + emsg = "unrecognized history modifier"; + elen = 29; + break; + case NO_PREV_SUBST: + emsg = "no previous substitution"; + elen = 24; + break; + default: + emsg = "unknown expansion error"; + elen = 23; + break; + } + + temp = (char *)xmalloc (ll + elen + 3); + if (s[start]) + strncpy (temp, s + start, ll); + else + ll = 0; + temp[ll] = ':'; + temp[ll + 1] = ' '; + strcpy (temp + ll + 2, emsg); + return (temp); +} + +/* Get a history substitution string from STR starting at *IPTR + and return it. The length is returned in LENPTR. + + A backslash can quote the delimiter. If the string is the + empty string, the previous pattern is used. If there is + no previous pattern for the lhs, the last history search + string is used. + + If IS_RHS is 1, we ignore empty strings and set the pattern + to "" anyway. subst_lhs is not changed if the lhs is empty; + subst_rhs is allowed to be set to the empty string. */ + +static char * +get_subst_pattern (char *str, int *iptr, int delimiter, int is_rhs, int *lenptr) +{ + register int si, i, j, k; + char *s; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; +#endif + + s = (char *)NULL; + i = *iptr; + +#if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); + _rl_adjust_point (str, i, &ps); +#endif + + for (si = i; str[si] && str[si] != delimiter; si++) +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int v; + if ((v = _rl_get_char_len (str + si, &ps)) > 1) + si += v - 1; + else if (str[si] == '\\' && str[si + 1] == delimiter) + si++; + } + else +#endif /* HANDLE_MULTIBYTE */ + if (str[si] == '\\' && str[si + 1] == delimiter) + si++; + + if (si > i || is_rhs) + { + s = (char *)xmalloc (si - i + 1); + for (j = 0, k = i; k < si; j++, k++) + { + /* Remove a backslash quoting the search string delimiter. */ + if (str[k] == '\\' && str[k + 1] == delimiter) + k++; + s[j] = str[k]; + } + s[j] = '\0'; + if (lenptr) + *lenptr = j; + } + + i = si; + if (str[i]) + i++; + *iptr = i; + + return s; +} + +static void +postproc_subst_rhs (void) +{ + char *new; + int i, j, new_size; + + new = (char *)xmalloc (new_size = subst_rhs_len + subst_lhs_len); + for (i = j = 0; i < subst_rhs_len; i++) + { + if (subst_rhs[i] == '&') + { + if (j + subst_lhs_len >= new_size) + new = (char *)xrealloc (new, (new_size = new_size * 2 + subst_lhs_len)); + strcpy (new + j, subst_lhs); + j += subst_lhs_len; + } + else + { + /* a single backslash protects the `&' from lhs interpolation */ + if (subst_rhs[i] == '\\' && subst_rhs[i + 1] == '&') + i++; + if (j >= new_size) + new = (char *)xrealloc (new, new_size *= 2); + new[j++] = subst_rhs[i]; + } + } + new[j] = '\0'; + xfree (subst_rhs); + subst_rhs = new; + subst_rhs_len = j; +} + +/* Expand the bulk of a history specifier starting at STRING[START]. + Returns 0 if everything is OK, -1 if an error occurred, and 1 + if the `p' modifier was supplied and the caller should just print + the returned string. Returns the new index into string in + *END_INDEX_PTR, and the expanded specifier in *RET_STRING. */ +/* need current line for !# */ +static int +history_expand_internal (char *string, int start, int qc, int *end_index_ptr, char **ret_string, char *current_line) +{ + int i, n, starting_index; + int substitute_globally, subst_bywords, want_quotes, print_only; + char *event, *temp, *result, *tstr, *t, c, *word_spec; + int result_len; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); +#endif + + result = (char *)xmalloc (result_len = 128); + + i = start; + + /* If it is followed by something that starts a word specifier, + then !! is implied as the event specifier. */ + + if (member (string[i + 1], ":$*%^")) + { + char fake_s[3]; + int fake_i = 0; + i++; + fake_s[0] = fake_s[1] = history_expansion_char; + fake_s[2] = '\0'; + event = get_history_event (fake_s, &fake_i, 0); + } + else if (string[i + 1] == '#') + { + i += 2; + event = current_line; + } + else + event = get_history_event (string, &i, qc); + + if (event == 0) + { + *ret_string = hist_error (string, start, i, EVENT_NOT_FOUND); + xfree (result); + return (-1); + } + + /* If a word specifier is found, then do what that requires. */ + starting_index = i; + word_spec = get_history_word_specifier (string, event, &i); + + /* There is no such thing as a `malformed word specifier'. However, + it is possible for a specifier that has no match. In that case, + we complain. */ + if (word_spec == (char *)&error_pointer) + { + *ret_string = hist_error (string, starting_index, i, BAD_WORD_SPEC); + xfree (result); + return (-1); + } + + /* If no word specifier, than the thing of interest was the event. */ + temp = word_spec ? savestring (word_spec) : savestring (event); + FREE (word_spec); + + /* Perhaps there are other modifiers involved. Do what they say. */ + want_quotes = substitute_globally = subst_bywords = print_only = 0; + starting_index = i; + + while (string[i] == ':') + { + c = string[i + 1]; + + if (c == 'g' || c == 'a') + { + substitute_globally = 1; + i++; + c = string[i + 1]; + } + else if (c == 'G') + { + subst_bywords = 1; + i++; + c = string[i + 1]; + } + + switch (c) + { + default: + *ret_string = hist_error (string, i+1, i+2, BAD_MODIFIER); + xfree (result); + xfree (temp); + return -1; + + case 'q': + want_quotes = 'q'; + break; + + case 'x': + want_quotes = 'x'; + break; + + /* :p means make this the last executed line. So we + return an error state after adding this line to the + history. */ + case 'p': + print_only = 1; + break; + + /* :t discards all but the last part of the pathname. */ + case 't': + tstr = strrchr (temp, '/'); + if (tstr) + { + tstr++; + t = savestring (tstr); + xfree (temp); + temp = t; + } + break; + + /* :h discards the last part of a pathname. */ + case 'h': + tstr = strrchr (temp, '/'); + if (tstr) + *tstr = '\0'; + break; + + /* :r discards the suffix. */ + case 'r': + tstr = strrchr (temp, '.'); + if (tstr) + *tstr = '\0'; + break; + + /* :e discards everything but the suffix. */ + case 'e': + tstr = strrchr (temp, '.'); + if (tstr) + { + t = savestring (tstr); + xfree (temp); + temp = t; + } + break; + + /* :s/this/that substitutes `that' for the first + occurrence of `this'. :gs/this/that substitutes `that' + for each occurrence of `this'. :& repeats the last + substitution. :g& repeats the last substitution + globally. */ + + case '&': + case 's': + { + char *new_event; + int delimiter, failed, si, l_temp, ws, we; + + if (c == 's') + { + if (i + 2 < (int)strlen (string)) + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + _rl_adjust_point (string, i + 2, &ps); + if (_rl_get_char_len (string + i + 2, &ps) > 1) + delimiter = 0; + else + delimiter = string[i + 2]; + } + else +#endif /* HANDLE_MULTIBYTE */ + delimiter = string[i + 2]; + } + else + break; /* no search delimiter */ + + i += 3; + + t = get_subst_pattern (string, &i, delimiter, 0, &subst_lhs_len); + /* An empty substitution lhs with no previous substitution + uses the last search string as the lhs. */ + if (t) + { + FREE (subst_lhs); + subst_lhs = t; + } + else if (!subst_lhs) + { + if (search_string && *search_string) + { + subst_lhs = savestring (search_string); + subst_lhs_len = strlen (subst_lhs); + } + else + { + subst_lhs = (char *) NULL; + subst_lhs_len = 0; + } + } + + FREE (subst_rhs); + subst_rhs = get_subst_pattern (string, &i, delimiter, 1, &subst_rhs_len); + + /* If `&' appears in the rhs, it's supposed to be replaced + with the lhs. */ + if (member ('&', subst_rhs)) + postproc_subst_rhs (); + } + else + i += 2; + + /* If there is no lhs, the substitution can't succeed. */ + if (subst_lhs_len == 0) + { + *ret_string = hist_error (string, starting_index, i, NO_PREV_SUBST); + xfree (result); + xfree (temp); + return -1; + } + + l_temp = strlen (temp); + /* Ignore impossible cases. */ + if (subst_lhs_len > l_temp) + { + *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); + xfree (result); + xfree (temp); + return (-1); + } + + /* Find the first occurrence of THIS in TEMP. */ + /* Substitute SUBST_RHS for SUBST_LHS in TEMP. There are three + cases to consider: + + 1. substitute_globally == subst_bywords == 0 + 2. substitute_globally == 1 && subst_bywords == 0 + 3. substitute_globally == 0 && subst_bywords == 1 + + In the first case, we substitute for the first occurrence only. + In the second case, we substitute for every occurrence. + In the third case, we tokenize into words and substitute the + first occurrence of each word. */ + + si = we = 0; + for (failed = 1; (si + subst_lhs_len) <= l_temp; si++) + { + /* First skip whitespace and find word boundaries if + we're past the end of the word boundary we found + the last time. */ + if (subst_bywords && si > we) + { + for (; temp[si] && fielddelim (temp[si]); si++) + ; + ws = si; + we = history_tokenize_word (temp, si); + } + + if (STREQN (temp+si, subst_lhs, subst_lhs_len)) + { + int len = subst_rhs_len - subst_lhs_len + l_temp; + new_event = (char *)xmalloc (1 + len); + strncpy (new_event, temp, si); + strncpy (new_event + si, subst_rhs, subst_rhs_len); + strncpy (new_event + si + subst_rhs_len, + temp + si + subst_lhs_len, + l_temp - (si + subst_lhs_len)); + new_event[len] = '\0'; + xfree (temp); + temp = new_event; + + failed = 0; + + if (substitute_globally) + { + /* Reported to fix a bug that causes it to skip every + other match when matching a single character. Was + si += subst_rhs_len previously. */ + si += subst_rhs_len - 1; + l_temp = strlen (temp); + substitute_globally++; + continue; + } + else if (subst_bywords) + { + si = we; + l_temp = strlen (temp); + continue; + } + else + break; + } + } + + if (substitute_globally > 1) + { + substitute_globally = 0; + continue; /* don't want to increment i */ + } + + if (failed == 0) + continue; /* don't want to increment i */ + + *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); + xfree (result); + xfree (temp); + return (-1); + } + } + i += 2; + } + /* Done with modifiers. */ + /* Believe it or not, we have to back the pointer up by one. */ + --i; + + if (want_quotes) + { + char *x; + + if (want_quotes == 'q') + x = sh_single_quote (temp); + else if (want_quotes == 'x') + x = quote_breaks (temp); + else + x = savestring (temp); + + xfree (temp); + temp = x; + } + + n = strlen (temp); + if (n >= result_len) + result = (char *)xrealloc (result, n + 2); + strcpy (result, temp); + xfree (temp); + + *end_index_ptr = i; + *ret_string = result; + return (print_only); +} + +/* Expand the string STRING, placing the result into OUTPUT, a pointer + to a string. Returns: + + -1) If there was an error in expansion. + 0) If no expansions took place (or, if the only change in + the text was the de-slashifying of the history expansion + character) + 1) If expansions did take place + 2) If the `p' modifier was given and the caller should print the result + + If an error occurred in expansion, then OUTPUT contains a descriptive + error message. */ + +#define ADD_STRING(s) \ + do \ + { \ + int sl = strlen (s); \ + j += sl; \ + if (j >= result_len) \ + { \ + while (j >= result_len) \ + result_len += 128; \ + result = (char *)xrealloc (result, result_len); \ + } \ + strcpy (result + j - sl, s); \ + } \ + while (0) + +#define ADD_CHAR(c) \ + do \ + { \ + if (j >= result_len - 1) \ + result = (char *)xrealloc (result, result_len += 64); \ + result[j++] = c; \ + result[j] = '\0'; \ + } \ + while (0) + +int +history_expand (char *hstring, char **output) +{ + register int j; + int i, r, l, passc, cc, modified, eindex, only_printing, dquote, squote, flag; + char *string; + + /* The output string, and its length. */ + int result_len; + char *result; + +#if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; + mbstate_t ps; +#endif + + /* Used when adding the string. */ + char *temp; + + if (output == 0) + return 0; + + /* Setting the history expansion character to 0 inhibits all + history expansion. */ + if (history_expansion_char == 0) + { + *output = savestring (hstring); + return (0); + } + + /* Prepare the buffer for printing error messages. */ + result = (char *)xmalloc (result_len = 256); + result[0] = '\0'; + + only_printing = modified = 0; + l = strlen (hstring); + + /* Grovel the string. Only backslash and single quotes can quote the + history escape character. We also handle arg specifiers. */ + + /* Before we grovel forever, see if the history_expansion_char appears + anywhere within the text. */ + + /* The quick substitution character is a history expansion all right. That + is to say, "^this^that^" is equivalent to "!!:s^this^that^", and in fact, + that is the substitution that we do. */ + if (hstring[0] == history_subst_char) + { + string = (char *)xmalloc (l + 5); + + string[0] = string[1] = history_expansion_char; + string[2] = ':'; + string[3] = 's'; + strcpy (string + 4, hstring); + l += 4; + } + else + { +#if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); +#endif + + string = hstring; + /* If not quick substitution, still maybe have to do expansion. */ + + /* `!' followed by one of the characters in history_no_expand_chars + is NOT an expansion. */ + dquote = history_quoting_state == '"'; + squote = history_quoting_state == '\''; + + /* If the calling application tells us we are already reading a + single-quoted string, consume the rest of the string right now + and then go on. */ + i = 0; + if (squote && history_quotes_inhibit_expansion) + { + hist_string_extract_single_quoted (string, &i, 0); + squote = 0; + if (string[i]) + i++; + } + + for ( ; string[i]; i++) + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int v; + v = _rl_get_char_len (string + i, &ps); + if (v > 1) + { + i += v - 1; + continue; + } + } +#endif /* HANDLE_MULTIBYTE */ + + cc = string[i + 1]; + /* The history_comment_char, if set, appearing at the beginning + of a word signifies that the rest of the line should not have + history expansion performed on it. + Skip the rest of the line and break out of the loop. */ + if (history_comment_char && string[i] == history_comment_char && + dquote == 0 && + (i == 0 || member (string[i - 1], history_word_delimiters))) + { + while (string[i]) + i++; + break; + } + else if (string[i] == history_expansion_char) + { + if (cc == 0 || member (cc, history_no_expand_chars)) + continue; + /* DQUOTE won't be set unless history_quotes_inhibit_expansion + is set. The idea here is to treat double-quoted strings the + same as the word outside double quotes; in effect making the + double quote part of history_no_expand_chars when DQUOTE is + set. */ + else if (dquote && cc == '"') + continue; + /* If the calling application has set + history_inhibit_expansion_function to a function that checks + for special cases that should not be history expanded, + call the function and skip the expansion if it returns a + non-zero value. */ + else if (history_inhibit_expansion_function && + (*history_inhibit_expansion_function) (string, i)) + continue; + else + break; + } + /* Shell-like quoting: allow backslashes to quote double quotes + inside a double-quoted string. */ + else if (dquote && string[i] == '\\' && cc == '"') + i++; + /* More shell-like quoting: if we're paying attention to single + quotes and letting them quote the history expansion character, + then we need to pay attention to double quotes, because single + quotes are not special inside double-quoted strings. */ + else if (history_quotes_inhibit_expansion && string[i] == '"') + { + dquote = 1 - dquote; + } + else if (dquote == 0 && history_quotes_inhibit_expansion && string[i] == '\'') + { + /* If this is bash, single quotes inhibit history expansion. */ + flag = (i > 0 && string[i - 1] == '$'); + i++; + hist_string_extract_single_quoted (string, &i, flag); + } + else if (history_quotes_inhibit_expansion && string[i] == '\\') + { + /* If this is bash, allow backslashes to quote single + quotes and the history expansion character. */ + if (cc == '\'' || cc == history_expansion_char) + i++; + } + + } + + if (string[i] != history_expansion_char) + { + xfree (result); + *output = savestring (string); + return (0); + } + } + + /* Extract and perform the substitution. */ + dquote = history_quoting_state == '"'; + squote = history_quoting_state == '\''; + + /* If the calling application tells us we are already reading a + single-quoted string, consume the rest of the string right now + and then go on. */ + i = j = 0; + if (squote && history_quotes_inhibit_expansion) + { + int c; + + hist_string_extract_single_quoted (string, &i, 0); + squote = 0; + for (c = 0; c < i; c++) + ADD_CHAR (string[c]); + if (string[i]) + { + ADD_CHAR (string[i]); + i++; + } + } + + for (passc = 0; i < l; i++) + { + int qc, tchar = string[i]; + + if (passc) + { + passc = 0; + ADD_CHAR (tchar); + continue; + } + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int k, c; + + c = tchar; + memset (mb, 0, sizeof (mb)); + for (k = 0; k < MB_LEN_MAX; k++) + { + mb[k] = (char)c; + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_get_char_len (mb, &ps) == -2) + c = string[++i]; + else + break; + } + if (strlen (mb) > 1) + { + ADD_STRING (mb); + continue; + } + } +#endif /* HANDLE_MULTIBYTE */ + + if (tchar == history_expansion_char) + tchar = -3; + else if (tchar == history_comment_char) + tchar = -2; + + switch (tchar) + { + default: + ADD_CHAR (string[i]); + break; + + case '\\': + passc++; + ADD_CHAR (tchar); + break; + + case '"': + dquote = 1 - dquote; + ADD_CHAR (tchar); + break; + + case '\'': + { + /* If history_quotes_inhibit_expansion is set, single quotes + inhibit history expansion, otherwise they are treated like + double quotes. */ + if (squote) + { + squote = 0; + ADD_CHAR (tchar); + } + else if (dquote == 0 && history_quotes_inhibit_expansion) + { + int quote, slen; + + flag = (i > 0 && string[i - 1] == '$'); + quote = i++; + hist_string_extract_single_quoted (string, &i, flag); + + slen = i - quote + 2; + temp = (char *)xmalloc (slen); + strncpy (temp, string + quote, slen); + temp[slen - 1] = '\0'; + ADD_STRING (temp); + xfree (temp); + } + else if (dquote == 0 && squote == 0 && history_quotes_inhibit_expansion == 0) + { + squote = 1; + ADD_CHAR (string[i]); + } + else + ADD_CHAR (string[i]); + break; + } + + case -2: /* history_comment_char */ + if ((dquote == 0 || history_quotes_inhibit_expansion == 0) && + (i == 0 || member (string[i - 1], history_word_delimiters))) + { + temp = (char *)xmalloc (l - i + 1); + strcpy (temp, string + i); + ADD_STRING (temp); + xfree (temp); + i = l; + } + else + ADD_CHAR (string[i]); + break; + + case -3: /* history_expansion_char */ + cc = string[i + 1]; + + /* If the history_expansion_char is followed by one of the + characters in history_no_expand_chars, then it is not a + candidate for expansion of any kind. */ + if (cc == 0 || member (cc, history_no_expand_chars) || + (dquote && cc == '"') || + (history_inhibit_expansion_function && (*history_inhibit_expansion_function) (string, i))) + { + ADD_CHAR (string[i]); + break; + } + +#if defined (NO_BANG_HASH_MODIFIERS) + /* There is something that is listed as a `word specifier' in csh + documentation which means `the expanded text to this point'. + That is not a word specifier, it is an event specifier. If we + don't want to allow modifiers with `!#', just stick the current + output line in again. */ + if (cc == '#') + { + if (result) + { + temp = (char *)xmalloc (1 + strlen (result)); + strcpy (temp, result); + ADD_STRING (temp); + xfree (temp); + } + i++; + break; + } +#endif + qc = squote ? '\'' : (dquote ? '"' : 0); + r = history_expand_internal (string, i, qc, &eindex, &temp, result); + if (r < 0) + { + *output = temp; + xfree (result); + if (string != hstring) + xfree (string); + return -1; + } + else + { + if (temp) + { + modified++; + if (*temp) + ADD_STRING (temp); + xfree (temp); + } + only_printing += r == 1; + i = eindex; + } + break; + } + } + + *output = result; + if (string != hstring) + xfree (string); + + if (only_printing) + { +#if 0 + add_history (result); +#endif + return (2); + } + + return (modified != 0); +} + +/* Return a consed string which is the word specified in SPEC, and found + in FROM. NULL is returned if there is no spec. The address of + ERROR_POINTER is returned if the word specified cannot be found. + CALLER_INDEX is the offset in SPEC to start looking; it is updated + to point to just after the last character parsed. */ +static char * +get_history_word_specifier (char *spec, char *from, int *caller_index) +{ + register int i = *caller_index; + int first, last; + int expecting_word_spec = 0; + char *result; + + /* The range of words to return doesn't exist yet. */ + first = last = 0; + result = (char *)NULL; + + /* If we found a colon, then this *must* be a word specification. If + it isn't, then it is an error. */ + if (spec[i] == ':') + { + i++; + expecting_word_spec++; + } + + /* Handle special cases first. */ + + /* `%' is the word last searched for. */ + if (spec[i] == '%') + { + *caller_index = i + 1; + return (search_match ? savestring (search_match) : savestring ("")); + } + + /* `*' matches all of the arguments, but not the command. */ + if (spec[i] == '*') + { + *caller_index = i + 1; + result = history_arg_extract (1, '$', from); + return (result ? result : savestring ("")); + } + + /* `$' is last arg. */ + if (spec[i] == '$') + { + *caller_index = i + 1; + return (history_arg_extract ('$', '$', from)); + } + + /* Try to get FIRST and LAST figured out. */ + + if (spec[i] == '-') + first = 0; + else if (spec[i] == '^') + { + first = 1; + i++; + } + else if (_rl_digit_p (spec[i]) && expecting_word_spec) + { + for (first = 0; _rl_digit_p (spec[i]); i++) + first = (first * 10) + _rl_digit_value (spec[i]); + } + else + return ((char *)NULL); /* no valid `first' for word specifier */ + + if (spec[i] == '^' || spec[i] == '*') + { + last = (spec[i] == '^') ? 1 : '$'; /* x* abbreviates x-$ */ + i++; + } + else if (spec[i] != '-') + last = first; + else + { + i++; + + if (_rl_digit_p (spec[i])) + { + for (last = 0; _rl_digit_p (spec[i]); i++) + last = (last * 10) + _rl_digit_value (spec[i]); + } + else if (spec[i] == '$') + { + i++; + last = '$'; + } + else if (spec[i] == '^') + { + i++; + last = 1; + } +#if 0 + else if (!spec[i] || spec[i] == ':') + /* check against `:' because there could be a modifier separator */ +#else + else + /* csh seems to allow anything to terminate the word spec here, + leaving it as an abbreviation. */ +#endif + last = -1; /* x- abbreviates x-$ omitting word `$' */ + } + + *caller_index = i; + + if (last >= first || last == '$' || last < 0) + result = history_arg_extract (first, last, from); + + return (result ? result : (char *)&error_pointer); +} + +/* Extract the args specified, starting at FIRST, and ending at LAST. + The args are taken from STRING. If either FIRST or LAST is < 0, + then make that arg count from the right (subtract from the number of + tokens, so that FIRST = -1 means the next to last token on the line). + If LAST is `$' the last arg from STRING is used. */ +char * +history_arg_extract (int first, int last, const char *string) +{ + register int i, len; + char *result; + int size, offset; + char **list; + + /* XXX - think about making history_tokenize return a struct array, + each struct in array being a string and a length to avoid the + calls to strlen below. */ + if ((list = history_tokenize (string)) == NULL) + return ((char *)NULL); + + for (len = 0; list[len]; len++) + ; + + if (last < 0) + last = len + last - 1; + + if (first < 0) + first = len + first - 1; + + if (last == '$') + last = len - 1; + + if (first == '$') + first = len - 1; + + last++; + + if (first >= len || last > len || first < 0 || last < 0 || first > last) + result = ((char *)NULL); + else + { + for (size = 0, i = first; i < last; i++) + size += strlen (list[i]) + 1; + result = (char *)xmalloc (size + 1); + result[0] = '\0'; + + for (i = first, offset = 0; i < last; i++) + { + strcpy (result + offset, list[i]); + offset += strlen (list[i]); + if (i + 1 < last) + { + result[offset++] = ' '; + result[offset] = 0; + } + } + } + + for (i = 0; i < len; i++) + xfree (list[i]); + xfree (list); + + return (result); +} + +static int +history_tokenize_word (const char *string, int ind) +{ + register int i, j; + int delimiter, nestdelim, delimopen; + + i = ind; + delimiter = nestdelim = 0; + + if (member (string[i], "()\n")) /* XXX - included \n, but why? been here forever */ + { + i++; + return i; + } + + if (ISDIGIT (string[i])) + { + j = i; + while (string[j] && ISDIGIT (string[j])) + j++; + if (string[j] == 0) + return (j); + if (string[j] == '<' || string[j] == '>') + i = j; /* digit sequence is a file descriptor */ + else + { + i = j; + goto get_word; /* digit sequence is part of a word */ + } + } + + if (member (string[i], "<>;&|")) + { + int peek = string[i + 1]; + + if (peek == string[i]) + { + if (peek == '<' && string[i + 2] == '-') + i++; + else if (peek == '<' && string[i + 2] == '<') + i++; + i += 2; + return i; + } + else if (peek == '&' && (string[i] == '>' || string[i] == '<')) + { + j = i + 2; + while (string[j] && ISDIGIT (string[j])) /* file descriptor */ + j++; + if (string[j] =='-') /* <&[digits]-, >&[digits]- */ + j++; + return j; + } + else if ((peek == '>' && string[i] == '&') || (peek == '|' && string[i] == '>')) + { + i += 2; + return i; + } + /* XXX - process substitution -- separated out for later -- bash-4.2 */ + else if (peek == '(' && (string[i] == '>' || string[i] == '<')) /*)*/ + { + i += 2; + delimopen = '('; + delimiter = ')'; + nestdelim = 1; + goto get_word; + } + + i++; + return i; + } + +get_word: + /* Get word from string + i; */ + + if (delimiter == 0 && member (string[i], HISTORY_QUOTE_CHARACTERS)) + delimiter = string[i++]; + + for (; string[i]; i++) + { + if (string[i] == '\\' && string[i + 1] == '\n') + { + i++; + continue; + } + + if (string[i] == '\\' && delimiter != '\'' && + (delimiter != '"' || member (string[i], slashify_in_quotes))) + { + i++; + continue; + } + + /* delimiter must be set and set to something other than a quote if + nestdelim is set, so these tests are safe. */ + if (nestdelim && string[i] == delimopen) + { + nestdelim++; + continue; + } + if (nestdelim && string[i] == delimiter) + { + nestdelim--; + if (nestdelim == 0) + delimiter = 0; + continue; + } + + if (delimiter && string[i] == delimiter) + { + delimiter = 0; + continue; + } + + /* Command and process substitution; shell extended globbing patterns */ + if (nestdelim == 0 && delimiter == 0 && member (string[i], "<>$!@?+*") && string[i+1] == '(') /*)*/ + { + i += 2; + delimopen = '('; + delimiter = ')'; + nestdelim = 1; + continue; + } + + if (delimiter == 0 && (member (string[i], history_word_delimiters))) + break; + + if (delimiter == 0 && member (string[i], HISTORY_QUOTE_CHARACTERS)) + delimiter = string[i]; + } + + return i; +} + +static char * +history_substring (const char *string, int start, int end) +{ + register int len; + register char *result; + + len = end - start; + result = (char *)xmalloc (len + 1); + strncpy (result, string + start, len); + result[len] = '\0'; + return result; +} + +/* Parse STRING into tokens and return an array of strings. If WIND is + not -1 and INDP is not null, we also want the word surrounding index + WIND. The position in the returned array of strings is returned in + *INDP. */ +static char ** +history_tokenize_internal (const char *string, int wind, int *indp) +{ + char **result; + register int i, start, result_index, size; + + /* If we're searching for a string that's not part of a word (e.g., " "), + make sure we set *INDP to a reasonable value. */ + if (indp && wind != -1) + *indp = -1; + + /* Get a token, and stuff it into RESULT. The tokens are split + exactly where the shell would split them. */ + for (i = result_index = size = 0, result = (char **)NULL; string[i]; ) + { + /* Skip leading whitespace. */ + for (; string[i] && fielddelim (string[i]); i++) + ; + if (string[i] == 0 || string[i] == history_comment_char) + return (result); + + start = i; + + i = history_tokenize_word (string, start); + + /* If we have a non-whitespace delimiter character (which would not be + skipped by the loop above), use it and any adjacent delimiters to + make a separate field. Any adjacent white space will be skipped the + next time through the loop. */ + if (i == start && history_word_delimiters) + { + i++; + while (string[i] && member (string[i], history_word_delimiters)) + i++; + } + + /* If we are looking for the word in which the character at a + particular index falls, remember it. */ + if (indp && wind != -1 && wind >= start && wind < i) + *indp = result_index; + + if (result_index + 2 >= size) + result = (char **)xrealloc (result, ((size += 10) * sizeof (char *))); + + result[result_index++] = history_substring (string, start, i); + result[result_index] = (char *)NULL; + } + + return (result); +} + +/* Return an array of tokens, much as the shell might. The tokens are + parsed out of STRING. */ +char ** +history_tokenize (const char *string) +{ + return (history_tokenize_internal (string, -1, (int *)NULL)); +} + +/* Free members of WORDS from START to an empty string */ +static void +freewords (char **words, int start) +{ + register int i; + + for (i = start; words[i]; i++) + xfree (words[i]); +} + +/* Find and return the word which contains the character at index IND + in the history line LINE. Used to save the word matched by the + last history !?string? search. */ +static char * +history_find_word (char *line, int ind) +{ + char **words, *s; + int i, wind; + + words = history_tokenize_internal (line, ind, &wind); + if (wind == -1 || words == 0) + { + if (words) + freewords (words, 0); + FREE (words); + return ((char *)NULL); + } + s = words[wind]; + for (i = 0; i < wind; i++) + xfree (words[i]); + freewords (words, wind + 1); + xfree (words); + return s; +} diff --git a/bash-5.1/lib/readline/histfile.c b/bash-5.1/lib/readline/histfile.c new file mode 100644 index 0000000000000000000000000000000000000000..f0fa5ce15fe1a90d2e6c28e9f0729893e5589fee --- /dev/null +++ b/bash-5.1/lib/readline/histfile.c @@ -0,0 +1,835 @@ +/* histfile.c - functions to manipulate the history file. */ + +/* Copyright (C) 1989-2019 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. + + History 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. + + History 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 History. If not, see . +*/ + +/* The goal is to make the implementation transparent, so that you + don't have to know what data types are used, just what functions + you can call. I think I have done that. */ + +#define READLINE_LIBRARY + +#if defined (__TANDEM) +# define _XOPEN_SOURCE_EXTENDED 1 +# include +# include +#endif + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_LIMITS_H) +# include +#endif + +#include +#if ! defined (_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include "posixstat.h" +#include + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#if defined (__EMX__) +# undef HAVE_MMAP +#endif + +#ifdef HISTORY_USE_MMAP +# include + +# ifdef MAP_FILE +# define MAP_RFLAGS (MAP_FILE|MAP_PRIVATE) +# define MAP_WFLAGS (MAP_FILE|MAP_SHARED) +# else +# define MAP_RFLAGS MAP_PRIVATE +# define MAP_WFLAGS MAP_SHARED +# endif + +# ifndef MAP_FAILED +# define MAP_FAILED ((void *)-1) +# endif + +#endif /* HISTORY_USE_MMAP */ + +#if defined(_WIN32) +# define WIN32_LEAN_AND_MEAN +# include +#endif + +/* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment + on win 95/98/nt), we want to open files with O_BINARY mode so that there + is no \n -> \r\n conversion performed. On other systems, we don't want to + mess around with O_BINARY at all, so we ensure that it's defined to 0. */ +#if defined (__EMX__) || defined (__CYGWIN__) +# ifndef O_BINARY +# define O_BINARY 0 +# endif +#else /* !__EMX__ && !__CYGWIN__ */ +# undef O_BINARY +# define O_BINARY 0 +#endif /* !__EMX__ && !__CYGWIN__ */ + +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#include "history.h" +#include "histlib.h" + +#include "rlshell.h" +#include "xmalloc.h" + +#if !defined (PATH_MAX) +# define PATH_MAX 1024 /* default */ +#endif + +extern void _hs_append_history_line PARAMS((int, const char *)); + +/* history file version; currently unused */ +int history_file_version = 1; + +/* If non-zero, we write timestamps to the history file in history_do_write() */ +int history_write_timestamps = 0; + +/* If non-zero, we assume that a history file that starts with a timestamp + uses timestamp-delimited entries and can include multi-line history + entries. Used by read_history_range */ +int history_multiline_entries = 0; + +/* Immediately after a call to read_history() or read_history_range(), this + will return the number of lines just read from the history file in that + call. */ +int history_lines_read_from_file = 0; + +/* Immediately after a call to write_history() or history_do_write(), this + will return the number of lines just written to the history file in that + call. This also works with history_truncate_file. */ +int history_lines_written_to_file = 0; + +/* Does S look like the beginning of a history timestamp entry? Placeholder + for more extensive tests. */ +#define HIST_TIMESTAMP_START(s) (*(s) == history_comment_char && isdigit ((unsigned char)(s)[1]) ) + +static char *history_backupfile PARAMS((const char *)); +static char *history_tempfile PARAMS((const char *)); +static int histfile_backup PARAMS((const char *, const char *)); +static int histfile_restore PARAMS((const char *, const char *)); +static int history_rename PARAMS((const char *, const char *)); + +/* Return the string that should be used in the place of this + filename. This only matters when you don't specify the + filename to read_history (), or write_history (). */ +static char * +history_filename (const char *filename) +{ + char *return_val; + const char *home; + int home_len; + + return_val = filename ? savestring (filename) : (char *)NULL; + + if (return_val) + return (return_val); + + home = sh_get_env_value ("HOME"); +#if defined (_WIN32) + if (home == 0) + home = sh_get_env_value ("APPDATA"); +#endif + + if (home == 0) + return (NULL); + else + home_len = strlen (home); + + return_val = (char *)xmalloc (2 + home_len + 8); /* strlen(".history") == 8 */ + strcpy (return_val, home); + return_val[home_len] = '/'; +#if defined (__MSDOS__) + strcpy (return_val + home_len + 1, "_history"); +#else + strcpy (return_val + home_len + 1, ".history"); +#endif + + return (return_val); +} + +static char * +history_backupfile (const char *filename) +{ + const char *fn; + char *ret, linkbuf[PATH_MAX+1]; + size_t len; + ssize_t n; + struct stat fs; + + fn = filename; +#if defined (HAVE_READLINK) + /* Follow symlink to avoid backing up symlink itself; call will fail if + not a symlink */ + if ((n = readlink (filename, linkbuf, sizeof (linkbuf) - 1)) > 0) + { + linkbuf[n] = '\0'; + fn = linkbuf; + } +#endif + + len = strlen (fn); + ret = xmalloc (len + 2); + strcpy (ret, fn); + ret[len] = '-'; + ret[len+1] = '\0'; + return ret; +} + +static char * +history_tempfile (const char *filename) +{ + const char *fn; + char *ret, linkbuf[PATH_MAX+1]; + size_t len; + ssize_t n; + struct stat fs; + int pid; + + fn = filename; +#if defined (HAVE_READLINK) + /* Follow symlink so tempfile created in the same directory as any symlinked + history file; call will fail if not a symlink */ + if ((n = readlink (filename, linkbuf, sizeof (linkbuf) - 1)) > 0) + { + linkbuf[n] = '\0'; + fn = linkbuf; + } +#endif + + len = strlen (fn); + ret = xmalloc (len + 11); + strcpy (ret, fn); + + pid = (int)getpid (); + + /* filename-PID.tmp */ + ret[len] = '-'; + ret[len+1] = (pid / 10000 % 10) + '0'; + ret[len+2] = (pid / 1000 % 10) + '0'; + ret[len+3] = (pid / 100 % 10) + '0'; + ret[len+4] = (pid / 10 % 10) + '0'; + ret[len+5] = (pid % 10) + '0'; + strcpy (ret + len + 6, ".tmp"); + + return ret; +} + +/* Add the contents of FILENAME to the history list, a line at a time. + If FILENAME is NULL, then read from ~/.history. Returns 0 if + successful, or errno if not. */ +int +read_history (const char *filename) +{ + return (read_history_range (filename, 0, -1)); +} + +/* Read a range of lines from FILENAME, adding them to the history list. + Start reading at the FROM'th line and end at the TO'th. If FROM + is zero, start at the beginning. If TO is less than FROM, read + until the end of the file. If FILENAME is NULL, then read from + ~/.history. Returns 0 if successful, or errno if not. */ +int +read_history_range (const char *filename, int from, int to) +{ + register char *line_start, *line_end, *p; + char *input, *buffer, *bufend, *last_ts; + int file, current_line, chars_read, has_timestamps, reset_comment_char; + struct stat finfo; + size_t file_size; +#if defined (EFBIG) + int overflow_errno = EFBIG; +#elif defined (EOVERFLOW) + int overflow_errno = EOVERFLOW; +#else + int overflow_errno = EIO; +#endif + + history_lines_read_from_file = 0; + + buffer = last_ts = (char *)NULL; + input = history_filename (filename); + file = input ? open (input, O_RDONLY|O_BINARY, 0666) : -1; + + if ((file < 0) || (fstat (file, &finfo) == -1)) + goto error_and_exit; + + if (S_ISREG (finfo.st_mode) == 0) + { +#ifdef EFTYPE + errno = EFTYPE; +#else + errno = EINVAL; +#endif + goto error_and_exit; + } + + file_size = (size_t)finfo.st_size; + + /* check for overflow on very large files */ + if (file_size != finfo.st_size || file_size + 1 < file_size) + { + errno = overflow_errno; + goto error_and_exit; + } + + if (file_size == 0) + { + free (input); + close (file); + return 0; /* don't waste time if we don't have to */ + } + +#ifdef HISTORY_USE_MMAP + /* We map read/write and private so we can change newlines to NULs without + affecting the underlying object. */ + buffer = (char *)mmap (0, file_size, PROT_READ|PROT_WRITE, MAP_RFLAGS, file, 0); + if ((void *)buffer == MAP_FAILED) + { + errno = overflow_errno; + goto error_and_exit; + } + chars_read = file_size; +#else + buffer = (char *)malloc (file_size + 1); + if (buffer == 0) + { + errno = overflow_errno; + goto error_and_exit; + } + + chars_read = read (file, buffer, file_size); +#endif + if (chars_read < 0) + { + error_and_exit: + if (errno != 0) + chars_read = errno; + else + chars_read = EIO; + if (file >= 0) + close (file); + + FREE (input); +#ifndef HISTORY_USE_MMAP + FREE (buffer); +#endif + + return (chars_read); + } + + close (file); + + /* Set TO to larger than end of file if negative. */ + if (to < 0) + to = chars_read; + + /* Start at beginning of file, work to end. */ + bufend = buffer + chars_read; + *bufend = '\0'; /* null-terminate buffer for timestamp checks */ + current_line = 0; + + /* Heuristic: the history comment character rarely changes, so assume we + have timestamps if the buffer starts with `#[:digit:]' and temporarily + set history_comment_char so timestamp parsing works right */ + reset_comment_char = 0; + if (history_comment_char == '\0' && buffer[0] == '#' && isdigit ((unsigned char)buffer[1])) + { + history_comment_char = '#'; + reset_comment_char = 1; + } + + has_timestamps = HIST_TIMESTAMP_START (buffer); + history_multiline_entries += has_timestamps && history_write_timestamps; + + /* Skip lines until we are at FROM. */ + if (has_timestamps) + last_ts = buffer; + for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++) + if (*line_end == '\n') + { + p = line_end + 1; + /* If we see something we think is a timestamp, continue with this + line. We should check more extensively here... */ + if (HIST_TIMESTAMP_START(p) == 0) + current_line++; + else + last_ts = p; + line_start = p; + /* If we are at the last line (current_line == from) but we have + timestamps (has_timestamps), then line_start points to the + text of the last command, and we need to skip to its end. */ + if (current_line >= from && has_timestamps) + { + for (line_end = p; line_end < bufend && *line_end != '\n'; line_end++) + ; + line_start = (*line_end == '\n') ? line_end + 1 : line_end; + } + } + + /* If there are lines left to gobble, then gobble them now. */ + for (line_end = line_start; line_end < bufend; line_end++) + if (*line_end == '\n') + { + /* Change to allow Windows-like \r\n end of line delimiter. */ + if (line_end > line_start && line_end[-1] == '\r') + line_end[-1] = '\0'; + else + *line_end = '\0'; + + if (*line_start) + { + if (HIST_TIMESTAMP_START(line_start) == 0) + { + if (last_ts == NULL && history_length > 0 && history_multiline_entries) + _hs_append_history_line (history_length - 1, line_start); + else + add_history (line_start); + if (last_ts) + { + add_history_time (last_ts); + last_ts = NULL; + } + } + else + { + last_ts = line_start; + current_line--; + } + } + + current_line++; + + if (current_line >= to) + break; + + line_start = line_end + 1; + } + + history_lines_read_from_file = current_line; + if (reset_comment_char) + history_comment_char = '\0'; + + FREE (input); +#ifndef HISTORY_USE_MMAP + FREE (buffer); +#else + munmap (buffer, file_size); +#endif + + return (0); +} + +/* We need a special version for WIN32 because Windows rename() refuses to + overwrite an existing file. */ +static int +history_rename (const char *old, const char *new) +{ +#if defined (_WIN32) + return (MoveFileEx (old, new, MOVEFILE_REPLACE_EXISTING) == 0 ? -1 : 0); +#else + return (rename (old, new)); +#endif +} + +/* Save FILENAME to BACK, handling case where FILENAME is a symlink + (e.g., ~/.bash_history -> .histfiles/.bash_history.$HOSTNAME) */ +static int +histfile_backup (const char *filename, const char *back) +{ +#if defined (HAVE_READLINK) + char linkbuf[PATH_MAX+1]; + ssize_t n; + + /* Follow to target of symlink to avoid renaming symlink itself */ + if ((n = readlink (filename, linkbuf, sizeof (linkbuf) - 1)) > 0) + { + linkbuf[n] = '\0'; + return (history_rename (linkbuf, back)); + } +#endif + return (history_rename (filename, back)); +} + +/* Restore ORIG from BACKUP handling case where ORIG is a symlink + (e.g., ~/.bash_history -> .histfiles/.bash_history.$HOSTNAME) */ +static int +histfile_restore (const char *backup, const char *orig) +{ +#if defined (HAVE_READLINK) + char linkbuf[PATH_MAX+1]; + ssize_t n; + + /* Follow to target of symlink to avoid renaming symlink itself */ + if ((n = readlink (orig, linkbuf, sizeof (linkbuf) - 1)) > 0) + { + linkbuf[n] = '\0'; + return (history_rename (backup, linkbuf)); + } +#endif + return (history_rename (backup, orig)); +} + +/* Should we call chown, based on whether finfo and nfinfo describe different + files with different owners? */ + +#define SHOULD_CHOWN(finfo, nfinfo) \ + (finfo.st_uid != nfinfo.st_uid || finfo.st_gid != nfinfo.st_gid) + +/* Truncate the history file FNAME, leaving only LINES trailing lines. + If FNAME is NULL, then use ~/.history. Writes a new file and renames + it to the original name. Returns 0 on success, errno on failure. */ +int +history_truncate_file (const char *fname, int lines) +{ + char *buffer, *filename, *tempname, *bp, *bp1; /* bp1 == bp+1 */ + int file, chars_read, rv, orig_lines, exists, r; + struct stat finfo, nfinfo; + size_t file_size; + + history_lines_written_to_file = 0; + + buffer = (char *)NULL; + filename = history_filename (fname); + tempname = 0; + file = filename ? open (filename, O_RDONLY|O_BINARY, 0666) : -1; + rv = exists = 0; + + /* Don't try to truncate non-regular files. */ + if (file == -1 || fstat (file, &finfo) == -1) + { + rv = errno; + if (file != -1) + close (file); + goto truncate_exit; + } + exists = 1; + + nfinfo.st_uid = finfo.st_uid; + nfinfo.st_gid = finfo.st_gid; + + if (S_ISREG (finfo.st_mode) == 0) + { + close (file); +#ifdef EFTYPE + rv = EFTYPE; +#else + rv = EINVAL; +#endif + goto truncate_exit; + } + + file_size = (size_t)finfo.st_size; + + /* check for overflow on very large files */ + if (file_size != finfo.st_size || file_size + 1 < file_size) + { + close (file); +#if defined (EFBIG) + rv = errno = EFBIG; +#elif defined (EOVERFLOW) + rv = errno = EOVERFLOW; +#else + rv = errno = EINVAL; +#endif + goto truncate_exit; + } + + buffer = (char *)malloc (file_size + 1); + if (buffer == 0) + { + rv = errno; + close (file); + goto truncate_exit; + } + + chars_read = read (file, buffer, file_size); + close (file); + + if (chars_read <= 0) + { + rv = (chars_read < 0) ? errno : 0; + goto truncate_exit; + } + + orig_lines = lines; + /* Count backwards from the end of buffer until we have passed + LINES lines. bp1 is set funny initially. But since bp[1] can't + be a comment character (since it's off the end) and *bp can't be + both a newline and the history comment character, it should be OK. */ + for (bp1 = bp = buffer + chars_read - 1; lines && bp > buffer; bp--) + { + if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0) + lines--; + bp1 = bp; + } + + /* If this is the first line, then the file contains exactly the + number of lines we want to truncate to, so we don't need to do + anything. It's the first line if we don't find a newline between + the current value of i and 0. Otherwise, write from the start of + this line until the end of the buffer. */ + for ( ; bp > buffer; bp--) + { + if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0) + { + bp++; + break; + } + bp1 = bp; + } + + /* Write only if there are more lines in the file than we want to + truncate to. */ + if (bp <= buffer) + { + rv = 0; + /* No-op if LINES == 0 at this point */ + history_lines_written_to_file = orig_lines - lines; + goto truncate_exit; + } + + tempname = history_tempfile (filename); + + if ((file = open (tempname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0600)) != -1) + { + if (write (file, bp, chars_read - (bp - buffer)) < 0) + rv = errno; + + if (fstat (file, &nfinfo) < 0 && rv == 0) + rv = errno; + + if (close (file) < 0 && rv == 0) + rv = errno; + } + else + rv = errno; + + truncate_exit: + FREE (buffer); + + history_lines_written_to_file = orig_lines - lines; + + if (rv == 0 && filename && tempname) + rv = histfile_restore (tempname, filename); + + if (rv != 0) + { + rv = errno; + if (tempname) + unlink (tempname); + history_lines_written_to_file = 0; + } + +#if defined (HAVE_CHOWN) + /* Make sure the new filename is owned by the same user as the old. If one + user is running this, it's a no-op. If the shell is running after sudo + with a shared history file, we don't want to leave the history file + owned by root. */ + if (rv == 0 && exists && SHOULD_CHOWN (finfo, nfinfo)) + r = chown (filename, finfo.st_uid, finfo.st_gid); +#endif + + xfree (filename); + FREE (tempname); + + return rv; +} + +/* Workhorse function for writing history. Writes the last NELEMENT entries + from the history list to FILENAME. OVERWRITE is non-zero if you + wish to replace FILENAME with the entries. */ +static int +history_do_write (const char *filename, int nelements, int overwrite) +{ + register int i; + char *output, *tempname, *histname; + int file, mode, rv, exists; + struct stat finfo, nfinfo; +#ifdef HISTORY_USE_MMAP + size_t cursize; + + history_lines_written_to_file = 0; + + mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY; +#else + mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY; +#endif + histname = history_filename (filename); + exists = histname ? (stat (histname, &finfo) == 0) : 0; + + tempname = (overwrite && exists && S_ISREG (finfo.st_mode)) ? history_tempfile (histname) : 0; + output = tempname ? tempname : histname; + + file = output ? open (output, mode, 0600) : -1; + rv = 0; + + if (file == -1) + { + rv = errno; + FREE (histname); + FREE (tempname); + return (rv); + } + +#ifdef HISTORY_USE_MMAP + cursize = overwrite ? 0 : lseek (file, 0, SEEK_END); +#endif + + if (nelements > history_length) + nelements = history_length; + + /* Build a buffer of all the lines to write, and write them in one syscall. + Suggested by Peter Ho (peter@robosts.oxford.ac.uk). */ + { + HIST_ENTRY **the_history; /* local */ + register int j; + int buffer_size; + char *buffer; + + the_history = history_list (); + /* Calculate the total number of bytes to write. */ + for (buffer_size = 0, i = history_length - nelements; i < history_length; i++) + { + if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0]) + buffer_size += strlen (the_history[i]->timestamp) + 1; + buffer_size += strlen (the_history[i]->line) + 1; + } + + /* Allocate the buffer, and fill it. */ +#ifdef HISTORY_USE_MMAP + if (ftruncate (file, buffer_size+cursize) == -1) + goto mmap_error; + buffer = (char *)mmap (0, buffer_size, PROT_READ|PROT_WRITE, MAP_WFLAGS, file, cursize); + if ((void *)buffer == MAP_FAILED) + { +mmap_error: + rv = errno; + close (file); + if (tempname) + unlink (tempname); + FREE (histname); + FREE (tempname); + return rv; + } +#else + buffer = (char *)malloc (buffer_size); + if (buffer == 0) + { + rv = errno; + close (file); + if (tempname) + unlink (tempname); + FREE (histname); + FREE (tempname); + return rv; + } +#endif + + for (j = 0, i = history_length - nelements; i < history_length; i++) + { + if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0]) + { + strcpy (buffer + j, the_history[i]->timestamp); + j += strlen (the_history[i]->timestamp); + buffer[j++] = '\n'; + } + strcpy (buffer + j, the_history[i]->line); + j += strlen (the_history[i]->line); + buffer[j++] = '\n'; + } + +#ifdef HISTORY_USE_MMAP + if (msync (buffer, buffer_size, MS_ASYNC) != 0 || munmap (buffer, buffer_size) != 0) + rv = errno; +#else + if (write (file, buffer, buffer_size) < 0) + rv = errno; + xfree (buffer); +#endif + } + + history_lines_written_to_file = nelements; + + if (close (file) < 0 && rv == 0) + rv = errno; + + if (rv == 0 && histname && tempname) + rv = histfile_restore (tempname, histname); + + if (rv != 0) + { + rv = errno; + if (tempname) + unlink (tempname); + history_lines_written_to_file = 0; + } + +#if defined (HAVE_CHOWN) + /* Make sure the new filename is owned by the same user as the old. If one + user is running this, it's a no-op. If the shell is running after sudo + with a shared history file, we don't want to leave the history file + owned by root. */ + if (rv == 0 && exists) + mode = chown (histname, finfo.st_uid, finfo.st_gid); +#endif + + FREE (histname); + FREE (tempname); + + return (rv); +} + +/* Append NELEMENT entries to FILENAME. The entries appended are from + the end of the list minus NELEMENTs up to the end of the list. */ +int +append_history (int nelements, const char *filename) +{ + return (history_do_write (filename, nelements, HISTORY_APPEND)); +} + +/* Overwrite FILENAME with the current history. If FILENAME is NULL, + then write the history list to ~/.history. Values returned + are as in read_history ().*/ +int +write_history (const char *filename) +{ + return (history_do_write (filename, history_length, HISTORY_OVERWRITE)); +} diff --git a/bash-5.1/lib/readline/histlib.h b/bash-5.1/lib/readline/histlib.h new file mode 100644 index 0000000000000000000000000000000000000000..9627b24500012e03eefa8ad0e7dc056b756ed246 --- /dev/null +++ b/bash-5.1/lib/readline/histlib.h @@ -0,0 +1,85 @@ +/* histlib.h -- internal definitions for the history library. */ + +/* Copyright (C) 1989-2009 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. + + History 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. + + History 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 History. If not, see . +*/ + +#if !defined (_HISTLIB_H_) +#define _HISTLIB_H_ + +#if defined (HAVE_STRING_H) +# include +#else +# include +#endif /* !HAVE_STRING_H */ + +#if !defined (STREQ) +#define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) +#define STREQN(a, b, n) (((n) == 0) ? (1) \ + : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) +#endif + +#ifndef savestring +#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) +#endif + +#ifndef whitespace +#define whitespace(c) (((c) == ' ') || ((c) == '\t')) +#endif + +#ifndef _rl_digit_p +#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') +#endif + +#ifndef _rl_digit_value +#define _rl_digit_value(c) ((c) - '0') +#endif + +#ifndef member +# if !defined (strchr) && !defined (__STDC__) +extern char *strchr (); +# endif /* !strchr && !__STDC__ */ +#define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) +#endif + +#ifndef FREE +# define FREE(x) if (x) free (x) +#endif + +/* Possible history errors passed to hist_error. */ +#define EVENT_NOT_FOUND 0 +#define BAD_WORD_SPEC 1 +#define SUBST_FAILED 2 +#define BAD_MODIFIER 3 +#define NO_PREV_SUBST 4 + +/* Possible definitions for history starting point specification. */ +#define NON_ANCHORED_SEARCH 0 +#define ANCHORED_SEARCH 0x01 +#define PATTERN_SEARCH 0x02 + +/* Possible definitions for what style of writing the history file we want. */ +#define HISTORY_APPEND 0 +#define HISTORY_OVERWRITE 1 + +/* internal extern function declarations used by other parts of the library */ + +/* histsearch.c */ +extern int _hs_history_patsearch PARAMS((const char *, int, int)); + +#endif /* !_HISTLIB_H_ */ diff --git a/bash-5.1/lib/readline/history.c b/bash-5.1/lib/readline/history.c new file mode 100644 index 0000000000000000000000000000000000000000..67158b14bc711b73462dca023f69873bde271459 --- /dev/null +++ b/bash-5.1/lib/readline/history.c @@ -0,0 +1,607 @@ +/* history.c -- standalone history library */ + +/* Copyright (C) 1989-2017 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. + + History 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. + + History 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 History. If not, see . +*/ + +/* The goal is to make the implementation transparent, so that you + don't have to know what data types are used, just what functions + you can call. I think I have done that. */ +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include + +#include "history.h" +#include "histlib.h" + +#include "xmalloc.h" + +#if !defined (errno) +extern int errno; +#endif + +/* How big to make the_history when we first allocate it. */ +#define DEFAULT_HISTORY_INITIAL_SIZE 502 + +#define MAX_HISTORY_INITIAL_SIZE 8192 + +/* The number of slots to increase the_history by. */ +#define DEFAULT_HISTORY_GROW_SIZE 50 + +static char *hist_inittime PARAMS((void)); + +/* **************************************************************** */ +/* */ +/* History Functions */ +/* */ +/* **************************************************************** */ + +/* An array of HIST_ENTRY. This is where we store the history. */ +static HIST_ENTRY **the_history = (HIST_ENTRY **)NULL; + +/* Non-zero means that we have enforced a limit on the amount of + history that we save. */ +static int history_stifled; + +/* The current number of slots allocated to the input_history. */ +static int history_size; + +/* If HISTORY_STIFLED is non-zero, then this is the maximum number of + entries to remember. */ +int history_max_entries; +int max_input_history; /* backwards compatibility */ + +/* The current location of the interactive history pointer. Just makes + life easier for outside callers. */ +int history_offset; + +/* The number of strings currently stored in the history list. */ +int history_length; + +/* The logical `base' of the history array. It defaults to 1. */ +int history_base = 1; + +/* Return the current HISTORY_STATE of the history. */ +HISTORY_STATE * +history_get_history_state (void) +{ + HISTORY_STATE *state; + + state = (HISTORY_STATE *)xmalloc (sizeof (HISTORY_STATE)); + state->entries = the_history; + state->offset = history_offset; + state->length = history_length; + state->size = history_size; + state->flags = 0; + if (history_stifled) + state->flags |= HS_STIFLED; + + return (state); +} + +/* Set the state of the current history array to STATE. */ +void +history_set_history_state (HISTORY_STATE *state) +{ + the_history = state->entries; + history_offset = state->offset; + history_length = state->length; + history_size = state->size; + if (state->flags & HS_STIFLED) + history_stifled = 1; +} + +/* Begin a session in which the history functions might be used. This + initializes interactive variables. */ +void +using_history (void) +{ + history_offset = history_length; +} + +/* Return the number of bytes that the primary history entries are using. + This just adds up the lengths of the_history->lines and the associated + timestamps. */ +int +history_total_bytes (void) +{ + register int i, result; + + for (i = result = 0; the_history && the_history[i]; i++) + result += HISTENT_BYTES (the_history[i]); + + return (result); +} + +/* Returns the magic number which says what history element we are + looking at now. In this implementation, it returns history_offset. */ +int +where_history (void) +{ + return (history_offset); +} + +/* Make the current history item be the one at POS, an absolute index. + Returns zero if POS is out of range, else non-zero. */ +int +history_set_pos (int pos) +{ + if (pos > history_length || pos < 0 || !the_history) + return (0); + history_offset = pos; + return (1); +} + +/* Return the current history array. The caller has to be careful, since this + is the actual array of data, and could be bashed or made corrupt easily. + The array is terminated with a NULL pointer. */ +HIST_ENTRY ** +history_list (void) +{ + return (the_history); +} + +/* Return the history entry at the current position, as determined by + history_offset. If there is no entry there, return a NULL pointer. */ +HIST_ENTRY * +current_history (void) +{ + return ((history_offset == history_length) || the_history == 0) + ? (HIST_ENTRY *)NULL + : the_history[history_offset]; +} + +/* Back up history_offset to the previous history entry, and return + a pointer to that entry. If there is no previous entry then return + a NULL pointer. */ +HIST_ENTRY * +previous_history (void) +{ + return history_offset ? the_history[--history_offset] : (HIST_ENTRY *)NULL; +} + +/* Move history_offset forward to the next history entry, and return + a pointer to that entry. If there is no next entry then return a + NULL pointer. */ +HIST_ENTRY * +next_history (void) +{ + return (history_offset == history_length) ? (HIST_ENTRY *)NULL : the_history[++history_offset]; +} + +/* Return the history entry which is logically at OFFSET in the history array. + OFFSET is relative to history_base. */ +HIST_ENTRY * +history_get (int offset) +{ + int local_index; + + local_index = offset - history_base; + return (local_index >= history_length || local_index < 0 || the_history == 0) + ? (HIST_ENTRY *)NULL + : the_history[local_index]; +} + +HIST_ENTRY * +alloc_history_entry (char *string, char *ts) +{ + HIST_ENTRY *temp; + + temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); + + temp->line = string ? savestring (string) : string; + temp->data = (char *)NULL; + temp->timestamp = ts; + + return temp; +} + +time_t +history_get_time (HIST_ENTRY *hist) +{ + char *ts; + time_t t; + + if (hist == 0 || hist->timestamp == 0) + return 0; + ts = hist->timestamp; + if (ts[0] != history_comment_char) + return 0; + errno = 0; + t = (time_t) strtol (ts + 1, (char **)NULL, 10); /* XXX - should use strtol() here */ + if (errno == ERANGE) + return (time_t)0; + return t; +} + +static char * +hist_inittime (void) +{ + time_t t; + char ts[64], *ret; + + t = (time_t) time ((time_t *)0); +#if defined (HAVE_VSNPRINTF) /* assume snprintf if vsnprintf exists */ + snprintf (ts, sizeof (ts) - 1, "X%lu", (unsigned long) t); +#else + sprintf (ts, "X%lu", (unsigned long) t); +#endif + ret = savestring (ts); + ret[0] = history_comment_char; + + return ret; +} + +/* Place STRING at the end of the history list. The data field + is set to NULL. */ +void +add_history (const char *string) +{ + HIST_ENTRY *temp; + int new_length; + + if (history_stifled && (history_length == history_max_entries)) + { + register int i; + + /* If the history is stifled, and history_length is zero, + and it equals history_max_entries, we don't save items. */ + if (history_length == 0) + return; + + /* If there is something in the slot, then remove it. */ + if (the_history[0]) + (void) free_history_entry (the_history[0]); + + /* Copy the rest of the entries, moving down one slot. Copy includes + trailing NULL. */ + memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *)); + + new_length = history_length; + history_base++; + } + else + { + if (history_size == 0) + { + if (history_stifled && history_max_entries > 0) + history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE) + ? MAX_HISTORY_INITIAL_SIZE + : history_max_entries + 2; + else + history_size = DEFAULT_HISTORY_INITIAL_SIZE; + the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *)); + new_length = 1; + } + else + { + if (history_length == (history_size - 1)) + { + history_size += DEFAULT_HISTORY_GROW_SIZE; + the_history = (HIST_ENTRY **) + xrealloc (the_history, history_size * sizeof (HIST_ENTRY *)); + } + new_length = history_length + 1; + } + } + + temp = alloc_history_entry ((char *)string, hist_inittime ()); + + the_history[new_length] = (HIST_ENTRY *)NULL; + the_history[new_length - 1] = temp; + history_length = new_length; +} + +/* Change the time stamp of the most recent history entry to STRING. */ +void +add_history_time (const char *string) +{ + HIST_ENTRY *hs; + + if (string == 0 || history_length < 1) + return; + hs = the_history[history_length - 1]; + FREE (hs->timestamp); + hs->timestamp = savestring (string); +} + +/* Free HIST and return the data so the calling application can free it + if necessary and desired. */ +histdata_t +free_history_entry (HIST_ENTRY *hist) +{ + histdata_t x; + + if (hist == 0) + return ((histdata_t) 0); + FREE (hist->line); + FREE (hist->timestamp); + x = hist->data; + xfree (hist); + return (x); +} + +HIST_ENTRY * +copy_history_entry (HIST_ENTRY *hist) +{ + HIST_ENTRY *ret; + char *ts; + + if (hist == 0) + return hist; + + ret = alloc_history_entry (hist->line, (char *)NULL); + + ts = hist->timestamp ? savestring (hist->timestamp) : hist->timestamp; + ret->timestamp = ts; + + ret->data = hist->data; + + return ret; +} + +/* Make the history entry at WHICH have LINE and DATA. This returns + the old entry so you can dispose of the data. In the case of an + invalid WHICH, a NULL pointer is returned. */ +HIST_ENTRY * +replace_history_entry (int which, const char *line, histdata_t data) +{ + HIST_ENTRY *temp, *old_value; + + if (which < 0 || which >= history_length) + return ((HIST_ENTRY *)NULL); + + temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); + old_value = the_history[which]; + + temp->line = savestring (line); + temp->data = data; + temp->timestamp = savestring (old_value->timestamp); + the_history[which] = temp; + + return (old_value); +} + +/* Append LINE to the history line at offset WHICH, adding a newline to the + end of the current line first. This can be used to construct multi-line + history entries while reading lines from the history file. */ +void +_hs_append_history_line (int which, const char *line) +{ + HIST_ENTRY *hent; + size_t newlen, curlen, minlen; + char *newline; + + hent = the_history[which]; + curlen = strlen (hent->line); + minlen = curlen + strlen (line) + 2; /* min space needed */ + if (curlen > 256) /* XXX - for now */ + { + newlen = 512; /* now realloc in powers of 2 */ + /* we recalcluate every time; the operations are cheap */ + while (newlen < minlen) + newlen <<= 1; + } + else + newlen = minlen; + /* Assume that realloc returns the same pointer and doesn't try a new + alloc/copy if the new size is the same as the one last passed. */ + newline = realloc (hent->line, newlen); + if (newline) + { + hent->line = newline; + hent->line[curlen++] = '\n'; + strcpy (hent->line + curlen, line); + } +} + +/* Replace the DATA in the specified history entries, replacing OLD with + NEW. WHICH says which one(s) to replace: WHICH == -1 means to replace + all of the history entries where entry->data == OLD; WHICH == -2 means + to replace the `newest' history entry where entry->data == OLD; and + WHICH >= 0 means to replace that particular history entry's data, as + long as it matches OLD. */ +void +_hs_replace_history_data (int which, histdata_t *old, histdata_t *new) +{ + HIST_ENTRY *entry; + register int i, last; + + if (which < -2 || which >= history_length || history_length == 0 || the_history == 0) + return; + + if (which >= 0) + { + entry = the_history[which]; + if (entry && entry->data == old) + entry->data = new; + return; + } + + last = -1; + for (i = 0; i < history_length; i++) + { + entry = the_history[i]; + if (entry == 0) + continue; + if (entry->data == old) + { + last = i; + if (which == -1) + entry->data = new; + } + } + if (which == -2 && last >= 0) + { + entry = the_history[last]; + entry->data = new; /* XXX - we don't check entry->old */ + } +} + +/* Remove history element WHICH from the history. The removed + element is returned to you so you can free the line, data, + and containing structure. */ +HIST_ENTRY * +remove_history (int which) +{ + HIST_ENTRY *return_value; + register int i; +#if 1 + int nentries; + HIST_ENTRY **start, **end; +#endif + + if (which < 0 || which >= history_length || history_length == 0 || the_history == 0) + return ((HIST_ENTRY *)NULL); + + return_value = the_history[which]; + +#if 1 + /* Copy the rest of the entries, moving down one slot. Copy includes + trailing NULL. */ + nentries = history_length - which; + start = the_history + which; + end = start + 1; + memmove (start, end, nentries * sizeof (HIST_ENTRY *)); +#else + for (i = which; i < history_length; i++) + the_history[i] = the_history[i + 1]; +#endif + + history_length--; + + return (return_value); +} + +HIST_ENTRY ** +remove_history_range (int first, int last) +{ + HIST_ENTRY **return_value; + register int i; + int nentries; + HIST_ENTRY **start, **end; + + if (the_history == 0 || history_length == 0) + return ((HIST_ENTRY **)NULL); + if (first < 0 || first >= history_length || last < 0 || last >= history_length) + return ((HIST_ENTRY **)NULL); + if (first > last) + return (HIST_ENTRY **)NULL; + + nentries = last - first + 1; + return_value = (HIST_ENTRY **)malloc ((nentries + 1) * sizeof (HIST_ENTRY *)); + if (return_value == 0) + return return_value; + + /* Return all the deleted entries in a list */ + for (i = first ; i <= last; i++) + return_value[i - first] = the_history[i]; + return_value[i - first] = (HIST_ENTRY *)NULL; + + /* Copy the rest of the entries, moving down NENTRIES slots. Copy includes + trailing NULL. */ + start = the_history + first; + end = the_history + last + 1; + memmove (start, end, (history_length - last) * sizeof (HIST_ENTRY *)); + + history_length -= nentries; + + return (return_value); +} + +/* Stifle the history list, remembering only MAX number of lines. */ +void +stifle_history (int max) +{ + register int i, j; + + if (max < 0) + max = 0; + + if (history_length > max) + { + /* This loses because we cannot free the data. */ + for (i = 0, j = history_length - max; i < j; i++) + free_history_entry (the_history[i]); + + history_base = i; + for (j = 0, i = history_length - max; j < max; i++, j++) + the_history[j] = the_history[i]; + the_history[j] = (HIST_ENTRY *)NULL; + history_length = j; + } + + history_stifled = 1; + max_input_history = history_max_entries = max; +} + +/* Stop stifling the history. This returns the previous maximum + number of history entries. The value is positive if the history + was stifled, negative if it wasn't. */ +int +unstifle_history (void) +{ + if (history_stifled) + { + history_stifled = 0; + return (history_max_entries); + } + else + return (-history_max_entries); +} + +int +history_is_stifled (void) +{ + return (history_stifled); +} + +void +clear_history (void) +{ + register int i; + + /* This loses because we cannot free the data. */ + for (i = 0; i < history_length; i++) + { + free_history_entry (the_history[i]); + the_history[i] = (HIST_ENTRY *)NULL; + } + + history_offset = history_length = 0; + history_base = 1; /* reset history base to default */ +} diff --git a/bash-5.1/lib/readline/history.h b/bash-5.1/lib/readline/history.h new file mode 100644 index 0000000000000000000000000000000000000000..cc3de29a64231d083d7b282e2eb247d692dbe521 --- /dev/null +++ b/bash-5.1/lib/readline/history.h @@ -0,0 +1,286 @@ +/* history.h -- the names of functions that you can call in history. */ + +/* Copyright (C) 1989-2015 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. + + History 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. + + History 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 History. If not, see . +*/ + +#ifndef _HISTORY_H_ +#define _HISTORY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include /* XXX - for history timestamp code */ + +#if defined READLINE_LIBRARY +# include "rlstdc.h" +# include "rltypedefs.h" +#else +# include +# include +#endif + +#ifdef __STDC__ +typedef void *histdata_t; +#else +typedef char *histdata_t; +#endif + +/* The structure used to store a history entry. */ +typedef struct _hist_entry { + char *line; + char *timestamp; /* char * rather than time_t for read/write */ + histdata_t data; +} HIST_ENTRY; + +/* Size of the history-library-managed space in history entry HS. */ +#define HISTENT_BYTES(hs) (strlen ((hs)->line) + strlen ((hs)->timestamp)) + +/* A structure used to pass the current state of the history stuff around. */ +typedef struct _hist_state { + HIST_ENTRY **entries; /* Pointer to the entries themselves. */ + int offset; /* The location pointer within this array. */ + int length; /* Number of elements within this array. */ + int size; /* Number of slots allocated to this array. */ + int flags; +} HISTORY_STATE; + +/* Flag values for the `flags' member of HISTORY_STATE. */ +#define HS_STIFLED 0x01 + +/* Initialization and state management. */ + +/* Begin a session in which the history functions might be used. This + just initializes the interactive variables. */ +extern void using_history PARAMS((void)); + +/* Return the current HISTORY_STATE of the history. */ +extern HISTORY_STATE *history_get_history_state PARAMS((void)); + +/* Set the state of the current history array to STATE. */ +extern void history_set_history_state PARAMS((HISTORY_STATE *)); + +/* Manage the history list. */ + +/* Place STRING at the end of the history list. + The associated data field (if any) is set to NULL. */ +extern void add_history PARAMS((const char *)); + +/* Change the timestamp associated with the most recent history entry to + STRING. */ +extern void add_history_time PARAMS((const char *)); + +/* Remove an entry from the history list. WHICH is the magic number that + tells us which element to delete. The elements are numbered from 0. */ +extern HIST_ENTRY *remove_history PARAMS((int)); + +/* Remove a set of entries from the history list: FIRST to LAST, inclusive */ +extern HIST_ENTRY **remove_history_range PARAMS((int, int)); + +/* Allocate a history entry consisting of STRING and TIMESTAMP and return + a pointer to it. */ +extern HIST_ENTRY *alloc_history_entry PARAMS((char *, char *)); + +/* Copy the history entry H, but not the (opaque) data pointer */ +extern HIST_ENTRY *copy_history_entry PARAMS((HIST_ENTRY *)); + +/* Free the history entry H and return any application-specific data + associated with it. */ +extern histdata_t free_history_entry PARAMS((HIST_ENTRY *)); + +/* Make the history entry at WHICH have LINE and DATA. This returns + the old entry so you can dispose of the data. In the case of an + invalid WHICH, a NULL pointer is returned. */ +extern HIST_ENTRY *replace_history_entry PARAMS((int, const char *, histdata_t)); + +/* Clear the history list and start over. */ +extern void clear_history PARAMS((void)); + +/* Stifle the history list, remembering only MAX number of entries. */ +extern void stifle_history PARAMS((int)); + +/* Stop stifling the history. This returns the previous amount the + history was stifled by. The value is positive if the history was + stifled, negative if it wasn't. */ +extern int unstifle_history PARAMS((void)); + +/* Return 1 if the history is stifled, 0 if it is not. */ +extern int history_is_stifled PARAMS((void)); + +/* Information about the history list. */ + +/* Return a NULL terminated array of HIST_ENTRY which is the current input + history. Element 0 of this list is the beginning of time. If there + is no history, return NULL. */ +extern HIST_ENTRY **history_list PARAMS((void)); + +/* Returns the number which says what history element we are now + looking at. */ +extern int where_history PARAMS((void)); + +/* Return the history entry at the current position, as determined by + history_offset. If there is no entry there, return a NULL pointer. */ +extern HIST_ENTRY *current_history PARAMS((void)); + +/* Return the history entry which is logically at OFFSET in the history + array. OFFSET is relative to history_base. */ +extern HIST_ENTRY *history_get PARAMS((int)); + +/* Return the timestamp associated with the HIST_ENTRY * passed as an + argument */ +extern time_t history_get_time PARAMS((HIST_ENTRY *)); + +/* Return the number of bytes that the primary history entries are using. + This just adds up the lengths of the_history->lines. */ +extern int history_total_bytes PARAMS((void)); + +/* Moving around the history list. */ + +/* Set the position in the history list to POS. */ +extern int history_set_pos PARAMS((int)); + +/* Back up history_offset to the previous history entry, and return + a pointer to that entry. If there is no previous entry, return + a NULL pointer. */ +extern HIST_ENTRY *previous_history PARAMS((void)); + +/* Move history_offset forward to the next item in the input_history, + and return the a pointer to that entry. If there is no next entry, + return a NULL pointer. */ +extern HIST_ENTRY *next_history PARAMS((void)); + +/* Searching the history list. */ + +/* Search the history for STRING, starting at history_offset. + If DIRECTION < 0, then the search is through previous entries, + else through subsequent. If the string is found, then + current_history () is the history entry, and the value of this function + is the offset in the line of that history entry that the string was + found in. Otherwise, nothing is changed, and a -1 is returned. */ +extern int history_search PARAMS((const char *, int)); + +/* Search the history for STRING, starting at history_offset. + The search is anchored: matching lines must begin with string. + DIRECTION is as in history_search(). */ +extern int history_search_prefix PARAMS((const char *, int)); + +/* Search for STRING in the history list, starting at POS, an + absolute index into the list. DIR, if negative, says to search + backwards from POS, else forwards. + Returns the absolute index of the history element where STRING + was found, or -1 otherwise. */ +extern int history_search_pos PARAMS((const char *, int, int)); + +/* Managing the history file. */ + +/* Add the contents of FILENAME to the history list, a line at a time. + If FILENAME is NULL, then read from ~/.history. Returns 0 if + successful, or errno if not. */ +extern int read_history PARAMS((const char *)); + +/* Read a range of lines from FILENAME, adding them to the history list. + Start reading at the FROM'th line and end at the TO'th. If FROM + is zero, start at the beginning. If TO is less than FROM, read + until the end of the file. If FILENAME is NULL, then read from + ~/.history. Returns 0 if successful, or errno if not. */ +extern int read_history_range PARAMS((const char *, int, int)); + +/* Write the current history to FILENAME. If FILENAME is NULL, + then write the history list to ~/.history. Values returned + are as in read_history (). */ +extern int write_history PARAMS((const char *)); + +/* Append NELEMENT entries to FILENAME. The entries appended are from + the end of the list minus NELEMENTs up to the end of the list. */ +extern int append_history PARAMS((int, const char *)); + +/* Truncate the history file, leaving only the last NLINES lines. */ +extern int history_truncate_file PARAMS((const char *, int)); + +/* History expansion. */ + +/* Expand the string STRING, placing the result into OUTPUT, a pointer + to a string. Returns: + + 0) If no expansions took place (or, if the only change in + the text was the de-slashifying of the history expansion + character) + 1) If expansions did take place + -1) If there was an error in expansion. + 2) If the returned line should just be printed. + + If an error occurred in expansion, then OUTPUT contains a descriptive + error message. */ +extern int history_expand PARAMS((char *, char **)); + +/* Extract a string segment consisting of the FIRST through LAST + arguments present in STRING. Arguments are broken up as in + the shell. */ +extern char *history_arg_extract PARAMS((int, int, const char *)); + +/* Return the text of the history event beginning at the current + offset into STRING. Pass STRING with *INDEX equal to the + history_expansion_char that begins this specification. + DELIMITING_QUOTE is a character that is allowed to end the string + specification for what to search for in addition to the normal + characters `:', ` ', `\t', `\n', and sometimes `?'. */ +extern char *get_history_event PARAMS((const char *, int *, int)); + +/* Return an array of tokens, much as the shell might. The tokens are + parsed out of STRING. */ +extern char **history_tokenize PARAMS((const char *)); + +/* Exported history variables. */ +extern int history_base; +extern int history_length; +extern int history_max_entries; +extern int history_offset; + +extern int history_lines_read_from_file; +extern int history_lines_written_to_file; + +extern char history_expansion_char; +extern char history_subst_char; +extern char *history_word_delimiters; +extern char history_comment_char; +extern char *history_no_expand_chars; +extern char *history_search_delimiter_chars; + +extern int history_quotes_inhibit_expansion; +extern int history_quoting_state; + +extern int history_write_timestamps; + +/* These two are undocumented; the second is reserved for future use */ +extern int history_multiline_entries; +extern int history_file_version; + +/* Backwards compatibility */ +extern int max_input_history; + +/* If set, this function is called to decide whether or not a particular + history expansion should be treated as a special case for the calling + application and not expanded. */ +extern rl_linebuf_func_t *history_inhibit_expansion_function; + +#ifdef __cplusplus +} +#endif + +#endif /* !_HISTORY_H_ */ diff --git a/bash-5.1/lib/readline/histsearch.c b/bash-5.1/lib/readline/histsearch.c new file mode 100644 index 0000000000000000000000000000000000000000..7a426c96781429785f1b44ad3241da43e63df545 --- /dev/null +++ b/bash-5.1/lib/readline/histsearch.c @@ -0,0 +1,287 @@ +/* histsearch.c -- searching the history list. */ + +/* Copyright (C) 1989, 1992-2009,2017 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. + + History 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. + + History 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 History. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#if defined (HAVE_FNMATCH) +# include +#endif + +#include "history.h" +#include "histlib.h" +#include "xmalloc.h" + +/* The list of alternate characters that can delimit a history search + string. */ +char *history_search_delimiter_chars = (char *)NULL; + +static int history_search_internal PARAMS((const char *, int, int)); + +/* Search the history for STRING, starting at history_offset. + If DIRECTION < 0, then the search is through previous entries, else + through subsequent. If ANCHORED is non-zero, the string must + appear at the beginning of a history line, otherwise, the string + may appear anywhere in the line. If the string is found, then + current_history () is the history entry, and the value of this + function is the offset in the line of that history entry that the + string was found in. Otherwise, nothing is changed, and a -1 is + returned. */ + +static int +history_search_internal (const char *string, int direction, int flags) +{ + register int i, reverse; + register char *line; + register int line_index; + int string_len, anchored, patsearch; + HIST_ENTRY **the_history; /* local */ + + i = history_offset; + reverse = (direction < 0); + anchored = (flags & ANCHORED_SEARCH); +#if defined (HAVE_FNMATCH) + patsearch = (flags & PATTERN_SEARCH); +#else + patsearch = 0; +#endif + + /* Take care of trivial cases first. */ + if (string == 0 || *string == '\0') + return (-1); + + if (!history_length || ((i >= history_length) && !reverse)) + return (-1); + + if (reverse && (i >= history_length)) + i = history_length - 1; + +#define NEXT_LINE() do { if (reverse) i--; else i++; } while (0) + + the_history = history_list (); + string_len = strlen (string); + while (1) + { + /* Search each line in the history list for STRING. */ + + /* At limit for direction? */ + if ((reverse && i < 0) || (!reverse && i == history_length)) + return (-1); + + line = the_history[i]->line; + line_index = strlen (line); + + /* If STRING is longer than line, no match. */ + if (patsearch == 0 && (string_len > line_index)) + { + NEXT_LINE (); + continue; + } + + /* Handle anchored searches first. */ + if (anchored == ANCHORED_SEARCH) + { +#if defined (HAVE_FNMATCH) + if (patsearch) + { + if (fnmatch (string, line, 0) == 0) + { + history_offset = i; + return (0); + } + } + else +#endif + if (STREQN (string, line, string_len)) + { + history_offset = i; + return (0); + } + + NEXT_LINE (); + continue; + } + + /* Do substring search. */ + if (reverse) + { + line_index -= (patsearch == 0) ? string_len : 1; + + while (line_index >= 0) + { +#if defined (HAVE_FNMATCH) + if (patsearch) + { + if (fnmatch (string, line + line_index, 0) == 0) + { + history_offset = i; + return (line_index); + } + } + else +#endif + if (STREQN (string, line + line_index, string_len)) + { + history_offset = i; + return (line_index); + } + line_index--; + } + } + else + { + register int limit; + + limit = line_index - string_len + 1; + line_index = 0; + + while (line_index < limit) + { +#if defined (HAVE_FNMATCH) + if (patsearch) + { + if (fnmatch (string, line + line_index, 0) == 0) + { + history_offset = i; + return (line_index); + } + } + else +#endif + if (STREQN (string, line + line_index, string_len)) + { + history_offset = i; + return (line_index); + } + line_index++; + } + } + NEXT_LINE (); + } +} + +int +_hs_history_patsearch (const char *string, int direction, int flags) +{ + char *pat; + size_t len, start; + int ret, unescaped_backslash; + +#if defined (HAVE_FNMATCH) + /* Assume that the string passed does not have a leading `^' and any + anchored search request is captured in FLAGS */ + len = strlen (string); + ret = len - 1; + /* fnmatch is required to reject a pattern that ends with an unescaped + backslash */ + if (unescaped_backslash = (string[ret] == '\\')) + { + while (ret > 0 && string[--ret] == '\\') + unescaped_backslash = 1 - unescaped_backslash; + } + if (unescaped_backslash) + return -1; + pat = (char *)xmalloc (len + 3); + /* If the search string is not anchored, we'll be calling fnmatch (assuming + we have it). Prefix a `*' to the front of the search string so we search + anywhere in the line. */ + if ((flags & ANCHORED_SEARCH) == 0 && string[0] != '*') + { + pat[0] = '*'; + start = 1; + len++; + } + else + { + start = 0; + } + + /* Attempt to reduce the number of searches by tacking a `*' onto the end + of a pattern that doesn't have one. Assume a pattern that ends in a + backslash contains an even number of trailing backslashes; we check + above */ + strcpy (pat + start, string); + if (pat[len - 1] != '*') + { + pat[len] = '*'; /* XXX */ + pat[len+1] = '\0'; + } +#else + pat = string; +#endif + + ret = history_search_internal (pat, direction, flags|PATTERN_SEARCH); + + if (pat != string) + free (pat); + return ret; +} + +/* Do a non-anchored search for STRING through the history in DIRECTION. */ +int +history_search (const char *string, int direction) +{ + return (history_search_internal (string, direction, NON_ANCHORED_SEARCH)); +} + +/* Do an anchored search for string through the history in DIRECTION. */ +int +history_search_prefix (const char *string, int direction) +{ + return (history_search_internal (string, direction, ANCHORED_SEARCH)); +} + +/* Search for STRING in the history list. DIR is < 0 for searching + backwards. POS is an absolute index into the history list at + which point to begin searching. */ +int +history_search_pos (const char *string, int dir, int pos) +{ + int ret, old; + + old = where_history (); + history_set_pos (pos); + if (history_search (string, dir) == -1) + { + history_set_pos (old); + return (-1); + } + ret = where_history (); + history_set_pos (old); + return ret; +} diff --git a/bash-5.1/lib/readline/input.c b/bash-5.1/lib/readline/input.c new file mode 100644 index 0000000000000000000000000000000000000000..61b0fde3c87f25644fd9ff7ec1ef0e02d14c403c --- /dev/null +++ b/bash-5.1/lib/readline/input.c @@ -0,0 +1,715 @@ +/* input.c -- character input functions for readline. */ + +/* Copyright (C) 1994-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (__TANDEM) +# define _XOPEN_SOURCE_EXTENDED 1 +# define _TANDEM_SOURCE 1 +# include +#endif + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include +#if defined (HAVE_SYS_FILE_H) +# include +#endif /* HAVE_SYS_FILE_H */ + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include + +#include "posixselect.h" + +#if defined (FIONREAD_IN_SYS_IOCTL) +# include +#endif + +#include +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +/* Some standard library routines. */ +#include "readline.h" + +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +/* What kind of non-blocking I/O do we have? */ +#if !defined (O_NDELAY) && defined (O_NONBLOCK) +# define O_NDELAY O_NONBLOCK /* Posix style */ +#endif + +#if defined (HAVE_PSELECT) +extern sigset_t _rl_orig_sigset; +#endif + +/* Non-null means it is a pointer to a function to run while waiting for + character input. */ +rl_hook_func_t *rl_event_hook = (rl_hook_func_t *)NULL; + +/* A function to call if a read(2) is interrupted by a signal. */ +rl_hook_func_t *rl_signal_event_hook = (rl_hook_func_t *)NULL; + +/* A function to replace _rl_input_available for applications using the + callback interface. */ +rl_hook_func_t *rl_input_available_hook = (rl_hook_func_t *)NULL; + +rl_getc_func_t *rl_getc_function = rl_getc; + +static int _keyboard_input_timeout = 100000; /* 0.1 seconds; it's in usec */ + +static int ibuffer_space PARAMS((void)); +static int rl_get_char PARAMS((int *)); +static int rl_gather_tyi PARAMS((void)); + +/* Windows isatty returns true for every character device, including the null + device, so we need to perform additional checks. */ +#if defined (_WIN32) && !defined (__CYGWIN__) +#include +#include +#define WIN32_LEAN_AND_MEAN 1 +#include + +int +win32_isatty (int fd) +{ + if (_isatty(fd)) + { + HANDLE h; + DWORD ignored; + + if ((h = (HANDLE) _get_osfhandle (fd)) == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return 0; + } + if (GetConsoleMode (h, &ignored) != 0) + return 1; + } + errno = ENOTTY; + return 0; +} + +#define isatty(x) win32_isatty(x) +#endif + +/* **************************************************************** */ +/* */ +/* Character Input Buffering */ +/* */ +/* **************************************************************** */ + +static int pop_index, push_index; +static unsigned char ibuffer[512]; +static int ibuffer_len = sizeof (ibuffer) - 1; + +#define any_typein (push_index != pop_index) + +int +_rl_any_typein (void) +{ + return any_typein; +} + +int +_rl_pushed_input_available (void) +{ + return (push_index != pop_index); +} + +/* Return the amount of space available in the buffer for stuffing + characters. */ +static int +ibuffer_space (void) +{ + if (pop_index > push_index) + return (pop_index - push_index - 1); + else + return (ibuffer_len - (push_index - pop_index)); +} + +/* Get a key from the buffer of characters to be read. + Return the key in KEY. + Result is non-zero if there was a key, or 0 if there wasn't. */ +static int +rl_get_char (int *key) +{ + if (push_index == pop_index) + return (0); + + *key = ibuffer[pop_index++]; +#if 0 + if (pop_index >= ibuffer_len) +#else + if (pop_index > ibuffer_len) +#endif + pop_index = 0; + + return (1); +} + +/* Stuff KEY into the *front* of the input buffer. + Returns non-zero if successful, zero if there is + no space left in the buffer. */ +int +_rl_unget_char (int key) +{ + if (ibuffer_space ()) + { + pop_index--; + if (pop_index < 0) + pop_index = ibuffer_len; + ibuffer[pop_index] = key; + return (1); + } + return (0); +} + +/* If a character is available to be read, then read it and stuff it into + IBUFFER. Otherwise, just return. Returns number of characters read + (0 if none available) and -1 on error (EIO). */ +static int +rl_gather_tyi (void) +{ + int tty; + register int tem, result; + int chars_avail, k; + char input; +#if defined(HAVE_SELECT) + fd_set readfds, exceptfds; + struct timeval timeout; +#endif + + chars_avail = 0; + input = 0; + tty = fileno (rl_instream); + +#if defined (HAVE_SELECT) + FD_ZERO (&readfds); + FD_ZERO (&exceptfds); + FD_SET (tty, &readfds); + FD_SET (tty, &exceptfds); + USEC_TO_TIMEVAL (_keyboard_input_timeout, timeout); + result = select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout); + if (result <= 0) + return 0; /* Nothing to read. */ +#endif + + result = -1; + errno = 0; +#if defined (FIONREAD) + result = ioctl (tty, FIONREAD, &chars_avail); + if (result == -1 && errno == EIO) + return -1; + if (result == -1) + chars_avail = 0; +#endif + +#if defined (O_NDELAY) + if (result == -1) + { + tem = fcntl (tty, F_GETFL, 0); + + fcntl (tty, F_SETFL, (tem | O_NDELAY)); + chars_avail = read (tty, &input, 1); + + fcntl (tty, F_SETFL, tem); + if (chars_avail == -1 && errno == EAGAIN) + return 0; + if (chars_avail == -1 && errno == EIO) + return -1; + if (chars_avail == 0) /* EOF */ + { + rl_stuff_char (EOF); + return (0); + } + } +#endif /* O_NDELAY */ + +#if defined (__MINGW32__) + /* Use getch/_kbhit to check for available console input, in the same way + that we read it normally. */ + chars_avail = isatty (tty) ? _kbhit () : 0; + result = 0; +#endif + + /* If there's nothing available, don't waste time trying to read + something. */ + if (chars_avail <= 0) + return 0; + + tem = ibuffer_space (); + + if (chars_avail > tem) + chars_avail = tem; + + /* One cannot read all of the available input. I can only read a single + character at a time, or else programs which require input can be + thwarted. If the buffer is larger than one character, I lose. + Damn! */ + if (tem < ibuffer_len) + chars_avail = 0; + + if (result != -1) + { + while (chars_avail--) + { + RL_CHECK_SIGNALS (); + k = (*rl_getc_function) (rl_instream); + if (rl_stuff_char (k) == 0) + break; /* some problem; no more room */ + if (k == NEWLINE || k == RETURN) + break; + } + } + else + { + if (chars_avail) + rl_stuff_char (input); + } + + return 1; +} + +int +rl_set_keyboard_input_timeout (int u) +{ + int o; + + o = _keyboard_input_timeout; + if (u >= 0) + _keyboard_input_timeout = u; + return (o); +} + +/* Is there input available to be read on the readline input file + descriptor? Only works if the system has select(2) or FIONREAD. + Uses the value of _keyboard_input_timeout as the timeout; if another + readline function wants to specify a timeout and not leave it up to + the user, it should use _rl_input_queued(timeout_value_in_microseconds) + instead. */ +int +_rl_input_available (void) +{ +#if defined(HAVE_SELECT) + fd_set readfds, exceptfds; + struct timeval timeout; +#endif +#if !defined (HAVE_SELECT) && defined(FIONREAD) + int chars_avail; +#endif + int tty; + + if (rl_input_available_hook) + return (*rl_input_available_hook) (); + + tty = fileno (rl_instream); + +#if defined (HAVE_SELECT) + FD_ZERO (&readfds); + FD_ZERO (&exceptfds); + FD_SET (tty, &readfds); + FD_SET (tty, &exceptfds); + USEC_TO_TIMEVAL (_keyboard_input_timeout, timeout); + return (select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout) > 0); +#else + +#if defined (FIONREAD) + if (ioctl (tty, FIONREAD, &chars_avail) == 0) + return (chars_avail); +#endif + +#endif + +#if defined (__MINGW32__) + if (isatty (tty)) + return (_kbhit ()); +#endif + + return 0; +} + +int +_rl_nchars_available () +{ + int chars_avail, fd, result; + + chars_avail = 0; + +#if defined (FIONREAD) + fd = fileno (rl_instream); + errno = 0; + result = ioctl (fd, FIONREAD, &chars_avail); + if (result == -1 && errno == EIO) + return -1; +#endif + + return chars_avail; +} + +int +_rl_input_queued (int t) +{ + int old_timeout, r; + + old_timeout = rl_set_keyboard_input_timeout (t); + r = _rl_input_available (); + rl_set_keyboard_input_timeout (old_timeout); + return r; +} + +void +_rl_insert_typein (int c) +{ + int key, t, i; + char *string; + + i = key = 0; + string = (char *)xmalloc (ibuffer_len + 1); + string[i++] = (char) c; + + while ((t = rl_get_char (&key)) && + _rl_keymap[key].type == ISFUNC && + _rl_keymap[key].function == rl_insert) + string[i++] = key; + + if (t) + _rl_unget_char (key); + + string[i] = '\0'; + rl_insert_text (string); + xfree (string); +} + +/* Add KEY to the buffer of characters to be read. Returns 1 if the + character was stuffed correctly; 0 otherwise. */ +int +rl_stuff_char (int key) +{ + if (ibuffer_space () == 0) + return 0; + + if (key == EOF) + { + key = NEWLINE; + rl_pending_input = EOF; + RL_SETSTATE (RL_STATE_INPUTPENDING); + } + ibuffer[push_index++] = key; +#if 0 + if (push_index >= ibuffer_len) +#else + if (push_index > ibuffer_len) +#endif + push_index = 0; + + return 1; +} + +/* Make C be the next command to be executed. */ +int +rl_execute_next (int c) +{ + rl_pending_input = c; + RL_SETSTATE (RL_STATE_INPUTPENDING); + return 0; +} + +/* Clear any pending input pushed with rl_execute_next() */ +int +rl_clear_pending_input (void) +{ + rl_pending_input = 0; + RL_UNSETSTATE (RL_STATE_INPUTPENDING); + return 0; +} + +/* **************************************************************** */ +/* */ +/* Character Input */ +/* */ +/* **************************************************************** */ + +/* Read a key, including pending input. */ +int +rl_read_key (void) +{ + int c, r; + + if (rl_pending_input) + { + c = rl_pending_input; /* XXX - cast to unsigned char if > 0? */ + rl_clear_pending_input (); + } + else + { + /* If input is coming from a macro, then use that. */ + if (c = _rl_next_macro_key ()) + return ((unsigned char)c); + + /* If the user has an event function, then call it periodically. */ + if (rl_event_hook) + { + while (rl_event_hook) + { + if (rl_get_char (&c) != 0) + break; + + if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */ + { + rl_done = 1; + return (errno == EIO ? (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF) : '\n'); + } + else if (r > 0) /* read something */ + continue; + + RL_CHECK_SIGNALS (); + if (rl_done) /* XXX - experimental */ + return ('\n'); + (*rl_event_hook) (); + } + } + else + { + if (rl_get_char (&c) == 0) + c = (*rl_getc_function) (rl_instream); +/* fprintf(stderr, "rl_read_key: calling RL_CHECK_SIGNALS: _rl_caught_signal = %d\r\n", _rl_caught_signal); */ + RL_CHECK_SIGNALS (); + } + } + + return (c); +} + +int +rl_getc (FILE *stream) +{ + int result; + unsigned char c; +#if defined (HAVE_PSELECT) + sigset_t empty_set; + fd_set readfds; +#endif + + while (1) + { + RL_CHECK_SIGNALS (); + + /* We know at this point that _rl_caught_signal == 0 */ + +#if defined (__MINGW32__) + if (isatty (fileno (stream))) + return (_getch ()); /* "There is no error return." */ +#endif + result = 0; +#if defined (HAVE_PSELECT) + FD_ZERO (&readfds); + FD_SET (fileno (stream), &readfds); +# if defined (HANDLE_SIGNALS) + result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &_rl_orig_sigset); +# else + sigemptyset (&empty_set); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &empty_set); + result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &empty_set); +# endif /* HANDLE_SIGNALS */ +#endif + if (result >= 0) + result = read (fileno (stream), &c, sizeof (unsigned char)); + + if (result == sizeof (unsigned char)) + return (c); + + /* If zero characters are returned, then the file that we are + reading from is empty! Return EOF in that case. */ + if (result == 0) + return (EOF); + +#if defined (__BEOS__) + if (errno == EINTR) + continue; +#endif + +#if defined (EWOULDBLOCK) +# define X_EWOULDBLOCK EWOULDBLOCK +#else +# define X_EWOULDBLOCK -99 +#endif + +#if defined (EAGAIN) +# define X_EAGAIN EAGAIN +#else +# define X_EAGAIN -99 +#endif + + if (errno == X_EWOULDBLOCK || errno == X_EAGAIN) + { + if (sh_unset_nodelay_mode (fileno (stream)) < 0) + return (EOF); + continue; + } + +#undef X_EWOULDBLOCK +#undef X_EAGAIN + +/* fprintf(stderr, "rl_getc: result = %d errno = %d\n", result, errno); */ + +handle_error: + /* If the error that we received was EINTR, then try again, + this is simply an interrupted system call to read (). We allow + the read to be interrupted if we caught SIGHUP, SIGTERM, or any + of the other signals readline treats specially. If the + application sets an event hook, call it for other signals. + Otherwise (not EINTR), some error occurred, also signifying EOF. */ + if (errno != EINTR) + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); + /* fatal signals of interest */ +#if defined (SIGHUP) + else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM) +#else + else if (_rl_caught_signal == SIGTERM) +#endif + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); + /* keyboard-generated signals of interest */ +#if defined (SIGQUIT) + else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT) +#else + else if (_rl_caught_signal == SIGINT) +#endif + RL_CHECK_SIGNALS (); +#if defined (SIGTSTP) + else if (_rl_caught_signal == SIGTSTP) + RL_CHECK_SIGNALS (); +#endif + /* non-keyboard-generated signals of interest */ +#if defined (SIGWINCH) + else if (_rl_caught_signal == SIGWINCH) + RL_CHECK_SIGNALS (); +#endif /* SIGWINCH */ +#if defined (SIGALRM) + else if (_rl_caught_signal == SIGALRM +# if defined (SIGVTALRM) + || _rl_caught_signal == SIGVTALRM +# endif + ) + RL_CHECK_SIGNALS (); +#endif /* SIGALRM */ + + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); + } +} + +#if defined (HANDLE_MULTIBYTE) +/* read multibyte char */ +int +_rl_read_mbchar (char *mbchar, int size) +{ + int mb_len, c; + size_t mbchar_bytes_length; + wchar_t wc; + mbstate_t ps, ps_back; + + memset(&ps, 0, sizeof (mbstate_t)); + memset(&ps_back, 0, sizeof (mbstate_t)); + + mb_len = 0; + while (mb_len < size) + { + c = (mb_len == 0) ? _rl_bracketed_read_key () : rl_read_key (); + + if (c < 0) + break; + + mbchar[mb_len++] = c; + + mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps); + if (mbchar_bytes_length == (size_t)(-1)) + break; /* invalid byte sequence for the current locale */ + else if (mbchar_bytes_length == (size_t)(-2)) + { + /* shorted bytes */ + ps = ps_back; + continue; + } + else if (mbchar_bytes_length == 0) + { + mbchar[0] = '\0'; /* null wide character */ + mb_len = 1; + break; + } + else if (mbchar_bytes_length > (size_t)(0)) + break; + } + + return mb_len; +} + +/* Read a multibyte-character string whose first character is FIRST into + the buffer MB of length MLEN. Returns the last character read, which + may be FIRST. Used by the search functions, among others. Very similar + to _rl_read_mbchar. */ +int +_rl_read_mbstring (int first, char *mb, int mlen) +{ + int i, c, n; + mbstate_t ps; + + c = first; + memset (mb, 0, mlen); + for (i = 0; c >= 0 && i < mlen; i++) + { + mb[i] = (char)c; + memset (&ps, 0, sizeof (mbstate_t)); + n = _rl_get_char_len (mb, &ps); + if (n == -2) + { + /* Read more for multibyte character */ + RL_SETSTATE (RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE (RL_STATE_MOREINPUT); + } + else + break; + } + return c; +} +#endif /* HANDLE_MULTIBYTE */ diff --git a/bash-5.1/lib/readline/isearch.c b/bash-5.1/lib/readline/isearch.c new file mode 100644 index 0000000000000000000000000000000000000000..080ba3cbb9c56ca617a306873c731b55ef561e0e --- /dev/null +++ b/bash-5.1/lib/readline/isearch.c @@ -0,0 +1,890 @@ +/* isearch.c - incremental searching */ + +/* **************************************************************** */ +/* */ +/* I-Search and Searching */ +/* */ +/* **************************************************************** */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif + +#include "rldefs.h" +#include "rlmbutil.h" + +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +/* Variables exported to other files in the readline library. */ +char *_rl_isearch_terminators = (char *)NULL; + +_rl_search_cxt *_rl_iscxt = 0; + +/* Variables imported from other files in the readline library. */ +extern HIST_ENTRY *_rl_saved_line_for_history; + +static int rl_search_history PARAMS((int, int)); + +static _rl_search_cxt *_rl_isearch_init PARAMS((int)); +static void _rl_isearch_fini PARAMS((_rl_search_cxt *)); + +/* Last line found by the current incremental search, so we don't `find' + identical lines many times in a row. Now part of isearch context. */ +/* static char *prev_line_found; */ + +/* Last search string and its length. */ +static char *last_isearch_string; +static int last_isearch_string_len; + +static char * const default_isearch_terminators = "\033\012"; + +_rl_search_cxt * +_rl_scxt_alloc (int type, int flags) +{ + _rl_search_cxt *cxt; + + cxt = (_rl_search_cxt *)xmalloc (sizeof (_rl_search_cxt)); + + cxt->type = type; + cxt->sflags = flags; + + cxt->search_string = 0; + cxt->search_string_size = cxt->search_string_index = 0; + + cxt->lines = 0; + cxt->allocated_line = 0; + cxt->hlen = cxt->hindex = 0; + + cxt->save_point = rl_point; + cxt->save_mark = rl_mark; + cxt->save_line = where_history (); + cxt->last_found_line = cxt->save_line; + cxt->prev_line_found = 0; + + cxt->save_undo_list = 0; + + cxt->keymap = _rl_keymap; + cxt->okeymap = _rl_keymap; + + cxt->history_pos = 0; + cxt->direction = 0; + + cxt->prevc = cxt->lastc = 0; + + cxt->sline = 0; + cxt->sline_len = cxt->sline_index = 0; + + cxt->search_terminators = 0; + + return cxt; +} + +void +_rl_scxt_dispose (_rl_search_cxt *cxt, int flags) +{ + FREE (cxt->search_string); + FREE (cxt->allocated_line); + FREE (cxt->lines); + + xfree (cxt); +} + +/* Search backwards through the history looking for a string which is typed + interactively. Start with the current line. */ +int +rl_reverse_search_history (int sign, int key) +{ + return (rl_search_history (-sign, key)); +} + +/* Search forwards through the history looking for a string which is typed + interactively. Start with the current line. */ +int +rl_forward_search_history (int sign, int key) +{ + return (rl_search_history (sign, key)); +} + +/* Display the current state of the search in the echo-area. + SEARCH_STRING contains the string that is being searched for, + DIRECTION is zero for forward, or non-zero for reverse, + WHERE is the history list number of the current line. If it is + -1, then this line is the starting one. */ +static void +rl_display_search (char *search_string, int flags, int where) +{ + char *message; + int msglen, searchlen; + + searchlen = (search_string && *search_string) ? strlen (search_string) : 0; + + message = (char *)xmalloc (searchlen + 64); + msglen = 0; + +#if defined (NOTDEF) + if (where != -1) + { + sprintf (message, "[%d]", where + history_base); + msglen = strlen (message); + } +#endif /* NOTDEF */ + + message[msglen++] = '('; + + if (flags & SF_FAILED) + { + strcpy (message + msglen, "failed "); + msglen += 7; + } + + if (flags & SF_REVERSE) + { + strcpy (message + msglen, "reverse-"); + msglen += 8; + } + + strcpy (message + msglen, "i-search)`"); + msglen += 10; + + if (search_string && *search_string) + { + strcpy (message + msglen, search_string); + msglen += searchlen; + } + else + _rl_optimize_redisplay (); + + strcpy (message + msglen, "': "); + + rl_message ("%s", message); + xfree (message); + (*rl_redisplay_function) (); +} + +static _rl_search_cxt * +_rl_isearch_init (int direction) +{ + _rl_search_cxt *cxt; + register int i; + HIST_ENTRY **hlist; + + cxt = _rl_scxt_alloc (RL_SEARCH_ISEARCH, 0); + if (direction < 0) + cxt->sflags |= SF_REVERSE; + + cxt->search_terminators = _rl_isearch_terminators ? _rl_isearch_terminators + : default_isearch_terminators; + + /* Create an array of pointers to the lines that we want to search. */ + hlist = history_list (); + rl_maybe_replace_line (); + i = 0; + if (hlist) + for (i = 0; hlist[i]; i++); + + /* Allocate space for this many lines, +1 for the current input line, + and remember those lines. */ + cxt->lines = (char **)xmalloc ((1 + (cxt->hlen = i)) * sizeof (char *)); + for (i = 0; i < cxt->hlen; i++) + cxt->lines[i] = hlist[i]->line; + + if (_rl_saved_line_for_history) + cxt->lines[i] = _rl_saved_line_for_history->line; + else + { + /* Keep track of this so we can free it. */ + cxt->allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer)); + strcpy (cxt->allocated_line, &rl_line_buffer[0]); + cxt->lines[i] = cxt->allocated_line; + } + + cxt->hlen++; + + /* The line where we start the search. */ + cxt->history_pos = cxt->save_line; + + rl_save_prompt (); + + /* Initialize search parameters. */ + cxt->search_string = (char *)xmalloc (cxt->search_string_size = 128); + cxt->search_string[cxt->search_string_index = 0] = '\0'; + + /* Normalize DIRECTION into 1 or -1. */ + cxt->direction = (direction >= 0) ? 1 : -1; + + cxt->sline = rl_line_buffer; + cxt->sline_len = strlen (cxt->sline); + cxt->sline_index = rl_point; + + _rl_iscxt = cxt; /* save globally */ + + /* experimental right now */ + _rl_init_executing_keyseq (); + + return cxt; +} + +static void +_rl_isearch_fini (_rl_search_cxt *cxt) +{ + /* First put back the original state. */ + rl_replace_line (cxt->lines[cxt->save_line], 0); + + rl_restore_prompt (); + + /* Save the search string for possible later use. */ + FREE (last_isearch_string); + last_isearch_string = cxt->search_string; + last_isearch_string_len = cxt->search_string_index; + cxt->search_string = 0; + + if (cxt->last_found_line < cxt->save_line) + rl_get_previous_history (cxt->save_line - cxt->last_found_line, 0); + else + rl_get_next_history (cxt->last_found_line - cxt->save_line, 0); + + /* If the string was not found, put point at the end of the last matching + line. If last_found_line == orig_line, we didn't find any matching + history lines at all, so put point back in its original position. */ + if (cxt->sline_index < 0) + { + if (cxt->last_found_line == cxt->save_line) + cxt->sline_index = cxt->save_point; + else + cxt->sline_index = strlen (rl_line_buffer); + rl_mark = cxt->save_mark; + rl_deactivate_mark (); + } + + rl_point = cxt->sline_index; + /* Don't worry about where to put the mark here; rl_get_previous_history + and rl_get_next_history take care of it. + If we want to highlight the search string, this is where to set the + point and mark to do it. */ + _rl_fix_point (0); + rl_deactivate_mark (); + +/* _rl_optimize_redisplay (); */ + rl_clear_message (); +} + +/* XXX - we could use _rl_bracketed_read_mbstring () here. */ +int +_rl_search_getchar (_rl_search_cxt *cxt) +{ + int c; + + /* Read a key and decide how to proceed. */ + RL_SETSTATE(RL_STATE_MOREINPUT); + c = cxt->lastc = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + +#if defined (HANDLE_MULTIBYTE) + /* This ends up with C (and LASTC) being set to the last byte of the + multibyte character. In most cases c == lastc == mb[0] */ + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + c = cxt->lastc = _rl_read_mbstring (cxt->lastc, cxt->mb, MB_LEN_MAX); +#endif + + RL_CHECK_SIGNALS (); + return c; +} + +#define ENDSRCH_CHAR(c) \ + ((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G'))) + +/* Process just-read character C according to isearch context CXT. Return + -1 if the caller should just free the context and return, 0 if we should + break out of the loop, and 1 if we should continue to read characters. */ +int +_rl_isearch_dispatch (_rl_search_cxt *cxt, int c) +{ + int n, wstart, wlen, limit, cval, incr; + char *paste; + size_t pastelen; + int j; + rl_command_func_t *f; + + f = (rl_command_func_t *)NULL; + + if (c < 0) + { + cxt->sflags |= SF_FAILED; + cxt->history_pos = cxt->last_found_line; + return -1; + } + + _rl_add_executing_keyseq (c); + + /* XXX - experimental code to allow users to bracketed-paste into the search + string even when ESC is one of the isearch-terminators. Not perfect yet. */ + if (_rl_enable_bracketed_paste && c == ESC && strchr (cxt->search_terminators, c) && (n = _rl_nchars_available ()) > (BRACK_PASTE_SLEN-1)) + { + j = _rl_read_bracketed_paste_prefix (c); + if (j == 1) + { + cxt->lastc = -7; /* bracketed paste, see below */ + goto opcode_dispatch; + } + else if (_rl_pushed_input_available ()) /* eat extra char we pushed back */ + c = cxt->lastc = rl_read_key (); + else + c = cxt->lastc; /* last ditch */ + } + + /* If we are moving into a new keymap, modify cxt->keymap and go on. + This can be a problem if c == ESC and we want to terminate the + incremental search, so we check */ + if (c >= 0 && cxt->keymap[c].type == ISKMAP && strchr (cxt->search_terminators, cxt->lastc) == 0) + { + /* _rl_keyseq_timeout specified in milliseconds; _rl_input_queued + takes microseconds, so multiply by 1000. If we don't get any + additional input and this keymap shadows another function, process + that key as if it was all we read. */ + if (_rl_keyseq_timeout > 0 && + RL_ISSTATE (RL_STATE_CALLBACK) == 0 && + RL_ISSTATE (RL_STATE_INPUTPENDING) == 0 && + _rl_pushed_input_available () == 0 && + ((Keymap)(cxt->keymap[c].function))[ANYOTHERKEY].function && + _rl_input_queued (_rl_keyseq_timeout*1000) == 0) + goto add_character; + + cxt->okeymap = cxt->keymap; + cxt->keymap = FUNCTION_TO_KEYMAP (cxt->keymap, c); + cxt->sflags |= SF_CHGKMAP; + /* XXX - we should probably save this sequence, so we can do + something useful if this doesn't end up mapping to a command we + interpret here. Right now we just save the most recent character + that caused the index into a new keymap. */ + cxt->prevc = c; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + if (cxt->mb[1] == 0) + { + cxt->pmb[0] = c; /* XXX should be == cxt->mb[0] */ + cxt->pmb[1] = '\0'; + } + else + memcpy (cxt->pmb, cxt->mb, sizeof (cxt->pmb)); + } +#endif + return 1; + } + +add_character: + + /* Translate the keys we do something with to opcodes. */ + if (c >= 0 && cxt->keymap[c].type == ISFUNC) + { + /* If we have a multibyte character, see if it's bound to something that + affects the search. */ +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && cxt->mb[1]) + f = rl_function_of_keyseq (cxt->mb, cxt->keymap, (int *)NULL); + else +#endif + { + f = cxt->keymap[c].function; + if (f == rl_do_lowercase_version) + f = cxt->keymap[_rl_to_lower (c)].function; + } + + if (f == rl_reverse_search_history) + cxt->lastc = (cxt->sflags & SF_REVERSE) ? -1 : -2; + else if (f == rl_forward_search_history) + cxt->lastc = (cxt->sflags & SF_REVERSE) ? -2 : -1; + else if (f == rl_rubout) + cxt->lastc = -3; + else if (c == CTRL ('G') || f == rl_abort) + cxt->lastc = -4; + else if (c == CTRL ('W') || f == rl_unix_word_rubout) /* XXX */ + cxt->lastc = -5; + else if (c == CTRL ('Y') || f == rl_yank) /* XXX */ + cxt->lastc = -6; + else if (f == rl_bracketed_paste_begin) + cxt->lastc = -7; + } + + /* If we changed the keymap earlier while translating a key sequence into + a command, restore it now that we've succeeded. */ + if (cxt->sflags & SF_CHGKMAP) + { + cxt->keymap = cxt->okeymap; + cxt->sflags &= ~SF_CHGKMAP; + /* If we indexed into a new keymap, but didn't map to a command that + affects the search (lastc > 0), and the character that mapped to a + new keymap would have ended the search (ENDSRCH_CHAR(cxt->prevc)), + handle that now as if the previous char would have ended the search + and we would have read the current character. */ + /* XXX - should we check cxt->mb? */ + if (cxt->lastc > 0 && ENDSRCH_CHAR (cxt->prevc)) + { + rl_stuff_char (cxt->lastc); + rl_execute_next (cxt->prevc); + /* XXX - do we insert everything in cxt->pmb? */ + return (0); + } + /* Otherwise, if the current character is mapped to self-insert or + nothing (i.e., not an editing command), and the previous character + was a keymap index, then we need to insert both the previous + character and the current character into the search string. */ + else if (cxt->lastc > 0 && cxt->prevc > 0 && + cxt->keymap[cxt->prevc].type == ISKMAP && + (f == 0 || f == rl_insert)) + { + /* Make lastc be the next character read */ + /* XXX - do we insert everything in cxt->mb? */ + rl_execute_next (cxt->lastc); + /* Dispatch on the previous character (insert into search string) */ + cxt->lastc = cxt->prevc; +#if defined (HANDLE_MULTIBYTE) + /* Have to overwrite cxt->mb here because dispatch uses it below */ + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + if (cxt->pmb[1] == 0) + { + cxt->mb[0] = cxt->lastc; /* == cxt->prevc */ + cxt->mb[1] = '\0'; + } + else + memcpy (cxt->mb, cxt->pmb, sizeof (cxt->mb)); + } +#endif + cxt->prevc = 0; + } + else if (cxt->lastc > 0 && cxt->prevc > 0 && f && f != rl_insert) + { + _rl_term_executing_keyseq (); /* should this go in the caller? */ + + _rl_pending_command.map = cxt->keymap; + _rl_pending_command.count = 1; /* XXX */ + _rl_pending_command.key = cxt->lastc; + _rl_pending_command.func = f; + _rl_command_to_execute = &_rl_pending_command; + + return (0); + } + } + + /* The characters in isearch_terminators (set from the user-settable + variable isearch-terminators) are used to terminate the search but + not subsequently execute the character as a command. The default + value is "\033\012" (ESC and C-J). */ + if (cxt->lastc > 0 && strchr (cxt->search_terminators, cxt->lastc)) + { + /* ESC still terminates the search, but if there is pending + input or if input arrives within 0.1 seconds (on systems + with select(2)) it is used as a prefix character + with rl_execute_next. WATCH OUT FOR THIS! This is intended + to allow the arrow keys to be used like ^F and ^B are used + to terminate the search and execute the movement command. + XXX - since _rl_input_available depends on the application- + settable keyboard timeout value, this could alternatively + use _rl_input_queued(100000) */ + if (cxt->lastc == ESC && (_rl_pushed_input_available () || _rl_input_available ())) + rl_execute_next (ESC); + return (0); + } + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + if (cxt->lastc >= 0 && (cxt->mb[0] && cxt->mb[1] == '\0') && ENDSRCH_CHAR (cxt->lastc)) + { + /* This sets rl_pending_input to LASTC; it will be picked up the next + time rl_read_key is called. */ + rl_execute_next (cxt->lastc); + return (0); + } + } + else +#endif + if (cxt->lastc >= 0 && ENDSRCH_CHAR (cxt->lastc)) + { + /* This sets rl_pending_input to LASTC; it will be picked up the next + time rl_read_key is called. */ + rl_execute_next (cxt->lastc); + return (0); + } + + _rl_init_executing_keyseq (); + +opcode_dispatch: + /* Now dispatch on the character. `Opcodes' affect the search string or + state. Other characters are added to the string. */ + switch (cxt->lastc) + { + /* search again */ + case -1: + if (cxt->search_string_index == 0) + { + if (last_isearch_string) + { + cxt->search_string_size = 64 + last_isearch_string_len; + cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); + strcpy (cxt->search_string, last_isearch_string); + cxt->search_string_index = last_isearch_string_len; + rl_display_search (cxt->search_string, cxt->sflags, -1); + break; + } + /* XXX - restore keymap here? */ + return (1); + } + else if ((cxt->sflags & SF_REVERSE) && cxt->sline_index >= 0) + cxt->sline_index--; + else if (cxt->sline_index != cxt->sline_len) + cxt->sline_index++; + else + rl_ding (); + break; + + /* switch directions */ + case -2: + cxt->direction = -cxt->direction; + if (cxt->direction < 0) + cxt->sflags |= SF_REVERSE; + else + cxt->sflags &= ~SF_REVERSE; + break; + + /* delete character from search string. */ + case -3: /* C-H, DEL */ + /* This is tricky. To do this right, we need to keep a + stack of search positions for the current search, with + sentinels marking the beginning and end. But this will + do until we have a real isearch-undo. */ + if (cxt->search_string_index == 0) + rl_ding (); + else if (MB_CUR_MAX == 1 || rl_byte_oriented) + cxt->search_string[--cxt->search_string_index] = '\0'; + else + { + wstart = _rl_find_prev_mbchar (cxt->search_string, cxt->search_string_index, MB_FIND_NONZERO); + if (wstart >= 0) + cxt->search_string[cxt->search_string_index = wstart] = '\0'; + else + cxt->search_string[cxt->search_string_index = 0] = '\0'; + } + + if (cxt->search_string_index == 0) + rl_ding (); + + break; + + case -4: /* C-G, abort */ + rl_replace_line (cxt->lines[cxt->save_line], 0); + rl_point = cxt->save_point; + rl_mark = cxt->save_mark; + rl_deactivate_mark (); + rl_restore_prompt(); + rl_clear_message (); + + _rl_fix_point (1); /* in case save_line and save_point are out of sync */ + return -1; + + case -5: /* C-W */ + /* skip over portion of line we already matched and yank word */ + wstart = rl_point + cxt->search_string_index; + if (wstart >= rl_end) + { + rl_ding (); + break; + } + + /* if not in a word, move to one. */ + cval = _rl_char_value (rl_line_buffer, wstart); + if (_rl_walphabetic (cval) == 0) + { + rl_ding (); + break; + } + n = MB_NEXTCHAR (rl_line_buffer, wstart, 1, MB_FIND_NONZERO);; + while (n < rl_end) + { + cval = _rl_char_value (rl_line_buffer, n); + if (_rl_walphabetic (cval) == 0) + break; + n = MB_NEXTCHAR (rl_line_buffer, n, 1, MB_FIND_NONZERO);; + } + wlen = n - wstart + 1; + if (cxt->search_string_index + wlen + 1 >= cxt->search_string_size) + { + cxt->search_string_size += wlen + 1; + cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); + } + for (; wstart < n; wstart++) + cxt->search_string[cxt->search_string_index++] = rl_line_buffer[wstart]; + cxt->search_string[cxt->search_string_index] = '\0'; + break; + + case -6: /* C-Y */ + /* skip over portion of line we already matched and yank rest */ + wstart = rl_point + cxt->search_string_index; + if (wstart >= rl_end) + { + rl_ding (); + break; + } + n = rl_end - wstart + 1; + if (cxt->search_string_index + n + 1 >= cxt->search_string_size) + { + cxt->search_string_size += n + 1; + cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); + } + for (n = wstart; n < rl_end; n++) + cxt->search_string[cxt->search_string_index++] = rl_line_buffer[n]; + cxt->search_string[cxt->search_string_index] = '\0'; + break; + + case -7: /* bracketed paste */ + paste = _rl_bracketed_text (&pastelen); + if (paste == 0 || *paste == 0) + { + free (paste); + break; + } + if (_rl_enable_active_region) + rl_activate_mark (); + if (cxt->search_string_index + pastelen + 1 >= cxt->search_string_size) + { + cxt->search_string_size += pastelen + 2; + cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); + } + strcpy (cxt->search_string + cxt->search_string_index, paste); + cxt->search_string_index += pastelen; + free (paste); + break; + + /* Add character to search string and continue search. */ + default: +#if defined (HANDLE_MULTIBYTE) + wlen = (cxt->mb[0] == 0 || cxt->mb[1] == 0) ? 1 : RL_STRLEN (cxt->mb); +#else + wlen = 1; +#endif + if (cxt->search_string_index + wlen + 1 >= cxt->search_string_size) + { + cxt->search_string_size += 128; /* 128 much greater than MB_CUR_MAX */ + cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); + } +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int j; + + if (cxt->mb[0] == 0 || cxt->mb[1] == 0) + cxt->search_string[cxt->search_string_index++] = cxt->mb[0]; + else + for (j = 0; j < wlen; ) + cxt->search_string[cxt->search_string_index++] = cxt->mb[j++]; + } + else +#endif + cxt->search_string[cxt->search_string_index++] = cxt->lastc; /* XXX - was c instead of lastc */ + cxt->search_string[cxt->search_string_index] = '\0'; + break; + } + + for (cxt->sflags &= ~(SF_FOUND|SF_FAILED);; ) + { + if (cxt->search_string_index == 0) + { + cxt->sflags |= SF_FAILED; + break; + } + + limit = cxt->sline_len - cxt->search_string_index + 1; + + /* Search the current line. */ + while ((cxt->sflags & SF_REVERSE) ? (cxt->sline_index >= 0) : (cxt->sline_index < limit)) + { + if (STREQN (cxt->search_string, cxt->sline + cxt->sline_index, cxt->search_string_index)) + { + cxt->sflags |= SF_FOUND; + break; + } + else + cxt->sline_index += cxt->direction; + + if (cxt->sline_index < 0) + { + cxt->sline_index = 0; + break; + } + } + if (cxt->sflags & SF_FOUND) + break; + + /* Move to the next line, but skip new copies of the line + we just found and lines shorter than the string we're + searching for. */ + do + { + /* Move to the next line. */ + cxt->history_pos += cxt->direction; + + /* At limit for direction? */ + if ((cxt->sflags & SF_REVERSE) ? (cxt->history_pos < 0) : (cxt->history_pos == cxt->hlen)) + { + cxt->sflags |= SF_FAILED; + break; + } + + /* We will need these later. */ + cxt->sline = cxt->lines[cxt->history_pos]; + cxt->sline_len = strlen (cxt->sline); + } + while ((cxt->prev_line_found && STREQ (cxt->prev_line_found, cxt->lines[cxt->history_pos])) || + (cxt->search_string_index > cxt->sline_len)); + + if (cxt->sflags & SF_FAILED) + { + /* XXX - reset sline_index if < 0 */ + if (cxt->sline_index < 0) + cxt->sline_index = 0; + break; + } + + /* Now set up the line for searching... */ + cxt->sline_index = (cxt->sflags & SF_REVERSE) ? cxt->sline_len - cxt->search_string_index : 0; + } + + /* reset the keymaps for the next time through the loop */ + cxt->keymap = cxt->okeymap = _rl_keymap; + + if (cxt->sflags & SF_FAILED) + { + /* We cannot find the search string. Ding the bell. */ + rl_ding (); + cxt->history_pos = cxt->last_found_line; + rl_deactivate_mark (); + rl_display_search (cxt->search_string, cxt->sflags, (cxt->history_pos == cxt->save_line) ? -1 : cxt->history_pos); + return 1; + } + + /* We have found the search string. Just display it. But don't + actually move there in the history list until the user accepts + the location. */ + if (cxt->sflags & SF_FOUND) + { + cxt->prev_line_found = cxt->lines[cxt->history_pos]; + rl_replace_line (cxt->lines[cxt->history_pos], 0); + if (_rl_enable_active_region) + rl_activate_mark (); + rl_point = cxt->sline_index; + if (rl_mark_active_p () && cxt->search_string_index > 0) + rl_mark = rl_point + cxt->search_string_index; + cxt->last_found_line = cxt->history_pos; + rl_display_search (cxt->search_string, cxt->sflags, (cxt->history_pos == cxt->save_line) ? -1 : cxt->history_pos); + } + + return 1; +} + +int +_rl_isearch_cleanup (_rl_search_cxt *cxt, int r) +{ + if (r >= 0) + _rl_isearch_fini (cxt); + _rl_scxt_dispose (cxt, 0); + _rl_iscxt = 0; + + RL_UNSETSTATE(RL_STATE_ISEARCH); + + return (r != 0); +} + +/* Search through the history looking for an interactively typed string. + This is analogous to i-search. We start the search in the current line. + DIRECTION is which direction to search; >= 0 means forward, < 0 means + backwards. */ +static int +rl_search_history (int direction, int invoking_key) +{ + _rl_search_cxt *cxt; /* local for now, but saved globally */ + int c, r; + + RL_SETSTATE(RL_STATE_ISEARCH); + cxt = _rl_isearch_init (direction); + + rl_display_search (cxt->search_string, cxt->sflags, -1); + + /* If we are using the callback interface, all we do is set up here and + return. The key is that we leave RL_STATE_ISEARCH set. */ + if (RL_ISSTATE (RL_STATE_CALLBACK)) + return (0); + + r = -1; + for (;;) + { + c = _rl_search_getchar (cxt); + /* We might want to handle EOF here (c == 0) */ + r = _rl_isearch_dispatch (cxt, cxt->lastc); + if (r <= 0) + break; + } + + /* The searching is over. The user may have found the string that she + was looking for, or else she may have exited a failing search. If + LINE_INDEX is -1, then that shows that the string searched for was + not found. We use this to determine where to place rl_point. */ + return (_rl_isearch_cleanup (cxt, r)); +} + +#if defined (READLINE_CALLBACKS) +/* Called from the callback functions when we are ready to read a key. The + callback functions know to call this because RL_ISSTATE(RL_STATE_ISEARCH). + If _rl_isearch_dispatch finishes searching, this function is responsible + for turning off RL_STATE_ISEARCH, which it does using _rl_isearch_cleanup. */ +int +_rl_isearch_callback (_rl_search_cxt *cxt) +{ + int c, r; + + c = _rl_search_getchar (cxt); + /* We might want to handle EOF here */ + r = _rl_isearch_dispatch (cxt, cxt->lastc); + + return (r <= 0) ? _rl_isearch_cleanup (cxt, r) : 0; +} +#endif diff --git a/bash-5.1/lib/readline/keymaps.c b/bash-5.1/lib/readline/keymaps.c new file mode 100644 index 0000000000000000000000000000000000000000..4ade30bcd0365771de5cfa92a3b45839fed989d1 --- /dev/null +++ b/bash-5.1/lib/readline/keymaps.c @@ -0,0 +1,174 @@ +/* keymaps.c -- Functions and keymaps for the GNU Readline library. */ + +/* Copyright (C) 1988,1989-2009,2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include /* for FILE * definition for readline.h */ + +#include "readline.h" +#include "rlconf.h" + +#include "emacs_keymap.c" + +#if defined (VI_MODE) +#include "vi_keymap.c" +#endif + +#include "xmalloc.h" + +/* **************************************************************** */ +/* */ +/* Functions for manipulating Keymaps. */ +/* */ +/* **************************************************************** */ + + +/* Return a new, empty keymap. + Free it with free() when you are done. */ +Keymap +rl_make_bare_keymap (void) +{ + register int i; + Keymap keymap; + + keymap = (Keymap)xmalloc (KEYMAP_SIZE * sizeof (KEYMAP_ENTRY)); + for (i = 0; i < KEYMAP_SIZE; i++) + { + keymap[i].type = ISFUNC; + keymap[i].function = (rl_command_func_t *)NULL; + } + +#if 0 + for (i = 'A'; i < ('Z' + 1); i++) + { + keymap[i].type = ISFUNC; + keymap[i].function = rl_do_lowercase_version; + } +#endif + + return (keymap); +} + +/* A convenience function that returns 1 if there are no keys bound to + functions in KEYMAP */ +int +rl_empty_keymap (Keymap keymap) +{ + int i; + + for (i = 0; i < ANYOTHERKEY; i++) + { + if (keymap[i].type != ISFUNC || keymap[i].function) + return 0; + } + return 1; +} + +/* Return a new keymap which is a copy of MAP. Just copies pointers, does + not copy text of macros or descend into child keymaps. */ +Keymap +rl_copy_keymap (Keymap map) +{ + register int i; + Keymap temp; + + temp = rl_make_bare_keymap (); + for (i = 0; i < KEYMAP_SIZE; i++) + { + temp[i].type = map[i].type; + temp[i].function = map[i].function; + } + return (temp); +} + +/* Return a new keymap with the printing characters bound to rl_insert, + the uppercase Meta characters bound to run their lowercase equivalents, + and the Meta digits bound to produce numeric arguments. */ +Keymap +rl_make_keymap (void) +{ + register int i; + Keymap newmap; + + newmap = rl_make_bare_keymap (); + + /* All ASCII printing characters are self-inserting. */ + for (i = ' '; i < 127; i++) + newmap[i].function = rl_insert; + + newmap[TAB].function = rl_insert; + newmap[RUBOUT].function = rl_rubout; /* RUBOUT == 127 */ + newmap[CTRL('H')].function = rl_rubout; + +#if KEYMAP_SIZE > 128 + /* Printing characters in ISO Latin-1 and some 8-bit character sets. */ + for (i = 128; i < 256; i++) + newmap[i].function = rl_insert; +#endif /* KEYMAP_SIZE > 128 */ + + return (newmap); +} + +/* Free the storage associated with MAP. */ +void +rl_discard_keymap (Keymap map) +{ + int i; + + if (map == 0) + return; + + for (i = 0; i < KEYMAP_SIZE; i++) + { + switch (map[i].type) + { + case ISFUNC: + break; + + case ISKMAP: + rl_discard_keymap ((Keymap)map[i].function); + xfree ((char *)map[i].function); + break; + + case ISMACR: + xfree ((char *)map[i].function); + break; + } + } +} + +/* Convenience function that discards, then frees, MAP. */ +void +rl_free_keymap (Keymap map) +{ + rl_discard_keymap (map); + xfree ((char *)map); +} diff --git a/bash-5.1/lib/readline/keymaps.h b/bash-5.1/lib/readline/keymaps.h new file mode 100644 index 0000000000000000000000000000000000000000..1fa853d8c1e6a68a9e06d79c880e7d246759ced6 --- /dev/null +++ b/bash-5.1/lib/readline/keymaps.h @@ -0,0 +1,100 @@ +/* keymaps.h -- Manipulation of readline keymaps. */ + +/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#ifndef _KEYMAPS_H_ +#define _KEYMAPS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined (READLINE_LIBRARY) +# include "rlstdc.h" +# include "chardefs.h" +# include "rltypedefs.h" +#else +# include +# include +# include +#endif + +/* A keymap contains one entry for each key in the ASCII set. + Each entry consists of a type and a pointer. + FUNCTION is the address of a function to run, or the + address of a keymap to indirect through. + TYPE says which kind of thing FUNCTION is. */ +typedef struct _keymap_entry { + char type; + rl_command_func_t *function; +} KEYMAP_ENTRY; + +/* This must be large enough to hold bindings for all of the characters + in a desired character set (e.g, 128 for ASCII, 256 for ISO Latin-x, + and so on) plus one for subsequence matching. */ +#define KEYMAP_SIZE 257 +#define ANYOTHERKEY KEYMAP_SIZE-1 + +typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[KEYMAP_SIZE]; +typedef KEYMAP_ENTRY *Keymap; + +/* The values that TYPE can have in a keymap entry. */ +#define ISFUNC 0 +#define ISKMAP 1 +#define ISMACR 2 + +extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap; +extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap; + +/* Return a new, empty keymap. + Free it with free() when you are done. */ +extern Keymap rl_make_bare_keymap PARAMS((void)); + +/* Return a new keymap which is a copy of MAP. */ +extern Keymap rl_copy_keymap PARAMS((Keymap)); + +/* Return a new keymap with the printing characters bound to rl_insert, + the lowercase Meta characters bound to run their equivalents, and + the Meta digits bound to produce numeric arguments. */ +extern Keymap rl_make_keymap PARAMS((void)); + +/* Free the storage associated with a keymap. */ +extern void rl_discard_keymap PARAMS((Keymap)); + +/* These functions actually appear in bind.c */ + +/* Return the keymap corresponding to a given name. Names look like + `emacs' or `emacs-meta' or `vi-insert'. */ +extern Keymap rl_get_keymap_by_name PARAMS((const char *)); + +/* Return the current keymap. */ +extern Keymap rl_get_keymap PARAMS((void)); + +/* Set the current keymap to MAP. */ +extern void rl_set_keymap PARAMS((Keymap)); + +/* Set the name of MAP to NAME */ +extern int rl_set_keymap_name PARAMS((const char *, Keymap)); + +#ifdef __cplusplus +} +#endif + +#endif /* _KEYMAPS_H_ */ diff --git a/bash-5.1/lib/readline/kill.c b/bash-5.1/lib/readline/kill.c new file mode 100644 index 0000000000000000000000000000000000000000..50c3fdead765bc71b0e3e2d1ef81e4155982aa8a --- /dev/null +++ b/bash-5.1/lib/readline/kill.c @@ -0,0 +1,866 @@ +/* kill.c -- kill ring management. */ + +/* Copyright (C) 1994-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_UNISTD_H) +# include /* for _POSIX_VERSION */ +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +/* **************************************************************** */ +/* */ +/* Killing Mechanism */ +/* */ +/* **************************************************************** */ + +/* What we assume for a max number of kills. */ +#define DEFAULT_MAX_KILLS 10 + +/* The real variable to look at to find out when to flush kills. */ +static int rl_max_kills = DEFAULT_MAX_KILLS; + +/* Where to store killed text. */ +static char **rl_kill_ring = (char **)NULL; + +/* Where we are in the kill ring. */ +static int rl_kill_index; + +/* How many slots we have in the kill ring. */ +static int rl_kill_ring_length; + +static int _rl_copy_to_kill_ring PARAMS((char *, int)); +static int region_kill_internal PARAMS((int)); +static int _rl_copy_word_as_kill PARAMS((int, int)); +static int rl_yank_nth_arg_internal PARAMS((int, int, int)); + +/* How to say that you only want to save a certain amount + of kill material. */ +int +rl_set_retained_kills (int num) +{ + return 0; +} + +/* Add TEXT to the kill ring, allocating a new kill ring slot as necessary. + This uses TEXT directly, so the caller must not free it. If APPEND is + non-zero, and the last command was a kill, the text is appended to the + current kill ring slot, otherwise prepended. */ +static int +_rl_copy_to_kill_ring (char *text, int append) +{ + char *old, *new; + int slot; + + /* First, find the slot to work with. */ + if (_rl_last_command_was_kill == 0 || rl_kill_ring == 0) + { + /* Get a new slot. */ + if (rl_kill_ring == 0) + { + /* If we don't have any defined, then make one. */ + rl_kill_ring = (char **) + xmalloc (((rl_kill_ring_length = 1) + 1) * sizeof (char *)); + rl_kill_ring[slot = 0] = (char *)NULL; + } + else + { + /* We have to add a new slot on the end, unless we have + exceeded the max limit for remembering kills. */ + slot = rl_kill_ring_length; + if (slot == rl_max_kills) + { + register int i; + xfree (rl_kill_ring[0]); + for (i = 0; i < slot; i++) + rl_kill_ring[i] = rl_kill_ring[i + 1]; + } + else + { + slot = rl_kill_ring_length += 1; + rl_kill_ring = (char **)xrealloc (rl_kill_ring, (slot + 1) * sizeof (char *)); + } + rl_kill_ring[--slot] = (char *)NULL; + } + } + else + slot = rl_kill_ring_length - 1; + + /* If the last command was a kill, prepend or append. */ + if (_rl_last_command_was_kill && rl_kill_ring[slot] && rl_editing_mode != vi_mode) + { + old = rl_kill_ring[slot]; + new = (char *)xmalloc (1 + strlen (old) + strlen (text)); + + if (append) + { + strcpy (new, old); + strcat (new, text); + } + else + { + strcpy (new, text); + strcat (new, old); + } + xfree (old); + xfree (text); + rl_kill_ring[slot] = new; + } + else + rl_kill_ring[slot] = text; + + rl_kill_index = slot; + return 0; +} + +/* The way to kill something. This appends or prepends to the last + kill, if the last command was a kill command. if FROM is less + than TO, then the text is appended, otherwise prepended. If the + last command was not a kill command, then a new slot is made for + this kill. */ +int +rl_kill_text (int from, int to) +{ + char *text; + + /* Is there anything to kill? */ + if (from == to) + { + _rl_last_command_was_kill++; + return 0; + } + + text = rl_copy_text (from, to); + + /* Delete the copied text from the line. */ + rl_delete_text (from, to); + + _rl_copy_to_kill_ring (text, from < to); + + _rl_last_command_was_kill++; + return 0; +} + +/* Now REMEMBER! In order to do prepending or appending correctly, kill + commands always make rl_point's original position be the FROM argument, + and rl_point's extent be the TO argument. */ + +/* **************************************************************** */ +/* */ +/* Killing Commands */ +/* */ +/* **************************************************************** */ + +/* Delete the word at point, saving the text in the kill ring. */ +int +rl_kill_word (int count, int key) +{ + int orig_point; + + if (count < 0) + return (rl_backward_kill_word (-count, key)); + else + { + orig_point = rl_point; + rl_forward_word (count, key); + + if (rl_point != orig_point) + rl_kill_text (orig_point, rl_point); + + rl_point = orig_point; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; + } + return 0; +} + +/* Rubout the word before point, placing it on the kill ring. */ +int +rl_backward_kill_word (int count, int key) +{ + int orig_point; + + if (count < 0) + return (rl_kill_word (-count, key)); + else + { + orig_point = rl_point; + rl_backward_word (count, key); + + if (rl_point != orig_point) + rl_kill_text (orig_point, rl_point); + + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; + } + return 0; +} + +/* Kill from here to the end of the line. If DIRECTION is negative, kill + back to the line start instead. */ +int +rl_kill_line (int direction, int key) +{ + int orig_point; + + if (direction < 0) + return (rl_backward_kill_line (1, key)); + else + { + orig_point = rl_point; + rl_end_of_line (1, key); + if (orig_point != rl_point) + rl_kill_text (orig_point, rl_point); + rl_point = orig_point; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; + } + return 0; +} + +/* Kill backwards to the start of the line. If DIRECTION is negative, kill + forwards to the line end instead. */ +int +rl_backward_kill_line (int direction, int key) +{ + int orig_point; + + if (direction < 0) + return (rl_kill_line (1, key)); + else + { + if (rl_point == 0) + rl_ding (); + else + { + orig_point = rl_point; + rl_beg_of_line (1, key); + if (rl_point != orig_point) + rl_kill_text (orig_point, rl_point); + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; + } + } + return 0; +} + +/* Kill the whole line, no matter where point is. */ +int +rl_kill_full_line (int count, int key) +{ + rl_begin_undo_group (); + rl_point = 0; + rl_kill_text (rl_point, rl_end); + rl_mark = 0; + rl_end_undo_group (); + return 0; +} + +/* The next two functions mimic unix line editing behaviour, except they + save the deleted text on the kill ring. This is safer than not saving + it, and since we have a ring, nobody should get screwed. */ + +/* This does what C-w does in Unix. We can't prevent people from + using behaviour that they expect. */ +int +rl_unix_word_rubout (int count, int key) +{ + int orig_point; + + if (rl_point == 0) + rl_ding (); + else + { + orig_point = rl_point; + if (count <= 0) + count = 1; + + while (count--) + { + while (rl_point && whitespace (rl_line_buffer[rl_point - 1])) + rl_point--; + + while (rl_point && (whitespace (rl_line_buffer[rl_point - 1]) == 0)) + rl_point--; /* XXX - multibyte? */ + } + + rl_kill_text (orig_point, rl_point); + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; + } + + return 0; +} + +/* This deletes one filename component in a Unix pathname. That is, it + deletes backward to directory separator (`/') or whitespace. */ +int +rl_unix_filename_rubout (int count, int key) +{ + int orig_point, c; + + if (rl_point == 0) + rl_ding (); + else + { + orig_point = rl_point; + if (count <= 0) + count = 1; + + while (count--) + { + c = rl_line_buffer[rl_point - 1]; + while (rl_point && (whitespace (c) || c == '/')) + { + rl_point--; + c = rl_line_buffer[rl_point - 1]; + } + + while (rl_point && (whitespace (c) == 0) && c != '/') + { + rl_point--; /* XXX - multibyte? */ + c = rl_line_buffer[rl_point - 1]; + } + } + + rl_kill_text (orig_point, rl_point); + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; + } + + return 0; +} + +/* Here is C-u doing what Unix does. You don't *have* to use these + key-bindings. We have a choice of killing the entire line, or + killing from where we are to the start of the line. We choose the + latter, because if you are a Unix weenie, then you haven't backspaced + into the line at all, and if you aren't, then you know what you are + doing. */ +int +rl_unix_line_discard (int count, int key) +{ + if (rl_point == 0) + rl_ding (); + else + { + rl_kill_text (rl_point, 0); + rl_point = 0; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; + } + return 0; +} + +/* Copy the text in the `region' to the kill ring. If DELETE is non-zero, + delete the text from the line as well. */ +static int +region_kill_internal (int delete) +{ + char *text; + + if (rl_mark != rl_point) + { + text = rl_copy_text (rl_point, rl_mark); + if (delete) + rl_delete_text (rl_point, rl_mark); + _rl_copy_to_kill_ring (text, rl_point < rl_mark); + } + + _rl_fix_point (1); + _rl_last_command_was_kill++; + return 0; +} + +/* Copy the text in the region to the kill ring. */ +int +rl_copy_region_to_kill (int count, int key) +{ + return (region_kill_internal (0)); +} + +/* Kill the text between the point and mark. */ +int +rl_kill_region (int count, int key) +{ + int r, npoint; + + npoint = (rl_point < rl_mark) ? rl_point : rl_mark; + r = region_kill_internal (1); + rl_point = npoint; + _rl_fix_point (1); + return r; +} + +/* Copy COUNT words to the kill ring. DIR says which direction we look + to find the words. */ +static int +_rl_copy_word_as_kill (int count, int dir) +{ + int om, op, r; + + om = rl_mark; + op = rl_point; + + if (dir > 0) + rl_forward_word (count, 0); + else + rl_backward_word (count, 0); + + rl_mark = rl_point; + + if (dir > 0) + rl_backward_word (count, 0); + else + rl_forward_word (count, 0); + + r = region_kill_internal (0); + + rl_mark = om; + rl_point = op; + + return r; +} + +int +rl_copy_forward_word (int count, int key) +{ + if (count < 0) + return (rl_copy_backward_word (-count, key)); + + return (_rl_copy_word_as_kill (count, 1)); +} + +int +rl_copy_backward_word (int count, int key) +{ + if (count < 0) + return (rl_copy_forward_word (-count, key)); + + return (_rl_copy_word_as_kill (count, -1)); +} + +/* Yank back the last killed text. This ignores arguments. */ +int +rl_yank (int count, int key) +{ + if (rl_kill_ring == 0) + { + _rl_abort_internal (); + return 1; + } + + _rl_set_mark_at_pos (rl_point); + rl_insert_text (rl_kill_ring[rl_kill_index]); + return 0; +} + +/* If the last command was yank, or yank_pop, and the text just + before point is identical to the current kill item, then + delete that text from the line, rotate the index down, and + yank back some other text. */ +int +rl_yank_pop (int count, int key) +{ + int l, n; + + if (((rl_last_func != rl_yank_pop) && (rl_last_func != rl_yank)) || + !rl_kill_ring) + { + _rl_abort_internal (); + return 1; + } + + l = strlen (rl_kill_ring[rl_kill_index]); + n = rl_point - l; + if (n >= 0 && STREQN (rl_line_buffer + n, rl_kill_ring[rl_kill_index], l)) + { + rl_delete_text (n, rl_point); + rl_point = n; + rl_kill_index--; + if (rl_kill_index < 0) + rl_kill_index = rl_kill_ring_length - 1; + rl_yank (1, 0); + return 0; + } + else + { + _rl_abort_internal (); + return 1; + } +} + +#if defined (VI_MODE) +int +rl_vi_yank_pop (int count, int key) +{ + int l, n; + + if (((rl_last_func != rl_vi_yank_pop) && (rl_last_func != rl_vi_put)) || + !rl_kill_ring) + { + _rl_abort_internal (); + return 1; + } + + l = strlen (rl_kill_ring[rl_kill_index]); + n = rl_point - l; + if (n >= 0 && STREQN (rl_line_buffer + n, rl_kill_ring[rl_kill_index], l)) + { + rl_delete_text (n, rl_point); + rl_point = n; + rl_kill_index--; + if (rl_kill_index < 0) + rl_kill_index = rl_kill_ring_length - 1; + rl_vi_put (1, 'p'); + return 0; + } + else + { + _rl_abort_internal (); + return 1; + } +} +#endif /* VI_MODE */ + +/* Yank the COUNTh argument from the previous history line, skipping + HISTORY_SKIP lines before looking for the `previous line'. */ +static int +rl_yank_nth_arg_internal (int count, int key, int history_skip) +{ + register HIST_ENTRY *entry; + char *arg; + int i, pos; + + pos = where_history (); + + if (history_skip) + { + for (i = 0; i < history_skip; i++) + entry = previous_history (); + } + + entry = previous_history (); + + history_set_pos (pos); + + if (entry == 0) + { + rl_ding (); + return 1; + } + + arg = history_arg_extract (count, count, entry->line); + if (!arg || !*arg) + { + rl_ding (); + FREE (arg); + return 1; + } + + rl_begin_undo_group (); + + _rl_set_mark_at_pos (rl_point); + +#if defined (VI_MODE) + /* Vi mode always inserts a space before yanking the argument, and it + inserts it right *after* rl_point. */ + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap) + { + rl_vi_append_mode (1, key); + rl_insert_text (" "); + } +#endif /* VI_MODE */ + + rl_insert_text (arg); + xfree (arg); + + rl_end_undo_group (); + return 0; +} + +/* Yank the COUNTth argument from the previous history line. */ +int +rl_yank_nth_arg (int count, int key) +{ + return (rl_yank_nth_arg_internal (count, key, 0)); +} + +/* Yank the last argument from the previous history line. This `knows' + how rl_yank_nth_arg treats a count of `$'. With an argument, this + behaves the same as rl_yank_nth_arg. */ +int +rl_yank_last_arg (int count, int key) +{ + static int history_skip = 0; + static int explicit_arg_p = 0; + static int count_passed = 1; + static int direction = 1; + static int undo_needed = 0; + int retval; + + if (rl_last_func != rl_yank_last_arg) + { + history_skip = 0; + explicit_arg_p = rl_explicit_arg; + count_passed = count; + direction = 1; + } + else + { + if (undo_needed) + rl_do_undo (); + if (count < 0) /* XXX - was < 1 */ + direction = -direction; + history_skip += direction; + if (history_skip < 0) + history_skip = 0; + } + + if (explicit_arg_p) + retval = rl_yank_nth_arg_internal (count_passed, key, history_skip); + else + retval = rl_yank_nth_arg_internal ('$', key, history_skip); + + undo_needed = retval == 0; + return retval; +} + +/* Having read the special escape sequence denoting the beginning of a + `bracketed paste' sequence, read the rest of the pasted input until the + closing sequence and return the pasted text. */ +char * +_rl_bracketed_text (size_t *lenp) +{ + int c; + size_t len, cap; + char *buf; + + len = 0; + buf = xmalloc (cap = 64); + buf[0] = '\0'; + + RL_SETSTATE (RL_STATE_MOREINPUT); + while ((c = rl_read_key ()) >= 0) + { + if (RL_ISSTATE (RL_STATE_MACRODEF)) + _rl_add_macro_char (c); + + if (c == '\r') /* XXX */ + c = '\n'; + + if (len == cap) + buf = xrealloc (buf, cap *= 2); + + buf[len++] = c; + if (len >= BRACK_PASTE_SLEN && c == BRACK_PASTE_LAST && + STREQN (buf + len - BRACK_PASTE_SLEN, BRACK_PASTE_SUFF, BRACK_PASTE_SLEN)) + { + len -= BRACK_PASTE_SLEN; + break; + } + } + RL_UNSETSTATE (RL_STATE_MOREINPUT); + + if (c >= 0) + { + if (len == cap) + buf = xrealloc (buf, cap + 1); + buf[len] = '\0'; + } + + if (lenp) + *lenp = len; + return (buf); +} + +/* Having read the special escape sequence denoting the beginning of a + `bracketed paste' sequence, read the rest of the pasted input until the + closing sequence and insert the pasted text as a single unit without + interpretation. Temporarily highlight the inserted text. */ +int +rl_bracketed_paste_begin (int count, int key) +{ + int retval, c; + size_t len, cap; + char *buf; + + buf = _rl_bracketed_text (&len); + rl_mark = rl_point; + retval = rl_insert_text (buf) == len ? 0 : 1; + if (_rl_enable_active_region) + rl_activate_mark (); + + xfree (buf); + return (retval); +} + +int +_rl_read_bracketed_paste_prefix (int c) +{ + char pbuf[BRACK_PASTE_SLEN+1], *pbpref; + int key, ind, j; + + pbpref = BRACK_PASTE_PREF; /* XXX - debugging */ + if (c != pbpref[0]) + return (0); + pbuf[ind = 0] = c; + while (ind < BRACK_PASTE_SLEN-1 && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued (0)) + { + key = rl_read_key (); /* XXX - for now */ + if (key < 0) + break; + pbuf[++ind] = key; + if (pbuf[ind] != pbpref[ind]) + break; + } + + if (ind < BRACK_PASTE_SLEN-1) /* read incomplete sequence */ + { + while (ind >= 0) + _rl_unget_char (pbuf[ind--]); + return (key < 0 ? key : 0); + } + return (key < 0 ? key : 1); +} + +/* Get a character from wherever we read input, handling input in bracketed + paste mode. If we don't have or use bracketed paste mode, this can be + used in place of rl_read_key(). */ +int +_rl_bracketed_read_key () +{ + int c, r; + char *pbuf; + size_t pblen; + + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (c < 0) + return -1; + + /* read pasted data with bracketed-paste mode enabled. */ + if (_rl_enable_bracketed_paste && c == ESC && (r = _rl_read_bracketed_paste_prefix (c)) == 1) + { + pbuf = _rl_bracketed_text (&pblen); + if (pblen == 0) + { + xfree (pbuf); + return 0; /* XXX */ + } + c = (unsigned char)pbuf[0]; + if (pblen > 1) + { + while (--pblen > 0) + _rl_unget_char ((unsigned char)pbuf[pblen]); + } + xfree (pbuf); + } + + return c; +} + +/* Get a character from wherever we read input, handling input in bracketed + paste mode. If we don't have or use bracketed paste mode, this can be + used in place of rl_read_key(). */ +int +_rl_bracketed_read_mbstring (char *mb, int mlen) +{ + int c, r; + + c = _rl_bracketed_read_key (); + if (c < 0) + return -1; + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + c = _rl_read_mbstring (c, mb, mlen); + else +#endif + mb[0] = c; + mb[mlen] = '\0'; /* just in case */ + + return c; +} + +/* A special paste command for Windows users. */ +#if defined (_WIN32) +#include + +int +rl_paste_from_clipboard (int count, int key) +{ + char *data, *ptr; + int len; + + if (OpenClipboard (NULL) == 0) + return (0); + + data = (char *)GetClipboardData (CF_TEXT); + if (data) + { + ptr = strchr (data, '\r'); + if (ptr) + { + len = ptr - data; + ptr = (char *)xmalloc (len + 1); + ptr[len] = '\0'; + strncpy (ptr, data, len); + } + else + ptr = data; + _rl_set_mark_at_pos (rl_point); + rl_insert_text (ptr); + if (ptr != data) + xfree (ptr); + CloseClipboard (); + } + return (0); +} +#endif /* _WIN32 */ diff --git a/bash-5.1/lib/readline/macro.c b/bash-5.1/lib/readline/macro.c new file mode 100644 index 0000000000000000000000000000000000000000..92cc55c36dc001e78ddddd1e488dee0b1d42ab8a --- /dev/null +++ b/bash-5.1/lib/readline/macro.c @@ -0,0 +1,332 @@ +/* macro.c -- keyboard macros for readline. */ + +/* Copyright (C) 1994-2009,2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_UNISTD_H) +# include /* for _POSIX_VERSION */ +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +#define MAX_MACRO_LEVEL 16 + +/* **************************************************************** */ +/* */ +/* Hacking Keyboard Macros */ +/* */ +/* **************************************************************** */ + +/* The currently executing macro string. If this is non-zero, + then it is a malloc ()'ed string where input is coming from. */ +char *rl_executing_macro = (char *)NULL; + +/* The offset in the above string to the next character to be read. */ +static int executing_macro_index; + +/* The current macro string being built. Characters get stuffed + in here by add_macro_char (). */ +static char *current_macro = (char *)NULL; + +/* The size of the buffer allocated to current_macro. */ +static int current_macro_size; + +/* The index at which characters are being added to current_macro. */ +static int current_macro_index; + +/* A structure used to save nested macro strings. + It is a linked list of string/index for each saved macro. */ +struct saved_macro { + struct saved_macro *next; + char *string; + int sindex; +}; + +/* The list of saved macros. */ +static struct saved_macro *macro_list = (struct saved_macro *)NULL; + +static int macro_level = 0; + +/* Set up to read subsequent input from STRING. + STRING is free ()'ed when we are done with it. */ +void +_rl_with_macro_input (char *string) +{ + if (macro_level > MAX_MACRO_LEVEL) + { + _rl_errmsg ("maximum macro execution nesting level exceeded"); + _rl_abort_internal (); + return; + } + +#if 0 + if (rl_executing_macro) /* XXX - later */ +#endif + _rl_push_executing_macro (); + rl_executing_macro = string; + executing_macro_index = 0; + RL_SETSTATE(RL_STATE_MACROINPUT); +} + +/* Return the next character available from a macro, or 0 if + there are no macro characters. */ +int +_rl_next_macro_key (void) +{ + int c; + + if (rl_executing_macro == 0) + return (0); + + if (rl_executing_macro[executing_macro_index] == 0) + { + _rl_pop_executing_macro (); + return (_rl_next_macro_key ()); + } + +#if defined (READLINE_CALLBACKS) + c = rl_executing_macro[executing_macro_index++]; + if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD|RL_STATE_MOREINPUT) && rl_executing_macro[executing_macro_index] == 0) + _rl_pop_executing_macro (); + return c; +#else + /* XXX - consider doing the same as the callback code, just not testing + whether we're running in callback mode */ + return (rl_executing_macro[executing_macro_index++]); +#endif +} + +int +_rl_peek_macro_key (void) +{ + if (rl_executing_macro == 0) + return (0); + if (rl_executing_macro[executing_macro_index] == 0 && (macro_list == 0 || macro_list->string == 0)) + return (0); + if (rl_executing_macro[executing_macro_index] == 0 && macro_list && macro_list->string) + return (macro_list->string[0]); + return (rl_executing_macro[executing_macro_index]); +} + +int +_rl_prev_macro_key (void) +{ + if (rl_executing_macro == 0) + return (0); + + if (executing_macro_index == 0) + return (0); + + executing_macro_index--; + return (rl_executing_macro[executing_macro_index]); +} + +/* Save the currently executing macro on a stack of saved macros. */ +void +_rl_push_executing_macro (void) +{ + struct saved_macro *saver; + + saver = (struct saved_macro *)xmalloc (sizeof (struct saved_macro)); + saver->next = macro_list; + saver->sindex = executing_macro_index; + saver->string = rl_executing_macro; + + macro_list = saver; + + macro_level++; +} + +/* Discard the current macro, replacing it with the one + on the top of the stack of saved macros. */ +void +_rl_pop_executing_macro (void) +{ + struct saved_macro *macro; + + FREE (rl_executing_macro); + rl_executing_macro = (char *)NULL; + executing_macro_index = 0; + + if (macro_list) + { + macro = macro_list; + rl_executing_macro = macro_list->string; + executing_macro_index = macro_list->sindex; + macro_list = macro_list->next; + xfree (macro); + } + + macro_level--; + + if (rl_executing_macro == 0) + RL_UNSETSTATE(RL_STATE_MACROINPUT); +} + +/* Add a character to the macro being built. */ +void +_rl_add_macro_char (int c) +{ + if (current_macro_index + 1 >= current_macro_size) + { + if (current_macro == 0) + current_macro = (char *)xmalloc (current_macro_size = 25); + else + current_macro = (char *)xrealloc (current_macro, current_macro_size += 25); + } + + current_macro[current_macro_index++] = c; + current_macro[current_macro_index] = '\0'; +} + +void +_rl_kill_kbd_macro (void) +{ + if (current_macro) + { + xfree (current_macro); + current_macro = (char *) NULL; + } + current_macro_size = current_macro_index = 0; + + FREE (rl_executing_macro); + rl_executing_macro = (char *) NULL; + executing_macro_index = 0; + + RL_UNSETSTATE(RL_STATE_MACRODEF); +} + +/* Begin defining a keyboard macro. + Keystrokes are recorded as they are executed. + End the definition with rl_end_kbd_macro (). + If a numeric argument was explicitly typed, then append this + definition to the end of the existing macro, and start by + re-executing the existing macro. */ +int +rl_start_kbd_macro (int ignore1, int ignore2) +{ + if (RL_ISSTATE (RL_STATE_MACRODEF)) + { + _rl_abort_internal (); + return 1; + } + + if (rl_explicit_arg) + { + if (current_macro) + _rl_with_macro_input (savestring (current_macro)); + } + else + current_macro_index = 0; + + RL_SETSTATE(RL_STATE_MACRODEF); + return 0; +} + +/* Stop defining a keyboard macro. + A numeric argument says to execute the macro right now, + that many times, counting the definition as the first time. */ +int +rl_end_kbd_macro (int count, int ignore) +{ + if (RL_ISSTATE (RL_STATE_MACRODEF) == 0) + { + _rl_abort_internal (); + return 1; + } + + current_macro_index -= rl_key_sequence_length; + current_macro[current_macro_index] = '\0'; + + RL_UNSETSTATE(RL_STATE_MACRODEF); + + return (rl_call_last_kbd_macro (--count, 0)); +} + +/* Execute the most recently defined keyboard macro. + COUNT says how many times to execute it. */ +int +rl_call_last_kbd_macro (int count, int ignore) +{ + if (current_macro == 0) + _rl_abort_internal (); + + if (RL_ISSTATE (RL_STATE_MACRODEF)) + { + rl_ding (); /* no recursive macros */ + current_macro[--current_macro_index] = '\0'; /* erase this char */ + return 0; + } + + while (count--) + _rl_with_macro_input (savestring (current_macro)); + return 0; +} + +int +rl_print_last_kbd_macro (int count, int ignore) +{ + char *m; + + if (current_macro == 0) + { + rl_ding (); + return 0; + } + m = _rl_untranslate_macro_value (current_macro, 1); + rl_crlf (); + printf ("%s", m); + fflush (stdout); + rl_crlf (); + FREE (m); + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; +} + +void +rl_push_macro_input (char *macro) +{ + _rl_with_macro_input (macro); +} diff --git a/bash-5.1/lib/readline/mbutil.c b/bash-5.1/lib/readline/mbutil.c new file mode 100644 index 0000000000000000000000000000000000000000..dc62b4cc24dd55df745c1e623a24f3ca94f21059 --- /dev/null +++ b/bash-5.1/lib/readline/mbutil.c @@ -0,0 +1,524 @@ +/* mbutil.c -- readline multibyte character utility functions */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include +#include "posixjmp.h" + +#if defined (HAVE_UNISTD_H) +# include /* for _POSIX_VERSION */ +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +#if defined (TIOCSTAT_IN_SYS_IOCTL) +# include +#endif /* TIOCSTAT_IN_SYS_IOCTL */ + +/* Some standard library routines. */ +#include "readline.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +/* Declared here so it can be shared between the readline and history + libraries. */ +#if defined (HANDLE_MULTIBYTE) +int rl_byte_oriented = 0; +#else +int rl_byte_oriented = 1; +#endif + +/* Ditto */ +int _rl_utf8locale = 0; + +/* **************************************************************** */ +/* */ +/* Multibyte Character Utility Functions */ +/* */ +/* **************************************************************** */ + +#if defined(HANDLE_MULTIBYTE) + +/* **************************************************************** */ +/* */ +/* UTF-8 specific Character Utility Functions */ +/* */ +/* **************************************************************** */ + +/* Return the length in bytes of the possibly-multibyte character beginning + at S. Encoding is UTF-8. */ +static int +_rl_utf8_mblen (const char *s, size_t n) +{ + unsigned char c, c1, c2, c3; + + if (s == 0) + return (0); /* no shift states */ + if (n <= 0) + return (-1); + + c = (unsigned char)*s; + if (c < 0x80) + return (c != 0); + if (c >= 0xc2) + { + c1 = (unsigned char)s[1]; + if (c < 0xe0) + { + if (n == 1) + return -2; + if (n >= 2 && (c1 ^ 0x80) < 0x40) + return 2; + } + else if (c < 0xf0) + { + if (n == 1) + return -2; + if ((c1 ^ 0x80) < 0x40 + && (c >= 0xe1 || c1 >= 0xa0) + && (c != 0xed || c1 < 0xa0)) + { + if (n == 2) + return -2; + c2 = (unsigned char)s[2]; + if ((c2 ^ 0x80) < 0x40) + return 3; + } + } + else if (c < 0xf4) + { + if (n == 1) + return -2; + if (((c1 ^ 0x80) < 0x40) + && (c >= 0xf1 || c1 >= 0x90) + && (c < 0xf4 || (c == 0xf4 && c1 < 0x90))) + { + if (n == 2) + return -2; + c2 = (unsigned char)s[2]; + if ((c2 ^ 0x80) < 0x40) + { + if (n == 3) + return -2; + c3 = (unsigned char)s[3]; + if ((c3 ^ 0x80) < 0x40) + return 4; + } + } + } + } + /* invalid or incomplete multibyte character */ + return -1; +} + +static int +_rl_find_next_mbchar_internal (char *string, int seed, int count, int find_non_zero) +{ + size_t tmp, len; + mbstate_t ps; + int point; + wchar_t wc; + + tmp = 0; + + memset(&ps, 0, sizeof (mbstate_t)); + if (seed < 0) + seed = 0; + if (count <= 0) + return seed; + + point = seed + _rl_adjust_point (string, seed, &ps); + /* if _rl_adjust_point returns -1, the character or string is invalid. + treat as a byte. */ + if (point == seed - 1) /* invalid */ + return seed + 1; + + /* if this is true, means that seed was not pointing to a byte indicating + the beginning of a multibyte character. Correct the point and consume + one char. */ + if (seed < point) + count--; + + while (count > 0) + { + len = strlen (string + point); + if (len == 0) + break; + if (_rl_utf8locale && UTF8_SINGLEBYTE(string[point])) + { + tmp = 1; + wc = (wchar_t) string[point]; + memset(&ps, 0, sizeof(mbstate_t)); + } + else + tmp = mbrtowc (&wc, string+point, len, &ps); + if (MB_INVALIDCH ((size_t)tmp)) + { + /* invalid bytes. assume a byte represents a character */ + point++; + count--; + /* reset states. */ + memset(&ps, 0, sizeof(mbstate_t)); + } + else if (MB_NULLWCH (tmp)) + break; /* found wide '\0' */ + else + { + /* valid bytes */ + point += tmp; + if (find_non_zero) + { + if (WCWIDTH (wc) == 0) + continue; + else + count--; + } + else + count--; + } + } + + if (find_non_zero) + { + tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); + while (MB_NULLWCH (tmp) == 0 && MB_INVALIDCH (tmp) == 0 && WCWIDTH (wc) == 0) + { + point += tmp; + tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); + } + } + + return point; +} + +static inline int +_rl_test_nonzero (char *string, int ind, int len) +{ + size_t tmp; + wchar_t wc; + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); + tmp = mbrtowc (&wc, string + ind, len - ind, &ps); + /* treat invalid multibyte sequences as non-zero-width */ + return (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp) || WCWIDTH (wc) > 0); +} + +/* experimental -- needs to handle zero-width characters better */ +static int +_rl_find_prev_utf8char (char *string, int seed, int find_non_zero) +{ + char *s; + unsigned char b; + int save, prev; + size_t len; + + if (find_non_zero) + len = RL_STRLEN (string); + + prev = seed - 1; + while (prev >= 0) + { + b = (unsigned char)string[prev]; + if (UTF8_SINGLEBYTE (b)) + return (prev); + + save = prev; + + /* Move back until we're not in the middle of a multibyte char */ + if (UTF8_MBCHAR (b)) + { + while (prev > 0 && (b = (unsigned char)string[--prev]) && UTF8_MBCHAR (b)) + ; + } + + if (UTF8_MBFIRSTCHAR (b)) + { + if (find_non_zero) + { + if (_rl_test_nonzero (string, prev, len)) + return (prev); + else /* valid but WCWIDTH (wc) == 0 */ + prev = prev - 1; + } + else + return (prev); + } + else + return (save); /* invalid utf-8 multibyte sequence */ + } + + return ((prev < 0) ? 0 : prev); +} + +/*static*/ int +_rl_find_prev_mbchar_internal (char *string, int seed, int find_non_zero) +{ + mbstate_t ps; + int prev, non_zero_prev, point, length; + size_t tmp; + wchar_t wc; + + if (_rl_utf8locale) + return (_rl_find_prev_utf8char (string, seed, find_non_zero)); + + memset(&ps, 0, sizeof(mbstate_t)); + length = strlen(string); + + if (seed < 0) + return 0; + else if (length < seed) + return length; + + prev = non_zero_prev = point = 0; + while (point < seed) + { + if (_rl_utf8locale && UTF8_SINGLEBYTE(string[point])) + { + tmp = 1; + wc = (wchar_t) string[point]; + memset(&ps, 0, sizeof(mbstate_t)); + } + else + tmp = mbrtowc (&wc, string + point, length - point, &ps); + if (MB_INVALIDCH ((size_t)tmp)) + { + /* in this case, bytes are invalid or too short to compose + multibyte char, so assume that the first byte represents + a single character anyway. */ + tmp = 1; + /* clear the state of the byte sequence, because + in this case effect of mbstate is undefined */ + memset(&ps, 0, sizeof (mbstate_t)); + + /* Since we're assuming that this byte represents a single + non-zero-width character, don't forget about it. */ + prev = point; + } + else if (MB_NULLWCH (tmp)) + break; /* Found '\0' char. Can this happen? */ + else + { + if (find_non_zero) + { + if (WCWIDTH (wc) != 0) + prev = point; + } + else + prev = point; + } + + point += tmp; + } + + return prev; +} + +/* return the number of bytes parsed from the multibyte sequence starting + at src, if a non-L'\0' wide character was recognized. It returns 0, + if a L'\0' wide character was recognized. It returns (size_t)(-1), + if an invalid multibyte sequence was encountered. It returns (size_t)(-2) + if it couldn't parse a complete multibyte character. */ +int +_rl_get_char_len (char *src, mbstate_t *ps) +{ + size_t tmp, l; + int mb_cur_max; + + /* Look at no more than MB_CUR_MAX characters */ + l = (size_t)strlen (src); + if (_rl_utf8locale && l > 0 && UTF8_SINGLEBYTE(*src)) + tmp = (*src != 0) ? 1 : 0; + else + { + mb_cur_max = MB_CUR_MAX; + tmp = mbrlen((const char *)src, (l < mb_cur_max) ? l : mb_cur_max, ps); + } + if (tmp == (size_t)(-2)) + { + /* too short to compose multibyte char */ + if (ps) + memset (ps, 0, sizeof(mbstate_t)); + return -2; + } + else if (tmp == (size_t)(-1)) + { + /* invalid to compose multibyte char */ + /* initialize the conversion state */ + if (ps) + memset (ps, 0, sizeof(mbstate_t)); + return -1; + } + else if (tmp == (size_t)0) + return 0; + else + return (int)tmp; +} + +/* compare the specified two characters. If the characters matched, + return 1. Otherwise return 0. */ +int +_rl_compare_chars (char *buf1, int pos1, mbstate_t *ps1, char *buf2, int pos2, mbstate_t *ps2) +{ + int i, w1, w2; + + if ((w1 = _rl_get_char_len (&buf1[pos1], ps1)) <= 0 || + (w2 = _rl_get_char_len (&buf2[pos2], ps2)) <= 0 || + (w1 != w2) || + (buf1[pos1] != buf2[pos2])) + return 0; + + for (i = 1; i < w1; i++) + if (buf1[pos1+i] != buf2[pos2+i]) + return 0; + + return 1; +} + +/* adjust pointed byte and find mbstate of the point of string. + adjusted point will be point <= adjusted_point, and returns + differences of the byte(adjusted_point - point). + if point is invalid (point < 0 || more than string length), + it returns -1 */ +int +_rl_adjust_point (char *string, int point, mbstate_t *ps) +{ + size_t tmp; + int length, pos; + + tmp = 0; + pos = 0; + length = strlen(string); + if (point < 0) + return -1; + if (length < point) + return -1; + + while (pos < point) + { + if (_rl_utf8locale && UTF8_SINGLEBYTE(string[pos])) + tmp = 1; + else + tmp = mbrlen (string + pos, length - pos, ps); + if (MB_INVALIDCH ((size_t)tmp)) + { + /* in this case, bytes are invalid or too short to compose + multibyte char, so assume that the first byte represents + a single character anyway. */ + pos++; + /* clear the state of the byte sequence, because + in this case effect of mbstate is undefined */ + if (ps) + memset (ps, 0, sizeof (mbstate_t)); + } + else if (MB_NULLWCH (tmp)) + pos++; + else + pos += tmp; + } + + return (pos - point); +} + +int +_rl_is_mbchar_matched (char *string, int seed, int end, char *mbchar, int length) +{ + int i; + + if ((end - seed) < length) + return 0; + + for (i = 0; i < length; i++) + if (string[seed + i] != mbchar[i]) + return 0; + return 1; +} + +wchar_t +_rl_char_value (char *buf, int ind) +{ + size_t tmp; + wchar_t wc; + mbstate_t ps; + int l; + + if (MB_LEN_MAX == 1 || rl_byte_oriented) + return ((wchar_t) buf[ind]); + if (_rl_utf8locale && UTF8_SINGLEBYTE(buf[ind])) + return ((wchar_t) buf[ind]); + l = strlen (buf); + if (ind >= l - 1) + return ((wchar_t) buf[ind]); + if (l < ind) /* Sanity check */ + l = strlen (buf+ind); + memset (&ps, 0, sizeof (mbstate_t)); + tmp = mbrtowc (&wc, buf + ind, l - ind, &ps); + if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp)) + return ((wchar_t) buf[ind]); + return wc; +} +#endif /* HANDLE_MULTIBYTE */ + +/* Find next `count' characters started byte point of the specified seed. + If flags is MB_FIND_NONZERO, we look for non-zero-width multibyte + characters. */ +#undef _rl_find_next_mbchar +int +_rl_find_next_mbchar (char *string, int seed, int count, int flags) +{ +#if defined (HANDLE_MULTIBYTE) + return _rl_find_next_mbchar_internal (string, seed, count, flags); +#else + return (seed + count); +#endif +} + +/* Find previous character started byte point of the specified seed. + Returned point will be point <= seed. If flags is MB_FIND_NONZERO, + we look for non-zero-width multibyte characters. */ +#undef _rl_find_prev_mbchar +int +_rl_find_prev_mbchar (char *string, int seed, int flags) +{ +#if defined (HANDLE_MULTIBYTE) + return _rl_find_prev_mbchar_internal (string, seed, flags); +#else + return ((seed == 0) ? seed : seed - 1); +#endif +} diff --git a/bash-5.1/lib/readline/misc.c b/bash-5.1/lib/readline/misc.c new file mode 100644 index 0000000000000000000000000000000000000000..3d9a674ca59d9a4de961ac846cd66fe221c4f2c6 --- /dev/null +++ b/bash-5.1/lib/readline/misc.c @@ -0,0 +1,737 @@ +/* misc.c -- miscellaneous bindable readline functions. */ + +/* Copyright (C) 1987-2019 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +static int rl_digit_loop PARAMS((void)); +static void _rl_history_set_point PARAMS((void)); + +/* Forward declarations used in this file */ +void _rl_free_history_entry PARAMS((HIST_ENTRY *)); + +/* If non-zero, rl_get_previous_history and rl_get_next_history attempt + to preserve the value of rl_point from line to line. */ +int _rl_history_preserve_point = 0; + +_rl_arg_cxt _rl_argcxt; + +/* Saved target point for when _rl_history_preserve_point is set. Special + value of -1 means that point is at the end of the line. */ +int _rl_history_saved_point = -1; + +/* **************************************************************** */ +/* */ +/* Numeric Arguments */ +/* */ +/* **************************************************************** */ + +int +_rl_arg_overflow (void) +{ + if (rl_numeric_arg > 1000000) + { + _rl_argcxt = 0; + rl_explicit_arg = rl_numeric_arg = 0; + rl_ding (); + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return 1; + } + return 0; +} + +void +_rl_arg_init (void) +{ + rl_save_prompt (); + _rl_argcxt = 0; + RL_SETSTATE(RL_STATE_NUMERICARG); +} + +int +_rl_arg_getchar (void) +{ + int c; + + rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + return c; +} + +/* Process C as part of the current numeric argument. Return -1 if the + argument should be aborted, 0 if we should not read any more chars, and + 1 if we should continue to read chars. */ +int +_rl_arg_dispatch (_rl_arg_cxt cxt, int c) +{ + int key, r; + + key = c; + + /* If we see a key bound to `universal-argument' after seeing digits, + it ends the argument but is otherwise ignored. */ + if (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument) + { + if ((cxt & NUM_SAWDIGITS) == 0) + { + rl_numeric_arg *= 4; + return 1; + } + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_argcxt |= NUM_READONE; + return 0; /* XXX */ + } + else + { + key = _rl_bracketed_read_key (); + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + if (key < 0) + return -1; + return (_rl_dispatch (key, _rl_keymap)); + } + } + + c = UNMETA (c); + + if (_rl_digit_p (c)) + { + r = _rl_digit_value (c); + rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + r : r; + rl_explicit_arg = 1; + _rl_argcxt |= NUM_SAWDIGITS; + } + else if (c == '-' && rl_explicit_arg == 0) + { + rl_numeric_arg = 1; + _rl_argcxt |= NUM_SAWMINUS; + rl_arg_sign = -1; + } + else + { + /* Make M-- command equivalent to M--1 command. */ + if ((_rl_argcxt & NUM_SAWMINUS) && rl_numeric_arg == 1 && rl_explicit_arg == 0) + rl_explicit_arg = 1; + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + + r = _rl_dispatch (key, _rl_keymap); + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + /* At worst, this will cause an extra redisplay. Otherwise, + we have to wait until the next character comes in. */ + if (rl_done == 0) + (*rl_redisplay_function) (); + r = 0; + } + return r; + } + + return 1; +} + +/* Handle C-u style numeric args, as well as M--, and M-digits. */ +static int +rl_digit_loop (void) +{ + int c, r; + + while (1) + { + if (_rl_arg_overflow ()) + return 1; + + c = _rl_arg_getchar (); + + if (c < 0) + { + _rl_abort_internal (); + return -1; + } + + r = _rl_arg_dispatch (_rl_argcxt, c); + if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)) + break; + } + + return r; +} + +/* Create a default argument. */ +void +_rl_reset_argument (void) +{ + rl_numeric_arg = rl_arg_sign = 1; + rl_explicit_arg = 0; + _rl_argcxt = 0; +} + +/* Start a numeric argument with initial value KEY */ +int +rl_digit_argument (int ignore, int key) +{ + _rl_arg_init (); + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_arg_dispatch (_rl_argcxt, key); + rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); + return 0; + } + else + { + rl_execute_next (key); + return (rl_digit_loop ()); + } +} + +/* C-u, universal argument. Multiply the current argument by 4. + Read a key. If the key has nothing to do with arguments, then + dispatch on it. If the key is the abort character then abort. */ +int +rl_universal_argument (int count, int key) +{ + _rl_arg_init (); + rl_numeric_arg *= 4; + + return (RL_ISSTATE (RL_STATE_CALLBACK) ? 0 : rl_digit_loop ()); +} + +int +_rl_arg_callback (_rl_arg_cxt cxt) +{ + int c, r; + + c = _rl_arg_getchar (); + if (c < 0) + return (1); /* EOF */ + + if (_rl_argcxt & NUM_READONE) + { + _rl_argcxt &= ~NUM_READONE; + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + rl_execute_next (c); + return 0; + } + + r = _rl_arg_dispatch (cxt, c); + if (r > 0) + rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); + return (r != 1); +} + +/* What to do when you abort reading an argument. */ +int +rl_discard_argument (void) +{ + rl_ding (); + rl_clear_message (); + _rl_reset_argument (); + + return 0; +} + +/* **************************************************************** */ +/* */ +/* History Utilities */ +/* */ +/* **************************************************************** */ + +/* We already have a history library, and that is what we use to control + the history features of readline. This is our local interface to + the history mechanism. */ + +/* While we are editing the history, this is the saved + version of the original line. */ +HIST_ENTRY *_rl_saved_line_for_history = (HIST_ENTRY *)NULL; + +/* Set the history pointer back to the last entry in the history. */ +void +_rl_start_using_history (void) +{ + using_history (); + if (_rl_saved_line_for_history) + _rl_free_history_entry (_rl_saved_line_for_history); + + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; +} + +/* Free the contents (and containing structure) of a HIST_ENTRY. */ +void +_rl_free_history_entry (HIST_ENTRY *entry) +{ + if (entry == 0) + return; + + FREE (entry->line); + FREE (entry->timestamp); + + xfree (entry); +} + +/* Perhaps put back the current line if it has changed. */ +int +rl_maybe_replace_line (void) +{ + HIST_ENTRY *temp; + + temp = current_history (); + /* If the current line has changed, save the changes. */ + if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list)) + { + temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list); + xfree (temp->line); + FREE (temp->timestamp); + xfree (temp); + } + return 0; +} + +/* Restore the _rl_saved_line_for_history if there is one. */ +int +rl_maybe_unsave_line (void) +{ + if (_rl_saved_line_for_history) + { + /* Can't call with `1' because rl_undo_list might point to an undo + list from a history entry, as in rl_replace_from_history() below. */ + rl_replace_line (_rl_saved_line_for_history->line, 0); + rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data; + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + rl_point = rl_end; /* rl_replace_line sets rl_end */ + } + else + rl_ding (); + return 0; +} + +/* Save the current line in _rl_saved_line_for_history. */ +int +rl_maybe_save_line (void) +{ + if (_rl_saved_line_for_history == 0) + { + _rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); + _rl_saved_line_for_history->line = savestring (rl_line_buffer); + _rl_saved_line_for_history->timestamp = (char *)NULL; + _rl_saved_line_for_history->data = (char *)rl_undo_list; + } + + return 0; +} + +int +_rl_free_saved_history_line (void) +{ + if (_rl_saved_line_for_history) + { + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + } + return 0; +} + +static void +_rl_history_set_point (void) +{ + rl_point = (_rl_history_preserve_point && _rl_history_saved_point != -1) + ? _rl_history_saved_point + : rl_end; + if (rl_point > rl_end) + rl_point = rl_end; + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode && _rl_keymap != vi_insertion_keymap) + rl_point = 0; +#endif /* VI_MODE */ + + if (rl_editing_mode == emacs_mode) + rl_mark = (rl_point == rl_end ? 0 : rl_end); +} + +void +rl_replace_from_history (HIST_ENTRY *entry, int flags) +{ + /* Can't call with `1' because rl_undo_list might point to an undo list + from a history entry, just like we're setting up here. */ + rl_replace_line (entry->line, 0); + rl_undo_list = (UNDO_LIST *)entry->data; + rl_point = rl_end; + rl_mark = 0; + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + { + rl_point = 0; + rl_mark = rl_end; + } +#endif +} + +/* Process and free undo lists attached to each history entry prior to the + current entry, inclusive, reverting each line to its saved state. This + is destructive, and state about the current line is lost. This is not + intended to be called while actively editing, and the current line is + not assumed to have been added to the history list. */ +void +_rl_revert_previous_lines (void) +{ + int hpos; + HIST_ENTRY *entry; + UNDO_LIST *ul, *saved_undo_list; + char *lbuf; + + lbuf = savestring (rl_line_buffer); + saved_undo_list = rl_undo_list; + hpos = where_history (); + + entry = (hpos == history_length) ? previous_history () : current_history (); + while (entry) + { + if (ul = (UNDO_LIST *)entry->data) + { + if (ul == saved_undo_list) + saved_undo_list = 0; + /* Set up rl_line_buffer and other variables from history entry */ + rl_replace_from_history (entry, 0); /* entry->line is now current */ + entry->data = 0; /* entry->data is now current undo list */ + /* Undo all changes to this history entry */ + while (rl_undo_list) + rl_do_undo (); + /* And copy the reverted line back to the history entry, preserving + the timestamp. */ + FREE (entry->line); + entry->line = savestring (rl_line_buffer); + } + entry = previous_history (); + } + + /* Restore history state */ + rl_undo_list = saved_undo_list; /* may have been set to null */ + history_set_pos (hpos); + + /* reset the line buffer */ + rl_replace_line (lbuf, 0); + _rl_set_the_line (); + + /* and clean up */ + xfree (lbuf); +} + +/* Revert all lines in the history by making sure we are at the end of the + history before calling _rl_revert_previous_lines() */ +void +_rl_revert_all_lines (void) +{ + int pos; + + pos = where_history (); + using_history (); + _rl_revert_previous_lines (); + history_set_pos (pos); +} + +/* Free the history list, including private readline data and take care + of pointer aliases to history data. Resets rl_undo_list if it points + to an UNDO_LIST * saved as some history entry's data member. This + should not be called while editing is active. */ +void +rl_clear_history (void) +{ + HIST_ENTRY **hlist, *hent; + register int i; + UNDO_LIST *ul, *saved_undo_list; + + saved_undo_list = rl_undo_list; + hlist = history_list (); /* direct pointer, not copy */ + + for (i = 0; i < history_length; i++) + { + hent = hlist[i]; + if (ul = (UNDO_LIST *)hent->data) + { + if (ul == saved_undo_list) + saved_undo_list = 0; + _rl_free_undo_list (ul); + hent->data = 0; + } + _rl_free_history_entry (hent); + } + + history_offset = history_length = 0; + rl_undo_list = saved_undo_list; /* should be NULL */ +} + +/* **************************************************************** */ +/* */ +/* History Commands */ +/* */ +/* **************************************************************** */ + +/* Meta-< goes to the start of the history. */ +int +rl_beginning_of_history (int count, int key) +{ + return (rl_get_previous_history (1 + where_history (), key)); +} + +/* Meta-> goes to the end of the history. (The current line). */ +int +rl_end_of_history (int count, int key) +{ + rl_maybe_replace_line (); + using_history (); + rl_maybe_unsave_line (); + return 0; +} + +/* Move down to the next history line. */ +int +rl_get_next_history (int count, int key) +{ + HIST_ENTRY *temp; + + if (count < 0) + return (rl_get_previous_history (-count, key)); + + if (count == 0) + return 0; + + rl_maybe_replace_line (); + + /* either not saved by rl_newline or at end of line, so set appropriately. */ + if (_rl_history_saved_point == -1 && (rl_point || rl_end)) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + temp = (HIST_ENTRY *)NULL; + while (count) + { + temp = next_history (); + if (!temp) + break; + --count; + } + + if (temp == 0) + rl_maybe_unsave_line (); + else + { + rl_replace_from_history (temp, 0); + _rl_history_set_point (); + } + return 0; +} + +/* Get the previous item out of our interactive history, making it the current + line. If there is no previous history, just ding. */ +int +rl_get_previous_history (int count, int key) +{ + HIST_ENTRY *old_temp, *temp; + int had_saved_line; + + if (count < 0) + return (rl_get_next_history (-count, key)); + + if (count == 0 || history_list () == 0) + return 0; + + /* either not saved by rl_newline or at end of line, so set appropriately. */ + if (_rl_history_saved_point == -1 && (rl_point || rl_end)) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + /* If we don't have a line saved, then save this one. */ + had_saved_line = _rl_saved_line_for_history != 0; + rl_maybe_save_line (); + + /* If the current line has changed, save the changes. */ + rl_maybe_replace_line (); + + temp = old_temp = (HIST_ENTRY *)NULL; + while (count) + { + temp = previous_history (); + if (temp == 0) + break; + + old_temp = temp; + --count; + } + + /* If there was a large argument, and we moved back to the start of the + history, that is not an error. So use the last value found. */ + if (!temp && old_temp) + temp = old_temp; + + if (temp == 0) + { + if (had_saved_line == 0) + _rl_free_saved_history_line (); + rl_ding (); + } + else + { + rl_replace_from_history (temp, 0); + _rl_history_set_point (); + } + + return 0; +} + +/* The equivalent of the Korn shell C-o operate-and-get-next-history-line + editing command. */ + +/* This could stand to be global to the readline library */ +static rl_hook_func_t *_rl_saved_internal_startup_hook = 0; +static int saved_history_logical_offset = -1; + +#define HISTORY_FULL() (history_is_stifled () && history_length >= history_max_entries) + +static int +set_saved_history () +{ + int absolute_offset, count; + + if (saved_history_logical_offset >= 0) + { + absolute_offset = saved_history_logical_offset - history_base; + count = where_history () - absolute_offset; + rl_get_previous_history (count, 0); + } + saved_history_logical_offset = -1; + _rl_internal_startup_hook = _rl_saved_internal_startup_hook; + + return (0); +} + +int +rl_operate_and_get_next (count, c) + int count, c; +{ + /* Accept the current line. */ + rl_newline (1, c); + + saved_history_logical_offset = rl_explicit_arg ? count : where_history () + history_base + 1; + + + _rl_saved_internal_startup_hook = _rl_internal_startup_hook; + _rl_internal_startup_hook = set_saved_history; + + return 0; +} + +/* **************************************************************** */ +/* */ +/* Editing Modes */ +/* */ +/* **************************************************************** */ +/* How to toggle back and forth between editing modes. */ +int +rl_vi_editing_mode (int count, int key) +{ +#if defined (VI_MODE) + _rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */ + rl_editing_mode = vi_mode; + rl_vi_insert_mode (1, key); +#endif /* VI_MODE */ + + return 0; +} + +int +rl_emacs_editing_mode (int count, int key) +{ + rl_editing_mode = emacs_mode; + _rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */ + _rl_keymap = emacs_standard_keymap; + + if (_rl_show_mode_in_prompt) + _rl_reset_prompt (); + + return 0; +} + +/* Function for the rest of the library to use to set insert/overwrite mode. */ +void +_rl_set_insert_mode (int im, int force) +{ +#ifdef CURSOR_MODE + _rl_set_cursor (im, force); +#endif + + rl_insert_mode = im; +} + +/* Toggle overwrite mode. A positive explicit argument selects overwrite + mode. A negative or zero explicit argument selects insert mode. */ +int +rl_overwrite_mode (int count, int key) +{ + if (rl_explicit_arg == 0) + _rl_set_insert_mode (rl_insert_mode ^ 1, 0); + else if (count > 0) + _rl_set_insert_mode (RL_IM_OVERWRITE, 0); + else + _rl_set_insert_mode (RL_IM_INSERT, 0); + + return 0; +} diff --git a/bash-5.1/lib/readline/nls.c b/bash-5.1/lib/readline/nls.c new file mode 100644 index 0000000000000000000000000000000000000000..d2f67e0d3e1ac1a9f085d3e10fbc7af0c129d8e0 --- /dev/null +++ b/bash-5.1/lib/readline/nls.c @@ -0,0 +1,290 @@ +/* nls.c -- skeletal internationalization code. */ + +/* Copyright (C) 1996-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#if defined (HAVE_LANGINFO_CODESET) +# include +#endif + +#include + +#include "rldefs.h" +#include "readline.h" +#include "rlshell.h" +#include "rlprivate.h" + +static int utf8locale PARAMS((char *)); + +#if !defined (HAVE_SETLOCALE) +/* A list of legal values for the LANG or LC_CTYPE environment variables. + If a locale name in this list is the value for the LC_ALL, LC_CTYPE, + or LANG environment variable (using the first of those with a value), + readline eight-bit mode is enabled. */ +static char *legal_lang_values[] = +{ + "iso88591", + "iso88592", + "iso88593", + "iso88594", + "iso88595", + "iso88596", + "iso88597", + "iso88598", + "iso88599", + "iso885910", + "koi8r", + "utf8", + 0 +}; + +static char *normalize_codeset PARAMS((char *)); +#endif /* !HAVE_SETLOCALE */ + +static char *find_codeset PARAMS((char *, size_t *)); + +static char *_rl_get_locale_var PARAMS((const char *)); + +static char * +_rl_get_locale_var (const char *v) +{ + char *lspec; + + lspec = sh_get_env_value ("LC_ALL"); + if (lspec == 0 || *lspec == 0) + lspec = sh_get_env_value (v); + if (lspec == 0 || *lspec == 0) + lspec = sh_get_env_value ("LANG"); + + return lspec; +} + +static int +utf8locale (char *lspec) +{ + char *cp; + size_t len; + +#if HAVE_LANGINFO_CODESET + cp = nl_langinfo (CODESET); + return (STREQ (cp, "UTF-8") || STREQ (cp, "utf8")); +#else + cp = find_codeset (lspec, &len); + + if (cp == 0 || len < 4 || len > 5) + return 0; + return ((len == 5) ? strncmp (cp, "UTF-8", len) == 0 : strncmp (cp, "utf8", 4) == 0); +#endif +} + +/* Query the right environment variables and call setlocale() to initialize + the C library locale settings. */ +char * +_rl_init_locale (void) +{ + char *ret, *lspec; + + /* Set the LC_CTYPE locale category from environment variables. */ + lspec = _rl_get_locale_var ("LC_CTYPE"); + /* Since _rl_get_locale_var queries the right environment variables, + we query the current locale settings with setlocale(), and, if + that doesn't return anything, we set lspec to the empty string to + force the subsequent call to setlocale() to define the `native' + environment. */ + if (lspec == 0 || *lspec == 0) + lspec = setlocale (LC_CTYPE, (char *)NULL); + if (lspec == 0) + lspec = ""; + ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */ + + _rl_utf8locale = (ret && *ret) ? utf8locale (ret) : 0; + + return ret; +} + +/* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value + to decide the defaults for 8-bit character input and output. Returns + 1 if we set eight-bit mode. */ +int +_rl_init_eightbit (void) +{ +/* If we have setlocale(3), just check the current LC_CTYPE category + value, and go into eight-bit mode if it's not C or POSIX. */ +#if defined (HAVE_SETLOCALE) + char *lspec, *t; + + t = _rl_init_locale (); /* returns static pointer */ + + if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0)) + { + _rl_meta_flag = 1; + _rl_convert_meta_chars_to_ascii = 0; + _rl_output_meta_chars = 1; + return (1); + } + else + return (0); + +#else /* !HAVE_SETLOCALE */ + char *lspec, *t; + int i; + + /* We don't have setlocale. Finesse it. Check the environment for the + appropriate variables and set eight-bit mode if they have the right + values. */ + lspec = _rl_get_locale_var ("LC_CTYPE"); + + if (lspec == 0 || (t = normalize_codeset (lspec)) == 0) + return (0); + for (i = 0; t && legal_lang_values[i]; i++) + if (STREQ (t, legal_lang_values[i])) + { + _rl_meta_flag = 1; + _rl_convert_meta_chars_to_ascii = 0; + _rl_output_meta_chars = 1; + break; + } + + _rl_utf8locale = *t ? STREQ (t, "utf8") : 0; + + xfree (t); + return (legal_lang_values[i] ? 1 : 0); +#endif /* !HAVE_SETLOCALE */ +} + +#if !defined (HAVE_SETLOCALE) +static char * +normalize_codeset (char *codeset) +{ + size_t namelen, i; + int len, all_digits; + char *wp, *retval; + + codeset = find_codeset (codeset, &namelen); + + if (codeset == 0) + return (codeset); + + all_digits = 1; + for (len = 0, i = 0; i < namelen; i++) + { + if (ISALNUM ((unsigned char)codeset[i])) + { + len++; + all_digits &= _rl_digit_p (codeset[i]); + } + } + + retval = (char *)malloc ((all_digits ? 3 : 0) + len + 1); + if (retval == 0) + return ((char *)0); + + wp = retval; + /* Add `iso' to beginning of an all-digit codeset */ + if (all_digits) + { + *wp++ = 'i'; + *wp++ = 's'; + *wp++ = 'o'; + } + + for (i = 0; i < namelen; i++) + if (ISALPHA ((unsigned char)codeset[i])) + *wp++ = _rl_to_lower (codeset[i]); + else if (_rl_digit_p (codeset[i])) + *wp++ = codeset[i]; + *wp = '\0'; + + return retval; +} +#endif /* !HAVE_SETLOCALE */ + +/* Isolate codeset portion of locale specification. */ +static char * +find_codeset (char *name, size_t *lenp) +{ + char *cp, *language, *result; + + cp = language = name; + result = (char *)0; + + while (*cp && *cp != '_' && *cp != '@' && *cp != '+' && *cp != ',') + cp++; + + /* This does not make sense: language has to be specified. As + an exception we allow the variable to contain only the codeset + name. Perhaps there are funny codeset names. */ + if (language == cp) + { + *lenp = strlen (language); + result = language; + } + else + { + /* Next is the territory. */ + if (*cp == '_') + do + ++cp; + while (*cp && *cp != '.' && *cp != '@' && *cp != '+' && *cp != ',' && *cp != '_'); + + /* Now, finally, is the codeset. */ + result = cp; + if (*cp == '.') + do + ++cp; + while (*cp && *cp != '@'); + + if (cp - result > 2) + { + result++; + *lenp = cp - result; + } + else + { + *lenp = strlen (language); + result = language; + } + } + + return result; +} diff --git a/bash-5.1/lib/readline/parens.c b/bash-5.1/lib/readline/parens.c new file mode 100644 index 0000000000000000000000000000000000000000..af4797736293d4cefa2d9c57784a1c83a03b434c --- /dev/null +++ b/bash-5.1/lib/readline/parens.c @@ -0,0 +1,180 @@ +/* parens.c -- implementation of matching parentheses feature. */ + +/* Copyright (C) 1987, 1989, 1992-2015, 2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (__TANDEM) +# include +#endif + +#include "rlconf.h" + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "posixselect.h" + +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +#if !defined (strchr) && !defined (__STDC__) +extern char *strchr (), *strrchr (); +#endif /* !strchr && !__STDC__ */ + +#include "readline.h" +#include "rlprivate.h" + +static int find_matching_open PARAMS((char *, int, int)); + +/* Non-zero means try to blink the matching open parenthesis when the + close parenthesis is inserted. */ +int rl_blink_matching_paren = 0; + +static int _paren_blink_usec = 500000; + +/* Change emacs_standard_keymap to have bindings for paren matching when + ON_OR_OFF is 1, change them back to self_insert when ON_OR_OFF == 0. */ +void +_rl_enable_paren_matching (int on_or_off) +{ + if (on_or_off) + { + /* ([{ */ + rl_bind_key_in_map (')', rl_insert_close, emacs_standard_keymap); + rl_bind_key_in_map (']', rl_insert_close, emacs_standard_keymap); + rl_bind_key_in_map ('}', rl_insert_close, emacs_standard_keymap); + +#if defined (VI_MODE) + /* ([{ */ + rl_bind_key_in_map (')', rl_insert_close, vi_insertion_keymap); + rl_bind_key_in_map (']', rl_insert_close, vi_insertion_keymap); + rl_bind_key_in_map ('}', rl_insert_close, vi_insertion_keymap); +#endif + } + else + { + /* ([{ */ + rl_bind_key_in_map (')', rl_insert, emacs_standard_keymap); + rl_bind_key_in_map (']', rl_insert, emacs_standard_keymap); + rl_bind_key_in_map ('}', rl_insert, emacs_standard_keymap); + +#if defined (VI_MODE) + /* ([{ */ + rl_bind_key_in_map (')', rl_insert, vi_insertion_keymap); + rl_bind_key_in_map (']', rl_insert, vi_insertion_keymap); + rl_bind_key_in_map ('}', rl_insert, vi_insertion_keymap); +#endif + } +} + +int +rl_set_paren_blink_timeout (int u) +{ + int o; + + o = _paren_blink_usec; + if (u > 0) + _paren_blink_usec = u; + return (o); +} + +int +rl_insert_close (int count, int invoking_key) +{ + if (rl_explicit_arg || !rl_blink_matching_paren) + _rl_insert_char (count, invoking_key); + else + { +#if defined (HAVE_SELECT) + int orig_point, match_point, ready; + struct timeval timer; + fd_set readfds; + + _rl_insert_char (1, invoking_key); + (*rl_redisplay_function) (); + match_point = + find_matching_open (rl_line_buffer, rl_point - 2, invoking_key); + + /* Emacs might message or ring the bell here, but I don't. */ + if (match_point < 0) + return 1; + + FD_ZERO (&readfds); + FD_SET (fileno (rl_instream), &readfds); + USEC_TO_TIMEVAL (_paren_blink_usec, timer); + + orig_point = rl_point; + rl_point = match_point; + (*rl_redisplay_function) (); + ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer); + rl_point = orig_point; +#else /* !HAVE_SELECT */ + _rl_insert_char (count, invoking_key); +#endif /* !HAVE_SELECT */ + } + return 0; +} + +static int +find_matching_open (char *string, int from, int closer) +{ + register int i; + int opener, level, delimiter; + + switch (closer) + { + case ']': opener = '['; break; + case '}': opener = '{'; break; + case ')': opener = '('; break; + default: + return (-1); + } + + level = 1; /* The closer passed in counts as 1. */ + delimiter = 0; /* Delimited state unknown. */ + + for (i = from; i > -1; i--) + { + if (delimiter && (string[i] == delimiter)) + delimiter = 0; + else if (rl_basic_quote_characters && strchr (rl_basic_quote_characters, string[i])) + delimiter = string[i]; + else if (!delimiter && (string[i] == closer)) + level++; + else if (!delimiter && (string[i] == opener)) + level--; + + if (!level) + break; + } + return (i); +} diff --git a/bash-5.1/lib/readline/parse-colors.c b/bash-5.1/lib/readline/parse-colors.c new file mode 100644 index 0000000000000000000000000000000000000000..05ec9bc36a40def55f2984ec6014b65117d9a74b --- /dev/null +++ b/bash-5.1/lib/readline/parse-colors.c @@ -0,0 +1,440 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2017 + Free Software Foundation, Inc. + + 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 . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +// strdup() / strcpy() +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +// abort() +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "rldefs.h" // STREQ, savestring +#include "readline.h" +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +#include "colors.h" +#include "parse-colors.h" + +#if defined (COLOR_SUPPORT) + +static bool get_funky_string (char **dest, const char **src, bool equals_end, size_t *output_count); + +struct bin_str _rl_color_indicator[] = + { + { LEN_STR_PAIR ("\033[") }, // lc: Left of color sequence + { LEN_STR_PAIR ("m") }, // rc: Right of color sequence + { 0, NULL }, // ec: End color (replaces lc+no+rc) + { LEN_STR_PAIR ("0") }, // rs: Reset to ordinary colors + { 0, NULL }, // no: Normal + { 0, NULL }, // fi: File: default + { LEN_STR_PAIR ("01;34") }, // di: Directory: bright blue + { LEN_STR_PAIR ("01;36") }, // ln: Symlink: bright cyan + { LEN_STR_PAIR ("33") }, // pi: Pipe: yellow/brown + { LEN_STR_PAIR ("01;35") }, // so: Socket: bright magenta + { LEN_STR_PAIR ("01;33") }, // bd: Block device: bright yellow + { LEN_STR_PAIR ("01;33") }, // cd: Char device: bright yellow + { 0, NULL }, // mi: Missing file: undefined + { 0, NULL }, // or: Orphaned symlink: undefined + { LEN_STR_PAIR ("01;32") }, // ex: Executable: bright green + { LEN_STR_PAIR ("01;35") }, // do: Door: bright magenta + { LEN_STR_PAIR ("37;41") }, // su: setuid: white on red + { LEN_STR_PAIR ("30;43") }, // sg: setgid: black on yellow + { LEN_STR_PAIR ("37;44") }, // st: sticky: black on blue + { LEN_STR_PAIR ("34;42") }, // ow: other-writable: blue on green + { LEN_STR_PAIR ("30;42") }, // tw: ow w/ sticky: black on green + { LEN_STR_PAIR ("30;41") }, // ca: black on red + { 0, NULL }, // mh: disabled by default + { LEN_STR_PAIR ("\033[K") }, // cl: clear to end of line + }; + +/* Parse a string as part of the LS_COLORS variable; this may involve + decoding all kinds of escape characters. If equals_end is set an + unescaped equal sign ends the string, otherwise only a : or \0 + does. Set *OUTPUT_COUNT to the number of bytes output. Return + true if successful. + + The resulting string is *not* null-terminated, but may contain + embedded nulls. + + Note that both dest and src are char **; on return they point to + the first free byte after the array and the character that ended + the input string, respectively. */ + +static bool +get_funky_string (char **dest, const char **src, bool equals_end, size_t *output_count) { + char num; /* For numerical codes */ + size_t count; /* Something to count with */ + enum { + ST_GND, ST_BACKSLASH, ST_OCTAL, ST_HEX, ST_CARET, ST_END, ST_ERROR + } state; + const char *p; + char *q; + + p = *src; /* We don't want to double-indirect */ + q = *dest; /* the whole darn time. */ + + count = 0; /* No characters counted in yet. */ + num = 0; + + state = ST_GND; /* Start in ground state. */ + while (state < ST_END) + { + switch (state) + { + case ST_GND: /* Ground state (no escapes) */ + switch (*p) + { + case ':': + case '\0': + state = ST_END; /* End of string */ + break; + case '\\': + state = ST_BACKSLASH; /* Backslash scape sequence */ + ++p; + break; + case '^': + state = ST_CARET; /* Caret escape */ + ++p; + break; + case '=': + if (equals_end) + { + state = ST_END; /* End */ + break; + } + /* else fall through */ + default: + *(q++) = *(p++); + ++count; + break; + } + break; + + case ST_BACKSLASH: /* Backslash escaped character */ + switch (*p) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + state = ST_OCTAL; /* Octal sequence */ + num = *p - '0'; + break; + case 'x': + case 'X': + state = ST_HEX; /* Hex sequence */ + num = 0; + break; + case 'a': /* Bell */ + num = '\a'; + break; + case 'b': /* Backspace */ + num = '\b'; + break; + case 'e': /* Escape */ + num = 27; + break; + case 'f': /* Form feed */ + num = '\f'; + break; + case 'n': /* Newline */ + num = '\n'; + break; + case 'r': /* Carriage return */ + num = '\r'; + break; + case 't': /* Tab */ + num = '\t'; + break; + case 'v': /* Vtab */ + num = '\v'; + break; + case '?': /* Delete */ + num = 127; + break; + case '_': /* Space */ + num = ' '; + break; + case '\0': /* End of string */ + state = ST_ERROR; /* Error! */ + break; + default: /* Escaped character like \ ^ : = */ + num = *p; + break; + } + if (state == ST_BACKSLASH) + { + *(q++) = num; + ++count; + state = ST_GND; + } + ++p; + break; + + case ST_OCTAL: /* Octal sequence */ + if (*p < '0' || *p > '7') + { + *(q++) = num; + ++count; + state = ST_GND; + } + else + num = (num << 3) + (*(p++) - '0'); + break; + + case ST_HEX: /* Hex sequence */ + switch (*p) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + num = (num << 4) + (*(p++) - '0'); + break; + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + num = (num << 4) + (*(p++) - 'a') + 10; + break; + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + num = (num << 4) + (*(p++) - 'A') + 10; + break; + default: + *(q++) = num; + ++count; + state = ST_GND; + break; + } + break; + + case ST_CARET: /* Caret escape */ + state = ST_GND; /* Should be the next state... */ + if (*p >= '@' && *p <= '~') + { + *(q++) = *(p++) & 037; + ++count; + } + else if (*p == '?') + { + *(q++) = 127; + ++count; + } + else + state = ST_ERROR; + break; + + default: + /* should we ? */ + /* abort (); no, we should not */ + state = ST_ERROR; + break; + } + } + + *dest = q; + *src = p; + *output_count = count; + + return state != ST_ERROR; +} +#endif /* COLOR_SUPPORT */ + +void _rl_parse_colors(void) +{ +#if defined (COLOR_SUPPORT) + const char *p; /* Pointer to character being parsed */ + char *buf; /* color_buf buffer pointer */ + int state; /* State of parser */ + int ind_no; /* Indicator number */ + char label[3]; /* Indicator label */ + COLOR_EXT_TYPE *ext; /* Extension we are working on */ + + p = sh_get_env_value ("LS_COLORS"); + if (p == 0 || *p == '\0') + { + _rl_color_ext_list = NULL; + return; + } + + ext = NULL; + strcpy (label, "??"); + + /* This is an overly conservative estimate, but any possible + LS_COLORS string will *not* generate a color_buf longer than + itself, so it is a safe way of allocating a buffer in + advance. */ + buf = color_buf = savestring (p); + + state = 1; + while (state > 0) + { + switch (state) + { + case 1: /* First label character */ + switch (*p) + { + case ':': + ++p; + break; + + case '*': + /* Allocate new extension block and add to head of + linked list (this way a later definition will + override an earlier one, which can be useful for + having terminal-specific defs override global). */ + + ext = (COLOR_EXT_TYPE *)xmalloc (sizeof *ext); + ext->next = _rl_color_ext_list; + _rl_color_ext_list = ext; + + ++p; + ext->ext.string = buf; + + state = (get_funky_string (&buf, &p, true, &ext->ext.len) + ? 4 : -1); + break; + + case '\0': + state = 0; /* Done! */ + break; + + default: /* Assume it is file type label */ + label[0] = *(p++); + state = 2; + break; + } + break; + + case 2: /* Second label character */ + if (*p) + { + label[1] = *(p++); + state = 3; + } + else + state = -1; /* Error */ + break; + + case 3: /* Equal sign after indicator label */ + state = -1; /* Assume failure... */ + if (*(p++) == '=')/* It *should* be... */ + { + for (ind_no = 0; indicator_name[ind_no] != NULL; ++ind_no) + { + if (STREQ (label, indicator_name[ind_no])) + { + _rl_color_indicator[ind_no].string = buf; + state = (get_funky_string (&buf, &p, false, + &_rl_color_indicator[ind_no].len) + ? 1 : -1); + break; + } + } + if (state == -1) + { + _rl_errmsg ("LS_COLORS: unrecognized prefix: %s", label); + /* recover from an unrecognized prefix */ + while (p && *p && *p != ':') + p++; + if (p && *p == ':') + state = 1; + else if (p && *p == 0) + state = 0; + } + } + break; + + case 4: /* Equal sign after *.ext */ + if (*(p++) == '=') + { + ext->seq.string = buf; + state = (get_funky_string (&buf, &p, false, &ext->seq.len) + ? 1 : -1); + } + else + state = -1; + /* XXX - recover here as with an unrecognized prefix? */ + if (state == -1 && ext->ext.string) + _rl_errmsg ("LS_COLORS: syntax error: %s", ext->ext.string); + break; + } + } + + if (state < 0) + { + COLOR_EXT_TYPE *e; + COLOR_EXT_TYPE *e2; + + _rl_errmsg ("unparsable value for LS_COLORS environment variable"); + free (color_buf); + for (e = _rl_color_ext_list; e != NULL; /* empty */) + { + e2 = e; + e = e->next; + free (e2); + } + _rl_color_ext_list = NULL; + _rl_colored_stats = 0; /* can't have colored stats without colors */ + } +#else /* !COLOR_SUPPORT */ + ; +#endif /* !COLOR_SUPPORT */ +} diff --git a/bash-5.1/lib/readline/parse-colors.h b/bash-5.1/lib/readline/parse-colors.h new file mode 100644 index 0000000000000000000000000000000000000000..aef86f784d45d519cc3a2b6f69eafd30a550dff8 --- /dev/null +++ b/bash-5.1/lib/readline/parse-colors.h @@ -0,0 +1,46 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 Free Software Foundation, + Inc. + + 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 . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#ifndef _PARSE_COLORS_H_ +#define _PARSE_COLORS_H_ + +#include "readline.h" + +#define LEN_STR_PAIR(s) sizeof (s) - 1, s + +void _rl_parse_colors (void); + +static const char *const indicator_name[]= + { + "lc", "rc", "ec", "rs", "no", "fi", "di", "ln", "pi", "so", + "bd", "cd", "mi", "or", "ex", "do", "su", "sg", "st", + "ow", "tw", "ca", "mh", "cl", NULL + }; + +/* Buffer for color sequences */ +static char *color_buf; + +#endif /* !_PARSE_COLORS_H_ */ diff --git a/bash-5.1/lib/readline/posixdir.h b/bash-5.1/lib/readline/posixdir.h new file mode 100644 index 0000000000000000000000000000000000000000..af5be8012b347eee3b62ba0e78f36109619999e0 --- /dev/null +++ b/bash-5.1/lib/readline/posixdir.h @@ -0,0 +1,71 @@ +/* posixdir.h -- Posix directory reading includes and defines. */ + +/* Copyright (C) 1987,1991,2012 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* This file should be included instead of or . */ + +#if !defined (_POSIXDIR_H_) +#define _POSIXDIR_H_ + +#if defined (HAVE_DIRENT_H) +# include +# if defined (HAVE_STRUCT_DIRENT_D_NAMLEN) +# define D_NAMLEN(d) ((d)->d_namlen) +# else +# define D_NAMLEN(d) (strlen ((d)->d_name)) +# endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */ +#else +# if defined (HAVE_SYS_NDIR_H) +# include +# endif +# if defined (HAVE_SYS_DIR_H) +# include +# endif +# if defined (HAVE_NDIR_H) +# include +# endif +# if !defined (dirent) +# define dirent direct +# endif /* !dirent */ +# define D_NAMLEN(d) ((d)->d_namlen) +#endif /* !HAVE_DIRENT_H */ + +/* The bash code fairly consistently uses d_fileno; make sure it's available */ +#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO) +# define d_fileno d_ino +#endif + +/* Posix does not require that the d_ino field be present, and some + systems do not provide it. */ +#if !defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO) +# define REAL_DIR_ENTRY(dp) 1 +#else +# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) +#endif /* _POSIX_SOURCE */ + +#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (BROKEN_DIRENT_D_INO) +# define D_INO_AVAILABLE +#endif + +/* Signal the rest of the code that it can safely use dirent.d_fileno */ +#if defined (D_INO_AVAILABLE) || defined (HAVE_STRUCT_DIRENT_D_FILENO) +# define D_FILENO_AVAILABLE 1 +#endif + +#endif /* !_POSIXDIR_H_ */ diff --git a/bash-5.1/lib/readline/posixjmp.h b/bash-5.1/lib/readline/posixjmp.h new file mode 100644 index 0000000000000000000000000000000000000000..9c7e99ed42f01bb85482e7933a4d8431c9b313cb --- /dev/null +++ b/bash-5.1/lib/readline/posixjmp.h @@ -0,0 +1,46 @@ +/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ + +/* Copyright (C) 1987,1991-2015 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _POSIXJMP_H_ +#define _POSIXJMP_H_ + +#include + +/* This *must* be included *after* config.h */ + +#if defined (HAVE_POSIX_SIGSETJMP) +# define procenv_t sigjmp_buf + +# define setjmp_nosigs(x) sigsetjmp((x), 0) +# define setjmp_sigs(x) sigsetjmp((x), 1) + +# define _rl_longjmp(x, n) siglongjmp((x), (n)) +# define sh_longjmp(x, n) siglongjmp((x), (n)) +#else +# define procenv_t jmp_buf + +# define setjmp_nosigs setjmp +# define setjmp_sigs setjmp + +# define _rl_longjmp(x, n) longjmp((x), (n)) +# define sh_longjmp(x, n) longjmp((x), (n)) +#endif + +#endif /* _POSIXJMP_H_ */ diff --git a/bash-5.1/lib/readline/posixselect.h b/bash-5.1/lib/readline/posixselect.h new file mode 100644 index 0000000000000000000000000000000000000000..da6a1ace0c41ea2ddc7bb1692a79db02e38082ef --- /dev/null +++ b/bash-5.1/lib/readline/posixselect.h @@ -0,0 +1,47 @@ +/* posixselect.h -- wrapper for select(2) includes and definitions */ + +/* Copyright (C) 2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _POSIXSELECT_H_ +#define _POSIXSELECT_H_ + +#if defined (FD_SET) && !defined (HAVE_SELECT) +# define HAVE_SELECT 1 +#endif + +#if defined (HAVE_SELECT) +# if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX) +# include +# endif +#endif /* HAVE_SELECT */ +#if defined (HAVE_SYS_SELECT_H) +# include +#endif + +#ifndef USEC_PER_SEC +# define USEC_PER_SEC 1000000 +#endif + +#define USEC_TO_TIMEVAL(us, tv) \ +do { \ + (tv).tv_sec = (us) / USEC_PER_SEC; \ + (tv).tv_usec = (us) % USEC_PER_SEC; \ +} while (0) + +#endif /* _POSIXSELECT_H_ */ diff --git a/bash-5.1/lib/readline/posixstat.h b/bash-5.1/lib/readline/posixstat.h new file mode 100644 index 0000000000000000000000000000000000000000..b60778606b65bedbb911ff105e1e4851af080075 --- /dev/null +++ b/bash-5.1/lib/readline/posixstat.h @@ -0,0 +1,162 @@ +/* posixstat.h -- Posix stat(2) definitions for systems that + don't have them. */ + +/* Copyright (C) 1987-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* This file should be included instead of . + It relies on the local sys/stat.h to work though. */ +#if !defined (_POSIXSTAT_H_) +#define _POSIXSTAT_H_ + +#include + +#if defined (STAT_MACROS_BROKEN) +# undef S_ISBLK +# undef S_ISCHR +# undef S_ISDIR +# undef S_ISFIFO +# undef S_ISREG +# undef S_ISLNK +#endif /* STAT_MACROS_BROKEN */ + +/* These are guaranteed to work only on isc386 */ +#if !defined (S_IFDIR) && !defined (S_ISDIR) +# define S_IFDIR 0040000 +#endif /* !S_IFDIR && !S_ISDIR */ +#if !defined (S_IFMT) +# define S_IFMT 0170000 +#endif /* !S_IFMT */ + +/* Posix 1003.1 5.6.1.1 file types */ + +/* Some Posix-wannabe systems define _S_IF* macros instead of S_IF*, but + do not provide the S_IS* macros that Posix requires. */ + +#if defined (_S_IFMT) && !defined (S_IFMT) +#define S_IFMT _S_IFMT +#endif +#if defined (_S_IFIFO) && !defined (S_IFIFO) +#define S_IFIFO _S_IFIFO +#endif +#if defined (_S_IFCHR) && !defined (S_IFCHR) +#define S_IFCHR _S_IFCHR +#endif +#if defined (_S_IFDIR) && !defined (S_IFDIR) +#define S_IFDIR _S_IFDIR +#endif +#if defined (_S_IFBLK) && !defined (S_IFBLK) +#define S_IFBLK _S_IFBLK +#endif +#if defined (_S_IFREG) && !defined (S_IFREG) +#define S_IFREG _S_IFREG +#endif +#if defined (_S_IFLNK) && !defined (S_IFLNK) +#define S_IFLNK _S_IFLNK +#endif +#if defined (_S_IFSOCK) && !defined (S_IFSOCK) +#define S_IFSOCK _S_IFSOCK +#endif + +/* Test for each symbol individually and define the ones necessary (some + systems claiming Posix compatibility define some but not all). */ + +#if defined (S_IFBLK) && !defined (S_ISBLK) +#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */ +#endif + +#if defined (S_IFCHR) && !defined (S_ISCHR) +#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */ +#endif + +#if defined (S_IFDIR) && !defined (S_ISDIR) +#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */ +#endif + +#if defined (S_IFREG) && !defined (S_ISREG) +#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */ +#endif + +#if defined (S_IFIFO) && !defined (S_ISFIFO) +#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */ +#endif + +#if defined (S_IFLNK) && !defined (S_ISLNK) +#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */ +#endif + +#if defined (S_IFSOCK) && !defined (S_ISSOCK) +#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */ +#endif + +/* + * POSIX 1003.1 5.6.1.2 File Modes + */ + +#if !defined (S_IRWXU) +# if !defined (S_IREAD) +# define S_IREAD 00400 +# define S_IWRITE 00200 +# define S_IEXEC 00100 +# endif /* S_IREAD */ + +# if !defined (S_IRUSR) +# define S_IRUSR S_IREAD /* read, owner */ +# define S_IWUSR S_IWRITE /* write, owner */ +# define S_IXUSR S_IEXEC /* execute, owner */ + +# define S_IRGRP (S_IREAD >> 3) /* read, group */ +# define S_IWGRP (S_IWRITE >> 3) /* write, group */ +# define S_IXGRP (S_IEXEC >> 3) /* execute, group */ + +# define S_IROTH (S_IREAD >> 6) /* read, other */ +# define S_IWOTH (S_IWRITE >> 6) /* write, other */ +# define S_IXOTH (S_IEXEC >> 6) /* execute, other */ +# endif /* !S_IRUSR */ + +# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) +# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +#else /* !S_IRWXU */ + /* S_IRWXU is defined, but "group" and "other" bits might not be + (happens in certain versions of MinGW). */ +# if !defined (S_IRGRP) +# define S_IRGRP (S_IREAD >> 3) /* read, group */ +# define S_IWGRP (S_IWRITE >> 3) /* write, group */ +# define S_IXGRP (S_IEXEC >> 3) /* execute, group */ +# endif /* !S_IRGRP */ + +# if !defined (S_IROTH) +# define S_IROTH (S_IREAD >> 6) /* read, other */ +# define S_IWOTH (S_IWRITE >> 6) /* write, other */ +# define S_IXOTH (S_IEXEC >> 6) /* execute, other */ +# endif /* !S_IROTH */ +# if !defined (S_IRWXG) +# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +# endif +# if !defined (S_IRWXO) +# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +# endif +#endif /* !S_IRWXU */ + +/* These are non-standard, but are used in builtins.c$symbolic_umask() */ +#define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) +#define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH) +#define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) + +#endif /* _POSIXSTAT_H_ */ diff --git a/bash-5.1/lib/readline/readline.c b/bash-5.1/lib/readline/readline.c new file mode 100644 index 0000000000000000000000000000000000000000..c8726ff065c72b0d0d857ac96b3ab8ae0d1a09f7 --- /dev/null +++ b/bash-5.1/lib/readline/readline.c @@ -0,0 +1,1581 @@ +/* readline.c -- a general facility for reading lines of input + with emacs style editing and completion. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include "posixstat.h" +#include +#if defined (HAVE_SYS_FILE_H) +# include +#endif /* HAVE_SYS_FILE_H */ + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#include +#include "posixjmp.h" +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if defined (HAVE_DECL_AUDIT_USER_TTY) +# include +# include +# include +#endif + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +#if defined (__EMX__) +# define INCL_DOSPROCESS +# include +#endif /* __EMX__ */ + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +#ifndef RL_LIBRARY_VERSION +# define RL_LIBRARY_VERSION "8.0" +#endif + +#ifndef RL_READLINE_VERSION +# define RL_READLINE_VERSION 0x0800 +#endif + +extern void _rl_free_history_entry PARAMS((HIST_ENTRY *)); + +#if defined (COLOR_SUPPORT) +extern void _rl_parse_colors PARAMS((void)); /* XXX */ +#endif + + +/* Forward declarations used in this file. */ +static char *readline_internal PARAMS((void)); +static void readline_initialize_everything PARAMS((void)); + +static void bind_arrow_keys_internal PARAMS((Keymap)); +static void bind_arrow_keys PARAMS((void)); + +static void bind_bracketed_paste_prefix PARAMS((void)); + +static void readline_default_bindings PARAMS((void)); +static void reset_default_bindings PARAMS((void)); + +static int _rl_subseq_result PARAMS((int, Keymap, int, int)); +static int _rl_subseq_getchar PARAMS((int)); + +/* **************************************************************** */ +/* */ +/* Line editing input utility */ +/* */ +/* **************************************************************** */ + +const char *rl_library_version = RL_LIBRARY_VERSION; + +int rl_readline_version = RL_READLINE_VERSION; + +/* True if this is `real' readline as opposed to some stub substitute. */ +int rl_gnu_readline_p = 1; + +/* A pointer to the keymap that is currently in use. + By default, it is the standard emacs keymap. */ +Keymap _rl_keymap = emacs_standard_keymap; + +/* The current style of editing. */ +int rl_editing_mode = emacs_mode; + +/* The current insert mode: input (the default) or overwrite */ +int rl_insert_mode = RL_IM_DEFAULT; + +/* Non-zero if we called this function from _rl_dispatch(). It's present + so functions can find out whether they were called from a key binding + or directly from an application. */ +int rl_dispatching; + +/* Non-zero if the previous command was a kill command. */ +int _rl_last_command_was_kill = 0; + +/* The current value of the numeric argument specified by the user. */ +int rl_numeric_arg = 1; + +/* Non-zero if an argument was typed. */ +int rl_explicit_arg = 0; + +/* Temporary value used while generating the argument. */ +int rl_arg_sign = 1; + +/* Non-zero means we have been called at least once before. */ +static int rl_initialized; + +#if 0 +/* If non-zero, this program is running in an EMACS buffer. */ +static int running_in_emacs; +#endif + +/* Flags word encapsulating the current readline state. */ +unsigned long rl_readline_state = RL_STATE_NONE; + +/* The current offset in the current input line. */ +int rl_point; + +/* Mark in the current input line. */ +int rl_mark; + +/* Length of the current input line. */ +int rl_end; + +/* Make this non-zero to return the current input_line. */ +int rl_done; + +/* The last function executed by readline. */ +rl_command_func_t *rl_last_func = (rl_command_func_t *)NULL; + +/* Top level environment for readline_internal (). */ +procenv_t _rl_top_level; + +/* The streams we interact with. */ +FILE *_rl_in_stream, *_rl_out_stream; + +/* The names of the streams that we do input and output to. */ +FILE *rl_instream = (FILE *)NULL; +FILE *rl_outstream = (FILE *)NULL; + +/* Non-zero means echo characters as they are read. Defaults to no echo; + set to 1 if there is a controlling terminal, we can get its attributes, + and the attributes include `echo'. Look at rltty.c:prepare_terminal_settings + for the code that sets it. */ +int _rl_echoing_p = 0; + +/* Current prompt. */ +char *rl_prompt = (char *)NULL; +int rl_visible_prompt_length = 0; + +/* Set to non-zero by calling application if it has already printed rl_prompt + and does not want readline to do it the first time. */ +int rl_already_prompted = 0; + +/* The number of characters read in order to type this complete command. */ +int rl_key_sequence_length = 0; + +/* If non-zero, then this is the address of a function to call just + before readline_internal_setup () prints the first prompt. */ +rl_hook_func_t *rl_startup_hook = (rl_hook_func_t *)NULL; + +/* Any readline function can set this and have it run just before the user's + rl_startup_hook. */ +rl_hook_func_t *_rl_internal_startup_hook = (rl_hook_func_t *)NULL; + +/* If non-zero, this is the address of a function to call just before + readline_internal_setup () returns and readline_internal starts + reading input characters. */ +rl_hook_func_t *rl_pre_input_hook = (rl_hook_func_t *)NULL; + +/* What we use internally. You should always refer to RL_LINE_BUFFER. */ +static char *the_line; + +/* The character that can generate an EOF. Really read from + the terminal driver... just defaulted here. */ +int _rl_eof_char = CTRL ('D'); + +/* Non-zero makes this the next keystroke to read. */ +int rl_pending_input = 0; + +/* If non-zero when readline_internal returns, it means we found EOF */ +int _rl_eof_found = 0; + +/* Pointer to a useful terminal name. */ +const char *rl_terminal_name = (const char *)NULL; + +/* Non-zero means to always use horizontal scrolling in line display. */ +int _rl_horizontal_scroll_mode = 0; + +/* Non-zero means to display an asterisk at the starts of history lines + which have been modified. */ +int _rl_mark_modified_lines = 0; + +/* The style of `bell' notification preferred. This can be set to NO_BELL, + AUDIBLE_BELL, or VISIBLE_BELL. */ +int _rl_bell_preference = AUDIBLE_BELL; + +/* String inserted into the line by rl_insert_comment (). */ +char *_rl_comment_begin; + +/* Keymap holding the function currently being executed. */ +Keymap rl_executing_keymap; + +/* Keymap we're currently using to dispatch. */ +Keymap _rl_dispatching_keymap; + +/* Non-zero means to erase entire line, including prompt, on empty input lines. */ +int rl_erase_empty_line = 0; + +/* Non-zero means to read only this many characters rather than up to a + character bound to accept-line. */ +int rl_num_chars_to_read = 0; + +/* Line buffer and maintenance. */ +char *rl_line_buffer = (char *)NULL; +int rl_line_buffer_len = 0; + +/* Key sequence `contexts' */ +_rl_keyseq_cxt *_rl_kscxt = 0; + +int rl_executing_key; +char *rl_executing_keyseq = 0; +int _rl_executing_keyseq_size = 0; + +struct _rl_cmd _rl_pending_command; +struct _rl_cmd *_rl_command_to_execute = (struct _rl_cmd *)NULL; + +/* Timeout (specified in milliseconds) when reading characters making up an + ambiguous multiple-key sequence */ +int _rl_keyseq_timeout = 500; + +#define RESIZE_KEYSEQ_BUFFER() \ + do \ + { \ + if (rl_key_sequence_length + 2 >= _rl_executing_keyseq_size) \ + { \ + _rl_executing_keyseq_size += 16; \ + rl_executing_keyseq = xrealloc (rl_executing_keyseq, _rl_executing_keyseq_size); \ + } \ + } \ + while (0); + +/* Forward declarations used by the display, termcap, and history code. */ + +/* **************************************************************** */ +/* */ +/* `Forward' declarations */ +/* */ +/* **************************************************************** */ + +/* Non-zero means do not parse any lines other than comments and + parser directives. */ +unsigned char _rl_parsing_conditionalized_out = 0; + +/* Non-zero means to convert characters with the meta bit set to + escape-prefixed characters so we can indirect through + emacs_meta_keymap or vi_escape_keymap. */ +int _rl_convert_meta_chars_to_ascii = 1; + +/* Non-zero means to output characters with the meta bit set directly + rather than as a meta-prefixed escape sequence. */ +int _rl_output_meta_chars = 0; + +/* Non-zero means to look at the termios special characters and bind + them to equivalent readline functions at startup. */ +int _rl_bind_stty_chars = 1; + +/* Non-zero means to go through the history list at every newline (or + whenever rl_done is set and readline returns) and revert each line to + its initial state. */ +int _rl_revert_all_at_newline = 0; + +/* Non-zero means to honor the termios ECHOCTL bit and echo control + characters corresponding to keyboard-generated signals. */ +int _rl_echo_control_chars = 1; + +/* Non-zero means to prefix the displayed prompt with a character indicating + the editing mode: @ for emacs, : for vi-command, + for vi-insert. */ +int _rl_show_mode_in_prompt = 0; + +/* Non-zero means to attempt to put the terminal in `bracketed paste mode', + where it will prefix pasted text with an escape sequence and send + another to mark the end of the paste. */ +int _rl_enable_bracketed_paste = BRACKETED_PASTE_DEFAULT; +int _rl_enable_active_region = BRACKETED_PASTE_DEFAULT; + +/* **************************************************************** */ +/* */ +/* Top Level Functions */ +/* */ +/* **************************************************************** */ + +/* Non-zero means treat 0200 bit in terminal input as Meta bit. */ +int _rl_meta_flag = 0; /* Forward declaration */ + +/* Set up the prompt and expand it. Called from readline() and + rl_callback_handler_install (). */ +int +rl_set_prompt (const char *prompt) +{ + FREE (rl_prompt); + rl_prompt = prompt ? savestring (prompt) : (char *)NULL; + rl_display_prompt = rl_prompt ? rl_prompt : ""; + + rl_visible_prompt_length = rl_expand_prompt (rl_prompt); + return 0; +} + +#if defined (HAVE_DECL_AUDIT_USER_TTY) +/* Report STRING to the audit system. */ +static void +audit_tty (char *string) +{ + struct sockaddr_nl addr; + struct msghdr msg; + struct nlmsghdr nlm; + struct iovec iov[2]; + size_t size; + int fd; + + size = strlen (string) + 1; + fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_AUDIT); + if (fd < 0) + return; + nlm.nlmsg_len = NLMSG_LENGTH (size); + nlm.nlmsg_type = AUDIT_USER_TTY; + nlm.nlmsg_flags = NLM_F_REQUEST; + nlm.nlmsg_seq = 0; + nlm.nlmsg_pid = 0; + iov[0].iov_base = &nlm; + iov[0].iov_len = sizeof (nlm); + iov[1].iov_base = string; + iov[1].iov_len = size; + addr.nl_family = AF_NETLINK; + addr.nl_pad = 0; + addr.nl_pid = 0; + addr.nl_groups = 0; + msg.msg_name = &addr; + msg.msg_namelen = sizeof (addr); + msg.msg_iov = iov; + msg.msg_iovlen = 2; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + (void)sendmsg (fd, &msg, 0); + close (fd); +} +#endif + +/* Read a line of input. Prompt with PROMPT. An empty PROMPT means + none. A return value of NULL means that EOF was encountered. */ +char * +readline (const char *prompt) +{ + char *value; +#if 0 + int in_callback; +#endif + + /* If we are at EOF return a NULL string. */ + if (rl_pending_input == EOF) + { + rl_clear_pending_input (); + return ((char *)NULL); + } + +#if 0 + /* If readline() is called after installing a callback handler, temporarily + turn off the callback state to avoid ensuing messiness. Patch supplied + by the gdb folks. XXX -- disabled. This can be fooled and readline + left in a strange state by a poorly-timed longjmp. */ + if (in_callback = RL_ISSTATE (RL_STATE_CALLBACK)) + RL_UNSETSTATE (RL_STATE_CALLBACK); +#endif + + rl_set_prompt (prompt); + + rl_initialize (); + if (rl_prep_term_function) + (*rl_prep_term_function) (_rl_meta_flag); + +#if defined (HANDLE_SIGNALS) + rl_set_signals (); +#endif + + value = readline_internal (); + if (rl_deprep_term_function) + (*rl_deprep_term_function) (); + +#if defined (HANDLE_SIGNALS) + rl_clear_signals (); +#endif + +#if 0 + if (in_callback) + RL_SETSTATE (RL_STATE_CALLBACK); +#endif + +#if HAVE_DECL_AUDIT_USER_TTY && defined (HAVE_LIBAUDIT_H) && defined (ENABLE_TTY_AUDIT_SUPPORT) + if (value) + _rl_audit_tty (value); +#endif + + return (value); +} + +#if defined (READLINE_CALLBACKS) +# define STATIC_CALLBACK +#else +# define STATIC_CALLBACK static +#endif + +STATIC_CALLBACK void +readline_internal_setup (void) +{ + char *nprompt; + + _rl_in_stream = rl_instream; + _rl_out_stream = rl_outstream; + + /* Enable the meta key only for the duration of readline(), if this + terminal has one and the terminal has been initialized */ + if (_rl_enable_meta & RL_ISSTATE (RL_STATE_TERMPREPPED)) + _rl_enable_meta_key (); + + if (rl_startup_hook) + (*rl_startup_hook) (); + + if (_rl_internal_startup_hook) + (*_rl_internal_startup_hook) (); + + rl_deactivate_mark (); + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + rl_vi_insertion_mode (1, 'i'); /* don't want to reset last */ + else +#endif /* VI_MODE */ + if (_rl_show_mode_in_prompt) + _rl_reset_prompt (); + + /* If we're not echoing, we still want to at least print a prompt, because + rl_redisplay will not do it for us. If the calling application has a + custom redisplay function, though, let that function handle it. */ + if (_rl_echoing_p == 0 && rl_redisplay_function == rl_redisplay) + { + if (rl_prompt && rl_already_prompted == 0) + { + nprompt = _rl_strip_prompt (rl_prompt); + fprintf (_rl_out_stream, "%s", nprompt); + fflush (_rl_out_stream); + xfree (nprompt); + } + } + else + { + if (rl_prompt && rl_already_prompted) + rl_on_new_line_with_prompt (); + else + rl_on_new_line (); + (*rl_redisplay_function) (); + } + + if (rl_pre_input_hook) + (*rl_pre_input_hook) (); + + RL_CHECK_SIGNALS (); +} + +STATIC_CALLBACK char * +readline_internal_teardown (int eof) +{ + char *temp; + HIST_ENTRY *entry; + + RL_CHECK_SIGNALS (); + + /* Restore the original of this history line, iff the line that we + are editing was originally in the history, AND the line has changed. */ + entry = current_history (); + + if (entry && rl_undo_list) + { + temp = savestring (the_line); + rl_revert_line (1, 0); + entry = replace_history_entry (where_history (), the_line, (histdata_t)NULL); + _rl_free_history_entry (entry); + + strcpy (the_line, temp); + xfree (temp); + } + + if (_rl_revert_all_at_newline) + _rl_revert_all_lines (); + + /* At any rate, it is highly likely that this line has an undo list. Get + rid of it now. */ + if (rl_undo_list) + rl_free_undo_list (); + + /* Disable the meta key, if this terminal has one and we were told to use it. + The check whether or not we sent the enable string is in + _rl_disable_meta_key(); the flag is set in _rl_enable_meta_key */ + _rl_disable_meta_key (); + + /* Restore normal cursor, if available. */ + _rl_set_insert_mode (RL_IM_INSERT, 0); + + return (eof ? (char *)NULL : savestring (the_line)); +} + +void +_rl_internal_char_cleanup (void) +{ +#if defined (VI_MODE) + /* In vi mode, when you exit insert mode, the cursor moves back + over the previous character. We explicitly check for that here. */ + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap) + rl_vi_check (); +#endif /* VI_MODE */ + + if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read) + { + (*rl_redisplay_function) (); + _rl_want_redisplay = 0; + rl_newline (1, '\n'); + } + + if (rl_done == 0) + { + (*rl_redisplay_function) (); + _rl_want_redisplay = 0; + } + + /* If the application writer has told us to erase the entire line if + the only character typed was something bound to rl_newline, do so. */ + if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline && + rl_point == 0 && rl_end == 0) + _rl_erase_entire_line (); +} + +STATIC_CALLBACK int +#if defined (READLINE_CALLBACKS) +readline_internal_char (void) +#else +readline_internal_charloop (void) +#endif +{ + static int lastc, eof_found; + int c, code, lk, r; + + lastc = EOF; + +#if !defined (READLINE_CALLBACKS) + eof_found = 0; + while (rl_done == 0) + { +#endif + lk = _rl_last_command_was_kill; + +#if defined (HAVE_POSIX_SIGSETJMP) + code = sigsetjmp (_rl_top_level, 0); +#else + code = setjmp (_rl_top_level); +#endif + + if (code) + { + (*rl_redisplay_function) (); + _rl_want_redisplay = 0; + /* If we get here, we're not being called from something dispatched + from _rl_callback_read_char(), which sets up its own value of + _rl_top_level (saving and restoring the old, of course), so + we can just return here. */ + if (RL_ISSTATE (RL_STATE_CALLBACK)) + return (0); + } + + if (rl_pending_input == 0) + { + /* Then initialize the argument and number of keys read. */ + _rl_reset_argument (); + rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; + } + + RL_SETSTATE(RL_STATE_READCMD); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_READCMD); + + /* look at input.c:rl_getc() for the circumstances under which this will + be returned; punt immediately on read error without converting it to + a newline; assume that rl_read_key has already called the signal + handler. */ + if (c == READERR) + { +#if defined (READLINE_CALLBACKS) + RL_SETSTATE(RL_STATE_DONE); + return (rl_done = 1); +#else + eof_found = 1; + break; +#endif + } + + /* EOF typed to a non-blank line is ^D the first time, EOF the second + time in a row. This won't return any partial line read from the tty. + If we want to change this, to force any existing line to be returned + when read(2) reads EOF, for example, this is the place to change. */ + if (c == EOF && rl_end) + { + if (RL_SIG_RECEIVED ()) + { + RL_CHECK_SIGNALS (); + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); /* XXX */ + } + + /* XXX - reading two consecutive EOFs returns EOF */ + if (RL_ISSTATE (RL_STATE_TERMPREPPED)) + { + if (lastc == _rl_eof_char || lastc == EOF) + rl_end = 0; + else + c = _rl_eof_char; + } + else + c = NEWLINE; + } + + /* The character _rl_eof_char typed to blank line, and not as the + previous character is interpreted as EOF. This doesn't work when + READLINE_CALLBACKS is defined, so hitting a series of ^Ds will + erase all the chars on the line and then return EOF. */ + if (((c == _rl_eof_char && lastc != c) || c == EOF) && rl_end == 0) + { +#if defined (READLINE_CALLBACKS) + RL_SETSTATE(RL_STATE_DONE); + return (rl_done = 1); +#else + eof_found = 1; + break; +#endif + } + + lastc = c; + r = _rl_dispatch ((unsigned char)c, _rl_keymap); + RL_CHECK_SIGNALS (); + + if (_rl_command_to_execute) + { + (*rl_redisplay_function) (); + + rl_executing_keymap = _rl_command_to_execute->map; + rl_executing_key = _rl_command_to_execute->key; + + rl_dispatching = 1; + RL_SETSTATE(RL_STATE_DISPATCHING); + r = (*(_rl_command_to_execute->func)) (_rl_command_to_execute->count, _rl_command_to_execute->key); + _rl_command_to_execute = 0; + RL_UNSETSTATE(RL_STATE_DISPATCHING); + rl_dispatching = 0; + + RL_CHECK_SIGNALS (); + } + + /* If there was no change in _rl_last_command_was_kill, then no kill + has taken place. Note that if input is pending we are reading + a prefix command, so nothing has changed yet. */ + if (rl_pending_input == 0 && lk == _rl_last_command_was_kill) + _rl_last_command_was_kill = 0; + + if (_rl_keep_mark_active) + _rl_keep_mark_active = 0; + else if (rl_mark_active_p ()) + rl_deactivate_mark (); + + _rl_internal_char_cleanup (); + +#if defined (READLINE_CALLBACKS) + return 0; +#else + } + + return (eof_found); +#endif +} + +#if defined (READLINE_CALLBACKS) +static int +readline_internal_charloop (void) +{ + int eof = 1; + + while (rl_done == 0) + eof = readline_internal_char (); + return (eof); +} +#endif /* READLINE_CALLBACKS */ + +/* Read a line of input from the global rl_instream, doing output on + the global rl_outstream. + If rl_prompt is non-null, then that is our prompt. */ +static char * +readline_internal (void) +{ + readline_internal_setup (); + _rl_eof_found = readline_internal_charloop (); + return (readline_internal_teardown (_rl_eof_found)); +} + +void +_rl_init_line_state (void) +{ + rl_point = rl_end = rl_mark = 0; + the_line = rl_line_buffer; + the_line[0] = 0; +} + +void +_rl_set_the_line (void) +{ + the_line = rl_line_buffer; +} + +#if defined (READLINE_CALLBACKS) +_rl_keyseq_cxt * +_rl_keyseq_cxt_alloc (void) +{ + _rl_keyseq_cxt *cxt; + + cxt = (_rl_keyseq_cxt *)xmalloc (sizeof (_rl_keyseq_cxt)); + + cxt->flags = cxt->subseq_arg = cxt->subseq_retval = 0; + + cxt->okey = 0; + cxt->ocxt = _rl_kscxt; + cxt->childval = 42; /* sentinel value */ + + return cxt; +} + +void +_rl_keyseq_cxt_dispose (_rl_keyseq_cxt *cxt) +{ + xfree (cxt); +} + +void +_rl_keyseq_chain_dispose (void) +{ + _rl_keyseq_cxt *cxt; + + while (_rl_kscxt) + { + cxt = _rl_kscxt; + _rl_kscxt = _rl_kscxt->ocxt; + _rl_keyseq_cxt_dispose (cxt); + } +} +#endif + +static int +_rl_subseq_getchar (int key) +{ + int k; + + if (key == ESC) + RL_SETSTATE(RL_STATE_METANEXT); + RL_SETSTATE(RL_STATE_MOREINPUT); + k = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + if (key == ESC) + RL_UNSETSTATE(RL_STATE_METANEXT); + + return k; +} + +#if defined (READLINE_CALLBACKS) +int +_rl_dispatch_callback (_rl_keyseq_cxt *cxt) +{ + int nkey, r; + + /* For now */ + /* The first time this context is used, we want to read input and dispatch + on it. When traversing the chain of contexts back `up', we want to use + the value from the next context down. We're simulating recursion using + a chain of contexts. */ + if ((cxt->flags & KSEQ_DISPATCHED) == 0) + { + nkey = _rl_subseq_getchar (cxt->okey); + if (nkey < 0) + { + _rl_abort_internal (); + return -1; + } + r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg); + cxt->flags |= KSEQ_DISPATCHED; + } + else + r = cxt->childval; + + /* For now */ + if (r != -3) /* don't do this if we indicate there will be other matches */ + r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ)); + + RL_CHECK_SIGNALS (); + /* We only treat values < 0 specially to simulate recursion. */ + if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */ + { + _rl_keyseq_chain_dispose (); + RL_UNSETSTATE (RL_STATE_MULTIKEY); + return r; + } + + if (r != -3) /* magic value that says we added to the chain */ + _rl_kscxt = cxt->ocxt; + if (_rl_kscxt) + _rl_kscxt->childval = r; + if (r != -3) + _rl_keyseq_cxt_dispose (cxt); + + return r; +} +#endif /* READLINE_CALLBACKS */ + +/* Do the command associated with KEY in MAP. + If the associated command is really a keymap, then read + another key, and dispatch into that map. */ +int +_rl_dispatch (register int key, Keymap map) +{ + _rl_dispatching_keymap = map; + return _rl_dispatch_subseq (key, map, 0); +} + +int +_rl_dispatch_subseq (register int key, Keymap map, int got_subseq) +{ + int r, newkey; + char *macro; + rl_command_func_t *func; +#if defined (READLINE_CALLBACKS) + _rl_keyseq_cxt *cxt; +#endif + + if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii) + { + if (map[ESC].type == ISKMAP) + { + if (RL_ISSTATE (RL_STATE_MACRODEF)) + _rl_add_macro_char (ESC); + RESIZE_KEYSEQ_BUFFER (); + rl_executing_keyseq[rl_key_sequence_length++] = ESC; + map = FUNCTION_TO_KEYMAP (map, ESC); + key = UNMETA (key); + return (_rl_dispatch (key, map)); + } + else + rl_ding (); + return 0; + } + + if (RL_ISSTATE (RL_STATE_MACRODEF)) + _rl_add_macro_char (key); + + r = 0; + switch (map[key].type) + { + case ISFUNC: + func = map[key].function; + if (func) + { + /* Special case rl_do_lowercase_version (). */ + if (func == rl_do_lowercase_version) + /* Should we do anything special if key == ANYOTHERKEY? */ + return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map)); + + rl_executing_keymap = map; + rl_executing_key = key; + + RESIZE_KEYSEQ_BUFFER(); + rl_executing_keyseq[rl_key_sequence_length++] = key; + rl_executing_keyseq[rl_key_sequence_length] = '\0'; + + rl_dispatching = 1; + RL_SETSTATE(RL_STATE_DISPATCHING); + r = (*func) (rl_numeric_arg * rl_arg_sign, key); + RL_UNSETSTATE(RL_STATE_DISPATCHING); + rl_dispatching = 0; + + /* If we have input pending, then the last command was a prefix + command. Don't change the state of rl_last_func. Otherwise, + remember the last command executed in this variable. */ +#if defined (VI_MODE) + if (rl_pending_input == 0 && map[key].function != rl_digit_argument && map[key].function != rl_vi_arg_digit) +#else + if (rl_pending_input == 0 && map[key].function != rl_digit_argument) +#endif + rl_last_func = map[key].function; + + RL_CHECK_SIGNALS (); + } + else if (map[ANYOTHERKEY].function) + { + /* OK, there's no function bound in this map, but there is a + shadow function that was overridden when the current keymap + was created. Return -2 to note that. */ + if (RL_ISSTATE (RL_STATE_MACROINPUT)) + _rl_prev_macro_key (); + else + _rl_unget_char (key); + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; + return -2; + } + else if (got_subseq) + { + /* Return -1 to note that we're in a subsequence, but we don't + have a matching key, nor was one overridden. This means + we need to back up the recursion chain and find the last + subsequence that is bound to a function. */ + if (RL_ISSTATE (RL_STATE_MACROINPUT)) + _rl_prev_macro_key (); + else + _rl_unget_char (key); + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; + return -1; + } + else + { +#if defined (READLINE_CALLBACKS) + RL_UNSETSTATE (RL_STATE_MULTIKEY); + _rl_keyseq_chain_dispose (); +#endif + _rl_abort_internal (); + return -1; + } + break; + + case ISKMAP: + if (map[key].function != 0) + { +#if defined (VI_MODE) + /* The only way this test will be true is if a subsequence has been + bound starting with ESC, generally the arrow keys. What we do is + check whether there's input in the queue, which there generally + will be if an arrow key has been pressed, and, if there's not, + just dispatch to (what we assume is) rl_vi_movement_mode right + away. This is essentially an input test with a zero timeout (by + default) or a timeout determined by the value of `keyseq-timeout' */ + /* _rl_keyseq_timeout specified in milliseconds; _rl_input_queued + takes microseconds, so multiply by 1000 */ + if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0) + return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key))); + /* This is a very specific test. It can possibly be generalized in + the future, but for now it handles a specific case of ESC being + the last character in a keyboard macro. */ + if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap && + (RL_ISSTATE (RL_STATE_INPUTPENDING) == 0) && + (RL_ISSTATE (RL_STATE_MACROINPUT) && _rl_peek_macro_key () == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0) + return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key))); +#endif + + RESIZE_KEYSEQ_BUFFER (); + rl_executing_keyseq[rl_key_sequence_length++] = key; + _rl_dispatching_keymap = FUNCTION_TO_KEYMAP (map, key); + + /* Allocate new context here. Use linked contexts (linked through + cxt->ocxt) to simulate recursion */ +#if defined (READLINE_CALLBACKS) +# if defined (VI_MODE) + /* If we're redoing a vi mode command and we know there is a shadowed + function corresponding to this key, just call it -- all the redoable + vi mode commands already have all the input they need, and rl_vi_redo + assumes that one call to rl_dispatch is sufficient to complete the + command. */ + if (_rl_vi_redoing && RL_ISSTATE (RL_STATE_CALLBACK) && + map[ANYOTHERKEY].function != 0) + return (_rl_subseq_result (-2, map, key, got_subseq)); +# endif + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + /* Return 0 only the first time, to indicate success to + _rl_callback_read_char. The rest of the time, we're called + from _rl_dispatch_callback, so we return -3 to indicate + special handling is necessary. */ + r = RL_ISSTATE (RL_STATE_MULTIKEY) ? -3 : 0; + cxt = _rl_keyseq_cxt_alloc (); + + if (got_subseq) + cxt->flags |= KSEQ_SUBSEQ; + cxt->okey = key; + cxt->oldmap = map; + cxt->dmap = _rl_dispatching_keymap; + cxt->subseq_arg = got_subseq || cxt->dmap[ANYOTHERKEY].function; + + RL_SETSTATE (RL_STATE_MULTIKEY); + _rl_kscxt = cxt; + + return r; /* don't indicate immediate success */ + } +#endif + + /* Tentative inter-character timeout for potential multi-key + sequences? If no input within timeout, abort sequence and + act as if we got non-matching input. */ + /* _rl_keyseq_timeout specified in milliseconds; _rl_input_queued + takes microseconds, so multiply by 1000 */ + if (_rl_keyseq_timeout > 0 && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_dispatching_keymap[ANYOTHERKEY].function && + _rl_input_queued (_rl_keyseq_timeout*1000) == 0) + { + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; + return (_rl_subseq_result (-2, map, key, got_subseq)); + } + + newkey = _rl_subseq_getchar (key); + if (newkey < 0) + { + _rl_abort_internal (); + return -1; + } + + r = _rl_dispatch_subseq (newkey, _rl_dispatching_keymap, got_subseq || map[ANYOTHERKEY].function); + return _rl_subseq_result (r, map, key, got_subseq); + } + else + { + _rl_abort_internal (); /* XXX */ + return -1; + } + break; + + case ISMACR: + if (map[key].function != 0) + { + rl_executing_keyseq[rl_key_sequence_length] = '\0'; + macro = savestring ((char *)map[key].function); + _rl_with_macro_input (macro); + return 0; + } + break; + } + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && + key != ANYOTHERKEY && + _rl_dispatching_keymap == vi_movement_keymap && + _rl_vi_textmod_command (key)) + _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); +#endif + + return (r); +} + +static int +_rl_subseq_result (int r, Keymap map, int key, int got_subseq) +{ + Keymap m; + int type, nt; + rl_command_func_t *func, *nf; + + if (r == -2) + /* We didn't match anything, and the keymap we're indexed into + shadowed a function previously bound to that prefix. Call + the function. The recursive call to _rl_dispatch_subseq has + already taken care of pushing any necessary input back onto + the input queue with _rl_unget_char. */ + { + m = _rl_dispatching_keymap; + type = m[ANYOTHERKEY].type; + func = m[ANYOTHERKEY].function; + if (type == ISFUNC && func == rl_do_lowercase_version) + r = _rl_dispatch (_rl_to_lower ((unsigned char)key), map); + else if (type == ISFUNC) + { + /* If we shadowed a function, whatever it is, we somehow need a + keymap with map[key].func == shadowed-function. + Let's use this one. Then we can dispatch using the original + key, since there are commands (e.g., in vi mode) for which it + matters. */ + nt = m[key].type; + nf = m[key].function; + + m[key].type = type; + m[key].function = func; + /* Don't change _rl_dispatching_keymap, set it here */ + _rl_dispatching_keymap = map; /* previous map */ + r = _rl_dispatch_subseq (key, m, 0); + m[key].type = nt; + m[key].function = nf; + } + else + /* We probably shadowed a keymap, so keep going. */ + r = _rl_dispatch (ANYOTHERKEY, m); + } + else if (r < 0 && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to + tell the caller that it should try ANYOTHERKEY for an + overridden function. */ + if (RL_ISSTATE (RL_STATE_MACROINPUT)) + _rl_prev_macro_key (); + else + _rl_unget_char (key); + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; + _rl_dispatching_keymap = map; + return -2; + } + else if (r < 0 && got_subseq) /* XXX */ + { + /* OK, back up the chain. */ + if (RL_ISSTATE (RL_STATE_MACROINPUT)) + _rl_prev_macro_key (); + else + _rl_unget_char (key); + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; + _rl_dispatching_keymap = map; + return -1; + } + + return r; +} + +/* **************************************************************** */ +/* */ +/* Initializations */ +/* */ +/* **************************************************************** */ + +/* Initialize readline (and terminal if not already). */ +int +rl_initialize (void) +{ + /* If we have never been called before, initialize the + terminal and data structures. */ + if (rl_initialized == 0) + { + RL_SETSTATE(RL_STATE_INITIALIZING); + readline_initialize_everything (); + RL_UNSETSTATE(RL_STATE_INITIALIZING); + rl_initialized++; + RL_SETSTATE(RL_STATE_INITIALIZED); + } + else + (void)_rl_init_locale (); /* check current locale */ + + /* Initialize the current line information. */ + _rl_init_line_state (); + + /* We aren't done yet. We haven't even gotten started yet! */ + rl_done = 0; + RL_UNSETSTATE(RL_STATE_DONE); + + /* Tell the history routines what is going on. */ + _rl_start_using_history (); + + /* Make the display buffer match the state of the line. */ + rl_reset_line_state (); + + /* No such function typed yet. */ + rl_last_func = (rl_command_func_t *)NULL; + + /* Parsing of key-bindings begins in an enabled state. */ + _rl_parsing_conditionalized_out = 0; + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + _rl_vi_initialize_line (); +#endif + + /* Each line starts in insert mode (the default). */ + _rl_set_insert_mode (RL_IM_DEFAULT, 1); + + return 0; +} + +#if 0 +#if defined (__EMX__) +static void +_emx_build_environ (void) +{ + TIB *tibp; + PIB *pibp; + char *t, **tp; + int c; + + DosGetInfoBlocks (&tibp, &pibp); + t = pibp->pib_pchenv; + for (c = 1; *t; c++) + t += strlen (t) + 1; + tp = environ = (char **)xmalloc ((c + 1) * sizeof (char *)); + t = pibp->pib_pchenv; + while (*t) + { + *tp++ = t; + t += strlen (t) + 1; + } + *tp = 0; +} +#endif /* __EMX__ */ +#endif + +/* Initialize the entire state of the world. */ +static void +readline_initialize_everything (void) +{ +#if 0 +#if defined (__EMX__) + if (environ == 0) + _emx_build_environ (); +#endif +#endif + +#if 0 + /* Find out if we are running in Emacs -- UNUSED. */ + running_in_emacs = sh_get_env_value ("EMACS") != (char *)0; +#endif + + /* Set up input and output if they are not already set up. */ + if (!rl_instream) + rl_instream = stdin; + + if (!rl_outstream) + rl_outstream = stdout; + + /* Bind _rl_in_stream and _rl_out_stream immediately. These values + may change, but they may also be used before readline_internal () + is called. */ + _rl_in_stream = rl_instream; + _rl_out_stream = rl_outstream; + + /* Allocate data structures. */ + if (rl_line_buffer == 0) + rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = DEFAULT_BUFFER_SIZE); + + /* Initialize the terminal interface. */ + if (rl_terminal_name == 0) + rl_terminal_name = sh_get_env_value ("TERM"); + _rl_init_terminal_io (rl_terminal_name); + + /* Bind tty characters to readline functions. */ + readline_default_bindings (); + + /* Initialize the function names. */ + rl_initialize_funmap (); + + /* Decide whether we should automatically go into eight-bit mode. */ + _rl_init_eightbit (); + + /* Read in the init file. */ + rl_read_init_file ((char *)NULL); + + /* XXX */ + if (_rl_horizontal_scroll_mode && _rl_term_autowrap) + { + _rl_screenwidth--; + _rl_screenchars -= _rl_screenheight; + } + + /* Override the effect of any `set keymap' assignments in the + inputrc file. */ + rl_set_keymap_from_edit_mode (); + + /* Try to bind a common arrow key prefix, if not already bound. */ + bind_arrow_keys (); + + /* Bind the bracketed paste prefix assuming that the user will enable + it on terminals that support it. */ + bind_bracketed_paste_prefix (); + + /* If the completion parser's default word break characters haven't + been set yet, then do so now. */ + if (rl_completer_word_break_characters == (char *)NULL) + rl_completer_word_break_characters = (char *)rl_basic_word_break_characters; + +#if defined (COLOR_SUPPORT) + if (_rl_colored_stats || _rl_colored_completion_prefix) + _rl_parse_colors (); +#endif + + rl_executing_keyseq = malloc (_rl_executing_keyseq_size = 16); + if (rl_executing_keyseq) + rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; +} + +/* If this system allows us to look at the values of the regular + input editing characters, then bind them to their readline + equivalents, iff the characters are not bound to keymaps. */ +static void +readline_default_bindings (void) +{ + if (_rl_bind_stty_chars) + rl_tty_set_default_bindings (_rl_keymap); +} + +/* Reset the default bindings for the terminal special characters we're + interested in back to rl_insert and read the new ones. */ +static void +reset_default_bindings (void) +{ + if (_rl_bind_stty_chars) + { + rl_tty_unset_default_bindings (_rl_keymap); + rl_tty_set_default_bindings (_rl_keymap); + } +} + +/* Bind some common arrow key sequences in MAP. */ +static void +bind_arrow_keys_internal (Keymap map) +{ + Keymap xkeymap; + + xkeymap = _rl_keymap; + _rl_keymap = map; + +#if defined (__MSDOS__) + rl_bind_keyseq_if_unbound ("\033[0A", rl_get_previous_history); + rl_bind_keyseq_if_unbound ("\033[0B", rl_backward_char); + rl_bind_keyseq_if_unbound ("\033[0C", rl_forward_char); + rl_bind_keyseq_if_unbound ("\033[0D", rl_get_next_history); +#endif + + rl_bind_keyseq_if_unbound ("\033[A", rl_get_previous_history); + rl_bind_keyseq_if_unbound ("\033[B", rl_get_next_history); + rl_bind_keyseq_if_unbound ("\033[C", rl_forward_char); + rl_bind_keyseq_if_unbound ("\033[D", rl_backward_char); + rl_bind_keyseq_if_unbound ("\033[H", rl_beg_of_line); + rl_bind_keyseq_if_unbound ("\033[F", rl_end_of_line); + + rl_bind_keyseq_if_unbound ("\033OA", rl_get_previous_history); + rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history); + rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char); + rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char); + rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line); + rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line); + + /* Key bindings for control-arrow keys */ + rl_bind_keyseq_if_unbound ("\033[1;5C", rl_forward_word); + rl_bind_keyseq_if_unbound ("\033[1;5D", rl_backward_word); + rl_bind_keyseq_if_unbound ("\033[3;5~", rl_kill_word); + + /* Key bindings for alt-arrow keys */ + rl_bind_keyseq_if_unbound ("\033[1;3C", rl_forward_word); + rl_bind_keyseq_if_unbound ("\033[1;3D", rl_backward_word); + +#if defined (__MINGW32__) + rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history); + rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history); + rl_bind_keyseq_if_unbound ("\340M", rl_forward_char); + rl_bind_keyseq_if_unbound ("\340K", rl_backward_char); + rl_bind_keyseq_if_unbound ("\340G", rl_beg_of_line); + rl_bind_keyseq_if_unbound ("\340O", rl_end_of_line); + rl_bind_keyseq_if_unbound ("\340S", rl_delete); + rl_bind_keyseq_if_unbound ("\340R", rl_overwrite_mode); + + /* These may or may not work because of the embedded NUL. */ + rl_bind_keyseq_if_unbound ("\\000H", rl_get_previous_history); + rl_bind_keyseq_if_unbound ("\\000P", rl_get_next_history); + rl_bind_keyseq_if_unbound ("\\000M", rl_forward_char); + rl_bind_keyseq_if_unbound ("\\000K", rl_backward_char); + rl_bind_keyseq_if_unbound ("\\000G", rl_beg_of_line); + rl_bind_keyseq_if_unbound ("\\000O", rl_end_of_line); + rl_bind_keyseq_if_unbound ("\\000S", rl_delete); + rl_bind_keyseq_if_unbound ("\\000R", rl_overwrite_mode); +#endif + + _rl_keymap = xkeymap; +} + +/* Try and bind the common arrow key prefixes after giving termcap and + the inputrc file a chance to bind them and create `real' keymaps + for the arrow key prefix. */ +static void +bind_arrow_keys (void) +{ + bind_arrow_keys_internal (emacs_standard_keymap); + +#if defined (VI_MODE) + bind_arrow_keys_internal (vi_movement_keymap); + /* Unbind vi_movement_keymap[ESC] to allow users to repeatedly hit ESC + in vi command mode while still allowing the arrow keys to work. */ + if (vi_movement_keymap[ESC].type == ISKMAP) + rl_bind_keyseq_in_map ("\033", (rl_command_func_t *)NULL, vi_movement_keymap); + bind_arrow_keys_internal (vi_insertion_keymap); +#endif +} + +static void +bind_bracketed_paste_prefix (void) +{ + Keymap xkeymap; + + xkeymap = _rl_keymap; + + _rl_keymap = emacs_standard_keymap; + rl_bind_keyseq_if_unbound (BRACK_PASTE_PREF, rl_bracketed_paste_begin); + +#if defined (VI_MODE) + _rl_keymap = vi_insertion_keymap; + rl_bind_keyseq_if_unbound (BRACK_PASTE_PREF, rl_bracketed_paste_begin); + /* XXX - is there a reason to do this in the vi command keymap? */ +#endif + + _rl_keymap = xkeymap; +} + +/* **************************************************************** */ +/* */ +/* Saving and Restoring Readline's state */ +/* */ +/* **************************************************************** */ + +int +rl_save_state (struct readline_state *sp) +{ + if (sp == 0) + return -1; + + sp->point = rl_point; + sp->end = rl_end; + sp->mark = rl_mark; + sp->buffer = rl_line_buffer; + sp->buflen = rl_line_buffer_len; + sp->ul = rl_undo_list; + sp->prompt = rl_prompt; + + sp->rlstate = rl_readline_state; + sp->done = rl_done; + sp->kmap = _rl_keymap; + + sp->lastfunc = rl_last_func; + sp->insmode = rl_insert_mode; + sp->edmode = rl_editing_mode; + sp->kseq = rl_executing_keyseq; + sp->kseqlen = rl_key_sequence_length; + sp->inf = rl_instream; + sp->outf = rl_outstream; + sp->pendingin = rl_pending_input; + sp->macro = rl_executing_macro; + + sp->catchsigs = rl_catch_signals; + sp->catchsigwinch = rl_catch_sigwinch; + + sp->entryfunc = rl_completion_entry_function; + sp->menuentryfunc = rl_menu_completion_entry_function; + sp->ignorefunc = rl_ignore_some_completions_function; + sp->attemptfunc = rl_attempted_completion_function; + sp->wordbreakchars = rl_completer_word_break_characters; + + return (0); +} + +int +rl_restore_state (struct readline_state *sp) +{ + if (sp == 0) + return -1; + + rl_point = sp->point; + rl_end = sp->end; + rl_mark = sp->mark; + the_line = rl_line_buffer = sp->buffer; + rl_line_buffer_len = sp->buflen; + rl_undo_list = sp->ul; + rl_prompt = sp->prompt; + + rl_readline_state = sp->rlstate; + rl_done = sp->done; + _rl_keymap = sp->kmap; + + rl_last_func = sp->lastfunc; + rl_insert_mode = sp->insmode; + rl_editing_mode = sp->edmode; + rl_executing_keyseq = sp->kseq; + rl_key_sequence_length = sp->kseqlen; + rl_instream = sp->inf; + rl_outstream = sp->outf; + rl_pending_input = sp->pendingin; + rl_executing_macro = sp->macro; + + rl_catch_signals = sp->catchsigs; + rl_catch_sigwinch = sp->catchsigwinch; + + rl_completion_entry_function = sp->entryfunc; + rl_menu_completion_entry_function = sp->menuentryfunc; + rl_ignore_some_completions_function = sp->ignorefunc; + rl_attempted_completion_function = sp->attemptfunc; + rl_completer_word_break_characters = sp->wordbreakchars; + + rl_deactivate_mark (); + + return (0); +} + +/* Functions to manage the string that is the current key sequence. */ + +void +_rl_init_executing_keyseq (void) +{ + rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; +} + +void +_rl_term_executing_keyseq (void) +{ + rl_executing_keyseq[rl_key_sequence_length] = '\0'; +} + +void +_rl_end_executing_keyseq (void) +{ + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; +} + +void +_rl_add_executing_keyseq (int key) +{ + RESIZE_KEYSEQ_BUFFER (); + rl_executing_keyseq[rl_key_sequence_length++] = key; +} diff --git a/bash-5.1/lib/readline/readline.h b/bash-5.1/lib/readline/readline.h new file mode 100644 index 0000000000000000000000000000000000000000..78fa39d02a1d59c0d17bbcca01944b488f0d8a86 --- /dev/null +++ b/bash-5.1/lib/readline/readline.h @@ -0,0 +1,969 @@ +/* Readline.h -- the names of functions callable from within readline. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_READLINE_H_) +#define _READLINE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined (READLINE_LIBRARY) +# include "rlstdc.h" +# include "rltypedefs.h" +# include "keymaps.h" +# include "tilde.h" +#else +# include +# include +# include +# include +#endif + +/* Hex-encoded Readline version number. */ +#define RL_READLINE_VERSION 0x0801 /* Readline 8.0 */ +#define RL_VERSION_MAJOR 8 +#define RL_VERSION_MINOR 1 + +/* Readline data structures. */ + +/* Maintaining the state of undo. We remember individual deletes and inserts + on a chain of things to do. */ + +/* The actions that undo knows how to undo. Notice that UNDO_DELETE means + to insert some text, and UNDO_INSERT means to delete some text. I.e., + the code tells undo what to undo, not how to undo it. */ +enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; + +/* What an element of THE_UNDO_LIST looks like. */ +typedef struct undo_list { + struct undo_list *next; + int start, end; /* Where the change took place. */ + char *text; /* The text to insert, if undoing a delete. */ + enum undo_code what; /* Delete, Insert, Begin, End. */ +} UNDO_LIST; + +/* The current undo list for RL_LINE_BUFFER. */ +extern UNDO_LIST *rl_undo_list; + +/* The data structure for mapping textual names to code addresses. */ +typedef struct _funmap { + const char *name; + rl_command_func_t *function; +} FUNMAP; + +extern FUNMAP **funmap; + +/* **************************************************************** */ +/* */ +/* Functions available to bind to key sequences */ +/* */ +/* **************************************************************** */ + +/* Bindable commands for numeric arguments. */ +extern int rl_digit_argument PARAMS((int, int)); +extern int rl_universal_argument PARAMS((int, int)); + +/* Bindable commands for moving the cursor. */ +extern int rl_forward_byte PARAMS((int, int)); +extern int rl_forward_char PARAMS((int, int)); +extern int rl_forward PARAMS((int, int)); +extern int rl_backward_byte PARAMS((int, int)); +extern int rl_backward_char PARAMS((int, int)); +extern int rl_backward PARAMS((int, int)); +extern int rl_beg_of_line PARAMS((int, int)); +extern int rl_end_of_line PARAMS((int, int)); +extern int rl_forward_word PARAMS((int, int)); +extern int rl_backward_word PARAMS((int, int)); +extern int rl_refresh_line PARAMS((int, int)); +extern int rl_clear_screen PARAMS((int, int)); +extern int rl_clear_display PARAMS((int, int)); +extern int rl_skip_csi_sequence PARAMS((int, int)); +extern int rl_arrow_keys PARAMS((int, int)); + +extern int rl_previous_screen_line PARAMS((int, int)); +extern int rl_next_screen_line PARAMS((int, int)); + +/* Bindable commands for inserting and deleting text. */ +extern int rl_insert PARAMS((int, int)); +extern int rl_quoted_insert PARAMS((int, int)); +extern int rl_tab_insert PARAMS((int, int)); +extern int rl_newline PARAMS((int, int)); +extern int rl_do_lowercase_version PARAMS((int, int)); +extern int rl_rubout PARAMS((int, int)); +extern int rl_delete PARAMS((int, int)); +extern int rl_rubout_or_delete PARAMS((int, int)); +extern int rl_delete_horizontal_space PARAMS((int, int)); +extern int rl_delete_or_show_completions PARAMS((int, int)); +extern int rl_insert_comment PARAMS((int, int)); + +/* Bindable commands for changing case. */ +extern int rl_upcase_word PARAMS((int, int)); +extern int rl_downcase_word PARAMS((int, int)); +extern int rl_capitalize_word PARAMS((int, int)); + +/* Bindable commands for transposing characters and words. */ +extern int rl_transpose_words PARAMS((int, int)); +extern int rl_transpose_chars PARAMS((int, int)); + +/* Bindable commands for searching within a line. */ +extern int rl_char_search PARAMS((int, int)); +extern int rl_backward_char_search PARAMS((int, int)); + +/* Bindable commands for readline's interface to the command history. */ +extern int rl_beginning_of_history PARAMS((int, int)); +extern int rl_end_of_history PARAMS((int, int)); +extern int rl_get_next_history PARAMS((int, int)); +extern int rl_get_previous_history PARAMS((int, int)); +extern int rl_operate_and_get_next PARAMS((int, int)); + +/* Bindable commands for managing the mark and region. */ +extern int rl_set_mark PARAMS((int, int)); +extern int rl_exchange_point_and_mark PARAMS((int, int)); + +/* Bindable commands to set the editing mode (emacs or vi). */ +extern int rl_vi_editing_mode PARAMS((int, int)); +extern int rl_emacs_editing_mode PARAMS((int, int)); + +/* Bindable commands to change the insert mode (insert or overwrite) */ +extern int rl_overwrite_mode PARAMS((int, int)); + +/* Bindable commands for managing key bindings. */ +extern int rl_re_read_init_file PARAMS((int, int)); +extern int rl_dump_functions PARAMS((int, int)); +extern int rl_dump_macros PARAMS((int, int)); +extern int rl_dump_variables PARAMS((int, int)); + +/* Bindable commands for word completion. */ +extern int rl_complete PARAMS((int, int)); +extern int rl_possible_completions PARAMS((int, int)); +extern int rl_insert_completions PARAMS((int, int)); +extern int rl_old_menu_complete PARAMS((int, int)); +extern int rl_menu_complete PARAMS((int, int)); +extern int rl_backward_menu_complete PARAMS((int, int)); + +/* Bindable commands for killing and yanking text, and managing the kill ring. */ +extern int rl_kill_word PARAMS((int, int)); +extern int rl_backward_kill_word PARAMS((int, int)); +extern int rl_kill_line PARAMS((int, int)); +extern int rl_backward_kill_line PARAMS((int, int)); +extern int rl_kill_full_line PARAMS((int, int)); +extern int rl_unix_word_rubout PARAMS((int, int)); +extern int rl_unix_filename_rubout PARAMS((int, int)); +extern int rl_unix_line_discard PARAMS((int, int)); +extern int rl_copy_region_to_kill PARAMS((int, int)); +extern int rl_kill_region PARAMS((int, int)); +extern int rl_copy_forward_word PARAMS((int, int)); +extern int rl_copy_backward_word PARAMS((int, int)); +extern int rl_yank PARAMS((int, int)); +extern int rl_yank_pop PARAMS((int, int)); +extern int rl_yank_nth_arg PARAMS((int, int)); +extern int rl_yank_last_arg PARAMS((int, int)); +extern int rl_bracketed_paste_begin PARAMS((int, int)); +/* Not available unless _WIN32 is defined. */ +#if defined (_WIN32) +extern int rl_paste_from_clipboard PARAMS((int, int)); +#endif + +/* Bindable commands for incremental searching. */ +extern int rl_reverse_search_history PARAMS((int, int)); +extern int rl_forward_search_history PARAMS((int, int)); + +/* Bindable keyboard macro commands. */ +extern int rl_start_kbd_macro PARAMS((int, int)); +extern int rl_end_kbd_macro PARAMS((int, int)); +extern int rl_call_last_kbd_macro PARAMS((int, int)); +extern int rl_print_last_kbd_macro PARAMS((int, int)); + +/* Bindable undo commands. */ +extern int rl_revert_line PARAMS((int, int)); +extern int rl_undo_command PARAMS((int, int)); + +/* Bindable tilde expansion commands. */ +extern int rl_tilde_expand PARAMS((int, int)); + +/* Bindable terminal control commands. */ +extern int rl_restart_output PARAMS((int, int)); +extern int rl_stop_output PARAMS((int, int)); + +/* Miscellaneous bindable commands. */ +extern int rl_abort PARAMS((int, int)); +extern int rl_tty_status PARAMS((int, int)); + +/* Bindable commands for incremental and non-incremental history searching. */ +extern int rl_history_search_forward PARAMS((int, int)); +extern int rl_history_search_backward PARAMS((int, int)); +extern int rl_history_substr_search_forward PARAMS((int, int)); +extern int rl_history_substr_search_backward PARAMS((int, int)); +extern int rl_noninc_forward_search PARAMS((int, int)); +extern int rl_noninc_reverse_search PARAMS((int, int)); +extern int rl_noninc_forward_search_again PARAMS((int, int)); +extern int rl_noninc_reverse_search_again PARAMS((int, int)); + +/* Bindable command used when inserting a matching close character. */ +extern int rl_insert_close PARAMS((int, int)); + +/* Not available unless READLINE_CALLBACKS is defined. */ +extern void rl_callback_handler_install PARAMS((const char *, rl_vcpfunc_t *)); +extern void rl_callback_read_char PARAMS((void)); +extern void rl_callback_handler_remove PARAMS((void)); +extern void rl_callback_sigcleanup PARAMS((void)); + +/* Things for vi mode. Not available unless readline is compiled -DVI_MODE. */ +/* VI-mode bindable commands. */ +extern int rl_vi_redo PARAMS((int, int)); +extern int rl_vi_undo PARAMS((int, int)); +extern int rl_vi_yank_arg PARAMS((int, int)); +extern int rl_vi_fetch_history PARAMS((int, int)); +extern int rl_vi_search_again PARAMS((int, int)); +extern int rl_vi_search PARAMS((int, int)); +extern int rl_vi_complete PARAMS((int, int)); +extern int rl_vi_tilde_expand PARAMS((int, int)); +extern int rl_vi_prev_word PARAMS((int, int)); +extern int rl_vi_next_word PARAMS((int, int)); +extern int rl_vi_end_word PARAMS((int, int)); +extern int rl_vi_insert_beg PARAMS((int, int)); +extern int rl_vi_append_mode PARAMS((int, int)); +extern int rl_vi_append_eol PARAMS((int, int)); +extern int rl_vi_eof_maybe PARAMS((int, int)); +extern int rl_vi_insertion_mode PARAMS((int, int)); +extern int rl_vi_insert_mode PARAMS((int, int)); +extern int rl_vi_movement_mode PARAMS((int, int)); +extern int rl_vi_arg_digit PARAMS((int, int)); +extern int rl_vi_change_case PARAMS((int, int)); +extern int rl_vi_put PARAMS((int, int)); +extern int rl_vi_column PARAMS((int, int)); +extern int rl_vi_delete_to PARAMS((int, int)); +extern int rl_vi_change_to PARAMS((int, int)); +extern int rl_vi_yank_to PARAMS((int, int)); +extern int rl_vi_yank_pop PARAMS((int, int)); +extern int rl_vi_rubout PARAMS((int, int)); +extern int rl_vi_delete PARAMS((int, int)); +extern int rl_vi_back_to_indent PARAMS((int, int)); +extern int rl_vi_unix_word_rubout PARAMS((int, int)); +extern int rl_vi_first_print PARAMS((int, int)); +extern int rl_vi_char_search PARAMS((int, int)); +extern int rl_vi_match PARAMS((int, int)); +extern int rl_vi_change_char PARAMS((int, int)); +extern int rl_vi_subst PARAMS((int, int)); +extern int rl_vi_overstrike PARAMS((int, int)); +extern int rl_vi_overstrike_delete PARAMS((int, int)); +extern int rl_vi_replace PARAMS((int, int)); +extern int rl_vi_set_mark PARAMS((int, int)); +extern int rl_vi_goto_mark PARAMS((int, int)); + +/* VI-mode utility functions. */ +extern int rl_vi_check PARAMS((void)); +extern int rl_vi_domove PARAMS((int, int *)); +extern int rl_vi_bracktype PARAMS((int)); + +extern void rl_vi_start_inserting PARAMS((int, int, int)); + +/* VI-mode pseudo-bindable commands, used as utility functions. */ +extern int rl_vi_fWord PARAMS((int, int)); +extern int rl_vi_bWord PARAMS((int, int)); +extern int rl_vi_eWord PARAMS((int, int)); +extern int rl_vi_fword PARAMS((int, int)); +extern int rl_vi_bword PARAMS((int, int)); +extern int rl_vi_eword PARAMS((int, int)); + +/* **************************************************************** */ +/* */ +/* Well Published Functions */ +/* */ +/* **************************************************************** */ + +/* Readline functions. */ +/* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. */ +extern char *readline PARAMS((const char *)); + +extern int rl_set_prompt PARAMS((const char *)); +extern int rl_expand_prompt PARAMS((char *)); + +extern int rl_initialize PARAMS((void)); + +/* Undocumented; unused by readline */ +extern int rl_discard_argument PARAMS((void)); + +/* Utility functions to bind keys to readline commands. */ +extern int rl_add_defun PARAMS((const char *, rl_command_func_t *, int)); +extern int rl_bind_key PARAMS((int, rl_command_func_t *)); +extern int rl_bind_key_in_map PARAMS((int, rl_command_func_t *, Keymap)); +extern int rl_unbind_key PARAMS((int)); +extern int rl_unbind_key_in_map PARAMS((int, Keymap)); +extern int rl_bind_key_if_unbound PARAMS((int, rl_command_func_t *)); +extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *, Keymap)); +extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap)); +extern int rl_unbind_command_in_map PARAMS((const char *, Keymap)); +extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *)); +extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *, Keymap)); +extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *)); +extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap)); +extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap)); + +extern char *rl_variable_value PARAMS((const char *)); +extern int rl_variable_bind PARAMS((const char *, const char *)); + +/* Backwards compatibility, use rl_bind_keyseq_in_map instead. */ +extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap)); + +/* Backwards compatibility, use rl_generic_bind instead. */ +extern int rl_macro_bind PARAMS((const char *, const char *, Keymap)); + +/* Undocumented in the texinfo manual; not really useful to programs. */ +extern int rl_translate_keyseq PARAMS((const char *, char *, int *)); +extern char *rl_untranslate_keyseq PARAMS((int)); + +extern rl_command_func_t *rl_named_function PARAMS((const char *)); +extern rl_command_func_t *rl_function_of_keyseq PARAMS((const char *, Keymap, int *)); +extern rl_command_func_t *rl_function_of_keyseq_len PARAMS((const char *, size_t, Keymap, int *)); + +extern void rl_list_funmap_names PARAMS((void)); +extern char **rl_invoking_keyseqs_in_map PARAMS((rl_command_func_t *, Keymap)); +extern char **rl_invoking_keyseqs PARAMS((rl_command_func_t *)); + +extern void rl_function_dumper PARAMS((int)); +extern void rl_macro_dumper PARAMS((int)); +extern void rl_variable_dumper PARAMS((int)); + +extern int rl_read_init_file PARAMS((const char *)); +extern int rl_parse_and_bind PARAMS((char *)); + +/* Functions for manipulating keymaps. */ +extern Keymap rl_make_bare_keymap PARAMS((void)); +extern int rl_empty_keymap PARAMS((Keymap)); +extern Keymap rl_copy_keymap PARAMS((Keymap)); +extern Keymap rl_make_keymap PARAMS((void)); +extern void rl_discard_keymap PARAMS((Keymap)); +extern void rl_free_keymap PARAMS((Keymap)); + +extern Keymap rl_get_keymap_by_name PARAMS((const char *)); +extern char *rl_get_keymap_name PARAMS((Keymap)); +extern void rl_set_keymap PARAMS((Keymap)); +extern Keymap rl_get_keymap PARAMS((void)); + +extern int rl_set_keymap_name PARAMS((const char *, Keymap)); + +/* Undocumented; used internally only. */ +extern void rl_set_keymap_from_edit_mode PARAMS((void)); +extern char *rl_get_keymap_name_from_edit_mode PARAMS((void)); + +/* Functions for manipulating the funmap, which maps command names to functions. */ +extern int rl_add_funmap_entry PARAMS((const char *, rl_command_func_t *)); +extern const char **rl_funmap_names PARAMS((void)); +/* Undocumented, only used internally -- there is only one funmap, and this + function may be called only once. */ +extern void rl_initialize_funmap PARAMS((void)); + +/* Utility functions for managing keyboard macros. */ +extern void rl_push_macro_input PARAMS((char *)); + +/* Functions for undoing, from undo.c */ +extern void rl_add_undo PARAMS((enum undo_code, int, int, char *)); +extern void rl_free_undo_list PARAMS((void)); +extern int rl_do_undo PARAMS((void)); +extern int rl_begin_undo_group PARAMS((void)); +extern int rl_end_undo_group PARAMS((void)); +extern int rl_modifying PARAMS((int, int)); + +/* Functions for redisplay. */ +extern void rl_redisplay PARAMS((void)); +extern int rl_on_new_line PARAMS((void)); +extern int rl_on_new_line_with_prompt PARAMS((void)); +extern int rl_forced_update_display PARAMS((void)); +extern int rl_clear_visible_line PARAMS((void)); +extern int rl_clear_message PARAMS((void)); +extern int rl_reset_line_state PARAMS((void)); +extern int rl_crlf PARAMS((void)); + +/* Functions to manage the mark and region, especially the notion of an + active mark and an active region. */ +extern void rl_keep_mark_active PARAMS((void)); + +extern void rl_activate_mark PARAMS((void)); +extern void rl_deactivate_mark PARAMS((void)); +extern int rl_mark_active_p PARAMS((void)); + +#if defined (USE_VARARGS) && defined (PREFER_STDARG) +extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +#else +extern int rl_message (); +#endif + +extern int rl_show_char PARAMS((int)); + +/* Undocumented in texinfo manual. */ +extern int rl_character_len PARAMS((int, int)); +extern void rl_redraw_prompt_last_line PARAMS((void)); + +/* Save and restore internal prompt redisplay information. */ +extern void rl_save_prompt PARAMS((void)); +extern void rl_restore_prompt PARAMS((void)); + +/* Modifying text. */ +extern void rl_replace_line PARAMS((const char *, int)); +extern int rl_insert_text PARAMS((const char *)); +extern int rl_delete_text PARAMS((int, int)); +extern int rl_kill_text PARAMS((int, int)); +extern char *rl_copy_text PARAMS((int, int)); + +/* Terminal and tty mode management. */ +extern void rl_prep_terminal PARAMS((int)); +extern void rl_deprep_terminal PARAMS((void)); +extern void rl_tty_set_default_bindings PARAMS((Keymap)); +extern void rl_tty_unset_default_bindings PARAMS((Keymap)); + +extern int rl_tty_set_echoing PARAMS((int)); +extern int rl_reset_terminal PARAMS((const char *)); +extern void rl_resize_terminal PARAMS((void)); +extern void rl_set_screen_size PARAMS((int, int)); +extern void rl_get_screen_size PARAMS((int *, int *)); +extern void rl_reset_screen_size PARAMS((void)); + +extern char *rl_get_termcap PARAMS((const char *)); + +/* Functions for character input. */ +extern int rl_stuff_char PARAMS((int)); +extern int rl_execute_next PARAMS((int)); +extern int rl_clear_pending_input PARAMS((void)); +extern int rl_read_key PARAMS((void)); +extern int rl_getc PARAMS((FILE *)); +extern int rl_set_keyboard_input_timeout PARAMS((int)); + +/* `Public' utility functions . */ +extern void rl_extend_line_buffer PARAMS((int)); +extern int rl_ding PARAMS((void)); +extern int rl_alphabetic PARAMS((int)); +extern void rl_free PARAMS((void *)); + +/* Readline signal handling, from signals.c */ +extern int rl_set_signals PARAMS((void)); +extern int rl_clear_signals PARAMS((void)); +extern void rl_cleanup_after_signal PARAMS((void)); +extern void rl_reset_after_signal PARAMS((void)); +extern void rl_free_line_state PARAMS((void)); + +extern int rl_pending_signal PARAMS((void)); +extern void rl_check_signals PARAMS((void)); + +extern void rl_echo_signal_char PARAMS((int)); + +extern int rl_set_paren_blink_timeout PARAMS((int)); + +/* History management functions. */ + +extern void rl_clear_history PARAMS((void)); + +/* Undocumented. */ +extern int rl_maybe_save_line PARAMS((void)); +extern int rl_maybe_unsave_line PARAMS((void)); +extern int rl_maybe_replace_line PARAMS((void)); + +/* Completion functions. */ +extern int rl_complete_internal PARAMS((int)); +extern void rl_display_match_list PARAMS((char **, int, int)); + +extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); +extern char *rl_username_completion_function PARAMS((const char *, int)); +extern char *rl_filename_completion_function PARAMS((const char *, int)); + +extern int rl_completion_mode PARAMS((rl_command_func_t *)); + +#if 0 +/* Backwards compatibility (compat.c). These will go away sometime. */ +extern void free_undo_list PARAMS((void)); +extern int maybe_save_line PARAMS((void)); +extern int maybe_unsave_line PARAMS((void)); +extern int maybe_replace_line PARAMS((void)); + +extern int ding PARAMS((void)); +extern int alphabetic PARAMS((int)); +extern int crlf PARAMS((void)); + +extern char **completion_matches PARAMS((char *, rl_compentry_func_t *)); +extern char *username_completion_function PARAMS((const char *, int)); +extern char *filename_completion_function PARAMS((const char *, int)); +#endif + +/* **************************************************************** */ +/* */ +/* Well Published Variables */ +/* */ +/* **************************************************************** */ + +/* The version of this incarnation of the readline library. */ +extern const char *rl_library_version; /* e.g., "4.2" */ +extern int rl_readline_version; /* e.g., 0x0402 */ + +/* True if this is real GNU readline. */ +extern int rl_gnu_readline_p; + +/* Flags word encapsulating the current readline state. */ +extern unsigned long rl_readline_state; + +/* Says which editing mode readline is currently using. 1 means emacs mode; + 0 means vi mode. */ +extern int rl_editing_mode; + +/* Insert or overwrite mode for emacs mode. 1 means insert mode; 0 means + overwrite mode. Reset to insert mode on each input line. */ +extern int rl_insert_mode; + +/* The name of the calling program. You should initialize this to + whatever was in argv[0]. It is used when parsing conditionals. */ +extern const char *rl_readline_name; + +/* The prompt readline uses. This is set from the argument to + readline (), and should not be assigned to directly. */ +extern char *rl_prompt; + +/* The prompt string that is actually displayed by rl_redisplay. Public so + applications can more easily supply their own redisplay functions. */ +extern char *rl_display_prompt; + +/* The line buffer that is in use. */ +extern char *rl_line_buffer; + +/* The location of point, and end. */ +extern int rl_point; +extern int rl_end; + +/* The mark, or saved cursor position. */ +extern int rl_mark; + +/* Flag to indicate that readline has finished with the current input + line and should return it. */ +extern int rl_done; + +/* If set to a character value, that will be the next keystroke read. */ +extern int rl_pending_input; + +/* Non-zero if we called this function from _rl_dispatch(). It's present + so functions can find out whether they were called from a key binding + or directly from an application. */ +extern int rl_dispatching; + +/* Non-zero if the user typed a numeric argument before executing the + current function. */ +extern int rl_explicit_arg; + +/* The current value of the numeric argument specified by the user. */ +extern int rl_numeric_arg; + +/* The address of the last command function Readline executed. */ +extern rl_command_func_t *rl_last_func; + +/* The name of the terminal to use. */ +extern const char *rl_terminal_name; + +/* The input and output streams. */ +extern FILE *rl_instream; +extern FILE *rl_outstream; + +/* If non-zero, Readline gives values of LINES and COLUMNS from the environment + greater precedence than values fetched from the kernel when computing the + screen dimensions. */ +extern int rl_prefer_env_winsize; + +/* If non-zero, then this is the address of a function to call just + before readline_internal () prints the first prompt. */ +extern rl_hook_func_t *rl_startup_hook; + +/* If non-zero, this is the address of a function to call just before + readline_internal_setup () returns and readline_internal starts + reading input characters. */ +extern rl_hook_func_t *rl_pre_input_hook; + +/* The address of a function to call periodically while Readline is + awaiting character input, or NULL, for no event handling. */ +extern rl_hook_func_t *rl_event_hook; + +/* The address of a function to call if a read is interrupted by a signal. */ +extern rl_hook_func_t *rl_signal_event_hook; + +/* The address of a function to call if Readline needs to know whether or not + there is data available from the current input source. */ +extern rl_hook_func_t *rl_input_available_hook; + +/* The address of the function to call to fetch a character from the current + Readline input stream */ +extern rl_getc_func_t *rl_getc_function; + +extern rl_voidfunc_t *rl_redisplay_function; + +extern rl_vintfunc_t *rl_prep_term_function; +extern rl_voidfunc_t *rl_deprep_term_function; + +/* Dispatch variables. */ +extern Keymap rl_executing_keymap; +extern Keymap rl_binding_keymap; + +extern int rl_executing_key; +extern char *rl_executing_keyseq; +extern int rl_key_sequence_length; + +/* Display variables. */ +/* If non-zero, readline will erase the entire line, including any prompt, + if the only thing typed on an otherwise-blank line is something bound to + rl_newline. */ +extern int rl_erase_empty_line; + +/* If non-zero, the application has already printed the prompt (rl_prompt) + before calling readline, so readline should not output it the first time + redisplay is done. */ +extern int rl_already_prompted; + +/* A non-zero value means to read only this many characters rather than + up to a character bound to accept-line. */ +extern int rl_num_chars_to_read; + +/* The text of a currently-executing keyboard macro. */ +extern char *rl_executing_macro; + +/* Variables to control readline signal handling. */ +/* If non-zero, readline will install its own signal handlers for + SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */ +extern int rl_catch_signals; + +/* If non-zero, readline will install a signal handler for SIGWINCH + that also attempts to call any calling application's SIGWINCH signal + handler. Note that the terminal is not cleaned up before the + application's signal handler is called; use rl_cleanup_after_signal() + to do that. */ +extern int rl_catch_sigwinch; + +/* If non-zero, the readline SIGWINCH handler will modify LINES and + COLUMNS in the environment. */ +extern int rl_change_environment; + +/* Completion variables. */ +/* Pointer to the generator function for completion_matches (). + NULL means to use rl_filename_completion_function (), the default + filename completer. */ +extern rl_compentry_func_t *rl_completion_entry_function; + +/* Optional generator for menu completion. Default is + rl_completion_entry_function (rl_filename_completion_function). */ +extern rl_compentry_func_t *rl_menu_completion_entry_function; + +/* If rl_ignore_some_completions_function is non-NULL it is the address + of a function to call after all of the possible matches have been + generated, but before the actual completion is done to the input line. + The function is called with one argument; a NULL terminated array + of (char *). If your function removes any of the elements, they + must be free()'ed. */ +extern rl_compignore_func_t *rl_ignore_some_completions_function; + +/* Pointer to alternative function to create matches. + Function is called with TEXT, START, and END. + START and END are indices in RL_LINE_BUFFER saying what the boundaries + of TEXT are. + If this function exists and returns NULL then call the value of + rl_completion_entry_function to try to match, otherwise use the + array of strings returned. */ +extern rl_completion_func_t *rl_attempted_completion_function; + +/* The basic list of characters that signal a break between words for the + completer routine. The initial contents of this variable is what + breaks words in the shell, i.e. "n\"\\'`@$>". */ +extern const char *rl_basic_word_break_characters; + +/* The list of characters that signal a break between words for + rl_complete_internal. The default list is the contents of + rl_basic_word_break_characters. */ +extern /*const*/ char *rl_completer_word_break_characters; + +/* Hook function to allow an application to set the completion word + break characters before readline breaks up the line. Allows + position-dependent word break characters. */ +extern rl_cpvfunc_t *rl_completion_word_break_hook; + +/* List of characters which can be used to quote a substring of the line. + Completion occurs on the entire substring, and within the substring + rl_completer_word_break_characters are treated as any other character, + unless they also appear within this list. */ +extern const char *rl_completer_quote_characters; + +/* List of quote characters which cause a word break. */ +extern const char *rl_basic_quote_characters; + +/* List of characters that need to be quoted in filenames by the completer. */ +extern const char *rl_filename_quote_characters; + +/* List of characters that are word break characters, but should be left + in TEXT when it is passed to the completion function. The shell uses + this to help determine what kind of completing to do. */ +extern const char *rl_special_prefixes; + +/* If non-zero, then this is the address of a function to call when + completing on a directory name. The function is called with + the address of a string (the current directory name) as an arg. It + changes what is displayed when the possible completions are printed + or inserted. The directory completion hook should perform + any necessary dequoting. This function should return 1 if it modifies + the directory name pointer passed as an argument. If the directory + completion hook returns 0, it should not modify the directory name + pointer passed as an argument. */ +extern rl_icppfunc_t *rl_directory_completion_hook; + +/* If non-zero, this is the address of a function to call when completing + a directory name. This function takes the address of the directory name + to be modified as an argument. Unlike rl_directory_completion_hook, it + only modifies the directory name used in opendir(2), not what is displayed + when the possible completions are printed or inserted. If set, it takes + precedence over rl_directory_completion_hook. The directory rewrite + hook should perform any necessary dequoting. This function has the same + return value properties as the directory_completion_hook. + + I'm not happy with how this works yet, so it's undocumented. I'm trying + it in bash to see how well it goes. */ +extern rl_icppfunc_t *rl_directory_rewrite_hook; + +/* If non-zero, this is the address of a function for the completer to call + before deciding which character to append to a completed name. It should + modify the directory name passed as an argument if appropriate, and return + non-zero if it modifies the name. This should not worry about dequoting + the filename; that has already happened by the time it gets here. */ +extern rl_icppfunc_t *rl_filename_stat_hook; + +/* If non-zero, this is the address of a function to call when reading + directory entries from the filesystem for completion and comparing + them to the partial word to be completed. The function should + either return its first argument (if no conversion takes place) or + newly-allocated memory. This can, for instance, convert filenames + between character sets for comparison against what's typed at the + keyboard. The returned value is what is added to the list of + matches. The second argument is the length of the filename to be + converted. */ +extern rl_dequote_func_t *rl_filename_rewrite_hook; + +/* Backwards compatibility with previous versions of readline. */ +#define rl_symbolic_link_hook rl_directory_completion_hook + +/* If non-zero, then this is the address of a function to call when + completing a word would normally display the list of possible matches. + This function is called instead of actually doing the display. + It takes three arguments: (char **matches, int num_matches, int max_length) + where MATCHES is the array of strings that matched, NUM_MATCHES is the + number of strings in that array, and MAX_LENGTH is the length of the + longest string in that array. */ +extern rl_compdisp_func_t *rl_completion_display_matches_hook; + +/* Non-zero means that the results of the matches are to be treated + as filenames. This is ALWAYS zero on entry, and can only be changed + within a completion entry finder function. */ +extern int rl_filename_completion_desired; + +/* Non-zero means that the results of the matches are to be quoted using + double quotes (or an application-specific quoting mechanism) if the + filename contains any characters in rl_word_break_chars. This is + ALWAYS non-zero on entry, and can only be changed within a completion + entry finder function. */ +extern int rl_filename_quoting_desired; + +/* Set to a function to quote a filename in an application-specific fashion. + Called with the text to quote, the type of match found (single or multiple) + and a pointer to the quoting character to be used, which the function can + reset if desired. */ +extern rl_quote_func_t *rl_filename_quoting_function; + +/* Function to call to remove quoting characters from a filename. Called + before completion is attempted, so the embedded quotes do not interfere + with matching names in the file system. */ +extern rl_dequote_func_t *rl_filename_dequoting_function; + +/* Function to call to decide whether or not a word break character is + quoted. If a character is quoted, it does not break words for the + completer. */ +extern rl_linebuf_func_t *rl_char_is_quoted_p; + +/* Non-zero means to suppress normal filename completion after the + user-specified completion function has been called. */ +extern int rl_attempted_completion_over; + +/* Set to a character describing the type of completion being attempted by + rl_complete_internal; available for use by application completion + functions. */ +extern int rl_completion_type; + +/* Set to the last key used to invoke one of the completion functions */ +extern int rl_completion_invoking_key; + +/* Up to this many items will be displayed in response to a + possible-completions call. After that, we ask the user if she + is sure she wants to see them all. The default value is 100. */ +extern int rl_completion_query_items; + +/* Character appended to completed words when at the end of the line. The + default is a space. Nothing is added if this is '\0'. */ +extern int rl_completion_append_character; + +/* If set to non-zero by an application completion function, + rl_completion_append_character will not be appended. */ +extern int rl_completion_suppress_append; + +/* Set to any quote character readline thinks it finds before any application + completion function is called. */ +extern int rl_completion_quote_character; + +/* Set to a non-zero value if readline found quoting anywhere in the word to + be completed; set before any application completion function is called. */ +extern int rl_completion_found_quote; + +/* If non-zero, the completion functions don't append any closing quote. + This is set to 0 by rl_complete_internal and may be changed by an + application-specific completion function. */ +extern int rl_completion_suppress_quote; + +/* If non-zero, readline will sort the completion matches. On by default. */ +extern int rl_sort_completion_matches; + +/* If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + mark-directories variable (which is user-settable). This exists so + that application completion functions can override the user's preference + (set via the mark-symlinked-directories variable) if appropriate. + It's set to the value of _rl_complete_mark_symlink_dirs in + rl_complete_internal before any application-specific completion + function is called, so without that function doing anything, the user's + preferences are honored. */ +extern int rl_completion_mark_symlink_dirs; + +/* If non-zero, then disallow duplicates in the matches. */ +extern int rl_ignore_completion_duplicates; + +/* If this is non-zero, completion is (temporarily) inhibited, and the + completion character will be inserted as any other. */ +extern int rl_inhibit_completion; + +/* Applications can set this to non-zero to have readline's signal handlers + installed during the entire duration of reading a complete line, as in + readline-6.2. This should be used with care, because it can result in + readline receiving signals and not handling them until it's called again + via rl_callback_read_char, thereby stealing them from the application. + By default, signal handlers are only active while readline is active. */ +extern int rl_persistent_signal_handlers; + +/* Input error; can be returned by (*rl_getc_function) if readline is reading + a top-level command (RL_ISSTATE (RL_STATE_READCMD)). */ +#define READERR (-2) + +/* Definitions available for use by readline clients. */ +#define RL_PROMPT_START_IGNORE '\001' +#define RL_PROMPT_END_IGNORE '\002' + +/* Possible values for do_replace argument to rl_filename_quoting_function, + called by rl_complete_internal. */ +#define NO_MATCH 0 +#define SINGLE_MATCH 1 +#define MULT_MATCH 2 + +/* Possible state values for rl_readline_state */ +#define RL_STATE_NONE 0x000000 /* no state; before first call */ + +#define RL_STATE_INITIALIZING 0x0000001 /* initializing */ +#define RL_STATE_INITIALIZED 0x0000002 /* initialization done */ +#define RL_STATE_TERMPREPPED 0x0000004 /* terminal is prepped */ +#define RL_STATE_READCMD 0x0000008 /* reading a command key */ +#define RL_STATE_METANEXT 0x0000010 /* reading input after ESC */ +#define RL_STATE_DISPATCHING 0x0000020 /* dispatching to a command */ +#define RL_STATE_MOREINPUT 0x0000040 /* reading more input in a command function */ +#define RL_STATE_ISEARCH 0x0000080 /* doing incremental search */ +#define RL_STATE_NSEARCH 0x0000100 /* doing non-inc search */ +#define RL_STATE_SEARCH 0x0000200 /* doing a history search */ +#define RL_STATE_NUMERICARG 0x0000400 /* reading numeric argument */ +#define RL_STATE_MACROINPUT 0x0000800 /* getting input from a macro */ +#define RL_STATE_MACRODEF 0x0001000 /* defining keyboard macro */ +#define RL_STATE_OVERWRITE 0x0002000 /* overwrite mode */ +#define RL_STATE_COMPLETING 0x0004000 /* doing completion */ +#define RL_STATE_SIGHANDLER 0x0008000 /* in readline sighandler */ +#define RL_STATE_UNDOING 0x0010000 /* doing an undo */ +#define RL_STATE_INPUTPENDING 0x0020000 /* rl_execute_next called */ +#define RL_STATE_TTYCSAVED 0x0040000 /* tty special chars saved */ +#define RL_STATE_CALLBACK 0x0080000 /* using the callback interface */ +#define RL_STATE_VIMOTION 0x0100000 /* reading vi motion arg */ +#define RL_STATE_MULTIKEY 0x0200000 /* reading multiple-key command */ +#define RL_STATE_VICMDONCE 0x0400000 /* entered vi command mode at least once */ +#define RL_STATE_CHARSEARCH 0x0800000 /* vi mode char search */ +#define RL_STATE_REDISPLAYING 0x1000000 /* updating terminal display */ + +#define RL_STATE_DONE 0x2000000 /* done; accepted line */ + +#define RL_SETSTATE(x) (rl_readline_state |= (x)) +#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x)) +#define RL_ISSTATE(x) (rl_readline_state & (x)) + +struct readline_state { + /* line state */ + int point; + int end; + int mark; + int buflen; + char *buffer; + UNDO_LIST *ul; + char *prompt; + + /* global state */ + int rlstate; + int done; + Keymap kmap; + + /* input state */ + rl_command_func_t *lastfunc; + int insmode; + int edmode; + char *kseq; + int kseqlen; + + int pendingin; + FILE *inf; + FILE *outf; + char *macro; + + /* signal state */ + int catchsigs; + int catchsigwinch; + + /* search state */ + + /* completion state */ + rl_compentry_func_t *entryfunc; + rl_compentry_func_t *menuentryfunc; + rl_compignore_func_t *ignorefunc; + rl_completion_func_t *attemptfunc; + char *wordbreakchars; + + /* options state */ + + /* hook state */ + + /* reserved for future expansion, so the struct size doesn't change */ + char reserved[64]; +}; + +extern int rl_save_state PARAMS((struct readline_state *)); +extern int rl_restore_state PARAMS((struct readline_state *)); + +#ifdef __cplusplus +} +#endif + +#endif /* _READLINE_H_ */ diff --git a/bash-5.1/lib/readline/rlconf.h b/bash-5.1/lib/readline/rlconf.h new file mode 100644 index 0000000000000000000000000000000000000000..b6d6a2f12841ac5e3a6d096f6c321e56b61919ad --- /dev/null +++ b/bash-5.1/lib/readline/rlconf.h @@ -0,0 +1,79 @@ +/* rlconf.h -- readline configuration definitions */ + +/* Copyright (C) 1992-2015 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RLCONF_H_) +#define _RLCONF_H_ + +/* Define this if you want the vi-mode editing available. */ +#define VI_MODE + +/* Define this to get an indication of file type when listing completions. */ +#define VISIBLE_STATS + +/* Define this to get support for colors when listing completions and in + other places. */ +#define COLOR_SUPPORT + +/* This definition is needed by readline.c, rltty.c, and signals.c. */ +/* If on, then readline handles signals in a way that doesn't suck. */ +#define HANDLE_SIGNALS + +/* Ugly but working hack for binding prefix meta. */ +#define PREFIX_META_HACK + +/* The next-to-last-ditch effort file name for a user-specific init file. */ +#define DEFAULT_INPUTRC "~/.inputrc" + +/* The ultimate last-ditch filename for an init file -- system-wide. */ +#define SYS_INPUTRC "/etc/inputrc" + +/* If defined, expand tabs to spaces. */ +#define DISPLAY_TABS + +/* If defined, use the terminal escape sequence to move the cursor forward + over a character when updating the line rather than rewriting it. */ +/* #define HACK_TERMCAP_MOTION */ + +/* The string inserted by the `insert comment' command. */ +#define RL_COMMENT_BEGIN_DEFAULT "#" + +/* Define this if you want code that allows readline to be used in an + X `callback' style. */ +#define READLINE_CALLBACKS + +/* Define this if you want the cursor to indicate insert or overwrite mode. */ +/* #define CURSOR_MODE */ + +/* Define this if you want to enable code that talks to the Linux kernel + tty auditing system. */ +/* #define ENABLE_TTY_AUDIT_SUPPORT */ + +/* Defaults for the various editing mode indicators, inserted at the beginning + of the last (maybe only) line of the prompt if show-mode-in-prompt is on */ +#define RL_EMACS_MODESTR_DEFAULT "@" +#define RL_EMACS_MODESTR_DEFLEN 1 + +#define RL_VI_INS_MODESTR_DEFAULT "(ins)" +#define RL_VI_INS_MODESTR_DEFLEN 5 +#define RL_VI_CMD_MODESTR_DEFAULT "(cmd)" +#define RL_VI_CMD_MODESTR_DEFLEN 5 + +#endif /* _RLCONF_H_ */ diff --git a/bash-5.1/lib/readline/rldefs.h b/bash-5.1/lib/readline/rldefs.h new file mode 100644 index 0000000000000000000000000000000000000000..dab1beba1d72fbc6288f361b8c59fe2e3c78582e --- /dev/null +++ b/bash-5.1/lib/readline/rldefs.h @@ -0,0 +1,166 @@ +/* rldefs.h -- an attempt to isolate some of the system-specific defines + for readline. This should be included after any files that define + system-specific constants like _POSIX_VERSION or USG. */ + +/* Copyright (C) 1987-2011 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RLDEFS_H_) +#define _RLDEFS_H_ + +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif + +#include "rlstdc.h" + +#if defined (STRCOLL_BROKEN) +# undef HAVE_STRCOLL +#endif + +#if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING) +# define TERMIOS_TTY_DRIVER +#else +# if defined (HAVE_TERMIO_H) +# define TERMIO_TTY_DRIVER +# else +# if !defined (__MINGW32__) +# define NEW_TTY_DRIVER +# else +# define NO_TTY_DRIVER +# endif +# endif +#endif + +/* Posix macro to check file in statbuf for directory-ness. + This requires that be included before this test. */ +#if defined (S_IFDIR) && !defined (S_ISDIR) +# define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) +#endif + +/* Decide which flavor of the header file describing the C library + string functions to include and include it. */ + +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +#if !defined (strchr) && !defined (__STDC__) +extern char *strchr (), *strrchr (); +#endif /* !strchr && !__STDC__ */ + +#if defined (PREFER_STDARG) +# include +#else +# if defined (PREFER_VARARGS) +# include +# endif +#endif + +#if defined (HAVE_STRCASECMP) +#define _rl_stricmp strcasecmp +#define _rl_strnicmp strncasecmp +#else +extern int _rl_stricmp PARAMS((const char *, const char *)); +extern int _rl_strnicmp PARAMS((const char *, const char *, int)); +#endif + +#if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE) +# define _rl_strpbrk(a,b) strpbrk((a),(b)) +#else +extern char *_rl_strpbrk PARAMS((const char *, const char *)); +#endif + +#if !defined (emacs_mode) +# define no_mode -1 +# define vi_mode 0 +# define emacs_mode 1 +#endif + +#if !defined (RL_IM_INSERT) +# define RL_IM_INSERT 1 +# define RL_IM_OVERWRITE 0 +# +# define RL_IM_DEFAULT RL_IM_INSERT +#endif + +/* If you cast map[key].function to type (Keymap) on a Cray, + the compiler takes the value of map[key].function and + divides it by 4 to convert between pointer types (pointers + to functions and pointers to structs are different sizes). + This is not what is wanted. */ +#if defined (CRAY) +# define FUNCTION_TO_KEYMAP(map, key) (Keymap)((int)map[key].function) +# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)((int)(data)) +#else +# define FUNCTION_TO_KEYMAP(map, key) (Keymap)(map[key].function) +# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)(data) +#endif + +#ifndef savestring +#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) +#endif + +/* Possible values for _rl_bell_preference. */ +#define NO_BELL 0 +#define AUDIBLE_BELL 1 +#define VISIBLE_BELL 2 + +/* Definitions used when searching the line for characters. */ +/* NOTE: it is necessary that opposite directions are inverses */ +#define FTO 1 /* forward to */ +#define BTO -1 /* backward to */ +#define FFIND 2 /* forward find */ +#define BFIND -2 /* backward find */ + +/* Possible values for the found_quote flags word used by the completion + functions. It says what kind of (shell-like) quoting we found anywhere + in the line. */ +#define RL_QF_SINGLE_QUOTE 0x01 +#define RL_QF_DOUBLE_QUOTE 0x02 +#define RL_QF_BACKSLASH 0x04 +#define RL_QF_OTHER_QUOTE 0x08 + +/* Default readline line buffer length. */ +#define DEFAULT_BUFFER_SIZE 256 + +#if !defined (STREQ) +#define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) +#define STREQN(a, b, n) (((n) == 0) ? (1) \ + : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) +#endif + +#if !defined (RL_STRLEN) +# define RL_STRLEN(s) (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) +#endif + +#if !defined (FREE) +# define FREE(x) if (x) free (x) +#endif + +#if !defined (SWAP) +# define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) +#endif + +/* CONFIGURATION SECTION */ +#include "rlconf.h" + +#endif /* !_RLDEFS_H_ */ diff --git a/bash-5.1/lib/readline/rlmbutil.h b/bash-5.1/lib/readline/rlmbutil.h new file mode 100644 index 0000000000000000000000000000000000000000..4d3e90706a2534e3d8cb524b99ff78ebe9cf96aa --- /dev/null +++ b/bash-5.1/lib/readline/rlmbutil.h @@ -0,0 +1,213 @@ +/* rlmbutil.h -- utility functions for multibyte characters. */ + +/* Copyright (C) 2001-2015 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RL_MBUTIL_H_) +#define _RL_MBUTIL_H_ + +#include "rlstdc.h" + +/************************************************/ +/* check multibyte capability for I18N code */ +/************************************************/ + +/* For platforms which support the ISO C amendment 1 functionality we + support user defined character classes. */ + /* Solaris 2.5 has a bug: must be included before . */ +#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) +# include +# include +# if defined (HAVE_ISWCTYPE) && \ + defined (HAVE_ISWLOWER) && \ + defined (HAVE_ISWUPPER) && \ + defined (HAVE_MBSRTOWCS) && \ + defined (HAVE_MBRTOWC) && \ + defined (HAVE_MBRLEN) && \ + defined (HAVE_TOWLOWER) && \ + defined (HAVE_TOWUPPER) && \ + defined (HAVE_WCHAR_T) && \ + defined (HAVE_WCWIDTH) + /* system is supposed to support XPG5 */ +# define HANDLE_MULTIBYTE 1 +# endif +#endif + +/* If we don't want multibyte chars even on a system that supports them, let + the configuring user turn multibyte support off. */ +#if defined (NO_MULTIBYTE_SUPPORT) +# undef HANDLE_MULTIBYTE +#endif + +/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ +#if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) +# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0) +# define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0) +# define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0) +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) +# define mbrlen(s, n, ps) (mbrlen) (s, n, 0) +# define mbstate_t int +#endif + +/* Make sure MB_LEN_MAX is at least 16 on systems that claim to be able to + handle multibyte chars (some systems define MB_LEN_MAX as 1) */ +#ifdef HANDLE_MULTIBYTE +# include +# if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16) +# undef MB_LEN_MAX +# endif +# if !defined (MB_LEN_MAX) +# define MB_LEN_MAX 16 +# endif +#endif + +/************************************************/ +/* end of multibyte capability checks for I18N */ +/************************************************/ + +/* + * Flags for _rl_find_prev_mbchar and _rl_find_next_mbchar: + * + * MB_FIND_ANY find any multibyte character + * MB_FIND_NONZERO find a non-zero-width multibyte character + */ + +#define MB_FIND_ANY 0x00 +#define MB_FIND_NONZERO 0x01 + +extern int _rl_find_prev_mbchar PARAMS((char *, int, int)); +extern int _rl_find_next_mbchar PARAMS((char *, int, int, int)); + +#ifdef HANDLE_MULTIBYTE + +extern int _rl_compare_chars PARAMS((char *, int, mbstate_t *, char *, int, mbstate_t *)); +extern int _rl_get_char_len PARAMS((char *, mbstate_t *)); +extern int _rl_adjust_point PARAMS((char *, int, mbstate_t *)); + +extern int _rl_read_mbchar PARAMS((char *, int)); +extern int _rl_read_mbstring PARAMS((int, char *, int)); + +extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int)); + +extern wchar_t _rl_char_value PARAMS((char *, int)); +extern int _rl_walphabetic PARAMS((wchar_t)); + +#define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc)) +#define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc)) + +#define MB_NEXTCHAR(b,s,c,f) \ + ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \ + ? _rl_find_next_mbchar ((b), (s), (c), (f)) \ + : ((s) + (c))) +#define MB_PREVCHAR(b,s,f) \ + ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \ + ? _rl_find_prev_mbchar ((b), (s), (f)) \ + : ((s) - 1)) + +#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) +#define MB_NULLWCH(x) ((x) == 0) + +/* Try and shortcut the printable ascii characters to cut down the number of + calls to a libc wcwidth() */ +static inline int +_rl_wcwidth (wc) + wchar_t wc; +{ + switch (wc) + { + case ' ': case '!': case '"': case '#': case '%': + case '&': case '\'': case '(': case ')': case '*': + case '+': case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': + case '?': + case 'A': case 'B': case 'C': case 'D': case 'E': + case 'F': case 'G': case 'H': case 'I': case 'J': + case 'K': case 'L': case 'M': case 'N': case 'O': + case 'P': case 'Q': case 'R': case 'S': case 'T': + case 'U': case 'V': case 'W': case 'X': case 'Y': + case 'Z': + case '[': case '\\': case ']': case '^': case '_': + case 'a': case 'b': case 'c': case 'd': case 'e': + case 'f': case 'g': case 'h': case 'i': case 'j': + case 'k': case 'l': case 'm': case 'n': case 'o': + case 'p': case 'q': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'y': + case 'z': case '{': case '|': case '}': case '~': + return 1; + default: + return wcwidth (wc); + } +} + +/* Unicode combining characters range from U+0300 to U+036F */ +#define UNICODE_COMBINING_CHAR(x) ((x) >= 768 && (x) <= 879) + +#if defined (WCWIDTH_BROKEN) +# define WCWIDTH(wc) ((_rl_utf8locale && UNICODE_COMBINING_CHAR(wc)) ? 0 : _rl_wcwidth(wc)) +#else +# define WCWIDTH(wc) _rl_wcwidth(wc) +#endif + +#if defined (WCWIDTH_BROKEN) +# define IS_COMBINING_CHAR(x) (WCWIDTH(x) == 0 && iswcntrl(x) == 0) +#else +# define IS_COMBINING_CHAR(x) (WCWIDTH(x) == 0) +#endif + +#define UTF8_SINGLEBYTE(c) (((c) & 0x80) == 0) +#define UTF8_MBFIRSTCHAR(c) (((c) & 0xc0) == 0xc0) +#define UTF8_MBCHAR(c) (((c) & 0xc0) == 0x80) + +#else /* !HANDLE_MULTIBYTE */ + +#undef MB_LEN_MAX +#undef MB_CUR_MAX + +#define MB_LEN_MAX 1 +#define MB_CUR_MAX 1 + +#define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1)) +#define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2)) + +#define _rl_char_value(buf,ind) ((buf)[(ind)]) + +#define _rl_walphabetic(c) (rl_alphabetic (c)) + +#define _rl_to_wupper(c) (_rl_to_upper (c)) +#define _rl_to_wlower(c) (_rl_to_lower (c)) + +#define MB_NEXTCHAR(b,s,c,f) ((s) + (c)) +#define MB_PREVCHAR(b,s,f) ((s) - 1) + +#define MB_INVALIDCH(x) (0) +#define MB_NULLWCH(x) (0) + +#define UTF8_SINGLEBYTE(c) (1) + +#if !defined (HAVE_WCHAR_T) && !defined (wchar_t) +# define wchar_t int +#endif + +#endif /* !HANDLE_MULTIBYTE */ + +extern int rl_byte_oriented; + +#endif /* _RL_MBUTIL_H_ */ diff --git a/bash-5.1/lib/readline/rlprivate.h b/bash-5.1/lib/readline/rlprivate.h new file mode 100644 index 0000000000000000000000000000000000000000..23ab2d8cec0d02d1b862ae707ec4ff3c03d9f1d2 --- /dev/null +++ b/bash-5.1/lib/readline/rlprivate.h @@ -0,0 +1,605 @@ +/* rlprivate.h -- functions and variables global to the readline library, + but not intended for use by applications. */ + +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RL_PRIVATE_H_) +#define _RL_PRIVATE_H_ + +#include "rlconf.h" /* for VISIBLE_STATS */ +#include "rlstdc.h" +#include "posixjmp.h" /* defines procenv_t */ +#include "rlmbutil.h" /* for HANDLE_MULTIBYTE */ + +/************************************************************************* + * * + * Convenience definitions * + * * + *************************************************************************/ + +#define EMACS_MODE() (rl_editing_mode == emacs_mode) +#define VI_COMMAND_MODE() (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap) +#define VI_INSERT_MODE() (rl_editing_mode == vi_mode && _rl_keymap == vi_insertion_keymap) + +#define RL_CHECK_SIGNALS() \ + do { \ + if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ + } while (0) + +#define RL_SIG_RECEIVED() (_rl_caught_signal != 0) +#define RL_SIGINT_RECEIVED() (_rl_caught_signal == SIGINT) +#define RL_SIGWINCH_RECEIVED() (_rl_caught_signal == SIGWINCH) + +#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) +#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) + +/************************************************************************* + * * + * Global structs undocumented in texinfo manual and not in readline.h * + * * + *************************************************************************/ +/* search types */ +#define RL_SEARCH_ISEARCH 0x01 /* incremental search */ +#define RL_SEARCH_NSEARCH 0x02 /* non-incremental search */ +#define RL_SEARCH_CSEARCH 0x04 /* intra-line char search */ + +/* search flags */ +#define SF_REVERSE 0x01 +#define SF_FOUND 0x02 +#define SF_FAILED 0x04 +#define SF_CHGKMAP 0x08 +#define SF_PATTERN 0x10 +#define SF_NOCASE 0x20 /* unused so far */ + +typedef struct __rl_search_context +{ + int type; + int sflags; + + char *search_string; + int search_string_index; + int search_string_size; + + char **lines; + char *allocated_line; + int hlen; + int hindex; + + int save_point; + int save_mark; + int save_line; + int last_found_line; + char *prev_line_found; + + UNDO_LIST *save_undo_list; + + Keymap keymap; /* used when dispatching commands in search string */ + Keymap okeymap; /* original keymap */ + + int history_pos; + int direction; + + int prevc; + int lastc; +#if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; + char pmb[MB_LEN_MAX]; +#endif + + char *sline; + int sline_len; + int sline_index; + + char *search_terminators; +} _rl_search_cxt; + +struct _rl_cmd { + Keymap map; + int count; + int key; + rl_command_func_t *func; +}; +extern struct _rl_cmd _rl_pending_command; +extern struct _rl_cmd *_rl_command_to_execute; + +/* Callback data for reading numeric arguments */ +#define NUM_SAWMINUS 0x01 +#define NUM_SAWDIGITS 0x02 +#define NUM_READONE 0x04 + +typedef int _rl_arg_cxt; + +/* A context for reading key sequences longer than a single character when + using the callback interface. */ +#define KSEQ_DISPATCHED 0x01 +#define KSEQ_SUBSEQ 0x02 +#define KSEQ_RECURSIVE 0x04 + +typedef struct __rl_keyseq_context +{ + int flags; + int subseq_arg; + int subseq_retval; /* XXX */ + int okey; + + Keymap dmap; + Keymap oldmap; + + struct __rl_keyseq_context *ocxt; + int childval; +} _rl_keyseq_cxt; + +/* vi-mode commands that use result of motion command to define boundaries */ +#define VIM_DELETE 0x01 +#define VIM_CHANGE 0x02 +#define VIM_YANK 0x04 + +/* various states for vi-mode commands that use motion commands. reflects + RL_READLINE_STATE */ +#define VMSTATE_READ 0x01 +#define VMSTATE_NUMARG 0x02 + +typedef struct __rl_vimotion_context +{ + int op; + int state; + int flags; /* reserved */ + _rl_arg_cxt ncxt; + int numeric_arg; + int start, end; /* rl_point, rl_end */ + int key, motion; /* initial key, motion command */ +} _rl_vimotion_cxt; + +/* fill in more as needed */ +/* `Generic' callback data and functions */ +typedef struct __rl_callback_generic_arg +{ + int count; + int i1, i2; + /* add here as needed */ +} _rl_callback_generic_arg; + +typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *)); + +typedef void _rl_sigcleanup_func_t PARAMS((int, void *)); + +/************************************************************************* + * * + * Global functions undocumented in texinfo manual and not in readline.h * + * * + *************************************************************************/ + +/************************************************************************* + * * + * Global variables undocumented in texinfo manual and not in readline.h * + * * + *************************************************************************/ + +/* complete.c */ +extern int rl_complete_with_tilde_expansion; +#if defined (VISIBLE_STATS) +extern int rl_visible_stats; +#endif /* VISIBLE_STATS */ +#if defined (COLOR_SUPPORT) +extern int _rl_colored_stats; +extern int _rl_colored_completion_prefix; +#endif + +/* readline.c */ +extern int rl_line_buffer_len; +extern int rl_arg_sign; +extern int rl_visible_prompt_length; +extern int rl_byte_oriented; + +/* display.c */ +extern int rl_display_fixed; + +/* parens.c */ +extern int rl_blink_matching_paren; + +/************************************************************************* + * * + * Global functions and variables unused and undocumented * + * * + *************************************************************************/ + +/* kill.c */ +extern int rl_set_retained_kills PARAMS((int)); + +/* terminal.c */ +extern void _rl_set_screen_size PARAMS((int, int)); + +/* undo.c */ +extern int _rl_fix_last_undo_of_type PARAMS((int, int, int)); + +/* util.c */ +extern char *_rl_savestring PARAMS((const char *)); + +/************************************************************************* + * * + * Functions and variables private to the readline library * + * * + *************************************************************************/ + +/* NOTE: Functions and variables prefixed with `_rl_' are + pseudo-global: they are global so they can be shared + between files in the readline library, but are not intended + to be visible to readline callers. */ + +/************************************************************************* + * Undocumented private functions * + *************************************************************************/ + +#if defined(READLINE_CALLBACKS) + +/* readline.c */ +extern void readline_internal_setup PARAMS((void)); +extern char *readline_internal_teardown PARAMS((int)); +extern int readline_internal_char PARAMS((void)); + +extern _rl_keyseq_cxt *_rl_keyseq_cxt_alloc PARAMS((void)); +extern void _rl_keyseq_cxt_dispose PARAMS((_rl_keyseq_cxt *)); +extern void _rl_keyseq_chain_dispose PARAMS((void)); + +extern int _rl_dispatch_callback PARAMS((_rl_keyseq_cxt *)); + +/* callback.c */ +extern _rl_callback_generic_arg *_rl_callback_data_alloc PARAMS((int)); +extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *)); + +#endif /* READLINE_CALLBACKS */ + +/* bind.c */ +extern char *_rl_untranslate_macro_value PARAMS((char *, int)); + +/* complete.c */ +extern void _rl_reset_completion_state PARAMS((void)); +extern char _rl_find_completion_word PARAMS((int *, int *)); +extern void _rl_free_match_list PARAMS((char **)); + +/* display.c */ +extern char *_rl_strip_prompt PARAMS((char *)); +extern void _rl_reset_prompt PARAMS((void)); +extern void _rl_move_vert PARAMS((int)); +extern void _rl_save_prompt PARAMS((void)); +extern void _rl_restore_prompt PARAMS((void)); +extern char *_rl_make_prompt_for_search PARAMS((int)); +extern void _rl_erase_at_end_of_line PARAMS((int)); +extern void _rl_clear_to_eol PARAMS((int)); +extern void _rl_clear_screen PARAMS((int)); +extern void _rl_update_final PARAMS((void)); +extern void _rl_optimize_redisplay PARAMS((void)); +extern void _rl_redisplay_after_sigwinch PARAMS((void)); +extern void _rl_clean_up_for_exit PARAMS((void)); +extern void _rl_erase_entire_line PARAMS((void)); +extern int _rl_current_display_line PARAMS((void)); +extern void _rl_refresh_line PARAMS((void)); + +/* input.c */ +extern int _rl_any_typein PARAMS((void)); +extern int _rl_input_available PARAMS((void)); +extern int _rl_nchars_available PARAMS((void)); +extern int _rl_input_queued PARAMS((int)); +extern void _rl_insert_typein PARAMS((int)); +extern int _rl_unget_char PARAMS((int)); +extern int _rl_pushed_input_available PARAMS((void)); + +/* isearch.c */ +extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int)); +extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int)); + +extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int)); +extern int _rl_isearch_callback PARAMS((_rl_search_cxt *)); +extern int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int)); + +extern int _rl_search_getchar PARAMS((_rl_search_cxt *)); + +/* kill.c */ +#ifndef BRACKETED_PASTE_DEFAULT +# define BRACKETED_PASTE_DEFAULT 1 /* XXX - for now */ +#endif + +#define BRACK_PASTE_PREF "\033[200~" +#define BRACK_PASTE_SUFF "\033[201~" + +#define BRACK_PASTE_LAST '~' +#define BRACK_PASTE_SLEN 6 + +#define BRACK_PASTE_INIT "\033[?2004h" +#define BRACK_PASTE_FINI "\033[?2004l\r" + +extern int _rl_read_bracketed_paste_prefix PARAMS((int)); +extern char *_rl_bracketed_text PARAMS((size_t *)); +extern int _rl_bracketed_read_key PARAMS((void)); +extern int _rl_bracketed_read_mbstring PARAMS((char *, int)); + +/* macro.c */ +extern void _rl_with_macro_input PARAMS((char *)); +extern int _rl_peek_macro_key PARAMS((void)); +extern int _rl_next_macro_key PARAMS((void)); +extern int _rl_prev_macro_key PARAMS((void)); +extern void _rl_push_executing_macro PARAMS((void)); +extern void _rl_pop_executing_macro PARAMS((void)); +extern void _rl_add_macro_char PARAMS((int)); +extern void _rl_kill_kbd_macro PARAMS((void)); + +/* misc.c */ +extern int _rl_arg_overflow PARAMS((void)); +extern void _rl_arg_init PARAMS((void)); +extern int _rl_arg_getchar PARAMS((void)); +extern int _rl_arg_callback PARAMS((_rl_arg_cxt)); +extern void _rl_reset_argument PARAMS((void)); + +extern void _rl_start_using_history PARAMS((void)); +extern int _rl_free_saved_history_line PARAMS((void)); +extern void _rl_set_insert_mode PARAMS((int, int)); + +extern void _rl_revert_previous_lines PARAMS((void)); +extern void _rl_revert_all_lines PARAMS((void)); + +/* nls.c */ +extern char *_rl_init_locale PARAMS((void)); +extern int _rl_init_eightbit PARAMS((void)); + +/* parens.c */ +extern void _rl_enable_paren_matching PARAMS((int)); + +/* readline.c */ +extern void _rl_init_line_state PARAMS((void)); +extern void _rl_set_the_line PARAMS((void)); +extern int _rl_dispatch PARAMS((int, Keymap)); +extern int _rl_dispatch_subseq PARAMS((int, Keymap, int)); +extern void _rl_internal_char_cleanup PARAMS((void)); + +extern void _rl_init_executing_keyseq PARAMS((void)); +extern void _rl_term_executing_keyseq PARAMS((void)); +extern void _rl_end_executing_keyseq PARAMS((void)); +extern void _rl_add_executing_keyseq PARAMS((int)); + +/* rltty.c */ +extern int _rl_disable_tty_signals PARAMS((void)); +extern int _rl_restore_tty_signals PARAMS((void)); + +/* search.c */ +extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *)); +extern int _rl_nsearch_cleanup PARAMS((_rl_search_cxt *, int)); + +/* signals.c */ +extern void _rl_signal_handler PARAMS((int)); + +extern void _rl_block_sigint PARAMS((void)); +extern void _rl_release_sigint PARAMS((void)); +extern void _rl_block_sigwinch PARAMS((void)); +extern void _rl_release_sigwinch PARAMS((void)); + +/* terminal.c */ +extern void _rl_get_screen_size PARAMS((int, int)); +extern void _rl_sigwinch_resize_terminal PARAMS((void)); +extern int _rl_init_terminal_io PARAMS((const char *)); +#ifdef _MINIX +extern void _rl_output_character_function PARAMS((int)); +#else +extern int _rl_output_character_function PARAMS((int)); +#endif +extern void _rl_cr PARAMS((void)); +extern void _rl_output_some_chars PARAMS((const char *, int)); +extern int _rl_backspace PARAMS((int)); +extern void _rl_enable_meta_key PARAMS((void)); +extern void _rl_disable_meta_key PARAMS((void)); +extern void _rl_control_keypad PARAMS((int)); +extern void _rl_set_cursor PARAMS((int, int)); +extern void _rl_standout_on PARAMS((void)); +extern void _rl_standout_off PARAMS((void)); + +/* text.c */ +extern void _rl_fix_point PARAMS((int)); +extern void _rl_fix_mark PARAMS((void)); +extern int _rl_replace_text PARAMS((const char *, int, int)); +extern int _rl_forward_char_internal PARAMS((int)); +extern int _rl_backward_char_internal PARAMS((int)); +extern int _rl_insert_char PARAMS((int, int)); +extern int _rl_overwrite_char PARAMS((int, int)); +extern int _rl_overwrite_rubout PARAMS((int, int)); +extern int _rl_rubout_char PARAMS((int, int)); +#if defined (HANDLE_MULTIBYTE) +extern int _rl_char_search_internal PARAMS((int, int, char *, int)); +#else +extern int _rl_char_search_internal PARAMS((int, int, int)); +#endif +extern int _rl_set_mark_at_pos PARAMS((int)); + +/* undo.c */ +extern UNDO_LIST *_rl_copy_undo_entry PARAMS((UNDO_LIST *)); +extern UNDO_LIST *_rl_copy_undo_list PARAMS((UNDO_LIST *)); +extern void _rl_free_undo_list PARAMS((UNDO_LIST *)); + +/* util.c */ +#if defined (USE_VARARGS) && defined (PREFER_STDARG) +extern void _rl_ttymsg (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +extern void _rl_errmsg (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +extern void _rl_trace (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +#else +extern void _rl_ttymsg (); +extern void _rl_errmsg (); +extern void _rl_trace (); +#endif +extern void _rl_audit_tty PARAMS((char *)); + +extern int _rl_tropen PARAMS((void)); + +extern int _rl_abort_internal PARAMS((void)); +extern int _rl_null_function PARAMS((int, int)); +extern char *_rl_strindex PARAMS((const char *, const char *)); +extern int _rl_qsort_string_compare PARAMS((char **, char **)); +extern int (_rl_uppercase_p) PARAMS((int)); +extern int (_rl_lowercase_p) PARAMS((int)); +extern int (_rl_pure_alphabetic) PARAMS((int)); +extern int (_rl_digit_p) PARAMS((int)); +extern int (_rl_to_lower) PARAMS((int)); +extern int (_rl_to_upper) PARAMS((int)); +extern int (_rl_digit_value) PARAMS((int)); + +/* vi_mode.c */ +extern void _rl_vi_initialize_line PARAMS((void)); +extern void _rl_vi_reset_last PARAMS((void)); +extern void _rl_vi_set_last PARAMS((int, int, int)); +extern int _rl_vi_textmod_command PARAMS((int)); +extern int _rl_vi_motion_command PARAMS((int)); +extern void _rl_vi_done_inserting PARAMS((void)); +extern int _rl_vi_domove_callback PARAMS((_rl_vimotion_cxt *)); +extern int _rl_vi_domove_motion_cleanup PARAMS((int, _rl_vimotion_cxt *)); + +/************************************************************************* + * Undocumented private variables * + *************************************************************************/ + +/* bind.c */ +extern const char * const _rl_possible_control_prefixes[]; +extern const char * const _rl_possible_meta_prefixes[]; + +/* callback.c */ +extern _rl_callback_func_t *_rl_callback_func; +extern _rl_callback_generic_arg *_rl_callback_data; + +/* complete.c */ +extern int _rl_complete_show_all; +extern int _rl_complete_show_unmodified; +extern int _rl_complete_mark_directories; +extern int _rl_complete_mark_symlink_dirs; +extern int _rl_completion_prefix_display_length; +extern int _rl_completion_columns; +extern int _rl_print_completions_horizontally; +extern int _rl_completion_case_fold; +extern int _rl_completion_case_map; +extern int _rl_match_hidden_files; +extern int _rl_page_completions; +extern int _rl_skip_completed_text; +extern int _rl_menu_complete_prefix_first; + +/* display.c */ +extern int _rl_vis_botlin; +extern int _rl_last_c_pos; +extern int _rl_suppress_redisplay; +extern int _rl_want_redisplay; + +extern char *_rl_emacs_mode_str; +extern int _rl_emacs_modestr_len; +extern char *_rl_vi_ins_mode_str; +extern int _rl_vi_ins_modestr_len; +extern char *_rl_vi_cmd_mode_str; +extern int _rl_vi_cmd_modestr_len; + +/* isearch.c */ +extern char *_rl_isearch_terminators; + +extern _rl_search_cxt *_rl_iscxt; + +/* macro.c */ +extern char *_rl_executing_macro; + +/* misc.c */ +extern int _rl_history_preserve_point; +extern int _rl_history_saved_point; + +extern _rl_arg_cxt _rl_argcxt; + +/* nls.c */ +extern int _rl_utf8locale; + +/* readline.c */ +extern int _rl_echoing_p; +extern int _rl_horizontal_scroll_mode; +extern int _rl_mark_modified_lines; +extern int _rl_bell_preference; +extern int _rl_meta_flag; +extern int _rl_convert_meta_chars_to_ascii; +extern int _rl_output_meta_chars; +extern int _rl_bind_stty_chars; +extern int _rl_revert_all_at_newline; +extern int _rl_echo_control_chars; +extern int _rl_show_mode_in_prompt; +extern int _rl_enable_bracketed_paste; +extern int _rl_enable_active_region; +extern char *_rl_comment_begin; +extern unsigned char _rl_parsing_conditionalized_out; +extern Keymap _rl_keymap; +extern FILE *_rl_in_stream; +extern FILE *_rl_out_stream; +extern int _rl_last_command_was_kill; +extern int _rl_eof_char; +extern int _rl_eof_found; +extern procenv_t _rl_top_level; +extern _rl_keyseq_cxt *_rl_kscxt; +extern int _rl_keyseq_timeout; + +extern int _rl_executing_keyseq_size; + +extern rl_hook_func_t *_rl_internal_startup_hook; + +/* search.c */ +extern _rl_search_cxt *_rl_nscxt; + +/* signals.c */ +extern int volatile _rl_caught_signal; + +extern _rl_sigcleanup_func_t *_rl_sigcleanup; +extern void *_rl_sigcleanarg; + +extern int _rl_echoctl; + +extern int _rl_intr_char; +extern int _rl_quit_char; +extern int _rl_susp_char; + +/* terminal.c */ +extern int _rl_enable_keypad; +extern int _rl_enable_meta; +extern char *_rl_term_clreol; +extern char *_rl_term_clrpag; +extern char *_rl_term_clrscroll; +extern char *_rl_term_im; +extern char *_rl_term_ic; +extern char *_rl_term_ei; +extern char *_rl_term_DC; +extern char *_rl_term_up; +extern char *_rl_term_dc; +extern char *_rl_term_cr; +extern char *_rl_term_IC; +extern char *_rl_term_forward_char; +extern int _rl_screenheight; +extern int _rl_screenwidth; +extern int _rl_screenchars; +extern int _rl_terminal_can_insert; +extern int _rl_term_autowrap; + +/* text.c */ +extern int _rl_optimize_typeahead; +extern int _rl_keep_mark_active; + +/* undo.c */ +extern int _rl_doing_an_undo; +extern int _rl_undo_group_level; + +/* vi_mode.c */ +extern int _rl_vi_last_command; +extern int _rl_vi_redoing; +extern _rl_vimotion_cxt *_rl_vimvcxt; + +#endif /* _RL_PRIVATE_H_ */ diff --git a/bash-5.1/lib/readline/rlshell.h b/bash-5.1/lib/readline/rlshell.h new file mode 100644 index 0000000000000000000000000000000000000000..3e17d8bc7f1ff78494979eb77fd1772a881bfc1e --- /dev/null +++ b/bash-5.1/lib/readline/rlshell.h @@ -0,0 +1,33 @@ +/* rlshell.h -- utility functions normally provided by bash. */ + +/* Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RL_SHELL_H_) +#define _RL_SHELL_H_ + +#include "rlstdc.h" + +extern char *sh_single_quote PARAMS((char *)); +extern void sh_set_lines_and_columns PARAMS((int, int)); +extern char *sh_get_env_value PARAMS((const char *)); +extern char *sh_get_home_dir PARAMS((void)); +extern int sh_unset_nodelay_mode PARAMS((int)); + +#endif /* _RL_SHELL_H_ */ diff --git a/bash-5.1/lib/readline/rlstdc.h b/bash-5.1/lib/readline/rlstdc.h new file mode 100644 index 0000000000000000000000000000000000000000..2aaa30babfbdd7e86eed5062b7324e819d5f68e8 --- /dev/null +++ b/bash-5.1/lib/readline/rlstdc.h @@ -0,0 +1,57 @@ +/* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ + +/* Copyright (C) 1993-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RL_STDC_H_) +#define _RL_STDC_H_ + +/* Adapted from BSD /usr/include/sys/cdefs.h. */ + +/* A function can be defined using prototypes and compile on both ANSI C + and traditional C compilers with something like this: + extern char *func PARAMS((char *, char *, int)); */ + +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) +# define __attribute__(x) +# endif +#endif + +/* Moved from config.h.in because readline.h:rl_message depends on these + defines. */ +#if defined (__STDC__) && defined (HAVE_STDARG_H) +# define PREFER_STDARG +# define USE_VARARGS +#else +# if defined (HAVE_VARARGS_H) +# define PREFER_VARARGS +# define USE_VARARGS +# endif +#endif + +#endif /* !_RL_STDC_H_ */ diff --git a/bash-5.1/lib/readline/rltty.c b/bash-5.1/lib/readline/rltty.c new file mode 100644 index 0000000000000000000000000000000000000000..d0cd572713a9bea108e0a8bd58fbb9e7582aa3a7 --- /dev/null +++ b/bash-5.1/lib/readline/rltty.c @@ -0,0 +1,991 @@ +/* rltty.c -- functions to prepare and restore the terminal for readline's + use. */ + +/* Copyright (C) 1992-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#include "rldefs.h" + +#include "rltty.h" +#if defined (HAVE_SYS_IOCTL_H) +# include /* include for declaration of ioctl */ +#endif + +#include "readline.h" +#include "rlprivate.h" + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal; +rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal; + +static void set_winsize PARAMS((int)); + +/* **************************************************************** */ +/* */ +/* Saving and Restoring the TTY */ +/* */ +/* **************************************************************** */ + +/* Non-zero means that the terminal is in a prepped state. There are several + flags that are OR'd in to denote whether or not we have sent various + init strings to the terminal. */ +#define TPX_PREPPED 0x01 +#define TPX_BRACKPASTE 0x02 +#define TPX_METAKEY 0x04 + +static int terminal_prepped; + +static _RL_TTY_CHARS _rl_tty_chars, _rl_last_tty_chars; + +/* If non-zero, means that this process has called tcflow(fd, TCOOFF) + and output is suspended. */ +#if defined (__ksr1__) +static int ksrflow; +#endif + +/* Dummy call to force a backgrounded readline to stop before it tries + to get the tty settings. */ +static void +set_winsize (tty) + int tty; +{ +#if defined (TIOCGWINSZ) + struct winsize w; + + if (ioctl (tty, TIOCGWINSZ, &w) == 0) + (void) ioctl (tty, TIOCSWINSZ, &w); +#endif /* TIOCGWINSZ */ +} + +#if defined (NO_TTY_DRIVER) +/* Nothing */ +#elif defined (NEW_TTY_DRIVER) + +/* Values for the `flags' field of a struct bsdtty. This tells which + elements of the struct bsdtty have been fetched from the system and + are valid. */ +#define SGTTY_SET 0x01 +#define LFLAG_SET 0x02 +#define TCHARS_SET 0x04 +#define LTCHARS_SET 0x08 + +struct bsdtty { + struct sgttyb sgttyb; /* Basic BSD tty driver information. */ + int lflag; /* Local mode flags, like LPASS8. */ +#if defined (TIOCGETC) + struct tchars tchars; /* Terminal special characters, including ^S and ^Q. */ +#endif +#if defined (TIOCGLTC) + struct ltchars ltchars; /* 4.2 BSD editing characters */ +#endif + int flags; /* Bitmap saying which parts of the struct are valid. */ +}; + +#define TIOTYPE struct bsdtty + +static TIOTYPE otio; + +static void save_tty_chars PARAMS((TIOTYPE *)); +static int _get_tty_settings PARAMS((int, TIOTYPE *)); +static int get_tty_settings PARAMS((int, TIOTYPE *)); +static int _set_tty_settings PARAMS((int, TIOTYPE *)); +static int set_tty_settings PARAMS((int, TIOTYPE *)); + +static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); + +static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t *)); + +static void +save_tty_chars (TIOTYPE *tiop) +{ + _rl_last_tty_chars = _rl_tty_chars; + + if (tiop->flags & SGTTY_SET) + { + _rl_tty_chars.t_erase = tiop->sgttyb.sg_erase; + _rl_tty_chars.t_kill = tiop->sgttyb.sg_kill; + } + + if (tiop->flags & TCHARS_SET) + { + _rl_intr_char = _rl_tty_chars.t_intr = tiop->tchars.t_intrc; + _rl_quit_char = _rl_tty_chars.t_quit = tiop->tchars.t_quitc; + + _rl_tty_chars.t_start = tiop->tchars.t_startc; + _rl_tty_chars.t_stop = tiop->tchars.t_stopc; + _rl_tty_chars.t_eof = tiop->tchars.t_eofc; + _rl_tty_chars.t_eol = '\n'; + _rl_tty_chars.t_eol2 = tiop->tchars.t_brkc; + } + + if (tiop->flags & LTCHARS_SET) + { + _rl_susp_char = _rl_tty_chars.t_susp = tiop->ltchars.t_suspc; + + _rl_tty_chars.t_dsusp = tiop->ltchars.t_dsuspc; + _rl_tty_chars.t_reprint = tiop->ltchars.t_rprntc; + _rl_tty_chars.t_flush = tiop->ltchars.t_flushc; + _rl_tty_chars.t_werase = tiop->ltchars.t_werasc; + _rl_tty_chars.t_lnext = tiop->ltchars.t_lnextc; + } + + _rl_tty_chars.t_status = -1; +} + +static int +get_tty_settings (int tty, TIOTYPE *tiop) +{ + set_winsize (tty); + + tiop->flags = tiop->lflag = 0; + + errno = 0; + if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0) + return -1; + tiop->flags |= SGTTY_SET; + +#if defined (TIOCLGET) + if (ioctl (tty, TIOCLGET, &(tiop->lflag)) == 0) + tiop->flags |= LFLAG_SET; +#endif + +#if defined (TIOCGETC) + if (ioctl (tty, TIOCGETC, &(tiop->tchars)) == 0) + tiop->flags |= TCHARS_SET; +#endif + +#if defined (TIOCGLTC) + if (ioctl (tty, TIOCGLTC, &(tiop->ltchars)) == 0) + tiop->flags |= LTCHARS_SET; +#endif + + return 0; +} + +static int +set_tty_settings (int tty, TIOTYPE *tiop) +{ + if (tiop->flags & SGTTY_SET) + { + ioctl (tty, TIOCSETN, &(tiop->sgttyb)); + tiop->flags &= ~SGTTY_SET; + } + _rl_echoing_p = 1; + +#if defined (TIOCLSET) + if (tiop->flags & LFLAG_SET) + { + ioctl (tty, TIOCLSET, &(tiop->lflag)); + tiop->flags &= ~LFLAG_SET; + } +#endif + +#if defined (TIOCSETC) + if (tiop->flags & TCHARS_SET) + { + ioctl (tty, TIOCSETC, &(tiop->tchars)); + tiop->flags &= ~TCHARS_SET; + } +#endif + +#if defined (TIOCSLTC) + if (tiop->flags & LTCHARS_SET) + { + ioctl (tty, TIOCSLTC, &(tiop->ltchars)); + tiop->flags &= ~LTCHARS_SET; + } +#endif + + return 0; +} + +static void +prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop) +{ + _rl_echoing_p = (oldtio.sgttyb.sg_flags & ECHO); + _rl_echoctl = (oldtio.sgttyb.sg_flags & ECHOCTL); + + /* Copy the original settings to the structure we're going to use for + our settings. */ + tiop->sgttyb = oldtio.sgttyb; + tiop->lflag = oldtio.lflag; +#if defined (TIOCGETC) + tiop->tchars = oldtio.tchars; +#endif +#if defined (TIOCGLTC) + tiop->ltchars = oldtio.ltchars; +#endif + tiop->flags = oldtio.flags; + + /* First, the basic settings to put us into character-at-a-time, no-echo + input mode. */ + tiop->sgttyb.sg_flags &= ~(ECHO | CRMOD); + tiop->sgttyb.sg_flags |= CBREAK; + + /* If this terminal doesn't care how the 8th bit is used, then we can + use it for the meta-key. If only one of even or odd parity is + specified, then the terminal is using parity, and we cannot. */ +#if !defined (ANYP) +# define ANYP (EVENP | ODDP) +#endif + if (((oldtio.sgttyb.sg_flags & ANYP) == ANYP) || + ((oldtio.sgttyb.sg_flags & ANYP) == 0)) + { + tiop->sgttyb.sg_flags |= ANYP; + + /* Hack on local mode flags if we can. */ +#if defined (TIOCLGET) +# if defined (LPASS8) + tiop->lflag |= LPASS8; +# endif /* LPASS8 */ +#endif /* TIOCLGET */ + } + +#if defined (TIOCGETC) +# if defined (USE_XON_XOFF) + /* Get rid of terminal output start and stop characters. */ + tiop->tchars.t_stopc = -1; /* C-s */ + tiop->tchars.t_startc = -1; /* C-q */ + + /* If there is an XON character, bind it to restart the output. */ + if (oldtio.tchars.t_startc != -1) + rl_bind_key (oldtio.tchars.t_startc, rl_restart_output); +# endif /* USE_XON_XOFF */ + + /* If there is an EOF char, bind _rl_eof_char to it. */ + if (oldtio.tchars.t_eofc != -1) + _rl_eof_char = oldtio.tchars.t_eofc; + +# if defined (NO_KILL_INTR) + /* Get rid of terminal-generated SIGQUIT and SIGINT. */ + tiop->tchars.t_quitc = -1; /* C-\ */ + tiop->tchars.t_intrc = -1; /* C-c */ +# endif /* NO_KILL_INTR */ +#endif /* TIOCGETC */ + +#if defined (TIOCGLTC) + /* Make the interrupt keys go away. Just enough to make people happy. */ + tiop->ltchars.t_dsuspc = -1; /* C-y */ + tiop->ltchars.t_lnextc = -1; /* C-v */ +#endif /* TIOCGLTC */ +} + +#else /* !defined (NEW_TTY_DRIVER) */ + +#if !defined (VMIN) +# define VMIN VEOF +#endif + +#if !defined (VTIME) +# define VTIME VEOL +#endif + +#if defined (TERMIOS_TTY_DRIVER) +# define TIOTYPE struct termios +# define DRAIN_OUTPUT(fd) tcdrain (fd) +# define GETATTR(tty, tiop) (tcgetattr (tty, tiop)) +# ifdef M_UNIX +# define SETATTR(tty, tiop) (tcsetattr (tty, TCSANOW, tiop)) +# else +# define SETATTR(tty, tiop) (tcsetattr (tty, TCSADRAIN, tiop)) +# endif /* !M_UNIX */ +#else +# define TIOTYPE struct termio +# define DRAIN_OUTPUT(fd) +# define GETATTR(tty, tiop) (ioctl (tty, TCGETA, tiop)) +# define SETATTR(tty, tiop) (ioctl (tty, TCSETAW, tiop)) +#endif /* !TERMIOS_TTY_DRIVER */ + +static TIOTYPE otio; + +static void save_tty_chars PARAMS((TIOTYPE *)); +static int _get_tty_settings PARAMS((int, TIOTYPE *)); +static int get_tty_settings PARAMS((int, TIOTYPE *)); +static int _set_tty_settings PARAMS((int, TIOTYPE *)); +static int set_tty_settings PARAMS((int, TIOTYPE *)); + +static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); + +static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t *)); +static void _rl_bind_tty_special_chars PARAMS((Keymap, TIOTYPE)); + +#if defined (FLUSHO) +# define OUTPUT_BEING_FLUSHED(tp) (tp->c_lflag & FLUSHO) +#else +# define OUTPUT_BEING_FLUSHED(tp) 0 +#endif + +static void +save_tty_chars (TIOTYPE *tiop) +{ + _rl_last_tty_chars = _rl_tty_chars; + + _rl_tty_chars.t_eof = tiop->c_cc[VEOF]; + _rl_tty_chars.t_eol = tiop->c_cc[VEOL]; +#ifdef VEOL2 + _rl_tty_chars.t_eol2 = tiop->c_cc[VEOL2]; +#endif + _rl_tty_chars.t_erase = tiop->c_cc[VERASE]; +#ifdef VWERASE + _rl_tty_chars.t_werase = tiop->c_cc[VWERASE]; +#endif + _rl_tty_chars.t_kill = tiop->c_cc[VKILL]; +#ifdef VREPRINT + _rl_tty_chars.t_reprint = tiop->c_cc[VREPRINT]; +#endif + _rl_intr_char = _rl_tty_chars.t_intr = tiop->c_cc[VINTR]; + _rl_quit_char = _rl_tty_chars.t_quit = tiop->c_cc[VQUIT]; +#ifdef VSUSP + _rl_susp_char = _rl_tty_chars.t_susp = tiop->c_cc[VSUSP]; +#endif +#ifdef VDSUSP + _rl_tty_chars.t_dsusp = tiop->c_cc[VDSUSP]; +#endif +#ifdef VSTART + _rl_tty_chars.t_start = tiop->c_cc[VSTART]; +#endif +#ifdef VSTOP + _rl_tty_chars.t_stop = tiop->c_cc[VSTOP]; +#endif +#ifdef VLNEXT + _rl_tty_chars.t_lnext = tiop->c_cc[VLNEXT]; +#endif +#ifdef VDISCARD + _rl_tty_chars.t_flush = tiop->c_cc[VDISCARD]; +#endif +#ifdef VSTATUS + _rl_tty_chars.t_status = tiop->c_cc[VSTATUS]; +#endif +} + +#if defined (_AIX) || defined (_AIX41) +/* Currently this is only used on AIX */ +static void +rltty_warning (char *msg) +{ + _rl_errmsg ("warning: %s", msg); +} +#endif + +#if defined (_AIX) +void +setopost (TIOTYPE *tp) +{ + if ((tp->c_oflag & OPOST) == 0) + { + _rl_errmsg ("warning: turning on OPOST for terminal\r"); + tp->c_oflag |= OPOST|ONLCR; + } +} +#endif + +static int +_get_tty_settings (int tty, TIOTYPE *tiop) +{ + int ioctl_ret; + + while (1) + { + ioctl_ret = GETATTR (tty, tiop); + if (ioctl_ret < 0) + { + if (errno != EINTR) + return -1; + else + continue; + } + if (OUTPUT_BEING_FLUSHED (tiop)) + { +#if defined (FLUSHO) + _rl_errmsg ("warning: turning off output flushing"); + tiop->c_lflag &= ~FLUSHO; + break; +#else + continue; +#endif + } + break; + } + + return 0; +} + +static int +get_tty_settings (int tty, TIOTYPE *tiop) +{ + set_winsize (tty); + + errno = 0; + if (_get_tty_settings (tty, tiop) < 0) + return -1; + +#if defined (_AIX) + setopost(tiop); +#endif + + return 0; +} + +static int +_set_tty_settings (int tty, TIOTYPE *tiop) +{ + while (SETATTR (tty, tiop) < 0) + { + if (errno != EINTR) + return -1; + errno = 0; + } + return 0; +} + +static int +set_tty_settings (int tty, TIOTYPE *tiop) +{ + if (_set_tty_settings (tty, tiop) < 0) + return -1; + +#if 0 + +#if defined (TERMIOS_TTY_DRIVER) +# if defined (__ksr1__) + if (ksrflow) + { + ksrflow = 0; + tcflow (tty, TCOON); + } +# else /* !ksr1 */ + tcflow (tty, TCOON); /* Simulate a ^Q. */ +# endif /* !ksr1 */ +#else + ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */ +#endif /* !TERMIOS_TTY_DRIVER */ + +#endif /* 0 */ + + return 0; +} + +static void +prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop) +{ + int sc; + Keymap kmap; + + _rl_echoing_p = (oldtio.c_lflag & ECHO); +#if defined (ECHOCTL) + _rl_echoctl = (oldtio.c_lflag & ECHOCTL); +#endif + + tiop->c_lflag &= ~(ICANON | ECHO); + + if ((unsigned char) oldtio.c_cc[VEOF] != (unsigned char) _POSIX_VDISABLE) + _rl_eof_char = oldtio.c_cc[VEOF]; + +#if defined (USE_XON_XOFF) +#if defined (IXANY) + tiop->c_iflag &= ~(IXON | IXANY); +#else + /* `strict' Posix systems do not define IXANY. */ + tiop->c_iflag &= ~IXON; +#endif /* IXANY */ +#endif /* USE_XON_XOFF */ + + /* Only turn this off if we are using all 8 bits. */ + if (((tiop->c_cflag & CSIZE) == CS8) || meta_flag) + tiop->c_iflag &= ~(ISTRIP | INPCK); + + /* Make sure we differentiate between CR and NL on input. */ + tiop->c_iflag &= ~(ICRNL | INLCR); + +#if !defined (HANDLE_SIGNALS) + tiop->c_lflag &= ~ISIG; +#else + tiop->c_lflag |= ISIG; +#endif + + tiop->c_cc[VMIN] = 1; + tiop->c_cc[VTIME] = 0; + +#if defined (FLUSHO) + if (OUTPUT_BEING_FLUSHED (tiop)) + { + tiop->c_lflag &= ~FLUSHO; + oldtio.c_lflag &= ~FLUSHO; + } +#endif + + /* Turn off characters that we need on Posix systems with job control, + just to be sure. This includes ^Y and ^V. This should not really + be necessary. */ +#if defined (TERMIOS_TTY_DRIVER) && defined (_POSIX_VDISABLE) + +#if defined (VLNEXT) + tiop->c_cc[VLNEXT] = _POSIX_VDISABLE; +#endif + +#if defined (VDSUSP) + tiop->c_cc[VDSUSP] = _POSIX_VDISABLE; +#endif + + /* Conditionally disable some other tty special characters if there is a + key binding for them in the current keymap. Readline ordinarily doesn't + bind these characters, but an application or user might. */ +#if defined (VI_MODE) + kmap = (rl_editing_mode == vi_mode) ? vi_insertion_keymap : _rl_keymap; +#else + kmap = _rl_keymap; +#endif +#if defined (VDISCARD) + sc = tiop->c_cc[VDISCARD]; + if (sc != _POSIX_VDISABLE && kmap[(unsigned char)sc].type == ISFUNC) + tiop->c_cc[VDISCARD] = _POSIX_VDISABLE; +#endif /* VDISCARD */ + +#endif /* TERMIOS_TTY_DRIVER && _POSIX_VDISABLE */ +} +#endif /* !NEW_TTY_DRIVER */ + +/* Put the terminal in CBREAK mode so that we can detect key presses. */ +#if defined (NO_TTY_DRIVER) +void +rl_prep_terminal (int meta_flag) +{ + _rl_echoing_p = 1; +} + +void +rl_deprep_terminal (void) +{ +} + +#else /* ! NO_TTY_DRIVER */ +void +rl_prep_terminal (int meta_flag) +{ + int tty, nprep; + TIOTYPE tio; + + if (terminal_prepped) + return; + + /* Try to keep this function from being INTerrupted. */ + _rl_block_sigint (); + + tty = rl_instream ? fileno (rl_instream) : fileno (stdin); + + if (get_tty_settings (tty, &tio) < 0) + { +#if defined (ENOTSUP) + /* MacOS X and Linux, at least, lie about the value of errno if + tcgetattr fails. */ + if (errno == ENOTTY || errno == EINVAL || errno == ENOTSUP) +#else + if (errno == ENOTTY || errno == EINVAL) +#endif + _rl_echoing_p = 1; /* XXX */ + + _rl_release_sigint (); + return; + } + + otio = tio; + + if (_rl_bind_stty_chars) + { +#if defined (VI_MODE) + /* If editing in vi mode, make sure we restore the bindings in the + insertion keymap no matter what keymap we ended up in. */ + if (rl_editing_mode == vi_mode) + rl_tty_unset_default_bindings (vi_insertion_keymap); + else +#endif + rl_tty_unset_default_bindings (_rl_keymap); + } + save_tty_chars (&otio); + RL_SETSTATE(RL_STATE_TTYCSAVED); + if (_rl_bind_stty_chars) + { +#if defined (VI_MODE) + /* If editing in vi mode, make sure we set the bindings in the + insertion keymap no matter what keymap we ended up in. */ + if (rl_editing_mode == vi_mode) + _rl_bind_tty_special_chars (vi_insertion_keymap, tio); + else +#endif + _rl_bind_tty_special_chars (_rl_keymap, tio); + } + + prepare_terminal_settings (meta_flag, otio, &tio); + + if (set_tty_settings (tty, &tio) < 0) + { + _rl_release_sigint (); + return; + } + + if (_rl_enable_keypad) + _rl_control_keypad (1); + + nprep = TPX_PREPPED; + + if (_rl_enable_bracketed_paste) + { + fprintf (rl_outstream, BRACK_PASTE_INIT); + nprep |= TPX_BRACKPASTE; + } + + fflush (rl_outstream); + terminal_prepped = nprep; + RL_SETSTATE(RL_STATE_TERMPREPPED); + + _rl_release_sigint (); +} + +/* Restore the terminal's normal settings and modes. */ +void +rl_deprep_terminal (void) +{ + int tty; + + if (terminal_prepped == 0) + return; + + /* Try to keep this function from being interrupted. */ + _rl_block_sigint (); + + tty = rl_instream ? fileno (rl_instream) : fileno (stdin); + + if (terminal_prepped & TPX_BRACKPASTE) + { + fprintf (rl_outstream, BRACK_PASTE_FINI); + if (_rl_eof_found) + fprintf (rl_outstream, "\n"); + } + + if (_rl_enable_keypad) + _rl_control_keypad (0); + + fflush (rl_outstream); + + if (set_tty_settings (tty, &otio) < 0) + { + _rl_release_sigint (); + return; + } + + terminal_prepped = 0; + RL_UNSETSTATE(RL_STATE_TERMPREPPED); + + _rl_release_sigint (); +} +#endif /* !NO_TTY_DRIVER */ + +/* Set readline's idea of whether or not it is echoing output to the terminal, + returning the old value. */ +int +rl_tty_set_echoing (int u) +{ + int o; + + o = _rl_echoing_p; + _rl_echoing_p = u; + return o; +} + +/* **************************************************************** */ +/* */ +/* Bogus Flow Control */ +/* */ +/* **************************************************************** */ + +int +rl_restart_output (int count, int key) +{ +#if defined (__MINGW32__) + return 0; +#else /* !__MING32__ */ + + int fildes = fileno (rl_outstream); +#if defined (TIOCSTART) +#if defined (apollo) + ioctl (&fildes, TIOCSTART, 0); +#else + ioctl (fildes, TIOCSTART, 0); +#endif /* apollo */ + +#else /* !TIOCSTART */ +# if defined (TERMIOS_TTY_DRIVER) +# if defined (__ksr1__) + if (ksrflow) + { + ksrflow = 0; + tcflow (fildes, TCOON); + } +# else /* !ksr1 */ + tcflow (fildes, TCOON); /* Simulate a ^Q. */ +# endif /* !ksr1 */ +# else /* !TERMIOS_TTY_DRIVER */ +# if defined (TCXONC) + ioctl (fildes, TCXONC, TCOON); +# endif /* TCXONC */ +# endif /* !TERMIOS_TTY_DRIVER */ +#endif /* !TIOCSTART */ + + return 0; +#endif /* !__MINGW32__ */ +} + +int +rl_stop_output (int count, int key) +{ +#if defined (__MINGW32__) + return 0; +#else + + int fildes = fileno (rl_instream); + +#if defined (TIOCSTOP) +# if defined (apollo) + ioctl (&fildes, TIOCSTOP, 0); +# else + ioctl (fildes, TIOCSTOP, 0); +# endif /* apollo */ +#else /* !TIOCSTOP */ +# if defined (TERMIOS_TTY_DRIVER) +# if defined (__ksr1__) + ksrflow = 1; +# endif /* ksr1 */ + tcflow (fildes, TCOOFF); +# else +# if defined (TCXONC) + ioctl (fildes, TCXONC, TCOON); +# endif /* TCXONC */ +# endif /* !TERMIOS_TTY_DRIVER */ +#endif /* !TIOCSTOP */ + + return 0; +#endif /* !__MINGW32__ */ +} + +/* **************************************************************** */ +/* */ +/* Default Key Bindings */ +/* */ +/* **************************************************************** */ + +#if !defined (NO_TTY_DRIVER) +#define SET_SPECIAL(sc, func) set_special_char(kmap, &ttybuff, sc, func) +#endif + +#if defined (NO_TTY_DRIVER) + +#define SET_SPECIAL(sc, func) +#define RESET_SPECIAL(c) + +#elif defined (NEW_TTY_DRIVER) +static void +set_special_char (Keymap kmap, TIOTYPE *tiop, int sc, rl_command_func_t *func) +{ + if (sc != -1 && kmap[(unsigned char)sc].type == ISFUNC) + kmap[(unsigned char)sc].function = func; +} + +#define RESET_SPECIAL(c) \ + if (c != -1 && kmap[(unsigned char)c].type == ISFUNC) \ + kmap[(unsigned char)c].function = rl_insert; + +static void +_rl_bind_tty_special_chars (Keymap kmap, TIOTYPE ttybuff) +{ + if (ttybuff.flags & SGTTY_SET) + { + SET_SPECIAL (ttybuff.sgttyb.sg_erase, rl_rubout); + SET_SPECIAL (ttybuff.sgttyb.sg_kill, rl_unix_line_discard); + } + +# if defined (TIOCGLTC) + if (ttybuff.flags & LTCHARS_SET) + { + SET_SPECIAL (ttybuff.ltchars.t_werasc, rl_unix_word_rubout); + SET_SPECIAL (ttybuff.ltchars.t_lnextc, rl_quoted_insert); + } +# endif /* TIOCGLTC */ +} + +#else /* !NEW_TTY_DRIVER */ +static void +set_special_char (Keymap kmap, TIOTYPE *tiop, int sc, rl_command_func_t *func) +{ + unsigned char uc; + + uc = tiop->c_cc[sc]; + if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) + kmap[uc].function = func; +} + +/* used later */ +#define RESET_SPECIAL(uc) \ + if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) \ + kmap[uc].function = rl_insert; + +static void +_rl_bind_tty_special_chars (Keymap kmap, TIOTYPE ttybuff) +{ + SET_SPECIAL (VERASE, rl_rubout); + SET_SPECIAL (VKILL, rl_unix_line_discard); + +# if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER) + SET_SPECIAL (VLNEXT, rl_quoted_insert); +# endif /* VLNEXT && TERMIOS_TTY_DRIVER */ + +# if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER) +# if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + SET_SPECIAL (VWERASE, rl_vi_unix_word_rubout); + else +# endif + SET_SPECIAL (VWERASE, rl_unix_word_rubout); +# endif /* VWERASE && TERMIOS_TTY_DRIVER */ +} + +#endif /* !NEW_TTY_DRIVER */ + +/* Set the system's default editing characters to their readline equivalents + in KMAP. Should be static, now that we have rl_tty_set_default_bindings. */ +void +rltty_set_default_bindings (Keymap kmap) +{ +#if !defined (NO_TTY_DRIVER) + TIOTYPE ttybuff; + int tty; + + tty = fileno (rl_instream); + + if (get_tty_settings (tty, &ttybuff) == 0) + _rl_bind_tty_special_chars (kmap, ttybuff); +#endif +} + +/* New public way to set the system default editing chars to their readline + equivalents. */ +void +rl_tty_set_default_bindings (Keymap kmap) +{ + rltty_set_default_bindings (kmap); +} + +/* Rebind all of the tty special chars that readline worries about back + to self-insert. Call this before saving the current terminal special + chars with save_tty_chars(). This only works on POSIX termios or termio + systems. */ +void +rl_tty_unset_default_bindings (Keymap kmap) +{ + /* Don't bother before we've saved the tty special chars at least once. */ + if (RL_ISSTATE(RL_STATE_TTYCSAVED) == 0) + return; + + RESET_SPECIAL (_rl_tty_chars.t_erase); + RESET_SPECIAL (_rl_tty_chars.t_kill); + +# if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER) + RESET_SPECIAL (_rl_tty_chars.t_lnext); +# endif /* VLNEXT && TERMIOS_TTY_DRIVER */ + +# if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER) + RESET_SPECIAL (_rl_tty_chars.t_werase); +# endif /* VWERASE && TERMIOS_TTY_DRIVER */ +} + +#if defined (HANDLE_SIGNALS) + +#if defined (NEW_TTY_DRIVER) || defined (NO_TTY_DRIVER) +int +_rl_disable_tty_signals (void) +{ + return 0; +} + +int +_rl_restore_tty_signals (void) +{ + return 0; +} +#else + +static TIOTYPE sigstty, nosigstty; +static int tty_sigs_disabled = 0; + +int +_rl_disable_tty_signals (void) +{ + if (tty_sigs_disabled) + return 0; + + if (_get_tty_settings (fileno (rl_instream), &sigstty) < 0) + return -1; + + nosigstty = sigstty; + + nosigstty.c_lflag &= ~ISIG; + nosigstty.c_iflag &= ~IXON; + + if (_set_tty_settings (fileno (rl_instream), &nosigstty) < 0) + return (_set_tty_settings (fileno (rl_instream), &sigstty)); + + tty_sigs_disabled = 1; + return 0; +} + +int +_rl_restore_tty_signals (void) +{ + int r; + + if (tty_sigs_disabled == 0) + return 0; + + r = _set_tty_settings (fileno (rl_instream), &sigstty); + + if (r == 0) + tty_sigs_disabled = 0; + + return r; +} +#endif /* !NEW_TTY_DRIVER */ + +#endif /* HANDLE_SIGNALS */ diff --git a/bash-5.1/lib/readline/rltty.h b/bash-5.1/lib/readline/rltty.h new file mode 100644 index 0000000000000000000000000000000000000000..5bcc946b270a4d079c11809895073c28443e7a44 --- /dev/null +++ b/bash-5.1/lib/readline/rltty.h @@ -0,0 +1,80 @@ +/* rltty.h - tty driver-related definitions used by some library files. */ + +/* Copyright (C) 1995-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RLTTY_H_) +#define _RLTTY_H_ + +/* Posix systems use termios and the Posix signal functions. */ +#if defined (TERMIOS_TTY_DRIVER) +# include +#endif /* TERMIOS_TTY_DRIVER */ + +/* System V machines use termio. */ +#if defined (TERMIO_TTY_DRIVER) +# include +# if !defined (TCOON) +# define TCOON 1 +# endif +#endif /* TERMIO_TTY_DRIVER */ + +/* Other (BSD) machines use sgtty. */ +#if defined (NEW_TTY_DRIVER) +# include +#endif + +#include "rlwinsize.h" + +/* Define _POSIX_VDISABLE if we are not using the `new' tty driver and + it is not already defined. It is used both to determine if a + special character is disabled and to disable certain special + characters. Posix systems should set to 0, USG systems to -1. */ +#if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE) +# if defined (_SVR4_VDISABLE) +# define _POSIX_VDISABLE _SVR4_VDISABLE +# else +# if defined (_POSIX_VERSION) +# define _POSIX_VDISABLE 0 +# else /* !_POSIX_VERSION */ +# define _POSIX_VDISABLE -1 +# endif /* !_POSIX_VERSION */ +# endif /* !_SVR4_DISABLE */ +#endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */ + +typedef struct _rl_tty_chars { + unsigned char t_eof; + unsigned char t_eol; + unsigned char t_eol2; + unsigned char t_erase; + unsigned char t_werase; + unsigned char t_kill; + unsigned char t_reprint; + unsigned char t_intr; + unsigned char t_quit; + unsigned char t_susp; + unsigned char t_dsusp; + unsigned char t_start; + unsigned char t_stop; + unsigned char t_lnext; + unsigned char t_flush; + unsigned char t_status; +} _RL_TTY_CHARS; + +#endif /* _RLTTY_H_ */ diff --git a/bash-5.1/lib/readline/rltypedefs.h b/bash-5.1/lib/readline/rltypedefs.h new file mode 100644 index 0000000000000000000000000000000000000000..f9f5cd3a5b64d8b1a64c6eeaf6c17ddba1f7e6ff --- /dev/null +++ b/bash-5.1/lib/readline/rltypedefs.h @@ -0,0 +1,100 @@ +/* rltypedefs.h -- Type declarations for readline functions. */ + +/* Copyright (C) 2000-2011 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#ifndef _RL_TYPEDEFS_H_ +#define _RL_TYPEDEFS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Old-style, attempt to mark as deprecated in some way people will notice. */ + +#if !defined (_FUNCTION_DEF) +# define _FUNCTION_DEF + +#if defined(__GNUC__) || defined(__clang__) +typedef int Function () __attribute__ ((deprecated)); +typedef void VFunction () __attribute__ ((deprecated)); +typedef char *CPFunction () __attribute__ ((deprecated)); +typedef char **CPPFunction () __attribute__ ((deprecated)); +#else +typedef int Function (); +typedef void VFunction (); +typedef char *CPFunction (); +typedef char **CPPFunction (); +#endif + +#endif /* _FUNCTION_DEF */ + +/* New style. */ + +#if !defined (_RL_FUNCTION_TYPEDEF) +# define _RL_FUNCTION_TYPEDEF + +/* Bindable functions */ +typedef int rl_command_func_t PARAMS((int, int)); + +/* Typedefs for the completion system */ +typedef char *rl_compentry_func_t PARAMS((const char *, int)); +typedef char **rl_completion_func_t PARAMS((const char *, int, int)); + +typedef char *rl_quote_func_t PARAMS((char *, int, char *)); +typedef char *rl_dequote_func_t PARAMS((char *, int)); + +typedef int rl_compignore_func_t PARAMS((char **)); + +typedef void rl_compdisp_func_t PARAMS((char **, int, int)); + +/* Type for input and pre-read hook functions like rl_event_hook */ +typedef int rl_hook_func_t PARAMS((void)); + +/* Input function type */ +typedef int rl_getc_func_t PARAMS((FILE *)); + +/* Generic function that takes a character buffer (which could be the readline + line buffer) and an index into it (which could be rl_point) and returns + an int. */ +typedef int rl_linebuf_func_t PARAMS((char *, int)); + +/* `Generic' function pointer typedefs */ +typedef int rl_intfunc_t PARAMS((int)); +#define rl_ivoidfunc_t rl_hook_func_t +typedef int rl_icpfunc_t PARAMS((char *)); +typedef int rl_icppfunc_t PARAMS((char **)); + +typedef void rl_voidfunc_t PARAMS((void)); +typedef void rl_vintfunc_t PARAMS((int)); +typedef void rl_vcpfunc_t PARAMS((char *)); +typedef void rl_vcppfunc_t PARAMS((char **)); + +typedef char *rl_cpvfunc_t PARAMS((void)); +typedef char *rl_cpifunc_t PARAMS((int)); +typedef char *rl_cpcpfunc_t PARAMS((char *)); +typedef char *rl_cpcppfunc_t PARAMS((char **)); + +#endif /* _RL_FUNCTION_TYPEDEF */ + +#ifdef __cplusplus +} +#endif + +#endif /* _RL_TYPEDEFS_H_ */ diff --git a/bash-5.1/lib/readline/rlwinsize.h b/bash-5.1/lib/readline/rlwinsize.h new file mode 100644 index 0000000000000000000000000000000000000000..d198fcf87232f68fba0e26ee218b5d4f2a4dec05 --- /dev/null +++ b/bash-5.1/lib/readline/rlwinsize.h @@ -0,0 +1,58 @@ +/* rlwinsize.h -- an attempt to isolate some of the system-specific defines + for `struct winsize' and TIOCGWINSZ. */ + +/* Copyright (C) 1997-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RLWINSIZE_H_) +#define _RLWINSIZE_H_ + +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif + +/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ + +#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) +# include +#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ + +#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) +# include +#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ + +/* Not in either of the standard places, look around. */ +#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) +# if defined (HAVE_SYS_STREAM_H) +# include +# endif /* HAVE_SYS_STREAM_H */ +# if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */ +# include +# define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */ +# endif /* HAVE_SYS_PTEM_H */ +# if defined (HAVE_SYS_PTE_H) /* ??? */ +# include +# endif /* HAVE_SYS_PTE_H */ +#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ + +#if defined (M_UNIX) && !defined (_SCO_DS) && !defined (tcflow) +# define tcflow(fd, action) ioctl(fd, TCXONC, action) +#endif + +#endif /* _RL_WINSIZE_H */ diff --git a/bash-5.1/lib/readline/savestring.c b/bash-5.1/lib/readline/savestring.c new file mode 100644 index 0000000000000000000000000000000000000000..f4bb6aa1a957832d65af73c43543ebba0ba3a157 --- /dev/null +++ b/bash-5.1/lib/readline/savestring.c @@ -0,0 +1,40 @@ +/* savestring.c - function version of savestring for backwards compatibility */ + +/* Copyright (C) 1998,2003,2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#include +#ifdef HAVE_STRING_H +# include +#endif +#include "xmalloc.h" + +/* Backwards compatibility, now that savestring has been removed from + all `public' readline header files. */ +char * +savestring (const char *s) +{ + char *ret; + + ret = (char *)xmalloc (strlen (s) + 1); + strcpy (ret, s); + return ret; +} diff --git a/bash-5.1/lib/readline/search.c b/bash-5.1/lib/readline/search.c new file mode 100644 index 0000000000000000000000000000000000000000..38a29361d7020897ebbc7cea7d7eeb4559223359 --- /dev/null +++ b/bash-5.1/lib/readline/search.c @@ -0,0 +1,695 @@ +/* search.c - code for non-incremental searching in emacs and vi modes. */ + +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif + +#include "rldefs.h" +#include "rlmbutil.h" + +#include "readline.h" +#include "history.h" +#include "histlib.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +#ifdef abs +# undef abs +#endif +#define abs(x) (((x) >= 0) ? (x) : -(x)) + +_rl_search_cxt *_rl_nscxt = 0; + +extern HIST_ENTRY *_rl_saved_line_for_history; + +/* Functions imported from the rest of the library. */ +extern void _rl_free_history_entry PARAMS((HIST_ENTRY *)); + +static char *noninc_search_string = (char *) NULL; +static int noninc_history_pos; + +static char *prev_line_found = (char *) NULL; + +static int rl_history_search_len; +static int rl_history_search_pos; +static int rl_history_search_flags; + +static char *history_search_string; +static int history_string_size; + +static void make_history_line_current PARAMS((HIST_ENTRY *)); +static int noninc_search_from_pos PARAMS((char *, int, int, int, int *)); +static int noninc_dosearch PARAMS((char *, int, int)); +static int noninc_search PARAMS((int, int)); +static int rl_history_search_internal PARAMS((int, int)); +static void rl_history_search_reinit PARAMS((int)); + +static _rl_search_cxt *_rl_nsearch_init PARAMS((int, int)); +static void _rl_nsearch_abort PARAMS((_rl_search_cxt *)); +static int _rl_nsearch_dispatch PARAMS((_rl_search_cxt *, int)); + +/* Make the data from the history entry ENTRY be the contents of the + current line. This doesn't do anything with rl_point; the caller + must set it. */ +static void +make_history_line_current (HIST_ENTRY *entry) +{ + _rl_replace_text (entry->line, 0, rl_end); + _rl_fix_point (1); +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + /* POSIX.2 says that the `U' command doesn't affect the copy of any + command lines to the edit line. We're going to implement that by + making the undo list start after the matching line is copied to the + current editing buffer. */ + rl_free_undo_list (); +#endif + + if (_rl_saved_line_for_history) + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; +} + +/* Search the history list for STRING starting at absolute history position + POS. If STRING begins with `^', the search must match STRING at the + beginning of a history line, otherwise a full substring match is performed + for STRING. DIR < 0 means to search backwards through the history list, + DIR >= 0 means to search forward. */ +static int +noninc_search_from_pos (char *string, int pos, int dir, int flags, int *ncp) +{ + int ret, old, sflags; + char *s; + + if (pos < 0) + return -1; + + old = where_history (); + if (history_set_pos (pos) == 0) + return -1; + + RL_SETSTATE(RL_STATE_SEARCH); + /* These functions return the match offset in the line; history_offset gives + the matching line in the history list */ + if (flags & SF_PATTERN) + { + s = string; + sflags = 0; /* Non-anchored search */ + if (*s == '^') + { + sflags |= ANCHORED_SEARCH; + s++; + } + ret = _hs_history_patsearch (s, dir, sflags); + } + else if (*string == '^') + ret = history_search_prefix (string + 1, dir); + else + ret = history_search (string, dir); + RL_UNSETSTATE(RL_STATE_SEARCH); + + if (ncp) + *ncp = ret; /* caller will catch -1 to indicate no-op */ + + if (ret != -1) + ret = where_history (); + + history_set_pos (old); + return (ret); +} + +/* Search for a line in the history containing STRING. If DIR is < 0, the + search is backwards through previous entries, else through subsequent + entries. Returns 1 if the search was successful, 0 otherwise. */ +static int +noninc_dosearch (char *string, int dir, int flags) +{ + int oldpos, pos, ind; + HIST_ENTRY *entry; + + if (string == 0 || *string == '\0' || noninc_history_pos < 0) + { + rl_ding (); + return 0; + } + + pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir, flags, &ind); + if (pos == -1) + { + /* Search failed, current history position unchanged. */ + rl_maybe_unsave_line (); + rl_clear_message (); + rl_point = 0; + rl_ding (); + return 0; + } + + noninc_history_pos = pos; + + oldpos = where_history (); + history_set_pos (noninc_history_pos); + entry = current_history (); /* will never be NULL after successful search */ + +#if defined (VI_MODE) + if (rl_editing_mode != vi_mode) +#endif + history_set_pos (oldpos); + + make_history_line_current (entry); + + if (_rl_enable_active_region && ((flags & SF_PATTERN) == 0) && ind > 0 && ind < rl_end) + { + rl_point = ind; + rl_mark = ind + strlen (string); + if (rl_mark > rl_end) + rl_mark = rl_end; /* can't happen? */ + rl_activate_mark (); + } + else + { + rl_point = 0; + rl_mark = rl_end; + } + + rl_clear_message (); + return 1; +} + +static _rl_search_cxt * +_rl_nsearch_init (int dir, int pchar) +{ + _rl_search_cxt *cxt; + char *p; + + cxt = _rl_scxt_alloc (RL_SEARCH_NSEARCH, 0); + if (dir < 0) + cxt->sflags |= SF_REVERSE; /* not strictly needed */ +#if defined (VI_MODE) + if (VI_COMMAND_MODE() && (pchar == '?' || pchar == '/')) + cxt->sflags |= SF_PATTERN; +#endif + + cxt->direction = dir; + cxt->history_pos = cxt->save_line; + + rl_maybe_save_line (); + + /* Clear the undo list, since reading the search string should create its + own undo list, and the whole list will end up being freed when we + finish reading the search string. */ + rl_undo_list = 0; + + /* Use the line buffer to read the search string. */ + rl_line_buffer[0] = 0; + rl_end = rl_point = 0; + + p = _rl_make_prompt_for_search (pchar ? pchar : ':'); + rl_message ("%s", p); + xfree (p); + + RL_SETSTATE(RL_STATE_NSEARCH); + + _rl_nscxt = cxt; + + return cxt; +} + +int +_rl_nsearch_cleanup (_rl_search_cxt *cxt, int r) +{ + _rl_scxt_dispose (cxt, 0); + _rl_nscxt = 0; + + RL_UNSETSTATE(RL_STATE_NSEARCH); + + return (r != 1); +} + +static void +_rl_nsearch_abort (_rl_search_cxt *cxt) +{ + rl_maybe_unsave_line (); + rl_clear_message (); + rl_point = cxt->save_point; + rl_mark = cxt->save_mark; + _rl_fix_point (1); + rl_restore_prompt (); + + RL_UNSETSTATE (RL_STATE_NSEARCH); +} + +/* Process just-read character C according to search context CXT. Return -1 + if the caller should abort the search, 0 if we should break out of the + loop, and 1 if we should continue to read characters. */ +static int +_rl_nsearch_dispatch (_rl_search_cxt *cxt, int c) +{ + int n; + + if (c < 0) + c = CTRL ('C'); + + switch (c) + { + case CTRL('W'): + rl_unix_word_rubout (1, c); + break; + + case CTRL('U'): + rl_unix_line_discard (1, c); + break; + + case RETURN: + case NEWLINE: + return 0; + + case CTRL('H'): + case RUBOUT: + if (rl_point == 0) + { + _rl_nsearch_abort (cxt); + return -1; + } + _rl_rubout_char (1, c); + break; + + case CTRL('C'): + case CTRL('G'): + rl_ding (); + _rl_nsearch_abort (cxt); + return -1; + + case ESC: + /* XXX - experimental code to allow users to bracketed-paste into the + search string. Similar code is in isearch.c:_rl_isearch_dispatch(). + The difference here is that the bracketed paste sometimes doesn't + paste everything, so checking for the prefix and the suffix in the + input queue doesn't work well. We just have to check to see if the + number of chars in the input queue is enough for the bracketed paste + prefix and hope for the best. */ + if (_rl_enable_bracketed_paste && ((n = _rl_nchars_available ()) >= (BRACK_PASTE_SLEN-1))) + { + if (_rl_read_bracketed_paste_prefix (c) == 1) + rl_bracketed_paste_begin (1, c); + else + { + c = rl_read_key (); /* get the ESC that got pushed back */ + _rl_insert_char (1, c); + } + } + else + _rl_insert_char (1, c); + break; + + default: +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_insert_text (cxt->mb); + else +#endif + _rl_insert_char (1, c); + break; + } + + (*rl_redisplay_function) (); + rl_deactivate_mark (); + return 1; +} + +/* Perform one search according to CXT, using NONINC_SEARCH_STRING. Return + -1 if the search should be aborted, any other value means to clean up + using _rl_nsearch_cleanup (). Returns 1 if the search was successful, + 0 otherwise. */ +static int +_rl_nsearch_dosearch (_rl_search_cxt *cxt) +{ + rl_mark = cxt->save_mark; + + /* If rl_point == 0, we want to re-use the previous search string and + start from the saved history position. If there's no previous search + string, punt. */ + if (rl_point == 0) + { + if (noninc_search_string == 0) + { + rl_ding (); + rl_restore_prompt (); + RL_UNSETSTATE (RL_STATE_NSEARCH); + return -1; + } + } + else + { + /* We want to start the search from the current history position. */ + noninc_history_pos = cxt->save_line; + FREE (noninc_search_string); + noninc_search_string = savestring (rl_line_buffer); + + /* If we don't want the subsequent undo list generated by the search + matching a history line to include the contents of the search string, + we need to clear rl_line_buffer here. For now, we just clear the + undo list generated by reading the search string. (If the search + fails, the old undo list will be restored by rl_maybe_unsave_line.) */ + rl_free_undo_list (); + } + + rl_restore_prompt (); + return (noninc_dosearch (noninc_search_string, cxt->direction, cxt->sflags&SF_PATTERN)); +} + +/* Search non-interactively through the history list. DIR < 0 means to + search backwards through the history of previous commands; otherwise + the search is for commands subsequent to the current position in the + history list. PCHAR is the character to use for prompting when reading + the search string; if not specified (0), it defaults to `:'. */ +static int +noninc_search (int dir, int pchar) +{ + _rl_search_cxt *cxt; + int c, r; + + cxt = _rl_nsearch_init (dir, pchar); + + if (RL_ISSTATE (RL_STATE_CALLBACK)) + return (0); + + /* Read the search string. */ + r = 0; + while (1) + { + c = _rl_search_getchar (cxt); + + if (c < 0) + { + _rl_nsearch_abort (cxt); + return 1; + } + + if (c == 0) + break; + + r = _rl_nsearch_dispatch (cxt, c); + if (r < 0) + return 1; + else if (r == 0) + break; + } + + r = _rl_nsearch_dosearch (cxt); + return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1)); +} + +/* Search forward through the history list for a string. If the vi-mode + code calls this, KEY will be `?'. */ +int +rl_noninc_forward_search (int count, int key) +{ + return noninc_search (1, (key == '?') ? '?' : 0); +} + +/* Reverse search the history list for a string. If the vi-mode code + calls this, KEY will be `/'. */ +int +rl_noninc_reverse_search (int count, int key) +{ + return noninc_search (-1, (key == '/') ? '/' : 0); +} + +/* Search forward through the history list for the last string searched + for. If there is no saved search string, abort. If the vi-mode code + calls this, KEY will be `N'. */ +int +rl_noninc_forward_search_again (int count, int key) +{ + int r; + + if (!noninc_search_string) + { + rl_ding (); + return (1); + } +#if defined (VI_MODE) + if (VI_COMMAND_MODE() && key == 'N') + r = noninc_dosearch (noninc_search_string, 1, SF_PATTERN); + else +#endif + r = noninc_dosearch (noninc_search_string, 1, 0); + return (r != 1); +} + +/* Reverse search in the history list for the last string searched + for. If there is no saved search string, abort. If the vi-mode code + calls this, KEY will be `n'. */ +int +rl_noninc_reverse_search_again (int count, int key) +{ + int r; + + if (!noninc_search_string) + { + rl_ding (); + return (1); + } +#if defined (VI_MODE) + if (VI_COMMAND_MODE() && key == 'n') + r = noninc_dosearch (noninc_search_string, -1, SF_PATTERN); + else +#endif + r = noninc_dosearch (noninc_search_string, -1, 0); + return (r != 1); +} + +#if defined (READLINE_CALLBACKS) +int +_rl_nsearch_callback (_rl_search_cxt *cxt) +{ + int c, r; + + c = _rl_search_getchar (cxt); + if (c <= 0) + { + if (c < 0) + _rl_nsearch_abort (cxt); + return 1; + } + r = _rl_nsearch_dispatch (cxt, c); + if (r != 0) + return 1; + + r = _rl_nsearch_dosearch (cxt); + return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1)); +} +#endif + +static int +rl_history_search_internal (int count, int dir) +{ + HIST_ENTRY *temp; + int ret, oldpos, newcol; + char *t; + + rl_maybe_save_line (); + temp = (HIST_ENTRY *)NULL; + + /* Search COUNT times through the history for a line matching + history_search_string. If history_search_string[0] == '^', the + line must match from the start; otherwise any substring can match. + When this loop finishes, TEMP, if non-null, is the history line to + copy into the line buffer. */ + while (count) + { + RL_CHECK_SIGNALS (); + ret = noninc_search_from_pos (history_search_string, rl_history_search_pos + dir, dir, 0, &newcol); + if (ret == -1) + break; + + /* Get the history entry we found. */ + rl_history_search_pos = ret; + oldpos = where_history (); + history_set_pos (rl_history_search_pos); + temp = current_history (); /* will never be NULL after successful search */ + history_set_pos (oldpos); + + /* Don't find multiple instances of the same line. */ + if (prev_line_found && STREQ (prev_line_found, temp->line)) + continue; + prev_line_found = temp->line; + count--; + } + + /* If we didn't find anything at all, return. */ + if (temp == 0) + { + rl_maybe_unsave_line (); + rl_ding (); + /* If you don't want the saved history line (last match) to show up + in the line buffer after the search fails, change the #if 0 to + #if 1 */ +#if 0 + if (rl_point > rl_history_search_len) + { + rl_point = rl_end = rl_history_search_len; + rl_line_buffer[rl_end] = '\0'; + rl_mark = 0; + } +#else + rl_point = rl_history_search_len; /* rl_maybe_unsave_line changes it */ + rl_mark = rl_end; +#endif + return 1; + } + + /* Copy the line we found into the current line buffer. */ + make_history_line_current (temp); + + /* decide where to put rl_point -- need to change this for pattern search */ + if (rl_history_search_flags & ANCHORED_SEARCH) + rl_point = rl_history_search_len; /* easy case */ + else + { +#if 0 + t = strstr (rl_line_buffer, history_search_string); /* XXX */ + rl_point = t ? (int)(t - rl_line_buffer) + rl_history_search_len : rl_end; +#else + rl_point = (newcol >= 0) ? newcol : rl_end; +#endif + } + rl_mark = rl_end; + + return 0; +} + +static void +rl_history_search_reinit (int flags) +{ + int sind; + + rl_history_search_pos = where_history (); + rl_history_search_len = rl_point; + rl_history_search_flags = flags; + + prev_line_found = (char *)NULL; + if (rl_point) + { + /* Allocate enough space for anchored and non-anchored searches */ + if (rl_history_search_len >= history_string_size - 2) + { + history_string_size = rl_history_search_len + 2; + history_search_string = (char *)xrealloc (history_search_string, history_string_size); + } + sind = 0; + if (flags & ANCHORED_SEARCH) + history_search_string[sind++] = '^'; + strncpy (history_search_string + sind, rl_line_buffer, rl_point); + history_search_string[rl_point + sind] = '\0'; + } + _rl_free_saved_history_line (); +} + +/* Search forward in the history for the string of characters + from the start of the line to rl_point. This is a non-incremental + search. The search is anchored to the beginning of the history line. */ +int +rl_history_search_forward (int count, int ignore) +{ + if (count == 0) + return (0); + + if (rl_last_func != rl_history_search_forward && + rl_last_func != rl_history_search_backward) + rl_history_search_reinit (ANCHORED_SEARCH); + + if (rl_history_search_len == 0) + return (rl_get_next_history (count, ignore)); + return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1)); +} + +/* Search backward through the history for the string of characters + from the start of the line to rl_point. This is a non-incremental + search. */ +int +rl_history_search_backward (int count, int ignore) +{ + if (count == 0) + return (0); + + if (rl_last_func != rl_history_search_forward && + rl_last_func != rl_history_search_backward) + rl_history_search_reinit (ANCHORED_SEARCH); + + if (rl_history_search_len == 0) + return (rl_get_previous_history (count, ignore)); + return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1)); +} + +/* Search forward in the history for the string of characters + from the start of the line to rl_point. This is a non-incremental + search. The search succeeds if the search string is present anywhere + in the history line. */ +int +rl_history_substr_search_forward (int count, int ignore) +{ + if (count == 0) + return (0); + + if (rl_last_func != rl_history_substr_search_forward && + rl_last_func != rl_history_substr_search_backward) + rl_history_search_reinit (NON_ANCHORED_SEARCH); + + if (rl_history_search_len == 0) + return (rl_get_next_history (count, ignore)); + return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1)); +} + +/* Search backward through the history for the string of characters + from the start of the line to rl_point. This is a non-incremental + search. */ +int +rl_history_substr_search_backward (int count, int ignore) +{ + if (count == 0) + return (0); + + if (rl_last_func != rl_history_substr_search_forward && + rl_last_func != rl_history_substr_search_backward) + rl_history_search_reinit (NON_ANCHORED_SEARCH); + + if (rl_history_search_len == 0) + return (rl_get_previous_history (count, ignore)); + return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1)); +} diff --git a/bash-5.1/lib/readline/shell.c b/bash-5.1/lib/readline/shell.c new file mode 100644 index 0000000000000000000000000000000000000000..7fe2e97c983360641288ca4ecca254932c6bf053 --- /dev/null +++ b/bash-5.1/lib/readline/shell.c @@ -0,0 +1,214 @@ +/* shell.c -- readline utility functions that are normally provided by + bash when readline is linked as part of the shell. */ + +/* Copyright (C) 1997-2009,2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_STRING_H) +# include +#else +# include +#endif /* !HAVE_STRING_H */ + +#if defined (HAVE_LIMITS_H) +# include +#endif + +#if defined (HAVE_FCNTL_H) +#include +#endif +#if defined (HAVE_PWD_H) +#include +#endif + +#include + +#include "rlstdc.h" +#include "rlshell.h" +#include "rldefs.h" + +#include "xmalloc.h" + +#if defined (HAVE_GETPWUID) && !defined (HAVE_GETPW_DECLS) +extern struct passwd *getpwuid PARAMS((uid_t)); +#endif /* HAVE_GETPWUID && !HAVE_GETPW_DECLS */ + +#ifndef NULL +# define NULL 0 +#endif + +#ifndef CHAR_BIT +# define CHAR_BIT 8 +#endif + +/* Nonzero if the integer type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* Bound on length of the string representing an integer value of type T. + Subtract one for the sign bit if T is signed; + 302 / 1000 is log10 (2) rounded up; + add one for integer division truncation; + add one more for a minus sign if t is signed. */ +#define INT_STRLEN_BOUND(t) \ + ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \ + + 1 + TYPE_SIGNED (t)) + +/* All of these functions are resolved from bash if we are linking readline + as part of bash. */ + +/* Does shell-like quoting using single quotes. */ +char * +sh_single_quote (char *string) +{ + register int c; + char *result, *r, *s; + + result = (char *)xmalloc (3 + (4 * strlen (string))); + r = result; + *r++ = '\''; + + for (s = string; s && (c = *s); s++) + { + *r++ = c; + + if (c == '\'') + { + *r++ = '\\'; /* insert escaped single quote */ + *r++ = '\''; + *r++ = '\''; /* start new quoted string */ + } + } + + *r++ = '\''; + *r = '\0'; + + return (result); +} + +/* Set the environment variables LINES and COLUMNS to lines and cols, + respectively. */ +static char setenv_buf[INT_STRLEN_BOUND (int) + 1]; +static char putenv_buf1[INT_STRLEN_BOUND (int) + 6 + 1]; /* sizeof("LINES=") == 6 */ +static char putenv_buf2[INT_STRLEN_BOUND (int) + 8 + 1]; /* sizeof("COLUMNS=") == 8 */ + +void +sh_set_lines_and_columns (int lines, int cols) +{ +#if defined (HAVE_SETENV) + sprintf (setenv_buf, "%d", lines); + setenv ("LINES", setenv_buf, 1); + + sprintf (setenv_buf, "%d", cols); + setenv ("COLUMNS", setenv_buf, 1); +#else /* !HAVE_SETENV */ +# if defined (HAVE_PUTENV) + sprintf (putenv_buf1, "LINES=%d", lines); + putenv (putenv_buf1); + + sprintf (putenv_buf2, "COLUMNS=%d", cols); + putenv (putenv_buf2); +# endif /* HAVE_PUTENV */ +#endif /* !HAVE_SETENV */ +} + +char * +sh_get_env_value (const char *varname) +{ + return ((char *)getenv (varname)); +} + +char * +sh_get_home_dir (void) +{ + static char *home_dir = (char *)NULL; + struct passwd *entry; + + if (home_dir) + return (home_dir); + + home_dir = (char *)NULL; +#if defined (HAVE_GETPWUID) +# if defined (__TANDEM) + entry = getpwnam (getlogin ()); +# else + entry = getpwuid (getuid ()); +# endif + if (entry) + home_dir = savestring (entry->pw_dir); +#endif + +#if defined (HAVE_GETPWENT) + endpwent (); /* some systems need this */ +#endif + + return (home_dir); +} + +#if !defined (O_NDELAY) +# if defined (FNDELAY) +# define O_NDELAY FNDELAY +# endif +#endif + +int +sh_unset_nodelay_mode (int fd) +{ +#if defined (HAVE_FCNTL) + int flags, bflags; + + if ((flags = fcntl (fd, F_GETFL, 0)) < 0) + return -1; + + bflags = 0; + +#ifdef O_NONBLOCK + bflags |= O_NONBLOCK; +#endif + +#ifdef O_NDELAY + bflags |= O_NDELAY; +#endif + + if (flags & bflags) + { + flags &= ~bflags; + return (fcntl (fd, F_SETFL, flags)); + } +#endif + + return 0; +} diff --git a/bash-5.1/lib/readline/signals.c b/bash-5.1/lib/readline/signals.c new file mode 100644 index 0000000000000000000000000000000000000000..f9174ab8a0149a1a078553715643da4f49d20fef --- /dev/null +++ b/bash-5.1/lib/readline/signals.c @@ -0,0 +1,779 @@ +/* signals.c -- signal handling support for readline. */ + +/* Copyright (C) 1987-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include /* Just for NULL. Yuck. */ +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" + +#if defined (GWINSZ_IN_SYS_IOCTL) +# include +#endif /* GWINSZ_IN_SYS_IOCTL */ + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" + +#if defined (HANDLE_SIGNALS) + +#if !defined (RETSIGTYPE) +# if defined (VOID_SIGHANDLER) +# define RETSIGTYPE void +# else +# define RETSIGTYPE int +# endif /* !VOID_SIGHANDLER */ +#endif /* !RETSIGTYPE */ + +#if defined (VOID_SIGHANDLER) +# define SIGHANDLER_RETURN return +#else +# define SIGHANDLER_RETURN return (0) +#endif + +/* This typedef is equivalent to the one for Function; it allows us + to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */ +typedef RETSIGTYPE SigHandler (); + +#if defined (HAVE_POSIX_SIGNALS) +typedef struct sigaction sighandler_cxt; +# define rl_sigaction(s, nh, oh) sigaction(s, nh, oh) +#else +typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt; +# define sigemptyset(m) +#endif /* !HAVE_POSIX_SIGNALS */ + +#ifndef SA_RESTART +# define SA_RESTART 0 +#endif + +static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); +static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); +static void rl_maybe_restore_sighandler PARAMS((int, sighandler_cxt *)); + +static RETSIGTYPE rl_signal_handler PARAMS((int)); +static RETSIGTYPE _rl_handle_signal PARAMS((int)); + +/* Exported variables for use by applications. */ + +/* If non-zero, readline will install its own signal handlers for + SIGINT, SIGTERM, SIGHUP, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */ +int rl_catch_signals = 1; + +/* If non-zero, readline will install a signal handler for SIGWINCH. */ +#ifdef SIGWINCH +int rl_catch_sigwinch = 1; +#else +int rl_catch_sigwinch = 0; /* for the readline state struct in readline.c */ +#endif + +/* Private variables. */ +int volatile _rl_caught_signal = 0; /* should be sig_atomic_t, but that requires including everywhere */ + +/* If non-zero, print characters corresponding to received signals as long as + the user has indicated his desire to do so (_rl_echo_control_chars). */ +int _rl_echoctl = 0; + +int _rl_intr_char = 0; +int _rl_quit_char = 0; +int _rl_susp_char = 0; + +static int signals_set_flag; +static int sigwinch_set_flag; + +#if defined (HAVE_POSIX_SIGNALS) +sigset_t _rl_orig_sigset; +#endif /* !HAVE_POSIX_SIGNALS */ + +/* **************************************************************** */ +/* */ +/* Signal Handling */ +/* */ +/* **************************************************************** */ + +static sighandler_cxt old_int, old_term, old_hup, old_alrm, old_quit; +#if defined (SIGTSTP) +static sighandler_cxt old_tstp, old_ttou, old_ttin; +#endif +#if defined (SIGWINCH) +static sighandler_cxt old_winch; +#endif + +_rl_sigcleanup_func_t *_rl_sigcleanup; +void *_rl_sigcleanarg; + +/* Readline signal handler functions. */ + +/* Called from RL_CHECK_SIGNALS() macro to run signal handling code. */ +RETSIGTYPE +_rl_signal_handler (int sig) +{ + _rl_caught_signal = 0; /* XXX */ + +#if defined (SIGWINCH) + if (sig == SIGWINCH) + { + RL_SETSTATE(RL_STATE_SIGHANDLER); + + rl_resize_terminal (); + /* XXX - experimental for now */ + /* Call a signal hook because though we called the original signal handler + in rl_sigwinch_handler below, we will not resend the signal to + ourselves. */ + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); + + RL_UNSETSTATE(RL_STATE_SIGHANDLER); + } + else +#endif + _rl_handle_signal (sig); + + SIGHANDLER_RETURN; +} + +static RETSIGTYPE +rl_signal_handler (int sig) +{ + _rl_caught_signal = sig; + SIGHANDLER_RETURN; +} + +/* This is called to handle a signal when it is safe to do so (out of the + signal handler execution path). Called by _rl_signal_handler for all the + signals readline catches except SIGWINCH. */ +static RETSIGTYPE +_rl_handle_signal (int sig) +{ + int block_sig; + +#if defined (HAVE_POSIX_SIGNALS) + sigset_t set, oset; +#else /* !HAVE_POSIX_SIGNALS */ +# if defined (HAVE_BSD_SIGNALS) + long omask; +# else /* !HAVE_BSD_SIGNALS */ + sighandler_cxt dummy_cxt; /* needed for rl_set_sighandler call */ +# endif /* !HAVE_BSD_SIGNALS */ +#endif /* !HAVE_POSIX_SIGNALS */ + + RL_SETSTATE(RL_STATE_SIGHANDLER); + +#if !defined (HAVE_BSD_SIGNALS) && !defined (HAVE_POSIX_SIGNALS) + /* Since the signal will not be blocked while we are in the signal + handler, ignore it until rl_clear_signals resets the catcher. */ +# if defined (SIGALRM) + if (sig == SIGINT || sig == SIGALRM) +# else + if (sig == SIGINT) +# endif + rl_set_sighandler (sig, SIG_IGN, &dummy_cxt); +#endif /* !HAVE_BSD_SIGNALS && !HAVE_POSIX_SIGNALS */ + + /* If there's a sig cleanup function registered, call it and `deregister' + the cleanup function to avoid multiple calls */ + if (_rl_sigcleanup) + { + (*_rl_sigcleanup) (sig, _rl_sigcleanarg); + _rl_sigcleanup = 0; + _rl_sigcleanarg = 0; + } + +#if defined (HAVE_POSIX_SIGNALS) + /* Get the current set of blocked signals. If we want to block a signal for + the duration of the cleanup functions, make sure to add it to SET and + set block_sig = 1 (see the SIGHUP case below). */ + block_sig = 0; /* sentinel to block signals with sigprocmask */ + sigemptyset (&set); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set); +#endif + + switch (sig) + { + case SIGINT: + _rl_reset_completion_state (); + rl_free_line_state (); +#if defined (READLINE_CALLBACKS) + rl_callback_sigcleanup (); +#endif + + /* FALLTHROUGH */ + +#if defined (SIGTSTP) + case SIGTSTP: + case SIGTTIN: + case SIGTTOU: +# if defined (HAVE_POSIX_SIGNALS) + /* Block SIGTTOU so we can restore the terminal settings to something + sane without stopping on SIGTTOU if we have been placed into the + background. Even trying to get the current terminal pgrp with + tcgetpgrp() will generate SIGTTOU, so we don't bother. We still do + this even if we've been stopped on SIGTTOU, since we handle signals + when we have returned from the signal handler and the signal is no + longer blocked. */ + sigaddset (&set, SIGTTOU); + block_sig = 1; +# endif +#endif /* SIGTSTP */ + /* Any signals that should be blocked during cleanup should go here. */ +#if defined (SIGHUP) + case SIGHUP: +# if defined (_AIX) + if (block_sig == 0) + { + sigaddset (&set, sig); + block_sig = 1; + } +# endif // _AIX +#endif + /* Signals that don't require blocking during cleanup should go here. */ + case SIGTERM: +#if defined (SIGALRM) + case SIGALRM: +#endif +#if defined (SIGQUIT) + case SIGQUIT: +#endif + + if (block_sig) + sigprocmask (SIG_BLOCK, &set, &oset); + + rl_echo_signal_char (sig); + rl_cleanup_after_signal (); + + /* At this point, the application's signal handler, if any, is the + current handler. */ + +#if defined (HAVE_POSIX_SIGNALS) + /* Unblock any signal(s) blocked above */ + if (block_sig) + sigprocmask (SIG_UNBLOCK, &oset, (sigset_t *)NULL); +#endif + + /* We don't have to bother unblocking the signal because we are not + running in a signal handler context. */ +#if 0 +#if defined (HAVE_POSIX_SIGNALS) + /* Make sure this signal is not blocked when we resend it to the + calling application. */ + sigemptyset (&set); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set); + sigdelset (&set, sig); +#else /* !HAVE_POSIX_SIGNALS */ +# if defined (HAVE_BSD_SIGNALS) + omask = sigblock (0); +# endif /* HAVE_BSD_SIGNALS */ +#endif /* !HAVE_POSIX_SIGNALS */ +#endif + +#if defined (__EMX__) + signal (sig, SIG_ACK); +#endif + +#if defined (HAVE_KILL) + kill (getpid (), sig); +#else + raise (sig); /* assume we have raise */ +#endif + + /* We don't need to modify the signal mask now that this is not run in + a signal handler context. */ +#if 0 + /* Let the signal that we just sent through if it is blocked. */ +#if defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL); +#else /* !HAVE_POSIX_SIGNALS */ +# if defined (HAVE_BSD_SIGNALS) + sigsetmask (omask & ~(sigmask (sig))); +# endif /* HAVE_BSD_SIGNALS */ +#endif /* !HAVE_POSIX_SIGNALS */ +#endif + + rl_reset_after_signal (); + } + + RL_UNSETSTATE(RL_STATE_SIGHANDLER); + SIGHANDLER_RETURN; +} + +#if defined (SIGWINCH) +static RETSIGTYPE +rl_sigwinch_handler (int sig) +{ + SigHandler *oh; + +#if defined (MUST_REINSTALL_SIGHANDLERS) + sighandler_cxt dummy_winch; + + /* We don't want to change old_winch -- it holds the state of SIGWINCH + disposition set by the calling application. We need this state + because we call the application's SIGWINCH handler after updating + our own idea of the screen size. */ + rl_set_sighandler (SIGWINCH, rl_sigwinch_handler, &dummy_winch); +#endif + + RL_SETSTATE(RL_STATE_SIGHANDLER); + _rl_caught_signal = sig; + + /* If another sigwinch handler has been installed, call it. */ + oh = (SigHandler *)old_winch.sa_handler; + if (oh && oh != (SigHandler *)SIG_IGN && oh != (SigHandler *)SIG_DFL) + (*oh) (sig); + + RL_UNSETSTATE(RL_STATE_SIGHANDLER); + SIGHANDLER_RETURN; +} +#endif /* SIGWINCH */ + +/* Functions to manage signal handling. */ + +#if !defined (HAVE_POSIX_SIGNALS) +static int +rl_sigaction (int sig, sighandler_cxt *nh, sighandler_cxt *oh) +{ + oh->sa_handler = signal (sig, nh->sa_handler); + return 0; +} +#endif /* !HAVE_POSIX_SIGNALS */ + +/* Set up a readline-specific signal handler, saving the old signal + information in OHANDLER. Return the old signal handler, like + signal(). */ +static SigHandler * +rl_set_sighandler (int sig, SigHandler *handler, sighandler_cxt *ohandler) +{ + sighandler_cxt old_handler; +#if defined (HAVE_POSIX_SIGNALS) + struct sigaction act; + + act.sa_handler = handler; +# if defined (SIGWINCH) + act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0; +# else + act.sa_flags = 0; +# endif /* SIGWINCH */ + sigemptyset (&act.sa_mask); + sigemptyset (&ohandler->sa_mask); + sigaction (sig, &act, &old_handler); +#else + old_handler.sa_handler = (SigHandler *)signal (sig, handler); +#endif /* !HAVE_POSIX_SIGNALS */ + + /* XXX -- assume we have memcpy */ + /* If rl_set_signals is called twice in a row, don't set the old handler to + rl_signal_handler, because that would cause infinite recursion. */ + if (handler != rl_signal_handler || old_handler.sa_handler != rl_signal_handler) + memcpy (ohandler, &old_handler, sizeof (sighandler_cxt)); + + return (ohandler->sa_handler); +} + +/* Set disposition of SIG to HANDLER, returning old state in OHANDLER. Don't + change disposition if OHANDLER indicates the signal was ignored. */ +static void +rl_maybe_set_sighandler (int sig, SigHandler *handler, sighandler_cxt *ohandler) +{ + sighandler_cxt dummy; + SigHandler *oh; + + sigemptyset (&dummy.sa_mask); + dummy.sa_flags = 0; + oh = rl_set_sighandler (sig, handler, ohandler); + if (oh == (SigHandler *)SIG_IGN) + rl_sigaction (sig, ohandler, &dummy); +} + +/* Set the disposition of SIG to HANDLER, if HANDLER->sa_handler indicates the + signal was not being ignored. MUST only be called for signals whose + disposition was changed using rl_maybe_set_sighandler or for which the + SIG_IGN check was performed inline (e.g., SIGALRM below). */ +static void +rl_maybe_restore_sighandler (int sig, sighandler_cxt *handler) +{ + sighandler_cxt dummy; + + sigemptyset (&dummy.sa_mask); + dummy.sa_flags = 0; + if (handler->sa_handler != SIG_IGN) + rl_sigaction (sig, handler, &dummy); +} + +int +rl_set_signals (void) +{ + sighandler_cxt dummy; + SigHandler *oh; +#if defined (HAVE_POSIX_SIGNALS) + static int sigmask_set = 0; + static sigset_t bset, oset; +#endif + +#if defined (HAVE_POSIX_SIGNALS) + if (rl_catch_signals && sigmask_set == 0) + { + sigemptyset (&bset); + + sigaddset (&bset, SIGINT); + sigaddset (&bset, SIGTERM); +#if defined (SIGHUP) + sigaddset (&bset, SIGHUP); +#endif +#if defined (SIGQUIT) + sigaddset (&bset, SIGQUIT); +#endif +#if defined (SIGALRM) + sigaddset (&bset, SIGALRM); +#endif +#if defined (SIGTSTP) + sigaddset (&bset, SIGTSTP); +#endif +#if defined (SIGTTIN) + sigaddset (&bset, SIGTTIN); +#endif +#if defined (SIGTTOU) + sigaddset (&bset, SIGTTOU); +#endif + sigmask_set = 1; + } +#endif /* HAVE_POSIX_SIGNALS */ + + if (rl_catch_signals && signals_set_flag == 0) + { +#if defined (HAVE_POSIX_SIGNALS) + sigemptyset (&_rl_orig_sigset); + sigprocmask (SIG_BLOCK, &bset, &_rl_orig_sigset); +#endif + + rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int); + rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term); +#if defined (SIGHUP) + rl_maybe_set_sighandler (SIGHUP, rl_signal_handler, &old_hup); +#endif +#if defined (SIGQUIT) + rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit); +#endif + +#if defined (SIGALRM) + oh = rl_set_sighandler (SIGALRM, rl_signal_handler, &old_alrm); + if (oh == (SigHandler *)SIG_IGN) + rl_sigaction (SIGALRM, &old_alrm, &dummy); +#if defined (HAVE_POSIX_SIGNALS) && defined (SA_RESTART) + /* If the application using readline has already installed a signal + handler with SA_RESTART, SIGALRM will cause reads to be restarted + automatically, so readline should just get out of the way. Since + we tested for SIG_IGN above, we can just test for SIG_DFL here. */ + if (oh != (SigHandler *)SIG_DFL && (old_alrm.sa_flags & SA_RESTART)) + rl_sigaction (SIGALRM, &old_alrm, &dummy); +#endif /* HAVE_POSIX_SIGNALS */ +#endif /* SIGALRM */ + +#if defined (SIGTSTP) + rl_maybe_set_sighandler (SIGTSTP, rl_signal_handler, &old_tstp); +#endif /* SIGTSTP */ + +#if defined (SIGTTOU) + rl_maybe_set_sighandler (SIGTTOU, rl_signal_handler, &old_ttou); +#endif /* SIGTTOU */ + +#if defined (SIGTTIN) + rl_maybe_set_sighandler (SIGTTIN, rl_signal_handler, &old_ttin); +#endif /* SIGTTIN */ + + signals_set_flag = 1; + +#if defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, &_rl_orig_sigset, (sigset_t *)NULL); +#endif + } + else if (rl_catch_signals == 0) + { +#if defined (HAVE_POSIX_SIGNALS) + sigemptyset (&_rl_orig_sigset); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &_rl_orig_sigset); +#endif + } + +#if defined (SIGWINCH) + if (rl_catch_sigwinch && sigwinch_set_flag == 0) + { + rl_maybe_set_sighandler (SIGWINCH, rl_sigwinch_handler, &old_winch); + sigwinch_set_flag = 1; + } +#endif /* SIGWINCH */ + + return 0; +} + +int +rl_clear_signals (void) +{ + sighandler_cxt dummy; + + if (rl_catch_signals && signals_set_flag == 1) + { + /* Since rl_maybe_set_sighandler doesn't override a SIG_IGN handler, + we should in theory not have to restore a handler where + old_xxx.sa_handler == SIG_IGN. That's what rl_maybe_restore_sighandler + does. Fewer system calls should reduce readline's per-line + overhead */ + rl_maybe_restore_sighandler (SIGINT, &old_int); + rl_maybe_restore_sighandler (SIGTERM, &old_term); +#if defined (SIGHUP) + rl_maybe_restore_sighandler (SIGHUP, &old_hup); +#endif +#if defined (SIGQUIT) + rl_maybe_restore_sighandler (SIGQUIT, &old_quit); +#endif +#if defined (SIGALRM) + rl_maybe_restore_sighandler (SIGALRM, &old_alrm); +#endif + +#if defined (SIGTSTP) + rl_maybe_restore_sighandler (SIGTSTP, &old_tstp); +#endif /* SIGTSTP */ + +#if defined (SIGTTOU) + rl_maybe_restore_sighandler (SIGTTOU, &old_ttou); +#endif /* SIGTTOU */ + +#if defined (SIGTTIN) + rl_maybe_restore_sighandler (SIGTTIN, &old_ttin); +#endif /* SIGTTIN */ + + signals_set_flag = 0; + } + +#if defined (SIGWINCH) + if (rl_catch_sigwinch && sigwinch_set_flag == 1) + { + sigemptyset (&dummy.sa_mask); + rl_sigaction (SIGWINCH, &old_winch, &dummy); + sigwinch_set_flag = 0; + } +#endif + + return 0; +} + +/* Clean up the terminal and readline state after catching a signal, before + resending it to the calling application. */ +void +rl_cleanup_after_signal (void) +{ + _rl_clean_up_for_exit (); + if (rl_deprep_term_function) + (*rl_deprep_term_function) (); + rl_clear_pending_input (); + rl_clear_signals (); +} + +/* Reset the terminal and readline state after a signal handler returns. */ +void +rl_reset_after_signal (void) +{ + if (rl_prep_term_function) + (*rl_prep_term_function) (_rl_meta_flag); + rl_set_signals (); +} + +/* Free up the readline variable line state for the current line (undo list, + any partial history entry, any keyboard macros in progress, and any + numeric arguments in process) after catching a signal, before calling + rl_cleanup_after_signal(). */ +void +rl_free_line_state (void) +{ + register HIST_ENTRY *entry; + + rl_free_undo_list (); + + entry = current_history (); + if (entry) + entry->data = (char *)NULL; + + _rl_kill_kbd_macro (); + rl_clear_message (); + _rl_reset_argument (); +} + +int +rl_pending_signal (void) +{ + return (_rl_caught_signal); +} + +void +rl_check_signals (void) +{ + RL_CHECK_SIGNALS (); +} +#endif /* HANDLE_SIGNALS */ + +/* **************************************************************** */ +/* */ +/* SIGINT Management */ +/* */ +/* **************************************************************** */ + +#if defined (HAVE_POSIX_SIGNALS) +static sigset_t sigint_set, sigint_oset; +static sigset_t sigwinch_set, sigwinch_oset; +#else /* !HAVE_POSIX_SIGNALS */ +# if defined (HAVE_BSD_SIGNALS) +static int sigint_oldmask; +static int sigwinch_oldmask; +# endif /* HAVE_BSD_SIGNALS */ +#endif /* !HAVE_POSIX_SIGNALS */ + +static int sigint_blocked; +static int sigwinch_blocked; + +/* Cause SIGINT to not be delivered until the corresponding call to + release_sigint(). */ +void +_rl_block_sigint (void) +{ + if (sigint_blocked) + return; + + sigint_blocked = 1; +} + +/* Allow SIGINT to be delivered. */ +void +_rl_release_sigint (void) +{ + if (sigint_blocked == 0) + return; + + sigint_blocked = 0; + RL_CHECK_SIGNALS (); +} + +/* Cause SIGWINCH to not be delivered until the corresponding call to + release_sigwinch(). */ +void +_rl_block_sigwinch (void) +{ + if (sigwinch_blocked) + return; + +#if defined (SIGWINCH) + +#if defined (HAVE_POSIX_SIGNALS) + sigemptyset (&sigwinch_set); + sigemptyset (&sigwinch_oset); + sigaddset (&sigwinch_set, SIGWINCH); + sigprocmask (SIG_BLOCK, &sigwinch_set, &sigwinch_oset); +#else /* !HAVE_POSIX_SIGNALS */ +# if defined (HAVE_BSD_SIGNALS) + sigwinch_oldmask = sigblock (sigmask (SIGWINCH)); +# else /* !HAVE_BSD_SIGNALS */ +# if defined (HAVE_USG_SIGHOLD) + sighold (SIGWINCH); +# endif /* HAVE_USG_SIGHOLD */ +# endif /* !HAVE_BSD_SIGNALS */ +#endif /* !HAVE_POSIX_SIGNALS */ + +#endif /* SIGWINCH */ + + sigwinch_blocked = 1; +} + +/* Allow SIGWINCH to be delivered. */ +void +_rl_release_sigwinch (void) +{ + if (sigwinch_blocked == 0) + return; + +#if defined (SIGWINCH) + +#if defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, &sigwinch_oset, (sigset_t *)NULL); +#else +# if defined (HAVE_BSD_SIGNALS) + sigsetmask (sigwinch_oldmask); +# else /* !HAVE_BSD_SIGNALS */ +# if defined (HAVE_USG_SIGHOLD) + sigrelse (SIGWINCH); +# endif /* HAVE_USG_SIGHOLD */ +# endif /* !HAVE_BSD_SIGNALS */ +#endif /* !HAVE_POSIX_SIGNALS */ + +#endif /* SIGWINCH */ + + sigwinch_blocked = 0; +} + +/* **************************************************************** */ +/* */ +/* Echoing special control characters */ +/* */ +/* **************************************************************** */ +void +rl_echo_signal_char (int sig) +{ + char cstr[3]; + int cslen, c; + + if (_rl_echoctl == 0 || _rl_echo_control_chars == 0) + return; + + switch (sig) + { + case SIGINT: c = _rl_intr_char; break; +#if defined (SIGQUIT) + case SIGQUIT: c = _rl_quit_char; break; +#endif +#if defined (SIGTSTP) + case SIGTSTP: c = _rl_susp_char; break; +#endif + default: return; + } + + if (CTRL_CHAR (c) || c == RUBOUT) + { + cstr[0] = '^'; + cstr[1] = CTRL_CHAR (c) ? UNCTRL (c) : '?'; + cstr[cslen = 2] = '\0'; + } + else + { + cstr[0] = c; + cstr[cslen = 1] = '\0'; + } + + _rl_output_some_chars (cstr, cslen); +} diff --git a/bash-5.1/lib/readline/tcap.h b/bash-5.1/lib/readline/tcap.h new file mode 100644 index 0000000000000000000000000000000000000000..859e6eed5aabed599a3fb4c4ac43fe537c7e67d1 --- /dev/null +++ b/bash-5.1/lib/readline/tcap.h @@ -0,0 +1,60 @@ +/* tcap.h -- termcap library functions and variables. */ + +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_RLTCAP_H_) +#define _RLTCAP_H_ + +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif + +#if defined (HAVE_TERMCAP_H) +# if defined (__linux__) && !defined (SPEED_T_IN_SYS_TYPES) +# include "rltty.h" +# endif +# include +#elif defined (HAVE_NCURSES_TERMCAP_H) +# include +#else + +/* On Solaris2, sys/types.h #includes sys/reg.h, which #defines PC. + Unfortunately, PC is a global variable used by the termcap library. */ +#ifdef PC +# undef PC +#endif + +extern char PC; +extern char *UP, *BC; + +extern short ospeed; + +extern int tgetent (); +extern int tgetflag (); +extern int tgetnum (); +extern char *tgetstr (); + +extern int tputs (); + +extern char *tgoto (); + +#endif /* HAVE_TERMCAP_H */ + +#endif /* !_RLTCAP_H_ */ diff --git a/bash-5.1/lib/readline/terminal.c b/bash-5.1/lib/readline/terminal.c new file mode 100644 index 0000000000000000000000000000000000000000..05415dc42de1dca338d4047b168bc8b5aedd12ae --- /dev/null +++ b/bash-5.1/lib/readline/terminal.c @@ -0,0 +1,845 @@ +/* terminal.c -- controlling the terminal with termcap. */ + +/* Copyright (C) 1996-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include "posixstat.h" +#include +#if defined (HAVE_SYS_FILE_H) +# include +#endif /* HAVE_SYS_FILE_H */ + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" + +#ifdef __MSDOS__ +# include +#endif + +#include "rltty.h" +#if defined (HAVE_SYS_IOCTL_H) +# include /* include for declaration of ioctl */ +#endif +#include "tcap.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +#if defined (__MINGW32__) +# include +# include + +static void _win_get_screensize PARAMS((int *, int *)); +#endif + +#if defined (__EMX__) +static void _emx_get_screensize PARAMS((int *, int *)); +#endif + +/* If the calling application sets this to a non-zero value, readline will + use the $LINES and $COLUMNS environment variables to set its idea of the + window size before interrogating the kernel. */ +int rl_prefer_env_winsize = 0; + +/* If this is non-zero, readline will set LINES and COLUMNS in the + environment when it handles SIGWINCH. */ +int rl_change_environment = 1; + +/* **************************************************************** */ +/* */ +/* Terminal and Termcap */ +/* */ +/* **************************************************************** */ + +#ifndef __MSDOS__ +static char *term_buffer = (char *)NULL; +static char *term_string_buffer = (char *)NULL; +#endif + +static int tcap_initialized; + +#if !defined (__linux__) && !defined (NCURSES_VERSION) +# if defined (__EMX__) || defined (NEED_EXTERN_PC) +extern +# endif /* __EMX__ || NEED_EXTERN_PC */ +char PC, *BC, *UP; +#endif /* !__linux__ && !NCURSES_VERSION */ + +/* Some strings to control terminal actions. These are output by tputs (). */ +char *_rl_term_clreol; +char *_rl_term_clrpag; +char *_rl_term_clrscroll; +char *_rl_term_cr; +char *_rl_term_backspace; +char *_rl_term_goto; +char *_rl_term_pc; + +/* Non-zero if we determine that the terminal can do character insertion. */ +int _rl_terminal_can_insert = 0; + +/* How to insert characters. */ +char *_rl_term_im; +char *_rl_term_ei; +char *_rl_term_ic; +char *_rl_term_ip; +char *_rl_term_IC; + +/* How to delete characters. */ +char *_rl_term_dc; +char *_rl_term_DC; + +/* How to move forward a char, non-destructively */ +char *_rl_term_forward_char; + +/* How to go up a line. */ +char *_rl_term_up; + +/* A visible bell; char if the terminal can be made to flash the screen. */ +static char *_rl_visible_bell; + +/* Non-zero means the terminal can auto-wrap lines. */ +int _rl_term_autowrap = -1; + +/* Non-zero means that this terminal has a meta key. */ +static int term_has_meta; + +/* The sequences to write to turn on and off the meta key, if this + terminal has one. */ +static char *_rl_term_mm; +static char *_rl_term_mo; + +/* The sequences to enter and exit standout mode. */ +static char *_rl_term_so; +static char *_rl_term_se; + +/* The key sequences output by the arrow keys, if this terminal has any. */ +static char *_rl_term_ku; +static char *_rl_term_kd; +static char *_rl_term_kr; +static char *_rl_term_kl; + +/* How to initialize and reset the arrow keys, if this terminal has any. */ +static char *_rl_term_ks; +static char *_rl_term_ke; + +/* The key sequences sent by the Home and End keys, if any. */ +static char *_rl_term_kh; +static char *_rl_term_kH; +static char *_rl_term_at7; /* @7 */ + +/* Delete key */ +static char *_rl_term_kD; + +/* Insert key */ +static char *_rl_term_kI; + +/* Cursor control */ +static char *_rl_term_vs; /* very visible */ +static char *_rl_term_ve; /* normal */ + +/* It's not clear how HPUX is so broken here. */ +#ifdef TGETENT_BROKEN +# define TGETENT_SUCCESS 0 +#else +# define TGETENT_SUCCESS 1 +#endif +#ifdef TGETFLAG_BROKEN +# define TGETFLAG_SUCCESS 0 +#else +# define TGETFLAG_SUCCESS 1 +#endif +#define TGETFLAG(cap) (tgetflag (cap) == TGETFLAG_SUCCESS) + +static void bind_termcap_arrow_keys PARAMS((Keymap)); + +/* Variables that hold the screen dimensions, used by the display code. */ +int _rl_screenwidth, _rl_screenheight, _rl_screenchars; + +/* Non-zero means the user wants to enable the keypad. */ +int _rl_enable_keypad; + +/* Non-zero means the user wants to enable a meta key. */ +int _rl_enable_meta = 1; + +#if defined (__EMX__) +static void +_emx_get_screensize (int *swp, int *shp) +{ + int sz[2]; + + _scrsize (sz); + + if (swp) + *swp = sz[0]; + if (shp) + *shp = sz[1]; +} +#endif + +#if defined (__MINGW32__) +static void +_win_get_screensize (int *swp, int *shp) +{ + HANDLE hConOut; + CONSOLE_SCREEN_BUFFER_INFO scr; + + hConOut = GetStdHandle (STD_OUTPUT_HANDLE); + if (hConOut != INVALID_HANDLE_VALUE) + { + if (GetConsoleScreenBufferInfo (hConOut, &scr)) + { + *swp = scr.dwSize.X; + *shp = scr.srWindow.Bottom - scr.srWindow.Top + 1; + } + } +} +#endif + +/* Get readline's idea of the screen size. TTY is a file descriptor open + to the terminal. If IGNORE_ENV is true, we do not pay attention to the + values of $LINES and $COLUMNS. The tests for TERM_STRING_BUFFER being + non-null serve to check whether or not we have initialized termcap. */ +void +_rl_get_screen_size (int tty, int ignore_env) +{ + char *ss; +#if defined (TIOCGWINSZ) + struct winsize window_size; +#endif /* TIOCGWINSZ */ + int wr, wc; + + wr = wc = -1; +#if defined (TIOCGWINSZ) + if (ioctl (tty, TIOCGWINSZ, &window_size) == 0) + { + wc = (int) window_size.ws_col; + wr = (int) window_size.ws_row; + } +#endif /* TIOCGWINSZ */ + +#if defined (__EMX__) + _emx_get_screensize (&wc, &wr); +#elif defined (__MINGW32__) + _win_get_screensize (&wc, &wr); +#endif + + if (ignore_env || rl_prefer_env_winsize == 0) + { + _rl_screenwidth = wc; + _rl_screenheight = wr; + } + else + _rl_screenwidth = _rl_screenheight = -1; + + /* Environment variable COLUMNS overrides setting of "co" if IGNORE_ENV + is unset. If we prefer the environment, check it first before + assigning the value returned by the kernel. */ + if (_rl_screenwidth <= 0) + { + if (ignore_env == 0 && (ss = sh_get_env_value ("COLUMNS"))) + _rl_screenwidth = atoi (ss); + + if (_rl_screenwidth <= 0) + _rl_screenwidth = wc; + +#if defined (__DJGPP__) + if (_rl_screenwidth <= 0) + _rl_screenwidth = ScreenCols (); +#else + if (_rl_screenwidth <= 0 && term_string_buffer) + _rl_screenwidth = tgetnum ("co"); +#endif + } + + /* Environment variable LINES overrides setting of "li" if IGNORE_ENV + is unset. */ + if (_rl_screenheight <= 0) + { + if (ignore_env == 0 && (ss = sh_get_env_value ("LINES"))) + _rl_screenheight = atoi (ss); + + if (_rl_screenheight <= 0) + _rl_screenheight = wr; + +#if defined (__DJGPP__) + if (_rl_screenheight <= 0) + _rl_screenheight = ScreenRows (); +#else + if (_rl_screenheight <= 0 && term_string_buffer) + _rl_screenheight = tgetnum ("li"); +#endif + } + + /* If all else fails, default to 80x24 terminal. */ + if (_rl_screenwidth <= 1) + _rl_screenwidth = 80; + + if (_rl_screenheight <= 0) + _rl_screenheight = 24; + + /* If we're being compiled as part of bash, set the environment + variables $LINES and $COLUMNS to new values. Otherwise, just + do a pair of putenv () or setenv () calls. */ + if (rl_change_environment) + sh_set_lines_and_columns (_rl_screenheight, _rl_screenwidth); + + if (_rl_term_autowrap == 0) + _rl_screenwidth--; + + _rl_screenchars = _rl_screenwidth * _rl_screenheight; +} + +void +_rl_set_screen_size (int rows, int cols) +{ + if (_rl_term_autowrap == -1) + _rl_init_terminal_io (rl_terminal_name); + + if (rows > 0) + _rl_screenheight = rows; + if (cols > 0) + { + _rl_screenwidth = cols; + if (_rl_term_autowrap == 0) + _rl_screenwidth--; + } + + if (rows > 0 || cols > 0) + _rl_screenchars = _rl_screenwidth * _rl_screenheight; +} + +void +rl_set_screen_size (int rows, int cols) +{ + _rl_set_screen_size (rows, cols); +} + +void +rl_get_screen_size (int *rows, int *cols) +{ + if (rows) + *rows = _rl_screenheight; + if (cols) + *cols = _rl_screenwidth; +} + +void +rl_reset_screen_size (void) +{ + _rl_get_screen_size (fileno (rl_instream), 0); +} + +void +_rl_sigwinch_resize_terminal (void) +{ + _rl_get_screen_size (fileno (rl_instream), 1); +} + +void +rl_resize_terminal (void) +{ + _rl_get_screen_size (fileno (rl_instream), 1); + if (_rl_echoing_p) + { + if (CUSTOM_REDISPLAY_FUNC ()) + rl_forced_update_display (); + else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0) + _rl_redisplay_after_sigwinch (); + } +} + +struct _tc_string { + const char * const tc_var; + char **tc_value; +}; + +/* This should be kept sorted, just in case we decide to change the + search algorithm to something smarter. */ +static const struct _tc_string tc_strings[] = +{ + { "@7", &_rl_term_at7 }, + { "DC", &_rl_term_DC }, + { "E3", &_rl_term_clrscroll }, + { "IC", &_rl_term_IC }, + { "ce", &_rl_term_clreol }, + { "cl", &_rl_term_clrpag }, + { "cr", &_rl_term_cr }, + { "dc", &_rl_term_dc }, + { "ei", &_rl_term_ei }, + { "ic", &_rl_term_ic }, + { "im", &_rl_term_im }, + { "kD", &_rl_term_kD }, /* delete */ + { "kH", &_rl_term_kH }, /* home down ?? */ + { "kI", &_rl_term_kI }, /* insert */ + { "kd", &_rl_term_kd }, + { "ke", &_rl_term_ke }, /* end keypad mode */ + { "kh", &_rl_term_kh }, /* home */ + { "kl", &_rl_term_kl }, + { "kr", &_rl_term_kr }, + { "ks", &_rl_term_ks }, /* start keypad mode */ + { "ku", &_rl_term_ku }, + { "le", &_rl_term_backspace }, + { "mm", &_rl_term_mm }, + { "mo", &_rl_term_mo }, + { "nd", &_rl_term_forward_char }, + { "pc", &_rl_term_pc }, + { "se", &_rl_term_se }, + { "so", &_rl_term_so }, + { "up", &_rl_term_up }, + { "vb", &_rl_visible_bell }, + { "vs", &_rl_term_vs }, + { "ve", &_rl_term_ve }, +}; + +#define NUM_TC_STRINGS (sizeof (tc_strings) / sizeof (struct _tc_string)) + +/* Read the desired terminal capability strings into BP. The capabilities + are described in the TC_STRINGS table. */ +static void +get_term_capabilities (char **bp) +{ +#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */ + register int i; + + for (i = 0; i < NUM_TC_STRINGS; i++) + *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp); +#endif + tcap_initialized = 1; +} + +int +_rl_init_terminal_io (const char *terminal_name) +{ + const char *term; + char *buffer; + int tty, tgetent_ret, dumbterm; + + term = terminal_name ? terminal_name : sh_get_env_value ("TERM"); + _rl_term_clrpag = _rl_term_cr = _rl_term_clreol = _rl_term_clrscroll = (char *)NULL; + tty = rl_instream ? fileno (rl_instream) : 0; + + if (term == 0) + term = "dumb"; + + dumbterm = STREQ (term, "dumb"); + +#ifdef __MSDOS__ + _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL; + _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL; + _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL; + _rl_term_mm = _rl_term_mo = (char *)NULL; + _rl_terminal_can_insert = term_has_meta = _rl_term_autowrap = 0; + _rl_term_cr = "\r"; + _rl_term_backspace = (char *)NULL; + _rl_term_goto = _rl_term_pc = _rl_term_ip = (char *)NULL; + _rl_term_ks = _rl_term_ke =_rl_term_vs = _rl_term_ve = (char *)NULL; + _rl_term_kh = _rl_term_kH = _rl_term_at7 = _rl_term_kI = (char *)NULL; + _rl_term_so = _rl_term_se = (char *)NULL; +#if defined(HACK_TERMCAP_MOTION) + _rl_term_forward_char = (char *)NULL; +#endif + + _rl_get_screen_size (tty, 0); +#else /* !__MSDOS__ */ + /* I've separated this out for later work on not calling tgetent at all + if the calling application has supplied a custom redisplay function, + (and possibly if the application has supplied a custom input function). */ + if (CUSTOM_REDISPLAY_FUNC()) + { + tgetent_ret = -1; + } + else + { + if (term_string_buffer == 0) + term_string_buffer = (char *)xmalloc(2032); + + if (term_buffer == 0) + term_buffer = (char *)xmalloc(4080); + + buffer = term_string_buffer; + + tgetent_ret = tgetent (term_buffer, term); + } + + if (tgetent_ret != TGETENT_SUCCESS) + { + FREE (term_string_buffer); + FREE (term_buffer); + buffer = term_buffer = term_string_buffer = (char *)NULL; + + _rl_term_autowrap = 0; /* used by _rl_get_screen_size */ + + /* Allow calling application to set default height and width, using + rl_set_screen_size */ + if (_rl_screenwidth <= 0 || _rl_screenheight <= 0) + { +#if defined (__EMX__) + _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight); + _rl_screenwidth--; +#else /* !__EMX__ */ + _rl_get_screen_size (tty, 0); +#endif /* !__EMX__ */ + } + + /* Defaults. */ + if (_rl_screenwidth <= 0 || _rl_screenheight <= 0) + { + _rl_screenwidth = 79; + _rl_screenheight = 24; + } + + /* Everything below here is used by the redisplay code (tputs). */ + _rl_screenchars = _rl_screenwidth * _rl_screenheight; + _rl_term_cr = "\r"; + _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL; + _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL; + _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL; + _rl_term_kh = _rl_term_kH = _rl_term_kI = _rl_term_kD = (char *)NULL; + _rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL; + _rl_term_mm = _rl_term_mo = (char *)NULL; + _rl_term_ve = _rl_term_vs = (char *)NULL; + _rl_term_forward_char = (char *)NULL; + _rl_term_so = _rl_term_se = (char *)NULL; + _rl_terminal_can_insert = term_has_meta = 0; + + /* Assume generic unknown terminal can't handle the enable/disable + escape sequences */ + _rl_enable_bracketed_paste = 0; + + /* Reasonable defaults for tgoto(). Readline currently only uses + tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we + change that later... */ + PC = '\0'; + BC = _rl_term_backspace = "\b"; + UP = _rl_term_up; + + return 0; + } + + get_term_capabilities (&buffer); + + /* Set up the variables that the termcap library expects the application + to provide. */ + PC = _rl_term_pc ? *_rl_term_pc : 0; + BC = _rl_term_backspace; + UP = _rl_term_up; + + if (_rl_term_cr == 0) + _rl_term_cr = "\r"; + + _rl_term_autowrap = TGETFLAG ("am") && TGETFLAG ("xn"); + + /* Allow calling application to set default height and width, using + rl_set_screen_size */ + if (_rl_screenwidth <= 0 || _rl_screenheight <= 0) + _rl_get_screen_size (tty, 0); + + /* "An application program can assume that the terminal can do + character insertion if *any one of* the capabilities `IC', + `im', `ic' or `ip' is provided." But we can't do anything if + only `ip' is provided, so... */ + _rl_terminal_can_insert = (_rl_term_IC || _rl_term_im || _rl_term_ic); + + /* Check to see if this terminal has a meta key and clear the capability + variables if there is none. */ + term_has_meta = TGETFLAG ("km"); + if (term_has_meta == 0) + _rl_term_mm = _rl_term_mo = (char *)NULL; +#endif /* !__MSDOS__ */ + + /* Attempt to find and bind the arrow keys. Do not override already + bound keys in an overzealous attempt, however. */ + + bind_termcap_arrow_keys (emacs_standard_keymap); + +#if defined (VI_MODE) + bind_termcap_arrow_keys (vi_movement_keymap); + bind_termcap_arrow_keys (vi_insertion_keymap); +#endif /* VI_MODE */ + + /* There's no way to determine whether or not a given terminal supports + bracketed paste mode, so we assume a terminal named "dumb" does not. */ + if (dumbterm) + _rl_enable_bracketed_paste = 0; + + return 0; +} + +/* Bind the arrow key sequences from the termcap description in MAP. */ +static void +bind_termcap_arrow_keys (Keymap map) +{ + Keymap xkeymap; + + xkeymap = _rl_keymap; + _rl_keymap = map; + + rl_bind_keyseq_if_unbound (_rl_term_ku, rl_get_previous_history); + rl_bind_keyseq_if_unbound (_rl_term_kd, rl_get_next_history); + rl_bind_keyseq_if_unbound (_rl_term_kr, rl_forward_char); + rl_bind_keyseq_if_unbound (_rl_term_kl, rl_backward_char); + + rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ + rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */ + + rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete); + rl_bind_keyseq_if_unbound (_rl_term_kI, rl_overwrite_mode); /* Insert */ + + _rl_keymap = xkeymap; +} + +char * +rl_get_termcap (const char *cap) +{ + register int i; + + if (tcap_initialized == 0) + return ((char *)NULL); + for (i = 0; i < NUM_TC_STRINGS; i++) + { + if (tc_strings[i].tc_var[0] == cap[0] && strcmp (tc_strings[i].tc_var, cap) == 0) + return *(tc_strings[i].tc_value); + } + return ((char *)NULL); +} + +/* Re-initialize the terminal considering that the TERM/TERMCAP variable + has changed. */ +int +rl_reset_terminal (const char *terminal_name) +{ + _rl_screenwidth = _rl_screenheight = 0; + _rl_init_terminal_io (terminal_name); + return 0; +} + +/* A function for the use of tputs () */ +#ifdef _MINIX +void +_rl_output_character_function (int c) +{ + putc (c, _rl_out_stream); +} +#else /* !_MINIX */ +int +_rl_output_character_function (int c) +{ + return putc (c, _rl_out_stream); +} +#endif /* !_MINIX */ + +/* Write COUNT characters from STRING to the output stream. */ +void +_rl_output_some_chars (const char *string, int count) +{ + fwrite (string, 1, count, _rl_out_stream); +} + +/* Move the cursor back. */ +int +_rl_backspace (int count) +{ + register int i; + +#ifndef __MSDOS__ + if (_rl_term_backspace) + for (i = 0; i < count; i++) + tputs (_rl_term_backspace, 1, _rl_output_character_function); + else +#endif + for (i = 0; i < count; i++) + putc ('\b', _rl_out_stream); + return 0; +} + +/* Move to the start of the next line. */ +int +rl_crlf (void) +{ +#if defined (NEW_TTY_DRIVER) || defined (__MINT__) + if (_rl_term_cr) + tputs (_rl_term_cr, 1, _rl_output_character_function); +#endif /* NEW_TTY_DRIVER || __MINT__ */ + putc ('\n', _rl_out_stream); + return 0; +} + +void +_rl_cr (void) +{ +#if defined (__MSDOS__) + putc ('\r', rl_outstream); +#else + tputs (_rl_term_cr, 1, _rl_output_character_function); +#endif +} + +/* Ring the terminal bell. */ +int +rl_ding (void) +{ + if (_rl_echoing_p) + { + switch (_rl_bell_preference) + { + case NO_BELL: + default: + break; + case VISIBLE_BELL: + if (_rl_visible_bell) + { +#ifdef __DJGPP__ + ScreenVisualBell (); +#else + tputs (_rl_visible_bell, 1, _rl_output_character_function); +#endif + break; + } + /* FALLTHROUGH */ + case AUDIBLE_BELL: + fprintf (stderr, "\007"); + fflush (stderr); + break; + } + return (0); + } + return (-1); +} + +/* **************************************************************** */ +/* */ +/* Entering and leaving terminal standout mode */ +/* */ +/* **************************************************************** */ + +void +_rl_standout_on (void) +{ +#ifndef __MSDOS__ + if (_rl_term_so && _rl_term_se) + tputs (_rl_term_so, 1, _rl_output_character_function); +#endif +} + +void +_rl_standout_off (void) +{ +#ifndef __MSDOS__ + if (_rl_term_so && _rl_term_se) + tputs (_rl_term_se, 1, _rl_output_character_function); +#endif +} + +/* **************************************************************** */ +/* */ +/* Controlling the Meta Key and Keypad */ +/* */ +/* **************************************************************** */ + +static int enabled_meta = 0; /* flag indicating we enabled meta mode */ + +void +_rl_enable_meta_key (void) +{ +#if !defined (__DJGPP__) + if (term_has_meta && _rl_term_mm) + { + tputs (_rl_term_mm, 1, _rl_output_character_function); + enabled_meta = 1; + } +#endif +} + +void +_rl_disable_meta_key (void) +{ +#if !defined (__DJGPP__) + if (term_has_meta && _rl_term_mo && enabled_meta) + { + tputs (_rl_term_mo, 1, _rl_output_character_function); + enabled_meta = 0; + } +#endif +} + +void +_rl_control_keypad (int on) +{ +#if !defined (__DJGPP__) + if (on && _rl_term_ks) + tputs (_rl_term_ks, 1, _rl_output_character_function); + else if (!on && _rl_term_ke) + tputs (_rl_term_ke, 1, _rl_output_character_function); +#endif +} + +/* **************************************************************** */ +/* */ +/* Controlling the Cursor */ +/* */ +/* **************************************************************** */ + +/* Set the cursor appropriately depending on IM, which is one of the + insert modes (insert or overwrite). Insert mode gets the normal + cursor. Overwrite mode gets a very visible cursor. Only does + anything if we have both capabilities. */ +void +_rl_set_cursor (int im, int force) +{ +#ifndef __MSDOS__ + if (_rl_term_ve && _rl_term_vs) + { + if (force || im != rl_insert_mode) + { + if (im == RL_IM_OVERWRITE) + tputs (_rl_term_vs, 1, _rl_output_character_function); + else + tputs (_rl_term_ve, 1, _rl_output_character_function); + } + } +#endif +} diff --git a/bash-5.1/lib/readline/text.c b/bash-5.1/lib/readline/text.c new file mode 100644 index 0000000000000000000000000000000000000000..2567dea268ae2412dda65d9c9fbd898e1ac11e86 --- /dev/null +++ b/bash-5.1/lib/readline/text.c @@ -0,0 +1,1880 @@ +/* text.c -- text handling commands for readline. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +#if defined (__EMX__) +# define INCL_DOSPROCESS +# include +#endif /* __EMX__ */ + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +/* Forward declarations. */ +static int rl_change_case PARAMS((int, int)); +static int _rl_char_search PARAMS((int, int, int)); + +#if defined (READLINE_CALLBACKS) +static int _rl_insert_next_callback PARAMS((_rl_callback_generic_arg *)); +static int _rl_char_search_callback PARAMS((_rl_callback_generic_arg *)); +#endif + +/* The largest chunk of text that can be inserted in one call to + rl_insert_text. Text blocks larger than this are divided. */ +#define TEXT_COUNT_MAX 1024 + +int _rl_optimize_typeahead = 1; /* rl_insert tries to read typeahead */ + +/* **************************************************************** */ +/* */ +/* Insert and Delete */ +/* */ +/* **************************************************************** */ + +/* Insert a string of text into the line at point. This is the only + way that you should do insertion. _rl_insert_char () calls this + function. Returns the number of characters inserted. */ +int +rl_insert_text (const char *string) +{ + register int i, l; + + l = (string && *string) ? strlen (string) : 0; + if (l == 0) + return 0; + + if (rl_end + l >= rl_line_buffer_len) + rl_extend_line_buffer (rl_end + l); + + for (i = rl_end; i >= rl_point; i--) + rl_line_buffer[i + l] = rl_line_buffer[i]; + strncpy (rl_line_buffer + rl_point, string, l); + + /* Remember how to undo this if we aren't undoing something. */ + if (_rl_doing_an_undo == 0) + { + /* If possible and desirable, concatenate the undos. */ + if ((l == 1) && + rl_undo_list && + (rl_undo_list->what == UNDO_INSERT) && + (rl_undo_list->end == rl_point) && + (rl_undo_list->end - rl_undo_list->start < 20)) + rl_undo_list->end++; + else + rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL); + } + rl_point += l; + rl_end += l; + rl_line_buffer[rl_end] = '\0'; + return l; +} + +/* Delete the string between FROM and TO. FROM is inclusive, TO is not. + Returns the number of characters deleted. */ +int +rl_delete_text (int from, int to) +{ + register char *text; + register int diff, i; + + /* Fix it if the caller is confused. */ + if (from > to) + SWAP (from, to); + + /* fix boundaries */ + if (to > rl_end) + { + to = rl_end; + if (from > to) + from = to; + } + if (from < 0) + from = 0; + + text = rl_copy_text (from, to); + + /* Some versions of strncpy() can't handle overlapping arguments. */ + diff = to - from; + for (i = from; i < rl_end - diff; i++) + rl_line_buffer[i] = rl_line_buffer[i + diff]; + + /* Remember how to undo this delete. */ + if (_rl_doing_an_undo == 0) + rl_add_undo (UNDO_DELETE, from, to, text); + else + xfree (text); + + rl_end -= diff; + rl_line_buffer[rl_end] = '\0'; + _rl_fix_mark (); + return (diff); +} + +/* Fix up point so that it is within the line boundaries after killing + text. If FIX_MARK_TOO is non-zero, the mark is forced within line + boundaries also. */ + +#define _RL_FIX_POINT(x) \ + do { \ + if (x > rl_end) \ + x = rl_end; \ + else if (x < 0) \ + x = 0; \ + } while (0) + +void +_rl_fix_point (int fix_mark_too) +{ + _RL_FIX_POINT (rl_point); + if (fix_mark_too) + _RL_FIX_POINT (rl_mark); +} + +void +_rl_fix_mark (void) +{ + _RL_FIX_POINT (rl_mark); +} +#undef _RL_FIX_POINT + +/* Replace the contents of the line buffer between START and END with + TEXT. The operation is undoable. To replace the entire line in an + undoable mode, use _rl_replace_text(text, 0, rl_end); */ +int +_rl_replace_text (const char *text, int start, int end) +{ + int n; + + n = 0; + rl_begin_undo_group (); + if (start <= end) + rl_delete_text (start, end + 1); + rl_point = start; + if (*text) + n = rl_insert_text (text); + rl_end_undo_group (); + + return n; +} + +/* Replace the current line buffer contents with TEXT. If CLEAR_UNDO is + non-zero, we free the current undo list. */ +void +rl_replace_line (const char *text, int clear_undo) +{ + int len; + + len = strlen (text); + if (len >= rl_line_buffer_len) + rl_extend_line_buffer (len); + strcpy (rl_line_buffer, text); + rl_end = len; + + if (clear_undo) + rl_free_undo_list (); + + _rl_fix_point (1); +} + +/* **************************************************************** */ +/* */ +/* Readline character functions */ +/* */ +/* **************************************************************** */ + +/* This is not a gap editor, just a stupid line input routine. No hair + is involved in writing any of the functions, and none should be. */ + +/* Note that: + + rl_end is the place in the string that we would place '\0'; + i.e., it is always safe to place '\0' there. + + rl_point is the place in the string where the cursor is. Sometimes + this is the same as rl_end. + + Any command that is called interactively receives two arguments. + The first is a count: the numeric arg passed to this command. + The second is the key which invoked this command. +*/ + +/* **************************************************************** */ +/* */ +/* Movement Commands */ +/* */ +/* **************************************************************** */ + +/* Note that if you `optimize' the display for these functions, you cannot + use said functions in other functions which do not do optimizing display. + I.e., you will have to update the data base for rl_redisplay, and you + might as well let rl_redisplay do that job. */ + +/* Move forward COUNT bytes. */ +int +rl_forward_byte (int count, int key) +{ + if (count < 0) + return (rl_backward_byte (-count, key)); + + if (count > 0) + { + int end, lend; + + end = rl_point + count; +#if defined (VI_MODE) + lend = rl_end > 0 ? rl_end - (VI_COMMAND_MODE()) : rl_end; +#else + lend = rl_end; +#endif + + if (end > lend) + { + rl_point = lend; + rl_ding (); + } + else + rl_point = end; + } + + if (rl_end < 0) + rl_end = 0; + + return 0; +} + +int +_rl_forward_char_internal (int count) +{ + int point; + +#if defined (HANDLE_MULTIBYTE) + point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); + +#if defined (VI_MODE) + if (point >= rl_end && VI_COMMAND_MODE()) + point = _rl_find_prev_mbchar (rl_line_buffer, rl_end, MB_FIND_NONZERO); +#endif + + if (rl_end < 0) + rl_end = 0; +#else + point = rl_point + count; +#endif + + if (point > rl_end) + point = rl_end; + return (point); +} + +int +_rl_backward_char_internal (int count) +{ + int point; + + point = rl_point; +#if defined (HANDLE_MULTIBYTE) + if (count > 0) + { + while (count > 0 && point > 0) + { + point = _rl_find_prev_mbchar (rl_line_buffer, point, MB_FIND_NONZERO); + count--; + } + if (count > 0) + return 0; /* XXX - rl_ding() here? */ + } +#else + if (count > 0) + point -= count; +#endif + + if (point < 0) + point = 0; + return (point); +} + +#if defined (HANDLE_MULTIBYTE) +/* Move forward COUNT characters. */ +int +rl_forward_char (int count, int key) +{ + int point; + + if (MB_CUR_MAX == 1 || rl_byte_oriented) + return (rl_forward_byte (count, key)); + + if (count < 0) + return (rl_backward_char (-count, key)); + + if (count > 0) + { + if (rl_point == rl_end && EMACS_MODE()) + { + rl_ding (); + return 0; + } + + point = _rl_forward_char_internal (count); + + if (rl_point == point) + rl_ding (); + + rl_point = point; + } + + return 0; +} +#else /* !HANDLE_MULTIBYTE */ +int +rl_forward_char (int count, int key) +{ + return (rl_forward_byte (count, key)); +} +#endif /* !HANDLE_MULTIBYTE */ + +/* Backwards compatibility. */ +int +rl_forward (int count, int key) +{ + return (rl_forward_char (count, key)); +} + +/* Move backward COUNT bytes. */ +int +rl_backward_byte (int count, int key) +{ + if (count < 0) + return (rl_forward_byte (-count, key)); + + if (count > 0) + { + if (rl_point < count) + { + rl_point = 0; + rl_ding (); + } + else + rl_point -= count; + } + + if (rl_point < 0) + rl_point = 0; + + return 0; +} + +#if defined (HANDLE_MULTIBYTE) +/* Move backward COUNT characters. */ +int +rl_backward_char (int count, int key) +{ + int point; + + if (MB_CUR_MAX == 1 || rl_byte_oriented) + return (rl_backward_byte (count, key)); + + if (count < 0) + return (rl_forward_char (-count, key)); + + if (count > 0) + { + point = rl_point; + + while (count > 0 && point > 0) + { + point = _rl_find_prev_mbchar (rl_line_buffer, point, MB_FIND_NONZERO); + count--; + } + if (count > 0) + { + rl_point = 0; + rl_ding (); + } + else + rl_point = point; + } + + return 0; +} +#else +int +rl_backward_char (int count, int key) +{ + return (rl_backward_byte (count, key)); +} +#endif + +/* Backwards compatibility. */ +int +rl_backward (int count, int key) +{ + return (rl_backward_char (count, key)); +} + +/* Move to the beginning of the line. */ +int +rl_beg_of_line (int count, int key) +{ + rl_point = 0; + return 0; +} + +/* Move to the end of the line. */ +int +rl_end_of_line (int count, int key) +{ + rl_point = rl_end; + return 0; +} + +/* Move forward a word. We do what Emacs does. Handles multibyte chars. */ +int +rl_forward_word (int count, int key) +{ + int c; + + if (count < 0) + return (rl_backward_word (-count, key)); + + while (count) + { + if (rl_point > rl_end) + rl_point = rl_end; + if (rl_point == rl_end) + return 0; + + /* If we are not in a word, move forward until we are in one. + Then, move forward until we hit a non-alphabetic character. */ + c = _rl_char_value (rl_line_buffer, rl_point); + + if (_rl_walphabetic (c) == 0) + { + rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + while (rl_point < rl_end) + { + c = _rl_char_value (rl_line_buffer, rl_point); + if (_rl_walphabetic (c)) + break; + rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + } + } + + if (rl_point > rl_end) + rl_point = rl_end; + if (rl_point == rl_end) + return 0; + + rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + while (rl_point < rl_end) + { + c = _rl_char_value (rl_line_buffer, rl_point); + if (_rl_walphabetic (c) == 0) + break; + rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + } + + --count; + } + + return 0; +} + +/* Move backward a word. We do what Emacs does. Handles multibyte chars. */ +int +rl_backward_word (int count, int key) +{ + int c, p; + + if (count < 0) + return (rl_forward_word (-count, key)); + + while (count) + { + if (rl_point == 0) + return 0; + + /* Like rl_forward_word (), except that we look at the characters + just before point. */ + + p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); + c = _rl_char_value (rl_line_buffer, p); + + if (_rl_walphabetic (c) == 0) + { + rl_point = p; + while (rl_point > 0) + { + p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); + c = _rl_char_value (rl_line_buffer, p); + if (_rl_walphabetic (c)) + break; + rl_point = p; + } + } + + while (rl_point) + { + p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); + c = _rl_char_value (rl_line_buffer, p); + if (_rl_walphabetic (c) == 0) + break; + else + rl_point = p; + } + + --count; + } + + return 0; +} + +/* Clear the current line. Numeric argument to C-l does this. */ +int +rl_refresh_line (int ignore1, int ignore2) +{ + _rl_refresh_line (); + rl_display_fixed = 1; + return 0; +} + +/* C-l typed to a line without quoting clears the screen, and then reprints + the prompt and the current input line. Given a numeric arg, redraw only + the current line. */ +int +rl_clear_screen (int count, int key) +{ + if (rl_explicit_arg) + { + rl_refresh_line (count, key); + return 0; + } + + _rl_clear_screen (0); /* calls termcap function to clear screen */ + rl_keep_mark_active (); + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; +} + +int +rl_clear_display (int count, int key) +{ + _rl_clear_screen (1); /* calls termcap function to clear screen and scrollback buffer */ + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; +} + +int +rl_previous_screen_line (int count, int key) +{ + int c; + + c = _rl_term_autowrap ? _rl_screenwidth : (_rl_screenwidth + 1); + return (rl_backward_char (c, key)); +} + +int +rl_next_screen_line (int count, int key) +{ + int c; + + c = _rl_term_autowrap ? _rl_screenwidth : (_rl_screenwidth + 1); + return (rl_forward_char (c, key)); +} + +int +rl_skip_csi_sequence (int count, int key) +{ + int ch; + + RL_SETSTATE (RL_STATE_MOREINPUT); + do + ch = rl_read_key (); + while (ch >= 0x20 && ch < 0x40); + RL_UNSETSTATE (RL_STATE_MOREINPUT); + + return (ch < 0); +} + +int +rl_arrow_keys (int count, int key) +{ + int ch; + + RL_SETSTATE(RL_STATE_MOREINPUT); + ch = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + if (ch < 0) + return (1); + + switch (_rl_to_upper (ch)) + { + case 'A': + rl_get_previous_history (count, ch); + break; + + case 'B': + rl_get_next_history (count, ch); + break; + + case 'C': + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_forward_char (count, ch); + else + rl_forward_byte (count, ch); + break; + + case 'D': + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_backward_char (count, ch); + else + rl_backward_byte (count, ch); + break; + + default: + rl_ding (); + } + + return 0; +} + +/* **************************************************************** */ +/* */ +/* Text commands */ +/* */ +/* **************************************************************** */ + +#ifdef HANDLE_MULTIBYTE +static char pending_bytes[MB_LEN_MAX]; +static int pending_bytes_length = 0; +static mbstate_t ps = {0}; +#endif + +/* Insert the character C at the current location, moving point forward. + If C introduces a multibyte sequence, we read the whole sequence and + then insert the multibyte char into the line buffer. */ +int +_rl_insert_char (int count, int c) +{ + register int i; + char *string; +#ifdef HANDLE_MULTIBYTE + int string_size; + char incoming[MB_LEN_MAX + 1]; + int incoming_length = 0; + mbstate_t ps_back; + static int stored_count = 0; +#endif + + if (count <= 0) + return 0; + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + incoming[0] = c; + incoming[1] = '\0'; + incoming_length = 1; + } + else if (_rl_utf8locale && (c & 0x80) == 0) + { + incoming[0] = c; + incoming[1] = '\0'; + incoming_length = 1; + } + else + { + wchar_t wc; + size_t ret; + + if (stored_count <= 0) + stored_count = count; + else + count = stored_count; + + ps_back = ps; + pending_bytes[pending_bytes_length++] = c; + ret = mbrtowc (&wc, pending_bytes, pending_bytes_length, &ps); + + if (ret == (size_t)-2) + { + /* Bytes too short to compose character, try to wait for next byte. + Restore the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + ps = ps_back; + return 1; + } + else if (ret == (size_t)-1) + { + /* Invalid byte sequence for the current locale. Treat first byte + as a single character. */ + incoming[0] = pending_bytes[0]; + incoming[1] = '\0'; + incoming_length = 1; + pending_bytes_length--; + memmove (pending_bytes, pending_bytes + 1, pending_bytes_length); + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (ret == (size_t)0) + { + incoming[0] = '\0'; + incoming_length = 0; + pending_bytes_length--; + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (ret == 1) + { + incoming[0] = pending_bytes[0]; + incoming[incoming_length = 1] = '\0'; + pending_bytes_length = 0; + } + else + { + /* We successfully read a single multibyte character. */ + memcpy (incoming, pending_bytes, pending_bytes_length); + incoming[pending_bytes_length] = '\0'; + incoming_length = pending_bytes_length; + pending_bytes_length = 0; + } + } +#endif /* HANDLE_MULTIBYTE */ + + /* If we can optimize, then do it. But don't let people crash + readline because of extra large arguments. */ + if (count > 1 && count <= TEXT_COUNT_MAX) + { +#if defined (HANDLE_MULTIBYTE) + string_size = count * incoming_length; + string = (char *)xmalloc (1 + string_size); + + i = 0; + while (i < string_size) + { + if (incoming_length == 1) + string[i++] = *incoming; + else + { + strncpy (string + i, incoming, incoming_length); + i += incoming_length; + } + } + incoming_length = 0; + stored_count = 0; +#else /* !HANDLE_MULTIBYTE */ + string = (char *)xmalloc (1 + count); + + for (i = 0; i < count; i++) + string[i] = c; +#endif /* !HANDLE_MULTIBYTE */ + + string[i] = '\0'; + rl_insert_text (string); + xfree (string); + + return 0; + } + + if (count > TEXT_COUNT_MAX) + { + int decreaser; +#if defined (HANDLE_MULTIBYTE) + string_size = incoming_length * TEXT_COUNT_MAX; + string = (char *)xmalloc (1 + string_size); + + i = 0; + while (i < string_size) + { + if (incoming_length == 1) + string[i++] = *incoming; + else + { + strncpy (string + i, incoming, incoming_length); + i += incoming_length; + } + } + + while (count) + { + decreaser = (count > TEXT_COUNT_MAX) ? TEXT_COUNT_MAX : count; + string[decreaser*incoming_length] = '\0'; + rl_insert_text (string); + count -= decreaser; + } + + xfree (string); + incoming_length = 0; + stored_count = 0; +#else /* !HANDLE_MULTIBYTE */ + char str[TEXT_COUNT_MAX+1]; + + for (i = 0; i < TEXT_COUNT_MAX; i++) + str[i] = c; + + while (count) + { + decreaser = (count > TEXT_COUNT_MAX ? TEXT_COUNT_MAX : count); + str[decreaser] = '\0'; + rl_insert_text (str); + count -= decreaser; + } +#endif /* !HANDLE_MULTIBYTE */ + + return 0; + } + + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + /* We are inserting a single character. + If there is pending input, then make a string of all of the + pending characters that are bound to rl_insert, and insert + them all. Don't do this if we're current reading input from + a macro. */ + if ((RL_ISSTATE (RL_STATE_MACROINPUT) == 0) && _rl_pushed_input_available ()) + _rl_insert_typein (c); + else + { + /* Inserting a single character. */ + char str[2]; + + str[1] = '\0'; + str[0] = c; + rl_insert_text (str); + } + } +#if defined (HANDLE_MULTIBYTE) + else + { + rl_insert_text (incoming); + stored_count = 0; + } +#endif + + return 0; +} + +/* Overwrite the character at point (or next COUNT characters) with C. + If C introduces a multibyte character sequence, read the entire sequence + before starting the overwrite loop. */ +int +_rl_overwrite_char (int count, int c) +{ + int i; +#if defined (HANDLE_MULTIBYTE) + char mbkey[MB_LEN_MAX]; + int k; + + /* Read an entire multibyte character sequence to insert COUNT times. */ + if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0) + k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX); +#endif + + rl_begin_undo_group (); + + for (i = 0; i < count; i++) + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_insert_text (mbkey); + else +#endif + _rl_insert_char (1, c); + + if (rl_point < rl_end) + rl_delete (1, c); + } + + rl_end_undo_group (); + + return 0; +} + +int +rl_insert (int count, int c) +{ + int r, n, x; + + r = (rl_insert_mode == RL_IM_INSERT) ? _rl_insert_char (count, c) : _rl_overwrite_char (count, c); + + /* XXX -- attempt to batch-insert pending input that maps to self-insert */ + x = 0; + n = (unsigned short)-2; + while (_rl_optimize_typeahead && + rl_num_chars_to_read == 0 && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued (0) && + (n = rl_read_key ()) > 0 && + _rl_keymap[(unsigned char)n].type == ISFUNC && + _rl_keymap[(unsigned char)n].function == rl_insert) + { + r = (rl_insert_mode == RL_IM_INSERT) ? _rl_insert_char (1, n) : _rl_overwrite_char (1, n); + /* _rl_insert_char keeps its own set of pending characters to compose a + complete multibyte character, and only returns 1 if it sees a character + that's part of a multibyte character but too short to complete one. We + can try to read another character in the hopes that we will get the + next one or just punt. Right now we try to read another character. + We don't want to call rl_insert_next if _rl_insert_char has already + stored the character in the pending_bytes array because that will + result in doubled input. */ + n = (unsigned short)-2; + x++; /* count of bytes of typeahead read, currently unused */ + if (r == 1) /* read partial multibyte character */ + continue; + if (rl_done || r != 0) + break; + } + + if (n != (unsigned short)-2) /* -2 = sentinel value for having inserted N */ + { + /* setting rl_pending_input inhibits setting rl_last_func so we do it + ourselves here */ + rl_last_func = rl_insert; + _rl_reset_argument (); + rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; + r = rl_execute_next (n); + } + + return r; +} + +/* Insert the next typed character verbatim. */ +static int +_rl_insert_next (int count) +{ + int c; + + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (c < 0) + return 1; + + if (RL_ISSTATE (RL_STATE_MACRODEF)) + _rl_add_macro_char (c); + +#if defined (HANDLE_SIGNALS) + if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) + _rl_restore_tty_signals (); +#endif + + return (_rl_insert_char (count, c)); +} + +#if defined (READLINE_CALLBACKS) +static int +_rl_insert_next_callback (_rl_callback_generic_arg *data) +{ + int count, r; + + count = data->count; + r = 0; + + if (count < 0) + { + data->count++; + r = _rl_insert_next (1); + _rl_want_redisplay = 1; + /* If we should keep going, leave the callback function installed */ + if (data->count < 0 && r == 0) + return r; + count = 0; /* data->count == 0 || r != 0; force break below */ + } + + /* Deregister function, let rl_callback_read_char deallocate data */ + _rl_callback_func = 0; + _rl_want_redisplay = 1; + + if (count == 0) + return r; + + return _rl_insert_next (count); +} +#endif + +int +rl_quoted_insert (int count, int key) +{ + /* Let's see...should the callback interface futz with signal handling? */ +#if defined (HANDLE_SIGNALS) + if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) + _rl_disable_tty_signals (); +#endif + +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_callback_data = _rl_callback_data_alloc (count); + _rl_callback_func = _rl_insert_next_callback; + return (0); + } +#endif + + /* A negative count means to quote the next -COUNT characters. */ + if (count < 0) + { + int r; + + do + r = _rl_insert_next (1); + while (r == 0 && ++count < 0); + return r; + } + + return _rl_insert_next (count); +} + +/* Insert a tab character. */ +int +rl_tab_insert (int count, int key) +{ + return (_rl_insert_char (count, '\t')); +} + +/* What to do when a NEWLINE is pressed. We accept the whole line. + KEY is the key that invoked this command. I guess it could have + meaning in the future. */ +int +rl_newline (int count, int key) +{ + if (rl_mark_active_p ()) + { + rl_deactivate_mark (); + (*rl_redisplay_function) (); + _rl_want_redisplay = 0; + } + + rl_done = 1; + + if (_rl_history_preserve_point) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + RL_SETSTATE(RL_STATE_DONE); + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + { + _rl_vi_done_inserting (); + if (_rl_vi_textmod_command (_rl_vi_last_command) == 0) /* XXX */ + _rl_vi_reset_last (); + } +#endif /* VI_MODE */ + + /* If we've been asked to erase empty lines, suppress the final update, + since _rl_update_final calls rl_crlf(). */ + if (rl_erase_empty_line && rl_point == 0 && rl_end == 0) + return 0; + + if (_rl_echoing_p) + _rl_update_final (); + return 0; +} + +/* What to do for some uppercase characters, like meta characters, + and some characters appearing in emacs_ctlx_keymap. This function + is just a stub, you bind keys to it and the code in _rl_dispatch () + is special cased. */ +int +rl_do_lowercase_version (int ignore1, int ignore2) +{ + return 0; +} + +/* This is different from what vi does, so the code's not shared. Emacs + rubout in overwrite mode has one oddity: it replaces a control + character that's displayed as two characters (^X) with two spaces. */ +int +_rl_overwrite_rubout (int count, int key) +{ + int opoint; + int i, l; + + if (rl_point == 0) + { + rl_ding (); + return 1; + } + + opoint = rl_point; + + /* L == number of spaces to insert */ + for (i = l = 0; i < count; i++) + { + rl_backward_char (1, key); + l += rl_character_len (rl_line_buffer[rl_point], rl_point); /* not exactly right */ + } + + rl_begin_undo_group (); + + if (count > 1 || rl_explicit_arg) + rl_kill_text (opoint, rl_point); + else + rl_delete_text (opoint, rl_point); + + /* Emacs puts point at the beginning of the sequence of spaces. */ + if (rl_point < rl_end) + { + opoint = rl_point; + _rl_insert_char (l, ' '); + rl_point = opoint; + } + + rl_end_undo_group (); + + return 0; +} + +/* Rubout the character behind point. */ +int +rl_rubout (int count, int key) +{ + if (count < 0) + return (rl_delete (-count, key)); + + if (!rl_point) + { + rl_ding (); + return 1; + } + + if (rl_insert_mode == RL_IM_OVERWRITE) + return (_rl_overwrite_rubout (count, key)); + + return (_rl_rubout_char (count, key)); +} + +int +_rl_rubout_char (int count, int key) +{ + int orig_point; + unsigned char c; + + /* Duplicated code because this is called from other parts of the library. */ + if (count < 0) + return (rl_delete (-count, key)); + + if (rl_point == 0) + { + rl_ding (); + return 1; + } + + orig_point = rl_point; + if (count > 1 || rl_explicit_arg) + { + rl_backward_char (count, key); + rl_kill_text (orig_point, rl_point); + } + else if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + c = rl_line_buffer[--rl_point]; + rl_delete_text (rl_point, orig_point); + /* The erase-at-end-of-line hack is of questionable merit now. */ + if (rl_point == rl_end && ISPRINT ((unsigned char)c) && _rl_last_c_pos) + { + int l; + l = rl_character_len (c, rl_point); + _rl_erase_at_end_of_line (l); + } + } + else + { + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + rl_delete_text (rl_point, orig_point); + } + + return 0; +} + +/* Delete the character under the cursor. Given a numeric argument, + kill that many characters instead. */ +int +rl_delete (int count, int key) +{ + int xpoint; + + if (count < 0) + return (_rl_rubout_char (-count, key)); + + if (rl_point == rl_end) + { + rl_ding (); + return 1; + } + + if (count > 1 || rl_explicit_arg) + { + xpoint = rl_point; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_forward_char (count, key); + else + rl_forward_byte (count, key); + + rl_kill_text (xpoint, rl_point); + rl_point = xpoint; + } + else + { + xpoint = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + rl_delete_text (rl_point, xpoint); + } + return 0; +} + +/* Delete the character under the cursor, unless the insertion + point is at the end of the line, in which case the character + behind the cursor is deleted. COUNT is obeyed and may be used + to delete forward or backward that many characters. */ +int +rl_rubout_or_delete (int count, int key) +{ + if (rl_end != 0 && rl_point == rl_end) + return (_rl_rubout_char (count, key)); + else + return (rl_delete (count, key)); +} + +/* Delete all spaces and tabs around point. */ +int +rl_delete_horizontal_space (int count, int ignore) +{ + int start; + + while (rl_point && whitespace (rl_line_buffer[rl_point - 1])) + rl_point--; + + start = rl_point; + + while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) + rl_point++; + + if (start != rl_point) + { + rl_delete_text (start, rl_point); + rl_point = start; + } + + if (rl_point < 0) + rl_point = 0; + + return 0; +} + +/* Like the tcsh editing function delete-char-or-list. The eof character + is caught before this is invoked, so this really does the same thing as + delete-char-or-list-or-eof, as long as it's bound to the eof character. */ +int +rl_delete_or_show_completions (int count, int key) +{ + if (rl_end != 0 && rl_point == rl_end) + return (rl_possible_completions (count, key)); + else + return (rl_delete (count, key)); +} + +#ifndef RL_COMMENT_BEGIN_DEFAULT +#define RL_COMMENT_BEGIN_DEFAULT "#" +#endif + +/* Turn the current line into a comment in shell history. + A K*rn shell style function. */ +int +rl_insert_comment (int count, int key) +{ + char *rl_comment_text; + int rl_comment_len; + + rl_beg_of_line (1, key); + rl_comment_text = _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT; + + if (rl_explicit_arg == 0) + rl_insert_text (rl_comment_text); + else + { + rl_comment_len = strlen (rl_comment_text); + if (STREQN (rl_comment_text, rl_line_buffer, rl_comment_len)) + rl_delete_text (rl_point, rl_point + rl_comment_len); + else + rl_insert_text (rl_comment_text); + } + + (*rl_redisplay_function) (); + rl_newline (1, '\n'); + + return (0); +} + +/* **************************************************************** */ +/* */ +/* Changing Case */ +/* */ +/* **************************************************************** */ + +/* The three kinds of things that we know how to do. */ +#define UpCase 1 +#define DownCase 2 +#define CapCase 3 + +/* Uppercase the word at point. */ +int +rl_upcase_word (int count, int key) +{ + return (rl_change_case (count, UpCase)); +} + +/* Lowercase the word at point. */ +int +rl_downcase_word (int count, int key) +{ + return (rl_change_case (count, DownCase)); +} + +/* Upcase the first letter, downcase the rest. */ +int +rl_capitalize_word (int count, int key) +{ + return (rl_change_case (count, CapCase)); +} + +/* The meaty function. + Change the case of COUNT words, performing OP on them. + OP is one of UpCase, DownCase, or CapCase. + If a negative argument is given, leave point where it started, + otherwise, leave it where it moves to. */ +static int +rl_change_case (int count, int op) +{ + int start, next, end; + int inword, nc, nop; + wchar_t c; +#if defined (HANDLE_MULTIBYTE) + wchar_t wc, nwc; + char mb[MB_LEN_MAX+1]; + int mlen; + size_t m; + mbstate_t mps; +#endif + + start = rl_point; + rl_forward_word (count, 0); + end = rl_point; + + if (op != UpCase && op != DownCase && op != CapCase) + { + rl_ding (); + return 1; + } + + if (count < 0) + SWAP (start, end); + +#if defined (HANDLE_MULTIBYTE) + memset (&mps, 0, sizeof (mbstate_t)); +#endif + + /* We are going to modify some text, so let's prepare to undo it. */ + rl_modifying (start, end); + + inword = 0; + while (start < end) + { + c = _rl_char_value (rl_line_buffer, start); + /* This assumes that the upper and lower case versions are the same width. */ + next = MB_NEXTCHAR (rl_line_buffer, start, 1, MB_FIND_NONZERO); + + if (_rl_walphabetic (c) == 0) + { + inword = 0; + start = next; + continue; + } + + if (op == CapCase) + { + nop = inword ? DownCase : UpCase; + inword = 1; + } + else + nop = op; + /* Can't check isascii here; some languages (e.g, Turkish) have + multibyte upper and lower case equivalents of single-byte ascii + characters */ + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + nc = (nop == UpCase) ? _rl_to_upper (c) : _rl_to_lower (c); + rl_line_buffer[start] = nc; + } +#if defined (HANDLE_MULTIBYTE) + else + { + m = mbrtowc (&wc, rl_line_buffer + start, end - start, &mps); + if (MB_INVALIDCH (m)) + wc = (wchar_t)rl_line_buffer[start]; + else if (MB_NULLWCH (m)) + wc = L'\0'; + nwc = (nop == UpCase) ? _rl_to_wupper (wc) : _rl_to_wlower (wc); + if (nwc != wc) /* just skip unchanged characters */ + { + char *s, *e; + mbstate_t ts; + + memset (&ts, 0, sizeof (mbstate_t)); + mlen = wcrtomb (mb, nwc, &ts); + if (mlen < 0) + { + nwc = wc; + memset (&ts, 0, sizeof (mbstate_t)); + mlen = wcrtomb (mb, nwc, &ts); + if (mlen < 0) /* should not happen */ + strncpy (mb, rl_line_buffer + start, mlen = m); + } + if (mlen > 0) + mb[mlen] = '\0'; + /* what to do if m != mlen? adjust below */ + /* m == length of old char, mlen == length of new char */ + s = rl_line_buffer + start; + e = rl_line_buffer + rl_end; + if (m == mlen) + memcpy (s, mb, mlen); + else if (m > mlen) + { + memcpy (s, mb, mlen); + memmove (s + mlen, s + m, (e - s) - m); + next -= m - mlen; /* next char changes */ + end -= m - mlen; /* end of word changes */ + rl_end -= m - mlen; /* end of line changes */ + rl_line_buffer[rl_end] = 0; + } + else if (m < mlen) + { + rl_extend_line_buffer (rl_end + mlen + (e - s) - m + 2); + s = rl_line_buffer + start; /* have to redo this */ + e = rl_line_buffer + rl_end; + memmove (s + mlen, s + m, (e - s) - m); + memcpy (s, mb, mlen); + next += mlen - m; /* next char changes */ + end += mlen - m; /* end of word changes */ + rl_end += mlen - m; /* end of line changes */ + rl_line_buffer[rl_end] = 0; + } + } + } +#endif + + start = next; + } + + rl_point = end; + return 0; +} + +/* **************************************************************** */ +/* */ +/* Transposition */ +/* */ +/* **************************************************************** */ + +/* Transpose the words at point. If point is at the end of the line, + transpose the two words before point. */ +int +rl_transpose_words (int count, int key) +{ + char *word1, *word2; + int w1_beg, w1_end, w2_beg, w2_end; + int orig_point = rl_point; + + if (!count) + return 0; + + /* Find the two words. */ + rl_forward_word (count, key); + w2_end = rl_point; + rl_backward_word (1, key); + w2_beg = rl_point; + rl_backward_word (count, key); + w1_beg = rl_point; + rl_forward_word (1, key); + w1_end = rl_point; + + /* Do some check to make sure that there really are two words. */ + if ((w1_beg == w2_beg) || (w2_beg < w1_end)) + { + rl_ding (); + rl_point = orig_point; + return 1; + } + + /* Get the text of the words. */ + word1 = rl_copy_text (w1_beg, w1_end); + word2 = rl_copy_text (w2_beg, w2_end); + + /* We are about to do many insertions and deletions. Remember them + as one operation. */ + rl_begin_undo_group (); + + /* Do the stuff at word2 first, so that we don't have to worry + about word1 moving. */ + rl_point = w2_beg; + rl_delete_text (w2_beg, w2_end); + rl_insert_text (word1); + + rl_point = w1_beg; + rl_delete_text (w1_beg, w1_end); + rl_insert_text (word2); + + /* This is exactly correct since the text before this point has not + changed in length. */ + rl_point = w2_end; + + /* I think that does it. */ + rl_end_undo_group (); + xfree (word1); + xfree (word2); + + return 0; +} + +/* Transpose the characters at point. If point is at the end of the line, + then transpose the characters before point. */ +int +rl_transpose_chars (int count, int key) +{ +#if defined (HANDLE_MULTIBYTE) + char *dummy; + int i; +#else + char dummy[2]; +#endif + int char_length, prev_point; + + if (count == 0) + return 0; + + if (!rl_point || rl_end < 2) + { + rl_ding (); + return 1; + } + + rl_begin_undo_group (); + + if (rl_point == rl_end) + { + rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); + count = 1; + } + + prev_point = rl_point; + rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); + +#if defined (HANDLE_MULTIBYTE) + char_length = prev_point - rl_point; + dummy = (char *)xmalloc (char_length + 1); + for (i = 0; i < char_length; i++) + dummy[i] = rl_line_buffer[rl_point + i]; + dummy[i] = '\0'; +#else + dummy[0] = rl_line_buffer[rl_point]; + dummy[char_length = 1] = '\0'; +#endif + + rl_delete_text (rl_point, rl_point + char_length); + + rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); + + _rl_fix_point (0); + rl_insert_text (dummy); + rl_end_undo_group (); + +#if defined (HANDLE_MULTIBYTE) + xfree (dummy); +#endif + + return 0; +} + +/* **************************************************************** */ +/* */ +/* Character Searching */ +/* */ +/* **************************************************************** */ + +int +#if defined (HANDLE_MULTIBYTE) +_rl_char_search_internal (int count, int dir, char *smbchar, int len) +#else +_rl_char_search_internal (int count, int dir, int schar) +#endif +{ + int pos, inc; +#if defined (HANDLE_MULTIBYTE) + int prepos; +#endif + + if (dir == 0) + return 1; + + pos = rl_point; + inc = (dir < 0) ? -1 : 1; + while (count) + { + if ((dir < 0 && pos <= 0) || (dir > 0 && pos >= rl_end)) + { + rl_ding (); + return 1; + } + +#if defined (HANDLE_MULTIBYTE) + pos = (inc > 0) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY) + : _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); +#else + pos += inc; +#endif + do + { +#if defined (HANDLE_MULTIBYTE) + if (_rl_is_mbchar_matched (rl_line_buffer, pos, rl_end, smbchar, len)) +#else + if (rl_line_buffer[pos] == schar) +#endif + { + count--; + if (dir < 0) + rl_point = (dir == BTO) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY) + : pos; + else + rl_point = (dir == FTO) ? _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY) + : pos; + break; + } +#if defined (HANDLE_MULTIBYTE) + prepos = pos; +#endif + } +#if defined (HANDLE_MULTIBYTE) + while ((dir < 0) ? (pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY)) != prepos + : (pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY)) != prepos); +#else + while ((dir < 0) ? pos-- : ++pos < rl_end); +#endif + } + return (0); +} + +/* Search COUNT times for a character read from the current input stream. + FDIR is the direction to search if COUNT is non-negative; otherwise + the search goes in BDIR. So much is dependent on HANDLE_MULTIBYTE + that there are two separate versions of this function. */ +#if defined (HANDLE_MULTIBYTE) +static int +_rl_char_search (int count, int fdir, int bdir) +{ + char mbchar[MB_LEN_MAX]; + int mb_len; + + mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX); + + if (mb_len <= 0) + return 1; + + if (count < 0) + return (_rl_char_search_internal (-count, bdir, mbchar, mb_len)); + else + return (_rl_char_search_internal (count, fdir, mbchar, mb_len)); +} +#else /* !HANDLE_MULTIBYTE */ +static int +_rl_char_search (int count, int fdir, int bdir) +{ + int c; + + c = _rl_bracketed_read_key (); + if (c < 0) + return 1; + + if (count < 0) + return (_rl_char_search_internal (-count, bdir, c)); + else + return (_rl_char_search_internal (count, fdir, c)); +} +#endif /* !HANDLE_MULTIBYTE */ + +#if defined (READLINE_CALLBACKS) +static int +_rl_char_search_callback (data) + _rl_callback_generic_arg *data; +{ + _rl_callback_func = 0; + _rl_want_redisplay = 1; + + return (_rl_char_search (data->count, data->i1, data->i2)); +} +#endif + +int +rl_char_search (int count, int key) +{ +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_callback_data = _rl_callback_data_alloc (count); + _rl_callback_data->i1 = FFIND; + _rl_callback_data->i2 = BFIND; + _rl_callback_func = _rl_char_search_callback; + return (0); + } +#endif + + return (_rl_char_search (count, FFIND, BFIND)); +} + +int +rl_backward_char_search (int count, int key) +{ +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_callback_data = _rl_callback_data_alloc (count); + _rl_callback_data->i1 = BFIND; + _rl_callback_data->i2 = FFIND; + _rl_callback_func = _rl_char_search_callback; + return (0); + } +#endif + + return (_rl_char_search (count, BFIND, FFIND)); +} + +/* **************************************************************** */ +/* */ +/* The Mark and the Region. */ +/* */ +/* **************************************************************** */ + +/* Set the mark at POSITION. */ +int +_rl_set_mark_at_pos (int position) +{ + if (position < 0 || position > rl_end) + return 1; + + rl_mark = position; + return 0; +} + +/* A bindable command to set the mark. */ +int +rl_set_mark (int count, int key) +{ + return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point)); +} + +/* Exchange the position of mark and point. */ +int +rl_exchange_point_and_mark (int count, int key) +{ + if (rl_mark > rl_end) + rl_mark = -1; + + if (rl_mark < 0) + { + rl_ding (); + rl_mark = 0; /* like _RL_FIX_POINT */ + return 1; + } + else + { + SWAP (rl_point, rl_mark); + rl_activate_mark (); + } + + return 0; +} + +/* Active mark support */ + +/* Is the region active? */ +static int mark_active = 0; + +/* Does the current command want the mark to remain active when it completes? */ +int _rl_keep_mark_active; + +void +rl_keep_mark_active (void) +{ + _rl_keep_mark_active++; +} + +void +rl_activate_mark (void) +{ + mark_active = 1; + rl_keep_mark_active (); +} + +void +rl_deactivate_mark (void) +{ + mark_active = 0; +} + +int +rl_mark_active_p (void) +{ + return (mark_active); +} diff --git a/bash-5.1/lib/readline/tilde.c b/bash-5.1/lib/readline/tilde.c new file mode 100644 index 0000000000000000000000000000000000000000..d678a31ab2735a95b60906fd979e60cfe63c8056 --- /dev/null +++ b/bash-5.1/lib/readline/tilde.c @@ -0,0 +1,493 @@ +/* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */ + +/* Copyright (C) 1988-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include +#if defined (HAVE_PWD_H) +#include +#endif + +#include "tilde.h" + +#if defined (TEST) || defined (STATIC_MALLOC) +static void *xmalloc (), *xrealloc (); +#else +# include "xmalloc.h" +#endif /* TEST || STATIC_MALLOC */ + +#if !defined (HAVE_GETPW_DECLS) +# if defined (HAVE_GETPWUID) +extern struct passwd *getpwuid (uid_t); +# endif +# if defined (HAVE_GETPWNAM) +extern struct passwd *getpwnam (const char *); +# endif +#endif /* !HAVE_GETPW_DECLS */ + +#if !defined (savestring) +#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) +#endif /* !savestring */ + +#if !defined (NULL) +# if defined (__STDC__) +# define NULL ((void *) 0) +# else +# define NULL 0x0 +# endif /* !__STDC__ */ +#endif /* !NULL */ + +/* If being compiled as part of bash, these will be satisfied from + variables.o. If being compiled as part of readline, they will + be satisfied from shell.o. */ +extern char *sh_get_home_dir (void); +extern char *sh_get_env_value (const char *); + +/* The default value of tilde_additional_prefixes. This is set to + whitespace preceding a tilde so that simple programs which do not + perform any word separation get desired behaviour. */ +static const char *default_prefixes[] = + { " ~", "\t~", (const char *)NULL }; + +/* The default value of tilde_additional_suffixes. This is set to + whitespace or newline so that simple programs which do not + perform any word separation get desired behaviour. */ +static const char *default_suffixes[] = + { " ", "\n", (const char *)NULL }; + +/* If non-null, this contains the address of a function that the application + wants called before trying the standard tilde expansions. The function + is called with the text sans tilde, and returns a malloc()'ed string + which is the expansion, or a NULL pointer if the expansion fails. */ +tilde_hook_func_t *tilde_expansion_preexpansion_hook = (tilde_hook_func_t *)NULL; + +/* If non-null, this contains the address of a function to call if the + standard meaning for expanding a tilde fails. The function is called + with the text (sans tilde, as in "foo"), and returns a malloc()'ed string + which is the expansion, or a NULL pointer if there is no expansion. */ +tilde_hook_func_t *tilde_expansion_failure_hook = (tilde_hook_func_t *)NULL; + +/* When non-null, this is a NULL terminated array of strings which + are duplicates for a tilde prefix. Bash uses this to expand + `=~' and `:~'. */ +char **tilde_additional_prefixes = (char **)default_prefixes; + +/* When non-null, this is a NULL terminated array of strings which match + the end of a username, instead of just "/". Bash sets this to + `:' and `=~'. */ +char **tilde_additional_suffixes = (char **)default_suffixes; + +static int tilde_find_prefix (const char *, int *); +static int tilde_find_suffix (const char *); +static char *isolate_tilde_prefix (const char *, int *); +static char *glue_prefix_and_suffix (char *, const char *, int); + +/* Find the start of a tilde expansion in STRING, and return the index of + the tilde which starts the expansion. Place the length of the text + which identified this tilde starter in LEN, excluding the tilde itself. */ +static int +tilde_find_prefix (const char *string, int *len) +{ + register int i, j, string_len; + register char **prefixes; + + prefixes = tilde_additional_prefixes; + + string_len = strlen (string); + *len = 0; + + if (*string == '\0' || *string == '~') + return (0); + + if (prefixes) + { + for (i = 0; i < string_len; i++) + { + for (j = 0; prefixes[j]; j++) + { + if (strncmp (string + i, prefixes[j], strlen (prefixes[j])) == 0) + { + *len = strlen (prefixes[j]) - 1; + return (i + *len); + } + } + } + } + return (string_len); +} + +/* Find the end of a tilde expansion in STRING, and return the index of + the character which ends the tilde definition. */ +static int +tilde_find_suffix (const char *string) +{ + register int i, j, string_len; + register char **suffixes; + + suffixes = tilde_additional_suffixes; + string_len = strlen (string); + + for (i = 0; i < string_len; i++) + { +#if defined (__MSDOS__) + if (string[i] == '/' || string[i] == '\\' /* || !string[i] */) +#else + if (string[i] == '/' /* || !string[i] */) +#endif + break; + + for (j = 0; suffixes && suffixes[j]; j++) + { + if (strncmp (string + i, suffixes[j], strlen (suffixes[j])) == 0) + return (i); + } + } + return (i); +} + +/* Return a new string which is the result of tilde expanding STRING. */ +char * +tilde_expand (const char *string) +{ + char *result; + int result_size, result_index; + + result_index = result_size = 0; + if (result = strchr (string, '~')) + result = (char *)xmalloc (result_size = (strlen (string) + 16)); + else + result = (char *)xmalloc (result_size = (strlen (string) + 1)); + + /* Scan through STRING expanding tildes as we come to them. */ + while (1) + { + register int start, end; + char *tilde_word, *expansion; + int len; + + /* Make START point to the tilde which starts the expansion. */ + start = tilde_find_prefix (string, &len); + + /* Copy the skipped text into the result. */ + if ((result_index + start + 1) > result_size) + result = (char *)xrealloc (result, 1 + (result_size += (start + 20))); + + strncpy (result + result_index, string, start); + result_index += start; + + /* Advance STRING to the starting tilde. */ + string += start; + + /* Make END be the index of one after the last character of the + username. */ + end = tilde_find_suffix (string); + + /* If both START and END are zero, we are all done. */ + if (!start && !end) + break; + + /* Expand the entire tilde word, and copy it into RESULT. */ + tilde_word = (char *)xmalloc (1 + end); + strncpy (tilde_word, string, end); + tilde_word[end] = '\0'; + string += end; + + expansion = tilde_expand_word (tilde_word); + + if (expansion == 0) + expansion = tilde_word; + else + xfree (tilde_word); + + len = strlen (expansion); +#ifdef __CYGWIN__ + /* Fix for Cygwin to prevent ~user/xxx from expanding to //xxx when + $HOME for `user' is /. On cygwin, // denotes a network drive. */ + if (len > 1 || *expansion != '/' || *string != '/') +#endif + { + if ((result_index + len + 1) > result_size) + result = (char *)xrealloc (result, 1 + (result_size += (len + 20))); + + strcpy (result + result_index, expansion); + result_index += len; + } + xfree (expansion); + } + + result[result_index] = '\0'; + + return (result); +} + +/* Take FNAME and return the tilde prefix we want expanded. If LENP is + non-null, the index of the end of the prefix into FNAME is returned in + the location it points to. */ +static char * +isolate_tilde_prefix (const char *fname, int *lenp) +{ + char *ret; + int i; + + ret = (char *)xmalloc (strlen (fname)); +#if defined (__MSDOS__) + for (i = 1; fname[i] && fname[i] != '/' && fname[i] != '\\'; i++) +#else + for (i = 1; fname[i] && fname[i] != '/'; i++) +#endif + ret[i - 1] = fname[i]; + ret[i - 1] = '\0'; + if (lenp) + *lenp = i; + return ret; +} + +#if 0 +/* Public function to scan a string (FNAME) beginning with a tilde and find + the portion of the string that should be passed to the tilde expansion + function. Right now, it just calls tilde_find_suffix and allocates new + memory, but it can be expanded to do different things later. */ +char * +tilde_find_word (const char *fname, int flags, int *lenp) +{ + int x; + char *r; + + x = tilde_find_suffix (fname); + if (x == 0) + { + r = savestring (fname); + if (lenp) + *lenp = 0; + } + else + { + r = (char *)xmalloc (1 + x); + strncpy (r, fname, x); + r[x] = '\0'; + if (lenp) + *lenp = x; + } + + return r; +} +#endif + +/* Return a string that is PREFIX concatenated with SUFFIX starting at + SUFFIND. */ +static char * +glue_prefix_and_suffix (char *prefix, const char *suffix, int suffind) +{ + char *ret; + int plen, slen; + + plen = (prefix && *prefix) ? strlen (prefix) : 0; + slen = strlen (suffix + suffind); + ret = (char *)xmalloc (plen + slen + 1); + if (plen) + strcpy (ret, prefix); + strcpy (ret + plen, suffix + suffind); + return ret; +} + +/* Do the work of tilde expansion on FILENAME. FILENAME starts with a + tilde. If there is no expansion, call tilde_expansion_failure_hook. + This always returns a newly-allocated string, never static storage. */ +char * +tilde_expand_word (const char *filename) +{ + char *dirname, *expansion, *username; + int user_len; + struct passwd *user_entry; + + if (filename == 0) + return ((char *)NULL); + + if (*filename != '~') + return (savestring (filename)); + + /* A leading `~/' or a bare `~' is *always* translated to the value of + $HOME or the home directory of the current user, regardless of any + preexpansion hook. */ + if (filename[1] == '\0' || filename[1] == '/') + { + /* Prefix $HOME to the rest of the string. */ + expansion = sh_get_env_value ("HOME"); +#if defined (_WIN32) + if (expansion == 0) + expansion = sh_get_env_value ("APPDATA"); +#endif + + /* If there is no HOME variable, look up the directory in + the password database. */ + if (expansion == 0) + expansion = sh_get_home_dir (); + + return (glue_prefix_and_suffix (expansion, filename, 1)); + } + + username = isolate_tilde_prefix (filename, &user_len); + + if (tilde_expansion_preexpansion_hook) + { + expansion = (*tilde_expansion_preexpansion_hook) (username); + if (expansion) + { + dirname = glue_prefix_and_suffix (expansion, filename, user_len); + xfree (username); + xfree (expansion); + return (dirname); + } + } + + /* No preexpansion hook, or the preexpansion hook failed. Look in the + password database. */ + dirname = (char *)NULL; +#if defined (HAVE_GETPWNAM) + user_entry = getpwnam (username); +#else + user_entry = 0; +#endif + if (user_entry == 0) + { + /* If the calling program has a special syntax for expanding tildes, + and we couldn't find a standard expansion, then let them try. */ + if (tilde_expansion_failure_hook) + { + expansion = (*tilde_expansion_failure_hook) (username); + if (expansion) + { + dirname = glue_prefix_and_suffix (expansion, filename, user_len); + xfree (expansion); + } + } + /* If we don't have a failure hook, or if the failure hook did not + expand the tilde, return a copy of what we were passed. */ + if (dirname == 0) + dirname = savestring (filename); + } +#if defined (HAVE_GETPWENT) + else + dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len); +#endif + + xfree (username); +#if defined (HAVE_GETPWENT) + endpwent (); +#endif + return (dirname); +} + + +#if defined (TEST) +#undef NULL +#include + +main (int argc, char **argv) +{ + char *result, line[512]; + int done = 0; + + while (!done) + { + printf ("~expand: "); + fflush (stdout); + + if (!gets (line)) + strcpy (line, "done"); + + if ((strcmp (line, "done") == 0) || + (strcmp (line, "quit") == 0) || + (strcmp (line, "exit") == 0)) + { + done = 1; + break; + } + + result = tilde_expand (line); + printf (" --> %s\n", result); + free (result); + } + exit (0); +} + +static void memory_error_and_abort (void); + +static void * +xmalloc (size_t bytes) +{ + void *temp = (char *)malloc (bytes); + + if (!temp) + memory_error_and_abort (); + return (temp); +} + +static void * +xrealloc (void *pointer, int bytes) +{ + void *temp; + + if (!pointer) + temp = malloc (bytes); + else + temp = realloc (pointer, bytes); + + if (!temp) + memory_error_and_abort (); + + return (temp); +} + +static void +memory_error_and_abort (void) +{ + fprintf (stderr, "readline: out of virtual memory\n"); + abort (); +} + +/* + * Local variables: + * compile-command: "gcc -g -DTEST -o tilde tilde.c" + * end: + */ +#endif /* TEST */ diff --git a/bash-5.1/lib/readline/tilde.h b/bash-5.1/lib/readline/tilde.h new file mode 100644 index 0000000000000000000000000000000000000000..e26dd0476f7b3369ff842c26716640b7a4b99b89 --- /dev/null +++ b/bash-5.1/lib/readline/tilde.h @@ -0,0 +1,80 @@ +/* tilde.h: Externally available variables and function in libtilde.a. */ + +/* Copyright (C) 1992-2009 Free Software Foundation, Inc. + + This file contains the Readline Library (Readline), a set of + routines for providing Emacs style line input to programs that ask + for it. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_TILDE_H_) +# define _TILDE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* A function can be defined using prototypes and compile on both ANSI C + and traditional C compilers with something like this: + extern char *func PARAMS((char *, char *, int)); */ + +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +typedef char *tilde_hook_func_t PARAMS((char *)); + +/* If non-null, this contains the address of a function that the application + wants called before trying the standard tilde expansions. The function + is called with the text sans tilde, and returns a malloc()'ed string + which is the expansion, or a NULL pointer if the expansion fails. */ +extern tilde_hook_func_t *tilde_expansion_preexpansion_hook; + +/* If non-null, this contains the address of a function to call if the + standard meaning for expanding a tilde fails. The function is called + with the text (sans tilde, as in "foo"), and returns a malloc()'ed string + which is the expansion, or a NULL pointer if there is no expansion. */ +extern tilde_hook_func_t *tilde_expansion_failure_hook; + +/* When non-null, this is a NULL terminated array of strings which + are duplicates for a tilde prefix. Bash uses this to expand + `=~' and `:~'. */ +extern char **tilde_additional_prefixes; + +/* When non-null, this is a NULL terminated array of strings which match + the end of a username, instead of just "/". Bash sets this to + `:' and `=~'. */ +extern char **tilde_additional_suffixes; + +/* Return a new string which is the result of tilde expanding STRING. */ +extern char *tilde_expand PARAMS((const char *)); + +/* Do the work of tilde expansion on FILENAME. FILENAME starts with a + tilde. If there is no expansion, call tilde_expansion_failure_hook. */ +extern char *tilde_expand_word PARAMS((const char *)); + +/* Find the portion of the string beginning with ~ that should be expanded. */ +extern char *tilde_find_word PARAMS((const char *, int, int *)); + +#ifdef __cplusplus +} +#endif + +#endif /* _TILDE_H_ */ diff --git a/bash-5.1/lib/readline/undo.c b/bash-5.1/lib/readline/undo.c new file mode 100644 index 0000000000000000000000000000000000000000..147999119a6123532e8d932f2ccb1783e4c1a7a7 --- /dev/null +++ b/bash-5.1/lib/readline/undo.c @@ -0,0 +1,367 @@ +/* undo.c - manage list of changes to lines, offering opportunity to undo them */ + +/* Copyright (C) 1987-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_UNISTD_H) +# include /* for _POSIX_VERSION */ +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +extern void _hs_replace_history_data PARAMS((int, histdata_t *, histdata_t *)); + +extern HIST_ENTRY *_rl_saved_line_for_history; + +/* Non-zero tells rl_delete_text and rl_insert_text to not add to + the undo list. */ +int _rl_doing_an_undo = 0; + +/* How many unclosed undo groups we currently have. */ +int _rl_undo_group_level = 0; + +/* The current undo list for THE_LINE. */ +UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL; + +/* **************************************************************** */ +/* */ +/* Undo, and Undoing */ +/* */ +/* **************************************************************** */ + +static UNDO_LIST * +alloc_undo_entry (enum undo_code what, int start, int end, char *text) +{ + UNDO_LIST *temp; + + temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST)); + temp->what = what; + temp->start = start; + temp->end = end; + temp->text = text; + + temp->next = (UNDO_LIST *)NULL; + return temp; +} + +/* Remember how to undo something. Concatenate some undos if that + seems right. */ +void +rl_add_undo (enum undo_code what, int start, int end, char *text) +{ + UNDO_LIST *temp; + + temp = alloc_undo_entry (what, start, end, text); + temp->next = rl_undo_list; + rl_undo_list = temp; +} + +/* Free an UNDO_LIST */ +void +_rl_free_undo_list (UNDO_LIST *ul) +{ + UNDO_LIST *release; + + while (ul) + { + release = ul; + ul = ul->next; + + if (release->what == UNDO_DELETE) + xfree (release->text); + + xfree (release); + } +} + +/* Free the existing undo list. */ +void +rl_free_undo_list (void) +{ + UNDO_LIST *release, *orig_list; + + orig_list = rl_undo_list; + _rl_free_undo_list (rl_undo_list); + rl_undo_list = (UNDO_LIST *)NULL; + _hs_replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *)NULL); +} + +UNDO_LIST * +_rl_copy_undo_entry (UNDO_LIST *entry) +{ + UNDO_LIST *new; + + new = alloc_undo_entry (entry->what, entry->start, entry->end, (char *)NULL); + new->text = entry->text ? savestring (entry->text) : 0; + return new; +} + +UNDO_LIST * +_rl_copy_undo_list (UNDO_LIST *head) +{ + UNDO_LIST *list, *new, *roving, *c; + + if (head == 0) + return head; + + list = head; + new = 0; + while (list) + { + c = _rl_copy_undo_entry (list); + if (new == 0) + roving = new = c; + else + { + roving->next = c; + roving = roving->next; + } + list = list->next; + } + + roving->next = 0; + return new; +} + +/* Undo the next thing in the list. Return 0 if there + is nothing to undo, or non-zero if there was. */ +int +rl_do_undo (void) +{ + UNDO_LIST *release, *search; + int waiting_for_begin, start, end; + HIST_ENTRY *cur, *temp; + +#define TRANS(i) ((i) == -1 ? rl_point : ((i) == -2 ? rl_end : (i))) + + start = end = waiting_for_begin = 0; + do + { + if (rl_undo_list == 0) + return (0); + + _rl_doing_an_undo = 1; + RL_SETSTATE(RL_STATE_UNDOING); + + /* To better support vi-mode, a start or end value of -1 means + rl_point, and a value of -2 means rl_end. */ + if (rl_undo_list->what == UNDO_DELETE || rl_undo_list->what == UNDO_INSERT) + { + start = TRANS (rl_undo_list->start); + end = TRANS (rl_undo_list->end); + } + + switch (rl_undo_list->what) + { + /* Undoing deletes means inserting some text. */ + case UNDO_DELETE: + rl_point = start; + _rl_fix_point (1); + rl_insert_text (rl_undo_list->text); + xfree (rl_undo_list->text); + break; + + /* Undoing inserts means deleting some text. */ + case UNDO_INSERT: + rl_delete_text (start, end); + rl_point = start; + _rl_fix_point (1); + break; + + /* Undoing an END means undoing everything 'til we get to a BEGIN. */ + case UNDO_END: + waiting_for_begin++; + break; + + /* Undoing a BEGIN means that we are done with this group. */ + case UNDO_BEGIN: + if (waiting_for_begin) + waiting_for_begin--; + else + rl_ding (); + break; + } + + _rl_doing_an_undo = 0; + RL_UNSETSTATE(RL_STATE_UNDOING); + + release = rl_undo_list; + rl_undo_list = rl_undo_list->next; + release->next = 0; /* XXX */ + + /* If we are editing a history entry, make sure the change is replicated + in the history entry's line */ + cur = current_history (); + if (cur && cur->data && (UNDO_LIST *)cur->data == release) + { + temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list); + xfree (temp->line); + FREE (temp->timestamp); + xfree (temp); + } + + /* Make sure there aren't any history entries with that undo list */ + _hs_replace_history_data (-1, (histdata_t *)release, (histdata_t *)rl_undo_list); + + /* And make sure this list isn't anywhere in the saved line for history */ + if (_rl_saved_line_for_history && _rl_saved_line_for_history->data) + { + /* Brute force; no finesse here */ + search = (UNDO_LIST *)_rl_saved_line_for_history->data; + if (search == release) + _rl_saved_line_for_history->data = rl_undo_list; + else + { + while (search->next) + { + if (search->next == release) + { + search->next = rl_undo_list; + break; + } + search = search->next; + } + } + } + + xfree (release); + } + while (waiting_for_begin); + + return (1); +} +#undef TRANS + +int +_rl_fix_last_undo_of_type (int type, int start, int end) +{ + UNDO_LIST *rl; + + for (rl = rl_undo_list; rl; rl = rl->next) + { + if (rl->what == type) + { + rl->start = start; + rl->end = end; + return 0; + } + } + return 1; +} + +/* Begin a group. Subsequent undos are undone as an atomic operation. */ +int +rl_begin_undo_group (void) +{ + rl_add_undo (UNDO_BEGIN, 0, 0, 0); + _rl_undo_group_level++; + return 0; +} + +/* End an undo group started with rl_begin_undo_group (). */ +int +rl_end_undo_group (void) +{ + rl_add_undo (UNDO_END, 0, 0, 0); + _rl_undo_group_level--; + return 0; +} + +/* Save an undo entry for the text from START to END. */ +int +rl_modifying (int start, int end) +{ + if (start > end) + { + SWAP (start, end); + } + + if (start != end) + { + char *temp = rl_copy_text (start, end); + rl_begin_undo_group (); + rl_add_undo (UNDO_DELETE, start, end, temp); + rl_add_undo (UNDO_INSERT, start, end, (char *)NULL); + rl_end_undo_group (); + } + return 0; +} + +/* Revert the current line to its previous state. */ +int +rl_revert_line (int count, int key) +{ + if (rl_undo_list == 0) + rl_ding (); + else + { + while (rl_undo_list) + rl_do_undo (); +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + rl_point = rl_mark = 0; /* rl_end should be set correctly */ +#endif + } + + return 0; +} + +/* Do some undoing of things that were done. */ +int +rl_undo_command (int count, int key) +{ + if (count < 0) + return 0; /* Nothing to do. */ + + while (count) + { + if (rl_do_undo ()) + count--; + else + { + rl_ding (); + break; + } + } + return 0; +} diff --git a/bash-5.1/lib/readline/util.c b/bash-5.1/lib/readline/util.c new file mode 100644 index 0000000000000000000000000000000000000000..1576b55d50d53cf2a61b32a879697b9a338f5647 --- /dev/null +++ b/bash-5.1/lib/readline/util.c @@ -0,0 +1,576 @@ +/* util.c -- readline utility functions */ + +/* Copyright (C) 1987-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include +#include "posixjmp.h" + +#if defined (HAVE_UNISTD_H) +# include /* for _POSIX_VERSION */ +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +#if defined (TIOCSTAT_IN_SYS_IOCTL) +# include +#endif /* TIOCSTAT_IN_SYS_IOCTL */ + +/* Some standard library routines. */ +#include "readline.h" + +#include "rlprivate.h" +#include "xmalloc.h" +#include "rlshell.h" + +/* **************************************************************** */ +/* */ +/* Utility Functions */ +/* */ +/* **************************************************************** */ + +/* Return 0 if C is not a member of the class of characters that belong + in words, or 1 if it is. */ + +int _rl_allow_pathname_alphabetic_chars = 0; +static const char * const pathname_alphabetic_chars = "/-_=~.#$"; + +int +rl_alphabetic (int c) +{ + if (ALPHABETIC (c)) + return (1); + + return (_rl_allow_pathname_alphabetic_chars && + strchr (pathname_alphabetic_chars, c) != NULL); +} + +#if defined (HANDLE_MULTIBYTE) +int +_rl_walphabetic (wchar_t wc) +{ + int c; + + if (iswalnum (wc)) + return (1); + + c = wc & 0177; + return (_rl_allow_pathname_alphabetic_chars && + strchr (pathname_alphabetic_chars, c) != NULL); +} +#endif + +/* How to abort things. */ +int +_rl_abort_internal (void) +{ + rl_ding (); + rl_clear_message (); + _rl_reset_argument (); + rl_clear_pending_input (); + rl_deactivate_mark (); + + while (rl_executing_macro) + _rl_pop_executing_macro (); + _rl_kill_kbd_macro (); + + RL_UNSETSTATE (RL_STATE_MULTIKEY); /* XXX */ + + rl_last_func = (rl_command_func_t *)NULL; + + _rl_longjmp (_rl_top_level, 1); + return (0); +} + +int +rl_abort (int count, int key) +{ + return (_rl_abort_internal ()); +} + +int +_rl_null_function (int count, int key) +{ + return 0; +} + +int +rl_tty_status (int count, int key) +{ +#if defined (TIOCSTAT) + ioctl (1, TIOCSTAT, (char *)0); + rl_refresh_line (count, key); +#else + rl_ding (); +#endif + return 0; +} + +/* Return a copy of the string between FROM and TO. + FROM is inclusive, TO is not. */ +char * +rl_copy_text (int from, int to) +{ + register int length; + char *copy; + + /* Fix it if the caller is confused. */ + if (from > to) + SWAP (from, to); + + length = to - from; + copy = (char *)xmalloc (1 + length); + strncpy (copy, rl_line_buffer + from, length); + copy[length] = '\0'; + return (copy); +} + +/* Increase the size of RL_LINE_BUFFER until it has enough space to hold + LEN characters. */ +void +rl_extend_line_buffer (int len) +{ + while (len >= rl_line_buffer_len) + { + rl_line_buffer_len += DEFAULT_BUFFER_SIZE; + rl_line_buffer = (char *)xrealloc (rl_line_buffer, rl_line_buffer_len); + } + + _rl_set_the_line (); +} + + +/* A function for simple tilde expansion. */ +int +rl_tilde_expand (int ignore, int key) +{ + register int start, end; + char *homedir, *temp; + int len; + + end = rl_point; + start = end - 1; + + if (rl_point == rl_end && rl_line_buffer[rl_point] == '~') + { + homedir = tilde_expand ("~"); + _rl_replace_text (homedir, start, end); + xfree (homedir); + return (0); + } + else if (start >= 0 && rl_line_buffer[start] != '~') + { + for (; start >= 0 && !whitespace (rl_line_buffer[start]); start--) + ; + start++; + } + else if (start < 0) + start = 0; + + end = start; + do + end++; + while (whitespace (rl_line_buffer[end]) == 0 && end < rl_end); + + if (whitespace (rl_line_buffer[end]) || end >= rl_end) + end--; + + /* If the first character of the current word is a tilde, perform + tilde expansion and insert the result. If not a tilde, do + nothing. */ + if (rl_line_buffer[start] == '~') + { + len = end - start + 1; + temp = (char *)xmalloc (len + 1); + strncpy (temp, rl_line_buffer + start, len); + temp[len] = '\0'; + homedir = tilde_expand (temp); + xfree (temp); + + _rl_replace_text (homedir, start, end); + xfree (homedir); + } + + return (0); +} + +#if defined (USE_VARARGS) +void +#if defined (PREFER_STDARG) +_rl_ttymsg (const char *format, ...) +#else +_rl_ttymsg (va_alist) + va_dcl +#endif +{ + va_list args; +#if defined (PREFER_VARARGS) + char *format; +#endif + +#if defined (PREFER_STDARG) + va_start (args, format); +#else + va_start (args); + format = va_arg (args, char *); +#endif + + fprintf (stderr, "readline: "); + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + fflush (stderr); + + va_end (args); + + rl_forced_update_display (); +} + +void +#if defined (PREFER_STDARG) +_rl_errmsg (const char *format, ...) +#else +_rl_errmsg (va_alist) + va_dcl +#endif +{ + va_list args; +#if defined (PREFER_VARARGS) + char *format; +#endif + +#if defined (PREFER_STDARG) + va_start (args, format); +#else + va_start (args); + format = va_arg (args, char *); +#endif + + fprintf (stderr, "readline: "); + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + fflush (stderr); + + va_end (args); +} + +#else /* !USE_VARARGS */ +void +_rl_ttymsg (format, arg1, arg2) + char *format; +{ + fprintf (stderr, "readline: "); + fprintf (stderr, format, arg1, arg2); + fprintf (stderr, "\n"); + + rl_forced_update_display (); +} + +void +_rl_errmsg (format, arg1, arg2) + char *format; +{ + fprintf (stderr, "readline: "); + fprintf (stderr, format, arg1, arg2); + fprintf (stderr, "\n"); +} +#endif /* !USE_VARARGS */ + +/* **************************************************************** */ +/* */ +/* String Utility Functions */ +/* */ +/* **************************************************************** */ + +/* Determine if s2 occurs in s1. If so, return a pointer to the + match in s1. The compare is case insensitive. */ +char * +_rl_strindex (const char *s1, const char *s2) +{ + register int i, l, len; + + for (i = 0, l = strlen (s2), len = strlen (s1); (len - i) >= l; i++) + if (_rl_strnicmp (s1 + i, s2, l) == 0) + return ((char *) (s1 + i)); + return ((char *)NULL); +} + +#ifndef HAVE_STRPBRK +/* Find the first occurrence in STRING1 of any character from STRING2. + Return a pointer to the character in STRING1. */ +char * +_rl_strpbrk (const char *string1, const char *string2) +{ + register const char *scan; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + register int i, v; + + memset (&ps, 0, sizeof (mbstate_t)); +#endif + + for (; *string1; string1++) + { + for (scan = string2; *scan; scan++) + { + if (*string1 == *scan) + return ((char *)string1); + } +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + v = _rl_get_char_len (string1, &ps); + if (v > 1) + string1 += v - 1; /* -1 to account for auto-increment in loop */ + } +#endif + } + return ((char *)NULL); +} +#endif + +#if !defined (HAVE_STRCASECMP) +/* Compare at most COUNT characters from string1 to string2. Case + doesn't matter (strncasecmp). */ +int +_rl_strnicmp (const char *string1, const char *string2, int count) +{ + register const char *s1; + register const char *s2; + register int d; + + if (count <= 0 || (string1 == string2)) + return 0; + + s1 = string1; + s2 = string2; + do + { + d = _rl_to_lower (*s1) - _rl_to_lower (*s2); /* XXX - cast to unsigned char? */ + if (d != 0) + return d; + if (*s1++ == '\0') + break; + s2++; + } + while (--count != 0); + + return (0); +} + +/* strcmp (), but caseless (strcasecmp). */ +int +_rl_stricmp (const char *string1, const char *string2) +{ + register const char *s1; + register const char *s2; + register int d; + + s1 = string1; + s2 = string2; + + if (s1 == s2) + return 0; + + while ((d = _rl_to_lower (*s1) - _rl_to_lower (*s2)) == 0) + { + if (*s1++ == '\0') + return 0; + s2++; + } + + return (d); +} +#endif /* !HAVE_STRCASECMP */ + +/* Stupid comparison routine for qsort () ing strings. */ +int +_rl_qsort_string_compare (char **s1, char **s2) +{ +#if defined (HAVE_STRCOLL) + return (strcoll (*s1, *s2)); +#else + int result; + + result = **s1 - **s2; + if (result == 0) + result = strcmp (*s1, *s2); + + return result; +#endif +} + +/* Function equivalents for the macros defined in chardefs.h. */ +#define FUNCTION_FOR_MACRO(f) int (f) (int c) { return f (c); } + +FUNCTION_FOR_MACRO (_rl_digit_p) +FUNCTION_FOR_MACRO (_rl_digit_value) +FUNCTION_FOR_MACRO (_rl_lowercase_p) +FUNCTION_FOR_MACRO (_rl_pure_alphabetic) +FUNCTION_FOR_MACRO (_rl_to_lower) +FUNCTION_FOR_MACRO (_rl_to_upper) +FUNCTION_FOR_MACRO (_rl_uppercase_p) + +/* A convenience function, to force memory deallocation to be performed + by readline. DLLs on Windows apparently require this. */ +void +rl_free (void *mem) +{ + if (mem) + free (mem); +} + +/* Backwards compatibility, now that savestring has been removed from + all `public' readline header files. */ +#undef _rl_savestring +char * +_rl_savestring (const char *s) +{ + return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s))); +} + +#if defined (DEBUG) +#if defined (USE_VARARGS) +static FILE *_rl_tracefp; + +void +#if defined (PREFER_STDARG) +_rl_trace (const char *format, ...) +#else +_rl_trace (va_alist) + va_dcl +#endif +{ + va_list args; +#if defined (PREFER_VARARGS) + char *format; +#endif + +#if defined (PREFER_STDARG) + va_start (args, format); +#else + va_start (args); + format = va_arg (args, char *); +#endif + + if (_rl_tracefp == 0) + _rl_tropen (); + vfprintf (_rl_tracefp, format, args); + fprintf (_rl_tracefp, "\n"); + fflush (_rl_tracefp); + + va_end (args); +} + +int +_rl_tropen (void) +{ + char fnbuf[128], *x; + + if (_rl_tracefp) + fclose (_rl_tracefp); +#if defined (_WIN32) && !defined (__CYGWIN__) + x = sh_get_env_value ("TEMP"); + if (x == 0) + x = "."; +#else + x = "/var/tmp"; +#endif + snprintf (fnbuf, sizeof (fnbuf), "%s/rltrace.%ld", x, (long)getpid()); + unlink(fnbuf); + _rl_tracefp = fopen (fnbuf, "w+"); + return _rl_tracefp != 0; +} + +int +_rl_trclose (void) +{ + int r; + + r = fclose (_rl_tracefp); + _rl_tracefp = 0; + return r; +} + +void +_rl_settracefp (FILE *fp) +{ + _rl_tracefp = fp; +} +#endif +#endif /* DEBUG */ + + +#if HAVE_DECL_AUDIT_USER_TTY && defined (HAVE_LIBAUDIT_H) && defined (ENABLE_TTY_AUDIT_SUPPORT) +#include +#include +#include +#include + +/* Report STRING to the audit system. */ +void +_rl_audit_tty (char *string) +{ + struct audit_message req; + struct sockaddr_nl addr; + size_t size; + int fd; + + fd = socket (PF_NETLINK, SOCK_RAW, NETLINK_AUDIT); + if (fd < 0) + return; + size = strlen (string) + 1; + + if (NLMSG_SPACE (size) > MAX_AUDIT_MESSAGE_LENGTH) + return; + + memset (&req, 0, sizeof(req)); + req.nlh.nlmsg_len = NLMSG_SPACE (size); + req.nlh.nlmsg_type = AUDIT_USER_TTY; + req.nlh.nlmsg_flags = NLM_F_REQUEST; + req.nlh.nlmsg_seq = 0; + if (size && string) + memcpy (NLMSG_DATA(&req.nlh), string, size); + memset (&addr, 0, sizeof(addr)); + + addr.nl_family = AF_NETLINK; + addr.nl_pid = 0; + addr.nl_groups = 0; + + sendto (fd, &req, req.nlh.nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr)); + close (fd); +} +#endif diff --git a/bash-5.1/lib/readline/vi_keymap.c b/bash-5.1/lib/readline/vi_keymap.c new file mode 100644 index 0000000000000000000000000000000000000000..045258bd83b6bdc42a68a322fd1b81c2b6086b99 --- /dev/null +++ b/bash-5.1/lib/readline/vi_keymap.c @@ -0,0 +1,875 @@ +/* vi_keymap.c -- the keymap for vi_mode in readline (). */ + +/* Copyright (C) 1987-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (BUFSIZ) +#include +#endif /* !BUFSIZ */ + +#include "readline.h" + +#if 0 +extern KEYMAP_ENTRY_ARRAY vi_escape_keymap; +#endif + +/* The keymap arrays for handling vi mode. */ +KEYMAP_ENTRY_ARRAY vi_movement_keymap = { + /* The regular control keys come first. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ + { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ + { ISFUNC, rl_emacs_editing_mode }, /* Control-e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ + { ISFUNC, rl_abort }, /* Control-g */ + { ISFUNC, rl_backward_char }, /* Control-h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */ + { ISFUNC, rl_newline }, /* Control-j */ + { ISFUNC, rl_kill_line }, /* Control-k */ + { ISFUNC, rl_clear_screen }, /* Control-l */ + { ISFUNC, rl_newline }, /* Control-m */ + { ISFUNC, rl_get_next_history }, /* Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ + { ISFUNC, rl_get_previous_history }, /* Control-p */ + { ISFUNC, rl_quoted_insert }, /* Control-q */ + { ISFUNC, rl_reverse_search_history }, /* Control-r */ + { ISFUNC, rl_forward_search_history }, /* Control-s */ + { ISFUNC, rl_transpose_chars }, /* Control-t */ + { ISFUNC, rl_unix_line_discard }, /* Control-u */ + { ISFUNC, rl_quoted_insert }, /* Control-v */ + { ISFUNC, rl_vi_unix_word_rubout }, /* Control-w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-x */ + { ISFUNC, rl_yank }, /* Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ + + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */ /* vi_escape_keymap */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ + { ISFUNC, rl_vi_undo }, /* Control-_ */ + + /* The start of printing characters. */ + { ISFUNC, rl_forward_char }, /* SPACE */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ + { ISFUNC, rl_insert_comment }, /* # */ + { ISFUNC, rl_end_of_line }, /* $ */ + { ISFUNC, rl_vi_match }, /* % */ + { ISFUNC, rl_vi_tilde_expand }, /* & */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ( */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ) */ + { ISFUNC, rl_vi_complete }, /* * */ + { ISFUNC, rl_get_next_history}, /* + */ + { ISFUNC, rl_vi_char_search }, /* , */ + { ISFUNC, rl_get_previous_history }, /* - */ + { ISFUNC, rl_vi_redo }, /* . */ + { ISFUNC, rl_vi_search }, /* / */ + + /* Regular digits. */ + { ISFUNC, rl_beg_of_line }, /* 0 */ + { ISFUNC, rl_vi_arg_digit }, /* 1 */ + { ISFUNC, rl_vi_arg_digit }, /* 2 */ + { ISFUNC, rl_vi_arg_digit }, /* 3 */ + { ISFUNC, rl_vi_arg_digit }, /* 4 */ + { ISFUNC, rl_vi_arg_digit }, /* 5 */ + { ISFUNC, rl_vi_arg_digit }, /* 6 */ + { ISFUNC, rl_vi_arg_digit }, /* 7 */ + { ISFUNC, rl_vi_arg_digit }, /* 8 */ + { ISFUNC, rl_vi_arg_digit }, /* 9 */ + + /* A little more punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ + { ISFUNC, rl_vi_char_search }, /* ; */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ + { ISFUNC, rl_vi_complete }, /* = */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ + { ISFUNC, rl_vi_search }, /* ? */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ + + /* Uppercase alphabet. */ + { ISFUNC, rl_vi_append_eol }, /* A */ + { ISFUNC, rl_vi_prev_word}, /* B */ + { ISFUNC, rl_vi_change_to }, /* C */ + { ISFUNC, rl_vi_delete_to }, /* D */ + { ISFUNC, rl_vi_end_word }, /* E */ + { ISFUNC, rl_vi_char_search }, /* F */ + { ISFUNC, rl_vi_fetch_history }, /* G */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* H */ + { ISFUNC, rl_vi_insert_beg }, /* I */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* J */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* K */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* L */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* M */ + { ISFUNC, rl_vi_search_again }, /* N */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* O */ + { ISFUNC, rl_vi_put }, /* P */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Q */ + { ISFUNC, rl_vi_replace }, /* R */ + { ISFUNC, rl_vi_subst }, /* S */ + { ISFUNC, rl_vi_char_search }, /* T */ + { ISFUNC, rl_revert_line }, /* U */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* V */ + { ISFUNC, rl_vi_next_word }, /* W */ + { ISFUNC, rl_vi_rubout }, /* X */ + { ISFUNC, rl_vi_yank_to }, /* Y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Z */ + + /* Some more punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */ + { ISFUNC, rl_vi_complete }, /* \ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ + { ISFUNC, rl_vi_first_print }, /* ^ */ + { ISFUNC, rl_vi_yank_arg }, /* _ */ + { ISFUNC, rl_vi_goto_mark }, /* ` */ + + /* Lowercase alphabet. */ + { ISFUNC, rl_vi_append_mode }, /* a */ + { ISFUNC, rl_vi_prev_word }, /* b */ + { ISFUNC, rl_vi_change_to }, /* c */ + { ISFUNC, rl_vi_delete_to }, /* d */ + { ISFUNC, rl_vi_end_word }, /* e */ + { ISFUNC, rl_vi_char_search }, /* f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ + { ISFUNC, rl_backward_char }, /* h */ + { ISFUNC, rl_vi_insert_mode }, /* i */ + { ISFUNC, rl_get_next_history }, /* j */ + { ISFUNC, rl_get_previous_history }, /* k */ + { ISFUNC, rl_forward_char }, /* l */ + { ISFUNC, rl_vi_set_mark }, /* m */ + { ISFUNC, rl_vi_search_again }, /* n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* o */ + { ISFUNC, rl_vi_put }, /* p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ + { ISFUNC, rl_vi_change_char }, /* r */ + { ISFUNC, rl_vi_subst }, /* s */ + { ISFUNC, rl_vi_char_search }, /* t */ + { ISFUNC, rl_vi_undo }, /* u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ + { ISFUNC, rl_vi_next_word }, /* w */ + { ISFUNC, rl_vi_delete }, /* x */ + { ISFUNC, rl_vi_yank_to }, /* y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ + + /* Final punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ + { ISFUNC, rl_vi_column }, /* | */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ + { ISFUNC, rl_vi_change_case }, /* ~ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* RUBOUT */ + +#if KEYMAP_SIZE > 128 + /* Undefined keys. */ + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 } +#endif /* KEYMAP_SIZE > 128 */ +}; + +KEYMAP_ENTRY_ARRAY vi_insertion_keymap = { + /* The regular control keys come first. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ + { ISFUNC, rl_insert }, /* Control-a */ + { ISFUNC, rl_insert }, /* Control-b */ + { ISFUNC, rl_insert }, /* Control-c */ + { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ + { ISFUNC, rl_insert }, /* Control-e */ + { ISFUNC, rl_insert }, /* Control-f */ + { ISFUNC, rl_insert }, /* Control-g */ + { ISFUNC, rl_rubout }, /* Control-h */ + { ISFUNC, rl_complete }, /* Control-i */ + { ISFUNC, rl_newline }, /* Control-j */ + { ISFUNC, rl_insert }, /* Control-k */ + { ISFUNC, rl_insert }, /* Control-l */ + { ISFUNC, rl_newline }, /* Control-m */ + { ISFUNC, rl_menu_complete}, /* Control-n */ + { ISFUNC, rl_insert }, /* Control-o */ + { ISFUNC, rl_backward_menu_complete }, /* Control-p */ + { ISFUNC, rl_insert }, /* Control-q */ + { ISFUNC, rl_reverse_search_history }, /* Control-r */ + { ISFUNC, rl_forward_search_history }, /* Control-s */ + { ISFUNC, rl_transpose_chars }, /* Control-t */ + { ISFUNC, rl_unix_line_discard }, /* Control-u */ + { ISFUNC, rl_quoted_insert }, /* Control-v */ + { ISFUNC, rl_vi_unix_word_rubout }, /* Control-w */ + { ISFUNC, rl_insert }, /* Control-x */ + { ISFUNC, rl_yank }, /* Control-y */ + { ISFUNC, rl_insert }, /* Control-z */ + + { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ + { ISFUNC, rl_insert }, /* Control-\ */ + { ISFUNC, rl_insert }, /* Control-] */ + { ISFUNC, rl_insert }, /* Control-^ */ + { ISFUNC, rl_vi_undo }, /* Control-_ */ + + /* The start of printing characters. */ + { ISFUNC, rl_insert }, /* SPACE */ + { ISFUNC, rl_insert }, /* ! */ + { ISFUNC, rl_insert }, /* " */ + { ISFUNC, rl_insert }, /* # */ + { ISFUNC, rl_insert }, /* $ */ + { ISFUNC, rl_insert }, /* % */ + { ISFUNC, rl_insert }, /* & */ + { ISFUNC, rl_insert }, /* ' */ + { ISFUNC, rl_insert }, /* ( */ + { ISFUNC, rl_insert }, /* ) */ + { ISFUNC, rl_insert }, /* * */ + { ISFUNC, rl_insert }, /* + */ + { ISFUNC, rl_insert }, /* , */ + { ISFUNC, rl_insert }, /* - */ + { ISFUNC, rl_insert }, /* . */ + { ISFUNC, rl_insert }, /* / */ + + /* Regular digits. */ + { ISFUNC, rl_insert }, /* 0 */ + { ISFUNC, rl_insert }, /* 1 */ + { ISFUNC, rl_insert }, /* 2 */ + { ISFUNC, rl_insert }, /* 3 */ + { ISFUNC, rl_insert }, /* 4 */ + { ISFUNC, rl_insert }, /* 5 */ + { ISFUNC, rl_insert }, /* 6 */ + { ISFUNC, rl_insert }, /* 7 */ + { ISFUNC, rl_insert }, /* 8 */ + { ISFUNC, rl_insert }, /* 9 */ + + /* A little more punctuation. */ + { ISFUNC, rl_insert }, /* : */ + { ISFUNC, rl_insert }, /* ; */ + { ISFUNC, rl_insert }, /* < */ + { ISFUNC, rl_insert }, /* = */ + { ISFUNC, rl_insert }, /* > */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* @ */ + + /* Uppercase alphabet. */ + { ISFUNC, rl_insert }, /* A */ + { ISFUNC, rl_insert }, /* B */ + { ISFUNC, rl_insert }, /* C */ + { ISFUNC, rl_insert }, /* D */ + { ISFUNC, rl_insert }, /* E */ + { ISFUNC, rl_insert }, /* F */ + { ISFUNC, rl_insert }, /* G */ + { ISFUNC, rl_insert }, /* H */ + { ISFUNC, rl_insert }, /* I */ + { ISFUNC, rl_insert }, /* J */ + { ISFUNC, rl_insert }, /* K */ + { ISFUNC, rl_insert }, /* L */ + { ISFUNC, rl_insert }, /* M */ + { ISFUNC, rl_insert }, /* N */ + { ISFUNC, rl_insert }, /* O */ + { ISFUNC, rl_insert }, /* P */ + { ISFUNC, rl_insert }, /* Q */ + { ISFUNC, rl_insert }, /* R */ + { ISFUNC, rl_insert }, /* S */ + { ISFUNC, rl_insert }, /* T */ + { ISFUNC, rl_insert }, /* U */ + { ISFUNC, rl_insert }, /* V */ + { ISFUNC, rl_insert }, /* W */ + { ISFUNC, rl_insert }, /* X */ + { ISFUNC, rl_insert }, /* Y */ + { ISFUNC, rl_insert }, /* Z */ + + /* Some more punctuation. */ + { ISFUNC, rl_insert }, /* [ */ + { ISFUNC, rl_insert }, /* \ */ + { ISFUNC, rl_insert }, /* ] */ + { ISFUNC, rl_insert }, /* ^ */ + { ISFUNC, rl_insert }, /* _ */ + { ISFUNC, rl_insert }, /* ` */ + + /* Lowercase alphabet. */ + { ISFUNC, rl_insert }, /* a */ + { ISFUNC, rl_insert }, /* b */ + { ISFUNC, rl_insert }, /* c */ + { ISFUNC, rl_insert }, /* d */ + { ISFUNC, rl_insert }, /* e */ + { ISFUNC, rl_insert }, /* f */ + { ISFUNC, rl_insert }, /* g */ + { ISFUNC, rl_insert }, /* h */ + { ISFUNC, rl_insert }, /* i */ + { ISFUNC, rl_insert }, /* j */ + { ISFUNC, rl_insert }, /* k */ + { ISFUNC, rl_insert }, /* l */ + { ISFUNC, rl_insert }, /* m */ + { ISFUNC, rl_insert }, /* n */ + { ISFUNC, rl_insert }, /* o */ + { ISFUNC, rl_insert }, /* p */ + { ISFUNC, rl_insert }, /* q */ + { ISFUNC, rl_insert }, /* r */ + { ISFUNC, rl_insert }, /* s */ + { ISFUNC, rl_insert }, /* t */ + { ISFUNC, rl_insert }, /* u */ + { ISFUNC, rl_insert }, /* v */ + { ISFUNC, rl_insert }, /* w */ + { ISFUNC, rl_insert }, /* x */ + { ISFUNC, rl_insert }, /* y */ + { ISFUNC, rl_insert }, /* z */ + + /* Final punctuation. */ + { ISFUNC, rl_insert }, /* { */ + { ISFUNC, rl_insert }, /* | */ + { ISFUNC, rl_insert }, /* } */ + { ISFUNC, rl_insert }, /* ~ */ + { ISFUNC, rl_rubout }, /* RUBOUT */ + +#if KEYMAP_SIZE > 128 + /* Pure 8-bit characters (128 - 159). + These might be used in some + character sets. */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + + /* ISO Latin-1 characters (160 - 255) */ + { ISFUNC, rl_insert }, /* No-break space */ + { ISFUNC, rl_insert }, /* Inverted exclamation mark */ + { ISFUNC, rl_insert }, /* Cent sign */ + { ISFUNC, rl_insert }, /* Pound sign */ + { ISFUNC, rl_insert }, /* Currency sign */ + { ISFUNC, rl_insert }, /* Yen sign */ + { ISFUNC, rl_insert }, /* Broken bar */ + { ISFUNC, rl_insert }, /* Section sign */ + { ISFUNC, rl_insert }, /* Diaeresis */ + { ISFUNC, rl_insert }, /* Copyright sign */ + { ISFUNC, rl_insert }, /* Feminine ordinal indicator */ + { ISFUNC, rl_insert }, /* Left pointing double angle quotation mark */ + { ISFUNC, rl_insert }, /* Not sign */ + { ISFUNC, rl_insert }, /* Soft hyphen */ + { ISFUNC, rl_insert }, /* Registered sign */ + { ISFUNC, rl_insert }, /* Macron */ + { ISFUNC, rl_insert }, /* Degree sign */ + { ISFUNC, rl_insert }, /* Plus-minus sign */ + { ISFUNC, rl_insert }, /* Superscript two */ + { ISFUNC, rl_insert }, /* Superscript three */ + { ISFUNC, rl_insert }, /* Acute accent */ + { ISFUNC, rl_insert }, /* Micro sign */ + { ISFUNC, rl_insert }, /* Pilcrow sign */ + { ISFUNC, rl_insert }, /* Middle dot */ + { ISFUNC, rl_insert }, /* Cedilla */ + { ISFUNC, rl_insert }, /* Superscript one */ + { ISFUNC, rl_insert }, /* Masculine ordinal indicator */ + { ISFUNC, rl_insert }, /* Right pointing double angle quotation mark */ + { ISFUNC, rl_insert }, /* Vulgar fraction one quarter */ + { ISFUNC, rl_insert }, /* Vulgar fraction one half */ + { ISFUNC, rl_insert }, /* Vulgar fraction three quarters */ + { ISFUNC, rl_insert }, /* Inverted questionk mark */ + { ISFUNC, rl_insert }, /* Latin capital letter a with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter a with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter a with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter a with tilde */ + { ISFUNC, rl_insert }, /* Latin capital letter a with diaeresis */ + { ISFUNC, rl_insert }, /* Latin capital letter a with ring above */ + { ISFUNC, rl_insert }, /* Latin capital letter ae */ + { ISFUNC, rl_insert }, /* Latin capital letter c with cedilla */ + { ISFUNC, rl_insert }, /* Latin capital letter e with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter e with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter e with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter e with diaeresis */ + { ISFUNC, rl_insert }, /* Latin capital letter i with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter i with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter i with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter i with diaeresis */ + { ISFUNC, rl_insert }, /* Latin capital letter eth (Icelandic) */ + { ISFUNC, rl_insert }, /* Latin capital letter n with tilde */ + { ISFUNC, rl_insert }, /* Latin capital letter o with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter o with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter o with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter o with tilde */ + { ISFUNC, rl_insert }, /* Latin capital letter o with diaeresis */ + { ISFUNC, rl_insert }, /* Multiplication sign */ + { ISFUNC, rl_insert }, /* Latin capital letter o with stroke */ + { ISFUNC, rl_insert }, /* Latin capital letter u with grave */ + { ISFUNC, rl_insert }, /* Latin capital letter u with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter u with circumflex */ + { ISFUNC, rl_insert }, /* Latin capital letter u with diaeresis */ + { ISFUNC, rl_insert }, /* Latin capital letter Y with acute */ + { ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */ + { ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */ + { ISFUNC, rl_insert }, /* Latin small letter a with grave */ + { ISFUNC, rl_insert }, /* Latin small letter a with acute */ + { ISFUNC, rl_insert }, /* Latin small letter a with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter a with tilde */ + { ISFUNC, rl_insert }, /* Latin small letter a with diaeresis */ + { ISFUNC, rl_insert }, /* Latin small letter a with ring above */ + { ISFUNC, rl_insert }, /* Latin small letter ae */ + { ISFUNC, rl_insert }, /* Latin small letter c with cedilla */ + { ISFUNC, rl_insert }, /* Latin small letter e with grave */ + { ISFUNC, rl_insert }, /* Latin small letter e with acute */ + { ISFUNC, rl_insert }, /* Latin small letter e with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter e with diaeresis */ + { ISFUNC, rl_insert }, /* Latin small letter i with grave */ + { ISFUNC, rl_insert }, /* Latin small letter i with acute */ + { ISFUNC, rl_insert }, /* Latin small letter i with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter i with diaeresis */ + { ISFUNC, rl_insert }, /* Latin small letter eth (Icelandic) */ + { ISFUNC, rl_insert }, /* Latin small letter n with tilde */ + { ISFUNC, rl_insert }, /* Latin small letter o with grave */ + { ISFUNC, rl_insert }, /* Latin small letter o with acute */ + { ISFUNC, rl_insert }, /* Latin small letter o with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter o with tilde */ + { ISFUNC, rl_insert }, /* Latin small letter o with diaeresis */ + { ISFUNC, rl_insert }, /* Division sign */ + { ISFUNC, rl_insert }, /* Latin small letter o with stroke */ + { ISFUNC, rl_insert }, /* Latin small letter u with grave */ + { ISFUNC, rl_insert }, /* Latin small letter u with acute */ + { ISFUNC, rl_insert }, /* Latin small letter u with circumflex */ + { ISFUNC, rl_insert }, /* Latin small letter u with diaeresis */ + { ISFUNC, rl_insert }, /* Latin small letter y with acute */ + { ISFUNC, rl_insert }, /* Latin small letter thorn (Icelandic) */ + { ISFUNC, rl_insert } /* Latin small letter y with diaeresis */ +#endif /* KEYMAP_SIZE > 128 */ +}; + +/* Unused for the time being. */ +#if 0 +KEYMAP_ENTRY_ARRAY vi_escape_keymap = { + /* The regular control keys come first. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */ + { ISFUNC, rl_tab_insert}, /* Control-i */ + { ISFUNC, rl_emacs_editing_mode}, /* Control-j */ + { ISFUNC, rl_kill_line }, /* Control-k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */ + { ISFUNC, rl_emacs_editing_mode}, /* Control-m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-x */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ + + { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ + { ISFUNC, rl_vi_undo }, /* Control-_ */ + + /* The start of printing characters. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* # */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* % */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* & */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ( */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ) */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* * */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* + */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* , */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* - */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* . */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* / */ + + /* Regular digits. */ + { ISFUNC, rl_vi_arg_digit }, /* 0 */ + { ISFUNC, rl_vi_arg_digit }, /* 1 */ + { ISFUNC, rl_vi_arg_digit }, /* 2 */ + { ISFUNC, rl_vi_arg_digit }, /* 3 */ + { ISFUNC, rl_vi_arg_digit }, /* 4 */ + { ISFUNC, rl_vi_arg_digit }, /* 5 */ + { ISFUNC, rl_vi_arg_digit }, /* 6 */ + { ISFUNC, rl_vi_arg_digit }, /* 7 */ + { ISFUNC, rl_vi_arg_digit }, /* 8 */ + { ISFUNC, rl_vi_arg_digit }, /* 9 */ + + /* A little more punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* = */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ + + /* Uppercase alphabet. */ + { ISFUNC, rl_do_lowercase_version }, /* A */ + { ISFUNC, rl_do_lowercase_version }, /* B */ + { ISFUNC, rl_do_lowercase_version }, /* C */ + { ISFUNC, rl_do_lowercase_version }, /* D */ + { ISFUNC, rl_do_lowercase_version }, /* E */ + { ISFUNC, rl_do_lowercase_version }, /* F */ + { ISFUNC, rl_do_lowercase_version }, /* G */ + { ISFUNC, rl_do_lowercase_version }, /* H */ + { ISFUNC, rl_do_lowercase_version }, /* I */ + { ISFUNC, rl_do_lowercase_version }, /* J */ + { ISFUNC, rl_do_lowercase_version }, /* K */ + { ISFUNC, rl_do_lowercase_version }, /* L */ + { ISFUNC, rl_do_lowercase_version }, /* M */ + { ISFUNC, rl_do_lowercase_version }, /* N */ + { ISFUNC, rl_do_lowercase_version }, /* O */ + { ISFUNC, rl_do_lowercase_version }, /* P */ + { ISFUNC, rl_do_lowercase_version }, /* Q */ + { ISFUNC, rl_do_lowercase_version }, /* R */ + { ISFUNC, rl_do_lowercase_version }, /* S */ + { ISFUNC, rl_do_lowercase_version }, /* T */ + { ISFUNC, rl_do_lowercase_version }, /* U */ + { ISFUNC, rl_do_lowercase_version }, /* V */ + { ISFUNC, rl_do_lowercase_version }, /* W */ + { ISFUNC, rl_do_lowercase_version }, /* X */ + { ISFUNC, rl_do_lowercase_version }, /* Y */ + { ISFUNC, rl_do_lowercase_version }, /* Z */ + + /* Some more punctuation. */ + { ISFUNC, rl_arrow_keys }, /* [ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */ + + /* Lowercase alphabet. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* i */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* l */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* n */ + { ISFUNC, rl_arrow_keys }, /* o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* t */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* x */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ + + /* Final punctuation. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* | */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */ + { ISFUNC, rl_backward_kill_word }, /* RUBOUT */ + +#if KEYMAP_SIZE > 128 + /* Undefined keys. */ + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 } +#endif /* KEYMAP_SIZE > 128 */ +}; +#endif diff --git a/bash-5.1/lib/readline/vi_mode.c b/bash-5.1/lib/readline/vi_mode.c new file mode 100644 index 0000000000000000000000000000000000000000..742341e362836fb72f361465856992e586a0fb6a --- /dev/null +++ b/bash-5.1/lib/readline/vi_mode.c @@ -0,0 +1,2408 @@ +/* vi_mode.c -- A vi emulation mode for Bash. + Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +/* **************************************************************** */ +/* */ +/* VI Emulation Mode */ +/* */ +/* **************************************************************** */ +#include "rlconf.h" + +#if defined (VI_MODE) + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +/* Some standard library routines. */ +#include "rldefs.h" +#include "rlmbutil.h" + +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +#ifndef member +#define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0) +#endif + +/* Increment START to the next character in RL_LINE_BUFFER, handling multibyte chars */ +#if defined (HANDLE_MULTIBYTE) +#define INCREMENT_POS(start) \ + do { \ + if (MB_CUR_MAX == 1 || rl_byte_oriented) \ + start++; \ + else \ + start = _rl_find_next_mbchar (rl_line_buffer, start, 1, MB_FIND_ANY); \ + } while (0) +#else /* !HANDLE_MULTIBYTE */ +#define INCREMENT_POS(start) (start)++ +#endif /* !HANDLE_MULTIBYTE */ + +/* This is global so other parts of the code can check whether the last + command was a text modification command. */ +int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */ + +_rl_vimotion_cxt *_rl_vimvcxt = 0; + +/* Non-zero indicates we are redoing a vi-mode command with `.' */ +int _rl_vi_redoing; + +/* Non-zero means enter insertion mode. */ +static int _rl_vi_doing_insert; + +/* Command keys which do movement for xxx_to commands. */ +static const char * const vi_motion = " hl^$0ftFT;,%wbeWBE|`"; + +/* Keymap used for vi replace characters. Created dynamically since + rarely used. */ +static Keymap vi_replace_map; + +/* The number of characters inserted in the last replace operation. */ +static int vi_replace_count; + +/* If non-zero, we have text inserted after a c[motion] command that put + us implicitly into insert mode. Some people want this text to be + attached to the command so that it is `redoable' with `.'. */ +static int vi_continued_command; +static char *vi_insert_buffer; +static int vi_insert_buffer_size; + +static int _rl_vi_last_repeat = 1; +static int _rl_vi_last_arg_sign = 1; +static int _rl_vi_last_motion; +#if defined (HANDLE_MULTIBYTE) +static char _rl_vi_last_search_mbchar[MB_LEN_MAX]; +static int _rl_vi_last_search_mblen; +#else +static int _rl_vi_last_search_char; +#endif +static char _rl_vi_last_replacement[MB_LEN_MAX+1]; /* reserve for trailing NULL */ + +static int _rl_vi_last_key_before_insert; + +/* Text modification commands. These are the `redoable' commands. */ +static const char * const vi_textmod = "_*\\AaIiCcDdPpYyRrSsXx~"; + +/* Arrays for the saved marks. */ +static int vi_mark_chars['z' - 'a' + 1]; + +static void _rl_vi_replace_insert PARAMS((int)); +static void _rl_vi_save_replace PARAMS((void)); +static void _rl_vi_stuff_insert PARAMS((int)); +static void _rl_vi_save_insert PARAMS((UNDO_LIST *)); + +static void vi_save_insert_buffer PARAMS ((int, int)); + +static inline void _rl_vi_backup PARAMS((void)); + +static int _rl_vi_arg_dispatch PARAMS((int)); +static int rl_digit_loop1 PARAMS((void)); + +static int _rl_vi_set_mark PARAMS((void)); +static int _rl_vi_goto_mark PARAMS((void)); + +static inline int _rl_vi_advance_point PARAMS((void)); +static inline int _rl_vi_backup_point PARAMS((void)); + +static void _rl_vi_append_forward PARAMS((int)); + +static int _rl_vi_callback_getchar PARAMS((char *, int)); + +#if defined (READLINE_CALLBACKS) +static int _rl_vi_callback_set_mark PARAMS((_rl_callback_generic_arg *)); +static int _rl_vi_callback_goto_mark PARAMS((_rl_callback_generic_arg *)); +static int _rl_vi_callback_change_char PARAMS((_rl_callback_generic_arg *)); +static int _rl_vi_callback_char_search PARAMS((_rl_callback_generic_arg *)); +#endif + +static int rl_domove_read_callback PARAMS((_rl_vimotion_cxt *)); +static int rl_domove_motion_callback PARAMS((_rl_vimotion_cxt *)); +static int rl_vi_domove_getchar PARAMS((_rl_vimotion_cxt *)); + +static int vi_change_dispatch PARAMS((_rl_vimotion_cxt *)); +static int vi_delete_dispatch PARAMS((_rl_vimotion_cxt *)); +static int vi_yank_dispatch PARAMS((_rl_vimotion_cxt *)); + +static int vidomove_dispatch PARAMS((_rl_vimotion_cxt *)); + +void +_rl_vi_initialize_line (void) +{ + register int i, n; + + n = sizeof (vi_mark_chars) / sizeof (vi_mark_chars[0]); + for (i = 0; i < n; i++) + vi_mark_chars[i] = -1; + + RL_UNSETSTATE(RL_STATE_VICMDONCE); +} + +void +_rl_vi_reset_last (void) +{ + _rl_vi_last_command = 'i'; + _rl_vi_last_repeat = 1; + _rl_vi_last_arg_sign = 1; + _rl_vi_last_motion = 0; +} + +void +_rl_vi_set_last (int key, int repeat, int sign) +{ + _rl_vi_last_command = key; + _rl_vi_last_repeat = repeat; + _rl_vi_last_arg_sign = sign; +} + +/* A convenience function that calls _rl_vi_set_last to save the last command + information and enters insertion mode. */ +void +rl_vi_start_inserting (int key, int repeat, int sign) +{ + _rl_vi_set_last (key, repeat, sign); + rl_begin_undo_group (); /* ensure inserts aren't concatenated */ + rl_vi_insertion_mode (1, key); +} + +/* Is the command C a VI mode text modification command? */ +int +_rl_vi_textmod_command (int c) +{ + return (member (c, vi_textmod)); +} + +int +_rl_vi_motion_command (int c) +{ + return (member (c, vi_motion)); +} + +static void +_rl_vi_replace_insert (int count) +{ + int nchars; + + nchars = strlen (vi_insert_buffer); + + rl_begin_undo_group (); + while (count--) + /* nchars-1 to compensate for _rl_replace_text using `end+1' in call + to rl_delete_text */ + _rl_replace_text (vi_insert_buffer, rl_point, rl_point+nchars-1); + rl_end_undo_group (); +} + +static void +_rl_vi_stuff_insert (int count) +{ + rl_begin_undo_group (); + while (count--) + rl_insert_text (vi_insert_buffer); + rl_end_undo_group (); +} + +/* Bound to `.'. Called from command mode, so we know that we have to + redo a text modification command. The default for _rl_vi_last_command + puts you back into insert mode. */ +int +rl_vi_redo (int count, int c) +{ + int r; + + if (rl_explicit_arg == 0) + { + rl_numeric_arg = _rl_vi_last_repeat; + rl_arg_sign = _rl_vi_last_arg_sign; + } + + r = 0; + _rl_vi_redoing = 1; + /* If we're redoing an insert with `i', stuff in the inserted text + and do not go into insertion mode. */ + if (_rl_vi_last_command == 'i' && vi_insert_buffer && *vi_insert_buffer) + { + _rl_vi_stuff_insert (count); + /* And back up point over the last character inserted. */ + if (rl_point > 0) + _rl_vi_backup (); + } + else if (_rl_vi_last_command == 'R' && vi_insert_buffer && *vi_insert_buffer) + { + _rl_vi_replace_insert (count); + /* And back up point over the last character inserted. */ + if (rl_point > 0) + _rl_vi_backup (); + } + /* Ditto for redoing an insert with `I', but move to the beginning of the + line like the `I' command does. */ + else if (_rl_vi_last_command == 'I' && vi_insert_buffer && *vi_insert_buffer) + { + rl_beg_of_line (1, 'I'); + _rl_vi_stuff_insert (count); + if (rl_point > 0) + _rl_vi_backup (); + } + /* Ditto for redoing an insert with `a', but move forward a character first + like the `a' command does. */ + else if (_rl_vi_last_command == 'a' && vi_insert_buffer && *vi_insert_buffer) + { + _rl_vi_append_forward ('a'); + _rl_vi_stuff_insert (count); + if (rl_point > 0) + _rl_vi_backup (); + } + /* Ditto for redoing an insert with `A', but move to the end of the line + like the `A' command does. */ + else if (_rl_vi_last_command == 'A' && vi_insert_buffer && *vi_insert_buffer) + { + rl_end_of_line (1, 'A'); + _rl_vi_stuff_insert (count); + if (rl_point > 0) + _rl_vi_backup (); + } + else if (_rl_vi_last_command == '.' && _rl_keymap == vi_movement_keymap) + { + rl_ding (); + r = 0; + } + else + r = _rl_dispatch (_rl_vi_last_command, _rl_keymap); + + _rl_vi_redoing = 0; + + return (r); +} + +/* A placeholder for further expansion. */ +int +rl_vi_undo (int count, int key) +{ + return (rl_undo_command (count, key)); +} + +/* Yank the nth arg from the previous line into this line at point. */ +int +rl_vi_yank_arg (int count, int key) +{ + /* Readline thinks that the first word on a line is the 0th, while vi + thinks the first word on a line is the 1st. Compensate. */ + if (rl_explicit_arg) + rl_yank_nth_arg (count - 1, key); + else + rl_yank_nth_arg ('$', key); + + return (0); +} + +/* With an argument, move back that many history lines, else move to the + beginning of history. */ +int +rl_vi_fetch_history (int count, int c) +{ + int wanted; + + /* Giving an argument of n means we want the nth command in the history + file. The command number is interpreted the same way that the bash + `history' command does it -- that is, giving an argument count of 450 + to this command would get the command listed as number 450 in the + output of `history'. */ + if (rl_explicit_arg) + { + wanted = history_base + where_history () - count; + if (wanted <= 0) + rl_beginning_of_history (0, 0); + else + rl_get_previous_history (wanted, c); + } + else + rl_beginning_of_history (count, 0); + return (0); +} + +/* Search again for the last thing searched for. */ +int +rl_vi_search_again (int count, int key) +{ + switch (key) + { + case 'n': + rl_noninc_reverse_search_again (count, key); + break; + + case 'N': + rl_noninc_forward_search_again (count, key); + break; + } + return (0); +} + +/* Do a vi style search. */ +int +rl_vi_search (int count, int key) +{ + switch (key) + { + case '?': + _rl_free_saved_history_line (); + rl_noninc_forward_search (count, key); + break; + + case '/': + _rl_free_saved_history_line (); + rl_noninc_reverse_search (count, key); + break; + + default: + rl_ding (); + break; + } + return (0); +} + +/* Completion, from vi's point of view. */ +int +rl_vi_complete (int ignore, int key) +{ + if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point]))) + { + if (!whitespace (rl_line_buffer[rl_point + 1])) + rl_vi_end_word (1, 'E'); + _rl_vi_advance_point (); + } + + if (key == '*') + rl_complete_internal ('*'); /* Expansion and replacement. */ + else if (key == '=') + rl_complete_internal ('?'); /* List possible completions. */ + else if (key == '\\') + rl_complete_internal (TAB); /* Standard Readline completion. */ + else + rl_complete (0, key); + + if (key == '*' || key == '\\') + rl_vi_start_inserting (key, 1, rl_arg_sign); + + return (0); +} + +/* Tilde expansion for vi mode. */ +int +rl_vi_tilde_expand (int ignore, int key) +{ + rl_tilde_expand (0, key); + rl_vi_start_inserting (key, 1, rl_arg_sign); + return (0); +} + +/* Previous word in vi mode. */ +int +rl_vi_prev_word (int count, int key) +{ + if (count < 0) + return (rl_vi_next_word (-count, key)); + + if (rl_point == 0) + { + rl_ding (); + return (0); + } + + if (_rl_uppercase_p (key)) + rl_vi_bWord (count, key); + else + rl_vi_bword (count, key); + + return (0); +} + +/* Next word in vi mode. */ +int +rl_vi_next_word (int count, int key) +{ + if (count < 0) + return (rl_vi_prev_word (-count, key)); + + if (rl_point >= (rl_end - 1)) + { + rl_ding (); + return (0); + } + + if (_rl_uppercase_p (key)) + rl_vi_fWord (count, key); + else + rl_vi_fword (count, key); + return (0); +} + +static inline int +_rl_vi_advance_point (void) +{ + int point; + + point = rl_point; + if (rl_point < rl_end) +#if defined (HANDLE_MULTIBYTE) + { + if (MB_CUR_MAX == 1 || rl_byte_oriented) + rl_point++; + else + { + point = rl_point; + rl_point = _rl_forward_char_internal (1); + if (point == rl_point || rl_point > rl_end) + rl_point = rl_end; + } + } +#else + rl_point++; +#endif + + return point; +} + +/* Move the cursor back one character. */ +static inline void +_rl_vi_backup (void) +{ + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + else + rl_point--; +} + +/* Move the point back one character, returning the starting value and not + doing anything at the beginning of the line */ +static inline int +_rl_vi_backup_point (void) +{ + int point; + + point = rl_point; + if (rl_point > 0) +#if defined (HANDLE_MULTIBYTE) + { + if (MB_CUR_MAX == 1 || rl_byte_oriented) + rl_point--; + else + { + point = rl_point; + rl_point = _rl_backward_char_internal (1); + if (rl_point < 0) + rl_point = 0; /* XXX - not really necessary */ + } + } +#else + rl_point--; +#endif + return point; +} + +/* Move to the end of the ?next? word. */ +int +rl_vi_end_word (int count, int key) +{ + if (count < 0) + { + rl_ding (); + return 1; + } + + if (_rl_uppercase_p (key)) + rl_vi_eWord (count, key); + else + rl_vi_eword (count, key); + return (0); +} + +/* Move forward a word the way that 'W' does. */ +int +rl_vi_fWord (int count, int ignore) +{ + while (count-- && rl_point < (rl_end - 1)) + { + /* Skip until whitespace. */ + while (!whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) + _rl_vi_advance_point (); + + /* Now skip whitespace. */ + while (whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) + _rl_vi_advance_point (); + } + return (0); +} + +int +rl_vi_bWord (int count, int ignore) +{ + while (count-- && rl_point > 0) + { + /* If we are at the start of a word, move back to whitespace so + we will go back to the start of the previous word. */ + if (!whitespace (rl_line_buffer[rl_point]) && + whitespace (rl_line_buffer[rl_point - 1])) + rl_point--; + + while (rl_point > 0 && whitespace (rl_line_buffer[rl_point])) + _rl_vi_backup_point (); + + if (rl_point > 0) + { + do + _rl_vi_backup_point (); + while (rl_point > 0 && !whitespace (rl_line_buffer[rl_point])); + if (rl_point > 0) /* hit whitespace */ + rl_point++; + + if (rl_point < 0) + rl_point = 0; + } + } + return (0); +} + +int +rl_vi_eWord (int count, int ignore) +{ + int opoint; + + while (count-- && rl_point < (rl_end - 1)) + { + if (whitespace (rl_line_buffer[rl_point]) == 0) + _rl_vi_advance_point (); + + /* Move to the next non-whitespace character (to the start of the + next word). */ + while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) + _rl_vi_advance_point (); + + if (rl_point && rl_point < rl_end) + { + opoint = rl_point; + + /* Skip whitespace. */ + while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) + opoint = _rl_vi_advance_point (); /* XXX - why? */ + + /* Skip until whitespace. */ + while (rl_point < rl_end && !whitespace (rl_line_buffer[rl_point])) + opoint = _rl_vi_advance_point (); + + /* Move back to the last character of the word. */ + rl_point = opoint; + } + } + return (0); +} + +int +rl_vi_fword (int count, int ignore) +{ + int opoint; + + while (count-- && rl_point < (rl_end - 1)) + { + /* Move to white space (really non-identifer). */ + if (_rl_isident (rl_line_buffer[rl_point])) + { + while (_rl_isident (rl_line_buffer[rl_point]) && rl_point < rl_end) + _rl_vi_advance_point (); + } + else /* if (!whitespace (rl_line_buffer[rl_point])) */ + { + while (!_rl_isident (rl_line_buffer[rl_point]) && + !whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) + _rl_vi_advance_point (); + } + + opoint = rl_point; + + /* Move past whitespace. */ + while (whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) + opoint = _rl_vi_advance_point (); + } + return (0); +} + +int +rl_vi_bword (int count, int ignore) +{ + int opoint; + + while (count-- && rl_point > 0) + { + int prev_is_ident, cur_is_ident; + + /* If we are at the start of a word, move back to whitespace + so we will go back to the start of the previous word. */ + if (!whitespace (rl_line_buffer[rl_point]) && + whitespace (rl_line_buffer[rl_point - 1])) + if (--rl_point == 0) + break; + + /* If this character and the previous character are `opposite', move + back so we don't get messed up by the rl_point++ down there in + the while loop. Without this code, words like `l;' screw up the + function. */ + cur_is_ident = _rl_isident (rl_line_buffer[rl_point]); + opoint = _rl_vi_backup_point (); + prev_is_ident = _rl_isident (rl_line_buffer[rl_point]); + if ((cur_is_ident && !prev_is_ident) || (!cur_is_ident && prev_is_ident)) + ; /* leave point alone, we backed it up one character */ + else + rl_point = opoint; + + while (rl_point > 0 && whitespace (rl_line_buffer[rl_point])) + _rl_vi_backup_point (); + + if (rl_point > 0) + { + opoint = rl_point; + if (_rl_isident (rl_line_buffer[rl_point])) + do + opoint = _rl_vi_backup_point (); + while (rl_point > 0 && _rl_isident (rl_line_buffer[rl_point])); + else + do + opoint = _rl_vi_backup_point (); + while (rl_point > 0 && !_rl_isident (rl_line_buffer[rl_point]) && + !whitespace (rl_line_buffer[rl_point])); + + if (rl_point > 0) + rl_point = opoint; + + if (rl_point < 0) + rl_point = 0; + } + } + return (0); +} + +int +rl_vi_eword (int count, int ignore) +{ + int opoint; + + while (count-- && rl_point < (rl_end - 1)) + { + if (whitespace (rl_line_buffer[rl_point]) == 0) + _rl_vi_advance_point (); + + while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) + _rl_vi_advance_point (); + + opoint = rl_point; + if (rl_point < rl_end) + { + if (_rl_isident (rl_line_buffer[rl_point])) + do + { + opoint = _rl_vi_advance_point (); + } + while (rl_point < rl_end && _rl_isident (rl_line_buffer[rl_point])); + else + do + { + opoint = _rl_vi_advance_point (); + } + while (rl_point < rl_end && !_rl_isident (rl_line_buffer[rl_point]) + && !whitespace (rl_line_buffer[rl_point])); + } + rl_point = opoint; + } + return (0); +} + +int +rl_vi_insert_beg (int count, int key) +{ + rl_beg_of_line (1, key); + rl_vi_insert_mode (1, key); + return (0); +} + +static void +_rl_vi_append_forward (int key) +{ + _rl_vi_advance_point (); +} + +int +rl_vi_append_mode (int count, int key) +{ + _rl_vi_append_forward (key); + rl_vi_start_inserting (key, 1, rl_arg_sign); + return (0); +} + +int +rl_vi_append_eol (int count, int key) +{ + rl_end_of_line (1, key); + rl_vi_append_mode (1, key); + return (0); +} + +/* What to do in the case of C-d. */ +int +rl_vi_eof_maybe (int count, int c) +{ + return (rl_newline (1, '\n')); +} + +/* Insertion mode stuff. */ + +/* Switching from one mode to the other really just involves + switching keymaps. */ +int +rl_vi_insertion_mode (int count, int key) +{ + _rl_keymap = vi_insertion_keymap; + _rl_vi_last_key_before_insert = key; + if (_rl_show_mode_in_prompt) + _rl_reset_prompt (); + return (0); +} + +int +rl_vi_insert_mode (int count, int key) +{ + rl_vi_start_inserting (key, 1, rl_arg_sign); + return (0); +} + +static void +vi_save_insert_buffer (int start, int len) +{ + /* Same code as _rl_vi_save_insert below */ + if (len >= vi_insert_buffer_size) + { + vi_insert_buffer_size += (len + 32) - (len % 32); + vi_insert_buffer = (char *)xrealloc (vi_insert_buffer, vi_insert_buffer_size); + } + strncpy (vi_insert_buffer, rl_line_buffer + start, len - 1); + vi_insert_buffer[len-1] = '\0'; +} + +static void +_rl_vi_save_replace (void) +{ + int len, start, end; + UNDO_LIST *up; + + up = rl_undo_list; + if (up == 0 || up->what != UNDO_END || vi_replace_count <= 0) + { + if (vi_insert_buffer_size >= 1) + vi_insert_buffer[0] = '\0'; + return; + } + /* Let's try it the quick and easy way for now. This should essentially + accommodate every UNDO_INSERT and save the inserted text to + vi_insert_buffer */ + end = rl_point; + start = end - vi_replace_count + 1; + len = vi_replace_count + 1; + + if (start < 0) + { + len = end + 1; + start = 0; + } + + vi_save_insert_buffer (start, len); +} + +static void +_rl_vi_save_insert (UNDO_LIST *up) +{ + int len, start, end; + + if (up == 0 || up->what != UNDO_INSERT) + { + if (vi_insert_buffer_size >= 1) + vi_insert_buffer[0] = '\0'; + return; + } + + start = up->start; + end = up->end; + len = end - start + 1; + + vi_save_insert_buffer (start, len); +} + +void +_rl_vi_done_inserting (void) +{ + if (_rl_vi_doing_insert) + { + /* The `c', `s', `S', and `R' commands set this. */ + rl_end_undo_group (); /* for the group in rl_vi_start_inserting */ + /* Now, the text between rl_undo_list->next->start and + rl_undo_list->next->end is what was inserted while in insert + mode. It gets copied to VI_INSERT_BUFFER because it depends + on absolute indices into the line which may change (though they + probably will not). */ + _rl_vi_doing_insert = 0; + if (_rl_vi_last_key_before_insert == 'R') + _rl_vi_save_replace (); /* Half the battle */ + else + _rl_vi_save_insert (rl_undo_list->next); + /* sanity check, should always be >= 1 here */ + if (_rl_undo_group_level > 0) + rl_end_undo_group (); /* for the group in the command (change or replace) */ + } + else + { + if (rl_undo_list && (_rl_vi_last_key_before_insert == 'i' || + _rl_vi_last_key_before_insert == 'a' || + _rl_vi_last_key_before_insert == 'I' || + _rl_vi_last_key_before_insert == 'A')) + _rl_vi_save_insert (rl_undo_list); + /* XXX - Other keys probably need to be checked. */ + else if (_rl_vi_last_key_before_insert == 'C') + rl_end_undo_group (); + } + + /* Sanity check, make sure all the undo groups are closed before we leave + insert mode */ + while (_rl_undo_group_level > 0) + rl_end_undo_group (); +} + +int +rl_vi_movement_mode (int count, int key) +{ + if (rl_point > 0) + rl_backward_char (1, key); + + _rl_keymap = vi_movement_keymap; + _rl_vi_done_inserting (); + + /* This is how POSIX.2 says `U' should behave -- everything up until the + first time you go into command mode should not be undone. */ + if (RL_ISSTATE (RL_STATE_VICMDONCE) == 0) + rl_free_undo_list (); + + if (_rl_show_mode_in_prompt) + _rl_reset_prompt (); + + RL_SETSTATE (RL_STATE_VICMDONCE); + return (0); +} + +int +rl_vi_arg_digit (int count, int c) +{ + if (c == '0' && rl_numeric_arg == 1 && !rl_explicit_arg) + return (rl_beg_of_line (1, c)); + else + return (rl_digit_argument (count, c)); +} + +/* Change the case of the next COUNT characters. */ +#if defined (HANDLE_MULTIBYTE) +static int +_rl_vi_change_mbchar_case (int count) +{ + wchar_t wc; + char mb[MB_LEN_MAX+1]; + int mlen, p; + size_t m; + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_adjust_point (rl_line_buffer, rl_point, &ps) > 0) + count--; + while (count-- && rl_point < rl_end) + { + m = mbrtowc (&wc, rl_line_buffer + rl_point, rl_end - rl_point, &ps); + if (MB_INVALIDCH (m)) + wc = (wchar_t)rl_line_buffer[rl_point]; + else if (MB_NULLWCH (m)) + wc = L'\0'; + if (iswupper (wc)) + wc = towlower (wc); + else if (iswlower (wc)) + wc = towupper (wc); + else + { + /* Just skip over chars neither upper nor lower case */ + rl_forward_char (1, 0); + continue; + } + + /* Vi is kind of strange here. */ + if (wc) + { + p = rl_point; + mlen = wcrtomb (mb, wc, &ps); + if (mlen >= 0) + mb[mlen] = '\0'; + rl_begin_undo_group (); + rl_vi_delete (1, 0); + if (rl_point < p) /* Did we retreat at EOL? */ + _rl_vi_advance_point (); + rl_insert_text (mb); + rl_end_undo_group (); + rl_vi_check (); + } + else + rl_forward_char (1, 0); + } + + return 0; +} +#endif + +int +rl_vi_change_case (int count, int ignore) +{ + int c, p; + + /* Don't try this on an empty line. */ + if (rl_point >= rl_end) + return (0); + + c = 0; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + return (_rl_vi_change_mbchar_case (count)); +#endif + + while (count-- && rl_point < rl_end) + { + if (_rl_uppercase_p (rl_line_buffer[rl_point])) + c = _rl_to_lower (rl_line_buffer[rl_point]); + else if (_rl_lowercase_p (rl_line_buffer[rl_point])) + c = _rl_to_upper (rl_line_buffer[rl_point]); + else + { + /* Just skip over characters neither upper nor lower case. */ + rl_forward_char (1, c); + continue; + } + + /* Vi is kind of strange here. */ + if (c) + { + p = rl_point; + rl_begin_undo_group (); + rl_vi_delete (1, c); + if (rl_point < p) /* Did we retreat at EOL? */ + rl_point++; + _rl_insert_char (1, c); + rl_end_undo_group (); + rl_vi_check (); + } + else + rl_forward_char (1, c); + } + return (0); +} + +int +rl_vi_put (int count, int key) +{ + if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end)) + rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + + while (count--) + rl_yank (1, key); + + rl_backward_char (1, key); + return (0); +} + +/* Move the cursor back one character if you're at the end of the line */ +int +rl_vi_check (void) +{ + if (rl_point && rl_point == rl_end) + _rl_vi_backup (); + return (0); +} + +/* Move to the character position specified by COUNT */ +int +rl_vi_column (int count, int key) +{ + if (count > rl_end) + rl_end_of_line (1, key); + else + { + rl_point = 0; + rl_point = _rl_forward_char_internal (count - 1); + } + return (0); +} + +/* Process C as part of the current numeric argument. Return -1 if the + argument should be aborted, 0 if we should not read any more chars, and + 1 if we should continue to read chars. */ +static int +_rl_vi_arg_dispatch (int c) +{ + int key; + + key = c; + if (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument) + { + rl_numeric_arg *= 4; + return 1; + } + + c = UNMETA (c); + + if (_rl_digit_p (c)) + { + if (rl_explicit_arg) + rl_numeric_arg = (rl_numeric_arg * 10) + _rl_digit_value (c); + else + rl_numeric_arg = _rl_digit_value (c); + rl_explicit_arg = 1; + return 1; /* keep going */ + } + else + { + rl_clear_message (); + rl_stuff_char (key); + return 0; /* done */ + } +} + +/* A simplified loop for vi. Don't dispatch key at end. + Don't recognize minus sign? + Should this do rl_save_prompt/rl_restore_prompt? */ +static int +rl_digit_loop1 (void) +{ + int c, r; + + while (1) + { + if (_rl_arg_overflow ()) + return 1; + + c = _rl_arg_getchar (); + + r = _rl_vi_arg_dispatch (c); + if (r <= 0) + break; + } + + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return (0); +} + +/* This set of functions is basically to handle the commands that take a + motion argument while in callback mode: read the command, read the motion + command modifier, find the extent of the text to affect, and dispatch the + command for execution. */ +static void +_rl_mvcxt_init (_rl_vimotion_cxt *m, int op, int key) +{ + m->op = op; + m->state = m->flags = 0; + m->ncxt = 0; + m->numeric_arg = -1; + m->start = rl_point; + m->end = rl_end; + m->key = key; + m->motion = -1; +} + +static _rl_vimotion_cxt * +_rl_mvcxt_alloc (int op, int key) +{ + _rl_vimotion_cxt *m; + + m = xmalloc (sizeof (_rl_vimotion_cxt)); + _rl_mvcxt_init (m, op, key); + return m; +} + +static void +_rl_mvcxt_dispose (_rl_vimotion_cxt *m) +{ + xfree (m); +} + +static int +rl_domove_motion_callback (_rl_vimotion_cxt *m) +{ + int c; + + _rl_vi_last_motion = c = m->motion; + + /* Append a blank character temporarily so that the motion routines + work right at the end of the line. Original value of rl_end is saved + as m->end. */ + rl_extend_line_buffer (rl_end + 1); + rl_line_buffer[rl_end++] = ' '; + rl_line_buffer[rl_end] = '\0'; + + _rl_dispatch (c, _rl_keymap); + +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + /* Messy case where char search can be vi motion command; see rest of + details in callback.c. vi_char_search and callback_char_search just + set and unset the CHARSEARCH state. This is where any vi motion + command that needs to set its own state should be handled, with any + corresponding code to manage that state in callback.c */ + if (RL_ISSTATE (RL_STATE_CHARSEARCH)) + return 0; + else + return (_rl_vi_domove_motion_cleanup (c, m)); + } +#endif + + return (_rl_vi_domove_motion_cleanup (c, m)); +} + +int +_rl_vi_domove_motion_cleanup (int c, _rl_vimotion_cxt *m) +{ + int r; + + /* Remove the blank that we added in rl_domove_motion_callback. */ + rl_end = m->end; + rl_line_buffer[rl_end] = '\0'; + _rl_fix_point (0); + + /* No change in position means the command failed. */ + if (rl_mark == rl_point) + { + /* 'c' and 'C' enter insert mode after the delete even if the motion + didn't delete anything, as long as the motion command is valid. */ + if (_rl_to_upper (m->key) == 'C' && _rl_vi_motion_command (c)) + return (vidomove_dispatch (m)); + RL_UNSETSTATE (RL_STATE_VIMOTION); + return (-1); + } + + /* rl_vi_f[wW]ord () leaves the cursor on the first character of the next + word. If we are not at the end of the line, and we are on a + non-whitespace character, move back one (presumably to whitespace). */ + if ((_rl_to_upper (c) == 'W') && rl_point < rl_end && rl_point > rl_mark && + !whitespace (rl_line_buffer[rl_point])) + rl_point--; /* XXX */ + + /* If cw or cW, back up to the end of a word, so the behaviour of ce + or cE is the actual result. Brute-force, no subtlety. */ + if (m->key == 'c' && rl_point >= rl_mark && (_rl_to_upper (c) == 'W')) + { + /* Don't move farther back than where we started. */ + while (rl_point > rl_mark && whitespace (rl_line_buffer[rl_point])) + rl_point--; + + /* Posix.2 says that if cw or cW moves the cursor towards the end of + the line, the character under the cursor should be deleted. */ + if (rl_point == rl_mark) + _rl_vi_advance_point (); + else + { + /* Move past the end of the word so that the kill doesn't + remove the last letter of the previous word. Only do this + if we are not at the end of the line. */ + if (rl_point >= 0 && rl_point < (rl_end - 1) && !whitespace (rl_line_buffer[rl_point])) + _rl_vi_advance_point (); + } + } + + if (rl_mark < rl_point) + SWAP (rl_point, rl_mark); + +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + (*rl_redisplay_function)(); /* make sure motion is displayed */ +#endif + + r = vidomove_dispatch (m); + + return (r); +} + +#define RL_VIMOVENUMARG() (RL_ISSTATE (RL_STATE_VIMOTION) && RL_ISSTATE (RL_STATE_NUMERICARG)) + +static int +rl_domove_read_callback (_rl_vimotion_cxt *m) +{ + int c, save; + + c = m->motion; + + if (member (c, vi_motion)) + { +#if defined (READLINE_CALLBACKS) + /* If we just read a vi-mode motion command numeric argument, turn off + the `reading numeric arg' state */ + if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_VIMOVENUMARG()) + RL_UNSETSTATE (RL_STATE_NUMERICARG); +#endif + /* Should do everything, including turning off RL_STATE_VIMOTION */ + return (rl_domove_motion_callback (m)); + } + else if (m->key == c && (m->key == 'd' || m->key == 'y' || m->key == 'c')) + { + rl_mark = rl_end; + rl_beg_of_line (1, c); + _rl_vi_last_motion = c; + RL_UNSETSTATE (RL_STATE_VIMOTION); + return (vidomove_dispatch (m)); + } +#if defined (READLINE_CALLBACKS) + /* XXX - these need to handle rl_universal_argument bindings */ + /* Reading vi motion char continuing numeric argument */ + else if (_rl_digit_p (c) && RL_ISSTATE (RL_STATE_CALLBACK) && RL_VIMOVENUMARG()) + { + return (_rl_vi_arg_dispatch (c)); + } + /* Readine vi motion char starting numeric argument */ + else if (_rl_digit_p (c) && RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_VIMOTION) && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)) + { + RL_SETSTATE (RL_STATE_NUMERICARG); + return (_rl_vi_arg_dispatch (c)); + } +#endif + else if (_rl_digit_p (c)) + { + /* This code path taken when not in callback mode */ + save = rl_numeric_arg; + rl_numeric_arg = _rl_digit_value (c); + rl_explicit_arg = 1; + RL_SETSTATE (RL_STATE_NUMERICARG); + rl_digit_loop1 (); + rl_numeric_arg *= save; + c = rl_vi_domove_getchar (m); + if (c < 0) + { + m->motion = 0; + return -1; + } + m->motion = c; + return (rl_domove_motion_callback (m)); + } + else + { + RL_UNSETSTATE (RL_STATE_VIMOTION); + RL_UNSETSTATE (RL_STATE_NUMERICARG); + return (1); + } +} + +static int +rl_vi_domove_getchar (_rl_vimotion_cxt *m) +{ + return (_rl_bracketed_read_key ()); +} + +#if defined (READLINE_CALLBACKS) +int +_rl_vi_domove_callback (_rl_vimotion_cxt *m) +{ + int c, r; + + m->motion = c = rl_vi_domove_getchar (m); + if (c < 0) + return 1; /* EOF */ + r = rl_domove_read_callback (m); + + return ((r == 0) ? r : 1); /* normalize return values */ +} +#endif + +/* This code path is taken when not in callback mode. */ +int +rl_vi_domove (int x, int *ignore) +{ + int r; + _rl_vimotion_cxt *m; + + m = _rl_vimvcxt; + *ignore = m->motion = rl_vi_domove_getchar (m); + + if (m->motion < 0) + { + m->motion = 0; + return -1; + } + + return (rl_domove_read_callback (m)); +} + +static int +vi_delete_dispatch (_rl_vimotion_cxt *m) +{ + /* These are the motion commands that do not require adjusting the + mark. */ + if (((strchr (" l|h^0bBFT`", m->motion) == 0) && (rl_point >= m->start)) && + (rl_mark < rl_end)) + INCREMENT_POS (rl_mark); + + rl_kill_text (rl_point, rl_mark); + return (0); +} + +int +rl_vi_delete_to (int count, int key) +{ + int c, r; + + if (_rl_vimvcxt) + _rl_mvcxt_init (_rl_vimvcxt, VIM_DELETE, key); + else + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_DELETE, key); + + _rl_vimvcxt->start = rl_point; + + rl_mark = rl_point; + if (_rl_uppercase_p (key)) + { + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing) /* handle redoing `dd' here */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + rl_mark = rl_end; + rl_beg_of_line (1, key); + RL_UNSETSTATE (RL_STATE_VIMOTION); + r = vidomove_dispatch (_rl_vimvcxt); + } +#if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + RL_SETSTATE (RL_STATE_VIMOTION); + return (0); + } +#endif + else + r = rl_vi_domove (key, &c); + + if (r < 0) + { + rl_ding (); + r = -1; + } + + _rl_mvcxt_dispose (_rl_vimvcxt); + _rl_vimvcxt = 0; + + return r; +} + +static int +vi_change_dispatch (_rl_vimotion_cxt *m) +{ + /* These are the motion commands that do not require adjusting the + mark. c[wW] are handled by special-case code in rl_vi_domove(), + and already leave the mark at the correct location. */ + if (((strchr (" l|hwW^0bBFT`", m->motion) == 0) && (rl_point >= m->start)) && + (rl_mark < rl_end)) + INCREMENT_POS (rl_mark); + + /* The cursor never moves with c[wW]. */ + if ((_rl_to_upper (m->motion) == 'W') && rl_point < m->start) + rl_point = m->start; + + if (_rl_vi_redoing) + { + if (vi_insert_buffer && *vi_insert_buffer) + rl_begin_undo_group (); + rl_delete_text (rl_point, rl_mark); + if (vi_insert_buffer && *vi_insert_buffer) + { + rl_insert_text (vi_insert_buffer); + rl_end_undo_group (); + } + } + else + { + rl_begin_undo_group (); /* to make the `u' command work */ + rl_kill_text (rl_point, rl_mark); + /* `C' does not save the text inserted for undoing or redoing. */ + if (_rl_uppercase_p (m->key) == 0) + _rl_vi_doing_insert = 1; + /* XXX -- TODO -- use m->numericarg? */ + rl_vi_start_inserting (m->key, rl_numeric_arg, rl_arg_sign); + } + + return (0); +} + +int +rl_vi_change_to (int count, int key) +{ + int c, r; + + if (_rl_vimvcxt) + _rl_mvcxt_init (_rl_vimvcxt, VIM_CHANGE, key); + else + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_CHANGE, key); + _rl_vimvcxt->start = rl_point; + + rl_mark = rl_point; + if (_rl_uppercase_p (key)) + { + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing) /* handle redoing `cc' here */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + rl_mark = rl_end; + rl_beg_of_line (1, key); + RL_UNSETSTATE (RL_STATE_VIMOTION); + r = vidomove_dispatch (_rl_vimvcxt); + } +#if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + RL_SETSTATE (RL_STATE_VIMOTION); + return (0); + } +#endif + else + r = rl_vi_domove (key, &c); + + if (r < 0) + { + rl_ding (); + r = -1; /* normalize return value */ + } + + _rl_mvcxt_dispose (_rl_vimvcxt); + _rl_vimvcxt = 0; + + return r; +} + +static int +vi_yank_dispatch (_rl_vimotion_cxt *m) +{ + /* These are the motion commands that do not require adjusting the + mark. */ + if (((strchr (" l|h^0%bBFT`", m->motion) == 0) && (rl_point >= m->start)) && + (rl_mark < rl_end)) + INCREMENT_POS (rl_mark); + + rl_begin_undo_group (); + rl_kill_text (rl_point, rl_mark); + rl_end_undo_group (); + rl_do_undo (); + rl_point = m->start; + + _rl_fix_point (1); + + return (0); +} + +int +rl_vi_yank_to (int count, int key) +{ + int c, r; + + if (_rl_vimvcxt) + _rl_mvcxt_init (_rl_vimvcxt, VIM_YANK, key); + else + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_YANK, key); + _rl_vimvcxt->start = rl_point; + + rl_mark = rl_point; + if (_rl_uppercase_p (key)) + { + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing) /* handle redoing `yy' here */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + rl_mark = rl_end; + rl_beg_of_line (1, key); + RL_UNSETSTATE (RL_STATE_VIMOTION); + r = vidomove_dispatch (_rl_vimvcxt); + } +#if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + RL_SETSTATE (RL_STATE_VIMOTION); + return (0); + } +#endif + else + r = rl_vi_domove (key, &c); + + if (r < 0) + { + rl_ding (); + r = -1; + } + + _rl_mvcxt_dispose (_rl_vimvcxt); + _rl_vimvcxt = 0; + + return r; +} + +static int +vidomove_dispatch (_rl_vimotion_cxt *m) +{ + int r; + + switch (m->op) + { + case VIM_DELETE: + r = vi_delete_dispatch (m); + break; + case VIM_CHANGE: + r = vi_change_dispatch (m); + break; + case VIM_YANK: + r = vi_yank_dispatch (m); + break; + default: + _rl_errmsg ("vidomove_dispatch: unknown operator %d", m->op); + r = 1; + break; + } + + RL_UNSETSTATE (RL_STATE_VIMOTION); + return r; +} + +int +rl_vi_rubout (int count, int key) +{ + int opoint; + + if (count < 0) + return (rl_vi_delete (-count, key)); + + if (rl_point == 0) + { + rl_ding (); + return 1; + } + + opoint = rl_point; + if (count > 1 && MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_backward_char (count, key); + else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + else + rl_point -= count; + + if (rl_point < 0) + rl_point = 0; + + rl_kill_text (rl_point, opoint); + + return (0); +} + +int +rl_vi_delete (int count, int key) +{ + int end; + + if (count < 0) + return (rl_vi_rubout (-count, key)); + + if (rl_end == 0) + { + rl_ding (); + return 1; + } + + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + end = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); + else + end = rl_point + count; + + if (end >= rl_end) + end = rl_end; + + rl_kill_text (rl_point, end); + + if (rl_point > 0 && rl_point == rl_end) + rl_backward_char (1, key); + + return (0); +} + +/* This does what Posix specifies vi-mode C-w to do: using whitespace and + punctuation characters as the word boundaries. */ + +#define vi_unix_word_boundary(c) (whitespace(c) || ispunct(c)) + +int +rl_vi_unix_word_rubout (int count, int key) +{ + int orig_point; + + if (rl_point == 0) + rl_ding (); + else + { + orig_point = rl_point; + if (count <= 0) + count = 1; + + while (count--) + { + /* This isn't quite what ksh93 does but it seems to match what the + Posix description of sh specifies, with a few accommodations + for sequences of whitespace characters between words and at + the end of the line. */ + + /* Skip over whitespace at the end of the line as a special case */ + if (rl_point > 0 && (rl_line_buffer[rl_point] == 0) && + whitespace (rl_line_buffer[rl_point - 1])) + while (--rl_point > 0 && whitespace (rl_line_buffer[rl_point])) + ; + + /* If we're at the start of a word, move back to word boundary so we + move back to the `preceding' word */ + if (rl_point > 0 && (vi_unix_word_boundary (rl_line_buffer[rl_point]) == 0) && + vi_unix_word_boundary (rl_line_buffer[rl_point - 1])) + rl_point--; + + /* If we are at a word boundary (whitespace/punct), move backward + past a sequence of word boundary characters. If we are at the + end of a word (non-word boundary), move back to a word boundary */ + if (rl_point > 0 && vi_unix_word_boundary (rl_line_buffer[rl_point])) + while (rl_point && vi_unix_word_boundary (rl_line_buffer[rl_point - 1])) + rl_point--; + else if (rl_point > 0 && vi_unix_word_boundary (rl_line_buffer[rl_point]) == 0) + while (rl_point > 0 && (vi_unix_word_boundary (rl_line_buffer[rl_point - 1]) == 0)) + _rl_vi_backup_point (); + } + + rl_kill_text (orig_point, rl_point); + } + + return 0; +} + + +int +rl_vi_back_to_indent (int count, int key) +{ + rl_beg_of_line (1, key); + while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) + rl_point++; + return (0); +} + +int +rl_vi_first_print (int count, int key) +{ + return (rl_vi_back_to_indent (1, key)); +} + +static int _rl_cs_dir, _rl_cs_orig_dir; + +#if defined (READLINE_CALLBACKS) +static int +_rl_vi_callback_char_search (_rl_callback_generic_arg *data) +{ + int c; +#if defined (HANDLE_MULTIBYTE) + c = _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); +#else + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); +#endif + + if (c <= 0) + { + RL_UNSETSTATE (RL_STATE_CHARSEARCH); + return -1; + } + +#if !defined (HANDLE_MULTIBYTE) + _rl_vi_last_search_char = c; +#endif + + _rl_callback_func = 0; + _rl_want_redisplay = 1; + RL_UNSETSTATE (RL_STATE_CHARSEARCH); + +#if defined (HANDLE_MULTIBYTE) + return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_mbchar, _rl_vi_last_search_mblen)); +#else + return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_char)); +#endif +} +#endif + +int +rl_vi_char_search (int count, int key) +{ + int c; +#if defined (HANDLE_MULTIBYTE) + static char *target; + static int tlen; +#else + static char target; +#endif + + if (key == ';' || key == ',') + { + if (_rl_cs_orig_dir == 0) + return 1; +#if defined (HANDLE_MULTIBYTE) + if (_rl_vi_last_search_mblen == 0) + return 1; +#else + if (_rl_vi_last_search_char == 0) + return 1; +#endif + _rl_cs_dir = (key == ';') ? _rl_cs_orig_dir : -_rl_cs_orig_dir; + } + else + { + switch (key) + { + case 't': + _rl_cs_orig_dir = _rl_cs_dir = FTO; + break; + + case 'T': + _rl_cs_orig_dir = _rl_cs_dir = BTO; + break; + + case 'f': + _rl_cs_orig_dir = _rl_cs_dir = FFIND; + break; + + case 'F': + _rl_cs_orig_dir = _rl_cs_dir = BFIND; + break; + } + + if (_rl_vi_redoing) + { + /* set target and tlen below */ + } +#if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_callback_data = _rl_callback_data_alloc (count); + _rl_callback_data->i1 = _rl_cs_dir; + _rl_callback_data->i2 = key; + _rl_callback_func = _rl_vi_callback_char_search; + RL_SETSTATE (RL_STATE_CHARSEARCH); + return (0); + } +#endif + else + { +#if defined (HANDLE_MULTIBYTE) + c = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); + if (c <= 0) + return -1; + _rl_vi_last_search_mblen = c; +#else + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + if (c < 0) + return -1; + _rl_vi_last_search_char = c; +#endif + } + } + +#if defined (HANDLE_MULTIBYTE) + target = _rl_vi_last_search_mbchar; + tlen = _rl_vi_last_search_mblen; +#else + target = _rl_vi_last_search_char; +#endif + +#if defined (HANDLE_MULTIBYTE) + return (_rl_char_search_internal (count, _rl_cs_dir, target, tlen)); +#else + return (_rl_char_search_internal (count, _rl_cs_dir, target)); +#endif +} + +/* Match brackets */ +int +rl_vi_match (int ignore, int key) +{ + int count = 1, brack, pos, tmp, pre; + + pos = rl_point; + if ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) + { + pre = rl_point; + rl_forward_char (1, key); + if (pre == rl_point) + break; + } + } + else + while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 && + rl_point < rl_end - 1) + rl_forward_char (1, key); + + if (brack <= 0) + { + rl_point = pos; + rl_ding (); + return 1; + } + } + + pos = rl_point; + + if (brack < 0) + { + while (count) + { + tmp = pos; + if (MB_CUR_MAX == 1 || rl_byte_oriented) + pos--; + else + { + pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); + if (tmp == pos) + pos--; + } + if (pos >= 0) + { + int b = rl_vi_bracktype (rl_line_buffer[pos]); + if (b == -brack) + count--; + else if (b == brack) + count++; + } + else + { + rl_ding (); + return 1; + } + } + } + else + { /* brack > 0 */ + while (count) + { + if (MB_CUR_MAX == 1 || rl_byte_oriented) + pos++; + else + pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY); + + if (pos < rl_end) + { + int b = rl_vi_bracktype (rl_line_buffer[pos]); + if (b == -brack) + count--; + else if (b == brack) + count++; + } + else + { + rl_ding (); + return 1; + } + } + } + rl_point = pos; + return (0); +} + +int +rl_vi_bracktype (int c) +{ + switch (c) + { + case '(': return 1; + case ')': return -1; + case '[': return 2; + case ']': return -2; + case '{': return 3; + case '}': return -3; + default: return 0; + } +} + +static int +_rl_vi_change_char (int count, int c, char *mb) +{ + int p; + + if (c == '\033' || c == CTRL ('C')) + return -1; + + rl_begin_undo_group (); + while (count-- && rl_point < rl_end) + { + p = rl_point; + rl_vi_delete (1, c); + if (rl_point < p) /* Did we retreat at EOL? */ + _rl_vi_append_forward (c); +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_insert_text (mb); + else +#endif + _rl_insert_char (1, c); + } + + /* The cursor shall be left on the last character changed. */ + rl_backward_char (1, c); + + rl_end_undo_group (); + + return (0); +} + +static int +_rl_vi_callback_getchar (char *mb, int mlen) +{ + return (_rl_bracketed_read_mbstring (mb, mlen)); +} + +#if defined (READLINE_CALLBACKS) +static int +_rl_vi_callback_change_char (_rl_callback_generic_arg *data) +{ + int c; + char mb[MB_LEN_MAX+1]; + + c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + strncpy (_rl_vi_last_replacement, mb, MB_LEN_MAX); + else +#endif + _rl_vi_last_replacement[0] = c; + _rl_vi_last_replacement[MB_LEN_MAX] = '\0'; /* XXX */ + + if (c < 0) + return -1; + + _rl_callback_func = 0; + _rl_want_redisplay = 1; + + return (_rl_vi_change_char (data->count, c, mb)); +} +#endif + +int +rl_vi_change_char (int count, int key) +{ + int c; + char mb[MB_LEN_MAX+1]; + + if (_rl_vi_redoing) + { + strncpy (mb, _rl_vi_last_replacement, MB_LEN_MAX); + c = (unsigned char)_rl_vi_last_replacement[0]; /* XXX */ + mb[MB_LEN_MAX] = '\0'; + } +#if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_callback_data = _rl_callback_data_alloc (count); + _rl_callback_func = _rl_vi_callback_change_char; + return (0); + } +#endif + else + { + c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); +#ifdef HANDLE_MULTIBYTE + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + strncpy (_rl_vi_last_replacement, mb, MB_LEN_MAX); + else +#endif + _rl_vi_last_replacement[0] = c; + _rl_vi_last_replacement[MB_LEN_MAX] = '\0'; /* just in case */ + } + + if (c < 0) + return -1; + + return (_rl_vi_change_char (count, c, mb)); +} + +int +rl_vi_subst (int count, int key) +{ + /* If we are redoing, rl_vi_change_to will stuff the last motion char */ + if (_rl_vi_redoing == 0) + rl_stuff_char ((key == 'S') ? 'c' : 'l'); /* `S' == `cc', `s' == `cl' */ + + return (rl_vi_change_to (count, 'c')); +} + +int +rl_vi_overstrike (int count, int key) +{ + if (_rl_vi_doing_insert == 0) + { + _rl_vi_doing_insert = 1; + rl_begin_undo_group (); + } + + if (count > 0) + { + _rl_overwrite_char (count, key); + vi_replace_count += count; + } + + return (0); +} + +int +rl_vi_overstrike_delete (int count, int key) +{ + int i, s; + + for (i = 0; i < count; i++) + { + if (vi_replace_count == 0) + { + rl_ding (); + break; + } + s = rl_point; + + if (rl_do_undo ()) + vi_replace_count--; /* XXX */ + + if (rl_point == s) + rl_backward_char (1, key); + } + + if (vi_replace_count == 0 && _rl_vi_doing_insert) + { + rl_end_undo_group (); + rl_do_undo (); + _rl_vi_doing_insert = 0; + } + return (0); +} + +static int +rl_vi_overstrike_kill_line (int count, int key) +{ + int r, end; + + end = rl_end; + r = rl_unix_line_discard (count, key); + vi_replace_count -= end - rl_end; + return r; +} + +static int +rl_vi_overstrike_kill_word (int count, int key) +{ + int r, end; + + end = rl_end; + r = rl_vi_unix_word_rubout (count, key); + vi_replace_count -= end - rl_end; + return r; +} + +static int +rl_vi_overstrike_yank (int count, int key) +{ + int r, end; + + end = rl_end; + r = rl_yank (count, key); + vi_replace_count += rl_end - end; + return r; +} + +/* Read bracketed paste mode pasted text and insert it in overwrite mode */ +static int +rl_vi_overstrike_bracketed_paste (int count, int key) +{ + int r; + char *pbuf; + size_t pblen; + + pbuf = _rl_bracketed_text (&pblen); + if (pblen == 0) + { + xfree (pbuf); + return 0; + } + r = pblen; + while (--r >= 0) + _rl_unget_char ((unsigned char)pbuf[r]); + xfree (pbuf); + + while (_rl_pushed_input_available ()) + { + key = rl_read_key (); + r = rl_vi_overstrike (1, key); + } + + return r; +} + +int +rl_vi_replace (int count, int key) +{ + int i; + + vi_replace_count = 0; + + if (vi_replace_map == 0) + { + vi_replace_map = rl_make_bare_keymap (); + + for (i = 0; i < ' '; i++) + if (vi_insertion_keymap[i].type == ISFUNC) + vi_replace_map[i].function = vi_insertion_keymap[i].function; + + for (i = ' '; i < KEYMAP_SIZE; i++) + vi_replace_map[i].function = rl_vi_overstrike; + + vi_replace_map[RUBOUT].function = rl_vi_overstrike_delete; + + /* Make sure these are what we want. */ + vi_replace_map[ESC].function = rl_vi_movement_mode; + vi_replace_map[RETURN].function = rl_newline; + vi_replace_map[NEWLINE].function = rl_newline; + + /* If the normal vi insertion keymap has ^H bound to erase, do the + same here. Probably should remove the assignment to RUBOUT up + there, but I don't think it will make a difference in real life. */ + if (vi_insertion_keymap[CTRL ('H')].type == ISFUNC && + vi_insertion_keymap[CTRL ('H')].function == rl_rubout) + vi_replace_map[CTRL ('H')].function = rl_vi_overstrike_delete; + + /* Same for ^U and unix-line-discard. */ + if (vi_insertion_keymap[CTRL ('U')].type == ISFUNC && + vi_insertion_keymap[CTRL ('U')].function == rl_unix_line_discard) + vi_replace_map[CTRL ('U')].function = rl_vi_overstrike_kill_line; + + /* And for ^W and unix-word-rubout. */ + if (vi_insertion_keymap[CTRL ('W')].type == ISFUNC && + vi_insertion_keymap[CTRL ('W')].function == rl_vi_unix_word_rubout) + vi_replace_map[CTRL ('W')].function = rl_vi_overstrike_kill_word; + + /* And finally for ^Y and yank. */ + if (vi_insertion_keymap[CTRL ('Y')].type == ISFUNC && + vi_insertion_keymap[CTRL ('Y')].function == rl_yank) + vi_replace_map[CTRL ('Y')].function = rl_vi_overstrike_yank; + + /* Make sure this is the value we need. */ + vi_replace_map[ANYOTHERKEY].type = ISFUNC; + vi_replace_map[ANYOTHERKEY].function = (rl_command_func_t *)NULL; + } + + rl_vi_start_inserting (key, 1, rl_arg_sign); + + _rl_vi_last_key_before_insert = 'R'; /* in case someone rebinds it */ + _rl_keymap = vi_replace_map; + + if (_rl_enable_bracketed_paste) + rl_bind_keyseq_if_unbound (BRACK_PASTE_PREF, rl_vi_overstrike_bracketed_paste); + + return (0); +} + +#if 0 +/* Try to complete the word we are standing on or the word that ends with + the previous character. A space matches everything. Word delimiters are + space and ;. */ +int +rl_vi_possible_completions (void) +{ + int save_pos = rl_point; + + if (rl_line_buffer[rl_point] != ' ' && rl_line_buffer[rl_point] != ';') + { + while (rl_point < rl_end && rl_line_buffer[rl_point] != ' ' && + rl_line_buffer[rl_point] != ';') + _rl_vi_advance_point (); + } + else if (rl_line_buffer[rl_point - 1] == ';') + { + rl_ding (); + return (0); + } + + rl_possible_completions (); + rl_point = save_pos; + + return (0); +} +#endif + +/* Functions to save and restore marks. */ +static int +_rl_vi_set_mark (void) +{ + int ch; + + RL_SETSTATE(RL_STATE_MOREINPUT); + ch = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ + { + rl_ding (); + return 1; + } + ch -= 'a'; + vi_mark_chars[ch] = rl_point; + return 0; +} + +#if defined (READLINE_CALLBACKS) +static int +_rl_vi_callback_set_mark (_rl_callback_generic_arg *data) +{ + _rl_callback_func = 0; + _rl_want_redisplay = 1; + + return (_rl_vi_set_mark ()); +} +#endif + +int +rl_vi_set_mark (int count, int key) +{ +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_callback_data = 0; + _rl_callback_func = _rl_vi_callback_set_mark; + return (0); + } +#endif + + return (_rl_vi_set_mark ()); +} + +static int +_rl_vi_goto_mark (void) +{ + int ch; + + RL_SETSTATE(RL_STATE_MOREINPUT); + ch = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (ch == '`') + { + rl_point = rl_mark; + _rl_fix_point (1); + return 0; + } + else if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ + { + rl_ding (); + return 1; + } + + ch -= 'a'; + if (vi_mark_chars[ch] == -1) + { + rl_ding (); + return 1; + } + rl_point = vi_mark_chars[ch]; + _rl_fix_point (1); + return 0; +} + +#if defined (READLINE_CALLBACKS) +static int +_rl_vi_callback_goto_mark (_rl_callback_generic_arg *data) +{ + _rl_callback_func = 0; + _rl_want_redisplay = 1; + + return (_rl_vi_goto_mark ()); +} +#endif + +int +rl_vi_goto_mark (int count, int key) +{ +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + _rl_callback_data = 0; + _rl_callback_func = _rl_vi_callback_goto_mark; + return (0); + } +#endif + + return (_rl_vi_goto_mark ()); +} +#endif /* VI_MODE */ diff --git a/bash-5.1/lib/readline/xfree.c b/bash-5.1/lib/readline/xfree.c new file mode 100644 index 0000000000000000000000000000000000000000..c199b29bdfd769987494d6faa90270cea8625adf --- /dev/null +++ b/bash-5.1/lib/readline/xfree.c @@ -0,0 +1,49 @@ +/* xfree.c -- safe version of free that ignores attempts to free NUL */ + +/* Copyright (C) 1991-2010,2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +#include +#endif + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "xmalloc.h" + +/* **************************************************************** */ +/* */ +/* Memory Deallocation. */ +/* */ +/* **************************************************************** */ + +/* Use this as the function to call when adding unwind protects so we + don't need to know what free() returns. */ +void +xfree (PTR_T string) +{ + if (string) + free (string); +} diff --git a/bash-5.1/lib/readline/xmalloc.c b/bash-5.1/lib/readline/xmalloc.c new file mode 100644 index 0000000000000000000000000000000000000000..5d01d75eaeff07805e10fb512dc70949a59c6040 --- /dev/null +++ b/bash-5.1/lib/readline/xmalloc.c @@ -0,0 +1,75 @@ +/* xmalloc.c -- safe versions of malloc and realloc */ + +/* Copyright (C) 1991-2017 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +#include +#endif + +#include + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "xmalloc.h" + +/* **************************************************************** */ +/* */ +/* Memory Allocation and Deallocation. */ +/* */ +/* **************************************************************** */ + +static void +memory_error_and_abort (char *fname) +{ + fprintf (stderr, "%s: out of virtual memory\n", fname); + exit (2); +} + +/* Return a pointer to free()able block of memory large enough + to hold BYTES number of bytes. If the memory cannot be allocated, + print an error message and abort. */ +PTR_T +xmalloc (size_t bytes) +{ + PTR_T temp; + + temp = malloc (bytes); + if (temp == 0) + memory_error_and_abort ("xmalloc"); + return (temp); +} + +PTR_T +xrealloc (PTR_T pointer, size_t bytes) +{ + PTR_T temp; + + temp = pointer ? realloc (pointer, bytes) : malloc (bytes); + + if (temp == 0) + memory_error_and_abort ("xrealloc"); + return (temp); +} diff --git a/bash-5.1/lib/readline/xmalloc.h b/bash-5.1/lib/readline/xmalloc.h new file mode 100644 index 0000000000000000000000000000000000000000..f40d7a596a287c3024598f47f769b0694eaf44a5 --- /dev/null +++ b/bash-5.1/lib/readline/xmalloc.h @@ -0,0 +1,45 @@ +/* xmalloc.h -- memory allocation that aborts on errors. */ + +/* Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_XMALLOC_H_) +#define _XMALLOC_H_ + +#if defined (READLINE_LIBRARY) +# include "rlstdc.h" +#else +# include +#endif + +#ifndef PTR_T + +#ifdef __STDC__ +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* !PTR_T */ + +extern PTR_T xmalloc PARAMS((size_t)); +extern PTR_T xrealloc PARAMS((void *, size_t)); +extern void xfree PARAMS((void *)); + +#endif /* _XMALLOC_H_ */ diff --git a/bash-5.1/lib/sh/Makefile.in b/bash-5.1/lib/sh/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..98064de55712dfbf73c5c9d2198a58559c66c0cc --- /dev/null +++ b/bash-5.1/lib/sh/Makefile.in @@ -0,0 +1,639 @@ +# +# Makefile for the Bash library +# +# +# Copyright (C) 1998-2020 Free Software Foundation, Inc. + +# 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 . + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_VERSION = @PACKAGE_VERSION@ + +srcdir = @srcdir@ +VPATH = @srcdir@ +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ + +LIBBUILD = ${BUILD_DIR}/lib + +BASHINCDIR = ${topdir}/include + +INTL_LIBSRC = ${topdir}/lib/intl +INTL_BUILDDIR = ${LIBBUILD}/intl +INTL_INC = @INTL_INC@ +LIBINTL_H = @LIBINTL_H@ + +datarootdir = @datarootdir@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CC = @CC@ +RANLIB = @RANLIB@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +RM = rm -f +CP = cp +MV = mv + +SHELL = @MAKE_SHELL@ + +CFLAGS = @CFLAGS@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ + +PROFILE_FLAGS = @PROFILE_FLAGS@ + +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(BASHINCDIR) -I$(srcdir) $(INTL_INC) + +CCFLAGS = ${ADDON_CFLAGS} ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) \ + $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS) + +GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ + -Wcast-align -Wstrict-prototypes -Wconversion \ + -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic + +.c.o: + $(CC) -c $(CCFLAGS) $< + +# The name of the library target. +LIBRARY_NAME = libsh.a + +# The C code source files for this library. +CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \ + strcasecmp.c strerror.c strtod.c strtol.c strtoul.c \ + vprint.c itos.c rename.c zread.c zwrite.c shtty.c \ + inet_aton.c netconn.c netopen.c strpbrk.c timeval.c makepath.c \ + pathcanon.c pathphys.c tmpfile.c stringlist.c stringvec.c spell.c \ + shquote.c strtrans.c strcasestr.c snprintf.c mailstat.c \ + fmtulong.c fmtullong.c fmtumax.c shmatch.c strnlen.c \ + strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c strstr.c \ + mktime.c strftime.c mbschr.c zcatfd.c zmapfd.c winsize.c eaccess.c \ + wcsdup.c fpurge.c zgetline.c mbscmp.c uconvert.c ufuncs.c \ + casemod.c dprintf.c input_avail.c mbscasecmp.c fnxform.c \ + strchrnul.c unicode.c wcswidth.c wcsnwidth.c shmbchar.c strdup.c \ + utf8.c random.c gettimeofday.c + +# The header files for this library. +HSOURCES = + +# The object files contained in $(LIBRARY_NAME) +LIBOBJS = @LIBOBJS@ +OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.o \ + itos.o zread.o zwrite.o shtty.o shmatch.o eaccess.o \ + netconn.o netopen.o timeval.o makepath.o pathcanon.o \ + pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \ + strtrans.o snprintf.o mailstat.o fmtulong.o \ + fmtullong.o fmtumax.o zcatfd.o zmapfd.o winsize.o wcsdup.o \ + fpurge.o zgetline.o mbscmp.o uconvert.o ufuncs.o casemod.o \ + input_avail.o mbscasecmp.o fnxform.o unicode.o shmbchar.o \ + utf8.o random.o gettimeofday.o wcsnwidth.o ${LIBOBJS} + +SUPPORT = Makefile + +all: $(LIBRARY_NAME) + +$(LIBRARY_NAME): $(OBJECTS) + $(RM) $@ + $(AR) $(ARFLAGS) $@ $(OBJECTS) + -test -n "$(RANLIB)" && $(RANLIB) $@ + +force: + +# The rule for 'includes' is written funny so that the if statement +# always returns TRUE unless there really was an error installing the +# include files. +install: + +clean: + $(RM) $(OBJECTS) $(LIBRARY_NAME) + +realclean distclean maintainer-clean: clean + $(RM) Makefile + +mostlyclean: clean + +# Dependencies + +${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile + -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h ) + +${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile + -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h ) + +# rules for losing makes, like SunOS +casemod.o: casemod.c +clktck.o: clktck.c +clock.o: clock.c +eaccess.o: eaccess.c +dprintf.o: dprintf.c +fmtullong.o: fmtullong.c +fmtulong.o: fmtulong.c +fmtumax.o: fmtumax.c +fnxform.o: fnxform.c +fpurge.o: fpurge.c +getcwd.o: getcwd.c +getenv.o: getenv.c +gettimeofday.o: gettimeofday.c +inet_aton.o: inet_aton.c +input_avail.o: input_avail.c +itos.o: itos.c +mailstat.o: mailstat.c +makepath.o: makepath.c +mbscasecmp.o: mbscasecmp.c +mbschr.o: mbschr.c +mbscmp.o: mbscmp.c +memset.o: memset.c +mktime.o: mktime.c +netconn.o: netconn.c +netopen.o: netopen.c +oslib.o: oslib.c +pathcanon.o: pathcanon.c +pathphys.o: pathphys.c +random.o: random.c +rename.o: rename.c +setlinebuf.o: setlinebuf.c +shmatch.o: shmatch.c +shmbchar.o: shmbchar.c +shquote.o: shquote.c +shtty.o: shtty.c +snprintf.o: snprintf.c +spell.o: spell.c +strcasecmp.o: strcasecmp.c +strchrnul.o: strchrnul.c +strerror.o: strerror.c +strftime.o: strftime.c +strcasestr.o: strcasestr.c +stringlist.o: stringlist.c +stringvec.o: stringvec.c +strnlen.o: strnlen.c +strpbrk.o: strpbrk.c +strtod.o: strtod.c +strtoimax.o: strtoimax.c +strtol.o: strtol.c +strtoll.o: strtoll.c +strtoul.o: strtoul.c +strtoull.o: strtoull.c +strtoumax.o: strtoumax.c +strtrans.o: strtrans.c +times.o: times.c +timeval.o: timeval.c +tmpfile.o: tmpfile.c +uconvert.o: uconvert.c +ufuncs.o: ufuncs.c +unicode.o: unicode.c +utf8.o: utf8.c +vprint.o: vprint.c +wcsdup.o: wcsdup.c +wcsnwidth.o: wcsnwidth.c +wcswidth.o: wcswidth.c +winsize.o: winsize.c +zcatfd.o: zcatfd.c +zmapfd.o: zmapfd.c +zgetline.o: zgetline.c +zread.o: zread.c +zwrite.o: zwrite.c + +# dependencies for c files that include other c files +fmtullong.o: fmtulong.c +fmtumax.o: fmtulong.c +strtoll.o: strtol.c +strtoul.o: strtol.c +strtoull.o: strtol.c + +# all files in the library depend on config.h +casemod.o: ${BUILD_DIR}/config.h +clktck.o: ${BUILD_DIR}/config.h +clock.o: ${BUILD_DIR}/config.h +eaccess.o: ${BUILD_DIR}/config.h +dprintf.o: ${BUILD_DIR}/config.h +fmtullong.o: ${BUILD_DIR}/config.h +fmtulong.o: ${BUILD_DIR}/config.h +fmtumax.o: ${BUILD_DIR}/config.h +fnxform.o: ${BUILD_DIR}/config.h +fpurge.o: ${BUILD_DIR}/config.h +getcwd.o: ${BUILD_DIR}/config.h +getenv.o: ${BUILD_DIR}/config.h +gettimeofday.o: ${BUILD_DIR}/config.h +inet_aton.o: ${BUILD_DIR}/config.h +input_avail.o: ${BUILD_DIR}/config.h +itos.o: ${BUILD_DIR}/config.h +mailstat.o: ${BUILD_DIR}/config.h +makepath.o: ${BUILD_DIR}/config.h +mbscasecmp.o: ${BUILD_DIR}/config.h +mbschr.o: ${BUILD_DIR}/config.h +mbscmp.o: ${BUILD_DIR}/config.h +memset.o: ${BUILD_DIR}/config.h +mktime.o: ${BUILD_DIR}/config.h +netconn.o: ${BUILD_DIR}/config.h +netopen.o: ${BUILD_DIR}/config.h +oslib.o: ${BUILD_DIR}/config.h +pathcanon.o: ${BUILD_DIR}/config.h +pathphys.o: ${BUILD_DIR}/config.h +random.o: ${BUILD_DIR}/config.h +rename.o: ${BUILD_DIR}/config.h +setlinebuf.o: ${BUILD_DIR}/config.h +shmatch.o: ${BUILD_DIR}/config.h +shmbchar.o: ${BUILD_DIR}/config.h +shquote.o: ${BUILD_DIR}/config.h +shtty.o: ${BUILD_DIR}/config.h +snprintf.o: ${BUILD_DIR}/config.h +spell.o: ${BUILD_DIR}/config.h +strcasecmp.o: ${BUILD_DIR}/config.h +strchrnul.o: ${BUILD_DIR}/config.h +strerror.o: ${BUILD_DIR}/config.h +strftime.o: ${BUILD_DIR}/config.h +strcasestr.o: ${BUILD_DIR}/config.h +stringlist.o: ${BUILD_DIR}/config.h +stringvec.o: ${BUILD_DIR}/config.h +strnlen.o: ${BUILD_DIR}/config.h +strpbrk.o: ${BUILD_DIR}/config.h +strtod.o: ${BUILD_DIR}/config.h +strtoimax.o: ${BUILD_DIR}/config.h +strtol.o: ${BUILD_DIR}/config.h +strtoll.o: ${BUILD_DIR}/config.h +strtoul.o: ${BUILD_DIR}/config.h +strtoull.o: ${BUILD_DIR}/config.h +strtoumax.o: ${BUILD_DIR}/config.h +strtrans.o: ${BUILD_DIR}/config.h +times.o: ${BUILD_DIR}/config.h +timeval.o: ${BUILD_DIR}/config.h +tmpfile.o: ${BUILD_DIR}/config.h ${topdir}/config-top.h +uconvert.o: ${BUILD_DIR}/config.h +ufuncs.o: ${BUILD_DIR}/config.h +unicode.o: ${BUILD_DIR}/config.h +utf8.o: ${BUILD_DIR}/config.h +vprint.o: ${BUILD_DIR}/config.h +wcsdup.o: ${BUILD_DIR}/config.h +wcsnwidth.o: ${BUILD_DIR}/config.h +wcswidth.o: ${BUILD_DIR}/config.h +winsize.o: ${BUILD_DIR}/config.h +zcatfd.o: ${BUILD_DIR}/config.h +zgetline.o: ${BUILD_DIR}/config.h +zmapfd.o: ${BUILD_DIR}/config.h +zread.o: ${BUILD_DIR}/config.h +zwrite.o: ${BUILD_DIR}/config.h + +clktck.o: ${topdir}/bashtypes.h + +getcwd.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h +getcwd.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h +getcwd.o: ${BASHINCDIR}/memalloc.h ${BASHINCDIR}/ansi_stdlib.h + +getenv.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +getenv.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +getenv.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +getenv.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +getenv.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +getenv.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +getenv.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +getenv.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#getenv.o: ${BUILD_DIR}/version.h + +inet_aton.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +inet_aton.o: ${BASHINCDIR}/stdc.h + +itos.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +itos.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +itos.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +itos.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +itos.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +itos.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +itos.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +itos.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#itos.o: ${BUILD_DIR}/version.h + +makepath.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +makepath.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +makepath.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +makepath.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +makepath.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +makepath.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +makepath.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +makepath.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#makepath.o: ${BUILD_DIR}/version.h + +netconn.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h +netconn.o: ${topdir}/bashtypes.h + +netopen.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h +netopen.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +netopen.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +netopen.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +netopen.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +netopen.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +netopen.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +netopen.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +netopen.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +#netopen.o: ${BUILD_DIR}/version.h + +oslib.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h +oslib.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +oslib.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +oslib.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +oslib.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +oslib.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +oslib.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +oslib.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +oslib.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h +oslib.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +#oslib.o: ${BUILD_DIR}/version.h + +pathcanon.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h +pathcanon.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +pathcanon.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +pathcanon.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +pathcanon.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +pathcanon.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +pathcanon.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +pathcanon.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +pathcanon.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h +pathcanon.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +#pathcanon.o: ${BUILD_DIR}/version.h + +pathphys.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h +pathphys.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +pathphys.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +pathphys.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +pathphys.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +pathphys.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +pathphys.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +pathphys.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +pathphys.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h +pathphys.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +#pathphys.o: ${BUILD_DIR}/version.h + +random.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h +random.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +random.o: ${BASHINCDIR}/filecntl.h + +rename.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h +rename.o: ${BASHINCDIR}/posixstat.h + +setlinebuf.o: ${topdir}/xmalloc.h ${topdir}/bashansi.h +setlinebuf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/stdc.h + +eaccess.o: ${topdir}/bashtypes.h +eaccess.o: ${BASHINCDIR}/posixstat.h +eaccess.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +eaccess.o: ${BASHINCDIR}/filecntl.h +eaccess.o: ${BASHINCDIR}/stdc.h +eaccess.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +eaccess.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +eaccess.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +eaccess.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +eaccess.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +eaccess.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +eaccess.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#eaccess.o: ${BUILD_DIR}/version.h + +shmatch.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h +shmatch.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h +shmatch.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +shmatch.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +shmatch.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +shmatch.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +shmatch.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +shmatch.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +shmatch.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h + +shquote.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h +shquote.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h +shquote.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h + +shtty.o: ${BASHINCDIR}/shtty.h +shtty.o: ${BASHINCDIR}/stdc.h + +snprintf.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h ${topdir}/xmalloc.h +snprintf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +snprintf.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +snprintf.o: ${BASHINCDIR}/typemax.h + +spell.o: ${topdir}/bashtypes.h +spell.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h +spell.o: ${BASHINCDIR}/ansi_stdlib.h + +strcasecmp.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h +strcasecmp.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h + +strerror.o: ${topdir}/bashtypes.h +strerror.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +strerror.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +strerror.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +strerror.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +strerror.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +strerror.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +strerror.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#strerror.o: ${BUILD_DIR}/version.h + +strcasestr.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h +strcasestr.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h + +stringlist.o: ${topdir}/bashansi.h +stringlist.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +stringlist.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +stringlist.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +stringlist.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +stringlist.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +stringlist.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +stringlist.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#stringlist.o: ${BUILD_DIR}/version.h + +stringvec.o: ${topdir}/bashansi.h ${BASHINCDIR}/chartypes.h +stringvec.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +stringvec.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +stringvec.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +stringvec.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +stringvec.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +stringvec.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +stringvec.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#stringvec.o: ${BUILD_DIR}/version.h + +strnlen.o: ${BASHINCDIR}/stdc.h + +strpbrk.o: ${BASHINCDIR}/stdc.h + +strtod.o: ${topdir}/bashansi.h +strtod.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h + +strtoimax.o: ${BASHINCDIR}/stdc.h + +strtol.o: ${topdir}/bashansi.h +strtol.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +strtol.o: ${BASHINCDIR}/typemax.h + +strtoll.o: ${topdir}/bashansi.h +strtoll.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +strtoll.o: ${BASHINCDIR}/typemax.h + +strtoul.o: ${topdir}/bashansi.h +strtoul.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +strtoul.o: ${BASHINCDIR}/typemax.h + +strtoull.o: ${topdir}/bashansi.h +strtoull.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +strtoull.o: ${BASHINCDIR}/typemax.h + +strtoumax.o: ${BASHINCDIR}/stdc.h + +strtrans.o: ${topdir}/bashansi.h +strtrans.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +strtrans.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +strtrans.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +strtrans.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +strtrans.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +strtrans.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +strtrans.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +strtrans.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +strtrans.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +#strtrans.o: ${BUILD_DIR}/version.h + +times.o: ${BASHINCDIR}/systimes.h +times.o: ${BASHINCDIR}/posixtime.h + +timeval.o: ${BASHINCDIR}/posixtime.h +gettimeofday.o: ${BASHINCDIR}/posixtime.h + +tmpfile.o: ${topdir}/bashtypes.h +tmpfile.o: ${BASHINCDIR}/chartypes.h +tmpfile.o: ${BASHINCDIR}/posixstat.h +tmpfile.o: ${BASHINCDIR}/filecntl.h +tmpfile.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +tmpfile.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +tmpfile.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +tmpfile.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +tmpfile.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +tmpfile.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +tmpfile.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h + +uconvert.o: ${topdir}/bashtypes.h +uconvert.o: ${BASHINCDIR}/chartypes.h +uconvert.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +uconvert.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +uconvert.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +uconvert.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +uconvert.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +uconvert.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +uconvert.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h + +ufuncs.o: ${topdir}/bashtypes.h + +clock.o: ${BASHINCDIR}/posixtime.h + +mailstat.o: ${topdir}/bashansi.h +mailstat.o: ${topdir}/bashtypes.h +mailstat.o: ${BASHINCDIR}/ansi_stdlib.h +mailstat.o: ${BASHINCDIR}/posixstat.h +mailstat.o: ${BASHINCDIR}/posixdir.h +mailstat.o: ${BASHINCDIR}/maxpath.h + +fmtulong.o: ${topdir}/bashansi.h +fmtulong.o: ${BASHINCDIR}/ansi_stdlib.h +fmtulong.o: ${BASHINCDIR}/chartypes.h +fmtulong.o: ${BASHINCDIR}/stdc.h +fmtulong.o: ${BASHINCDIR}/typemax.h +fmtulong.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + +fmtullong.o: ${topdir}/bashansi.h +fmtullong.o: ${BASHINCDIR}/ansi_stdlib.h +fmtullong.o: ${BASHINCDIR}/chartypes.h +fmtullong.o: ${BASHINCDIR}/stdc.h +fmtullong.o: ${BASHINCDIR}/typemax.h +fmtullong.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + +fmtumax.o: ${topdir}/bashansi.h +fmtumax.o: ${BASHINCDIR}/ansi_stdlib.h +fmtumax.o: ${BASHINCDIR}/chartypes.h +fmtumax.o: ${BASHINCDIR}/stdc.h +fmtumax.o: ${BASHINCDIR}/typemax.h +fmtumax.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + +wcsdup.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +wcsdup.o: ${BASHINCDIR}/stdc.h +wcsdup.o: ${topdir}/xmalloc.h + +wcsnwidth.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +wcsnwidth.o: ${BASHINCDIR}/stdc.h + +wcswidth.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +wcswidth.o: ${BASHINCDIR}/stdc.h + +mbschr.o: ${topdir}/bashansi.h +mbschr.o: ${BASHINCDIR}/ansi_stdlib.h +mbschr.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h + +zgetline.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +zgetline.o: ${BASHINCDIR}/stdc.h +zgetline.o: ${topdir}/xmalloc.h +zgetline.o: ${topdir}/bashtypes.h + +mbscasecmp.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +mbscasecmp.o: ${BASHINCDIR}/stdc.h +mbscasecmp.o: ${topdir}/xmalloc.h + +mbscmp.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +mbscmp.o: ${BASHINCDIR}/stdc.h +mbscmp.o: ${topdir}/xmalloc.h + +casemod.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +casemod.o: ${BASHINCDIR}/stdc.h +casemod.o: ${topdir}/xmalloc.h +casemod.o: ${topdir}/bashtypes.h +casemod.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +casemod.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + +dprintf.o: ${BASHINCDIR}/stdc.h + +input_avail.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +input_avail.o: ${BASHINCDIR}/stdc.h +input_avail.o: ${topdir}/xmalloc.h ${BASHINCDIR}/posixselect.h + +mktime.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +mktime.o: ${BASHINCDIR}/stdc.h + +fnxform.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +fnxform.o: ${BASHINCDIR}/stdc.h +fnxform.o: ${topdir}/bashtypes.h +fnxform.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + +shmbchar.o: ${BASHINCDIR}/shmbchar.h +shmbchar.o: ${BASHINCDIR}/shmbutil.h + +unicode.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +unicode.o: ${BASHINCDIR}/stdc.h +unicode.o: ${topdir}/xmalloc.h + +utf8.o: ${topdir}/bashansi.h +utf8.o: ${BASHINCDIR}/ansi_stdlib.h +utf8.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h + +winsize.o: ${BASHINCDIR}/stdc.h +winsize.o: ${topdir}/xmalloc.h +winsize.o: ${topdir}/bashtypes.h + +zmapfd.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +zmapfd.o: ${BASHINCDIR}/stdc.h +zmapfd.o: ${topdir}/command.h +zmapfd.o: ${topdir}/general.h +zmapfd.o: ${topdir}/bashtypes.h ${BASHINCDIR}/chartypes.h ${topdir}/xmalloc.h diff --git a/bash-5.1/lib/sh/casemod.c b/bash-5.1/lib/sh/casemod.c new file mode 100644 index 0000000000000000000000000000000000000000..bdd96f840613e129eec959ec649c6228df7f99ad --- /dev/null +++ b/bash-5.1/lib/sh/casemod.c @@ -0,0 +1,273 @@ +/* casemod.c -- functions to change case of strings */ + +/* Copyright (C) 2008-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#define _to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc)) +#define _to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc)) + +#if !defined (HANDLE_MULTIBYTE) +# define cval(s, i) ((s)[(i)]) +# define iswalnum(c) (isalnum(c)) +# define TOGGLE(x) (ISUPPER (x) ? tolower ((unsigned char)x) : (TOUPPER (x))) +#else +# define TOGGLE(x) (iswupper (x) ? towlower (x) : (_to_wupper(x))) +#endif + +/* These must agree with the defines in externs.h */ +#define CASE_NOOP 0x0000 +#define CASE_LOWER 0x0001 +#define CASE_UPPER 0x0002 +#define CASE_CAPITALIZE 0x0004 +#define CASE_UNCAP 0x0008 +#define CASE_TOGGLE 0x0010 +#define CASE_TOGGLEALL 0x0020 +#define CASE_UPFIRST 0x0040 +#define CASE_LOWFIRST 0x0080 + +#define CASE_USEWORDS 0x1000 /* modify behavior to act on words in passed string */ + +extern char *substring PARAMS((char *, int, int)); + +#ifndef UCHAR_MAX +# define UCHAR_MAX TYPE_MAXIMUM(unsigned char) +#endif + +#if defined (HANDLE_MULTIBYTE) +static wchar_t +cval (s, i) + char *s; + int i; +{ + size_t tmp; + wchar_t wc; + int l; + mbstate_t mps; + + if (MB_CUR_MAX == 1 || is_basic (s[i])) + return ((wchar_t)s[i]); + l = strlen (s); + if (i >= (l - 1)) + return ((wchar_t)s[i]); + memset (&mps, 0, sizeof (mbstate_t)); + tmp = mbrtowc (&wc, s + i, l - i, &mps); + if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp)) + return ((wchar_t)s[i]); + return wc; +} +#endif + +/* Modify the case of characters in STRING matching PAT based on the value of + FLAGS. If PAT is null, modify the case of each character */ +char * +sh_modcase (string, pat, flags) + const char *string; + char *pat; + int flags; +{ + int start, next, end, retind; + int inword, c, nc, nop, match, usewords; + char *ret, *s; + wchar_t wc; + int mb_cur_max; +#if defined (HANDLE_MULTIBYTE) + wchar_t nwc; + char mb[MB_LEN_MAX+1]; + int mlen; + size_t m; + mbstate_t state; +#endif + + if (string == 0 || *string == 0) + { + ret = (char *)xmalloc (1); + ret[0] = '\0'; + return ret; + } + +#if defined (HANDLE_MULTIBYTE) + memset (&state, 0, sizeof (mbstate_t)); +#endif + + start = 0; + end = strlen (string); + mb_cur_max = MB_CUR_MAX; + + ret = (char *)xmalloc (2*end + 1); + retind = 0; + + /* See if we are supposed to split on alphanumerics and operate on each word */ + usewords = (flags & CASE_USEWORDS); + flags &= ~CASE_USEWORDS; + + inword = 0; + while (start < end) + { + wc = cval ((char *)string, start); + + if (iswalnum (wc) == 0) + inword = 0; + + if (pat) + { + next = start; + ADVANCE_CHAR (string, end, next); + s = substring ((char *)string, start, next); + match = strmatch (pat, s, FNM_EXTMATCH) != FNM_NOMATCH; + free (s); + if (match == 0) + { + /* copy unmatched portion */ + memcpy (ret + retind, string + start, next - start); + retind += next - start; + start = next; + inword = 1; + continue; + } + } + + /* XXX - for now, the toggling operators work on the individual + words in the string, breaking on alphanumerics. Should I + leave the capitalization operators to do that also? */ + if (flags == CASE_CAPITALIZE) + { + if (usewords) + nop = inword ? CASE_LOWER : CASE_UPPER; + else + nop = (start > 0) ? CASE_LOWER : CASE_UPPER; + inword = 1; + } + else if (flags == CASE_UNCAP) + { + if (usewords) + nop = inword ? CASE_UPPER : CASE_LOWER; + else + nop = (start > 0) ? CASE_UPPER : CASE_LOWER; + inword = 1; + } + else if (flags == CASE_UPFIRST) + { + if (usewords) + nop = inword ? CASE_NOOP : CASE_UPPER; + else + nop = (start > 0) ? CASE_NOOP : CASE_UPPER; + inword = 1; + } + else if (flags == CASE_LOWFIRST) + { + if (usewords) + nop = inword ? CASE_NOOP : CASE_LOWER; + else + nop = (start > 0) ? CASE_NOOP : CASE_LOWER; + inword = 1; + } + else if (flags == CASE_TOGGLE) + { + nop = inword ? CASE_NOOP : CASE_TOGGLE; + inword = 1; + } + else + nop = flags; + + /* Can't short-circuit, some locales have multibyte upper and lower + case equivalents of single-byte ascii characters (e.g., Turkish) */ + if (mb_cur_max == 1) + { +singlebyte: + switch (nop) + { + default: + case CASE_NOOP: nc = wc; break; + case CASE_UPPER: nc = TOUPPER (wc); break; + case CASE_LOWER: nc = TOLOWER (wc); break; + case CASE_TOGGLEALL: + case CASE_TOGGLE: nc = TOGGLE (wc); break; + } + ret[retind++] = nc; + } +#if defined (HANDLE_MULTIBYTE) + else + { + m = mbrtowc (&wc, string + start, end - start, &state); + /* Have to go through wide case conversion even for single-byte + chars, to accommodate single-byte characters where the + corresponding upper or lower case equivalent is multibyte. */ + if (MB_INVALIDCH (m)) + { + wc = (unsigned char)string[start]; + goto singlebyte; + } + else if (MB_NULLWCH (m)) + wc = L'\0'; + switch (nop) + { + default: + case CASE_NOOP: nwc = wc; break; + case CASE_UPPER: nwc = _to_wupper (wc); break; + case CASE_LOWER: nwc = _to_wlower (wc); break; + case CASE_TOGGLEALL: + case CASE_TOGGLE: nwc = TOGGLE (wc); break; + } + + /* We don't have to convert `wide' characters that are in the + unsigned char range back to single-byte `multibyte' characters. */ + if ((int)nwc <= UCHAR_MAX && is_basic ((int)nwc)) + ret[retind++] = nwc; + else + { + mlen = wcrtomb (mb, nwc, &state); + if (mlen > 0) + mb[mlen] = '\0'; + /* Don't assume the same width */ + strncpy (ret + retind, mb, mlen); + retind += mlen; + } + } +#endif + + ADVANCE_CHAR (string, end, start); + } + + ret[retind] = '\0'; + return ret; +} diff --git a/bash-5.1/lib/sh/clktck.c b/bash-5.1/lib/sh/clktck.c new file mode 100644 index 0000000000000000000000000000000000000000..8b9b5b325366559be05c84642173fdf570e63334 --- /dev/null +++ b/bash-5.1/lib/sh/clktck.c @@ -0,0 +1,61 @@ +/* clktck.c - get the value of CLK_TCK. */ + +/* Copyright (C) 1997 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_LIMITS_H) +# include +#endif + +#if !defined (HAVE_SYSCONF) || !defined (_SC_CLK_TCK) +# if !defined (CLK_TCK) +# if defined (HZ) +# define CLK_TCK HZ +# else +# define CLK_TCK 60 +# endif +# endif /* !CLK_TCK */ +#endif /* !HAVE_SYSCONF && !_SC_CLK_TCK */ + +long +get_clk_tck () +{ + static long retval = 0; + + if (retval != 0) + return (retval); + +#if defined (HAVE_SYSCONF) && defined (_SC_CLK_TCK) + retval = sysconf (_SC_CLK_TCK); +#else /* !SYSCONF || !_SC_CLK_TCK */ + retval = CLK_TCK; +#endif /* !SYSCONF || !_SC_CLK_TCK */ + + return (retval); +} diff --git a/bash-5.1/lib/sh/clock.c b/bash-5.1/lib/sh/clock.c new file mode 100644 index 0000000000000000000000000000000000000000..c6c52bf89f7bdb3de365664fabe316c7be237d8d --- /dev/null +++ b/bash-5.1/lib/sh/clock.c @@ -0,0 +1,87 @@ +/* clock.c - operations on struct tms and clock_t's */ + +/* Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_TIMES) + +#include +#include + +#if defined (HAVE_SYS_TIMES_H) +# include +#endif + +#include +#include + +#include + +#ifndef locale_decpoint +extern int locale_decpoint PARAMS((void)); +#endif + +extern long get_clk_tck PARAMS((void)); + +void +clock_t_to_secs (t, sp, sfp) + clock_t t; + time_t *sp; + int *sfp; +{ + static long clk_tck = -1; + + if (clk_tck == -1) + clk_tck = get_clk_tck (); + + *sfp = t % clk_tck; + *sfp = (*sfp * 1000) / clk_tck; + + *sp = t / clk_tck; + + /* Sanity check */ + if (*sfp >= 1000) + { + *sp += 1; + *sfp -= 1000; + } +} + +/* Print the time defined by a clock_t (returned by the `times' and `time' + system calls) in a standard way to stdio stream FP. This is scaled in + terms of the value of CLK_TCK, which is what is returned by the + `times' call. */ +void +print_clock_t (fp, t) + FILE *fp; + clock_t t; +{ + time_t timestamp; + long minutes; + int seconds, seconds_fraction; + + clock_t_to_secs (t, ×tamp, &seconds_fraction); + + minutes = timestamp / 60; + seconds = timestamp % 60; + + fprintf (fp, "%ldm%d%c%03ds", minutes, seconds, locale_decpoint(), seconds_fraction); +} +#endif /* HAVE_TIMES */ diff --git a/bash-5.1/lib/sh/dprintf.c b/bash-5.1/lib/sh/dprintf.c new file mode 100644 index 0000000000000000000000000000000000000000..b3b5d644609a004345be117cfdfe4408c6606c7b --- /dev/null +++ b/bash-5.1/lib/sh/dprintf.c @@ -0,0 +1,70 @@ +/* dprintf -- printf to a file descriptor */ + +/* Copyright (C) 2008-2010 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (PREFER_STDARG) +# include +#else +# include +#endif + +#include + +int +#if defined (PREFER_STDARG) +dprintf(int fd, const char *format, ...) +#else +dprintf(fd, format, va_alist) + int fd; + const char *format; + va_dcl +#endif +{ + FILE *fp; + int fd2, rc, r2; + va_list args; + + if ((fd2 = dup(fd)) < 0) + return -1; + fp = fdopen (fd2, "w"); + if (fp == 0) + { + close (fd2); + return -1; + } + + SH_VA_START (args, format); + rc = vfprintf (fp, format, args); + fflush (fp); + va_end (args); + + r2 = fclose (fp); /* check here */ + + return rc; +} diff --git a/bash-5.1/lib/sh/eaccess.c b/bash-5.1/lib/sh/eaccess.c new file mode 100644 index 0000000000000000000000000000000000000000..c3043ec139f81cf571c346cb4ec5246c2e285d0d --- /dev/null +++ b/bash-5.1/lib/sh/eaccess.c @@ -0,0 +1,244 @@ +/* eaccess.c - eaccess replacement for the shell, plus other access functions. */ + +/* Copyright (C) 2006-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" + +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H) +# include +#endif /* !_POSIX_VERSION */ +#include "posixstat.h" +#include "filecntl.h" + +#include "shell.h" + +#if !defined (R_OK) +#define R_OK 4 +#define W_OK 2 +#define X_OK 1 +#define F_OK 0 +#endif /* R_OK */ + +static int path_is_devfd PARAMS((const char *)); +static int sh_stataccess PARAMS((const char *, int)); +#if HAVE_DECL_SETREGID +static int sh_euidaccess PARAMS((const char *, int)); +#endif + +static int +path_is_devfd (path) + const char *path; +{ + if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0) + return 1; + else if (STREQN (path, "/dev/std", 8)) + { + if (STREQ (path+8, "in") || STREQ (path+8, "out") || STREQ (path+8, "err")) + return 1; + else + return 0; + } + else + return 0; +} + +/* A wrapper for stat () which disallows pathnames that are empty strings + and handles /dev/fd emulation on systems that don't have it. */ +int +sh_stat (path, finfo) + const char *path; + struct stat *finfo; +{ + static char *pbuf = 0; + + if (*path == '\0') + { + errno = ENOENT; + return (-1); + } + if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0) + { + /* If stating /dev/fd/n doesn't produce the same results as fstat of + FD N, then define DEV_FD_STAT_BROKEN */ +#if !defined (HAVE_DEV_FD) || defined (DEV_FD_STAT_BROKEN) + intmax_t fd; + int r; + + if (legal_number (path + 8, &fd) && fd == (int)fd) + { + r = fstat ((int)fd, finfo); + if (r == 0 || errno != EBADF) + return (r); + } + errno = ENOENT; + return (-1); +#else + /* If HAVE_DEV_FD is defined, DEV_FD_PREFIX is defined also, and has a + trailing slash. Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx. + On most systems, with the notable exception of linux, this is + effectively a no-op. */ + pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8)); + strcpy (pbuf, DEV_FD_PREFIX); + strcat (pbuf, path + 8); + return (stat (pbuf, finfo)); +#endif /* !HAVE_DEV_FD */ + } +#if !defined (HAVE_DEV_STDIN) + else if (STREQN (path, "/dev/std", 8)) + { + if (STREQ (path+8, "in")) + return (fstat (0, finfo)); + else if (STREQ (path+8, "out")) + return (fstat (1, finfo)); + else if (STREQ (path+8, "err")) + return (fstat (2, finfo)); + else + return (stat (path, finfo)); + } +#endif /* !HAVE_DEV_STDIN */ + return (stat (path, finfo)); +} + +/* Do the same thing access(2) does, but use the effective uid and gid, + and don't make the mistake of telling root that any file is + executable. This version uses stat(2). */ +static int +sh_stataccess (path, mode) + const char *path; + int mode; +{ + struct stat st; + + if (sh_stat (path, &st) < 0) + return (-1); + + if (current_user.euid == 0) + { + /* Root can read or write any file. */ + if ((mode & X_OK) == 0) + return (0); + + /* Root can execute any file that has any one of the execute + bits set. */ + if (st.st_mode & S_IXUGO) + return (0); + } + + if (st.st_uid == current_user.euid) /* owner */ + mode <<= 6; + else if (group_member (st.st_gid)) + mode <<= 3; + + if (st.st_mode & mode) + return (0); + + errno = EACCES; + return (-1); +} + +#if HAVE_DECL_SETREGID +/* Version to call when uid != euid or gid != egid. We temporarily swap + the effective and real uid and gid as appropriate. */ +static int +sh_euidaccess (path, mode) + const char *path; + int mode; +{ + int r, e; + + if (current_user.uid != current_user.euid) + setreuid (current_user.euid, current_user.uid); + if (current_user.gid != current_user.egid) + setregid (current_user.egid, current_user.gid); + + r = access (path, mode); + e = errno; + + if (current_user.uid != current_user.euid) + setreuid (current_user.uid, current_user.euid); + if (current_user.gid != current_user.egid) + setregid (current_user.gid, current_user.egid); + + errno = e; + return r; +} +#endif + +int +sh_eaccess (path, mode) + const char *path; + int mode; +{ + int ret; + + if (path_is_devfd (path)) + return (sh_stataccess (path, mode)); + +#if (defined (HAVE_FACCESSAT) && defined (AT_EACCESS)) || defined (HAVE_EACCESS) +# if defined (HAVE_FACCESSAT) && defined (AT_EACCESS) + ret = faccessat (AT_FDCWD, path, mode, AT_EACCESS); +# else /* HAVE_EACCESS */ /* FreeBSD */ + ret = eaccess (path, mode); /* XXX -- not always correct for X_OK */ +# endif /* HAVE_EACCESS */ +# if defined (__FreeBSD__) || defined (SOLARIS) || defined (_AIX) + if (ret == 0 && current_user.euid == 0 && mode == X_OK) + return (sh_stataccess (path, mode)); +# endif /* __FreeBSD__ || SOLARIS || _AIX */ + return ret; +#elif defined (EFF_ONLY_OK) /* SVR4(?), SVR4.2 */ + return access (path, mode|EFF_ONLY_OK); +#else + if (mode == F_OK) + return (sh_stataccess (path, mode)); + +# if HAVE_DECL_SETREGID + if (current_user.uid != current_user.euid || current_user.gid != current_user.egid) + return (sh_euidaccess (path, mode)); +# endif + + if (current_user.uid == current_user.euid && current_user.gid == current_user.egid) + { + ret = access (path, mode); +#if defined (__FreeBSD__) || defined (SOLARIS) + if (ret == 0 && current_user.euid == 0 && mode == X_OK) + return (sh_stataccess (path, mode)); +#endif + return ret; + } + + return (sh_stataccess (path, mode)); +#endif +} diff --git a/bash-5.1/lib/sh/fmtullong.c b/bash-5.1/lib/sh/fmtullong.c new file mode 100644 index 0000000000000000000000000000000000000000..97a1dc18c1d37c6f355829a867c46848d94a8e7d --- /dev/null +++ b/bash-5.1/lib/sh/fmtullong.c @@ -0,0 +1,31 @@ +/* fmtullong.c - convert `long long int' to string */ + +/* Copyright (C) 2001-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#ifdef HAVE_LONG_LONG + +#define LONG long long +#define UNSIGNED_LONG unsigned long long +#define fmtulong fmtullong + +#include "fmtulong.c" + +#endif diff --git a/bash-5.1/lib/sh/fmtulong.c b/bash-5.1/lib/sh/fmtulong.c new file mode 100644 index 0000000000000000000000000000000000000000..0ccc22b4c9f257d4b2e40fc6f586699925d34079 --- /dev/null +++ b/bash-5.1/lib/sh/fmtulong.c @@ -0,0 +1,191 @@ +/* fmtulong.c -- Convert unsigned long int to string. */ + +/* Copyright (C) 1998-2011 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_LIMITS_H) +# include +#endif + +#include +#ifdef HAVE_STDDEF_H +# include +#endif + +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#include +#include + +#include + +#include "stdc.h" + +#include + +#ifndef errno +extern int errno; +#endif + +#define x_digs "0123456789abcdef" +#define X_digs "0123456789ABCDEF" + +/* XXX -- assumes uppercase letters, lowercase letters, and digits are + contiguous */ +#define FMTCHAR(x) \ + ((x) < 10) ? (x) + '0' \ + : (((x) < 36) ? (x) - 10 + 'a' \ + : (((x) < 62) ? (x) - 36 + 'A' \ + : (((x) == 62) ? '@' : '_'))) + +#ifndef FL_PREFIX +# define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */ +# define FL_ADDBASE 0x02 /* add base# prefix to converted value */ +# define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */ +# define FL_UNSIGNED 0x08 /* don't add any sign */ +#endif + +#ifndef LONG +# define LONG long +# define UNSIGNED_LONG unsigned long +#endif + +/* `unsigned long' (or unsigned long long) to string conversion for a given + base. The caller passes the output buffer and the size. This should + check for buffer underflow, but currently does not. */ +char * +fmtulong (ui, base, buf, len, flags) + UNSIGNED_LONG ui; + int base; + char *buf; + size_t len; + int flags; +{ + char *p; + int sign; + LONG si; + + if (base == 0) + base = 10; + + if (base < 2 || base > 64) + { +#if 1 + /* XXX - truncation possible with long translation */ + strncpy (buf, _("invalid base"), len - 1); + buf[len-1] = '\0'; + errno = EINVAL; + return (p = buf); +#else + base = 10; +#endif + } + + sign = 0; + if ((flags & FL_UNSIGNED) == 0 && (LONG)ui < 0) + { + ui = -ui; + sign = '-'; + } + + p = buf + len - 2; + p[1] = '\0'; + + /* handle common cases explicitly */ + switch (base) + { + case 10: + if (ui < 10) + { + *p-- = TOCHAR (ui); + break; + } + /* Favor signed arithmetic over unsigned arithmetic; it is faster on + many machines. */ + if ((LONG)ui < 0) + { + *p-- = TOCHAR (ui % 10); + si = ui / 10; + } + else + si = ui; + do + *p-- = TOCHAR (si % 10); + while (si /= 10); + break; + + case 8: + do + *p-- = TOCHAR (ui & 7); + while (ui >>= 3); + break; + + case 16: + do + *p-- = (flags & FL_HEXUPPER) ? X_digs[ui & 15] : x_digs[ui & 15]; + while (ui >>= 4); + break; + + case 2: + do + *p-- = TOCHAR (ui & 1); + while (ui >>= 1); + break; + + default: + do + *p-- = FMTCHAR (ui % base); + while (ui /= base); + break; + } + + if ((flags & FL_PREFIX) && (base == 8 || base == 16)) + { + if (base == 16) + { + *p-- = (flags & FL_HEXUPPER) ? 'X' : 'x'; + *p-- = '0'; + } + else if (p[1] != '0') + *p-- = '0'; + } + else if ((flags & FL_ADDBASE) && base != 10) + { + *p-- = '#'; + *p-- = TOCHAR (base % 10); + if (base > 10) + *p-- = TOCHAR (base / 10); + } + + if (sign) + *p-- = '-'; + + return (p + 1); +} diff --git a/bash-5.1/lib/sh/fmtumax.c b/bash-5.1/lib/sh/fmtumax.c new file mode 100644 index 0000000000000000000000000000000000000000..f2786b5d319a842b12a6cea45c9602224ed6db46 --- /dev/null +++ b/bash-5.1/lib/sh/fmtumax.c @@ -0,0 +1,27 @@ +/* fmtumax.c -- Convert uintmax_t to string. */ + +/* Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#define LONG intmax_t +#define UNSIGNED_LONG uintmax_t +#define fmtulong fmtumax + +#include "fmtulong.c" diff --git a/bash-5.1/lib/sh/fnxform.c b/bash-5.1/lib/sh/fnxform.c new file mode 100644 index 0000000000000000000000000000000000000000..35d7e73788008443ee4b3bbeb7723740094ffd23 --- /dev/null +++ b/bash-5.1/lib/sh/fnxform.c @@ -0,0 +1,199 @@ +/* fnxform - use iconv(3) to transform strings to and from "filename" format */ + +/* Copyright (C) 2009-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "bashansi.h" +#include +#include "bashtypes.h" + +#include "stdc.h" +#include "bashintl.h" +#include + +#if defined (HAVE_ICONV) +# include +#endif + +#if defined (HAVE_LOCALE_CHARSET) +extern const char *locale_charset PARAMS((void)); +#else +extern char *get_locale_var PARAMS((char *)); +#endif + +#if defined (HAVE_ICONV) +static iconv_t conv_fromfs = (iconv_t)-1; +static iconv_t conv_tofs = (iconv_t)-1; + +#define OUTLEN_MAX 4096 + +static char *outbuf = 0; +static size_t outlen = 0; + +static char *curencoding PARAMS((void)); +static void init_tofs PARAMS((void)); +static void init_fromfs PARAMS((void)); + +static char * +curencoding () +{ + char *loc; +#if defined (HAVE_LOCALE_CHARSET) + loc = (char *)locale_charset (); + return loc; +#else + char *dot, *mod; + + loc = get_locale_var ("LC_CTYPE"); + if (loc == 0 || *loc == 0) + return ""; + dot = strchr (loc, '.'); + if (dot == 0) + return loc; + mod = strchr (dot, '@'); + if (mod) + *mod = '\0'; + return ++dot; +#endif +} + +static void +init_tofs () +{ + char *cur; + + cur = curencoding (); + conv_tofs = iconv_open ("UTF-8-MAC", cur); +} + +static void +init_fromfs () +{ + char *cur; + + cur = curencoding (); + conv_fromfs = iconv_open (cur, "UTF-8-MAC"); +} + +char * +fnx_tofs (string, len) + char *string; + size_t len; +{ +#ifdef MACOSX + ICONV_CONST char *inbuf; + char *tempbuf; + size_t templen; + + if (conv_tofs == (iconv_t)-1) + init_tofs (); + if (conv_tofs == (iconv_t)-1) + return string; + + /* Free and reallocate outbuf if it's *too* big */ + if (outlen >= OUTLEN_MAX && len < OUTLEN_MAX - 8) + { + free (outbuf); + outbuf = 0; + outlen = 0; + } + + inbuf = string; + if (outbuf == 0 || outlen < len + 8) + { + outlen = len + 8; + outbuf = outbuf ? xrealloc (outbuf, outlen + 1) : xmalloc (outlen + 1); + } + tempbuf = outbuf; + templen = outlen; + + iconv (conv_tofs, NULL, NULL, NULL, NULL); + + if (iconv (conv_tofs, &inbuf, &len, &tempbuf, &templen) == (size_t)-1) + return string; + + *tempbuf = '\0'; + return outbuf; +#else + return string; +#endif +} + +char * +fnx_fromfs (string, len) + char *string; + size_t len; +{ +#ifdef MACOSX + ICONV_CONST char *inbuf; + char *tempbuf; + size_t templen; + + if (conv_fromfs == (iconv_t)-1) + init_fromfs (); + if (conv_fromfs == (iconv_t)-1) + return string; + + /* Free and reallocate outbuf if it's *too* big */ + if (outlen >= OUTLEN_MAX && len < OUTLEN_MAX - 8) + { + free (outbuf); + outbuf = 0; + outlen = 0; + } + + inbuf = string; + if (outbuf == 0 || outlen < (len + 8)) + { + outlen = len + 8; + outbuf = outbuf ? xrealloc (outbuf, outlen + 1) : xmalloc (outlen + 1); + } + tempbuf = outbuf; + templen = outlen; + + iconv (conv_fromfs, NULL, NULL, NULL, NULL); + + if (iconv (conv_fromfs, &inbuf, &len, &tempbuf, &templen) == (size_t)-1) + return string; + + *tempbuf = '\0'; + return outbuf; +#else + return string; +#endif +} + +#else +char * +fnx_tofs (string) + char *string; +{ + return string; +} + +char * +fnx_fromfs (string) + char *string; +{ + return string; +} +#endif diff --git a/bash-5.1/lib/sh/fpurge.c b/bash-5.1/lib/sh/fpurge.c new file mode 100644 index 0000000000000000000000000000000000000000..8cd4e3685f9febfb1e8e7505beb97170768f830d --- /dev/null +++ b/bash-5.1/lib/sh/fpurge.c @@ -0,0 +1,232 @@ +/* fpurge - Flushing buffers of a FILE stream. */ + +/* Copyright (C) 2007-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include "stdc.h" + +#include + +/* Specification. Same as in ../../externs.h. */ +#define NEED_FPURGE_DECL +#if HAVE_FPURGE +# define fpurge _bash_fpurge +#endif +extern int fpurge PARAMS((FILE *stream)); + +#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ +# include +#endif +#include + +/* Inline contents of gnulib:stdio-impl.h */ + +/* Many stdio implementations have the same logic and therefore can share + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + +/* BSD stdio derived implementations. */ + +#if defined __NetBSD__ /* NetBSD */ +/* Get __NetBSD_Version__. */ +# include +#endif + +#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ + +# if defined __DragonFly__ /* DragonFly */ + /* See . */ +# define fp_ ((struct { struct __FILE_public pub; \ + struct { unsigned char *_base; int _size; } _bf; \ + void *cookie; \ + void *_close; \ + void *_read; \ + void *_seek; \ + void *_write; \ + struct { unsigned char *_base; int _size; } _ub; \ + int _ur; \ + unsigned char _ubuf[3]; \ + unsigned char _nbuf[1]; \ + struct { unsigned char *_base; int _size; } _lb; \ + int _blksize; \ + fpos_t _offset; \ + /* More fields, not relevant here. */ \ + } *) fp) + /* See . */ +# define _p pub._p +# define _flags pub._flags +# define _r pub._r +# define _w pub._w +# else +# define fp_ fp +# endif + +# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */ + /* See + and */ + struct __sfileext + { + struct __sbuf _ub; /* ungetc buffer */ + /* More fields, not relevant here. */ + }; +# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub +# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */ +# define fp_ub fp_->_ub +# endif + +# define HASUB(fp) (fp_ub._base != NULL) + +#endif + +/* SystemV derived implementations. */ + +#if defined _IOERR + +# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ +# define fp_ ((struct { unsigned char *_ptr; \ + unsigned char *_base; \ + unsigned char *_end; \ + long _cnt; \ + int _file; \ + unsigned int _flag; \ + } *) fp) +# else +# define fp_ fp +# endif + +# if defined _SCO_DS /* OpenServer */ +# define _cnt __cnt +# define _ptr __ptr +# define _base __base +# define _flag __flag +# endif + +#endif + +int +fpurge (FILE *fp) +{ +#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ + + __fpurge (fp); + /* The __fpurge function does not have a return value. */ + return 0; + +#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */ + + /* Call the system's fpurge function. */ +# undef fpurge +# if !HAVE_DECL_FPURGE + extern int fpurge (FILE *); +# endif + int result = fpurge (fp); +# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ + if (result == 0) + /* Correct the invariants that fpurge broke. + on BSD systems says: + "The following always hold: if _flags & __SRD, _w is 0." + If this invariant is not fulfilled and the stream is read-write but + currently reading, subsequent putc or fputc calls will write directly + into the buffer, although they shouldn't be allowed to. */ + if ((fp_->_flags & __SRD) != 0) + fp_->_w = 0; +# endif + return result; + +#else + + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_IO_read_end = fp->_IO_read_ptr; + fp->_IO_write_ptr = fp->_IO_write_base; + /* Avoid memory leak when there is an active ungetc buffer. */ + if (fp->_IO_save_base != NULL) + { + free (fp->_IO_save_base); + fp->_IO_save_base = NULL; + } + return 0; +# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ + fp_->_p = fp_->_bf._base; + fp_->_r = 0; + fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ + ? fp_->_bf._size + : 0); + /* Avoid memory leak when there is an active ungetc buffer. */ + if (fp_ub._base != NULL) + { + if (fp_ub._base != fp_->_ubuf) + free (fp_ub._base); + fp_ub._base = NULL; + } + return 0; +# elif defined __EMX__ /* emx+gcc */ + fp->_ptr = fp->_buffer; + fp->_rcount = 0; + fp->_wcount = 0; + fp->_ungetc_count = 0; + return 0; +# elif defined _IOERR || defined __TANDEM /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */ + fp->_ptr = fp->_base; + if (fp->_ptr != NULL) + fp->_cnt = 0; + return 0; +# elif defined __UCLIBC__ /* uClibc */ +# ifdef __STDIO_BUFFERS + if (fp->__modeflags & __FLAG_WRITING) + fp->__bufpos = fp->__bufstart; + else if (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) + fp->__bufpos = fp->__bufread; +# endif + return 0; +# elif defined __QNX__ /* QNX */ + fp->_Rback = fp->_Back + sizeof (fp->_Back); + fp->_Rsave = NULL; + if (fp->_Mode & 0x2000 /* _MWRITE */) + /* fp->_Buf <= fp->_Next <= fp->_Wend */ + fp->_Next = fp->_Buf; + else + /* fp->_Buf <= fp->_Next <= fp->_Rend */ + fp->_Rend = fp->_Next; + return 0; +# elif defined __MINT__ /* Atari FreeMiNT */ + if (fp->__pushed_back) + { + fp->__bufp = fp->__pushback_bufp; + fp->__pushed_back = 0; + } + /* Preserve the current file position. */ + if (fp->__target != -1) + fp->__target += fp->__bufp - fp->__buffer; + fp->__bufp = fp->__buffer; + /* Nothing in the buffer, next getc is nontrivial. */ + fp->__get_limit = fp->__bufp; + /* Nothing in the buffer, next putc is nontrivial. */ + fp->__put_limit = fp->__buffer; + return 0; +# else +# warning "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib." + return 0; +# endif + +#endif +} diff --git a/bash-5.1/lib/sh/getcwd.c b/bash-5.1/lib/sh/getcwd.c new file mode 100644 index 0000000000000000000000000000000000000000..d7bd241b1300d79876edae9f95bcad2bffe4ea28 --- /dev/null +++ b/bash-5.1/lib/sh/getcwd.c @@ -0,0 +1,356 @@ +/* getcwd.c -- get pathname of current directory */ + +/* Copyright (C) 1991 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_GETCWD) + +#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX) + #pragma alloca +#endif /* _AIX && RISC6000 && !__GNUC__ */ + +#if defined (__QNX__) +# undef HAVE_LSTAT +#endif + +#include +#include + +#if defined (HAVE_LIMITS_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include +#include + +#include + +#if !defined (D_FILENO_AVAILABLE) +# include "command.h" +# include "general.h" +# include "externs.h" +#endif + +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if !defined (HAVE_LSTAT) +# define lstat stat +#endif + +#if !defined (NULL) +# define NULL 0 +#endif + +/* If the d_fileno member of a struct dirent doesn't return anything useful, + we need to check inode number equivalence the hard way. Return 1 if + the inode corresponding to PATH/DIR is identical to THISINO. */ +#if !defined (D_FILENO_AVAILABLE) +static int +_path_checkino (dotp, name, thisino) + char *dotp; + char *name; + ino_t thisino; +{ + char *fullpath; + int r, e; + struct stat st; + + e = errno; + fullpath = sh_makepath (dotp, name, MP_RMDOT); + if (stat (fullpath, &st) < 0) + { + errno = e; + return 0; + } + free (fullpath); + errno = e; + return (st.st_ino == thisino); +} +#endif + +/* Get the pathname of the current working directory, + and put it in SIZE bytes of BUF. Returns NULL if the + directory couldn't be determined or SIZE was too small. + If successful, returns BUF. In GNU, if BUF is NULL, + an array is allocated with `malloc'; the array is SIZE + bytes long, unless SIZE <= 0, in which case it is as + big as necessary. */ +#if defined (__STDC__) +char * +getcwd (char *buf, size_t size) +#else /* !__STDC__ */ +char * +getcwd (buf, size) + char *buf; + size_t size; +#endif /* !__STDC__ */ +{ + static const char dots[] + = "../../../../../../../../../../../../../../../../../../../../../../../\ +../../../../../../../../../../../../../../../../../../../../../../../../../../\ +../../../../../../../../../../../../../../../../../../../../../../../../../.."; + const char *dotp, *dotlist; + size_t dotsize; + dev_t rootdev, thisdev; + ino_t rootino, thisino; + char path[PATH_MAX + 1]; + register char *pathp; + char *pathbuf; + size_t pathsize; + struct stat st; + int saved_errno; + + if (buf != NULL && size == 0) + { + errno = EINVAL; + return ((char *)NULL); + } + + pathsize = sizeof (path); + pathp = &path[pathsize]; + *--pathp = '\0'; + pathbuf = path; + + if (stat (".", &st) < 0) + return ((char *)NULL); + thisdev = st.st_dev; + thisino = st.st_ino; + + if (stat ("/", &st) < 0) + return ((char *)NULL); + rootdev = st.st_dev; + rootino = st.st_ino; + + saved_errno = 0; + + dotsize = sizeof (dots) - 1; + dotp = &dots[sizeof (dots)]; + dotlist = dots; + while (!(thisdev == rootdev && thisino == rootino)) + { + register DIR *dirstream; + register struct dirent *d; + dev_t dotdev; + ino_t dotino; + char mount_point; + int namlen; + + /* Look at the parent directory. */ + if (dotp == dotlist) + { + /* My, what a deep directory tree you have, Grandma. */ + char *new; + if (dotlist == dots) + { + new = (char *)malloc (dotsize * 2 + 1); + if (new == NULL) + goto lose; + memcpy (new, dots, dotsize); + } + else + { + new = (char *)realloc ((PTR_T) dotlist, dotsize * 2 + 1); + if (new == NULL) + goto lose; + } + memcpy (&new[dotsize], new, dotsize); + dotp = &new[dotsize]; + dotsize *= 2; + new[dotsize] = '\0'; + dotlist = new; + } + + dotp -= 3; + + /* Figure out if this directory is a mount point. */ + if (stat (dotp, &st) < 0) + goto lose; + dotdev = st.st_dev; + dotino = st.st_ino; + mount_point = dotdev != thisdev; + + /* Search for the last directory. */ + dirstream = opendir (dotp); + if (dirstream == NULL) + goto lose; + while ((d = readdir (dirstream)) != NULL) + { + if (d->d_name[0] == '.' && + (d->d_name[1] == '\0' || + (d->d_name[1] == '.' && d->d_name[2] == '\0'))) + continue; +#if defined (D_FILENO_AVAILABLE) + if (mount_point || d->d_fileno == thisino) +#else + if (mount_point || _path_checkino (dotp, d->d_name, thisino)) +#endif + { + char *name; + + namlen = D_NAMLEN(d); + name = (char *) + alloca (dotlist + dotsize - dotp + 1 + namlen + 1); + memcpy (name, dotp, dotlist + dotsize - dotp); + name[dotlist + dotsize - dotp] = '/'; + memcpy (&name[dotlist + dotsize - dotp + 1], + d->d_name, namlen + 1); + if (lstat (name, &st) < 0) + { +#if 0 + int save = errno; + (void) closedir (dirstream); + errno = save; + goto lose; +#else + saved_errno = errno; +#endif + } + if (st.st_dev == thisdev && st.st_ino == thisino) + break; + } + } + if (d == NULL) + { +#if 0 + int save = errno; +#else + int save = errno ? errno : saved_errno; +#endif + (void) closedir (dirstream); + errno = save; + goto lose; + } + else + { + size_t space; + + while ((space = pathp - pathbuf) <= namlen) + { + char *new; + + if (pathbuf == path) + { + new = (char *)malloc (pathsize * 2); + if (!new) + goto lose; + } + else + { + new = (char *)realloc ((PTR_T) pathbuf, (pathsize * 2)); + if (!new) + goto lose; + pathp = new + space; + } + (void) memcpy (new + pathsize + space, pathp, pathsize - space); + pathp = new + pathsize + space; + pathbuf = new; + pathsize *= 2; + } + + pathp -= namlen; + (void) memcpy (pathp, d->d_name, namlen); + *--pathp = '/'; + (void) closedir (dirstream); + } + + thisdev = dotdev; + thisino = dotino; + } + + if (pathp == &path[sizeof(path) - 1]) + *--pathp = '/'; + + if (dotlist != dots) + free ((PTR_T) dotlist); + + { + size_t len = pathbuf + pathsize - pathp; + if (buf == NULL && size <= 0) + size = len; + + if ((size_t) size < len) + { + errno = ERANGE; + goto lose2; + } + if (buf == NULL) + { + buf = (char *) malloc (size); + if (buf == NULL) + goto lose2; + } + + (void) memcpy((PTR_T) buf, (PTR_T) pathp, len); + } + + if (pathbuf != path) + free (pathbuf); + + return (buf); + + lose: + if ((dotlist != dots) && dotlist) + { + int e = errno; + free ((PTR_T) dotlist); + errno = e; + } + + lose2: + if ((pathbuf != path) && pathbuf) + { + int e = errno; + free ((PTR_T) pathbuf); + errno = e; + } + return ((char *)NULL); +} + +#if defined (TEST) +# include +main (argc, argv) + int argc; + char **argv; +{ + char b[PATH_MAX]; + + if (getcwd(b, sizeof(b))) + { + printf ("%s\n", b); + exit (0); + } + else + { + perror ("cwd: getcwd"); + exit (1); + } +} +#endif /* TEST */ +#endif /* !HAVE_GETCWD */ diff --git a/bash-5.1/lib/sh/getenv.c b/bash-5.1/lib/sh/getenv.c new file mode 100644 index 0000000000000000000000000000000000000000..1e682aefb0a2be11a7f8a1467944d1904a9ad4a8 --- /dev/null +++ b/bash-5.1/lib/sh/getenv.c @@ -0,0 +1,233 @@ +/* getenv.c - get environment variable value from the shell's variable + list. */ + +/* Copyright (C) 1997-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (CAN_REDEFINE_GETENV) + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include + +#ifndef errno +extern int errno; +#endif + +extern char **environ; + +/* We supply our own version of getenv () because we want library + routines to get the changed values of exported variables. */ + +/* The NeXT C library has getenv () defined and used in the same file. + This screws our scheme. However, Bash will run on the NeXT using + the C library getenv (), since right now the only environment variable + that we care about is HOME, and that is already defined. */ +static char *last_tempenv_value = (char *)NULL; + +char * +getenv (name) + const char *name; +{ + SHELL_VAR *var; + + if (name == 0 || *name == '\0') + return ((char *)NULL); + + var = find_tempenv_variable ((char *)name); + if (var) + { + FREE (last_tempenv_value); + + last_tempenv_value = value_cell (var) ? savestring (value_cell (var)) : (char *)NULL; + return (last_tempenv_value); + } + else if (shell_variables) + { + var = find_variable ((char *)name); + if (var && exported_p (var)) + return (value_cell (var)); + } + else if (environ) + { + register int i, len; + + /* In some cases, s5r3 invokes getenv() before main(); BSD systems + using gprof also exhibit this behavior. This means that + shell_variables will be 0 when this is invoked. We look up the + variable in the real environment in that case. */ + + for (i = 0, len = strlen (name); environ[i]; i++) + { + if ((STREQN (environ[i], name, len)) && (environ[i][len] == '=')) + return (environ[i] + len + 1); + } + } + + return ((char *)NULL); +} + +/* Some versions of Unix use _getenv instead. */ +char * +_getenv (name) + const char *name; +{ + return (getenv (name)); +} + +/* SUSv3 says argument is a `char *'; BSD implementations disagree */ +int +putenv (str) +#ifndef HAVE_STD_PUTENV + const char *str; +#else + char *str; +#endif +{ + SHELL_VAR *var; + char *name, *value; + int offset; + + if (str == 0 || *str == '\0') + { + errno = EINVAL; + return -1; + } + + offset = assignment (str, 0); + if (str[offset] != '=') + { + errno = EINVAL; + return -1; + } + name = savestring (str); + name[offset] = 0; + + value = name + offset + 1; + + /* XXX - should we worry about readonly here? */ + var = bind_variable (name, value, 0); + if (var == 0) + { + errno = EINVAL; + return -1; + } + + VUNSETATTR (var, att_invisible); + VSETATTR (var, att_exported); + + return 0; +} + +#if 0 +int +_putenv (name) +#ifndef HAVE_STD_PUTENV + const char *name; +#else + char *name; +#endif +{ + return putenv (name); +} +#endif + +int +setenv (name, value, rewrite) + const char *name; + const char *value; + int rewrite; +{ + SHELL_VAR *var; + char *v; + + if (name == 0 || *name == '\0' || strchr (name, '=') != 0) + { + errno = EINVAL; + return -1; + } + + var = 0; + v = (char *)value; /* some compilers need explicit cast */ + /* XXX - should we worry about readonly here? */ + if (rewrite == 0) + var = find_variable (name); + + if (var == 0) + var = bind_variable (name, v, 0); + + if (var == 0) + return -1; + + VUNSETATTR (var, att_invisible); + VSETATTR (var, att_exported); + + return 0; +} + +#if 0 +int +_setenv (name, value, rewrite) + const char *name; + const char *value; + int rewrite; +{ + return setenv (name, value, rewrite); +} +#endif + +/* SUSv3 says unsetenv returns int; existing implementations (BSD) disagree. */ + +#ifdef HAVE_STD_UNSETENV +#define UNSETENV_RETURN(N) return(N) +#define UNSETENV_RETTYPE int +#else +#define UNSETENV_RETURN(N) return +#define UNSETENV_RETTYPE void +#endif + +UNSETENV_RETTYPE +unsetenv (name) + const char *name; +{ + if (name == 0 || *name == '\0' || strchr (name, '=') != 0) + { + errno = EINVAL; + UNSETENV_RETURN(-1); + } + + /* XXX - should we just remove the export attribute here? */ +#if 1 + unbind_variable (name); +#else + SHELL_VAR *v; + + v = find_variable (name); + if (v) + VUNSETATTR (v, att_exported); +#endif + + UNSETENV_RETURN(0); +} +#endif /* CAN_REDEFINE_GETENV */ diff --git a/bash-5.1/lib/sh/gettimeofday.c b/bash-5.1/lib/sh/gettimeofday.c new file mode 100644 index 0000000000000000000000000000000000000000..b654c15476766de4c0c451a8e7ac0dc8cb4b2762 --- /dev/null +++ b/bash-5.1/lib/sh/gettimeofday.c @@ -0,0 +1,35 @@ +/* gettimeofday.c - gettimeofday replacement using time() */ + +/* Copyright (C) 2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if !defined (HAVE_GETTIMEOFDAY) + +#include "posixtime.h" + +/* A version of gettimeofday that just sets tv_sec from time(3) */ +int +gettimeofday (struct timeval *tv, void *tz) +{ + tv->tv_sec = (time_t) time ((time_t *)0); + tv->tv_usec = 0; + return 0; +} +#endif diff --git a/bash-5.1/lib/sh/inet_aton.c b/bash-5.1/lib/sh/inet_aton.c new file mode 100644 index 0000000000000000000000000000000000000000..e377178e58a2e3efc6b3974058dc73e2aadf1e84 --- /dev/null +++ b/bash-5.1/lib/sh/inet_aton.c @@ -0,0 +1,214 @@ +/* inet_aton - convert string to numeric IP address */ + +/* Snagged from GNU C library, version 2.0.3. */ + +/* + * ++Copyright++ 1983, 1990, 1993 + * - + * Copyright (c) 1983, 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * - + * Portions Copyright (c) 1993 by Digital Equipment Corporation. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies, and that + * the name of Digital Equipment Corporation not be used in advertising or + * publicity pertaining to distribution of the document or software without + * specific, written prior permission. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT + * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * - + * --Copyright-- + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; +static char rcsid[] = "$Id: inet_addr.c,v 1.5 1996/08/14 03:48:37 drepper Exp $"; +#endif /* LIBC_SCCS and not lint */ + +#include + +#if !defined (HAVE_INET_ATON) && defined (HAVE_NETWORK) && defined (HAVE_NETINET_IN_H) && defined (HAVE_ARPA_INET_H) + +#include +#if defined (HAVE_SYS_PARAM_H) +#include +#endif +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include +#include + +#ifndef INADDR_NONE +# define INADDR_NONE 0xffffffff +#endif + +/* these are compatibility routines, not needed on recent BSD releases */ + +#if 0 +/* Not used, not needed. */ +/* + * Ascii internet address interpretation routine. + * The value returned is in network order. + */ +u_long +inet_addr(cp) + register const char *cp; +{ + struct in_addr val; + + if (inet_aton(cp, &val)) + return (val.s_addr); + return (INADDR_NONE); +} +#endif + +/* + * Check whether "cp" is a valid ascii representation + * of an Internet address and convert to a binary address. + * Returns 1 if the address is valid, 0 if not. + * This replaces inet_addr, the return value from which + * cannot distinguish between failure and a local broadcast address. + */ +int +inet_aton(cp, addr) + register const char *cp; + struct in_addr *addr; +{ + register u_bits32_t val; + register int base, n; + register unsigned char c; + u_int parts[4]; + register u_int *pp = parts; + + c = *cp; + for (;;) { + /* + * Collect number up to ``.''. + * Values are specified as for C: + * 0x=hex, 0=octal, isdigit=decimal. + */ +#if 0 + if (!isdigit(c)) +#else + if (c != '0' && c != '1' && c != '2' && c != '3' && c != '4' && + c != '5' && c != '6' && c != '7' && c != '8' && c != '9') +#endif + return (0); + val = 0; base = 10; + if (c == '0') { + c = *++cp; + if (c == 'x' || c == 'X') + base = 16, c = *++cp; + else + base = 8; + } + for (;;) { + if (isascii(c) && isdigit(c)) { + val = (val * base) + (c - '0'); + c = *++cp; + } else if (base == 16 && isascii(c) && isxdigit(c)) { + val = (val << 4) | + (c + 10 - (islower(c) ? 'a' : 'A')); + c = *++cp; + } else + break; + } + if (c == '.') { + /* + * Internet format: + * a.b.c.d + * a.b.c (with c treated as 16 bits) + * a.b (with b treated as 24 bits) + */ + if (pp >= parts + 3) + return (0); + *pp++ = val; + c = *++cp; + } else + break; + } + /* + * Check for trailing characters. + */ + if (c != '\0' && (!isascii(c) || !isspace(c))) + return (0); + /* + * Concoct the address according to + * the number of parts specified. + */ + n = pp - parts + 1; + switch (n) { + + case 0: + return (0); /* initial nondigit */ + + case 1: /* a -- 32 bits */ + break; + + case 2: /* a.b -- 8.24 bits */ + if (val > 0xffffff) + return (0); + val |= parts[0] << 24; + break; + + case 3: /* a.b.c -- 8.8.16 bits */ + if (val > 0xffff) + return (0); + val |= (parts[0] << 24) | (parts[1] << 16); + break; + + case 4: /* a.b.c.d -- 8.8.8.8 bits */ + if (val > 0xff) + return (0); + val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); + break; + } + if (addr) + addr->s_addr = htonl(val); + return (1); +} + +#endif /* !HAVE_INET_ATON */ diff --git a/bash-5.1/lib/sh/input_avail.c b/bash-5.1/lib/sh/input_avail.c new file mode 100644 index 0000000000000000000000000000000000000000..695165fdcd0d99e2ad5dbe7ec40ee779ec5e985e --- /dev/null +++ b/bash-5.1/lib/sh/input_avail.c @@ -0,0 +1,165 @@ +/* input_avail.c -- check whether or not data is available for reading on a + specified file descriptor. */ + +/* Copyright (C) 2008,2009-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined (__TANDEM) +# include +#endif + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include +#if defined (HAVE_SYS_FILE_H) +# include +#endif /* HAVE_SYS_FILE_H */ + +#if defined (HAVE_PSELECT) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#include "bashansi.h" + +#include "posixselect.h" + +#if defined (FIONREAD_IN_SYS_IOCTL) +# include +#endif + +#include +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if !defined (O_NDELAY) && defined (O_NONBLOCK) +# define O_NDELAY O_NONBLOCK /* Posix style */ +#endif + +/* Return >= 1 if select/FIONREAD indicates data available for reading on + file descriptor FD; 0 if no data available. Return -1 on error. */ +int +input_avail (fd) + int fd; +{ + int result, chars_avail; +#if defined(HAVE_SELECT) + fd_set readfds, exceptfds; + struct timeval timeout; +#endif + + if (fd < 0) + return -1; + + chars_avail = 0; + +#if defined (HAVE_SELECT) + FD_ZERO (&readfds); + FD_ZERO (&exceptfds); + FD_SET (fd, &readfds); + FD_SET (fd, &exceptfds); + timeout.tv_sec = 0; + timeout.tv_usec = 0; + result = select (fd + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout); + return ((result <= 0) ? 0 : 1); +#endif + +#if defined (FIONREAD) + errno = 0; + result = ioctl (fd, FIONREAD, &chars_avail); + if (result == -1 && errno == EIO) + return -1; + return (chars_avail); +#endif + + return 0; +} + +/* Wait until NCHARS are available for reading on file descriptor FD. + This can wait indefinitely. Return -1 on error. */ +int +nchars_avail (fd, nchars) + int fd; + int nchars; +{ + int result, chars_avail; +#if defined(HAVE_SELECT) + fd_set readfds, exceptfds; +#endif +#if defined (HAVE_PSELECT) + sigset_t set, oset; +#endif + + if (fd < 0 || nchars < 0) + return -1; + if (nchars == 0) + return (input_avail (fd)); + + chars_avail = 0; + +#if defined (HAVE_SELECT) + FD_ZERO (&readfds); + FD_ZERO (&exceptfds); + FD_SET (fd, &readfds); + FD_SET (fd, &exceptfds); +#endif +#if defined (HAVE_SELECT) || defined (HAVE_PSELECT) + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set); +# ifdef SIGCHLD + sigaddset (&set, SIGCHLD); +# endif + sigemptyset (&oset); +#endif + + while (1) + { + result = 0; +#if defined (HAVE_PSELECT) + /* XXX - use pselect(2) to block SIGCHLD atomically */ + result = pselect (fd + 1, &readfds, (fd_set *)NULL, &exceptfds, (struct timespec *)NULL, &set); +#elif defined (HAVE_SELECT) + sigprocmask (SIG_BLOCK, &set, &oset); + result = select (fd + 1, &readfds, (fd_set *)NULL, &exceptfds, (struct timeval *)NULL); + sigprocmask (SIG_BLOCK, &oset, (sigset_t *)NULL); +#endif + if (result < 0) + return -1; + +#if defined (FIONREAD) + errno = 0; + result = ioctl (fd, FIONREAD, &chars_avail); + if (result == -1 && errno == EIO) + return -1; + if (chars_avail >= nchars) + break; +#else + break; +#endif + } + + return 0; +} diff --git a/bash-5.1/lib/sh/itos.c b/bash-5.1/lib/sh/itos.c new file mode 100644 index 0000000000000000000000000000000000000000..cd36ef33ff5338bfc84703403106c9f331942780 --- /dev/null +++ b/bash-5.1/lib/sh/itos.c @@ -0,0 +1,84 @@ +/* itos.c -- Convert integer to string. */ + +/* Copyright (C) 1998-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include "shell.h" + +char * +inttostr (i, buf, len) + intmax_t i; + char *buf; + size_t len; +{ + return (fmtumax (i, 10, buf, len, 0)); +} + +/* Integer to string conversion. This conses the string; the + caller should free it. */ +char * +itos (i) + intmax_t i; +{ + char *p, lbuf[INT_STRLEN_BOUND(intmax_t) + 1]; + + p = fmtumax (i, 10, lbuf, sizeof(lbuf), 0); + return (savestring (p)); +} + +/* Integer to string conversion. This conses the string using strdup; + caller should free it and be prepared to deal with NULL return. */ +char * +mitos (i) + intmax_t i; +{ + char *p, lbuf[INT_STRLEN_BOUND(intmax_t) + 1]; + + p = fmtumax (i, 10, lbuf, sizeof(lbuf), 0); + return (strdup (p)); +} + +char * +uinttostr (i, buf, len) + uintmax_t i; + char *buf; + size_t len; +{ + return (fmtumax (i, 10, buf, len, FL_UNSIGNED)); +} + +/* Integer to string conversion. This conses the string; the + caller should free it. */ +char * +uitos (i) + uintmax_t i; +{ + char *p, lbuf[INT_STRLEN_BOUND(uintmax_t) + 1]; + + p = fmtumax (i, 10, lbuf, sizeof(lbuf), FL_UNSIGNED); + return (savestring (p)); +} diff --git a/bash-5.1/lib/sh/mailstat.c b/bash-5.1/lib/sh/mailstat.c new file mode 100644 index 0000000000000000000000000000000000000000..bd5c25fb4c021d252b974b4369c671b14d668e14 --- /dev/null +++ b/bash-5.1/lib/sh/mailstat.c @@ -0,0 +1,159 @@ +/* mailstat.c -- stat a mailbox file, handling maildir-type mail directories */ + +/* Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#include + +#include +#include +#include +#include + +#if defined (HAVE_SYS_PARAM_H) +# include +#endif + +#include + +/* + * Stat a file. If it's a maildir, check all messages + * in the maildir and present the grand total as a file. + * The fields in the 'struct stat' are from the mail directory. + * The following fields are emulated: + * + * st_nlink always 1, unless st_blocks is not present, in which case it's + * the total number of messages + * st_size total number of bytes in all files + * st_blocks total number of messages, if present in struct stat + * st_atime access time of newest file in maildir + * st_mtime modify time of newest file in maildir + * st_mode S_IFDIR changed to S_IFREG + * + * This is good enough for most mail-checking applications. + */ + +int +mailstat(path, st) + const char *path; + struct stat *st; +{ + static struct stat st_new_last, st_ret_last; + struct stat st_ret, st_tmp; + DIR *dd; + struct dirent *fn; + char dir[PATH_MAX * 2], file[PATH_MAX * 2 + 1]; + int i, l; + time_t atime, mtime; + + atime = mtime = 0; + + /* First see if it's a directory. */ + if ((i = stat(path, st)) != 0 || S_ISDIR(st->st_mode) == 0) + return i; + + if (strlen(path) > sizeof(dir) - 5) + { +#ifdef ENAMETOOLONG + errno = ENAMETOOLONG; +#else + errno = EINVAL; +#endif + return -1; + } + + st_ret = *st; + st_ret.st_nlink = 1; + st_ret.st_size = 0; +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + st_ret.st_blocks = 0; +#else + st_ret.st_nlink = 0; +#endif + st_ret.st_mode &= ~S_IFDIR; + st_ret.st_mode |= S_IFREG; + + /* See if cur/ is present */ + sprintf(dir, "%s/cur", path); + if (stat(dir, &st_tmp) || S_ISDIR(st_tmp.st_mode) == 0) + return 0; + st_ret.st_atime = st_tmp.st_atime; + + /* See if tmp/ is present */ + sprintf(dir, "%s/tmp", path); + if (stat(dir, &st_tmp) || S_ISDIR(st_tmp.st_mode) == 0) + return 0; + st_ret.st_mtime = st_tmp.st_mtime; + + /* And new/ */ + sprintf(dir, "%s/new", path); + if (stat(dir, &st_tmp) || S_ISDIR(st_tmp.st_mode) == 0) + return 0; + st_ret.st_mtime = st_tmp.st_mtime; + + /* Optimization - if new/ didn't change, nothing else did. */ + if (st_tmp.st_dev == st_new_last.st_dev && + st_tmp.st_ino == st_new_last.st_ino && + st_tmp.st_atime == st_new_last.st_atime && + st_tmp.st_mtime == st_new_last.st_mtime) + { + *st = st_ret_last; + return 0; + } + st_new_last = st_tmp; + + /* Loop over new/ and cur/ */ + for (i = 0; i < 2; i++) + { + sprintf(dir, "%s/%s", path, i ? "cur" : "new"); + sprintf(file, "%s/", dir); + l = strlen(file); + if ((dd = opendir(dir)) == NULL) + return 0; + while ((fn = readdir(dd)) != NULL) + { + if (fn->d_name[0] == '.' || strlen(fn->d_name) + l >= sizeof(file)) + continue; + strcpy(file + l, fn->d_name); + if (stat(file, &st_tmp) != 0) + continue; + st_ret.st_size += st_tmp.st_size; +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + st_ret.st_blocks++; +#else + st_ret.st_nlink++; +#endif + if (st_tmp.st_atime != st_tmp.st_mtime && st_tmp.st_atime > atime) + atime = st_tmp.st_atime; + if (st_tmp.st_mtime > mtime) + mtime = st_tmp.st_mtime; + } + closedir(dd); + } + +/* if (atime) */ /* Set atime even if cur/ is empty */ + st_ret.st_atime = atime; + if (mtime) + st_ret.st_mtime = mtime; + + *st = st_ret_last = st_ret; + return 0; +} diff --git a/bash-5.1/lib/sh/makepath.c b/bash-5.1/lib/sh/makepath.c new file mode 100644 index 0000000000000000000000000000000000000000..ab46c9673282efe2307b5a4c6c2adb76bd9050a2 --- /dev/null +++ b/bash-5.1/lib/sh/makepath.c @@ -0,0 +1,128 @@ +/* makepath.c - glue PATH and DIR together into a full pathname. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "shell.h" + +#include + +#ifndef NULL +# define NULL 0 +#endif + +/* MAKE SURE THESE AGREE WITH ../../externs.h. */ + +#ifndef MP_DOTILDE +# define MP_DOTILDE 0x01 +# define MP_DOCWD 0x02 +# define MP_RMDOT 0x04 +# define MP_IGNDOT 0x08 +#endif + +extern char *get_working_directory PARAMS((char *)); + +static char *nullpath = ""; + +/* Take PATH, an element from, e.g., $CDPATH, and DIR, a directory name, + and paste them together into PATH/DIR. Tilde expansion is performed on + PATH if (flags & MP_DOTILDE) is non-zero. If PATH is NULL or the empty + string, it is converted to the current directory. A full pathname is + used if (flags & MP_DOCWD) is non-zero, otherwise `./' is used. If + (flags & MP_RMDOT) is non-zero, any `./' is removed from the beginning + of DIR. If (flags & MP_IGNDOT) is non-zero, a PATH that is "." or "./" + is ignored. */ + +#define MAKEDOT() \ + do { \ + xpath = (char *)xmalloc (2); \ + xpath[0] = '.'; \ + xpath[1] = '\0'; \ + pathlen = 1; \ + } while (0) + +char * +sh_makepath (path, dir, flags) + const char *path, *dir; + int flags; +{ + int dirlen, pathlen; + char *ret, *xpath, *xdir, *r, *s; + + if (path == 0 || *path == '\0') + { + if (flags & MP_DOCWD) + { + xpath = get_working_directory ("sh_makepath"); + if (xpath == 0) + { + ret = get_string_value ("PWD"); + if (ret) + xpath = savestring (ret); + } + if (xpath == 0) + MAKEDOT(); + else + pathlen = strlen (xpath); + } + else + MAKEDOT(); + } + else if ((flags & MP_IGNDOT) && path[0] == '.' && (path[1] == '\0' || + (path[1] == '/' && path[2] == '\0'))) + { + xpath = nullpath; + pathlen = 0; + } + else + { + xpath = ((flags & MP_DOTILDE) && *path == '~') ? bash_tilde_expand (path, 0) : (char *)path; + pathlen = strlen (xpath); + } + + xdir = (char *)dir; + dirlen = strlen (xdir); + if ((flags & MP_RMDOT) && dir[0] == '.' && dir[1] == '/') + { + xdir += 2; + dirlen -= 2; + } + + r = ret = (char *)xmalloc (2 + dirlen + pathlen); + s = xpath; + while (*s) + *r++ = *s++; + if (s > xpath && s[-1] != '/') + *r++ = '/'; + s = xdir; + while (*r++ = *s++) + ; + if (xpath != path && xpath != nullpath) + free (xpath); + return (ret); +} diff --git a/bash-5.1/lib/sh/mbscasecmp.c b/bash-5.1/lib/sh/mbscasecmp.c new file mode 100644 index 0000000000000000000000000000000000000000..0ab956055cbae268a03f508d9c1cd82c6b1f2049 --- /dev/null +++ b/bash-5.1/lib/sh/mbscasecmp.c @@ -0,0 +1,79 @@ +/* mbscasecmp - case-insensitive multibyte string comparison. */ + +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_MBSCASECMP) && defined (HANDLE_MULTIBYTE) + +#include +#include +#include + +#include +#include + +/* Compare MBS1 and MBS2 without regard to case. */ +int +mbscasecmp (mbs1, mbs2) + const char *mbs1; + const char *mbs2; +{ + int len1, len2, mb_cur_max; + wchar_t c1, c2, l1, l2; + + len1 = len2 = 0; + /* Reset multibyte characters to their initial state. */ + (void) mblen ((char *) NULL, 0); + + mb_cur_max = MB_CUR_MAX; + do + { + len1 = mbtowc (&c1, mbs1, mb_cur_max); + len2 = mbtowc (&c2, mbs2, mb_cur_max); + + if (len1 == 0) + return len2 == 0 ? 0 : -1; + else if (len2 == 0) + return 1; + else if (len1 > 0 && len2 < 0) + return -1; + else if (len1 < 0 && len2 > 0) + return 1; + else if (len1 < 0 && len2 < 0) + { + len1 = strlen (mbs1); + len2 = strlen (mbs2); + return (len1 == len2 ? memcmp (mbs1, mbs2, len1) + : ((len1 < len2) ? (memcmp (mbs1, mbs2, len1) > 0 ? 1 : -1) + : (memcmp (mbs1, mbs2, len2) >= 0 ? 1 : -1))); + } + + l1 = towlower (c1); + l2 = towlower (c2); + + mbs1 += len1; + mbs2 += len2; + } + while (l1 == l2); + + return l1 - l2; +} + +#endif diff --git a/bash-5.1/lib/sh/mbschr.c b/bash-5.1/lib/sh/mbschr.c new file mode 100644 index 0000000000000000000000000000000000000000..639962d46317785baabae86bac6623b101ad2cc6 --- /dev/null +++ b/bash-5.1/lib/sh/mbschr.c @@ -0,0 +1,91 @@ +/* mbschr.c - strchr(3) that handles multibyte characters. */ + +/* Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#ifdef HAVE_STDLIB_H +# include +#endif + +#include "bashansi.h" +#include "shmbutil.h" + +extern int locale_mb_cur_max; +extern int locale_utf8locale; + +#undef mbschr + +extern char *utf8_mbschr (const char *, int); /* XXX */ + +/* In some locales, the non-first byte of some multibyte characters have + the same value as some ascii character. Faced with these strings, a + legacy strchr() might return the wrong value. */ + +char * +#if defined (PROTOTYPES) +mbschr (const char *s, int c) +#else +mbschr (s, c) + const char *s; + int c; +#endif +{ +#if HANDLE_MULTIBYTE + char *pos; + mbstate_t state; + size_t strlength, mblength; + + if (locale_utf8locale && c < 0x80) + return (utf8_mbschr (s, c)); /* XXX */ + + /* The locale encodings with said weird property are BIG5, BIG5-HKSCS, + GBK, GB18030, SHIFT_JIS, and JOHAB. They exhibit the problem only + when c >= 0x30. We can therefore use the faster bytewise search if + c <= 0x30. */ + if ((unsigned char)c >= '0' && locale_mb_cur_max > 1) + { + pos = (char *)s; + memset (&state, '\0', sizeof(mbstate_t)); + strlength = strlen (s); + + while (strlength > 0) + { + if (is_basic (*pos)) + mblength = 1; + else + { + mblength = mbrlen (pos, strlength, &state); + if (mblength == (size_t)-2 || mblength == (size_t)-1 || mblength == (size_t)0) + mblength = 1; + } + + if (mblength == 1 && c == (unsigned char)*pos) + return pos; + + strlength -= mblength; + pos += mblength; + } + + return ((char *)NULL); + } + else +#endif + return (strchr (s, c)); +} diff --git a/bash-5.1/lib/sh/mbscmp.c b/bash-5.1/lib/sh/mbscmp.c new file mode 100644 index 0000000000000000000000000000000000000000..c7c8443578f1ea28232590460a5ef99e386bd7d6 --- /dev/null +++ b/bash-5.1/lib/sh/mbscmp.c @@ -0,0 +1,77 @@ +/* mbscmp - multibyte string comparison. */ + +/* Copyright (C) 1995-2018 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_MBSCMP) && defined (HANDLE_MULTIBYTE) + +#include +#include +#include + +extern int locale_utf8locale; + +extern int utf8_mbscmp (const char *, const char *); + +/* Compare MBS1 and MBS2. */ +int +mbscmp (mbs1, mbs2) + const char *mbs1; + const char *mbs2; +{ + int len1, len2, mb_cur_max; + wchar_t c1, c2; + + len1 = len2 = 0; + /* Reset multibyte characters to their initial state. */ + (void) mblen ((char *) NULL, 0); + + mb_cur_max = MB_CUR_MAX; + do + { + len1 = mbtowc (&c1, mbs1, mb_cur_max); + len2 = mbtowc (&c2, mbs2, mb_cur_max); + + if (len1 == 0) + return len2 == 0 ? 0 : -1; + else if (len2 == 0) + return 1; + else if (len1 > 0 && len2 < 0) + return -1; + else if (len1 < 0 && len2 > 0) + return 1; + else if (len1 < 0 && len2 < 0) + { + len1 = strlen (mbs1); + len2 = strlen (mbs2); + return (len1 == len2 ? memcmp (mbs1, mbs2, len1) + : ((len1 < len2) ? (memcmp (mbs1, mbs2, len1) > 0 ? 1 : -1) + : (memcmp (mbs1, mbs2, len2) >= 0 ? 1 : -1))); + } + + mbs1 += len1; + mbs2 += len2; + } + while (c1 == c2); + + return c1 - c2; +} + +#endif diff --git a/bash-5.1/lib/sh/memset.c b/bash-5.1/lib/sh/memset.c new file mode 100644 index 0000000000000000000000000000000000000000..4ebc41889c69012ca018a43137fb6afb6df788ec --- /dev/null +++ b/bash-5.1/lib/sh/memset.c @@ -0,0 +1,29 @@ +/* memset.c -- set an area of memory to a given value */ + +/* Copyright (C) 1991-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +char * +memset (char *str, int c, unsigned int len) +{ + register char *st = str; + + while (len-- > 0) + *st++ = c; + return str; +} diff --git a/bash-5.1/lib/sh/mktime.c b/bash-5.1/lib/sh/mktime.c new file mode 100644 index 0000000000000000000000000000000000000000..9ee675bef50d54449ffc0117811c6f466633ec58 --- /dev/null +++ b/bash-5.1/lib/sh/mktime.c @@ -0,0 +1,438 @@ +/* mktime - convert struct tm to a time_t value */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + Contributed by Paul Eggert (eggert@twinsun.com). + + Bash 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. + + Bash 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 Bash. If not, see . +*/ +/* Define this to have a standalone program to test this implementation of + mktime. */ +/* #define DEBUG 1 */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef _LIBC +# define HAVE_LIMITS_H 1 +# define HAVE_LOCALTIME_R 1 +# define STDC_HEADERS 1 +#endif + +/* Assume that leap seconds are possible, unless told otherwise. + If the host has a `zic' command with a `-L leapsecondfilename' option, + then it supports leap seconds; otherwise it probably doesn't. */ +#ifndef LEAP_SECONDS_POSSIBLE +#define LEAP_SECONDS_POSSIBLE 1 +#endif + +#ifndef VMS +#include /* Some systems define `time_t' here. */ +#endif +#include + +#if HAVE_LIMITS_H +#include +#endif + +#include "bashansi.h" + +#if DEBUG_MKTIME +#include +/* Make it work even if the system's libc has its own mktime routine. */ +#define mktime my_mktime +#endif /* DEBUG_MKTIME */ + +#ifndef PARAMS +#if defined (__GNUC__) || (defined (__STDC__) && __STDC__) +#define PARAMS(args) args +#else +#define PARAMS(args) () +#endif /* GCC. */ +#endif /* Not PARAMS. */ + +#ifndef CHAR_BIT +#define CHAR_BIT 8 +#endif + +#ifndef INT_MIN +#define INT_MIN (~0 << (sizeof (int) * CHAR_BIT - 1)) +#endif +#ifndef INT_MAX +#define INT_MAX (~0 - INT_MIN) +#endif + +/* True if the arithmetic type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* The maximum and minimum values for the integer type T. These + macros have undefined behavior if T is signed and has padding bits. + If this is a problem for you, please let us know how to fix it for + your host. */ +#define TYPE_MINIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) 0 \ + : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + +#ifndef TIME_T_MIN +# define TIME_T_MIN TYPE_MINIMUM (time_t) +#endif +#ifndef TIME_T_MAX +# define TIME_T_MAX TYPE_MAXIMUM (time_t) +#endif + +#define TM_YEAR_BASE 1900 +#define EPOCH_YEAR 1970 + +#ifndef __isleap +/* Nonzero if YEAR is a leap year (every 4 years, + except every 100th isn't, and every 400th is). */ +#define __isleap(year) \ + ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) +#endif + +/* How many days come before each month (0-12). */ +const unsigned short int __mon_yday[2][13] = + { + /* Normal years. */ + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, + /* Leap years. */ + { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } + }; + +static time_t ydhms_tm_diff PARAMS ((int, int, int, int, int, const struct tm *)); +time_t __mktime_internal PARAMS ((struct tm *, + struct tm *(*) (const time_t *, struct tm *), + time_t *)); + + +static struct tm *my_localtime_r PARAMS ((const time_t *, struct tm *)); +static struct tm * +my_localtime_r (t, tp) + const time_t *t; + struct tm *tp; +{ + struct tm *l = localtime (t); + if (! l) + return 0; + *tp = *l; + return tp; +} + + +/* Yield the difference between (YEAR-YDAY HOUR:MIN:SEC) and (*TP), + measured in seconds, ignoring leap seconds. + YEAR uses the same numbering as TM->tm_year. + All values are in range, except possibly YEAR. + If overflow occurs, yield the low order bits of the correct answer. */ +static time_t +ydhms_tm_diff (year, yday, hour, min, sec, tp) + int year, yday, hour, min, sec; + const struct tm *tp; +{ + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid int overflow. time_t overflow is OK, since + only the low order bits of the correct time_t answer are needed. + Don't convert to time_t until after all divisions are done, since + time_t might be unsigned. */ + int a4 = (year >> 2) + (TM_YEAR_BASE >> 2) - ! (year & 3); + int b4 = (tp->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (tp->tm_year & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = a100 >> 2; + int b400 = b100 >> 2; + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + time_t years = year - (time_t) tp->tm_year; + time_t days = (365 * years + intervening_leap_days + + (yday - tp->tm_yday)); + return (60 * (60 * (24 * days + (hour - tp->tm_hour)) + + (min - tp->tm_min)) + + (sec - tp->tm_sec)); +} + + +static time_t localtime_offset; + +/* Convert *TP to a time_t value. */ +time_t +mktime (tp) + struct tm *tp; +{ +#ifdef _LIBC + /* POSIX.1 8.1.1 requires that whenever mktime() is called, the + time zone names contained in the external variable `tzname' shall + be set as if the tzset() function had been called. */ + __tzset (); +#endif + + return __mktime_internal (tp, my_localtime_r, &localtime_offset); +} + +/* Convert *TP to a time_t value, inverting + the monotonic and mostly-unit-linear conversion function CONVERT. + Use *OFFSET to keep track of a guess at the offset of the result, + compared to what the result would be for UTC without leap seconds. + If *OFFSET's guess is correct, only one CONVERT call is needed. */ +time_t +__mktime_internal (tp, convert, offset) + struct tm *tp; + struct tm *(*convert) PARAMS ((const time_t *, struct tm *)); + time_t *offset; +{ + time_t t, dt, t0; + struct tm tm; + + /* The maximum number of probes (calls to CONVERT) should be enough + to handle any combinations of time zone rule changes, solar time, + and leap seconds. Posix.1 prohibits leap seconds, but some hosts + have them anyway. */ + int remaining_probes = 4; + + /* Time requested. Copy it in case CONVERT modifies *TP; this can + occur if TP is localtime's returned value and CONVERT is localtime. */ + int sec = tp->tm_sec; + int min = tp->tm_min; + int hour = tp->tm_hour; + int mday = tp->tm_mday; + int mon = tp->tm_mon; + int year_requested = tp->tm_year; + int isdst = tp->tm_isdst; + + /* Ensure that mon is in range, and set year accordingly. */ + int mon_remainder = mon % 12; + int negative_mon_remainder = mon_remainder < 0; + int mon_years = mon / 12 - negative_mon_remainder; + int year = year_requested + mon_years; + + /* The other values need not be in range: + the remaining code handles minor overflows correctly, + assuming int and time_t arithmetic wraps around. + Major overflows are caught at the end. */ + + /* Calculate day of year from year, month, and day of month. + The result need not be in range. */ + int yday = ((__mon_yday[__isleap (year + TM_YEAR_BASE)] + [mon_remainder + 12 * negative_mon_remainder]) + + mday - 1); + +#if LEAP_SECONDS_POSSIBLE + /* Handle out-of-range seconds specially, + since ydhms_tm_diff assumes every minute has 60 seconds. */ + int sec_requested = sec; + if (sec < 0) + sec = 0; + if (59 < sec) + sec = 59; +#endif + + /* Invert CONVERT by probing. First assume the same offset as last time. + Then repeatedly use the error to improve the guess. */ + + tm.tm_year = EPOCH_YEAR - TM_YEAR_BASE; + tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm); + + for (t = t0 + *offset; + (dt = ydhms_tm_diff (year, yday, hour, min, sec, (*convert) (&t, &tm))); + t += dt) + if (--remaining_probes == 0) + return -1; + + /* Check whether tm.tm_isdst has the requested value, if any. */ + if (0 <= isdst && 0 <= tm.tm_isdst) + { + int dst_diff = (isdst != 0) - (tm.tm_isdst != 0); + if (dst_diff) + { + /* Move two hours in the direction indicated by the disagreement, + probe some more, and switch to a new time if found. + The largest known fallback due to daylight savings is two hours: + once, in Newfoundland, 1988-10-30 02:00 -> 00:00. */ + time_t ot = t - 2 * 60 * 60 * dst_diff; + while (--remaining_probes != 0) + { + struct tm otm; + if (! (dt = ydhms_tm_diff (year, yday, hour, min, sec, + (*convert) (&ot, &otm)))) + { + t = ot; + tm = otm; + break; + } + if ((ot += dt) == t) + break; /* Avoid a redundant probe. */ + } + } + } + + *offset = t - t0; + +#if LEAP_SECONDS_POSSIBLE + if (sec_requested != tm.tm_sec) + { + /* Adjust time to reflect the tm_sec requested, not the normalized value. + Also, repair any damage from a false match due to a leap second. */ + t += sec_requested - sec + (sec == 0 && tm.tm_sec == 60); + (*convert) (&t, &tm); + } +#endif + + if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) + { + /* time_t isn't large enough to rule out overflows in ydhms_tm_diff, + so check for major overflows. A gross check suffices, + since if t has overflowed, it is off by a multiple of + TIME_T_MAX - TIME_T_MIN + 1. So ignore any component of + the difference that is bounded by a small value. */ + + double dyear = (double) year_requested + mon_years - tm.tm_year; + double dday = 366 * dyear + mday; + double dsec = 60 * (60 * (24 * dday + hour) + min) + sec_requested; + + if (TIME_T_MAX / 3 - TIME_T_MIN / 3 < (dsec < 0 ? - dsec : dsec)) + return -1; + } + + *tp = tm; + return t; +} + +#ifdef weak_alias +weak_alias (mktime, timelocal) +#endif + +#if DEBUG_MKTIME + +static int +not_equal_tm (a, b) + struct tm *a; + struct tm *b; +{ + return ((a->tm_sec ^ b->tm_sec) + | (a->tm_min ^ b->tm_min) + | (a->tm_hour ^ b->tm_hour) + | (a->tm_mday ^ b->tm_mday) + | (a->tm_mon ^ b->tm_mon) + | (a->tm_year ^ b->tm_year) + | (a->tm_mday ^ b->tm_mday) + | (a->tm_yday ^ b->tm_yday) + | (a->tm_isdst ^ b->tm_isdst)); +} + +static void +print_tm (tp) + struct tm *tp; +{ + printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", + tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, + tp->tm_hour, tp->tm_min, tp->tm_sec, + tp->tm_yday, tp->tm_wday, tp->tm_isdst); +} + +static int +check_result (tk, tmk, tl, tml) + time_t tk; + struct tm tmk; + time_t tl; + struct tm tml; +{ + if (tk != tl || not_equal_tm (&tmk, &tml)) + { + printf ("mktime ("); + print_tm (&tmk); + printf (")\nyields ("); + print_tm (&tml); + printf (") == %ld, should be %ld\n", (long) tl, (long) tk); + return 1; + } + + return 0; +} + +int +main (argc, argv) + int argc; + char **argv; +{ + int status = 0; + struct tm tm, tmk, tml; + time_t tk, tl; + char trailer; + + if ((argc == 3 || argc == 4) + && (sscanf (argv[1], "%d-%d-%d%c", + &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) + == 3) + && (sscanf (argv[2], "%d:%d:%d%c", + &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) + == 3)) + { + tm.tm_year -= TM_YEAR_BASE; + tm.tm_mon--; + tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); + tmk = tm; + tl = mktime (&tmk); + tml = *localtime (&tl); + printf ("mktime returns %ld == ", (long) tl); + print_tm (&tmk); + printf ("\n"); + status = check_result (tl, tmk, tl, tml); + } + else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) + { + time_t from = atol (argv[1]); + time_t by = atol (argv[2]); + time_t to = atol (argv[3]); + + if (argc == 4) + for (tl = from; tl <= to; tl += by) + { + tml = *localtime (&tl); + tmk = tml; + tk = mktime (&tmk); + status |= check_result (tk, tmk, tl, tml); + } + else + for (tl = from; tl <= to; tl += by) + { + /* Null benchmark. */ + tml = *localtime (&tl); + tmk = tml; + tk = tl; + status |= check_result (tk, tmk, tl, tml); + } + } + else + printf ("Usage:\ +\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ +\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ +\t%s FROM BY TO - # Do not test those values (for benchmark).\n", + argv[0], argv[0], argv[0]); + + return status; +} + +#endif /* DEBUG_MKTIME */ + +/* +Local Variables: +compile-command: "gcc -DDEBUG=1 -Wall -O -g mktime.c -o mktime" +End: +*/ diff --git a/bash-5.1/lib/sh/netconn.c b/bash-5.1/lib/sh/netconn.c new file mode 100644 index 0000000000000000000000000000000000000000..e20f1042006a3230d357ce6ce88aac25633b5899 --- /dev/null +++ b/bash-5.1/lib/sh/netconn.c @@ -0,0 +1,82 @@ +/* netconn.c -- is a particular file descriptor a network connection?. */ + +/* Copyright (C) 2002-2005 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +/* The second and subsequent conditions must match those used to decide + whether or not to call getpeername() in isnetconn(). */ +#if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && !defined (SVR4_2) +# include +#endif + +/* Is FD a socket or network connection? */ +int +isnetconn (fd) + int fd; +{ +#if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && !defined (SVR4_2) && !defined (__BEOS__) + int rv; + socklen_t l; + struct sockaddr sa; + + l = sizeof(sa); + rv = getpeername(fd, &sa, &l); + /* Posix.2 says getpeername can return these errors. */ + return ((rv < 0 && (errno == ENOTSOCK || errno == ENOTCONN || errno == EINVAL || errno == EBADF)) ? 0 : 1); +#else /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */ +# if defined (SVR4) || defined (SVR4_2) + /* Sockets on SVR4 and SVR4.2 are character special (streams) devices. */ + struct stat sb; + + if (isatty (fd)) + return (0); + if (fstat (fd, &sb) < 0) + return (0); +# if defined (S_ISFIFO) + if (S_ISFIFO (sb.st_mode)) + return (0); +# endif /* S_ISFIFO */ + return (S_ISCHR (sb.st_mode)); +# else /* !SVR4 && !SVR4_2 */ +# if defined (S_ISSOCK) && !defined (__BEOS__) + struct stat sb; + + if (fstat (fd, &sb) < 0) + return (0); + return (S_ISSOCK (sb.st_mode)); +# else /* !S_ISSOCK || __BEOS__ */ + return (0); +# endif /* !S_ISSOCK || __BEOS__ */ +# endif /* !SVR4 && !SVR4_2 */ +#endif /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */ +} diff --git a/bash-5.1/lib/sh/netopen.c b/bash-5.1/lib/sh/netopen.c new file mode 100644 index 0000000000000000000000000000000000000000..ee0baf662ec56878b32167c8ad2c4a6a1c1fb996 --- /dev/null +++ b/bash-5.1/lib/sh/netopen.c @@ -0,0 +1,351 @@ +/* + * netopen.c -- functions to make tcp/udp connections + * + * Chet Ramey + * chet@ins.CWRU.Edu + */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_NETWORK) + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include + +#if defined (HAVE_SYS_SOCKET_H) +# include +#endif + +#if defined (HAVE_NETINET_IN_H) +# include +#endif + +#if defined (HAVE_NETDB_H) +# include +#endif + +#if defined (HAVE_ARPA_INET_H) +# include +#endif + +#include +#include + +#include + +#include +#include + +#ifndef errno +extern int errno; +#endif + +#if !defined (HAVE_INET_ATON) +extern int inet_aton PARAMS((const char *, struct in_addr *)); +#endif + +#ifndef HAVE_GETADDRINFO +static int _getaddr PARAMS((char *, struct in_addr *)); +static int _getserv PARAMS((char *, int, unsigned short *)); +static int _netopen4 PARAMS((char *, char *, int)); +#else /* HAVE_GETADDRINFO */ +static int _netopen6 PARAMS((char *, char *, int)); +#endif + +static int _netopen PARAMS((char *, char *, int)); + +#ifndef HAVE_GETADDRINFO +/* Stuff the internet address corresponding to HOST into AP, in network + byte order. Return 1 on success, 0 on failure. */ + +static int +_getaddr (host, ap) + char *host; + struct in_addr *ap; +{ + struct hostent *h; + int r; + + r = 0; + if (host[0] >= '0' && host[0] <= '9') + { + /* If the first character is a digit, guess that it's an + Internet address and return immediately if inet_aton succeeds. */ + r = inet_aton (host, ap); + if (r) + return r; + } +#if !defined (HAVE_GETHOSTBYNAME) + return 0; +#else + h = gethostbyname (host); + if (h && h->h_addr) + { + bcopy(h->h_addr, (char *)ap, h->h_length); + return 1; + } +#endif + return 0; + +} + +/* Return 1 if SERV is a valid port number and stuff the converted value into + PP in network byte order. */ +static int +_getserv (serv, proto, pp) + char *serv; + int proto; + unsigned short *pp; +{ + intmax_t l; + unsigned short s; + + if (legal_number (serv, &l)) + { + s = (unsigned short)(l & 0xFFFF); + if (s != l) + return (0); + s = htons (s); + if (pp) + *pp = s; + return 1; + } + else +#if defined (HAVE_GETSERVBYNAME) + { + struct servent *se; + + se = getservbyname (serv, (proto == 't') ? "tcp" : "udp"); + if (se == 0) + return 0; + if (pp) + *pp = se->s_port; /* ports returned in network byte order */ + return 1; + } +#else /* !HAVE_GETSERVBYNAME */ + return 0; +#endif /* !HAVE_GETSERVBYNAME */ +} + +/* + * Open a TCP or UDP connection to HOST on port SERV. Uses the + * traditional BSD mechanisms. Returns the connected socket or -1 on error. + */ +static int +_netopen4(host, serv, typ) + char *host, *serv; + int typ; +{ + struct in_addr ina; + struct sockaddr_in sin; + unsigned short p; + int s, e; + + if (_getaddr(host, &ina) == 0) + { + internal_error (_("%s: host unknown"), host); + errno = EINVAL; + return -1; + } + + if (_getserv(serv, typ, &p) == 0) + { + internal_error(_("%s: invalid service"), serv); + errno = EINVAL; + return -1; + } + + memset ((char *)&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_port = p; + sin.sin_addr = ina; + + s = socket(AF_INET, (typ == 't') ? SOCK_STREAM : SOCK_DGRAM, 0); + if (s < 0) + { + sys_error ("socket"); + return (-1); + } + + if (connect (s, (struct sockaddr *)&sin, sizeof (sin)) < 0) + { + e = errno; + sys_error("connect"); + close(s); + errno = e; + return (-1); + } + + return(s); +} +#endif /* ! HAVE_GETADDRINFO */ + +#ifdef HAVE_GETADDRINFO +/* + * Open a TCP or UDP connection to HOST on port SERV. Uses getaddrinfo(3) + * which provides support for IPv6. Returns the connected socket or -1 + * on error. + */ +static int +_netopen6 (host, serv, typ) + char *host, *serv; + int typ; +{ + int s, e; + struct addrinfo hints, *res, *res0; + int gerr; + + memset ((char *)&hints, 0, sizeof (hints)); + /* XXX -- if problems with IPv6, set to PF_INET for IPv4 only */ +#ifdef DEBUG /* PF_INET is the one that works for me */ + hints.ai_family = PF_INET; +#else + hints.ai_family = PF_UNSPEC; +#endif + hints.ai_socktype = (typ == 't') ? SOCK_STREAM : SOCK_DGRAM; + + gerr = getaddrinfo (host, serv, &hints, &res0); + if (gerr) + { + if (gerr == EAI_SERVICE) + internal_error ("%s: %s", serv, gai_strerror (gerr)); + else + internal_error ("%s: %s", host, gai_strerror (gerr)); + errno = EINVAL; + return -1; + } + + for (res = res0; res; res = res->ai_next) + { + if ((s = socket (res->ai_family, res->ai_socktype, res->ai_protocol)) < 0) + { + if (res->ai_next) + continue; + sys_error ("socket"); + freeaddrinfo (res0); + return -1; + } + if (connect (s, res->ai_addr, res->ai_addrlen) < 0) + { + if (res->ai_next) + { + close (s); + continue; + } + e = errno; + sys_error ("connect"); + close (s); + freeaddrinfo (res0); + errno = e; + return -1; + } + freeaddrinfo (res0); + break; + } + return s; +} +#endif /* HAVE_GETADDRINFO */ + +/* + * Open a TCP or UDP connection to HOST on port SERV. Uses getaddrinfo(3) + * if available, falling back to the traditional BSD mechanisms otherwise. + * Returns the connected socket or -1 on error. + */ +static int +_netopen(host, serv, typ) + char *host, *serv; + int typ; +{ +#ifdef HAVE_GETADDRINFO + return (_netopen6 (host, serv, typ)); +#else + return (_netopen4 (host, serv, typ)); +#endif +} + +/* + * Open a TCP or UDP connection given a path like `/dev/tcp/host/port' to + * host `host' on port `port' and return the connected socket. + */ +int +netopen (path) + char *path; +{ + char *np, *s, *t; + int fd; + + np = (char *)xmalloc (strlen (path) + 1); + strcpy (np, path); + + s = np + 9; + t = strchr (s, '/'); + if (t == 0) + { + internal_error (_("%s: bad network path specification"), path); + free (np); + return -1; + } + *t++ = '\0'; + fd = _netopen (s, t, path[5]); + free (np); + + return fd; +} + +#if 0 +/* + * Open a TCP connection to host `host' on the port defined for service + * `serv' and return the connected socket. + */ +int +tcpopen (host, serv) + char *host, *serv; +{ + return (_netopen (host, serv, 't')); +} + +/* + * Open a UDP connection to host `host' on the port defined for service + * `serv' and return the connected socket. + */ +int +udpopen (host, serv) + char *host, *serv; +{ + return _netopen (host, serv, 'u'); +} +#endif + +#else /* !HAVE_NETWORK */ + +int +netopen (path) + char *path; +{ + internal_error (_("network operations not supported")); + return -1; +} + +#endif /* !HAVE_NETWORK */ diff --git a/bash-5.1/lib/sh/oslib.c b/bash-5.1/lib/sh/oslib.c new file mode 100644 index 0000000000000000000000000000000000000000..65eb99d9f9c6bda31c38218951fbf40bf0da1d84 --- /dev/null +++ b/bash-5.1/lib/sh/oslib.c @@ -0,0 +1,301 @@ +/* oslib.c - functions present only in some unix versions. */ + +/* Copyright (C) 1995,2010 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_LIMITS_H) +# include +#endif + +#include +#include +#include + +#if !defined (HAVE_KILLPG) +# include +#endif + +#include +#include +#include + +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +/* Make the functions strchr and strrchr if they do not exist. */ +#if !defined (HAVE_STRCHR) +char * +strchr (string, c) + char *string; + int c; +{ + register char *s; + + for (s = string; s && *s; s++) + if (*s == c) + return (s); + + return ((char *) NULL); +} + +char * +strrchr (string, c) + char *string; + int c; +{ + register char *s, *t; + + for (s = string, t = (char *)NULL; s && *s; s++) + if (*s == c) + t = s; + return (t); +} +#endif /* !HAVE_STRCHR */ + +#if !defined (HAVE_DUP2) || defined (DUP2_BROKEN) +/* Replacement for dup2 (), for those systems which either don't have it, + or supply one with broken behaviour. */ +int +dup2 (fd1, fd2) + int fd1, fd2; +{ + int saved_errno, r; + + /* If FD1 is not a valid file descriptor, then return immediately with + an error. */ + if (fcntl (fd1, F_GETFL, 0) == -1) + return (-1); + + if (fd2 < 0 || fd2 >= getdtablesize ()) + { + errno = EBADF; + return (-1); + } + + if (fd1 == fd2) + return (0); + + saved_errno = errno; + + (void) close (fd2); + r = fcntl (fd1, F_DUPFD, fd2); + + if (r >= 0) + errno = saved_errno; + else + if (errno == EINVAL) + errno = EBADF; + + /* Force the new file descriptor to remain open across exec () calls. */ + SET_OPEN_ON_EXEC (fd2); + return (r); +} +#endif /* !HAVE_DUP2 */ + +/* + * Return the total number of available file descriptors. + * + * On some systems, like 4.2BSD and its descendants, there is a system call + * that returns the size of the descriptor table: getdtablesize(). There are + * lots of ways to emulate this on non-BSD systems. + * + * On System V.3, this can be obtained via a call to ulimit: + * return (ulimit(4, 0L)); + * + * On other System V systems, NOFILE is defined in /usr/include/sys/param.h + * (this is what we assume below), so we can simply use it: + * return (NOFILE); + * + * On POSIX systems, there are specific functions for retrieving various + * configuration parameters: + * return (sysconf(_SC_OPEN_MAX)); + * + */ + +#if !defined (HAVE_GETDTABLESIZE) +int +getdtablesize () +{ +# if defined (_POSIX_VERSION) && defined (HAVE_SYSCONF) && defined (_SC_OPEN_MAX) + return (sysconf(_SC_OPEN_MAX)); /* Posix systems use sysconf */ +# else /* ! (_POSIX_VERSION && HAVE_SYSCONF && _SC_OPEN_MAX) */ +# if defined (ULIMIT_MAXFDS) + return (ulimit (4, 0L)); /* System V.3 systems use ulimit(4, 0L) */ +# else /* !ULIMIT_MAXFDS */ +# if defined (NOFILE) /* Other systems use NOFILE */ + return (NOFILE); +# else /* !NOFILE */ + return (20); /* XXX - traditional value is 20 */ +# endif /* !NOFILE */ +# endif /* !ULIMIT_MAXFDS */ +# endif /* ! (_POSIX_VERSION && _SC_OPEN_MAX) */ +} +#endif /* !HAVE_GETDTABLESIZE */ + +#if !defined (HAVE_BCOPY) +# if defined (bcopy) +# undef bcopy +# endif +void +bcopy (s,d,n) + char *d, *s; + int n; +{ + FASTCOPY (s, d, n); +} +#endif /* !HAVE_BCOPY */ + +#if !defined (HAVE_BZERO) +# if defined (bzero) +# undef bzero +# endif +void +bzero (s, n) + char *s; + int n; +{ + register int i; + register char *r; + + for (i = 0, r = s; i < n; i++) + *r++ = '\0'; +} +#endif + +#if !defined (HAVE_GETHOSTNAME) +# if defined (HAVE_UNAME) +# include +int +gethostname (name, namelen) + char *name; + int namelen; +{ + int i; + struct utsname ut; + + --namelen; + + uname (&ut); + i = strlen (ut.nodename) + 1; + strncpy (name, ut.nodename, i < namelen ? i : namelen); + name[namelen] = '\0'; + return (0); +} +# else /* !HAVE_UNAME */ +int +gethostname (name, namelen) + char *name; + int namelen; +{ + strncpy (name, "unknown", namelen); + name[namelen] = '\0'; + return 0; +} +# endif /* !HAVE_UNAME */ +#endif /* !HAVE_GETHOSTNAME */ + +#if !defined (HAVE_KILLPG) +int +killpg (pgrp, sig) + pid_t pgrp; + int sig; +{ + return (kill (-pgrp, sig)); +} +#endif /* !HAVE_KILLPG */ + +#if !defined (HAVE_MKFIFO) && defined (PROCESS_SUBSTITUTION) +int +mkfifo (path, mode) + char *path; + int mode; +{ +#if defined (S_IFIFO) + return (mknod (path, (mode | S_IFIFO), 0)); +#else /* !S_IFIFO */ + return (-1); +#endif /* !S_IFIFO */ +} +#endif /* !HAVE_MKFIFO && PROCESS_SUBSTITUTION */ + +#define DEFAULT_MAXGROUPS 64 + +int +getmaxgroups () +{ + static int maxgroups = -1; + + if (maxgroups > 0) + return maxgroups; + +#if defined (HAVE_SYSCONF) && defined (_SC_NGROUPS_MAX) + maxgroups = sysconf (_SC_NGROUPS_MAX); +#else +# if defined (NGROUPS_MAX) + maxgroups = NGROUPS_MAX; +# else /* !NGROUPS_MAX */ +# if defined (NGROUPS) + maxgroups = NGROUPS; +# else /* !NGROUPS */ + maxgroups = DEFAULT_MAXGROUPS; +# endif /* !NGROUPS */ +# endif /* !NGROUPS_MAX */ +#endif /* !HAVE_SYSCONF || !SC_NGROUPS_MAX */ + + if (maxgroups <= 0) + maxgroups = DEFAULT_MAXGROUPS; + + return maxgroups; +} + +long +getmaxchild () +{ + static long maxchild = -1L; + + if (maxchild > 0) + return maxchild; + +#if defined (HAVE_SYSCONF) && defined (_SC_CHILD_MAX) + maxchild = sysconf (_SC_CHILD_MAX); +#else +# if defined (CHILD_MAX) + maxchild = CHILD_MAX; +# else +# if defined (MAXUPRC) + maxchild = MAXUPRC; +# endif /* MAXUPRC */ +# endif /* CHILD_MAX */ +#endif /* !HAVE_SYSCONF || !_SC_CHILD_MAX */ + + return (maxchild); +} diff --git a/bash-5.1/lib/sh/pathcanon.c b/bash-5.1/lib/sh/pathcanon.c new file mode 100644 index 0000000000000000000000000000000000000000..7d0df9f9294c7bdfa692483a5d9d1fa283b5a939 --- /dev/null +++ b/bash-5.1/lib/sh/pathcanon.c @@ -0,0 +1,234 @@ +/* pathcanon.c -- canonicalize and manipulate pathnames. */ + +/* Copyright (C) 2000 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include +#include +#include + +#include "shell.h" + +#if !defined (errno) +extern int errno; +#endif + +#if defined (__CYGWIN__) +#include + +static int +_is_cygdrive (path) + char *path; +{ + static char user[MAXPATHLEN]; + static char system[MAXPATHLEN]; + static int first_time = 1; + + /* If the path is the first part of a network path, treat it as + existing. */ + if (path[0] == '/' && path[1] == '/' && !strchr (path + 2, '/')) + return 1; + /* Otherwise check for /cygdrive prefix. */ + if (first_time) + { + char user_flags[MAXPATHLEN]; + char system_flags[MAXPATHLEN]; + /* Get the cygdrive info */ + cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags, system_flags); + first_time = 0; + } + return !strcasecmp (path, user) || !strcasecmp (path, system); +} +#endif /* __CYGWIN__ */ + +/* Return 1 if PATH corresponds to a directory. A function for debugging. */ +static int +_path_isdir (path) + char *path; +{ + int l; + struct stat sb; + + /* This should leave errno set to the correct value. */ + errno = 0; + l = stat (path, &sb) == 0 && S_ISDIR (sb.st_mode); +#if defined (__CYGWIN__) + if (l == 0) + l = _is_cygdrive (path); +#endif + return l; +} + +/* Canonicalize PATH, and return a new path. The new path differs from PATH + in that: + Multiple `/'s are collapsed to a single `/'. + Leading `./'s and trailing `/.'s are removed. + Trailing `/'s are removed. + Non-leading `../'s and trailing `..'s are handled by removing + portions of the path. */ + +/* Look for ROOTEDPATH, PATHSEP, DIRSEP, and ISDIRSEP in ../../general.h */ + +#define DOUBLE_SLASH(p) ((p[0] == '/') && (p[1] == '/') && p[2] != '/') + +char * +sh_canonpath (path, flags) + char *path; + int flags; +{ + char stub_char; + char *result, *p, *q, *base, *dotdot; + int rooted, double_slash_path; + + /* The result cannot be larger than the input PATH. */ + result = (flags & PATH_NOALLOC) ? path : savestring (path); + + /* POSIX.2 says to leave a leading `//' alone. On cygwin, we skip over any + leading `x:' (dos drive name). */ + if (rooted = ROOTEDPATH(path)) + { + stub_char = DIRSEP; +#if defined (__CYGWIN__) + base = (ISALPHA((unsigned char)result[0]) && result[1] == ':') ? result + 3 : result + 1; +#else + base = result + 1; +#endif + double_slash_path = DOUBLE_SLASH (path); + base += double_slash_path; + } + else + { + stub_char = '.'; +#if defined (__CYGWIN__) + base = (ISALPHA((unsigned char)result[0]) && result[1] == ':') ? result + 2 : result; +#else + base = result; +#endif + double_slash_path = 0; + } + + /* + * invariants: + * base points to the portion of the path we want to modify + * p points at beginning of path element we're considering. + * q points just past the last path element we wrote (no slash). + * dotdot points just past the point where .. cannot backtrack + * any further (no slash). + */ + p = q = dotdot = base; + + while (*p) + { + if (ISDIRSEP(p[0])) /* null element */ + p++; + else if(p[0] == '.' && PATHSEP(p[1])) /* . and ./ */ + p += 1; /* don't count the separator in case it is nul */ + else if (p[0] == '.' && p[1] == '.' && PATHSEP(p[2])) /* .. and ../ */ + { + p += 2; /* skip `..' */ + if (q > dotdot) /* can backtrack */ + { + if (flags & PATH_CHECKDOTDOT) + { + char c; + + /* Make sure what we have so far corresponds to a valid + path before we chop some of it off. */ + c = *q; + *q = '\0'; + if (_path_isdir (result) == 0) + { + if ((flags & PATH_NOALLOC) == 0) + free (result); + return ((char *)NULL); + } + *q = c; + } + + while (--q > dotdot && ISDIRSEP(*q) == 0) + ; + } + else if (rooted == 0) + { + /* /.. is / but ./../ is .. */ + if (q != base) + *q++ = DIRSEP; + *q++ = '.'; + *q++ = '.'; + dotdot = q; + } + } + else /* real path element */ + { + /* add separator if not at start of work portion of result */ + if (q != base) + *q++ = DIRSEP; + while (*p && (ISDIRSEP(*p) == 0)) + *q++ = *p++; + /* Check here for a valid directory with _path_isdir. */ + if (flags & PATH_CHECKEXISTS) + { + char c; + + /* Make sure what we have so far corresponds to a valid + path before we chop some of it off. */ + c = *q; + *q = '\0'; + if (_path_isdir (result) == 0) + { + if ((flags & PATH_NOALLOC) == 0) + free (result); + return ((char *)NULL); + } + *q = c; + } + } + } + + /* Empty string is really ``.'' or `/', depending on what we started with. */ + if (q == result) + *q++ = stub_char; + *q = '\0'; + + /* If the result starts with `//', but the original path does not, we + can turn the // into /. Because of how we set `base', this should never + be true, but it's a sanity check. */ + if (DOUBLE_SLASH(result) && double_slash_path == 0) + { + if (result[2] == '\0') /* short-circuit for bare `//' */ + result[1] = '\0'; + else + memmove (result, result + 1, strlen (result + 1) + 1); + } + + return (result); +} diff --git a/bash-5.1/lib/sh/pathphys.c b/bash-5.1/lib/sh/pathphys.c new file mode 100644 index 0000000000000000000000000000000000000000..95b72f1978ba338dd8f5528a1e5aa2d2f3b2760b --- /dev/null +++ b/bash-5.1/lib/sh/pathphys.c @@ -0,0 +1,296 @@ +/* pathphys.c -- return pathname with all symlinks expanded. */ + +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include +#include +#include + +#include "shell.h" + +#if !defined (MAXSYMLINKS) +# define MAXSYMLINKS 32 +#endif + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +extern char *get_working_directory PARAMS((char *)); + +static int +_path_readlink (path, buf, bufsiz) + char *path; + char *buf; + int bufsiz; +{ +#ifdef HAVE_READLINK + return readlink (path, buf, bufsiz); +#else + errno = EINVAL; + return -1; +#endif +} + +/* Look for ROOTEDPATH, PATHSEP, DIRSEP, and ISDIRSEP in ../../general.h */ + +#define DOUBLE_SLASH(p) ((p[0] == '/') && (p[1] == '/') && p[2] != '/') + +/* + * Return PATH with all symlinks expanded in newly-allocated memory. + * This always gets an absolute pathname. + */ + +char * +sh_physpath (path, flags) + char *path; + int flags; +{ + char tbuf[PATH_MAX+1], linkbuf[PATH_MAX+1]; + char *result, *p, *q, *qsave, *qbase, *workpath; + int double_slash_path, linklen, nlink; + + linklen = strlen (path); + +#if 0 + /* First sanity check -- punt immediately if the name is too long. */ + if (linklen >= PATH_MAX) + return (savestring (path)); +#endif + + nlink = 0; + q = result = (char *)xmalloc (PATH_MAX + 1); + + /* Even if we get something longer than PATH_MAX, we might be able to + shorten it, so we try. */ + if (linklen >= PATH_MAX) + workpath = savestring (path); + else + { + workpath = (char *)xmalloc (PATH_MAX + 1); + strcpy (workpath, path); + } + + /* This always gets an absolute pathname. */ + + /* POSIX.2 says to leave a leading `//' alone. On cygwin, we skip over any + leading `x:' (dos drive name). */ +#if defined (__CYGWIN__) + qbase = (ISALPHA((unsigned char)workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1; +#else + qbase = workpath + 1; +#endif + double_slash_path = DOUBLE_SLASH (workpath); + qbase += double_slash_path; + + for (p = workpath; p < qbase; ) + *q++ = *p++; + qbase = q; + + /* + * invariants: + * qbase points to the portion of the result path we want to modify + * p points at beginning of path element we're considering. + * q points just past the last path element we wrote (no slash). + * + * XXX -- need to fix error checking for too-long pathnames + */ + + while (*p) + { + if (ISDIRSEP(p[0])) /* null element */ + p++; + else if(p[0] == '.' && PATHSEP(p[1])) /* . and ./ */ + p += 1; /* don't count the separator in case it is nul */ + else if (p[0] == '.' && p[1] == '.' && PATHSEP(p[2])) /* .. and ../ */ + { + p += 2; /* skip `..' */ + if (q > qbase) + { + while (--q > qbase && ISDIRSEP(*q) == 0) + ; + } + } + else /* real path element */ + { + /* add separator if not at start of work portion of result */ + qsave = q; + if (q != qbase) + *q++ = DIRSEP; + while (*p && (ISDIRSEP(*p) == 0)) + { + if (q - result >= PATH_MAX) + { +#ifdef ENAMETOOLONG + errno = ENAMETOOLONG; +#else + errno = EINVAL; +#endif + goto error; + } + + *q++ = *p++; + } + + *q = '\0'; + + linklen = _path_readlink (result, linkbuf, PATH_MAX); + if (linklen < 0) /* if errno == EINVAL, it's not a symlink */ + { + if (errno != EINVAL) + goto error; + continue; + } + + /* It's a symlink, and the value is in LINKBUF. */ + nlink++; + if (nlink > MAXSYMLINKS) + { +#ifdef ELOOP + errno = ELOOP; +#else + errno = EINVAL; +#endif +error: + free (result); + free (workpath); + return ((char *)NULL); + } + + linkbuf[linklen] = '\0'; + + /* If the new path length would overrun PATH_MAX, punt now. */ + if ((strlen (p) + linklen + 2) >= PATH_MAX) + { +#ifdef ENAMETOOLONG + errno = ENAMETOOLONG; +#else + errno = EINVAL; +#endif + goto error; + } + + /* Form the new pathname by copying the link value to a temporary + buffer and appending the rest of `workpath'. Reset p to point + to the start of the rest of the path. If the link value is an + absolute pathname, reset p, q, and qbase. If not, reset p + and q. */ + strcpy (tbuf, linkbuf); + tbuf[linklen] = '/'; + strcpy (tbuf + linklen, p); + strcpy (workpath, tbuf); + + if (ABSPATH(linkbuf)) + { + q = result; + /* Duplicating some code here... */ +#if defined (__CYGWIN__) + qbase = (ISALPHA((unsigned char)workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1; +#else + qbase = workpath + 1; +#endif + double_slash_path = DOUBLE_SLASH (workpath); + qbase += double_slash_path; + + for (p = workpath; p < qbase; ) + *q++ = *p++; + qbase = q; + } + else + { + p = workpath; + q = qsave; + } + } + } + + *q = '\0'; + free (workpath); + + /* If the result starts with `//', but the original path does not, we + can turn the // into /. Because of how we set `qbase', this should never + be true, but it's a sanity check. */ + if (DOUBLE_SLASH(result) && double_slash_path == 0) + { + if (result[2] == '\0') /* short-circuit for bare `//' */ + result[1] = '\0'; + else + memmove (result, result + 1, strlen (result + 1) + 1); + } + + return (result); +} + +char * +sh_realpath (pathname, resolved) + const char *pathname; + char *resolved; +{ + char *tdir, *wd; + + if (pathname == 0 || *pathname == '\0') + { + errno = (pathname == 0) ? EINVAL : ENOENT; + return ((char *)NULL); + } + + if (ABSPATH (pathname) == 0) + { + wd = get_working_directory ("sh_realpath"); + if (wd == 0) + return ((char *)NULL); + tdir = sh_makepath (wd, (char *)pathname, 0); + free (wd); + } + else + tdir = savestring (pathname); + + wd = sh_physpath (tdir, 0); + free (tdir); + + if (resolved == 0) + return (wd); + + if (wd) + { + strncpy (resolved, wd, PATH_MAX - 1); + resolved[PATH_MAX - 1] = '\0'; + free (wd); + return resolved; + } + else + { + resolved[0] = '\0'; + return wd; + } +} diff --git a/bash-5.1/lib/sh/random.c b/bash-5.1/lib/sh/random.c new file mode 100644 index 0000000000000000000000000000000000000000..1eaa71aac70b24e720db70bc5766f8c063ecb464 --- /dev/null +++ b/bash-5.1/lib/sh/random.c @@ -0,0 +1,240 @@ +/* random.c -- Functions for managing 16-bit and 32-bit random numbers. */ + +/* Copyright (C) 2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (HAVE_SYS_RANDOM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "filecntl.h" + +#include +#include "bashansi.h" + +#include "shell.h" + +extern time_t shell_start_time; + +extern int last_random_value; + +static u_bits32_t intrand32 PARAMS((u_bits32_t)); +static u_bits32_t genseed PARAMS((void)); + +static u_bits32_t brand32 PARAMS((void)); +static void sbrand32 PARAMS((u_bits32_t)); +static void perturb_rand32 PARAMS((void)); + +/* The random number seed. You can change this by setting RANDOM. */ +static u_bits32_t rseed = 1; + +/* Returns a 32-bit pseudo-random number. */ +static u_bits32_t +intrand32 (last) + u_bits32_t last; +{ + /* Minimal Standard generator from + "Random number generators: good ones are hard to find", + Park and Miller, Communications of the ACM, vol. 31, no. 10, + October 1988, p. 1195. Filtered through FreeBSD. + + x(n+1) = 16807 * x(n) mod (m). + + We split up the calculations to avoid overflow. + + h = last / q; l = x - h * q; t = a * l - h * r + m = 2147483647, a = 16807, q = 127773, r = 2836 + + There are lots of other combinations of constants to use; look at + https://www.gnu.org/software/gsl/manual/html_node/Other-random-number-generators.html#Other-random-number-generators */ + + bits32_t h, l, t; + u_bits32_t ret; + + /* Can't seed with 0. */ + ret = (last == 0) ? 123459876 : last; + h = ret / 127773; + l = ret - (127773 * h); + t = 16807 * l - 2836 * h; + ret = (t < 0) ? t + 0x7fffffff : t; + + return (ret); +} + +static u_bits32_t +genseed () +{ + struct timeval tv; + u_bits32_t iv; + + gettimeofday (&tv, NULL); + iv = (u_bits32_t)seedrand; /* let the compiler truncate */ + iv = tv.tv_sec ^ tv.tv_usec ^ getpid () ^ getppid () ^ current_user.uid ^ iv; + return (iv); +} + +#define BASH_RAND_MAX 32767 /* 0x7fff - 16 bits */ + +/* Returns a pseudo-random number between 0 and 32767. */ +int +brand () +{ + unsigned int ret; + + rseed = intrand32 (rseed); + if (shell_compatibility_level > 50) + ret = (rseed >> 16) ^ (rseed & 65535); + else + ret = rseed; + return (ret & BASH_RAND_MAX); +} + +/* Set the random number generator seed to SEED. */ +void +sbrand (seed) + unsigned long seed; +{ + rseed = seed; + last_random_value = 0; +} + +void +seedrand () +{ + u_bits32_t iv; + + iv = genseed (); + sbrand (iv); +} + +static u_bits32_t rseed32 = 1073741823; +static int last_rand32; + +static int urandfd = -1; + +#define BASH_RAND32_MAX 0x7fffffff /* 32 bits */ + +/* Returns a 32-bit pseudo-random number between 0 and 4294967295. */ +static u_bits32_t +brand32 () +{ + u_bits32_t ret; + + rseed32 = intrand32 (rseed32); + return (rseed32 & BASH_RAND32_MAX); +} + +static void +sbrand32 (seed) + u_bits32_t seed; +{ + last_rand32 = rseed32 = seed; +} + +void +seedrand32 () +{ + u_bits32_t iv; + + iv = genseed (); + sbrand32 (iv); +} + +static void +perturb_rand32 () +{ + rseed32 ^= genseed (); +} + +/* Force another attempt to open /dev/urandom on the next call to get_urandom32 */ +void +urandom_close () +{ + if (urandfd >= 0) + close (urandfd); + urandfd = -1; +} + +#if !defined (HAVE_GETRANDOM) +/* Imperfect emulation of getrandom(2). */ +#ifndef GRND_NONBLOCK +# define GRND_NONBLOCK 1 +# define GRND_RANDOM 2 +#endif + +static ssize_t +getrandom (buf, len, flags) + void *buf; + size_t len; + unsigned int flags; +{ + int oflags; + ssize_t r; + static int urand_unavail = 0; + +#if HAVE_GETENTROPY + r = getentropy (buf, len); + return (r == 0) ? len : -1; +#endif + + if (urandfd == -1 && urand_unavail == 0) + { + oflags = O_RDONLY; + if (flags & GRND_NONBLOCK) + oflags |= O_NONBLOCK; + urandfd = open ("/dev/urandom", oflags, 0); + if (urandfd >= 0) + SET_CLOSE_ON_EXEC (urandfd); + else + { + urand_unavail = 1; + return -1; + } + } + if (urandfd >= 0 && (r = read (urandfd, buf, len)) == len) + return (r); + return -1; +} +#endif + +u_bits32_t +get_urandom32 () +{ + u_bits32_t ret; + + if (getrandom ((void *)&ret, sizeof (ret), GRND_NONBLOCK) == sizeof (ret)) + return (last_rand32 = ret); + +#if defined (HAVE_ARC4RANDOM) + ret = arc4random (); +#else + if (subshell_environment) + perturb_rand32 (); + do + ret = brand32 (); + while (ret == last_rand32); +#endif + return (last_rand32 = ret); +} diff --git a/bash-5.1/lib/sh/rename.c b/bash-5.1/lib/sh/rename.c new file mode 100644 index 0000000000000000000000000000000000000000..e410b5e8d64b3b09925ba71f3437e21b1b9885ad --- /dev/null +++ b/bash-5.1/lib/sh/rename.c @@ -0,0 +1,76 @@ +/* + * rename - rename a file + */ + +/* Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_RENAME) + +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include + +#include + +#ifndef errno +extern int errno; +#endif + +int +rename (from, to) + const char *from, *to; +{ + struct stat fb, tb; + + if (stat (from, &fb) < 0) + return -1; + + if (stat (to, &tb) < 0) + { + if (errno != ENOENT) + return -1; + } + else + { + if (fb.st_dev == tb.st_dev && fb.st_ino == tb.st_ino) + return 0; /* same file */ + if (unlink (to) < 0 && errno != ENOENT) + return -1; + } + + if (link (from, to) < 0) + return (-1); + + if (unlink (from) < 0 && errno != ENOENT) + { + int e = errno; + unlink (to); + errno = e; + return (-1); + } + + return (0); +} +#endif /* !HAVE_RENAME */ diff --git a/bash-5.1/lib/sh/setlinebuf.c b/bash-5.1/lib/sh/setlinebuf.c new file mode 100644 index 0000000000000000000000000000000000000000..6473ddfccafaa904d41cb8da59c9bc27f985e046 --- /dev/null +++ b/bash-5.1/lib/sh/setlinebuf.c @@ -0,0 +1,63 @@ +/* setlinebuf.c - line-buffer a stdio stream. */ + +/* Copyright (C) 1997 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#include + +#if defined (USING_BASH_MALLOC) +# define LBUF_BUFSIZE 1008 +#else +# define LBUF_BUFSIZE BUFSIZ +#endif + +/* Cause STREAM to buffer lines as opposed to characters or blocks. */ +int +sh_setlinebuf (stream) + FILE *stream; +{ + char *local_linebuf; + +#if !defined (HAVE_SETLINEBUF) && !defined (HAVE_SETVBUF) + return (0); +#endif + +#if defined (USING_BASH_MALLOC) + local_linebuf = (char *)xmalloc (LBUF_BUFSIZE); +#else + local_linebuf = (char *)NULL; +#endif + +#if defined (HAVE_SETVBUF) + +# if defined (SETVBUF_REVERSED) + return (setvbuf (stream, _IOLBF, local_linebuf, LBUF_BUFSIZE)); +# else /* !SETVBUF_REVERSED */ + return (setvbuf (stream, local_linebuf, _IOLBF, LBUF_BUFSIZE)); +# endif /* !SETVBUF_REVERSED */ +# else /* !HAVE_SETVBUF */ + + setlinebuf (stream); + return (0); + +#endif /* !HAVE_SETVBUF */ +} diff --git a/bash-5.1/lib/sh/shmatch.c b/bash-5.1/lib/sh/shmatch.c new file mode 100644 index 0000000000000000000000000000000000000000..d6e7f904e4567685d32ba7582d735ec707fe341c --- /dev/null +++ b/bash-5.1/lib/sh/shmatch.c @@ -0,0 +1,123 @@ +/* + * shmatch.c -- shell interface to posix regular expression matching. + */ + +/* Copyright (C) 2003-2015 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined (HAVE_POSIX_REGEXP) + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "bashansi.h" + +#include +#include + +#include "shell.h" +#include "variables.h" +#include "externs.h" + +extern int glob_ignore_case, match_ignore_case; + +int +sh_regmatch (string, pattern, flags) + const char *string; + const char *pattern; + int flags; +{ + regex_t regex = { 0 }; + regmatch_t *matches; + int rflags; +#if defined (ARRAY_VARS) + SHELL_VAR *rematch; + ARRAY *amatch; + int subexp_ind; + char *subexp_str; + int subexp_len; +#endif + int result; + +#if defined (ARRAY_VARS) + rematch = (SHELL_VAR *)NULL; +#endif + + rflags = REG_EXTENDED; + if (match_ignore_case) + rflags |= REG_ICASE; +#if !defined (ARRAY_VARS) + rflags |= REG_NOSUB; +#endif + + if (regcomp (®ex, pattern, rflags)) + return 2; /* flag for printing a warning here. */ + +#if defined (ARRAY_VARS) + matches = (regmatch_t *)malloc (sizeof (regmatch_t) * (regex.re_nsub + 1)); +#else + matches = NULL; +#endif + + /* man regexec: NULL PMATCH ignored if NMATCH == 0 */ + if (regexec (®ex, string, matches ? regex.re_nsub + 1 : 0, matches, 0)) + result = EXECUTION_FAILURE; + else + result = EXECUTION_SUCCESS; /* match */ + +#if defined (ARRAY_VARS) + subexp_len = strlen (string) + 10; + subexp_str = malloc (subexp_len + 1); + + /* Store the parenthesized subexpressions in the array BASH_REMATCH. + Element 0 is the portion that matched the entire regexp. Element 1 + is the part that matched the first subexpression, and so on. */ + unbind_variable_noref ("BASH_REMATCH"); + rematch = make_new_array_variable ("BASH_REMATCH"); + amatch = array_cell (rematch); + + if (matches && (flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str) + { + for (subexp_ind = 0; subexp_ind <= regex.re_nsub; subexp_ind++) + { + memset (subexp_str, 0, subexp_len); + strncpy (subexp_str, string + matches[subexp_ind].rm_so, + matches[subexp_ind].rm_eo - matches[subexp_ind].rm_so); + array_insert (amatch, subexp_ind, subexp_str); + } + } + +#if 0 + VSETATTR (rematch, att_readonly); +#endif + + free (subexp_str); + free (matches); +#endif /* ARRAY_VARS */ + + regfree (®ex); + + return result; +} + +#endif /* HAVE_POSIX_REGEXP */ diff --git a/bash-5.1/lib/sh/shmbchar.c b/bash-5.1/lib/sh/shmbchar.c new file mode 100644 index 0000000000000000000000000000000000000000..f2f2582b442d5ca45b49933d3e4a9dfba3ff6df5 --- /dev/null +++ b/bash-5.1/lib/sh/shmbchar.c @@ -0,0 +1,137 @@ +/* Copyright (C) 2001, 2006, 2009, 2010, 2012, 2015-2018 Free Software Foundation, Inc. + + 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 . */ + + +#include + +#if defined (HANDLE_MULTIBYTE) +#include +#include + +#include + +#include +#include + +#ifndef errno +extern int errno; +#endif + +#if IS_BASIC_ASCII + +/* Bit table of characters in the ISO C "basic character set". */ +const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = +{ + 0x00001a00, /* '\t' '\v' '\f' */ + 0xffffffef, /* ' '...'#' '%'...'?' */ + 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ + 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ + /* The remaining bits are 0. */ +}; + +#endif /* IS_BASIC_ASCII */ + +extern int locale_utf8locale; + +extern char *utf8_mbsmbchar (const char *); +extern int utf8_mblen (const char *, size_t); + +/* Count the number of characters in S, counting multi-byte characters as a + single character. */ +size_t +mbstrlen (s) + const char *s; +{ + size_t clen, nc; + mbstate_t mbs = { 0 }, mbsbak = { 0 }; + int f, mb_cur_max; + + nc = 0; + mb_cur_max = MB_CUR_MAX; + while (*s && (clen = (f = is_basic (*s)) ? 1 : mbrlen(s, mb_cur_max, &mbs)) != 0) + { + if (MB_INVALIDCH(clen)) + { + clen = 1; /* assume single byte */ + mbs = mbsbak; + } + + if (f == 0) + mbsbak = mbs; + + s += clen; + nc++; + } + return nc; +} + +/* Return pointer to first multibyte char in S, or NULL if none. */ +/* XXX - if we know that the locale is UTF-8, we can just check whether or + not any byte has the eighth bit turned on */ +char * +mbsmbchar (s) + const char *s; +{ + char *t; + size_t clen; + mbstate_t mbs = { 0 }; + int mb_cur_max; + + if (locale_utf8locale) + return (utf8_mbsmbchar (s)); /* XXX */ + + mb_cur_max = MB_CUR_MAX; + for (t = (char *)s; *t; t++) + { + if (is_basic (*t)) + continue; + + if (locale_utf8locale) /* not used if above code active */ + clen = utf8_mblen (t, mb_cur_max); + else + clen = mbrlen (t, mb_cur_max, &mbs); + + if (clen == 0) + return 0; + if (MB_INVALIDCH(clen)) + continue; + + if (clen > 1) + return t; + } + return 0; +} + +int +sh_mbsnlen(src, srclen, maxlen) + const char *src; + size_t srclen; + int maxlen; +{ + int count; + int sind; + DECLARE_MBSTATE; + + for (sind = count = 0; src[sind]; ) + { + count++; /* number of multibyte characters */ + ADVANCE_CHAR (src, srclen, sind); + if (sind > maxlen) + break; + } + + return count; +} +#endif diff --git a/bash-5.1/lib/sh/shquote.c b/bash-5.1/lib/sh/shquote.c new file mode 100644 index 0000000000000000000000000000000000000000..680f84ed87e80502a69591bd85b88784bd6ef584 --- /dev/null +++ b/bash-5.1/lib/sh/shquote.c @@ -0,0 +1,431 @@ +/* shquote - functions to quote and dequote strings */ + +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include + +#include "syntax.h" +#include + +#include "shmbchar.h" +#include "shmbutil.h" + +extern char *ansic_quote PARAMS((char *, int, int *)); +extern int ansic_shouldquote PARAMS((const char *)); + +/* Default set of characters that should be backslash-quoted in strings */ +static const char bstab[256] = + { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 0, 0, 0, 0, /* TAB, NL */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 1, 1, 1, 0, 1, 0, 1, 1, /* SPACE, !, DQUOTE, DOL, AMP, SQUOTE */ + 1, 1, 1, 0, 1, 0, 0, 0, /* LPAR, RPAR, STAR, COMMA */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 1, 1, /* SEMI, LESSTHAN, GREATERTHAN, QUEST */ + + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, /* LBRACK, BS, RBRACK, CARAT */ + + 1, 0, 0, 0, 0, 0, 0, 0, /* BACKQ */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, /* LBRACE, BAR, RBRACE */ + + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }; + +/* **************************************************************** */ +/* */ +/* Functions for quoting strings to be re-read as input */ +/* */ +/* **************************************************************** */ + +/* Return a new string which is the single-quoted version of STRING. + Used by alias and trap, among others. */ +char * +sh_single_quote (string) + const char *string; +{ + register int c; + char *result, *r; + const char *s; + + result = (char *)xmalloc (3 + (4 * strlen (string))); + r = result; + + if (string[0] == '\'' && string[1] == 0) + { + *r++ = '\\'; + *r++ = '\''; + *r++ = 0; + return result; + } + + *r++ = '\''; + + for (s = string; s && (c = *s); s++) + { + *r++ = c; + + if (c == '\'') + { + *r++ = '\\'; /* insert escaped single quote */ + *r++ = '\''; + *r++ = '\''; /* start new quoted string */ + } + } + + *r++ = '\''; + *r = '\0'; + + return (result); +} + +/* Quote STRING using double quotes. Return a new string. */ +char * +sh_double_quote (string) + const char *string; +{ + register unsigned char c; + int mb_cur_max; + char *result, *r; + size_t slen; + const char *s, *send; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + mb_cur_max = MB_CUR_MAX; + + result = (char *)xmalloc (3 + (2 * strlen (string))); + r = result; + *r++ = '"'; + + for (s = string; s && (c = *s); s++) + { + /* Backslash-newline disappears within double quotes, so don't add one. */ + if ((sh_syntaxtab[c] & CBSDQUOTE) && c != '\n') + *r++ = '\\'; + +#if defined (HANDLE_MULTIBYTE) + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (c) == 0)) + { + COPY_CHAR_P (r, s, send); + s--; /* compensate for auto-increment in loop above */ + continue; + } +#endif + + /* Assume that the string will not be further expanded, so no need to + add CTLESC to protect CTLESC or CTLNUL. */ + *r++ = c; + } + + *r++ = '"'; + *r = '\0'; + + return (result); +} + +/* Turn S into a simple double-quoted string. If FLAGS is non-zero, quote + double quote characters in S with backslashes. */ +char * +sh_mkdoublequoted (s, slen, flags) + const char *s; + int slen, flags; +{ + char *r, *ret; + const char *send; + int rlen, mb_cur_max; + DECLARE_MBSTATE; + + send = s + slen; + mb_cur_max = flags ? MB_CUR_MAX : 1; + rlen = (flags == 0) ? slen + 3 : (2 * slen) + 1; + ret = r = (char *)xmalloc (rlen); + + *r++ = '"'; + while (*s) + { + if (flags && *s == '"') + *r++ = '\\'; + +#if defined (HANDLE_MULTIBYTE) + if (flags && ((locale_utf8locale && (*s & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (*s) == 0))) + { + COPY_CHAR_P (r, s, send); + continue; + } +#endif + *r++ = *s++; + } + *r++ = '"'; + *r = '\0'; + + return ret; +} + +/* Remove backslashes that are quoting characters that are special between + double quotes. Return a new string. XXX - should this handle CTLESC + and CTLNUL? */ +char * +sh_un_double_quote (string) + char *string; +{ + register int c, pass_next; + char *result, *r, *s; + + r = result = (char *)xmalloc (strlen (string) + 1); + + for (pass_next = 0, s = string; s && (c = *s); s++) + { + if (pass_next) + { + *r++ = c; + pass_next = 0; + continue; + } + if (c == '\\' && (sh_syntaxtab[(unsigned char) s[1]] & CBSDQUOTE)) + { + pass_next = 1; + continue; + } + *r++ = c; + } + + *r = '\0'; + return result; +} + +/* Quote special characters in STRING using backslashes. Return a new + string. NOTE: if the string is to be further expanded, we need a + way to protect the CTLESC and CTLNUL characters. As I write this, + the current callers will never cause the string to be expanded without + going through the shell parser, which will protect the internal + quoting characters. TABLE, if set, points to a map of the ascii code + set with char needing to be backslash-quoted if table[char]==1. FLAGS, + if 1, causes tildes to be quoted as well. If FLAGS&2, backslash-quote + other shell blank characters. */ + +char * +sh_backslash_quote (string, table, flags) + char *string; + char *table; + int flags; +{ + int c, mb_cur_max; + size_t slen; + char *result, *r, *s, *backslash_table, *send; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + result = (char *)xmalloc (2 * slen + 1); + + backslash_table = table ? table : (char *)bstab; + mb_cur_max = MB_CUR_MAX; + + for (r = result, s = string; s && (c = *s); s++) + { +#if defined (HANDLE_MULTIBYTE) + /* XXX - isascii, even if is_basic(c) == 0 - works in most cases. */ + if (c >= 0 && c <= 127 && backslash_table[(unsigned char)c] == 1) + { + *r++ = '\\'; + *r++ = c; + continue; + } + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (c) == 0)) + { + COPY_CHAR_P (r, s, send); + s--; /* compensate for auto-increment in loop above */ + continue; + } +#endif + if (backslash_table[(unsigned char)c] == 1) + *r++ = '\\'; + else if (c == '#' && s == string) /* comment char */ + *r++ = '\\'; + else if ((flags&1) && c == '~' && (s == string || s[-1] == ':' || s[-1] == '=')) + /* Tildes are special at the start of a word or after a `:' or `=' + (technically unquoted, but it doesn't make a difference in practice) */ + *r++ = '\\'; + else if ((flags&2) && shellblank((unsigned char)c)) + *r++ = '\\'; + *r++ = c; + } + + *r = '\0'; + return (result); +} + +#if defined (PROMPT_STRING_DECODE) +/* Quote characters that get special treatment when in double quotes in STRING + using backslashes. Return a new string. */ +char * +sh_backslash_quote_for_double_quotes (string) + char *string; +{ + unsigned char c; + char *result, *r, *s, *send; + size_t slen; + int mb_cur_max; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + mb_cur_max = MB_CUR_MAX; + result = (char *)xmalloc (2 * slen + 1); + + for (r = result, s = string; s && (c = *s); s++) + { + /* Backslash-newline disappears within double quotes, so don't add one. */ + if ((sh_syntaxtab[c] & CBSDQUOTE) && c != '\n') + *r++ = '\\'; + /* I should probably use the CSPECL flag for these in sh_syntaxtab[] */ + else if (c == CTLESC || c == CTLNUL) + *r++ = CTLESC; /* could be '\\'? */ + +#if defined (HANDLE_MULTIBYTE) + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (c) == 0)) + { + COPY_CHAR_P (r, s, send); + s--; /* compensate for auto-increment in loop above */ + continue; + } +#endif + + *r++ = c; + } + + *r = '\0'; + return (result); +} +#endif /* PROMPT_STRING_DECODE */ + +char * +sh_quote_reusable (s, flags) + char *s; + int flags; +{ + char *ret; + + if (s == 0) + return s; + else if (*s == 0) + { + ret = (char *)xmalloc (3); + ret[0] = ret[1] = '\''; + ret[2] = '\0'; + } + else if (ansic_shouldquote (s)) + ret = ansic_quote (s, 0, (int *)0); + else if (flags) + ret = sh_backslash_quote (s, 0, 1); + else + ret = sh_single_quote (s); + + return ret; +} + +int +sh_contains_shell_metas (string) + const char *string; +{ + const char *s; + + for (s = string; s && *s; s++) + { + switch (*s) + { + case ' ': case '\t': case '\n': /* IFS white space */ + case '\'': case '"': case '\\': /* quoting chars */ + case '|': case '&': case ';': /* shell metacharacters */ + case '(': case ')': case '<': case '>': + case '!': case '{': case '}': /* reserved words */ + case '*': case '[': case '?': case ']': /* globbing chars */ + case '^': + case '$': case '`': /* expansion chars */ + return (1); + case '~': /* tilde expansion */ + if (s == string || s[-1] == '=' || s[-1] == ':') + return (1); + break; + case '#': + if (s == string) /* comment char */ + return (1); + /* FALLTHROUGH */ + default: + break; + } + } + + return (0); +} + +int +sh_contains_quotes (string) + const char *string; +{ + const char *s; + + for (s = string; s && *s; s++) + { + if (*s == '\'' || *s == '"' || *s == '\\') + return 1; + } + return 0; +} diff --git a/bash-5.1/lib/sh/shtty.c b/bash-5.1/lib/sh/shtty.c new file mode 100644 index 0000000000000000000000000000000000000000..0433f5e2774bfeac092633d77ebb22a1d0b0365a --- /dev/null +++ b/bash-5.1/lib/sh/shtty.c @@ -0,0 +1,330 @@ +/* + * shtty.c -- abstract interface to the terminal, focusing on capabilities. + */ + +/* Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include + +static TTYSTRUCT ttin, ttout; +static int ttsaved = 0; + +int +ttgetattr(fd, ttp) +int fd; +TTYSTRUCT *ttp; +{ +#ifdef TERMIOS_TTY_DRIVER + return tcgetattr(fd, ttp); +#else +# ifdef TERMIO_TTY_DRIVER + return ioctl(fd, TCGETA, ttp); +# else + return ioctl(fd, TIOCGETP, ttp); +# endif +#endif +} + +int +ttsetattr(fd, ttp) +int fd; +TTYSTRUCT *ttp; +{ +#ifdef TERMIOS_TTY_DRIVER + return tcsetattr(fd, TCSADRAIN, ttp); +#else +# ifdef TERMIO_TTY_DRIVER + return ioctl(fd, TCSETAW, ttp); +# else + return ioctl(fd, TIOCSETN, ttp); +# endif +#endif +} + +void +ttsave() +{ + if (ttsaved) + return; + ttgetattr (0, &ttin); + ttgetattr (1, &ttout); + ttsaved = 1; +} + +void +ttrestore() +{ + if (ttsaved == 0) + return; + ttsetattr (0, &ttin); + ttsetattr (1, &ttout); + ttsaved = 0; +} + +/* Retrieve the internally-saved attributes associated with tty fd FD. */ +TTYSTRUCT * +ttattr (fd) + int fd; +{ + if (ttsaved == 0) + return ((TTYSTRUCT *)0); + if (fd == 0) + return &ttin; + else if (fd == 1) + return &ttout; + else + return ((TTYSTRUCT *)0); +} + +/* + * Change attributes in ttp so that when it is installed using + * ttsetattr, the terminal will be in one-char-at-a-time mode. + */ +int +tt_setonechar(ttp) + TTYSTRUCT *ttp; +{ +#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER) + + /* XXX - might not want this -- it disables erase and kill processing. */ + ttp->c_lflag &= ~ICANON; + + ttp->c_lflag |= ISIG; +# ifdef IEXTEN + ttp->c_lflag |= IEXTEN; +# endif + + ttp->c_iflag |= ICRNL; /* make sure we get CR->NL on input */ + ttp->c_iflag &= ~INLCR; /* but no NL->CR */ + +# ifdef OPOST + ttp->c_oflag |= OPOST; +# endif +# ifdef ONLCR + ttp->c_oflag |= ONLCR; +# endif +# ifdef OCRNL + ttp->c_oflag &= ~OCRNL; +# endif +# ifdef ONOCR + ttp->c_oflag &= ~ONOCR; +# endif +# ifdef ONLRET + ttp->c_oflag &= ~ONLRET; +# endif + + ttp->c_cc[VMIN] = 1; + ttp->c_cc[VTIME] = 0; + +#else + + ttp->sg_flags |= CBREAK; + +#endif + + return 0; +} + +/* Set the tty associated with FD and TTP into one-character-at-a-time mode */ +int +ttfd_onechar (fd, ttp) + int fd; + TTYSTRUCT *ttp; +{ + if (tt_setonechar(ttp) < 0) + return -1; + return (ttsetattr (fd, ttp)); +} + +/* Set the terminal into one-character-at-a-time mode */ +int +ttonechar () +{ + TTYSTRUCT tt; + + if (ttsaved == 0) + return -1; + tt = ttin; + return (ttfd_onechar (0, &tt)); +} + +/* + * Change attributes in ttp so that when it is installed using + * ttsetattr, the terminal will be in no-echo mode. + */ +int +tt_setnoecho(ttp) + TTYSTRUCT *ttp; +{ +#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER) + ttp->c_lflag &= ~(ECHO|ECHOK|ECHONL); +#else + ttp->sg_flags &= ~ECHO; +#endif + + return 0; +} + +/* Set the tty associated with FD and TTP into no-echo mode */ +int +ttfd_noecho (fd, ttp) + int fd; + TTYSTRUCT *ttp; +{ + if (tt_setnoecho (ttp) < 0) + return -1; + return (ttsetattr (fd, ttp)); +} + +/* Set the terminal into no-echo mode */ +int +ttnoecho () +{ + TTYSTRUCT tt; + + if (ttsaved == 0) + return -1; + tt = ttin; + return (ttfd_noecho (0, &tt)); +} + +/* + * Change attributes in ttp so that when it is installed using + * ttsetattr, the terminal will be in eight-bit mode (pass8). + */ +int +tt_seteightbit (ttp) + TTYSTRUCT *ttp; +{ +#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER) + ttp->c_iflag &= ~ISTRIP; + ttp->c_cflag |= CS8; + ttp->c_cflag &= ~PARENB; +#else + ttp->sg_flags |= ANYP; +#endif + + return 0; +} + +/* Set the tty associated with FD and TTP into eight-bit mode */ +int +ttfd_eightbit (fd, ttp) + int fd; + TTYSTRUCT *ttp; +{ + if (tt_seteightbit (ttp) < 0) + return -1; + return (ttsetattr (fd, ttp)); +} + +/* Set the terminal into eight-bit mode */ +int +tteightbit () +{ + TTYSTRUCT tt; + + if (ttsaved == 0) + return -1; + tt = ttin; + return (ttfd_eightbit (0, &tt)); +} + +/* + * Change attributes in ttp so that when it is installed using + * ttsetattr, the terminal will be in non-canonical input mode. + */ +int +tt_setnocanon (ttp) + TTYSTRUCT *ttp; +{ +#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER) + ttp->c_lflag &= ~ICANON; +#endif + + return 0; +} + +/* Set the tty associated with FD and TTP into non-canonical mode */ +int +ttfd_nocanon (fd, ttp) + int fd; + TTYSTRUCT *ttp; +{ + if (tt_setnocanon (ttp) < 0) + return -1; + return (ttsetattr (fd, ttp)); +} + +/* Set the terminal into non-canonical mode */ +int +ttnocanon () +{ + TTYSTRUCT tt; + + if (ttsaved == 0) + return -1; + tt = ttin; + return (ttfd_nocanon (0, &tt)); +} + +/* + * Change attributes in ttp so that when it is installed using + * ttsetattr, the terminal will be in cbreak, no-echo mode. + */ +int +tt_setcbreak(ttp) + TTYSTRUCT *ttp; +{ + if (tt_setonechar (ttp) < 0) + return -1; + return (tt_setnoecho (ttp)); +} + +/* Set the tty associated with FD and TTP into cbreak (no-echo, + one-character-at-a-time) mode */ +int +ttfd_cbreak (fd, ttp) + int fd; + TTYSTRUCT *ttp; +{ + if (tt_setcbreak (ttp) < 0) + return -1; + return (ttsetattr (fd, ttp)); +} + +/* Set the terminal into cbreak (no-echo, one-character-at-a-time) mode */ +int +ttcbreak () +{ + TTYSTRUCT tt; + + if (ttsaved == 0) + return -1; + tt = ttin; + return (ttfd_cbreak (0, &tt)); +} diff --git a/bash-5.1/lib/sh/snprintf.c b/bash-5.1/lib/sh/snprintf.c new file mode 100644 index 0000000000000000000000000000000000000000..406a3a507078bbe1c37015f05665d3ac63409e33 --- /dev/null +++ b/bash-5.1/lib/sh/snprintf.c @@ -0,0 +1,2221 @@ +/* snprintf - formatted output to strings, with bounds checking and allocation */ + +/* + build a test version with + gcc -g -DDRIVER -I../.. -I../../include -o test-snprintf snprintf.c fmtu*long.o +*/ + +/* + Unix snprintf implementation. + derived from inetutils/libinetutils/snprintf.c Version 1.1 + + Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . + + Original (pre-bash) Revision History: + + 1.1: + * added changes from Miles Bader + * corrected a bug with %f + * added support for %#g + * added more comments :-) + 1.0: + * supporting must ANSI syntaxic_sugars + 0.0: + * support %s %c %d + + THANKS(for the patches and ideas): + Miles Bader + Cyrille Rustom + Jacek Slabocewiz + Mike Parker(mouse) + +*/ + +/* + * Currently doesn't handle (and bash/readline doesn't use): + * * *M$ width, precision specifications + * * %N$ numbered argument conversions + * * support for `F' is imperfect with ldfallback(), since underlying + * printf may not handle it -- should ideally have another autoconf test + */ + +#define FLOATING_POINT + +#ifdef HAVE_CONFIG_H +# include +#endif + +/* GCC 4.2 on Snow Leopard doesn't like the snprintf prototype */ +#if defined(DEBUG) && !defined (MACOSX) +# undef HAVE_SNPRINTF +# undef HAVE_ASPRINTF + +# define HAVE_SNPRINTF 0 +# define HAVE_ASPRINTF 0 +#endif + +#if defined(DRIVER) && !defined(HAVE_CONFIG_H) +#define HAVE_LONG_LONG +#define HAVE_LONG_DOUBLE +#ifdef __linux__ +#define HAVE_PRINTF_A_FORMAT +#endif +#define HAVE_ISINF_IN_LIBC +#define HAVE_ISNAN_IN_LIBC +#define PREFER_STDARG +#define HAVE_STRINGIZE +#define HAVE_LIMITS_H +#define HAVE_STDDEF_H +#define HAVE_LOCALE_H +#define intmax_t long +#endif + +#if !HAVE_SNPRINTF || !HAVE_ASPRINTF + +#include + +#if defined(PREFER_STDARG) +# include +#else +# include +#endif + +#ifdef HAVE_LIMITS_H +# include +#endif +#include +#ifdef HAVE_STDDEF_H +# include +#endif +#include + +#ifdef HAVE_STDINT_H +# include +#endif + +#ifdef FLOATING_POINT +# include /* for manifest constants */ +# include /* for sprintf */ +#endif + +#include + +#ifdef HAVE_LOCALE_H +# include +#endif + +#include "stdc.h" +#include + +#ifndef DRIVER +# include "shell.h" +#else +# define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */ +# define FL_ADDBASE 0x02 /* add base# prefix to converted value */ +# define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */ +# define FL_UNSIGNED 0x08 /* don't add any sign */ +extern char *fmtulong PARAMS((unsigned long int, int, char *, size_t, int)); +extern char *fmtullong PARAMS((unsigned long long int, int, char *, size_t, int)); +#endif + +#ifndef FREE +# define FREE(x) if (x) free (x) +#endif + +/* Bound on length of the string representing an integer value of type T. + Subtract one for the sign bit if T is signed; + 302 / 1000 is log10 (2) rounded up; + add one for integer division truncation; + add one more for a minus sign if t is signed. */ +#ifndef INT_STRLEN_BOUND +#define INT_STRLEN_BOUND(t) \ + ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \ + + 1 + TYPE_SIGNED (t)) +#endif + +/* conversion flags */ +#define PF_ALTFORM 0x00001 /* # */ +#define PF_HEXPREFIX 0x00002 /* 0[Xx] */ +#define PF_LADJUST 0x00004 /* - */ +#define PF_ZEROPAD 0x00008 /* 0 */ +#define PF_PLUS 0x00010 /* + */ +#define PF_SPACE 0x00020 /* ' ' */ +#define PF_THOUSANDS 0x00040 /* ' */ + +#define PF_DOT 0x00080 /* `.precision' */ +#define PF_STAR_P 0x00100 /* `*' after precision */ +#define PF_STAR_W 0x00200 /* `*' before or without precision */ + +/* length modifiers */ +#define PF_SIGNEDCHAR 0x00400 /* hh */ +#define PF_SHORTINT 0x00800 /* h */ +#define PF_LONGINT 0x01000 /* l */ +#define PF_LONGLONG 0x02000 /* ll */ +#define PF_LONGDBL 0x04000 /* L */ +#define PF_INTMAX_T 0x08000 /* j */ +#define PF_SIZE_T 0x10000 /* z */ +#define PF_PTRDIFF_T 0x20000 /* t */ + +#define PF_ALLOCBUF 0x40000 /* for asprintf, vasprintf */ + +#define PFM_SN 0x01 /* snprintf, vsnprintf */ +#define PFM_AS 0x02 /* asprintf, vasprintf */ + +#define ASBUFSIZE 128 + +#define x_digs "0123456789abcdef" +#define X_digs "0123456789ABCDEF" + +static char intbuf[INT_STRLEN_BOUND(unsigned long) + 1]; + +static int decpoint; +static int thoussep; +static char *grouping; + +/* + * For the FLOATING POINT FORMAT : + * the challenge was finding a way to + * manipulate the Real numbers without having + * to resort to mathematical function(it + * would require to link with -lm) and not + * going down to the bit pattern(not portable) + * + * so a number, a real is: + + real = integral + fraction + + integral = ... + a(2)*10^2 + a(1)*10^1 + a(0)*10^0 + fraction = b(1)*10^-1 + b(2)*10^-2 + ... + + where: + 0 <= a(i) => 9 + 0 <= b(i) => 9 + + from then it was simple math + */ + +/* + * size of the buffer for the integral part + * and the fraction part + */ +#define MAX_INT 99 + 1 /* 1 for the null */ +#define MAX_FRACT 307 + 1 + +/* + * These functions use static buffers to store the results, + * and so are not reentrant + */ +#define itoa(n) fmtulong(n, 10, intbuf, sizeof(intbuf), 0); +#define dtoa(n, p, f) numtoa(n, 10, p, f) + +#define SWAP_INT(a,b) {int t; t = (a); (a) = (b); (b) = t;} + +#define GETARG(type) (va_arg(args, type)) + +/* Macros that do proper sign extension and handle length modifiers. Used + for the integer conversion specifiers. */ +#define GETSIGNED(p) \ + (((p)->flags & PF_LONGINT) \ + ? GETARG (long) \ + : (((p)->flags & PF_SHORTINT) ? (long)(short)GETARG (int) \ + : (long)GETARG (int))) + +#define GETUNSIGNED(p) \ + (((p)->flags & PF_LONGINT) \ + ? GETARG (unsigned long) \ + : (((p)->flags & PF_SHORTINT) ? (unsigned long)(unsigned short)GETARG (int) \ + : (unsigned long)GETARG (unsigned int))) + + +#ifdef HAVE_LONG_DOUBLE +#define GETLDOUBLE(p) GETARG (long double) +#endif +#define GETDOUBLE(p) GETARG (double) + +#define SET_SIZE_FLAGS(p, type) \ + if (sizeof (type) > sizeof (int)) \ + (p)->flags |= PF_LONGINT; \ + if (sizeof (type) > sizeof (long)) \ + (p)->flags |= PF_LONGLONG; + +/* this struct holds everything we need */ +struct DATA +{ + int length; + char *base; /* needed for [v]asprintf */ + char *holder; + int counter; + const char *pf; + +/* FLAGS */ + int flags; + int justify; + int width, precision; + char pad; +}; + +/* the floating point stuff */ +#ifdef FLOATING_POINT +static double pow_10 PARAMS((int)); +static int log_10 PARAMS((double)); +static double integral PARAMS((double, double *)); +static char *numtoa PARAMS((double, int, int, char **)); +#endif + +static void init_data PARAMS((struct DATA *, char *, size_t, const char *, int)); +static void init_conv_flag PARAMS((struct DATA *)); + +/* for the format */ +#ifdef FLOATING_POINT +static void floating PARAMS((struct DATA *, double)); +static void exponent PARAMS((struct DATA *, double)); +#endif +static void number PARAMS((struct DATA *, unsigned long, int)); +#ifdef HAVE_LONG_LONG +static void lnumber PARAMS((struct DATA *, unsigned long long, int)); +#endif +static void pointer PARAMS((struct DATA *, unsigned long)); +static void strings PARAMS((struct DATA *, char *)); + +#ifdef FLOATING_POINT +# define FALLBACK_FMTSIZE 32 +# define FALLBACK_BASE 4096 +# define LFALLBACK_BASE 5120 +# ifdef HAVE_LONG_DOUBLE +static void ldfallback PARAMS((struct DATA *, const char *, const char *, long double)); +# endif +static void dfallback PARAMS((struct DATA *, const char *, const char *, double)); +#endif + +static char *groupnum PARAMS((char *)); + +#if defined (HAVE_LONG_DOUBLE) +# define LONGDOUBLE long double +#else +# define LONGDOUBLE double +#endif + +#ifndef isnan + static inline int isnan_f (float x) { return x != x; } + static inline int isnan_d (double x) { return x != x; } + static inline int isnan_ld (LONGDOUBLE x) { return x != x; } + # define isnan(x) \ + (sizeof (x) == sizeof (LONGDOUBLE) ? isnan_ld (x) \ + : sizeof (x) == sizeof (double) ? isnan_d (x) \ + : isnan_f (x)) +#endif + +#ifndef isinf + static inline int isinf_f (float x) { return !isnan (x) && isnan (x - x); } + static inline int isinf_d (double x) { return !isnan (x) && isnan (x - x); } + static inline int isinf_ld (LONGDOUBLE x) { return !isnan (x) && isnan (x - x); } + # define isinf(x) \ + (sizeof (x) == sizeof (LONGDOUBLE) ? isinf_ld (x) \ + : sizeof (x) == sizeof (double) ? isinf_d (x) \ + : isinf_f (x)) +#endif + +#ifdef DRIVER +static void memory_error_and_abort (); +static void *xmalloc PARAMS((size_t)); +static void *xrealloc PARAMS((void *, size_t)); +static void xfree PARAMS((void *)); +#else +# include +#endif + +/* those are defines specific to snprintf to hopefully + * make the code clearer :-) + */ +#define RIGHT 1 +#define LEFT 0 +#define NOT_FOUND -1 +#define FOUND 1 +#define MAX_FIELD 15 + +/* round off to the precision */ +#define ROUND(d, p) \ + (d < 0.) ? \ + d - pow_10(-(p)->precision) * 0.5 : \ + d + pow_10(-(p)->precision) * 0.5 + +/* set default precision */ +#define DEF_PREC(p) \ + if ((p)->precision == NOT_FOUND) \ + (p)->precision = 6 + +/* put a char. increment the number of chars written even if we've exceeded + the vsnprintf/snprintf buffer size (for the return value) */ +#define PUT_CHAR(c, p) \ + do \ + { \ + if (((p)->flags & PF_ALLOCBUF) && ((p)->counter >= (p)->length - 1)) \ + { \ + (p)->length += ASBUFSIZE; \ + (p)->base = (char *)xrealloc((p)->base, (p)->length); \ + (p)->holder = (p)->base + (p)->counter; /* in case reallocated */ \ + } \ + if ((p)->counter < (p)->length) \ + *(p)->holder++ = (c); \ + (p)->counter++; \ + } \ + while (0) + +/* Output a string. P->WIDTH has already been adjusted for padding. */ +#define PUT_STRING(string, len, p) \ + do \ + { \ + PAD_RIGHT (p); \ + while ((len)-- > 0) \ + { \ + PUT_CHAR (*(string), (p)); \ + (string)++; \ + } \ + PAD_LEFT (p); \ + } \ + while (0) + +#define PUT_PLUS(d, p, zero) \ + if (((p)->flags & PF_PLUS) && (d) > zero) \ + PUT_CHAR('+', p) + +#define PUT_SPACE(d, p, zero) \ + if (((p)->flags & PF_SPACE) && (d) > zero) \ + PUT_CHAR(' ', p) + +/* pad right */ +#define PAD_RIGHT(p) \ + if ((p)->width > 0 && (p)->justify != LEFT) \ + for (; (p)->width > 0; (p)->width--) \ + PUT_CHAR((p)->pad, p) + +/* pad left */ +#define PAD_LEFT(p) \ + if ((p)->width > 0 && (p)->justify == LEFT) \ + for (; (p)->width > 0; (p)->width--) \ + PUT_CHAR((p)->pad, p) + +/* pad with zeros from decimal precision */ +#define PAD_ZERO(p) \ + if ((p)->precision > 0) \ + for (; (p)->precision > 0; (p)->precision--) \ + PUT_CHAR('0', p) + +/* if width and prec. in the args */ +#define STAR_ARGS(p) \ + do { \ + if ((p)->flags & PF_STAR_W) \ + { \ + (p)->width = GETARG (int); \ + if ((p)->width < 0) \ + { \ + (p)->flags |= PF_LADJUST; \ + (p)->justify = LEFT; \ + (p)->width = -(p)->width; \ + } \ + } \ + if ((p)->flags & PF_STAR_P) \ + { \ + (p)->precision = GETARG (int); \ + if ((p)->precision < 0) \ + { \ + (p)->flags &= ~PF_STAR_P; \ + (p)->precision = NOT_FOUND; \ + } \ + } \ + } while (0) + +#if defined (HAVE_LOCALE_H) && defined (HAVE_LOCALECONV) +# define GETLOCALEDATA(d, t, g) \ + do \ + { \ + struct lconv *lv; \ + if ((d) == 0) { \ + (d) = '.'; (t) = -1; (g) = 0; /* defaults */ \ + lv = localeconv(); \ + if (lv) \ + { \ + if (lv->decimal_point && lv->decimal_point[0]) \ + (d) = lv->decimal_point[0]; \ + if (lv->thousands_sep && lv->thousands_sep[0]) \ + (t) = lv->thousands_sep[0]; \ + (g) = lv->grouping ? lv->grouping : ""; \ + if (*(g) == '\0' || *(g) == CHAR_MAX || (t) == -1) (g) = 0; \ + } \ + } \ + } \ + while (0); +#else +# define GETLOCALEDATA(d, t, g) \ + ( (d) = '.', (t) = ',', g = "\003" ) +#endif + +#ifdef FLOATING_POINT +/* + * Find the nth power of 10 + */ +static double +pow_10(n) + int n; +{ + double P; + + /* handle common cases with fast switch statement. */ + switch (n) + { + case -3: return .001; + case -2: return .01; + case -1: return .1; + case 0: return 1.; + case 1: return 10.; + case 2: return 100.; + case 3: return 1000.; + } + + if (n < 0) + { + P = .0001; + for (n += 4; n < 0; n++) + P /= 10.; + } + else + { + P = 10000.; + for (n -= 4; n > 0; n--) + P *= 10.; + } + + return P; +} + +/* + * Find the integral part of the log in base 10 + * Note: this not a real log10() + I just need and approximation(integerpart) of x in: + 10^x ~= r + * log_10(200) = 2; + * log_10(250) = 2; + * + * NOTE: do not call this with r == 0 -- an infinite loop results. + */ +static int +log_10(r) + double r; +{ + int i = 0; + double result = 1.; + + if (r < 0.) + r = -r; + + if (r < 1.) + { + while (result >= r) + { + result /= 10.; + i++; + } + return (-i); + } + else + { + while (result <= r) + { + result *= 10.; + i++; + } + return (i - 1); + } +} + +/* + * This function return the fraction part of a double + * and set in ip the integral part. + * In many ways it resemble the modf() found on most Un*x + */ +static double +integral(real, ip) + double real; + double *ip; +{ + int j; + double i, s, p; + double real_integral = 0.; + + /* take care of the obvious */ + /* equal to zero ? */ + if (real == 0.) + { + *ip = 0.; + return (0.); + } + + /* negative number ? */ + if (real < 0.) + real = -real; + + /* a fraction ? */ + if ( real < 1.) + { + *ip = 0.; + return real; + } + + /* the real work :-) */ + for (j = log_10(real); j >= 0; j--) + { + p = pow_10(j); + s = (real - real_integral)/p; + i = 0.; + while (i + 1. <= s) + i++; + real_integral += i*p; + } + *ip = real_integral; + return (real - real_integral); +} + +#define PRECISION 1.e-6 +/* + * return an ascii representation of the integral part of the number + * and set fract to be an ascii representation of the fraction part + * the container for the fraction and the integral part or statically + * declare with fix size + */ +static char * +numtoa(number, base, precision, fract) + double number; + int base, precision; + char **fract; +{ + register int i, j; + double ip, fp; /* integer and fraction part */ + double fraction; + int digits, sign; + static char integral_part[MAX_INT]; + static char fraction_part[MAX_FRACT]; + int ch; + + /* taking care of the obvious case: 0.0 */ + if (number == 0.) + { + integral_part[0] = '0'; + integral_part[1] = '\0'; + /* The fractional part has to take the precision into account */ + for (ch = 0; ch < precision-1; ch++) + fraction_part[ch] = '0'; + fraction_part[ch] = '0'; + fraction_part[ch+1] = '\0'; + if (fract) + *fract = fraction_part; + return integral_part; + } + + /* -0 is tricky */ + sign = (number == -0.) ? '-' : ((number < 0.) ? '-' : '+'); + digits = MAX_INT - 1; + + /* for negative numbers */ + if (sign == '-') + { + number = -number; + digits--; /* sign consume one digit */ + } + + fraction = integral(number, &ip); + number = ip; + + /* do the integral part */ + if (ip == 0.) + { + integral_part[0] = '0'; + i = 1; + } + else + { + for ( i = 0; i < digits && number != 0.; ++i) + { + number /= base; + fp = integral(number, &ip); + ch = (int)((fp + PRECISION)*base); /* force to round */ + integral_part[i] = (ch <= 9) ? ch + '0' : ch + 'a' - 10; + if (! ISXDIGIT((unsigned char)integral_part[i])) + break; /* bail out overflow !! */ + number = ip; + } + } + + /* Oh No !! out of bound, ho well fill it up ! */ + if (number != 0.) + for (i = 0; i < digits; ++i) + integral_part[i] = '9'; + + /* put the sign ? */ + if (sign == '-') + integral_part[i++] = '-'; + + integral_part[i] = '\0'; + + /* reverse every thing */ + for ( i--, j = 0; j < i; j++, i--) + SWAP_INT(integral_part[i], integral_part[j]); + + /* the fractional part */ + for (i=0, fp=fraction; precision > 0 && i < MAX_FRACT ; i++, precision--) + { + fraction_part[i] = (int)((fp + PRECISION)*10. + '0'); + if (! DIGIT(fraction_part[i])) /* underflow ? */ + break; + fp = (fp*10.0) - (double)(long)((fp + PRECISION)*10.); + } + fraction_part[i] = '\0'; + + if (fract != (char **)0) + *fract = fraction_part; + + return integral_part; +} +#endif + +/* for %d and friends, it puts in holder + * the representation with the right padding + */ +static void +number(p, d, base) + struct DATA *p; + unsigned long d; + int base; +{ + char *tmp, *t; + long sd; + int flags; + + /* An explicit precision turns off the zero-padding flag and sets the + pad character back to space. */ + if ((p->flags & PF_ZEROPAD) && p->precision >= 0 && (p->flags & PF_DOT)) + { + p->flags &= ~PF_ZEROPAD; + p->pad = ' '; + } + + sd = d; /* signed for ' ' padding in base 10 */ + flags = 0; + flags = (*p->pf == 'x' || *p->pf == 'X' || *p->pf == 'o' || *p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; + if (*p->pf == 'X') + flags |= FL_HEXUPPER; + + tmp = fmtulong (d, base, intbuf, sizeof(intbuf), flags); + t = 0; + if ((p->flags & PF_THOUSANDS)) + { + GETLOCALEDATA(decpoint, thoussep, grouping); + if (grouping && (t = groupnum (tmp))) + tmp = t; + } + + /* need to add one for any `+', but we only add one in base 10 */ + p->width -= strlen(tmp) + (base == 10 && d > 0 && (p->flags & PF_PLUS)); + PAD_RIGHT(p); + + if ((p->flags & PF_DOT) && p->precision > 0) + { + p->precision -= strlen(tmp); + PAD_ZERO(p); + } + + switch (base) + { + case 10: + PUT_PLUS(sd, p, 0); + PUT_SPACE(sd, p, 0); + break; + case 8: + if (p->flags & PF_ALTFORM) + PUT_CHAR('0', p); + break; + case 16: + if (p->flags & PF_ALTFORM) + { + PUT_CHAR('0', p); + PUT_CHAR(*p->pf, p); + } + break; + } + + while (*tmp) + { + PUT_CHAR(*tmp, p); + tmp++; + } + + PAD_LEFT(p); + FREE (t); +} + +#ifdef HAVE_LONG_LONG +/* + * identical to number() but works for `long long' + */ +static void +lnumber(p, d, base) + struct DATA *p; + unsigned long long d; + int base; +{ + char *tmp, *t; + long long sd; + int flags; + + /* An explicit precision turns off the zero-padding flag and sets the + pad character back to space. */ + if ((p->flags & PF_ZEROPAD) && p->precision >= 0 && (p->flags & PF_DOT)) + { + p->flags &= ~PF_ZEROPAD; + p->pad = ' '; + } + + sd = d; /* signed for ' ' padding in base 10 */ + flags = (*p->pf == 'x' || *p->pf == 'X' || *p->pf == 'o' || *p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; + if (*p->pf == 'X') + flags |= FL_HEXUPPER; + + tmp = fmtullong (d, base, intbuf, sizeof(intbuf), flags); + t = 0; + if ((p->flags & PF_THOUSANDS)) + { + GETLOCALEDATA(decpoint, thoussep, grouping); + if (grouping && (t = groupnum (tmp))) + tmp = t; + } + + /* need to add one for any `+', but we only add one in base 10 */ + p->width -= strlen(tmp) + (base == 10 && d > 0 && (p->flags & PF_PLUS)); + PAD_RIGHT(p); + + if ((p->flags & PF_DOT) && p->precision > 0) + { + p->precision -= strlen(tmp); + PAD_ZERO(p); + } + + switch (base) + { + case 10: + PUT_PLUS(sd, p, 0); + PUT_SPACE(sd, p, 0); + break; + case 8: + if (p->flags & PF_ALTFORM) + PUT_CHAR('0', p); + break; + case 16: + if (p->flags & PF_ALTFORM) + { + PUT_CHAR('0', p); + PUT_CHAR(*p->pf, p); + } + break; + } + + while (*tmp) + { + PUT_CHAR(*tmp, p); + tmp++; + } + + PAD_LEFT(p); + FREE (t); +} +#endif + +static void +pointer(p, d) + struct DATA *p; + unsigned long d; +{ + char *tmp; + + tmp = fmtulong(d, 16, intbuf, sizeof(intbuf), 0); + p->width -= strlen(tmp); + PAD_RIGHT(p); + + /* prefix '0x' for pointers */ + PUT_CHAR('0', p); + PUT_CHAR('x', p); + + while (*tmp) + { + PUT_CHAR(*tmp, p); + tmp++; + } + + PAD_LEFT(p); +} + +/* %s strings */ +static void +strings(p, tmp) + struct DATA *p; + char *tmp; +{ + size_t len; + + len = strlen(tmp); + if (p->precision != NOT_FOUND) /* the smallest number */ + len = (len < p->precision ? len : p->precision); + p->width -= len; + + PUT_STRING (tmp, len, p); +} + +#if HANDLE_MULTIBYTE +/* %ls wide-character strings */ +static void +wstrings(p, tmp) + struct DATA *p; + wchar_t *tmp; +{ + size_t len; + mbstate_t mbs; + char *os; + const wchar_t *ws; + + memset (&mbs, '\0', sizeof (mbstate_t)); + ws = (const wchar_t *)tmp; + + os = (char *)NULL; + if (p->precision != NOT_FOUND) + { + os = (char *)xmalloc (p->precision + 1); + len = wcsrtombs (os, &ws, p->precision, &mbs); + } + else + { + len = wcsrtombs (NULL, &ws, 0, &mbs); + if (len != (size_t)-1) + { + memset (&mbs, '\0', sizeof (mbstate_t)); + os = (char *)xmalloc (len + 1); + (void)wcsrtombs (os, &ws, len + 1, &mbs); + } + } + if (len == (size_t)-1) + { + /* invalid multibyte sequence; bail now. */ + FREE (os); + return; + } + + p->width -= len; + PUT_STRING (os, len, p); + free (os); +} + +static void +wchars (p, wc) + struct DATA *p; + wint_t wc; +{ + char *lbuf, *l; + mbstate_t mbs; + size_t len; + + lbuf = (char *)malloc (MB_CUR_MAX+1); + if (lbuf == 0) + return; + memset (&mbs, '\0', sizeof (mbstate_t)); + len = wcrtomb (lbuf, wc, &mbs); + if (len == (size_t)-1) + /* conversion failed; bail now. */ + return; + p->width -= len; + l = lbuf; + PUT_STRING (l, len, p); + free (lbuf); +} +#endif /* HANDLE_MULTIBYTE */ + +#ifdef FLOATING_POINT + +/* Check for [+-]infinity and NaN. If MODE == 1, we check for Infinity, else + (mode == 2) we check for NaN. This does the necessary printing. Returns + 1 if Inf or Nan, 0 if not. */ +static int +chkinfnan(p, d, mode) + struct DATA *p; + double d; + int mode; /* == 1 for inf, == 2 for nan */ +{ + int i; + char *tmp; + char *big, *small; + + i = (mode == 1) ? isinf(d) : isnan(d); + if (i == 0) + return 0; + big = (mode == 1) ? "INF" : "NAN"; + small = (mode == 1) ? "inf" : "nan"; + + tmp = (*p->pf == 'F' || *p->pf == 'G' || *p->pf == 'E') ? big : small; + + if (i < 0) + PUT_CHAR('-', p); + + while (*tmp) + { + PUT_CHAR (*tmp, p); + tmp++; + } + + return 1; +} + +/* %f %F %g %G floating point representation */ +static void +floating(p, d) + struct DATA *p; + double d; +{ + char *tmp, *tmp2, *t; + int i; + + if (d != 0 && (chkinfnan(p, d, 1) || chkinfnan(p, d, 2))) + return; /* already printed nan or inf */ + + GETLOCALEDATA(decpoint, thoussep, grouping); + DEF_PREC(p); + d = ROUND(d, p); + tmp = dtoa(d, p->precision, &tmp2); + t = 0; + if ((p->flags & PF_THOUSANDS) && grouping && (t = groupnum (tmp))) + tmp = t; + + if ((*p->pf == 'g' || *p->pf == 'G') && (p->flags & PF_ALTFORM) == 0) + { + /* smash the trailing zeros unless altform */ + for (i = strlen(tmp2) - 1; i >= 0 && tmp2[i] == '0'; i--) + tmp2[i] = '\0'; + if (tmp2[0] == '\0') + p->precision = 0; + } + + /* calculate the padding. 1 for the dot */ + p->width = p->width - + /* XXX - should this be d>0. && (p->flags & PF_PLUS) ? */ +#if 0 + ((d > 0. && p->justify == RIGHT) ? 1:0) - +#else + ((d > 0. && (p->flags & PF_PLUS)) ? 1:0) - +#endif + ((p->flags & PF_SPACE) ? 1:0) - + strlen(tmp) - p->precision - + ((p->precision != 0 || (p->flags & PF_ALTFORM)) ? 1 : 0); /* radix char */ + + if (p->pad == ' ') + { + PAD_RIGHT(p); + PUT_PLUS(d, p, 0.); + } + else + { + if (*tmp == '-') + PUT_CHAR(*tmp++, p); + PUT_PLUS(d, p, 0.); + PAD_RIGHT(p); + } + PUT_SPACE(d, p, 0.); + + while (*tmp) + { + PUT_CHAR(*tmp, p); /* the integral */ + tmp++; + } + FREE (t); + + if (p->precision != 0 || (p->flags & PF_ALTFORM)) + PUT_CHAR(decpoint, p); /* put the '.' */ + + for (; *tmp2; tmp2++) + PUT_CHAR(*tmp2, p); /* the fraction */ + + PAD_LEFT(p); +} + +/* %e %E %g %G exponent representation */ +static void +exponent(p, d) + struct DATA *p; + double d; +{ + char *tmp, *tmp2; + int j, i; + + if (d != 0 && (chkinfnan(p, d, 1) || chkinfnan(p, d, 2))) + return; /* already printed nan or inf */ + + GETLOCALEDATA(decpoint, thoussep, grouping); + DEF_PREC(p); + if (d == 0.) + j = 0; + else + { + j = log_10(d); + d = d / pow_10(j); /* get the Mantissa */ + d = ROUND(d, p); + } + tmp = dtoa(d, p->precision, &tmp2); + + /* 1 for unit, 1 for the '.', 1 for 'e|E', + * 1 for '+|-', 2 for 'exp' (but no `.' if precision == 0 */ + /* calculate how much padding need */ + p->width = p->width - + /* XXX - should this be d>0. && (p->flags & PF_PLUS) ? */ +#if 0 + ((d > 0. && p->justify == RIGHT) ? 1:0) - +#else + ((d > 0. && (p->flags & PF_PLUS)) ? 1:0) - +#endif + (p->precision != 0 || (p->flags & PF_ALTFORM)) - + ((p->flags & PF_SPACE) ? 1:0) - p->precision - 5; + + if (p->pad == ' ') + { + PAD_RIGHT(p); + PUT_PLUS(d, p, 0.); + } + else + { + if (*tmp == '-') + PUT_CHAR(*tmp++, p); + PUT_PLUS(d, p, 0.); + PAD_RIGHT(p); + } + PUT_SPACE(d, p, 0.); + + while (*tmp) + { + PUT_CHAR(*tmp, p); + tmp++; + } + + if (p->precision != 0 || (p->flags & PF_ALTFORM)) + PUT_CHAR(decpoint, p); /* the '.' */ + + if ((*p->pf == 'g' || *p->pf == 'G') && (p->flags & PF_ALTFORM) == 0) + /* smash the trailing zeros unless altform */ + for (i = strlen(tmp2) - 1; i >= 0 && tmp2[i] == '0'; i--) + tmp2[i] = '\0'; + + for (; *tmp2; tmp2++) + PUT_CHAR(*tmp2, p); /* the fraction */ + + /* the exponent put the 'e|E' */ + if (*p->pf == 'g' || *p->pf == 'e') + PUT_CHAR('e', p); + else + PUT_CHAR('E', p); + + /* the sign of the exp */ + if (j >= 0) + PUT_CHAR('+', p); + else + { + PUT_CHAR('-', p); + j = -j; + } + + tmp = itoa(j); + /* pad out to at least two spaces. pad with `0' if the exponent is a + single digit. */ + if (j <= 9) + PUT_CHAR('0', p); + + /* the exponent */ + while (*tmp) + { + PUT_CHAR(*tmp, p); + tmp++; + } + + PAD_LEFT(p); +} +#endif + +/* Return a new string with the digits in S grouped according to the locale's + grouping info and thousands separator. If no grouping should be performed, + this returns NULL; the caller needs to check for it. */ +static char * +groupnum (s) + char *s; +{ + char *se, *ret, *re, *g; + int len, slen; + + if (grouping == 0 || *grouping <= 0 || *grouping == CHAR_MAX) + return ((char *)NULL); + + /* find min grouping to size returned string */ + for (len = *grouping, g = grouping; *g; g++) + if (*g > 0 && *g < len) + len = *g; + + slen = strlen (s); + len = slen / len + 1; + ret = (char *)xmalloc (slen + len + 1); + re = ret + slen + len; + *re = '\0'; + + g = grouping; + se = s + slen; + len = *g; + + while (se > s) + { + *--re = *--se; + + /* handle `-' inserted by numtoa() and the fmtu* family here. */ + if (se > s && se[-1] == '-') + continue; + + /* begin new group. */ + if (--len == 0 && se > s) + { + *--re = thoussep; + len = *++g; /* was g++, but that uses first char twice (glibc bug, too) */ + if (*g == '\0') + len = *--g; /* use previous grouping */ + else if (*g == CHAR_MAX) + { + do + *--re = *--se; + while (se > s); + break; + } + } + } + + if (re > ret) +#ifdef HAVE_MEMMOVE + memmove (ret, re, strlen (re) + 1); +#else + strcpy (ret, re); +#endif + + return ret; +} + +/* initialize the conversion specifiers */ +static void +init_conv_flag (p) + struct DATA *p; +{ + p->flags &= PF_ALLOCBUF; /* preserve PF_ALLOCBUF flag */ + p->precision = p->width = NOT_FOUND; + p->justify = NOT_FOUND; + p->pad = ' '; +} + +static void +init_data (p, string, length, format, mode) + struct DATA *p; + char *string; + size_t length; + const char *format; + int mode; +{ + p->length = length - 1; /* leave room for '\0' */ + p->holder = p->base = string; + p->pf = format; + p->counter = 0; + p->flags = (mode == PFM_AS) ? PF_ALLOCBUF : 0; +} + +static int +#if defined (__STDC__) +vsnprintf_internal(struct DATA *data, char *string, size_t length, const char *format, va_list args) +#else +vsnprintf_internal(data, string, length, format, args) + struct DATA *data; + char *string; + size_t length; + const char *format; + va_list args; +#endif +{ + double d; /* temporary holder */ +#ifdef HAVE_LONG_DOUBLE + long double ld; /* for later */ +#endif + unsigned long ul; +#ifdef HAVE_LONG_LONG + unsigned long long ull; +#endif + int state, i, c, n; + char *s; +#if HANDLE_MULTIBYTE + wchar_t *ws; + wint_t wc; +#endif + const char *convstart; + int negprec; + + /* Sanity check, the string length must be >= 0. C99 actually says that + LENGTH can be zero here, in the case of snprintf/vsnprintf (it's never + 0 in the case of asprintf/vasprintf), and the return value is the number + of characters that would have been written. */ + if (length < 0) + return -1; + + if (format == 0) + return 0; + + /* Reset these for each call because the locale might have changed. */ + decpoint = thoussep = 0; + grouping = 0; + + negprec = 0; + for (; c = *(data->pf); data->pf++) + { + if (c != '%') + { + PUT_CHAR (c, data); + continue; + } + + convstart = data->pf; + init_conv_flag (data); /* initialise format flags */ + + state = 1; + for (state = 1; state && *data->pf; ) + { + c = *(++data->pf); + /* fmtend = data->pf */ +#if defined (FLOATING_POINT) && defined (HAVE_LONG_DOUBLE) + if (data->flags & PF_LONGDBL) + { + switch (c) + { + case 'f': case 'F': + case 'e': case 'E': + case 'g': case 'G': +# ifdef HAVE_PRINTF_A_FORMAT + case 'a': case 'A': +# endif + STAR_ARGS (data); + ld = GETLDOUBLE (data); + ldfallback (data, convstart, data->pf, ld); + goto conv_break; + } + } +#endif /* FLOATING_POINT && HAVE_LONG_DOUBLE */ + + switch (c) + { + /* Parse format flags */ + case '\0': /* a NULL here ? ? bail out */ + *data->holder = '\0'; + return data->counter; + break; + case '#': + data->flags |= PF_ALTFORM; + continue; + case '*': + if (data->flags & PF_DOT) + data->flags |= PF_STAR_P; + else + data->flags |= PF_STAR_W; + continue; + case '-': + if ((data->flags & PF_DOT) == 0) + { + data->flags |= PF_LADJUST; + data->justify = LEFT; + } + else + negprec = 1; + continue; + case ' ': + if ((data->flags & PF_PLUS) == 0) + data->flags |= PF_SPACE; + continue; + case '+': + if ((data->flags & PF_DOT) == 0) + { + data->flags |= PF_PLUS; + if ((data->flags & PF_LADJUST) == 0) + data->justify = RIGHT; + } + continue; + case '\'': + data->flags |= PF_THOUSANDS; + continue; + + case '0': + /* If we're not specifying precision (in which case we've seen + a `.') and we're not performing left-adjustment (in which + case the `0' is ignored), a `0' is taken as the zero-padding + flag. */ + if ((data->flags & (PF_DOT|PF_LADJUST)) == 0) + { + data->flags |= PF_ZEROPAD; + data->pad = '0'; + continue; + } + case '1': case '2': case '3': + case '4': case '5': case '6': + case '7': case '8': case '9': + n = 0; + do + { + n = n * 10 + TODIGIT(c); + c = *(++data->pf); + } + while (DIGIT(c)); + data->pf--; /* went too far */ + if (n < 0) + n = 0; + if (data->flags & PF_DOT) + data->precision = negprec ? NOT_FOUND : n; + else + data->width = n; + continue; + + /* optional precision */ + case '.': + data->flags |= PF_DOT; + data->precision = 0; + continue; + + /* length modifiers */ + case 'h': + data->flags |= (data->flags & PF_SHORTINT) ? PF_SIGNEDCHAR : PF_SHORTINT; + continue; + case 'l': + data->flags |= (data->flags & PF_LONGINT) ? PF_LONGLONG : PF_LONGINT; + continue; + case 'L': + data->flags |= PF_LONGDBL; + continue; + case 'q': + data->flags |= PF_LONGLONG; + continue; + case 'j': + data->flags |= PF_INTMAX_T; + SET_SIZE_FLAGS(data, intmax_t); + continue; + case 'z': + data->flags |= PF_SIZE_T; + SET_SIZE_FLAGS(data, size_t); + continue; + case 't': + data->flags |= PF_PTRDIFF_T; + SET_SIZE_FLAGS(data, ptrdiff_t); + continue; + + /* Conversion specifiers */ +#ifdef FLOATING_POINT + case 'f': /* float, double */ + case 'F': + STAR_ARGS(data); + d = GETDOUBLE(data); + floating(data, d); +conv_break: + state = 0; + break; + case 'g': + case 'G': + STAR_ARGS(data); + DEF_PREC(data); + d = GETDOUBLE(data); + i = (d != 0.) ? log_10(d) : -1; + /* + * for '%g|%G' ANSI: use f if exponent + * is in the range or [-4,p] exclusively + * else use %e|%E + */ + if (-4 < i && i < data->precision) + { + /* reset precision */ + data->precision -= i + 1; + floating(data, d); + } + else + { + /* reduce precision by 1 because of leading digit before + decimal point in e format, unless specified as 0. */ + if (data->precision > 0) + data->precision--; + exponent(data, d); + } + state = 0; + break; + case 'e': + case 'E': /* Exponent double */ + STAR_ARGS(data); + d = GETDOUBLE(data); + exponent(data, d); + state = 0; + break; +# ifdef HAVE_PRINTF_A_FORMAT + case 'a': + case 'A': + STAR_ARGS(data); + d = GETDOUBLE(data); + dfallback(data, convstart, data->pf, d); + state = 0; + break; +# endif /* HAVE_PRINTF_A_FORMAT */ +#endif /* FLOATING_POINT */ + case 'U': + data->flags |= PF_LONGINT; + /* FALLTHROUGH */ + case 'u': + STAR_ARGS(data); +#ifdef HAVE_LONG_LONG + if (data->flags & PF_LONGLONG) + { + ull = GETARG (unsigned long long); + lnumber(data, ull, 10); + } + else +#endif + { + ul = GETUNSIGNED(data); + number(data, ul, 10); + } + state = 0; + break; + case 'D': + data->flags |= PF_LONGINT; + /* FALLTHROUGH */ + case 'd': /* decimal */ + case 'i': + STAR_ARGS(data); +#ifdef HAVE_LONG_LONG + if (data->flags & PF_LONGLONG) + { + ull = GETARG (long long); + lnumber(data, ull, 10); + } + else +#endif + { + ul = GETSIGNED(data); + number(data, ul, 10); + } + state = 0; + break; + case 'o': /* octal */ + STAR_ARGS(data); +#ifdef HAVE_LONG_LONG + if (data->flags & PF_LONGLONG) + { + ull = GETARG (unsigned long long); + lnumber(data, ull, 8); + } + else +#endif + { + ul = GETUNSIGNED(data); + number(data, ul, 8); + } + state = 0; + break; + case 'x': + case 'X': /* hexadecimal */ + STAR_ARGS(data); +#ifdef HAVE_LONG_LONG + if (data->flags & PF_LONGLONG) + { + ull = GETARG (unsigned long long); + lnumber(data, ull, 16); + } + else +#endif + { + ul = GETUNSIGNED(data); + number(data, ul, 16); + } + state = 0; + break; + case 'p': + STAR_ARGS(data); + ul = (unsigned long)GETARG (void *); + pointer(data, ul); + state = 0; + break; +#if HANDLE_MULTIBYTE + case 'C': + data->flags |= PF_LONGINT; + /* FALLTHROUGH */ +#endif + case 'c': /* character */ + STAR_ARGS(data); +#if HANDLE_MULTIBYTE + if (data->flags & PF_LONGINT) + { + wc = GETARG (wint_t); + wchars (data, wc); + } + else +#endif + { + ul = GETARG (int); + PUT_CHAR(ul, data); + } + state = 0; + break; +#if HANDLE_MULTIBYTE + case 'S': + data->flags |= PF_LONGINT; + /* FALLTHROUGH */ +#endif + case 's': /* string */ + STAR_ARGS(data); +#if HANDLE_MULTIBYTE + if (data->flags & PF_LONGINT) + { + ws = GETARG (wchar_t *); + wstrings (data, ws); + } + else +#endif + { + s = GETARG (char *); + strings(data, s); + } + state = 0; + break; + case 'n': +#ifdef HAVE_LONG_LONG + if (data->flags & PF_LONGLONG) + *(GETARG (long long *)) = data->counter; + else +#endif + if (data->flags & PF_LONGINT) + *(GETARG (long *)) = data->counter; + else if (data->flags & PF_SHORTINT) + *(GETARG (short *)) = data->counter; + else + *(GETARG (int *)) = data->counter; + state = 0; + break; + case '%': /* nothing just % */ + PUT_CHAR('%', data); + state = 0; + break; + default: + /* is this an error ? maybe bail out */ + state = 0; + break; + } /* end switch */ + } /* end of `%' for loop */ + } /* end of format string for loop */ + + if (data->length >= 0) + *data->holder = '\0'; /* the end ye ! */ + + return data->counter; +} + +#if defined (FLOATING_POINT) && defined (HAVE_LONG_DOUBLE) +/* + * Printing floating point numbers accurately is an art. I'm not good + * at it. Fall back to sprintf for long double formats. + */ +static void +ldfallback (data, fs, fe, ld) + struct DATA *data; + const char *fs, *fe; + long double ld; +{ + register char *x; + char fmtbuf[FALLBACK_FMTSIZE], *obuf; + int fl; + + fl = LFALLBACK_BASE + (data->precision < 6 ? 6 : data->precision) + 2; + obuf = (char *)xmalloc (fl); + fl = fe - fs + 1; + strncpy (fmtbuf, fs, fl); + fmtbuf[fl] = '\0'; + + if ((data->flags & PF_STAR_W) && (data->flags & PF_STAR_P)) + sprintf (obuf, fmtbuf, data->width, data->precision, ld); + else if (data->flags & PF_STAR_W) + sprintf (obuf, fmtbuf, data->width, ld); + else if (data->flags & PF_STAR_P) + sprintf (obuf, fmtbuf, data->precision, ld); + else + sprintf (obuf, fmtbuf, ld); + + for (x = obuf; *x; x++) + PUT_CHAR (*x, data); + xfree (obuf); +} +#endif /* FLOATING_POINT && HAVE_LONG_DOUBLE */ + +#ifdef FLOATING_POINT +/* Used for %a, %A if the libc printf supports them. */ +static void +dfallback (data, fs, fe, d) + struct DATA *data; + const char *fs, *fe; + double d; +{ + register char *x; + char fmtbuf[FALLBACK_FMTSIZE], obuf[FALLBACK_BASE]; + int fl; + + fl = fe - fs + 1; + strncpy (fmtbuf, fs, fl); + fmtbuf[fl] = '\0'; + + if ((data->flags & PF_STAR_W) && (data->flags & PF_STAR_P)) + sprintf (obuf, fmtbuf, data->width, data->precision, d); + else if (data->flags & PF_STAR_W) + sprintf (obuf, fmtbuf, data->width, d); + else if (data->flags & PF_STAR_P) + sprintf (obuf, fmtbuf, data->precision, d); + else + sprintf (obuf, fmtbuf, d); + + for (x = obuf; *x; x++) + PUT_CHAR (*x, data); +} +#endif /* FLOATING_POINT */ + +#if !HAVE_SNPRINTF + +int +#if defined (__STDC__) +vsnprintf(char *string, size_t length, const char *format, va_list args) +#else +vsnprintf(string, length, format, args) + char *string; + size_t length; + const char *format; + va_list args; +#endif +{ + struct DATA data; + + if (string == 0 && length != 0) + return 0; + init_data (&data, string, length, format, PFM_SN); + return (vsnprintf_internal(&data, string, length, format, args)); +} + +int +#if defined(PREFER_STDARG) +snprintf(char *string, size_t length, const char * format, ...) +#else +snprintf(string, length, format, va_alist) + char *string; + size_t length; + const char *format; + va_dcl +#endif +{ + struct DATA data; + int rval; + va_list args; + + SH_VA_START(args, format); + + if (string == 0 && length != 0) + return 0; + init_data (&data, string, length, format, PFM_SN); + rval = vsnprintf_internal (&data, string, length, format, args); + + va_end(args); + + return rval; +} + +#endif /* HAVE_SNPRINTF */ + +#if !HAVE_ASPRINTF + +int +#if defined (__STDC__) +vasprintf(char **stringp, const char *format, va_list args) +#else +vasprintf(stringp, format, args) + char **stringp; + const char *format; + va_list args; +#endif +{ + struct DATA data; + char *string; + int r; + + string = (char *)xmalloc(ASBUFSIZE); + init_data (&data, string, ASBUFSIZE, format, PFM_AS); + r = vsnprintf_internal(&data, string, ASBUFSIZE, format, args); + *stringp = data.base; /* not string in case reallocated */ + return r; +} + +int +#if defined(PREFER_STDARG) +asprintf(char **stringp, const char * format, ...) +#else +asprintf(stringp, format, va_alist) + char **stringp; + const char *format; + va_dcl +#endif +{ + int rval; + va_list args; + + SH_VA_START(args, format); + + rval = vasprintf (stringp, format, args); + + va_end(args); + + return rval; +} + +#endif /* !HAVE_ASPRINTF */ + +#endif /* !HAVE_SNPRINTF || !HAVE_ASPRINTF */ + +#ifdef DRIVER + +static void +memory_error_and_abort () +{ + write (2, "out of virtual memory\n", 22); + abort (); +} + +static void * +xmalloc(bytes) + size_t bytes; +{ + void *ret; + + ret = malloc(bytes); + if (ret == 0) + memory_error_and_abort (); + return ret; +} + +static void * +xrealloc (pointer, bytes) + void *pointer; + size_t bytes; +{ + void *ret; + + ret = pointer ? realloc(pointer, bytes) : malloc(bytes); + if (ret == 0) + memory_error_and_abort (); + return ret; +} + +static void +xfree(x) + void *x; +{ + if (x) + free (x); +} + +/* set of small tests for snprintf() */ +main() +{ + char holder[100]; + char *h; + int i, si, ai; + +#ifdef HAVE_LOCALE_H + setlocale(LC_ALL, ""); +#endif + +#if 1 + si = snprintf((char *)NULL, 0, "abcde\n"); + printf("snprintf returns %d with NULL first argument and size of 0\n", si); + si = snprintf(holder, 0, "abcde\n"); + printf("snprintf returns %d with non-NULL first argument and size of 0\n", si); + si = snprintf((char *)NULL, 16, "abcde\n"); + printf("snprintf returns %d with NULL first argument and non-zero size\n", si); + +/* + printf("Suite of test for snprintf:\n"); + printf("a_format\n"); + printf("printf() format\n"); + printf("snprintf() format\n\n"); +*/ +/* Checking the field widths */ + + printf("/%%ld %%ld/, 336, 336\n"); + snprintf(holder, sizeof holder, "/%ld %ld/\n", 336, 336); + asprintf(&h, "/%ld %ld/\n", 336, 336); + printf("/%ld %ld/\n", 336, 336); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%d/, 336\n"); + snprintf(holder, sizeof holder, "/%d/\n", 336); + asprintf(&h, "/%d/\n", 336); + printf("/%d/\n", 336); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%2d/, 336\n"); + snprintf(holder, sizeof holder, "/%2d/\n", 336); + asprintf(&h, "/%2d/\n", 336); + printf("/%2d/\n", 336); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%10d/, 336\n"); + snprintf(holder, sizeof holder, "/%10d/\n", 336); + asprintf(&h, "/%10d/\n", 336); + printf("/%10d/\n", 336); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%-10d/, 336\n"); + snprintf(holder, sizeof holder, "/%-10d/\n", 336); + asprintf(&h, "/%-10d/\n", 336); + printf("/%-10d/\n", 336); + printf("%s", holder); + printf("%s\n", h); + + +/* floating points */ + + printf("/%%f/, 1234.56\n"); + snprintf(holder, sizeof holder, "/%f/\n", 1234.56); + asprintf(&h, "/%f/\n", 1234.56); + printf("/%f/\n", 1234.56); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%e/, 1234.56\n"); + snprintf(holder, sizeof holder, "/%e/\n", 1234.56); + asprintf(&h, "/%e/\n", 1234.56); + printf("/%e/\n", 1234.56); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%4.2f/, 1234.56\n"); + snprintf(holder, sizeof holder, "/%4.2f/\n", 1234.56); + asprintf(&h, "/%4.2f/\n", 1234.56); + printf("/%4.2f/\n", 1234.56); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%3.1f/, 1234.56\n"); + snprintf(holder, sizeof holder, "/%3.1f/\n", 1234.56); + asprintf(&h, "/%3.1f/\n", 1234.56); + printf("/%3.1f/\n", 1234.56); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%10.3f/, 1234.56\n"); + snprintf(holder, sizeof holder, "/%10.3f/\n", 1234.56); + asprintf(&h, "/%10.3f/\n", 1234.56); + printf("/%10.3f/\n", 1234.56); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%10.3e/, 1234.56\n"); + snprintf(holder, sizeof holder, "/%10.3e/\n", 1234.56); + asprintf(&h, "/%10.3e/\n", 1234.56); + printf("/%10.3e/\n", 1234.56); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%+4.2f/, 1234.56\n"); + snprintf(holder, sizeof holder, "/%+4.2f/\n", 1234.56); + asprintf(&h, "/%+4.2f/\n", 1234.56); + printf("/%+4.2f/\n", 1234.56); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%010.2f/, 1234.56\n"); + snprintf(holder, sizeof holder, "/%010.2f/\n", 1234.56); + asprintf(&h, "/%010.2f/\n", 1234.56); + printf("/%010.2f/\n", 1234.56); + printf("%s", holder); + printf("%s\n", h); + +#define BLURB "Outstanding acting !" +/* strings precisions */ + + printf("/%%2s/, \"%s\"\n", BLURB); + snprintf(holder, sizeof holder, "/%2s/\n", BLURB); + asprintf(&h, "/%2s/\n", BLURB); + printf("/%2s/\n", BLURB); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%22s/ %s\n", BLURB); + snprintf(holder, sizeof holder, "/%22s/\n", BLURB); + asprintf(&h, "/%22s/\n", BLURB); + printf("/%22s/\n", BLURB); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%22.5s/ %s\n", BLURB); + snprintf(holder, sizeof holder, "/%22.5s/\n", BLURB); + asprintf(&h, "/%22.5s/\n", BLURB); + printf("/%22.5s/\n", BLURB); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%-22.5s/ %s\n", BLURB); + snprintf(holder, sizeof holder, "/%-22.5s/\n", BLURB); + asprintf(&h, "/%-22.5s/\n", BLURB); + printf("/%-22.5s/\n", BLURB); + printf("%s", holder); + printf("%s\n", h); + +/* see some flags */ + + printf("%%x %%X %%#x, 31, 31, 31\n"); + snprintf(holder, sizeof holder, "%x %X %#x\n", 31, 31, 31); + asprintf(&h, "%x %X %#x\n", 31, 31, 31); + printf("%x %X %#x\n", 31, 31, 31); + printf("%s", holder); + printf("%s\n", h); + + printf("**%%d**%% d**%% d**, 42, 42, -42\n"); + snprintf(holder, sizeof holder, "**%d**% d**% d**\n", 42, 42, -42); + asprintf(&h, "**%d**% d**% d**\n", 42, 42, -42); + printf("**%d**% d**% d**\n", 42, 42, -42); + printf("%s", holder); + printf("%s\n", h); + +/* other flags */ + + printf("/%%g/, 31.4\n"); + snprintf(holder, sizeof holder, "/%g/\n", 31.4); + asprintf(&h, "/%g/\n", 31.4); + printf("/%g/\n", 31.4); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%.6g/, 31.4\n"); + snprintf(holder, sizeof holder, "/%.6g/\n", 31.4); + asprintf(&h, "/%.6g/\n", 31.4); + printf("/%.6g/\n", 31.4); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%.1G/, 31.4\n"); + snprintf(holder, sizeof holder, "/%.1G/\n", 31.4); + asprintf(&h, "/%.1G/\n", 31.4); + printf("/%.1G/\n", 31.4); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%.1G/, 3100000000.4\n"); + snprintf(holder, sizeof holder, "/%.1G/\n", 3100000000.4); + asprintf(&h, "/%.1G/\n", 3100000000.4); + printf("/%.1G/\n", 3100000000.4); + printf("%s", holder); + printf("%s\n", h); + + printf("abc%%n\n"); + printf("abc%n", &i); printf("%d\n", i); + snprintf(holder, sizeof holder, "abc%n", &i); + printf("%s", holder); printf("%d\n\n", i); + asprintf(&h, "abc%n", &i); + printf("%s", h); printf("%d\n\n", i); + + printf("%%*.*s --> 10.10\n"); + snprintf(holder, sizeof holder, "%*.*s\n", 10, 10, BLURB); + asprintf(&h, "%*.*s\n", 10, 10, BLURB); + printf("%*.*s\n", 10, 10, BLURB); + printf("%s", holder); + printf("%s\n", h); + + printf("%%%%%%%%\n"); + snprintf(holder, sizeof holder, "%%%%\n"); + asprintf(&h, "%%%%\n"); + printf("%%%%\n"); + printf("%s", holder); + printf("%s\n", h); + +#define BIG "Hello this is a too big string for the buffer" +/* printf("A buffer to small of 10, trying to put this:\n");*/ + printf("<%%>, %s\n", BIG); + i = snprintf(holder, 10, "%s\n", BIG); + i = asprintf(&h, "%s", BIG); + printf("<%s>\n", BIG); + printf("<%s>\n", holder); + printf("<%s>\n\n", h); + + printf ("<%%p> vsnprintf\n"); + i = snprintf(holder, 100, "%p", vsnprintf); + i = asprintf(&h, "%p", vsnprintf); + printf("<%p>\n", vsnprintf); + printf("<%s>\n", holder); + printf("<%s>\n\n", h); + + printf ("<%%lu> LONG_MAX+1\n"); + i = snprintf(holder, 100, "%lu", (unsigned long)(LONG_MAX)+1); + i = asprintf(&h, "%lu", (unsigned long)(LONG_MAX)+1); + printf("<%lu>\n", (unsigned long)(LONG_MAX)+1); + printf("<%s>\n", holder); + printf("<%s>\n\n", h); + +#ifdef HAVE_LONG_LONG + printf ("<%%llu> LLONG_MAX+1\n"); + i = snprintf(holder, 100, "%llu", (unsigned long long)(LLONG_MAX)+1); + i = asprintf(&h, "%llu", (unsigned long long)(LLONG_MAX)+1); + printf("<%llu>\n", (unsigned long long)(LLONG_MAX)+1); + printf("<%s>\n", holder); + printf("<%s>\n\n", h); +#endif + +#ifdef HAVE_LONG_DOUBLE + printf ("<%%6.2LE> 42.42\n"); + i = snprintf(holder, 100, "%6.2LE", (long double)42.42); + i = asprintf(&h, "%6.2LE", (long double)42.42); + printf ("<%6.2LE>\n", (long double)42.42); + printf ("<%s>\n", holder); + printf ("<%s>\n\n", h); +#endif + +#ifdef HAVE_PRINTF_A_FORMAT + printf ("<%%6.2A> 42.42\n"); + i = snprintf(holder, 100, "%6.2A", 42.42); + i = asprintf(&h, "%6.2A", 42.42); + printf ("<%6.2A>\n", 42.42); + printf ("<%s>\n", holder); + printf ("<%s>\n\n", h); + + printf ("<%%6.2LA> 42.42\n"); + i = snprintf(holder, 100, "%6.2LA", (long double)42.42); + i = asprintf(&h, "%6.2LA", (long double)42.42); + printf ("<%6.2LA>\n", (long double)42.42); + printf ("<%s>\n", holder); + printf ("<%s>\n\n", h); +#endif + + printf ("<%%.10240f> DBL_MAX\n"); + si = snprintf(holder, 100, "%.10240f", DBL_MAX); + ai = asprintf(&h, "%.10240f", DBL_MAX); + printf ("<%.10240f>\n", DBL_MAX); + printf ("<%d> <%s>\n", si, holder); + printf ("<%d> <%s>\n\n", ai, h); + + printf ("<%%.10240Lf> LDBL_MAX\n"); + si = snprintf(holder, 100, "%.10240Lf", (long double)LDBL_MAX); + ai = asprintf(&h, "%.10240Lf", (long double)LDBL_MAX); + printf ("<%.10240Lf>\n", (long double)LDBL_MAX); + printf ("<%d> <%s>\n", si, holder); + printf ("<%d> <%s>\n\n", ai, h); + + /* huh? */ + printf("/%%g/, 421.2345\n"); + snprintf(holder, sizeof holder, "/%g/\n", 421.2345); + asprintf(&h, "/%g/\n", 421.2345); + printf("/%g/\n", 421.2345); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%g/, 4214.2345\n"); + snprintf(holder, sizeof holder, "/%g/\n", 4214.2345); + asprintf(&h, "/%g/\n", 4214.2345); + printf("/%g/\n", 4214.2345); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%.5g/, 4214.2345\n"); + snprintf(holder, sizeof holder, "/%.5g/\n", 4214.2345); + asprintf(&h, "/%.5g/\n", 4214.2345); + printf("/%.5g/\n", 4214.2345); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%.4g/, 4214.2345\n"); + snprintf(holder, sizeof holder, "/%.4g/\n", 4214.2345); + asprintf(&h, "/%.4g/\n", 4214.2345); + printf("/%.4g/\n", 4214.2345); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%'ld %%'ld/, 12345, 1234567\n"); + snprintf(holder, sizeof holder, "/%'ld %'ld/\n", 12345, 1234567); + asprintf(&h, "/%'ld %'ld/\n", 12345, 1234567); + printf("/%'ld %'ld/\n", 12345, 1234567); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%'ld %%'ld/, 336, 3336\n"); + snprintf(holder, sizeof holder, "/%'ld %'ld/\n", 336, 3336); + asprintf(&h, "/%'ld %'ld/\n", 336, 3336); + printf("/%'ld %'ld/\n", 336, 3336); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%'ld %%'ld/, -42786, -142786\n"); + snprintf(holder, sizeof holder, "/%'ld %'ld/\n", -42786, -142786); + asprintf(&h, "/%'ld %'ld/\n", -42786, -142786); + printf("/%'ld %'ld/\n", -42786, -142786); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%'f %%'f/, 421.2345, 421234.56789\n"); + snprintf(holder, sizeof holder, "/%'f %'f/\n", 421.2345, 421234.56789); + asprintf(&h, "/%'f %'f/\n", 421.2345, 421234.56789); + printf("/%'f %'f/\n", 421.2345, 421234.56789); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%'f %%'f/, -421.2345, -421234.56789\n"); + snprintf(holder, sizeof holder, "/%'f %'f/\n", -421.2345, -421234.56789); + asprintf(&h, "/%'f %'f/\n", -421.2345, -421234.56789); + printf("/%'f %'f/\n", -421.2345, -421234.56789); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%'g %%'g/, 421.2345, 421234.56789\n"); + snprintf(holder, sizeof holder, "/%'g %'g/\n", 421.2345, 421234.56789); + asprintf(&h, "/%'g %'g/\n", 421.2345, 421234.56789); + printf("/%'g %'g/\n", 421.2345, 421234.56789); + printf("%s", holder); + printf("%s\n", h); + + printf("/%%'g %%'g/, -421.2345, -421234.56789\n"); + snprintf(holder, sizeof holder, "/%'g %'g/\n", -421.2345, -421234.56789); + asprintf(&h, "/%'g %'g/\n", -421.2345, -421234.56789); + printf("/%'g %'g/\n", -421.2345, -421234.56789); + printf("%s", holder); + printf("%s\n", h); +#endif + + printf("/%%'g/, 4213455.8392\n"); + snprintf(holder, sizeof holder, "/%'g/\n", 4213455.8392); + asprintf(&h, "/%'g/\n", 4213455.8392); + printf("/%'g/\n", 4213455.8392); + printf("%s", holder); + printf("%s\n", h); + + exit (0); +} +#endif diff --git a/bash-5.1/lib/sh/spell.c b/bash-5.1/lib/sh/spell.c new file mode 100644 index 0000000000000000000000000000000000000000..cdf465b2d9602141f24a244780e8e1ed4459087a --- /dev/null +++ b/bash-5.1/lib/sh/spell.c @@ -0,0 +1,212 @@ +/* spell.c -- spelling correction for pathnames. */ + +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include +#include +#if defined (HAVE_SYS_PARAM_H) +#include +#endif + +#include + +#include +#include +#include + +static int mindist PARAMS((char *, char *, char *)); +static int spdist PARAMS((char *, char *)); + +/* + * `spname' and its helpers are inspired by the code in "The UNIX + * Programming Environment", Kernighan & Pike, Prentice-Hall 1984, + * pages 209 - 213. + */ + +/* + * `spname' -- return a correctly spelled filename + * + * int spname(char * oldname, char * newname) + * Returns: -1 if no reasonable match found + * 0 if exact match found + * 1 if corrected + * Stores corrected name in `newname'. + */ +int +spname(oldname, newname) + char *oldname; + char *newname; +{ + char *op, *np, *p; + char guess[PATH_MAX + 1], best[PATH_MAX + 1]; + + op = oldname; + np = newname; + for (;;) + { + while (*op == '/') /* Skip slashes */ + *np++ = *op++; + *np = '\0'; + + if (*op == '\0') /* Exact or corrected */ + { + /* `.' is rarely the right thing. */ + if (oldname[1] == '\0' && newname[1] == '\0' && + oldname[0] != '.' && newname[0] == '.') + return -1; + return strcmp(oldname, newname) != 0; + } + + /* Copy next component into guess */ + for (p = guess; *op != '/' && *op != '\0'; op++) + if (p < guess + PATH_MAX) + *p++ = *op; + *p = '\0'; + + if (mindist(newname, guess, best) >= 3) + return -1; /* Hopeless */ + + /* + * Add to end of newname + */ + for (p = best; *np = *p++; np++) + ; + } +} + +/* + * Search directory for a guess + */ +static int +mindist(dir, guess, best) + char *dir; + char *guess; + char *best; +{ + DIR *fd; + struct dirent *dp; + int dist, x; + + dist = 3; /* Worst distance */ + if (*dir == '\0') + dir = "."; + + if ((fd = opendir(dir)) == NULL) + return dist; + + while ((dp = readdir(fd)) != NULL) + { + /* + * Look for a better guess. If the new guess is as + * good as the current one, we take it. This way, + * any single character match will be a better match + * than ".". + */ + x = spdist(dp->d_name, guess); + if (x <= dist && x != 3) + { + strcpy(best, dp->d_name); + dist = x; + if (dist == 0) /* Exact match */ + break; + } + } + (void)closedir(fd); + + /* Don't return `.' */ + if (best[0] == '.' && best[1] == '\0') + dist = 3; + return dist; +} + +/* + * `spdist' -- return the "distance" between two names. + * + * int spname(char * oldname, char * newname) + * Returns: 0 if strings are identical + * 1 if two characters are transposed + * 2 if one character is wrong, added or deleted + * 3 otherwise + */ +static int +spdist(cur, new) + char *cur, *new; +{ + while (*cur == *new) + { + if (*cur == '\0') + return 0; /* Exact match */ + cur++; + new++; + } + + if (*cur) + { + if (*new) + { + if (cur[1] && new[1] && cur[0] == new[1] && cur[1] == new[0] && strcmp (cur + 2, new + 2) == 0) + return 1; /* Transposition */ + + if (strcmp (cur + 1, new + 1) == 0) + return 2; /* One character mismatch */ + } + + if (strcmp(&cur[1], &new[0]) == 0) + return 2; /* Extra character */ + } + + if (*new && strcmp(cur, new + 1) == 0) + return 2; /* Missing character */ + + return 3; +} + +char * +dirspell (dirname) + char *dirname; +{ + int n; + char *guess; + + n = (strlen (dirname) * 3 + 1) / 2 + 1; + guess = (char *)malloc (n); + if (guess == 0) + return 0; + + switch (spname (dirname, guess)) + { + case -1: + default: + free (guess); + return (char *)NULL; + case 0: + case 1: + return guess; + } +} diff --git a/bash-5.1/lib/sh/strcasecmp.c b/bash-5.1/lib/sh/strcasecmp.c new file mode 100644 index 0000000000000000000000000000000000000000..70d0551a11dcc5a7f7b371bd97ec07e9fd89e5df --- /dev/null +++ b/bash-5.1/lib/sh/strcasecmp.c @@ -0,0 +1,84 @@ +/* strcasecmp.c - functions for case-insensitive string comparison. */ + +/* Copyright (C) 1995 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_STRCASECMP) + +#include +#include +#include + +/* Compare at most COUNT characters from string1 to string2. Case + doesn't matter. */ +int +strncasecmp (string1, string2, count) + const char *string1; + const char *string2; + size_t count; +{ + register const char *s1; + register const char *s2; + register int r; + + if (count <= 0 || (string1 == string2)) + return 0; + + s1 = string1; + s2 = string2; + do + { + if ((r = TOLOWER ((unsigned char) *s1) - TOLOWER ((unsigned char) *s2)) != 0) + return r; + if (*s1++ == '\0') + break; + s2++; + } + while (--count != 0); + + return (0); +} + +/* strcmp (), but caseless. */ +int +strcasecmp (string1, string2) + const char *string1; + const char *string2; +{ + register const char *s1; + register const char *s2; + register int r; + + s1 = string1; + s2 = string2; + + if (s1 == s2) + return (0); + + while ((r = TOLOWER ((unsigned char)*s1) - TOLOWER ((unsigned char)*s2)) == 0) + { + if (*s1++ == '\0') + return 0; + s2++; + } + + return (r); +} +#endif /* !HAVE_STRCASECMP */ diff --git a/bash-5.1/lib/sh/strcasestr.c b/bash-5.1/lib/sh/strcasestr.c new file mode 100644 index 0000000000000000000000000000000000000000..c819b3eb8c0344d419391910b49ee00afb9683ba --- /dev/null +++ b/bash-5.1/lib/sh/strcasestr.c @@ -0,0 +1,46 @@ +/* strcasestr.c - Find if one string appears as a substring of another string, + without regard to case. */ + +/* Copyright (C) 2000 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#include + +#include + +/* Determine if s2 occurs in s1. If so, return a pointer to the + match in s1. The compare is case insensitive. This is a + case-insensitive strstr(3). */ +char * +strcasestr (s1, s2) + const char *s1; + const char *s2; +{ + register int i, l, len, c; + + c = TOLOWER ((unsigned char)s2[0]); + len = strlen (s1); + l = strlen (s2); + for (i = 0; (len - i) >= l; i++) + if ((TOLOWER ((unsigned char)s1[i]) == c) && (strncasecmp (s1 + i, s2, l) == 0)) + return ((char *)s1 + i); + return ((char *)0); +} diff --git a/bash-5.1/lib/sh/strchrnul.c b/bash-5.1/lib/sh/strchrnul.c new file mode 100644 index 0000000000000000000000000000000000000000..00cb88c4e5e90f0751d9069669ba10e6b942e9f9 --- /dev/null +++ b/bash-5.1/lib/sh/strchrnul.c @@ -0,0 +1,35 @@ +/* Searching in a string. + Copyright (C) 2012 Free Software Foundation, Inc. + + 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 . */ + +#include +#include + +/* Specification. */ +#include + +/* Find the first occurrence of C in S or the final NUL byte. */ +char * +strchrnul (s, c_in) + const char *s; + int c_in; +{ + char c; + register char *s1; + + for (c = c_in, s1 = (char *)s; s1 && *s1 && *s1 != c; s1++) + ; + return (s1); +} diff --git a/bash-5.1/lib/sh/strdup.c b/bash-5.1/lib/sh/strdup.c new file mode 100644 index 0000000000000000000000000000000000000000..90fa3532c500aadbe15674cfe881afe25edcb42d --- /dev/null +++ b/bash-5.1/lib/sh/strdup.c @@ -0,0 +1,42 @@ +/* strdup - return a copy of a string in newly-allocated memory. */ + +/* Copyright (C) 2013 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + + +#include + +/* Get specification. */ +#include +#include + +/* Duplicate S, returning an identical malloc'd string. */ +char * +strdup (s) + const char *s; +{ + size_t len; + void *new; + + len = strlen (s) + 1; + if ((new = malloc (len)) == NULL) + return NULL; + + memcpy (new, s, len); + return ((char *)new); +} diff --git a/bash-5.1/lib/sh/strerror.c b/bash-5.1/lib/sh/strerror.c new file mode 100644 index 0000000000000000000000000000000000000000..bf63926300d7ddab75dff5d3f65ba94d7ec32445 --- /dev/null +++ b/bash-5.1/lib/sh/strerror.c @@ -0,0 +1,74 @@ +/* strerror.c - string corresponding to a particular value of errno. */ + +/* Copyright (C) 1995 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_STRERROR) + +#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include + +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +/* Return a string corresponding to the error number E. From + the ANSI C spec. */ +#if defined (strerror) +# undef strerror +#endif + +static char *errbase = "Unknown system error "; + +char * +strerror (e) + int e; +{ + static char emsg[40]; +#if defined (HAVE_SYS_ERRLIST) + extern int sys_nerr; + extern char *sys_errlist[]; + + if (e > 0 && e < sys_nerr) + return (sys_errlist[e]); + else +#endif /* HAVE_SYS_ERRLIST */ + { + char *z; + + z = itos (e); + strcpy (emsg, errbase); + strcat (emsg, z); + free (z); + return (&emsg[0]); + } +} +#endif /* HAVE_STRERROR */ diff --git a/bash-5.1/lib/sh/strftime.c b/bash-5.1/lib/sh/strftime.c new file mode 100644 index 0000000000000000000000000000000000000000..08ccb9a34b63647e32aebb88d7974779a3f41178 --- /dev/null +++ b/bash-5.1/lib/sh/strftime.c @@ -0,0 +1,1015 @@ +/* strftime - formatted time and date to a string */ +/* + * Modified slightly by Chet Ramey for inclusion in Bash + */ +/* + * strftime.c + * + * Public-domain implementation of ISO C library routine. + * + * If you can't do prototypes, get GCC. + * + * The C99 standard now specifies just about all of the formats + * that were additional in the earlier versions of this file. + * + * For extensions from SunOS, add SUNOS_EXT. + * For extensions from HP/UX, add HPUX_EXT. + * For VMS dates, add VMS_EXT. + * For complete POSIX semantics, add POSIX_SEMANTICS. + * + * The code for %c, %x, and %X follows the C99 specification for + * the "C" locale. + * + * This version ignores LOCALE information. + * It also doesn't worry about multi-byte characters. + * So there. + * + * Arnold Robbins + * January, February, March, 1991 + * Updated March, April 1992 + * Updated April, 1993 + * Updated February, 1994 + * Updated May, 1994 + * Updated January, 1995 + * Updated September, 1995 + * Updated January, 1996 + * Updated July, 1997 + * Updated October, 1999 + * Updated September, 2000 + * Updated December, 2001 + * Updated January, 2011 + * Updated April, 2012 + * + * Fixes from ado@elsie.nci.nih.gov, + * February 1991, May 1992 + * Fixes from Tor Lillqvist tml@tik.vtt.fi, + * May 1993 + * Further fixes from ado@elsie.nci.nih.gov, + * February 1994 + * %z code from chip@chinacat.unicom.com, + * Applied September 1995 + * %V code fixed (again) and %G, %g added, + * January 1996 + * %v code fixed, better configuration, + * July 1997 + * Moved to C99 specification. + * September 2000 + * Fixes from Tanaka Akira + * December 2001 + */ +#include + +#include +#include +#include +#include + +#if defined(TM_IN_SYS_TIME) +#include +#include +#endif + +#include +#include + +/* defaults: season to taste */ +#define SUNOS_EXT 1 /* stuff in SunOS strftime routine */ +#define VMS_EXT 1 /* include %v for VMS date format */ +#define HPUX_EXT 1 /* non-conflicting stuff in HP-UX date */ +#define POSIX_SEMANTICS 1 /* call tzset() if TZ changes */ +#define POSIX_2008 1 /* flag and fw for C, F, G, Y formats */ + +#undef strchr /* avoid AIX weirdness */ + +#if !defined (errno) +extern int errno; +#endif + +#if defined (SHELL) +extern char *get_string_value (const char *); +#endif + +extern void tzset(void); +static int weeknumber(const struct tm *timeptr, int firstweekday); +static int iso8601wknum(const struct tm *timeptr); + +#ifndef inline +#ifdef __GNUC__ +#define inline __inline__ +#else +#define inline /**/ +#endif +#endif + +#define range(low, item, hi) max(low, min(item, hi)) + +/* Whew! This stuff is a mess. */ +#if !defined(OS2) && !defined(MSDOS) && !defined(__CYGWIN__) && defined(HAVE_TZNAME) +extern char *tzname[2]; +extern int daylight; +#if defined(SOLARIS) || defined(mips) || defined (M_UNIX) +extern long int timezone, altzone; +#else +# if defined (HPUX) || defined(__hpux) +extern long int timezone; +# else +# if !defined(__CYGWIN__) +extern int timezone, altzone; +# endif +# endif +#endif +#endif + +#undef min /* just in case */ + +/* min --- return minimum of two numbers */ + +static inline int +min(int a, int b) +{ + return (a < b ? a : b); +} + +#undef max /* also, just in case */ + +/* max --- return maximum of two numbers */ + +static inline int +max(int a, int b) +{ + return (a > b ? a : b); +} + +#ifdef POSIX_2008 +/* iso_8601_2000_year --- format a year per ISO 8601:2000 as in 1003.1 */ + +static void +iso_8601_2000_year(char *buf, int year, size_t fw) +{ + int extra; + char sign = '\0'; + + if (year >= -9999 && year <= 9999) { + sprintf(buf, "%0*d", (int) fw, year); + return; + } + + /* now things get weird */ + if (year > 9999) { + sign = '+'; + } else { + sign = '-'; + year = -year; + } + + extra = year / 10000; + year %= 10000; + sprintf(buf, "%c_%04d_%d", sign, extra, year); +} +#endif /* POSIX_2008 */ + +/* strftime --- produce formatted time */ + +size_t +strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) +{ + char *endp = s + maxsize; + char *start = s; + auto char tbuf[100]; + long off; + int i, w, oerrno; + long y; + static short first = 1; +#ifdef POSIX_SEMANTICS + static char *savetz = NULL; + static int savetzlen = 0; + char *tz; +#endif /* POSIX_SEMANTICS */ +#ifndef HAVE_TM_ZONE +#ifndef HAVE_TM_NAME +#ifndef HAVE_TZNAME +#ifndef __CYGWIN__ + extern char *timezone(); + struct timeval tv; + struct timezone zone; +#endif /* __CYGWIN__ */ +#endif /* HAVE_TZNAME */ +#endif /* HAVE_TM_NAME */ +#endif /* HAVE_TM_ZONE */ +#ifdef POSIX_2008 + int pad; + size_t fw; + char flag; +#endif /* POSIX_2008 */ + + /* various tables, useful in North America */ + static const char *days_a[] = { + "Sun", "Mon", "Tue", "Wed", + "Thu", "Fri", "Sat", + }; + static const char *days_l[] = { + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday", + }; + static const char *months_a[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", + }; + static const char *months_l[] = { + "January", "February", "March", "April", + "May", "June", "July", "August", "September", + "October", "November", "December", + }; + static const char *ampm[] = { "AM", "PM", }; + + oerrno = errno; + + if (s == NULL || format == NULL || timeptr == NULL || maxsize == 0) + return 0; + + /* quick check if we even need to bother */ + if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize) + return 0; + +#ifndef POSIX_SEMANTICS + if (first) { + tzset(); + first = 0; + } +#else /* POSIX_SEMANTICS */ +#if defined (SHELL) + tz = get_string_value ("TZ"); +#else + tz = getenv("TZ"); +#endif + if (first) { + if (tz != NULL) { + int tzlen = strlen(tz); + + savetz = (char *) malloc(tzlen + 1); + if (savetz != NULL) { + savetzlen = tzlen + 1; + strcpy(savetz, tz); + } + } + tzset(); + first = 0; + } + /* if we have a saved TZ, and it is different, recapture and reset */ + if (tz && savetz && (tz[0] != savetz[0] || strcmp(tz, savetz) != 0)) { + i = strlen(tz) + 1; + if (i > savetzlen) { + savetz = (char *) realloc(savetz, i); + if (savetz) { + savetzlen = i; + strcpy(savetz, tz); + } + } else + strcpy(savetz, tz); + tzset(); + } +#endif /* POSIX_SEMANTICS */ + + for (; *format && s < endp - 1; format++) { + tbuf[0] = '\0'; + if (*format != '%') { + *s++ = *format; + continue; + } +#ifdef POSIX_2008 + pad = '\0'; + fw = 0; + flag = '\0'; + switch (*++format) { + case '+': + flag = '+'; + /* fall through */ + case '0': + pad = '0'; + format++; + break; + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + break; + + default: + format--; + goto again; + } + for (; isdigit(*format); format++) { + fw = fw * 10 + (*format - '0'); + } + format--; +#endif /* POSIX_2008 */ + + again: + switch (*++format) { + case '\0': + *s++ = '%'; + goto out; + + case '%': + *s++ = '%'; + continue; + + case 'a': /* abbreviated weekday name */ + if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6) + strcpy(tbuf, "?"); + else + strcpy(tbuf, days_a[timeptr->tm_wday]); + break; + + case 'A': /* full weekday name */ + if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6) + strcpy(tbuf, "?"); + else + strcpy(tbuf, days_l[timeptr->tm_wday]); + break; + + case 'b': /* abbreviated month name */ + short_month: + if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11) + strcpy(tbuf, "?"); + else + strcpy(tbuf, months_a[timeptr->tm_mon]); + break; + + case 'B': /* full month name */ + if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11) + strcpy(tbuf, "?"); + else + strcpy(tbuf, months_l[timeptr->tm_mon]); + break; + + case 'c': /* appropriate date and time representation */ + /* + * This used to be: + * + * strftime(tbuf, sizeof tbuf, "%a %b %e %H:%M:%S %Y", timeptr); + * + * Now, per the ISO 1999 C standard, it this: + */ + strftime(tbuf, sizeof tbuf, "%A %B %d %T %Y", timeptr); + break; + + case 'C': +#ifdef POSIX_2008 + if (pad != '\0' && fw > 0) { + size_t min_fw = (flag ? 3 : 2); + + fw = max(fw, min_fw); + sprintf(tbuf, flag + ? "%+0*ld" + : "%0*ld", (int) fw, + (timeptr->tm_year + 1900L) / 100); + } else +#endif /* POSIX_2008 */ + century: + sprintf(tbuf, "%02ld", (timeptr->tm_year + 1900L) / 100); + break; + + case 'd': /* day of the month, 01 - 31 */ + i = range(1, timeptr->tm_mday, 31); + sprintf(tbuf, "%02d", i); + break; + + case 'D': /* date as %m/%d/%y */ + strftime(tbuf, sizeof tbuf, "%m/%d/%y", timeptr); + break; + + case 'e': /* day of month, blank padded */ + sprintf(tbuf, "%2d", range(1, timeptr->tm_mday, 31)); + break; + + case 'E': + /* POSIX (now C99) locale extensions, ignored for now */ + goto again; + + case 'F': /* ISO 8601 date representation */ + { +#ifdef POSIX_2008 + /* + * Field width for %F is for the whole thing. + * It must be at least 10. + */ + char m_d[10]; + strftime(m_d, sizeof m_d, "-%m-%d", timeptr); + size_t min_fw = 10; + + if (pad != '\0' && fw > 0) { + fw = max(fw, min_fw); + } else { + fw = min_fw; + } + + fw -= 6; /* -XX-XX at end are invariant */ + + iso_8601_2000_year(tbuf, timeptr->tm_year + 1900, fw); + strcat(tbuf, m_d); +#else + strftime(tbuf, sizeof tbuf, "%Y-%m-%d", timeptr); +#endif /* POSIX_2008 */ + } + break; + + case 'g': + case 'G': + /* + * Year of ISO week. + * + * If it's December but the ISO week number is one, + * that week is in next year. + * If it's January but the ISO week number is 52 or + * 53, that week is in last year. + * Otherwise, it's this year. + */ + w = iso8601wknum(timeptr); + if (timeptr->tm_mon == 11 && w == 1) + y = 1900L + timeptr->tm_year + 1; + else if (timeptr->tm_mon == 0 && w >= 52) + y = 1900L + timeptr->tm_year - 1; + else + y = 1900L + timeptr->tm_year; + + if (*format == 'G') { +#ifdef POSIX_2008 + if (pad != '\0' && fw > 0) { + size_t min_fw = 4; + + fw = max(fw, min_fw); + sprintf(tbuf, flag + ? "%+0*ld" + : "%0*ld", (int) fw, + y); + } else +#endif /* POSIX_2008 */ + sprintf(tbuf, "%ld", y); + } + else + sprintf(tbuf, "%02ld", y % 100); + break; + + case 'h': /* abbreviated month name */ + goto short_month; + + case 'H': /* hour, 24-hour clock, 00 - 23 */ + i = range(0, timeptr->tm_hour, 23); + sprintf(tbuf, "%02d", i); + break; + + case 'I': /* hour, 12-hour clock, 01 - 12 */ + i = range(0, timeptr->tm_hour, 23); + if (i == 0) + i = 12; + else if (i > 12) + i -= 12; + sprintf(tbuf, "%02d", i); + break; + + case 'j': /* day of the year, 001 - 366 */ + sprintf(tbuf, "%03d", timeptr->tm_yday + 1); + break; + + case 'm': /* month, 01 - 12 */ + i = range(0, timeptr->tm_mon, 11); + sprintf(tbuf, "%02d", i + 1); + break; + + case 'M': /* minute, 00 - 59 */ + i = range(0, timeptr->tm_min, 59); + sprintf(tbuf, "%02d", i); + break; + + case 'n': /* same as \n */ + tbuf[0] = '\n'; + tbuf[1] = '\0'; + break; + + case 'O': + /* POSIX (now C99) locale extensions, ignored for now */ + goto again; + + case 'p': /* am or pm based on 12-hour clock */ + i = range(0, timeptr->tm_hour, 23); + if (i < 12) + strcpy(tbuf, ampm[0]); + else + strcpy(tbuf, ampm[1]); + break; + + case 'r': /* time as %I:%M:%S %p */ + strftime(tbuf, sizeof tbuf, "%I:%M:%S %p", timeptr); + break; + + case 'R': /* time as %H:%M */ + strftime(tbuf, sizeof tbuf, "%H:%M", timeptr); + break; + +#if defined(HAVE_MKTIME) + case 's': /* time as seconds since the Epoch */ + { + struct tm non_const_timeptr; + + non_const_timeptr = *timeptr; + sprintf(tbuf, "%ld", mktime(& non_const_timeptr)); + break; + } +#endif /* defined(HAVE_MKTIME) */ + + case 'S': /* second, 00 - 60 */ + i = range(0, timeptr->tm_sec, 60); + sprintf(tbuf, "%02d", i); + break; + + case 't': /* same as \t */ + tbuf[0] = '\t'; + tbuf[1] = '\0'; + break; + + case 'T': /* time as %H:%M:%S */ + the_time: + strftime(tbuf, sizeof tbuf, "%H:%M:%S", timeptr); + break; + + case 'u': + /* ISO 8601: Weekday as a decimal number [1 (Monday) - 7] */ + sprintf(tbuf, "%d", timeptr->tm_wday == 0 ? 7 : + timeptr->tm_wday); + break; + + case 'U': /* week of year, Sunday is first day of week */ + sprintf(tbuf, "%02d", weeknumber(timeptr, 0)); + break; + + case 'V': /* week of year according ISO 8601 */ + sprintf(tbuf, "%02d", iso8601wknum(timeptr)); + break; + + case 'w': /* weekday, Sunday == 0, 0 - 6 */ + i = range(0, timeptr->tm_wday, 6); + sprintf(tbuf, "%d", i); + break; + + case 'W': /* week of year, Monday is first day of week */ + sprintf(tbuf, "%02d", weeknumber(timeptr, 1)); + break; + + case 'x': /* appropriate date representation */ + strftime(tbuf, sizeof tbuf, "%A %B %d %Y", timeptr); + break; + + case 'X': /* appropriate time representation */ + goto the_time; + break; + + case 'y': /* year without a century, 00 - 99 */ + year: + i = timeptr->tm_year % 100; + sprintf(tbuf, "%02d", i); + break; + + case 'Y': /* year with century */ +#ifdef POSIX_2008 + if (pad != '\0' && fw > 0) { + size_t min_fw = 4; + + fw = max(fw, min_fw); + sprintf(tbuf, flag + ? "%+0*ld" + : "%0*ld", (int) fw, + 1900L + timeptr->tm_year); + } else +#endif /* POSIX_2008 */ + sprintf(tbuf, "%ld", 1900L + timeptr->tm_year); + break; + + /* + * From: Chip Rosenthal + * Date: Sun, 19 Mar 1995 00:33:29 -0600 (CST) + * + * Warning: the %z [code] is implemented by inspecting the + * timezone name conditional compile settings, and + * inferring a method to get timezone offsets. I've tried + * this code on a couple of machines, but I don't doubt + * there is some system out there that won't like it. + * Maybe the easiest thing to do would be to bracket this + * with an #ifdef that can turn it off. The %z feature + * would be an admittedly obscure one that most folks can + * live without, but it would be a great help to those of + * us that muck around with various message processors. + */ + case 'z': /* time zone offset east of GMT e.g. -0600 */ + if (timeptr->tm_isdst < 0) + break; +#ifdef HAVE_TM_NAME + /* + * Systems with tm_name probably have tm_tzadj as + * secs west of GMT. Convert to mins east of GMT. + */ + off = -timeptr->tm_tzadj / 60; +#else /* !HAVE_TM_NAME */ +#ifdef HAVE_TM_ZONE + /* + * Systems with tm_zone probably have tm_gmtoff as + * secs east of GMT. Convert to mins east of GMT. + */ + off = timeptr->tm_gmtoff / 60; +#else /* !HAVE_TM_ZONE */ +#if HAVE_TZNAME + /* + * Systems with tzname[] probably have timezone as + * secs west of GMT. Convert to mins east of GMT. + */ +# if defined(__hpux) || defined (HPUX) || defined(__CYGWIN__) + off = -timezone / 60; +# else + /* ADR: 4 August 2001, fixed this per gazelle@interaccess.com */ + off = -(daylight ? altzone : timezone) / 60; +# endif +#else /* !HAVE_TZNAME */ + gettimeofday(& tv, & zone); + off = -zone.tz_minuteswest; +#endif /* !HAVE_TZNAME */ +#endif /* !HAVE_TM_ZONE */ +#endif /* !HAVE_TM_NAME */ + if (off < 0) { + tbuf[0] = '-'; + off = -off; + } else { + tbuf[0] = '+'; + } + sprintf(tbuf+1, "%02ld%02ld", off/60, off%60); + break; + + case 'Z': /* time zone name or abbreviation */ +#ifdef HAVE_TZNAME + i = (daylight && timeptr->tm_isdst > 0); /* 0 or 1 */ + strcpy(tbuf, tzname[i]); +#else +#ifdef HAVE_TM_ZONE + strcpy(tbuf, timeptr->tm_zone); +#else +#ifdef HAVE_TM_NAME + strcpy(tbuf, timeptr->tm_name); +#else + gettimeofday(& tv, & zone); + strcpy(tbuf, timezone(zone.tz_minuteswest, + timeptr->tm_isdst > 0)); +#endif /* HAVE_TM_NAME */ +#endif /* HAVE_TM_ZONE */ +#endif /* HAVE_TZNAME */ + break; + +#ifdef SUNOS_EXT + case 'k': /* hour, 24-hour clock, blank pad */ + sprintf(tbuf, "%2d", range(0, timeptr->tm_hour, 23)); + break; + + case 'l': /* hour, 12-hour clock, 1 - 12, blank pad */ + i = range(0, timeptr->tm_hour, 23); + if (i == 0) + i = 12; + else if (i > 12) + i -= 12; + sprintf(tbuf, "%2d", i); + break; +#endif + +#ifdef HPUX_EXT + case 'N': /* Emperor/Era name */ + /* this is essentially the same as the century */ + goto century; /* %C */ + + case 'o': /* Emperor/Era year */ + goto year; /* %y */ +#endif /* HPUX_EXT */ + + +#ifdef VMS_EXT + case 'v': /* date as dd-bbb-YYYY */ + sprintf(tbuf, "%2d-%3.3s-%4ld", + range(1, timeptr->tm_mday, 31), + months_a[range(0, timeptr->tm_mon, 11)], + timeptr->tm_year + 1900L); + for (i = 3; i < 6; i++) + if (islower(tbuf[i])) + tbuf[i] = toupper(tbuf[i]); + break; +#endif + + default: + tbuf[0] = '%'; + tbuf[1] = *format; + tbuf[2] = '\0'; + break; + } + i = strlen(tbuf); + if (i) { + if (s + i < endp - 1) { + strcpy(s, tbuf); + s += i; + } else + return 0; + } + } +out: + if (s < endp && *format == '\0') { + *s = '\0'; + if (s == start) + errno = oerrno; + return (s - start); + } else + return 0; +} + +/* isleap --- is a year a leap year? */ + +static int +isleap(long year) +{ + return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0); +} + + +/* iso8601wknum --- compute week number according to ISO 8601 */ + +static int +iso8601wknum(const struct tm *timeptr) +{ + /* + * From 1003.2: + * If the week (Monday to Sunday) containing January 1 + * has four or more days in the new year, then it is week 1; + * otherwise it is the highest numbered week of the previous + * year (52 or 53), and the next week is week 1. + * + * ADR: This means if Jan 1 was Monday through Thursday, + * it was week 1, otherwise week 52 or 53. + * + * XPG4 erroneously included POSIX.2 rationale text in the + * main body of the standard. Thus it requires week 53. + */ + + int weeknum, jan1day, diff; + + /* get week number, Monday as first day of the week */ + weeknum = weeknumber(timeptr, 1); + + /* + * With thanks and tip of the hatlo to tml@tik.vtt.fi + * + * What day of the week does January 1 fall on? + * We know that + * (timeptr->tm_yday - jan1.tm_yday) MOD 7 == + * (timeptr->tm_wday - jan1.tm_wday) MOD 7 + * and that + * jan1.tm_yday == 0 + * and that + * timeptr->tm_wday MOD 7 == timeptr->tm_wday + * from which it follows that. . . + */ + jan1day = timeptr->tm_wday - (timeptr->tm_yday % 7); + if (jan1day < 0) + jan1day += 7; + + /* + * If Jan 1 was a Monday through Thursday, it was in + * week 1. Otherwise it was last year's highest week, which is + * this year's week 0. + * + * What does that mean? + * If Jan 1 was Monday, the week number is exactly right, it can + * never be 0. + * If it was Tuesday through Thursday, the weeknumber is one + * less than it should be, so we add one. + * Otherwise, Friday, Saturday or Sunday, the week number is + * OK, but if it is 0, it needs to be 52 or 53. + */ + switch (jan1day) { + case 1: /* Monday */ + break; + case 2: /* Tuesday */ + case 3: /* Wednesday */ + case 4: /* Thursday */ + weeknum++; + break; + case 5: /* Friday */ + case 6: /* Saturday */ + case 0: /* Sunday */ + if (weeknum == 0) { +#ifdef USE_BROKEN_XPG4 + /* XPG4 (as of March 1994) says 53 unconditionally */ + weeknum = 53; +#else + /* get week number of last week of last year */ + struct tm dec31ly; /* 12/31 last year */ + dec31ly = *timeptr; + dec31ly.tm_year--; + dec31ly.tm_mon = 11; + dec31ly.tm_mday = 31; + dec31ly.tm_wday = (jan1day == 0) ? 6 : jan1day - 1; + dec31ly.tm_yday = 364 + isleap(dec31ly.tm_year + 1900L); + weeknum = iso8601wknum(& dec31ly); +#endif + } + break; + } + + if (timeptr->tm_mon == 11) { + /* + * The last week of the year + * can be in week 1 of next year. + * Sigh. + * + * This can only happen if + * M T W + * 29 30 31 + * 30 31 + * 31 + */ + int wday, mday; + + wday = timeptr->tm_wday; + mday = timeptr->tm_mday; + if ( (wday == 1 && (mday >= 29 && mday <= 31)) + || (wday == 2 && (mday == 30 || mday == 31)) + || (wday == 3 && mday == 31)) + weeknum = 1; + } + + return weeknum; +} + +/* weeknumber --- figure how many weeks into the year */ + +/* With thanks and tip of the hatlo to ado@elsie.nci.nih.gov */ + +static int +weeknumber(const struct tm *timeptr, int firstweekday) +{ + int wday = timeptr->tm_wday; + int ret; + + if (firstweekday == 1) { + if (wday == 0) /* sunday */ + wday = 6; + else + wday--; + } + ret = ((timeptr->tm_yday + 7 - wday) / 7); + if (ret < 0) + ret = 0; + return ret; +} + +#if 0 +/* ADR --- I'm loathe to mess with ado's code ... */ + +Date: Wed, 24 Apr 91 20:54:08 MDT +From: Michal Jaegermann +To: arnold@audiofax.com + +Hi Arnold, +in a process of fixing of strftime() in libraries on Atari ST I grabbed +some pieces of code from your own strftime. When doing that it came +to mind that your weeknumber() function compiles a little bit nicer +in the following form: +/* + * firstweekday is 0 if starting in Sunday, non-zero if in Monday + */ +{ + return (timeptr->tm_yday - timeptr->tm_wday + + (firstweekday ? (timeptr->tm_wday ? 8 : 1) : 7)) / 7; +} +How nicer it depends on a compiler, of course, but always a tiny bit. + + Cheers, + Michal + ntomczak@vm.ucs.ualberta.ca +#endif + +#ifdef TEST_STRFTIME + +/* + * NAME: + * tst + * + * SYNOPSIS: + * tst + * + * DESCRIPTION: + * "tst" is a test driver for the function "strftime". + * + * OPTIONS: + * None. + * + * AUTHOR: + * Karl Vogel + * Control Data Systems, Inc. + * vogelke@c-17igp.wpafb.af.mil + * + * BUGS: + * None noticed yet. + * + * COMPILE: + * cc -o tst -DTEST_STRFTIME strftime.c + */ + +/* ADR: I reformatted this to my liking, and deleted some unneeded code. */ + +#ifndef NULL +#include +#endif +#include +#include + +#define MAXTIME 132 + +/* + * Array of time formats. + */ + +static char *array[] = +{ + "(%%A) full weekday name, var length (Sunday..Saturday) %A", + "(%%B) full month name, var length (January..December) %B", + "(%%C) Century %C", + "(%%D) date (%%m/%%d/%%y) %D", + "(%%E) Locale extensions (ignored) %E", + "(%%F) full month name, var length (January..December) %F", + "(%%H) hour (24-hour clock, 00..23) %H", + "(%%I) hour (12-hour clock, 01..12) %I", + "(%%M) minute (00..59) %M", + "(%%N) Emperor/Era Name %N", + "(%%O) Locale extensions (ignored) %O", + "(%%R) time, 24-hour (%%H:%%M) %R", + "(%%S) second (00..60) %S", + "(%%T) time, 24-hour (%%H:%%M:%%S) %T", + "(%%U) week of year, Sunday as first day of week (00..53) %U", + "(%%V) week of year according to ISO 8601 %V", + "(%%W) week of year, Monday as first day of week (00..53) %W", + "(%%X) appropriate locale time representation (%H:%M:%S) %X", + "(%%Y) year with century (1970...) %Y", + "(%%Z) timezone (EDT), or blank if timezone not determinable %Z", + "(%%a) locale's abbreviated weekday name (Sun..Sat) %a", + "(%%b) locale's abbreviated month name (Jan..Dec) %b", + "(%%c) full date (Sat Nov 4 12:02:33 1989)%n%t%t%t %c", + "(%%d) day of the month (01..31) %d", + "(%%e) day of the month, blank-padded ( 1..31) %e", + "(%%h) should be same as (%%b) %h", + "(%%j) day of the year (001..366) %j", + "(%%k) hour, 24-hour clock, blank pad ( 0..23) %k", + "(%%l) hour, 12-hour clock, blank pad ( 0..12) %l", + "(%%m) month (01..12) %m", + "(%%o) Emperor/Era Year %o", + "(%%p) locale's AM or PM based on 12-hour clock %p", + "(%%r) time, 12-hour (same as %%I:%%M:%%S %%p) %r", + "(%%u) ISO 8601: Weekday as decimal number [1 (Monday) - 7] %u", + "(%%v) VMS date (dd-bbb-YYYY) %v", + "(%%w) day of week (0..6, Sunday == 0) %w", + "(%%x) appropriate locale date representation %x", + "(%%y) last two digits of year (00..99) %y", + "(%%z) timezone offset east of GMT as HHMM (e.g. -0500) %z", + (char *) NULL +}; + +/* main routine. */ + +int +main(argc, argv) +int argc; +char **argv; +{ + long time(); + + char *next; + char string[MAXTIME]; + + int k; + int length; + + struct tm *tm; + + long clock; + + /* Call the function. */ + + clock = time((long *) 0); + tm = localtime(&clock); + + for (k = 0; next = array[k]; k++) { + length = strftime(string, MAXTIME, next, tm); + printf("%s\n", string); + } + + exit(0); +} +#endif /* TEST_STRFTIME */ diff --git a/bash-5.1/lib/sh/stringlist.c b/bash-5.1/lib/sh/stringlist.c new file mode 100644 index 0000000000000000000000000000000000000000..3f28b63193a863f7b2784f6ebb4b4798c5f5da03 --- /dev/null +++ b/bash-5.1/lib/sh/stringlist.c @@ -0,0 +1,297 @@ +/* stringlist.c - functions to handle a generic `list of strings' structure */ + +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include + +#include "shell.h" + +#ifdef STRDUP +# undef STRDUP +#endif +#define STRDUP(x) ((x) ? savestring (x) : (char *)NULL) + +/* Allocate a new STRINGLIST, with room for N strings. */ + +STRINGLIST * +strlist_create (n) + int n; +{ + STRINGLIST *ret; + register int i; + + ret = (STRINGLIST *)xmalloc (sizeof (STRINGLIST)); + if (n) + { + ret->list = strvec_create (n+1); + ret->list_size = n; + for (i = 0; i < n; i++) + ret->list[i] = (char *)NULL; + } + else + { + ret->list = (char **)NULL; + ret->list_size = 0; + } + ret->list_len = 0; + return ret; +} + +STRINGLIST * +strlist_resize (sl, n) + STRINGLIST *sl; + int n; +{ + register int i; + + if (sl == 0) + return (sl = strlist_create (n)); + + if (n > sl->list_size) + { + sl->list = strvec_resize (sl->list, n + 1); + for (i = sl->list_size; i <= n; i++) + sl->list[i] = (char *)NULL; + sl->list_size = n; + } + return sl; +} + +void +strlist_flush (sl) + STRINGLIST *sl; +{ + if (sl == 0 || sl->list == 0) + return; + strvec_flush (sl->list); + sl->list_len = 0; +} + +void +strlist_dispose (sl) + STRINGLIST *sl; +{ + if (sl == 0) + return; + if (sl->list) + strvec_dispose (sl->list); + free (sl); +} + +int +strlist_remove (sl, s) + STRINGLIST *sl; + char *s; +{ + int r; + + if (sl == 0 || sl->list == 0 || sl->list_len == 0) + return 0; + + r = strvec_remove (sl->list, s); + if (r) + sl->list_len--; + return r; +} + +STRINGLIST * +strlist_copy (sl) + STRINGLIST *sl; +{ + STRINGLIST *new; + register int i; + + if (sl == 0) + return ((STRINGLIST *)0); + new = strlist_create (sl->list_size); + /* I'd like to use strvec_copy, but that doesn't copy everything. */ + if (sl->list) + { + for (i = 0; i < sl->list_size; i++) + new->list[i] = STRDUP (sl->list[i]); + } + new->list_size = sl->list_size; + new->list_len = sl->list_len; + /* just being careful */ + if (new->list) + new->list[new->list_len] = (char *)NULL; + return new; +} + +/* Return a new STRINGLIST with everything from M1 and M2. */ + +STRINGLIST * +strlist_merge (m1, m2) + STRINGLIST *m1, *m2; +{ + STRINGLIST *sl; + int i, n, l1, l2; + + l1 = m1 ? m1->list_len : 0; + l2 = m2 ? m2->list_len : 0; + + sl = strlist_create (l1 + l2 + 1); + for (i = n = 0; i < l1; i++, n++) + sl->list[n] = STRDUP (m1->list[i]); + for (i = 0; i < l2; i++, n++) + sl->list[n] = STRDUP (m2->list[i]); + sl->list_len = n; + sl->list[n] = (char *)NULL; + return (sl); +} + +/* Make STRINGLIST M1 contain everything in M1 and M2. */ +STRINGLIST * +strlist_append (m1, m2) + STRINGLIST *m1, *m2; +{ + register int i, n, len1, len2; + + if (m1 == 0) + return (m2 ? strlist_copy (m2) : (STRINGLIST *)0); + + len1 = m1->list_len; + len2 = m2 ? m2->list_len : 0; + + if (len2) + { + m1 = strlist_resize (m1, len1 + len2 + 1); + for (i = 0, n = len1; i < len2; i++, n++) + m1->list[n] = STRDUP (m2->list[i]); + m1->list[n] = (char *)NULL; + m1->list_len = n; + } + + return m1; +} + +STRINGLIST * +strlist_prefix_suffix (sl, prefix, suffix) + STRINGLIST *sl; + char *prefix, *suffix; +{ + int plen, slen, tlen, llen, i; + char *t; + + if (sl == 0 || sl->list == 0 || sl->list_len == 0) + return sl; + + plen = STRLEN (prefix); + slen = STRLEN (suffix); + + if (plen == 0 && slen == 0) + return (sl); + + for (i = 0; i < sl->list_len; i++) + { + llen = STRLEN (sl->list[i]); + tlen = plen + llen + slen + 1; + t = (char *)xmalloc (tlen + 1); + if (plen) + strcpy (t, prefix); + strcpy (t + plen, sl->list[i]); + if (slen) + strcpy (t + plen + llen, suffix); + free (sl->list[i]); + sl->list[i] = t; + } + + return (sl); +} + +void +strlist_print (sl, prefix) + STRINGLIST *sl; + char *prefix; +{ + register int i; + + if (sl == 0) + return; + for (i = 0; i < sl->list_len; i++) + printf ("%s%s\n", prefix ? prefix : "", sl->list[i]); +} + +void +strlist_walk (sl, func) + STRINGLIST *sl; + sh_strlist_map_func_t *func; +{ + register int i; + + if (sl == 0) + return; + for (i = 0; i < sl->list_len; i++) + if ((*func)(sl->list[i]) < 0) + break; +} + +void +strlist_sort (sl) + STRINGLIST *sl; +{ + if (sl == 0 || sl->list_len == 0 || sl->list == 0) + return; + strvec_sort (sl->list, 0); +} + +STRINGLIST * +strlist_from_word_list (list, alloc, starting_index, ip) + WORD_LIST *list; + int alloc, starting_index, *ip; +{ + STRINGLIST *ret; + int slen, len; + + if (list == 0) + { + if (ip) + *ip = 0; + return ((STRINGLIST *)0); + } + slen = list_length (list); + ret = (STRINGLIST *)xmalloc (sizeof (STRINGLIST)); + ret->list = strvec_from_word_list (list, alloc, starting_index, &len); + ret->list_size = slen + starting_index; + ret->list_len = len; + if (ip) + *ip = len; + return ret; +} + +WORD_LIST * +strlist_to_word_list (sl, alloc, starting_index) + STRINGLIST *sl; + int alloc, starting_index; +{ + WORD_LIST *list; + + if (sl == 0 || sl->list == 0) + return ((WORD_LIST *)NULL); + + list = strvec_to_word_list (sl->list, alloc, starting_index); + return list; +} diff --git a/bash-5.1/lib/sh/stringvec.c b/bash-5.1/lib/sh/stringvec.c new file mode 100644 index 0000000000000000000000000000000000000000..860004296a910eb5461982eecf2e4dc16bf8ba28 --- /dev/null +++ b/bash-5.1/lib/sh/stringvec.c @@ -0,0 +1,272 @@ +/* stringvec.c - functions for managing arrays of strings. */ + +/* Copyright (C) 2000-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include + +#include "shell.h" + +/* Allocate an array of strings with room for N members. */ +char ** +strvec_create (n) + int n; +{ + return ((char **)xmalloc ((n) * sizeof (char *))); +} + +/* Allocate an array of strings with room for N members. */ +char ** +strvec_mcreate (n) + int n; +{ + return ((char **)malloc ((n) * sizeof (char *))); +} + +char ** +strvec_resize (array, nsize) + char **array; + int nsize; +{ + return ((char **)xrealloc (array, nsize * sizeof (char *))); +} + +char ** +strvec_mresize (array, nsize) + char **array; + int nsize; +{ + return ((char **)realloc (array, nsize * sizeof (char *))); +} + +/* Return the length of ARRAY, a NULL terminated array of char *. */ +int +strvec_len (array) + char **array; +{ + register int i; + + for (i = 0; array[i]; i++); + return (i); +} + +/* Free the contents of ARRAY, a NULL terminated array of char *. */ +void +strvec_flush (array) + char **array; +{ + register int i; + + if (array == 0) + return; + + for (i = 0; array[i]; i++) + free (array[i]); +} + +void +strvec_dispose (array) + char **array; +{ + if (array == 0) + return; + + strvec_flush (array); + free (array); +} + +int +strvec_remove (array, name) + char **array, *name; +{ + register int i, j; + char *x; + + if (array == 0) + return 0; + + for (i = 0; array[i]; i++) + if (STREQ (name, array[i])) + { + x = array[i]; + for (j = i; array[j]; j++) + array[j] = array[j + 1]; + free (x); + return 1; + } + return 0; +} + +/* Find NAME in ARRAY. Return the index of NAME, or -1 if not present. + ARRAY should be NULL terminated. */ +int +strvec_search (array, name) + char **array, *name; +{ + int i; + + for (i = 0; array[i]; i++) + if (STREQ (name, array[i])) + return (i); + + return (-1); +} + +/* Allocate and return a new copy of ARRAY and its contents. */ +char ** +strvec_copy (array) + char **array; +{ + register int i; + int len; + char **ret; + + len = strvec_len (array); + + ret = (char **)xmalloc ((len + 1) * sizeof (char *)); + for (i = 0; array[i]; i++) + ret[i] = savestring (array[i]); + ret[i] = (char *)NULL; + + return (ret); +} + +/* Comparison routine for use by qsort that conforms to the new Posix + requirements (http://austingroupbugs.net/view.php?id=1070). + + Perform a bytewise comparison if *S1 and *S2 collate equally. */ +int +strvec_posixcmp (s1, s2) + register char **s1, **s2; +{ + int result; + +#if defined (HAVE_STRCOLL) + result = strcoll (*s1, *s2); + if (result != 0) + return result; +#endif + + if ((result = **s1 - **s2) == 0) + result = strcmp (*s1, *s2); + + return (result); +} + +/* Comparison routine for use with qsort() on arrays of strings. Uses + strcoll(3) if available, otherwise it uses strcmp(3). */ +int +strvec_strcmp (s1, s2) + register char **s1, **s2; +{ +#if defined (HAVE_STRCOLL) + return (strcoll (*s1, *s2)); +#else /* !HAVE_STRCOLL */ + int result; + + if ((result = **s1 - **s2) == 0) + result = strcmp (*s1, *s2); + + return (result); +#endif /* !HAVE_STRCOLL */ +} + +/* Sort ARRAY, a null terminated array of pointers to strings. */ +void +strvec_sort (array, posix) + char **array; + int posix; +{ + if (posix) + qsort (array, strvec_len (array), sizeof (char *), (QSFUNC *)strvec_posixcmp); + else + qsort (array, strvec_len (array), sizeof (char *), (QSFUNC *)strvec_strcmp); +} + +/* Cons up a new array of words. The words are taken from LIST, + which is a WORD_LIST *. If ALLOC is true, everything is malloc'ed, + so you should free everything in this array when you are done. + The array is NULL terminated. If IP is non-null, it gets the + number of words in the returned array. STARTING_INDEX says where + to start filling in the returned array; it can be used to reserve + space at the beginning of the array. */ + +char ** +strvec_from_word_list (list, alloc, starting_index, ip) + WORD_LIST *list; + int alloc, starting_index, *ip; +{ + int count; + char **array; + + count = list_length (list); + array = (char **)xmalloc ((1 + count + starting_index) * sizeof (char *)); + + for (count = 0; count < starting_index; count++) + array[count] = (char *)NULL; + for (count = starting_index; list; count++, list = list->next) + array[count] = alloc ? savestring (list->word->word) : list->word->word; + array[count] = (char *)NULL; + + if (ip) + *ip = count; + return (array); +} + +/* Convert an array of strings into the form used internally by the shell. + ALLOC means to allocate new storage for each WORD_DESC in the returned + list rather than copy the values in ARRAY. STARTING_INDEX says where + in ARRAY to begin. */ + +WORD_LIST * +strvec_to_word_list (array, alloc, starting_index) + char **array; + int alloc, starting_index; +{ + WORD_LIST *list; + WORD_DESC *w; + int i, count; + + if (array == 0 || array[0] == 0) + return (WORD_LIST *)NULL; + + for (count = 0; array[count]; count++) + ; + + for (i = starting_index, list = (WORD_LIST *)NULL; i < count; i++) + { + w = make_bare_word (alloc ? array[i] : ""); + if (alloc == 0) + { + free (w->word); + w->word = array[i]; + } + list = make_word_list (w, list); + } + return (REVERSE_LIST (list, WORD_LIST *)); +} diff --git a/bash-5.1/lib/sh/strnlen.c b/bash-5.1/lib/sh/strnlen.c new file mode 100644 index 0000000000000000000000000000000000000000..10414d358424bf014d50700b55295f1c31c3290e --- /dev/null +++ b/bash-5.1/lib/sh/strnlen.c @@ -0,0 +1,49 @@ +/* strnlen - return length of passed string, with length limit */ + +/* Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if !defined (HAVE_STRNLEN) + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +/* Find the length of S, but scan at most MAXLEN characters. If no '\0' + terminator is found within the first MAXLEN characters, return MAXLEN. */ +size_t +strnlen (s, maxlen) + register const char *s; + size_t maxlen; +{ + register const char *e; + size_t n; + + for (e = s, n = 0; *e && n < maxlen; e++, n++) + ; + return n; +} +#endif diff --git a/bash-5.1/lib/sh/strpbrk.c b/bash-5.1/lib/sh/strpbrk.c new file mode 100644 index 0000000000000000000000000000000000000000..8cce8308ed30f0238745df28d098f2cca5a05e56 --- /dev/null +++ b/bash-5.1/lib/sh/strpbrk.c @@ -0,0 +1,49 @@ +/* strpbrk.c - locate multiple characters in a string */ + +/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@prep.ai.mit.edu. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if !defined (HAVE_STRPBRK) + +#include + +/* Find the first occurrence in S of any character in ACCEPT. */ +char * +strpbrk (s, accept) + register const char *s; + register const char *accept; +{ + while (*s != '\0') + { + const char *a = accept; + while (*a != '\0') + if (*a++ == *s) + return (char *) s; + ++s; + } + + return 0; +} +#endif diff --git a/bash-5.1/lib/sh/strstr.c b/bash-5.1/lib/sh/strstr.c new file mode 100644 index 0000000000000000000000000000000000000000..c43b05e379bce886902bc1b7537ce6daac396aa4 --- /dev/null +++ b/bash-5.1/lib/sh/strstr.c @@ -0,0 +1,125 @@ +/* strstr - find a substring within a string */ + +/* Copyright (C) 1994, 1999 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* + * My personal strstr() implementation that beats most other algorithms. + * Until someone tells me otherwise, I assume that this is the + * fastest implementation of strstr() in C. + * I deliberately chose not to comment it. You should have at least + * as much fun trying to understand it, as I had to write it :-). + * + * Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */ + +#if HAVE_CONFIG_H +# include +#endif + +#if defined _LIBC || defined HAVE_STRING_H +# include +#endif +#include + +typedef unsigned chartype; + +#undef strstr + +char * +strstr (const char *phaystack, const char *pneedle) +{ + register const unsigned char *haystack, *needle; + register chartype b, c; + + haystack = (const unsigned char *) phaystack; + needle = (const unsigned char *) pneedle; + + b = *needle; + if (b != '\0') + { + haystack--; /* possible ANSI violation */ + do + { + c = *++haystack; + if (c == '\0') + goto ret0; + } + while (c != b); + + c = *++needle; + if (c == '\0') + goto foundneedle; + ++needle; + goto jin; + + for (;;) + { + register chartype a; + register const unsigned char *rhaystack, *rneedle; + + do + { + a = *++haystack; + if (a == '\0') + goto ret0; + if (a == b) + break; + a = *++haystack; + if (a == '\0') + goto ret0; +shloop:; } + while (a != b); + +jin: a = *++haystack; + if (a == '\0') + goto ret0; + + if (a != c) + goto shloop; + + rhaystack = haystack-- + 1; + rneedle = needle; + a = *rneedle; + + if (*rhaystack == a) + do + { + if (a == '\0') + goto foundneedle; + ++rhaystack; + a = *++needle; + if (*rhaystack != a) + break; + if (a == '\0') + goto foundneedle; + ++rhaystack; + a = *++needle; + } + while (*rhaystack == a); + + needle = rneedle; /* took the register-poor approach */ + + if (a == '\0') + break; + } + } +foundneedle: + return (char*) haystack; +ret0: + return 0; +} diff --git a/bash-5.1/lib/sh/strtod.c b/bash-5.1/lib/sh/strtod.c new file mode 100644 index 0000000000000000000000000000000000000000..55e11540588b428fb8698f6b04c4c82a9af5cab4 --- /dev/null +++ b/bash-5.1/lib/sh/strtod.c @@ -0,0 +1,207 @@ +/* strtod.c - convert string to double-precision floating-point value. */ + +/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if HAVE_CONFIG_H +# include +#endif + +#ifndef HAVE_STRTOD + +#include +#ifndef errno +extern int errno; +#endif + +#include +#include + +#if HAVE_FLOAT_H +# include +#else +# define DBL_MAX 1.7976931348623159e+308 +# define DBL_MIN 2.2250738585072010e-308 +#endif + +#include + +#ifndef NULL +# define NULL 0 +#endif + +#ifndef HUGE_VAL +# define HUGE_VAL HUGE +#endif + +#ifndef locale_decpoint +extern int locale_decpoint PARAMS((void)); +#endif + +/* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the + character after the last one used in the number is put in *ENDPTR. */ +double +strtod (nptr, endptr) + const char *nptr; + char **endptr; +{ + register const char *s; + short sign; + + /* The number so far. */ + double num; + + int radixchar; + int got_dot; /* Found a decimal point. */ + int got_digit; /* Seen any digits. */ + + /* The exponent of the number. */ + long int exponent; + + if (nptr == NULL) + { + errno = EINVAL; + goto noconv; + } + + s = nptr; + + /* Eat whitespace. */ + while (ISSPACE ((unsigned char)*s)) + ++s; + + /* Get the sign. */ + sign = *s == '-' ? -1 : 1; + if (*s == '-' || *s == '+') + ++s; + + radixchar = locale_decpoint (); + num = 0.0; + got_dot = 0; + got_digit = 0; + exponent = 0; + for (;; ++s) + { + if (DIGIT (*s)) + { + got_digit = 1; + + /* Make sure that multiplication by 10 will not overflow. */ + if (num > DBL_MAX * 0.1) + /* The value of the digit doesn't matter, since we have already + gotten as many digits as can be represented in a `double'. + This doesn't necessarily mean the result will overflow. + The exponent may reduce it to within range. + + We just need to record that there was another + digit so that we can multiply by 10 later. */ + ++exponent; + else + num = (num * 10.0) + (*s - '0'); + + /* Keep track of the number of digits after the decimal point. + If we just divided by 10 here, we would lose precision. */ + if (got_dot) + --exponent; + } + else if (!got_dot && *s == radixchar) + /* Record that we have found the decimal point. */ + got_dot = 1; + else + /* Any other character terminates the number. */ + break; + } + + if (!got_digit) + goto noconv; + + if (TOLOWER ((unsigned char)*s) == 'e') + { + /* Get the exponent specified after the `e' or `E'. */ + int save = errno; + char *end; + long int exp; + + errno = 0; + ++s; + exp = strtol (s, &end, 10); + if (errno == ERANGE) + { + /* The exponent overflowed a `long int'. It is probably a safe + assumption that an exponent that cannot be represented by + a `long int' exceeds the limits of a `double'. */ + if (endptr != NULL) + *endptr = end; + if (exp < 0) + goto underflow; + else + goto overflow; + } + else if (end == s) + /* There was no exponent. Reset END to point to + the 'e' or 'E', so *ENDPTR will be set there. */ + end = (char *) s - 1; + errno = save; + s = end; + exponent += exp; + } + + if (endptr != NULL) + *endptr = (char *) s; + + if (num == 0.0) + return 0.0; + + /* Multiply NUM by 10 to the EXPONENT power, + checking for overflow and underflow. */ + + if (exponent < 0) + { + if (num < DBL_MIN * pow (10.0, (double) -exponent)) + goto underflow; + } + else if (exponent > 0) + { + if (num > DBL_MAX * pow (10.0, (double) -exponent)) + goto overflow; + } + + num *= pow (10.0, (double) exponent); + + return num * sign; + +overflow: + /* Return an overflow error. */ + errno = ERANGE; + return HUGE_VAL * sign; + +underflow: + /* Return an underflow error. */ + if (endptr != NULL) + *endptr = (char *) nptr; + errno = ERANGE; + return 0.0; + +noconv: + /* There was no number. */ + if (endptr != NULL) + *endptr = (char *) nptr; + return 0.0; +} + +#endif /* !HAVE_STRTOD */ diff --git a/bash-5.1/lib/sh/strtoimax.c b/bash-5.1/lib/sh/strtoimax.c new file mode 100644 index 0000000000000000000000000000000000000000..676e02ef0eed4ffdb5f65c3a27a98bd09b96f6eb --- /dev/null +++ b/bash-5.1/lib/sh/strtoimax.c @@ -0,0 +1,113 @@ +/* strtoimax - convert string representation of a number into an intmax_t value. */ + +/* Copyright 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Written by Paul Eggert. Modified by Chet Ramey for Bash. */ + +#if HAVE_CONFIG_H +# include +#endif + +#if HAVE_INTTYPES_H +# include +#endif + +#if HAVE_STDINT_H +# include +#endif + +#if HAVE_STDLIB_H +# include +#endif + +#include + +/* Verify a requirement at compile-time (unlike assert, which is runtime). */ +#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } + +#ifndef HAVE_DECL_STRTOL +"this configure-time declaration test was not run" +#endif +#if !HAVE_DECL_STRTOL +extern long strtol PARAMS((const char *, char **, int)); +#endif + +#ifndef HAVE_DECL_STRTOLL +"this configure-time declaration test was not run" +#endif +#if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG +extern long long strtoll PARAMS((const char *, char **, int)); +#endif + +#ifdef strtoimax +#undef strtoimax +#endif + +intmax_t +strtoimax (ptr, endptr, base) + const char *ptr; + char **endptr; + int base; +{ +#if HAVE_LONG_LONG + verify(size_is_that_of_long_or_long_long, + (sizeof (intmax_t) == sizeof (long) || + sizeof (intmax_t) == sizeof (long long))); + + if (sizeof (intmax_t) != sizeof (long)) + return (strtoll (ptr, endptr, base)); +#else + verify (size_is_that_of_long, sizeof (intmax_t) == sizeof (long)); +#endif + + return (strtol (ptr, endptr, base)); +} + +#ifdef TESTING +# include +int +main () +{ + char *p, *endptr; + intmax_t x; +#if HAVE_LONG_LONG + long long y; +#endif + long z; + + printf ("sizeof intmax_t: %d\n", sizeof (intmax_t)); + +#if HAVE_LONG_LONG + printf ("sizeof long long: %d\n", sizeof (long long)); +#endif + printf ("sizeof long: %d\n", sizeof (long)); + + x = strtoimax("42", &endptr, 10); +#if HAVE_LONG_LONG + y = strtoll("42", &endptr, 10); +#else + y = -1; +#endif + z = strtol("42", &endptr, 10); + + printf ("%lld %lld %ld\n", x, y, z); + + exit (0); +} +#endif diff --git a/bash-5.1/lib/sh/strtol.c b/bash-5.1/lib/sh/strtol.c new file mode 100644 index 0000000000000000000000000000000000000000..8aa7478806e4b14d7dd8d0df8ca03a8907a66d21 --- /dev/null +++ b/bash-5.1/lib/sh/strtol.c @@ -0,0 +1,259 @@ +/* strtol - convert string representation of a number into a long integer value. */ + +/* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_STRTOL) + +#include +#include + +#ifndef errno +extern int errno; +#endif + +#ifndef __set_errno +# define __set_errno(Val) errno = (Val) +#endif + +#ifdef HAVE_LIMITS_H +# include +#endif + +#include + +#include +#include + +#ifndef NULL +# define NULL 0 +#endif + +/* Nonzero if we are defining `strtoul' or `strtoull', operating on + unsigned integers. */ +#ifndef UNSIGNED +# define UNSIGNED 0 +# define INT LONG int +#else +# define INT unsigned LONG int +#endif + +#if UNSIGNED +# ifdef QUAD +# define strtol strtoull +# else +# define strtol strtoul +# endif +#else +# ifdef QUAD +# define strtol strtoll +# endif +#endif + +/* If QUAD is defined, we are defining `strtoll' or `strtoull', + operating on `long long ints. */ + +#ifdef QUAD +# define LONG long long +# define STRTOL_LONG_MIN LLONG_MIN +# define STRTOL_LONG_MAX LLONG_MAX +# define STRTOL_ULONG_MAX ULLONG_MAX +#else /* !QUAD */ +# define LONG long +# define STRTOL_LONG_MIN LONG_MIN +# define STRTOL_LONG_MAX LONG_MAX +# define STRTOL_ULONG_MAX ULONG_MAX +#endif + +/* Convert NPTR to an `unsigned long int' or `long int' in base BASE. + If BASE is 0 the base is determined by the presence of a leading + zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. + If BASE is < 2 or > 36, it is no longer reset to 10; EINVAL is returned. + If ENDPTR is not NULL, a pointer to the character after the last + one converted is stored in *ENDPTR. */ + +INT +strtol (nptr, endptr, base) + const char *nptr; + char **endptr; + int base; +{ + int negative; + register unsigned LONG int cutoff; + register unsigned int cutlim; + register unsigned LONG int i; + register const char *s; + register unsigned char c; + const char *save, *end; + int overflow; + + if (base < 0 || base == 1 || base > 36) + { + __set_errno (EINVAL); + return 0; + } + + save = s = nptr; + + /* Skip white space. */ + while (ISSPACE ((unsigned char)*s)) + ++s; + if (*s == '\0') + goto noconv; + + /* Check for a sign. */ + if (*s == '-' || *s == '+') + { + negative = (*s == '-'); + ++s; + } + else + negative = 0; + + /* Recognize number prefix and if BASE is zero, figure it out ourselves. */ + if (*s == '0') + { + if ((base == 0 || base == 16) && TOUPPER ((unsigned char) s[1]) == 'X') + { + s += 2; + base = 16; + } + else if (base == 0) + base = 8; + } + else if (base == 0) + base = 10; + + /* Save the pointer so we can check later if anything happened. */ + save = s; + + end = NULL; + + cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base; + cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base; + + overflow = 0; + i = 0; + c = *s; + if (sizeof (long int) != sizeof (LONG int)) + { + unsigned long int j = 0; + unsigned long int jmax = ULONG_MAX / base; + + for (;c != '\0'; c = *++s) + { + if (s == end) + break; + if (DIGIT (c)) + c -= '0'; + else if (ISALPHA (c)) + c = TOUPPER (c) - 'A' + 10; + else + break; + + if ((int) c >= base) + break; + /* Note that we never can have an overflow. */ + else if (j >= jmax) + { + /* We have an overflow. Now use the long representation. */ + i = (unsigned LONG int) j; + goto use_long; + } + else + j = j * (unsigned long int) base + c; + } + + i = (unsigned LONG int) j; + } + else + for (;c != '\0'; c = *++s) + { + if (s == end) + break; + if (DIGIT (c)) + c -= '0'; + else if (ISALPHA (c)) + c = TOUPPER (c) - 'A' + 10; + else + break; + if ((int) c >= base) + break; + /* Check for overflow. */ + if (i > cutoff || (i == cutoff && c > cutlim)) + overflow = 1; + else + { + use_long: + i *= (unsigned LONG int) base; + i += c; + } + } + + /* Check if anything actually happened. */ + if (s == save) + goto noconv; + + /* Store in ENDPTR the address of one character + past the last character we converted. */ + if (endptr != NULL) + *endptr = (char *) s; + +#if !UNSIGNED + /* Check for a value that is within the range of + `unsigned LONG int', but outside the range of `LONG int'. */ + if (overflow == 0 + && i > (negative + ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1 + : (unsigned LONG int) STRTOL_LONG_MAX)) + overflow = 1; +#endif + + if (overflow) + { + __set_errno (ERANGE); +#if UNSIGNED + return STRTOL_ULONG_MAX; +#else + return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX; +#endif + } + + /* Return the result of the appropriate sign. */ + return negative ? -i : i; + +noconv: + /* We must handle a special case here: the base is 0 or 16 and the + first two characters are '0' and 'x', but the rest are no + hexadecimal digits. This is no error case. We return 0 and + ENDPTR points to the `x`. */ + if (endptr != NULL) + { + if (save - nptr >= 2 && TOUPPER ((unsigned char) save[-1]) == 'X' && save[-2] == '0') + *endptr = (char *) &save[-1]; + else + /* There was no number to convert. */ + *endptr = (char *) nptr; + } + + return 0L; +} + +#endif /* !HAVE_STRTOL */ diff --git a/bash-5.1/lib/sh/strtoll.c b/bash-5.1/lib/sh/strtoll.c new file mode 100644 index 0000000000000000000000000000000000000000..f6060eefa44d0da4f675e54813069f8373eb257c --- /dev/null +++ b/bash-5.1/lib/sh/strtoll.c @@ -0,0 +1,30 @@ +/* strtoll - convert string representation of a number into a long long value. */ + +/* Copyright (C) 1997 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_LONG_LONG) && !defined (HAVE_STRTOLL) + +#define QUAD 1 +#undef HAVE_STRTOL + +#include "strtol.c" + +#endif /* HAVE_LONG_LONG && !HAVE_STRTOLL */ diff --git a/bash-5.1/lib/sh/strtoul.c b/bash-5.1/lib/sh/strtoul.c new file mode 100644 index 0000000000000000000000000000000000000000..cbaa48452fa437cb881cbbf8e48291a592a1a622 --- /dev/null +++ b/bash-5.1/lib/sh/strtoul.c @@ -0,0 +1,30 @@ +/* strtoul - convert string representation of a number into an unsigned long value. */ + +/* Copyright (C) 1997 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#ifndef HAVE_STRTOUL + +#define UNSIGNED 1 +#undef HAVE_STRTOL + +#include + +#endif /* !HAVE_STRTOUL */ diff --git a/bash-5.1/lib/sh/strtoull.c b/bash-5.1/lib/sh/strtoull.c new file mode 100644 index 0000000000000000000000000000000000000000..02ddebb902a2494b26ab90207661104876c8358f --- /dev/null +++ b/bash-5.1/lib/sh/strtoull.c @@ -0,0 +1,31 @@ +/* strtoull - convert string representation of a number into an unsigned long long value. */ + +/* Copyright (C) 1997 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_LONG_LONG) && !defined (HAVE_STRTOULL) + +#define QUAD 1 +#define UNSIGNED 1 +#undef HAVE_STRTOL + +#include "strtol.c" + +#endif /* HAVE_LONG_LONG && !HAVE_STRTOULL */ diff --git a/bash-5.1/lib/sh/strtoumax.c b/bash-5.1/lib/sh/strtoumax.c new file mode 100644 index 0000000000000000000000000000000000000000..0247e57bd96b2c630fe6074fd7f6b80ae231fbfb --- /dev/null +++ b/bash-5.1/lib/sh/strtoumax.c @@ -0,0 +1,113 @@ +/* strtoumax - convert string representation of a number into an uintmax_t value. */ + +/* Copyright 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Written by Paul Eggert. Modified by Chet Ramey for Bash. */ + +#if HAVE_CONFIG_H +# include +#endif + +#if HAVE_INTTYPES_H +# include +#endif + +#if HAVE_STDINT_H +# include +#endif + +#if HAVE_STDLIB_H +# include +#endif + +#include + +/* Verify a requirement at compile-time (unlike assert, which is runtime). */ +#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } + +#ifndef HAVE_DECL_STRTOUL +"this configure-time declaration test was not run" +#endif +#if !HAVE_DECL_STRTOUL +extern unsigned long strtoul PARAMS((const char *, char **, int)); +#endif + +#ifndef HAVE_DECL_STRTOULL +"this configure-time declaration test was not run" +#endif +#if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG +extern unsigned long long strtoull PARAMS((const char *, char **, int)); +#endif + +#ifdef strtoumax +#undef strtoumax +#endif + +uintmax_t +strtoumax (ptr, endptr, base) + const char *ptr; + char **endptr; + int base; +{ +#if HAVE_UNSIGNED_LONG_LONG + verify (size_is_that_of_unsigned_long_or_unsigned_long_long, + (sizeof (uintmax_t) == sizeof (unsigned long) || + sizeof (uintmax_t) == sizeof (unsigned long long))); + + if (sizeof (uintmax_t) != sizeof (unsigned long)) + return (strtoull (ptr, endptr, base)); +#else + verify (size_is_that_of_unsigned_long, sizeof (uintmax_t) == sizeof (unsigned long)); +#endif + + return (strtoul (ptr, endptr, base)); +} + +#ifdef TESTING +# include +int +main () +{ + char *p, *endptr; + uintmax_t x; +#if HAVE_UNSIGNED_LONG_LONG + unsigned long long y; +#endif + unsigned long z; + + printf ("sizeof uintmax_t: %d\n", sizeof (uintmax_t)); + +#if HAVE_UNSIGNED_LONG_LONG + printf ("sizeof unsigned long long: %d\n", sizeof (unsigned long long)); +#endif + printf ("sizeof unsigned long: %d\n", sizeof (unsigned long)); + + x = strtoumax("42", &endptr, 10); +#if HAVE_LONG_LONG + y = strtoull("42", &endptr, 10); +#else + y = 0; +#endif + z = strtoul("42", &endptr, 10); + + printf ("%llu %llu %lu\n", x, y, z); + + exit (0); +} +#endif diff --git a/bash-5.1/lib/sh/strtrans.c b/bash-5.1/lib/sh/strtrans.c new file mode 100644 index 0000000000000000000000000000000000000000..b2b1acca3348d18ba08bd43975f151f178c644cc --- /dev/null +++ b/bash-5.1/lib/sh/strtrans.c @@ -0,0 +1,400 @@ +/* strtrans.c - Translate and untranslate strings with ANSI-C escape sequences. */ + +/* Copyright (C) 2000-2015 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include + +#include "shell.h" + +#include "shmbchar.h" +#include "shmbutil.h" + +#ifdef ESC +#undef ESC +#endif +#define ESC '\033' /* ASCII */ + +/* Convert STRING by expanding the escape sequences specified by the + ANSI C standard. If SAWC is non-null, recognize `\c' and use that + as a string terminator. If we see \c, set *SAWC to 1 before + returning. LEN is the length of STRING. If (FLAGS&1) is non-zero, + that we're translating a string for `echo -e', and therefore should not + treat a single quote as a character that may be escaped with a backslash. + If (FLAGS&2) is non-zero, we're expanding for the parser and want to + quote CTLESC and CTLNUL with CTLESC. If (flags&4) is non-zero, we want + to remove the backslash before any unrecognized escape sequence. */ +char * +ansicstr (string, len, flags, sawc, rlen) + char *string; + int len, flags, *sawc, *rlen; +{ + int c, temp; + char *ret, *r, *s; + unsigned long v; + size_t clen; + int b, mb_cur_max; +#if defined (HANDLE_MULTIBYTE) + wchar_t wc; +#endif + + if (string == 0 || *string == '\0') + return ((char *)NULL); + + mb_cur_max = MB_CUR_MAX; +#if defined (HANDLE_MULTIBYTE) + temp = 4*len + 4; + if (temp < 12) + temp = 12; /* ensure enough for eventual u32cesc */ + ret = (char *)xmalloc (temp); +#else + ret = (char *)xmalloc (2*len + 1); /* 2*len for possible CTLESC */ +#endif + for (r = ret, s = string; s && *s; ) + { + c = *s++; + if (c != '\\' || *s == '\0') + { + clen = 1; +#if defined (HANDLE_MULTIBYTE) + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 0 && is_basic (c) == 0)) + { + clen = mbrtowc (&wc, s - 1, mb_cur_max, 0); + if (MB_INVALIDCH (clen)) + clen = 1; + } +#endif + *r++ = c; + for (--clen; clen > 0; clen--) + *r++ = *s++; + } + else + { + switch (c = *s++) + { +#if defined (__STDC__) + case 'a': c = '\a'; break; + case 'v': c = '\v'; break; +#else + case 'a': c = (int) 0x07; break; + case 'v': c = (int) 0x0B; break; +#endif + case 'b': c = '\b'; break; + case 'e': case 'E': /* ESC -- non-ANSI */ + c = ESC; break; + case 'f': c = '\f'; break; + case 'n': c = '\n'; break; + case 'r': c = '\r'; break; + case 't': c = '\t'; break; + case '1': case '2': case '3': + case '4': case '5': case '6': + case '7': +#if 1 + if (flags & 1) + { + *r++ = '\\'; + break; + } + /*FALLTHROUGH*/ +#endif + case '0': + /* If (FLAGS & 1), we're translating a string for echo -e (or + the equivalent xpg_echo option), so we obey the SUSv3/ + POSIX-2001 requirement and accept 0-3 octal digits after + a leading `0'. */ + temp = 2 + ((flags & 1) && (c == '0')); + for (c -= '0'; ISOCTAL (*s) && temp--; s++) + c = (c * 8) + OCTVALUE (*s); + c &= 0xFF; + break; + case 'x': /* Hex digit -- non-ANSI */ + if ((flags & 2) && *s == '{') + { + flags |= 16; /* internal flag value */ + s++; + } + /* Consume at least two hex characters */ + for (temp = 2, c = 0; ISXDIGIT ((unsigned char)*s) && temp--; s++) + c = (c * 16) + HEXVALUE (*s); + /* DGK says that after a `\x{' ksh93 consumes ISXDIGIT chars + until a non-xdigit or `}', so potentially more than two + chars are consumed. */ + if (flags & 16) + { + for ( ; ISXDIGIT ((unsigned char)*s); s++) + c = (c * 16) + HEXVALUE (*s); + flags &= ~16; + if (*s == '}') + s++; + } + /* \x followed by non-hex digits is passed through unchanged */ + else if (temp == 2) + { + *r++ = '\\'; + c = 'x'; + } + c &= 0xFF; + break; +#if defined (HANDLE_MULTIBYTE) + case 'u': + case 'U': + temp = (c == 'u') ? 4 : 8; /* \uNNNN \UNNNNNNNN */ + for (v = 0; ISXDIGIT ((unsigned char)*s) && temp--; s++) + v = (v * 16) + HEXVALUE (*s); + if (temp == ((c == 'u') ? 4 : 8)) + { + *r++ = '\\'; /* c remains unchanged */ + break; + } + else if (v <= 0x7f) /* <= 0x7f translates directly */ + { + c = v; + break; + } + else + { + temp = u32cconv (v, r); + r += temp; + continue; + } +#endif + case '\\': + break; + case '\'': case '"': case '?': + if (flags & 1) + *r++ = '\\'; + break; + case 'c': + if (sawc) + { + *sawc = 1; + *r = '\0'; + if (rlen) + *rlen = r - ret; + return ret; + } + else if ((flags & 1) == 0 && *s == 0) + ; /* pass \c through */ + else if ((flags & 1) == 0 && (c = *s)) + { + s++; + if ((flags & 2) && c == '\\' && c == *s) + s++; /* Posix requires $'\c\\' do backslash escaping */ + c = TOCTRL(c); + break; + } + /*FALLTHROUGH*/ + default: + if ((flags & 4) == 0) + *r++ = '\\'; + break; + } + if ((flags & 2) && (c == CTLESC || c == CTLNUL)) + *r++ = CTLESC; + *r++ = c; + } + } + *r = '\0'; + if (rlen) + *rlen = r - ret; + return ret; +} + +/* Take a string STR, possibly containing non-printing characters, and turn it + into a $'...' ANSI-C style quoted string. Returns a new string. */ +char * +ansic_quote (str, flags, rlen) + char *str; + int flags, *rlen; +{ + char *r, *ret, *s; + int l, rsize; + unsigned char c; + size_t clen; + int b; +#if defined (HANDLE_MULTIBYTE) + wchar_t wc; +#endif + + if (str == 0 || *str == 0) + return ((char *)0); + + l = strlen (str); + rsize = 4 * l + 4; + r = ret = (char *)xmalloc (rsize); + + *r++ = '$'; + *r++ = '\''; + + for (s = str; c = *s; s++) + { + b = l = 1; /* 1 == add backslash; 0 == no backslash */ + clen = 1; + + switch (c) + { + case ESC: c = 'E'; break; +#ifdef __STDC__ + case '\a': c = 'a'; break; + case '\v': c = 'v'; break; +#else + case 0x07: c = 'a'; break; + case 0x0b: c = 'v'; break; +#endif + + case '\b': c = 'b'; break; + case '\f': c = 'f'; break; + case '\n': c = 'n'; break; + case '\r': c = 'r'; break; + case '\t': c = 't'; break; + case '\\': + case '\'': + break; + default: +#if defined (HANDLE_MULTIBYTE) + b = is_basic (c); + /* XXX - clen comparison to 0 is dicey */ + if ((b == 0 && ((clen = mbrtowc (&wc, s, MB_CUR_MAX, 0)) < 0 || MB_INVALIDCH (clen) || iswprint (wc) == 0)) || + (b == 1 && ISPRINT (c) == 0)) +#else + if (ISPRINT (c) == 0) +#endif + { + *r++ = '\\'; + *r++ = TOCHAR ((c >> 6) & 07); + *r++ = TOCHAR ((c >> 3) & 07); + *r++ = TOCHAR (c & 07); + continue; + } + l = 0; + break; + } + if (b == 0 && clen == 0) + break; + + if (l) + *r++ = '\\'; + + if (clen == 1) + *r++ = c; + else + { + for (b = 0; b < (int)clen; b++) + *r++ = (unsigned char)s[b]; + s += clen - 1; /* -1 because of the increment above */ + } + } + + *r++ = '\''; + *r = '\0'; + if (rlen) + *rlen = r - ret; + return ret; +} + +#if defined (HANDLE_MULTIBYTE) +int +ansic_wshouldquote (string) + const char *string; +{ + const wchar_t *wcs; + wchar_t wcc; + wchar_t *wcstr = NULL; + size_t slen; + + slen = mbstowcs (wcstr, string, 0); + + if (slen == (size_t)-1) + return 1; + + wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (slen + 1)); + mbstowcs (wcstr, string, slen + 1); + + for (wcs = wcstr; wcc = *wcs; wcs++) + if (iswprint(wcc) == 0) + { + free (wcstr); + return 1; + } + + free (wcstr); + return 0; +} +#endif + +/* return 1 if we need to quote with $'...' because of non-printing chars. */ +int +ansic_shouldquote (string) + const char *string; +{ + const char *s; + unsigned char c; + + if (string == 0) + return 0; + + for (s = string; c = *s; s++) + { +#if defined (HANDLE_MULTIBYTE) + if (is_basic (c) == 0) + return (ansic_wshouldquote (s)); +#endif + if (ISPRINT (c) == 0) + return 1; + } + + return 0; +} + +/* $'...' ANSI-C expand the portion of STRING between START and END and + return the result. The result cannot be longer than the input string. */ +char * +ansiexpand (string, start, end, lenp) + char *string; + int start, end, *lenp; +{ + char *temp, *t; + int len, tlen; + + temp = (char *)xmalloc (end - start + 1); + for (tlen = 0, len = start; len < end; ) + temp[tlen++] = string[len++]; + temp[tlen] = '\0'; + + if (*temp) + { + t = ansicstr (temp, tlen, 2, (int *)NULL, lenp); + free (temp); + return (t); + } + else + { + if (lenp) + *lenp = 0; + return (temp); + } +} diff --git a/bash-5.1/lib/sh/times.c b/bash-5.1/lib/sh/times.c new file mode 100644 index 0000000000000000000000000000000000000000..2423078ab440a319c3d4cb8104373ad3612d1b62 --- /dev/null +++ b/bash-5.1/lib/sh/times.c @@ -0,0 +1,77 @@ +/* times.c - times(3) library function */ + +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_TIMES) + +#include +#include +#include + +#if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRUSAGE) +# include +#endif /* HAVE_SYS_RESOURCE_H && HAVE_GETRUSAGE */ + +extern long get_clk_tck PARAMS((void)); + +#define CONVTCK(r) (r.tv_sec * clk_tck + r.tv_usec / (1000000 / clk_tck)) + +clock_t +times(tms) + struct tms *tms; +{ + clock_t rv; + static long clk_tck = -1; + +#if defined (HAVE_GETRUSAGE) + struct timeval tv; + struct rusage ru; + + if (clk_tck == -1) + clk_tck = get_clk_tck(); + + if (getrusage(RUSAGE_SELF, &ru) < 0) + return ((clock_t)-1); + tms->tms_utime = CONVTCK(ru.ru_utime); + tms->tms_stime = CONVTCK(ru.ru_stime); + + if (getrusage(RUSAGE_CHILDREN, &ru) < 0) + return ((clock_t)-1); + tms->tms_cutime = CONVTCK(ru.ru_utime); + tms->tms_cstime = CONVTCK(ru.ru_stime); + + if (gettimeofday(&tv, NULL) < 0) + return ((clock_t)-1); + rv = (clock_t)(CONVTCK(tv)); +#else /* !HAVE_GETRUSAGE */ + if (clk_tck == -1) + clk_tck = get_clk_tck(); + + /* We can't do anything. */ + tms->tms_utime = tms->tms_stime = (clock_t)0; + tms->tms_cutime = tms->tms_cstime = (clock_t)0; + + rv = (clock_t)time((time_t *)0) * clk_tck; +# endif /* HAVE_GETRUSAGE */ + + return rv; +} +#endif /* !HAVE_TIMES */ diff --git a/bash-5.1/lib/sh/timeval.c b/bash-5.1/lib/sh/timeval.c new file mode 100644 index 0000000000000000000000000000000000000000..f2ca7624ad2bff8561d011d49ed7e2efa855d233 --- /dev/null +++ b/bash-5.1/lib/sh/timeval.c @@ -0,0 +1,179 @@ +/* timeval.c - functions to perform operations on struct timevals */ + +/* Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HAVE_TIMEVAL) + +#include +#include + +#include +#include + +#ifndef locale_decpoint +extern int locale_decpoint PARAMS((void)); +#endif + +#include + +struct timeval * +difftimeval (d, t1, t2) + struct timeval *d, *t1, *t2; +{ + d->tv_sec = t2->tv_sec - t1->tv_sec; + d->tv_usec = t2->tv_usec - t1->tv_usec; + if (d->tv_usec < 0) + { + d->tv_usec += 1000000; + d->tv_sec -= 1; + if (d->tv_sec < 0) /* ??? -- BSD/OS does this */ + { + d->tv_sec = 0; + d->tv_usec = 0; + } + } + return d; +} + +struct timeval * +addtimeval (d, t1, t2) + struct timeval *d, *t1, *t2; +{ + d->tv_sec = t1->tv_sec + t2->tv_sec; + d->tv_usec = t1->tv_usec + t2->tv_usec; + if (d->tv_usec >= 1000000) + { + d->tv_usec -= 1000000; + d->tv_sec += 1; + } + return d; +} + +struct timeval * +multimeval (d, m) + struct timeval *d; + int m; +{ + time_t t; + + t = d->tv_usec * m; + d->tv_sec = d->tv_sec * m + t / 1000000; + d->tv_usec = t % 1000000; + return d; +} + +struct timeval * +divtimeval (d, m) + struct timeval *d; + int m; +{ + time_t t; + + t = d->tv_sec; + d->tv_sec = t / m; + d->tv_usec = (d->tv_usec + 1000000 * (t % m)) / m; + return d; +} + +/* Do "cpu = ((user + sys) * 10000) / real;" with timevals. + Barely-tested code from Deven T. Corzine . */ +int +timeval_to_cpu (rt, ut, st) + struct timeval *rt, *ut, *st; /* real, user, sys */ +{ + struct timeval t1, t2; + register int i; + + addtimeval (&t1, ut, st); + t2.tv_sec = rt->tv_sec; + t2.tv_usec = rt->tv_usec; + + for (i = 0; i < 6; i++) + { + if ((t1.tv_sec > 99999999) || (t2.tv_sec > 99999999)) + break; + t1.tv_sec *= 10; + t1.tv_sec += t1.tv_usec / 100000; + t1.tv_usec *= 10; + t1.tv_usec %= 1000000; + t2.tv_sec *= 10; + t2.tv_sec += t2.tv_usec / 100000; + t2.tv_usec *= 10; + t2.tv_usec %= 1000000; + } + for (i = 0; i < 4; i++) + { + if (t1.tv_sec < 100000000) + t1.tv_sec *= 10; + else + t2.tv_sec /= 10; + } + + return ((t2.tv_sec == 0) ? 0 : t1.tv_sec / t2.tv_sec); +} + +/* Convert a pointer to a struct timeval to seconds and thousandths of a + second, returning the values in *SP and *SFP, respectively. This does + rounding on the fractional part, not just truncation to three places. */ +void +timeval_to_secs (tvp, sp, sfp) + struct timeval *tvp; + time_t *sp; + int *sfp; +{ + int rest; + + *sp = tvp->tv_sec; + + *sfp = tvp->tv_usec % 1000000; /* pretty much a no-op */ + rest = *sfp % 1000; + *sfp = (*sfp * 1000) / 1000000; + if (rest >= 500) + *sfp += 1; + + /* Sanity check */ + if (*sfp >= 1000) + { + *sp += 1; + *sfp -= 1000; + } +} + +/* Print the contents of a struct timeval * in a standard way to stdio + stream FP. */ +void +print_timeval (fp, tvp) + FILE *fp; + struct timeval *tvp; +{ + time_t timestamp; + long minutes; + int seconds, seconds_fraction; + + timeval_to_secs (tvp, ×tamp, &seconds_fraction); + + minutes = timestamp / 60; + seconds = timestamp % 60; + + fprintf (fp, "%ldm%d%c%03ds", minutes, seconds, locale_decpoint (), seconds_fraction); +} + +#endif /* HAVE_TIMEVAL */ diff --git a/bash-5.1/lib/sh/tmpfile.c b/bash-5.1/lib/sh/tmpfile.c new file mode 100644 index 0000000000000000000000000000000000000000..ef8b067bec7d4896c2ae6a86e9b9ed6b65ce125f --- /dev/null +++ b/bash-5.1/lib/sh/tmpfile.c @@ -0,0 +1,311 @@ +/* + * tmpfile.c - functions to create and safely open temp files for the shell. + */ + +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#include +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include +#include + +#include + +#ifndef errno +extern int errno; +#endif + +#define BASEOPENFLAGS (O_CREAT | O_TRUNC | O_EXCL | O_BINARY) + +#define DEFAULT_TMPDIR "." /* bogus default, should be changed */ +#define DEFAULT_NAMEROOT "shtmp" + +/* Use ANSI-C rand() interface if random(3) is not available */ +#if !HAVE_RANDOM +#define random() rand() +#endif + +extern pid_t dollar_dollar_pid; + +static char *get_sys_tmpdir PARAMS((void)); +static char *get_tmpdir PARAMS((int)); + +static char *sys_tmpdir = (char *)NULL; +static int ntmpfiles; +static int tmpnamelen = -1; +static unsigned long filenum = 1L; + +static char * +get_sys_tmpdir () +{ + if (sys_tmpdir) + return sys_tmpdir; + +#ifdef P_tmpdir + sys_tmpdir = P_tmpdir; + if (file_iswdir (sys_tmpdir)) + return sys_tmpdir; +#endif + + sys_tmpdir = "/tmp"; + if (file_iswdir (sys_tmpdir)) + return sys_tmpdir; + + sys_tmpdir = "/var/tmp"; + if (file_iswdir (sys_tmpdir)) + return sys_tmpdir; + + sys_tmpdir = "/usr/tmp"; + if (file_iswdir (sys_tmpdir)) + return sys_tmpdir; + + sys_tmpdir = DEFAULT_TMPDIR; + + return sys_tmpdir; +} + +static char * +get_tmpdir (flags) + int flags; +{ + char *tdir; + + tdir = (flags & MT_USETMPDIR) ? get_string_value ("TMPDIR") : (char *)NULL; + if (tdir && (file_iswdir (tdir) == 0 || strlen (tdir) > PATH_MAX)) + tdir = 0; + + if (tdir == 0) + tdir = get_sys_tmpdir (); + +#if defined (HAVE_PATHCONF) && defined (_PC_NAME_MAX) + if (tmpnamelen == -1) + tmpnamelen = pathconf (tdir, _PC_NAME_MAX); +#else + tmpnamelen = 0; +#endif + + return tdir; +} + +static void +sh_seedrand () +{ +#if HAVE_RANDOM + int d; + static int seeded = 0; + if (seeded == 0) + { + struct timeval tv; + + gettimeofday (&tv, NULL); + srandom (tv.tv_sec ^ tv.tv_usec ^ (getpid () << 16) ^ (uintptr_t)&d); + seeded = 1; + } +#endif +} + +char * +sh_mktmpname (nameroot, flags) + char *nameroot; + int flags; +{ + char *filename, *tdir, *lroot; + struct stat sb; + int r, tdlen; + static int seeded = 0; + + filename = (char *)xmalloc (PATH_MAX + 1); + tdir = get_tmpdir (flags); + tdlen = strlen (tdir); + + lroot = nameroot ? nameroot : DEFAULT_NAMEROOT; + if (nameroot == 0) + flags &= ~MT_TEMPLATE; + + if ((flags & MT_TEMPLATE) && strlen (nameroot) > PATH_MAX) + flags &= ~MT_TEMPLATE; + +#ifdef USE_MKTEMP + if (flags & MT_TEMPLATE) + strcpy (filename, nameroot); + else + sprintf (filename, "%s/%s.XXXXXX", tdir, lroot); + if (mktemp (filename) == 0) + { + free (filename); + filename = NULL; + } +#else /* !USE_MKTEMP */ + sh_seedrand (); + while (1) + { + filenum = (filenum << 1) ^ + (unsigned long) time ((time_t *)0) ^ + (unsigned long) dollar_dollar_pid ^ + (unsigned long) ((flags & MT_USERANDOM) ? random () : ntmpfiles++); + sprintf (filename, "%s/%s-%lu", tdir, lroot, filenum); + if (tmpnamelen > 0 && tmpnamelen < 32) + filename[tdlen + 1 + tmpnamelen] = '\0'; +# ifdef HAVE_LSTAT + r = lstat (filename, &sb); +# else + r = stat (filename, &sb); +# endif + if (r < 0 && errno == ENOENT) + break; + } +#endif /* !USE_MKTEMP */ + + return filename; +} + +int +sh_mktmpfd (nameroot, flags, namep) + char *nameroot; + int flags; + char **namep; +{ + char *filename, *tdir, *lroot; + int fd, tdlen; + + filename = (char *)xmalloc (PATH_MAX + 1); + tdir = get_tmpdir (flags); + tdlen = strlen (tdir); + + lroot = nameroot ? nameroot : DEFAULT_NAMEROOT; + if (nameroot == 0) + flags &= ~MT_TEMPLATE; + + if ((flags & MT_TEMPLATE) && strlen (nameroot) > PATH_MAX) + flags &= ~MT_TEMPLATE; + +#ifdef USE_MKSTEMP + if (flags & MT_TEMPLATE) + strcpy (filename, nameroot); + else + sprintf (filename, "%s/%s.XXXXXX", tdir, lroot); + fd = mkstemp (filename); + if (fd < 0 || namep == 0) + { + free (filename); + filename = NULL; + } + if (namep) + *namep = filename; + return fd; +#else /* !USE_MKSTEMP */ + sh_seedrand (); + do + { + filenum = (filenum << 1) ^ + (unsigned long) time ((time_t *)0) ^ + (unsigned long) dollar_dollar_pid ^ + (unsigned long) ((flags & MT_USERANDOM) ? random () : ntmpfiles++); + sprintf (filename, "%s/%s-%lu", tdir, lroot, filenum); + if (tmpnamelen > 0 && tmpnamelen < 32) + filename[tdlen + 1 + tmpnamelen] = '\0'; + fd = open (filename, BASEOPENFLAGS | ((flags & MT_READWRITE) ? O_RDWR : O_WRONLY), 0600); + } + while (fd < 0 && errno == EEXIST); + + if (namep) + *namep = filename; + else + free (filename); + + return fd; +#endif /* !USE_MKSTEMP */ +} + +FILE * +sh_mktmpfp (nameroot, flags, namep) + char *nameroot; + int flags; + char **namep; +{ + int fd; + FILE *fp; + + fd = sh_mktmpfd (nameroot, flags, namep); + if (fd < 0) + return ((FILE *)NULL); + fp = fdopen (fd, (flags & MT_READWRITE) ? "w+" : "w"); + if (fp == 0) + close (fd); + return fp; +} + +char * +sh_mktmpdir (nameroot, flags) + char *nameroot; + int flags; +{ + char *filename, *tdir, *lroot, *dirname; + int fd, tdlen; + +#ifdef USE_MKDTEMP + filename = (char *)xmalloc (PATH_MAX + 1); + tdir = get_tmpdir (flags); + tdlen = strlen (tdir); + + lroot = nameroot ? nameroot : DEFAULT_NAMEROOT; + if (nameroot == 0) + flags &= ~MT_TEMPLATE; + + if ((flags & MT_TEMPLATE) && strlen (nameroot) > PATH_MAX) + flags &= ~MT_TEMPLATE; + + if (flags & MT_TEMPLATE) + strcpy (filename, nameroot); + else + sprintf (filename, "%s/%s.XXXXXX", tdir, lroot); + dirname = mkdtemp (filename); + if (dirname == 0) + { + free (filename); + filename = NULL; + } + return dirname; +#else /* !USE_MKDTEMP */ + filename = (char *)NULL; + do + { + filename = sh_mktmpname (nameroot, flags); + fd = mkdir (filename, 0700); + if (fd == 0) + break; + free (filename); + filename = (char *)NULL; + } + while (fd < 0 && errno == EEXIST); + + return (filename); +#endif /* !USE_MKDTEMP */ +} diff --git a/bash-5.1/lib/sh/uconvert.c b/bash-5.1/lib/sh/uconvert.c new file mode 100644 index 0000000000000000000000000000000000000000..457552eb43611f123557be257596c01bbfa8aebf --- /dev/null +++ b/bash-5.1/lib/sh/uconvert.c @@ -0,0 +1,124 @@ +/* uconvert - convert string representations of decimal numbers into whole + number/fractional value pairs. */ + +/* Copyright (C) 2008,2009,2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#include "posixtime.h" + +#if defined (HAVE_UNISTD_H) +#include +#endif + +#include +#include "chartypes.h" + +#include "shell.h" +#include "builtins.h" + +#define DECIMAL '.' /* XXX - should use locale */ + +#define RETURN(x) \ +do { \ + if (ip) *ip = ipart * mult; \ + if (up) *up = upart; \ + if (ep) *ep = p; \ + return (x); \ +} while (0) + +/* + * An incredibly simplistic floating point converter. + */ +static int multiplier[7] = { 1, 100000, 10000, 1000, 100, 10, 1 }; + +/* Take a decimal number int-part[.[micro-part]] and convert it to the whole + and fractional portions. The fractional portion is returned in + millionths (micro); callers are responsible for multiplying appropriately. + EP, if non-null, gets the address of the character where conversion stops. + Return 1 if value converted; 0 if invalid integer for either whole or + fractional parts. */ +int +uconvert(s, ip, up, ep) + char *s; + long *ip, *up; + char **ep; +{ + int n, mult; + long ipart, upart; + char *p; + + ipart = upart = 0; + mult = 1; + + if (s && (*s == '-' || *s == '+')) + { + mult = (*s == '-') ? -1 : 1; + p = s + 1; + } + else + p = s; + + for ( ; p && *p; p++) + { + if (*p == DECIMAL) /* decimal point */ + break; + if (DIGIT(*p) == 0) + RETURN(0); + ipart = (ipart * 10) + (*p - '0'); + } + + if (p == 0 || *p == 0) /* callers ensure p can never be 0; this is to shut up clang */ + RETURN(1); + + if (*p == DECIMAL) + p++; + + /* Look for up to six digits past a decimal point. */ + for (n = 0; n < 6 && p[n]; n++) + { + if (DIGIT(p[n]) == 0) + { + if (ep) + { + upart *= multiplier[n]; + p += n; /* To set EP */ + } + RETURN(0); + } + upart = (upart * 10) + (p[n] - '0'); + } + + /* Now convert to millionths */ + upart *= multiplier[n]; + + if (n == 6 && p[6] >= '5' && p[6] <= '9') + upart++; /* round up 1 */ + + if (ep) + { + p += n; + while (DIGIT(*p)) + p++; + } + + RETURN(1); +} diff --git a/bash-5.1/lib/sh/ufuncs.c b/bash-5.1/lib/sh/ufuncs.c new file mode 100644 index 0000000000000000000000000000000000000000..4dc4853b10e4392f7f1dd2c39e5339ad16f71330 --- /dev/null +++ b/bash-5.1/lib/sh/ufuncs.c @@ -0,0 +1,140 @@ +/* ufuncs - sleep and alarm functions that understand fractional values */ + +/* Copyright (C) 2008,2009-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#include "posixtime.h" + +#if defined (HAVE_UNISTD_H) +#include +#endif + +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if defined (HAVE_SELECT) +# include "posixselect.h" +# include "quit.h" +# include "trap.h" +# include "stat-time.h" +#endif + +/* A version of `alarm' using setitimer if it's available. */ + +#if defined (HAVE_SETITIMER) +unsigned int +falarm(secs, usecs) + unsigned int secs, usecs; +{ + struct itimerval it, oit; + + it.it_interval.tv_sec = 0; + it.it_interval.tv_usec = 0; + + it.it_value.tv_sec = secs; + it.it_value.tv_usec = usecs; + + if (setitimer(ITIMER_REAL, &it, &oit) < 0) + return (-1); /* XXX will be converted to unsigned */ + + /* Backwards compatibility with alarm(3) */ + if (oit.it_value.tv_usec) + oit.it_value.tv_sec++; + return (oit.it_value.tv_sec); +} +#else +int +falarm (secs, usecs) + unsigned int secs, usecs; +{ + if (secs == 0 && usecs == 0) + return (alarm (0)); + + if (secs == 0 || usecs >= 500000) + { + secs++; + usecs = 0; + } + return (alarm (secs)); +} +#endif /* !HAVE_SETITIMER */ + +/* A version of sleep using fractional seconds and select. I'd like to use + `usleep', but it's already taken */ + +#if defined (HAVE_TIMEVAL) && (defined (HAVE_SELECT) || defined (HAVE_PSELECT)) +int +fsleep(sec, usec) + unsigned int sec, usec; +{ + int e, r; + sigset_t blocked_sigs, prevmask; +#if defined (HAVE_PSELECT) + struct timespec ts; +#else + struct timeval tv; +#endif + + sigemptyset (&blocked_sigs); +# if defined (SIGCHLD) + sigaddset (&blocked_sigs, SIGCHLD); +# endif + +#if defined (HAVE_PSELECT) + ts.tv_sec = sec; + ts.tv_nsec = usec * 1000; +#else + sigemptyset (&prevmask); + tv.tv_sec = sec; + tv.tv_usec = usec; +#endif /* !HAVE_PSELECT */ + + do + { +#if defined (HAVE_PSELECT) + r = pselect(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &ts, &blocked_sigs); +#else + sigprocmask (SIG_SETMASK, &blocked_sigs, &prevmask); + r = select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv); + sigprocmask (SIG_SETMASK, &prevmask, NULL); +#endif + e = errno; + if (r < 0 && errno == EINTR) + return -1; /* caller will handle */ + errno = e; + } + while (r < 0 && errno == EINTR); + + return r; +} +#else /* !HAVE_TIMEVAL || !HAVE_SELECT */ +int +fsleep(sec, usec) + long sec, usec; +{ + if (usec >= 500000) /* round */ + sec++; + return (sleep(sec)); +} +#endif /* !HAVE_TIMEVAL || !HAVE_SELECT */ diff --git a/bash-5.1/lib/sh/unicode.c b/bash-5.1/lib/sh/unicode.c new file mode 100644 index 0000000000000000000000000000000000000000..d95d1e25f282d961ed8a3736cc775e114219a9b1 --- /dev/null +++ b/bash-5.1/lib/sh/unicode.c @@ -0,0 +1,339 @@ +/* unicode.c - functions to convert unicode characters */ + +/* Copyright (C) 2010-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HANDLE_MULTIBYTE) + +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include + +#if HAVE_ICONV +# include +#endif + +#include + +#ifndef USHORT_MAX +# ifdef USHRT_MAX +# define USHORT_MAX USHRT_MAX +# else +# define USHORT_MAX ((unsigned short) ~(unsigned short)0) +# endif +#endif + +#if !defined (STREQ) +# define STREQ(a, b) ((a)[0] == (b)[0] && strcmp ((a), (b)) == 0) +#endif /* !STREQ */ + +#if defined (HAVE_LOCALE_CHARSET) +extern const char *locale_charset PARAMS((void)); +#else +extern char *get_locale_var PARAMS((char *)); +#endif + +extern int locale_utf8locale; + +static int u32init = 0; +static int utf8locale = 0; +#if defined (HAVE_ICONV) +static iconv_t localconv; +#endif + +#ifndef HAVE_LOCALE_CHARSET +static char charsetbuf[40]; + +static char * +stub_charset () +{ + char *locale, *s, *t; + + locale = get_locale_var ("LC_CTYPE"); + if (locale == 0 || *locale == 0) + { + strcpy (charsetbuf, "ASCII"); + return charsetbuf; + } + s = strrchr (locale, '.'); + if (s) + { + strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1); + charsetbuf[sizeof (charsetbuf) - 1] = '\0'; + t = strchr (charsetbuf, '@'); + if (t) + *t = 0; + return charsetbuf; + } + strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1); + charsetbuf[sizeof (charsetbuf) - 1] = '\0'; + return charsetbuf; +} +#endif + +void +u32reset () +{ +#if defined (HAVE_ICONV) + if (u32init && localconv != (iconv_t)-1) + { + iconv_close (localconv); + localconv = (iconv_t)-1; + } +#endif + u32init = 0; + utf8locale = 0; +} + +/* u32toascii ? */ +int +u32tochar (x, s) + unsigned long x; + char *s; +{ + int l; + + l = (x <= UCHAR_MAX) ? 1 : ((x <= USHORT_MAX) ? 2 : 4); + + if (x <= UCHAR_MAX) + s[0] = x & 0xFF; + else if (x <= USHORT_MAX) /* assume unsigned short = 16 bits */ + { + s[0] = (x >> 8) & 0xFF; + s[1] = x & 0xFF; + } + else + { + s[0] = (x >> 24) & 0xFF; + s[1] = (x >> 16) & 0xFF; + s[2] = (x >> 8) & 0xFF; + s[3] = x & 0xFF; + } + s[l] = '\0'; + return l; +} + +int +u32tocesc (wc, s) + u_bits32_t wc; + char *s; +{ + int l; + + if (wc < 0x10000) + l = sprintf (s, "\\u%04X", wc); + else + l = sprintf (s, "\\u%08X", wc); + return l; +} + +/* Convert unsigned 32-bit int to utf-8 character string */ +int +u32toutf8 (wc, s) + u_bits32_t wc; + char *s; +{ + int l; + + if (wc < 0x0080) + { + s[0] = (char)wc; + l = 1; + } + else if (wc < 0x0800) + { + s[0] = (wc >> 6) | 0xc0; + s[1] = (wc & 0x3f) | 0x80; + l = 2; + } + else if (wc < 0x10000) + { + /* Technically, we could return 0 here if 0xd800 <= wc <= 0x0dfff */ + s[0] = (wc >> 12) | 0xe0; + s[1] = ((wc >> 6) & 0x3f) | 0x80; + s[2] = (wc & 0x3f) | 0x80; + l = 3; + } + else if (wc < 0x200000) + { + s[0] = (wc >> 18) | 0xf0; + s[1] = ((wc >> 12) & 0x3f) | 0x80; + s[2] = ((wc >> 6) & 0x3f) | 0x80; + s[3] = (wc & 0x3f) | 0x80; + l = 4; + } + /* Strictly speaking, UTF-8 doesn't have characters longer than 4 bytes */ + else if (wc < 0x04000000) + { + s[0] = (wc >> 24) | 0xf8; + s[1] = ((wc >> 18) & 0x3f) | 0x80; + s[2] = ((wc >> 12) & 0x3f) | 0x80; + s[3] = ((wc >> 6) & 0x3f) | 0x80; + s[4] = (wc & 0x3f) | 0x80; + l = 5; + } + else if (wc < 0x080000000) + { + s[0] = (wc >> 30) | 0xfc; + s[1] = ((wc >> 24) & 0x3f) | 0x80; + s[2] = ((wc >> 18) & 0x3f) | 0x80; + s[3] = ((wc >> 12) & 0x3f) | 0x80; + s[4] = ((wc >> 6) & 0x3f) | 0x80; + s[5] = (wc & 0x3f) | 0x80; + l = 6; + } + else + l = 0; + + s[l] = '\0'; + return l; +} + +/* Convert a 32-bit unsigned int (unicode) to a UTF-16 string. Rarely used, + only if sizeof(wchar_t) == 2. */ +int +u32toutf16 (c, s) + u_bits32_t c; + wchar_t *s; +{ + int l; + + l = 0; + if (c < 0x0d800 || (c >= 0x0e000 && c <= 0x0ffff)) + { + s[0] = (wchar_t) (c & 0xFFFF); + l = 1; + } + else if (c >= 0x10000 && c <= 0x010ffff) + { + c -= 0x010000; + s[0] = (wchar_t)((c >> 10) + 0xd800); + s[1] = (wchar_t)((c & 0x3ff) + 0xdc00); + l = 2; + } + s[l] = 0; + return l; +} + +/* convert a single unicode-32 character into a multibyte string and put the + result in S, which must be large enough (at least max(10,MB_LEN_MAX) bytes) */ +int +u32cconv (c, s) + unsigned long c; + char *s; +{ + wchar_t wc; + wchar_t ws[3]; + int n; +#if HAVE_ICONV + const char *charset; + char obuf[25], *optr; + size_t obytesleft; + const char *iptr; + size_t sn; +#endif + +#if __STDC_ISO_10646__ + wc = c; + if (sizeof (wchar_t) == 4 && c <= 0x7fffffff) + n = wctomb (s, wc); + else if (sizeof (wchar_t) == 2 && c <= 0x10ffff && u32toutf16 (c, ws)) + n = wcstombs (s, ws, MB_LEN_MAX); + else + n = -1; + if (n != -1) + return n; +#endif + +#if HAVE_ICONV + /* this is mostly from coreutils-8.5/lib/unicodeio.c */ + if (u32init == 0) + { + utf8locale = locale_utf8locale; + localconv = (iconv_t)-1; + if (utf8locale == 0) + { +#if HAVE_LOCALE_CHARSET + charset = locale_charset (); +#elif HAVE_NL_LANGINFO + charset = nl_langinfo (CODESET); +#else + charset = stub_charset (); +#endif + localconv = iconv_open (charset, "UTF-8"); + if (localconv == (iconv_t)-1) + /* We assume ASCII when presented with an unknown encoding. */ + localconv = iconv_open ("ASCII", "UTF-8"); + } + u32init = 1; + } + + /* NL_LANGINFO and locale_charset used when setting locale_utf8locale */ + + /* If we have a UTF-8 locale, convert to UTF-8 and return converted value. */ + n = u32toutf8 (c, s); + if (utf8locale) + return n; + + /* If the conversion is not supported, even the ASCII requested above, we + bail now. Currently we return the UTF-8 conversion. We could return + u32tocesc(). */ + if (localconv == (iconv_t)-1) + return n; + + optr = obuf; + obytesleft = sizeof (obuf); + iptr = s; + sn = n; + + iconv (localconv, NULL, NULL, NULL, NULL); + + if (iconv (localconv, (ICONV_CONST char **)&iptr, &sn, &optr, &obytesleft) == (size_t)-1) + { + /* You get ISO C99 escape sequences if iconv fails */ + n = u32tocesc (c, s); + return n; + } + + *optr = '\0'; + + /* number of chars to be copied is optr - obuf if we want to do bounds + checking */ + strcpy (s, obuf); + return (optr - obuf); +#endif /* HAVE_ICONV */ + + if (locale_utf8locale) + n = u32toutf8 (c, s); + else + n = u32tocesc (c, s); /* fallback is ISO C99 escape sequences */ + return n; +} +#else +void +u32reset () +{ +} +#endif /* HANDLE_MULTIBYTE */ diff --git a/bash-5.1/lib/sh/utf8.c b/bash-5.1/lib/sh/utf8.c new file mode 100644 index 0000000000000000000000000000000000000000..fed252264b261ebc7e6cbc93d7ef608e4bc7a131 --- /dev/null +++ b/bash-5.1/lib/sh/utf8.c @@ -0,0 +1,196 @@ +/* utf8.c - UTF-8 character handling functions */ + +/* Copyright (C) 2018 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#ifdef HAVE_STDLIB_H +# include +#endif + +#include "bashansi.h" +#include "shmbutil.h" + +extern int locale_mb_cur_max; +extern int locale_utf8locale; + +#if defined (HANDLE_MULTIBYTE) + +char * +utf8_mbschr (s, c) + const char *s; + int c; +{ + return strchr (s, c); /* for now */ +} + +int +utf8_mbscmp (s1, s2) + const char *s1, *s2; +{ + /* Use the fact that the UTF-8 encoding preserves lexicographic order. */ + return strcmp (s1, s2); +} + +char * +utf8_mbsmbchar (str) + const char *str; +{ + register char *s; + + for (s = (char *)str; *s; s++) + if ((*s & 0xc0) == 0x80) + return s; + return (0); +} + +int +utf8_mbsnlen(src, srclen, maxlen) + const char *src; + size_t srclen; + int maxlen; +{ + register int sind, count; + + for (sind = count = 0; src[sind] && sind <= maxlen; sind++) + { + if ((src[sind] & 0xc0) != 0x80) + count++; + } + return (count); +} + +/* Adapted from GNU gnulib. Handles UTF-8 characters up to 4 bytes long */ +int +utf8_mblen (s, n) + const char *s; + size_t n; +{ + unsigned char c, c1, c2, c3; + + if (s == 0) + return (0); /* no shift states */ + if (n <= 0) + return (-1); + + c = (unsigned char)*s; + if (c < 0x80) + return (c != 0); + if (c >= 0xc2) + { + c1 = (unsigned char)s[1]; + if (c < 0xe0) + { + if (n == 1) + return -2; + + /* + * c c1 + * + * U+0080..U+07FF C2..DF 80..BF + */ + + if (n >= 2 && (c1 ^ 0x80) < 0x40) /* 0x80..0xbf */ + return 2; + } + else if (c < 0xf0) + { + if (n == 1) + return -2; + + /* + * c c1 c2 + * + * U+0800..U+0FFF E0 A0..BF 80..BF + * U+1000..U+CFFF E1..EC 80..BF 80..BF + * U+D000..U+D7FF ED 80..9F 80..BF + * U+E000..U+FFFF EE..EF 80..BF 80..BF + */ + + if ((c1 ^ 0x80) < 0x40 + && (c >= 0xe1 || c1 >= 0xa0) + && (c != 0xed || c1 < 0xa0)) + { + if (n == 2) + return -2; /* incomplete */ + + c2 = (unsigned char)s[2]; + if ((c2 ^ 0x80) < 0x40) + return 3; + } + } + else if (c <= 0xf4) + { + if (n == 1) + return -2; + + /* + * c c1 c2 c3 + * + * U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + * U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + * U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + */ + if (((c1 ^ 0x80) < 0x40) + && (c >= 0xf1 || c1 >= 0x90) + && (c < 0xf4 || (c == 0xf4 && c1 < 0x90))) + { + if (n == 2) + return -2; /* incomplete */ + + c2 = (unsigned char)s[2]; + if ((c2 ^ 0x80) < 0x40) + { + if (n == 3) + return -2; + + c3 = (unsigned char)s[3]; + if ((c3 ^ 0x80) < 0x40) + return 4; + } + } + } + } + /* invalid or incomplete multibyte character */ + return -1; +} + +/* We can optimize this if we know the locale is UTF-8, but needs to handle + malformed byte sequences. */ +size_t +utf8_mbstrlen(s) + const char *s; +{ + size_t clen, nc; + int mb_cur_max; + + nc = 0; + mb_cur_max = MB_CUR_MAX; + while (*s && (clen = (size_t)utf8_mblen(s, mb_cur_max)) != 0) + { + if (MB_INVALIDCH(clen)) + clen = 1; /* assume single byte */ + + s += clen; + nc++; + } + return nc; +} + +#endif diff --git a/bash-5.1/lib/sh/vprint.c b/bash-5.1/lib/sh/vprint.c new file mode 100644 index 0000000000000000000000000000000000000000..567fba3849141cc418fc29d837706baa708c0429 --- /dev/null +++ b/bash-5.1/lib/sh/vprint.c @@ -0,0 +1,85 @@ +/* vprint.c -- v[fs]printf() for 4.[23] BSD systems. */ + +/* Copyright (C) 1987,1989 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (USE_VFPRINTF_EMULATION) + +#include + +#if !defined (NULL) +# if defined (__STDC__) +# define NULL ((void *)0) +# else +# define NULL 0x0 +# endif /* __STDC__ */ +#endif /* !NULL */ + +/* + * Beware! Don't trust the value returned by either of these functions; it + * seems that pre-4.3-tahoe implementations of _doprnt () return the first + * argument, i.e. a char *. + */ +#include + +int +vfprintf (iop, fmt, ap) + FILE *iop; + char *fmt; + va_list ap; +{ + int len; + char localbuf[BUFSIZ]; + + if (iop->_flag & _IONBF) + { + iop->_flag &= ~_IONBF; + iop->_ptr = iop->_base = localbuf; + len = _doprnt (fmt, ap, iop); + (void) fflush (iop); + iop->_flag |= _IONBF; + iop->_base = NULL; + iop->_bufsiz = 0; + iop->_cnt = 0; + } + else + len = _doprnt (fmt, ap, iop); + return (ferror (iop) ? EOF : len); +} + +/* + * Ditto for vsprintf + */ +int +vsprintf (str, fmt, ap) + char *str, *fmt; + va_list ap; +{ + FILE f; + int len; + + f._flag = _IOWRT|_IOSTRG; + f._ptr = str; + f._cnt = 32767; + len = _doprnt (fmt, ap, &f); + *f._ptr = 0; + return (len); +} +#endif /* USE_VFPRINTF_EMULATION */ diff --git a/bash-5.1/lib/sh/wcsdup.c b/bash-5.1/lib/sh/wcsdup.c new file mode 100644 index 0000000000000000000000000000000000000000..62a3c8641edb1de4d2950adc818de4aec7d33438 --- /dev/null +++ b/bash-5.1/lib/sh/wcsdup.c @@ -0,0 +1,44 @@ +/* wcsdup.c - duplicate wide character string */ + +/* Copyright (C) 2006 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE) + +#include +#include +#include +#include + +wchar_t * +wcsdup (ws) + const wchar_t *ws; +{ + wchar_t *ret; + size_t len; + + len = wcslen (ws); + ret = xmalloc ((len + 1) * sizeof (wchar_t)); + if (ret == 0) + return ret; + + return (wcscpy (ret, ws)); +} +#endif /* !HAVE_WCSDUP && HANDLE_MULTIBYTE */ diff --git a/bash-5.1/lib/sh/wcsnwidth.c b/bash-5.1/lib/sh/wcsnwidth.c new file mode 100644 index 0000000000000000000000000000000000000000..9c7e7cc5592ef4574180649b911f3a63e0d18f0c --- /dev/null +++ b/bash-5.1/lib/sh/wcsnwidth.c @@ -0,0 +1,56 @@ +/* wcsnwidth.c - compute display width of wide character string, up to max + specified width, return length. */ + +/* Copyright (C) 2012 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HANDLE_MULTIBYTE) + +#include +#include +#include + +/* Return the number of wide characters that will be displayed from wide string + PWCS. If the display width exceeds MAX, return the number of wide chars + from PWCS required to display MAX characters on the screen. */ +int +wcsnwidth(pwcs, n, max) + const wchar_t *pwcs; + size_t n, max; +{ + wchar_t wc, *ws; + int len, l; + + len = 0; + ws = (wchar_t *)pwcs; + while (n-- > 0 && (wc = *ws++) != L'\0') + { + l = wcwidth (wc); + if (l < 0) + return (-1); + else if (l == max - len) + return (ws - pwcs); + else if (l > max - len) + return (--ws - pwcs); + len += l; + } + return (ws - pwcs); +} +#endif diff --git a/bash-5.1/lib/sh/wcswidth.c b/bash-5.1/lib/sh/wcswidth.c new file mode 100644 index 0000000000000000000000000000000000000000..1a30d9fc3eaf5659ec84f4250fbe1aeeaa76b9dd --- /dev/null +++ b/bash-5.1/lib/sh/wcswidth.c @@ -0,0 +1,46 @@ +/* wcswidth.c - compute display width of wide character string */ + +/* Copyright (C) 2010 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (HANDLE_MULTIBYTE) && !defined (HAVE_WCSWIDTH) + +#include +#include +#include + +int +wcswidth(pwcs, n) + const wchar_t *pwcs; + size_t n; +{ + wchar_t wc; + int len, l; + + len = 0; + while (n-- > 0 && (wc = *pwcs++) != L'\0') + { + if ((l = wcwidth(wc)) < 0) + return (-1); + len += l; + } + return (len); +} +#endif diff --git a/bash-5.1/lib/sh/winsize.c b/bash-5.1/lib/sh/winsize.c new file mode 100644 index 0000000000000000000000000000000000000000..861c7c89b571a0908d73c6cc8aa3bee813b256e7 --- /dev/null +++ b/bash-5.1/lib/sh/winsize.c @@ -0,0 +1,98 @@ +/* winsize.c - handle window size changes and information. */ + +/* Copyright (C) 2005-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ + +#if 0 +#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) +# include +#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ +#endif + +#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) +# include +#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ + +/* Not in either of the standard places, look around. */ +#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) +# if defined (HAVE_SYS_STREAM_H) +# include +# endif /* HAVE_SYS_STREAM_H */ +# if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */ +# include +# define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */ +# endif /* HAVE_SYS_PTEM_H */ +# if defined (HAVE_SYS_PTE_H) /* ??? */ +# include +# endif /* HAVE_SYS_PTE_H */ +#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ + +#include + +/* Return the fd from which we are actually getting input. */ +#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr) + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +extern int shell_tty; + +#if defined (READLINE) +extern void rl_set_screen_size PARAMS((int, int)); +#endif +extern void sh_set_lines_and_columns PARAMS((int, int)); + +void +get_new_window_size (from_sig, rp, cp) + int from_sig; + int *rp, *cp; +{ +#if defined (TIOCGWINSZ) + struct winsize win; + int tty; + + tty = input_tty (); + if (tty >= 0 && (ioctl (tty, TIOCGWINSZ, &win) == 0) && + win.ws_row > 0 && win.ws_col > 0) + { + sh_set_lines_and_columns (win.ws_row, win.ws_col); +#if defined (READLINE) + rl_set_screen_size (win.ws_row, win.ws_col); + if (rp) + *rp = win.ws_row; + if (cp) + *cp = win.ws_col; +#endif + } +#endif +} diff --git a/bash-5.1/lib/sh/zcatfd.c b/bash-5.1/lib/sh/zcatfd.c new file mode 100644 index 0000000000000000000000000000000000000000..aa8199fdd206f12e2f9868c69936dcff550e1916 --- /dev/null +++ b/bash-5.1/lib/sh/zcatfd.c @@ -0,0 +1,74 @@ +/* zcatfd - copy contents of file descriptor to another */ + +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include + +#if !defined (errno) +extern int errno; +#endif + +#ifndef ZBUFSIZ +# define ZBUFSIZ 4096 +#endif + +extern ssize_t zread PARAMS((int, char *, size_t)); +extern int zwrite PARAMS((int, char *, ssize_t)); + +/* Dump contents of file descriptor FD to OFD. FN is the filename for + error messages (not used right now). */ +int +zcatfd (fd, ofd, fn) + int fd, ofd; + char *fn; +{ + ssize_t nr; + int rval; + char lbuf[ZBUFSIZ]; + + rval = 0; + while (1) + { + nr = zread (fd, lbuf, sizeof (lbuf)); + if (nr == 0) + break; + else if (nr < 0) + { + rval = -1; + break; + } + else if (zwrite (ofd, lbuf, nr) < 0) + { + rval = -1; + break; + } + } + + return rval; +} diff --git a/bash-5.1/lib/sh/zgetline.c b/bash-5.1/lib/sh/zgetline.c new file mode 100644 index 0000000000000000000000000000000000000000..8ded144263642190619e38b7b3ad8aa1ac25399a --- /dev/null +++ b/bash-5.1/lib/sh/zgetline.c @@ -0,0 +1,125 @@ +/* zgetline - read a line of input from a specified file descriptor and return + a pointer to a newly-allocated buffer containing the data. */ + +/* Copyright (C) 2008-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include "xmalloc.h" + +#if !defined (errno) +extern int errno; +#endif + +extern ssize_t zread PARAMS((int, char *, size_t)); +extern ssize_t zreadc PARAMS((int, char *)); +extern ssize_t zreadintr PARAMS((int, char *, size_t)); +extern ssize_t zreadcintr PARAMS((int, char *)); + +typedef ssize_t breadfunc_t PARAMS((int, char *, size_t)); +typedef ssize_t creadfunc_t PARAMS((int, char *)); + +/* Initial memory allocation for automatic growing buffer in zreadlinec */ +#define GET_LINE_INITIAL_ALLOCATION 16 + +/* Derived from GNU libc's getline. + The behavior is almost the same as getline. See man getline. + The differences are + (1) using file descriptor instead of FILE *; + (2) the order of arguments: the file descriptor comes first; + (3) the addition of a fourth argument, DELIM; sets the delimiter to + be something other than newline if desired. If setting DELIM, + the next argument should be 1; and + (4) the addition of a fifth argument, UNBUFFERED_READ; this argument + controls whether get_line uses buffering or not to get a byte data + from FD. get_line uses zreadc if UNBUFFERED_READ is zero; and + uses zread if UNBUFFERED_READ is non-zero. + + Returns number of bytes read or -1 on error. */ + +ssize_t +zgetline (fd, lineptr, n, delim, unbuffered_read) + int fd; + char **lineptr; + size_t *n; + int delim; + int unbuffered_read; +{ + int nr, retval; + char *line, c; + + if (lineptr == 0 || n == 0 || (*lineptr == 0 && *n != 0)) + return -1; + + nr = 0; + line = *lineptr; + + while (1) + { + retval = unbuffered_read ? zread (fd, &c, 1) : zreadc(fd, &c); + + if (retval <= 0) + { + if (line && nr > 0) + line[nr] = '\0'; + break; + } + + if (nr + 2 >= *n) + { + size_t new_size; + + new_size = (*n == 0) ? GET_LINE_INITIAL_ALLOCATION : *n * 2; + line = (*n >= new_size) ? NULL : xrealloc (*lineptr, new_size); + + if (line) + { + *lineptr = line; + *n = new_size; + } + else + { + if (*n > 0) + { + (*lineptr)[*n - 1] = '\0'; + nr = *n - 2; + } + break; + } + } + + line[nr] = c; + nr++; + + if (c == delim) + { + line[nr] = '\0'; + break; + } + } + + return nr - 1; +} diff --git a/bash-5.1/lib/sh/zmapfd.c b/bash-5.1/lib/sh/zmapfd.c new file mode 100644 index 0000000000000000000000000000000000000000..f9e9ed71e6cd24a6e9cdb6b832781e0a6e79586d --- /dev/null +++ b/bash-5.1/lib/sh/zmapfd.c @@ -0,0 +1,93 @@ +/* zmapfd - read contents of file descriptor into a newly-allocated buffer */ + +/* Copyright (C) 2006-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include "bashansi.h" +#include "command.h" +#include "general.h" + +#if !defined (errno) +extern int errno; +#endif + +#ifndef ZBUFSIZ +# define ZBUFSIZ 4096 +#endif + +extern ssize_t zread PARAMS((int, char *, size_t)); + +/* Dump contents of file descriptor FD to *OSTR. FN is the filename for + error messages (not used right now). */ +int +zmapfd (fd, ostr, fn) + int fd; + char **ostr; + char *fn; +{ + ssize_t nr; + int rval; + char lbuf[ZBUFSIZ]; + char *result; + int rsize, rind; + + rval = 0; + result = (char *)xmalloc (rsize = ZBUFSIZ); + rind = 0; + + while (1) + { + nr = zread (fd, lbuf, sizeof (lbuf)); + if (nr == 0) + { + rval = rind; + break; + } + else if (nr < 0) + { + free (result); + if (ostr) + *ostr = (char *)NULL; + return -1; + } + + RESIZE_MALLOCED_BUFFER (result, rind, nr, rsize, ZBUFSIZ); + memcpy (result+rind, lbuf, nr); + rind += nr; + } + + RESIZE_MALLOCED_BUFFER (result, rind, 1, rsize, 128); + result[rind] = '\0'; + + if (ostr) + *ostr = result; + else + free (result); + + return rval; +} diff --git a/bash-5.1/lib/sh/zread.c b/bash-5.1/lib/sh/zread.c new file mode 100644 index 0000000000000000000000000000000000000000..71a06a76dae3964eb4dbd0651de0b34692aecd99 --- /dev/null +++ b/bash-5.1/lib/sh/zread.c @@ -0,0 +1,224 @@ +/* zread - read data from file descriptor into buffer with retries */ + +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include + +#if !defined (errno) +extern int errno; +#endif + +#ifndef SEEK_CUR +# define SEEK_CUR 1 +#endif + +#ifndef ZBUFSIZ +# define ZBUFSIZ 4096 +#endif + +extern int executing_builtin; + +extern void check_signals_and_traps (void); +extern void check_signals (void); +extern int signal_is_trapped (int); + +/* Read LEN bytes from FD into BUF. Retry the read on EINTR. Any other + error causes the loop to break. */ +ssize_t +zread (fd, buf, len) + int fd; + char *buf; + size_t len; +{ + ssize_t r; + + check_signals (); /* check for signals before a blocking read */ + while ((r = read (fd, buf, len)) < 0 && errno == EINTR) + { + int t; + t = errno; + /* XXX - bash-5.0 */ + /* We check executing_builtin and run traps here for backwards compatibility */ + if (executing_builtin) + check_signals_and_traps (); /* XXX - should it be check_signals()? */ + else + check_signals (); + errno = t; + } + + return r; +} + +/* Read LEN bytes from FD into BUF. Retry the read on EINTR, up to three + interrupts. Any other error causes the loop to break. */ + +#ifdef NUM_INTR +# undef NUM_INTR +#endif +#define NUM_INTR 3 + +ssize_t +zreadretry (fd, buf, len) + int fd; + char *buf; + size_t len; +{ + ssize_t r; + int nintr; + + for (nintr = 0; ; ) + { + r = read (fd, buf, len); + if (r >= 0) + return r; + if (r == -1 && errno == EINTR) + { + if (++nintr >= NUM_INTR) + return -1; + continue; + } + return r; + } +} + +/* Call read(2) and allow it to be interrupted. Just a stub for now. */ +ssize_t +zreadintr (fd, buf, len) + int fd; + char *buf; + size_t len; +{ + check_signals (); + return (read (fd, buf, len)); +} + +/* Read one character from FD and return it in CP. Return values are as + in read(2). This does some local buffering to avoid many one-character + calls to read(2), like those the `read' builtin performs. */ + +static char lbuf[ZBUFSIZ]; +static size_t lind, lused; + +ssize_t +zreadc (fd, cp) + int fd; + char *cp; +{ + ssize_t nr; + + if (lind == lused || lused == 0) + { + nr = zread (fd, lbuf, sizeof (lbuf)); + lind = 0; + if (nr <= 0) + { + lused = 0; + return nr; + } + lused = nr; + } + if (cp) + *cp = lbuf[lind++]; + return 1; +} + +/* Don't mix calls to zreadc and zreadcintr in the same function, since they + use the same local buffer. */ +ssize_t +zreadcintr (fd, cp) + int fd; + char *cp; +{ + ssize_t nr; + + if (lind == lused || lused == 0) + { + nr = zreadintr (fd, lbuf, sizeof (lbuf)); + lind = 0; + if (nr <= 0) + { + lused = 0; + return nr; + } + lused = nr; + } + if (cp) + *cp = lbuf[lind++]; + return 1; +} + +/* Like zreadc, but read a specified number of characters at a time. Used + for `read -N'. */ +ssize_t +zreadn (fd, cp, len) + int fd; + char *cp; + size_t len; +{ + ssize_t nr; + + if (lind == lused || lused == 0) + { + if (len > sizeof (lbuf)) + len = sizeof (lbuf); + nr = zread (fd, lbuf, len); + lind = 0; + if (nr <= 0) + { + lused = 0; + return nr; + } + lused = nr; + } + if (cp) + *cp = lbuf[lind++]; + return 1; +} + +void +zreset () +{ + lind = lused = 0; +} + +/* Sync the seek pointer for FD so that the kernel's idea of the last char + read is the last char returned by zreadc. */ +void +zsyncfd (fd) + int fd; +{ + off_t off, r; + + off = lused - lind; + r = 0; + if (off > 0) + r = lseek (fd, -off, SEEK_CUR); + + if (r != -1) + lused = lind = 0; +} diff --git a/bash-5.1/lib/sh/zwrite.c b/bash-5.1/lib/sh/zwrite.c new file mode 100644 index 0000000000000000000000000000000000000000..3240f4f42264a471bd1f4c1ce6e92512e4541f53 --- /dev/null +++ b/bash-5.1/lib/sh/zwrite.c @@ -0,0 +1,64 @@ +/* zwrite - write contents of buffer to file descriptor, retrying on error */ + +/* Copyright (C) 1999-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#if !defined (errno) +extern int errno; +#endif + +/* Write NB bytes from BUF to file descriptor FD, retrying the write if + it is interrupted. We retry three times if we get a zero-length + write. Any other signal causes this function to return prematurely. */ +int +zwrite (fd, buf, nb) + int fd; + char *buf; + size_t nb; +{ + int n, i, nt; + + for (n = nb, nt = 0;;) + { + i = write (fd, buf, n); + if (i > 0) + { + n -= i; + if (n <= 0) + return nb; + buf += i; + } + else if (i == 0) + { + if (++nt > 3) + return (nb - n); + } + else if (errno != EINTR) + return -1; + } +} diff --git a/bash-5.1/lib/termcap/Makefile.in b/bash-5.1/lib/termcap/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..66dd7c1eb89e8192b40f3cb28f2e18ecdd9874a3 --- /dev/null +++ b/bash-5.1/lib/termcap/Makefile.in @@ -0,0 +1,90 @@ +## -*- text -*- #################################################### +# # +# Makefile for termcap replacement libbrary. # +# # +#################################################################### + +# Copyright (C) 1996-2009 Free Software Foundation, Inc. + +# 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 . + +srcdir = @srcdir@ +VPATH = @srcdir@ +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ + +libdir = @libdir@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CC = @CC@ +RANLIB = @RANLIB@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +RM = rm -f +CP = cp +MV = mv + +SHELL = @MAKE_SHELL@ + +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ + +DEFS = @DEFS@ + +INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(srcdir) + +CCFLAGS = $(CFLAGS) $(DEFS) $(CPPFLAGS) ${INCLUDES} + +# Here is a rule for making .o files from .c files that doesn't force +# the type of the machine (like -sun3) into the flags. +.c.o: + $(CC) -c $(CCFLAGS) $< + +SOURCES = termcap.c tparam.c +OBJECTS = termcap.o tparam.o + +DOCUMENTATION = termcap.texinfo + +THINGS_TO_TAR = $(SOURCES) $(DOCUMENTATION) + +########################################################################## + +all: libtermcap.a + +libtermcap.a: $(OBJECTS) + $(RM) -f $@ + $(AR) $(ARFLAGS) $@ $(OBJECTS) + -test -n "$(RANLIB)" && $(RANLIB) $@ + +install: + +clean: + $(RM) *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc + +mostlyclean: clean + +distclean maintainer-clean: clean + $(RM) Makefile + +$(DESTDIR)$(libdir)/libtermcap.a: libtermcap.a + ${INSTALL_DATA} -c -m 644 libtermcap.a $@ + -test -n "$(RANLIB)" && $(RANLIB) -t $@ + +termcap.o: $(BUILD_DIR)/config.h +tparam.o: $(BUILD_DIR)/config.h +version.o: $(BUILD_DIR)/config.h diff --git a/bash-5.1/lib/termcap/ltcap.h b/bash-5.1/lib/termcap/ltcap.h new file mode 100644 index 0000000000000000000000000000000000000000..a97f0d8b03f3f28ee138f3fb587af970446b444a --- /dev/null +++ b/bash-5.1/lib/termcap/ltcap.h @@ -0,0 +1,30 @@ +/* ltcap.h - Local declarations for termcap library. */ + +/* Copyright (C) 1999-2009 Free Software Foundation, Inc. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _LTCAP_H_ +#define _LTCAP_H_ 1 + +#if !defined (__APPLE__) +# define __private_extern__ +#endif + +#ifndef MAX_TGETENT_BUFSIZ +# define MAX_TGETENT_BUFSIZ 2048 +#endif + +#endif /* _LTCAP_H_ */ diff --git a/bash-5.1/lib/termcap/termcap.c b/bash-5.1/lib/termcap/termcap.c new file mode 100644 index 0000000000000000000000000000000000000000..ba3dab2c235e7c592d10007d97cf932976a69423 --- /dev/null +++ b/bash-5.1/lib/termcap/termcap.c @@ -0,0 +1,817 @@ +/* termcap.c - Work-alike for termcap, plus extra features. */ + +/* Copyright (C) 1985, 1986, 1993,1994, 1995, 1998, 2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Emacs config.h may rename various library functions such as malloc. */ +#ifdef HAVE_CONFIG_H + +#include + +/* Get the O_* definitions for open et al. */ +#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif + +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_STDLIB_H +# include +#else +extern char *getenv (); +extern char *malloc (); +extern char *realloc (); +#endif + +#if defined (HAVE_STRING_H) +#include +#endif + +#if !defined (HAVE_BCOPY) && (defined (HAVE_STRING_H) || defined (STDC_HEADERS)) +# define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif + +#else /* not HAVE_CONFIG_H */ + +#ifdef STDC_HEADERS +#include +#include +#else +char *getenv (); +char *malloc (); +char *realloc (); +#endif + +/* Do this after the include, in case string.h prototypes bcopy. */ +#if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy) +#define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef _POSIX_VERSION +#include +#endif + +#endif /* not HAVE_CONFIG_H */ + +#ifndef NULL +#define NULL (char *) 0 +#endif + +#ifndef O_RDONLY +#define O_RDONLY 0 +#endif + +/* BUFSIZE is the initial size allocated for the buffer + for reading the termcap file. + It is not a limit. + Make it large normally for speed. + Make it variable when debugging, so can exercise + increasing the space dynamically. */ + +#ifndef BUFSIZE +#ifdef DEBUG +#define BUFSIZE bufsize + +int bufsize = 128; +#else +#define BUFSIZE 2048 +#endif +#endif + +#include "ltcap.h" + +#ifndef TERMCAP_FILE +#define TERMCAP_FILE "/etc/termcap" +#endif + +#ifndef emacs +static void +memory_out () +{ + write (2, "virtual memory exhausted\n", 25); + exit (1); +} + +static char * +xmalloc (size) + unsigned size; +{ + register char *tem = malloc (size); + + if (!tem) + memory_out (); + return tem; +} + +static char * +xrealloc (ptr, size) + char *ptr; + unsigned size; +{ + register char *tem = realloc (ptr, size); + + if (!tem) + memory_out (); + return tem; +} +#endif /* not emacs */ + +/* Looking up capabilities in the entry already found. */ + +/* The pointer to the data made by tgetent is left here + for tgetnum, tgetflag and tgetstr to find. */ +static char *term_entry; + +static char *tgetst1 (); + +/* Search entry BP for capability CAP. + Return a pointer to the capability (in BP) if found, + 0 if not found. */ + +static char * +find_capability (bp, cap) + register char *bp, *cap; +{ + for (; *bp; bp++) + if (bp[0] == ':' + && bp[1] == cap[0] + && bp[2] == cap[1]) + return &bp[4]; + return NULL; +} + +__private_extern__ +int +tgetnum (cap) + char *cap; +{ + register char *ptr = find_capability (term_entry, cap); + if (!ptr || ptr[-1] != '#') + return -1; + return atoi (ptr); +} + +__private_extern__ +int +tgetflag (cap) + char *cap; +{ + register char *ptr = find_capability (term_entry, cap); + return ptr && ptr[-1] == ':'; +} + +/* Look up a string-valued capability CAP. + If AREA is non-null, it points to a pointer to a block in which + to store the string. That pointer is advanced over the space used. + If AREA is null, space is allocated with `malloc'. */ + +__private_extern__ +char * +tgetstr (cap, area) + char *cap; + char **area; +{ + register char *ptr = find_capability (term_entry, cap); + if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~')) + return NULL; + return tgetst1 (ptr, area); +} + +/* Table, indexed by a character in range 0100 to 0140 with 0100 subtracted, + gives meaning of character following \, or a space if no special meaning. + Eight characters per line within the string. */ + +static char esctab[] + = " \007\010 \033\014 \ + \012 \ + \015 \011 \013 \ + "; + +/* PTR points to a string value inside a termcap entry. + Copy that value, processing \ and ^ abbreviations, + into the block that *AREA points to, + or to newly allocated storage if AREA is NULL. + Return the address to which we copied the value, + or NULL if PTR is NULL. */ + +static char * +tgetst1 (ptr, area) + char *ptr; + char **area; +{ + register char *p, *r; + register int c; + register int size; + char *ret; + register int c1; + + if (!ptr) + return NULL; + + /* `ret' gets address of where to store the string. */ + if (!area) + { + /* Compute size of block needed (may overestimate). */ + p = ptr; + while ((c = *p++) && c != ':' && c != '\n') + ; + ret = (char *) xmalloc (p - ptr + 1); + } + else + ret = *area; + + /* Copy the string value, stopping at null or colon. + Also process ^ and \ abbreviations. */ + p = ptr; + r = ret; + while ((c = *p++) && c != ':' && c != '\n') + { + if (c == '^') + { + c = *p++; + if (c == '?') + c = 0177; + else + c &= 037; + } + else if (c == '\\') + { + c = *p++; + if (c >= '0' && c <= '7') + { + c -= '0'; + size = 0; + + while (++size < 3 && (c1 = *p) >= '0' && c1 <= '7') + { + c *= 8; + c += c1 - '0'; + p++; + } + } + else if (c >= 0100 && c < 0200) + { + c1 = esctab[(c & ~040) - 0100]; + if (c1 != ' ') + c = c1; + } + } + *r++ = c; + } + *r = '\0'; + /* Update *AREA. */ + if (area) + *area = r + 1; + return ret; +} + +/* Outputting a string with padding. */ + +short ospeed; +/* If OSPEED is 0, we use this as the actual baud rate. */ +int tputs_baud_rate; +__private_extern__ char PC = '\0'; + +/* Actual baud rate if positive; + - baud rate / 100 if negative. */ + +static int speeds[] = + { +#ifdef VMS + 0, 50, 75, 110, 134, 150, -3, -6, -12, -18, + -20, -24, -36, -48, -72, -96, -192 +#else /* not VMS */ + 0, 50, 75, 110, 135, 150, -2, -3, -6, -12, + -18, -24, -48, -96, -192, -288, -384, -576, -1152 +#endif /* not VMS */ + }; + +__private_extern__ +int +tputs (str, nlines, outfun) + register char *str; + int nlines; + register int (*outfun) (); +{ + register int padcount = 0; + register int speed; + +#ifdef emacs + extern baud_rate; + speed = baud_rate; + /* For quite high speeds, convert to the smaller + units to avoid overflow. */ + if (speed > 10000) + speed = - speed / 100; +#else + if (ospeed == 0) + speed = tputs_baud_rate; + else if (ospeed > 0 && ospeed < (sizeof speeds / sizeof speeds[0])) + speed = speeds[ospeed]; + else + speed = 0; +#endif + + if (!str) + return -1; + + while (*str >= '0' && *str <= '9') + { + padcount += *str++ - '0'; + padcount *= 10; + } + if (*str == '.') + { + str++; + padcount += *str++ - '0'; + } + if (*str == '*') + { + str++; + padcount *= nlines; + } + while (*str) + (*outfun) (*str++); + + /* PADCOUNT is now in units of tenths of msec. + SPEED is measured in characters per 10 seconds + or in characters per .1 seconds (if negative). + We use the smaller units for larger speeds to avoid overflow. */ + padcount *= speed; + padcount += 500; + padcount /= 1000; + if (speed < 0) + padcount = -padcount; + else + { + padcount += 50; + padcount /= 100; + } + + while (padcount-- > 0) + (*outfun) (PC); + + return 0; +} + +/* Finding the termcap entry in the termcap data base. */ + +struct buffer + { + char *beg; + int size; + char *ptr; + int ateof; + int full; + }; + +/* Forward declarations of static functions. */ + +static int scan_file (); +static char *gobble_line (); +static int compare_contin (); +static int name_match (); + +#ifdef VMS + +#include +#include +#include + +static int +valid_filename_p (fn) + char *fn; +{ + struct FAB fab = cc$rms_fab; + struct NAM nam = cc$rms_nam; + char esa[NAM$C_MAXRSS]; + + fab.fab$l_fna = fn; + fab.fab$b_fns = strlen(fn); + fab.fab$l_nam = &nam; + fab.fab$l_fop = FAB$M_NAM; + + nam.nam$l_esa = esa; + nam.nam$b_ess = sizeof esa; + + return SYS$PARSE(&fab, 0, 0) == RMS$_NORMAL; +} + +#else /* !VMS */ + +#ifdef MSDOS /* MW, May 1993 */ +static int +valid_filename_p (fn) + char *fn; +{ + return *fn == '\\' || *fn == '/' || + (*fn >= 'A' && *fn <= 'z' && fn[1] == ':'); +} +#else +#define valid_filename_p(fn) (*(fn) == '/') +#endif + +#endif /* !VMS */ + +/* Find the termcap entry data for terminal type NAME + and store it in the block that BP points to. + Record its address for future use. + + If BP is null, space is dynamically allocated. + + Return -1 if there is some difficulty accessing the data base + of terminal types, + 0 if the data base is accessible but the type NAME is not defined + in it, and some other value otherwise. */ + +__private_extern__ +int +tgetent (bp, name) + char *bp, *name; +{ + register char *termcap_name; + register int fd; + struct buffer buf; + register char *bp1; + char *bp2; + char *term; + int malloc_size = 0; + register int c; + char *tcenv; /* TERMCAP value, if it contains :tc=. */ + char *indirect = NULL; /* Terminal type in :tc= in TERMCAP value. */ + int filep; + +#ifdef INTERNAL_TERMINAL + /* For the internal terminal we don't want to read any termcap file, + so fake it. */ + if (!strcmp (name, "internal")) + { + term = INTERNAL_TERMINAL; + if (!bp) + { + malloc_size = 1 + strlen (term); + bp = (char *) xmalloc (malloc_size); + } + strcpy (bp, term); + goto ret; + } +#endif /* INTERNAL_TERMINAL */ + + /* For compatibility with programs like `less' that want to + put data in the termcap buffer themselves as a fallback. */ + if (bp) + term_entry = bp; + + termcap_name = getenv ("TERMCAP"); + if (termcap_name && *termcap_name == '\0') + termcap_name = NULL; +#if 0 +#if defined (MSDOS) && !defined (TEST) + if (termcap_name && (*termcap_name == '\\' + || *termcap_name == '/' + || termcap_name[1] == ':')) + dostounix_filename(termcap_name); +#endif +#endif + + filep = termcap_name && valid_filename_p (termcap_name); + + /* If termcap_name is non-null and starts with / (in the un*x case, that is), + it is a file name to use instead of /etc/termcap. + If it is non-null and does not start with /, + it is the entry itself, but only if + the name the caller requested matches the TERM variable. */ + + if (termcap_name && !filep && !strcmp (name, getenv ("TERM"))) + { + indirect = tgetst1 (find_capability (termcap_name, "tc"), (char **) 0); + if (!indirect) + { + if (!bp) + bp = termcap_name; + else + strcpy (bp, termcap_name); + goto ret; + } + else + { /* It has tc=. Need to read /etc/termcap. */ + tcenv = termcap_name; + termcap_name = NULL; + } + } + + if (!termcap_name || !filep) + termcap_name = TERMCAP_FILE; + + /* Here we know we must search a file and termcap_name has its name. */ + +#ifdef MSDOS + fd = open (termcap_name, O_RDONLY|O_TEXT, 0); +#else + fd = open (termcap_name, O_RDONLY, 0); +#endif + if (fd < 0) + return -1; + + buf.size = BUFSIZE; + /* Add 1 to size to ensure room for terminating null. */ + buf.beg = (char *) xmalloc (buf.size + 1); + term = indirect ? indirect : name; + + if (!bp) + { + malloc_size = indirect ? strlen (tcenv) + 1 : buf.size; + bp = (char *) xmalloc (malloc_size); + } + bp1 = bp; + + if (indirect) + /* Copy the data from the environment variable. */ + { + strcpy (bp, tcenv); + bp1 += strlen (tcenv); + } + + while (term) + { + /* Scan the file, reading it via buf, till find start of main entry. */ + if (scan_file (term, fd, &buf) == 0) + { + close (fd); + free (buf.beg); + if (malloc_size) + free (bp); + return 0; + } + + /* Free old `term' if appropriate. */ + if (term != name) + free (term); + + /* If BP is malloc'd by us, make sure it is big enough. */ + if (malloc_size) + { + malloc_size = bp1 - bp + buf.size; + termcap_name = (char *) xrealloc (bp, malloc_size); + bp1 += termcap_name - bp; + bp = termcap_name; + } + + bp2 = bp1; + + /* Copy the line of the entry from buf into bp. */ + termcap_name = buf.ptr; + while ((*bp1++ = c = *termcap_name++) && c != '\n') + /* Drop out any \ newline sequence. */ + if (c == '\\' && *termcap_name == '\n') + { + bp1--; + termcap_name++; + } + *bp1 = '\0'; + + /* Does this entry refer to another terminal type's entry? + If something is found, copy it into heap and null-terminate it. */ + term = tgetst1 (find_capability (bp2, "tc"), (char **) 0); + } + + close (fd); + free (buf.beg); + + if (malloc_size) + bp = (char *) xrealloc (bp, bp1 - bp + 1); + + ret: + term_entry = bp; + return 1; +} + +/* Given file open on FD and buffer BUFP, + scan the file from the beginning until a line is found + that starts the entry for terminal type STR. + Return 1 if successful, with that line in BUFP, + or 0 if no entry is found in the file. */ + +static int +scan_file (str, fd, bufp) + char *str; + int fd; + register struct buffer *bufp; +{ + register char *end; + + bufp->ptr = bufp->beg; + bufp->full = 0; + bufp->ateof = 0; + *bufp->ptr = '\0'; + + lseek (fd, 0L, 0); + + while (!bufp->ateof) + { + /* Read a line into the buffer. */ + end = NULL; + do + { + /* if it is continued, append another line to it, + until a non-continued line ends. */ + end = gobble_line (fd, bufp, end); + } + while (!bufp->ateof && end[-2] == '\\'); + + if (*bufp->ptr != '#' + && name_match (bufp->ptr, str)) + return 1; + + /* Discard the line just processed. */ + bufp->ptr = end; + } + return 0; +} + +/* Return nonzero if NAME is one of the names specified + by termcap entry LINE. */ + +static int +name_match (line, name) + char *line, *name; +{ + register char *tem; + + if (!compare_contin (line, name)) + return 1; + /* This line starts an entry. Is it the right one? */ + for (tem = line; *tem && *tem != '\n' && *tem != ':'; tem++) + if (*tem == '|' && !compare_contin (tem + 1, name)) + return 1; + + return 0; +} + +static int +compare_contin (str1, str2) + register char *str1, *str2; +{ + register int c1, c2; + while (1) + { + c1 = *str1++; + c2 = *str2++; + while (c1 == '\\' && *str1 == '\n') + { + str1++; + while ((c1 = *str1++) == ' ' || c1 == '\t'); + } + if (c2 == '\0') + { + /* End of type being looked up. */ + if (c1 == '|' || c1 == ':') + /* If end of name in data base, we win. */ + return 0; + else + return 1; + } + else if (c1 != c2) + return 1; + } +} + +/* Make sure that the buffer <- BUFP contains a full line + of the file open on FD, starting at the place BUFP->ptr + points to. Can read more of the file, discard stuff before + BUFP->ptr, or make the buffer bigger. + + Return the pointer to after the newline ending the line, + or to the end of the file, if there is no newline to end it. + + Can also merge on continuation lines. If APPEND_END is + non-null, it points past the newline of a line that is + continued; we add another line onto it and regard the whole + thing as one line. The caller decides when a line is continued. */ + +static char * +gobble_line (fd, bufp, append_end) + int fd; + register struct buffer *bufp; + char *append_end; +{ + register char *end; + register int nread; + register char *buf = bufp->beg; + register char *tem; + + if (!append_end) + append_end = bufp->ptr; + + while (1) + { + end = append_end; + while (*end && *end != '\n') end++; + if (*end) + break; + if (bufp->ateof) + return buf + bufp->full; + if (bufp->ptr == buf) + { + if (bufp->full == bufp->size) + { + bufp->size *= 2; + /* Add 1 to size to ensure room for terminating null. */ + tem = (char *) xrealloc (buf, bufp->size + 1); + bufp->ptr = (bufp->ptr - buf) + tem; + append_end = (append_end - buf) + tem; + bufp->beg = buf = tem; + } + } + else + { + append_end -= bufp->ptr - buf; + bcopy (bufp->ptr, buf, bufp->full -= bufp->ptr - buf); + bufp->ptr = buf; + } + if (!(nread = read (fd, buf + bufp->full, bufp->size - bufp->full))) + bufp->ateof = 1; + bufp->full += nread; + buf[bufp->full] = '\0'; + } + return end + 1; +} + +#ifdef TEST + +#ifdef NULL +#undef NULL +#endif + +#include + +main (argc, argv) + int argc; + char **argv; +{ + char *term; + char *buf; + + term = argv[1]; + printf ("TERM: %s\n", term); + + buf = (char *) tgetent (0, term); + if ((int) buf <= 0) + { + printf ("No entry.\n"); + return 0; + } + + printf ("Entry: %s\n", buf); + + tprint ("cm"); + tprint ("AL"); + + printf ("co: %d\n", tgetnum ("co")); + printf ("am: %d\n", tgetflag ("am")); +} + +tprint (cap) + char *cap; +{ + char *x = tgetstr (cap, 0); + register char *y; + + printf ("%s: ", cap); + if (x) + { + for (y = x; *y; y++) + if (*y <= ' ' || *y == 0177) + printf ("\\%0o", *y); + else + putchar (*y); + free (x); + } + else + printf ("none"); + putchar ('\n'); +} + +#endif /* TEST */ diff --git a/bash-5.1/lib/termcap/termcap.h b/bash-5.1/lib/termcap/termcap.h new file mode 100644 index 0000000000000000000000000000000000000000..b0e3061fe58ce4520c97637fc8f78a8342e498af --- /dev/null +++ b/bash-5.1/lib/termcap/termcap.h @@ -0,0 +1,63 @@ +/* termcap.h - public declarations for termcap library. */ + +/* Copyright (C) 1991, 1992, 1995, 2001, 2005, 2006, 2008,2009 Free Software Foundation, Inc. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _TERMCAP_H +#define _TERMCAP_H 1 + +#if __STDC__ + +extern int tgetent (char *buffer, const char *termtype); + +extern int tgetnum (const char *name); +extern int tgetflag (const char *name); +extern char *tgetstr (const char *name, char **area); + +extern char PC; +extern short ospeed; +extern int tputs (const char *string, int nlines, int (*outfun) (int)); + +extern char *tparam (const char *ctlstring, char *buffer, int size, ...); + +extern char *UP; +extern char *BC; + +extern char *tgoto (const char *cstring, int hpos, int vpos); + +#else /* not __STDC__ */ + +extern int tgetent (); + +extern int tgetnum (); +extern int tgetflag (); +extern char *tgetstr (); + +extern char PC; +extern short ospeed; + +extern void tputs (); + +extern char *tparam (); + +extern char *UP; +extern char *BC; + +extern char *tgoto (); + +#endif /* not __STDC__ */ + +#endif /* not _TERMCAP_H */ diff --git a/bash-5.1/lib/termcap/tparam.c b/bash-5.1/lib/termcap/tparam.c new file mode 100644 index 0000000000000000000000000000000000000000..c4bff088e73c5e382935398a23c3fcaf568e81c2 --- /dev/null +++ b/bash-5.1/lib/termcap/tparam.c @@ -0,0 +1,345 @@ +/* tparam.c - merge parameters into a termcap entry string. */ + +/* Copyright (C) 1985, 1986, 1993,1994, 1995, 1998, 2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Emacs config.h may rename various library functions such as malloc. */ +#ifdef HAVE_CONFIG_H +#include + +#ifdef HAVE_STDLIB_H +# include +#else +extern char *getenv (); +extern char *malloc (); +extern char *realloc (); +#endif + +#if defined (HAVE_STRING_H) +#include +#endif + +#if !defined (HAVE_BCOPY) && (defined (HAVE_STRING_H) || defined (STDC_HEADERS)) +# define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif + +#else /* not HAVE_CONFIG_H */ + +#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) +#define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif + +#ifdef STDC_HEADERS +#include +#include +#else +char *malloc (); +char *realloc (); +#endif + +#endif /* not HAVE_CONFIG_H */ + +#include "ltcap.h" + +#ifndef NULL +#define NULL (char *) 0 +#endif + +#ifndef emacs +static void +memory_out () +{ + write (2, "virtual memory exhausted\n", 25); + exit (1); +} + +static char * +xmalloc (size) + unsigned size; +{ + register char *tem = malloc (size); + + if (!tem) + memory_out (); + return tem; +} + +static char * +xrealloc (ptr, size) + char *ptr; + unsigned size; +{ + register char *tem = realloc (ptr, size); + + if (!tem) + memory_out (); + return tem; +} +#endif /* not emacs */ + +/* Assuming STRING is the value of a termcap string entry + containing `%' constructs to expand parameters, + merge in parameter values and store result in block OUTSTRING points to. + LEN is the length of OUTSTRING. If more space is needed, + a block is allocated with `malloc'. + + The value returned is the address of the resulting string. + This may be OUTSTRING or may be the address of a block got with `malloc'. + In the latter case, the caller must free the block. + + The fourth and following args to tparam serve as the parameter values. */ + +static char *tparam1 (); + +/* VARARGS 2 */ +char * +tparam (string, outstring, len, arg0, arg1, arg2, arg3) + char *string; + char *outstring; + int len; + int arg0, arg1, arg2, arg3; +{ + int arg[4]; + + arg[0] = arg0; + arg[1] = arg1; + arg[2] = arg2; + arg[3] = arg3; + return tparam1 (string, outstring, len, NULL, NULL, arg); +} + +__private_extern__ char *BC; +__private_extern__ char *UP; + +static char tgoto_buf[50]; + +__private_extern__ +char * +tgoto (cm, hpos, vpos) + char *cm; + int hpos, vpos; +{ + int args[2]; + if (!cm) + return NULL; + args[0] = vpos; + args[1] = hpos; + return tparam1 (cm, tgoto_buf, 50, UP, BC, args); +} + +static char * +tparam1 (string, outstring, len, up, left, argp) + char *string; + char *outstring; + int len; + char *up, *left; + register int *argp; +{ + register int c; + register char *p = string; + register char *op = outstring; + char *outend; + int outlen = 0; + + register int tem; + int *old_argp = argp; + int doleft = 0; + int doup = 0; + + outend = outstring + len; + + while (1) + { + /* If the buffer might be too short, make it bigger. */ + if (op + 5 >= outend) + { + register char *new; + if (outlen == 0) + { + outlen = len + 40; + new = (char *) xmalloc (outlen); + outend += 40; + bcopy (outstring, new, op - outstring); + } + else + { + outend += outlen; + outlen *= 2; + new = (char *) xrealloc (outstring, outlen); + } + op += new - outstring; + outend += new - outstring; + outstring = new; + } + c = *p++; + if (!c) + break; + if (c == '%') + { + c = *p++; + tem = *argp; + switch (c) + { + case 'd': /* %d means output in decimal. */ + if (tem < 10) + goto onedigit; + if (tem < 100) + goto twodigit; + case '3': /* %3 means output in decimal, 3 digits. */ + if (tem > 999) + { + *op++ = tem / 1000 + '0'; + tem %= 1000; + } + *op++ = tem / 100 + '0'; + case '2': /* %2 means output in decimal, 2 digits. */ + twodigit: + tem %= 100; + *op++ = tem / 10 + '0'; + onedigit: + *op++ = tem % 10 + '0'; + argp++; + break; + + case 'C': + /* For c-100: print quotient of value by 96, if nonzero, + then do like %+. */ + if (tem >= 96) + { + *op++ = tem / 96; + tem %= 96; + } + case '+': /* %+x means add character code of char x. */ + tem += *p++; + case '.': /* %. means output as character. */ + if (left) + { + /* If want to forbid output of 0 and \n and \t, + and this is one of them, increment it. */ + while (tem == 0 || tem == '\n' || tem == '\t') + { + tem++; + if (argp == old_argp) + doup++, outend -= strlen (up); + else + doleft++, outend -= strlen (left); + } + } + *op++ = tem ? tem : 0200; + case 'f': /* %f means discard next arg. */ + argp++; + break; + + case 'b': /* %b means back up one arg (and re-use it). */ + argp--; + break; + + case 'r': /* %r means interchange following two args. */ + argp[0] = argp[1]; + argp[1] = tem; + old_argp++; + break; + + case '>': /* %>xy means if arg is > char code of x, */ + if (argp[0] > *p++) /* then add char code of y to the arg, */ + argp[0] += *p; /* and in any case don't output. */ + p++; /* Leave the arg to be output later. */ + break; + + case 'a': /* %a means arithmetic. */ + /* Next character says what operation. + Add or subtract either a constant or some other arg. */ + /* First following character is + to add or - to subtract + or = to assign. */ + /* Next following char is 'p' and an arg spec + (0100 plus position of that arg relative to this one) + or 'c' and a constant stored in a character. */ + tem = p[2] & 0177; + if (p[1] == 'p') + tem = argp[tem - 0100]; + if (p[0] == '-') + argp[0] -= tem; + else if (p[0] == '+') + argp[0] += tem; + else if (p[0] == '*') + argp[0] *= tem; + else if (p[0] == '/') + argp[0] /= tem; + else + argp[0] = tem; + + p += 3; + break; + + case 'i': /* %i means add one to arg, */ + argp[0] ++; /* and leave it to be output later. */ + argp[1] ++; /* Increment the following arg, too! */ + break; + + case '%': /* %% means output %; no arg. */ + goto ordinary; + + case 'n': /* %n means xor each of next two args with 140. */ + argp[0] ^= 0140; + argp[1] ^= 0140; + break; + + case 'm': /* %m means xor each of next two args with 177. */ + argp[0] ^= 0177; + argp[1] ^= 0177; + break; + + case 'B': /* %B means express arg as BCD char code. */ + argp[0] += 6 * (tem / 10); + break; + + case 'D': /* %D means weird Delta Data transformation. */ + argp[0] -= 2 * (tem % 16); + break; + } + } + else + /* Ordinary character in the argument string. */ + ordinary: + *op++ = c; + } + *op = 0; + while (doup-- > 0) + strcat (op, up); + while (doleft-- > 0) + strcat (op, left); + return outstring; +} + +#ifdef DEBUG + +main (argc, argv) + int argc; + char **argv; +{ + char buf[50]; + int args[3]; + args[0] = atoi (argv[2]); + args[1] = atoi (argv[3]); + args[2] = atoi (argv[4]); + tparam1 (argv[1], buf, "LEFT", "UP", args); + printf ("%s\n", buf); + return 0; +} + +#endif /* DEBUG */ diff --git a/bash-5.1/lib/termcap/version.c b/bash-5.1/lib/termcap/version.c new file mode 100644 index 0000000000000000000000000000000000000000..cad57be6f5f56cb74fbf1e1e274daa40fed56dfd --- /dev/null +++ b/bash-5.1/lib/termcap/version.c @@ -0,0 +1,22 @@ +/* version.c - termcap library version information. */ + +/* Copyright (C) 1985-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Make the library identifiable with the RCS ident command. */ +static char *termcap_version_string = "\n$Version: GNU termcap 1.3 $\n"; diff --git a/bash-5.1/lib/tilde/Makefile.in b/bash-5.1/lib/tilde/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..c21d3897c9280d389895a9cd616e2cd2981152db --- /dev/null +++ b/bash-5.1/lib/tilde/Makefile.in @@ -0,0 +1,126 @@ +## -*- text -*- #################################################### +# # +# Makefile for the GNU Tilde Library. # +# # +#################################################################### + +# Copyright (C) 1996-2009 Free Software Foundation, Inc. + +# 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 . + +srcdir = @srcdir@ +VPATH = @srcdir@ +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CC = @CC@ +RANLIB = @RANLIB@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +RM = rm +CP = cp +MV = mv + +SHELL = @MAKE_SHELL@ + +PROFILE_FLAGS = @PROFILE_FLAGS@ + +CFLAGS = @CFLAGS@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ + +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +BASHINCDIR = ${topdir}/include + +INCLUDES = -I. -I../.. -I$(topdir) -I${BASHINCDIR} -I$(topdir)/lib + +CCFLAGS = ${ASAN_CFLAGS} $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) \ + ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS) + +.c.o: + $(CC) -c $(CCFLAGS) $< + +# The name of the library target. +LIBRARY_NAME = libtilde.a + +# The C code source files for this library. +CSOURCES = $(srcdir)/tilde.c + +# The header files for this library. +HSOURCES = $(srcdir)/tilde.h + +OBJECTS = tilde.o + +# The texinfo files which document this library. +DOCSOURCE = doc/tilde.texi +DOCOBJECT = doc/tilde.dvi +DOCSUPPORT = doc/Makefile +DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) + +SUPPORT = Makefile ChangeLog $(DOCSUPPORT) + +SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) + +THINGS_TO_TAR = $(SOURCES) $(SUPPORT) + +###################################################################### + +all: $(LIBRARY_NAME) + +$(LIBRARY_NAME): $(OBJECTS) + $(RM) -f $@ + $(AR) $(ARFLAGS) $@ $(OBJECTS) + -test -n "$(RANLIB)" && $(RANLIB) $@ + +documentation: force + -(cd doc; $(MAKE) $(MFLAGS)) + +force: + +# The rule for 'includes' is written funny so that the if statement +# always returns TRUE unless there really was an error installing the +# include files. +install: + $(INSTALL_DATA) -c -m 644 $(LIBRARY_NAME) $(libdir)/$(LIBRARY_NAME) + -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/$(LIBRARY_NAME) + +clean: + $(RM) -f $(OBJECTS) $(LIBRARY_NAME) + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + +realclean distclean maintainer-clean: clean + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + $(RM) -f Makefile + +mostlyclean: clean + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + +###################################################################### +# # +# Dependencies for the object files which make up this library. # +# # +###################################################################### + +tilde.o: tilde.h $(BASHINCDIR)/ansi_stdlib.h +tilde.o: $(BUILD_DIR)/config.h + +# Rules for deficient makes, like SunOS and Solaris +tilde.o: tilde.c diff --git a/bash-5.1/lib/tilde/README b/bash-5.1/lib/tilde/README new file mode 100644 index 0000000000000000000000000000000000000000..a8772f3571ef6c06ce2a79c2fe793364baa7e69d --- /dev/null +++ b/bash-5.1/lib/tilde/README @@ -0,0 +1,5 @@ +If you're building this separately from bash or the readline library, add +$(srcdir)/shell.c to the CSOURCES variable and shell.o to the OBJECTS +variable in Makefile.in. (Not that this is very useful without readline +or bash.) + diff --git a/bash-5.1/lib/tilde/shell.c b/bash-5.1/lib/tilde/shell.c new file mode 100644 index 0000000000000000000000000000000000000000..9805a9248b3f3be6cfcdd46130a6f525e908e7c0 --- /dev/null +++ b/bash-5.1/lib/tilde/shell.c @@ -0,0 +1,79 @@ +/* shell.c -- tilde utility functions that are normally provided by + bash when readline is linked as part of the shell. */ + +/* Copyright (C) 1998-2017 Free Software Foundation, Inc. + + This file is part of the GNU Tilde Library. + + The GNU Tilde Library 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. + + The GNU Tilde Library 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 the GNU Tilde Library. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_STRING_H) +# include +#else +# include +#endif /* !HAVE_STRING_H */ + +#include + +#if !defined (HAVE_GETPW_DECLS) +extern struct passwd *getpwuid (); +#endif /* !HAVE_GETPW_DECLS */ + +char * +get_env_value (char *varname) +{ + return ((char *)getenv (varname)); +} + +/* If we're not using $HOME, assume that the passwd file information won't + change while this shell instance is running. */ +char * +get_home_dir (void) +{ + static char *home_dir = (char *)NULL; + struct passwd *entry; + + if (home_dir) + return (home_dir); + +#if defined (HAVE_GETPWUID) + entry = getpwuid (getuid ()); + if (entry) + home_dir = savestring (entry->pw_dir); +#endif + +#if defined (HAVE_GETPWENT) + endpwent (); /* some systems need this */ +#endif + + return (home_dir); +} diff --git a/bash-5.1/lib/tilde/tilde.c b/bash-5.1/lib/tilde/tilde.c new file mode 100644 index 0000000000000000000000000000000000000000..d678a31ab2735a95b60906fd979e60cfe63c8056 --- /dev/null +++ b/bash-5.1/lib/tilde/tilde.c @@ -0,0 +1,493 @@ +/* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */ + +/* Copyright (C) 1988-2020 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include +#if defined (HAVE_PWD_H) +#include +#endif + +#include "tilde.h" + +#if defined (TEST) || defined (STATIC_MALLOC) +static void *xmalloc (), *xrealloc (); +#else +# include "xmalloc.h" +#endif /* TEST || STATIC_MALLOC */ + +#if !defined (HAVE_GETPW_DECLS) +# if defined (HAVE_GETPWUID) +extern struct passwd *getpwuid (uid_t); +# endif +# if defined (HAVE_GETPWNAM) +extern struct passwd *getpwnam (const char *); +# endif +#endif /* !HAVE_GETPW_DECLS */ + +#if !defined (savestring) +#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) +#endif /* !savestring */ + +#if !defined (NULL) +# if defined (__STDC__) +# define NULL ((void *) 0) +# else +# define NULL 0x0 +# endif /* !__STDC__ */ +#endif /* !NULL */ + +/* If being compiled as part of bash, these will be satisfied from + variables.o. If being compiled as part of readline, they will + be satisfied from shell.o. */ +extern char *sh_get_home_dir (void); +extern char *sh_get_env_value (const char *); + +/* The default value of tilde_additional_prefixes. This is set to + whitespace preceding a tilde so that simple programs which do not + perform any word separation get desired behaviour. */ +static const char *default_prefixes[] = + { " ~", "\t~", (const char *)NULL }; + +/* The default value of tilde_additional_suffixes. This is set to + whitespace or newline so that simple programs which do not + perform any word separation get desired behaviour. */ +static const char *default_suffixes[] = + { " ", "\n", (const char *)NULL }; + +/* If non-null, this contains the address of a function that the application + wants called before trying the standard tilde expansions. The function + is called with the text sans tilde, and returns a malloc()'ed string + which is the expansion, or a NULL pointer if the expansion fails. */ +tilde_hook_func_t *tilde_expansion_preexpansion_hook = (tilde_hook_func_t *)NULL; + +/* If non-null, this contains the address of a function to call if the + standard meaning for expanding a tilde fails. The function is called + with the text (sans tilde, as in "foo"), and returns a malloc()'ed string + which is the expansion, or a NULL pointer if there is no expansion. */ +tilde_hook_func_t *tilde_expansion_failure_hook = (tilde_hook_func_t *)NULL; + +/* When non-null, this is a NULL terminated array of strings which + are duplicates for a tilde prefix. Bash uses this to expand + `=~' and `:~'. */ +char **tilde_additional_prefixes = (char **)default_prefixes; + +/* When non-null, this is a NULL terminated array of strings which match + the end of a username, instead of just "/". Bash sets this to + `:' and `=~'. */ +char **tilde_additional_suffixes = (char **)default_suffixes; + +static int tilde_find_prefix (const char *, int *); +static int tilde_find_suffix (const char *); +static char *isolate_tilde_prefix (const char *, int *); +static char *glue_prefix_and_suffix (char *, const char *, int); + +/* Find the start of a tilde expansion in STRING, and return the index of + the tilde which starts the expansion. Place the length of the text + which identified this tilde starter in LEN, excluding the tilde itself. */ +static int +tilde_find_prefix (const char *string, int *len) +{ + register int i, j, string_len; + register char **prefixes; + + prefixes = tilde_additional_prefixes; + + string_len = strlen (string); + *len = 0; + + if (*string == '\0' || *string == '~') + return (0); + + if (prefixes) + { + for (i = 0; i < string_len; i++) + { + for (j = 0; prefixes[j]; j++) + { + if (strncmp (string + i, prefixes[j], strlen (prefixes[j])) == 0) + { + *len = strlen (prefixes[j]) - 1; + return (i + *len); + } + } + } + } + return (string_len); +} + +/* Find the end of a tilde expansion in STRING, and return the index of + the character which ends the tilde definition. */ +static int +tilde_find_suffix (const char *string) +{ + register int i, j, string_len; + register char **suffixes; + + suffixes = tilde_additional_suffixes; + string_len = strlen (string); + + for (i = 0; i < string_len; i++) + { +#if defined (__MSDOS__) + if (string[i] == '/' || string[i] == '\\' /* || !string[i] */) +#else + if (string[i] == '/' /* || !string[i] */) +#endif + break; + + for (j = 0; suffixes && suffixes[j]; j++) + { + if (strncmp (string + i, suffixes[j], strlen (suffixes[j])) == 0) + return (i); + } + } + return (i); +} + +/* Return a new string which is the result of tilde expanding STRING. */ +char * +tilde_expand (const char *string) +{ + char *result; + int result_size, result_index; + + result_index = result_size = 0; + if (result = strchr (string, '~')) + result = (char *)xmalloc (result_size = (strlen (string) + 16)); + else + result = (char *)xmalloc (result_size = (strlen (string) + 1)); + + /* Scan through STRING expanding tildes as we come to them. */ + while (1) + { + register int start, end; + char *tilde_word, *expansion; + int len; + + /* Make START point to the tilde which starts the expansion. */ + start = tilde_find_prefix (string, &len); + + /* Copy the skipped text into the result. */ + if ((result_index + start + 1) > result_size) + result = (char *)xrealloc (result, 1 + (result_size += (start + 20))); + + strncpy (result + result_index, string, start); + result_index += start; + + /* Advance STRING to the starting tilde. */ + string += start; + + /* Make END be the index of one after the last character of the + username. */ + end = tilde_find_suffix (string); + + /* If both START and END are zero, we are all done. */ + if (!start && !end) + break; + + /* Expand the entire tilde word, and copy it into RESULT. */ + tilde_word = (char *)xmalloc (1 + end); + strncpy (tilde_word, string, end); + tilde_word[end] = '\0'; + string += end; + + expansion = tilde_expand_word (tilde_word); + + if (expansion == 0) + expansion = tilde_word; + else + xfree (tilde_word); + + len = strlen (expansion); +#ifdef __CYGWIN__ + /* Fix for Cygwin to prevent ~user/xxx from expanding to //xxx when + $HOME for `user' is /. On cygwin, // denotes a network drive. */ + if (len > 1 || *expansion != '/' || *string != '/') +#endif + { + if ((result_index + len + 1) > result_size) + result = (char *)xrealloc (result, 1 + (result_size += (len + 20))); + + strcpy (result + result_index, expansion); + result_index += len; + } + xfree (expansion); + } + + result[result_index] = '\0'; + + return (result); +} + +/* Take FNAME and return the tilde prefix we want expanded. If LENP is + non-null, the index of the end of the prefix into FNAME is returned in + the location it points to. */ +static char * +isolate_tilde_prefix (const char *fname, int *lenp) +{ + char *ret; + int i; + + ret = (char *)xmalloc (strlen (fname)); +#if defined (__MSDOS__) + for (i = 1; fname[i] && fname[i] != '/' && fname[i] != '\\'; i++) +#else + for (i = 1; fname[i] && fname[i] != '/'; i++) +#endif + ret[i - 1] = fname[i]; + ret[i - 1] = '\0'; + if (lenp) + *lenp = i; + return ret; +} + +#if 0 +/* Public function to scan a string (FNAME) beginning with a tilde and find + the portion of the string that should be passed to the tilde expansion + function. Right now, it just calls tilde_find_suffix and allocates new + memory, but it can be expanded to do different things later. */ +char * +tilde_find_word (const char *fname, int flags, int *lenp) +{ + int x; + char *r; + + x = tilde_find_suffix (fname); + if (x == 0) + { + r = savestring (fname); + if (lenp) + *lenp = 0; + } + else + { + r = (char *)xmalloc (1 + x); + strncpy (r, fname, x); + r[x] = '\0'; + if (lenp) + *lenp = x; + } + + return r; +} +#endif + +/* Return a string that is PREFIX concatenated with SUFFIX starting at + SUFFIND. */ +static char * +glue_prefix_and_suffix (char *prefix, const char *suffix, int suffind) +{ + char *ret; + int plen, slen; + + plen = (prefix && *prefix) ? strlen (prefix) : 0; + slen = strlen (suffix + suffind); + ret = (char *)xmalloc (plen + slen + 1); + if (plen) + strcpy (ret, prefix); + strcpy (ret + plen, suffix + suffind); + return ret; +} + +/* Do the work of tilde expansion on FILENAME. FILENAME starts with a + tilde. If there is no expansion, call tilde_expansion_failure_hook. + This always returns a newly-allocated string, never static storage. */ +char * +tilde_expand_word (const char *filename) +{ + char *dirname, *expansion, *username; + int user_len; + struct passwd *user_entry; + + if (filename == 0) + return ((char *)NULL); + + if (*filename != '~') + return (savestring (filename)); + + /* A leading `~/' or a bare `~' is *always* translated to the value of + $HOME or the home directory of the current user, regardless of any + preexpansion hook. */ + if (filename[1] == '\0' || filename[1] == '/') + { + /* Prefix $HOME to the rest of the string. */ + expansion = sh_get_env_value ("HOME"); +#if defined (_WIN32) + if (expansion == 0) + expansion = sh_get_env_value ("APPDATA"); +#endif + + /* If there is no HOME variable, look up the directory in + the password database. */ + if (expansion == 0) + expansion = sh_get_home_dir (); + + return (glue_prefix_and_suffix (expansion, filename, 1)); + } + + username = isolate_tilde_prefix (filename, &user_len); + + if (tilde_expansion_preexpansion_hook) + { + expansion = (*tilde_expansion_preexpansion_hook) (username); + if (expansion) + { + dirname = glue_prefix_and_suffix (expansion, filename, user_len); + xfree (username); + xfree (expansion); + return (dirname); + } + } + + /* No preexpansion hook, or the preexpansion hook failed. Look in the + password database. */ + dirname = (char *)NULL; +#if defined (HAVE_GETPWNAM) + user_entry = getpwnam (username); +#else + user_entry = 0; +#endif + if (user_entry == 0) + { + /* If the calling program has a special syntax for expanding tildes, + and we couldn't find a standard expansion, then let them try. */ + if (tilde_expansion_failure_hook) + { + expansion = (*tilde_expansion_failure_hook) (username); + if (expansion) + { + dirname = glue_prefix_and_suffix (expansion, filename, user_len); + xfree (expansion); + } + } + /* If we don't have a failure hook, or if the failure hook did not + expand the tilde, return a copy of what we were passed. */ + if (dirname == 0) + dirname = savestring (filename); + } +#if defined (HAVE_GETPWENT) + else + dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len); +#endif + + xfree (username); +#if defined (HAVE_GETPWENT) + endpwent (); +#endif + return (dirname); +} + + +#if defined (TEST) +#undef NULL +#include + +main (int argc, char **argv) +{ + char *result, line[512]; + int done = 0; + + while (!done) + { + printf ("~expand: "); + fflush (stdout); + + if (!gets (line)) + strcpy (line, "done"); + + if ((strcmp (line, "done") == 0) || + (strcmp (line, "quit") == 0) || + (strcmp (line, "exit") == 0)) + { + done = 1; + break; + } + + result = tilde_expand (line); + printf (" --> %s\n", result); + free (result); + } + exit (0); +} + +static void memory_error_and_abort (void); + +static void * +xmalloc (size_t bytes) +{ + void *temp = (char *)malloc (bytes); + + if (!temp) + memory_error_and_abort (); + return (temp); +} + +static void * +xrealloc (void *pointer, int bytes) +{ + void *temp; + + if (!pointer) + temp = malloc (bytes); + else + temp = realloc (pointer, bytes); + + if (!temp) + memory_error_and_abort (); + + return (temp); +} + +static void +memory_error_and_abort (void) +{ + fprintf (stderr, "readline: out of virtual memory\n"); + abort (); +} + +/* + * Local variables: + * compile-command: "gcc -g -DTEST -o tilde tilde.c" + * end: + */ +#endif /* TEST */ diff --git a/bash-5.1/lib/tilde/tilde.h b/bash-5.1/lib/tilde/tilde.h new file mode 100644 index 0000000000000000000000000000000000000000..e26dd0476f7b3369ff842c26716640b7a4b99b89 --- /dev/null +++ b/bash-5.1/lib/tilde/tilde.h @@ -0,0 +1,80 @@ +/* tilde.h: Externally available variables and function in libtilde.a. */ + +/* Copyright (C) 1992-2009 Free Software Foundation, Inc. + + This file contains the Readline Library (Readline), a set of + routines for providing Emacs style line input to programs that ask + for it. + + Readline 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. + + Readline 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 Readline. If not, see . +*/ + +#if !defined (_TILDE_H_) +# define _TILDE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* A function can be defined using prototypes and compile on both ANSI C + and traditional C compilers with something like this: + extern char *func PARAMS((char *, char *, int)); */ + +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +typedef char *tilde_hook_func_t PARAMS((char *)); + +/* If non-null, this contains the address of a function that the application + wants called before trying the standard tilde expansions. The function + is called with the text sans tilde, and returns a malloc()'ed string + which is the expansion, or a NULL pointer if the expansion fails. */ +extern tilde_hook_func_t *tilde_expansion_preexpansion_hook; + +/* If non-null, this contains the address of a function to call if the + standard meaning for expanding a tilde fails. The function is called + with the text (sans tilde, as in "foo"), and returns a malloc()'ed string + which is the expansion, or a NULL pointer if there is no expansion. */ +extern tilde_hook_func_t *tilde_expansion_failure_hook; + +/* When non-null, this is a NULL terminated array of strings which + are duplicates for a tilde prefix. Bash uses this to expand + `=~' and `:~'. */ +extern char **tilde_additional_prefixes; + +/* When non-null, this is a NULL terminated array of strings which match + the end of a username, instead of just "/". Bash sets this to + `:' and `=~'. */ +extern char **tilde_additional_suffixes; + +/* Return a new string which is the result of tilde expanding STRING. */ +extern char *tilde_expand PARAMS((const char *)); + +/* Do the work of tilde expansion on FILENAME. FILENAME starts with a + tilde. If there is no expansion, call tilde_expansion_failure_hook. */ +extern char *tilde_expand_word PARAMS((const char *)); + +/* Find the portion of the string beginning with ~ that should be expanded. */ +extern char *tilde_find_word PARAMS((const char *, int, int *)); + +#ifdef __cplusplus +} +#endif + +#endif /* _TILDE_H_ */ diff --git a/bash-5.1/list.c b/bash-5.1/list.c new file mode 100644 index 0000000000000000000000000000000000000000..88835f58e517bcd1f510183048478278e020f76f --- /dev/null +++ b/bash-5.1/list.c @@ -0,0 +1,136 @@ +/* list.c - Functions for manipulating linked lists of objects. */ + +/* Copyright (C) 1996-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "shell.h" + +/* A global variable which acts as a sentinel for an `error' list return. */ +GENERIC_LIST global_error_list; + +#ifdef INCLUDE_UNUSED +/* Call FUNCTION on every member of LIST, a generic list. */ +void +list_walk (list, function) + GENERIC_LIST *list; + sh_glist_func_t *function; +{ + for ( ; list; list = list->next) + if ((*function) (list) < 0) + return; +} + +/* Call FUNCTION on every string in WORDS. */ +void +wlist_walk (words, function) + WORD_LIST *words; + sh_icpfunc_t *function; +{ + for ( ; words; words = words->next) + if ((*function) (words->word->word) < 0) + return; +} +#endif /* INCLUDE_UNUSED */ + +/* Reverse the chain of structures in LIST. Output the new head + of the chain. You should always assign the output value of this + function to something, or you will lose the chain. */ +GENERIC_LIST * +list_reverse (list) + GENERIC_LIST *list; +{ + register GENERIC_LIST *next, *prev; + + for (prev = (GENERIC_LIST *)NULL; list; ) + { + next = list->next; + list->next = prev; + prev = list; + list = next; + } + return (prev); +} + +/* Return the number of elements in LIST, a generic list. */ +int +list_length (list) + GENERIC_LIST *list; +{ + register int i; + + for (i = 0; list; list = list->next, i++); + return (i); +} + +/* Append TAIL to HEAD. Return the header of the list. */ +GENERIC_LIST * +list_append (head, tail) + GENERIC_LIST *head, *tail; +{ + register GENERIC_LIST *t_head; + + if (head == 0) + return (tail); + + for (t_head = head; t_head->next; t_head = t_head->next) + ; + t_head->next = tail; + return (head); +} + +#ifdef INCLUDE_UNUSED +/* Delete the element of LIST which satisfies the predicate function COMPARER. + Returns the element that was deleted, so you can dispose of it, or -1 if + the element wasn't found. COMPARER is called with the list element and + then ARG. Note that LIST contains the address of a variable which points + to the list. You might call this function like this: + + SHELL_VAR *elt = list_remove (&variable_list, check_var_has_name, "foo"); + dispose_variable (elt); +*/ +GENERIC_LIST * +list_remove (list, comparer, arg) + GENERIC_LIST **list; + Function *comparer; + char *arg; +{ + register GENERIC_LIST *prev, *temp; + + for (prev = (GENERIC_LIST *)NULL, temp = *list; temp; prev = temp, temp = temp->next) + { + if ((*comparer) (temp, arg)) + { + if (prev) + prev->next = temp->next; + else + *list = temp->next; + return (temp); + } + } + return ((GENERIC_LIST *)&global_error_list); +} +#endif diff --git a/bash-5.1/locale.c b/bash-5.1/locale.c new file mode 100644 index 0000000000000000000000000000000000000000..a6c07a3764025d568c3e5609f6e69739685dbe5b --- /dev/null +++ b/bash-5.1/locale.c @@ -0,0 +1,639 @@ +/* locale.c - Miscellaneous internationalization functions. */ + +/* Copyright (C) 1996-2009,2012,2016,2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if HAVE_LANGINFO_CODESET +# include +#endif + +#include "bashintl.h" +#include "bashansi.h" +#include +#include "chartypes.h" +#include + +#include "shell.h" +#include "input.h" /* For bash_input */ + +#ifndef errno +extern int errno; +#endif + +int locale_utf8locale; +int locale_mb_cur_max; /* value of MB_CUR_MAX for current locale (LC_CTYPE) */ +int locale_shiftstates = 0; + +extern int dump_translatable_strings, dump_po_strings; + +/* The current locale when the program begins */ +static char *default_locale; + +/* The current domain for textdomain(3). */ +static char *default_domain; +static char *default_dir; + +/* tracks the value of LC_ALL; used to override values for other locale + categories */ +static char *lc_all; + +/* tracks the value of LC_ALL; used to provide defaults for locale + categories */ +static char *lang; + +/* Called to reset all of the locale variables to their appropriate values + if (and only if) LC_ALL has not been assigned a value. */ +static int reset_locale_vars PARAMS((void)); + +static void locale_setblanks PARAMS((void)); +static int locale_isutf8 PARAMS((char *)); + +/* Set the value of default_locale and make the current locale the + system default locale. This should be called very early in main(). */ +void +set_default_locale () +{ +#if defined (HAVE_SETLOCALE) + default_locale = setlocale (LC_ALL, ""); +#else + default_locale = savestring ("C"); +#endif /* HAVE_SETLOCALE */ + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + locale_mb_cur_max = MB_CUR_MAX; + locale_utf8locale = locale_isutf8 (default_locale); +#if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +#else + local_shiftstates = 0; +#endif +} + +/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC and + LC_TIME if they are not specified in the environment, but LC_ALL is. This + should be called from main() after parsing the environment. */ +void +set_default_locale_vars () +{ + char *val; + +#if defined (HAVE_SETLOCALE) + +# if defined (LC_CTYPE) + val = get_string_value ("LC_CTYPE"); + if (val == 0 && lc_all && *lc_all) + { + setlocale (LC_CTYPE, lc_all); + locale_setblanks (); + locale_mb_cur_max = MB_CUR_MAX; + locale_utf8locale = locale_isutf8 (lc_all); + +# if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +# else + local_shiftstates = 0; +# endif + + u32reset (); + } +# endif + +# if defined (LC_COLLATE) + val = get_string_value ("LC_COLLATE"); + if (val == 0 && lc_all && *lc_all) + setlocale (LC_COLLATE, lc_all); +# endif /* LC_COLLATE */ + +# if defined (LC_MESSAGES) + val = get_string_value ("LC_MESSAGES"); + if (val == 0 && lc_all && *lc_all) + setlocale (LC_MESSAGES, lc_all); +# endif /* LC_MESSAGES */ + +# if defined (LC_NUMERIC) + val = get_string_value ("LC_NUMERIC"); + if (val == 0 && lc_all && *lc_all) + setlocale (LC_NUMERIC, lc_all); +# endif /* LC_NUMERIC */ + +# if defined (LC_TIME) + val = get_string_value ("LC_TIME"); + if (val == 0 && lc_all && *lc_all) + setlocale (LC_TIME, lc_all); +# endif /* LC_TIME */ + +#endif /* HAVE_SETLOCALE */ + + val = get_string_value ("TEXTDOMAIN"); + if (val && *val) + { + FREE (default_domain); + default_domain = savestring (val); + if (default_dir && *default_dir) + bindtextdomain (default_domain, default_dir); + } + + val = get_string_value ("TEXTDOMAINDIR"); + if (val && *val) + { + FREE (default_dir); + default_dir = savestring (val); + if (default_domain && *default_domain) + bindtextdomain (default_domain, default_dir); + } +} + +/* Set one of the locale categories (specified by VAR) to VALUE. Returns 1 + if successful, 0 otherwise. */ +int +set_locale_var (var, value) + char *var, *value; +{ + int r; + char *x; + + x = ""; + errno = 0; + if (var[0] == 'T' && var[10] == 0) /* TEXTDOMAIN */ + { + FREE (default_domain); + default_domain = value ? savestring (value) : (char *)NULL; + if (default_dir && *default_dir) + bindtextdomain (default_domain, default_dir); + return (1); + } + else if (var[0] == 'T') /* TEXTDOMAINDIR */ + { + FREE (default_dir); + default_dir = value ? savestring (value) : (char *)NULL; + if (default_domain && *default_domain) + bindtextdomain (default_domain, default_dir); + return (1); + } + + /* var[0] == 'L' && var[1] == 'C' && var[2] == '_' */ + + else if (var[3] == 'A') /* LC_ALL */ + { + FREE (lc_all); + if (value) + lc_all = savestring (value); + else + { + lc_all = (char *)xmalloc (1); + lc_all[0] = '\0'; + } +#if defined (HAVE_SETLOCALE) + r = *lc_all ? ((x = setlocale (LC_ALL, lc_all)) != 0) : reset_locale_vars (); + if (x == 0) + { + if (errno == 0) + internal_warning(_("setlocale: LC_ALL: cannot change locale (%s)"), lc_all); + else + internal_warning(_("setlocale: LC_ALL: cannot change locale (%s): %s"), lc_all, strerror (errno)); + } + locale_setblanks (); + locale_mb_cur_max = MB_CUR_MAX; + /* if LC_ALL == "", reset_locale_vars has already called this */ + if (*lc_all && x) + locale_utf8locale = locale_isutf8 (lc_all); +# if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +# else + local_shiftstates = 0; +# endif + u32reset (); + return r; +#else + return (1); +#endif + } + +#if defined (HAVE_SETLOCALE) + else if (var[3] == 'C' && var[4] == 'T') /* LC_CTYPE */ + { +# if defined (LC_CTYPE) + if (lc_all == 0 || *lc_all == '\0') + { + x = setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE")); + locale_setblanks (); + locale_mb_cur_max = MB_CUR_MAX; + /* if setlocale() returns NULL, the locale is not changed */ + if (x) + locale_utf8locale = locale_isutf8 (x); +#if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +#else + local_shiftstates = 0; +#endif + u32reset (); + } +# endif + } + else if (var[3] == 'C' && var[4] == 'O') /* LC_COLLATE */ + { +# if defined (LC_COLLATE) + if (lc_all == 0 || *lc_all == '\0') + x = setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE")); +# endif /* LC_COLLATE */ + } + else if (var[3] == 'M' && var[4] == 'E') /* LC_MESSAGES */ + { +# if defined (LC_MESSAGES) + if (lc_all == 0 || *lc_all == '\0') + x = setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES")); +# endif /* LC_MESSAGES */ + } + else if (var[3] == 'N' && var[4] == 'U') /* LC_NUMERIC */ + { +# if defined (LC_NUMERIC) + if (lc_all == 0 || *lc_all == '\0') + x = setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")); +# endif /* LC_NUMERIC */ + } + else if (var[3] == 'T' && var[4] == 'I') /* LC_TIME */ + { +# if defined (LC_TIME) + if (lc_all == 0 || *lc_all == '\0') + x = setlocale (LC_TIME, get_locale_var ("LC_TIME")); +# endif /* LC_TIME */ + } +#endif /* HAVE_SETLOCALE */ + + if (x == 0) + { + if (errno == 0) + internal_warning(_("setlocale: %s: cannot change locale (%s)"), var, get_locale_var (var)); + else + internal_warning(_("setlocale: %s: cannot change locale (%s): %s"), var, get_locale_var (var), strerror (errno)); + } + + return (x != 0); +} + +/* Called when LANG is assigned a value. Tracks value in `lang'. Calls + reset_locale_vars() to reset any default values if LC_ALL is unset or + null. */ +int +set_lang (var, value) + char *var, *value; +{ + FREE (lang); + if (value) + lang = savestring (value); + else + { + lang = (char *)xmalloc (1); + lang[0] = '\0'; + } + + return ((lc_all == 0 || *lc_all == 0) ? reset_locale_vars () : 0); +} + +/* Set default values for LANG and LC_ALL. Default values for all other + locale-related variables depend on these. */ +void +set_default_lang () +{ + char *v; + + v = get_string_value ("LC_ALL"); + set_locale_var ("LC_ALL", v); + + v = get_string_value ("LANG"); + set_lang ("LANG", v); +} + +/* Get the value of one of the locale variables (LC_MESSAGES, LC_CTYPE). + The precedence is as POSIX.2 specifies: LC_ALL has precedence over + the specific locale variables, and LANG, if set, is used as the default. */ +char * +get_locale_var (var) + char *var; +{ + char *locale; + + locale = lc_all; + + if (locale == 0 || *locale == 0) + locale = get_string_value (var); /* XXX - no mem leak */ + if (locale == 0 || *locale == 0) + locale = lang; + if (locale == 0 || *locale == 0) +#if 0 + locale = default_locale; /* system-dependent; not really portable. should it be "C"? */ +#else + locale = ""; +#endif + return (locale); +} + +/* Called to reset all of the locale variables to their appropriate values + if (and only if) LC_ALL has not been assigned a value. DO NOT CALL THIS + IF LC_ALL HAS BEEN ASSIGNED A VALUE. */ +static int +reset_locale_vars () +{ + char *t, *x; +#if defined (HAVE_SETLOCALE) + if (lang == 0 || *lang == '\0') + maybe_make_export_env (); /* trust that this will change environment for setlocale */ + if (setlocale (LC_ALL, lang ? lang : "") == 0) + return 0; + + x = 0; +# if defined (LC_CTYPE) + x = setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE")); +# endif +# if defined (LC_COLLATE) + t = setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE")); +# endif +# if defined (LC_MESSAGES) + t = setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES")); +# endif +# if defined (LC_NUMERIC) + t = setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")); +# endif +# if defined (LC_TIME) + t = setlocale (LC_TIME, get_locale_var ("LC_TIME")); +# endif + + locale_setblanks (); + locale_mb_cur_max = MB_CUR_MAX; + if (x) + locale_utf8locale = locale_isutf8 (x); +# if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +# else + local_shiftstates = 0; +# endif + u32reset (); +#endif + return 1; +} + +/* Translate the contents of STRING, a $"..." quoted string, according + to the current locale. In the `C' or `POSIX' locale, or if gettext() + is not available, the passed string is returned unchanged. The + length of the translated string is returned in LENP, if non-null. */ +char * +localetrans (string, len, lenp) + char *string; + int len, *lenp; +{ + char *locale, *t; + char *translated; + int tlen; + + /* Don't try to translate null strings. */ + if (string == 0 || *string == 0) + { + if (lenp) + *lenp = 0; + return ((char *)NULL); + } + + locale = get_locale_var ("LC_MESSAGES"); + + /* If we don't have setlocale() or the current locale is `C' or `POSIX', + just return the string. If we don't have gettext(), there's no use + doing anything else. */ + if (locale == 0 || locale[0] == '\0' || + (locale[0] == 'C' && locale[1] == '\0') || STREQ (locale, "POSIX")) + { + t = (char *)xmalloc (len + 1); + strcpy (t, string); + if (lenp) + *lenp = len; + return (t); + } + + /* Now try to translate it. */ + if (default_domain && *default_domain) + translated = dgettext (default_domain, string); + else + translated = string; + + if (translated == string) /* gettext returns its argument if untranslatable */ + { + t = (char *)xmalloc (len + 1); + strcpy (t, string); + if (lenp) + *lenp = len; + } + else + { + tlen = strlen (translated); + t = (char *)xmalloc (tlen + 1); + strcpy (t, translated); + if (lenp) + *lenp = tlen; + } + return (t); +} + +/* Change a bash string into a string suitable for inclusion in a `po' file. + This backslash-escapes `"' and `\' and changes newlines into \\\n"\n". */ +char * +mk_msgstr (string, foundnlp) + char *string; + int *foundnlp; +{ + register int c, len; + char *result, *r, *s; + + for (len = 0, s = string; s && *s; s++) + { + len++; + if (*s == '"' || *s == '\\') + len++; + else if (*s == '\n') + len += 5; + } + + r = result = (char *)xmalloc (len + 3); + *r++ = '"'; + + for (s = string; s && (c = *s); s++) + { + if (c == '\n') /* -> \n"" */ + { + *r++ = '\\'; + *r++ = 'n'; + *r++ = '"'; + *r++ = '\n'; + *r++ = '"'; + if (foundnlp) + *foundnlp = 1; + continue; + } + if (c == '"' || c == '\\') + *r++ = '\\'; + *r++ = c; + } + + *r++ = '"'; + *r++ = '\0'; + + return result; +} + +/* $"..." -- Translate the portion of STRING between START and END + according to current locale using gettext (if available) and return + the result. The caller will take care of leaving the quotes intact. + The string will be left without the leading `$' by the caller. + If translation is performed, the translated string will be double-quoted + by the caller. The length of the translated string is returned in LENP, + if non-null. */ +char * +localeexpand (string, start, end, lineno, lenp) + char *string; + int start, end, lineno, *lenp; +{ + int len, tlen, foundnl; + char *temp, *t, *t2; + + temp = (char *)xmalloc (end - start + 1); + for (tlen = 0, len = start; len < end; ) + temp[tlen++] = string[len++]; + temp[tlen] = '\0'; + + /* If we're just dumping translatable strings, don't do anything with the + string itself, but if we're dumping in `po' file format, convert it into + a form more palatable to gettext(3) and friends by quoting `"' and `\' + with backslashes and converting into `\n""'. If we find a + newline in TEMP, we first output a `msgid ""' line and then the + translated string; otherwise we output the `msgid' and translated + string all on one line. */ + if (dump_translatable_strings) + { + if (dump_po_strings) + { + foundnl = 0; + t = mk_msgstr (temp, &foundnl); + t2 = foundnl ? "\"\"\n" : ""; + + printf ("#: %s:%d\nmsgid %s%s\nmsgstr \"\"\n", + yy_input_name (), lineno, t2, t); + free (t); + } + else + printf ("\"%s\"\n", temp); + + if (lenp) + *lenp = tlen; + return (temp); + } + else if (*temp) + { + t = localetrans (temp, tlen, &len); + free (temp); + if (lenp) + *lenp = len; + return (t); + } + else + { + if (lenp) + *lenp = 0; + return (temp); + } +} + +/* Set every character in the character class to be a shell break + character for the lexical analyzer when the locale changes. */ +static void +locale_setblanks () +{ + int x; + + for (x = 0; x < sh_syntabsiz; x++) + { + if (isblank ((unsigned char)x)) + sh_syntaxtab[x] |= CSHBRK|CBLANK; + else if (member (x, shell_break_chars)) + { + sh_syntaxtab[x] |= CSHBRK; + sh_syntaxtab[x] &= ~CBLANK; + } + else + sh_syntaxtab[x] &= ~(CSHBRK|CBLANK); + } +} + +/* Parse a locale specification + language[_territory][.codeset][@modifier][+special][,[sponsor][_revision]] + and return TRUE if the codeset is UTF-8 or utf8 */ +static int +locale_isutf8 (lspec) + char *lspec; +{ + char *cp, *encoding; + +#if HAVE_LANGINFO_CODESET + cp = nl_langinfo (CODESET); + return (STREQ (cp, "UTF-8") || STREQ (cp, "utf8")); +#elif HAVE_LOCALE_CHARSET + cp = locale_charset (); + return (STREQ (cp, "UTF-8") || STREQ (cp, "utf8")); +#else + /* Take a shot */ + for (cp = lspec; *cp && *cp != '@' && *cp != '+' && *cp != ','; cp++) + { + if (*cp == '.') + { + for (encoding = ++cp; *cp && *cp != '@' && *cp != '+' && *cp != ','; cp++) + ; + /* The encoding (codeset) is the substring between encoding and cp */ + if ((cp - encoding == 5 && STREQN (encoding, "UTF-8", 5)) || + (cp - encoding == 4 && STREQN (encoding, "utf8", 4))) + return 1; + else + return 0; + } + } + return 0; +#endif +} + +#if defined (HAVE_LOCALECONV) +int +locale_decpoint () +{ + struct lconv *lv; + + lv = localeconv (); + return (lv && lv->decimal_point && lv->decimal_point[0]) ? lv->decimal_point[0] : '.'; +} +#else +# undef locale_decpoint +int +locale_decpoint () +{ + return '.'; +} +#endif diff --git a/bash-5.1/m4/codeset.m4 b/bash-5.1/m4/codeset.m4 new file mode 100644 index 0000000000000000000000000000000000000000..280f556fe83dfb4ac832f8533cfc5610feb57275 --- /dev/null +++ b/bash-5.1/m4/codeset.m4 @@ -0,0 +1,24 @@ +# codeset.m4 serial 5 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019 Free Software +dnl Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[char* cs = nl_langinfo(CODESET); return !cs;]])], + [am_cv_langinfo_codeset=yes], + [am_cv_langinfo_codeset=no]) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE([HAVE_LANGINFO_CODESET], [1], + [Define if you have and nl_langinfo(CODESET).]) + fi +]) diff --git a/bash-5.1/m4/extern-inline.m4 b/bash-5.1/m4/extern-inline.m4 new file mode 100644 index 0000000000000000000000000000000000000000..ec9f2218bf33c31f37ca41f8a914116d055010a0 --- /dev/null +++ b/bash-5.1/m4/extern-inline.m4 @@ -0,0 +1,114 @@ +dnl 'extern inline' a la ISO C99. + +dnl Copyright 2012-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_EXTERN_INLINE], +[ + AH_VERBATIM([extern_inline], +[/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif]) +]) diff --git a/bash-5.1/m4/fcntl-o.m4 b/bash-5.1/m4/fcntl-o.m4 new file mode 100644 index 0000000000000000000000000000000000000000..6ab3387dafab1f7105fb0f4c019fa6822982026f --- /dev/null +++ b/bash-5.1/m4/fcntl-o.m4 @@ -0,0 +1,139 @@ +# fcntl-o.m4 serial 6 +dnl Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Paul Eggert. + +AC_PREREQ([2.60]) + +# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. +# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. +# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. +AC_DEFUN([gl_FCNTL_O_FLAGS], +[ + dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CHECK_FUNCS_ONCE([symlink]) + AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + ]], + [[ + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result;]])], + [gl_cv_header_working_fcntl_h=yes], + [case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac], + [case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac + ]) + ]) + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], + [Define to 1 if O_NOATIME works.]) + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], + [Define to 1 if O_NOFOLLOW works.]) +]) diff --git a/bash-5.1/m4/gettext.m4 b/bash-5.1/m4/gettext.m4 new file mode 100644 index 0000000000000000000000000000000000000000..fec3804575840c85b1d0d1302896f1d10b7f4aac --- /dev/null +++ b/bash-5.1/m4/gettext.m4 @@ -0,0 +1,419 @@ +# gettext.m4 serial 69 (gettext-0.19.9) +dnl Copyright (C) 1995-2014, 2016, 2018-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2006, 2008-2010. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value '$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], + [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) + define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH([included-gettext], + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + [$gt_func_gnugettext_libintl], + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv. + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE([ENABLE_NLS], [1], + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE([HAVE_GETTEXT], [1], + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE([HAVE_DCGETTEXT], [1], + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST([BUILD_INCLUDED_LIBINTL]) + AC_SUBST([USE_INCLUDED_LIBINTL]) + AC_SUBST([CATOBJEXT]) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST([DATADIRNAME]) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST([INSTOBJEXT]) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST([GENCAT]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST([INTLOBJS]) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST([INTLLIBS]) + + dnl Make all documented variables known to autoconf. + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + AC_SUBST([POSUB]) +]) + + +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + + +dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) diff --git a/bash-5.1/m4/glibc2.m4 b/bash-5.1/m4/glibc2.m4 new file mode 100644 index 0000000000000000000000000000000000000000..17a7004009f6874c3d209d1d90db4eedaa270e36 --- /dev/null +++ b/bash-5.1/m4/glibc2.m4 @@ -0,0 +1,31 @@ +# glibc2.m4 serial 3 +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2019 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Test for the GNU C Library, version 2.0 or newer. +# From Bruno Haible. + +AC_DEFUN([gt_GLIBC2], + [ + AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], + [ac_cv_gnu_library_2], + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif +#endif + ], + [ac_cv_gnu_library_2=yes], + [ac_cv_gnu_library_2=no]) + ] + ) + AC_SUBST([GLIBC2]) + GLIBC2="$ac_cv_gnu_library_2" + ] +) diff --git a/bash-5.1/m4/glibc21.m4 b/bash-5.1/m4/glibc21.m4 new file mode 100644 index 0000000000000000000000000000000000000000..0ab0f235a66224be382dfaacade43e977f3a3855 --- /dev/null +++ b/bash-5.1/m4/glibc21.m4 @@ -0,0 +1,34 @@ +# glibc21.m4 serial 5 +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2019 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Test for the GNU C Library, version 2.1 or newer, or uClibc. +# From Bruno Haible. + +AC_DEFUN([gl_GLIBC21], + [ + AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], + [ac_cv_gnu_library_2_1], + [AC_EGREP_CPP([Lucky], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif +#ifdef __UCLIBC__ + Lucky user +#endif + ], + [ac_cv_gnu_library_2_1=yes], + [ac_cv_gnu_library_2_1=no]) + ] + ) + AC_SUBST([GLIBC21]) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) diff --git a/bash-5.1/m4/host-cpu-c-abi.m4 b/bash-5.1/m4/host-cpu-c-abi.m4 new file mode 100644 index 0000000000000000000000000000000000000000..4407296d0849c39a782fbd44a9c873aeb52cdc76 --- /dev/null +++ b/bash-5.1/m4/host-cpu-c-abi.m4 @@ -0,0 +1,644 @@ +# host-cpu-c-abi.m4 serial 11 +dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible and Sam Steingold. + +dnl Sets the HOST_CPU variable to the canonical name of the CPU. +dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its +dnl C language ABI (application binary interface). +dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in +dnl config.h. +dnl +dnl This canonical name can be used to select a particular assembly language +dnl source file that will interoperate with C code on the given host. +dnl +dnl For example: +dnl * 'i386' and 'sparc' are different canonical names, because code for i386 +dnl will not run on SPARC CPUs and vice versa. They have different +dnl instruction sets. +dnl * 'sparc' and 'sparc64' are different canonical names, because code for +dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code +dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit +dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit +dnl mode, but not both. +dnl * 'mips' and 'mipsn32' are different canonical names, because they use +dnl different argument passing and return conventions for C functions, and +dnl although the instruction set of 'mips' is a large subset of the +dnl instruction set of 'mipsn32'. +dnl * 'mipsn32' and 'mips64' are different canonical names, because they use +dnl different sizes for the C types like 'int' and 'void *', and although +dnl the instruction sets of 'mipsn32' and 'mips64' are the same. +dnl * The same canonical name is used for different endiannesses. You can +dnl determine the endianness through preprocessor symbols: +dnl - 'arm': test __ARMEL__. +dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. +dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. +dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 +dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because +dnl - Instructions that do not exist on all of these CPUs (cmpxchg, +dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your +dnl assembly language source files use such instructions, you will +dnl need to make the distinction. +dnl - Speed of execution of the common instruction set is reasonable across +dnl the entire family of CPUs. If you have assembly language source files +dnl that are optimized for particular CPU types (like GNU gmp has), you +dnl will need to make the distinction. +dnl See . +AC_DEFUN([gl_HOST_CPU_C_ABI], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_C_ASM]) + AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], + [case "$host_cpu" in + +changequote(,)dnl + i[4567]86 ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=i386 + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=x86_64-x32], + [gl_cv_host_cpu_c_abi=x86_64])], + [gl_cv_host_cpu_c_abi=i386]) + ;; + +changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __aarch64__ + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=arm64-ilp32], + [gl_cv_host_cpu_c_abi=arm64])], + [# Don't distinguish little-endian and big-endian arm, since they + # don't require different machine code for simple operations and + # since the user can distinguish them through the preprocessor + # defines __ARMEL__ vs. __ARMEB__. + # But distinguish arm which passes floating-point arguments and + # return values in integer registers (r0, r1, ...) - this is + # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which + # passes them in float registers (s0, s1, ...) and double registers + # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer + # sets the preprocessor defines __ARM_PCS (for the first case) and + # __ARM_PCS_VFP (for the second case), but older GCC does not. + echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c + # Look for a reference to the register d0 in the .s file. + AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 + if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then + gl_cv_host_cpu_c_abi=armhf + else + gl_cv_host_cpu_c_abi=arm + fi + rm -f conftest* + ]) + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __LP64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=hppa64], + [gl_cv_host_cpu_c_abi=hppa]) + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=ia64-ilp32], + [gl_cv_host_cpu_c_abi=ia64]) + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mips64], + [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIN32. + # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIO32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (_MIPS_SIM == _ABIN32) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mipsn32], + [gl_cv_host_cpu_c_abi=mips])]) + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + ]])], + [# On powerpc64, there are two ABIs on Linux: The AIX compatible + # one and the ELFv2 one. The latter defines _CALL_ELF=2. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _CALL_ELF && _CALL_ELF == 2 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=powerpc64-elfv2], + [gl_cv_host_cpu_c_abi=powerpc64]) + ], + [gl_cv_host_cpu_c_abi=powerpc]) + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi=powerpc + ;; + + riscv32 | riscv64 ) + # There are 2 architectures (with variants): rv32* and rv64*. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if __riscv_xlen == 64 + int ok; + #else + error fail + #endif + ]])], + [cpu=riscv64], + [cpu=riscv32]) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [main_abi=lp64], + [main_abi=ilp32]) + # Float ABIs: + # __riscv_float_abi_double: + # 'float' and 'double' are passed in floating-point registers. + # __riscv_float_abi_single: + # 'float' are passed in floating-point registers. + # __riscv_float_abi_soft: + # No values are passed in floating-point registers. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_double + int ok; + #else + error fail + #endif + ]])], + [float_abi=d], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_single + int ok; + #else + error fail + #endif + ]])], + [float_abi=f], + [float_abi='']) + ]) + gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=s390x], + [gl_cv_host_cpu_c_abi=s390]) + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=sparc64], + [gl_cv_host_cpu_c_abi=sparc]) + ;; + + *) + gl_cv_host_cpu_c_abi="$host_cpu" + ;; + esac + ]) + + dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. + HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` + HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" + AC_SUBST([HOST_CPU]) + AC_SUBST([HOST_CPU_C_ABI]) + + # This was + # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) + # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) + # earlier, but KAI C++ 3.2d doesn't like this. + sed -e 's/-/_/g' >> confdefs.h < +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_func_iconv=yes]) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + ]], + [[int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; +]])], + [am_cv_func_iconv_works=yes], , + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [m4_ifdef([gl_00GNULIB], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])])) +gl_iconv_AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL([am_cv_proto_iconv], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + ]], + [[]])], + [am_cv_proto_iconv_arg1=""], + [am_cv_proto_iconv_arg1="const"]) + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + else + dnl When compiling GNU libiconv on a system that does not have iconv yet, + dnl pick the POSIX compliant declaration without 'const'. + am_cv_proto_iconv_arg1="" + fi + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) +]) diff --git a/bash-5.1/m4/intdiv0.m4 b/bash-5.1/m4/intdiv0.m4 new file mode 100644 index 0000000000000000000000000000000000000000..40dd43b3daaa706dc1f0b400d32c41adcb64d5a1 --- /dev/null +++ b/bash-5.1/m4/intdiv0.m4 @@ -0,0 +1,87 @@ +# intdiv0.m4 serial 6 (gettext-0.18.2) +dnl Copyright (C) 2002, 2007-2008, 2010-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([gt_INTDIV0], +[ + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], + gt_cv_int_divbyzero_sigfpe, + [ + gt_cv_int_divbyzero_sigfpe= +changequote(,)dnl + case "$host_os" in + macos* | darwin[6-9]* | darwin[1-9][0-9]*) + # On Mac OS X 10.2 or newer, just assume the same as when cross- + # compiling. If we were to perform the real test, 1 Crash Report + # dialog window would pop up. + case "$host_cpu" in + i[34567]86 | x86_64) + gt_cv_int_divbyzero_sigfpe="guessing yes" ;; + esac + ;; + esac +changequote([,])dnl + if test -z "$gt_cv_int_divbyzero_sigfpe"; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include + +static void +sigfpe_handler (int sig) +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int xnan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + xnan = y / y; + exit (2); +} +]])], + [gt_cv_int_divbyzero_sigfpe=yes], + [gt_cv_int_divbyzero_sigfpe=no], + [ + # Guess based on the CPU. +changequote(,)dnl + case "$host_cpu" in + alpha* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac +changequote([,])dnl + ]) + fi + ]) + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value], + [Define if integer division by zero raises signal SIGFPE.]) +]) diff --git a/bash-5.1/m4/intl-thread-locale.m4 b/bash-5.1/m4/intl-thread-locale.m4 new file mode 100644 index 0000000000000000000000000000000000000000..3ecba86aff780f712b6cf55f7d0d9650068b1e0f --- /dev/null +++ b/bash-5.1/m4/intl-thread-locale.m4 @@ -0,0 +1,183 @@ +# intl-thread-locale.m4 serial 4 +dnl Copyright (C) 2015-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Check how to retrieve the name of a per-thread locale (POSIX locale_t). +dnl Sets gt_nameless_locales. +AC_DEFUN([gt_INTL_THREAD_LOCALE_NAME], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade Solaris to define 'locale_t'. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl Test whether uselocale() exists and works at all. + gt_FUNC_USELOCALE + + dnl On OpenBSD >= 6.2, the locale_t type and the uselocale(), newlocale(), + dnl duplocale(), freelocale() functions exist but are effectively useless, + dnl because the locale_t value depends only on the LC_CTYPE category of the + dnl locale and furthermore contains only one bit of information (it + dnl distinguishes the "C" locale from the *.UTF-8 locales). See + dnl . + dnl In the setlocale() implementation they have thought about the programs + dnl that use the API ("Even though only LC_CTYPE has any effect in the + dnl OpenBSD base system, store complete information about the global locale, + dnl such that third-party software can access it"), but for uselocale() + dnl they did not think about the programs. + dnl In this situation, even the HAVE_NAMELESS_LOCALES support does not work. + dnl So, define HAVE_FAKE_LOCALES and disable all locale_t support. + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CHECK_HEADERS_ONCE([xlocale.h]) + AC_CACHE_CHECK([for fake locale system (OpenBSD)], + [gt_cv_locale_fake], + [AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + locale_t loc1, loc2; + if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; + if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; + loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); + loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); + return !(loc1 == loc2); +}]])], + [gt_cv_locale_fake=yes], + [gt_cv_locale_fake=no], + [dnl Guess the locale system is fake only on OpenBSD. + case "$host_os" in + openbsd*) gt_cv_locale_fake="guessing yes" ;; + *) gt_cv_locale_fake="guessing no" ;; + esac + ]) + ]) + ;; + *) gt_cv_locale_fake=no ;; + esac + case "$gt_cv_locale_fake" in + *yes) + AC_DEFINE([HAVE_FAKE_LOCALES], [1], + [Define if the locale_t type contains insufficient information, as on OpenBSD.]) + ;; + esac + + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CACHE_CHECK([for Solaris 11.4 locale system], + [gt_cv_locale_solaris114], + [case "$host_os" in + solaris*) + dnl Test whether defines locale_t as a typedef of + dnl 'struct _LC_locale_t **' (whereas Illumos defines it as a + dnl typedef of 'struct _locale *'). + dnl Another possible test would be to include + dnl and test whether it defines the _LC_core_data_locale_t type. + dnl This type was added in Solaris 11.4. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include + struct _LC_locale_t *x; + locale_t y; + ]], + [[*y = x;]])], + [gt_cv_locale_solaris114=yes], + [gt_cv_locale_solaris114=no]) + ;; + *) gt_cv_locale_solaris114=no ;; + esac + ]) + ;; + *) gt_cv_locale_solaris114=no ;; + esac + if test $gt_cv_locale_solaris114 = yes; then + AC_DEFINE([HAVE_SOLARIS114_LOCALES], [1], + [Define if the locale_t type is as on Solaris 11.4.]) + fi + + dnl Solaris 12 will maybe provide getlocalename_l. If it does, it will + dnl improve the implementation of gl_locale_name_thread(), by removing + dnl the use of undocumented structures. + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CHECK_FUNCS([getlocalename_l]) + ;; + esac + + dnl This code is for future use, in case we some day have to port to a + dnl platform where the locale_t type does not provide access to the name of + dnl each locale category. This code has the drawback that it requires the + dnl gnulib overrides of 'newlocale', 'duplocale', 'freelocale', which is a + dnl problem for GNU libunistring. Therefore try hard to avoid enabling this + dnl code! + gt_nameless_locales=no + if false; then + gt_nameless_locales=yes + AC_DEFINE([HAVE_NAMELESS_LOCALES], [1], + [Define if the locale_t type does not contain the name of each locale category.]) + fi +]) + +dnl Tests whether uselocale() exists and is usable. +dnl Sets gt_cv_func_uselocale_works. Defines HAVE_WORKING_USELOCALE. +AC_DEFUN([gt_FUNC_USELOCALE], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade Solaris to define 'locale_t'. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_FUNCS_ONCE([uselocale]) + + dnl On AIX 7.2, the uselocale() function is not documented and leads to + dnl crashes in subsequent setlocale() invocations. + if test $ac_cv_func_uselocale = yes; then + AC_CHECK_HEADERS_ONCE([xlocale.h]) + AC_CACHE_CHECK([whether uselocale works], + [gt_cv_func_uselocale_works], + [AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + uselocale (NULL); + setlocale (LC_ALL, "en_US.UTF-8"); + return 0; +}]])], + [gt_cv_func_uselocale_works=yes], + [gt_cv_func_uselocale_works=no], + [# Guess no on AIX, yes otherwise. + case "$host_os" in + aix*) gt_cv_func_uselocale_works="guessing no" ;; + *) gt_cv_func_uselocale_works="guessing yes" ;; + esac + ]) + ]) + else + gt_cv_func_uselocale_works=no + fi + case "$gt_cv_func_uselocale_works" in + *yes) + AC_DEFINE([HAVE_WORKING_USELOCALE], [1], + [Define if the uselocale function exists any may safely be called.]) + ;; + esac +]) diff --git a/bash-5.1/m4/intl.m4 b/bash-5.1/m4/intl.m4 new file mode 100644 index 0000000000000000000000000000000000000000..b481c5054502310a642dd334a7be5fb0597701be --- /dev/null +++ b/bash-5.1/m4/intl.m4 @@ -0,0 +1,312 @@ +# intl.m4 serial 34 (gettext-0.19.9) +dnl Copyright (C) 1995-2014, 2016-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2009. + +AC_PREREQ([2.60]) + +dnl Checks for all prerequisites of the intl subdirectory, +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. +AC_DEFUN([AM_INTL_SUBDIR], +[ + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([gt_GLIBC2])dnl + AC_REQUIRE([gl_VISIBILITY])dnl + AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl + AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl + AC_REQUIRE([gt_TYPE_WCHAR_T])dnl + AC_REQUIRE([gt_TYPE_WINT_T])dnl + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gt_TYPE_INTMAX_T]) + AC_REQUIRE([gt_PRINTF_POSIX]) + AC_REQUIRE([gl_GLIBC21])dnl + AC_REQUIRE([gl_XSIZE])dnl + AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl + AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME]) + AC_REQUIRE([gt_INTL_MACOSX])dnl + AC_REQUIRE([gl_EXTERN_INLINE])dnl + AC_REQUIRE([gt_GL_ATTRIBUTE])dnl + AC_REQUIRE([AC_C_FLEXIBLE_ARRAY_MEMBER])dnl + + dnl In projects that use gnulib, use gl_PROG_AR_RANLIB. + dnl The '][' hides this use from 'aclocal'. + m4_ifdef([g][l_PROG_AR_RANLIB], + [AC_REQUIRE([g][l_PROG_AR_RANLIB])], + [AC_REQUIRE([AC_PROG_RANLIB]) + dnl Use Automake-documented default values for AR and ARFLAGS, but prefer + dnl ${host}-ar over ar (useful for cross-compiling). + AC_CHECK_TOOL([AR], [ar], [ar]) + if test -z "$ARFLAGS"; then + ARFLAGS='cr' + fi + AC_SUBST([AR]) + AC_SUBST([ARFLAGS]) + ]) + + dnl Support for automake's --enable-silent-rules. + case "$enable_silent_rules" in + yes) INTL_DEFAULT_VERBOSITY=0;; + no) INTL_DEFAULT_VERBOSITY=1;; + *) INTL_DEFAULT_VERBOSITY=1;; + esac + AC_SUBST([INTL_DEFAULT_VERBOSITY]) + + AC_CHECK_TYPE([ptrdiff_t], , + [AC_DEFINE([ptrdiff_t], [long], + [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) + ]) + AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h]) + AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ + snprintf strnlen uselocale wcslen wcsnlen mbrtowc wcrtomb]) + + dnl Use the _snprintf function only if it is declared (because on NetBSD it + dnl is defined as a weak alias of snprintf; we prefer to use the latter). + AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include ]) + + dnl Use the *_unlocked functions only if they are declared. + dnl (because some of them were defined without being declared in Solaris + dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built + dnl on Solaris 2.5.1 to run on Solaris 2.6). + AC_CHECK_DECLS([getc_unlocked], , , [#include ]) + + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac + AC_SUBST([HAVE_POSIX_PRINTF]) + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi + AC_SUBST([HAVE_ASPRINTF]) + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi + AC_SUBST([HAVE_SNPRINTF]) + if test "$ac_cv_func_newlocale" = yes; then + HAVE_NEWLOCALE=1 + else + HAVE_NEWLOCALE=0 + fi + AC_SUBST([HAVE_NEWLOCALE]) + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi + AC_SUBST([HAVE_WPRINTF]) + + AM_LANGINFO_CODESET + gt_LC_MESSAGES + + if test $gt_nameless_locales = yes; then + HAVE_NAMELESS_LOCALES=1 + else + HAVE_NAMELESS_LOCALES=0 + fi + AC_SUBST([HAVE_NAMELESS_LOCALES]) + + dnl Compilation on mingw and Cygwin needs special Makefile rules, because + dnl 1. when we install a shared library, we must arrange to export + dnl auxiliary pointer variables for every exported variable, + dnl 2. when we install a shared library and a static library simultaneously, + dnl the include file specifies __declspec(dllimport) and therefore we + dnl must arrange to define the auxiliary pointer variables for the + dnl exported variables _also_ in the static library. + if test "$enable_shared" = yes; then + case "$host_os" in + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac + else + is_woe32dll=no + fi + WOE32DLL=$is_woe32dll + AC_SUBST([WOE32DLL]) + + dnl On mingw and Cygwin, we can activate special Makefile rules which add + dnl version information to the shared libraries and executables. + case "$host_os" in + mingw* | cygwin*) is_woe32=yes ;; + *) is_woe32=no ;; + esac + WOE32=$is_woe32 + AC_SUBST([WOE32]) + if test $WOE32 = yes; then + dnl Check for a program that compiles Windows resource files. + AC_CHECK_TOOL([WINDRES], [windres]) + fi + + dnl Rename some macros and functions used for locking. + AH_BOTTOM([ +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock +#define __libc_lock_recursive_t gl_recursive_lock_t +#define __libc_lock_define_recursive gl_recursive_lock_define +#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized +#define __libc_lock_init_recursive gl_recursive_lock_init +#define __libc_lock_lock_recursive gl_recursive_lock_lock +#define __libc_lock_unlock_recursive gl_recursive_lock_unlock +#define glthread_in_use libintl_thread_in_use +#define glthread_lock_init_func libintl_lock_init_func +#define glthread_lock_lock_func libintl_lock_lock_func +#define glthread_lock_unlock_func libintl_lock_unlock_func +#define glthread_lock_destroy_func libintl_lock_destroy_func +#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded +#define glthread_rwlock_init_func libintl_rwlock_init_func +#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded +#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func +#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded +#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func +#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded +#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func +#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded +#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func +#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded +#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func +#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded +#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func +#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded +#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func +#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded +#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func +#define glthread_once_func libintl_once_func +#define glthread_once_singlethreaded libintl_once_singlethreaded +#define glthread_once_multithreaded libintl_once_multithreaded +]) +]) + + +dnl Checks for the core files of the intl subdirectory: +dnl dcigettext.c +dnl eval-plural.h +dnl explodename.c +dnl finddomain.c +dnl gettextP.h +dnl gmo.h +dnl hash-string.h hash-string.c +dnl l10nflist.c +dnl libgnuintl.h.in (except the *printf stuff) +dnl loadinfo.h +dnl loadmsgcat.c +dnl localealias.c +dnl log.c +dnl plural-exp.h plural-exp.c +dnl plural.y +dnl Used by libglocale. +AC_DEFUN([gt_INTL_SUBDIR_CORE], +[ + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl + AC_REQUIRE([gl_LOCK])dnl + + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], + [[]])], + [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], + [Define to 1 if the compiler understands __builtin_expect.])]) + + AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ + stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ + argz_next __fsetlocking]) + + dnl ADDED FOR BASH + AC_CHECK_FUNCS([localeconv]) + + dnl Use the *_unlocked functions only if they are declared. + dnl (because some of them were defined without being declared in Solaris + dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built + dnl on Solaris 2.5.1 to run on Solaris 2.6). + AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include ]) + + AM_ICONV + + dnl intl/plural.c is generated from intl/plural.y. It requires bison, + dnl because plural.y uses bison specific features. It requires at least + dnl bison-2.7 for %define api.pure. + dnl bison is only needed for the maintainer (who touches plural.y). But in + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put + dnl the rule in general Makefile. Now, some people carelessly touch the + dnl files or have a broken "make" program, hence the plural.c rule will + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not + dnl present or too old. + AC_CHECK_PROGS([INTLBISON], [bison]) + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + dnl Found it, now check the version. + AC_MSG_CHECKING([version of bison]) +changequote(<<,>>)dnl + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.[7-9]* | [3-9].*) +changequote([,])dnl + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + AC_MSG_RESULT([$ac_prog_version]) + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi +]) + +dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from +dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib. +AC_DEFUN([gt_GL_ATTRIBUTE], [ + m4_ifndef([gl_[]COMMON], + AH_VERBATIM([gt_gl_attribute], +[/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#ifndef _GL_UNUSED +# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +# else +# define _GL_UNUSED +# endif +#endif + +/* The __pure__ attribute was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif +]))]) diff --git a/bash-5.1/m4/intlmacosx.m4 b/bash-5.1/m4/intlmacosx.m4 new file mode 100644 index 0000000000000000000000000000000000000000..7a474270bd9840f644b1d1d6d900b6517d1e514d --- /dev/null +++ b/bash-5.1/m4/intlmacosx.m4 @@ -0,0 +1,72 @@ +# intlmacosx.m4 serial 6 (gettext-0.19.9) +dnl Copyright (C) 2004-2014, 2016, 2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Checks for special options needed on Mac OS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in Mac OS X 10.4. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + [gt_cv_func_CFPreferencesCopyAppValue], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFPreferencesCopyAppValue(NULL, NULL)]])], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], + [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Check for API introduced in Mac OS X 10.5. + AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyCurrent();]])], + [gt_cv_func_CFLocaleCopyCurrent=yes], + [gt_cv_func_CFLocaleCopyCurrent=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + fi + AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyPreferredLanguages();]])], + [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], + [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) diff --git a/bash-5.1/m4/intmax.m4 b/bash-5.1/m4/intmax.m4 new file mode 100644 index 0000000000000000000000000000000000000000..2f4b450bf3997ab76eae8fcd11c75720217af7c1 --- /dev/null +++ b/bash-5.1/m4/intmax.m4 @@ -0,0 +1,36 @@ +# intmax.m4 serial 6 (gettext-0.18.2) +dnl Copyright (C) 2002-2005, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether the system has the 'intmax_t' type, but don't attempt to +dnl find a replacement if it is lacking. + +AC_DEFUN([gt_TYPE_INTMAX_T], +[ + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + ]], + [[intmax_t x = -1; + return !x;]])], + [gt_cv_c_intmax_t=yes], + [gt_cv_c_intmax_t=no])]) + if test $gt_cv_c_intmax_t = yes; then + AC_DEFINE([HAVE_INTMAX_T], [1], + [Define if you have the 'intmax_t' type in or .]) + fi +]) diff --git a/bash-5.1/m4/inttypes-pri.m4 b/bash-5.1/m4/inttypes-pri.m4 new file mode 100644 index 0000000000000000000000000000000000000000..38fe118a3426f64f0db3d60ef98b3cb07453a9b5 --- /dev/null +++ b/bash-5.1/m4/inttypes-pri.m4 @@ -0,0 +1,42 @@ +# inttypes-pri.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1997-2002, 2006, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.53]) + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + +AC_DEFUN([gt_INTTYPES_PRI], +[ + AC_CHECK_HEADERS([inttypes.h]) + if test $ac_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + [gt_cv_inttypes_pri_broken], + [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifdef PRId32 +char *p = PRId32; +#endif + ]], + [[]])], + [gt_cv_inttypes_pri_broken=no], + [gt_cv_inttypes_pri_broken=yes]) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], + [Define if exists and defines unusable PRI* macros.]) + PRI_MACROS_BROKEN=1 + else + PRI_MACROS_BROKEN=0 + fi + AC_SUBST([PRI_MACROS_BROKEN]) +]) diff --git a/bash-5.1/m4/inttypes.m4 b/bash-5.1/m4/inttypes.m4 new file mode 100644 index 0000000000000000000000000000000000000000..c58a1bec4744437efe43a774d8c061b6e15293f1 --- /dev/null +++ b/bash-5.1/m4/inttypes.m4 @@ -0,0 +1,159 @@ +# inttypes.m4 serial 27 +dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Derek Price, Bruno Haible. +dnl Test whether is supported or must be substituted. + +AC_DEFUN([gl_INTTYPES_H], +[ + AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) + gl_INTTYPES_PRI_SCN +]) + +AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE], +[ + AC_REQUIRE([gl_STDINT_H]) + AC_CHECK_HEADERS_ONCE([inttypes.h]) + + dnl Override always, so that the portability warnings work. + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([inttypes.h]) + + AC_REQUIRE([gl_MULTIARCH]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [imaxabs imaxdiv strtoimax strtoumax]) +]) + +# Ensure that the PRI* and SCN* macros are defined appropriately. +AC_DEFUN([gl_INTTYPES_PRI_SCN], +[ + AC_REQUIRE([gt_INTTYPES_PRI]) + + PRIPTR_PREFIX= + if test -n "$STDINT_H"; then + dnl Using the gnulib . It always defines intptr_t to 'long'. + PRIPTR_PREFIX='"l"' + else + dnl Using the system's . + for glpfx in '' l ll I64; do + case $glpfx in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + I64) gltype1='__int64';; + esac + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + extern intptr_t foo; + extern $gltype1 foo;]])], + [PRIPTR_PREFIX='"'$glpfx'"']) + test -n "$PRIPTR_PREFIX" && break + done + fi + AC_SUBST([PRIPTR_PREFIX]) + + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT32_MAX_LT_INTMAX_MAX], + [defined INT32_MAX && defined INTMAX_MAX], + [INT32_MAX < INTMAX_MAX], + [sizeof (int) < sizeof (long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT64_MAX_EQ_LONG_MAX], + [defined INT64_MAX], + [INT64_MAX == LONG_MAX], + [sizeof (long long int) == sizeof (long int)]) + else + INT64_MAX_EQ_LONG_MAX=-1 + fi + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT32_MAX_LT_UINTMAX_MAX], + [defined UINT32_MAX && defined UINTMAX_MAX], + [UINT32_MAX < UINTMAX_MAX], + [sizeof (unsigned int) < sizeof (unsigned long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT64_MAX_EQ_ULONG_MAX], + [defined UINT64_MAX], + [UINT64_MAX == ULONG_MAX], + [sizeof (unsigned long long int) == sizeof (unsigned long int)]) + else + UINT64_MAX_EQ_ULONG_MAX=-1 + fi +]) + +# Define the symbol $1 to be 1 if the condition is true, 0 otherwise. +# If $2 is true, the condition is $3; otherwise if long long int is supported +# approximate the condition with $4; otherwise, assume the condition is false. +# The condition should work on all C99 platforms; the approximations should be +# good enough to work on all practical pre-C99 platforms. +# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. +AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], +[ + AC_CACHE_CHECK([whether $3], + [gl_cv_test_$1], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if $2 + #define CONDITION ($3) + #elif HAVE_LONG_LONG_INT + #define CONDITION ($4) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1];]])], + [gl_cv_test_$1=yes], + [gl_cv_test_$1=no])]) + if test $gl_cv_test_$1 = yes; then + $1=1; + else + $1=0; + fi + AC_SUBST([$1]) +]) + +AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_INTTYPES_H_DEFAULTS], +[ + GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) + GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) + GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) + GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) + HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) + HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) + HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) + HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T]) + REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) + REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) + INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) + INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) + PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) + PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX]) + UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX]) + UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX]) +]) diff --git a/bash-5.1/m4/inttypes_h.m4 b/bash-5.1/m4/inttypes_h.m4 new file mode 100644 index 0000000000000000000000000000000000000000..d20422a44998bf64c972ffb23a218abe6dce33c2 --- /dev/null +++ b/bash-5.1/m4/inttypes_h.m4 @@ -0,0 +1,29 @@ +# inttypes_h.m4 serial 10 +dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([gl_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[uintmax_t i = (uintmax_t) -1; return !i;]])], + [gl_cv_header_inttypes_h=yes], + [gl_cv_header_inttypes_h=no])]) + if test $gl_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/bash-5.1/m4/lcmessage.m4 b/bash-5.1/m4/lcmessage.m4 new file mode 100644 index 0000000000000000000000000000000000000000..8d32e10f9f1fd81af3be0cd1ab4b104d7be8f8e1 --- /dev/null +++ b/bash-5.1/m4/lcmessage.m4 @@ -0,0 +1,35 @@ +# lcmessage.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019 Free Software +dnl Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995. + +# Check whether LC_MESSAGES is available in . + +AC_DEFUN([gt_LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[return LC_MESSAGES]])], + [gt_cv_val_LC_MESSAGES=yes], + [gt_cv_val_LC_MESSAGES=no])]) + if test $gt_cv_val_LC_MESSAGES = yes; then + AC_DEFINE([HAVE_LC_MESSAGES], [1], + [Define if your file defines LC_MESSAGES.]) + fi +]) diff --git a/bash-5.1/m4/lib-ld.m4 b/bash-5.1/m4/lib-ld.m4 new file mode 100644 index 0000000000000000000000000000000000000000..a18719630d59538c0c03a8677aca2adcd63313aa --- /dev/null +++ b/bash-5.1/m4/lib-ld.m4 @@ -0,0 +1,168 @@ +# lib-ld.m4 serial 9 +dnl Copyright (C) 1996-2003, 2009-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid +dnl collision with libtool.m4. + +dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], +[# I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 /dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +if test -n "$LD"; then + AC_MSG_CHECKING([for ld]) +elif test "$GCC" = yes; then + AC_MSG_CHECKING([for ld used by $CC]) +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + AC_CACHE_VAL([acl_cv_path_LD], + [ + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + fi + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH(PACK[-prefix], +[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/bash-5.1/m4/lib-prefix.m4 b/bash-5.1/m4/lib-prefix.m4 new file mode 100644 index 0000000000000000000000000000000000000000..8adb17bb9167df0d9efa87e3da6e5bec47033389 --- /dev/null +++ b/bash-5.1/m4/lib-prefix.m4 @@ -0,0 +1,249 @@ +# lib-prefix.m4 serial 14 +dnl Copyright (C) 2001-2005, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH([lib-prefix], +[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) + + case "$host_os" in + solaris*) + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _LP64 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_solaris_64bit=yes], + [gl_cv_solaris_64bit=no]) + ]);; + esac + + dnl Allow the user to override the result by setting acl_cv_libdirstems. + AC_CACHE_CHECK([for the common suffixes of directories in the library search path], + [acl_cv_libdirstems], + [acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + dnl If $CC generates code for a 32-bit ABI, the libraries are + dnl surely under $prefix/lib, not $prefix/lib64. + if test "$HOST_CPU_C_ABI_32BIT" != yes; then + dnl The result is a property of the system. However, non-system + dnl compilers sometimes have odd library search paths. Therefore + dnl prefer asking /usr/bin/gcc, if available, rather than $CC. + searchpath=`(if test -f /usr/bin/gcc \ + && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ + LC_ALL=C /usr/bin/gcc -print-search-dirs; \ + else \ + LC_ALL=C $CC -print-search-dirs; \ + fi) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + ]) + # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` +]) diff --git a/bash-5.1/m4/lock.m4 b/bash-5.1/m4/lock.m4 new file mode 100644 index 0000000000000000000000000000000000000000..93b76fa44db620e4e44aca2946bd561db2cdfffd --- /dev/null +++ b/bash-5.1/m4/lock.m4 @@ -0,0 +1,47 @@ +# lock.m4 serial 14 +dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([gl_LOCK], +[ + AC_REQUIRE([gl_THREADLIB]) + if test "$gl_threads_api" = posix; then + # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + has_rwlock=false + AC_CHECK_TYPE([pthread_rwlock_t], + [has_rwlock=true + AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], + [Define if the POSIX multithreading library has read/write locks.])], + [], + [#include ]) + if $has_rwlock; then + gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER + fi + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [[#include ]], + [[ +#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif + ]])], + [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], + [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) + fi + gl_PREREQ_LOCK +]) + +# Prerequisites of lib/glthread/lock.c. +AC_DEFUN([gl_PREREQ_LOCK], [:]) diff --git a/bash-5.1/m4/nls.m4 b/bash-5.1/m4/nls.m4 new file mode 100644 index 0000000000000000000000000000000000000000..b62f6148570087e0dedc2704cd664fc8644fb467 --- /dev/null +++ b/bash-5.1/m4/nls.m4 @@ -0,0 +1,32 @@ +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019 Free Software +dnl Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) diff --git a/bash-5.1/m4/po.m4 b/bash-5.1/m4/po.m4 new file mode 100644 index 0000000000000000000000000000000000000000..ce72d01737c1b059545dfd5fc8b7c04b45e15c06 --- /dev/null +++ b/bash-5.1/m4/po.m4 @@ -0,0 +1,441 @@ +# po.m4 serial 24a +dnl Copyright (C) 1995-2014, 2016, 2018-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.60]) + +dnl Checks for all prerequisites of the po subdirectory. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_SED])dnl + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) + + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + tab=`printf '\t'` + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" < +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +}]])], + [gt_cv_func_printf_posix=yes], + [gt_cv_func_printf_posix=no], + [ + AC_EGREP_CPP([notposix], [ +#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix +#endif + ], + [gt_cv_func_printf_posix="guessing no"], + [gt_cv_func_printf_posix="guessing yes"]) + ]) + ]) + case $gt_cv_func_printf_posix in + *yes) + AC_DEFINE([HAVE_POSIX_PRINTF], [1], + [Define if your printf() function supports format strings with positions.]) + ;; + esac +]) diff --git a/bash-5.1/m4/progtest.m4 b/bash-5.1/m4/progtest.m4 new file mode 100644 index 0000000000000000000000000000000000000000..5f186b14909c5e3c1ec6723629ca6a52f338f396 --- /dev/null +++ b/bash-5.1/m4/progtest.m4 @@ -0,0 +1,91 @@ +# progtest.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1996-2003, 2005, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1996. + +AC_PREREQ([2.50]) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL([ac_cv_path_$1], +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$][$1]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST([$1])dnl +]) diff --git a/bash-5.1/m4/pthread_rwlock_rdlock.m4 b/bash-5.1/m4/pthread_rwlock_rdlock.m4 new file mode 100644 index 0000000000000000000000000000000000000000..3c1d64566128a3dd0905c4f9be3e69722f726e54 --- /dev/null +++ b/bash-5.1/m4/pthread_rwlock_rdlock.m4 @@ -0,0 +1,165 @@ +# pthread_rwlock_rdlock.m4 serial 2 +dnl Copyright (C) 2017-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Inspired by +dnl https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c +dnl by Intel Corporation. + +dnl Test whether in a situation where +dnl - an rwlock is taken by a reader and has a writer waiting, +dnl - an additional reader requests the lock, +dnl - the waiting writer and the requesting reader threads have the same +dnl priority, +dnl the requesting reader thread gets blocked, so that at some point the +dnl waiting writer can acquire the lock. +dnl Without such a guarantee, when there a N readers and each of the readers +dnl spends more than 1/Nth of the time with the lock held, there is a high +dnl probability that the waiting writer will not get the lock in a given finite +dnl time, a phenomenon called "writer starvation". +dnl Without such a guarantee, applications have a hard time avoiding writer +dnl starvation. +dnl +dnl POSIX:2017 makes this requirement only for implementations that support TPS +dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO +dnl and SCHED_RR, see +dnl http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html +dnl but this test verifies the guarantee regardless of TPS and regardless of +dnl scheduling policy. +dnl Glibc currently does not provide this guarantee, see +dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701 +AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], +[ + AC_REQUIRE([gl_THREADLIB_EARLY]) + AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader], + [gl_cv_pthread_rwlock_rdlock_prefer_writer], + [save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#include + +#define SUCCEED() exit (0) +#define FAILURE() exit (1) +#define UNEXPECTED(n) (exit (10 + (n))) + +/* The main thread creates the waiting writer and the requesting reader threads + in the default way; this guarantees that they have the same priority. + We can reuse the main thread as first reader thread. */ + +static pthread_rwlock_t lock; +static pthread_t reader1; +static pthread_t writer; +static pthread_t reader2; +static pthread_t timer; +/* Used to pass control from writer to reader2 and from reader2 to timer, + as in a relay race. + Passing control from one running thread to another running thread + is most likely faster than to create the second thread. */ +static pthread_mutex_t baton; + +static void * +timer_func (void *ignored) +{ + /* Step 13 (can be before or after step 12): + The timer thread takes the baton, then waits a moment to make sure + it can tell whether the second reader thread is blocked at step 12. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (13); + usleep (100000); + /* By the time we get here, it's clear that the second reader thread is + blocked at step 12. This is the desired behaviour. */ + SUCCEED (); +} + +static void * +reader2_func (void *ignored) +{ + int err; + + /* Step 8 (can be before or after step 7): + The second reader thread takes the baton, then waits a moment to make sure + the writer thread has reached step 7. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (8); + usleep (100000); + /* Step 9: The second reader thread requests the lock. */ + err = pthread_rwlock_tryrdlock (&lock); + if (err == 0) + FAILURE (); + else if (err != EBUSY) + UNEXPECTED (9); + /* Step 10: Launch a timer, to test whether the next call blocks. */ + if (pthread_create (&timer, NULL, timer_func, NULL)) + UNEXPECTED (10); + /* Step 11: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (11); + /* Step 12: The second reader thread requests the lock. */ + err = pthread_rwlock_rdlock (&lock); + if (err == 0) + FAILURE (); + else + UNEXPECTED (12); +} + +static void * +writer_func (void *ignored) +{ + /* Step 4: Take the baton, so that the second reader thread does not go ahead + too early. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (4); + /* Step 5: Create the second reader thread. */ + if (pthread_create (&reader2, NULL, reader2_func, NULL)) + UNEXPECTED (5); + /* Step 6: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (6); + /* Step 7: The writer thread requests the lock. */ + if (pthread_rwlock_wrlock (&lock)) + UNEXPECTED (7); + return NULL; +} + +int +main () +{ + reader1 = pthread_self (); + + /* Step 1: The main thread initializes the lock and the baton. */ + if (pthread_rwlock_init (&lock, NULL)) + UNEXPECTED (1); + if (pthread_mutex_init (&baton, NULL)) + UNEXPECTED (1); + /* Step 2: The main thread acquires the lock as a reader. */ + if (pthread_rwlock_rdlock (&lock)) + UNEXPECTED (2); + /* Step 3: Create the writer thread. */ + if (pthread_create (&writer, NULL, writer_func, NULL)) + UNEXPECTED (3); + /* Job done. Go to sleep. */ + for (;;) + { + sleep (1); + } +} +]])], + [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes], + [gl_cv_pthread_rwlock_rdlock_prefer_writer=no], + [gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"]) + LIBS="$save_LIBS" + ]) + case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in + *yes) + AC_DEFINE([HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [1], + [Define if the 'pthread_rwlock_rdlock' function prefers a writer to a reader.]) + ;; + esac +]) diff --git a/bash-5.1/m4/size_max.m4 b/bash-5.1/m4/size_max.m4 new file mode 100644 index 0000000000000000000000000000000000000000..ab79052d6ecfc37338bff1801c1a01cfe8be96e1 --- /dev/null +++ b/bash-5.1/m4/size_max.m4 @@ -0,0 +1,75 @@ +# size_max.m4 serial 11 +dnl Copyright (C) 2003, 2005-2006, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.61]) + +AC_DEFUN([gl_SIZE_MAX], +[ + AC_CHECK_HEADERS([stdint.h]) + dnl First test whether the system already has SIZE_MAX. + AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ + gl_cv_size_max= + AC_EGREP_CPP([Found it], [ +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif +], [gl_cv_size_max=yes]) + if test -z "$gl_cv_size_max"; then + dnl Define it ourselves. Here we assume that the type 'size_t' is not wider + dnl than the type 'unsigned long'. Try hard to find a definition that can + dnl be used in a preprocessor #if, i.e. doesn't contain a cast. + AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], + [#include +#include ], [size_t_bits_minus_1=]) + AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], + [#include ], [fits_in_uint=]) + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + dnl Even though SIZE_MAX fits in an unsigned int, it must be of type + dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + extern size_t foo; + extern unsigned long foo; + ]], + [[]])], + [fits_in_uint=0]) + fi + dnl We cannot use 'expr' to simplify this expression, because 'expr' + dnl works only with 'long' integers in the host environment, while we + dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + dnl Shouldn't happen, but who knows... + gl_cv_size_max='((size_t)~(size_t)0)' + fi + fi + ]) + if test "$gl_cv_size_max" != yes; then + AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], + [Define as the maximum value of type 'size_t', if the system doesn't define it.]) + fi + dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after + dnl . Remember that the #undef in AH_VERBATIM gets replaced with + dnl #define by AC_DEFINE_UNQUOTED. + AH_VERBATIM([SIZE_MAX], +[/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +# undef SIZE_MAX +#endif]) +]) diff --git a/bash-5.1/m4/stat-time.m4 b/bash-5.1/m4/stat-time.m4 new file mode 100644 index 0000000000000000000000000000000000000000..f5d67a19c01be4c0c99c1db695a651087646d80f --- /dev/null +++ b/bash-5.1/m4/stat-time.m4 @@ -0,0 +1,61 @@ +# Checks for stat-related time functions. + +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software +# Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. +dnl Modified by Chet Ramey for bash. + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + +AC_DEFUN([BASH_STAT_TIME], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + + AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], + [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + ]], + [[ + st.st_atim = ts; + ]])], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1], + [Define to 1 if the type of the st_atim member of a struct stat is + struct timespec.]) + fi], + [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], + [#include + #include ])], + [#include + #include ])], + [#include + #include ])], + [#include + #include ]) +]) diff --git a/bash-5.1/m4/stdint_h.m4 b/bash-5.1/m4/stdint_h.m4 new file mode 100644 index 0000000000000000000000000000000000000000..6d5f1af0a18fb9d62115f51a085bd7ff1514d6e9 --- /dev/null +++ b/bash-5.1/m4/stdint_h.m4 @@ -0,0 +1,27 @@ +# stdint_h.m4 serial 9 +dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([gl_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include ]], + [[uintmax_t i = (uintmax_t) -1; return !i;]])], + [gl_cv_header_stdint_h=yes], + [gl_cv_header_stdint_h=no])]) + if test $gl_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/bash-5.1/m4/threadlib.m4 b/bash-5.1/m4/threadlib.m4 new file mode 100644 index 0000000000000000000000000000000000000000..bfc3bac853693c22836877f911a1400210d37159 --- /dev/null +++ b/bash-5.1/m4/threadlib.m4 @@ -0,0 +1,393 @@ +# threadlib.m4 serial 16 +dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.60]) + +dnl gl_THREADLIB +dnl ------------ +dnl Tests for a multithreading library to be used. +dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO +dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the +dnl default is 'no', otherwise it is system dependent. In both cases, the user +dnl can change the choice through the options --enable-threads=choice or +dnl --disable-threads. +dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, +dnl USE_PTH_THREADS, USE_WINDOWS_THREADS +dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use +dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with +dnl libtool). +dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for +dnl programs that really need multithread functionality. The difference +dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak +dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not. +dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for +dnl multithread-safe programs. + +AC_DEFUN([gl_THREADLIB_EARLY], +[ + AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) +]) + +dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. + +AC_DEFUN([gl_THREADLIB_EARLY_BODY], +[ + dnl Ordering constraints: This macro modifies CPPFLAGS in a way that + dnl influences the result of the autoconf tests that test for *_unlocked + dnl declarations, on AIX 5 at least. Therefore it must come early. + AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl + AC_BEFORE([$0], [gl_ARGP])dnl + + AC_REQUIRE([AC_CANONICAL_HOST]) + dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + dnl Check for multithreading. + m4_ifdef([gl_THREADLIB_DEFAULT_NO], + [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], + [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) + AC_ARG_ENABLE([threads], +AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ +AC_HELP_STRING([--disable-threads], [build without multithread safety])]), + [gl_use_threads=$enableval], + [if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else +changequote(,)dnl + case "$host_os" in + dnl Disable multithreading by default on OSF/1, because it interferes + dnl with fork()/exec(): When msgexec is linked with -lpthread, its + dnl child process gets an endless segmentation fault inside execvp(). + dnl Disable multithreading by default on Cygwin 1.5.x, because it has + dnl bugs that lead to endless loops or crashes. See + dnl . + osf*) gl_use_threads=no ;; + cygwin*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ;; + *) gl_use_threads=yes ;; + esac +changequote([,])dnl + fi + ]) + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # For using : + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + fi +]) + +dnl The guts of gl_THREADLIB. Needs to be expanded only once. + +AC_DEFUN([gl_THREADLIB_BODY], +[ + AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + dnl Check whether the compiler and linker support weak declarations. + AC_CACHE_CHECK([whether imported symbols can be declared weak], + [gl_cv_have_weak], + [gl_cv_have_weak=no + dnl First, test whether the compiler accepts it syntactically. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[extern void xyzzy (); +#pragma weak xyzzy]], + [[xyzzy();]])], + [gl_cv_have_weak=maybe]) + if test $gl_cv_have_weak = maybe; then + dnl Second, test whether it actually works. On Cygwin 1.7.2, with + dnl gcc 4.3, symbols declared weak always evaluate to the address 0. + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +}]])], + [gl_cv_have_weak=yes], + [gl_cv_have_weak=no], + [dnl When cross-compiling, assume that only ELF platforms support + dnl weak symbols. + AC_EGREP_CPP([Extensible Linking Format], + [#ifdef __ELF__ + Extensible Linking Format + #endif + ], + [gl_cv_have_weak="guessing yes"], + [gl_cv_have_weak="guessing no"]) + ]) + fi + dnl But when linking statically, weak symbols don't work. + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + ]) + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + AC_CHECK_HEADER([pthread.h], + [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + ]], + [[pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma);]])], + [gl_have_pthread=yes + LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread + LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread]) + LIBS=$save_LIBS + test -n "$gl_have_pthread" && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + AC_CHECK_LIB([pthread], [pthread_kill], + [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + # On Solaris 10 or newer, this test is no longer needed, because + # libc contains the fully functional pthread functions. + case "$host_os" in + solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) + AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], + [Define if the pthread_in_use() detection is hard.]) + esac + ]) + elif test -z "$gl_have_pthread"; then + # Some library is needed. Try libpthread and libc_r. + AC_CHECK_LIB([pthread], [pthread_kill], + [gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + AC_CHECK_LIB([c_r], [pthread_kill], + [gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + AC_DEFINE([USE_POSIX_THREADS], [1], + [Define if the POSIX multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], + [Define if references to the POSIX multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[thr_self();]])], + [gl_have_solaristhread=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_SOLARIS_THREADS], [1], + [Define if the old Solaris multithreading library can be used.]) + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], + [Define if references to the old Solaris multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_LINKFLAGS([pth]) + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[pth_self();]])], + [gl_have_pth=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_PTH_THREADS], [1], + [Define if the GNU Pth multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_PTH_THREADS_WEAK], [1], + [Define if references to the GNU Pth multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + AC_DEFINE([USE_WINDOWS_THREADS], [1], + [Define if the native Windows multithreading API can be used.]) + fi + ;; + esac + fi + fi + AC_MSG_CHECKING([for multithread API to use]) + AC_MSG_RESULT([$gl_threads_api]) + AC_SUBST([LIBTHREAD]) + AC_SUBST([LTLIBTHREAD]) + AC_SUBST([LIBMULTITHREAD]) + AC_SUBST([LTLIBMULTITHREAD]) +]) + +AC_DEFUN([gl_THREADLIB], +[ + AC_REQUIRE([gl_THREADLIB_EARLY]) + AC_REQUIRE([gl_THREADLIB_BODY]) +]) + + +dnl gl_DISABLE_THREADS +dnl ------------------ +dnl Sets the gl_THREADLIB default so that threads are not used by default. +dnl The user can still override it at installation time, by using the +dnl configure option '--enable-threads'. + +AC_DEFUN([gl_DISABLE_THREADS], [ + m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) +]) + + +dnl Survey of platforms: +dnl +dnl Platform Available Compiler Supports test-lock +dnl flavours option weak result +dnl --------------- --------- --------- -------- --------- +dnl Linux 2.4/glibc posix -lpthread Y OK +dnl +dnl GNU Hurd/glibc posix +dnl +dnl Ubuntu 14.04 posix -pthread Y OK +dnl +dnl FreeBSD 5.3 posix -lc_r Y +dnl posix -lkse ? Y +dnl posix -lpthread ? Y +dnl posix -lthr Y +dnl +dnl FreeBSD 5.2 posix -lc_r Y +dnl posix -lkse Y +dnl posix -lthr Y +dnl +dnl FreeBSD 4.0,4.10 posix -lc_r Y OK +dnl +dnl NetBSD 1.6 -- +dnl +dnl OpenBSD 3.4 posix -lpthread Y OK +dnl +dnl Mac OS X 10.[123] posix -lpthread Y OK +dnl +dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK +dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK +dnl +dnl HP-UX 11 posix -lpthread N (cc) OK +dnl Y (gcc) +dnl +dnl IRIX 6.5 posix -lpthread Y 0.5 +dnl +dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK +dnl +dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK +dnl -lpthread (gcc) Y +dnl +dnl Cygwin posix -lpthread Y OK +dnl +dnl Any of the above pth -lpth 0.0 +dnl +dnl Mingw windows N OK +dnl +dnl BeOS 5 -- +dnl +dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is +dnl turned off: +dnl OK if all three tests terminate OK, +dnl 0.5 if the first test terminates OK but the second one loops endlessly, +dnl 0.0 if the first test already loops endlessly. diff --git a/bash-5.1/m4/timespec.m4 b/bash-5.1/m4/timespec.m4 new file mode 100644 index 0000000000000000000000000000000000000000..3643b4702ebaeb1627cd41c0778a33153841d9cb --- /dev/null +++ b/bash-5.1/m4/timespec.m4 @@ -0,0 +1,71 @@ +# Configure checks for struct timespec + +# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Original written by Paul Eggert and Jim Meyering. +# Modified by Chet Ramey for bash + +dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared +dnl in time.h, sys/time.h, or pthread.h. + +AC_DEFUN([BASH_CHECK_TYPE_STRUCT_TIMESPEC], +[ + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_CACHE_CHECK([for struct timespec in ], + [bash_cv_sys_struct_timespec_in_time_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [bash_cv_sys_struct_timespec_in_time_h=yes], + [bash_cv_sys_struct_timespec_in_time_h=no])]) + + HAVE_STRUCT_TIMESPEC=0 + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $bash_cv_sys_struct_timespec_in_time_h = yes; then + AC_DEFINE([HAVE_STRUCT_TIMESPEC]) + AC_DEFINE([TIME_H_DEFINES_STRUCT_TIMESPEC]) + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + AC_CACHE_CHECK([for struct timespec in ], + [bash_cv_sys_struct_timespec_in_sys_time_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [bash_cv_sys_struct_timespec_in_sys_time_h=yes], + [bash_cv_sys_struct_timespec_in_sys_time_h=no])]) + if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + AC_DEFINE([HAVE_STRUCT_TIMESPEC]) + AC_DEFINE([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) + else + AC_CACHE_CHECK([for struct timespec in ], + [bash_cv_sys_struct_timespec_in_pthread_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [bash_cv_sys_struct_timespec_in_pthread_h=yes], + [bash_cv_sys_struct_timespec_in_pthread_h=no])]) + if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + AC_DEFINE([HAVE_STRUCT_TIMESPEC]) + AC_DEFINE([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) + fi + fi + fi + AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) + +]) diff --git a/bash-5.1/m4/uintmax_t.m4 b/bash-5.1/m4/uintmax_t.m4 new file mode 100644 index 0000000000000000000000000000000000000000..2926bea949beb372a062df59c099b0bba5202c12 --- /dev/null +++ b/bash-5.1/m4/uintmax_t.m4 @@ -0,0 +1,30 @@ +# uintmax_t.m4 serial 12 +dnl Copyright (C) 1997-2004, 2007-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +AC_PREREQ([2.13]) + +# Define uintmax_t to 'unsigned long' or 'unsigned long long' +# if it is not already defined in or . + +AC_DEFUN([gl_AC_TYPE_UINTMAX_T], +[ + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], + [Define to unsigned long or unsigned long long + if and don't define.]) + else + AC_DEFINE([HAVE_UINTMAX_T], [1], + [Define if you have the 'uintmax_t' type in or .]) + fi +]) diff --git a/bash-5.1/m4/ulonglong.m4 b/bash-5.1/m4/ulonglong.m4 new file mode 100644 index 0000000000000000000000000000000000000000..58b5334e8f93a3914fde8ef6d7bf568e0cbb3e9a --- /dev/null +++ b/bash-5.1/m4/ulonglong.m4 @@ -0,0 +1,5 @@ +# ulonglong.m4 serial 10 +dnl Copyright (C) 1999-2007, 2009-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. diff --git a/bash-5.1/m4/visibility.m4 b/bash-5.1/m4/visibility.m4 new file mode 100644 index 0000000000000000000000000000000000000000..8c266a81a2c287f365a82979bdfa25fe7f6d82ae --- /dev/null +++ b/bash-5.1/m4/visibility.m4 @@ -0,0 +1,77 @@ +# visibility.m4 serial 6 +dnl Copyright (C) 2005, 2008, 2010-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl Mac OS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +AC_DEFUN([gl_VISIBILITY], +[ + AC_REQUIRE([AC_PROG_CC]) + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + dnl First, check whether -Werror can be added to the command line, or + dnl whether it leads to an error because of some other option that the + dnl user has put into $CC $CFLAGS $CPPFLAGS. + AC_CACHE_CHECK([whether the -Werror option is usable], + [gl_cv_cc_vis_werror], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_save_CFLAGS" + ]) + dnl Now check whether visibility declarations are supported. + AC_CACHE_CHECK([for simple visibility declarations], + [gl_cv_cc_visibility], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS" + ]) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + AC_SUBST([CFLAG_VISIBILITY]) + AC_SUBST([HAVE_VISIBILITY]) + AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) diff --git a/bash-5.1/m4/wchar_t.m4 b/bash-5.1/m4/wchar_t.m4 new file mode 100644 index 0000000000000000000000000000000000000000..5db5815209d458444ed31c4cc5408ea95b2a1d3d --- /dev/null +++ b/bash-5.1/m4/wchar_t.m4 @@ -0,0 +1,24 @@ +# wchar_t.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2002-2003, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether has the 'wchar_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WCHAR_T], +[ + AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + wchar_t foo = (wchar_t)'\0';]], + [[]])], + [gt_cv_c_wchar_t=yes], + [gt_cv_c_wchar_t=no])]) + if test $gt_cv_c_wchar_t = yes; then + AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) + fi +]) diff --git a/bash-5.1/m4/wint_t.m4 b/bash-5.1/m4/wint_t.m4 new file mode 100644 index 0000000000000000000000000000000000000000..61e8a23d2785b2d3fc43a678a7b3c9151ce82577 --- /dev/null +++ b/bash-5.1/m4/wint_t.m4 @@ -0,0 +1,74 @@ +# wint_t.m4 serial 7 +dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether has the 'wint_t' type and whether gnulib's +dnl or would, if present, override 'wint_t'. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WINT_T], +[ + AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include + wint_t foo = (wchar_t)'\0';]], + [[]])], + [gt_cv_c_wint_t=yes], + [gt_cv_c_wint_t=no])]) + if test $gt_cv_c_wint_t = yes; then + AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) + + dnl Determine whether gnulib's or would, if present, + dnl override 'wint_t'. + AC_CACHE_CHECK([whether wint_t is too small], + [gl_cv_type_wint_t_too_small], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +#endif +#include + int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; + ]])], + [gl_cv_type_wint_t_too_small=no], + [gl_cv_type_wint_t_too_small=yes])]) + if test $gl_cv_type_wint_t_too_small = yes; then + GNULIB_OVERRIDES_WINT_T=1 + else + GNULIB_OVERRIDES_WINT_T=0 + fi + else + GNULIB_OVERRIDES_WINT_T=0 + fi + AC_SUBST([GNULIB_OVERRIDES_WINT_T]) +]) + +dnl Prerequisites of the 'wint_t' override. +AC_DEFUN([gl_TYPE_WINT_T_PREREQ], +[ + AC_CHECK_HEADERS_ONCE([crtdefs.h]) + if test $ac_cv_header_crtdefs_h = yes; then + HAVE_CRTDEFS_H=1 + else + HAVE_CRTDEFS_H=0 + fi + AC_SUBST([HAVE_CRTDEFS_H]) +]) diff --git a/bash-5.1/m4/xsize.m4 b/bash-5.1/m4/xsize.m4 new file mode 100644 index 0000000000000000000000000000000000000000..f2898ba1a7896d3b2f006b3a08c06b558de664c3 --- /dev/null +++ b/bash-5.1/m4/xsize.m4 @@ -0,0 +1,12 @@ +# xsize.m4 serial 5 +dnl Copyright (C) 2003-2004, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_XSIZE], +[ + dnl Prerequisites of lib/xsize.h. + AC_REQUIRE([gl_SIZE_MAX]) + AC_CHECK_HEADERS([stdint.h]) +]) diff --git a/bash-5.1/mailcheck.c b/bash-5.1/mailcheck.c new file mode 100644 index 0000000000000000000000000000000000000000..4a11143cc83b3d5d7d01623ee12ce5f3cb8268ea --- /dev/null +++ b/bash-5.1/mailcheck.c @@ -0,0 +1,491 @@ +/* mailcheck.c -- The check is in the mail... */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include +#include "bashtypes.h" +#include "posixstat.h" +#if defined (HAVE_SYS_PARAM_H) +# include +#endif +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "posixtime.h" +#include "bashansi.h" +#include "bashintl.h" + +#include "shell.h" +#include "execute_cmd.h" +#include "mailcheck.h" +#include + +/* Values for flags word in struct _fileinfo */ +#define MBOX_INITIALIZED 0x01 + +extern time_t shell_start_time; + +extern int mailstat PARAMS((const char *, struct stat *)); + +typedef struct _fileinfo { + char *name; + char *msg; + time_t access_time; + time_t mod_time; + off_t file_size; + int flags; +} FILEINFO; + +/* The list of remembered mail files. */ +static FILEINFO **mailfiles = (FILEINFO **)NULL; + +/* Number of mail files that we have. */ +static int mailfiles_count; + +/* The last known time that mail was checked. */ +static time_t last_time_mail_checked = 0; + +/* Non-zero means warn if a mail file has been read since last checked. */ +int mail_warning; + +static int find_mail_file PARAMS((char *)); +static void init_mail_file PARAMS((int)); +static void update_mail_file PARAMS((int)); +static int add_mail_file PARAMS((char *, char *)); + +static FILEINFO *alloc_mail_file PARAMS((char *, char *)); +static void dispose_mail_file PARAMS((FILEINFO *)); + +static int file_mod_date_changed PARAMS((int)); +static int file_access_date_changed PARAMS((int)); +static int file_has_grown PARAMS((int)); + +static char *parse_mailpath_spec PARAMS((char *)); + +/* Returns non-zero if it is time to check mail. */ +int +time_to_check_mail () +{ + char *temp; + time_t now; + intmax_t seconds; + + temp = get_string_value ("MAILCHECK"); + + /* Negative number, or non-numbers (such as empty string) cause no + checking to take place. */ + if (temp == 0 || legal_number (temp, &seconds) == 0 || seconds < 0) + return (0); + + now = NOW; + /* Time to check if MAILCHECK is explicitly set to zero, or if enough + time has passed since the last check. */ + return (seconds == 0 || ((now - last_time_mail_checked) >= seconds)); +} + +/* Okay, we have checked the mail. Perhaps I should make this function + go away. */ +void +reset_mail_timer () +{ + last_time_mail_checked = NOW; +} + +/* Locate a file in the list. Return index of + entry, or -1 if not found. */ +static int +find_mail_file (file) + char *file; +{ + register int i; + + for (i = 0; i < mailfiles_count; i++) + if (STREQ (mailfiles[i]->name, file)) + return i; + + return -1; +} + +#define RESET_MAIL_FILE(i) \ + do \ + { \ + mailfiles[i]->access_time = mailfiles[i]->mod_time = 0; \ + mailfiles[i]->file_size = 0; \ + mailfiles[i]->flags = 0; \ + } \ + while (0) + +#define UPDATE_MAIL_FILE(i, finfo) \ + do \ + { \ + mailfiles[i]->access_time = finfo.st_atime; \ + mailfiles[i]->mod_time = finfo.st_mtime; \ + mailfiles[i]->file_size = finfo.st_size; \ + mailfiles[i]->flags |= MBOX_INITIALIZED; \ + } \ + while (0) + +static void +init_mail_file (i) + int i; +{ + mailfiles[i]->access_time = mailfiles[i]->mod_time = last_time_mail_checked ? last_time_mail_checked : shell_start_time; + mailfiles[i]->file_size = 0; + mailfiles[i]->flags = 0; +} + +static void +update_mail_file (i) + int i; +{ + char *file; + struct stat finfo; + + file = mailfiles[i]->name; + if (mailstat (file, &finfo) == 0) + UPDATE_MAIL_FILE (i, finfo); + else + RESET_MAIL_FILE (i); +} + +/* Add this file to the list of remembered files and return its index + in the list of mail files. */ +static int +add_mail_file (file, msg) + char *file, *msg; +{ + struct stat finfo; + char *filename; + int i; + + filename = full_pathname (file); + i = find_mail_file (filename); + if (i >= 0) + { + if (mailstat (filename, &finfo) == 0) + UPDATE_MAIL_FILE (i, finfo); + + free (filename); + return i; + } + + i = mailfiles_count++; + mailfiles = (FILEINFO **)xrealloc + (mailfiles, mailfiles_count * sizeof (FILEINFO *)); + + mailfiles[i] = alloc_mail_file (filename, msg); + init_mail_file (i); + + return i; +} + +/* Reset the existing mail files access and modification times to zero. */ +void +reset_mail_files () +{ + register int i; + + for (i = 0; i < mailfiles_count; i++) + RESET_MAIL_FILE (i); +} + +static FILEINFO * +alloc_mail_file (filename, msg) + char *filename, *msg; +{ + FILEINFO *mf; + + mf = (FILEINFO *)xmalloc (sizeof (FILEINFO)); + mf->name = filename; + mf->msg = msg ? savestring (msg) : (char *)NULL; + mf->flags = 0; + + return mf; +} + +static void +dispose_mail_file (mf) + FILEINFO *mf; +{ + free (mf->name); + FREE (mf->msg); + free (mf); +} + +/* Free the information that we have about the remembered mail files. */ +void +free_mail_files () +{ + register int i; + + for (i = 0; i < mailfiles_count; i++) + dispose_mail_file (mailfiles[i]); + + if (mailfiles) + free (mailfiles); + + mailfiles_count = 0; + mailfiles = (FILEINFO **)NULL; +} + +void +init_mail_dates () +{ + if (mailfiles == 0) + remember_mail_dates (); +} + +/* Return non-zero if FILE's mod date has changed and it has not been + accessed since modified. If the size has dropped to zero, reset + the cached mail file info. */ +static int +file_mod_date_changed (i) + int i; +{ + time_t mtime; + struct stat finfo; + char *file; + + file = mailfiles[i]->name; + mtime = mailfiles[i]->mod_time; + + if (mailstat (file, &finfo) != 0) + return (0); + + if (finfo.st_size > 0) + return (mtime < finfo.st_mtime); + + if (finfo.st_size == 0 && mailfiles[i]->file_size > 0) + UPDATE_MAIL_FILE (i, finfo); + + return (0); +} + +/* Return non-zero if FILE's access date has changed. */ +static int +file_access_date_changed (i) + int i; +{ + time_t atime; + struct stat finfo; + char *file; + + file = mailfiles[i]->name; + atime = mailfiles[i]->access_time; + + if (mailstat (file, &finfo) != 0) + return (0); + + if (finfo.st_size > 0) + return (atime < finfo.st_atime); + + return (0); +} + +/* Return non-zero if FILE's size has increased. */ +static int +file_has_grown (i) + int i; +{ + off_t size; + struct stat finfo; + char *file; + + file = mailfiles[i]->name; + size = mailfiles[i]->file_size; + + return ((mailstat (file, &finfo) == 0) && (finfo.st_size > size)); +} + +/* Take an element from $MAILPATH and return the portion from + the first unquoted `?' or `%' to the end of the string. This is the + message to be printed when the file contents change. */ +static char * +parse_mailpath_spec (str) + char *str; +{ + char *s; + int pass_next; + + for (s = str, pass_next = 0; s && *s; s++) + { + if (pass_next) + { + pass_next = 0; + continue; + } + if (*s == '\\') + { + pass_next++; + continue; + } + if (*s == '?' || *s == '%') + return s; + } + return ((char *)NULL); +} + +char * +make_default_mailpath () +{ +#if defined (DEFAULT_MAIL_DIRECTORY) + char *mp; + + get_current_user_info (); + mp = (char *)xmalloc (2 + sizeof (DEFAULT_MAIL_DIRECTORY) + strlen (current_user.user_name)); + strcpy (mp, DEFAULT_MAIL_DIRECTORY); + mp[sizeof(DEFAULT_MAIL_DIRECTORY) - 1] = '/'; + strcpy (mp + sizeof (DEFAULT_MAIL_DIRECTORY), current_user.user_name); + return (mp); +#else + return ((char *)NULL); +#endif +} + +/* Remember the dates of the files specified by MAILPATH, or if there is + no MAILPATH, by the file specified in MAIL. If neither exists, use a + default value, which we randomly concoct from using Unix. */ + +void +remember_mail_dates () +{ + char *mailpaths; + char *mailfile, *mp; + int i = 0; + + mailpaths = get_string_value ("MAILPATH"); + + /* If no $MAILPATH, but $MAIL, use that as a single filename to check. */ + if (mailpaths == 0 && (mailpaths = get_string_value ("MAIL"))) + { + add_mail_file (mailpaths, (char *)NULL); + return; + } + + if (mailpaths == 0) + { + mailpaths = make_default_mailpath (); + if (mailpaths) + { + add_mail_file (mailpaths, (char *)NULL); + free (mailpaths); + } + return; + } + + while (mailfile = extract_colon_unit (mailpaths, &i)) + { + mp = parse_mailpath_spec (mailfile); + if (mp && *mp) + *mp++ = '\0'; + add_mail_file (mailfile, mp); + free (mailfile); + } +} + +/* check_mail () is useful for more than just checking mail. Since it has + the paranoids dream ability of telling you when someone has read your + mail, it can just as easily be used to tell you when someones .profile + file has been read, thus letting one know when someone else has logged + in. Pretty good, huh? */ + +/* Check for mail in some files. If the modification date of any + of the files in MAILPATH has changed since we last did a + remember_mail_dates () then mention that the user has mail. + Special hack: If the variable MAIL_WARNING is non-zero and the + mail file has been accessed since the last time we remembered, then + the message "The mail in has been read" is printed. */ +void +check_mail () +{ + char *current_mail_file, *message; + int i, use_user_notification; + char *dollar_underscore, *temp; + + dollar_underscore = get_string_value ("_"); + if (dollar_underscore) + dollar_underscore = savestring (dollar_underscore); + + for (i = 0; i < mailfiles_count; i++) + { + current_mail_file = mailfiles[i]->name; + + if (*current_mail_file == '\0') + continue; + + if (file_mod_date_changed (i)) + { + int file_is_bigger; + + use_user_notification = mailfiles[i]->msg != (char *)NULL; + message = mailfiles[i]->msg ? mailfiles[i]->msg : _("You have mail in $_"); + + bind_variable ("_", current_mail_file, 0); + +#define atime mailfiles[i]->access_time +#define mtime mailfiles[i]->mod_time + + /* Have to compute this before the call to update_mail_file, which + resets all the information. */ + file_is_bigger = file_has_grown (i); + + update_mail_file (i); + + /* If the user has just run a program which manipulates the + mail file, then don't bother explaining that the mail + file has been manipulated. Since some systems don't change + the access time to be equal to the modification time when + the mail in the file is manipulated, check the size also. If + the file has not grown, continue. */ + if ((atime >= mtime) && !file_is_bigger) + continue; + + /* If the mod time is later than the access time and the file + has grown, note the fact that this is *new* mail. */ + if (use_user_notification == 0 && (atime < mtime) && file_is_bigger) + message = _("You have new mail in $_"); +#undef atime +#undef mtime + + if (temp = expand_string_to_string (message, Q_DOUBLE_QUOTES)) + { + puts (temp); + free (temp); + } + else + putchar ('\n'); + } + + if (mail_warning && file_access_date_changed (i)) + { + update_mail_file (i); + printf (_("The mail in %s has been read\n"), current_mail_file); + } + } + + if (dollar_underscore) + { + bind_variable ("_", dollar_underscore, 0); + free (dollar_underscore); + } + else + unbind_variable ("_"); +} diff --git a/bash-5.1/mailcheck.h b/bash-5.1/mailcheck.h new file mode 100644 index 0000000000000000000000000000000000000000..e930124c3a47871a620082c644b8ad5deae0e52b --- /dev/null +++ b/bash-5.1/mailcheck.h @@ -0,0 +1,34 @@ +/* mailcheck.h -- variables and function declarations for mail checking. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_MAILCHECK_H_) +#define _MAILCHECK_H_ + +/* Functions from mailcheck.c */ +extern int time_to_check_mail PARAMS((void)); +extern void reset_mail_timer PARAMS((void)); +extern void reset_mail_files PARAMS((void)); +extern void free_mail_files PARAMS((void)); +extern char *make_default_mailpath PARAMS((void)); +extern void remember_mail_dates PARAMS((void)); +extern void init_mail_dates PARAMS((void)); +extern void check_mail PARAMS((void)); + +#endif /* _MAILCHECK_H */ diff --git a/bash-5.1/make_cmd.c b/bash-5.1/make_cmd.c new file mode 100644 index 0000000000000000000000000000000000000000..ac53526821012b491b98631519cf040877e0009d --- /dev/null +++ b/bash-5.1/make_cmd.c @@ -0,0 +1,944 @@ +/* make_cmd.c -- Functions for making instances of the various + parser constructs. */ + +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include +#include "bashtypes.h" +#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include "filecntl.h" +#include "bashansi.h" +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashintl.h" + +#include "shell.h" +#include "builtins.h" +#include "builtins/common.h" +#include "execute_cmd.h" +#include "parser.h" +#include "flags.h" +#include "input.h" + +#if defined (JOB_CONTROL) +#include "jobs.h" +#endif + +#include "shmbutil.h" + +int here_doc_first_line = 0; + +/* Object caching */ +sh_obj_cache_t wdcache = {0, 0, 0}; +sh_obj_cache_t wlcache = {0, 0, 0}; + +#define WDCACHESIZE 128 +#define WLCACHESIZE 128 + +static COMMAND *make_for_or_select PARAMS((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int)); +#if defined (ARITH_FOR_COMMAND) +static WORD_LIST *make_arith_for_expr PARAMS((char *)); +#endif +static COMMAND *make_until_or_while PARAMS((enum command_type, COMMAND *, COMMAND *)); + +void +cmd_init () +{ + ocache_create (wdcache, WORD_DESC, WDCACHESIZE); + ocache_create (wlcache, WORD_LIST, WLCACHESIZE); +} + +WORD_DESC * +alloc_word_desc () +{ + WORD_DESC *temp; + + ocache_alloc (wdcache, WORD_DESC, temp); + temp->flags = 0; + temp->word = 0; + return temp; +} + +WORD_DESC * +make_bare_word (string) + const char *string; +{ + WORD_DESC *temp; + + temp = alloc_word_desc (); + + if (*string) + temp->word = savestring (string); + else + { + temp->word = (char *)xmalloc (1); + temp->word[0] = '\0'; + } + + return (temp); +} + +WORD_DESC * +make_word_flags (w, string) + WORD_DESC *w; + const char *string; +{ + register int i; + size_t slen; + DECLARE_MBSTATE; + + i = 0; + slen = strlen (string); + while (i < slen) + { + switch (string[i]) + { + case '$': + w->flags |= W_HASDOLLAR; + break; + case '\\': + break; /* continue the loop */ + case '\'': + case '`': + case '"': + w->flags |= W_QUOTED; + break; + } + + ADVANCE_CHAR (string, slen, i); + } + + return (w); +} + +WORD_DESC * +make_word (string) + const char *string; +{ + WORD_DESC *temp; + + temp = make_bare_word (string); + return (make_word_flags (temp, string)); +} + +WORD_DESC * +make_word_from_token (token) + int token; +{ + char tokenizer[2]; + + tokenizer[0] = token; + tokenizer[1] = '\0'; + + return (make_word (tokenizer)); +} + +WORD_LIST * +make_word_list (word, wlink) + WORD_DESC *word; + WORD_LIST *wlink; +{ + WORD_LIST *temp; + + ocache_alloc (wlcache, WORD_LIST, temp); + + temp->word = word; + temp->next = wlink; + return (temp); +} + +COMMAND * +make_command (type, pointer) + enum command_type type; + SIMPLE_COM *pointer; +{ + COMMAND *temp; + + temp = (COMMAND *)xmalloc (sizeof (COMMAND)); + temp->type = type; + temp->value.Simple = pointer; + temp->value.Simple->flags = temp->flags = 0; + temp->redirects = (REDIRECT *)NULL; + return (temp); +} + +COMMAND * +command_connect (com1, com2, connector) + COMMAND *com1, *com2; + int connector; +{ + CONNECTION *temp; + + temp = (CONNECTION *)xmalloc (sizeof (CONNECTION)); + temp->connector = connector; + temp->first = com1; + temp->second = com2; + return (make_command (cm_connection, (SIMPLE_COM *)temp)); +} + +static COMMAND * +make_for_or_select (type, name, map_list, action, lineno) + enum command_type type; + WORD_DESC *name; + WORD_LIST *map_list; + COMMAND *action; + int lineno; +{ + FOR_COM *temp; + + temp = (FOR_COM *)xmalloc (sizeof (FOR_COM)); + temp->flags = 0; + temp->name = name; + temp->line = lineno; + temp->map_list = map_list; + temp->action = action; + return (make_command (type, (SIMPLE_COM *)temp)); +} + +COMMAND * +make_for_command (name, map_list, action, lineno) + WORD_DESC *name; + WORD_LIST *map_list; + COMMAND *action; + int lineno; +{ + return (make_for_or_select (cm_for, name, map_list, action, lineno)); +} + +COMMAND * +make_select_command (name, map_list, action, lineno) + WORD_DESC *name; + WORD_LIST *map_list; + COMMAND *action; + int lineno; +{ +#if defined (SELECT_COMMAND) + return (make_for_or_select (cm_select, name, map_list, action, lineno)); +#else + set_exit_status (2); + return ((COMMAND *)NULL); +#endif +} + +#if defined (ARITH_FOR_COMMAND) +static WORD_LIST * +make_arith_for_expr (s) + char *s; +{ + WORD_LIST *result; + WORD_DESC *wd; + + if (s == 0 || *s == '\0') + return ((WORD_LIST *)NULL); + wd = make_word (s); + wd->flags |= W_NOGLOB|W_NOSPLIT|W_QUOTED|W_DQUOTE; /* no word splitting or globbing */ +#if defined (PROCESS_SUBSTITUTION) + wd->flags |= W_NOPROCSUB; /* no process substitution */ +#endif + result = make_word_list (wd, (WORD_LIST *)NULL); + return result; +} +#endif + +/* Note that this function calls dispose_words on EXPRS, since it doesn't + use the word list directly. We free it here rather than at the caller + because no other function in this file requires that the caller free + any arguments. */ +COMMAND * +make_arith_for_command (exprs, action, lineno) + WORD_LIST *exprs; + COMMAND *action; + int lineno; +{ +#if defined (ARITH_FOR_COMMAND) + ARITH_FOR_COM *temp; + WORD_LIST *init, *test, *step; + char *s, *t, *start; + int nsemi, i; + + init = test = step = (WORD_LIST *)NULL; + /* Parse the string into the three component sub-expressions. */ + start = t = s = exprs->word->word; + for (nsemi = 0; ;) + { + /* skip whitespace at the start of each sub-expression. */ + while (whitespace (*s)) + s++; + start = s; + /* skip to the semicolon or EOS */ + i = skip_to_delim (start, 0, ";", SD_NOJMP|SD_NOPROCSUB); + s = start + i; + + t = (i > 0) ? substring (start, 0, i) : (char *)NULL; + + nsemi++; + switch (nsemi) + { + case 1: + init = make_arith_for_expr (t); + break; + case 2: + test = make_arith_for_expr (t); + break; + case 3: + step = make_arith_for_expr (t); + break; + } + + FREE (t); + if (*s == '\0') + break; + s++; /* skip over semicolon */ + } + + if (nsemi != 3) + { + if (nsemi < 3) + parser_error (lineno, _("syntax error: arithmetic expression required")); + else + parser_error (lineno, _("syntax error: `;' unexpected")); + parser_error (lineno, _("syntax error: `((%s))'"), exprs->word->word); + free (init); + free (test); + free (step); + set_exit_status (2); + return ((COMMAND *)NULL); + } + + temp = (ARITH_FOR_COM *)xmalloc (sizeof (ARITH_FOR_COM)); + temp->flags = 0; + temp->line = lineno; + temp->init = init ? init : make_arith_for_expr ("1"); + temp->test = test ? test : make_arith_for_expr ("1"); + temp->step = step ? step : make_arith_for_expr ("1"); + temp->action = action; + + dispose_words (exprs); + return (make_command (cm_arith_for, (SIMPLE_COM *)temp)); +#else + dispose_words (exprs); + set_exit_status (2); + return ((COMMAND *)NULL); +#endif /* ARITH_FOR_COMMAND */ +} + +COMMAND * +make_group_command (command) + COMMAND *command; +{ + GROUP_COM *temp; + + temp = (GROUP_COM *)xmalloc (sizeof (GROUP_COM)); + temp->command = command; + return (make_command (cm_group, (SIMPLE_COM *)temp)); +} + +COMMAND * +make_case_command (word, clauses, lineno) + WORD_DESC *word; + PATTERN_LIST *clauses; + int lineno; +{ + CASE_COM *temp; + + temp = (CASE_COM *)xmalloc (sizeof (CASE_COM)); + temp->flags = 0; + temp->line = lineno; + temp->word = word; + temp->clauses = REVERSE_LIST (clauses, PATTERN_LIST *); + return (make_command (cm_case, (SIMPLE_COM *)temp)); +} + +PATTERN_LIST * +make_pattern_list (patterns, action) + WORD_LIST *patterns; + COMMAND *action; +{ + PATTERN_LIST *temp; + + temp = (PATTERN_LIST *)xmalloc (sizeof (PATTERN_LIST)); + temp->patterns = REVERSE_LIST (patterns, WORD_LIST *); + temp->action = action; + temp->next = NULL; + temp->flags = 0; + return (temp); +} + +COMMAND * +make_if_command (test, true_case, false_case) + COMMAND *test, *true_case, *false_case; +{ + IF_COM *temp; + + temp = (IF_COM *)xmalloc (sizeof (IF_COM)); + temp->flags = 0; + temp->test = test; + temp->true_case = true_case; + temp->false_case = false_case; + return (make_command (cm_if, (SIMPLE_COM *)temp)); +} + +static COMMAND * +make_until_or_while (which, test, action) + enum command_type which; + COMMAND *test, *action; +{ + WHILE_COM *temp; + + temp = (WHILE_COM *)xmalloc (sizeof (WHILE_COM)); + temp->flags = 0; + temp->test = test; + temp->action = action; + return (make_command (which, (SIMPLE_COM *)temp)); +} + +COMMAND * +make_while_command (test, action) + COMMAND *test, *action; +{ + return (make_until_or_while (cm_while, test, action)); +} + +COMMAND * +make_until_command (test, action) + COMMAND *test, *action; +{ + return (make_until_or_while (cm_until, test, action)); +} + +COMMAND * +make_arith_command (exp) + WORD_LIST *exp; +{ +#if defined (DPAREN_ARITHMETIC) + COMMAND *command; + ARITH_COM *temp; + + command = (COMMAND *)xmalloc (sizeof (COMMAND)); + command->value.Arith = temp = (ARITH_COM *)xmalloc (sizeof (ARITH_COM)); + + temp->flags = 0; + temp->line = line_number; + temp->exp = exp; + + command->type = cm_arith; + command->redirects = (REDIRECT *)NULL; + command->flags = 0; + + return (command); +#else + set_exit_status (2); + return ((COMMAND *)NULL); +#endif +} + +#if defined (COND_COMMAND) +struct cond_com * +make_cond_node (type, op, left, right) + int type; + WORD_DESC *op; + struct cond_com *left, *right; +{ + COND_COM *temp; + + temp = (COND_COM *)xmalloc (sizeof (COND_COM)); + temp->flags = 0; + temp->line = line_number; + temp->type = type; + temp->op = op; + temp->left = left; + temp->right = right; + + return (temp); +} +#endif + +COMMAND * +make_cond_command (cond_node) + COND_COM *cond_node; +{ +#if defined (COND_COMMAND) + COMMAND *command; + + command = (COMMAND *)xmalloc (sizeof (COMMAND)); + command->value.Cond = cond_node; + + command->type = cm_cond; + command->redirects = (REDIRECT *)NULL; + command->flags = 0; + command->line = cond_node ? cond_node->line : 0; + + return (command); +#else + set_exit_status (2); + return ((COMMAND *)NULL); +#endif +} + +COMMAND * +make_bare_simple_command () +{ + COMMAND *command; + SIMPLE_COM *temp; + + command = (COMMAND *)xmalloc (sizeof (COMMAND)); + command->value.Simple = temp = (SIMPLE_COM *)xmalloc (sizeof (SIMPLE_COM)); + + temp->flags = 0; + temp->line = line_number; + temp->words = (WORD_LIST *)NULL; + temp->redirects = (REDIRECT *)NULL; + + command->type = cm_simple; + command->redirects = (REDIRECT *)NULL; + command->flags = 0; + + return (command); +} + +/* Return a command which is the connection of the word or redirection + in ELEMENT, and the command * or NULL in COMMAND. */ +COMMAND * +make_simple_command (element, command) + ELEMENT element; + COMMAND *command; +{ + /* If we are starting from scratch, then make the initial command + structure. Also note that we have to fill in all the slots, since + malloc doesn't return zeroed space. */ + if (command == 0) + { + command = make_bare_simple_command (); + parser_state |= PST_REDIRLIST; + } + + if (element.word) + { + command->value.Simple->words = make_word_list (element.word, command->value.Simple->words); + parser_state &= ~PST_REDIRLIST; + } + else if (element.redirect) + { + REDIRECT *r = element.redirect; + /* Due to the way <> is implemented, there may be more than a single + redirection in element.redirect. We just follow the chain as far + as it goes, and hook onto the end. */ + while (r->next) + r = r->next; + r->next = command->value.Simple->redirects; + command->value.Simple->redirects = element.redirect; + } + + return (command); +} + +/* Because we are Bourne compatible, we read the input for this + << or <<- redirection now, from wherever input is coming from. + We store the input read into a WORD_DESC. Replace the text of + the redirectee.word with the new input text. If <<- is on, + then remove leading TABS from each line. */ +void +make_here_document (temp, lineno) + REDIRECT *temp; + int lineno; +{ + int kill_leading, redir_len; + char *redir_word, *document, *full_line; + int document_index, document_size, delim_unquoted; + + if (temp->instruction != r_deblank_reading_until && + temp->instruction != r_reading_until) + { + internal_error (_("make_here_document: bad instruction type %d"), temp->instruction); + return; + } + + kill_leading = temp->instruction == r_deblank_reading_until; + + document = (char *)NULL; + document_index = document_size = 0; + + /* Quote removal is the only expansion performed on the delimiter + for here documents, making it an extremely special case. */ + redir_word = string_quote_removal (temp->redirectee.filename->word, 0); + + /* redirection_expand will return NULL if the expansion results in + multiple words or no words. Check for that here, and just abort + this here document if it does. */ + if (redir_word) + redir_len = strlen (redir_word); + else + { + temp->here_doc_eof = (char *)xmalloc (1); + temp->here_doc_eof[0] = '\0'; + goto document_done; + } + + free (temp->redirectee.filename->word); + temp->here_doc_eof = redir_word; + + /* Read lines from wherever lines are coming from. + For each line read, if kill_leading, then kill the + leading tab characters. + If the line matches redir_word exactly, then we have + manufactured the document. Otherwise, add the line to the + list of lines in the document. */ + + /* If the here-document delimiter was quoted, the lines should + be read verbatim from the input. If it was not quoted, we + need to perform backslash-quoted newline removal. */ + delim_unquoted = (temp->redirectee.filename->flags & W_QUOTED) == 0; + while (full_line = read_secondary_line (delim_unquoted)) + { + register char *line; + int len; + + here_doc_first_line = 0; + line = full_line; + line_number++; + + /* If set -v is in effect, echo the line read. read_secondary_line/ + read_a_line leaves the newline at the end, so don't print another. */ + if (echo_input_at_read) + fprintf (stderr, "%s", line); + + if (kill_leading && *line) + { + /* Hack: To be compatible with some Bourne shells, we + check the word before stripping the whitespace. This + is a hack, though. */ + if (STREQN (line, redir_word, redir_len) && line[redir_len] == '\n') + goto document_done; + + while (*line == '\t') + line++; + } + + if (*line == 0) + continue; + + if (STREQN (line, redir_word, redir_len) && line[redir_len] == '\n') + goto document_done; + + len = strlen (line); + if (len + document_index >= document_size) + { + document_size = document_size ? 2 * (document_size + len) : len + 2; + document = (char *)xrealloc (document, document_size); + } + + /* len is guaranteed to be > 0 because of the check for line + being an empty string before the call to strlen. */ + FASTCOPY (line, document + document_index, len); + document_index += len; + } + + if (full_line == 0) + internal_warning (_("here-document at line %d delimited by end-of-file (wanted `%s')"), lineno, redir_word); + +document_done: + if (document) + document[document_index] = '\0'; + else + { + document = (char *)xmalloc (1); + document[0] = '\0'; + } + temp->redirectee.filename->word = document; + here_doc_first_line = 0; +} + +/* Generate a REDIRECT from SOURCE, DEST, and INSTRUCTION. + INSTRUCTION is the instruction type, SOURCE is a file descriptor, + and DEST is a file descriptor or a WORD_DESC *. */ +REDIRECT * +make_redirection (source, instruction, dest_and_filename, flags) + REDIRECTEE source; + enum r_instruction instruction; + REDIRECTEE dest_and_filename; + int flags; +{ + REDIRECT *temp; + WORD_DESC *w; + int wlen; + intmax_t lfd; + + temp = (REDIRECT *)xmalloc (sizeof (REDIRECT)); + + /* First do the common cases. */ + temp->redirector = source; + temp->redirectee = dest_and_filename; + temp->here_doc_eof = 0; + temp->instruction = instruction; + temp->flags = 0; + temp->rflags = flags; + temp->next = (REDIRECT *)NULL; + + switch (instruction) + { + + case r_output_direction: /* >foo */ + case r_output_force: /* >| foo */ + case r_err_and_out: /* &>filename */ + temp->flags = O_TRUNC | O_WRONLY | O_CREAT; + break; + + case r_appending_to: /* >>foo */ + case r_append_err_and_out: /* &>> filename */ + temp->flags = O_APPEND | O_WRONLY | O_CREAT; + break; + + case r_input_direction: /* flags = O_RDONLY; + break; + + case r_input_output: /* <>foo */ + temp->flags = O_RDWR | O_CREAT; + break; + + case r_deblank_reading_until: /* <<-foo */ + case r_reading_until: /* << foo */ + case r_reading_string: /* <<< foo */ + case r_close_this: /* <&- */ + case r_duplicating_input: /* 1<&2 */ + case r_duplicating_output: /* 1>&2 */ + break; + + /* the parser doesn't pass these. */ + case r_move_input: /* 1<&2- */ + case r_move_output: /* 1>&2- */ + case r_move_input_word: /* 1<&$foo- */ + case r_move_output_word: /* 1>&$foo- */ + break; + + /* The way the lexer works we have to do this here. */ + case r_duplicating_input_word: /* 1<&$foo */ + case r_duplicating_output_word: /* 1>&$foo */ + w = dest_and_filename.filename; + wlen = strlen (w->word) - 1; + if (w->word[wlen] == '-') /* Yuck */ + { + w->word[wlen] = '\0'; + if (all_digits (w->word) && legal_number (w->word, &lfd) && lfd == (int)lfd) + { + dispose_word (w); + temp->instruction = (instruction == r_duplicating_input_word) ? r_move_input : r_move_output; + temp->redirectee.dest = lfd; + } + else + temp->instruction = (instruction == r_duplicating_input_word) ? r_move_input_word : r_move_output_word; + } + + break; + + default: + programming_error (_("make_redirection: redirection instruction `%d' out of range"), instruction); + abort (); + break; + } + return (temp); +} + +COMMAND * +make_function_def (name, command, lineno, lstart) + WORD_DESC *name; + COMMAND *command; + int lineno, lstart; +{ + FUNCTION_DEF *temp; +#if defined (ARRAY_VARS) + SHELL_VAR *bash_source_v; + ARRAY *bash_source_a; +#endif + + temp = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF)); + temp->command = command; + temp->name = name; + temp->line = lineno; + temp->flags = 0; + command->line = lstart; + + /* Information used primarily for debugging. */ + temp->source_file = 0; +#if defined (ARRAY_VARS) + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + if (bash_source_a && array_num_elements (bash_source_a) > 0) + temp->source_file = array_reference (bash_source_a, 0); +#endif + /* Assume that shell functions without a source file before the shell is + initialized come from the environment. Otherwise default to "main" + (usually functions being defined interactively) */ + if (temp->source_file == 0) + temp->source_file = shell_initialized ? "main" : "environment"; + +#if defined (DEBUGGER) + bind_function_def (name->word, temp, 0); +#endif + + temp->source_file = temp->source_file ? savestring (temp->source_file) : 0; + + return (make_command (cm_function_def, (SIMPLE_COM *)temp)); +} + +COMMAND * +make_subshell_command (command) + COMMAND *command; +{ + SUBSHELL_COM *temp; + + temp = (SUBSHELL_COM *)xmalloc (sizeof (SUBSHELL_COM)); + temp->command = command; + temp->flags = CMD_WANT_SUBSHELL; + temp->line = line_number; + return (make_command (cm_subshell, (SIMPLE_COM *)temp)); +} + +COMMAND * +make_coproc_command (name, command) + char *name; + COMMAND *command; +{ + COPROC_COM *temp; + + temp = (COPROC_COM *)xmalloc (sizeof (COPROC_COM)); + temp->name = savestring (name); + temp->command = command; + temp->flags = CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL; + return (make_command (cm_coproc, (SIMPLE_COM *)temp)); +} + +static void +output_requirement (deptype, filename) +const char *deptype; +char *filename; +{ + static char *alphabet_set = "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + if (strchr(filename, '$') || (filename[0] != '/' && strchr(filename, '/'))) + return; + + /* + if the executable is called via variable substitution we can + not dermine what it is at compile time. + + if the executable consists only of characters not in the + alphabet we do not consider it a dependency just an artifact + of shell parsing (ex "exec < ${infile}"). + */ + + if (strpbrk(filename, alphabet_set)) + printf ("%s(%s)\n", deptype, filename); +} + +/* Reverse the word list and redirection list in the simple command + has just been parsed. It seems simpler to do this here the one + time then by any other method that I can think of. */ +COMMAND * +clean_simple_command (command) + COMMAND *command; +{ + if (command->type != cm_simple) + command_error ("clean_simple_command", CMDERR_BADTYPE, command->type, 0); + else + { + command->value.Simple->words = + REVERSE_LIST (command->value.Simple->words, WORD_LIST *); + command->value.Simple->redirects = + REVERSE_LIST (command->value.Simple->redirects, REDIRECT *); + } + + if (rpm_requires && command->value.Simple->words) + { + char *cmd0; + char *cmd1; + struct builtin *b; + + cmd0 = command->value.Simple->words->word->word; + b = builtin_address_internal (cmd0, 0); + cmd1 = 0; + if (command->value.Simple->words->next) + cmd1 = command->value.Simple->words->next->word->word; + + if (b) { + if ( (b->flags & REQUIRES_BUILTIN) && cmd1) + output_requirement ("executable", cmd1); + } else { + if (!assignment(cmd0, 0)) + output_requirement (find_function(cmd0) ? "function" : "executable", cmd0); + } + } /*rpm_requires*/ + + + parser_state &= ~PST_REDIRLIST; + return (command); +} + +/* The Yacc grammar productions have a problem, in that they take a + list followed by an ampersand (`&') and do a simple command connection, + making the entire list effectively asynchronous, instead of just + the last command. This means that when the list is executed, all + the commands have stdin set to /dev/null when job control is not + active, instead of just the last. This is wrong, and needs fixing + up. This function takes the `&' and applies it to the last command + in the list. This is done only for lists connected by `;'; it makes + `;' bind `tighter' than `&'. */ +COMMAND * +connect_async_list (command, command2, connector) + COMMAND *command, *command2; + int connector; +{ + COMMAND *t, *t1, *t2; + + t1 = command; + t = command->value.Connection->second; + + if (!t || (command->flags & CMD_WANT_SUBSHELL) || + command->value.Connection->connector != ';') + { + t = command_connect (command, command2, connector); + return t; + } + + /* This is just defensive programming. The Yacc precedence rules + will generally hand this function a command where t points directly + to the command we want (e.g. given a ; b ; c ; d &, t1 will point + to the `a ; b ; c' list and t will be the `d'). We only want to do + this if the list is not being executed as a unit in the background + with `( ... )', so we have to check for CMD_WANT_SUBSHELL. That's + the only way to tell. */ + while (((t->flags & CMD_WANT_SUBSHELL) == 0) && t->type == cm_connection && + t->value.Connection->connector == ';') + { + t1 = t; + t = t->value.Connection->second; + } + /* Now we have t pointing to the last command in the list, and + t1->value.Connection->second == t. */ + t2 = command_connect (t, command2, connector); + t1->value.Connection->second = t2; + return command; +} diff --git a/bash-5.1/make_cmd.h b/bash-5.1/make_cmd.h new file mode 100644 index 0000000000000000000000000000000000000000..bf1fb008df32aee951c3e73ea7f683d09b1b0d2d --- /dev/null +++ b/bash-5.1/make_cmd.h @@ -0,0 +1,72 @@ +/* make_cmd.h -- Declarations of functions found in make_cmd.c */ + +/* Copyright (C) 1993-2009,2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_MAKE_CMD_H_) +#define _MAKE_CMD_H_ + +#include "stdc.h" + +extern int here_doc_first_line; + +extern void cmd_init PARAMS((void)); + +extern WORD_DESC *alloc_word_desc PARAMS((void)); +extern WORD_DESC *make_bare_word PARAMS((const char *)); +extern WORD_DESC *make_word_flags PARAMS((WORD_DESC *, const char *)); +extern WORD_DESC *make_word PARAMS((const char *)); +extern WORD_DESC *make_word_from_token PARAMS((int)); + +extern WORD_LIST *make_word_list PARAMS((WORD_DESC *, WORD_LIST *)); + +#define add_string_to_list(s, l) make_word_list (make_word(s), (l)) + +extern COMMAND *make_command PARAMS((enum command_type, SIMPLE_COM *)); +extern COMMAND *command_connect PARAMS((COMMAND *, COMMAND *, int)); +extern COMMAND *make_for_command PARAMS((WORD_DESC *, WORD_LIST *, COMMAND *, int)); +extern COMMAND *make_group_command PARAMS((COMMAND *)); +extern COMMAND *make_case_command PARAMS((WORD_DESC *, PATTERN_LIST *, int)); +extern PATTERN_LIST *make_pattern_list PARAMS((WORD_LIST *, COMMAND *)); +extern COMMAND *make_if_command PARAMS((COMMAND *, COMMAND *, COMMAND *)); +extern COMMAND *make_while_command PARAMS((COMMAND *, COMMAND *)); +extern COMMAND *make_until_command PARAMS((COMMAND *, COMMAND *)); +extern COMMAND *make_bare_simple_command PARAMS((void)); +extern COMMAND *make_simple_command PARAMS((ELEMENT, COMMAND *)); +extern void make_here_document PARAMS((REDIRECT *, int)); +extern REDIRECT *make_redirection PARAMS((REDIRECTEE, enum r_instruction, REDIRECTEE, int)); +extern COMMAND *make_function_def PARAMS((WORD_DESC *, COMMAND *, int, int)); +extern COMMAND *clean_simple_command PARAMS((COMMAND *)); + +extern COMMAND *make_arith_command PARAMS((WORD_LIST *)); + +extern COMMAND *make_select_command PARAMS((WORD_DESC *, WORD_LIST *, COMMAND *, int)); + +#if defined (COND_COMMAND) +extern COND_COM *make_cond_node PARAMS((int, WORD_DESC *, COND_COM *, COND_COM *)); +extern COMMAND *make_cond_command PARAMS((COND_COM *)); +#endif + +extern COMMAND *make_arith_for_command PARAMS((WORD_LIST *, COMMAND *, int)); + +extern COMMAND *make_subshell_command PARAMS((COMMAND *)); +extern COMMAND *make_coproc_command PARAMS((char *, COMMAND *)); + +extern COMMAND *connect_async_list PARAMS((COMMAND *, COMMAND *, int)); + +#endif /* !_MAKE_CMD_H */ diff --git a/bash-5.1/mksyntax.c b/bash-5.1/mksyntax.c new file mode 100644 index 0000000000000000000000000000000000000000..03856866a34bfe2b084b7a319cbd1af2b7d02f58 --- /dev/null +++ b/bash-5.1/mksyntax.c @@ -0,0 +1,415 @@ +/* + * mksyntax.c - construct shell syntax table for fast char attribute lookup. + */ + +/* Copyright (C) 2000-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include +#include "bashansi.h" +#include "chartypes.h" +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "syntax.h" + +extern int optind; +extern char *optarg; + +#ifndef errno +extern int errno; +#endif + +#ifndef HAVE_STRERROR +extern char *strerror(); +#endif + +struct wordflag { + int flag; + char *fstr; +} wordflags[] = { + { CWORD, "CWORD" }, + { CSHMETA, "CSHMETA" }, + { CSHBRK, "CSHBRK" }, + { CBACKQ, "CBACKQ" }, + { CQUOTE, "CQUOTE" }, + { CSPECL, "CSPECL" }, + { CEXP, "CEXP" }, + { CBSDQUOTE, "CBSDQUOTE" }, + { CBSHDOC, "CBSHDOC" }, + { CGLOB, "CGLOB" }, + { CXGLOB, "CXGLOB" }, + { CXQUOTE, "CXQUOTE" }, + { CSPECVAR, "CSPECVAR" }, + { CSUBSTOP, "CSUBSTOP" }, + { CBLANK, "CBLANK" }, +}; + +#define N_WFLAGS (sizeof (wordflags) / sizeof (wordflags[0])) +#define SYNSIZE 256 + +int lsyntax[SYNSIZE]; +int debug; +char *progname; + +char preamble[] = "\ +/*\n\ + * This file was generated by mksyntax. DO NOT EDIT.\n\ + */\n\ +\n"; + +char includes[] = "\ +#include \"config.h\"\n\ +#include \"stdc.h\"\n\ +#include \"syntax.h\"\n\n"; + +static void +usage() +{ + fprintf (stderr, "%s: usage: %s [-d] [-o filename]\n", progname, progname); + exit (2); +} + +#ifdef INCLUDE_UNUSED +static int +getcflag (s) + char *s; +{ + int i; + + for (i = 0; i < N_WFLAGS; i++) + if (strcmp (s, wordflags[i].fstr) == 0) + return wordflags[i].flag; + return -1; +} +#endif + +static char * +cdesc (i) + int i; +{ + static char xbuf[16]; + + if (i == ' ') + return "SPC"; + else if (ISPRINT (i)) + { + xbuf[0] = i; + xbuf[1] = '\0'; + return (xbuf); + } + else if (i == CTLESC) + return "CTLESC"; + else if (i == CTLNUL) + return "CTLNUL"; + else if (i == '\033') /* ASCII */ + return "ESC"; + + xbuf[0] = '\\'; + xbuf[2] = '\0'; + + switch (i) + { +#ifdef __STDC__ + case '\a': xbuf[1] = 'a'; break; + case '\v': xbuf[1] = 'v'; break; +#else + case '\007': xbuf[1] = 'a'; break; + case 0x0B: xbuf[1] = 'v'; break; +#endif + case '\b': xbuf[1] = 'b'; break; + case '\f': xbuf[1] = 'f'; break; + case '\n': xbuf[1] = 'n'; break; + case '\r': xbuf[1] = 'r'; break; + case '\t': xbuf[1] = 't'; break; + default: sprintf (xbuf, "%d", i); break; + } + + return xbuf; +} + +static char * +getcstr (f) + int f; +{ + int i; + + for (i = 0; i < N_WFLAGS; i++) + if (f == wordflags[i].flag) + return (wordflags[i].fstr); + return ((char *)NULL); +} + +static void +addcstr (str, flag) + char *str; + int flag; +{ + char *s, *fstr; + unsigned char uc; + + for (s = str; s && *s; s++) + { + uc = *s; + + if (debug) + { + fstr = getcstr (flag); + fprintf(stderr, "added %s for character %s\n", fstr, cdesc(uc)); + } + + lsyntax[uc] |= flag; + } +} + +static void +addcchar (c, flag) + unsigned char c; + int flag; +{ + char *fstr; + + if (debug) + { + fstr = getcstr (flag); + fprintf (stderr, "added %s for character %s\n", fstr, cdesc(c)); + } + lsyntax[c] |= flag; +} + +static void +addblanks () +{ + register int i; + unsigned char uc; + + for (i = 0; i < SYNSIZE; i++) + { + uc = i; + /* Since we don't call setlocale(), this defaults to the "C" locale, and + the default blank characters will be space and tab. */ + if (isblank (uc)) + lsyntax[uc] |= CBLANK; + } +} + +/* load up the correct flag values in lsyntax */ +static void +load_lsyntax () +{ + /* shell metacharacters */ + addcstr (shell_meta_chars, CSHMETA); + + /* shell word break characters */ + addcstr (shell_break_chars, CSHBRK); + + addcchar ('`', CBACKQ); + + addcstr (shell_quote_chars, CQUOTE); + + addcchar (CTLESC, CSPECL); + addcchar (CTLNUL, CSPECL); + + addcstr (shell_exp_chars, CEXP); + + addcstr (slashify_in_quotes, CBSDQUOTE); + addcstr (slashify_in_here_document, CBSHDOC); + + addcstr (shell_glob_chars, CGLOB); + +#if defined (EXTENDED_GLOB) + addcstr (ext_glob_chars, CXGLOB); +#endif + + addcstr (shell_quote_chars, CXQUOTE); + addcchar ('\\', CXQUOTE); + + addcstr ("@*#?-$!", CSPECVAR); /* omits $0...$9 and $_ */ + + addcstr ("-=?+", CSUBSTOP); /* OP in ${paramOPword} */ + + addblanks (); +} + +static void +dump_lflags (fp, ind) + FILE *fp; + int ind; +{ + int xflags, first, i; + + xflags = lsyntax[ind]; + first = 1; + + if (xflags == 0) + fputs (wordflags[0].fstr, fp); + else + { + for (i = 1; i < N_WFLAGS; i++) + if (xflags & wordflags[i].flag) + { + if (first) + first = 0; + else + putc ('|', fp); + fputs (wordflags[i].fstr, fp); + } + } +} + +static void +wcomment (fp, i) + FILE *fp; + int i; +{ + fputs ("\t\t/* ", fp); + + fprintf (fp, "%s", cdesc(i)); + + fputs (" */", fp); +} + +static void +dump_lsyntax (fp) + FILE *fp; +{ + int i; + + fprintf (fp, "int sh_syntabsiz = %d;\n", SYNSIZE); + fprintf (fp, "int sh_syntaxtab[%d] = {\n", SYNSIZE); + + for (i = 0; i < SYNSIZE; i++) + { + putc ('\t', fp); + dump_lflags (fp, i); + putc (',', fp); + wcomment (fp, i); + putc ('\n', fp); + } + + fprintf (fp, "};\n"); +} + +int +main(argc, argv) + int argc; + char **argv; +{ + int opt, i; + char *filename; + FILE *fp; + + if ((progname = strrchr (argv[0], '/')) == 0) + progname = argv[0]; + else + progname++; + + filename = (char *)NULL; + debug = 0; + + while ((opt = getopt (argc, argv, "do:")) != EOF) + { + switch (opt) + { + case 'd': + debug = 1; + break; + case 'o': + filename = optarg; + break; + default: + usage(); + } + } + + argc -= optind; + argv += optind; + + if (filename) + { + fp = fopen (filename, "w"); + if (fp == 0) + { + fprintf (stderr, "%s: %s: cannot open: %s\n", progname, filename, strerror(errno)); + exit (1); + } + } + else + { + filename = "stdout"; + fp = stdout; + } + + + for (i = 0; i < SYNSIZE; i++) + lsyntax[i] = CWORD; + + load_lsyntax (); + + fprintf (fp, "%s\n", preamble); + fprintf (fp, "%s\n", includes); + + dump_lsyntax (fp); + + if (fp != stdout) + fclose (fp); + exit (0); +} + + +#if !defined (HAVE_STRERROR) + +#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +/* Return a string corresponding to the error number E. From + the ANSI C spec. */ +#if defined (strerror) +# undef strerror +#endif + +char * +strerror (e) + int e; +{ + static char emsg[40]; +#if defined (HAVE_SYS_ERRLIST) + extern int sys_nerr; + extern char *sys_errlist[]; + + if (e > 0 && e < sys_nerr) + return (sys_errlist[e]); + else +#endif /* HAVE_SYS_ERRLIST */ + { + sprintf (emsg, "Unknown system error %d", e); + return (&emsg[0]); + } +} +#endif /* HAVE_STRERROR */ diff --git a/bash-5.1/nojobs.c b/bash-5.1/nojobs.c new file mode 100644 index 0000000000000000000000000000000000000000..c5fc83d90a1538fd7d50fd898662219ec272c003 --- /dev/null +++ b/bash-5.1/nojobs.c @@ -0,0 +1,1070 @@ +/* nojobs.c - functions that make children, remember them, and handle their termination. */ + +/* This file works under BSD, System V, minix, and Posix systems. It does + not implement job control. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include "filecntl.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include + +#if defined (BUFFERED_INPUT) +# include "input.h" +#endif + +/* Need to include this up here for *_TTY_DRIVER definitions. */ +#include "shtty.h" + +#include "bashintl.h" + +#include "shell.h" +#include "jobs.h" +#include "execute_cmd.h" +#include "trap.h" + +#include "builtins/builtext.h" /* for wait_builtin */ +#include "builtins/common.h" + +#define DEFAULT_CHILD_MAX 4096 + +#if defined (_POSIX_VERSION) || !defined (HAVE_KILLPG) +# define killpg(pg, sig) kill(-(pg),(sig)) +#endif /* USG || _POSIX_VERSION */ + +#if !defined (HAVE_SIGINTERRUPT) && !defined (HAVE_POSIX_SIGNALS) +# define siginterrupt(sig, code) +#endif /* !HAVE_SIGINTERRUPT && !HAVE_POSIX_SIGNALS */ + +#if defined (HAVE_WAITPID) +# define WAITPID(pid, statusp, options) waitpid (pid, statusp, options) +#else +# define WAITPID(pid, statusp, options) wait (statusp) +#endif /* !HAVE_WAITPID */ + +/* Return the fd from which we are actually getting input. */ +#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr) + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +extern void set_original_signal PARAMS((int, SigHandler *)); + +volatile pid_t last_made_pid = NO_PID; +volatile pid_t last_asynchronous_pid = NO_PID; + +static int queue_sigchld; /* dummy declaration */ +int waiting_for_child; + +/* Call this when you start making children. */ +int already_making_children = 0; + +/* The controlling tty for this shell. */ +int shell_tty = -1; + +/* If this is non-zero, $LINES and $COLUMNS are reset after every process + exits from get_tty_state(). */ +int check_window_size = CHECKWINSIZE_DEFAULT; + +/* We don't have job control. */ +int job_control = 0; + +int running_in_background = 0; /* can't tell without job control */ + +/* STATUS and FLAGS are only valid if pid != NO_PID + STATUS is only valid if (flags & PROC_RUNNING) == 0 */ +struct proc_status { + pid_t pid; + int status; /* Exit status of PID or 128 + fatal signal number */ + int flags; +}; + +/* Values for proc_status.flags */ +#define PROC_RUNNING 0x01 +#define PROC_NOTIFIED 0x02 +#define PROC_ASYNC 0x04 +#define PROC_SIGNALED 0x10 + +/* Return values from find_status_by_pid */ +#define PROC_BAD -1 +#define PROC_STILL_ALIVE -2 + +static struct proc_status *pid_list = (struct proc_status *)NULL; +static int pid_list_size; +static int wait_sigint_received; + +static long child_max = -1L; + +static void alloc_pid_list PARAMS((void)); +static int find_proc_slot PARAMS((pid_t)); +static int find_index_by_pid PARAMS((pid_t)); +static int find_status_by_pid PARAMS((pid_t)); +static int process_exit_status PARAMS((WAIT)); +static int find_termsig_by_pid PARAMS((pid_t)); +static int get_termsig PARAMS((WAIT)); +static void set_pid_status PARAMS((pid_t, WAIT)); +static void set_pid_flags PARAMS((pid_t, int)); +static void unset_pid_flags PARAMS((pid_t, int)); +static int get_pid_flags PARAMS((pid_t)); +static void add_pid PARAMS((pid_t, int)); +static void mark_dead_jobs_as_notified PARAMS((int)); + +static sighandler wait_sigint_handler PARAMS((int)); +static char *j_strsignal PARAMS((int)); + +#if defined (HAVE_WAITPID) +static void reap_zombie_children PARAMS((void)); +#endif + +#if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS) +static int siginterrupt PARAMS((int, int)); +#endif + +static void restore_sigint_handler PARAMS((void)); + +/* Allocate new, or grow existing PID_LIST. */ +static void +alloc_pid_list () +{ + register int i; + int old = pid_list_size; + + pid_list_size += 10; + pid_list = (struct proc_status *)xrealloc (pid_list, pid_list_size * sizeof (struct proc_status)); + + /* None of the newly allocated slots have process id's yet. */ + for (i = old; i < pid_list_size; i++) + { + pid_list[i].pid = NO_PID; + pid_list[i].status = pid_list[i].flags = 0; + } +} + +/* Return the offset within the PID_LIST array of an empty slot. This can + create new slots if all of the existing slots are taken. */ +static int +find_proc_slot (pid) + pid_t pid; +{ + register int i; + + for (i = 0; i < pid_list_size; i++) + if (pid_list[i].pid == NO_PID || pid_list[i].pid == pid) + return (i); + + if (i == pid_list_size) + alloc_pid_list (); + + return (i); +} + +/* Return the offset within the PID_LIST array of a slot containing PID, + or the value NO_PID if the pid wasn't found. */ +static int +find_index_by_pid (pid) + pid_t pid; +{ + register int i; + + for (i = 0; i < pid_list_size; i++) + if (pid_list[i].pid == pid) + return (i); + + return (NO_PID); +} + +/* Return the status of PID as looked up in the PID_LIST array. A + return value of PROC_BAD indicates that PID wasn't found. */ +static int +find_status_by_pid (pid) + pid_t pid; +{ + int i; + + i = find_index_by_pid (pid); + if (i == NO_PID) + return (PROC_BAD); + if (pid_list[i].flags & PROC_RUNNING) + return (PROC_STILL_ALIVE); + return (pid_list[i].status); +} + +static int +process_exit_status (status) + WAIT status; +{ + if (WIFSIGNALED (status)) + return (128 + WTERMSIG (status)); + else + return (WEXITSTATUS (status)); +} + +/* Return the status of PID as looked up in the PID_LIST array. A + return value of PROC_BAD indicates that PID wasn't found. */ +static int +find_termsig_by_pid (pid) + pid_t pid; +{ + int i; + + i = find_index_by_pid (pid); + if (i == NO_PID) + return (0); + if (pid_list[i].flags & PROC_RUNNING) + return (0); + return (get_termsig ((WAIT)pid_list[i].status)); +} + +/* Set LAST_COMMAND_EXIT_SIGNAL depending on STATUS. If STATUS is -1, look + up PID in the pid array and set LAST_COMMAND_EXIT_SIGNAL appropriately + depending on its flags and exit status. */ +static int +get_termsig (status) + WAIT status; +{ + if (WIFSTOPPED (status) == 0 && WIFSIGNALED (status)) + return (WTERMSIG (status)); + else + return (0); +} + +/* Give PID the status value STATUS in the PID_LIST array. */ +static void +set_pid_status (pid, status) + pid_t pid; + WAIT status; +{ + int slot; + +#if defined (COPROCESS_SUPPORT) + coproc_pidchk (pid, status); +#endif + +#if defined (PROCESS_SUBSTITUTION) + if ((slot = find_procsub_child (pid)) >= 0) + set_procsub_status (slot, pid, WSTATUS (status)); + /* XXX - also saving in list below */ +#endif + + slot = find_index_by_pid (pid); + if (slot == NO_PID) + return; + + pid_list[slot].status = process_exit_status (status); + pid_list[slot].flags &= ~PROC_RUNNING; + if (WIFSIGNALED (status)) + pid_list[slot].flags |= PROC_SIGNALED; + /* If it's not a background process, mark it as notified so it gets + cleaned up. */ + if ((pid_list[slot].flags & PROC_ASYNC) == 0) + pid_list[slot].flags |= PROC_NOTIFIED; +} + +/* Give PID the flags FLAGS in the PID_LIST array. */ +static void +set_pid_flags (pid, flags) + pid_t pid; + int flags; +{ + int slot; + + slot = find_index_by_pid (pid); + if (slot == NO_PID) + return; + + pid_list[slot].flags |= flags; +} + +/* Unset FLAGS for PID in the pid list */ +static void +unset_pid_flags (pid, flags) + pid_t pid; + int flags; +{ + int slot; + + slot = find_index_by_pid (pid); + if (slot == NO_PID) + return; + + pid_list[slot].flags &= ~flags; +} + +/* Return the flags corresponding to PID in the PID_LIST array. */ +static int +get_pid_flags (pid) + pid_t pid; +{ + int slot; + + slot = find_index_by_pid (pid); + if (slot == NO_PID) + return 0; + + return (pid_list[slot].flags); +} + +static void +add_pid (pid, async) + pid_t pid; + int async; +{ + int slot; + + slot = find_proc_slot (pid); + + pid_list[slot].pid = pid; + pid_list[slot].status = -1; + pid_list[slot].flags = PROC_RUNNING; + if (async) + pid_list[slot].flags |= PROC_ASYNC; +} + +static void +mark_dead_jobs_as_notified (force) + int force; +{ + register int i, ndead; + + /* first, count the number of non-running async jobs if FORCE == 0 */ + for (i = ndead = 0; force == 0 && i < pid_list_size; i++) + { + if (pid_list[i].pid == NO_PID) + continue; + if (((pid_list[i].flags & PROC_RUNNING) == 0) && + (pid_list[i].flags & PROC_ASYNC)) + ndead++; + } + + if (child_max < 0) + child_max = getmaxchild (); + if (child_max < 0) + child_max = DEFAULT_CHILD_MAX; + + if (force == 0 && ndead <= child_max) + return; + + /* If FORCE == 0, we just mark as many non-running async jobs as notified + to bring us under the CHILD_MAX limit. */ + for (i = 0; i < pid_list_size; i++) + { + if (pid_list[i].pid == NO_PID) + continue; + if (((pid_list[i].flags & PROC_RUNNING) == 0) && + pid_list[i].pid != last_asynchronous_pid) + { + pid_list[i].flags |= PROC_NOTIFIED; + if (force == 0 && (pid_list[i].flags & PROC_ASYNC) && --ndead <= child_max) + break; + } + } +} + +/* Remove all dead, notified jobs from the pid_list. */ +int +cleanup_dead_jobs () +{ + register int i; + +#if defined (HAVE_WAITPID) + reap_zombie_children (); +#endif + + for (i = 0; i < pid_list_size; i++) + { + if (pid_list[i].pid != NO_PID && + (pid_list[i].flags & PROC_RUNNING) == 0 && + (pid_list[i].flags & PROC_NOTIFIED)) + pid_list[i].pid = NO_PID; + } + +#if defined (COPROCESS_SUPPORT) + coproc_reap (); +#endif + + return 0; +} + +void +reap_dead_jobs () +{ + mark_dead_jobs_as_notified (0); + cleanup_dead_jobs (); +} + +/* Initialize the job control mechanism, and set up the tty stuff. */ +int +initialize_job_control (force) + int force; +{ + shell_tty = fileno (stderr); + + if (interactive) + get_tty_state (); + return 0; +} + +/* Setup this shell to handle C-C, etc. */ +void +initialize_job_signals () +{ + set_signal_handler (SIGINT, sigint_sighandler); + + /* If this is a login shell we don't wish to be disturbed by + stop signals. */ + if (login_shell) + ignore_tty_job_signals (); +} + +#if defined (HAVE_WAITPID) +/* Collect the status of all zombie children so that their system + resources can be deallocated. */ +static void +reap_zombie_children () +{ +# if defined (WNOHANG) + pid_t pid; + WAIT status; + + CHECK_TERMSIG; + CHECK_WAIT_INTR; + while ((pid = waitpid (-1, (int *)&status, WNOHANG)) > 0) + set_pid_status (pid, status); +# endif /* WNOHANG */ + CHECK_TERMSIG; + CHECK_WAIT_INTR; +} +#endif /* WAITPID */ + +#if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS) + +#if !defined (SA_RESTART) +# define SA_RESTART 0 +#endif + +static int +siginterrupt (sig, flag) + int sig, flag; +{ + struct sigaction act; + + sigaction (sig, (struct sigaction *)NULL, &act); + + if (flag) + act.sa_flags &= ~SA_RESTART; + else + act.sa_flags |= SA_RESTART; + + return (sigaction (sig, &act, (struct sigaction *)NULL)); +} +#endif /* !HAVE_SIGINTERRUPT && HAVE_POSIX_SIGNALS */ + +/* Fork, handling errors. Returns the pid of the newly made child, or 0. + COMMAND is just for remembering the name of the command; we don't do + anything else with it. ASYNC_P says what to do with the tty. If + non-zero, then don't give it away. */ +pid_t +make_child (command, flags) + char *command; + int flags; +{ + pid_t pid; + int async_p, forksleep; + sigset_t set, oset; + + /* Discard saved memory. */ + if (command) + free (command); + + async_p = (flags & FORK_ASYNC); + start_pipeline (); + +#if defined (BUFFERED_INPUT) + /* If default_buffered_input is active, we are reading a script. If + the command is asynchronous, we have already duplicated /dev/null + as fd 0, but have not changed the buffered stream corresponding to + the old fd 0. We don't want to sync the stream in this case. */ + if (default_buffered_input != -1 && (!async_p || default_buffered_input > 0)) + sync_buffered_stream (default_buffered_input); +#endif /* BUFFERED_INPUT */ + + /* Block SIGTERM here and unblock in child after fork resets the + set of pending signals */ + if (interactive_shell) + { + sigemptyset (&set); + sigaddset (&set, SIGTERM); + sigemptyset (&oset); + sigprocmask (SIG_BLOCK, &set, &oset); + set_signal_handler (SIGTERM, SIG_DFL); + } + + /* Create the child, handle severe errors. Retry on EAGAIN. */ + forksleep = 1; + while ((pid = fork ()) < 0 && errno == EAGAIN && forksleep < FORKSLEEP_MAX) + { + sys_error ("fork: retry"); + +#if defined (HAVE_WAITPID) + /* Posix systems with a non-blocking waitpid () system call available + get another chance after zombies are reaped. */ + reap_zombie_children (); + if (forksleep > 1 && sleep (forksleep) != 0) + break; +#else + if (sleep (forksleep) != 0) + break; +#endif /* HAVE_WAITPID */ + forksleep <<= 1; + } + + if (pid != 0) + if (interactive_shell) + { + set_signal_handler (SIGTERM, SIG_IGN); + sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); + } + + if (pid < 0) + { + sys_error ("fork"); + last_command_exit_value = EX_NOEXEC; + throw_to_top_level (); + } + + if (pid == 0) + { +#if defined (BUFFERED_INPUT) + unset_bash_input (0); +#endif /* BUFFERED_INPUT */ + + CLRINTERRUPT; /* XXX - children have their own interrupt state */ + + /* Restore top-level signal mask. */ + restore_sigmask (); + +#if 0 + /* Ignore INT and QUIT in asynchronous children. */ + if (async_p) + last_asynchronous_pid = getpid (); +#endif + + default_tty_job_signals (); + } + else + { + /* In the parent. */ + + last_made_pid = pid; + + if (async_p) + last_asynchronous_pid = pid; + + add_pid (pid, async_p); + } + return (pid); +} + +void +ignore_tty_job_signals () +{ +#if defined (SIGTSTP) + set_signal_handler (SIGTSTP, SIG_IGN); + set_signal_handler (SIGTTIN, SIG_IGN); + set_signal_handler (SIGTTOU, SIG_IGN); +#endif +} + +void +default_tty_job_signals () +{ +#if defined (SIGTSTP) + if (signal_is_trapped (SIGTSTP) == 0 && signal_is_hard_ignored (SIGTSTP)) + set_signal_handler (SIGTSTP, SIG_IGN); + else + set_signal_handler (SIGTSTP, SIG_DFL); + if (signal_is_trapped (SIGTTIN) == 0 && signal_is_hard_ignored (SIGTTIN)) + set_signal_handler (SIGTTIN, SIG_IGN); + else + set_signal_handler (SIGTTIN, SIG_DFL); + if (signal_is_trapped (SIGTTOU) == 0 && signal_is_hard_ignored (SIGTTOU)) + set_signal_handler (SIGTTOU, SIG_IGN); + else + set_signal_handler (SIGTTOU, SIG_DFL); +#endif +} + +/* Called once in a parent process. */ +void +get_original_tty_job_signals () +{ + static int fetched = 0; + + if (fetched == 0) + { +#if defined (SIGTSTP) + if (interactive_shell) + { + set_original_signal (SIGTSTP, SIG_DFL); + set_original_signal (SIGTTIN, SIG_DFL); + set_original_signal (SIGTTOU, SIG_DFL); + } + else + { + get_original_signal (SIGTSTP); + get_original_signal (SIGTTIN); + get_original_signal (SIGTTOU); + } +#endif + fetched = 1; + } +} + +/* Wait for a single pid (PID) and return its exit status. Called by + the wait builtin. */ +int +wait_for_single_pid (pid, flags) + pid_t pid; + int flags; +{ + pid_t got_pid; + WAIT status; + int pstatus; + + pstatus = find_status_by_pid (pid); + + if (pstatus == PROC_BAD) + { + internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid); + return (127); + } + + if (pstatus != PROC_STILL_ALIVE) + { + if (pstatus > 128) + last_command_exit_signal = find_termsig_by_pid (pid); + return (pstatus); + } + + siginterrupt (SIGINT, 1); + while ((got_pid = WAITPID (pid, &status, 0)) != pid) + { + CHECK_TERMSIG; + CHECK_WAIT_INTR; + if (got_pid < 0) + { + if (errno != EINTR && errno != ECHILD) + { + siginterrupt (SIGINT, 0); + sys_error ("wait"); + } + break; + } + else if (got_pid > 0) + set_pid_status (got_pid, status); + } + + if (got_pid > 0) + { + set_pid_status (got_pid, status); + set_pid_flags (got_pid, PROC_NOTIFIED); + } + + siginterrupt (SIGINT, 0); + QUIT; + CHECK_WAIT_INTR; + + return (got_pid > 0 ? process_exit_status (status) : -1); +} + +/* Wait for all of the shell's children to exit. Called by the `wait' + builtin. */ +void +wait_for_background_pids (ps) + struct procstat *ps; +{ + pid_t got_pid; + WAIT status; + + /* If we aren't using job control, we let the kernel take care of the + bookkeeping for us. wait () will return -1 and set errno to ECHILD + when there are no more unwaited-for child processes on both + 4.2 BSD-based and System V-based systems. */ + + siginterrupt (SIGINT, 1); + + /* Wait for ECHILD */ + waiting_for_child = 1; + while ((got_pid = WAITPID (-1, &status, 0)) != -1) + { + waiting_for_child = 0; + set_pid_status (got_pid, status); + if (ps) + { + ps->pid = got_pid; + ps->status = process_exit_status (status); + } + waiting_for_child = 1; + CHECK_WAIT_INTR; + } + waiting_for_child = 0; + + if (errno != EINTR && errno != ECHILD) + { + siginterrupt (SIGINT, 0); + sys_error("wait"); + } + + siginterrupt (SIGINT, 0); + QUIT; + CHECK_WAIT_INTR; + + mark_dead_jobs_as_notified (1); + cleanup_dead_jobs (); +} + +void +wait_sigint_cleanup () +{ +} + +/* Make OLD_SIGINT_HANDLER the SIGINT signal handler. */ +#define INVALID_SIGNAL_HANDLER (SigHandler *)wait_for_background_pids +static SigHandler *old_sigint_handler = INVALID_SIGNAL_HANDLER; + +static void +restore_sigint_handler () +{ + if (old_sigint_handler != INVALID_SIGNAL_HANDLER) + { + set_signal_handler (SIGINT, old_sigint_handler); + old_sigint_handler = INVALID_SIGNAL_HANDLER; + } +} + +/* Handle SIGINT while we are waiting for children in a script to exit. + All interrupts are effectively ignored by the shell, but allowed to + kill a running job. */ +static sighandler +wait_sigint_handler (sig) + int sig; +{ + SigHandler *sigint_handler; + + /* If we got a SIGINT while in `wait', and SIGINT is trapped, do + what POSIX.2 says (see builtins/wait.def for more info). */ + if (this_shell_builtin && this_shell_builtin == wait_builtin && + signal_is_trapped (SIGINT) && + ((sigint_handler = trap_to_sighandler (SIGINT)) == trap_handler)) + { + last_command_exit_value = 128+SIGINT; + restore_sigint_handler (); + trap_handler (SIGINT); /* set pending_traps[SIGINT] */ + wait_signal_received = SIGINT; + SIGRETURN (0); + } + + wait_sigint_received = 1; + + SIGRETURN (0); +} + +static char * +j_strsignal (s) + int s; +{ + static char retcode_name_buffer[64] = { '\0' }; + char *x; + + x = strsignal (s); + if (x == 0) + { + x = retcode_name_buffer; + sprintf (x, "Signal %d", s); + } + return x; +} + +/* Wait for pid (one of our children) to terminate. This is called only + by the execution code in execute_cmd.c. */ +int +wait_for (pid, flags) + pid_t pid; + int flags; +{ + int return_val, pstatus; + pid_t got_pid; + WAIT status; + + pstatus = find_status_by_pid (pid); + + if (pstatus == PROC_BAD) + return (0); + + if (pstatus != PROC_STILL_ALIVE) + { + if (pstatus > 128) + last_command_exit_signal = find_termsig_by_pid (pid); + return (pstatus); + } + + /* If we are running a script, ignore SIGINT while we're waiting for + a child to exit. The loop below does some of this, but not all. */ + wait_sigint_received = 0; + if (interactive_shell == 0) + old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + + waiting_for_child = 1; + CHECK_WAIT_INTR; + while ((got_pid = WAITPID (-1, &status, 0)) != pid) /* XXX was pid now -1 */ + { + waiting_for_child = 0; + CHECK_TERMSIG; + CHECK_WAIT_INTR; + if (got_pid < 0 && errno == ECHILD) + { +#if !defined (_POSIX_VERSION) + status.w_termsig = status.w_retcode = 0; +#else + status = 0; +#endif /* _POSIX_VERSION */ + break; + } + else if (got_pid < 0 && errno != EINTR) + programming_error ("wait_for(%ld): %s", (long)pid, strerror(errno)); + else if (got_pid > 0) + set_pid_status (got_pid, status); + waiting_for_child = 1; + } + waiting_for_child = 0; + + if (got_pid > 0) + set_pid_status (got_pid, status); + +#if defined (HAVE_WAITPID) + if (got_pid >= 0) + reap_zombie_children (); +#endif /* HAVE_WAITPID */ + + CHECK_TERMSIG; + CHECK_WAIT_INTR; + + if (interactive_shell == 0) + { + SigHandler *temp_handler; + + temp_handler = old_sigint_handler; + restore_sigint_handler (); + + /* If the job exited because of SIGINT, make sure the shell acts as if + it had received one also. */ + if (WIFSIGNALED (status) && (WTERMSIG (status) == SIGINT)) + { + + if (maybe_call_trap_handler (SIGINT) == 0) + { + if (temp_handler == SIG_DFL) + termsig_handler (SIGINT); + else if (temp_handler != INVALID_SIGNAL_HANDLER && temp_handler != SIG_IGN) + (*temp_handler) (SIGINT); + } + } + } + + /* Default return value. */ + /* ``a full 8 bits of status is returned'' */ + return_val = process_exit_status (status); + last_command_exit_signal = get_termsig (status); + +#if defined (DONT_REPORT_SIGPIPE) && defined (DONT_REPORT_SIGTERM) +# define REPORTSIG(x) ((x) != SIGINT && (x) != SIGPIPE && (x) != SIGTERM) +#elif !defined (DONT_REPORT_SIGPIPE) && !defined (DONT_REPORT_SIGTERM) +# define REPORTSIG(x) ((x) != SIGINT) +#elif defined (DONT_REPORT_SIGPIPE) +# define REPORTSIG(x) ((x) != SIGINT && (x) != SIGPIPE) +#else +# define REPORTSIG(x) ((x) != SIGINT && (x) != SIGTERM) +#endif + + if ((WIFSTOPPED (status) == 0) && WIFSIGNALED (status) && REPORTSIG(WTERMSIG (status))) + { + fprintf (stderr, "%s", j_strsignal (WTERMSIG (status))); + if (WIFCORED (status)) + fprintf (stderr, _(" (core dumped)")); + fprintf (stderr, "\n"); + } + + if (interactive_shell && subshell_environment == 0) + { + if (WIFSIGNALED (status) || WIFSTOPPED (status)) + set_tty_state (); + else + get_tty_state (); + } + else if (interactive_shell == 0 && subshell_environment == 0 && check_window_size) + get_new_window_size (0, (int *)0, (int *)0); + + return (return_val); +} + +/* Send PID SIGNAL. Returns -1 on failure, 0 on success. If GROUP is non-zero, + or PID is less than -1, then kill the process group associated with PID. */ +int +kill_pid (pid, signal, group) + pid_t pid; + int signal, group; +{ + int result; + + if (pid < -1) + { + pid = -pid; + group = 1; + } + result = group ? killpg (pid, signal) : kill (pid, signal); + return (result); +} + +static TTYSTRUCT shell_tty_info; +static int got_tty_state; + +/* Fill the contents of shell_tty_info with the current tty info. */ +int +get_tty_state () +{ + int tty; + + tty = input_tty (); + if (tty != -1) + { + ttgetattr (tty, &shell_tty_info); + got_tty_state = 1; + if (check_window_size) + get_new_window_size (0, (int *)0, (int *)0); + } + return 0; +} + +/* Make the current tty use the state in shell_tty_info. */ +int +set_tty_state () +{ + int tty; + + tty = input_tty (); + if (tty != -1) + { + if (got_tty_state == 0) + return 0; + ttsetattr (tty, &shell_tty_info); + } + return 0; +} + +/* Give the terminal to PGRP. */ +int +give_terminal_to (pgrp, force) + pid_t pgrp; + int force; +{ + return 0; +} + +/* Stop a pipeline. */ +int +stop_pipeline (async, ignore) + int async; + COMMAND *ignore; +{ + already_making_children = 0; + return 0; +} + +void +start_pipeline () +{ + already_making_children = 1; +} + +void +stop_making_children () +{ + already_making_children = 0; +} + +/* The name is kind of a misnomer, but it's what the job control code uses. */ +void +without_job_control () +{ + stop_making_children (); + last_made_pid = NO_PID; /* XXX */ +} + +int +get_job_by_pid (pid, block, ignore) + pid_t pid; + int block; + PROCESS **ignore; +{ + int i; + + i = find_index_by_pid (pid); + return ((i == NO_PID) ? PROC_BAD : i); +} + +/* Print descriptive information about the job with leader pid PID. */ +void +describe_pid (pid) + pid_t pid; +{ + fprintf (stderr, "%ld\n", (long) pid); +} + +int +freeze_jobs_list () +{ + return 0; +} + +void +unfreeze_jobs_list () +{ +} + +void +set_jobs_list_frozen (s) + int s; +{ +} + +int +count_all_jobs () +{ + return 0; +} diff --git a/bash-5.1/parse.y b/bash-5.1/parse.y new file mode 100644 index 0000000000000000000000000000000000000000..2449fa80c860a3832f28c10d0298cbe88d56a47c --- /dev/null +++ b/bash-5.1/parse.y @@ -0,0 +1,6921 @@ +/* parse.y - Yacc grammar for bash. */ + +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +%{ +#include "config.h" + +#include "bashtypes.h" +#include "bashansi.h" + +#include "filecntl.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#include +#include "chartypes.h" +#include + +#include "memalloc.h" + +#include "bashintl.h" + +#define NEED_STRFTIME_DECL /* used in externs.h */ + +#include "shell.h" +#include "execute_cmd.h" +#include "typemax.h" /* SIZE_MAX if needed */ +#include "trap.h" +#include "flags.h" +#include "parser.h" +#include "mailcheck.h" +#include "test.h" +#include "builtins.h" +#include "builtins/common.h" +#include "builtins/builtext.h" + +#include "shmbutil.h" + +#if defined (READLINE) +# include "bashline.h" +# include +#endif /* READLINE */ + +#if defined (HISTORY) +# include "bashhist.h" +# include +#endif /* HISTORY */ + +#if defined (JOB_CONTROL) +# include "jobs.h" +#else +extern int cleanup_dead_jobs PARAMS((void)); +#endif /* JOB_CONTROL */ + +#if defined (ALIAS) +# include "alias.h" +#else +typedef void *alias_t; +#endif /* ALIAS */ + +#if defined (PROMPT_STRING_DECODE) +# ifndef _MINIX +# include +# endif +# include +# if defined (TM_IN_SYS_TIME) +# include +# include +# endif /* TM_IN_SYS_TIME */ +# include "maxpath.h" +#endif /* PROMPT_STRING_DECODE */ + +#define RE_READ_TOKEN -99 +#define NO_EXPANSION -100 + +#define END_ALIAS -2 + +#ifdef DEBUG +# define YYDEBUG 1 +#else +# define YYDEBUG 0 +#endif + +#if defined (HANDLE_MULTIBYTE) +# define last_shell_getc_is_singlebyte \ + ((shell_input_line_index > 1) \ + ? shell_input_line_property[shell_input_line_index - 1] \ + : 1) +# define MBTEST(x) ((x) && last_shell_getc_is_singlebyte) +#else +# define last_shell_getc_is_singlebyte 1 +# define MBTEST(x) ((x)) +#endif + +#if defined (EXTENDED_GLOB) +extern int extended_glob; +#endif + +extern int dump_translatable_strings, dump_po_strings; + +#if !defined (errno) +extern int errno; +#endif + +/* **************************************************************** */ +/* */ +/* "Forward" declarations */ +/* */ +/* **************************************************************** */ + +#ifdef DEBUG +static void debug_parser PARAMS((int)); +#endif + +static int yy_getc PARAMS((void)); +static int yy_ungetc PARAMS((int)); + +#if defined (READLINE) +static int yy_readline_get PARAMS((void)); +static int yy_readline_unget PARAMS((int)); +#endif + +static int yy_string_get PARAMS((void)); +static int yy_string_unget PARAMS((int)); +static void rewind_input_string PARAMS((void)); +static int yy_stream_get PARAMS((void)); +static int yy_stream_unget PARAMS((int)); + +static int shell_getc PARAMS((int)); +static void shell_ungetc PARAMS((int)); +static void discard_until PARAMS((int)); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) +static void push_string PARAMS((char *, int, alias_t *)); +static void pop_string PARAMS((void)); +static void free_string_list PARAMS((void)); +#endif + +static char *read_a_line PARAMS((int)); + +static int reserved_word_acceptable PARAMS((int)); +static int yylex PARAMS((void)); + +static void push_heredoc PARAMS((REDIRECT *)); +static char *mk_alexpansion PARAMS((char *)); +static int alias_expand_token PARAMS((char *)); +static int time_command_acceptable PARAMS((void)); +static int special_case_tokens PARAMS((char *)); +static int read_token PARAMS((int)); +static char *parse_matched_pair PARAMS((int, int, int, int *, int)); +static char *parse_comsub PARAMS((int, int, int, int *, int)); +#if defined (ARRAY_VARS) +static char *parse_compound_assignment PARAMS((int *)); +#endif +#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) +static int parse_dparen PARAMS((int)); +static int parse_arith_cmd PARAMS((char **, int)); +#endif +#if defined (COND_COMMAND) +static void cond_error PARAMS((void)); +static COND_COM *cond_expr PARAMS((void)); +static COND_COM *cond_or PARAMS((void)); +static COND_COM *cond_and PARAMS((void)); +static COND_COM *cond_term PARAMS((void)); +static int cond_skip_newlines PARAMS((void)); +static COMMAND *parse_cond_command PARAMS((void)); +#endif +#if defined (ARRAY_VARS) +static int token_is_assignment PARAMS((char *, int)); +static int token_is_ident PARAMS((char *, int)); +#endif +static int read_token_word PARAMS((int)); +static void discard_parser_constructs PARAMS((int)); + +static char *error_token_from_token PARAMS((int)); +static char *error_token_from_text PARAMS((void)); +static void print_offending_line PARAMS((void)); +static void report_syntax_error PARAMS((char *)); + +static void handle_eof_input_unit PARAMS((void)); +static void prompt_again PARAMS((void)); +#if 0 +static void reset_readline_prompt PARAMS((void)); +#endif +static void print_prompt PARAMS((void)); + +#if defined (HANDLE_MULTIBYTE) +static void set_line_mbstate PARAMS((void)); +static char *shell_input_line_property = NULL; +static size_t shell_input_line_propsize = 0; +#else +# define set_line_mbstate() +#endif + +extern int yyerror PARAMS((const char *)); + +#ifdef DEBUG +extern int yydebug; +#endif + +/* Default prompt strings */ +char *primary_prompt = PPROMPT; +char *secondary_prompt = SPROMPT; + +/* PROMPT_STRING_POINTER points to one of these, never to an actual string. */ +char *ps1_prompt, *ps2_prompt; + +/* Displayed after reading a command but before executing it in an interactive shell */ +char *ps0_prompt; + +/* Handle on the current prompt string. Indirectly points through + ps1_ or ps2_prompt. */ +char **prompt_string_pointer = (char **)NULL; +char *current_prompt_string; + +/* Non-zero means we expand aliases in commands. */ +int expand_aliases = 0; + +/* If non-zero, the decoded prompt string undergoes parameter and + variable substitution, command substitution, arithmetic substitution, + string expansion, process substitution, and quote removal in + decode_prompt_string. */ +int promptvars = 1; + +/* If non-zero, $'...' and $"..." are expanded when they appear within + a ${...} expansion, even when the expansion appears within double + quotes. */ +int extended_quote = 1; + +/* The number of lines read from input while creating the current command. */ +int current_command_line_count; + +/* The number of lines in a command saved while we run parse_and_execute */ +int saved_command_line_count; + +/* The token that currently denotes the end of parse. */ +int shell_eof_token; + +/* The token currently being read. */ +int current_token; + +/* The current parser state. */ +int parser_state; + +/* Variables to manage the task of reading here documents, because we need to + defer the reading until after a complete command has been collected. */ +static REDIRECT *redir_stack[HEREDOC_MAX]; +int need_here_doc; + +/* Where shell input comes from. History expansion is performed on each + line when the shell is interactive. */ +static char *shell_input_line = (char *)NULL; +static size_t shell_input_line_index; +static size_t shell_input_line_size; /* Amount allocated for shell_input_line. */ +static size_t shell_input_line_len; /* strlen (shell_input_line) */ + +/* Either zero or EOF. */ +static int shell_input_line_terminator; + +/* The line number in a script on which a function definition starts. */ +static int function_dstart; + +/* The line number in a script on which a function body starts. */ +static int function_bstart; + +/* The line number in a script at which an arithmetic for command starts. */ +static int arith_for_lineno; + +/* The decoded prompt string. Used if READLINE is not defined or if + editing is turned off. Analogous to current_readline_prompt. */ +static char *current_decoded_prompt; + +/* The last read token, or NULL. read_token () uses this for context + checking. */ +static int last_read_token; + +/* The token read prior to last_read_token. */ +static int token_before_that; + +/* The token read prior to token_before_that. */ +static int two_tokens_ago; + +static int global_extglob; + +/* The line number in a script where the word in a `case WORD', `select WORD' + or `for WORD' begins. This is a nested command maximum, since the array + index is decremented after a case, select, or for command is parsed. */ +#define MAX_CASE_NEST 128 +static int word_lineno[MAX_CASE_NEST+1]; +static int word_top = -1; + +/* If non-zero, it is the token that we want read_token to return + regardless of what text is (or isn't) present to be read. This + is reset by read_token. If token_to_read == WORD or + ASSIGNMENT_WORD, yylval.word should be set to word_desc_to_read. */ +static int token_to_read; +static WORD_DESC *word_desc_to_read; + +static REDIRECTEE source; +static REDIRECTEE redir; + +static FILE *yyoutstream; +static FILE *yyerrstream; +%} + +%union { + WORD_DESC *word; /* the word that we read. */ + int number; /* the number that we read. */ + WORD_LIST *word_list; + COMMAND *command; + REDIRECT *redirect; + ELEMENT element; + PATTERN_LIST *pattern; +} + +/* Reserved words. Members of the first group are only recognized + in the case that they are preceded by a list_terminator. Members + of the second group are for [[...]] commands. Members of the + third group are recognized only under special circumstances. */ +%token IF THEN ELSE ELIF FI CASE ESAC FOR SELECT WHILE UNTIL DO DONE FUNCTION COPROC +%token COND_START COND_END COND_ERROR +%token IN BANG TIME TIMEOPT TIMEIGN + +/* More general tokens. yylex () knows how to make these. */ +%token WORD ASSIGNMENT_WORD REDIR_WORD +%token NUMBER +%token ARITH_CMD ARITH_FOR_EXPRS +%token COND_CMD +%token AND_AND OR_OR GREATER_GREATER LESS_LESS LESS_AND LESS_LESS_LESS +%token GREATER_AND SEMI_SEMI SEMI_AND SEMI_SEMI_AND +%token LESS_LESS_MINUS AND_GREATER AND_GREATER_GREATER LESS_GREATER +%token GREATER_BAR BAR_AND + +/* The types that the various syntactical units return. */ + +%type inputunit command pipeline pipeline_command +%type list list0 list1 compound_list simple_list simple_list1 +%type simple_command shell_command +%type for_command select_command case_command group_command +%type arith_command +%type cond_command +%type arith_for_command +%type coproc +%type function_def function_body if_command elif_clause subshell +%type redirection redirection_list +%type simple_command_element +%type word_list pattern +%type pattern_list case_clause_sequence case_clause +%type timespec +%type list_terminator + +%start inputunit + +%left '&' ';' '\n' yacc_EOF +%left AND_AND OR_OR +%right '|' BAR_AND +%% + +inputunit: simple_list simple_list_terminator + { + /* Case of regular command. Discard the error + safety net,and return the command just parsed. */ + global_command = $1; + eof_encountered = 0; + /* discard_parser_constructs (0); */ + if (parser_state & PST_CMDSUBST) + parser_state |= PST_EOFTOKEN; + YYACCEPT; + } + | '\n' + { + /* Case of regular command, but not a very + interesting one. Return a NULL command. */ + global_command = (COMMAND *)NULL; + if (parser_state & PST_CMDSUBST) + parser_state |= PST_EOFTOKEN; + YYACCEPT; + } + | error '\n' + { + /* Error during parsing. Return NULL command. */ + global_command = (COMMAND *)NULL; + eof_encountered = 0; + /* discard_parser_constructs (1); */ + if (interactive && parse_and_execute_level == 0) + { + YYACCEPT; + } + else + { + YYABORT; + } + } + | error yacc_EOF + { + /* EOF after an error. Do ignoreeof or not. Really + only interesting in non-interactive shells */ + global_command = (COMMAND *)NULL; + if (last_command_exit_value == 0) + last_command_exit_value = EX_BADUSAGE; /* force error return */ + if (interactive && parse_and_execute_level == 0) + { + handle_eof_input_unit (); + YYACCEPT; + } + else + { + YYABORT; + } + } + | yacc_EOF + { + /* Case of EOF seen by itself. Do ignoreeof or + not. */ + global_command = (COMMAND *)NULL; + handle_eof_input_unit (); + YYACCEPT; + } + ; + +word_list: WORD + { $$ = make_word_list ($1, (WORD_LIST *)NULL); } + | word_list WORD + { $$ = make_word_list ($2, $1); } + ; + +redirection: '>' WORD + { + source.dest = 1; + redir.filename = $2; + $$ = make_redirection (source, r_output_direction, redir, 0); + } + | '<' WORD + { + source.dest = 0; + redir.filename = $2; + $$ = make_redirection (source, r_input_direction, redir, 0); + } + | NUMBER '>' WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_output_direction, redir, 0); + } + | NUMBER '<' WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_input_direction, redir, 0); + } + | REDIR_WORD '>' WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_output_direction, redir, REDIR_VARASSIGN); + } + | REDIR_WORD '<' WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_input_direction, redir, REDIR_VARASSIGN); + } + | GREATER_GREATER WORD + { + source.dest = 1; + redir.filename = $2; + $$ = make_redirection (source, r_appending_to, redir, 0); + } + | NUMBER GREATER_GREATER WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_appending_to, redir, 0); + } + | REDIR_WORD GREATER_GREATER WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_appending_to, redir, REDIR_VARASSIGN); + } + | GREATER_BAR WORD + { + source.dest = 1; + redir.filename = $2; + $$ = make_redirection (source, r_output_force, redir, 0); + } + | NUMBER GREATER_BAR WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_output_force, redir, 0); + } + | REDIR_WORD GREATER_BAR WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_output_force, redir, REDIR_VARASSIGN); + } + | LESS_GREATER WORD + { + source.dest = 0; + redir.filename = $2; + $$ = make_redirection (source, r_input_output, redir, 0); + } + | NUMBER LESS_GREATER WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_input_output, redir, 0); + } + | REDIR_WORD LESS_GREATER WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_input_output, redir, REDIR_VARASSIGN); + } + | LESS_LESS WORD + { + source.dest = 0; + redir.filename = $2; + $$ = make_redirection (source, r_reading_until, redir, 0); + push_heredoc ($$); + } + | NUMBER LESS_LESS WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_reading_until, redir, 0); + push_heredoc ($$); + } + | REDIR_WORD LESS_LESS WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN); + push_heredoc ($$); + } + | LESS_LESS_MINUS WORD + { + source.dest = 0; + redir.filename = $2; + $$ = make_redirection (source, r_deblank_reading_until, redir, 0); + push_heredoc ($$); + } + | NUMBER LESS_LESS_MINUS WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_deblank_reading_until, redir, 0); + push_heredoc ($$); + } + | REDIR_WORD LESS_LESS_MINUS WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN); + push_heredoc ($$); + } + | LESS_LESS_LESS WORD + { + source.dest = 0; + redir.filename = $2; + $$ = make_redirection (source, r_reading_string, redir, 0); + } + | NUMBER LESS_LESS_LESS WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_reading_string, redir, 0); + } + | REDIR_WORD LESS_LESS_LESS WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_reading_string, redir, REDIR_VARASSIGN); + } + | LESS_AND NUMBER + { + source.dest = 0; + redir.dest = $2; + $$ = make_redirection (source, r_duplicating_input, redir, 0); + } + | NUMBER LESS_AND NUMBER + { + source.dest = $1; + redir.dest = $3; + $$ = make_redirection (source, r_duplicating_input, redir, 0); + } + | REDIR_WORD LESS_AND NUMBER + { + source.filename = $1; + redir.dest = $3; + $$ = make_redirection (source, r_duplicating_input, redir, REDIR_VARASSIGN); + } + | GREATER_AND NUMBER + { + source.dest = 1; + redir.dest = $2; + $$ = make_redirection (source, r_duplicating_output, redir, 0); + } + | NUMBER GREATER_AND NUMBER + { + source.dest = $1; + redir.dest = $3; + $$ = make_redirection (source, r_duplicating_output, redir, 0); + } + | REDIR_WORD GREATER_AND NUMBER + { + source.filename = $1; + redir.dest = $3; + $$ = make_redirection (source, r_duplicating_output, redir, REDIR_VARASSIGN); + } + | LESS_AND WORD + { + source.dest = 0; + redir.filename = $2; + $$ = make_redirection (source, r_duplicating_input_word, redir, 0); + } + | NUMBER LESS_AND WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_duplicating_input_word, redir, 0); + } + | REDIR_WORD LESS_AND WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_duplicating_input_word, redir, REDIR_VARASSIGN); + } + | GREATER_AND WORD + { + source.dest = 1; + redir.filename = $2; + $$ = make_redirection (source, r_duplicating_output_word, redir, 0); + } + | NUMBER GREATER_AND WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_duplicating_output_word, redir, 0); + } + | REDIR_WORD GREATER_AND WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_duplicating_output_word, redir, REDIR_VARASSIGN); + } + | GREATER_AND '-' + { + source.dest = 1; + redir.dest = 0; + $$ = make_redirection (source, r_close_this, redir, 0); + } + | NUMBER GREATER_AND '-' + { + source.dest = $1; + redir.dest = 0; + $$ = make_redirection (source, r_close_this, redir, 0); + } + | REDIR_WORD GREATER_AND '-' + { + source.filename = $1; + redir.dest = 0; + $$ = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN); + } + | LESS_AND '-' + { + source.dest = 0; + redir.dest = 0; + $$ = make_redirection (source, r_close_this, redir, 0); + } + | NUMBER LESS_AND '-' + { + source.dest = $1; + redir.dest = 0; + $$ = make_redirection (source, r_close_this, redir, 0); + } + | REDIR_WORD LESS_AND '-' + { + source.filename = $1; + redir.dest = 0; + $$ = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN); + } + | AND_GREATER WORD + { + source.dest = 1; + redir.filename = $2; + $$ = make_redirection (source, r_err_and_out, redir, 0); + } + | AND_GREATER_GREATER WORD + { + source.dest = 1; + redir.filename = $2; + $$ = make_redirection (source, r_append_err_and_out, redir, 0); + } + ; + +simple_command_element: WORD + { $$.word = $1; $$.redirect = 0; } + | ASSIGNMENT_WORD + { $$.word = $1; $$.redirect = 0; } + | redirection + { $$.redirect = $1; $$.word = 0; } + ; + +redirection_list: redirection + { + $$ = $1; + } + | redirection_list redirection + { + register REDIRECT *t; + + for (t = $1; t->next; t = t->next) + ; + t->next = $2; + $$ = $1; + } + ; + +simple_command: simple_command_element + { $$ = make_simple_command ($1, (COMMAND *)NULL); } + | simple_command simple_command_element + { $$ = make_simple_command ($2, $1); } + ; + +command: simple_command + { $$ = clean_simple_command ($1); } + | shell_command + { $$ = $1; } + | shell_command redirection_list + { + COMMAND *tc; + + tc = $1; + if (tc && tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = $2; + } + else if (tc) + tc->redirects = $2; + $$ = $1; + } + | function_def + { $$ = $1; } + | coproc + { $$ = $1; } + ; + +shell_command: for_command + { $$ = $1; } + | case_command + { $$ = $1; } + | WHILE compound_list DO compound_list DONE + { $$ = make_while_command ($2, $4); } + | UNTIL compound_list DO compound_list DONE + { $$ = make_until_command ($2, $4); } + | select_command + { $$ = $1; } + | if_command + { $$ = $1; } + | subshell + { $$ = $1; } + | group_command + { $$ = $1; } + | arith_command + { $$ = $1; } + | cond_command + { $$ = $1; } + | arith_for_command + { $$ = $1; } + ; + +for_command: FOR WORD newline_list DO compound_list DONE + { + $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | FOR WORD newline_list '{' compound_list '}' + { + $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | FOR WORD ';' newline_list DO compound_list DONE + { + $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | FOR WORD ';' newline_list '{' compound_list '}' + { + $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | FOR WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE + { + $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | FOR WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}' + { + $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | FOR WORD newline_list IN list_terminator newline_list DO compound_list DONE + { + $$ = make_for_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | FOR WORD newline_list IN list_terminator newline_list '{' compound_list '}' + { + $$ = make_for_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + ; + +arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list DO compound_list DONE + { + $$ = make_arith_for_command ($2, $6, arith_for_lineno); + if ($$ == 0) YYERROR; + if (word_top > 0) word_top--; + } + | FOR ARITH_FOR_EXPRS list_terminator newline_list '{' compound_list '}' + { + $$ = make_arith_for_command ($2, $6, arith_for_lineno); + if ($$ == 0) YYERROR; + if (word_top > 0) word_top--; + } + | FOR ARITH_FOR_EXPRS DO compound_list DONE + { + $$ = make_arith_for_command ($2, $4, arith_for_lineno); + if ($$ == 0) YYERROR; + if (word_top > 0) word_top--; + } + | FOR ARITH_FOR_EXPRS '{' compound_list '}' + { + $$ = make_arith_for_command ($2, $4, arith_for_lineno); + if ($$ == 0) YYERROR; + if (word_top > 0) word_top--; + } + ; + +select_command: SELECT WORD newline_list DO list DONE + { + $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD newline_list '{' list '}' + { + $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD ';' newline_list DO list DONE + { + $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD ';' newline_list '{' list '}' + { + $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD newline_list IN word_list list_terminator newline_list DO list DONE + { + $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD newline_list IN word_list list_terminator newline_list '{' list '}' + { + $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD newline_list IN list_terminator newline_list DO compound_list DONE + { + $$ = make_select_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD newline_list IN list_terminator newline_list '{' compound_list '}' + { + $$ = make_select_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + ; + +case_command: CASE WORD newline_list IN newline_list ESAC + { + $$ = make_case_command ($2, (PATTERN_LIST *)NULL, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | CASE WORD newline_list IN case_clause_sequence newline_list ESAC + { + $$ = make_case_command ($2, $5, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | CASE WORD newline_list IN case_clause ESAC + { + $$ = make_case_command ($2, $5, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + ; + +function_def: WORD '(' ')' newline_list function_body + { $$ = make_function_def ($1, $5, function_dstart, function_bstart); } + | FUNCTION WORD '(' ')' newline_list function_body + { $$ = make_function_def ($2, $6, function_dstart, function_bstart); } + | FUNCTION WORD function_body + { $$ = make_function_def ($2, $3, function_dstart, function_bstart); } + | FUNCTION WORD '\n' newline_list function_body + { $$ = make_function_def ($2, $5, function_dstart, function_bstart); } + ; + +function_body: shell_command + { $$ = $1; } + | shell_command redirection_list + { + COMMAND *tc; + + tc = $1; + /* According to Posix.2 3.9.5, redirections + specified after the body of a function should + be attached to the function and performed when + the function is executed, not as part of the + function definition command. */ + /* XXX - I don't think it matters, but we might + want to change this in the future to avoid + problems differentiating between a function + definition with a redirection and a function + definition containing a single command with a + redirection. The two are semantically equivalent, + though -- the only difference is in how the + command printing code displays the redirections. */ + if (tc && tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = $2; + } + else if (tc) + tc->redirects = $2; + $$ = $1; + } + ; + +subshell: '(' compound_list ')' + { + $$ = make_subshell_command ($2); + $$->flags |= CMD_WANT_SUBSHELL; + } + ; + +coproc: COPROC shell_command + { + $$ = make_coproc_command ("COPROC", $2); + $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL; + } + | COPROC shell_command redirection_list + { + COMMAND *tc; + + tc = $2; + if (tc && tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = $3; + } + else if (tc) + tc->redirects = $3; + $$ = make_coproc_command ("COPROC", $2); + $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL; + } + | COPROC WORD shell_command + { + $$ = make_coproc_command ($2->word, $3); + $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL; + } + | COPROC WORD shell_command redirection_list + { + COMMAND *tc; + + tc = $3; + if (tc && tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = $4; + } + else if (tc) + tc->redirects = $4; + $$ = make_coproc_command ($2->word, $3); + $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL; + } + | COPROC simple_command + { + $$ = make_coproc_command ("COPROC", clean_simple_command ($2)); + $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL; + } + ; + +if_command: IF compound_list THEN compound_list FI + { $$ = make_if_command ($2, $4, (COMMAND *)NULL); } + | IF compound_list THEN compound_list ELSE compound_list FI + { $$ = make_if_command ($2, $4, $6); } + | IF compound_list THEN compound_list elif_clause FI + { $$ = make_if_command ($2, $4, $5); } + ; + + +group_command: '{' compound_list '}' + { $$ = make_group_command ($2); } + ; + +arith_command: ARITH_CMD + { $$ = make_arith_command ($1); } + ; + +cond_command: COND_START COND_CMD COND_END + { $$ = $2; } + ; + +elif_clause: ELIF compound_list THEN compound_list + { $$ = make_if_command ($2, $4, (COMMAND *)NULL); } + | ELIF compound_list THEN compound_list ELSE compound_list + { $$ = make_if_command ($2, $4, $6); } + | ELIF compound_list THEN compound_list elif_clause + { $$ = make_if_command ($2, $4, $5); } + ; + +case_clause: pattern_list + | case_clause_sequence pattern_list + { $2->next = $1; $$ = $2; } + ; + +pattern_list: newline_list pattern ')' compound_list + { $$ = make_pattern_list ($2, $4); } + | newline_list pattern ')' newline_list + { $$ = make_pattern_list ($2, (COMMAND *)NULL); } + | newline_list '(' pattern ')' compound_list + { $$ = make_pattern_list ($3, $5); } + | newline_list '(' pattern ')' newline_list + { $$ = make_pattern_list ($3, (COMMAND *)NULL); } + ; + +case_clause_sequence: pattern_list SEMI_SEMI + { $$ = $1; } + | case_clause_sequence pattern_list SEMI_SEMI + { $2->next = $1; $$ = $2; } + | pattern_list SEMI_AND + { $1->flags |= CASEPAT_FALLTHROUGH; $$ = $1; } + | case_clause_sequence pattern_list SEMI_AND + { $2->flags |= CASEPAT_FALLTHROUGH; $2->next = $1; $$ = $2; } + | pattern_list SEMI_SEMI_AND + { $1->flags |= CASEPAT_TESTNEXT; $$ = $1; } + | case_clause_sequence pattern_list SEMI_SEMI_AND + { $2->flags |= CASEPAT_TESTNEXT; $2->next = $1; $$ = $2; } + ; + +pattern: WORD + { $$ = make_word_list ($1, (WORD_LIST *)NULL); } + | pattern '|' WORD + { $$ = make_word_list ($3, $1); } + ; + +/* A list allows leading or trailing newlines and + newlines as operators (equivalent to semicolons). + It must end with a newline or semicolon. + Lists are used within commands such as if, for, while. */ + +list: newline_list list0 + { + $$ = $2; + if (need_here_doc) + gather_here_documents (); + } + ; + +compound_list: list + | newline_list list1 + { + $$ = $2; + } + ; + +list0: list1 '\n' newline_list + | list1 '&' newline_list + { + if ($1->type == cm_connection) + $$ = connect_async_list ($1, (COMMAND *)NULL, '&'); + else + $$ = command_connect ($1, (COMMAND *)NULL, '&'); + } + | list1 ';' newline_list + + ; + +list1: list1 AND_AND newline_list list1 + { $$ = command_connect ($1, $4, AND_AND); } + | list1 OR_OR newline_list list1 + { $$ = command_connect ($1, $4, OR_OR); } + | list1 '&' newline_list list1 + { + if ($1->type == cm_connection) + $$ = connect_async_list ($1, $4, '&'); + else + $$ = command_connect ($1, $4, '&'); + } + | list1 ';' newline_list list1 + { $$ = command_connect ($1, $4, ';'); } + | list1 '\n' newline_list list1 + { $$ = command_connect ($1, $4, ';'); } + | pipeline_command + { $$ = $1; } + ; + +simple_list_terminator: '\n' + | yacc_EOF + ; + +list_terminator:'\n' + { $$ = '\n'; } + | ';' + { $$ = ';'; } + | yacc_EOF + { $$ = yacc_EOF; } + ; + +newline_list: + | newline_list '\n' + ; + +/* A simple_list is a list that contains no significant newlines + and no leading or trailing newlines. Newlines are allowed + only following operators, where they are not significant. + + This is what an inputunit consists of. */ + +simple_list: simple_list1 + { + $$ = $1; + if (need_here_doc) + gather_here_documents (); + if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) + { + global_command = $1; + eof_encountered = 0; + rewind_input_string (); + YYACCEPT; + } + } + | simple_list1 '&' + { + if ($1->type == cm_connection) + $$ = connect_async_list ($1, (COMMAND *)NULL, '&'); + else + $$ = command_connect ($1, (COMMAND *)NULL, '&'); + if (need_here_doc) + gather_here_documents (); + if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) + { + global_command = $1; + eof_encountered = 0; + rewind_input_string (); + YYACCEPT; + } + } + | simple_list1 ';' + { + $$ = $1; + if (need_here_doc) + gather_here_documents (); + if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) + { + global_command = $1; + eof_encountered = 0; + rewind_input_string (); + YYACCEPT; + } + } + ; + +simple_list1: simple_list1 AND_AND newline_list simple_list1 + { $$ = command_connect ($1, $4, AND_AND); } + | simple_list1 OR_OR newline_list simple_list1 + { $$ = command_connect ($1, $4, OR_OR); } + | simple_list1 '&' simple_list1 + { + if ($1->type == cm_connection) + $$ = connect_async_list ($1, $3, '&'); + else + $$ = command_connect ($1, $3, '&'); + } + | simple_list1 ';' simple_list1 + { $$ = command_connect ($1, $3, ';'); } + + | pipeline_command + { $$ = $1; } + ; + +pipeline_command: pipeline + { $$ = $1; } + | BANG pipeline_command + { + if ($2) + $2->flags ^= CMD_INVERT_RETURN; /* toggle */ + $$ = $2; + } + | timespec pipeline_command + { + if ($2) + $2->flags |= $1; + $$ = $2; + } + | timespec list_terminator + { + ELEMENT x; + + /* Boy, this is unclean. `time' by itself can + time a null command. We cheat and push a + newline back if the list_terminator was a newline + to avoid the double-newline problem (one to + terminate this, one to terminate the command) */ + x.word = 0; + x.redirect = 0; + $$ = make_simple_command (x, (COMMAND *)NULL); + $$->flags |= $1; + /* XXX - let's cheat and push a newline back */ + if ($2 == '\n') + token_to_read = '\n'; + else if ($2 == ';') + token_to_read = ';'; + parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */ + } + | BANG list_terminator + { + ELEMENT x; + + /* This is just as unclean. Posix says that `!' + by itself should be equivalent to `false'. + We cheat and push a + newline back if the list_terminator was a newline + to avoid the double-newline problem (one to + terminate this, one to terminate the command) */ + x.word = 0; + x.redirect = 0; + $$ = make_simple_command (x, (COMMAND *)NULL); + $$->flags |= CMD_INVERT_RETURN; + /* XXX - let's cheat and push a newline back */ + if ($2 == '\n') + token_to_read = '\n'; + if ($2 == ';') + token_to_read = ';'; + parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */ + } + ; + +pipeline: pipeline '|' newline_list pipeline + { $$ = command_connect ($1, $4, '|'); } + | pipeline BAR_AND newline_list pipeline + { + /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */ + COMMAND *tc; + REDIRECTEE rd, sd; + REDIRECT *r; + + tc = $1->type == cm_simple ? (COMMAND *)$1->value.Simple : $1; + sd.dest = 2; + rd.dest = 1; + r = make_redirection (sd, r_duplicating_output, rd, 0); + if (tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = r; + } + else + tc->redirects = r; + + $$ = command_connect ($1, $4, '|'); + } + | command + { $$ = $1; } + ; + +timespec: TIME + { $$ = CMD_TIME_PIPELINE; } + | TIME TIMEOPT + { $$ = CMD_TIME_PIPELINE|CMD_TIME_POSIX; } + | TIME TIMEIGN + { $$ = CMD_TIME_PIPELINE|CMD_TIME_POSIX; } + | TIME TIMEOPT TIMEIGN + { $$ = CMD_TIME_PIPELINE|CMD_TIME_POSIX; } + ; +%% + +/* Initial size to allocate for tokens, and the + amount to grow them by. */ +#define TOKEN_DEFAULT_INITIAL_SIZE 496 +#define TOKEN_DEFAULT_GROW_SIZE 512 + +/* Should we call prompt_again? */ +#define SHOULD_PROMPT() \ + (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream)) + +#if defined (ALIAS) +# define expanding_alias() (pushed_string_list && pushed_string_list->expander) +#else +# define expanding_alias() 0 +#endif + +/* Global var is non-zero when end of file has been reached. */ +int EOF_Reached = 0; + +#ifdef DEBUG +static void +debug_parser (i) + int i; +{ +#if YYDEBUG != 0 + yydebug = i; + yyoutstream = stdout; + yyerrstream = stderr; +#endif +} +#endif + +/* yy_getc () returns the next available character from input or EOF. + yy_ungetc (c) makes `c' the next character to read. + init_yy_io (get, unget, type, location) makes the function GET the + installed function for getting the next character, makes UNGET the + installed function for un-getting a character, sets the type of stream + (either string or file) from TYPE, and makes LOCATION point to where + the input is coming from. */ + +/* Unconditionally returns end-of-file. */ +int +return_EOF () +{ + return (EOF); +} + +/* Variable containing the current get and unget functions. + See ./input.h for a clearer description. */ +BASH_INPUT bash_input; + +/* Set all of the fields in BASH_INPUT to NULL. Free bash_input.name if it + is non-null, avoiding a memory leak. */ +void +initialize_bash_input () +{ + bash_input.type = st_none; + FREE (bash_input.name); + bash_input.name = (char *)NULL; + bash_input.location.file = (FILE *)NULL; + bash_input.location.string = (char *)NULL; + bash_input.getter = (sh_cget_func_t *)NULL; + bash_input.ungetter = (sh_cunget_func_t *)NULL; +} + +/* Set the contents of the current bash input stream from + GET, UNGET, TYPE, NAME, and LOCATION. */ +void +init_yy_io (get, unget, type, name, location) + sh_cget_func_t *get; + sh_cunget_func_t *unget; + enum stream_type type; + const char *name; + INPUT_STREAM location; +{ + bash_input.type = type; + FREE (bash_input.name); + bash_input.name = name ? savestring (name) : (char *)NULL; + + /* XXX */ +#if defined (CRAY) + memcpy((char *)&bash_input.location.string, (char *)&location.string, sizeof(location)); +#else + bash_input.location = location; +#endif + bash_input.getter = get; + bash_input.ungetter = unget; +} + +char * +yy_input_name () +{ + return (bash_input.name ? bash_input.name : "stdin"); +} + +/* Call this to get the next character of input. */ +static int +yy_getc () +{ + return (*(bash_input.getter)) (); +} + +/* Call this to unget C. That is, to make C the next character + to be read. */ +static int +yy_ungetc (c) + int c; +{ + return (*(bash_input.ungetter)) (c); +} + +#if defined (BUFFERED_INPUT) +#ifdef INCLUDE_UNUSED +int +input_file_descriptor () +{ + switch (bash_input.type) + { + case st_stream: + return (fileno (bash_input.location.file)); + case st_bstream: + return (bash_input.location.buffered_fd); + case st_stdin: + default: + return (fileno (stdin)); + } +} +#endif +#endif /* BUFFERED_INPUT */ + +/* **************************************************************** */ +/* */ +/* Let input be read from readline (). */ +/* */ +/* **************************************************************** */ + +#if defined (READLINE) +char *current_readline_prompt = (char *)NULL; +char *current_readline_line = (char *)NULL; +int current_readline_line_index = 0; + +static int +yy_readline_get () +{ + SigHandler *old_sigint; + int line_len; + unsigned char c; + + if (current_readline_line == 0) + { + if (bash_readline_initialized == 0) + initialize_readline (); + +#if defined (JOB_CONTROL) + if (job_control) + give_terminal_to (shell_pgrp, 0); +#endif /* JOB_CONTROL */ + + old_sigint = IMPOSSIBLE_TRAP_HANDLER; + if (signal_is_ignored (SIGINT) == 0) + { + old_sigint = (SigHandler *)set_signal_handler (SIGINT, sigint_sighandler); + } + + sh_unset_nodelay_mode (fileno (rl_instream)); /* just in case */ + current_readline_line = readline (current_readline_prompt ? + current_readline_prompt : ""); + + CHECK_TERMSIG; + if (signal_is_ignored (SIGINT) == 0) + { + if (old_sigint != IMPOSSIBLE_TRAP_HANDLER) + set_signal_handler (SIGINT, old_sigint); + } + +#if 0 + /* Reset the prompt to the decoded value of prompt_string_pointer. */ + reset_readline_prompt (); +#endif + + if (current_readline_line == 0) + return (EOF); + + current_readline_line_index = 0; + line_len = strlen (current_readline_line); + + current_readline_line = (char *)xrealloc (current_readline_line, 2 + line_len); + current_readline_line[line_len++] = '\n'; + current_readline_line[line_len] = '\0'; + } + + if (current_readline_line[current_readline_line_index] == 0) + { + free (current_readline_line); + current_readline_line = (char *)NULL; + return (yy_readline_get ()); + } + else + { + c = current_readline_line[current_readline_line_index++]; + return (c); + } +} + +static int +yy_readline_unget (c) + int c; +{ + if (current_readline_line_index && current_readline_line) + current_readline_line[--current_readline_line_index] = c; + return (c); +} + +void +with_input_from_stdin () +{ + INPUT_STREAM location; + + if (bash_input.type != st_stdin && stream_on_stack (st_stdin) == 0) + { + location.string = current_readline_line; + init_yy_io (yy_readline_get, yy_readline_unget, + st_stdin, "readline stdin", location); + } +} + +/* Will we be collecting another input line and printing a prompt? This uses + different conditions than SHOULD_PROMPT(), since readline allows a user to + embed a newline in the middle of the line it collects, which the parser + will interpret as a line break and command delimiter. */ +int +parser_will_prompt () +{ + return (current_readline_line == 0 || current_readline_line[current_readline_line_index] == 0); +} + +#else /* !READLINE */ + +void +with_input_from_stdin () +{ + with_input_from_stream (stdin, "stdin"); +} +#endif /* !READLINE */ + +/* **************************************************************** */ +/* */ +/* Let input come from STRING. STRING is zero terminated. */ +/* */ +/* **************************************************************** */ + +static int +yy_string_get () +{ + register char *string; + register unsigned char c; + + string = bash_input.location.string; + + /* If the string doesn't exist, or is empty, EOF found. */ + if (string && *string) + { + c = *string++; + bash_input.location.string = string; + return (c); + } + else + return (EOF); +} + +static int +yy_string_unget (c) + int c; +{ + *(--bash_input.location.string) = c; + return (c); +} + +void +with_input_from_string (string, name) + char *string; + const char *name; +{ + INPUT_STREAM location; + + location.string = string; + init_yy_io (yy_string_get, yy_string_unget, st_string, name, location); +} + +/* Count the number of characters we've consumed from bash_input.location.string + and read into shell_input_line, but have not returned from shell_getc. + That is the true input location. Rewind bash_input.location.string by + that number of characters, so it points to the last character actually + consumed by the parser. */ +static void +rewind_input_string () +{ + int xchars; + + /* number of unconsumed characters in the input -- XXX need to take newlines + into account, e.g., $(...\n) */ + xchars = shell_input_line_len - shell_input_line_index; + if (bash_input.location.string[-1] == '\n') + xchars++; + + /* XXX - how to reflect bash_input.location.string back to string passed to + parse_and_execute or xparse_dolparen? xparse_dolparen needs to know how + far into the string we parsed. parse_and_execute knows where bash_input. + location.string is, and how far from orig_string that is -- that's the + number of characters the command consumed. */ + + /* bash_input.location.string - xchars should be where we parsed to */ + /* need to do more validation on xchars value for sanity -- test cases. */ + bash_input.location.string -= xchars; +} + +/* **************************************************************** */ +/* */ +/* Let input come from STREAM. */ +/* */ +/* **************************************************************** */ + +/* These two functions used to test the value of the HAVE_RESTARTABLE_SYSCALLS + define, and just use getc/ungetc if it was defined, but since bash + installs most of its signal handlers without the SA_RESTART flag, some + signals received during a read(2) will not cause the read to be restarted. + We will need to restart it ourselves. */ + +static int +yy_stream_get () +{ + int result; + + result = EOF; + if (bash_input.location.file) + { + /* XXX - don't need terminate_immediately; getc_with_restart checks + for terminating signals itself if read returns < 0 */ + result = getc_with_restart (bash_input.location.file); + } + return (result); +} + +static int +yy_stream_unget (c) + int c; +{ + return (ungetc_with_restart (c, bash_input.location.file)); +} + +void +with_input_from_stream (stream, name) + FILE *stream; + const char *name; +{ + INPUT_STREAM location; + + location.file = stream; + init_yy_io (yy_stream_get, yy_stream_unget, st_stream, name, location); +} + +typedef struct stream_saver { + struct stream_saver *next; + BASH_INPUT bash_input; + int line; +#if defined (BUFFERED_INPUT) + BUFFERED_STREAM *bstream; +#endif /* BUFFERED_INPUT */ +} STREAM_SAVER; + +/* The globally known line number. */ +int line_number = 0; + +/* The line number offset set by assigning to LINENO. Not currently used. */ +int line_number_base = 0; + +#if defined (COND_COMMAND) +static int cond_lineno; +static int cond_token; +#endif + +STREAM_SAVER *stream_list = (STREAM_SAVER *)NULL; + +void +push_stream (reset_lineno) + int reset_lineno; +{ + STREAM_SAVER *saver = (STREAM_SAVER *)xmalloc (sizeof (STREAM_SAVER)); + + xbcopy ((char *)&bash_input, (char *)&(saver->bash_input), sizeof (BASH_INPUT)); + +#if defined (BUFFERED_INPUT) + saver->bstream = (BUFFERED_STREAM *)NULL; + /* If we have a buffered stream, clear out buffers[fd]. */ + if (bash_input.type == st_bstream && bash_input.location.buffered_fd >= 0) + saver->bstream = set_buffered_stream (bash_input.location.buffered_fd, + (BUFFERED_STREAM *)NULL); +#endif /* BUFFERED_INPUT */ + + saver->line = line_number; + bash_input.name = (char *)NULL; + saver->next = stream_list; + stream_list = saver; + EOF_Reached = 0; + if (reset_lineno) + line_number = 0; +} + +void +pop_stream () +{ + if (!stream_list) + EOF_Reached = 1; + else + { + STREAM_SAVER *saver = stream_list; + + EOF_Reached = 0; + stream_list = stream_list->next; + + init_yy_io (saver->bash_input.getter, + saver->bash_input.ungetter, + saver->bash_input.type, + saver->bash_input.name, + saver->bash_input.location); + +#if defined (BUFFERED_INPUT) + /* If we have a buffered stream, restore buffers[fd]. */ + /* If the input file descriptor was changed while this was on the + save stack, update the buffered fd to the new file descriptor and + re-establish the buffer <-> bash_input fd correspondence. */ + if (bash_input.type == st_bstream && bash_input.location.buffered_fd >= 0) + { + if (bash_input_fd_changed) + { + bash_input_fd_changed = 0; + if (default_buffered_input >= 0) + { + bash_input.location.buffered_fd = default_buffered_input; + saver->bstream->b_fd = default_buffered_input; + SET_CLOSE_ON_EXEC (default_buffered_input); + } + } + /* XXX could free buffered stream returned as result here. */ + set_buffered_stream (bash_input.location.buffered_fd, saver->bstream); + } +#endif /* BUFFERED_INPUT */ + + line_number = saver->line; + + FREE (saver->bash_input.name); + free (saver); + } +} + +/* Return 1 if a stream of type TYPE is saved on the stack. */ +int +stream_on_stack (type) + enum stream_type type; +{ + register STREAM_SAVER *s; + + for (s = stream_list; s; s = s->next) + if (s->bash_input.type == type) + return 1; + return 0; +} + +/* Save the current token state and return it in a malloced array. */ +int * +save_token_state () +{ + int *ret; + + ret = (int *)xmalloc (4 * sizeof (int)); + ret[0] = last_read_token; + ret[1] = token_before_that; + ret[2] = two_tokens_ago; + ret[3] = current_token; + return ret; +} + +void +restore_token_state (ts) + int *ts; +{ + if (ts == 0) + return; + last_read_token = ts[0]; + token_before_that = ts[1]; + two_tokens_ago = ts[2]; + current_token = ts[3]; +} + +/* + * This is used to inhibit alias expansion and reserved word recognition + * inside case statement pattern lists. A `case statement pattern list' is: + * + * everything between the `in' in a `case word in' and the next ')' + * or `esac' + * everything between a `;;' and the next `)' or `esac' + */ + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + +#define END_OF_ALIAS 0 + +/* + * Pseudo-global variables used in implementing token-wise alias expansion. + */ + +/* + * Pushing and popping strings. This works together with shell_getc to + * implement alias expansion on a per-token basis. + */ + +#define PSH_ALIAS 0x01 +#define PSH_DPAREN 0x02 +#define PSH_SOURCE 0x04 +#define PSH_ARRAY 0x08 + +typedef struct string_saver { + struct string_saver *next; + int expand_alias; /* Value to set expand_alias to when string is popped. */ + char *saved_line; +#if defined (ALIAS) + alias_t *expander; /* alias that caused this line to be pushed. */ +#endif + size_t saved_line_size, saved_line_index; + int saved_line_terminator; + int flags; +} STRING_SAVER; + +STRING_SAVER *pushed_string_list = (STRING_SAVER *)NULL; + +/* + * Push the current shell_input_line onto a stack of such lines and make S + * the current input. Used when expanding aliases. EXPAND is used to set + * the value of expand_next_token when the string is popped, so that the + * word after the alias in the original line is handled correctly when the + * alias expands to multiple words. TOKEN is the token that was expanded + * into S; it is saved and used to prevent infinite recursive expansion. + */ +static void +push_string (s, expand, ap) + char *s; + int expand; + alias_t *ap; +{ + STRING_SAVER *temp = (STRING_SAVER *)xmalloc (sizeof (STRING_SAVER)); + + temp->expand_alias = expand; + temp->saved_line = shell_input_line; + temp->saved_line_size = shell_input_line_size; + temp->saved_line_index = shell_input_line_index; + temp->saved_line_terminator = shell_input_line_terminator; + temp->flags = 0; +#if defined (ALIAS) + temp->expander = ap; + if (ap) + temp->flags = PSH_ALIAS; +#endif + temp->next = pushed_string_list; + pushed_string_list = temp; + +#if defined (ALIAS) + if (ap) + ap->flags |= AL_BEINGEXPANDED; +#endif + + shell_input_line = s; + shell_input_line_size = STRLEN (s); + shell_input_line_index = 0; + shell_input_line_terminator = '\0'; +#if 0 + parser_state &= ~PST_ALEXPNEXT; /* XXX */ +#endif + + set_line_mbstate (); +} + +/* + * Make the top of the pushed_string stack be the current shell input. + * Only called when there is something on the stack. Called from shell_getc + * when it thinks it has consumed the string generated by an alias expansion + * and needs to return to the original input line. + */ +static void +pop_string () +{ + STRING_SAVER *t; + + FREE (shell_input_line); + shell_input_line = pushed_string_list->saved_line; + shell_input_line_index = pushed_string_list->saved_line_index; + shell_input_line_size = pushed_string_list->saved_line_size; + shell_input_line_terminator = pushed_string_list->saved_line_terminator; + + if (pushed_string_list->expand_alias) + parser_state |= PST_ALEXPNEXT; + else + parser_state &= ~PST_ALEXPNEXT; + + t = pushed_string_list; + pushed_string_list = pushed_string_list->next; + +#if defined (ALIAS) + if (t->expander) + t->expander->flags &= ~AL_BEINGEXPANDED; +#endif + + free ((char *)t); + + set_line_mbstate (); +} + +static void +free_string_list () +{ + register STRING_SAVER *t, *t1; + + for (t = pushed_string_list; t; ) + { + t1 = t->next; + FREE (t->saved_line); +#if defined (ALIAS) + if (t->expander) + t->expander->flags &= ~AL_BEINGEXPANDED; +#endif + free ((char *)t); + t = t1; + } + pushed_string_list = (STRING_SAVER *)NULL; +} + +#endif /* ALIAS || DPAREN_ARITHMETIC */ + +void +free_pushed_string_input () +{ +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + free_string_list (); +#endif +} + +int +parser_expanding_alias () +{ + return (expanding_alias ()); +} + +void +parser_save_alias () +{ +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + push_string ((char *)NULL, 0, (alias_t *)NULL); + pushed_string_list->flags = PSH_SOURCE; /* XXX - for now */ +#else + ; +#endif +} + +void +parser_restore_alias () +{ +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + if (pushed_string_list) + pop_string (); +#else + ; +#endif +} + +#if defined (ALIAS) +/* Before freeing AP, make sure that there aren't any cases of pointer + aliasing that could cause us to reference freed memory later on. */ +void +clear_string_list_expander (ap) + alias_t *ap; +{ + register STRING_SAVER *t; + + for (t = pushed_string_list; t; t = t->next) + { + if (t->expander && t->expander == ap) + t->expander = 0; + } +} +#endif + +void +clear_shell_input_line () +{ + if (shell_input_line) + shell_input_line[shell_input_line_index = 0] = '\0'; +} + +/* Return a line of text, taken from wherever yylex () reads input. + If there is no more input, then we return NULL. If REMOVE_QUOTED_NEWLINE + is non-zero, we remove unquoted \ pairs. This is used by + read_secondary_line to read here documents. */ +static char * +read_a_line (remove_quoted_newline) + int remove_quoted_newline; +{ + static char *line_buffer = (char *)NULL; + static int buffer_size = 0; + int indx, c, peekc, pass_next; + +#if defined (READLINE) + if (no_line_editing && SHOULD_PROMPT ()) +#else + if (SHOULD_PROMPT ()) +#endif + print_prompt (); + + pass_next = indx = 0; + while (1) + { + /* Allow immediate exit if interrupted during input. */ + QUIT; + + c = yy_getc (); + + /* Ignore null bytes in input. */ + if (c == 0) + { +#if 0 + internal_warning ("read_a_line: ignored null byte in input"); +#endif + continue; + } + + /* If there is no more input, then we return NULL. */ + if (c == EOF) + { + if (interactive && bash_input.type == st_stream) + clearerr (stdin); + if (indx == 0) + return ((char *)NULL); + c = '\n'; + } + + /* `+2' in case the final character in the buffer is a newline or we + have to handle CTLESC or CTLNUL. */ + RESIZE_MALLOCED_BUFFER (line_buffer, indx, 2, buffer_size, 128); + + /* IF REMOVE_QUOTED_NEWLINES is non-zero, we are reading a + here document with an unquoted delimiter. In this case, + the line will be expanded as if it were in double quotes. + We allow a backslash to escape the next character, but we + need to treat the backslash specially only if a backslash + quoting a backslash-newline pair appears in the line. */ + if (pass_next) + { + line_buffer[indx++] = c; + pass_next = 0; + } + else if (c == '\\' && remove_quoted_newline) + { + QUIT; + peekc = yy_getc (); + if (peekc == '\n') + { + line_number++; + continue; /* Make the unquoted \ pair disappear. */ + } + else + { + yy_ungetc (peekc); + pass_next = 1; + line_buffer[indx++] = c; /* Preserve the backslash. */ + } + } + else + { + /* remove_quoted_newline is non-zero if the here-document delimiter + is unquoted. In this case, we will be expanding the lines and + need to make sure CTLESC and CTLNUL in the input are quoted. */ + if (remove_quoted_newline && (c == CTLESC || c == CTLNUL)) + line_buffer[indx++] = CTLESC; + line_buffer[indx++] = c; + } + + if (c == '\n') + { + line_buffer[indx] = '\0'; + return (line_buffer); + } + } +} + +/* Return a line as in read_a_line (), but insure that the prompt is + the secondary prompt. This is used to read the lines of a here + document. REMOVE_QUOTED_NEWLINE is non-zero if we should remove + newlines quoted with backslashes while reading the line. It is + non-zero unless the delimiter of the here document was quoted. */ +char * +read_secondary_line (remove_quoted_newline) + int remove_quoted_newline; +{ + char *ret; + int n, c; + + prompt_string_pointer = &ps2_prompt; + if (SHOULD_PROMPT()) + prompt_again (); + ret = read_a_line (remove_quoted_newline); +#if defined (HISTORY) + if (ret && remember_on_history && (parser_state & PST_HEREDOC)) + { + /* To make adding the here-document body right, we need to rely on + history_delimiting_chars() returning \n for the first line of the + here-document body and the null string for the second and subsequent + lines, so we avoid double newlines. + current_command_line_count == 2 for the first line of the body. */ + + current_command_line_count++; + maybe_add_history (ret); + } +#endif /* HISTORY */ + return ret; +} + +/* **************************************************************** */ +/* */ +/* YYLEX () */ +/* */ +/* **************************************************************** */ + +/* Reserved words. These are only recognized as the first word of a + command. */ +STRING_INT_ALIST word_token_alist[] = { + { "if", IF }, + { "then", THEN }, + { "else", ELSE }, + { "elif", ELIF }, + { "fi", FI }, + { "case", CASE }, + { "esac", ESAC }, + { "for", FOR }, +#if defined (SELECT_COMMAND) + { "select", SELECT }, +#endif + { "while", WHILE }, + { "until", UNTIL }, + { "do", DO }, + { "done", DONE }, + { "in", IN }, + { "function", FUNCTION }, +#if defined (COMMAND_TIMING) + { "time", TIME }, +#endif + { "{", '{' }, + { "}", '}' }, + { "!", BANG }, +#if defined (COND_COMMAND) + { "[[", COND_START }, + { "]]", COND_END }, +#endif +#if defined (COPROCESS_SUPPORT) + { "coproc", COPROC }, +#endif + { (char *)NULL, 0} +}; + +/* other tokens that can be returned by read_token() */ +STRING_INT_ALIST other_token_alist[] = { + /* Multiple-character tokens with special values */ + { "--", TIMEIGN }, + { "-p", TIMEOPT }, + { "&&", AND_AND }, + { "||", OR_OR }, + { ">>", GREATER_GREATER }, + { "<<", LESS_LESS }, + { "<&", LESS_AND }, + { ">&", GREATER_AND }, + { ";;", SEMI_SEMI }, + { ";&", SEMI_AND }, + { ";;&", SEMI_SEMI_AND }, + { "<<-", LESS_LESS_MINUS }, + { "<<<", LESS_LESS_LESS }, + { "&>", AND_GREATER }, + { "&>>", AND_GREATER_GREATER }, + { "<>", LESS_GREATER }, + { ">|", GREATER_BAR }, + { "|&", BAR_AND }, + { "EOF", yacc_EOF }, + /* Tokens whose value is the character itself */ + { ">", '>' }, + { "<", '<' }, + { "-", '-' }, + { "{", '{' }, + { "}", '}' }, + { ";", ';' }, + { "(", '(' }, + { ")", ')' }, + { "|", '|' }, + { "&", '&' }, + { "newline", '\n' }, + { (char *)NULL, 0} +}; + +/* others not listed here: + WORD look at yylval.word + ASSIGNMENT_WORD look at yylval.word + NUMBER look at yylval.number + ARITH_CMD look at yylval.word_list + ARITH_FOR_EXPRS look at yylval.word_list + COND_CMD look at yylval.command +*/ + +/* These are used by read_token_word, but appear up here so that shell_getc + can use them to decide when to add otherwise blank lines to the history. */ + +/* The primary delimiter stack. */ +struct dstack dstack = { (char *)NULL, 0, 0 }; + +/* A temporary delimiter stack to be used when decoding prompt strings. + This is needed because command substitutions in prompt strings (e.g., PS2) + can screw up the parser's quoting state. */ +static struct dstack temp_dstack = { (char *)NULL, 0, 0 }; + +/* Macro for accessing the top delimiter on the stack. Returns the + delimiter or zero if none. */ +#define current_delimiter(ds) \ + (ds.delimiter_depth ? ds.delimiters[ds.delimiter_depth - 1] : 0) + +#define push_delimiter(ds, character) \ + do \ + { \ + if (ds.delimiter_depth + 2 > ds.delimiter_space) \ + ds.delimiters = (char *)xrealloc \ + (ds.delimiters, (ds.delimiter_space += 10) * sizeof (char)); \ + ds.delimiters[ds.delimiter_depth] = character; \ + ds.delimiter_depth++; \ + } \ + while (0) + +#define pop_delimiter(ds) ds.delimiter_depth-- + +/* Return the next shell input character. This always reads characters + from shell_input_line; when that line is exhausted, it is time to + read the next line. This is called by read_token when the shell is + processing normal command input. */ + +/* This implements one-character lookahead/lookbehind across physical input + lines, to avoid something being lost because it's pushed back with + shell_ungetc when we're at the start of a line. */ +static int eol_ungetc_lookahead = 0; + +static int unquoted_backslash = 0; + +static int +shell_getc (remove_quoted_newline) + int remove_quoted_newline; +{ + register int i; + int c, truncating, last_was_backslash; + unsigned char uc; + + QUIT; + + last_was_backslash = 0; + if (sigwinch_received) + { + sigwinch_received = 0; + get_new_window_size (0, (int *)0, (int *)0); + } + + if (eol_ungetc_lookahead) + { + c = eol_ungetc_lookahead; + eol_ungetc_lookahead = 0; + return (c); + } + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + /* If shell_input_line[shell_input_line_index] == 0, but there is + something on the pushed list of strings, then we don't want to go + off and get another line. We let the code down below handle it. */ + + if (!shell_input_line || ((!shell_input_line[shell_input_line_index]) && + (pushed_string_list == (STRING_SAVER *)NULL))) +#else /* !ALIAS && !DPAREN_ARITHMETIC */ + if (!shell_input_line || !shell_input_line[shell_input_line_index]) +#endif /* !ALIAS && !DPAREN_ARITHMETIC */ + { + line_number++; + + /* Let's not let one really really long line blow up memory allocation */ + if (shell_input_line && shell_input_line_size >= 32768) + { + free (shell_input_line); + shell_input_line = 0; + shell_input_line_size = 0; + } + + restart_read: + + /* Allow immediate exit if interrupted during input. */ + QUIT; + + i = truncating = 0; + shell_input_line_terminator = 0; + + /* If the shell is interactive, but not currently printing a prompt + (interactive_shell && interactive == 0), we don't want to print + notifies or cleanup the jobs -- we want to defer it until we do + print the next prompt. */ + if (interactive_shell == 0 || SHOULD_PROMPT()) + { +#if defined (JOB_CONTROL) + /* This can cause a problem when reading a command as the result + of a trap, when the trap is called from flush_child. This call + had better not cause jobs to disappear from the job table in + that case, or we will have big trouble. */ + notify_and_cleanup (); +#else /* !JOB_CONTROL */ + cleanup_dead_jobs (); +#endif /* !JOB_CONTROL */ + } + +#if defined (READLINE) + if (no_line_editing && SHOULD_PROMPT()) +#else + if (SHOULD_PROMPT()) +#endif + print_prompt (); + + if (bash_input.type == st_stream) + clearerr (stdin); + + while (1) + { + c = yy_getc (); + + /* Allow immediate exit if interrupted during input. */ + QUIT; + + if (c == '\0') + { +#if 0 + internal_warning ("shell_getc: ignored null byte in input"); +#endif + /* If we get EOS while parsing a string, treat it as EOF so we + don't just keep looping. Happens very rarely */ + if (bash_input.type == st_string) + { + if (i == 0) + shell_input_line_terminator = EOF; + shell_input_line[i] = '\0'; + c = EOF; + break; + } + continue; + } + + /* Theoretical overflow */ + /* If we can't put 256 bytes more into the buffer, allocate + everything we can and fill it as full as we can. */ + /* XXX - we ignore rest of line using `truncating' flag */ + if (shell_input_line_size > (SIZE_MAX - 256)) + { + size_t n; + + n = SIZE_MAX - i; /* how much more can we put into the buffer? */ + if (n <= 2) /* we have to save 1 for the newline added below */ + { + if (truncating == 0) + internal_warning(_("shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated"), shell_input_line_size, (unsigned long)SIZE_MAX); + shell_input_line[i] = '\0'; + truncating = 1; + } + if (shell_input_line_size < SIZE_MAX) + { + shell_input_line_size = SIZE_MAX; + shell_input_line = xrealloc (shell_input_line, shell_input_line_size); + } + } + else + RESIZE_MALLOCED_BUFFER (shell_input_line, i, 2, shell_input_line_size, 256); + + if (c == EOF) + { + if (bash_input.type == st_stream) + clearerr (stdin); + + if (i == 0) + shell_input_line_terminator = EOF; + + shell_input_line[i] = '\0'; + break; + } + + if (truncating == 0 || c == '\n') + shell_input_line[i++] = c; + + if (c == '\n') + { + shell_input_line[--i] = '\0'; + current_command_line_count++; + break; + } + + last_was_backslash = last_was_backslash == 0 && c == '\\'; + } + + shell_input_line_index = 0; + shell_input_line_len = i; /* == strlen (shell_input_line) */ + + set_line_mbstate (); + +#if defined (HISTORY) + if (remember_on_history && shell_input_line && shell_input_line[0]) + { + char *expansions; +# if defined (BANG_HISTORY) + /* If the current delimiter is a single quote, we should not be + performing history expansion, even if we're on a different + line from the original single quote. */ + if (current_delimiter (dstack) == '\'') + history_quoting_state = '\''; + else if (current_delimiter (dstack) == '"') + history_quoting_state = '"'; + else + history_quoting_state = 0; +# endif + /* Calling with a third argument of 1 allows remember_on_history to + determine whether or not the line is saved to the history list */ + expansions = pre_process_line (shell_input_line, 1, 1); +# if defined (BANG_HISTORY) + history_quoting_state = 0; +# endif + if (expansions != shell_input_line) + { + free (shell_input_line); + shell_input_line = expansions; + shell_input_line_len = shell_input_line ? + strlen (shell_input_line) : 0; + if (shell_input_line_len == 0) + current_command_line_count--; + + /* We have to force the xrealloc below because we don't know + the true allocated size of shell_input_line anymore. */ + shell_input_line_size = shell_input_line_len; + + set_line_mbstate (); + } + } + /* Try to do something intelligent with blank lines encountered while + entering multi-line commands. XXX - this is grotesque */ + else if (remember_on_history && shell_input_line && + shell_input_line[0] == '\0' && + current_command_line_count > 1) + { + if (current_delimiter (dstack)) + /* We know shell_input_line[0] == 0 and we're reading some sort of + quoted string. This means we've got a line consisting of only + a newline in a quoted string. We want to make sure this line + gets added to the history. */ + maybe_add_history (shell_input_line); + else + { + char *hdcs; + hdcs = history_delimiting_chars (shell_input_line); + if (hdcs && hdcs[0] == ';') + maybe_add_history (shell_input_line); + } + } + +#endif /* HISTORY */ + + if (shell_input_line) + { + /* Lines that signify the end of the shell's input should not be + echoed. We should not echo lines while parsing command + substitutions with recursive calls into the parsing engine; those + should only be echoed once when we read the word. That is the + reason for the test against shell_eof_token, which is set to a + right paren when parsing the contents of command substitutions. */ + if (echo_input_at_read && (shell_input_line[0] || + shell_input_line_terminator != EOF) && + shell_eof_token == 0) + fprintf (stderr, "%s\n", shell_input_line); + } + else + { + shell_input_line_size = 0; + prompt_string_pointer = ¤t_prompt_string; + if (SHOULD_PROMPT ()) + prompt_again (); + goto restart_read; + } + + /* Add the newline to the end of this string, iff the string does + not already end in an EOF character. */ + if (shell_input_line_terminator != EOF) + { + if (shell_input_line_size < SIZE_MAX-3 && (shell_input_line_len+3 > shell_input_line_size)) + shell_input_line = (char *)xrealloc (shell_input_line, + 1 + (shell_input_line_size += 2)); + + /* Don't add a newline to a string that ends with a backslash if we're + going to be removing quoted newlines, since that will eat the + backslash. Add another backslash instead (will be removed by + word expansion). */ + if (bash_input.type == st_string && expanding_alias() == 0 && last_was_backslash && c == EOF && remove_quoted_newline) + shell_input_line[shell_input_line_len] = '\\'; + else + shell_input_line[shell_input_line_len] = '\n'; + shell_input_line[shell_input_line_len + 1] = '\0'; + +#if 0 + set_line_mbstate (); /* XXX - this is wasteful */ +#else +# if defined (HANDLE_MULTIBYTE) + /* This is kind of an abstraction violation, but there's no need to + go through the entire shell_input_line again with a call to + set_line_mbstate(). */ + if (shell_input_line_len + 2 > shell_input_line_propsize) + { + shell_input_line_propsize = shell_input_line_len + 2; + shell_input_line_property = (char *)xrealloc (shell_input_line_property, + shell_input_line_propsize); + } + shell_input_line_property[shell_input_line_len] = 1; +# endif +#endif + } + } + +next_alias_char: + if (shell_input_line_index == 0) + unquoted_backslash = 0; + + uc = shell_input_line[shell_input_line_index]; + + if (uc) + { + unquoted_backslash = unquoted_backslash == 0 && uc == '\\'; + shell_input_line_index++; + } + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + /* If UC is NULL, we have reached the end of the current input string. If + pushed_string_list is non-empty, it's time to pop to the previous string + because we have fully consumed the result of the last alias expansion. + Do it transparently; just return the next character of the string popped + to. */ + /* If pushed_string_list != 0 but pushed_string_list->expander == 0 (not + currently tested) and the flags value is not PSH_SOURCE, we are not + parsing an alias, we have just saved one (push_string, when called by + the parse_dparen code) In this case, just go on as well. The PSH_SOURCE + case is handled below. */ + + /* If we're at the end of an alias expansion add a space to make sure that + the alias remains marked as being in use while we expand its last word. + This makes sure that pop_string doesn't mark the alias as not in use + before the string resulting from the alias expansion is tokenized and + checked for alias expansion, preventing recursion. At this point, the + last character in shell_input_line is the last character of the alias + expansion. We test that last character to determine whether or not to + return the space that will delimit the token and postpone the pop_string. + This set of conditions duplicates what used to be in mk_alexpansion () + below, with the addition that we don't add a space if we're currently + reading a quoted string or in a shell comment. */ +#ifndef OLD_ALIAS_HACK + if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE && + pushed_string_list->flags != PSH_DPAREN && + (parser_state & PST_COMMENT) == 0 && + (parser_state & PST_ENDALIAS) == 0 && /* only once */ + shell_input_line_index > 0 && + shellblank (shell_input_line[shell_input_line_index-1]) == 0 && + shell_input_line[shell_input_line_index-1] != '\n' && + unquoted_backslash == 0 && + shellmeta (shell_input_line[shell_input_line_index-1]) == 0 && + (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"')) + { + parser_state |= PST_ENDALIAS; + return ' '; /* END_ALIAS */ + } +#endif + +pop_alias: + /* This case works for PSH_DPAREN as well */ + if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE) + { + parser_state &= ~PST_ENDALIAS; + pop_string (); + uc = shell_input_line[shell_input_line_index]; + if (uc) + shell_input_line_index++; + } +#endif /* ALIAS || DPAREN_ARITHMETIC */ + + if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n') + { + if (SHOULD_PROMPT ()) + prompt_again (); + line_number++; + + /* What do we do here if we're expanding an alias whose definition + includes an escaped newline? If that's the last character in the + alias expansion, we just pop the pushed string list (recall that + we inhibit the appending of a space if newline is the last + character). If it's not the last character, we need to consume the + quoted newline and move to the next character in the expansion. */ +#if defined (ALIAS) + if (expanding_alias () && shell_input_line[shell_input_line_index+1] == '\0') + { + uc = 0; + goto pop_alias; + } + else if (expanding_alias () && shell_input_line[shell_input_line_index+1] != '\0') + { + shell_input_line_index++; /* skip newline */ + goto next_alias_char; /* and get next character */ + } + else +#endif + goto restart_read; + } + + if (uc == 0 && shell_input_line_terminator == EOF) + return ((shell_input_line_index != 0) ? '\n' : EOF); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + /* We already know that we are not parsing an alias expansion because of the + check for expanding_alias() above. This knows how parse_and_execute + handles switching to st_string input while an alias is being expanded, + hence the check for pushed_string_list without pushed_string_list->expander + and the check for PSH_SOURCE as pushed_string_list->flags. + parse_and_execute and parse_string both change the input type to st_string + and place the string to be parsed and executed into location.string, so + we should not stop reading that until the pointer is '\0'. + The check for shell_input_line_terminator may be superfluous. + + This solves the problem of `.' inside a multi-line alias with embedded + newlines executing things out of order. */ + if (uc == 0 && bash_input.type == st_string && *bash_input.location.string && + pushed_string_list && pushed_string_list->flags == PSH_SOURCE && + shell_input_line_terminator == 0) + { + shell_input_line_index = 0; + goto restart_read; + } +#endif + + return (uc); +} + +/* Put C back into the input for the shell. This might need changes for + HANDLE_MULTIBYTE around EOLs. Since we (currently) never push back a + character different than we read, shell_input_line_property doesn't need + to change when manipulating shell_input_line. The define for + last_shell_getc_is_singlebyte should take care of it, though. */ +static void +shell_ungetc (c) + int c; +{ + if (shell_input_line && shell_input_line_index) + shell_input_line[--shell_input_line_index] = c; + else + eol_ungetc_lookahead = c; +} + +char * +parser_remaining_input () +{ + if (shell_input_line == 0) + return 0; + if ((int)shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len) + return ""; /* XXX */ + return (shell_input_line + shell_input_line_index); +} + +#ifdef INCLUDE_UNUSED +/* Back the input pointer up by one, effectively `ungetting' a character. */ +static void +shell_ungetchar () +{ + if (shell_input_line && shell_input_line_index) + shell_input_line_index--; +} +#endif + +/* Discard input until CHARACTER is seen, then push that character back + onto the input stream. */ +static void +discard_until (character) + int character; +{ + int c; + + while ((c = shell_getc (0)) != EOF && c != character) + ; + + if (c != EOF) + shell_ungetc (c); +} + +void +execute_variable_command (command, vname) + char *command, *vname; +{ + char *last_lastarg; + sh_parser_state_t ps; + + save_parser_state (&ps); + last_lastarg = get_string_value ("_"); + if (last_lastarg) + last_lastarg = savestring (last_lastarg); + + parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST); + + restore_parser_state (&ps); + bind_variable ("_", last_lastarg, 0); + FREE (last_lastarg); + + if (token_to_read == '\n') /* reset_parser was called */ + token_to_read = 0; +} + +void +push_token (x) + int x; +{ + two_tokens_ago = token_before_that; + token_before_that = last_read_token; + last_read_token = current_token; + + current_token = x; +} + +/* Place to remember the token. We try to keep the buffer + at a reasonable size, but it can grow. */ +static char *token = (char *)NULL; + +/* Current size of the token buffer. */ +static int token_buffer_size; + +/* Command to read_token () explaining what we want it to do. */ +#define READ 0 +#define RESET 1 +#define prompt_is_ps1 \ + (!prompt_string_pointer || prompt_string_pointer == &ps1_prompt) + +/* Function for yyparse to call. yylex keeps track of + the last two tokens read, and calls read_token. */ +static int +yylex () +{ + if (interactive && (current_token == 0 || current_token == '\n')) + { + /* Before we print a prompt, we might have to check mailboxes. + We do this only if it is time to do so. Notice that only here + is the mail alarm reset; nothing takes place in check_mail () + except the checking of mail. Please don't change this. */ + if (prompt_is_ps1 && parse_and_execute_level == 0 && time_to_check_mail ()) + { + check_mail (); + reset_mail_timer (); + } + + /* Avoid printing a prompt if we're not going to read anything, e.g. + after resetting the parser with read_token (RESET). */ + if (token_to_read == 0 && SHOULD_PROMPT ()) + prompt_again (); + } + + two_tokens_ago = token_before_that; + token_before_that = last_read_token; + last_read_token = current_token; + current_token = read_token (READ); + + if ((parser_state & PST_EOFTOKEN) && current_token == shell_eof_token) + { + current_token = yacc_EOF; + if (bash_input.type == st_string) + rewind_input_string (); + } + parser_state &= ~PST_EOFTOKEN; /* ??? */ + + return (current_token); +} + +/* When non-zero, we have read the required tokens + which allow ESAC to be the next one read. */ +static int esacs_needed_count; + +/* When non-zero, we can read IN as an acceptable token, regardless of how + many newlines we read. */ +static int expecting_in_token; + +static void +push_heredoc (r) + REDIRECT *r; +{ + if (need_here_doc >= HEREDOC_MAX) + { + last_command_exit_value = EX_BADUSAGE; + need_here_doc = 0; + report_syntax_error (_("maximum here-document count exceeded")); + reset_parser (); + exit_shell (last_command_exit_value); + } + redir_stack[need_here_doc++] = r; +} + +void +gather_here_documents () +{ + int r; + + r = 0; + here_doc_first_line = 1; + while (need_here_doc > 0) + { + parser_state |= PST_HEREDOC; + make_here_document (redir_stack[r++], line_number); + parser_state &= ~PST_HEREDOC; + need_here_doc--; + redir_stack[r - 1] = 0; /* XXX */ + } + here_doc_first_line = 0; /* just in case */ +} + +/* When non-zero, an open-brace used to create a group is awaiting a close + brace partner. */ +static int open_brace_count; + +/* In the following three macros, `token' is always last_read_token */ + +/* Are we in the middle of parsing a redirection where we are about to read + a word? This is used to make sure alias expansion doesn't happen in the + middle of a redirection, even though we're parsing a simple command. */ +#define parsing_redirection(token) \ + (token == '<' || token == '>' || \ + token == GREATER_GREATER || token == GREATER_BAR || \ + token == LESS_GREATER || token == LESS_LESS_MINUS || \ + token == LESS_LESS || token == LESS_LESS_LESS || \ + token == LESS_AND || token == GREATER_AND || token == AND_GREATER) + +/* Is `token' one that will allow a WORD to be read in a command position? + We can read a simple command name on which we should attempt alias expansion + or we can read an assignment statement. */ +#define command_token_position(token) \ + (((token) == ASSIGNMENT_WORD) || \ + ((parser_state&PST_REDIRLIST) && parsing_redirection(token) == 0) || \ + ((token) != SEMI_SEMI && (token) != SEMI_AND && (token) != SEMI_SEMI_AND && reserved_word_acceptable(token))) + +/* Are we in a position where we can read an assignment statement? */ +#define assignment_acceptable(token) \ + (command_token_position(token) && ((parser_state & PST_CASEPAT) == 0)) + +/* Check to see if TOKEN is a reserved word and return the token + value if it is. */ +#define CHECK_FOR_RESERVED_WORD(tok) \ + do { \ + if (!dollar_present && !quoted && \ + reserved_word_acceptable (last_read_token)) \ + { \ + int i; \ + for (i = 0; word_token_alist[i].word != (char *)NULL; i++) \ + if (STREQ (tok, word_token_alist[i].word)) \ + { \ + if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \ + break; \ + if (word_token_alist[i].token == TIME && time_command_acceptable () == 0) \ + break; \ + if ((parser_state & PST_CASEPAT) && last_read_token == '|' && word_token_alist[i].token == ESAC) \ + break; /* Posix grammar rule 4 */ \ + if (word_token_alist[i].token == ESAC) \ + parser_state &= ~(PST_CASEPAT|PST_CASESTMT); \ + else if (word_token_alist[i].token == CASE) \ + parser_state |= PST_CASESTMT; \ + else if (word_token_alist[i].token == COND_END) \ + parser_state &= ~(PST_CONDCMD|PST_CONDEXPR); \ + else if (word_token_alist[i].token == COND_START) \ + parser_state |= PST_CONDCMD; \ + else if (word_token_alist[i].token == '{') \ + open_brace_count++; \ + else if (word_token_alist[i].token == '}' && open_brace_count) \ + open_brace_count--; \ + return (word_token_alist[i].token); \ + } \ + } \ + } while (0) + +#if defined (ALIAS) + + /* OK, we have a token. Let's try to alias expand it, if (and only if) + it's eligible. + + It is eligible for expansion if EXPAND_ALIASES is set, and + the token is unquoted and the last token read was a command + separator (or expand_next_token is set), and we are currently + processing an alias (pushed_string_list is non-empty) and this + token is not the same as the current or any previously + processed alias. + + Special cases that disqualify: + In a pattern list in a case statement (parser_state & PST_CASEPAT). */ + +static char * +mk_alexpansion (s) + char *s; +{ + int l; + char *r; + + l = strlen (s); + r = xmalloc (l + 2); + strcpy (r, s); +#ifdef OLD_ALIAS_HACK + /* If the last character in the alias is a newline, don't add a trailing + space to the expansion. Works with shell_getc above. */ + /* Need to do something about the case where the alias expansion contains + an unmatched quoted string, since appending this space affects the + subsequent output. */ + if (l > 0 && r[l - 1] != ' ' && r[l - 1] != '\n' && shellmeta(r[l - 1]) == 0) + r[l++] = ' '; +#endif + r[l] = '\0'; + return r; +} + +static int +alias_expand_token (tokstr) + char *tokstr; +{ + char *expanded; + alias_t *ap; + + if (((parser_state & PST_ALEXPNEXT) || command_token_position (last_read_token)) && + (parser_state & PST_CASEPAT) == 0) + { + ap = find_alias (tokstr); + + /* Currently expanding this token. */ + if (ap && (ap->flags & AL_BEINGEXPANDED)) + return (NO_EXPANSION); + +#ifdef OLD_ALIAS_HACK + /* mk_alexpansion puts an extra space on the end of the alias expansion, + so the lookahead by the parser works right (the alias needs to remain + `in use' while parsing its last word to avoid alias recursion for + something like "alias echo=echo"). If this gets changed, make sure + the code in shell_getc that deals with reaching the end of an + expanded alias is changed with it. */ +#endif + expanded = ap ? mk_alexpansion (ap->value) : (char *)NULL; + + if (expanded) + { + push_string (expanded, ap->flags & AL_EXPANDNEXT, ap); + return (RE_READ_TOKEN); + } + else + /* This is an eligible token that does not have an expansion. */ + return (NO_EXPANSION); + } + return (NO_EXPANSION); +} +#endif /* ALIAS */ + +static int +time_command_acceptable () +{ +#if defined (COMMAND_TIMING) + int i; + + if (posixly_correct && shell_compatibility_level > 41) + { + /* Quick check of the rest of the line to find the next token. If it + begins with a `-', Posix says to not return `time' as the token. + This was interp 267. */ + i = shell_input_line_index; + while (i < shell_input_line_len && (shell_input_line[i] == ' ' || shell_input_line[i] == '\t')) + i++; + if (shell_input_line[i] == '-') + return 0; + } + + switch (last_read_token) + { + case 0: + case ';': + case '\n': + if (token_before_that == '|') + return (0); + /* FALLTHROUGH */ + case AND_AND: + case OR_OR: + case '&': + case WHILE: + case DO: + case UNTIL: + case IF: + case THEN: + case ELIF: + case ELSE: + case '{': /* } */ + case '(': /* )( */ + case ')': /* only valid in case statement */ + case BANG: /* ! time pipeline */ + case TIME: /* time time pipeline */ + case TIMEOPT: /* time -p time pipeline */ + case TIMEIGN: /* time -p -- ... */ + return 1; + default: + return 0; + } +#else + return 0; +#endif /* COMMAND_TIMING */ +} + +/* Handle special cases of token recognition: + IN is recognized if the last token was WORD and the token + before that was FOR or CASE or SELECT. + + DO is recognized if the last token was WORD and the token + before that was FOR or SELECT. + + ESAC is recognized if the last token caused `esacs_needed_count' + to be set + + `{' is recognized if the last token as WORD and the token + before that was FUNCTION, or if we just parsed an arithmetic + `for' command. + + `}' is recognized if there is an unclosed `{' present. + + `-p' is returned as TIMEOPT if the last read token was TIME. + `--' is returned as TIMEIGN if the last read token was TIME or TIMEOPT. + + ']]' is returned as COND_END if the parser is currently parsing + a conditional expression ((parser_state & PST_CONDEXPR) != 0) + + `time' is returned as TIME if and only if it is immediately + preceded by one of `;', `\n', `||', `&&', or `&'. +*/ + +static int +special_case_tokens (tokstr) + char *tokstr; +{ + /* Posix grammar rule 6 */ + if ((last_read_token == WORD) && +#if defined (SELECT_COMMAND) + ((token_before_that == FOR) || (token_before_that == CASE) || (token_before_that == SELECT)) && +#else + ((token_before_that == FOR) || (token_before_that == CASE)) && +#endif + (tokstr[0] == 'i' && tokstr[1] == 'n' && tokstr[2] == 0)) + { + if (token_before_that == CASE) + { + parser_state |= PST_CASEPAT; + esacs_needed_count++; + } + if (expecting_in_token) + expecting_in_token--; + return (IN); + } + + /* XXX - leaving above code intact for now, but it should eventually be + removed in favor of this clause. */ + /* Posix grammar rule 6 */ + if (expecting_in_token && (last_read_token == WORD || last_read_token == '\n') && + (tokstr[0] == 'i' && tokstr[1] == 'n' && tokstr[2] == 0)) + { + if (parser_state & PST_CASESTMT) + { + parser_state |= PST_CASEPAT; + esacs_needed_count++; + } + expecting_in_token--; + return (IN); + } + /* Posix grammar rule 6, third word in FOR: for i; do command-list; done */ + else if (expecting_in_token && (last_read_token == '\n' || last_read_token == ';') && + (tokstr[0] == 'd' && tokstr[1] == 'o' && tokstr[2] == '\0')) + { + expecting_in_token--; + return (DO); + } + + /* for i do; command-list; done */ + if (last_read_token == WORD && +#if defined (SELECT_COMMAND) + (token_before_that == FOR || token_before_that == SELECT) && +#else + (token_before_that == FOR) && +#endif + (tokstr[0] == 'd' && tokstr[1] == 'o' && tokstr[2] == '\0')) + { + if (expecting_in_token) + expecting_in_token--; + return (DO); + } + + /* Ditto for ESAC in the CASE case. + Specifically, this handles "case word in esac", which is a legal + construct, certainly because someone will pass an empty arg to the + case construct, and we don't want it to barf. Of course, we should + insist that the case construct has at least one pattern in it, but + the designers disagree. */ + if (esacs_needed_count) + { + if (last_read_token == IN && STREQ (tokstr, "esac")) + { + esacs_needed_count--; + parser_state &= ~PST_CASEPAT; + return (ESAC); + } + } + + /* The start of a shell function definition. */ + if (parser_state & PST_ALLOWOPNBRC) + { + parser_state &= ~PST_ALLOWOPNBRC; + if (tokstr[0] == '{' && tokstr[1] == '\0') /* } */ + { + open_brace_count++; + function_bstart = line_number; + return ('{'); /* } */ + } + } + + /* We allow a `do' after a for ((...)) without an intervening + list_terminator */ + if (last_read_token == ARITH_FOR_EXPRS && tokstr[0] == 'd' && tokstr[1] == 'o' && !tokstr[2]) + return (DO); + if (last_read_token == ARITH_FOR_EXPRS && tokstr[0] == '{' && tokstr[1] == '\0') /* } */ + { + open_brace_count++; + return ('{'); /* } */ + } + + if (open_brace_count && reserved_word_acceptable (last_read_token) && tokstr[0] == '}' && !tokstr[1]) + { + open_brace_count--; /* { */ + return ('}'); + } + +#if defined (COMMAND_TIMING) + /* Handle -p after `time'. */ + if (last_read_token == TIME && tokstr[0] == '-' && tokstr[1] == 'p' && !tokstr[2]) + return (TIMEOPT); + /* Handle -- after `time'. */ + if (last_read_token == TIME && tokstr[0] == '-' && tokstr[1] == '-' && !tokstr[2]) + return (TIMEIGN); + /* Handle -- after `time -p'. */ + if (last_read_token == TIMEOPT && tokstr[0] == '-' && tokstr[1] == '-' && !tokstr[2]) + return (TIMEIGN); +#endif + +#if defined (COND_COMMAND) /* [[ */ + if ((parser_state & PST_CONDEXPR) && tokstr[0] == ']' && tokstr[1] == ']' && tokstr[2] == '\0') + return (COND_END); +#endif + + return (-1); +} + +/* Called from shell.c when Control-C is typed at top level. Or + by the error rule at top level. */ +void +reset_parser () +{ + dstack.delimiter_depth = 0; /* No delimiters found so far. */ + open_brace_count = 0; + +#if defined (EXTENDED_GLOB) + /* Reset to global value of extended glob */ + if (parser_state & PST_EXTPAT) + extended_glob = global_extglob; +#endif + + parser_state = 0; + here_doc_first_line = 0; + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + if (pushed_string_list) + free_string_list (); +#endif /* ALIAS || DPAREN_ARITHMETIC */ + + /* This is where we resynchronize to the next newline on error/reset */ + if (shell_input_line) + { + free (shell_input_line); + shell_input_line = (char *)NULL; + shell_input_line_size = shell_input_line_index = 0; + } + + FREE (word_desc_to_read); + word_desc_to_read = (WORD_DESC *)NULL; + + eol_ungetc_lookahead = 0; + + current_token = '\n'; /* XXX */ + last_read_token = '\n'; + token_to_read = '\n'; +} + +void +reset_readahead_token () +{ + if (token_to_read == '\n') + token_to_read = 0; +} + +/* Read the next token. Command can be READ (normal operation) or + RESET (to normalize state). */ +static int +read_token (command) + int command; +{ + int character; /* Current character. */ + int peek_char; /* Temporary look-ahead character. */ + int result; /* The thing to return. */ + + if (command == RESET) + { + reset_parser (); + return ('\n'); + } + + if (token_to_read) + { + result = token_to_read; + if (token_to_read == WORD || token_to_read == ASSIGNMENT_WORD) + { + yylval.word = word_desc_to_read; + word_desc_to_read = (WORD_DESC *)NULL; + } + token_to_read = 0; + return (result); + } + +#if defined (COND_COMMAND) + if ((parser_state & (PST_CONDCMD|PST_CONDEXPR)) == PST_CONDCMD) + { + cond_lineno = line_number; + parser_state |= PST_CONDEXPR; + yylval.command = parse_cond_command (); + if (cond_token != COND_END) + { + cond_error (); + return (-1); + } + token_to_read = COND_END; + parser_state &= ~(PST_CONDEXPR|PST_CONDCMD); + return (COND_CMD); + } +#endif + +#if defined (ALIAS) + /* This is a place to jump back to once we have successfully expanded a + token with an alias and pushed the string with push_string () */ + re_read_token: +#endif /* ALIAS */ + + /* Read a single word from input. Start by skipping blanks. */ + while ((character = shell_getc (1)) != EOF && shellblank (character)) + ; + + if (character == EOF) + { + EOF_Reached = 1; + return (yacc_EOF); + } + + /* If we hit the end of the string and we're not expanding an alias (e.g., + we are eval'ing a string that is an incomplete command), return EOF */ + if (character == '\0' && bash_input.type == st_string && expanding_alias() == 0) + { +#if defined (DEBUG) +itrace("shell_getc: bash_input.location.string = `%s'", bash_input.location.string); +#endif + EOF_Reached = 1; + return (yacc_EOF); + } + + if MBTEST(character == '#' && (!interactive || interactive_comments)) + { + /* A comment. Discard until EOL or EOF, and then return a newline. */ + parser_state |= PST_COMMENT; + discard_until ('\n'); + shell_getc (0); + parser_state &= ~PST_COMMENT; + character = '\n'; /* this will take the next if statement and return. */ + } + + if (character == '\n') + { + /* If we're about to return an unquoted newline, we can go and collect + the text of any pending here document. */ + if (need_here_doc) + gather_here_documents (); + +#if defined (ALIAS) + parser_state &= ~PST_ALEXPNEXT; +#endif /* ALIAS */ + + parser_state &= ~PST_ASSIGNOK; + + return (character); + } + + if (parser_state & PST_REGEXP) + goto tokword; + + /* Shell meta-characters. */ + if MBTEST(shellmeta (character) && ((parser_state & PST_DBLPAREN) == 0)) + { +#if defined (ALIAS) + /* Turn off alias tokenization iff this character sequence would + not leave us ready to read a command. */ + if (character == '<' || character == '>') + parser_state &= ~PST_ALEXPNEXT; +#endif /* ALIAS */ + + parser_state &= ~PST_ASSIGNOK; + + /* If we are parsing a command substitution and we have read a character + that marks the end of it, don't bother to skip over quoted newlines + when we read the next token. We're just interested in a character + that will turn this into a two-character token, so we let the higher + layers deal with quoted newlines following the command substitution. */ + if ((parser_state & PST_CMDSUBST) && character == shell_eof_token) + peek_char = shell_getc (0); + else + peek_char = shell_getc (1); + + if (character == peek_char) + { + switch (character) + { + case '<': + /* If '<' then we could be at "<<" or at "<<-". We have to + look ahead one more character. */ + peek_char = shell_getc (1); + if MBTEST(peek_char == '-') + return (LESS_LESS_MINUS); + else if MBTEST(peek_char == '<') + return (LESS_LESS_LESS); + else + { + shell_ungetc (peek_char); + return (LESS_LESS); + } + + case '>': + return (GREATER_GREATER); + + case ';': + parser_state |= PST_CASEPAT; +#if defined (ALIAS) + parser_state &= ~PST_ALEXPNEXT; +#endif /* ALIAS */ + + peek_char = shell_getc (1); + if MBTEST(peek_char == '&') + return (SEMI_SEMI_AND); + else + { + shell_ungetc (peek_char); + return (SEMI_SEMI); + } + + case '&': + return (AND_AND); + + case '|': + return (OR_OR); + +#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) + case '(': /* ) */ + result = parse_dparen (character); + if (result == -2) + break; + else + return result; +#endif + } + } + else if MBTEST(character == '<' && peek_char == '&') + return (LESS_AND); + else if MBTEST(character == '>' && peek_char == '&') + return (GREATER_AND); + else if MBTEST(character == '<' && peek_char == '>') + return (LESS_GREATER); + else if MBTEST(character == '>' && peek_char == '|') + return (GREATER_BAR); + else if MBTEST(character == '&' && peek_char == '>') + { + peek_char = shell_getc (1); + if MBTEST(peek_char == '>') + return (AND_GREATER_GREATER); + else + { + shell_ungetc (peek_char); + return (AND_GREATER); + } + } + else if MBTEST(character == '|' && peek_char == '&') + return (BAR_AND); + else if MBTEST(character == ';' && peek_char == '&') + { + parser_state |= PST_CASEPAT; +#if defined (ALIAS) + parser_state &= ~PST_ALEXPNEXT; +#endif /* ALIAS */ + return (SEMI_AND); + } + + shell_ungetc (peek_char); + + /* If we look like we are reading the start of a function + definition, then let the reader know about it so that + we will do the right thing with `{'. */ + if MBTEST(character == ')' && last_read_token == '(' && token_before_that == WORD) + { + parser_state |= PST_ALLOWOPNBRC; +#if defined (ALIAS) + parser_state &= ~PST_ALEXPNEXT; +#endif /* ALIAS */ + function_dstart = line_number; + } + + /* case pattern lists may be preceded by an optional left paren. If + we're not trying to parse a case pattern list, the left paren + indicates a subshell. */ + if MBTEST(character == '(' && (parser_state & PST_CASEPAT) == 0) /* ) */ + parser_state |= PST_SUBSHELL; + /*(*/ + else if MBTEST((parser_state & PST_CASEPAT) && character == ')') + parser_state &= ~PST_CASEPAT; + /*(*/ + else if MBTEST((parser_state & PST_SUBSHELL) && character == ')') + parser_state &= ~PST_SUBSHELL; + +#if defined (PROCESS_SUBSTITUTION) + /* Check for the constructs which introduce process substitution. + Shells running in `posix mode' don't do process substitution. */ + if MBTEST((character != '>' && character != '<') || peek_char != '(') /*)*/ +#endif /* PROCESS_SUBSTITUTION */ + return (character); + } + + /* Hack <&- (close stdin) case. Also <&N- (dup and close). */ + if MBTEST(character == '-' && (last_read_token == LESS_AND || last_read_token == GREATER_AND)) + return (character); + +tokword: + /* Okay, if we got this far, we have to read a word. Read one, + and then check it against the known ones. */ + result = read_token_word (character); +#if defined (ALIAS) + if (result == RE_READ_TOKEN) + goto re_read_token; +#endif + return result; +} + +/* + * Match a $(...) or other grouping construct. This has to handle embedded + * quoted strings ('', ``, "") and nested constructs. It also must handle + * reprompting the user, if necessary, after reading a newline, and returning + * correct error values if it reads EOF. + */ +#define P_FIRSTCLOSE 0x0001 +#define P_ALLOWESC 0x0002 +#define P_DQUOTE 0x0004 +#define P_COMMAND 0x0008 /* parsing a command, so look for comments */ +#define P_BACKQUOTE 0x0010 /* parsing a backquoted command substitution */ +#define P_ARRAYSUB 0x0020 /* parsing a [...] array subscript for assignment */ +#define P_DOLBRACE 0x0040 /* parsing a ${...} construct */ + +/* Lexical state while parsing a grouping construct or $(...). */ +#define LEX_WASDOL 0x0001 +#define LEX_CKCOMMENT 0x0002 +#define LEX_INCOMMENT 0x0004 +#define LEX_PASSNEXT 0x0008 +#define LEX_RESWDOK 0x0010 +#define LEX_CKCASE 0x0020 +#define LEX_INCASE 0x0040 +#define LEX_INHEREDOC 0x0080 +#define LEX_HEREDELIM 0x0100 /* reading here-doc delimiter */ +#define LEX_STRIPDOC 0x0200 /* <<- strip tabs from here doc delim */ +#define LEX_QUOTEDDOC 0x0400 /* here doc with quoted delim */ +#define LEX_INWORD 0x0800 +#define LEX_GTLT 0x1000 + +#define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) == '|') + +#define CHECK_NESTRET_ERROR() \ + do { \ + if (nestret == &matched_pair_error) \ + { \ + free (ret); \ + return &matched_pair_error; \ + } \ + } while (0) + +#define APPEND_NESTRET() \ + do { \ + if (nestlen) \ + { \ + RESIZE_MALLOCED_BUFFER (ret, retind, nestlen, retsize, 64); \ + strcpy (ret + retind, nestret); \ + retind += nestlen; \ + } \ + } while (0) + +static char matched_pair_error; + +static char * +parse_matched_pair (qc, open, close, lenp, flags) + int qc; /* `"' if this construct is within double quotes */ + int open, close; + int *lenp, flags; +{ + int count, ch, prevch, tflags; + int nestlen, ttranslen, start_lineno; + char *ret, *nestret, *ttrans; + int retind, retsize, rflags; + int dolbrace_state; + + dolbrace_state = (flags & P_DOLBRACE) ? DOLBRACE_PARAM : 0; + +/*itrace("parse_matched_pair[%d]: open = %c close = %c flags = %d", line_number, open, close, flags);*/ + count = 1; + tflags = 0; + + if ((flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0) + tflags |= LEX_CKCOMMENT; + + /* RFLAGS is the set of flags we want to pass to recursive calls. */ + rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE); + + ret = (char *)xmalloc (retsize = 64); + retind = 0; + + start_lineno = line_number; + ch = EOF; /* just in case */ + while (count) + { + prevch = ch; + ch = shell_getc (qc != '\'' && (tflags & (LEX_PASSNEXT)) == 0); + + if (ch == EOF) + { + free (ret); + parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close); + EOF_Reached = 1; /* XXX */ + return (&matched_pair_error); + } + + /* Possible reprompting. */ + if (ch == '\n' && SHOULD_PROMPT ()) + prompt_again (); + + /* Don't bother counting parens or doing anything else if in a comment + or part of a case statement */ + if (tflags & LEX_INCOMMENT) + { + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + + if (ch == '\n') + tflags &= ~LEX_INCOMMENT; + + continue; + } + + /* Not exactly right yet, should handle shell metacharacters, too. If + any changes are made to this test, make analogous changes to subst.c: + extract_delimited_string(). */ + else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1]))) + tflags |= LEX_INCOMMENT; + + if (tflags & LEX_PASSNEXT) /* last char was backslash */ + { + tflags &= ~LEX_PASSNEXT; + if (qc != '\'' && ch == '\n') /* double-quoted \ disappears. */ + { + if (retind > 0) + retind--; /* swallow previously-added backslash */ + continue; + } + + RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64); + if MBTEST(ch == CTLESC) + ret[retind++] = CTLESC; + ret[retind++] = ch; + continue; + } + /* If we're reparsing the input (e.g., from parse_string_to_word_list), + we've already prepended CTLESC to single-quoted results of $'...'. + We may want to do this for other CTLESC-quoted characters in + reparse, too. */ + else if MBTEST((parser_state & PST_REPARSE) && open == '\'' && (ch == CTLESC || ch == CTLNUL)) + { + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + continue; + } + else if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */ + { + RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64); + ret[retind++] = CTLESC; + ret[retind++] = ch; + continue; + } + else if MBTEST(ch == close) /* ending delimiter */ + count--; + /* handle nested ${...} specially. */ + else if MBTEST(open != close && (tflags & LEX_WASDOL) && open == '{' && ch == open) /* } */ + count++; + else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && ch == open) /* nested begin */ + count++; + + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + + /* If we just read the ending character, don't bother continuing. */ + if (count == 0) + break; + + if (open == '\'') /* '' inside grouping construct */ + { + if MBTEST((flags & P_ALLOWESC) && ch == '\\') + tflags |= LEX_PASSNEXT; + continue; + } + + if MBTEST(ch == '\\') /* backslashes */ + tflags |= LEX_PASSNEXT; + + /* Based on which dolstate is currently in (param, op, or word), + decide what the op is. We're really only concerned if it's % or + #, so we can turn on a flag that says whether or not we should + treat single quotes as special when inside a double-quoted + ${...}. This logic must agree with subst.c:extract_dollar_brace_string + since they share the same defines. */ + /* FLAG POSIX INTERP 221 */ + if (flags & P_DOLBRACE) + { + /* ${param%[%]word} */ + if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '%' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param#[#]word} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '#' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param/[/]pat/rep} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '/' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE2; /* XXX */ + /* ${param^[^]pat} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '^' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param,[,]pat} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == ',' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && strchr ("#%^,~:-=?+/", ch) != 0) + dolbrace_state = DOLBRACE_OP; + else if MBTEST(dolbrace_state == DOLBRACE_OP && strchr ("#%^,~:-=?+/", ch) == 0) + dolbrace_state = DOLBRACE_WORD; + } + + /* The big hammer. Single quotes aren't special in double quotes. The + problem is that Posix used to say the single quotes are semi-special: + within a double-quoted ${...} construct "an even number of + unescaped double-quotes or single-quotes, if any, shall occur." */ + /* This was changed in Austin Group Interp 221 */ + if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && dolbrace_state != DOLBRACE_QUOTE2 && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'') + continue; + + /* Could also check open == '`' if we want to parse grouping constructs + inside old-style command substitution. */ + if (open != close) /* a grouping construct */ + { + if MBTEST(shellquote (ch)) + { + /* '', ``, or "" inside $(...) or other grouping construct. */ + push_delimiter (dstack, ch); + if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */ + nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags); + else + nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags); + pop_delimiter (dstack); + CHECK_NESTRET_ERROR (); + + if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0)) + { + /* Translate $'...' here. */ + ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen); + free (nestret); + + /* If we're parsing a double-quoted brace expansion and we are + not in a place where single quotes are treated specially, + make sure we single-quote the results of the ansi + expansion because quote removal should remove them later */ + /* FLAG POSIX INTERP 221 */ + if ((shell_compatibility_level > 42) && (rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_QUOTE2) && (flags & P_DOLBRACE)) + { + nestret = sh_single_quote (ttrans); + free (ttrans); + nestlen = strlen (nestret); + } + else if ((rflags & P_DQUOTE) == 0) + { + nestret = sh_single_quote (ttrans); + free (ttrans); + nestlen = strlen (nestret); + } + else + { + nestret = ttrans; + nestlen = ttranslen; + } + retind -= 2; /* back up before the $' */ + } + else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0)) + { + /* Locale expand $"..." here. */ + ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen); + free (nestret); + + nestret = sh_mkdoublequoted (ttrans, ttranslen, 0); + free (ttrans); + nestlen = ttranslen + 2; + retind -= 2; /* back up before the $" */ + } + + APPEND_NESTRET (); + FREE (nestret); + } + else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ + goto parse_dollar_word; +#if defined (PROCESS_SUBSTITUTION) + /* XXX - technically this should only be recognized at the start of + a word */ + else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_GTLT) && (ch == '(')) /* ) */ + goto parse_dollar_word; +#endif + } + /* Parse an old-style command substitution within double quotes as a + single word. */ + /* XXX - sh and ksh93 don't do this - XXX */ + else if MBTEST(open == '"' && ch == '`') + { + nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags); + + CHECK_NESTRET_ERROR (); + APPEND_NESTRET (); + + FREE (nestret); + } + else if MBTEST(open != '`' && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ + /* check for $(), $[], or ${} inside quoted string. */ + { +parse_dollar_word: + if (open == ch) /* undo previous increment */ + count--; + if (ch == '(') /* ) */ + nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE); + else if (ch == '{') /* } */ + nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags); + else if (ch == '[') /* ] */ + nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags); + + CHECK_NESTRET_ERROR (); + APPEND_NESTRET (); + + FREE (nestret); + } +#if defined (PROCESS_SUBSTITUTION) + if MBTEST((ch == '<' || ch == '>') && (tflags & LEX_GTLT) == 0) + tflags |= LEX_GTLT; + else + tflags &= ~LEX_GTLT; +#endif + if MBTEST(ch == '$' && (tflags & LEX_WASDOL) == 0) + tflags |= LEX_WASDOL; + else + tflags &= ~LEX_WASDOL; + } + + ret[retind] = '\0'; + if (lenp) + *lenp = retind; +/*itrace("parse_matched_pair[%d]: returning %s", line_number, ret);*/ + return ret; +} + +#if defined (DEBUG) +static void +dump_tflags (flags) + int flags; +{ + int f; + + f = flags; + fprintf (stderr, "%d -> ", f); + if (f & LEX_WASDOL) + { + f &= ~LEX_WASDOL; + fprintf (stderr, "LEX_WASDOL%s", f ? "|" : ""); + } + if (f & LEX_CKCOMMENT) + { + f &= ~LEX_CKCOMMENT; + fprintf (stderr, "LEX_CKCOMMENT%s", f ? "|" : ""); + } + if (f & LEX_INCOMMENT) + { + f &= ~LEX_INCOMMENT; + fprintf (stderr, "LEX_INCOMMENT%s", f ? "|" : ""); + } + if (f & LEX_PASSNEXT) + { + f &= ~LEX_PASSNEXT; + fprintf (stderr, "LEX_PASSNEXT%s", f ? "|" : ""); + } + if (f & LEX_RESWDOK) + { + f &= ~LEX_RESWDOK; + fprintf (stderr, "LEX_RESWDOK%s", f ? "|" : ""); + } + if (f & LEX_CKCASE) + { + f &= ~LEX_CKCASE; + fprintf (stderr, "LEX_CKCASE%s", f ? "|" : ""); + } + if (f & LEX_INCASE) + { + f &= ~LEX_INCASE; + fprintf (stderr, "LEX_INCASE%s", f ? "|" : ""); + } + if (f & LEX_INHEREDOC) + { + f &= ~LEX_INHEREDOC; + fprintf (stderr, "LEX_INHEREDOC%s", f ? "|" : ""); + } + if (f & LEX_HEREDELIM) + { + f &= ~LEX_HEREDELIM; + fprintf (stderr, "LEX_HEREDELIM%s", f ? "|" : ""); + } + if (f & LEX_STRIPDOC) + { + f &= ~LEX_STRIPDOC; + fprintf (stderr, "LEX_WASDOL%s", f ? "|" : ""); + } + if (f & LEX_QUOTEDDOC) + { + f &= ~LEX_QUOTEDDOC; + fprintf (stderr, "LEX_QUOTEDDOC%s", f ? "|" : ""); + } + if (f & LEX_INWORD) + { + f &= ~LEX_INWORD; + fprintf (stderr, "LEX_INWORD%s", f ? "|" : ""); + } + + fprintf (stderr, "\n"); + fflush (stderr); +} +#endif + +/* Parse a $(...) command substitution. This is messier than I'd like, and + reproduces a lot more of the token-reading code than I'd like. */ +static char * +parse_comsub (qc, open, close, lenp, flags) + int qc; /* `"' if this construct is within double quotes */ + int open, close; + int *lenp, flags; +{ + int count, ch, peekc, tflags, lex_rwlen, lex_wlen, lex_firstind; + int nestlen, ttranslen, start_lineno, orig_histexp; + char *ret, *nestret, *ttrans, *heredelim; + int retind, retsize, rflags, hdlen; + + /* Posix interp 217 says arithmetic expressions have precedence, so + assume $(( introduces arithmetic expansion and parse accordingly. */ + peekc = shell_getc (0); + shell_ungetc (peekc); + if (peekc == '(') + return (parse_matched_pair (qc, open, close, lenp, 0)); + +/*itrace("parse_comsub: qc = `%c' open = %c close = %c", qc, open, close);*/ + count = 1; + tflags = LEX_RESWDOK; +#if defined (BANG_HISTORY) + orig_histexp = history_expansion_inhibited; +#endif + + if ((flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0) + tflags |= LEX_CKCASE; + if ((tflags & LEX_CKCASE) && (interactive == 0 || interactive_comments)) + tflags |= LEX_CKCOMMENT; + + /* RFLAGS is the set of flags we want to pass to recursive calls. */ + rflags = (flags & P_DQUOTE); + + ret = (char *)xmalloc (retsize = 64); + retind = 0; + + start_lineno = line_number; + lex_rwlen = lex_wlen = 0; + + heredelim = 0; + lex_firstind = -1; + + while (count) + { +comsub_readchar: + ch = shell_getc (qc != '\'' && (tflags & (LEX_INCOMMENT|LEX_PASSNEXT|LEX_QUOTEDDOC)) == 0); + + if (ch == EOF) + { +eof_error: +#if defined (BANG_HISTORY) + history_expansion_inhibited = orig_histexp; +#endif + free (ret); + FREE (heredelim); + parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close); + EOF_Reached = 1; /* XXX */ + return (&matched_pair_error); + } + + /* If we hit the end of a line and are reading the contents of a here + document, and it's not the same line that the document starts on, + check for this line being the here doc delimiter. Otherwise, if + we're in a here document, mark the next character as the beginning + of a line. */ + if (ch == '\n') + { + if ((tflags & LEX_HEREDELIM) && heredelim) + { + tflags &= ~LEX_HEREDELIM; + tflags |= LEX_INHEREDOC; +#if defined (BANG_HISTORY) + history_expansion_inhibited = 1; +#endif + lex_firstind = retind + 1; + } + else if (tflags & LEX_INHEREDOC) + { + int tind; + tind = lex_firstind; + while ((tflags & LEX_STRIPDOC) && ret[tind] == '\t') + tind++; + if (retind-tind == hdlen && STREQN (ret + tind, heredelim, hdlen)) + { + tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC|LEX_QUOTEDDOC); +/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/ + free (heredelim); + heredelim = 0; + lex_firstind = -1; +#if defined (BANG_HISTORY) + history_expansion_inhibited = orig_histexp; +#endif + } + else + lex_firstind = retind + 1; + } + } + + /* Possible reprompting. */ + if (ch == '\n' && SHOULD_PROMPT ()) + prompt_again (); + + /* XXX -- we currently allow here doc to be delimited by ending right + paren in default mode and posix mode. To change posix mode, change + the #if 1 to #if 0 below */ + if ((tflags & LEX_INHEREDOC) && ch == close && count == 1) + { + int tind; +/*itrace("parse_comsub:%d: in here doc, ch == close, retind - firstind = %d hdlen = %d retind = %d", line_number, retind-lex_firstind, hdlen, retind);*/ + tind = lex_firstind; + while ((tflags & LEX_STRIPDOC) && ret[tind] == '\t') + tind++; +#if 1 + if (retind-tind == hdlen && STREQN (ret + tind, heredelim, hdlen)) +#else + /* Posix-mode shells require the newline after the here-document + delimiter. */ + if (retind-tind == hdlen && STREQN (ret + tind, heredelim, hdlen) && + posixly_correct == 0) +#endif + { + tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC|LEX_QUOTEDDOC); +/*itrace("parse_comsub:%d: found here doc end `%*s'", line_number, hdlen, ret + tind);*/ + free (heredelim); + heredelim = 0; + lex_firstind = -1; +#if defined (BANG_HISTORY) + history_expansion_inhibited = orig_histexp; +#endif + } + } + + /* Don't bother counting parens or doing anything else if in a comment or + here document (not exactly right for here-docs -- if we want to allow + recursive calls to parse_comsub to have their own here documents, + change the LEX_INHEREDOC to LEX_QUOTEDDOC here and uncomment the next + clause below. Note that to make this work completely, we need to make + additional changes to allow xparse_dolparen to work right when the + command substitution is parsed, because read_secondary_line doesn't know + to recursively parse through command substitutions embedded in here- + documents */ + if (tflags & (LEX_INCOMMENT|LEX_INHEREDOC)) + { + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + + if ((tflags & LEX_INCOMMENT) && ch == '\n') + { +/*itrace("parse_comsub:%d: lex_incomment -> 0 ch = `%c'", line_number, ch);*/ + tflags &= ~LEX_INCOMMENT; + } + + continue; + } +#if 0 + /* If we're going to recursively parse a command substitution inside a + here-document, make sure we call parse_comsub recursively below. See + above for additional caveats. */ + if ((tflags & LEX_INHEREDOC) && ((tflags & LEX_WASDOL) == 0 || ch != '(')) /*)*/ + { + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + if MBTEST(ch == '$') + tflags |= LEX_WASDOL; + else + tflags &= ~LEX_WASDOL; + } +#endif + + if (tflags & LEX_PASSNEXT) /* last char was backslash */ + { +/*itrace("parse_comsub:%d: lex_passnext -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/ + tflags &= ~LEX_PASSNEXT; + if (qc != '\'' && ch == '\n') /* double-quoted \ disappears. */ + { + if (retind > 0) + retind--; /* swallow previously-added backslash */ + continue; + } + + RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64); + if MBTEST(ch == CTLESC) + ret[retind++] = CTLESC; + ret[retind++] = ch; + continue; + } + + /* If this is a shell break character, we are not in a word. If not, + we either start or continue a word. */ + if MBTEST(shellbreak (ch)) + { + tflags &= ~LEX_INWORD; +/*itrace("parse_comsub:%d: lex_inword -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/ + } + else + { + if (tflags & LEX_INWORD) + { + lex_wlen++; +/*itrace("parse_comsub:%d: lex_inword == 1 ch = `%c' lex_wlen = %d (%d)", line_number, ch, lex_wlen, __LINE__);*/ + } + else + { +/*itrace("parse_comsub:%d: lex_inword -> 1 ch = `%c' (%d)", line_number, ch, __LINE__);*/ + tflags |= LEX_INWORD; + lex_wlen = 0; + if (tflags & LEX_RESWDOK) + lex_rwlen = 0; + } + } + + /* Skip whitespace */ + if MBTEST(shellblank (ch) && (tflags & LEX_HEREDELIM) == 0 && lex_rwlen == 0) + { + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + continue; + } + + /* Either we are looking for the start of the here-doc delimiter + (lex_firstind == -1) or we are reading one (lex_firstind >= 0). + If this character is a shell break character and we are reading + the delimiter, save it and note that we are now reading a here + document. If we've found the start of the delimiter, note it by + setting lex_firstind. Backslashes can quote shell metacharacters + in here-doc delimiters. */ + if (tflags & LEX_HEREDELIM) + { + if (lex_firstind == -1 && shellbreak (ch) == 0) + lex_firstind = retind; +#if 0 + else if (heredelim && (tflags & LEX_PASSNEXT) == 0 && ch == '\n') + { + tflags |= LEX_INHEREDOC; + tflags &= ~LEX_HEREDELIM; + lex_firstind = retind + 1; +#if defined (BANG_HISTORY) + history_expansion_inhibited = 1; +#endif + } +#endif + else if (lex_firstind >= 0 && (tflags & LEX_PASSNEXT) == 0 && shellbreak (ch)) + { + if (heredelim == 0) + { + nestret = substring (ret, lex_firstind, retind); + heredelim = string_quote_removal (nestret, 0); + hdlen = STRLEN(heredelim); +/*itrace("parse_comsub:%d: found here doc delimiter `%s' (%d)", line_number, heredelim, hdlen);*/ + if (STREQ (heredelim, nestret) == 0) + tflags |= LEX_QUOTEDDOC; + free (nestret); + } + if (ch == '\n') + { + tflags |= LEX_INHEREDOC; + tflags &= ~LEX_HEREDELIM; + lex_firstind = retind + 1; +#if defined (BANG_HISTORY) + history_expansion_inhibited = 1; +#endif + } + else + lex_firstind = -1; + } + } + + /* Meta-characters that can introduce a reserved word. Not perfect yet. */ + if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && (shellmeta(ch) || ch == '\n')) + { + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + peekc = shell_getc (1); + if (ch == peekc && (ch == '&' || ch == '|' || ch == ';')) /* two-character tokens */ + { + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = peekc; +/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch);*/ + tflags |= LEX_RESWDOK; + lex_rwlen = 0; + continue; + } + else if (ch == '\n' || COMSUB_META(ch)) + { + shell_ungetc (peekc); +/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch);*/ + tflags |= LEX_RESWDOK; + lex_rwlen = 0; + continue; + } + else if (ch == EOF) + goto eof_error; + else + { + /* `unget' the character we just added and fall through */ + retind--; + shell_ungetc (peekc); + } + } + + /* If we can read a reserved word, try to read one. */ + if (tflags & LEX_RESWDOK) + { + if MBTEST(islower ((unsigned char)ch)) + { + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + lex_rwlen++; + continue; + } + else if MBTEST(lex_rwlen == 4 && shellbreak (ch)) + { + if (STREQN (ret + retind - 4, "case", 4)) + { + tflags |= LEX_INCASE; + tflags &= ~LEX_RESWDOK; +/*itrace("parse_comsub:%d: found `case', lex_incase -> 1 lex_reswdok -> 0", line_number);*/ + } + else if (STREQN (ret + retind - 4, "esac", 4)) + { + tflags &= ~LEX_INCASE; +/*itrace("parse_comsub:%d: found `esac', lex_incase -> 0 lex_reswdok -> 1", line_number);*/ + tflags |= LEX_RESWDOK; + lex_rwlen = 0; + } + else if (STREQN (ret + retind - 4, "done", 4) || + STREQN (ret + retind - 4, "then", 4) || + STREQN (ret + retind - 4, "else", 4) || + STREQN (ret + retind - 4, "elif", 4) || + STREQN (ret + retind - 4, "time", 4)) + { + /* these are four-character reserved words that can be + followed by a reserved word; anything else turns off + the reserved-word-ok flag */ +/*itrace("parse_comsub:%d: found `%.4s', lex_reswdok -> 1", line_number, ret+retind-4);*/ + tflags |= LEX_RESWDOK; + lex_rwlen = 0; + } + else if (shellmeta (ch) == 0) + { + tflags &= ~LEX_RESWDOK; +/*itrace("parse_comsub:%d: found `%.4s', lex_reswdok -> 0", line_number, ret+retind-4);*/ + } + else /* can't be in a reserved word any more */ + lex_rwlen = 0; + } + else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0))) + ; /* don't modify LEX_RESWDOK if we're starting a comment */ + /* Allow `do' followed by space, tab, or newline to preserve the + RESWDOK flag, but reset the reserved word length counter so we + can read another one. */ + else if MBTEST(((tflags & LEX_INCASE) == 0) && + (isblank((unsigned char)ch) || ch == '\n') && + lex_rwlen == 2 && + STREQN (ret + retind - 2, "do", 2)) + { +/*itrace("parse_comsub:%d: lex_incase == 0 found `%c', found \"do\"", line_number, ch);*/ + lex_rwlen = 0; + } + else if MBTEST((tflags & LEX_INCASE) && ch != '\n') + /* If we can read a reserved word and we're in case, we're at the + point where we can read a new pattern list or an esac. We + handle the esac case above. If we read a newline, we want to + leave LEX_RESWDOK alone. If we read anything else, we want to + turn off LEX_RESWDOK, since we're going to read a pattern list. */ + { + tflags &= ~LEX_RESWDOK; +/*itrace("parse_comsub:%d: lex_incase == 1 found `%c', lex_reswordok -> 0", line_number, ch);*/ + } + else if MBTEST(shellbreak (ch) == 0) + { + tflags &= ~LEX_RESWDOK; +/*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/ + } +#if 0 + /* If we find a space or tab but have read something and it's not + `do', turn off the reserved-word-ok flag */ + else if MBTEST(isblank ((unsigned char)ch) && lex_rwlen > 0) + { + tflags &= ~LEX_RESWDOK; +/*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/ + } +#endif + } + + /* Might be the start of a here-doc delimiter */ + if MBTEST((tflags & LEX_INCOMMENT) == 0 && (tflags & LEX_CKCASE) && ch == '<') + { + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + peekc = shell_getc (1); + if (peekc == EOF) + goto eof_error; + if (peekc == ch) + { + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = peekc; + peekc = shell_getc (1); + if (peekc == EOF) + goto eof_error; + if (peekc == '-') + { + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = peekc; + tflags |= LEX_STRIPDOC; + } + else + shell_ungetc (peekc); + if (peekc != '<') + { + tflags |= LEX_HEREDELIM; + lex_firstind = -1; + } + continue; + } + else + { + shell_ungetc (peekc); /* not a here-doc, start over */ + continue; + } + } + else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (((tflags & LEX_RESWDOK) && lex_rwlen == 0) || ((tflags & LEX_INWORD) && lex_wlen == 0))) + { +/*itrace("parse_comsub:%d: lex_incomment -> 1 (%d)", line_number, __LINE__);*/ + tflags |= LEX_INCOMMENT; + } + + if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */ + { + RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64); + ret[retind++] = CTLESC; + ret[retind++] = ch; + continue; + } +#if 0 + else if MBTEST((tflags & LEX_INCASE) && ch == close && close == ')') + tflags &= ~LEX_INCASE; /* XXX */ +#endif + else if MBTEST(ch == close && (tflags & LEX_INCASE) == 0) /* ending delimiter */ + { + count--; +/*itrace("parse_comsub:%d: found close: count = %d", line_number, count);*/ + } + else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && (tflags & LEX_INCASE) == 0 && ch == open) /* nested begin */ + { + count++; +/*itrace("parse_comsub:%d: found open: count = %d", line_number, count);*/ + } + + /* Add this character. */ + RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); + ret[retind++] = ch; + + /* If we just read the ending character, don't bother continuing. */ + if (count == 0) + break; + + if MBTEST(ch == '\\') /* backslashes */ + tflags |= LEX_PASSNEXT; + + if MBTEST(shellquote (ch)) + { + /* '', ``, or "" inside $(...). */ + push_delimiter (dstack, ch); + if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */ + nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags); + else + nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags); + pop_delimiter (dstack); + CHECK_NESTRET_ERROR (); + + if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0)) + { + /* Translate $'...' here. */ + ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen); + free (nestret); + + if ((rflags & P_DQUOTE) == 0) + { + nestret = sh_single_quote (ttrans); + free (ttrans); + nestlen = strlen (nestret); + } + else + { + nestret = ttrans; + nestlen = ttranslen; + } + retind -= 2; /* back up before the $' */ + } + else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0)) + { + /* Locale expand $"..." here. */ + ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen); + free (nestret); + + nestret = sh_mkdoublequoted (ttrans, ttranslen, 0); + free (ttrans); + nestlen = ttranslen + 2; + retind -= 2; /* back up before the $" */ + } + + APPEND_NESTRET (); + FREE (nestret); + } + else if MBTEST((tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ + /* check for $(), $[], or ${} inside command substitution. */ + { + if ((tflags & LEX_INCASE) == 0 && open == ch) /* undo previous increment */ + count--; + if (ch == '(') /* ) */ + nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE); + else if (ch == '{') /* } */ + nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags); + else if (ch == '[') /* ] */ + nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags); + + CHECK_NESTRET_ERROR (); + APPEND_NESTRET (); + + FREE (nestret); + } + if MBTEST(ch == '$' && (tflags & LEX_WASDOL) == 0) + tflags |= LEX_WASDOL; + else + tflags &= ~LEX_WASDOL; + } + +#if defined (BANG_HISTORY) + history_expansion_inhibited = orig_histexp; +#endif + FREE (heredelim); + ret[retind] = '\0'; + if (lenp) + *lenp = retind; +/*itrace("parse_comsub:%d: returning `%s'", line_number, ret);*/ + return ret; +} + +/* Recursively call the parser to parse a $(...) command substitution. */ +char * +xparse_dolparen (base, string, indp, flags) + char *base; + char *string; + int *indp; + int flags; +{ + sh_parser_state_t ps; + sh_input_line_state_t ls; + int orig_ind, nc, sflags, orig_eof_token, start_lineno; + char *ret, *ep, *ostring; +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + STRING_SAVER *saved_pushed_strings; +#endif + +/*debug_parser(1);*/ + orig_ind = *indp; + ostring = string; + start_lineno = line_number; + + if (*string == 0) + { + if (flags & SX_NOALLOC) + return (char *)NULL; + + ret = xmalloc (1); + ret[0] = '\0'; + return ret; + } + +/*itrace("xparse_dolparen: size = %d shell_input_line = `%s' string=`%s'", shell_input_line_size, shell_input_line, string);*/ + sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE; + if (flags & SX_NOLONGJMP) + sflags |= SEVAL_NOLONGJMP; + save_parser_state (&ps); + save_input_line_state (&ls); + orig_eof_token = shell_eof_token; + /* avoid echoing every substitution again */ + echo_input_at_read = 0; +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + saved_pushed_strings = pushed_string_list; /* separate parsing context */ + pushed_string_list = (STRING_SAVER *)NULL; +#endif + + /*(*/ + parser_state |= PST_CMDSUBST|PST_EOFTOKEN; /* allow instant ')' */ /*(*/ + shell_eof_token = ')'; + + /* Should we save and restore the bison/yacc lookahead token (yychar) here? + Or only if it's not YYEMPTY? */ + + nc = parse_string (string, "command substitution", sflags, &ep); + + if (current_token == shell_eof_token) + yyclearin; /* might want to clear lookahead token unconditionally */ + + reset_parser (); + /* reset_parser() clears shell_input_line and associated variables, including + parser_state, so we want to reset things, then restore what we need. */ + restore_input_line_state (&ls); + + shell_eof_token = orig_eof_token; + restore_parser_state (&ps); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + pushed_string_list = saved_pushed_strings; +#endif + + token_to_read = 0; + + /* If parse_string returns < 0, we need to jump to top level with the + negative of the return value. We abandon the rest of this input line + first */ + if (nc < 0) + { + clear_shell_input_line (); /* XXX */ + if (bash_input.type != st_string) /* paranoia */ + parser_state &= ~(PST_CMDSUBST|PST_EOFTOKEN); + jump_to_top_level (-nc); /* XXX */ + } + + /* Need to find how many characters parse_and_execute consumed, update + *indp, if flags != 0, copy the portion of the string parsed into RET + and return it. If flags & 1 (SX_NOALLOC) we can return NULL. */ + + /*(*/ + if (ep[-1] != ')') + { +#if DEBUG + if (ep[-1] != '\n') + itrace("xparse_dolparen:%d: ep[-1] != RPAREN (%d), ep = `%s'", line_number, ep[-1], ep); +#endif + + while (ep > ostring && ep[-1] == '\n') ep--; + } + + nc = ep - ostring; + *indp = ep - base - 1; + + /*((*/ +#if DEBUG + if (base[*indp] != ')') + itrace("xparse_dolparen:%d: base[%d] != RPAREN (%d), base = `%s'", line_number, *indp, base[*indp], base); + if (*indp < orig_ind) + itrace("xparse_dolparen:%d: *indp (%d) < orig_ind (%d), orig_string = `%s'", line_number, *indp, orig_ind, ostring); +#endif + + if (base[*indp] != ')') + { + /*(*/ + parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), ')'); + jump_to_top_level (DISCARD); + } + + if (flags & SX_NOALLOC) + return (char *)NULL; + + if (nc == 0) + { + ret = xmalloc (1); + ret[0] = '\0'; + } + else + ret = substring (ostring, 0, nc - 1); + + return ret; +} + +#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) +/* Parse a double-paren construct. It can be either an arithmetic + command, an arithmetic `for' command, or a nested subshell. Returns + the parsed token, -1 on error, or -2 if we didn't do anything and + should just go on. */ +static int +parse_dparen (c) + int c; +{ + int cmdtyp, sline; + char *wval; + WORD_DESC *wd; + +#if defined (ARITH_FOR_COMMAND) + if (last_read_token == FOR) + { + arith_for_lineno = line_number; + cmdtyp = parse_arith_cmd (&wval, 0); + if (cmdtyp == 1) + { + wd = alloc_word_desc (); + wd->word = wval; + yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); + return (ARITH_FOR_EXPRS); + } + else + return -1; /* ERROR */ + } +#endif + +#if defined (DPAREN_ARITHMETIC) + if (reserved_word_acceptable (last_read_token)) + { + sline = line_number; + + cmdtyp = parse_arith_cmd (&wval, 0); + if (cmdtyp == 1) /* arithmetic command */ + { + wd = alloc_word_desc (); + wd->word = wval; + wd->flags = W_QUOTED|W_NOSPLIT|W_NOGLOB|W_DQUOTE; + yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); + return (ARITH_CMD); + } + else if (cmdtyp == 0) /* nested subshell */ + { + push_string (wval, 0, (alias_t *)NULL); + pushed_string_list->flags = PSH_DPAREN; + if ((parser_state & PST_CASEPAT) == 0) + parser_state |= PST_SUBSHELL; + return (c); + } + else /* ERROR */ + return -1; + } +#endif + + return -2; /* XXX */ +} + +/* We've seen a `(('. Look for the matching `))'. If we get it, return 1. + If not, assume it's a nested subshell for backwards compatibility and + return 0. In any case, put the characters we've consumed into a locally- + allocated buffer and make *ep point to that buffer. Return -1 on an + error, for example EOF. */ +static int +parse_arith_cmd (ep, adddq) + char **ep; + int adddq; +{ + int exp_lineno, rval, c; + char *ttok, *tokstr; + int ttoklen; + + exp_lineno = line_number; + ttok = parse_matched_pair (0, '(', ')', &ttoklen, 0); + rval = 1; + if (ttok == &matched_pair_error) + return -1; + /* Check that the next character is the closing right paren. If + not, this is a syntax error. ( */ + c = shell_getc (0); + if MBTEST(c != ')') + rval = 0; + + tokstr = (char *)xmalloc (ttoklen + 4); + + /* if ADDDQ != 0 then (( ... )) -> "..." */ + if (rval == 1 && adddq) /* arith cmd, add double quotes */ + { + tokstr[0] = '"'; + strncpy (tokstr + 1, ttok, ttoklen - 1); + tokstr[ttoklen] = '"'; + tokstr[ttoklen+1] = '\0'; + } + else if (rval == 1) /* arith cmd, don't add double quotes */ + { + strncpy (tokstr, ttok, ttoklen - 1); + tokstr[ttoklen-1] = '\0'; + } + else /* nested subshell */ + { + tokstr[0] = '('; + strncpy (tokstr + 1, ttok, ttoklen - 1); + tokstr[ttoklen] = ')'; + tokstr[ttoklen+1] = c; + tokstr[ttoklen+2] = '\0'; + } + + *ep = tokstr; + FREE (ttok); + return rval; +} +#endif /* DPAREN_ARITHMETIC || ARITH_FOR_COMMAND */ + +#if defined (COND_COMMAND) +static void +cond_error () +{ + char *etext; + + if (EOF_Reached && cond_token != COND_ERROR) /* [[ */ + parser_error (cond_lineno, _("unexpected EOF while looking for `]]'")); + else if (cond_token != COND_ERROR) + { + if (etext = error_token_from_token (cond_token)) + { + parser_error (cond_lineno, _("syntax error in conditional expression: unexpected token `%s'"), etext); + free (etext); + } + else + parser_error (cond_lineno, _("syntax error in conditional expression")); + } +} + +static COND_COM * +cond_expr () +{ + return (cond_or ()); +} + +static COND_COM * +cond_or () +{ + COND_COM *l, *r; + + l = cond_and (); + if (cond_token == OR_OR) + { + r = cond_or (); + l = make_cond_node (COND_OR, (WORD_DESC *)NULL, l, r); + } + return l; +} + +static COND_COM * +cond_and () +{ + COND_COM *l, *r; + + l = cond_term (); + if (cond_token == AND_AND) + { + r = cond_and (); + l = make_cond_node (COND_AND, (WORD_DESC *)NULL, l, r); + } + return l; +} + +static int +cond_skip_newlines () +{ + while ((cond_token = read_token (READ)) == '\n') + { + if (SHOULD_PROMPT ()) + prompt_again (); + } + return (cond_token); +} + +#define COND_RETURN_ERROR() \ + do { cond_token = COND_ERROR; return ((COND_COM *)NULL); } while (0) + +static COND_COM * +cond_term () +{ + WORD_DESC *op; + COND_COM *term, *tleft, *tright; + int tok, lineno; + char *etext; + + /* Read a token. It can be a left paren, a `!', a unary operator, or a + word that should be the first argument of a binary operator. Start by + skipping newlines, since this is a compound command. */ + tok = cond_skip_newlines (); + lineno = line_number; + if (tok == COND_END) + { + COND_RETURN_ERROR (); + } + else if (tok == '(') + { + term = cond_expr (); + if (cond_token != ')') + { + if (term) + dispose_cond_node (term); /* ( */ + if (etext = error_token_from_token (cond_token)) + { + parser_error (lineno, _("unexpected token `%s', expected `)'"), etext); + free (etext); + } + else + parser_error (lineno, _("expected `)'")); + COND_RETURN_ERROR (); + } + term = make_cond_node (COND_EXPR, (WORD_DESC *)NULL, term, (COND_COM *)NULL); + (void)cond_skip_newlines (); + } + else if (tok == BANG || (tok == WORD && (yylval.word->word[0] == '!' && yylval.word->word[1] == '\0'))) + { + if (tok == WORD) + dispose_word (yylval.word); /* not needed */ + term = cond_term (); + if (term) + term->flags |= CMD_INVERT_RETURN; + } + else if (tok == WORD && yylval.word->word[0] == '-' && yylval.word->word[1] && yylval.word->word[2] == 0 && test_unop (yylval.word->word)) + { + op = yylval.word; + tok = read_token (READ); + if (tok == WORD) + { + tleft = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL); + term = make_cond_node (COND_UNARY, op, tleft, (COND_COM *)NULL); + } + else + { + dispose_word (op); + if (etext = error_token_from_token (tok)) + { + parser_error (line_number, _("unexpected argument `%s' to conditional unary operator"), etext); + free (etext); + } + else + parser_error (line_number, _("unexpected argument to conditional unary operator")); + COND_RETURN_ERROR (); + } + + (void)cond_skip_newlines (); + } + else if (tok == WORD) /* left argument to binary operator */ + { + /* lhs */ + tleft = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL); + + /* binop */ + tok = read_token (READ); + if (tok == WORD && test_binop (yylval.word->word)) + { + op = yylval.word; + if (op->word[0] == '=' && (op->word[1] == '\0' || (op->word[1] == '=' && op->word[2] == '\0'))) + parser_state |= PST_EXTPAT; + else if (op->word[0] == '!' && op->word[1] == '=' && op->word[2] == '\0') + parser_state |= PST_EXTPAT; + } +#if defined (COND_REGEXP) + else if (tok == WORD && STREQ (yylval.word->word, "=~")) + { + op = yylval.word; + parser_state |= PST_REGEXP; + } +#endif + else if (tok == '<' || tok == '>') + op = make_word_from_token (tok); /* ( */ + /* There should be a check before blindly accepting the `)' that we have + seen the opening `('. */ + else if (tok == COND_END || tok == AND_AND || tok == OR_OR || tok == ')') + { + /* Special case. [[ x ]] is equivalent to [[ -n x ]], just like + the test command. Similarly for [[ x && expr ]] or + [[ x || expr ]] or [[ (x) ]]. */ + op = make_word ("-n"); + term = make_cond_node (COND_UNARY, op, tleft, (COND_COM *)NULL); + cond_token = tok; + return (term); + } + else + { + if (etext = error_token_from_token (tok)) + { + parser_error (line_number, _("unexpected token `%s', conditional binary operator expected"), etext); + free (etext); + } + else + parser_error (line_number, _("conditional binary operator expected")); + dispose_cond_node (tleft); + COND_RETURN_ERROR (); + } + + /* rhs */ + if (parser_state & PST_EXTPAT) + extended_glob = 1; + tok = read_token (READ); + if (parser_state & PST_EXTPAT) + extended_glob = global_extglob; + parser_state &= ~(PST_REGEXP|PST_EXTPAT); + + if (tok == WORD) + { + tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL); + term = make_cond_node (COND_BINARY, op, tleft, tright); + } + else + { + if (etext = error_token_from_token (tok)) + { + parser_error (line_number, _("unexpected argument `%s' to conditional binary operator"), etext); + free (etext); + } + else + parser_error (line_number, _("unexpected argument to conditional binary operator")); + dispose_cond_node (tleft); + dispose_word (op); + COND_RETURN_ERROR (); + } + + (void)cond_skip_newlines (); + } + else + { + if (tok < 256) + parser_error (line_number, _("unexpected token `%c' in conditional command"), tok); + else if (etext = error_token_from_token (tok)) + { + parser_error (line_number, _("unexpected token `%s' in conditional command"), etext); + free (etext); + } + else + parser_error (line_number, _("unexpected token %d in conditional command"), tok); + COND_RETURN_ERROR (); + } + return (term); +} + +/* This is kind of bogus -- we slip a mini recursive-descent parser in + here to handle the conditional statement syntax. */ +static COMMAND * +parse_cond_command () +{ + COND_COM *cexp; + + global_extglob = extended_glob; + cexp = cond_expr (); + return (make_cond_command (cexp)); +} +#endif + +#if defined (ARRAY_VARS) +/* When this is called, it's guaranteed that we don't care about anything + in t beyond i. We use a buffer with room for the characters we add just + in case assignment() ends up doing something like parsing a command + substitution that will reallocate atoken. We don't want to write beyond + the end of an allocated buffer. */ +static int +token_is_assignment (t, i) + char *t; + int i; +{ + int r; + char *atoken; + + atoken = xmalloc (i + 3); + memcpy (atoken, t, i); + atoken[i] = '='; + atoken[i+1] = '\0'; + + r = assignment (atoken, (parser_state & PST_COMPASSIGN) != 0); + + free (atoken); + + /* XXX - check that r == i to avoid returning false positive for + t containing `=' before t[i]. */ + return (r > 0 && r == i); +} + +/* XXX - possible changes here for `+=' */ +static int +token_is_ident (t, i) + char *t; + int i; +{ + unsigned char c; + int r; + + c = t[i]; + t[i] = '\0'; + r = legal_identifier (t); + t[i] = c; + return r; +} +#endif + +static int +read_token_word (character) + int character; +{ + /* The value for YYLVAL when a WORD is read. */ + WORD_DESC *the_word; + + /* Index into the token that we are building. */ + int token_index; + + /* ALL_DIGITS becomes zero when we see a non-digit. */ + int all_digit_token; + + /* DOLLAR_PRESENT becomes non-zero if we see a `$'. */ + int dollar_present; + + /* COMPOUND_ASSIGNMENT becomes non-zero if we are parsing a compound + assignment. */ + int compound_assignment; + + /* QUOTED becomes non-zero if we see one of ("), ('), (`), or (\). */ + int quoted; + + /* Non-zero means to ignore the value of the next character, and just + to add it no matter what. */ + int pass_next_character; + + /* The current delimiting character. */ + int cd; + int result, peek_char; + char *ttok, *ttrans; + int ttoklen, ttranslen; + intmax_t lvalue; + + if (token_buffer_size < TOKEN_DEFAULT_INITIAL_SIZE) + token = (char *)xrealloc (token, token_buffer_size = TOKEN_DEFAULT_INITIAL_SIZE); + + token_index = 0; + all_digit_token = DIGIT (character); + dollar_present = quoted = pass_next_character = compound_assignment = 0; + + for (;;) + { + if (character == EOF) + goto got_token; + + if (pass_next_character) + { + pass_next_character = 0; + goto got_escaped_character; + } + + cd = current_delimiter (dstack); + + /* Handle backslashes. Quote lots of things when not inside of + double-quotes, quote some things inside of double-quotes. */ + if MBTEST(character == '\\') + { + peek_char = shell_getc (0); + + /* Backslash-newline is ignored in all cases except + when quoted with single quotes. */ + if (peek_char == '\n') + { + character = '\n'; + goto next_character; + } + else + { + shell_ungetc (peek_char); + + /* If the next character is to be quoted, note it now. */ + if (cd == 0 || cd == '`' || + (cd == '"' && peek_char >= 0 && (sh_syntaxtab[peek_char] & CBSDQUOTE))) + pass_next_character++; + + quoted = 1; + goto got_character; + } + } + + /* Parse a matched pair of quote characters. */ + if MBTEST(shellquote (character)) + { + push_delimiter (dstack, character); + ttok = parse_matched_pair (character, character, character, &ttoklen, (character == '`') ? P_COMMAND : 0); + pop_delimiter (dstack); + if (ttok == &matched_pair_error) + return -1; /* Bail immediately. */ + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2, + token_buffer_size, TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = character; + strcpy (token + token_index, ttok); + token_index += ttoklen; + all_digit_token = 0; + if (character != '`') + quoted = 1; + dollar_present |= (character == '"' && strchr (ttok, '$') != 0); + FREE (ttok); + goto next_character; + } + +#ifdef COND_REGEXP + /* When parsing a regexp as a single word inside a conditional command, + we need to special-case characters special to both the shell and + regular expressions. Right now, that is only '(' and '|'. */ /*)*/ + if MBTEST((parser_state & PST_REGEXP) && (character == '(' || character == '|')) /*)*/ + { + if (character == '|') + goto got_character; + + push_delimiter (dstack, character); + ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0); + pop_delimiter (dstack); + if (ttok == &matched_pair_error) + return -1; /* Bail immediately. */ + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2, + token_buffer_size, TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = character; + strcpy (token + token_index, ttok); + token_index += ttoklen; + FREE (ttok); + dollar_present = all_digit_token = 0; + goto next_character; + } +#endif /* COND_REGEXP */ + +#ifdef EXTENDED_GLOB + /* Parse a ksh-style extended pattern matching specification. */ + if MBTEST(extended_glob && PATTERN_CHAR (character)) + { + peek_char = shell_getc (1); + if MBTEST(peek_char == '(') /* ) */ + { + push_delimiter (dstack, peek_char); + ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0); + pop_delimiter (dstack); + if (ttok == &matched_pair_error) + return -1; /* Bail immediately. */ + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 3, + token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = character; + token[token_index++] = peek_char; + strcpy (token + token_index, ttok); + token_index += ttoklen; + FREE (ttok); + dollar_present = all_digit_token = 0; + goto next_character; + } + else + shell_ungetc (peek_char); + } +#endif /* EXTENDED_GLOB */ + + /* If the delimiter character is not single quote, parse some of + the shell expansions that must be read as a single word. */ + if (shellexp (character)) + { + peek_char = shell_getc (1); + /* $(...), <(...), >(...), $((...)), ${...}, and $[...] constructs */ + if MBTEST(peek_char == '(' || + ((peek_char == '{' || peek_char == '[') && character == '$')) /* ) ] } */ + { + if (peek_char == '{') /* } */ + ttok = parse_matched_pair (cd, '{', '}', &ttoklen, P_FIRSTCLOSE|P_DOLBRACE); + else if (peek_char == '(') /* ) */ + { + /* XXX - push and pop the `(' as a delimiter for use by + the command-oriented-history code. This way newlines + appearing in the $(...) string get added to the + history literally rather than causing a possibly- + incorrect `;' to be added. ) */ + push_delimiter (dstack, peek_char); + ttok = parse_comsub (cd, '(', ')', &ttoklen, P_COMMAND); + pop_delimiter (dstack); + } + else + ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0); + if (ttok == &matched_pair_error) + return -1; /* Bail immediately. */ + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 3, + token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = character; + token[token_index++] = peek_char; + strcpy (token + token_index, ttok); + token_index += ttoklen; + FREE (ttok); + dollar_present = 1; + all_digit_token = 0; + goto next_character; + } + /* This handles $'...' and $"..." new-style quoted strings. */ + else if MBTEST(character == '$' && (peek_char == '\'' || peek_char == '"')) + { + int first_line; + + first_line = line_number; + push_delimiter (dstack, peek_char); + ttok = parse_matched_pair (peek_char, peek_char, peek_char, + &ttoklen, + (peek_char == '\'') ? P_ALLOWESC : 0); + pop_delimiter (dstack); + if (ttok == &matched_pair_error) + return -1; + if (peek_char == '\'') + { + ttrans = ansiexpand (ttok, 0, ttoklen - 1, &ttranslen); + free (ttok); + + /* Insert the single quotes and correctly quote any + embedded single quotes (allowed because P_ALLOWESC was + passed to parse_matched_pair). */ + ttok = sh_single_quote (ttrans); + free (ttrans); + ttranslen = strlen (ttok); + ttrans = ttok; + } + else + { + /* Try to locale-expand the converted string. */ + ttrans = localeexpand (ttok, 0, ttoklen - 1, first_line, &ttranslen); + free (ttok); + + /* Add the double quotes back */ + ttok = sh_mkdoublequoted (ttrans, ttranslen, 0); + free (ttrans); + ttranslen += 2; + ttrans = ttok; + } + + RESIZE_MALLOCED_BUFFER (token, token_index, ttranslen + 1, + token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + strcpy (token + token_index, ttrans); + token_index += ttranslen; + FREE (ttrans); + quoted = 1; + all_digit_token = 0; + goto next_character; + } + /* This could eventually be extended to recognize all of the + shell's single-character parameter expansions, and set flags.*/ + else if MBTEST(character == '$' && peek_char == '$') + { + RESIZE_MALLOCED_BUFFER (token, token_index, 3, + token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = '$'; + token[token_index++] = peek_char; + dollar_present = 1; + all_digit_token = 0; + goto next_character; + } + else + shell_ungetc (peek_char); + } + +#if defined (ARRAY_VARS) + /* Identify possible array subscript assignment; match [...]. If + parser_state&PST_COMPASSIGN, we need to parse [sub]=words treating + `sub' as if it were enclosed in double quotes. */ + else if MBTEST(character == '[' && /* ] */ + ((token_index > 0 && assignment_acceptable (last_read_token) && token_is_ident (token, token_index)) || + (token_index == 0 && (parser_state&PST_COMPASSIGN)))) + { + ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARRAYSUB); + if (ttok == &matched_pair_error) + return -1; /* Bail immediately. */ + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2, + token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = character; + strcpy (token + token_index, ttok); + token_index += ttoklen; + FREE (ttok); + all_digit_token = 0; + goto next_character; + } + /* Identify possible compound array variable assignment. */ + else if MBTEST(character == '=' && token_index > 0 && (assignment_acceptable (last_read_token) || (parser_state & PST_ASSIGNOK)) && token_is_assignment (token, token_index)) + { + peek_char = shell_getc (1); + if MBTEST(peek_char == '(') /* ) */ + { + ttok = parse_compound_assignment (&ttoklen); + + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 4, + token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + + token[token_index++] = '='; + token[token_index++] = '('; + if (ttok) + { + strcpy (token + token_index, ttok); + token_index += ttoklen; + } + token[token_index++] = ')'; + FREE (ttok); + all_digit_token = 0; + compound_assignment = 1; +#if 1 + goto next_character; +#else + goto got_token; /* ksh93 seems to do this */ +#endif + } + else + shell_ungetc (peek_char); + } +#endif + + /* When not parsing a multi-character word construct, shell meta- + characters break words. */ + if MBTEST(shellbreak (character)) + { + shell_ungetc (character); + goto got_token; + } + +got_character: + if (character == CTLESC || character == CTLNUL) + { + RESIZE_MALLOCED_BUFFER (token, token_index, 2, token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = CTLESC; + } + else +got_escaped_character: + RESIZE_MALLOCED_BUFFER (token, token_index, 1, token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + + token[token_index++] = character; + + all_digit_token &= DIGIT (character); + dollar_present |= character == '$'; + + next_character: + if (character == '\n' && SHOULD_PROMPT ()) + prompt_again (); + + /* We want to remove quoted newlines (that is, a \ pair) + unless we are within single quotes or pass_next_character is + set (the shell equivalent of literal-next). */ + cd = current_delimiter (dstack); + character = shell_getc (cd != '\'' && pass_next_character == 0); + } /* end for (;;) */ + +got_token: + + /* Calls to RESIZE_MALLOCED_BUFFER ensure there is sufficient room. */ + token[token_index] = '\0'; + + /* Check to see what thing we should return. If the last_read_token + is a `<', or a `&', or the character which ended this token is + a '>' or '<', then, and ONLY then, is this input token a NUMBER. + Otherwise, it is just a word, and should be returned as such. */ + if MBTEST(all_digit_token && (character == '<' || character == '>' || + last_read_token == LESS_AND || + last_read_token == GREATER_AND)) + { + if (legal_number (token, &lvalue) && (int)lvalue == lvalue) + { + yylval.number = lvalue; + return (NUMBER); + } + } + + /* Check for special case tokens. */ + result = (last_shell_getc_is_singlebyte) ? special_case_tokens (token) : -1; + if (result >= 0) + return result; + +#if defined (ALIAS) + /* Posix.2 does not allow reserved words to be aliased, so check for all + of them, including special cases, before expanding the current token + as an alias. */ + if MBTEST(posixly_correct) + CHECK_FOR_RESERVED_WORD (token); + + /* Aliases are expanded iff EXPAND_ALIASES is non-zero, and quoting + inhibits alias expansion. */ + if (expand_aliases && quoted == 0) + { + result = alias_expand_token (token); + if (result == RE_READ_TOKEN) + return (RE_READ_TOKEN); + else if (result == NO_EXPANSION) + parser_state &= ~PST_ALEXPNEXT; + } + + /* If not in Posix.2 mode, check for reserved words after alias + expansion. */ + if MBTEST(posixly_correct == 0) +#endif + CHECK_FOR_RESERVED_WORD (token); + + the_word = alloc_word_desc (); + the_word->word = (char *)xmalloc (1 + token_index); + the_word->flags = 0; + strcpy (the_word->word, token); + if (dollar_present) + the_word->flags |= W_HASDOLLAR; + if (quoted) + the_word->flags |= W_QUOTED; /*(*/ + if (compound_assignment && token[token_index-1] == ')') + the_word->flags |= W_COMPASSIGN; + /* A word is an assignment if it appears at the beginning of a + simple command, or after another assignment word. This is + context-dependent, so it cannot be handled in the grammar. */ + if (assignment (token, (parser_state & PST_COMPASSIGN) != 0)) + { + the_word->flags |= W_ASSIGNMENT; + /* Don't perform word splitting on assignment statements. */ + if (assignment_acceptable (last_read_token) || (parser_state & PST_COMPASSIGN) != 0) + { + the_word->flags |= W_NOSPLIT; + if (parser_state & PST_COMPASSIGN) + the_word->flags |= W_NOGLOB; /* XXX - W_NOBRACE? */ + } + } + + if (command_token_position (last_read_token)) + { + struct builtin *b; + b = builtin_address_internal (token, 0); + if (b && (b->flags & ASSIGNMENT_BUILTIN)) + parser_state |= PST_ASSIGNOK; + else if (STREQ (token, "eval") || STREQ (token, "let")) + parser_state |= PST_ASSIGNOK; + } + + yylval.word = the_word; + + /* should we check that quoted == 0 as well? */ + if (token[0] == '{' && token[token_index-1] == '}' && + (character == '<' || character == '>')) + { + /* can use token; already copied to the_word */ + token[token_index-1] = '\0'; +#if defined (ARRAY_VARS) + if (legal_identifier (token+1) || valid_array_reference (token+1, 0)) +#else + if (legal_identifier (token+1)) +#endif + { + strcpy (the_word->word, token+1); +/* itrace("read_token_word: returning REDIR_WORD for %s", the_word->word); */ + yylval.word = the_word; /* accommodate recursive call */ + return (REDIR_WORD); + } + else + /* valid_array_reference can call the parser recursively; need to + make sure that yylval.word doesn't change if we are going to + return WORD or ASSIGNMENT_WORD */ + yylval.word = the_word; + } + + result = ((the_word->flags & (W_ASSIGNMENT|W_NOSPLIT)) == (W_ASSIGNMENT|W_NOSPLIT)) + ? ASSIGNMENT_WORD : WORD; + + switch (last_read_token) + { + case FUNCTION: + parser_state |= PST_ALLOWOPNBRC; + function_dstart = line_number; + break; + case CASE: + case SELECT: + case FOR: + if (word_top < MAX_CASE_NEST) + word_top++; + word_lineno[word_top] = line_number; + expecting_in_token++; + break; + } + + return (result); +} + +/* Return 1 if TOKSYM is a token that after being read would allow + a reserved word to be seen, else 0. */ +static int +reserved_word_acceptable (toksym) + int toksym; +{ + switch (toksym) + { + case '\n': + case ';': + case '(': + case ')': + case '|': + case '&': + case '{': + case '}': /* XXX */ + case AND_AND: + case BANG: + case BAR_AND: + case DO: + case DONE: + case ELIF: + case ELSE: + case ESAC: + case FI: + case IF: + case OR_OR: + case SEMI_SEMI: + case SEMI_AND: + case SEMI_SEMI_AND: + case THEN: + case TIME: + case TIMEOPT: + case TIMEIGN: + case COPROC: + case UNTIL: + case WHILE: + case 0: + return 1; + default: +#if defined (COPROCESS_SUPPORT) + if (last_read_token == WORD && token_before_that == COPROC) + return 1; +#endif + if (last_read_token == WORD && token_before_that == FUNCTION) + return 1; + return 0; + } +} + +/* Return the index of TOKEN in the alist of reserved words, or -1 if + TOKEN is not a shell reserved word. */ +int +find_reserved_word (tokstr) + char *tokstr; +{ + int i; + for (i = 0; word_token_alist[i].word; i++) + if (STREQ (tokstr, word_token_alist[i].word)) + return i; + return -1; +} + +/* An interface to let the rest of the shell (primarily the completion + system) know what the parser is expecting. */ +int +parser_in_command_position () +{ + return (command_token_position (last_read_token)); +} + +#if 0 +#if defined (READLINE) +/* Called after each time readline is called. This insures that whatever + the new prompt string is gets propagated to readline's local prompt + variable. */ +static void +reset_readline_prompt () +{ + char *temp_prompt; + + if (prompt_string_pointer) + { + temp_prompt = (*prompt_string_pointer) + ? decode_prompt_string (*prompt_string_pointer) + : (char *)NULL; + + if (temp_prompt == 0) + { + temp_prompt = (char *)xmalloc (1); + temp_prompt[0] = '\0'; + } + + FREE (current_readline_prompt); + current_readline_prompt = temp_prompt; + } +} +#endif /* READLINE */ +#endif /* 0 */ + +#if defined (HISTORY) +/* A list of tokens which can be followed by newlines, but not by + semi-colons. When concatenating multiple lines of history, the + newline separator for such tokens is replaced with a space. */ +static const int no_semi_successors[] = { + '\n', '{', '(', ')', ';', '&', '|', + CASE, DO, ELSE, IF, SEMI_SEMI, SEMI_AND, SEMI_SEMI_AND, THEN, UNTIL, + WHILE, AND_AND, OR_OR, IN, + 0 +}; + +/* If we are not within a delimited expression, try to be smart + about which separators can be semi-colons and which must be + newlines. Returns the string that should be added into the + history entry. LINE is the line we're about to add; it helps + make some more intelligent decisions in certain cases. */ +char * +history_delimiting_chars (line) + const char *line; +{ + static int last_was_heredoc = 0; /* was the last entry the start of a here document? */ + register int i; + + if ((parser_state & PST_HEREDOC) == 0) + last_was_heredoc = 0; + + if (dstack.delimiter_depth != 0) + return ("\n"); + + /* We look for current_command_line_count == 2 because we are looking to + add the first line of the body of the here document (the second line + of the command). We also keep LAST_WAS_HEREDOC as a private sentinel + variable to note when we think we added the first line of a here doc + (the one with a "<<" somewhere in it) */ + if (parser_state & PST_HEREDOC) + { + if (last_was_heredoc) + { + last_was_heredoc = 0; + return "\n"; + } + return (here_doc_first_line ? "\n" : ""); + } + + if (parser_state & PST_COMPASSIGN) + return (" "); + + /* First, handle some special cases. */ + /*(*/ + /* If we just read `()', assume it's a function definition, and don't + add a semicolon. If the token before the `)' was not `(', and we're + not in the midst of parsing a case statement, assume it's a + parenthesized command and add the semicolon. */ + /*)(*/ + if (token_before_that == ')') + { + if (two_tokens_ago == '(') /*)*/ /* function def */ + return " "; + /* This does not work for subshells inside case statement + command lists. It's a suboptimal solution. */ + else if (parser_state & PST_CASESTMT) /* case statement pattern */ + return " "; + else + return "; "; /* (...) subshell */ + } + else if (token_before_that == WORD && two_tokens_ago == FUNCTION) + return " "; /* function def using `function name' without `()' */ + + /* If we're not in a here document, but we think we're about to parse one, + and we would otherwise return a `;', return a newline to delimit the + line with the here-doc delimiter */ + else if ((parser_state & PST_HEREDOC) == 0 && current_command_line_count > 1 && last_read_token == '\n' && strstr (line, "<<")) + { + last_was_heredoc = 1; + return "\n"; + } + else if ((parser_state & PST_HEREDOC) == 0 && current_command_line_count > 1 && need_here_doc > 0) + return "\n"; + else if (token_before_that == WORD && two_tokens_ago == FOR) + { + /* Tricky. `for i\nin ...' should not have a semicolon, but + `for i\ndo ...' should. We do what we can. */ + for (i = shell_input_line_index; whitespace (shell_input_line[i]); i++) + ; + if (shell_input_line[i] && shell_input_line[i] == 'i' && shell_input_line[i+1] == 'n') + return " "; + return ";"; + } + else if (two_tokens_ago == CASE && token_before_that == WORD && (parser_state & PST_CASESTMT)) + return " "; + + for (i = 0; no_semi_successors[i]; i++) + { + if (token_before_that == no_semi_successors[i]) + return (" "); + } + + if (line_isblank (line)) + return (""); + + return ("; "); +} +#endif /* HISTORY */ + +/* Issue a prompt, or prepare to issue a prompt when the next character + is read. */ +static void +prompt_again () +{ + char *temp_prompt; + + if (interactive == 0 || expanding_alias ()) /* XXX */ + return; + + ps1_prompt = get_string_value ("PS1"); + ps2_prompt = get_string_value ("PS2"); + + ps0_prompt = get_string_value ("PS0"); + + if (!prompt_string_pointer) + prompt_string_pointer = &ps1_prompt; + + temp_prompt = *prompt_string_pointer + ? decode_prompt_string (*prompt_string_pointer) + : (char *)NULL; + + if (temp_prompt == 0) + { + temp_prompt = (char *)xmalloc (1); + temp_prompt[0] = '\0'; + } + + current_prompt_string = *prompt_string_pointer; + prompt_string_pointer = &ps2_prompt; + +#if defined (READLINE) + if (!no_line_editing) + { + FREE (current_readline_prompt); + current_readline_prompt = temp_prompt; + } + else +#endif /* READLINE */ + { + FREE (current_decoded_prompt); + current_decoded_prompt = temp_prompt; + } +} + +int +get_current_prompt_level () +{ + return ((current_prompt_string && current_prompt_string == ps2_prompt) ? 2 : 1); +} + +void +set_current_prompt_level (x) + int x; +{ + prompt_string_pointer = (x == 2) ? &ps2_prompt : &ps1_prompt; + current_prompt_string = *prompt_string_pointer; +} + +static void +print_prompt () +{ + fprintf (stderr, "%s", current_decoded_prompt); + fflush (stderr); +} + +#if defined (HISTORY) + /* The history library increments the history offset as soon as it stores + the first line of a potentially multi-line command, so we compensate + here by returning one fewer when appropriate. */ +static int +prompt_history_number (pmt) + char *pmt; +{ + int ret; + + ret = history_number (); + if (ret == 1) + return ret; + + if (pmt == ps1_prompt) /* are we expanding $PS1? */ + return ret; + else if (pmt == ps2_prompt && command_oriented_history == 0) + return ret; /* not command oriented history */ + else if (pmt == ps2_prompt && command_oriented_history && current_command_first_line_saved) + return ret - 1; + else + return ret - 1; /* PS0, PS4, ${var@P}, PS2 other cases */ +} +#endif + +/* Return a string which will be printed as a prompt. The string + may contain special characters which are decoded as follows: + + \a bell (ascii 07) + \d the date in Day Mon Date format + \e escape (ascii 033) + \h the hostname up to the first `.' + \H the hostname + \j the number of active jobs + \l the basename of the shell's tty device name + \n CRLF + \r CR + \s the name of the shell + \t the time in 24-hour hh:mm:ss format + \T the time in 12-hour hh:mm:ss format + \@ the time in 12-hour hh:mm am/pm format + \A the time in 24-hour hh:mm format + \D{fmt} the result of passing FMT to strftime(3) + \u your username + \v the version of bash (e.g., 2.00) + \V the release of bash, version + patchlevel (e.g., 2.00.0) + \w the current working directory + \W the last element of $PWD + \! the history number of this command + \# the command number of this command + \$ a $ or a # if you are root + \nnn character code nnn in octal + \\ a backslash + \[ begin a sequence of non-printing chars + \] end a sequence of non-printing chars +*/ +#define PROMPT_GROWTH 48 +char * +decode_prompt_string (string) + char *string; +{ + WORD_LIST *list; + char *result, *t, *orig_string; + struct dstack save_dstack; + int last_exit_value, last_comsub_pid; +#if defined (PROMPT_STRING_DECODE) + size_t result_size; + int result_index; + int c, n, i; + char *temp, *t_host, octal_string[4]; + struct tm *tm; + time_t the_time; + char timebuf[128]; + char *timefmt; + + result = (char *)xmalloc (result_size = PROMPT_GROWTH); + result[result_index = 0] = 0; + temp = (char *)NULL; + orig_string = string; + + while (c = *string++) + { + if (posixly_correct && c == '!') + { + if (*string == '!') + { + temp = savestring ("!"); + goto add_string; + } + else + { +#if !defined (HISTORY) + temp = savestring ("1"); +#else /* HISTORY */ + temp = itos (prompt_history_number (orig_string)); +#endif /* HISTORY */ + string--; /* add_string increments string again. */ + goto add_string; + } + } + if (c == '\\') + { + c = *string; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + strncpy (octal_string, string, 3); + octal_string[3] = '\0'; + + n = read_octal (octal_string); + temp = (char *)xmalloc (3); + + if (n == CTLESC || n == CTLNUL) + { + temp[0] = CTLESC; + temp[1] = n; + temp[2] = '\0'; + } + else if (n == -1) + { + temp[0] = '\\'; + temp[1] = '\0'; + } + else + { + temp[0] = n; + temp[1] = '\0'; + } + + for (c = 0; n != -1 && c < 3 && ISOCTAL (*string); c++) + string++; + + c = 0; /* tested at add_string: */ + goto add_string; + + case 'd': + case 't': + case 'T': + case '@': + case 'A': + /* Make the current time/date into a string. */ + (void) time (&the_time); +#if defined (HAVE_TZSET) + sv_tz ("TZ"); /* XXX -- just make sure */ +#endif + tm = localtime (&the_time); + + if (c == 'd') + n = strftime (timebuf, sizeof (timebuf), "%a %b %d", tm); + else if (c == 't') + n = strftime (timebuf, sizeof (timebuf), "%H:%M:%S", tm); + else if (c == 'T') + n = strftime (timebuf, sizeof (timebuf), "%I:%M:%S", tm); + else if (c == '@') + n = strftime (timebuf, sizeof (timebuf), "%I:%M %p", tm); + else if (c == 'A') + n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm); + + if (n == 0) + timebuf[0] = '\0'; + else + timebuf[sizeof(timebuf) - 1] = '\0'; + + temp = savestring (timebuf); + goto add_string; + + case 'D': /* strftime format */ + if (string[1] != '{') /* } */ + goto not_escape; + + (void) time (&the_time); + tm = localtime (&the_time); + string += 2; /* skip { */ + timefmt = xmalloc (strlen (string) + 3); + for (t = timefmt; *string && *string != '}'; ) + *t++ = *string++; + *t = '\0'; + c = *string; /* tested at add_string */ + if (timefmt[0] == '\0') + { + timefmt[0] = '%'; + timefmt[1] = 'X'; /* locale-specific current time */ + timefmt[2] = '\0'; + } + n = strftime (timebuf, sizeof (timebuf), timefmt, tm); + free (timefmt); + + if (n == 0) + timebuf[0] = '\0'; + else + timebuf[sizeof(timebuf) - 1] = '\0'; + + if (promptvars || posixly_correct) + /* Make sure that expand_prompt_string is called with a + second argument of Q_DOUBLE_QUOTES if we use this + function here. */ + temp = sh_backslash_quote_for_double_quotes (timebuf); + else + temp = savestring (timebuf); + goto add_string; + + case 'n': + temp = (char *)xmalloc (3); + temp[0] = no_line_editing ? '\n' : '\r'; + temp[1] = no_line_editing ? '\0' : '\n'; + temp[2] = '\0'; + goto add_string; + + case 's': + temp = base_pathname (shell_name); + /* Try to quote anything the user can set in the file system */ + if (promptvars || posixly_correct) + temp = sh_backslash_quote_for_double_quotes (temp); + else + temp = savestring (temp); + goto add_string; + + case 'v': + case 'V': + temp = (char *)xmalloc (16); + if (c == 'v') + strcpy (temp, dist_version); + else + sprintf (temp, "%s.%d", dist_version, patch_level); + goto add_string; + + case 'w': + case 'W': + { + /* Use the value of PWD because it is much more efficient. */ + char t_string[PATH_MAX]; + int tlen; + + temp = get_string_value ("PWD"); + + if (temp == 0) + { + if (getcwd (t_string, sizeof(t_string)) == 0) + { + t_string[0] = '.'; + tlen = 1; + } + else + tlen = strlen (t_string); + } + else + { + tlen = sizeof (t_string) - 1; + strncpy (t_string, temp, tlen); + } + t_string[tlen] = '\0'; + +#if defined (MACOSX) + /* Convert from "fs" format to "input" format */ + temp = fnx_fromfs (t_string, strlen (t_string)); + if (temp != t_string) + strcpy (t_string, temp); +#endif + +#define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0) +#define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0) + /* Abbreviate \W as ~ if $PWD == $HOME */ + if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0)) + { + if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0) + { + t = strrchr (t_string, '/'); + if (t) + memmove (t_string, t + 1, strlen (t)); /* strlen(t) to copy NULL */ + } + } +#undef ROOT_PATH +#undef DOUBLE_SLASH_ROOT + else + { + /* polite_directory_format is guaranteed to return a string + no longer than PATH_MAX - 1 characters. */ + temp = polite_directory_format (t_string); + if (temp != t_string) + strcpy (t_string, temp); + } + + temp = trim_pathname (t_string, PATH_MAX - 1); + /* If we're going to be expanding the prompt string later, + quote the directory name. */ + if (promptvars || posixly_correct) + /* Make sure that expand_prompt_string is called with a + second argument of Q_DOUBLE_QUOTES if we use this + function here. */ + temp = sh_backslash_quote_for_double_quotes (t_string); + else + temp = savestring (t_string); + + goto add_string; + } + + case 'u': + if (current_user.user_name == 0) + get_current_user_info (); + temp = savestring (current_user.user_name); + goto add_string; + + case 'h': + case 'H': + t_host = savestring (current_host_name); + if (c == 'h' && (t = (char *)strchr (t_host, '.'))) + *t = '\0'; + if (promptvars || posixly_correct) + /* Make sure that expand_prompt_string is called with a + second argument of Q_DOUBLE_QUOTES if we use this + function here. */ + temp = sh_backslash_quote_for_double_quotes (t_host); + else + temp = savestring (t_host); + free (t_host); + goto add_string; + + case '#': + n = current_command_number; + /* If we have already incremented current_command_number (PS4, + ${var@P}), compensate */ + if (orig_string != ps0_prompt && orig_string != ps1_prompt && orig_string != ps2_prompt) + n--; + temp = itos (n); + goto add_string; + + case '!': +#if !defined (HISTORY) + temp = savestring ("1"); +#else /* HISTORY */ + temp = itos (prompt_history_number (orig_string)); +#endif /* HISTORY */ + goto add_string; + + case '$': + t = temp = (char *)xmalloc (3); + if ((promptvars || posixly_correct) && (current_user.euid != 0)) + *t++ = '\\'; + *t++ = current_user.euid == 0 ? '#' : '$'; + *t = '\0'; + goto add_string; + + case 'j': + temp = itos (count_all_jobs ()); + goto add_string; + + case 'l': +#if defined (HAVE_TTYNAME) + temp = (char *)ttyname (fileno (stdin)); + t = temp ? base_pathname (temp) : "tty"; + temp = savestring (t); +#else + temp = savestring ("tty"); +#endif /* !HAVE_TTYNAME */ + goto add_string; + +#if defined (READLINE) + case '[': + case ']': + if (no_line_editing) + { + string++; + break; + } + temp = (char *)xmalloc (3); + n = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE; + i = 0; + if (n == CTLESC || n == CTLNUL) + temp[i++] = CTLESC; + temp[i++] = n; + temp[i] = '\0'; + goto add_string; +#endif /* READLINE */ + + case '\\': + case 'a': + case 'e': + case 'r': + temp = (char *)xmalloc (2); + if (c == 'a') + temp[0] = '\07'; + else if (c == 'e') + temp[0] = '\033'; + else if (c == 'r') + temp[0] = '\r'; + else /* (c == '\\') */ + temp[0] = c; + temp[1] = '\0'; + goto add_string; + + default: +not_escape: + temp = (char *)xmalloc (3); + temp[0] = '\\'; + temp[1] = c; + temp[2] = '\0'; + + add_string: + if (c) + string++; + result = + sub_append_string (temp, result, &result_index, &result_size); + temp = (char *)NULL; /* Freed in sub_append_string (). */ + result[result_index] = '\0'; + break; + } + } + else + { + RESIZE_MALLOCED_BUFFER (result, result_index, 3, result_size, PROMPT_GROWTH); + /* dequote_string should take care of removing this if we are not + performing the rest of the word expansions. */ + if (c == CTLESC || c == CTLNUL) + result[result_index++] = CTLESC; + result[result_index++] = c; + result[result_index] = '\0'; + } + } +#else /* !PROMPT_STRING_DECODE */ + result = savestring (string); +#endif /* !PROMPT_STRING_DECODE */ + + /* Save the delimiter stack and point `dstack' to temp space so any + command substitutions in the prompt string won't result in screwing + up the parser's quoting state. */ + save_dstack = dstack; + dstack = temp_dstack; + dstack.delimiter_depth = 0; + + /* Perform variable and parameter expansion and command substitution on + the prompt string. */ + if (promptvars || posixly_correct) + { + last_exit_value = last_command_exit_value; + last_comsub_pid = last_command_subst_pid; + list = expand_prompt_string (result, Q_DOUBLE_QUOTES, 0); + free (result); + result = string_list (list); + dispose_words (list); + last_command_exit_value = last_exit_value; + last_command_subst_pid = last_comsub_pid; + } + else + { + t = dequote_string (result); + free (result); + result = t; + } + + dstack = save_dstack; + + return (result); +} + +/************************************************ + * * + * ERROR HANDLING * + * * + ************************************************/ + +/* Report a syntax error, and restart the parser. Call here for fatal + errors. */ +int +yyerror (msg) + const char *msg; +{ + report_syntax_error ((char *)NULL); + reset_parser (); + return (0); +} + +static char * +error_token_from_token (tok) + int tok; +{ + char *t; + + if (t = find_token_in_alist (tok, word_token_alist, 0)) + return t; + + if (t = find_token_in_alist (tok, other_token_alist, 0)) + return t; + + t = (char *)NULL; + /* This stuff is dicy and needs closer inspection */ + switch (current_token) + { + case WORD: + case ASSIGNMENT_WORD: + if (yylval.word) + t = savestring (yylval.word->word); + break; + case NUMBER: + t = itos (yylval.number); + break; + case ARITH_CMD: + if (yylval.word_list) + t = string_list (yylval.word_list); + break; + case ARITH_FOR_EXPRS: + if (yylval.word_list) + t = string_list_internal (yylval.word_list, " ; "); + break; + case COND_CMD: + t = (char *)NULL; /* punt */ + break; + } + + return t; +} + +static char * +error_token_from_text () +{ + char *msg, *t; + int token_end, i; + + t = shell_input_line; + i = shell_input_line_index; + token_end = 0; + msg = (char *)NULL; + + if (i && t[i] == '\0') + i--; + + while (i && (whitespace (t[i]) || t[i] == '\n')) + i--; + + if (i) + token_end = i + 1; + + while (i && (member (t[i], " \n\t;|&") == 0)) + i--; + + while (i != token_end && (whitespace (t[i]) || t[i] == '\n')) + i++; + + /* Return our idea of the offending token. */ + if (token_end || (i == 0 && token_end == 0)) + { + if (token_end) + msg = substring (t, i, token_end); + else /* one-character token */ + { + msg = (char *)xmalloc (2); + msg[0] = t[i]; + msg[1] = '\0'; + } + } + + return (msg); +} + +static void +print_offending_line () +{ + char *msg; + int token_end; + + msg = savestring (shell_input_line); + token_end = strlen (msg); + while (token_end && msg[token_end - 1] == '\n') + msg[--token_end] = '\0'; + + parser_error (line_number, "`%s'", msg); + free (msg); +} + +/* Report a syntax error with line numbers, etc. + Call here for recoverable errors. If you have a message to print, + then place it in MESSAGE, otherwise pass NULL and this will figure + out an appropriate message for you. */ +static void +report_syntax_error (message) + char *message; +{ + char *msg, *p; + + if (message) + { + parser_error (line_number, "%s", message); + if (interactive && EOF_Reached) + EOF_Reached = 0; + last_command_exit_value = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); + return; + } + + /* If the line of input we're reading is not null, try to find the + objectionable token. First, try to figure out what token the + parser's complaining about by looking at current_token. */ + if (current_token != 0 && EOF_Reached == 0 && (msg = error_token_from_token (current_token))) + { + if (ansic_shouldquote (msg)) + { + p = ansic_quote (msg, 0, NULL); + free (msg); + msg = p; + } + parser_error (line_number, _("syntax error near unexpected token `%s'"), msg); + free (msg); + + if (interactive == 0) + print_offending_line (); + + last_command_exit_value = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); + return; + } + + /* If looking at the current token doesn't prove fruitful, try to find the + offending token by analyzing the text of the input line near the current + input line index and report what we find. */ + if (shell_input_line && *shell_input_line) + { + msg = error_token_from_text (); + if (msg) + { + parser_error (line_number, _("syntax error near `%s'"), msg); + free (msg); + } + + /* If not interactive, print the line containing the error. */ + if (interactive == 0) + print_offending_line (); + } + else + { + msg = EOF_Reached ? _("syntax error: unexpected end of file") : _("syntax error"); + parser_error (line_number, "%s", msg); + /* When the shell is interactive, this file uses EOF_Reached + only for error reporting. Other mechanisms are used to + decide whether or not to exit. */ + if (interactive && EOF_Reached) + EOF_Reached = 0; + } + + last_command_exit_value = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); +} + +/* ??? Needed function. ??? We have to be able to discard the constructs + created during parsing. In the case of error, we want to return + allocated objects to the memory pool. In the case of no error, we want + to throw away the information about where the allocated objects live. + (dispose_command () will actually free the command.) */ +static void +discard_parser_constructs (error_p) + int error_p; +{ +} + +/************************************************ + * * + * EOF HANDLING * + * * + ************************************************/ + +/* Do that silly `type "bye" to exit' stuff. You know, "ignoreeof". */ + +/* A flag denoting whether or not ignoreeof is set. */ +int ignoreeof = 0; + +/* The number of times that we have encountered an EOF character without + another character intervening. When this gets above the limit, the + shell terminates. */ +int eof_encountered = 0; + +/* The limit for eof_encountered. */ +int eof_encountered_limit = 10; + +/* If we have EOF as the only input unit, this user wants to leave + the shell. If the shell is not interactive, then just leave. + Otherwise, if ignoreeof is set, and we haven't done this the + required number of times in a row, print a message. */ +static void +handle_eof_input_unit () +{ + if (interactive) + { + /* shell.c may use this to decide whether or not to write out the + history, among other things. We use it only for error reporting + in this file. */ + if (EOF_Reached) + EOF_Reached = 0; + + /* If the user wants to "ignore" eof, then let her do so, kind of. */ + if (ignoreeof) + { + if (eof_encountered < eof_encountered_limit) + { + fprintf (stderr, _("Use \"%s\" to leave the shell.\n"), + login_shell ? "logout" : "exit"); + eof_encountered++; + /* Reset the parsing state. */ + last_read_token = current_token = '\n'; + /* Reset the prompt string to be $PS1. */ + prompt_string_pointer = (char **)NULL; + prompt_again (); + return; + } + } + + /* In this case EOF should exit the shell. Do it now. */ + reset_parser (); + + last_shell_builtin = this_shell_builtin; + this_shell_builtin = exit_builtin; + exit_builtin ((WORD_LIST *)NULL); + } + else + { + /* We don't write history files, etc., for non-interactive shells. */ + EOF_Reached = 1; + } +} + +/************************************************ + * * + * STRING PARSING FUNCTIONS * + * * + ************************************************/ + +/* It's very important that these two functions treat the characters + between ( and ) identically. */ + +static WORD_LIST parse_string_error; + +/* Take a string and run it through the shell parser, returning the + resultant word list. Used by compound array assignment. */ +WORD_LIST * +parse_string_to_word_list (s, flags, whom) + char *s; + int flags; + const char *whom; +{ + WORD_LIST *wl; + int tok, orig_current_token, orig_line_number, orig_input_terminator; + int orig_line_count; + int old_echo_input, old_expand_aliases, ea; +#if defined (HISTORY) + int old_remember_on_history, old_history_expansion_inhibited; +#endif + +#if defined (HISTORY) + old_remember_on_history = remember_on_history; +# if defined (BANG_HISTORY) + old_history_expansion_inhibited = history_expansion_inhibited; +# endif + bash_history_disable (); +#endif + + orig_line_number = line_number; + orig_line_count = current_command_line_count; + orig_input_terminator = shell_input_line_terminator; + old_echo_input = echo_input_at_read; + old_expand_aliases = expand_aliases; + + push_stream (1); +#if 0 /* TAG: bash-5.2 Alex fxmbsw7 Ratchev 11/17/2020 */ + if (ea = expanding_alias ()) + parser_save_alias (); +#endif + last_read_token = WORD; /* WORD to allow reserved words here */ + current_command_line_count = 0; + echo_input_at_read = expand_aliases = 0; + + with_input_from_string (s, whom); + wl = (WORD_LIST *)NULL; + + if (flags & 1) + parser_state |= PST_COMPASSIGN|PST_REPARSE; + + while ((tok = read_token (READ)) != yacc_EOF) + { + if (tok == '\n' && *bash_input.location.string == '\0') + break; + if (tok == '\n') /* Allow newlines in compound assignments */ + continue; + if (tok != WORD && tok != ASSIGNMENT_WORD) + { + line_number = orig_line_number + line_number - 1; + orig_current_token = current_token; + current_token = tok; + yyerror (NULL); /* does the right thing */ + current_token = orig_current_token; + if (wl) + dispose_words (wl); + wl = &parse_string_error; + break; + } + wl = make_word_list (yylval.word, wl); + } + + last_read_token = '\n'; + pop_stream (); + +#if 0 /* TAG: bash-5.2 */ + if (ea) + parser_restore_alias (); +#endif + +#if defined (HISTORY) + remember_on_history = old_remember_on_history; +# if defined (BANG_HISTORY) + history_expansion_inhibited = old_history_expansion_inhibited; +# endif /* BANG_HISTORY */ +#endif /* HISTORY */ + + echo_input_at_read = old_echo_input; + expand_aliases = old_expand_aliases; + + current_command_line_count = orig_line_count; + shell_input_line_terminator = orig_input_terminator; + + if (flags & 1) + parser_state &= ~(PST_COMPASSIGN|PST_REPARSE); + + if (wl == &parse_string_error) + { + set_exit_status (EXECUTION_FAILURE); + if (interactive_shell == 0 && posixly_correct) + jump_to_top_level (FORCE_EOF); + else + jump_to_top_level (DISCARD); + } + + return (REVERSE_LIST (wl, WORD_LIST *)); +} + +static char * +parse_compound_assignment (retlenp) + int *retlenp; +{ + WORD_LIST *wl, *rl; + int tok, orig_line_number, orig_token_size, orig_last_token, assignok; + char *saved_token, *ret; + + saved_token = token; + orig_token_size = token_buffer_size; + orig_line_number = line_number; + orig_last_token = last_read_token; + + last_read_token = WORD; /* WORD to allow reserved words here */ + + token = (char *)NULL; + token_buffer_size = 0; + + assignok = parser_state&PST_ASSIGNOK; /* XXX */ + + wl = (WORD_LIST *)NULL; /* ( */ + parser_state |= PST_COMPASSIGN; + + while ((tok = read_token (READ)) != ')') + { + if (tok == '\n') /* Allow newlines in compound assignments */ + { + if (SHOULD_PROMPT ()) + prompt_again (); + continue; + } + if (tok != WORD && tok != ASSIGNMENT_WORD) + { + current_token = tok; /* for error reporting */ + if (tok == yacc_EOF) /* ( */ + parser_error (orig_line_number, _("unexpected EOF while looking for matching `)'")); + else + yyerror(NULL); /* does the right thing */ + if (wl) + dispose_words (wl); + wl = &parse_string_error; + break; + } + wl = make_word_list (yylval.word, wl); + } + + FREE (token); + token = saved_token; + token_buffer_size = orig_token_size; + + parser_state &= ~PST_COMPASSIGN; + + if (wl == &parse_string_error) + { + set_exit_status (EXECUTION_FAILURE); + last_read_token = '\n'; /* XXX */ + if (interactive_shell == 0 && posixly_correct) + jump_to_top_level (FORCE_EOF); + else + jump_to_top_level (DISCARD); + } + + last_read_token = orig_last_token; /* XXX - was WORD? */ + + if (wl) + { + rl = REVERSE_LIST (wl, WORD_LIST *); + ret = string_list (rl); + dispose_words (rl); + } + else + ret = (char *)NULL; + + if (retlenp) + *retlenp = (ret && *ret) ? strlen (ret) : 0; + + if (assignok) + parser_state |= PST_ASSIGNOK; + + return ret; +} + +/************************************************ + * * + * SAVING AND RESTORING PARTIAL PARSE STATE * + * * + ************************************************/ + +sh_parser_state_t * +save_parser_state (ps) + sh_parser_state_t *ps; +{ + if (ps == 0) + ps = (sh_parser_state_t *)xmalloc (sizeof (sh_parser_state_t)); + if (ps == 0) + return ((sh_parser_state_t *)NULL); + + ps->parser_state = parser_state; + ps->token_state = save_token_state (); + + ps->input_line_terminator = shell_input_line_terminator; + ps->eof_encountered = eof_encountered; + + ps->prompt_string_pointer = prompt_string_pointer; + + ps->current_command_line_count = current_command_line_count; + +#if defined (HISTORY) + ps->remember_on_history = remember_on_history; +# if defined (BANG_HISTORY) + ps->history_expansion_inhibited = history_expansion_inhibited; +# endif +#endif + + ps->last_command_exit_value = last_command_exit_value; +#if defined (ARRAY_VARS) + ps->pipestatus = save_pipestatus_array (); +#endif + + ps->last_shell_builtin = last_shell_builtin; + ps->this_shell_builtin = this_shell_builtin; + + ps->expand_aliases = expand_aliases; + ps->echo_input_at_read = echo_input_at_read; + ps->need_here_doc = need_here_doc; + ps->here_doc_first_line = here_doc_first_line; + + if (need_here_doc == 0) + ps->redir_stack[0] = 0; + else + memcpy (ps->redir_stack, redir_stack, sizeof (redir_stack[0]) * HEREDOC_MAX); + + ps->token = token; + ps->token_buffer_size = token_buffer_size; + /* Force reallocation on next call to read_token_word */ + token = 0; + token_buffer_size = 0; + + return (ps); +} + +void +restore_parser_state (ps) + sh_parser_state_t *ps; +{ + int i; + + if (ps == 0) + return; + + parser_state = ps->parser_state; + if (ps->token_state) + { + restore_token_state (ps->token_state); + free (ps->token_state); + } + + shell_input_line_terminator = ps->input_line_terminator; + eof_encountered = ps->eof_encountered; + + prompt_string_pointer = ps->prompt_string_pointer; + + current_command_line_count = ps->current_command_line_count; + +#if defined (HISTORY) + remember_on_history = ps->remember_on_history; +# if defined (BANG_HISTORY) + history_expansion_inhibited = ps->history_expansion_inhibited; +# endif +#endif + + last_command_exit_value = ps->last_command_exit_value; +#if defined (ARRAY_VARS) + restore_pipestatus_array (ps->pipestatus); +#endif + + last_shell_builtin = ps->last_shell_builtin; + this_shell_builtin = ps->this_shell_builtin; + + expand_aliases = ps->expand_aliases; + echo_input_at_read = ps->echo_input_at_read; + need_here_doc = ps->need_here_doc; + here_doc_first_line = ps->here_doc_first_line; + +#if 0 + for (i = 0; i < HEREDOC_MAX; i++) + redir_stack[i] = ps->redir_stack[i]; +#else + if (need_here_doc == 0) + redir_stack[0] = 0; + else + memcpy (redir_stack, ps->redir_stack, sizeof (redir_stack[0]) * HEREDOC_MAX); +#endif + + FREE (token); + token = ps->token; + token_buffer_size = ps->token_buffer_size; +} + +sh_input_line_state_t * +save_input_line_state (ls) + sh_input_line_state_t *ls; +{ + if (ls == 0) + ls = (sh_input_line_state_t *)xmalloc (sizeof (sh_input_line_state_t)); + if (ls == 0) + return ((sh_input_line_state_t *)NULL); + + ls->input_line = shell_input_line; + ls->input_line_size = shell_input_line_size; + ls->input_line_len = shell_input_line_len; + ls->input_line_index = shell_input_line_index; + +#if defined (HANDLE_MULTIBYTE) + ls->input_property = shell_input_line_property; + ls->input_propsize = shell_input_line_propsize; +#endif + + /* force reallocation */ + shell_input_line = 0; + shell_input_line_size = shell_input_line_len = shell_input_line_index = 0; + +#if defined (HANDLE_MULTIBYTE) + shell_input_line_property = 0; + shell_input_line_propsize = 0; +#endif + + return ls; +} + +void +restore_input_line_state (ls) + sh_input_line_state_t *ls; +{ + FREE (shell_input_line); + shell_input_line = ls->input_line; + shell_input_line_size = ls->input_line_size; + shell_input_line_len = ls->input_line_len; + shell_input_line_index = ls->input_line_index; + +#if defined (HANDLE_MULTIBYTE) + FREE (shell_input_line_property); + shell_input_line_property = ls->input_property; + shell_input_line_propsize = ls->input_propsize; +#endif + +#if 0 + set_line_mbstate (); +#endif +} + +/************************************************ + * * + * MULTIBYTE CHARACTER HANDLING * + * * + ************************************************/ + +#if defined (HANDLE_MULTIBYTE) + +/* We don't let the property buffer get larger than this unless the line is */ +#define MAX_PROPSIZE 32768 + +static void +set_line_mbstate () +{ + int c; + size_t i, previ, len; + mbstate_t mbs, prevs; + size_t mbclen; + int ilen; + + if (shell_input_line == NULL) + return; + len = STRLEN (shell_input_line); /* XXX - shell_input_line_len ? */ + if (len == 0) + return; + if (shell_input_line_propsize >= MAX_PROPSIZE && len < MAX_PROPSIZE>>1) + { + free (shell_input_line_property); + shell_input_line_property = 0; + shell_input_line_propsize = 0; + } + if (len+1 > shell_input_line_propsize) + { + shell_input_line_propsize = len + 1; + shell_input_line_property = (char *)xrealloc (shell_input_line_property, shell_input_line_propsize); + } + + if (locale_mb_cur_max == 1) + { + memset (shell_input_line_property, 1, len); + return; + } + + /* XXX - use whether or not we are in a UTF-8 locale to avoid calls to + mbrlen */ + if (locale_utf8locale == 0) + memset (&prevs, '\0', sizeof (mbstate_t)); + + for (i = previ = 0; i < len; i++) + { + if (locale_utf8locale == 0) + mbs = prevs; + + c = shell_input_line[i]; + if (c == EOF) + { + size_t j; + for (j = i; j < len; j++) + shell_input_line_property[j] = 1; + break; + } + + if (locale_utf8locale) + { + if ((unsigned char)shell_input_line[previ] < 128) /* i != previ */ + mbclen = 1; + else + { + ilen = utf8_mblen (shell_input_line + previ, i - previ + 1); + mbclen = (ilen == -1) ? (size_t)-1 + : ((ilen == -2) ? (size_t)-2 : (size_t)ilen); + } + } + else + mbclen = mbrlen (shell_input_line + previ, i - previ + 1, &mbs); + + if (mbclen == 1 || mbclen == (size_t)-1) + { + mbclen = 1; + previ = i + 1; + } + else if (mbclen == (size_t)-2) + mbclen = 0; + else if (mbclen > 1) + { + mbclen = 0; + previ = i + 1; + if (locale_utf8locale == 0) + prevs = mbs; + } + else + { + size_t j; + for (j = i; j < len; j++) + shell_input_line_property[j] = 1; + break; + } + + shell_input_line_property[i] = mbclen; + } +} +#endif /* HANDLE_MULTIBYTE */ diff --git a/bash-5.1/parser-built b/bash-5.1/parser-built new file mode 100644 index 0000000000000000000000000000000000000000..41bdea08ec7af4e45a161da01014dcd872e92a64 --- /dev/null +++ b/bash-5.1/parser-built @@ -0,0 +1,186 @@ +/* A Bison parser, made by GNU Bison 3.6.4. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Inc. + + 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 . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + +#ifndef YY_YY_Y_TAB_H_INCLUDED +# define YY_YY_Y_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token kinds. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + IF = 258, /* IF */ + THEN = 259, /* THEN */ + ELSE = 260, /* ELSE */ + ELIF = 261, /* ELIF */ + FI = 262, /* FI */ + CASE = 263, /* CASE */ + ESAC = 264, /* ESAC */ + FOR = 265, /* FOR */ + SELECT = 266, /* SELECT */ + WHILE = 267, /* WHILE */ + UNTIL = 268, /* UNTIL */ + DO = 269, /* DO */ + DONE = 270, /* DONE */ + FUNCTION = 271, /* FUNCTION */ + COPROC = 272, /* COPROC */ + COND_START = 273, /* COND_START */ + COND_END = 274, /* COND_END */ + COND_ERROR = 275, /* COND_ERROR */ + IN = 276, /* IN */ + BANG = 277, /* BANG */ + TIME = 278, /* TIME */ + TIMEOPT = 279, /* TIMEOPT */ + TIMEIGN = 280, /* TIMEIGN */ + WORD = 281, /* WORD */ + ASSIGNMENT_WORD = 282, /* ASSIGNMENT_WORD */ + REDIR_WORD = 283, /* REDIR_WORD */ + NUMBER = 284, /* NUMBER */ + ARITH_CMD = 285, /* ARITH_CMD */ + ARITH_FOR_EXPRS = 286, /* ARITH_FOR_EXPRS */ + COND_CMD = 287, /* COND_CMD */ + AND_AND = 288, /* AND_AND */ + OR_OR = 289, /* OR_OR */ + GREATER_GREATER = 290, /* GREATER_GREATER */ + LESS_LESS = 291, /* LESS_LESS */ + LESS_AND = 292, /* LESS_AND */ + LESS_LESS_LESS = 293, /* LESS_LESS_LESS */ + GREATER_AND = 294, /* GREATER_AND */ + SEMI_SEMI = 295, /* SEMI_SEMI */ + SEMI_AND = 296, /* SEMI_AND */ + SEMI_SEMI_AND = 297, /* SEMI_SEMI_AND */ + LESS_LESS_MINUS = 298, /* LESS_LESS_MINUS */ + AND_GREATER = 299, /* AND_GREATER */ + AND_GREATER_GREATER = 300, /* AND_GREATER_GREATER */ + LESS_GREATER = 301, /* LESS_GREATER */ + GREATER_BAR = 302, /* GREATER_BAR */ + BAR_AND = 303, /* BAR_AND */ + yacc_EOF = 304 /* yacc_EOF */ + }; + typedef enum yytokentype yytoken_kind_t; +#endif +/* Token kinds. */ +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 +#define IF 258 +#define THEN 259 +#define ELSE 260 +#define ELIF 261 +#define FI 262 +#define CASE 263 +#define ESAC 264 +#define FOR 265 +#define SELECT 266 +#define WHILE 267 +#define UNTIL 268 +#define DO 269 +#define DONE 270 +#define FUNCTION 271 +#define COPROC 272 +#define COND_START 273 +#define COND_END 274 +#define COND_ERROR 275 +#define IN 276 +#define BANG 277 +#define TIME 278 +#define TIMEOPT 279 +#define TIMEIGN 280 +#define WORD 281 +#define ASSIGNMENT_WORD 282 +#define REDIR_WORD 283 +#define NUMBER 284 +#define ARITH_CMD 285 +#define ARITH_FOR_EXPRS 286 +#define COND_CMD 287 +#define AND_AND 288 +#define OR_OR 289 +#define GREATER_GREATER 290 +#define LESS_LESS 291 +#define LESS_AND 292 +#define LESS_LESS_LESS 293 +#define GREATER_AND 294 +#define SEMI_SEMI 295 +#define SEMI_AND 296 +#define SEMI_SEMI_AND 297 +#define LESS_LESS_MINUS 298 +#define AND_GREATER 299 +#define AND_GREATER_GREATER 300 +#define LESS_GREATER 301 +#define GREATER_BAR 302 +#define BAR_AND 303 +#define yacc_EOF 304 + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +union YYSTYPE +{ +#line 328 "/Users/chet/src/bash/src/parse.y" + + WORD_DESC *word; /* the word that we read. */ + int number; /* the number that we read. */ + WORD_LIST *word_list; + COMMAND *command; + REDIRECT *redirect; + ELEMENT element; + PATTERN_LIST *pattern; + +#line 174 "y.tab.h" + +}; +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; + +int yyparse (void); + +#endif /* !YY_YY_Y_TAB_H_INCLUDED */ diff --git a/bash-5.1/parser.h b/bash-5.1/parser.h new file mode 100644 index 0000000000000000000000000000000000000000..59bddacaf6405553a6ea00611bea7e00db411ec7 --- /dev/null +++ b/bash-5.1/parser.h @@ -0,0 +1,100 @@ +/* parser.h -- Everything you wanted to know about the parser, but were + afraid to ask. */ + +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_PARSER_H_) +# define _PARSER_H_ + +# include "command.h" +# include "input.h" + +/* Possible states for the parser that require it to do special things. */ +#define PST_CASEPAT 0x000001 /* in a case pattern list */ +#define PST_ALEXPNEXT 0x000002 /* expand next word for aliases */ +#define PST_ALLOWOPNBRC 0x000004 /* allow open brace for function def */ +#define PST_NEEDCLOSBRC 0x000008 /* need close brace */ +#define PST_DBLPAREN 0x000010 /* double-paren parsing */ +#define PST_SUBSHELL 0x000020 /* ( ... ) subshell */ +#define PST_CMDSUBST 0x000040 /* $( ... ) command substitution */ +#define PST_CASESTMT 0x000080 /* parsing a case statement */ +#define PST_CONDCMD 0x000100 /* parsing a [[...]] command */ +#define PST_CONDEXPR 0x000200 /* parsing the guts of [[...]] */ +#define PST_ARITHFOR 0x000400 /* parsing an arithmetic for command - unused */ +#define PST_ALEXPAND 0x000800 /* OK to expand aliases - unused */ +#define PST_EXTPAT 0x001000 /* parsing an extended shell pattern */ +#define PST_COMPASSIGN 0x002000 /* parsing x=(...) compound assignment */ +#define PST_ASSIGNOK 0x004000 /* assignment statement ok in this context */ +#define PST_EOFTOKEN 0x008000 /* yylex checks against shell_eof_token */ +#define PST_REGEXP 0x010000 /* parsing an ERE/BRE as a single word */ +#define PST_HEREDOC 0x020000 /* reading body of here-document */ +#define PST_REPARSE 0x040000 /* re-parsing in parse_string_to_word_list */ +#define PST_REDIRLIST 0x080000 /* parsing a list of redirections preceding a simple command name */ +#define PST_COMMENT 0x100000 /* parsing a shell comment; used by aliases */ +#define PST_ENDALIAS 0x200000 /* just finished expanding and consuming an alias */ + +/* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */ +struct dstack { +/* DELIMITERS is a stack of the nested delimiters that we have + encountered so far. */ + char *delimiters; + +/* Offset into the stack of delimiters. */ + int delimiter_depth; + +/* How many slots are allocated to DELIMITERS. */ + int delimiter_space; +}; + +/* States we can be in while scanning a ${...} expansion. Shared between + parse.y and subst.c */ +#define DOLBRACE_PARAM 0x01 +#define DOLBRACE_OP 0x02 +#define DOLBRACE_WORD 0x04 + +#define DOLBRACE_QUOTE 0x40 /* single quote is special in double quotes */ +#define DOLBRACE_QUOTE2 0x80 /* single quote is semi-special in double quotes */ + +/* variable declarations from parse.y */ +extern struct dstack dstack; + +extern char *primary_prompt; +extern char *secondary_prompt; + +extern char *current_prompt_string; + +extern char *ps1_prompt; +extern char *ps2_prompt; +extern char *ps0_prompt; + +extern int expand_aliases; +extern int current_command_line_count; +extern int saved_command_line_count; +extern int shell_eof_token; +extern int current_token; +extern int parser_state; +extern int need_here_doc; + +extern int ignoreeof; +extern int eof_encountered; +extern int eof_encountered_limit; + +extern int line_number, line_number_base; + +#endif /* _PARSER_H_ */ diff --git a/bash-5.1/patchlevel.h b/bash-5.1/patchlevel.h new file mode 100644 index 0000000000000000000000000000000000000000..e1429c245ffb845f2c7ae586bc54b86f5af9d038 --- /dev/null +++ b/bash-5.1/patchlevel.h @@ -0,0 +1,30 @@ +/* patchlevel.h -- current bash patch level */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_PATCHLEVEL_H_) +#define _PATCHLEVEL_H_ + +/* It's important that there be no other strings in this file that match the + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +#define PATCHLEVEL 4 + +#endif /* _PATCHLEVEL_H_ */ diff --git a/bash-5.1/pathexp.c b/bash-5.1/pathexp.c new file mode 100644 index 0000000000000000000000000000000000000000..6e7ef283d8960419c056724e840c87891ea5e41d --- /dev/null +++ b/bash-5.1/pathexp.c @@ -0,0 +1,690 @@ +/* pathexp.c -- The shell interface to the globbing library. */ + +/* Copyright (C) 1995-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" + +#include "shell.h" +#include "pathexp.h" +#include "flags.h" + +#include "shmbutil.h" +#include "bashintl.h" + +#include + +static int glob_name_is_acceptable PARAMS((const char *)); +static void ignore_globbed_names PARAMS((char **, sh_ignore_func_t *)); +static char *split_ignorespec PARAMS((char *, int *)); + +#if defined (USE_POSIX_GLOB_LIBRARY) +# include +typedef int posix_glob_errfunc_t PARAMS((const char *, int)); +#else +# include +#endif + +/* Control whether * matches .files in globbing. */ +int glob_dot_filenames; + +/* Control whether the extended globbing features are enabled. */ +int extended_glob = EXTGLOB_DEFAULT; + +/* Control enabling special handling of `**' */ +int glob_star = 0; + +/* Return nonzero if STRING has any unquoted special globbing chars in it. + This is supposed to be called when pathname expansion is performed, so + it implements the rules in Posix 2.13.3, specifically that an unquoted + slash cannot appear in a bracket expression. */ +int +unquoted_glob_pattern_p (string) + register char *string; +{ + register int c; + char *send; + int open, bsquote; + + DECLARE_MBSTATE; + + open = bsquote = 0; + send = string + strlen (string); + + while (c = *string++) + { + switch (c) + { + case '?': + case '*': + return (1); + + case '[': + open++; + continue; + + case ']': + if (open) /* XXX - if --open == 0? */ + return (1); + continue; + + case '/': + if (open) + open = 0; + + case '+': + case '@': + case '!': + if (*string == '(') /*)*/ + return (1); + continue; + + /* A pattern can't end with a backslash, but a backslash in the pattern + can be special to the matching engine, so we note it in case we + need it later. */ + case '\\': + if (*string != '\0' && *string != '/') + { + bsquote = 1; + string++; + continue; + } + else if (open && *string == '/') + { + string++; /* quoted slashes in bracket expressions are ok */ + continue; + } + else if (*string == 0) + return (0); + + case CTLESC: + if (*string++ == '\0') + return (0); + } + + /* Advance one fewer byte than an entire multibyte character to + account for the auto-increment in the loop above. */ +#ifdef HANDLE_MULTIBYTE + string--; + ADVANCE_CHAR_P (string, send - string); + string++; +#else + ADVANCE_CHAR_P (string, send - string); +#endif + } + +#if 0 + return (bsquote ? 2 : 0); +#else + return (0); +#endif +} + +/* Return 1 if C is a character that is `special' in a POSIX ERE and needs to + be quoted to match itself. */ +static inline int +ere_char (c) + int c; +{ + switch (c) + { + case '.': + case '[': + case '\\': + case '(': + case ')': + case '*': + case '+': + case '?': + case '{': + case '|': + case '^': + case '$': + return 1; + default: + return 0; + } + return (0); +} + +int +glob_char_p (s) + const char *s; +{ + switch (*s) + { + case '*': + case '[': + case ']': + case '?': + case '\\': + return 1; + case '+': + case '@': + case '!': + if (s[1] == '(') /*(*/ + return 1; + break; + } + return 0; +} + +/* PATHNAME can contain characters prefixed by CTLESC; this indicates + that the character is to be quoted. We quote it here in the style + that the glob library recognizes. If flags includes QGLOB_CVTNULL, + we change quoted null strings (pathname[0] == CTLNUL) into empty + strings (pathname[0] == 0). If this is called after quote removal + is performed, (flags & QGLOB_CVTNULL) should be 0; if called when quote + removal has not been done (for example, before attempting to match a + pattern while executing a case statement), flags should include + QGLOB_CVTNULL. If flags includes QGLOB_CTLESC, we need to remove CTLESC + quoting CTLESC or CTLNUL (as if dequote_string were called). If flags + includes QGLOB_FILENAME, appropriate quoting to match a filename should be + performed. QGLOB_REGEXP means we're quoting for a Posix ERE (for + [[ string =~ pat ]]) and that requires some special handling. */ +char * +quote_string_for_globbing (pathname, qflags) + const char *pathname; + int qflags; +{ + char *temp; + register int i, j; + int cclass, collsym, equiv, c, last_was_backslash; + int savei, savej; + + temp = (char *)xmalloc (2 * strlen (pathname) + 1); + + if ((qflags & QGLOB_CVTNULL) && QUOTED_NULL (pathname)) + { + temp[0] = '\0'; + return temp; + } + + cclass = collsym = equiv = last_was_backslash = 0; + for (i = j = 0; pathname[i]; i++) + { + /* Fix for CTLESC at the end of the string? */ + if (pathname[i] == CTLESC && pathname[i+1] == '\0') + { + temp[j++] = pathname[i++]; + break; + } + /* If we are parsing regexp, turn CTLESC CTLESC into CTLESC. It's not an + ERE special character, so we should just be able to pass it through. */ + else if ((qflags & (QGLOB_REGEXP|QGLOB_CTLESC)) && pathname[i] == CTLESC && (pathname[i+1] == CTLESC || pathname[i+1] == CTLNUL)) + { + i++; + temp[j++] = pathname[i]; + continue; + } + else if (pathname[i] == CTLESC) + { +convert_to_backslash: + if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/') + continue; + /* What to do if preceding char is backslash? */ + if (pathname[i+1] != CTLESC && (qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) + continue; + temp[j++] = '\\'; + i++; + if (pathname[i] == '\0') + break; + } + else if ((qflags & QGLOB_REGEXP) && (i == 0 || pathname[i-1] != CTLESC) && pathname[i] == '[') /*]*/ + { + temp[j++] = pathname[i++]; /* open bracket */ + savej = j; + savei = i; + c = pathname[i++]; /* c == char after open bracket */ + if (c == '^') /* ignore pattern negation */ + { + temp[j++] = c; + c = pathname[i++]; + } + if (c == ']') /* ignore right bracket if first char */ + { + temp[j++] = c; + c = pathname[i++]; + } + do + { + if (c == 0) + goto endpat; + else if (c == CTLESC) + { + /* skip c, check for EOS, let assignment at end of loop */ + /* pathname[i] == backslash-escaped character */ + if (pathname[i] == 0) + goto endpat; + temp[j++] = pathname[i++]; + } + else if (c == '[' && pathname[i] == ':') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + cclass = 1; + } + else if (cclass && c == ':' && pathname[i] == ']') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + cclass = 0; + } + else if (c == '[' && pathname[i] == '=') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + if (pathname[i] == ']') + temp[j++] = pathname[i++]; /* right brack can be in equiv */ + equiv = 1; + } + else if (equiv && c == '=' && pathname[i] == ']') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + equiv = 0; + } + else if (c == '[' && pathname[i] == '.') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + if (pathname[i] == ']') + temp[j++] = pathname[i++]; /* right brack can be in collsym */ + collsym = 1; + } + else if (collsym && c == '.' && pathname[i] == ']') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + collsym = 0; + } + else + temp[j++] = c; + } + while (((c = pathname[i++]) != ']') && c != 0); + + /* If we don't find the closing bracket before we hit the end of + the string, rescan string without treating it as a bracket + expression (has implications for backslash and special ERE + chars) */ + if (c == 0) + { + i = savei - 1; /* -1 for autoincrement above */ + j = savej; + continue; + } + + temp[j++] = c; /* closing right bracket */ + i--; /* increment will happen above in loop */ + continue; /* skip double assignment below */ + } + else if (pathname[i] == '\\' && (qflags & QGLOB_REGEXP) == 0) + { + /* XXX - if not quoting regexp, use backslash as quote char. Should + We just pass it through without treating it as special? That is + what ksh93 seems to do. */ + + /* If we want to pass through backslash unaltered, comment out these + lines. */ + temp[j++] = '\\'; + + i++; + if (pathname[i] == '\0') + break; + /* If we are turning CTLESC CTLESC into CTLESC, we need to do that + even when the first CTLESC is preceded by a backslash. */ + if ((qflags & QGLOB_CTLESC) && pathname[i] == CTLESC && (pathname[i+1] == CTLESC || pathname[i+1] == CTLNUL)) + i++; /* skip over the CTLESC */ + else if ((qflags & QGLOB_CTLESC) && pathname[i] == CTLESC) + /* A little more general: if there is an unquoted backslash in the + pattern and we are handling quoted characters in the pattern, + convert the CTLESC to backslash and add the next character on + the theory that the backslash will quote the next character + but it would be inconsistent not to replace the CTLESC with + another backslash here. We can't tell at this point whether the + CTLESC comes from a backslash or other form of quoting in the + original pattern. */ + goto convert_to_backslash; + } + else if (pathname[i] == '\\' && (qflags & QGLOB_REGEXP)) + last_was_backslash = 1; + temp[j++] = pathname[i]; + } +endpat: + temp[j] = '\0'; + + return (temp); +} + +char * +quote_globbing_chars (string) + const char *string; +{ + size_t slen; + char *temp, *t; + const char *s, *send; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + + temp = (char *)xmalloc (slen * 2 + 1); + for (t = temp, s = string; *s; ) + { + if (glob_char_p (s)) + *t++ = '\\'; + + /* Copy a single (possibly multibyte) character from s to t, + incrementing both. */ + COPY_CHAR_P (t, s, send); + } + *t = '\0'; + return temp; +} + +/* Call the glob library to do globbing on PATHNAME. */ +char ** +shell_glob_filename (pathname, qflags) + const char *pathname; + int qflags; +{ +#if defined (USE_POSIX_GLOB_LIBRARY) + register int i; + char *temp, **results; + glob_t filenames; + int glob_flags; + + temp = quote_string_for_globbing (pathname, QGLOB_FILENAME|qflags); + + filenames.gl_offs = 0; + +# if defined (GLOB_PERIOD) + glob_flags = glob_dot_filenames ? GLOB_PERIOD : 0; +# else + glob_flags = 0; +# endif /* !GLOB_PERIOD */ + + glob_flags |= (GLOB_ERR | GLOB_DOOFFS); + + i = glob (temp, glob_flags, (posix_glob_errfunc_t *)NULL, &filenames); + + free (temp); + + if (i == GLOB_NOSPACE || i == GLOB_ABORTED) + return ((char **)NULL); + else if (i == GLOB_NOMATCH) + filenames.gl_pathv = (char **)NULL; + else if (i != 0) /* other error codes not in POSIX.2 */ + filenames.gl_pathv = (char **)NULL; + + results = filenames.gl_pathv; + + if (results && ((GLOB_FAILED (results)) == 0)) + { + if (should_ignore_glob_matches ()) + ignore_glob_matches (results); + if (results && results[0]) + strvec_sort (results, 1); /* posix sort */ + else + { + FREE (results); + results = (char **)NULL; + } + } + + return (results); + +#else /* !USE_POSIX_GLOB_LIBRARY */ + + char *temp, **results; + int gflags, quoted_pattern; + + noglob_dot_filenames = glob_dot_filenames == 0; + + temp = quote_string_for_globbing (pathname, QGLOB_FILENAME|qflags); + gflags = glob_star ? GX_GLOBSTAR : 0; + results = glob_filename (temp, gflags); + free (temp); + + if (results && ((GLOB_FAILED (results)) == 0)) + { + if (should_ignore_glob_matches ()) + ignore_glob_matches (results); + if (results && results[0]) + strvec_sort (results, 1); /* posix sort */ + else + { + FREE (results); + results = (char **)&glob_error_return; + } + } + + return (results); +#endif /* !USE_POSIX_GLOB_LIBRARY */ +} + +/* Stuff for GLOBIGNORE. */ + +static struct ignorevar globignore = +{ + "GLOBIGNORE", + (struct ign *)0, + 0, + (char *)0, + (sh_iv_item_func_t *)0, +}; + +/* Set up to ignore some glob matches because the value of GLOBIGNORE + has changed. If GLOBIGNORE is being unset, we also need to disable + the globbing of filenames beginning with a `.'. */ +void +setup_glob_ignore (name) + char *name; +{ + char *v; + + v = get_string_value (name); + setup_ignore_patterns (&globignore); + + if (globignore.num_ignores) + glob_dot_filenames = 1; + else if (v == 0) + glob_dot_filenames = 0; +} + +int +should_ignore_glob_matches () +{ + return globignore.num_ignores; +} + +/* Return 0 if NAME matches a pattern in the globignore.ignores list. */ +static int +glob_name_is_acceptable (name) + const char *name; +{ + struct ign *p; + char *n; + int flags; + + /* . and .. are never matched. We extend this to the terminal component of a + pathname. */ + n = strrchr (name, '/'); + if (n == 0 || n[1] == 0) + n = (char *)name; + else + n++; + + if (n[0] == '.' && (n[1] == '\0' || (n[1] == '.' && n[2] == '\0'))) + return (0); + + flags = FNM_PATHNAME | FNMATCH_EXTFLAG | FNMATCH_NOCASEGLOB; + for (p = globignore.ignores; p->val; p++) + { + if (strmatch (p->val, (char *)name, flags) != FNM_NOMATCH) + return (0); + } + return (1); +} + +/* Internal function to test whether filenames in NAMES should be + ignored. NAME_FUNC is a pointer to a function to call with each + name. It returns non-zero if the name is acceptable to the particular + ignore function which called _ignore_names; zero if the name should + be removed from NAMES. */ + +static void +ignore_globbed_names (names, name_func) + char **names; + sh_ignore_func_t *name_func; +{ + char **newnames; + int n, i; + + for (i = 0; names[i]; i++) + ; + newnames = strvec_create (i + 1); + + for (n = i = 0; names[i]; i++) + { + if ((*name_func) (names[i])) + newnames[n++] = names[i]; + else + free (names[i]); + } + + newnames[n] = (char *)NULL; + + if (n == 0) + { + names[0] = (char *)NULL; + free (newnames); + return; + } + + /* Copy the acceptable names from NEWNAMES back to NAMES and set the + new array end. */ + for (n = 0; newnames[n]; n++) + names[n] = newnames[n]; + names[n] = (char *)NULL; + free (newnames); +} + +void +ignore_glob_matches (names) + char **names; +{ + if (globignore.num_ignores == 0) + return; + + ignore_globbed_names (names, glob_name_is_acceptable); +} + +static char * +split_ignorespec (s, ip) + char *s; + int *ip; +{ + char *t; + int n, i; + + if (s == 0) + return 0; + + i = *ip; + if (s[i] == 0) + return 0; + + n = skip_to_delim (s, i, ":", SD_NOJMP|SD_EXTGLOB|SD_GLOB); + t = substring (s, i, n); + + if (s[n] == ':') + n++; + *ip = n; + return t; +} + +void +setup_ignore_patterns (ivp) + struct ignorevar *ivp; +{ + int numitems, maxitems, ptr; + char *colon_bit, *this_ignoreval; + struct ign *p; + + this_ignoreval = get_string_value (ivp->varname); + + /* If nothing has changed then just exit now. */ + if ((this_ignoreval && ivp->last_ignoreval && STREQ (this_ignoreval, ivp->last_ignoreval)) || + (!this_ignoreval && !ivp->last_ignoreval)) + return; + + /* Oops. The ignore variable has changed. Re-parse it. */ + ivp->num_ignores = 0; + + if (ivp->ignores) + { + for (p = ivp->ignores; p->val; p++) + free(p->val); + free (ivp->ignores); + ivp->ignores = (struct ign *)NULL; + } + + if (ivp->last_ignoreval) + { + free (ivp->last_ignoreval); + ivp->last_ignoreval = (char *)NULL; + } + + if (this_ignoreval == 0 || *this_ignoreval == '\0') + return; + + ivp->last_ignoreval = savestring (this_ignoreval); + + numitems = maxitems = ptr = 0; + +#if 0 + while (colon_bit = extract_colon_unit (this_ignoreval, &ptr)) +#else + while (colon_bit = split_ignorespec (this_ignoreval, &ptr)) +#endif + { + if (numitems + 1 >= maxitems) + { + maxitems += 10; + ivp->ignores = (struct ign *)xrealloc (ivp->ignores, maxitems * sizeof (struct ign)); + } + ivp->ignores[numitems].val = colon_bit; + ivp->ignores[numitems].len = strlen (colon_bit); + ivp->ignores[numitems].flags = 0; + if (ivp->item_func) + (*ivp->item_func) (&ivp->ignores[numitems]); + numitems++; + } + ivp->ignores[numitems].val = (char *)NULL; + ivp->num_ignores = numitems; +} diff --git a/bash-5.1/pathexp.h b/bash-5.1/pathexp.h new file mode 100644 index 0000000000000000000000000000000000000000..7ed0d2ad6904be1c8873073465f67b87b35030ec --- /dev/null +++ b/bash-5.1/pathexp.h @@ -0,0 +1,107 @@ +/* pathexp.h -- The shell interface to the globbing library. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_PATHEXP_H_) +#define _PATHEXP_H_ + +#if defined (USE_POSIX_GLOB_LIBRARY) +# define GLOB_FAILED(glist) !(glist) +#else /* !USE_POSIX_GLOB_LIBRARY */ +# define GLOB_FAILED(glist) (glist) == (char **)&glob_error_return +extern int noglob_dot_filenames; +extern char *glob_error_return; +#endif /* !USE_POSIX_GLOB_LIBRARY */ + +/* Flag values for quote_string_for_globbing */ +#define QGLOB_CVTNULL 0x01 /* convert QUOTED_NULL strings to '\0' */ +#define QGLOB_FILENAME 0x02 /* do correct quoting for matching filenames */ +#define QGLOB_REGEXP 0x04 /* quote an ERE for regcomp/regexec */ +#define QGLOB_CTLESC 0x08 /* turn CTLESC CTLESC into CTLESC for BREs */ +#define QGLOB_DEQUOTE 0x10 /* like dequote_string but quote glob chars */ + +#if defined (EXTENDED_GLOB) +/* Flags to OR with other flag args to strmatch() to enabled the extended + pattern matching. */ +# define FNMATCH_EXTFLAG (extended_glob ? FNM_EXTMATCH : 0) +#else +# define FNMATCH_EXTFLAG 0 +#endif /* !EXTENDED_GLOB */ + +#define FNMATCH_IGNCASE (match_ignore_case ? FNM_CASEFOLD : 0) +#define FNMATCH_NOCASEGLOB (glob_ignore_case ? FNM_CASEFOLD : 0) + +extern int glob_dot_filenames; +extern int extended_glob; +extern int glob_star; +extern int match_ignore_case; /* doesn't really belong here */ + +extern int unquoted_glob_pattern_p PARAMS((char *)); + +/* PATHNAME can contain characters prefixed by CTLESC; this indicates + that the character is to be quoted. We quote it here in the style + that the glob library recognizes. If flags includes QGLOB_CVTNULL, + we change quoted null strings (pathname[0] == CTLNUL) into empty + strings (pathname[0] == 0). If this is called after quote removal + is performed, (flags & QGLOB_CVTNULL) should be 0; if called when quote + removal has not been done (for example, before attempting to match a + pattern while executing a case statement), flags should include + QGLOB_CVTNULL. If flags includes QGLOB_FILENAME, appropriate quoting + to match a filename should be performed. */ +extern char *quote_string_for_globbing PARAMS((const char *, int)); + +extern int glob_char_p PARAMS((const char *)); +extern char *quote_globbing_chars PARAMS((const char *)); + +/* Call the glob library to do globbing on PATHNAME. FLAGS is additional + flags to pass to QUOTE_STRING_FOR_GLOBBING, mostly having to do with + whether or not we've already performed quote removal. */ +extern char **shell_glob_filename PARAMS((const char *, int)); + +/* Filename completion ignore. Used to implement the "fignore" facility of + tcsh, GLOBIGNORE (like ksh-93 FIGNORE), and EXECIGNORE. + + It is passed a NULL-terminated array of (char *)'s that must be + free()'d if they are deleted. The first element (names[0]) is the + least-common-denominator string of the matching patterns (i.e. + u produces names[0] = "und", names[1] = "under.c", names[2] = + "undun.c", name[3] = NULL). */ + +struct ign { + char *val; + int len, flags; +}; + +typedef int sh_iv_item_func_t PARAMS((struct ign *)); + +struct ignorevar { + char *varname; /* FIGNORE, GLOBIGNORE, or EXECIGNORE */ + struct ign *ignores; /* Store the ignore strings here */ + int num_ignores; /* How many are there? */ + char *last_ignoreval; /* Last value of variable - cached for speed */ + sh_iv_item_func_t *item_func; /* Called when each item is parsed from $`varname' */ +}; + +extern void setup_ignore_patterns PARAMS((struct ignorevar *)); + +extern void setup_glob_ignore PARAMS((char *)); +extern int should_ignore_glob_matches PARAMS((void)); +extern void ignore_glob_matches PARAMS((char **)); + +#endif diff --git a/bash-5.1/pathnames.h.in b/bash-5.1/pathnames.h.in new file mode 100644 index 0000000000000000000000000000000000000000..38d09393f8c92634c8834c650786266d1d9d1c9b --- /dev/null +++ b/bash-5.1/pathnames.h.in @@ -0,0 +1,33 @@ +/* pathnames.h -- absolute filenames that bash wants for various defaults. */ + +/* Copyright (C) 1987-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_PATHNAMES_H_) +#define _PATHNAMES_H_ + +/* The default file for hostname completion. */ +#define DEFAULT_HOSTS_FILE "/etc/hosts" + +/* The default login shell startup file. */ +#define SYS_PROFILE "/etc/profile" + +/* The default location of the bash debugger initialization/startup file. */ +#define DEBUGGER_START_FILE "@DEBUGGER_START_FILE@" + +#endif /* _PATHNAMES_H */ diff --git a/bash-5.1/pcomplete.c b/bash-5.1/pcomplete.c new file mode 100644 index 0000000000000000000000000000000000000000..fe1a03200a3d044ed2efaf2d4565c434ef67b40c --- /dev/null +++ b/bash-5.1/pcomplete.c @@ -0,0 +1,1754 @@ +/* pcomplete.c - functions to generate lists of matches for programmable completion. */ + +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (PROGRAMMABLE_COMPLETION) + +#include "bashtypes.h" +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#if defined (PREFER_STDARG) +# include +#else +# include +#endif + +#include "posixtime.h" + +#include +#include "bashansi.h" +#include "bashintl.h" + +#include "shell.h" +#include "pcomplete.h" +#include "alias.h" +#include "bashline.h" +#include "execute_cmd.h" +#include "pathexp.h" + +#if defined (JOB_CONTROL) +# include "jobs.h" +#endif + +#if !defined (NSIG) +# include "trap.h" +#endif + +#include "shmbutil.h" + +#include "builtins.h" +#include "builtins/common.h" +#include "builtins/builtext.h" + +#include +#include + +#include +#include +#include + +#ifdef STRDUP +# undef STRDUP +#endif +#define STRDUP(x) ((x) ? savestring (x) : (char *)NULL) + +typedef SHELL_VAR **SVFUNC (); + +#ifndef HAVE_STRPBRK +extern char *strpbrk PARAMS((char *, char *)); +#endif + +extern STRING_INT_ALIST word_token_alist[]; +extern char *signal_names[]; + +#if defined (DEBUG) +#if defined (PREFER_STDARG) +static void debug_printf (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +#endif +#endif /* DEBUG */ + +static int it_init_joblist PARAMS((ITEMLIST *, int)); + +static int it_init_aliases PARAMS((ITEMLIST *)); +static int it_init_arrayvars PARAMS((ITEMLIST *)); +static int it_init_bindings PARAMS((ITEMLIST *)); +static int it_init_builtins PARAMS((ITEMLIST *)); +static int it_init_disabled PARAMS((ITEMLIST *)); +static int it_init_enabled PARAMS((ITEMLIST *)); +static int it_init_exported PARAMS((ITEMLIST *)); +static int it_init_functions PARAMS((ITEMLIST *)); +static int it_init_helptopics PARAMS((ITEMLIST *)); +static int it_init_hostnames PARAMS((ITEMLIST *)); +static int it_init_jobs PARAMS((ITEMLIST *)); +static int it_init_running PARAMS((ITEMLIST *)); +static int it_init_stopped PARAMS((ITEMLIST *)); +static int it_init_keywords PARAMS((ITEMLIST *)); +static int it_init_signals PARAMS((ITEMLIST *)); +static int it_init_variables PARAMS((ITEMLIST *)); +static int it_init_setopts PARAMS((ITEMLIST *)); +static int it_init_shopts PARAMS((ITEMLIST *)); + +static int shouldexp_filterpat PARAMS((char *)); +static char *preproc_filterpat PARAMS((char *, const char *)); + +static void init_itemlist_from_varlist PARAMS((ITEMLIST *, SVFUNC *)); + +static STRINGLIST *gen_matches_from_itemlist PARAMS((ITEMLIST *, const char *)); +static STRINGLIST *gen_action_completions PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_globpat_matches PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_wordlist_matches PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_shell_function_matches PARAMS((COMPSPEC *, const char *, + const char *, + char *, int, WORD_LIST *, + int, int, int *)); +static STRINGLIST *gen_command_matches PARAMS((COMPSPEC *, const char *, + const char *, + char *, int, WORD_LIST *, + int, int)); + +static STRINGLIST *gen_progcomp_completions PARAMS((const char *, const char *, + const char *, + int, int, int *, int *, + COMPSPEC **)); + +static char *pcomp_filename_completion_function PARAMS((const char *, int)); + +#if defined (ARRAY_VARS) +static SHELL_VAR *bind_comp_words PARAMS((WORD_LIST *)); +#endif +static void bind_compfunc_variables PARAMS((char *, int, WORD_LIST *, int, int)); +static void unbind_compfunc_variables PARAMS((int)); +static WORD_LIST *build_arg_list PARAMS((char *, const char *, const char *, WORD_LIST *, int)); +static WORD_LIST *command_line_to_word_list PARAMS((char *, int, int, int *, int *)); + +#ifdef DEBUG +static int progcomp_debug = 0; +#endif + +int prog_completion_enabled = 1; + +#ifdef ALIAS +int progcomp_alias = 0; /* unavailable to user code for now */ +#endif + +/* These are used to manage the arrays of strings for possible completions. */ +ITEMLIST it_aliases = { 0, it_init_aliases, (STRINGLIST *)0 }; +ITEMLIST it_arrayvars = { LIST_DYNAMIC, it_init_arrayvars, (STRINGLIST *)0 }; +ITEMLIST it_bindings = { 0, it_init_bindings, (STRINGLIST *)0 }; +ITEMLIST it_builtins = { 0, it_init_builtins, (STRINGLIST *)0 }; +ITEMLIST it_commands = { LIST_DYNAMIC }; /* unused */ +ITEMLIST it_directories = { LIST_DYNAMIC }; /* unused */ +ITEMLIST it_disabled = { 0, it_init_disabled, (STRINGLIST *)0 }; +ITEMLIST it_enabled = { 0, it_init_enabled, (STRINGLIST *)0 }; +ITEMLIST it_exports = { LIST_DYNAMIC, it_init_exported, (STRINGLIST *)0 }; +ITEMLIST it_files = { LIST_DYNAMIC }; /* unused */ +ITEMLIST it_functions = { 0, it_init_functions, (STRINGLIST *)0 }; +ITEMLIST it_helptopics = { 0, it_init_helptopics, (STRINGLIST *)0 }; +ITEMLIST it_hostnames = { LIST_DYNAMIC, it_init_hostnames, (STRINGLIST *)0 }; +ITEMLIST it_groups = { LIST_DYNAMIC }; /* unused */ +ITEMLIST it_jobs = { LIST_DYNAMIC, it_init_jobs, (STRINGLIST *)0 }; +ITEMLIST it_keywords = { 0, it_init_keywords, (STRINGLIST *)0 }; +ITEMLIST it_running = { LIST_DYNAMIC, it_init_running, (STRINGLIST *)0 }; +ITEMLIST it_services = { LIST_DYNAMIC }; /* unused */ +ITEMLIST it_setopts = { 0, it_init_setopts, (STRINGLIST *)0 }; +ITEMLIST it_shopts = { 0, it_init_shopts, (STRINGLIST *)0 }; +ITEMLIST it_signals = { 0, it_init_signals, (STRINGLIST *)0 }; +ITEMLIST it_stopped = { LIST_DYNAMIC, it_init_stopped, (STRINGLIST *)0 }; +ITEMLIST it_users = { LIST_DYNAMIC }; /* unused */ +ITEMLIST it_variables = { LIST_DYNAMIC, it_init_variables, (STRINGLIST *)0 }; + +COMPSPEC *pcomp_curcs; +const char *pcomp_curcmd; +const char *pcomp_curtxt; + +char *pcomp_line; +int pcomp_ind; + +#ifdef DEBUG +/* Debugging code */ +static void +#if defined (PREFER_STDARG) +debug_printf (const char *format, ...) +#else +debug_printf (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + if (progcomp_debug == 0) + return; + + SH_VA_START (args, format); + + fprintf (stdout, "DEBUG: "); + vfprintf (stdout, format, args); + fprintf (stdout, "\n"); + + rl_on_new_line (); + + va_end (args); +} +#endif + +/* Functions to manage the item lists */ + +void +set_itemlist_dirty (it) + ITEMLIST *it; +{ + it->flags |= LIST_DIRTY; +} + +void +initialize_itemlist (itp) + ITEMLIST *itp; +{ + (*itp->list_getter) (itp); + itp->flags |= LIST_INITIALIZED; + itp->flags &= ~LIST_DIRTY; +} + +void +clean_itemlist (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + + sl = itp->slist; + if (sl) + { + if ((itp->flags & (LIST_DONTFREEMEMBERS|LIST_DONTFREE)) == 0) + strvec_flush (sl->list); + if ((itp->flags & LIST_DONTFREE) == 0) + free (sl->list); + free (sl); + } + itp->slist = (STRINGLIST *)NULL; + itp->flags &= ~(LIST_DONTFREE|LIST_DONTFREEMEMBERS|LIST_INITIALIZED|LIST_DIRTY); +} + + +static int +shouldexp_filterpat (s) + char *s; +{ + register char *p; + + for (p = s; p && *p; p++) + { + if (*p == '\\') + p++; + else if (*p == '&') + return 1; + } + return 0; +} + +/* Replace any instance of `&' in PAT with TEXT. Backslash may be used to + quote a `&' and inhibit substitution. Returns a new string. This just + calls stringlib.c:strcreplace(). */ +static char * +preproc_filterpat (pat, text) + char *pat; + const char *text; +{ + char *ret; + + ret = strcreplace (pat, '&', text, 1); + return ret; +} + +/* Remove any match of FILTERPAT from SL. A `&' in FILTERPAT is replaced by + TEXT. A leading `!' in FILTERPAT negates the pattern; in this case + any member of SL->list that does *not* match will be removed. This returns + a new STRINGLIST with the matching members of SL *copied*. Any + non-matching members of SL->list are *freed*. */ +STRINGLIST * +filter_stringlist (sl, filterpat, text) + STRINGLIST *sl; + char *filterpat; + const char *text; +{ + int i, m, not; + STRINGLIST *ret; + char *npat, *t; + + if (sl == 0 || sl->list == 0 || sl->list_len == 0) + return sl; + + npat = shouldexp_filterpat (filterpat) ? preproc_filterpat (filterpat, text) : filterpat; + +#if defined (EXTENDED_GLOB) + not = (npat[0] == '!' && (extended_glob == 0 || npat[1] != '(')); /*)*/ +#else + not = (npat[0] == '!'); +#endif + t = not ? npat + 1 : npat; + + ret = strlist_create (sl->list_size); + for (i = 0; i < sl->list_len; i++) + { + m = strmatch (t, sl->list[i], FNMATCH_EXTFLAG | FNMATCH_IGNCASE); + if ((not && m == FNM_NOMATCH) || (not == 0 && m != FNM_NOMATCH)) + free (sl->list[i]); + else + ret->list[ret->list_len++] = sl->list[i]; + } + + ret->list[ret->list_len] = (char *)NULL; + if (npat != filterpat) + free (npat); + + return ret; +} + +/* Turn an array of strings returned by rl_completion_matches into a STRINGLIST. + This understands how rl_completion_matches sets matches[0] (the lcd of the + strings in the list, unless it's the only match). */ +STRINGLIST * +completions_to_stringlist (matches) + char **matches; +{ + STRINGLIST *sl; + int mlen, i, n; + + mlen = (matches == 0) ? 0 : strvec_len (matches); + sl = strlist_create (mlen + 1); + + if (matches == 0 || matches[0] == 0) + return sl; + + if (matches[1] == 0) + { + sl->list[0] = STRDUP (matches[0]); + sl->list[sl->list_len = 1] = (char *)NULL; + return sl; + } + + for (i = 1, n = 0; i < mlen; i++, n++) + sl->list[n] = STRDUP (matches[i]); + sl->list_len = n; + sl->list[n] = (char *)NULL; + + return sl; +} + +/* Functions to manage the various ITEMLISTs that we populate internally. + The caller is responsible for setting ITP->flags correctly. */ + +static int +it_init_aliases (itp) + ITEMLIST *itp; +{ +#ifdef ALIAS + alias_t **alias_list; + register int i, n; + STRINGLIST *sl; + + alias_list = all_aliases (); + if (alias_list == 0) + { + itp->slist = (STRINGLIST *)NULL; + return 0; + } + for (n = 0; alias_list[n]; n++) + ; + sl = strlist_create (n+1); + for (i = 0; i < n; i++) + sl->list[i] = STRDUP (alias_list[i]->name); + sl->list[n] = (char *)NULL; + sl->list_size = sl->list_len = n; + itp->slist = sl; +#else + itp->slist = (STRINGLIST *)NULL; +#endif + free (alias_list); + return 1; +} + +static void +init_itemlist_from_varlist (itp, svfunc) + ITEMLIST *itp; + SVFUNC *svfunc; +{ + SHELL_VAR **vlist; + STRINGLIST *sl; + register int i, n; + + vlist = (*svfunc) (); + if (vlist == 0) + { + itp->slist = (STRINGLIST *)NULL; + return; + } + for (n = 0; vlist[n]; n++) + ; + sl = strlist_create (n+1); + for (i = 0; i < n; i++) + sl->list[i] = savestring (vlist[i]->name); + sl->list[sl->list_len = n] = (char *)NULL; + itp->slist = sl; +} + +static int +it_init_arrayvars (itp) + ITEMLIST *itp; +{ +#if defined (ARRAY_VARS) + init_itemlist_from_varlist (itp, all_array_variables); + return 1; +#else + return 0; +#endif +} + +static int +it_init_bindings (itp) + ITEMLIST *itp; +{ + char **blist; + STRINGLIST *sl; + + /* rl_funmap_names allocates blist, but not its members */ + blist = (char **)rl_funmap_names (); /* XXX fix const later */ + sl = strlist_create (0); + sl->list = blist; + sl->list_size = 0; + sl->list_len = strvec_len (sl->list); + itp->flags |= LIST_DONTFREEMEMBERS; + itp->slist = sl; + + return 0; +} + +static int +it_init_builtins (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + register int i, n; + + sl = strlist_create (num_shell_builtins); + for (i = n = 0; i < num_shell_builtins; i++) + if (shell_builtins[i].function) + sl->list[n++] = shell_builtins[i].name; + sl->list[sl->list_len = n] = (char *)NULL; + itp->flags |= LIST_DONTFREEMEMBERS; + itp->slist = sl; + return 0; +} + +static int +it_init_enabled (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + register int i, n; + + sl = strlist_create (num_shell_builtins); + for (i = n = 0; i < num_shell_builtins; i++) + { + if (shell_builtins[i].function && (shell_builtins[i].flags & BUILTIN_ENABLED)) + sl->list[n++] = shell_builtins[i].name; + } + sl->list[sl->list_len = n] = (char *)NULL; + itp->flags |= LIST_DONTFREEMEMBERS; + itp->slist = sl; + return 0; +} + +static int +it_init_disabled (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + register int i, n; + + sl = strlist_create (num_shell_builtins); + for (i = n = 0; i < num_shell_builtins; i++) + { + if (shell_builtins[i].function && ((shell_builtins[i].flags & BUILTIN_ENABLED) == 0)) + sl->list[n++] = shell_builtins[i].name; + } + sl->list[sl->list_len = n] = (char *)NULL; + itp->flags |= LIST_DONTFREEMEMBERS; + itp->slist = sl; + return 0; +} + +static int +it_init_exported (itp) + ITEMLIST *itp; +{ + init_itemlist_from_varlist (itp, all_exported_variables); + return 0; +} + +static int +it_init_functions (itp) + ITEMLIST *itp; +{ + init_itemlist_from_varlist (itp, all_visible_functions); + return 0; +} + +/* Like it_init_builtins, but includes everything the help builtin looks at, + not just builtins with an active implementing function. */ +static int +it_init_helptopics (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + register int i, n; + + sl = strlist_create (num_shell_builtins); + for (i = n = 0; i < num_shell_builtins; i++) + sl->list[n++] = shell_builtins[i].name; + sl->list[sl->list_len = n] = (char *)NULL; + itp->flags |= LIST_DONTFREEMEMBERS; + itp->slist = sl; + return 0; +} + +static int +it_init_hostnames (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + + sl = strlist_create (0); + sl->list = get_hostname_list (); + sl->list_len = sl->list ? strvec_len (sl->list) : 0; + sl->list_size = sl->list_len; + itp->slist = sl; + itp->flags |= LIST_DONTFREEMEMBERS|LIST_DONTFREE; + return 0; +} + +static int +it_init_joblist (itp, jstate) + ITEMLIST *itp; + int jstate; +{ +#if defined (JOB_CONTROL) + STRINGLIST *sl; + register int i; + register PROCESS *p; + char *s, *t; + JOB *j; + JOB_STATE ws; /* wanted state */ + + ws = JNONE; + if (jstate == 0) + ws = JRUNNING; + else if (jstate == 1) + ws = JSTOPPED; + + sl = strlist_create (js.j_jobslots); + for (i = js.j_jobslots - 1; i >= 0; i--) + { + j = get_job_by_jid (i); + if (j == 0) + continue; + p = j->pipe; + if (jstate == -1 || JOBSTATE(i) == ws) + { + s = savestring (p->command); + t = strpbrk (s, " \t\n"); + if (t) + *t = '\0'; + sl->list[sl->list_len++] = s; + } + } + itp->slist = sl; +#else + itp->slist = (STRINGLIST *)NULL; +#endif + return 0; +} + +static int +it_init_jobs (itp) + ITEMLIST *itp; +{ + return (it_init_joblist (itp, -1)); +} + +static int +it_init_running (itp) + ITEMLIST *itp; +{ + return (it_init_joblist (itp, 0)); +} + +static int +it_init_stopped (itp) + ITEMLIST *itp; +{ + return (it_init_joblist (itp, 1)); +} + +static int +it_init_keywords (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + register int i, n; + + for (n = 0; word_token_alist[n].word; n++) + ; + sl = strlist_create (n); + for (i = 0; i < n; i++) + sl->list[i] = word_token_alist[i].word; + sl->list[sl->list_len = i] = (char *)NULL; + itp->flags |= LIST_DONTFREEMEMBERS; + itp->slist = sl; + return 0; +} + +static int +it_init_signals (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + + sl = strlist_create (0); + sl->list = signal_names; + sl->list_len = strvec_len (sl->list); + itp->flags |= LIST_DONTFREE; + itp->slist = sl; + return 0; +} + +static int +it_init_variables (itp) + ITEMLIST *itp; +{ + init_itemlist_from_varlist (itp, all_visible_variables); + return 0; +} + +static int +it_init_setopts (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + + sl = strlist_create (0); + sl->list = get_minus_o_opts (); + sl->list_len = strvec_len (sl->list); + itp->slist = sl; + itp->flags |= LIST_DONTFREEMEMBERS; + return 0; +} + +static int +it_init_shopts (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + + sl = strlist_create (0); + sl->list = get_shopt_options (); + sl->list_len = strvec_len (sl->list); + itp->slist = sl; + itp->flags |= LIST_DONTFREEMEMBERS; + return 0; +} + +/* Generate a list of all matches for TEXT using the STRINGLIST in itp->slist + as the list of possibilities. If the itemlist has been marked dirty or + it should be regenerated every time, destroy the old STRINGLIST and make a + new one before trying the match. TEXT is dequoted before attempting a + match. */ +static STRINGLIST * +gen_matches_from_itemlist (itp, text) + ITEMLIST *itp; + const char *text; +{ + STRINGLIST *ret, *sl; + int tlen, i, n; + char *ntxt; + + if ((itp->flags & (LIST_DIRTY|LIST_DYNAMIC)) || + (itp->flags & LIST_INITIALIZED) == 0) + { + if (itp->flags & (LIST_DIRTY|LIST_DYNAMIC)) + clean_itemlist (itp); + if ((itp->flags & LIST_INITIALIZED) == 0) + initialize_itemlist (itp); + } + if (itp->slist == 0) + return ((STRINGLIST *)NULL); + ret = strlist_create (itp->slist->list_len+1); + sl = itp->slist; + + ntxt = bash_dequote_text (text); + tlen = STRLEN (ntxt); + + for (i = n = 0; i < sl->list_len; i++) + { + if (tlen == 0 || STREQN (sl->list[i], ntxt, tlen)) + ret->list[n++] = STRDUP (sl->list[i]); + } + ret->list[ret->list_len = n] = (char *)NULL; + + FREE (ntxt); + return ret; +} + +/* A wrapper for rl_filename_completion_function that dequotes the filename + before attempting completions. */ +static char * +pcomp_filename_completion_function (text, state) + const char *text; + int state; +{ + static char *dfn; /* dequoted filename */ + int iscompgen, iscompleting; + + if (state == 0) + { + FREE (dfn); + /* remove backslashes quoting special characters in filenames. */ + /* There are roughly three paths we can follow to get here: + 1. complete -f + 2. compgen -f "$word" from a completion function + 3. compgen -f "$word" from the command line + They all need to be handled. + + In the first two cases, readline will run the filename dequoting + function in rl_filename_completion_function if it found a filename + quoting character in the word to be completed + (rl_completion_found_quote). We run the dequoting function here + if we're running compgen, we're not completing, and the + rl_filename_completion_function won't dequote the filename + (rl_completion_found_quote == 0). */ + iscompgen = this_shell_builtin == compgen_builtin; + iscompleting = RL_ISSTATE (RL_STATE_COMPLETING); + if (iscompgen && iscompleting == 0 && rl_completion_found_quote == 0 + && rl_filename_dequoting_function) + { + /* Use rl_completion_quote_character because any single or + double quotes have been removed by the time TEXT makes it + here, and we don't want to remove backslashes inside + quoted strings. */ + dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character); + } + /* Intended to solve a mismatched assumption by bash-completion. If + the text to be completed is empty, but bash-completion turns it into + a quoted string ('') assuming that this code will dequote it before + calling readline, do the dequoting. */ + else if (iscompgen && iscompleting && + pcomp_curtxt && *pcomp_curtxt == 0 && + text && (*text == '\'' || *text == '"') && text[1] == text[0] && text[2] == 0 && + rl_filename_dequoting_function) + dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character); + /* Another mismatched assumption by bash-completion. If compgen is being + run as part of bash-completion, and the argument to compgen is not + the same as the word originally passed to the programmable completion + code, dequote the argument if it has quote characters. It's an + attempt to detect when bash-completion is quoting its filename + argument before calling compgen. */ + /* We could check whether gen_shell_function_matches is in the call + stack by checking whether the gen-shell-function-matches tag is in + the unwind-protect stack, but there's no function to do that yet. + We could simply check whether we're executing in a function by + checking variable_context, and may end up doing that. */ + else if (iscompgen && iscompleting && rl_filename_dequoting_function && + pcomp_curtxt && text && + STREQ (pcomp_curtxt, text) == 0 && + variable_context && + sh_contains_quotes (text)) /* guess */ + dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character); + else + dfn = savestring (text); + } + + return (rl_filename_completion_function (dfn, state)); +} + +#define GEN_COMPS(bmap, flag, it, text, glist, tlist) \ + do { \ + if (bmap & flag) \ + { \ + tlist = gen_matches_from_itemlist (it, text); \ + if (tlist) \ + { \ + glist = strlist_append (glist, tlist); \ + strlist_dispose (tlist); \ + } \ + } \ + } while (0) + +#define GEN_XCOMPS(bmap, flag, text, func, cmatches, glist, tlist) \ + do { \ + if (bmap & flag) \ + { \ + cmatches = rl_completion_matches (text, func); \ + tlist = completions_to_stringlist (cmatches); \ + glist = strlist_append (glist, tlist); \ + strvec_dispose (cmatches); \ + strlist_dispose (tlist); \ + } \ + } while (0) + +/* Functions to generate lists of matches from the actions member of CS. */ + +static STRINGLIST * +gen_action_completions (cs, text) + COMPSPEC *cs; + const char *text; +{ + STRINGLIST *ret, *tmatches; + char **cmatches; /* from rl_completion_matches ... */ + unsigned long flags; + int t; + + ret = tmatches = (STRINGLIST *)NULL; + flags = cs->actions; + + GEN_COMPS (flags, CA_ALIAS, &it_aliases, text, ret, tmatches); + GEN_COMPS (flags, CA_ARRAYVAR, &it_arrayvars, text, ret, tmatches); + GEN_COMPS (flags, CA_BINDING, &it_bindings, text, ret, tmatches); + GEN_COMPS (flags, CA_BUILTIN, &it_builtins, text, ret, tmatches); + GEN_COMPS (flags, CA_DISABLED, &it_disabled, text, ret, tmatches); + GEN_COMPS (flags, CA_ENABLED, &it_enabled, text, ret, tmatches); + GEN_COMPS (flags, CA_EXPORT, &it_exports, text, ret, tmatches); + GEN_COMPS (flags, CA_FUNCTION, &it_functions, text, ret, tmatches); + GEN_COMPS (flags, CA_HELPTOPIC, &it_helptopics, text, ret, tmatches); + GEN_COMPS (flags, CA_HOSTNAME, &it_hostnames, text, ret, tmatches); + GEN_COMPS (flags, CA_JOB, &it_jobs, text, ret, tmatches); + GEN_COMPS (flags, CA_KEYWORD, &it_keywords, text, ret, tmatches); + GEN_COMPS (flags, CA_RUNNING, &it_running, text, ret, tmatches); + GEN_COMPS (flags, CA_SETOPT, &it_setopts, text, ret, tmatches); + GEN_COMPS (flags, CA_SHOPT, &it_shopts, text, ret, tmatches); + GEN_COMPS (flags, CA_SIGNAL, &it_signals, text, ret, tmatches); + GEN_COMPS (flags, CA_STOPPED, &it_stopped, text, ret, tmatches); + GEN_COMPS (flags, CA_VARIABLE, &it_variables, text, ret, tmatches); + + GEN_XCOMPS(flags, CA_COMMAND, text, command_word_completion_function, cmatches, ret, tmatches); + GEN_XCOMPS(flags, CA_FILE, text, pcomp_filename_completion_function, cmatches, ret, tmatches); + GEN_XCOMPS(flags, CA_USER, text, rl_username_completion_function, cmatches, ret, tmatches); + GEN_XCOMPS(flags, CA_GROUP, text, bash_groupname_completion_function, cmatches, ret, tmatches); + GEN_XCOMPS(flags, CA_SERVICE, text, bash_servicename_completion_function, cmatches, ret, tmatches); + + /* And lastly, the special case for directories */ + if (flags & CA_DIRECTORY) + { + t = rl_filename_completion_desired; + rl_completion_mark_symlink_dirs = 1; /* override user preference */ + cmatches = bash_directory_completion_matches (text); + /* If we did not want filename completion before this, and there are + no matches, turn off rl_filename_completion_desired so whatever + matches we get are not treated as filenames (it gets turned on by + rl_filename_completion_function unconditionally). */ + if (t == 0 && cmatches == 0 && rl_filename_completion_desired == 1) + rl_filename_completion_desired = 0; + tmatches = completions_to_stringlist (cmatches); + ret = strlist_append (ret, tmatches); + strvec_dispose (cmatches); + strlist_dispose (tmatches); + } + + return ret; +} + +/* Generate a list of matches for CS->globpat. Unresolved: should this use + TEXT as a match prefix, or just go without? Currently, the code does not + use TEXT, just globs CS->globpat and returns the results. If we do decide + to use TEXT, we should call quote_string_for_globbing before the call to + glob_filename. */ +static STRINGLIST * +gen_globpat_matches (cs, text) + COMPSPEC *cs; + const char *text; +{ + STRINGLIST *sl; + + sl = strlist_create (0); + sl->list = glob_filename (cs->globpat, 0); + if (GLOB_FAILED (sl->list)) + sl->list = (char **)NULL; + if (sl->list) + sl->list_len = sl->list_size = strvec_len (sl->list); + return sl; +} + +/* Perform the shell word expansions on CS->words and return the results. + Again, this ignores TEXT. */ +static STRINGLIST * +gen_wordlist_matches (cs, text) + COMPSPEC *cs; + const char *text; +{ + WORD_LIST *l, *l2; + STRINGLIST *sl; + int nw, tlen; + char *ntxt; /* dequoted TEXT to use in comparisons */ + + if (cs->words == 0 || cs->words[0] == '\0') + return ((STRINGLIST *)NULL); + + /* This used to be a simple expand_string(cs->words, 0), but that won't + do -- there's no way to split a simple list into individual words + that way, since the shell semantics say that word splitting is done + only on the results of expansion. split_at_delims also handles embedded + quoted strings and preserves the quotes for the expand_words_shellexp + function call that follows. */ + /* XXX - this is where this function spends most of its time */ + l = split_at_delims (cs->words, strlen (cs->words), (char *)NULL, -1, 0, (int *)NULL, (int *)NULL); + if (l == 0) + return ((STRINGLIST *)NULL); + /* This will jump back to the top level if the expansion fails... */ + l2 = expand_words_shellexp (l); + dispose_words (l); + + nw = list_length (l2); + sl = strlist_create (nw + 1); + + ntxt = bash_dequote_text (text); + tlen = STRLEN (ntxt); + + for (nw = 0, l = l2; l; l = l->next) + { + if (tlen == 0 || STREQN (l->word->word, ntxt, tlen)) + sl->list[nw++] = STRDUP (l->word->word); + } + sl->list[sl->list_len = nw] = (char *)NULL; + + dispose_words (l2); + FREE (ntxt); + return sl; +} + +#ifdef ARRAY_VARS + +static SHELL_VAR * +bind_comp_words (lwords) + WORD_LIST *lwords; +{ + SHELL_VAR *v; + + v = find_variable_noref ("COMP_WORDS"); + if (v == 0) + v = make_new_array_variable ("COMP_WORDS"); + if (nameref_p (v)) + VUNSETATTR (v, att_nameref); +#if 0 + if (readonly_p (v)) + VUNSETATTR (v, att_readonly); +#endif + if (array_p (v) == 0) + v = convert_var_to_array (v); + v = assign_array_var_from_word_list (v, lwords, 0); + + VUNSETATTR (v, att_invisible); + return v; +} +#endif /* ARRAY_VARS */ + +static void +bind_compfunc_variables (line, ind, lwords, cw, exported) + char *line; + int ind; + WORD_LIST *lwords; + int cw, exported; +{ + char ibuf[INT_STRLEN_BOUND(int) + 1]; + char *value; + SHELL_VAR *v; + size_t llen; + int c; + + /* Set the variables that the function expects while it executes. Maybe + these should be in the function environment (temporary_env). */ + v = bind_variable ("COMP_LINE", line, 0); + if (v && exported) + VSETATTR(v, att_exported); + + /* Post bash-4.2: COMP_POINT is characters instead of bytes. */ + c = line[ind]; + line[ind] = '\0'; + llen = MB_STRLEN (line); + line[ind] = c; + value = inttostr (llen, ibuf, sizeof(ibuf)); + v = bind_int_variable ("COMP_POINT", value, 0); + if (v && exported) + VSETATTR(v, att_exported); + + value = inttostr (rl_completion_type, ibuf, sizeof (ibuf)); + v = bind_int_variable ("COMP_TYPE", value, 0); + if (v && exported) + VSETATTR(v, att_exported); + + value = inttostr (rl_completion_invoking_key, ibuf, sizeof (ibuf)); + v = bind_int_variable ("COMP_KEY", value, 0); + if (v && exported) + VSETATTR(v, att_exported); + + /* Since array variables can't be exported, we don't bother making the + array of words. */ + if (exported == 0) + { +#ifdef ARRAY_VARS + v = bind_comp_words (lwords); + value = inttostr (cw, ibuf, sizeof(ibuf)); + bind_int_variable ("COMP_CWORD", value, 0); +#endif + } + else + array_needs_making = 1; +} + +static void +unbind_compfunc_variables (exported) + int exported; +{ + unbind_variable_noref ("COMP_LINE"); + unbind_variable_noref ("COMP_POINT"); + unbind_variable_noref ("COMP_TYPE"); + unbind_variable_noref ("COMP_KEY"); +#ifdef ARRAY_VARS + unbind_variable_noref ("COMP_WORDS"); + unbind_variable_noref ("COMP_CWORD"); +#endif + if (exported) + array_needs_making = 1; +} + +/* Build the list of words to pass to a function or external command + as arguments. When the function or command is invoked, + + $0 == function or command being invoked + $1 == command name + $2 == word to be completed (possibly null) + $3 == previous word + + Functions can access all of the words in the current command line + with the COMP_WORDS array. External commands cannot; they have to + make do with the COMP_LINE and COMP_POINT variables. */ + +static WORD_LIST * +build_arg_list (cmd, cname, text, lwords, ind) + char *cmd; + const char *cname; + const char *text; + WORD_LIST *lwords; + int ind; +{ + WORD_LIST *ret, *cl, *l; + WORD_DESC *w; + int i; + + ret = (WORD_LIST *)NULL; + w = make_word (cmd); + ret = make_word_list (w, (WORD_LIST *)NULL); /* $0 */ + + w = make_word (cname); /* $1 */ + cl = ret->next = make_word_list (w, (WORD_LIST *)NULL); + + w = make_word (text); + cl->next = make_word_list (w, (WORD_LIST *)NULL); /* $2 */ + cl = cl->next; + + /* Search lwords for current word */ + for (l = lwords, i = 1; l && i < ind-1; l = l->next, i++) + ; + w = (l && l->word) ? copy_word (l->word) : make_word (""); + cl->next = make_word_list (w, (WORD_LIST *)NULL); + + return ret; +} + +/* Build a command string with + $0 == cs->funcname (function to execute for completion list) + $1 == command name (command being completed) + $2 = word to be completed (possibly null) + $3 = previous word + and run in the current shell. The function should put its completion + list into the array variable COMPREPLY. We build a STRINGLIST + from the results and return it. + + Since the shell function should return its list of matches in an array + variable, this does nothing if arrays are not compiled into the shell. */ + +static STRINGLIST * +gen_shell_function_matches (cs, cmd, text, line, ind, lwords, nw, cw, foundp) + COMPSPEC *cs; + const char *cmd; + const char *text; + char *line; + int ind; + WORD_LIST *lwords; + int nw, cw; + int *foundp; +{ + char *funcname; + STRINGLIST *sl; + SHELL_VAR *f, *v; + WORD_LIST *cmdlist; + int fval, found; + sh_parser_state_t ps; + sh_parser_state_t * restrict pps; +#if defined (ARRAY_VARS) + ARRAY *a; +#endif + + found = 0; + if (foundp) + *foundp = found; + + funcname = cs->funcname; + f = find_function (funcname); + if (f == 0) + { + internal_error (_("completion: function `%s' not found"), funcname); + rl_ding (); + rl_on_new_line (); + return ((STRINGLIST *)NULL); + } + +#if !defined (ARRAY_VARS) + return ((STRINGLIST *)NULL); +#else + + /* We pass cw - 1 because command_line_to_word_list returns indices that are + 1-based, while bash arrays are 0-based. */ + bind_compfunc_variables (line, ind, lwords, cw - 1, 0); + + cmdlist = build_arg_list (funcname, cmd, text, lwords, cw); + + pps = &ps; + save_parser_state (pps); + begin_unwind_frame ("gen-shell-function-matches"); + add_unwind_protect (restore_parser_state, (char *)pps); + add_unwind_protect (dispose_words, (char *)cmdlist); + add_unwind_protect (unbind_compfunc_variables, (char *)0); + + fval = execute_shell_function (f, cmdlist); + + discard_unwind_frame ("gen-shell-function-matches"); + restore_parser_state (pps); + + found = fval != EX_NOTFOUND; + if (fval == EX_RETRYFAIL) + found |= PCOMP_RETRYFAIL; + if (foundp) + *foundp = found; + + /* Now clean up and destroy everything. */ + dispose_words (cmdlist); + unbind_compfunc_variables (0); + + /* The list of completions is returned in the array variable COMPREPLY. */ + v = find_variable ("COMPREPLY"); + if (v == 0) + return ((STRINGLIST *)NULL); + if (array_p (v) == 0 && assoc_p (v) == 0) + v = convert_var_to_array (v); + + VUNSETATTR (v, att_invisible); + + a = array_cell (v); + if (found == 0 || (found & PCOMP_RETRYFAIL) || a == 0 || array_p (v) == 0 || array_empty (a)) + sl = (STRINGLIST *)NULL; + else + { + /* XXX - should we filter the list of completions so only those matching + TEXT are returned? Right now, we do not. */ + sl = strlist_create (0); + sl->list = array_to_argv (a, 0); + sl->list_len = sl->list_size = array_num_elements (a); + } + + /* XXX - should we unbind COMPREPLY here? */ + unbind_variable_noref ("COMPREPLY"); + + return (sl); +#endif +} + +/* Build a command string with + $0 == cs->command (command to execute for completion list) + $1 == command name (command being completed) + $2 == word to be completed (possibly null) + $3 == previous word + and run it with command substitution. Parse the results, one word + per line, with backslashes allowed to escape newlines. Build a + STRINGLIST from the results and return it. */ + +static STRINGLIST * +gen_command_matches (cs, cmd, text, line, ind, lwords, nw, cw) + COMPSPEC *cs; + const char *cmd; + const char *text; + char *line; + int ind; + WORD_LIST *lwords; + int nw, cw; +{ + char *csbuf, *cscmd, *t; + int cmdlen, cmdsize, n, ws, we; + WORD_LIST *cmdlist, *cl; + WORD_DESC *tw; + STRINGLIST *sl; + + bind_compfunc_variables (line, ind, lwords, cw, 1); + cmdlist = build_arg_list (cs->command, cmd, text, lwords, cw); + + /* Estimate the size needed for the buffer. */ + n = strlen (cs->command); + cmdsize = n + 1; + for (cl = cmdlist->next; cl; cl = cl->next) + cmdsize += STRLEN (cl->word->word) + 3; + cmdsize += 2; + + /* allocate the string for the command and fill it in. */ + cscmd = (char *)xmalloc (cmdsize + 1); + + strcpy (cscmd, cs->command); /* $0 */ + cmdlen = n; + cscmd[cmdlen++] = ' '; + for (cl = cmdlist->next; cl; cl = cl->next) /* $1, $2, $3, ... */ + { + t = sh_single_quote (cl->word->word ? cl->word->word : ""); + n = strlen (t); + RESIZE_MALLOCED_BUFFER (cscmd, cmdlen, n + 2, cmdsize, 64); + strcpy (cscmd + cmdlen, t); + cmdlen += n; + if (cl->next) + cscmd[cmdlen++] = ' '; + free (t); + } + cscmd[cmdlen] = '\0'; + + tw = command_substitute (cscmd, 0, 0); + csbuf = tw ? tw->word : (char *)NULL; + if (tw) + dispose_word_desc (tw); + + /* Now clean up and destroy everything. */ + dispose_words (cmdlist); + free (cscmd); + unbind_compfunc_variables (1); + + if (csbuf == 0 || *csbuf == '\0') + { + FREE (csbuf); + return ((STRINGLIST *)NULL); + } + + /* Now break CSBUF up at newlines, with backslash allowed to escape a + newline, and put the individual words into a STRINGLIST. */ + sl = strlist_create (16); + for (ws = 0; csbuf[ws]; ) + { + we = ws; + while (csbuf[we] && csbuf[we] != '\n') + { + if (csbuf[we] == '\\' && csbuf[we+1] == '\n') + we++; + we++; + } + t = substring (csbuf, ws, we); + if (sl->list_len >= sl->list_size - 1) + strlist_resize (sl, sl->list_size + 16); + sl->list[sl->list_len++] = t; + while (csbuf[we] == '\n') we++; + ws = we; + } + sl->list[sl->list_len] = (char *)NULL; + + free (csbuf); + return (sl); +} + +static WORD_LIST * +command_line_to_word_list (line, llen, sentinel, nwp, cwp) + char *line; + int llen, sentinel, *nwp, *cwp; +{ + WORD_LIST *ret; + char *delims; + +#if 0 + delims = "()<>;&| \t\n"; /* shell metacharacters break words */ +#else + delims = rl_completer_word_break_characters; +#endif + ret = split_at_delims (line, llen, delims, sentinel, SD_NOQUOTEDELIM|SD_COMPLETE, nwp, cwp); + return (ret); +} + +/* Evaluate COMPSPEC *cs and return all matches for WORD. */ + +STRINGLIST * +gen_compspec_completions (cs, cmd, word, start, end, foundp) + COMPSPEC *cs; + const char *cmd; + const char *word; + int start, end; + int *foundp; +{ + STRINGLIST *ret, *tmatches; + char *line; + int llen, nw, cw, found, foundf; + WORD_LIST *lwords; + WORD_DESC *lw; + COMPSPEC *tcs; + + found = 1; + +#ifdef DEBUG + debug_printf ("gen_compspec_completions (%s, %s, %d, %d)", cmd, word, start, end); + debug_printf ("gen_compspec_completions: %s -> %p", cmd, cs); +#endif + ret = gen_action_completions (cs, word); +#ifdef DEBUG + if (ret && progcomp_debug) + { + debug_printf ("gen_action_completions (%p, %s) -->", cs, word); + strlist_print (ret, "\t"); + rl_on_new_line (); + } +#endif + + /* Now we start generating completions based on the other members of CS. */ + if (cs->globpat) + { + tmatches = gen_globpat_matches (cs, word); + if (tmatches) + { +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("gen_globpat_matches (%p, %s) -->", cs, word); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + rl_filename_completion_desired = 1; + } + } + + if (cs->words) + { + tmatches = gen_wordlist_matches (cs, word); + if (tmatches) + { +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("gen_wordlist_matches (%p, %s) -->", cs, word); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + } + } + + lwords = (WORD_LIST *)NULL; + line = (char *)NULL; + if (cs->command || cs->funcname) + { + /* If we have a command or function to execute, we need to first break + the command line into individual words, find the number of words, + and find the word in the list containing the word to be completed. */ + line = substring (pcomp_line, start, end); + llen = end - start; + +#ifdef DEBUG + debug_printf ("command_line_to_word_list (%s, %d, %d, %p, %p)", + line, llen, pcomp_ind - start, &nw, &cw); +#endif + lwords = command_line_to_word_list (line, llen, pcomp_ind - start, &nw, &cw); + /* If we skipped a NULL word at the beginning of the line, add it back */ + if (lwords && lwords->word && cmd[0] == 0 && lwords->word->word[0] != 0) + { + lw = make_bare_word (cmd); + lwords = make_word_list (lw, lwords); + nw++; + cw++; + } +#ifdef DEBUG + if (lwords == 0 && llen > 0) + debug_printf ("ERROR: command_line_to_word_list returns NULL"); + else if (progcomp_debug) + { + debug_printf ("command_line_to_word_list -->"); + printf ("\t"); + print_word_list (lwords, "!"); + printf ("\n"); + fflush(stdout); + rl_on_new_line (); + } +#endif + } + + if (cs->funcname) + { + foundf = 0; + tmatches = gen_shell_function_matches (cs, cmd, word, line, pcomp_ind - start, lwords, nw, cw, &foundf); + if (foundf != 0) + found = foundf; + if (tmatches) + { +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("gen_shell_function_matches (%p, %s, %s, %p, %d, %d) -->", cs, cmd, word, lwords, nw, cw); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + } + } + + if (cs->command) + { + tmatches = gen_command_matches (cs, cmd, word, line, pcomp_ind - start, lwords, nw, cw); + if (tmatches) + { +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("gen_command_matches (%p, %s, %s, %p, %d, %d) -->", cs, cmd, word, lwords, nw, cw); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + } + } + + if (cs->command || cs->funcname) + { + if (lwords) + dispose_words (lwords); + FREE (line); + } + + if (foundp) + *foundp = found; + + if (found == 0 || (found & PCOMP_RETRYFAIL)) + { + strlist_dispose (ret); + return NULL; + } + + if (cs->filterpat) + { + tmatches = filter_stringlist (ret, cs->filterpat, word); +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("filter_stringlist (%p, %s, %s) -->", ret, cs->filterpat, word); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + if (ret && ret != tmatches) + { + FREE (ret->list); + free (ret); + } + ret = tmatches; + } + + if (cs->prefix || cs->suffix) + ret = strlist_prefix_suffix (ret, cs->prefix, cs->suffix); + + /* If no matches have been generated and the user has specified that + directory completion should be done as a default, call + gen_action_completions again to generate a list of matching directory + names. */ + if ((ret == 0 || ret->list_len == 0) && (cs->options & COPT_DIRNAMES)) + { + tcs = compspec_create (); + tcs->actions = CA_DIRECTORY; + FREE (ret); + ret = gen_action_completions (tcs, word); + compspec_dispose (tcs); + } + else if (cs->options & COPT_PLUSDIRS) + { + tcs = compspec_create (); + tcs->actions = CA_DIRECTORY; + tmatches = gen_action_completions (tcs, word); + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + compspec_dispose (tcs); + } + + return (ret); +} + +void +pcomp_set_readline_variables (flags, nval) + int flags, nval; +{ + /* If the user specified that the compspec returns filenames, make + sure that readline knows it. */ + if (flags & COPT_FILENAMES) + rl_filename_completion_desired = nval; + /* If the user doesn't want a space appended, tell readline. */ + if (flags & COPT_NOSPACE) + rl_completion_suppress_append = nval; + /* The value here is inverted, since the default is on and the `noquote' + option is supposed to turn it off */ + if (flags & COPT_NOQUOTE) + rl_filename_quoting_desired = 1 - nval; + if (flags & COPT_NOSORT) + rl_sort_completion_matches = 1 - nval; +} + +/* Set or unset FLAGS in the options word of the current compspec. + SET_OR_UNSET is 1 for setting, 0 for unsetting. */ +void +pcomp_set_compspec_options (cs, flags, set_or_unset) + COMPSPEC *cs; + int flags, set_or_unset; +{ + if (cs == 0 && ((cs = pcomp_curcs) == 0)) + return; + if (set_or_unset) + cs->options |= flags; + else + cs->options &= ~flags; +} + +static STRINGLIST * +gen_progcomp_completions (ocmd, cmd, word, start, end, foundp, retryp, lastcs) + const char *ocmd; + const char *cmd; + const char *word; + int start, end; + int *foundp, *retryp; + COMPSPEC **lastcs; +{ + COMPSPEC *cs, *oldcs; + const char *oldcmd, *oldtxt; + STRINGLIST *ret; + + cs = progcomp_search (ocmd); + + if (cs == 0 || cs == *lastcs) + { +#if 0 + if (foundp) + *foundp = 0; +#endif + return (NULL); + } + + if (*lastcs) + compspec_dispose (*lastcs); + cs->refcount++; /* XXX */ + *lastcs = cs; + + cs = compspec_copy (cs); + + oldcs = pcomp_curcs; + oldcmd = pcomp_curcmd; + oldtxt = pcomp_curtxt; + + pcomp_curcs = cs; + pcomp_curcmd = cmd; + pcomp_curtxt = word; + + ret = gen_compspec_completions (cs, cmd, word, start, end, foundp); + + pcomp_curcs = oldcs; + pcomp_curcmd = oldcmd; + pcomp_curtxt = oldtxt; + + /* We need to conditionally handle setting *retryp here */ + if (retryp) + *retryp = foundp && (*foundp & PCOMP_RETRYFAIL); + + if (foundp) + { + *foundp &= ~PCOMP_RETRYFAIL; + *foundp |= cs->options; + } + + compspec_dispose (cs); + return ret; +} + +/* The driver function for the programmable completion code. Returns a list + of matches for WORD, which is an argument to command CMD. START and END + bound the command currently being completed in pcomp_line (usually + rl_line_buffer). */ +char ** +programmable_completions (cmd, word, start, end, foundp) + const char *cmd; + const char *word; + int start, end, *foundp; +{ + COMPSPEC *lastcs; + STRINGLIST *ret; + char **rmatches, *t; + int found, retry, count; + char *ocmd; + int oend; +#if defined (ALIAS) + alias_t *al; +#endif + + lastcs = 0; + found = count = 0; + + pcomp_line = rl_line_buffer; + pcomp_ind = rl_point; + + ocmd = (char *)cmd; + oend = end; + + do + { + retry = 0; + + /* We look at the basename of CMD if the full command does not have + an associated COMPSPEC. */ + ret = gen_progcomp_completions (ocmd, ocmd, word, start, oend, &found, &retry, &lastcs); + if (found == 0) + { + t = strrchr (ocmd, '/'); + if (t && *(++t)) + ret = gen_progcomp_completions (t, ocmd, word, start, oend, &found, &retry, &lastcs); + } + + if (found == 0) + ret = gen_progcomp_completions (DEFAULTCMD, ocmd, word, start, oend, &found, &retry, &lastcs); + +#if defined (ALIAS) + /* Look up any alias for CMD, try to gen completions for it */ + /* Look up the alias, find the value, build a new line replacing CMD + with that value, offsetting PCOMP_IND and END appropriately, reset + PCOMP_LINE to the new line and OCMD with the new command name, then + call gen_progcomp_completions again. We could use alias_expand for + this, but it does more (and less) than we need right now. */ + if (found == 0 && retry == 0 && progcomp_alias && (al = find_alias (ocmd))) + { + char *ncmd, *nline, *ntxt; + int ind, lendiff; + size_t nlen, olen, llen; + + /* We found an alias for OCMD. Take the value and build a new line */ + ntxt = al->value; + nlen = strlen (ntxt); + if (nlen == 0) + break; + olen = strlen (ocmd); + lendiff = nlen - olen; /* can be negative */ + llen = strlen (pcomp_line); + + nline = (char *)xmalloc (llen + lendiff + 1); + if (start > 0) + strncpy (nline, pcomp_line, start); + strncpy (nline + start, ntxt, nlen); + strcpy (nline + start + nlen, pcomp_line + start + olen); + + /* Find the first word of the alias value and use that as OCMD. We + don't check the alias value to see whether it begins with a valid + command name, so this can be fooled. */ + ind = skip_to_delim (ntxt, 0, "()<>;&| \t\n", SD_NOJMP|SD_COMPLETE); + if (ind > 0) + ncmd = substring (ntxt, 0, ind); + else + { + free (nline); + break; /* will free pcomp_line and ocmd later */ + } + + /* Adjust PCOMP_IND and OEND appropriately */ + pcomp_ind += lendiff; + oend += lendiff; + + /* Set up values with new line. WORD stays the same. */ + if (ocmd != cmd) + free (ocmd); + if (pcomp_line != rl_line_buffer) + free (pcomp_line); + + ocmd = ncmd; + pcomp_line = nline; + + /* And go back and start over. */ + retry = 1; + } +#endif /* ALIAS */ + + count++; + + if (count > 32) + { + internal_warning (_("programmable_completion: %s: possible retry loop"), cmd); + break; + } + } + while (retry); + + if (pcomp_line != rl_line_buffer) + free (pcomp_line); + if (ocmd != cmd) + free (ocmd); + + if (ret) + { + rmatches = ret->list; + free (ret); + } + else + rmatches = (char **)NULL; + + if (foundp) + *foundp = found; + + if (lastcs) /* XXX - should be while? */ + compspec_dispose (lastcs); + + /* XXX restore pcomp_line and pcomp_ind? */ + pcomp_line = rl_line_buffer; + pcomp_ind = rl_point; + + return (rmatches); +} + +#endif /* PROGRAMMABLE_COMPLETION */ diff --git a/bash-5.1/pcomplete.h b/bash-5.1/pcomplete.h new file mode 100644 index 0000000000000000000000000000000000000000..2a68e6a3f0c9c94071bb5574bceec957040190c5 --- /dev/null +++ b/bash-5.1/pcomplete.h @@ -0,0 +1,177 @@ +/* pcomplete.h - structure definitions and other stuff for programmable + completion. */ + +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_PCOMPLETE_H_) +# define _PCOMPLETE_H_ + +#include "stdc.h" +#include "hashlib.h" + +typedef struct compspec { + int refcount; + unsigned long actions; + unsigned long options; + char *globpat; + char *words; + char *prefix; + char *suffix; + char *funcname; + char *command; + char *lcommand; + char *filterpat; +} COMPSPEC; + +/* Values for COMPSPEC actions. These are things the shell knows how to + build internally. */ +#define CA_ALIAS (1<<0) +#define CA_ARRAYVAR (1<<1) +#define CA_BINDING (1<<2) +#define CA_BUILTIN (1<<3) +#define CA_COMMAND (1<<4) +#define CA_DIRECTORY (1<<5) +#define CA_DISABLED (1<<6) +#define CA_ENABLED (1<<7) +#define CA_EXPORT (1<<8) +#define CA_FILE (1<<9) +#define CA_FUNCTION (1<<10) +#define CA_GROUP (1<<11) +#define CA_HELPTOPIC (1<<12) +#define CA_HOSTNAME (1<<13) +#define CA_JOB (1<<14) +#define CA_KEYWORD (1<<15) +#define CA_RUNNING (1<<16) +#define CA_SERVICE (1<<17) +#define CA_SETOPT (1<<18) +#define CA_SHOPT (1<<19) +#define CA_SIGNAL (1<<20) +#define CA_STOPPED (1<<21) +#define CA_USER (1<<22) +#define CA_VARIABLE (1<<23) + +/* Values for COMPSPEC options field. */ +#define COPT_RESERVED (1<<0) /* reserved for other use */ +#define COPT_DEFAULT (1<<1) +#define COPT_FILENAMES (1<<2) +#define COPT_DIRNAMES (1<<3) +#define COPT_NOQUOTE (1<<4) +#define COPT_NOSPACE (1<<5) +#define COPT_BASHDEFAULT (1<<6) +#define COPT_PLUSDIRS (1<<7) +#define COPT_NOSORT (1<<8) + +#define COPT_LASTUSER COPT_NOSORT + +#define PCOMP_RETRYFAIL (COPT_LASTUSER << 1) +#define PCOMP_NOTFOUND (COPT_LASTUSER << 2) + + +/* List of items is used by the code that implements the programmable + completions. */ +typedef struct _list_of_items { + int flags; + int (*list_getter) PARAMS((struct _list_of_items *)); /* function to call to get the list */ + + STRINGLIST *slist; + + /* These may or may not be used. */ + STRINGLIST *genlist; /* for handing to the completion code one item at a time */ + int genindex; /* index of item last handed to completion code */ + +} ITEMLIST; + +/* Values for ITEMLIST -> flags */ +#define LIST_DYNAMIC 0x001 +#define LIST_DIRTY 0x002 +#define LIST_INITIALIZED 0x004 +#define LIST_MUSTSORT 0x008 +#define LIST_DONTFREE 0x010 +#define LIST_DONTFREEMEMBERS 0x020 + +#define EMPTYCMD "_EmptycmD_" +#define DEFAULTCMD "_DefaultCmD_" +#define INITIALWORD "_InitialWorD_" + +extern HASH_TABLE *prog_completes; + +extern char *pcomp_line; +extern int pcomp_ind; + +extern int prog_completion_enabled; +extern int progcomp_alias; + +/* Not all of these are used yet. */ +extern ITEMLIST it_aliases; +extern ITEMLIST it_arrayvars; +extern ITEMLIST it_bindings; +extern ITEMLIST it_builtins; +extern ITEMLIST it_commands; +extern ITEMLIST it_directories; +extern ITEMLIST it_disabled; +extern ITEMLIST it_enabled; +extern ITEMLIST it_exports; +extern ITEMLIST it_files; +extern ITEMLIST it_functions; +extern ITEMLIST it_groups; +extern ITEMLIST it_helptopics; +extern ITEMLIST it_hostnames; +extern ITEMLIST it_jobs; +extern ITEMLIST it_keywords; +extern ITEMLIST it_running; +extern ITEMLIST it_services; +extern ITEMLIST it_setopts; +extern ITEMLIST it_shopts; +extern ITEMLIST it_signals; +extern ITEMLIST it_stopped; +extern ITEMLIST it_users; +extern ITEMLIST it_variables; + +extern COMPSPEC *pcomp_curcs; +extern const char *pcomp_curcmd; + +/* Functions from pcomplib.c */ +extern COMPSPEC *compspec_create PARAMS((void)); +extern void compspec_dispose PARAMS((COMPSPEC *)); +extern COMPSPEC *compspec_copy PARAMS((COMPSPEC *)); + +extern void progcomp_create PARAMS((void)); +extern void progcomp_flush PARAMS((void)); +extern void progcomp_dispose PARAMS((void)); + +extern int progcomp_size PARAMS((void)); + +extern int progcomp_insert PARAMS((char *, COMPSPEC *)); +extern int progcomp_remove PARAMS((char *)); + +extern COMPSPEC *progcomp_search PARAMS((const char *)); + +extern void progcomp_walk PARAMS((hash_wfunc *)); + +/* Functions from pcomplete.c */ +extern void set_itemlist_dirty PARAMS((ITEMLIST *)); + +extern STRINGLIST *completions_to_stringlist PARAMS((char **)); + +extern STRINGLIST *gen_compspec_completions PARAMS((COMPSPEC *, const char *, const char *, int, int, int *)); +extern char **programmable_completions PARAMS((const char *, const char *, int, int, int *)); + +extern void pcomp_set_readline_variables PARAMS((int, int)); +extern void pcomp_set_compspec_options PARAMS((COMPSPEC *, int, int)); +#endif /* _PCOMPLETE_H_ */ diff --git a/bash-5.1/pcomplib.c b/bash-5.1/pcomplib.c new file mode 100644 index 0000000000000000000000000000000000000000..075fce7374c802d3ab330e592b414c51a0b1d155 --- /dev/null +++ b/bash-5.1/pcomplib.c @@ -0,0 +1,228 @@ +/* pcomplib.c - library functions for programmable completion. */ + +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#if defined (PROGRAMMABLE_COMPLETION) + +#include "bashansi.h" +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include "bashintl.h" + +#include "shell.h" +#include "pcomplete.h" + +#define COMPLETE_HASH_BUCKETS 256 /* must be power of two */ + +#define STRDUP(x) ((x) ? savestring (x) : (char *)NULL) + +HASH_TABLE *prog_completes = (HASH_TABLE *)NULL; + +static void free_progcomp PARAMS((PTR_T)); + +COMPSPEC * +compspec_create () +{ + COMPSPEC *ret; + + ret = (COMPSPEC *)xmalloc (sizeof (COMPSPEC)); + ret->refcount = 0; + + ret->actions = (unsigned long)0; + ret->options = (unsigned long)0; + + ret->globpat = (char *)NULL; + ret->words = (char *)NULL; + ret->prefix = (char *)NULL; + ret->suffix = (char *)NULL; + ret->funcname = (char *)NULL; + ret->command = (char *)NULL; + ret->lcommand = (char *)NULL; + ret->filterpat = (char *)NULL; + + return ret; +} + +void +compspec_dispose (cs) + COMPSPEC *cs; +{ + cs->refcount--; + if (cs->refcount == 0) + { + FREE (cs->globpat); + FREE (cs->words); + FREE (cs->prefix); + FREE (cs->suffix); + FREE (cs->funcname); + FREE (cs->command); + FREE (cs->lcommand); + FREE (cs->filterpat); + + free (cs); + } +} + +COMPSPEC * +compspec_copy (cs) + COMPSPEC *cs; +{ + COMPSPEC *new; + + new = (COMPSPEC *)xmalloc (sizeof (COMPSPEC)); + + new->refcount = 1; /* was cs->refcount, but this is a fresh copy */ + new->actions = cs->actions; + new->options = cs->options; + + new->globpat = STRDUP (cs->globpat); + new->words = STRDUP (cs->words); + new->prefix = STRDUP (cs->prefix); + new->suffix = STRDUP (cs->suffix); + new->funcname = STRDUP (cs->funcname); + new->command = STRDUP (cs->command); + new->lcommand = STRDUP (cs->lcommand); + new->filterpat = STRDUP (cs->filterpat); + + return new; +} + +void +progcomp_create () +{ + if (prog_completes == 0) + prog_completes = hash_create (COMPLETE_HASH_BUCKETS); +} + +int +progcomp_size () +{ + return (HASH_ENTRIES (prog_completes)); +} + +static void +free_progcomp (data) + PTR_T data; +{ + COMPSPEC *cs; + + cs = (COMPSPEC *)data; + compspec_dispose (cs); +} + +void +progcomp_flush () +{ + if (prog_completes) + hash_flush (prog_completes, free_progcomp); +} + +void +progcomp_dispose () +{ + if (prog_completes) + hash_dispose (prog_completes); + prog_completes = (HASH_TABLE *)NULL; +} + +int +progcomp_remove (cmd) + char *cmd; +{ + register BUCKET_CONTENTS *item; + + if (prog_completes == 0) + return 1; + + item = hash_remove (cmd, prog_completes, 0); + if (item) + { + if (item->data) + free_progcomp (item->data); + free (item->key); + free (item); + return (1); + } + return (0); +} + +int +progcomp_insert (cmd, cs) + char *cmd; + COMPSPEC *cs; +{ + register BUCKET_CONTENTS *item; + + if (cs == NULL) + programming_error (_("progcomp_insert: %s: NULL COMPSPEC"), cmd); + + if (prog_completes == 0) + progcomp_create (); + + cs->refcount++; + item = hash_insert (cmd, prog_completes, 0); + if (item->data) + free_progcomp (item->data); + else + item->key = savestring (cmd); + item->data = cs; + + return 1; +} + +COMPSPEC * +progcomp_search (cmd) + const char *cmd; +{ + register BUCKET_CONTENTS *item; + COMPSPEC *cs; + + if (prog_completes == 0) + return ((COMPSPEC *)NULL); + + item = hash_search (cmd, prog_completes, 0); + + if (item == NULL) + return ((COMPSPEC *)NULL); + + cs = (COMPSPEC *)item->data; + + return (cs); +} + +void +progcomp_walk (pfunc) + hash_wfunc *pfunc; +{ + if (prog_completes == 0 || pfunc == 0 || HASH_ENTRIES (prog_completes) == 0) + return; + + hash_walk (prog_completes, pfunc); +} + +#endif /* PROGRAMMABLE_COMPLETION */ diff --git a/bash-5.1/po/LINGUAS b/bash-5.1/po/LINGUAS new file mode 100644 index 0000000000000000000000000000000000000000..27165b3b8a268cfa7d7c56ba9f6fb9cfe3335e45 --- /dev/null +++ b/bash-5.1/po/LINGUAS @@ -0,0 +1,2 @@ +# Set of available languages. +en@quot en@boldquot af bg ca cs da de el eo es et fi fr ga gl hr hu id it ja ko lt nb nl pl pt pt_BR ro ru sk sl sr sv tr uk vi zh_CN zh_TW diff --git a/bash-5.1/po/Makefile.in.in b/bash-5.1/po/Makefile.in.in new file mode 100644 index 0000000000000000000000000000000000000000..6f0abed110a04b4c53cd5cc7f44f48821262a7c0 --- /dev/null +++ b/bash-5.1/po/Makefile.in.in @@ -0,0 +1,359 @@ +# Makefile for PO directory in any package using GNU gettext. +# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License but which still want to provide support for the GNU gettext +# functionality. +# Please note that the actual code of GNU gettext is covered by the GNU +# General Public License and is *not* in the public domain. + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +datarootdir = @datarootdir@ +datadir = @datadir@ +localedir = @localedir@ + +gettextsrcdir = $(datadir)/gettext/po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(top_srcdir)/support/mkinstalldirs +mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + +GMSGFMT = @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGMERGE = msgmerge +MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +UPDATEPOFILES = @UPDATEPOFILES@ +DUMMYPOFILES = @DUMMYPOFILES@ +DISTFILES.common = Makefile.in.in remove-potcdate.sin \ +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ +$(POFILES) $(GMOFILES) \ +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + +POTFILES = \ + +CATALOGS = @CATALOGS@ + +# Makevars gets inserted here. (Don't remove this line!) + +.SUFFIXES: +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update + +.po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + +.sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + + +all: all-@USE_NLS@ + +all-yes: stamp-po +all-no: + +# stamp-po is a timestamp denoting the last time at which the CATALOGS have +# been loosely updated. Its purpose is that when a developer or translator +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent +# invocations of "make" will do nothing. This timestamp would not be necessary +# if updating the $(CATALOGS) would always touch them; however, the rule for +# $(POFILES) has been designed to not touch files that don't need to be +# changed. +stamp-po: $(srcdir)/$(DOMAIN).pot + test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS) + @echo "touch stamp-po" + @echo timestamp > stamp-poT + @mv stamp-poT stamp-po + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' + $(MAKE) $(MFLAGS) builtins.pot-update + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +install-strip: install + +installdirs: installdirs-exec installdirs-data +installdirs-exec: +installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi +installdirs-data-no: +installdirs-data-yes: + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: uninstall-exec uninstall-data +uninstall-exec: +uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +uninstall-data-no: +uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +check: all + +info dvi ps pdf html tags TAGS ctags CTAGS ID: + +mostlyclean: + rm -f remove-potcdate.sed + rm -f stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo stamp-po + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f stamp-po $(GMOFILES) + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: + $(MAKE) update-po + @$(MAKE) dist2 +# This is a separate target because 'update-po' must be executed before. +dist2: $(DISTFILES) + dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir); \ + else \ + cp -p $(srcdir)/$$file $(distdir); \ + fi; \ + done + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ $(srcdir)/Rules-builtins + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +force: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/bash-5.1/po/Makevars b/bash-5.1/po/Makevars new file mode 100644 index 0000000000000000000000000000000000000000..84b2d956230ff525480b887c5cfdff8625b8d731 --- /dev/null +++ b/bash-5.1/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = $(BUILD_DIR) + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ -C + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = bug-bash@gnu.org + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/bash-5.1/po/POTFILES.in b/bash-5.1/po/POTFILES.in new file mode 100644 index 0000000000000000000000000000000000000000..2a8f369473848c8a381c21618e98adf2d6b1e1cd --- /dev/null +++ b/bash-5.1/po/POTFILES.in @@ -0,0 +1,81 @@ +# List of source files containing translatable strings. +# Copyright (C) 2004 Free Software Foundation, Inc. + +arrayfunc.c +bashhist.c +bashline.c +braces.c +builtins/alias.def +builtins/bind.def +builtins/break.def +builtins/caller.def +builtins/cd.def +builtins/common.c +builtins/complete.def +builtins/declare.def +builtins/enable.def +builtins/evalfile.c +builtins/exec.def +builtins/exit.def +builtins/fc.def +builtins/fg_bg.def +builtins/getopt.c +builtins/hash.def +builtins/help.def +builtins/history.def +builtins/inlib.def +builtins/jobs.def +builtins/kill.def +builtins/let.def +builtins/mapfile.def +builtins/mkbuiltins.c +builtins/printf.def +builtins/pushd.def +builtins/read.def +builtins/return.def +builtins/set.def +builtins/setattr.def +builtins/shift.def +builtins/shopt.def +builtins/source.def +builtins/suspend.def +builtins/type.def +builtins/ulimit.def +builtins/umask.def +error.c +eval.c +execute_cmd.c +expr.c +general.c +input.c +jobs.c +lib/intl/os2compat.c +lib/malloc/malloc.c +lib/malloc/stats.c +lib/malloc/table.c +lib/malloc/watch.c +lib/sh/fmtulong.c +lib/sh/netopen.c +locale.c +mailcheck.c +make_cmd.c +nojobs.c +parse.y +pcomplete.c +pcomplib.c +print_cmd.c +redir.c +shell.c +sig.c +siglist.c +subst.c +test.c +trap.c +variables.c +version.c +version2.c +xmalloc.c + +# Apparently gettext's defaults cannot handle files that exist outside of the +# source directory, like in the build directory +#../builtins/builtins.c diff --git a/bash-5.1/po/README b/bash-5.1/po/README new file mode 100644 index 0000000000000000000000000000000000000000..979884c634d732df338714d71a1bcdd0538a3d77 --- /dev/null +++ b/bash-5.1/po/README @@ -0,0 +1 @@ +This apparently requires GNU sed diff --git a/bash-5.1/po/Rules-builtins b/bash-5.1/po/Rules-builtins new file mode 100644 index 0000000000000000000000000000000000000000..57df81c9cd7beb592ea2370d3cbee9302e4f8f20 --- /dev/null +++ b/bash-5.1/po/Rules-builtins @@ -0,0 +1,19 @@ +# +# Update the strings from the builtins' long docs. Must be called when +# bash.pot exists, in the middle of the bash.pot-update recipe +# +builtins.pot-update: $(top_builddir)/builtins/builtins.c + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_builddir)/builtins \ + $(XGETTEXT_OPTIONS) --omit-header \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --join-existing \ + builtins.c + +# This rule has no dependencies: we don't need to update builtins.pot at +# every "make" invocation, only create it when it is missing. +# Only "make builtins.pot-update" or "make dist" will force an update. +$(srcdir)/builtins.pot: + $(MAKE) builtins.pot-update + +xdist: + $(MAKE) update-po diff --git a/bash-5.1/po/Rules-quot b/bash-5.1/po/Rules-quot new file mode 100644 index 0000000000000000000000000000000000000000..5f46d237d2593c674ab34518cf342553fe0f6aef --- /dev/null +++ b/bash-5.1/po/Rules-quot @@ -0,0 +1,42 @@ +# Special Makefile rules for English message catalogs with quotation marks. + +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot + +.SUFFIXES: .insert-header .po-update-en + +en@quot.po-update: en@quot.po-update-en +en@boldquot.po-update: en@boldquot.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@quot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header + +en@boldquot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header + +mostlyclean: mostlyclean-quot +mostlyclean-quot: + rm -f *.insert-header diff --git a/bash-5.1/po/af.gmo b/bash-5.1/po/af.gmo new file mode 100644 index 0000000000000000000000000000000000000000..28fbbfb6732df3cea30cd3b6bdc3db7afc1e74ec Binary files /dev/null and b/bash-5.1/po/af.gmo differ diff --git a/bash-5.1/po/af.po b/bash-5.1/po/af.po new file mode 100644 index 0000000000000000000000000000000000000000..c35068142285172a54c41f0e3d9d0ae7eb01676f --- /dev/null +++ b/bash-5.1/po/af.po @@ -0,0 +1,4909 @@ +# bash +# Copyright (C) 2004 Free Software Foundation, Inc. +# Petri Jooste , 2004. +# +msgid "" +msgstr "" +"Project-Id-Version: bash 2.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2004-03-17 13:48+0200\n" +"Last-Translator: Petri Jooste \n" +"Language-Team: Afrikaans \n" +"Language: af\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" + +#: arrayfunc.c:66 +#, fuzzy +msgid "bad array subscript" +msgstr "Os/2 Biskaart Skikking" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: kan nie %s skep nie" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "%s: bevel nie gevind nie" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "" + +#: builtins/bind.def:252 +#, fuzzy, c-format +msgid "%s: cannot read: %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, fuzzy, c-format +msgid "`%s': unknown function name" +msgstr "%s: leesalleen-funksie" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "" + +#: builtins/bind.def:378 builtins/bind.def:395 +#, fuzzy, c-format +msgid "`%s': cannot unbind" +msgstr "%s: bevel nie gevind nie" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "" + +#: builtins/caller.def:136 +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +#, fuzzy +msgid "too many arguments" +msgstr "te veel parameters" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "boonste lergids." + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "" + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "" + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, fuzzy, c-format +msgid "%s: option requires an argument" +msgstr "%s: option `%s' requires an argument\n" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "" + +#: builtins/common.c:207 +#, fuzzy, c-format +msgid "%s: not found" +msgstr "%s: bevel nie gevind nie" + +#: builtins/common.c:216 shell.c:857 +#, fuzzy, c-format +msgid "%s: invalid option" +msgstr "%s: illegal option -- %c\n" + +#: builtins/common.c:223 +#, fuzzy, c-format +msgid "%s: invalid option name" +msgstr "%s: illegal option -- %c\n" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, fuzzy, c-format +msgid "`%s': not a valid identifier" +msgstr "Die datum is nie geldige!" + +#: builtins/common.c:240 +#, fuzzy +msgid "invalid octal number" +msgstr "Die sein nommer wat was gevang het" + +#: builtins/common.c:242 +#, fuzzy +msgid "invalid hex number" +msgstr "Die sein nommer wat was gevang het" + +#: builtins/common.c:244 expr.c:1569 +#, fuzzy +msgid "invalid number" +msgstr "Die sein nommer wat was gevang het" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "" + +#: builtins/common.c:266 error.c:510 +#, fuzzy, c-format +msgid "%s: readonly variable" +msgstr "Veranderlike boom" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "" + +#: builtins/common.c:274 builtins/common.c:276 +#, fuzzy +msgid "argument" +msgstr "argument verwag\n" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "" + +#: builtins/common.c:292 +#, fuzzy, c-format +msgid "%s: no job control" +msgstr "geen taakbeheer in hierdie dop nie" + +#: builtins/common.c:294 +#, fuzzy +msgid "no job control" +msgstr "geen taakbeheer in hierdie dop nie" + +#: builtins/common.c:304 +#, fuzzy, c-format +msgid "%s: restricted" +msgstr "Die bediener beindig Die verbinding." + +#: builtins/common.c:306 +msgid "restricted" +msgstr "" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "" + +#: builtins/common.c:323 +#, fuzzy, c-format +msgid "write error: %s" +msgstr "pypfout: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "" + +#: builtins/common.c:701 builtins/common.c:703 +#, fuzzy, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: dubbelsinnige herroetering" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, fuzzy, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, fuzzy, c-format +msgid "%s: cannot unset" +msgstr "%s: kan nie %s skep nie" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: leesalleen-funksie" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, fuzzy, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "Kan nie soek 'n handtekening in hierdie boodskap!" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "" + +#: builtins/enable.def:343 +#, fuzzy, c-format +msgid "cannot open shared object %s: %s" +msgstr "Kan nie oopmaak vir skrip-afvoer nie: \"" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "" + +#: builtins/enable.def:388 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "" + +#: builtins/enable.def:543 +#, fuzzy, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: is 'n gids" + +#: builtins/evalfile.c:144 +#, fuzzy, c-format +msgid "%s: not a regular file" +msgstr "%s: kan nie 'n binre ler uitvoer nie" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: kan nie 'n binre ler uitvoer nie" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, fuzzy, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/exit.def:64 +#, fuzzy, c-format +msgid "logout\n" +msgstr "Afteken" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +#, fuzzy +msgid "no command found" +msgstr "%s: bevel nie gevind nie" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "" + +#: builtins/fc.def:444 +#, fuzzy, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "" + +#: builtins/getopt.c:110 +#, fuzzy, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: illegal option -- %c\n" + +#: builtins/getopt.c:111 +#, fuzzy, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: option `%s' requires an argument\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "" + +#: builtins/hash.def:267 +#, fuzzy, c-format +msgid "hits\tcommand\n" +msgstr "Bevelrel" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "" +msgstr[1] "" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" + +#: builtins/help.def:224 +#, fuzzy, c-format +msgid "%s: cannot open: %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "" + +#: builtins/history.def:451 +#, fuzzy, c-format +msgid "%s: history expansion failed" +msgstr "%s: heelgetal-uitdrukking is verwag\n" + +#: builtins/inlib.def:71 +#, fuzzy, c-format +msgid "%s: inlib failed" +msgstr "Veranderlike boom" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "" + +#: builtins/kill.def:274 +#, fuzzy +msgid "Unknown error" +msgstr "Onbekende fout %d" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +#, fuzzy +msgid "expression expected" +msgstr "Bools uitdrukking verwag" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "" + +#: builtins/mapfile.def:299 +#, fuzzy, c-format +msgid "%s: invalid array origin" +msgstr "Os/2 Biskaart Skikking" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "" + +#: builtins/pushd.def:199 +#, fuzzy +msgid "no other directory" +msgstr "boonste lergids." + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: option `%s' requires an argument\n" + +#: builtins/pushd.def:480 +#, fuzzy +msgid "" +msgstr "Nuutste gebruik word werksaam gids" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "" + +#: builtins/read.def:755 +#, fuzzy, c-format +msgid "read error: %d: %s" +msgstr "pypfout: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" + +#: builtins/set.def:966 +#, fuzzy, c-format +msgid "%s: not an array variable" +msgstr "Veranderlike boom" + +#: builtins/setattr.def:189 +#, fuzzy, c-format +msgid "%s: not a function" +msgstr "%s: leesalleen-funksie" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: kan nie %s skep nie" + +#: builtins/shift.def:72 builtins/shift.def:79 +#, fuzzy +msgid "shift count" +msgstr "Shift" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "" + +#: builtins/source.def:154 +#, fuzzy, c-format +msgid "%s: file not found" +msgstr "%s: bevel nie gevind nie" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "" + +#: builtins/suspend.def:112 +#, fuzzy +msgid "cannot suspend a login shell" +msgstr "Begin aanteken tolk" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "" + +#: builtins/type.def:275 +#, fuzzy, c-format +msgid "%s is a function\n" +msgstr "%s: leesalleen-funksie" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "" + +#: builtins/ulimit.def:426 +#, fuzzy, c-format +msgid "`%c': bad command" +msgstr "%s: illegal option -- %c\n" + +#: builtins/ulimit.def:455 +#, fuzzy, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/ulimit.def:481 +#, fuzzy +msgid "limit" +msgstr "Filter beperk:" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, fuzzy, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/umask.def:115 +#, fuzzy +msgid "octal number" +msgstr "Die sein nommer wat was gevang het" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr "" + +#: error.c:164 +#, fuzzy, c-format +msgid "last command: %s\n" +msgstr "Bevelrel" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +#, fuzzy +msgid "unknown command error" +msgstr "Onbekende fout %d" + +#: error.c:463 +#, fuzzy +msgid "bad command type" +msgstr "bevelnaam" + +#: error.c:464 +#, fuzzy +msgid "bad connector" +msgstr "foutiewe verbinder`%d'" + +#: error.c:465 +#, fuzzy +msgid "bad jump" +msgstr "Spring na:" + +#: error.c:503 +#, fuzzy, c-format +msgid "%s: unbound variable" +msgstr "Veranderlike boom" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +#, fuzzy +msgid "pipe error" +msgstr "pypfout: %s" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: bevel nie gevind nie" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5854 +#, fuzzy, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: is 'n gids" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: kan nie 'n binre ler uitvoer nie" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "" + +#: execute_cmd.c:6029 +#, fuzzy, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "kan nie fd %d na fd 0 dupliseer nie: %s" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "" + +#: expr.c:291 +#, fuzzy +msgid "recursion stack underflow" +msgstr "Stapel grootte verhoog" + +#: expr.c:477 +#, fuzzy +msgid "syntax error in expression" +msgstr "Sintaks fout in patroon" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "Sintaks fout in patroon" + +#: expr.c:544 expr.c:911 +#, fuzzy +msgid "division by 0" +msgstr "devisie by nul." + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "" + +#: expr.c:646 +#, fuzzy +msgid "`:' expected for conditional expression" +msgstr "Soek die ler vir 'n uitdrukking" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" + +#: expr.c:1056 +#, fuzzy +msgid "missing `)'" +msgstr "Ontbrekende '>'" + +#: expr.c:1107 expr.c:1487 +#, fuzzy +msgid "syntax error: operand expected" +msgstr "Onverwagte einde van ler tydens inlees van hulpbron." + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "" + +#: expr.c:1513 +#, fuzzy, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "" +"Hierdie is die fout boodskap van %1:\n" +"%2" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "" + +#: expr.c:1582 +msgid "invalid integer constant" +msgstr "" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "waarde te groot vir basis" + +#: expr.c:1647 +#, fuzzy, c-format +msgid "%s: expression error\n" +msgstr "Pypfout.\n" + +#: general.c:70 +#, fuzzy +msgid "getcwd: cannot access parent directories" +msgstr "Kan nie die program uitvoer nie:" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "" + +#: jobs.c:1850 +#, fuzzy, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "E108: Geen veranderlike: \"%s\"" + +#: jobs.c:1865 +#, fuzzy, c-format +msgid "Signal %d" +msgstr "Sein kwaliteit:" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Klaar" + +#: jobs.c:1884 siglist.c:122 +#, fuzzy +msgid "Stopped" +msgstr "Op gehou" + +#: jobs.c:1888 +#, fuzzy, c-format +msgid "Stopped(%s)" +msgstr "Op gehou" + +#: jobs.c:1892 +#, fuzzy +msgid "Running" +msgstr "aktief" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Klaar(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Verlaat %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Onbekende status" + +#: jobs.c:2001 +#, fuzzy, c-format +msgid "(core dumped) " +msgstr "Kern Ontwikkelaar" + +#: jobs.c:2020 +#, fuzzy, c-format +msgid " (wd: %s)" +msgstr "Aktiveer nou dadelik" + +#: jobs.c:2259 +#, fuzzy, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "Fout in die skryf van %s" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: kan nie %s skep nie" + +#: jobs.c:3571 +#, fuzzy, c-format +msgid "%s: job has terminated" +msgstr "Die bediener beindig Die verbinding." + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "" + +#: jobs.c:4334 nojobs.c:919 +#, fuzzy, c-format +msgid " (core dumped)" +msgstr "Kern Ontwikkelaar" + +#: jobs.c:4346 jobs.c:4359 +#, fuzzy, c-format +msgid "(wd now: %s)\n" +msgstr "Aktiveer nou dadelik" + +#: jobs.c:4391 +#, fuzzy +msgid "initialize_job_control: getpgrp failed" +msgstr "Inisialisering van OpenGL het misluk." + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "" + +#: jobs.c:4473 +#, fuzzy +msgid "initialize_job_control: setpgid" +msgstr "Inisialisering van OpenGL het misluk." + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "geen taakbeheer in hierdie dop nie" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "onbekend" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:1141 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "" + +#: lib/sh/netopen.c:168 +#, fuzzy, c-format +msgid "%s: host unknown" +msgstr "onbekend" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "" + +#: mailcheck.c:439 +#, fuzzy +msgid "You have mail in $_" +msgstr "Bevestig Pos In" + +#: mailcheck.c:464 +#, fuzzy +msgid "You have new mail in $_" +msgstr "Wanneer nuwe pos arriveer in" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "" + +#: make_cmd.c:317 +#, fuzzy +msgid "syntax error: arithmetic expression required" +msgstr "Sintaks fout in patroon" + +#: make_cmd.c:319 +#, fuzzy +msgid "syntax error: `;' unexpected" +msgstr "Onverwagte einde van ler tydens inlees van hulpbron." + +#: make_cmd.c:320 +#, fuzzy, c-format +msgid "syntax error: `((%s))'" +msgstr "sintaksfout" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "" + +#: parse.y:4705 +#, fuzzy +msgid "syntax error in conditional expression" +msgstr "Sintaks fout in patroon" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "" + +#: parse.y:4787 +#, fuzzy +msgid "expected `)'" +msgstr "')' is verwag\n" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "" + +#: parse.y:4865 +#, fuzzy, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "%s: binre operator is verwag\n" + +#: parse.y:4869 +#, fuzzy +msgid "conditional binary operator expected" +msgstr "%s: binre operator is verwag\n" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "" + +#: parse.y:4906 +#, fuzzy, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "Soek die ler vir 'n uitdrukking" + +#: parse.y:4909 +#, fuzzy, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "Soek die ler vir 'n uitdrukking" + +#: parse.y:4913 +#, fuzzy, c-format +msgid "unexpected token %d in conditional command" +msgstr "Soek die ler vir 'n uitdrukking" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "" + +#: parse.y:6355 +#, fuzzy, c-format +msgid "syntax error near `%s'" +msgstr "Sintaks fout in patroon" + +#: parse.y:6365 +#, fuzzy +msgid "syntax error: unexpected end of file" +msgstr "Onverwagte einde van ler tydens inlees van hulpbron." + +#: parse.y:6365 +msgid "syntax error" +msgstr "sintaksfout" + +#: parse.y:6428 +#, fuzzy, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Gebruik Kaart na Los Tronk" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "" + +#: redir.c:204 +#, fuzzy, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: dubbelsinnige herroetering" + +#: redir.c:208 +#, fuzzy, c-format +msgid "%s: cannot overwrite existing file" +msgstr "Jy het gespesifiseer 'n bestaande ler" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "" + +#: redir.c:222 +#, fuzzy, c-format +msgid "%s: cannot assign fd to variable" +msgstr "Kan nie soek 'n handtekening in hierdie boodskap!" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +#, fuzzy +msgid "redirection error: cannot duplicate fd" +msgstr "Pypfout.\n" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, fuzzy, c-format +msgid "%c%c: invalid option" +msgstr "%s: illegal option -- %c\n" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: is 'n gids" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Ek het nie 'n naam nie!" + +#: shell.c:2035 +#, fuzzy, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "bedryfstelselkernweergawe" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" + +#: shell.c:2038 +#, fuzzy +msgid "GNU long options:\n" +msgstr "Gnu C Saamsteller Opsies" + +#: shell.c:2042 +#, fuzzy +msgid "Shell options:\n" +msgstr "opneem opsies" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" + +#: shell.c:2062 +#, fuzzy, c-format +msgid "\t-%s or -o option\n" +msgstr "" +"Gebruik so: %s LER \n" +" of: %s OPSIE\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Foutiewe sein" + +#: siglist.c:50 +#, fuzzy +msgid "Hangup" +msgstr "Ophang" + +#: siglist.c:54 +#, fuzzy +msgid "Interrupt" +msgstr "Interrupt" + +#: siglist.c:58 +#, fuzzy +msgid "Quit" +msgstr "Verlaat" + +#: siglist.c:62 +#, fuzzy +msgid "Illegal instruction" +msgstr "Sigill (onwettige instruksie)" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "" + +#: siglist.c:74 +#, fuzzy +msgid "ABORT instruction" +msgstr "Verwerking Instruksie" + +#: siglist.c:78 +#, fuzzy +msgid "EMT instruction" +msgstr "Verwerking Instruksie" + +#: siglist.c:82 +#, fuzzy +msgid "Floating point exception" +msgstr "wisselpuntgetaluitsondering" + +#: siglist.c:86 +#, fuzzy +msgid "Killed" +msgstr "Doodgemaak proses." + +#: siglist.c:90 +#, fuzzy +msgid "Bus error" +msgstr "Pypfout.\n" + +#: siglist.c:94 +#, fuzzy +msgid "Segmentation fault" +msgstr "Sigsegv (segmentasie oortreding)" + +#: siglist.c:98 +#, fuzzy +msgid "Bad system call" +msgstr "fork-stelselroep het gefaal" + +#: siglist.c:102 +#, fuzzy +msgid "Broken pipe" +msgstr "Sigpipe (gebroke pyp)" + +#: siglist.c:106 +#, fuzzy +msgid "Alarm clock" +msgstr "wreld horlosie" + +#: siglist.c:110 +#, fuzzy +msgid "Terminated" +msgstr "" +"\n" +"Bevel beindig\n" + +#: siglist.c:114 +#, fuzzy +msgid "Urgent IO condition" +msgstr "Ooreenstem enige kondisie" + +#: siglist.c:118 +#, fuzzy +msgid "Stopped (signal)" +msgstr "Sein kwaliteit:" + +#: siglist.c:126 +#, fuzzy +msgid "Continue" +msgstr "Gaan voort" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "" + +#: siglist.c:138 +#, fuzzy +msgid "Stopped (tty input)" +msgstr "Sigttin (tty invoer)" + +#: siglist.c:142 +#, fuzzy +msgid "Stopped (tty output)" +msgstr "Sigttou (tty uitset)" + +#: siglist.c:146 +#, fuzzy +msgid "I/O ready" +msgstr "Gereed." + +#: siglist.c:150 +#, fuzzy +msgid "CPU limit" +msgstr "Filter beperk:" + +#: siglist.c:154 +#, fuzzy +msgid "File limit" +msgstr "Filter beperk:" + +#: siglist.c:158 +#, fuzzy +msgid "Alarm (virtual)" +msgstr "virtuele werkskerms" + +#: siglist.c:162 +#, fuzzy +msgid "Alarm (profile)" +msgstr "Vee profiel uit..." + +#: siglist.c:166 +#, fuzzy +msgid "Window changed" +msgstr "Ler Het verander" + +#: siglist.c:170 +#, fuzzy +msgid "Record lock" +msgstr "Sluit Lers" + +#: siglist.c:174 +#, fuzzy +msgid "User signal 1" +msgstr "Gebruiker Sein 1" + +#: siglist.c:178 +#, fuzzy +msgid "User signal 2" +msgstr "Gebruiker Sein 1" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "" + +#: siglist.c:186 +#, fuzzy +msgid "power failure imminent" +msgstr "Vaaling na Uitpak" + +#: siglist.c:190 +#, fuzzy +msgid "system crash imminent" +msgstr "Die Kde Omval Handteerder" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "" + +#: siglist.c:198 +#, fuzzy +msgid "programming error" +msgstr "Pypfout.\n" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "" + +#: siglist.c:214 +msgid "Information request" +msgstr "" + +#: siglist.c:222 siglist.c:224 +#, fuzzy, c-format +msgid "Unknown Signal #%d" +msgstr "Sein kwaliteit:" + +#: subst.c:1476 subst.c:1666 +#, fuzzy, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "--Geen rels in buffer--" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "" + +#: subst.c:5910 subst.c:5926 +#, fuzzy +msgid "cannot make pipe for process substitution" +msgstr "Woord Substitusie" + +#: subst.c:5985 +#, fuzzy +msgid "cannot make child for process substitution" +msgstr "Woord Substitusie" + +#: subst.c:6059 +#, fuzzy, c-format +msgid "cannot open named pipe %s for reading" +msgstr "Kan nie oopmaak vir skrip-afvoer nie: \"" + +#: subst.c:6061 +#, fuzzy, c-format +msgid "cannot open named pipe %s for writing" +msgstr "Kan nie oopmaak vir skrip-afvoer nie: \"" + +#: subst.c:6084 +#, fuzzy, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "Kan nie oopmaak vir skrip-afvoer nie: \"" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "--Geen rels in buffer--" + +#: subst.c:6353 +#, fuzzy +msgid "cannot make pipe for command substitution" +msgstr "Woord Substitusie" + +#: subst.c:6397 +#, fuzzy +msgid "cannot make child for command substitution" +msgstr "Woord Substitusie" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "Veranderlike boom" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "" + +#: subst.c:7503 subst.c:7518 +#, fuzzy, c-format +msgid "%s: substring expression < 0" +msgstr "ongeldige uitdrukking" + +#: subst.c:9281 subst.c:9302 +#, fuzzy, c-format +msgid "%s: bad substitution" +msgstr "Woord Substitusie" + +#: subst.c:9390 +#, fuzzy, c-format +msgid "$%s: cannot assign in this way" +msgstr "Kan nie soek 'n handtekening in hierdie boodskap!" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" + +#: subst.c:10367 +#, fuzzy, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "--Geen rels in buffer--" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "" + +#: test.c:147 +#, fuzzy +msgid "argument expected" +msgstr "argument verwag\n" + +#: test.c:156 +#, fuzzy, c-format +msgid "%s: integer expression expected" +msgstr "%s: heelgetal-uitdrukking is verwag\n" + +#: test.c:265 +#, fuzzy +msgid "`)' expected" +msgstr "')' is verwag\n" + +#: test.c:267 +#, fuzzy, c-format +msgid "`)' expected, found %s" +msgstr "')' is verwag, maar %s gevind\n" + +#: test.c:466 test.c:799 +#, fuzzy, c-format +msgid "%s: binary operator expected" +msgstr "%s: binre operator is verwag\n" + +#: test.c:756 test.c:759 +#, fuzzy, c-format +msgid "%s: unary operator expected" +msgstr "%s: unitre operator is verwag\n" + +#: test.c:881 +#, fuzzy +msgid "missing `]'" +msgstr "Ontbrekende '>'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "Onverwagte einde van ler tydens inlees van hulpbron." + +#: trap.c:220 +#, fuzzy +msgid "invalid signal number" +msgstr "Die sein nommer wat was gevang het" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" + +#: version.c:86 version2.c:86 +#, fuzzy, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "bedryfstelselkernweergawe" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:95 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: kan nie %s skep nie" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:167 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: kan nie %s skep nie" + +#: builtins.c:45 +#, fuzzy +msgid "alias [-p] [name[=value] ... ]" +msgstr "E418: Ongeldige waarde: %s" + +#: builtins.c:49 +#, fuzzy +msgid "unalias [-a] name [name ...]" +msgstr "Volle Naam:" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" + +#: builtins.c:56 +#, fuzzy +msgid "break [n]" +msgstr "Breek" + +#: builtins.c:58 +#, fuzzy +msgid "continue [n]" +msgstr "Gaan voort" + +#: builtins.c:60 +#, fuzzy +msgid "builtin [shell-builtin [arg ...]]" +msgstr "Ontfouting %1 (met arg %2 %3)" + +#: builtins.c:63 +#, fuzzy +msgid "caller [expr]" +msgstr "/Opsies/Toets" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "init_cache_dir %s... " + +#: builtins.c:68 +#, fuzzy +msgid "pwd [-LP]" +msgstr "miniserv.pl is gestop\n" + +#: builtins.c:76 +#, fuzzy +msgid "command [-pVv] command [arg ...]" +msgstr "Gebruik so: %s [OPSIE] [BEVEL [ARG]...]\n" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "E418: Ongeldige waarde: %s" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "E418: Ongeldige waarde: %s" + +#: builtins.c:82 +#, fuzzy +msgid "local [option] name[=value] ..." +msgstr "Name=Plaaslike Netwerk" + +#: builtins.c:85 +#, fuzzy +msgid "echo [-neE] [arg ...]" +msgstr "Ontfouting %1 (met arg %2 %3)" + +#: builtins.c:89 +#, fuzzy +msgid "echo [-n] [arg ...]" +msgstr "Konfigureer Eggo" + +#: builtins.c:92 +#, fuzzy +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "Teruglus lernaam:" + +#: builtins.c:94 +#, fuzzy +msgid "eval [arg ...]" +msgstr "Ontfouting %1 (met arg %2 %3)" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "Kom ons begin!" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "" + +#: builtins.c:100 +#, fuzzy +msgid "exit [n]" +msgstr "Verlaat" + +#: builtins.c:102 +#, fuzzy +msgid "logout [n]" +msgstr "Afteken" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" + +#: builtins.c:109 +#, fuzzy +msgid "fg [job_spec]" +msgstr "Kort Spesifikasie werkvoorbeeld" + +#: builtins.c:113 +#, fuzzy +msgid "bg [job_spec ...]" +msgstr "Kort Spesifikasie werkvoorbeeld" + +#: builtins.c:116 +#, fuzzy +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "Teruglus lernaam:" + +#: builtins.c:119 +#, fuzzy +msgid "help [-dms] [pattern ...]" +msgstr "enige patroon" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" + +#: builtins.c:136 +#, fuzzy +msgid "let arg [arg ...]" +msgstr "Kom ons begin!" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" + +#: builtins.c:140 +#, fuzzy +msgid "return [n]" +msgstr "Terug Adres - 3/4 x 2\"" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "Gebruik so: %s [OPSIE]... [-] [GEBRUIKER [ARG]...]\n" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "Volle Naam:" + +#: builtins.c:146 +#, fuzzy +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "Bediener of domein naam:" + +#: builtins.c:148 +#, fuzzy +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "Bediener of domein naam:" + +#: builtins.c:150 +#, fuzzy +msgid "shift [n]" +msgstr "Shift" + +#: builtins.c:152 +#, fuzzy +msgid "source filename [arguments]" +msgstr "Kies Lernaam" + +#: builtins.c:154 +#, fuzzy +msgid ". filename [arguments]" +msgstr ". lernaam" + +#: builtins.c:157 +#, fuzzy +msgid "suspend [-f]" +msgstr "|uitsit}\n" + +#: builtins.c:160 +#, fuzzy +msgid "test [expr]" +msgstr "/Opsies/Toets" + +#: builtins.c:162 +#, fuzzy +msgid "[ arg... ]" +msgstr "Arg %1" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "" + +#: builtins.c:168 +#, fuzzy +msgid "type [-afptP] name [name ...]" +msgstr "Tipe die naam van die %1 speler." + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "Grootte beperk (Kb):" + +#: builtins.c:174 +#, fuzzy +msgid "umask [-p] [-S] [mode]" +msgstr "Belmetode" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "Konfigureer Eggo" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "Wag:" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "" + +#: builtins.c:202 +#, fuzzy +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "Bediener of domein naam:" + +#: builtins.c:204 +#, fuzzy +msgid "{ COMMANDS ; }" +msgstr "Opdragte" + +#: builtins.c:206 +#, fuzzy +msgid "job_spec [&]" +msgstr "Kort Spesifikasie werkvoorbeeld" + +#: builtins.c:208 +#, fuzzy +msgid "(( expression ))" +msgstr "Bools uitdrukking verwag" + +#: builtins.c:210 +#, fuzzy +msgid "[[ expression ]]" +msgstr "Bools uitdrukking verwag" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "" + +#: builtins.c:215 +#, fuzzy +msgid "pushd [-n] [+N | -N | dir]" +msgstr "Tydelike gids:" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "" + +#: builtins.c:226 +#, fuzzy +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "Volle Naam:" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" + +#: builtins.c:235 +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "Volle Naam:" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +#: builtins.c:1726 +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" + +#, fuzzy +#~ msgid "Unknown Signal #" +#~ msgstr "Sein kwaliteit:" + +#~ msgid "Missing `}'" +#~ msgstr "Ontbrekende `}'" + +#~ msgid "brace_expand> " +#~ msgstr "krulhakie_uitbrei>" + +#~ msgid "Attempt to free unknown command type `%d'.\n" +#~ msgstr "Poging om onbekende beveltipe vry te maak `%d'.\n" + +#~ msgid "Report this to %s\n" +#~ msgstr "Meld dit aan by %s\n" + +#~ msgid "Stopping myself..." +#~ msgstr "Besig om myself te stop..." + +#~ msgid "Tell %s to fix this someday.\n" +#~ msgstr "Laat weet %s om dit eendag reg te maak.\n" + +#, fuzzy +#~ msgid "execute_command: bad command type `%d'" +#~ msgstr "Uitvoer 'n tolk opdrag lyn" + +#~ msgid "real\t" +#~ msgstr "regtig\t" + +#~ msgid "user\t" +#~ msgstr "gebruiker\t" + +#~ msgid "sys\t" +#~ msgstr "stelsel\t" + +#~ msgid "" +#~ "real\t0m0.00s\n" +#~ "user\t0m0.00s\n" +#~ "sys\t0m0.00s\n" +#~ msgstr "" +#~ "regtig\t0m0.00s\n" +#~ "gebruiker\t0m0.00s\n" +#~ "stelsel\t0m0.00s\n" + +#~ msgid "cannot duplicate fd %d to fd 1: %s" +#~ msgstr "kan nie fd %d na fd 1 dupliseer nie: %s" + +#, fuzzy +#~ msgid "%s: output redirection restricted" +#~ msgstr "gebruik tans beperkte dop %s" + +#, fuzzy +#~ msgid "Out of memory!" +#~ msgstr "Te min geheue." + +#, fuzzy +#~ msgid "You have already added item `%s'\n" +#~ msgstr "Jy alreeds het 'n groep genaamd %1." + +#, fuzzy +#~ msgid "You have entered %d (%d) items. The distribution is:\n" +#~ msgstr "Die wagwoord frase jy ingevoerde is ongeldige." + +#, fuzzy +#~ msgid "slot %3d: " +#~ msgstr "3d modus" + +#, fuzzy +#~ msgid "" +#~ msgstr "(onbekend)" + +#, fuzzy +#~ msgid "%s: bg background job?" +#~ msgstr "Druktaak gestuur." + +#, fuzzy +#~ msgid "cprintf: bad `%%' argument (%c)" +#~ msgstr "%s: option `%s' requires an argument\n" + +#, fuzzy +#~ msgid "option `%s' requires an argument" +#~ msgstr "%s: option `%s' requires an argument\n" + +#, fuzzy +#~ msgid "%s: unrecognized option" +#~ msgstr "%s: unrecognized option `%c%s'\n" + +#, fuzzy +#~ msgid "`-c' requires an argument" +#~ msgstr "%s: option `%s' requires an argument\n" + +#, fuzzy +#~ msgid "reading" +#~ msgstr "besig om te lees" + +#, fuzzy +#~ msgid "writing" +#~ msgstr "besig om te skryf" + +#, fuzzy +#~ msgid "$%c: unbound variable" +#~ msgstr "Veranderlike boom" + +#, fuzzy +#~ msgid "%s: bad arithmetic substitution" +#~ msgstr "&Sintetisering/Wiskundige + Menging" + +#, fuzzy +#~ msgid "-%s: binary operator expected" +#~ msgstr "%s: binre operator is verwag\n" + +#, fuzzy +#~ msgid "%s[%s: bad subscript" +#~ msgstr "Slegte formule." + +#, fuzzy +#~ msgid "[%s: bad subscript" +#~ msgstr "Slegte formule." + +#, fuzzy +#~ msgid "option %c\n" +#~ msgstr "Opsie" + +#, fuzzy +#~ msgid "option a\n" +#~ msgstr "Opsie" + +#, fuzzy +#~ msgid "option b\n" +#~ msgstr "Opsie" + +#, fuzzy +#~ msgid "option c with value `%s'\n" +#~ msgstr "Opsie '%s' vereis 'n waarde." + +#, fuzzy +#~ msgid "non-option ARGV-elements: " +#~ msgstr "parameters wat nie opsies is nie word gegnoreer" + +#, fuzzy +#~ msgid "%s: Unknown flag %s.\n" +#~ msgstr "onbekende vlag: " + +#, fuzzy +#~ msgid "Unknown directive `%s'" +#~ msgstr "Onbekende direktief" + +#, fuzzy +#~ msgid "%s found before $END" +#~ msgstr "Nee einde was gevind." + +#, fuzzy +#~ msgid "%s already has a function (%s)" +#~ msgstr "Proses %1 het alreeds verdwyn!" + +#, fuzzy +#~ msgid "%s already had a docname (%s)" +#~ msgstr "Alles is alreeds installeer" + +#, fuzzy +#~ msgid "%s already has short documentation (%s)" +#~ msgstr "Proses %1 het alreeds verdwyn!" + +#, fuzzy +#~ msgid "%s already has a %s definition" +#~ msgstr "Proses %1 het alreeds verdwyn!" + +#, fuzzy +#~ msgid "mkbuiltins: Out of virtual memory!\n" +#~ msgstr "GenericName=Virtuele Geheue Statistieke" + +#~ msgid ":" +#~ msgstr ":" + +#, fuzzy +#~ msgid "times" +#~ msgstr "Herhaal %1 times " + +#, fuzzy +#~ msgid "%[DIGITS | WORD] [&]" +#~ msgstr "Woord oorvloei" + +#, fuzzy +#~ msgid "Arguments we accept:" +#~ msgstr "Aanvaar karakter verstel:" + +#, fuzzy +#~ msgid " vi-command, and vi-insert." +#~ msgstr "Biep op kaart voeg by en verwydering" + +#, fuzzy +#~ msgid " -l List names of functions." +#~ msgstr "Verander Posisies/Name..." + +#, fuzzy +#~ msgid " reused as input." +#~ msgstr "Invoer Versterking Limiet" + +#, fuzzy +#~ msgid " -r keyseq Remove the binding for KEYSEQ." +#~ msgstr "Verwyder koekies vir domein." + +#, fuzzy +#~ msgid "break N levels." +#~ msgstr "6 nuwe vlakke" + +#, fuzzy +#~ msgid "to be followed." +#~ msgstr "Lers na Wees Uitgepak" + +#, fuzzy +#~ msgid "The flags are:" +#~ msgstr "Linker Vlaggies" + +#, fuzzy +#~ msgid "name only." +#~ msgstr "Naam slegs" + +#, fuzzy +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Verkeerde verklaring tipe" + +#, fuzzy +#~ msgid "\t\\a\talert (bell)" +#~ msgstr "stelsel klok" + +#, fuzzy +#~ msgid "\t\\c\tsuppress trailing newline" +#~ msgstr "Verwyder agterste spasies" + +#, fuzzy +#~ msgid "\t\\E\tescape character" +#~ msgstr "Ongeldige karakter <%s>" + +#, fuzzy +#~ msgid "\t\\f\tform feed" +#~ msgstr "Koevert Voer" + +#, fuzzy +#~ msgid "\t\\n\tnew line" +#~ msgstr "Lyn uit" + +#, fuzzy +#~ msgid "\t\\r\tcarriage return" +#~ msgstr "Terug Adres - 3/4 x 2\"" + +#, fuzzy +#~ msgid "\t\\t\thorizontal tab" +#~ msgstr "Oortjie Wydte:" + +#, fuzzy +#~ msgid "\t\\v\tvertical tab" +#~ msgstr "Oortjie Wydte:" + +#, fuzzy +#~ msgid "with the -E option." +#~ msgstr "%s: illegal option -- %c\n" + +#, fuzzy +#~ msgid "printed." +#~ msgstr "Gedruk: %s" + +#, fuzzy +#~ msgid "is set." +#~ msgstr "Nie stel" + +#, fuzzy +#~ msgid "string." +#~ msgstr "String" + +#, fuzzy +#~ msgid " mode, then vi." +#~ msgstr "-v\t\t\tVi modus (soos \"vi\")" + +#, fuzzy +#~ msgid "used." +#~ msgstr "gebruik word" + +#, fuzzy +#~ msgid "job is used." +#~ msgstr "Die naam '%1' is alreeds gebruik word" + +#, fuzzy +#~ msgid "anything in the history list." +#~ msgstr "Ler Alreeds in Lys" + +#, fuzzy +#~ msgid "process group leader." +#~ msgstr "Proses groep Id" + +#, fuzzy +#~ msgid "\t-, +\t\tunary minus, plus" +#~ msgstr "Name=Qt Motif Plus" + +#, fuzzy +#~ msgid "\t*, /, %\t\tmultiplication, division, remainder" +#~ msgstr "devisie by nul." + +#, fuzzy +#~ msgid "\t&\t\tbitwise AND" +#~ msgstr "en etiket: " + +#, fuzzy +#~ msgid "\t^\t\tbitwise XOR" +#~ msgstr "operande Xor data" + +#, fuzzy +#~ msgid "\t|\t\tbitwise OR" +#~ msgstr " of meer" + +#, fuzzy +#~ msgid "\t&&\t\tlogical AND" +#~ msgstr "en etiket: " + +#, fuzzy +#~ msgid "\t||\t\tlogical OR" +#~ msgstr " of meer" + +#, fuzzy +#~ msgid "\texpr ? expr : expr" +#~ msgstr "ooreenstemmende inskrywings gewone uitdrukking." + +#, fuzzy +#~ msgid "\t\t\tconditional expression" +#~ msgstr "ongeldige uitdrukking" + +#, fuzzy +#~ msgid "rules above." +#~ msgstr "Boonste Redigeerder" + +#, fuzzy +#~ msgid " -m Job control is enabled." +#~ msgstr "Stop flikkerende (as flikkerende is geaktiveer)" + +#, fuzzy +#~ msgid " -o option-name" +#~ msgstr "Gebruik so: %s [OPSIE] NAAM...\n" + +#~ msgid " allexport same as -a" +#~ msgstr " allexport dieselfde as -a" + +#~ msgid " braceexpand same as -B" +#~ msgstr " braceexpand dieselfde as -B" + +#~ msgid " errexit same as -e" +#~ msgstr " errexit dieselfde as -e" + +#~ msgid " hashall same as -h" +#~ msgstr " hashall dieselfde as -h" + +#~ msgid " histexpand same as -H" +#~ msgstr " histexpand dieselfde as -H" + +#~ msgid " interactive-comments" +#~ msgstr " interaktiewe-kommentaar" + +#~ msgid " keyword same as -k" +#~ msgstr " keyword dieselfde as -k" + +#~ msgid " monitor same as -m" +#~ msgstr " monitor dieselfde as -m" + +#~ msgid " noclobber same as -C" +#~ msgstr " noclobber dieselfde as -C" + +#~ msgid " noexec same as -n" +#~ msgstr " noexec dieselfde as -n" + +#~ msgid " noglob same as -f" +#~ msgstr " noglob dieselfde as -f" + +#~ msgid " notify save as -b" +#~ msgstr " notify dieselfde as -b" + +#~ msgid " nounset same as -u" +#~ msgstr " nounset dieselfde as -u" + +#~ msgid " onecmd same as -t" +#~ msgstr " onecmd dieselfde as -t" + +#~ msgid " physical same as -P" +#~ msgstr " physical dieselfde as -P" + +#~ msgid " match the standard" +#~ msgstr " pas by die standaard" + +#~ msgid " privileged same as -p" +#~ msgstr " privileged dieselfde as -p" + +#~ msgid " verbose same as -v" +#~ msgstr " verbose dieselfde as -v" + +#~ msgid " xtrace same as -x" +#~ msgstr " xtrace dieselfde as -x" + +#~ msgid " by default." +#~ msgstr " by verstek." + +#, fuzzy +#~ msgid " by redirection of output." +#~ msgstr "eSound Uitsetinpropprogram %s" + +#~ msgid "see readonly." +#~ msgstr "sien leesalleen" + +#, fuzzy +#~ msgid "processing." +#~ msgstr "Verwerking..." + +#, fuzzy +#~ msgid "File operators:" +#~ msgstr "ler assosiasies" + +#, fuzzy +#~ msgid " -d FILE True if file is a directory." +#~ msgstr "%1 is 'n gids, maar 'n ler was verwag." + +#, fuzzy +#~ msgid " -e FILE True if file exists." +#~ msgstr "Verwyder, as bestaan, die _:kommentaar" + +#, fuzzy +#~ msgid " modification date) file2." +#~ msgstr "Begin na datum" + +#, fuzzy +#~ msgid "String operators:" +#~ msgstr "Soekstring" + +#, fuzzy +#~ msgid " -n STRING" +#~ msgstr "String" + +#, fuzzy +#~ msgid "Other operators:" +#~ msgstr "Ander weergawe (B):" + +#, fuzzy +#~ msgid "" +#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" +#~ msgstr "is grootter as of gelyk na" + +#, fuzzy +#~ msgid "than ARG2." +#~ msgstr "%1 vroer as %2" + +#~ msgid "the shell." +#~ msgstr "die dop." + +#, fuzzy +#~ msgid "with \"kill -signal $$\"." +#~ msgstr "Stuur alle prosesse die KILL sein...\n" + +#, fuzzy +#~ msgid "or unfound, respectively." +#~ msgstr "Formule of gewig:" + +#, fuzzy +#~ msgid " -H\tuse the `hard' resource limit" +#~ msgstr "Minimum waarde is 'n hard beperk" + +#, fuzzy +#~ msgid " -m\tthe maximum resident set size" +#~ msgstr "Data inwoonend stel grootte in Kgrepe" + +#, fuzzy +#~ msgid " -p\tthe pipe buffer size" +#~ msgstr " Audio Buffer Grootte (antwoord tyd) " + +#, fuzzy +#~ msgid " -v\tthe size of virtual memory" +#~ msgstr "GenericName=Virtuele Geheue Statistieke" + +#, fuzzy +#~ msgid "processes." +#~ msgstr "Prosesse" + +#, fuzzy +#~ msgid "pipeline are waited for." +#~ msgstr "Die drukker vir wat werke word versoekte" + +#, fuzzy +#~ msgid "the COMMANDS are executed." +#~ msgstr "Stoor geskiedenis van uitgevoerde bevele." + +#, fuzzy +#~ msgid "function as $0 .. $n." +#~ msgstr "-L\t\t\tSelfde as -r" + +#, fuzzy +#~ msgid "entire set of commands." +#~ msgstr "%s outobevele vir \"%s\"" + +#, fuzzy +#~ msgid "BASH_VERSION The version numbers of this Bash." +#~ msgstr "Hierdie is hoe nommers sal wees vertoon." + +#, fuzzy +#~ msgid "\t\tshell can access." +#~ msgstr "Konfigureer internettoegang..." + +#, fuzzy +#~ msgid "\t\tfor new mail." +#~ msgstr "Nuwe Pos Inkennisstelling" + +#, fuzzy +#~ msgid "\t\tlooking for commands." +#~ msgstr "%s outobevele vir \"%s\"" + +#, fuzzy +#~ msgid "\t\tprimary prompt." +#~ msgstr "Konqueror: Por" + +#, fuzzy +#~ msgid "command_oriented_history" +#~ msgstr "Herstel/Herstel herroep Geskiedenis..." + +#, fuzzy +#~ msgid " a single history line." +#~ msgstr "/Skoopmodus/Lynskoop" + +#~ msgid "not each is set." +#~ msgstr "nie elkeen is gestel nie." diff --git a/bash-5.1/po/bash.pot b/bash-5.1/po/bash.pot new file mode 100644 index 0000000000000000000000000000000000000000..fb895a274621da2fcf701dd2b7b3877e33c8d25c --- /dev/null +++ b/bash-5.1/po/bash.pot @@ -0,0 +1,4248 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "" + +#: bashline.c:4555 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "" + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "" + +#: builtins/caller.def:136 +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "" + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "" + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "" + +#: builtins/enable.def:388 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "" +msgstr[1] "" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr "" + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "" + +#: error.c:463 +msgid "bad command type" +msgstr "" + +#: error.c:464 +msgid "bad connector" +msgstr "" + +#: error.c:465 +msgid "bad jump" +msgstr "" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "" + +#: expr.c:1582 +msgid "invalid integer constant" +msgstr "" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "" + +#: jobs.c:1892 +msgid "Running" +msgstr "" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr "" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "" + +#: jobs.c:3564 +#, c-format +msgid "%s: no current jobs" +msgstr "" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "" + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr "" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:1141 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "" + +#: parse.y:6365 +msgid "syntax error" +msgstr "" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "" + +#: siglist.c:50 +msgid "Hangup" +msgstr "" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "" + +#: siglist.c:58 +msgid "Quit" +msgstr "" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "" + +#: siglist.c:86 +msgid "Killed" +msgstr "" + +#: siglist.c:90 +msgid "Bus error" +msgstr "" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "" + +#: siglist.c:110 +msgid "Terminated" +msgstr "" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "" + +#: siglist.c:126 +msgid "Continue" +msgstr "" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "" + +#: siglist.c:154 +msgid "File limit" +msgstr "" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "" + +#: siglist.c:166 +msgid "Window changed" +msgstr "" + +#: siglist.c:170 +msgid "Record lock" +msgstr "" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "" + +#: siglist.c:198 +msgid "programming error" +msgstr "" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "" + +#: siglist.c:214 +msgid "Information request" +msgstr "" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "" + +#: test.c:147 +msgid "argument expected" +msgstr "" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "" + +#: test.c:265 +msgid "`)' expected" +msgstr "" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "" + +#: test.c:881 +msgid "missing `]'" +msgstr "" + +#: test.c:899 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" + +#: builtins.c:56 +msgid "break [n]" +msgstr "" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "" + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" + +#: builtins.c:140 +msgid "return [n]" +msgstr "" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr "" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" + +#: builtins.c:235 +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +#: builtins.c:1726 +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" diff --git a/bash-5.1/po/bg.gmo b/bash-5.1/po/bg.gmo new file mode 100644 index 0000000000000000000000000000000000000000..fc647414e6c5241379e11f60dd39e58e9dc6b07e Binary files /dev/null and b/bash-5.1/po/bg.gmo differ diff --git a/bash-5.1/po/bg.po b/bash-5.1/po/bg.po new file mode 100644 index 0000000000000000000000000000000000000000..0398655a353621765c794e347721753156dad0af --- /dev/null +++ b/bash-5.1/po/bg.po @@ -0,0 +1,6214 @@ +# Bulgarian translation of bash po-file. +# Copyright (C) 2007, 2010, 2012, 2013, 2014, 2015, 2016, 2018, 2020 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Alexander Shopov , 2007, 2010, 2012, 2013, 2014, 2015, 2016, 2018, 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2020-03-27 19:47+0100\n" +"Last-Translator: Alexander Shopov \n" +"Language-Team: Bulgarian \n" +"Language: bg\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "грешен индекс на масив" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: изтриване на атрибута за указател от променливата" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: масивът не може да бъде преобразуван към речник" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: грешно име на ключ в речник" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: не може да се присвоява на нецифров индекс" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: при присвояване към речник трябва да се използва индекс" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: не може да се създаде: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"изпълнение на команда на Юникс от bash: не може да се открие подредбата на\n" +"функциите на клавишите за командата" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: първият непразен знак не е „\"“" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "в %2$s липсва затварящ знак „%1$c“" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: разделителят „:“ липсва" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: не може да се премахне присвояване" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" +"заместване на изразите с фигурни скоби: не може да се задели памет за „%s“" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"заместване на изразите с фигурни скоби: не може да се задели памет за %u " +"елемента" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" +"заместване на изразите с фигурни скоби: не може да се задели памет за „%s“" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s“: грешно име на синоним" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "редактирането на командния ред не е включено" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s“: грешно име на подредбата на функциите на клавишите" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: не може да се прочете: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s“: име на непозната функция" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s не е зададена на никой клавиш.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s може да се извика чрез " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: не може да се премахне присвояване" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "брой цикли" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "валидно само за циклите с „for“, „while“ и „until“" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Връщане на контекста на текущото извикване на подпрограма.\n" +" \n" +" Без ИЗРАЗ връща „$line $filename“. С ИЗРАЗ връща\n" +" „$line $subroutine $filename“. Допълнителната информация може да се\n" +" използва за получаване на информация за състоянието на стека.\n" +" \n" +" Стойността на ИЗРАЗа показва за колко рамки спрямо текущата да се " +"изведе\n" +" информация. Най-горната рамка е 0.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако обвивката изпълнява функция дефинирана в обвивката " +"или\n" +" ИЗРАЗът е грешен." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "Променливата „HOME“ не е зададена" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "прекалено много аргументи" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "нулева директория" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "Променливата „OLDPWD“ не е зададена" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "ред %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "предупреждение: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: употреба: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: опцията изисква аргумент" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: изисква се числов аргумент" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: не е открит" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: грешна опция" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: грешно име на опция" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s“: грешен идентификатор" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "грешно осмично число" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "грешно шестнайсетично число" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "грешно число" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: грешно указване на сигнал" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s“: грешен идентификатор на процес или задача" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: променлива с права само за четене" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s е извън допустимия диапазон" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "аргументът" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s е извън допустимия диапазон" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: няма такава задача" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: няма управление на задачите" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "няма управление на задачите" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: ограничена обвивка" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "ограничена обвивка" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: не е команда вградена в обвивката" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "грешка при запис: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "грешка при задаване на атрибутите на терминала: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "грешка при получаване на атрибутите на терминала: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: грешка при получаване на текущата директория: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: нееднозначно указана задача" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "помощта не е включена в тази версия" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: не може да се премахне: %s е само за четене" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: не може да се премахне" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: грешно име на действие" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: не е указано дописване" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "предупреждение: опцията „-F“ може да не работи според очакванията ви" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "предупреждение: опцията „-C“ може да не работи според очакванията ви" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "в момента не се изпълнява функция за дописване" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "може да се използва само във функция" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: променливата-указател не може да е масив" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: променливата-указател не може да сочи към себе си" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: цикъл в променливите-указатели" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: неправилно име за променлива-указател" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "„-f“ не може да се използва за създаването на функции" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: функция с права само за четене" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: съставното присвояване на масив чрез цитат е остаряло" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: променливите за масиви не могат да се унищожават така" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: речник не може да се преобразува в масив" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "липсва възможност за динамично зареждане" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "споделеният обект „%s“ не може да бъде зареден: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "„%s“ не може да се открие в споделения обект %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: не е зареден динамично" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "зареждащата функция за „%s“ върна грешка (%d): не е зареден" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: не е зареден динамично" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: не може да се изтрие: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: е директория" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: не е обикновен файл" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: файлът е прекалено голям" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: двоичният файл не може да бъде изпълнен" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: не може да се изпълни: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "изход\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "това не е входна обвивка: използвайте „exit“" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Има спрени задачи.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Има изпълнявани задачи.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "не е открита команда" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "указване на историята" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: не може да се отвори временен файл: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "текуща" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "задача %d е стартирана без управление на задачите" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: непозволена опция — %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: опцията изисква аргумент — %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "хеширането е изключено" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: таблицата с хешове е празна\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "съвпад.\tкоманда\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Команди на обвивката, които напасват на ключовата дума „" +msgstr[1] "Команди на обвивката, които напасват на ключовите думи „" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"няма теми в помощта, които да отговарят на „%s“. Опитайте с\n" +"„help help“, „man -k %s“ или „info %s“." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: не може да се отвори: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Тези команди на интерпретатора са дефинирани вътрешно.\n" +"Напишете „help“, за да видите списъка.\n" +"Напишете „help ИМЕ_НА_ФУНКЦИЯ“ за повече информация за съответната функция.\n" +"Напишете „info bash“ за повече информация за обвивката като цяло.\n" +"Напишете „man -k“ или „info“ за повече информация за командите извън " +"списъка.\n" +"\n" +"Знакът звездичка „*“ до името на команда означава, че тя е изключена.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "не може да се ползва едновременно повече от една от опциите „-anrw“" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "позиция в историята" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: грешна дата с време" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: неуспешно заместване чрез историята" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: неуспешно извикване на inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "не е позволена друга опция с „-x“" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: аргументите трябва да са идентификатори на процеси или задачи" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Неизвестна грешка" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "очаква се израз" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: не е масив" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: грешно указване на файловия дескриптор" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: грешен файлов дескриптор: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: грешен номер на ред" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: грешен начален индекс за масив" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: грешно количество редове за обработка" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "празно име на променлива за масив" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "изисква се поддръжка на променливи за масиви" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s“: липсва форматиращ знак" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: грешен формат на времето" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c“: грешен форматиращ знак" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "предупреждение: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "неуспешен анализ на форма̀та: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "липсва шестнадесетична цифра за \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "липсва цифра за Уникод за \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "няма друга директория" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: грешен аргумент" + +#: builtins/pushd.def:480 +msgid "" +msgstr "«няма текуща директория»" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "стекът с директории е празен" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "индекс за стека с директории" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Извежда списъка с текущо запомнените директории. Списъкът се попълва чрез\n" +" командата „pushd“. Можете да вадите директории от списъка с командата\n" +" „popd“.\n" +" \n" +" Опции:\n" +" -c изчиства стека на директориите като изтрива всички елементи.\n" +" -l кара командата „dirs“ да извежда пълните имена на директориите,\n" +" а не съкратените със тилда „~“.\n" +" -p поредово отпечатване на стека на директориите.\n" +" -v поредово отпечатване на стека на директориите заедно с номера в\n" +" стека.\n" +" \n" +" Аргументи: \n" +" +N извежда N-тия елемент отляво в списъка отпечатан от командата " +"„dirs“,\n" +" когато е стартирана без опции. Брои се от 0.\n" +" \n" +" -N извежда N-тия елемент отдясно в списъка отпечатан от командата " +"„dirs“,\n" +" когато е стартирана без опции. Брои се от 0." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Добавя директория в стека на директориите или превърта стека\n" +" като най-горна директория става текущата директория. Без\n" +" аргументи сменя най-горните две директории.\n" +" \n" +" Опции:\n" +" -n подтискане на нормалното преминаване към директория при добавянето " +"на\n" +" директории към стека, така че се променя само той.\n" +" \n" +" Аргументи:\n" +" +N Превърта стека, така че N-тата директория (като се брои от " +"лявата\n" +" страна на списъка, отпечатан от командата „dirs“ като се почва от " +"0)\n" +" да е най-отгоре.\n" +" \n" +" -N Превърта стека, така че N-тата директория (като се брои от " +"дясната\n" +" страна на списъка, отпечатан от командата „dirs“ като се почва от " +"0)\n" +" да е най-отгоре.\n" +" \n" +" dir Добавя ДИР най-отгоре в стека на директориите, като я прави " +"новата\n" +" текуща работна директория.\n" +" \n" +" Можете да изведете стека на директорията с командата „dirs“." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Маха директории от стека с тях. Без аргументи премахва последната директория " +"в\n" +" стека и влиза в новата последна директория.\n" +" \n" +" Опции:\n" +" -n подтискане на нормалното преминаване към директория при махането " +"на\n" +" директория от стека — само той се променя.\n" +" \n" +" Аргументи:\n" +" +N премахва N-тия елемент като се брои отляво в списъка отпечатан от\n" +" командата „dirs“, като се брои от 0. Напр.: „popd +0“ премахва\n" +" първата директория, „popd +1“ - втората.\n" +" \n" +" -N премахва N-тия елемент като се брои отдясно в списъка отпечатан " +"от\n" +" командата „dirs“, като се брои от 0. Напр.: „popd -0“ премахва\n" +" последната директория, „popd -1“ - предпоследната.\n" +" \n" +" Можете да изведете стека на директорията с командата „dirs“." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: грешно указване на изтичането на времето" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "грешка при четене: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"„return“ е възможен само от функция или изпълнен в текущата обвивка скрипт" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" +"не може едновременно да се премахват задаванията на функция и променлива" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: не е променлива за масив" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: не е функция" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: не може да се изнесе" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "брой на преместванията" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" +"не може едновременно да се задават и да се премахват опции на обвивката" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: грешно име на опция на обвивката" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "изисква се аргумент име на файл" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: файлът не е открит" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "не може да бъде временно спряна" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "входната обвивка не може да бъде временно спряна" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s е синоним на „%s“\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s е ключова дума на обвивката\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s е функция\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s е специална, вградена команда в обвивката\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s е вградена команда в обвивката\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s е %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s е хеширан (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: грешен аргумент за ограничение" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c“: грешна команда" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: ограничението не може да бъде получено: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "ограничение" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: ограничението не може да бъде променено: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "осмично число" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c“: неправилен оператор за описателен режим" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c“: неправилен знак за описателен режим" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " ред " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "последна команда: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Преустановяване…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "ИНФОРМАЦИЯ: " + +#: error.c:462 +msgid "unknown command error" +msgstr "неизвестна грешка в команда" + +#: error.c:463 +msgid "bad command type" +msgstr "грешен вид команда" + +#: error.c:464 +msgid "bad connector" +msgstr "грешна връзка" + +#: error.c:465 +msgid "bad jump" +msgstr "грешен преход" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: променлива без стойност" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "" +"\aвремето за изчакване на вход изтече: следва автоматично излизане от " +"системата\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "стандартният вход не може да бъде пренасочен от „/dev/null“: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "в променливата $TIMEFORMAT: „%c“: грешен форматиращ знак" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: копроцесът [%d:%s] все още съществува" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "грешка в програмен канал" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: превишено е максималното ниво на влагане на „eval“ (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: превишено е максималното ниво на влагане на код (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: превишено е максималното ниво на влагане на функции (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "" +"%s: ограничение: в имената на командите не може да присъства знакът „/“" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: командата не е открита" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: лош интерпретатор" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: двоичният файл не може да бъде изпълнен: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s“ е вградена команда в обвивката" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "файловият дескриптор %d не може да се дублира като дескриптор %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "максималният брой нива за рекурсия в израз бяха преминати" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "отрицателно препълване на стека за рекурсии" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "синтактична грешка в израз" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "опит за присвояване на стойност на нещо, което не е променлива" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "синтактична грешка при присвояване на променлива" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "деление на 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "програмна грешка: неправилна лексема за присвояване на израз" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "за условен израз се изисква „:“" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "степента е по-малка от 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "очаква се идентификатор след предварително увеличаване или намаляване" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "липсва „)“" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "синтактична грешка: очаква се оператор" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "синтактична грешка: грешен аритметичен оператор" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (грешната лексема е „%s“)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "грешна аритметична основа на бройна система" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: грешен номер на ред" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "стойността е прекалено голяма за основата" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: грешка в израза\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: няма достъп до родителските директории" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "не може да се изчисти режимът без забавяне на файловия дескриптор %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"не може да се задели нов файлов дескриптор за вход на bash от дескриптор %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" +"запазване на входа на bash: вече съществува буфер за новия файлов дескриптор " +"%d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "" +"стартиране на програмен канал: не може да се комуникира с водача на канала\n" +"(pgrp pipe)" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "стартираният процес %d е в изпълняваната задача %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "изтриване на спряната задача %d в групата процеси %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "добавяне на процес: процесът %5ld (%s) е отбелязан като още жив" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "" +"описателен идентификатор на процес: %ld: няма такъв идентификатор на процес" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Сигнал %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Завършен" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Спрян" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Спрян (%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Изпълняван" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Завършен (%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Изход %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Непознато състояние" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(паметта е разтоварена)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "дъщерният процес смени групата при изпълнение (от %ld на %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "изчакване: процесът с идентификатор %ld не е дъщерен на тази обвивка" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "изчакване: липсват данни за процес с идентификатор %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "изчакване на задача: задачата %d е спряна" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: няма такава задача" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: задачата е приключила" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: задача %d вече е във фонов режим" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" +"изчакване на дъщерен процес: включване на незабавното излизане от функцията\n" +"чрез WNOHANG, за да се избегне недефиниран блок" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: ред %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (паметта е разтоварена)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(работната директория е: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "инициализация на контрола на задачите: неуспешно изпълнение на getpgrp" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "" +"инициализация на контрола на задачите: няма управление на задачите във фонов " +"режим" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "инициализация на контрола на задачите: дисциплина на линията" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "" +"инициализация на контрола на задачите: задаване на група при изпълнение " +"(setpgid)" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "групата на процесите на терминала не може да бъде зададена (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "в тази обвивка няма управление на задачите" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "заделяне на памет: грешно предположение: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"заделяне на памет: %s:%d: предположението е отпечатано\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "непознат" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "" +"заделяне на памет: блок в списъка със свободни блокове е зает или неподходящ" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "" +"изчистване на памет: извикано е с блоков аргумент, който вече е изчистен" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "изчистване на памет: извикано е с незаделен блоков аргумент" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" +"изчистване на памет: открито е отрицателно препълване с mh_nbytes извън\n" +"допустимия диапазон" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "" +"изчистване на памет: открито е отрицателно препълване с mh_nbytes извън\n" +"допустимия диапазон" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "" +"изчистване на памет: късовете на началната и крайната области се различават" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "презаделяне: извикано е с аргумент с незаделен блок" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" +"презаделяне: открито е отрицателно препълване с mh_nbytes извън допустимия\n" +"диапазон" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" +"презаделяне: открито е отрицателно препълване с mh_nbytes извън допустимия\n" +"диапазон" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "презаделяне: късовете на началната и крайната области се различават" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" +"регистриране на презаделяне: таблицата за заделянията е пълна с FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "регистриране на презаделяне: %p вече е в таблицата като заделен?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "регистриране на свободни: %p вече е в таблицата като свободен?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "грешна основа на бройна система" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: непознат хост" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: неправилна услуга" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: неправилно указан мрежов път" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "не се поддържат мрежови операции" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: локалът не може да бъде сменен (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: локалът не може да бъде сменен (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: локалът не може да бъде сменен (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: локалът не може да бъде сменен (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Имате поща в $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Имате нова поща в $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Пощата в %s вече е прочетена\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "синтактична грешка: изисква се аритметичен израз" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "синтактична грешка: неочакван знак „;“" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "синтактична грешка: „((%s))“" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "вътрешен документ с „<<“: неправилен вид инструкция %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"вътрешният документ на ред %d е отделен със знак за нов ред (а трябва да е " +"„%s“)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"пренасочване: инструкцията за пренасочване „%d“ е извън допустимия диапазон" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) надвишава SIZE_MAX (%lu): редът е " +"отрязан" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "превишен е максималният брой възможни вътрешни документи" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "" +"неочакван знак за край на файл „EOF“, а се очакваше съответстващ знак „%c“" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "неочакван знак за край на файл „EOF“, а се очакваше „]]“" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "синтактична грешка в условен израз: неочаквана лексема „%s“" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "синтактична грешка в условен израз" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "неочаквана лексема „%s“, а се очакваше знакът „)“" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "очакваше се „)“" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "неочакван аргумент „%s“ за унарен условен оператор" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "неочакван аргумент за унарен условен оператор" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "неочаквана лексема „%s“, очакваше се бинарен условен оператор" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "очакваше се бинарен условен оператор" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "неочакван аргумент „%s“ за бинарен условен оператор" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "неочакван аргумент за бинарен условен оператор" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "неочаквана лексема „%c“ в условна команда" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "неочаквана лексема „%s“ в условна команда" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "неочаквана лексема %d в условна команда" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "синтактична грешка в близост до неочакваната лексема „%s“" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "синтактична грешка в близост до „%s“" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "синтактична грешка: неочакван край на файл" + +#: parse.y:6365 +msgid "syntax error" +msgstr "синтактична грешка" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Използвайте „%s“, за да излезете от обвивката.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "неочакван знак за край на файл „EOF“, очакваше се знакът „)“" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "дописване: функцията „%s“ не е открита" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: възможно зацикляне на повторните опити" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "" +"вмъкване на завършване на команда: %s указване на команда, което е NULL" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "команда за печат: лош конектор „%d“" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: грешен файлов дескриптор" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: указател към файл – NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "отпечатване: „%c“: неправилен форматиращ знак" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "файловият дескриптор е извън допустимия диапазон" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: двусмислено пренасочване" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: не може да се презапише съществуващ файл" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: поради ограничение изходът не може да се пренасочи" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "не може да се създаде временен файл за вътрешен документ: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: на променлива не може да се присвои файлов дескриптор" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "" +"„/dev/(tcp|udp)/host/port“ не се поддържат, ако няма поддръжка на мрежа" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "грешка при пренасочване: файловият дескриптор не може да бъде дублиран" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "не е открита директорията „/tmp“. Създайте я!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "„/tmp“ трябва да е директория" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "режимът за красив изход се игнорира при интерактивна работа" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: неправилна опция" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" +"идентификаторът на потребител на процеса не може да се зададе да е %d,\n" +"ефективният идентификатор на потребител на процеса е %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" +"идентификаторът на група на процеса не може да се зададе да е %d,\n" +"ефективният идентификатор на група на процеса е %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "режимът на изчистване на грешки е недостъпен, защото е изключен" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: е директория" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Не може да се получи името на текущия потребител!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, версия %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Употреба: %s [дълга опция на GNU] [опция]…\n" +" %s [дълга опция на GNU] [опция] файл-скрипт…\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Дълги опции на GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Опции на обвивката:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" +" -ilrsD или -c команда, или -O къса_опция (само при стартиране)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr " -%s или -o опция\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"За повече информация за опциите на обвивката въведете „%s -c \"help set\"“.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"За повече информация за вградените в обвивката команди въведете „%s -c " +"help“.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "За да докладвате грешки, използвайте командата „bashbug“.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Интернет страница на bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Обща помощ за програмите на GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "маска за обработката на сигнали: %d: грешна операция" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Фалшив сигнал" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Прекъсване на връзката" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Прекъсване" + +#: siglist.c:58 +msgid "Quit" +msgstr "Спиране" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Неправилна инструкция" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Капан за авариен изход чрез BPT" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Инструкция за прекратяване" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Капан с EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Изключение от плаваща запетая" + +#: siglist.c:86 +msgid "Killed" +msgstr "Убит" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Грешка в шината" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Грешка в разделянето" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Грешно системно извикване" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Прекъснат програмен канал" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Аларма" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Прекратен" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Спешно вх./изх. състояние" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Спрян (сигнал)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Продължаване" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Смърт или спиране на дъщерен процес" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Спиране (вход от tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Спиране (изход към tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "Готовност за вх./изх." + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Ограничение на процесора" + +#: siglist.c:154 +msgid "File limit" +msgstr "Ограничение на файловете" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Аларма (виртуална)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Аларма (по профил)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Преоразмерен прозорец" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Заключен запис" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Потребителски сигнал 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Потребителски сигнал 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Идват данни по конзола HFT" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "Предстои спиране на захранването" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "Предстои забиване на системата" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "Преместване на процеса на друг процесор" + +#: siglist.c:198 +msgid "programming error" +msgstr "Програмна грешка" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Дадено право за управление чрез конзола HFT" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Отнето право за управление чрез конзола HFT" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "Завършена звукова поредица през HFT" + +#: siglist.c:214 +msgid "Information request" +msgstr "Заявка за информация" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Непознат сигнал #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "лошо заместване: липсва затварящ знак „%s“ в %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: на член от масив не може да се присвои списък" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "не може да се създаде програмен канал за заместване на процеси" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "не може да се създаде дъщерен процес за заместване на процеси" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "именуваният програмен канал %s не може да се отвори за четене" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "именуваният програмен канал %s не може да се отвори за запис" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "" +"именуваният програмен канал %s не може да се\n" +"дублира като файловия дескриптор %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "заместване на команди: знакът „null“ във входа е прескочен" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "не може да се създаде програмен канал за заместване на команди" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "не може да се създаде дъщерен процес за заместване на команди" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "заместване на команди: каналът не може да се дублира като fd 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: неправилно име за променлива-указател" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: грешно непряко заместване" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "„%s“: грешно име на променлива" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: аргументът не е зададен" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: аргументът е „null“ или не е зададен" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: изразът от подниза е < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: лошо заместване" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: не може да се задава по този начин" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"бъдещите версии на обвивката ще използват изчисляване като аритметично\n" +"заместване" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "лошо заместване: липсва затварящ знак „`“ в %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "няма съвпадение: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "очаква се аргумент" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: очаква се целочислен израз" + +#: test.c:265 +msgid "`)' expected" +msgstr "очаква се „)“" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "очаква се „)“, а е получено %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: очаква се бинарен оператор" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: очаква се унарен оператор" + +#: test.c:881 +msgid "missing `]'" +msgstr "липсва „]“" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "синтактична грешка: неочакван знак „;“" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "неправилен номер на сигнал" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: превишено е максималното ниво на влагане на „eval“ (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "" +"стартиране на предстоящите прихващания: неправилна стойност в\n" +"trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"стартиране на предстоящите прихващания: обработката на сигнали е SIG_DFL.\n" +"%d (%s) е преизпратен на текущата обвивка" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "обработка на прихващания: неправилен сигнал %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "грешка при внасянето на дефиницията на функция за „%s“" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "нивото на обвивката (%d) е прекалено голямо. Задава се да е 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "" +"създаване на локална променлива: липсва контекст на функция в текущата " +"област\n" +"на видимост" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: на тази променлива не може да се присвои стойност" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: присвояване на число на променлива-указател" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" +"всички локални променливи: липсва контекст на функция в текущата област на\n" +"видимост" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s: аргументът за низа за изнасяне не трябва да е „null“" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "неправилен знак на позиция %d в низа за изнасяне за %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "липсва „=“ в низа за изнасяне за %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"изваждане на контекст на променливи: в началото на структурата за променливи " +"на\n" +"обвивката (shell_variables) е нещо, което не е контекст на функция" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "" +"изваждане на контекст на променливи: липсва контекст за глобални променливи\n" +"(global_variables)" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"изваждане на област: в началото на структурата за променливи на обвивката\n" +"(shell_variables) е нещо, което не е временна област в обкръжението" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s не може да се отвори като ФАЙЛ" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: грешен файлов дескриптор за файла за трасиране" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: е извън допустимия диапазон" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Авторски права © 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Лиценз GPLv3+: ОПЛ на GNU, версия 3 или по-висока \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, версия %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Това е свободен софтуер. Можете да го променяте и разпространявате." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Няма НИКАКВИ ГАРАНЦИИ до степента позволена от закона." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: не могат да се заделят %lu байта (заделени са %lu байта)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: не могат да се заделят %lu байта" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: не могат да се заделят %lu байта (заделени са %lu байта)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: не могат да се заделят %lu байта" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [ИМЕ[=СТОЙНОСТ]…]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] ИМЕ [ИМЕ…]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m ПОДРЕДБА_НА_КЛАВИАТУРАТА] [-f ИМЕ_НА_ФАЙЛ]\n" +" [-q ИМЕ] [-u ИМЕ] [-r ПОСЛЕДОВАТЕЛНОСТ_ОТ_КЛАВИШИ]\n" +" [-x ПОСЛЕДОВАТЕЛНОСТ_ОТ_КЛАВИШИ:КОМАНДА_НА_ОБВИВКАТА]\n" +" [ПОСЛЕДОВАТЕЛНОСТ_ОТ_КЛАВИШИ:КОМАНДА_НА_ОБВИВКАТА или " +"КОМАНДА_НА_READLINE]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [БРОЙ]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [БРОЙ]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [ВГРАДЕНА_КОМАНДА [АРГУМЕНТ…]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [ИЗРАЗ]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [ДИРЕКТОРИЯ]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] команда [АРГУМЕНТ…]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [ИМЕ[=СТОЙНОСТ]…]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] ИМЕ[=СТОЙНОСТ]…" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [ОПЦИЯ] ИМЕ[=СТОЙНОСТ]…" + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [АРГУМЕНТ…]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [АРГУМЕНТ…]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f ФАЙЛ] [АРГУМЕНТ…]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [АРГУМЕНТ…]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts НИЗ_С_ОПЦИИ ИМЕ [АРГУМЕНТ]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a ИМЕ] [КОМАНДА [АРГУМЕНТИ…]] [ПРЕНАСОЧВАНЕ…]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [ЦИФРОВ_КОД]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [ЦИФРОВ_КОД]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e РЕДАКТОР] [-lnr] [ПЪРВИ] [ПОСЛЕДЕН] или fc -s [ШАБЛОН=ЗАМЕСТИТЕЛ…] " +"[КОМАНДА]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [ЗАДАЧА]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [ЗАДАЧА…]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ПЪТ] [-dt] [ИМЕ…]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [ШАБЛОН…]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d ОТМЕСТВАНЕ] [БРОЙ] или \n" +"history -anrw [ИМЕ_НА_ФАЙЛ] или\n" +"history -ps АРГ [АРГ…]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [ИД_ЗАДАЧА…] или jobs -x КОМАНДА [АРГУМЕНТИ]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [ИД_ЗАДАЧА… | ИД_ПРОЦЕС…]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s СИГНАЛ | -n НОМЕР_НА_СИГНАЛ | -СИГНАЛ] ИД_ПРОЦЕС | ИД_ЗАДАЧА…\n" +"или\n" +"kill -l [СИГНАЛ]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let АРГУМЕНТ [АРГУМЕНТ…]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a МАСИВ] [-d РАЗДЕЛИТЕЛ] [-i ТЕКСТ] [-n БРОЙ_ЗНАЦИ]\n" +" [-N БРОЙ_ЗНАЦИ] [-p ПОДСКАЗКА] [-t БРОЙ_ЗНАЦИ] [-u ФАЙЛОВ_ДЕСКРИПТОР]\n" +" [ИМЕ…]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [ЦИФРОВ_КОД]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o ОПЦИЯ] [--] [АРГУМЕНТИ…]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [ИМЕ…]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [ИМЕ[=СТОЙНОСТ]…] или export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [ИМЕ[=СТОЙНОСТ]…] или readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [БРОЙ]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source ФАЙЛ [АРГУМЕНТИ]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". ФАЙЛ [аргументи]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [ИЗРАЗ]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ АРГУМЕНТ…]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[АРГУМЕНТ] СИГНАЛ…]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] ИМЕ [ИМЕ…]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [ОГРАНИЧЕНИЕ]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [МАСКА]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [ИД…]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [ИД_ПР…]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for ИМЕ [in ДУМИ…] ; do КОМАНДИ; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( ИЗРАЗ_1; ИЗРАЗ_2; ИЗРАЗ_3 )); do КОМАНДИ; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select ИМЕ [in ДУМИ…;] do КОМАНДИ; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] ПРОГРАМЕН_КАНАЛ" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case ДУМА in [ШАБЛОН [| ШАБЛОН]…) КОМАНДИ ;;]… esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if КОМАНДИ; then КОМАНДИ; [ elif КОМАНДИ; then КОМАНДИ; ]… [ else КОМАНДИ; ] " +"fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while КОМАНДИ; do КОМАНДИ; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until КОМАНДИ; do КОМАНДИ; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [ИМЕ] КОМАНДА [ПРЕНАСОЧВАНИЯ]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { КОМАНДИ ; } или name () { КОМАНДИ ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ КОМАНДИ ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "%ЗАДАЧА [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( ИЗРАЗ ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ ИЗРАЗ ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables имена и значение на някои от променливите на обвивката" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | ДИР]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [ОПЦИЯ…]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v ПРОМЕНЛИВА] ФОРМАТ [АРГУМЕНТИ]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o ОПЦИЯ] [-A ДЕЙСТВИЕ]\n" +" [-G ШАБЛОН] [-W ДУМИ] [-F ФУНКЦИЯ] [-C КОМАНДА] [-X ФИЛТЪР]\n" +" [-P ПРЕДСТАВКА] [-S НАСТАВКА] [ИМЕ…]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o ОПЦИЯ] [-A ДЕЙСТВИЕ] [-G ШАБЛОН]\n" +" [-W ДУМИ] [-F ФУНКЦИЯ] [-C КОМАНДА] [-X ФИЛТЪР] [-P ПРЕДСТАВКА]\n" +" [-S НАСТАВКА] [ДУМА]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o ОПЦИЯ] [-DEI] [ИМЕ…]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d РАЗДЕЛИТЕЛ] [-n БРОЙ] [-O НАЧАЛО] [-s БРОЙ] [-t]\n" +" [-u ФАЙЛ_ДЕСКР] [-C ФУНКЦИЯ] [-c КВАНТ] [МАСИВ]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d РАЗДЕЛИТЕЛ] [-n БРОЙ] [-O НАЧАЛО] [-s БРОЙ] [-t]\n" +" [-u ФАЙЛ_ДЕСКР] [-C ФУНКЦИЯ] [-c КВАНТ] [МАСИВ]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Дефиниране или извеждане на синоними.\n" +" \n" +" „alias“ без аргументи или с опцията „-p“ отпечатва списъка със\n" +" синонимите във формат „ИМЕ=СТОЙНОСТ“ на стандартния изход.\n" +" \n" +" В противен случай за всяко ИМЕ, за което е зададена стойност, се\n" +" дефинира синоним. Интервал в края на СТОЙНОСТ-та предизвиква синонимно\n" +" заместване на следващата дума при заместването на синонима.\n" +" \n" +" Опции:\n" +" -p Извежда всички синоними във формат за последващо използване\n" +" \n" +" Изходен код:\n" +" alias връща 0, освен в случаите, когато се зададе ИМЕ, за което\n" +" не е дефиниран синоним." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Премахване на ИМЕната от списъка с дефинираните синоними.\n" +" \n" +" Опции:\n" +" -a премахване на всички синоними.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен в случаите, когато се зададе ИМЕ, за което\n" +" не е дефиниран синоним." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Задаване на клавишни комбинации и променливи на readline.\n" +" \n" +" Присвояване на последователност от клавиши на функция или макрос от\n" +" readline или задаване на променлива на readline. Синтаксисът с\n" +" аргументи без опции е еквивалентен на този във файла „~/.inputrc“, но\n" +" трябва да се подаде като единствен аргумент. Напр:\n" +" bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Опции:\n" +" -m ПОДРЕДБА \n" +" Използване на ПОДРЕДБАта като подредба на функциите на " +"клавишите\n" +" докато командата се изпълнява. Валидни са следните имена:\n" +" „emacs“, „emacs-standard“, „emacs-meta“, „emacs-ctlx“, „vi“,\n" +" „vi-move“, „vi-command“ и „vi-insert“.\n" +" -l Списък с имената на функциите.\n" +" -P Списък с имената на функциите и присвояванията.\n" +" -p Списък с имената на функциите и присвояванията във вид, който " +"може\n" +" да се използва за вход.\n" +" -S Списък с клавишните последователности, които извикват макроси " +"и\n" +" стойностите им.\n" +" -s Списък с клавишните последователности, които извикват макроси " +"и\n" +" стойностите им във вид, който може да се използва за вход.\n" +" -V Списък с имената на променливите и стойностите им.\n" +" -v Списък с имената на променливите и стойностите им във вид, " +"който\n" +" може да се използва за вход.\n" +" -q ИМЕ_НА_ФУНКЦИЯ\n" +" Проверка кои клавиши извикват функцията с това име.\n" +" -u ИМЕ_НА_ФУНКЦИЯ\n" +" Премахване на присвояванията към всички клавиши на функцията " +"с\n" +" това име.\n" +" -r КЛАВИШНА_ПОСЛЕДОВАТЕЛНОСТ\n" +" Премахване на присвоената функция от " +"КЛАВИШНАта_ПОСЛЕДОВАТЕЛНОСТ.\n" +" -f ФАЙЛ\n" +" Прочитане на присвояванията на клавиши от ФАЙЛа.\n" +" -x КЛАВИШНА_ПОСЛЕДОВАТЕЛНОСТ:КОМАНДА_НА_ОБВИВКАТА\n" +" Изпълнение на КОМАНДАта_НА_ОБВИВКАТА при въвеждането на\n" +" КЛАВИШНАта_ПОСЛЕДОВАТЕЛНОСТ.\n" +" -X Извеждане на клавишните комбинации зададени с „-x“ и свързаните с " +"тях\n" +" команди във форма, която може да се ползва и за вход\n" +" \n" +" Изходен код:\n" +" bind връща 0, освен когато е зададена непозната опция или възникне " +"грешка." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Изход от цикли чрез „for“, „while“ или „until“.\n" +" \n" +" Изход от цикли организирани чрез „for“, „while“ или „until“. Ако е " +"зададен\n" +" БРОЙ се излиза от толкова на БРОЙ обхващащи цикли.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададен БРОЙ, който е по-малък от 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Продължаване на цикъл чрез „for“, „while“ или „until“.\n" +" \n" +" Продължаване със следващата итерация от цикъл, организиран с „for“, " +"„while“\n" +" или „until“. Ако е зададен БРОЙ, се продължава със следващата " +"итерация\n" +" на обхващащия цикъл зададен с този БРОЙ.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададен БРОЙ, който е по-малък от 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Изпълнение на вградени команди.\n" +" \n" +" Изпълнение на ВГРАДЕНАта_КОМАНДА с АРГУМЕНТи, без да се търси нормална\n" +" команда. Това е полезно в случаите, когато искате да създадете " +"вградена\n" +" команда като функция на обвивката, но във функцията искате да изпълните\n" +" вградената команда.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на ВГРАДЕНАта_КОМАНДА или лъжа, ако извиканата \n" +" ВГРАДЕНА_КОМАНДА всъщност не е вградена команда." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Връщане на контекста на текущото извикване на подпрограма.\n" +" \n" +" Без ИЗРАЗ връща „$line $filename“. С ИЗРАЗ връща\n" +" „$line $subroutine $filename“. Допълнителната информация може да се\n" +" използва за получаване на информация за състоянието на стека.\n" +" \n" +" Стойността на ИЗРАЗа показва за колко рамки спрямо текущата да се " +"изведе\n" +" информация. Най-горната рамка е 0.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако обвивката изпълнява функция дефинирана в обвивката " +"или\n" +" ИЗРАЗът е грешен." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Смяна на работната директория на обвивката.\n" +" \n" +" Смяна на текущата директория да е ДИРЕКТОРИЯ. Променливата „HOME“ е\n" +" стандартната директория.\n" +" \n" +" Променливата „CDPATH“ определя пътя за търсене на директории, които " +"могат да\n" +" съдържат ДИРЕКТОРИЯта. Директориите в „CDPATH“ са разделени с „:“. \n" +" Липсващо име на директория означава текущата директория, т.е. „.“. Ако " +"името\n" +" на ДИРЕКТОРИЯта започва с наклонена черта „/“, „CDPATH“ не се ползва.\n" +" \n" +" Ако директорията не е открита, но е зададена опцията на обвивката\n" +" „cdable_vars“, то думата се пробва като име на променлива. Ако " +"променливата\n" +" има стойност, то директорията се сменя към стойността на тази " +"променлива.\n" +" \n" +" Опции:\n" +" -L налага следването на символните връзки. Символните връзки в\n" +" ДИРЕКТОРИЯта се обработват след указателите към горна директория " +"„..“.\n" +" -P налага използването на фактическата подредба на директориите, " +"вместо\n" +" да се следват символните връзки. Символните връзки в ДИРЕКТОРИЯта " +"се\n" +" обработват след указателите към горна директория „..“.\n" +" -e ако е използвана опцията „-P“ и текущата директория не може да " +"бъде\n" +" определена, командата завършва с ненулев изход.\n" +" -@ на системите с поддръжка на разширени атрибути файлът се " +"представя\n" +" като директория, в която са атрибутите.\n" +" \n" +" Стандартно символните връзки се следват, все едно е зададена опцията „-" +"L“\n" +" \n" +" Изходен код:\n" +" Връща 0 при смяна на директорията. Когато е зададена опцията „-P“, 0 " +"се\n" +" връща при успешно задаване на променливата „PWD„. Във всички останали\n" +" случаи изходът е ненулев." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Извеждане на името на текущата работна директория.\n" +" \n" +" Опции:\n" +" -L извежда стойността на променливата „PWD“, ако тя съответства на\n" +" текущата директория\n" +" -P извежда физическата директория без символни връзки\n" +" \n" +" Стандартно поведението на „pwd“ без аргументи съответства на „-L“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е подадена неправилна опция или текущата директория не може " +"да\n" +" бъде прочетена." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Нулева команда.\n" +" \n" +" Без ефект — командата нищо не прави.\n" +" \n" +" Изходен код:\n" +" Винаги завършва успешно." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Връщане на успешен резултат.\n" +" \n" +" Изходен код:\n" +" Винаги завършва успешно." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Връщане на неуспешен резултат.\n" +" \n" +" Изходен код:\n" +" Винаги завършва неуспешно." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Изпълнение на нормална команда или извеждане на информация за команди.\n" +" \n" +" Изпълнение на КОМАНДАта с АРГументи, без тя да се търси като функция на\n" +" обвивката, или извеждане на информация за указаните КОМАНДи. Може да " +"се\n" +" използва за изпълнението на външни команди, дори когато съществува " +"функция\n" +" със същото име.\n" +" \n" +" Опции:\n" +" -p използване на стандартна стойност на PATH. Така могат да се " +"открият\n" +" всички стандартни инструменти\n" +" -v извежда описание на КОМАНДАта подобно на вградената команда " +"„type“\n" +" -V извежда по пълно описание на всяка КОМАНДА\n" +" \n" +" Изходен код:\n" +" Връща изходния код на КОМАНДАта или грешка, ако такава не е открита." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Задаване на стойности на променливите и атрибутите.\n" +" \n" +" Деклариране на променливи и задаване на атрибутите им. Ако не са " +"дадени\n" +" ИМЕна се изобразяват атрибутите и стойностите на всички променливи.\n" +" \n" +" Опции:\n" +" -f Ограничаване на действието или извеждането до имената и " +"дефинициите\n" +" на функциите\n" +" -F Ограничаване на извеждането само до имената на функциите, заедно " +"с\n" +" номерата на редовете и изходните файлове при изчистване на " +"грешките\n" +" -g Създаване на глобална променлива, когато опцията е употребена " +"във\n" +" функция. В противен случай се пренебрегва\n" +" -p Извеждане на атрибутите и стойността на всяко ИМЕ\n" +" \n" +" Опции за задаването на атрибути:\n" +" -a ИМЕната да са на индексирани масиви (ако се поддържат)\n" +" -A ИМЕната да са асоциативни масиви (ако се поддържат)\n" +" -i ИМЕната да са с атрибут „цяло число“\n" +" -l При присвояване на стойност тя да се преобразува в малки букви\n" +" -n ИМЕто да е указател към променливата с име, което е дадено от\n" +" стойността\n" +" -r ИМЕната да са само за четене\n" +" -t ИМЕната да са с атрибут за трасиране\n" +" -u При присвояване на стойност тя да се преобразува в главни букви\n" +" -x ИМЕната да се изнасят към средата\n" +" \n" +" При използването на „+“ вместо „-“ атрибутът се изключва.\n" +" \n" +" При присвояването на стойност на променлива със зададен атрибут за цяло\n" +" число се извършва аритметично изчисляване (вижте командата „let“).\n" +" the `let' command).\n" +" \n" +" Когато се използва във функция, командата „declare“ прави ИМЕната " +"локални,\n" +" все едно се изпълнява командата „local“. Опцията „-g“ предотвратява " +"това\n" +" поведение.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна опция или възникне грешка при " +"задаването\n" +" на стойност на променлива." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Задаване на стойност и атрибути на променливи.\n" +" \n" +" Синоним на „declare“. Виж „help declare“." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Дефиниране на локални променливи.\n" +" \n" +" Създаване на локална променлива с това ИМЕ и зададената СТОЙНОСТ. " +"ОПЦИЯта\n" +" може да е всяка приемана от вградената команда „declare“.\n" +" \n" +" Локалните променливи могат да се използват само във функция. Те са " +"видими\n" +" само в нея и нейните наследници.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна ОПЦИЯ, възникне грешка при задаването " +"на\n" +" стойност на променлива, или в момента не се изпълнява функция." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Извеждане на аргументите на стандартния изход.\n" +" \n" +" Извеждане на АРГУМЕНТите на стандартния изход разделени с интервали и\n" +" последвани от нов ред.\n" +" \n" +" Опции:\n" +" -n не се извежда знак за нов ред.\n" +" -e включва се интерпретирането на знаците, изброени по-долу, " +"екранирани\n" +" с обратна наклонена черта — „\\“\n" +" -Е изрично се спира интерпретирането на долните знаци\n" +" \n" +" „echo“ поддържа следните екранирани знаци:\n" +" \\a системен звънец\n" +" \\b триене назад\n" +" \\c пропускане на знака за нов ред\n" +" \\e знак за екраниране\n" +" \\E знак за екраниране\n" +" \\f знак „Завършване на формуляра“ (form feed)\n" +" \\n знак за нов ред\n" +" \\r знак „Връщане на каретката“ (carriage return)\n" +" \\t хоризонтална табулация\n" +" \\v вертикална табулация\n" +" \\\\ обратно наклонена черта\n" +" \\0nnn\n" +" знакът с код в ASCII NNN (в осмична бройна система).\n" +" NNN може да се състои от 1 до 3 осмични цифри.\n" +" \\xHH\n" +" знакът с код в ASCII HH (в шестнайсетична бройна система).\n" +" HH може да се състои от 1 до 2 шестнайсетични цифри.\n" +" \\uHHHH\n" +" знакът с код в Unicode HHHH (в шестнайсетична бройна система).\n" +" HHHH може да се състои от 1 до 4 шестнайсетични цифри.\n" +" \\UHHHHHHHH\n" +" знакът с код в Unicode HHHHHHHH (в шестнайсетична бройна " +"система).\n" +" HHHHHHHH може да се състои от 1 до 8 шестнайсетични цифри.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако не възникне грешка при извеждането." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Извеждане на аргументите на стандартния изход.\n" +" \n" +" Извеждане на АРГументите на стандартния изход последвани от знак за нов " +"ред.\n" +" \n" +" Опции:\n" +" -n без извеждане на знак за нов ред\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако възникне грешка при извеждането." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Включване и изключване на вградените в обвивката команди.\n" +" \n" +" Включване и изключване на командите вградени в обвивката. Изключването\n" +" позволява извикването на външна команда със същото име като вградена " +"без\n" +" използването на пълното име с пътя.\n" +" \n" +" Опции:\n" +" -a Извеждане на списъка с вградените команди заедно с това дали са\n" +" включени или не\n" +" -n Изключване на вградените команди с посочените ИМЕна. Ако не са\n" +" дадени ИМЕна, се извежда списъкът с изключените вътрешни " +"команди\n" +" -p Извеждане на списъка с вътрешни команди във формат, който може " +"да\n" +" се ползва като вход\n" +" -s Извеждане само на имената на специалните вградени команди " +"според\n" +" POSIX\n" +" \n" +" Опции за динамичното зареждане:\n" +" -f Зареждане на вградена команда с това ИМЕ от споделения обект в\n" +" посочения ФАЙЛ\n" +" -d Премахване на вътрешна команда заредена с „-f“\n" +" \n" +" Ако не са зададени опции, всяка от вътрешните команди с такова ИМЕ бива\n" +" включена.\n" +" \n" +" За да ползвате командата „test“, която се намира в пътя за изпълнение " +"$PATH,\n" +" вместо вградения в обвивката вариант изпълнете: „enable -n test“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако ИМЕто не е на вградена команда или не възникне грешка." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Изпълнение на аргументите като команда на обвивката.\n" +" \n" +" Комбинира АРГументите в общ низ, който се подава като вход на обвивка,\n" +" която изпълнява получените команди.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на командата или код за успех, ако командата е нулева." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Анализиране на опциите и аргументите.\n" +" \n" +" getopts се използва от процедурите на обвивката за анализа на " +"позиционните\n" +" аргументи и опции.\n" +" \n" +" НИЗът_С_ОПЦИИ съдържа знаците, които трябва да се разпознават като " +"опции.\n" +" Ако буквата е следвана от двоеточие, очаква се опцията да получава " +"аргумент,\n" +" който да е разделен от нея с интервал(и).\n" +" \n" +" При всяко извикване „getopts“ поставя следващата опция в променливата " +"на\n" +" обвивката „name“, като я инициализира, ако тя не съществува, а индексът " +"на\n" +" следващия аргумент, който трябва да се обработи, в променливата на " +"обвивката\n" +" „OPTIND“. „OPTIND“ се инициализира да е 1 при всяко извикване на " +"обвивка\n" +" или скрипт. Когато опцията се нуждае от аргумент, той се поставя в\n" +" променливата на обвивката „OPTARG“.\n" +" \n" +" „getopts“ докладва грешки по един от два начина. Ако първият знак на\n" +" „OPTSTRING“ е двоеточие, „getopts“ използва тихо докладване. В този " +"режим\n" +" не се извеждат никакви съобщения за грешка. Ако се срещне неправилна " +"опция,\n" +" „getopts“ слага срещнатия знак за опция в „OPTARG“. Ако липсва " +"задължителен\n" +" аргумент, „getopts“ слага „:“ в променливата „ИМЕ“, а в „OPTARG“ — " +"срещнатия\n" +" знак за опция. Когато „getopts“ не е в режим на тихо докладване и се " +"срещне\n" +" неправилна опция, в променливата „ИМЕ“ се слага „?“, а „OPTARG“ се " +"премахва,\n" +" а ако липсва задължителен аргумент, допълнително се изписва " +"диагностично\n" +" съобщение.\n" +" \n" +" Ако променливата на обвивката „OPTERR“ е със стойност 0, „getopts“ " +"изключва\n" +" извеждането на диагностични съобщения, дори първият знак в „OPTSTRING“ " +"да не\n" +" е двоеточие. По подразбиране „OPTERR“ е със стойност 1.\n" +" \n" +" „getopts“ по принцип анализира позиционните аргументи ($0 — $9), но ако " +"са\n" +" дадени повече аргументи, те биват анализирани вместо това.\n" +" \n" +" Изходен код:\n" +" Връща 0 при откриването на опция. Връща друга стойност при стигането " +"на\n" +" последната опция или при възникването на грешка." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Заместване на обвивката с дадената команда.\n" +" \n" +" Изпълняване на КОМАНДАта, като тя замества текущата обвивка. " +"АРГУМЕНТите\n" +" се подават на КОМАНДАта. Ако не е дадена КОМАНДА, пренасочванията се\n" +" извършват в текущата обвивка.\n" +" \n" +" Опции:\n" +" -a ИМЕ ИМЕ-то се подава като нулевия аргумент на КОМАНДАта\n" +" -c изпълняване на КОМАНДАта в празна среда\n" +" -l поставяне на тире в нулевия аргумент на КОМАНДАта\n" +" \n" +" Ако КОМАНДАта не може да бъде изпълнена, трябва да съществува " +"неинтерактивна\n" +" обвивка, освен ако не е зададена опцията на обвивката „execfail“.\n" +" \n" +" Изходен код:\n" +" 0, освен когато КОМАНДАта не е открита или възникне грешка при\n" +" пренасочването." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Изход от обвивката.\n" +" \n" +" Изход от обвивката с този ЦИФРОВ_КОД. Ако той е изпуснат, то изходният " +"код\n" +" е този на последната изпълнена команда." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Изход от входната обвивка.\n" +" \n" +" Изход от входната обвивка с този ЦИФРОВ_КОД. Връща грешка, ако е " +"изпълнена\n" +" в обвивка, която не е входна." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Извеждане и/или изпълнение на команди от историята.\n" +" \n" +" fc се използва за изброяването или редактирането и повторното изпълнение " +"на\n" +" команди от списъка на историята.\n" +" ПЪРВИ и ПОСЛЕДЕН са номера, които могат да указват допустимия диапазон. " +"Ако\n" +" е зададен само ПЪРВИят аргумент, той задава низ, който е началото на\n" +" команда.\n" +" \n" +" Опции:\n" +" -e РЕДАКТОР\n" +" избор на текстов редактор, който да се използва. Стандартно е\n" +" указаният в променливата „FCEDIT“, след това се проверява „EDITOR“ " +"и\n" +" в краен случай е „vi“.\n" +" -l редовете да се покажат вместо редактират.\n" +" -n номерата на редовете да не се отпечатват.\n" +" -r обратна подредба (отпред да е най-новият ред).\n" +" \n" +" При варианта „fc -s [ШАБЛОН=ЗАМЕСТИТЕЛ…] [КОМАНДА]“ командата се " +"изпълнява, като\n" +" всяка поява на ШАБЛона се заменя със ЗАМЕСТителя.\n" +" \n" +" Удобен за използване синоним е „r='fc -s'“. По такъв начин, ако " +"напишете\n" +" „r cc“, ще се изпълни последната команда, която започва с „cc“, а " +"когато\n" +" се въведе само „r“, ще се изпълни последната команда.\n" +" \n" +" Изходен код:\n" +" Връща 0 или изхода от последната команда, който не е 0 в случай на " +"грешка." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Задаване на задача да е текуща.\n" +" \n" +" Изважда ЗАДАЧА от фонов режим и я прави текуща задача. Ако липсва\n" +" аргумент ЗАДАЧА, се използва текущата задача според обвивката.\n" +" \n" +" Изходен код:\n" +" Изходът от командата, която е зададена да е текуща или грешка, ако при\n" +" поставянето на задачата от фонов към текущ режим възникне такава." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Поставяне на задачи във фонов режим.\n" +" \n" +" Поставя всяка ЗАДАЧА във фонов режим, все едно е била стартирана с „&“.\n" +" Ако липсва аргумент ЗАДАЧА, се използва текущата задача според " +"обвивката.\n" +" \n" +" Изходен код:\n" +" 0, освен ако управлението на задачи е изключено или възникне грешка." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Запомняне или извеждане на местоположенията на програми.\n" +" \n" +" Определяне и запомняне на пълното име с пътя на всяко ИМЕ. Ако не са " +"дадени\n" +" аргументи, се извежда информация за всички запомнени команди.\n" +" \n" +" Опции:\n" +" -d Забравяне на запомненото местоположение на всички ИМЕна\n" +" -l Извеждане във формат за преизползване като вход\n" +" -p ПЪТ\n" +" Използване на посочения ПЪТ като пълен път за ИМЕто\n" +" -r Забравяне на всички запомнени местоположения\n" +" -t Извеждане на запомнените местоположения на всички ИМЕна. Ако е\n" +" посочено повече от едно ИМЕ, всяко местоположение се предшества " +"от\n" +" ИМЕто\n" +" Аргументи:\n" +" ИМЕ Всяко име се търси в пътя за изпълнение „PATH“ и при намирането " +"му\n" +" се добавя в списъка със запомнени команди.\n" +" \n" +" Изходен код:\n" +" 0, освен ако ИМЕто не бъде открито или е дадена неправилна опция." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Извеждане на информация за вградените команди.\n" +" \n" +" Извежда кратка информация за вградените команди. Ако е указан ШАБЛОН, " +"се\n" +" извежда информация за напасващите команди. В противен случай се " +"изважда\n" +" информация за всички команди.\n" +" \n" +" Опции:\n" +" -d Извеждане на кратко описание на всяка тема\n" +" -m Извеждане във формат наподобяващ страница от ръководствата\n" +" -s Извеждане само на кратко обобщение за използването на всяка " +"команда,\n" +" съвпадаща с ШАБЛОНа\n" +" \n" +" Аргументи:\n" +" ШАБЛОН Шаблон за имената на командите, за които да се изведе " +"информация\n" +" \n" +" Изходен код:\n" +" 0, освен ако никоя вградена команда не съвпада с шаблона или е дадена\n" +" неправилна опция." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Извеждане и управление на списъка на историята.\n" +" \n" +" Отпечатване на списъка на историята с номера на ред. Редовете, които " +"са\n" +" отбелязани със знака „*“, са били променени. Аргументът N указва да се\n" +" извеждат само N на брой реда.\n" +" \n" +" Опции:\n" +" -c изчистване на списъка, като се изтриват всички елементи от него.\n" +" -d ПОЗИЦИЯ\n" +" изтрива елемента в историята намиращ се посочената ПОЗИЦИЯ.\n" +" Отрицателните позиции се броят от края на историята\n" +" -a добавя историята от текущата сесия към файла с историята.\n" +" -n прочитане на непрочетените редове от файла с историята и добавяне " +"към\n" +" текущата история.\n" +" -r прочитане на файла с историята и добавяне на съдържанието към " +"текущата\n" +" история.\n" +" -w записване на текущата история във файла за историята.\n" +" -p извършване на историческо заместване за всеки АРГУМЕНТ, а резултатът " +"да\n" +" се изведе, без нищо да се записва в историята на командите.\n" +" -s аргументите, които не са опции, се добавят като един елемент към " +"файла с\n" +" историята.\n" +" \n" +" Ако аргументът ИМЕ_НА_ФАЙЛ е зададен, той се използва като файл за\n" +" историята. Ако той липсва, се използва файлът сочен в променливата на\n" +" средата „HISTFILE“. В противен случай се ползва „~/.bash_history“.\n" +" \n" +" Ако променливата „HISTTIMEFORMAT“ е зададена и не е „null“, стойността ѝ " +"се\n" +" използва като форматиращия низ за функцията „strftime“, за да се " +"отбелязва\n" +" времето свързано с всеки елемент от историята. В противен случай " +"времето не\n" +" се записва.\n" +" \n" +" Изходен код:\n" +" 0. Ако възникне грешка или е подадена неправилна опция връща грешка." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Извежда състоянието на задачите.\n" +" \n" +" Извежда списък с активните задачи. ЗАДАЧАта ограничава информацията до\n" +" себе си. Без опции се отпечатва състоянието на всички активни задачи.\n" +" \n" +" Опции:\n" +" -l включва и идентификатора на процесите заедно със стандартната\n" +" информация.\n" +" -n извеждат се само процесите с променено състояние от последното\n" +" извеждане на тази информация.\n" +" -p извежда само идентификаторите на процесите.\n" +" -r ограничаване на изхода само до изпълняваните задачи.\n" +" -s ограничаване на изхода само до спрените задачи.\n" +" \n" +" Ако е зададена опцията „-x“, КОМАНДАта се изпълнява, след като всички\n" +" ЗАДАЧи, които се появяват като АРГУМЕНТи, се заменят с идентификатора " +"на\n" +" водача на групата процеси.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не е дадена неправилна опция или възникни грешка. Ако се\n" +" ползва „-x“, връща изходното състояние на КОМАНДАта." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Премахване на ЗАДАЧи от текущата обвивка.\n" +" \n" +" Премахва всеки аргумент-задача от таблицата на активните задачи. Ако " +"ЗАДАЧА\n" +" не е указана, се използва тази, която обвивката счита за текуща.\n" +" \n" +" Опции:\n" +" -a премахване на всички задачи, когато не е дадена ЗАДАЧА\n" +" -h предотвратяване на препращането на сигнал SIGHUP към задачата,\n" +" когато тази обвивка получи същия този сигнал\n" +" -r премахване само на стартираните задачи.\n" +" \n" +" Изходен код:\n" +" 0, освен когато е дадена неправилна опция или несъществуваща ЗАДАЧА." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Изпращане на сигнал към задача.\n" +" \n" +" Изпращане на СИГНАЛа на процеса с такъв ИДЕНТИФИКАТОР_НА_ПРОЦЕС (или\n" +" задачата с такъв ИДЕНТИФИКАТОР_НА_ЗАДАЧА). Ако сигнал с такова име или\n" +" номер не съществува, се използва SIGTERM.\n" +" \n" +" Опции:\n" +" -s СИГНАЛ\n" +" СИГНАЛ се интерпретира като име на сигнал\n" +" -n СИГНАЛ\n" +" СИГНАЛ се интерпретира като номер на сигнал\n" +" -l изброява имената на сигналите. Ако към командата са добавени\n" +" аргументи, те се интерпретират като номера на сигналите чиито " +"имена\n" +" да се изброят.\n" +" -L синоним на „-l“\n" +" \n" +" „kill“ е команда вградена в обвивката поради две причини: позволява да " +"се\n" +" използват и идентификатори на задачи освен идентификатори на процеси, а " +"и\n" +" ако сте пуснали максимално разрешения за вас брой процеси, няма да ви " +"се\n" +" налага да пуснете още един процес, за да убиете друг.\n" +" \n" +" Изходен код:\n" +" 0. Ако възникне грешка или е подадена неправилна опция, връща грешка." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Изчисляване на аритметичен израз.\n" +" \n" +" Всеки АРГУМЕНТ е аритметичен израз, който се бъде изчислен. " +"Изчисленията\n" +" се извършват в аритметика с целочислени стойности с постоянна широчина\n" +" без проверка за препълване. Делението на 0 се прихваща и се отбелязва\n" +" грешка. Следващият списък с оператори е разделен на групи според\n" +" приоритета на операциите. Подредбата е с намаляващ приоритет.\n" +" \n" +" id++, id-- последващо увеличаване/намаляване на променлива\n" +" ++id, --id предварително увеличаване/намаляване на променлива\n" +" -, + унарни минус, плюс\n" +" !, ~ логическо и побитово отрицания\n" +" ** вдигане на степен\n" +" *, /, % умножение, деление, целочислен остатък\n" +" +, - събиране, изваждане\n" +" <<, >> побитово местене наляво и надясно\n" +" <=, >=, <, > сравнение\n" +" ==, != равно, различно\n" +" & побитово И\n" +" ^ побитово изключващо ИЛИ\n" +" | побитово ИЛИ\n" +" && логическо И\n" +" || логическо ИЛИ\n" +" ИЗРАЗ ? ИЗРАЗ : ИЗРАЗ\n" +" условен оператор\n" +" =, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |=\n" +" присвояване\n" +" \n" +" Разрешено е ползването на променливи на обвивката като операнди. Името " +"на\n" +" променлива се замества с нейната стойност (която се преобразува до цяло\n" +" число с постоянна широчина) в израза. Не е необходимо променливата да е " +"с\n" +" атрибут за целочисленост, за да се използва в израз.\n" +" \n" +" Операторите се изчисляват по приоритет. Подизразите в скоби се " +"изчисляват\n" +" първи и могат да променят приоритета.\n" +" \n" +" Изходен код:\n" +" Ако последният АРГУМЕНТ се изчислява като 0, „let“ връща 1. В противен\n" +" случай — връща 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Изчитане на ред от стандартния вход и разделянето му по полета.\n" +" \n" +" От стандартния вход или от файловия дескриптор ФД, ако е използвана " +"опцията\n" +" „-u“, се прочита един ред. Редът се разделя на полета — думи. Първата " +"дума\n" +" се присвоява на първото ИМЕ, втората дума на второто ИМЕ и т.н., а на\n" +" последното ИМЕ се присвояват оставащите думи. Като разделители на думи " +"се\n" +" използват само знаците указани в променливата „IFS“.\n" +" \n" +" Ако не са дадени ИМЕна, прочетеният ред се запазва в променливата " +"„REPLY“.\n" +" \n" +" Опции:\n" +" -a прочетените думи се присвояват последователно на елементите на " +"МАСИВа,\n" +" като индексът му започва от 0.\n" +" -d РАЗДЕЛИТЕЛ\n" +" четенето продължава до прочитането на първия знак, който присъства " +"в\n" +" променливата „DELIM“, а не до минаването на нов ред.\n" +" -e за четене на реда се използва readline\n" +" -i ТЕКСТ\n" +" за първоначален текст в readline се ползва ТЕКСТ\n" +" -n БРОЙ_ЗНАЦИ\n" +" четенето завършва след прочитането на този БРОЙ_ЗНАЦИ, не се чака " +"за\n" +" нов ред. Разделител в рамките на този БРОЙ_ЗНАЦИ се зачита.\n" +" -N БРОЙ_ЗНАЦИ\n" +" четенето завършва с прочитането на точно този БРОЙ_ЗНАЦИ, освен " +"ако\n" +" не се появи EOF или времето за изчакване на въвеждане не изтече.\n" +" Всички разделители се пренебрегват.\n" +" -p ПОДСКАЗКА\n" +" извежда низа ПОДСКАЗКА без минаване на нов ред, преди да започне\n" +" четенето на знаци от входа.\n" +" -r заместването на екранираните с „\\“ знаци се изключва.\n" +" -s входът от терминал не се отпечатва на екрана.\n" +" -t БРОЙ_СЕКУНДИ\n" +" задава интервал от този БРОЙ_СЕКУНДИ, в който трябва да се въведе " +"цял\n" +" ред. В противен случай read завършва с грешка. Ако е зададена,\n" +" стойността на променливата „TMOUT“ обозначава времето, за което " +"трябва\n" +" да се въведе редът. За БРОЙ_СЕКУНДИ може да се ползва и нецяло " +"число.\n" +" Ако БРОЙ_СЕКУНДИ e 0, read незабавно завършва работа, без да се " +"опитва\n" +" да чете данни и връща код 0, само ако от указания файлов " +"дескриптор\n" +" могат да се прочетат данни.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не се срещне знак за край на файл EOF, изтече време повече " +"от\n" +" указаното в БРОЙ_СЕКУНДИ, при което кодът за изход е над 128, възникне\n" +" грешка при задаване на стойност на променлива или е зададен неправилен\n" +" файлов дескриптор като аргумент на -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Връщане от функция на обвивката.\n" +" \n" +" Кара изпълняваната функция или скрипт да завършат работа със зададения\n" +" изходен ЦИФРОВ_КОД. Ако не е зададен ЦИФРОВ_КОД се използва изходния " +"код на\n" +" последно изпълнената команда във функцията или скрипта.\n" +" \n" +" Изходен код:\n" +" Връща ЦИФРОВия_КОД или грешка, ако обвивката в момента не изпълнява " +"функция\n" +" или скрипт." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Задаване или изтриване на позиционни параметри и опции на обвивката.\n" +" \n" +" Промяна на стойностите на позиционните параметри и опции на обвивката,\n" +" Извеждане на имената и стойностите на променливите на обвивката.\n" +" \n" +" Опции:\n" +" -a Отбелязване на променливите, които са създадени или променени, да\n" +" бъдат изнесени.\n" +" -b Незабавно известяване на спиране на задача.\n" +" -e Незабавен изход, ако команда приключи команда с код, който не е " +"0.\n" +" -f Изключване на генерирането на имена на файлове (чрез „*“, „?“ и т." +"н.).\n" +" -h Запомняне на местоположението на команди при търсенето им.\n" +" -k Всички аргументи за присвояване се поместват в средата на команда, " +"не\n" +" само тези, които предхождат името на команда.\n" +" -m Включване на управлението на задачи.\n" +" -n Прочитане на команди, без да се изпълняват.\n" +" -o ИМЕ_НА_ОПЦИЯ\n" +" Задаване на променливата, която отговаря на ИМЕто_НА_ОПЦИЯ:\n" +" allexport същото като „-a“\n" +" braceexpand същото като „-B“\n" +" emacs интерфейс за редактиране подобен на „emacs“\n" +" errexit същото като „-e“\n" +" errtrace същото като „-E“\n" +" functrace същото като „-T“\n" +" hashall същото като „-h“\n" +" histexpand същото като „-H“\n" +" history включване на историята на командите\n" +" ignoreeof обвивката няма да излезе при откриване на знак за " +"край\n" +" на файл „EOF“.\n" +" interactive-comments\n" +" позволяване на коментари в интерактивните команди\n" +" keyword същото като „-k“\n" +" monitor същото като „-m“\n" +" noclobber същото като „-C“\n" +" noexec същото като „-n“\n" +" noglob същото като „-f“\n" +" nolog тази опция се приема в момента, но се игнорира\n" +" notify същото като „-b“\n" +" nounset същото като „-u“\n" +" onecmd същото като „-t“\n" +" physical същото като „-P“\n" +" pipefail изходният код на програмния канал е този на " +"последната\n" +" команда, която завършва с код различен от 0\n" +" posix промяна на поведението на „bash“ да отговаря по-" +"добре\n" +" на стандарта POSIX\n" +" privileged същото като „-p“\n" +" verbose същото като „-v“\n" +" vi използване на интерфейс за редактиране подобен на " +"„vi“\n" +" xtrace същото като „-x“\n" +" -p Опцията e включена, когато реалният и ефективният идентификатори " +"на\n" +" процеси не съвпадат. Изключва обработката на файла посочен в\n" +" променливата „ENV“ и внасянето на функции на обвивката. " +"Изключването\n" +" на тази опция води до това ефективните идентификатори за " +"потребител и\n" +" група да станат равни на реалните.\n" +" -t Изход след прочитането и изпълнението на една команда.\n" +" -u Незададените променливи да се третират като грешки при " +"заместването.\n" +" -v Отпечатване на входните редове към обвивката при прочитането им.\n" +" -x Отпечатване на командите и аргументите им при изпълнението им.\n" +" -B Обвивката ще извършва заместване на изразите с фигурни скоби.\n" +" -C Предотвратяване на презаписването на съществуващите обикновени " +"файлове\n" +" чрез пренасочване на изхода.\n" +" -E Прихващането за „ERR“ да се наследява от функциите на обвивката.\n" +" -H Включване на заместването чрез историята с „!“. Стандартно тази " +"опция\n" +" е налична само за интерактивните обвивки.\n" +" -P Да не се следват символните връзки при изпълнението на команди " +"като\n" +" „cd“, които променят текущата директория.\n" +" -T Прихващането за „DEBUG“ и „RETURN“ да се наследява от функциите " +"на\n" +" обвивката.\n" +" -- Оставащите аргументи да се тълкуват като позиционни. Ако няма " +"повече\n" +" аргументи, се изтриват съответните позиционни.\n" +" - Оставащите аргументи да се тълкуват като позиционни. Опциите „-x“ " +"и\n" +" „-v“ са изключени.\n" +" \n" +" Използването на „+“ вместо „-“ изключва опциите. Тези опции могат да " +"се\n" +" използват и при стартирането на обвивката. Текущото им състояние се " +"намира\n" +" в променливата „-“ (получава се с „$-“). Останалите АРГументи са " +"позиционни\n" +" и се присвояват съответно на променливите с имена „1“, „2“,… " +"„n“ (получават\n" +" се с „$1“, „$2“,… „${n}“). Ако не са зададени АРГументи, се извеждат\n" +" всички променливи на средата.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не е зададена неправилна опция." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Изтриване на стойностите и атрибутите на променливите и функциите на " +"обвивката.\n" +" \n" +" За всяко ИМЕ изтрива съответната променлива или функция.\n" +" \n" +" Опции:\n" +" -f всяко ИМЕ се тълкува като функция на обвивката\n" +" -v всяко ИМЕ се тълкува като променлива на обвивката\n" +" -n всяко ИМЕ се тълкува като променлива-указател — трие се самата\n" +" променлива, а не тази, към която тя сочи\n" +" \n" +" Ако не са подадени опции, командата unset първо се опитва да изтрие\n" +" променлива и след това функция с това ИМЕ.\n" +" \n" +" Някои променливи не могат да бъдат изтрити. Вижте вградената команда\n" +" „readonly“ (само за четене).\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна опция или някое от ИМЕната е само за\n" +" четене." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Задаване на атрибута за изнасяне на променливите на обвивката.\n" +" \n" +" Обозначава всяко едно от ИМЕната за изнасяне в средата на изпълнение на\n" +" последващо изпълнените команди. Ако е дадена СТОЙНОСТ, тя се присвоява " +"на\n" +" ИМЕто преди изнасянето.\n" +" \n" +" Опции:\n" +" -f ИМЕто е на функция на обвивката\n" +" -n Премахване на атрибута за изнасяне от всяко от ИМЕната\n" +" -p Извеждане на списък с имената на всички променливи и функции за\n" +" изнасяне\n" +" \n" +" Аргументът „--“ прекъсва по нататъшната обработка на опции.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна опция или някое от ИМЕната е " +"неправилно." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Задаване на променливи на обвивката като непроменливи константи.\n" +" \n" +" Отбелязване на всяко от ИМЕната само за четене. Тяхната стойност не " +"може да\n" +" бъде променяна чрез последващо присвояване. Ако е дадена СТОЙНОСТ, тя " +"се\n" +" задава на името преди задаването му като константно.\n" +" \n" +" Опции:\n" +" -a ИМЕната са на променливи-масиви\n" +" -A ИМЕната са на променливи-асоциативни масиви\n" +" -f ИМЕната са на функции на обвивката\n" +" -p Извеждане на имената на всички константни променливи или " +"функции, в\n" +" зависимост дали е зададена опцията „-f“\n" +" \n" +" Аргументът „--“ прекъсва по нататъшната обработка на опции.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна опция или някое от ИМЕната е " +"неправилно." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Изместване на позиционните параметри.\n" +" \n" +" Преименуване на позиционните параметри „БРОЙ+1“, „БРОЙ+2“… на 1, 2…. " +"Така\n" +" те стават достъпни не като ${БРОЙ+1}…, като „$1“…. Ако не е зададена\n" +" стойност БРОЙ, се използва 1.\n" +" \n" +" Изходен код:\n" +" 0, освен ако БРОят е отрицателно или по-голямо от стойността „$#“." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Изпълняване на команди от файл в текущата обвивка\n" +" \n" +" Изчитане и изпълнение на командите от ФАЙЛа и изход. Директориите " +"описани в\n" +" променливата „PATH“ се използват за изпълнението на командите от ФАЙЛа. " +"Ако\n" +" са зададени АРГУМЕНТИ, те се превръщат в позиционни аргументи при\n" +" изпълнението на ФАЙЛа.\n" +" \n" +" Изходен код:\n" +" Връща състоянието на последно изпълнената команда във ФАЙЛа. Ако той " +"не\n" +" може да бъде открит, изходът е грешка." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Временно спиране на изпълнението на обвивката.\n" +" \n" +" Спиране на работата на тази обвивка докато обвивката не получи сигнал\n" +" SIGCONT. Освен ако изрично не се зададе опция, входните обвивки не " +"могат да\n" +" бъдат спрени по този начин.\n" +" \n" +" Опции:\n" +" -f Задължително спиране, дори и ако обвивката е входяща\n" +" \n" +" Изходен код:\n" +" 0, освен ако не възникне грешка или управлението на задачи е изключено." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Изчисляване на условен израз.\n" +" \n" +" Изход с код 0 (истина) или 1 (лъжа) в зависимост от стойността на " +"ИЗРАЗа.\n" +" Изразите могат да бъдат унарни или бинарни. Унарните най-често се " +"използват\n" +" за проверка на състоянието на файл. Освен тях има и оператори за " +"числови\n" +" сравнения и низови оператори.\n" +" \n" +" Поведението на тестовете зависи от броя на аргументите. За цялостно\n" +" описание прочетете страниците от ръководството на bash.\n" +" \n" +" Файлови оператори:\n" +" \n" +" -a ФАЙЛ Истина, ако ФАЙЛът съществува.\n" +" -b ФАЙЛ Истина, ако ФАЙЛът е блоково устройство.\n" +" -c ФАЙЛ Истина, ако ФАЙЛът е знаково устройство.\n" +" -d ФАЙЛ Истина, ако ФАЙЛът е директория.\n" +" -e ФАЙЛ Истина, ако ФАЙЛът съществува.\n" +" -f ФАЙЛ Истина, ако ФАЙЛът съществува и е обикновен файл.\n" +" -g ФАЙЛ Истина, ако ФАЙЛът е със зададен бит за смяна на група\n" +" при изпълнение.\n" +" -h ФАЙЛ Истина, ако ФАЙЛът е символна връзка.\n" +" -L ФАЙЛ Истина, ако ФАЙЛът е символна връзка.\n" +" -k ФАЙЛ Истина, ако ФАЙЛът е със зададен лепкав бит.\n" +" -p ФАЙЛ Истина, ако ФАЙЛът е именуван програмен канал.\n" +" -r ФАЙЛ Истина, ако ФАЙЛът може да бъде прочетен от вас.\n" +" -s ФАЙЛ Истина, ако ФАЙЛът може да бъде записван от вас.\n" +" -S ФАЙЛ Истина, ако ФАЙЛът е програмно гнездо.\n" +" -t ФДСК Истина, ако Файловият_ДеСКриптор е отворен на терминал.\n" +" -u ФАЙЛ Истина, ако ФАЙЛът е със зададен бит за смяна на " +"потребител\n" +" при изпълнение.\n" +" -w ФАЙЛ Истина, ако ФАЙЛът може да бъде записван от вас.\n" +" -x ФАЙЛ Истина, ако ФАЙЛът може да бъде изпълняван от вас.\n" +" -O ФАЙЛ Истина, ако ФАЙЛът може да бъде ефективно притежаван от " +"вас.\n" +" -G ФАЙЛ Истина, ако ФАЙЛът може да бъде ефективно притежаван от " +"вашата\n" +" група.\n" +" -N ФАЙЛ Истина, ако ФАЙЛът е бил променян от последното му " +"прочитане.\n" +" \n" +" ФАЙЛ_1 -nt ФАЙЛ_2 Истина, ако ФАЙЛ_1 е по-нов от ФАЙЛ_2 (според\n" +" датата на промяна).\n" +" ФАЙЛ_1 -ot ФАЙЛ_2 Истина, ако ФАЙЛ_1 е по-стар от ФАЙЛ_2 (според\n" +" датата на промяна). \n" +" ФАЙЛ_1 -ef ФАЙЛ_2 Истина, ако ФАЙЛ_1 е твърда връзка към ФАЙЛ_2.\n" +" \n" +" Низови оператори:\n" +" \n" +" -z НИЗ Истина, ако НИЗът е празен.\n" +" -n НИЗ Истина, ако НИЗът не е празен.\n" +" НИЗ Истина, ако НИЗът не е празен.\n" +" \n" +" НИЗ_1 = НИЗ_2 Истина, ако низовете са равни.\n" +" НИЗ_1 != НИЗ_2 Истина, ако низовете не са равни.\n" +" НИЗ_1 < НИЗ_2 Истина, ако НИЗ_1 е лексикографски преди НИЗ_2.\n" +" НИЗ_1 > НИЗ_2 Истина, ако НИЗ_1 е лексикографски след НИЗ_2.\n" +" \n" +" Други оператори:\n" +" \n" +" -o ОПЦИЯ Истина, ако ОПЦИЯта на обвивката е зададена.\n" +" -v ПРОМЕНЛИВА Истина, ако ПРОМЕНЛИВАта на обвивката е " +"зададена.\n" +" -R ПРОМЕНЛИВА Истина, ако ПРОМЕНЛИВАта е зададена като " +"променлива-\n" +" указател.\n" +" ! ИЗРАЗ Истина, ако ИЗРАЗът е лъжа.\n" +" ИЗРАЗ_1 -a ИЗРАЗ_2 Истина, ако и двата ИЗРАЗа са истина.\n" +" ИЗРАЗ_1 -o ИЗРАЗ_2 Истина, ако поне един от ИЗРАЗите е истина.\n" +" АРГ_1 ОПЕР АРГ_2 Аритметични тестове. Те връщат истина, ако се\n" +" изпълнява математическото условие на ОПЕРатора,\n" +" който е един от следните (значението е в " +"скоби):\n" +" „-eq“ (=), „-ne“ (!=), „-lt“ (<), „-le“ (<=),\n" +" „-gt“ (>) , „-ge“ (>=).\n" +" \n" +" Аритметичните изрази завършват истинно, ако АРГумент_1 е съответно " +"равен,\n" +" неравен, по-малък, по-малък или равен, по-голям, по-голям или равен на\n" +" АРГумент_2.\n" +" \n" +" Изходен код:\n" +" 0, ако ИЗРАЗът е верен. Грешка, когато ИЗРАЗът е неверен или е даден\n" +" неправилен аргумент." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Изчисляване на условен израз.\n" +" \n" +" Това е синоним на вградената команда „test“, но последният аргумент " +"трябва\n" +" задължително да е знакът „]“, който да съответства на отварящата " +"квадратна\n" +" скоба „[“." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Извеждане на времето на работа на процесите.\n" +" \n" +" Отпечатва общото потребителско и системно време на работа на обвивката " +"и\n" +" всичките ѝ дъщерни процеси.\n" +" \n" +" Изходен код:\n" +" Винаги 0." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Прихващане на сигналите и другите събития.\n" +" \n" +" Дефинира и задейства функции за обработка, когато обвивката получи " +"сигнал\n" +" или възникне друго събитие.\n" +" \n" +" Командата АРГУМЕНТ ще бъде прочетена и изпълнена, когато обвивката " +"получи\n" +" УКАЗАНия_СИГНАЛ(и). Ако АРГУМЕНТът липсва (и се подава единичен\n" +" УКАЗАН_СИГНАЛ) или е „-“, то всеки УКАЗАН_СИГНАЛ се връща към " +"първоначалната\n" +" си стойност. Ако АРГУМЕНТът е нулевият низ, всеки УКАЗАН_СИГНАЛ се\n" +" пренебрегва от обвивката и командите, които се стартират през нея.\n" +" \n" +" Ако УКАЗАНият_СИГНАЛ е „EXIT (0)“, то командата АРГУМЕНТ се изпълнява " +"от\n" +" обвивката при изход. Ако УКАЗАНият_СИГНАЛ е „DEBUG“, АРГУМЕНТът се\n" +" изпълнява след всяка проста команда. Ако УКАЗАНият_СИГНАЛ е „RETURN“,\n" +" АРГУМЕНТът се изпълнява след всяко изпълнение на функция както и " +"изпълнение\n" +" на скрипт чрез вградените команди „.“ и „source“. Ако УКАЗАНият_СИГНАЛ " +"е\n" +" „ERR“, АРГУМЕНТът се изпълнява след всяка грешка, която би предизвикала\n" +" изход от обвивката при стартирането ѝ с опцията „-e“.\n" +" \n" +" Ако не са дадени аргументи, се отпечатват командите присвоени на всички\n" +" прихващания.\n" +" \n" +" Опции:\n" +" -l отпечатва списъка с имената на сигналите и съответстващите им " +"номера.\n" +" -p извеждат се командите свързани с всеки УКАЗАН_СИГНАЛ.\n" +" \n" +" Всеки УКАЗАН_СИГНАЛ е или име на сигнал от файла „signal.h“ или номер " +"на\n" +" сигнал.\n" +" Няма разлика между главни и малки букви в имената на сигнали, а " +"представката\n" +" „SIG“ не е задължителна.\n" +" Сигнал може да бъде изпратен на обвивката с командата „kill -signal $" +"$“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададен неправилен сигнал или опция." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Извеждане на информация за вида на командата подадена като аргумент.\n" +" \n" +" За всяко ИМЕ се извежда как ще се интерпретира, когато се използва като\n" +" команда.\n" +" \n" +" Опции:\n" +" -a Извеждане на всички местоположения, които съдържат изпълним файл " +"с\n" +" това ИМЕ. Включва синонимите, вградените команди и функции на\n" +" обвивката, само когато не е използвана опцията „-p“\n" +" -f Без търсене във функциите дефинирани в обвивката\n" +" -P Търсене в пътя за изпълнение указан в PATH, дори и ако " +"съществува\n" +" синоним, вградена команда или функция дефинирана в обвивката с " +"това\n" +" ИМЕ\n" +" -p Връща или името на файла, който ще бъде изпълнен или нищо в\n" +" случаите, когато командата „type -t ИМЕ“ не би върнала „file“\n" +" -t Извеждане на една от думите „alias“ (синоним), „keyword“\n" +" (резервирана лексема в обвивката), „function“ (функция " +"дефинирана в\n" +" обвивката), „builtin“ (вградена команда), „file“ (изпълним файл) " +"или\n" +" „“, ако ИМЕто не е открито\n" +" \n" +" Аргументи:\n" +" ИМЕ Името, за което да се изведе информация.\n" +" \n" +" Изходен код:\n" +" 0, ако всички подадени ИМЕна са открити, неуспех, ако някое от тях " +"липсва." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Промяна на ресурсите на обвивката.\n" +" \n" +" Командата осъществява контрол върху ресурсите, които са достъпни на\n" +" процесите стартирани през обвивката върху системите, които поддържат " +"такова\n" +" управление.\n" +" \n" +" Опции:\n" +" -S използване на „мекото“ ограничение на ресурс\n" +" -H използване на „твърдото“ ограничение на ресурс\n" +" -a извеждат се всички текущи ограничения\n" +" -b размер на буфера за програмните гнезда\n" +" -c максималният размер на създадените файлове със съдържание на\n" +" паметта (core)\n" +" -d максималният размер на сегмента на процес за данни\n" +" -e максималният приоритет (nice)\n" +" -f максималният размер на файловете създадени от обвивката и " +"дъщерните\n" +" ѝ процеси\n" +" -i максималният брой на изчакващите сигнали\n" +" -l максималният размер памет, която процес може да заключи\n" +" -m максималният постоянно зареден в паметта сегмент\n" +" -n максималният брой дескриптори на отворени файлове\n" +" -p размер на буфера за програмни канали\n" +" -q максималният брой байтове в опашките за съобщения по POSIX\n" +" -r максималният приоритет за реално време\n" +" -s максималният размер на стека\n" +" -t максималното процесорно време в секунди\n" +" -u максималният брой потребителски процеси\n" +" -v размерът на виртуалната памет\n" +" -x максималният брой заключвания на файлове\n" +" -P максималният брой псевдотерминали\n" +" -T максималният брой нишки\n" +" \n" +" Не всички ограничения са налични на всички платформи.\n" +" \n" +" Ако е зададено ОГРАНИЧЕНИЕ, то това е новата стойност на указания " +"ресурс.\n" +" Специалните стойности „soft“, „hard“ и „unlimited“ означават текущите " +"меко,\n" +" твърдо и никакво ограничение съответно. В противен случай се извежда\n" +" текущата стойност на указания ресурс. Ако не е зададена опция, се " +"приема,\n" +" че е зададена „-f“.\n" +" \n" +" Стойностите са в блокове от по 1024 байта, с изключение на:\n" +" ⁃ опцията „-t“, при която стойността е в секунди;\n" +" ⁃ опцията „-p“, при която блоковете са от по 512 байта;\n" +" ⁃ опцията „-u“, при която стойността е точният брой процеси.<\n" +" \n" +" Изходен код:\n" +" 0, освен ако не възникни грешка или е дадена неправилна опция." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Извеждане или промяна на маската за достъпа до новосъздадени файлове.\n" +" \n" +" Задава МАСКАта за правата за достъп до новосъздадени файлове. Ако не е\n" +" зададена МАСКА, се извежда текущата ѝ стойност.\n" +" \n" +" Ако МАСКАта започва с цифра, тя се тълкува като осмично число. В " +"противен\n" +" случай трябва да е низ, който би бил приет от командата chmod(1).\n" +" \n" +" Опции:\n" +" -p ако не е зададена МАСКА, изведеният низ може да бъде ползван за " +"вход\n" +" -S изведената маска да е във вид на НИЗ. Без опцията изходът е " +"осмично\n" +" число\n" +" \n" +" Изходен код:\n" +" 0, освен ако МАСКАта или някоя от зададените опции са неправилни." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Изчакване на завършването задача и връщане на изходния код.\n" +" \n" +" Изчакване на всички указани ИДентификатори, които могат да са номера на\n" +" процеси или указатели на задачи, и докладване на изходния код. Ако не " +"е\n" +" зададен ИДентификатор, се изчакват всички активни дъщерни процеси, а\n" +" изходният код е 0. Ако ИДентификаторът е указател на задача, се " +"изчакват\n" +" всички процеси в конвейера на задачата.\n" +" \n" +" Ако е зададена опцията „-n“, се изчаква края на работата на следващата\n" +" задача и се връща нейния код.\n" +" \n" +" Ако е зададена опцията „-n“ и управлението на задачите е включено, се\n" +" изчаква завършването на процеса/задачата с указаните ИДентификатори " +"вместо\n" +" смяната на състоянието им.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на последната задача или процес. Ако е зададена\n" +" неправилна опция, връща грешка." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Изчакване на указания процес и докладване за изходния код.\n" +" \n" +" Изчакване на всички указани процеси и докладване за изходния код. Ако " +"не е\n" +" зададен ИДентификатор_ПРоцeс, всички текущо активни дъщерни процеси се\n" +" изчакват и изходният код е 0. ИДентификатор_ПРоцeс трябва да " +"съответства на\n" +" някой процес.\n" +" \n" +" Изходен код:\n" +" Изходния код на процеса с последния идентификатор. Грешка, ако е даден\n" +" неправилен идентификатор или е дадена неправилна опция." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Изпълнение на команда за всеки член в списък от елементи\n" +" \n" +" Цикълът „for“ изпълнява последователност от команди за всеки член в " +"списък\n" +" от елементи. Ако блокът „в ДУМИ…“ не присъства, използва се „in \"$@" +"\"“.\n" +" За всеки елемент в ДУМИте, ИМЕто се задава да е елементът и се " +"изпълняват\n" +" КОМАНДИте.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на последно изпълнената команда." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Аритметичен цикъл чрез „for“\n" +" Еквивалентно на:\n" +" (( ИЗРАЗ_1 ))\n" +" while (( ИЗРАЗ_2 )); do\n" +" КОМАНДИ\n" +" (( EXP_3 ))\n" +" done\n" +" ИЗРАЗ_1, ИЗРАЗ_2, и ИЗРАЗ_3 са аритметични изрази. Всеки изпуснат израз " +"се\n" +" изчислява да е 1.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на последно изпълнената команда." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Избор на думи от списък и изпълнение на команди.\n" +" \n" +" ДУМИте биват замествани, което води до създаването на списък с думи.\n" +" Наборът от заместените думи бива отпечатан на изхода за стандартната\n" +" грешка, като всяка от тях се предшества от номер. Ако клаузата „in " +"ДУМИ“\n" +" липсва, използва се „in \"$@\"“. В такива случаи се отпечатва " +"подсказката\n" +" „PS3“ и от стандартния вход се прочита ред. Ако редът се състои от " +"номера,\n" +" който съответства на някоя от изведените думи, ИМЕто се задава да е " +"тази\n" +" дума. Ако редът е празен, отново се отпечатват ДУМИте и подсказката. " +"Ако\n" +" се прочете „EOF“, командата завършва. Всяка друга стойност присвоява " +"„null“\n" +" на ИМЕ. Прочетеният ред се запазва в променливата REPLY. КОМАНДИте се\n" +" изпълняват след всеки избор до изпълняването на команда за прекъсване\n" +" (break).\n" +" \n" +" Изходен код:\n" +" Връща изходния код на последно изпълнената команда." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Отпечатване на времето за изпълнение на програмен канал.\n" +" \n" +" Изпълнение на ПРОГРАМНия_КАНАЛ и отпечатване на обобщение за реалното,\n" +" потребителското и системно процесорни времена, които изпълнението на\n" +" ПРОГРАМНия_КАНАЛ отнема.\n" +" \n" +" Опции:\n" +" -p: извеждане на статистиката за времето във формат POSIX\n" +" \n" +" Стойността на променливата на средата „TIMEFORMAT“ определя изходния\n" +" формат.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на ПРОГРАМНия_КАНАЛ." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Изпълнение на команди на базата на напасване по шаблон.\n" +" \n" +" Избирателно се изпълняват КОМАНДИ на база ДУМА, която напасва на " +"ШАБЛОН.\n" +" Шаблоните се разделят със знака „|“.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Изпълнение на команда на базата на условие.\n" +" \n" +" Първо се изпълняват командите в блока „if КОМАНДИ“. Ако изходният код е " +"0,\n" +" то се изпълнява блокът „then КОМАНДИ“. В противен случай последователно " +"се\n" +" изпълнява всеки блок „elif КОМАНДИ“ — ако изходният код е 0, то се " +"изпълнява\n" +" съответния блок „then КОМАНДИ“, след което завършва изпълнението на " +"целия\n" +" блок „if“.\n" +" Ако изходният код на никой от блоковете „if“ и „elif“ не е бил 0,\n" +" изпълнява се блока „else КОМАНДИ“, стига такъв да присъства. Изходният " +"код\n" +" от цялата конструкция е този на последната изпълнена команда или е 0, " +"ако\n" +" никое тестово условие, не се е оценило като истина.<\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Изпълнение на команда докато определен тест е успешен.\n" +" \n" +" Заместване и изпълнение на КОМАНДИте докато последната команда в блока\n" +" „while“ е с изходен код, който е 0.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Изпълнение на команда докато определен тест е неуспешен.\n" +" \n" +" Заместване и изпълнение на КОМАНДИте докато последната команда в блока\n" +" „until“ е с изходен код, който не е 0.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Създаване на копроцес с даденото ИМЕ.\n" +" \n" +" Асинхронно изпълнение на КОМАНДАта, като стандартните вход и изход се\n" +" пренасочват от и към файловите дескриптори, които трябва да са с " +"индекси\n" +" съответно 0 и 1 в променливата-масив ИМЕ в изпълняваната обвивка. Ако " +"не е\n" +" дадено ИМЕ на променлива, стандартно се ползва „COPROC“.\n" +" \n" +" Изходен код:\n" +" Изходният код е 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Дефиниране на функция на обвивката.\n" +" \n" +" Създаване на функция на обвивката със зададеното ИМЕ. Когато се извика " +"като\n" +" обикновена команда, КОМАНДИте се изпълняват в контекста на извикващата\n" +" обвивка. При извикването на ИМЕто, аргументите подадени на функцията " +"са\n" +" достъпни като $1,… , $9, а името на функцията е достъпно като " +"$FUNCNAME.\n" +" \n" +" Изходен код:\n" +" 0, освен ако ИМЕто не е само за четене." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Изпълнение на група от команди.\n" +" \n" +" Изпълняване на цял набор от команди в група. Това е един от начините да " +"се\n" +" пренасочи цял набор от команди.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Възобновяване на заден фон на изпълнението на задача\n" +" \n" +" Еквивалентно на аргумента ЗАДАЧА на командата „fg“. Възобновява спряна\n" +" задача или такава на заден фон. ЗАДАЧАта може да указва или име, или\n" +" номер на задача. Ако след ЗАДАЧАта се въведе знакът „&“, задачата\n" +" се изпълнява във фонов режим, все едно е била подадена като аргумент\n" +" на командата „bg“.\n" +" \n" +" Изходен код:\n" +" Изходният код е този възобновената задача." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Изчисляване на аритметичен израз\n" +" \n" +" ИЗРАЗът се изчислява според правилата на аритметичното оценяване.\n" +" Еквивалентно на „let ИЗРАЗ“.\n" +" \n" +" Изходен код:\n" +" 1, ако резултатът на ИЗРАЗа е 0. В противен случай — 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Изпълнение на команда-условие\n" +" \n" +" Връща състояние 0 или 1 в зависимост от оценката на условния ИЗРАЗ.\n" +" Изразите са съставени от същите примитиви, както вградената команда " +"„test“\n" +" и могат да се съчетават чрез следните оператори:\n" +" \n" +" ( ИЗРАЗ ) Връща стойността на ИЗРАЗа\n" +" ! ИЗРАЗ Истина, ако ИЗРАЗ се оценя на лъжа, в останалите случаи е " +"лъжа\n" +" ИЗРАЗ_1 && ИЗРАЗ_2\n" +" Истина, ако едновременно ИЗРАЗ_1 и ИЗРАЗ_2 са истина, в\n" +" останалите случаи е лъжа.\n" +" ИЗРАЗ_1 || ИЗРАЗ_2\n" +" Истина, ако поне единият от ИЗРАЗ_1 и ИЗРАЗ_2 е истина, в\n" +" останалите случаи е лъжа.\n" +" \n" +" Когато се използват операторите „==“ и „!=“, низът от дясната страна на\n" +" оператора се използва като шаблон и се извършва напасване. Когато се " +"ползва\n" +" операторът „=~“, изразът от дясната му страна се тълкува като регулярен\n" +" израз.\n" +" \n" +" Операторите „&&“ и „||“ не оценят ИЗРАЗ_2, ако ИЗРАЗ_1 е достатъчен за\n" +" определяне на стойността на израза.\n" +" \n" +" Изходен код:\n" +" 0 или едно според стойността на ИЗРАЗа." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Често използване промени на обвивката\n" +" \n" +" BASH_VERSION Информация за версията на bash\n" +" CDPATH Списък с директории разделени с двоеточие, които да се\n" +" търсят като аргументи за командата „cd“\n" +" GLOBIGNORE Списък с шаблони на файлови имена, разделени с " +"двоеточие,\n" +" които да се игнорират от заместването на пътя\n" +" HISTFILE Името на файла, в който се съхранява историята на " +"командите\n" +" HISTFILESIZE Максималният брой редове, които горният файл може да " +"съдържа\n" +" HISTSIZE Максималният брой редове, които една работеща обвивка " +"може\n" +" да достъпи\n" +" HOME Пълният път до домашната ви директория\n" +" HOSTNAME Името на текущата машина\n" +" HOSTTYPE Видът на процесора, под който работи текущата обвивка\n" +" IGNOREEOF Управлява действието на обвивката при срещането на " +"единичен\n" +" знак за край на файл „EOF“. Ако променливата е " +"зададена, тя\n" +" указва броя на знаците „EOF“, който могат да се срещнат\n" +" самостоятелно на един ред, преди обвивката да завърши " +"работа\n" +" и излезе (стандартно е 10). Когато променливата не е\n" +" зададена, един „EOF“ означава край на входящите данни\n" +" MACHTYPE Низ, който описва текущата система, на която работи " +"bash\n" +" MAILCHECK Колко често bash да проверява за нови писма (в секунди)\n" +" MAILPATH Списък с файлове, които bash проверява за нови писма\n" +" OSTYPE Версията на Юникс, на която работи bash\n" +" PATH Списък с директории, които да се претърсват за команди\n" +" PROMPT_COMMAND Команда, която да се изпълнява преди отпечатването на\n" +" основната подсказка на командния ред\n" +" PS1 Низ за основната подсказка\n" +" PS2 Низ за втората подсказка\n" +" PWD Пълният път и име на текущата директория\n" +" SHELLOPTS Списък с включените опции на обвивката, разделени с\n" +" двоеточие\n" +" TERM Името на текущия вид терминал\n" +" TIMEFORMAT Изходният формат за статистиката за времето за " +"изпълнение на\n" +" команда, който се използва от запазената дума „time“\n" +" auto_resume Стойност, която не е „null“, означава, че командна " +"дума,\n" +" която се появява самостоятелно на ред, първо се " +"проверява в\n" +" списъка с текущо спрените задачи. Ако бъде открита " +"там,\n" +" задачата се пуска и се слага на преден план. Стойност\n" +" „exact“ (строго съвпадение) означава, че командната " +"дума,\n" +" трябва точно да съвпада с името на команда в списъка " +"със\n" +" спрени задачи. Стойност „substring“ (съвпадение на " +"подниз)\n" +" означава, че командната дума трябва да е подниз на " +"задачата.\n" +" Всяка друга стойност означава, че командата думата " +"трябва да\n" +" е началото на спряна задача\n" +" histchars Знаци, които определят бързото заместване и това по " +"история.\n" +" Първият знак е за заместването по история, обикновено е " +"„!“.\n" +" Вторият е за бързото заместване, обикновено е „^“. " +"Третият\n" +" е за коментарите в историята, обикновено е „#“\n" +" HISTIGNORE Списък с шаблони, разделени с двоеточие, които указват " +"кои\n" +" команди да не се запазват в историята\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Добавяне на директории в стека.\n" +" \n" +" Добавя директория в стека на директориите или превърта стека\n" +" като най-горна директория става текущата директория. Без\n" +" аргументи сменя най-горните две директории.\n" +" \n" +" -n подтискане на нормалното преминаване към директория при изваждането " +"на\n" +" директория към стека, така че се променя само той.\n" +" \n" +" Аргументи:\n" +" +N Превърта стека, така че N-тата директория (като се брои от " +"лявата \n" +" страна на списъка, изведен от командата „dirs“ като се почва от " +"0)\n" +" да е най-отгоре.\n" +" \n" +" -N Превърта стека, така че N-тата директория (като се брои от " +"дясната\n" +" страна на списъка, изведен от командата „dirs“ като се почва от " +"0)\n" +" да е най-отгоре.\n" +" \n" +" \n" +" dir Добавя ДИРекторията най-отгоре в стека, като я прави новата " +"текуща\n" +" работна директория.\n" +" \n" +" Можете да изведете стека на директорията с командата „dirs“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е подаден неправилен аргумент или не може да се премине " +"към\n" +" съответната директория." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Изваждане на директории от стека.\n" +" \n" +" Маха директории от стека с тях. Без аргументи премахва последната " +"директория\n" +" в стека и влиза в новата последна директория.\n" +" \n" +" Опции:\n" +" -n подтискане на нормалното преминаване към директория при изваждането " +"на\n" +" директория към стека, така че се променя само той.\n" +" \n" +" Аргументи:\n" +" \n" +" +N премахва N-тия елемент като се брои отляво в списъка изведен от\n" +" командата „dirs“, като се брои от 0. Напр.: „popd +0“ премахва\n" +" първата директория, „popd +1“ - втората.\n" +" \n" +" -N премахва N-тия елемент като се брои отдясно в списъка изведен от\n" +" командата „dirs“, като се брои от 0. Напр.: „popd -0“ премахва\n" +" последната директория, „popd -1“ - предпоследната.\n" +" \n" +" Стекът с директориите се визуализира с командата „dirs“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е подаден неправилен аргумент или не може да се премине " +"към\n" +" съответната директория." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Извеждане на стека на директориите.\n" +" \n" +" Отпечатва списъка с текущо запомнените директории. Списъкът се попълва " +"чрез\n" +" командата „pushd“. Можете да вадите директории от стека с командата\n" +" „popd“.\n" +" \n" +" Опции:\n" +" -c изчистване на стека на директориите като изтрива всички елементи\n" +" -l извеждане на пълните имена на директориите, а не съкратените " +"спрямо\n" +" домашната директория имена („/homes/pesho/bin“, а не „~/bin“)\n" +" -p поредово отпечатване без поредния номер в стека\n" +" -v поредово отпечатване заедно с поредния номер в стека\n" +" \n" +" Аргументи: \n" +" +N извежда N-тия елемент отляво в списъка отпечатан от командата " +"„dirs“,\n" +" когато е стартирана без опции. Брои се от 0.\n" +" -N извежда N-тия елемент отдясно в списъка отпечатан от командата " +"„dirs“,\n" +" когато е стартирана без опции. Брои се от 0.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е дадена неправилна опция или възникне грешка." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Включване и изключване на опции на обвивката.\n" +" \n" +" Превключване на състоянието на всяка от дадените ОПЦИи на обвивката. " +"Ако не\n" +" не са зададени аргументи, се извежда списък от с дадените ОПЦИи или " +"всички,\n" +" ако не са дадени такива, като се указва за всяка дали и включена или " +"не.\n" +" \n" +" Опции:\n" +" -o ограничаване на опциите до определените за използване със „set -" +"o“\n" +" -p извеждане на всяка опция с означение дали е включена или не\n" +" -q без извеждане на информация\n" +" -s включване на всяка от ОПЦИИте\n" +" -u изключване на всяка от ОПЦИИте\n" +" \n" +" Изходен код:\n" +" 0, ако ОПЦИЯта е включена, грешка, ако е зададена неправилна или " +"изключена\n" +" ОПЦИЯ." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Форматиране и отпечатване на АРГУМЕНТИте според управлението на ФОРМАТа.\n" +" \n" +" Опции:\n" +" -v ПРОМЕНЛИВА изходът се поставя в ПРОМЕНЛИВАта на обвивката, вместо " +"да\n" +" се извежда на стандартния изход.\n" +" \n" +" ФОРМАТът е последователност от знаци, която съдържа три вида обекти:\n" +" ⁃ обикновени знаци, които биват отпечатани директно на стандартния " +"изход;\n" +" ⁃ екраниращи знакови последователности, които биват преобразувани и\n" +" отпечатани на стандартния изход;\n" +" ⁃ форматиращи знакови последователности, всяка от които предизвиква\n" +" отпечатването на следващ аргумент.\n" +" \n" +" Освен стандартните форматирания описани в ръководството на printf(1), " +"printf\n" +" приема и следните инструкции:\n" +" %b предизвиква заместването на екраниранията с обратно наклонени\n" +" черти в съответния аргумент\n" +" %q предизвиква цитирането на аргумента, така че да може да бъде\n" +" използван като вход за обвивката\n" +" %(fmt) отпечатване на низа при третиране на аргумента като дата и " +"време\n" +" според strftime(3)\n" +" \n" +" Форматът се преизползва до приемането на всички аргументи. Ако има по-\n" +" малко аргументи от посочените във форма̀та, поведението на допълнителните " +"е\n" +" все едно за аргумент да са подадени нулева стойност или празен низ.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не е дадена неправилна опция или възникне грешка при\n" +" извеждането на резултата или при присвояването на стойността." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Указване на начина на автоматичното дописване на аргументите от Readline.\n" +" \n" +" За всяко ИМЕ се извежда начинът за дописване на аргументите. Ако не са\n" +" дадени никакви опции, се извеждат текущите инструкции за автоматично\n" +" дописване във формат, който може да се използва за вход.\n" +" \n" +" Опции:\n" +" -p Извеждане на текущите инструкции за автоматично дописване във " +"формат,\n" +" който може да се използва за вход\n" +" -r Премахване на инструкциите за автоматично дописване на всяко ИМЕ, " +"а\n" +" когато такова не е указано — всички инструкции\n" +" -D Прилагане на дописванията и действията като стандартните за " +"командите,\n" +" без никакви специфични инструкции\n" +" -E Прилагане на дописванията и действията като тези на „празната“\n" +" команда — когато все още нищо не е написано на командния ред\n" +" -I Прилагане на дописванията и действията към първата дума " +"(обикновено\n" +" това е командата)\n" +" \n" +" При извършване на автоматично дописване, действията се прилагат в реда " +"на\n" +" опциите с главна буква дадени по-горе. Опцията „-D“ е с по-висок " +"приоритет\n" +" от „-E“, която има по-висок приоритет от „-I“.\n" +" \n" +" Изходен код:\n" +" 0, освен когато е дадена неправилна опция или възникне грешка." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Извеждане на възможните дописвания.\n" +" \n" +" Целта е да се ползва в рамките функция на обвивката, която генерира\n" +" възможните дописвания. Ако е зададен незадължителният аргумент ДУМА,\n" +" генерират се напасванията с него.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е дадена неправилна опция или възникне грешка." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Променяне или извеждане на опциите за дописване.\n" +" \n" +" Променяне на опциите дописване за всяко ИМЕ, или когато не са указани\n" +" ИМЕна — дописването, което се изпълнява в момента. Ако не са зададени\n" +" ОПЦИи, извеждане на на опциите за дописване за всяко име или за текущо\n" +" изпълняваното дописване.\n" +" \n" +" Опции:\n" +" -o ОПЦИЯ\n" +" Задаване ОПЦИЯта за дописване за всяко зададено ИМЕ\n" +" -D Задаване на опциите за „стандартното“ дописване на команда\n" +" -E Задаване на опциите за дописването на „празната“ команда\n" +" -I Задаване на опциите за дописването на първата дума\n" +" Използването на „+o“ вместо „-o“ изключва дадената опция.\n" +" \n" +" Аргументи:\n" +" \n" +" Всяко ИМЕ указва команда, за която трябва предварително да е зададена\n" +" спецификация за дописване чрез вградената команда „complete“. Ако не " +"са\n" +" зададени ИМЕна, командата „compopt“ трябва да бъде изпълнена от " +"функция,\n" +" която генерира спецификациите за дописване. В този случай опциите за " +"текущо\n" +" изпълнявания генератор на дописвания се променят.\n" +" \n" +" Изходен код:\n" +" 0, освен когато е дадена неправилна опция или липсват инструкции към " +"ИМЕто\n" +" за автоматично дописване." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Изчитане на редове от стандартния вход и запазване в променлива — " +"индексиран\n" +" низ.\n" +" \n" +" Прочитане на редове от стандартния вход, които след това се запазват в\n" +" променливата МАСИВ. Когато е дадена опцията „-u“, се чете от\n" +" ФАЙЛов_ДЕСКРиптор. Стандартното име на променливата-масив е MAPFILE.\n" +" \n" +" Опции:\n" +" -d РАЗДЕЛИТЕЛ РАЗДЕЛяне на редовете с този знак, а не с нов ред\n" +" -n МАКС_РЕДА Изчитане на не повече от МАКСимум РЕДа. Ако е 0, се\n" +" прочитат всички редове\n" +" -O НАЧАЛО Присвояването да започне при индекс НАЧАЛО в МАСИВа\n" +" Стандартната стойност е 0\n" +" -s БРОЙ_ПРОП Прескачане на първите БРОЙ за ПРОПускане прочетени реда\n" +" -t Премахване на последващия знак-РАЗДЕЛител от всеки ред\n" +" (стандартно е знакът за нов ред)\n" +" -u ФАЙЛов_ДЕСКРиптор\n" +" Изчитане на редовете от ФАЙЛов_ДЕСКРиптор, а не " +"стандартния\n" +" вход\n" +" -C ФУНКЦИЯ Функция, която се извиква при изчитането на всеки " +"БРОЙ_РЕДА\n" +" -c БРОЙ_РЕДА Редове, които да се изчетат преди да се извика " +"ФУНКЦИЯта\n" +" \n" +" Аргументи:\n" +" МАСИВ Име на променливата-масив\n" +" \n" +" Ако опцията „-C“ е зададена без „-c“, стандартния БРОЙ_РЕДА е 5000. " +"При\n" +" извикването на ФУНКЦИЯта за аргументи ѝ се подават индекса на следващия\n" +" елемент от масива и реда, който се счита за стойност.\n" +" \n" +" Ако не е дадено изрично НАЧАЛО, командата „mapfile“ изчиства МАСИВа, " +"преди\n" +" да започне присвояването към него.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако е дадена неправилна опция или ако МАСИВът е " +"променлива\n" +" само за четене или не е индексиран масив." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Прочитане на редове от файл и поставяне в променлива – масив.\n" +" \n" +" Синоним на „mapfile“." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Връща контекста на текущото извикване на функция.\n" +#~ " \n" +#~ " Без ИЗРАЗ връща " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "добавяне на процес: процесът %5ld (%s) е в програмния канал" + +#~ msgid "Unknown Signal #" +#~ msgstr "Непознат сигнал #" diff --git a/bash-5.1/po/boldquot.sed b/bash-5.1/po/boldquot.sed new file mode 100644 index 0000000000000000000000000000000000000000..4b937aa517bcff9f5adfc2a01d6d780445999297 --- /dev/null +++ b/bash-5.1/po/boldquot.sed @@ -0,0 +1,10 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g +s/“/“/g +s/”/”/g +s/‘/‘/g +s/’/’/g diff --git a/bash-5.1/po/ca.gmo b/bash-5.1/po/ca.gmo new file mode 100644 index 0000000000000000000000000000000000000000..0b94a7a0c4a33dba042b7450f868af413767e0ca Binary files /dev/null and b/bash-5.1/po/ca.gmo differ diff --git a/bash-5.1/po/ca.po b/bash-5.1/po/ca.po new file mode 100644 index 0000000000000000000000000000000000000000..f1cadd2b448aa6b0db95c47f94bc2de9ba8256bb --- /dev/null +++ b/bash-5.1/po/ca.po @@ -0,0 +1,5985 @@ +# Catalan messages for GNU bash. +# Copyright (C) 2002, 2003, 2010, 2014, 2015, 2017 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Montxo Vicente i Sempere , 2003 (traducció), 2010 (revisions). +# Jordi Mas i Hernàndez , 2004 (correccions). +# Ernest Adrogué Calveras , 2014, 2015, 2017. +msgid "" +msgstr "" +"Project-Id-Version: bash-4.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2017-01-10 20:11+0100\n" +"Last-Translator: Ernest Adrogué Calveras \n" +"Language-Team: Catalan \n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "subíndex erroni" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: s'elimina l'atribut «nameref»" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: no és possible convertir un vector indexat en associatiu" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: clau de vector associatiu no vàlida" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: no es pot assignar a un índex no-numèric" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: l'assignació en vectors associatius requereix un subíndex" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: no es pot crear: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: no s'ha trobat el mapa de tecles per a l'ordre" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: el primer caràcter no-blanc no és «\"»" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "falta un caràcter de tancament «%c» a %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: falta un caràcter «:» de separació" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: no es pot desvincular" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansió de claus: no es pot assignar memòria per a %s" + +#: braces.c:406 +#, fuzzy, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansió de claus: ha fallat l'assignació de memòria per a %d elements" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansió de claus: ha fallat l'assignació de memòria per a «%s»" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "«%s»: el nom de l'àlies no és valid" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "l'edició de línia no està habilitada" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "«%s»: el nom del mapa de tecles no és vàlid" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: no es pot llegir: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "«%s»: nom de funció desconegut" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s no està vinculat a cap tecla.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s pot ser invocat via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: no es pot desvincular" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "nombre d'iteracions" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "només té sentit en una iteració de tipus «for», «while» o «until»" + +# help caller +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Retorna el context de la subrutina actual.\n" +"\n" +" Sense EXPR, torna \"$línia $nomfitxer\". Amb EXPR, torna \"$línia\n" +" $subrutina $nomfitxer\"; aquesta informació addicional es pot utilitzar\n" +" per a proporcionar un traçat de la pila.\n" +"\n" +" El valor de EXPR indica quants «frames» retrocedir des de l'actual; el\n" +" «frame» superior és el 0.\n" +"\n" +" Estat de sortida:\n" +" Retorna 0 excepte si l'intèrpret no està executant una funció o si EXPR\n" +" no és una expressió vàlida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "la variable HOME no està definida" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "sobren arguments" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "directori nul" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "la variable OLDPWD no està definida" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "línia %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "atenció: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: sintaxi: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: l'opció requereix un argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: falta un argument numèric" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: no s'ha trobat" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: l'opció no és vàlida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: el nom de l'opció no és vàlid" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "«%s»: no és un identificador vàlid" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "nombre octal no vàlid" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "nombre hexadecimal no vàlid" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "nombre no vàlid" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: especificació de senyal no vàlida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "«%s»: pid o especificació de feina no vàlids" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variable de només lectura" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fora del domini" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s fora del domini" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: no existeix tal feina" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: no hi ha control de feines" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "no hi ha control de feines" + +# cd .. en un intèrpret restringit +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: restringit" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "restringit" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: no és una ordre interna de l'intèrpret" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "error d'escriptura: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "error en establir els atributs del terminal: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "error en obtenir els atributs del terminal: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: error en obtenir el directori actual: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: l'especificació de feina és ambigua" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "aquesta versió no té ajuda disponible" + +# unset UID +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: no es pot suprimir: %s de només lectura" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: no es pot suprimir" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nom d'acció no vàlid" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: no hi ha especificació de compleció" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "atenció: l'opció -F pot no funcionar com us espereu" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "atenció: l'opció -C pot no funcionar com us espereu" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "no s'està executant una funció de compleció" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "només es pot utilitzar en una funció" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: una variable referència no pot ser un vector" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: no es permeten autoreferències en variables referència" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: referència circular" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: la variable referència conté un nom de variable no vàlid" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "no és possible usar «-f» per convertir en funció" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funció de només lectura" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" +"%s: es desaconsella l'assignació múltiple en vectors utilitzant cometes" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: no és possible destruir variables vector d'aquesta manera" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: no és possible convertir un vector associatiu en indexat" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "no es poden carregar biblioteques dinàmicament" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "no es pot obrir l'objecte compartit %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "no s'ha trobat %s a l'objecte compartit %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: no s'ha carregat dinàmicament" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "l'intent de carregar %s ha fallat (%d): no carregat" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: no s'ha carregat dinàmicament" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: no es pot eliminar: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: és un directori" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: no és un fitxer ordinari" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: el fitxer és massa gran" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: no es poden executar fitxers binaris" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: no es pot executar: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "desconnectat\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "no és una sessió d'entrada: utilitzeu «exit»" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Hi ha feines aturades.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Hi ha feines en funcionament.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "no s'ha trobat cap ordre" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "especificació d'historial" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: no es pot obrir el fitxer temporal: %s" + +# fg quan no hi ha cap feina en segon pla +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "actual" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "la feina %d es va iniciar sense control de feines" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opció il·legal -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: l'opció requereix un argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "el «hashing» està deshabilitat" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: la taula «hash» és buida\n" + +# hash (sense arguments) +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "vegades\tordre\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Ordres de l'intèrpret coincidents amb '" +msgstr[1] "Ordres de l'intèrpret coincidents amb '" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"no hi ha ajuda sobre «%s». Proveu «help help», «man -k %s» o «info %s»." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: no es pot obrir: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Aquestes ordres de l'intèrpret estan definides internament.\n" +"Feu «help» per a veure'n una llista. \n" +"Feu «help nom» per a obtenir informació sobre la funció «nom».\n" +"Feu «info bash» per a obtenir informació general sobre l'intèrpret.\n" +"Feu «man -k» o «info» per a obtenir informació sobre altres programes.\n" +"\n" +"Un asterisc (*) significa que l'ordre està deshabilitada.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "no és possible usar més d'una opció d'entre -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "posició a l'historial" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: la marca horària no és vàlida" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: ha fallat l'expansió de l'historial" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib ha fallat" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "no es permeten altres opcions amb «-x»" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: els arguments han de ser ids de processos o feines" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Error desconegut" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "s'esperava una expressió" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: no és un vector indexat" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: l'especificació de descriptor de fitxer no és vàlida" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: el descriptor de fitxer no és vàlid: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: el nombre de línies no és vàlid" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: l'origen del vector no és vàlid" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: el quàntum de retorn no és vàlid" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "nom de variable vector en blanc" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "fa falta suport per a variables vector" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "«%s»: falta un caràcter de format" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: l'especificació de format de temps no és vàlida" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "«%c»: el caràcter de format no és vàlid" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "atenció: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "problema en interpretar el format: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "falta un dígit hexadecimal a \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "falta un dígit Unicode a \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "no hi ha més directoris" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: l'argument no és vàlid" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "la pila de directoris està buida" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "índex de la pila de directoris" + +# còpia parcial d'una altra cadena - l'original es troba més endavant +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Mostra la llista actual de directoris recordats. Els directoris són " +"afegits\n" +" a la llista mitjançant l'ordre «pushd»; podeu recórrer la llista de\n" +" directoris cap enrere amb l'ordre «popd».\n" +"\n" +" Opcions:\n" +" -c neteja la pila, esborrant-ne tots els elements\n" +" -l no mostra les versions abreviades (amb el prefix ~) dels\n" +" directoris relatius al vostre directori personal\n" +" -p mostra la pila, una entrada per línia\n" +" -v mostra la pila, una entrada per línia indicant la posició a\n" +" la pila\n" +"\n" +" Arguments:\n" +" +N Mostra l'entrada N-èssima, comptant des de l'esquerra de la\n" +" llista mostrada per «dirs» quan s'invoca sense opcions, \n" +" començant des de zero.\n" +"\n" +" -N Mostra l'entrada N-èssima, comptant des de la dreta de la\n" +" llista mostrada per «dirs» quan s'invoca sense opcions,\n" +" començant des de zero." + +# còpia parcial d'una altra cadena - l'original es troba més endavant +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Afegeix un directori al capdamunt de la pila de directoris, o fa girar la\n" +" llista, de manera que al capdamunt de la pila hi queda el directori de\n" +" treball corrent. Sense arguments, intercanvia els dos directoris de " +"més\n" +" amunt.\n" +"\n" +" Opcions:\n" +" -n Omet el canvi de directori quan s'afegeixen directoris a la\n" +" pila, de manera que només canvia el contingut de la pila.\n" +"\n" +" Arguments:\n" +"\n" +" +N Gira la llista de manera tal que l'N-èssim directori\n" +" (comptant des de l'esquerra de la llista que mostra «dirs»,\n" +" començant des de zero) queda a dalt de tot.\n" +"\n" +" -N Gira la llista de manera tal que l'N-èssim directori\n" +" (comptant des de la dreta de la llista que mostra «dirs»,\n" +" començant des de zero) queda a dalt de tot.\n" +"\n" +" dir Afegeix DIR al capdamunt de la pila de directoris, i el\n" +" converteix en el nou directori de treball corrent.\n" +"\n" +" Podeu veure el contingut de la pila de directoris amb l'ordre «dirs»." + +# còpia parcial d'una altra cadena - l'original es troba més endavant +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Elimina entrades de la pila de directoris. Sense arguments, elimina el\n" +" directori al capdamunt de la pila, i canvia al nou directori de dalt de\n" +" la pila.\n" +"\n" +" Opcions:\n" +" -n Omet el canvi de directori quan s'eliminen directoris de la\n" +" pila, de manera que només canvia el contingut de la pila.\n" +"\n" +" Arguments:\n" +" +N Elimina l'entrada N-èssima, comptant des de l'esquerra de la\n" +" llista que mostra «dirs», començant des de zero. Per\n" +" exemple: «popd +0» elimina el primer directori, i «popd +1»\n" +" el segon.\n" +"\n" +" -N Elimina l'entrada N-èssima, comptant des de la dreta de la\n" +" llista que mostra «dirs», començant des de zero. Per\n" +" exemple: «popd -0» elimina l'últim directori, i «popd -1» el\n" +" penúltim.\n" +"\n" +" Podeu veure el contingut de la pila de directoris amb l'ordre «dirs»." + +# read -t -5 +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: el límit de temps no és vàlid" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "error de lectura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "només es permet fer «return» des d'una funció o script" + +# unset -f -v foo +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "no és possible suprimir una funció i una variable alhora" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: no és una variable vector" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: no és una funció" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: no es pot exportar" + +# shift -4 +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "nombre de «shifts»" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "no es poden activar i desactivar opcions de forma simultània" + +# shopt -s foo +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: l'opció de l'intèrpret no és vàlida" + +# source +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "fa falta un nom de fitxer" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: no s'ha trobat el fitxer" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "no es pot suspendre" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "no és possible suspendre un intèrpret d'entrada" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s és un àlies de «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s és una paraula clau de l'intèrpret\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s és una funció\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s és una ordre interna especial\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s és una ordre interna\n" + +# type dmesg +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s és %s\n" + +# hash cp; type cp +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s és a la taula «hash» (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: el límit no és vàlid" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "«%c»: ordre errònia" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: no es pot obtenir el límit: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "límit" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: no es pot modificar el límit: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "nombre octal" + +# umask z=rwx +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "«%c»: l'operador de mode simbòlic no és vàlid" + +# umask u=rwz +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "«%c»: el mode simbòlic conté caràcters no vàlids" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " línia " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "última ordre: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Avortant..." + +# prefix afegit als avisos infomatius interns (internal_inform) +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORMACIÓ: " + +#: error.c:462 +msgid "unknown command error" +msgstr "error no identificat" + +#: error.c:463 +msgid "bad command type" +msgstr "tipus d'ordre erroni" + +#: error.c:464 +msgid "bad connector" +msgstr "connector erroni" + +#: error.c:465 +msgid "bad jump" +msgstr "salt erroni" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variable no definida" + +# SIGALRM +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atemps esgotat mentre s'esperaven dades: autodesconnexió\n" + +# error intern +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "no s'ha pogut redirigir l'entrada estàndard des de /dev/null: %s" + +# error intern +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: «%c»: el caràcter de format no és vàlid" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: el coprocés [%d:%s] encara existeix" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "error de canonada" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: excedit el nombre màxim d'avaluacions imbricades (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: excedit el nombre màxim d'imbricacions per a «source» (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: excedit el nombre màxim de funcions imbricades (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restricció: no podeu especificar «/» en noms d'ordres" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: no s'ha trobat l'ordre" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: intèrpret erroni" + +# error intern +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: no es pot executar el fitxer binari: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "«%s»: és una ordre interna especial" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "no s'ha pogut duplicar l'fd %d com a fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "excedit el nivell màxim de recursivitat per a expressions" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "«underflow» a la pila de recursivitat" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "error de sintaxi a l'expressió" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "intent d'assignació a una no-variable" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "error de sintaxi a l'expressió" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "divisió per 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bug: el component «expassign» és erroni" + +# echo $((4 > 5 ? 0)) +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "falta un caràcter «:» a l'expressió condicional" + +# echo $((4 ** -1)) +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exponent menor que 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "fa falta un identificador després del pre-increment o pre-decrement" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "falta un caràcter «)»" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "error de sintaxi: s'esperava un operand" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "error de sintaxi: l'operador aritmètic no és vàlid" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (l'element erroni és «%s»)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "la base aritmètica no és vàlida" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: el nombre de línies no és vàlid" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "el valor de la base és massa gran" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: expressió errònia\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: els directoris superiors són inaccessibles" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "no s'ha pogut restablir el mode «nodelay» per a l'fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "error en crear un fd nou a partir de l'fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: ja existia un «buffer» per al nou fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp de la canonada" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "el pid bifurcat %d apareix a la feina en execució %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "s'elimina la feina aturada %d amb grup de procés %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: el pid %5ld (%s) està marcat com a viu" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: no existeix tal pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Senyal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Fet" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Aturat" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Aturat(%s)" + +# ha de tenir menys de 10 caràcters o no queda alineat +#: jobs.c:1892 +msgid "Running" +msgstr "Funcionant" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Fet(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Sortida %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Estat desconegut" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(s'ha bolcat la memòria)" + +# wd = working directory +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (dt: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid (de %ld a %ld) per al procés inferior" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: el pid %ld no és un fill d'aquest intèrpret" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: No es té constància del procés %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: la feina %d està aturada" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: no existeix tal feina" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: la feina ha acabat" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: la feina %d ja es troba en segon pla" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: s'activa «WNOHANG» per a evitar un bloqueig indefinit" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s línia %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (s'ha bolcat la memòria)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(dt ara: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp ha fallat" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: disciplina de línia" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplina de línia" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "no s'ha pogut establir el grup de procés del terminal (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "aquesta sessió no té control de feines" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: asserció fallida: %s\n" + +# error intern i el \r provoca warnings +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "desconegut" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: bloc abatussat a la llista de disponibles" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: cridat amb un argument de bloc ja alliberat" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: cridat amb un argument bloc no assignat" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: underflow detectat; mh_nbytes fora del domini" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underflow detectat; mh_nbytes fora del domini" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: les mides inicial i final del fragment difereixen" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: cridat amb un argument de bloc no assignat" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: underflow detectat: mh_nbytes fora del domini" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflow detectat: mh_nbytes fora del domini" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: les mides inicial i final del fragment difereixen" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: la taula «alloc» està plena de «FIND_ALLOC»?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p ja es troba a la taula com a assignat?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p ja es troba a la taula com a lliure?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base no vàlida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: màquina desconeguda" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: el servei no és vàlid" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: la ubicació remota no és vàlida" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "les operacions de xarxa no estan suportades" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: no s'ha pogut canviar el local (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: no s'ha pogut canviar el local (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: no s'ha pogut canviar el local (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: no s'ha pogut canviar el local (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Teniu correu a $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Teniu correu nou a $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "El correu a %s ha estat llegit\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "error de sintaxi: fa falta una expressió aritmètica" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "error de sintaxi: «;» inesperat" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "error de sintaxi: «((%s))»" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipus d'instrucció erroni %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "document literal a la línia %d delimitat per EOF (volia «%s»)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: instrucció de redirecció «%d» fora del domini" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) excedeix «SIZE_MAX» (%lu): línia " +"truncada" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "excedit el nombre màxim de documents literals" + +# "echo $(echo" en un script +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF inesperat mentre es cercava «%c»" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF inesperat mentre es cercava «]]»" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "error de sintaxi a l'expressió condicional: element «%s» inesperat" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "error de sintaxi a l'expressió condicional" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "element «%s» inesperat, s'esperava «)»" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "s'esperava «)»" + +# [[ -d ]] +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argument «%s» inesperat a un operador unari condicional" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "argument inesperat a un operador unari condicional" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "element «%s» inesperat, s'esperava un operador binari condicional" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "s'esperava un operador binari condicional" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argument inesperat «%s» a un operador binari condicional" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "argument inesperat a un operador binari condicional" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "element «%c» inesperat en una ordre condicional" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "element «%s» inesperat en una ordre condicional" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "element %d inesperat en una ordre condicional" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "error de sintaxi a prop de l'element inesperat «%s»" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "error de sintaxi a prop de «%s»" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "error de sintaxi: final de fitxer inesperat" + +#: parse.y:6365 +msgid "syntax error" +msgstr "error de sintaxi" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Useu \"%s\" per a abandonar l'intèrpret.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF inesperat mentre es cercava un «)»" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: la funció «%s» no s'ha trobat" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possible reintent cíclic" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: el paràmetre «COMPSPEC» és NUL" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: el connector «%d» és erroni" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: el descriptor de fitxer no és vàlid" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: el punter de fitxer és NUL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: «%c»: el caràcter de format no és vàlid" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "descriptor de fitxer fora del domini" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redirecció ambigua" + +# opció noclobber +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: no es pot escriure sobre un fitxer existent" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restricció: no podeu redirigir la sortida" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "no s'ha pogut crear el fitxer temporal per a un document literal: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: no és possible assignar un fd a una variable" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port no està suportat si no hi ha xarxa" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "error de redirecció: no es pot duplicar l'fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "no s'ha trobat el directori /tmp, sis-plau creeu-lo!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp ha de ser un nom de directori vàlid" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: l'opció no és vàlida" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "no s'ha pogut establir l'uid com a %d: uid effectiu %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "no s'ha pogut establir el gid com a %d: gid effectiu %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "no es pot iniciar el depurador; mode de depuració desactivat" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: És un directori" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "No teniu nom!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versió %s-(%s)\n" + +# +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Sintaxi: %s [opció GNU llarga] [opció] ...\n" +" %s [opció GNU llarga] [opció] fitxer-script ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Opcions GNU llargues:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opcions de l'intèrpret:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD, o -c ordre, o bé -O opció_intèrpret\t(només invocació)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s, o bé -o opció\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Feu «%s -c \"help set\"» per a informació sobre les opcions de l'intèrpret.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Feu «%s -c help» per a obtenir informació sobre les ordres internes.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Feu servir l'ordre «bashbug» per a informar de «bugs».\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "pàgina web de bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ajuda general per a programari GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: l'operació no és vàlida" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Senyal no fiable" + +# Senyals POSIX +#: siglist.c:50 +msgid "Hangup" +msgstr "Desconnexió" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interrupció" + +#: siglist.c:58 +msgid "Quit" +msgstr "Sortida" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Instrucció il·legal" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Traçat/trampa BPT" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Instrucció «ABORT»" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Instrucció «EMT»" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Excepció de coma flotant" + +#: siglist.c:86 +msgid "Killed" +msgstr "Mort" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Error de bus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Violació de segment" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Crida de sistema errònia" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Canonada trencada" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Alarma" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Finalitzat" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Estat E/S urgent" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Aturat (senyal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continua" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Procés inferior mort o aturat" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Aturat (entrada tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Aturat (sortida tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "E/S a punt" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Limitació de CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Limitació de fitxers" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarma (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarma (perfil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Canvi de finestra" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Bloqueig de registre" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Senyal d'usuari 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Senyal d'usuari 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Dades HFT d'entrada pendents" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "fallada imminent de l'alimentació" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "fallada imminent del sistema" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migració del procés a una altra CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "error de programació" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "mode de monitoratge HFT concedit" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "mode de monitoratge HFT retractat" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "seqüència d'àudio HFT completada" + +#: siglist.c:214 +msgid "Information request" +msgstr "Petició d'informació" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Senyal Desconegut #%d" + +# missatge similar a subst.c:75XX +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "substitució errònia: falta un «%s» a %s" + +# foo[1]=(1 2 3) +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: no és possible assignar llistes a l'element d'un vector" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "no s'ha pogut crear la canonada per a la substitució de procés" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "no s'ha pogut crear el fill per a la substitució de procés" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "no s'ha pogut obrir la canonada %s per a lectura" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "no s'ha pogut obrir la canonada %s per a escriptura" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "no s'ha pogut duplicar la canonada %s com a fd %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "substitució d'ordre: s'ignora un octet nul en l'entrada" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "no s'ha pogut crear la canonada per a la substitució d'ordre" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "no s'ha pogut crear un fill per a la substitució d'ordre" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: no s'ha pogut duplicar la canonada com a fd 1" + +# buscar context +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: el nom de la variable referenciada no és vàlid" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: expansió indirecta no vàlida" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nom de variable no vàlid" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: paràmetre nul o no definit" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: paràmetre nul o no definit" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expressió de subcadena < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: substitució errònia" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: no és possible assignar d'aquesta manera" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "en futures versions de bash s'avaluarà com a substitució aritmètica" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "subtitució errònia: falta un caràcter «`» final a %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "cap coincidència: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "s'esperava un argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: s'esperava una expressió amb enters" + +#: test.c:265 +msgid "`)' expected" +msgstr "s'esperava «)»" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "s'esperava «)», s'ha trobat %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: s'esperava un operador binari" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: s'esperava un operador unari" + +#: test.c:881 +msgid "missing `]'" +msgstr "falta un «]»" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "error de sintaxi: «;» inesperat" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "el número de senyal no és vàlid" + +#: trap.c:325 +#, fuzzy, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: excedit el nombre màxim d'avaluacions imbricades (%d)" + +# internal warning +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valor incorrecte a trap_list[%d]: %p" + +# internal warning +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: senyal erroni %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "error en importar la definició de funció de «%s»" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "el nivell de l'intèrpret (%d) és massa elevat, es restableix a 1" + +# error intern +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: no és possible assignar un valor a la variable" + +# buscar context +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: assignació numèrica a una variable referència" + +# error intern +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "el paràmetre «exportstr» de la variable %s és nul" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "el caràcter %d en el paràmetre «exportstr» de %s no és vàlid" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "falta un «=» en el paràmetre «exportstr» de %s" + +# error intern +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" + +# error intern +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "" + +# error intern +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" + +# error intern +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: no s'ha pogut obrir com a FITXER" + +# error intern +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: el valor de compatibilitat és fora del domini" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2012 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Llicència GPLv3+: GNU GPL versió 3 o posterior\n" +" \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versió %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Aquest programa és lliure; sou lliures de modificar-lo i redistribuir-lo." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "No té CAP GARANTIA, fins a l'extrem permès per la llei." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: no s'han pogut assignar %lu octets (%lu octets assignats)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: no s'han pogut assignar %lu octets" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: no s'han pogut assignar %lu octets (%lu octets assignats)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: no s'han pogut assignar %lu octets" + +# help alias +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nom[=valor] ...]" + +# help unalias +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nom [nom ...]" + +# help bind +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m mapa] [-f fitxer] [-q nom] [-u nom] [-r tecles] [-x " +"tecles:ordre-intèrpret] [tecles:funció-readline o ordre-readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [ordre-interna [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] ordre [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [nom[=valor] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] nom[=valor] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [opció] nom[=valor] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f fitxer] [nom ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts cadena nom [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nom] [ordre [arguments ...]] [redirecció ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e editor] [-lnr] [primer] [últim] o fc -s [pat=sub] [ordre]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [feina]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [feina ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ubicació] [-dt] [nom ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [patró ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d offset] [n] o history -anrw [fitxer] o history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [feina ...] o jobs -x ordre [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [feina ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s senyal | -n númsenyal | -senyal] pid | feina ... o kill -l [senyal]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a vector] [-d delim] [-i text] [-n núm] [-N núm] [-p introd] [-" +"t espera] [-u fd] [nom ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nom-opció] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nom ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nom[=valor] ...] o bé export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nom[=valor] ...] o bé readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source fitxer [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". fitxer [arguments]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] senyal ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nom [nom ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [límit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOM [in PARAULES ... ] ; do ORDRES; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do ORDRES; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOM [in PARAULES ... ;] do ORDRES; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] canonada" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PARAULA in [PATRÓ [| PATRÓ]...) ORDRES ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if ORDRES; then ORDRES; [ elif ORDRES; then ORDRES; ]... [ else ORDRES; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while ORDRES; do ORDRES; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until ORDRES; do ORDRES; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOM] ordre [redireccions]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nom { ORDRES ; } o bé nom () { ORDRES ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ ORDRES ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "feina [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expressió ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expressió ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Nom i significat d'algunes variables de l'intèrpret" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [opció ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [arguments]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o opció] [-A acció] [-G patró] [-W " +"llista] [-F funció] [-C ordre] [-X filtre] [-P prefix] [-S sufix] [nom ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o opció] [-A acció] [-G patró] [-W paraules]\n" +"[-F funció] [-C ordre] [-X filtre] [-P prefix] [-S sufix] [paraula]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opció] [-DE] [nom ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n nombre] [-O origen] [-s nombre] [-t] [-u fd] [-C " +"callback] [-c quàntum] [vector]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n nombre] [-O origen] [-s nombre] [-t] [-u fd] [-C callback] [-c " +"quàntum] [vector]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Defineix o mostra àlies.\n" +"\n" +" Sense arguments «alias» mostra la llista d'àlies definits, en format\n" +" «alias NOM=VALOR», a la sortida estàndard.\n" +"\n" +" Altrament, defineix un àlies per a cada NOM per al qual existeix un\n" +" VALOR. Un espai al final de VALOR fa que la paraula següent sigui\n" +" susceptible de ser substituïda per un àlies quan s'expandeix aquest\n" +" àlies.\n" +"\n" +" Opcions:\n" +" -p Mostra tots els àlies definits en format reutilitzable\n" +"\n" +" Estat de sortida:\n" +" alias torna cert, excepte si NOM no correspon a cap àlies definit." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Esborra tots els NOMs de la llista d'àlies definits.\n" +"\n" +" Opcions:\n" +" -a esborra totes les definicions d'àlies.\n" +"\n" +" Torna cert, excepte si NOM no és un àlies existent." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Estableix vincles de tecla i variables Readline.\n" +"\n" +" Vincula una seqüència de tecles a una funció o macro Readline, o bé\n" +" estableix una variable Readline. La sintaxi dels arguments no-opcions\n" +" és la mateixa que en el fitxer ~/.inputrc, però ha de consistir en un\n" +" únic argument: per exemple, bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +"\n" +" Opcions:\n" +" -m mapa Usa MAPA com a mapa de tecles mentre duri aquesta\n" +" ordre. Els noms de mapes acceptables són emacs, emacs-\n" +" standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-" +"command,\n" +" i vi-insert.\n" +" -l Mostra els noms de les funcions\n" +" -P Mostra els noms de les funcions i els vincles de tecla.\n" +" -p Mostra les funcions i els vincles en un format que es pot\n" +" reutilitzar com a entrada.\n" +" -S Mostra les seqüències de tecles que invoquen macros i els\n" +" seus valors respectius.\n" +" -s Mostra les seqüències de tecles que invoquen macros i els\n" +" seus valors respectius en un format que es pot " +"reutilitzar\n" +" com a entrada.\n" +" -V Mostra els noms de les variables i els seus valors.\n" +" -v Mostra els noms de les variables i els seus respectius\n" +" valors en un format que es pot reutilitzar com a entrada.\n" +" -q funció Consulta quines tecles invoquen la funció especificada.\n" +" -u funció Desvincula les tecles vinculades a la funció " +"especificada.\n" +" -r tecles Elimina el vincle associat a TECLES.\n" +" -f fitxer Obté els vincles de tecles de FITXER.\n" +" -x tecles:ordre Fa que s'executi ORDRE quan es prem TECLES.\n" +" -X Mostra les tecles amb les respectives ordres vinculades\n" +" amb l'opció -x, en un format reutilitzable com a entrada.\n" +"\n" +" Estat de sortida:\n" +" bind torna 0 excepte si passeu una opció no reconeguda o es produeix\n" +" un error." + +# help break +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Surt de bucles for, while o until.\n" +"\n" +" Surt d'un bucle FOR, WHILE o UNTIL. Si especifiqueu N, trenca N bucles\n" +" de la imbricació.\n" +"\n" +" Estat de sortida:\n" +" L'estat de sortida és 0 excepte si N és més petit que 1." + +# help continue +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Continua bucles for, while o until.\n" +"\n" +" Executa la següent iteració en un bucle FOR, WHILE o UNTIL. Si\n" +" especifiqueu N, continua el bucle N-èssim de la imbricació.\n" +"\n" +" Estat de sortida:\n" +" L'estat de sortida és 0 excepte si N és més petit que 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Executa ordres internes.\n" +"\n" +" Executa ORDRE-INTERNA amb ARG com a arguments sense fer una cerca de\n" +" l'ordre. Això és útil si voleu reimplementar una ordre interna de\n" +" l'intèrpret com a funció, però voleu executar l'ordre interna des de la\n" +" pròpia funció.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de ORDRE-INTERNA, o fals si ORDRE-INTERNA no " +"és\n" +" una ordre interna." + +# help caller +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Retorna el context de la subrutina actual.\n" +"\n" +" Sense EXPR, torna \"$línia $nomfitxer\". Amb EXPR, torna \"$línia\n" +" $subrutina $nomfitxer\"; aquesta informació addicional es pot utilitzar\n" +" per a proporcionar un traçat de la pila.\n" +"\n" +" El valor de EXPR indica quants «frames» retrocedir des de l'actual; el\n" +" «frame» superior és el 0.\n" +"\n" +" Estat de sortida:\n" +" Retorna 0 excepte si l'intèrpret no està executant una funció o si EXPR\n" +" no és una expressió vàlida." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Canvia el directori de treball de l'intèrpret.\n" +"\n" +" Canvia el directori actual a DIR. Per defecte, DIR és el valor de la\n" +" variable HOME.\n" +"\n" +" La variable CDPATH defineix els camins de cerca per al directori que\n" +" conté DIR. Es poden especificar camins alternatius separats per dos\n" +" punts (:). Un nom de directori nul s'interpreta com al directori\n" +" actual. Si DIR comença amb una barra, aleshores no s'usa CDPATH.\n" +"\n" +" Si no es troba el directori, i l'opció de l'intèrpret «cdable_vars» " +"està\n" +" activada, aleshores la paraula s'interpreta com a un nom de variable.\n" +" Si la variable especificada té algun valor, aquest valor s'usa en lloc\n" +" de DIR.\n" +"\n" +" Opcions:\n" +" -L força el seguiment d'enllaços simbòlics: resol els enllaços\n" +" simbòlics que conté DIR després de processar «..»\n" +" -P usa l'estructura de directoris física sense seguir " +"possibles\n" +" enllaços simbòlics: resol els enllaços simbòlics que conté\n" +" DIR abans de processar «..»\n" +" -e amb l'opció -P, si no es pot determinar el directori de\n" +" treball actual amb èxit, surt amb un estat diferent de zero\n" +" -@ en sistemes que ho suporten, presenta fitxers amb atributs\n" +" estesos com a directoris que contenen els atributs del\n" +" fitxer\n" +"\n" +" Per defecte, se segueixen els enllaços simbòlics, com si " +"especifiquéssiu\n" +" l'opció «-L». El component «..» es processa eliminant el component del\n" +" camí immediatament previ fins a la primera barra o fins al principi de\n" +" DIR.\n" +"\n" +" Estat de sortida:\n" +" Torna 0 si s'ha canviat de directori, i si $PWD s'ha establert de forma\n" +" satisfactòria quan s'utilitza -P; altrament un valor diferent de zero." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Mostra el nom del directori de treball actual.\n" +"\n" +" Opcions:\n" +" -L mostra el valor de $PWD si és el nom del directori de\n" +" treball actual\n" +" -P mostra el directori físic, sense cap enllaç simbòlic\n" +"\n" +" Per defecte, «pwd» es comporta com si haguéssiu especificat «-L».\n" +"\n" +" Estat de sortida:\n" +" Torna 0 excepte si heu especificat una opció no vàlida o no es pot\n" +" llegir el directori actual." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Ordre nul·la.\n" +"\n" +" No té cap efecte; aquesta ordre no fa res.\n" +"\n" +" Estat de sortida:\n" +" Sempre reïx." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Torna un resultat reeixit.\n" +"\n" +" Estat de sortida:\n" +" Sempre reïx." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Torna un resultat fallit.\n" +"\n" +" Estat de sortida:\n" +" Sempre falla." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Executa una ordre simple o mostra informació sobre ordres.\n" +"\n" +" Executa ORDRE amb ARGS sense cercar funcions de l'intèrpret amb aquest\n" +" nom, o bé mostra informació sobre l'ORDRE especificada. Es pot\n" +" utilitzar per a invocar programes en el disc, quan existeix una funció\n" +" amb el mateix nom.\n" +"\n" +" Opcions:\n" +" -p usa el valor per defecte de la variable PATH que garanteix\n" +" trobar totes les utilitats estàndards\n" +" -v mostra una descripció de l'ORDRE similar a la que mostra\n" +" l'ordre «type»\n" +" -V mostra una descripció més detallada per a cada ORDRE\n" +"\n" +" Estat de sortida:\n" +" Retorna l'estat de sortida de ORDRE, o fracàs si ORDRE no s'ha trobat." + +# help declare +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Assigna valors i atributs a variables.\n" +"\n" +" Declara variables i els hi assigna atributs. Sense cap NOM, mostra el\n" +" valor i atributs de totes les variables.\n" +"\n" +" Opcions:\n" +" -f només té en compte noms i definicions de funcions\n" +" -F només mostra noms de funcions (a part del número de línia i\n" +" el nom del fitxer, en mode de depuració)\n" +" -g crea variables globals quan s'utilitza dins d'una funció,\n" +" altrament s'ignora\n" +" -p mostra els atributs i el valor de cada NOM\n" +"\n" +" Opcions que estableixen atributs:\n" +" -a per a fer NOMs vectors indexats (si estan suportats)\n" +" -A per a fer NOMs vectors associatius (si estan suportats)\n" +" -i per a assignar l'atribut de nombre enter a NOMs\n" +" -l per a convertir NOMs a minúscules en l'assignació\n" +" -n per a fer NOM una referència a la variable que té per nom\n" +" el seu valor\n" +" -r per a fer NOMs variables de només lectura\n" +" -t per a assignar l'atribut «traça» a NOMs\n" +" -u per a convertir NOMs a majúscules en l'assignació\n" +" -x per a exportar NOMs\n" +"\n" +" Si feu servir «+» en lloc de «-», elimina l'atribut.\n" +"\n" +" Les variables que tenen l'atribut de nombre enter s'avaluen\n" +" aritmèticament (vegeu l'ordre «let») quan s'assigna un valor a la\n" +" variable.\n" +"\n" +" Quan s'usa en una funció, «declare» converteix NOMs en variables " +"locals,\n" +" igual que l'ordre «local». L'opció «-g» inhabilita aquest " +"comportament.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si rep una opció invàlida o es produeix un error." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Assigna valors i atributs a variables.\n" +"\n" +" Sinònim de «declare». Vegeu «help declare»." + +# help local +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Defineix variables locals.\n" +"\n" +" Crea una variable local anomenada NOM i li assigna VALOR. OPCIÓ pot " +"ser\n" +" qualsevol opció que «declare» admeti.\n" +"\n" +" Les variables locals només es poden utilitzar dins d'una funció; només\n" +" són visibles a dins de la funció on són definides i dins de les " +"funcions\n" +" imbricades dins d'aquestes.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit excepte si heu especificat una opció no vàlida, es produeix\n" +" un error, o l'intèrpret no està executant una funció." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escriu arguments a la sortida estàndard.\n" +"\n" +" Mostra els ARGs a la sortida estàndard, separats per un únic espai i\n" +" seguits d'un salt de línia.\n" +"\n" +" Opcions:\n" +" -n omet el caràcter de salt de línia.\n" +" -e activa la interpretació de seqüències d'escapada\n" +" -E desactiva la interpretació de seqüències d'escapada\n" +"\n" +" «echo» interpreta els següents caràcters escapats amb una barra " +"inversa:\n" +" \\a alerta (campana)\n" +" \\b retrocés\n" +" \\c suprimeix tota sortida ulterior\n" +" \\e caràcter d'escapada\n" +" \\E caràcter d'escapada\n" +" \\f salt de pàgina\n" +" \\n salt de línia\n" +" \\r retorn de carro\n" +" \\t tabulació horitzontal\n" +" \\v tabulació vertical\n" +" \\\\ barra invertida\n" +" \\0nnn caràcter corresponent al codi ASCII número NNN, on NNN és " +"un\n" +" número octal de 0 a 3 dígits.\n" +" \\xHH caràcter de 8 bits corresponent al valor HH, on HH és un\n" +" número hexadecimal d'1 o 2 dígits.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, tret que es produeixi un error d'escriptura." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escriu arguments a la sortida estàndard.\n" +"\n" +" Mostra els ARGs a la sortida estàndard seguits d'un salt de línia.\n" +"\n" +" Opcions:\n" +" -n omet el caràcter de salt de línia.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, tret que es produeixi un error d'escriptura." + +# help enable +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Habilita o inhabilita ordres internes de l'intèrpret.\n" +"\n" +" Habilita o inhabilita ordres internes de l'intèrpret. Inhabilitar una\n" +" ordre interna permet executar una ordre que es troba en el disc i que " +"té\n" +" el mateix nom que l'ordre interna, sense necessitat d'escriure'n la\n" +" ubicació completa.\n" +"\n" +" Opcions:\n" +" -a mostra una llista d'ordres internes indicant-ne l'estat\n" +" -n inhabilita NOM o bé mostra una llista de les ordres " +"internes\n" +" que es troben inhabilitades\n" +" -p mostra la llista en format reutilitzable\n" +" -s mostra només les ordres internes «especials» Posix\n" +"\n" +" Opcions per a controlar l'enllaçat dinàmic:\n" +" -f carrega l'ordre interna NOM, de l'objecte compartit FITXER\n" +" -d esborra una ordre interna carregada amb l'opció -f\n" +"\n" +" Sense opcions, habilita cada un dels NOMs.\n" +"\n" +" Per a utilitzar el «test» que es troba al $PATH en lloc de la versió\n" +" interna de l'intèrpret, feu «enable -n test».\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si NOM no és una ordre interna o té lloc un error." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Executa els arguments com una ordre.\n" +"\n" +" Combina ARGs en una única cadena, utilitza el resultat com a entrada " +"per\n" +" a l'intèrpret i executa les ordres resultants.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'ordre, o èxit si l'ordre és nul·la." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Interpreta arguments que representen opcions.\n" +"\n" +" getopts és utilitzat per les utilitats de bash per a interpretar els\n" +" paràmetres posicionals com a opcions.\n" +"\n" +" CADENA conté les lletres de les opcions a reconèixer; si una lletra va\n" +" seguida de dos punts, l'opció requereix un argument, que s'ha de " +"separar\n" +" amb un espai en blanc.\n" +"\n" +" Cada cop que s'invoca, getopts posarà l'opció successiva a la variable\n" +" d'entorn $nom, inicialitzant nom si no existeix, i l'índex del següent\n" +" argument a la variable OPTIND. La variable OPTIND s'inicialitza a 1\n" +" cada cop que s'invoca l'intèrpret o un script. Quan una opció " +"requereix\n" +" un argument, getopts col·loca l'argument a la variable OPTARG.\n" +"\n" +" getopts pot informar d'errors de dues maneres. Si el primer caràcter " +"de\n" +" CADENA és un caràcter de dos punts (:), getopts entra en mode " +"silenciós.\n" +" En aquest mode, no es mostra cap missatge d'error. Si es detecta una\n" +" opció no vàlida, getopts col·loca el caràcter de l'opció a OPTARG. Si\n" +" no es troba un argument requerit, getopts posa un ':' a NOM, i el\n" +" caràcter de l'opció trobada a OPTARG. Si getopts no es troba en mode\n" +" silenciós, i es detecta una opció no vàlida, getopts posa un '?' a NOM " +"i\n" +" elimina la variable OPTARG. Si no troba un argument requerit, posa un\n" +" '?' a NOM, elimina OPTARG, i mostra un missatge de diagnòstic.\n" +"\n" +" Si la variable OPTERR té el valor 0, getopts evita mostrar missatges\n" +" d'error, encara que el primer caràcter de CADENA no siguin dos punts.\n" +" Per defecte, OPTERR té el valor 1.\n" +"\n" +" Normalment, getopts interpreta els paràmetres posicionals ($0 - $9),\n" +" però si hi ha més arguments, s'interpreten aquests.\n" +"\n" +" Estat de sortida:\n" +" Retorna èxit si es troba alguna opció; falla si s'arriba al final de " +"les\n" +" opcions o si es produeix un error." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Substitueix el procés de l'intèrpret per l'ordre especificada.\n" +"\n" +" Executa ORDRE, substituint aquest intèrpret pel programa especificat.\n" +" Es passen ARGUMENTS a l'ORDRE com a arguments. Si no especifiqueu cap\n" +" ORDRE, qualsevol redirecció té efectes a l'intèrpret actual.\n" +"\n" +" Opcions:\n" +" -a nom passa NOM a ORDRE com a argument número zero\n" +" -c executa ORDRE en un entorn buit\n" +" -t passa un guionet a ORDRE com a argument número zero\n" +"\n" +" Si l'ordre no es pot executar i la sessió és no-interactiva, " +"l'intèrpret\n" +" surt, excepte si l'opció «execfail» està habilitada.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, tret que ORDRE no es trobi o es produeixi un error de\n" +" redirecció." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Abandona l'intèrpret.\n" +"\n" +" Surt de l'intèrpret amb estat N. Si ometeu N, l'estat de sortida és el\n" +" de l'última ordre executada." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Abandona una sessió d'entrada.\n" +"\n" +" Abandona una sessió d'entrada amb estat de sortida N. Torna un error " +"si\n" +" no s'està executant en una sessió d'entrada." + +# help fc (hi ha un bug a la cadena original) +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Mostra o executa ordres de l'historial.\n" +"\n" +" fc s'utilitza per a mostrar o editar i re-executar ordres de\n" +" l'historial. PRIMER i ÚLTIM poden ser números que defineixen un\n" +" interval, o PRIMER pot ser una cadena, que significa l'ordre més recent\n" +" que comença amb aquesta cadena.\n" +"\n" +" Opcions:\n" +" -e EDITOR selecciona quin editor utilitzar. Per defecte és el valor\n" +" de la variable FCEDIT, després el valor de EDITOR, i\n" +" finalment vi\n" +" -l\tmostra les línies en lloc d'editar-les\n" +" -n\tomet els números de línia a l'hora de mostrar la llista\n" +" -r\tinverteix l'ordre de les línies (més recents primer)\n" +"\n" +" Amb el format «fc -s [pat=sub ...] [ordre]», ORDRE es re-executa " +"després\n" +" d'haver fet la substitució PAT=SUB.\n" +"\n" +" Un àlies útil és r='fc -s', de manera que «r cc» executa l'última ordre\n" +" que comença per «cc» i «r» re-executa l'última ordre.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit o l'estat de l'última ordre executada; diferent de zero si " +"es\n" +" produeix un error." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Porta una feina al primer pla.\n" +"\n" +" Mou la feina identificada per FEINA al primer pla, convertint-la en la\n" +" feina corrent. Si ometeu FEINA, s'utilitza la feina que l'intèrpret\n" +" considera com a corrent.\n" +"\n" +" Estat de sortida:\n" +" L'estat de l'ordre que es mou al primer pla, o fallada si es produeix " +"un\n" +" error." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Mou feines al segon pla.\n" +"\n" +" Mou la feina identificada per FEINA al segon pla, com si s'hagués\n" +" iniciat amb un «&». Si ometeu FEINA, s'utilitza la feina que\n" +" l'intèrpret considera com a feina corrent.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si el control de feines no està habilitat o es\n" +" produeix un error." + +# help hash +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Recorda o mostra la ubicació de programes.\n" +"\n" +" Determina i recorda la ubicació completa de cada NOM d'ordre. Sense\n" +" arguments, mostra informació sobre les ordres que s'han recordat.\n" +"\n" +" Opcions:\n" +" -d oblida la ubicació recordada per a cada NOM\n" +" -l utilitza un format que es pot reciclar com a " +"entrada\n" +" -p ubicació utilitza UBICACIÓ com a ubicació completa per a NOM\n" +" -r oblida totes les ubicacions recordades\n" +" -t mostra la ubicació recordada per a cada NOM,\n" +" precedint cada ubicació amb el corresponent NOM, si\n" +" hi ha múltiples NOMs.\n" +" Arguments:\n" +" NOM Es busca NOM en el $PATH i s'afegeix a la llista\n" +" d'ordres recordades.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si NOM no es troba o passeu una opció invàlida." + +# help help +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Mostra informació sobre ordres internes.\n" +"\n" +" Mostra ajuda sobre les ordres internes. Amb PATRÓ, dóna informació\n" +" detallada sobre aquelles ordres que coincideixen amb PATRÓ, altrament\n" +" mostra una llista amb temes d'ajuda.\n" +"\n" +" Opcions:\n" +" -d mostra una descripció curta de cada tema\n" +" -m mostra la forma d'ús en format de pseudo-pàgina de manual\n" +" -s mostra una sinopsi de cada tema corresponent a PATRÓ\n" +"\n" +" Arguments:\n" +" PATRÓ Patró que especifica un tema d'ajuda\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si PATRÓ no es troba o passeu una opció invàlida." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Mostra o manipula l'historial.\n" +"\n" +" Mostra l'historial amb números de línia, indicant les entrades\n" +" modificades amb «*». Amb l'argument N, només mostra les N últimes\n" +" entrades.\n" +"\n" +" Opcions:\n" +" -c esborra la llista d'entrades\n" +" -d offset esborra l'entrada de l'historial a la posició OFFSET\n" +" -a afegeix la sessió actual al fitxer de l'historial\n" +" -n llegeix el fitxer de l'historial i afegeix les línies\n" +" prèviament no llegides a la llista\n" +" -r llegeix el fitxer de l'historial i n'afegeix el contingut\n" +" sencer a la llista\n" +" -w escriu l'historial actual al fitxer de l'historial\n" +" -p expandeix cada ARG i mostra el resultat, sense desar-lo\n" +" a la llista\n" +" -s afegeix ARGs a la llista com una única entrada\n" +"\n" +" Si passeu un nom de FITXER, s'utilitza com a fitxer d'historial. En " +"cas\n" +" contrari, si $HISTFILE té algun valor, s'utilitza aquest, si no\n" +" s'utilitza ~/.bash_history.\n" +"\n" +" Si la variable $HISTTIMEFORMAT està definida i no és nul·la, el seu\n" +" valor s'utilitza com a cadena de format strftime(3) per a mostrar " +"l'hora\n" +" associada a cada entrada de l'historial. En cas contrari no es mostra\n" +" informació horària.\n" +"\n" +" Estat de sortida: \n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Mostra l'estat de feines.\n" +"\n" +" Mostra les feines actives. Si especifiqueu FEINA, es restringeix la\n" +" sortida a la feina especificada. Sense opcions, mostra l'estat de " +"totes\n" +" les feines actives.\n" +"\n" +" Opcions:\n" +" -l mostra els IDs de procés a més de la informació normal\n" +" -n mostra només les feines l'estat de les quals ha\n" +" canviat des de l'última notificació\n" +" -p mostra només els IDs de procés\n" +" -r restringeix la sortida a les feines en execució\n" +" -s restringeix la sortida a les feines aturades\n" +"\n" +" Amb l'opció -x, s'executa ORDRE, després de substituir totes les\n" +" especificacions de feina per l'ID del procés del líder del grup de\n" +" processos d'aquella feina, a ARGS.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un " +"error.\n" +" Si utilitzeu -x, torna l'estat de sortida d'ORDRE." + +# help disown +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Deslliga feines vinculades a l'intèrpret actual.\n" +"\n" +" Suprimeix FEINA de la taula de feines actives. Si no especifiqueu\n" +" FEINA, s'interpreta que us referiu a la feina corrent.\n" +"\n" +" Opcions:\n" +" -a suprimeix totes les feines si no especifiqueu FEINA\n" +" -h\tmarca FEINA per a no enviar-li un senyal SIGHUP si\n" +" l'intèrpret rep un SIGHUP\n" +" -r suprimeix totes les feines en execució\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció o FEINA invàlida." + +# help kill +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Envia un senyal a una feina.\n" +"\n" +" Envia el senyal SENYAL o NÚMSENYAL al procés corresponent a PID o " +"FEINA.\n" +" Si no especifiqueu cap senyal, s'envia un SIGTERM.\n" +"\n" +" Opcions:\n" +" -s senyal SENYAL és el nom d'un senyal\n" +" -n númsenyal\tNÚMSENYAL és el número d'un senyal\n" +" -l mostra els noms dels senyals; si hi ha arguments \n" +" després de «-l» s'interpreten com a números de\n" +" senyals, els noms dels quals s'han de mostrar\n" +" -L sinònim de -l\n" +"\n" +" kill és una ordre interna per dues raons: perquè això permet usar IDs " +"de\n" +" feina en lloc de IDs de procés, i perquè permet matar processos encara\n" +" que arribeu al límit de processos que se us permet crear.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error." + +# help let +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Avalua expressions aritmètiques.\n" +"\n" +" Avalua cada ARG com a expressió aritmètica. Les operacions es fan amb\n" +" enters d'amplada fixa sense comprovacions de desbordament, tot i que " +"les\n" +" divisions per 0 es detecten i es marquen com a error. La següent " +"llista\n" +" mostra els operadors, agrupats en nivells d'igual precedència. Els\n" +" nivells apareixen en ordre descendent de precedència.\n" +"\n" +" \tid++, id--\tpostincrement, postdecrement\n" +" \t++id, --id\tpreincrement, predecrement\n" +" \t-, +\t\tnegatiu, positiu unaris\n" +" \t!, ~\t\tnegació lògica i a nivell de bits\n" +" \t**\t\texponenciació\n" +" \t*, /, %\t\tmultiplicació, divisió, residu\n" +" \t+, -\t\taddició, subtracció\n" +" \t<<, >>\t\tdesplaçament de bits a l'esquerra i a la dreta\n" +" \t<=, >=, <, >\tcomparació\n" +" \t==, !=\t\tigualtat, desigualtat\n" +" \t&\t\tAND a nivell de bits\n" +" \t^\t\tXOR a nivell de bits\n" +" \t|\t\tOR a nivell de bits\n" +" \t&&\t\tAND lògic\n" +" \t||\t\tOR lògic\n" +" \texpr ? expr : expr\n" +" \t\t\toperador condicional\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignació\n" +"\n" +" S'admeten variables de l'intèrpret com a operands. El nom de la\n" +" variable se substitueix pel seu valor (convertit en enter d'amplada\n" +" fixa). No cal que la variable tingui l'atribut d'enter perquè pugui\n" +" aparèixer en una expressió aritmètica.\n" +"\n" +" Els operadors s'avaluen en ordre de precedència. Les subexpressions\n" +" entre parèntesis s'avaluen primer, independentment de les regles de\n" +" precedència anteriors.\n" +"\n" +" Estat de sortida:\n" +" Si l'avaluació de l'últim ARG és 0, let torna 1; altrament torna 0." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Llegeix una línia a l'entrada estàndard i la divideix en camps.\n" +"\n" +" Llegeix una sola línia a l'entrada estàndard, o al descriptor de fitxer\n" +" FD si especifiqueu l'opció -u. La línia es divideix en camps, segons\n" +" les mateixes regles que en la separació de paraules, i la primera\n" +" paraula s'assigna al primer NOM, la segona al segon NOM, etc., mentre\n" +" que les paraules sobrants, si n'hi ha, s'assignen a l'últim NOM. Només\n" +" es reconeixen com a delimitadors de paraula els caràcters que conté la\n" +" variable $IFS.\n" +"\n" +" Si no especifiqueu cap NOM, en aquest cas la línia llegida es desa a la\n" +" variable REPLY.\n" +"\n" +" Opcions:\n" +" -a vector\tassigna les paraules llegides a VECTOR, de forma " +"seqüencial\n" +" començant des de l'índex número 0.\n" +" -d delim\tcontinue llegint fins a trobar el caràcter DELIM, en lloc " +"de\n" +" fins a trobar un salt de línia\n" +" -e\tsi la sessió és interactiva, utilitza Readline per a obtenir\n" +" la línia\n" +" -i text\tUtilitza TEXT com a text inicial per a Readline\n" +" -n núm\ttorna després de llegir exactament NÚM caràcters, o quan es\n" +" trobi el delimitador si apareix abans de NÚM caràcters\n" +" -N núm torna només després de llegir exactament NÚM caràcters,\n" +" excepte si es troba EOF o s'esgota el temps d'espera,\n" +" i ignora qualsevol delimitador\n" +" -p introd mostra la cadena INTROD sense cap caràcter de salt de línia\n" +" afegit, abans d'intentar llegir res\n" +" -r prohibeix escapar caràcters amb una barra invertida\n" +" -s suprimeix l'eco quan l'entrada està connectada a un " +"terminal\n" +" -t temps surt si transcorre TEMPS (en segons) abans d'haver\n" +" aconseguit llegir una línia sencera. Per defecte, el límit\n" +" de temps és el valor de la variable TMOUT. TEMPS pot ser " +"un\n" +" número amb decimals. Si TEMPS és 0, read torna\n" +" immediatament, sense intentar llegir cap dada, i torna èxit\n" +" només si hi ha dades disponibles en el descriptor de fitxer\n" +" FD especificat. Un estat de sortida més gran que 128 " +"indica\n" +" que s'ha esgotat el temps d'espera.\n" +" -u fd llegeix dades al descriptor de fitxer FD, en lloc de a\n" +" l'entrada estàndard.\n" +"\n" +" Estat de sortida:\n" +" El codi de retorn és zero, excepte si es troba EOF (final de fitxer),\n" +" s'arriba al límit de temps (en aquest cas, és major que 128), es\n" +" produeix un error d'assignació de variable, o si heu especificat un\n" +" descriptor de fitxer invàlid amb l'opció -u." + +# help return +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Torna des d'una funció de l'intèrpret.\n" +"\n" +" Provoca que una funció o script executat amb «source» torni amb el " +"valor\n" +" de retorn especificat per N. Si s'omet N, l'estat de retorn és aquell\n" +" de l'última ordre executada dins la funció o script.\n" +"\n" +" Estat de sortida:\n" +" Torna N, o fallada si l'intèrpret no està executant cap funció o script." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Estableix opcions de l'intèrpret i paràmetres posicionals.\n" +"\n" +" Modifica el valor d'atributs de l'intèrpret i de paràmetres " +"posicionals,\n" +" o mostra els noms i valors de les variables de l'intèrpret.\n" +"\n" +" Opcions:\n" +" -a Exporta les variables que es creïn o es modifiquin.\n" +" -b Notifica immediatament la finalització de feines.\n" +" -e Surt immediatament si una ordre acaba amb estat diferent de zero.\n" +" -f Deshabilita la generació de noms de fitxers («globbing»).\n" +" -h Recorda la ubicació de les ordres que s'executen.\n" +" -k Afegeix tots els arguments en forma d'assignació a l'entorn de\n" +" l'ordre, no només aquells que precedeixen el nom de l'ordre.\n" +" -m Activa la gestió de feines.\n" +" -n Llegeix ordres, però sense executar-les.\n" +" -o opció\n" +" Estableix la variable corresponent a OPCIÓ:\n" +" allexport igual que -a\n" +" braceexpand igual que -B\n" +" emacs utilitza una interfície d'edició estil emacs\n" +" errexit igual que -e\n" +" errtrace igual que -E\n" +" functrace igual que -T\n" +" hashall igual que -h\n" +" histexpand igual que -H\n" +" history activa l'historial\n" +" ignoreeof l'intèrpret no surt en cas de trobar EOF\n" +" interactive-comments\n" +" permet comentaris en ordres interactives\n" +" keyword igual que -k\n" +" monitor igual que -m\n" +" noclobber igual que -C\n" +" noexec igual que -n\n" +" noglob igual que -f\n" +" nolog actualment aquesta opció no té cap efecte\n" +" notify igual que -b\n" +" nounset igual que -u\n" +" onecmd igual que -t\n" +" physical igual que -P\n" +" pipefail el valor retornat per una canonada és l'estat de\n" +" l'última ordre que ha acabat amb estat no-zero,\n" +" o zero si cap ordre ha acabat amb estat diferent\n" +" de zero\n" +" posix ajusta el comportament de bash a l'estàndard " +"Posix\n" +" privileged igual que -p\n" +" verbose igual que -v\n" +" vi usa una interfície d'edició estil vi\n" +" xtrace igual que -x\n" +" -p S'activa automàticament sempre que els ids efectiu i real de\n" +" l'usuari no coincideixin. No processa el fitxer $ENV ni importa\n" +" funcions. Si desactiveu aquesta opció, els valors de l'uid i gid\n" +" reals s'assignen a l'uid i gid efectius.\n" +" -t Surt després de llegir i executar una única ordre.\n" +" -u Tracta les variables no definides com a error, en substitucions.\n" +" -v Escriu les línies de l'entrada a la sortida.\n" +" -x Escriu ordres i arguments a la sortida a mesura que s'executen.\n" +" -B Activa l'expansió de claudàtors ([])\n" +" -C Prohibeix la sobrescriptura de fitxers ordinaris mitjançant\n" +" redireccions.\n" +" -E Intercepta senyals ERR també durant l'execució de funcions.\n" +" -H Activa la substitució d'elements de l'historial. Aquesta opció\n" +" està activa per defecte si la sessió és interactiva.\n" +" -P Omet la resolució d'enllaços simbòlics a l'hora d'executar ordres\n" +" que canvien el directori corrent, tals com cd.\n" +" -T Intercepta senyals DEBUG i RETURN també durant l'execució de\n" +" funcions.\n" +"\n" +" -- Assigna els arguments restants a paràmetres posicionals. Si no\n" +" queda cap argument, suprimeix els paràmetres posicionals.\n" +" \n" +" - Assigna els arguments restants a paràmetres posicionals.\n" +" Desactiva les opcions -x i -v.\n" +"\n" +" Un signe + en lloc de - desactiva l'opció corresponent. Els arguments\n" +" que controlen les opcions es poden utilitzar a l'hora d'invocar\n" +" l'intèrpret. El conjunt d'opcions actives en aquest intèrpret es pot\n" +" trobar a $-. La resta d'arguments són paràmetres posicionals i\n" +" s'assignen per ordre a $1, $2, ... $n. Si no especifiqueu cap ARG, es\n" +" mostren totes les variables definides.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si especifiqueu una opció no vàlida." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Suprimeix el valor i atributs de variables i funcions.\n" +"\n" +" Per a cada NOM, suprimeix la corresponent variable o funció.\n" +"\n" +" Opcions:\n" +" -f interpreta NOM com a funció\n" +" -v interpreta NOM com a variable\n" +" -n interpreta NOM com a referència a una altra variable, i\n" +" suprimeix aquesta variable, en lloc de la variable a què\n" +" es refereix\n" +"\n" +" Sense opcions, primer intenta suprimir una variable, i si això falla\n" +" intenta suprimir una funció.\n" +"\n" +" Algunes variables no poden ser suprimides; per ex., vegeu «readonly».\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si especifiqueu una opció no vàlida o NOM és una\n" +" variable o funció de només lectura." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Exporta variables de l'intèrpret.\n" +"\n" +" Exporta automàticament cada NOM a l'entorn de les ordres subsegüents.\n" +" Si especifiqueu VALOR, s'assigna VALOR a la variable abans\n" +" d'exportar-la.\n" +"\n" +" Opcions:\n" +" -f tracta NOM com a funció\n" +" -n suprimeix la propietat d'exportació per a NOM\n" +" -p mostra una llista amb totes les variables i funcions\n" +" exportades\n" +" \n" +" L'argument «--» atura el processament de més opcions.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si especifiqueu una opció no vàlida o NOM no és\n" +" vàlid." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marca variables com a no modificables.\n" +"\n" +" Marca cada NOM com a variable o funció de només lectura; els valors\n" +" d'aquests NOMs es poden modificar en assignacions subseqüents. Si\n" +" especifiqueu VALOR, s'assigna VALOR a la variable o funció abans de\n" +" marcar-la com a només lectura.\n" +"\n" +" Opcions:\n" +" -a limita la sortida a vectors indexats\n" +" -A limita la sortida a vectors associatius\n" +" -f limita la sortida a funcions\n" +" -p mostra una llista amb totes les variables o funcions,\n" +" depenent de si heu especificat l'opció -f, de només lectura\n" +"\n" +" L'argument «--» atura el processament de més opcions.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si especifiqueu una opció no vàlida o NOM no és\n" +" vàlid." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Desplaça els paràmetres posicionals.\n" +"\n" +" Reanomena els paràmetres posicionals $N+1, $N+2 ... com a $1, $2 ... " +"Si\n" +" ometeu N, s'assumeix que és 1.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si N és negatiu o més gran que $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Executa les ordres d'un fitxer a l'intèrpret actual.\n" +"\n" +" Llegeix les ordres que hi ha a FITXER i les executa a l'intèrpret\n" +" actual. Les entrades a $PATH s'utilitzen per a localitzar el directori\n" +" que conté FITXER. Si especifiqueu qualsevol ARG, aquests arguments es\n" +" converteixen en paràmetres posicionals quan s'executa FITXER.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de l'última ordre a FITXER executada; falla si FITXER no\n" +" es pot llegir." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspèn l'execució de l'intèrpret.\n" +"\n" +" Suspèn l'execució d'aquest intèrpret fins a rebre un senyal SIGCONT. " +"Si\n" +" no es força, les sessions d'entrada no es poden suspendre.\n" +"\n" +" Opcions:\n" +" -f força la suspensió, encara que sigui una sessió d'entrada\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si no hi ha control de feines o es produeix un error." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Avalua una expressió condicional.\n" +"\n" +" Surt amb estat 0 (cert) o 1 (fals) en funció de l'avaluació d'EXPR. " +"Les\n" +" expressions poden ser unàries o binàries. Les expressions unàries\n" +" s'utilitzen sovint per a determinar l'estat de fitxers. També podeu\n" +" utilitzar operadors de cadenes, i operadors de comparació numèrica.\n" +"\n" +" El comportament de test depèn del nombre d'arguments. Podeu trobar\n" +" l'especificació completa a la plana del manual de bash.\n" +"\n" +" Operadors de fitxer:\n" +"\n" +" -a FITXER Cert si el fitxer existeix.\n" +" -b FITXER Cert si el fitxer és un fitxer especial de blocs.\n" +" -c FITXER Cert si el fitxer és un fitxer especial de caràcters.\n" +" -d FITXER Cert si el fitxer és un directori.\n" +" -e FITXER Cert si el fitxer existeix.\n" +" -f FITXER Cert si el fitxer existeix i és ordinari.\n" +" -g FITXER Cert si el bit «set-group-id» està activat.\n" +" -h FITXER Cert si el fitxer és un enllaç simbòlic.\n" +" -L FITXER Cert si el fitxer és un enllaç simbòlic.\n" +" -k FITXER Cert si el bit «sticky» està activat.\n" +" -p FITXER Cert si el fitxer és una canonada.\n" +" -r FITXER Cert si teniu permís per a llegir el fitxer.\n" +" -s FITXER Cert si el fitxer existeix i no està buit.\n" +" -S FITXER Cert si el fitxer és un «socket».\n" +" -t FD Cert si FD està obert i es refereix a un terminal.\n" +" -u FITXER Cert si el bit «set-user-id» està activat.\n" +" -w FITXER Cert si teniu permís per a escriure al fitxer.\n" +" -x FITXER Cert si teniu permís per a executar el fitxer.\n" +" -O FITXER Cert si el vostre usuari és propietari del fitxer.\n" +" -G FITXER Cert si el vostre grup és propietari del fitxer.\n" +" -N FITXER Cert si el fitxer ha canviat des de l'última lectura.\n" +"\n" +" FITXER1 -nt FITXER2 Cert si fitxer1 és més nou que fitxer2 (segons " +"la\n" +" data de modificació).\n" +"\n" +" FITXER1 -ot FITXER2 Cert si fitxer1 és més antic que fitxer2.\n" +"\n" +" FITXER1 -ef FITXER2 Cert si fitxer1 és un enllaç dur a fitxer2.\n" +"\n" +" Operadors de cadena:\n" +"\n" +" -z CADENA Cert si la cadena és buida.\n" +"\n" +" -n CADENA Cert si la cadena no és buida.\n" +"\n" +" CADENA1 = CADENA2\n" +" Cert si les cadenes són iguals.\n" +" CADENA1 != CADENA2\n" +" Cert si les cadenes no són iguals.\n" +" CADENA1 < CADENA2\n" +" Cert si CADENA1 va primer alfabèticament.\n" +" CADENA1 > CADENA2\n" +" Cert si CADENA2 va primer alfabèticament.\n" +"\n" +" Altres operadors:\n" +"\n" +" -o OPCIÓ Cert si l'opció de l'intèrpret està activada.\n" +" -v VAR Cert si la variable VAR està definida.\n" +" -R VAR Cert si la variable VAR està definida i és una \n" +" referència a una altra variable.\n" +" ! EXPR Cert si expr és fals.\n" +" EXPR1 -a EXPR2 Cert si tant expr1 com expr2 són cert.\n" +" EXPR1 -o EXPR2 Cert si qualsevol de expr1 o expr2 són certes.\n" +"\n" +" arg1 OP arg2 Tests aritmètics. OP és un de -eq, -ne, -lt, -le, -" +"gt,\n" +" o -ge.\n" +"\n" +" Els operadors aritmètics binaris tornen cert si ARG1 és igual, no\n" +" igual, més petit que, més petit que o igual, més gran que, o més gran\n" +" que o igual que ARG2, respectivament.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit si EXPR s'avalua com a cert; falla si EXPR s'avalua com a\n" +" fals o si especifiqueu un argument no vàlid." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Avalua una expressió condicional.\n" +"\n" +" Aquesta ordre interna és un sinònim de \"test\", amb la diferència que\n" +" l'últim argument ha de ser un signe «]» que tanqui el «[» inicial." + +# help times +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Mostra els temps d'execució.\n" +"\n" +" Mostra el temps d'execució d'usuari i sistema acumulat per l'intèrpret " +"i\n" +" per tots els seus processos inferiors.\n" +"\n" +" Estat de sortida:\n" +" Sempre reïx." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Intercepta senyals i altres esdeveniments.\n" +"\n" +" Defineix i activa controladors de senyal, que són executats quan\n" +" l'intèrpret rep senyals o en altres circumstàncies.\n" +"\n" +" ARG és una ordre que es llegeix i s'executa quan l'intèrpret rep " +"SENYAL.\n" +" Si ometeu ARG (i especifiqueu un únic SENYAL) o ARG és «-», cada senyal\n" +" és restablert al seu valor original. Si ARG és una cadena nul·la,\n" +" aleshores SENYAL és ignorat per l'intèrpret i per tots els programes\n" +" invocats per l'intèrpret.\n" +"\n" +" Si SENYAL és EXIT (0), ARG s'executa quan l'intèrpret surt. Si SENYAL\n" +" és DEBUG, ARG s'executa abans de cada ordre. Si SENYAL és RETURN, ARG\n" +" s'executa cada cop que una funció o script executat amb l'ordre «.» o\n" +" «source» finalitza l'execució. Si SENYAL és ERR, ARG s'executa en els\n" +" mateixos casos en què una ordre faria sortir l'intèrpret si l'opció -e\n" +" estigués activada.\n" +"\n" +" Si no especifiqueu cap argument, trap mostra una llista d'ordres\n" +" associades a cada senyal.\n" +"\n" +" Opcions:\n" +" -l mostra una llista amb els noms dels senyals i els números\n" +" corresponents\n" +" -p mostra els controladors de senyal associats a cada SENYAL\n" +"\n" +" Cada SENYAL és o bé un nom de senyal definit al fitxer o bé\n" +" un número de senyal. Els noms de senyal no són sensibles a les\n" +" majúscules i el prefix SIG és opcional. Podeu enviar un senyal a\n" +" l'intèrpret amb l'ordre «kill -senyal $$».\n" +"\n" +" Estat de sortida: \n" +" Torna èxit, excepte si algun SENYAL no és vàlid o especifiqueu una\n" +" ordre no vàlida." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Mostra informació sobre el tipus d'ordre.\n" +"\n" +" Indica com seria interpretat NOM si s'utilitzés com a ordre.\n" +"\n" +" Opcions:\n" +" -a mostra totes les ubicacions que contenen un executable\n" +" anomenat NOM, incloent àlies, ordres internes i funcions si i\n" +" només si no s'usa conjuntament amb l'opció «-p»\n" +" -f omet la cerca de funcions\n" +" -P força una cerca al PATH per a cada NOM, encara que sigui un\n" +" àlies, ordre interna o funció, i torna el nom del fitxer que\n" +" s'executaria\n" +" -p torna o bé el nom del fitxer que s'executaria, o bé res, si\n" +" «type -t NOM» no indica «fitxer».\n" +" -t torna només una paraula, que és «àlies», «paraula clau»,\n" +" «funció», «ordre interna», «fitxer», o bé «», depenent de si\n" +" NOM és un àlies, una paraula reservada de l'intèrpret, una\n" +" funció, una ordre interna, un fitxer, o no es pot trobar,\n" +" respectivament.\n" +"\n" +" Arguments:\n" +" NOM El nom de l'ordre a interpretar.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit si es troben tots els NOMs; falla si n'hi ha algun que no es\n" +" pot trobar." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Canvia els límits d'utilització de recursos per part de l'intèrpret.\n" +"\n" +" Permet controlar la quantitat de recursos disponibles per a l'intèrpret\n" +" d'ordres i per als processos que aquest crea, en els sistemes que\n" +" admeten tal control.\n" +"\n" +" Opcions:\n" +" -S estableix una limitació «tova»\n" +" -H estableix una limitació «dura»\n" +" -a\tmostra tots els límits establerts\n" +" -b\tmida màxima de la memòria intermèdia per a «sockets»\n" +" -c\tmida màxima dels fitxers de bolcat de memòria\n" +" -d\tmida màxima del segment de dades d'un procés\n" +" -e\tprioritat màxima d'un procés («nice»)\n" +" -f\tmida màxima dels fitxers escrits per l'intèrpret i fills\n" +" -i\tnombre màxim de senyals pendents\n" +" -k nombre màxim de cues («kqueue») obertes per a aquest procés\n" +" -l\tquantitat màxima de memòria que un procés pot blocar\n" +" -m\tmida màxima del conjunt resident (RSS)\n" +" -n\tnombre màxim de descriptors de fitxers oberts\n" +" -p\tmida màxima de la memòria intermèdia per a canonades\n" +" -q\tnombre màxim d'octets a les cues de missatges POSIX\n" +" -r\tprioritat màxima de temps-real\n" +" -s\tmida màxima de la pila\n" +" -t\tquantitat màxima de temps de CPU en segons\n" +" -u\tnombre màxim de processos d'usuari\n" +" -v\tmida de la memòria virtual\n" +" -x\tnombre màxim de fitxers de bloqueig\n" +" -P nombre màxim de pseudoterminals\n" +" -T nombre màxim de fils d'execució\n" +"\n" +" Algunes opcions poden no estar disponibles en algunes plataformes.\n" +"\n" +" Si especifiqueu un LÍMIT, aquest s'utilitza com a nou valor per al\n" +" recurs indicat; els valors especials de LÍMIT són «soft», «hard» i\n" +" «unlimited», que signifiquen límit tou actual, límit dur actual, i " +"sense\n" +" límit, respectivament. En cas contrari, es mostra el valor actual per\n" +" al recurs especificat. Si no especifiqueu cap opció, se suposa -f.\n" +"\n" +" Els valors s'indiquen en increments de 1024 octets, excepte en el cas " +"de\n" +" l'opció -t, que és en segons, -p, que és en increments de 512 octets, i\n" +" -u, que és en nombre de processos.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, tret que especifiqueu una opció invàlida o es produeixi un\n" +" error." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Mostra o estableix la màscara de mode per a fitxers.\n" +"\n" +" Estableix la màscara de creació de fitxers en MODE. Si MODE s'omet,\n" +" mostra el valor actual de la màscara.\n" +"\n" +" Si MODE comença amb un dígit, s'interpreta com a número octal; en cas\n" +" contrari és una cadena de mode simbòlica com les que accepta chmod(1).\n" +"\n" +" Opcions:\n" +" -p sense MODE, mostra la sortida en un format que es pot\n" +" reciclar com a entrada\n" +" -S\tmostra la màscara en forma simbòlica; altrament produeix un\n" +" número octal\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si MODE no és vàlid o passeu una opció no vàlida." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Espera la finalització de feines i en retorna l'estat de sortida.\n" +"\n" +" Espera que cada procés identificat per un ID, que pot ser l'ID del\n" +" procés o una especificació de feina, acabi d'executar-se, i en torna\n" +" l'estat de sortida. Si ometeu ID, espera que acabin d'executar-se tots\n" +" els processos inferiors, i surt amb estat zero. Si ID és una\n" +" especificació de feina, espera cada un dels processos a la canonada\n" +" d'aquella feina.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'últim ID; falla si ID no és vàlid o " +"passeu\n" +" una opció no vàlida." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Espera la finalització de processos i en retorna l'estat de sortida.\n" +"\n" +" Espera que cada procés, identificat per PID, acabi d'executar-se, i en\n" +" mostra l'estat de sortida. Si no especifiqueu PID, espera que acabin\n" +" d'executar-se tots els processos inferiors, i surt amb estat zero. PID\n" +" ha de ser un ID de procés.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'últim PID; falla si PID no és vàlid o es\n" +" passa una opció no vàlida." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordres per a cada element d'una llista.\n" +"\n" +" Els bucles «for» executen una seqüència d'ordres per a cada un dels\n" +" elements d'una llista. Si «in PARAULES ...;» s'omet, aleshores se\n" +" suposa «in \"$@\"». Per a cada element de la llista PARAULES, " +"l'element\n" +" s'assigna a NOM, i les ORDRES s'executen.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Bucle «for» aritmètic.\n" +"\n" +" Equivalent a\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tORDRES\n" +" \t\t(( EXP 3 ))\n" +" \tdone\n" +"\n" +" EXP1, EXP2 i EXP3 són expressions aritmètiques. Si s'omet qualsevol de\n" +" les expressions, es comporta com si el resultat de l'avaluació de\n" +" l'expressió omesa fos 1.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Selecciona paraules d'una llista i executa ordres.\n" +"\n" +" Les PARAULES s'expandeixen i generen una llista de paraules. Les\n" +" paraules expandides s'envien a la sortida d'errors estàndard, cada una\n" +" precedida per un número. Si «in PARAULES» s'omet, se suposa «in \"$@" +"\"».\n" +" Llavors, es mostra l'introductor PS3 i es llegeix una línia a l'entrada\n" +" estàndard. Si la línia correspon amb el número d'alguna de les " +"paraules\n" +" mostrades, aleshores aquesta paraula s'assigna a NOM. Si la línia està\n" +" buida, les PARAULES i l'introductor es tornen a mostrar. Si es llegeix\n" +" EOF, l'ordre finalitza. Qualsevol altre valor llegit, fa que s'assigni\n" +" el valor nul a NOM. La línia llegida s'assigna a la variable REPLY.\n" +" Les ORDRES s'executen després de cada selecció fins a trobar una ordre\n" +" «break».\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." + +# help time +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Informa del temps transcorregut durant l'execució d'una canonada.\n" +"\n" +" Executa CANONADA i mostra un resum del temps real, el temps de CPU\n" +" d'usuari i el temps de CPU de sistema transcorregut durant l'execució " +"de\n" +" CANONADA.\n" +"\n" +" Opcions:\n" +" -p mostra el resum de temps en format POSIX portable\n" +"\n" +" El valor de la variable TIMEFORMAT s'utilitza per formatar la sortida.\n" +"\n" +" Estat de sortida:\n" +" L'estat de sortida és l'estat de sortida de la CANONADA." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordres segons la coincidència amb patrons.\n" +"\n" +" Executa ORDRES de forma selectiva en funció de si PARAULA coincideix " +"amb\n" +" PATRÓ. El signe «|» serveix per a separar múltiples patrons.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordres en funció d'una condició.\n" +"\n" +" Executa la llista «if ORDRES». Si l'estat de sortida és zero, llavors\n" +" també executa la llista «then ORDRES». En cas contrari cada una de les\n" +" llistes «elif ORDRES» és executada i en cas d'acabar amb estat de\n" +" sortida zero, també s'executa la corresponent llista «then ORDRES», i\n" +" l'ordre if finalitza. En cas contrari, la llista «else ORDRES»\n" +" s'executa, si és que existeix. L'estat de sortida la construcció\n" +" sencera és l'estat de sortida de l'última ordre executada, o zero si " +"cap\n" +" de les condicions s'avalua com a certa.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de l'última ordre executada." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordres repetidament mentre es compleixi una condició.\n" +"\n" +" Expandeix i executa ORDRES repetidament mentre l'última ordre de les\n" +" «ORDRES while» tingui estat de sortida igual a zero.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de l'última ordre executada." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordres repetidament mentre no es compleixi una condició.\n" +"\n" +" Expandeix i executa ORDRES repetidament mentre l'última ordre de les\n" +" ORDRES «until» tingui estat de sortida diferent de zero.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de l'última ordre executada." + +# help coproc +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Crea un coprocés anomenat NOM.\n" +"\n" +" Executa ORDRE de forma asincrònica, amb la sortida estàndard i " +"l'entrada\n" +" estàndard de l'ordre connectades via canonada als descriptors de fitxer\n" +" assignats als índexs 0 i 1 de la variable vector NOM. Per defecte NOM\n" +" és \"COPROC\".\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida d'ORDRE." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Defineix una funció.\n" +"\n" +" Crea una funció de l'intèrpret anomenada NOM. Quan s'invoca com a " +"ordre\n" +" simple, NOM executa ORDRES en el context de l'intèrpret de qui fa la\n" +" crida. Quan NOM s'invoca, els arguments es passen a la funció com a\n" +" $1...$n, i el nom de la funció es troba a $FUNCNAME.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si NOM és de només lectura." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Agrupa ordres de manera que formin una unitat.\n" +"\n" +" Executa un conjunt d'ordres en un grup. Això permet redirigir la\n" +" sortida d'un grup sencer d'ordres.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Reprèn una feina i la porta al primer pla.\n" +"\n" +" Equivalent a utilitzar FEINA com a argument en l'ordre «fg». Reprèn " +"una\n" +" feina aturada o en segon pla. FEINA pot ser el nom d'una feina, o el\n" +" número d'una feina. Si es troba un «&» després de FEINA, llavors la\n" +" feina s'envia en un segon pla, com si l'especificació de feina\n" +" s'utilitzés com a argument en l'ordre «bg».\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de la feina represa." + +# help '((' +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Avalua una expressió aritmètica.\n" +"\n" +" EXPRESSIÓ s'avalua segons les normes d'avaluació aritmètica. És\n" +" equivalent a \"let EXPRESSIÓ\".\n" +"\n" +" Estat de sortida:\n" +" Si el resultat de l'avaluació és 0, torna 1; altrament torna 0." + +# help '[[' +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Executa una ordre condicional.\n" +"\n" +" Torna un estat 0 o 1, depenent del resultat de l'avaluació de\n" +" l'expressió condicional EXPRESSIÓ. Les expressions es componen dels\n" +" mateixos elements que en l'ordre interna «test», i es poden combinar\n" +" usant els següents operadors.\n" +"\n" +" ( EXPRESSIÓ ) Torna el valor d'EXPRESSIÓ\n" +" ! EXPRESSIÓ Cert si EXPRESSIÓ és fals; altrament fals.\n" +" EXPR1 && EXPR2 Cert si tant EXPR1 com EXPR2 són cert; si no, fals.\n" +" EXPR1 || EXPR2 Cert si EXPR1 o EXPR2 és cert; si no, fals.\n" +"\n" +" Quan s'utilitzen els operadors «==» o «!=», el component de la dreta\n" +" s'interpreta com a un patró i es comprova si coincideix amb la cadena " +"de\n" +" l'esquerra de l'operador. Quan s'utilitza l'operador «=~», el " +"component\n" +" de la dreta de l'operador s'interpreta com a expressió regular i es\n" +" comprova si coincideix amb la cadena de l'esquerra de l'operador.\n" +"\n" +" Els operadors && i || no avaluen EXPR2 si EXPR1 és suficient per\n" +" determinar el valor de l'expressió.\n" +"\n" +" Estat de sortida:\n" +" 0 o 1, depenent del valor d'EXPRESSIÓ." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Nom i ús de variables de l'intèrpret habituals.\n" +"\n" +" BASH_VERSION Informació de la versió de Bash.\n" +" CDPATH\t\tLlista de directoris separats per «:» on buscar\n" +" directoris passats com a arguments a «cd».\n" +" GLOBIGNORE\t\tLlista de patrons separats per «:» que indiquen noms\n" +" que s'ignoren en fer expansions de noms de fitxer.\n" +" HISTFILE\t\tNom del fitxer on es desa l'historial d'ordres.\n" +" HISTFILESIZE\tNombre màxim de línies que pot contenir el\n" +" fitxer de l'historial.\n" +" HISTSIZE\t\tNombre màxim de línies de l'historial a què un\n" +" \t\t\tintèrpret té accés.\n" +" HOME\t\tCamí complet cap al vostre directori personal.\n" +" HOSTNAME\t\tNom de la màquina actual.\n" +" HOSTTYPE\t\tTipus de CPU de la màquina en què corre Bash.\n" +" IGNOREEOF\t Controla el comportament de l'intèrpret en trobar un\n" +" \t\t\tcaràcter EOF (final de fitxer) com a únic caràcter.\n" +" Si la variable està definida, llavors el seu valor\n" +" és el nombre de caràcters EOF seguits que es poden\n" +" llegir en una línia buida abans que l'intèrpret\n" +" surti (per defecte: 10). Si no està definida, EOF\n" +" s'interpreta com el final de les dades d'entrada.\n" +" MACHTYPE\t\tCadena que descriu el sistema en què corre Bash.\n" +" MAILCHECK\t\tAmb quina freqüència, en segons, Bash comprova si hi\n" +" ha correu nou.\n" +" MAILPATH\t\tLlista de fitxers separats per «:» que Bash comprova\n" +" si tenen correu nou.\n" +" OSTYPE\t\tLa versió de Unix en què corre Bash.\n" +" PATH\t\tLlista de directoris separats per «:» on buscar quan\n" +" \t\t\tse cerquen ordres.\n" +" PROMPT_COMMAND\tOrdre que s'executa cada cop abans de mostrar\n" +" \t\t\tl'introductor de l'intèrpret.\n" +" PS1\t\t\tCadena de l'introductor principal.\n" +" PS2\t\t\tCadena de l'introductor secundari.\n" +" PWD\t\t\tCamí complet cap al directori corrent.\n" +" SHELLOPTS\t\tLlista d'opcions habilitades separades per «:».\n" +" TERM\t\tNom del tipus de terminal actual.\n" +" TIMEFORMAT\t\tFormat de sortida per a les estadístiques de temps\n" +" \t\t\tproduïdes per l'ordre «time».\n" +" auto_resume\t\tNo-nul·la significa que una ordre sola en una línia\n" +" \t\t\tes busca en primera instància a la llista actual de\n" +" \t\t\tfeines aturades. Si es troba, aquella feina es\n" +" passa a primer pla. El valor «exact» significa que\n" +" l'ordre ha de coincidir exactament amb alguna ordre\n" +" de la llista de feines aturades. El valor\n" +" «substring» significa que l'ordre ha de coincidir\n" +" amb una subcadena de la feina. Qualsevol altre\n" +" valor significa que l'ordre ha de ser el prefix\n" +" d'una feina aturada.\n" +" histchars\t\tCaràcters que controlen l'expansió de l'historial i\n" +" \t\t\tles substitucions ràpides. El primer caràcter és el\n" +" \t\t\tcaràcter de substitució de l'historial, habitualment\n" +" \t\t\t«!». El segon és el caràcter de «substitució\n" +" ràpida», normalment «^». El tercer és el caràcter\n" +" de «comentari d'historial», normalment «#».\n" +" HISTIGNORE\t\tLlista de patrons separats per «:» utilitzats per a\n" +" \t\t\tdecidir si les ordres s'han de desar a l'historial.\n" + +# si modifiqueu aquesta cadena cal actualitzar la còpia que es troba més +# enrere en aquest fitxer +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Afegeix directoris a la pila.\n" +"\n" +" Afegeix un directori al capdamunt de la pila de directoris, o fa girar\n" +" la llista, de manera que al capdamunt de la pila hi queda el directori\n" +" de treball corrent. Sense arguments, intercanvia els dos directoris de\n" +" més amunt.\n" +"\n" +" Opcions:\n" +" -n Omet el canvi de directori quan s'afegeixen directoris a la\n" +" pila, de manera que només canvia el contingut de la pila.\n" +"\n" +" Arguments:\n" +"\n" +" +N Gira la llista de manera tal que l'N-èssim directori\n" +" (comptant des de l'esquerra de la llista que mostra «dirs»,\n" +" començant des de zero) queda a dalt de tot.\n" +"\n" +" -N Gira la llista de manera tal que l'N-èssim directori\n" +" (comptant des de la dreta de la llista que mostra «dirs»,\n" +" començant des de zero) queda a dalt de tot.\n" +"\n" +" dir Afegeix DIR al capdamunt de la pila de directoris, i el\n" +" converteix en el nou directori de treball corrent.\n" +"\n" +" Podeu veure el contingut de la pila de directoris amb l'ordre «dirs».\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si s'ha rebut un argument invàlid, o el canvi de\n" +" directori falla." + +# si modifiqueu aquesta cadena cal actualitzar la còpia que es troba més +# enrere en aquest fitxer +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Treu directoris de la pila.\n" +"\n" +" Elimina entrades de la pila de directoris. Sense arguments, elimina el\n" +" directori al capdamunt de la pila, i canvia al nou directori de dalt de\n" +" la pila.\n" +"\n" +" Opcions:\n" +" -n Omet el canvi de directori quan s'eliminen directoris de la\n" +" pila, de manera que només canvia el contingut de la pila.\n" +"\n" +" Arguments:\n" +" +N Elimina l'entrada N-èssima, comptant des de l'esquerra de la\n" +" llista que mostra «dirs», començant des de zero. Per\n" +" exemple: «popd +0» elimina el primer directori, i «popd +1»\n" +" el segon.\n" +"\n" +" -N Elimina l'entrada N-èssima, comptant des de la dreta de la\n" +" llista que mostra «dirs», començant des de zero. Per\n" +" exemple: «popd -0» elimina l'últim directori, i «popd -1» el\n" +" penúltim.\n" +"\n" +" Podeu veure el contingut de la pila de directoris amb l'ordre «dirs».\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si es rep un argument invàlid o el canvi de\n" +" directori falla." + +# si modifiqueu aquesta cadena cal actualitzar la còpia que es troba més +# enrere en aquest fitxer +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Mostra la pila de directoris.\n" +"\n" +" Mostra la llista actual de directoris recordats. Els directoris són\n" +" afegits a la llista mitjançant l'ordre «pushd»; podeu recórrer la " +"llista\n" +" de directoris cap enrere amb l'ordre «popd».\n" +"\n" +" Opcions:\n" +" -c neteja la pila, esborrant-ne tots els elements\n" +" -l no mostra les versions abreviades (amb el prefix ~) dels\n" +" directoris relatius al vostre directori personal\n" +" -p mostra la pila, una entrada per línia\n" +" -v mostra la pila, una entrada per línia indicant la posició a\n" +" la pila\n" +"\n" +" Arguments:\n" +" +N Mostra l'entrada N-èssima, comptant des de l'esquerra de la\n" +" llista mostrada per «dirs» quan s'invoca sense opcions, \n" +" començant des de zero.\n" +"\n" +" -N Mostra l'entrada N-èssima, comptant des de la dreta de la\n" +" llista mostrada per «dirs» quan s'invoca sense opcions,\n" +" començant des de zero.\n" +"\n" +" Estat de sortida:\n" +" Retorna èxit, excepte si es rep una opció invàlida o es produeix un\n" +" error." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Activa i desactiva opcions de l'intèrpret.\n" +"\n" +" Canvia l'estat de cada OPCIÓ. Si no especifiqueu cap OPCIÓ, mostra una\n" +" llista de totes les opcions indicant si estan activades o no.\n" +"\n" +" Opcions:\n" +" -o limita les opcions a les que es poden canviar amb «set -o»\n" +" -p\tmostra totes les opcions indicant-ne l'estat\n" +" -q\tsuprimeix la sortida\n" +" -s\tactiva OPCIÓ\n" +" -u\tdesactiva OPCIÓ\n" +"\n" +" Estat de sortida:\n" +" Torna èxit si OPCIÓ està activada; falla si especifiqueu una opció\n" +" invàlida o OPCIÓ està desactivada." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formata i escriu ARGUMENTS d'acord amb FORMAT.\n" +"\n" +" Opcions:\n" +" -v var assigna la sortida a la variable VAR en lloc d'enviar-la a\n" +" la sortida estàndard\n" +"\n" +" FORMAT és una cadena de caràcters que conté tres tipus d'objectes:\n" +" caràcters normals, que simplement es copien a la sortida estàndard;\n" +" seqüències d'escapada, que es transformen i es copien a la sortida\n" +" estàndard; i especificacions de format, cada una de les quals provoca\n" +" que s'escrigui un argument successiu a la sortida estàndard.\n" +"\n" +" A banda de les especificacions de format estàndards descrites a\n" +" printf(1), printf també interpreta:\n" +"\n" +" %b expandeix seqüències d'escapada a l'argument corresponent\n" +" %q afegeix les cometes necessàries perquè l'argument pugui ser\n" +" utilitzat com a entrada de l'intèrpret\n" +" %(fmt)T escriu la cadena resultant de passar FMT a strftime(3) com a\n" +" argument\n" +"\n" +" El format es reutilitza tant com sigui necessari fins a consumir tots\n" +" els arguments. Si hi ha menys arguments dels que el format requereix,\n" +" la resta d'especificacions de format funcionen com si s'hagués\n" +" especificat un valor de zero o una cadena nul·la, segons el cas.\n" +"\n" +" Estat de sortida:\n" +" Retorna èxit, excepte si es rep una opció invàlida o es produeix un\n" +" error d'assignació o d'escriptura." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Especifica com Readline ha de completar arguments.\n" +"\n" +" Per a cada NOM, especifica com s'han de completar els arguments. Si no\n" +" s'indica cap opció, les especificacions de compleció existents es\n" +" mostren en un format que permet reutilitzar-les com a entrada.\n" +"\n" +" Opcions:\n" +" -p mostra les especificacions existents en format reciclable\n" +" -r suprimeix l'especificació de compleció per a NOM, o, si no\n" +" \t\ts'indica cap NOM, totes les especificacions de compleció\n" +" -D assigna les accions o complecions a totes les ordres que no\n" +" tenen definida una compleció específica\n" +" -E assigna les accions o complecions a ordres \"en blanc\", o\n" +" sigui, als intents de completar una línia en blanc\n" +"\n" +" Quan s'intenta una compleció, les accions s'apliquen en l'ordre en què\n" +" les opcions -D i -E apareixen al paràgraf anterior. L'opció -D té\n" +" preferència sobre l'opció -E.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Mostra possibles complecions en funció de les opcions.\n" +"\n" +" Aquesta ordre està pensada per a ser utilitzada en una funció que " +"generi\n" +" possibles complecions. Si especifiqueu l'argument opcional PARAULA, es\n" +" limiten les complecions a aquelles que coincideixen amb PARAULA.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error." + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modifica o mostra opcions de compleció.\n" +"\n" +" Modifica les opcions de compleció de NOM, o, si no especifiqueu cap " +"NOM,\n" +" la compleció que s'està executant en el moment. Si no s'indica cap\n" +" OPCIÓ, mostra les opcions de compleció per a cada NOM o\n" +" l'especificació de compleció en ús.\n" +"\n" +" Opcions:\n" +" -o opció Activa OPCIÓ per a NOM\n" +" -D Canvia les opcions de compleció d'ordres per " +"defecte\n" +" -E Canvia les opcions de compleció d'ordres \"buides\"\n" +"\n" +" Si utilitzeu «+o» en lloc de «-o», desactiva l'opció especificada.\n" +"\n" +" Arguments:\n" +"\n" +" Cada NOM és el nom d'una ordre per la qual s'ha d'haver definit una\n" +" especificació de compleció amb l'ordre interna «complete». Si no\n" +" especifiqueu cap NOM, compopt s'ha de cridar des d'una funció " +"generadora\n" +" de complecions, i les opcions que es modifiquen afecten la generació de\n" +" complecions que s'està executant en aquell moment.\n" +"\n" +" Estat de sortida: \n" +" Torna èxit, excepte si passeu alguna opció no vàlida o NOM no té\n" +" definida cap especificació de compleció." + +# help readarray +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Llegeix línies d'un fitxer cap a una variable vector.\n" +"\n" +" Llegeix línies de l'entrada estàndard cap a la variable VECTOR, o del\n" +" descriptor de fitxer FD si especifiqueu l'opció -u. La variable vector\n" +" per defecte és MAPFILE.\n" +"\n" +" Opcions:\n" +" -d delim Usa DELIM com delimitador de línies, en lloc del caràcter " +"de\n" +" salt de línia\n" +" -n nombre Copia com a màxim NOMBRE línies. Si NOMBRE és 0, es copien\n" +" \t\ttotes les línies.\n" +" -O origen Comença l'assignació a l'índex ORIGEN, per defecte 0.\n" +" -s nombre Descarta les primeres NOMBRE línies.\n" +" -t Estripa el caràcter de salt de línia de cada línia llegida.\n" +" -u fd Llegeix el descriptor de fitxer FD, en lloc de l'entrada\n" +" estàndard.\n" +" -C callback Avalua CALLBACK cada QUÀNTUM línies llegides.\n" +" -c quàntum Nombre de línies llegides abans de cridar " +"CALLBACK\n" +"\n" +" Arguments:\n" +" VECTOR Nom de la variable vector per a les dades.\n" +"\n" +" Si especifiqueu l'opció -C sense -c, el quàntum per defecte és 5000.\n" +" Quan s'avalua la funció CALLBACK, se li passa l'índex del proper " +"element\n" +" del vector i la línia que s'assigna a aquest element, com a arguments\n" +" addicionals.\n" +"\n" +" Si no especifiqueu un origen explícit, se suprimeix qualsevol valor\n" +" assignat a VECTOR abans d'assignar cap valor.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció no vàlida o VECTOR és de només\n" +" lectura o no és una variable vector." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Llegeix línies d'un fitxer cap a una variable vector.\n" +"\n" +" Un sinònim de «mapfile»." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2016 Free Software Foundation, Inc." + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: procés %5ld (%s) a the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Senyal Desconegut #" + +#, fuzzy +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2013 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/bash-5.1/po/cs.gmo b/bash-5.1/po/cs.gmo new file mode 100644 index 0000000000000000000000000000000000000000..8058f0bb5ca5fc3cbc0d12cabdf97424bf8ca642 Binary files /dev/null and b/bash-5.1/po/cs.gmo differ diff --git a/bash-5.1/po/cs.po b/bash-5.1/po/cs.po new file mode 100644 index 0000000000000000000000000000000000000000..52abc0ad9d3d2da121fd4ed15d860a7eacbebee3 --- /dev/null +++ b/bash-5.1/po/cs.po @@ -0,0 +1,6630 @@ +# Czech tranlation for bash. +# Copyright (C) 2008 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Petr Pisar , 2008, 2009, 2010, 2011, 2012, 2013, 2014. +# Petr Pisar , 2015, 2016, 2018, 2019. +# +# alias → alias +# subscript → podskript +# subroutine → podprogram +# completion options → možnosti doplňování +# shell option → přepínač shellu (shopt) +# Názvy signálů a stavů procesu by měly souhlasit se signal(7). +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-10-29 19:12+01:00\n" +"Last-Translator: Petr Pisar \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "chybný podskript pole" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: odstraňuje se atribut odkazu na název" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: číslované pole nezle převést na pole asociativní" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: neplatný klíč asociativního pole" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: přes nečíselný indexu nelze dosadit" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: při přiřazovaní asociativního pole se musí použít podskript" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: nelze vytvořit: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: pro příkaz nelze nalézt klávesovou mapu " + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: první nebílý znak není „\"“" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "ne zavírající „%c“ v %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: chybí dvojtečkový oddělovač" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: nelze zrušit vazbu" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "závorková expanze: nelze alokovat paměť pro %s" + +# TODO: pluralize +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "závorková expanze: alokace paměti pro %u prvků selhala" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "závorková expanze: alokace paměti pro „%s“ selhala" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s“: chybný název aliasu" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "upravování řádku není povoleno" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s“: chybný název klávesové mapy" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: nelze číst: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s“: neznámé jméno funkce" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s není svázán s žádnou klávesou.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s lze vyvolat přes " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: nelze zrušit vazbu" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "počet smyček" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "má smysl jen ve smyčkách „for“, „while“ nebo „until“" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Vrátí kontext aktuálního podprogramu.\n" +" \n" +" Bez VÝRAZU vrátí „$řádek $název_souboru“. S VÝRAZEM vrátí\n" +" „$řádek $podprogram $název_souboru“; tuto zvláštní informaci lze\n" +" využít pro výpis zásobníku volání.\n" +" \n" +" Hodnota VÝRAZU určuje, kolik rámců volání se má zpětně projít od toho\n" +" současného; vrcholový rámec má číslo 0.\n" +" \n" +" Návratový kód:\n" +" Vrací 0, pokud shell provádí shellovou funkci a VÝRAZ je platný." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "není nestavena HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "příliš mnoho argumentů" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "adresář s prázdným názvem" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "není nastaveno OLDPWD" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "řádek %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "varování: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: užití: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: přepínač vyžaduje argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: vyžadován číselný argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: nenalezeno" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: chybný přepínač" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: chybný název přepínače" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s“: není platným identifikátorem" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "neplatné osmičkové číslo" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "chybné šestnáctkové číslo" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "chybné číslo" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: chybné určení signálu" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s“: není PID ani platným označením úlohy" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: proměnná pouze pro čtení" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s mimo rozsah" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s mimo rozsah" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: žádná taková úloha" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: žádné řízení úloh" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "žádné řízení úloh" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: omezeno" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "omezeno" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: není vestavěným příkazem shellu" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "chyba zápisu: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "chyba při nastavování vlastností terminálu: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "chyba při získávání vlastností terminálu: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: chyba při zjišťování současného adresáře: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: nejednoznačné určení úlohy" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "k této verzi není dostupná nápověda" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nelze zrušit: %s jen pro čtení" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nelze zrušit" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: neplatný název akce" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: žádné doplňování neurčeno" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "varování: přepínač -F možná nebude dělat, co jste čekali" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "varování: přepínač -C možná nebude dělat, co jste čekali" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "doplňovací funkce se právě nevykonává" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "může být použito jen ve funkci" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: proměnná s odkazem nemůže být polem" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: proměnná s odkazem na název nemůže odkazovat sama na sebe" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: kruhový odkaz na název" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: neplatný název proměnné pro odkaz na název" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "„-f“ nezle použít na výrobu funkce" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funkce jen pro čtení" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: přiřazení do složeného pole uzavřeného v uvozovkách je zastaralé" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: takto nelze likvidovat pole" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: asociativní pole nelze převést na číslované pole" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamické nahrávání není dostupné" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "sdílený objekt %s nelze otevřít: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "ve sdílením objektu %2$s nelze nalézt %1$s: %3$s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: není dynamicky nahráno" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "zaváděcí funkce pro %s vrací chybu (%d): nezavedeno" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: není dynamicky nahráno" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: nelze smazat: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: je adresářem" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: není obyčejný soubor" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: soubor je příliš velký" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: binární soubor nelze spustit" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: nelze provést: %s" + +# XXX: Toto je zpráva interaktivního shellu při příkazu exit informující +# o odhlášení +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "odhlášení\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "toto není login shell: použijte „exit“" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Jsou zde pozastavené úlohy.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Jsou zde běžící úlohy.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "žádný příkaz nenalezen" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "určení historie" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: dočasný soubor nelze otevřít: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "současný" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "úloha %d spuštěna bez správy úloh" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: chybný přepínač – %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: přepínač vyžaduje argument – %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashování zakázáno" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: tabulka hashů je prázdná\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "zásahů\tpříkaz\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Příkazy shellu shodující se s klíčovým slovem „" +msgstr[1] "Příkazy shellu shodující se s klíčovými slovy „" +msgstr[2] "Příkazy shellu shodující se s klíčovými slovy „" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"žádné téma nápovědy se nehodí pro „%s“. Zkuste „help help“ nebo „man -k %s“ " +"nebo „info %s“." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: nelze otevřít: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Tyto příkazy shellu jsou vnitřně definovány. Napište „help“, abyste získali\n" +"tento seznam. Podrobnosti o funkci „název“ získáte příkazem „help název“.\n" +"Příkazem „info bash“ získáte obecné informace o tomto shellu.\n" +"Použijte „man -k“ nebo „info“, chcete-li zjistit více o příkazech, které\n" +"na tomto seznamu nejsou.\n" +"\n" +"Hvězdička (*) vedle jména znamená, že příkaz je zakázán.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "nelze použít více jak jeden z -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "místo v historii" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: neplatný časový údaj" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: expanze historie selhala" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib selhala" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "s „-x“ nejsou dovoleny další přepínače" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenty musí být proces nebo identifikátor úlohy" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Neznámá chyba" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "očekáván výraz" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: není (proměnnou typu) indexované pole" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: chybné určení deskriptoru souboru" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: neplatný deskriptor souboru: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: chybný počet řádků" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: chybný počátek pole" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: neplatné množství mezi voláními" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "prázdný název proměnné typu pole" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "je vyžadována podpora proměnných typu pole" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s“: postrádám formátovací znak" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: chybné určení časového limitu" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c“: neplatný formátovací znak" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "varování: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "potíže s rozebráním formátovacího řetězce: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "u \\x chybí šestnáctková číslovka" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "u \\%c chybí unikódová číslovka" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "žádný další adresář" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: chybný argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<žádný aktuální adresář>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "prázdný zásobník adresářů" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "pořadí v zásobníku adresářů" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Zobrazí seznam právě zapamatovaných adresářů. Adresáře si najdou svoji\n" +" cestu na seznam příkazem „pushd“ a procházet seznamem zpět lze příkazem\n" +" „popd“.\n" +" \n" +" Přepínače:\n" +" -c\tvyprázdní zásobník adresářů tím, že smaže všechny jeho prvky\n" +" -l\tnevypisuje adresáře relativní vašemu domovskému adresáři pomocí\n" +" \tvlnkové předpony\n" +" -p\tvypíše zásobník adresářů stylem jedna položka na jeden řádek\n" +" -v\tvypíše zásobník adresářů stylem jedna položka na jeden řádek\n" +" \tuvozená svojí pozicí na zásobníku\n" +" \n" +" Argumenty:\n" +" +N\tZobrazí N. položku počítáno zleva na seznamu, který zobrazuje\n" +" \tdirs, když je vyvolán bez přepínačů, počínaje nulou.\n" +" \n" +" -N\tZobrazí N. položku počítáno zprava na seznamu, který zobrazuje\n" +" \tdirs, když je vyvolán bez přepínačů, počínaje nulou." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Přidá adresář na vrchol zásobníku adresářů nebo zásobník zrotuje tak,\n" +" že nový vrchol zásobníku se stane současným pracovním adresářem. Bez\n" +" argumentů prohodí dva vrchní adresáře.\n" +" \n" +" Přepínače:\n" +" -n\tPotlačí obvyklou změnu adresáře, když se na zásobník přidávají\n" +" \tadresáře, takže změněn bude pouze zásobník.\n" +" \n" +" Argumenty:\n" +" +N\tZrotuje zásobník tak, že N. adresář (počítáno zleva na seznamu\n" +" \tzobrazovaném pomocí „dirs“, počínaje nulou) se dostane na vrchol.\n" +" \n" +" -N\tZrotuje zásobník tak, že N. adresář (počítáno zprava na seznamu\n" +" \tzobrazovaném pomocí „dirs“, počínaje nulou) se dostane na vrchol.\n" +" \n" +" ADRESÁŘ\n" +" \tPřidá ADRESÁŘ na vrchol zásobníku adresářů a učiní jej novým\n" +" \tsoučasným pracovním adresářem.\n" +" \n" +" Zásobník adresářů si můžete prohlédnout příkazem „dirs“." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Odstraní položku ze zásobníku adresářů. Bez argumentů odstraní adresář\n" +" z vrcholu zásobníku a přepne se do nového vrcholového adresáře.\n" +" \n" +" Přepínače:\n" +" -n\tPotlačí obvyklou změnu adresáře, když se ze zásobníku odebírají\n" +" \tadresáře, takže změněn bude pouze zásobník.\n" +" \n" +" Argumenty:\n" +" +N\tOdstraní N. položku počítáno zleva na seznamu zobrazovaném pomocí\n" +" \t„dirs“, počínaje nulou. Na příklad: „popd +0“ odstraní první\n" +" \tadresář, „popd -1“ druhý.\n" +" \n" +" -N\tOdstraní N. položku počítáno zprava na seznamu zobrazovaném " +"pomocí\n" +" \t„dirs“, počínaje nulou. Na příklad: „popd -0“ odstraní poslední\n" +" \tadresář, „popd -1“ další vedle posledního.\n" +" \n" +" Zásobník adresářů si můžete prohlédnout příkazem „dirs“." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: chybné určení časového limitu" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "chyba čtení: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "„return“ lze provést jen z funkce nebo skriptu načteného přes „source“" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "funkci i proměnnou nelze rušit současně" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: není (proměnnou typu) pole" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: není funkcí" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: nelze exportovat" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "počet shiftů" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "přepínač shellu nelze zároveň nastavit a zrušit" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: chybný název přepínače shellu" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "vyžadován argument s názvem souboru" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: soubor nenalezen" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "nelze pozastavit" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "login shell nelze pozastavit" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s je alias na „%s“\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s je klíčové slovo shellu\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s je funkce\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s je zvláštní součást shellu\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s je součást shellu\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s je %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s je zahashován (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: chybný argument s limitou" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c“: chybný příkaz" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: limit nelze zjistit: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limit" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: limit nelze změnit: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "osmičkové číslo" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c“: chybný operátor symbolických práv" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c“: chybný znak symbolický práv " + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " řádek " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "poslední příkaz: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Ukončuji…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORMACE: " + +#: error.c:462 +msgid "unknown command error" +msgstr "chyba neznámého příkazu" + +#: error.c:463 +msgid "bad command type" +msgstr "chybný druh příkazu" + +#: error.c:464 +msgid "bad connector" +msgstr "chybný konektor" + +#: error.c:465 +msgid "bad jump" +msgstr "chybný skok" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: nevázaná proměnná" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\ačasový limit pro čekání na vstup vypršel: automatické odhlášení\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "standardní vstup nelze přesměrovat z /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: „%c“: chybný formátovací znak" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: koproces [%d:%s] stále existuje" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "chyba v rouře" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximální úroveň zanoření funkce eval byla překročena (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximální úroveň zanoření funkce source byla překročena (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximální úroveň zanoření funkcí byla překročena (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: omezeno: v názvu příkazu nesmí být „/“" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: příkaz nenalezen" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: chybný interpretr" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: binární soubor nelze spustit: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s“: je zvláštní vestavěný příkaz shellu" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "deskriptor souboru %d nelze duplikovat na deskriptor %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "úroveň rekurze výrazu byla překročena" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "zásobník rekurze podtekl" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "syntaktická chyba ve výrazu" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "pokus o přiřazení do ne-proměnné" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "syntaktická chyba v přiřazení do proměnné" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "dělení nulou" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "chyba: chybný expassing token" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "v podmíněném výrazu očekávána „:“" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "mocnitel menší než 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "po přednostním zvýšení nebo snížení očekáván identifikátor" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "postrádám „)“" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntaktická chyba: očekáván operand" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntaktická chyba: chybný aritmetický operátor" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (chybný token je „%s“)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "chybný aritmetický základ" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: chybný počet řádků" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "hodnot je pro základ příliš velká" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: chyba výrazu\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: rodičovské adresáře nejsou přístupné" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "na deskriptoru %d nelze resetovat režim nodelay" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "nový deskriptor souboru pro vstup bashe z deskr. %d nelze alokovat" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer již pro nový deskriptor %d existuje" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp roury" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "forknutý PID %d se objevil v běžící úloze %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "mažu pozastavenou úlohu %d se skupinou procesů %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: PID %5ld (%s) označen za stále živého" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: žádný takový PID" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signál %d" + +# XXX: (úloha) dokončna. Používat ženský rod i unásledujících. Jedná se +# o výpis úloh. +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Dokončena" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Pozastavena" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Pozastavena (%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Běží" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Dokončena (%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Ukončena %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Stav neznámý" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core dumped [obraz paměti uložen]) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (cwd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid na potomku (z %ld na %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: PID %ld není potomkem tohoto shellu" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Žádný záznam o procesu %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: úloha %d je pozastavena" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: žádná taková úloha" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: úloha skončila" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: úloha %d je již na pozadí" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: zapíná se WNOHANG, aby se zabránilo neurčitému zablokování" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: řádek %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core dumped [obraz paměti uložen])" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(cwd nyní: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp selhalo" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: správa úloh nefunguje na pozadí" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplína linky" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "nelze nastavit skupinu procesů terminálu (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "žádná správa úloh v tomto shellu" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: předpoklad nesplněn: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: zbabraný předpoklad\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "není známo" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: blok v seznamu uvolněných zbit" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: zavoláno s argumentem již uvolněného bloku" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: zavoláno s argumentem nenaalokovaného bloku" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: zjištěno podtečení, mh_nbytes mimo rozsah" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: zjištěno podtečení, mh_nbytes mimo rozsah" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: velikosti počátečního a koncového kusu se liší" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: zavoláno s argumentem nenaalokovaného bloku" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: zjištěno podtečení, mh_nbytes mimo rozsah" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: zjištěno podtečení, mh_nbytes mimo rozsah" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: velikosti počátečního a koncového kusu se liší" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: tabulka alokací je plná FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p již obsažen v tabulce jako alokovaný?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p již obsažen v tabulce jako volný?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "chybný základ" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: stroj není znám" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: chybná služba" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: chybné určení síťové cesty" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "síťové operace nejsou podporovány" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: národní prostředí nelze změnit (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: národní prostředí nelze změnit (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: národní prostředí nelze změnit (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: národní prostředí nelze změnit (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "V $_ máte poštu" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "V $_ máte novou poštu" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Pošta v %s je přečtená\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "chyba syntaxe: vyžadován aritmetický výraz" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "chyba syntaxe: neočekávaný „;“" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "chyba syntaxe: „((%s))“" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: chybný druh instrukce %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "„here“ dokument na řádku %d ukončen koncem souboru (požadováno „%s“)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: instrukce přesměrování „%d“ mimo rozsah" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) přesahuje SIZE_MAX (%lu): řádek " +"zkrácen" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "maximální počet here dokumentů překročen" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "neočekávaný konec souboru při hledání znaku odpovídajícímu „%c“" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "neočekávaný konec souboru při hledání „]]“" + +# XXX: Condional means condition (adj.) probably. Can English distinguish +# between the condition (podmínkový) and the code branch (podmíněný)? Check +# for all "conditional" string occurences. +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "chyba syntaxe ve výrazu podmínky: neočekávaný token „%s“" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "chyba syntaxe ve výrazu podmínky" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "neočekávaný token „%s“, očekávána „)“" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "očekávána „)“" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "neočekávaný argument „%s“ u podmínkového unárního operátoru" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "neočekávaný argument u podmínkového unárního operátoru" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "neočekávaný token „%s“, očekáván podmínkový binární operátor" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "očekáván podmínkový binární operátor" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "neočekávaný argument „%s„ u podmínkového binárního operátoru" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "neočekávaný argument u podmínkového binárního operátoru" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "neočekávaný token „%c“ v podmínkovém příkazu" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "neočekávaný token „%s“ v podmínkovém příkazu" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "neočekávaný token %d v podmínkovém příkazu" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "chyba syntaxe poblíž neočekávaného tokenu „%s“" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "chyba syntaxe poblíž „%s“" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "chyba syntaxe: nenadálý konec souboru" + +#: parse.y:6365 +msgid "syntax error" +msgstr "chyba syntaxe" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Shell lze ukončit příkazem „%s“.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "nenadálý konec souboru při hledání odpovídající „)“" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "doplňování: funkce „%s“ nenalezena" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: možná smyčka opakování" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULLOVÝ COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: chybná propojka „%d“" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: neplatný deskriptor souboru" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: nullový ukazatel na soubor" + +# fd, fp a fileno jsou identifikátory v kódu +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace: fd (%d) != fileno fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: „%c“: chybný formátovací znak" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "deskriptor souboru mimo rozsah" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: nejednoznačné přesměrování" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: existující soubor nelze přepsat" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: omezeno: výstup nelze přesměrovat" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "pro „here“ dokument nelze vytvořit dočasný soubor: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: deskriptor souboru nelze přiřadit do proměnné" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port není bez síťování podporováno" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "chyba přesměrování: deskriptor souboru nelze duplikovat" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "nelze nalézt /tmp, vytvořte jej, prosím!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp musí být platným názvem pro adresář" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "v interaktivních shellech se režim krásného výpisu nepoužije" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: chybný přepínač" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "UID nelze nastavit na %d: efektivní UID je %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "GID nelze nastavit na %d: efektivní GID je %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "debuger nelze spustit, ladicí režim zakázán" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Je adresářem" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Nemám žádné jméno!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, verze %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Použití:\t%s [Dlouhý GNU přepínač] [přepínač]…\n" +"\t%s [Dlouhý GNU přepínač] [přepínač] skriptový_soubor…\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Dlouhé GNU přepínače:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Přepínače shellu:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD nebo -c příkaz nebo -O shopt_přepínač\t(pouze při vyvolání)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s nebo -o přepínač\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Podrobnosti o přepínačích shellu získáte tím, že napíšete „%s -c \"help set" +"\"“.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Podrobnosti o příkazech vestavěných do shellu získáte tím, že\n" +"napište „%s -c help“.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Chyby nahlásíte příkazem „bashbug“.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Domovská stránka bashe: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Obecný návod na použití softwaru GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: neplatná operace" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Falešný signál" + +# Překlady názvů signálů převzaty (s mírnými úpravami) z české překladu +# manuálové stránky signal(7). +#: siglist.c:50 +msgid "Hangup" +msgstr "Linka terminálu zavěšena" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Přerušení" + +#: siglist.c:58 +msgid "Quit" +msgstr "Ukončení" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Neplatná instrukce" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Přerušení při ladění" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Ukončení funkcí abort()" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Instrukce EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Výjimka při práci s pohyblivou řádovou čárkou" + +#: siglist.c:86 +msgid "Killed" +msgstr "Zabit" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Chyba sběrnice" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Chyba segmentace" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Špatné volání systému" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Z roury nikdo nečte" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Signál časovače" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Ukončit" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Čekají urgentní I/O data" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Pozastaveno (signálem)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Pokračovat" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Potomek byl pozastaven nebo zemřel" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Pozastaveno (vstupem TTY)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Pozastaveno (výstupem na TTY)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O je připraveno" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Dosažen limit procesorového času" + +#: siglist.c:154 +msgid "File limit" +msgstr "Dosažen limit velikosti souboru" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Časovač (virtuální)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Časovač (profilovací)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Změna okna" + +# XXX: SIGLOST +#: siglist.c:170 +msgid "Record lock" +msgstr "Zámek záznamu" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Uživatelský signal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Uživatelský signál 2" + +# FIXME: HFT znamená High Frequency Timer? Zkontrolovat i další výskyty +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "vstupní data HFT čekají" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "hrozí selhání napájení" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "hrozí selhání systému" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "přesunout proces na jiný procesor" + +#: siglist.c:198 +msgid "programming error" +msgstr "chyba programování" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Režim HFT sledování přidělen" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Režim HFT sledování odebrán" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT zvuková posloupnost byla dokončena" + +#: siglist.c:214 +msgid "Information request" +msgstr "Požadavek o informaci" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Neznámý signál č. %d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "chybná substituce: v %2$s chybí uzavírací „%1$s“" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: seznam nelze přiřadit do prvku pole" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "nelze vyrobit rouru za účelem substituce procesu" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "nelze vytvořit potomka za účelem substituce procesu" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "pojmenovanou rouru %s nelze otevřít pro čtení" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "pojmenovanou rouru %s nelze otevřít pro zápis" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "pojmenovanou rouru %s nelze zdvojit jako deskriptor %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "substituce příkazu: nulový bajt ve vstupu ignorován" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "nelze vytvořit rouru pro substituci příkazu" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "nelze vytvořit potomka pro substituci příkazu" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: rouru nelze zdvojit jako deskriptor 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: neplatný název proměnné pro odkaz na název" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: chybná nepřímá expanze" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: chybný název proměnné" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametr nenastaven" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametr null nebo nenastaven" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: výraz podřetězce < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: chybná substituce" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: takto nelze přiřazovat" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"budoucá verze tohoto shellu budou vynucovat vyhodnocení jako aritmetickou " +"substituci" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "chybná substituce: v %s chybí uzavírací „`“" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "žádná shoda: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "očekáván argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: očekáván celočíselný výraz" + +#: test.c:265 +msgid "`)' expected" +msgstr "očekávána „)“" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "očekávána „)“, nalezeno %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: očekáván binární operátor" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: očekáván unární operátor" + +#: test.c:881 +msgid "missing `]'" +msgstr "postrádám „]“" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "chyba syntaxe: neočekávaný „;“" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "neplatné číslo signálu" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" +"obsluha signálů: maximální úroveň zanoření obsluhy signálů byla překročena " +"(%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: chybná hodnota v trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: obsluha signálu je SIG_DFL, přeposílám %d (%s) sobě" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: chybný signál %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "chyba při importu definice „%s“" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "úroveň shellu (%d) příliš vysoká, resetuji na 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: žádný kontext funkce v aktuálním rozsahu" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: hodnotu nelze do proměnné přiřadit" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: přiřazení čísla odkazu na název" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: žádný kontext funkce v aktuálním rozsahu" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s: má nullový exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "neplatný znak %d v exportstr pro %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "v exportstr pro %s chybí „=“" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: hlava shell_variables není kontextem funkce" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: chybí kontext global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: hlava shell_variables není dočasným rozsahem prostředí" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: nelze otevřít jako SOUBOR" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: neplatná hodnota pro deskriptor trasovacího souboru" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: hodnota kompatibility je mimo rozsah" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright © 2012 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licence GPLv3+: GNU GPL verze 3 nebo novější \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, verze %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Toto je svobodné programové vybavení: máte právo jej měnit a šířit." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "VEŠKERÉ ZÁRUKY chybí, jak jen zákon dovoluje." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: nelze alokovat %'lu bajtů (alokováno %'lu bajtů)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: nezle alokovat %'lu bajtů" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: nelze alokovat %'lu bajtů (alokováno %'lu bajtů)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: nelze alokovat %'lu bajtů" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [název[=hodnota] …]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] název [název…]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m klávmapa] [-f soubor] [-q název] [-u název] [-r " +"klávposl] [-x klávposl:příkaz-shellu] [klávposl:readline-funkce nebo " +"readline-příkaz]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [vestavěný-příkaz-shellu [argument…]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [výraz]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [adresář]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] příkaz [argument…]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [název[=hodnota]…]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] název[=hodnota]…" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [přepínač] název[=hodnota]…" + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [argument…]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [argument…]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f soubor] [název…]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [argument…]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [argument]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a název] [příkaz [argument…]] [přesměrování…]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e enázev] [-lnr] [první] [poslední] nebo fc -s [vzor=náhrada] [příkaz]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [úloha]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [úloha…]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p název_cesty] [-dt] [název…]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [vzorek…]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d pozice] [n] nebo history -anrw [jméno_souboru] nebo history " +"-ps argument [argument…]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [úloha…] nebo jobs -x příkaz [argumenty]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [úloha… | PID…]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n číssig | -sigspec] pid | úloha… nebo kill -l [sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let argument [argument…]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a pole] [-d oddělovač] [-i text] [-n p_znaků] [-N p_znaků] [-p " +"výzva] [-t limit] [-u fd] [jméno…]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o název_přepínače] [--] [argument…]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [jméno…]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [název[=hodnota]…] nebo export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [název[=hodnota]…] nebo readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source název_souboru [argumenty]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". název_souboru [argumenty]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [výraz]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ argument… ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[argument] signal_spec…]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] název [název…]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mód]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id…]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid…]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NÁZEV [in SLOVECH…] ; do PŘÍKAZY; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( výr1; výr2; výr3 )); do PŘÍKAZY; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NÁZEV [in SLOVA…;] do PŘÍKAZY; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] kolona" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case SLOVO in [VZOR [| VZOR]…) PŘÍKAZY ;;]… esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if PŘÍKAZY; then PŘÍKAZY; [ elif PŘÍKAZY; then PŘÍKAZY; ]… [ else PŘÍKAZY; ] " +"fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while PŘÍKAZY; do PŘÍKAZY; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until PŘÍKAZY; do PŘÍKAZY; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NÁZEV] příkaz [přesměrování]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function jméno { PŘÍKAZY ; } nebo jméno () { PŘÍKAZY ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ PŘÍKAZY ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "úloha [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( výraz ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ výraz ]]" + +# XXX: "variable" je literál na seznamy vestavěných příkazů +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables – názvy a významy některých proměnných shellu" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | adresář]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [název_volby…]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v proměnná] formát [argumenty]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o přepínač] [-A akce] [-G globvzor] " +"[-W seznam_slov] [-F funkce] [-C příkaz] [-X filtrvzor] [-P předpona] [-S " +"přípona] [název…]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o přepínač] [-A akce] [-G globvzor] [-W " +"seznam_slov] [-F funkce] [-C příkaz] [-X filtrvzor] [-P předpona] [-S " +"přípona] [slovo]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o možnost] [-DEI] [název…]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d oddělovač] [-n počet] [-O počátek] [-s počet] [-t] [-u FD] [-C " +"volání] [-c množství] [pole]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d oddělovač] [-n počet] [-O počátek] [-s počet] [-t] [-u FD] [-C " +"volání] [-c množství] [pole]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definuje nebo zobrazí aliasy.\n" +" \n" +" „alias“ bez argumentů vypíše na standardní výstup seznam aliasů ve " +"znovu\n" +" použitelném formátu NÁZEV=HODNOTA.\n" +" \n" +" Jinak bude definován alias pro každý NÁZEV, který má zadanou HODNOTU.\n" +" Závěrečná mezera v HODNOTĚ způsobí, že při expanzi bude následující " +"slovo\n" +" zkontrolováno na substituci aliasů.\n" +" \n" +" Přepínače:\n" +" -p\tvypíše všechny definované aliasy ve znovu použitelném formátu\n" +" \n" +" Návratový kód:\n" +" alias vrátí pravdu, pokud nebyl zadán NÁZEV, pro který není žádný alias\n" +" definován." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Odstraní každý NÁZEV ze seznamů definovaných aliasů.\n" +" \n" +" Přepínače:\n" +" -a\todstraní všechny definice aliasů\n" +" Vrátí úspěch, pokud NÁZEV není neexistující alias." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Nastaví klávesové zkratky a proměnné Readline.\n" +" \n" +" Naváže posloupnost kláves na Readline funkci nebo makro nebo nastaví\n" +" Readline proměnnou. Syntaxe nepřepínačových argumentů je shodná se\n" +" syntaxí ~/.inputrc, ale musí být zadána jako jediný argument:\n" +" např. bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Přepínače:\n" +" -m klávmapa Použije KLÁVMAPU jako klávesovou mapu pro trvání\n" +" tohoto příkazu. Možné klávesové mapy jsou emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command a vi-insert.\n" +" -l Vypíše seznam názvů funkcí.\n" +" -P Vypíše seznam názvů funkcí a klávesových vazeb.\n" +" -p Vypíše seznam funkcí a klávesových vazeb ve " +"formátu,\n" +" který lze použít jako vstup.\n" +" -S Vypíše seznam posloupností kláves,\n" +" které vyvolávají makra, a jejich hodnoty.\n" +" -s Vypíše seznam posloupností kláves,\n" +" která vyvolávají makra, a jejich hodnoty ve " +"formátu,\n" +" který lze použít jako vstup.\n" +" -V Vypíše seznam názvů proměnných a hodnot.\n" +" -v Vypíše seznam názvů proměnných a hodnot ve " +"formátu,\n" +" který lze použít jako vstup.\n" +" -q název-funkce Dotáže se, které klávesy vyvolají zadanou funkci.\n" +" -u název-funkce Zruší všechny vazby na klávesy, které jsou " +"napojeny\n" +" na zadanou funkci.\n" +" -r klávposl Odstraní vazbu na KLÁVPOSL.\n" +" -f soubor Načte vazby kláves ze SOUBORU.\n" +" -x klávposl:příkaz-shellu\n" +" Způsobí, že bude vykonán PŘÍKAZ-SHELLU, když bude\n" +" zadána KLÁVPOSL.\n" +" -X Vypíše posloupnosti kláves a příkazy přidružené " +"přes\n" +" přepínač -x ve formátu, který lze použít jako " +"vstup.\n" +" \n" +" Návratový kód:\n" +" bind vrací 0, pokud není zadán nerozpoznaný přepínač nebo nedojde " +"k chybě." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Ukončí smyčku for, whle nebo until.\n" +" \n" +" Ukončí smyčku FOR, WHILE nebo UNTIL. Je-li zadáno N, ukončí N\n" +" obklopujících smyček.\n" +" \n" +" Návratový kód:\n" +" Návratový kód je 0, pokud N je větší nebo rovno 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Obnoví smyčku for, while nebo until.\n" +" \n" +" Přejde k další iteraci obklopující smyčky FOR, WHILE nebo UNTIL.\n" +" Je-li zadáno N, bude tak učiněno v N. obklopující smyčce. \n" +" Návratový kód:\n" +" Návratový kód je 0, pokud N je větší nebo rovno 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Provede vestavěný příkaz shellu.\n" +" \n" +" Provede VESTAVĚNÝ-PŘÍKAZ-SHELLU s argumenty ARGUMENTY, aniž by se " +"uplatnilo\n" +" vyhledávání příkazu. Toto se hodí, když si přejete reimplementovat\n" +" vestavěný příkaz shellu jako funkci shellu, avšak potřebujete spustit\n" +" vestavěný příkaz uvnitř této funkce.\n" +" \n" +" Návratový kód:\n" +" Vrací návratový kód VESTAVĚNÉHO-PŘÍKAZU-SHELLU, nebo nepravdu, pokud\n" +" VESTAVĚNÝ-PŘÍKAZ-SHELLU není vestavěným příkazem shellu." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Vrátí kontext aktuálního podprogramu.\n" +" \n" +" Bez VÝRAZU vrátí „$řádek $název_souboru“. S VÝRAZEM vrátí\n" +" „$řádek $podprogram $název_souboru“; tuto zvláštní informaci lze\n" +" využít pro výpis zásobníku volání.\n" +" \n" +" Hodnota VÝRAZU určuje, kolik rámců volání se má zpětně projít od toho\n" +" současného; vrcholový rámec má číslo 0.\n" +" \n" +" Návratový kód:\n" +" Vrací 0, pokud shell provádí shellovou funkci a VÝRAZ je platný." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Změní pracovní adresář shellu.\n" +" \n" +" Změní aktuální adresář na ADR. Implicitní ADR je hodnota proměnné " +"shellu\n" +" HOME.\n" +" \n" +" Proměnná CDPATH definuje vyhledávací cestu pro adresář obsahující ADR.\n" +" Názvy náhradních adresářů v CDPATH se oddělují dvojtečkou (:). Prázdný\n" +" název adresáře je stejný jako aktuální adresář. Začíná-li ADR na " +"lomítko\n" +" (/), nebude CDPATH použita.\n" +" \n" +" Nebude-li adresář nalezen a přepínač shellu „cdable_vars“ bude " +"nastaven,\n" +" pak se dané slovo zkusí jakožto název proměnné. Má-li taková proměnná\n" +" hodnotu, pak její hodnota se použije jako ADR.\n" +" \n" +" Přepínače:\n" +" -L vynutí následování symbolických odkazů: vyhodnotí symbolické\n" +" odkazy v ADR po zpracování všech výskytů „..“\n" +" -P nařizuje použít fyzickou adresářovou strukturu namísto\n" +" následování symbolických odkazů: vyhodnotí symbolické odkazy " +"v ADR\n" +" před zpracováním všech výskytů „..“\n" +" -e je-li zadán přepínač -P a současný pracovní adresář nelze\n" +" zdárně zjistit, skončí s nenulovým návratovým kódem\n" +" -@ na systémech, které to podporují, vydává soubor s rozšířenými\n" +" atributy jako adresář obsahující atributy souboru\n" +" \n" +" Symbolické odkazy se implicitně následují, jako by bylo zadáno „-L“.\n" +" „..“ se zpracovávají tak, že se odstraní bezprostředně předcházející\n" +" část cesty až k lomítku nebo začátku ADR.\n" +" \n" +" Návratový kód:\n" +" Vrací 0, byl-li adresář změněn a, byl-li zadán -P, $PWD byla úspěšně\n" +" nastavena. Jinak vrací nenulovou hodnotu." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Vypíše název současného pracovního adresáře.\n" +" \n" +" Přepínače:\n" +" -L vypíše hodnotu $PWD, pokud pojmenovává současný pracovní\n" +" adresář\n" +" -P vypíše fyzický adresář prostý všech symbolických odkazů\n" +" \n" +" Implicitně se „pwd“ chová, jako by bylo zadáno „-L“.\n" +" \n" +" Návratový kód:\n" +" Vrací 0, nebyl-li zadán neplatný přepínač a mohl-li být současný\n" +" adresář přečten." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Prázdný příkaz.\n" +" \n" +" Žádný účinek, tento příkaz nic nedělá.\n" +" \n" +" Návratový kód:\n" +" Vždy uspěje." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Vrátí výsledek úspěchu.\n" +" \n" +" Návratový kód:\n" +" Vždy uspěje." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Vrátí výsledek neúspěchu.\n" +" \n" +" Návratový kód:\n" +" Vždy selže." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Provede jednoduchý příkaz nebo zobrazí podrobnosti o příkazech.\n" +" \n" +" Spustí PŘÍKAZ s ARGUMENTY ignoruje funkce shellu, nebo zobrazí " +"informace\n" +" o zadaných PŘÍKAZECH. Lze využít, když je třeba vyvolat příkazy " +"z disku,\n" +" přičemž existuje funkce stejného jména.\n" +" \n" +" Přepínače:\n" +" -p pro PATH bude použita implicitní hodnota, která zaručuje,\n" +" že budou nalezeny všechny standardní nástroje\n" +" -v zobrazí popis PŘÍKAZU podobný vestavěnému příkazu „type“\n" +" -V zobrazí podrobnější popis každého PŘÍKAZU\n" +" \n" +" Návratový kód:\n" +" Vrací návratový kód PŘÍKAZU, nebo selže, nebyl–li příkaz nalezen." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Nastaví hodnoty a atributy proměnných.\n" +" \n" +" Deklaruje proměnné a nastaví jim atributy. Nejsou-li zadány NÁZVY,\n" +" zobrazí atributy a hodnoty všech proměnných.\n" +" \n" +" Přepínače:\n" +" -f omezí akci nebo výpis na názvy funkcí a deklarace\n" +" -F omezí výpis jen na názvy funkcí (a číslo řádku a název\n" +" zdrojového souboru, je-li zapnuto ladění)\n" +" -g vytváří globální proměnné, je-li voláno z funkce shellu,\n" +" jinak ignorováno\n" +" -p zobrazí atributy a hodnotu každého NÁZVU\n" +" \n" +" Přepínače, které nastavují atributy:\n" +" -a učiní NÁZVY číslovanými poli (je-li podporováno)\n" +" -A učiní NÁZVY asociativními poli (je-li podporováno)\n" +" -i přiřadí NÁZVŮM atribut „integer“ (číslo)\n" +" -l převede hodnotu každého NÁZVU na malá písmena v době přiřazení\n" +" -n učiní NÁZEV odkazem na proměnnou pojmenovanou podle své hodnoty\n" +" -r učiní NÁZVY jen pro čtení\n" +" -t přiřadí NÁZVŮM atribut „trace“ (sledování)\n" +" -u převede hodnotu každého NÁZVU na velká písmena v době přiřazení\n" +" -x vyexportuje NÁZVY\n" +" \n" +" Pomocí „+“ namísto „-“ daný atribut vypnete.\n" +" \n" +" Proměnné s atributem integer jsou aritmeticky vyhodnoceny (vizte příkaz\n" +" „let“), jakmile je do proměnné přiřazeno.\n" +" \n" +" Je-li použito uvnitř funkce, učiní „declare“ NÁZVY lokálními stejně " +"jako\n" +" příkaz „local“. Přepínač „-g“ toto chování potlačí.\n" +" \n" +" Návratový kód:\n" +" Vrací úspěch, pokud nebyl zadán neplatný přepínač a nedošlo k chybě při\n" +" přiřazování do proměnné." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Nastaví hodnoty a atributy proměnných.\n" +" \n" +" Synonymum pro „declare“. Vizte „help declare“." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definuje lokální proměnné.\n" +" \n" +" Vytvoří lokální proměnnou pojmenovanou NÁZEV a přiřadí jí HODNOTU. " +"PŘEPÍNAČ\n" +" smí být jakýkoliv přepínač přípustný u „declare“.\n" +" \n" +" Lokální proměnné lze použít jen uvnitř funkcí, budou viditelné jen " +"v dané\n" +" funkci a jejich potomcích.\n" +" \n" +" Návratový kód:\n" +" Vrací úspěch, nebyl-li zadán neplatný přepínač, nenastala-li chyba při\n" +" přiřazování do proměnné a vykonává-li shell funkci." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Vypíše své argumenty na standardní výstup.\n" +" \n" +" Zobrazí své ARGUMENTY oddělené jednou mezerou a zakončené novým řádkem\n" +" na standardní výstup.\n" +" \n" +" Přepínače:\n" +" -n nepřipojuje nový řádek\n" +" -e zapne interpretování následujících znaků uvozených zpětným " +"lomítkem\n" +" -E explicitně potlačí interpretování znaků uvozených zpětným " +"lomítkem\n" +" \n" +" „echo“ interpretuje následující znaky uvozené zpětným lomítkem:\n" +" \\a poplach (zvonek)\n" +" \\b backspace\n" +" \\c potlačí další výstup\n" +" \\e znak escapu\n" +" \\E znak escapu\n" +" \\f posun formuláře (form feed)\n" +" \\n nový řádek\n" +" \\r návrat vozíku\n" +" \\t vodorovný tabulátor\n" +" \\v svislý tabulátor\n" +" \\\\ zpětné lomítko\n" +" \\0nnn znak, jehož ASCII kód je NNN (osmičkově). NNN smí být\n" +" 0 až 3 osmičkové číslice\n" +" \\xHH osmibitový znak, jehož hodnota je HH (šestnáctkově). HH smí\n" +" být jedna nebo dvě šestnáctkové číslice\n" +" \\uHHHH unikódový znak, jehož šestnáctková hodnota je HHHH.\n" +" HHHH smí být jedna až čtyři šestnáctkové číslice\n" +" \\UHHHHHHHH unikódový znak, jehož šestnáctková hodnota je HHHHHHHH.\n" +" HHHHHHHH smí být jedna až osm šestnáctkových číslic.\n" +" \n" +" Návratový kód:\n" +" Vrací úspěch, nedojde-li k chybě zápisu na výstup." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Vypíše argumenty na standardní výstup.\n" +" \n" +" Na standardním výstupu zobrazí ARGUMENTY následované odřádkováním.\n" +" \n" +" Přepínače:\n" +" -n\tneodřádkovává\n" +" \n" +" Vrací úspěch, nedojte-li k chybě zápisu na výstup." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Povoluje a zakazuje vestavěné příkazy shellu.\n" +" \n" +" Povoluje a zakazuje vestavěné příkazy shellu. Zakázání vám umožní\n" +" spustit program z disku, který má stejné jméno jako vestavěný příkaz\n" +" shellu, aniž byste museli zadávat celou cestu.\n" +" \n" +" Přepínače:\n" +" -a\tvypíše seznam vestavěných příkazů a vyznačí, který je a který " +"není\n" +" \tpovolen\n" +" -n\tzakáže každý NÁZEV nebo zobrazí seznam zakázaných vestavěných\n" +" \tpříkazů\n" +" -p\tvypíše seznam vestavěných příkazů ve znovu použitelné podobě\n" +" -s\tvypíše pouze názvy posixových „speciálních“ vestavěných příkazů\n" +" \n" +" Přepínače řídící dynamické nahrávání:\n" +" -f\tZavede vestavěný příkaz NÁZEV ze sdíleného objektu NÁZEV_SOUBORU\n" +" -d\tOdstraní vestavění příkaz zavedený pomocí –f\n" +" \n" +" Bez přepínačů povolí všechny NÁZVY.\n" +" \n" +" Abyste používali „test“ z $PATH namísto verze vestavěné do shellu,\n" +" napište „enable -n test“.\n" +" \n" +" Návratový kód:\n" +" Vrací úspěch, je-li NÁZEV vestavěným příkazem shellu a nevyskytne-li\n" +" se chyba." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Spustí argumenty jako příkaz shellu.\n" +" \n" +" ARGUMENTY sloučí do jediného řetězce, použije jej jako vstup shellu\n" +" a vykoná výsledné příkazy.\n" +" Návratový kód:\n" +" Vrátí návratový kód příkazu, nebo úspěch, byl-li příkaz prázdný." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Rozebere přepínačové argumenty.\n" +" \n" +" Getopts se používá v shellových procedurách na rozebrání pozičních\n" +" parametrů jakožto přepínačů.\n" +" \n" +" OPTSTRING obsahuje písmena přepínačů, které mají být rozeznány, Je-li\n" +" písmeno následováno dvojtečkou, po přepínači se očekává argument, který\n" +" by měl být od přepínače oddělen bílým místem.\n" +" \n" +" Pokaždé když je getopts zavolán, je následující přepínač umístěn do\n" +" proměnné $name (proměnná je inicializována, neexistuje-li) a pořadí\n" +" dalšího argumentu, který čeká na zpracování, do proměnné shellu OPTIND.\n" +" OPTIND je inicializována na 1 vždy, když je zavolán shell nebo shellový\n" +" skript. Pokud přepínač vyžaduje argument, getopts umístí tento argument\n" +" do proměnné shellu OPTARG.\n" +" \n" +" getopts hlásí chyby jedním ze dvou způsobů. Pokud prvním znakem " +"OPTSTRING\n" +" je dvojtečka, getopts hlásí chyby tichým způsobem. V tomto režimu žádné\n" +" chybové zprávy nejsou vypisovány. Když se narazí na neplatný přepínač,\n" +" getopts umístí tento znak do OPTARG. Pokud není nalezen povinný " +"argument,\n" +" getopts umístí „:“ do NAME a OPTARG nastaví na znak nalezeného " +"přepínače.\n" +" Pokud getopts nepracuje v tomto tichém režimu a je nalezen neplatný\n" +" přepínač, getopts umístí „?“ do NAME a zruší OPTARG. Když nenajde " +"povinný\n" +" argument, je do NAME zapsán „?“, OPTARG zrušen a vytištěna diagnostická\n" +" zpráva.\n" +" \n" +" Pokud proměnná shellu OPTERR má hodnotu 0, getopts vypne vypisování\n" +" chybových zpráv, dokonce i když první znak OPTSTRING není dvojtečka.\n" +" Implicitní hodnota OPTERR je 1.\n" +" \n" +" Normálně getopts zpracovává poziční parametry ($0–$9), avšak následuje-" +"li\n" +" getopts více argumentů, budou rozebrány tyto namísto pozičních.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, byl-li nalezen nějaký přepínač. Neúspěch vrátí, když " +"dojde\n" +" na konec přepínačů nebo nastane-li chyba." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Nahradí shell zadaným příkazem.\n" +" \n" +" Vykoná PŘÍKAZ, přičemž nahradí tento shell zadaným programem. " +"ARGUMENTY\n" +" se stanou argumenty PŘÍKAZU. Není-li PŘÍKAZ zadán, přesměrování " +"zapůsobí\n" +" v tomto shellu.\n" +" \n" +" Přepínače:\n" +" -a název předá název jakožto nultý argument PŘÍKAZU\n" +" -c spustí PŘÍKAZ s prázdným prostředím\n" +" -t do nultého argumentu PŘÍKAZU umístí pomlčku\n" +" \n" +" Pokud příkaz nemůže být proveden, neinteraktivní shell bude ukončen,\n" +" pokud přepínač shellu „execfail“ není nastaven.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud byl PŘÍKAZ nalezen a nedošlo k chybě přesměrování." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Ukončí shell.\n" +" \n" +" Ukončí tento shell se stavem N. Bez N bude návratový kód roven kódu\n" +" posledně prováděného příkazu." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Ukončí přihlašovací shell.\n" +" \n" +" Ukončí přihlašovací (login) shell se stavem N. Nebyl-li příkaz zavolán\n" +" z přihlašovacího shellu, vrátí chybu." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Zobrazí nebo vykoná příkazy ze seznamu historie.\n" +" \n" +" fc se používá na vypsání, úpravu a znovu provedení příkazů ze seznamu\n" +" historie. PRVNÍ a POSLEDNÍ mohou být čísla určující rozsah nebo PRVNÍ " +"může být\n" +" řetězec, což určuje nejnovější příkaz začínající na zadaný řetězec.\n" +" \n" +" Přepínače:\n" +" -e ENÁZEV\tvybere editor. Implicitní je FCEDIT, pak EDITOR, pak vi.\n" +" -l\tvypisuje řádky namísto jejich upravování\n" +" -n\tvypne číslování řádků při jejich vypisování\n" +" -r\tobrátí pořadí řádků (nejnovější budou první)\n" +" \n" +" Forma příkazu „fc -s [vzor=náhrada… [příkaz]“ znamená, že PŘÍKAZ bude\n" +" po nahrazení STARÝ=NOVÝ znovu vykonán.\n" +" \n" +" Užitečný alias je r='fc -s', takže napsání „r cc“ spustí poslední " +"příkaz\n" +" začínající na „cc“ a zadání „r“ znovu spustí poslední příkaz.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch nebo kód provedeného příkazu. Nenulový kód, vyskytne-li se\n" +" chyba." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Přepne úlohu na popředí.\n" +" \n" +" Přesune úlohu určenou pomocí ÚLOHA na popředí a učiní ji aktuální " +"úlohou.\n" +" Není-li ÚLOHA zadána, použije se úloha, o které si shell myslí, že je\n" +" aktuální.\n" +" \n" +" Návratový kód:\n" +" Kód úlohy přesunuté do popředí, nebo došlo-li k chybě, kód selhání." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Přesune úlohy do pozadí.\n" +" \n" +" Přepne každou úlohu určenou pomocí ÚLOHA na pozadí, jako by byla\n" +" spuštěna s „&“. Ne-li ÚLOHA uvedena, použije se úloha, o které si shell\n" +" myslí, že je aktuální.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud je správa úloh zapnuta a nedošlo-li k nějaké chybě." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Zapamatuje si nebo zobrazí umístění programu.\n" +" \n" +" Pro každý NÁZEV je určena plná cesta k příkazu a je zapamatována. Nejsou-" +"li\n" +" zadány žádné argumenty, budou vypsány informace o zapamatovaných " +"příkazech.\n" +" \n" +" Přepínače:\n" +" -d zapomene zapamatovaná umístění každého NÁZVU\n" +" -l vypíše v takové podobě, kterou lze opět použít jako vstup\n" +" -p cesta použije NÁZEV_CESTY jako plnou cestu k NÁZVU\n" +" -r zapomene všechna zapamatovaná umístění\n" +" -t vypíše zapamatované umístění každého NÁZVU a každému " +"umístění\n" +" předepíše odpovídající NÁZEV, bylo zadáno více NÁZVŮ\n" +" Argumenty:\n" +" NÁZEV Každý NÁZEV je vyhledán v $PATH a přidán do seznamu\n" +" zapamatovaných příkazů.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud byl NÁZEV nalezen a nebyl-li zadán neplatný přepínač." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Zobrazí podrobnosti o vestavěných příkazech.\n" +" \n" +" Zobrazí stručný souhrn vestavěných příkazů. Je-li zadán VZOREK,\n" +" vrátí podrobnou nápovědu ke všem příkazům odpovídajícím VZORKU, jinak " +"je\n" +" vytištěn seznam syntaxe vestavěných příkazů.\n" +" \n" +" Přepínače:\n" +" -d vypíše krátké pojednání na každé téma\n" +" -m zobrazí použití v jakoby manuálovém formátu\n" +" -s vypíše pouze krátký popis použití o každém příkazu odpovídajícímu\n" +" VZORKU\n" +" \n" +" Argumenty:\n" +" VZOREK Vzorek určující téma nápovědy\n" +" \n" +" Návratový kód:\n" +" Vrací úspěch, pokud byl nalezen VZOREK a nebyl zadán neplatný přepínač." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Zobrazí nebo upraví seznam historie.\n" +" \n" +" Zobrazí seznam historie s očíslovanými řádky. Řádky vypsané s „*“ byly\n" +" změněny. Argument N říká, že se vypíše pouze posledních N řádek.\n" +" \n" +" Přepínače:\n" +" -c vyprázdní seznam historie smazáním všech položek\n" +" -d pozice smaže položku ze seznamu historie na pozici POZICE. " +"Záporné\n" +" pozice se počítají od konce seznamu historie.\n" +" \n" +" -a připojí řádky historie z této relace do souboru historie\n" +" -n načte všechny řádky historie, které ještě nebyly načteny,\n" +" ze souboru historie a připojí je do seznamu historie\n" +" -r načte soubor historie a obsah připojí do seznamu historie\n" +" -w zapíše současnou historii do souboru historie\n" +" \n" +" -p provede expanzi historie na každém ARGUMENTU a výsledek zobrazí,\n" +" aniž by cokoliv uložil do seznamu historie\n" +" -s připojí ARGUMENTY do seznamu historie jako jednu položku\n" +" \n" +" Je-li zadán JMÉNO_SOUBORU, tak ten je použit jako soubor historie. " +"Jinak\n" +" pokud $HISTFILE má hodnotu, tato je použita, jinak ~/.bash_history.\n" +" \n" +" Je-li proměnná $HISTTIMEFORMAT nastavena a není-li prázdná, její " +"hodnota\n" +" se použije jako formátovací řetězec pro strftime(3) při výpisu časových\n" +" razítek spojených s každou položkou historie. Jinak žádná časová " +"razítka\n" +" nebudou vypisována. \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a nedošlo k chybě." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Zobrazí stav úloh.\n" +" \n" +" Vypíše aktivní úlohy. ÚLOHA omezuje výstup na danou úlohu. Bez uvedení\n" +" přepínačů bude vypsán stav všech aktivních úloh.\n" +" \n" +" Přepínače:\n" +" -l vypíše navíc ID procesů\n" +" -n vypíše pouze procesy, které od minulého oznámení změnily stav\n" +" -p vypíše pouze ID procesů\n" +" -r zúží výstup jen na běžící úlohy\n" +" -s zúží výstup jen na pozastavené úlohy\n" +" \n" +" Je-li použito -x, bude spuštěn příkaz, jakmile všechny úlohy uvedené " +"mezi\n" +" ARGUMENTY budou nahrazeny ID procesu, který je vedoucím skupiny dané " +"úlohy.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a nevyskytla se " +"chyba.\n" +" Byl-ly použit přepínač -x, vrátí návratový kód PŘÍKAZU." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Odstraní úlohy ze současného shellu.\n" +" \n" +" Z tabulky aktivních úloh odebere každou ÚLOHU. Nebudou-li ÚLOHY zadány,\n" +" shell použije vlastní představu o současné úloze.\n" +" \n" +" Přepínače:\n" +" -a odstraní všechny úlohy, pokud nebyla žádná ÚLOHA určena\n" +" -h označí každou ÚLOHU tak, že jí nebude zaslán SIGHUP, až shell sám\n" +" obdrží tento signál\n" +" -r odstraní jen běžící úlohy\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač nebo ÚLOHA." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Zašle signál úloze.\n" +" \n" +" Zašle procesu určeném PID (nebo ÚLOHOU) signál zadaný pomocí SIGSPEC\n" +" nebo ČÍSSIG. Není-li SIGSPEC ani ČÍSSIG zadán, pak se předpokládá " +"SIGTERM.\n" +" \n" +" Přepínače:\n" +" -s sig SIG je název signálu\n" +" -n sig SIG je číslo signálu\n" +" -l vypíše čísla signálů; pokud „-l“ následují argumenty, má\n" +" se za to, že se jedná o čísla signálů, pro které se mají " +"vyspat\n" +" jejich názvy.\n" +" -L synonymum pro -l\n" +" \n" +" Kill je vestavěný příkaz shellu ze dvou důvodů: umožňuje použít\n" +" identifikátory úloh namísto ID procesů a umožní zabíjet procesy i poté,\n" +" co jste dosáhli limitu počtu procesů, které smíte vytvořit.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a nedošlo k chybě." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Vyhodnotí aritmetický výraz.\n" +" \n" +" Vyhodnotí každý ARGUMENT jako aritmetický výraz. Vyhodnocení je\n" +" prováděno v celých číslech o pevné šířce bez kontrol přetečení, avšak\n" +" dělení 0 je zachyceno a označeno za chybu. Následující seznam operátorů\n" +" je rozdělen do skupin podle úrovní přednosti. Skupiny jsou seřazeny\n" +" v sestupném pořadí přednosti.\n" +" \n" +" \tid++, id--\tnásledné zvýšení, snížení proměnné\n" +" \t++id, --id\tpřednostní zvýšení, snížení proměnné\n" +" \t-, +\t\tunární mínus, plus\n" +" \t!, ~\t\tlogická a bitová negace\n" +" \t**\t\tumocnění\n" +" \t*, /, %\t\tnásobení, dělení, zbytková třída\n" +" \t+, -\t\tsčítání, odečítání\n" +" \t<<, >>\t\tlevý a pravý bitový posun\n" +" \t<=, >=, <, >\tporovnání\n" +" \t==, !=\t\trovnost, nerovnost\n" +" \t&\t\tbitové a zároveň (AND)\n" +" \t^\t\tbitové vylučující nebo (XOR)\n" +" \t|\t\tbitové nebo (OR)\n" +" \t&&\t\tlogické a zároveň (AND)\n" +" \t||\t\tlogické nebo (OR)\n" +" \tVÝRAZ ? VÝRAZ : VÝRAZ\n" +" \t\t\tpodmíněný operátor\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tpřiřazení\n" +" \n" +" Proměnné shellu jsou povolené operandy. Název proměnné je uvnitř výrazu\n" +" nahrazen její hodnotou (s automatickým převodem na celé číslo pevné " +"šířky).\n" +" Proměnná nemusí mít atribut integer (číslo) zapnutý, aby byla " +"použitelná\n" +" ve výrazu.\n" +" \n" +" Operátory se vyhodnocují v pořadí přednosti. Podvýrazy v závorkách jsou\n" +" vyhodnoceny přednostně a smí přebít pravidla přednosti uvedená výše.\n" +" \n" +" Návratový kód:\n" +" Pokud poslední ARGUMENT je vyhodnocen na 0, let vrátí 1. Jinak je\n" +" navrácena 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Načte ze standardního vstupu jeden řádek a rozdělí jej na položky.\n" +" \n" +" Ze standardního vstupu, nebo deskriptoru souboru FD, je-li zadán\n" +" přepínač -u, je načten jeden řádek. Řádek se rozdělí na části jako při\n" +" dělení na slova a první slovo je přiřazeno do prvního JMÉNA, druhé " +"slovo\n" +" do druhého JMÉNA a tak dále, přičemž přebývající slova se přiřadí do\n" +" posledního JMÉNA. Pouze znaky uvedené v $IFS jsou považovány za\n" +" oddělovače slov.\n" +" \n" +" Nejsou-li uvedena žádná JMÉNA, načtený řádek bude uložen do proměnné " +"REPLY.\n" +" \n" +" Přepínače:\n" +" -a pole načtená slova budou přiřazena do postupných prvků POLE\n" +" počínaje indexem nula\n" +" -d oddělovač pokračuje, dokud není načten první znak ODDĚLOVAČE\n" +" namísto nového řádku\n" +" -e načte řádek pomocí knihovny Readline\n" +" -i text použije TEXT jako prvotní text pro Readline\n" +" -n p_znaků vrátí řízení po načtení P_ZNAKŮ znaků, místo čekání na\n" +" nový řádek, avšak respektuje oddělovač, je-li méně než\n" +" P_ZNAKŮ\n" +" -N p_znaků vrátí řízení pouze po načtení přesně P_ZNAKŮ znaků,\n" +" pokud se neobjeví konec souboru nebo nevyprší limit,\n" +" ignoruje jakýkoliv oddělovač\n" +" -p výzva vypíše řetězec VÝZVA bez závěrečného nového řádku " +"dříve,\n" +" než se zahájí načítání\n" +" -r nepovolí zpětná lomítka pro escapování jakýchkoliv " +"znaků\n" +" -s vstup pocházející z terminálu nebude zobrazován\n" +" -t limit umožní vypršení časového limitu a vrácení chyby, pokud\n" +" nebude načten celý řádek do LIMIT sekund. Hodnota " +"proměnné\n" +" TMOUT představuje implicitní limit. LIMIT smí být " +"desetinné\n" +" číslo. Je-li LIMIT 0, read okamžitě skončí, aniž by " +"zkusil\n" +" načíst jakákoliv data, a vrátí úspěch, jen bude-li na\n" +" zadaném deskriptoru souboru připraven vstup. Návratový\n" +" kód bude větší než 128, pokud časový limit bude " +"překročen.\n" +" -u fd čte z deskriptoru souboru FD namísto standardního " +"vstupu\n" +" \n" +" Návratový kód:\n" +" Návratový kód je nula, pokud se nenarazí na konec souboru, časový limit\n" +" pro čtení nevyprší (pak je větší než 128), nedojde k chybě při\n" +" přiřazování do proměnné, nebo není poskytnut neplatný deskriptor " +"souboru\n" +" jako argument -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Návrat z shellové funkce.\n" +" \n" +" Způsobí ukončení funkce nebo skriptu načteného přes „source“ " +"s návratovou\n" +" hodnotou určenou N. Je-li N vynecháno, návratový kód bude roven " +"poslednímu\n" +" příkazu vykonanému uvnitř dotyčné funkce nebo skriptu.\n" +" \n" +" Návratová hodnota:\n" +" Vrátí N, nebo selže, pokud shell neprovádí funkci nebo skript." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Nastaví nebo zruší hodnoty přepínačů shellu a pozičních parametrů.\n" +" \n" +" Změní hodnoty atributům shellu a pozičním parametrům, nebo zobrazí " +"názvy\n" +" a hodnoty proměnných shellu.\n" +" \n" +" Přepínače:\n" +" -a Označí měněné nebo vytvářené proměnné pro export.\n" +" -b Neprodleně oznámí ukončení úlohy.\n" +" -e Neprodleně skončí, pokud nějaký příkaz skončí s nenulovým kódem.\n" +" -f Zakáže vytváření jmen souborů (globbing).\n" +" -h Zapamatuje si umístění příkazů tehdy, když jsou vyhledány.\n" +" -k Všechny přiřazovací argumenty budou umístěny do prostředí\n" +" příkazu. Nejenom ty, co předchází název příkazu.\n" +" -m Správa úloh je zapnuta.\n" +" -n Příkazy načte, ale neprovede je.\n" +" -o NÁZEV_PŘEPÍNAČE\n" +" Nastaví proměnnou odpovídající NÁZVU_PŘEPÍNAČE:\n" +" allexport stejné jako -a\n" +" braceexpand stejné jako -B\n" +" emacs použije emacsový způsob editace na řádku\n" +" errexit stejné jako -e\n" +" errtrace stejné jako -E\n" +" functrace stejné jako -T\n" +" hashall stejné jako -h\n" +" histexpand stejné jako -H\n" +" history zapne historii příkazů\n" +" ignoreeof shell neskončí, když načte EOF (konec souboru)\n" +" interactive-comments\n" +" povolí, aby se v interaktivních příkazech\n" +" objevovaly komentáře\n" +" keyword stejné jako -k\n" +" monitor stejné jako -m\n" +" noclobber stejné jako -C\n" +" noexec stejné jako -n\n" +" noglob stejné jako -f\n" +" nolog v současnosti přijímáno, ale ignorováno\n" +" notify stejné jako -b\n" +" nounset stejné jako -u\n" +" onecmd stejné jako -t\n" +" physical stejné jako -P\n" +" pipefail návratová hodnota kolony je status posledního\n" +" příkazu, který skončil s nenulovým kódem.\n" +" Návratová hodnota je nula, pokud žádný z příkazů\n" +" neskončil s nenulovým kódem.\n" +" posix změní chování bashe tam, kde implicitní chování\n" +" se liší od standardu 1003.2, tak, aby bylo\n" +" v souladu se standardem\n" +" privileged stejné jako -p\n" +" verbose stejné jako -v\n" +" vi použije vi způsob editace na řádku\n" +" xtrace stejné jako -x\n" +" -p Zapnuto, kdykoliv reálné a efektivní ID uživatele se neshodují.\n" +" Vypne zpracování souboru $ENV a importování shellových funkcí.\n" +" Vypnutí tohoto přepínače způsobí, že efektivní UID a GID budou\n" +" nastavena na reálná UID a GID.\n" +" -t Skončí po načtení a provedení jednoho příkazu.\n" +" -u Při substituci považuje nenastavené proměnné za chybu.\n" +" -v Vstupní řádky shellu se budou vypisovat tak, jak budou načítány.\n" +" -x Vypisuje příkazy a jejich argumenty tak, jak jsou spouštěny.\n" +" -B Shell bude provádět závorkovou (brace) expanzi.\n" +" -C Je-li nastaveno, zakáže přepsání již existujících běžných souborů\n" +" při přesměrování výstupu.\n" +" -E Je-li nastaveno, trap ERR (zachytávání chyb) bude děděn do\n" +" funkcí shellu.\n" +" -H Zapne ! způsob nahrazování historie. Tento příznak je automaticky\n" +" zapnut při interaktivním shellu.\n" +" -P Je-li nastaveno, nebudou vyhodnocovány symbolické odkazy při\n" +" provádění příkazů jako změna pracovního adresáře pomocí „cd“.\n" +" -T Je-li nastaveno, trap DEBUG (obsluha ladění) a RETURN (návrat\n" +" z podprogramu) bude děděn do funkcí shellu.\n" +" -- Přiřadí jakékoliv zbývající argumenty do pozičních parametrů.\n" +" Neexistují-li žádné zbývající argumenty, poziční parametry budou\n" +" odstraněny.\n" +" - Přiřadí jakékoliv zbývající argumenty do pozičních parametrů.\n" +" Přepínače -x a -v budou vypnuty.\n" +" \n" +" Použití + místo - způsobí, že tyto příznaky budou vypnuty. Příznaky lze " +"též\n" +" použít při volání shellu. Aktuální množinu příznaků je možno nalézt " +"v $-.\n" +" Přebývajících n ARGUMENTŮ jsou poziční parametry a budou přiřazeny,\n" +" v pořadí, do $1, $2, … $n. Nejsou-li zadány žádné ARGUMENTY, budou\n" +" vytištěny všechny proměnné shellu.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný argument." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Odstraňuje hodnoty a atributy proměnných a funkcí shellu.\n" +" \n" +" Pro každé JMÉNO odstraní odpovídající proměnnou nebo funkci.\n" +" \n" +" Přepínače:\n" +" -f považuje každé JMÉNO za funkci shellu\n" +" -v považuje každé JMÉNO za proměnnou shellu\n" +" -n považuje každé JMÉNO za odkaz na název a odstraní proměnnou samu\n" +" namísto proměnné, na kterou odkazuje\n" +" \n" +" Bez těchto dvou příznaků unset nejprve zkusí zrušit proměnnou a pokud " +"toto\n" +" selže, tak zkusí zrušit funkci.\n" +" \n" +" Některé proměnné nelze odstranit. Vizte příkaz „readonly“.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a JMÉNO není jen pro\n" +" čtení." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Nastaví atribut exportovat proměnné shellu.\n" +" \n" +" Každý NÁZEV je označen pro automatické exportování do prostředí " +"následně\n" +" prováděných příkazů. Je-li zadána HODNOTA, před exportem přiřadí " +"HODNOTU.\n" +" \n" +" Přepínače:\n" +" -f\tvztahuje se na funkce shellu\n" +" -n\todstraní vlastnost exportovat každému NÁZVU\n" +" -p\tzobrazí seznam všech exportovaných proměnných a funkcí\n" +" \n" +" Argument „--“ zakazuje zpracování dalších přepínačů.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač nebo NÁZEV." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Označí proměnné shellu za nezměnitelné.\n" +" \n" +" Označí každý NÁZEV jako jen pro čtení, hodnoty těchto NÁZVŮ nebude " +"možné\n" +" změnit následným přiřazením. Je-li zadána HODNOTA, před označením za " +"jen\n" +" pro čtení přiřadí HODNOTU.\n" +" \n" +" Přepínače:\n" +" -a vztahuje se na proměnné typu číslované pole\n" +" -A vztahuje se na proměnné typu asociativní pole\n" +" -f vztahuje se funkce shellu\n" +" -p zobrazí seznam všech proměnných nebo funkcí jen pro čtení\n" +" v závislosti podle toho, zda-li byl zadán přepínač -f\n" +" \n" +" Argument „--“ zakáže zpracování dalších přepínačů.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač nebo NÁZEV." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Posune poziční parametry.\n" +" \n" +" Přejmenuje poziční parametry $N+1, $N+2, … na $1, $2, …\n" +" Není-li zadáno N, předpokládá se 1.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud N není záporný a není větší než $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Vykoná příkazy obsažené ze souboru v současném shellu.\n" +" \n" +" Načte a provede příkazy z NÁZEV_SOUBORU v tomto shellu. Položky v $PATH\n" +" jsou použity pro nalezení adresáře obsahujícího NÁZEV_SOUBORU. Jsou-li\n" +" zadány nějaké ARGUMENTY, stanou se pozičními parametry při běhu\n" +" NÁZVU_SOUBORU.\n" +" \n" +" Návratový kód:\n" +" Vrací návratový kód posledního provedeného příkazu z NÁZVU_SOUBORU.\n" +" Selže, pokud NÁZEV_SOUBORU nelze načíst." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Pozastaví běh shellu.\n" +" \n" +" Pozastaví provádění tohoto shellu do doby, něž bude obdržen signál\n" +" SIGCONT. Není-li vynuceno, přihlašovací shell nelze pozastavit.\n" +" \n" +" Přepínače:\n" +" -f\tvynutí pozastavení, i když se jedná o přihlašovací (login) shellu\n" +" \n" +" Návratový kód:\n" +" Vrací úspěch, pokud je správa úloh zapnuta a nevyskytla se chyba." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Vyhodnotí podmínkový výraz.\n" +" \n" +" Skončí s kódem 0 (pravda) nebo 1 (nepravda) podle vyhodnocení VÝRAZU.\n" +" Výraz smí být unární nebo binární. Unární výrazy se často používají pro\n" +" zjištění stavu souboru. Rovněž jsou k dispozici řetězcové operátory a\n" +" operátory číselného porovnání.\n" +" \n" +" Chování testu závisí na počtu argumentů. Úplnou specifikaci si lze\n" +" přečíst v manuálové stránce bashe.\n" +" \n" +" Souborové operátory:\n" +" \n" +" -a SOUBOR Pravda, pokud soubor existuje.\n" +" -b SOUBOR Pravda, pokud soubor je blokovým zařízením.\n" +" -c SOUBOR Pravda, pokud soubor je znakovým zařízením.\n" +" -d SOUBOR Pravda, pokud soubor je adresářem.\n" +" -e SOUBOR Pravda, pokud soubor existuje.\n" +" -f SOUBOR Pravda, pokud soubor existuje a je to běžný soubor.\n" +" -g SOUBOR Pravda, pokud soubor je SGID.\n" +" -h SOUBOR Pravda, pokud soubor je symbolickým odkazem.\n" +" -L SOUBOR Pravda, pokud soubor je symbolickým odkazem.\n" +" -k SOUBOR Pravda, pokud soubor má nastavený „sticky“ bit.\n" +" -p SOUBOR Pravda, pokud soubor je pojmenovanou rourou.\n" +" -r SOUBOR Pravda, pokud soubor je vámi čitelný.\n" +" -s SOUBOR Pravda, pokud soubor existuje a je neprázdný.\n" +" -S SOUBOR Pravda, pokud soubor je socketem.\n" +" -t FD Pravda, pokud FD (deskriptor souboru) je otevřený na\n" +" terminálu.\n" +" -u SOUBOR Pravda, pokud soubor je SUID.\n" +" -w SOUBOR Pravda, pokud soubor je vámi zapisovatelný.\n" +" -x SOUBOR Pravda, pokud soubor je vámi spustitelný.\n" +" -O SOUBOR Pravda, pokud soubor je vámi efektivně vlastněn.\n" +" -G SOUBOR Pravda, pokud soubor je efektivně vlastněn vaší\n" +" skupinou.\n" +" -N SOUBOR Pravda, pokud soubor byl změněn po posledním čtení.\n" +" \n" +" SOUBOR1 -nt SOUBOR2\n" +" Pravda, pokud je SOUBOR1 novější než SOUBOR2 (podle " +"času\n" +" změny obsahu).\n" +" \n" +" SOUBOR1 -ot SOUBOR2\n" +" Pravda, pokud SOUBOR1 je starší než SOUBOR2.\n" +" \n" +" SOUBOR1 -ef SOUBOR2\n" +" Pravda, pokud SOUBOR1 je pevným odkazem na SOUBOR2.\n" +" \n" +" Řetězcové operátory:\n" +" \n" +" -z ŘETĚZEC Pravda, pokud ŘETĚZEC je prázdný.\n" +" \n" +" -n ŘETĚZEC\n" +" ŘETĚZEC Pravda, pokud ŘETĚZEC není prázdný.\n" +" \n" +" ŘETĚZEC1 = ŘETĚZEC2\n" +" Pravda, pokud jsou řetězce shodné.\n" +" ŘETĚZEC1 != ŘETĚZEC2\n" +" Pravda, pokud se řetězce neshodují.\n" +" ŘETĚZEC1 < ŘETĚZEC2\n" +" Pravda, pokud se ŘETĚZEC1 řadí lexikograficky před\n" +" ŘETĚZEC2.\n" +" ŘETĚZEC1 > ŘETĚZEC2\n" +" Pravda, pokud se ŘETĚZEC1 řadí lexikograficky za\n" +" ŘETĚZEC2.\n" +" \n" +" Další operátory:\n" +" \n" +" -o PŘEPÍNAČ Pravda, pokud je přepínač shellu PŘEPÍNAČ zapnut.\n" +" -v PROMĚNNÁ Pravda, pokud je proměnná shellu PROMĚNNÁ nastavena\n" +" -R PROMĚNNÁ Pravda, pokud je proměnná shellu PROMĚNNÁ nastavena a\n" +" jedná se odkaz na název.\n" +" ! VÝRAZ Pravda, pokud je VÝRAZ nepravdivý.\n" +" VÝRAZ1 -a VÝRAZ2\n" +" Pravda, pokud oba VÝRAZ1 I VÝRAZ2 jsou pravdivé.\n" +" VÝRAZ1 -o VÝRAZ2\n" +" Pravda, pokud VÝRAZ1 NEBO VÝRAZ2 je pravdivý.\n" +" \n" +" ARGUMENT1 OP ARGUMENT2\n" +" Aritmetické testy. OP je jeden z -eq, -ne, -lt,\n" +" -le, -gt nebo -ge.\n" +" \n" +" Aritmetické binární operátory vracejí pravdu, pokud ARGUMENT1 je roven,\n" +" neroven, menší než, menší než nebo roven, větší než, větší než nebo\n" +" roven ARGUMENTU2. \n" +" Návratový kód:\n" +" Vrací úspěch, je-li VÝRAZ vyhodnocen jako pravdivý. Selže, je-li VÝRAZ\n" +" vyhodnocen jako nepravdivý nebo je-li zadán neplatný argument." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Vyhodnotí podmínkový výraz.\n" +" \n" +" Toto je synonymum pro vestavěný příkaz „test“, až na to, že poslední\n" +" argument musí být doslovně „]“, aby se shodoval s otevírající „[“." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Zobrazí časy procesu.\n" +" \n" +" Vypíše celkovou dobu procesu shellu a všech jeho potomků, kterou " +"strávili\n" +" v uživatelském a jaderném (system) prostoru.\n" +" \n" +" Návratový kód:\n" +" Vždy uspěje." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Zachytávání signálů a jiných událostí.\n" +" \n" +" Definuje a aktivuje obsluhy, které budou spuštěny, když shell obdrží\n" +" signály nebo nastanou určité podmínky.\n" +" \n" +" Příkaz ARGUMENT bude načten a proveden, až shell obdrží signál(y)\n" +" SIGNAL_SPEC. Pokud ARGUMENT chybí (a je zadán jeden SIGNAL_SPEC) nebo " +"je\n" +" „-“, každý určený signál bude přenastaven zpět na svoji původní " +"hodnotu.\n" +" Je-li ARGUMENT prázdný řetězec, každý SIGNAL_SPEC bude shellem a " +"příkazy\n" +" z něj spuštěnými ignorován.\n" +" \n" +" Je-li SIGNAL_SPEC „EXIT (0)“, bude ARGUMENT proveden při ukončování " +"tohoto\n" +" shellu. Je-li SIGNAL_SPEC „DEBUG“, bude ARGUMENT proveden před každým\n" +" jednoduchým příkazem. Je-li SIGNAL_SPEC „RETURN“, bude ARGUMENT " +"proveden\n" +" vždy, když skončí běh funkce shellu nebo skriptu spuštěného přes\n" +" vestavěný příkaz „.“ nebo „source“. SIGNAL_SPEC „ERR“ znamená, že\n" +" ARGUMENT bude proveden pokaždé, když by selhání příkazu způsobilo\n" +" ukončení shellu (je-li zapnut přepínač -e).\n" +" \n" +" Nejsou-li poskytnuty žádné argumenty, trap vypíše seznam příkazů " +"navázaných\n" +" na všechny signály.\n" +" \n" +" Přepínače:\n" +" -l\tvypíše seznam jmen signálů a jim odpovídajících čísel\n" +" -p\tzobrazí příkazy navázané na každý SIGNAL_SPEC\n" +" \n" +" Každý SIGNAL_SPEC je buďto jméno signálu ze , nebo číslo " +"signálu.\n" +" U jmen signálů nezáleží na velikosti písmen a předpona SIG je " +"nepovinná.\n" +" Aktuálnímu shellu lze zaslat signál pomocí „kill -signal $$“.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud SIGSPEC a zadané přepínače jsou platné." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Zobrazí informace o typu příkazu.\n" +" \n" +" O každém NÁZVU řekne, jak by byl interpretován, kdyby byl použit jako\n" +" název příkazu.\n" +" \n" +" Přepínače\n" +" -a zobrazí všechna místa, kde se nalézá spustitelný program\n" +" pojmenovaný NÁZEV. To zahrnuje aliasy, vestavěné příkazy a funkce\n" +" jen a pouze tehdy, když není rovněž použit přepínač -p.\n" +" -f potlačí hledání mezi funkcemi shellu\n" +" -P vynutí prohledání PATH na každý NÁZEV, dokonce i když se\n" +" jedná o alias, vestavěný příkaz nebo funkci, a vrátí název\n" +" souboru na disku, který by byl spuštěn\n" +" -p buď vrátí jméno souboru na disku, který by byl spuštěn,\n" +" nebo nic, pokud „type -t NÁZEV“ by nevrátil „file“ (soubor)\n" +" -t vypíše jedno slovo z těchto: „alias“, „keyword“, „function“,\n" +" „builtin“, „file“ nebo „“, je-li NÁZEV alias, klíčové slovo\n" +" shellu, shellová funkce, vestavěný příkaz shellu, soubor na\n" +" disku nebo nenalezený příkaz\n" +" \n" +" Argumenty:\n" +" NÁZEV Název příkazu určený k výkladu.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud všechny NÁZVY byly nalezeny. Selže, pokud některé\n" +" nalezeny nebyly." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Upravuje omezení (limity) zdrojů shellu.\n" +" \n" +" Poskytuje kontrolu nad zdroji dostupnými shellu a procesům z něj\n" +" spuštěných (na systémech, které takovou kontrolu umožňují).\n" +" \n" +" Přepínače:\n" +" -S použije se „měkké“ (soft) omezení zdroje\n" +" -H použije se „tvrdé“ (hard) omezení zdroje\n" +" -a nahlásí všechna současná omezení (limity)\n" +" -b velikost vyrovnávací paměti socketů\n" +" -c maximální velikost vytvářených core souborů (výpis paměti " +"programu)\n" +" -d maximální velikost datového segmentu procesu\n" +" -e maximální plánovací priorita („nice“)\n" +" -f maximální velikost souborů zapsaných shellem a jeho potomky\n" +" -i maximální počet čekajících signálů\n" +" -k maximální počet jaderných front událostí („kqueue“) alokovaných\n" +" pro tento proces\n" +" -l maximální velikost paměti, kterou může proces zamknout\n" +" -m maximální velikost rezidentní paměti (resident set size)\n" +" -n maximální počet otevřených deskriptorů souboru\n" +" -p velikost vyrovnávací paměti rour\n" +" -q maximální počet bajtů ve frontě posixových zpráv\n" +" -r maximální priorita plánování v reálném čase\n" +" -s maximální velikost zásobníku\n" +" -t maximální množství procesorového času v sekundách\n" +" -u maximální počet procesů uživatele\n" +" -v velikost virtuální paměti\n" +" -x maximální počet zámků na souborech\n" +" -P maximální počet pseudoterminálů\n" +" -T maximální počet vláken\n" +" \n" +" Ne všechny přepínače jsou dostupné na všech platformách.\n" +" \n" +" Je-li zadán LIMIT, jedná se o novou hodnotu daného zdroje. Zvláštní\n" +" hodnoty LIMITU „soft“, „hard“ a „unlimited“ znamenají současný měkký\n" +" limit, současný tvrdý limit a žádný limit. V opačném případě bude\n" +" zobrazena současná hodnota limitu daného zdroje. Není-li zadán žádný\n" +" přepínač, pak se předpokládá -f.\n" +" \n" +" Hodnoty jsou v násobcích 1024 bajtů, kromě -t, která je v sekundách,\n" +" -p, která je v násobcích 512 bajtů, a -u, což je absolutní počet " +"procesů.\n" +" \n" +" Návratová hodnota:\n" +" Vrací úspěch, pokud nebyl zadán neplatný přepínač a nevyskytla se chyba." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Zobrazí nebo nastaví uživatelskou masku práv.\n" +" \n" +" Nastaví Uživatelskou masku práv vytvářených souborů na MÓD. Je-li\n" +" MÓD vynechán, bude vytištěna současná hodnota masky.\n" +" \n" +" Začíná-li MÓD číslicí, bude interpretován jako osmičkové číslo, jinak\n" +" jako řetězec symbolického zápisu práv tak, jak jej chápe chmod(1).\n" +" \n" +" Přepínače:\n" +" -p\tje-li MÓD vynechán, bude výstup v podobě, kterou lze použít\n" +" \tjako vstup\n" +" -S\tučiní výstup symbolický, jinak bude výstupem osmičkové číslo\n" +" \n" +" Návratový kód\n" +" Vrátí úspěch, pokud nebyl zadán neplatný MÓD nebo přepínač." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Počká na dokončení úlohy a vrátí její návratový kód.\n" +" \n" +" Počká na každý proces určený ID, což může být ID procesu nebo " +"identifikace\n" +" úlohy, a nahlásí jeho návratový kód. Není-li ID zadáno, počká na " +"všechny\n" +" právě aktivní dětské procesy a návratovým kódem bude nula. Je-li ID\n" +" identifikátorem úlohy, počká na všechny procesy z kolony dané úlohy.\n" +" \n" +" Je-li zadán přepínač -n, počká na ukončení další úlohy a vrátí její\n" +" návratový kód.\n" +" \n" +" Je-li zadán přepínač -f a je-li zapnuta správa úloh, počká na ukončení\n" +" ukončení zadaného ID, místo aby čekal na změnu jeho stavu.\n" +" \n" +" Návratový kód:\n" +" Vrátí kód posledního ID. Selže, pokud ID není platný nebo byl zadán\n" +" neplatný přepínač." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Počká na dokončení procesu a vrátí jeho návratový kód.\n" +" \n" +" Počká na každý proces určený PID a nahlásí jeho návratový kód. Není-li\n" +" PID zadán, bude se čekat na všechny právě aktivní procesy potomků a\n" +" návratová hodnota bude nula. PID musí být ID procesu.\n" +" \n" +" Návratový kód:\n" +" Vrátí kód posledního PID. Selže, pokud PID není platný nebo byl zadán\n" +" neplatný přepínač." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Pro každý prvek seznamu vykoná příkazy.\n" +" \n" +" Smyčka „for“ provede posloupnost příkazů pro každý prvek v seznamu " +"položek.\n" +" Pokud „in SLOVECH…;“ není přítomno, pak se předpokládá „in \"$@\"“. " +"NÁZEV\n" +" bude postupně nastaven na každý prvek ve SLOVECH a PŘÍKAZY budou " +"provedeny.\n" +" \n" +" Návratový kód:\n" +" Vrátí kód naposledy provedeného příkazu." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetická smyčka for.\n" +" \n" +" Ekvivalentní k\n" +" \t(( VÝR1 ))\n" +" \twhile (( VÝR2 )); do\n" +" \t\tPŘÍKAZY\n" +" \t\t(( VÝR3 ))\n" +" \tdone\n" +" VÝR1, VÝR2 a VÝR3 jsou aritmetické výrazy. Chybí-li některý výraz,\n" +" chová se, jako by byl vyhodnocen na 1. \n" +" Návratový kód:\n" +" Vrátí kód naposledy vykonaného příkazu." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vybere slova ze seznamu a vykoná příkazy.\n" +" \n" +" SLOVA jsou expandována a vytvoří seznam slov. Množina expandovaných " +"slov\n" +" je vytištěna na standardní chybový výstup, každé předchází číslo. Není-" +"li\n" +" „in SLOVA“ přítomno, předpokládá se „in \"$@\"“. Pak je zobrazena výzva " +"PS3\n" +" a jeden řádek načten ze standardního vstupu. Pokud je řádek tvořen " +"číslem\n" +" odpovídajícím jednomu ze zobrazených slov, pak NÁZEV bude nastaven na " +"toto\n" +" slovo. Pokud je řádek prázdný, SLOVA a výzva budou znovu zobrazeny. Je-" +"li\n" +" načten EOF (konec souboru), příkaz končí. Načtení jakékoliv jiné " +"hodnoty\n" +" nastaví NÁZEV na prázdný řetězec. Načtený řádek bude uložen do proměnné\n" +" REPLY. Po každém výběru budou provedeny PŘÍKAZY, dokud nebude vykonán\n" +" příkaz „break“.\n" +" \n" +" Návratový kód:\n" +" Vrátí kód naposledy prováděného příkazu." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Nahlásí čas spotřebovaný prováděním kolony.\n" +" \n" +" Vykoná KOLONU a zobrazí přehled reálného času, uživatelského\n" +" procesorového času a systémového procesorového času stráveného " +"prováděním\n" +" KOLONY poté, co skončí.\n" +" \n" +" Přepínače:\n" +" -p\tzobrazí přehled časů v přenositelném posixovém formátu\n" +" \n" +" Hodnota proměnné TIMEFORMAT se použije jako specifikace výstupního " +"formátu.\n" +" \n" +" Návratový kód:\n" +" Návratová hodnota je návratová hodnota KOLONY." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Provede příkazy podle shody se vzorem.\n" +" \n" +" Výběrově provede PŘÍKAZY na základě shody SLOVA se VZOREM. Znak „|“\n" +" se používá na oddělení násobných VZORŮ.\n" +" \n" +" Návratový kód:\n" +" Vrátí kód naposledy provedeného příkazu." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykoná příkazy na základě splnění podmínky.\n" +" \n" +" Provede seznam „if PŘÍKAZŮ“. Bude-li jeho návratový kód nula, pak bude\n" +" proveden seznam „then PŘÍKAZŮ“. Jinak bude proveden popořadě každý " +"seznam\n" +" „elif PŘÍKAZŮ“ a bude-li jeho návratový kód nula, odpovídající seznam\n" +" „then PŘÍKAZŮ“ bude proveden a příkaz if skončí. V opačném případě bude\n" +" proveden seznam „else PŘÍKAZŮ“, pokud existuje. Návratová hodnota celé\n" +" konstrukce je návratovou hodnotou posledního provedeného příkazu nebo " +"nula,\n" +" pokud žádná z testovaných podmínek není pravdivá.\n" +" \n" +" Návratový kód:\n" +" Vrátí kód naposledy provedeného příkazu." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykonává příkazy, dokud test úspěšně prochází.\n" +" \n" +" Expanduje a provádí PŘÍKAZY tak dlouho, dokud poslední příkaz ve " +"„while“\n" +" PŘÍKAZECH má nulový návratový kód.\n" +" \n" +" Návratový kód:\n" +" Vrátí kód naposledy provedeného příkazu." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykonává příkazy, dokud test končí neúspěšně.\n" +" \n" +" Expanduje a provádí PŘÍKAZY tak dlouho, dokud poslední příkaz ve " +"„until“\n" +" PŘÍKAZECH má nenulový návratový kód. \n" +" Návratový kód:\n" +" Vrátí kód naposledy provedeného příkazu." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Vytvoří koproces pojmenovaný NÁZEV.\n" +" \n" +" Vykoná PŘÍKAZ asynchronně, přičemž jeho standardní výstup a standardní\n" +" vstup budou napojeny rourou na souborové deskriptory uvedené v poli " +"NÁZEV\n" +" tohoto shellu pod indexem 0 a 1. Implicitní NÁZEV je „COPROC“.\n" +" \n" +" Návratový kód:\n" +" Příkaz coproc vrací návratový kód 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Definuje funkci shellu.\n" +" \n" +" Vytvoří shellovou funkci pojmenovanou NÁZEV. Volána jakožto jednoduchý\n" +" příkaz spustí PŘÍKAZY v kontextu volajícího shellu. Je-li vyvolán " +"NÁZEV,\n" +" budou funkci předány argumenty jako $1…$n a název funkce bude umístěn " +"do\n" +" $FUNCNAME.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud NÁZEV není jen pro čtení." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Seskupí příkazy do jednotky.\n" +" \n" +" Spustí množinu příkazů v jedné skupině. Toto je jeden ze způsobů,\n" +" jak přesměrovat celou množinu příkazů. \n" +" Návratový kód:\n" +" Vrátí kód naposledy spuštěného příkazu." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Obnoví úlohu do popředí.\n" +" \n" +" Ekvivalent k argumentu ÚLOHA příkazu „fg“. Obnoví pozastavenou úlohu\n" +" nebo úlohu na pozadí. ÚLOHA může určovat buď název úlohy, nebo číslo " +"úlohy.\n" +" Přidání „&“ za ÚLOHU přesune úlohu na pozadí, jako by identifikátor " +"úlohy\n" +" byl argumentem příkazu „bg“.\n" +" \n" +" Návratový kód:\n" +" Vrátí kód obnovené úlohy." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Vyhodnotí aritmetický výraz.\n" +" \n" +" VÝRAZ bude vyhodnocen podle pravidel aritmetického vyhodnocování.\n" +" Ekvivalentní k „let VÝRAZ“.\n" +" \n" +" Návratový kód:\n" +" Vrátí 1, pokud se VÝRAZ vyhodnotí na 0. Jinak vrátí 0." + +# XXX: „coniditional command“ znamená podmínka, výraz podmínky. Nikoliv +# příkaz, který by byl vykonán na základě splnění jiné podmínky. Tj. překlad +# „podmíněný příkaz“ je chybný. +# Toto je nápověda k vestavěnému příkazu „[“. +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Vykoná podmínkový příkaz.\n" +" \n" +" Vrátí status 0 nebo 1 podle vyhodnocení výrazu podmínky VÝRAZ. Výrazy\n" +" se skládají ze stejných primitiv jako u vestavěného příkazu „test“ a\n" +" mohou být kombinovány za pomoci následujících operátorů:\n" +" \n" +" ( VÝRAZ )\tVrátí hodnotu VÝRAZU\n" +" ! VÝRAZ\t\tPravda, pokud VÝRAZ je nepravdivý; jinak nepravda\n" +" VÝR1 && VÝR2\tPravda, pokud oba VÝR1 i VÝR2 jsou pravdivé;\n" +" \t\tjinak nepravda\n" +" VÝR1 || VÝR2\tPravda, pokud VÝR1 nebo VÝR2 je pravdivý; jinak " +"nepravda\n" +" \n" +" Jsou-li použity operátory „==“ a „!=“, řetězec napravo od operátoru je\n" +" použit jako vzor a bude uplatněno porovnávání proti vzoru. Je-li použit\n" +" operátor „=~, řetězec napravo do operátoru je uvažován jako regulární\n" +" výraz.\n" +" \n" +" Operátory && a || nevyhodnocují VÝR2, pokud VÝR1 je dostatečný na " +"určení\n" +" hodnoty výrazu.\n" +" \n" +" Návratový kód:\n" +" 0 nebo 1 podle hodnoty VÝRAZU." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Názvu běžných proměnných shellu a jejich význam.\n" +" \n" +" BASH_VERSION\tInformace o verzi tohoto Bashe.\n" +" CDPATH\tDvojtečkou oddělený seznam adresářů, který se prohledává\n" +" \t\tna adresáře zadané jako argumenty u „cd“.\n" +" GLOBIGNORE\tDvojtečkou oddělený seznam vzorů popisujících jména " +"souborů,\n" +" \t\tkterá budou ignorována při expanzi cest.\n" +" HISTFILE\tJméno souboru, kde je uložena historie vašich příkazů.\n" +" HISTFILESIZE\tMaximální počet řádků, které tento soubor smí obsahovat.\n" +" HISTSIZE\tMaximální počet řádků historie, které jsou dostupné uvnitř\n" +" \t\tběžícího shellu.\n" +" HOME\tCelá cesta do vašeho domovského adresáře.\n" +" HOSTNAME\tJméno současného stroje.\n" +" HOSTTYPE\tDruh CPU, na které tento Bash běží.\n" +" IGNOREEOF\tŘídí reakci shellu na přijetí znaku EOF (konec souboru)\n" +" \t\tpři samotném vstupu. Je-li nastaveno, pak její hodnota udává\n" +" \t\tpočet znaků EOF, které mohou bezprostředně následovat na prázdném\n" +" \t\třádku, dříve než shell skončí (implicitní hodnota je 10). Není-li\n" +" \t\tnastaveno, EOF značí konec vstupu.\n" +" MACHTYPE\tŘetězec popisující systém, na kterém tento Bash běží.\n" +" MAILCHECK\tJak často, v sekundách, kontroluje Bash novou poštu.\n" +" MAILPATH\tDvojtečkou oddělený seznam názvů souborů, které Bash\n" +" \t\tkontroluje na novou poštu.\n" +" OSTYPE\tVerze Unixu, na kterém tento Bash běží.\n" +" PATH\tDvojtečkou oddělený seznam adresářů, které jsou prohledávány\n" +" \t\tna příkazy.\n" +" PROMPT_COMMAND\tPříkaz, který je proveden před vytištěním každé\n" +" \t\tprimární výzvy shellu.\n" +" PS1\t\tŘetězec prvotní výzvy shellu.\n" +" PS2\t\tŘetězec druhotné výzvy shellu.\n" +" PWD\t\tCelé jméno cesty do aktuálního adresáře.\n" +" SHELLOPTS\tDvojtečkou oddělený seznam zapnutých přepínačů shellu.\n" +" TERM\tNázev druhu současného terminálu.\n" +" TIMEFORMAT\tVýstupní formát časové statistiky zobrazované vyhrazeným\n" +" \t\tslovem „time“.\n" +" auto_resume\tNeprázdná hodnota znamená, že slovo příkazu objevující se\n" +" \t\tna řádce automaticky je nejprve vyhledáno v seznamu\n" +" \t\tprávě pozastavených úloh. Je-li tam nalezeno, daná úloha bude\n" +" \t\tpřepnuta na popředí. Hodnota „exact“ znamená, že slovo příkazu\n" +" \t\tse musí přesně shodovat s příkazem v seznamu pozastavených úloh.\n" +" \t\tHodnota „substring“ znamená, že slovo příkazu se musí shodovat\n" +" \t\ts podřetězcem úlohy. Jakákoliv jiná hodnota znamená, že příkaz\n" +" \t\tmusí být předponou pozastavené úlohy.\n" +" histchars\tZnaky řídící expanzi historie a rychlé nahrazování.\n" +" \t\tPrvní znak je znak nahrazení historie, obvykle „!“. Druhý je\n" +" \t\tznak „rychlého nahrazování“, obvykle „^“. Třetí je znak\n" +" \t\t„komentáře historie“, obvykle „#“.\n" +" HISTIGNORE\tDvojtečkou oddělený seznam vzorů používaný na\n" +" \t\trozlišení, které příkazy by měly být uloženy do seznamu\n" +" \t\thistorie.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Přidá adresáře do zásobníku.\n" +" \n" +" Přidá adresář na vrchol zásobníku adresářů nebo zásobník zrotuje tak,\n" +" že nový vrchol zásobníku se stane současným pracovním adresářem. Bez\n" +" argumentů prohodí dva vrchní adresáře.\n" +" \n" +" Přepínače:\n" +" -n Potlačí obvyklou změnu adresáře, když se na zásobník přidávají\n" +" adresáře, takže změněn bude pouze zásobník.\n" +" \n" +" Argumenty:\n" +" +N Zrotuje zásobník tak, že N. adresář (počítáno zleva na seznamu\n" +" zobrazovaném pomocí „dirs“, počínaje nulou) se dostane na vrchol.\n" +" \n" +" -N Zrotuje zásobník tak, že N. adresář (počítáno zprava na seznamu\n" +" zobrazovaném pomocí „dirs“, počínaje nulou) se dostane na vrchol.\n" +" \n" +" ADRESÁŘ\n" +" Přidá ADRESÁŘ na vrchol zásobníku adresářů a učiní jej novým\n" +" současným pracovním adresářem.\n" +" \n" +" Zásobník adresářů si můžete prohlédnout příkazem „dirs“.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný argument a změna adresáře\n" +" neselhala." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Odebere adresáře ze zásobníku.\n" +" \n" +" Odstraní položky ze zásobníku adresářů. Bez argumentů odstraní adresář\n" +" z vrcholu zásobníku a přepne do nového adresáře na vrchu zásobníku.\n" +" \n" +" Přepínače:\n" +" -n Potlačí obvyklou změnu adresáře, když se ze zásobníku odebírají\n" +" adresáře, takže změněn bude pouze zásobník.\n" +" \n" +" Argumenty:\n" +" +N Odstraní N. položku počítáno zleva na seznamu zobrazovaném\n" +" pomocí „dirs“, počínaje nulou. Na příklad: „popd +0“ odstraní\n" +" první adresář, „popd -1“ druhý.\n" +" \n" +" -N Odstraní N. položku počítáno zprava na seznamu zobrazovaném\n" +" pomocí „dirs“, počínaje nulou. Na příklad: „popd -0“ odstraní\n" +" poslední adresář, „popd -1“ další vedle posledního.\n" +" \n" +" Zásobník adresářů si můžete prohlédnout příkazem „dirs“.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný argument nebo neselhala změna\n" +" adresáře." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Zobrazí zásobník adresářů.\n" +" \n" +" Zobrazí seznam právě pamatovaných adresářů. Adresáře si najdou cestu\n" +" na seznam příkazem „pushd“ a procházet seznamem zpět lze příkazem " +"„popd“.\n" +" \n" +" Přepínače:\n" +" -c vyprázdní zásobník adresářů tím, že smaže všechny jeho prvky\n" +" -l nevypíše vlnkou zkrácené verze adresářů, které jsou relativní\n" +" vašemu domovskému adresáři\n" +" -p vypíše zásobník adresářů po jedné položce na řádek\n" +" -v vypíše zásobník adresářů po jedné položce na řádek, přičemž\n" +" názvu adresáře předřadí jeho umístění na zásobníku\n" +" \n" +" Argumenty:\n" +" +N zobrazí N. položku počítáno zleva na seznamu, který zobrazuje\n" +" dirs, když je vyvolán bez přepínačů, počínaje nulou.\n" +" \n" +" -N zobrazí N. položku počítáno zprava na seznamu, který zobrazuje\n" +" dirs, když je vyvolán bez přepínačů, počínaje nulou. \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a nevyskytla se chyba." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Zapne nebo vypne volby (přepínače) shellu.\n" +" \n" +" Změní nastavení každého přepínače shellu NÁZEV_VOLBY. Bez přepínačových\n" +" argumentů vypíše každý zadaný NÁZEV_VOLBY, nebo seznam všech přepínačů\n" +" shellu, nebyl-li zadán žádný NÁZEV_VOLBY, s příznakem, zda je, nebo\n" +" není přepínač nastaven.\n" +" Přepínače:\n" +" -o\tomezí NÁZVY_VOLEB na ty, které jsou definovány pro použití\n" +" \ts „set -o“\n" +" -p\tvypíše každou volbu shellu s určením jejího stavu\n" +" -q\tpotlačí výstup\n" +" -s\tzapne [set] každý NÁZEV_VOLBY\n" +" -u\tvypne [unset] každý NÁZEV_VOLBY\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, je-li NÁZEV_VOLBY zapnut. Selže, byl-li zadán neplatný\n" +" přepínač nebo je-li NÁZEV_VOLBY vypnut." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Naformátuje a vypíše ARGUMENTY podle definice FORMÁTU.\n" +" \n" +" Přepínače:\n" +" -v proměnná výstup umístí do proměnné shellu PROMĚNNÁ namísto\n" +" odeslání na standardní výstup.\n" +" \n" +" FORMÁT je řetězec znaků, který obsahuje tři druhy objektů: obyčejné " +"znaky,\n" +" které jsou prostě zkopírovány na standardní výstup, posloupnosti " +"escapových\n" +" znaků, které jsou zkonvertovány a zkopírovány na standardní výstup a\n" +" formátovací definice, z nichž každá způsobí vytištění dalšího " +"argumentu.\n" +" \n" +" Tento printf interpretuje vedle standardních formátovacích definic\n" +" popsaných v printf(1) též:\n" +" \n" +" %b expanduje posloupnosti escapované zpětným lomítkem\n" +" v odpovídajícím argumentu\n" +" %q oescapuje argument takovým způsobem, že jej bude možné\n" +" použít jako vstup shellu\n" +" %(FORMÁT)T vypíše řetězec data-času tak, jako by to byl výstup\n" +" funkce strftime(3) s formátovacím řetězcem FORMÁT\n" +" \n" +" FORMÁT lze znovu použít podle potřeby ke zpracování všech argumentů. Je-" +"li\n" +" zde méně argumentů, než FORMÁT vyžaduje, nadbytečné formátovací znaky\n" +" se budou chovat, jako by nulová hodnota nebo nulový řetězec, jak je " +"třeba,\n" +" byly zadány.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a nedošlo k chybě\n" +" zápisu nebo přiřazení." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Určuje, jak budou argumenty doplňovány pomocí knihovny Readline.\n" +" \n" +" Pro každý NÁZEV udává, jak se budou doplňovat argumenty. Nejsou-li\n" +" zadány žádné přepínače, budou vypsány existující pravidla doplňování\n" +" v podobě vhodné pro jejich znovu užití jako vstup.\n" +" \n" +" Přepínače:\n" +" -p vypíše existující pravidla doplňování v znovu použitelném tvaru\n" +" -r odstraní pro každý NÁZEV doplňovací pravidlo, nebo není-li zadán\n" +" žádný NÁZEV, zruší všechna pravidla\n" +" -D použije pravidla doplňování a akce jako implicitní pro příkazy,\n" +" které nemají žádné určité pravidlo doplňování definováno\n" +" -E použije pravidla doplňování a akce na „prázdné“ příkazy –\n" +" pravidla doplňování se uplatní na prázdný řádek\n" +" -I použije pravidla doplňování a akce na první slovo (obvykle " +"příkaz)\n" +" \n" +" Použije-li se doplňování, akce se uplatní v pořadí, v jakém jsou " +"vypsány\n" +" přepínače psané velkými písmeny výše. Je-li zadáno více přepínačů,\n" +" přepínač -D bude upřednostněn před přepínačem -E. Oba přepínače " +"přebíjejí\n" +" přepínač -I.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a nevyskytla se chyba." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Zobrazí možná doplnění v závislosti na přepínačích.\n" +" \n" +" Je zamýšleno pro použití uvnitř shellových funkcí generujících možná\n" +" doplnění. Je-li poskytnut volitelný argument SLOVO, budou vygenerovány\n" +" shody se SLOVEM.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a nevyskytla se chyba." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Upraví nebo zobrazí možnosti doplňování.\n" +" \n" +" Pozmění možnosti doplňování každého NÁZVU, nebo, není-li zadán žádný\n" +" NÁZEV, právě prováděného doplňování. Nejsou-li zadány žádné MOŽNOSTI,\n" +" vypíše možnosti doplňování každého NÁZVU nebo definic právě prováděného\n" +" doplňování.\n" +" \n" +" Přepínače:\n" +" \t-o možnost\tNastaví možnost doplňování MOŽNOST každému NÁZVU\n" +" \t-D\t\tZmění možnosti doplňování „implicitnímu“ příkazu\n" +" \t-E\t\tZmění možnosti doplňování „prázdnému“ příkazu\n" +" \t-I\t\tZmění možnosti doplňování prvnímu slovu\n" +" \n" +" Pomocí „+o“ namísto „-o“ zadanou možnost vypnete.\n" +" \n" +" Argumenty:\n" +" Každý NÁZEV odkazuje na příkaz, pro který musí být předem definováno\n" +" pravidlo (definice) doplňování pomocí vestavěného příkazu „complete“.\n" +" Nejsou-li zadány žádné NÁZVY, musí být compopt volán funkcí, která " +"právě\n" +" generuje doplňování. Změněny pak budou možnosti tohoto právě " +"prováděného\n" +" generátoru doplňování.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač a NÁZEV měl " +"definováno\n" +" pravidlo doplňování." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Načte řádky ze standardního vstupu do proměnné typu indexované pole.\n" +" \n" +" Načte řádky ze standardního vstupu nebo z deskriptoru souboru FD, byl-" +"li\n" +" zadán přepínač -u, do proměnné POLE, která je typu indexované pole.\n" +" Implicitním POLEM je proměnná MAPFILE.\n" +" \n" +" Přepínače:\n" +" -d oddělovač Řádky zakončí ODDĚLOVAČEM namísto znakem nového řádku\n" +" -n počet Zkopíruje nejvýše POČET řádků. Je-li POČET 0,\n" +" zkopíruje všechny řádky\n" +" -O počátek Přiřazování do POLE začne na indexu POČÁTEK,\n" +" výchozí index je 0\n" +" -s počet Zahodí prvních POČET načtených řádků\n" +" -t Odstraní znak konce řádku z každého načteného řádku\n" +" -u fd Řádky čte z deskriptoru souboru FD namísto ze\n" +" standardního vstupu\n" +" -C volání Vyhodnotí VOLÁNÍ pokaždé, když je načteno MNOŽSTVÍ\n" +" řádků\n" +" -c množství Udává počet řádků, které je třeba přečíst, mezi\n" +" každým zavoláním VOLÁNÍ\n" +" \n" +" Argumenty:\n" +" POLE Název proměnné typu pole, do které budou přiřazena data\n" +" \n" +" Je-li uvedeno -C bez -c, implicitní množství bude 5000. Vyhodnocovanému\n" +" VOLÁNÍ budou jako dodatečné argumenty předány index prvku pole, do\n" +" kterého se má vzápětí přiřazovat, a řádek, který má být přiřazen do\n" +" tohoto prvku.\n" +" \n" +" Nebude-li explicitně udán počátek, mapfile vyprázdní POLE před tím,\n" +" než do něj začne přiřazovat.\n" +" \n" +" Návratový kód:\n" +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač, POLE nebylo jen pro\n" +" čtení a bylo indexovaným polem." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Načte řádky ze souboru do proměnné typu pole.\n" +" \n" +" Synonymum pro „mapfile“." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright © 2018 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Vrátí kontext aktuálního volání podprogramu.\n" +#~ " \n" +#~ " Bez VÝRAZU vrátí " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: proces %5ld (%s) do the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Neznámé číslo signálu" + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Copyright © 2014 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Copyright © 2009 Free Software Foundation, Inc.\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licence GPLv2+: GNU GPL verze 2 nebo novější \n" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". S VÝRAZEM vrátí\n" +#~ " " + +#~ msgid "" +#~ "; this extra information can be used to\n" +#~ " provide a stack trace.\n" +#~ " \n" +#~ " The value of EXPR indicates how many call frames to go back before " +#~ "the\n" +#~ " current one; the top frame is frame 0." +#~ msgstr "" +#~ "; tato dodatečná informace může být\n" +#~ " použita jako výpis zásobníku volání.\n" +#~ " \n" +#~ " Hodnota VÝRAZU určuje, kolik rámců volání jít zpět před současný,\n" +#~ " vrcholový rámec je rámce 0." + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: nelze přealokovat %'lu bajtů (%'lu bajtů alokováno)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: nelze alokovat %'lu bajtů" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: %s:%d: nelze přealokovat %'lu bajtů (%'lu bajtů alokováno)" + +#~ msgid " " +#~ msgstr " " + +#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," +#~ msgstr "Bez VÝRAZU vrací „$line $filename“. S VÝRAZEM " + +#~ msgid "returns \"$line $subroutine $filename\"; this extra information" +#~ msgstr "vrací „$line $subroutine $filename“. Tyto údaje" + +#~ msgid "can be used used to provide a stack trace." +#~ msgstr "lze využít při výpisu zásobníku volání." + +#~ msgid "" +#~ "The value of EXPR indicates how many call frames to go back before the" +#~ msgstr "Hodnota VÝRAZ značí, kolik rámců volání se má jít zpět před" + +#~ msgid "current one; the top frame is frame 0." +#~ msgstr "současný rámec, vrcholový rámec má číslo 0." + +#~ msgid "%s: invalid number" +#~ msgstr "%s: chybné číslo" + +#~ msgid "Shell commands matching keywords `" +#~ msgstr "Příkazy shellu shodující se s klíčovými slovy „" + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "Zobrazí seznam právě zapamatovaných adresářů. Adresáře" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "se na seznam umisťují příkazem „pushd“, předchozí stav seznamu lze" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "vrátit příkazem „popd“." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "Příznak -l značí, že „dirs“ nemá vypisovat zkrácené verze adresářů," + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "které leží pod vaším domovským adresářem. To znamená, že „~/bin“" + +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "smí být zobrazen jako „/homes/bfox/bin“. Příznak -v způsobí, že" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "" +#~ "„dirs“ vypíše zásobník adresářů záznam po záznamu na samostatné řádky" + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "a před název adresáře uvede jeho pořadí v zásobníku. Příznak -p" + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "dělá to samé, ale bez informace o umístění na zásobníku." + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "Příznak -c vyprázdní zásobník smazáním všem prvků." + +#~ msgid "" +#~ "+N displays the Nth entry counting from the left of the list shown by" +#~ msgstr "+N zobrazí N. položku počítáno zleva na seznamu, který by ukázal" + +#~ msgid " dirs when invoked without options, starting with zero." +#~ msgstr " příkaz dirs bez jakýchkoliv přepínačů, počítáno od nuly." + +#~ msgid "" +#~ "-N displays the Nth entry counting from the right of the list shown by" +#~ msgstr "-N zobrazí N. položku počítáno zprava na seznamu, který by ukázal" + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "" +#~ "Přidá adresář na vrchol zásobníku adresářů, nebo rotuje zásobník tak," + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "že nový vrchol zásobníku se stane pracovním adresářem." + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "Bez argumentů prohodí horní dva adresáře." + +#~ msgid "+N Rotates the stack so that the Nth directory (counting" +#~ msgstr "+N Zrotuje zásobník tak, že N. adresář (počítáno" + +#~ msgid " from the left of the list shown by `dirs', starting with" +#~ msgstr " zleva seznamu, který by ukázal „dirs“, počínaje od" + +#~ msgid " zero) is at the top." +#~ msgstr " nuly) se dostane na vrchol." + +#~ msgid "-N Rotates the stack so that the Nth directory (counting" +#~ msgstr "-N Zrotuje zásobník tak, že N. adresář (počítáno" + +#~ msgid " from the right of the list shown by `dirs', starting with" +#~ msgstr " zprava seznamu, který by ukázal „dirs“, počínaje od" + +#~ msgid "-n suppress the normal change of directory when adding directories" +#~ msgstr "" +#~ "-n potlačí obvyklou změnu pracovního adresáře při přidávání adresářů" + +#~ msgid " to the stack, so only the stack is manipulated." +#~ msgstr " na zásobník, takže se změní jen obsah zásobníku." + +#~ msgid "dir adds DIR to the directory stack at the top, making it the" +#~ msgstr "adr přidá ADR na vrchol zásobníku adresářů a učiní jej" + +#~ msgid " new current working directory." +#~ msgstr " novým pracovním adresářem." + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "Zásobník adresářů si lze prohlédnout příkazem „dirs“." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Odstraní položky ze zásobníku adresářů. Bez argumentů" + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "odstraní adresář z vrcholu zásobníku a přepne se do nového" + +#~ msgid "+N removes the Nth entry counting from the left of the list" +#~ msgstr "+N odstraní N. položku počítáno zleva na seznamu," + +#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr " který by ukázal „dirs“, počínaje nulou. Například „popd +0“" + +#~ msgid " removes the first directory, `popd +1' the second." +#~ msgstr " odstraní první adresář, „popd +1“ druhý." + +#~ msgid "-N removes the Nth entry counting from the right of the list" +#~ msgstr "-N odstraní N. položku počítáno zprava na seznamu," + +#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr " který by ukázal „dirs“, počínaje nulou. Například: „popd -0“" + +#~ msgid " removes the last directory, `popd -1' the next to last." +#~ msgstr " odstraní poslední adresář, “popd -1“ předposlední." + +#~ msgid "" +#~ "-n suppress the normal change of directory when removing directories" +#~ msgstr "" +#~ "-n potlačí obvyklou změnu pracovního adresáře při odebírání adresářů" + +#~ msgid " from the stack, so only the stack is manipulated." +#~ msgstr " ze zásobníku, takže pouze zásobník dozná změny." + +#~ msgid "allocated" +#~ msgstr "alokováno" + +#~ msgid "freed" +#~ msgstr "uvolněno" + +#~ msgid "requesting resize" +#~ msgstr "požadující velikost" + +#~ msgid "just resized" +#~ msgstr "právě změněna velikost" + +#~ msgid "bug: unknown operation" +#~ msgstr "chyba: neznámá operace" + +#~ msgid "malloc: watch alert: %p %s " +#~ msgstr "malloc: výstraha sledování: %p %s" + +#~ msgid "" +#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n" +#~ " break N levels." +#~ msgstr "" +#~ "Ukončí smyčku FOR, WHILE nebo UNTIL. Je-li zadáno N, ukončí N úrovní." + +#~ msgid "" +#~ "Run a shell builtin. This is useful when you wish to rename a\n" +#~ " shell builtin to be a function, but need the functionality of the\n" +#~ " builtin within the function itself." +#~ msgstr "" +#~ "Spustí vestavěný příkaz shellu. Toto se hodí, přejete-li si přejmenovat\n" +#~ " vestavěný příkaz na funkci, avšak funkcionalitu vestavěného příkazu\n" +#~ " potřebujete v téže funkci." + +#~ msgid "" +#~ "Print the current working directory. With the -P option, pwd prints\n" +#~ " the physical directory, without any symbolic links; the -L option\n" +#~ " makes pwd follow symbolic links." +#~ msgstr "" +#~ "Vypíše současný pracovní adresář. S přepínačem -P vypíše pwd fyzický\n" +#~ " adresář prostý všech symbolický odkazů; přepínač -L přinutí pwd\n" +#~ " následovat symbolické odkazy." + +#~ msgid "Return a successful result." +#~ msgstr "Vrací výsledek úspěchu." + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n" +#~ " function called `ls', and you wish to call the command `ls', you can\n" +#~ " say \"command ls\". If the -p option is given, a default value is " +#~ "used\n" +#~ " for PATH that is guaranteed to find all of the standard utilities. " +#~ "If\n" +#~ " the -V or -v option is given, a string is printed describing " +#~ "COMMAND.\n" +#~ " The -V option produces a more verbose description." +#~ msgstr "" +#~ "Spustí PŘÍKAZ s ARGUMENTY ignoruje funkce shellu. Máte-li shellovou\n" +#~ " funkci pojmenovanou „ls“, a chcete-li zavolat příkaz „ls“, použijte\n" +#~ " „command ls“. Je-li zadán přepínač -p, bude pro PATH použita " +#~ "implicitní\n" +#~ " hodnota, která zaručuje, že budou nalezeny všechny standardní " +#~ "nástroje.\n" +#~ " Je-li zadán přepínač -V nebo -v, bude vytištěn řetězec popisující " +#~ "PŘÍKAZ.\n" +#~ " Přepínač -V produkuje podrobnější popis." + +#~ msgid "" +#~ "Declare variables and/or give them attributes. If no NAMEs are\n" +#~ " given, then display the values of variables instead. The -p option\n" +#~ " will display the attributes and values of each NAME.\n" +#~ " \n" +#~ " The flags are:\n" +#~ " \n" +#~ " -a\tto make NAMEs arrays (if supported)\n" +#~ " -f\tto select from among function names only\n" +#~ " -F\tto display function names (and line number and source file name " +#~ "if\n" +#~ " \tdebugging) without definitions\n" +#~ " -i\tto make NAMEs have the `integer' attribute\n" +#~ " -r\tto make NAMEs readonly\n" +#~ " -t\tto make NAMEs have the `trace' attribute\n" +#~ " -x\tto make NAMEs export\n" +#~ " \n" +#~ " Variables with the integer attribute have arithmetic evaluation (see\n" +#~ " `let') done when the variable is assigned to.\n" +#~ " \n" +#~ " When displaying values of variables, -f displays a function's name\n" +#~ " and definition. The -F option restricts the display to function\n" +#~ " name only.\n" +#~ " \n" +#~ " Using `+' instead of `-' turns off the given attribute instead. " +#~ "When\n" +#~ " used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "" +#~ "Deklaruje proměnné a/nebo jim nastaví atributy. Nejsou-li zadány NÁZVY,\n" +#~ " tak místo toho zobrazí hodnoty proměnných. Přepínač -p zobrazí " +#~ "atributy\n" +#~ " a hodnoty pro každý NÁZEV.\n" +#~ " \n" +#~ " Příznaky jsou:\n" +#~ " \n" +#~ " -a\tučiní NÁZVY poli (je-li podporováno)\n" +#~ " -f\tvybírá pouze mezi názvy funkcí\n" +#~ " -F\tzobrazí názvy funkcí (a číslo řádku a název zdrojového " +#~ "souboru,\n" +#~ " \tje-li zapnuto ladění) bez definic\n" +#~ " -i\tpřiřadí NÁZVŮM atribut „integer“ (číslo)\n" +#~ " -r\tučiní NÁZVY jen pro čtení\n" +#~ " -t\tpřiřadí NÁZVŮM atribut „trace“ (sledování)\n" +#~ " -x\tvyexportuje NÁZVY\n" +#~ " \n" +#~ " Proměnné s atributem integer jsou aritmeticky vyhodnoceny (vizte " +#~ "„let“),\n" +#~ " když je do proměnné přiřazováno.\n" +#~ " \n" +#~ " Při zobrazování hodnot proměnných -f zobrazí názvy a definice " +#~ "funkcí.\n" +#~ " Přepínač -F omezí výpis jen na názvy funkcí.\n" +#~ " \n" +#~ " Pomocí „+“ namísto „-“ daný atribut odeberete. Je-li použito uvnitř\n" +#~ " funkce, učiní NÁZVY lokální stejně jako příkaz „local“." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Zastaralé. Vizte „declare“." + +#~ msgid "" +#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n" +#~ " can only be used within a function; it makes the variable NAME\n" +#~ " have a visible scope restricted to that function and its children." +#~ msgstr "" +#~ "Vytvoří lokální proměnnou pojmenovanou NÁZEV a přiřadí jí HODNOTU.\n" +#~ " LOCAL smí být použito jen uvnitř funkcí. Učiní proměnnou NÁZEV " +#~ "viditelnou\n" +#~ " jen v dané funkci a jejích potomcích." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "Vypíše ARGUMENTY. Je-li zadáni -n, závěrečný konec řádku bude potlačen." + +#~ msgid "" +#~ "Enable and disable builtin shell commands. This allows\n" +#~ " you to use a disk command which has the same name as a shell\n" +#~ " builtin without specifying a full pathname. If -n is used, the\n" +#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n" +#~ " to use the `test' found in $PATH instead of the shell builtin\n" +#~ " version, type `enable -n test'. On systems supporting dynamic\n" +#~ " loading, the -f option may be used to load new builtins from the\n" +#~ " shared object FILENAME. The -d option will delete a builtin\n" +#~ " previously loaded with -f. If no non-option names are given, or\n" +#~ " the -p option is supplied, a list of builtins is printed. The\n" +#~ " -a option means to print every builtin with an indication of whether\n" +#~ " or not it is enabled. The -s option restricts the output to the " +#~ "POSIX.2\n" +#~ " `special' builtins. The -n option displays a list of all disabled " +#~ "builtins." +#~ msgstr "" +#~ "Povolí nebo zakáže vestavěný příkaz shellu. To vám umožňuje použít\n" +#~ " příkaz z disku, který má stejné jméno jako vestavěný příkaz shellu, " +#~ "aniž\n" +#~ " byste museli zadávat celou cestu. Je-li použito -n, NÁZVY se stanou\n" +#~ " zakázanými, jinak budou povoleny. Například „test“ z PATH namísto " +#~ "verze\n" +#~ " vestavěné do shellu lze používat tak, že napíšete „enable -n test“. " +#~ "Na\n" +#~ " systémech podporujících dynamické zavádění přepínač -f může být " +#~ "použit\n" +#~ " pro zavedení nových vestavěných příkazů ze sdíleného objektu " +#~ "NÁZEV_SOUBORU.\n" +#~ " Přepínač -d odstraní vestavěný příkaz zavedený přes -f. Není-li " +#~ "zadán\n" +#~ " žádný přepínač nebo je-li zadán přepínač -p, bude vypsán seznam " +#~ "vestavěných\n" +#~ " příkazů. Přepínač -a znamená, že budou vypsány všechny vestavěné " +#~ "příkazy a\n" +#~ " u každého bude vyznačeno, zda je povolen nebo zakázán. Přepínač -s " +#~ "omezí\n" +#~ " výpis na příkazy uvedené v POSIX.2. Přepínač -n zobrazí seznam všech\n" +#~ " zakázaných vestavěných příkazů." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "Načte ARGUMENTY jako vstup shellu a výsledný příkaz(y) provede." + +#~ msgid "" +#~ "Exec FILE, replacing this shell with the specified program.\n" +#~ " If FILE is not specified, the redirections take effect in this\n" +#~ " shell. If the first argument is `-l', then place a dash in the\n" +#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n" +#~ " is supplied, FILE is executed with a null environment. The `-a'\n" +#~ " option means to make set argv[0] of the executed process to NAME.\n" +#~ " If the file cannot be executed and the shell is not interactive,\n" +#~ " then the shell exits, unless the shell option `execfail' is set." +#~ msgstr "" +#~ "Provede SOUBOR, přičemž nahradí tento shell zadaným programem.\n" +#~ " Není-li SOUBOR zadán, přesměrování zapůsobí v tomto shellu. Je-li " +#~ "prvním\n" +#~ " argumentem „-l“, bude do nultého argumentu SOUBORU umístěna pomlčka " +#~ "tak,\n" +#~ " jak to dělá login. Je-li zadán přepínač „-c“, bude SOUBOR spuštěn\n" +#~ " s prázdným prostředím. Přepínač „-a“ znamená, že argv[0] prováděného\n" +#~ " procesu bude nastaven na NÁZEV. Pokud soubor nemůže být proveden a " +#~ "shell\n" +#~ " není interaktivní, pak shell bude ukončen, pokud přepínač shellu\n" +#~ " „execfail“ není nastaven." + +#~ msgid "Logout of a login shell." +#~ msgstr "Odhlásí z přihlašovacího (login) shellu." + +#~ msgid "" +#~ "For each NAME, the full pathname of the command is determined and\n" +#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n" +#~ " full pathname of NAME, and no path search is performed. The -r\n" +#~ " option causes the shell to forget all remembered locations. The -d\n" +#~ " option causes the shell to forget the remembered location of each " +#~ "NAME.\n" +#~ " If the -t option is supplied the full pathname to which each NAME\n" +#~ " corresponds is printed. If multiple NAME arguments are supplied " +#~ "with\n" +#~ " -t, the NAME is printed before the hashed full pathname. The -l " +#~ "option\n" +#~ " causes output to be displayed in a format that may be reused as " +#~ "input.\n" +#~ " If no arguments are given, information about remembered commands is " +#~ "displayed." +#~ msgstr "" +#~ "Pro každý NÁZEV je určena plná cesta k příkazu a je zapamatována.\n" +#~ " Za použití přepínače -p se vezme NÁZEV_CESTY za plnou cestu k NÁZVU " +#~ "a\n" +#~ " žádné vyhledávání cesty se nekoná. Přepínač -r způsobí, že shell " +#~ "zapomene\n" +#~ " všechny zapamatovaná umístění. Přepínač -d způsobí, že shell " +#~ "zapomene\n" +#~ " zapamatovaná umístění každého NÁZVU. Je-li zadán přepínač -t, bude " +#~ "vypsána\n" +#~ " plná cesta ke každému NÁZVU. Je-li s -t zadáno více NÁZVŮ, NÁZEV " +#~ "bude\n" +#~ " vypsán před uloženou celou cestou. Přepínač -l vytvoří takový " +#~ "výstup,\n" +#~ " který lze opět použít jako vstup. Nejsou-li zadány žádné argumenty,\n" +#~ " budou vypsány informace o zapamatovaných příkazech." + +#~ msgid "" +#~ "Display helpful information about builtin commands. If PATTERN is\n" +#~ " specified, gives detailed help on all commands matching PATTERN,\n" +#~ " otherwise a list of the builtins is printed. The -s option\n" +#~ " restricts the output for each builtin command matching PATTERN to\n" +#~ " a short usage synopsis." +#~ msgstr "" +#~ "Zobrazí užitečné informace o vestavěných příkazech. Je-li zadán VZOREK,\n" +#~ " vrátí podrobnou nápovědu ke všem příkazům odpovídajícím VZORKU, jinak " +#~ "je\n" +#~ " vytištěn seznam vestavěných příkazů. Přepínač -s omezí výstup " +#~ "o každém\n" +#~ " vestavěném příkazu odpovídajícího VZORKU na stručný popis použití." + +#~ msgid "" +#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n" +#~ " If the -h option is given, the job is not removed from the table, but " +#~ "is\n" +#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n" +#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove " +#~ "all\n" +#~ " jobs from the job table; the -r option means to remove only running " +#~ "jobs." +#~ msgstr "" +#~ "Implicitně odstraní každý argument ÚLOHA z tabulky aktivních úloh. Je-li\n" +#~ " zadán přepínač -h, úloha není odstraněna z tabulky, ale je označena " +#~ "tak.\n" +#~ " že úloze nebude zaslán SIGHUP, když shell obdrží SIGHUP. Přepínač -" +#~ "a,\n" +#~ " pokud není uvedena ÚLOHA, znamená, že všechny úlohy budou odstraněny\n" +#~ " z tabulky úloh. Přepínač -r znamená, že pouze běžící úlohy budou\n" +#~ " odstraněny." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N\n" +#~ " is omitted, the return status is that of the last command." +#~ msgstr "" +#~ "Způsobí ukončení funkce s návratovou hodnotou uvedenou v N. Je-li\n" +#~ " N vynecháno, návratový kód je roven poslednímu příkazu." + +#~ msgid "" +#~ "For each NAME, remove the corresponding variable or function. Given\n" +#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n" +#~ " unset will only act on functions. With neither flag, unset first\n" +#~ " tries to unset a variable, and if that fails, then tries to unset a\n" +#~ " function. Some variables cannot be unset; also see readonly." +#~ msgstr "" +#~ "Pro každé JMÉNO odstraní odpovídající proměnnou nebo funkci.\n" +#~ " Spolu s „-v“ bude unset fungovat jen na proměnné. S příznakem „-f“ " +#~ "bude\n" +#~ " unset fungovat jen na funkce. Bez těchto dvou příznaků unset nejprve " +#~ "zkusí\n" +#~ " zrušit proměnnou a pokud toto selže, tak zkusí zrušit funkci. " +#~ "Některé\n" +#~ " proměnné nelze odstranit. Taktéž vizte příkaz „readonly“." + +#~ msgid "" +#~ "NAMEs are marked for automatic export to the environment of\n" +#~ " subsequently executed commands. If the -f option is given,\n" +#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n" +#~ " is given, a list of all names that are exported in this shell is\n" +#~ " printed. An argument of `-n' says to remove the export property\n" +#~ " from subsequent NAMEs. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "NÁZVY jsou označeny pro automatické exportování do prostředí následně\n" +#~ " prováděných příkazů. Je-li zadán přepínač -f, NÁZVY se vztahují " +#~ "k funkcím.\n" +#~ " Nejsou-li zadány žádné NÁZVY nebo je-li zadáno „-p“, bude vytištěn " +#~ "seznam\n" +#~ " všech názvů, které jsou v tomto shellu exportovány. Argument „-n“ " +#~ "nařizuje\n" +#~ " odstranit vlastnost exportovat z následujících NÁZVŮ. Argument „--“\n" +#~ " zakazuje zpracování dalších přepínačů." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n" +#~ " not be changed by subsequent assignment. If the -f option is given,\n" +#~ " then functions corresponding to the NAMEs are so marked. If no\n" +#~ " arguments are given, or if `-p' is given, a list of all readonly " +#~ "names\n" +#~ " is printed. The `-a' option means to treat each NAME as\n" +#~ " an array variable. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "Zadané NÁZVY budou označeny jako jen pro čtení a hodnoty těchto NÁZVŮ\n" +#~ " nebude možné změnit následným přiřazením. Je-li zadán přepínač -f, " +#~ "pak\n" +#~ " funkce těchto NÁZVŮ budou takto označeny. Nejsou-li zadány žádné " +#~ "argumenty\n" +#~ " nebo je-li zadáno „-p“, bude vytištěn seznam všech jmen jen pro " +#~ "čtení.\n" +#~ " Přepínač „-a“ znamená, že s každým NÁZVEM bude zacházeno jako " +#~ "s proměnnou\n" +#~ " typu pole. Argument „--“ zakáže zpracování dalších přepínačů." + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n" +#~ " not given, it is assumed to be 1." +#~ msgstr "" +#~ "Poziční parametry budou přejmenovány z $N+1 na $1 atd. Není-li N zadáno,\n" +#~ " předpokládá se 1." + +#~ msgid "" +#~ "Suspend the execution of this shell until it receives a SIGCONT\n" +#~ " signal. The `-f' if specified says not to complain about this\n" +#~ " being a login shell if it is; just suspend anyway." +#~ msgstr "" +#~ "Pozastaví provádění tohoto shellu do doby, něž bude obdržen signál\n" +#~ " SIGCONT. „-f“, je-li zadán, potlačí stížnost na to, že se jedná\n" +#~ " o přihlašovací shell (pokud tomu tak je), a prostě pozastaví činnost." + +#~ msgid "" +#~ "Print the accumulated user and system times for processes run from\n" +#~ " the shell." +#~ msgstr "" +#~ "Vypíše celkovou dobu procesu spuštěného z shellu, kterou strávil\n" +#~ " v uživatelském a jaderném (system) prostoru." + +#~ msgid "" +#~ "For each NAME, indicate how it would be interpreted if used as a\n" +#~ " command name.\n" +#~ " \n" +#~ " If the -t option is used, `type' outputs a single word which is one " +#~ "of\n" +#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is " +#~ "an\n" +#~ " alias, shell reserved word, shell function, shell builtin, disk " +#~ "file,\n" +#~ " or unfound, respectively.\n" +#~ " \n" +#~ " If the -p flag is used, `type' either returns the name of the disk\n" +#~ " file that would be executed, or nothing if `type -t NAME' would not\n" +#~ " return `file'.\n" +#~ " \n" +#~ " If the -a flag is used, `type' displays all of the places that " +#~ "contain\n" +#~ " an executable named `file'. This includes aliases, builtins, and\n" +#~ " functions, if and only if the -p flag is not also used.\n" +#~ " \n" +#~ " The -f flag suppresses shell function lookup.\n" +#~ " \n" +#~ " The -P flag forces a PATH search for each NAME, even if it is an " +#~ "alias,\n" +#~ " builtin, or function, and returns the name of the disk file that " +#~ "would\n" +#~ " be executed." +#~ msgstr "" +#~ "O každém NÁZVU řekne, jak by byl interpretován, kdyby byl použit jako\n" +#~ " název příkazu.\n" +#~ " \n" +#~ " Je-li použit přepínač -t, „type“ vypíše jedno slovo z těchto: " +#~ "„alias“,\n" +#~ " „keyword“, „function“, „builtin“, „file“ nebo „“, je-li NÁZEV alias,\n" +#~ " klíčové slovo shellu, shellová funkce, vestavěný příkaz shellu, " +#~ "soubor\n" +#~ " na disku nebo nenalezený soubor.\n" +#~ " \n" +#~ " Je-li použit přepínač -p, „type“ buď vrátí jméno souboru na disku, " +#~ "který\n" +#~ " by byl spuštěn, nebo nic, pokud „type -t NÁZEV“ by nevrátil „file“.\n" +#~ " \n" +#~ " Je-li použit přepínač -a, „type“ zobrazí všechna místa, kde se " +#~ "nalézá\n" +#~ " spustitelný program pojmenovaný „soubor“. To zahrnuje aliasy, " +#~ "vestavěné\n" +#~ " příkazy a funkce jen a pouze tehdy, když není rovněž použit přepínač -" +#~ "p.\n" +#~ " \n" +#~ " Přepínač -f potlačí hledání mezi funkcemi shellu.\n" +#~ " \n" +#~ " Přepínač -P vynutí prohledání PATH na každý NÁZEV, dokonce i když se\n" +#~ " jedná o alias, vestavěný příkaz nebo funkci, a vrátí název souboru " +#~ "na\n" +#~ " disku, který by byl spuštěn." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n" +#~ " `-S' is supplied, the current value of the mask is printed. The `-" +#~ "S'\n" +#~ " option makes the output symbolic; otherwise an octal number is " +#~ "output.\n" +#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n" +#~ " that may be used as input. If MODE begins with a digit, it is\n" +#~ " interpreted as an octal number, otherwise it is a symbolic mode " +#~ "string\n" +#~ " like that accepted by chmod(1)." +#~ msgstr "" +#~ "Uživatelská maska práv vytvářených souborů je nastavena na MÓD. Je-li\n" +#~ " MÓD vynechán nebo je-li uvedeno „-S“, bude vytištěna současná " +#~ "hodnota\n" +#~ " masky. Přepínač „-S“ učiní výstup symbolický, jinak bude výstupem\n" +#~ " osmičkové číslo. Je-li zadáno „-p“ a MÓD je vynechán, bude výstup ve\n" +#~ " formátu, který lze použít jako vstup. Začíná-li MÓD číslicí, bude\n" +#~ " interpretován jako osmičkové číslo, jinak jako řetězec symbolického " +#~ "zápisu\n" +#~ " práv tak, jak jej chápe chmod(1)." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If\n" +#~ " N is not given, all currently active child processes are waited for,\n" +#~ " and the return code is zero. N is a process ID; if it is not given,\n" +#~ " all child processes of the shell are waited for." +#~ msgstr "" +#~ "Počká na zadaný proces a nahlásí jeho návratový kód. Není-li N zadáno,\n" +#~ " bude se čekat na všechny právě aktivní procesy potomků a návratová " +#~ "hodnota\n" +#~ " bude nula. N je ID procesu. Není-li zadáno, bude se čekat na všechny\n" +#~ " procesy potomků tohoto shellu." + +#~ msgid "" +#~ "Create a simple command invoked by NAME which runs COMMANDS.\n" +#~ " Arguments on the command line along with NAME are passed to the\n" +#~ " function as $0 .. $n." +#~ msgstr "" +#~ "Vytvoří jednoduchý příkaz volaný JMÉNEM, který spustí PŘÍKAZY. Argumenty\n" +#~ " z příkazové řádky spolu se JMÉNEM budou předány do funkce jako $0…$n." + +#~ msgid "" +#~ "Toggle the values of variables controlling optional behavior.\n" +#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n" +#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n" +#~ " status indicates whether each OPTNAME is set or unset. The -o\n" +#~ " option restricts the OPTNAMEs to those defined for use with\n" +#~ " `set -o'. With no options, or with the -p option, a list of all\n" +#~ " settable options is displayed, with an indication of whether or\n" +#~ " not each is set." +#~ msgstr "" +#~ "Přepne hodnoty proměnných řídící volitelné chování. Přepínač -s znamená,\n" +#~ " že se každý NÁZEV_VOLBY zapne (nastaví). Přepínač -u každý " +#~ "NÁZEV_VOLBY\n" +#~ " vypne. Přepínač -q potlačí výstup. Zda je nebo není nastaven každý\n" +#~ " NÁZEV_VOLBY, indikuje návratový kód. Přepínač -o omezí NÁZVY_VOLEB na " +#~ "ty,\n" +#~ " které jsou definovány pro použití s „set -o“. Bez přepínačů nebo\n" +#~ " s přepínačem -p je zobrazen seznam všech nastavitelných voleb včetně\n" +#~ " indikace, zda je každá nastavena." + +#~ msgid "" +#~ "For each NAME, specify how arguments are to be completed.\n" +#~ " If the -p option is supplied, or if no options are supplied, " +#~ "existing\n" +#~ " completion specifications are printed in a way that allows them to " +#~ "be\n" +#~ " reused as input. The -r option removes a completion specification " +#~ "for\n" +#~ " each NAME, or, if no NAMEs are supplied, all completion " +#~ "specifications." +#~ msgstr "" +#~ "U každého NÁZVU sdělí, jak budou argumenty doplněny. Je-li zadán\n" +#~ " přepínač -p nebo není-li zadán přepínač žádný, budou existující " +#~ "definice\n" +#~ " doplňování vytištěny tak. že je bude možné znovu použít jako vstup.\n" +#~ " Přepínač -r odstraní definici doplnění pro každý NÁZEV nebo chybí-li " +#~ "NÁZVY,\n" +#~ " odstraní všechny definice." diff --git a/bash-5.1/po/da.gmo b/bash-5.1/po/da.gmo new file mode 100644 index 0000000000000000000000000000000000000000..44572c77b2362e24f7e3791e79a5a093951b4fae Binary files /dev/null and b/bash-5.1/po/da.gmo differ diff --git a/bash-5.1/po/da.po b/bash-5.1/po/da.po new file mode 100644 index 0000000000000000000000000000000000000000..09b2cf64fb70b100f77c68b3f3b75d6d022011c0 --- /dev/null +++ b/bash-5.1/po/da.po @@ -0,0 +1,6073 @@ +# Danish translation of bash. +# Copyright (C) 2008 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Kenneth Nielsen , 2009-2011. +# +# Oversættelseskonventioner: +# keymap -> tastetildeling +# child -> underproces +# +msgid "" +msgstr "" +"Project-Id-Version: bash 4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2011-03-18 01:36+0100\n" +"Last-Translator: Kenneth Nielsen \n" +"Language-Team: Danish \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +# Den er jeg altså ikke helt sikker på +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "ugyldigt arrayindeks" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: kan ikke konvertere indekseret til associativt array" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: ugyldig nøgle til associativt array" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: kan ikke tildele til ikkenumerisk indeks" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: et indeks skal bruges ved tildeling til associativt array" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: kan ikke oprette %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: kan ikke finde tastetildeling for kommando" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: første ikke-blank-tegn er ikke '\"'" + +# Kønnet her er et gæt, hvis det er parenteser eller anførselstegn passer det +# FEJLRAPPORT +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "ingen afsluttende \"%c\" i %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: manglende kolonseparator" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "\"%s\": kan ikke løsne" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, fuzzy, c-format +msgid "`%s': invalid alias name" +msgstr "\"%s\": ugyldigt tastetildelingsnavn" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "linjeredigering ikke slået til" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "\"%s\": ugyldigt tastetildelingsnavn" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: kan ikke læse: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "\"%s\": ukendt funktionsnavn" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s er ikke bundet til nogen taster.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s kan kaldes via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "\"%s\": kan ikke løsne" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "løkketæller" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "kun meningsfuld i en \"for\"-, \"while\"- eller \"until\"-løkke" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Returnerer konteksten af det nuværende underrutinekald.\n" +"\n" +" Uden UDTRYK returneres \"$line $filename\". Med UDTRYK returneres\n" +" \"$line $subroutine $filename\". Den ekstra information\n" +" kan bruges til at give at stakspor.\n" +"\n" +" Værdien af UDTRYK angiver hvor mange kalderammer der skal gås tilbage\n" +" fra den nuværende. Toprammen er ramme 0.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 0 med mindre skallen ikke eksekverer en skalfunktion eller " +"hvis\n" +" UDTRYK er ugyldigt." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME ikke indstillet" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "for mange argumenter" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "ingen anden mappe" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD ikke indstillet" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linje %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "advarsel: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: brug: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: tilvalg kræver et argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: numerisk argument påkrævet" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: ikke fundet" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: ugyldigt tilvalg" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: ugyldigt tilvalgsnavn" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "\"%s\": ikke et gyldigt identificeringsnavn" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "ugyldigt oktaltal" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "ugyldigt heksadecimalt tal" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "ugyldigt tal" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: ugyldig signalspecifikation" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "\"%s\": ikke en pid eller gyldig job-spec" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: skrivebeskyttet variabel" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s udenfor rækkevidde" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s udenfor rækkevidde" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: intet sådant job" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: ingen jobkontrol" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "ingen jobkontrol" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: begrænset" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "begrænset" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ikke indbygget i skallen" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "skrivefejl: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "fejl ved indstilling af terminalattribut: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "fejl ved indhentning af terminalattribut: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: fejl ved indhentning af nuværende mappe: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: tvetydig job-spec" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: kan ikke fjerne: skrivebeskyttet %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: kan ikke fjerne" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: ugyldigt handlingsnavn" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: ingen fuldførselsspecifikation" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "advarsel: tilvalget -F vil måske ikke virke, som du forventer" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "advarsel: tilvalget -C vil måske ikke virke, som du forventer" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "ikke i gang med at eksekvere fuldførelsesfunktion" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "kan kun bruges i en funktion" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": ugyldigt tastetildelingsnavn" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "kan ikke bruge \"-f\" til at lave funktioner" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: skrivebeskyttet funktion" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: kan ikke destruere arrayvariabel på denne måde" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: kan ikke konvertere associativt til indekseret array" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamisk indlæsning ikke tilgængelig" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "kan ikke åbne delt objekt %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "kan ikke finde %s i delt objekt %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: ikke dynamisk indlæst" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: ikke dynamisk indlæst" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: kan ikke slette: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: er en mappe" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ikke en regulær fil" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: fil er for stor" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: kan ikke eksekvere binær fil" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: kan ikke eksekvere: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "log ud\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ikke en logind-skal: brug \"exit\"" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Der er stoppede job.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Der er kørende job.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "ingen kommando fundet" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "historikspecifikation" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: kan ikke åbne midl. fil: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "nuværende" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "job %d startet uden jobkontrol" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ugyldigt tilvalg -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: et argument er påkrævet til tilvalget -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing slået fra" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hash-tabel tom\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tkommando\n" + +# Jeg antager at det sidste ` er det første af et sæt af anførselstegn og +# det er derfor oversat til " +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Skalkommandoer som matcher nøgleordet \"" +msgstr[1] "Skal-kommandoer som matcher nøgleordene \"" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"ingen hjælpeemner matcher \"%s\". Prøv \"help help\" eller \"man -k %s\" " +"eller \"info %s\"." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: kan ikke åbne: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Disse skalkommandoer er defineret internt. Skriv \"help\" for at se denne " +"liste.\n" +"Skriv \"help navn\" for at finde ud af mere om kommandoen \"navn\".\n" +"Brug \"info bash\" for at få mere generel information om skallen.\n" +"Brug \"man -k\" eller \"info\" for at finde ud af mere om kommandoer som " +"ikke er \n" +"på listen.\n" +"\n" +"En stjerne (*) ved siden af et navn betyder at kommandoen er slået fra.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "kan ikke bruge mere end en af -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "historikposition" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: ugyldigt tilvalgsnavn" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: historikudvidelse fejlede" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib fejlede" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "ingen andre tilvalg er tilladt sammen med \"-x\"" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenter skal være processer eller job-id'er" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Ukendt fejl" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "forventede et udtryk" + +#: builtins/mapfile.def:178 +#, fuzzy, c-format +msgid "%s: not an indexed array" +msgstr "%s: ikke en arrayvariabel" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: ugyldig filbeskrivelsesspecifikation" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: ugyldig filbeskrivelse: %s" + +# -c Specify the number of lines read between each call to callback. +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: ugyldigt antal linjer" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: ugyldig array-startindeks" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: ugyldigt tilbagekaldskvantum" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "tomt arrayvariabelnavn" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "understøttelse af arrayvariabel påkrævet" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "\"%s\": manglende formattegn" + +#: builtins/printf.def:474 +#, fuzzy, c-format +msgid "`%c': invalid time format specification" +msgstr "%s: ugyldig specifikation af tidsudløb" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "\"%c\": ugyldigt formattegn" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "advarsel: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "manglende heksciffer for \\x" + +#: builtins/printf.def:900 +#, fuzzy, c-format +msgid "missing unicode digit for \\%c" +msgstr "manglende heksciffer for \\x" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "ingen anden mappe" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: ugyldigt grænseargument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "mappestak tom" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "mappestakindeks" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Viser listen af huskede mapper. Mapper tilføjes til listen med\n" +" \"pushd\"-kommandoen. Du kan komme tilbage i listen med \"popd\"-\n" +" kommandoen.\n" +"\n" +" Valgmuligheder:\n" +" -c\tryd mappestakken ved at slette alle elementerne\n" +" -l\tvis ikke \"tildepræfiksede\" versioner af mapper relativt\n" +" til din hjemmemappe\n" +" -p\tvis mappestakken med et element per linje\n" +" -v\tvis mappestakken med et element per linje, præfikset med\n" +" med dets position i stakken\n" +" \n" +" Argumenter:\n" +" +N\tViser det N'te element, talt fra venstre af og vist mappevis\n" +" når der ikke angives nogle valgmuligheder, startende fra 0.\n" +" \n" +" -N\tViser det N'te element, talt fra venstre af og vist mappevis\n" +" når der ikke angives nogle valgmuligheder, startende fra 0." + +# Jeg tror der er en fejl i den engelske, fejlrapport +#: builtins/pushd.def:723 +#, fuzzy +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Tilføjer en mappe til toppen af mappestakken, eller roterer stakken\n" +" således at den nye top bliver den aktuelle mappe. Uden\n" +" argumenter ombyttes de to øverste mapper.\n" +" \n" +" Valgmuligheder:\n" +" -n\tUndertrykker det normale mappeskift ved tilføjelse\n" +" \taf mapper til stakken, således at kun stakken manipuleres.\n" +" \n" +" Argumenter:\n" +" +N\tRoterer stakken således at det N'te element (talt\n" +" \tfra venstre af listen som vist af \"dirs\", startende med nul)\n" +" \tbliver placeret i toppen.\n" +" \n" +" -N\tRoterer stakken således at det N'te element (talt\n" +" \tfra højre af listen som vist af \"dirs\", startende med nul)\n" +" \tbliver placeret i toppen.\n" +" \n" +" dir\tTilføjer DIR til toppen af mappestakken, således at den\n" +" \tbliver den nye aktive mappe.\n" +" \n" +"Den indbyggede funktion \"dirs\" viser mappestakken." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Fjerner en mappe fra toppen af mappestakken. Uden argumenter fjernes\n" +" den øverste mappe fra stakken og der skiftes til den nye øverste mappe.\n" +" \n" +" Valgmuligheder:\n" +" -n\tUndertrykker det normale mappeskift ved fjernelse\n" +" \taf mapper fra stakken, således at kun stakken manipuleres.\n" +" \n" +" Argumenter:\n" +" +N\tFjerner det N'te element, talt fra venstre af listen\n" +" \tsom vist af \"dirs\", startende med nul. F.eks: vil \"popd +0\"\n" +" \tfjerne det øverste argument og \"popd +1\" det andet.\n" +" \n" +" -N\tFjerner det N'te element, talt fra højre af listen\n" +" \tsom vist af \"dirs\", startende med nul. F.eks: vil \"popd -0\"\n" +" \tfjerne det sidste argument og \"popd -1\" det andetsidste.\n" +" \n" +"Den indbyggede funktion \"dirs\" viser mappestakken." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: ugyldig specifikation af tidsudløb" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "læsefejl: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "kan kun udføre \"return\" fra en funktion eller indlæst skript" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "kan ikke fjerne en funktion og en variabel samtidig" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ikke en arrayvariabel" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ikke en funktion" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: kan ikke fjerne" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "skifttæller" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "kan ikke indstille og fjerne skaltilvalg samtidig" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: ugyldigt navn for skaltilvalg" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "filnavnsargument påkrævet" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: fil ikke fundet" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "kan ikke sætte i hvile" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "kan ikke sætte en logindskal i hvile" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s er aliasset til \"%s\"\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s er et skalnøgleord\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s er en funktion\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s er indbygget i skallen\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s er indbygget i skallen\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s er %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s er hashet (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: ugyldigt grænseargument" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "\"%c\": ugyldig kommando" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: kan ikke indhente grænse: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "grænse" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: kan ikke modificere grænse: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktalt tal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "\"%c\": ugyldig symbolsk tilstandsoperator" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "\"%c\": ugyldigt symbolsk tilstandstegn" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " linje " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "sidste kommando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Afbryder..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "ukendt kommandofejl" + +#: error.c:463 +msgid "bad command type" +msgstr "ugyldig kommandotype" + +#: error.c:464 +msgid "bad connector" +msgstr "dårligt mellemled" + +#: error.c:465 +msgid "bad jump" +msgstr "dårligt hop" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: ubundet variabel" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atidsudløb mens der ventedes på input: auto-logud\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "kan ikke videresende standardinput fra /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: \"%c\": ugyldigt formateringstegn" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "datakanalfejl (pipe error)" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: begrænset: kan ikke specificere \"/\" i kommandonavne" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: kommando ikke fundet" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: dårlig fortolker" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: kan ikke eksekvere binær fil" + +#: execute_cmd.c:5977 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s er indbygget i skallen\n" + +# Process Substitution +# Process substitution is supported on systems that support named pipes +# (FIFOs) or the /dev/fd method of naming open files. It takes the form +# of <(list) or >(list). The process list is run with its input or out‐ +# put connected to a FIFO or some file in /dev/fd. The name of this file +# is passed as an argument to the current command as the result of the +# expansion. If the >(list) form is used, writing to the file will pro‐ +# vide input for list. If the <(list) form is used, the file passed as +# an argument should be read to obtain the output of list. +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "kan ikke duplikere fd %d til fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "grænse for rekursion af udtryk overskredet" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "underløb i rekursionsstak" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "syntaksfejl i udtryk" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "forsøgte tildeling til ikke-variabel" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "syntaksfejl i udtryk" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "division med 0" + +# denne her streng er dårlig på så mange måder at det fatter man slet ikke. Skal bug oversætter og hvad er expassign. Jeg laver et bud og har fejlmeldt den +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bug: dårligt expassign-udtryk" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "\":\" forventet for betingede udtryk" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "eksponent mindre end 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "identifikator forventet efter præforøgelse eller -formindskelse" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "manglende \")\"" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntaksfejl: operand forventet" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntaksfejl: ugyldig aritmetisk operator" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (fejlelement er \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "ugyldig aritmetisk grundtal" + +# -c Specify the number of lines read between each call to callback. +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: ugyldigt antal linjer" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "værdi for stor til grundtal" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: fejl i udtryk\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: kan ikke tilgå overliggende mapper" + +# Har ladet nodelay stå, idet jeg gætter på at det er et navn +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "kan ikke nulstille \"nodelay\"-tilstand for fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "kan ikke allokere ny fildeskriptor til bash-input fra fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer eksisterer allerede til ny fd %d" + +# ?? +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp-datakanal (pipe)" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "forgrenet pid %d figurerer i kørende job %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "sletter stoppet job %d med procesgruppe %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) markeret som stadig i live" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: ingen process med det pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Færdig" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Stoppet" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Stoppet(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Kører" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Færdig(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Afslut %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Ukendt status" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(smed kerne) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "underproces setpgid (%ld til %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld er ikke en underproces af denne skal" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Ingen optegnelse af proces %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: job %d er stoppet" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: intet sådant job" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: job er afbrudt" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: job %d er allerede i baggrunden" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: linje %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (smed kerne)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd nu: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp fejlede" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: linjedisciplin" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: linjedisciplin" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "kan ikke indstille terminal-procesgruppe (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "ingen jobkontrol i denne skal" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: forfejlet hævdelse: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: hævdelse forkludret\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "ukendt" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: blok i fri liste tværet ud" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: kaldt med blokargument som allerede er fri" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: kaldt med ikke-allokeret blokargument" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: underløb detekteret, mh_nbytes uden for interval" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underløb detekteret, mh_nbytes uden for interval" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: størrelse på start- og slut-bid afviger" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: kaldt med ikke-allokeret blokargument" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: underløb detekteret, mh_nbytes uden for interval" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underløb detekteret, mh_nbytes uden for interval" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: størrelse på start- og slut-bid afviger" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: alloc-tabel er fyldt med FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p allerede i tabel som allokeret?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p allerede i tabel som fri?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "ugyldig base" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: vært ukendt" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: ugyldig tjeneste" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: dårlig specifikation for netværkssti" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "netværksoperation ikke understøttet" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" + +#: locale.c:292 +#, fuzzy, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "xrealloc: %s:%d: kan ikke allokere %lu bytes" + +#: locale.c:294 +#, fuzzy, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "xrealloc: %s:%d: kan ikke allokere %lu bytes" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Du har post i $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Du har ny post i $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Posten i %s er blevet læst\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "syntaksfejl: aritmetisk udtryk påkrævet" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "syntaksfejl: \";\" uventet" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntaksfejl: \"((%s))\"" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: dårlig instruktionstype %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document ved linje %d er adskilt af slut-på-linje (ønskede \"%s\")" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_direction: videresendelsesinstruktion \"%d\" uden for interval" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "uventet EOF mens der ledtes efter samhørende \"%c\"" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "uventet EOF mens der ledtes efter \"]]\"" + +# word A sequence of characters considered as a single unit by the +# shell. Also known as a token. +# Jeg har valgt udtryk +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntaksfejl i betingelsesudtryk: uventet element \"%s\"" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "syntaksfejl i betingelsesudtryk" + +# word A sequence of characters considered as a single unit by the +# shell. Also known as a token. +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "uventet element \"%s\", forventede \")\"" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "forventede \")\"" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "uventet argument \"%s\" til unær betingelsesoperator" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "uventet argument til unær betingelsesoperator" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "uventet udtryk \"%s\", ventede binær betingelsesoperator" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "ventedet binær betingelsesoperator" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "uventet argument \"%s\" til binær betingelsesoperator" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "uventet argument til binær betingelsesoperator" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "uventet udtryk \"%c\" i betingelseskommando" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "uventet udtryk \"%s\" i betingelseskommando" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "uventet udtryk \"%d\" i betingelseskommando" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntaksfejl nær uventet udtryk \"%s\"" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntaksfejl nær \"%s\"" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "syntaksfejl: uventet slutning på fil" + +#: parse.y:6365 +msgid "syntax error" +msgstr "syntaksfejl" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Brug \"%s\" for at forlade skallen.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "uventet EOF mens der ledtes efter samhørende \")\"" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: funktion \"%s\" ikke fundet" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: dårligt mellemled \"%d\"" + +#: print_cmd.c:375 +#, fuzzy, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "%d: ugyldig filbeskrivelse: %s" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: \"%c\": ugyldigt formateringstegn" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "fil-deskriptor uden for interval" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: tvetydig videresendelse" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: kan ikke overskrive eksisterende fil" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: begrænset: kan ikke videresende output" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "kan ikke danne midlertidig fil til here-dokument: %s" + +#: redir.c:222 +#, fuzzy, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: kan ikke tildele liste til arrayelementer" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/vært/port ikke understøttet uden netværk" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "videresendelsesfejl: kan ikke duplikere fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "kan ikke finde /tmp, opret venligst mappen!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp skal være et gyldigt mappenavn" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: ugyldigt tilvalg" + +# Har ladet nodelay stå, idet jeg gætter på at det er et navn +#: shell.c:1319 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "kan ikke nulstille \"nodelay\"-tilstand for fd %d" + +# Har ladet nodelay stå, idet jeg gætter på at det er et navn +#: shell.c:1330 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "kan ikke nulstille \"nodelay\"-tilstand for fd %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: er en mappe" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Jeg har ikke noget navn!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, version %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Brug:\t%s [langt GNU-tilvalg] [tilvalg] ...\n" +"\t%s [langt GNU-tilvalg] [tilvalg] skript-fil ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Lange GNU-tilvalg:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Skal-tilvalg:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD eller -c kommando eller -O shopt_option\t\t(kun programkald)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\tTilvalg -%s eller -o\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Skriv \"%s -c \"help set\"\" for at få mere information om skaltilvalg.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Skriv \"%s -c help\" for at få mere information om indbyggede " +"skalkommandoer.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Brug kommandoen \"bashbug\" til at rapportere fejl.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: ugyldig handling" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Falsk signal" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Læg på" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Afbryd" + +#: siglist.c:58 +msgid "Quit" +msgstr "Afslut" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Ugyldig instruktion" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT-spor/fang" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT-instruktion" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT-instruktion" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Kommatalsundtagelse" + +#: siglist.c:86 +msgid "Killed" +msgstr "Slået ihjel" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bus-fejl" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Segmenteringsfejl" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Ugyldigt systemkald" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Ødelagt datakanal" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Alarmklokke" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Afsluttet" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Presserende IO-forhold" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Stoppet (signal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Fortsæt" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Død eller stop af underproces" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Stoppet (tty-input)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Stoppet (tty-output)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O klar" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU-grænse" + +#: siglist.c:154 +msgid "File limit" +msgstr "Filgrænse" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtuel)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Vindue ændret" + +# I fejlrapport for at få meningen +#: siglist.c:170 +msgid "Record lock" +msgstr "Optag lås" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Brugersignal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Brugersignal 2" + +# Fejlrapport +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT-inputdata afventer" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "strømsvigt nært forestående" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "systemnedbrud nært forestående" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "flyt proces til en anden CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "programmeringsfejl" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT-skærmtilstand tildelt" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT-skærmtilstand trukket tilbage" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT-lydsekvens er afsluttet" + +#: siglist.c:214 +msgid "Information request" +msgstr "Informationsforespørgsel" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Ukendt signal #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "dårlig udskiftning: ingen lukkende \"%s\" i %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: kan ikke tildele liste til arrayelementer" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "kan ikke lave datakanal (pipe) til procesudskiftning" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "kan ikke danne underproces til procesudskiftning" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "kan ikke åbne navngiven datakanal (pipe) %s til læsning" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "kan ikke åbne navngiven datakanal (pipe) %s til skrivning" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "kan ikke duplikere navngiven datakanal (pipe) %s som %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "dårlig udskiftning: ingen lukkende \"`\" i %s" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "kan ikke danne datakanal (pipe) til kommandoudskiftning" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "kan ikke danne underproces til kommandoudskiftning" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: kan ikke duplikere datakanal (pipe) som fd 1" + +#: subst.c:6883 subst.c:9952 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%d: ugyldig filbeskrivelse: %s" + +# -c Specify the number of lines read between each call to callback. +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: ugyldigt antal linjer" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "\"%s\": ugyldigt tastetildelingsnavn" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter null eller ikke indstillet" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter null eller ikke indstillet" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: understreng-udtryk < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: dårlig udskiftning" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: kan ikke tildele på denne måde" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "dårlig udskiftning: ingen lukkende \"`\" i %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "intet match: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argument forventet" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: heltalsudtryk forventet" + +#: test.c:265 +msgid "`)' expected" +msgstr "\")\" forventet" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "\")\" forventet, fandt %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: binær operator forventet" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: unær operator forventet" + +#: test.c:881 +msgid "missing `]'" +msgstr "manglende \"]\"" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntaksfejl: \";\" uventet" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "ugyldigt signalnummer" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: dårlig værdi i trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signalhåndtering er SIG_DFL, gensender %d (%s) til mig " +"selv" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: ugyldigt signal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "fejl under importering af funktionsdefinition for \"%s\"" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "skalniveau (%d) for højt, genindstiller til 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: ingen funktionskontekst ved nuværende navneområde" + +#: variables.c:2693 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: kan ikke tildele liste til arrayelementer" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: ingen funktionskontekst ved nuværende navneområde" + +#: variables.c:4771 +#, fuzzy, c-format +msgid "%s has null exportstr" +msgstr "%s: parameter null eller ikke indstillet" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "ugyldigt tegn %d i exportstr for %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "intet \"=\" i exportstr for %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: hoved af shell_variables er ikke en funktionskontekst" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: ingen global_variables-kontekst" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: hoved af shell_variables er ikke et midlertidigt miljønavnerum" + +#: variables.c:6387 +#, fuzzy, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: kan ikke åbne: %s" + +#: variables.c:6392 +#, fuzzy, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%d: ugyldig filbeskrivelse: %s" + +#: variables.c:6437 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s udenfor rækkevidde" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Ophavsret (C) 2009 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licens GPLv3+: GNU GPL version 3 eller senere \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, version %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "Dette er fri software; du kan frit ændre eller redistribuere det.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Der er INGEN GARANTI i det omfang loven tillader.\n" + +#: xmalloc.c:93 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: kan ikke allokere %lu bytes (%lu bytes allokeret)" + +#: xmalloc.c:95 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "xmalloc: kan ikke allokere %lu bytes" + +#: xmalloc.c:165 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: %s:%d: kan ikke allokere %lu bytes (%lu bytes allokeret)" + +#: xmalloc.c:167 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "xmalloc: %s:%d: kan ikke allokere %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [navn[=værdi] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] navn [navn ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m tastetildeling] [-f filnavn] [-q navn] [-u navn] [-r " +"nøglesek] [-x nøglesek:skalkommando] [nøglesek:readline-funktion eller " +"readline-kommando]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|-P] [mappe]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] kommando [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFilrtux] [-p] [navn[=værdi] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFilrtux] [-p] navn[=værdi] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [tilvalg] navn[=værdi] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filnavn] [navn ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts tilvalgsstreng navn [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a navn] [kommando [argumenter ...]] [videresendelse ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +# pat=rep betyder højst sandsynligt mønster=regulært udtryk, men jeg kan ikke finde på nogen 3-bogstavsudtryk som jeg man bruge for de to ting, som jeg synes er let forståelige derfor har jeg ladet dem stå +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e ename] [-lnr] [første] [sidste] eller fc -s [pat=rep] [kommando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p stinavn] [-dt] [navn ...]" + +#: builtins.c:119 +#, fuzzy +msgid "help [-dms] [pattern ...]" +msgstr "help [-ds] [mønster ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d forskydning] [n] eller history -anrw [filnavn] eller " +"history -ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] eller jobs -x kommando [arger]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... eller kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +#, fuzzy +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a array] [-d adskil] [-i tekst] [-n ntegn] [-p prompt] [-t " +"tidsgrænse] [-u fd] [navn ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o tilvalgsnavn] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [navn ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [navn[=værdi] ...] eller export -p" + +#: builtins.c:148 +#, fuzzy +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-af] [navn[=værdi] ...] eller readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filnavn [argumenter]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". filnavn [argumenter]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [udtryk]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] navn [navn ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [grænse]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [tilstand]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAVN [in ORD ... ] ; do KOMMANDOER; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( udtryk1; udtryk2; udtryk3 )); do KOMMANDOER; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAVN [in ORD ... ;] do KOMMANDOER; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] datakanal" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case ORD in [MØNSTER [| MØNSTER]...) KOMMANDOER ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if KOMMANDOER; then KOMMANDOER; [ elif KOMMANDOER; then KOMMANDOER; ]... " +"[ else KOMMANDOER; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while KOMMANDOER; do KOMMANDOER; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until KOMMANDOER; do KOMMANDOER; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAVN] kommando [videresendelser]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function navn { KOMMANDOER ; } eller navn () { KOMMANDOER ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMMANDOER ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( udtryk ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ udtryk ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Navn og betydning af nogle skalvariable" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | mappe]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [indstnavn ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [argumenter]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-o valgmuligheder] [-A handling] [-G " +"globmønst] [-W ordliste] [-F funktion] [-C kommando] [-X filtermønst] [-P " +"præfiks] [-S suffiks] [navn ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o valgmuligheder] [-A handling] [-G globmønst] [-" +"W ordliste] [-F funktion] [-C kommando] [-X filtermønst] [-P præfiks] [-S " +"suffiks] [ord]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o valgmulighed] [navn ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n antal] [-O oprindelse] [-s antal] [-t] [-u fd] [-C tilbagekald] " +"[-c kvantum] [array]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n antal] [-O oprindelse] [-s antal] [-t] [-u fd] [-C " +"tilbagekald] [-c kvantum] [array]" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definer eller vis aliasser.\n" +" \n" +" Uden argumenter vil \"alias\" udskrive en liste af aliasser på den\n" +" genanvendelige form alias NAVN=VÆRDI til standardoutput.\n" +" \n" +" Ellers vil der blive defineret et alias for hvert NAVN, som der er an-\n" +" givet en VÆRDI til. Et efterfølgende mellemrum i VÆRDI vil medføre,\n" +" at det næste ord vil blive kontrolleret for alias-udskiftning, når\n" +" aliasset udvides.\n" +" \n" +" Tilvalg:\n" +" -p\tUdskriver alle definerede aliasser i et genanvendelig format\n" +" \n" +" Afslutningsstatus:\n" +" alias returnerer sand med mindre der gives et NAVN som der ikke er\n" +" defineret noget alias for." + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Fjern hvert NAVN fra listen af definerede aliasser.\n" +" \n" +" Tilvalg:\n" +" -a\tfjern alle aliasdefinitioner.\n" +" \n" +" Returner succes med mindre et NAVN ikke er et eksisterende alias." + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Indstil Readline-tastebindinger og variable.\n" +"\n" +" Bind en tastsekvens til en Readline-funktion eller en makro, eller " +"indstil\n" +" en Readline-variabel. Syntaksen uden tilvalg er ækvivalent til den som\n" +" bruges i ~/.inputrc, men skal gives som et enkelt argument:\n" +" f.eks. bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Tilvalg:\n" +" -m tastetildel Brug TASTETILDEL som tastetildeling for hele \n" +" varigheden af denne kommando. Accepterede " +"tastetildel-\n" +" ingsnavne er emacs, emacs-standard, emacs-meta,\n" +" emacs-ctlx, vi, vi-move, vi-command og vi-insert.\n" +" -l Vis liste af funktioner.\n" +" -P Vis liste af funktionsnavne og bindinger.\n" +" -p Vis liste af funktionsnavne og bindinger på en " +"form\n" +" som kan genbruges som input.\n" +" -S Vis tastesekvenser som udfører makroer og deres " +"værdier\n" +" -s Vis tastesekvenser som udfører makroer og deres " +"værdier\n" +" på en form som kan genbruges som inddata.<\n" +" -V Vis variabelnavne og -værdier\n" +" -v Vis variabelnavne og -værdier på en form som kan \n" +" genbruges som inddata.\n" +" -q funktionsnavn Forespørg hvilke taster der udfører den navngivne \n" +" funktion.\n" +" -u funktionsnavn Løsn alle taster som er bundet til den navngivne\n" +" funktion.\n" +" -r tastesekv Fjern bindingen for TASTESEKV.\n" +" -f filnavn Indlæs tastetildeling fra FILNAVN.\n" +" -x tastesekv:skalkommando\tMedfører at SKALKOMMANDO udføres når \n" +" \t\t\t\tTASTESEKV trykkes.\n" +" \n" +" Afslutningsstatus:\n" +" bind returnerer 0 med mindre et ugenkendt tilvalg angives, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Afslut for-, while- eller until-løkker.\n" +" \n" +" Afslut en FOR, WHILE eller UNTIL-løkke. Hvis N er angivet, afbrydes N\n" +" indlejrede løkker.\n" +" \n" +" Afslutningsstatus:\n" +" Afslutningsstatussen er 0 med mindre N ikke er større end eller lig med " +"1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Genoptag for-, while- eller until-løkke.\n" +" \n" +" Genoptager den næste iteration af den omsluttende FOR-, WHILE- eller \n" +" UNTIL-løkke. Hvis N er angivet, genoptages fra den N'te indesluttende " +"løkke.\n" +" \n" +" Afslutningsstatus:\n" +" Afslutningsstatussen er 0 med mindre N ikke er større end eller lig med " +"1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Eksekver en skal-indbygget funktion.\n" +" \n" +" Eksekver en SKAL-INDBYGGET med argumenterne ARGer uden at udføre " +"kommando-\n" +" opslag. Dette er nyttigt, hvis du ønsker et reimplementere en skal-\n" +" indbygget som en skalfunktion, men har brug for at eksekvere den " +"indbyggede\n" +" inden i funktionen.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer afslutningsstatussen for den SKAL-INDBYGGEDE, eller falsk " +"hvis\n" +" SKAL-INDBYGGET ikke er en skal-indbygget.." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Returnerer konteksten af det nuværende underrutinekald.\n" +"\n" +" Uden UDTRYK returneres \"$line $filename\". Med UDTRYK returneres\n" +" \"$line $subroutine $filename\". Den ekstra information\n" +" kan bruges til at give at stakspor.\n" +"\n" +" Værdien af UDTRYK angiver hvor mange kalderammer der skal gås tilbage\n" +" fra den nuværende. Toprammen er ramme 0.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 0 med mindre skallen ikke eksekverer en skalfunktion eller " +"hvis\n" +" UDTRYK er ugyldigt." + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Ændrer skallens aktuelle mappe.\n" +" \n" +" Ændrer den nuværende mappe til MAPPE. Variablen HOME er standardmappen.\n" +" Variablen CDPATH definerer søgestien for mappen som indeholder DIR.\n" +" \n" +" Variablen CDPATH definerer søgestien for den mappe som indeholder " +"MAPPE.\n" +" Alternative mappenavne i CDPATH er separeret af et kolon (:). Et\n" +" null-mappenavn er det samme som den nuværende mappe. Hvis MAPPE " +"begynder\n" +" med en skråstreg (/) bruges CDPATH ikke.\n" +"\n" +" Hvis mappen ikke findes og skalvariablen \"cdabel_vars\" er indstillet,\n" +" vil det blive antaget at ordet er et variabelnavn. Hvis variablen har " +"en\n" +" værdi, så bruges denne som MAPPE.\n" +"\n" +" Tilvalg:\n" +" -L\tgennemtving at symbolske lænker følges\n" +" -P\tbrug den fysiske mappestruktur uden at følge symbolske lænker\n" +" \n" +" Som standard følges symbolske lænker, som om \"-L\" var valgt.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 0 hvis mappen ændres, ellers noget forskellig fra 0." + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Udskriver navnet for den aktuelle mappe.\n" +" \n" +" Tilvalg:\n" +" -L\tudskriv værdien af $PWD hvis den indeholder den aktuelle mappe\n" +" -P\tudskriv den fysiske mappe uden nogen symbolske lænker\n" +" \n" +" Som standard vil \"pwd\" opføre sig som om \"-L\" var angivet.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 0 med mindre der er angivet et ugyldigt tilvalg, eller hvis " +"den\n" +" aktuelle mappe ikke kan læses." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Null-kommando.\n" +" \n" +" Ingen effekt, kommandoen gør intet.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes altid succesfuldt." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Returnerer et succesfuldt resultat.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes altid succesfuldt." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Returnerer et mislykket resultat.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes altid mislykket." + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Eksekverer en simpel kommando eller viser information om kommandoer.\n" +" \n" +" Kører KOMMANDO med ARGer med undertrykkelse af skalfunktionsopslag, " +"eller\n" +" vis information om de angivne KOMMANDOER. Kan bruges til at køre " +"kommandoer\n" +" fra disken, når en funktion af samme navn eksisterer.\n" +" \n" +" Tilvalg:\n" +" -p\tbrug en standardværdi for PATH som med garanti vil finde alle\n" +" \tstandardværktøjerne\n" +" -v\tudskriv en beskrivelse af KOMMANDO, i stil med den skal-\n" +" \tindbyggede \"type\"\n" +" -V\tUdskriv en større beskrivelse af hver kommando\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer afslutningsstatus fra KOMMANDO eller mislykket hvis KOMMANDO\n" +" ikke findes." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Indstil variabelværdier og -attributter\n" +" \n" +" Erklær variable og giv dem attributter. Hvis der ikke angives nogen " +"NAVNE,\n" +" så angives attributter og værdier for alle variable.\n" +" \n" +" Tilvalg:\n" +" -f\tbegræns handling eller visning til funktionsnavne og\n" +" \tdefinitioner\n" +" -F\tbegræns visning til funktionsnavne (inklusive linjenummer og\n" +" \tkildekodefil under fejlsøgning)\n" +" -p\tvis attributter og værdi for hvert NAVN\n" +" \n" +" Tilvalg som indstiller attributter:\n" +" -a\tfor at gøre NAVNE til indekserede arrays (hvis understøttet)\n" +" -A\tfor at gøre NAVNE til associerede arrays (hvis understøttet)\n" +" -i\tfor at give NAVNE \"integer\"-attributten\n" +" -l\tkonverter NAVNE til små bogstaver ved tildeling\n" +" -t\tfor at give NAVNE \"trace\"-attributten\n" +" -u\tkonverter NAVNE til store bogstaver ved tildeling\n" +" -x\tfor at eksportere NAVNE\n" +" \n" +" Brug \"+\" i stedet for \"-\" for at slå den pågældende attribut fra.\n" +" \n" +" Der vil blive udført en aritmetisk evaluering (se \"let\"-kommandoen) " +"af \n" +" variable med integer-attributten, når de tildeles en værdi.\n" +" \n" +" Når de bliver brugt i en funktion, kan \"declare\" bruges til at gøre " +"NAVNE\n" +" lokale, ligesom med \"local\"-kommandoen.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der opstår en fejl." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Indstil variabelværdier og -attributter.\n" +" \n" +" Forældet. Læs i \"help declare\"." + +#: builtins.c:540 +#, fuzzy +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definer lokale variable.\n" +" \n" +" Opret en lokal variabel med navnet NAVN og tildel den en værdi. TILVALG " +"kan\n" +" være alle tilvalg som accepteres af \"declare\".\n" +" \n" +" Lokale variable kan kun bruges inden i en funktion; de er kun synlige, " +"for\n" +" den funktion de er defineret i og dens underfunktioner.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, hvis der\n" +" opstår en fejl, eller hvis skallen ikke eksekverer en funktion." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skriv argumenter til standardoutput.\n" +" \n" +" Vis ARGer fra standardoutput, efterfulgt af et nylinjetegn.\n" +" \n" +" Tilvalg:\n" +" -n vedhæft ikke nylinjetegn\n" +" -e aktiver fortolkning af de følgende undvigesekvenser med\n" +" omvendt skråstreg\n" +" -E\tundertryk eksplicit fortolkningen af undvigesekvenser med\n" +" \tomvendt skråstreg\n" +"\n" +" \"echo\" fortolker følgende undvigesekvenser med omvendt skråstreg\n" +" \\a\talarm (klokke)\n" +" \\b\ttilbageryk (backspace)\n" +" \\c\tundertryk yderligere output\n" +" \\e\tescape-tegn\n" +" \\f\tsideskift (form feed)\n" +" \\n\tny linje\n" +" \\r\tlinjeskift (carrige return)\n" +" \\t\thorisontalt tab\n" +" \\v\tvertikalt tab\n" +" \\\\\tomvendt skråstreg\n" +" \\0nnn\tdet tegn hvis ASCII-kode er NNN (oktalt). NNN kan have 0-3\n" +" \toktale cifre\n" +" \\xHH\tdet 8 bit tegn hvis værdi er HH (heksadecimalt). HH kan have\n" +" \tet eller to heksadecimale cifre\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der opstår en skrivefejl." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skriv argumenter til standardoutput.\n" +" \n" +" Vis ARGer til standard output, efterfulgt af et nylinjetegn.\n" +" \n" +" Tilvalg:\n" +" -n\tvedhæft ikke et nylinjetegn\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der opstår en skrivefejl." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Aktiver og deaktiver skal-indbyggede.\n" +" \n" +" Aktiverer og deaktiverer indbyggede skalkommandoer. Deaktivering " +"tillader\n" +" dig at udføre diskkommandoer, som har det sammen navn som en skal-" +"indbygget\n" +" uden at bruge et fuldt stinavn.\n" +" \n" +" Tilvalg:\n" +" -a\tudskriver en liste over indbyggede, uanset om de er slået til\n" +" -n\tdeaktiver hvert NAVN eller vis en liste af deaktiverede funk-\n" +" \ttioner\n" +" -p\tudskriv en liste over indbyggede i et genanvendeligt format\n" +" -s\tudskriv kun navne for \"specielle\" Posix-indbyggede\n" +" \n" +" Tilvalg som kontrollerer dynamisk indlæsning:\n" +" -f\tIndlæs indbygget NAVN fra det delte objekt FILNAVN\n" +" -d\tFjern en indbygget indlæst med -f\n" +" \n" +" Uden tilvalg bliver hvert NAVN aktiveret. \n" +" \n" +" Skriv \"enable -n test\" for at bruge den \"test\" som findes i $PATH, i " +"stedet\n" +" for den indbyggede version.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre NAVN ikke er en skal-indbygget eller hvis\n" +" der opstår en fejl." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Eksekver argumenter som en skalkommando.\n" +" \n" +" Kombinerer ARGer til en enkelt streng, brug resultatet som input til " +"skallen\n" +" og udfør den resulterende kommando.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer kommandoens afslutningsstatus eller succes hvis kommandoen " +"er\n" +" null." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Fortolkning af tilvalgsargumenter\n" +" \n" +" Getopts bruges af skalprocedurer til at tolke positionsparametre og\n" +" tilvalg.\n" +" \n" +" OPTSTRING indeholder de tilvalg, som skal genkendes. Hvis et bogstav\n" +" følges af et kolon, forventes det at tilvalget har et argument, som\n" +" skal adskilles fra tilvalget med et mellemrum.\n" +" \n" +" Hver gang getopts kaldes, vil den placere det næste tilvalg i skal-\n" +" variablen $name, og initialisere $name, hvis den ikke eksisterer, og\n" +" putte indekset for det næste argument, som skal behandles, ind i\n" +" skalvariablen OPTIND. OPTIND initialiseres til 1 hver gang skallen\n" +" eller et skalskript kaldes. Hvis tilvalget kræver et argument, vil\n" +" getopts placere argumentet i skalvariablen OPTARG.\n" +" \n" +" getopts rapporterer fejl på en af to forskellige måder. Hvis det\n" +" første tegn i OPTSTRENG er et kolon, vil getopts bruge stille fejl-\n" +" rapportering. I denne tilstand vil fejlbeskeder ikke blive\n" +" udskrevet. Hvis der angives et ugyldigt tilvalg, vil getopts placere\n" +" tilvalgstegnet i OPTARG. Hvis et påkrævet argument ikke bliver\n" +" fundet, vil getopts placere et \":\" i NAVN og sætte OPTARG til det\n" +" fundne tilvalgstegn. Hvis getopts ikke er i stille tilstand og der\n" +" angives et ugyldigt tilvalg, vil getopts placere \"?\" i NAVN og\n" +" fjerne (unset) OPTARG. Hvis et påkrævet argument ikke findes, vil\n" +" der blive placeret et \"?\" i NAVN og OPTARG vil blive fjernet\n" +" (unset) og en diagnosebesked vil blive udskrevet.\n" +" \n" +" Hvis skalvariablen OPTERR har værdien 0, vil udskrivningen af fejl-\n" +" beskeder blive slået fra i getopts, også selv om det første tegn i\n" +" OPTSTRING ikke er et kolon. OPTERR har værdien 1 som standard.\n" +" \n" +" Normalt vil getopts tolke de positionelle parametre ($0 - $9), men\n" +" hvis der angives flere argumenter end dette, vil de blive tolket i\n" +" stedet for.\n" +" \n" +" Afslutningsstatus\n" +" Returnerer succes hvis et tilvalg findes, fejler hvis afslutningen\n" +" af tilvalgene nås eller hvis der opstår en fejl." + +#: builtins.c:694 +#, fuzzy +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Erstat skallen med den angivne kommando.\n" +" \n" +" Eksekver KOMMANDO og erstat derved skallen med det angivne program.\n" +" ARGUMENTER bliver argumenter til KOMMANDO. Hvis KOMMANDO ikke angives " +"vil\n" +" alle omdirigeringer træde i kraft i den aktuelle skal.\n" +" \n" +" Tilvalg:\n" +" -a\tnavn\tangiv NAVN som det nulte argument til KOMMANDO\n" +" -c\t\teksekver KOMMANDO i et tomt miljø\n" +" -l\t\tbrug en bindestreg som det nulte argument til KOMMANDO\n" +" \n" +" Hvis kommandoen ikke kan eksekveres, vil ikke-interaktive skaller " +"afsluttes,\n" +" med mindre skal-tilvalget \"execfail\" angives\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes succesfuldt med mindre KOMMANDO ikke kan findes, eller hvis " +"der\n" +" opstår en omdirigeringsfejl." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Afslut skallen.\n" +" \n" +" Afslut skallen med status N. Hvis N udelades vil afslutningsstatus\n" +" blive den samme som sidst eksekverede kommando." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Afslut en logindskal.\n" +" \n" +" Afslutter en logindskal med afslutningsstatus N. Returnerer en fejl, " +"hvis\n" +" den ikke eksekveres i en logindskal." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Vis og eksekver kommandoer fra historiklisten.\n" +" \n" +" fc bruges til at vise, redigere og geneksekvere kommandoer fra " +"historikken.\n" +" FØRSTE og SIDSTE kan være numre som specificerer et interval, eller " +"FØRSTE\n" +" kan være en streng, hvilket vil resultere i den nyeste kommando som\n" +" begynder med den streng.\n" +" \n" +" Tilvalg: \n" +" -e ENAVN\tvælger hvilket tekstredigeringsprogram, der vil bliver " +"brugt.\n" +" Forvalget er FCEDIT, herefter EDITOR og til sidst \"vi\".\n" +" -l \tbetyder vis linjer i stedet for at redigere dem.\n" +" -n\tbetyder at linjenumre ikke vises.\n" +" -r\tbetyder at rækkefølgen af linjer vendes (så nye er først).\n" +" \n" +" Med \"fc -s [pat=rep ...] [command]\"-formatet vil kommandoen blive " +"gen-\n" +" eksekveret efter substitutionen GAMMEL=NY er foretaget.\n" +" \n" +" Et nyttigt alias er r=\\\"fc -s\\\", som vil medføre at den sidste " +"kommando\n" +" der begynder med \\\"cc\\\" vil afvikles, når der skrives \\\"r cc\\\", " +"og at\n" +" den seneste kommando afvikles, når der skrives \\\"r\\\".\n" +"\n" +" Afslutningsstatus.\n" +" Returnerer succes eller status af den eksekverede kommando, ikke-nul " +"hvis\n" +" der opstod en fejl." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Flyt jobs til forgrunden.\n" +" \n" +" Placer JOB_SPEC i forgrunden og gør det til det aktuelle job. Hvis\n" +" JOB_SPEC ikke findes, vil skallens opfattelse af, hvad der er det " +"nuværende\n" +" job, blive brugt.\n" +" \n" +" Afslutningsstatus:\n" +" Status af den kommando der placeres i forgrunden eller mislykket hvis " +"der\n" +" opstår fejl." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Flyt jobs til baggrunden\n" +" \n" +" Placer hvert enkelt JOB_SPEC i baggrunden, som om de var startet med \n" +" \"&\". Hvis JOB_SPEC ikke findes, vil skallen opfattelse af, hvad der " +"er\n" +" det nuværende job, blive brugt.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes succesfuldt medmindre jobkontrol ikke er slået til, eller " +"hvis\n" +" der opstår en fejl." + +#: builtins.c:793 +#, fuzzy +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Husk og vis programplaceringer.\n" +" \n" +" Afgør og husker det fulde stinavn for hver kommando-NAVN. Hvis der ikke\n" +" gives noget argument, vil information om huskede kommandoer blive vist.\n" +" \n" +" Tilvalg:\n" +" -d\t\tglem den huskede placering for hvert NAVN\n" +" -l\t\tvis i et format som kan genanvendes\n" +" -p stinavn\tbrug STINAVN som det fulde stinavn for NAVN\n" +" -r\t\tglem alle huskede placeringer\n" +" -t\t\tudskriv den huskede placering for hvert NAVN, med NAVNet\n" +" \t\tudskrevet foran placeringen hvis flere NAVNe er angivet.\n" +" Argumenter:\n" +" NAVN\t\tDer søges efter hvert navn i $PATH og de tilføjes til\n" +" \t\tlisten af huskede kommandoer.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes succesfuldt med mindre NAVN ikke kan findes, eller hvis der " +"angives\n" +" et ugyldig tilvalg." + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Vis information om indbyggede kommandoer.\n" +" \n" +" Viser korte sammendrag om indbyggede kommandoer. Hvis MØNSTER er " +"angivet,\n" +" vil der blive givet en detaljeret hjælp, om alle de kommandoer som " +"matcher\n" +" MØNSTER, ellers vil der blive udskrevet en liste over hjælpeemner.\n" +" \n" +" Tilvalg:\n" +" -d\tudskriver kort beskrivelse for hvert emne\n" +" -m\tviser brugsinformation i pseudo-mansideformat\n" +" -s\tvis kun en kort synopsis for hvert emne som matcher MØNSTER\n" +" \n" +" Argumenter:\n" +" MØNSTER\tMønster som specificerer et hjælpeemne\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre MØNSTER ikke kan findes, eller hvis der\n" +" angives et ugyldigt tilvalg." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Vis eller manipuler med historiklisten.\n" +"\n" +" Vis historikken med linjenumre. Linjer som vises med \"*\" er blevet\n" +" ændret. Argumentet N gør at kun de N sidste linjer bliver vist.\n" +" \n" +" Tilvalg:\n" +" -c\trydder historiklisten ved at slette alle elementer i den.\n" +" -d forskydning\tsletter historik-elementet ved position FORSKYDNING.\n" +" -a\tvedhæfter historiklinjer fra denne session til historikfilen.\n" +" -n\tindlæser alle linjer fra historikfilen, som ikke allerede er\n" +" \tindlæst\n" +" -r\tindlæser historikfilen og føjer dens indhold til historiklisten\n" +" -w\tskriver den nuværende historik til historikfilen og vedhæft dem\n" +" \ttil historiklisten\n" +" \n" +" -p\tudfør en historikudvidelse på hvert enkelt ARG og udskriv\n" +" \tresultatet uden at tilføje det til historikken\n" +" -s\tvedhæft ARGer til historiklisten som et enkelt element\n" +" \n" +" Hvis FILENAVN er angivet, vil den blive brugt som historikfil,\n" +" ellers vil $HISTFILE blive brugt, hvis den har en værdi og ellers\n" +" vil ~/.bash_history blive brugt.\n" +" \n" +" Hvis variablen $HISTTIMEFORMAT er indstillet og ikke er \"null\", vil " +"dens\n" +" værdi blive brugt som formatstreng til strftime(3) til formatering af\n" +" tidspunkt for hvert historikelement. Ellers vil ingen tidsstempler " +"blive\n" +" skrevet.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der er angivet et ugyldig tilvalg, eller " +"hvis\n" +" der opstår en fejl." + +#: builtins.c:879 +#, fuzzy +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Viser status af jobs.\n" +" \n" +" Viser de aktive jobs. JOBSPEC begrænser output til dette job. Uden " +"tilvalg\n" +" vil status for alle aktive jobs blive vist.\n" +" \n" +" Tilvalg:\n" +" \n" +" -l\tvis også proces-id'er ud over den normale information\n" +" -n\tviser kun de processer, som har ændret status siden sidste\n" +" \tpåmindelse\n" +" -p\tviser udelukkende proces-id'er\n" +" -r\tbegrænser uddata til kørende jobs\n" +" -s\tbegrænser uddata til stoppede jobs\n" +" \n" +" Hvis -x er givet, vil KOMMANDO blive kørt efter at alle " +"jobspecifikationer\n" +" som står i ARGer er blevet erstattet med proces-id'et for dette jobs " +"proces-\n" +" gruppeleder.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre et ugyldigt tilvalg er angivet, eller hvis " +"der\n" +" opstår en fejl. Hvis -x bruges returneres afslutningsstatus for KOMMANDO." + +#: builtins.c:906 +#, fuzzy +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Fjern jobs fra den aktuelle skal.\n" +" \n" +" Fjerner hvert JOBSPEC-argument, fra tabellen over aktive jobs. Hvis der " +"ikke\n" +" angives nogen JOBSPEC bruges skallens opfattelse af det aktuelle job.\n" +" \n" +" Tilvalg:\n" +" -a\tfjern alle jobs hvis JOBSPEC ikke er angivet\n" +" -h\tmarker hvert JOBSPEC således at SIGHUP ikke sendes til jobbet\n" +" \thvis skallen modtager SIGHUP\n" +" -r\tfjern kun kørende jobs\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre et ugyldigt tilvalg eller JOBSPEC angives." + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Send et signal til et job.\n" +" \n" +" Send signalet SIGSPEC eller SIGNUM til processen, som er angivet ved " +"PID\n" +" eller JOBSPEC. Hvis hverken SIGSPEC eller SIGNUM er angivet antages " +"SIGTERM.\n" +" \n" +" -s sig\tSIG er et signalnavn\n" +" -n sig\tSIG er et signalnummer\n" +" -l\tudskriver signalnavnene. Hvis der står argumenter efter \"-l\",\n" +" \tantages det, at de er signalnumre hvis tilhørende signalnavne skal\n" +" udskrives.\n" +" \n" +" Der er to grunde til at kill er en indbygget skal-kommando: Det " +"tillader\n" +" at der kan bruges job-id'er i stedet for proces-id'er og tillader at " +"stoppe\n" +" processer, selvom du har nået grænsen for, hvor mange processer du\n" +" kan oprette.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre et ugyldigt tilvalg er angivet, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:949 +#, fuzzy +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Evaluer aritmetiske udtryk.\n" +" \n" +" Hvert ARG er et aritmetisk udtryk som skal evalueres. Evalueringen\n" +" bliver foretaget i heltal med fast-bredde, uden check for overløb,\n" +" dog vil division med 0 blive fanget og markeret som en fejl. Den\n" +" følgende liste af operatorer er vist i grupper med samme evaluerings-\n" +" prioritet. Grupperne er vist med faldende prioritet.\n" +" \n" +" \tid++, id--\tpost-forøgelse og -formindskelse af variabel\n" +" \t++id, --id\tpræ-forøgelse og -formindskelse af variabel\n" +" \t-, +\t\tunær minus og plus\n" +" \t!, ~\t\tlogisk og bitvis negation\n" +" \t**\t\teksponentiering\n" +" \t*, /, %\t\tmultiplikation, division, rest\n" +" \t+, -\t\taddition, subtraktion\n" +" \t<<, >>\t\tvenstre og højre bitvis skift\n" +" \t<=, >=, <, >\tsammenligning\n" +" \t==, !=\t\tlighed, ulighed\n" +" \t&\t\tbitvis AND (OG)\n" +" \t^\t\tbitvis XOR (EKSKLUSIVT ELLER)\n" +" \t|\t\tbitvis OR (ELLER)\n" +" \t&&\t\tlogisk AND (OG)\n" +" \t||\t\tlogisk OR (ELLER)\n" +" \texpr ? expr : expr\n" +" \t\t\tbetingelsesoperator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\ttildeling\n" +" \n" +" Skalvariable er tilladt som operander. Variablens navn vil blive\n" +" erstattet af dens værdi (tilpasset så den er et heltal med fast-bredde)\n" +" indeni udtrykket. Variablen skal have sin heltals-attribut slået til\n" +" for, at den kan bruges i et udtryk.\n" +" \n" +" Operatorer vil blive evalueret efter prioritet. Underoperatorer i\n" +" parenteser bliver evalueret først og kan tilsidesætte de ovenstående\n" +" prioriteter.\n" +" \n" +" Afslutningsstatus:\n" +" Hvis det sidste ARG evalueres til 0, vil \"let\" returnere 1, ellers\n" +" returneres 0." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Læs en linje fra standardinput og del den op i felter.\n" +" \n" +" En linje vil blive læst fra standardinput, eller fra fildeskriptor FD " +"hvis\n" +" tilvalget -u er givet. Linjen vil blive delt ind i felter som med ord-\n" +" opdeling Det første ord blive tildelt det første NAVN, det andet ord " +"til \n" +" det andet NAVN osv. og de tilbageblivende ord vil blive tildelt det " +"sidste\n" +" NAVN. Kun de tegn som findes i $IFS vil blive genkendt som " +"ordadskillere.\n" +"\n" +" Hvis der ikke er angivet nogle NAVNe, vil linjen blive gemt i REPLY-\n" +" variablen.\n" +"\n" +" Tilvalg:\n" +" -a array\tde indlæste ord blive tildelt fortløbende indeks i\n" +" \t\tARRAY startende ved 0\n" +" -d adskil\tfortsæt indtil det første tegn i ADSKIL bliver læst, i " +"stedet\n" +" \t\tfor ved nylinjetegn\n" +" -e\tbrug Readline til at indhente linje fra en interaktiv skal\n" +" -i tekst\tBrug TEKST som den indledende tekst til Readline\n" +" -n ntegn\treturnerer efter at have læst NTEGN tegn i stedet for at " +"vente\n" +" \t\tpå et nylinjetegn\n" +" -p prompt\tudskriv strengen PROMPT, uden et nylinjetegn, før der " +"forsøges på\n" +" \t\tat læse\n" +" -r\ttillad ikke at omvendte skråstreger undviger tegn\n" +" -s\tudskriv (echo) ikke input som kommer fra en terminal\n" +" -t tidsgrænse\tindstil tidsudløb og returner fejl, hvis der ikke kan\n" +" \t\t\tlæses en komplet linje indenfor TIDSGRÆNSE sekunder.\n" +" \t\t\tVærdien af variablen TMOUT er standardtidsudløbet.\n" +" \t\t\tTIDSGRÆNSE kan være et kommatal. Hvis TIDSGRÆNSE er 0,\n" +" \t\t\tvil read kun returnere succes hvis der er input\n" +" \t\t\ttilgængelig ved den angivne fildeskriptor. Fejlstatus\n" +" \t\t\tvil være større end 128 hvis tidsudløb indtræffer.\n" +" -u fd\tlæs fra fildeskriptoren FD i stedet for standardinput\n" +" \n" +" Afslutningsstatus:\n" +" Returkoden vil være nul, med mindre slut-på-fil nås, tidsudløb " +"indtræffer,\n" +" eller hvis en ugyldig fildeskriptor gives som argument til -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Returner fra en skalfunktion.\n" +" \n" +" Gør at en funktion eller et kildeskript afslutter med en returværdi, som " +"er\n" +" angivet med N. Hvis N udelades, vil returstatussen være den samme som " +"værdien\n" +" fra sidste kommande, som blev eksekveret inde i funktionen eller " +"skriptet.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer N, eller fejl hvis skallen ikke er i færd med at eksekvere " +"en\n" +" funktion eller et skript." + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Indstiller eller afinitialiserer (unset) skaltilvalg og positionsparametre.\n" +" \n" +" Ændr værdien af skalattributter og positionsparametre, eller vis navne " +"og\n" +" værdier af skalvariable.\n" +"\n" +" Tilvalg:\n" +" -a Marker variable som er ændret eller oprettet til eksport.\n" +" -b Underret om jobafslutning øjeblikkeligt.\n" +" -e Afslut øjeblikkeligt hvis en kommando afslutter med en\n" +" afslutningsstatus som ikke er nul.\n" +" -f Slå filnavngenerering fra (globbing).\n" +" -h Husk kommandoers positionen mens de slås op.\n" +" -k Overfør alle opgavens argumenter til kommandoens miljø, ikke kun " +"de\n" +" som kommer før kommandonavnet.\n" +" -m Slå jobkontrol til.\n" +" -n Læs kommandoer men eksekver dem ikke.\n" +" -o tilvalgsnavn\n" +" Indstil variablen så den passer til tilvalgsnavn:\n" +" allexport samme som -a\n" +" braceexpand samme som -B\n" +" emacs brug en linjeredigerings-grænseflade som i emacs\n" +" errexit samme som -e\n" +" errtrace samme som -E\n" +" functrace samme som -T\n" +" hashall samme som -h\n" +" histexpand samme som -H\n" +" history slå kommandohistorik til\n" +" ignoreeof skallen vil ikke afslutte ved læsning af\n" +" slut-på-fil (EOF)\n" +" interactive-comments\n" +" vis også kommentarerer ved interaktive " +"kommandoer\n" +" keyword samme som -k\n" +" monitor samme som -m\n" +" noclobber samme som -C\n" +" noexec samme som -n\n" +" noglob samme som -f\n" +" nolog accepteres på nuværende tidspunkt men har ingen\n" +" virkning\n" +" notify samme som -b\n" +" nounset samme som -u\n" +" onecmd samme som -t\n" +" physical samme som -P\n" +" pipefail returværdien af en datakanal (pipeline) er\n" +" status af den sidste kommando, som afsluttedes " +"med en\n" +" status som er forskellig fra nul, eller nul hvis\n" +" ingen kommando afsluttedes med en status " +"forskellig\n" +" fra nul\n" +" posix ændrer den måde bash opfører sig på de steder " +"hvor\n" +" opførslen afviger fra 1003.2-standarden således " +"at\n" +" standarden følges\n" +" privileged samme som -p\n" +" verbose samme som -v\n" +" vi brug en linjeredigerings-grænseflade som i \"vi" +"\"\n" +" xtrace samme som -x\n" +" -p Slået til når den reelle og den faktiske brugers id'er ikke er " +"ens.\n" +" Deaktiverer behandling af $ENV-filen og import af skalfunktioner.\n" +" Deaktivering af denne valgmulighed vil sætte de faktiske\n" +" uid og gid til de reelle uid og gid.\n" +" -t Afslut efter af have læst og eksekveret en kommando.\n" +" -u Behandl afinitialiserede (unset) variable som en fejl ved " +"substitution.\n" +" -v Udskriv skal-inputlinjer når de læses.\n" +" -x Udskriv kommandoer og deres argumenter når de eksekveres.\n" +" -B Lad skallen udføre klammeudvidelse\n" +" -C Med dette tilvalg vil det ikke tillades at eksisterende regulære " +"filer\n" +" overskrives pga. videreførsel af output.\n" +" -E Med dette tilvalg vil ERR-fælden (trap) arves af skalfunktioner.\n" +" -H Aktiver !-stilhistoriksubstitution. Dette flag er aktiveret som\n" +" standard, når skallen er interaktiv.\n" +" -P Med dette tilvalg følges symbolske lænker ikke ved eksekvering af\n" +" kommandoer, som f.eks. cd, der ændrer den aktuelle mappe.\n" +" -T Med dette tilvalg vil DEBUG-fælden (trap) arves af " +"skalfunktioner.\n" +" - Tildel alle tilbageblevne argumenter til positionsparametrene.\n" +" Tilvalgene -x og -v er slået fra.\n" +" \n" +" Bruges + i stedet for - vil disse flag blive slået fra. Flagene kan " +"også\n" +" bruges ved kald af skallen. Flagene det aktuelt er i brug kan findes i " +"$-.\n" +" De tilbageblevne n ARGer er positionsparametre og vil blive tildelt i " +"række-\n" +" følge til $1, $2, .. $n. Hvis der ikke angives nogen ARGer, vil alle " +"skal-\n" +" variable blive udskrevet.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg." + +#: builtins.c:1139 +#, fuzzy +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Afinitialiserer (unset) værdier og attributter for skalvariable og " +"funktioner.\n" +" \n" +" Fjerner den tilsvarende variabel eller funktion for hvert NAVN.\n" +" \n" +" Tilvalg:\n" +" -f\tbehandl ethvert NAVN som en skalfunktion\n" +" -v\tbehandl ethvert NAVN som en skalvariable\n" +" \n" +" Uden tilvalg vil unset først prøve at afinitialisere en variabel og " +"hvis\n" +" det mislykkes, vil den prøve med en funktion.\n" +" \n" +" Nogle variable kan ikke afinitialiseres; læs under \"readonly\".\n" +" \n" +" Afslutningstatus:\n" +" Returnerer succes med mindre der gives et ugyldigt tilvalg eller hvis " +"et\n" +" givent navn er skrivebeskyttet." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Indstil eksportattributten for skalvariable.\n" +" \n" +" Marker hvert NAVN til automatisk eksport til miljøet for de kommandoer " +"som\n" +" eksekveres efterfølgende. Hvis VÆRDI er angivet, vil den blive tildelt\n" +" variablen før eksportering.\n" +" \n" +" Tilvalg:\n" +" -f\treferer til skalfunktioner\n" +" -n\tfjern eksportegenskaben fra hvert NAVN\n" +" -p\tvis en liste over alle eksporterede variable og funktioner\n" +" \n" +" Argumentet \"--\" slår al efterfølgende behandling fra.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg eller hvis\n" +" NAVN er ugyldig." + +#: builtins.c:1180 +#, fuzzy +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marker skalvariable som skrivebeskyttet.\n" +" \n" +" Marker hvert NAVN som skrivebeskyttet. Værdierne af disse navne kan\n" +" herefter ikke ændres ved efterfølgende tildeling. Hvis VÆRDI angives, " +"vil\n" +" denne blive tildelt variablen, før den markeres som skrivebeskyttet.\n" +" \n" +" Tilvalg:\n" +" -a\treferer til indekserede arrays\n" +" -A\treferer til associative arrayvariable\n" +" -f\treferer til skalfunktioner\n" +" -p\tvis en liste af alle skrivebeskyttede variable og funktioner\n" +" \n" +" Argumentet \"--\" slår al efterfølgende fra.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg eller hvis\n" +" NAVN er ugyldigt." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Skift positionsparametre.\n" +" \n" +" Omdøb positionsparametrene $N+1,$N+2 ... til $1,$2 ... Hvis N ikke " +"angives,\n" +" antages værdien 1.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre N er negativ eller større end $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Eksekver kommandoer fra en fil i den aktuelle skal.\n" +" \n" +" Læs og eksekver kommandoer fra FILNAVN i den aktuelle skal. Elementerne " +"i\n" +" $PATH bruges til at finde den mappe som FILNAVN ligger i. Hvis der " +"angives\n" +" ARGUMENTER, omdannes de til positionsparametre når FILNAVN eksekveres.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer status fra den sidst eksekverede kommando i FILNAVN; fejler " +"hvis\n" +" FILNAVN ikke kan læses." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspender skaleksekvering.\n" +" \n" +" Suspender eksekvering af denne skal indtil den modtager et SIGCONT-" +"signal.\n" +" Med mindre det gennemtvinges, kan en logindskal ikke suspenderes.\n" +" \n" +" Tilvalg:\n" +" -f\tgennemtving suspendering selvom skallen er en logindskal\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre jobkontrol ikke er slået til, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:1261 +#, fuzzy +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Evaluer betingelsesudtryk.\n" +" \n" +" Afslutter med status 0 (sand) eller 1 (falsk) afhængigt af evalueringen " +"af\n" +" UDTRYK. Udtrykket kan være unært eller binært. Unære udtryk bruges ofte " +"til\n" +" at undersøge filers status. Der findes også strengoperatorer såvel som\n" +" operatorer til numeriske sammenligninger.\n" +" \n" +" Filoperatorer:\n" +" \n" +" -a FIL Sand hvis filen eksisterer.\n" +" -b FIL Sand hvis filen er blokspeciel.\n" +" -c FIL Sand hvis filen er tegnspecial.\n" +" -d FIL Sand hvis filen er en mappe.\n" +" -e FIL Sand hvis filen eksisterer.\n" +" -f FIL Sand hvis filen eksisterer og er en regulær fil.\n" +" -g FIL Sand hvis filen er sæt-gruppe-id.\n" +" -h FIL Sand hvis filen er en symbolsk lænke.\n" +" -L FIL Sand hvis filen er en symbolsk lænke.\n" +" -k FIL Sand hvis filens klæbebit (sticky bit) er indstillet.\n" +" -p FIL Sand hvis filen er en navngiven datakanal (pipe).\n" +" -r FIL Sand hvis du kan læse filen.\n" +" -s FIL Sand hvis filen eksisterer og ikke er tom.\n" +" -S FIL Sand hvis filen er en sokkel.\n" +" -t FD Sand hvis FD blev åbnet på en terminal.\n" +" -u FIL Sand hvis filen er sæt-bruger-id.\n" +" -w FIL Sand hvis du kan skrive til filen.\n" +" -x FIL Sand hvis du kan eksekvere filen.\n" +" -O FIL Sand hvis filen effektivt er ejet af dig.\n" +" -G FIL Sand hvis filen effektivt er ejet af din gruppe.\n" +" -N FIL Sand hvis filen er blevet ændret siden den sidst blev " +"læst.\n" +" \n" +" FIL1 -nt FIL2 Sand hvis fil1 er nyere end fil2 (ifølge " +"modificerings-\n" +" datoen)\n" +" \n" +" FIL1 -ot FIL2 Sand hvis fil1 er ældre en fil2.\n" +" \n" +" FIL1 -ef FIL2 Sand hvis fil1 er en hård lænke til fil2.\n" +" \n" +" Strengoperatorer:\n" +" \n" +" -z STRENG Sand hvis strengen er tom.\n" +" \n" +" -n STRENG\n" +" STRENG Sand hvis strengen ikke er tom.\n" +" \n" +" STRENG1 = STRENG2\n" +" Sand hvis strengene er ens.\n" +" STRENG1 != STRENG2\n" +" Sand hvis strengene ikke er ens.\n" +" STRENG1 < STRENG2\n" +" Sand hvis STRENG1 sorteres før STRENG2 leksikografisk.\n" +" STRENG1 > STRENG2\n" +" Sand hvis STRENG1 sorteres efter STRENG2 " +"leksikografisk.\n" +" \n" +" Andre operatorer:\n" +" \n" +" -o TILVALG Sand hvis skaltilvalget TILVALG er slået til.\n" +" ! UDTRYK Sand hvis udtryk er falsk.\n" +" UDTR1 -a UDTR2 Sand hvis både udtr1 og udtr2 er sande.\n" +" UDTR1 -o UDTR2 Sand hvis enten udtr1 eller udtr2 er sand.\n" +" \n" +" arg1 OP arg2 Aritmetiske tests. OP er en af følgende: -eq, -ne,\n" +" -lt, -le, -gt, eller -ge.\n" +" \n" +" Binære aritmetiske operatorer returnerer sand hvis ARG1 er henholdsvis " +"lig,\n" +" ikke-lig, mindre-end, mindre-end-eller-lig, større-end, større-end-eller-" +"lig\n" +" ARG2.\n" +"\n" +" Afslutningsstatus:\n" +" Returnerer succes hvis UDTRYK evalueres til sand, og fejler hvis UDTRYK\n" +" evalueres til falsk eller hvis der gives et ugyldigt argument." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Evaluer betingelsesudtryk.\n" +" \n" +" Dette er et synonym for den indbyggede funktion \"test\", dog skal det " +"sidste\n" +" argument skal være \"]\", for at den passer til den åbnende \"[\"." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Vis procestid.\n" +" \n" +" Udskriver den akkumulerede bruger- og systemtid for skallen og alle " +"dens\n" +" underprocesser.\n" +" \n" +" Afslutningsstatus:\n" +" Lykkes altid." + +#: builtins.c:1364 +#, fuzzy +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Indfanger signaler og andre begivenheder.\n" +" \n" +" Definerer og aktiverer håndteringsenheder, som skal køres når skallen\n" +" modtager signaler eller under andre omstændigheder.\n" +" \n" +" ARG er en kommando som skal læses og eksekveres, når skallen modtager\n" +" signalet SIGNAL_SPEC. Hvis ARG ikke er angivet (og hvis der angives en\n" +" enkelt SIGNAL_SPEC) eller \"-\", vil hvert angivet signal blive " +"nulstillet\n" +" til dets oprindelige værdi. Hvis ARG er null-strengen, vil hvert\n" +" SIGNAL_SPEC bliver ignoreret af skallen og af de kommandoer som den\n" +" starter.\n" +" \n" +" Hvis en SIGNAL_SPEC er EXIT (0), vil ARG blive eksekveret ved " +"afslutning\n" +" af skallen. Hvis SIGNAL_SPEC er DEBUG, vil ARG blive eksekveret før " +"hver\n" +" simpel kommando.\n" +" \n" +" Hvis der ikke er angivet nogen argumenter, vil trap udskrive en liste " +"af\n" +" kommandoer som er associeret med hvert signal.\n" +" \n" +" Tilvalg:\n" +" -l\tudskriver en liste af signalnavne og deres tilhørende numre\n" +" -p\tvis de trap-kommandoer som er associeret med hvert SIGNAL_SPEC\n" +" \n" +" Hver SIGNAL_SPEC er enten et signalnavn i eller et signal-\n" +" nummer. Signalnavne er ikke versalfølsomme og præfikset SIG er " +"valgfrit.\n" +" Et signal kan sendes til skallen med \"kill -signal $$\".\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre SIGSPEC er ugyldig eller hvis der er " +"angivet\n" +" et ugyldigt tilvalg." + +#: builtins.c:1400 +#, fuzzy +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Vis information om kommandoers type.\n" +" \n" +" Oplys for hvert NAVN, hvordan det ville blive tolket, hvis det blev " +"brugt\n" +" som en kommando.\n" +" \n" +" Tilvalg:\n" +" -a\tvis alle placeringer som indeholder en eksekverbar ved navn NAVN;\n" +" \tinkluder aliasser, indbyggede og funktioner, hvis og kun hvis " +"tilvalget\n" +" \t\"-p\" ikke også bruges\n" +" -f\tundertryk søgning efter skalfunktioner\n" +" -P\tgennemtving en stisøgning for hvert NAVN, selvom det er et\n" +" \talias, en indbygget eller en funktion og returner samme navne som den\n" +" \tdiskfil der ville blive eksekveret\n" +" -p\treturnerer enten navnet på den diskfil, som ville blive\n" +" \teksekveret, eller ingenting hvis \"type -t NAVN\" ikke ville have\n" +" \treturneret \"file\".\n" +" -t\treturner et enkelt ord, enten \"alias\", \"keyword\", \"function" +"\",\n" +" \t\"builtin\", \"file\" eller \"\", hvis NAVN er henholdsvis et alias,\n" +" skalreserveret ord, skalfunktion, skalindbygget, diskfil eller ikke " +"blev\n" +" fundet.\n" +" \n" +" Argumenter:\n" +" NAVN\tNavnet på den kommando der skal fortolkes.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes hvis alle NAVNe kan findes, og fejler hvis bare et " +"enkelt\n" +" ikke findes." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modificer grænser for skalressourcer.\n" +" \n" +" Giver kontrol over de ressourcer som er tilgængelige for skallen og de\n" +" processer den starter på systemer som tillader den slags kontrol.\n" +" \n" +" Tilvalg:\n" +" -S\tbrug den \"bløde\" ressourcegrænse\n" +" -H\tbrug den \"hårde\" ressourcegrænse\n" +" -a\talle aktuelle grænser rapporteres\n" +" -b\tstørrelse af sokkelbuffer\n" +" -c\tmaksimale størrelse af oprettede kernefiler\n" +" -d\tmaksimale størrelse af en proces' datasegment\n" +" -e\tmaksimale planlægningsprioritet (`nice')\n" +" -f\tmaksimale størrelse af filer skrevet af skallen og dens\n" +" \tunderprocesser\n" +" -i\tmaksimale antal af ventende signaler\n" +" -l\tmaksimale størrelse en proces må låse i hukommelse\n" +" -m\tmaksimale indstillede område (resident size)\n" +" -n\tmaksimale antal åbne fildeskriptorer\n" +" -p\tbufferstørrelse for datakanal (pipe)\n" +" -q\tmaksimale antal bytes i POSIX-beskedkøer\n" +" -r\tmaksimale realtids-planlægningsprioritet\n" +" -s\tmaksimal stakstørrelse\n" +" -t\tmaksimale mængde cpu-tid i sekunder\n" +" -u\tmaksimale antal brugerprocesser\n" +" -v\tstørrelsen af virtuel hukommelse\n" +" -x\tmaksimale antal fillåse\n" +" \n" +" Hvis GRÆNSE angives, er det den nye grænse for den specificerede " +"ressource\n" +" De specielle grænser, \"soft\", hard\" og \"unlimited\" står for " +"henholdsvis den\n" +" aktuelle bløde grænse, hårde grænse og ingen grænse. Ellers vil den\n" +" aktuelle grænse for den specificerede ressource blive udskrevet. Hvis " +"der\n" +" ikke angives noget tilvalg, antages \"-f\".\n" +" \n" +" Værdier angives i forøgelser af 1024 bytes, bortset fra -t som er i " +"sekunder,\n" +" -p som er i forøgelser af 512 bytes og -u som er et uskaleret antal af\n" +" processer.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Vis eller indstil filmasketilstand.\n" +" \n" +" Indstiller brugeres filoprettelsesmaske til TILSTAND. Hvis TILSTAND " +"udelades,\n" +" udskrives den nuværende værdi af masken.\n" +" \n" +" Hvis TILSTAND begynder med et ciffer, bliver det fortolket som et " +"oktalt\n" +" tal, ellers er det en symbolsk tilstandsstreng, ligesom dem der angives\n" +" til chmod(1).\n" +" \n" +" Tilvalg:\n" +" -p\thvis TILSTAND udelades, udskrives der i en form der kan bruges\n" +" \tsom input\n" +" -S\tgør outputtet symbolsk, eller vil output være et oktalt tal\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre TILSTAND er ugyldig, eller hvis et " +"ugyldigt\n" +" tilvalg angives." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Vent på færdiggørelse af job og returner afslutningsstatus.\n" +" \n" +" Venter på processen ID. ID kan enten være et proces-id eller en job-\n" +" specifikation, og rapporterer dets afslutningstatus. Hvis ID ikke " +"angives\n" +" ventes på alle aktuelle underprocesser og afslutningsstatussen vil være " +"0.\n" +" Hvis ID er en jobspecifikation ventes på alle processer i dette jobs\n" +" datakanal (pipe).\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer status af ID, fejler hvis ID er ugyldigt eller hvis der " +"angives\n" +" et ugyldigt tilvalg." + +#: builtins.c:1533 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Venter på færdiggørelse af proces og returnerer dens afslutningsstatus.\n" +" \n" +" Venter på den angivne proces og rapporterer dens afslutningsstatus. " +"Hvis\n" +" der ikke angives noget PID ventes på alle aktuelle underprocesser og\n" +" afslutningsstatussen er 0. PID skal være et proces-id.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen for ID, fejler hvis ID er ugyldig eller hvis der\n" +" angives et ugyldigt tilvalg." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Eksekver kommandoer hvor hvert element i en liste.\n" +" \n" +" \"for\"-løkken eksekverer en sekvens af kommandoer for hvert element i " +"en\n" +" angivet liste af elementer. Hvis \"in ORD ...;\" ikke er tilstede, så " +"antages\n" +" \"in \"$@\"\". For hvert element i ORD, vil NAVN blive sat til det " +"element og\n" +" KOMMANDOER vil blive eksekveret.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen for den sidst eksekverede kommando." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetisk for-løkke.\n" +" \n" +" Ækvivalent til\n" +" \t(( UDTRYK ))\n" +" \twhile (( UDTRYK )); do\n" +" \t\tKOMMANDOER\n" +" \t\t(( UDTRYK3 ))\n" +" \tdone\n" +" UDTRYK1, UDTRYK2 og UDTRYK3 er aritmetisk udtryk. Hvis et af udtrykkene\n" +" mangler, vil resultatet være som om det evalueredes til 1.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer afslutningsstatussen for den sidst eksekverede kommando." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vælg ord fra en liste og eksekver kommandoer.\n" +" \n" +" ORD vil blive udvidet, således at der genereres en liste af ord. Denne\n" +" liste af udvidede ord vil blive skrevet til standardfejl, hvert af dem\n" +" med at nummer hæftet foran. Hvis \"in ORD\" ikke er angivet, antages " +"\"in $@\".\n" +" Derefter vil en PS3-prompt blive vist og der vil blive læst en linje " +"fra\n" +" standardinput. Hvis linje består af et tal, som svarer til et af de\n" +" viste ord, så vil NAVN blive sat til det ord. Hvis linjen er tom, vil " +"ORD\n" +" og prompten blive vist igen. Hvis EOF bliver læst afsluttes kommandoen.\n" +" Hvis der læses en hvilken som helst anden værdi, vil NAVN blive sat til\n" +" null. Den læste linje vil bliver gemt i variablen REPLY. KOMMANDOER vil\n" +" blive eksekveret efter hvert valg indtil en break-kommando eksekveres.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Rapporterer tid brugt ved en datakanals (pipe) eksekvering.\n" +" \n" +" Eksekverer DATAKANAL og udskriv den brugte realtid, bruger-CPU-tid\n" +" og system-CPU-tid, når den er færdig.\n" +" \n" +" Tilvalg:\n" +" -p\tudskriver timingssammendrag i det flytbare (portable)\n" +" POSIX-format\n" +" \n" +" Værdien af variablen TIMEFORMAT bruges som outputformatet.\n" +" \n" +" Afslutningsstatus:\n" +" Afslutningsstatus er afslutningsstatus for DATAKANAL." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Eksekver kommandoer baseret på mønstersammenligning.\n" +" \n" +" Eksekver selektivt KOMMANDOER når ORD passer til MØNSTER. \"|\" bruges " +"til at\n" +" adskille flere mønstre.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Eksekverer kommandoer baseret på betingelse.\n" +" \n" +" Listen \"if KOMMANDOER\" bliver eksekveret. Hvis dens afslutningsstatus " +"er\n" +" nul, så vil listen \"then KOMMANDOER\" blive eksekveret. Ellers vil " +"hver\n" +" \"elif KOMMANDOER\"-liste blive eksekveret og hvis de returnerer nul " +"vil\n" +" deres tilhørende \"then KOMMANDER\"-liste blive eksekveret og if-" +"kommandoen\n" +" fuldføres. Ellers vil \"else KOMMANDOER\"-listen blive eksekveret, hvis " +"en\n" +" sådan findes. Afslutningsstatus for hele strukturen er afslutnings-\n" +" statussen for den sidste kommando, eller nul hvis ingen betingelse var\n" +" sand.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Eksekver kommandoer så længe en test evaluerer til sad.\n" +" \n" +" Udvid og eksekver KOMMANDOER så længe den sidste kommando i \"while\"\n" +" KOMMANDOER har en afslutningsstatus på nul.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Eksekver kommandoer så længe en test ikke evaluerer til falsk.\n" +" \n" +" Udvid og eksekver KOMMANDOER så længe den sidste kommando i \"untill\"\n" +" KOMMANDOER har en afslutningsstatus som ikke er nul.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Opret en coproces ved navn NAVN.\n" +" \n" +" Eksekver KOMMANDO asynkront, med standardoutput og standardinput\n" +" for kommandoen forbundet via en datakanal (pipe), til fildeskriptorerne\n" +" tildelt til indeks 0 og 1 i en arrayvariabel NAVN i den eksekverende " +"skal.\n" +" Standardnavnet NAVN er \"COPROC\".\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer afslutningsstatussen for KOMMANDO." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Definer skalfunktion.\n" +" \n" +" Opret en skalfunktion ved navn NAVN. Når den køres som en simpel " +"kommando,\n" +" NAVN kører KOMMANDOer i den kaldende skals kontekst. Når NAVN kaldes, " +"bliver\n" +" argumenter sendt videre som $1..$n, og funktionens navn som $FUNCNAME.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre NAVN er skrivebeskyttet." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Grupper kommandoer som en enhed.\n" +" \n" +" Kør et sæt af kommandoer i en gruppe. Dette er en måde at videresende\n" +" et sæt af kommandoer på.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Genoptag job i forgrunden.\n" +" \n" +" Ækvivalent til JOB_SPEC-argumentet til \"fg\"-kommandoen. Genoptag et " +"stoppet\n" +" job eller et job som ligger i baggrunden. JOB_SPEC kan specificere enten " +"et\n" +" jobnavn eller et jobnummer. Hvis JOB_SPEC efterfølges af en \"&\", vil " +"jobbet\n" +" blive placeret i baggrunden, som om jobspecifikationen var givet som et\n" +" argument til \"bg\".\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen af det genoptagede job." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Evaluer aritmetisk udtryk.\n" +" \n" +" UDTRYK evalueres ifølge reglerne for aritmetisk evaluering. Ækvivalent " +"til\n" +" \"let UDTRYK\".\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 1 hvis udtrykket evalueres til 0, ellers returneres 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Eksekver betingelseskommando.\n" +" \n" +" Returnerer status 0 eller 1 afhængigt af evalueringen af betingelses-\n" +" udtrykket UDTRYK. Udtryk består af de samme primære elementer som " +"bliver\n" +" brugt i den indbyggede funktion \"test\" og kan kombineres ved brug af " +"følgende\n" +" operatorer:\n" +" \n" +" ( UDTRYK )\tReturnerer værdien af UDTRYK\n" +" ! UDTRYK\t\tSand hvis UDTRYK er falsk, ellers falsk\n" +" UDTR1 && UDTR2\tSand hvis både UDTR1 og UDTR2 er sande, ellers falsk\n" +" UDTR1 && UDTR2\tSand hvis enten UDTR1 eller UDTR2 er sand, ellers " +"falsk\n" +" \n" +" Når operatorerne \"==\" og \"!=\" bruges, vil strengen til højre for " +"operatoren\n" +" blive brugt som et mønster og der vil blive udført strengmatching. Når\n" +" operatoren \"=~\" bliver brugt, vil strengen til højre for operatoren " +"blive\n" +" matchet som et regulært udtryk.\n" +" \n" +" Operatorerne && og || vil ikke evaluere UDTR2, hvis UDTR1 er nok til at\n" +" afgøre udtrykkets værdi.\n" +"\n" +" Afslutningsstatus:\n" +" 0 eller 1 afhængigt af udtrykkets værdi." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Navnene på almindelige skalvariable og deres brug.\n" +" \n" +" BASH_VERSION\tVersionsinformation for denne Bash.\n" +" CDPATH\tEn kolonsepareret liste af mapper som kan gennemsøges for at\n" +" \t\tfinde mapper som er givet som argument til cd.\n" +" GLOBIGNORE\tEn kolonsepareret liste af mønstre som beskriver filnavne " +"som\n" +" \t\tskal ignoreres ved stinavnsudvidelse.\n" +" HISTFILE\tNavnet på den fil hvori din kommandohistorik gemmes.\n" +" HISTFILESIZE\tDet maksimale antal linjer denne fil kan indeholde.\n" +" HISTSIZE\tDet maksimale antal linjer som en kørende skal kan tilgå.\n" +" HOME\tDet komplette stinavn til din logindmappe.\n" +" HOSTNAME\tNavnet på den aktuelle vært.\n" +" HOSTTYPE\tDen type af CPU som denne version af Bash kører under.\n" +" IGNOREEOF\tKontrollerer skallens handlinger hvis den modtager et EOF-" +"tegn\n" +" \t\tsom eneste input. Hvis den er indstillet, angiver den det antal\n" +" \t\tEOF-tegn som skal følge lige efter hinanden på en tom linje,\n" +" \t\tfør skallen afslutter (standardværdien er 10). Hvis den ikke er\n" +" indstillet vil EOF betyde slutningen af input.\n" +" MACHTYPE\tEn streng som beskriver det aktuelle system som Bash kører " +"på.\n" +" MAILCHECK\tHvor ofte Bash tjekker for ny post, i sekunder.\n" +" MAILPATH\tEn kolonsepareret liste af filnavne som Bash tjekker for ny\n" +" \t\tpost.\n" +" OSTYPE\tDen version af Unix som denne version af Bash kører på.\n" +" PATH\tEn kolonsepareret liste af mapper som der søges i efter " +"kommandoer.\n" +" PROMPT_COMMAND\tEn kommando som skal eksekveres før hver primære prompt\n" +" \t\tudskrives.\n" +" PS1\t\tStreng for den primære prompt.\n" +" PS2\t\tStreng for den sekundære prompt.\n" +" PWD\t\tDet fulde stinavn for den aktuelle mappe.\n" +" SHELLOPTS\tEn kolonsepareret liste af aktiverede skaltilvalg.\n" +" TERM\tNavnet på den aktuelle skaltype.\n" +" TIMEFORMAT\tOutputformatet for timingstatistik som vises ved hjælp af " +"det\n" +" \t\treserverede ord \"time\".\n" +" auto_resume\tIkke-null betyder at for et kommandoord, som optræder for " +"sig selv\n" +" \t\tpå en linje, vil der først blive kigget efter det i listen over\n" +" \t\taktuelt stoppede jobs. Hvis det findes der, vil dette job blive\n" +" bragt i forgrunden. Værdien \"exact\" betyder at " +"kommandoordet\n" +" skal matche et ord fra listen over stoppede jobs præcist.\n" +" Værdien \"substring\" betyder at kommandoordet skal matche " +"en\n" +" delstreng af jobbet. Enhver anden værdi betyder at " +"kommandoen\n" +" skal være et præfiks for et stoppet job.\n" +" histchars\tTegn som kontrollerer historikudvidelse og hurtig " +"substitution\n" +" \t\ti historik. Det første tegn er historik-substitutionstegnet, som\n" +" regel \"!\". Det andet tegn er hurtigsubstitutionstegnet, " +"som\n" +" \t\tregel \"^\". Det tredje tegn er historik-kommentartegnet, som\n" +" \t\tregel \"#\".\n" +" HISTIGNORE\tEn kolonsepareret liste af mønstre som bliver brugt til at\n" +" \t\tbestemme hvilke kommandoer der skal gemmes i historikken.\n" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Tilføjer mapper til stakken.\n" +" \n" +" Tilføjer en mappe til toppen af stakken, eller roterer stakken, således\n" +" at den nye top af stakken bliver den aktuelle mappe. Uden argumenter\n" +" ombyttes de to øverste mapper.\n" +" \n" +" Tilvalg:\n" +" -n\tUndertrykker det mappeskift der normalt følger med tilføjelse\n" +" \taf mapper til stakken, således at kun stakken ændres.\n" +" \n" +" Argumenter:\n" +" +N\tRoterer stakken således at den N'te mappe (talt fra venstre i\n" +" \tlisten som vises af \"dirs\", startende med nul) vil blive placeret i\n" +" \ttoppen.\n" +" \n" +" -N\tRoterer stakken således at den N'te mappe (talt fra højre i\n" +" \tlisten som vises af \"dirs\", startende med nul) vil blive placeret i\n" +" \ttoppen.\n" +" \n" +" mappe\tTilføjer MAPPE til toppen af mappestakken, således at den\n" +" \tbliver den aktuelle mappe.\n" +" \n" +" Den indbyggede \"dirs\" viser mappestakken.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" mappeskiftet mislykkes." + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Fjerner mapper fra stakken.\n" +" \n" +" Fjerner en mappe fra stakken. Uden argumenter fjernes den øverste mappe " +"fra\n" +" stakken og der skiftes til den nye aktuelle mappe.\n" +" \n" +" Tilvalg:\n" +" -n\tUndertrykker det mappeskift der normalt følger med fjernelse\n" +" \taf mapper fra stakken, således at kun stakken ændres.\n" +" \n" +" Argumenter:\n" +" +N\tFjerner den N'te mappe, talt fra venstre i listen som vises af\n" +" \t\"dirs\", startende med nul. F.eks: vil \"popd +0\" fjerne den første " +"mappe\n" +" \tog \"popd +1\" den anden.\n" +" \n" +" -N\tFjerner den N'te mappe, talt fra højre i listen som vises af\n" +" \t\"dirs\", startende med nul. F.eks: vil \"popd -0\" fjerne den sidste " +"mappe\n" +" \tog \"popd -1\" den andensidste.\n" +" \n" +" Den indbyggede \"dirs\" viser mappestakken.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" mappeskiftet mislykkes." + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Vis mappestakken.\n" +" \n" +" Vis listen af huskede mapper. Mapper tilføjes denne liste ved hjælp\n" +" af \"pushd\"-kommandoen. Du kan komme tilbage gennem listen med \"popd" +"\"-\n" +" kommandoen.\n" +" \n" +" Tilvalg:\n" +" -c\tryd mappestakken ved at slette alle dens elementer\n" +" -l\tudskriv ikke mapper relativt til din hjemmemappe med et\n" +" foranstillet tildetegn\n" +" -p\tudskriv mappestakken med et element per linje\n" +" -v\tudskriv mappestakken med et element per linje, med dets\n" +" \tposition i stakken foranstillet\n" +" \n" +" Argumenter:\n" +" +N\tViser det N'te element, talt fra venstre i listen som den vises\n" +" af \"dirs\" kørt uden argumenter, talt fra nul.\n" +" -N\tViser det N'te element, talt fra højre i listen som den vises af\n" +" \t\"dirs\" kørt uden argumenter, talt fra nul.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Indstil og afindstil (unset) skalvariable.\n" +" \n" +" Ændr indstillinger for hver skalvariabel INDSTNAVN. Uden argumenter " +"vises\n" +" en liste af skalvariable, sammen med information om hvorvidt de er\n" +" indstillet.\n" +" \n" +" Tilvalg:\n" +" -o\tbegræns INDSTNAVN til dem som er defineret til brug med \"set -o" +"\"\n" +" -p\tudskriv alle skalvariable sammen med en indikation af deres\n" +" \tstatus\n" +" -q\tundertryk output\n" +" -s\taktiver (set) hvert INDSTNAVN\n" +" -u\tdeaktiver (unset) hvert INDSTNAVN\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes hvis INDSTNAVN er aktiveret; fejler hvis der angives " +"et\n" +" ugyldigt tilvalg eller hvis INDSTNAVN er deaktiveret." + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formaterer og udskriver ARGUMENTER formateret efter FORMAT.\n" +" \n" +" Tilvalg:\n" +" -v var\tsend output til skalvariablen VAR i stedet for at vise det " +"via\n" +" \t\tstandardoutput\n" +" \n" +" FORMAT er en tegnstreng som indeholder 3 typer af objekter: Almindelige " +"tegn,\n" +" som kopieres til standardoutput som de er; undvigetegn, som konverteres " +"og\n" +" kopieres til standardoutput; og formatspecifikationer, som hver især " +"fører\n" +" til udskrivningen af det næste argument.\n" +" \n" +" Ud over de standardformatspecifikationer som er beskrevet i printf(1) " +"og\n" +" printf(3), fortolker printf også følgende:\n" +" \n" +" %b\tudvid undvigesekvenser med omvendt skråstreg i det tilsvarende\n" +" \targument\n" +" %q\tciter argumenter på en måde så de kan genbruges som skalinput\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der opstår en skrive- eller tildelingsfejl." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Specificer hvordan argumenter fuldføres af Readline.\n" +" \n" +" Specificer hvordan argumenter skal fuldføres for hvert NAVN. Hvis der\n" +" ikke er angivet nogen tilvalg, vil de eksisterende fuldførsels-\n" +" specifikationer blive udskrevet på en form der tillader dem at blive\n" +" genbrugt som input.\n" +" \n" +" Tilvalg:\n" +" -p\tudskriv eksisterende fuldførselsspecifikationer i et format\n" +" \tsom kan genbruges\n" +" -r\tfjern en fuldførselsspecifikation for hvert NAVN, eller,\n" +" \thvis der ikke er angivet nogle NAVNe, alle fuldførselsspecifikationer\n" +" \n" +" Når fuldførsel forsøges, vil handlinger blive anvendt i den rækkefølge,\n" +" som de tilvalg som har store bogstaver, står i.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der opstår en fejl." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Vis mulige fuldførsler afhængigt af indstillingerne.\n" +" \n" +" Beregnet til brug i skalfunktioner som genererer de mulige " +"fuldførelser.\n" +" Hvis det valgfrie ORD angives, vil der blive genereret fuldførsler som\n" +" matcher ORD.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der opstår en fejl." + +# Fejlrapport +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Ændr eller vis indstillinger for fuldførsel.\n" +" \n" +" Ændr fuldførselsindstillinger for hvert NAVN, eller, hvis der ikke er\n" +" angivet nogle NAVNe, fuldførslen der bliver eksekveret nu. Hvis der " +"ikke\n" +" er angivet nogle tilvalg, vil fuldførslen for hvert navn eller den\n" +" aktuelle fuldførsel blive udskrevet.\n" +" \n" +" Tilvalg:\n" +" \t-o indstilling\tIndstil fuldførselsindstillingen INDSTILLING for\n" +" \t\t\thvert NAVN.\n" +" Ved brug af \"+o\" i stedet for \"-o\" vil den specificerede indstilling " +"blive\n" +" slået fra.\n" +" \n" +" Argumenter:\n" +" \n" +" Hvert NAVN refererer til en kommando, for hvilken der tidligere er " +"blevet\n" +" angivet en fuldførselsspecifikation med den indbyggede \"complete\". " +"Hvis\n" +" der ikke er angivet nogle NAVNe, så skal compopt kaldes af den funktion " +"som\n" +" genererer fuldførsler nu og så vil indstillingerne for den aktuelt\n" +" kørende fuldførselsgenerator blive modificeret.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der ikke er defineret en fuldførselsspecifikation for NAVN." + +#: builtins.c:2047 +#, fuzzy +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Læs linjer ind i en arrayvariabel fra standardinput.\n" +" \n" +" Læs linjer ind i en arrayvariabel ARRAY fra standardinput, eller fra en\n" +" fildeskriptor FD, hvis tilvalget -u er givet. Variablen MAPFIL er " +"forvalgt\n" +" som ARRAY.\n" +" \n" +" Tilvalg:\n" +" -n antal\tKopier højst ANTAL linjer. Hvis ANTAL er 0 kopieres alle " +"linjer.\n" +" -O start\tBegynd at skrive til ARRAY ved indeks START. Standardværdien " +"er\n" +" \t0.\n" +" -s antal\tSmid de første ANTAL læste linjer væk.\n" +" -t \tFjern et efterfølgende nylinjetegn fra slutningen af hver linje.\n" +" -u fd\tLæs linjer fra fildeskriptoren FD i stedet for fra standard-\n" +" \t\tinput.\n" +" -C tilbagekald\tEvaluer TILBAGEKALD hver gang KVANTUM linjer er læst.\n" +" -c kvantum\tSpecificer antallet af linjer imellem hvert kald til\n" +" \t\t\tTILBAGEKALD\n" +" \n" +" Argumenter:\n" +" ARRAY\t\tNavn for arrayvariabel som skal bruges til fildata.\n" +" \n" +" Hvis -C er angivet uden -c er standardkvantum 5000. Når TILBAGEKALD\n" +" kaldes, vil den få det næste arrayindeks, som vil blive brugt som et " +"ekstra\n" +" argument.\n" +" \n" +" Med mindre et startpunkt i arrayet eksplicit angives, vil mapfile rydde\n" +" ARRAY, inden skrivning til den påbegyndes.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives at ugyldigt tilvalg, eller " +"hvis\n" +" ARRAY er skrivebeskyttet." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Læs linjer fra en fil ind i en arrayvariabel.\n" +" \n" +" Et synonym for \"mapfile\"." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Ophavsret (C) 2009 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Returnerer konteksten af det nuværende underrutinekald.\n" +#~ " \n" +#~ " Når UDTRYK udelades returneres " + +# ?? +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: proces %5ld (%s) i the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Ukendt signal #" + +#, fuzzy +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licens GPLv3+: GNU GPL version 3 eller senere \n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: kan ikke allokere %lu bytes (%lu bytes allokeret)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: kan ikke allokere %lu bytes" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: %s:%d: kan ikke reallokere %lu bytes (%lu bytes allokeret)" diff --git a/bash-5.1/po/de.gmo b/bash-5.1/po/de.gmo new file mode 100644 index 0000000000000000000000000000000000000000..7a31bc581436aa2ead234c0a866d79a02dbd85dc Binary files /dev/null and b/bash-5.1/po/de.gmo differ diff --git a/bash-5.1/po/de.po b/bash-5.1/po/de.po new file mode 100644 index 0000000000000000000000000000000000000000..64d676fea6baf89a16facf361befd8ca8f697480 --- /dev/null +++ b/bash-5.1/po/de.po @@ -0,0 +1,5156 @@ +# qerman language file for GNU Bash 5.0 +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Roland Illig 2019 +# Nils Naumann , 1996-2019. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-10-21 20:58+0200\n" +"Last-Translator: Nils Naumann \n" +"Language-Team: German \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "Falscher Feldindex." + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: Entferne das Nameref Attribut." + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" +"%s: Das indizierte Array kann in kein assoziatives Array umgewandelt werden." + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: Ungültiger Schlüssel für das assoziative Array." + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: Das Zuweisen auf einen nicht-numerischen Index ist nicht möglich." + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" +"%s: %s: Ein Feldindex wird zum Zuweisen eines assoziativen Arrays benötigt." + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: Kann die Datei %s nicht erzeugen." + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: Kann nicht die Tastenzuordnung für das Kommando " +"finden." + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr " %s: Das erste Zeichen ist nicht `\\'." + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "fehlende schließende `%c' in %s." + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: Fehlender Doppelpunkt." + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "»%s«: Bindung kann nicht gelöst werden." + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "Klammererweiterung: Konnte keinen Speicher für %s zuweisen." + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "Klammererweiterung: Konnte keinen Speicher für %u Elemente zuweisen." + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "Klammererweiterung: Konnte keinen Speicher für »%s« zuweisen." + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "»%s«: Ungültiger Aliasname." + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "Zeileneditierung ist nicht aktiviert." + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "»%s«: Ungültiger Tastenzuordnungs-Name." + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: Nicht lesbar: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "%s: Unbekannter Funktionsname." + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s ist keiner Taste zugeordnet.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s kann aufgerufen werden durch " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "»%s«: Bindung kann nicht gelöst werden." + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "Schleifenzähler" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "nur in einer for-, while- oder until-Schleife sinnvoll." + +# caller +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Gibt Informationen zum aktuellen Subroutinenaufruf aus.\n" +"\n" +" Ohne Argument wird die Zeilennummer und der Dateiname angezeigt. Mit\n" +" Argument werden Zeilennummer, Subroutinenname und Dateiname ausgegeben.\n" +" Mit diesen Informationen kann ein Stacktrace erzeugt werden.\n" +"\n" +" Das Argument gibt die angezeigte Position im Funktionsaufrufstapel an,\n" +" wobei 0 der aktuelle Funktionsaufruf ist.\n" +"\n" +" Rückgabewert:\n" +" Ist ungleich 0 wenn keine Shellfunktion ausgeführt wird oder das " +"Argument\n" +" ungültig ist, sonst 0." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME ist nicht zugewiesen." + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "Zu viele Argumente." + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "NULL Verzeichnis" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD ist nicht zugewiesen." + +# Debug Ausgabe +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "Zeile %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "Warnung: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: Aufruf: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: Die Option erfordert ein Argument." + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: Ein numerischer Parameter ist erforderlich." + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: Nicht gefunden." + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: Ungültige Option." + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: Ungültiger Optionsname." + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "»%s«: Ist kein gültiger Bezeichner." + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "Ungültige Oktalzahl." + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "Ungültige hexadezimale Zahl." + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "Ungültige Zahl." + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: Ungültige Signalbezeichnung." + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "»%s«: Ist keine gültige Prozess-ID oder Jobbezeichnung." + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: Schreibgeschützte Variable." + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s ist außerhalb des Gültigkeitsbereiches." + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "Argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s ist außerhalb des Gültigkeitsbereiches." + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: Kein solcher Job." + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: Keine Jobsteuerung in dieser Shell." + +#: builtins/common.c:294 +msgid "no job control" +msgstr "Keine Jobsteuerung in dieser Shell." + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: eingeschränkt" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "eingeschränkt" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: Ist kein eingebautes Shellkommando." + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "Schreibfehler: %s." + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "Fehler beim Setzen der Terminalattribute: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "Fehler beim Ermitteln der Terminalattribute: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: Kann das aktuelle Verzeichnis nicht wiederfinden: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: Mehrdeutige Jobbezeichnung." + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "In dieser Version ist keine Hilfe verfügbar." + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: »unset« nicht möglich: %s ist schreibgeschützt" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: »unset« nicht möglich." + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: Ungültiger Aktionsname." + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: Keine Komplettierung angegeben." + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "Warnung: Die Option -F könnte unerwartete Ergebnisse liefern." + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "Warnung: Die Option -C könnte unerwartete Ergebnisse liefern." + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "Gegenwärtig wird keine Komplettierungsfunktion ausgeführt." + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "Kann nur innerhalb einer Funktion benutzt werden." + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: Zirkularbezug auf indirekte Variable." + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "»%s«: Ungültiger Name für indirekte Variablenreferenz." + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "Mit »-f« können keine Funktionen erzeugt werden." + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: Schreibgeschützte Funktion." + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: Kann Feldvariablen nicht auf diese Art löschen." + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "" +"%s: Konvertieren von assoziativen in indizierte Arrays ist nicht möglich." + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "Dynamisches Laden ist nicht verfügbar." + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "Kann die dynamische Bibliothek nicht laden %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "Kann %s nicht in der dynamischen Bibliothek finden %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: Ist nicht dynamisch geladen." + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" +"Die Ladefunktion von %s lieferte einen Fehler (%d), daher nicht geladen." + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: Ist nicht dynamisch geladen." + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: Kann nicht löschen: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: ist ein Verzeichnis." + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: Ist keine normale Datei." + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: Die Datei ist zu groß." + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: Kann die Datei nicht ausführen." + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: Kann nicht ausführen: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "Abgemeldet\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "Keine Loginshell: Mit »exit« abmelden!" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Es gibt noch angehaltene Prozesse.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Es gibt noch laufende Prozesse.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "Kein Kommando gefunden." + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: Kann die temporäre Datei nicht öffnen: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "gegenwärtig" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "Job %d wurde ohne Jobsteuerung gestartet." + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: Ungültige Option -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: Diese Option erfordert ein Argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "Hashing deaktiviert." + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: Die Hashtabelle ist leer.\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "Treffer\tBefehl\n" + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00022.html +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Shellkommando, auf das das Schlüsselwort zutrifft `" +msgstr[1] "Shell Kommandos auf die die Schlüsselwörter zutreffen `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"Kein passendes Hilfethema für »%s«. Probieren Sie »help help«, »man -k %s« " +"oder »info %s«." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: Kann die Datei nicht öffnen: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Diese Shellkommandos sind intern definiert. Geben Sie »help« ein, um diese\n" +"Liste zu sehen. Geben Sie »help Name« ein, um die Beschreibung der Funktion\n" +"»Name« zu sehen. Geben Sie »info bash« ein, um die vollständige " +"Dokumentation\n" +"zu sehen. Geben Sie »man -k« oder »info« ein, um detaillierte " +"Beschreibungen\n" +"der Shellkommandos zu sehen.\n" +"\n" +"Ein Stern (*) neben dem Namen kennzeichnet deaktivierte Kommandos.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "Es darf höchstens eine Option aus -anrw angegeben werden." + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "Kommandostapelposition." + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: Ungültiger Zeitstempel." + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: Kommandoersetzung gescheitert." + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib gescheitert." + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "Keine weiteren Optionen mit `-x' erlaubt." + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: Die Argumente müssen Prozess- oder Job-IDs sein." + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Unbekannter Fehler." + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "Ausdruck erwartet." + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: Ist kein indiziertes Array." + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: Ungültige Dateideskriptor-Angabe." + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: Ungültiger Dateideskriptor: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: Ungültige Zeilenanzahlangabe." + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: Ungültiger Arrayanfang." + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "Fehlender Name für die Arrayvariable." + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "" +"Die Unterstützung für Arrayvariablen ist in dieser Shell nicht vorhanden." + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "»%s«: Fehlendes Formatierungszeichen." + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "»%c«: Ungültige Zeitformatangabe." + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "»%c«: Ungültiges Formatierungszeichen." + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "Warnung: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "Formatleseproblem: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "Fehlende hexadezimale Ziffer nach \\x." + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "Fehlende Unicode-Ziffer für \\%c." + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "kein anderes Verzeichnis" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: Ungültiges Argument." + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "Der Verzeichnisstapel ist leer." + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "Verzeichnisstapelindex" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Zeigt die Liste der gegenwärtig gespeicherten Verzeichnisse an. Durch\n" +" das Kommando »pushd« werden die Verzeichnisse auf den Stapel gelegt\n" +" und können durch das Kommando »popd« wieder vom Stapel entfernt\n" +" werden.\n" +"\n" +" Optionen:\n" +"\t-c\tVerzeichnisstapel durch Löschen aller Einträge bereinigen.\n" +"\t-l\tDas Heimatverzeichnis wird nicht mit vorangestellter Tilde\n" +"\tausgegeben\n" +"\t-p\tDen Verzeichnisstapel zeilenweise ausgeben.\n" +"\t-v\tDen Verzeichnisstapel zeilenweise mit vorangestellter\n" +"\tPositionsnummer auseben.\n" +"\n" +" Argumente:\n" +"\t+N\tZeigt den N'ten Eintrag von links an, der von »dirs« ausgegeben\n" +"\twird, wenn es ohne Optionen aufgerufen wird, beginnend mit Null.\n" +"\t-N\tZeigt den N'ten Eintrag von rechts an, der von »dirs« ausgegeben\n" +"\twird, wenn es ohne Optionen aufgerufen wird, beginnend mit Null." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Legt einen Verzeichniseintrag auf den Verzeichnisstapel ab oder rotiert\n" +"den Stapel so, dass das aktuelle Verzeichnis oben liegt. Ohne Argumente\n" +"werden die beiden oberen Einträge vertauscht.\n" +"\n" +" Optionen: \n" +" -n\tVermeidet das Wechseln des Verzeichnisses, so dass\n" +"\tnur der Verzeichnisstapel geändert wird.\n" +"\n" +" Argumente:\n" +" +N\tRotiert den Verzeichnisstapel, dass das N-te Verzeichnis\n" +"\tvon links, das von »dirs« angezeigt wird, nach oben kommt. Die Zählung\n" +"\tbeginnt dabei mit Null.\n" +"\n" +" -N\tRotiert den Verzeichnisstapel, dass das N-te Verzeichnis\n" +"\tvon rechts, das von »dirs« angezeigt wird, nach oben kommt. Die \n" +"\tZählung beginnt dabei mit Null.\n" +"\n" +" dir\tLegt DIR auf den Verzeichnisstapel und wechselt in dieses\n" +" Verzeichnis.\n" +" \n" +" Das Kommando »dirs« Kommando zeigt den Verzeichnisstapel an." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Entfernt Einträge vom Stapel. Ohne Argumente wird der oberste Eintrag\n" +" gelöscht und anschließend in das das neue oben liegende Verzeichnis\n" +" gewechselt.\n" +" \n" +" Optionen:\n" +" -n\tVermeidet das Wechseln des Verzeichnisses, so dass\n" +"\tnur der Verzeichnisstapel geändert wird.\n" +" \n" +" Argumente:\n" +" +N\tEntfernt den N-ten Eintrag von links, der von `dirs'\n" +"\tangezeigt wird. Dabei beginnt die Zählung von Null. So\n" +"\tentfernt z.B. »popd +0« den ersten und »popd +1« den zweiten\n" +"\tEintrag.\n" +" \n" +" -N\tEntfernt den N-ten Eintrag von rechts, der von `dirs'\n" +"\tangezeigt wird. Dabei beginnt die Zählung von Null. So\n" +"\tentfernt z.B. »popd -0« den letzten und »popd +1« den vorletzten\n" +"\tEintrag.\n" +" \n" +" Das Kommando »dirs« zeigt den Verzeichnisstapel an." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: Ungültige Wartezeitangebe." + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "Lesefehler: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"»Return« ist nur aus einer Funktion oder einem mit »source« ausgeführten " +"Skript möglich." + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" +"Gleichzeitiges »unset« einer Funktion und einer Variable ist nicht möglich." + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: Ist keine Feldvariable." + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: Ist keine Funktion." + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: Exportieren nicht möglich." + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "Verschiebeanzahl" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "Kann nicht Shelloptionen gleichzeitig aktivieren und deaktivieren." + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: Ungültiger Name für Shelloption." + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "Ein Dateiname wird als Argument benötigt." + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: Datei nicht gefunden." + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "Kann die Shell nicht unterbrechen." + +# logout +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "Kann die Loginshell nicht unterbrechen." + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s ist ein Alias von »%s«.\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s Ist ein reserviertes Schlüsselwort der Shell.\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s ist eine Funktion.\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s ist eine spezielle eingebaute Funktion.\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s ist eine von der Shell mitgelieferte Funktion.\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s ist %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s ist gehasht (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: Ungültiges Grenzwertargument." + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': Falsches Kommando." + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: Kann die nicht Grenze setzen: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "Grenze" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: Kann die Grenze nicht ändern: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "Oktalzahl" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': Ungültiger Operator für den symbolischen Modus." + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': Ungültiges Zeichen im symbolischen Modus." + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " Zeile " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "Letztes Kommando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Abbruch..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFO: " + +#: error.c:462 +msgid "unknown command error" +msgstr "Unbekanntes Kommando" + +#: error.c:463 +msgid "bad command type" +msgstr "" + +# Programmierfehler +#: error.c:464 +msgid "bad connector" +msgstr "" + +#: error.c:465 +msgid "bad jump" +msgstr "Falscher Sprung" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s ist nicht gesetzt." + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aZu lange keine Eingabe: Automatisch ausgeloggt.\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "Kann nicht die Standardeingabe von /dev/null umleiten: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: »%c«: Ungültiges Formatzeichen." + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "Pipe-Fehler" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: Maximale Schachtelungstiefe überschritten (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: Maximale Quellcode-Schachtelungstiefe überschritten (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximale Schachtelungstiefe für Funktionen überschritten (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: eingeschränkt: `/' ist in Kommandonamen unzulässig." + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: Kommando nicht gefunden." + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: Defekter Interpreter" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: Kann die Binärdatei nicht ausführen: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "»%s« ist eine spezielle eingebaute Funktion." + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "Kann fd %d nicht auf fd %d verdoppeln." + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "Zu viele Rekursionen in Ausdruck." + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "Rekursionsstapel leer." + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "Syntaxfehler im Ausdruck." + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "Versuchte Zuweisung zu etwas, das keine Variable ist." + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "Syntaxfehler in der Variablenzuweisung." + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "Division durch 0." + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "Fehler: Falscher Zuweisungsoperator." + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "»:« für ein bedingten Ausdruck erwartet." + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "Der Exponent ist kleiner als 0." + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" +"Nach einem Präinkrement oder Prädekrement wird ein Bezeichner erwartet." + +#: expr.c:1056 +msgid "missing `)'" +msgstr "Fehlende »)«" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "Syntaxfehler: Operator erwartet." + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "Syntaxfehler: Ungültiger arithmetischer Operator." + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (Fehlerverursachendes Zeichen ist \"%s\")." + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "Ungültige Basis." + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: Ungültige Zeilenanzahlangabe." + +#: expr.c:1598 +msgid "value too great for base" +msgstr "Der Wert ist für die aktuelle Basis zu groß." + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: Fehler im Ausdruck.\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: Kann auf die übergeordneten Verzeichnisse nicht zugreifen." + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "Konnte den No-Delay-Modus für fd %d nicht wiederherstellen." + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "Kann keinen neuen Dateideskriptor für die Eingabe von fd %d zuweisen." + +# Debug Ausgabe +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: Es existiert bereits ein Puffer für den neuen fd %d." + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "Die geforkte PID %d erscheint im laufenden Prozess %d." + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "Lösche den gestoppten Prozess %d der Prozessgruppe %ld." + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00024.html +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "" + +# Programmierfehler +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: Prozessnummer existiert nicht." + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Fertig" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Angehalten" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Angehalten(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Läuft" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Fertig(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Exit %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Unbekannter Status" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(Speicherabzug geschrieben) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (Verz.: %s)" + +# interner Fehler +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: Prozess %ld wurde nicht von dieser Shell gestartet." + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: Der Job %d ist gestoppt." + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: Kein solcher Job." + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: Der Job ist beendet." + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: Der Job %d läuft bereits im Hintergrund." + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +# Debug Ausgabe +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: Zeile %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (Speicherabzug geschrieben)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(gegenwärtiges Arbeitsverzeichnis ist: %s)\n" + +# interner Fehler +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp war nicht erfolgreich." + +# interner Fehler +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: Keine Jobsteuerung im Hintergrund." + +# interner Fehler +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: line discipline" + +# interner Fehler +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "Kann die Prozessgruppe des Terminals nicht setzen (%d)." + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "Keine Jobsteuerung in dieser Shell." + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: Zusicherung gescheitert: %s.\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: Zusicherung verpfuscht\\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "Unbekannt" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "Malloc: Ein internet Speicherbereich (free list) wurde überschrieben." + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: Wurde für bereits freigegebenen Speicherbereich aufgerufen." + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: Wurde für nicht zugeordneten Speicherbereich aufgerufen." + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: Underflow erkannt; mh_nbytes außerhalb des Gültigkeitsbereichs." + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: Underflow erkannt; mh_nbytes außerhalb des Gültigkeitsbereichs." + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: Beginn und Ende Segmentgrößen sind unterschiedlich." + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: Mit nicht zugewiesenen Argument aufgerufen." + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" +"realloc: Underflow erkannt; mh_nbytes außerhalb des Gültigkeitsbereichs." + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" +"realloc: Underflow erkannt; mh_nbytes außerhalb des Gültigkeitsbereichs." + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: Beginn und Ende Segmentgrößen sind unterschiedlich.<" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" +"register_alloc: Speicherzuordnungstabelle ist mit FIND_ALLOC gefüllt?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "" +"register_alloc: %p ist bereits in der Speicherzuordnungstabelle als belegt " +"gekennzeichnet?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "" +"register_free: %p ist bereits in der Speicherzuordnungstabelle als frei " +"gekennzeichnet?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "Ungültige Basis" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: Unbekannter Host." + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: unbekannter Dienst." + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: Fehlerhafte Netzwerkspfadangabe." + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "Der Netzwerkbetrieb ist nicht unterstützt." + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: Kann die Regionseinstellungen nicht ändern (%s)." + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: Kann die Regionseinstellungen nicht ändern (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: Kann die Regionseinstellungen nicht ändern (%s)." + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: Kann die Regionseinstellungen nicht ändern (%s): %s" + +# Du oder Sie? +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Sie haben Post in $_." + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Sie haben neue Post in $_." + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Die Post in %s wurde bereits gelesen.\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "Syntaxfehler: Es wird ein arithmetischer Ausdruck benötigt." + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "Syntax Fehler: unerwartetes `;'." + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "Syntaxfehler: »((%s))«." + +# interner Fehler +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: Falscher Befehlstyp %d." + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"Das in der Zeile %d beginnende Here-Dokument geht bis zum Dateiende " +"(erwartet wird »%s«)." + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "Dateiende beim Suchen nach »%c« erreicht." + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "Dateiende beim Suchen nach »]]« erreicht." + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "Syntaxfehler im bedingten Ausdruck: Unerwartetes Symbol »%s«." + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "Syntaxfehler im bedingten Ausdruck." + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "Unerwartetes Zeichen: »%s« anstatt von »)«" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "»)« erwartet." + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "Syntaxfehler beim unerwarteten Symbol »%s«" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "Syntaxfehler bei »%s«" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "Syntaxfehler: Unerwartetes Dateiende." + +#: parse.y:6365 +msgid "syntax error" +msgstr "Syntaxfehler" + +# Du oder Sie? +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Verwenden Sie »%s«, um die Shell zu verlassen.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "Dateiende beim Suchen nach zugehöriger »)« erreicht." + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: Funktion »%s« nicht gefunden." + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: Falsches Verbindungszeichen »%d«." + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: Ungültiger Dateideskriptor." + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: »%c«: Ungültiges Formatsymbol." + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "Dateideskriptor außerhalb des gültigen Bereichs." + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: Mehrdeutige Umlenkung." + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: Kann existierende Datei nicht überschreiben." + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: eingeschränkt: Die Ausgabe darf nicht umgeleitet werden." + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "Kann die temporäre Datei für das Hier-Dokument nicht anlegen: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: Kann fd keiner Variable zuweisen." + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "" +"Dateinamen der Form /dev/(tcp|udp)/host/port werden ohne Netzwerk nicht " +"unterstützt" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "Umleitungsfehler: Verdoppeln des Dateibezeichners nicht möglich." + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "Konnte das Verzeichnis »/tmp« nicht finden, bitte anlegen." + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp muss ein Verzeichnis sein." + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "Der hübsche Druckmodus wird in interaktiven Schells ignoriert." + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: Ungültige Option" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "Konnte die UID nicht in %d ändern: Die effektive UID ist %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "Konnte die GID nicht in %d ändern: Die effektive GID ist %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "Kann keinen Debugger starten. Der Debugmodus ist gesperrt." + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Ist ein Verzeichnis." + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Ich habe keinen Benutzernamen!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, Version %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Aufruf:\t%s [Lange GNU-Option] [Option] ...\n" +"\t%s [Lange GNU-Option] [Option] Script-Datei ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Lange GNU-Optionen:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Shell-Optionen:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD oder -c Kommando oder -O shopt_option\t\t(Nur Aufruf)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s oder Option -o\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Geben Sie »%s -c \"help set\"« ein, um mehr über Shell-Optionen zu " +"erfahren.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Geben Sie »%s -c help« ein, um mehr über eingebaute Shellkommandos zu " +"erfahren.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Mit dem Kommando »bashbug« Kommando können Sie Fehler melden.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Bash-Homepage: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Allgemeine Hilfe für GNU-Software: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: Ungültige Operation" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Falsches Signal." + +#: siglist.c:50 +msgid "Hangup" +msgstr "Aufgelegt" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Unterbrochen (Interrupt)" + +#: siglist.c:58 +msgid "Quit" +msgstr "Quit" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Ungültige Anweisung." + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Verfolgen/anhalten abfangen (Trace/breakpoint trap)" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Abbruchkommando" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT abfangen (EMT trap)" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Gleitkommafehler" + +#: siglist.c:86 +msgid "Killed" +msgstr "Abgebrochen (Killed)" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bus-Fehler" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Adressierungsfehler" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Falscher Systemaufruf" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Unterbrochene Pipe" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Wecker" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Abgebrochen (Terminated)" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Dringende IO-Bedingung" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Angehalten (Signal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Prozessbearbeitung wieder aufgenommen." + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Kindprozess abgebrochen oder gestoppt." + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Angehalten (Terminaleingabe)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Angehalten (Terminalausgabe)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "E/A fertig" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Rechenzeitgrenze" + +#: siglist.c:154 +msgid "File limit" +msgstr "Grenze für Dateigröße" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (Virtuell)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (Profil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Fenster geändert" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Datei blockiert" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Nutzersignal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Nutzersignal 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT Eingabedaten ausstehend" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "Spannungsausfall steht bevor" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "Systemausfall steht bevor" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "Verlege den Prozess auf einen anderen Prozessor" + +#: siglist.c:198 +msgid "programming error" +msgstr "Programmierfehler" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT-Monitormodus erlaubt" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT-Monitormodus abgeschaltet" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT-Tonfolge beendet" + +#: siglist.c:214 +msgid "Information request" +msgstr "Informationsanforderung" + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00025.html +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Unbekanntes Signal Nr.: %d." + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "Falsche Ersetzung: Kein schließendes »%s« in »%s« enthalten." + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: Kann einem Feldelement keine Liste zuweisen." + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "Kann keine Pipe für die Prozessersetzung erzeugen." + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "Kann den Kindsprozess für die Prozessersetzung nicht erzeugen." + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "Kann nicht die benannte Pipe %s zum Lesen öffnen." + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "Kann nicht die benannte Pipe %s zum Schreiben öffnen." + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "Kann die benannte Pipe %s nicht auf fd %d duplizieren." + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "Kommandoersetzung: NULL-Byte in der Eingabe ignoriert." + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "Kann keine Pipes für Kommandoersetzung erzeugen." + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "Kann keinen Unterprozess für die Kommandoersetzung erzeugen." + +# interner Fehler +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: Kann Pipe nicht als Dateideskriptor 1 duplizieren." + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: Ungültiger Variablenname für Namensreferenz." + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: Ungültige indirekte Expansion." + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: Ungültiger Variablenname." + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: Der Parameter ist nicht gesetzt." + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: Parameter ist leer oder nicht gesetzt." + +# interner Fehler +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: Teilstring-Ausdruck < 0." + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: Falsche Substitution." + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: Kann so nicht zuweisen." + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"Zukünftige Versionen dieser Shell werden das Auswerten arithmetischer " +"Ersetzungen erzwingen." + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "Falsche Ersetzung: Kein schließendes »`« in %s." + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "Keine Entsprechung: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "Argument erwartet." + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: Ganzzahliger Ausdruck erwartet." + +#: test.c:265 +msgid "`)' expected" +msgstr "»)« erwartet." + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "»)« erwartet, %s gefunden." + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: Zweistelliger (binärer) Operator erwartet." + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: Einstelliger (unärer) Operator erwartet." + +#: test.c:881 +msgid "missing `]'" +msgstr "Fehlende »]«" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "Syntax Fehler: unerwartetes `;'." + +#: trap.c:220 +msgid "invalid signal number" +msgstr "Ungültige Signalnummer." + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "Traphandler: Maximale Traphandler-Ebene überschritten (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: Ungültiger Wert in trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" + +# Programmierfehler +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: Falsches Signal %d." + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "Fehler beim Importieren der Funktionsdefinition für »%s«." + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "Der Shell-Level (%d) ist zu hoch und wird auf 1 zurückgesetzt." + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: no function context at current scope" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: Der Variable darf kein Wert zugewiesen werden." + +# Interner Fehler +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: assigning integer to name reference" + +# Interner Fehler +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: no function context at current scope" + +# Interner Fehler +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s has null exportstr" + +# Interner Fehler +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "invalid character %d in exportstr for %s" + +# Interner Fehler +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "no `=' in exportstr for %s" + +# Interner Fehler +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: head of shell_variables not a function context" + +# Interner Fehler +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: no global_variables context" + +# Interner Fehler +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: head of shell_variables not a temporary environment scope" + +# Interner Fehler +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: cannot open as FILE" + +# Interner Fehler +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: invalid value for trace file descriptor" + +# Interner Fehler +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: compatibility value out of range" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Lizenz GPLv3+: GNU GPL Version 3 oder jünger \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, Version %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Dies ist freie Software. Sie darf verändert und verteilt werden." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Es wird keine Garantie gewährt, soweit das Gesetz es zulässt." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: Konnte keine %lu Bytes reservieren (%lu bytes reserviert)." + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: Konnte keine %lu Bytes reservieren." + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: Konnte keine %lu Bytes reservieren (%lu bytes reserviert)." + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: Konnte keine %lu Bytes reservieren." + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [Name[=Wert] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] Name [Name ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m Tastaturtabelle] [-f Dateiname] [-q Name] [-u Name]\n" +"\t[-r Tastenfolge] [-x Tastenfolge:Shell Kommando]\n" +"\t[Tastenfolge:readline-Funktion oder -Kommando]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [Shellkommando [Argument ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [Ausdruck]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [Verzeichnis]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] Kommando [Argument ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilrntux] [-p] [Name[=Wert] ...]" + +# +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] Name[=Wert] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [Option] Name[=Wert] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [Argument ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [Argument ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f Dateiname] [Name ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [Argument ...]" + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00026.html +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts Optionen Variable [Argumente]" + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00026.html +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a Name] [Kommando [Argumente ...]] [Umleitung ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e Editor] [-lnr] [Anfang] [Ende] oder fc -s [Muster=Ersetzung] " +"[Kommando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [Jobbezeichnung]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [Jobbezeichnung ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p Pfadname] [-dt] [Name ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [Muster ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d Offset] [n] oder history -anrw [Dateiname] oder history -ps " +"Argument [Argument...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [Jobbez. ...] or jobs -x Kommando [Arg]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [Jobbezeichnung ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s Signalname | -n Signalnummer | -Signalname] pid | jobspec ... oder " +"kill -l [Signalname]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let Argument [Argument ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a Feld] [-d Begrenzer] [-i Text] [-n Zeichenanzahl] [-N " +"Zeichenanzahl] [-p Prompt] [-t Zeitlimit] [-u fd] [Name ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o Option] [--] [Argument ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [NAME ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [Name[=Wert] ...] oder export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [Name[=Wert] ...] oder readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source Dateiname [Argumente]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". Dateiname [Argumente]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [Ausdruck]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ Argument... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[Argument] Signalbezeichnung ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] Name [Name ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [Grenze]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [Modus]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for Name [in Wort ... ] ; do Kommandos; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( Ausdr1; Ausdr2; Ausdr3 )); do Kommandos; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select Name [in Wort ... ;] do Kommandos; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] Pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case Wort in [Muster [| Muster]...) Kommandos ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if Kommandos; then Kommandos; [ elif Kommandos; then Kommandos; ]... [ else " +"Kommandos; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while Kommandos; do Kommandos; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until Kommandos; do Kommandos; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [Name] Kommando [Umleitungen]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function Name { Kommandos ; } oder Name () { Kommandos ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ Kommandos ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "Jobbezeichnung [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( Ausdruck ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ Ausdruck ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Namen und Bedeutung einiger Shellvariablen" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | Verzeichnis]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [Optionsname ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] Format [Argumente]" + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00027.html +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o Option] [-A Aktion]\n" +" [-G Suchmuster] [-W Wortliste] [-F Funktion] [-C Kommando]\n" +" [-X Filtermuster] [-P Prefix] [-S Suffix] [Name ...]" + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00027.html +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o Option] [-A Aktion] [-G Suchmuster] [-W " +"Wortliste]\n" +" [-F Funktion] [-C Kommando] [-X Filtermuster] [-P Prefix] [-S " +"Suffix]\n" +" [Wort]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o Option] [-DEI] [Name ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d Begrenzer] [-n Anzahl] [-O Quelle] [-s Anzahl] [-t] [-u fd]\n" +" [-C Callback] [-c Menge] [Feldvariable]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d Begrenzer] [-n Anzahl] [-O Quelle] [-s Anzahl] [-t]\n" +" [-u fd] [-C Callback] [-c Menge] [Feldvariable]" + +# alias +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definiert Aliase oder zeigt sie an.\n" +"\n" +" Ohne Argumente wird die Liste der Aliase (Synonyme) in der Form\n" +" »alias Name=Wert« auf die Standardausgabe ausgegeben.\n" +"\n" +" Sonst wird ein Alias für jeden angegebenen Namen definiert, wenn\n" +" für diesen auch ein »Wert« angegeben wurde. Wenn »Wert« mit einem\n" +" Leerzeichen endet, dann wird auch das nächste Wort auf Aliase\n" +" überprüft.\n" +"\n" +" Optionen:\n" +" -p\tGibt alle definierten Aliase aus.\n" +"\n" +" Rückgabewert:\n" +" Meldet Erfolg, außer wenn ein »Name« angegeben worden ist, für den\n" +" kein Alias definiert wurde." + +# unalias +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Entfernt jeden angegebenen Namen von der Aliasliste.\n" +"\n" +" Optionen:\n" +" -a\tEnfernt alle Alias-Definitionen.\n" +"\n" +" Gibt immer Erfolg zurück, außer wenn der Alias nicht existiert." + +# bind +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Bestimmt Readline Tastenzuordnungen und Variablen.\n" +" \n" +" Weist eine Tastensequenz einer Readlinefunktion oder -makro zu\n" +" oder setzt eine Readlinevariable. Die Argumentsyntax ist zu\n" +" den Einträgen in ~/.inputrc äquivalent, aber sie müssen als\n" +" einzelnes Argument übergeben werden. Z.B: bind '\"\\C-x\\C-r\":\n" +" re-read-init-file'.\n" +" \n" +" Optionen:\n" +" -m Keymap Benutzt KEYMAP as Tastaturbelegung für die " +"Laufzeit\n" +" dieses Kommandos. Gültige Keymapnamen sind: " +"emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command und vi-insert.\n" +" -l Listet Funktionsnamen auf.\n" +" -P Listet Funktionsnamen und Tastenzuordnungen auf.\n" +" -p Listet Funktionsnamen und Tastenzuordnungen so " +"auf,\n" +" dass sie direkt als Eingabe verwendet werden " +"können.\n" +" -S Listet Tastenfolgen und deren Werte auf, die " +"Makros \n" +" aufrufen.\n" +" -s Listet Tastenfolgen und deren Werte auf, die " +"Makros \n" +" aufrufen, dass sie als Eingabe wiederverwendet " +"werden\n" +" können.\n" +" -V Listet Variablennamen und Werte auf.\n" +" -v Listet Variablennamen und Werte so auf, dass sie " +"als\n" +" Eingabe verwendet werden können.\n" +" -q Funktionsname Sucht die Tastenfolgen, welche die angegebene\n" +" Funktion aufrufen.\n" +" -u Funktionsname Entfernt alle der Funktion zugeordneten " +"Tastenfolgen.\n" +" -r Tastenfolge Entfernt die Zuweisungen der angegebeben " +"Tastenfolge.\n" +" -f Dateiname Liest die Tastenzuordnungen aus der angegebenen " +"Datei.\n" +" -x Tastenfolge:Shellkommando\tWeist der Tastenfolge das " +"Shellkommando\n" +" \t\t\t\t\tzu.\n" +" -X Listet mit -x erzeugte\n" +" Tastenfolgen und deren Werte\n" +" auf, die Makros aufrufen, dass\n" +" sie als Eingabe wiederverwendet " +"werden\n" +" können.\n" +" \n" +" Rückgabewert: \n" +" Bind gibt 0 zurück, wenn keine unerkannte Option angegeben wurde\n" +" oder ein Fehler eintrat." + +# break +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Verlässt for-, while- oder until-Schleifen.\n" +"\n" +" Break beendet eine »for«-, »while«- oder »until«- Schleife. Wenn »n«\n" +" angegeben ist, werden entsprechend viele geschachtelte Schleifen " +"beendet.\n" +"\n" +" Rückgabewert:\n" +" Der Rückgabewert ist 0, außer »n« ist nicht größer oder gleich 1." + +# continue +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Springt zum Schleifenanfang von for, while, oder until Schleifen.\n" +"\n" +" Springt zum Schleifenanfang der aktuellen »for«, »while« oder »until«\n" +" Schleife. Wenn »n« angegeben ist, wird zum Beginn der »n«-ten\n" +" übergeordneten Schleife gesprungen.\n" +"\n" +" Rückgabewert:\n" +" Der Rückgabewert ist 0, außer wenn »n« nicht größer oder gleich 1 ist." + +# builtin +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Führt ein in der Shell definiertes Kommando aus.\n" +"\n" +" Führt ein in der Shell definiertes Kommando ohne vorherige\n" +" Befehlssuche aus. Dies ist dann nützlich, wenn das Kommando als\n" +" Shell-Funktion reimplementiert werden soll, aber das Kommando\n" +" innerhalb der neuen Funktion aufgerufen wird.\n" +"\n" +" Rückgabewert: \n" +" Der Rückgabewert des aufgerufenen Kommandos oder »falsch«, wenn\n" +" dieses nicht existiert." + +# caller +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Gibt Informationen zum aktuellen Subroutinenaufruf aus.\n" +"\n" +" Ohne Argument wird die Zeilennummer und der Dateiname angezeigt. Mit\n" +" Argument werden Zeilennummer, Subroutinenname und Dateiname ausgegeben.\n" +" Mit diesen Informationen kann ein Stacktrace erzeugt werden.\n" +"\n" +" Das Argument gibt die angezeigte Position im Funktionsaufrufstapel an,\n" +" wobei 0 der aktuelle Funktionsaufruf ist.\n" +"\n" +" Rückgabewert:\n" +" Ist ungleich 0 wenn keine Shellfunktion ausgeführt wird oder das " +"Argument\n" +" ungültig ist, sonst 0." + +# cd +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Wechselt das Arbeitsverzeichnis.\n" +"\n" +" Wechselt in das angegebene Arbeitsverzeichnis. Ohne Angabe eines\n" +" Verzeichnisses wird in das in der Variable HOME definierte\n" +" Verzeichnis gewechselt.\n" +"\n" +" Die Variable CDPATH definiert den Suchpfad, in dem nach dem\n" +" angegebenen Verzeichnisnamen gesucht wird. Mehrere Pfade werden\n" +" durch Doppelpunkte »:« getrennt. Ein leerer Pfadname entspricht\n" +" dem aktuellen Verzeichnis. Mit einem vollständigen Pfadnamen wird\n" +" CDPATH nicht benutzt.\n" +"\n" +" Wird kein entsprechendes Verzeichnis gefunden und die Shelloption\n" +" »cdable_vars« ist gesetzt, dann wird der `Wert' als Variable\n" +" interpretiert. Dessen Inhalt wird dann als Verzeichnisname\n" +" verwendet.\n" +"\n" +" Optionen:\n" +" -L Erzwingt, dass symbolischen Links gefolgt wird.\n" +" Symbolische Links im aktuellen Verzeichnis werden nach\n" +" dem übergeordneten Verzeichnis aufgelöst.\n" +" -P Symbolische Links werden ignoriert. Symbolische\n" +" Links im aktuellen Verzeichnis werden vor dem\n" +" übergeordneten Verzeichnis aufgelöst.\n" +" -e Wenn mit der Option »-P« das aktuelle Arbeitsverzeichnis\n" +" nicht ermittelt werden kann, wird mit einem Rückgabewert\n" +" ungleich 0 abgebrochen.\n" +" -@ Wenn es das System unterstützt, wird eine Datei mit\n" +" erweiterten Attributen als ein Verzeichnis angezeigt,\n" +" welches die erweiterten Attribute enthält.\n" +"\n" +" Standardmäßig wird symbolischen Links gefolgt (Option -L).\n" +" Das übergeordnete Verzeichnis wird ermittelt, indem der\n" +" Dateiname am letzten Schrägstrich gekürzt wird, oder es wird der\n" +" Anfang von DIR verwendet.\n" +"\n" +" Rückgabewert:\n" +" Der Rückgabewert ist 0, wenn das Verzeichnis erfolgreich\n" +" gewechselt wurde, oder wenn die Option -P angegeben und $PWD\n" +" erfolgreich gesetzt werden konnte. Sonst ist er ungleich 0." + +# pwd +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Gibt den Namen des aktuellen Arbeitsverzeichnisses aus.\n" +"\n" +" Optionen:\n" +" -L Gibt den Inhalt der Variable $PWD aus, wenn sie das " +"aktuelle\n" +" Arbeitsverzeichnis enthält.\n" +" -P Gibt den physischen Verzeichnispfad aus, ohne symbolische\n" +" Links.\n" +"\n" +" Standardmäßig wird immer die Option »-L« gesetzt.\n" +"\n" +" Rückgabewert:\n" +" Ist 0, außer wenn eine ungültige Option angegeben oder das aktuelle\n" +" Verzeichnis nicht lesbar ist." + +# colon +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Leeranweisung.\n" +"\n" +" Leeranweisung; das Kommando hat keine Wirkung.\n" +"\n" +" Rückgabewert:\n" +" Das Kommando ist immer »wahr«." + +# true +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Gibt »wahr« zurück.\n" +" \n" +" Rückgabewert:\n" +" Immer »wahr«." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Gibt »falsch« zurück.\n" +" \n" +" Rückgabewert:\n" +" Immer »falsch«." + +# command +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Führt ein einfaches Kommando aus oder zeigt Informationen über Kommandos " +"an.\n" +"\n" +" Führt das Kommando mit den angegebenen Argumenten aus, ohne\n" +" Shell-Funktion nachzuschlagen oder zeigt Informationen über die\n" +" Kommandos an. Dadurch können auch dann Kommandos ausgeführt\n" +" werden, wenn eine Shell-Funktion gleichen Namens existiert.\n" +"\n" +" Optionen:\n" +" -p Es wird ein Standardwert für PATH verwendet, der " +"garantiert,\n" +" dass alle Standard-Dienstprogramme gefunden werden.\n" +" -v Beschreibung des Kommandos ausgeben.\n" +" Ähnlich dem eingebauten Kommando »type«.\n" +" -V Eine ausführlichere Beschreibung jedes Kommandos ausgeben.\n" +"\n" +" Rückgabewert:\n" +" Gibt den Rückgabewert des Kommandos zurück, oder eine Fehlermeldung, " +"wenn\n" +" das Kommando nicht gefunden wird." + +# declare +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Setzt Variablenwerte und deren Attribute.\n" +"\n" +" Deklariert Variablen und weist ihnen Attribute zu. Wenn keine Namen\n" +" angegeben sind, werden die Attribute und Werte aller Variablen " +"ausgegeben.\n" +" \n" +" Optionen:\n" +" -f Schränkt Aktionen oder Anzeigen auf Funktionsnamen\n" +" und Definitionen ein.\n" +" -F Zeigt nur Funktionsnamen an (inklusive Zeilennummer\n" +" und Quelldatei beim Debuggen).\n" +" -g Deklariert globale Varieblen innerhalb einer\n" +" Shellfunktion; wird ansonsten ignoriert.\n" +" -p Zeigt die Attribute und Werte jeder angegebenen\n" +" Variable an.\n" +"\n" +" Attribute setzen:\n" +" -a\tDeklariert ein indiziertes Feld (wenn unterstützt).\n" +" -A\tDeklariert ein assoziatives Feld (wenn unterstützt).\n" +" -i\tDeklariert eine ganzzahlige Variable.\n" +" -l\tKonvertiert die Variabennmamen in Kleinbuchstaben.\n" +" -n\tDer Name wird als Variable interpretiert. \n" +" -r\tDeklariert nur lesbare Variablen.\n" +" -t\tWeist das Attribut »trace« zu.\n" +" -u\tKonvertiert die Variablennamen in Großbuchstaben.\n" +" -x\tExportiert die Variablen über die aktuelle Shell-\n" +" Umgebung hinaus.\n" +"\n" +" Das Voranstellen von »+« anstelle von »-« schaltet die angegebenen\n" +" Attribute ab.\n" +"\n" +" Für ganzzahlige Variablen werden bei der Zuweisung arithmetische\n" +" Berechnungen durchgeführt (siehe »help let«).\n" +"\n" +" Innerhalb einer Funktion werden lokale Variablen erzeugt. Die\n" +" Option »-g« unterdrückt dieses Verhalten.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer eine ungültige Option wurde angegeben,\n" +" oder ein Fehler trat auf." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Setzt Variablen Werte und Eigenschaften\n" +"\n" +" Synonym für »declare«. Siehe »help declare«." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definiert lokale Variablen.\n" +"\n" +" Erzeugt eine lokale Variable Name und weist ihr den Wert Wert zu.\n" +" Option kann eine beliebige von »declare« akzeptierte Option sein.\n" +"\n" +" Lokale Variablen können nur innerhalb einer Funktion benutzt\n" +" werden. Sie sind nur in der sie erzeugenden Funktion und ihren\n" +" Kindern sichtbar.\n" +"\n" +" Rückgabewert: \n" +" Liefert 0 außer bei Angabe einer ungültigen Option, einer\n" +" fehlerhaften Variablenzuweisung oder dem Aufruf außerhalb einer\n" +" Funktion." + +# echo +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Ausgabe der Argumente auf die Standardausgabe.\n" +"\n" +" Zeigt die Argumente auf der Standardausgabe gefolgt von einem\n" +" Zeilenumbruch an.\n" +"\n" +" Optionen:\n" +" -n\tKeinen Zeilenumbruch anfügen\n" +" -e\tInterpretation der folgenden Escape-Sequenzen zulassen\n" +" -E\tKeine Interpretation der Escape-Sequenzen.\n" +"\n" +" »echo« interpretiert die folgenden Escape-Sequenzen:\n" +" \a\tAlarm (Glocke)\n" +" \\b\tRücktaste (Backspace)\n" +" \\c\tweitere Ausgabe unterdrücken\n" +" \\e\tEscape-Zeichen\n" +" \\E\tEscape-Zeichen\n" +" \\f\tSeitenvorschub\n" +" \\n\tZeilenvorschub\n" +" \\r\tWagenrücklauf\n" +" \\t\tHorizontaler Tabulator\n" +" \\v\tVertikaler Tabulator\n" +" \\\\tumgekehrter Schrägstrich (Backslash)\n" +" \\0nnn\tZeichen mit dem ASCII-Code »NNN« (oktal). »NNN« kann null\n" +" \t\tbis drei oktale Ziffern haben.\n" +" \\xHH\tAcht-Bit-Zeichen mit dem Wert »HH« (hexadezimal). »HH«\n" +" \t\tkann eine oder zwei hexadezimale Ziffern haben.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer ein Ausgabefehler tritt auf." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Ausgabe der Argumente auf die Standardausgabe.\n" +"\n" +" Zeigt die Argumente auf der Standardausgabe an, gefolgt von einem\n" +" Zeilenumbruch.\n" +"\n" +" Option:\n" +" -n\tkeinen Zeilenumbruch anfügen.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer nach einem Schreibfehler." + +# enable +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Eingebaute Shell-Kommandos aktivieren und deaktivieren.\n" +"\n" +" Aktiviert und deaktiviert eingebaute Shell-Kommandos. Die Deaktivierung\n" +" erlaubt Ihnen, eigene Kommandos mit demselben Namen wie die eingebauten\n" +" Kommandos zu nutzen, ohne den kompletten Pfad angeben zu müssen.\n" +"\n" +" Optionen:\n" +" -a\tGibt eine Liste der eingebauten Kommandos aus inklusive der\n" +" \tInformation, ob sie aktiv sind oder nicht.\n" +"\n" +" -n\tdeaktiviert jedes angegebene Kommando oder gibt eine\n" +" \tListe der deaktivierten eingebauten Kommandos aus.\n" +" -p\tGibt eine Liste der eingebauten Kommandos in einem\n" +" \twiederverwendbaren Format aus.\n" +" -s\tGibt nur die Namen der »speziellen« in POSIX eingebauten\n" +" \tKommandos aus.\n" +"\n" +" Optionen zum Beeinflussen des dynamischen Ladens:\n" +" -f\tLädt ein eingebautes Kommando aus der angegebenen Datei.\n" +" -d\tEntfernt ein mit »-f« geladenes Kommando.\n" +"\n" +" Ohne Optionen wird jedes angegebene Kommando aktiviert.\n" +"\n" +" Um das unter $PATH liegende Kommando »test« anstelle der eingebauten\n" +" Version zu nutzen, geben Sie »enable -n test« ein.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer Name ist kein eingebautes Kommando\n" +" oder ein Fehler tritt auf." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Führt die Argumente als Shellkommando aus.\n" +"\n" +" Fügt die Argumente zu einer Zeichenkette zusammen und verwendet\n" +" das Ergebnis als Eingebe in eine Shell, welche die enthaltenen\n" +" Kommandos ausführt.\n" +"\n" +" Rückgabewert:\n" +" Der Status des Kommandos oder Erfolg, wenn das Kommando leer war." + +# getopts +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Verarbeitet Optionsargumente.\n" +"\n" +" Getopts wird von Shell-Prozeduren verwendet, um die\n" +" Kommandozeilenoptionen auszuwerten.\n" +"\n" +" \"Optionen\" enthält die auszuwertenden Buchstaben. Ein Doppelpunkt\n" +" nach dem Buchstaben zeigt an, dass ein Argument erwartet wird,\n" +" welches durch ein Leerzeichen von der Option getrennt ist.\n" +"\n" +" Bei jedem Aufruf von »getopts« wird die nächste Option der\n" +" $Variable zugewiesen. Diese wird angelegt, falls sie noch\n" +" nicht existiert. Weiterhin wird der Index des nächsten zu\n" +" verarbeitenden Arguments der Shell-Variablen OPTIND\n" +" zugewiesen. OPTIND wird bei jedem Aufruf einer Shell oder eines\n" +" Shell-Skripts mit 1 initialisiert. Wenn eine Option ein Argument\n" +" benötigt, wird dieses OPTARG zugewiesen.\n" +"\n" +" Für Fehlermeldungen gibt es zwei Varianten. Wenn das erste\n" +" Zeichen des Optionsstrings ein Doppelpunkt ist, wird der stille\n" +" Fehlermodus von »getopts« verwendet. In diesem Modus wird keine\n" +" Fehlermeldung ausgegeben. Wenn eine ungültige Option erkannt wird,\n" +" wird das gefundene Optionenzeichen OPTARG zugewiesen. Wenn ein\n" +" benötigtes Argument fehlt, wird ein »:« der Variable zugewiesen\n" +" und OPTARG auf das gefundene Optionenzeichen gesetzt. Im anderen\n" +" Fehlermodus wird ein »?« der Variable zugewiesen, OPTARG geleert\n" +" und eine Fehlermeldung ausgegeben.\n" +"\n" +" Wenn die Shell-Variable OPTERR den Wert »0« hat, werden durch getopts\n" +" keine Fehlermeldungen ausgegeben, auch wenn das erste Zeichen\n" +" von OPTSTRING kein Doppelpunkt ist. OPTERR hat den Vorgabewert »1«.\n" +"\n" +" Wenn im Aufruf von »getops« die »Argumente« angegeben sind, werden " +"diese\n" +" verarbeitet. Ansonsten werden die von der Position abhängigen\n" +" Parameter ($1, $2, etc.) verarbeitet.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück wenn eine Option gefunden wird und\n" +" »gescheitert«, wenn das Ende der Optionen erreicht oder ein Fehler\n" +" aufgetreten ist." + +# exec +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Ersetzt die Shell durch das angegebene Kommando.\n" +"\n" +" Führt das angegebene Kommando einschließlich dessen Optionen an\n" +" Stelle der Shell aus. Wenn kein Kommando angegeben ist, wirken\n" +" alle Weiterleitungen für die aktuellen Shell.\n" +"\n" +" Optionen:\n" +" -a Name\tSetzt den Namen als nulltes Argument für das Kommando.\n" +" -c\tFührt das Kommando in einer leeren Umgebung aus.\n" +" -l\tSetzt einen Strich in das nullte Argument für das Kommando.\n" +"\n" +" Wenn das Kommando nicht ausgeführt werden kann, wird eine nicht\n" +" interaktive Shell beendet, außer die Shell-Option »execfail« ist\n" +" gesetzt.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer das Kommando wurde nicht gefunden oder\n" +" ein Weiterleitungsfehler trat auf." + +# exit +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Beendet die aktuelle Shell.\n" +"\n" +" Beendet die aktuelle Shell mit dem Rückgabewert N. Wenn N nicht " +"angegeben\n" +" ist, wird der Rückgabewert des letzten ausgeführten Kommandos übernommen." + +# logout +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Beendet eine Login-Shell.\n" +"\n" +" Beendet eine Login-Shell mit dem Rückgabewert »n«. Wenn logout\n" +" nicht von einer Login-Shell aus ausgeführt wurde, wird ein Fehler\n" +" zurückgegeben." + +# fc +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Bringt einen Job in den Vordergrund.\n" +"\n" +" Bringt den mit JOB_SPEC bezeichneten Prozess als aktuellen Job in den\n" +" Vordergrund. Wenn JOB_SPEC nicht angegeben ist, wird der zuletzt\n" +" angehaltene Job verwendet.\n" +"\n" +" Rückgabewert:\n" +" Status des in den Vordergrund geholten Jobs oder Fehler." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Bringt einen Job in den Hintergrund.\n" +"\n" +" Bringt den mit JOB_SPEC bezeichneten Job in den Hintergrund,\n" +" als ob er mit »&« gestartet wurde.\n" +"\n" +" Rückgabewert:\n" +" Immer Erfolg, außer wenn die Jobsteuerung nicht verfügbar ist\n" +" oder ein Fehler auftritt." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +# help +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Informationen zu eingebauten Kommandos.\n" +"\n" +" Zeigt kurze Informationen zu eingebauten Kommandos an. Wenn ein\n" +" Muster angegeben ist, dann wird eine ausführliche Anleitung zu\n" +" allen Kommandos mit zutreffendem Muster angezeigt. Sonst wird die\n" +" Liste der Hilfethemen ausgegeben.\n" +"\n" +" Optionen:\n" +" -d\tKurzbeschreibung für jedes Thema\n" +" -m\tAnzeige im Manpage-Format.\n" +" -s\tGibt eine kurze Zusammenfassung für jedes angegebene\n" +" \tangegebene Thema aus\n" +"\n" +" Argumente:\n" +" Muster\tDas gesuchte Hilfetheme\n" +"\n" +" Rückgabestatus:\n" +" Erfolg, außer wenn das Muster nicht gefunden oder eine ungültige Option\n" +" angegeben wurde." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +# [ +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Wertet einen bedingten Ausdruck aus.\n" +"\n" +" Dieses Kommando entspricht dem Kommando »test«. Jedoch muss das\n" +" letzte Argument ein »]« sein, welches die öffnende Klammer »[«\n" +" schließt." + +# times +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Zeigt den Zeitverbrauch an.\n" +"\n" +" Gibt den kumulierte Nutzer- und Systemzeitverbrauch der Shell und\n" +" aller von ihr gestarteten Prozesse aus.\n" +"\n" +" Rückgabewert:\n" +" Immer 0." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +# (( )) +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Wertet arithmetische Ausdrücke aus.\n" +"\n" +" Der Ausdruck wird nach den Regeln für arithmetische Berechnungen\n" +" ausgewertet. Diese Schreibweise entspricht »let Ausdruck«.\n" +"\n" +" Rückgabewert: \n" +" Gibt »1« zurück, wenn die Auswertung des letzten Arguments Null\n" +" ergibt, sonst »0«." + +# [[ +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Erweiterte Vergleiche.\n" +" \n" +" Der Status 0 oder 1 wird abhängig vom Vergleichsergebnis zurückgegeben.\n" +" Es werden die gleichen Ausdrücke wie in der »test« Funktion " +"unterstützt,\n" +" die mit folgenden Operatoren verbunden werden können:\n" +" \n" +" ( AUSDRUCK )\tErgibt den Wert des AUSDRUCKs\n" +" ! Ausdruck\t\tNegiert den AUSDRUCK\n" +" AUSDR1 && AUSDR2\tUnd Verknüpfung der Ausdrücke\n" +" AUSDR1 || AUSDR2\tOder Verknüpfung der Ausdrücke\n" +" \n" +" Die `==' und `!=' Operatoren ermöglichen einen Mustervergleich mit dem\n" +" rechten Ausdruck als Muster.\n" +" Der `=~' Operator führt einen Vergleich mit dem regulären Ausdruck\n" +" in der rechten Seite aus.\n" +" \n" +" Die && und || Operatoren werten AUSDR2 nur aus, wenn nicht bereits\n" +" AUSDR1 das gesamte Ergebnis bestimt.\n" +" \n" +" Rückgabewert:\n" +" 0 oder 1 abhängig vom Wert des AUSDRUCKs." + +# variable_help +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +" BASH_VERSION\tVersionsnummer der Bash.\n" +" CDPATH\tEine durch Doppelpunkte getrennte Liste von\n" +" Verzeichnissen, die durchsucht werden, wenn das\n" +" Argument von »cd« nicht im aktuellen Verzeichnis\n" +" gefunden wird.\n" +" GLOBIGNORE Eine durch Doppelpunkte getrennte Liste von\n" +" Dateinamenmustern, die für die Dateinamensergänzung\n" +" ignoriert werden.\n" +" HISTFILE\tDatei, die den Kommandozeilenspeicher enthält.\n" +" HISTFILESIZE\tMaximale Zeilenanzahl dieser Datei.\n" +" HISTSIZE\tMaximale Anzahl von Zeilen, auf die der\n" +" Historymechanismus der Shell zurückgreifen kann.\n" +" HOME\tHeimatverzeichnis des aktuellen Benutzers.\n" +" HOSTNAME Der aktuelle Rechnername.\n" +" HOSTTYPE\tCPU-Typ des aktuellen Rechners.\n" +" IGNOREEOF\tLegt die Reaktion der Shell auf ein EOF-Zeichen fest.\n" +" Wenn die Variable eine ganze Zahl enthält, wird diese\n" +" Anzahl EOF Zeichen (Ctrl-D) abgewartet, bis die Shell\n" +" verlassen wird. Der Vorgabewert ist 10. Ist IGNOREEOF\n" +" nicht gesetzt, signalisiert EOF das Ende der Eingabe.\n" +" MACHTYPE Eine Zeichenkette die das aktuell laufende System " +"beschreibt.\n" +" MAILCHECK\tZeit in Sekunden, nach der nach E-Mails gesehen wird.\n" +" MAILPATH\tEine durch Doppelpunkt getrennte Liste von Dateinamen,\n" +" die nach E-Mail durchsucht werden.\n" +" OSTYPE\tUnix Version, auf der die Bash gegenwärtig läuft.\n" +" PATH\tDurch Doppelpunkt getrennte Liste von Verzeichnissen,\n" +" die nach Kommandos durchsucht werden.\n" +" PROMPT_COMMAND\tKommando, das vor der Anzeige einer primären\n" +" Eingabeaufforderung (PS1) ausgeführt wird.\n" +" PS1 Zeichenkette, die die primäre\n" +" Eingabeaufforderung enthält.\n" +" PS2 Zeichenkette, die die sekundäre\n" +" Eingabeaufforderung enthält.\n" +" PWD Der vollständige aktuelle Verzeichnisname.\n" +" SHELLOPTS Durch Doppelpunkt getrennte Liste der aktiven\n" +" Shell-Optionen.\n" +" TERM\tName des aktuellen Terminaltyps.\n" +" auto_resume Ein Wert ungleich Null bewirkt, dass ein einzelnes\n" +" Kommando auf einer Zeile zunächst in der Liste\n" +" gegenwärtig gestoppter Jobs gesucht und dieser in den\n" +" Vordergrund geholt wird. »exact« bewirkt, dass das\n" +" Kommando genau dem Kommando in der Liste der\n" +" gestoppten Jobs entsprechen muss. Wenn die Variable den\n" +" Wert »substring« enthält, muss das Kommando einem\n" +" Substring der Jobbezeichnung entsprechen. Bei einem\n" +" anderen Wert müssen die ersten Zeichen übereinstimmen.\n" +" histchars Zeichen, die die Befehlswiederholung und die\n" +" Schnellersetzung steuern. An erster Stelle steht\n" +" das Befehlswiederholungszeichen (normalerweise\n" +" `!'); an zweiter das `Schnell-Ersetzen-Zeichen'\n" +" (normalerweise `^'). Das dritte Zeichen ist das\n" +" `Kommentarzeichen' (normalerweise `#').\n" +" HISTIGNORE Eine durch Doppelpunkt getrennte Liste von\n" +" Mustern, welche die in der\n" +" Befehlswiederholungsliste zu speichernden\n" +" Kommandos angibt.\n" + +# pushd +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Fügt ein Verzeichnis dem Stapel hinzu.\n" +"\n" +" Legt einen Verzeichnisnamen auf den Verzeichnisstapel oder rotiert\n" +" diesen so, dass das aktuelle Arbeitsverzeichnis oben liegt. Ohne\n" +" Argumente werden die obersten zwei Verzeichnisse auf dem Stapel\n" +" vertauscht.\n" +"\n" +" Optionen: -n Es wird nur das angebene Verzeichnis dem Stapel\n" +" \thinzugefügt, aber nicht in das Verzeichnis gewechselt.\n" +"\n" +" Argumente: \n" +" +N\tRotiert den Stapel so, dass das N'te Verzeichnis (angezeigt\n" +" von `dirs', gezählt von links) oben auf dem Stapels liegt.\n" +"\n" +" -N\tRotiert den Stapel so, dass das N'te Verzeichnis (angezeigt\n" +" von `dirs', gezählt von rechts) sich an der Spitze des Stapels\n" +" \tbefindet.\n" +"\n" +" Der Verzeichnisstapel kann mit dem Kommando `dirs' angezeigt\n" +" werden.\n" +"\n" +" Rückgabewert: \n" +" Gibt Erfolg zurück, außer wenn ein ungültiges Argument angegeben\n" +" wurde oder der Verzeichniswechsel nicht erfolgreich war." + +# popd +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Entfernt Einträge vom Verzeichnisstapel.\n" +"\n" +" Entfernt Einträge vom Verzeichnisstapel. Ohne Argumente wird der\n" +" oberste Eintrag entfernt und in das neue oberste Verzeichnis\n" +" gewechselt.\n" +"\n" +" Optionen:\n" +" -n\tEntfernt nur den Verzeichniseintrag und wechselt nicht\n" +" \tdas Verzeichnis.\n" +" \n" +" Argumente:\n" +" +N\tEntfernt den N-ten Eintrag von links, gezählt von\n" +" Null, aus der von »dirs« anzeigten Liste. Beispielsweise\n" +" entfernen »popd +0« den ersten und »popd +1« den zweiten\n" +" Verzeichniseintrag.\n" +"\n" +" -N\tEntfernt den N-ten Eintrag von rechts, gezählt von Null,\n" +" \taus der von »dirs« angeigten Liste. Beispielsweise entfernen\n" +" »popd -0« den letzten und »popd -1« den vorletzten\n" +" Verzeichniseintrag.\n" +"\n" +" Mit »dirs« kann der Verzeichnisstapel angezeigt werden.\n" +"\n" +" Rückgabewert:\n" +" Gibt 0 zurück, außer wenn ein ungültiges Argument angegeben\n" +" wurde oder der Verzeichniswechsel nicht erfolgreich war." + +# dirs +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Zeigt den Verzeichnisstapel an.\n" +"\n" +" Zeigt die Liste der gegenwärtig gespeicherten Verzeichnisse.\n" +" Diese werden mit dem `pushd' Kommando eingetragen und mit dem\n" +" `popd' Kommando ausgelesen.\n" +"\n" +" Optionen:\n" +" -c Löscht den Verzeichnisstapel.\n" +" -l Keine Abkürzung für das Heimatverzeichnis durch die\n" +" Tilde (~).\n" +" -p Ausgabe von einem Eintrag pro Zeile.\n" +" -v Ausgabe von einem Eintrag pro Zeile mit Angabe der\n" +" Position im Stapel<\n" +"\n" +" Argumente:\n" +" +N Gibt das N'te Element von links der Liste aus, die\n" +" ohne Argumente ausgegeben wird. Die Zählung beginnt\n" +" bei 0.\n" +" -N Gibt das N'te Element von rechts der Liste aus, die\n" +" ohne Argumente ausgegeben wird. Die Zählung beginnt\n" +" bei 0.\n" +"\n" +" Rückgabewert:\n" +" Gibt Erfolg zurück, außer bei einer ungültigen Option oder wenn\n" +" ein Fehler auftritt." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Setzt oder löscht Shell-Optionen.\n" +"\n" +" Ändert die in »Optionsnamen« genannten Shell-Optionen. Ohne\n" +" Argumente wird eine Liste der Shell-Optionen und deren Status\n" +" ausgegeben.\n" +"\n" +" Optionen:\n" +" -o Beschränkt die Optionsmanen auf die, welche mit \n" +" »set -o« definiert werden müssen.\n" +" -p Gibt alle Shelloptionen und deren Status aus.\n" +" -q Unterdrückt Ausgaben.\n" +" -s Setzt jede Option in »Optionsname.«\n" +" -u Deaktiviert jede Option in »Optionsname«.\n" +"\n" +" Rückgabewert:\n" +" Gibt Erfolg zurück, wenn eine Option gesetzt worden ist. Wenn\n" +" eine ungültige Option angegeben wurde oder eine Option deaktiviert\n" +" worden ist, wird ein Fehler zurückgegeben." + +# printf +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formatierte Ausgabe der ARGUMENTE.\n" +"\n" +" Optionen:\n" +" -v var\tDie formatierte Ausgabe ver Variable var zuweisen statt\n" +" \tsie an die Standardausgebe zu senden.\n" +"\n" +" Die FORMAT-Zeichenkette kann einfache Zeichen enthalten, die " +"unverändert\n" +" an die Standardausgabe geschickt werden. Escape-Sequenzen werden " +"umgewandelt\n" +" und an die Standardausgabe geschickt sowie Formatanweisungen, welche " +"das \n" +" nachfolgende ARGUMENT auswerten und ausgeben.\n" +"\n" +" Gegenüber der in printf(1) beschriebenen Standardverion werden " +"zusätzliche\n" +" Formatanweisungen ausgewertet:\n" +"\n" +" %b\tWertet Escape-Sequenzen des zugehörigen Arguments aus.\n" +" %q\tBettet das Argument so ein, dass es als Shelleingabe\n" +" verwendet werden kann.\n" +" %(fmt)T\tAusgabe der aus FMT entstehende Datum-Zeit Zeichenkette, " +"dass\n" +" sie als Zeichenkette für strftime(3) verwendet werden kann.\n" +"\n" +" Die Formatangabe wird wiederverwendet, bis alle Argumente ausgewertet\n" +" sind. Wenn weniger Argumente als Formatangaben vorhanden sind, werden " +"für\n" +" die Argumente Nullwerte bzw. leere Zeichenketten eingesetzt.\n" +"\n" +" Rücgabewert:\n" +" Gibt Erfolg zurück, außer es wird eine ungültige Option angegeben oder " +"ein\n" +" Aus- bzw. Zuweisungsfehler auftritt." + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +# compgen +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Zeigt mögliche Komplettierungen.\n" +"\n" +" Wird in Shellfunktionen benutzt, um mögliche Komplettierungen " +"anzuzeigen.\n" +" Wenn das optionale Wort-Argument angegeben ist, werden Komplettierungen\n" +" für dieses Wort erzeugt.\n" +" \n" +" Rückgabewert:\n" +" Falsche Optionen oder Fehler führen zu Rückgabewerten ungleich Null." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +# readarray +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Liest Zeilen einer Datei in eine Array-Variable.\n" +"\n" +" Ist ein Synonym für »mapfile«." + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00025.html +#~ msgid "Unknown Signal #" +#~ msgstr "Unbekannte Signalnummer" diff --git a/bash-5.1/po/el.gmo b/bash-5.1/po/el.gmo new file mode 100644 index 0000000000000000000000000000000000000000..97304da9e17ce96948b65c587ad07cd67159658f Binary files /dev/null and b/bash-5.1/po/el.gmo differ diff --git a/bash-5.1/po/el.po b/bash-5.1/po/el.po new file mode 100644 index 0000000000000000000000000000000000000000..ed9fb5b40771832ca50a1beb2197530367610df6 --- /dev/null +++ b/bash-5.1/po/el.po @@ -0,0 +1,4613 @@ +# translation of bash to Greek +# Copyright (C) 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Lefteris Dimitroulakis , 2013, 2016, 2017. +msgid "" +msgstr "" +"Project-Id-Version: bash-4.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2017-06-21 17:08+0300\n" +"Last-Translator: Lefteris Dimitroulakis \n" +"Language-Team: Greek \n" +"Language: el\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 1.5\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "κακός δείκτης πίνακα" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: αφαίρεση του χαρακτηριστικού nameref " + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: αδυναμία μετατροπής indexed πίνακα σε associative πίνακα " + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: μη έγκυρο κλειδί associative πίνακα " + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: αδυναμία εκχώρησης σε μη αριθμητικό δείκτη " + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: αδυναμία δημιουργίας: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: δεν μπορώ να βρω keymap για εντολή" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: ο πρώτος μη-λευκό διάστημα χαρακτήρας δεν είναι «\"» " + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "όχι «%c» κλεισήματος σε %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: απουσιάζει διαχωριστής δίστιγμο " + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: αδυναμία αποσύνδεσης" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace expansion: αδυναμία εκχώρησης μνήμης για %s " + +#: braces.c:406 +#, fuzzy, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace expansion: αδυναμία εκχώρησης μνήμης για %d στοιχεία " + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace expansion: αδυναμία εκχώρησης μνήμης για «%s»" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "«%s»: μη έγκυρο ψευδώνημο" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "μη ενεργοποιημένο line editing" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "«%s»: μη έγκυρο όνομα keymap" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: αδυναμία ανάγνωσης: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "«%s»: άγνωστο όνομα συνάρτησης" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s δεν έχει συνδεθεί με κανένα πλήκτρο.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s μπορεί να κληθεί μέσω " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: αδυναμία αποσύνδεσης" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "αριθμός βρόχων" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "έχει μόνο νόημα σε ένα βρόχο «for», «while», ή «until»" + +#: builtins/caller.def:136 +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME δεν έχει οριστεί" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "πάρα πολλά ορίσματα" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "κατάλογος nul" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD δεν έχει οριστεί" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "γραμμή %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "προειδοποίηση: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: χρήση: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: η επιλογή απαιτεί όρισμα" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: απαιτείται αριθμητικό όρισμα" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: δεν βρέθηκε" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: μη έγκυρη επιλογή" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: μη έγκυρο όνομα επιλογής" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "«%s»: μή έγκυρο αναγνωριστικό " + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "μη έγκυρος οκταδικός αριθμός" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "μη έγκυρος εξαδικός αριθμός" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "μη έγκυρος αριθμός" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: μη έγκυρη προδιαγραφή σήματος" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "«%s»: όχι pid ή έγκυρο job spec" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: μεταβλητή μόνο για ανάγνωση" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s εκτός ορίων" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "όρισμα" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s εκτός ορίων" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: δεν υπάρχει τέτοια εργασία" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: όχι έλεγχος εγασιών " + +#: builtins/common.c:294 +msgid "no job control" +msgstr "όχι έλεγχος εργασιών" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: περιορισμένο " + +#: builtins/common.c:306 +msgid "restricted" +msgstr "περιορισμένο" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: όχι ένα builtin κελύφους " + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "σφάλμα εγγραφής: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "σφάλμα κατά τον ορισμό των χαρακτηριστικών τερματικού: %s " + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "σφάλμα κατά την λήψη των χαρακτηριστικών τερματικού: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: σφάλμα κατά την ανάκτηση τρέχοντος καταλόγου: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: ασαφείς προδιαγραφές εργασίας" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "βοήθεια μη διαθέσιμη σ' αυτήν την έκδοση " + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: αδυναμία unset: %s μόνο για ανάγνωση" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: αδυναμία «unset»" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: μη έγκυρο όνομα ενέργειας" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: δεν υπάρχει προδιαγραφή συμπλήρωσης" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "προειδοποίηση: η επιλογή -F μπορεί να μη δουλέψει όπως περιμένεις" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "προειδοποίηση: η επιλογή -C ίσως δεν δουλέψει όπως αναμένετε" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "η λειτουργία συμπλήρωσης δεν εκτελείται επί του παρόντος " + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "μπορεί να χρησιμοποιηθεί μόνο μέσα σε συνάρτηση" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: η μεταβλητή αναφοράς δεν μπορεί να είναι πίνακας " + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref αυτοαναφορά μεταβλητής δεν επιτρέπεται " + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: κυκλική αναφορά ονόματος " + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: μη έγκυρο όνομα μεταβλητής για όνομα αναφοράς " + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "" +"η επιλογή «-f» δεν μπορεί να χρησιμοποιηθεί για τη δημιουργία συναρτήσεων" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: συνάρτηση μόνο για ανάγνωση" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: η σύνθετη εκχώρηση πίνακα απορρίφθηκε" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: αδυναμία καταστροφής μεταβλητής πίνακα κατ' αυτόν τον τρόπο " + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: αδυναμία μετατροπής associative πίνακα σε indexed πίνακα " + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "δυναμική φόρτωση μη διαθέσημη" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "αδυναμία ανοίγματος κοινόχρηστου αντικειμένου %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "αδυναμία εύρεσης %s στο κοινόχρηστο αντικείμενο %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: δεν φορτώθηκε δυναμικά" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "Η συνάρτηση φορτώματος του %s επιστρέφει λάθος (%d): δεν φορτώθηκε " + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: δεν φορτώθηκε δυναμικά" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: αδυναμία διαγραφής: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: είναι κατάλογος" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: όχι κανονικό αρχείο" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: αρχείο πολύ μεγάλο" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: αδυναμία εκτέλεσης δυαδικού αρχείου" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: αδυναμία εκτέλεσης: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "όχι login shell: χρησιμοποίησε «exit»" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Υπάρχουν σταματημένες εργασίες.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Υπάρχουν εργασίες που τρέχουν.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "δεν βρέθηκε εντολή" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "history specification" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: αδυναμία ανοίγματος προσωρινού αρχείου: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "τρέχων" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "η εργασία %d ξεκίνησε χωρίς έλεγχο εργασιών " + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: μη επιτρεπόμενη επιλογή -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: η επιλογή απαιτεί ένα όρισμα -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing απενεργοποιημένο " + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: πίνακας hash κενός\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tcommand\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Εντολές κελύφους που ταιριάζουν στη λέξη-κλειδί `" +msgstr[1] "Εντολές κελύφους που ταιριάζουν στις λέξεις-κλειδί" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"ουδεμία βοήθεια ταιριάζει με «%s». Δοκιμάστε «help help» ή «man -k %s» ή " +"«info %s»." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: αδυναμία ανοίγματος: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Αυτές οι εντολές ορίζονται εσωτερικά. Δώσε «help» για να δεις την λίστα.\n" +"Δώσε «help name» για να δεις περισσότερα για την συνάρτηση «name».\n" +"Χρησιμοποίησε «info bash» για να βρεις περισσότερα σχετικά με το κέλυφος.\n" +"Χρησιμοποίησε «man -k» ή «info» για να βρεις περισσότερα για εντολές από την " +"λίστα.\n" +"\n" +"Αστερίσκος (*) δίπλα στο όνομα σημαίνει ότι η εντολή είναι " +"απενεργοποιημένη.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "δεν μπορώ να χρησιμοποιήσω περισσότερες της μιας από τις -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "θέση στο ιστορικό" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: μη έγκυρη χρονοσήμανση" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: αποτυχία inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "δεν επιτρέπονται άλλες επιλογές με την «-x»" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: ορίσματα πρέπει να είναι ID διεργασιών ή εργασιών" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Άγνωστο σφάλμα" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "αναμενόταν έκφραση" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: μη δικτοδοτημένος πίνακας" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: μη έγκυρη προδιαγραφή περιγραφέα αρχείου" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: μη έγκυρος περιγραφέας αρχείου: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: μη έγκυρος αριθμός γραμμής" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: μη έγκυρη αρχή πίνακα " + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: μη έγκυρο κβάντο του callback " + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "όνομα μεταβλητής πίνακα κενό " + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "απαιτείται υποστήριξη μεταβλητής πίνακος" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "«%s»: απουσία χαρακτήρα φορμαρίσματος " + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: μη έγκυρη προδιαγραφή για φορμά χρόνου" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "«%c»: μη έγκυρος χαρακτήρας φορμαρίσματος" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "προειδοποίηση: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "πρόβλημα ανάλυσης του format: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "απουσία hex ψηφίου για \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "απουσία ψηφίου unicode για \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "όχι άλλος κατάλογος" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: μη έγκυρο όρισμα" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<όχι τρέχων κατάλογος>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "κενή στίβα καταλόγου" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "δείκτης στοίβας καταλόγου" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: μη έγκυρη προδιαγραφή timeout " + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "σφάλμα ανάγνωσης: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "«επιστροφή» είναι μόνο δυνατή από συνάρτηση ή sourced script " + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "«unset» δεν μπορεί να εφαρμοστεί συγχρόνως σε συνάρτηση και μεταβλητή" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: δεν είναι μεταβλητή πίνακα" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: δεν είναι συνάρτηση" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: αδυναμία εξαγωγής" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "αριθμός του « shift »" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" +"οι επιλογές κελύφους δεν είναι δυνατόν συγχρόνως να ενεργοποιηθούν και " +"απενεργοποιηθούν" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: μη έγκυρο όνομα επιλογής" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "απαιτείται όνομα αρχείου για όρισμα" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: αρχείο δεν βρέθηκε" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "αναστολή αδύνατη " + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "ένα κέλυφος σύνδεσης δεν μπορεί ν' ανασταλεί " + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s είναι ψευδώνημο του «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s αποτελεί δεσμευμένη λέξη του κελύφους\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s είναι συνάρτηση\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s είναι ένα ειδικό builtin\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s είναι ένα builtin κελύφους\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s είναι %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s is hashed (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: μη έγκυρο όρισμα ορίου" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "«%c»: λάθος διαταγή" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: αδύνατον να πάρω το όριο: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "όριο" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: αδυναμία μεταβολής ορίου: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "οκταδικός αριθμός" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': μη έγκυρος τελεστής συμβολικού mode" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': μη έγκυρος χαρακτήρας συμβολικού mode " + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " γραμμή " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "τελευταία εντολή: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Ακύρωση..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:462 +msgid "unknown command error" +msgstr "σφάλμα άγνωστης εντολής" + +#: error.c:463 +msgid "bad command type" +msgstr "λάθος τύπος εντολής" + +#: error.c:464 +msgid "bad connector" +msgstr "bad connector" + +#: error.c:465 +msgid "bad jump" +msgstr "κακό άλμα" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: μεταβλητή χωρίς σύνδεση " + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aη αναμονή για δεδομένα έληξε: αυτόματη αποσύνδεση\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "αδυναμία ανακατεύθυνσης τυπικής εισόδου από /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: «%c»: μη έγκυρος χαρακτήρας μορφοποίησης" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] υφίσταται ακόμη " + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "pipe error" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: μέγιστο επίπεδο φωλιάσματος eval ξεπεράστηκε (%d) " + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: μέγιστο επίπεδο φωλιάσματος source ξεπεράστηκε (%d) " + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: μέγιστο επίπεδο φωλιάσματος συνάρτησης ξεπεράστηκε (%d) " + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: περιορισμός: δεν μπορεί να περιέχεται «/» σε όνομα εντολής" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: εντολή δεν βρέθηκε" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: κακός interpreter " + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: αδυναμία εκτέλεσης δυαδικού αρχείου: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "«%s»: είναι ειδικό builtin" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "αδυναμία αντιγραφής του fd %d στον fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "συντακτικό σφάλμα στην έκφραση" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "απόπειρα ανάθεσης σε μη-μεταβλητή" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "συντακτικό σφάλμα στην έκφραση" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "διαίρεση διά 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bug: κακό σύμβολο για expassign " + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "«:» αναμενόταν για μια έκφραση υπό συνθήκη" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "εκθέτης μικρότερος του 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "αναγνωριστικό αναμενόταν μετά από pre-increment ή pre-decrement " + +#: expr.c:1056 +msgid "missing `)'" +msgstr "λείπει «)»" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntax error: αναμενόταν τελεστέος" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntax error: μη έγκυρος αριθμητικός τελεστής" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (το λανθασμένο σύμβολο είναι \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "μη έγκυρη αριθμητική βάση" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: μη έγκυρος αριθμός γραμμής" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "τιμή πολύ μεγάλη για βάση" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: σφάλμα έκφρασης\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: αδυναμία πρόσβασης στο γονικό κατάλογο" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "αδυναμία επανάταξης nodelay mode για fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"αδυναμία εκχώρησης νέου περιγραφέα αρχείου για είσοδο του bash από fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: ο buffer υπάρχει ήδη για νέο fd %d " + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "η διεργασία κλώνος %d εμφανίζεται στην εργασία που τρέχει %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "διαγραφή σταματημένης εγασίας %d με ομάδα %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) μαρκαρισμένη ως ακόμα ζωντανή " + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: δεν υπάρχει τέτοιο pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Σήμα %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Done" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "σταματημένο" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "σταματημένο(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "υπό εκτέλεση" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Done(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Έξοδος %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Άγνωστη κατάσταση" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core dumped) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "child setpgid (%ld to %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: διεργασία %ld δεν αποτελεί θυγατρική αυτού του κελύφους" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Δεν υπάρχουν στοιχεία για διεργασία %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: η εργασία %d είναι σταματημένη" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: δεν υπάρχει τέτοια εργασία" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: η εργασία τερματίστηκε" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: εργασία %d ήδη στο παρασκήνιο" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" +"waitchld: ενεργοποίηση WNOHANG ώστε ν' αποφευχθεί οριστικό μπλοκάρισμα " + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: γραμμή %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core dumped)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(τώρα wd: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: αποτυχία getpgrp" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "αδυναμία ρύθμισης της ομάδας της διεργασίας του τερματικού (%d) " + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "δεν υπάρχει job control σ'αυτό το κέλυφος" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: αποτυχημένη assertion: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "άγνωστο" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: κλήθηκε με όρισμα ήδη ελευθερωμένο μπλοκ " + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: κλήθηκε με όρισμα ένα μη εκχωρημένο μπλοκ " + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: εντοπίστηκε αρνητική υπερχείληση, mh_nbytes εκτός ορίου " + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: εντοπίστηκε αρνητική υπερχείληση, mh_nbytes εκτός ορίου " + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: τα μεγέθη των κομματιών στην αρχή και το τέλος διαφέρουν " + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: κλήθηκε με όρισμα ένα μη εκχωρημένο μπλοκ " + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: εντοπίστηκε αρνητική υπερχείληση, mh_nbytes εκτός ορίου" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: εντοπίστηκε αρνητική υπερχείληση, mh_nbytes εκτός ορίου" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: μεγέθη κομματιών σ' αρχή και τέλος διαφέρουν " + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: πίνακας alloc γεμάτος με FIND_ALLOC;\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p ήδη στον πίνακα ως εκχωρισμένος;\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p ήδη στον πίνακα ως ελεύθερος;\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "μη έγκυρη βάση" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: άγνωστος host" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: μη έγκυρη υπηρεσία" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: κακιά προδιαγραφή διαδρομής δικτύου " + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "μη υποστηριζόμενες δικτιακές υπηρεσίες" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: αδυναμία μεταβολής locale (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: αδυναμία μεταβολής locale (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: αδυναμία μεταβολής locale (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: αδυναμία μεταβολής locale (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Έχεις μήνυμα στο $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Έχεις νέο μήνυμα στο $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Το μήνυμα στο %s διαβάστηκε\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "syntax error: απαιτείται αριθμητική έκφραση" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "συντακτικό σφάλμα: δεν αναμενόταν «;»" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "συντακτικό σφάλμα: «((%s))»" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: ο τύπος οδηγίας δεν είναι σωστός %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document στη γραμμή %d με όριο το τέλος του αρχείου (αντί του «%s»)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: η οδηγία της ανακατεύθυνσης «%d» εκτός ορίων" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) υπερβαίνει το SIZE_MAX (%lu): γραμμή " +"κόπηκε " + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "ο μέγιστος αριθμός here-document ξεπεράστηκε " + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "μη αναμενόμενο EOF κατά την αναζήτηση «%c»" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "μη αναμενόμενο EOF ενώ έψαχνα για «]]»" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntax error in conditional expression: μη αναμενόμενο σύμβολο «%s»" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "συντακτικό σφάλμα σ' έκφραση υπό συνθήκη " + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "μη αναμενόμενο σύμβολο «%s», αναμενόταν «)»" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "αναμενόταν «)»" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "απροσδόκητο όρισμα «%s» στον υπό αίρεση μοναδιαίο τελεστή " + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "απροσδόκητο όρισμα για τον μοναδιαίο τελεστή " + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "απροσδόκητο σύμβολο «%s» βρέθηκε αντί για δυαδικό τελεστή υπό αίρεση " + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "αναμενόταν δυαδικός τελεστής υπό αίρεση " + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "απροσδόκητο όρισμα «%s» για δυαδικό τελεστή υπό αίρεση " + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "απροσδόκητο όρισμα για δυαδικό τελεστή υπό αίρεση " + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "απροσδόκητο σύμβολο «%c» σε εντολή υπό αίρεση " + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "απροσδόκητο σύμβολο «%s» σε εντολή υπό αίρεση " + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "απροσδόκητο σύμβολο %d σε εντολή υπό αίρεση " + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "συντακτικό σφάλμα κοντά στο μη αναμενόμενο σύμβολο «%s»" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "συντακτικό σφάλμα κοντά σε «%s»" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "syntax error: μη αναμενόμενο τέλος αρχείου" + +#: parse.y:6365 +msgid "syntax error" +msgstr "συντακτικό σφάλμα" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Χρήση «%s» για έξοδο από το κέλυφος.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "μη αναμενόμενο EOF ενώ έψαχνα «)»" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: η συνάρτηση «%s» δεν βρέθηκε" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: μη έγκυρος περιγραφέας αρχείου" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL file pointer" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: «%c»: μη έγκυρη μορφή χαρακτήρα" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "περιγραφέας αρχείου εκτός ορίων" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: ασαφής ανακατεύθυνση" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: αδυναμία εγγραφής πάνω σε υπάρχον αρχείο" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restricted: αδυναμία ανακατεύθυνσης εξόδου" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "αδυναμία δημιουργίας προσωρινού αρχείου για here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: αδυναμία ανάθεσης fd σε μεταβλητή" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port δεν υποστηρίζεται χωρίς δικτύωση" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "δεν μπόρεσα να βρω /tmp, παρακαλώ να τον δημιουργήσετε!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp πρέπει να είναι ένα έγκυρο όνομα αρχείου" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: μη έγκυρη επιλογή" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "αδυναμία ρύθμισης uid σε %d: effective uid %d " + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "αδυναμί ρύθμισης gid σε %d: effective gid %d " + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "αδυναμία εκκίνησης του debugger, debugging απενεργοποιημένο " + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: είναι κατάλογος" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Δεν έχω όνομα!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, έκδοση %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Χρήση:\t%s [μακρά επιλογή GNU] [επιλογή] ...\n" +"\t%s [μακρά επιλογή GNU] [επιλοη] script-file ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Μακρές επιλογές GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Επιλογές κελύφους:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD ή -c εντολή ή -O shopt_option\t\t(invocation only)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ή επιλογή -o\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Πληκτρολόγησε «%s -c \"help set\"» για πληροφορίες επί των επιλογών " +"κελύφους.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Πληκτρολόγησε «%s -c help» για περισσότερες πληροφορίες σχετικά με τις " +"ενσωματομένες στο κέλυφος εντολές.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Χρησιμοποίησε την εντολή «bashbug» για αναφορά σφαλμάτων.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "σελίδα του bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Γενική βοήθεια για την χρήση του λογισμικού GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: μη έγκυρη λειτουργία" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Ψεύτικο σήματος " + +#: siglist.c:50 +msgid "Hangup" +msgstr "Hangup" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Διακοπή" + +#: siglist.c:58 +msgid "Quit" +msgstr "Quit" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Μη έγκυρη οδηγία" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "οδηγία ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "οδηγία EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Εξαίρεση κινητής υποδιαστολής" + +#: siglist.c:86 +msgid "Killed" +msgstr "Killed" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bus error" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Σφάλμα κατάτμησης" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Κακή κλήση συστήματος " + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Σπασμένη σωλήνα" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Ρολόι συναγερμού" + +#: siglist.c:110 +msgid "Terminated" +msgstr "τερματισμός" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Επείγουσα κατάσταση IO" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Σταματημένο (σήμα)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Συνέχεια" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Child death or stop" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Σταματημένο (είσοδος tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Σταματημένο (έξοδος tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O ready" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "όριο CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Όριο αρχείου" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profile)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Παράθυρο άλλαξε" + +#: siglist.c:170 +msgid "Record lock" +msgstr "" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Σήμα χρήστη 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Σήμα χρήστη 2 " + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Δεδομένα εισόδου HFT στην αναμονή" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "επικείμενη έλλειψη ρεύματος" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "επικείμενη πτώση συστήματος" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "μετανάστευση διεργασίας σε άλλη CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "προγραμματιστικό σφάλμα" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "" + +#: siglist.c:214 +msgid "Information request" +msgstr "Αίτηση για πληροφορίες" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Άγνωστο σήμα #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "κακή αντικατάσταση: όχι «%s» που κλείνει στο %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: αδυναμία εκχώρησης λίστας σε στοιχείο του πίνακα " + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "αδυναμία δημιουργίας σωλήνα για αντικατάσταση διεργασίας " + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "αδυναμία δημιουργίας θυγατρικής για αντικατάσταση διεργασίας " + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "αδυναμία ανοίγματοε επώνυμης σωλήνας %s προς ανάγνωση" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "αδυναμία ανοίγματος επώνυμης σωλήνας %s προς εγγραφή" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "αδυναμία αναπαραγωγής named pipe %s ως fd %d " + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "αντικατάσταση εντολής: null byte αγνοήθηκε στην είσοδο " + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "αδυναμία δημιουργίας σωλήνα για αντικατάσταση εντολής " + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "αδυναμία δημιουργίας θυγατρικής για αντικατάσταση εντολής " + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: αδυναμία αναπαραγωγής σωλήνα ως fd 1 " + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: μη έγκυρο όνομα μεταβλητής ως όνομα αναφοράς " + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: μη έγκυρη έμμεση επέκταση " + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: μη έγκυρο όνομα μεταβλητής" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: παράμετρος κενή ή δεν έχει οριστεί" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: παράμετρος κενή ή δεν έχει οριστεί" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: έκφραση αρνητική < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: κακή αντικατάσταση" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: αδύνατη ανάθεση κατ' αυτόν τον τρόπο" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"μελλοντικές εκδόσεις του κελύφους θα επιβάλουν την αποτίμηση ως μια " +"αριθμητική αντικατάσταση" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "κακή αντικατάσταση: δεν υπάρχει «`» που κλείνει στο %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "χωρίς ταίριασμα: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "αναμενόταν όρισμα" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: αναμενόταν ως έκφραση ακέραιος αριθμός" + +#: test.c:265 +msgid "`)' expected" +msgstr "αναμενόταν «)»" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "σναμενόταν «)», βρέθηκε %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: αναμενόταν δυαδικός τελεστής" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: αναμενόταν μοναδιαίος τελεστής " + +#: test.c:881 +msgid "missing `]'" +msgstr "απούσα «]»" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "συντακτικό σφάλμα: δεν αναμενόταν «;»" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "μη έγκυρος αριθμός σήματος" + +#: trap.c:325 +#, fuzzy, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: μέγιστο επίπεδο φωλιάσματος eval ξεπεράστηκε (%d) " + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: κακή τιμή στην trap_list[%d]: %p " + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: ο διαχειριστής σήματος είναι ο SIG_DFL, στέλνει %d (%s) " +"σε μένα " + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: κακό σήμα %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "σφάλμα κατά την εισαγωγή του ορισμού της συνάρτησης «%s»" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "επίπεδο κελύφους (%d) πολύ υψηλό, επαναφορά στο 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: no function context at current scope" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: η μεταβλητή δεν μπορεί να δεχτεί τιμή " + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s έχει κενό exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "ο χαρακτήρας %d δεν έίναι έγκυρος στην exportstr για %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "απουσία «=» στην exportstr για %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: head of shell_variables not a function context" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: no global_variables context" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: head of shell_variables not a temporary environment scope" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: αδυναμία ανοίγματος ως ΑΡΧΕΙΟ" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: μη έγκυρη τιμή για trace file descriptor" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: τιμή συμβατότητας εκτός ορίου " + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2016 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"License GPLv3+: GNU GPL έκδοση 3 ή νεώτερη \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, έκδοση %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: αδυναμία εκχώρησης %lu bytes (%lu bytes εκχωρήθηκαν)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: αδυναμία εκχώρησης %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: αδυναμία εκχώρησης %lu bytes (%lu bytes εκχωρήθηκαν)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: αδυναμία εκχώρησης %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [name[=value] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] name [name ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function ή readline-command]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [name[=value] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] name[=value] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] name[=value] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filename] [name ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [pattern ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d offset] [n] ή history -anrw [filename] ή history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] ή export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] ή readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filename [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". όνομα αρχείου [ορίσματα]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] name [name ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMMANDS; do COMMANDS; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMMANDS; do COMMANDS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAME] command [redirections]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { COMMANDS ; } ή name () { COMMANDS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMMANDS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expression ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expression ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Ονόματα και σημασία ορισμένων μεταβλητών του κελύφους" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optname ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [ορίσματα]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " +"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DE] [name ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " +"quantum] [array]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Αφαίρεση κάθε ΟΝΟΜΑτος από τη λίστα των καθορισμένων ψευδωνύμων.\n" +" \n" +" Επιλογές:\n" +" -a\tαφαίρεση όλων των ψευδωνύμων.\n" +" \n" +" Επιστρέφει επιτυχία εκτός αν το ΟΝΟΜΑ δεν είναι υπαρκτό ψευδώνυμο." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Ξαναρχίζει τους βρόχους for, while, ή until.\n" +" \n" +" Ξαναρχίζει την επόμενη επανάληψη του βρόχου FOR, WHILE ή UNTIL .\n" +" Αν N είναι ορισμένο, ξαναρχίζει το N-στο βρόχο.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Ο κωδικός εξόδου είναι 0 εκτός αν το N δεν είναι μαγαλύτερο ή ίσον του 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Εμφάνιση του ονόματος του τρέχοντος καταλόγου εργασίας.\n" +" \n" +" Επιλογές:\n" +" -L\tεμφάνιση της τιμής της $PWD if it names the current working\n" +" \tdirectory\n" +" -P\tεμφάνιση του φυσικού καταλόγου, χωρίς συμβολικούς συνδέσμους\n" +" \n" +" Από προεπιλογή, η «pwd» συμπεριφέρεται σαν να είχε δωθεί «-L» .\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει 0 εκτός αν δίνεται μη έγκυρη επιλογή ή ο τρέχων κατάλογος\n" +" δεν μπορεί να διαβαστεί." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Εντολή Null.\n" +" \n" +" Κανένα αποτέλεσμα, η εντολή δεν κάνει τίποτα.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Πάντα επιτυχία." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Επιστρέφει επιτυχημένο αποτέλεσμα.\n" +" \n" +" Κατάσταση Εξόδου:\n" +" Πάντοτε επιτυχία." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Επιστρέφει αποτυχημένο αποτέλεσμα.\n" +" \n" +" Κατάσταση Εξόδου:\n" +" Πάντοτε αποτυχία." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Καθορίζει τιμές και χαρακτηριστκά μεταβλητής.\n" +" \n" +" Συνώνημο με «declare». Βλέπε «help declare»." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Γράφει ορίσματα στη κανονική έξοδο.\n" +" \n" +" Εμφανίζει τα ARG, χωρισμένα από χαρακτήρες απλού διαστήματος " +"ακολουθούμενα από\n" +" νέα γραμμή, στη τυπική έξοδο.\n" +" \n" +" Έπιλογές:\n" +" -n\tδεν επισυνάπτεται νέα γραμμή\n" +" -e\tενεργοποίηση ερμηνείας των παρακάτω backslash διαφυγής\n" +" -E\tρητή απενεργοποίηση ερμηνείας του backslash διαφυγής\n" +" \n" +" η «echo» ερμηνεύει τους επόμενους backslash-escaped χαρακτήρες:\n" +" \\a\tσυναγερμός (κουδούνι)\n" +" \\b\tbackspace\n" +" \\c\tκαταστέλλει την παραπέρα έξοδο\n" +" \\e\tχαρακτήρας διαφυγής\n" +" \\E\tχαρακτήρας διαφυγής\n" +" \\f\tνέα σελίδα\n" +" \\n\tνέα γραμμή\n" +" \\r\tcarriage return\n" +" \\t\tοριζόντιο tab\n" +" \\v\tκατακόρυφο tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tο χαρακτήρας με κωδικό ASCII NNN (οκταδικός), ο NNN μπορεί\n" +" \t\tνα είναι 0 έως 3 οκταδικά ψηφία\n" +" \\xHH\tο οκταδικός χαρακτήρας με τιμή HH (εξαδικός), ο HH\n" +" \t\tμπορεί να είναι ένα ή δύο εξαδικά ψηφία\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία εκτός αν συμβεί λάθος εγγραφής. " + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Γράφει ορίσματα στην κανονική έξοδο.\n" +" \n" +" Εμφανίζει στην κανονική έξοδο τα ARG ακολουθούμενα από μια νέα γραμμή.\n" +" \n" +" Επιλογή:\n" +" -n\tδεν επισυνάπτεις μια νέα γραμμή\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία εκτός αν συμβεί σφάλμα. " + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Εκτελεί ορίσματα σαν να είναι εντολή κελύφους.\n" +" \n" +" Συνδιάζει ARGs σε μια μοναδική συμβολοσειρά, χρησιμοποιεί το αποτέλεσμα " +"ως είσοδο στο κέλυφος,\n" +" και εκτελεί τις εντολές που προκύπτουν.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει τον ίδιο κωδικό εξόδου με την εντολή ή επιτυχία αν ή εντολή " +"είναι κενή. " + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Τερματισμός του κελύφους.\n" +" \n" +" Τερματισμός κελύφους με κωδικό N. Αν το N παραληφθεί, η κατάσταση " +"εξόδου\n" +" είναι αυτή της τελευταίας εκτελεσμένης εντολής." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Τερματισμός ενός κελύφους σύνδεσης.\n" +" \n" +" Τερματίζει ένα κέλυφος σύνδεσης με κατάσταση εξόδου N. Επιστρέφει σφάλμα " +"αν δεν εκτελείται\n" +" σ' ένα κέλυφος σύνδεσης. " + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Μετακίνηση της εργασίας στο προσκήνιο.\n" +" \n" +" Βάζει την εργασία που ορίζεται από JOB_SPEC στο προσκήνιο, κάνοντάς την\n" +" την τρέχουσα εργασία. Αν δεν δίνεται η JOB_SPEC, τότε χρησιμοποιείται η " +"αντίληψη\n" +" που έχει το κέλυφος ως τρέχουσα εργασία.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Η κατάσταση της εργασίας που μπήκε στο προσκήνιο, ή κωδικός αποτυχίας " +"στην περίπτωση σφάλματος." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Μετακινεί εργασίες στο παρασκήνιο.\n" +" \n" +" Τοποθετεί τις εργασίες που ορίζονται από κάθε JOB_SPEC στο παρασκήνιο,\n" +" όπως αν άρχισαν με «&». Αν δεν δίνεται η JOB_SPEC, τότε χρησιμοποιείται " +"ή αντίληψη που έχει το κέλυφος\n" +" ως τρέχουσα εργασία.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφεται επιτυχία εκτός αν δεν έχει ενεργοποιηθεί job control ή έχει " +"συμβεί σφάλμα." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Αφαίρεση εργασιών από το τρέχον κέλυφος.\n" +" \n" +" Αφαιρεί κάθε όρισμα JOBSPEC από τον πίνακα ενεργών εργασιών. Στην " +"απουσία\n" +" JOBSPEC, τότε το κέλυφος χρησιμοποιεί την ιδέα που έχει περί της " +"τρέχουσας εργασίας.\n" +" \n" +" Επιλογές:\n" +" -a\tαφαιρεί όλες τις εργασίες αν δεν δοθεί JOBSPEC\n" +" -h\tσημαδεύει κάθε JOBSPEC έτσι ώστε το SIGHUP δεν στέλνεται στην " +"εργασία\n" +" \t\tαν το κέλυφος δεχτεί ένα σήμα SIGHUP\n" +" -r\tαφαιρεί μόνο εκτελούμενες εργασίες\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία εκτός αν έχει δοθεί μη έγκυρη επιλογή ή JOBSPEC." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Ολίσθηση θεσιακών παραμέτρων.\n" +" \n" +" Μετονομασία των θεσιακών παραμέτρων $N+1,$N+2 ... to $1,$2 ... Αν N\n" +" δεν δίνεται, υποτίθεται πως είναι 1.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία εκτός αν N είναι αρνητικός ή μαγαλύτερο; από $#. " + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Αποτίμηση δυνητικής έκφρασης.\n" +" \n" +" Τερματίζεται με κωδικό 0 (αληθής) ή 1 (ψευδής) ανάλογα\n" +" με την αποτίμηση της EXPR. Η έκφραση μπορεί να είναι μοναδιαία ή " +"δυαδική. Μοναδιαίες\n" +" εκφράσεις χρησιμοποιούνται συχνά για την εξέταση της κατάστασης " +"αρχείου. Υπάρχουν\n" +" τελεστές αλφαριθμητικών όπως και συγκρίσεως αριθμών.\n" +" \n" +" Η συμπεριφορά των τεστ εξαρτάται από τον αριθμό των ορισμάτων. " +"Αναφερθείτε\n" +" στη σελίδα εγχειριδίου του bash για τις ολοκληρωμένες προδιαγραφές.\n" +" \n" +" Τελεστές αρχείων:\n" +" \n" +" -a ΑΡΧΕΙΟ Αληθής αν το αρχείο υπάρχει.\n" +" -b ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι ειδικό αρχείο μπλοκ.\n" +" -c ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι ειδικό αρχείο χαρακτήρων.\n" +" -d ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι κατάλογος.\n" +" -e ΑΡΧΕΙΟ Αληθής αν το αρχείο υπάρχει.\n" +" -f ΑΡΧΕΙΟ Αληθής αν το αρχείο υπάρχει και είναι κανονικό " +"αρχείο.\n" +" -g ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι «set-group-id».\n" +" -h ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι συμβολικός σύνδεσμος.\n" +" -L ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι συμβολικός σύνδεσμος.\n" +" -k ΑΡΧΕΙΟ Αληθής αν το αρχείο έχει ορισμένο το bit «sticky».\n" +" -p ΑΡΧΕΙΟ Αληθής αν το αρχείο μια named pipe.\n" +" -r ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι αναγνώσιμο από εσάς.\n" +" -s ΑΡΧΕΙΟ Αληθής αν το αρχείο υπάρχει και δεν είναι κενό.\n" +" -S ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι ένα socket.\n" +" -t FD Αληθής αν ο FD είναι ανοιγμένος σ' ενα " +"τερματικό.\n" +" -u ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι «set-user-id».\n" +" -w ΑΡΧΕΙΟ Αληθής αν το αρχείο εγγράψιμο από εσάς.\n" +" -x ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι εκτελέσιμο από εσάς.\n" +" -O ΑΡΧΕΙΟ Αληθής αν το αρχείο is effectively owned by you.\n" +" -G ΑΡΧΕΙΟ Αληθής αν το αρχείο is effectively owned by your " +"group.\n" +" -N ΑΡΧΕΙΟ Αληθής αν το αρχείο μεταβλήθηκε από την τελευταία " +"φορά που διαβάστηκε.\n" +" \n" +" ΑΡΧΕΙΟ1 -nt ΑΡΧΕΙΟ2 Αληθής αν το αρχείο1 είναι νεότερο από το αρχείο2 " +"(σύμφωνα\n" +" με την ημερομηνία τροποποίηση).\n" +" \n" +" ΑΡΧΕΙΟ1 -ot ΑΡΧΕΙΟ2 Αληθές αν αρχείο1 είναι παλαιότερο από το " +"αρχείο2.\n" +" \n" +" ΑΡΧΕΙΟ1 -ef ΑΡΧΕΙΟ2 Αληθές αν το αρχείο1 είναι hard link στο " +"αρχείο2.\n" +" \n" +" Τελεστές συμβολοσειράς:\n" +" \n" +" -z STRING Αληθές αν η συμβολοσειρά είναι κενή.\n" +" \n" +" -n STRING\n" +" STRING Αληθές αν η συμβολοσειρά δεν είναι κενή.\n" +" \n" +" STRING1 = STRING2\n" +" Αληθές αν οι συμβολοσειρές είναι ίσες.\n" +" STRING1 != STRING2\n" +" Αληθές αν οι συμβολοσειρές δεν είναι ίσες.\n" +" STRING1 < STRING2\n" +" Αληθές αν η STRING1 προηγείται λεξικογραφικά της " +"STRING2.\n" +" STRING1 > STRING2\n" +" Αληθές αν η STRING1 έπεται λεξικογραφικά της STRING2.\n" +" \n" +" Άλλοι τελεστές:\n" +" \n" +" -o OPTION Αληθές αν η επιλογή του κελύφους OPTION έχει " +"ενεργοποιηθεί.\n" +" -v VAR Αληθές αν η μεταβλητή VAR έχει οριστεί.\n" +" -R VAR Αληθές αν η μεταβλητή VAR έχει οριστεί και είναι όνομα\n" +" αναφοράς.\n" +" ! EXPR Αληθές αν η expr είναι ψευδής.\n" +" EXPR1 -a EXPR2 Αληθές αν αμφότερες οι expr1 ΚΑΙ expr2 είναι αληθείς.\n" +" EXPR1 -o EXPR2 Αληθές αν είτε η expr1 Ή η expr2 είναι αληθής.\n" +" \n" +" arg1 OP arg2 Αρηθμιτικά τεστ. OP είναι ένα από τα -eq, -ne,\n" +" -lt, -le, -gt, ή -ge.\n" +" \n" +" Αριθμητικοί δυαδικοί τελεστές επιστρέφουν αληθές αν ARG1 είναι ίσο, μη-" +"ίσο,\n" +" μικρότερο-από, μικρότερο-από-ή-ίσο, μεγαλύτερο-από, ή μεγαλύτερο-από-ή-" +"ίσο\n" +" από το ARG2.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία αν EXPR αποτιμάται σε αληθές, αποτυχία αν EXPR " +"αποτιμάται σε\n" +" ψευδές ή αν δίδεται ένα μη έγκυρο όρισμα." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Αποτιμά δυνητική έκφραση.\n" +" \n" +" Συνώνυμο με το «test» builtin, αλλά το τελευταίο όρισμα πρέπει\n" +"να είναι ένα «]», ώστε να κλείνει το αντίστοιχο «[»." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Εμφανίζει χρόνους διεργασιών.\n" +" \n" +" Εμφανίζει το χρόνο του χρήστη και συστήματος για το κέλυφος και όλες " +"τις\n" +" θυγατρικές διεργασίες.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Πάντα επιτυχία." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Εκτέλεση εντολών για μέλος μιας λίστας.\n" +" \n" +" Ο βρόχος «for» εκτελεί μια αλληλουχία εντολών για κάθε μέλος\n" +" μιας λίστας. Αν «in ΛΕΞΕΙΣ ...;» δεν δίνεται, τότε υποτίθεται η «in \"$@" +"\"».\n" +" Για κάθε στοιχείο στις ΛΕΞΕΙΣ, ΟΝΟΜΑ ορίζεται σ' αυτό το στοιχείο, και\n" +" οι ΕΝΤΟΛΕΣ εκτελούνται.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει την κατάσταση της τελευταίας εκτελεσμένης εντολής." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Αριθμητική βρόχου for.\n" +" \n" +" Ισοδύναμο με\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, και EXP3 είναι αριθμητικές εκφράσεις. Αν μια έκφραση\n" +" παραληφθεί, συμπεριφέρεται σαν να είχε αποτιμηθεί ίση με 1.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει τη κατάσταση της τελευταίας εκτελεσμένης εντολής." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Αποτίμηση αριθμητικής εκφράσεως.\n" +" \n" +" Η ΕΚΦΡΑΣΗ αποτιμάται σύμφωνα με τους αριθμητικούς κανόνες.\n" +" Ισοδύναμο με το \"let ΕΚΦΡΑΣΗ\".\n" +" \n" +" Κωδικός εξόδου:\n" +" Επιστρέφει 1 αν η ΕΚΦΡΑΣΗ αποτιμάται σε 0, αλλιώς επιστρέφει 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Διαβάζει γραμμές από αρχείο σε μεταβλητή τύπου πίνακα.\n" +" \n" +" Συνώνημο του «mapfile»." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Επιστρέφει το context της κλήσης της τρέχουσας υπορουτίνας.\n" +#~ " \n" +#~ " Χωρίς EXPR, επιστρέφει " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: διεργασία %5ld (%s) στη the_pipeline " + +#~ msgid "Unknown Signal #" +#~ msgstr "Άγνωστο σήμα #" diff --git a/bash-5.1/po/en@boldquot.gmo b/bash-5.1/po/en@boldquot.gmo new file mode 100644 index 0000000000000000000000000000000000000000..15cd5f1ffd73254d78738e793629d5d55baf343a Binary files /dev/null and b/bash-5.1/po/en@boldquot.gmo differ diff --git a/bash-5.1/po/en@boldquot.header b/bash-5.1/po/en@boldquot.header new file mode 100644 index 0000000000000000000000000000000000000000..fedb6a06d129acb554ccb20ba04e7ea5649aa2ac --- /dev/null +++ b/bash-5.1/po/en@boldquot.header @@ -0,0 +1,25 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# diff --git a/bash-5.1/po/en@boldquot.po b/bash-5.1/po/en@boldquot.po new file mode 100644 index 0000000000000000000000000000000000000000..edfa3c7d1b250e3108312108e3969f2240772a1d --- /dev/null +++ b/bash-5.1/po/en@boldquot.po @@ -0,0 +1,5898 @@ +# English translations for GNU bash package. +# Copyright (C) 2020 Free Software Foundation, Inc. +# This file is distributed under the same license as the GNU bash package. +# Automatically generated, 2020. +# +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# +msgid "" +msgstr "" +"Project-Id-Version: GNU bash 5.1-rc3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2020-11-28 12:51-0500\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "bad array subscript" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: removing nameref attribute" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: cannot convert indexed to associative array" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: invalid associative array key" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: cannot assign to non-numeric index" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: must use subscript when assigning associative array" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: cannot create: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: cannot find keymap for command" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: first non-whitespace character is not ‘\"’" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "no closing ‘%c’ in %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: missing colon separator" + +#: bashline.c:4555 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "‘%s’: cannot unbind in command keymap" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace expansion: cannot allocate memory for %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace expansion: failed to allocate memory for %u elements" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace expansion: failed to allocate memory for ‘%s’" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "‘%s’: invalid alias name" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "line editing not enabled" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "‘%s’: invalid keymap name" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: cannot read: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "‘%s’: unknown function name" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s is not bound to any keys.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s can be invoked via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "‘%s’: cannot unbind" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "loop count" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "only meaningful in a ‘for’, ‘while’, or ‘until’ loop" + +#: builtins/caller.def:136 +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns “$line $filename”. With EXPR, returns\n" +" “$line $subroutine $filename”; this extra information can be used " +"to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME not set" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "too many arguments" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null directory" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD not set" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "line %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "warning: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: usage: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: option requires an argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: numeric argument required" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: not found" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: invalid option" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: invalid option name" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "‘%s’: not a valid identifier" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "invalid octal number" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "invalid hex number" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "invalid number" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: invalid signal specification" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "‘%s’: not a pid or valid job spec" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: readonly variable" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s out of range" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s out of range" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: no such job" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: no job control" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "no job control" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: restricted" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "restricted" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: not a shell builtin" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "write error: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "error setting terminal attributes: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "error getting terminal attributes: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: error retrieving current directory: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: ambiguous job spec" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "help not available in this version" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: cannot unset: readonly %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: cannot unset" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: invalid action name" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: no completion specification" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "warning: -F option may not work as you expect" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "warning: -C option may not work as you expect" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "not currently executing completion function" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "can only be used in a function" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: reference variable cannot be an array" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref variable self references not allowed" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: circular name reference" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "‘%s’: invalid variable name for name reference" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "cannot use ‘-f’ to make functions" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: readonly function" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: quoted compound array assignment deprecated" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: cannot destroy array variables in this way" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: cannot convert associative to indexed array" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamic loading not available" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "cannot open shared object %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "cannot find %s in shared object %s: %s" + +#: builtins/enable.def:388 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dynamic builtin already loaded" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "load function for %s returns failure (%d): not loaded" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: not dynamically loaded" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: cannot delete: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: is a directory" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: not a regular file" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: file is too large" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: cannot execute binary file" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: cannot execute: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "not login shell: use ‘exit’" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "There are stopped jobs.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "There are running jobs.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "no command found" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "history specification" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: cannot open temp file: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "current" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "job %d started without job control" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: illegal option -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: option requires an argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing disabled" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hash table empty\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tcommand\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Shell commands matching keyword `" +msgstr[1] "Shell commands matching keywords `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"no help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ " +"or ‘info %s’." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: cannot open: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"These shell commands are defined internally. Type ‘help’ to see this " +"list.\n" +"Type ‘help name’ to find out more about the function ‘name’.\n" +"Use ‘info bash’ to find out more about the shell in general.\n" +"Use ‘man -k’ or ‘info’ to find out more about commands not in " +"this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "cannot use more than one of -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "history position" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: invalid timestamp" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: history expansion failed" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib failed" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "no other options allowed with ‘-x’" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: arguments must be process or job IDs" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Unknown error" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "expression expected" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: not an indexed array" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: invalid file descriptor specification" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: invalid file descriptor: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: invalid line count" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: invalid array origin" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: invalid callback quantum" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "empty array variable name" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "array variable support required" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "‘%s’: missing format character" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "‘%c’: invalid time format specification" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "‘%c’: invalid format character" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "warning: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "format parsing problem: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "missing hex digit for \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "missing unicode digit for \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "no other directory" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: invalid argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "directory stack empty" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "directory stack index" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the ‘pushd’ command; you can " +"get\n" +" back up through the list with the ‘popd’ command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by ‘dirs’, starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by ‘dirs’, starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The ‘dirs’ builtin displays the directory stack." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by ‘dirs’, starting with zero. For example: ‘popd " +"+0’\n" +" \tremoves the first directory, ‘popd +1’ the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by ‘dirs’, starting with zero. For example: ‘popd " +"-0’\n" +" \tremoves the last directory, ‘popd -1’ the next to last.\n" +" \n" +" The ‘dirs’ builtin displays the directory stack." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: invalid timeout specification" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "read error: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "can only ‘return’ from a function or sourced script" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "cannot simultaneously unset a function and a variable" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: not an array variable" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: not a function" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: cannot export" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift count" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "cannot set and unset shell options simultaneously" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: invalid shell option name" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "filename argument required" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: file not found" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "cannot suspend" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "cannot suspend a login shell" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s is aliased to ‘%s’\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s is a shell keyword\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s is a function\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s is a special shell builtin\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s is a shell builtin\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s is %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s is hashed (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: invalid limit argument" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "‘%c’: bad command" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: cannot get limit: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limit" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: cannot modify limit: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "octal number" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "‘%c’: invalid symbolic mode operator" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "‘%c’: invalid symbolic mode character" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " line " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "last command: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Aborting..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:462 +msgid "unknown command error" +msgstr "unknown command error" + +#: error.c:463 +msgid "bad command type" +msgstr "bad command type" + +#: error.c:464 +msgid "bad connector" +msgstr "bad connector" + +#: error.c:465 +msgid "bad jump" +msgstr "bad jump" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: unbound variable" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atimed out waiting for input: auto-logout\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "cannot redirect standard input from /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: ‘%c’: invalid format character" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] still exists" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "pipe error" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximum eval nesting level exceeded (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximum source nesting level exceeded (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restricted: cannot specify ‘/’ in command names" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: command not found" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: bad interpreter" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: cannot execute binary file: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "‘%s’: is a special builtin" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "cannot duplicate fd %d to fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "expression recursion level exceeded" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "recursion stack underflow" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "syntax error in expression" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "attempted assignment to non-variable" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "syntax error in variable assignment" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "division by 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bug: bad expassign token" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "‘:’ expected for conditional expression" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exponent less than 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "identifier expected after pre-increment or pre-decrement" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "missing ‘)’" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntax error: operand expected" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntax error: invalid arithmetic operator" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (error token is “%s”)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "invalid arithmetic base" + +#: expr.c:1582 +msgid "invalid integer constant" +msgstr "invalid integer constant" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "value too great for base" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: expression error\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: cannot access parent directories" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "cannot reset nodelay mode for fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "cannot allocate new file descriptor for bash input from fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer already exists for new fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "forked pid %d appears in running job %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "deleting stopped job %d with process group %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) marked as still alive" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: no such pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Done" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Stopped" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Stopped(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Running" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Done(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Exit %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Unknown status" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core dumped) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "child setpgid (%ld to %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld is not a child of this shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: No record of process %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: job %d is stopped" + +#: jobs.c:3564 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: no current jobs" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: job has terminated" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: job %d already in background" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: turning on WNOHANG to avoid indefinite block" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: line %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core dumped)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd now: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp failed" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: no job control in background" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: line discipline" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "cannot set terminal process group (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "no job control in this shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: failed assertion: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "unknown" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: block on free list clobbered" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: called with already freed block argument" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: called with unallocated block argument" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: underflow detected; mh_nbytes out of range" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underflow detected; magic8 corrupted" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: start and end chunk sizes differ" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: called with unallocated block argument" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: underflow detected; mh_nbytes out of range" + +#: lib/malloc/malloc.c:1141 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflow detected; magic8 corrupted" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: start and end chunk sizes differ" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: alloc table is full with FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p already in table as allocated?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p already in table as free?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "invalid base" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: host unknown" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: invalid service" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: bad network path specification" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "network operations not supported" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: cannot change locale (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: cannot change locale (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: cannot change locale (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: cannot change locale (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "You have mail in $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "You have new mail in $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "The mail in %s has been read\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "syntax error: arithmetic expression required" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "syntax error: ‘;’ unexpected" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntax error: ‘((%s))’" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: bad instruction type %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document at line %d delimited by end-of-file (wanted ‘%s’)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: redirection instruction ‘%d’ out of range" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "maximum here-document count exceeded" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "unexpected EOF while looking for matching ‘%c’" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "unexpected EOF while looking for ‘]]’" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntax error in conditional expression: unexpected token ‘%s’" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "syntax error in conditional expression" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "unexpected token ‘%s’, expected ‘)’" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "expected ‘)’" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "unexpected argument ‘%s’ to conditional unary operator" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "unexpected argument to conditional unary operator" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "unexpected token ‘%s’, conditional binary operator expected" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "conditional binary operator expected" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "unexpected argument ‘%s’ to conditional binary operator" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "unexpected argument to conditional binary operator" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "unexpected token ‘%c’ in conditional command" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "unexpected token ‘%s’ in conditional command" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "unexpected token %d in conditional command" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntax error near unexpected token ‘%s’" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntax error near ‘%s’" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "syntax error: unexpected end of file" + +#: parse.y:6365 +msgid "syntax error" +msgstr "syntax error" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Use “%s” to leave the shell.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "unexpected EOF while looking for matching ‘)’" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: function ‘%s’ not found" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possible retry loop" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: bad connector ‘%d’" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: invalid file descriptor" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL file pointer" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: ‘%c’: invalid format character" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "file descriptor out of range" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: ambiguous redirect" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: cannot overwrite existing file" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restricted: cannot redirect output" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "cannot create temp file for here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: cannot assign fd to variable" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port not supported without networking" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "redirection error: cannot duplicate fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "could not find /tmp, please create!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp must be a valid directory name" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pretty-printing mode ignored in interactive shells" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: invalid option" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "cannot set uid to %d: effective uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "cannot set gid to %d: effective gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "cannot start debugger; debugging mode disabled" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Is a directory" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "I have no name!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, version %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU long options:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Shell options:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s or -o option\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Type ‘%s -c “help set”’ for more information about shell " +"options.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Type ‘%s -c help’ for more information about shell builtin commands.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Use the ‘bashbug’ command to report bugs.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash home page: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "General help using GNU software: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: invalid operation" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Bogus signal" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Hangup" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interrupt" + +#: siglist.c:58 +msgid "Quit" +msgstr "Quit" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Illegal instruction" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT instruction" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT instruction" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Floating point exception" + +#: siglist.c:86 +msgid "Killed" +msgstr "Killed" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bus error" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Segmentation fault" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Bad system call" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Broken pipe" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Alarm clock" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminated" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Urgent IO condition" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Stopped (signal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continue" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Child death or stop" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Stopped (tty input)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Stopped (tty output)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O ready" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU limit" + +#: siglist.c:154 +msgid "File limit" +msgstr "File limit" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profile)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Window changed" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Record lock" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "User signal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "User signal 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT input data pending" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "power failure imminent" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "system crash imminent" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migrate process to another CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "programming error" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT monitor mode granted" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT monitor mode retracted" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT sound sequence has completed" + +#: siglist.c:214 +msgid "Information request" +msgstr "Information request" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Unknown Signal #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "bad substitution: no closing ‘%s’ in %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: cannot assign list to array member" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "cannot make pipe for process substitution" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "cannot make child for process substitution" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "cannot open named pipe %s for reading" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "cannot open named pipe %s for writing" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "cannot duplicate named pipe %s as fd %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "command substitution: ignored null byte in input" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "cannot make pipe for command substitution" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "cannot make child for command substitution" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: cannot duplicate pipe as fd 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: invalid variable name for name reference" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: invalid indirect expansion" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: invalid variable name" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter not set" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter null or not set" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: substring expression < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: bad substitution" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: cannot assign in this way" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "bad substitution: no closing “`” in %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "no match: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argument expected" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: integer expression expected" + +#: test.c:265 +msgid "`)' expected" +msgstr "‘)’ expected" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "‘)’ expected, found %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: binary operator expected" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: unary operator expected" + +#: test.c:881 +msgid "missing `]'" +msgstr "missing ‘]’" + +#: test.c:899 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntax error: ‘%s’ unexpected" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "invalid signal number" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: maximum trap handler level exceeded (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: bad value in trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: bad signal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "error importing function definition for ‘%s’" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "shell level (%d) too high, resetting to 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: no function context at current scope" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variable may not be assigned value" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: assigning integer to name reference" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: no function context at current scope" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s has null exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "invalid character %d in exportstr for %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "no ‘=’ in exportstr for %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: head of shell_variables not a function context" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: no global_variables context" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: head of shell_variables not a temporary environment scope" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: cannot open as FILE" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: invalid value for trace file descriptor" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: compatibility value out of range" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"License GPLv3+: GNU GPL version 3 or later \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, version %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: cannot allocate %lu bytes (%lu bytes allocated)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: cannot allocate %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: cannot allocate %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [name[=value] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] name [name ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] name[=value] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filename] [name ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg ...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [pattern ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] or export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] or readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filename [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". filename [arguments]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] name [name ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMMANDS; do COMMANDS; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMMANDS; do COMMANDS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAME] command [redirections]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { COMMANDS ; } or name () { COMMANDS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMMANDS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expression ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expression ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Names and meanings of some shell variables" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optname ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [arguments]" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" + +#: builtins.c:235 +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DEI] [name ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Define or display aliases.\n" +" \n" +" Without arguments, ‘alias’ prints the list of aliases in the " +"reusable\n" +" form ‘alias NAME=VALUE’ on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '“\\C-x\\C-r”: re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns “$line $filename”. With EXPR, returns\n" +" “$line $subroutine $filename”; this extra information can be used " +"to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option ‘cdable_vars’ " +"is set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of ‘..’\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of ‘..’\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if ‘-L’ were " +"specified.\n" +" ‘..’ is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, ‘pwd’ behaves as if ‘-L’ were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the ‘type’ " +"builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the ‘integer’ attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the ‘trace’ attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using ‘+’ instead of ‘-’ turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the ‘let’ command) performed when the variable is assigned a " +"value.\n" +" \n" +" When used in a function, ‘declare’ makes NAMEs local, as with the " +"‘local’\n" +" command. The ‘-g’ option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Set variable values and attributes.\n" +" \n" +" A synonym for ‘declare’. See ‘help declare’." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by ‘declare’.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" ‘echo’ interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix ‘special’ builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the ‘test’ found in $PATH instead of the shell builtin\n" +" version, type ‘enable -n test’.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ‘:’ into NAME " +"and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places ‘?’ " +"into\n" +" NAME and unsets OPTARG. If a required argument is not found, a ‘?" +"[0m’\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option ‘execfail’ is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the ‘fc -s [pat=rep ...] [command]’ format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing ‘r " +"cc’\n" +" runs the last command beginning with ‘cc’ and typing ‘r’ re-" +"executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with ‘&’. If JOB_SPEC is not present, the " +"shell's notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a ‘*’. An argument of N lists only the last N " +"entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow ‘-l’ they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see ‘readonly’.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of ‘--’ disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of ‘--’ disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its ‘sticky’ bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the “test” builtin, but the last argument " +"must\n" +" be a literal ‘]’, to match the opening ‘[’." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or ‘-’, each specified signal is reset to its " +"original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with “kill -signal $$”.\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe ‘-p’ option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if ‘type -t NAME’ would not return ‘file’\n" +" -t\toutput a single word which is one of ‘alias’, " +"‘keyword’,\n" +" \t\t‘function’, ‘builtin’, ‘file’ or ‘’, if NAME " +"is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the ‘soft’ resource limit\n" +" -H\tuse the ‘hard’ resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (‘nice’)\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ " +"stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands for each member in a list.\n" +" \n" +" The ‘for’ loop executes a sequence of commands for each member in " +"a\n" +" list of items. If ‘in WORDS ...;’ is not present, then ‘in “" +"$@”’ is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If ‘in WORDS’ is not present, ‘in “" +"$@”’\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" ‘|’ is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands based on conditional.\n" +" \n" +" The ‘if COMMANDS’ list is executed. If its exit status is zero, " +"then the\n" +" ‘then COMMANDS’ list is executed. Otherwise, each ‘elif " +"COMMANDS’ list is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" ‘then COMMANDS’ list is executed and the if command completes. " +"Otherwise,\n" +" the ‘else COMMANDS’ list is executed, if present. The exit status " +"of the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" ‘while’ COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" ‘until’ COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is “COPROC”.\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the ‘fg’ command. Resume " +"a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a ‘&’ places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to ‘bg’.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." + +#: builtins.c:1726 +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to ‘let “EXPRESSION”’.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the ‘test’ builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the ‘==’ and ‘!=’ operators are used, the string to the " +"right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the ‘=~’ operator is used, the string to the right of the " +"operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to ‘cd’.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t‘time’ reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of ‘exact’ means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of ‘substring’ means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually ‘!’. The second is\n" +" \t\tthe ‘quick substitution’ character, usually ‘^’. The\n" +" \t\tthird is the ‘history comment’ character, usually ‘#’.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by ‘dirs’, starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by ‘dirs’, starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The ‘dirs’ builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by ‘dirs’, starting with zero. For example: ‘popd " +"+0’\n" +" \t\tremoves the first directory, ‘popd +1’ the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by ‘dirs’, starting with zero. For example: ‘popd " +"-0’\n" +" \t\tremoves the last directory, ‘popd -1’ the next to last.\n" +" \n" +" The ‘dirs’ builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the ‘pushd’ command; you can " +"get\n" +" back up through the list with the ‘popd’ command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with ‘set -o’\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to “empty” commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the “default” command completion\n" +" \t-E\t\tChange options for the “empty” command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using ‘+o’ instead of ‘-o’ turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the ‘complete’ builtin. If no " +"NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for ‘mapfile’." diff --git a/bash-5.1/po/en@quot.gmo b/bash-5.1/po/en@quot.gmo new file mode 100644 index 0000000000000000000000000000000000000000..749c3a704addbb59e3ce21d7142fead3470b11d9 Binary files /dev/null and b/bash-5.1/po/en@quot.gmo differ diff --git a/bash-5.1/po/en@quot.header b/bash-5.1/po/en@quot.header new file mode 100644 index 0000000000000000000000000000000000000000..a9647fc35c3bc0b49aaafe20deeb5c30a80996bb --- /dev/null +++ b/bash-5.1/po/en@quot.header @@ -0,0 +1,22 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# diff --git a/bash-5.1/po/en@quot.po b/bash-5.1/po/en@quot.po new file mode 100644 index 0000000000000000000000000000000000000000..5d978b23106517430b3f2cf07661a094c9320e89 --- /dev/null +++ b/bash-5.1/po/en@quot.po @@ -0,0 +1,5859 @@ +# English translations for GNU bash package. +# Copyright (C) 2020 Free Software Foundation, Inc. +# This file is distributed under the same license as the GNU bash package. +# Automatically generated, 2020. +# +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +msgid "" +msgstr "" +"Project-Id-Version: GNU bash 5.1-rc3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2020-11-28 12:51-0500\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "bad array subscript" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: removing nameref attribute" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: cannot convert indexed to associative array" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: invalid associative array key" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: cannot assign to non-numeric index" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: must use subscript when assigning associative array" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: cannot create: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: cannot find keymap for command" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: first non-whitespace character is not ‘\"’" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "no closing ‘%c’ in %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: missing colon separator" + +#: bashline.c:4555 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "‘%s’: cannot unbind in command keymap" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace expansion: cannot allocate memory for %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace expansion: failed to allocate memory for %u elements" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace expansion: failed to allocate memory for ‘%s’" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "‘%s’: invalid alias name" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "line editing not enabled" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "‘%s’: invalid keymap name" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: cannot read: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "‘%s’: unknown function name" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s is not bound to any keys.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s can be invoked via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "‘%s’: cannot unbind" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "loop count" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "only meaningful in a ‘for’, ‘while’, or ‘until’ loop" + +#: builtins/caller.def:136 +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns “$line $filename”. With EXPR, returns\n" +" “$line $subroutine $filename”; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME not set" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "too many arguments" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null directory" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD not set" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "line %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "warning: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: usage: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: option requires an argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: numeric argument required" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: not found" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: invalid option" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: invalid option name" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "‘%s’: not a valid identifier" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "invalid octal number" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "invalid hex number" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "invalid number" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: invalid signal specification" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "‘%s’: not a pid or valid job spec" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: readonly variable" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s out of range" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s out of range" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: no such job" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: no job control" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "no job control" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: restricted" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "restricted" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: not a shell builtin" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "write error: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "error setting terminal attributes: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "error getting terminal attributes: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: error retrieving current directory: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: ambiguous job spec" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "help not available in this version" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: cannot unset: readonly %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: cannot unset" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: invalid action name" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: no completion specification" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "warning: -F option may not work as you expect" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "warning: -C option may not work as you expect" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "not currently executing completion function" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "can only be used in a function" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: reference variable cannot be an array" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref variable self references not allowed" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: circular name reference" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "‘%s’: invalid variable name for name reference" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "cannot use ‘-f’ to make functions" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: readonly function" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: quoted compound array assignment deprecated" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: cannot destroy array variables in this way" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: cannot convert associative to indexed array" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamic loading not available" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "cannot open shared object %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "cannot find %s in shared object %s: %s" + +#: builtins/enable.def:388 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dynamic builtin already loaded" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "load function for %s returns failure (%d): not loaded" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: not dynamically loaded" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: cannot delete: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: is a directory" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: not a regular file" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: file is too large" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: cannot execute binary file" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: cannot execute: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "not login shell: use ‘exit’" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "There are stopped jobs.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "There are running jobs.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "no command found" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "history specification" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: cannot open temp file: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "current" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "job %d started without job control" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: illegal option -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: option requires an argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing disabled" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hash table empty\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tcommand\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Shell commands matching keyword `" +msgstr[1] "Shell commands matching keywords `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"no help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ or ‘info %s’." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: cannot open: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"These shell commands are defined internally. Type ‘help’ to see this list.\n" +"Type ‘help name’ to find out more about the function ‘name’.\n" +"Use ‘info bash’ to find out more about the shell in general.\n" +"Use ‘man -k’ or ‘info’ to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "cannot use more than one of -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "history position" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: invalid timestamp" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: history expansion failed" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib failed" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "no other options allowed with ‘-x’" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: arguments must be process or job IDs" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Unknown error" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "expression expected" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: not an indexed array" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: invalid file descriptor specification" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: invalid file descriptor: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: invalid line count" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: invalid array origin" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: invalid callback quantum" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "empty array variable name" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "array variable support required" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "‘%s’: missing format character" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "‘%c’: invalid time format specification" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "‘%c’: invalid format character" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "warning: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "format parsing problem: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "missing hex digit for \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "missing unicode digit for \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "no other directory" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: invalid argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "directory stack empty" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "directory stack index" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the ‘pushd’ command; you can get\n" +" back up through the list with the ‘popd’ command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by ‘dirs’, starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by ‘dirs’, starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The ‘dirs’ builtin displays the directory stack." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by ‘dirs’, starting with zero. For example: ‘popd +0’\n" +" \tremoves the first directory, ‘popd +1’ the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by ‘dirs’, starting with zero. For example: ‘popd -0’\n" +" \tremoves the last directory, ‘popd -1’ the next to last.\n" +" \n" +" The ‘dirs’ builtin displays the directory stack." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: invalid timeout specification" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "read error: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "can only ‘return’ from a function or sourced script" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "cannot simultaneously unset a function and a variable" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: not an array variable" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: not a function" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: cannot export" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift count" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "cannot set and unset shell options simultaneously" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: invalid shell option name" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "filename argument required" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: file not found" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "cannot suspend" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "cannot suspend a login shell" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s is aliased to ‘%s’\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s is a shell keyword\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s is a function\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s is a special shell builtin\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s is a shell builtin\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s is %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s is hashed (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: invalid limit argument" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "‘%c’: bad command" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: cannot get limit: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limit" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: cannot modify limit: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "octal number" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "‘%c’: invalid symbolic mode operator" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "‘%c’: invalid symbolic mode character" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " line " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "last command: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Aborting..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:462 +msgid "unknown command error" +msgstr "unknown command error" + +#: error.c:463 +msgid "bad command type" +msgstr "bad command type" + +#: error.c:464 +msgid "bad connector" +msgstr "bad connector" + +#: error.c:465 +msgid "bad jump" +msgstr "bad jump" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: unbound variable" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atimed out waiting for input: auto-logout\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "cannot redirect standard input from /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: ‘%c’: invalid format character" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] still exists" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "pipe error" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximum eval nesting level exceeded (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximum source nesting level exceeded (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restricted: cannot specify ‘/’ in command names" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: command not found" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: bad interpreter" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: cannot execute binary file: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "‘%s’: is a special builtin" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "cannot duplicate fd %d to fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "expression recursion level exceeded" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "recursion stack underflow" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "syntax error in expression" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "attempted assignment to non-variable" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "syntax error in variable assignment" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "division by 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bug: bad expassign token" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "‘:’ expected for conditional expression" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exponent less than 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "identifier expected after pre-increment or pre-decrement" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "missing ‘)’" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntax error: operand expected" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntax error: invalid arithmetic operator" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (error token is “%s”)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "invalid arithmetic base" + +#: expr.c:1582 +msgid "invalid integer constant" +msgstr "invalid integer constant" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "value too great for base" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: expression error\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: cannot access parent directories" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "cannot reset nodelay mode for fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "cannot allocate new file descriptor for bash input from fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer already exists for new fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "forked pid %d appears in running job %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "deleting stopped job %d with process group %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) marked as still alive" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: no such pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Done" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Stopped" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Stopped(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Running" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Done(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Exit %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Unknown status" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core dumped) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "child setpgid (%ld to %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld is not a child of this shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: No record of process %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: job %d is stopped" + +#: jobs.c:3564 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: no current jobs" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: job has terminated" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: job %d already in background" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: turning on WNOHANG to avoid indefinite block" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: line %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core dumped)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd now: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp failed" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: no job control in background" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: line discipline" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "cannot set terminal process group (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "no job control in this shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: failed assertion: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "unknown" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: block on free list clobbered" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: called with already freed block argument" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: called with unallocated block argument" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: underflow detected; mh_nbytes out of range" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underflow detected; magic8 corrupted" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: start and end chunk sizes differ" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: called with unallocated block argument" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: underflow detected; mh_nbytes out of range" + +#: lib/malloc/malloc.c:1141 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflow detected; magic8 corrupted" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: start and end chunk sizes differ" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: alloc table is full with FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p already in table as allocated?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p already in table as free?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "invalid base" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: host unknown" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: invalid service" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: bad network path specification" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "network operations not supported" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: cannot change locale (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: cannot change locale (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: cannot change locale (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: cannot change locale (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "You have mail in $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "You have new mail in $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "The mail in %s has been read\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "syntax error: arithmetic expression required" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "syntax error: ‘;’ unexpected" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntax error: ‘((%s))’" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: bad instruction type %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document at line %d delimited by end-of-file (wanted ‘%s’)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: redirection instruction ‘%d’ out of range" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "maximum here-document count exceeded" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "unexpected EOF while looking for matching ‘%c’" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "unexpected EOF while looking for ‘]]’" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntax error in conditional expression: unexpected token ‘%s’" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "syntax error in conditional expression" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "unexpected token ‘%s’, expected ‘)’" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "expected ‘)’" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "unexpected argument ‘%s’ to conditional unary operator" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "unexpected argument to conditional unary operator" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "unexpected token ‘%s’, conditional binary operator expected" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "conditional binary operator expected" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "unexpected argument ‘%s’ to conditional binary operator" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "unexpected argument to conditional binary operator" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "unexpected token ‘%c’ in conditional command" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "unexpected token ‘%s’ in conditional command" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "unexpected token %d in conditional command" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntax error near unexpected token ‘%s’" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntax error near ‘%s’" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "syntax error: unexpected end of file" + +#: parse.y:6365 +msgid "syntax error" +msgstr "syntax error" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Use “%s” to leave the shell.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "unexpected EOF while looking for matching ‘)’" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: function ‘%s’ not found" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possible retry loop" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: bad connector ‘%d’" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: invalid file descriptor" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL file pointer" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: ‘%c’: invalid format character" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "file descriptor out of range" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: ambiguous redirect" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: cannot overwrite existing file" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restricted: cannot redirect output" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "cannot create temp file for here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: cannot assign fd to variable" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port not supported without networking" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "redirection error: cannot duplicate fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "could not find /tmp, please create!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp must be a valid directory name" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pretty-printing mode ignored in interactive shells" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: invalid option" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "cannot set uid to %d: effective uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "cannot set gid to %d: effective gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "cannot start debugger; debugging mode disabled" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Is a directory" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "I have no name!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, version %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU long options:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Shell options:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s or -o option\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Type ‘%s -c “help set”’ for more information about shell options.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Type ‘%s -c help’ for more information about shell builtin commands.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Use the ‘bashbug’ command to report bugs.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash home page: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "General help using GNU software: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: invalid operation" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Bogus signal" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Hangup" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interrupt" + +#: siglist.c:58 +msgid "Quit" +msgstr "Quit" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Illegal instruction" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT instruction" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT instruction" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Floating point exception" + +#: siglist.c:86 +msgid "Killed" +msgstr "Killed" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bus error" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Segmentation fault" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Bad system call" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Broken pipe" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Alarm clock" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminated" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Urgent IO condition" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Stopped (signal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continue" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Child death or stop" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Stopped (tty input)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Stopped (tty output)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O ready" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU limit" + +#: siglist.c:154 +msgid "File limit" +msgstr "File limit" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profile)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Window changed" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Record lock" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "User signal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "User signal 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT input data pending" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "power failure imminent" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "system crash imminent" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migrate process to another CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "programming error" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT monitor mode granted" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT monitor mode retracted" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT sound sequence has completed" + +#: siglist.c:214 +msgid "Information request" +msgstr "Information request" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Unknown Signal #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "bad substitution: no closing ‘%s’ in %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: cannot assign list to array member" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "cannot make pipe for process substitution" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "cannot make child for process substitution" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "cannot open named pipe %s for reading" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "cannot open named pipe %s for writing" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "cannot duplicate named pipe %s as fd %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "command substitution: ignored null byte in input" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "cannot make pipe for command substitution" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "cannot make child for command substitution" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: cannot duplicate pipe as fd 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: invalid variable name for name reference" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: invalid indirect expansion" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: invalid variable name" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter not set" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter null or not set" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: substring expression < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: bad substitution" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: cannot assign in this way" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "bad substitution: no closing “`” in %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "no match: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argument expected" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: integer expression expected" + +#: test.c:265 +msgid "`)' expected" +msgstr "‘)’ expected" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "‘)’ expected, found %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: binary operator expected" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: unary operator expected" + +#: test.c:881 +msgid "missing `]'" +msgstr "missing ‘]’" + +#: test.c:899 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntax error: ‘%s’ unexpected" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "invalid signal number" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: maximum trap handler level exceeded (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: bad value in trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: bad signal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "error importing function definition for ‘%s’" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "shell level (%d) too high, resetting to 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: no function context at current scope" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variable may not be assigned value" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: assigning integer to name reference" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: no function context at current scope" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s has null exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "invalid character %d in exportstr for %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "no ‘=’ in exportstr for %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: head of shell_variables not a function context" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: no global_variables context" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: head of shell_variables not a temporary environment scope" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: cannot open as FILE" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: invalid value for trace file descriptor" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: compatibility value out of range" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"License GPLv3+: GNU GPL version 3 or later \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, version %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: cannot allocate %lu bytes (%lu bytes allocated)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: cannot allocate %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: cannot allocate %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [name[=value] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] name [name ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] name[=value] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filename] [name ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg ...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [pattern ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] or export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] or readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filename [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". filename [arguments]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] name [name ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMMANDS; do COMMANDS; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMMANDS; do COMMANDS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAME] command [redirections]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { COMMANDS ; } or name () { COMMANDS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMMANDS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expression ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expression ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Names and meanings of some shell variables" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optname ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [arguments]" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" + +#: builtins.c:235 +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DEI] [name ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Define or display aliases.\n" +" \n" +" Without arguments, ‘alias’ prints the list of aliases in the reusable\n" +" form ‘alias NAME=VALUE’ on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '“\\C-x\\C-r”: re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns “$line $filename”. With EXPR, returns\n" +" “$line $subroutine $filename”; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option ‘cdable_vars’ is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of ‘..’\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of ‘..’\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if ‘-L’ were specified.\n" +" ‘..’ is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, ‘pwd’ behaves as if ‘-L’ were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the ‘type’ builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the ‘integer’ attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the ‘trace’ attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using ‘+’ instead of ‘-’ turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the ‘let’ command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, ‘declare’ makes NAMEs local, as with the " +"‘local’\n" +" command. The ‘-g’ option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Set variable values and attributes.\n" +" \n" +" A synonym for ‘declare’. See ‘help declare’." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by ‘declare’.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" ‘echo’ interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix ‘special’ builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the ‘test’ found in $PATH instead of the shell builtin\n" +" version, type ‘enable -n test’.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ‘:’ into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places ‘?’ into\n" +" NAME and unsets OPTARG. If a required argument is not found, a ‘?’\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option ‘execfail’ is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the ‘fc -s [pat=rep ...] [command]’ format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing ‘r cc’\n" +" runs the last command beginning with ‘cc’ and typing ‘r’ re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with ‘&’. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a ‘*’. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow ‘-l’ they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see ‘readonly’.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of ‘--’ disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of ‘--’ disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its ‘sticky’ bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the “test” builtin, but the last argument must\n" +" be a literal ‘]’, to match the opening ‘[’." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or ‘-’, each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with “kill -signal $$”.\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe ‘-p’ option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if ‘type -t NAME’ would not return ‘file’\n" +" -t\toutput a single word which is one of ‘alias’, ‘keyword’,\n" +" \t\t‘function’, ‘builtin’, ‘file’ or ‘’, if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the ‘soft’ resource limit\n" +" -H\tuse the ‘hard’ resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (‘nice’)\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands for each member in a list.\n" +" \n" +" The ‘for’ loop executes a sequence of commands for each member in a\n" +" list of items. If ‘in WORDS ...;’ is not present, then ‘in “$@”’ is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If ‘in WORDS’ is not present, ‘in “$@”’\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" ‘|’ is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands based on conditional.\n" +" \n" +" The ‘if COMMANDS’ list is executed. If its exit status is zero, then " +"the\n" +" ‘then COMMANDS’ list is executed. Otherwise, each ‘elif COMMANDS’ list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" ‘then COMMANDS’ list is executed and the if command completes. " +"Otherwise,\n" +" the ‘else COMMANDS’ list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" ‘while’ COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" ‘until’ COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is “COPROC”.\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the ‘fg’ command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a ‘&’ places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to ‘bg’.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." + +#: builtins.c:1726 +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to ‘let “EXPRESSION”’.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the ‘test’ builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the ‘==’ and ‘!=’ operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the ‘=~’ operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to ‘cd’.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t‘time’ reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of ‘exact’ means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of ‘substring’ means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually ‘!’. The second is\n" +" \t\tthe ‘quick substitution’ character, usually ‘^’. The\n" +" \t\tthird is the ‘history comment’ character, usually ‘#’.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by ‘dirs’, starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by ‘dirs’, starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The ‘dirs’ builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by ‘dirs’, starting with zero. For example: ‘popd +0’\n" +" \t\tremoves the first directory, ‘popd +1’ the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by ‘dirs’, starting with zero. For example: ‘popd -0’\n" +" \t\tremoves the last directory, ‘popd -1’ the next to last.\n" +" \n" +" The ‘dirs’ builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the ‘pushd’ command; you can get\n" +" back up through the list with the ‘popd’ command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with ‘set -o’\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to “empty” commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the “default” command completion\n" +" \t-E\t\tChange options for the “empty” command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using ‘+o’ instead of ‘-o’ turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the ‘complete’ builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for ‘mapfile’." diff --git a/bash-5.1/po/eo.gmo b/bash-5.1/po/eo.gmo new file mode 100644 index 0000000000000000000000000000000000000000..4efbdee34749f1ee8e39a9ab848df973ef958192 Binary files /dev/null and b/bash-5.1/po/eo.gmo differ diff --git a/bash-5.1/po/eo.po b/bash-5.1/po/eo.po new file mode 100644 index 0000000000000000000000000000000000000000..d47e83aac324e2dbb9ef937bc9732c946a207371 --- /dev/null +++ b/bash-5.1/po/eo.po @@ -0,0 +1,6083 @@ +# Esperanto language file for GNU Bash. +# Copyright (C) 2011 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Sergio Pokrovskij , 1998, ... 2019. +# +# -*- eval: (po-consider-source-path "~/Documents/Eo/Work/i18n/5.0/bash-5.0/builtins"); -*- +# -*- eval: (po-consider-source-path "~/Documents/Eo/Work/i18n/5.0/bash-5.0"); -*- +# Stilaj notoj: +# La angulaj citiloj limigas «plurajn vortojn», +# 99-66 estas la citiloj de „unuvortaĵo‟ +# +# La mesaĝojn pri internaj eraroj (markitajn per XXX) probable malnecesas traduki. +# +# ---- Glosaro: +# associative array asocitabelo (info "(bash)Arrays") +# brace expansion vinkulmalvolvo +# callback retrovoko +# compound array assignment tutopa tabelvalorizo +# extended file attributes kromatributoj (de dosiero) +# to force ... per superforto +# granted jesigita +# here-document tuj-dokumento (info "(bash)Redirections") +# indexed array entjerindica tabelo (info "(bash)Arrays") +# positional parameter numerparametro ($1 ...) (info "(bash)Positional Parameters") +# resolve (symbolic links) elnodigi +# special builtin speciala komando (info "(coreutils)Special built-in utilities") +# substitution anstataŭigo (info "(bash)Shell Expansions") +# unset malvalorizi (variablon); malaktivigi, malŝalti (opcion, nomon) +msgid "" +msgstr "" +"Project-Id-Version: GNU bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-09 16:32+0700\n" +"Last-Translator: Sergio Pokrovskij \n" +"Language-Team: Esperanto \n" +"Language: eo\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "Misa tabel-indico" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: ne plu nomreferenco (la atributo nameref forigitas)" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: Maleblas konverti entjerindican tabelon en asocitabelon" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: Misa asocitabela ŝlosilo" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: Valorizato havu nombran indicon" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: Valorizante per asocitabelo uzu indicon" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: Ne prosperis krei: %s" + +# XXX: internal_error +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: Mankas klavartabelo por komando" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: La unua ne-blankspaca signo ne estas „\"‟" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "Mankas ferma „%c‟ en %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: Mankas disiga dupunkto" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "%s: Ne eblas malligi" + +# XXX: internal_error +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "vinkulmalvolvo: Maleblas memorhavigo por %s" + +# XXX: internal_error +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "vinkulmalvolvo: Fiaskis memorhavigo por %u elementoj" + +# XXX: internal_error +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "vinkulmalvolvo: Fiaskis memorhavigo por %s" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "%s: Maltaŭgas por uzi kiel alinomon" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "liniredaktado ne estas ebligita" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s‟: Misa nomo por klavartabelo" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: Ne eblas legi: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "%s: Nekonata funkcinomo" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s malhavas klavligon\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s vokeblas per " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "%s: Ne eblas malligi" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "iteracinombrilo" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "Sencas nur en iteracio „for‟, „while‟ aŭ „until‟" + +# caller [expr] => +# caller [ESPRIMO] +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Liveru la kuntekston de la kuranta procedurvoko\n" +"\n" +" Se ESPRIMO malestas, liveru «$line $filename». Se ESPRIMO\n" +" ĉeestas, liveru «$line $subroutine $filename»; ĉi tiu krominformo\n" +" uzeblas por vidigi la vok-stakon.\n" +"\n" +" La valoro de ESPRIMO indikas, kiom da vokkadroj retroiri disde la\n" +" kuranta; la pinta kadro havas la numeron 0.\n" +"\n" +" Elirstato:\n" +" Ĝi estas 0, kondiĉe ke la ŝelo plenumas ŝelfunkcion kaj la ESPRIMO\n" +" estas valida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME malhavas valoron" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "Tro multe da argumentoj" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "NUL-dosierujo" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD malhavas valoron" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linio %dª: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "Averto: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: Uzmaniero: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: La opcio bezonas argumenton" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: Necesas nombra argumento" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: Ne trovita" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: Misa opcio" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: Misa opcinomo" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s‟ ne estas taŭga nomo" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "Misa okuma nombro" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "Misa 16uma nombro" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "Misa nombro" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: Misa signalindiko" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s‟: Nek proceznumero, nek taŭga laborindiko" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: Nurlega variablo" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s estas ekster sia variejo" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumento" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s estas ekster sia variejo" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: Ne estas tia laboro" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: Ĉi tiu ŝelo ne disponigas laborregadon" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "Laborregado ne disponeblas" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: Limigita" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "limigita" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "„%s‟ ne estas primitiva komando ŝela" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "Eraro ĉe skribo: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "Eraro ĉe agordado de terminalaj atributoj: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "Eraro ĉe akiro de terminalaj atributoj: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: Eraro ĉe provo determini la kurantan dosierujon: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: Ambigua laborindiko" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "helpilo mankas en ĉi tiu versio" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: Malaktivigo fiaskis: nurlega %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: Malaktivigo fiaskis" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: Misa nomo de ago" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: Kompletigo ne estas specifita" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "Averto: La opcio -F povas funkcii alie ol vi eble supozas" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "Averto: La opcio -C povas funkcii alie ol vi eble supozas" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "Ni ne estas en plenumado de kompletiga funkcio" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "Uzeblas nur ene de funkcio" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: Referenca variablo ne povas esti tabelo" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: Nomreferenca variablo ne referencu sin mem" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: Cikla nomreferenco" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: Misa variablonomo por nomreferenco" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "„-f‟ ne estas uzebla por fari funkciojn" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: Nurlega funkcio" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: Tutopa tabelvalorizo citila estas evitinda" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: Ĉi tiel ne eblas neniigi tabelvariablojn" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: Ne eblas konverti asocitabelon en entjerindican tabelon" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "Rultempa ŝargo ne disponeblas" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "Ne malfermiĝis dinamika biblioteko %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "Mankas %s en la dinamika biblioteko%s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: Ne ŝargita dinamike" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "Ŝarga funkcio por %s liveris fiaskon (%d): ne ŝargite" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: Ne ŝargita dinamike" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: Ne eblas forigi: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s estas dosierujo" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: Ne ordinara dosiero" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: Tro granda dosiero" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: Neplenumebla duuma dosiero" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: Maleblas plenumi: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "adiaŭ\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "La ŝelo ne estas saluta; eliru per «exit»" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Restas haltigitaj laboroj.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Restas rulataj laboroj.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "Komando ne trovita" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "Historia indiko" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: Ne malfermiĝis labordosiero: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "kuranta" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "La laboro %d estas lanĉita sen laborregado" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: Misa opcio -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: La opcio bezonas argumenton -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "Nomkonservado (haketado, «hashing») estas malŝaltita" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: Hakettabelo estas malplena\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "Trafoj\tKomando\n" + +# ZZZ: aĉaj citiloj (fermita en la programo) +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Ŝelaj komandoj kongruaj kun la ŝlosilvorto '" +msgstr[1] "Ŝelaj komandoj kongruaj kun la ŝlosilvortoj '" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"Helpaĵo pri „%s‟ malestas.\n" +"Provu «help help» aŭ «man -k %s» aŭ «info %s»." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: Fiaskis malfermo de %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Jenaj komandoj estas enkonstruitaj. Tajpu „help‟ por eligi la liston.\n" +"Tajpu «help NOMO» por informoj pri la funkcio NOMO.\n" +"Uzu «info bash» por la ĝenerala informo pri la ŝelo.\n" +"Uzu «man -k» aŭ «info» por informo pri komandoj ĉi tie ne listigitaj.\n" +"\n" +"Steleto (*) tuj post nomo indikas, ke la komando estas malebligita.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "Ne pli ol unu el -anrw estas uzebla" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "pozicio en la historio" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: Maltaŭga tempomarko" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: Historia malvolvo fiaskis" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib fiaskis" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "La uzo de „-x‟ malebligas aliajn opciojn" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: Argumento estu proceznumero aŭ laborindiko" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Nekonata eraro" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "Mankas esprimo" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: ĝi ne estas entjerindica tabelo" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: Misa indiko de dosiernumero" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: Misa dosiernumero: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: Misa lininombro" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: Misa tabelbazo" + +# Supozeble callback => retrovoko ?? +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: Misa kvanto ĉe retrovoko" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "Mankas nomo de tabelvariablo" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "necesas subteno de tabelvariabloj" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s‟: Mankas formata signo" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "%c: Misa tempoformato" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c‟: Misa signo formata" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "Averto: %s: %s" + +# XXX: internal_error +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "Miso ĉe analizado de formato: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "Mankas 16uma cifero por \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "Post „%c‟ mankas unikoda cifero" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "Ne estas alia dosierujo" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: Maltaŭga argumento" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "Dosierujstako malplenas" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "indico de dosierujstako" + +# dirs [-clpv] [+N] [-N] +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Listigu la kurantan dosierujstakon. La dosierujoj trafas en\n" +" la stakon per la komando „pushd‟ kaj estas forigeblaj per la\n" +" komando „popd‟.\n" +"\n" +" Opcioj:\n" +" -c\tforviŝu la dosierujstakon (forigu ĉiujn erojn)\n" +" -l\tne uzu tildon en la dosierujnomoj bazitaj relative\n" +" \tal via hejma dosierujo\n" +" -p\teligu dosierujstakon lokante po unu eron sur linio\n" +" -v\teligu dosierujstakon lokante po unu eron sur linio,\n" +"\tprefiksante la dosierujnomon per ĝia numero en la stako\n" +"\n" +" Argumentoj:\n" +" +N\teligu la Nan eron nombrante de maldekstre en la listo eligebla\n" +"\tper „dirs‟ sen opcioj, numerante ekde 0.\n" +"\n" +" -N\teligu la Nan eron nombrante de dekstre en la listo eligebla\n" +"\tper „dirs‟ sen opcioj, numerante ekde 0." + +# pushd [dir | +N | -N] [-n] +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Surstakigu dosierujon sur la stakon da dosierujoj, aŭ cikle ŝovu\n" +" la stakon tiel, ke la nova stakpinto iĝu la kuranta dosierujo.\n" +" Senargumente, permutu la du plej suprajn dosierujojn de la stako.\n" +"\n" +" Opcioj:\n" +" -n\tNe ŝanĝu la kurantan dosierujon surstakigante dosierujon sur\n" +" \tla stakon; do, nur la stakon ŝanĝu.\n" +"\n" +" +N\tCikle ŝovu la stakon tiel ke la Nª dosierujo (nombrante de\n" +" \tmaldekstre en la listo eligebla per „dirs‟, numerante de 0)\n" +" iĝu la pinta.\n" +"\n" +" -N\tCikle ŝovu la stakon tiel ke la Nª dosierujo (nombrante de\n" +" \tdekstre en la listo eligebla per „dirs‟, numerante de 0) iĝu\n" +" la pinta.\n" +"\n" +" dir\tsurstakigu la dosierujon dir kaj faru ĝin la nova kuranta\n" +" \tdosierujo labora.\n" +"\n" +" Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟." + +# popd [+N | -N] [-n] +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Elstakigu erojn el la stako de dosierujoj. Senargumente, forigu la\n" +" pintan dosierujon kaj iru (cd) en la novan pintan dosierujon.\n" +"\n" +"\n" +" Opcioj:\n" +" -n\tNe ŝanĝu la kurantan dosierujon demetante dosierujon el la\n" +"\tstako; do, nur la stakon ŝanĝu.\n" +"\n" +" Argumentoj:\n" +" +N\tforigu la Nan eron de maldekstre de la listo eligebla per\n" +"\t„dirs‟, numerante ekde 0. Ekz-e: «popd +0» forigas la plej\n" +"\tmaldekstran dosierujon; «popd +1», ĝian najbaron.\n" +"\n" +" -N\tforigu la Nan eron de dekstre de la listo eligebla per „dirs‟,\n" +"\tnumerante ekde 0. Ekz-e: «popd -0» forigas la lastan\n" +"\tdosierujon; «popd -1», la antaŭlastan.\n" +"\n" +" Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: Misa indiko de atendotempo" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "Lega (read) eraro: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"„return‟ sencas nur en funkcio aŭ punkte vokita („.‟, „source‟) skripto" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "Ne eblas samtempe malaktivigi funkcion kaj variablon" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: Ne tabela variablo" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: Ne funkcio" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: Ne eblas eksporti" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "Nombrilo de „shift‟" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "Maleblas samtempe ŝalti kaj malŝalti ŝelan opcion" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: Misa nomo de ŝela opcio" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "Necesas dosiernoma argumento" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: Dosiero ne trovita" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "Ne eblas halteti" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "Ne eblas haltetigi salutan ŝelon" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "„%s‟ alinomas jenon: «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "„%s‟ estas ŝlosilvorto de la ŝelo\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s estas funkcio\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "„%s‟ estas speciala primitiva ŝelkomando\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "„%s‟ estas primitiva komando de la ŝelo\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "„%s‟ estas „%s‟\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "„%s‟ estas metita en hakettabelon (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: Maltaŭga argumento por limo" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c‟: Misa komando" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: Fiaskis provo legi limon: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limo" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: Malprosperis ŝanĝi limon: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "Okuma nombro" + +# Misa modifilo: «umask Z-w» aŭ «umask aZw» +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c‟: Maltaŭga simbolo por atingorajta modifilo" + +# Misa kategorio: ne [rw] ktp +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c‟: La signo ne estas simbolo de atingorajta kategorio" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " linio " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "La ĵusa komando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Ĉesigado ..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORMO: " + +#: error.c:462 +msgid "unknown command error" +msgstr "Nekonata komand-eraro" + +#: error.c:463 +msgid "bad command type" +msgstr "Misa komandotipo" + +#: error.c:464 +msgid "bad connector" +msgstr "Misa stir-operacio" + +#: error.c:465 +msgid "bad jump" +msgstr "Misa salto" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: Neligita variablo" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aTro longe sen enigo: Aŭtomata seancofino\n" + +# XXX: internal error: +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "Fiaskis provo nomumi la disponaĵon «/dev/null» ĉefenigujo: %s" + +# XXX: internal error: +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: „%c‟: Misa formatsigno" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: la kunprocezo [%d:%s] ankoraŭ ekzistas" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "Eraro en dukto" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: La ingado de „eval“oj superis sian maksimumon (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: La ingado de „source“oj superis sian maksimumon (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: La ingado de funkcioj superis sian maksimumon (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: Malpermesitas uzi „/‟ en komandonomoj" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: Komando ne trovita" + +# XXX: internal error: +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: Misa interpretilo" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: Neplenumebla duuma dosiero: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s‟ estas primitiva komando speciala" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "Ne eblas kunnomumi al dosiernumero %d la dosiernumeron %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "Tro profunda rekursio en esprimo" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "Rekursistako elĉerpita" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "Sintaksa eraro en esprimo" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "Provo valorizi ne-variablon" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "Sintaksa eraro en valorizo de variablo" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "Divido per 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "CIMO: Misa operacisigno en kombinita valorizsimbolo" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "„:‟ mankas kondiĉa esprimo" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "Negativa eksponento" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "Post antaŭkremento aperu nomo de variablo" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "Mankas „)‟" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "Sintaksa eraro: Mankas operando" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "Sintaksa eraro: Misa operacisimbolo aritmetika" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (misa simbolo estas „%s‟)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "Maltaŭga bazo nombrosistema" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: Misa lininombro" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "Tro granda valoro por bazo de nombrosistemo" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: Misa esprimo\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getwd: Ne eblas atingi patrajn dosierujojn" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "Ne eblas reŝalti senprokrastan reĝimon por dosiernumero %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "Maleblas disponigi novan dosiernumeron por Baŝa enigo el n-ro %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: La nova dosiernumero (fd %d) jam havas bufron" + +# ZZZ: sys_error (_("start_pipeline: pgrp pipe")); +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: procezgrupo dukto" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "Forke farita proceznumero %d aperas en rulata laboro %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "Haltigita laboro %d kun procezgrupo %ld estas forigata" + +# ifdef DEBUG ... internal_warning(): +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) marked as still alive" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: Ne estas tia proceznumero (%ld)!" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signalo %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Farite" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Haltigita" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Haltigita(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Rulata" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Farite(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Eliro %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Nekonata stato" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(nekropsio elŝutita)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (labordosierujo: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "provo atribui (setpgid) procezgrupon %2$ld de la procezido %1$ld" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: La procezo %ld ne estas ido de ĉi tiu ŝelo" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Malestas informoj pri procezo %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: La laboro %d estas haltigita" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: Ne estas tia laboro" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: La laboro finiĝis" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: La laboro %d jam estas fona" + +# XXX: internal warning: +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: WNOHANG iĝas ŝaltita por eviti nedifintan pendiĝon" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: linio %dª: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr "(nekropsio elŝutita)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(nun labordosierujo estas: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp fiaskis" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: laborregado ne funkcias en la fono" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: liniaranĝo" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid()" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "ne prosperis atribui grupon (%d) de terminala procezo" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "Ĉi tiu ŝelo ne disponigas laborregadon" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: Malveras la aserto: %s\n" + +# XXX: debug? +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: aserto sufokita\r\n" + +# XXX: internal error +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "nekonata" + +# XXX: debug? +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: Skribdifektita bloko en malokupa listo (free list)" + +# XXX: debug? +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: La argumento montras blokon jam malokupitan" + +# XXX: debug? +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: La argumento ne montras generitan memoron" + +# XXX: debug? +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: Okazis maltroo; mh_nbytes estas ekster sia variejo" + +# XXX: debug? +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: Okazis maltroo; mh_nbytes estas ekster sia variejo" + +# XXX: debug? +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: La ĉapa kaj vosta longoj de memorpeco ne estas egalaj" + +# XXX: debug? +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: La argumento ne montras generitan memoron" + +# XXX: debug? +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: Okazis maltroo; mh_nbytes estas ekster sia variejo" + +# XXX: debug? +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: Okazis maltroo; mh_nbytes estas ekster sia variejo" + +# XXX: debug? +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: La ĉapa kaj vosta longoj de memorpeco ne estas egalaj" + +# XXX: debug? +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: „alloc‟-tabelo elĉerpiĝis je FIND_ALLOC?\n" + +# XXX: debug? +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p jam en la tabelo kvazaŭ kreita (?)\n" + +# XXX: debug? +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p jam en la tabelo kvazaŭ malokupita (?)\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "Misa bazo nombrosistema" + +# XXX: internal error +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: Nekonata retnodo" + +# XXX: internal error +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: Misa servo-indiko" + +# XXX: internal error +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: Misa retvojo-indiko" + +# XXX: internal error +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "Reta funkciado ne disponeblas" + +# XXX: internal warning: +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: Maleblas ŝanĝi lokaĵaron (%s)" + +# XXX: internal warning: +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: Maleblas ŝanĝi lokaĵaron (%s): %s" + +# XXX: fatal_error +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: ne eblas ŝanĝi la lokaĵaron (%s)" + +# XXX: fatal_error +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: ne eblas ŝanĝi la lokaĵaron (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Vi havas poŝton en $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Nova poŝto en $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "La poŝto en %s estas jam legita\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "Sintaksa eraro: Necesas aritmetika esprimo" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "Sintaksa eraro: Neatendita „;‟" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "Sintaksa eraro: „((%s))‟" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: Misa ordontipo %d" + +# internal_warning(): +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "Tuj-dokumenton de linio %d limigas dosierfino (mankas „%s‟)" + +# XXX: programming_error +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: Alidirektada komando „%d‟ ekster sia variejo" + +# internal_warning(): +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) superas SIZE_MAX (%lu): la linio " +"tranĉita" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "La nombro de tuj-documentoj superis sian maksimumon" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "Neatendita dosierfino dum serĉo de responda „%c‟" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "Neatendita dosierfino dum serĉo de „]]‟" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "Sintaksa eraro en kondiĉa esprimo: Neatendita simbolo „%s‟" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "Sintaksa eraro en kondiĉa esprimo" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "Nekonvena simbolo „%s‟ anstataŭ „)‟" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "Mankas „)‟" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "La argumento „%s‟ ne konvenas por unuloka kondiĉa operacisimbolo" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "Maltaŭga argumento por unuloka kondiĉa operacisimbolo" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "Misa simbolo „%s‟ anstataŭ duloka kondiĉa operacisigno" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "ĉi tie devas esti duloka kondiĉa operacisigno" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "La argumento „%s‟ ne konvenas por duloka kondiĉa operacisimbolo" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "\n" +msgstr "" +"La hejmpaĝo de Baŝo (anglalingva): \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Ĝenerala helpilo pri uzo de GNUa programaro: \n" + +# XXX: internal_error +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: Misa operacio" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Ŝtopsignalo" + +# Hangup detected on controlling terminal or death of controlling +# process +#: siglist.c:50 +msgid "Hangup" +msgstr "Malkonekto" + +# Interrupt from keyboard +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interrompo" + +# Quit from keyboard +#: siglist.c:58 +msgid "Quit" +msgstr "Klavara eliro" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Miskomando" + +# SIGTRAP 5 Core Trace/breakpoint trap +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Spurada kontrolpunkto" + +# Abort signal from abort(3) +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Komando ABORT" + +# SIGEMT is not specified in POSIX 1003.1-2001, but neverthless appears +# on most other Unices, where its default action is typically to termi- +# nate the process with a core dump. +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT-komando" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Glitpunkta escepto" + +# SIGKILL 9 Term Kill signal +# Nek kaptebla nek ignorebla (malkiel ABORT) +#: siglist.c:86 +msgid "Killed" +msgstr "Murdu" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bus-eraro" + +# SIGSEGV 11 Core Invalid memory reference +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Adreseraro" + +# SIGSYS 12,-,12 Core Bad argument to routine (SVID) +#: siglist.c:98 +msgid "Bad system call" +msgstr "Misa sistemvoko" + +# SIGPIPE 13 Term Broken pipe: write to pipe with no readers +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Rompita dukto" + +# SIGALRM 14 Term Timer signal from alarm(2) +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Vekhorloĝo" + +# SIGTERM 15 Term Termination signal +#: siglist.c:110 +msgid "Terminated" +msgstr "Finiĝu" + +# SIGURG 16,23,21 Ign Urgent condition on socket (4.2 BSD) +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Urĝa stato eneliga" + +# SIGSTOP 17,19,23 Stop Stop process +# Nek kaptebla nek ignorebla (samkiel SIGKILL) +# Haltu (poste eblos plu iri, vd SIGCONT) +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Haltu (signalo)" + +# SIGCONT 19,18,25 Continue if stopped +#: siglist.c:126 +msgid "Continue" +msgstr "Pluen" + +# SIGCHLD 20,17,18 Ign Child stopped or terminated +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Procezido mortis aŭ haltis" + +# SIGTTIN 21,21,26 Stop tty input for background process +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Haltu (pro terminalenigo)" + +# SIGTTOU 22,22,27 Stop tty output for background process +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Haltu (pro terminaleligo)" + +# SIGIO 23,29,22 Term I/O now possible (4.2 BSD) +#: siglist.c:146 +msgid "I/O ready" +msgstr "Eneligo pretas" + +# SIGXCPU 24,24,30 Core CPU time limit exceeded (4.2 BSD) +#: siglist.c:150 +msgid "CPU limit" +msgstr "Ĉefprocesora tempolimo" + +# SIGXFSZ 25,25,31 Core File size limit exceeded (4.2 BSD) +#: siglist.c:154 +msgid "File limit" +msgstr "Dosiera longolimo" + +# SIGVTALRM 26,26,28 Term Virtual alarm clock (4.2 BSD) +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Vekilo (virtuala)" + +# SIGPROF 27,27,29 Term Profiling timer expired +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Vekilo (profilada)" + +# SIGWINCH 28,28,20 Ign Window resize signal (4.3 BSD, Sun) +#: siglist.c:166 +msgid "Window changed" +msgstr "Fenestro ŝanĝiĝis" + +# SIGLOST -,-,- Term File lock lost +#: siglist.c:170 +msgid "Record lock" +msgstr "Dosierŝloso" + +# SIGUSR1 30,10,16 Term User-defined signal 1 +#: siglist.c:174 +msgid "User signal 1" +msgstr "Uzulsignalo 1ª" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Uzulsignalo 2ª" + +# Harbor File Transfer: +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Pendas HFT-enigo" + +# SIGPWR 29,30,19 Term Power failure (System V) +#: siglist.c:186 +msgid "power failure imminent" +msgstr "Energiprovizo paneontas" + +# SIGDANGER +#: siglist.c:190 +msgid "system crash imminent" +msgstr "La sistemo estas kraŝonta" + +# SIGMIGRATE: +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "La procezo iru al alia ĉefprocesoro" + +# SIGPRE +#: siglist.c:198 +msgid "programming error" +msgstr "Programeraro" + +# SIGGRANT (monopola??) +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT-monitorreĝimo jesigita" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT-monitorreĝimo forprenita" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT-sonsekvenco finiĝis" + +# SIGINFO 29,-,- A synonym for SIGPWR +#: siglist.c:214 +msgid "Information request" +msgstr "Informmendo" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Nekonata signalo n-ro %d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "Misa anstataŭigo: Mankas ferma „%s‟ en %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: Maleblas valorizi tabelanon per listo" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "Ne prosperis fari dukton por proceza anstataŭigo" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "Ne prosperis krei idon por proceza anstataŭigo" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "Ne prosperis malfermi nomitan dukton %s porlegan" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "Ne prosperis malfermi nomitan dukton %s por skribado" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "Ne prosperis kunnomumi nomhavan dukton %s kiel dosiernumeron %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "Komanda anstataŭigo: nul-bajto en enigaĵo, ignorita" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "Ne prosperis fari dukton por komanda anstataŭigo" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "Ne prosperis krei procezidon por komanda anstataŭigo" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: Ne prosperis kunnomumi la dosiernumeron 1 al dukto" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: Misa variablonomo por nomreferenco" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: Misa malvolvo malrekta" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: Maltaŭga variablonomo" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: Parametro estas malaktiva" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: Parametro estas NUL aŭ malaktiva" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: subĉeno-esprimo < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: Misa anstataŭigo" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: ĉi tiel ne valorizebla" + +# XXX: internal warning: +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"Ontaj versioj de la ŝelo plenumos komputon kiel aritmetikan anstataŭigon" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "Misa anstataŭigo: Mankas ferma „`‟ en %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "Nenio kongrua: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "Mankas argumento" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: Mankas entjera esprimo" + +#: test.c:265 +msgid "`)' expected" +msgstr "Mankas „)‟" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "Anstataŭ „)‟ troviĝas %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: Tie devas esti duloka operacisigno" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: Tie devas esti unuloka operacisigno" + +#: test.c:881 +msgid "missing `]'" +msgstr "Mankas „]‟" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "Sintaksa eraro: Neatendita „;‟" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "Misa signalnumero" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" +"trap handler: La nivelo de kaptilotraktiloj superis sian maksimumon (%d)" + +# XXX: internal_warning +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: Misa valoro en trap_list[%d]: %p" + +# XXX: internal_warning +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: Signaltraktilo SIG_DFL resendas %d (%s) al mi mem" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: Misa signalnumero %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "Eraro ĉe importo de funkcidifino por „%s‟" + +# XXX: internal_warning +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "%d estas tro granda ŝelnivelo; mallevita ĝis 1" + +# XXX: internal_error +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: Malestas funkcia kunteksto en ĉi-regiono" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: Variablo ne valorizebla" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: Nomreferenco valorizata per entjero" + +# XXX: internal_error +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: Malestas funkcia kunteksto en ĉi-regiono" + +# XXX: internal_error +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "«exportstr» de %s estas NUL" + +# XXX: internal_error +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "Misa signo %d en eksporta signoĉeno por „%s‟" + +# XXX: internal_error +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "Mankas „=‟ en eksporta signoĉeno por „%s‟" + +# XXX: internal_error +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: La kapo de „shell_variables‟ ne estas funkcia kunteksto" + +# XXX: internal_error +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: Mankas kunteksto de „global_variables‟" + +# XXX: internal_error +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: La kapo de „shell_variables‟ ne estas provizora regiono" + +# XXX: internal_error +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: Ne malfermeblas kiel DOSIERO" + +# XXX: internal_error +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: Misa valoro por spurada dosiernumero (trace file descriptor)" + +# # XXX: internal_error +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s kongruo-nivelo estas ekster sia variejo" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 ĉe «Free Software Foundation, Inc.»" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"La permesilo estas GPLv3+; t.e. GNU GPL, versio 3ª aŭ pli nova.\n" +"La tekston vd ĉe \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNUa «bash», versio %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Ĉi tiu programo estas libera; vi rajtas libere ĝin ŝanĝi kaj pludoni." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "NENIA GARANTIO estas donita, tiom kiom tion permesas la leĝo." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: Malsukcesis okupi %lu bajtojn (%lu bajtoj disponigitaj)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: Malsukcesis okupi %lu bajtojn" + +# XXX: fatal_error +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: Malsukcesis okupi %lu bajtojn (%lu bajtoj disponigitaj)" + +# XXX: fatal_error +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: Malsukcesis okupi %lu bajtojn" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [NOMO[=VALORO] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] NOMO [NOMO ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m KLAVARTABELO] [-f DOSIERNOMO] [-q NOMO]\n" +" [-u NOMO] [-r KLAVAĴO] [-x KLAVAĴO:ŜELKOMANDO]\n" +" [KLAVAĴO:READLINE-FUNKCIO AŬ READLINE-KOMANDO] " + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [N]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [N]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [ŜELAĴO [ARG ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [ESPRIMO]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [DOSIERUJO]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] KOMANDO [ARG ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [NOMO[=VALORO] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] NOMO[=VALORO] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [OPCIO] NOMO[=VALORO] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [ARG ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [ARG ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f DOSIERNOMO] [NOMO ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [ARG ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts OPCIĈENO NOMO [ARG]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a NOMO] [KOMANDO [ARGUMENTOJ ...]] [ALIDIREKTADO ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [N]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [N]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e REDAKTILO] [-lnr] [UNUA] [LASTA] aŭ\n" +"fc -s [ŜABLONO=ANST] [KOMANDO]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [LABORINDIKO]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [LABORINDIKO]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p VOJNOMO] [-dt] [NOMO ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [ŜABLONO ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d POZICIO] [n] aŭ\n" +"history -awr [DOSIERNOMO] aŭ\n" +"history -ps ARG [ARG...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "" +"jobs [-lnprs] [LABORINDIKO ...] aŭ\n" +"jobs -x KOMANDO [ARGS]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [LABORINDIKO ... | PROCEZNUMERO ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s SIGSNOM | -n SIGNUM | -SIGNOM] [PN | LABORINDIKO] ... aŭ\n" +"kill -l [SIGNOM]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let ARG [ARG ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a TABELO] [-d DISIG] [-i TEKSTO]\n" +" [-n NSIGN] [-N NSIGN] [-p INVIT] [-t TLIM]\n" +" [-u DN] [NOMO ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [N]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o OPCINOMO] [--] [ARG ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [NOMO ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [NOMO[=VALORO] ...] aŭ export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [NOMO[=VALORO] ...] aŭ readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [N]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source DOSIERNOMO [ARGUMENTOJ]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". DOSIERNOMO [ARGUMENTOJ]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [ESPRIMO]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ ARG... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[ARG] SIGNALINDIKO ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] NOMO [NOMO ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [LIMO]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [REĜIMO]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [IND ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [PN ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOMO [in VORTOJ ... ] ; do KOMANDOJ; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( ESPR1; ESPR2; ESPR3 )); do KOMANDOJ; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NONO [in VORTOJ ... ;] do KOMANDOJ; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] DUKTO" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case VORTO in [ŜABLONO [| ŜABLONO]...) KOMANDOJ ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if KOMANDOJ; then KOMANDOJ; [ elif KOMANDOJ; then KOMANDOJ; ]... [ else " +"KOMANDOJ; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while KOMANDOJ; do KOMANDOJ; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until KOMANDOJ; do KOMANDOJ; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOMO] KOMANDO [ALIDIREKTADOJ]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function NOMO { KOMANDOJ ; } aŭ NOMO () { KOMANDOJ ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMANDOJ ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "LABORINDIKO [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( ESPRIMO ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ ESPRIMO ]]" + +# Ĉu "variables" estas serĉa ŝlosilo ? +# T.e. "help var" aŭ "help variabl", sed ne "nelp variabloj"? +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "var - Nomoj kaj signifo de kelkaj ŝelvariabloj" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | DOSIERUJO]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [OPCINOMO ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v VAR] FORMATO [ARGUMENTOJ]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPCIO] [-A AGO] [-G ŜABLONO]\n" +" [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTRILO]\n" +" [-P PREFIKSO] [-S SUFIKSO] [NOMO ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o OPCIO] [-A AGO] [-G ŜABLONO]\n" +" [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTRILO]\n" +" [-P PREFIKSO] [-S SUFIKSO] [VORTO]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o OPCIO] [-DEI] [NOMO ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d DISIG] [-n KIOM] [-O ORIGINO] [-s KIOM] [-t] [-u DN]\n" +" [-C RETROVOKO] [-c KVANTO] [TABELO]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d DISIG] [-n KIOM] [-O ORIGINO] [-s KIOM] [-t]\n" +" [-u DN] [-C RETROVOKO] [-c KVANTO] [TABELO]" + +# alias: +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Difinu aŭ listigu alinomojn.\n" +"\n" +" Sen argumento aŭ kun la opcio -p „alias‟ eligas en la ĉefeligujon\n" +" la liston da alinomoj en la reuzebla formo «alias NOMO=VALORO».\n" +"\n" +" Alie, ĉiu NOMO iĝas difinita kiel alinomo por indikita VALORO.\n" +" Vosta spaceto en la VALORO kaŭzas teston, ĉu la sekva vorto estas\n" +" alinome anstataŭigenda ĉe la komputo de la alinomo.\n" +"\n" +" Opcioj:\n" +" -p\teligu ĉiujn difinitajn alinomojn en reuzebla formo.\n" +"\n" +" Elirstato:\n" +" La komando „alias‟ liveras „true‟ krom se aperas NOMO ne difinita\n" +" alinome." + +# unalias [-a] name [name ...] +# unalias [-a] NOMO [NOMO ...] +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Forigu la NOMOjn el la listo de difinitaj alinomoj.\n" +"\n" +" Opcioj:\n" +" -a\tSe enestas la opcio „-a‟, ĉiujn alinomojn forigu\n" +"\n" +" Liveru sukceson krom se name ne estas difinita alinome." + +# bind [-lpvsPVS] [-m KLAVARTABELO] [-f DOSIERNOMO] [-q NOMO] [-u NOMO] +# [-r KLAVAĴO] [-x KLAVAĴO:ŜELKOMANDO] +# [KLAVAĴO:READLINE-FUNKCIO AŬ READLINE-KOMANDO] +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Difinu klavligojn kaj variablojn.\n" +"\n" +" Ligu klavosekvencon al linilega funkcio, aŭ al makroo, aŭ valorizu\n" +" linilegan variablon. La sintakso de ne-opcia argumento estas tiu\n" +" de «~/.inputrc», tamen la ligon oni esprimu unuargumente; ekz-e:\n" +" bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +"\n" +" Opcioj:\n" +" -m KLAVARTABELO Uzu KLAVARTABELOn dum la daŭro de ĉi tiu komando.\n" +" La eblaj nomoj de klavartabelo estas: „emacs‟,\n" +" „emacs-standard‟, „emacs-meta‟, „emacs-ctlx‟,\n" +" „vi‟, „vi-move‟, „vi-command‟ kaj „vi-insert‟.\n" +" -l Listigu funkcinomojn.\n" +" -P Listigu funkcinomojn kaj klavligojn.\n" +" -p Listigu funkcinomojn kaj klavligojn en formo\n" +" reuzebla por enigo.\n" +" -S Listigu makroajn klavsekvencojn kaj ilian valoron.\n" +" -s Listigu makroajn klavsekvencojn kaj ilian valoron\n" +" en formo reuzebla por enigo.\n" +" -V Listigu variablonomojn kaj ilian valoron.\n" +" -v Listigu variablonomojn kaj ilian valoron en formo\n" +" reuzebla por enigo.\n" +" -q FUNKCINOMO Demando pri la klavoj ligitaj al la FUNKCINOMO.\n" +" -u FUNKCINOMO Malligu ĉiujn klavligojn disde la FUNKCINOMO.\n" +" -r KLAVAĴO Forigu la ligon de la klavsekvenco KLAVAĴO\n" +" -f DOSIERNOMO Legu klavligojn el DOSIERNOMO\n" +" -x KLAVAĴO:ŜELKOMANDO La ŜELKOMANDO plenumiĝu ĉe enigo de KLAVAĴO.\n" +" -X Listigu klavosekvencojn ligitajn per „-x‟ kaj la\n" +" koncernajn komandojn en formo reuzebla por enigo.\n" +" \n" +" Elirstato:\n" +" 0, krom se nekonata opcio estas donita aŭ eraro okazis." + +# exit: +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Finu iteracion FOR, WHILE aŭ UNTIL\n" +"\n" +" Eliru ekster iteracion FOR, WHILE aŭ UNTIL. Se N estas donita,\n" +" iru N iteraciajn nivelojn eksteren.\n" +"\n" +" Elirstato:\n" +" Ĝi estas 0, kondiĉe ke N estas pli granda ol aŭ egala al 1." + +# continue: +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Daŭrigu iteraciadon de ordono FOR, WHILE aŭ UNTIL\n" +"\n" +" Pasu al la sekva iteraciero de FOR, WHILE aŭ UNTIL.\n" +" Se N estas donita, eliru ĝis la nivelon de la Nª inganta\n" +" iteraciordono.\n" +"\n" +" Elirstato:\n" +" Ĝi estas 0, kondiĉe ke N estas pli granda ol aŭ egala al 1." + +# builtin [shell-builtin [arg ...]] +# builtin [ŜELAĴO [ARG ...]] +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Rulu primitivan ŝelkomandon\n" +"\n" +" Plenumu primitivan ŝelkomandon ŜELAĴO kun la argumentoj ARG sen la\n" +" normala komadoserĉo. Tio utilas se oni volas uzi la nomon de\n" +" ŝelaĵo por nomi funkcion, sed bezonas la koncernan primitivon en\n" +" la funkcio mem.\n" +"\n" +" Elirstato:\n" +" Tiu de de ŜELAĴO; aŭ malsukceso, se ŜELAĴO ne estas primitiva\n" +" ŝelkomando." + +# caller [expr] => +# caller [ESPRIMO] +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Liveru la kuntekston de la kuranta procedurvoko\n" +"\n" +" Se ESPRIMO malestas, liveru «$line $filename». Se ESPRIMO\n" +" ĉeestas, liveru «$line $subroutine $filename»; ĉi tiu krominformo\n" +" uzeblas por vidigi la vok-stakon.\n" +"\n" +" La valoro de ESPRIMO indikas, kiom da vokkadroj retroiri disde la\n" +" kuranta; la pinta kadro havas la numeron 0.\n" +"\n" +" Elirstato:\n" +" Ĝi estas 0, kondiĉe ke la ŝelo plenumas ŝelfunkcion kaj la ESPRIMO\n" +" estas valida." + +# cd: +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Ŝanĝu la kurantan laboran dosierujon de la ŝelo.\n" +"\n" +" La kuranta dosierujo iĝu DOSIERUJO -- aŭ, se DOSIERUJO malestas,\n" +" la valoro de la variablo $HOME.\n" +"\n" +" La variablo $CDPATH difinas la serĉvojon por la dosierujo\n" +" entenanta DOSIERUJOn. En $CDPATH, dupunkto „:‟ apartigas\n" +" alternativajn dosierujojn, vakua dosierujnomo egalas la kurantan.\n" +" Se DOSIERUJO komenciĝas per „/‟, la variablo $CDPATH ne estas uzata.\n" +"\n" +" Se la dosierujo ne troviĝas, kaj la ŝela opcio „cdable_vars‟ estas\n" +" ŝaltita, la vorto estas interpretata kiel variablonomo. Se tiu\n" +" variablo havas valoron, tiu valoro estas uzata kiel DOSIERUJO.\n" +"\n" +" Opcioj:\n" +" -L\tlaŭu simbolajn Ligilojn: en DOSIERUJO, traktu la aperojn de\n" +"\t„..“ antaŭ ol elnodigi la simbolajn ligilojn\n" +" -P\tuzu la Fizikan strukturon de dosierujoj, elnodiginte simbolajn\n" +"\tligilojn de DOSIERUJO antaŭ ol trakti la aperojn de „..“\n" +" -e\teliru kun nenula elirstato se „-P‟ ĉeestas kaj la\n" +"\tkuranta dosierujo ne estas determinebla\n" +" -@\tse la operaciumo tion ebligas, prezentu dosieron posedantan\n" +"\tkromatributojn kiel dosierujon entenatan la dosieratributojn\n" +"\n" +" Defaŭlte la simbolaj ligiloj estas laŭataj, kvazaŭ „-L‟ ĉeestus.\n" +" La traktado de „..“ konsistas en forigo de la ĵus-antaŭa vojnoma\n" +" ero retrodirekte ĝis la oblikvo „/“ aŭ la komenco de DOSIERUJO.\n" +"\n" +" Elirstato:\n" +" Ĝi estas 0, se la dosierujŝanĝo sukcesis, kaj se, ĉeeste de „-P‟,\n" +" $PWD sukcese valoriziĝis; nenulo aliokaze." + +# pwd [-LP] +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Eligu la nomon de kuranta labora dosierujo\n" +"\n" +" Opcioj:\n" +" -L eligu la valoron de $PWD, se ĝi indikas la kurantan laboran\n" +" dosierujon\n" +" -P eligu la nomon de la fizika dosierujo, sen eventualaj simbolaj\n" +" ligiloj\n" +"\n" +" Defaŭlte „pwd‟ kondutas tiel, kiel kun la opcio „-L‟.\n" +"\n" +" Elirstato:\n" +" 0, krom se aperas misa opcio aŭ la kuranta dosierujo estas\n" +" nelegebla." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Malplena ordono\n" +"\n" +" Senefika: La komando nenion faras.\n" +"\n" +" Elirstato:\n" +" Ĉiam sukcesa." + +# true +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Liveru sukcesan rezulton\n" +"\n" +" Elirstato:\n" +" Ĉiam sukcesa." + +# false: +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Liveru fiaskon.\n" +"\n" +" Elirstato:\n" +" Ĉiam malsukcesa." + +# command [-pVv] command [arg ...] +# command [-pVv] KOMANDO [ARG ...] +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Plenumu simplan komandon aŭ vidigu informojn pri komandoj\n" +"\n" +" Plenumu KOMANDOn kun ARGoj sen atenti eventualajn ŝelfunkciojn\n" +" samnomajn; aŭ vidigu informojn pri indikitaj KOMANDOj. Uzeblas\n" +" por voki komandojn de disko malgraŭ la ekzisto de samnomaj\n" +" funkcioj.\n" +"\n" +" Opcioj:\n" +" -p Uzu la defaŭltan valoron de la de la variablo $PATH (tio\n" +"\tebligas trovi ĉiujn normajn utilaĵojn)\n" +" -v\tEligu komandopriskribon laŭ la maniero de la primitivaĵo „type‟\n" +" -V\tEligu pli detalan priskribon de KOMANDO\n" +"\n" +" Elirstato:\n" +" Tiu de KOMANDO; aŭ malsukceso, se KOMANDO ne troveblas." + +# declare [-aAfFgilnrtux] [-p] [name[=value] ...] +# declare [-aAfFgilnrtux] [-p] [NOMO[=VALORO] ...] +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Difinu valorojn aŭ atributojn de variabloj.\n" +"\n" +" Deklaru variablojn aŭ atribuu al ili atributojn.\tSe NOMOj\n" +" mankas, anstataŭe eligu la valoron de ĉiuj variabloj.\n" +"\n" +" Opcioj:\n" +" -f\tla ago aŭ eligo koncernu nur la funkciajn NOMOjn kaj difinojn\n" +" -F\teligu nur funkcinomojn (ĉe erarserĉo, ankaŭ lininumeron kaj\n" +"\tfontodosieran nomon) sen difinoj\n" +" -g se uzita en ŝelfunkcio, kreu mallokan variablon;\n" +" aliokaze, ignoru\n" +" -p\teligu la atributojn kaj la valorojn de ĉiu NOMO\n" +"\n" +" Opcioj atributdonaj:\n" +" -a\tla NOMOj estu entjerindicaj tabeloj (se realigite)\n" +" -A\tla NOMOj estu asocitabeloj (se realigite)\n" +" -i\thavigu al la variabloj NOMOj la atributon „integer‟ (entjera)\n" +" -l\tminuskligu la valoron de ĉiu NOMO ĉe valorizo\n" +" -n NOMO estu referenco al variablo nomata per ĝia valoro\n" +" -r\tla variabloj NOMOj estu nurlegaj\n" +" -t\thavigu al la NOMOj la atributon „trace‟ (spurata)\n" +" -u\tmajuskligu la valoron de ĉiu NOMO ĉe valorizo\n" +" -x\teksportu la variablojn NOMOj\n" +"\n" +" La uzo de „+‟ anstataŭ „-‟ malŝaltas la koncernan attributon.\n" +"\n" +" Por la variabloj posedantaj la atributon entjera, ĉe ĉiu valorizo\n" +" okazas aritmetika komputado (vd la komandon „let‟).\n" +" \n" +" Uzite en funkcio, „declare‟ faras la NOMOjn lokaj, samkiel la\n" +" komando „local‟. La opcio „-g‟ ĉi tiun efikon abolas.\n" +"\n" +" Eliistato:\n" +" Sukceso, krom se aperas misa opcio aŭ okazas eraro ĉe valorizo de " +"variablo." + +# typeset [-aAfFgilrtux] [-p] name[=value] ... +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Difinu atributojn kaj valorojn de variabloj\n" +"\n" +" Sinonimo de „declare“. Vd «help declare»." + +# local [option] name[=value] ... +# local [OPCIO] NOMO[=VALORO] ... +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Difinu lokajn variablojn\n" +"\n" +" Kreu lokan variablon NOMO kaj ĝin valorizu per VALORO. OPCIO\n" +" povas esti ajna el la opcioj de „declare‟.\n" +"\n" +" Lokaj variabloj uzeblas nur ene de funkcio; ili estas videblaj nur\n" +" en la funkcio kie ili estas difinitaj kaj en ĝiaj idoj.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas misa opcio, okazas valoriza eraro, aŭ la\n" +" ŝelo ne estas plenumanta funkcion." + +# echo: +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Eligu la argumentojn en la ĉefeligujon\n" +"\n" +" Eligu en la ĉefeligujon la ARGojn disigante ilin per po unu\n" +" spaceto, postmetu linirompon.\n" +"\n" +" Opcioj:\n" +" -n\tne aldonu la finan linirompon\n" +" -e\taktivigu interpretadon de la ĉi-subaj eskapaj deklivaĵoj\n" +" -E\tmalaktivigu interpretadon de la ĉi-subaj espapaj deklivaĵoj\n" +"\n" +" „echo‟ povas interpreti la sekvajn literojn prefiksitajn per\n" +" deklivo (per la signo „\\‟):\n" +"\t\\a\tpepo (sonsignalo)\n" +"\t\\b\tretropaŝo\n" +"\t\\c\tĉesigu pluan eligon\n" +"\t\\e\teskapsigno\n" +"\t\\E\teskapsigno\n" +"\t\\f\tpaĝ-avanco\n" +"\t\\n\tlinifino\n" +"\t\\r\tĉaretreveno\n" +"\t\\t\thorizontala tabo\n" +"\t\\v\tvertikala tabo\n" +"\t\\\\\tdeklivo „\\‟\n" +"\t\\0CCC\tla signo kies Askia kodono estas CCC (okume). CCC\n" +"\t\tpovas enteni 0, 1, 2 aŭ 3 okumajn ciferojn\n" +"\t\\xHH\tla signo kies 8-bita kodono estas HH (16-ume). HH\n" +"\t\tpovas enteni unu aŭ du 16-umajn ciferojn\n" +" \\uHHHH la Unikoda signo kies kodono estas la 16-uma\n" +" nombro HHHH. HHHH povas enteni de unu ĝis kvar\n" +" 16-umajn ciferojn.\n" +" \\UHHHHHHHH la Unikoda signo kies kodono estas la 16-uma\n" +" nombro HHHHHHHH. HHHHHHHH povas enteni de unu ĝis\n" +" ok 16-umajn ciferojn.\n" +"\n" +" Elirstato:\n" +" Sukcesa, krom se okazas elig-eraro." + +# echo [-n] [ARG ...] +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skribu argumentojn en la ĉefeligujon\n" +"\n" +" Eligu la ARGojn en la ĉefeligujon, aldonu linifinilon.\n" +"\n" +" Opcio:\n" +" -n Ne aldonu postan linifinilon\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se okazas skriberaro." + +# enable [-a] [-dnps] [-f filename] [name ...] +# enable [-a] [-dnps] [-f DOSIERNOMO] [NOMO ...] +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Aktivigu aŭ malaktivigu primitivajn komandojn\n" +"\n" +" Aktivigu aŭ malaktivigu primitivajn ŝelkomandojn. Tio ebligas\n" +" uzi eksteran komandon, samnoman kun primitivaĵo, sen indiki\n" +" ĝian plenan vojon.\n" +"\n" +" Opcioj:\n" +" -a\tListigu la primitivaĵojn indikante, ĉu ili estas aktivaj\n" +" -n Malaktivigu la NOMOjn, aŭ listigu la malaktivajn primitivaĵojn\n" +" -p\tListigu primitivaĵojn en formo taŭga por reuzo\n" +" -s Eligu nur la «specialajn» ŝelfunkciojn de Posix\n" +"\n" +" Opcioj regantaj dinamikan ŝargadon:\n" +" -f\tŜargu primitivaĵon NOMO el la dinamika biblioteko DOSIERNOMO\n" +" -d Forigu ŝelkomandon dinamike ŝargitan per -f\n" +"\n" +" Senopcie: Aktivigu ĉiujn NOMOjn\n" +"\n" +" Ekz-e por uzi la „test‟on troveblan en $PATH anstataŭ la\n" +" samnoman primitivan ŝelkomandon, diru: «enable -n test».\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se NOMO ne estas primitiva ŝelkomando aŭ okazis\n" +" eraro." + +# eval [ARG ...] +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Plenumu argumentojn kiel ŝelkomandon\n" +"\n" +" Kunmetu la ARGojn en unu ĉenon, uzu la rezulton kiel enigaĵon por\n" +" la ŝelo kaj plenumu la legita(j)n komando(j)n.\n" +"\n" +" Elirstato:\n" +" Tiu de la komandoĉeno; sukceso, se la komando estas vakua." + +# getopts optstring name [arg] => +# getopts OPCIĈENO NOMO [ARG] +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Analizu opciajn argumentojn\n" +"\n" +" La funkcion „getopts‟ uzas ŝelproceduroj por analizi opciformajn\n" +" numerparametrojn.\n" +"\n" +" La argumento OPCIĈENO entenas la rekonendajn opciliterojn; se\n" +" literon sekvas dupunkto, la opcio postulas argumenton, disde ĝi\n" +" apartigendan per blanka spaco.\n" +"\n" +" Ĉe ĉiu voko „getopts‟ liveros la vican opcion en la ŝelvariablon\n" +" $NOMO (estigante la variablon se ĝi ne ekzistas); kaj la indicon\n" +" de la sekve traktota argumento en la ŝelvariablon OPTIND. OPTIND\n" +" ricevas la komencan valoron 1 ĉe ĉiu voko de la ŝelo aŭ ŝela\n" +" skripto. Kiam opcio bezonas argumenton, „getopts‟ liveras tiun\n" +" argumenton en la ŝelvariablon OPTARG.\n" +"\n" +" La funkcio „getopts‟ raportas pri eraroj dumaniere. Se la unua\n" +" signo de OPCIĈENO estas dupunkto, „getopts‟ prisilentas\n" +" erarojn. En tiu reĝimo, nenia erarmesaĝo estas eligata.\n" +" Renkontinte misan opcion, „getopts‟ metas la trovitan opciliteron\n" +" en OPTARG. Se mankas bezonata argumento, la ŝelvariablo NOMO\n" +" ricevas la valoron ':', kaj la variablo OPTARG, la trovitan\n" +" opcion. Se „getopts‟ ne estas en silenta reĝimo kaj trovas\n" +" misan opcion, tiam NOMO ricevas la valoron '?' kaj OPTARG\n" +" senvaloriĝas. Se mankas bezonata opcio, NOMO ricevas la\n" +" valoron '?', OPTARG senvaloriĝas kaj erarmesaĝo estas eligata.\n" +"\n" +" Se la ŝelvariablo OPTERR havas la valoron 0, „getopts‟\n" +" malaktivigas la eligon de erarmesaĝoj, eĉ se la unua signo de\n" +" OPCIĈENO ne estas dupunkto. La apriora valoro de OPTERR estas 1.\n" +"\n" +" Normale „getopts‟ analizas la numerparametrojn ($0 - $9), sed se\n" +" estas pli da argumentoj, „getopts‟ anstataŭe analizas ilin.\n" +"\n" +" Elirstato:\n" +" Sukceso, se opcio estas trovita; malsukceso, se renkontiĝis\n" +" la fino de la opcioj aŭ okazis eraro." + +# exec [-cl] [-a name] [command [arguments ...]] [redirection ...] +# exec [-cl] [-a NOMO] [KOMANDO [ARGUMENTOJ ...]] [ALIDIREKTADO ...] +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Anstataŭigu la ŝelon je la donita komando\n" +"\n" +" Plenumu la KOMANDOn, anstataŭigante la ŝelon je la donita\n" +" programo. La ARGUMENTOj servas kiel argumentoj por KOMANDO.\n" +" Se KOMANDO ne estas indikita, la alidirektadoj okazu en \n" +" la kuranta ŝelo.\n" +"\n" +" Opcioj:\n" +" -a NOMO Pasigu NOMOn al KOMANDO kiel la argumenton argv[0]\n" +" -c\tLa plenumo de KOMANDO okazu en vakua medio\n" +" -l\tMetu minuson en la nulan argumenton pasigatan al KOMANDO\n" +"\n" +" Se la komandon ne eblas plenumi kaj la ŝelo ne estas dialoga, tiam\n" +" la ŝelo finiĝas, krom se la opcio „execfail‟ estas aktiva.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se KOMANDO ne estas trovita aŭ okazis eraro pri\n" +" alirektado." + +# exit [n] +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Forlasu la ŝelon\n" +"\n" +" Forlasu la ŝelon kun elirstato N. Se N mankas, la elirstato\n" +" estas tiu de la plej ĵuse plenumita komando." + +# logout [N] +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Adiaŭ, saluta ŝelo!\n" +"\n" +" Eliru el saluta ŝelo kun la elirstato N. Liveru malsukceson, se\n" +" plenumate ne en saluta ŝelo." + +# ZZZ: fc [-e ename] [-nlr] [first] [last] or +# fc -s [pat=rep] [command] => +# fc [-e REDAKTILO] [-lnr] [UNUA] [LASTA] aŭ +# fc -s [ŜABLONO=ANST] [KOMANDO] +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Eligu aŭ plenumu komandojn el la historilisto\n" +"\n" +" „fc‟ servas por listigi aŭ redakti kaj replenumi komandojn el la\n" +" historilisto. UNUA kaj LASTA povas esti numeroj, indikantaj\n" +" intervalon da numeroj; aŭ, se UNUA estas signoĉeno, ĝi indikas\n" +" la plej ĵusan komandon komenciĝantan per tiu signoĉeno.\n" +"\n" +" Opcioj:\n" +" -e REDAKTILO\tla uzota redaktilo. Defaŭlte FCEDIT, poste\n" +"\tEDITOR, poste „vi‟\n" +" -l\tnur eligu la liniojn sen redakti ilin\n" +" -n\teligu sennumere (nur la liniojn)\n" +" -r\tinversigu la ordon de la linioj (komencu per la plej ĵusaj).\n" +"\n" +" «fc -s [ŜABLONO=ANST ...] [KOMANDO]» plenumas la KOMANDOn en kiu\n" +" ĉiu apero de ŜABLONO estas la anstataŭigita je ANST.\n" +"\n" +" Oportuna alinomo por tio estas «alias r='fc -s'», tiel ke ekz-e per\n" +" «r cc» oni rulos la plej ĵusan komandon komenciĝantan per «cc», kaj\n" +" per «r» replenumigas la ĵusan komandon.\n" +"\n" +" Elisrstato:\n" +" Sukceso, aŭ la elirstato de la plenumita KOMANDO; nenulo, se okazis\n" +" eraro." + +# fg [job_spec] => fg [LABORINDIKO] +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Movu laboron en la dialogon\n" +"\n" +" Faru la laboron LABORINDIKO dialoga kaj la kuranta. Se\n" +" LABORINDIKO malestas, apliku la ŝelan koncepton pri la kuranta\n" +" laboro.\n" +"\n" +" Elirstato:\n" +" Tiu de la dialogigita komando; aŭ malsukceso, se okazis eraro." + +# bg [job_spec] => bg [LABORINDIKO] +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Forŝovu laboron fonen\n" +"\n" +" Forŝovu la laboron LABORINDIKO en la fonon, faru ĝin kvazaŭ\n" +" lanĉita kun „&‟. Se nenia laboro estas indikita, apliku la\n" +" ŝelan koncepton pri la kuranta laboro.\n" +"\n" +" Elirstato:\\n\"\n" +" Sukceso, kondiĉe ke laborregadon estas ŝaltita kaj ne okazis\n" +" eraro." + +# hash [-lr] [-p VOJNOMO] [-dt] [NOMO ...] +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Registru aŭ vidigu vojnomojn de programoj\n" +"\n" +" Por ĉiu komando NOMO, trovu kaj registru en hakettabelo la\n" +" kompletan vojon al ties programo. Se nenia argumento estas\n" +" donita, eligu la informojn pri la memorataj komandoj.\n" +"\n" +" Opcioj:\n" +" -d Forgesu la registritajn vojojn por ĉiu NOMO\n" +" -l Eligu en formo reuzeblan por enigo\n" +" -p VOJNOMO\tuzu VOJNOMOn kiel kompletan vojon por la NOMO\n" +" -r Forgesu ĉiujn registritajn vojojn\n" +" -t Eligu la registritajn vojojn por ĉiu NOMO, mentante la NOMOn\n" +" titole antaŭ ĝia vojo se estas pluraj NOMOj\n" +"\n" +" Argumentoj:\n" +" NOMO Ĉiu NOMO estas serĉota en $PATH kaj registrota en la\n" +"\thakettabelo de registritaj komandoj\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas netrovebla NOMO aŭ misa opcio." + +# help [-ds] [pattern ...] +# help [-ds] [ŜABLONO ...] +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Vidigu informon pri prmitivaj komandoj\n" +"\n" +" Eligu mallongan resummon pri la primitivaj komandoj. Se ĉeestas\n" +" ŜABLONO, eligu detalan helpon pri ĉiuj komandoj kongruaj kun la\n" +" ŝablono; alie eligu nur liston da temoj.\n" +"\n" +" Opcioj:\n" +" -d\tEligu mallongajn priskribojn de ĉiuj temoj\n" +" -m\tVidigu uzmanieron en la „manpaĝa‟ stilo (kiel la komando „man‟)\n" +" -s\tEligu nur mallongan resumon pri ĉiu trovita kongruaĵo\n" +"\n" +" Argumentoj:\n" +" ŜABLONO Komenca signoĉeno de temtitolo\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se mankas kongruaĵoj por ŜABLONO, aŭ aperis\n" +" misa opcio." + +# ZZZ history [-c] [-d offset] [n] or +# history -awr [filename] or +# history -ps arg [arg...] => +# history [-c] [-d POZICIO] [n] aŭ +# history -awr [DOSIERNOMO] aŭ +# history -ps ARG [ARG...] +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Eligu aŭ redaktu la historiliston.\n" +"\n" +" Eligu la liston de enigitaj komandoj kun lininumeroj. La ŝanĝitajn\n" +" liniojn marku per „*‟. Kun argumento n, eligu nur la ĵusajn\n" +" n liniojn.\n" +"\n" +" Opcioj:\n" +" -c forviŝu la tutan historion (forigu ĉiujn erojn el la listo)\n" +" -d POZICIO forviŝu la linion kies numero estas POZICIO. Por\n" +" POZICIO negativa la numerado iras reen ekde la fino de la\n" +" historio \n" +" -a aldonu la historiliniojn de la kuranta seanco al la\n" +" historidosiero\n" +" -n legu ĉiujn ankoraŭ ne legitajn liniojn el la historidosiero\n" +" kaj aldonu ilin en la historiliston\n" +" -r legu la dosieron kaj aldonu ĝian enhavon al la kuranta\n" +" historilisto\n" +" -w konservu la kurantan historion en la historidosiero\n" +"\n" +" -p plenumu historian anstataŭigon por ĉiu el la argumentoj ARG\n" +" kaj eligu la rezulton sen konservi ion en la historilisto\n" +"\n" +" -s enŝovu la neopciajn argumentojn ARG en la historiliston\n" +" kiel unu apartan linion\n" +"\n" +" Se ĉeestas DOSIERNOMO, uzu ĝin kiel nomon de historidosiero;\n" +" alie, se la variablo HISTFILE havas valoron, uzu ĉi tiun;\n" +" alie uzu «~/.bash_history».\n" +"\n" +" Se la variablo HISTTIMEFORMAT havas valoron kaj se ĉi tiu ne\n" +" estas null, tiam ĝi servu kiel formata ĉeno en strftime(3) por\n" +" tempostampi ĉiun linion en eligaĵoj de historio. Aliokaze nenia\n" +" tempostampo estu eligata.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se renkontiĝas mis opcio aŭ okazis eraro." + +# ZZZ jobs [-lnprs] [jobspec ...] or +# jobs -x command [args] => +# jobs [-lnprs] [LABORINDIKO ...] aŭ +# jobs -x KOMANDO [ARGS] +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Montru la staton de laboroj\n" +"\n" +" Eligu liston da aktivaj laboroj. Se LABORINDIKO estas donita,\n" +" nur pri tiu laboro informu. Senopcie, montru la staton de ĉiuj\n" +" aktivaj laboroj.\n" +"\n" +" Opcioj:\n" +" -l eligu, krom la normalajn informojn, ankaŭ la proceznumerojn\n" +" -n listigu nur la procezojn kies stato ŝanĝiĝis post la lasta\n" +" informmendo\n" +" -p eligu nur la proceznumerojn\n" +" -r informu nur pri la laboroj aktivaj (rulataj)\n" +" -s informu nur pri la laboroj haltigitaj\n" +"\n" +" La opcio -x lanĉas la KOMANDOn, antaŭe ŝanĝinte ĉiujn\n" +" laborindikojn aperantajn en la argumentoj ARGS je la\n" +" proceznumero de la ĉefprocezo de la grupo.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se enestas misa opcio aŭ okazis eraro.\n" +" Ĉe „-x‟, la elirstato de la KOMANDO." + +# disown [-h] [-ar] [jobspec ...] +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Forigu laborojn el la kuranta ŝelo\n" +"\n" +" Forigu ĉiun laboron indikitan per argumento LABORINDIKO el\n" +" la tabelo de aktivaj laboroj. Se nenia laboro estas indikita,\n" +" apliku la ŝelan koncepton pri la kuranta laboro.\n" +"\n" +" Opcioj:\n" +" -a forigu ĉiujn laborojn el la labortabelo\n" +" -h anstataŭ forigi laboron el la tabelo, marku ĝin tiel, ke la\n" +" signalo SIGHUP ne estu plusendita al la laboro(j) kiam tian\n" +" signalon ricevas la ŝelo\n" +" -r forigu nur rulatajn laborojn\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se enestas misa opcio aŭ LABORINDIKO." + +# ZZZ: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or +# kill -l [sigspec] => +# kill [-s SIGSNOM | -n SIGNUM | -SIGNOM] PN | LABORINDIKO ... aŭ +# kill -l [SIGNOM] +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Sendu signalon al laboro\n" +"\n" +" Sendu al la procezoj, indikitaj per sia proceznumero PN (aŭ\n" +" per la LABORINDIKO) la signalon SIGNOM aŭ SIGNUM. Se nek\n" +" SIGNUM nek SIGNOM enestas, sendu SIGTERM.\n" +"\n" +" Opcioj:\n" +" -s\tSIGNOM estas nomo de signalo\n" +" -n\tSIGNUM estas numero de signalo\n" +" -l listigu signalnomojn; la eventuale sekvantaj entjeraj\n" +" argumentoj estas signalnumeroj, ĉeeste de kiuj nur la al\n" +" ili respondaj signalnomoj estu eligataj\n" +" -L sinonimo por -l\n" +"\n" +" „kill‟ estas primitiva ŝelkomando pro du kaŭzoj:\n" +" unue, ĝi ebligas uzi laborindikojn anstataŭ proceznumerojn;\n" +" kaj due, se la maksimuma nombro de kreeblaj procezoj estas\n" +" atingita, ne necesas lanĉi kroman procezon por ĉesigi iun alian.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se enestas misa opcio aŭ okazis eraro." + +# let arg [arg ...] +# let ARG [ARG ...] +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Komputu aritmetikan esprimon\n" +"\n" +" Ĉiu arg estas komputenda aritmetika esprimo. La komputado uzas\n" +" fikslongajn entjerojn sen kontrolo pri trooj; tamen divido per 0\n" +" estas kaptata kaj raportata kiel eraro. En la sekvanta listo da\n" +" operacioj la samprioritataj operacisimboloj aperas kune. La\n" +" grupoj estas aranĝitaj laŭ malkresko de ligforto.\n" +"\n" +"\tnomo++, nomo--\tpostkrementoj de variablo\n" +"\t++nomo, --nomo\tantaŭkrementoj de variablo\n" +"\t-, +\t\tunulokaj minus, plus\n" +"\t!, ~\t\tlogika kaj laŭbita negoj\n" +" ** potencigo\n" +"\t*, /, %\t\tmultipliko, divido, resto\n" +"\t+, -\t\tadicio, subtraho\n" +"\t<<, >>\t\tlaŭbitaj ŝovoj maldekstren kaj dekstren\n" +"\t<=, >=, <, >\tkomparaj operacioj\n" +"\t==, !=\t\tegalo, neegalo\n" +"\t&\t\tlaŭbita KAJ\n" +"\t^\t\tlaŭbita DISAŬ\n" +"\t|\t\tlaŭbita AŬ\n" +"\t&&\t\tlogika KAJ\n" +"\t||\t\tlogika AŬ\n" +"\tesprimo ? esprimo : esprimo\n" +"\t\t\tkondiĉa esprimo\n" +"\t=, *=, /=, %=,\n" +"\t+=, -=, <<=, >>=,\n" +"\t&=, ^=, |=\tvalorizoj\n" +"\n" +" Ŝelvariabloj uzeblas kiel operandoj. En esprimo la nomon de\n" +" variablo anstataŭas ĝia valoro (altipigita al fikslonga entjero).\n" +" Por tia uzo en esprimo variablo ne bezonas havi ŝaltita sian\n" +" atributon „entjera‟.\n" +"\n" +" La operacioj plenumiĝas laŭ la ligforto de siaj operacisignoj. La\n" +" enkrampigitaj subesprimoj plenumiĝas unue, kaj tio ebligas\n" +" ĉirkaŭiri la supre priskribitajn regulojn pri la ligfortoj.\n" +"\n" +" Elirstato:\n" +" Se la komputo de la lasta ARG donas 0, la komando „let‟\n" +" liveras 1; alie ĝi liveras 0." + +# read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] +# [-p prompt] [-t timeout] [-u fd] [name ...] +# read [-ers] [-a TABELO] [-d DISIG] [-i TEKSTO] [-n NSIGN] [-N NSIGN] +# [-p INVIT] [-t TLIM] [-u DN] [NOMO ...] +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Legu linion el la ĉefenigujo kaj disigu ĝin en kampojn\n" +"\n" +" Legu unu linion el la ĉefenigujo, aŭ el la dosiero indikita\n" +" per dosiernumero DN, se la opcio -u estas donita. La linion\n" +" disigu en kampojn, kiel ĉe vortodisigo, kaj la unuan vorton ricevu\n" +" la unua argumento NOMO; la duan, la dua NOMO ktp; la lasta NOMO\n" +" ricevu ĉiujn restantajn vortojn. Nur la signoj troveblaj en la\n" +" variablo $IFS rolas kiel vortodisigiloj.\n" +"\n" +" Se nenia NOMO estas donita, konservu la legitan linion en la\n" +" variablo REPLY.\n" +"\n" +" Opcioj:\n" +" -a TABELO\tla legatajn vortojn konservu en la sinsekvaj anoj de\n" +"\t\tTABELO, komencante ekde la indico 0\n" +" -d DISIG\tlegu ĝis la unua signo de la disigilo DISIG (anstataŭ\n" +"\t\tlegi ĝis linifino)\n" +" -e\t\tuzu Readline por akiri la linion\n" +" -i TEKSTO\tuzu TEKSTOn kiel komencan tekston por Readline\n" +" -n NSIGN\tĉesu leginte NSIGN da signoj (anstataŭ legi ĝis\n" +"\t\tlinifino), krom se disigilo aperas pli frue\n" +" -N NSIGN\tlegu ekzakte NSIGN da signoj (tra ĉiuj disigiloj), krom\n" +" se la dosierfino aŭ la tempolimo atingiĝos pli frue\n" +" -p INVIT\teligu la invitĉenon INVIT sen liniavanco antaŭ la\n" +"\t\tatendata enigo\n" +" -r\t\tla deklivo „\\‟ estu ordinara signo (ne eskapsigno)\n" +" -s\t\tsilentigu la eĥon de la terminala enigo\n" +" -t TLIM\tla komando read ĉesiĝu kun fiaska elirstato se\n" +"\t\tkompleta linio da enigaĵo ne estas ricevita dum\t TLIM\n" +"\t\tda sekundoj. Se la variablo TMOUT havas valoron, ĉi\n" +"\t\ttiu estas uzata kiel defaŭlta atendolimo. TLIM povas\n" +"\t\testi frakcio. Se TLIM estas 0,\t read tuj finiĝas sen\n" +" provi ion legi, sed sukcesas nur se engaĵo pretas\n" +" ĉe la indikita dosiernumero. La elirstato estas pli\n" +" granda ol 128 se la atendotempo estas atingita\n" +" -u DN\tlegu per la dosiernunero DN anstataŭ el la ĉefenigujo\n" +"\n" +" Elirstato:\n" +" Ĝi estas 0, krom se renkontiĝas dosierfino, aŭ atendolimo estas\n" +" atingita (tiuokaze ĝi superas 128), aŭ okazas valoriza eraro, aŭ\n" +" -u indikas nevalidan dosiernumeron." + +# return [n] +# return [N] +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Revenu el ŝelfunkcio\n" +"\n" +" Igas la funkcion aŭ punkte vokitan („.‟, „source‟) skripton finiĝi\n" +" kaj liveri la donitan valoron N kiel elirstaton. Se N mankas,\n" +" la elirstato estas tiu de la ĵusa komando.\n" +"\n" +" Elirstato:\n" +" N, aŭ malsukceso se la ŝelo ne plenumas ŝelfunkcion aŭ skripton." + +# set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] +# set [-abefhkmnptuvxBCHP] [-o OPCINOMO] [--] [ARG ...] +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Donu aŭ forprenu valorojn de ŝelvariabloj kaj numerparametroj.\n" +"\n" +" Ŝanĝu la valoron de ŝelatributoj kaj numerparametroj, aŭ vidigu la\n" +" nomojn kaj valorojn de ŝelvariabloj.\n" +"\n" +" Opcioj:\n" +" -a\tMarku eksportendaj la variablojn ŝanĝitajn aŭ kreitajn\n" +" -b\tTuj sciigu pri finiĝo de fonaj laboroj\n" +" -e\tEliru tuj se ajna komando finiĝis kun elirstato alia ol 0\n" +" -f\tMalŝaltu generadon de dosiernomoj (globbing)\n" +" -h\tRegistru en hakettabelo la situon de komandoj serĉataj\n" +" -k\tĈiujn valorizojn en ajna parto de komandolinio rigardu\n" +"\tkiel valorizojn de ŝelvariabloj por la labormedio de la\n" +"\tkomando, ne nur la valorizojn antaŭ la komandonomo\n" +" -m\tAktivigu la laborregadon\n" +" -n\tLegu la komandojn sen plenumi ilin\n" +" -o OPCINOMO\n" +"\tAktivigu la variablon respondan al la OPCIONOMO:\n" +"\t allexport\tsamkiel -a\n" +"\t braceexpand\tsamkiel -B\n" +"\t emacs\tuzu emakseskan interfacon por liniredaktado\n" +"\t errexit\tsamkiel -e\n" +"\t errtrace\tsamkiel -E\n" +"\t functrace\tsamkiel -T\n" +"\t hashall\tsamkiel -h\n" +"\t histexpand\tsamkiel -H\n" +"\t history\tebligu komandohistorion\n" +"\t ignoreeof\tla ŝelo ne finiĝu leginte dosierfinilon\n" +"\t interactive-comments\n" +"\t\t\ttoleru komentojn en dialogaj komandoj\n" +"\t keyword\tsamkiel -k\n" +"\t monitor\tsamkiel -m\n" +"\t noclobber\tsamkiel -C\n" +"\t noexec\tsamkiel -n\n" +"\t noglob\tsamkiel -f\n" +"\t notify\tsamkiel -b\n" +"\t nounset\tsamkiel -u\n" +"\t onecmd\tsamkiel -t\n" +"\t physical\tsamkiel -P\n" +"\t pipefail\tla elirstato de dukto estu la elirstato\n" +"\t\t\tde la lasta komando finiĝinta nenule, aŭ\n" +"\t\t\t0, se neniu komando alie finiĝis\n" +"\t posix\tŝanĝu la konduton de Baŝo ĉie kie ĝia defaŭlta\n" +"\t\t\tfunkciado devias disde Pozikso, tiel ke ĝi\n" +"\t\t\tkonformu al tiu normo\n" +"\t privileged\tsamkiel -p\n" +"\t verbose\tsamkiel -v\n" +"\t vi\t\tuzu vi-eskan interfacon por liniredaktado\n" +"\t xtrace\tsamkiel -x\n" +" -p\tPrivilegia reĝimo, aktiviĝas meme kiam la reala kaj efektiva\n" +"\tidentoj de la uzanto malkongruas. La dosiero $ENV ne estas\n" +"\ttraktata, nek la ŝelfunkcioj, importataj el la medio.\n" +"\tMalaktivigo de tiu opcio ŝanĝas la efektivajn uid kaj gid\n" +"\tlaŭ la realaj uid kaj gid\n" +" -t\tFinu la ŝelon leginte kaj plenuminte unu komandon\n" +" -u\tProvo anstataŭigi senvaloran variablon estu eraro\n" +" -v\tEligu la komandoliniojn legatajn\n" +" -x\tEligu la plenumotajn komandojn kaj iliajn argumentojn\n" +" -B\tLa ŝelo faru vinkulmalvolvon\n" +" -C\tSe aktiva, malebligu skribdifekti ekzistantajn ordinarajn\n" +"\tdosierojn per alidirektado de la eligo\n" +" -E\tSe aktiva, la ERR-kaptilon (ERR trap) heredas la ŝelaj\n" +"\tfunkcioj\n" +" -H\tEbligu atingi la historion !-stile. Defaŭlte la opcio estas\n" +"\taktiva en la dialogaj ŝeloj.\n" +" -P\tLa simbolaj ligiloj estu travideblaj ĉe plenumo de komandoj\n" +"\tkiuj ŝanĝas la kurantan dosierujon („cd‟ ktp uzu «fizikan»\n" +"\tinterpreton de vojnomo).\n" +" -T\tSe aktiva, la ŝelaj funkcioj heredas la kaptilojn (Traps)\n" +"\tDEBUG kaj RETURN \n" +" --\tLa restantajn argumentojn uzu por valorizi la numerparametrojn.\n" +"\tSe tiaj argumentoj mankas, malvalorizu la numerparametrojn.\n" +" -\tLa restantajn argumentojn uzu por valorizi la numerparametrojn.\n" +"\tLa opcioj -x kaj -v malaktiviĝas.\n" +"\n" +" Uzante la signon + anstataŭ - vi povas malŝalti la opcion. La\n" +" opciojn ankaŭ eblas uzi ĉe la voko de la ŝelo. La kuranta aro da\n" +" aktivaj opcioj troveblas en $-. La restantaj n argumentoj ARG\n" +" iĝas valoroj de la numervariabloj $1, $2 ... $n (en tiu ordo).\n" +" Senargumente, eligu ĉiujn ŝelvariablojn.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se renkontiĝas misa opcio." + +# unset [-f] [-v] [name ...] +# unset [-f] [-v] [NOMO ...] +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Forviŝu valorojn kaj atributojn de ŝelaj funkcioj kaj variabloj\n" +"\n" +" Por ĉiu NOMO, forviŝu la respondan variablon aŭ funkcion.\n" +"\n" +" Opcioj:\n" +" -f\ttraktu ĉiun NOMOn kiel funkcion\n" +" -v traktu ĉiun NOMOn kiel variablon\n" +" -n traktu ĉiun NOMOn kiel nomreferencon, kaj senvalorigu ĝin mem\n" +" (kaj ne la referencatan variablon)\n" +" \n" +" Se neniu el la du opcioj estas indikita, „unset‟ unue provos\n" +" forviŝi variablon, kaj se tia ne troviĝos, funkcion.\n" +"\n" +" Iujn variablojn ne eblas forviŝi. Vd ankaŭ la helpon pri „readonly‟.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperis misa opcio aŭ NOMO estas nurlega." + +# export [-fn] [name[=value] ...] or export -p +# export [-fn] [NOMO[=VALORO] ...] aŭ export -p +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marku ŝelvariablojn kiel eksportajn\n" +"\n" +" Marku la NOMOjn por aŭtomata eksporto en la medion de la\n" +" plenumotaj komandoj. Se ĉeestas VALORO, uzu ĝin por valorizi\n" +" NOMOn antaŭ ol eksporti.\n" +"\n" +" Opcioj:\n" +" -f\ttemas pri ŝelfunkcioj\n" +" -n\tforviŝu la eksportomarkon de la NOMOj\n" +" -p\teligu la liston de ĉiuj eksportaj variabloj kaj funkcioj\n" +"\n" +" La opcio „--‟ ĉesigas pluan opcitraktadon.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperis nevalida NOMO aŭ misa opcio." + +# readonly [-aAf] [name[=value] ...] or readonly -p +# readonly [-aAf] [NOMO[=VALORO] ...] aŭ readonly -p +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Faru ŝelvariablojn neŝanĝeblaj\n" +"\n" +" La donitaj NOMOj iĝas nurlegaj kaj la valorojn de tiuj nomoj\n" +" ne povas ŝanĝi posta valorizo. Se ĉeestas VALORO, uzu ĝin por\n" +" valorizi la NOMOn antaŭ ol fari ĝin nurlega.\n" +"\n" +" Opcioj:\n" +" -a\ttemas pri entjerindica tabelo indikita per plursignifa NOMO\n" +" -A\ttemas pri la asocitabela signifo de plursignifa NOMO\n" +" -f\ttemas pri la ŝelfunkcia signifo de plursignifa NOMO\n" +" -p\teligu ĉiujn nurlegajn variablojn aŭ funkciojn, depende je\n" +" tio, ĉu la opcio „-f“ estas aldonita\n" +"\n" +" La opcio „--‟ ĉesigas pluan opcitraktadon.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas nevalida nomo aŭ misa opcio." + +# shift [n] +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Ŝovu numerparametrojn\n" +"\n" +" La numerparametrojn $N+1, $N+2 ... renumeru al $1, $2 ...\n" +" Se N ne estas indikita, uzu 1 anstataŭe." + +# source filename [arguments] +# source DOSIERNOMO [ARGUMENTOJ] +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Plenumu komandojn el dosiero en la kuranta ŝelo\n" +"\n" +" Legu kaj plenumu la komandojn el DOSIERNOMO en la kuranta ŝelo.\n" +" Uzu la vojojn el la variablo $PATH por trovi la dosierujon de\n" +" DOSIERNOMO. La eventualaj ARGUMENTOJ iĝas la numerparametroj por\n" +" plenumo de DOSIERNOMO.\n" +"\n" +" Elirstato:\n" +" Tiu de la komando laste plenumita en DOSIERNOMO; malsukceso, se\n" +" DOSIERNOMO ne legeblas." + +# suspend [-f] +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Haltetigu la plenumon de la ŝelo\n" +"\n" +" Haltetigu la plenumon de la ŝelo ĝis ĝi ricevos la signalon SIGCONT.\n" +" Krom se per superforto, salutan ŝelon ne eblas haltetigi.\n" +"\n" +" Opcio:\n" +" -f\tSuperforte haltetu, eĉ se la ŝelo estas saluta ŝelo\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se laborregado estas malŝaltita aŭ okazis eraro." + +# test [expr] +# test [ESPRIMO] +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Komputu kondiĉan esprimon\n" +"\n" +" Liveru elirstaton 0 (vera) aŭ 1 (malvera) laŭ la rezulto de\n" +" komputado de la ESPRIMO. La esprimoj povas esti unulokaj aŭ\n" +" dulokaj. La unulokaj plejparte servas por determini la statuson\n" +" de dosiero. Krome, estas operacioj super ĉenoj kaj la\n" +" nombrokomparaj operacioj.\n" +"\n" +" La konduto de test-komando dependas je la kiomo de ĝiaj argumentoj.\n" +" Plenan priskribon donas «man bash».\n" +"\n" +" Operacioj super dosieroj:\n" +"\n" +"\t-a DOSIERO\tVera se DOSIERO ekzistas\n" +"\t-b DOSIERO\tVera se DOSIERO estas por bloka eneligo\n" +"\t-c DOSIERO\tVera se DOSIERO estas por bajta eneligo\n" +"\t-d DOSIERO\tVera se DOSIERO estas dosierujo\n" +"\t-e DOSIERO\tVera se DOSIERO ekzistas\n" +"\t-f DOSIERO\tVera se DOSIERO ekzistas kaj estas ordinara\n" +"\t-g DOSIERO\tVera se DOSIERO havas set-group-id = 1\n" +"\t-h DOSIERO\tVera se DOSIERO estas simbola ligilo\n" +"\t-L DOSIERO\tVera se DOSIERO estas simbola ligilo\n" +"\t-k DOSIERO\tVera se la DOSIERO havas sticky = 1\n" +"\t-p DOSIERO\tVera se DOSIERO estas nomhava dukto\n" +"\t-r DOSIERO\tVera se vi rajtas legi DOSIEROn\n" +"\t-s DOSIERO\tVera se DOSIERO ekzistas kaj longas pli ol 0\n" +"\t-S DOSIERO\tVera se DOSIERO estas kontaktingo („socket‟)\n" +"\t-t DNUMERO\tVera se la dosiero DNUMERO estas terminala\n" +"\t-u DOSIERO\tVera se DOSIERO havas set-user-id = 1\n" +"\t-w DOSIERO\tVera se vi rajtas skribi en DOSIEROn\n" +"\t-x DOSIERO\tVera se vi rajtas lanĉi DOSIEROn\n" +"\t-O DOSIERO\tVera se DOSIERO estas via dosiero\n" +"\t-G DOSIERO\tVera se DOSIERO apartenas al via grupo\n" +"\t-N DOSIERO\tVera se DOSIERO ŝanĝiĝis post la lasta lego\n" +"\n" +"\tD_RO1 -nt D_RO2\tVera se la dosiero D_RO1 estas pli freŝa\n" +"\t\t\t(laŭ la ŝanĝodato) ol la dosiero D_RO2\n" +"\tD_RO1 -ot D_RO2\tVera se D_RO1 estas malpli freŝas ol D_RO2\n" +"\tD_RO1 -ef D_RO2\tVera se D_RO1 estas rekta ligilo al D_RO2\n" +"\n" +" Operacioj super ĉenoj:\n" +"\n" +"\t-z ĈENO\t\tVera se ĈENO estas vakua\n" +"\t-n ĈENO\t\tVera se ĈENO ne estas vakua\n" +"\tĈENO\t\tVera se ĈENO ne estas vakua\n" +"\tĈENO1 = ĈENO2\tVera se la ĉenoj estas egalaj\n" +"\tĈENO1 != ĈENO2\tVera se la ĉenoj ne estas egalaj\n" +"\tĈENO1 < ĈENO2\tVera se ĈENO1 leksikografie antaŭas la\n" +"\t\t\tĉenon ĈENO2\n" +"\tĈENO1 > ĈENO2\tVera se ĈENO1 leksikografie sekvas la\n" +"\t\t\tĉenon ĈENO2\n" +"\n" +" Diversaj operacioj:\n" +"\n" +" -o OPCIO Vera se la ŝelopcio OPCIO estas ŝaltita\n" +" -v VAR Vera se la ŝelvariablo VAR havas valoron\n" +" -R VAR Vera se la ŝelvariablo VAR havas valoron kaj\n" +" estas nomreferenco\n" +"\t! ESPR\t\tVera se la esprimo ESPR estas malvera\n" +"\tESPR1 -a ESPR2\tVera se ambaŭ esprimoj estas veraj\n" +"\tESPR1 -o ESPR2\tVera se ajna el la esprimoj estas vera\n" +"\n" +"\targ1 KP arg2\tAritmetikaj komparoj. KP estas iu el la\n" +"\t\t\trilatoj -eq, -ne, -lt, -le, -gt, -ge\n" +"\n" +" La aritmetikaj komparoj liveras veron se arg1 estas respektive\n" +" egala, neegala, malplia ol, malplia aŭ egala al, plia ol,\n" +" plia aŭ egala al arg2.\n" +"\n" +" Elirstato:\n" +" Sukceso, se la rezulto de la komputo de ESPRIMO estas vero;\n" +" malsukceso, se la rezulto estas malvero aŭ renkontiĝas misa\n" +" argumento." + +# [ arg... ] +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Ĉi tiu estas sinonimo de la primitivo „test‟; tamen la lasta\n" +" argumento devas esti „]‟ fermanta la esprimon komencitan per „[‟." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Vidigu proceztempojn\n" +"\n" +" Eligu la tempojn akumulitajn de la uzanto kaj de la kerno\n" +" por la ŝelo kaj ĝiaj procezidoj.\n" +"\n" +" Elirstato:\n" +" Ĉiam sukcesa." + +# trap [-lp] [[arg] signal_spec ...] +# trap [-lp] [[ARG] SIGNALINDIKO ...] +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Kaptu signalojn kaj aliajn eventojn\n" +"\n" +" Difinu kaj aktivigu traktilojn plenumotajn kiam ŝelo ricevos\n" +" signalojn aŭ ĉe aliaj kondiĉoj.\n" +"\n" +" La komando ARG estas legota kaj plenumota kiam la ŝelo ricevos\n" +" signalon el SIGNALINDIKO. Se ARG malestas (kaj SIGNALINDIKO\n" +" konsistas el unu sola signalo) aŭ estas „-‟, ĉiuj indikitaj\n" +" signaloj rericevas sian komencan valoron. Se ARG estas vakua\n" +" ĉeno, la ŝelo mem kaj komandoj el ĝi vokitaj malatentos ĉiujn\n" +" signalojn de SIGNALINDIKO.\n" +"\n" +" Se inter la signaloj SIGNALINDIKO estas „EXIT‟ (aŭ 0), tiam ARG de\n" +" la komando plenumiĝos ĉe la eliro el la ŝelo. Se en SIGNALINDIKO\n" +" estas „DEBUG‟, ARG plenumiĝos post ĉiu komando. Se en\n" +" SIGNALINDIKO estas „RETURN“, ARG plenumiĝos ĉiufoje kiam finiĝas\n" +" skripto rulata per komando „.“ aŭ „source“. La SIGNALINDIKO „ERR“\n" +" igas ARGon plenumiĝi ĉiufoje kiam malsukceso de komando kaŭzus\n" +" eliron el la ŝelo havanta la opcion „-e“ ŝaltita.\n" +"\n" +" Senargumente trap listigas komandojn plenumotajn laŭ ĉiu signalo.\n" +"\n" +" Opcioj:\n" +" -l\tlistigu la signalnomojn kun la numeroj\n" +" -p vidigu la trap-komandojn por trakti ĉiun SIGNALINDIKOn\n" +"\n" +" Ĉiu SIGNALINDIKO estas aŭ signalnomo el , aŭ\n" +" signalnumero. La signalnomoj estas usklecoblindaj, kaj la\n" +" prefikso „SIG‟ estas ellasebla. Signalon S oni povas sendi al la\n" +" ŝelo per la komando «kill -S $$».\n" +"\n" +" Elirstato:\n" +" Sukceso, kondiĉe ke SIGNALINDIKOj kaj la opcioj estas taŭgaj." + +# type [-afptP] name [name ...] +# type [-afptP] NOMO [NOMO ...] +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Vidigu informon pri tipo de komando\n" +"\n" +" Por ĉiu NOMO, montru kion ĝi signifus en la pozicio de\n" +" komadonomo.\n" +"\n" +" Opcioj:\n" +" -a\tlistigu ĉiujn lokojn entenantajn plenumeblan dosieron\n" +" kun koncerna NOMO; la listo inkludas alinomojn kaj\n" +" funkciojn, se kaj nur se malestas la opcio „-p‟\n" +" -f ekskludas el la serĉo la ŝelfunkciojn\n" +" -P\tapliku vojserĉon laŭ PATH por ĉiu NOMO, eĉ se ekzistas tianoma\n" +" funkcio, primitiva komando aŭ alinomo, kaj liveru la nomon de\n" +" tiel plenumebla diskdosiero\n" +" -p\teligu la nomon de dosiero kiu iĝus plenumata;\n" +" aŭ nenion, se «type -t name» ne eligus „file‟\n" +" -t\teligu unu vorton, iun el la sekvaj:\n" +" „alias‟, „keyword‟, „function‟, „builtin‟, „file‟ aŭ „‟ --\n" +" se NOMO estas, respektive, alinomo, ŝela ŝlosilvorto,\n" +" ŝelfunkcio, ŝela primitivo, dosiero aŭ nenio konata\n" +"\n" +" Argumentoj:\n" +" NOMO Esplorenda komandonomo\n" +"\n" +" Elirstato:\n" +" Sukceso, se ĉiujn NOMOjn prosperis trovi; malsukceso, se estis\n" +" netrovitaj." + +# ulimit [-SHacdefilmnpqrstuvx] [limit] +# ulimit [-SHacdefilmnpqrstuvx] [LIMO] +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Ŝanĝu risurcolimaĵojn de la ŝelo.\n" +"\n" +" La komando „ulimit‟ ebligas mastrumi la risurcojn disponeblajn al\n" +" la procezoj lanĉataj el la ŝelo (se la operaciumo ebligas tion).\n" +"\n" +" Opcioj:\n" +" -S ŝanĝebla („soft‟) limo\n" +" -H firma („hard‟) limo\n" +" -a eligu ĉiujn kurantajn risurcolimaĵojn\n" +" -b la kontaktoskatola bufrolongo\n" +" -c maksimuma longo de nekropsia dosiero („core‟)\n" +" -d maksimuma longo de datumsegmento de procezo\n" +" -e maksimuma viciga prioritato („nice‟)\n" +" -f maksimuma longo de dosieroj skribataj de la ŝelo kaj ĝiaj idoj\n" +" -i maksimuma longo de pendaj signaloj\n" +" -k maksimuma nombro de kernaj atendovicoj (kqueues) disponigeblaj\n" +" al la procezo \n" +" -l maksimuma longo de ŝlosebla procezmemoro (mlock)\n" +" -m maksimuma longo de rezida procezmemoro\n" +" -n maksimuma nombro de malfermitaj dosiernumeroj\n" +" -p longo de dukta bufro (pipe)\n" +" -q maksimuma nombro da bajtoj en atendovicoj de Poziksaj mesaĝoj\n" +" -r maksimuma prioritato realtempa\n" +" -s maksimuma longo de stako\n" +" -t maksimuma tempo ĉefprocesora (en sekundoj)\n" +" -u maksimuma nombro de procezoj de la uzanto\n" +" -v longo de la virtuala memoro\n" +" -x maksimuma nombro de dosierŝlosoj\n" +" -P maksimuma nombro de pseŭdoterminaloj\n" +" -T maksimuma nombro de fadenoj\n" +"\n" +" Ne ĉiuj opcioj disponeblas sur ĉiuj komputilaj platformoj.\n" +"\n" +" Se LIMO estas indikita, ĝia valoro limigas la koncernan risurcon;\n" +" la specialaj vortoj por LIMO: „soft‟, „hard‟, „unlimited‟\n" +" signifas, respektive: «la kuranta ŝanĝebla limo», «la kuranta\n" +" firma limo», «sen limo». Alie estas eligata la kuranta valoro de\n" +" la koncerna risurco. Manko de opcioj implicas -f.\n" +"\n" +" La valoroj estas en obloj de 1024 bajtoj, krom por la opcio -t,\n" +" kiu estas en sekundoj; por -p, kiu estas en obloj de 512 bajtoj;\n" +" kaj por -u, kiu estas sendimensia nombro de procezoj.\n" +"\n" +" Elirstato:\n" +" Sukceso, kondiĉe ke la opcioj estas taŭgaj kaj ne okazis eraro." + +# umask [-p] [-S] [mode] +# umask [-p] [-S] [REĜIMO] +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Vidigu aŭ agordu dosierreĝiman maskon\n" +"\n" +" La dosierkrea masko de la uzanto havu la valoron de la argumento\n" +" REĜIMO. Se REĜIMO mankas, eligu la kurantan valoron de la masko.\n" +"\n" +" Se la argumento REĜIMO komenciĝas per cifero, ĝi estas\n" +" interpretata kiel okuma nombro; alie, kiel simbola signoĉeno\n" +" laŭ chmod(1).\n" +"\n" +" Opcioj:\n" +" -p\tse REĜIMO malestas, la eligaĵo havu formon taŭgan por enigo\n" +" -S\tla eligo estu simbola; alie ĝi estas okuma nombro\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se REĜIMO estas nevalida aŭ aperas misa opcio." + +# wait [-fn] [id ...] +# wait [-fn] [IND ...] +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Atendu ke laboroj finiĝu, kaj liveru elirstaton.\n" +"\n" +" Atendu finiĝon de ĉiu procezo indikita per IND (kiu povas esti\n" +" proceznumero aŭ laborindiko) kaj liveru ĝian elirstaton. Se IND\n" +" malestas, atendu ĉiujn aktivajn procezidojn, kaj liveru la \n" +" elirstaton 0. Se IND estas laborindiko, atendu ĉiujn procezojn en\n" +" la dukto de la laboro.\n" +"\n" +" Kun la opcio „-n“: atendu finiĝon de la sekva laboro kaj liveru\n" +" ĝian elirstaton.\n" +"\n" +" Kun la opcio „-f“: se la laborregado estas ŝaltita, atendu finiĝon\n" +" de la donita IND (anstataŭ atendi ke ĝi ŝanĝu la staton)\n" +"\n" +" Elirstato:\n" +" Tiu de la lasta IND; malsukceso, se IND estas nevalida aŭ se\n" +" renkontiĝas nevalida opcio.<" + +# wait [pid ...] +# wait [PN ...] +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Atendu ke procezoj finiĝu, kaj liveru elirstaton\n" +"\n" +" Atendu finiĝon de ĉiu indikita procezoj kaj liveru ĝian elirstaton.\n" +" Se PN malestas, atendu ĉiujn aktivajn procezidojn, kaj liveru la\n" +" elirstaton 0. PN devas esti proceznumero.\n" +"\n" +" Elirstato:\n" +" Tiu de la lasta PN; malsukceso, se PN estas nevalida aŭ se\n" +" renkontiĝas nevalida opcio." + +# for NAME [in WORDS ... ] ; do COMMANDS; done +# for NOMO [in VORTOJ ... ] ; do KOMANDOJ; done +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Plenumu komandojn por ĉiu ero de listo\n" +"\n" +" La iteracio „for‟ plenumas la KOMANDOJn por ĉiu ero de sia listo.\n" +" Se la parto «in VORTOJ ...;» malestas, «in \"$@\"» estas uzata\n" +" anstataŭe. Por ĉiu el la VORTOJ, la NOMO estas valorizata per tiu\n" +" ero kaj la KOMANDOJ estas plenumataj.\n" +"\n" +" Elirstato:\n" +" Tiu de la laste plenumita komando." + +# for (( exp1; exp2; exp3 )); do COMMANDS; done +# for (( ESPR1; ESPR2; ESPR3 )); do KOMANDOJ; done +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetika iteracio\n" +"\n" +" Ekvivalentas al\n" +"\t(( ESPR1 ))\n" +"\twhile (( ESPR2 )); do\n" +"\t KOMANDOJ\n" +"\t (( ESPR3 ))\n" +"\tdone\n" +" kie ESPR1, ESPR2 kaj ESPR3 estas aritmetikaj esprimoj. Se iu el\n" +" ili malestas, 1 estas uzata anstataŭe.\n" +"\n" +" Elirstato:\n" +" Tiu de la laste plenumita komando." + +# select NAME [in WORDS ... ;] do COMMANDS; done +# select NONO [in VORTOJ ... ;] do KOMANDOJ; done +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Elektu vortojn el listo kaj plenumu komandojn\n" +"\n" +" Malvolvu VORTOJn, generante liston da vortoj. Tiujn vortojn eligu\n" +" en la ĉeferarujon, ĉiu antaŭate de sia numero. Se „in VORTOJ‟\n" +" malestas, prenu anstataŭe la enhavon de \"$@\". Poste eligu la\n" +" inviton laŭ la variablo PS3 kaj legu linion el la ĉefenigujo. Se\n" +" la linio konsistas el numero responda al iu el la vortoj eligitaj,\n" +" la NOMO ricevu ĝin kiel sian valoron. Se la linio entenas nenion,\n" +" ripetu VORTOJn kaj la inviton. Ĉe la dosierfino la komando\n" +" finiĝas. Ajna alia enigaĵo vakuigas la variablon NOMO. La legita\n" +" linio konserviĝas en la variablo REPLY. Plenumu la KOMANDOJn post\n" +" ĉiu elekto, ĝis renkontiĝos komando de eliro (break).\n" +"\n" +" Elirstato:\n" +" Tiu de la laste plenumita komando." + +# time [-p] PIPELINE +# time [-p] DUKTO +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Raportu tempon konsumitan de dukto\n" +"\n" +" Plenumu la DUKTOn kaj poste eligu tabelon el la reala tempo,\n" +" la ĉefprocesora tempo de la uzanto, kaj la ĉefprocesora tempo\n" +" sistema, konsumitaj por plenumi la DUKTOn, kiam ĝi finĝos.\n" +"\n" +" Opcio:\n" +" -p\tprezentu la tempojn laŭ la portebla Poziksa formo\n" +"\n" +" La variablo TIMEFORMAT difinas la formon de la eligaĵo.\n" +"\n" +" Elirstato:\n" +" Tiu de la DUKTO." + +# case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac +# case VORTO in [ŜABLONO [| ŜABLONO]...) KOMANDOJ ;;]... esac +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Plenumu komandojn laŭ ŝablonkongruo \n" +"\n" +" Plenumu KOMANDOJn kondiĉe ke VORTO kongruas kun ŜABLONO.\n" +" La streko „|‟ servas por disigi ŝablonojn (se pluraj).\n" +"\n" +" Elirstato:\n" +" Tiu de la komando laste plenumita." + +# if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... +# [ else COMMANDS; ] fi +# if KOMANDOJ; then KOMANDOJ;[ elif KOMANDOJ; then KOMANDOJ; ]... +# [ else KOMANDOJ; ] fi +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Plenumu komandojn depende je kondiĉo\n" +"\n" +" Plenumu la komandojn el «if KOMANDOJ». Se la elirstato estas 0,\n" +" tiam plenumu la komandojn el «then KOMANDOJ». Alie, laŭvice,\n" +" plenumu la komandoj el «elif KOMANDOJ», kaj se la elirstato\n" +" estas 0, plenumu la komandojn de ties «then KOMANDOJ», post kio\n" +" la komando „if‟ finiĝas. Alie plenumu la komandojn el\n" +" «else KOMANDOJ» (se tiaj enestas). La elirstato estas tiu de la\n" +" lasta komando plenumita, aŭ 0 se neniu el la kondiĉoj estis vera." + +# while COMMANDS; do COMMANDS; done +# while KOMANDOJ; do KOMANDOJ; done +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Plenumadu komandojn dum testo sukcesas\n" +"\n" +" Ripete malvolvu kaj plenumu la KOMANDOJn dum la lasta el la\n" +" KOMANDOJ de la „while‟-parto liveras elirstaton 0.\n" +"\n" +" Elirstato:\n" +" Tiu de la komando laste plenumita. " + +# until COMMANDS; do COMMANDS; done +# until KOMANDOJ; do KOMANDOJ; done +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Plenumadu komandojn ĝis kiam testo sukcesos\n" +"\n" +" Ripete malvolvu kaj plenumu la komandojn dum la lasta el la\n" +" KOMANDOJ de la „until‟-parto liveras elirstaton alian ol 0.\n" +"\n" +" Elirstato:\n" +" Tiu de la komando laste plenumita." + +# coproc [NAME] command [redirections] +# coproc [NOMO] KOMANDO [ALIDIREKTADOJ] +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Kreu kunprocezon nomotan NOMO\n" +"\n" +" Plenumu KOMANDOn nesinkrone, konektinte per dukto ĝiajn ĉefelgujon\n" +" kaj ĉefengujon al la dosiernumeroj listigitaj en la tabelo NOMO de\n" +" la kuranta ŝelo ĉe la indicoj 0 kaj 1. La defaŭlta NOMO estas\n" +" „COPROC‟.\n" +"\n" +" Elirstato:\n" +" La komando coproc liveras la elirstaton 0." + +# function name { COMMANDS ; } or name () { COMMANDS ; } +# function NOMO { KOMANDOJ ; } aŭ NOMO () { KOMANDOJ ; } +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Difinu ŝelfunkcion\n" +"\n" +" Kreu ŝelfunkcion kun NOMO. Vokite kiel simpla komando, NOMO\n" +" plenumas la KOMANDOJn en la medio de la vokanta ŝelo. Ĉe voko de\n" +" NOMO la komandoliniajn argumentojn la funkcio ricevas en $0...$n,\n" +" kaj la funkcinomo registriĝas en $FUNCNAME.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se NOMO estas nurlega." + +# grouping_braces: { COMMANDS ; } +# { KOMANDOJ ; } +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Arigu komandojn en komandan unuon\n" +"\n" +" Plenumu la komandojn grupe. Tiel eblas apliki alidirektadon al\n" +" tuta grupo da komandoj.\n" +"\n" +" Elirstato:\n" +" Tiu de la komando laste plenumita." + +# job_spec [&] +# LABORINDIKO [&] +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Reaktivigu laboron en la fono\n" +"\n" +" Samkiel la argumento LABORINDIKO en komando „fg‟. Reaktivigu\n" +" haltigitan aŭ fonan laboron. LABORINDIKO povas esti labornomo aŭ\n" +" labornumero. Postmetita „&‟ sendas la laboron en la fonon,\n" +" samkiel se la komando „bg‟ estus aplikita al LABORINDIKO.\n" +"\n" +" Elirstato:\n" +" Tiu de la reakivigita laboro." + +# (( expression )) +# (( ESPRIMO )) +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Komputu aritmetikan esprimon\n" +"\n" +" La esprimo EXPRESSION komputiĝas laŭ la aritmetikaj reguloj.\n" +" Ekvivalentas al «let EXPRESSION».\n" +"\n" +" Elirstato:\n" +" 1, se la rezulto de la ESPRIMO estas 0; 0 aliokaze." + +# [[ expression ]] +# [[ ESPRIMO ]] +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Plenumu kondiĉkomandon\n" +"\n" +" Liveras elirstaton 0 aŭ 1 laŭ la rezulto de komputado de kondiĉa\n" +" ESPRIMO. Esprimoj konsistas el bazaj esprimoj, kiajn uzas la\n" +" primitivaĵo „test‟, kaj komponiĝas per sekvaj operacioj:\n" +"\n" +" ( ESPRIMO ) Liveras la valoron de ESPRIMO\n" +" ! ESPRIMO\t Vera, se ESPRIMO estas malvera; alie malvera\n" +" ESP1 && ESP2 Vera, se veras ambaŭ ESP1 kaj ESP2; alie malvera\n" +" ESP1 || ESP2 Vera, se veras ajna el ESP1 kaj ESP2; alie malvera\n" +"\n" +" En la operacioj „==‟ kaj „!=‟ la signoĉeno dekstre de la operacisigno\n" +" rolas kiel ŝablono, kongrueco al kiu estas testata. Ĉe la\n" +" operacio „=~‟ la ĉeno en la dekstra parto rolas kiel regulesprimo\n" +" por kongruectestado.\n" +"\n" +" En la operacioj && kaj || la duaj subesprimoj ESP2 ne estas\n" +" komputataj se ESP1 jam sufiĉas por determini la rezulton.\n" +"\n" +" Elirstato:\n" +" 0 aŭ 1, laŭ la valoro de ESPRIMO." + +# help var +# variables - Names and meanings of some shell variables +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Nomoj kaj uzoj de komunaj ŝelvariabloj\n" +"\n" +" BASH_VERSION Informo pri la versio de ĉi tiu Baŝo\n" +" CDPATH\tListo da dosierujoj (disigitaj per dupunkto) en\n" +"\t\tkiuj argumenta dosierujo de „cd‟ estu serĉata\n" +" GLOBIGNORE\tListo da ŝablonoj (disigitaj per dupunkto) difinanta\n" +"\t\tdosiernomojn ignorendajn ĉe malvolvo de dosierindikoj\n" +" HISTFILE\tNomo de la dosiero por via komandohistorio\n" +" HISTFILESIZE Maksimuma nombro de linioj konserveblaj en HISTFILE\n" +" HISTSIZE\tMaksimuma nombro de linioj el komandohistorio\n" +"\t\tatingeblaj el plenumata ŝelo\n" +" HOME\tPlena dosierindiko pri via hejma dosierujo\n" +" HOSTNAME\tNomo de la rulanta komputilo\n" +" HOSTTYPE\tTipo de la ĉefprocesoro rulanta ĉi tiun Baŝon\n" +" IGNOREEOF\tDeterminas la konduton de la ŝelo kiam ĝi ricevas\n" +"\t\tdosierfinilon (^D, \\004) kiel nuran enigaĵon. Se ĝi\n" +"\t\tekzistas kaj havas nombran valoron, tiam ĉi tiu\n" +" indikas, kiom da sinsekvaj dosierfinilojn toleri\n" +"\t\tantaŭ ol la ŝelo finiĝu (defaŭlte, 10). Sen tia\n" +"\t\tvaloro, ^D signifas finon de enigo\n" +" MACHTYPE\tSignoĉeno priskribanta la komputsistemon rulantan\n" +"\t\tĉi tiun Baŝon\n" +" MAILCHECK\tKiom ofte (post kiom da sekundoj) Baŝo kontrolu\n" +"\t\tricevon de nova retpoŝta mesaĝo\n" +" MAILPATH\tListo da dosiernomoj (disigitaj per dupunkto) kiujn\n" +"\t\tBaŝo testu pri nova retpoŝtaĵo\n" +" OSTYPE\tVersio de Unikso sur kiu ĉi tiu Baŝo ruliĝas\n" +" PATH\tListo da dosierujoj (disigitaj per dupunkto) kie serĉi\n" +"\t\tkomandojn\n" +" PROMPT_COMMAND Komando plenumenda antaŭ ĉiu unuaranga invito\n" +" PS1\t\tSignoĉeno de la unuaranga invito\n" +" PS2\t\tSignoĉeno de la duaranga invito\n" +" PWD\t\tPlena dosierindiko de la kuranta dosierujo\n" +" SHELLOPTS\tListo da aktivaj ŝelaj opcioj (disigitaj per dupunktoj)\n" +" TERM\tTipo de la uzata terminalo\n" +" TIMEFORMAT\tFormato por eligi tempostatistikon per la komando „time‟\n" +" auto_resume\tSe ne vakua, indikas ke komandan vorton sole aperanta\n" +"\t\ten linio la ŝelo unue serĉu en la listo de haltetintaj\n" +"\t\tlaboroj. Se trovita tie, la laboro iĝu dialoga.\n" +"\t\tLa valoro „exact‟ postulas ekzaktan kongruon de la\n" +"\t\tkomanda vorto kun la komando el la laborlisto. La valoro\n" +"\t\t„substring‟ indikas ke la komanda vorto kongruu kun\n" +"\t\tsubĉeno de la laboro. Ĉia alia valoro indikas ke la\n" +"\t\tkomando estu komenca parto de la labornomo\n" +" histchars\tSignoj regantaj reuzon de komandohistorio kaj rapidan\n" +"\t\tanstataŭigon. Unue estas la reuziga signo, kutime „!‟.\n" +"\t\tDue estas la signo de „rapida anstataŭigo‟, kutime „^‟.\n" +"\t\tTrie estas la signo de „historia komentilo‟,\n" +"\t\tkutime „#‟\n" +" HISTIGNORE\tListo da ŝablonoj (disigitaj per dupunkto) difinanta\n" +"\t\tkiujn komandojn konservi en la historilisto\n" + +# pushd [-n] [+N | -N | dir] +# pushd [-n] [+N | -N | DOSIERUJO] +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Surstakigu dosierujojn\n" +"\n" +" Surstakigu dosierujon sur la stakon da dosierujoj, aŭ cikle ŝovu\n" +" la stakon tiel, ke la nova stakpinto estu la kuranta dosierujo.\n" +" Senargumente, permutu la du plej suprajn dosierujojn de la stako.\n" +"\n" +" Opcio:\n" +" -n\tNe ŝanĝu la kurantan dosierujon (ne plenumu cd) surstakigante\n" +" dosierujon sur la stakon; do, nur la stakon ŝanĝu\n" +"\n" +" Argumentoj:\n" +" +N\tCikle ŝovu la stakon tiel ke la Nª dosierujo (nombrante de\n" +" \tmaldekstre en la listo eligebla per „dirs‟, numerante de 0)\n" +" iĝu la pinta\n" +"\n" +" -N\tCikle ŝovu la stakon tiel ke la Nª dosierujo (nombrante de\n" +" \tdekstre en la listo eligebla per „dirs‟, numerante de 0) iĝu\n" +" la pinta\n" +"\n" +" DOSIERUJO\n" +"\tsurstakigu la DOSIERUJOn kaj faru ĝin la nova kuranta\n" +" \tdosierujo labora\n" +"\n" +" Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas misa argumento aŭ se cd malsukcesas." + +# popd [-n] [+N | -N] +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Elstakigu dosierujojn\n" +"\n" +" Elstakigu erojn el la stako da dosierujoj. Senargumente, forigu\n" +" la pintan dosierujon kaj iru (cd) en la novan pintan dosierujon.\n" +"\n" +" Opcio:\n" +" -n\tNe ŝanĝu (cd) la kurantan dosierujon demetante dosierujon el\n" +" la stako; do, nur la stakon ŝanĝu\n" +"\n" +" Argumentoj:\n" +" +N\tForigu la N-an eron de maldekstre de la listo eligebla per\n" +"\t„dirs‟, numerante ekde 0. Ekz-e: «popd +0» forigas la plej\n" +"\tmaldekstran dosierujon; «popd +1», ĝian najbaron\n" +"\n" +" -N\tForigu la N-an eron de dekstre de la listo eligebla per\n" +" „dirs‟, numerante ekde 0. Ekz-e: «popd -0» forigas la lastan\n" +"\tdosierujon; «popd -1», la antaŭlastan\n" +"\n" +" Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟.\n" +" Elirstato:\n" +" Sukceso, krom se aperas misa argumento aŭ se cd malsukcesas." + +# dirs [-clpv] [+N] [-N] +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Listigu dosierujstakon\n" +"\n" +" Listigu la kurantan dosierujstakon. La dosierujoj trafas en la\n" +" stakon per la komando „pushd‟ kaj estas forigeblaj per la komando\n" +" „popd‟.\n" +"\n" +" Opcioj:\n" +" -c viŝu la dosierujstakon forigante el ĝi ĉiujn erojn\n" +" -l ne uzu mallongan formon de dosierujnomoj relative al via hejma\n" +" dosierujo\n" +" -p listigu dosierujstakon lokante po unu eron sur linio\n" +" -v listigu po unu eron de la dosierujstako en linio, metante\n" +" antaŭ la dosierujnomo ĝian numeron en la stako \n" +"\n" +" Argumentoj:\n" +" +N\teligu la N-an eron (numerante de maldekstre kaj ekde 0) de la\n" +" listo eligebla per senopcia „dirs‟\n" +"\n" +" -N\teligu la N-an eron (numerante de dekstre kaj ekde 0) en la\n" +" listo eligebla per senopcia „dirs‟\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas misa opcio aŭ okazas eraro." + +# shopt [-pqsu] [-o] [optname ...] +# shopt [-pqsu] [-o] [OPCINOMO ...] +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Ŝaltu kaj malŝaltu ŝelajn opciojn\n" +"\n" +" Ŝanĝu la staton de ĉiu el la OPCINOMOj. Sen opciaj argumentoj,\n" +" listigu ĉiujn doniajn OPCINOMOjn -- aŭ ĉiujn ŝelajn opciojn se\n" +" neniu OPCINOMO estas donita, -- indikante pri ĉiu el ili, ĉu ĝi\n" +" estas ŝaltita.\n" +"\n" +" Opcioj:\n" +" -o limigu OPCINOMOJn je tiuj difinitaj por uzo per «set -o»\n" +" -p eligu ĉiun ŝelan opcion indikante ĉu ĝi estas ŝaltita\n" +" -q silentigu eligon\n" +" -s ŝaltu (aktivigu) ĉiun el la OPCINOMOj\n" +" -u malŝaltu (malaktivigu) ĉiun el la OPCINOMOj\n" +"\n" +" Elirstato:\n" +" Sukceso, se OPCINOMO estas ŝaltita; malsukceso, se aperas misa\n" +" opcio, aŭ se OPCINOMO estas malŝaltita." + +# printf [-v var] format [arguments] +# printf [-v VAR] FORMATO [ARGUMENTOJ] +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Aranĝu kaj eligu ARGUMENTOJn laŭ FORMATO.\n" +"\n" +" Opcio:\n" +" -v VAR eligu en ŝelvariablon VAR anstataŭ en la ĉefeligujon\n" +"\n" +" FORMATO estas signoĉeno entenanta 3 tipojn da objektoj:\n" +" ordinaraj signoj, simple kopiataj en la ĉefeligujon;\n" +" eskapsekvencoj por signo, konvertataj kaj kopiataj en la ĉefeligujon; \n" +" kaj formataj specifoj, ĉiu el kiuj kaŭzas eligon de vica argumento.\n" +"\n" +" Aldone al la normaj specifiloj laŭ „printf(1)‟, printf komprenas:\n" +"\n" +" „%b‟ igas malvolvi deklivajn (\\) eskapsekvencojn en sia argumento;\n" +" „%q‟ encitiligu la argumenton en formon taŭgan por ŝela re-enigo;\n" +" „%(fmt)T‟ servas por eligi data-tempan signoĉenon kiel farus\n" +" „strftime(3)‟ laŭ la formatoĉeno fmt.\n" +"\n" +" La formato estas iteracie reuzata kiom necesas por konsumi ĉiujn\n" +" argumentojn. Se estas malpli da argumentoj ol la formato\n" +" bezonas, la kromaj specifoj estas interpretataj tiel, kvazaŭ la\n" +" mankantaj argumentoj estus nuloj aŭ vakuaj signoĉenoj (laŭokaze).\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas misa opcio aŭ okazas eraro pri skribo aŭ\n" +" valorizo." + +# complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPCIO] [-A AGO] [-G ŜABLONO] +# [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTRILO] +# [-P PREFIKSO] [-S SUFIKSO] [NOMO ...] +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Difinu, kiel Readline kompletigu argumentojn.\n" +"\n" +" Por ĉiu NOMO difinu, kiel la argumentoj estu kompletigotaj. Se\n" +" nenia opcio estas donita, eligu la aktualajn \n" +" kompletigoregulojn en formo reuzebla por enigo en la ŝelon.\n" +"\n" +" Opcioj:\n" +" -p\teligu kompletigoregulojn en formo uzebla por enigo en la ŝelon\n" +" -r\tforigu la kompletigoregulon por ĉiu NOMO, aŭ, se nenia NOMO\n" +"\testas donita, ĉiujn kompletigoregulojn\n" +" -D apliku la indikitajn kompletigojn kaj agojn Defaŭlte por la\n" +" komandoj sen specifa kompletigo-difino\n" +" -E apliku la indikitajn kompletigojn kaj agojn al vakuaj (Empty)\n" +" komandoj (la kompletigoj provotaj en vakua komandolinio)\n" +" -I apliku la kompletigojn kaj agojn al la unua (kutime, la\n" +" komanda) vorto\n" +"\n" +" Ĉe provo kompletigi la agoj aplikiĝas laŭ la ordo de majusklaj\n" +" opcioj en la ĉi-supra listo. Se pluraj opcioj estas donitaj, la\n" +" opcio „-D“ antaŭas la opcion „-E“, kaj ili ambaŭ antaŭas la\n" +" opcion „-I“.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se misa opcio estas donita, aŭ eraro okazis." + +# compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] +# [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] +# [-F function] [-C command] [word] +# compgen [-abcdefgjksuv] [-o OPCIO] [-A AGO] [-G ŜABLONO] +# [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTRILO] +# [-P PREFIKSO] [-S SUFIKSO] [VORTO] +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Montru la eblajn kompletigojn depende je la opcioj\n" +"\n" +" Destinita por uzo en ŝelfunkcio generanta eblajn kompletigojn. Se\n" +" la eventuala argumento VORTO estas donita, generu ĝiajn kongruaĵojn.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas misa opcio aŭ okazas eraro." + +# compopt [-o|+o OPCIO] [-DE] [NOMO ...] +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Ŝanĝu aŭ vidigu opciojn pri kompletigo\n" +"\n" +" Ŝanĝu la kompletigajn opciojn por ĉiu NOMO, aŭ - se nenia NOMO\n" +" estas indikita - la nune plenumatan kompletigon. Se nenia OPCIO\n" +" estas donita, eligu la kompletigajn opciojn por ĉiu NOMO aŭ la\n" +" kurantan kompletigan regularon.\n" +"\n" +" Opcioj:\n" +" -o OPCIO Ŝaltu kompletigan OPCIOn por ĉiu NOMO\n" +" -D Ŝanĝu opciojn por la Defaŭlta komandokompletigo\n" +" -E Ŝanĝu opciojn por la vakua (Empty) komandokompletigo\n" +" -I Ŝanĝu la kompletigajn opciojn por la unua vorto.\n" +"\n" +" Uzante «+o» anstataŭ «-o» oni malŝaltas la indikitan OPCIOn.\n" +"\n" +" Argumentoj:\n" +" Ĉiu NOMO indikas komandon, por kiu kompletiga regulo devas esti\n" +" jam difinita per la primitivaĵo „complete‟. Se nenia NOMO estas\n" +" donita, tiam la komandon compopt devas voki funkcio generanta, kaj\n" +" ĝuste la opcioj por ĉi tiu nune plenumata generilo de kompletigoj\n" +" estu ŝanĝitaj.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas misa opcio, aŭ por NOMO mankas difino de\n" +" kompletiga regulo." + +# mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] +# [-c quantum] [array] +# mapfile [-n NOMBRILO] [-O ORIGINO] [-s NOMBRILO] [-t] [-u DN] [-C RETROVOKO] +# [-c KVANTO] [TABELO] +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Legu liniojn el la ĉefenigujo en tabelvariablon\n" +"\n" +" Legu liniojn el la ĉefenigujo en la entjerindican variablon\n" +" TABELO, aŭ el la dosiernumero DN, se ĉeestas la opcio „-u‟.\n" +" Defaŭlte TABELO estas la variablo MAPFILE.\n" +"\n" +" Opcioj:\n" +" -d DISIG Por fini liniojn uzu ne la linifinilon, sed DISIG\n" +" -n KIOM Kopiu maksimume KIOMon da linioj. Se KIOM\n" +" estas 0, kopiu ĉiujn liniojn\n" +" -O ORIGINO Komencu valorizi la TABELOn ekde la indekso ORIGINO.\n" +" La defaŭlta origino estas 0.\n" +" -s KIOM Ignoru KIOMon da unuaj linioj\n" +" -t Forigu la vostan DISIG el ĉiu legita linio (defaŭlte\n" +" la linifinilon)\n" +" -u DN Legu per la dosiernunero DN anstataŭ el la ĉefenigujo\n" +" -C RETROVOKO Plenumu RETROVOKOn post ĉiu KVANTO da legitaj linioj\n" +" -c KVANTO\tPo kiom da linioj legi inter sinsekvaj RETROVOKOj\n" +"\n" +" Argumento:\n" +" TABELO\tNomo de tabelvariablo uzota por la legotaj datumoj\n" +"\n" +" Se „-C‟ aperas sen „-c‟, la defaŭlta kvanto estas 5000. Ĉe\n" +" komputo de RETROVOKO ĉi tiu ricevas la indicon de la sekva\n" +" valorizota tabelano kaj la en ĝin skribotan linion kiel kromajn\n" +" argumentojn.\n" +"\n" +" Se mankas malimplica ORIGINO, mapfile viŝos la TABELOn antaŭ\n" +" valorizi ĝin.\n" +"\n" +" Elirstato:\n" +" Sukceso, krom se aperas misa opcio aŭ TABELO estas nurlega aŭ\n" +" ĝi ne estas entjerindica tabelo." + +# readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] +# [-c quantum] [array] +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Legu liniojn el dosiero en tabelvariablon.\n" +"\n" +" Sinonimo de „mapfile‟." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Liveras la kuntekston de la kuranta procedurvoko.\n" +#~ "\n" +#~ " Sen ESPR liveras " + +# ifdef DEBUG ... internal_warning(): +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: process %5ld (%s) in the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Nekonata signalnumero" diff --git a/bash-5.1/po/es.gmo b/bash-5.1/po/es.gmo new file mode 100644 index 0000000000000000000000000000000000000000..455535b3536977fd35731421108d3f91e5c6fd4f Binary files /dev/null and b/bash-5.1/po/es.gmo differ diff --git a/bash-5.1/po/es.po b/bash-5.1/po/es.po new file mode 100644 index 0000000000000000000000000000000000000000..55c5cabb319183f740b55e81d5e209d08b024931 --- /dev/null +++ b/bash-5.1/po/es.po @@ -0,0 +1,6046 @@ +# Mensajes en español para GNU bash +# Copyright (C) 2018, 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Cristian Othón Martínez Vera , 2000 - 2011. +# Francisco Javier Serrador +# Antonio Ceballos Roa , 2018, 2019 +# +msgid "" +msgstr "" +"Project-Id-Version: GNU bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-08-18 10:08+0200\n" +"Last-Translator: Antonio Ceballos Roa \n" +"Language-Team: Spanish \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "subíndice de matriz incorrecto" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: se elimina el atributo nameref" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: no se puede convertir la matriz indexada en asociativa" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: clave de matriz asociativa no válida" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: no se puede asignar a un índice que no es numérico" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: se debe usar un subíndice al asignar a una matriz asociativa" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: no se puede crear: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: no se puede encontrar la combinación de teclas " +"para la orden" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: el primer carácter que no es espacio en blanco no es «\"»" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "no hay un `%c' que cierre en %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: falta un «:» separador" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': no se puede borrar la asignación" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansión de llaves: no se puede asignar memoria a %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansión de llaves: fallo al asignar memoria a %u elementos" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansión de llaves: fallo al asignar memoria a «%s»" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': nombre de alias inválido" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "no se activó la edición de línea" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': nombre de combinación de teclas inválido" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: no se puede leer: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': nombre de función desconocido" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s no está asignado a ninguna tecla.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s se puede invocar vía " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': no se puede borrar la asignación" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "cuenta de bucle" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "solo tiene significado en un bucle `for', `while', o `until'" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Devuelve el contexto de la llamada a subrutina actual.\n" +" \n" +" Sin EXPR, devuelve \"$linea $nombrefichero\". Con EXPR, devuelve\n" +" \"$linea $subrutina $nombrefichero\"; esta información adicional\n" +" se puede usar para proporcionar un volcado de pila.\n" +" \n" +" El valor de EXPR indica cuántos marcos de llamada hay que retroceder\n" +" antes del actual; el marco superior es el marco 0.\n" +" \n" +" Estado de Salida:\n" +" Devuelve 0 a menos que el shell no esté ejecutando una función de shell\n" +" o EXPR sea inválida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME no está definido" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "demasiados argumentos" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "directorio nulo" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD no está establecido" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "línea %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "aviso: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: modo de empleo: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: la opción requiere un argumento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: se requiere un argumento numérico" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: no encontrado" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: opción inválida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nombre de opción inválido" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': no es un identificador válido" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "número octal inválido" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "número hexadecimal inválido" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "número inválido" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: la especificación de señal no es válida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': no es un pid o una especificación válida de trabajo" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variable de sólo lectura" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fuera de rango" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumento" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s fuera de rango" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: no existe ese trabajo" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: no hay control de trabajos" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "no hay control de trabajos" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: restringido" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "restringido" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: no es una orden interna de shell" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "error de escritura: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "error al establecer los atributos de la terminal: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "error al obtener los atributos de la terminal: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: error al obtener el directorio actual: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: especificación de trabajo ambigua" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "ayuda no disponible en esta versión" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: no se puede borrar: %s es de solo lectura" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: no se puede borrar" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nombre de acción inválido" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: no hay especificación para completado" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "aviso: es posible que la opción -F no funcione como se espera" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "aviso: es posible que la opción -C no funcione como se espera" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "no se está ejecutando la función de completado" + +# sólo se puede usar. sv +# De acuerdo. cfuga +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "sólo se puede usar dentro de una función" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: referencia variable no puede ser una matriz" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: no se permiten las autoreferencias a variables nameref" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: referencia de nombre circular" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': nombre variable inválido para referencia de nombre" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "no se puede usar `-f' para hacer funciones" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: función de sólo lectura" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: asignación obsoleta de matriz compuesta entrecomillada" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: no se pueden destruir variables de matriz de esta forma" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: no se puede convertir una matriz asociativa a indexada" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "la carga dinámica no está disponible" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "no se puede abrir el objeto compartido %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "no se puede encontrar %s en el objeto compartido %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: no cargado dinámicamente" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" +"función de carga para %s devuelve fallo (%d): no se ha efectuado la carga" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: no cargado dinámicamente" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: no se puede borrar: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: es un directorio" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: no es un fichero regular" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: el fichero es demasiado grande" + +# file=fichero. archive=archivo. Si no, es imposible traducir tar. sv +# De acuerdo. Corregido en todo el fichero. cfuga +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: no se puede ejecutar el fichero binario" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: no se puede ejecutar: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "cerrar sesión\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "no es un shell de inicio de sesión: utilice `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Hay trabajos detenidos.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Hay trabajos en ejecución.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "no se ha encontrado ninguna orden" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "especificación de historia" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: no se puede abrir el fichero temporal: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "actual" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "trabajo %d iniciado sin control de trabajo" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opción ilegal -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: la opción requiere un argumento -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "asociación desactivada" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: tabla de asociación vacía\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "coinc\torden\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Órdenes de shell que coinciden con la palabra clave`" +msgstr[1] "Órdenes de shell que coinciden con las palabras claves`" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"no hay temas de ayuda que coincidan con `%s'. Pruebe `help help' o `man -k " +"%s' o `info %s'." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: no se puede abrir: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Estas órdenes de shell están definidas internamente. Teclee `help' para\n" +"ver esta lista.\n" +"Teclee `help nombre' para saber más sobre la función `nombre'.\n" +"Utilice `info bash' para saber más sobre la shell en general.\n" +"Utilice `man -k' o `info' para saber más sobre las órdenes que no están en\n" +"esta lista.\n" +"\n" +"Un asterisco (*) junto a un nombre significa que la orden está desactivada.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "no se puede usar más de uno de -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "posición en la historia" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: marca de tiempo inválida" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: falló la expansión de la historia" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: falló inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "no se permiten otras opciones con `-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: los argumentos deben ser IDs de procesos o trabajos" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Error desconocido" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "se esperaba una expresión" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: no es una matriz indexada" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: especificación de descriptor de fichero inválida" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: descriptor de fichero inválido: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: cuenta de líneas inválida" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: origen de matriz inválido" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: quantum de llamada inválido" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "nombre de variable matriz vacío" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "se requiere el soporte de variable de matriz" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': falta el carácter de formato" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': especificación de formato de tiempo inválida" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': carácter de formato inválido" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "aviso: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "problema con el análisis del formato: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "falta el dígito hexadecimal para \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "falta el dígito unicode para \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "no hay otro directorio" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: argumento inválido" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "la pila de directorios está vacía" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "índice de pilas de directorios" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Muestra la lista de directorios actualmente grabados. Los directorios\n" +" encuentran en la lista con la orden `pushd'; pueden ir saliendo de\n" +" la lista con la orden `popd'.\n" +" \n" +" Opciones:\n" +" -c\tlimpia la pila de directorios eliminando todos los elementos\n" +" -l\tno muestra las versiones con prefijo de tilde de los directorios\n" +" \t\trelativos a su directorio inicial\n" +" -p\tmuestra la pila de directorios con una entrada por línea\n" +" -v\tmuestra la pila de directorios con una entrada por línea con\n" +" \tsu posición en la pila como prefijo\n" +" \n" +" Argumentos:\n" +" +N\tMuestra la N-ésima entrada contando desde la izquierda de la " +"lista\n" +" \tmostrada por dirs cuando se llama sin opciones, empezando en cero.\n" +" \n" +" -N\tMuestra la N-ésima entrada contando desde la derecha de la lista\n" +" \tmostrada por dirs cuando se llama sin opciones, empezando en cero." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Agrega un directorio a la parte superior de la pila de directorios\n" +" o rota la pila, haciendo que la nueva parte superior de la pila\n" +" sea el directorio de trabajo actual. Sin argumentos, intercambia\n" +" los dos directorios de la parte superior.\n" +" \n" +" Opciones:\n" +" -n\tSuprime el cambio normal de directorio al añadir directorios\n" +" \ta la pila, de forma que solo se manipula la pila.\n" +" \n" +" Argumentos:\n" +" +N\tRota la pila para que el N-ésimo directorio (contando\n" +" \tdesde la izquierda de la lista mostrada por `dirs',\n" +" \tcomenzando desde cero) esté en la parte superior.\n" +" -N\tRota la pila para que el N-ésimo directorio (contando\n" +" \tdesde la derecha de la lista mostrada por `dirs',\n" +" \tcomenzando desde cero) esté en la parte superior.\n" +" \n" +" dir\tAñade DIR a la pila de directorios en la parte superior,\n" +" \thaciéndolo el nuevo directorio de trabajo actual.\n" +" \n" +" La orden interna `dirs' muestra la pila de directorios." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Quita entradas de la pila de directorios. Sin argumentos, borra\n" +" el directorio superior de la pila, y cambia al nuevo directorio " +"superior.\n" +" \n" +" Opciones:\n" +" -n\tSuprime el cambio normal de directorio cuando se borran\n" +" \tdirectorios de la pila, de modo que solo se manipula la pila.\n" +" \n" +" Argumentos:\n" +" +N\tBorra la N-ésima entrada contando desde la izquierda de\n" +" \tla lista mostrada por `dirs', comenzando desde cero.\n" +" \tPor ejemplo: `popd +0' borra el primer directorio, `popd +1'\n" +" \tel segundo.\n" +" \n" +" -N\tBorra la N-ésima entrada contando desde la derecha de\n" +" \tla lista mostrada por `dirs', comenzando desde cero. Por\n" +" \tejemplo: `popd -0' borra el último directorio, `popd -1' el\n" +" \tpenúltimo.\n" +" \n" +" La orden interna `dirs' muestra la pila de directorios." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: especificación del tiempo de expiración inválida" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "error de lectura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"sólo se puede usar `return' desde una función o un script leído con `source'" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "no se puede borrar al mismo tiempo una función y una variable" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: no es una variable de matriz" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: no es una función" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: no se puede exportar" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "contador de desplazamiento" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "no se pueden activar y desactivar opciones del shell simultáneamente" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nombre de opción de shell inválido" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "argumento de nombre de fichero requerido" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: no se encontró el fichero" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "no se puede suspender" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "no se puede suspender un shell de entrada" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s es un alias de `%s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s es una palabra clave del shell\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s: es una función\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s es una función interna de shell especial\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s es una orden interna del shell\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s is %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s está asociado (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: límite de argumento inválido" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': orden incorrecta" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: no se puede obtener el límite: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "límite" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: no se puede modificar el límite: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "número octal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': operador de modo simbólico inválido" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': carácter de modo simbólico inválido" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " línea " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "última orden: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Abortando..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORME: " + +#: error.c:462 +msgid "unknown command error" +msgstr "error de orden desconocida" + +#: error.c:463 +msgid "bad command type" +msgstr "tipo de orden incorrecto" + +#: error.c:464 +msgid "bad connector" +msgstr "conector erróneo" + +#: error.c:465 +msgid "bad jump" +msgstr "salto erróneo" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variable sin asignar" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aha expirado mientras esperaba alguna entrada: auto-logout\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "no se puede redirigir la entrada estándar desde /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': carácter de formato inválido" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] aún existe" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "error de tubería" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: nivel máximo de anidamiento de evaluaciones excedido (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: nivel máximo de anidamiento de lecturas con `source' excedido (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: nivel máximo de anidamiento de funciones excedido (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restringido: no se puede especificar `/' en nombres de órdenes" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: orden no encontrada" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: intérprete erróneo" + +# file=fichero. archive=archivo. Si no, es imposible traducir tar. sv +# De acuerdo. Corregido en todo el fichero. cfuga +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: no se puede ejecutar fichero binario: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': es una orden interna especial" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "no se puede duplicar el df %d al df %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "se ha excedido el nivel de recursión de la expresión" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "desbordamiento de la pila de recursión" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "error sintáctico en la expresión" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "se intentó asignar a algo que no es una variable" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "error sintáctico en asignación de variable" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "división por 0" + +# token en bison fue traducido como terminal. ¿Lo traducimos igual aquí +# o lo dejamos como 'unidad' o 'elemento'? cfuga +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "defecto: elemento de asignación de expresión erróneo" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "se esperaba `:' para la expresión condicional" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exponente menor que 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" +"se esperaba un identificador después del pre-incremento o pre-decremento" + +# falta , singular em+ +# mmmh, puede faltar más de un paréntesis cfuga +# tiene razón Enrique, es singular. cfuga +#: expr.c:1056 +msgid "missing `)'" +msgstr "falta un `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "error sintáctico: se esperaba un operando" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "error sintáctico: operador aritmético inválido" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (el elemento de error es \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "base aritmética inválida" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: cuenta de líneas inválida" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "valor demasiado grande para la base" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: error de expresión\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: no se puede acceder a los directorios padre" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "no se puede reestablecer el modo nodelay para el df %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"no se puede asignar un nuevo descriptor de fichero para la entrada de bash " +"desde el df %d" + +# buffer: espacio intermedio , alojamiento intermedio ( me gusta menos ) +# em+ +# almacenamiento intermedio. cfuga +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" +"save_bash_input: el almacenamiento intermedio ya existe para el nuevo df %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: tubería de pgrp" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "el pid `forked' %d aparece en el trabajo en ejecución %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "borrando el trabajo detenido %d con grupo de proceso %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) se marca como vivo aún" + +# Cambiaría 'hay' por 'existe' em+ +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: no existe tal pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Señal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Hecho" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Detenido" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Detenido(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Ejecutando" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Hecho(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Salida %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Estado desconocido" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(`core' generado) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (da: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid hijo (%ld a %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld no es un proceso hijo de este shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: No hay un registro del proceso %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: el trabajo %d está detenido" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: no existe ese trabajo" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: el trabajo ha terminado" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: el trabajo %d ya está en segundo plano" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: se activa WNOHANG para evitar el bloque indefinido" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: línea %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (`core' generado)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(dir ahora: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: falló getpgrp" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: no hay control de trabajos en segundo plano" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplina de línea" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "no se puede establecer el grupo de proceso de terminal (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "no hay control de trabajos en este shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: falló la aserción: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: aserción arruinada\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "desconocido" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: bloque en la lista libre sobreescrito" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: se llamó con un argumento de bloque previamente liberado" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: se llamó con un argumento de bloque sin asignar" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" +"free: se detectó un desbordamiento por debajo; mh_nbytes fuera de rango" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "" +"free: se detectó un desbordamiento por debajo; mh_nbytes fuera de rango" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "" +"free: los tamaños de los fragmentos del inicio y del final son diferentes" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: se llamó con un argumento de bloque sin asignar" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" +"realloc: se detectó un desbordamiento por debajo; mh_nbytes fuera de rango" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" +"realloc: se detectó un desbordamiento por debajo; mh_nbytes fuera de rango" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: los tamaños de los pedazos de inicio y fin son diferentes" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: ¿la tabla alloc está llena con FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: ¿%p ya está en la tabla como asignado?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: ¿%p ya está en la tabla como libre?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base inválida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: anfitrión desconocido" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: servicio inválido" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: especificación de ruta de red errónea" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "no hay soporte para operaciones de red" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: no se puede cambiar el local (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: no se puede cambiar el local (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: no se puede cambiar el local (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: no se puede cambiar el local (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Tiene correo en $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Tiene correo nuevo en $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "El correo en %s fue leído\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "error sintáctico: se requiere una expresión aritmética" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "error sintáctico: `;' inesperado" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "error sintáctico: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipo de instrucción %d erróneo" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"el documento-aquí en la línea %d está delimitado por fin-de-fichero (se " +"esperaba `%s')" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection: la instrucción de redirección `%d' está fuera de rango" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) excede TAMAÑO_MAX (%lu): línea " +"truncada" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "número máximo de documentos en «here--document» excedido" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF inesperado mientras se buscaba un `%c' coincidente" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF inesperado mientras se buscaba `]]'" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "error sintáctico en la expresión condicional: elemento inesperado `%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "error sintáctico en la expresión condicional" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "elemento inesperado `%s', se esperaba `)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "se esperaba `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argumento inesperado `%s' para el operador unario condicional" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "argumento inesperado para el operador unario condicional" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "elemento inesperado `%s', se esperaba un operador binario condicional" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "se esperaba un operador binario condicional" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argumento inesperado `%s' para el operador binario condicional" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "argumento inesperado para el operador binario condicional" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "elemento inesperado `%c' en la orden condicional" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "elemento inesperado `%s' en la orden condicional" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "elemento inesperado %d en la orden condicional" + +# Token: elemento ? +# error sintáctico, no se esperaba el símbolo `%c' em+ +# No puedo tomar tal cual la corrección. El error puede no ser +# provocado por el símbolo. Simplemente estar cerca del mismo. cfuga +# Por consistencia con el siguiente, yo borraría la coma. sv +# Cierto. Coma borrada. cfuga +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "error sintáctico cerca del elemento inesperado `%s'" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "error sintáctico cerca de `%s'" + +# Propongo cambio de orden: +# no se esperaba el final de la línea em+ +# Ojo, que end of file es fin de fichero, no de línea. sv +# Se hicieron ambos cambios. cfuga +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "error sintáctico: no se esperaba el final del fichero" + +#: parse.y:6365 +msgid "syntax error" +msgstr "error sintáctico" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Utilice \"%s\" para dejar el shell.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF inesperado mientras se buscaba un `)' coincidente" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: función `%s' no encontrada" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: posible bucle de reintento" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: COMPSPEC nulo" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: conector erróneo `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: descriptor de fichero inválido" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: puntero NULL a fichero" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != numfich xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': carácter de formato inválido" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "descriptor de fichero fuera de rango" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redireccionamiento ambiguo" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: no se puede sobreescribir un fichero existente" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restringido: no se puede redirigir la salida" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "no se puede crear un fichero temporal para el documento-aquí: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: no se puede asignar el fd a la variable" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "no se admite /dev/(tcp|udp)/anfitrion/puerto sin red" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "error de redirección: no se puede duplicar el df" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "¡no se puede encontrar /tmp, crear por favor!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp debe ser un nombre de directorio válido" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "modo de impresión bonita desactivado en shells interactivos" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opción inválida" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "no se puede establecer el uid %d: uid efectivo %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "no se puede establecer gid a %d: gid efectivo %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "no puede ejecutar el depurador; modo depurado desactivado" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: es un directorio" + +# Yo pondría "no tengo ningún nombre". sv +# Revisé el código fuente de bash. Es un mensaje de error cuando no se +# encuentra el nombre del usuario que ejecuta el shell. cfuga +#: shell.c:1881 +msgid "I have no name!" +msgstr "¡No tengo nombre de usuario!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versión %s-(%s)\n" + +# En la lista spanglish se discutió mucho sobre script, +# no sé en que quedó, ni puedo decirte ahora cómo lo hemos +# traducido en otras ocasiones. Sehll script lo henmos traducido +# como guión del shell , eso es seguro ... así que puede estar +# bien así , ya lo verán otros em+ +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Modo de empleo:\t%s [opción GNU larga] [opción] ...\n" +"\t%s [opción GNU larga] [opción] fichero de shell ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Opciones GNU largas:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opciones del shell:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD o -c orden o -O opción_shopt\t\t(sólo invocación)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s o -o opción\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Teclee `%s -c \"help set\"' para más información sobre las opciones del " +"shell.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Teclee `%s -c help' para más información sobre las órdenes internas del " +"shell.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Utilice la orden `bashbug' para reportar defectos.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "página inicial bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ayuda general utilizando software GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operación inválida" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Señal ambigua" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Colgar" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interrumpir" + +#: siglist.c:58 +msgid "Quit" +msgstr "Salir" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Instrucción ilegal" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT rastreo/captura" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "instrucción ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "instrucción EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Excepción de coma flotante" + +#: siglist.c:86 +msgid "Killed" +msgstr "Matado" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Error del bus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Violación de segmento" + +# llamada del sistema em+ +# Es una llamada a una función del sistema em+ +# De acuerdo, pero lo que está mal es la forma de invocar la +# llamada a la función del sistema, no la llamada en sí cfuga +#: siglist.c:98 +msgid "Bad system call" +msgstr "Llamada al sistema errónea" + +# (pipe) no, por favor. Esto ya está traducido en libc, así que a estas +# alturas, la gente ya debería saber qué es eso de la tubería. sv +# De acuerdo. cfuga +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Tubería rota" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Temporizador" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminado" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Condición de E/S urgente" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Detenido (señal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continúa" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "El proceso hijo ha muerto o está parado" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Detenido (entrada por terminal)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Detenido (salida por terminal)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "E/S listas" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Límite de CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Límite de ficheros" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarma (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarma (entorno)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Ventana cambiada" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Bloqueo de registro" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Señal de usuario 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Señal de usuario 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "entrada de datos HFT pendiente" + +# falla: fallo em+ +# Suscribo lo anterior. falla suena muy raro. +# Yo lo pondría además al revés: fallo de energía inminente. sv +# Me gusta como lo sugieres. Cambio hecho. cfuga +#: siglist.c:186 +msgid "power failure imminent" +msgstr "fallo de energía inminente" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "caída del sistema inminente" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migrando el proceso a otra CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "error de programación" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "el modo monitor HFT ha sido concedido" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "el modo monitor HTF ha sido retirado" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "la secuencia de sonido HFT ha sido completada" + +#: siglist.c:214 +msgid "Information request" +msgstr "Solicitud de información" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Señal Desconocida #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "sustitución errónea: no hay un `%s' que cierre en %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: no se puede asignar una lista a un miembro de la matriz" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "no se puede crear la tubería para la sustitución del proceso" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "no se puede crear un proceso hijo para la sustitución del proceso" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "no se puede abrir la tubería llamada %s para lectura" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "no se puede abrir la tubería llamada %s para escritura" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "no se puede duplicar la tubería llamada %s como df %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "sustitución de orden: se ignora byte nulo en la entrada" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "no se puede crear la tubería para la sustitución de la orden" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "no se puede crear un proceso hijo para la sustitución de la orden" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: no se puede duplicar la tubería como df 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nombre de variable inválido para referencia de nombre" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: expansión indirecta inválida" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nombre de variable inválido" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parámetro no establecido" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parámetro nulo o no establecido" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expresión de subcadena < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: sustitución errónea" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: no se puede asignar de esta forma" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"versiones futuras del intérprete obligarán la evaluación como una " +"sustitución aritmética" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "sustitución errónea: no hay una \"`\" que cierre en %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "no hay coincidencia: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "se esperaba un argumento" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: se esperaba una expresión entera" + +#: test.c:265 +msgid "`)' expected" +msgstr "`)' esperado" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "se esperaba `)', se encontró %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: se esperaba un operador binario" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: se esperaba un operador unario" + +# Singular em+ +# Puede faltar más de un ] cfuga +# Cierto, pero al menos uno seguro que falta. +# Yo creo que no hace falta el (n). sv +# Abreviando "falta [al menos] un `]'" saldría: "falta un `]'". +# ¿No es mejor "falta algún `]'"? cfuga +# Tiene razón Enrique: singular. cfuga +#: test.c:881 +msgid "missing `]'" +msgstr "falta un `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "error sintáctico: `;' inesperado" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "número de señal inválido" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" +"manejador de capturas: se ha excedido el nivel máximo de manejadores de " +"capturas (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valor erróneo en trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: el manejador de señal es SIG_DFL, reenviando %d (%s) a mí " +"mismo" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: señal errónea %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "error al importar la definición de la función para `%s'" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "el nivel de shell (%d) es demasiado alto, se reestablece a 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: no hay contexto de función en el ámbito actual" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variable quizá no es valor asignado" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: asignando entero a nombre referencia" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: no hay contexto de función en el ámbito actual" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s tiene exportstr nulo" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "carácter inválido %d en exportstr para %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "no hay `=' en exportstr para %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: la cabeza de shell_variables no es un contexto de función" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: no es un contexto global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: la cabeza de shell_variables no es un ámbito de entorno temporal" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: no se puede abrir como FICHERO" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: valor inválido para el descriptor de fichero de rastreo" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: valor de compatibilidad fuera del rango" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licencia GPLv3+: GPL de GNU versión 3 o posterior \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versión %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Esto es software libre, es libre para modificar y redistribuirlo." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "No hay NINGUNA GARANTÍA, a la extensión permitida por la ley." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: no se pueden asignar %lu bytes (%lu bytes asignados)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: no se pueden asignar %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: no se pueden asignar %lu bytes (%lu bytes asignados)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: no se pueden asignar %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nombre[=valor] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nombre [nombre ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m comb_teclas] [-f fichero] [-q nombre] [-u nombre] [-r " +"secteclas] [-x secteclas:orden-shell] [secteclas:función-leerlinea o orden-" +"leerlinea]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [orden-interna-shell [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expresión]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] orden [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilrtux] [-p] [nombre[=valor] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] nombre[=valor] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [opción] nombre[=valor] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f fichero] [nombre ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts cadena_opciones nombre [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nombre] [orden [argumentos ...]] [redirección ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e nombre_e] [-lnr] [primero] [último] o fc -s [pat=rep] [orden]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [id_trabajo]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [id_trabajo ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ruta] [-dt] [nombre ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [patrón ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d despl] [n] o history -anrw [fichero] o history -ps arg " +"[arg...]" + +# jobspec no es sólo el pid del proceso, puede ser tambien +# el nombre de la orden que se creo con el proceso em+ +# por eso es idtrabajo, no pidtrabajo. De cualquier forma, no me agrada +# mucho. ¿Sugerencias? cfuga +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [idtrabajo ...] o jobs -x orden [args]" + +# lo mismo em+ +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [idtrabajo ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s id_señal | -n num_señal | -id_señal] pid | idtrabajo ... o kill -l " +"[id_señal]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a matriz] [-d delim] [-i texto] [-n ncars] [-N ncars] [-p " +"prompt] [-t tiempo] [-u df] [nombre ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nombre-opción] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nombre ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nombre[=valor] ...] ó export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nombre[=valor] ...] ó readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source fichero [argumentos]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". fichero [argumentos]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expresión]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] id_señal ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nombre [nombre ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modo]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOMBRE [in PALABRAS ... ] ; do ÓRDENES; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do ÓRDENES; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOMBRE [in PALABRAS ... ;] do ÓRDENES; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] tubería" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PALABRA in [PATRÓN [| PATRÓN]...) ÓRDENES ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if ÓRDENES; then ÓRDENES; [ elif ÓRDENES; then ÓRDENES; ]...[ else " +"ÓRDENES; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while ÓRDENES; do ÓRDENES; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until ÓRDENES; do ÓRDENES; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOMBRE] orden [redirecciones]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nombre { ÓRDENES ; } o nombre () { ÓRDENES ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ ÓRDENES ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "id_trabajo [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expresión ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expresión ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Nombres y significados de algunas variables de shell" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nombre_opción...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] formato [argumentos]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o opción] [-A acción] [-G patglob] [-" +"W listapalabras] [-F función] [-C orden] [-X patfiltro] [-P prefijo] [-S " +"sufijo] [nombre ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o opción] [-A acción] [-G patglob] [-W " +"listapalabras] [-F función] [-C orden] [-X patfiltro] [-P prefijo] [-S " +"sufijo] [palabra]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opción] [-DEI] [nombre ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n cuenta] [-O origen] [-s cuenta] [-t] [-u df] [-C " +"llamada] [-c quantum] [matriz]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d delim] [-n cuenta] [-O origen] [-s cuenta] [-t] [-u df] [-C " +"llamada] [-c quantum] [matriz]" + +# Más en español sería: se define un alias por cada NOMBRE cuyo VALOR se da. sv +# Lo mismo de antes: el alias es expandido -> el alias se expande. sv +# no alias -> ningún alias. sv +# De acuerdo. cfuga +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Define o muestra alias.\n" +" \n" +" Sin argumentos `alias' muestra la lista de alias en el formato\n" +" reutilizable `alias NOMBRE=VALOR' en la salida estándar.\n" +" \n" +" En caso contrario, se define un alias por cada NOMBRE cuyo VALOR se\n" +" proporcione. Un espacio final en VALOR causa que se revise\n" +" la siguiente palabra para sustitución de alias cuando se expande\n" +" el alias.\n" +" \n" +" Opciones:\n" +" -p\tmuestra todos los alias definidos en un formato reutilizable\n" +" \n" +" Estado de Salida:\n" +" alias devuelve verdadero a menos que se dé un NOMBRE para el cual\n" +" no se haya definido ningún alias." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Quita cada NOMBRE de la lista de alias definidos.\n" +" \n" +" Opciones:\n" +" -a\tquita todas las definiciones de alias.\n" +" \n" +" Devuelve verdadero a menos que un NOMBRE no sea un alias existente." + +# lee 'la'... em+ +# Corregido. Además, es plural: lee las asignaciones... cfuga +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Establece secuencias de teclas y variables de Readline.\n" +" \n" +" Asigna una secuencia de teclas a una función Readline o a una macro, o\n" +" establece una variable Readline. La sintaxis de los argumentos que\n" +" no son opciones es equivalente a la que se encuentra en ~/.inputrc,\n" +" pero se debe pasar como un solo argumento:\n" +" p.ej., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Opciones:\n" +" -m comb_teclas Usa COMB_TECLAS como la combinación de teclas " +"durante el\n" +" que dure esta orden. Los nombres de combinaciones\n" +" de teclas aceptables son emacs, emacs-standard,\n" +" emacs-meta, emacs-ctlx, vi, vi-move, vi-command y\n" +" vi-insert.\n" +" -l Lista los nombres de las funciones.\n" +" -P Lista los nombres de las funciones y asignaciones.\n" +" -p Lista las funciones y asignaciones de tal forma " +"que\n" +" se pueda ruutilizar como entrada.\n" +" -S Lista las secuencias de teclas que invocan macros\n" +" y sus valores.\n" +" -s Lista las secuencias de teclas que invocan macros\n" +" y sus valores en una forma que se pueden reutilizar " +"como\n" +" entrada.\n" +" -V Lista los nombres de variables y valores.\n" +" -v Lista los nombres de variables y valores en una\n" +" forma que se pueden reutilizar como entrada.\n" +" -q nombre-función Pregunta qué teclas invocan la función nombrada.\n" +" -u nombre-función Borra todas las teclas que están ligadas a\n" +" la función nombrada.\n" +" -r secteclas Borra la asignación para la SECTECLAS.\n" +" -f fichero Lee las asignaciones de teclas del FICHERO.\n" +" -x secteclas:orden-shell\tCausa que se ejecute la ORDEN-SHELL cuando\n" +" \t\t\t\tse introduce la SECTECLAS.\n" +" \n" +" Estado de Salida:\n" +" bind devuelve 0 a menos que se presente una opción desconocida o suceda\n" +" un error." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Termina bucles for, while o until.\n" +" \n" +" Termina un bucle FOR, WHILE o UNTIL. Si se especifica N, termina\n" +" N bucles anidados.\n" +" \n" +" Estado de Salida:\n" +" El estado de salida es 0 a menos que N no sea mayor o igual a 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Reanuda bucles for, while o until\n" +" \n" +" Reanuda la siguiente iteración del bucle FOR, WHILE o UNTIL\n" +" circundante. Si se especifica N, reanuda en el N-ésimo bucle " +"circundante.\n" +" \n" +" Estado de Salida:\n" +" El estado de salida es 0 a menos que N no sea mayor o igual a 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Ejecuta órdenes internas del shell\n" +" \n" +" Ejecuta la ORDEN-INTERNA-SHELL con los argumentos ARGs sin realizar la\n" +" búsqueda interna de órdenes. Esto es útil cuando se desea " +"reimplementar\n" +" una orden interna de la shell como una función de shell, pero se " +"necesita\n" +" ejecutar la orden interna dentro de la función.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de salida de la ORDEN-INTERNA-SHELL, o falso si la\n" +" ORDEN-INTERNA-SHELL no es una orden interna de shell." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Devuelve el contexto de la llamada a subrutina actual.\n" +" \n" +" Sin EXPR, devuelve \"$linea $nombrefichero\". Con EXPR, devuelve\n" +" \"$linea $subrutina $nombrefichero\"; esta información adicional\n" +" se puede usar para proporcionar un volcado de pila.\n" +" \n" +" El valor de EXPR indica cuántos marcos de llamada hay que retroceder\n" +" antes del actual; el marco superior es el marco 0.\n" +" \n" +" Estado de Salida:\n" +" Devuelve 0 a menos que el shell no esté ejecutando una función de shell\n" +" o EXPR sea inválida." + +# Slash lo venimos traduciendo por barra inclinada , y backslash +# por barra invertida em++ +# Corregido en toda la traducción. cfuga +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Modifica el directorio de trabajo del shell.\n" +" \n" +" Modifica el directorio actual a DIR. DIR por defecto es el valor de la\n" +" variable de shell HOME.\n" +" \n" +" La variable CDPATH define la ruta de búsqueda para el directorio que\n" +" contiene DIR. Los nombres alternativos de directorio en CDPATH se\n" +" separan con dos puntos (:). Un nombre de directorio nulo es igual que\n" +" el directorio actual. Si DIR comienza con una barra inclinada (/),\n" +" entonces no se usa CDPATH.\n" +" \n" +" Si no se encuentra el directorio, y la opción del shell `cdable_vars'\n" +" está activa, entonces se trata la palabra como un nombre de variable.\n" +" Si esa variable tiene un valor, se utiliza su valor para DIR.\n" +" \n" +" Opciones:\n" +" -L\tfuerza a seguir los enlaces simbólicos: resuelve los enlaces\n" +" \t\tsimbólicos en DIR después de procesar las instancias de `..'\n" +" -P\tusa la estructura física de directorios sin seguir los enlaces\n" +" \t\tsimbólicos: resuelve los enlaces simbólicos en DIR antes de " +"procesar\n" +" \t\tlas instancias de `..'\n" +" -e\tsi se da la opción -P y el directorio actual de trabajo no se\n" +" \t\tpuede determinar con éxito, termina con un estado diferente de " +"cero.\n" +" \n" +" La acción por defecto es seguir los enlaces simbólicos, como si se\n" +" especificara `-L'.\n" +" `..' se procesa quitando la componente del nombre de la ruta " +"inmediatamente\n" +" anterior hasta una barra inclinada o el comienzo de DIR.\n" +" \n" +" Estado de Salida:\n" +" Devuelve 0 si se cambia el directorio, y si $PWD está definido como\n" +" correcto cuando se emplee -P; de otra forma es diferente a cero." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Muestra el nombre del directorio de trabajo actual.\n" +" \n" +" Opciones:\n" +" -L\tmuestra el valor de $PWD si nombra al directorio de\n" +" \ttrabajo actual\n" +" -P\tmuestra el directorio físico, sin enlaces simbólicos\n" +" \n" +" Por defecto, `pwd' se comporta como si se especificara `-L'.\n" +" \n" +" Estado de Salida:\n" +" Devuelve 0 a menos que se de una opción inválida o no se pueda leer\n" +" el directorio actual." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Orden nula.\n" +" \n" +" Sin efecto; la orden no hace nada.\n" +" \n" +" Estado de Salida:\n" +" Siempre correcto." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Devuelve un resultado correcto.\n" +" \n" +" Estado de Salida:\n" +" Siempre correcto." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Devuelve un resultado incorrecto.\n" +" \n" +" Estado de Salida:\n" +" Siempre incorrecto." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Ejecuta una orden simple o muestra información sobre órdenes.\n" +" \n" +" Ejecuta la ORDEN con ARGumentos, suprimiendo la búsqueda de funciones\n" +" de shell, o muestra información sobre las ORDENes especificadas. Se " +"puede\n" +" usar para invocar órdenes en disco cuando existe una función con el " +"mismo\n" +" nombre.\n" +" \n" +" Opciones:\n" +" -p utiliza un valor predeterminado de RUTA que garantiza que se\n" +" encuentren todas las utilidades comunes\n" +" -v muestra una descripción de la ORDEN similar a la orden\n" +" interna `type'\n" +" -V muestra una descripción más detallada de cada ORDEN\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de salida de la ORDEN, o fallo si no se encuentra\n" +" la ORDEN." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Establece valores de variable y atributos.\n" +" \n" +" Declara variables y les da atributos. Si no se da ningún NOMBRE,\n" +" muestra los atributos y valores de todas las variables.\n" +" \n" +" Opciones:\n" +" -f\trestringe la acción o la información a nombres y definiciones\n" +" \t\tde funciones\n" +" -F\trestringe la información a nombres de funciones únicamente (con\n" +" \t\tnúmero de línea y fichero fuente al depurar)\n" +" -g\tcrea variables globales cuando se usa en una función de shell;\n" +" \t\ten caso contrario, se descarta\n" +" -p\tmuestra los atributos y el valor de cada NOMBRE\n" +" \n" +" Opciones que establecen atributos:\n" +" -a\testablece NOMBREs como matrices indexadas (si se admiten)\n" +" -A\testablece NOMBREs como matrices asociativas (si se admiten)\n" +" -i\testablece NOMBREs con el atributo `integer'\n" +" -l\tconvierte el valor de cada NOMBRE a minúsculas en la asignación\n" +" -r\tcrea NOMBREs como de sólo lectura\n" +" -t\tcrea NOMBREs con el atributo `trace'\n" +" -u\tconvierte el valor de cada NOMBRE a mayúsculas en la asignación\n" +" -x\tcrea NOMBREs para exportar\n" +" \n" +" Si se usa `+' en lugar de `-', se desactiva el atributo dado.\n" +" \n" +" Las variables con el atributo ‘integer’ realizan evaluación aritmética\n" +" (vea la orden `let') cuando se asigna un valor a la variable.\n" +" \n" +" Cuando se usa en una función, `declare' hace locales a los NOMBREs,\n" +" como sucede con la orden `local'. La opción `-g' suprime esta\n" +" conducta.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se dé una opción inválida o\n" +" suceda un error de asignación de variable." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Establece valores de variables y atributos.\n" +" \n" +" Sinónimo de `declare'. Vea `help declare'." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Define variables locales.\n" +" \n" +" Crea una variable local llamada NOMBRE, y le da un VALOR. OPCIÓN puede\n" +" ser cualquier opción aceptada por `declare'.\n" +" \n" +" Las variables locales sólo pueden usarse dentro de funciones; son\n" +" visibles solo en la función donde se definen y sus hijos.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se dé una opción inválida, suceda\n" +" un error de asignación, o el shell no esté ejecutando una función." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escribe argumentos en la salida estándar.\n" +" \n" +" Muestra los ARGumentos en la salida estándar seguidos por un carácter\n" +" de fin de línea.\n" +" \n" +" Opciones:\n" +" -n\tno agrega un carácter de fin de línea\n" +" -e\tactiva la interpretación de los siguientes caracteres de escape " +"de\n" +" \t\tbarra invertida\n" +" -E\tdesactiva explícitamente la interpretación de caracteres de\n" +" \t\tescape de barra invertida\n" +" \n" +" `echo' interpreta los siguientes caracteres de escape de barra " +"invertida:\n" +" \\a\talerta (timbre)\n" +" \\b\tborrado hacia atrás\n" +" \\c\tsuprime toda salida a continuación\n" +" \\e\tcarácter de escape\n" +" \\E\tcarácter de escape\n" +" \\f\talimentación de papel\n" +" \\n\tlínea nueva\n" +" \\r\tretorno de carro\n" +" \\t\ttabulador horizontal\n" +" \\v\ttabulador vertical\n" +" \\\\\tbarra invertida\n" +" \\0nnn\tcarácter cuyo código ASCII es NNN (octal). NNN puede ser\n" +" \t\tde 0 a 3 dígitos octales\n" +" \\xHH\tel de ocho bits cuyo valor es HH (hexadecimal). HH\n" +" \t\tpuede ser de uno o dos dígitos hexadecimales\n" +" \\uHHHH\tcarácter Unicode cuyo valor es el valor hexadecimal HHHH.\n" +" \t\tHHHH puede tener de uno a cuatro dígitos hexadecimales.\n" +" \\UHHHHHHHH carácter Unicode cuyo valor es el valor hexadecimal " +"HHHHHHHH.\n" +" \t\tHHHHHHHH puede tener de uno a ocho dígitos hexadecimales.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que suceda un error de escritura." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escribe argumentos en la salida estándar.\n" +" \n" +" Muestra los ARGumentos en la salida estándar seguidos por un carácter\n" +" de fin de línea.\n" +" Opciones:\n" +" -n\tno agrega un carácter de fin de línea\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que suceda un error de escritura." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Activa y desactiva las órdenes internas del shell.\n" +" \n" +" Activa y desactiva las órdenes internas del shell. El desactivar le\n" +" permite ejecutar una orden del disco que tenga el mismo nombre que\n" +" la orden interna del shell, sin usar el nombre de ruta completo.\n" +" \n" +" Opciones:\n" +" -a\tmuestra la lista de órdenes internas indicando si están activas o " +"no\n" +" -n\tdesactiva cada NOMBRE o muestra la lista de órdenes internas\n" +" \t\tdesactivadas\n" +" -p\tmuestra la lista de órdenes internas en una forma reusable\n" +" -s\tmuestra solo los nombres de las órdenes internas `especiales' " +"Posix\n" +" \n" +" Opciones que controlan la carga dinámica:\n" +" -f\tCarga la función interna NOMBRE desde el objeto compartido " +"FICHERO\n" +" -d\tBorra una orden interna cargada con -f\n" +" \n" +" Sin opciones, se activa cada NOMBRE.\n" +" \n" +" Para usar el `test' que se encuentra en $PATH en lugar de la orden " +"interna\n" +" del shell, ejecute `enable -n test'.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que NOMBRE no sea una orden interna del shell\n" +" o suceda un error." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Ejecuta argumentos como una orden de shell.\n" +" \n" +" Combina los ARGumentos en una sola cadena, usa el resultado como " +"entrada\n" +" para el shell, y ejecuta las órdenes resultantes.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de salida de la orden o éxito si la orden es nula." + +# "a ser reconocidas" no está en español. +# Yo pondría "las letras de opción que se reconocen". sv +# en una de dos formas -> en una de las dos formas siguientes em+ +# dar argumentos -> especificar em+ +# De acuerdo. cfuga +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Decodifica argumentos de opción.\n" +"\n" +" Getopts se usa en procedimientos del shell para decodificar parámetros\n" +" posicionales como opciones.\n" +" \n" +" CADENA_OPCIONES contiene las letras de opción para reconocer; si\n" +" una letra es seguida por dos puntos, se espera que la opción tenga\n" +" un argumento, del cual se debe separar con espacios en blanco.\n" +" \n" +" Cada vez que se invoca, getopts colocará la siguiente opción en la\n" +" variable de shell $nombre, inicializando nombre si no existe, y el\n" +" índice del siguiente argumento a ser procesado en la variable de\n" +" shell OPTIND. OPTIND se inicializa a 1 cada vez que se invoca el\n" +" shell, o un guión de shell. Cuando una opción requiere un argumento,\n" +" getopts coloca ese argumento en la variable de shell OPTARG.\n" +" \n" +" getopts reporta errores en una de las dos formas siguientes. Si\n" +" el primer carácter de OPTSTRING es dos puntos, getopts usa el\n" +" aviso de errores silencioso. En este modo, no se muestran\n" +" mensajes de error. Si se encuentra una opción inválida, getopts\n" +" coloca el carácter de opción encontrado en OPTARG. Si no se\n" +" encuentra el argumento necesario, getopts coloca ':' en NOMBRE y\n" +" define OPTARG con el carácter de opción encontrado. Si getopts no\n" +" está en modo silencioso, y se encuentra una opción inválida, getopts\n" +" coloca '?' en NOMBRE y borra OPTARG. Si no se encuentra un argumento\n" +" necesario, se coloca '?' en NOMBRE, se borra OPTARG, y se muestra\n" +" un mensaje de diagnóstico.\n" +" \n" +" Si la variable de shell OPTERR tiene el valor 0, getopts desactiva\n" +" la notificación de mensajes de error, aún si el primer carácter de\n" +" OPTSTRING no es ':'. OPTERR tiene el valor 1 por defecto.\n" +" \n" +" Getopts normalmente compara los parámetros de posición ($0 - $9),\n" +" pero si se especifican más argumentos, éstos se comparan en lugar\n" +" de los primeros.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto si se encuentra una opción; falla si se encuentra\n" +" el final de las opciones o sucede un error." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Reemplaza el shell con la orden dada.\n" +" \n" +" Ejecuta la ORDEN, reemplazando este shell con el programa especificado.\n" +" Los ARGUMENTOS se vuelven los argumentos de la ORDEN. Si no se\n" +" especifica la ORDEN, cualquier redirección toma efecto en el shell " +"actual.\n" +" \n" +" Opciones:\n" +" -a nombre\tpasa el NOMBRE como el argumento cero de la ORDEN\n" +" -c\tejecuta la ORDEN en un entorno vacío\n" +" -l\tcoloca un guion en el argumento cero de la ORDEN\n" +" \n" +" Si la orden no se puede ejecutar, termina un shell no interactivo,\n" +" a menos que la opción de shell `execfail' esté activa.\n" +" \n" +" Estado de Salida:\n" +" Devuelve éxito a menos que no se encuentre la ORDEN o que suceda un\n" +" error de redirección." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Termina el shell.\n" +" \n" +" Termina el shell con un estado de N. Si se omite N, el estado de " +"salida\n" +" es el mismo de la última orden ejecutada." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Termina un shell de entrada.\n" +" \n" +" Termina un shell de entrada con un estado de salida de N. Devuelve un\n" +" error si no se ejecuta en un shell de entrada." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Muestra o ejecuta órdenes de la lista de la historia.\n" +" \n" +" fc se usa para listar o editar y reejecutar órdenes de la lista de la\n" +" historia. PRIMERO y ÚLTIMO pueden ser números que especifican el " +"rango,\n" +" o PRIMERO puede ser una cadena, que significa la orden más reciente que\n" +" comience con esa cadena.\n" +" \n" +" -e NOMBRE_E\tselecciona el editor a usar. Por defecto es FCEDIT,\n" +" \t\tdespués EDITOR, después vi\n" +" -l \tlista laslíneas en lugar de editar\n" +" -n\tomite los números de línea al listar\n" +" -r\tinvierte el orden de las líneas (muestra primero las más " +"recientes)\n" +" \n" +" Con el formato `fc -s [pat=rep ...] [orden]', la ORDEN se\n" +" ejecuta de nuevo después de realizar la sustitución ANT=NUEVO.\n" +" \n" +" Un alias útil para usar con esto es r='fc -s', tal que al teclear\n" +" `r cc' ejecuta la última orden que comience con `cc' y al teclear\n" +" `r' reejecuta la última orden.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto o el estado de la orden ejecutada; si sucede un " +"error,\n" +" es diferente de cero." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Mueve el trabajo al primer plano.\n" +" \n" +" Ubica el trabajo identificado con IDTRABAJO en primer plano y\n" +" lo convierte en el trabajo actual. Si IDTRABAJO no está presente, se " +"usa\n" +" la noción del shell del trabajo actual.\n" +" \n" +" Estado de Salida:\n" +" El estado de la orden ubicada en primer plano, o falla si sucede un " +"error." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Mueve trabajos al segundo plano.\n" +" \n" +" Coloca los trabajos identificados por cada IDTRABAJO en segundo plano,\n" +" como si se hubieran iniciado con `&'. Si IDTRABAJO no está presente,\n" +" se usa la noción del shell del trabajo actual.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que el control de trabajos no esté activado o\n" +" suceda un error." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Almacena o muestra la ubicación de los programas.\n" +" \n" +" Determina y almacena la ruta completa de cada órden NOMBRE. Si\n" +" no se proporcionan argumentos, se muestra la información de las\n" +" órdenes almacenadas.\n" +" \n" +" Opciones:\n" +" -d\tolvida la ubicación almacenada de cada NOMBRE\n" +" -l\tmuestra en un formato que se puede reutilizar como entrada\n" +" -p ruta\tusa RUTA como la ruta completa de NOMBRE\n" +" -r\tolvida todas las ubicaciones almacenadas\n" +" -t\tmuestra la ubicación almacenada de cada NOMBRE,\n" +" \t\tcada ubicación precedida del NOMBRE correspondiente\n" +" \t\tsi se dan varios NOMBREs\n" +" Argumentos:\n" +" NOMBRE\tCada NOMBRE se busca en $PATH y se agrega a la lista\n" +" \t\tde órdenes almacenadas.\n" +" \n" +" Estado de Salida\n" +" Devuelve correcto a menos que no se encuentre NOMBRE o se proporcione\n" +" una opción inválida." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Muestra información sobre órdenes internas.\n" +" \n" +" Muestra un resumen breve de las órdenes internas. Si se especifica\n" +" un PATRÓN, da ayuda detallada sobre todas las órdenes que\n" +" coincidan con el PATRÓN; en caso contrario, se muestra la lista de\n" +" tópicos de ayuda.\n" +" \n" +" Opciones:\n" +" -d\tmuestra una descripción corta para cada tópico\n" +" -m\tmuestra el uso en un formato similar a página man\n" +" -s\tmuestra sólo una sinopsis breve de uso para cada tópico que\n" +" \t\tcoincida con el PATRÓN\n" +" \n" +" Argumentos:\n" +" PATRÓN\tPatrón que especifica un tópico de ayuda\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que no se encuentre PATRÓN o se proporcione\n" +" una opción inválida." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Muestra o manipula la lista de la historia.\n" +" \n" +" Muestra la lista de la historia con números de línea, mostrando\n" +" cada línea modificada con un `*' como prefijo. El argumento N\n" +" muestra solamente las últimas N entradas.\n" +" \n" +" Opciones:\n" +" -c\tborra la lista de historia eliminando todas las entradas\n" +" -d despl\tborra la entrada de la historia en la posición DESPL. Los\n" +" \t\tdesplazamientos negativos se cuentan hacia atrás desde el final de\n" +" \t\tla lista de historia\n" +" \n" +" -a\tagrega las líneas de historia de esta sesión al fichero de " +"historia\n" +" -n\tlee todas las líneas de historia que no se han leído del fichero\n" +" \tde historia\n" +" -r\tlee el fichero de historia y agrega el contenido al fichero\n" +" \tde historia\n" +" -w\tescribe la historia actual en el fichero de historia\n" +" \n" +" -p\thace expansión de historia en cada ARGumento y muestra el\n" +" \tresultado, sin guardarlo en la lista de historia\n" +" -s\tagrega los ARGumentos a la lista de historia como\n" +" \tuna sola entrada\n" +" \n" +" Si se proporciona FICHERO, entonces se usa como el fichero de\n" +" historia. Si no, si $HISTFILE tien un valor, éste se usa, en otro caso\n" +" ~/.bash_history.\n" +" \n" +" Si la variable $HISTTIMEFORMAT está definida y no es nula, se usa su\n" +" valor como una cadena de formato strftime(3) para mostrar la marca de\n" +" tiempo asociada con cada entrada de historia mostrada. No se muestra\n" +" ninguna marca de tiempo de otra forma.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a no ser que se dé una opción inválida u ocurra un " +"error." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Muestra el estado de los trabajos.\n" +" \n" +" Muestra los trabajos activos. IDTRABAJO restringe la salida a\n" +" esa trabajo. Sin opciones, se muestra el estado de todas los trabajos\n" +" activos.\n" +" \n" +" Opciones:\n" +" -l\tmuestra los IDs de los procesos, además de la información normal\n" +" -n\tsolo muestra los procesos que han cambiado de estado desde\n" +" \t\tla última notificación\n" +" -p\tsolo muestra los IDs de los procesos\n" +" -r\trestringe la salida a los trabajos en ejecución\n" +" -s\trestringe la salida a los trabajos detenidos\n" +" \n" +" Si se especifica -x, la ORDEN se ejecuta después de que todas las\n" +" especificaciones de trabajo que aparecen en ARGS se hayan reemplazado\n" +" con el ID de proceso del líder del grupo de procesos de dicho trabajo.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se dé una opción inválida o suceda un\n" +" error. Si se usa -x, devuelve el estado de salida de la ORDEN." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Quita trabajos del shell actual.\n" +" \n" +" Quita cada argumento IDTRABAJO de la tabla de trabajos activos. Sin\n" +" ningún IDTRABAJO, el shell utiliza su noción del trabajo actual.\n" +" \n" +" Opciones:\n" +" -a\tquita todas los trabajos si no se proporciona IDTRABAJO\n" +" -h\tmarca cada IDTRABAJO para que no se le envíe SIGHUP\n" +" \t\tsi el shell recibe un SIGHUP\n" +" -r\tquita solo los trabajos en ejecución\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcionen una opción o\n" +" un IDTRABAJO inválida." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Envía una señal a una trabajo.\n" +" \n" +" Envía a los procesos nombrados por PID (o IDTRABAJO) la señal ID_SEÑAL\n" +" o NUM_SEÑAL. Si no están presentes ni ID_SEÑAL o NUM_SEÑAL, se asume\n" +" SIGTERM.\n" +" \n" +" Opciones:\n" +" -s sig\tSIG es un nombre de señal\n" +" -n sig\tSIG es un número de señal\n" +" -l\tlista los nombres de señales; si hay argumentos a continuación\n" +" \t\tde `-l', se asume que son números de señal para las cuales se debe\n" +" mostrar el nombre.\n" +" \n" +" Kill es una orden interna del shell por dos razones: permite que se\n" +" puedan utilizar IDs de trabajo en lugar de IDs de proceso y permite\n" +" matar procesos si se ha alcanzado el límite de procesos que se pueden\n" +" crear.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se dé una opción inválida o suceda un " +"error." + +# "a ser evaluada" no está en español. sv +# Cierto. ¿Así está mejor? cfuga +# overflow -> desbordamiento o sobrepasamiento. nunca lo he visto +# traducido como sobreflujo. sv +# Corregido. cfuga +# No sé si existe precedencia en español, pero me suena fatal. +# Yo pondría simplemente "prioridad". sv +# Creo que si existe, pero tu sugerencia es mejor. cfuga +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Evalúa expresiones aritméticas.\n" +" \n" +" Evalúa cada ARG como una expresión aritmética. La evaluación se hace\n" +" con enteros de longitud fija, sin revisar desbordamientos, aunque la\n" +" la división por 0 se captura y se marca como un error. La siguiente\n" +" lista de operadores está agrupada en niveles de operadores de la misma\n" +" prioridad. Los niveles se muestran en orden de prioridad decreciente.\n" +" \n" +" \tid++, id--\tpost-incremento, post-decremento de variable\n" +" \t++id, --id\tpre-incremento, pre-decremento de variable\n" +" \t-, +\t\tmenos, más unario\n" +" \t!, ~\t\tnegación lógica y basada en bits\n" +" \t**\t\texponenciación\n" +" \t*, /, %\t\tmultiplicación, división, residuo\n" +" \t+, -\t\tadición, sustracción\n" +" \t<<, >>\t\tdesplazamientos de varios bit izquierdo y derecho\n" +" \t<=, >=, <, >\tcomparación\n" +" \t==, !=\t\tequivalencia, inequivalencia\n" +" \t&\t\tAND de varios bit\n" +" \t^\t\tXOR de varios bit\n" +" \t|\t\tOR de varios bit\n" +" \t&&\t\tAND lógico\n" +" \t||\t\tOR lógico\n" +" \texpr ? expr : expr\n" +" \t\t\toperador condicional\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tasignación\n" +" \n" +" Se permiten las variables de shell como operandos. El nombre\n" +" de la variable se reemplaza por su valor (coercionado a un\n" +" entero de longitud fija) dentro de una expresión. La variable\n" +" no necesita tener activado su atributo entero para emplearse\n" +" en una expresión.\n" +" \n" +" Los operadores se evalúan en orden de prioridad. Primero se\n" +" evalúan las sub-expresiones en paréntesis y pueden sobrepasar\n" +" las reglas de prioridad anteriores.\n" +" \n" +" Estado de Salida:\n" +" Si el último ARGumento se evalúa como 0, ‘let’ devuelve 1; de\n" +" otra forma, ‘let’ devuelve 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Lee una línea de la salida estándar y la divide en campos.\n" +" \n" +" Lee una sola línea de la entrada estándar, o del descriptor de\n" +" fichero FD si se proporciona la opción -u. La línea se divide en " +"campos\n" +" con separación de palabras, y la primera palabra se asigna al primer\n" +" NOMBRE, la segunda palabra al segundo NOMBRE, y así sucesivamente, con\n" +" las palabras restantes asignadas al último NOMBRE. Sólo los caracteres\n" +" que se encuentran en $IFS se reconocen como delimitadores de palabras.\n" +" \n" +" Si no se proporciona ningún NOMBRE, la línea leída se guarda en la\n" +" variable REPLY.\n" +" \n" +" Opciones:\n" +" -a matriz\tasigna las palabras leídas a índices secuenciales de\n" +" \t\tla variable matricial MATRIZ, empezando en cero\n" +" -d delim\tcontinúa hasta que se lea el primer carácter de DELIM,\n" +" \t\ten lugar de línea nueva\n" +" -e\tusa Readline para obtener la línea\n" +" -i texto\tEmplea el TEXTO como el texto inicial para Readline\n" +" -n ncars\tregresa tras leer NCARS caracteres en lugar de\n" +" \t\tesperar una línea nueva, pero honra a un delimitador si\n" +" \t\tse leen menos de NCARS caracteres antes del delimitador\n" +" -N ncars\tdevuelve sólo después de leer exactamente NCARS\n" +" \t\tcaracteres, a menos que se encuentre el fin del fichero\n" +" \t\to expire la lectura, descartando cualquier delimitador\n" +" -p prompt\tsale la cadena PROMPT sin un carácter de línea nueva\n" +" \t\tal final antes de intentar leer\n" +" -r\t\tno permite que las barras invertidas escapen caracteres\n" +" -s\t\tno muestra la salida que proviene de una terminal\n" +" -t tiempo\texpira y devuelve fallo si no se lee una línea completa\n" +" \t\tde entrada en TIEMPO segundos. El valor de la variable TMOUT\n" +" \t\tes el tiempo de expiración por defecto. TIEMPO puede ser un\n" +" \t\tnúmero fraccionario. Si TIEMPO es 0, ‘read’ devuelve correcto\n" +" \t\tsólo si hay entrada disponible en el descriptor de fichero\n" +" \t\tespecificado. El estado de salida es mayor que 128 si se excede\n" +" \t\tel tiempo de expiración.\n" +" -u df\t\tlee del descriptor de fichero DF en lugar de la entrada\n" +" \t\testándar\n" +" \n" +" Estado de Salida:\n" +" El código de devolución es cero, a menos que se encuentre un final de\n" +" línea, el tiempo de lectura se agote, o se proporcione un descriptor\n" +" de fichero inválido como el argumento de -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Devuelve de una función de shell.\n" +" \n" +" Causa que una función o un script leído termine con el valor devuelto\n" +" especificado por N. Si se omite N, el estado devuelto es el de la " +"última\n" +" orden ejecutada dentro de la función o script.\n" +" \n" +" Estado de Salida:\n" +" Devuelve N, o falla si el shell no está ejecutando una función o un " +"script." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Establece o borra los valores de las opciones de shell y los parámetros\n" +"posicionales.\n" +" \n" +" Modifica el valor de los atributos de shell y los parámetros " +"posicionales,\n" +" o muestra los nombres y valores de las variables de shell.\n" +" \n" +" Opciones:\n" +" -a Marca las variables que se modifican o crean para exportación.\n" +" -b Notifica el término de trabajos inmediatamente.\n" +" -e Termina inmediatamente si una orden termina con un estado\n" +" diferente a cero.\n" +" -f Desactiva la generación de nombres de ficheros (englobamiento).\n" +" -h Recuerda la ubicación de las órdenes como se localizaron.\n" +" -k Todos los argumentos de asignación se colocan en el ambiente para " +"una\n" +" orden, no solo aquellos que preceden al nombre de la orden.\n" +" -m Activa el control de trabajos.\n" +" -n Lee órdenes pero no las ejecuta.\n" +" -o nombre-opción\n" +" Establece la variable correspondiente a nombre-opción:\n" +" allexport igual que -a\n" +" braceexpand igual que -B\n" +" emacs usa una interfaz de edición lineal estilo emacs\n" +" errexit igual que -e\n" +" errtrace igual que -E\n" +" functrace igual que -T\n" +" hashall igual que -h\n" +" histexpand igual que -H\n" +" history activa la historia de órdenes\n" +" ignoreeof el shell no terminará después de leer EOF\n" +" interactive-comments\n" +" permite que haya comentarios en órdenes " +"interactivas\n" +" keyword igual que -k\n" +" monitor igual que -m\n" +" noclobber igual que -C\n" +" noexec igual que -n\n" +" noglob igual que -f\n" +" nolog actualmente se acepta pero se descarta\n" +" notify igual que -b\n" +" nounset igual que -u\n" +" onecmd igual que -t\n" +" physical igual que -P\n" +" pipefail el valor de retorno de una tubería es el estado\n" +" de la última orden que sale con un estado " +"diferente\n" +" de cero, o cero si ninguna orden termina con un\n" +" estado diferente de cero\n" +" posix modifica el comportamiento de bash donde la\n" +" operación por defecto difiere del estándar POSIX\n" +" para que coincida con el estándar\n" +" privileged igual que -p\n" +" verbose igual que -v\n" +" vi usa una interfaz de edición de línea estilo vi\n" +" xtrace igual que -x\n" +" -p Activo cuando los ids real y efectivo del usuario no coinciden.\n" +" Desactiva el procesamiento del fichero $ENV y la importación de\n" +" funciones de shell. Si se desactiva esta opción causa que el uid " +"y\n" +" el gid efectivos sean iguales al uid y el gid real.\n" +" -t Termina después de leer y ejecutar una orden.\n" +" -u Trata las variables sin definir como un error al sustituir.\n" +" -v Muestra las líneas de entrada del shell mientras se leen.\n" +" -x Muestra las órdenes y sus argumentos mientras se ejecutan.\n" +" -B el shell realizará expansión de llaves.\n" +" -C Si se activa, no permite que los ficheros regulares existentes\n" +" se sobreescriban por redirección de la salida.\n" +" -E Si se activa, las funciones del shell heredan la trampa ERR.\n" +" -H Activa el estilo de sustitución de historia ! . Esta opción está\n" +" activa por defecto cuando el shell es interactivo.\n" +" -P Si se activa, no sigue enlaces simbólicos cuando se ejecutan " +"órdenes\n" +" como cd, que cambian el directorio actual.\n" +" -T Si se activa, las funciones del shell heredan la trampa DEBUG.\n" +" -- Asigna cualquier argumento restante a los parámetros " +"posicionales.\n" +" Si no restan argumentos, se desactivan los parámetros " +"posicionales.\n" +" - Asigna cualquier argumento restante a los parámetros " +"posicionales.\n" +" Las opciones -x y -v se desactivan.\n" +" \n" +" Si se usa + en lugar de - causa que estas opciones se desactiven. Las\n" +" opciones también se pueden usar en la invocación del shell. El " +"conjunto\n" +" actual de opciones se puede encontrar en $-. Los n ARGs restantes son\n" +" parámetros posicionales que se asignan, en orden, a $1, $2, .. $n. Si " +"no\n" +" se proporciona ningún ARG, se muestran todas las variables del shell.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Desactiva valores y atributos de las variables y funciones del shell.\n" +" \n" +" Por cada NOMBRE, borra la función o variable correspondiente.\n" +" \n" +" Opciones:\n" +" -f\ttrata cada NOMBRE como una función de shell\n" +" -v\ttrata cada NOMBRE como una variable de shell\n" +" -n\ttrata cada NOMBRE como una referencia de nombre y desasigna\n" +" \t\tla propia variable, no aquella a la que hace referencia\n" +" \n" +" Sin opciones, unset primero trata de borrar una variable, y si falla,\n" +" trata de borrar una función.\n" +" \n" +" Algunas variables no se pueden borrar; también consulte `readonly'.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" un NOMBRE sea de sólo lectura." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Establece el atributo de exportación para las variables de shell.\n" +" \n" +" Marca cada NOMBRE para exportación automática al ambiente para las " +"órdenes\n" +" ejecutadas subsecuentemente. Si se proporciona un VALOR, se asigna el\n" +" VALOR antes de exportar.\n" +" \n" +" Opciones:\n" +" -f\tse refiere a funciones de shell\n" +" -n\tborra la propiedad de exportación para cada NOMBRE\n" +" -p\tmuestra una lista de todas las variables y funciones exportadas\n" +" \n" +" El argumento `--' desactiva el procesamiento posterior de opciones.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o que\n" +" NOMBRE sea inválido." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marca las variables de shell para evitar su modificación.\n" +" \n" +" Marca cada NOMBRE como de sólo lectura; los valores de esos NOMBREs\n" +" no se pueden modificar por asignaciones subsecuentes. Si se " +"proporciona\n" +" un VALOR, se asigna el VALOR antes de marcar como de sólo lectura.\n" +" \n" +" Opciones:\n" +" -a\tse refiere a variables de matriz indexada\n" +" -A\tse refiere a variables de matriz asociativa\n" +" -f\tse refiere a funciones de shell\n" +" -p\tmuestra una lista de todas las variables y funciones de sólo " +"lectura,\n" +" \t\tdependiendo de si se pone o no la opción -f\n" +" \n" +" El argumento `--' desactiva el procesamiento posterior de opciones.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" el NOMBRE sea inválido." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Desplaza los parámetros posicionales.\n" +" \n" +" Renombra los parámetros posicionales $N+1,$N+2 ... a $1,$2 ... Si no\n" +" se proporciona N, se asume que es 1.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que N sea negativo o mayor que $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Ejecuta órdenes de un fichero en el shell actual.\n" +" \n" +" Lee y ejecuta órdenes del FICHERO en el shell actual. Se utilizan las\n" +" entradas en $PATH para encontrar el directorio que contiene el FICHERO.\n" +" Si se proporciona ARGUMENTOS, se convierten en los parámetros " +"posicionales\n" +" cuando se ejecuta el FICHERO.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada del FICHERO; falla si\n" +" no se puede leer el FICHERO." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspende la ejecución del shell.\n" +" \n" +" Suspende la ejecución de este shell hasta que recibe una señal SIGCONT.\n" +" Los shells de entrada no se pueden suspender, a menos que sean " +"forzados.\n" +" \n" +" Opciones:\n" +" -f\tfuerza la suspensión, aún si el shell es un shell de entrada\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que no esté activo el control de trabajos o\n" +" suceda un error." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Evalúa expresiones condicionales.\n" +" \n" +" Termina con un estado de 0 (verdadero) o 1 (falso) dependiendo de\n" +" la evaluación de EXPR. Las expresiones pueden ser unarias o binarias.\n" +" Las expresiones unarias se usan generalmente para examinar el estado\n" +" de un fichero. Hay también operadores de cadenas, y operadores de\n" +" comparación numérica.\n" +" \n" +" El comportamiento de test depende del número de argumentos. Lea la " +"página\n" +" de manual de bash para la especificación completa.\n" +" \n" +" Operadores de fichero:\n" +" \n" +" -a FICHERO Verdadero si el fichero existe.\n" +" -b FICHERO Verdadero si el fichero es especial de bloques.\n" +" -c FICHERO Verdadero si el fichero es especial de caracteres.\n" +" -d FICHERO Verdadero si el fichero es un directorio.\n" +" -e FICHERO Verdadero si el fichero existe.\n" +" -f FICHERO Verdadero si el fichero existe y es un fichero " +"regular.\n" +" -g FICHERO Verdadero si el fichero tiene activado el set-group-" +"id.\n" +" -h FICHERO Verdadero si el fichero es un enlace simbólico.\n" +" -L FICHERO Verdadero si el fichero es un enlace simbólico.\n" +" -k FICHERO Verdadero si el fichero tiene el bit `sticky' " +"activado.\n" +" -p FICHERO Verdadero si el fichero es una tubería nombrada.\n" +" -r FICHERO Verdadero si el fichero es legible para usted.\n" +" -s FICHERO Verdadero si el fichero existe y no está vacío.\n" +" -S FICHERO Verdadero si el fichero es un `socket'.\n" +" -t DF Verdadero si el DF está abierto en una terminal.\n" +" -u FICHERO Verdadero si el fichero tiene activado el set-user-id.\n" +" -w FICHERO Verdadero si usted puede escribir en el fichero.\n" +" -x FICHERO Verdadero si usted puede ejecutar el fichero.\n" +" -O FICHERO Verdadero si usted efectivamente posee el fichero.\n" +" -G FICHERO Verdadero si su grupo efectivamente posee el fichero.\n" +" -N FICHERO Verdadero si el fichero se modificó desde la última " +"lectura.\n" +" \n" +" FICH1 -nt FICH2 Verdadero si fich1 es más reciente que fich2\n" +" (de acuerdo a la fecha de modificación).\n" +" \n" +" FICH1 -ot FICH2 Verdadero si fich1 es más antiguo que fich2.\n" +" \n" +" FICH1 -ef FICH2 Verdadero si fich1 es un enlace duro a fich2.\n" +" \n" +" Operadores de cadenas:\n" +" \n" +" -z CADENA Verdadero si la cadena está vacía.\n" +" \n" +" -n CADENA\n" +" CADENA Verdadero si la cadena no está vacía.\n" +" \n" +" CADENA1 = CADENA2\n" +" Verdadero si las cadenas son iguales.\n" +" CADENA1 != CADENA2\n" +" Verdadero si las cadenas no son iguales.\n" +" CADENA1 < CADENA2\n" +" Verdadero si STRING1 se ordena antes que STRING2\n" +" lexicográficamente.\n" +" CADENA1 > CADENA2\n" +" Verdadero si STRING1 se ordena después que STRING2\n" +" lexicográficamente.\n" +" \n" +" Otros operadores:\n" +" \n" +" -o OPCIÓN Verdadero si la opción del shell OPCIÓN está activada.\n" +" -v VAR Verdadero si la variable de shell VAR está activada.\n" +" -R VAR Verdadero si la variable VAR está activada y es una\n" +" referencia de nombre\n" +" ! EXPR Verdadero si expr es falso.\n" +" EXPR1 -a EXPR2 Verdadero si expr1 Y expr2 son ambas verdaderas.\n" +" EXPR1 -o EXPR2 Verdadero si cualquiera de expr1 O expr2 es verdadera.\n" +" \n" +" arg1 OP arg2 Pruebas aritméticas. OP es uno de -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Los operadores binarios aritméticos devuelven verdadero si ARG1 es\n" +" igual, no igual, menor, menor o igual, mayor, mayor o igual que ARG2.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto si EXPR evalúa a verdadero; falla si EXPR evalúa a\n" +" falso o se proporciona un argumento inválido." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Evalúa una expresión condicional.\n" +" \n" +" Este es un sinónimo para la orden interna \"test\", pero el último\n" +" argumento debe ser un `]' literal, que concuerde con el `[' inicial." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Muestra los tiempos de proceso.\n" +" \n" +" Muestra los tiempos de usuario y sistema acumulados por el shell y " +"todos\n" +" sus procesos hijos.\n" +" \n" +" Estado de Salida:\n" +" Siempre correcto." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Atrapa señales y otros eventos.\n" +" \n" +" Define y activa manejadores para ejecutar cuando el shell recibe " +"señales\n" +" u otras condiciones.\n" +" \n" +" ARG es una orden para leer y ejecutar cuando el shell recibe la(s)\n" +" señal(es) ID_SEÑAL. Si ARG no está presente (y sólo se proporciona\n" +" una sola ID_SEÑAL) o se proporciona `-', cada señal especificada se\n" +" reestablece a su valor original. Si ARG es la cadena nula, el shell\n" +" y las órdenes que invoque ignoran cada ID_SEÑAL.\n" +" \n" +" Si una ID_SEÑAL es EXIT (0) se ejecuta la orden ARG al salir del shell.\n" +" Si una ID_SEÑAL es DEBUG, se ejecuta ARG después de cada orden simple.\n" +" Si una ID_SEÑAL es RETURN, se ejecuta ARG cada vez que una función de\n" +" shell o un script ejecutado por las órdenes internas . o source termina\n" +" su ejecución. Una ID_SEÑAL de ERR conlleva que se ejecute ARG cada vez\n" +" que un fallo de una orden provocaría que el shell terminase si la\n" +" opción -e está activada.\n" +" \n" +" Si no se proporcionan argumentos, trap muestra la lista de órdenes\n" +" asociadas con cada señal.\n" +" \n" +" Opciones:\n" +" -l\tmuestra una lista de nombres de señal con su número " +"correspondiente\n" +" -p\tmuestra las órdenes trap asociadas con cada ID_SEÑAL\n" +" \n" +" Cada ID_SEÑAL es un nombre de señal en o un número de señal.\n" +" Los nombres de señal no son sensibles a mayúsculas y minúsculas y el\n" +" prefijo SIG es opcional. Se puede enviar una señal al shell con\n" +" \"kill -signal $$\". \n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que una ID_SEÑAL sea inválida o se " +"proporcione\n" +" una opción inválida." + +# No he visto que este fichero incluya la posibilidad de traducir las +# palabras que muestra `type -t'. Por esta razón, se dejan en inglés. cfuga +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Muestra información sobre el tipo de orden.\n" +" \n" +" Por cada NOMBRE, indica cómo se interpretaría si se utilizara como un\n" +" nombre de orden.\n" +" \n" +" Opciones:\n" +" -a\tmuestra todas las ubicaciones que contienen un ejecutable llamado\n" +" \t\tNOMBRE; incluye aliases, órdenes internas y funciones, si y solo si\n" +" \t\tno se utilizó también la opción `-p'\n" +" -f\tsuprime la búsqueda de funciones de shell\n" +" -P\tfuerza una búsqueda en PATH por cada nombre, aun si hay un alias,\n" +" \t\torden interna o función, y devuelve el nombre del fichero en disco\n" +" \t\tque se ejecutaría\n" +" -p\tdevuelve el nombre del fichero en disco que se ejecutaría,\n" +" \t\to nada si `type -t NOMBRE' no devuelve `fichero'\n" +" -t\tsaca una sola palabra, que es una de entre `alias', `keyword',\n" +" \t\t`function', `builtin', `file' o `', si el NOMBRE es un alias,\n" +" \t\tpalabra reservada del shell, función del shell, orden interna del\n" +" \t\tshell, fichero de disco, o no se encuentra, respectivamente.\n" +" \n" +" Argumentos:\n" +" NOMBRE\tNombre de orden a interpretar.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto si se encuentran todos los NOMBREs; falla si alguno\n" +" no se encuentra." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modifica los límites de recursos del shell.\n" +" \n" +" Provee control sobre los recursos disponibles para el shell y los\n" +" procesos que crea, en sistemas que permiten tal control.\n" +" \n" +" Opciones:\n" +" \n" +" -S\tusa el límite de recurso `soft'\n" +" -H\tusa el límite de recurso `hard'\n" +" -a\tmuestra todos los límites actuales\n" +" -b\tel tamaño del almacenamiento intermedio del `socket'\n" +" -c\tel tamaño máximo de los ficheros `core' creados\n" +" -d\tel tamaño máximo del segmento de datos de un proceso\n" +" -e\tla prioridad máxima de calendarización (`nice')\n" +" -f\tel tamaño máximo de los ficheros escritos por el shell y sus " +"hijos\n" +" -i\tel número máximo de señales pendientes\n" +" -k\tel número máximo de kcolas ubicadas para este proceso\n" +" -l\tel tamaño máximo que un proceso puede bloquear en memoria\n" +" -m\tel tamaño máximo para las variables residentes\n" +" -n\tel número máximo de descriptores de fichero abiertos\n" +" -p\tel tamaño del almacenamiento intermedio para tuberías\n" +" -q\tel tamaño máximo de bytes en las colas de mensajes POSIX\n" +" -r\tla prioridad máxima de calendarización en tiempo real\n" +" -s\tel tamaño máximo de pila\n" +" -t\tla cantidad máxima de tiempo de cpu en segundos\n" +" -u\tel número máximo de procesos de usuario\n" +" -v\tel tamaño de la memoria virtual\n" +" -x\tel número máximo de bloqueos de ficheros\n" +" -P\tel número máximo de pseudoterminales\n" +" -T\tel número máximo de hilos\n" +" \n" +" No todas las opciones están disponibles en todas las plataformas.\n" +" \n" +" Si se establece LÍMITE, éste es el nuevo valor del recurso " +"especificado;\n" +" los valores especiales de LÍMITE `soft', `hard' y `unlimited'\n" +" corresponden al límite suave actual, el límite duro actual, y\n" +" sin límite, respectivamente. De otra forma, se muestra el valor actual\n" +" de los recursos especificados. Si no se proporciona una opción, se\n" +" asume -f.\n" +" \n" +" Los valores son en incrementos de 1024 bytes, excepto para -t, el cual\n" +" es en segundos, -p, el cual es en incrementos de 512 bytes, y -u, el\n" +" cual es un número de procesos sin escala.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o " +"suceda\n" +" un error." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Muestra o establece la máscara de modo de ficheros.\n" +" \n" +" Establece la máscara de creación de ficheros del usuario a MODO. Si se\n" +" omite el MODO, muestra el valor actual de la máscara.\n" +" \n" +" Si el MODO empieza con un dígito, se interpreta como un número octal;\n" +" de otra forma es una cadena de modo simbólico como la que acepta chmod " +"(1).\n" +" \n" +" Opciones:\n" +" -p\tsi se omite el MODO, muestra en una forma reusable como entrada\n" +" -S\tsalida simbólica; de otra forma muestra el modo como número octal\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que el MODO sea inválido o se proporcione\n" +" una opción inválida." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Espera la terminación del trabajo y devuelve el estado de salida.\n" +" \n" +" Espera al proceso identificado por ID, el cual puede ser un ID de\n" +" proceso o una especificación de trabajo e informa de su estado de " +"salida.\n" +" Si no se proporciona un ID, espera a todos los procesos hijos activos,\n" +" y el estado de devolución es cero. Si ID es una especificación de\n" +" trabajo, espera a todos los procesos en la cola de trabajos.\n" +" \n" +" Si se proporciona la opción -n, espera a que termine el siguiente " +"trabajo\n" +" y devuelve su estado de salida.\n" +" \n" +" Si se proporciona la opción -f y el control de trabajos está activado,\n" +" espera a que termine el ID especificado, en vez de esperar a que cambie " +"de\n" +" estado.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de ID; falla si ID es inválido o se proporciona una\n" +" opción inválida." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Espera la terminación del proceso y devuelve el estado de salida.\n" +" \n" +" Espera a cada proceso especificado por un PID y reporta su\n" +" estado de salida. Si no se proporciona un PID, espera a todos los\n" +" procesos hijos activos, y el código de devolución es cero.\n" +" El PID debe ser un ID de proceso.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado del último PID; falla si PID es inválido o se " +"proporciona\n" +" una opción inválida." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ejecuta órdenes por cada miembro en una lista.\n" +" \n" +" El bucle `for' ejecuta una secuencia de órdenes para cada miembro en\n" +" una lista de elementos. Si `in PALABRAS ...;' no está presente,\n" +" entonces se asume `in \"$@\"'. Para cada elemento en PALABRAS,\n" +" se define NOMBRE como ese elemento, y se ejecutan las ÓRDENES.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmétical de bucle for.\n" +" \n" +" Equivalente a\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tÓRDENES\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, y EXP3 son expresiones aritméticas. Si se omite\n" +" cualquiera de ellas, se comporta como si se evaluara a 1.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Selecciona palabras de una lista y ejecuta órdenes.\n" +" \n" +" Se expanden las PALABRAS, generando una lista de palabras. El\n" +" conjunto de palabras expandidas se muestra en la salida de error\n" +" estándar, cada una precedida por un número. Si `in PALABRAS' no\n" +" está presente, se asume `in \"$@\"'. Entonces se muestra el\n" +" prompt PS3 y se lee una línea de la entrada estándar. Si la\n" +" línea consiste en el número correspondiente a una de las palabras\n" +" mostradas, entonces se define NOMBRE como esa palabra. Si la\n" +" línea está vacía, PALABRAS y el prompt se muestran de nuevo. Si\n" +" se lee EOF, se completa la orden. Cualquier otro valor leído\n" +" causa que NOMBRE se defina como nulo. La línea leída se guarda\n" +" en la variable REPLY. Se ejecutan las ÓRDENES después de cada\n" +" selección hasta que se ejecuta una orden break.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Reporta el tiempo consumido por la ejecución de la tubería.\n" +" \n" +" Ejecuta la TUBERÍA y muestra un resumen del tiempo real, el tiempo de\n" +" CPU del usuario, y el tiempo de CPU del sistema utilizado por\n" +" la ejecución de la TUBERÍA cuando termina.\n" +" \n" +" Opciones:\n" +" -p\tmuestra el resumen de tiempos en el formato Posix transportable\n" +" \n" +" Estado de Salida:\n" +" El estado de devolución es el estado de devolución de la TUBERÍA." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ejecuta órdenes en base a la coincidencia de patrones.\n" +" \n" +" Ejecuta ÓRDENES selectivamente basado en coincidencias de la PALABRA\n" +" con el PATRÓN. Se utiliza `|' para separar patrones múltiples.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ejecuta comandos en base a condicionales.\n" +" \n" +" Se ejecuta la lista `if ÓRDENES'. Si su estado de salida es cero,\n" +" entonces se ejecuta la lista `then ÓRDENES`. De otra forma, cada lista\n" +" `elif ÓRDENES' se ejecuta en su lugar, y si su estado de salida es " +"cero,\n" +" se ejecuta la lista `then ÓRDENES' correspondiente y se completa la\n" +" orden if. De otra forma, se ejecuta la lista `else ÓRDENES', si está\n" +" presente. El estado de salida del bloque entero es el estado saliente\n" +" de la última orden ejecutada, o cero si ninguna condición resultó\n" +" verdadera.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ejecuta órdenes mientras una prueba sea correcta.\n" +" \n" +" Expande y ejecuta ÓRDENES mientras la orden final en las ÓRDENES\n" +" `while' tenga un estado de salida de cero.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ejecuta órdenes mientras una prueba sea correcta.\n" +" \n" +" Expande y ejecuta ÓRDENES mientras la orden final en las ÓRDENES\n" +" `until' tengan un estado de salida que no sea cero.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Crea un coproceso llamado NOMBRE.\n" +" \n" +" Ejecuta la ORDEN asíncronamente, con la salida y la entrada estándar\n" +" de la orden conectadas a través de una tubería a los descriptores\n" +" de fichero asignados a los índices 0 y 1 de una variable de matriz\n" +" NOMBRE en el shell en ejecución. El nombre por defecto es\n" +" \"COPROC\".\n" +" \n" +" Estado de Salida:\n" +" La orden «coproc» devuelve un estado de salida de 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Define una función de shell.\n" +" \n" +" Crea una función de shell llamada NOMBRE. Cuando se invoca como una\n" +" orden simple, NOMBRE ejecuta ORDENes en el contexto del shell\n" +" que lo llamó. Cuando se invoca NOMBRE, los argumentos se pasan a la\n" +" función como $1...$n, y el nombre de la función está en $FUNCNAME.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que NOMBRE sea de sólo lectura." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Agrupa órdenes como una unidad.\n" +" \n" +" Ejecuta un conjunto de órdenes en un grupo. Esta es una\n" +" forma de redirigir un conjunto completo de órdenes.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado de la última orden ejecutada." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Reinicia el trabajo en primer plano.\n" +" \n" +" Equivalente al argumento IDTRABAJO de la orden `fg'. Reinicia un\n" +" trabajo detenido o en segundo plano. IDTRABAJO puede especificar\n" +" un nombre de trabajo o un número de trabajo. Un `&' a continuación\n" +" de IDTRABAJO coloca a el trabajo en segundo plano, como si la\n" +" especificación del trabajo se hubiera proporcionado como\n" +" un argumento de `bg'.\n" +" \n" +" Estado de Salida:\n" +" Devuelve el estado del trabajo reiniciado." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Evalúa una expresión aritmética.\n" +" \n" +" Se evalua la EXPRESIÓN de acuerdo a las reglas de evaluación\n" +" aritmética. Equivalente a \"let EXPRESIÓN\".\n" +" \n" +" Estado de Salida:\n" +" Devuelve 1 si la EXPRESIÓN evalúa a 0; devuelve 0 de otra manera." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Ejecuta una orden condicional.\n" +" \n" +" Devuelve un estado de 0 ó 1 dependiendo de la evaluación de la " +"expresión\n" +" condicional EXPRESIÓN. Las expresiones se componen de los mismos\n" +" elementos primarios usados por la orden interna `test', y se pueden\n" +" combinar usando los siguientes operadores:\n" +" \n" +" ( EXPRESIÓN )\tDevuelve el valor de la EXPRESIÓN\n" +" ! EXPRESIÓN\t\tVerdadero si la EXPRESIÓN es falsa; de otra forma es " +"falso\n" +" EXPR1 && EXPR2\tVerdadero si EXPR1 y EXPR2 son verdaderos; de\n" +" \t\totra forma es falso\n" +" \tEXPR1 || EXPR2\tVerdadero si EXPR1 o EXPR2 es verdadero; de\n" +" \t\totra forma es falso\n" +" \n" +" Cuando se usan los operadores `==' y `!=', se usa la cadena a la\n" +" derecha del operador como un patrón y se realiza una coincidencia de\n" +" patrones. Cuando se usa el operador `=~', la cadena a la derecha del\n" +" operador coincide como una expresión regular.\n" +" \n" +" Los operadores && y || no evalúan EXPR2 si EXPR1 es suficiente para\n" +" determinar el valor de una expresión. \n" +" Estado de Salida:\n" +" 0 o 1 dependiendo del valor de la EXPRESIÓN." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Nombres de variables de shell comunes y su uso.\n" +" \n" +" BASH_VERSION\tInformación de versión para este Bash.\n" +" CDPATH\tUna lista de directorios separada por dos puntos\n" +" \t\tpara buscar directorios dados como argumentos para `cd'.\n" +" GLOBIGNORE\tUna lista de patrones separada por dos puntos\n" +" \t\tque describe nombres de fichero a ignorar por la expansión\n" +" \t\tde rutas de nombre.\n" +" HISTFILE\tEl nombre del fichero donde se almacena su historia\n" +" \t\tde órdenes.\n" +" HISTFILESIZE\t El número máximo de líneas que puede contener\n" +" \t\teste fichero.\n" +" HISTSIZE\t El número máximo de líneas de historia que un shell\n" +" \t\ten ejecución puede acceder.\n" +" HOME\tLa ruta completa a su directorio de entrada.\n" +" HOSTNAME\tEl nombre del anfitrión actual.\n" +" HOSTTYPE\tEl tipo de CPU bajo el cual se ejecuta esta versión\n" +" \t\tde Bash.\n" +" IGNOREEOF\tControla la acción del shell al recibir un carácter\n" +" \t\tFDL como la única entrada. Si está definida, entonces su\n" +" \t\tvalor es el número de caracteres FDL que se deben leer de\n" +" \t\tforma consecutiva en una línea vacía antes de que el shell\n" +" \t\ttermine (por defecto 10). Cuando no está definida, EOF\n" +" \t\tsignifica el fin de la entrada.\n" +" MACHTYPE\tUna cadena que describe el sistema actual donde se\n" +" \t\tejecuta Bash.\n" +" MAILCHECK\tLa frecuencia, en segundos, que Bash busca correo nuevo.\n" +" MAILPATH\tUna lista de nombres de ficheros separada por dos puntos\n" +" \t\ten la cual Bash busca correo nuevo.\n" +" OSTYPE\tla versión de Unix en la que se ejecuta esta versión\n" +" \t\tde Bash.\n" +" PATH\tUna lista de directorios separada por dos puntos en la que\n" +" \t\tse buscan órdenes.\n" +" PROMPT_COMMAND\tUna orden a ejecutar antes de mostrar cada prompt\n" +" \t\tprimario.\n" +" PS1\t\tLa cadena primaria de prompt.\n" +" PS2\t\tLa cadena secundaria de prompt.\n" +" PWD\t\tLa ruta completa del directorio actual.\n" +" SHELLOPTS\tUna lista separada por dos puntos de las opciones\n" +" \t\tde shell activadas.\n" +" TERM\tEl nombre del tipo actual de terminal.\n" +" TIMEFORMAT\tEl formato de salida para las estadísticas de tiempo\n" +" \t\tmostradas por la palabra reservada `time'.\n" +" auto_resume\tSi no es nulo significa que una palabra de orden\n" +" \t\tque aparece en una línea por sí sola se busca primero en la lista\n" +" \t\tactual de trabajos detenidos. Si se encuentra ahí, esetrabajo\n" +" \t\tse coloca en primer plano. Un valor `exact' significa que la\n" +" \t\tpalabra de orden debe coincidir exactamente con una\n" +" \t\torden de la lista de trabajos detenidos. Un valor\n" +" \t\t`substring' significa que la palabra de orden debe coincidir\n" +" \t\tcon una subcadena del trabajo. Cualquier otro valor significa\n" +" \t\tque la orden debe ser un prefijo de un trabajo detenido.\n" +" histchars\tLos caracteres que controlan la expansión de historia\n" +" \t\ty la sustitución rápida. El primer carácter es el carácter de\n" +" \t\tsustitución de historia, generalmente `!'. El segundo es el\n" +" \t\tcarácter de `sustitución rápida', generalmente `^'. El tercero\n" +" \n" +" \t\tes el carácter `comentario de historia', generalmente `#'.\n" +" HISTIGNORE\tUna lista separada por dos puntos de patrones\n" +" \t\tutilizados para decidir qué órdenes se deben guardar en\n" +" \t\tel listado histórico.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Agrega directorios a la pila.\n" +" \n" +" Agrega un directorio por la parte superior de la pila de directorios\n" +" o rota la pila, haciendo que el nuevo elemento superior de la pila sea " +"el\n" +" directorio de trabajo actual. Sin argumentos, intercambia\n" +" los dos directorios de la parte superior.\n" +" \n" +" Opciones:\n" +" -n\tsuprime el cambio normal de directorio cuando se agregan\n" +" \t\tdirectorios a la pila, así sólo se manipula la pila.\n" +" \n" +" Argumentos:\n" +" +N\tRota la pila para que el N-ésimo directorio (contando\n" +" \t\tdesde la izquierda de la lista mostrada por `dirs', comenzando\n" +" \t\tdesde cero) esté en la parte superior.\n" +" \n" +" -N\tRota la pila para que el N-ésimo directorio (contando desde\n" +" \t\tla derecha de la lista mostrada por `dirs', comenzando\n" +" \t\tdesde cero) esté en la parte superior.\n" +" \n" +" dir\tAgrega DIR la pila de directorios por la parte superior, " +"haciendo\n" +" \t\tde él el nuevo directorio de trabajo actual.\n" +" \n" +" La orden interna `dirs' muestra la pila de directorios.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione un argumento\n" +" inválido o falle el cambio de directorio." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Borra directorios de la pila.\n" +" \n" +" Borra entradas de la pila de directorios. Sin argumentos,\n" +" borra el directorio del tope de la pila, y cambia al nuevo\n" +" directorio tope.\n" +" \n" +" Opciones:\n" +" -n\tSuprime el cambio normal de directorio cuando se borran\n" +" \t\tdirectorios de la pila; así sólo se manipula la pila.\n" +" \n" +" Argumentos:\n" +" \n" +" +N\tBorra la N-ésima entrada contando desde la izquierda de\n" +" \t\tla lista mostrada por `dirs', comenzando por cero. Por\n" +" \t\tejemplo: `popd +0' borra el primer directorio, `popd +1'\n" +" \t\tel segundo.\n" +" \n" +" -N\tBorra la N-ésima entrada contando desde la derecha de\n" +" \t\tla lista mostrada por `dirs', comenzando por cero. Por\n" +" \t\tejemplo: `popd -0' borra el último directorio, `popd -1'\n" +" \t\tel penúltimo.\n" +" \n" +" La orden interna `dirs' muestra la pila de directorios.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione un\n" +" argumento inválido o falle el cambio de directorio." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Muestra la pila de directorios.\n" +" \n" +" Muestra la lista de directorios actualmente grabados. Los directorios\n" +" se guardan en la lista con la orden `pushd'; pueden ir saliendo de\n" +" la lista con la orden `popd'.\n" +" \n" +" Opciones:\n" +" -c\tlimpia la pila de directorios, eliminando todos sus elementos.\n" +" -l\tno muestra versiones con prefijo de tilde de los directorios\n" +" \t\trelativos a su directorio inicial.\n" +" -p\tmuestra la pila de directorios con una entrada por línea\n" +" -v\tmuestra la pila de directorios con una entrada por línea con\n" +" \t\tsu posición en la pila como prefijo\n" +" \n" +" Argumentos:\n" +" +N\tmuestra la N-ésima entrada contando desde\n" +" \t\tla izquierda de la lista mostrada por dirs cuando se invoca sin\n" +" \t\topciones, empezando de cero.\n" +" \n" +" -N\tmuestra la N-ésima entrada contando desde la izquierda de la\n" +" \t\tlista mostrada por dirs cuando se invoca sin opciones, empezando\n" +" \t\tdesde cero.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto, a menos que se proporcione una opción inválida o\n" +" suceda un error." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Activa y desactiva opciones de shell.\n" +" \n" +" Cambia la configuración de cada opción de shell NOMBRE_OPCIÓN. Sin\n" +" ninguna opción como argumento, muestra cada NOMBRE_OPCIÓN\n" +" proporcionado o todas las opciones de shell si no se especifica\n" +" ningún NOMBRE_OPCIÓN, con una indicación de si está activa o no\n" +" cada una.\n" +" \n" +" Opciones:\n" +" -o\trestringe NOMBRE_OPCIÓN a aquellos definidos con `set -o'\n" +" -p\tmuestra cada opción de shell con un indicador de su estado\n" +" -q\tsuprime la salida\n" +" -s\tactiva (establece) cada NOMBRE_OPCIÓN\n" +" -u\tdesactiva (borra) cada NOMBRE_OPCIÓN\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto si se activa NOMBRE_OPCIÓN; falla si se proporciona\n" +" una opción inválida o NOMBRE_OPCIÓN está desactivado." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Da formato y muestra ARGUMENTOS bajo el control del FORMATO.\n" +" \n" +" Opciones:\n" +" -v var\tasigna la salida a la variable de shell VAR en lugar\n" +" \t\tde mostrarla en la salida estándar\n" +" \n" +" FORMATO es una cadena de caracteres la cual contiene tres tipos de\n" +" objetos: caracteres simples, los cuales solamente se copian a la salida\n" +" salida estándar; secuencias de escape de caracteres, las cuales\n" +" se convierten y se copian a la salida estándar; y especificaciones de\n" +" formato, cada una de las cuales causa la muestra del siguiente " +"argumento\n" +" consecutivo.\n" +" \n" +" Además de las especificaciones de formato estándar descritas en\n" +" printf(1) y printf(3), printf interpreta:\n" +" \n" +" %b\texpande las secuencias de escape de barra invertida en\n" +" el argumento correspondiente\n" +" %q\tcita el argumento de tal forma que se pueda reutilizar como\n" +" entrada del shell.\n" +" %(fmt)T muestra la cadena fecha hora resultante de usar FMT como\n" +" una cadena de formato para strftime(3)\n" +" \n" +" El formato se reutiliza según sea necesario para consumir todos los\n" +" argumentos. Si hay menos argumentos de los que el formato requiere,\n" +" las especificaciones de formato adicionales se comportan como si un " +"valor\n" +" cero o una cadena nula, lo que sea apropiado, se hubiera proporcionado.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" suceda un error de escritura o de asignación." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Especifica cuántos argumentos deben ser completados por Readline.\n" +" \n" +" Por cada NOMBRE, especifica cuántos argumentos se deben completar. Si\n" +" no se proporcionan opciones, se muestran las especificaciones de\n" +" completado existentes en una forma que permite que se reusen como " +"entrada.\n" +" \n" +" Opciones:\n" +" -p\tmuestra las especificaciones de completado existentes en formato\n" +" \t\treusable\n" +" -r\tborra una especificación de completado para cada NOMBRE o,\n" +" \t\tsi no se proporcionan NOMBREs, todas las especificaciones\n" +" \t\tde completado\n" +" -D\taplica los completados y acciones por defecto para las órdenes\n" +" \t\tsin ninguna especificación de completado definida\n" +" -E\taplica los completados y acciones para órdenes \"vacías\" --\n" +" \t\tcuando se intenta completar en una línea en blanco\n" +" -I\taplica los completados a acciones a la palabra incial " +"(habitualmente\n" +" \t\tla orden)\n" +" \n" +" Cuando se intenta el completado, las acciones se aplican en el orden\n" +" en que se listan las opciones de letra mayúscula antes indicadas. Si " +"se\n" +" proporcionan varias opciones, la opción -D tiene precedencia sobre -E " +"y,\n" +" ambas, sobre -I.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" suceda un error." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Muestra los posibles complementos dependiendo de las opciones.\n" +" \n" +" Sirve para usarse desde una función de shell que genere complementos\n" +" posibles. Si se proporciona el argumento opcional PALABRA, se generan\n" +" las coincidencias contra PALABRA.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" suceda un error." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modifica o muestra las opciones de completado.\n" +" \n" +" Modifica las opciones de completado para cada NOMBRE, o, si no se\n" +" proporcionan NOMBREs, el completado actualmente en ejecución. Si no\n" +" se proporcionan OPCIONes, muestra las opciones de completado para\n" +" cada NOMBRE o la especificación de completado actual.\n" +" \n" +" Opciones:\n" +" \t-o opción\tEstablece la opción de completado OPCIÓN para cada NOMBRE\n" +" \t-D\t\tCambia las opciones para el completado de orden \"por defecto\"\n" +" \t-E\t\tCambia las opciones para el completado de orden \"vacía\"\n" +" \t-I\t\tCambia las opciones para el completado en la palabra inicial\n" +" \n" +" Si se usa `+o' en lugar de `-o', desactiva la opción especificada.\n" +" \n" +" Argumentos:\n" +" \n" +" Cada NOMBRE se refiere a una orden para la cual se definió previamente\n" +" una especificación de completado usando la orden interna `complete'.\n" +" Si no se proporcionan NOMBREs, se debe llamar a ‘compopt’ desde una\n" +" función que genere completados actualmente y se modifican las opciones\n" +" para ese generador de completados actualmente en ejecución.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" NOMBRE no tenga una especificación de completado definida." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Lee líneas de un fichero y las guarda en una variable de matriz indexada.\n" +" \n" +" Lee líneas de la entrada estándar y las guarda en la variable de matriz\n" +" indexada MATRIZ, o desde el descriptor de fichero DF si se proporciona\n" +" la opción -u. La variable MAPFILE es la MATRIZ por defecto.\n" +" \n" +" Opciones:\n" +" -d delim\tUtiliza DELIM para finalizar las líneas en lugar de nueva " +"línea\n" +" -n cuenta\tCopia hasta CUENTA líneas. Si CUENTA es 0, se copian " +"todas\n" +" -O origen\tComienza a asignar a MATRIZ en el índice ORIGEN. El\n" +" \t\t\tíndice por defecto es 0.\n" +" -s cuenta\tDescarta las primeras CUENTA líneas leídas.\n" +" -t\tBorra el DELIM final de cada línea leída (nueva línea por " +"defecto).\n" +" -u df\tLee líneas del descriptor de fichero DF en lugar de la\n" +" \t\t\tentrada estándar.\n" +" -C llamada\tEvalúa LLAMADA cada vez que se leen QUANTUM líneas.\n" +" -c quantum\tEspecifica el número de líneas a leer entre cada\n" +" \t\t\tllamada a LLAMADA.\n" +" \n" +" Argumentos:\n" +" MATRIZ\tNombre de variable de matriz a usar para guardar datos.\n" +" \n" +" Si se proporciona -C sin -c, el quantum por defecto es 5000. Cuando\n" +" se evalúa LLAMADA, se proporciona el índice del siguiente elemento\n" +" de la matriz a asignar como un argumento adicional.\n" +" \n" +" Si no se proporciona un origen explícito, mapfile borrará la MATRIZ\n" +" antes de usarla para asignación.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" la MATRIZ sea de sólo lectura o no sea una matriz indexada." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Lee líneas de un fichero en una variable de matriz.\n" +" \n" +" Sinónimo de `mapfile'." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Devuelve el contexto de la llamada a subrutina actual.\n" +#~ " \n" +#~ " Sin EXPR, devuelve " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: el proceso %5ld (%s) en the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Señal Desconocida #" diff --git a/bash-5.1/po/et.gmo b/bash-5.1/po/et.gmo new file mode 100644 index 0000000000000000000000000000000000000000..c0181254887b6a0aa67d8e4ec6a7766316e8dd71 Binary files /dev/null and b/bash-5.1/po/et.gmo differ diff --git a/bash-5.1/po/et.po b/bash-5.1/po/et.po new file mode 100644 index 0000000000000000000000000000000000000000..58f0e27e4c20327f2b001e5cbb7c18e3c47ec4fe --- /dev/null +++ b/bash-5.1/po/et.po @@ -0,0 +1,4277 @@ +# Estonian translations for GNU bash. +# Copyright (C) 2001 Free Software Foundation, Inc. +# Toomas Soome , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: bash 3.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2006-11-11 16:38+0200\n" +"Last-Translator: Toomas Soome \n" +"Language-Team: Estonian \n" +"Language: et\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8-bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "vigane massiivi indeks" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" + +#: arrayfunc.c:700 +#, fuzzy, c-format +msgid "%s: invalid associative array key" +msgstr "%s: vigane tegevuse nimi" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: mitte-numbrilisele indeksile ei saa omistada" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: ei saa luua: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: esimine mitte-themik smbol pole `\"'" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "sulgev `%c' puudub %s sees" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: puudub eraldav koolon" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': ei saa lahti siduda" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, fuzzy, c-format +msgid "`%s': invalid alias name" +msgstr "%s: vigane tegevuse nimi" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: ei saa lugeda: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': tundmatu funktsiooni nimi" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s ei ole seotud hegi klahviga.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s saab kasutada lbi " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': ei saa lahti siduda" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "omab mtet ainult `for', `while' vi `until' tsklis" + +#: builtins/caller.def:136 +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME pole seatud" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "liiga palju argumente" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "teist kataloogi pole" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD pole seatud" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "" + +#: builtins/common.c:134 error.c:264 +#, fuzzy, c-format +msgid "warning: " +msgstr "%s: hoiatus: " + +#: builtins/common.c:148 +#, fuzzy, c-format +msgid "%s: usage: " +msgstr "%s: hoiatus: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: vti nuab argumenti" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: nutakse numbrilist argumenti" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: ei leitud" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: vigane vti" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: vigane vtme nimi" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': ei ole lubatud identifikaator" + +#: builtins/common.c:240 +#, fuzzy +msgid "invalid octal number" +msgstr "vigane signaali number" + +#: builtins/common.c:242 +#, fuzzy +msgid "invalid hex number" +msgstr "vigane number" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "vigane number" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: vigane signaali spetsifikatsioon" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': ei ole pid ega korrektne t spetsifikatsioon" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: mittemuudetav muutuja" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s on piiridest vljas" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s on piiridest vljas" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: sellist td pole" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: tkontroll puudub" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "tkontroll puudub" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: piiratud" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "piiratud" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ei ole siseksk" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "kirjutamise viga: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: segane t" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ei saa eemaldada: %s on ainult lugemiseks" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ei saa eemaldada" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: vigane tegevuse nimi" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "hoiatus: vti -F ei pruugi ttada nagu te ootate" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "hoiatus: vti -C ei pruugi ttada nagu te ootate" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "saab kasutada ainult funktsioonis" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "vtit `-f' ei saa funktsiooni loomiseks kasutada" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funktsioon ei ole muudetav" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: masiivi muutujaid ei saa nii kustutada" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dnaamilist laadimist et saa kasutada" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "jagatud objekti %s ei saa avada: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "%s puudub jagatud objektis %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: pole dnaamiliselt laetud" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: pole dnaamiliselt laetud" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: ei saa kustutada: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: on kataloog" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ei ole tavaline fail" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: fail on liiga suur" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: kahendfaili ei nnestu kivitada" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: ei saa kivitada: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "pole login shell: kasutage `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Teil on peatatud tid.\n" + +#: builtins/exit.def:123 +#, fuzzy, c-format +msgid "There are running jobs.\n" +msgstr "Teil on peatatud tid.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "ksku ei ole" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: ajutist faili ei saa avada: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: lubamatu vti -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: vti nuab argumenti -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "" + +#: builtins/hash.def:267 +#, fuzzy, c-format +msgid "hits\tcommand\n" +msgstr "viimane ksklus: %s\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "" +msgstr[1] "" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: ei saa avada: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: vigane vtme nimi" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "" + +#: builtins/inlib.def:71 +#, fuzzy, c-format +msgid "%s: inlib failed" +msgstr "%s: vigane teenus" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Tundmatu viga" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "oodati avaldist" + +#: builtins/mapfile.def:178 +#, fuzzy, c-format +msgid "%s: not an indexed array" +msgstr "%s: pole massiiv" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, fuzzy, c-format +msgid "%s: invalid line count" +msgstr "%s: vigane vti" + +#: builtins/mapfile.def:299 +#, fuzzy, c-format +msgid "%s: invalid array origin" +msgstr "%s: vigane vti" + +#: builtins/mapfile.def:316 +#, fuzzy, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: vigane tegevuse nimi" + +#: builtins/mapfile.def:349 +#, fuzzy +msgid "empty array variable name" +msgstr "%s: pole massiiv" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "" + +#: builtins/printf.def:474 +#, fuzzy, c-format +msgid "`%c': invalid time format specification" +msgstr "%s: vigane signaali spetsifikatsioon" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "" + +#: builtins/printf.def:702 +#, fuzzy, c-format +msgid "warning: %s: %s" +msgstr "%s: hoiatus: " + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "teist kataloogi pole" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: vigane number" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "viga lugemisel: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: pole massiiv" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ei ole funktsioon" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: ei saa eemaldada" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift arv" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: faili ei ole" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "peatamine ei nnestu" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "login shelli ei saa peatada" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s on shelli vtmesna\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s: on funktsioon\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s on shelli siseksk\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s on shelli siseksk\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s on %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': halb ksklus" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: ei nnestu lugeda piirangut: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: ei nnestu muuta piirangut: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "kaheksandnumber" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr "" + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "viimane ksklus: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Katkestan..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "tundmatu viga ksus" + +#: error.c:463 +msgid "bad command type" +msgstr "" + +#: error.c:464 +msgid "bad connector" +msgstr "" + +#: error.c:465 +msgid "bad jump" +msgstr "" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: sidumata muutuja" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +#, fuzzy +msgid "pipe error" +msgstr "kirjutamise viga: %s" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: piiratud: kskudes ei saa kasutada smboleid `/'" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: ksku ei ole" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: halb interpretaator" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: kahendfaili ei nnestu kivitada" + +#: execute_cmd.c:5977 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s on shelli siseksk\n" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "avaldise rekursioon on liiga sgav" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "sntaksi viga avaldises" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "ritati omistada mitte-muutujale" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "sntaksi viga avaldises" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "nulliga jagamine" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "eksponent on viksem kui 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "puudub `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "sntaksi viga: oodati operandi" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "sntaksi viga: vigane aritmeetiline operaator" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "vigane aritmeetiline baas" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: vigane vti" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "vrtus on baasiks liiga suur" + +#: expr.c:1647 +#, fuzzy, c-format +msgid "%s: expression error\n" +msgstr "%s: oodati tisarvude avaldist" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: vanemkataloogidele ei ole juurdepsu" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: pid puudub" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "" + +#: jobs.c:1892 +msgid "Running" +msgstr "" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr "" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: t %d on peatatud" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: sellist td pole" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: t on lpetatud" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: t %d on juba taustal" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +#: jobs.c:4320 +#, fuzzy, c-format +msgid "%s: line %d: " +msgstr "%s: hoiatus: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr "" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +#, fuzzy +msgid "unknown" +msgstr "%s: tundmatu masin" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:1141 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "vigane baas" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: tundmatu masin" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: vigane teenus" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Teil on kiri kaustas $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Teil on uus kiri kaustas $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Kiri kaustas %s on loetud\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "sntaksi viga: nutakse aritmeetilist avaldist" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "sntaksi viga: ootamatu `;'" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "sntaksi viga: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "sntaksi viga tingimuslikus avaldises" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "ootamatu mrk `%s', oodati `)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "oodati `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "sntaksi viga kohal `%s'" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "sntaksi viga: ootamatu faililpp" + +#: parse.y:6365 +msgid "syntax error" +msgstr "sntaksi viga" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Ksuinterpretaatorist vljumiseks kasutage \"%s\".\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "faili deskriptor on piiridest vljas" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: segane mbersuunamine" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: fail on olemas, ei kirjuta le" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: piiratud: vljundit ei saa mber suunata" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "" + +#: redir.c:222 +#, fuzzy, c-format +msgid "%s: cannot assign fd to variable" +msgstr "$%s: sedasi ei saa omistada" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "viga mbersuunamisel: fd duplikaadi loomine ei nnestu" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "/tmp puudub, palun looge see!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp peab olema kataloogi nimi" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: vigane vti" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: on kataloog" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Mul ei ole nime!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Kasuta:\t%s [GNU pikk vti] [vti] ...\n" +"\t%s [GNU pikk vti] [vti] skript-fail ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU pikad vtmed:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Ksuinterpretaatori vtmed:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD vi -c ksklus vi -O lhivti\t\t(ainult kivitamine)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s vi -o vti\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Vigadest teatamiseks kasutage ksku `bashbug'.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: vigane operatsioon" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "" + +#: siglist.c:50 +msgid "Hangup" +msgstr "" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "" + +#: siglist.c:58 +msgid "Quit" +msgstr "" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "" + +#: siglist.c:86 +msgid "Killed" +msgstr "" + +#: siglist.c:90 +#, fuzzy +msgid "Bus error" +msgstr "sntaksi viga" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "" + +#: siglist.c:110 +msgid "Terminated" +msgstr "" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "" + +#: siglist.c:126 +msgid "Continue" +msgstr "" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "" + +#: siglist.c:154 +msgid "File limit" +msgstr "" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "" + +#: siglist.c:166 +msgid "Window changed" +msgstr "" + +#: siglist.c:170 +msgid "Record lock" +msgstr "" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "" + +#: siglist.c:198 +msgid "programming error" +msgstr "" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "" + +#: siglist.c:214 +msgid "Information request" +msgstr "" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: vigane vti" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "%s: vigane tegevuse nimi" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameeter on null vi pole seatud" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameeter on null vi pole seatud" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: halb asendus" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: sedasi ei saa omistada" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" + +#: subst.c:10367 +#, fuzzy, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "sulgev `%c' puudub %s sees" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "ei leitud: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "oodati argumenti" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: oodati tisarvude avaldist" + +#: test.c:265 +msgid "`)' expected" +msgstr "oodati `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "oodati `)', saadi %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: eeldati binaarset operaatorit" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: eeldati unaarset operaatorit" + +#: test.c:881 +msgid "missing `]'" +msgstr "puudub `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "sntaksi viga: ootamatu `;'" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "vigane signaali number" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: halb vrtus muutujas trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signaali ksitleja on SIG_DFL, saadan %d (%s) iseendale" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: vigane signaal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "shelli tase (%d) on liiga krge, kasutan vrtust 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: praegune skoop pole funktsiooni kontekst" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: praegune skoop pole funktsiooni kontekst" + +#: variables.c:4771 +#, fuzzy, c-format +msgid "%s has null exportstr" +msgstr "%s: parameeter on null vi pole seatud" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: pole global_variables kontekst" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" + +#: variables.c:6387 +#, fuzzy, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: ei saa avada: %s" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "" + +#: variables.c:6437 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s on piiridest vljas" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Autoriigus 2006 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:95 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: ei saa luua: %s" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:167 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: ei saa luua: %s" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" + +#: builtins.c:56 +msgid "break [n]" +msgstr "" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "" + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" + +#: builtins.c:140 +msgid "return [n]" +msgstr "" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "" + +#: builtins.c:150 +#, fuzzy +msgid "shift [n]" +msgstr "shift arv" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "" + +#: builtins.c:154 +#, fuzzy +msgid ". filename [arguments]" +msgstr "liiga palju argumente" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "" + +#: builtins.c:208 +#, fuzzy +msgid "(( expression ))" +msgstr "oodati avaldist" + +#: builtins.c:210 +#, fuzzy +msgid "[[ expression ]]" +msgstr "oodati avaldist" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" + +#: builtins.c:235 +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +#: builtins.c:1726 +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" + +#, fuzzy +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "Tagastab jooksva alamprotseduuri konteksti." + +#~ msgid " " +#~ msgstr " " + +#~ msgid "freed" +#~ msgstr "vabastatud" diff --git a/bash-5.1/po/fi.gmo b/bash-5.1/po/fi.gmo new file mode 100644 index 0000000000000000000000000000000000000000..31ddbe4522e8b95c95b5120bc5edf01562d8b747 Binary files /dev/null and b/bash-5.1/po/fi.gmo differ diff --git a/bash-5.1/po/fi.po b/bash-5.1/po/fi.po new file mode 100644 index 0000000000000000000000000000000000000000..6d13f2d309b56a683827fcea073f55932826d89b --- /dev/null +++ b/bash-5.1/po/fi.po @@ -0,0 +1,5898 @@ +# Finnish translation for bash-4.0 +# Copyright (C) 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash-4.0 package. +# +# Pekka Niemi, 2009. +# Pekka Niemi , 2009. +# $Id: bash-4.0.fi.po 38 2009-05-09 12:21:42Z pen $ +msgid "" +msgstr "" +"Project-Id-Version: bash-4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2009-05-09 15:13+0300\n" +"Last-Translator: Pekka Niemi \n" +"Language-Team: Finnish \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 0.3\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "virheellinen taulukkoindeksi" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: indeksoitua taulukkoa ei voi muuttaa assosiatiiviseksi" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: virheellinen assosiatiivinen indeksi" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: ei voida sijoittaa epänumeeriseen indeksiin" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" +"%s: %s: assosiatiiviseen taulukkoon sijoitettaessa täytyy käyttää " +"avainindeksiä" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: ei voida luoda: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: komennolle ei löydy näppäinkarttaa" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: ensimmäinen ei-tyhjä merkki ei ole ”\"”" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "ei loppumerkkiä ”%c” rivissä %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: puuttuva kaksoispiste-erotin" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "”%s”: ei voida irrottaa" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, fuzzy, c-format +msgid "`%s': invalid alias name" +msgstr "”%s”: virheellinen näppäinkartan nimi" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "rivieditointi ei ole käytössä" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "”%s”: virheellinen näppäinkartan nimi" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: ei voida lukea: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "”%s”: tuntematon funktio" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s ei ole sidottu mihinkään näppäimeen.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s voidaan käynnistää näppäinkomennolla " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "”%s”: ei voida irrottaa" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "toistolaskuri" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "voidaan käyttää vain ”for”-, ”while”- tai ”until”-silmukoissa" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Palauta tämänhetkisen alirutiinikutsun konteksti.\n" +" \n" +" Ilman parametria, palauttaa ”$line $filename”. Parametrilla palauttaa \n" +" ”$line $subroutine $filename”; saatua lisätietoa voidaan käyttää " +"kutsupinon\n" +" kuvaamiseksi.\n" +" \n" +" Parametrin arvo määrää, montako kutsukehystä taaksepäin siirrytään; \n" +" ylin kehys on numero 0.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa 0 ellei komentotulkki ole funktion ulkopuolella tai parametri\n" +" on virheellinen." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME-ympäristömuuttujaa ei ole asetettu" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "liian monta argumenttia" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "ei toista hakemistoa" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD-ympäristömuuttujaa ei ole asetettu" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "rivi %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "varoitus: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: käyttö: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: valitsin vaatii argumentin" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: vaaditaan numeerinen argumentti" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: ei löytynyt" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: virheellinen valitsin" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: virheellinen valitsimen nimi" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "”%s”: virheellinen tunniste" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "virheellinen oktaaliluku" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "virheellinen heksadesimaaliluku" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "virheellinen luku" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: virheellinen signaalimääritys" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "”%s”: ei ole prosessitunnus eikä kelvollinen työtunniste" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: kirjoitussuojattu muuttuja" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s rajojen ulkopuolella" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumentti" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s rajojen ulkopuolella" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: työtä ei löydy" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: ei työnohjausta" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "ei työnohjausta" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: rajoitettu" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "rajoitettu" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ei ole komentotulkin sisäänrakennettu komento" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "kirjoitusvirhe: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "pääteasetuksia asetettaessa tapahtui virhe: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "pääteasetuksia luettaessa tapahtui virhe: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: nykyhakemistoa luettaessa tapahtui virhe: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: ei ole yksiselitteinen työtunniste" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ei voida poistaa: kirjoitussuojattu %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ei voida poistaa" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: virheellinen toiminnon nimi" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: ei lavennusmääritystä" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "varoitus: -F -valitsin ei ehkä toimi odotetusti" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "varoitus: -C -valitsin ei ehkä toimi odotetusti" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "tällä hetkellä komennon lavennusfunktiota ei suoriteta" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "voidaan käyttää ainoastaan funktiossa" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "”-f”:ää ei voida käyttää funktioiden luomiseen" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: kirjoitussuojattu funktio" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: taulukkomuuttujia ei voi tuhota näin" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: assosiatiivista taulukkoa ei voi muuttaa indeksoiduksi" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynaaminen lataus ei ole käytettävissä" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "jaettua objektia %s ei voida avata: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "kohdetta %s ei löydy jaetusta objektista %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: ei dynaamisesti ladattu" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: ei dynaamisesti ladattu" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: ei voida poistaa: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: on hakemisto" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ei tavallinen tiedosto" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: tiedosto on liian iso" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: binääritiedostoa ei voida suorittaa" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: ei voida suorittaa: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "lopetus\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ei ole sisäänkirjautumiskomentotulkki: käytä komentoa ”exit”" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Töitä on pysäytettynä.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Töitä on ajossa.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "ei löytynyt komentoa" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "komentohistoriamääritys" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: väliaikaistiedostoa ei voitu avata: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "nykyinen" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "työ %d käynnistyi ilman työnohjausta" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: virheellinen valitsin – %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: valitsin vaatii argumentin – %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hajautus kytketty pois" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hajautustaulukko on tyhjä\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "osumia\tkomento\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Sopivat komennot avainsanaan `" +msgstr[1] "Sopivat komennot avainsanoihin `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"Ohjeita kohteelle ”%s” ei löydy. Kokeile ”help help”, ”man -k %s” tai \n" +"”info %s”." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: ei voida avata: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Nämä komennot on määritelty sisäisesti. Kirjoita ”help” nähdäksesi tämän " +"listan.\n" +"Kirjoita ”help name” saadaksesi lisätietoja funktiosta ”name”.\n" +"Komennolla ”info bash” saat lisää yleisiä tietoja komentotulkista.\n" +"Käytä komentoa ”man -k” tai ”info” saadaksesi lisätietoja komennoista, jotka " +"eivät ole tällä listalla.\n" +"\n" +"Asteriski (*) nimen vieressä tarkoittaa, että komennon käyttö on estetty.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "valitsimista -anrw voidaan käyttää vain yhtä" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "sijainti komentohistoriassa" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: virheellinen valitsimen nimi" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: historiaviittaus epäonnistui" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib epäonnistui" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "”-x”:n kanssa ei voida käyttää muita valitsimia" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenttien pitää olla prosessi- tai työtunnisteita" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Tuntematon virhe" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "odotettiin lauseketta" + +#: builtins/mapfile.def:178 +#, fuzzy, c-format +msgid "%s: not an indexed array" +msgstr "%s: ei ole taulukkomuuttuja" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: virheellinen tiedostokahvamääritys" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: virheellinen tiedostokahva: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: virheellinen rivimäärä" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: virheellinen taulukkoindeksi" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: virheellinen paluukutsumäärä" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "tyhjä taulukkomuuttujan nimi" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "vaaditaan tukea taulukkomuuttujille" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "”%s”: puuttuva muotoilumerkki" + +#: builtins/printf.def:474 +#, fuzzy, c-format +msgid "`%c': invalid time format specification" +msgstr "%s: virheellinen aikakatkaisumääritys" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "”%c”: virheellinen muotoilumerkki" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "varoitus: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "\\x:stä puuttuu heksadesimaalinumero" + +#: builtins/printf.def:900 +#, fuzzy, c-format +msgid "missing unicode digit for \\%c" +msgstr "\\x:stä puuttuu heksadesimaalinumero" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "ei toista hakemistoa" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: virheellinen rajoitusargumentti" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "hakemistopino on tyhjä" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "hakemistopinon indeksi" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Näyttää muistissa olevat hakemistot. Hakemistot\n" +" löytävät tiensä listaan ”pushd”-komennolla; voit\n" +" palata listan hakemistoihin ”popd”-komennolla.\n" +" \n" +" Valitsimet:\n" +" -c\ttyhjennä hakemistopino\n" +" -l\tälä tulosta tilde-alkuisia versioita hakemistoista jotka ovat\n" +" \tsuhteessa kotihakemistoosi\n" +" -p tulosta hakemistopino, hakemisto per rivi\n" +" -v tulosta hakemistopino, hakemisto per rivi, pinon " +"sijaintinumeroineen\n" +" \n" +" Argumentit:\n" +" +N\tNäyttää listan N:nnen alkion (laskien vasemmalta dirs-komennon \n" +" \tantamasta listasta). Valitsimetta kutsuttaessa aloitetaan nollasta.\n" +" \n" +" -N\tNäyttää listan N:nnen alkion (laskien oikealta dirs-komennon\n" +" \tantamasta listasta). Valitsimetta kutsuttaessa aloitetaan nollasta." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Lisää hakemiston hakemistopinon ylimmäiseksi, tai kääntää pinon, \n" +" jolloin nykyhakemisto menee pinon huipulle. Ilman argumentteja \n" +" vaihtaa pinon kahden päällimmäisen hakemiston paikkoja.\n" +" \n" +" Valitsimet:\n" +" -n\tjättää hakemiston vaihtamatta, joten vain pinoa muutetaan\n" +" \n" +" Argumentit:\n" +" +N\tKääntää pinoa niin, että N:s hakemisto (laskien vasemmalta \"dirs" +"\"-\n" +" komennon antamasta listasta) on päällimmäisenä.\n" +" \n" +" -N\tKääntää pinoa niin, että N:s hakemisto (laskien oikealta \"dirs" +"\"-\n" +" komennon antamasta listasta) on päällimmäisenä.\n" +" \n" +" Sisäänrakennettu ”dirs”-komento näyttää hakemistopinon." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Poistaa alkioita hakemistopinosta. Ilman argumenttia poistaa ylimmän\n" +" hakemiston, ja siirtää seuraavan ylimmäiseksi.\n" +" \n" +" Valitsimet:\n" +" -n\tEi siirrytä normaalisti pinosta poistettuun hakemistoon,\n" +" \tjoten vain pinoa muutetaan.\n" +" \n" +" Argumentit:\n" +" +N\tPoistaa N:nnen alkion (laskien vasemmalta ”dirs”-komennon\n" +" \tantamasta listasta, alkaen nollasta). Esimerkiksi ”popd +0”\n" +" \tpoistaa ensimmäisen hakemistot, ”popd +1” toisen.\n" +" \n" +" -N\tPoistaa N:nnen alkion (laskien oikealta ”dirs”-komennon \n" +" \tantamasta listasta, alkaen nollasta). Esimerkiksi: ”popd -0”\n" +" \tpoistaa viimeisen hakemiston, ”popd -1” sitä edellisen.\n" +" \n" +" Sisäänrakennettu ”dirs”-komento näyttää hakemistopinon sisällön." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: virheellinen aikakatkaisumääritys" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "lukuvirhe: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "”return” on käytettävissä vain funktiossa tai ladatussa skriptissä" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "funktiota ja muuttujaa ei voi poistaa yhtä aikaa" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ei ole taulukkomuuttuja" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ei ole funktio" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: ei voida poistaa" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "siirtolaskuri" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" +"komentotulkin valitsimia ei voida laittaa päällä ja ottaa pois päältä " +"samanaikaisesti" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: virheellinen komentotulkin valitsimen nimi" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "vaaditaan tiedostonimi argumentiksi" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: tiedostoa ei löytynyt" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "ei voida keskeyttää" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "sisäänkirjautumiskomentotulkkia ei voi keskeyttää" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s on aliasioitu ”%s”\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s on komentotulkin avainsana\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s on funktio\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s on komentotulkin sisäänrakennettu komento\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s on komentotulkin sisäänrakennettu komento\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s on %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s on hajautettu (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: virheellinen rajoitusargumentti" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "”%c”: virheellinen komento" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: rajoitusta ei saada: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "rajoitus" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: rajoitusta ei voida muokata: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktaaliluku" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "”%c”: virheellinen symbolisen tilan operaattori" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "”%c”: virheellinen symbolisen tilan merkki" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " rivi " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "viimeinen komento: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Keskeytetään..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "tuntematon komentovirhe" + +#: error.c:463 +msgid "bad command type" +msgstr "virheellinen komentotyyppi" + +#: error.c:464 +msgid "bad connector" +msgstr "virheellinen liittäjä" + +#: error.c:465 +msgid "bad jump" +msgstr "virheellinen hyppy" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: sitomaton muuttuja" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aaikakatkaisu: automaattinen uloskirjautuminen\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "syötettä ei voida lukea tiedostosta /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "AJAN MUOTOMÄÄRITYS: ”%c”: virheellinen muotoilumerkki" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "putkitusvirhe" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: rajoitettu: komentojen nimissä ei voi käyttää ”/”-merkkiä" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: komentoa ei löydy" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: virheellinen tulkki" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: binääritiedostoa ei voida suorittaa" + +#: execute_cmd.c:5977 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s on komentotulkin sisäänrakennettu komento\n" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "tiedostokahvaa %d ei voida kopioida kahvaksi %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "lausekkeen rekursiomäärä ylittyi" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "rekursiopinon alivuoto" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "lauseoppivirhe lausekkeessa" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "yritettiin sijoittaa objektiin, joka ei ole muuttuja" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "lauseoppivirhe lausekkeessa" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "jako nollalla" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bugi: virheellinen sijoitusavainsana" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "”:”:ttä odotettiin ehdolliseen lausekkeeseen" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "eksponentti on pienempi kuin 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "odotettiin muuttujaa ++:n tai --:n jälkeen" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "puuttuva ”)”" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "lauseoppivirhe: odotettiin operandia" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "lauseoppivirhe: virheellinen aritmetiikkaoperaattori" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (virheellinen avainsana on ”%s”)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "virheellinen lukujärjestelmä" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: virheellinen rivimäärä" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "liian iso luku lukujärjestelmälle" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: virhe lausekkeessa\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: ylempiin hakemistoihin ei päästä" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "nodelay-tilaa ei voida asettaa tiedostokahvalle %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "bashin syötteeksi ei voida avata uutta tiedostokahvaa kahvasta %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: uudella tiedostokahvalla %d on jo puskuri" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp-putki" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "haarautettu prosessi-id %d on ajossa olevalla työllä %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "poistetaan pysäytetty työ %d prosessiryhmästä %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: prosessi %5ld (%s) on merkattu vielä toimivaksi" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: prosessitunnusta ei löydy." + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signaali %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Valmis" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Pysäytetty" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Pysäytetty(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Ajossa" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Valmis(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Poistui %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Tuntematon tila" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(luotiin core-tiedosto)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (työhakemisto: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "lapsiprosessin setpgid (%ld => %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: prosessi %ld ei ole tämän komentotulkin lapsiprosessi" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Prosessista %ld ei ole tietoja" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: työ %d on pysäytetty" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: työtä ei löydy" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: työ on lopetettu" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: työ %d on jo taustalla" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: rivi %d:" + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (luotiin core-tiedosto)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(työhakemisto nyt: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp epäonnistui" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: vuonhallinta" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: vuonhallinta" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "päätteen prosessiryhmää ei voitu asettaa (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "tällä komentotulkilla ei ole työnohjausta" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: varmistus epäonnistui: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: varmistus epäonnistui\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "tuntematon" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: vapaitten listan lohko ylikirjoittui" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: kutsuttiin argumenttina jo vapautettu lohko" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: kutsuttuun argumenttina varaamaton lohko" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: alku- ja loppulohkojen koot eroavat" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: kutsuargumentti on varaamaton lohko" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: alku- ja loppulohkojen koot eroavat" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: varaustaulukko on täynnä FIND_ALLOCeja?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p on merkitty taulukossa jo varatuksi?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p on jo taulukossa vapaana?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "virheellinen lukujärjestelmä" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: tuntematon palvelin" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: virheellinen palvelu" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: virheellinen verkkopolkumääritys" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "verkko-operaatioita ei ole tuettu" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" + +#: locale.c:292 +#, fuzzy, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "xrealloc: %s:%d: ei voida varata %lu tavua" + +#: locale.c:294 +#, fuzzy, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "xrealloc: %s:%d: ei voida varata %lu tavua" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Sinulle on postia laatikossa $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Sinulla on uutta postia laatikossa $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Posti laatikossa %s on luettu\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "lauseoppivirhe: vaaditaan aritmeettinen lauseke" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "lauseoppivirhe: odottamaton ”;”" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "lauseoppivirhe: ”((%s))”" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: virheellinen käskytyyppi %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-dokumentti rivillä %d päättyi tiedoston loppumiseen (haluttiin ”%s”)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: uudelleenohjaus ”%d” rajojen ulkopuolella" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "odottamaton EOF (tiedostonloppu) odotettaessa sulkevaa ”%c”" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "odottamaton EOF odotettaessa ”]]”" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "lauseoppivirhe ehdollisessa lausekkeessa: odottamaton avainsana ”%s”" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "lauseoppivirhe ehdollisessa lausekkeessa" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "odottamaton avainsana ”%s”, odotettiin ”)”" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "odototettiin ”)”" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "odottamaton argumentti ”%s” ehdolliselle unaariselle operaattorille" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "odottamaton argumentti ehdolliselle unaariselle operaattorille" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "" +"odottamaton avainsana ”%s”, odotettiin ehdollista binääristä operaattoria" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "odotettiin ehdollista binääristä operaattoria" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "odottamaton argumentti ”%s” ehdolliselle binääriselle operaattorille" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "odottamaton argumentti ehdolliselle binääriselle operaattorille" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "odottamaton avainsana ”%c” ehdollisessa komennossa" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "odottamaton avainsana ”%s” ehdollisessa komennossa" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "odottamaton avainsana %d ehdollisessa komennossa" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "lauseoppivirhe lähellä odottamatonta avainsanaa ”%s”" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "lauseoppivirhe lähellä ”%s”" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "lauseoppivirhe: odottamaton tiedostonloppu" + +#: parse.y:6365 +msgid "syntax error" +msgstr "lauseoppivirhe" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Kirjoita ”%s” poistuaksesi komentotulkista.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "Odottamaton EOF odotettaessa vastaavaa ”)”" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "täydennys: funktiota ”%s” ei löytynyt" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: tyhjä COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: virheellinen yhdistin ”%d”" + +#: print_cmd.c:375 +#, fuzzy, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "%d: virheellinen tiedostokahva: %s" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: ”%c”: virheellinen muotoilumerkki" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "tiedostokahva rajojen ulkopuolella" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: epämääräinen uudelleenohjaus" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: olemassa olevan tiedoston päälle ei voida kirjoittaa" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: rajoitettu: tulostusta ei voida uudelleenohjata" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "here-dokumentille ei voida luoda väliaikaistiedostoa: %s" + +#: redir.c:222 +#, fuzzy, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: listaa ei voida sijoittaa taulukon alkioon" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port-muotoa ei tueta ilman tietoliikennettä" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "virhe uudelleenohjauksessa: tiedostokahvaa ei voida kopioida" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "/tmp-hakemistoa ei löytynyt, luo se!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp:n pitää olla kelvollinen hakemiston nimi" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: virheellinen valitsin" + +#: shell.c:1319 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nodelay-tilaa ei voida asettaa tiedostokahvalle %d" + +#: shell.c:1330 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nodelay-tilaa ei voida asettaa tiedostokahvalle %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: on hakemisto" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Minulla ei ole nimeä!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versio %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Käyttö:\t%s[GNU:n pitkä valitsin] [valitsin] ...\n" +"\t%s [GNU:n pitkä valitsin] [valitsin] komentotiedosto ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU:n pitkät valitsimet:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Komentotulkin valitsimet:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" +"\t-irsD tai -c komento tai -O shopt_option (ainoastaan käynnistettäessä)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s tai -o -valitsin\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Kirjoita ”%s -c 'help set'” saadaksesi lisätietoja komentotulkin " +"valitsimista.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Kirjoita ”%s -c help” saadaksesi lisätietoja komentotulkin " +"sisäänrakennetuista komennoista.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Raportoi virheet komennolla ”bashbug”.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: virheellinen operaatio" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Väärä signaali" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Linjankatkaisu" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Keskeytys" + +#: siglist.c:58 +msgid "Quit" +msgstr "Lopetettu" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Virheellinen käsky" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Jäljitys/katkaisupisteansa" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT-käsky" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT-käsky" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Liukulukupoikkeus" + +#: siglist.c:86 +msgid "Killed" +msgstr "Tapettu" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Väylävirhe" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Muistialueen ylitys" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Virheellinen järjestelmäkutsu" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Katkennut putki" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Herätyskello" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Päätetty" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Kiireellinen I/O-ehto" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Pysäytetty (signaali)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Jatka" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Lapsiprosessin kuolema tai pysähtyminen" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Pysäytetty (päätteen syöte)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Pysäytetty (päätteen tuloste)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O on valmis" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU-rajoitus" + +#: siglist.c:154 +msgid "File limit" +msgstr "Tiedostorajoitus" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Hälytys (virtuaalinen)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Hälytys (profiili)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Ikkuna vaihtunut" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Tietuelukko" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Käyttäjän määrittelemä signaali 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Käyttäjän määrittelemä signaali 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT-syöte odottaa" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "sähkökatko lähellä" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "järjestelmän kaatuminen lähellä" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "siirrä prosessi toiselle CPU:lle" + +#: siglist.c:198 +msgid "programming error" +msgstr "ohjelmointivirhe" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT-monitorointitila käytössä" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT-monitorointitila peruttu" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT-äänisekvenssi on valmistunut" + +#: siglist.c:214 +msgid "Information request" +msgstr "Informaatiopyyntö" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Tuntematon signaali #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "virheellinen korvaus: ei sulkevaa ”%s” jonossa %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: listaa ei voida sijoittaa taulukon alkioon" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "putkea ei voida luoda prosessin korvaamista varten" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "lapsiprosessia ei voida luoda prosessin korvaamista varten" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "nimettyä putkea %s ei voida avata lukemista varten" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "nimettyä putkea %s ei voida avata kirjoitusta varten" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "nimettyä putkea %s ei voida kopioida tiedostokahvaksi %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "virheellinen korvaus: ei sulkevaa ”`” jonossa %s" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "putkea ei voida luoda komennon korvaamista varten" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "ei voida luoda lapsiprosessia komennon korvaamista varten" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: putkea ei voida kopioida tiedostokahvaksi 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: virheellinen rivimäärä" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "%s: virheellinen toiminnon nimi" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parametria ei ole tai sitä ei ole asetettu" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametria ei ole tai sitä ei ole asetettu" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: alimerkkijonolauseke < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: virheellinen korvaus" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: ei voida asettaa näin" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "virheellinen korvaus: ei sulkevaa ”`” jonossa %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "ei osumia: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "odotettiin argumenttia" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: odotettiin kokonaislukuilmaisua" + +#: test.c:265 +msgid "`)' expected" +msgstr "odotettiin ”)”" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "odotettiin ”)”, löydettiin %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: odotettiin binääristä operaattoria" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: odotettiin unaarista operaattoria" + +#: test.c:881 +msgid "missing `]'" +msgstr "puuttuva ”]”" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "lauseoppivirhe: odottamaton ”;”" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "virheellinen signaalinumero" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: virheellinen arvo trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signaalikäsittelijä on SIG_DFL, lähetän %d (%s) uudelleen " +"itselleni" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: virheellinen signaali %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "virhe tuotaessa ”%s”:n funktiomääritystä" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "komentotulkkitaso (%d) liian korkea, palautetaan 1:ksi" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: ei funktiokontekstia nykytilassa" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: ei funktiokontekstia nykytilassa" + +#: variables.c:4771 +#, fuzzy, c-format +msgid "%s has null exportstr" +msgstr "%s: parametria ei ole tai sitä ei ole asetettu" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "virheellinen merkki %d %s:n exportstr:ssä" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "ei =:ä kohteen %s exportstr:ssä" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: shell_variablesin alku ei ole funktiokonteksti" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: ei global_variables-kontekstia" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: shell_variablesin alku ei väliaikaisten ympäristömuuttujien " +"ympäristössä" + +#: variables.c:6387 +#, fuzzy, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: ei voida avata: %s" + +#: variables.c:6392 +#, fuzzy, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%d: virheellinen tiedostokahva: %s" + +#: variables.c:6437 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s rajojen ulkopuolella" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright © 2009 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Lisenssi GPLv3+: GNU GPL versio 3 tai uudempi \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versio %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "Tämä on vapaa ohjelma; saat muutella ja levittää sitä vapaasti.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Takuuta ei ole lain määräämissä rajoissa.\n" + +#: xmalloc.c:93 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: ei voida varata %lu tavua (varattiin %lu tavua)" + +#: xmalloc.c:95 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "xmalloc: ei voitu varata %lu tavua" + +#: xmalloc.c:165 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: %s:%d: ei voida varata %lu tavua (varattiin %lu tavua)" + +#: xmalloc.c:167 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "xmalloc: %s:%d: ei voida varata %lu tavua" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nimi[=arvo] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nimi [nimi ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m näppäinkartta] [-f tiedostonimi] [-q nimi] [-u nimi] [-r " +"näppäinsarja] [-x näppäinsarja:komento] [näppäinsarja:readline-funktio tai " +"readline-komento]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [sisäänrakennettu komento [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|-P] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] komento [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFilrtux] [-p] [niemi[=arvo] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFilrtux] [-p] nimi[=arvo] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [valitsin] nimi[=arvo] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f tiedosto] [nimi ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts valitsinmerkit nimi [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nimi] [komento [argumentit ...]] [uudelleenohjaus ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "lopetus [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e e-nimi] [-lnr] [ensimmäinen] [viimeinen] tai fc -s [pat=rep] [komento]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [työtunniste]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [työtunniste ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p polku] [-dt] [nimi ...]" + +#: builtins.c:119 +#, fuzzy +msgid "help [-dms] [pattern ...]" +msgstr "help [-ds] [malline ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d erotus] [n] tai history -anrw [tiedosto] or history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [työtunniste ...] tai jobs -x komento [args]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [työtunniste ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s signaalitunniste | -n signaalinumero | -signaalimäärite] prosessi-" +"id | työtunniste ... tai kill -l [signaalimäärite]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +#, fuzzy +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a taulukko] [-d erotin] [-i teksti] [-n lkm] [-p kehote] [-t " +"aikakatkaisu] [-u tiedostokahva] [nimi ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o valitsinnimi] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [nimi ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nimi[=arvo] ...] tai export -p" + +#: builtins.c:148 +#, fuzzy +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-af] [nimi[=arvo] ...] tai readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source tiedosto [argumentit]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". tiedosto [argumentit]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [lauseke]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signaalimäärite ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nimi [nimi ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [raja]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [tila]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NIMI [in ARVOT ... ] ; do KOMENNOT; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( lause1; lause2; lause3 )); do KOMENNOT; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NIMI [in ARVOT ... ;] do KOMENNOT; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] komentoputki" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case SANA in [MALLINE [| MALLINE]...) KOMENNOT ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if KOMENNOT; then KOMENNOT; [ elif KOMENNOT; then KOMENNOT; ]... [ else " +"KOMENNOT; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while KOMENNOT; do KOMENNOT; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until KOMENNOT; do KOMENNOT; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NIMI] komento [uudelleenohjaukset]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nimi { KOMENNOT ; } tai nimi () { KOMENNOT ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMENNOT ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "työtunniste [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( lauseke ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ lauseke ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "muuttujat - eräiden komentotulkin muuttujien nimet ja merkitykset" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | hakemisto]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [valitsinnimi ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v muuttuja] muoto [argumentit]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-o valitsin] [-A toimenpide] [-G " +"jokerimalline] [-W sanalista] [-F funktio] [-C komento] [-X " +"suodatinmalline] [-P prefiksi] [-S suffiksi] [nimi...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o valitsin] [-A toimenpide] [-G jokerimalline] [-" +"W sanalista] [-F funktio] [-C komento] [-X suodatinmalline] [-P prefiksi] [-" +"S suffiksi] [sana]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o valitsin] [nimi ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n lukumäärä] [-O alkuperä] [-s laskuri] [-t] [-u tiedostokahva] \n" +"[-C paluukutsu] [-c määrä] [taulukko]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n lukumäärä] [-O alkuperä] [-s laskuri] [-t] [-u " +"tiedostokahva] \n" +"[-C paluukutsu] [-c määrä] [taulukko]" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Näytä tai määrittele aliaksia.\n" +" \n" +" Ilman aliaksia ”alias” tulostaa vakiotulosteeseen listan aliaksista \n" +" hyödynnettävässä muodossa ”alias NIMI=ARVO”.\n" +" \n" +" Muussa tapauksessa luodaan uusi alias jokaiselle NIMELLE,\n" +" jonka ARVO on annettu. ARVON jälkeinen tyhjä tarkastetaan\n" +" alias-korvauksen varalta aliasta laajennettaessa.\n" +" \n" +" Valitsimet:\n" +" -p\ttulosta kaikki määritellyt aliakset hyödynnettävässä\n" +" \tmuodossa.\n" +" \n" +" Paluuarvo:\n" +" alias palauttaa arvon tosi, mikäli parametriksi on annettu NIMI jonka\n" +" aliasta ei ole määritelty." + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Poista kukin NIMI määriteltyjen aliasten listasta.\n" +" \n" +" Valitsimet:\n" +" -a\tpoista kaikki aliasmääritykset.\n" +" \n" +" Palauttaa arvon tosi paitsi jos NIMI-nimistä aliasta\n" +" ei ole." + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Aseta readlinen näppäimistösidonnat ja muuttujat.\n" +" \n" +" Sido näppäinyhdistelmä readlinen funktioon tai makroon, tai \n" +" aseta readlinen muuttuja. Valitsimeton argumenttisyntaksi vastaa\n" +" ~/.inputrc:n, mutta on annettava yhtenä argumenttina:\n" +" esimerkiksi, bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Valitsimet:\n" +" -m näppäinkartta käytä NÄPPÄINKARTTAA tämän komennon ajan.\n" +" Hyväksyttäviä näppäinkarttoja ovat emacs, emacs-" +"standard,\n" +" emacs-meta, emacs-cltx, vi, vi-move, vi-command ja " +"vi-insert.\n" +" -l Listaa funktioiden nimet\n" +" -P Listaa funktioiden nimet ja sidonnat.\n" +" -p Listaa funktioiden nimet ja sidonnat " +"hyödynnettävässä \n" +" muodossa.\n" +" -S Listaa makrot herättävät näppäinyhdistelmät ja " +"niiden \n" +" arvot\n" +" -s Listaa makrot herättävät näppäinyhdistelmät ja " +"niiden \n" +" arvot\n" +" hyödynnettävässä muodossa.\n" +" -q funktion-nimi Tarkista, mitkä näppäimet käynnistävät nimetyn \n" +" funktion.\n" +" -u funktion-nimi Poista nimettyyn funktioon tehdyt näppäinsidonnat.\n" +" -r näppäinyhdistelmä Poista NÄPPÄINYHDISTELMÄN sidonta.\n" +" -f tiedosto Lue näppäinsidonnat TIEDOSTOSTA.\n" +" -x näppäinyhdistelmä:komento\tkäynnistä KOMENTO \n" +" NÄPPÄINYHDISTELMÄLLÄ.\n" +" \n" +" Paluuarvo:\n" +" bind palauttaa 0 paitsi jos on annettu tunnistamaton valitsin tai " +"tapahtuu \n" +" virhe." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Exit for, while- tai until-silmukoista\n" +" \n" +" Poistu FOR-, WHILE- tai UNTIL-silmukasta. Jos N on annettu, poistu\n" +" N:stä sisäkkäisestä silmukasta.\n" +" \n" +" Paluuarvo:\n" +" Paluuarvo on 0 jollei N ole suurempi tai yhtäsuuri kuin 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Jatko for-, while tai until-silmukoille.\n" +" \n" +" Jatkaa seuraavaa FOR-, WHILE- tai UNTIL-silmukan kierrosta.\n" +" Jos N on annettu, jatkaa N:ttä silmukkaa.\n" +" \n" +" Paluuarvo:\n" +" Paluuarvo on 0 ellei N ole suurempi tai yhtäsuuri kuin 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Suorita komentotulkin sisäänrakennettuja komentoja.\n" +" \n" +" Suorita KOMENTO argumentein ARGs ilman komennon etsimistä.\n" +" Tämä on hyödyllistä silloin, kun haluat tehdä komentotulkin komennosta\n" +" funktion, mutta haluat suorittaa komennon funktiosta käsin.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa KOMENNON paluuarvon, tai epätoden jos KOMENTO ei ole\n" +" sisäänrakennettu komento." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Palauta tämänhetkisen alirutiinikutsun konteksti.\n" +" \n" +" Ilman parametria, palauttaa ”$line $filename”. Parametrilla palauttaa \n" +" ”$line $subroutine $filename”; saatua lisätietoa voidaan käyttää " +"kutsupinon\n" +" kuvaamiseksi.\n" +" \n" +" Parametrin arvo määrää, montako kutsukehystä taaksepäin siirrytään; \n" +" ylin kehys on numero 0.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa 0 ellei komentotulkki ole funktion ulkopuolella tai parametri\n" +" on virheellinen." + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Vaihtaa työhakemistoa.\n" +" \n" +" Siirry hakemistoon HAKEMISTO. HAKEMISTOn oletusarvo on HOME-\n" +" ympäristömuuttujan arvo.\n" +" \n" +" CDPATH-ympäristömuuttuja määrittelee hakupolun HAKEMISTOlle. Vaihto-\n" +" ehtoiset hakemistonimet erotetaan CDPAThissa kaksoispisteellä.\n" +" Tyhjä hakemisto tarkoittaa nykyistä hakemistoa. Jos HAKEMISTO ALKAA\n" +" kauttaviivalla, CDPATHia ei käytetä.\n" +" \n" +" Jos hakemistoa ei löydy, ja komentotulkin valitsin ”cdable_vars” on " +"asetettu,\n" +" oletetaan hakemiston olevan muuttuja. Jos kyseisellä muuttujalla on " +"arvo,\n" +" sitä käytetään HAKEMISTOksi.\n" +" \n" +" Valitsimet:\n" +" -L\tpakota seuraamaan symbolisia linkkejä\n" +" -P\tkäytä fyysistä hakemistorakennetta, älä seuraa symbolisia " +"linkkejä\n" +" \n" +" Oletus on seurata symbolisia linkkejä, kuten jos ”-L” olisi annettu.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa 0, jos hakemistoa vaihdettiin, nollasta poikkeavan muussa \n" +" tapauksessa." + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Tulostaa tämänhetkisen työhakemiston.\n" +" \n" +" Valitsimet:\n" +" -L\ttulosta $PWD-ympäristömuuttujan arvo jos se sisältää\n" +" \tnykyisen työhakemiston nimen\n" +" -P\ttulosta fyysinen hakemisto ilman symbolisia linkkejä\n" +" \n" +" Oletusarvoisesti ”pwd” käyttäytyy kuin ”-L” olisi annettu.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa 0 ellei ole annettu virheellistä valitsinta tai nykyistä \n" +" hakemistoa ei voida lukea." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Tyhjä komento.\n" +" \n" +" Ei vaikutusta; komento ei tee mitään.\n" +" \n" +" Paluuarvo:\n" +" Onnistuu aina." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Palauttaa onnistuneen paluuarvon.\n" +" \n" +" Paluuarvo:\n" +" Onnistuu aina." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Palauttaa epäonnistuneen paluuarvon.\n" +" \n" +" Paluuarvo:\n" +" Epäonnistuu aina." + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Suorittaa yksinkertaisen komennon tai näyttää tietoja komennoista.\n" +" \n" +" Suorittaa KOMENNON PARAMETREIN ohittaen komentotulkin funktiohaun,\n" +" tai näyttää tietoja annetuista KOMENNOISTA. Voidaan käyttää \n" +" käynnistämään komentoja levyltä silloin, kun on olemassa samanniminen\n" +" funktio.\n" +" \n" +" Valitsimet:\n" +" -p\tkäytä PATHin oletusarvoa jonka taataan löytävän kaikki " +"vakiotyökalut\n" +" -v\ttulosta KOMENNON kuvaus (kuten sisäänrakennettu ”type”-komento)\n" +" -V\ttulosta KOMENTOJEN yksityiskohtaisemmat kuvaukset\n" +" \n" +" Paluuarvo:\n" +" Palauttaa KOMENNON paluuarvon, tai epäonnistumisen jos KOMENTOA ei \n" +" löytynyt." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Asettaa muuttujien arvot ja attribuutit.\n" +" \n" +" Määrittele muuttujat ja anna niille attribuutit. Jos NIMIÄ ei anneta,\n" +" näytä kaikkien muuttujien attribuutit ja arvot.\n" +" \n" +" Valitsimet:\n" +" -f\trajaa toiminto tai listaus funktioiden nimiin ja määrityksiin\n" +" -F\trajaa listaus ainoastaan funktioiden nimiin (plus rivinumeroon \n" +" \t ja lähdetiedostoon debugattaessa)\n" +" -p\tnäytä jokaisen NIMEN attribuutit ja arvo\n" +" \n" +" Attribuutteja muuttavat valitsimet:\n" +" -a\ttee NIMISTÄ indeksoidut taulukot (jos tuettu)\n" +" -A\ttee NIMISTÄ assosiatiiviset taulukot (jos tuettu)\n" +" -i\ttee NIMISTÄ kokonaislukuja\n" +" -l\tNIMIIN sijoitetut merkkijonot muutetaan pienaakkosiksi\n" +" -r\tkirjoitussuojaa NIMET\n" +" -t\taseta NIMIEN ”trace”-attribuutti\n" +" -u\tNIMIIN sijoitetut merkkijonot muutetaan suuraakkosiksi\n" +" -x\tNIMET viedään\n" +" \n" +" Käyttämällä ”+”:aa ”-”:n sijaan annettu attribuutti poistetaan.\n" +" \n" +" Muuttujille, joille on annettu kokonaislukuattribuutti, suoritetaan\n" +" aritmeettinen evaluointi silloin kun niille annetaan arvo (katso\n" +" ”let”-komento).\n" +" \n" +" Funktiossa käytettäessä ”declare” tekee NIMISTÄ paikallisia, kuten " +"”local”-\n" +" komento.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistumisen ellei ole annettu virheellistä valitsinta tai " +"tule \n" +" virhetilannetta." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Asettaa muuttujien arvoja ja attribuutteja.\n" +" \n" +" Vanhentunut. Katso ”help declare”." + +#: builtins.c:540 +#, fuzzy +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Määrittele paikallisia muuttujia.\n" +" \n" +" Luo paikallinen NIMI-niminen muuttuja, ja anna sille arvo ARVO. " +"VALITSIN\n" +" voi olla mikä tahansa komennon ”declare” hyväksymä.\n" +" \n" +" Paikallisia muuttujia voidaan käyttää ainoastaan funktiossa; ne ovat\n" +" näkyviä ainoastaan määritelleessä funktiossa ja sen lapsissa.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen, ellei ole annettu virheellistä valitsinta,\n" +" tapahtuu virhe tai komentotulkki ei ole suorittamassa funktiota." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Kirjoita argumentit vakiotulosteeseen.\n" +" \n" +" Tulosta ARGUMENTIT vakiotulosteeseen rivinvaihdoin.\n" +" \n" +" Valitsimet:\n" +" -n\tälä lisää rivinvaihtoa\n" +" -e\ttulkitse seuraavat kenoviivaohjaukset\n" +" -E\tohita kenoviivaohjausten tulkinta\n" +" \n" +" \"echo\" tulkitsee seuraavat kenoviivaohjausmerkit:\n" +" \\a\täänimerkki\n" +" \\b\tbackspace\n" +" \\c\tkeskeytä tulostus\n" +" \\e\tESC-merkki\n" +" \\f\tsivunvaihto\n" +" \\n\trivinvaihto\n" +" \\r\tpalautin\n" +" \\t\tsarkain\n" +" \\v\tvertikaalinen sarkain\n" +" \\\\\tkenoviiva\n" +" \\0nnn\tmerkki jonka ASCII-koodi oktaalina on NNN. NNN voi olla 0-3\n" +" \toktaalimerkkiä\n" +" \\xHH\tkahdeksanbittinen merkki jonka heksadesimaaliarvo on HH. HH " +"voi \n" +" \tolla 1-2 heksadesimaalimerkkiä\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen ellei tapahdu virhettä." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Tulosta argumentit vakiotulosteeseen.\n" +" \n" +" Tulosta ARGUMENTIT vakiotulosteeseen päättäen rivinvaihdolla.\n" +" \n" +" Valitsimet:\n" +" -n\tälä lisää rivinvaihtoa\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen ellei tapahdu virhettä." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Ottaa käyttöön tai poistaa käytöstä komentotulkin sisäänrakennettuja " +"komentoja.\n" +" \n" +" Ottaa käyttöön tai poistaa komentotulkin sisäänrakennettuja komentoja\n" +" käytöstä. Käytöstäpoisto sallii sinun käyttävän sisäisen komennon " +"kanssa \n" +" samannimisiä, levyllä olevia komentoja käyttämättä koko polkua.\n" +" \n" +" Valitsimet:\n" +" -a\tlistaa komennot ja tiedot, mitkä on otettu käyttöön\n" +" -n\tpoistaa NIMET käytöstä tai näyttää listan poistetuista\n" +" -p\ttulosta lista komennoista hyödynnettävässä muodossa\n" +" -s\ttulosta ainoastaan Posix-komennot\n" +" \n" +" Valitsimet, jotka kontrolloivat dynaamista lataamista:\n" +" -f\tlataa komento NIMI jaetusta objektista TIEDOSTO\n" +" -d\tpoista -f:llä ladattu komento\n" +" \n" +" Jollei valitsimia anneta, kukin NIMI otetaan käyttöön.\n" +" \n" +" Jos haluat käyttää $PATHista löytyvää ”test”-komentoa sisäänrakennetun\n" +" sijaan, kirjoita ”enable -n test”.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen, paitsi jos NIMI ei ole komentotulkin " +"sisäänrakennettu\n" +" komento tai tapahtuu virhe." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Suorita argumentit komentotulkin komentona.\n" +" \n" +" Yhdistä ARGUMENTIT yhdeksi merkkijonoksi, käytä tulosta komentotulkin\n" +" syötteenä ja suorita saadut komennot.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa komennon paluuarvon tai onnistuneen jos komento on tyhjä." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Selaa valitsimien argumentit.\n" +" \n" +" Getoptsia käytetään komentotulkin proseduureissa käsiteltäessä\n" +" komentoriviparametreina annettuja valitsimia.\n" +" \n" +" OPTSTRING sisältää tunnistettavat valitsinkirjaimet; jos kirjainta\n" +" seuraa kaksoispiste, valitsimella odotetaan olevan argumentti, joka \n" +" pitäisi erottaa siitä tyhjämerkillä.\n" +" \n" +" Getopts sijoittaa joka kutsukerralla seuraavan valitsimen muuttujaan\n" +" $nimi, alustaen sen tarvittaessa, ja seuraavan käsiteltävän argumentin\n" +" OPTIND-ympäristömuuttujaan. OPTIND alustetaan 1:ksi jokaisella\n" +" komentotulkin tai komentotiedoston käynnistyskerralla. Kun valitsin\n" +" vaatii argumentin, getopts sijoittaa sen muuttujaan OPTARG.\n" +" \n" +" Getopts ilmoittaa virheistä jommallakummalla tavalla kahdesta. Jos\n" +" OPTSTRINGIN ensimmäinen merkki on kaksoispiste, getopts ilmoittaa\n" +" virheistä hiljaisesti. Tällöin ei tulosteta virheilmoitusta. Jos " +"löydetään\n" +" virheellinen valitsinmerkki, se sijoitetaan OPTARGIIN. Jos vaadittua\n" +" argumenttia ei löydetä, getopts sijoittaa ”:”:n NAMEEN ja asettaa\n" +" löydetyn optiomerkin OPTARGIIN. Jos getopts ei ole hiljaisessa tilassa\n" +" ja löydetään virheellinen valitsin, getopts sijoittaa ”?”:n NAMEEN ja\n" +" tyhjentää OPTARGIN. Jos vaadittua argumenttia ei löydetä, NAMEEN\n" +" sijoitetaan ”?”, OPTARG tyhjennetään ja tulostetaan virheilmoitus.\n" +" \n" +" Jos OPTERR-ympäristömuuttujassa on arvo 0, getopts jättää " +"virheilmoitukset\n" +" tulostamatta, vaikka OPTSTRINGIN ensimmäinen merkki ei ole " +"kaksoispiste.\n" +" OPTERRin oletusarvo on 1.\n" +" \n" +" Getopts selaa normaalisti positioparametrit ($0 - $9), mutta jos \n" +" argumentteja annetaan enemmän, ne selataan sen sijaan.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen jos valitsin löytyy; epäonnistuneen jos " +"valitsimet\n" +" loppuvat tai tapahtuu virhe." + +#: builtins.c:694 +#, fuzzy +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Korvaa komentotulkki annetulla komennolla.\n" +" \n" +" Suorita KOMENTO, korvaten tämä komentotulkki annetulla ohjelmalla.\n" +" ARGUMENTEISTA tulee KOMENNON argumentteja. Jos KOMENTOA ei anneta,\n" +" kaikki uudelleenohjaukset tapahtuvat nykyisessä komentotulkissa.\n" +" \n" +" Valitsimet:\n" +" -a name\tanna NAME nollantena argumenttina KOMENNOLLE\n" +" -c\t\tsuorita KOMENTO tyhjässä ympäristössä\n" +" -l\t\tsijoita miinusmerkki KOMENNON nollanteen argumenttiin\n" +" \n" +" Jos komentoa ei voida suorittaa, ei-interaktiivinen komentotulkki " +"poistuu,\n" +" ellei tulkin valitsinta ”execfail” ole asetettu.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos KOMENTOA ei löydy tai " +"uudelleenohjauksessa\n" +" tapahtuu virhe." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Poistu komentotulkista.\n" +" \n" +" Poistuu komentotulkista paluuarvolla N. Jos N:ää ei anneta, paluuarvo\n" +" on viimeisen komennon paluuarvo." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Poistu sisäänkirjautumiskomentotulkista.\n" +" \n" +" Poistuu sisäänkirjautumiskomentotulkista paluuarvolla N. Palauttaa\n" +" virheen jos ei olla sisäänkirjautumiskomentotulkissa." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Näytä tai suorita komentoja komentohistoriasta.\n" +" \n" +" Fc:tä käytetään historialistassa olevien komentojen tulostamiseen tai\n" +" muokkaamiseen ja uudelleensuoritukseen. ALKU ja LOPPU voivat olla\n" +" rajaavia numeroita, tai ALKU voi olla merkkijono, joka tarkoittaa " +"viimei-\n" +" sintä sillä alkavaa komentoa.\n" +" \n" +" Valitsimet:\n" +" -e ENIMI\tvalitse käytettävä editori. Oletus on FCEDIT, sitten EDITOR\n" +" \t\tsitten vi\n" +" -l\tlistaa rivit editoinnin sijaan\n" +" -r\tlistaa käänteisessä järjestyksessä\n" +" \n" +" Käytettäessä muotoa ”fc -s [malline=korvaus] [komento]”, komento\n" +" suoritetaan kun korvaus MALLINE=KORVAUS on suoritettu.\n" +" \n" +" Eräs käyttökelpoinen alias on r='fc -s', jolloin ”r cc” ajaa viimeisen " +"cc-\n" +" alkuisen komennon ja ”r” suorittaa viimeisen komennon.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen tai suoritetun komennon paluuarvon; nollasta\n" +" poikkeava virhetilanteessa." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Siirrä työ edustalle.\n" +" \n" +" Siirrä TYÖKUVAAJALLA tunnistettu työ edustalle, jolloin siitä tulee " +"nykyinen\n" +" työ. Jos TYÖKUVAAJAA ei ole annettu, käytetään komentotulkin käsitystä\n" +" tämänhetkisestä työstä.\n" +" \n" +" Paluuarvo:\n" +" Edustalle tuodun työn paluuarvo, tai epäonnistuminen virhetilanteessa." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Siirtää työt taustalle.\n" +" \n" +" Siirtää kunkin TYÖNKUVAAJALLA tunnistetun työn taustalle, kuten jos ne " +"olisi\n" +" käynnistetty ”&”:llä. Jos TYÖNKUVAAJAA ei ole annettu, käytetään " +"komento-\n" +" tulkin käsitystä nykyisestä työstä.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos työnohjaus ei ole käytössä tai " +"tapahtuu\n" +" virhe." + +#: builtins.c:793 +#, fuzzy +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Muista tai näytä ohjelmien sijainnit.\n" +" \n" +" Selvitä ja muista jokaisen komennon NIMI täysi polkunimi. Jos " +"argumentteja\n" +" ei ole annettu, tulostetaan tiedot muistetuista komennoista.\n" +"\n" +" Valitsimet:\n" +" -d\t\tunohda jokaisen NIMEN sijainti\n" +" -l\t\tnäytä hyödynnettävässä muodossa\n" +" -p polku\tkäytä POLKUA NIMEN täytenä polkunimenä\n" +" -r\t\tunohda kaikki sijainnit\n" +" -t\t\ttulosta kaikkien NIMIEN muistetut sijainnit. Jos annetaan " +"useampi NIMI,\n" +" \t\tsijaintien eteen tulostetaan vastaava NIMI\n" +" Argumentit:\n" +" NIMI\t\tKukin NIMI etsitään $PATH-muuttujan hakupoluista ja lisätään\n" +" muistettujen komentojen listaan.\n" +"\n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos NIMEÄ ei löydy tai on annettu " +"virheellinen valitsin." + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Näyttää tietoja sisäänrakennetuista komennoista.\n" +" \n" +" Näyttää lyhyet tiivistelmät sisäänrakennetuista komennoista. Jos " +"MALLINE\n" +" on annettu, antaa yksityiskohtaisemman ohjeen kaikista MALLINEESEEN\n" +" sopivista komennoista, muuten tulostetaan lista ohjeotsikoista.\n" +" \n" +" Valitsimet:\n" +" -d\ttulosta kunkin aiheen lyhyt kuvaus\n" +" -m\tnäytä käyttöohje man-sivumaisessa muodossa\n" +" -s\ttulosta ainoastaan lyhyt käyttöohje kustakin MALLINEESEEN \n" +" \tsopivasta\n" +" \n" +" Argumentit:\n" +" MALLINE\tohjeotsikon hakumalline\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos MALLINETTA ei löydy tai valitsin on\n" +" virheellinen." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Näyttää tai muokkaa komentohistoriaa.\n" +" \n" +" Näyttää (komento)historian rivinumeroin, sijoittaen asteriskin jokaisen\n" +" muokatun alkion eteen. Argumentilla N listataan vain N viimeistä " +"alkiota.\n" +" \n" +" Valitsimet:\n" +" -c\ttyhjennä historia poistamalla kaikki alkiot\n" +" -d sijainti\tpoista alkio kohdasta SIJAINTI\n" +" \n" +" -a\tlisää tämän istunnon historiarivit historiatiedostoon\n" +" -n\tlue kaikki rivit, joita ei jo ole luettu historiatiedostosta\n" +" -r\tlue historiatiedosto ja lisää sen sisältö historiaan\n" +" -w\tkirjoita nykyinen historia historiatiedostoon ja lisää ne " +"historiaan\n" +" \n" +" -p\tsuorita historialaajennos jokaiselle ARGUMENTILLE ja näytä tulos\n" +" \tlisäämättä sitä historiaan\n" +" -s\tliitä ARGUMENTIT historiaan yhtenä alkiona\n" +" \n" +" Jos TIEDOSTO on annettu, sitä käytetään historiatiedostona. Muuten,\n" +" jos $HISTFILE:llä on arvo, sitä käytetään, muuten ~/.bash_history.\n" +" \n" +" Jos $HISTTIMEFORMAT-muuttuja on asetettu ja se ei ole tyhjä, sen arvoa\n" +" käytetään strftime(3):n muotoilujonona tulostettaessa kunkin alkion " +"aikaleima.\n" +" Muussa tapauksessa aikaleimoja ei tulosteta.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin " +"tai tapahtuu virhe." + +#: builtins.c:879 +#, fuzzy +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Näyttää töiden tilan.\n" +" \n" +" Listaa aktiiviset työt. TYÖMÄÄRITYS rajaa tulostuksen kyseiseen työhön.\n" +" Ilman valitsimia tulostetaan kaikkien aktiivisten töiden tila.\n" +" \n" +" Valitsimet:\n" +" -l\tlistaa prosessitunnukset (pid) muun tiedon lisäksi\n" +" -n\tlistaa ainoastaan prosessit joiden tila on muuttunut viimeisen\n" +" \tilmoituksen jälkeen\n" +" -p\tlistaa vain prosessitunnukset\n" +" -r\trajaa tulostus ajossa oleviin töihin\n" +" \n" +" Jos -x on annettu, KOMENTO suoritetaan kun kaikki ARGUMENTEISSA annetut\n" +" työmääritykset on korvattu kyseisen työn prosessiryhmän johtajan " +"prosessi-\n" +" tunnuksella.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai \n" +" tapahtuu virhe. Jos -x:ää on käytetty, palauttaa KOMENNON paluuarvon." + +#: builtins.c:906 +#, fuzzy +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Poistaa töitä nykyisestä komentotulkista.\n" +" \n" +" Poistaa kunkin TYÖTUNNISTEEN aktiivisten töiden taulukosta. Ilman\n" +" TYÖTUNNISTEITA komentotulkki käyttää omaa arviotaan nykyisestä\n" +" työstä.\n" +" \n" +" Valitsimet:\n" +" -a\tpoista kaikki työt ellei TYÖTUNNISTETTA ole annettu\n" +" -h\tmerkitse kukin TYÖTUNNISTE siten, ettei niille lähetetä\n" +" \tSIGHUPia, jos komentotulkki vastaanottaa sellaisen\n" +" -r\tpoista ainoastaan ajossa olevat työt\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos jokin valitsin tai TYÖTUNNISTE on " +"virheellinen." + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Lähetä työlle signaali.\n" +" \n" +" Lähettää PIDILLÄ tai TYÖTUNNISTEELLA tunnistetulle prosessille\n" +" SIGSPECILLÄ tai SIGNUMILLA annetun signaalin. Jos kumpaakaan\n" +" ei ole läsnä, käytetään SIGTERMIÄ.\n" +" \n" +" Valitsimet:\n" +" -s sig\tSIG on signaalin nimi\n" +" -n sig\tSIG on signaalin numero\n" +" -l\tlistaa signaalien nimet; ”-l”:n jälkeiset argumentit oletetaan\n" +" \tsignaalinumeroiksi, joiden nimet halutaan listata.\n" +" \n" +" Kill on sisäänrakennettu komento kahdesta syystä: se antaa käyttää\n" +" työtunnisteita prosessitunnusten sijaan, ja sallii prosessien " +"tappamisen\n" +" vaikka sallittujen prosessien lukumäärä olisikin ylitetty.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai " +"tapahtuu virhe." + +#: builtins.c:949 +#, fuzzy +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Laskee matemaattiset lausekkeet.\n" +" \n" +" Laskee jokaisen ARGUMENTIN matemaattisena lausekkeena. Evaluointi\n" +" tehdään kiinteänmittaisina kokonaislukuina ilman ylivuodon " +"tarkistamista,\n" +" vaikkakin nollalla jako havaitaan ja ilmoitetaan virheenä. Seuraava \n" +" operaattorilista on ryhmitelty samanarvoisten operaattoreiden ryhmiin. \n" +" Evaluointijärjestys on laskeva.\n" +" \n" +" \tid++, id--\tmuuttujan jälkilisäys, jälkivähennys\n" +" \t++id, --id\toperaattorin etulisäys, etuvähennys\n" +" \t-, +\t\tunaarinen miinus, plus\n" +" \t!, ~\t\tlooginen ja bittitason negaatio\n" +" \t**\t\tpotenssiinkorotus\n" +" \t*, /, %\t\tkertominen, jakaminen, jakojäännös\n" +" \t+, -\t\tlisäys, vähennys\n" +" \t<<, >>\t\tbittisiirrot vasemmalle ja oikealle\n" +" \t<=, >=, <, >\tvertailu\n" +" \t==, !=\t\tyhtäläisyys, epäyhtäläisyys\n" +" \t&\t\tbittitason AND\n" +" \t^\t\tbittitason XOR\n" +" \t|\t\tbittitason OR\n" +" \t&&\t\tlooginen AND\n" +" \t||\t\tlooginen OR\n" +" \texpr ? expr : expr\n" +" \t\t\tehdollinen operaattori\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tsijoitus\n" +" \n" +" Ympäristömuuttujia voidaan käyttää operandeina. Lausekkeessa muuttujan \n" +" nimi korvataan sen arvolla (määrämittaiseksi kokonaisluvuksi " +"pakotettuna).\n" +" Muuttujan integer-attribuutin ei tarvitse olla asetettuna.\n" +" \n" +" Operaattorit evaluoidaan laskennallisessa järjestyksessä. Suluissa " +"olevat \n" +" alilausekkeet evaluoidaan ensin; suluilla voidaan myös muuttaa \n" +" edelläkuvattua laskentajärjestystä.\n" +" \n" +" Paluuarvo:\n" +" Jos viimeinen ARGUMENTTI evaluoituu nollaksi, let palauttaa 1, muussa\n" +" tapauksessa 0." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Lukee rivin vakiosyötteestä ja jakaa sen kenttiin.\n" +" \n" +" Lukee yksittäisen rivin vakiosyötteestä tai tiedostokahvasta\n" +" FD jos käytetään -u -valitsinta. Rivi jaetaan kenttiin kuten sanatkin, " +"ja \n" +" ensimmäinen sana sijoitetaan ensimmäiseen NIMEEN, toinen TOISEEN, ja " +"niin \n" +" edelleen, ylijäävien sanojen sijoittuessa viimeiseen NIMEEN. Sanojen \n" +" erottimiksi hyväksytään vain $IFS-muuttujassa ilmoitetut.\n" +" \n" +" Jos NIMIÄ ei ole annettu, luettu rivi sijoitetaan REPLY-muuttujaan.\n" +" \n" +" Valitsimet:\n" +" -a taulukko\tsijoita sanat järjestyksessä taulukkoon TAULUKKO, alkaen\n" +" \t\tindeksistä nolla\n" +" -d erotin \tjatka kunnes ensimmäinen EROTTIMEN merkki on luettu, ei\n" +" \t\trivinvaihto\n" +" -e käytä readlinea rivin lukemiseksi " +"interaktiivisessa \n" +" \t\tkomentotulkissa\n" +" -i teksti\tkäytä TEKSTIÄ readlinen oletustekstinä\n" +" -n määrä\t\tpalaa, kun MÄÄRÄ merkkiä on luettu, sen sijaan että \n" +" \t\todotetaan rivinvaihtoa\n" +" -p kehote\ttulosta KEHOTE ilman rivinvaihtoa ennen lukua\n" +" -r\t\tälä salli kenoviivojen käyttöä\n" +" -s \t\tälä näytä päätteeltä näppäiltyjä merkkejä\n" +" -t aikaraja\tkeskeytä ja palauta epäonnistuminen jos kokonaista riviä\n" +" \t\tei saada luettua sekunneissa ilmoitetun AIKARAJAN puitteissa.\n" +" \t\tMuuttujan TMOUT arvo on oletusarvo. AIKARAJA voi olla \n" +" \t\treaaliluku.\n" +"\t\tJos AIKARAJA on 0, read palauttaa onnistumisen vain jos syöte on\n" +"\t\tvalmiina annetussa tiedostokahvassa. Paluuarvo on suurempi \n" +" \t\tkuin 128 jos aikaraja ylittyy\n" +" -u FD\t\tlue tiedostokahvasta FD vakiosyötetiedoston sijaan\n" +" \n" +" Paluuarvo:\n" +" Paluuarvo on nolla, ellei törmätä tiedoston loppumiseen, aikarajan\n" +" ylitykseen tai mikäli -u:lle annetaan virheellinen tiedostokahva." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Palauttaa komentotulkin funktiosta.\n" +" \n" +" Aiheuttaa funktion tai luetun skriptin poistumisen annetulla " +"paluuarvolla N.\n" +" Jos N:ää ei ole annettu, palautetaan viimeisen funktiossa tai " +"skriptissä\n" +" suoritetun komennon paluuarvo.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa N:n, tai epäonnistuneen mikäli komentotulkki ei ole " +"suorittamassa\n" +" funktiota tai skriptiä." + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Asettaa tai poistaa komentotulkin valitsimia ja positionaalisia " +"parametreja.\n" +" \n" +" Muuttaa komentotulkin attribuutteja ja positionaalisia parametreja, tai\n" +" näyttää komentotulkin muuttujien nimet ja arvot.\n" +" \n" +" Valitsimet:\n" +" -a Merkitse luodut tai muutetut parametrit vientiä varten.\n" +" -b Ilmoita työn päättymisestä välittömästi.\n" +" -e Poistu välittömästi jos komento palauttaa nollasta poikkeavan " +"arvon.\n" +" -f Poista tiedostonimen lavennus käytöstä.\n" +" -h muista komentojen sijainti sitä mukaa kun niitä etsitään.\n" +" -k kaikki asetukset sijoitetaan komennon ympäristöön, ei vain ne,\n" +" jotka ovat ennen komennon nimeä.\n" +" -m Työnohjaus on käytössä.\n" +" -n Lue komennot mutta älä suorita niitä.\n" +" -o valitsimen nimi\n" +" Aseta muuttuja valitsimen nimen mukaan:\n" +" allexport\tsama kuin -a\n" +" braceexpand\tsama kuin -B\n" +" emacs\t\tkäytä emacs-tyylistä rivieditointia\n" +" errexit\t\tsama kuin -e\n" +" errtrace\t\tsama kuin -E\n" +" functrace\tsama kuin -T\n" +" hashall\t\tsama kuin -h\n" +" histexpand\tsama kuin -H\n" +" history\t\tota komentohistoria käyttöön\n" +" ignoreeof\tkomentotulkki ei poistu syötteen loppuessa\n" +" interactive-comments\n" +" sallii kommentit interaktiivisissa " +"komennoissa\n" +" keyword\t\tsama kuin -k\n" +" monitor\t\tsama kuin -m\n" +" noclobber\tsama kuin -C\n" +" noexec\t\tsama kuin -n\n" +" noglob\t\tsama kuin -f\n" +" nolog\t\ttällä hetkellä hyväksytty mutta ei huomioida\n" +" notify\t\tsama kuin -b\n" +" nounset\t\tsama kuin -u\n" +" onecmd\t\tsama kuin -t\n" +" physical\t\tsama kuin -P\n" +" pipefail\t\tkomentoputken paluuarvo on viimeisen nollasta\n" +" \t\t\tpoikkeavan komennon paluuarvo, tai nolla jos\n" +" \t\t\tmikään komento ei palauttanut nollasta \n" +" \t\t\tpoikkeavaa\n" +" posix\t\tmuuta bashin toiminta vastaamaan Posixia\n" +" privileged\tsama kuin -p\n" +" verbose\t\tsama kuin -v\n" +" vi\t\tkäytä vi-tyylistä komentorivieditointia\n" +" xtrace\t\tsama kuin -x\n" +" -p Asetetaan jos todellinen ja efektiivinen uid eivät täsmää.\n" +" Poistaa $ENV-tiedoston käsittelyn ja funktioiden tuonnin " +"käytöstä.\n" +" Tämän valitsimen poistaminen aiheuttaa efektiivisen uid:n ja gid:" +"n\n" +" (käyttäjä- ja ryhmätunnus) asettamisen todelliseksi uid:ksi ja \n" +" gid:ksi.\n" +" -t Poistu yhden komennon lukemisen ja suorittamisen jälkeen.\n" +" -u Kohtele asettamattomia muuttujia virheenä korvauksen yhteydessä.\n" +" -v Tulosta komentotulkin syöterivit lukemisen myötä.\n" +" -x Tulosta komennot argumentteineen niitä suoritettaessa.\n" +" -B Komentotulkki suorittaa aaltosulkeitten laajentamisen\n" +" -C Jos asetettu, estää tavallisten tiedostojen päällekirjoittamisen\n" +" uudelleenohjauksella.\n" +" -E Jos asetettu, ERR-kaappaus periytyy funktioihin\n" +" -H Ota !-tyylinen historian korvaus käyttöön. Tämä on " +"oletusarvoisesti\n" +" päällä, mikäli komentotulkki on interaktiivinen.\n" +" -P Jos asetettu, älä seuraa symbolisia linkkejä suoritettaessa\n" +" hakemistoa vaihtavia komentoja, kuten cd.\n" +" -T Jos asetettu, funktiot perivät DEBUG-kaappauksen\n" +" - Sijoita loput argumentit positionaalisiin parametreihin. -x - ja \n" +" -v -optiot poistetaan käytöstä.\n" +" \n" +" Mikäli käytetään ”+”-merkkiä ”-”:n sijaan, optiot otetaan pois päältä.\n" +" Valitsimet voidaan myös asettaa komentotulkin käynnistyksessä.\n" +" Asetetut valitsimet löytyvät muuttujasta $-. Loput N ARGUMENTTIA ovat\n" +" positionaalisia parametreja ja asetetaan järjestyksessä muuttujiin\n" +" $1, $2, .. $N. Jos argumentteja ei ole annettu, tulostetaan kaikki\n" +" ympäristömuuttujat.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistumisen ellei ole annettu virheellistä valitsinta." + +#: builtins.c:1139 +#, fuzzy +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Poista ympäristömuuttujien ja funktioiden arvoja ja attribuutteja.\n" +"\n" +" Poista jokaisen NIMI-niminen muuttuja tai funktio.\n" +"\n" +" Valitsimet:\n" +" -f\tkohtele jokaista NIMEÄ funktiona\n" +" -v\tkohtele jokaista NIMEÄ muuttujana\n" +" \n" +" Ilman valitsimia unset yrittää ensin poistaa muuttujan, ja mikäli se\n" +" epäonnistuu, yrittää poistaa funktion.\n" +" \n" +" Joitain muuttujia ei voi poistaa; katso myös ”readonly”.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" +" tai NIMI on kirjoitussuojattu." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Aseta ympäristömuuttujien vientiattribuutin.\n" +" \n" +" Merkitse kukin NIMI vietäväksi automaattisesti suoritettujen komentojen\n" +" ympäristöön. Jos ARVO on annettu, se sijoitetaan NIMEEN ennen vientiä.\n" +" \n" +" Valitsimet:\n" +" -f\tviittaa komentotulkin funktioihin\n" +" -n\tpoista jokaiselta NIMELTÄ vientiattribuutti\n" +" -p\tlistaa kaikki viedyt muuttujat ja funktiot\n" +" \n" +" ”--” argumenttina lopettaa valitsimien käsittelyn.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" +" tai NIMI on virheellinen." + +#: builtins.c:1180 +#, fuzzy +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Merkitse ympäristömuuttujat kirjoitussuojatuiksi.\n" +" \n" +" Merkitse kukin NIMI kirjoitussuojatuksi; näiden NIMIEN arvoa ei voi\n" +" muuttaa. Jos ARVO on annettu, sijoita se NIMEEN ennen merkitsemistä\n" +" kirjoitussuojatuksi.\n" +" \n" +" Valitsimet:\n" +" -a\tviittaa indeksoidun taulukon muuttujiin\n" +" -A\tviittaa assosiatiivisen taulukon muuttujiin\n" +" -f\tviittaa funktioihin\n" +" -p\tnäytä lista kirjoitussuojatuista muuttujista ja funktioista\n" +" \n" +" Argumentti ”--” päättää valitsimien käsittelyn.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" +" tai NIMI on virheellinen." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Siirrä positionaalisia parametreja.\n" +" \n" +" Siirrä positionaalisia parametreja $N+1, $N+2 ... parametreihin $1, " +"$2 ...\n" +" Jos N:ää ei ole annettu, sen oletetaan olevan 1.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen ellei N ole negatiivinen tai suurempi kuin $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Suorittaa tiedoston komennot nykyisessä komentotulkissa.\n" +" \n" +" Lue ja suorita komennot TIEDOSTOSTA nykyisessä tulkissa. $PATH:in\n" +" komponentteja käytetään TIEDOSTON sisältävän hakemiston haussa.\n" +" Mahdolliset ARGUMENTIT sijoitetaan positionaalisiksi parametreiksi\n" +" TIEDOSTOA suoritettaessa.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa viimeisen TIEDOSTON suoritetun komennon paluuarvon; " +"epäonnistuu\n" +" mikäli TIEDOSTOA ei voida lukea." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Keskeyttää komentotulkin suorituksen.\n" +" \n" +" Keskeyttää tämän tulkin suorituksen kunnes se saa SIGCONT-signaalin.\n" +" Sisäänkirjautumistulkkeja ei voi keskeyttää kuin väkisin.\n" +" \n" +" Valitsimet:\n" +" -f\tpakota keskeyttämään, vaikka tulkki olisi sisäänkirjautumis-\n" +" \ttulkki.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos työnohjaus ei ole käytössä tai " +"tapahtuu\n" +" virhe." + +#: builtins.c:1261 +#, fuzzy +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Evaluoi ehdollisen lausekkeen.\n" +" \n" +" Poistuu arvolla 0 (tosi) tai 1 (epätosi) riippuen LAUSEKKEEN " +"evaluoinnista.\n" +" Lausekkeen voivat olla unaarisia tai binäärisiä. Unaarisia lausekkeita\n" +" käytetään usein tarkistamaan tiedoston tila. On myös merkkijono-\n" +" operaattoreita, ja operaattoreita numeroiden vertailuun.\n" +" \n" +" Tiedosto-operaattorit:\n" +" \n" +" -a TIEDOSTO Tosi jos tiedosto on olemassa.\n" +" -b TIEDOSTO Tosi jos tiedosto on lohkolaite.\n" +" -c TIEDOSTO Tosi jos tiedosto on merkkilaite.\n" +" -d TIEDOSTO Tosi jos tiedosto on hakemisto.\n" +" -e TIEDOSTO Tosi jos tiedosto on olemassa.\n" +" -f TIEDOSTO Tosi jos tiedosto on olemassa ja on tavallinen " +"tiedosto.\n" +" -g TIEDOSTO Tosi jos tiedostolla on set-group-id -bitti.\n" +" -h TIEDOSTO Tosi jos tiedosto on symbolinen linkki.\n" +" -L TIEDOSTO Tosi jos tiedosto on symbolinen linkki.\n" +" -k TIEDOSTO Tosi jos tiedostolla on sticky-bitti.\n" +" -p TIEDOSTO Tosi jos tiedosto on nimetty putki.\n" +" -r TIEDOSTO Tosi jos sinulla on lukuoikeus tiedostoon.\n" +" -s TIEDOSTO Tosi jos tiedosto on olemassa eikä se ole tyhjä.\n" +" -S TIEDOSTO Tosi jos tiedosto on soketti.\n" +" -t FD Tosi jos FD on avattu päätteeseen.\n" +" -u TIEDOSTO Tosi jos tiedostolla on set-user-id -bitti.\n" +" -w TIEDOSTO Tosi jos sinulla on kirjoitusoikeus tiedostoon.\n" +" -x TIEDOSTO Tosi jos sinulla on tiedoston suoritusoikeus.\n" +" -O TIEDOSTO Tosi jos omistat tiedoston.\n" +" -G TIEDOSTO Tosi jos ryhmäsi omistaa tiedoston.\n" +" -N TIEDOSTO Tosi jos tiedostoa on muokattu viimeisen " +"lukukerran\n" +" jälkeen.\n" +" \n" +" TIEDOSTO1 -nt TIEDOSTO2 Tosi jos TIEDOSTO1 on uudempi kuin TIEDOSTO2\n" +" (muutospäivän perusteella).\n" +" \n" +" TIEDOSTO1 -ot TIEDOSTO2 Tosi jos TIEDOSTO1 on vanhempi kuin " +"TIEDOSTO2.\n" +" \n" +" TIEDOSTO1 -ef TIEDOSTO2 Tosi jos TIEDOSTO1 on kovolinkki TIEDOSTO2:" +"een.\n" +" \n" +" Merkkijono-operaattorit:\n" +" \n" +" -z JONO Tosi jos JONO on tyhjä.\n" +" \n" +" -n JONO\n" +" JONO Tosi jos JONO ei ole tyhjä.\n" +" \n" +" JONO1 = JONO2\n" +" Tosi jos JONOT ovat samat.\n" +" JONO1 != JONO2\n" +" Tosi jos JONOT eivät ole samat.\n" +" JONO1 < JONO2\n" +" Tosi jos JONO1 aakkostuu ennen JONO2:ta.\n" +" JONO1 > JONO2\n" +" Tosi jos JONO1 aakkostuu JONO2:n jälkeen.\n" +" \n" +" Muut operaattorit:\n" +" \n" +" -o VALITSIN Tosi jos tulkin VALITSIN on käytössä.\n" +" ! LAUSEKE Tosi jos LAUSEKE on epätosi.\n" +" LAUSEKE1 -a LAUSEKE2 \n" +" Tosi jos molemmat lausekkeet ovat tosia.\n" +" LAUSEKE1 -o LAUSEKE2 \n" +" Tosi jos jompikumpi lausekkeista on tosi.\n" +" \n" +" ARG1 OP ARG2 Aritmeettiset testit. OP on jokin seuraavista:\n" +" \t \t -eq, -ne, -lt, -le, -gt tai -ge.\n" +" \n" +" Binääriset aritmetiikkaoperaattorit palauttavat toden jos ARG1 on \n" +" yhtäsuuri, erisuuri, pienempi, pienempi tai yhtä suuri, suurempi\n" +" tahi suurempi tai yhtä suuri kuin ARG2.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistumisen jos LAUSEKE evaluoituu todeksi; epäonnistuu jos\n" +" LAUSEKE evaluoituu vääräksi tai on annettu virheellinen argumentti." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Evaluoi ehdollisen lausekkeen.\n" +" \n" +" Tämä on sisäänrakennetun ”test”-komennon synonyymi, mutta viimeisen\n" +" argumentin pitää olla ”]”, joka sulkee avaavan ”[”:n." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Näyttää prosessiajat.\n" +" \n" +" Tulostaa kumuloituneet käyttäjä- ja järjestelmäajat sekä " +"komentotulkille\n" +" että kaikille sen lapsiprosesseille.\n" +" \n" +" Paluuarvo:\n" +" Onnistuu aina." + +#: builtins.c:1364 +#, fuzzy +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Kaappaa signaalit ja muut poikkeamat.\n" +" \n" +" Määrittelee ja aktivoi käsittelijöitä, jotka suoritetaan kun " +"komentotulkki\n" +" saa signaalin tai muissa tilanteissa.\n" +" \n" +" ARGUMENTTI on luettava ja suoritettava komento kun tulkki saa \n" +" SIGNAALIissa määritellyn signaalin/signaalit. Jos ARGUMENTTI puuttuu\n" +" (ja vain yksittäinen SIGNAALI on annettu) tai on ”-”, kukin määrätty\n" +" signaali palautetaan oletusarvoonsa. Jos ARGUMENTTI on tyhjä " +"merkkijono,\n" +" tulkki ja sen käynnistämät komennot jättävät annetut signaalit " +"huomiotta.\n" +" \n" +" Jos SIGNAALI on EXIT (0), ARGUMENTTI suoritetaan tulkin poistuessa.\n" +" Jos SIGNAALI on DEBUG, ARGUMENTTI suoritetaan ennen jokaista " +"yksittäistä\n" +" komentoa.\n" +" \n" +" Jos argumentteja ei ole annettu, trap tulostaa kuhunkin signaaliin " +"liitetyt\n" +" komennot.\n" +" \n" +" Valitsimet:\n" +" -l\ttulostaa listan signaalien nimistä ja vastaavista numeroista\n" +" -p\ttulostaa kuhunkin signaaliin liitetyt kaappauskomennot\n" +" \n" +" Kukin SIGNAALI on joko signaalin nimi -tiedostossa tai " +"numero.\n" +" Signaalien nimet eivät ole aakkoslajillisia ja alkuosa SIG on " +"valinnainen.\n" +" Signaali lähetetään tulkille komennolla ”kill -signal $$”.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneet paitsi jos SIGNAALI on virheellinen tai on " +"annettu\n" +" virheellinen valitsin." + +#: builtins.c:1400 +#, fuzzy +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Näyttää tietoja komentotyypistä.\n" +" \n" +" Näyttää, miten kukin NIMI tulkittaisiin, jos sitä käytettäisiin " +"komentona.\n" +" \n" +" Valitsimet:\n" +" -a\tnäyttää kaikki paikat, jossa on NIMI-niminen ohjelma; sisältää\n" +" \taliakset, sisäänrakennetut komennot ja funktiot, jos ja vain\n" +" \tjos -p -valitsinta ole käytetty\n" +" -f\testää funktiohaun\n" +" -P\tpakottaa hakemaan NIMET hakupolulta, vaikka se olisikin alias,\n" +" \tsisäänrakennettu komento, tai funktio, ja palauttaa \n" +" \tsuoritettavan levytiedoston nimen\n" +" -p\tpalauttaa joko suoritettavan levytiedoston nimen, tai ei mitään\n" +" \tjos ”type -t NIMI” ei palauttaisi ”file”.\n" +" -t\ttulosta sana, joka on ”alias”, ”keyword”, ”function”,\n" +" \t”builtin”, ”file” tai ””, jos NIMI on alias,\n" +" \tavainsana, funktio, sisäänrakennettu komento, levytiedosto tai\n" +" \tsitä ei löytynyt.\n" +" \n" +" Argumentit:\n" +" NIMI\tTulkittavan komennon nimi.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen mikäli kaikki NIMET löytyivät, muussa tapauksessa\n" +" epäonnistuu." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Muuttaa komentotulkin resurssirajoituksia.\n" +" \n" +" Antaa kontrollin tulkin ja sen luomien prosessien resursseille \n" +" järjestelmissä, jossa se on mahdollista.\n" +" \n" +" Valitsimet:\n" +" -S\tkäytä ”pehmeää” resurssirajaa\n" +" -H\tkäytä ”kovaa” resurssirajaa\n" +" -a\traportoi nykyiset rajat\n" +" -b\tsoketin puskurikoko\n" +" -c\tluotujen core-tiedostojen maksimikoko\n" +" -d\tprosessin datasegmentin maksimikoko\n" +" -e\tylin skedulointiprioriteetti (”nice”-arvo)\n" +" -f\tkomentotulkin ja sen lapsiprosessien kirjoittamien tiedostojen\n" +" \tmaksimikoko\n" +" -i\todottavien signaalien maksimimäärä\n" +" -l\tprosessin lukitseman muistin maksimikoko\n" +" -m\tmuistinvaraisen joukon maksimikoko\n" +" -n\tavointen tiedostokahvojen maksimimäärä\n" +" -p\tputken puskurikoko\n" +" -q\tPOSIX-viestijonoissa olevien tavujen maksimi\n" +" -r\tsuurin reaaliaikaskedulointi-prioriteetti\n" +" -s\tpinon maksimikoko\n" +" -t\tenin CPU-aika sekunneissa\n" +" -u\tkäyttäjäprosessien maksimimäärä\n" +" -v\tvirtuaalimuistin koko\n" +" -x\ttiedostolukitusten maksimimäärä\n" +" \n" +" Jos RAJA on annettu, se on määrätyn resurssin uusi arvo; RAJAN " +"erikoisarvot\n" +" ”soft”, ”hard” ja ”unlimited” tarkoittavat nykyistä pehmeää, kovaa ja\n" +" rajatonta. Muussa tapauksessa tulostetaan annetun resurssin arvo. Jos\n" +" valitsimia ei ole annettu, oletetaan -f.\n" +" \n" +" Arvon ovat 1024 tavun monikertoja, paitsi -t:n, joka on sekuntteja,\n" +" -p, jota kasvatetaan 512 tavun osissa, ja -u, joka on prosessien \n" +" skaalaamaton määrä.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" +" tai tapahtuu virhe." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Näyttää tai asettaa tiedoston tilamaskin.\n" +" \n" +" Asettaa käyttäjän tiedostonluontimaskin TILAKSI. Jos TILAA ei ole \n" +" annettu, tulostaa maskin nykyisen arvon.\n" +" \n" +" Jos TILA alkaa numerolla, se käsitellään oktaalinumerona; muussa\n" +" tapauksessa se on symbolinen tilamerkkijono jonka chmod(1) hyväksyy.\n" +" \n" +" Valitsimet:\n" +" -p\tjos TILAA ei ole annettu, tulostetaan hyödynnettävässä\n" +" \tmuodossa\n" +" -S\ttulostaa symbolisena; muussa tapauksessa tulostetaan\n" +" \toktaaliluku\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen ellei TILA ole virheellinen tai on annettu \n" +" virheellinen valitsin." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Odottaa työn valmistumista ja palauttaa paluuarvon.\n" +" \n" +" Odottaa ID:llä tunnistettua prosessia, joka (ID) voi olla " +"prosessitunnus\n" +" tai työtunniste, ja palauttaa sen paluuarvon. Jos ID:tä ei ole annettu,\n" +" odottaa kaikkia tällä hetkellä aktiivisia lapsiprosesseja, ja paluuarvo\n" +" on nolla. Jos ID on työtunniste, odottaa kaikkia prosesseja työn " +"komento-\n" +" putkessa.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa ID:n tilan; epäonnistuu jos ID on virheellinen tai on annettu\n" +" virheellinen valitsin." + +#: builtins.c:1533 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Odottaa työn valmistumista ja palauttaa paluuarvon.\n" +" \n" +" Odottaa annettua prosessia ja palauttaa sen paluuarvon. Jos prosessi-\n" +" tunnistetta (PID) ei ole annettu, odottaa kaikkia tällä hetkellä " +"aktiivisia \n" +" lapsiprosesseja, ja paluuarvo on nolla.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa ID:n tilan; epäonnistuu jos ID on virheellinen tai on annettu\n" +" virheellinen valitsin." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Suorittaa komennot listan jokaiselle jäsenelle.\n" +" \n" +" ”For”-silmukka suorittaa komentoketjun listan jokaiselle alkiolle. Jos\n" +" ”in SANAT ...;” ei ole annettu, käytetään rakennetta ”in $@”. NIMI " +"asetetaan\n" +" vuorollaan jokaiseksi SANAT-listan alkioksi, ja KOMENNOT suoritetaan.\n" +" \n" +" Paluuarvo:\n" +" Viimeisen suoritetun komennon paluuarvo." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmeettinen for-silmukka.\n" +" \n" +" Vastaa\n" +" \t(( LAUSEKE1))\n" +" \twhile (( LAUSEKE2 )); do\n" +" \t\tKOMENNOT\n" +" \t\t(( LAUSEKE3 ))\n" +" \tdone\n" +"\n" +" LAUSEKE1, LAUSEKE2 ja LAUSEKE3 ovat aritmeettisiä lausekkeita. Jos " +"jokin\n" +" lauseke on jätetty pois, se tulkitaan 1:ksi.\n" +" \n" +" Paluuarvo:\n" +" Viimeisen suoritetun komennon paluuarvo." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Valitsee sanat listasta ja suorittaa komennot.\n" +" \n" +" SANAT lavennetaan, jolloin saadaan sanalista. Lavennettujen sanojen " +"joukko\n" +" tulostetaan vakiovirhetulosteeseen juoksevasti numeroituna. Jos ”in " +"SANAT”\n" +" puuttuu, käytetään rakennetta ”in $@”. Tämän jälkeen tulostetaan \n" +" PS3-kehote ja vakiosyötteestä luetaan rivi. Mikäli rivi koostuu \n" +" numerosta joka vastaa jotakin tulostetuista sanoista, asetetaan NIMEN \n" +" arvoksi kyseinen sana. Jos rivi on tyhjä, SANAT ja kehote tulostetaan \n" +" uudelleen. Mikäli saadaan EOF (tiedoston loppu), komento päättyy.\n" +" Mikä tahansa muu luettu arvo aiheuttaa NIMEN tyhjäämisen. Luettu rivi \n" +" tallennetaan REPLY-muuttujaan. KOMENNOT suoritetaan kunkin valinnan \n" +" jälkeen kunnes suoritetaan break-komento.\n" +"\n" +" Paluuarvo:\n" +" Viimeisen suoritetun komennon paluuarvo." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Raportoi komentoketjun suoritusajan.\n" +" \n" +" Suorita KOMENTOKETJU ja tulosta yhteenveto käytetystä ajasta, käyttäjän\n" +" CPU-ajasta ja järjestelmän CPU-ajasta KOMENTOKETJUA suoritettaessa sen\n" +" päätyttyä.\n" +" \n" +" Valitsimet:\n" +" -p\ttulosta ajastusyhteenveto siirrettävässä POSIX-muodossa.\n" +" \n" +" Tulosteen muotoilussa käytetään TIMEFORMAT-muuttujan arvoa.\n" +" \n" +" Paluuarvo:\n" +" KOMENTOKETJUN paluuarvo." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Suorittaa komentoja tekstihaun perusteella.\n" +" \n" +" Suorittaa valikoiden KOMENTOJA perustuen SANAAN joka sopii " +"MALLINEESEEN.\n" +" ”|”:ea käytetään erottamaan mallineita.\n" +" \n" +" Paluuarvo:\n" +" Viimeisen suoritetun komennon paluuarvo." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Suorittaa komentoja ehdollisesti.\n" +" \n" +" ”if KOMENNOT”-lista suoritetaan. Jos sen paluuarvo on nolla, " +"suoritetaan\n" +" ”then KOMENNOT”-lista. Muussa tapauksessa suoritetaan vuorollaan\n" +" kukin ”elif KOMENNOT”-lista, ja jos sen paluuarvo on nolla, suoritetaan\n" +" vastaava ”then KOMENNOT”-lista ja if-komento päätetään. Muutoin\n" +" suoritetaan ”else KOMENNOT”-lista, jos sellainen on. Koko rakenteen\n" +" paluuarvo on viimeisen komennon paluuarvo tai nolla, jos mikään ehto\n" +" ei toteutunut.\n" +"\n" +" Paluuarvo:\n" +" Viimeisen suoritetun komennon paluuarvo." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Suorittaa komentoja niin kauan kun testi onnistuu.\n" +" \n" +" Laventaa ja suorittaa KOMENTOJA niin kauan kun viimeinen komento\n" +" ”while KOMENNOT” palauttaa nollan.\n" +" \n" +" Paluuarvo:\n" +" Viimeisen komennon paluuarvo." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Suorittaa komentoja niin kauan kun testi epäonnistuu.\n" +" \n" +" Laventaa ja suorittaa KOMENTOJA niin kauna kun viimeinen komento\n" +" ”until KOMENNOT” palauttaa nollasta poikkeavan paluuarvon.\n" +" \n" +" Paluuarvo:\n" +" Viimeisen suoritetun komennon paluuarvo." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Luo NIMI-nimisen rinnakkaisprosessin.\n" +" \n" +" Suorittaa KOMENNON asynkronisesti, vakiotuloste ja vakiosyöte\n" +" ohjattuna putken kautta tiedostokahvoihin suorittavan tulkin NIMI-" +"nimisen\n" +" taulukon indekseihin 0 ja 1. Oletus-NIMI on ”COPROC”.\n" +" \n" +" Paluuarvo:\n" +" KOMENNON paluuarvo." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Luo funktion.\n" +" \n" +" Luo komentotulkin funktion NIMI. Jos NIMI käynnistetään komentona,\n" +" KOMENNOT ajetaan kutsuvan tulkin ympäristössä. Kun NIMI käynnistetään,\n" +" sen argumentit välitetään parametreina $1...$n, ja funktion nimi\n" +" sijoitetaan muuttujaan $FUNCNAME.\n" +" \n" +" Paluuarvo:\n" +" Onnistuu, ellei NIMI ole kirjoitussuojattu." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ryhmittää komennot.\n" +" \n" +" Suorittaa komennot ryhmässä. Tämä on eräs tapa uudelleenohjata " +"kokonaisen\n" +" komentojoukon tulosteet.\n" +" \n" +" Paluuarvo:\n" +" Viimeisen suoritetun komennon paluuarvo." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Siirtää komennon edustalle.\n" +" \n" +" Sama kuin ”fg”-komennon TYÖNKUVAAJA-argumentti. Jatkaa joko " +"keskeytettyä\n" +" tai taustatyötä. TYÖNKUVAAJA voi määritellä joko työn nimen tai " +"numeron.\n" +" Jos TYÖNKUVAAJAA seuraa ”&” siirretään työ taustalle, kuten jos " +"työnkuvaaja\n" +" olisi annettu ”bg”-komennon argumentiksi.\n" +" \n" +" Paluuarvo:\n" +" Työn tila." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Evaluoi artimeettinen lauseke.\n" +" \n" +" LAUSEKKEEN arvo evaluoidaan laskentasääntöjen mukaisesti. Sama kuin\n" +" ”let LAUSEKE”.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa 1, jos LAUSEKKEEN arvo on 0; muuten palauttaa 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Suorittaa ehdollisen komennon.\n" +" \n" +" Palauttaa 0 tai 1 riippuen ehdollisen LAUSEKKEEN tuloksesta. " +"Lausekkeissa\n" +" käytetään samoja primäärejä kuin sisäänrakennetussa ”test”-komennossa,\n" +" ja voidaan yhdistellä seuraavilla operaattoreilla:\n" +" \n" +" ( LAUSEKE )\tPalauttaa LAUSEKKEEN arvon\n" +" ! LAUSEKE\t\tTosi jos LAUSEKE on epätosi; muuten epätosi\n" +" LAUSEKE1 && LAUSEKE2\tTosi jos molemmat lausekkeet ovat tosia, muuten\n" +" \t\tepätosi\n" +" LAUSEKE1 || LAUSEKE2\tTosi jos jompikumpi lausekkeista on tosi,\n" +" \t\t\tmuuten epätosi\n" +" \n" +" Käytettäessä ”==”- ja ”!=”-operaattoreita oikeanpuoleista merkkijonoa \n" +" käytetään mallineena ja suoritetaan haku sen perusteella. Operaattoria\n" +" ”=~” käytettäessä oikeanpuoleinen merkkijonoa käsitellään kuten " +"säännöllistä\n" +" lauseketta.\n" +"\n" +" Operaattorit ”&&” ja ”||” eivät evaluoi LAUSEKETTA2 jos LAUSEKE1 " +"riittää\n" +" lausekkeen arvon päättelyyn.\n" +" \n" +" Paluuarvo:\n" +" 0 tai 1 riippuen LAUSEKKEEN arvosta." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Yleisiä komentotulkin muuttujia ja niiden käyttö.\n" +" \n" +" BASH_VERSION\tTämän Bashin versiotiedot.\n" +" CDPATH\tKaksoispistein eroteltu lista hakemistoista, joista etsitään\n" +" \t\t”cd”-komennolle argumentiksi annettua hakemistoa.\n" +" GLOBIGNORE\tKaksoispistein eroteltu lista mallineista, joihin sopivat\n" +" \t\ttiedostonimet jätetään huomiotta polun laventamisessa.\n" +" HISTFILE\tTiedosto, johon komentohistoriasi tallennetaan.\n" +" HISTFILESIZE\tMaksimi rivimäärä tähän tiedostoon tallennetaan.\n" +" HISTSIZE\tTulkin käytettävissä olevien historiarivien maksimimäärä\n" +" HOME\tTäydellinen polku sisäänkirjautumishakemistoosi.\n" +" HOSTNAME\tNykyisen palvelimen nimi.\n" +" HOSTTYPE\tCPU-tyyppi, jonka alaisuudessa tämä Bash-versio on ajossa.\n" +" IGNOREEOF\tKontrolloi, miten tulkki toimii saadessaan syötteenä pelkän\n" +" \t\tEOF:n (tiedoston loppu). Jos asetettu, sen määrittelemä\n" +" \t\tlukumäärä EOF:iä voidaan lukea syötteenä peräkkäin ennenkuin\n" +" \t\ttulkki poistuu (oletuksena 10). Jos ei ole asetettu, EOF\n" +" \t\tmerkitsee syötteen loppua.\n" +" MACHTYPE\tJärjestelmää kuvaava merkkijono.\n" +" MAILCHECK\tMiten monen sekunnein välein Bash tarkistaa uudet postit.\n" +" MAILPATH\tKaksoispistein eroteltu lista tiedostoista joista Bash\n" +" \t\ttarkistaa uudet postit.\n" +" OSTYPE\tJärjestelmän Unix-versio.\n" +" PATH\tKaksoispistein eroteltu lista hakemistoista, joista etsitään\n" +" \t\tkomentoja.\n" +" PROMPT_COMMAND\tEnnen primäärin kehotteen tulostamista suoritettava\n" +" \t\tkomento.\n" +" PS1\t\tPrimääri komentokehote.\n" +" PS2\t\tSekundääri kehote.\n" +" PWD\t\tNykyisen hakemiston täydellinen polkunimi.\n" +" SHELLOPTS\tKaksoispistein eroteltu lista käytössä olevista tulkin\n" +" \t\tvalitsimista.\n" +" TERM\tKäytettävän päätetyypin nimi.\n" +" TIMEFORMAT\t”time”-käskyn tulosteen muotoilumalline.\n" +" auto_resume\tJos ei tyhjä, ensimmäistä rivillä olevaa komentosanaa " +"etsitään\n" +" \t\tkeskeytettyjen töiden listasta. Jos sana löydetään, kyseinen\n" +" \t\ttyö tuodaan esiin. ”exact”-arvo tarkoittaa, että komentosanan\n" +" \t\tpitää olla täysin sama kuin keskeytettyjen listalta löytyvä.\n" +" \t\tArvo ”substring” tarkoittaa että komentosanan pitää olla\n" +" \t\tosa työnimeä. Mikä tahansa muu tarkoittaa että komennon pitää\n" +" \t\tolla keskeytetyn työn nimen alkuosa.\n" +" histchars\tMerkit, jotka ohjaavat historialistasta hakua ja " +"pikakorvausta.\n" +" \t\tEnsimmäinen merkki on historiakorvausmerkki, tavallisesti ”!”.\n" +" \t\tToinen, pikakorvausmerkki, on yleensä ”^”. Kolmas merkki,\n" +" \t\ttavallisesti ”#”, on historiakommentti.\n" +" HISTIGNORE\tKaksoispistein eroteltu lista mallineista, joita käytetään\n" +" \t\tpäätettäessä komentojen tallentamisesta historialistaan.\n" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Lisää hakemistoja pinoon.\n" +" \n" +" Lisää hakemiston hakemistopinon päällimmäiseksi, tai kierrättää pinoa,\n" +" jolloin nykyhakemisto siirretään pinon päällimmäiseksi. Ilman " +"argumentteja\n" +" vaihtaa pinon kaksi päällimmäistä keskenään.\n" +" \n" +" Valitsimet:\n" +" -n\tJättää normaalin hakemiston vaihdon tekemättä lisättäessä\n" +" \t\thakemistoja pinoon, joten ainoastaan pinoa muokataan.\n" +" \n" +" Argumentit:\n" +" +N\tKierrättää pinoa niin, että N:s hakemisto (laskien vasemmalta\n" +" \t\t”dirs”-komennon tuottamasta listasta, alkaen nollasta) on\n" +" \t\tpinon päällimmäisenä.\n" +" -N\tKierrättää pinoa niin, että N:s hakemisto (laskien oikealta\n" +" \t\t”dirs”-komennon tuottamasta listasta, alkaen nollasta) on\n" +" \t\tpinon päällimmäisenä.\n" +" HAKEM\tLisää HAKEMIN hakemistopinon päällimmäiseksi ja tekee \n" +" \t\tsiitä työhakemiston.\n" +" \n" +" Sisäänrakennettu ”dirs” näyttää hakemistopinon.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen, paitsi jos on annettu virheellinen argumentti " +"tai\n" +" hakemiston vaihtaminen epäonnistuu." + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Poistaa hakemistoja pinosta.\n" +" \n" +" Poistaa alkioita hakemistopinosta. Ilman argumentteja poistaa\n" +" pinon päällimmäisen, ja siirtyy uuteen ylimpään hakemistoon.\n" +" \n" +" Valitsimet:\n" +" -n\tJättää normaalin hakemistoon siirtymisen suorittamatta,\n" +" \t\tjoten vain pinoa muokataan.\n" +" +N\tPoistaa N:nnen alkion (laskien vasemmalta ”dirs”-komennon\n" +" \t\ttuottamasta listasta, alkaen nollasta). Esimerkiksi ”popd +0”\n" +" \t\tpoistaa ensimmäisen hakemiston, ”popd +1” toisen.\n" +" -N\tPoistaa N:nnen alkion (laskien oikealta ”dirs”-komennon\n" +" \ttuottamasta listasta, alkaen nollasta). Esimerkiksi ”popd -0”\n" +" \tpoistaa viimeisen hakemiston, ”popd -1” toiseksi viimeisen.\n" +"\n" +" Sisäänrakennettu ”dirs”-komento listaa hakemistopinon.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen argumentti tai\n" +" hakemiston vaihto epäonnistuu." + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Näyttää hakemistopinon.\n" +" \n" +" Näyttää listan tällä hetkellä muistetuista hakemistoista. Hakemistot\n" +" päätyvät listalle ”pushd”-komennolla; voit selata pinoa ”popd”-\n" +" komennolla.\n" +" \n" +" Valitsimet:\n" +" -c\tTyhjennä hakemistopino poistamalla kaikki alkiot\n" +" -l\tälä tulosta tilde-alkuisia versioita kotihakemistoon \n" +" \tsuhteutetuista hakemistoista\n" +" -p\ttulosta hakemistopuu hakemisto per rivi\n" +" -v\ttulosta hakemistopuu, hakemisto per rivi, numeroituina \n" +" \tpinoindeksin mukaan\n" +" \n" +" Argumentit:\n" +" +N\tNäyttää N:nnen alkion (”dirs”-komennon tuottamasta listasta\n" +" \tvasemmalta laskien) alkaen nollasta käynnistettäessä ilman\n" +" \toptioita.\n" +" -N\tNäyttää N:nnen alkion (”dirs”-komennon tuottamasta listasta\n" +" \toikealta laskien) alkaen nollasta käynnistettäessä ilman\n" +" \toptioita.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" +" tai tapahtuu virhe." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Asettaa ja poistaa komentotulkin valitsimia.\n" +" \n" +" Muuttaa kunkin tulkin VALITSIMEN asetuksen. Ilman argumentteja\n" +" listaa kaikki tulkin valitsimet ja tiedon, onko valitsin voimassa \n" +" vai ei.\n" +" \n" +" Valitsimet:\n" +" -o\trajaa VALITSIMET niihin, jotka on määritelty käytettäväksi\n" +" \t”set -o”:lla\n" +" -p\ttulosta kukin tulkin valitsin ja sen tila\n" +" -q\tälä tulosta\n" +" -s\taseta kukin VALITSIN\n" +" -u\tpoista kukin VALITSIN\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen, mikäli VALITSIN on käytössä, epäonnistuu jos on\n" +" annettu virheellinen VALITSIN tai VALITSIN ei ole käytössä." + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Muotoilee ja tulostaa ARGUMENTIT MUOTOILULLA muotoiltuna.\n" +" \n" +" Valitsimet:\n" +" -v muuttuja\tsijoita tuloste muuttujaan MUUTTUJA, älä tulosta\n" +" \n" +" MUOTOILU on merkkijono, joka koostuu kolmentyyppisistä alkioista:\n" +" tavallisista merkeistä, jotka vain kopioidaan vakiotulosteeseen;\n" +" escape-yhdistelmistä, jotka muunnetaan ja kopioidaan vakiotulosteeseen; " +"ja\n" +" muotoilumäärityksistä, joista jokainen aiheuttaa seuraavan vuorossa\n" +" olevan argumentin tulostamisen.\n" +"\n" +" Printf(1):n ja printf(3):n vakiomuotoilujen lisäksi printf tulkitsee:\n" +" %b\tlavenna escape-yhdistelmät vastaavassa argumentissa\n" +" %q\tkapseloi argumentti siten, että se voidaan käyttää tulkin\n" +" \tsyötteenä\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n" +" tapahtuu kirjoitus- tai sijoitusvirhe." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Määrittelee miten readline täydentää argumentit.\n" +" \n" +" Määrittelee, miten kukin NIMI täydennetään. Ilman valitsimia " +"tulostetaan\n" +" nykyiset täydennysmääritykset siten, että niitä voidaan käyttää \n" +" syötteenä.\n" +" \n" +" Valitsimet:\n" +" -p\ttulostaa olemassa olevat täydennysmääritykset \n" +" hyödynnettävässä muodossa\n" +" -r\tpoista täydennysmääritys kultakin NIMELTÄ, tai, jos NIMIÄ ei\n" +" \tole annettu, kaikki täydennysmääritykset\n" +" \n" +" Täydennystä yritettäessä toimenpiteen suoritetaan samassa " +"järjestyksessä\n" +" missä isoilla kirjoitetut valitsimet on edellä listattu.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai \n" +" tapahtuu virhe." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Näyttää mahdolliset täydenteet valitsimista riippuen.\n" +" \n" +" Tarkoitettu käytettäväksi komentotulkin funktiossa, joka luo " +"mahdollisia\n" +" täydenteitä. Jos valinnainen argumentti SANA on annettu, luodaan siihen\n" +" sopivat täydenteet.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n" +" tapahtuu virhe." + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Muuttaa tai näyttää täydennysvalitsimet.\n" +" \n" +" Muuttaa kunkin NIMEN, tai jos NIMIÄ ei ole annettu, tämänhetkisen\n" +" täydennyksen täydennysvalitsimia. Jos VALITSIMIA ei ole annettu, \n" +" tulostaa kunkin NIMEN tai tämänhetkisen täydennyksen \n" +" täydennysvalitsimet.\n" +" \n" +" Valitsimet:\n" +" \t-o valitsin\taseta täydennysvalitsin VALITSIN kullekin NIMELLE\n" +" \n" +" Käyttämällä ”+o”:ta ”-o”:n sijaan kyseinen valitsin poistetaan.\n" +" \n" +" Argumentit:\n" +" \n" +" Kukin NIMI viittaa komentoon jolle täydennysmääritys on ollut pakko\n" +" määritellä aiemmin käyttämällä sisäänrakennettua komentoa ”complete”.\n" +" Jos NIMIÄ ei ole annettu, compoptia pitää kutsua tällä hetkellä\n" +" täydennyksiä tuottavasta funktiosta, ja sen valitsimia muutetaan.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n" +" NIMELLE ei ole määritetty täydennysmääritystä." + +#: builtins.c:2047 +#, fuzzy +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Lukee rivejä vakiosyötteestä taulukkomuuttujaan.\n" +" \n" +" Lukee rivejä vakiosyötteestä taulukkomuuttujaan TAULUKKO, tai \n" +" tiedostokahvasta TK jos käytetään -u -valitsinta. Muuttuja MAPFILE\n" +" on oletus-TAULUKKO.\n" +" \n" +" Valitsimet:\n" +" -n laskuri\tKopioi korkeintaan LASKURI riviä. Jos LASKURI on 0,\n" +" \t\tkaikki rivit kopioidaan.\n" +" -O alku\t\tAloita sijoitus indeksistä ALKU. Oletusindeksi on 0.\n" +" -s laskuri\tHylkää LASKURI ensimmäistä luettua riviä.\n" +" -t\t\tPoista rivinloppumerkki jokaisesta luetusta rivistä.\n" +" -u TK\t\tLue rivit tiedostokahvasta TK.\n" +" -C paluukutsu\tSuorita PALUUKUTSU aina, kun MÄÄRÄ riviä on luettu.\n" +" -c määrä\t\tMäärittele, montako riviä luetaan ennen kutakin \n" +" \t\tPALUUKUTSUA.\n" +" \n" +" Argumentit:\n" +" TAULUKKO\t\tTaulukkomuuttuja, johon tiedot luetaan.\n" +"\n" +" Jos -C on annettu ilman -c:tä, oletusmäärä on 5000. Kun PALUUKUTSUA\n" +" evaluoidaan, sille annetaan indeksi seuraavaan sijoituspaikkaan\n" +" ylimääräisenä argumenttina.\n" +" \n" +" Jos ALKUA ei ole annettu, mapfile tyhjentää TAULUKON ennen siihen\n" +" sijoittamista.\n" +" \n" +" Paluuarvo:\n" +" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" +" tai TAULUKKO on kirjoitussuojattu." + +# Changed " characters into ”... +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Lukee rivit tiedostosta taulukkomuuttujaan.\n" +" \n" +" ”mapfile”:n synonyymi." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Palauttaa nykyisen alirutiinikutsun kontekstin.\n" +#~ " \n" +#~ " Ilman LAUSEKETTA palauttaa" + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: prosessi %5ld (%s) putkijonossa" + +#~ msgid "Unknown Signal #" +#~ msgstr "Tuntematon signaali #" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: ei voida uudelleenvarata %lu tavua (varattiin %lu tavua)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: ei voida varata %lu tavua" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: %s:%d: ei voida uudelleenvarata %lu tavua (varattiin %lu tavua)" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/bash-5.1/po/fr.gmo b/bash-5.1/po/fr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..2e08b7888abd8f4ffb67bae1197451fc00081cf0 Binary files /dev/null and b/bash-5.1/po/fr.gmo differ diff --git a/bash-5.1/po/fr.po b/bash-5.1/po/fr.po new file mode 100644 index 0000000000000000000000000000000000000000..a386f6e0953cd6205e3c5b66a267248abbf12e29 --- /dev/null +++ b/bash-5.1/po/fr.po @@ -0,0 +1,7087 @@ +# Messages français pour GNU concernant bash. +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Michel Robitaille , 2004 +# Christophe Combelles , 2008, 2009, 2010, 2011 +# Frédéric Marchal , 2019 +msgid "" +msgstr "" +"Project-Id-Version: bash-5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-10 20:44+0100\n" +"Last-Translator: Frédéric Marchal \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n >= 2);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "mauvais indice de tableau" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: retire l'attribut nameref" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s : impossible de convertir un tableau indexé en associatif" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s : clé non valable pour le tableau associatif" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s : impossible d'assigner à un index non numérique" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" +"%s : %s : l'assignation d'un tableau associatif doit se faire avec un indice" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s : impossible de créer : %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command : impossible de trouver le mappage clavier pour la " +"commande" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s : le premier caractère non vide n'est pas « \" »" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "pas de « %c » de fermeture dans %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s : virgule de séparation manquante" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "« %s » : impossible à délier" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansion des accolades : impossible d'allouer la mémoire pour %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"expansion des accolades : échec lors de l'allocation mémoire pour %u éléments" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansion des accolades : échec de l'allocation mémoire pour « %s »" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "« %s » : nom d'alias non valable" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "édition de ligne non activée" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "« %s » : nom du mappage clavier invalide" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s : impossible de lire : %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "« %s » : nom de fonction inconnu" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s n'est lié à aucune touche.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s peut être appelé via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "« %s » : impossible à délier" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "nombre de boucles" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "ceci n'a un sens que dans une boucle « for », « while » ou « until »" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Renvoie le contexte de l'appel de sous-routine actuel.\n" +" \n" +" Sans EXPR, renvoie « $ligne $nomfichier ». Avec EXPR,\n" +" renvoie « $ligne $sousroutine $nomfichier »; ces informations " +"supplémentaires\n" +" peuvent être utilisées pour fournir une trace de la pile.\n" +" \n" +" La valeur de EXPR indique le nombre de cadres d'appels duquel il faut " +"revenir en arrière\n" +" avant le cadre actuel ; le cadre supérieur est le cadre 0.\n" +" \n" +" Code de sortie :\n" +" Renvoie 0 à moins que le shell ne soit pas en train d'exécuter une " +"fonction ou que EXPR\n" +" ne soit pas valable." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "« HOME » non défini" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "trop d'arguments" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "répertoire nul" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "« OLDPWD » non défini" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "ligne %d : " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "avertissement :" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s : utilisation :" + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s : l'option nécessite un argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s : argument numérique nécessaire" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s : non trouvé" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s : option non valable" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s : nom d'option non valable" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "« %s » : identifiant non valable" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "nombre octal non valable" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "nombre hexadécimal non valable" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "nombre non valable" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s : indication de signal non valable" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "" +"« %s » : ce n'est pas un n° de processus ou une spécification de tâche " +"valable" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s : variable en lecture seule" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s : %s hors plage" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s hors plage" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s : tâche inexistante" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s : pas de contrôle de tâche" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "pas de contrôle de tâche" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s : restreint" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "restreint" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s : ceci n'est pas une primitive du shell" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "erreur d'écriture : %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "erreur lors de la définition de l'attribut du terminal : %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "erreur lors de la récupération de l'attribut du terminal : %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s : erreur de détermination du répertoire actuel : %s : %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s : spécification de tâche ambiguë" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "l'aide n'est pas disponible dans cette version" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s : « unset » impossible : %s est en lecture seule" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s : « unset » impossible" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s : nom d'action non valable" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s : pas d'indication de complètement" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "" +"avertissement : l'option « -F » peut fonctionner différemment de ce à quoi " +"vous vous attendez" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "" +"avertissement : l'option « -C » peut fonctionner différemment de ce à quoi " +"vous vous attendez" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "fonction de complétion actuellement non en cours d'exécution" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "utilisable seulement dans une fonction" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s : la variable de référence ne peut pas être un tableau" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s : références bouclées sur la même variable interdites" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s : référence de nom circulaire" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "« %s » : nom de variable invalide pour une référence de nom" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "« -f » ne peut pas être utilisé pour fabriquer des fonctions" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s : fonction en lecture seule" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" +"%s : l'assignation d'un tableau composé entre apostrophes est dépréciée" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s : impossible de détruire des variables tableaux de cette façon" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s : impossible de convertir un tableau indexé en tableau associatif" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "chargement dynamique non disponible" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "impossible d'ouvrir l'objet partagé %s : %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "impossible de trouver %s dans l'objet partagé %s : %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s : non chargé dynamiquement" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "la fonction de chargement de %s retourne un échec (%d) : pas chargé" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s : non chargé dynamiquement" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s : impossible d'effacer : %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s : ceci est un répertoire" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s : ceci n'est pas un fichier régulier" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s : le fichier est trop grand" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s : ne peut exécuter le fichier binaire" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s : impossible d'exécuter : %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "déconnexion\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ce n'est pas un shell de connexion : utilisez « exit »" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Il y a des tâches stoppées.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Il y a des tâches en cours d'exécution.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "aucune commande trouvée" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "indication d'historique" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s : impossible d'ouvrir le fichier temporaire : %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "courant" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "tâche %d démarrée sans contrôle de tâche" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s : option non permise -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s : l'option nécessite un argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hachage désactivé" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s : table de hachage vide\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "occurrences\tcommande\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Commandes du shell correspondant au mot-clé « " +msgstr[1] "Commandes du shell correspondant aux mots-clés « " + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"Aucune rubrique d'aide ne correspond à « %s ». Essayez « help help », « man -" +"k %s » ou « info %s »." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s : impossible d'ouvrir : %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Ces commandes de shell sont définies de manière interne. Saisissez « help » " +"pour voir cette liste.\n" +"Tapez « help nom » pour en savoir plus sur la fonction qui s'appelle « nom " +"».\n" +"Utilisez « info bash » pour en savoir plus sur le shell en général.\n" +"Utilisez « man -k » ou « info » pour en savoir plus sur les commandes qui\n" +"ne font pas partie de cette liste.\n" +"\n" +"Une astérisque (*) à côté d'un nom signifie que la commande est désactivée.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "impossible d'utiliser plus d'une option parmi « -anrw »" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "position dans l'historique" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s : horodatage non valable" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s : l'expansion de l'historique a échoué" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s : « inlib » a échoué" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "pas d'autre option permise avec « -x »" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "" +"%s : les arguments doivent être des identifiants de tâche ou de processus" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Erreur inconnue" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "une expression est attendue" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s : n'est pas un tableau indexé" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s : spécification de descripteur de fichier non valable" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d : descripteur de fichier non valable : %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s : nombre de lignes non valable" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s : origine de tableau non valable" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s : quantum de callback non valable" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "nom de variable tableau vide" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "nécessité de prise en charge des variables tableaux" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "« %s » : caractère de format manquant" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "« %c » : spécification de format d'heure incorrecte" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "« %c » : caractère de format non permis" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "avertissement : %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "problème d'analyse du format : %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "chiffre hexadécimal manquant pour \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "chiffre unicode manquant pour \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "pas d'autre répertoire" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s : argument non valable" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "pile de répertoire vide" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "indice de pile de répertoire" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Affiche la liste des répertoires actuellement mémorisés. Les répertoires\n" +" sont insérés dans la liste avec la commande « pushd ». Vous pouvez " +"remonter\n" +" dans la liste en enlevant des éléments avec la commande « popd ».\n" +" \n" +" Options :\n" +" -c\tefface la pile des répertoires en enlevant tous les éléments.\n" +" -l\tn'affiche pas les versions raccourcies (avec ~) des répertoires\n" +" \trelativement à votre répertoire personnel\n" +" -p\taffiche la pile des répertoires avec un élément par ligne\n" +" -v\taffiche la pile des répertoires avec un élément par ligne préfixé\n" +" \tavec la position dans la pile\n" +" \n" +" Arguments :\n" +" +N\tAffiche le Nième élément en comptant de zéro depuis la gauche de la\n" +" liste affichée par « dirs » lorsque celle-ci est appelée sans option.\n" +" \n" +" -N\tAffiche le Nième élément en comptant de zéro depuis la droite de la\n" +" liste affichée par « dirs » lorsque celle-ci est appelée sans option." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Ajoute un répertoire en haut de la pile des répertoires, ou permute\n" +" la pile de façon que le répertoire en haut de la pile devienne\n" +" le nouveau répertoire de travail. S'il n'y a pas d'argument, les deux\n" +" répertoires en haut de la pile sont échangés.\n" +" \n" +" Options :\n" +" -n\tNe change pas de répertoire de travail lorsque des répertoires\n" +" \tsont ajoutés à la pile, de façon que seule la pile soit manipulée\n" +" \n" +" Arguments :\n" +" +N\tPermute la pile de façon que le Nième répertoire se place en haut,\n" +" \ten comptant de zéro depuis la gauche de la liste fournie par « dirs " +"».\n" +" \n" +" -N\tPermute la pile de façon que le Nième répertoire se place en haut,\n" +" \ten comptant de zéro depuis la droite de la liste fournie par « dirs " +"».\n" +" \n" +" dir\tAjoute le répertoire DIR en haut de la pile, et en fait le " +"nouveau\n" +" \trépertoire de travail.\n" +" \n" +" Vous pouvez voir la pile des répertoires avec la commande « dirs »." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Enlève des éléments de la pile des répertoires. S'il n'y a pas\n" +" d'argument, le répertoire en haut de la pile est enlevé,\n" +" et le nouveau sommet de la pile devient le répertoire de travail.\n" +" \n" +" Options :\n" +" -n\tNe change pas de répertoire de travail lorsque des répertoires\n" +" \tsont enlevés de la pile, de façon que seule la pile soit manipulée.\n" +" \n" +" Arguments :\n" +" +N\tEnlève le Nième répertoire, en comptant de zéro depuis la gauche\n" +" \tde la liste fournie par « dirs ». Par exemple : « popd +0 »\n" +" \tenlève le premier répertoire, « popd +1 » le deuxième.\n" +" \n" +" -N\tEnlève le Nième répertoire, en comptant de zéro depuis la droite\n" +" \tde la liste fournie par « dirs ». Par exemple : « popd -0 »\n" +" \tenlève le dernier répertoire, « popd -1 » l'avant-dernier.\n" +" \n" +" Vous pouvez voir la pile des répertoires avec la commande « dirs »." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s : spécification de délai d'expiration non valable" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "erreur de lecture : %d : %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"« return » n'est possible que depuis une fonction ou depuis un script " +"exécuté par « source »" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" +"« unset » ne peut pas s'appliquer simultanément à une fonction et à une " +"variable" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s : n'est pas une variable tableau" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s : n'est pas une fonction" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s : impossible d'exporter" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "nombre de « shift »" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" +"les options du shell ne peuvent pas être simultanément activées et " +"désactivées" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s : nom d'option du shell non valable" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "nom de fichier nécessaire en argument" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s : fichier introuvable" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "suspension impossible" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "un shell de connexion ne peut pas être suspendu" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s est un alias vers « %s »\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s est un mot-clé du shell\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s est une fonction\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s est une primitive spéciale du shell\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s est une primitive du shell\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s est %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s est haché (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s : argument de limite non valable" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "« %c » : mauvaise commande" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s : impossible d'obtenir la limite : %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limite" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s : impossible de modifier la limite : %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "nombre octal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "« %c » : opérateur de mode symbolique non valable" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "« %c » : caractère de mode symbolique non valable" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " ligne " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "dernière commande : %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Annulation…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:462 +msgid "unknown command error" +msgstr "erreur de commande inconnue" + +#: error.c:463 +msgid "bad command type" +msgstr "mauvais type de commande" + +#: error.c:464 +msgid "bad connector" +msgstr "mauvais connecteur" + +#: error.c:465 +msgid "bad jump" +msgstr "mauvais saut" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s : variable sans liaison" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aattente de données expirée : déconnexion automatique\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "l'entrée standard ne peut pas être redirigée depuis /dev/null : %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT : « %c » : caractère de format non valable" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] existe encore" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "erreur de tube" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" +"eval : dépassement de la profondeur maximum d'imbrication d'évaluations (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" +"%s : dépassement de la profondeur maximum d'imbrication de sources (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" +"%s : dépassement de la profondeur maximum d'imbrication de fonctions (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "" +"%s : restriction : « / » ne peut pas être spécifié dans un nom de commande" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s : commande introuvable" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s : %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s : %s : mauvais interpréteur" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s : impossible d'exécuter le fichier binaire : %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "« %s » : est une primitive spéciale" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "impossible de dupliquer le fd %d vers le fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "dépassement du niveau de récursivité dans l'expression" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "débordement négatif de la pile de récursivité" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "erreur de syntaxe dans l'expression" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "tentative d'affectation à une non-variable" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "erreur de syntaxe dans l'affectation d'une variable" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "division par 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bogue : mauvais symbole pour expassign" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "« : » attendu pour une expression conditionnelle" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exposant négatif" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "identifiant attendu après un pré-incrément ou un pré-décrément" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "« ) » manquante" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "erreur de syntaxe : opérande attendu" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "erreur de syntaxe : opérateur arithmétique non valable" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s : %s (le symbole erroné est « %s »)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "base arithmétique non valable" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s : nombre de lignes non valable" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "valeur trop grande pour la base" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s : erreur d'expression\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd : ne peut accéder aux répertoires parents" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "impossible de réinitialiser le mode « nodelay » pour le fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"impossible d'allouer un nouveau descripteur de fichier pour l'entrée de bash " +"depuis le fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input : le tampon existe déjà pour le nouveau fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline : pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "le processus cloné n°%d apparaît dans la tâche en fonctionnement %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "suppression de la tâche stoppée %d avec le groupe de processus %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process : pid %5ld (%s) signalé toujours en vie" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid : %ld : n° de processus inexistant" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Fini" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Stoppé" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Stoppé(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "En cours d'exécution" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Fini(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Termine %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "État inconnu" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core dumped)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd : %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "fils setpgid (%ld à %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait : le processus n°%ld n'est pas un fils de ce shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for : Aucun enregistrement du processus n°%ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job : la tâche %d est stoppée" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s : tâche inexistante" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s : la tâche s'est terminée" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s : la tâche %d est déjà en arrière plan" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld : activation de WNOHANG pour éviter un blocage définitif" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s : ligne %d : " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core dumped)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(maintenant, wd : %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control : getpgrp a échoué" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control : pas de contrôle de tâche en tâche de fond" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control : discipline de ligne" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control : setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "impossible de régler le groupe de processus du terminal (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "pas de contrôle de tâche dans ce shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc : échec de l'assertion : %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc : %s:%d : assertion manquée\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "inconnu" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc : bloc écrasé sur liste libre" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free : appelé avec un bloc déjà libéré comme argument" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free : appelé avec un bloc non alloué comme argument" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free : débordement négatif détecté ; « mh_nbytes » est hors plage" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free : débordement négatif détecté ; « mh_nbytes » est hors plage" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free : les tailles de fragment au début et à la fin sont différentes" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc : appelé avec un bloc non alloué comme argument" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc : débordement négatif détecté ; « mh_nbytes » est hors plage" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc : débordement négatif détecté ; « mh_nbytes » est hors plage" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "" +"realloc : les tailles de fragment au début et à la fin sont différentes" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc : la table d'allocation est pleine avec FIND_ALLOC ?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc : %p déjà alloué selon la table ?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free : %p déjà libre selon la table ?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base non valable" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s : hôte inconnu" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: service non valable" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s : mauvaise spécification de chemin réseau" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "opérations sur le réseau non prises en charge" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale : LC_ALL : impossible de changer le paramètre de langue (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" +"setlocale : LC_ALL : impossible de changer le paramètre de langue (%s) : %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale : %s : impossible de changer le paramètre de langue (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "" +"setlocale : %s : impossible de changer le paramètre de langue (%s) : %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Vous avez du courrier dans $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Vous avez du nouveau courrier dans $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Le courrier dans %s a été lu\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "erreur de syntaxe : expression arithmétique nécessaire" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "erreur de syntaxe : « ; » non attendu" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "erreur de syntaxe : « ((%s)) »" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document : le type d'instruction %d est incorrect" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"« here-document » à la ligne %d délimité par la fin du fichier (au lieu de « " +"%s »)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection : l'instruction de redirection « %d » est hors plage" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) dépasse SIZE_MAX (%lu): ligne " +"tronquée" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "nombre maximum de documents en ligne (« here-document ») dépassé" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "" +"fin de fichier (EOF) prématurée lors de la recherche du « %c » correspondant" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "fin de fichier (EOF) prématurée lors de la recherche de « ]] »" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "" +"erreur de syntaxe dans une expression conditionnelle : symbole « %s » " +"inattendu" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "erreur de syntaxe dans une expression conditionnelle" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "symbole inattendu « %s » au lieu de « ) »" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "« ) » attendu" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argument inattendu « %s » pour l'opérateur conditionnel à un argument" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "argument inattendu pour l'opérateur conditionnel à un argument" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "symbole « %s » trouvé à la place d'un opérateur binaire conditionnel" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "opérateur binaire conditionnel attendu" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argument « %s » inattendu pour l'opérateur binaire conditionnel" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "argument inattendu pour l'opérateur binaire conditionnel" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "symbole « %c » inattendu dans la commande conditionnelle" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "symbole « %s » inattendu dans la commande conditionnelle" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "symbole « %d » inattendu dans la commande conditionnelle" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "erreur de syntaxe près du symbole inattendu « %s »" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "erreur de syntaxe près de « %s »" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "erreur de syntaxe : fin de fichier prématurée" + +#: parse.y:6365 +msgid "syntax error" +msgstr "erreur de syntaxe" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Utilisez « %s » pour quitter le shell.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "" +"fin de fichier (EOF) prématurée lors de la recherche d'une « ) » " +"correspondante" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "complètement : fonction « %s » non trouvée" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: boucle de ré-essai possible" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert : %s : NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command : mauvais connecteur « %d »" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set : %d : descripteur de fichier non valable" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set : pointeur de fichier NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf : « %c » : caractère de format invalide" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "descripteur de fichier hors plage" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s : redirection ambiguë" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s : impossible d'écraser le fichier existant" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s : restreint : impossible de rediriger la sortie" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "" +"impossible de créer un fichier temporaire pour le « here-document » : %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s : impossible d'affecter le descripteur de fichier à la variable" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port non pris en charge sans réseau" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "" +"erreur de redirection : impossible de dupliquer le descripteur de fichier" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "« /tmp » introuvable, veuillez le créer !" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "« /tmp » doit être un nom de répertoire valable" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "le mode d'affichage amélioré est ignoré dans les shells interactifs" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c : option non valable" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "impossible de changer le uid en %d : uid effectif %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "impossible de changer le gid en %d: gid effectif %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "impossible de démarrer le débogueur: mode déboguage désactivé" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s : Ceci est un répertoire" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Je n'ai pas de nom !" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, version %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Utilisation :\t%s [option longue GNU] [option] ...\n" +"\t%s [option longue GNU] [option] fichier-script ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Options longues GNU :\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Options du shell :\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD ou -c commande ou -O shopt_option\t\t(invocation seulement)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ou -o option\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Pour en savoir plus sur les options du shell, saisissez « %s -c \"help set\" " +"».\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Pour en savoir plus sur les primitives du shell, saisissez « %s -c help ».\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Utilisez la commande « bashbug » pour faire un rapport de bogue.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "page d'accueil de bash : \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Aide générale sur l'utilisation de logiciels GNU : \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask : %d : opération non valable" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Signal falsifié" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Raccroche" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interrompt" + +#: siglist.c:58 +msgid "Quit" +msgstr "Quitte" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Instruction incorrecte" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "trace/trap BPT" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Instruction ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Instruction EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Exception en virgule flottante" + +#: siglist.c:86 +msgid "Killed" +msgstr "Tué" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Erreur de bus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Erreur de segmentation" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Mauvais appel système" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Tube brisé" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Horloge d'alarme" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminé" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Condition d'E/S urgente" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Stoppé (signal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continue" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Mort ou arrêt du fils" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Stoppé (entrée tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Stoppé (sortie tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "E/S prête" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Limite CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Limite fichier" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarme (virtuelle)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarme (profile)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Fenêtre changée" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Verrou d'enregistrement" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Signal utilisateur 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Signal utilisateur 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "données d'entrée HFT en attente" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "coupure d'alimentation imminente" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "panne système imminente" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migration processus vers un autre CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "erreur de programmation" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Mode de surveillance HFT accordé" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Mode de surveillance HFT rétracté" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "Séquence de son HFT terminée" + +#: siglist.c:214 +msgid "Information request" +msgstr "Demande d'information" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Signal n°%d inconnu" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "Mauvaise substitution : pas de « %s » de fermeture dans %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s : impossible d'affecter une liste à un élément de tableau" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "impossible de fabriquer un tube pour une substitution de processus" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "impossible de fabriquer un fils pour une substitution de processus" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "impossible d'ouvrir le tube nommé « %s » en lecture" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "impossible d'ouvrir le tube nommé « %s » en écriture" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "impossible de dupliquer le tube nommé « %s » vers le fd %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "substitution de commande: octet nul ignoré en entrée" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "impossible de fabriquer un tube pour une substitution de commande" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "" +"impossible de fabriquer un processus fils pour une substitution de commande" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute : impossible de dupliquer le tube vers le fd 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s : nom de variable invalide pour une référence de nom" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s : expansion indirecte invalide" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nom de variable invalide" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s : paramètre non défini" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s : paramètre vide ou non défini" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s : expression de sous-chaîne négative" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s : mauvaise substitution" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s : affectation impossible de cette façon" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"les versions futures du shell forceront l'évaluation comme une substitution " +"arithmétique" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "mauvais remplacement : pas de « ` » de fermeture dans %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "pas de correspondance : %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argument attendu" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s : nombre entier attendu comme expression" + +#: test.c:265 +msgid "`)' expected" +msgstr "« ) » attendue" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "« ) » attendue au lieu de %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s : opérateur binaire attendu" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s : opérateur unaire attendu" + +#: test.c:881 +msgid "missing `]'" +msgstr "« ] » manquant" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "erreur de syntaxe : « ; » non attendu" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "numéro de signal non valable" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" +"gestionnaire trap : dépassement de la profondeur maximum du gestionnaire " +"« trap » (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps : mauvaise valeur dans trap_list[%d] : %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps : le gestionnaire de signal est SIG_DFL, renvoi de %d (%s) " +"à moi-même" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler : mauvais signal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "erreur lors de l'importation de la définition de fonction pour « %s »" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "niveau de shell trop élevé (%d), initialisation à 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "" +"make_local_variable : aucun contexte de fonction dans le champ d'application " +"actuel" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s : la variable ne peut se voir assigner une valeur" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s : assigne un entier à la référence de nom" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" +"all_local_variables : aucun contexte de fonction dans le champ d'application " +"actuel" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s a un « exportstr » nul" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "caractère %d non valable dans « exportstr » pour %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "pas de « = » dans « exportstr » pour %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context : le début de « shell_variables » n'est pas un contexte de " +"fonction" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context : aucun contexte à « global_variables »" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope : le début de « shell_variables » n'est pas un champ d'application " +"temporaire d'environnement" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s : %s : impossible d'ouvrir comme FILE" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s : %s : valeur non valable pour un descripteur de fichier de trace" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s : %s : valeur de compatibilité hors plage" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2012 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licence GPLv3+ : GNU GPL version 3 ou ultérieure \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, version %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Ceci est un logiciel libre ; vous être libre de le modifier et de le " +"redistribuer." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "AUCUNE GARANTIE n'est fournie, dans les limites permises par la loi." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s : impossible d'allouer %lu octets (%lu octets alloués)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s : impossible d'allouer %lu octets" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s : %s:%d : impossible d'allouer %lu octets (%lu octets alloués)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s : %s:%d : impossible d'allouer %lu octets" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nom[=valeur] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nom [nom ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPSVX] [-m keymap] [-f nomfichier] [-q nom] [-u nom] [-r " +"seqtouche] [-x seqtouche:commande-shell] [seqtouche:fonction-readline ou " +"commande-readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [rép]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] commande [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [nom[=valeur] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] nom[=valeur] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] nom[=valeur] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f nomfichier] [nom ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts chaineopts nom [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nom] [commande [arguments ...]] [redirection ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e ename] [-lnr] [premier] [dernier] ou fc -s [motif=nouveau] [commande]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p nomchemin] [-dt] [nom ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [motif ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d décalage] [n] ou history -anrw [nomfichier] ou history -ps " +"arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] ou jobs -x commande [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... ou kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a tableau] [-d delim] [-i texte] [-n ncars] [-N ncars] [-p " +"prompt] [-t timeout] [-u fd] [nom ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nom-option] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nom ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nom[=valeur] ...] ou export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nom[=valeur] ...] ou readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source nom_fichier [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". nom_fichier [arguments]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nom [nom ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limite]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOM [in MOTS ... ] ; do COMMANDES; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDES; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOM [in MOTS ... ;] do COMMANDES; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case MOT in [MOTIF [| MOTIF]...) COMMANDES ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMMANDES; then COMMANDES; [ elif COMMANDES; then COMMANDES; ]... [ else " +"COMMANDES; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMMANDES; do COMMANDES; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMMANDES; do COMMANDES; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOM] commande [redirections]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nom { COMMANDES ; } ou nom () { COMMANDES ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMMANDES ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expression ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expression ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Noms et significations de certaines variables du shell" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | rép]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nom_opt ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [arguments]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G " +"motif_glob] [-W liste_mots] [-F fonction] [-C commande] [-X motif_filtre] [-" +"P prefixe] [-S suffixe] [nom ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G motif_glob] [-W " +"liste_mots] [-F fonction] [-C commande] [-X motif_filtre] [-P prefixe] [-S " +"suffixe] [mot]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DEI] [nom ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d délim] [-n nombre] [-O origine] [-s nombre] [-t] [-u fd] [-C " +"callback] [-c quantum] [tableau]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d delim] [-n nombre] [-O origine] [-s nombre] [-t] [-u fd] [-C " +"callback] [-c quantum] [tableau]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Définit ou affiche des alias.\n" +" \n" +" Sans argument, « alias » affiche la liste des alias dans le format " +"réutilisable\n" +" « alias NOM=VALEUR » sur la sortie standard.\n" +" \n" +" Sinon, un alias est défini pour chaque NOM dont la VALEUR est donnée.\n" +" Une espace à la fin de la VALEUR entraîne la vérification du mot suivant " +"pour\n" +" déterminer si un alias doit être remplacé lorsque l'alias est " +"développé.\n" +" \n" +" Options :\n" +" -p\tAffiche tous les alias actuels dans un format réutilisable\n" +" \n" +" Code de sortie :\n" +" « alias » renvoie la valeur vraie à moins que NOM ne soit fourni et que " +"celui-ci n'aie\n" +" pas d'alias." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Enlève chaque NOM de la liste des alias actuels.\n" +" \n" +" Options :\n" +" -a\tretire toutes les définitions d'alias\n" +" \n" +" Renvoie le code de succès à moins que NOM ne soit pas un alias existant." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Définit les associations de touches et les variables de « Readline ».\n" +" \n" +" Associe une séquence de touches à une fonction « Readline » ou une " +"macro, ou définit une\n" +" variable « Readline ». La syntaxe des arguments non-options est " +"équivalente à celle\n" +" du fichier ~/.inputrc, mais doivent être transmis comme arguments " +"uniques :\n" +" ex : bind '\"\\C-x\\C-r\" : re-read-init-file'.\n" +" \n" +" Options :\n" +" -m keymap Utilise KEYMAP comme mappage clavier pendant la\n" +" durée de cette commande. Des noms de mappage " +"valables\n" +" sont « emacs », « emacs-standard », « emacs-meta " +"», \n" +" « emacs-ctlx », « vi », « vi-move », « vi-command » " +"et\n" +" « vi-insert ».\n" +" -l Affiche les noms de fonctions.\n" +" -P Affiche les noms et associations des fonctions.\n" +" -p Affiche les fonctions et associations dans une " +"forme qui\n" +" peut être réutilisée comme entrée.\n" +" -S Affiche les séquences de touches qui invoquent des " +"macros,\n" +" et leurs valeurs.\n" +" -s Affiche les séquences de touches qui invoquent des " +"macros,\n" +" et leurs valeurs sous une forme qui peut être " +"utilisée comme entrée.\n" +" -V Affiche les noms et valeurs des variables\n" +" -v Affiche les noms et valeurs des variables dans une " +"forme qui peut\n" +" être réutilisée comme entrée.\n" +" -q nom-fonction Permet de savoir quelles touches appellent la " +"fonction.\n" +" -u nom-fonction Enlève toutes les associations de touches liée à la " +"fonction.\n" +" -r seqtouche Enlève l'association pour « seqtouche ».\n" +" -f nomfichier Lit l'association de touches depuis NOMFICHIER.\n" +" -x seqtouche:commande-shell\tEntraîne l'exécution de la commande-" +"shell\n" +" \t\t\t\tlorsque « seqtouche » est entrée.\n" +" -X Liste les séquences de touches liées à -x et les " +"commandes associées\n" +" sous une forme qui peut être réutilisée comme " +"entrée.\n" +" \n" +" Code de sortie :\n" +" « bind » renvoie 0 à moins qu'une option non reconnue ne soit donnée ou " +"qu'une erreur survienne." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Sort des boucles for, while, ou until.\n" +" \n" +" Sort d'une boucle FOR, WHILE ou UNTIL. Si N est spécifié, sort de N " +"boucles\n" +" imbriquées.\n" +" \n" +" Code de retour :\n" +" Le code de retour est 0 à moins que N ne soit pas supérieur ou égal à 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Reprend l'exécution des boucles for, while ou until.\n" +" \n" +" Reprend l'itération suivante de la boucle FOR, WHILE ou UNTIL de niveau " +"supérieur.\n" +" Si N est précisé, reprend à la N-ième boucle supérieure.\n" +" \n" +" Code de sortie :\n" +" Le code de sortie est 0 à moins que N ne soit pas supérieur ou égale à 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Exécute des commandes shell intégrées.\n" +" \n" +" Exécute SHELL-BUILTIN avec les arguments ARGs sans effectuer de " +"recherche\n" +" de commande. Ceci est utile lorsque vous souhaitez remplacer une " +"commande\n" +" intégrée par une fonction shell, mais nécessite d'exécuter la commande " +"intégrée\n" +" dans la fonction.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de retour de SHELL-BUILTIN, ou false si SHELL-BUILTIN " +"n'est\n" +" pas une commande intégrée." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Renvoie le contexte de l'appel de sous-routine actuel.\n" +" \n" +" Sans EXPR, renvoie « $ligne $nomfichier ». Avec EXPR,\n" +" renvoie « $ligne $sousroutine $nomfichier »; ces informations " +"supplémentaires\n" +" peuvent être utilisées pour fournir une trace de la pile.\n" +" \n" +" La valeur de EXPR indique le nombre de cadres d'appels duquel il faut " +"revenir en arrière\n" +" avant le cadre actuel ; le cadre supérieur est le cadre 0.\n" +" \n" +" Code de sortie :\n" +" Renvoie 0 à moins que le shell ne soit pas en train d'exécuter une " +"fonction ou que EXPR\n" +" ne soit pas valable." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Change le répertoire de travail du shell.\n" +" \n" +" Change le répertoire actuel vers DIR. Le répertoire DIR par défaut\n" +" est donné par la variable « HOME » du shell.\n" +" \n" +" La variable CDPATH définit le chemin de recherche du répertoire " +"contenant\n" +" DIR. Les noms de répertoires alternatifs dans CDPATH sont séparés par un " +"deux-point « : ».\n" +" Un nom de répertoire vide est identique au répertoire actuel. Si DIR " +"commence\n" +" avec une barre oblique « / », alors CDPATH n'est pas utilisé.\n" +" \n" +" Si le répertoire n'est pas trouvé et que l'option « cdable_vars » du " +"shell est définie,\n" +" alors le mot est supposé être un nom de variable. Si la variable possède " +"une valeur,\n" +" alors cette valeur est utilisée pour DIR.\n" +" \n" +" Options :\n" +" -L\tforce le suivi des liens symboliques : résout les liens " +"symboliques dans\n" +" \t\tDIR après le traitement des instances de « .. »\n" +" -P\tutilise la structure physique des répertoires sans suivre les " +"liens\n" +" \t\tsymboliques : résout les liens symboliques dans DIR avant le " +"traitement des\n" +" \t\tinstances de « .. »\n" +" -e\tsi l'option -P est fournie et que le répertoire de travail actuel " +"ne peut pas\n" +" \t\têtre déterminé avec succès, alors sort avec un code de retour non " +"nul\n" +" -@ sur les systèmes qui le supporte, présente un fichier avec des " +"attributs\n" +" \t\tétendus comme un répertoire contenant les attributs du fichier\n" +" \n" +" Le comportement par défaut est de suivre les liens symboliques, comme si " +"« -L » était précisé.\n" +" « .. » est traité en retirant le composant immédiatement avant dans le " +"chemin jusqu'à\n" +" la barre oblique ou le début de DIR.\n" +" \n" +" Code de sortie :\n" +" Renvoie 0 si le répertoire est changé et si $PWD est correctement " +"défini\n" +" quand -P est utilisé ; sinon autre chose que 0." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Affiche le nom du répertoire de travail courant.\n" +" \n" +" Options :\n" +" -L\taffiche la valeur de $PWD s'il nomme le répertoire de travail\n" +" \t\tcourant\n" +" -P\taffiche le répertoire physique, sans aucun lien symbolique\n" +" \n" +" Par défaut, « pwd » se comporte comme si « -L » était spécifié.\n" +" \n" +" Code de retour :\n" +" Renvoie 0 à moins qu'une option non valable ne soit donnée ou que le\n" +" répertoire courant ne peut pas être lu." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Commande vide.\n" +" \n" +" Sans effet : la commande ne fait rien.\n" +" \n" +" Code de retour :\n" +" Renvoie toujours le code de succès." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Renvoie un résultat de succès.\n" +" \n" +" Code de retour :\n" +" Succès." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Renvoie un résultat d'échec.\n" +" \n" +" Code de sortie :\n" +" Toujours l'échec." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Exécute une simple commande ou affiche des informations sur les commandes.\n" +" \n" +" Lance la COMMANDE avec des ARGS en court-circuitant la recherche de " +"commande,\n" +" ou affiche des informations sur les COMMANDEs spécifiées. Ceci peut " +"être\n" +" utilisé pour invoquer des commandes sur le disque lorsqu'il y a conflit\n" +" avec une fonction portant le même nom.\n" +" \n" +" Options :\n" +" -p utilise une valeur par défaut pour CHEMIN qui garantit de " +"trouver\n" +" tous les utilitaires standards\n" +" -v affiche une description de la COMMANDE similaire à la commande " +"intégrée\n" +" « type »\n" +" -V affiche une description plus détaillée de chaque COMMANDE\n" +" \n" +" Code de retour :\n" +" Renvoie le code de sortie de la COMMANDE, ou le code d'échec si la " +"COMMANDE est introuvable." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Définit les valeurs et les attributs des variables.\n" +" \n" +" Déclare des variables et leur assigne des attributs. Si aucun NOM n'est " +"donné,\n" +" affiche les attributs et les valeurs de toutes les variables.\n" +" \n" +" Options :\n" +" -f\trestreint l'action ou l'affichage aux noms et définitions de " +"fonctions\n" +" -F\trestreint l'affichage aux noms des fonctions uniquement (avec le " +"numéro de ligne\n" +" \t\tet le fichier source lors du débogage)\n" +" -g\tcrée des variables globales lorsqu'utilisée dans une fonction " +"shell ; ignoré sinon\n" +" -p\taffiche les attributs et la valeur de chaque NOM\n" +" \n" +" Options qui définissent des attributs :\n" +" -a\tpour faire de NOMs des tableaux indexés (si pris en charge)\n" +" -A\tpour faire de NOMs des tableaux associatifs (si pris en charge)\n" +" -i\tpour assigner l'attribut « integer » aux NOMs\n" +" -l\tpour convertir la valeur de chaque NOM en minuscules lors de " +"l'affectation\n" +" -n\ttransforme NOM en une référence vers une variable nommée d'après " +"sa valeur\n" +" -r\tpour mettre les NOMs en lecture seule\n" +" -t\tpour permettre aux NOMs d'avoir l'attribut « trace »\n" +" -u\tpour convertir les NOMs en majuscules lors de l'affectation\n" +" -x\tpour permettre aux NOMs de s'exporter\n" +" \n" +" Utiliser « + » au lieu de « - » pour désactiver l'attribut.\n" +" \n" +" Les variables avec l'attribut « integer » ont une évaluation " +"arithmétique (voir\n" +" la commande « let ») effectuée lorsqu'une valeur est affectée à la " +"variable.\n" +" \n" +" Lorsqu'utilisée dans une fonction, « declare » permet aux NOMs d'être " +"locaux,\n" +" comme avec la commande « local ». L'option « -g » supprime ce " +"comportement.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable soit fournie " +"ou qu'une\n" +" erreur survienne lors de l'assignation d'une variable." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Définit des valeurs et des attributs de variables.\n" +" \n" +" Un synonyme de « déclare ». Consultez « help declare »." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Définit des variables locales.\n" +" \n" +" Crée une variable locale nommée NOM, avec une valeur VALEUR. OPTION " +"peut\n" +" être n'importe quelle option acceptée par « declare ».\n" +" \n" +" Les variables locales peuvent seulement être utilisées à l'intérieur " +"d'une\n" +" fonction; elles ne sont visibles que dans les fonctions où elles ont " +"été\n" +" définies et dans leurs fonctions filles.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"fournie,\n" +" qu'une erreur survienne lors de l'assignation d'une variable, ou que le " +"shell\n" +" n'exécute pas une fonction." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Écrit les arguments sur la sortie standard.\n" +" \n" +" Affiche les ARGs, séparés par une espace, sur la sortie standard, " +"suivis\n" +" d'un retour à la ligne.\n" +" \n" +" Options :\n" +" -n\tn'ajoute pas de saut de ligne\n" +" -e\tactive l'interprétation des barres contre-obliques d'échappement " +"ci-dessous\n" +" -E\tsupprime explicitement l'interprétation des barres contre-obliques " +"d'échappement\n" +" \n" +" « echo » interprète les caractères suivants comme des séquences " +"d'échappement :\n" +" \\a\talerte (cloche)\n" +" \\b\tretour arrière\n" +" \\c\tsupprime la suite de la sortie\n" +" \\e\tcaractère échap.\n" +" \\E\tcaractère échap.\n" +" \\f\tsaut de page\n" +" \\n\tsaut de ligne\n" +" \\r\tretour chariot\n" +" \\t\ttabulation horizontale\n" +" \\v\ttabulation verticale\n" +" \\\\\tbarre contre-oblique\n" +" \\0nnn\tle caractère dont le code ASCII est NNN (en octal). NNN peut " +"être\n" +" \t\tlong de 0 à 3 chiffres octaux\n" +" \\xHH\tle caractère sur 8 bits dont la valeur est HH (hexadécimal). " +"HH\n" +" \t\tpeut être composé de 1 ou 2 chiffres hexadécimaux\n" +" \t\tHHHH peut être composé de un à quatre chiffres hexadécimaux.\n" +" \\UHHHHHHHH le caractère Unicode dont la valeur est la valeur " +"hexadécimale\n" +" \t\tHHHHHHHH. HHHHHHHH peut avoir un à huit chiffres hexadécimaux.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une erreur d'écriture survienne." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Écrit des arguments sur la sortie standard.\n" +" \n" +" Affiche les ARGs sur la sortie standard, suivis d'un retour à la ligne.\n" +" \n" +" Options :\n" +" -n\tpas de retour à la ligne\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une erreur d'écriture survienne." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Active et désactive les commandes intégrées.\n" +" \n" +" Active et désactive les commandes intégrées du shell. Les désactiver " +"vous permet\n" +" d'exécuter une commande du disque ayant le même nom qu'une commande du " +"shell\n" +" sans utiliser le chemin complet vers le fichier.\n" +" \n" +" Options :\n" +" -a\taffiche la liste des commandes intégrées et leur état " +"d'activation\n" +" -n\tdésactive chaque NOM ou affiche la liste des commandes " +"désactivées\n" +" -p\taffiche la liste des commandes dans un format réutilisable\n" +" -s\taffiche seulement les noms des commandes Posix de type « special " +"»\n" +" \n" +" Options contrôlant le chargement dynamique :\n" +" -f\tCharge la commande intégrée NOM depuis la bibliothèque partagée " +"FILENAME\n" +" -d\tDécharge une commande chargée avec « -f »\n" +" \n" +" S'il n'y a pas d'option, chaque commande NOM est activée.\n" +" \n" +" Pour utiliser le « test » trouvé dans $PATH au lieu de celui intégré au " +"shell,\n" +" saisissez « enable -n test ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que NOM ne soit pas une commande " +"intégrée ou qu'une erreur ne survienne." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Exécute des arguments comme s'ils étaient une commande du shell.\n" +" \n" +" Combine des ARGs en une chaîne unique, utilise le résultat comme entrée " +"du shell,\n" +" puis exécute la commande résultante.\n" +" \n" +" Code de sortie :\n" +" Renvoie le même code de sortie que la commande, ou le code de succès si " +"la commande est vide." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Analyse les options en arguments.\n" +" \n" +" « getopts » est utilisé par les procédures du shell pour analyser les \n" +" paramètres de position.\n" +" \n" +" OPTSTRING contient les lettres d'options qui devront être reconnues ;\n" +" si une lettre est suivie par un deux-points, elle devra posséder un\n" +" argument séparé d'elle par une espace.\n" +" \n" +" À chaque fois qu'elle est appelée, « getopts » place l'option suivante\n" +" dans la variable de shell « $nom », en l'initialisant si elle n'existe " +"pas,\n" +" et place l'index de l'argument suivant dans la variable de shell " +"OPTIND.\n" +" OPTIND est initialisé à 1 à chaque fois que le shell ou qu'un script " +"shell\n" +" est appelé. Lorsqu'une option nécessite un argument, « getopts » place " +"cet\n" +" argument dans la variable de shell OPTARG.\n" +" \n" +" « getopts » signale les erreurs de deux manières. Si le premier " +"caractère\n" +" d'OPTSTRING est un deux-points, « getopts » utilise un signalement " +"d'erreur\n" +" silencieux. Dans ce mode aucun message d'erreur n'est affiché. Si une " +"option\n" +" incorrecte est rencontrée, « getopts » place dans OPTARG le caractère " +"d'option\n" +" trouvé. Si un argument nécessaire n'est pas trouvé, « getopts » place un " +"« : »\n" +" dans NOM et place dans OPTARG le caractère d'option trouvé. Si « " +"getopts »\n" +" n'est pas en mode silencieux et qu'une option incorrecte est rencontrée, " +"il\n" +" place « ? » dans NAME et efface OPTARG. Si un argument nécessaire n'est " +"pas\n" +" trouvé, un « ? » est placé dans NAME, OPTARG est effacé et un message " +"de\n" +" diagnostic est affiché.\n" +" \n" +" Si la variable de shell OPTERR possède la valeur 0, « getopts » " +"désactive\n" +" l'affichage des messages d'erreur, même si le premier caractère " +"d'OPTSTRING\n" +" n'est pas un deux-points. OPTERR possède la valeur 1 par défaut.\n" +" \n" +" « getopts » analyse habituellement les paramètres de position ($0 - $9), " +"mais\n" +" si plus d'argument sont données, ils sont analysés à la place.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès si une option est trouvée, le code d'échec si " +"la fin des options\n" +" est rencontrée ou si une erreur survient." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Remplace le shell par la commande fournie.\n" +" \n" +" Exécute la COMMANDE, en remplaçant ce shell par le programme spécifié.\n" +" Les ARGUMENTS deviennent ceux de la COMMANDE. Si la COMMANDE n'est pas " +"fournie,\n" +" les redirections prennent effet dans le shell courant.\n" +" \n" +" Options :\n" +" -a nom\tpasse NOM comme argument numéro 0 à la COMMANDE\n" +" -c\texécute la COMMANDE avec un environnement vide\n" +" -l\tplace un tiret comme argument numéro 0 de la COMMANDE\n" +" \n" +" Si la commande ne peut pas être exécutée, un shell non-interactif se " +"termine,\n" +" à moins que l'option « execfail » ne soit définie.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que la COMMANDE ne soit pas trouvée " +"ou\n" +" qu'une erreur de redirection ne survienne." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Termine le shell.\n" +" \n" +" Termine le shell avec le code de retour « N ». Si N est omis, le code\n" +" de retour est celui de la dernière commande exécutée." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Termine un shell de connexion.\n" +" \n" +" Termine un shell de connexion avec le code de sortie N. Renvoie une " +"erreur\n" +" s'il n'est pas exécuté dans un shell de connexion." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Affiche ou exécute des commandes issues de l'historique.\n" +" \n" +" « fc » est utilisé pour afficher ou modifier puis ré-exécuter les " +"commandes\n" +" de l'historique des commandes. PREMIER et DERNIER peuvent être des " +"nombres\n" +" indiquant la plage ou PREMIER peut être une chaîne donnant le début de " +"la\n" +" commande la plus récente recherchée.\n" +" \n" +" Options :\n" +" -e ENAME\tdéfinit quel éditeur utiliser. Par défaut il s'agit de « " +"FCEDIT »\n" +" \t\tpuis « EDITOR », puis « vi »\n" +" -l\taffiche les lignes au lieu de les éditer\n" +" -n\tn'affiche pas les numéros de ligne\n" +" -r\tinverse l'ordre des lignes (les plus récentes en premier)\n" +" \n" +" En tapant « fc -s [motif=rempl ...] [commande] », la commande est ré-" +"exécutée\n" +" après avoir effectué le remplacement ANCIEN=NOUVEAU.\n" +" \n" +" Un alias utile est « r='fc -s' » de sorte qu'en tapant « r cc »,\n" +" la dernière commande commençant par « cc » est ré-exécutée et avec « r " +"», la\n" +" dernière commande est ré-exécutée.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès ou le code de sortie de la commande exécutée ; " +"autre\n" +" chose que 0 si une erreur survient." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Déplace une tâche au premier plan.\n" +" \n" +" Place JOB_SPEC au premier plan et en fait la tâche actuelle. Si\n" +" JOB_SPEC n'est pas fourni, le shell utilise sa propre notion\n" +" de tâche actuelle.\n" +" \n" +" Code de sortie :\n" +" Celui de la commande placée au premier plan ou le code d'échec si une " +"erreur survient." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Déplace des tâches vers l'arrière plan.\n" +" \n" +" Place chaque JOB_SPEC en arrière plan comme s'il avait été démarré avec " +"« & ».\n" +" Si JOB_SPEC n'est pas fourni, le shell utilise sa propre notion\n" +" de tâche actuelle.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que le contrôle de tâche ne soit pas " +"activé\n" +" ou qu'une erreur ne survienne." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Mémorise ou affiche l'emplacement des programmes.\n" +" \n" +" Détermine et mémorise le chemin complet de chaque commande NOM. Si\n" +" aucun argument n'est donné, une information sur les commandes mémorisées " +"est\n" +" affichée.\n" +" \n" +" Options :\n" +" -d\toublie l'emplacement mémorisé de chaque NOM\n" +" -l\taffiche dans un format qui peut être réutilisé comme entrée\n" +" -p nomchemin\tutilise NOMCHEMIN comme le chemin complet de NOM\n" +" -r\toublie tous les emplacements mémorisés\n" +" -t\taffiche l'emplacement mémorisé de chaque NOM, en précédant\n" +" \t\tchaque emplacement du NOM correspondant si plusieurs NOMS\n" +" \t\tsont donnés\n" +" Arguments :\n" +" NOM\tChaque NOM est recherché dans $PATH et ajouté à la liste\n" +" \t\tdes commandes mémorisée.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que le NOM ne soit pas trouvé ou\n" +" qu'une option non valable ne soit donnée." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Affiche des informations sur les commandes intégrées.\n" +" \n" +" Affiche de courts résumés des commandes intégrées. Si MOTIF est\n" +" spécifié, une aide détaillée de toutes les commandes correspondantes\n" +" au MOTIF est affichée, sinon la liste des sujets d'aide est affichée.\n" +" \n" +" Options :\n" +" -d\taffiche une courte description pour chaque sujet\n" +" -m\taffiche l'aide dans un format proche des pages de man(uel)\n" +" -s\tn'affiche qu'une courte aide pour chaque sujet correspondant au\n" +" \t\tMOTIF\n" +" \n" +" Arguments :\n" +" MOTIF\tMotif spécifiant un sujet d'aide\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que le MOTIF ne soit pas trouvé ou " +"qu'une\n" +" option non valable ne soit donnée." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Affiche ou manipule l'historique.\n" +" \n" +" Affiche l'historique avec les numéros de lignes en préfixant chaque " +"élément\n" +" modifié d'un « * ». Un argument égal à N limite la liste aux N derniers " +"éléments.\n" +" \n" +" Options :\n" +" -c\tefface la liste d'historique en supprimant tous les éléments\n" +" -d offset\tefface l'élément d'historique à l'emplacement OFFSET. Un " +"offset négatif\n" +" \t\tcompte à partir de la fin de la liste de l'historique\n" +" \n" +" -a\tajoute les lignes d'historique de cette session au fichier " +"d'historique\n" +" -n\tlit toutes les lignes d'historique non déjà lues depuis le fichier " +"d'historique\n" +" \t\tet les ajoute à la liste de l'historique\n" +" -r\tlit le fichier d'historique et ajoute le contenu à la liste " +"d'historique\n" +" -w\técrit l'historique actuelle dans le fichier d'historique\n" +" \n" +" -p\teffectue un développement de l'historique sur chaque ARG et " +"affiche le résultat\n" +" \t\tsans le stocker dans la liste d'historique\n" +" -s\tajoute les ARGs à la liste d'historique comme entrée unique\n" +" \n" +" Si NOMFICHIER est donné, il est utilisé comme fichier d'historique. " +"Sinon,\n" +" si HISTFILE contient une valeur, celle-ci est utilisée, sinon ~/." +"bash_history.\n" +" \n" +" Si la variable HISTTIMEFORMAT est définie et n'est pas vide, sa valeur " +"est utilisée\n" +" comme chaîne de format pour que strftime(3) affiche l'horodatage " +"associé\n" +" à chaque entrée d'historique. Sinon, aucun horodatage n'est affiché.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable soit donnée " +"ou\n" +" qu'une erreur ne survienne." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Affiche l'état des tâches.\n" +" \n" +" Affiche la liste des tâches actives. JOBSPEC restreint l'affichage à\n" +" cette tâche. S'il n'y a pas d'option, l'état de toutes les tâches " +"actives\n" +" est affiché.\n" +" \n" +" Options :\n" +" -l\taffiche les IDs de processus en plus des informations normales\n" +" -n\taffiche seulement les processus dont l'état a changé depuis la\n" +" \t\tdernière notification\n" +" -p\taffiche seulement les IDs de processus\n" +" -r\trestreint l'affichage aux tâches en cours d'exécution\n" +" -s\trestreint l'affichage aux tâches stoppées\n" +" \n" +" Si « -x » est fournie, la COMMANDE est lancée après que toutes les\n" +" spécifications qui apparaissent dans ARGs ont été remplacées par l'ID " +"de\n" +" processus du leader de groupe de processus de cette tâche.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"donnée\n" +" ou qu'une erreur ne survienne. Si « -x » est utilisée, le code de sortie " +"de\n" +" la COMMANDE est renvoyé." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Retire des tâches du shell courant.\n" +" \n" +" Retire chaque argument JOBSPEC de la table des tâches actives. Sans\n" +" JOBSPEC, le shell utilise sa propre notion de tâche courante.\n" +" \n" +" Options :\n" +" -a\tretire toutes les tâches si JOBSPEC n'est pas fourni\n" +" -h\tmarque chaque JOBSPEC de façon que SIGHUP ne soit pas envoyé à la " +"tâche\n" +" \t\tsi le shell reçoit un SIGHUP\n" +" -r\tretire seulement les tâches en cours de fonctionnement\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option ou un JOBSPEC non\n" +" valable ne soit donné." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Envoie un signal à une tâche.\n" +" \n" +" Envoie le signal nommé par SIGSPEC ou SIGNUM au processus identifié par\n" +" PID ou JOBSPEC. Si SIGSPEC et SIGNUM ne sont pas donnés, alors SIGTERM " +"est\n" +" envoyé.\n" +" \n" +" Options :\n" +" -s sig\tSIG est un nom de signal\n" +" -n sig\tSIG est un numéro de signal\n" +" -l\taffiche la liste des noms de signaux ; si des arguments suivent « -" +"l »,\n" +" \t\tils sont supposés être des numéros de signaux pour lesquels les noms " +"doivent\n" +" \t\têtre affichés\n" +" -L\tsynonyme de -l\n" +" \n" +" « kill » est une commande intégrée pour deux raisons : elle permet aux " +"IDs de\n" +" tâches d'être utilisés à la place des IDs de processus et elle permet " +"aux\n" +" processus d'être tués si la limite du nombre de processus que vous " +"pouvez créer\n" +" est atteinte.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable soit donnée " +"ou qu'une\n" +" erreur ne survienne." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Évalue des expressions arithmétiques.\n" +" \n" +" Chaque ARG est une expression arithmétique à évaluer. L'évaluation\n" +" est faite avec des entiers de largeur fixe sans vérification de\n" +" dépassement, mais la division par zéro est interceptée et\n" +" signalée comme une erreur. La liste suivante d'opérateurs\n" +" est groupée par niveau d'égale priorité. Les niveaux sont listés\n" +" par priorité décroissante.\n" +" \n" +" \tid++, id--\tpost-incrément ou post-décrément de variable\n" +" \t++id, --id\tpré-incrément ou pré-décrément de variable\n" +" \t-, +\t\tmoins unaire, plus unaire\n" +" \t!, ~\t\tnégations logique et binaire\n" +" \t**\t\tmise en exposant\n" +" \t*, /, %\t\tmultiplication, division, reste de la division\n" +" \t+, -\t\taddition, soustraction\n" +" \t<<, >>\t\tdécalage binaire à gauche et à droite\n" +" \t<=, >=, <, >\tcomparaison\n" +" \t==, !=\t\tégalité, inégalité\n" +" \t&\t\tET binaire\n" +" \t^\t\tOU binaire exclusif\n" +" \t|\t\tOU binaire\n" +" \t&&\t\tET logique\n" +" \t||\t\tOU logique\n" +" \texpr ? expr : expr\n" +" \t\t\topérateur de condition\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\taffectation\n" +" \n" +" Les variables de shell sont autorisées comme opérandes. Le nom de la\n" +" variable est remplacé par sa valeur (contrainte à un entier de largeur\n" +" fixe) à l'intérieur d'une expression. La variable n'a pas besoin " +"d'avoir\n" +" son attribut d'entier activé pour être utilisée dans une expression.\n" +" \n" +" Les opérateurs sont évalués dans leur ordre de priorité. Les sous-" +"expressions\n" +" entre parenthèses sont évaluées en premier et peuvent être prioritaires " +"sur\n" +" les règles ci-dessus.\n" +" \n" +" Code de sortie :\n" +" Si le dernier ARG est évalué à 0, « let » renvoie 1, sinon 0 est renvoyé." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Lit une ligne depuis l'entrée standard et la découper en morceaux.\n" +" \n" +" Lit une simple ligne depuis l'entrée standard ou depuis le descripteur " +"de\n" +" fichier FD si l'option « -u » est fournie. La ligne est découpée en " +"morceaux\n" +" comme des mots, et le premier mot est assigné au premier NOM, le " +"deuxième mot\n" +" au deuxième NOM, et ainsi de suite, le dernier NOM récupérant la liste " +"des mots\n" +" restants. Seuls les caractères trouvés dans $IFS sont reconnus comme " +"délimiteurs\n" +" de mots\n" +" \n" +" Si aucun NOM n'est fourni, la ligne lue est stockée dans la variable " +"REPLY.\n" +" \n" +" Options :\n" +" -a tableau\taffecte les mots lus séquentiellement aux indices de la " +"variable\n" +" \t\ttableau ARRAY en commençant à 0\n" +" -d délim\tcontinue jusqu'à ce que le premier caractère de DELIM soit " +"lu,\n" +" \t\tau lieu du retour à la ligne\n" +" -e\t\tutilise « Readline » pour obtenir la ligne\n" +" -i texte\tUtilise TEXTE comme texte initial pour « Readline »\n" +" -n n\ttermine après avoir lu N caractères plutôt que d'attendre\n" +" \t\tun retour à la ligne, mais obéi à un délimiteur si moins de N " +"caractères\n" +" \t\tsont lus avant le délimiteur\n" +" -N n\ttermine seulement après avoir lu exactement N caractères, à " +"moins\n" +" \t\tque le caractère EOF soit rencontré ou que le délai de lecture " +"n'expire.\n" +" \t\tLes délimiteurs sont ignorés\n" +" -p prompt\taffiche la chaîne PROMPT sans retour à la ligne final, " +"avant de\n" +" \t\ttenter une lecture\n" +" -r\tne pas permettre aux barres obliques inverses de se comporter " +"comme\n" +" \t\tdes caractères d'échappement\n" +" -s\tne pas répéter l'entrée provenant d'un terminal\n" +" -t timeout\texpire et renvoie un code d'échec si une ligne d'entrée " +"complète\n" +" \t\tn'est pas lue en moins de TIMEOUT secondes. La valeur de la " +"variable TIMEOUT\n" +" \t\test le délai d'expiration par défaut. TIMEOUT peut être un nombre " +"décimal.\n" +" \t\tSi TIMEOUT est à zéro, la lecture se termine immédiatement sans " +"essayer de\n" +" \t\tlire la moindre donnée mais elle renvoie un code de succès " +"seulement\n" +" \t\tsi l'entrée est disponible sur le descripteur de fichier. Le code\n" +" \t\tde sortie est supérieur à 128 si le délai a expiré\n" +" -u fd\tlit depuis le descripteur de fichier FD plutôt que l'entrée " +"standard\n" +" \n" +" Code de sortie :\n" +" Le code de retour est 0, à moins qu'une fin de fichier ne survienne, que " +"le délai expire,\n" +" ou qu'un descripteur de fichier non valable ne soit fourni comme " +"argument à « -u »." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Termine depuis une fonction du shell.\n" +" \n" +" Entraîne l'arrêt d'une fonction ou d'un script sourcé, avec le code\n" +" de retour spécifié par N. Si N est omis, le code de retour est celui\n" +" de la dernière commande exécutée à l'intérieur de la fonction ou du\n" +" script\n" +" \n" +" Code de retour :\n" +" Renvoie N ou le code d'échec si le shell n'est pas en train d'exécuter\n" +" une fonction ou un script." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Définit ou invalide des valeurs d'options et des paramètres de position du " +"shell.\n" +" \n" +" Change la valeur des attributs du shell et des paramètres de position, " +"ou\n" +" affiche les noms et valeurs des variables du shell.\n" +" \n" +" Options :\n" +" -a Marque pour l'export toutes les variables qui sont modifiées ou " +"créées.\n" +" -b Averti immédiatement de la fin d'une tâche.\n" +" -e Termine immédiatement si une commande s'arrête avec un code de " +"retour non nul.\n" +" -f Désactive la génération de nom de fichier (globbing).\n" +" -h Mémorise l'emplacement des commandes après leur recherche.\n" +" -k Place dans l'environnement tous les arguments d'affectation pour " +"une commande,\n" +" pas seulement ceux qui précèdent le nom de la commande.\n" +" -m Active le contrôle de tâche.\n" +" -n Lit les commandes, mais ne les exécute pas.\n" +" -o nom-option\n" +" Défini la variable correspondant à nom-option :\n" +" allexport identique à -a\n" +" braceexpand identique à -B\n" +" emacs utilise une édition de ligne façon « emacs »\n" +" errexit identique à -e\n" +" errtrace identique à -E\n" +" functrace identique à -T\n" +" hashall identique à -h\n" +" histexpand identique à -H\n" +" history active l'historique des commandes\n" +" ignoreeof ne termine pas le shell à la lecture d'un « EOF " +"»\n" +" interactive-comments\n" +" permet aux commentaires d'apparaître dans les " +"commandes interactives\n" +" keyword identique à -k\n" +" monitor identique à -m\n" +" noclobber identique à -C\n" +" noexec identique à -n\n" +" noglob identique à -f\n" +" nolog actuellement accepté mais ignoré\n" +" notify identique à -b\n" +" nounset identique à -u\n" +" onecmd identique à -t\n" +" physical identique à -P\n" +" pipefail le code de retour d'un tube est celui de la " +"dernière commande\n" +" qui s'est terminée avec un code non nul,\n" +" ou zéro si aucune commande ne s'est arrêtée " +"avec un code non nul.\n" +" posix modifie le comportement de « bash » où les " +"opérations par défaut\n" +" sont différentes du standard Posix de manière à " +"correspondre au\n" +" standard\n" +" privileged identique à -p\n" +" verbose identique à -v\n" +" vi utiliser une édition de ligne façon « vi »\n" +" xtrace identique à -x\n" +" -p Option activée lorsque les n° d'identifiants utilisateurs réels " +"et effectifs ne\n" +" sont pas les mêmes. Désactive le traitement du fichier $ENV et " +"l'importation des\n" +" fonctions du shell. Désactiver cette option permet de définir " +"les uid et gid\n" +" effectifs aux valeurs des uid et gid réels.\n" +" -t Termine après la lecture et l'exécution d'une commande.\n" +" -u Traite les variables non définies comme des erreurs lors de la " +"substitution.\n" +" -v Affiche les lignes d'entrée du shell à leur lecture.\n" +" -x Affiche les commandes et leurs arguments au moment de leur " +"exécution.\n" +" -B Effectue l'expansion des accolades\n" +" -C Si défini, empêche les fichiers réguliers existants d'être " +"écrasés par une\n" +" redirection de la sortie.\n" +" -E Si défini, l'interception ERR est héritée par les fonctions du " +"shell.\n" +" -H Active la substitution d'historique façon « ! ». Ceci est actif " +"par défaut\n" +" lorsque le shell est interactif.\n" +" -P Si défini, les liens symboliques ne sont pas suivis lors de " +"l'exécution des\n" +" commandes telles que « cd » qui changent le répertoire courant.\n" +" -T Si défini, l'interception de DEBUG et RETURN est héritée par les " +"fonctions du shell.\n" +" -- Affecte tous les arguments restants aux paramètres de position.\n" +" S'il n'y a plus d'argument, les paramètres de position sont\n" +" indéfinis.\n" +" - Affecter tous les arguments restants aux paramètres de " +"position.\n" +" Les options « -x » et « -v » sont désactivées.\n" +" \n" +" Ces indicateurs peuvent être désactivés en utilisant « + » plutôt que « " +"- ». Ils peuvent\n" +" être utilisés lors de l'appel au shell. Le jeu d'indicateurs actuel peut " +"être trouvé\n" +" dans « $- ». Les n ARGs restants sont des paramètres de position et " +"sont affectés,\n" +" dans l'ordre, à $1, $2, .. $n. Si aucun ARG n'est donné, toutes les " +"variables du shell\n" +" sont affichées.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"donnée." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Annule des valeurs ou des attributs de variables et de fonctions du shell.\n" +" \n" +" Pour chaque NOM, annule la variable ou fonction correspondante.\n" +" \n" +" Options :\n" +" -f\ttraite chaque NOM comme une fonction du shell\n" +" -v\ttraite chaque NOM comme une variable du shell\n" +" -n\ttraite chaque NOM comme une référence nommée et annule la " +"variable\n" +" \t\telle-même plutôt que la variable à laquelle elle fait référence\n" +" \n" +" Sans option, « unset » essaye d'abord d'annuler une variable et, \n" +" en cas d'échec, essaye d'annuler la fonction.\n" +" \n" +" Certaines variables ne peuvent pas être annulées ; consultez aussi « " +"readonly ».\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit\n" +" donnée ou que NOM soit en lecture seule." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Définit l'attribut « export » pour des variables du shell.\n" +" \n" +" Marque chaque NOM pour exportation automatique vers l'environnement des\n" +" commandes exécutées ultérieurement. Si VALEUR est fournie, affecte la " +"VALEUR\n" +" avant l'exportation.\n" +" \n" +" Options :\n" +" -f\tse référer aux fonctions du shell\n" +" -n\tenlève la propriété d'exportation de chaque NOM\n" +" -p\taffiche une liste de toutes les variables et fonctions exportées\n" +" \n" +" L'argument « -- » désactive tout traitement postérieur d'options.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"données\n" +" ou que NOM ne soit pas valable." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marque des variables du shell comme non modifiables.\n" +" \n" +" Marque chaque NOM comme étant en lecture seule ; les valeurs de ces " +"NOMs\n" +" ne peuvent plus être modifiées par des affectations ultérieures. Si " +"VALEUR\n" +" est fournie, lui affecter la VALEUR avant le passage en lecture seule.\n" +" \n" +" Options :\n" +" -a\tse réfère à des variables étant des tableaux indexés\n" +" -A\tse réfère à des variables étant des tableaux associatifs\n" +" -f\tse réfère à des fonctions du shell\n" +" -p\taffiche une liste des toutes les fonctions et variables en lecture " +"seule\n" +" \t\tselon que l'option -f est fournie ou non\n" +" \n" +" Un argument « -- » désactive tout traitement postérieur d'options.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit\n" +" donnée ou que NOM ne soit pas valable." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Décale des paramètres de position.\n" +" \n" +" Renomme les paramètres de position $N+1,$N+2 ... à $1,$2 ... Si N n'est " +"pas\n" +" donné, il est supposé égal à 1.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que N soit négatif ou supérieur à $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Exécute des commandes depuis un fichier dans le shell actuel.\n" +" \n" +" Lit et exécute des commandes depuis NOMFICHIER dans le shell actuel. " +"Les\n" +" éléments dans $PATH sont utilisés pour trouver le répertoire contenant " +"NOMFICHIER.\n" +" Si des ARGUMENTS sont fournis, ils deviennent les paramètres de " +"position\n" +" lorsque NOMFICHIER est exécuté.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée dans NOMFICHIER, ou le " +"code\n" +" d'échec si NOMFICHIER ne peut pas être lu." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspend l'exécution du shell.\n" +" \n" +" Suspend l'exécution de ce shell jusqu'à ce qu'il reçoive un signal " +"SIGCONT.\n" +" À moins que ce soit forcé, les shell de connexion ne peuvent pas être " +"suspendus.\n" +" \n" +" Options :\n" +" -f\tforce la suspension, même si le shell est un shell de connexion\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que le contrôle de tâche ne soit pas " +"activé\n" +" ou qu'une erreur survienne." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Évalue une expression conditionnelle.\n" +" \n" +" Se termine avec le code de retour 0 (vrai) ou 1 (faux) selon\n" +" le résultat de l'évaluation de EXPR. Les expressions peuvent être\n" +" unaires ou binaires. Les expressions unaires sont souvent utilisées\n" +" pour examiner l'état d'un fichier. Il existe aussi des opérateurs de\n" +" chaîne, ainsi que des opérateurs de comparaison numériques.\n" +" \n" +" Le comportement de test dépend du nombre d'arguments. Consultez la " +"page\n" +" de manuel de bash pour connaître les spécifications complètes.\n" +" \n" +" Opérateurs sur des fichiers : \n" +" \n" +" -a FICHIER Vrai si le fichier existe.\n" +" -b FICHIER Vrai si le fichier est un fichier spécial de bloc.\n" +" -c FICHIER Vrai si le fichier est un fichier spécial de " +"caractères.\n" +" -d FICHIER Vrai si le fichier est un répertoire.\n" +" -e FICHIER Vrai si le fichier existe.\n" +" -f FICHIER Vrai si le fichier existe et est un fichier régulier.\n" +" -g FICHIER Vrai si le fichier est « set-group-id ».\n" +" -h FICHIER Vrai si le fichier est un lien symbolique.\n" +" -L FICHIER Vrai si le fichier est un lien symbolique.\n" +" -k FICHIER Vrai si le fichier a son bit « sticky » défini.\n" +" -p FICHIER Vrai si le fichier est un tube nommé.\n" +" -r FICHIER Vrai si le fichier est lisible par vous.\n" +" -s FICHIER Vrai si le fichier existe et n'est pas vide.\n" +" -S FICHIER Vrai si le fichier est un socket.\n" +" -t FD Vrai si FD est ouvert sur un terminal.\n" +" -u FICHIER Vrai si le fichier est « set-user-id ».\n" +" -w FICHIER Vrai si le fichier peut être écrit par vous.\n" +" -x FICHIER Vrai si le fichier est exécutable par vous.\n" +" -O FICHIER Vrai si le fichier est effectivement possédé par vous.\n" +" -G FICHIER Vrai si le fichier est effectivement possédé par votre " +"groupe.\n" +" -N FICHIER Vrai si le fichier a été modifié depuis la dernière " +"fois qu'il a été lu.\n" +" \n" +" FICHIER1 -nt FICHIER2 Vrai si le fichier1 est plus récent que le " +"fichier2 (selon la date\n" +" de modification).\n" +" \n" +" FICHIER1 -ot FICHIER2 Vrai si le fichier1 est plus vieux que le " +"fichier2.\n" +" \n" +" FICHIER1 -ef FICHIER2 Vrai si le fichier1 est un lien physique vers le " +"fichier2.\n" +" \n" +" Opérateurs sur des chaînes :\n" +" \n" +" -z CHAÎNE Vrai si la chaîne est vide.\n" +" \n" +" -n CHAÎNE\n" +" CHAÎNE Vrai si la chaîne n'est pas vide.\n" +" \n" +" CHAÎNE1 = CHAÎNE2\n" +" Vrai si les chaînes sont égales.\n" +" CHAÎNE1 != CHAÎNE2\n" +" Vrai si les chaînes ne sont pas égales.\n" +" CHAÎNE1 < CHAÎNE2\n" +" Vrai si le tri lexicographique place la chaîne1 en " +"premier.\n" +" CHAÎNE1 > CHAÎNE2\n" +" Vrai si le tri lexicographique place la chaîne1 en " +"deuxième.\n" +" \n" +" Autres opérateurs :\n" +" \n" +" -o OPTION Vrai si l'OPTION du shell est activée.\n" +" -v VAR Vrai si la variable de shell VAR est définie.\n" +" -R VAR Vrai is la variable VAR est définie est une référence " +"nommée.\n" +" ! EXPR Vrai si l'EXPRession est fausse.\n" +" EXPR1 -a EXPR2 Vrai si les deux expressions sont vraies.\n" +" EXPR1 -o EXPR2 Vrai si l'une des deux expressions est vraie.\n" +" \n" +" arg1 OP arg2 Tests arithmétiques. OP peut être -eq, -ne,\n" +" -lt, -le, -gt ou -ge.\n" +" \n" +" Les opérateurs arithmétiques binaires renvoient « vrai » si ARG1 est " +"égal,\n" +" non-égal, inférieur, inférieur ou égal, supérieur, supérieur ou égal à " +"ARG2.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès si EXPR est vraie, le code d'échec si EXPR est " +"fausse ou si\n" +" un argument non valable est donné." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Évalue une expression conditionnelle.\n" +" \n" +" Ceci est un synonyme de la primitive « test », mais le dernier argument\n" +" doit être le caractère « ] », pour fermer le « [ » correspondant." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Affiche les temps des processus.\n" +" \n" +" Affiche le cumul des temps utilisateur et système pour le shell et\n" +" tous ses processus fils.\n" +" \n" +" Code de retour :\n" +" Toujours le code de succès." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Intercepter des signaux et d'autres événements.\n" +" \n" +" Définit et active des gestionnaires à lancer lorsque le shell reçoit des " +"signaux\n" +" ou sous d'autres conditions.\n" +" \n" +" La commande ARG doit être lue et exécutée lorsque le shell reçoit le\n" +" signal SIGNAL_SPEC. Si ARG est absent (et qu'un unique SIGNAL_SPEC\n" +" est fourni) ou égal à « - », tous les signaux spécifiés sont remis\n" +" à leur valeur d'origine. Si ARG est une chaîne vide, tous les " +"SIGNAL_SPEC\n" +" sont ignorés par le shell et les commandes qu'ils appellent.\n" +" \n" +" Si SIGNAL_SPEC est EXIT (0), la commande ARG est exécutée à la sortie du " +"shell. Si un\n" +" SIGNAL_SPEC est DEBUG, ARG est exécuté après chaque commande simple. Si\n" +" un SIGNAL_SPEC est RETURN, ARG est exécuté à chaque fois qu'une fonction " +"shell ou\n" +" qu'un script lancé avec . ou source se termine. Un SIGNAL_SPEC\n" +" valant ERR permet d'exécuter ARG à chaque fois qu'un échec d'une " +"commande engendrerait\n" +" la sortie du shell lorsque l'option -e est activée.\n" +" \n" +" Si aucun argument n'est fourni, « trap » affiche la liste des commandes " +"associées\n" +" à chaque signal.\n" +" \n" +" Options :\n" +" -l\taffiche la liste des noms de signaux et leur numéro correspondant\n" +" -p\taffiche les commandes de « trap » associées à chaque SIGNAL_SPEC\n" +" \n" +" Chaque SIGNAL_SPEC est soit un nom de signal dans \n" +" ou un numéro de signal. Les noms de signaux sont insensibles à la casse " +"et\n" +" le préfixe « SIG » est facultatif. Un signal peut être envoyé au\n" +" shell avec « kill -signal $$ ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que SIGSPEC ne soit pas valable ou " +"qu'une\n" +" option non valable ne soit donnée." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Affiche des informations sur le type de commande.\n" +" \n" +" Pour chaque NOM, indique comment il serait interprété s'il était\n" +" utilisé comme un nom de commande.\n" +" \n" +" Options :\n" +" -a\taffiche tous les emplacements contenant un exécutable nommé NOM;\n" +" \t\ty compris les alias, les commandes intégrées et les fonctions si et " +"seulement si\n" +" \t\tl'option « -p » n'est pas utilisée\n" +" -f\tdésactive la recherche de fonctions du shell\n" +" -P\tforce une recherche de CHEMIN pour chaque NOM, même si c'est un " +"alias,\n" +" \t\tune commande intégrée ou une fonction et renvoie le nom du fichier " +"du disque\n" +" \t\tqui serait exécuté\n" +" -p\trenvoie le nom du fichier du disque qui serait exécuté sauf si\n" +" \t\t« type -t NOM » aurait renvoyé autre chose que « file » auquel cas, " +"rien\n" +" \t\tn'est renvoyé.\n" +" -t\taffiche un mot unique parmi « alias », « keyword »,\n" +" \t\t« function », « builtin », « file » or « », si NOM est " +"respectivement un alias,\n" +" \t\tun mot réservé du shell, une fonction du shell, une commande " +"intégrée,\n" +" \t\tun fichier du disque ou un nom inconnu\n" +" \n" +" Arguments :\n" +" NOM\tNom de commande à interpréter.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès si tous les NOMs sont trouvés, le code d'échec " +"si l'un\n" +" d'entre eux n'est pas trouvé." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modifie les limites de ressources du shell.\n" +" \n" +" Fournit un contrôle sur les ressources disponibles au shell et aux " +"processus\n" +" qu'il crée, sur les systèmes qui permettent un tel contrôle. \n" +" \n" +" Options :\n" +" -S\tutilise la limite de ressources « soft »\n" +" -H\tutilise la limite de ressources « hard »\n" +" -a\ttoutes les limites actuelles sont présentées\n" +" -b\tla taille du tampon de socket\n" +" -c\ttaille maximale des fichiers « core » créés\n" +" -d\ttaille maximale du segment de données d'un processus\n" +" -e\tla priorité maximale d'ordonnancement (« nice »)\n" +" -f\tla taille maximale des fichiers écrits par le shell et ses fils\n" +" -i\tle nombre maximal de signaux en attente\n" +" -k\tle nombre maximal de kqueues allouées pour ce processus\n" +" -l\tla taille maximale qu'un processus peut verrouiller en mémoire\n" +" -m\tla taille maximale de « set » résident\n" +" -n\tle nombre maximal de descripteurs de fichiers ouverts\n" +" -p\tla taille du tampon pour les tubes\n" +" -q\tle nombre maximal d'octets dans les queues de messages POSIX\n" +" -r\tla priorité maximale pour l'ordonnancement temps-réel\n" +" -s\tla taille maximale de la pile\n" +" -t\tla quantité maximale de temps processeur en secondes\n" +" -u\tle nombre maximal de processus utilisateurs\n" +" -v\tla taille de la mémoire virtuelle\n" +" -x\tle nombre maximal de verrous de fichiers\n" +" -P\tle nombre maximal de pseudo terminaux\n" +" -T\tle nombre maximal de threads\n" +" \n" +" Toutes les options ne sont pas disponibles sur toutes les plates-" +"formes.\n" +" \n" +" Si LIMIT est fournie, elle est utilisée comme nouvelle valeur de " +"ressource.\n" +" Les valeurs spéciales de LIMIT « soft », « hard » et « unlimited » " +"correspondent\n" +" respectivement aux valeurs actuelles de la limite souple, de la limite " +"dure,\n" +" ou à une absence de limite. Sinon la valeur actuelle de la limite est " +"affichée\n" +" Si aucune option n'est donnée, « -f » est supposée.\n" +" \n" +" Les valeurs sont des multiples de 1024 octets, sauf pour « -t » qui " +"prend des\n" +" secondes, « -p » qui prend un multiple de 512 octets et « -u » qui prend " +"un nombre\n" +" de processus sans unité.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"fournie ou\n" +" qu'une erreur ne survienne." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Affiche ou définit le masque de mode de fichier.\n" +" \n" +" Définit le masque de création de fichier comme étant MODE. Si MODE est " +"omis,\n" +" affiche la valeur courante du MASQUE.\n" +" \n" +" Si MODE commence par un chiffre, il est interprété comme un nombre " +"octal ;\n" +" sinon comme une chaîne de symboles de mode comme ceux acceptés par " +"chmod(1).\n" +" \n" +" Options :\n" +" -p\tsi MODE est omis, affiche sous une forme réutilisable en entrée\n" +" -S\taffiche sous forme symbolique, sinon la sortie octale est " +"utilisée\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que MODE ne soit pas valable ou " +"qu'une\n" +" option non valable ne soit donnée." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Attend la fin d'une tâche et renvoie le code de retour.\n" +" \n" +" Attend la fin du processus identifié par ID, qui peut être un ID de " +"processus\n" +" ou une spécification de tâche, et renvoie son code de retour. Si ID " +"n'est\n" +" pas donné, la commande attend la fin de tous les processus actifs en " +"cours et\n" +" le code de retour est zéro. Si ID est une spécification de tâche, la " +"commande\n" +" attend tous les processus dans le pipeline de la tâche.\n" +" \n" +" Si l'option -n est fournie, attend la fin de la prochaine tâche et " +"retourne\n" +" son code de retour.\n" +" \n" +" Si l'option -f est fournie et que le contrôle de tâche est activé, " +"attends que\n" +" le ID spécifié soit terminé au lieu d'attendre qu'il change de statut.\n" +" \n" +" Code de retour :\n" +" Renvoie le même code que celui d'ID, ou le code d'échec si ID n'est pas " +"valable\n" +" ou en cas d'option non valable." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Attend la fin d'un processus et renvoie le code de sortie.\n" +" \n" +" Attend la fin de chaque processus spécifié par un PID et donne son code " +"de\n" +" retour. Si PID n'est pas mentionné, la fin de tous les processus fils\n" +" actuellement actifs est attendue et le code de retour est zéro. PID doit " +"être\n" +" un ID de processus.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de retour du dernier PID. Échoue si PID n'est pas " +"valable ou\n" +" si une option non valable est donnée." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exécute des commandes pour chaque membre d'une liste.\n" +" \n" +" La boucle « for » exécute une suite de commandes pour chaque membre " +"d'une\n" +" liste d'éléments. Si « in MOTS ...; » n'est pas fourni, « in \"$@\" » " +"est\n" +" utilisé. Pour chaque élément dans MOTS, NOM est défini à cet élément,\n" +" et les COMMANDES sont exécutées.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Boucle « for » arithmétique.\n" +" \n" +" Équivalent à\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 sont des expressions arithmétiques. Si une " +"expression\n" +" est omise, elle se comporte comme si elle était évaluée à 1.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Sélectionne des mots d'une liste et exécute des commandes.\n" +" \n" +" Les mots WORDS subissent une expansion et génèrent une liste de mots.\n" +" L'ensemble de ces mots est affiché dans la sortie d'erreur, chacun\n" +" étant précédé d'un nombre. Si « in WORDS » n'est pas fourni, \n" +" « in \"$@\" » est utilisé. L'invite PS3 est ensuite affichée et une\n" +" ligne est lue depuis l'entrée standard. Si la ligne consiste en\n" +" le numéro d'un des mots affichés, alors ce mot est affecté à NAME.\n" +" Si la ligne est vide, WORDS et l'invite sont réaffichés. Si un EOF\n" +" est lu, la commande se termine. Toute autre valeur lue a pour effet\n" +" de vider NAME. La ligne lue est conservée dans la variable REPLY.\n" +" Les COMMANDS sont exécutées après chaque sélection jusqu'à ce qu'une\n" +" commande « break » soit exécutée.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Signale le temps passé pendant l'exécution d'un tube de commandes.\n" +" \n" +" Exécute PIPELINE et affiche un résumé du temps réel, du temps " +"processeur\n" +" utilisateur, et du temps processeur système passés à exécuter PIPELINE\n" +" lorsque celui-ci se termine.\n" +" \n" +" Options :\n" +" -p\taffiche le résumé dans le format portable Posix.\n" +" \n" +" La valeur de la variable TIMEFORMAT est utilisée comme format de " +"sortie.\n" +" \n" +" Code de sortie :\n" +" Le code de retour est celui du PIPELINE." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exécute des commandes selon une correspondance de motif.\n" +" \n" +" Exécute de manière sélective les COMMANDES selon la correspondance du " +"MOT\n" +" au MOTIF. Le caractère « | » est utilisé pour séparer les différents " +"motifs.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exécute des commandes selon une condition.\n" +" \n" +" La liste « if COMMANDES » est exécutée. Si elle se termine avec le code " +"zéro,\n" +" alors la liste « then COMMANDES » est exécutée. Sinon, chaque liste\n" +" « elif COMMANDES » est exécutée à son tour et si son code de retour est " +"zéro,\n" +" la liste « then COMMANDES » correspondante est exécutée et la commande « " +"if »\n" +" se termine. Sinon, la liste « else COMMANDES » est exécutée si elle " +"existe.\n" +" Le code de retour de l'ensemble est celui de la dernière commande " +"exécutée\n" +" ou zéro si aucune condition n'était vraie.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exécute des commandes aussi longtemps qu'elles réussissent.\n" +" \n" +" Effectue une expansion et exécute les COMMANDES aussi longtemps\n" +" que la commande finale du « while » se termine avec un code de\n" +" retour à zéro.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exécute des commandes aussi longtemps qu'un test échoue.\n" +" \n" +" Effectue une expansion et exécute les commandes « COMMANDES »\n" +" aussi longtemps que les commandes de « until » se terminent avec\n" +" un code de retour différent de zéro.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Crée un coprocessus nommé NOM.\n" +" \n" +" Exécute la COMMANDE de manière asynchrone, en connectant la sortie et\n" +" l'entrée standard de la commande par un tube aux descripteurs de " +"fichiers\n" +" affectés aux indices 0 et 1 d'une variable tableau NOM dans le shell en\n" +" cours d'exécution. Le NOM par défaut est « COPROC ».\n" +" \n" +" Code de retour :\n" +" La commande coproc renvoie le code de sortie 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Définit une fonction du shell.\n" +" \n" +" Crée une fonction du shell nommée NOM. Lorsqu'appelée comme une simple " +"commande,\n" +" NOM lance la COMMANDE dans le contexte du shell qui l'appelle. Lorsque " +"NOM est appelé,\n" +" les arguments sont transmis à la fonction comme $1...$n, et le nom de la " +"fonction\n" +" est $FUNCNAME.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que NOM ne soit en lecture seule." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Groupe plusieurs commandes en une seule.\n" +" \n" +" Lance un ensemble de commandes d'un groupe. Ceci est une façon de\n" +" rediriger tout un ensemble de commandes.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Reprend une tâche en arrière plan.\n" +" \n" +" Équivalent à l'argument JOB_SPEC de la commande « fg ». Reprend " +"l'exécution\n" +" d'une tâche stoppée ou en tâche de fond. JOB_SPEC peut spécifier soit\n" +" un nom soit un numéro de tâche. Faire suivre JOB_SPEC de « & » permet " +"de\n" +" placer la tâche en arrière plan, comme si la spécification de tâche " +"avait\n" +" été fournie comme argument de « bg ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la commande reprise." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Évalue une expression arithmétique.\n" +" \n" +" L'EXPRESSION est évaluée selon les règles d'évaluation arithmétique.\n" +" C'est équivalent à « let EXPRESSION ».\n" +" \n" +" Code de sortie :\n" +" Renvoie 1 si EXPRESSION est évaluée à 0, sinon renvoie 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Exécute une commande conditionnelle.\n" +" \n" +" Renvoie le code de retour 0 ou 1 dépendant de l'évaluation de " +"l'EXPRESSION\n" +" conditionnelle. Les expressions sont formées de la même façon que pour " +"la\n" +" primitive « test », et peuvent être combinées avec les opérateurs " +"suivants :\n" +" \n" +" \t( EXPRESSION )\tRenvoie la valeur de l'EXPRESSION\n" +" \t! EXPRESSION\tVrai si l'EXPRESSION est fausse, sinon vrai\n" +" \tEXPR1 && EXPR2\tVrai si EXPR1 et EXPR2 sont vraies, faux sinon\n" +" \tEXPR1 || EXPR2\tVrai si EXPR1 ou EXPR2 est vraie, faux sinon\n" +" \n" +" Lorsque les opérateurs « == » et « != » sont utilisés, la chaîne à " +"droite de\n" +" l'opérateur est utilisée comme motif, et une mise en correspondance est " +"effectuée.\n" +" Lorsque l'opérateur « =~ » est utilisé, la chaîne à droite de " +"l'opérateur\n" +" est mise en correspondance comme une expression rationnelle.\n" +" \n" +" Les opérateurs « && » et « || » n'évaluent pas EXPR2 si\n" +" EXPR1 est suffisant pour déterminer la valeur de l'expression.\n" +" \n" +" Code de sortie :\n" +" 0 ou 1 selon la valeur de l'EXPRESSION." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Nom et usage de variable shell courantes.\n" +" \n" +" BASH_VERSION\tNuméro de version de ce Bash.\n" +" CDPATH\tUne liste de répertoires, séparés par un deux-points, utilisés\n" +" \t\tpar « cd » pour la recherche de répertoires.\n" +" GLOBIGNORE\tUne liste de motifs séparés par un deux-points, décrivant " +"les\n" +" \t\tnoms de fichiers à ignorer lors de l'expansion des chemins.\n" +" HISTFILE\tLe nom du fichier où votre historique des commandes est " +"stocké.\n" +" HISTFILESIZE\tLe nombre maximal de lignes que ce fichier peut contenir.\n" +" HISTSIZE\tLe nombre maximal de lignes d'historique auquel un shell en\n" +" \t\tfonctionnement peut accéder.\n" +" HOME\tLe chemin complet vers votre répertoire de connexion.\n" +" HOSTNAME\tLe nom de la machine actuelle.\n" +" HOSTTYPE\tLe type de processeur sur lequel cette version de Bash " +"fonctionne.\n" +" IGNOREEOF\tContrôle l'action du shell à la réception d'un caractère « " +"EOF »\n" +" \t\tcomme seule entrée. Si défini, sa valeur est le nombre de " +"caractères\n" +" \t\t« EOF » qui peuvent être rencontrés à la suite sur une ligne vide\n" +" \t\tavant que le shell ne se termine (10 par défaut).\n" +" \t\tS'il n'est pas défini, « EOF » signifie la fin de l'entrée.\n" +" MACHTYPE\tUne chaîne décrivant le système actuel sur lequel fonctionne " +"Bash.\n" +" MAILCHECK\tLe nombre de secondes séparant deux vérifications du courrier " +"par Bash.\n" +" MAILPATH\tUne liste de fichiers séparés par un deux-points, que Bash " +"utilise\n" +" \t\tpour vérifier les nouveaux courriers.\n" +" OSTYPE\tLa version d'Unix sur laquelle cette version de Bash " +"fonctionne.\n" +" PATH\tUne liste de répertoires séparés par un deux-points, utilisés\n" +" \t\tpour la recherche des commandes.\n" +" PROMPT_COMMAND\tUne commande à exécuter avant d'afficher chaque invite\n" +" \t\tde commande principale.\n" +" PS1\t\tL'invite de commande principal.\n" +" PS2\t\tL'invite secondaire.\n" +" PWD\t\tLe chemin complet vers le répertoire actuel.\n" +" SHELLOPTS\tLa liste des options activées du shell, séparées par un deux-" +"points.\n" +" TERM\tLe nom du type actuel du terminal.\n" +" TIMEFORMAT\tLe format de sortie pour les statistiques de temps " +"affichées\n" +" \t\tpar le mot réservé « time ».\n" +" auto_resume\tNon-vide signifie qu'un mot de commande apparaissant\n" +" \t\tde lui-même sur une ligne est d'abord recherché dans la liste des\n" +" \t\ttâches stoppées. Si elle est trouvée, la tâche est remise en avant-" +"plan.\n" +" \t\tLa valeur « exact » signifie que le mot de commande doit " +"correspondre\n" +" \t\texactement à la commande dans la liste des tâches stoppées. La " +"valeur\n" +" \t\t« substring » signifie que le mot de commande doit correspondre à " +"une\n" +" \t\tsous-chaîne de la tâche. Une autre valeur signifie que la commande " +"doit\n" +" \t\têtre un préfixe d'une tâche stoppée.\n" +" histchars\tCaractères contrôlant l'expansion d'historique et la " +"substitution\n" +" \t\trapide. Le premier caractère est le caractère de substitution " +"d'historique,\n" +" \t\thabituellement « ! ». Le deuxième est le caractère de substitution " +"rapide,\n" +" \t\thabituellement « ^ ». Le troisième est le caractère de commentaire\n" +" \t\td'historique, habituellement « # ».\n" +" HISTIGNORE\tUne liste de motifs séparés par un deux-points, utilisés " +"pour\n" +" \t\tdécider quelles commandes doivent être conservées dans la liste " +"d'historique.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Ajoute un répertoire à la pile.\n" +" \n" +" Ajoute un répertoire en haut de la pile des répertoires, ou permute\n" +" la pile, de façon que le répertoire en haut de la pile devienne\n" +" le nouveau répertoire de travail. S'il n'y a pas d'argument, les deux\n" +" répertoires en haut de la pile sont échangés.\n" +" \n" +" Options :\n" +" -n\tNe change pas de répertoire de travail lorsque des répertoires\n" +" \t\tsont ajoutés à la pile, de façon que seule la pile soit manipulée\n" +" \n" +" Arguments :\n" +" +N\tPermute la pile de façon que le Nième répertoire se place en " +"haut,\n" +" \t\ten comptant de zéro depuis la gauche de la liste fournie par « dirs " +"».\n" +" \n" +" -N\tPermute la pile de façon que le Nième répertoire se place en " +"haut,\n" +" \t\ten comptant de zéro depuis la droite de la liste fournie par « dirs " +"».\n" +" \n" +" dir\tAjoute le répertoire DIR en haut de la pile, et en fait le " +"nouveau\n" +" \t\trépertoire de travail.\n" +" \n" +" Vous pouvez voir la pile des répertoires avec la commande « dirs ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'un argument non valable ne soit " +"fourni\n" +" ou que le changement de répertoire n'échoue." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Enlève des répertoires de la pile.\n" +" \n" +" Enlève des éléments de la pile des répertoires. S'il n'y a pas\n" +" d'argument, le répertoire en haut de la pile est enlevé et le\n" +" nouveau sommet de la pile devient le répertoire de travail.\n" +" \n" +" Options :\n" +" -n\tNe change pas de répertoire de travail lorsque des répertoires\n" +" \t\tsont enlevés de la pile, de façon que seule la pile soit manipulée\n" +" \n" +" Arguments :\n" +" +N\tEnlève le Nième répertoire, en comptant de zéro depuis la gauche\n" +" \t\tde la liste fournie par « dirs ». Par exemple : « popd +0 »\n" +" \t\tenlève le premier répertoire, « popd +1 » le deuxième.\n" +" \n" +" -N\tEnlève le Nième répertoire, en comptant de zéro depuis la droite\n" +" \t\tde la liste fournie par « dirs ». Par exemple : « popd -0 »\n" +" \t\tenlève le dernier répertoire, « popd -1 » l'avant-dernier.\n" +" \n" +" Vous pouvez voir la pile des répertoires avec la commande « dirs ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'un argument non valable ne soit " +"donné\n" +" ou que le changement de répertoire n'échoue." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Affiche la pile de répertoire.\n" +" \n" +" Affiche la liste des répertoires actuellement mémorisés. Les " +"répertoires\n" +" sont insérés dans la liste avec la commande « pushd ». Vous pouvez " +"remonter\n" +" dans la liste en enlevant des éléments avec la commande « popd ».\n" +" \n" +" Options:\n" +" -c\tefface la pile des répertoires en effaçant tous les éléments\n" +" -l\tn'affiche pas la version raccourcie (avec ~) des répertoires\n" +" \t\trelativement à votre dossier personnel\n" +" -p\taffiche la pile des répertoires avec un élément par ligne\n" +" -v\taffiche la pile des répertoires avec un élément par ligne,\n" +" \t\ten préfixant avec sa position dans la pile\n" +" \n" +" Arguments :\n" +" +N\tAffiche le Nième élément en comptant de zéro depuis la gauche de " +"la\n" +" \t\tliste affichée par « dirs » lorsque celle-ci est appelée sans " +"option.\n" +" \n" +" -N\tAffiche le Nième élément en comptant de zéro depuis la droite de " +"la\n" +" \t\tliste affichée par « dirs » lorsque celle-ci est appelée sans " +"option.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit\n" +" fournie ou qu'une erreur ne survienne." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Active ou désactive des options du shell.\n" +" \n" +" Change la valeur de chaque option du shell NOMOPT. S'il n'y a pas " +"d'argument\n" +" à l'option, liste chaque NOMOPT fourni ou toutes les options du shell si " +"aucun\n" +" NOMOPT est donné, avec une indication montrant si chacun est actif ou " +"non.\n" +" \n" +" Options :\n" +" -o\trestreint les NOMOPT à ceux définis pour être utilisés avec « set -" +"o »\n" +" -p\taffiche chaque option du shell en indiquant son état\n" +" -q\tsupprime l'affichage\n" +" -s\tactive (set) chaque NOMOPT\n" +" -u\tdésactive (unset) chaque NOMOPT\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès si NOMOPT est active ; échec si une option non " +"valable\n" +" est donnée ou si NOMOPT est inactive." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formate et affiche des ARGUMENTS en contrôlant le FORMAT.\n" +" \n" +" Options :\n" +" -v var\taffecte la sortie à la variable VAR du shell plutôt que de " +"l'afficher\n" +" \t\tsur la sortie standard\n" +" \n" +" Le FORMAT est une chaîne de caractères qui contient trois types " +"d'objets : des caractères\n" +" normaux qui sont simplement copiés vers la sortie standard ; des " +"séquences d'échappement\n" +" qui sont converties et copiées vers la sortie standard et des " +"spécifications de\n" +" format, chacun entraînant l'affichage de l'argument suivant.\n" +" \n" +" En plus des formats standards décrits dans printf(1), « printf » " +"interprète :\n" +" \n" +" %b\tdéveloppe les séquences d'échappement à contre-oblique dans " +"l'argument correspondant\n" +" %q\tprotège les arguments avec des guillemets de façon qu'ils puissent " +"être réutilisés\n" +" comme entrée du shell.\n" +" %(fmt)T\trenvoie la chaîne date-heure résultant de l'utilisation de " +"FMT comme\n" +" \t chaîne de format pour strftime(3)\n" +" \n" +" Le format est réutilisé si nécessaire pour consommer tous les arguments. " +"Si il y a\n" +" moins d'arguments que exigé par le format, les spécificateurs de format " +"surnuméraires\n" +" se comportent comme si la valeur zéro ou une chaîne nulle avait été " +"fournie (selon\n" +" ce qui est approprié).\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"donnée ou qu'une\n" +" erreur d'écriture ou d'affectation ne survienne." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Spécifie la façon dont Readline complète les arguments.\n" +" \n" +" Pour chaque NOM, la commande spécifie la façon dont les arguments sont " +"complétés\n" +" S'il n'y a pas d'option, le réglage actuel est affiché d'une manière\n" +" réutilisable comme une entrée.\n" +" \n" +" Options :\n" +" -p\taffiche le réglage d'auto-complètement actuel dans un format " +"réutilisable\n" +" -r\tretire un réglage d'auto-complètement de chaque NOM ou, si aucun " +"NOM\n" +" \t\tn'est fourni, retire tous les réglages\n" +" -D\tapplique les auto-complètements et actions comme valeurs par " +"défaut aux\n" +" \t\tcommandes ne possédant aucun auto-complètement spécifique\n" +" -E\tapplique les auto-complètements et actions aux commandes vides\n" +" \t\t(auto-complètement tenté sur une ligne vide)\n" +" -I\tapplique les auto-complètements et actions au mot initial " +"(habituellement\n" +" \t\tla commande)\n" +" \n" +" Lorsqu'un auto-complètement est tenté, les actions sont appliquées dans " +"l'ordre\n" +" dans lequel les options en majuscule ci-dessus sont listées. Si " +"plusieurs\n" +" options sont fournies, l'option « -D » est prioritaire sur -E et les " +"deux sont\n" +" prioritaires sur -I.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"fournie ou\n" +" qu'une erreur ne survienne." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Affiche les possibilités de complètement dépendant des options.\n" +" \n" +" Ceci est destiné à être utilisé depuis une fonction de shell générant\n" +" des auto-complètements possibles. Si le MOT optionnel est fourni,\n" +" des correspondances avec « MOT » sont générées.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit\n" +" fournie ou qu'une erreur ne survienne." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modifie ou affiche les options d'auto-complètement.\n" +" \n" +" Modifie les options d'auto-complètement pour chaque NOM ou, si aucun NOM " +"n'est\n" +" fourni, pour l'auto-complètement actuellement exécuté. Si aucune OPTION " +"n'est\n" +" donnée, affiche les options d'auto-complètement de chaque NOM ou le " +"réglage\n" +" actuel d'auto-complètement.\n" +" \n" +" Options :\n" +" \t-o option\tDéfini l'option d'auto-complètement OPTION pour chaque NOM\n" +" \t-D\t\tChange les options pour l'auto-complètement de commande par " +"défaut\n" +" \t-E\t\tChange les options pour l'auto-complètement de commande vide\n" +" \t-I\t\tChange les options pour l'auto-complètement du mot initial\n" +" \n" +" Utiliser « +o » au lieu de « -o » désactive l'option spécifiée.\n" +" \n" +" Arguments :\n" +" \n" +" Chaque NOM correspond à une commande pour laquelle un réglage d'auto-" +"complètement\n" +" doit déjà avoir été défini grâce à la commande intégrée « complete ». " +"Si aucun\n" +" NOM n'est fourni, « compopt » doit être appelée par une fonction " +"générant\n" +" des auto-complètements ; ainsi les options de ce générateur d'auto-" +"complètement\n" +" en cours d'exécution seront modifiées.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"fournie\n" +" ou que NOM n'ait aucun réglage d'auto-complètement." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Lit des lignes depuis l'entrée standard vers une variable tableau indexé.\n" +" \n" +" Lit des lignes depuis l'entrée standard vers la variable tableau indexé " +"TABLEAU ou\n" +" depuis le descripteur de fichier FD si l'option « -u » est utilisée. La " +"variable\n" +" MAPFILE est le TABLEAU par défaut.\n" +" \n" +" Options :\n" +" -d delim\tUtilise DELIM pour terminer les lignes au lieu du saut de " +"ligne\n" +" -n nombre\tCopie au maximum NOMBRE lignes. Si NOMBRE est 0, toutes " +"les lignes sont copiées.\n" +" -O origine\tCommence l'affectation au TABLEAU à l'indice ORIGINE. " +"L'indice par défaut est 0.\n" +" -s nombre\tSaute les NOMBRE premières lignes lues.\n" +" -t\tRetire les retours à la ligne de chaque ligne lue.\n" +" -u fd\tLit les lignes depuis le descripteur de fichier FD au lieu de " +"l'entrée standard.\n" +" -C callback\tÉvalue CALLBACK à chaque fois que QUANTUM lignes sont " +"lues.\n" +" -c quantum\tIndique le nombre de lignes lues entre chaque appel au " +"CALLBACK.\n" +" \n" +" Arguments :\n" +" TABLEAU\tNom de la variable tableau à utiliser pour les données.\n" +" \n" +" Si l'option « -C » est fournie sans option « -c », le quantum par défaut " +"est 5000.\n" +" Lorsque CALLBACK est évalué, l'indice du prochain élément de tableau qui " +"sera affecté\n" +" lui est transmis comme argument additionnel.\n" +" \n" +" Si la commande « mapfile » n'est pas appelée avec une origine explicite, " +"le tableau est\n" +" vidé avant affectation.\n" +" \n" +" code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit " +"donnée ou que\n" +" le TABLEAU soit en lecture seule ou ne soit pas un tableau indexé." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Lit des lignes depuis un fichier vers une variable tableau.\n" +" \n" +" Synonyme de « mapfile »." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Renvoie le contexte de l'appel de sous-routine actuel.\n" +#~ " \n" +#~ " Sans EXPR, renvoie" + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process : processus %5ld (%s) dans le_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "N° de signal inconnu" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2014 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licence GPLv2+ : GNU GPL version 2 ou ultérieure \n" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". Avec EXPR, renvoie\n" +#~ " " + +#~ msgid "" +#~ "; this extra information can be used to\n" +#~ " provide a stack trace.\n" +#~ " \n" +#~ " The value of EXPR indicates how many call frames to go back before " +#~ "the\n" +#~ " current one; the top frame is frame 0." +#~ msgstr "" +#~ "; ces informations supplémentaires peuvent être utilisées pour\n" +#~ " fournir une trace d'appels\n" +#~ " \n" +#~ " La valeur de EXPR indique le nombre de cadres d'appels duquel il faut " +#~ "revenir en arrière\n" +#~ " avant le cadre actuel ; le cadre supérieur est le cadre 0." + +#~ msgid " " +#~ msgstr " " + +#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," +#~ msgstr "Sans « EXPR », renvoie « $ligne $nomfichier ». Avec « EXPR »," + +#~ msgid "returns \"$line $subroutine $filename\"; this extra information" +#~ msgstr "" +#~ "renvoie « $ligne $sousroutine $nomfichier » ; cette information " +#~ "supplémentaire" + +#~ msgid "can be used used to provide a stack trace." +#~ msgstr "peut être utilisée pour fournir une trace de la pile" + +#~ msgid "" +#~ "The value of EXPR indicates how many call frames to go back before the" +#~ msgstr "" +#~ "La valeur de « EXPR » indique le nombre de cadres d'appel dont il faut " +#~ "reculer" + +#~ msgid "current one; the top frame is frame 0." +#~ msgstr "par rapport à l'actuel ; le cadre supérieur est le cadre 0." + +#~ msgid "%s: invalid number" +#~ msgstr "%s : nombre non valable" + +#~ msgid "Shell commands matching keywords `" +#~ msgstr "Commandes du shell correspondant aux mots-clés « " + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "" +#~ "Affiche la liste des répertoires actuellement mémorisés. Les répertoires" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "sont insérés dans la pile avec la commande « pushd » ; vous pouvez" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "" +#~ "remonter dans la pile en enlevant des éléments avec la commande « popd »." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "" +#~ "L'option « -l » demande à « dirs » de ne pas afficher sous forme abrégée" + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "" +#~ "les répertoires relatifs à votre répertoire personnel. Cela signifie que" + +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "" +#~ "le répertoire « ~/bin » pourra être affiché « /homes/bfox/bin ». L'option " +#~ "« -v »" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "demande à « dirs » d'afficher un répertoire de la pile par ligne," + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "" +#~ "en le précédant de sa position dans la pile. L'option « -p » fait la " +#~ "même chose" + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "sans afficher le numéro d'emplacement dans la pile." + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "" +#~ "L'option « -c » vide la pile des répertoires en retirant tous ses " +#~ "éléments." + +#~ msgid "" +#~ "+N displays the Nth entry counting from the left of the list shown by" +#~ msgstr "" +#~ "+N affiche la Nième entrée à partir de la gauche de la liste fournie par" + +#~ msgid " dirs when invoked without options, starting with zero." +#~ msgstr "" +#~ " « dirs » lorsqu'elle est appelée sans option, la première entrée " +#~ "étant zéro." + +#~ msgid "" +#~ "-N displays the Nth entry counting from the right of the list shown by" +#~ msgstr "" +#~ "+N affiche la Nième entrée à partir de la droite de la liste fournie par" + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "" +#~ "Ajoute un répertoire au dessus de la pile des répertoires ou effectue une" + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "" +#~ "rotation de la pile en plaçant le répertoire supérieur comme répertoire " +#~ "courant." + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "" +#~ "Sans paramètre, les deux répertoires supérieurs de la pile sont échangés." + +#~ msgid "+N Rotates the stack so that the Nth directory (counting" +#~ msgstr "" +#~ "+N effectue une rotation de la pile de façon que le Nième répertoire " +#~ "soit" + +#~ msgid " from the left of the list shown by `dirs', starting with" +#~ msgstr "" +#~ "placé au dessus (N commençant à zéro et en partant à gauche de la liste" + +#~ msgid " zero) is at the top." +#~ msgstr " fournie par « dirs »)." + +#~ msgid "-N Rotates the stack so that the Nth directory (counting" +#~ msgstr "" +#~ "+N effectue une rotation de la pile de façon que le Nième répertoire " +#~ "soit" + +#~ msgid " from the right of the list shown by `dirs', starting with" +#~ msgstr "" +#~ "placé au dessus (N commençant à zéro et en partant à gauche de la liste" + +#~ msgid "-n suppress the normal change of directory when adding directories" +#~ msgstr "" +#~ "-n inhibe le changement de répertoire lors d'un ajout de répertoire " + +#~ msgid " to the stack, so only the stack is manipulated." +#~ msgstr " à la liste. Seule la pile est manipulée." + +#~ msgid "dir adds DIR to the directory stack at the top, making it the" +#~ msgstr "" +#~ "dir ajoute « DIR » au dessus de la pile des répertoires, en faisant de " +#~ "lui" + +#~ msgid " new current working directory." +#~ msgstr " le nouveau répertoire courant." + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "" +#~ "Vous pouvez voir le contenu de la pile des répertoires avec la commande « " +#~ "dirs »." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Enlève des éléments de la pile des répertoires. Sans paramètre," + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "le répertoire supérieur de la pile est enlevé et un changement de" + +#~ msgid "+N removes the Nth entry counting from the left of the list" +#~ msgstr "+N enlève le Nième élément en commençant à zéro à gauche" + +#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr "de la liste affichée par « dirs ». Par exemple, « popd +0 »" + +#~ msgid " removes the first directory, `popd +1' the second." +#~ msgstr " enlève le premier répertoire, « popd +1 » le second." + +#~ msgid "-N removes the Nth entry counting from the right of the list" +#~ msgstr "+N enlève la Nième entrée en commençant à zéro à droite" + +#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr "de la liste affichée par « dirs ». Par exemple, « popd -0 »" + +#~ msgid " removes the last directory, `popd -1' the next to last." +#~ msgstr " enlève le dernier répertoire, « popd -1 » l'avant-dernier." + +#~ msgid "" +#~ "-n suppress the normal change of directory when removing directories" +#~ msgstr "" +#~ "-n inhibe le changement de répertoire lors de l'enlèvement d'un " +#~ "répertoire" + +#~ msgid " from the stack, so only the stack is manipulated." +#~ msgstr " de la liste. Seule la pile est manipulée." + +#~ msgid "allocated" +#~ msgstr "alloué" + +#~ msgid "freed" +#~ msgstr "libéré" + +#~ msgid "requesting resize" +#~ msgstr "demande de redimensionnement" + +#~ msgid "just resized" +#~ msgstr "redimensionné à l'instant" + +#~ msgid "bug: unknown operation" +#~ msgstr "bogue : opération inconnue" + +#~ msgid "malloc: watch alert: %p %s " +#~ msgstr "malloc : alerte de « watch » : %p %s " + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc : impossible de réallouer %lu octets (%lu octets alloués)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc : impossible d'allouer %lu octets" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc : %s:%d : impossible de réallouer %lu octets (%lu octets alloués)" + +#~ msgid "" +#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n" +#~ " break N levels." +#~ msgstr "" +#~ "Permet de sortir d'une boucle FOR, WHILE ou UNTIL. Si N est précisé,\n" +#~ " la sortie de boucle se fait sur N niveaux." + +#~ msgid "" +#~ "Run a shell builtin. This is useful when you wish to rename a\n" +#~ " shell builtin to be a function, but need the functionality of the\n" +#~ " builtin within the function itself." +#~ msgstr "" +#~ "Lance une primitive du shell. Ceci est utile lorsque vous souhaitez " +#~ "nommer une fonction comme\n" +#~ " une primitive, mais que vous avez besoin d'utiliser la primitive dans " +#~ "la fonction elle-même." + +#~ msgid "" +#~ "Print the current working directory. With the -P option, pwd prints\n" +#~ " the physical directory, without any symbolic links; the -L option\n" +#~ " makes pwd follow symbolic links." +#~ msgstr "" +#~ "Affiche le répertoire de travail actuel. Avec l'option « -P », « pwd » " +#~ "affiche\n" +#~ " le répertoire physique, sans lien symbolique ; l'option « -L »\n" +#~ " demande à « pwd » de suivre les liens symboliques." + +#~ msgid "Return a successful result." +#~ msgstr "Renvoie un résultat de succès" + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n" +#~ " function called `ls', and you wish to call the command `ls', you can\n" +#~ " say \"command ls\". If the -p option is given, a default value is " +#~ "used\n" +#~ " for PATH that is guaranteed to find all of the standard utilities. " +#~ "If\n" +#~ " the -V or -v option is given, a string is printed describing " +#~ "COMMAND.\n" +#~ " The -V option produces a more verbose description." +#~ msgstr "" +#~ "Lance la commande COMMAND avec les ARGS en ignorant les fonctions du " +#~ "shell. Si vous\n" +#~ " avez défini une fonction de shell appelée « ls » et que vous voulez " +#~ "appeler\n" +#~ " la commande « ls », vous pouvez faire « command ls ». Si l'option « -" +#~ "p » est\n" +#~ " donnée, une valeur par défaut est utilisée pour le PATH garantissant " +#~ "que tous\n" +#~ " les utilitaires standards seront trouvés. Si l'option « -V » ou « -v " +#~ "» est\n" +#~ " donnée, une description de la commande s'affiche. L'option « -V » " +#~ "fournit plus\n" +#~ " d'informations." + +#~ msgid "" +#~ "Declare variables and/or give them attributes. If no NAMEs are\n" +#~ " given, then display the values of variables instead. The -p option\n" +#~ " will display the attributes and values of each NAME.\n" +#~ " \n" +#~ " The flags are:\n" +#~ " \n" +#~ " -a\tto make NAMEs arrays (if supported)\n" +#~ " -f\tto select from among function names only\n" +#~ " -F\tto display function names (and line number and source file name " +#~ "if\n" +#~ " \tdebugging) without definitions\n" +#~ " -i\tto make NAMEs have the `integer' attribute\n" +#~ " -r\tto make NAMEs readonly\n" +#~ " -t\tto make NAMEs have the `trace' attribute\n" +#~ " -x\tto make NAMEs export\n" +#~ " \n" +#~ " Variables with the integer attribute have arithmetic evaluation (see\n" +#~ " `let') done when the variable is assigned to.\n" +#~ " \n" +#~ " When displaying values of variables, -f displays a function's name\n" +#~ " and definition. The -F option restricts the display to function\n" +#~ " name only.\n" +#~ " \n" +#~ " Using `+' instead of `-' turns off the given attribute instead. " +#~ "When\n" +#~ " used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "" +#~ "Déclare des variables ou ajoute des attributs aux variables. Si aucun " +#~ "nom\n" +#~ " n'est donné, affiche plutôt les valeurs des variables. L'option « -p " +#~ "»\n" +#~ " permet d'afficher les attributs et les valeurs de chaque NAME.\n" +#~ " \n" +#~ " Les options sont :\n" +#~ " \n" +#~ " -a\tpour faire des tableaux de NAME (si pris en charge)\n" +#~ " -f\tpour choisir uniquement parmi les noms de fonctions\n" +#~ " -F\tpour afficher les noms de fonctions (et les numéros de ligne et " +#~ "le\n" +#~ " \tfichier source si le mode de débogage est activé\n" +#~ " -i\tpour que les NAME aient l'attribut « integer »\n" +#~ " -r\tpour que les NAME soient en lecture seule\n" +#~ " -t\tpour que les NAME aient l'attribut « trace »\n" +#~ " -x\tpour faire un export des NAME\n" +#~ " \n" +#~ " L'évaluation arithmétique des variables ayant l'attribut « integer » " +#~ "est\n" +#~ " effectuée au moment de l'affectation (voir « let »).\n" +#~ " \n" +#~ " Lors de l'affichage des valeurs de variables, -f affiche le nom de la " +#~ "fonction\n" +#~ " et sa définition. L'option -F permet de n'afficher que le nom.\n" +#~ " \n" +#~ " Un attribut peut être désactivé en utilisant « + » au lieu de « - ». " +#~ "Dans une\n" +#~ " fonction, ceci a pour effet de rendre les NAME locaux, comme avec la " +#~ "commande «local »." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Obsolète. Consulter « declare »." + +#~ msgid "" +#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n" +#~ " can only be used within a function; it makes the variable NAME\n" +#~ " have a visible scope restricted to that function and its children." +#~ msgstr "" +#~ "Permet de créer une variable locale appelée NAME, et de lui affecter une " +#~ "VALUE.\n" +#~ " LOCAL peut seulement être utilisé à l'intérieur d'une fonction ; il " +#~ "rend le nom de\n" +#~ " variable NAME visible uniquement à l'intérieur de la fonction et de " +#~ "ses filles." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "Affiche les ARGs. L'option « -n » supprime le saut de ligne final." + +#~ msgid "" +#~ "Enable and disable builtin shell commands. This allows\n" +#~ " you to use a disk command which has the same name as a shell\n" +#~ " builtin without specifying a full pathname. If -n is used, the\n" +#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n" +#~ " to use the `test' found in $PATH instead of the shell builtin\n" +#~ " version, type `enable -n test'. On systems supporting dynamic\n" +#~ " loading, the -f option may be used to load new builtins from the\n" +#~ " shared object FILENAME. The -d option will delete a builtin\n" +#~ " previously loaded with -f. If no non-option names are given, or\n" +#~ " the -p option is supplied, a list of builtins is printed. The\n" +#~ " -a option means to print every builtin with an indication of whether\n" +#~ " or not it is enabled. The -s option restricts the output to the " +#~ "POSIX.2\n" +#~ " `special' builtins. The -n option displays a list of all disabled " +#~ "builtins." +#~ msgstr "" +#~ "Active et désactive les primitives du shell. Ceci permet\n" +#~ " d'utiliser une commande du disque qui a le même nom qu'une commande " +#~ "intégrée\n" +#~ " sans devoir spécifier un chemin complet. Si « -n » est utilisé, les\n" +#~ " noms NAME sont désactivés ; sinon, les noms NAME sont activés. Par " +#~ "exemple,\n" +#~ " pour utiliser « test » trouvé dans $PATH au lieu de la primitive du\n" +#~ " même nom, tapez « enable -n test ». Sur les systèmes permettant le " +#~ "chargement\n" +#~ " dynamique, l'option « -f » peut être utilisée pour charger de " +#~ "nouvelles primitives\n" +#~ " depuis l'objet partagé FILENAME. L'option « -d » efface une " +#~ "primitive précédemment\n" +#~ " chargée avec « -f ». Si aucun nom (n'étant pas une option) n'est " +#~ "donné, ou si l'option\n" +#~ " « -p » est spécifiée, une liste de primitive est affichée. L'option " +#~ "« -a » permet d'afficher\n" +#~ " toutes les primitives en précisant si elles sont activées ou non. " +#~ "L'option « -s » restreint\n" +#~ " la sortie aux primitives « special » POSIX.2. L'option « -n » affiche " +#~ "une liste de toutes les\n" +#~ " primitives désactivées." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "" +#~ "Lit les ARGs comme une entrée du shell et exécute les commandes " +#~ "résultantes." + +#~ msgid "" +#~ "Exec FILE, replacing this shell with the specified program.\n" +#~ " If FILE is not specified, the redirections take effect in this\n" +#~ " shell. If the first argument is `-l', then place a dash in the\n" +#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n" +#~ " is supplied, FILE is executed with a null environment. The `-a'\n" +#~ " option means to make set argv[0] of the executed process to NAME.\n" +#~ " If the file cannot be executed and the shell is not interactive,\n" +#~ " then the shell exits, unless the shell option `execfail' is set." +#~ msgstr "" +#~ "Exécute le fichier FILE en remplaçant ce shell par le programme " +#~ "spécifié.\n" +#~ " Si FILE n'est pas spécifié, les redirections prennent effet dans\n" +#~ " ce shell. Si le premier argument est « -l », un tiret est placé dans\n" +#~ " l'argument n°0 transmis à FILE, comme le fait « login ». Si l'option\n" +#~ " « -c » est fournie, FILE est exécuté avec un environnement vide.\n" +#~ " L'option « -a » indique de définir « argv[0] » du processus exécuté\n" +#~ " à NAME. Si le fichier ne peut pas être exécuté et que le shell n'est\n" +#~ " pas interactif, alors le shell se termine, à moins que l'option « " +#~ "execfail »\n" +#~ " ne soit définie." + +#~ msgid "Logout of a login shell." +#~ msgstr "Fermer un shell de connexion" + +#~ msgid "" +#~ "For each NAME, the full pathname of the command is determined and\n" +#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n" +#~ " full pathname of NAME, and no path search is performed. The -r\n" +#~ " option causes the shell to forget all remembered locations. The -d\n" +#~ " option causes the shell to forget the remembered location of each " +#~ "NAME.\n" +#~ " If the -t option is supplied the full pathname to which each NAME\n" +#~ " corresponds is printed. If multiple NAME arguments are supplied " +#~ "with\n" +#~ " -t, the NAME is printed before the hashed full pathname. The -l " +#~ "option\n" +#~ " causes output to be displayed in a format that may be reused as " +#~ "input.\n" +#~ " If no arguments are given, information about remembered commands is " +#~ "displayed." +#~ msgstr "" +#~ "Pour chaque NAME, le chemin complet de la commande est déterminé puis " +#~ "mémorisé.\n" +#~ " Si l'option « -p » est fournie, le CHEMIN est utilisé comme chemin " +#~ "complet\n" +#~ " pour NAME, et aucune recherche n'est effectuée. L'option « -r » " +#~ "demande au shell\n" +#~ " d'oublier tous les chemins mémorisés. L'option « -d » demande au " +#~ "shell d'oublier\n" +#~ " les chemins mémorisés pour le NAME. Si l'option « -t » est fournie, " +#~ "le chemin\n" +#~ " complet auquel correspond chaque NAME est affiché. Si plusieurs NAME " +#~ "sont fournis\n" +#~ " à l'option « -t », le NAME est affiché avant chemin complet haché. " +#~ "L'option\n" +#~ " « -l » permet d'utiliser un format de sortie qui peut être réutilisé " +#~ "comme entrée.\n" +#~ " Si aucun argument n'est donné, des informations sur les commandes " +#~ "mémorisées sont\n" +#~ " affichées." + +#~ msgid "" +#~ "Display helpful information about builtin commands. If PATTERN is\n" +#~ " specified, gives detailed help on all commands matching PATTERN,\n" +#~ " otherwise a list of the builtins is printed. The -s option\n" +#~ " restricts the output for each builtin command matching PATTERN to\n" +#~ " a short usage synopsis." +#~ msgstr "" +#~ "Affiche des informations utiles sur les commandes intégrées. Si MOTIF\n" +#~ " est précisé, une aide détaillée sur toutes les commandes " +#~ "correspondant\n" +#~ " au MOTIF sont affichées, sinon une liste des commandes intégrées est\n" +#~ " fournie. L'option « -s » restreint l'affichage de chaque commande\n" +#~ " correspondant au MOTIF à une courte description sur l'utilisation." + +#~ msgid "" +#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n" +#~ " If the -h option is given, the job is not removed from the table, but " +#~ "is\n" +#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n" +#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove " +#~ "all\n" +#~ " jobs from the job table; the -r option means to remove only running " +#~ "jobs." +#~ msgstr "" +#~ "Par défaut, enlève tous les arguments JOBSPEC de la table des tâches " +#~ "actives.\n" +#~ " Si l'option « -h » est fournie, la tâche n'est pas retirée de la " +#~ "table mais\n" +#~ " est marquée de telle sorte que le signal SIGHUP ne lui soit pas " +#~ "envoyé quand\n" +#~ " le shell reçoit un SIGHUP. Lorsque JOBSPEC n'est pas fournie, " +#~ "l'option « -a »,\n" +#~ " permet d'enlever toutes les tâches de la table des tâches. L'option « " +#~ "-r »\n" +#~ " indique de ne retirer que les tâches en cours de fonctionnement." + +#~ msgid "" +#~ "One line is read from the standard input, or from file descriptor FD if " +#~ "the\n" +#~ " -u option is supplied, and the first word is assigned to the first " +#~ "NAME,\n" +#~ " the second word to the second NAME, and so on, with leftover words " +#~ "assigned\n" +#~ " to the last NAME. Only the characters found in $IFS are recognized " +#~ "as word\n" +#~ " delimiters. If no NAMEs are supplied, the line read is stored in the " +#~ "REPLY\n" +#~ " variable. If the -r option is given, this signifies `raw' input, " +#~ "and\n" +#~ " backslash escaping is disabled. The -d option causes read to " +#~ "continue\n" +#~ " until the first character of DELIM is read, rather than newline. If " +#~ "the -p\n" +#~ " option is supplied, the string PROMPT is output without a trailing " +#~ "newline\n" +#~ " before attempting to read. If -a is supplied, the words read are " +#~ "assigned\n" +#~ " to sequential indices of ARRAY, starting at zero. If -e is supplied " +#~ "and\n" +#~ " the shell is interactive, readline is used to obtain the line. If -n " +#~ "is\n" +#~ " supplied with a non-zero NCHARS argument, read returns after NCHARS\n" +#~ " characters have been read. The -s option causes input coming from a\n" +#~ " terminal to not be echoed.\n" +#~ " \n" +#~ " The -t option causes read to time out and return failure if a " +#~ "complete line\n" +#~ " of input is not read within TIMEOUT seconds. If the TMOUT variable " +#~ "is set,\n" +#~ " its value is the default timeout. The return code is zero, unless " +#~ "end-of-file\n" +#~ " is encountered, read times out, or an invalid file descriptor is " +#~ "supplied as\n" +#~ " the argument to -u." +#~ msgstr "" +#~ "Une ligne est lue depuis l'entrée standard ou depuis le descripteur de " +#~ "fichier\n" +#~ " FD si l'option « -u » est fournie. Le premier mot est affecté au " +#~ "premier NAME,\n" +#~ " le second mot au second NAME, et ainsi de suite, les mots restants " +#~ "étant affectés\n" +#~ " au dernier NAME. Seuls les caractères situés dans « $IFS » sont " +#~ "reconnus comme\n" +#~ " étant des délimiteurs de mots. Si aucun NAME n'est fourni, la ligne " +#~ "est conservée\n" +#~ " dans la variable REPLY. L'option « -r » signifie « entrée brute » et " +#~ "la neutralisation \n" +#~ " par barre oblique inverse est désactivée. L'option « -d » indique de " +#~ "continuer\" la lecture jusqu'à ce que le premier caractère de DELIM " +#~ "soit lu plutôt que\n" +#~ " le retour à la ligne. Si « -p » est fourni, la chaîne PROMPT est " +#~ "affichée\n" +#~ " sans retour à la ligne final avant la tentative de lecture. Si « -a » " +#~ "est fourni,\n" +#~ " les mots lus sont affectés en séquence aux indices du TABLEAU, en " +#~ "commençant\n" +#~ " à zéro. Si « -e » est fourni et que le shell est interactif, « " +#~ "readline » est\n" +#~ " utilisé pour obtenir la ligne. Si « -n » est fourni avec un argument " +#~ "NCHARS non nul,\n" +#~ " « read » se termine après que NCHARS caractères ont été lus. L'option " +#~ "« -s »\n" +#~ " permet aux données venant d'un terminal de ne pas être répétées.\n" +#~ " \n" +#~ " L'option « -t » permet à « read » de se terminer avec une erreur si " +#~ "une ligne\n" +#~ " entière de données ne lui a pas été fournie avant le DÉLAI " +#~ "d'expiration. Si la\n" +#~ " variable TMOUT est définie, sa valeur est le délai d'expiration par " +#~ "défaut. Le code\n" +#~ " de retour est zéro à moins qu'une fin de fichier ne soit rencontrée, " +#~ "que « read »\n" +#~ " atteigne le délai d'expiration ou qu'un descripteur de fichier " +#~ "incorrect ne soit\n" +#~ " fourni pour l'argument « -u »." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N\n" +#~ " is omitted, the return status is that of the last command." +#~ msgstr "" +#~ "Permet à une fonction de se terminer avec le code de retour spécifié par " +#~ "N.\n" +#~ " Si N est omis, le code de retour est celui de la dernière commande." + +#~ msgid "" +#~ "For each NAME, remove the corresponding variable or function. Given\n" +#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n" +#~ " unset will only act on functions. With neither flag, unset first\n" +#~ " tries to unset a variable, and if that fails, then tries to unset a\n" +#~ " function. Some variables cannot be unset; also see readonly." +#~ msgstr "" +#~ "Pour chaque NAME, supprime la variable ou la fonction correspondante.\n" +#~ " En spécifiant « -v », « unset » agira seulement sur les variables.\n" +#~ " Avec l'option « -f », « unset » n'agit que sur les fonctions. Sans " +#~ "option,\n" +#~ " « unset » essaye d'abord de supprimer une variable et, s'il échoue, " +#~ "essaye\n" +#~ " de supprimer une fonction. Certaines variables ne peuvent pas être " +#~ "supprimées.\n" +#~ " Consultez aussi « readonly ». " + +#~ msgid "" +#~ "NAMEs are marked for automatic export to the environment of\n" +#~ " subsequently executed commands. If the -f option is given,\n" +#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n" +#~ " is given, a list of all names that are exported in this shell is\n" +#~ " printed. An argument of `-n' says to remove the export property\n" +#~ " from subsequent NAMEs. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "Les NAME sont marqués pour export automatique vers l'environnement des\n" +#~ " prochaines commandes exécutées. si l'option « -f » est donnée, les " +#~ "NAME\n" +#~ " se rapportent à des fonctions. Si aucun NAME n'est donné ou si « -p " +#~ "»\n" +#~ " est fourni, la liste de tous les NAME exportés dans ce shell " +#~ "s'affiche.\n" +#~ " L'argument « -n » permet de supprimer la propriété d'export des NAME " +#~ "qui\n" +#~ " suivent. L'argument « -- » désactive le traitement des options " +#~ "suivantes." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n" +#~ " not be changed by subsequent assignment. If the -f option is given,\n" +#~ " then functions corresponding to the NAMEs are so marked. If no\n" +#~ " arguments are given, or if `-p' is given, a list of all readonly " +#~ "names\n" +#~ " is printed. The `-a' option means to treat each NAME as\n" +#~ " an array variable. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "Les NAME donnés sont marqués pour lecture seule et les valeurs de ces " +#~ "NAME\n" +#~ " ne peuvent plus être changés par affection. Si l'option « -f » est " +#~ "donnée,\n" +#~ " les fonctions correspondant aux NAME sont marquées de la sorte. Si " +#~ "aucun\n" +#~ " argument n'est donné ou si « -p » est fourni, la liste de tous les " +#~ "noms\n" +#~ " en lecture seule est affichée. L'option « -a » indique de traiter " +#~ "tous les\n" +#~ " NAME comme des variables tableaux. L'argument « -- » désactive le " +#~ "traitement\n" +#~ " des option suivantes." + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n" +#~ " not given, it is assumed to be 1." +#~ msgstr "" +#~ "Les paramètres de position depuis $N+1 ... sont renommés en $1 ...\n" +#~ " Si N n'est pas fourni, il est supposé égal à 1." + +#~ msgid "" +#~ "Suspend the execution of this shell until it receives a SIGCONT\n" +#~ " signal. The `-f' if specified says not to complain about this\n" +#~ " being a login shell if it is; just suspend anyway." +#~ msgstr "" +#~ "Suspend l'exécution de ce shell jusqu'à ce qu'il reçoive le signal " +#~ "SIGCONT.\n" +#~ " Si « -f » est spécifié, il indique de ne pas se plaindre s'il s'agit " +#~ "d'un \n" +#~ " shell de connexion, mais de suspendre quand-même." + +#~ msgid "" +#~ "Print the accumulated user and system times for processes run from\n" +#~ " the shell." +#~ msgstr "" +#~ "Affiche les temps utilisateur et système accumulés pour les processus\n" +#~ " lancés depuis le shell." + +#~ msgid "" +#~ "For each NAME, indicate how it would be interpreted if used as a\n" +#~ " command name.\n" +#~ " \n" +#~ " If the -t option is used, `type' outputs a single word which is one " +#~ "of\n" +#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is " +#~ "an\n" +#~ " alias, shell reserved word, shell function, shell builtin, disk " +#~ "file,\n" +#~ " or unfound, respectively.\n" +#~ " \n" +#~ " If the -p flag is used, `type' either returns the name of the disk\n" +#~ " file that would be executed, or nothing if `type -t NAME' would not\n" +#~ " return `file'.\n" +#~ " \n" +#~ " If the -a flag is used, `type' displays all of the places that " +#~ "contain\n" +#~ " an executable named `file'. This includes aliases, builtins, and\n" +#~ " functions, if and only if the -p flag is not also used.\n" +#~ " \n" +#~ " The -f flag suppresses shell function lookup.\n" +#~ " \n" +#~ " The -P flag forces a PATH search for each NAME, even if it is an " +#~ "alias,\n" +#~ " builtin, or function, and returns the name of the disk file that " +#~ "would\n" +#~ " be executed." +#~ msgstr "" +#~ "Indique comment chaque NAME serait interprété s'il était utilisé comme " +#~ "un\n" +#~ " nom de commande.\n" +#~ " \n" +#~ " Si l'option « -t » est utilisée, « type » affiche un simple mot " +#~ "parmi\n" +#~ " « alias », « keyword », « function », « builtin », « file » ou « », " +#~ "si\n" +#~ " NAME est respectivement un alias, un mot réservé du shell, une " +#~ "fonction\n" +#~ " du shell, une primitive, un fichier du disque, ou s'il est inconnu.\n" +#~ " \n" +#~ " Si l'indicateur « -p » est utilisé, « type » renvoie soit le nom du " +#~ "fichier\n" +#~ " du disque qui serait exécuté, soit rien si « type -t NAME » ne " +#~ "retourne pas\n" +#~ " « file ».\n" +#~ " \n" +#~ " Si « -a » est utilisé, « type » affiche tous les emplacements qui " +#~ "contiennent\n" +#~ " un exécutable nommé « file ». Ceci inclut les alias, les primitives " +#~ "et les\n" +#~ " fonctions si, et seulement si « -p » n'est pas également utilisé.\n" +#~ " \n" +#~ " L'indicateur « -P » force une recherche dans PATH pour chaque NAME " +#~ "même\n" +#~ " si c'est un alias, une primitive ou une fonction et renvoie le nom " +#~ "du\n" +#~ " fichier du disque qui serait exécuté." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n" +#~ " `-S' is supplied, the current value of the mask is printed. The `-" +#~ "S'\n" +#~ " option makes the output symbolic; otherwise an octal number is " +#~ "output.\n" +#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n" +#~ " that may be used as input. If MODE begins with a digit, it is\n" +#~ " interpreted as an octal number, otherwise it is a symbolic mode " +#~ "string\n" +#~ " like that accepted by chmod(1)." +#~ msgstr "" +#~ "Le masque de création des fichiers utilisateurs est réglé à MODE. Si " +#~ "MODE\n" +#~ " est omis ou si « -S » est fourni, la valeur actuelle du masque est " +#~ "affichée\n" +#~ " L'option « -S » rend la sortie symbolique, sinon une valeur octale " +#~ "est\n" +#~ " est utilisée. Si « -p » est fourni et que MODE est omis, la sortie se " +#~ "fait\n" +#~ " dans un format qui peut être réutilisé comme entrée. Si MODE commence " +#~ "par\n" +#~ " un chiffre, il est interprété comme un nombre octal, sinon comme une " +#~ "chaîne\n" +#~ " symbolique de mode comme celle utilisée par « chmod(1) »." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If\n" +#~ " N is not given, all currently active child processes are waited for,\n" +#~ " and the return code is zero. N is a process ID; if it is not given,\n" +#~ " all child processes of the shell are waited for." +#~ msgstr "" +#~ "Attend le processus spécifié et donne son code de retour. Si N n'est\n" +#~ " pas donné, tous les processus fils actuellement actifs sont attendus\n" +#~ " et le code de retour est zéro. N est un n° de processus. S'il n'est\n" +#~ " pas fourni, tous les processus du shell sont attendus." + +#~ msgid "" +#~ "Create a simple command invoked by NAME which runs COMMANDS.\n" +#~ " Arguments on the command line along with NAME are passed to the\n" +#~ " function as $0 .. $n." +#~ msgstr "" +#~ "Crée une simple commande invoquée avec NAME, et qui lance les\n" +#~ " commandes COMMANDS. Les arguments fournis avec NAME sur la\n" +#~ " ligne de commande sont transmis à la fonction en tant que $0 .. $n." + +#~ msgid "" +#~ "Toggle the values of variables controlling optional behavior.\n" +#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n" +#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n" +#~ " status indicates whether each OPTNAME is set or unset. The -o\n" +#~ " option restricts the OPTNAMEs to those defined for use with\n" +#~ " `set -o'. With no options, or with the -p option, a list of all\n" +#~ " settable options is displayed, with an indication of whether or\n" +#~ " not each is set." +#~ msgstr "" +#~ "Commute la valeur des variables qui contrôlent les comportements " +#~ "optionnels.\n" +#~ " L'option « -s » indique d'activer chaque option nommée OPTNAME. " +#~ "L'option\n" +#~ " « -u » désactive l'option OPTNAME. L'option « -q » rend la sortie " +#~ "silencieuse.\n" +#~ " Le code de retour indique si chaque OPTNAME est activée ou " +#~ "désactivée.\n" +#~ " L'option « -o » restreint les options OPTNAME à celles qui peuvent " +#~ "être utilisées avec\n" +#~ " « set -o ». Sans option ou avec l'option « -p », une liste de toutes " +#~ "les\n" +#~ " options modifiables est affichée, avec une indication sur l'état de " +#~ "chacune." + +#~ msgid "" +#~ "For each NAME, specify how arguments are to be completed.\n" +#~ " If the -p option is supplied, or if no options are supplied, " +#~ "existing\n" +#~ " completion specifications are printed in a way that allows them to " +#~ "be\n" +#~ " reused as input. The -r option removes a completion specification " +#~ "for\n" +#~ " each NAME, or, if no NAMEs are supplied, all completion " +#~ "specifications." +#~ msgstr "" +#~ "Pour chaque NAME, spécifie comment les arguments doivent être complétés.\n" +#~ " Si l'option « -p » est fournie ou si aucune option n'est fournie, les " +#~ "spécifications\n" +#~ " de complètement actuelles sont affichées de manière à pouvoir être " +#~ "réutilisées\n" +#~ " comme entrée. L'option « -r » enlève la spécification de complètement " +#~ "pour chaque\n" +#~ " NAME ou, si aucun NAME n'est fourni, toutes les spécifications de " +#~ "complètement." diff --git a/bash-5.1/po/ga.gmo b/bash-5.1/po/ga.gmo new file mode 100644 index 0000000000000000000000000000000000000000..70423c34e373e15dc2efd2d003ed50476bd6f71c Binary files /dev/null and b/bash-5.1/po/ga.gmo differ diff --git a/bash-5.1/po/ga.po b/bash-5.1/po/ga.po new file mode 100644 index 0000000000000000000000000000000000000000..36f1b27492f87f48c14066a0a1c7a7ba71b648f5 --- /dev/null +++ b/bash-5.1/po/ga.po @@ -0,0 +1,5393 @@ +# translation of bash.po to Irish +# Copyright (C) 2017 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Séamus Ó Ciardhuáin , 2009, 2017, 2018, 2019. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-16 21:05+0000\n" +"Last-Translator: Séamus Ó Ciardhuáin \n" +"Language-Team: Irish \n" +"Language: ga\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :" +"(n>6 && n<11) ? 3 : 4;\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "droch-fhoscript eagair" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: aitreabúid nameref (tagairt athróga) á baint" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" +"%s: ní féidir eagar innéacsaithe a thiontú go heagar comhthiomsaitheach" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: eochair neamhbhailí eagair chomhthiomsaithigh" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: ní féidir sannadh go hinnéacs neamhuimhriúil." + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" +"%s: %s: caithfear foscript a úsáid le sannadh chuig eagar comhthiomsaitheach" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: ní féidir cruthú: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: ní féidir mapa eochrach an ordaithe a aimsiú" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: ní \" an chéad charachtar nach spás bán é." + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "Níl '%c' dúnta i %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: deighilteoir idirstaid ar iarraidh" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "'%s': ní féidir dícheangail" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "fairsingiú lúibíní: ní féidir cuimhne a leithdháileadh le haghaidh %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"fairsingiú lúibíní: theip ar leithdháileadh cuimhne le haghaidh %u eilimint" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "fairsingiú lúibíní: theip ar leithdháileadh cuimhne le haghaidh '%s'" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "'%s': ainm neamhbhailí ar mhapa eochrach" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "níl eagarthóireacht líne cumasaithe" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "'%s': ainm neamhbhailí ar mhapa eochrach " + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: ní féidir léamh: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "'%s': ainm feidhme neamhaithnid" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "Níl %s ceangailte le heochair ar bith.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "Is féidir %s a ghlaoigh trí " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "'%s': ní féidir dícheangail" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "comhaireamh lúibe" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "Gan chiall ach i lúb 'for', 'while' nó 'until'" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Aischuir comhthéacs an ghlaoigh reatha fhoghnáthaimh.\n" +" \n" +" Gan SLONN, aischuirtear '$líne $ainm_comhaid'. Le SLONN, aischuirtear\n" +" '$líne $foghnáthamh $ainm_comhaid'; is féidir lorg cruaiche a sholáthar " +"leis an\n" +" fhaisnéis bhreise seo.\n" +" \n" +" Taispeánann an luach atá ag SLONN líon na bhfrámaí glaoigh le dul siar\n" +" roimh an ceann reatha; fráma 0 an ceann atá ar barr.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear 0 ach sa chás nach bhfuil an bhlaosc ag rith feidhme " +"blaoisce, nó\n" +" sa chás go bhfuil SLONN neamhbhailí." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "Níl HOME socruithe" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "An iomarca argóintí" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "comhadlann neamhnitheach" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "Níl OLDPWD socruithe" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "líne %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "rabhadh: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: úsáid: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: tá argóint riachtanach don rogha" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: argóint uimhriúil de dhíth" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: gan aimsiú" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: rogha neamhbhailí" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: ainm neamhbhailí rogha" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "'%s': ní aitheantóir bailí é" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "uimhir ochtnártha neamhbhailí" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "uimhir heicsidheachúlach neamhbhailí" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "uimhir neamhbhailí" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: sonrú neamhbhailí comhartha" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "'%s': ní aitheantas próisis nó sonrú taisc bailí é" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: athróg inléite amháin" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s as raon" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argóint" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s as raon" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: níl a léithéid de tasc ann." + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: gan rialú tascanna." + +#: builtins/common.c:294 +msgid "no job control" +msgstr "Gan rialú tascanna." + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: srianta" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "srianta" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ní ordú ionsuite blaoisce é." + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "earráid scríofa: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "earráid agus airíonna teirminéil á socrú: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "earráid agus airíonna teirminéil á fáil: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: earráid ag fáil na comhadlainne reatha: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: sonrú taisc athbhríoch" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "Níl cabhair ar fáil sa leagan seo." + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ní féidir díshocrú: %s inléite amháin" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ní féidir díshocrú" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: ainm neamhbhailí gnímh" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: níl sonrú iomlánaithe ann." + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "" +"Rabhadh: b'fhéidir nach n-oibríonn an rogha -F mar a bheifeá ag súil leis." + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "" +"Rabhadh: b'fhéidir nach n-oibríonn an rogha -C mar a bheifeá ag súil leis." + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "níl an fheidhm chomhlánaithe á rith faoi láthair" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "Inúsáidte i bhfeidhmeanna amháin. " + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: ní féidir le athróg thagartha bheith ina h-eagar" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" +"%s: ní cheadaítear tagairtí don athróg féin i nameref (tagairt athróga)" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: tagairt ainm ciorclach" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "'%s': ainm neamhbhailí athróige le haghaidh tagairt ainm" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "Ní féidir '-f' a úsáid chun feidhmeanna a dhéanamh" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: feidhm inléite amháin" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: cáintear sannadh na gcomheagar athfhriotail" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: ní féidir athróga eagair a scrios mar seo." + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "" +"%s: ní féidir eagar comhthiomsaitheach a thiontú go heagar innéacsaithe" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "Níl luchtú dinimiciúil ar fáil" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "Ní féidir an réad comhroinnte %s a oscailt: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "Ní féidir %s a aimsiú sa réad comhroinnte %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: níl sé luchtaithe go dinimiciúil" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" +"Theip ar an ngníomh luchtála le haghaidh %s (aiscuireadh %d): níor " +"luchtáladh é" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: níl sé luchtaithe go dinimiciúil" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: ní féidir scrios: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: is comhadlann é" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ní gnáthchomhad é" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: tá an comhad ró-mhór" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: ní féidir comhad dénártha a rith" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: ní féidir rith: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "Ní blaosc logála isteach é seo: úsáid 'exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Tá tascanna stoptha ann.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Tá tascanna ag rith.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "Níor aimsíodh ordú" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "Sonrú staire" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: ní féidir comhad sealadach a oscailt: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "reatha" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "Tosaíodh tasc %d gan rialú tascanna." + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: rogha neamhdhleathach -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: tá argóint riachtanach don rogha -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "Tá haiseáil díchumasaithe." + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: tá an tábla haiseála folamh.\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "amais\tordú\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Ordaithe blaoisce a mheaitseálann an lorgfhocal '" +msgstr[1] "Ordaithe blaoisce a mheaitseálann na lorgfhocail '" +msgstr[2] "Ordaithe blaoisce a mheaitseálann na lorgfhocail '" +msgstr[3] "Ordaithe blaoisce a mheaitseálann na lorgfhocail '" +msgstr[4] "Ordaithe blaoisce a mheaitseálann na lorgfhocail '" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"Ní mheaitseálann ábhar cabhrach ar bith \"%s\". Bain triail as \"help help\" " +"nó \"man -k %s\" nó \"info %s\"." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: ní féidir oscailt: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Tá na horduithe blaoisce seo sainmhínithe go hinmheánach.\n" +"Usáid \"help\" leis an liosta seo a thaispeáint.\n" +"Úsáid \"help ainm\" chun tuilleadh eolais a fháil faoin bhfeidhm \"ainm\".\n" +"Úsáid \"info bash\" chun tuilleadh eolais a fháil faoin mblaosc féin.\n" +"Úsáid \"man -k\" nó \"info\" chun tuilleadh eolais a fháil faoi ordaithe " +"nach bhfuil sa liosta seo.\n" +"Ciallaíonn réalt (*) ar ainm go bhfuil an t-ordú díchumasaithe.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "Ní féidir níos mó ná ceann amháin as -anrw a úsáid." + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "suíomh staire" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: stampa ama neamhbhailí" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: theip ar fhairsingiú staire." + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: theip ar inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "Níl roghanna eile ceadaithe le '-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: is gá le argóintí bheith ina aitheantais phróisis nó taisc" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Earráid neamhaithnid" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "Ag súil le slonn" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: ní eagar innéacsaithe é" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: sonrú neamhbhailí tuairisceora comhaid" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: tuairisceoir comhaid neamhbhailí: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: comhaireamh neamhbhailí línte" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: bunphointe neamhbhailí eagair" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: candam neamhbhailí aisghlaoigh" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "ainm folamh athróga eagair" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "tacaíocht le hathróga eagair de dhíth" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "'%s': carachtar formáide ar iarraidh." + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "'%c': sonrú neamhbhailí formáide ama" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "'%c': carachtar formáide neamhbhailí." + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "rabhadh: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "fadhb i bpársáil formáide: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "digit heicsidheachúlach ar iarraidh le haghaidh \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "digit Unicode ar iarraidh le haghaidh \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "Níl comhadlann eile ann" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: argóint neamhbhailí" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "cruach chomhadlainne fholamh" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "innéacs chruach na gcomhadlann" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Taispeáin liosta na gcomhadlann a bhfuil cuimhne orthu faoi láthair.\n" +" Cuirtear comhadlanna ar an liosta leis an ordú \"pushd\". Is féidir dul\n" +" siar trín liosta leis an ordú \"popd\".\n" +" \n" +" Roghanna:\n" +" -c\tglantar cruach na gcomhadlann trí gach mhír a bhaint de\n" +" -l\tná priontáiltear na comhadlanna i gcoibhneas le do chomhadlann " +"bhaile\n" +" \tagus le tilde rompu\n" +" -p\tpriontáiltear cruach na gcomhadlann, mír amháin ar gach líne\n" +" -v\tpriontáiltear cruach na gcomhadlann, mír amháin ar gach líne agus\n" +" \ta háit sa chruach roimpi\n" +" \n" +" Argóintí:\n" +" +N\tTaispeántar mír N, agus uimhrithe curtha ar na míreanna ó thaobh " +"clé\n" +" \tan liosta a thaispeántar le \"dirs\" rite gan argóintí, ag tosú ó " +"náid. -N\tTaispeántar mír N, agus uimhrithe curtha ar na míreanna ó " +"thaobh deas\n" +" \tan liosta a thaispeántar le \"dirs\" rite gan argóintí, ag tosú ó " +"náid." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Cuireann \"pushd\" comhadlann ar bharr na cruaiche comhadlanna, nó " +"rothlaíonn\n" +" sé an chruach, ag cur barr nua na cruaiche mar an chomhadlann oibrithe\n" +" reatha. Gan argóintí, malartaítear an dá chomhadlann ar bharr.\n" +" \n" +" Roghanna:\n" +" -n\tNá déantar an gnáthathrú comhadlainne agus comhadlanna á gcur\n" +" \tleis an gcruach; ní athraítear ach an chruach.\n" +" \n" +" Argóintí:\n" +" +N\tRothlaítear an chruach sa chaoi go mbeidh an Nú chomhadlann (ag\n" +" \tcomhaireamh ó thaobh clé an liosta a thaispeánann \"dirs\" agus ag " +"tosú\n" +" \tó náid) ar bharr.\n" +" \n" +" -N\tRothlaítear an chruach sa chaoi go mbeidh an Nú chomhadlann (ag\n" +" \tcomhaireamh ó thaobh deas an liosta a thaispeánann 'dirs' agus ag " +"tosú\n" +" \tó náid) ar bharr.\n" +" \n" +" COMHADLANN\tCuirtear COMHADLANN ar bharr na cruaiche, agus socraítear\n" +" \tí mar an chomhadlann oibrithe reatha.\n" +" \n" +" Taispeánann an t-ordú ionsuite \"dirs\" cruach na gcomhadlann." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Baineann \"popd\" comhadlanna ón gcruach comhadlanna. Gan argóintí, baintear " +"an\n" +" chomhadlann ó bharr na cruaiche, agus téann sé go dtí an chomhadlann\n" +" atá ar bharr.\n" +" \n" +" Roghanna:\n" +" -n\tNá déantar an gnáthathrú comhadlainne agus comhadlanna á gcur\n" +" \tleis an gcruach; ní athraítear ach an chruach.\n" +" \n" +" Argóintí:\n" +" +N\tBaintear an Nú chomhadlann ag comhaireamh ó thaobh clé an liosta\n" +" \ta thaispeánann \"dirs\" agus ag tosú ó náid. Mar shampla, baineann\n" +" \t\"popd +0\" an chéad chomhadlann, agus \"popd +1\" an dara cheann.\n" +" \n" +" -N\tBaintear an Nú chomhadlann ag comhaireamh ó thaobh deas an liosta\n" +" \ta thaispeánann 'dirs' agus ag tosú ó náid. Mar shampla, baineann\n" +" \t\"popd -0\" an chomhadlann dheireanach, agus \"popd -1\" an ceann\n" +" \tleathdheireanach.\n" +" \n" +" Taispeánann an t-ordú ionsuite \"dirs\" cruach na gcomhadlann." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: sonrú neamhbhailí teorann ama" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "Earráid léite: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"Ní féidir \"return\" a dhéanamh ach ó fheidhm nó ó script rite le \"source\"" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "Ní féidir feidhm agus athróg a dhíshocrú ag an am céanna." + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ní athróg eagair é" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ní feidhm é." + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: ní féidir easpórtáil" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "comhaireamh iomlaoide" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "Ní féidir roghanna blaoisce a shocrú agus a dhíshocrú ag an am céanna." + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: ainm neamhbhailí ar rogha blaoisce" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "Is gá don argóint bheith ina ainm comhaid." + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: níor aimsíodh an comhad" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "Ní féidir cur ar fionraí." + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "Ní féidir blaosc logála isteach a chur ar fionraí." + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "Tá %s ailiasáilte go '%s'.\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "Is eochairfhocal blaoisce é %s.\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "Is feidhm é %s.\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "Is ordú ionsuite blaoisce speisialta é %s\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "Is ordú ionsuite blaoisce é %s\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "Tá %s %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "Tá %s haiseáilte (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: argóint teorann neamhbhailí" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "'%c': droch-ordú" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: ní féidir teorainn a fháil: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "teorainn" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: ní féidir teorainn a athrú: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "uimhir ochtnártha" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "'%c': oibreoir neamhbhailí móid shiombalaigh" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "'%c': carachtar neamhbhailí móid shiombalaigh" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " líne " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "Ordú deireanach: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Ag tobscor..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "EOLAS: " + +#: error.c:462 +msgid "unknown command error" +msgstr "earráid ordaithe neamhaithnid" + +#: error.c:463 +msgid "bad command type" +msgstr "droch-chineál ordaithe" + +#: error.c:464 +msgid "bad connector" +msgstr "drochnascóir" + +#: error.c:465 +msgid "bad jump" +msgstr "drochléim" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: athróg neamhcheangailte" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aImithe thar am ag feitheamh le hionchur: logáil amach uathoibríoch\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "Ní féidir an ionchur caighdeánach a atreorú ó /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "FORMÁID_AMA: '%c': carachtar formáide neamhbhaií." + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: tá an comhphróiseas [%d:%s] fós ann" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "earráid phíopa" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: imithe thar uasleibhéal neadaithe eval (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: imithe thar uasleibhéal neadaithe foinse (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: imithe thar uasleibhéal neadaithe feidhme (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: srianta: ní féidir \"/\" a shonrú in ainmneacha ordaithe" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: níor aimsíodh an t-ordú" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: drochléirmhínitheoir" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: ní féidir comhad dénártha a rith: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "Is ordú ionsuite speisialta é '%s'" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "" +"Ní féidir an tuairisceoir comhaid %d a dhúbailt mar thuairisceoir comhaid %d." + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "Imithe thar leibhéal athchursála sloinn" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "Gannsreabhadh na cruaiche athchúrsála" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "Earráid chomhréire sa slonn." + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "Deineadh iarracht sannadh go rud nach athróg é." + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "Earráid chomhréire i sannadh athróige." + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "Roinnt ar 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "Fabht: droch-chomhartha expassign" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "Bhíothas ag súil le \":\" le haghaidh sloinn choinníollaigh." + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "Easpónant níos lú ná 0." + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "Ag súil le aitheantóir tar éis réamhincriminte nó réamhdeicriminte" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "\")\" ar iarraidh" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "Earráid chomhréire: bhíothas ag súil le hoibreann." + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "Earráid chomhréire: oibreoir neamhbhailí uimhríochta" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (comhartha earráide '%s')" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "Bonnuimhir uimhríochtúil neamhbhailí." + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: comhaireamh neamhbhailí línte" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "Tá an luach rómhór don bhonnuimhir." + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: earráid sloinn\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: ní féidir na máthairchomhadlanna a rochtain." + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "" +"Ní féidir an mód gan mhoill a athshocrú le haghaidh an tuairisceora chomhaid " +"%d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"Ní féidir tuairisceoir comhaid nua a leithdháileadh le haghaidh ionchur bash " +"ón tuairisceoir comhaid %d." + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" +"save_bash_input: tá an maolán ann cheana le haghaidh an tuairisceoir comhaid " +"nua %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp píopa" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "Tá aitheantas an phróisis ghabhlaithe %d sa tasc %d atá ag rith" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "Tá an tasc stoptha %d leis an ngrúpa próisis %ld á scrios." + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: próiseas %5ld (%s) marcáilte mar fós beo" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: níl an aitheantóir próisis sin ann." + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Comhartha %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Déanta" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Stoptha" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Stoptha(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Ag Rith" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Déanta(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Scoir %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Stádas neamhaithnid" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(cuimhne dumpáilte)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (comhadlann oibre: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid macphróisis (%ld go %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: níl an próiseas %ld ina mhacphróiseas den bhlaosc seo." + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: níl taifead den phróiseas %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: tá an tasc %d stoptha." + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: níl a léithéid de tasc ann." + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: tá an tasc críochnaithe." + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: tá an tasc %d sa chúlra cheana." + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: ag cumasú WNOHANG chun stad éiginnte a sheachaint" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: líne %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (cuimhne dumpáilte)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(comhadlann oibre anois: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: theip ar getpgrp" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: níl rialú jabanna ar fáil sa chúlra" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: araíonacht líne" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "ní féidir an grúpa próisis teirminéil a athrú (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "Níl rialú tascanna sa bhlaosc seo." + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: dearbhú teipthe: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: dearbhú ina phraiseach\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "neamhaithnid" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: bloc ar an liosta saor scriosta" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: glaoite le argóint bhloic á saoradh cheana" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: glaoite le argóint bhloic nár leithdháileadh" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: gannsreabhadh; tá mh_nbytes as raon" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: gannsreabhadh; tá mh_nbytes as raon" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: ní ionann méid na smután túis agus deiridh" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: glaoite le argóint bhloic nár leithdháileadh" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: gannsreabhadh; tá mh_nbytes as raon" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: gannsreabhadh; tá mh_nbytes as raon" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: ní ionann méideanna na smután túis agus deiridh" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: an bhfuil an tábla leithdháilte lán le FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "" +"register_alloc: an bhfuil %p sa tábla mar atá sé leithdháilte cheana?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: an bhfuil %p sa tábla cheana mar ceann saor?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "Bonn neamhbhailí" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: óstríomhaire neamhaithnid" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: seirbhís neamhbhailí" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: drochshonrú conaire líonra" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "Ní thacaítear le oibríochtaí líonra." + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: ní féidir an logchaighdeán a athrú (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: ní féidir an logchaighdeán a athrú (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: ní féidir an logchaighdeán a athrú (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: ní féidir an logchaighdeán a athrú (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Tá ríomhphost agat i $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Tá ríomhphost nua agat i $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Tá an ríomhphost i %s léite\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "Earráid chomhréire: tá slonn uimhríochtúil de dhith." + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "Earráid chomhréire: ';' gan súil leis." + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "Earráid chomhréire: '((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: drochchineál ordaithe %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"Cáipéis leabaithe ag líne %d teormharcáilte le deireadh comhaid (\"%s\" á " +"lorg)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: ordú atreoraithe \"%d\" as raon." + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: tá méid an líne ionchuir blaoisce (%zu) níos mó ná SIZE_MAX " +"(%lu): líne giorraithe" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "Imithe thar uasfhad na cáipéise-anseo" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "Deireadh comhaid gan súil leis agus \"%c\" a mheaitseálann á lorg." + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "Deireadh comhaid gan súil leis agus \"]]\" á lorg." + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "" +"Earráid chomhréire i slonn coinníollach: comhartha \"%s\" gan suil leis." + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "Earráid chomhréire i slonn coinníollach." + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "Comhartha '%s' gan súil leis; ag súil le ')'." + +#: parse.y:4787 +msgid "expected `)'" +msgstr "Ag súil le \")\"" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "Argóint \"%s\" gan súil lei go hoibreoir aonártha coinníollach." + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "Argóint gan súil lei go hoibreoir coinníollach aonártha ." + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "" +"Comhartha \"%s\" gan súil leis. Bhíothas ag súil le hoibreoir coinníollach " +"dénártha." + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "Bhíothas ag súil le hoibreoir coinníollach dénártha." + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "Argóint '%s' gan súil lei go hoibreoir dénártha coinníollach." + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "Argóint gan súil lei go hoibreoir dénártha coinníollach." + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "Comhartha '%c' gan súil leis in ordú coinníollach." + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "Comhartha \"%s\" gan súil leis in ordú coinníollach." + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "Comhartha %d gan súil leis in ordú coinníollach." + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "Earráid chomhréire in aice comhartha '%s' nach rabhthas ag súil leis." + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "Earráid chomhréire in aice '%s'" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "Earráid chomhréire: deireadh comhaid gan súil leis." + +#: parse.y:6365 +msgid "syntax error" +msgstr "Earráid chomhréire" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Úsáid '%s' le scoir den mblaosc.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "Deireadh comhaid gan súil leis agus ')' á lorg le meaitseáil." + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "Iomlánú: níor aimsíodh an fheidhm '%s'." + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "críochnú in-ríomhchláraithe: %s: d'fhéadfadh lúb atriail a bheith ann" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: tá COMPSPEC neamhnitheach" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: drochnascóir '%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: tuairisceoir comhaid neamhbhailí" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: pointeoir folamh comhaid" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: '%c': carachtar formáide neamhbhailí" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "tuairisceoir comhaid as raon" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: atreorú athbhríoch" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: ní féidir comhad atá ann cheana a fhorscríobh." + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: srianta: ní féidir aschur a atreorú." + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "ní féidir cáipéis shealadach a chruthú don cháipéis leabaithe: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: ní féidir tuairisceoir comhaid a shannadh go hathróg." + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "Ní thacaítear le /dev/(tcp|udp)/óstríomhaire/port gan líonrú." + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "Earráid atreoraithe: ní féidir an tuairisceoir comhaid a dhúbailt." + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "Níorbh fhéidir /tmp a aimsiú. Cruthaigh é le do thoil!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "Caithfidh /tmp bheith ina ainm comhadlainne bailí." + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" +"Tabharfar neamhaird ar an mód deaphriontála i mblaoscanna idirghníomhacha." + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: rogha neamhbhailí" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" +"Ní féidir an t-aitheantóir úsáideora (uid) a athrú go %d: aitheantóir " +"éifeachtach %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" +"Ní féidir an t-aitheantóir grúpa (gid) a athrú go %d: aitheantóir " +"éifeachtach %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" +"Ní féidir an dífhabhtóir a thosú; tá an mód dífhabhtaithe díchumasaithe." + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: is comhadlann é" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Níl ainm orm!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, leagan %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Úsáid:\t%s [rogha fada GNU] [rogha] ...\n" +"\t%s [rogha fada GNU] [rogha] comhad_scripte ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Roghanna fada GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Roghanna blaoisce:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD nó -c ordú nó -O rogha_shopt\t\t(glaoch amháin)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s nó -o rogha\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Úsáid %s -c 'help set' le haghaidh tuilleadh eolais faoi roghanna blaoisce.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Úsáid '%s -c help' le haghaidh tuilleadh eolais faoi orduithe ionsuite " +"blaoisce.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Úsáid an t-ordú 'bashbug' le tuarascáil a sheoladh faoi fhabht.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "leathanach baile bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Cabhair ghinearálta le bogearraí GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: oibríocht neamhbhailí" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Droch-chomhartha" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Crochadh" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Idirbhriseadh" + +#: siglist.c:58 +msgid "Quit" +msgstr "Scoir" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Treoir mídhleathach" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Rianú/gaistiú brisphointe" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Treoir ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Treoir EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Eisceacht snámhphointe" + +#: siglist.c:86 +msgid "Killed" +msgstr "Maraithe" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Earráid bhus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Fabht deighilte" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Droch-ghlaoch córais" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Píopa briste" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Clog aláraim" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Críochnaithe" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Staid phráinneach I/A" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Stoptha (comhartha)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Lean ar aghaidh" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Bás macphróisis nó stopadh" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Stoptha (ionchur teirminéil)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Stoptha (aschur teirminéil)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/A ullamh" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Teorainn LAP" + +#: siglist.c:154 +msgid "File limit" +msgstr "Teorainn chomhad" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Aláram (fíorúil)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Aláram (próifíl)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Fuinneog athraithe" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Glas taifid" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Comhartha úsáideora 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Comhartha úsáideora 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "sonraí ionchuir HFT ar feitheamh" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "teip chumhachta ar tí tarlú" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "cliseadh córais ar tí tarlú" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "bog próiseas go LAP eile" + +#: siglist.c:198 +msgid "programming error" +msgstr "earráid ríomhchláraithe" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "mód monatóireachta HFT ceadaithe" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "mód monatóireachta HFT cealaithe" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "seicheamh fuaime HFT críochnaithe" + +#: siglist.c:214 +msgid "Information request" +msgstr "Iarratas faisnéise" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Comhartha neamhaithnid #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "Drochionadú: níl '%s' dúnta i %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: ní féidir liosta a shannadh go ball eagair." + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "Ní féidir píopa a dhéanamh le haghaidh ionadaíocht próisis." + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadaíocht próisis." + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "Ní féidir píopa ainmnithe %s a oscailt le haghaidh léamh." + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "Ní féidir píopa ainmnithe %s a oscailt le haghaidh scríofa." + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "" +"Ní féidir an píopa ainmnithe %s a dhúbailt mar thuairisceoir comhaid %d." + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "ionadú orduithe: tugadh neamhaird ar ghiotán neamhnitheach san ionchur" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "Ní féidir píopa a dhéanamh le haghaidh ionadú ordaithe." + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadú ordaithe." + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" +"command_substitute: ní feidir an píopa a dhúbailt mar thuairisceoir comhaid " +"1." + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "'%s': ainm neamhbhailí athróige le haghaidh tagairt ainm" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: fairsingiú neamhbhailí indíreach" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: ainm neamhbhailí athróige" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: paraiméadar gan socrú." + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: paraiméadar neamhnitheach nó gan socrú." + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: slonn fotheaghráin < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: drochionadú" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: ní féidir sannadh mar seo." + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"i leaganacha den bhlaosc amach anseo, beidh luachálú mar ionadú uimhríochta " +"éigeantach" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "drochionadú: níl '`' dúnta i %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "gan meaitseáil: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "Bhíothas ag súil le hargóint." + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: ag súil le slonn slánuimhreach." + +#: test.c:265 +msgid "`)' expected" +msgstr "Ag súil le ')'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "Ag súil le ')', ach fuarthas %s." + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: ag súil le hoibreoir dénártha." + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: ag súil le hoibreoir aonártha." + +#: test.c:881 +msgid "missing `]'" +msgstr "']' ar iarraidh" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "Earráid chomhréire: ';' gan súil leis." + +#: trap.c:220 +msgid "invalid signal number" +msgstr "Uimhir chomhartha neamhbhailí" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: imithe thar uasleibhéal na láimhseálaithe gaistí (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: drochluach sa liosta_gaistí[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: is SIG_DFL an láimhseálaí comharthaí; %d (%s) á " +"athsheoladh chugam féin." + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: droch-chomhartha %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "Earráid agus sainmhíniú na feidhme '%s' á iompórtáil." + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "Tá an leibhéal blaoisce (%d) ró-ard; á athshocrú go 1." + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: níl comhthéacs feidhme sa scóip reatha." + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: ní féidir luach a shannadh ar an athróg" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: slánuimhir a sannadh go tagairt ainm" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: níl comhthéacs feidhme sa scóip reatha" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "Tá teaghrán easpórtála neamhnitheach ag %s" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "Carachtar neamhbhailí %d sa teaghrán easpórtála le haghaidh %s." + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "Níl '=' sa teaghrán easpórtála le haghaidh %s." + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: ní comhthéacs feidhme é ceann shell_variables" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: níl comhthéacs global_variables ann" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: ní scóip shealadach thimpeallachta é ceann shell_variables" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: ní féidir a oscailt mar CHOMHAD" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: luach neamhbhailí le haghaidh tuairisceoir comhaid rianaithe" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: luach comhoiriúnachta as raon" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Cóipcheart © 2012 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Ceadúnas GPLv3+: GNU GPL leagan 3 nó níos déanaí \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, leagan %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Is saorbhogearra é seo; tá cead agat é a athrú agus é a athdháileadh." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "" +"Ní ghabhann baránta ar bith leis, sa mhéid is atá sin ceadaithe de réir dlí." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: ní féidir %lu beart a leithdháileadh (%lu beart leithdháilte)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: ní féidir %lu beart a leithdháileadh" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" +"%s: %s:%d: ní féidir %lu beart a leithdháileadh (%lu beart leithdháilte)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: ní féidir %lu beart a leithdháileadh" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [ainm[=luach] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] ainm [ainm ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m MAPA_EOCHRACH] [-f AINM_CHOMHAID] [-q AINM] [-u AINM] [-" +"r SRAITH_EOCHRACHA] [-x SRAITH_EOCHRACHA:ORDÚ_BLAOISCE] [SRAITH_EOCHRACHA:" +"GNÍOMH_readline nó ORDÚ_readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [N]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [N]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [ORDÚ-IONSUITE-BLAOISCE [ARGÓINT ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [SLONN]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [comhadlann]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] ORDÚ [ARGÓINT ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [AINM[=LUACH] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] AINM[=LUACH] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [ROGHA] AINM[=LUACH] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [ARGÓINT ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [ARGÓINT ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f comhadainm] [ainm ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [argóint ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts teaghrán_roghanna ainm [argóint]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a AINM] [ORDÚ [ARGÓINTÍ ...]] [ATREORÚ ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [N]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e AINM_E] [-lnr] [CÉAD] [DEIREANACH] nó fc -s [PATRÚN=IONADAÍ] [ORDÚ]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [SONRÚ_TAISC]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [SONRÚ_TAISC ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p CONAIR] [-dt] [AINM ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [PATRÚN ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d SEACH_CHUR] [n] nó history -anrw [COMHADAINM] nó history -" +"ps ARGÓINT [ARGÓINT...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [SONRÚ_TAISC ...] nó jobs -x ORDÚ [ARGÓINTÍ]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [SONRÚ_TAISC ... | AITHEANTAS_PRÓISIS ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s SONRÚ_COMHARTHA | -n UIMHIR_CHOMHARTHA | -SONRÚ_COMHARTHA] " +"AITHEANTAS_PRÓISIS | SONRÚ_TAISC ... nó kill -l [SONRÚ_COMHARTHA]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let argóint [argóint ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a eagar] [-d teormharcóir] [-i téacs] [-n líon_carachtar] [-N " +"líon_carachtar] [-p leid] [-t teorainn_ama] [-u tuairisceoir_comhaid] " +"[ainm ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o AINM-ROGHA] [--] [ARGÓINT ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [AINM ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [AINM[=LUACH] ...] nó export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [ainm[=luach] ...] nó readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source AINM_COMHAID [ARGÓINTÍ]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". comhadainm [argóintí]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [slonn]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ argóint... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[argóint] sonrú_comhartha ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] ainm [ainm ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [teorainn]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [MÓD]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [AITHEANTAS ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [AITHEANTAS_PRÓISIS ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for AINM [in FOCAIL ... ] ; do ORDUITHE; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( slonn1; slonn2; slonn3 )); do ORDUITHE; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select AINM [in FOCAIL ... ;] do ORDUITHE; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] PÍBLÍNE" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case FOCAL in [PATRÚN [| PATRÚN]...) ORDUITHE ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if ORDUITHE; then ORDUITHE; [ elif ORDUITHE; then ORDUITHE; ]... [ else " +"ORDUITHE; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while ORDUITHE1; do ORDUITHE2; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until ORDUITHE; do ORDUITHE; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [AINM] ORDÚ [ATREORUITHE]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function AINM { ORDUITHE ; } nó AINM () { ORDUITHE ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ ORDUITHE ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "SONRÚ_TAISC [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( slonn ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ slonn ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "athróga - ainmneacha agus mínithe ar athróga áirithe blaoisce" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | comhadlann]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [AINM_ROGHA ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v athróg] formáid [argóintí]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o ROGHA] [-A GNÍOMH] [-G PATRÚN] [-W " +"LIOSTA_FOCAL] [-F FEIDHM] [-C ORDÚ] [-X PATRÚN_SCAGAIRE] [-P RÉIMÍR] [-S " +"IARMHÍR] [AINM ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o rogha] [-A gníomh] [-G patrún] [-W " +"liosta_focal] [-F feidhm] [-C ordú] [-X patrún_scagaire] [-P réimír] [-S " +"iarmhír] [focal]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o ROGHA] [-DEI] [AINM ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d TEORMHARCÓIR] [-n COMHAIREAMH] [-O BUNÚS] [-s COMHAIREAMH] [-t] " +"[-u TC] [-C AISGHLAOCH] [-c CANDAM] [EAGAR]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d TEORMHARCÓIR] [-n COMHAIREAMH] [-O BUNÚS] [-s COMHAIREAMH] [-" +"t] [-u TUAIRISCEOIR_COMHAID] [-C AISGHLAOCH] [-c CANDAM] [EAGAR]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Sainigh nó taispeáin ailiasanna.\n" +" \n" +" Gan argóintí, priontáiltear an liosta ailiasanna san fhoirm\n" +" ath-inúsáidte 'alias AINM=LUACH' ar an ngnáth-aschur.\n" +" \n" +" I ngach cás eile, sainítear ailias do gach AINM a thugtar LUACH dó.\n" +" Má tá spás chun deiridh LUACH, déantar an chéad fhocal eile a sheiceáil\n" +" le haghaidh ionadú ailias nuair a fhairsingítear an ailias.\n" +" \n" +" Roghanna:\n" +" -p\tPriontáiltear gach ailias sainithe i bhfoirm ath-inúsáidte.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear fíor mura dtugtar AINM nach bhfuil ailias sainithe dó." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Bain gach AINM de liosta na n-ailiasanna sainithe.\n" +" \n" +" Roghanna:\n" +" -a\tbaintear gach sainiú ailias.\n" +" \n" +" Aischuirtear rath ach sa chás nach bhfuil AINM ann." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Scoir de lúba for, while nó until.\n" +" \n" +" Scoir de lúb 'for', 'while' nó 'until'. Má shonraítear N, scoir\n" +" de N lúb mhórthimpeall.\n" +" \n" +" Stádas Scortha:\n" +" Is é 0 an stádas scortha mura bhfuil N níos lú ná 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Lean ar aghaidh le lúba for, while nó until.\n" +" \n" +" Tosaigh an chéad atriall eile den lúb mhórthimpeall 'for', 'while' nó " +"'until'.\n" +" Má shonraítear N, tosaigh an Nú lúb mhórthimpeall.\n" +" \n" +" Stádas Scortha:\n" +" Is é 0 an stádas scortha mura bhfuil N níos lú ná 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Rith orduithe ionsuite na blaoisce.\n" +" \n" +" Ritear ORDÚ-IONSUITE-BLAOISCE leis na hargóintí ARGÓINTÍ gan cuardach\n" +" ordaithe a dhéanamh. Tá sé seo úsáideach más mian ordú blaoisce a\n" +" athshainiú mar fheidhm bhlaoisce agus gur ghá an t-ordú ionsuite a rith\n" +" laistigh den fheidhm.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas scortha ORDÚ-IONSUITE-BLAOISCE, nó falsa sa chás " +"nach\n" +" bhfuil ORDÚ-IONSUITE-BLAOISCE ina ordú ionsuite blaoisce." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Aischuir comhthéacs an ghlaoigh reatha fhoghnáthaimh.\n" +" \n" +" Gan SLONN, aischuirtear '$líne $ainm_comhaid'. Le SLONN, aischuirtear\n" +" '$líne $foghnáthamh $ainm_comhaid'; is féidir lorg cruaiche a sholáthar " +"leis an\n" +" fhaisnéis bhreise seo.\n" +" \n" +" Taispeánann an luach atá ag SLONN líon na bhfrámaí glaoigh le dul siar\n" +" roimh an ceann reatha; fráma 0 an ceann atá ar barr.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear 0 ach sa chás nach bhfuil an bhlaosc ag rith feidhme " +"blaoisce, nó\n" +" sa chás go bhfuil SLONN neamhbhailí." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Athraigh comhadlann oibre na blaoisce.\n" +" \n" +" Athraíonn \"cd\" an chomhadlann reatha go COMHADLANN. Is é luach na " +"hathróige\n" +" blaoisce HOME an réamhshocrú le haghaidh COMHADLANN.\n" +" \n" +" Sainmhíníonn an athróg CDPATH an chonair chuardaigh don chomhadlann ina\n" +" bhfuil COMHADLANN. Cuirtear idirstad (:) idir ainmneacha malartacha\n" +" comhadlainne i CDPATH.\n" +" Is ionann ainm comhadlainne folamh agus an chomhadlann reatha. Má " +"thosaíonn\n" +" COMHADLANN le slaiste (/), ní usáidtear CDPATH.\n" +" \n" +" Mura aimsítear an chomhadlann, agus má ta an athróg bhlaoisce " +"\"cdable_vars\"\n" +" socruithe, glactar leis an bhfocal mar ainm athróige. Má tá luach ag an " +"athróg\n" +" sin, úsáidtear a luach i gcomhair COMHADLANN.\n" +" \n" +" Roghanna:\n" +" -L\tLean naisc shiombalaigh. Taifigh naisc shiombalaigh i COMHADLANN\n" +" \t\ttar éis gach \"..\" a phróiseáil. -P\tÚsáid an chomhadlann " +"fhisiciúil gan naisc shiombalaigh a leanúint.\n" +" \t\tTaifigh naisc shiombalaigh i COMHADLANN roimh \"..\" a " +"phróiseáil.\n" +" -e\tMá tá an rogha -P ann, agus mura féidir an chomhadlann oibre " +"reatha\n" +" \t\ta dhéanamh amach i gceart, scoir le stádas nach náid é.\n" +" -@\tMá thacaíonn an córas leis, taispeáin comhad le haitreabúidí " +"bhreisithe\n" +" \t\tmar chomhadlann ina bhfuil na haitreabúidí bhreisithe.\n" +" \n" +" Leantar naisc shiombalaigh ar bhonn réamhshocraithe, mar a bheadh -L " +"ann.\n" +" Chun \"..\" a phróiseáil, baintear páirt na conaire díreach roimhe siar " +"go\n" +" slaiste (/) nó go tús COMHADLANN.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear 0 má athraíodh an chomhadlann, agus má d'éirigh le socrú " +"$PWD\n" +" nuair a úsáidtear -P; i gcásanna eile aischuirtear luach nach náid é." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Priontáil ainm na comhadlainne oibre reatha.\n" +" \n" +" Roghanna:\n" +" -L\tpriontáil luach $PWD má thugann sé ainm na comhadlainne\n" +" \toibre reatha.\n" +" -P\tpriontáil an chomhadlann fhisiciúil, gan naisc shiombalacha\n" +" \n" +" Mar réamhshocrú, oibríonn 'pwd' faoi mar a bheadh '-L' sonraithe.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear luach de 0 ach sa chás go dtugtar rogha neamhbhailí nó nach " +"féidir\n" +" an chomhadlann reatha a léamh." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Ordú neamhnitheach.\n" +" \n" +" Gan éifeacht; ní dhéanann an t-ordú faic.\n" +" \n" +" Stadas Scortha:\n" +" Éiríonn leis i gcónaí." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Aischuir toradh rathúil.\n" +" \n" +" Stádas Scortha:\n" +" Éiríonn leis i gcónaí." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Aischuir toradh neamhrathúil.\n" +" \n" +" Stádas Scortha:\n" +" Teipeann air i gcónaí." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Ritheann \"command\" ordú simplí nó taispeánann eolas maidir le horduithe.\n" +" \n" +" Ritear ORDÚ le hARGÓINTÍ gan cuardach feidhme blaoisce, nó taispeántar\n" +" eolas maidir leis na horduithe sonraithe. Is féidir é seo a úsáid chun " +"orduithe ar\n" +" diosca a rith má tá feidhm leis an ainm céanna ann.\n" +" \n" +" Roghanna:\n" +" -p\túsáidtear luach réamhshocraithe le haghaidh CONAIR a aimseoidh go " +"cinnte\n" +" \tgach ceann de na gnáthríomhchláir áirge.\n" +" -v\ttaispeántar cur síos ar ORDÚ cosúil leis an ordú ionsuite 'type'\n" +" -V\ttaispeántar cur síos níos faide ar gach ORDÚ\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear an stádas scortha ó ORDÚ, nó teip sa chás nach n-aimsítear " +"ORDÚ." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Socraíonn \"declare\" luachanna agus airíonna athróige.\n" +" \n" +" Fograíonn \"declare\" athróga agus tugann sé aitreabúidí dóibh. Gan\n" +" AINMneacha, taispeántar a luach agus a haitreabúidí le haghaidh gach " +"athróg.\n" +" \n" +" Roghanna:\n" +" -f\tGníomh nó taispeáint srianta le hainmneacha feidhmeanna agus " +"sainithe.\n" +" -F\tGníomh le hainmneacha feidhmeanna amháin (móide uimhir líne agus\n" +" \t\tcomhad foinse le linn dífhabhtaithe).\n" +" -g\tCruthaítear athróga comhchoiteanna nuair a úsáidtear é laistigh " +"de\n" +" \t\tfheidhm bhlaoisce; déantar neamhaird de i gcásanna eile.\n" +" -p\tTaispeántar a luach agus a haitreabúidí le haghaidh gach AINM.\n" +" \n" +" Roghanna a shocraíonn aitreabúidí:\n" +" -a\tAINMneacha mar eagair innéacsaithe (má thacaítear leo)\n" +" -A\tAINMneacha mar eagair chomhthiomsaitheacha (má thacaítear leo)\n" +" -i\tCuirtear an aitreabúid \"integer\" (.i. slonnuimhir) le " +"hAINMneacha.\n" +" -l\tTiontaítear luach gach AINM go cás íochtair agus é á shannadh.\n" +" -n\tBíodh AINM ina thagairt don athróg ainmnithe ag a luach.\n" +" -r\tBíodh AINMneacha inléite amháin.\n" +" -t\tCuirtear an aitreabúid \"trace\" (.i. lorg) le hAINMneacha.\n" +" -u\tTiontaítear luach gach AINM go cás uachtair agus é á shannadh.\n" +" -x\tEaspórtálfar na hAINMneacha as seo amach.\n" +" \n" +" Le \"+\" in áit \"-\", múchtar an aitreabúid shonraithe.\n" +" \n" +" Má tá an aitreabúid \"integer\" ag athróg, déantar luacháil " +"uimhríochtuil\n" +" (feic an t-ordú \"let\") nuair a shanntar leis an athróg.\n" +" \n" +" Nuair a úsáidtear \"declare\" laistigh de fheidhm, beidh na hAINMneacha\n" +" logánta, mar a bheadh leis an t-ordú \"local\". Stopann an rogha \"-g\" " +"é seo.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí, nó go\n" +" dtarlaíonn earráid shannta." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Socraíonn \"typeset\" luachanna agus airíonna athróige.\n" +" \n" +" Comhchiallach le \"declare\". Feic \"help declare\"." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Sainíonn \"local\" athróga logánta.\n" +" \n" +" Cruthaítear athróg logánta darbh ainm AINM, agus cuirtear LUACH leis.\n" +" Is féidir ceann ar bith de na roghanna a ghlacann \"declare\" leo a " +"úsáid\n" +" mar ROGHA.\n" +" \n" +" Ní féidir athróga logánta a úsáid ach laistigh de fheidhm. Tá siad " +"infheicthe\n" +" san fheidhm ina shainítear iad agus a mic amháin.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí, nó go " +"dtarlaíonn earráid,\n" +" nó go bhfuil an bhlaosc ag rith feidhme." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Scríobhann \"echo\" na hargóintí ar an ngnáthaschur.\n" +" \n" +" Taispeántar na hARGÓINTÍ ar an ngnáthaschur le carachtair spáis eatarthu " +"agus\n" +" líne nua ina ndiadh.\n" +" \n" +" Roghanna:\n" +" -n\tní hiarcheanglaítear líne nua\n" +" -e\tcumasaítear na héaluithe cúlslaise thíos\n" +" -E\tdíchumasaítear na héaluithe cúlslaise\n" +" Tuigeann 'echo' na carachtair éalaithe le cúlslais seo a leanas:\n" +" \\a\tairdeall (clog)\n" +" \\b\tcúlspás\n" +" \\c\tcur deireadh le aschur\n" +" \\e\tcaractar éalaithe\n" +" \\E\tcaractar éalaithe\n" +" \\f\tfotha foirme\n" +" \\n\tlíne nua\n" +" \\r\taisfhilleadh carráiste\n" +" \\t\ttáib chothrománach\n" +" \\v\ttáib ingearach\n" +" \\\\\tcúlslais\n" +" \\0nnn\tan carachtar leis an gcód ASCII NNN (ochtnártha). Is féidir le " +"NNN\n" +" \t\tbheith 0 go 3 digit ochtnártha ar fhad\n" +" \\xHH\tan carachtar ocht ngiotán leis an luach HH (heicsidheachúlach). " +"Is\n" +" \t\tféidir le HH bheith 1 nó 2 digit heicsidheachúlach ar fhad.\n" +" \\uHHHH\tan carachtar Unicode leis an luach heicsidheachúlach HHHH.\n" +" \t\tIs féidir le HHHH bheith ó 1 go 8 digit heicsidheachúlach ar fhad.\n" +" \\UHHHHHHHHan carachtar Unicode leis an luach heicsidheachúlach " +"HHHHHHHH.\n" +" \t\tIs féidir le HHHHHHHH bheith ó 1 go 8 digit heicsidheachúlach ar " +"fhad.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach i gcás earráide scríofa." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Scríobh na hargóintí ar an ngnáthaschur.\n" +" \n" +" Taispeáin na hARGÓINTÍ ar an ngnáthaschur agus líne nua ina ndiaidh.\n" +" \n" +" Roghanna:\n" +" -n\tná hiarcheangail líne nua\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach i gcás earráide scríofa." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Rith argóintí mar ordú blaoisce.\n" +" \n" +" Cuir ARGÓINTÍ i dteaghrán amháin, úsáid an toradh mar ionchur go dtí\n" +" an bhlaosc, agus rith na horduithe toraidh.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas scortha an ordaithe, nó rath más ordú neamhnitheach " +"é." + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Cuir an t-ordú sonraithe in áit na blaoisce.\n" +" \n" +" Ritear ORDÚ, agus an ríomhchlár sonraithe curtha in áit na blaoisce " +"seo.\n" +" Úsáidtear na hARGÓINTÍ mar argóintí don ORDÚ. Gan ÓRDÚ, cuirtear\n" +" atreoruithe i bhfeidhm sa bhlaosc reatha.\n" +" \n" +" Roghanna:\n" +" -a AINM\túsáidtear AINM mar argóint uimhir a náid don ORDÚ.\n" +" -c\tritear ORDÚ le timpeallacht fholamh\n" +" -l\tcuirtear fleiscín mar argóint uimhir a náid don ORDÚ.\n" +" \n" +" Sa chás nach féidir an t-ordú a rith, scoirfidh blaosc " +"neamhidirghníomhach,\n" +" mura bhfuil an rogha blaoisce 'execfail' socruithe.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás nach bhfaightear ORDÚ nó go dtarlaíonn\n" +" earráid atreoraithe." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Scoir den bhlaosc.\n" +" \n" +" Scoireann den bhlaosc le stádas N. Má fhágtar N ar lár, is é stádas\n" +" an chéad ordaithe deireanaigh an stádas scortha." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Scoir de bhlaosc logála isteach.\n" +" \n" +" Scoireann de bhlaosc logála isteach le stádas scortha N. Aischuirtear\n" +" earráid má ritear é i mblaosc nach blaosc logála isteach í." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Taispeáin nó rith orduithe ón liosta staire.\n" +" \n" +" Úsáidtear fc chun orduithe ón liosta staire a liostú, a chur in eagar, " +"nó a ath-rith.\n" +" Más uimhreacha iad CÉAD agus DEIREANACH, sonraíonn siad an raon, nó is\n" +" féidir le CÉAD bheith ina theaghrán, rud a chiallaíonn an t-ordú is " +"deireanaí a\n" +" thosaíonn leis an teaghrán sin.\n" +" \n" +" Roghanna:\n" +" -e AINM_E\troghnaigh an clár eagarthóra atá le húsáid. FCEDIT an " +"réamhshocrú,\n" +" \tansin EDITOR, agus ansin vi.\n" +" -n\tfág uimhreacha na línte ar lár agus liosta á thaispeáint\n" +" -r\taisiompaigh ord na línte (.i. liostaigh an ceann is nuaí ar dtús)\n" +" \n" +" San fhormáid 'fc -s [PATRÚN=IONADAÍ ...] [ORDÚ]', ath-ritear ORDÚ\n" +" tar éis an t-ionadú SEAN=NUA a dhéanamh.\n" +" \n" +" Ailias úsáideach is ea r='fc -s', sa chaoi go ritheann 'r cc' an t-ordú " +"is deireanaí\n" +" a thosaíonn le 'cc', agus ath-ritheann 'r' an t-ordú is deireanaí.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath nó stádas an ordaithe rite; neamh-nialas má tharlaíonn " +"earráid." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Bog tasc go dtí an tulra.\n" +" \n" +" Cuirtear an tasc a shonraítear le SONRÚ_TASC sa tulra agus é mar an tasc " +"reatha.\n" +" Mura bhfuil SONRÚ_TASC ann, úsáidtear cibé tasc atá reatha de réir na " +"blaoisce.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe a cuireadh sa tulra, nó teip má " +"tharlaíonn earráid." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Bog tascanna go dtí an cúlra.\n" +" \n" +" Cuirtear an tasc a shonraítear le SONRÚ_TASC sa chúlra cosúil le é a " +"thosú le '&'.\n" +" Mura bhfuil SONRÚ_TASC ann, úsáidtear cibé tasc atá reatha de réir na " +"blaoisce.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtarlaíonn earráid nó nach bhfuil\n" +" rialú tascanna cumasaithe." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Cuimhnigh ar nó taispeáin suíomhanna ríomhchláracha.\n" +" \n" +" Faigh agus cuimhnigh ar an gconair iomlán le haghaidh gach AINM.\n" +" Gan argóintí, taispeántar eolas maidir le orduithe a bhfuil cuimhne " +"orthu.\n" +" \n" +" Roghanna:\n" +" -d\tDéantar dearmad ar shuíomh gach AINM.\n" +" -l\tTaispeáintear i bhformáid atá inúsáidte mar ionchur.\n" +" -p CONAIR\tÚsáidtear CONAIR mar an gconair iomlán le haghaidh AINM.\n" +" -r\tDéantar dearmad ar gach shuíomh atá coinnithe i gcuimhne.\n" +" -t\tPriontáiltear an suíomh atá i gcuimhne le haghaidh gach AINM, " +"agus\n" +" \t\tcuirtear AINM roimh a shuíomh má thugtar níos mó ná AINM amháin. " +"Argóintí:\n" +" AINM\tLorgaítear gach AINM i $PATH agus cuirtear le liosta na n-" +"orduithe\n" +" \t\tatá coinnithe i gcuimhne é.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás nach n-aimsítear AINM, nó go bhfuil\n" +" rogha neamhbhailí ann." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Taispeáin eolas maidir le horduithe ionsuite.\n" +" \n" +" Taispeántar achoimrí na n-orduithe ionsuite. Má shonraítear PATRÚN,\n" +" taispeántar cabhair chuimsitheach faoi gach ordú a mheaitseálann " +"PATRÚN;\n" +" i gcásanna eile taispeántar liosta na n-ábhar cabhrach.\n" +" \n" +" Roghanna:\n" +" -d\ttaispeántar cur síos gairid ar gach ábhar\n" +" -m\ttaispeántar úsáid i bhformáid cosúil leis an lámhleabhar man(1)\n" +" -s\tní thaispeántar ach achoimre gairid úsáide le haghaidh gach ábhair " +"a\n" +" \tmheatseálann PATRÚN\n" +" \n" +" Argóintí:\n" +" PATRÚN\tpatrún a shonraíonn ábhar cabhrach\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás nach n-aimsítear PATRÚN nó go dtugtar\n" +" rogha neamhbhailí." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Taispeáin stádas tascanna.\n" +" \n" +" Liostáiltear na tascanna gníomhacha. Le SONRÚ_TAISC, ní thaispeántar ach " +"an tasc sin.\n" +" Gan roghanna, taispeántar stádas gach tasc gníomhach.\n" +" \n" +" Roghanna:\n" +" -l\tliostáiltear aitheantais na bpróiseas chomh maith leis an ngnáth-" +"eolas.\n" +" -n\tní liostáiltear ach na próisis le stádas athruithe ón chéad fógra " +"roimhe seo\n" +" -p\tliostáiltear aitheantais na bpróiseas amháin\n" +" -r\tní liostáiltear ach tascanna atá ag rith\n" +" -s\tní liostáiltear ach tascanna atá stoptha\n" +" \n" +" Le -x, ritear ORDÚ tar éis gach SONRÚ_TAISC atá in ARGÓINTÍ a athrú go " +"aitheantas\n" +" próisis an phríomh-phróisis i ngrúpa próiseas an taisc sin.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbailí nó go " +"dtarlaíonn earráid.\n" +" Má úsáidtear -x, aischuirtear an stádas scortha ó ORDÚ. " + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Bain tascanna den mblaosc reatha.\n" +" \n" +" Baintear gach SONRÚ_TAISC den tábla de tascanna gníomhacha. Gan\n" +" SONRÚ_TAISC ar bith úsáidtear an tasc atá reatha dar leis an mblaosc.\n" +" \n" +" Roghanna:\n" +" -a\tbaintear gach tasc mura sholáraítear SONRÚ_TAISC\n" +" -h\tmarcáiltear gach SONRÚ_TAISC sa chaoi nach seolfar SIGHUP chuige " +"má\n" +" \tfhaigheann an bhlaosc féin SIGHUP\n" +" -r\tní bhaintear ach tascanna atá ag rith\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí nó " +"SONRÚ_TAISC neamhbhailí." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Seol comhartha chuig tasc.\n" +" \n" +" Seoltar an comhartha ainmnithe ag SONRÚ_COMHARTHA nó UIMHIR_CHOMHARTHA " +"go dti\n" +" an tasc sonraithe le AITHEANTAS_PRÓISIS nó SONRÚ_TAISC. Mura bhfuil " +"SONRÚ_COMHARTHA\n" +" nó UIMHIR_CHOMHARTHA ann, úsáidtear SIGTERM.\n" +" \n" +" Roghanna:\n" +" -s SONRÚ_COMHARTHA\n" +"Is ainm comhartha é SONRÚ_COMHARTHA\n" +" -n UIMHIR_COMHARTHA\n" +"Is uimhir chomhartha é SONRÚ_COMHARTHA\n" +" -l\tLiostáiltear ainmneacha na gcomharthaí. Má tá argóintí i ndiadh \"-" +"l\",\n" +" \t\tglactar leo mar uimhreacha comharthaí agus taispeántar a n-" +"ainmneacha.\n" +" -L\tMar an gcéanna le \"-l\"\n" +" \n" +" Tá \"kill\" ina ordú ionsuite blaoisce ar dhá chúis: is féidir " +"aitheantais\n" +" tascanna a úsáid in ionad aitheantais próiseas, agus is féidir próisis a " +"stopadh\n" +" fiú má tá uasmhéid na bpróiseas a bhfuil cead agat a chruthú sroichte " +"agat.\n" +" Stádas Scortha:\n" +" Aischuirtear rath muna bhfuil rogha neamhbhailí ann nó muna tharla " +"earráid." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Fill ó fheidhm bhlaoisce.\n" +" \n" +" Filltear ó fheidhm nó ó script léite as comhad leis an luach scortha\n" +" a shonraítear i N. Má fhágtar N ar lár, is é an stádas scortha ná " +"stadas\n" +" an orduithe dheireanaigh a ritheadh laistigh den fheidhm nó script.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear N, nó teip sa chás nach bhfuil an bhlaosc ag rith feidhme " +"nó scripte." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Socraíonn \"export\" an aitreabúid easpórtála le haghaidh athróga blaoisce.\n" +" \n" +" Marcáiltear gach AINM le haghaidh easpórtáil uathoibríoch go dtí " +"timpeallacht\n" +" na n-orduithe a ritear ina dhiaidh sin. Má sonraítear LUACH, sann LUACH\n" +" roimh easpórtáil.\n" +" \n" +" Roghanna:\n" +" -f\tcuirtear an aitreabúid i bhfeidhm ar feidhmeanna blaoisce\n" +" -n\tbaintear an aitreabúid ó gach AINM\n" +" -p\tpriontáiltear liosta de athróga agus feidhmeanna easpórtáilte\n" +" \n" +" Cuireann argóint de '--' deireadh le próiseáil na hargóintí.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí nó go bhfuil " +"AINM neamhbhailí." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Iomlaoidigh paraiméadair ionaid.\n" +" \n" +" Athainmnítear na paraiméadair ionaid $N+1,$N+2 ... mar $1,$2 ...\n" +" Gan N, glactar leis mar 1.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go bhfuil N diúltach, nó níos mó ná $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Rith orduithe ó chomhad sa bhlaosc reatha.\n" +" \n" +" Léitear agus ritear orduithe ó AINM_CHOMHAID sa bhlaosc reatha.\n" +" Úsáidtear na hiontrálacha i $PATH chun an chomhadlann ina bhfuil\n" +" AINM_CHOMHAID a aimsiú. Má shonraítear ARGÓINTÍ, cuirtear iad mar\n" +" paraiméadair ionaid agus AINM_CHOMHAID á rith.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh in " +"AINM_COMHAID.\n" +" Teipeann air sa chás nach féidir AINM_CHOMHAID a léamh." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Cuir rith na blaoisce ar fionraí.\n" +" \n" +" Cuirtear rith na blaoisce seo ar fionraí go dtí go bhfaigheann sí\n" +" comhartha SIGCONT. Gan iallach, ní féidir blaosc logála isteach a\n" +" chur ar fionraí.\n" +" \n" +" Roghanna:\n" +" -f\tcuirtear iallach ar an t-ordú, fiú más blaosc logála isteach atá " +"ann.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás nach bhfuil rialú tascanna cumasaithe,\n" +" nó go dtarlaíonn earráid." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Luacháil slonn coinníollach.\n" +" \n" +" Leasainm é seo ar an ordú blaoisce ionsuite \"test\", ach\n" +" caithfear \"]\" go díreach a bheith ann mar an argóint\n" +" dheireanach, le bheith comhoiriúnach leis an \"[\" ag an tús." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Taispeáin amanna próisis.\n" +" \n" +" \n" +"Taispeántar amanna carntha úsáideora agus córais na blaoisce agus a\n" +" macphróiseas.\n" +" \n" +" Stádas Scortha:\n" +" Éiríonn leis i gcónaí." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Taispeáin nó socraigh masc mhód na gcomhad.\n" +" \n" +" Athraítear masc cruthaithe comhaid an úsáideora go MÓD. Gan MÓD,\n" +" taispeántar luach reatha an mhaisc.\n" +" \n" +" Ma thosaíonn MÓD le digit, glactar leis mar uimhir ochtnártha;\n" +" i gcásanna eile is teaghrán móid shiombalaigh é cosúil leis na cinn\n" +" a ghlacann chmod(1) leo.\n" +" \n" +" Roghanna:\n" +" -p\tgan mód, bíodh an aschur i bhformáid atá inúsáidte mar ionchur\n" +" -S\taschur siombalach; seachas sin aschuirfear uimhir ochtnártha\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go bhfuil MÓD neamhbhailí\n" +" nó go sonraítear rogha neamhbhailí." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Fanann \"wait\" go gcríochnaíonn tasc agus aischuireann a stádas scortha.\n" +" \n" +" Fantar le gach próiseas ata sonraithe le AITHEANTAS, a d'fhéadann a " +"bheith\n" +" ina aitheantas próisis nó sonrú taisc, agus tuairiscítear a stádas " +"críochnaithe.\n" +" Gan AITHEANTAS, fantar le gach macphróiseas gníomhach reatha, agus " +"aischuirtear 0.\n" +" Más sonrú taisc atá in AITHEANTAS, fantar le gach próiseas i bpíblíne an " +"taisc sin.\n" +" \n" +" Má sonraítear an rogha -n, fantar leis an gcéad tasc eile a stopann " +"agus\n" +" aischuirtear a stádas scortha.\n" +" \n" +" Má sonraítear an rogha -f agus má tá rialú jabanna cumasaithe, fantar go " +"dtí\n" +" go stopann an AITHEANTAS sonraithe, in áit fanadh le athrú stádais sa " +"tasc sin.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an AITHEANTAIS dheireanaigh. Teipeann ar an ordú má " +"tá\n" +" AITHEANTAS neamhbhailí nó má sonraítear rogha neamhbhailí." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Fanann \"wait\" go gcríochnaíonn próiseas agus aischuireann an stádas " +"scortha.\n" +" \n" +" Fantar le gach próiseas atá sonraithe le AITHEANTAS_PRÓISIS, agus\n" +" tuairiscítear a stádais chríochnaithe. Gan AITHEANTAS_PRÓISIS, fantar\n" +" le gach macphróiseas gníomhach reatha, agus aischuirtear 0.\n" +" Ní mór d'AITHEANTAS_PRÓISIS bheith ina aitheantas próisis.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an AITHEANTAIS dheireanaigh. Teipeann ar an\n" +" ordú má tá AITHEANTAS_PRÓISIS neamhbhailí nó má shonraítear\n" +" rogha neamhbhailí." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Rith orduithe le haghaidh gach mír i liosta.\n" +" \n" +" Ritheann an lúb 'for' sraith ordaithe le haghaidh gach mír i liosta\n" +" míreanna. Gan 'in WORDS ...;', úsáidtear 'in \"$@\"'.\n" +" Le haghaidh gach eilimint i bhFOCAIL, tugtar an luach sin do AINM agus\n" +" ritear na hORDUITHE.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Lúib for uimhriochtúil.\n" +" \n" +" Mar an gcéanna le\n" +" \t(( SLONN1 ))\n" +" \twhile (( SLONN2 )); do\n" +" \t\tORDUITHE\n" +" \t\t(( SLONN3 ))\n" +" \tdone\n" +" Is sloinn uimhreachtúla iad SLONN1, SLONN2 agus SLONN3.\n" +" Má fhágtar slonn ar bith ar lár, oibríonn an lúib mar a bheadh luach de " +"1 air.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Tuairscíonn \"time\" tréimhse rite píblíne.\n" +" \n" +" Ritear PÍBLÍNE agus taispeántar achoimre den fhíor-am, am LAP\n" +" an úsáideora agus am LAP an chórais a chaitheadh ag rith PÍBLÍNE\n" +" nuair a stopann sí.\n" +" \n" +" Roghanna:\n" +" -p\tTaispeántar an achoimre sa bhformáid iniompartha POSIX.\n" +" \n" +" Úsáidtear luach na hathróige TIMEFORMAT don fhormáid aschuir.\n" +" \n" +" Stádas Scortha:\n" +" Is é stadas aischuir PÍBLÍNE an stádas aischuir ó \"time\"." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Rith orduithe de réir mheaitseála patrún.\n" +" \n" +" Ritear ORDUITHE de réir mar a mheaitseálann FOCAL an PATRÚN.\n" +" Úsáidtear '|' chun na patrúin a dheighilt.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ritheann \"if\" orduithe de réir na sloinn choinníllocha.\n" +" \n" +" Ritear an liosta \"if ORDUITHE\". Má tá stádas scortha de náid aige,\n" +" ritear an liosta \"then ORDUITHE\". Le stádais eile, ritear gach liosta\n" +" \"elif ORDUITHE\" ceann ar cheann, agus má tá stádas scortha de náid ag\n" +" ceann acu ritear an liosta \"then ORDUITHE\" cuí agus ansin tá deireadh\n" +" leis an ordú \"if\".\n" +" I gcásanna eile, ritear an liosta \"else ORDUITHE\", más ann dó.\n" +" Is é stádas an chomhstruchtúir iomláin stádas scortha an ordaithe\n" +" dheireanaigh a ritheadh, nó náid sa chás nach raibh coinníoll\n" +" ar bith fíor.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas scortha an ordaithe dheireanaigh a ritheadh." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Rith orduithe chomh fada agus a éiríonn le tástáil.\n" +" \n" +" Fairsingítear agus ritear ORDUITHE2 chomh fada agus atá stádas scortha\n" +" de náid ag an t-ordú deireanach sna hORDUITHE1 a leanann 'while'.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe deireanach a ritheadh." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Rith orduithe chomh fada agus a theipeann ar tástáil.\n" +" \n" +" Fairsingítear agus ritear ORDUITHE chomh fada agus atá stádas scortha\n" +" nach náid é ag an t-ordú deireanach sna hORDUITHE 'until'.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe deireanach a ritheadh." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Cruthaíonn \"coproc\" comhphróiseas ainmnithe AINM.\n" +" \n" +" Ritear ORDÚ go haisioncronach. Beidh gnáthaschur agus gnáthionchur\n" +" an ordaithe ceangailte trí phíopa le tuairisceoirí comhaid a bheidh\n" +" sannta do innéacsanna 0 agus 1 de eagar athróga ainmnithe AINM sa\n" +" bhlaosc atá ag rith. Is é \"COPROC\" an tAINM réamhshocraithe.\n" +" \n" +" Stádas Scortha:\n" +" Aischuireann an t-ordú \"coproc\" stádas scortha de 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Sainigh feidhm bhlaoisce.\n" +" \n" +" Cruthaíonn feidhm bhlaoisce darbh ainm AINM. Nuair a úsáidtear mar ordú\n" +" simplí é, ritheann AINM na hORDUITHE i gcomhthéacs na blaoisce glaoigh.\n" +" Nuair a ghlaoitear AINM, tugtar na hargóintí don fheidhm mar $0 ... $n, " +"agus\n" +" tá ainm na feidhme i $FUNCNAME.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath mura bhfuil AINM inléite amháin." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Grúpáil orduithe mar aonad.\n" +" \n" +" Rith tacar orduithe i ngrúpa. Seo bealach amháin chun tacar iomlán\n" +" orduithe a atreorú.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Tosaigh tasc arís sa tulra.\n" +"\n" +" Is ionann é seo agus an argóint SONRÚ_TAISC don ordú 'fg'.\n" +" Atosaítear tasc atá stoptha nó sa chúlra. Sonraíonnn SONRÚ_TAISC\n" +" ainm nó uimhir taisc. Má leanann '&' SONRÚ_TAISC, ritear an tasc sa\n" +" chúlra, cosúil leis an tasc a chur mar argóint le 'bg'.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an taisc atosaithe." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Faigh luach sloinn uimhríochtúil.\n" +" \n" +" Faightear luach an tSLOINN de réir na rialacha a bhaineann le\n" +" luacháil uimhríochtúil. Tá an t-ordú seo mar an gcéanna le\n" +" \"let SLONN\".\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear 1 más 0 an luach atá ag SLONN; aischuirtear 0 i gcásanna " +"eile." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Ainmneacha na n-athróg coitianta agus a n-úsáid. \n" +" BASH_VERSION\tEolas maidir le leagan an Bash seo.\n" +" CDPATH\tLiosta deighilte le hidirstaid de chomhadlanna ina dhéanfar\n" +" \t\tcuardach ar chomhadlanna a shonraítear mar argóintí do \"cd\".\n" +" GLOBIGNORE\tLiosta deighilte le hidirstaid de phatrúin a dhéanann cur\n" +" \t\tsíos ar ainmneacha na gcomhad a thabharfar neamhaird orthu.\n" +" HISTFILE\tAinm an chomhaid ina bhfuil stair do chuid orduithe.\n" +" HISTFILESIZE\tUasmhéid na línte don chomhad staire.\n" +" HISTSIZE\tUasmhéid na línte staire atá ar fáil do bhlaosc atá ag rith.\n" +" HOME\tConair iomlán do chomhadlann logála isteach.\n" +" HOSTNAME\tAinm an ríomhaire reatha.\n" +" HOSTTYPE\tCineál an LAP ar a bhfuil an Bash seo ag rith.\n" +" IGNOREEOF\tRialaíonn sé seo cad a dhéanfaidh an bhlaosc nuair\n" +" \t\ta fhaigheann sí carachtar EOF mar an t-aon ionchur.\n" +" \t\tMá tá sé socraithe, glactar leis a luach mar líon na\n" +" \t\tgcarachtar EOF atá ceadaithe i ndiaidh a chéile ar líne folamh\n" +" \t\tsula scoirfidh an bhlaosc (10 mar réamhshocrú). Mura\n" +" \t\tbhfuil sé socruithe, cialaíonn EOF deireadh an ionchuir.\n" +" MACHTYPE\tTeaghrán ina bhfuil cur síos ar an gcóras ar a bhfuil\n" +" \t\tan Bash seo ag rith.\n" +" MAILCHECK\tCé chomh minic, i soicind, a chuardaíonn Bash ríomhphost " +"nua.\n" +" MAILPATH\tLiosta deighilte le hidirstaid de chomhadainmneacha a\n" +" \t\tsheiceálann Bash le haghaidh ríomhphost nua.\n" +" OSTYPE\tLeagan Unix ar a bhfuil an bhlaosc seo ag rith.\n" +" PATH\tLiosta deighilte le hidirstaid de chomhadlanna a chuardaíonn Bash\n" +" \t\tagus orduithe á lorg aige.\n" +" PROMPT_COMMAND\tOrdú atá le rith roimh priontáil gach phríomhleide.\n" +" PS1\t\tTeaghrán na príomhleide.\n" +" PS2\t\tTeaghrán na leide tánaistí.\n" +" PWD\t\tConair iomlán na comhadlainne reatha.\n" +" SHELLOPTS\tLiosta deighilte le hidirstaid de na roghanna blaoisce\n" +" \t\tatá cumasaithe.\n" +" TERM\tCineál an teirminéil reatha.\n" +" TIMEFORMAT\tAn fhormáid aschuir le haghaidh na staitisticí ama a\n" +" \t\tthaispeánann an focal coimeádta \"time\".\n" +" auto_resume\tCialaíonn neamhnialais go gcuardaítear focal ordaithe\n" +" \t\tatá ar líne leis féin sa liosta reatha de tascanna stoptha\n" +" \t\tar dtús. Más ann dó, cuirtear an tasc sin sa tulra.\n" +" \t\tCialaíonn luach de \"exact\" go bhfuil meaitseáil dhíreach le\n" +" \t\thordú sa liosta reatha de tascanna stoptha riachtanach.\n" +" \t\tCialaíonn luach de \"substring\" go bhfuil meaitseáil le\n" +" \t\tfo-theaghrán den tasc riachtanach.\n" +" \t\tCialaíonn luach ar bith eile go gaithfidh an t-ordu bheith\n" +" \t\tina réimír de tasc stoptha.\n" +" histchars\tNa carachtair a rialaíonn fairsingiú staire agus\n" +" \t\tionadú mear. Is é an chéad charactar an ceann le haghaidh\n" +" \t\tfairsingiú staire, \"!\" de ghnáth. Is é an dara charactar an\n" +" \t\tceann le haghaidh ionadú mear, \"^\" de ghnáth. Is é an triú\n" +" \t\tceann an carachtar \"nóta tráchta staire\", \"#\" de ghnáth.\n" +" HISTIGNORE\tLiosta deighilte le hidirstaid de phatrúin a shonraíonn\n" +" \t\tna horduithe a chuirfear leis an liosta staire.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Cuir comhadlanna ar an gcruach.\n" +" \n" +" Cuireann comhadlann ar bharr na cruaiche comhadlanna, nó rothlaíonn\n" +" an chruach, ag cur barr nua na cruaiche mar an chomhadlann oibrithe\n" +" reatha. Gan argóintí, malartaítear an dá chomhadlann ar bharr.\n" +" \n" +" Roghanna:\n" +" -n\tNá déantar an gnáthathrú comhadlainne agus comhadlanna á gcur\n" +" \tleis an gcruach; ní athraítear ach an chruach.\n" +" \n" +" Argóintí:\n" +" +N\tRothlaítear an chruach sa chaoi go mbeidh an Nú chomhadlann (ag\n" +" \tcomhaireamh ó thaobh clé an liosta a thaispeánann \"dirs\" agus ag " +"tosú\n" +" \tó náid) ar bharr.\n" +" \n" +" -N\tRothlaítear an chruach sa chaoi go mbeidh an Nú chomhadlann (ag\n" +" \tcomhaireamh ó thaobh deas an liosta a thaispeánann \"dirs\" agus ag " +"tosú\n" +" \tó náid) ar bharr.\n" +" \n" +" COMHADLANN\tCuirtear COMHADLANN ar bharr na cruaiche, agus socraítear\n" +" \tí mar an chomhadlann oibrithe reatha.\n" +" \n" +" Taispeánann an t-ordú ionsuite \"dirs\" cruach na gcomhadlann. \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go sonraítear argóint neamhbhailí, nó\n" +" go dteipeann ar an athrú comhadlainne." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Bain comhadlanna ón gcruach.\n" +" \n" +" Baintear comhadlanna ón gcruach comhadlanna. Gan argóintí, baintear an\n" +" chomhadlann ó bharr na cruaiche, agus téann go dtí an chomhadlann\n" +" atá ar bharr.\n" +" \n" +" Roghanna:\n" +" -n\tNá déantar an gnáthathrú comhadlainne agus comhadlanna á gcur\n" +" \tleis an gcruach; ní athraítear ach an chruach.\n" +" \n" +" Argóintí:\n" +" +N\tBaintear an Nú chomhadlann ag comhaireamh ó thaobh clé an liosta\n" +" \ta thaispeánann \"dirs\" agus ag tosú ó náid. Mar shampla, baineann\n" +" \t\"popd +0\" an chéad chomhadlann, agus \"popd +1\" an dara cheann.\n" +" \n" +" -N\tBaintear an Nú chomhadlann ag comhaireamh ó thaobh deas an liosta\n" +" \ta thaispeánann \"dirs\" agus ag tosú ó náid. Mar shampla, baineann\n" +" \t\"popd -0\" an chomhadlann dheireanach, agus \"popd -1\" an ceann\n" +" \tleathdheireanach.\n" +" \n" +" \n" +" COMHADLANN\tCuirtear COMHADLANN ar bharr na cruaiche, agus socraítear\n" +" \tí mar an chomhadlann oibrithe reatha.\n" +" \n" +" Taispeánann an t-ordú ionsuite \"dirs\" cruach na gcomhadlann.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go sonraítear argóint neamhbhailí, nó\n" +" go dteipeann ar an athrú comhadlainne." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Taispeáin cruach na gcomhadlann.\n" +" \n" +" Taispeáin liosta na gcomhadlann a bhfuil cuimhne orthu faoi láthair.\n" +" Cuirtear comhadlanna ar an liosta leis an ordú 'pushd'. Is féidir dul\n" +" siar trín liosta leis an ordú 'popd'.\n" +" \n" +" Roghanna:\n" +" -c\tglantar cruach na gcomhadlann trí gach mhír a bhaint de\n" +" -l\tná priontáiltear na comhadlanna i gcoibhneas le do chomhadlann " +"bhaile\n" +" \tagus le tilde rompu\n" +" -p\tpriontáiltear cruach na gcomhadlann, mír amháin ar gach líne\n" +" -v\tpriontáiltear cruach na gcomhadlann, mír amháin ar gach líne agus\n" +" \ta háit sa chruach roimpi\n" +" \n" +" Argóintí:\n" +" +N\tTaispeántar mír N, agus uimhrithe curtha ar na míreanna ó thaobh " +"clé\n" +" \tan liosta a thaispeántar le 'dirs' rite gan argóintí, ag tosú ó " +"náid.\n" +" -N\tTaispeántar mír N, agus uimhrithe curtha ar na míreanna ó thaobh " +"deas\n" +" \tan liosta a thaispeántar le 'dirs' rite gan argóintí, ag tosú ó " +"náid.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath muna bhfuil rogha neamhbhailí ann nó muna tharla " +"earráid." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Socraigh agus díshocraigh roghanna na blaoisce.\n" +" \n" +" Athraítear socrú gach rogha blaoisce AINM_ROGHA. Gan argóintí roghnacha " +"ar bith,\n" +" liostáiltear gach AINM_ROGHA, nó gach rogha blaoisce mura bhfuil " +"AINM_ROGHA\n" +" ann, lena stádas socruithe nó díshocraithe.\n" +" \n" +" Roghanna:\n" +" -o\tbíodh AINM_ROGHA srianta dóibh siúd atá inúsáidte le 'set -o'\n" +" -p\tpriontáiltear gach rogha blaoisce le comhartha dá stádas\n" +" -q\tcuir cosc ar aschur\n" +" -s\tcumasaigh (socraigh) gach AINM_ROGHA\n" +" -u\tdíchumasaigh (díshocraigh) gach AINM_ROGHA\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath má tá AINM_ROGHA cumasaithe. Teipeann ar shopt má " +"thugtar\n" +" rogha neamhbhailí, nó má tá AINM_ROGHA díchumasaithe." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Taispeáin na hiomlánaithe atá ar fáil de réir na roghanna.\n" +" \n" +" Tá sé seo ceaptha le húsáid i bhfeidmeanna blaoisce a dhéanann " +"iomlánaithe.\n" +" Má thugtar an argóint roghnach FOCAL, cruthaítear iomlánaithe\n" +" atá comhoiriúnach le FOCAL.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí nó go " +"dtarlaíonn earráid." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Athraíonn nó taispeánann \"compopt\" na roghanna iomlánaithe.\n" +" \n" +" Athraítear na roghanna iomlánaithe le haghaidh gach AINM,\n" +" nó gan AINMneacha taispeántar an t-iomlánú atá á dhéanamh faoi láthair.\n" +" Gan ROGHA ar bith, taispeántar na hiomlánaithe le haghaidh gach AINM\n" +" nó an mionsonrú iomlánaithe reatha.\n" +" \n" +" Roghanna:\n" +" \t-o ROGHA\tSocraítear an rogha iomlánaithe ROGHA le haghaidh gach " +"AINM.\n" +" \t-D\t\tAthraítear roghanna don iomlánú ordaithe \"réamhshocraithe\".\n" +" \t-E\t\tAthraítear roghanna don iomlánú ordaithe \"folamh\".\n" +" \t-I\t\tAthraítear roghanna don iomlánú ar an gcéad focal.\n" +" \n" +" Le \"+o+ in áit \"-o\", múchtar an rogha shonraithe.\n" +" \n" +" Argóintí:\n" +" \n" +" Tagraíonn gach AINM do ordú a bhfuil mionsonrú iomlánaithe sainmhínithe\n" +" dó roimh ré leis an ordú ionsuite \"complete\". Gan AINM, ní mór " +"\"compopt\"\n" +" a ghlaoigh ó fheidhm atá ag déanamh iomlánaithe ag an am, agus " +"athraítear\n" +" na roghanna don déantóir iomlánaithe sin atá ag rith.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí, nó nach\n" +" bhfuil sonrú iomlánaithe ann le haghaih AINM." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Léann \"mapfile\" línte ón ngnáthionchur agus cuireann in athróg eagair " +"innéacsaithe iad.\n" +" \n" +" Léann línte ón ngnáthionchur agus cuireann san athróg eagair " +"innéacsaithe\n" +" EAGAR iad, nó léann ón dtuairisceoir comhaid TC má shonraítear -u. Is í " +"an\n" +" athróg MAPFILE an eagar réamhshocraithe.\n" +" \n" +" Roghanna:\n" +" -d TEORMHARCÓIR\tÚsáidtear TEORMHARCÓIR chun deireadh a chur le " +"línte.\n" +" -n COMHAIREAMH\tCóipeáiltear COMHAIREAMH líne ar a mhéid. Más 0 é " +"COMHAIREAMH,\n" +" \t\tcóipeáiltear gach líne.\n" +" -O BUNÚS\tTosaítear ag sannadh go EAGAR ag an innéacs BUNÚS. Is é 0 an " +"BUNÚS\n" +" \t\tréamhshocraithe.\n" +" -s COMHAIREAMH\tDéantar neamhaird de na chéad COMHAIREAMH líne a " +"léitear.\n" +" -t\tBaintear TEORMHARCÓIR ó deireadh gach líne (carachtar líne nua\n" +" réamhshocraithe).\n" +" -u TC\tLéitear línte ón dtuairisceoir comhad TC in áit an " +"ghnáthionchuir.\n" +" -C AISGHLAOCH\tLuacháiltear AISGHLAOCH tar éis gach CANDAM líne a " +"léitear.\n" +" -c CANDAM\tLíon na línte atá le léamh idir glaoanna ar AISGHLAOCH.\n" +" \n" +" Argóintí:\n" +" EAGAR\tAinm an athróige eagair atá le húsáid le haghaidh sonraí " +"comhaid.\n" +" \n" +" Má shonráitear -C gan -c, is é 5000 an CANDAM réamhshocraithe. Agus " +"AISGHLAOCH\n" +" á luacháil, tugtar dó innéacs na céad eiliminte eile atá le sannadh " +"agus\n" +" an líne atá le sannadh don eilimint sin mar argóintí breise.\n" +" \n" +" Gan BUNÚS sonraithe go soiléir, glanfaidh \"mapfile\" EAGAR roimh faic " +"a\n" +" shannadh dó.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go sonraítear rogha neamhbhailí, nó go " +"bhfuil\n" +" EAGAR inléite amháin, nó nach eagar innéacsaithe é EAGAR." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Léann línte ó chomhad agus cuireann in athróg eagair iad.\n" +" \n" +" Comhchiallach le \"mapfile\"." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Aischuir comhthéacs an ghlaoigh reatha fhoghnáthaimh.\n" +#~ " \n" +#~ " Gan SLONN, aischuirtear " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: próiseas %5ld (%s) sa phíblíne" + +#~ msgid "Unknown Signal #" +#~ msgstr "Comhartha neamhaithnid #" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Cóipcheart © 2018 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: ní féidir %lu beart a athleithdháileadh (%lu beart leithdháilte)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: ní féidir %lu beart a leithdháileadh" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: %s:%d: ní féidir %lu beart a athleithdháileadh (%lu beart " +#~ "leithdháilte)" diff --git a/bash-5.1/po/gl.gmo b/bash-5.1/po/gl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..36e79c597ef51d20d830d6f010b78b466576405e Binary files /dev/null and b/bash-5.1/po/gl.gmo differ diff --git a/bash-5.1/po/gl.po b/bash-5.1/po/gl.po new file mode 100644 index 0000000000000000000000000000000000000000..ae2841891576719702776558815c64ec29148505 --- /dev/null +++ b/bash-5.1/po/gl.po @@ -0,0 +1,4805 @@ +# Galician translation for bash package. +# Copyright (C) 2011 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Leandro Regueiro , 2011. +# Francisco Diéguez , 2012. +# Fran Dieguez , 2012. +# +# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas +# colaborar connosco, podes atopar máis información en +# +msgid "" +msgstr "" +"Project-Id-Version: bash 4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2012-02-23 14:38+0100\n" +"Last-Translator: Leandro Regueiro \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "subíndice de matriz incorrecto" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: non é posíbel converter a matriz de indizada a asociativa" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: índice de matriz asociativa non válido" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: non é posíbel asignar a un índice que non é numérico" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: se debe usar un subíndice ao asignar a unha matriz asociativa" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: non foi posíbel crear: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: non foi posíbel atopar a combinación de teclas " +"para a orde" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: o primeiro carácter que non é espazo en branco non é `\"'" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "no hai un `%c' que peche en %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: falta un `:' separador" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "%s: non se pode borrar a asignación" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': nome de alias non válido" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "no se activó a edición de liña" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': nome de combinación de teclas non válido" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: non se pode leer: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': nome de función descoñecido" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s non está asignado a ningunha tecla.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s pódese invocar a través de " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "%s: non se pode borrar a asignación" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "contía de ciclo" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "só ten significado nun ciclo `for', `while' ou `until'" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Devolve o contexto da chamada a subrutina actual.\n" +" \n" +" Sen EXPR, devolve \"$liña $nomeficheiro\". Con EXPR, devolve\n" +" \"$liña $subrutina $nomeficheiro\"; esta información adicional\n" +" pódese usar para fornecer un volcado de pila.\n" +" \n" +" O valor de EXPR indica cantos marcos de chamada se debe retroceder\n" +" antes do actual; o marco inicial é o marco 0.\n" +" \n" +" Estado de Saída:\n" +" Devolve 0 a menos que o shell non estea executando unha función de " +"shell\n" +" ou EXPR sexa non válida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME non está definido" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "demasiados argumentos" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "non hai outro directorio" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD non está definido" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "liña %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "aviso: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uso: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: a opción require un argumento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: requírese un argumento numérico" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: non se atopou" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: opción non válida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nome de opción non válido" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': non é un identificador válido" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "número octal non válido" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "número hexadecimal non válido" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "número non válido" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: especificación de sinal non válida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': no é un pid ou unha especificación válida de traballo" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variábel de só lectura" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fóra de rango" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumento" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s fóra de rango" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: non existe ese traballo" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: no hai control de traballos" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "no ha control de traballos" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: restrinxido" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "restrinxido" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: no é una orde interna do shell" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "erro de escritura: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "erro ao estabelecer os atributos da terminal: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "erro ao obtener os atributos da terminal: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: erro ao obtener o directorio actual: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: especificación de traballo ambigüa" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: non é posíbel borrar: %s é de só lectura" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: non é posíbel borrar" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nome de acción non válido" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: non hai completado de especificación" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "aviso: é posíbel que a opción -F non funcione como se espera" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "aviso: é posíbel que a opción -C non funcione como se espera" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "non se está executando a función de completado" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "só se pode usar dentro dunha función" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': nome de alias non válido" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "non se pode use `-f' para facer funcións" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: función de só lectura" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: non é posíbel destruír variábeis de matriz desta forma" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: non é posíbel converter unha matriz asociativa a indizada" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "a carga dinámica non está dispoñíbel" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "non é posíbel abrir o obxecto compartido %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "non é posíbel atopar %s no obxecto compartido %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: non foi cargado dinamicamente" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: non foi cargado dinamicamente" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: non foi posíbel eliminar: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: é un directorio" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: non é un ficheiro regular" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: o ficheiro é demasiado grande" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: non é posíbel executar o ficheiro binario" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: non foi posíbel executar: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "non é un shell de entrada: use `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Hai traballos pendentes.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Hay traballos en execución.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "non foi posíbel atopar a orde" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "especificación de historial" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: non é posíbel abrir o ficheiro temporal: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "actual" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "o traballo %d iniciou sen control de traballo" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opción ilegal -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: a opción require un argumento -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "asociación desactivada" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: táboa de asociación baleira\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "coinc\torde\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Orde do shell que coincide coa palabra `" +msgstr[1] "Orde do shell que coincide coas palabras `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"non hai temas de axuda que coincidan con «%s». Probe «help help» ou «man -k " +"%s» ou «info %s»" + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: non foi posíbel abrir: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Estas ordes do shell están definidas internamente. Teclee `help' para\n" +"ver esta lista.\n" +"Teclee `help nome' para saber máis sobre a función `nome'.\n" +"Use `info bash' para saber máis sobre o shell en xeral.\n" +"Use `man -k' o `info' para saber máis sobre as órdenes que non están nesta " +"lista.\n" +"\n" +"Un asterisco (*) xunto a un nome significa que a orde está desactivada.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "non foi posíbel usar máis dun de -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "posición no historial" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: nome de opción non válido" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: fallou a expansión do historial" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: fallou inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "non se permiten outras opcións con «-x»" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: os argumentos deben ser procesos ou IDs de traballos" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Erro descoñecido" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "agardábase unha expresión" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: non é unha matriz indizada" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: especificación de descritor de ficheiro non válida" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: descritor de ficheiro non válido: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: conta de liñas non válida" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: orixe de matriz non válido" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: quantum de chamada non válido" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "nome de variábel de matriz baleiro" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "requírese a compatibilidade de variábel de matriz" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': falta o carácter de formato" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': especificación de formato de tempo non válida" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': carácter de formato non válido" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "aviso: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "falta o díxito hexadecimal para \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "falta o díxito unicode para \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "non hai outro directorio" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: límite de argumento non válido" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "a pila de directorios está baleira" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "índice da pila de directorios" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Mostra a lista de directorios actualmente gravados. Os directorios\n" +" gárdanse na lista coa orde `pushd'; pode ir saíndo da\n" +" lista coa orde `popd'.\n" +" \n" +" Opcións:\n" +" -c\tlimpa a pila de directorios, eliminando todos os elementos\n" +" -l\tnon mostra as versións con prefixo de til dos directorios\n" +" \trelativos ao seu directorio inicial\n" +" -p\tmostra a pila de directorios cunha entrada por liña\n" +" -v\tmuestra a pila de directorios cunha entrada por liña coa\n" +" \tsúa posición na pila como prefixo\n" +" \n" +" Argumentos:\n" +" +N\tMostra a N-ésima entrada contando desde a esquerda da\n" +" \tlista mostrada por dirs cando se chama sen opcións,\n" +" \tcomezando desde cero.\n" +" \n" +" -N\tMostra a N-ésima entrada contando desde a dereita da\n" +"\tlista mostrada por dirs cando se chama sen opcións,\n" +"\tcomezando desde cero." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Engade un directorio ao tope da rima de directorios, ou rota\n" +" a pila, facendo que o novo tope da rima sexa o\n" +" directorio de trabajo actual. Sen argumentos, intercambia\n" +" os dous directorios do tope.\n" +" \n" +" Argumentos:\n" +" +N\tRota a pila para que o N-ésimo directorio (contando\n" +" \tda izquierda da lista mostrada por `dirs',\n" +" \tcomezando desde cero) estea no tope.\n" +" -N\tRota a pila para que o N-ésimo directorio (contando\n" +" \tda derecha da lista mostrada por `dirs',\n" +" \tcomezando desde cero) estea no tope.\n" +" \n" +" dir\tagrega DIR á rima de directorios no tope,\n" +" \tfacéndoo o novo directorio de traballo actual.\n" +" \n" +" A orde interna `dirs' mostra a rima de directorios." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Borra entradas da pila de directorios. Sen argumentos, borra\n" +" directorio do tope da pila, e cambia ao novo directorio tope.\n" +" \n" +" Opcións:\n" +" -n\tsuprime o cambio normal de directorio cando se borra\n" +" \tdirectorios da pila, así só se manipula a pila.\n" +" \n" +" Argumentos:\n" +" +N\tBorra a N-ésima entrada contando da esquerda da\n" +" \tlista mostrada por `dirs', comenzando desde cero.\n" +" \tPor exemplo: `popd +0' borra o primeiro directorio, `popd +1'\n" +" \to segundo.\n" +" \n" +" -N\tBorra a N-ésima entrada contando da derecha da\n" +" \tlista mostrada por `dirs', comezando desde cero.\n" +" \tPor exemplo: `popd -0' borra o último directorio, `popd -1'\n" +" \to penúltimo.\n" +" \n" +" A orde interna `dirs' mostra a pila de directorios." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: especificación de tempo de expiración non válida" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "erro de lectura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "só se pode usar «return» nunha función ou guión lido con «source»" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "non é posíbel borrar ao mesmo tempo unha función e unha variábel" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: non é unha variábel de matriz" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: non é unha función" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: non é posíbel borrar" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "conta de shift" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "non é posíbel activar e desactivar opcións do shell simultaneamente" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nome de opción do shell non válido" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "requírese un argumento de nome de ficheiro" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: non se atopou o ficheiro" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "non é posíbel suspender" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "non é posíbel suspender un shell de entrada" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s é un alias de `%s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s é unha palabra chave do shell\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s é unha función\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s é unha orde interna do shell\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s é unha orde interna do shell\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s é %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s está asociado (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: límite de argumento non válido" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': orde errónea" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: non é posíbel obter o límite: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "límite" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: non é posíbel modificar o límite: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "número octal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': operador de modo simbólico non válido" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': carácter de modo simbólico non válido" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " liña " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "última orde: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Abortando…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "erro de orde descoñecido" + +#: error.c:463 +msgid "bad command type" +msgstr "tipo de orde erróneo" + +#: error.c:464 +msgid "bad connector" +msgstr "conector erróneo" + +#: error.c:465 +msgid "bad jump" +msgstr "salto erróneo" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variable sen asignar" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aexpirou mentres agardaba algunha entrada: auto-logout\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "non é posíbel redirixir a saída estándar desde /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': carácter de formato non válido" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "erro de canalización" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restrinxido: non se pode especificar `/' en nomes de ordes" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: non se atopou a orde" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: intérprete erróneo" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: non é posíbel executar o ficheiro binario" + +#: execute_cmd.c:5977 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s é unha orde interna do shell\n" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "no se pode duplicar o df %d ao df %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "excedeuse o nivel de recursión da expresión" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "desbordamento da base da pila de recursión" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "erro de sintaxe na expresión" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "tentouse asignar a algo que non é unha variábel" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "erro de sintaxe na expresión" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "división entre 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "erro: elemento de asignación de expresión erróneo" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "agardábase `:' para a expresión condicional" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "expoñente menor que 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" +"agardábase un identificador despois do pre-incremento ou pre-decremento" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "falta un `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "erro de sintaxe: agardábase un operando" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "erro de sintaxe: operador aritmético non válido" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (o elemento de erro é \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "base aritmética non válida" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: conta de liñas non válida" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "valor demasiado grande para a base" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: erro de expresión\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: non é posíbel acceder aos directorios pai" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "non é posíbel restabelecer o modo nodelay para o df %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"non é posíbel asignar un novo descritor de ficheiros para a entrada de bash " +"desde o fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" +"save_bash_input: o almacenamento intermedio xa existe para o novo fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: tubería de pgrp" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "o pid `forked' %d aparece no traballo en execución %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "borrando o trabajo detido %d con grupo de proceso %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) márcase como vivo aínda" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: non existe tal pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Sinal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Feito" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Detido" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Detido(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "En execución" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Feito(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Saída %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Estado descoñecido" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(«core» xerado) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (dir agora: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid fillo (%ld a %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld non é un proceso fillo desta shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Non hai un rexistro do proceso %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: o traballo %d está detido" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: non existe ese traballo" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: o traballo rematou" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: o trabajo %d xa está en segundo plano" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: actívase WNOHANG para evitar o bloque indefinido" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: liña %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " («core» generado)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(dir agora: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_jobs_control: fallou getpgrp" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_jobs_control: disciplina de liña" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_jobs_control: disciplina de liña" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_jobs_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "non é posíbel estabelecer o grupo de procesos de terminal (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "non hai control de trabalos nesta shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: fallou a aserción: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: aserción arruinada\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "descoñecido" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: bloque na lista libre sobreescrito" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: chamouse cun argumento de bloque previamente liberado" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: chamouse cun argumento de bloque sen asignar" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: detectouse un desbordamento por embaixo; mh_nbytes fóra de rango" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: detectouse un desbordamento por embaixo; mh_nbytes fóra de rango" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: os tamaños dos anacos de inicio e fin son diferentes" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: chamouse cun argumento de bloque sen asignar" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" +"realloc: detectouse un desbordamento por embaixo; mh_nbytes fóra de rango" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" +"realloc: detectouse un desbordamento por embaixo; mh_nbytes fóra de rango" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: os tamaños dos anacos de inicio e fin son diferentes" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: a táboa alloc está chea con FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p xa está na táboa como asignado?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p xa está na táboa como libre?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base non válida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: anfitrión descoñecido" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: servizo non válido" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: especificación de ruta de rede errónea" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "non hai compatibilidade para operacións de rede" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL non se pode cambiar a configuración rexional (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" +"setlocale: LC_ALL: non se pode cambiar a configuración rexional (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: non se pode cambiar a configuración rexional (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: non se pode cambiar a configuración rexional (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Ten mensaxes en $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Ten unha nova mensaxe en $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "O correo en %s foi lido\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "error de sintaxe: requírese unha expresión aritmética" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "error sintáctico: `;' non esperado" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "erro de sintaxe: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipo de instrución %d erróneo" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"o documento-aquí na liña %d está delimitado por fin-de-fichero (agardábase `" +"%s')" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: a instrucción de redirección `%d' está fóra de rango" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF inesperado mentres se buscaba un `%c' coincidente" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF inesperado mentres se buscaba `]]'" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "error de sintaxe na expresión condicional: elemento inesperado `%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "error sintáctico na expresión condicional" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "elemento inesperado `%s', agardábase `)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "agardábase `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argumento inesperado `%s' para o operador unario condicional" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "argumento inesperado para o operador unario condicional" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "elemento inesperado `%s', agardábase un operador binario condicional" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "agardábase un operador binario condicional" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argumento inesperado `%s' para o operador binario condicional" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "argumento inesperado para o operador binario condicional" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "elemento inesperado `%c' na orde condicional" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "elemento inesperado `%s' na orde condicional" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "elemento inesperado %d na orde condicional" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "error de sintaxe perto do elemento inesperado `%s'" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "erro de sintaxe cerca de «%s»" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "error de sintaxe: non se agardaba o final do fichero" + +#: parse.y:6365 +msgid "syntax error" +msgstr "erro de sintaxe" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Use «%s» para deixar o shell.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF non agardado mentres se buscaba un «)» coincidente" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: non se atopa a función `%s'" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: COMPSPEC nulo" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: conector erróneo `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: descriptor de fichero non válido" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: punteiro a ficheiro NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != numfich xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': carácter de formato non válido" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "descritor de ficheiro fóra de rango" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redireccionamento ambigüo" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: non se pode sobreescribir un fichero existente" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restrinxido: no se pode redirixir a saída" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "non se pode crear un fichero temporal para o documento-aquí: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: non é posíbel asignar o gd á variábel" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "non se admite /dev/(tcp|udp)/anfitrion/porto sen rede" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "erro de redirección: non é posíbel duplicar o fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "non é posíbel atopar /tmp, por favor creeo!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp debe ser un nome de directorio válido" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opción non válida" + +#: shell.c:1319 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "non é posíbel restabelecer o modo nodelay para o df %d" + +#: shell.c:1330 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "non é posíbel restabelecer o modo nodelay para o df %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: é un directorio" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Non teño nome!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versión %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uso:\t%s [opción GNU longa] [opción] ...\n" +"\t%s [opción GNU longa] [opción] guión-do-shell\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Opcións GNU longas:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opcións do shell:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD o -c orde ou -O opcion_shopt\t\t(só invocación)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ou -o opción\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Escriba `%s -c \"help set\"' para máis información sobre as opcións do " +"shell.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Escriba `%s -c help' para máis información sobre as ordes internas do " +"shell.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Use a orden `bashbug' para reportar erros.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operación non válida" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Sinal ambigüa" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Colgar" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interromper" + +#: siglist.c:58 +msgid "Quit" +msgstr "Saír" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Instrución ilegal" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT rastreo/captura" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "instrución ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "instrución EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Excepción de coma flotante" + +#: siglist.c:86 +msgid "Killed" +msgstr "Matado" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Erro no bus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Violación de segmento" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Chamada ao sistema errónea" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Tubería rota" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Temporizador" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Rematado" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Condicón de E/s urxente" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Detido (sinal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continúa" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "O proceso fillo morreu ou está parado" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Detido (entrada pola terminal)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Detido (saída pola terminal)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "E/S listas" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Límite de CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Límite de ficheiros" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarma (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarma (contorno)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Xanela cambiada" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Bloqueo de gravación" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Sinal de usuario 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Sinal de usuario 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "entrada de datos HFT pendente" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "fallo de enerxía inminente" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "caída do sistema inminente" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migrando o proceso a outra CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "erro de programación" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "o modo monitor HFT foi concedido" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "o modo monitor HTF foi retirado" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "a secuencia de son HFT foi completada" + +#: siglist.c:214 +msgid "Information request" +msgstr "Solicitude de información" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Sinal descoñecido #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "susbtitución errónea: non hai un `%s' que peche en %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: no é posíbel asignar unha lista a un membro da matriz" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "non é posíbel crear a tubería para a sustitución do proceso" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "non é posíbel crear un proceso fillo para a substitución do proceso" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "non é posíbel abrir a tubería chamada %s para lectura" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "non é posíbel abrir a tubería chamada %s para escritura" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "non é posíbel duplicar a tubería chamada %s como df %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "substitución errónea: non hai unha \"`\" que peche en %s" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "non é posíble crear a tubería para a substitución da orde" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "non é posíbel crear un proceso fillo para a substitución da orde" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: non é posíbel duplicar a tubería como fd 1" + +#: subst.c:6883 subst.c:9952 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: %s: valor non válido para o descitor de ficheiro de rastreo" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: conta de liñas non válida" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "`%s': nome de alias non válido" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parámetro nulo ou non estabelecido" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parámetro nulo ou non estabelecido" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expresión de subcadea < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: substitución errónea" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: non é posíbel asignar de esta forma" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"versiones futuras do intérprete obligarán a evaluación como unha " +"substitución aritmética" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "substitución errónea: non hai unha \"`\" que peche en %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "non hai concidencia: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "agardábase un argumento" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: agardábase unha expresión enteira" + +#: test.c:265 +msgid "`)' expected" +msgstr "agardábase `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "`)' agardábase, atopouse %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: agardábase un operador binario" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: agardábase un operador unario" + +#: test.c:881 +msgid "missing `]'" +msgstr "falta un «]»" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "error sintáctico: `;' non esperado" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "número de sinal non válido" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valor erróneo en trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: o manexador de sinal é SIG_DFL, reenviando %d (%s) a sí " +"mesmo" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: sinal errónea %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "erro ao importar a definición da función para «%s»" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "o nivel de shell (%d) é demasiado alto, restabelécese a 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: non hai contexto de función no ámbito actual" + +#: variables.c:2693 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: non é posíbel asignar o gd á variábel" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: non hai contexto de función no ámbito actual" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s ten exportstr nulo" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "carácter non válido %d en exportsrt para %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "non hai «=» en exportstr para %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: a cabezak de shell_variables non é un contexto de función" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: non é un contexto global_variables " + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: a cabeza de shell_variables non é un ámbito de ambiente temporal" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: non é posíbel abrir como FICHEIRO" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: valor non válido para o descitor de ficheiro de rastreo" + +#: variables.c:6437 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s fóra de rango" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licenza GPLv3+: GPL de GNU versión 3 ou posterior \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versión %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "Isto é software libre; vostede é libre de cambialo e redistribuilo.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Non hai GARANTÍA, á extensión permitida pola ley.\n" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: non é posíbel asignar %lu bytes (%lu bytes asignados)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: non é posíbel asignar %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: non é posíbel asignar %lu bytes (%lu bytes asignados)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: non é posíbel asignar %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nome[=valor] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nome [nome ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m comb_teclas] [-f ficheiro] [-q nome] [-u nome] [-r " +"secteclas] [-x secteclas:orde-shell] [keyseq:función-readline ou función-" +"readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [orde-interna-shell [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expresión]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [directorio]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] orde [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilrtux] [-p] [nome[=valor] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilrtux] [-p] nome[=valor] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] nome[=valor] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f nomeficheiro] [nome ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts cadena_opcións nome [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a ome] [orde [argumentos ...]] [redirección ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e nome_e] [-lnr] [primeiro] [último] ou fc -s [pat=rep] [orde]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [id_traballo]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [id_traballo ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ruta] [-dt] [nome ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [patrón ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d desprazamento] [n] ou history -anrw [ficheiro] ou history -" +"ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [idtraballo ...] ou jobs -x orde [args]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [id_traballo ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s id_sinal | -n num_sinal | -id_sinal] pid | id_traballo ... ou kill -" +"l [id_sinal]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a matriz] [-d delim] [-i texto] [-n ncars] [-N ncars] [-p " +"prompt] [-t timeout] [-u fd] [nome ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nome-opción] [--] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [nome ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nome[=valor] ...] ou export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nome[=valor] ...] ou readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source ficheiro [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". ficheiro [argumentos]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expresión]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] id_sinal ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nome [nome ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [límite]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modo]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOME [in PALABRAS ... ] ; do ORDES; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do ORDES; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOME [in PALABRAS ... ;] do ORDES; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PALABRA in [PATRÓN [| PATRÓN]...) ORDES ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "if ORDES; then ORDES; [ elif ORDES; then ORDES; ]...[ else ORDES; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while ORDES; do ORDES; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until ORDES; do ORDES; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOME] orden [redireccións]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nome { ORDES ; } ou nome () { ORDES ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ ORDES ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expresión ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expresión ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Nomes e significados de algunhas variábeis de shell" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nome_opción ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] formato [argumentos]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o opción] [-A acción] [-G patglob] [-" +"W listapalabras] [-F función] [-C orde] [-X patfiltro] [-P prefixo] [-S " +"sufixo] [nome ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o opción] [-A acción] [-G patglob] [-W " +"listapalabras] [-F función] [-C orde] [-X patfiltro] [-P prefixo] [-S " +"sufixo] [palabra]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opción] [-DE] [nome ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n conta] [-O orixe] [-s conta] [-t] [-u df] [-C chamada] [-c " +"quantum] [matriz]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n conta] [-O orixe] [-s conta] [-t] [-u df] [-C chamada] [-c " +"quantum] [matriz]" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Define ou mostra aliases.\n" +" \n" +" `alias' sen argumentos mostra a lista de aliases na forma\n" +" reutilizábel `alias NOMBRE=VALOR' na saída estándar.\n" +" \n" +" De outra maneira, defínese un alias por cada NOME cuxo VALOR se\n" +" forneza. Un espazo final en VALOR causa que se revise\n" +" a seguinte palabra para substitución de alias cando se expande\n" +" o alias.\n" +" \n" +" Opciones:\n" +" -p\tMuestra todos los aliases definidos en un formato reusable\n" +" \n" +" Estado de salida:\n" +" alias devuelve verdadero a menos que se de un NOMBRE para el cual\n" +" no se haya definido ningún alias." + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Borra cada NOME da lista de alias definidos.\n" +" \n" +" Opcións:\n" +" -a\telimina todas as definicións de alias.\n" +" Devovle verdadero a menos que un NOME non sexa un alias existente." + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Estabelece secuencias de teclas Readline e variábeis.\n" +"\n" +" Asigna unha secuencia de teclas a unha función Readline ou a unha macro, " +"ou\n" +" estabelece unha variábel Readline. A sintaxe dos argumentos que\n" +" non son opcións é equivalente á que se encontra en ~/.inputrc,\n" +" pero débese pasar como un só argumento:\n" +" p.e., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" opcións:\n" +" \n" +" -m comb_teclas Usa COMB_TECLAS como a combinación de teclas pola\n" +" duración desta orde. Os nomes de combinacións\n" +" de teclas aceptábeis son emacs, emacs-standard,\n" +" emacs-meta, emacs-ctlx, vi, vi-move, vi-command e\n" +" vi-insert.\n" +" -l Enlista os nomes das funcións.\n" +" -P Enlista os nomes das funcións e asignacións.\n" +" -p Enlista as funcións e asignacións nunha forma que\n" +" se pode reusar como entrada.\n" +" -S Enlista as secuencias de teclas que invocan macros\n" +" e os seus valores.\n" +" -s Enlista as secuencias de teclas que invocan macros\n" +" e os seus valores nunha forma que se poden reusar " +"como\n" +" entrada.\n" +" -V Enlista os nomes de variábeis e valores.\n" +" -v Enlista os nomes de variábeis e valores nunha\n" +" forma que se pode reusar como entrada.\n" +" -q nome-funcion Pregunta qué teclas invocan a función nomeada.\n" +" -u nome-función Borra todas as teclas que están ligadas\n" +" á función nomeada.\n" +" -r secteclas Borra a asignación para a SECTECLAS.\n" +" -f fichero Lee as asignacións de teclas do FICHERO.\n" +" -x secteclas:orde-shell\tCausa que se execute a ORDE-SHELL cando\n" +" \t\t\t\tse introduce a SECTECLAS.\n" +" \n" +" Estado de saída:\n" +" bind devolve 0 a menos que se presente unha opción descoñecida ou se\n" +" se produza un erro." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Termina ciclos for, while o until.\n" +" \n" +" Termina un ciclo FOR, WHILE o UNTIL. Se se especifica N, remata\n" +" N ciclos anidados.\n" +" \n" +" Estado de saída:\n" +" O estado de saída é 0 a menos que N non sexa maior ou igual a 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Continúa iteracións for, while o until\n" +" \n" +" Continúa a seguinte iteración do ciclo FOR, WHILE ou UNTIL\n" +" circundante. Se se especifica N, retoma no N-ésimo ciclo circundante.\n" +" \n" +" Estado de Saída:\n" +" O estado de salida é 0 a menos que N non sexa maior ou igual a 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Executa ordes internas do shell\n" +" \n" +" Executa a ORDEN-INTERNA-SHELL cos argumentos ARGs sen realizar\n" +" a busca interna de ordes. Isto é útil cando desexa reimplementar\n" +" unha orde interna do shell como unha función de shell, pero necesita\n" +" executar a orde interna dentro da función.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado de saída da ORDE-INTERNA-SHELL, ou falso se a\n" +" ORDE-INTERNA-SHELL non é unha orde interna de shell." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Devolve o contexto da chamada a subrutina actual.\n" +" \n" +" Sen EXPR, devolve \"$liña $nomeficheiro\". Con EXPR, devolve\n" +" \"$liña $subrutina $nomeficheiro\"; esta información adicional\n" +" pódese usar para fornecer un volcado de pila.\n" +" \n" +" O valor de EXPR indica cantos marcos de chamada se debe retroceder\n" +" antes do actual; o marco inicial é o marco 0.\n" +" \n" +" Estado de Saída:\n" +" Devolve 0 a menos que o shell non estea executando unha función de " +"shell\n" +" ou EXPR sexa non válida." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Mostra o nome do directorio de traballo actual.\n" +" \n" +" Opcións:\n" +" -L\tmostra o valor de $PWD se nomea ao directorio de\n" +" \ttraballo actual\n" +" -P\tmostra o directorio físico, sen ligazóns simbólicas\n" +" \n" +" Por defecto, `pwd' comportase como se se especificara `-L'.\n" +" \n" +" Estado de Saída:\n" +" Devolve 0 a menos que se dea unha opción non válida ou non se poida " +"leer\n" +" o directorio actual." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Orde nula.\n" +" \n" +" Sen efecto; a orde non fai nada.\n" +" \n" +" Estado de Saída:\n" +" Sempre con éxito." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Devolve un resultado con éxito.\n" +" \n" +" Estado de salida:\n" +" Sempre con éxito." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Devolve un resultado sen éxito.\n" +" \n" +" Estado de saída:\n" +" Sempre falla." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Estabelece valores de variábeis e atributos.\n" +" \n" +" Obsoleto. Consulte `help declare'." + +#: builtins.c:540 +#, fuzzy +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Define variábeis locais.\n" +" \n" +" Crea unha variábel local chamada NOME, e dalle un VALOR. OPCIÓN pode\n" +" ser calquera opción aceptada por `declare'.\n" +" \n" +" As variábeis locais só se pueden usar nunha función; son visibles\n" +" só na función onde se definen e os seus fillos.\n" +" \n" +" Estado de Saída:\n" +" Devolve con éxito a menos que se dea unha opción non válida, se produza\n" +" un erro, ou o shell non estea executando unha función." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Executa argumentos como unha orde de shell.\n" +" \n" +" Combina os ARGumentos nunha soa cadena, usa o resultado como entrada\n" +" para o shell, e executa as órdenes resultantes.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado de saida da orde ou éxito se a orde é nula." + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Remata a shell.\n" +" \n" +" Termina o shell cun estado de N. Se se omite N, o estado de saída\n" +" é o mismo da última orde executada." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Termina un shell de entrada.\n" +" \n" +" Termina un shell de entrada cun estado de saída de N. Devolve un\n" +" erro se non se executa nunha shell de entrada." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Move o trabañño ao primeiro plano.\n" +" \n" +" Localiza o traballo identificado con IDTRABALLO no primeiro plano, e\n" +" faino o traballo actual. Se IDTRABALLO non está presente, úsase\n" +" a noción do shell do traballo actual.\n" +" \n" +" Estado de Saída:\n" +" O estado da orde localizada en primeiro plano, ou falla se sucede un " +"erro." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspende a execución do shell.\n" +" \n" +" Suspende a execución deste shell até que recibe un sinal SIGCONT.\n" +" Os shells de entrada non se poden suspender, a menos que sexan " +"forzados.\n" +" \n" +" Opcións:\n" +" -f\tforza a suspensión, aínda se o shell é un shell de entrada\n" +" \n" +" Estado de Saída:\n" +" Devolve con éxito a menos que non estea activo o control de traballos o\n" +" se produza un erro." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Evalúa unha expresión condicional.\n" +" \n" +" Este é un sinónimo para a orde interna \"test\", pero o último\n" +" argumento debe ser un `]' literal, que coincida co `[' inicial." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Mostra os tempos de proceso.\n" +" \n" +" Mostra os tempos de usuario e sistema acumulados polo shell e todos\n" +" os seus procesos fillos.\n" +" \n" +" Estado de saída:\n" +" Sempre con éxito." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Agarda a terminación do traballo e devolve o estado de saída.\n" +" \n" +" Espera ao proceso especificado e reporta o seu estado de saída. Se\n" +" non se fornece un PID, agarda a todos os procesos fillo activos,\n" +" e o código de devolución é cero. PID debe ser un ID de proceso.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado de ID; falla se ID non é válido ou se se fornece unha\n" +" opción non válida." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordes por cada membro nunha lista.\n" +" \n" +" O ciclo `for' executa unha secuencia de ordes para cada membro nunha\n" +" lista de elementos. Se `in PALABRAS ...;' non está presente,\n" +" entón asúmese `in \"$@\"'. Para cada elemento en PALABRAS,\n" +" defínese NOME como ese elemento, e execútanse as ÓRDENES.\n" +" \n" +" Estado de Saída:\n" +" Devuelve o estado da última orden executada." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmética para un ciclo.\n" +" \n" +" Equivalente a\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tORDES\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, e EXP3 son expresións aritméticas. Se se omite\n" +" calquera expresión, compórtase como se se evaluara a 1.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordes en base á coincidencia de patróns.\n" +" \n" +" Executa ÓRDENES selectivamente baseado en coincidencias da PALABRA\n" +" co PATRÓN. Emprégase `|' para separar patróns múltiples.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ejecuta ordes mentres unha proba teña éxito.\n" +" \n" +" Expande e executa ORDES mentres a orde final nas ÓRDENES\n" +" `while' teña un estado de saída de cero.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordes mentres unha proba non teña éxito.\n" +" \n" +" Expande e executa ORDES mentres a orde final nas ORDES\n" +" `until' teña un estado de saída que non sexa cero.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Crea un coproceso chamado NOME.\n" +" \n" +" Executa a ORDE asíncronamente, coa saída estándar e a entrada\n" +" estándar da orde contectada a través dunha tubería aos descritores\n" +" de ficheiro asignados aos índices 0 e 1 dunha variábel de matriz NOME\n" +" no shell en execución. O nome por omisión é \"COPROC\".\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado de saída da ORDE." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Agrupa ordes como unha unidade.\n" +" \n" +" Executa un conxunto de ordes nun grupo. Esta é unha forma de\n" +" redirixir un conxunto completo de ordes.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Avalí unha expresión aritmética.\n" +" \n" +" Avalíase a EXPRESIÓN de acordo ás regras de evaluación\n" +" aritmética. Equivalente a \"let EXPRESIÓN\".\n" +" \n" +" Estado de Saída:\n" +" Devolve 1 se a EXPRESIÓN avalía a 0; devovle 0 de outra maneira." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Engade un directorio ao tope da rima de directorios, ou rota\n" +" a pila, facendo que o novo tope da rima sexa o\n" +" directorio de trabajo actual. Sen argumentos, intercambia\n" +" os dous directorios do tope.\n" +" \n" +" Argumentos:\n" +" +N\tRota a pila para que o N-ésimo directorio (contando\n" +" \tda izquierda da lista mostrada por `dirs',\n" +" \tcomezando desde cero) estea no tope.\n" +" -N\tRota a pila para que o N-ésimo directorio (contando\n" +" \tda derecha da lista mostrada por `dirs',\n" +" \tcomezando desde cero) estea no tope.\n" +" \n" +" dir\tagrega DIR á rima de directorios no tope,\n" +" \tfacéndoo o novo directorio de traballo actual.\n" +" \n" +" A orde interna `dirs' mostra a rima de directorios." + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Borra entradas da pila de directorios. Sen argumentos, borra\n" +" directorio do tope da pila, e cambia ao novo directorio tope.\n" +" \n" +" Opcións:\n" +" -n\tsuprime o cambio normal de directorio cando se borra\n" +" \tdirectorios da pila, así só se manipula a pila.\n" +" \n" +" Argumentos:\n" +" +N\tBorra a N-ésima entrada contando da esquerda da\n" +" \tlista mostrada por `dirs', comenzando desde cero.\n" +" \tPor exemplo: `popd +0' borra o primeiro directorio, `popd +1'\n" +" \to segundo.\n" +" \n" +" -N\tBorra a N-ésima entrada contando da derecha da\n" +" \tlista mostrada por `dirs', comezando desde cero.\n" +" \tPor exemplo: `popd -0' borra o último directorio, `popd -1'\n" +" \to penúltimo.\n" +" \n" +" A orde interna `dirs' mostra a pila de directorios." + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Mostra a lista de directorios actualmente gravados. Os directorios\n" +" gárdanse na lista coa orde `pushd'; pode ir saíndo da\n" +" lista coa orde `popd'.\n" +" \n" +" Opcións:\n" +" -c\tlimpa a pila de directorios, eliminando todos os elementos\n" +" -l\tnon mostra as versións con prefixo de til dos directorios\n" +" \trelativos ao seu directorio inicial\n" +" -p\tmostra a pila de directorios cunha entrada por liña\n" +" -v\tmuestra a pila de directorios cunha entrada por liña coa\n" +" \tsúa posición na pila como prefixo\n" +" \n" +" Argumentos:\n" +" +N\tMostra a N-ésima entrada contando desde a esquerda da\n" +" \tlista mostrada por dirs cando se chama sen opcións,\n" +" \tcomezando desde cero.\n" +" \n" +" -N\tMostra a N-ésima entrada contando desde a dereita da\n" +"\tlista mostrada por dirs cando se chama sen opcións,\n" +"\tcomezando desde cero." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Activa e desactiva opcións de shell.\n" +" \n" +" Cambia a configuración de cada opción de shell NOME_OPCIÓN. Sen\n" +" algunha opción como argumento, mostra todas as opcións de shell cunha\n" +" indicación se está activa ou non.\n" +" \n" +" Opcións:\n" +" -o\trestrinxe NOME_OPCIÓN a aqueles definidos con `set -o'\n" +" -p\tmostra cada opción de shell cun indicador do seu estado\n" +" -q\tsuprime a saída\n" +" -s\tactiva (estabelece) cada NOME_OPCIÓN\n" +" -u\tdesactiva (borra) cada NOME_OPCIÓN\n" +" \n" +" Estado de Saída:\n" +" Devolve con éxito se se activa NOME_OPCIÓN; falla se se fornece\n" +" unha opción non válida ou NOME_OPCIÓN está desactivado." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Mostra os posíbeis completados dependendo das opcións.\n" +" \n" +" Serve para usarse desde unha función de shell que xere completados\n" +" posíbeis. Se se fornece o argumento opcional PALABRA, xéranse\n" +" as coincidencias contra PALABRA.\n" +" \n" +" Estado de Saída:\n" +" Devolve con éxito a menos que se forneza unha opción non válida o\n" +" se produza un erro." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Lee liñas dun fichero nunha variábel de matriz.\n" +" \n" +" Un sinónimo de `mapfile'." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2011 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Devolve o contexto da chamada a subrutina actual.\n" +#~ " \n" +#~ " Sen EXPR, devovle " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: o proceso %5ld (%s) en the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Sinal descoñecido #" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licenza GPLv2+: GPL de GNU versión 2 ou posterior \n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/bash-5.1/po/hr.gmo b/bash-5.1/po/hr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..513672e76df11008fd80929fade8e2cd3887fc95 Binary files /dev/null and b/bash-5.1/po/hr.gmo differ diff --git a/bash-5.1/po/hr.po b/bash-5.1/po/hr.po new file mode 100644 index 0000000000000000000000000000000000000000..08e58251d4a0b51b153bcfa9289f3154d3972e8a --- /dev/null +++ b/bash-5.1/po/hr.po @@ -0,0 +1,5741 @@ +# Translation of bash to Croatian. +# Copyright © 2018 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Tomislav Krznar , 2012, 2013. +# Božidar Putanec , 2018, 2019. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2020-11-22 13:25-0800\n" +"Last-Translator: Božidar Putanec \n" +"Language-Team: Croatian \n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Lokalize 2.0\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "nevaljani indeks polja" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: uklanja se atribut nameref" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nije moguće pretvoriti indeksirano u asocijativno polje" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: nevaljani ključ asocijativnoga polja" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: indeks mora biti numerički" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: mora se koristiti indeks pri dodijeli asocijativnoga polja" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: nije moguće napraviti: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: nije moguće pronaći keymap za naredbu" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: prvi znak, koji nije bjelina, nije „\"“" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "nema zaključnoga „%c“ u %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: nema razdjelnika dvotočke" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: nije moguće razvezati" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" +"brace expansion: nije moguće dodijeliti memoriju za %s\n" +"(primjer ekspanzije unutar vitičastih zagrada: echo a{d,c}e -> ade, ace)" + +# Brace expansion is a mechanism by which arbitrary strings may be generated +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"brace expansion: nije uspjelo dodijeliti memoriju za %u elemenata\n" +"(primjer ekspanzije unutar vitičastih zagrada: echo a{d,c}e -> ade, ace)" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" +"brace expansion: nije uspjelo dodijeliti memoriju za „%s“\n" +"(primjer ekspanzije unutar vitičastih zagrada: echo a{d,c}e -> ade, ace)" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s“: nevaljano ime aliasa" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "redigiranje retka nije omogućeno" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s“: nevaljano ime za keymap" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: nije moguće pročitati: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s“: nepoznato ime funkcije" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s nije vezano s nijednom tipkom.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s se može pozvati pomoću " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: nije moguće razvezati" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "brojač ponavljanja" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "ima značenje samo u „for“, „while“ ili „until“ petljama" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Vrati kontekst trenutnog poziva potprogramu.\n" +"\n" +" Bez IZRAZA, vrati „$line $filename“. Ako je dȃn IZRAZ, vrati\n" +" „$line $subroutine $filename“; ova dodatna informacija može poslužiti\n" +" za „stack trace“.\n" +"\n" +" Vrijednost IZRAZA pokazuje koliko se treba vratiti unatrag od\n" +" trenutne pozicije, s time da je pozicija 0 trenutna pozicija.\n" +"\n" +" Završi s kȏdom 0 osim ako ljuska ne izvršava ljuskinu funkciju\n" +" ili je IZRAZ nevaljani." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME varijabla nije definirana" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "previše argumenata" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null direktorij" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD nije postavljeni" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "redak %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "upozorenje: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uporaba: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: opcija zahtijeva argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: zahtijeva se numerički argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: nije pronađeno" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: nevaljana opcija" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nevaljano ime opcije" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s“: nije valjani identifikator" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "nevaljani oktalni broj" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "nevaljani heksadecimalni broj" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "nevaljani broj" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: nevaljana specifikacija signala" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s“: nije PID ili valjani pokazatelj posla" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: varijabla samo za čitanje" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s je izvan raspona" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s je izvan raspona" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: nema takvoga posla" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: nema kontrole nad poslovima u ovoj ljuski" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "nema kontrole nad poslovima u ovoj ljuski" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: ograničeni način" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "ograničeni način" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: nije ugrađena bash naredba" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "greška pri pisanja: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "greška pri postavljanju svojstava terminala: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "greška pri preuzimanju svojstava terminala: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: nije moguće pronaći trenutni direktorij: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: višeznačni pokazatelj posla" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "u ovoj inačici pomoć nije ugrađena" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nije moguće poništiti: %s je moguće samo čitati" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nije moguće poništiti" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nevaljano ime za akciju" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: dovršavanje nije specificirano" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "upozorenje: opcija -F možda neće raditi prema očekivanju" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "upozorenje: opcija -C možda neće raditi prema očekivanju" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "trenutno se ne izvršava funkcija kompletiranja" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "može se koristiti samo u funkciji" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: referentna varijabla ne može biti polje" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: varijabla nameref ukazuje na samu sebe, a to nije dopušteno" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: kružna referencija na ime" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: nevaljano ime varijable za referenciju na ime" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "„-f“ se ne može koristiti za definiranje funkcije" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funkcija samo za čitanje" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: dodjeljivanje citiranoga složenog polja je zastarjelo" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: nije moguće uništiti varijable polja na ovaj način" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: nije moguće pretvoriti asocijativno u indeksirano polje" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dinamičko učitavanje nije dostupno" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "nije moguće otvoriti dijeljeni objekt %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "nije moguće pronaći %s u dijeljenom objektu %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: nije dinamički učitan" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "funkcija učitavanja za %s završila je s pogreškom (%d): nije učitano" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: nije dinamički učitan" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: nije moguće izbrisati: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: to je direktorij" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: nije obična datoteka" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: datoteka je prevelika" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: nije moguće izvršiti binarnu datoteku" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: nije moguće izvršiti: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "odjava\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "nije prijavna ljuska: odjavite se s „exit“" + +# stopped > pauzirano ili zaustavljeno +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Ima zaustavljenih poslova.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Ima pokrenutih poslova.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "naredba nije pronađena" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "prikaz povijesti naredbi" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: nije moguće otvoriti privremenu datoteku: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "trenutno" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "posao %d je pokrenut bez kontrole nad njim" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: nedopuštena opcija -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opcija zahtijeva argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hash-tablica je onemogućena" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hash-tablica je prazna\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "pogodci\tnaredba\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Naredba koja odgovara ključnoj riječi „" +msgstr[1] "Naredbe koje odgovaraju ključnim riječima „" +msgstr[2] "Naredbi koje odgovaraju ključnim riječima „" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nisu pronađene teme pomoći za „%s“. Pokušajte s „help help“, „man -k %s“ ili " +"„info %s“." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: nije moguće otvoriti: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Ove bash naredbe su interno definirane. Upišite „help“ za prikaz popisa.\n" +"Upišite „help ime“ za više podataka o funkciji „ime“.\n" +"Koristite „info bash“ za više općenitih podataka o ljusci.\n" +"Koristite „man -k“ ili „info“ za više podataka o naredbama izvan ovog " +"popisa.\n" +"\n" +"Zvjezdica (*) pokraj imena označava onemogućenu naredbu.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "smije se rabiti samo jedna od opcija -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "mjesto u povijesti naredbi" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: nevaljani vremenski žig" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: proširenje povijesti nije uspjelo" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib nije uspio" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "nisu dopuštene druge opcije uz „-x“" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenti moraju biti ID-ovi procesa ili posla" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Nepoznata greška" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "očekivao se izraz" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: nije indeksirano polje" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: nevaljana specifikacija deskriptora datoteke" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: nevaljani deskriptor datoteke: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: nevaljani količina redaka" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: nevaljani početak polja" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: nevaljana količina od callback" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "prazno ime varijable polja" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "potrebna podrška varijable polja nije podržana u ovoj ljusci" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s“: nedostaje znak za format" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: nevaljana specifikacija za format vremena" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c“: nevaljani znak za format" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "upozorenje: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "greška pri analizi: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "nedostaje heksadecimalna znamenka za \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "nedostaje unicode znamenka za \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nema drugog direktorija" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: nevaljani argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "snop direktorija je prazan" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "indeks snopa direktorija" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Pokaže popis trenutno zapamćenih direktorija. Direktoriji se unose\n" +" na popis pomoću naredbe „pushd“, a s naredbom „popd“ se uklanjaju.\n" +"\n" +" Opcije:\n" +" -c počisti snop direktorija brisanjem svih elemenata\n" +" -l ispiše apsolutne staze direktorija u odnosu na osobni\n" +" direktorij (ne skraćuje staze upotrebom tilde)\n" +" -p ispiše sadržaj snopa po jedan direktorij po retku\n" +" -v kao „-p“, ali s prefiksom koji pokazuje\n" +" poziciju direktorija snopu\n" +"\n" +" Argumenti:\n" +" +N Pokaže N-ti direktorij iz snopa, brojeći od od nule s\n" +" lijeve strane popisa kȁd se „dirs“ pokrene bez opcija.\n" +" -N Pokaže N-ti direktorij iz snopa, brojeći od nule s\n" +" desne strane popisa kȁd se „dirs“ pokrene bez opcija." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Doda direktorij na vrh snopa direktorija ili zarotira snop tako da\n" +" učini novi vrh snopa trenutnim radnim direktorijem. Bez argumenata\n" +" razmijeni pozicije dva direktorija na vrhu snopa.\n" +"\n" +" Opcije:\n" +" -n izostavi uobičajenu promjenu direktorija kȁd dodaje\n" +" direktorije u snop, odnosno samo manipulira sa snopom\n" +"\n" +" Argumenti:\n" +" +N Zarotira snop tako, da N-ti direktorij u snopu (brojeći od nule " +"s\n" +" lijeve strane popisa prikazanoga s „dirs“) postane novi vrh " +"snopa.\n" +" -N Zarotira snop tako, da N-ti direktorij u snopu (brojeći od nule " +"s\n" +" desne strane popisa prikazanoga s „dirs“) postane novi vrh " +"snopa.\n" +" DIREKTORIJ Doda DIREKTORIJ na vrh snopa direktorija i\n" +" učini ga novim trenutnim radnim direktorijem.\n" +"\n" +" Naredba „dirs“ prikaže trenutni sadržaj snopa direktorija." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Ukloni direktorije iz snopa direktorija. Bez argumenata, ukloni\n" +" direktorij na vrhu snopa i premjesti se u novi najviši direktorij.\n" +"\n" +" Opcije:\n" +" -n izostavi uobičajenu promjenu direktorija kȁd uklanja\n" +" direktorije iz snopa, odnosno samo manipulira sa snopom\n" +"\n" +" Argumenti:\n" +" +N Ukloni da N-ti direktorij iz snopa brojeći od nule s lijeve\n" +" strane popisa prikazanoga s „dirs“. Na primjer: „popd +0“\n" +" ukloni prvi, a „popd +1“ ukloni drugi direktorij.\n" +" +N Ukloni da N-ti direktorij iz snopa brojeći od nule s desne\n" +" strane popisa prikazanoga s „dirs“. Na primjer.: „popd -0“\n" +" ukloni zadnji, a „popd -1“ ukloni predzadnji direktorij.\n" +"\n" +" Naredba „dirs“ prikaže trenutni sadržaj snopa direktorija." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: nevaljana specifikacija za istek vremena" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "greška pri čitanju: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "„return“ je mogući samo iz funkcije ili iz pokrenute skripte" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "nije moguće istovremeno poništiti funkciju i varijablu" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: nije varijabla polja" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: nije funkcija" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: nije moguće eksportirati" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "brojač pomaka" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "nije moguće istovremeno postaviti i poništiti opcije ljuske" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nevaljano ime za opciju ljuske" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "zahtijeva se ime datoteke kao argument" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: datoteka nije pronađena" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "obustava nije moguća" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "nije moguće obustaviti prijavnu ljusku" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s je alias za „%s“\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s je ključna riječ ljuske\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s je funkcija\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s je specijalna ugrađena funkcija ljuske\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s je ugrađena funkcija ljuske\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s je %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "za %s izračunata hash vrijednost (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: nevaljani argument za ograničenje" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c“: loša naredba" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: nije moguće dobiti ograničenje: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "ograničenje" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: nije moguće promijeniti ograničenje: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktalni broj" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c“: nevaljani operator u simboličkom načinu" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c“: nevaljani znak u simboličkom načinu" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " redak " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "posljednja naredba: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Prekida se..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "informacije: " + +#: error.c:462 +msgid "unknown command error" +msgstr "nepoznata greška naredbe" + +#: error.c:463 +msgid "bad command type" +msgstr "loša vrsta naredbe" + +#: error.c:464 +msgid "bad connector" +msgstr "loš konektor" + +#: error.c:465 +msgid "bad jump" +msgstr "loši skok" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: nepovezana varijabla" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\avrijeme čekanja na ulaz je isteklo: automatska-odjava\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "nije moguće preusmjeriti standardni ulaz iz /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: „%c“: nevaljani znak za format" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc(): coproc [%d:%s] još uvijek postoji" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "greška cijevi" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: prekoračena je dopuštena razina eval gniježđenja (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: prekoračena je dopuštena razina source gniježđenja (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: prekoračena je dopuštena razina gniježđenja funkcije (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: ograničeni način: znak „/“ nije dopušten u imenima naredba" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: naredba nije pronađena" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: loši interpreter" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: binarnu datoteku %s nije moguće pokrenuti/izvršiti" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s“ je specijalna funkcija ugrađena u ljusku" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "nije moguće kopirati deskriptor datoteke %d u deskriptor datoteke %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "izraz ima preveliki broj rekurzija" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "snop rekurzija je prazan" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "sintaktička greška u izrazu" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "vrijednost se može dodijeliti samo varijabli" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "sintaktička greška u zadavanju varijable" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "dijeljenje s 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "**interna greška** : loši token u izrazu za dodjelu" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "znak „:“ je nužan u uvjetnom izrazu" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "eksponent je manji od 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "nakon pre-increment ili pre-decrement očekuje se identifikator" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "nema „)“" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "sintaktička greška: očekivao se operand" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "sintaktička greška: nevaljani aritmetički operator" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (simbol greške je „%s“)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "nevaljana aritmetička baza" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: nevaljani količina redaka" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "vrijednost baze je prevelika" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: greška u izrazu\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd(): nije moguće pristupiti nadređenim direktorijima" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "ne može se onemogućiti nodelay način za deskriptor datoteke %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "nije moguće dodijeliti novi datotečni deskriptor za bash ulaz iz fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input(): međuspremnik već postoji za novi fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline(): pgrp pipe (procesna grupa cijevi)" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "potproces PID %d javlja se u pokrenutom poslu %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "uklanja se zaustavljeni posao %d s grupom procesa %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process(): PID %5ld (%s) označen kao još uvijek aktivan" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid(): %ld: PID ne postoji" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Gotovo" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Zaustavljeno" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Zaustavljeno(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Pokrenuto" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Gotovo(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Završi %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Nepoznati status" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(**krah**: stanje (dump) memorije je zapisano!) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "postavljanje procesne grupe %2$ld od potomka %1$ld" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: PID %ld nije potomak ove ljuske" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: nema zapisa o procesu %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: posao %d je zaustavljen" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: nema takvoga posla" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: posao je prekinut" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: posao %d je već u pozadini" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld(): omogući WNOHANG da se izbjegne neodređeno blokiranje" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: redak %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (**krah**: stanje (dump) memorije je zapisano!)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(radni direktorij je sada: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: neuspješni getpgrp()" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: nema kontrole nad pozadinskim poslovima" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: line discipline" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid()" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "nije moguće postaviti procesnu grupu (%d) terminala" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "nema kontrole nad poslovima u ovoj ljusci" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc(): neuspješni kontrolni test: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc(): %s:%d: loše provedena proba\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "nepoznato" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc(): prepisani je blok na popisu slobodne memorije" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free(): pozvan s argumentom za već slobodni memorijski blok" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free(): pozvan s argumentom za ne dodijeljeni memorijski blok" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free(): otkriveni je podljev, mh_nbytes ispod granica" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free(): otkriveni je podljev, mh_nbytes ispod granica" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free(): veličine segmenta od početka i kraja su različite" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc(): pozvan s argumentom za ne dodijeljeni memorijski blok" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc(): otkriveni je podljev, mh_nbytes ispod granica" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc(): otkriveni je podljev, mh_nbytes ispod granica" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc(): veličine segmenta od početka i kraja su različite" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc(): rezervacijska tablica je popunjena s FIND_ALLOC??\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc(): %p je već rezervirani u tablici??\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free(): %p je već slobodan u tablici??\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "nevaljana baza" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: nepoznato računalo" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: nevaljani servis" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: loša specifikacija za mrežnu stazu" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "mrežne operacije nisu podržane" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale(): LC_ALL: nije moguće promijeniti jezično područje (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale(): LC_ALL: nije moguće promijeniti jezično područje (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale(): %s: nije moguće promijeniti jezično područje (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale(): %s: nije moguće promijeniti jezično područje (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Imate poštu u $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Imate novu poštu u $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Pošta u %s je već pročitana\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "sintaktička greška: zahtijeva se aritmetički izraz" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "sintaktička greška: neočekivani „;“ znak" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "sintaktička greška: „((%s))“" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document(): loša vrsta instrukcije %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "redak %d od here-document ima za razdjelnik EOF (očekuje se „%s“)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection(): instrukcija za preusmjeravanje „%d“ je izvan raspona" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc(): shell_input_line_size (%zu) je veća od SIZE_MAX (%lu): " +"skraćuje se" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "maksimalni broj za here-document je prekoračeni" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "neočekivani EOF pri traženju odgovarajućeg „%c“" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "neočekivani EOF pri traženju „]]“" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "sintaktička greška u uvjetnom izrazu: neočekivani token „%s“" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "sintaktička greška u uvjetnom izrazu" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "neočekivani token „%s“ umjesto očekivane „)“" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "očekivana je „)“" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "neočekivani argument „%s“ uvjetnom unarnom operatoru" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "neočekivani argument za uvjetni unarni operator" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "neočekivani token „%s“; očekivan je uvjetni binarni operator" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "očekivan je uvjetni binarni operator" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "neočekivani argument „%s“ za uvjetni binarni operator" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "neočekivani argument za uvjetni binarni operator" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "neočekivani token „%c“ u uvjetnoj naredbi" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "neočekivani token „%s“ u uvjetnoj naredbi" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "neočekivani token %d u uvjetnoj naredbi" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "sintaktička greška blizu neočekivanog tokena „%s“" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "sintaktička greška blizu „%s“" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "sintaktička greška: neočekivani kraj datoteke" + +#: parse.y:6365 +msgid "syntax error" +msgstr "sintaktička greška" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Koristite \"%s\" da napustite ljusku.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "neočekivani EOF pri traženju odgovarajuće „)“" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion(): funkcija „%s“ nije pronađena" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion(): %s: moguća je beskonačna petlja" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert(): %s: prazni COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command(): loši konektor „%d“" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set(): %d: nevaljani deskriptor datoteke" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set(): prazni pokazivač na datoteku" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf(): „%c“: nevaljani znak za format" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "deskriptor datoteke je izvan raspona" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: višeznačno preusmjeravanje" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: nije moguće pisati preko postojeće datoteke" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ograničeno: nije moguće preusmjeriti izlaz" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "nije moguće napraviti privremenu datoteku za here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: nije moguće dodijeliti deskriptor datoteke varijabli" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port nije podržan bez umrežavanja" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "greška preusmjeravanja: nije moguće kopirati deskriptor datoteke" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "nije moguće pronaći /tmp; napravite taj direktorij!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp mora biti valjano ime direktorija" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "u interaktivnoj ljusci pretty-printing se ignorira" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: nevaljana opcija" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nije moguće postaviti UID na %d: efektivni UID je %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nije moguće postaviti GID na %d: efektivni GID je %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "nije moguće pokrenuti debugger; debugiranje je onemogućeno" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: to je direktorij" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Nemam ime!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, inačica %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uporaba: %s [GNU dugačka opcija] [opcija] ...\n" +" %s [GNU dugačka opcija] [opcija] skripta ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU dugačke opcije:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opcije ljuske:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD ili -c NAREDBA ili -O SHOPT-OPCIJA (samo za pokretanje)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ili -o opcija\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"„%s -c \"help set\"“ pokaže vam dodatne informacije o opcijama ljuske.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"„%s -c help set“ pokaže vam više informacija o ugrađenim funkcijama " +"ljuske.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Koristite naredbu „bashbug“ za prijavljivanje grešaka.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash Web stranica: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Općenita pomoć za korištenje GNU softvera: \n" +"Prijavite primjedbe i greške u prijevoda na lokalizacija@linux.hr/\n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask(): %d: nevaljana operacija" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Lažni signal" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Poklopi" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Prekini" + +#: siglist.c:58 +msgid "Quit" +msgstr "Završi" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Nedopuštena instrukcija" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trag/zamka instrukcija (Trace/Breakpoint trap)" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT instrukcija" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT instrukcija" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Iznimka (broja) s pomičnim zarezom" + +#: siglist.c:86 +msgid "Killed" +msgstr "Ubijen" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Greška sabirnice" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Segmentacijska greška" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Loši sustavski poziv" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Prekinuta cijev" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Budilica" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Završeno" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Hitno U/I stanje" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Zaustavljeno (signalom)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Nastavljanje" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Potomak-proces ubijen ili zaustavljen" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Zaustavljen (tty ulaz)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Zaustavljen (tty izlaz)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "U/I je spreman" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Ograničenje procesora" + +#: siglist.c:154 +msgid "File limit" +msgstr "Ograničenje datoteke" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtualni)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Prozor promijenjen" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Zapis zaključan" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Korisnički signal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Korisnički signal 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT ulazni podaci čekaju" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "nestanak struje je neizbježan" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "rušenje sustava je neizbježno" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "preseli proces na drugi procesor" + +#: siglist.c:198 +msgid "programming error" +msgstr "greška programiranja" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT nadzor dopušten" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT nadzor oduzet" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT sekvencija zvukova je završena" + +#: siglist.c:214 +msgid "Information request" +msgstr "Zahtjev za informacijom" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Nepoznati signal #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "loša supstitucija: nema zaključnoga „%s“ u %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: nije moguće dodijeliti popis elementu polja" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "nije moguće napraviti cijev za zamjenu procesa" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "nije moguće napraviti potomka za zamjenu procesa" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "nije moguće otvoriti imenovanu cijev %s za čitanje" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "nije moguće otvoriti imenovanu cijev %s za pisanje" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "nije moguće kopirati imenovanu cijev %s kao deskriptor datoteke %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "nevaljana supstitucija: ignorirani NULL bajt na ulazu" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "nije moguće napraviti cijev za zamjenu naredbi" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "nije moguće napraviti potomka za zamjenu naredbi" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" +"command_substitute(): nije moguće kopirati cijev kao deskriptor datoteke 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nevaljano ime varijable za naziv referencije" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: nevaljana indirektna ekspanzija" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "„%s“: nevaljano ime varijable" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametar nije postavljen" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: prazni parametar ili nije postavljen" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: rezultat od izraza dijela stringa < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: loša supstitucija" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: nije moguće dodijeliti na ovaj način" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"buduće inačice ljuske će prisiliti procjenu kao aritmetičku supstituciju" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "loša supstitucija: nema zaključnoga znaka „`“ u %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "nema podudaranja: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "očekuje se argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: očekuje se cijelo brojni izraz" + +#: test.c:265 +msgid "`)' expected" +msgstr "očekivana je „)“" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "očekuje se „)“, nađen %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: očekivan je binarni operator" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: očekivan je unarni operator" + +#: test.c:881 +msgid "missing `]'" +msgstr "nedostaje „]“" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "sintaktička greška: neočekivani „;“ znak" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "nevaljani broj za signal" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: prekoračena je dopuštena razina gniježđenja (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps(): loša vrijednost u trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signalom manipulira SIG_DFL, opet šalje %d (%s) na samoga " +"sebe" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler(): loši signal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "greška pri importiranju definicije funkcije za „%s“" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "razina ljuske (%d) je previsoka, vraća se na 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable(): u trenutnom području nema konteksta funkcije" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: varijabli se ne može dodijeliti vrijednost" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: nazivu referencije se pripisuje cijeli broj" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables(): u trenutnom području nema konteksta funkcije" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "*** %s ima prazni exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "*** nevaljani znak %d u exportstr za %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "*** nema „=“ u exportstr za %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context(): vrh od „shell_variables“ nije funkcijski kontekst" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context(): nije „global_variables“ kontekst" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope(): vrh od „shell_variables“ nije privremeni kontekst okoline" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: nije moguće otvoriti kao DATOTEKU" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: nevaljana vrijednost za praćenje deskriptora datoteke" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s vrijednost za kompatibilnost je izvan raspona" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright © 2009 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licencija:\n" +"GPLv3+: GNU GPL inačica 3 ili novija \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, inačica %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Ovo je slobodan softver: slobodno ga mijenjajte i dijelite." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "NEMA JAMSTVA do granica dopuštenih zakonom." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: nije moguće dodijeliti %lu bajtova (dodijeljeno je %lu bajtova)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: nije moguće dodijeliti %lu bajtova" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" +"%s: %s:%d: nije moguće dodijeliti %lu bajtova (dodijeljeno je %lu bajtova)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: nije moguće dodijeliti %lu bajtova" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [IME[=VRIJEDNOST]... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] IME..." + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m TIPKOVNICA] [-f DATOTEKA] [-q IME] [-u IME]\n" +" [-r PREČAC] [-x PREČAC:SHELL_NAREDBA]\n" +" [PREČAC:READLINE_FUNKCIJA | READLINE_NAREDBA]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [N]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [N]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [UGRAĐENA_SHELL_FUNKCIJA [ARGUMENT...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [IZRAZ]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [DIREKTORIJ]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] NAREDBA [ARGUMENT...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [IME[=VRIJEDNOST]...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] IME[=VRIJEDNOST]..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [OPCIJA] IME[=VRIJEDNOST]..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [ARGUMENT...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [ARGUMENT...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f DATOTEKA] [IME...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [ARGUMENT...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts OPCIJA_STRING IME [ARGUMENT]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a IME] [NAREDBA [ARGUMENT...]] [PREUSMJERAVANJE...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [N]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [N]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e EDITOR] [-lnr] [PRVA] [ZADNJA] ili: fc -s [UZORAK=ZAMJENA] [NAREDBA]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [JOBSPEC]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [JOBSPEC...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p IME_STAZE] [-dt] [IME...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [UZORAK ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d POZICIJA] [N]\n" +" ili: history -anrw [DATOTEKA]\n" +" ili: history -ps ARGUMENT..." + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [JOBSPEC...] ili: jobs -x NAREDBA [ARGUMENT...]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [JOBSPEC... | PID...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s SIGSPEC | -n SIGNUM | -SIGSPEC] pid | JOBSPEC\n" +" ili: kill -l [SIGSPEC]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let ARGUMENT..." + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a POLJE] [-d MEĐA] [-i TEKST] [-p PROMPT]\n" +" [-n BROJ_ZNAKOVA] [-N BROJ_ZNAKOVA] [-t SEKUNDA]\n" +" [-u FD] [IME...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [N]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o IME_OPCIJE] [--] [ARGUMENT...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [IME...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [IME[=VRIJEDNOST]...] ili: export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [IME[=VRIJEDNOST]...] ili: readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [N]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source DATOTEKA [ARGUMENTI]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". DATOTEKA [ARGUMENTI]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [IZRAZ]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ ARGUMENT... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[ARGUMENT] SIGNAL_SPEC...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] IME..." + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [LIMIT]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [MODE]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [ID...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [PID...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for IME [in RIJEČIMA...]; do NAREDBE; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( IZRAZ_1; IZRAZ_2; IZRAZ_3 )); do NAREDBE; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select IME [in RIJEČIMA...;]; do NAREDBE; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] CJEVOVOD" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case RIJEČ in [UZORAK [| UZORAK]...) NAREDBE;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if NAREDBE; then NAREDBE; [elif NAREDBE; then NAREDBE;]... [else NAREDBE;]\n" +" fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while NAREDBE; do NAREDBE; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until NAREDBE; do NAREDBE; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [IME] NAREDBA [PREUSMJERAVANJA]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function IME {NAREDBE;} ili: IME () {NAREDBE;}" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ NAREDBE; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "JOBSPEC [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( IZRAZ ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "(( IZRAZ ))" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "varijable — imena i značenje nekih varijabla ljuske" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | DIREKTORIJ]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [IME_OPCIJE...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v VARIJABLA] FORMAT [ARGUMENTI]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPCIJA] [-A AKCIJA]\n" +" [-C NAREDBA] [-F FUNCIJA] [-G GLOB_UZORAK] [-P PREFIKS]\n" +" [-S SUFIKS] [-W POPIS_RIJEČI] [-X FILTAR_UZORAKA] [IME...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o OPCIJA] [-A AKCIJA] [-C NAREDBA]\n" +" [-F FUNCIJA] [-G GLOB_UZORAK] [-P PREFIKS] [-S SUFIKS]\n" +" [-W POPIS_RIJEČI] [-X FILTAR_UZORAKA] [RIJEČ]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o OPCIJA] [-DEI] [IME...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d MEĐA] [-n BROJ] [-O POČETAK] [-s BROJ] [-t] [-u FD]\n" +" [-C FUNKCIJA] [-c TOLIKO] [POLJE]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d DELIM] [-n BROJ] [-O POČETAK] [-s BROJ] [-t] [-u FD]\n" +" [-C FUNKCIJA] [-c TOLIKO] [POLJE]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definira ili prikaže aliase.\n" +"\n" +" Bez argumenata, „alias“ ispiše popis aliasa na standardni izlaz u\n" +" iskoristivom formatu: alias IME='ZAMJENA'.\n" +" S argumentima, alias je definirani za svako IME za koje je dȃna\n" +" ZAMJENA. Ako ZAMJENA završi s razmakom (bjelinom), onda pri ekspanziji\n" +" alias provjeri je li je i sljedeća riječ alias.\n" +"\n" +" Završi s kȏdom 0 osim ako nije definirani alias za dȃno IME." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Ukloni svako dȃno IME iz popisa definiranih aliasa.\n" +"\n" +" S opcijom „-a“ izbriše sve definirane aliase.\n" +"\n" +" Završi s uspjehom osim ako IME nije postojeći alias." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Odredi i postavi „readline“ prečace i varijable.\n" +"\n" +" Poveže sekvencije tipki (prečace) na „readline“ funkciju, ili makro ili\n" +" „readline“ varijablu. Sintaksa argumenta koji nije opcija je ista kao\n" +" u ~/.inputrc, ali mora biti proslijeđeni kao pojedinačni argument,\n" +" na primjer: '\"\\C-x\\C-r\": re-read-init-file'.\n" +"\n" +" Opcije:\n" +" -f DATOTEKA pročita prečace iz ove DATOTEKE\n" +" -l izlista sve poznate funkcije\n" +" -m TIPKOVNICA koristi ovu TIPKOVNICU dok traje ova naredba;\n" +" moguće TIPKOVNICE su emacs, emacs-standard,\n" +" emacs-meta, emacs-ctlx, vi, vi-move, vi-command,\n" +" i vi-insert.\n" +" -P izlista imena funkcija i prečaca\n" +" -p ispiše imena funkcija i prečaca u formatu\n" +" koji se može iskoristiti kao ulaz\n" +" -r PREČAC ukloni sekvenciju tipki za ovaj prečac\n" +" -q FUNKCIJA pokaže tipke koje pozivaju ovu FUNKCIJU\n" +" -S pokaže sekvencije tipki poje pozivaju makroe\n" +" s njihovim vrijednostima\n" +" -s ispiše sekvencije tipki poje pozivaju makroe s\n" +" njihovim vrijednostima u formatu koji se može\n" +" iskoristiti kao ulaz\n" +" -u FUNKCIJA poništi sve prečace vezane na ovu FUNKCIJU\n" +" -V izlista imena varijabli s njihovim vrijednostima\n" +" -v ispiše imena varijabli s njihovim vrijednostima\n" +" u formatu koji se može iskoristiti kao ulaz\n" +" -x PREČAC:SHELL_NAREDBA učini da se izvrši ova SHELL_NAREDBA kȁd god\n" +" se unese taj PREČAC (sekvencija tipki)\n" +" -X ispiše prečace (sekvencije tipki) vezane s „-x“ i\n" +" njima pridružene naredbe u formatu koji se može\n" +" iskoristiti kao ulaz\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna neprepoznata opcija\n" +" ili se dogodila greška." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Izlaz iz for, while ili until petlji.\n" +"\n" +" Ako je dȃn N, ukida se N ugnježđenih petlji.\n" +"\n" +" Završi s kȏdom 0 osim ako je N manji od 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Nastavlja sljedeću iteraciju ugnježđenih for, while ili until petlji.\n" +" Ako je dȃn N, nastavlja se N-tom ugnježđenom petljom.\n" +"\n" +" Završi s kȏdom 0 osim ako je N manji od 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Izvrši ugrađenu funkciju ljuske (shell builtins).\n" +"\n" +" Izvrši dȃnu UGRAĐENU_SHELL_FUNKCIJU (SHELL-BUILTIN) funkciju s dȃnim\n" +" ARGUMENTIMA. To je korisno ako želite redefinirati implementaciju\n" +" ugrađene shell funkcije kao vlastitu shell funkciju (skriptu s istim\n" +" imenom kao ugrađena shell funkcija), a potrebna vam je funkcionalnost\n" +" te ugrađene shell funkcije unutar vaše vlastite skripte (shell " +"funkcije).\n" +"\n" +" Završi s kȏdom UGRAĐENE_SHELL_FUNKCIJE ili s kȏdom 1 ako\n" +" UGRAĐENA_SHELL_FUNKCIJA nije ugrađene funkcija ljuske (shell builtin)." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Vrati kontekst trenutnog poziva potprogramu.\n" +"\n" +" Bez IZRAZA, vrati „$line $filename“. Ako je dȃn IZRAZ, vrati\n" +" „$line $subroutine $filename“; ova dodatna informacija može poslužiti\n" +" za „stack trace“.\n" +"\n" +" Vrijednost IZRAZA pokazuje koliko se treba vratiti unatrag od\n" +" trenutne pozicije, s time da je pozicija 0 trenutna pozicija.\n" +"\n" +" Završi s kȏdom 0 osim ako ljuska ne izvršava ljuskinu funkciju\n" +" ili je IZRAZ nevaljani." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Promjeni trenutni direktorij.\n" +"\n" +" Promijeni trenutni direktorij u dȃni DIREKTORIJ. Zadano, DIREKTORIJ\n" +" je vrijednost varijable HOME.\n" +"\n" +" Varijabla CDPATH definira staze (direktorije) po kojima se\n" +" traži dȃni DIREKTORIJ.\n" +"\n" +" Nazivi direktorija (staza) u CDPATH su razdvojeni s dvotočkom (:);\n" +" prazni naziv za direktorij je isto kao i trenutni direktorij (.).\n" +" Ako dȃni DIREKTORIJ započinje s kosom crtom (/), onda se CDPATH\n" +" ne koristi.\n" +"\n" +" Ako se dȃni direktorij ne pronađe, a omogućena je opcija „cdable_vars“,\n" +" tada se dȃna riječ uzme kao ime varijable; ako ta varijabla sadrži\n" +" naziv, „cd“ prijeđe u direktorij s tim nazivom.\n" +"\n" +" Opcije:\n" +" -L slijedi simboličke veze; simboličke veze u DIREKTORIJu\n" +" razriješi nakon procesiranja „..“ instancije DIREKTORIJa;\n" +" opcija „-L“ je aktivna u zadanom (početnom) stanju\n" +" -P rabi fizičku strukturu direktorija umjesto da slijedi\n" +" simboličke veze; simboličke veze DIREKTORIJa\n" +" razriješi prije procesiranja „..“ instancije DIREKTORIJa\n" +" -e ako je dȃna s opcijom „-P“, i trenutni radni direktorij nije\n" +" moguće uspješno odrediti nakon uspješne promjene direktorija,\n" +" „cd“ završi s kȏdom različitim od 0.\n" +" -@ opiše proširene atribute povezane s datotekom kao direktorij\n" +" koji sadrži atribute datoteke (ako sustav to podržava)\n" +"\n" +" Token „..“ se procesira uklanjanjem komponente staze koja mu neposredno\n" +" prethodi unatrag do kose crte „/“ ili do početka DIREKTORIJA.\n" +"\n" +" Završi s kȏdom 0 ako je direktorij promijenjen i ako je\n" +" varijabla okoline PWD uspješno postavljena kȁd je dȃna opcija „-P“;\n" +" u suprotnom završi s kȏdom 1." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Ispiše ime trenutnog radnog direktorija.\n" +"\n" +" Opcije:\n" +" -L ispiše vrijednost od $PWD ako sadrži trenutni radni direktorij\n" +" -P ispiše stvarnu fizičku stazu do direktorija bez simboličkih veza\n" +"\n" +" U zadanom stanju „pwd“ se ponaša kao da je aktivna „-L“ opcija.\n" +"\n" +" Završi s kȏdom 0 osim ako nije dȃna nevaljana opcija\n" +" ili se trenutni radni direktorij ne može pročitati." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "Naredba nema nikakvog efekta, ne radi ništa; uvijek završi s kȏdom 0." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "Uvijek završi uspješno s kȏdom 0." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "Uvijek završi neuspješno s kȏdom 1." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Izvrši jednostavnu naredbu ili pokaže informacije o naredbama.\n" +"\n" +" Izvrši dȃnu NAREDBU s dȃnim ARGUMENTIMA ignorirajući pritom bilo\n" +" koju funkciju ljuske s istim imenom (naredba). Može se koristiti da\n" +" pokrenete naredbu na disku i onda kȁd postoji funkcija s istim imenom.\n" +"\n" +" Opcije:\n" +" -p rabi zadanu vrijednost za PATH kao garanciju\n" +" pronalaženja svih standardnih programa\n" +" -v ispiše opis NAREDBE, slično kao „type“ builtin\n" +" -V ispiše opširniji opis svake dȃne NAREDBE\n" +"\n" +" Završi s izlaznim statusom NAREDBE\n" +" ili s 1 ako NAREDBA nije pronađena." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Postavlja vrijednosti i atribute varijablama.\n" +"\n" +" Deklarira varijable i dodjeljuje im atribute. Ako IMEna nisu dȃna,\n" +" prikaže atribute i vrijednosti svih varijabli.\n" +"\n" +" Opcije:\n" +" -f prikaže samo definirane funkcije (ne pokaže varijable)\n" +" -F prikaže samo imena funkcija bez definicija\n" +" -g kreira globalne varijable samo za upotrebu u funkciji ljuske;\n" +" inače se ignoriraju\n" +" -p prikaže atribute i vrijednost za svako dȃno IME\n" +"\n" +" Atributi:\n" +" -a učini od dȃnih IMEna indeksirana polja (ako je to podržano)\n" +" -A učini od dȃnih IMEna asocijativna polja (ako je to podržano)\n" +" -i učini da dȃna IMEna dobiju „integer“ svojstva\n" +" -l pretvori slova dȃnih IMEna u mala slova prilikom upotrebe\n" +" -n učini dȃno IME referencijom na drugu varijablu s imenom\n" +" jednakim „vrijednost od varijable IME“\n" +" -r učini dȃna IMEna readonly\n" +" -t učini da dȃna IMEna dobiju „trace“ svojstva\n" +" -u pretvori slova dȃnih IMEna u velika slova prilikom upotrebe\n" +" -x označi dȃna IMEna za ekport\n" +"\n" +" „+“ umjesto „-“ isključi dȃni atribut.\n" +"\n" +" Varijable s „integer“ atributom obavljaju aritmetičke operacije tijekom\n" +" izvođenja i upotrebe (pogledajte „let“ naredbu).\n" +"\n" +" Unutar funkcije „declare“ učini dȃna IMEna lokalnima, slično kao\n" +" naredba „local“. Opcija „-g“ spriječi takvo ponašanje.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili se dogodila greška prilikom zadavanja varijabli." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Postavi vrijednosti i svojstva varijabli.\n" +"\n" +" Sinonim za „declare“. Za detalje upišite „help declare“." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definira lokalne varijable.\n" +"\n" +" Kreira lokalnu varijablu IME i dodijeli joj vrijednost. OPCIJA\n" +" može biti bilo koja od opcija koju prihvaća naredba „declare“.\n" +"\n" +" Lokalne varijable mogu se koristiti samo unutar neke funkcije a\n" +" vidljive su samo funkciji u kojoj su definirane i njezinim potomcima.\n" +"\n" +" Završi s kȏdom 0 osim ako su dȃne nevaljane opcije,\n" +" dogodila se greška pri dodijeli ili ljuska ne izvrši funkciju." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Dȃne argumente ispiše na standardni izlaz.\n" +"\n" +" Ispiše dȃne argumente na standardni izlaz, međusobno odvojene s\n" +" jednim razmakom (bjelinom) i na kraju s novim retkom.\n" +"\n" +" Opcije:\n" +" -n ne pripoji novi redak (znak novog retka)\n" +" -e interpretira sljedeće sekvencije maskirane\n" +" s obratnom kosom crtom (backslash escapes)\n" +" -E ne interpretira sekvencije maskirane\n" +" s obratnom kosom crtom (backslash escapes)\n" +"\n" +" „echo“ interpretira ove kontrolne kodove (sekvencije maskirane\n" +" s obratnom kosom crtom — backslash escapes):\n" +" \\a alert (zvučni signal)\n" +" \\b backspace\n" +" \\c spriječi daljni izlaz\n" +" \\e znak za escape (ESC)\n" +" \\E znak za escape (ESC)\n" +" \\f nova stranica (znak za FF, form feed)\n" +" \\n novi redak (znak za LF, line feed)\n" +" \\r na početak novoga retka (Enter, znak za CR, carriage return)\n" +" \\t horizontalni tabulator\n" +" \\v vertikalni tabulator\n" +" \\\\ backslash (\\)\n" +" \\0NNN znak s ASCII kȏdom NNN (oktalni, 1 do 3 oktalne znamenke)\n" +" \\xHH osmobitni znak čija je vrijednost HH (heksadecimalna)\n" +" \\uHHHH unikodni znak čija je vrijednost HHHH (heksadecimalna)\n" +" HHHH može biti od 1 do 4 heksadecimalne znamenke\n" +" \\UHHHHHHHH unikodni znak čija je vrijednost HHHH (heksadecimalna)\n" +" HHHHHHHH može biti od 1 do 8 heksadecimalnih znamenki\n" +"\n" +" Završi s kȏdom 0 osim ako se ne dogodi greška pri pisanju." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Ispiše argumente na standardni izlaz.\n" +"\n" +" Prikaže ARGUMENTE na standardnom izlazu (pripoji im znak za novi " +"redak).\n" +" Opcijom „-n“ može se isključiti pripajanje znaka za novi redak.\n" +"\n" +" Završi s kȏdom 0 ako se ne dogodi greška pri pisanju." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Omogući ili onemogući ugrađene opcije ljuske.\n" +"\n" +" Aktivira i deaktivira ugrađene opcije ljuske. Deaktiviranje vam\n" +" omogućava pokrenuti naredbu na disku s istim imenom kao ugrađena\n" +" komanda bez potrebe specificiranja kompletne staze.\n" +"\n" +" Opcije:\n" +" -a ispiše ugrađene naredbe i pokaže jesu ili nisu omogućene\n" +" -n onemogući IMEnovane naredbe ili izlista onemogućene naredbe\n" +" -p generira izlaz koji se može koristi za ulaz (zadano)\n" +" -s ispiše samo imena specijalnih POSIX ugrađenih naredbi\n" +"\n" +" Opcije koje upravljaju dinamičko učitavanje:\n" +" -f učita ugrađenu naredbu IME iz dijeljenoga objekta DATOTEKA\n" +" -d ukloni ugrađenu naredbu učitanu s „-f“\n" +"\n" +" Bez opcija, omogućena su sva dȃna IMEna. Bez imena prikazane su\n" +" omogućene naredbe (ili s „-n“ onemogućene).\n" +"\n" +" Primjer: da koristite binarnu datoteku „test“ koja se nalazi na putu\n" +" pretraživanja PATH, umjesto ugrađene (test) naredbe, upišite\n" +" „enable -n test“.\n" +"\n" +" Završi s kȏdom 0 osim ako IME nije ugrađena naredba\n" +" ili se nije dogodila greška." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Izvrši argumente kao naredbu ljuske.\n" +"\n" +" Združi argumente u jedinstveni string, upotrijebi ga kao ulaz za ljusku\n" +" i izvrši rezultirajuću naredbu.\n" +"\n" +" Završi s kȏdom naredbe ili uspješno ako je naredba prazna." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Analiza argumenata opcija.\n" +"\n" +" Procedure ljuske koriste „getopts“ za analizu položajnih parametara\n" +" kao opcije.\n" +" \n" +" OPCIJA_STRING sadrži slova opcije koje treba prepoznati; ako iza\n" +" slova slijedi dvotočka, očekuje se da opcija ima argument koji treba\n" +" biti bjelinom odvojen od opcije.\n" +"\n" +" Svaki put kȁd se pozove, getopts će smjestiti sljedeću opciju u " +"ljuskinu\n" +" varijablu IME (ako IME ne postoji, getopts ga inicijalizira), a indeks\n" +" sljedećeg argumenta koji treba procesirati u ljuskinu varijablu OPTIND.\n" +" OPTIND je inicijaliziran na 1 pri svakom pozivanju ljuske ili ljuskine\n" +" skripte. Ako opcija zahtijeva argument, getopts smjesti taj argument u\n" +" ljuskinu varijablu OPTARG.\n" +"\n" +" getopts javlja greške na jedan od dva načina. Ako je dvotočka prvi znak " +"u\n" +" OPCIJA_STRING, getopts tiho prijavi grešku (ne ispisuje poruke o " +"greškama).\n" +" Ako naiđe na nevaljanu opciju, getopts smjesti nađeni znak opcije u " +"OPTARG.\n" +" Ako zahtijevani argument nije pronađen, getopts smjesti „:“ u IME i " +"postavi\n" +" OPTARG na pronađeni znak opcije. Ako getopts ne radi tiho i naiđe na\n" +" nevaljanu opciju, getopts smjesti „?“ u IME i poništi OPTARG.\n" +" Ako zahtijevani argument nije pronađen, getopts smjesti „?“ u IME, " +"poništi\n" +" OPTARG i ispiše poruku o greškama.\n" +"\n" +" Ako ljuskina varijabla OPTERR ima vrijednost 0, getopts onemogući ispis\n" +" poruka o greškama, čak i kȁd prvi znak u OPCIJA_STRING nije dvotočka.\n" +" Zadano, OPTERR ima vrijednost 1.\n" +"\n" +" Obično getopts analizira položajne parametre ($0 - $9), ali ako je\n" +" dȃno više argumenata, onda analizira te argumente.\n" +"\n" +" Završi s kȏdom 0 ako pronađe opciju; ako naiđe na kraj opcija\n" +" ili ako se dogodi greška, završi s neuspjehom." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Zamjeni ljusku s dȃnom naredbom.\n" +"\n" +" Izvrši dȃnu NAREDBU, zamijenivši ovu ljusku s ovim programom.\n" +" Eventualni ARGUMENTI postanu argumenti NAREDBE. Ako NAREDBA nije\n" +" specificirana, sva preusmjeravanja se dogode u trenutnoj ljusci.\n" +"\n" +" Opcije:\n" +" -a IME dȁde IME kao nulti argument NAREDBI\n" +" -c izvrši NAREDBU u praznoj okolini\n" +" -l smjesti spojnicu („-“) kao nulti argument NAREDBI\n" +"\n" +" Ako se naredba ne može izvršiti, ne-interaktivna ljuska završi,\n" +" osim ako je aktivna opcija ljuske „execfail“.\n" +"\n" +" Završi s kȏdom 0, osim ako NAREDBA nije pronađena,\n" +" ili se dogodila greška preusmjeravanja." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Izlaz iz ljuske.\n" +"\n" +" Završi s kȏdom N. Bez N završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Izlaz iz prijavne ljuske.\n" +"\n" +" Završi s kȏdom N. Završi s greškom ako to nije prijavna ljuska." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Prikaže ili izvrši naredbe iz popisa povijesti.\n" +"\n" +" Koristi se za prikazivanje dosadašnjih, za uređivanje, ili za ponovno\n" +" pokretanje naredbi. PRVA i ZADNJA mogu biti brojevi koji specificiraju\n" +" raspon, ili PRVA može biti string koji pokazuje na posljednju naredbu\n" +" čije ime započinje sa stringom.\n" +"\n" +" Opcije:\n" +" -e EDITOR ime EDITORA koji će se koristi; zadano, koristi se FCEDIT,\n" +" zatim EDITOR ili konačno „vi“\n" +" -l izlista popis naredbi (umjesto uređivanja)\n" +" -n popis bez brojeva\n" +" -r popis s obrnutim redoslijedom (najnovija prvo)\n" +"\n" +" Prikladni alias s ovom funkcijom je r='fc -s'. Tako uneseni „r“ izvrši\n" +" ponovno posljednju naredbu, a uneseni „r cc“ izvrši posljednju naredbu\n" +" koja započinje s „cc“.\n" +"\n" +" Završi s kȏdom izvršene naredbe; različito od 0 ako se dogodi greška." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Premjesti posao u interaktivni način.\n" +"\n" +" Smjesti posao JOBSPEC u interaktivni način i učini ga\n" +" trenutnim poslom. Bez dȃnoga JOBSPEC, ljuska rabi svoj pojam\n" +" o trenutnom poslu.\n" +"\n" +" Završi s kȏdom naredbe smještene u interaktivni način\n" +" ili s neuspjehom ako se dogodi greška." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Premjesti poslove u pozadinu.\n" +"\n" +" Smjesti poslove idenificirane sa svakim JOBSPEC u pozadinu, kao da su\n" +" pokrenuti s „&“. Bez dȃnih JOBSPEC, ljuska rabi svoj pojam\n" +" o trenutnom poslu.\n" +"\n" +" Završi s kȏdom 0 osim ako kontrola nad poslovima nije omogućena\n" +" ili se dogodila greška." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Zapamti ili prikaže lokacije programa.\n" +"\n" +" Odredi i zapamti apsolutnu stazu za svaku naredbu IME. Ako nisu\n" +" dȃni argumenti, prikaže informacije o zapamćenim naredbama.\n" +"\n" +" Opcije:\n" +" -d zaboravi zapamćene lokacije za svako IME\n" +" -l generira izlaz koji se može koristi za ulaz\n" +" -p IME_STAZE rabi IME_STAZE kao kao apsolutnu stazu za IME\n" +" -r zaboravi sve zapamćene lokacije\n" +" -t ispiše zapamćene lokacije za svako IME\n" +" (s prefiksom IME ako je dȃno više IMEna)\n" +" Svako dȃno IME se traži u $PATH i doda se popisu zapamćenih\n" +" naredbi.\n" +"\n" +" Završi s kȏdom 0 osim ako nije pronađeno IME\n" +" ili je dȃna nevaljana opcija." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Prikaže informacije o ugrađenim (builtin) naredbama.\n" +"\n" +" Prikaže kratke sažetke o ugrađenim naredbama. Ako je specificirani\n" +" UZORAK, pokaže detaljnu pomoć za sve naredbe koje podudare UZORAK,\n" +" inače ispiše popis tema za koje možete potražiti detalje.\n" +"\n" +" Opcije:\n" +" -d ukratko opisano djelovanje naredbe\n" +" -m prikaže uporabu u pseudo manpage formatu\n" +" -s prikaže samo sinopsis uporabe za svaku\n" +" naredbu koja podudara UZORAK\n" +"\n" +" Završi s kȏdom 0 osim ako UZORAK nije pronađen,\n" +" ili je dȃna nevaljana opcija." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Prikaže ili manipulira povijest naredbi.\n" +"\n" +" Prikaže numerirani popis izvršenih naredbi (povijest); ispred\n" +" modificiranih stavki stoji prefiks „*“. Ako je dȃn argument N,\n" +" ispiše N najmlađih (zadnjih) redaka povijesti.\n" +"\n" +" Opcije:\n" +" -c počisti povijest iz memorije; zaboravi sve izvršene naredbe\n" +" -d POZICIJA izbriše redak povijesti na POZICIJI\n" +"\n" +" -a pripoji trenutnu povijest „povijesnoj“ datoteci\n" +" -n pripoji sve nepročitane retke povijesne datoteke\n" +" trenutnom popisu povijesti\n" +" -r pročita i pripoji povijesnu datoteku\n" +" trenutnom popisu povijesti\n" +" -w trenutnu povijest zapiše u povijesnu datoteku\n" +"\n" +" -p proširi povijest na svakom ARGUMENTU i prikaže rezultat\n" +" bez spremanja u povijesni popis\n" +" -s Pripoji ARGUMENTe popisu povijesti kao pojedinačne stavke \n" +"\n" +" Kao povijesna datoteka koristi se DATOTEKA ako je dȃna; ako nije dȃna,\n" +" koristi se varijabla HISTFILE (ako ima vrijednost), inače se koristi\n" +" ~/.bash_history.\n" +"\n" +" Ako HISTTIMEFORMAT varijabla postoji i nije nula, njezinu vrijednost\n" +" koristi strftime(3) kao format string za ispis vremenskih oznaka\n" +" povijesnih stavki; inače, vremenske oznake se ne ispisuju.\n" +"\n" +" Završi s statusom 0 osim ako nije dȃna nevaljana opcija\n" +" ili se dogodila greška." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Prikaže status poslova.\n" +"\n" +" Izlista aktivne poslove. JOBSPEC ograniči izlaz na taj posao.\n" +" Bez opcija, prikaže status svih aktivnih poslova.\n" +"\n" +" Opcije:\n" +" -l pokaže i ID-ove procesa uz uobičajene informacije\n" +" -n pokaže samo procese koji su se promijenili od zadnjeg izvješća\n" +" -p pokaže samo ID-ove procesa\n" +" -r ograniči izlaz samo na trenutno pokrenute poslove\n" +" -s ograniči izlaz samo na zaustavljene poslove\n" +"\n" +" Ako je dȃna opcija -x, „jobs“ zamijeni svaki JOBSPEC\n" +" pronađen u NAREDBI ili u ARGUMENTIMA s odgovarajućim\n" +" ID-om procesne grupe i izvrši NAREDBU s ARGUMENTIMA.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija ili se dogodila " +"greška.\n" +" Ako je dȃna opcija -x, završi sa izlaznim statusom NAREDBE." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Ukloni poslove iz trenutne ljuske.\n" +"\n" +" Ukloni svaki JOBSPEC argument iz tablice aktivnih poslova.\n" +" Bez ikakvih JOBSPEC ljuska rabi svoj pojam o trenutnom\n" +" poslu.\n" +"\n" +" Opcije:\n" +" -a ukloni sve poslove ako nije dȃni JOBSPEC\n" +" -h označi svaki JOBSPEC tako da se SIGHUP ne šalje\n" +" poslu ako ljuska primi SIGHUP\n" +" -r ukloni samo pokrenute poslove\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili nije dȃni JOBSPEC." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Pošalje signal poslu.\n" +"\n" +" Pošalje signal dȃn u SIGSPEC ili SIGNUM procesima koji su\n" +" identificirani s PID-om ili s JOBSPEC. Ako nije\n" +" dȃn nijedan signal (ni SIGSPEC ni SIGNUM), pošalje se SIGTERM.\n" +"\n" +" Opcije:\n" +" -s IME IME je ime signala koji se šalje\n" +" -n BROJ BROJ je broj signala koji se šalje\n" +" -l izlista imena dostupnih signala; ako su dȃni argumenti iza\n" +" „-l“, to su brojevi signala čija odgovarajuća imena\n" +" treba ispisati\n" +" -L isto kao -l\n" +"\n" +" „kill“ je ugrađena ljuskina naredba iz dva razloga: dopušta vam da se\n" +" koristi ID posla umjesto ID procesa i također vam dopušta ubiti procese\n" +" iako ste dostigli vaše ograničenje broja procesa koje možete kreirati;\n" +" tj. ne morate pokrenuti novi proces da ubijete prekobrojne procese.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili se dogodila greška." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Evaluira aritmetičke izraze.\n" +"\n" +" Evaluira svaki ARGUMENT kao aritmetički izraz. Evaluacija se\n" +" obavlja za cijele brojeve fiksne širine bez provjere prelijevanja.\n" +" Ipak, dijeljenje s nulom se detektira i prijavi kao greška.\n" +"\n" +" Popis koji slijedi opisuje operatore s jednakim prioritetom u\n" +" istoj grupi, a grupe su poredane po opadajućemu prioritetu.\n" +"\n" +" var++, var-- post-increment, post-decrement varijable\n" +" ++var, --var pre-increment, pre-decrement varijable\n" +" -, + unarni minus, unarni plus\n" +" !, ~ logička i bitovska negacija\n" +" ** potenciranje\n" +" *, /, % množenje, dijeljenje, ostatak dijeljenja\n" +" +, - zbrajanje, oduzimanje\n" +" <<, >> pomak za bit ulijevo i udesno\n" +" <=, >=, <, > usporedba\n" +" ==, != jednako, nejednako\n" +" & bitovski AND\n" +" ^ bitovski XOR\n" +" | bitovski OR\n" +" && logički AND\n" +" || logički OR\n" +"\n" +" expr ? expr : expr uvjetni izraz\n" +"\n" +" =, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |= pridruživanje\n" +"\n" +" Varijable ljuske su dopuštene kao parametri. Ime varijable se zamijeni\n" +" s njezinom vrijednošću (ako treba, pretvori se u cijeli broj).\n" +" Varijable, za upotrebu u izrazima, ne moraju imati atribut cijelog\n" +" broja.\n" +"\n" +" Operatori se evaluiraju prema pravilima prioriteta. Najprije se\n" +" evaluiraju pod-izrazi u zagradama i tako mogu prevagnuti nad gore\n" +" opisanim pravilima prioriteta.\n" +"\n" +" Ako zadnji ARGUMENT evaluira na 0 (nula), „let“ završi s kȏdom 1;\n" +" inače završi s kȏdom 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Pročita redak iz standardnoga ulaza i razdijeli ga na polja.\n" +"\n" +" Pročita jedan redak iz standardnoga ulaza (ili dȃnoga deskriptora " +"datoteke\n" +" FD ako je dȃna opcija „-u“) i dodijeli prvu riječ prvom IMEnu, drugu " +"riječ\n" +" drugom IMEnu, i tako dalje; višak riječi dodijeli je zadnjem IMEnu\n" +" Samo znakovi sadržani u varijabli IFS prepoznaju se kao MEĐA\n" +" (razdjelnik riječi). Ako nije dȃno nijedno IME, pročitani redak se\n" +" spremi u varijablu REPLY.\n" +"\n" +" Opcije:\n" +" -a POLJE pročitane riječi dodijeli sekvencijalno indeksima POLJA\n" +" počevši od nule\n" +" -d MEĐA nastavi čitati sve dok ne pročita prvu MEĐU (umjesto LF " +"znaka)\n" +" -e rabi „readline“ za dobaviti redak\n" +" -i TEKST rabi TEKST kao početni tekst za „readline“\n" +" -n BROJ zaustavi čitanje nakon pročitanih ne više od BROJ znakova\n" +" ili nakon LF znaka (umjesto da uvijek čeka na LF znak)\n" +" -N BROJ zaustavi čitanje samo nakon pročitanih ne više od BROJ\n" +" znakova ili nakon EOF znaka ili nakon isteka „t SEKUNDA\n" +" -p PROMPT ispiše string PROMPT kao prompt (bez završnog znaka novog\n" +" retka) prije početka čitanja retka\n" +" -r onemogući maskiranje kódova s obratnom kosom crtom\n" +" -s siguran ulaz — ne odjekuje ulaz na terminal\n" +" -t BROJ nakon isteka BROJ SEKUNDI prestane čekati na ulaz i završi\n" +" s kȏdom većim od 128; zadano, broj sekundi čekanja je\n" +" vrijednost varijable TMOUT; BROJ može biti i realni " +"broj;\n" +" Ako je BROJ = 0, „read“ završi odmah bez da išta čita, a\n" +" samo ako je ulaz dostupni na specificiranom deskriptoru\n" +" datoteke Završi s kȏdom 0\n" +"\n" +" -u FD čita iz deskriptora datoteke FD umjesto iz standardnoga " +"ulaza\n" +"\n" +" Završi s kȏdom 0 osim ako ne naiđe na konac datoteke\n" +" (EOF), ili je isteklo vrijeme čekanja, ili se dogodila greška\n" +" pri dodjeli, ili je specificirani nevaljani deskriptor datoteke\n" +" kao argument opciji „-u“." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Povrat iz funkcije ljuske.\n" +"\n" +" Učini da funkcija ili pokrenuta skripta završi sa izlaznom vrijednošću\n" +" specificiranom s N. Ako N nije dȃn, završi s kȏdom zadnje naredbe\n" +" izvršene unutar funkcije ili skripte.\n" +"\n" +" Vrati vrijednost N ili 1 ako ljuska ne izvrši\n" +" funkciju ili skriptu." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Postavi vrijednosti opcija ljuske i položajnih parametara.\n" +"\n" +" Omogući/onemogući svojstva ljuske ili mijenja vrijednosti položajnih\n" +" parametara. Bez opcija ili argumenata „set“ prikaže imena i vrijednosti\n" +" svih definiranih varijabli i funkcija u formatu upotrebljivom kao\n" +" ulaz za postavljanje/poništavanje trenutno postavljenih varijabli.\n" +" Dostupne su sljedeće opcije („+“ umjesto „-“ isključi dȃnu opciju):\n" +"\n" +" -a automatski eksportira nove ili modificirane varijable i funkcije\n" +" -B izvrši brace expansion, npr. echo a{d,c}e -> ade, ace (zadano)\n" +" -b odmah prijavi prekid posla (ne čeka da završi trenutna naredba)\n" +" -C onemogući da preusmjereni eksport piše preko regularnih datoteka\n" +" -E omogući da bilo koji ERR „trap“ naslijede funkcije ljuske i " +"potomci\n" +" -e završi odmah ako naredba završi s kȏdom različitim od nula\n" +" -f onemogući zamjenske znakove za imena datoteka (isključi " +"„globbing“)\n" +" -H omogući upotrebu znaka „!“ za supstituciju povijesti naredbi\n" +" -h pamti (apslolutne) lokacije izvršenih naredbi (zadano)\n" +" -k smjesti sve argumente dodijeljene varijablama u okolinu\n" +" (a ne samo one koje prethode imenu naredbe)\n" +" -m kontrola nad poslovima je omogućena (zadano)\n" +" -n pročita, ali ne izvrši naredbe („testiranje“)\n" +" -o IME_OPCIJE omogući IME_OPCIJU (v. niže za dugačka imena opcija)\n" +" -P ne razriješi simboličke veze pri izvršavanju naredbi poput „cd“\n" +" koje promjene trenutni direktorij\n" +" -p uključi privilegirani mȏd: datoteke BASH_ENV i ENV se ignoriraju,\n" +" funkcije ljuske se ne importiraju iz okoline, a ignoriraju se i\n" +" sve SHELLOPTS; taj mȏd se automatski aktivira kȁd god se realni\n" +" i efektivni UID i GID ne podudaraju. Isključivanje ove opcije\n" +" učini da je efektivni UID i GID isti kao i realni UID i GID.\n" +" -T DEBUG i RETURN „trap“ naslijede funkcije ljuske i potomci\n" +" -t završi nakon čitanja i izvršenja jedne naredbe\n" +" -u nepostojeće varijable tretira kao grešku kȁd supstituira\n" +" -v ispisuju ulaz (odjekuje ih) istovremeno s čitanjem\n" +" -x ispisuje naredbe s argumentima istovremeno s izvršavanjem\n" +" -- argumenti koji slijede su položajni parametri; ako ih nema,\n" +" postojeći položajni argumenti se brišu (uklanjaju se)\n" +" - isključi opcije -v i -x; argumenti koji slijede su položajni\n" +" parametri; ali ako ih nema, postojeći položajni argumenti\n" +" se ne brišu (ostaju)\n" +"\n" +" Opcije se također mogu koristiti pri pokretanju ljuske. Postojeće\n" +" stanje opcija može se naći u $-. Za eventualne dodatne argumente iz\n" +" „set“ uzima se da su položajni parametri i dodjeljuje se, po redu, na\n" +" $1, $2, ... $N.\n" +"\n" +" Dugački nazivi koji se koriste s opcijom -o (ili +o)\n" +" allexport isto kao -a\n" +" braceexpand isto kao -B (brace ekspanzija, npr. echo a{d,c}e -> ade, " +"ace\n" +" emacs za uređivanje redaka koristi sučelje u „emacs“ stilu\n" +" errexit isto kao -e\n" +" errtrace isto kao -E\n" +" functrace isto kao -T\n" +" hashall isto kao -h\n" +" histexpand isto kao -H\n" +" history omogući naredbu „history“\n" +" ignoreeof ignorira Ctrl-D; ne završi (ne iziđe iz) ljusku na EOF\n" +" interactive-comments dopusti komentiranje u interaktivnim naredbama\n" +" keyword isto kao -k\n" +" monitor isto kao -m\n" +" noclobber isto kao -C\n" +" noexec isto kao -n\n" +" noglob isto kao -f\n" +" nolog (prepoznata, ali se ignorira)\n" +" notify isto kao -b\n" +" nounset isto kao -u\n" +" onecmd isto kao -t\n" +" physical isto kao -P\n" +" pipefail cjevovod vrati vrijednost izlaznog statusa zadnje " +"neuspješne\n" +" naredbe ili 0 ako su svi poslovi uspješno završeni\n" +" posix striktno poštuje POSIX standard\n" +" privileged isto kao -p\n" +" verbose isto kao -v\n" +" vi za uređivanje redaka koristi sučelje u „vi“ stilu\n" +" xtrace isto kao -x\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Ukloni vrijednosti i atribute varijabli i funkcija ljuske.\n" +"\n" +" Za svako IME ukloni odgovarajuću varijablu ili funkciju\n" +"\n" +" Opcije:\n" +" -f tretira svako IME kao funkciju ljuske\n" +" -v tretira svako IME kao varijablu ljuske\n" +" -n tretira svako IME kao referenciju na neki objekt i ukloni\n" +" samu varijablu IME umjesto referiranog objekta\n" +"\n" +" Bez dȃnih opcija, „unset“ prvo pokuša ukloniti varijablu, a ako to\n" +" ne uspije, onda pokuša ukloniti funkciju. Neke varijable nije moguće\n" +" ukloniti; pogledajte „readonly.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili IME je „samo-za-čitanje“." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Postavi eksportni atribut na varijable ljuske.\n" +"\n" +" Označi automatski svako dȃno IME za eksport u okolinu za naknadno\n" +" izvršavanje naredbi. Ako je dȃna VRIJEDNOST, dodijeli im VRIJEDNOST\n" +" prije eksportiranja.\n" +"\n" +" Opcije:\n" +" -f dȃna IMEna se odnose samo na funkcije\n" +" -n ukloni eksportni atribut iz svakoga IMEna \n" +" -p izlista popis svih eksportiranih varijabli i funkcija\n" +"\n" +" Argument „--“ spriječi daljnje procesiranje opcija.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili dȃno IME nije valjano." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Označi varijable ljuske kao nepromjenjive.\n" +"\n" +" Označi svako IME kao nepromjenjivo (readonly), tako da se vrijednosti\n" +" ovih IMEna ne može promijeniti kasnijim operacijama. Ako je dȃna\n" +" VRIJEDNOST, prvo mu dodijeli VRIJEDNOST, a zatim ga označi " +"nepromjenjivim.\n" +"\n" +" Opcije:\n" +" -a svako IME se odnosi na varijable indeksiranoga polja\n" +" -A svako IME se odnosi na varijable asocijativnoga polja\n" +" -f svako IME se odnosi na funkcije ljuske\n" +" -p prikaže popis svih nepromjenjivih varijabli ili funkcija\n" +" ovisno o opciji „-f“ (je li ili nije dȃna).\n" +"\n" +" Argument „--“ onemogući daljnje procesiranje opcija.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili je IME nevaljano." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Pomakne položajne parametre.\n" +"\n" +" Preimenuje položajne parametre $N+1,$N+2,... u $1,$2,...\n" +" Ako nije dȃni N, uzima se da je N = 1.\n" +"\n" +" Završi s kȏdom 0 osim ako je N negativni ili veći od $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Izvrši naredbe iz datoteke u trenutnoj ljusci.\n" +"\n" +" Čita i izvrši naredbe iz DATOTEKE u trenutnoj ljusci.\n" +" Direktorij s DATOTEKOM traži se po stazama sadržanima u varijabli\n" +" PATH. Ako su dȃni ikoji ARGUMENTI, oni postaju položajni parametri\n" +" tijekom izvršavanja DATOTEKE.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe iz DATOTEKE,\n" +" ili sa statusom 1 ako se DATOTEKA ne može pročitati." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Obustavi rad ljuske.\n" +"\n" +" Obustavi rad u ovoj ljusci sve dok ne primi SIGCONT signal.\n" +" Ako nije prisiljena, rad prijavne ljuske se ne može obustaviti.\n" +"\n" +" Opcije:\n" +" -f prisili obustavu, čak i ako je to prijavna ljuska\n" +"\n" +" Završi s kȏdom 0 osim ako kontrola nad poslovima nije omogućena\n" +" ili se dogodila greška." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Evaluira uvjetni izraz.\n" +"\n" +" Evaluira dȃni IZRAZ; ovisno o rezultatu evaluacije, završi sa\n" +" statusom 0 (istina), ili 1 (neistina, laž). Izrazi mogu biti unarni\n" +" ili binarni. Unarni izrazi se često koriste za ispitivanje statusa\n" +" datoteke. Također postoje operatori za usporedbu stringova i brojeva.\n" +"\n" +" Ponašanje od „test“ ovisi o broju argumenata. Potražite u „bash“\n" +" uputama detalje za uporabu.\n" +"\n" +" Operatori za datoteke:\n" +" -a DATOTEKA istina ako datoteka postoji\n" +" -b DATOTEKA istina ako je datoteka blok uređaj\n" +" -c DATOTEKA istina ako je datoteka znakovni uređaj\n" +" -d DATOTEKA istina ako je datoteka direktorij\n" +" -e DATOTEKA istina ako datoteka postoji\n" +" -f DATOTEKA istina ako je datoteka regularna datoteka\n" +" -G DATOTEKA istina ako je datoteka efektivno vlasništvo vaše " +"grupe\n" +" -g DATOTEKA istina ako je datoteka SETGUID\n" +" -h DATOTEKA istina ako je datoteka simbolička veza\n" +" -k DATOTEKA istina ako datoteka ima postavljeni \"sticky\" " +"bit\n" +" -L DATOTEKA istina ako je datoteka simbolička veza\n" +" -N DATOTEKA istina ako se datoteka promijenila od zadnjeg " +"čitanja\n" +" -O DATOTEKA istina ako je datoteka efektivno vaše vlasništvo\n" +" -p DATOTEKA istina ako je datoteka imenovana cijev\n" +" -r DATOTEKA istina ako vi možete čitati datoteku\n" +" -S DATOTEKA istina ako je datoteka utičnica\n" +" -s DATOTEKA istina ako datoteka nije prazna\n" +" -t DESKRIPTOR istina ako je deskriptor datoteke otvoren u " +"terminalu\n" +" -u DATOTEKA istina ako je datoteka SETUID\n" +" -w DATOTEKA istina ako vi možete pisati datoteku\n" +" -x DATOTEKA istina ako vi možete izvršiti datoteku\n" +"\n" +" DTEKA1 -nt DTEKA2 istina ako je prva datoteka promijenjena\n" +" kasnije od druge\n" +" DTEKA1 -ot DTEKA2 istina ako je prva datoteka promijenjena\n" +" ranije od druge\n" +" DTEKA1 -ef DTEKA2 istina ako je prva datoteka čvrsta veza na drugu\n" +"\n" +" Operatori za stringove:\n" +" -z STRING istina ako je string prazni\n" +" -n STRING istina ako string nije prazni\n" +" STRING istina ako string nije prazni\n" +" STRING1 = STRING2 istina ako su stringovi jednaki\n" +" STRING1 != STRING2 istina ako stringovi nisu jednaki\n" +" STRING1 < STRING2 istina ako se leksikografski prvi string\n" +" razvrsta ispred drugoga\n" +" STRING1 > STRING2 istina ako se leksikografski prvi string\n" +" razvrsta iza drugoga\n" +"\n" +" Ostali operatori:\n" +" -o OPCIJA istina ako je ova OPCIJA ljuske omogućena\n" +" -v VARIJABLA istina ako ova VARIJABLA ima vrijednost\n" +" -R VARIJABLA istina ako je ova VARIJABLA referencija " +"(nameref) \n" +" ! IZRAZ istina ako IZRAZ neistiniti\n" +" IZRAZ1 -a IZRAZ2 istina ako su oba izraza istinita\n" +" IZRAZ1 -o IZRAZ2 laž ako su oba izraza neistinita\n" +" ARG1 OP ARG2 istina ako je aritmetika valjana; operator OP je\n" +" jedan od: -eq, -ne, -lt, -le, -gt, ili -ge;\n" +" koji znače: jednako, nejednako, manje od, " +"manje,\n" +" ili jednako, veće od, veće ili jednako.\n" +"\n" +" Završi s kȏdom 0 ako je IZRAZ istiniti, 1 ako je IZRAZ neistiniti,\n" +" ili 2 ako je dȃn nevaljani argument." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Provjeri uvjetni izraz.\n" +"\n" +" To je sinonim za ugrađenu funkciju „test“, ali zadnji argument\n" +" mora biti zagrada „]“ kao par zagradi „[“ na početku." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Prikaže potrošnju vremena procesa.\n" +" \n" +" Prikaže ukupno potrošeno vrijeme korisnikom i sustavom; prvo, vrijeme\n" +" potrošeno samom ljuskom, a zatim svim potomcima pokrenutih ljuskom.\n" +"\n" +" Završi uvijek s kȏdom 0." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Prikupljanje (hvatanje) signala i drugih događaja.\n" +"\n" +" Definira i aktivira postupke rukovanja koji se pokrenu kȁd ljuska\n" +" primi signal ili se dogodi neki drugi slučaj.\n" +"\n" +" ARGUMENT je naredba koja se pročita i izvrši kȁd ljuska primi jedan od\n" +" specificiranih signala (SIGNAL_SPEC). Ako nema ARGUMENTA (i dȃn je samo\n" +" jedan signal), ili ARGUMENT je „-“, specificirani signal zadobije svoju\n" +" originalnu vrijednost (koju je imao na startu ove ljuske). Ako je " +"ARGUMENT\n" +" prazni string, ljuska i njezini potomci ignoriraju svaki SIGNAL_SPEC.\n" +"\n" +" Ako je SIGNAL_SPEC 0 ili EXIT, ARGUMENT se izvrši kȁd zatvorite\n" +" (exit) ljusku. Ako je SIGNAL_SPEC DEBUG, ARGUMENT se izvrši prije\n" +" svake jednostavne naredbe. Ako je SIGNAL_SPEC RETURN, ARGUMENT se\n" +" izvrši svaki put kȁd funkcija ljuske ili skripta izvršena s . ili\n" +" „ugrađeni source“ završi izvršavanje. SIGNAL_SPEC ERR znači da se\n" +" ARGUMENT izvrši nakon neuspješne naredbe koja bi uzrokovala da ljuska\n" +" završi (exit) kȁd je opcija „-e“ omogućena.\n" +"\n" +" Bez argumenta, „trap“ izlista popis koji pokaže asocijaciju\n" +" između naredbi i signala.\n" +"\n" +" Opcije:\n" +" -l popis imena signala i njihov odgovarajući broj\n" +" -p pokaže koja naredba je povezana na svaki dȃni signal\n" +"\n" +" Svaki je SIGNAL_SPEC ili ime signala iz ili broj signala.\n" +" Signal se može poslati ljusci s „kill -signal $$“.\n" +"\n" +" Završi s kȏdom 0 osim ako SIGNAL_SPEC nije valjani\n" +" ili je dȃna nevaljana opcija." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Informacije o tipu naredbe.\n" +"\n" +" Za svako dȃno IME pokaže kako će se interpretirati\n" +" ako se koristi kao naredba.\n" +"\n" +" Opcije:\n" +" -a pokaže sve lokacije koje sadrže izvršnu datoteku IME; uključuje i\n" +" lokacije s aliasima, ugrađenim naredbama i funkcijama, ali onda\n" +" i samo onda ako nije dȃna opcija „-p“\n" +" -f ignorira funkcije kao da nisu definirane\n" +" -P traži dȃno IME po stazama definiranim u PATH (također ako je IME\n" +" alias, ugrađena naredba (builtin) ili funkcija)\n" +" i ispiše puni naziv datoteke na disku koja bi se izvršila\n" +" -p ispiše puni naziv datoteke na disku koja bi se izvršila ili\n" +" ništa ako je IME alias, ugrađena naredba (builtin) ili funkcija\n" +" -t ispiše samo tip navedenih IMEna: „alias“, „builtin“, „file“,\n" +" „function“ ili „keyword“, ovisno o tome je li riječ o aliasu,\n" +" ugrađenoj funkciji (builtin), datoteci na disku, definiranoj\n" +" funkciji ili ključnoj riječi; ili ništa, ako je ime nepoznato\n" +"\n" +" Završi s kȏdom 0 ako se pronađu sva IMEna, inače s 1." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Upravlja i modificira ograničenja ljuske.\n" +"\n" +" Omogući upravljanje s resursima koji su dostupni ovoj ljusci i\n" +" procesima koje kreira -- na sustavima koji to dopuštaju.\n" +"\n" +" Opcije:\n" +" -S rabi „mekano“ (soft) ograničenje resursa\n" +" -H rabi „tvrdo“ (hard) ograničenje resursa\n" +" -a popis svih trenutnih ograničenja\n" +" -b maks. veličina međuspremnika utičnice\n" +" -c maks. veličina „core“ datoteka (u kB)\n" +" -d maks. veličina segmenta s procesnim podacima (in kB)\n" +" -e maks. prioritet raspoređivanja („nice“ vrijednost)\n" +" -f maks. veličina datoteka ljuska i njeni potomci mogu zapisati\n" +" -i maks. broj signala koji može biti na čekanju\n" +" -l maks. veličina koju proces može zaključati u memoriju\n" +" -k maks. broj rezerviranih/dodijeljenih „kqueues“ za taj proces\n" +" -m maks. iznos fizičke memorije procesa (in kB)\n" +" -n maks. broj otvorenih deskriptora datoteka\n" +" -p maks. veličina međuspremnika cijevi\n" +" -q maks. broj bajtova za red POSIX poruka\n" +" -r maks. prioritet raspoređivanja u realnom vremenu\n" +" -s maks. veličina snopa (stack) (u kB)\n" +" -t maks. iznos CPU vremena (u sekundama)\n" +" -u maks. broj korisničkih procesa\n" +" -v maks. veličina virtualne memorije (u kB)\n" +" -x maks. broj datotečnih brava (lokota, locks)\n" +" -P maks. broj pseudo terminala\n" +" -T maks. broj dretvi\n" +"\n" +" Nisu sve opisane opcije dostupne na svim platformama.\n" +"\n" +" Ako je specificirani, LIMIT postane nova vrijednost za specificirani\n" +" resurs, inače se prikažu trenutne vrijednosti. Specijalne vrijednosti,\n" +" „soft“, „hard“, i „unlimited“ su trenutni soft limit, trenutni hard\n" +" limit i unlimited. Ako nijedna opcija nije specificirana, podrazumijeva\n" +" se da je aktivna „-f“ opcija.\n" +"\n" +" Vrijednosti su višekratnik od 1024 bajta, osim za „-t“ koji je\n" +" u sekundama, „-p“ koji je višekratnik od 512 bajta i „-u“ je apsolutni\n" +" broj procesa.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili se dogodila greška." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Prikaže ili postavi masku prilikom kreiranje datoteke.\n" +"\n" +" Postavi masku datoteke koju kreira korisnik na MODE.\n" +" Ako MODE nije dȃn, ispiše trenutnu vrijednost maske.\n" +"\n" +" Ako MODE počinje sa znamenkom, interpretira se kao oktalni broj;\n" +" inače to je simbolički mode string kakav prihvaća chmod(1).\n" +"\n" +" Opcije:\n" +" -p ako nije dȃn MODE, generira izlaz u formatu\n" +" koji se može iskoristiti kao ulaz\n" +" -S napravi simbolički izlaz; inače izlaz je oktalni broj\n" +"\n" +" Završi s kȏdom 0 osim ako MODE nije valjan\n" +" ili je dȃna nevaljana opcija." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Čeka da posao završi i vrati njegov izlazni status.\n" +"\n" +" Čeka na svaki posao identificirani s ID — to jest indikatorom posla ili\n" +" indikatorom procesa — i izvijesti njegov završni status. Ako nije dȃn\n" +" ID, čeka na sve trenutno aktivne potomke, a završni status je nula.\n" +" Ako je ID specifikacija posla, čeka na sve procese u cjevovodu tog " +"posla.\n" +"\n" +" Ako je dȃna opcija „-n“, čeka na završetak sljedećeg posla i vrati\n" +" njegov izlazni status.\n" +"\n" +" Ako je dȃna opcija „-f“ i kontrola nad poslovima je omogućena, čeka dok\n" +" specificirani ID ne završi, umjesto da promijeni status.\n" +"\n" +" Završi s kȏdom zadnjeg ID-a, a s kȏdom 1 ako je ID nevaljani\n" +" ili je dȃna nevaljana opcija." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Čeka da proces završi i vrati njegov izlazni status.\n" +"\n" +" Čeka na svaki proces identificirani s PID i izvijesti njegov završni\n" +" status. Ako nije dȃn PID, čeka na sve trenutno aktivne potomke,\n" +" a završni status je nula. PID mora biti proces ID.\n" +"\n" +" Završi s kȏdom zadnjeg PID-a, s kȏdom 1 ako je PID nevaljani,\n" +" ili s 2 ako je dȃna nevaljana opcija." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvrši naredbe za svakoga člana u popisu.\n" +"\n" +" Petlja „for“ izvrši sekvenciju naredbi za svakoga člana u popisu " +"stavki.\n" +" Ako nema operanda „in RIJEČIMA...;“, podrazumijeva se operand\n" +" „in \"$@\"“. Svakom elementu u RIJEČIMA, IME se postavi na taj element\n" +" i izvrše se NAREDBE.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetička „for“ petlja.\n" +"\n" +" Isto kao:\n" +"\n" +" (( EXP1 )); while (( EXP2 )); do NAREDBE; (( EXP3 )); done\n" +"\n" +" EXP1, EXP2, EXP3 su aritmetički izrazi. Ako bilo koji izraz nije\n" +" dȃn, uzima se da mu je vrijednost jednaka 1.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Pripremi izbornik i izvrši izabrane naredbe.\n" +"\n" +" Proširenjem RIJEČI, „select“ generira i prikaže izbornik na standardnom\n" +" izlazu za greške s brojem ispred svake riječi. Ako operand „u RIJEČIMA“\n" +" nije dȃn, podrazumijeva se operand „in \"$@\"“.\n" +" Nakon izbornika prikaže se PS3 prompt i redak se čita iz standardnoga\n" +" ulaza; ako se redak sastoji od broja koji odgovara jednoj od prikazanih\n" +" riječi, onda varijabla IME dobije vrijednost te riječi; ako je redak\n" +" prazan, RIJEČI i prompt se ponovno prikažu; ako se pročita EOF „select“\n" +" naredba završi s poslom. Bilo koja druga vrijednost koja se pročita " +"učini\n" +" da se IME isprazni (nulira). Pročitani redak spremi se u varijablu " +"REPLY.\n" +" NAREDBE se izvršavaju nakon svakog izbora, tako dugo dok „break“ " +"naredba\n" +" ne prekine posao.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Prikaže vrijeme potrošeno cjevovodom.\n" +"\n" +" Nakon završetka izvršavanja CJEVOVODA prikaže sažetak statistike\n" +" trošenja vremena: ukupno potrošeno vrijeme, CPU vrijeme potrošeno\n" +" korisnikom i CPU vrijeme potrošeno sustavom za izvršavanje naredbi.\n" +"\n" +" Izlazni format se može prilagoditi s varijablom okoline TIMEFORMAT.\n" +" Opcija „-p“ ignorira TIMEFORMAT i ispiše izlaz u prenosivom POSIX\n" +" formatu.\n" +"\n" +" Završi s izlaznim statusom CJEVOVODA." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvrši naredbe ovisno o slaganju s uzorkom.\n" +"\n" +" Izvrši onu NAREDBU koja odgovara prvom UZORKU koji se podudara s " +"RIJEČI.\n" +" Znak „|“ rabi se za razdvajanje više uzoraka.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvršavanje uvjetovanih naredbi.\n" +"\n" +" Prvo izvrši zadatke iza „if“; ako „if“ završi s kȏdom nula, izvrši\n" +" zadatke iza prvog „then“; inače, izvrše se zadatci iza sljedećeg „elif“\n" +" (ako postoji), ili „else“ (ako postoji). Ako „elif“ završi s kȏdom\n" +" nula, izvrše se zadatci iza odgovarajućih „then“. Ako više nema „elif“,\n" +" ili „else“, ili nakon izvršenja zadataka iza „then“, „if“ naredba " +"završi.\n" +"\n" +" „if“ završi s kȏdom zadnjeg izvršenoga zadatka." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvršava naredbe tako dugo dok je test uspješan.\n" +"\n" +" Izvršava sukcesivne NAREDBE tako dugo dok zadnja naredba u\n" +" „while“ NAREDBI Završi s kȏdom 0.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvršava naredbe tako dugo dok test ne uspije.\n" +"\n" +" Izvršava sukcesivne NAREDBE tako dugo dok zadnja naredba u\n" +" „until“ NAREDBAMA završi s kȏdom različitim od nule.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Kreira coprocess (suproces) s imenom IME.\n" +"\n" +" Izvrši NAREDBU asinkrono, sa standardnim izlazom i standardnim ulazom\n" +" naredbe spojene preko cijevi na deskriptore datoteke dodijeljene\n" +" indeksima 0 i 1 varijable polja IME u izvršnoj ljusci.\n" +" Zadano, IME je \"COPROC\".\n" +"\n" +" Naredba coproc završi s kȏdom 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Definira funkciju ljuske.\n" +"\n" +" Kreira funkciju ljuske nazvanu IME. Kȁd se pokrene kao jednostavna\n" +" naredba, IME izvrši NAREDBE unutar konteksta ljuske pozivanja.\n" +" Kȁd se IME pozove, argumenti se proslijede funkciji kao $0...$N,\n" +" a ime funkcije je $FUNCNAME.\n" +"\n" +" Završi s kȏdom 0 osim ako je IME readonly (samo-za-čitanje)." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Grupira naredbe u jednu cjelinu.\n" +"\n" +" Izvrši skup naredbi kao grupu. To je jedan od načina za preusmjeravanje\n" +" čitavog skupa naredbi\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Nastavi posao u interaktivnom načinu.\n" +"\n" +" Nastavi dȃni obustavljeni ili pozadinski posao u interaktivnom mȏdu\n" +" To je ekvivalentno naredbi „fg“. JOBSPEC može specificirati\n" +" ili ime posla ili broj posla. Ako „&“ slijedi iza JOBSPEC\n" +" onda posao prelazi u pozadinu. To je ekvivalentno naredbi „bg“\n" +"\n" +" Završi s kȏdom nastavljenoga posla." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Izračuna aritmetički izraz.\n" +"\n" +" IZRAZ se izračuna po aritmetičkim pravilima.\n" +" To je isto kao \"let IZRAZ\".\n" +"\n" +" Završi s kȏdom 1 ako je rezultat IZRAZA jednaki 0;\n" +" inače završi s kȏdom 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Izvrši uvjetnu naredbu.\n" +"\n" +" Evaluira dani uvjetni IZRAZ; ovisno o rezultatu evaluacije završi sa\n" +" statusom 0 (istina) ili 1 (neistina, laž). Izrazi koriste iste osnovne\n" +" komponente koje koristi ugrađena naredba (builtin) „test“, i mogu se\n" +" kombinirati sa sljedećim operatorima:\n" +"\n" +" ( IZRAZ ) vrati vrijednost danoga IZRAZa\n" +" ! IZRAZ istina ako je IZRAZ istina, inače laž\n" +" IZRAZ1 && IZRAZ2 istina ako su oba izraza istinita, inače laž\n" +" IZRAZ1 || IZRAZ2 laž ako su oba izraza neistinita, inače istina\n" +"\n" +" Ako se rabe operatori „==“ ili „!=“, onda se string desno od operatora\n" +" smatra za uzorak i provodi se podudaranje uzoraka.\n" +" Ako se rabi operator „=~“, onda se string na desno od operatora " +"podudara\n" +" kao regularni izraz.\n" +"\n" +" Operatori „&&“ i „|| ne evaluiraju IZRAZ2 ako je IZRAZ1 dovoljan za\n" +" određivanje konačnog rezurlata.\n" +"\n" +" Završi s kȏdom 0 ili 1 ovisno o IZRAZU." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Značenje i upotreba standardnih varijabli ljuske.\n" +"\n" +" U nastavku je opis brojnih varijabli od kojih neke sadrže popis\n" +" elemenata. U svakom od tih popisa elementi su razdvojeni dvotočkama.\n" +"\n" +" BASH_VERSION inačica ovog „bash“ programa\n" +" CDPATH popis direktorija u kojima se traži direktorij\n" +" kȁd argument od „cd“ (direktorij) nije u\n" +" trenutnom radnom direktoriju\n" +" GLOBIGNORE popis uzoraka koji opisuju imena datoteka koje\n" +" se ignoriraju prilikom ekspanzije imena staza\n" +" HISTFILE ime datoteke koja sadrži povijest vaših naredbi\n" +" HISTFILESIZE maksimalni broj redaka datoteke s povijesti naredba\n" +" HISTIGNORE popis uzoraka koji opisuju naredbe koje ne treba zapisati\n" +" u datoteku koja sadrži povijest vaših naredbi\n" +" HISTSIZE maksimalni broj redaka koje trenutna ljuska može " +"dosegnuti\n" +" HOME puni naziv staze do vašega osobnoga direktorija\n" +" HOSTNAME ime računala na kojem se izvršava „bash“\n" +" HOSTTYPE tip CPU-a na kojem se izvršava „bash“\n" +" IGNOREEOF broj ignoriranih Ctrl-D (EOF) prije zatvaranja ljuske\n" +" MACHTYPE tip računala na kojem se izvršava „bash“\n" +" MAILCHECK kako često (u sekundama) „bash“ gleda ima li nove pošte\n" +" MAILPATH popis datoteka koje „bash“ provjeri za novu poštu\n" +" OSTYPE distribucija Unix-a no kojem se izvršava ovaj „bash“\n" +" PATH popis direktorija u kojima se traže naredbe\n" +" PROMPT_COMMAND naredba koja se izvrši prije ispisa primarnoga prompta\n" +" PS1 string koji opisuje primarni prompt\n" +" PS2 string koji opisuje sekundarni prompt (zadano, „>“)\n" +" PWD puni naziv staze trenutnog radnoga direktorija\n" +" SHELLOPTS popis svih omogućenih opcija ljuske\n" +" TERM naziv vrste trenutnog terminala\n" +" TIMEFORMAT pravilo za format ispisa „time“ statistika\n" +" auto_resume ako nije prazan, učini da se naredbena riječ na " +"naredbenom\n" +" retku prvo potraži na popisu obustavljenih poslova,\n" +" i ako se tamo pronađe, taj se posao premjesti u\n" +" interaktivni mȏd; vrijednost „exact“ znači da naredbena\n" +" riječ mora strikno podudariti naredbu iz popisa;\n" +" vrijednost „substring“ znači da naredbena riječ mora\n" +" podudariti podstring naredbe iz popisa; bilo koja druga\n" +" vrijednost znači da naredbena riječ mora biti prefiks\n" +" obustavljene naredbe\n" +" histchars znakovi koje upravljaju s proširenjem i brzom " +"supstitucijom\n" +" povijesti; prvi znak je znak za „supstituciju\n" +" povijesti“, obično „!“; drugi znak je „znak brze\n" +" supstitucije“, obično „^“; treći znak je „komentar\n" +" povijesti“, obično „#“.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Doda direktorije na snop.\n" +"\n" +" Doda direktorij na vrh snopa direktorija ili zarotira snop tako da\n" +" učini novi vrh snopa trenutnim radnim direktorijem. Bez argumenata\n" +" razmijeni pozicije dva direktorija na vrhu snopa.\n" +"\n" +" Opcije:\n" +" -n izostavi uobičajenu promjenu direktorija kȁd dodaje\n" +" direktorije u snop, odnosno samo manipulira sa snopom\n" +"\n" +" Argumenti:\n" +" DIREKTORIJ Doda DIREKTORIJ na vrh snopa direktorija i\n" +" učini ga novim aktualnim radnim direktorijem.\n" +" +N Zarotira snop tako, da N-ti direktorij u snopu (brojeći od nule " +"s\n" +" lijeve strane popisa prikazanoga s „dirs“) postane novi vrh " +"snopa.\n" +" -N Zarotira snop tako, da N-ti direktorij u snopu (brojeći od nule " +"s\n" +" desne strane popisa prikazanoga s „dirs“) postane novi vrh " +"snopa.\n" +"\n" +" Naredba „dirs“ prikaže trenutni sadržaj snopa direktorija.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili nije uspjela promjena direktorija." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Ukloni direktorije iz snopa.\n" +"\n" +" Ukloni direktorije iz snopa direktorija. Bez argumenata, ukloni\n" +" direktorij na vrhu snopa i premjesti se u novi najviši direktorij.\n" +"\n" +" Opcije:\n" +" -n izostavi uobičajenu promjenu direktorija kȁd uklanja\n" +" direktorije iz snopa, odnosno samo manipulira sa snopom\n" +"\n" +" Argumenti:\n" +" +N Ukloni da N-ti direktorij iz snopa brojeći od nule s lijeve\n" +" strane popisa prikazanoga s „dirs“. Na primjer: „popd +0“\n" +" ukloni prvi, a „popd +1“ ukloni drugi direktorij.\n" +" +N Ukloni da N-ti direktorij iz snopa brojeći od nule s desne\n" +" strane popisa prikazanoga s „dirs“. Na primjer.: „popd -0“\n" +" ukloni zadnji, a „popd -1“ ukloni predzadnji direktorij.\n" +"\n" +" Naredba „dirs“ prikaže trenutni sadržaj snopa direktorija.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili nije uspjela promjena direktorija." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Ispiše sadržaj snopa direktorija.\n" +"\n" +" Pokaže popis trenutno zapamćenih direktorija. Direktoriji se unose\n" +" na popis pomoću naredbe „pushd“, a s naredbom „popd“ se uklanjaju.\n" +" \n" +" Opcije:\n" +" -c počisti snop direktorija brisanjem svih elemenata\n" +" -l ispiše apsolutne staze direktorija u odnosu na osobni\n" +" direktorij (ne skraćuje staze upotrebom tilde)\n" +" -p ispiše sadržaj snopa po jedan direktorij po retku\n" +" -v kao „-p“, ali s prefiksom koji pokazuje\n" +" poziciju direktorija snopu\n" +"\n" +" Argumenti:\n" +" +N Pokaže N-ti direktorij iz snopa, brojeći od od nule s\n" +" lijeve strane popisa kȁd se „dirs“ pokrene bez opcija.\n" +" -N Pokaže N-ti direktorij iz snopa, brojeći od nule s\n" +" desne strane popisa kȁd se „dirs“ pokrene bez opcija.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili se dogodila greška." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Uključi ili isključi opcije ljuske.\n" +"\n" +" Promjeni postavku svakoj opciji ljuske IME_OPCIJE. Bez ikakvih opcija i\n" +" argumenta, „shopt“ izlista sve opcije ljuske pokazujući je li, ili nije\n" +" uključena.\n" +"\n" +" Opcije:\n" +" -o ograniči IME_OPCIJE na ona koja su definirana\n" +" za upotrebu sa „set -o“\n" +" -p generira izlaz koji se može koristi za ulaz\n" +" -q izostavi izlaz (ništa ne ispisuje)\n" +" -s omogući (uključi) sve dȃne IME_OPCIJE\n" +" -u onemogući (isključi) sve dȃne IME_OPCIJE\n" +"\n" +" Bez opcija (ili samo s „-q“ opcijom) Završi s kȏdom 0 ako je IME_OPCIJE\n" +" uključeno, a s 1 ako je isključeno. Završi također s 1 ako je dȃno\n" +" nevaljano ime opcije, a završi s 2 ako je dȃna nevaljana opcija." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Oblikuje ispis ARGUMENATA prema pravilima FORMATA.\n" +"\n" +" Ispiše dane ARGUMENTE u danom FORMATU.\n" +"\n" +" Opcije:\n" +" -v VARIJABLA preusmjeri (dodijeli) izlaz (ispis) u VARIJABLU\n" +" umjesto na standardni izlaz\n" +"\n" +" FORMAT je znakovni string koji sadrži tri vrste objekta:\n" +" obične znakove koji se jednostavno kopiraju na izlaz; kontrolne znakove\n" +" (maskirane sekvencije) koji se pretvore i kopiraju na izlaz; i\n" +" specifikacije formata od kojih svaka uzrokuje ispisivanje sljedećeg\n" +" sukcesivnoga argumenta.\n" +"\n" +" Pored standardnih simbola za format opisanih u printf(1),\n" +" printf dodatno interpretira:\n" +" %b proširi maskirane sekvencije s obratnom kosom crtom\n" +" (backslash escape sequences) u relevantim argumentima\n" +" %q citira argument tako, da se može iskoristiti kao ulaz\n" +" %(fmt)T ispis vremena rezultira upotrebom FMT kao\n" +" format stringa za strftime(3)\n" +"\n" +" Dani format se koristi sve dok se ne potroše svi argumenti. Ako ima\n" +" manje od očekivanoga broja argumenata, suvišne format specifikacije\n" +" se ponašaju kao da im je vrijednost nula, ili prazni string.\n" +"\n" +" Završi s kȏdom 0 osim ako je dana nevaljana opcija\n" +" ili se dogodila greška u pisanju ili greška pri dodijeli." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Specificira kako „readline“ treba kompletirati argumente.\n" +"\n" +" Za svako dȃno IME specificira kako se kompletiraju argumenti. Bez\n" +" dȃnih opcija ispiše postojeće specifikacije koje se mogu ponovno\n" +" iskoristiti kao ulaz.\n" +"\n" +" Opcije:\n" +" -p ispiše postojeće specifikacije kompletiranja u formatu\n" +" upotrebljivom za ulaz\n" +" -r ukloni specifikaciju kompletiranja za svako dȃno IME\n" +" ili ukloni sve specifikacije ako nisu dȃna IMENA\n" +" -D na naredbe koje nemaju vlastitu specifikaciju za kompletiranje\n" +" primjeni „zadano“ ponašanje specifikacija i akcija\n" +" -E primjeni zadano ponašanje specifikacija i akcija i na „prazne“\n" +" naredbe --; pokuša kompletirati prazni redak\n" +" -I primjeni zadano ponašanje specifikacija i akcija i na početnu\n" +" (obično naredbu) riječ\n" +"\n" +" Redoslijed akcija pri pokušaju kompletiranja slijedi gore dȃni poredak\n" +" opcija pisanih u verzalu. Opcija „-D“ ima veći prioritet od opcije „-" +"E“.\n" +" a obje imaju veći prioritet od opcije „-I“\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili se dogodila greška." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Prikaže moguća kompletiranja ovisno o opcijama.\n" +"\n" +" „compgen“ je namijenjen za upotrebu unutar funkcije koja generira\n" +" moguća kompletiranja. Ako je dȃna neobvezna opcija RIJEČ, generira\n" +" samo moguća kompletiranja podudarna s opcijom RIJEČ.\n" +"\n" +" Završi s kȏdom 0 osim ako je dȃna nevaljana opcija\n" +" ili se dogodila greška." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Izmjena ili prikaz opcija za kompletiranje.\n" +"\n" +" Izmijenite opcije kompletiranja za svako IME u skladu s opcijama,\n" +" ili za kompletiranje koje se trenutno vrši ako nisu dȃna IMEna.\n" +" Ako nema opcija, ispišu se opcije kompletiranja za svako IME ili\n" +" za trenutno kompletiranje.\n" +"\n" +" Opcije:\n" +" -o OPCIJA ovu OPCIJU kompletiranja postavi za svako IME\n" +" -D promijeni opcije za kompletiranje „zadanih“ naredba\n" +" -E promijeni opcije za kompletiranje „praznih“ naredba\n" +" -I promijeni opcije za kompletiranje za početnu riječ\n" +"\n" +" „+“ umjesto „-“ isključi odgovarajuću opciju.\n" +"\n" +" Svako IME ukazuje na naredbu za koju specifikacija kompletiranja mora\n" +" već prije biti definirana pomoću ugrađene naredbe „complete“. Ako nije\n" +" dȃno nijedno IME, funkcija koja trenutno generira kompletiranja mora\n" +" pozvati „compopt“; time se onda promjene opcije za taj generator koji\n" +" trenutno izvršava kompletiranja.\n" +"\n" +" Završi s kȏdom 0 osim ako nije dȃna nevaljana opcija\n" +" ili nije definirana specifikacija za kompletiranje IMEna." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Mapira pročitane retke iz standardnoga ulaza u varijablu tipa polje.\n" +"\n" +" Učitane retke iz standardnoga ulaza mapira u indeksiranu varijablu " +"POLJE.\n" +" Ako nema argumenta POLJE, koristi se (zadano) varijabla MAPFILE.\n" +"\n" +" Opcije:\n" +" -d MEĐA prvi znak u MEĐI (umjesto LF) je znak za kraj retka\n" +" -n BROJ kopira ne više od BROJ redaka (0 znači sve retke)\n" +" -O POČETAK mapiranje započinje s indeksom POČETAK (zadano 0)\n" +" -s BROJ preskoči (izostavi) prvih BROJ redaka\n" +" -t ukloni zaostalu MEĐU (zadano LF) iz svakog učitanoga " +"retka\n" +" -u FD čita retke iz FD (deskriptora datoteke) umjesto iz stdin\n" +" -C FUNKCIJA evaluira FUNKCIJU nakon svako TOLIKO pročitanih redaka\n" +" -c TOLIKO nakon svako TOLIKO pročitanih redaka pozove FUNKCIJU\n" +"\n" +" Argument:\n" +" POLJE ime varijable polja u koju se mapiraju pročitani redci\n" +"\n" +" Ako je opcija „-C“ dȃna bez opcije „-c“, TOLIKO je 5000 (zadano).\n" +" Kȁd FUNKCIJA evaluira — dobiva indeks sljedećeg elementa polja koji se\n" +" mapira i redak koji će biti dodijeljen tom elementu — kao dodatne " +"argumente.\n" +"\n" +" Ako nije dȃni eksplicitni POČETAK, „mapfile“ počisti polje\n" +" prije početka mapiranja.\n" +"\n" +" Završi s kȏdom 0 osim ako je POLJE readonly (samo-za-čitanje)\n" +" ili nije polje; ili je dȃna nevaljana opcija." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Učita retke iz datoteke u varijablu tipa indeksirano polje.\n" +"\n" +" Sinonim za „mapfile“." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Vraća kontekst od trenutnog poziva funkciji.\n" +#~ " \n" +#~ " Bez EXPR, rezultati " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process(): proces %5ld (%s) u cjevovodu" + +#~ msgid "Unknown Signal #" +#~ msgstr "Nepoznati signal #" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licenca GPLv2+: GNU GPL inačica 2 ili novija \n" + +#~ msgid ":" +#~ msgstr ":" diff --git a/bash-5.1/po/hu.gmo b/bash-5.1/po/hu.gmo new file mode 100644 index 0000000000000000000000000000000000000000..08cb511553cc7d48bde3d1f89111a15e50a579cc Binary files /dev/null and b/bash-5.1/po/hu.gmo differ diff --git a/bash-5.1/po/hu.po b/bash-5.1/po/hu.po new file mode 100644 index 0000000000000000000000000000000000000000..972911d8f8428e6e94eb5cf65e2d302930cc8310 --- /dev/null +++ b/bash-5.1/po/hu.po @@ -0,0 +1,5850 @@ +# Hungarian translation for bash. +# Copyright (C) 2010, 2016, 2017, 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Mate Ory , 2010, 2016. +# Gabor Kelemen , 2016. +# Balázs Úr , 2017, 2019. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-11-16 17:58+0100\n" +"Last-Translator: Balázs Úr \n" +"Language-Team: Hungarian \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 19.04.3\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "hibás tömbindex" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: névhivatkozás attribútum eltávolítása" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nem lehetséges az indexelt tömb asszociatívvá alakítása" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: érvénytelen asszociatívtömb-index" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: a nem-szám indexnek való értékadás nem lehetséges" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: asszociatív tömbhöz való értékadásnál meg kell adni az indexet" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: nem hozható létre: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: nem található billentyűkiosztás a parancshoz" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: az első nem szóközkarakter nem „\"”" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "nincs záró „%c” a következőben: %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: hiányzó kettőspont-elválasztó" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s”: nem lehetséges a kötés megszüntetése" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "szögleteszárójel-kiegészítés: Nem foglalható memória ehhez: %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"szögleteszárójel-kiegészítés: nem sikerült a memóriafoglalás %u elem számára" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" +"szögleteszárójel-kiegészítés: nem sikerült a memóriafoglalás „%s” számára" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s”: érvénytelen alias-név" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "nincs engedélyezve a sorszerkesztés" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s”: érvénytelen billentyűkiosztás-név" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: nem olvasható a következő: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s”: ismeretlen függvénynév" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s nincs kötve egy billentyűhöz sem.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s a következő módon hajtható végre: " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s”: nem lehetséges a kötés megszüntetése" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "ciklusszám" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "csak „for”, „while” és „until” ciklusokban értelmezhető" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Az aktuális szubrutinhívás környezetének visszaadása.\n" +" \n" +" KIF nélkül \"$sor $fájlnév\" formátumú eredményt ad. A KIF-fel pedig\n" +" \"$sor $szubrutin $fájlnév\" formátumút; ez hasznos lehet stack trace\n" +" kiírásához.\n" +" \n" +" Az EXPR értéke azt adja meg, hogy a jelenlegihez képest milyen mélyre\n" +" lépjen vissza; a verem tetején a 0-s keret van.\n" +" \n" +" Kilépési kód:\n" +" 0-val tér vissza, ha érvényes a KIF és valóban függvényt hajt végre a\n" +" parancsértelmező." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "Nincs beállítva HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "túl sok argumentum" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null könyvtár" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "Nincs beállítva OLDPWD" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "%d. sor: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "figyelmeztetés: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: használat: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: a kapcsolónak kötelező argumentuma van" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: a kötelező argumentum egy szám" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: nem található" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: érvénytelen kapcsoló" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: érvénytelen kapcsolónév" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s”: érvénytelen azonosító" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "érvénytelen oktális szám" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "érvénytelen hexadecimális szám" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "érvénytelen szám" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: érvénytelen szignálmegadás" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s”: nem pid vagy munkaazonosító" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: csak olvasható változó" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s kívül esik a tartományon" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumentum" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s kívül esik a tartományon" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: nincs ilyen munka" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: nincs munkakezelés" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "nincs munkakezelés" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: korlátozott" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "korlátozott" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: nem beépített parancs" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "írási hiba: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "hiba a terminálattribútum beállításakor: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "hiba a terminálattribútum lekérdezésekor: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: hiba a munkakönyvtár lekérdezésekor: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: kétértelmű munkamegadás" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "ebben a verzióban nem érhető el súgó" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nem szüntethető meg: csak olvasható %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nem szüntethető meg" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: érvénytelen műveletnév" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: nincs kiegészítés meghatározva" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "figyelmeztetés: a -F kapcsoló nem a várt módon működhet" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "figyelmeztetés: a -C kapcsoló nem a várt módon működhet" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "jelenleg nincs kiegészítési függvény végrehajtás alatt" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "csak függvényben használható" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: a referenciaváltozó nem lehet tömb" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: a névhivatkozás változó önhivatkozása nem engedélyezett" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: körkörös névhivatkozás" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s”: érvénytelen változónév a névhivatkozáshoz" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "nem használható a „-f” függvény létrehozására" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: csak olvasható függvény" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: az idézőjelezett összetett tömb értékadása elavult" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: ilyen módon nem lehet tömböt megszüntetni" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: nem lehetséges az asszociatív tömb indexeltté alakítása" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "a dinamikus betöltés nem érhető el" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "megosztott objektumfájl megnyitása sikertelen: %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "%s nem található a(z) %s megosztott objektumfájlban: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: nem dinamikusan van betöltve" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "%s betöltési függvénye hibát ad vissza (%d): nincs betöltve" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: nem dinamikusan van betöltve" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: nem törölhető: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s egy könyvtár" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: nem normál fájl" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: a fájl túl nagy" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: bináris nem hajtható végre" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: nem hajtható végre: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "kijelentkezés\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "nem bejelentkező parancsértelmező: használja az „exit”-et" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Vannak leállított munkák.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Vannak futó munkák.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "nincs ilyen parancs" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "előzményválasztás" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: az átmeneti fájl nem nyitható meg: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "aktuális" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "a(z) %d. munka munkakezelés nélkül indult" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: érvénytelen kapcsoló – %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: a kapcsolónak kötelező argumentuma van – %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "a hashelés le van tiltva" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: a hashtábla üres\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "t.szám\tparancs\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "A következő kifejezésre illeszkedő parancsok: „" +msgstr[1] "A következő kifejezésekre illeszkedő parancsok: „" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nem illeszkedik egy szócikk sem a következőre: „%s”.\n" +"A „help help”, „man -k '%s'” vagy „info '%s'” parancsok segíthetnek." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: nem nyitható meg: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Ezek a parancsok be vannak építve a parancsértelmezőbe. A „help” parancs\n" +"listázza őket. A „help név” a „név” parancsról tájékoztat. Az „info bash”\n" +"paranccsal általános információt kap a parancsértelmezőről. A listán nem\n" +"található parancsokról a „man -k” vagy az „info” adhat felvilágosítást.\n" +"\n" +"A parancs nevét követő csillag (*) azt jelzi, hogy le van tiltva.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "a következő kapcsolók kizárják egymást: -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "előzménypozíció" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: érvénytelen időbélyeg" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: sikertelen előzményből való kiegészítés" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: sikertelen inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "a „-x” mellett nem használható más kapcsoló" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: az argumentumok folyamat- vagy munkaazonosítók lehetnek" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Ismeretlen hiba" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "az értelmező kifejezést várt" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: nem egy indexelt tömb" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: érvénytelen fájlleíró-megadás" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: érvénytelen fájlleíró: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: sorok száma érvénytelen" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: érvénytelen tömbkezdet" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: érvénytelen parancshívási távolság" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "üres tömbváltozó-név" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "a tömbök használata nincs támogatva" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s”: hiányzó formátumkarakter" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c”: érvénytelen időformátum-megadás" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c”: érvénytelen formátumkarakter" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "figyelmeztetés: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "formátumfeldolgozási probléma: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "hiányzó hexadecimális számjegy a következőhöz: \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "hiányzó unicode számjegy a következőhöz: \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nincs másik könyvtár" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: érvénytelen argumentum" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "a könyvtárverem üres" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "könyvtárveremindex" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Megjeleníti a jelenleg megjegyzett könyvtárakat. A könyvtárakat a\n" +" „pushd” paranccsal lehet a verembe rakni; és a „popd” paranccsal " +"kivenni.\n" +" \n" +" Kapcsolók:\n" +" -c\ta könyvtárverem törlése az összes elem eltávolításával\n" +" -l\ta saját könyvtárat ne rövidítse a listázáskor egy tilde (~)\n" +" -p\ta könyvtárverem kiírása soronként egy elemmel\n" +" -v\ta könyvtárverem kiírása soronként egy elemmel, a vermen\n" +" \tbelüli pozíció jelölésével\n" +" \n" +" Argumentumok:\n" +" +N\tN darab bejegyzést jelenít meg az argumentum nélkül a dirs\n" +" \táltal megjelenített listán balról számolva, nullától kezdve.\n" +" -N\tN darab bejegyzést jelenít meg az argumentum nélkül a dirs\n" +" \táltal megjelenített listán jobbról számolva, nullától kezdve." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Egy könyvtárat tesz a könyvtárverem tetejére, vagy forgatja a vermet,\n" +" az új felső elemmé a jelenlegi munkakönyvtárat téve. Argumentumok\n" +" nélkül hívva a két felső könyvtárat cseréli meg.\n" +" \n" +" Kapcsolók:\n" +" -n\tNe váltson könyvtárat hozzáadáskor, vagyis csak a\n" +" \tvermet változtassa.\n" +" \n" +" Argumentumok:\n" +" +N\tÚgy forgatja a vermet, hogy az N-edik könyvtár (0-tól\n" +" \tkezdve, a „dirs” által kiírt listán balról számolva)\n" +" \tkerüljön a verem tetejére.\n" +" \n" +" -N\tÚgy forgatja a vermet, hogy az N-edik könyvtár (0-tól\n" +" \tkezdve, a „dirs” által kiírt listán jobbról számolva)\n" +" \tkerüljön a verem tetejére.\n" +" \n" +" dir\tA verem tetejére helyezi KTÁR könyvtárat, és ugyanezt\n" +" \tállítja be új munkakönyvtárnak.\n" +" \n" +" A „dirs” beépített parancs listázza a könyvtárvermet." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Elemeket vesz ki a könyvtárveremből. Argumentumok nélkül kiveszi a\n" +" legfelső elemet, és a kivett elemre állítja az új munkakönyvtárat.\n" +" \n" +" Kapcsolók:\n" +" -n\tNe váltson könyvtárat eltávolításkor, vagyis csak a vermet\n" +" \tváltoztassa.\n" +" \n" +" Argumentumok:\n" +" +N\tEltávolítja az N-edik elemet a „dirs” által kiírt listán,\n" +" \tnullától, balról számolva. Pl. a „popd +0” az első, míg a\n" +" \t„popd +1” a második könyvtárat távolítja el.\n" +" -N\tEltávolítja az N-edik elemet a „dirs” által kiírt listán,\n" +" \tnullától, jobbról számolva. Pl. a „popd -0” az utolsó,\n" +" \ta „popd -1” az utolsó előtti könyvtárat távolítja el.\n" +" \n" +" A „dirs” beépített parancs listázza a könyvtárvermet." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: érvénytelen időkorlát-megadás" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "olvasási hiba: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"csak függvényből vagy source-olt parancsfájlból lehet „return”-nel " +"visszatérni" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "nem lehet egyszerre függvényt és változót megszüntetni" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: nem egy tömbváltozó" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: nem függvény" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: nem exportálható" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift-szám" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" +"nem lehet egyszerre beállítani és törölni parancsértelmező-beállításokat" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: érvénytelen parancsértelmezőkapcsoló-név" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "fájlnévargumentum szükséges" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: a fájl nem található" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "nem lehet szüneteltetni" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "nem lehet bejelentkező parancsértelmezőt szüneteltetni" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s egy alias a következőre: „%s”\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s egy parancsértelmező-kulcsszó\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s egy függvény\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s egy speciális beépített parancs\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s egy beépített parancs\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s: %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s hashelve van (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: érvénytelen korlátérték" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c”: érvénytelen parancs" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: nem kérdezhető le a korlát: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "korlát" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: nem módosítható a korlát: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktális szám" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c”: érvénytelen szimbolikus módoperátor" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c”: érvénytelen szimbolikus módkarakter" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " sor: " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "utolsó parancs: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Megszakítás..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:462 +msgid "unknown command error" +msgstr "hiba: érvénytelen parancs" + +#: error.c:463 +msgid "bad command type" +msgstr "hibás parancstípus" + +#: error.c:464 +msgid "bad connector" +msgstr "hibás csatlakozó" + +#: error.c:465 +msgid "bad jump" +msgstr "hibás ugrás" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: kötetlen változó" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aidőtúllépés bemenetre várva: automatikus kijelentkezés\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "szabványos bemenet /dev/null-ra állítása sikertelen: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "IDŐFORMÁTUM: „%c”: érvénytelen formátumkarakter" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: a coproc [%d:%s] még mindig létezik" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "hibás csővezeték" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: a maximális eval beágyazási szint túllépve (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: a maximális source beágyazási szint túllépve (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: a maximális függvénybeágyazási szint túllépve (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: korlátozott: nem adható meg „/” a parancsok nevében" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: parancs nem található" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: rossz parancsértelmező" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: a bináris nem hajtható végre: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s”: egy speciális beépített parancs" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "nem lehet duplikálni a(z) %d. fájlleírót a(z) %d. helyre" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "a kifejezés rekurziókorlátot" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "alulcsordult a rekurziós verem" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "szintaktikai hiba a kifejezésben" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "nem változóhoz próbált értéket rendelni" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "szintaktikai hiba a változó-értékadásban" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "0-val osztás" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bug: rossz expassign token" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "„:” egy feltételkifejezés szükséges" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "0-nál kisebb kitevő" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "prefix növelés vagy csökkentés után azonosító kell következzen" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "hiányzó „)”" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "szintaktikai hiba: operandus kell következzen" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "szintaktikai hiba: érvénytelen aritmetikai operátor" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (hibás token: „%s”)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "érvénytelen számrendszer" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: sorok száma érvénytelen" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "túl nagy érték a számrendszerhez" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: hibás kifejezés\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: nem érhetőek el a szülőkönyvtárak" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "nem lehet újraindítani a nodelay módot a(z) %d. fájlleíróhoz" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"nem lehet új fájlleírót foglalni a bash bemenetéhez a(z) %d. fájlleíróból" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: már van puffer a(z) %d. fájlleíróhoz" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp csővezeték" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "a(z) %d számú forkolt pid a(z) %d számú munkában jelent meg" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "%d. számú megállított munka törlése a %ld számú folyamatcsoporttal" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: %5ld. folyamat (%s) még élőként van jelölve" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: nincs ilyen pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "%d. szignál" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Kész" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Megállítva" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Megállítva(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Fut" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Kész(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Kilépett(%d)" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Ismeretlen állapot" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core készült) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (mk: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "gyermek setpgid (innen: %ld ide: %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: %ld. számú folyamat nem gyermeke ennek a parancsértelmezőnek" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Nincs bejegyzés %ld. számú folyamatról" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: %d. számú munka le lett állítva" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: nincs ilyen munka" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: a munka be lett fejezve" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: %d. számú munka már a háttérben van" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: WNOHANG bekapcsolása a korlátlan blokk elkerülésére" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: %d. sor: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core készült)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(mk most: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp sikertelen" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: nincs munkakezelés a háttérben" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: line discipline" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "nem állítható be a terminál folyamatcsoportja (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "nincsen munkakezelés ebben a parancsértelmezőben" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: nem teljesülő feltételezés: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: téves feltételezés\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "ismeretlen" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: a szabadlistán lévő blokk felülírva" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: már felszabadított blokkal lett hívva" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: nem lefoglalt blokkal lett hívva" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: alulcsordulást érzékelt; mh_nbytes kívül esik a tartományon" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: alulcsordulást érzékelt; mh_nbytes kívül esik a tartományon" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: kezdő- és záródarab mérete eltér" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: nem lefoglalt blokkal lett hívva" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: alulcsordulást érzékelt; mh_nbytes kívül esik a tartományon" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: alulcsordulást érzékelt; mh_nbytes kívül esik a tartományon" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: kezdő- és záródarab mérete eltér" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: foglalótábla tele van FIND_ALLOC-kal?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p már a táblában lefoglaltként?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p már a táblában szabadként?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "érvénytelen számrendszer" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: ismeretlen gépnév" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: érvénytelen szolgáltatás" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: hibás hálózatiútvonal-megadás" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "a hálózati műveletek nincsenek támogatva" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: nem lehet területi beállításokat váltani (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: nem lehet területi beállításokat váltani (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: nem lehet területi beállításokat váltani (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: nem lehet területi beállításokat váltani (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Levél a következőben: $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Új levél a következőben: $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "A(z) „%s” helyen lévő levél el van olvasva\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "szintaktikai hiba: aritmetikai kifejezés szükséges" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "szintaktikai hiba: váratlan „;”" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "szintaktikai hiba: „((%s))”" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: hibás utasítástípus: %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "a(z) %d. sorban kezdett heredocot EOF zárja („%s” helyett)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: %d. átirányító utasítás kívül esik a tartományon" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: a shell_input_line_size (%zu) meghaladja a MÉRET_MAXIMUM értékét " +"(%lu): a sor csonkolva" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "a maximális here-document szám túllépve" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "váratlan EOF „%c” helyett" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "váratlan EOF „]]” helyett" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "szintaktikai hiba a feltételben: váratlan token: „%s”" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "szintaktikai hiba a feltételben" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "váratlan token (%s) „)” helyett" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "„)” szükséges" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "váratlan argumentum (%s) feltételes egyoperandusú operátorhoz" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "váratlan argumentum feltételes egyoperandusú operátorhoz" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "váratlan token (%s), feltételes kétoperandusú operátor szükséges" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "feltételes kétoperandusú operátor szükséges" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "váratlan argumentum (%s) feltételes kétoperandusú operátorhoz" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "váratlan argumentum feltételes kétoperandusú operátorhoz" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "váratlan token (%c) feltételes parancsban" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "váratlan token (%s) feltételes parancsban" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "váratlan token (%d) feltételes parancsban" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "szintaktikai hiba „%s” váratlan token közelében" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "szintaktikai hiba „%s” közelében" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "szintaktikai hiba: váratlan fájlvége" + +#: parse.y:6365 +msgid "syntax error" +msgstr "szintaktikai hiba" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "„%s” használatával lehet elhagyni a parancsértelmezőt.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "váratlan EOF „)” helyett" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "kiegészítés: nem található „%s” függvény" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: lehetséges újrapróbálási hurok" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: hibás csatlakozó (%d)" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: érvénytelen fájlleíró" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL fájlmutató" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: „%c”: érvénytelen formátumkarakter" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "fájlleíró kívül esik a tartományon" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: kétértelmű átirányítás" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: nem lehet felülírni létező fájlt" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: korlátozott: nem lehet átirányítani a kimenetet" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "nem lehet a heredocnak átmeneti fájlt létrehozni: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: nem lehet változóhoz fájlleírót rendelni" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port nincs támogatva hálózat nélkül" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "átirányítási hiba: nem lehet duplikálni a fájlleírót" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "nem található /tmp, hozza létre!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp érvényes könyvtárnév kell legyen" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "a csinos kiírási mód mellőzve van interaktív az parancsértelmezőkben" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: érvénytelen kapcsoló" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "az uid nem állítható be %d értékre: a hatásos uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "a gid nem állítható be %d értékre: a hatásos gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "nem indítható el a hibakereső; a hibakeresési mód letiltva" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: ez egy könyvtár" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Nincs nevem!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, %s-(%s) verzió\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Használat:\t%s [GNU hosszú kapcsoló] [kapcsoló] ...\n" +"\t%s [GNU hosszú kapcsoló] [kapcsoló] parancsfájl ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU hosszú kapcsolók:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Parancsértelmező-kapcsolók:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD vagy -c parancs vagy -O shopt_option\t\t(csak hívás)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s vagy -o kapcsoló\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"A „%s -c \"help set\"” további információt ad a parancsértelmező-" +"beállításokról.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "A „%s -c help” további információt ad a beépített parancsokról.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "A „bashbug” paranccsal jelenthet hibákat.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "a bash honlapja: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Általános segítség a GNU szoftverek használatához: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: érvénytelen művelet" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Hibás szignál" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Bontás" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Megszakítás" + +#: siglist.c:58 +msgid "Quit" +msgstr "Abbahagyás" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Érvénytelen utasítás" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT utasítás" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT utasítás" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Lebegőpontos kivétel" + +#: siglist.c:86 +msgid "Killed" +msgstr "Kilőve" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Buszhiba" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Szegmenshiba" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Rossz rendszerhívás" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Törött csővezeték" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Ébresztés" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Befejezve" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Sürgős IO körülmény" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Megállítva (szignál)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Folytatás" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Gyermek halála vagy megállítása" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Megállítva (konzolbemenet)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Megállítva (konzolkimenet)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "IO kész" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU-korlátozás" + +#: siglist.c:154 +msgid "File limit" +msgstr "Fájlkorlátozás" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Ébresztés (virtuális)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Ébresztés (profilozás)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Ablak változott" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Elveszett zárolás" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Felhasználói 1." + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Felhasználói 2." + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT bemeneti adat vár" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "táphiba fenyeget" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "rendszerleállás fenyeget" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "folyamat átvitele másik CPU-ra" + +#: siglist.c:198 +msgid "programming error" +msgstr "programozási hiba" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT monitor mód megadva" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT monitor mód visszavonva" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT hangfolyamat befejezve" + +#: siglist.c:214 +msgid "Information request" +msgstr "Információkérés" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "%d. számú ismeretlen szignál" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "hibás helyettesítés: nincs záró „%s” a következőben: %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: lista nem adható tömbelemnek értékül" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "nem hozható létre a csővezeték a folyamatbehelyettesítéshez" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "nem hozható létre a gyermek a folyamatbehelyettesítéshez" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "nem nyitható meg olvasásra a(z) %s csővezeték" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "nem nyitható meg írásra a(z) %s csővezeték" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "nem duplikálható a(z) %s csővezeték %d. fájlleíróként" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "parancshelyettesítés: figyelmen kívül hagyott null bájt a bemeneten" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "nem hozható létre csővezeték a parancsbehelyettesítéshez" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "nem hozható létre gyermek a parancsbehelyettesítéshez" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: nem duplikálható a csővezeték 1. fájlleíróként" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: érvénytelen változóérték a névhivatkozáshoz" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: az indirekt kiegészítés érvénytelen" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: érvénytelen változónév" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: a paraméter nincs beállítva" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: a paraméter null vagy nincs beállítva" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: részkarakterlánc-kifejezés < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: rossz helyettesítés" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: nem lehet így értéket adni" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"a parancsértelmező későbbi verziói kötelezővé teszik majd az aritmetikai " +"kiértékelést" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "hibás helyettesítés: nincs záró „`” a következőben: %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "nincs találat: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argumentum szükséges" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: egész kifejezés szükséges" + +#: test.c:265 +msgid "`)' expected" +msgstr "„)” szükséges" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "„)” szükséges %s helyett" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: kétoperandusú operátor szükséges" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: egyoperandusú operátor szükséges" + +#: test.c:881 +msgid "missing `]'" +msgstr "hiányzó „]”" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "szintaktikai hiba: váratlan „;”" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "érvénytelen szignálszám" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "elfogáskezelő: a legnagyobb elfogáskezelő-szint túllépve (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: rossz érték a trap_list[%d]-ban: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: szignálkezelő a SIG_DFL, %d (%s) újraküldése önmagunknak" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: rossz szignál: %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "hiba a függvénydefiníció betöltésekor: „%s”" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "a parancsértelmező szintje (%d) túl magas, visszaállítás 1-re" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: nincs függvénykörnyezet az aktuális látókörben" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: nem lehet a változóhoz értéket rendelni" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: egész szám hozzárendelése a névhivatkozáshoz" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: nincs függvénykörnyezet az aktuális látókörben" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s exportstr-je null" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "érvénytelen karakter (%d) %s exportstr-jében" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "nincs „=” %s exportstr-jében" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: shell_variables feje nem egy függvénykörnyezet" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: nincs global_variables környezet" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: shell_variables feje nem egy átmeneti környezeti látókör" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: nem nyitható meg FILE-ként" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: érvénytelen érték a trace fájlleíróhoz" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: a kompatibilitási érték kívül esik a tartományon" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"A licenc GPLv3+: a GNU GPL 3. vagy újabb változata\n" +"\n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, %s (%s) verzió\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Ez egy szabad szoftver, terjesztheti és/vagy módosíthatja." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "NINCS GARANCIA, a törvény által engedélyezett mértékig." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: nem lehetséges %lu byte foglalása (%lu byte lett foglalva)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: nem lehetséges %lu byte foglalása" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d nem lehetséges %lu byte foglalása (%lu byte lett foglalva)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d nem lehetséges %lu byte foglalása" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [név[=érték] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] név [név ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m kiosztás] [-f fájlnév] [-q név] [-u név] [-r billkomb] " +"[-x billkomb:shell-parancs] [billkomb:readline-függvény vagy readline-" +"parancs]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [kif]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [ktár]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] parancs [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [név[=érték] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] név[=érték] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [kapcsoló] név[=érték] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f fájlnév] [név ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts opciók név [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a név] [parancs [argumentumok ...]] [átirányítás ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e ename] [-lnr] [első] [utolsó] vagy fc -s [minta=csere] [parancs]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [munkaszám]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [munkaszám ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p útvonal] [-dt] [név ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [minta ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d szám] [n] vagy history -anrw [fájlnév] vagy history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [munkaszám ...] vagy jobs -x parancs [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [munkaszám ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s szignál | -n szignálszám | -szignál] pid | munkaszám ... vagy kill -" +"l [szignál]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a tömb] [-d elválasztó] [-i szöveg] [-n szám] [-N szám] [-p " +"prompt] [-t időkeret] [-u fd] [név ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o beállításnév] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [név ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [név[=érték] ...] vagy export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [név[=érték] ...] vagy readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source fájlnév [argumentumok]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". fájlnév [argumentumok]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [kifejezés]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] szignál ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] név [név ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [korlát]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mód]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NÉV [in SZAVAK ... ] ; do PARANCSOK; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( kif1; kif2; kif3 )); do PARANCSOK; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NÉV [in SZAVAK ... ;] do PARANCSOK; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] csővezeték" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case SZÓ in [MINTA [| MINTA]...) PARANCSOK ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if PARANCSOK; then PARANCSOK; [ elif PARANCSOK; then PARANCSOK; ]... [ else " +"PARANCSOK; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while PARANCSOK; do PARANCSOK; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until PARANCSOK; do PARANCSOK; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NÉV] parancs [átirányítások]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function név { PARANCSOK ; } vagy név () { PARANCSOK ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ PARANCSOK ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "munkaszám [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( kifejezés ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ kifejezés ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Néhány parancsértelmező-változó neve és jelentése" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | ktár]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optnév ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v változó] formátum [argumentumok]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o beállítás] [-A művelet] [-G " +"globminta] [-W szólista] [-F függvény] [-C parancs] [-X szűrőminta] [-P " +"prefixum] [-S szuffixum] [név ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o beállítás] [-A művelet] [-G globminta] [-W " +"szólista] [-F függvény] [-C parancs] [-X szűrőminta] [-P prefixum] [-S " +"szuffixum] [szó]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o beállítás] [-DEI] [név ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d elválasztó] [-n szám] [-O kezdet] [-s szám] [-t] [-u fd] [-C " +"parancs] [-c távolság] [tömb]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d elválasztó] [-n szám] [-O kezdet] [-s szám] [-t] [-u fd] [-C " +"parancs] [-c távolság] [tömb]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Aliasok definiálása vagy kiírása.\n" +" \n" +" Argumentumok nélkül az „alias” kiír egy újrahasználható listát a " +"meglévő\n" +" aliasokról „alias NÉV=ÉRTÉK' formában a szabványos kimenetre.\n" +" \n" +" Különben egy NÉV nevű aliast definiál ÉRTÉK értékkel. Az ÉRTÉK végén a\n" +" záró szóköz lehetővé teszi a következő szó számára is az\n" +" aliashelyettesítést.\n" +" \n" +" Kapcsolók:\n" +" -p\tkiír minden aliast a fenti formában\n" +" \n" +" Kilépési kód:\n" +" igazzal tér vissza, kivéve ha nincs megadott NÉV nevű alias definiálva." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Minden NÉV eltávolítása a definiált aliasok közül.\n" +" \n" +" Kapcsolók:\n" +" -a\tminden definíció törlése\n" +" \n" +" Sikeresen tér vissza, kivéve ha nincs megadott NÉV nevű alias." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Readline billentyűkötések és változók beállítása.\n" +" \n" +" Egy billentyűsorozat hozzárendelése Readline függvényhez vagy makróhoz,\n" +" vagy Readline változó beállítása. A beállítás nélküli szintaxis " +"megegyezik\n" +" az ~/.inputrc-ben találhatóval, de kell legyen egy argumentuma:\n" +" pl. bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Kapcsolók:\n" +" -m kiosztás A KIOSZTÁS használata kiosztásként a parancs " +"hatásának\n" +" idejére. Elfogadható kiosztásnevek: emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-\n" +" move, vi-command és vi-insert.\n" +" -l Nevek és függvények listázása.\n" +" -P Függvénynevek és kötések listázása.\n" +" -p Függvények és kötések listázása újrahasználható\n" +" formában.\n" +" -S Makrókat végrehajtó billentyűkombinációk és " +"értékeik\n" +" listázása.\n" +" -s Makrókat végrehajtó billentyűkombinációk és " +"értékeik\n" +" listázása újrahasználható formában.\n" +" -V Változónevek és értékek listázása.\n" +" -v Változónevek és értékek listázása újrahasználható\n" +" formában.\n" +" -q függvénynév A függvényhez tartozó billentyűkombináció " +"lekérése.\n" +" -u függvénynév Össze adott függvényhez tartozó " +"billentyűkombináció\n" +" törlése.\n" +" -r billkomb A BILLKOMB-hoz tartozó kötések törlése.\n" +" -f fájlnév Kötések olvasása FÁJLNÉV fájlból.\n" +" -x billkomb:shell-parancs\tSHELL-PARANCS végrehajtása BILLKOMB-ra.\n" +" -X A -x használatával kötött billentyűkombinációk\n" +" és a társított parancsok kiírása, bemenetként\n" +" újrahasználható formában.\n" +" \n" +" Kilépési kód:\n" +" a bind 0-val tér vissza, ha nincs ismeretlen kapcsoló vagy hiba." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Kilépés a for, while vagy until ciklusokból.\n" +" \n" +" Kilépés egy FOR, WHILE vagy UNTIL ciklusból. Ha N meg van adva, akkor N\n" +" egymásba ágyazott ciklusból lép ki.\n" +" \n" +" Kilépési kód:\n" +" A kilépési kód 0, ha N >= 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"A for, while vagy until ciklus újrakezdése.\n" +" \n" +" A következő iterációtól folytatja a FOR, WHILE vagy UNTIL ciklust.\n" +" Ha N meg van adva, akkor N egymásba ágyazott ciklusból lép ki.\n" +" \n" +" Kilépési kód:\n" +" A kilépési kód 0, ha N >= 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Beépített parancsok végrehajtása.\n" +" \n" +" Végrehajtja SHELL-BUILTIN-t ARG argumentumokkal parancskeresés nélkül.\n" +" Ez akkor hasznos, ha felül szeretne definiálni egy beépített parancsot\n" +" függvényként, de ebből meg szeretné hívni az eredeti parancsot.\n" +" \n" +" Kilépési kód:\n" +" Továbbadja a SHELL-BUILTIN kilépési kódját vagy hamissal tér vissza,\n" +" ha nincs ilyen parancs." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Az aktuális szubrutinhívás környezetének visszaadása.\n" +" \n" +" KIF nélkül \"$sor $fájlnév\" formátumú eredményt ad. A KIF-fel pedig\n" +" \"$sor $szubrutin $fájlnév\" formátumút; ez hasznos lehet stack trace\n" +" kiírásához.\n" +" \n" +" Az EXPR értéke azt adja meg, hogy a jelenlegihez képest milyen mélyre\n" +" lépjen vissza; a verem tetején a 0-s keret van.\n" +" \n" +" Kilépési kód:\n" +" 0-val tér vissza, ha érvényes a KIF és valóban függvényt hajt végre a\n" +" parancsértelmező." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"A parancsértelmező munkakönyvtárának váltása.\n" +" \n" +" A munkakönyvtár átváltása a KTÁR-ra. Elhagyása esetén a HOME környezeti\n" +" változóban lévő könyvtárra vált.\n" +" \n" +" A CDPATH környezeti változó adja meg a KTÁR keresési útvonalait. Az\n" +" útvonalakat kettőspont (:) választja el. Egy üres könyvtárnév az " +"aktuális\n" +" könyvtárat jelenti. Ha a KTÁR „/” jellel kezdődik, a CDPATH értéke\n" +" nincs figyelembe véve.\n" +" \n" +" Ha a könyvtár nem létezik, és a „cdable_vars” parancsértelmező-" +"beállítás\n" +" aktív, a KTÁR változónévként lesz használva. Ha a változónak van\n" +" értéke, az lesz KTÁR-értékként használva.\n" +" \n" +" Kapcsolók:\n" +" -L\tszimbolikus linkek szigorú követése\n" +" -P\ta fizikai könyvtárfa használata a szimbolikus linkek követése\n" +" helyett: szimbolikus linkek feloldása a KTÁR-ban a „..” \n" +" \t\telőfordulásainak feldolgozása előtt\n" +" -e\tha a -P kapcsoló meg van adva, és az aktuális munkakönyvtár\n" +" \t\tnem határozható meg sikeresen, kilépés nem nulla állapottal\n" +" -@\taz azt támogató rendszereken a kibővített attribútumokkal\n" +" \t\trendelkező fájlok megjelenítése a fájlattribútumokat tartalmazó\n" +" \t\tkönyvtárként\n" +" \n" +" Az alapértelmezett a szimbolikus linkek követése, mintha „-L” lenne\n" +" megadva.\n" +" A „..” feldolgozása a közvetlenül előtte lévő útvonalnév-összetevő\n" +" eltávolításával történik, visszamenve egy osztásjelig vagy a KTÁR " +"kezdetéig.\n" +" \n" +" Kilépési kód:\n" +" 0-val tér vissza, ha könyvtárat váltott és ha a -P használatakor a $PWD\n" +" sikeresen beállításra kerül; más értéket különben." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Az aktuális munkakönyvtár útvonalának kiírása.\n" +" \n" +" Kapcsolók:\n" +" -L\t$PWD értékének kiírása, ha az a munkakönyvtár érvényes neve\n" +" -P\ta fizikai könyvtár kiírása, szimbolikus linkek nélkül\n" +" \n" +" Az alapértelmezett a szimbolikus linkek követése, mintha „-L” lenne\n" +" megadva.\n" +" \n" +" Kilépési kód:\n" +" 0-val tér vissza, kivéve ha érvénytelen kapcsolót kapott vagy nem lehet\n" +" olvasni a munkakönyvtárat." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Nincs művelet.\n" +" \n" +" Nincs hatása, a parancs nem csinál semmit.\n" +" \n" +" Kilépési kód:\n" +" Mindig sikeres." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Sikeres visszatérés.\n" +" \n" +" Kilépési kód:\n" +" Mindig sikeres." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Sikertelen visszatérés.\n" +" \n" +" Kilépési kód:\n" +" Mindig sikertelen." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Parancs végrehajtása vagy információk megjelenítése róla.\n" +" \n" +" Végrehajtja a PARANCS parancsot ARGUMENTUMOK argumentumokkal a\n" +" függvényfeloldás végrehajtása nélkül; vagy információt jelenít meg a\n" +" parancsról. Használható programok futtatására, ha azonos nevű függvény\n" +" létezik.\n" +" \n" +" Kapcsolók:\n" +" -p alapértelmezett érték használata PATH helyett, amely\n" +" garantáltan megtalál minden szabványos eszközt\n" +" -v egy leírást ad a PARANCS parancsról a „type” beépített\n" +" parancshoz hasonló módon\n" +" -V részletesebb leírást ad minden PARANCSRÓL\n" +" \n" +" Kilépési kód:\n" +" A PARANCS kilépési kódjával tér vissza, vagy hibát jelez, ha nem\n" +" található a PARANCS." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Változóértékek és attribútumok beállítása.\n" +" \n" +" Változók deklarálása és attribútumok megadása. Ha nincs NÉV megadva,\n" +" kiírja az összes változó attribútumait és értékét.\n" +" \n" +" Kapcsolók:\n" +" -f\tművelet és megjelenítés korlátozása függvénynevekre és\n" +" \t\t-definíciókra\n" +" -F\tmegjelenítés korlátozása függvénynevekre (és sor számára,\n" +" \t\tvalamint a forrásfájl nevére hibakereséskor)\n" +" -g\tglobális változók létrehozása parancsértelmező-függvényben való\n" +" \t\thasználatkor, egyébként figyelmen kívül marad\n" +" -p\tminden NÉV attribútumainak és értékének kiírása\n" +" \n" +" Attribútumokat állító kapcsolók:\n" +" -a\tNÉV indexelt tömbbé alakítása (ha támogatott)\n" +" -A\tNÉV asszociatív tömbbé alakítása (ha támogatott)\n" +" -i\tminden NÉV kapjon „integer” attribútumot\n" +" -l\tminden NÉV értékének kisbetűssé konvertálása értékadáskor\n" +" -n\ta NÉV hivatkozás legyen az értékében megadott változóra\n" +" -r\tminden NÉV legyen csak olvasható\n" +" -t\tminden NÉV kapjon „trace” attribútumot\n" +" -u\tminden NÉV értékének nagybetűssé konvertálása értékadáskor\n" +" -x\tminden NÉV exportálása\n" +" \n" +" A „-” helyett „+” használata kikapcsolja az adott attribútumot.\n" +" \n" +" Az integer attribútummal rendelkező változókhoz való értékadáskor\n" +" aritmetikai kiértékelés történik (lásd a „let” parancsot).\n" +" \n" +" Függvénytörzsben „declare”-t használva minden NÉV helyi lesz, hasonlóan\n" +" a „local” parancshoz. A „-g” kapcsoló elnyomja ezt a viselkedést.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót kap, vagy " +"értékadási\n" +" hiba történik." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Változóértékek és attribútumok beállítása.\n" +" \n" +" A „declare” szinonimája. Lásd: „help declare”." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Helyi változók definiálása.\n" +" \n" +" Egy NÉV nevű helyi változót hoz létre, és ÉRTÉK értéket ad neki.\n" +" A KAPCSOLÓ tetszőleges, a „declare” által elfogadott kapcsoló lehet.\n" +" \n" +" A helyi változók csak a függvényen belül használhatóak, nem láthatóak\n" +" az őket definiáló függvényen és annak gyermekein kívül.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót kap, értékadási\n" +" hiba történik, vagy nem függvényben lett hívva." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Argumentumok szabványos kimenetre írása.\n" +" \n" +" Argumentumok és egy újsor kiírása a szabványos kimenetre.\n" +" \n" +" Kapcsolók:\n" +" -n\tne fűzzön hozzá újsort\n" +" -e\taz alábbi escape-szekvenciák értelmezése\n" +" -E\tescape-szekvenciák értelmezésének tiltása\n" +" \n" +" Az „echo”a következő visszaper-escape-karaktereket értelmezi:\n" +" \\a\tterminálcsengő\n" +" \\b\tvisszatörlés (backspace)\n" +" \\c\ttovábbi kimenet elnyelése\n" +" \\e\tescape-karakter\n" +" \\E\tescape-karakter\n" +" \\f\tlapdobás-karakter\n" +" \\n\tújsor-karakter\n" +" \\r\tkocsivissza-karakter\n" +" \\t\tvízszintes tabulátor\n" +" \\v\tfüggőleges tabulátor\n" +" \\\\\tvisszaper (\\)\n" +" \\0nnn\taz oktális NNN ASCII-kódú karakter. NNN 0–3\n" +" \t\toktális számjegy lehet\n" +" \\xHH\taz a 8 bites karakter, amelynek értéke HH\n" +" \t\t(hexadecimálisan). HH egy vagy két hexaszámjegy lehet\n" +" \\uHHHH\ta Unicode karakter, amely értéke a HHHH hexadecimális\n" +" \t\térték. A HHHH 1-4 hexaszámjegy lehet.\n" +" \\UHHHHHHHH a Unicode karakter, amely értéke a HHHHHHHH hexadecimális\n" +" \t\térték. A HHHHHHHH 1-8 hexaszámjegy lehet.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve írási hiba esetén." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Argumentumok szabványos kimenetre írása.\n" +" \n" +" Argumentumok és egy újsor kiírása a szabványos kimenetre.\n" +" \n" +" Kapcsolók:\n" +" -n\tne fűzzön hozzá újsort\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve írási hiba esetén." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Parancsértelmező beépített parancsainak engedélyezése és tiltása.\n" +" \n" +" Beépített parancsokat engedélyez és tilt. Egy parancs letiltásával az\n" +" elérési út beírása nélkül lehet beépített paranccsal megegyező nevű\n" +" programot futtatni.\n" +" \n" +" Kapcsolók:\n" +" -a\ta beépített parancsok és azok állapotának listázása\n" +" -n\tminden NÉV tiltása vagy a tiltott parancsok listázása\n" +" -p\ta beépített parancsokat listázza újrahasználható formában\n" +" -s\tcsak a Posix „special” beépített parancsokat listázza\n" +" \n" +" Dinamikus betöltést szabályozó kapcsolók:\n" +" -f\tNÉV nevű beépített parancs betöltése a FÁJLNÉV megosztott\n" +" \t\tobjektumfájlból\n" +" -d\tegy -f kapcsolóval betöltött parancs eltávolítása\n" +" \n" +" Kapcsolók nélkül minden NÉV engedélyezésre kerül\n" +" \n" +" A beépített parancs helyett a $PATH-ban található „test” használatához\n" +" használja az „enable -n test” parancsot.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a NÉV nem egy beépített parancs, vagy\n" +" hiba történt." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Argumentumok végrehajtása parancsként.\n" +" \n" +" Az argumentumokat összefűzi, és az eredményt egy parancssorként hajtja\n" +" végre a parancsértelmező.\n" +" \n" +" Kilépési kód:\n" +" A parancs kilépési kódjával tér vissza, vagy sikerrel, ha üres a parancs." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Kapcsolók értelmezése.\n" +" \n" +" A getopts parancsot arra használják az eljárások, hogy pozicionális\n" +" paramétereket kapcsolókként értelmezzenek.\n" +" \n" +" A KAPCSOLÓK azokat a betűket tartalmazza, amelyeket fel kell ismerni.\n" +" Ha egy kapcsolót kettőspont követ, a kapcsoló kötelező paramétert vár.\n" +" Ezt a paramétert szóközzel kell elválasztani a kapcsolótól.\n" +" \n" +" Minden végrehajtáskor a getopts a $név változóba helyezi a következő\n" +" kapcsolót (szükség esetén inicializálva a változót). A kapcsoló indexe\n" +" az OPTIND változóba kerül. Az OPTIND változót a parancsértelmező " +"induláskor\n" +" 1-re inicializálja. Ha a kapcsolónak paramétere van, ennek értéke\n" +" az OPTARG változóba kerül.\n" +" \n" +" A getopts két módon tud hibát jelezni. Elnémítható a hibajelzés az " +"OPCIÓK\n" +" kettősponttal való kezdésével. Ebben a módban nem kerül kiírásra\n" +" hibaüzenet. Ha a getopts érvénytelen opciót talál, ezt az OPTARG\n" +" változóba írja. Ha hiányzik egy kötelező paraméter, a $név változóba " +"egy\n" +" kettőspont kerül, és a talált karakter az OPTARG-ba kerül.\n" +" Ha a getopts nincs néma módban, és érvénytelen kapcsolót talál, $NÉV-be\n" +" egy kérdőjel kerül, az OPTARG törlésre kerül, és hibaüzenetet ír ki.\n" +" \n" +" Ha az OPTERR változó 0-ra van állítva, a getopts letiltja a " +"hibaüzenetet,\n" +" akkor is, ha nem kettősponttal kezdődik az OPCIÓK. Az OPTERR alapértéke " +"1.\n" +" \n" +" A getopts alapvetően a pozicionális paramétereket értelmezi ($0–$9), de\n" +" több argumentum esetén mindet kezeli.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha kapcsolót talált, sikertelenül, ha elfogytak a\n" +" kapcsolók, vagy hiba történt." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"A parancsértelmező felváltása a megadott paranccsal.\n" +" \n" +" A PARANCS végrehajtása, kicserélve a parancsértelmezőt a megadott\n" +" programmal. Az ARGUMENTUMOK lesznek a PARANCS argumentumai. Ha nincs\n" +" PARANCS megadva, a futó parancsértelmezőben kerülnek érvényesítésre\n" +" az átirányítások.\n" +" \n" +" Kapcsolók:\n" +" -a név\ta NÉV átadása a PARANCSNAK $0-ként\n" +" -c\ta PARANCS végrehajtása üres környezettel\n" +" -l\ta PARANCSNAK egy „-” átadása $0-ként\n" +" \n" +" Ha a parancs nem hajtható végre, a nem interaktív parancsértelmező " +"kilép,\n" +" kivéve, ha az „execfail” parancsértelmező-beállítás él.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve, ha a PARANCS nem található vagy sikertelen\n" +" az átirányítás." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Kilépés a parancsértelmezőből.\n" +" \n" +" Kilép a parancsértelmezőből N kilépési kóddal. Ha az N hiányzik, az " +"utolsó\n" +" parancs kilépési kódjával lép ki." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Kilépés a bejelentkező parancsértelmezőből.\n" +" \n" +" Kilép a bejelentkező parancsértelmezőből az N kilépési kóddal. Hibával\n" +" tér vissza, ha nem bejelentkező parancsértelmezőből hívják." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Parancsok megjelenítése vagy végrehajtása az előzményből.\n" +" \n" +" Az fc segítségével lehet korábbi parancsokat kiírni, módosítani és " +"újból\n" +" végrehajtani.\n" +" Az ELSŐ és UTOLSÓ lehetnek egy tartományt meghatározó számok, vagy az " +"ELSŐ\n" +" lehet egy karakterlánc, amely az utolsó így kezdődő parancsot jelöli.\n" +" \n" +" Kapcsolók:\n" +" -e ENAME\tszerkesztő kiválasztása. Az alapértelmezett az FCEDIT,\n" +" \t\tmajd EDITOR, végül a vi\n" +" -l\tszerkesztés helyett a sorok listázása\n" +" -n\tsorok számának elhagyása listázáskor\n" +" -r\tsorrend megcserélése (legújabbakkal kezdi a listázást)\n" +" \n" +" Az „fc -s [minta=csere] [parancs]” formával PARANCS... újból " +"végrehajtásra\n" +" kerül, miután a régi=új behelyettesítés megtörtént.\n" +" \n" +" Hasznos lehet az „alias r='fc -s'” használata, mivel így pl. az „r cc”\n" +" parancs végrehajtja az utolsó „cc”-vel kezdődő parancsot, míg „r” meg-\n" +" ismétli az utolsó parancsot.\n" +" \n" +" Kilépési kód:\n" +" Sikert vagy a végrehajtott parancs kilépési kódját adja; nullától " +"eltérőt\n" +" hiba esetén." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Munka előtérbe hozása.\n" +" \n" +" A MUNKASZÁM által meghatározott munkát az előtérbe hozza, az aktuális\n" +" munkává téve azt. Ha nincs MUNKASZÁM, a parancsértelmező által " +"megjegyzett\n" +" aktuális munkára vonatkozik a parancs.\n" +" \n" +" Kilépési kód:\n" +" Az előtérbe hozott parancs állapota (annak kilépésekor), vagy nem nulla\n" +" hiba esetén." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Munka háttérbe küldése.\n" +" \n" +" A MUNKASZÁM által meghatározott munkákat háttérbe küldi, mintha „&”\n" +" jellel a parancs végén lettek volna indítva. Ha nincs MUNKASZÁM, a\n" +" parancsértelmező által megjegyzett aktuális munkára vonatkozik a " +"parancs.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a munkakezelés le van tiltva, vagy\n" +" hiba történt." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Programok helyének megjegyzése vagy megjelenítése.\n" +" \n" +" Meghatározza és megjegyzi minden megadott NÉV parancs teljes útvonalát.\n" +" Ha nincs NÉV megadva, az összes megjegyzett parancsot listázza.\n" +" \n" +" Kapcsolók:\n" +" -d\tminden megjegyzett NÉV helyének elfelejtése\n" +" -l\tbemenetként újrahasználható formátumban listázzon\n" +" -p útvonal\taz ÚTVONAL használata a NÉV teljes útvonalaként\n" +" -r\tminden megjegyzett hely elfelejtése\n" +" -t\tminden megadott NÉV megjegyzett helyének kiírása,\n" +" \t\ttöbb név esetén a helyek előtt a NÉV kiírása\n" +" Argumentumok:\n" +" NÉV\tMinden NÉV megkeresése a $PATH-ban, és hozzáadása a\n" +" \t\tmegjegyzettek listájához.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve, ha a NÉV nem található vagy érvénytelen\n" +" kapcsolót kap." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Tájékoztatás megjelenítése beépített parancsokról.\n" +" \n" +" Rövid leírásokat jelenít meg a beépített parancsokról. Ha MINTA meg\n" +" van adva, részletes segítséget ad az összes illeszkedő parancsról,\n" +" különben a témákat listázza.\n" +" \n" +" Kapcsolók:\n" +" -d\tminden témáról rövid leírás listázása\n" +" -m\tman-szerű formátum használata\n" +" -s\tcsak rövid használati útmutató kiírása minden, a MINTÁNAK\n" +" \t\tmegfelelő témáról\n" +" \n" +" Argumentumok:\n" +" MINTA\tTémakört meghatározó minta\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha nincs találat vagy hibás kapcsolót kap." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Az előzmények megjelenítése vagy módosítása.\n" +" \n" +" Megjeleníti az előzménylistát sorszámokkal, minden módosított " +"bejegyzést\n" +" az elején „*”-gal megjelölve. N megadása esetén az utolsó N\n" +" bejegyzést listázza.\n" +" \n" +" Kapcsolók:\n" +" -c\taz előzménylista törlése az összes bejegyzésének törlésével\n" +" -d eltolás\taz ELTOLÁS pozícióban lévő előzménybejegyzés törlése,\n" +" \t\ta negatív eltolások az előzménylista végétől számolnak vissza\n" +" -a\ta munkamenet előzménysorainak hozzáfűzése az előzményfájlhoz\n" +" -n\tminden olyan előzménysor beolvasása, amelyek még nem lettek\n" +" \t\tbeolvasva az előzményfájlból, és azok hozzáfűzése az\n" +" \t\telőzménylistához\n" +" -r\telőzményfájl beolvasása, és a tartalom hozzáfűzése az\n" +" \t\telőzménylistához\n" +" -w\taz aktuális előzmények előzményfájlba írása\n" +" \n" +" -p\telőzménykiegészítés végrehajtása minden ARGUMENTUMON, és az\n" +" \t\teredmény megjelenítése előzménylistán való tárolás nélkül\n" +" -s\tARGUMENTUMOK hozzáfűzése egyetlen bejegyzésként a listához\n" +" \n" +" Ha FÁJLNÉV is meg van adva, az lesz előzményfájlként használva. " +"Különben\n" +" a HISTFILE értéke, vagy ennek híján ~/.bash_history.\n" +" \n" +" Ha a HISTTIMEFORMAT változó be van állítva, és nem üres, akkor értéke\n" +" lesz használva az strftime(3) formátumparamétereként a kijelzett\n" +" bejegyzések időbélyegeinek megjelenítéséhez. Különben nem ír ki időt.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót kap, vagy hiba\n" +" történik." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Munkák állapotának megjelenítése.\n" +" \n" +" Listáz minden aktív munkát. MUNKASZÁM megadása esetén csak az adott\n" +" munka jelenik meg, különben az összes aktív.\n" +" \n" +" Kapcsolók:\n" +" -l\tfolyamatazonosítók megjelenítése a többi adaton túl\n" +" -n\tcsak azon folyamatok listázása, amelyek állapota változott\n" +" \t\taz utolsó értesítés óta\n" +" -p\tcsak folyamatazonosítók listázása\n" +" -r\tcsak a futó munkák megjelenítése\n" +" -s\tcsak a megállított munkák megjelenítése\n" +" \n" +" Ha -x meg van adva, PARANCS kerül futtatásra úgy, hogy minden " +"argumentum\n" +" a meghatározott munkához tartozó folyamatcsoport vezetőjének PID-jére\n" +" cserélődik.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha nem kap érvénytelen kapcsolót, és nem történik\n" +" hiba. -x használata esetén a PARANCS kilépési kódjával tér vissza." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Munkák eltávolítása az aktuális parancsértelmezőből.\n" +" \n" +" Eltávolít minden MUNKASZÁM munkát az aktív munkák táblájából. A " +"MUNKASZÁM\n" +" megadása nélkül a parancsértelmező által megjegyzett aktuális\n" +" munkát távolítja el.\n" +" \n" +" Kapcsolók:\n" +" -a\tminden munka eltávolítása, ha nincs MUNKASZÁM megadva\n" +" -h\tminden MUNKASZÁM megjelölése úgy, hogy nem kell továbbadni\n" +" \t\tnekik a parancsértelmező által kapott SIGHUP-ot\n" +" -r\tcsak futó munkák eltávolítása\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha nem kap érvénytelen kapcsolót vagy MUNKASZÁMOT" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Szignál küldése munkának.\n" +" \n" +" PID vagy MUNKASZÁM által meghatározott folyamatoknak a SZIGNÁL vagy\n" +" SZIGNÁLSZÁM szignál küldése. Ha sem a SZIGNÁL, sem a SZIGNÁLSZÁM nincs\n" +" megadva, akkor a SIGTERM az alapértelmezés.\n" +" \n" +" Kapcsolók:\n" +" -s sig\ta SIG egy szignálnév\n" +" -n sig\ta SIG egy szignálszám\n" +" -l\ta szignálnevek listázása; ha argumentumok követik a -l kapcsolót,\n" +" \t\takkor azok szignálszámoknak lesznek tekintve ahhoz, hogy mely\n" +" \t\tneveket kell listázni\n" +" -L\ta -l szinonimája\n" +" \n" +" A kill két okból beépített parancs: így lehetővé teszi munkaazonosítók\n" +" használatát folyamatazonosítók helyett, továbbá lehetségessé válik a\n" +" folyamatok kilövése, ha a folyamatok számának korlátja elérve.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha nem kap érvénytelen kapcsolót, vagy nem " +"történik\n" +" hiba." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Aritmetikai kifejezés kiértékelése.\n" +" \n" +" Minden ARGUMENTUM kiértékelése aritmetikai kifejezésként. A kiértékelés\n" +" fix szélességű egészek esetén túlcsordulás-ellenőrzés nélkül történik,\n" +" de a nullával való osztás hibát okoz. Az alábbi operátorok soronként\n" +" azonos precedenciaszinten vannak. A precedencia az alábbi sorrendben\n" +" csökken:\n" +" \n" +" \tid++, id--\tváltozó postfix-növelése, -csökkentése\n" +" \t++id, --id\tváltozó prefix-növelése, -csökkentése\n" +" \t-, +\t\tmínusz, plusz előjel\n" +" \t!, ~\t\tlogikai és bitenkénti negált\n" +" \t**\t\thatványozás\n" +" \t*, /, %\t\tszorzás, osztás, maradék\n" +" \t+, -\t\tösszeadás, kivonás\n" +" \t<<, >>\t\tbitenkénti eltolás balra, jobb\n" +" \t<=, >=, <, >\tösszehasonlítás\n" +" \t==, !=\t\tegyenlőség, egyenlőtlenség\n" +" \t&\t\tbitenkénti ÉS\n" +" \t^\t\tbitenkénti kizáró vagy (XOR)\n" +" \t|\t\tbitenkénti VAGY\n" +" \t&&\t\tlogikai ÉS\n" +" \t||\t\tlogikai VAGY\n" +" \tkif ? kif : kif\n" +" \t\t\tfeltételes operátor\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |= értékadás\n" +" \n" +" Parancsértelmező-változók is lehetnek operandusok. A változók nevének\n" +" helyére értékük kerül (fix szélességű egészként) a kifejezésben. Nem\n" +" kell a változók „integer” jellemzőjét beállítani a használathoz.\n" +" \n" +" Az operátorok a fenti precedencia szerint hajtódnak végre. A zárójeles\n" +" kifejezések precedenciája a legmagasabb – ez felülírja a szabályokat.\n" +" \n" +" Kilépési kód:\n" +" Ha az utolsó argumentum 0, a let 1-gyel tér vissza, különben 0-val." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Egy sor beolvasása a szabványos bemenetről, és mezőkre osztása.\n" +" \n" +" Egy sor beolvasása a szabványos bemenetről, vagy az FD fájlleíróból, ha\n" +" meg van adva a -u kapcsoló. A sor mezőkre lesz osztva a szódarabolás\n" +" szabályai szerint. Az első szó az első NÉV nevű változó értéke lesz, a\n" +" második a másodiké stb. A szóelválasztó karaktereket az $IFS adja meg.\n" +" \n" +" Ha nincs NÉV megadva, a beolvasott sor a REPLY változóba kerül.\n" +" \n" +" Kapcsolók:\n" +" -a tömb\ta beolvasott szavak TÖMB tömb 0-tól kezdve egymást követő\n" +" \t\tindexű elemeibe kerülnek\n" +" -d elválasztó\taz ELVÁLASZTÓ első karakteréig olvasson az újsor\n" +" \t\thelyett\n" +" -e\ta Readline használata a sor megszerzéséhez\n" +" -i szöveg\ta SZÖVEG használata kezdeti szövegként (Readline-hoz)\n" +" -n szám\tSZÁM karakter beolvasása után térjen vissza, ne várjon\n" +" \t\tújsorra, de vegye figyelembe az elválasztót, ha kevesebb\n" +" \t\tmint SZÁM karaktert olvasott be az elválasztóig\n" +" -N szám\tpontosan akkor térjen vissza, ha SZÁM karaktert olvasott\n" +" \t\tbe, kivéve az EOF elérését és az időtúllépést, az\n" +" \t\telválasztókat figyelmen kívül hagyva\n" +" -p prompt\tírja ki a PROMPT értékét olvasás előtt a sor elejére,\n" +" \t\tzáró újsor nélkül\n" +" -r\ttiltsa le a „\\” kezdetű escape-ek használatát\n" +" -s\tterminálról érkező bemenet ne visszhangozzon\n" +" -t idő\tIDŐ leteltével jelezzen hibát, ha nem tudott egy teljes\n" +" \t\tsort beolvasni. A $TMOUT változó értéke az alapértelmezett\n" +" \t\tidőkorlát. Az IDŐ lehet tizedestört is. Ha idő 0, csak akkor\n" +" \t\tlesz sikeres a beolvasás, ha az adott fájlleírón már\n" +" \t\tolvasható a bemenet. Időtúllépés esetén a kilépési kód >128\n" +" -u fd\tfájl beolvasása az FD. fájlleíróból a szabványos bemenet\n" +" \t\thelyett\n" +" \n" +" Kilépési kód:\n" +" A kilépési kód nulla, kivéve ha EOF-ot ér a beolvasás, időtúllépéskor\n" +" (ekkor > 128) vagy érvénytelen fájlleíró megadásakor a -u kapcsolónak." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Visszatér egy függvényből.\n" +" \n" +" Egy függvény vagy egy „source”-olt parancsfájl adott N kilépési kóddal\n" +" való visszatérését okozza. Ha N nincs megadva, az utolsó parancs " +"kilépési\n" +" kódjával tér vissza.\n" +" \n" +" Kilépési kód:\n" +" N-nel tér vissza, kivéve ha nem függvényből vagy parancsfájlból akar\n" +" visszatérni – ekkor sikertelenséget jelez." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Parancsértelmező-beállítások és pozicionális paraméterek állítása, törlése.\n" +" \n" +" Parancsértelmező-attribútumok és pozicionális paraméterek értékeinek\n" +" módosítása, parancsértelmező-változók neveinek és értékeinek kiírása.\n" +" \n" +" Kapcsolók:\n" +" -a A módosított vagy létrehozott változó exportálásra jelölése\n" +" -b Munka befejezéséről azonnali értesítés\n" +" -e Azonnali kilépés, ha egy parancs nem nullával lép ki\n" +" -f Fájlnév-generálás (globbing) tiltása\n" +" -h Parancsok helyének megjegyzése használatkor\n" +" -k Minden értékadó argumentum a parancs környezetébe kerül, nem\n" +" csak a parancsot megelőzők\n" +" -m Munkakezelés engedélyezése\n" +" -n Parancsok beolvasása végrehajtás nélkül\n" +" -o kapcsolónév\n" +" Kapcsolónév szerinti változóállítás:\n" +" allexport mint -a\n" +" braceexpand mint -B\n" +" emacs emacs-szerű sorszerkesztés\n" +" errexit mint -e\n" +" errtrace mint -E\n" +" functrace mint -T\n" +" hashall mint -h\n" +" histexpand mint -H\n" +" history előzmények tárolásának engedélyezése\n" +" ignoreeof EOF esetén nem lép ki a parancsértelmező\n" +" interactive-comments\n" +" interaktív parancsokban is lehetnek megjegyzések\n" +" keyword mint -k\n" +" monitor mint -m\n" +" noclobber mint -C\n" +" noexec mint -n\n" +" noglob mint -f\n" +" nolog jelenleg elfogadott, de mellőzött\n" +" notify mint -b\n" +" nounset mint -u\n" +" onecmd mint -t\n" +" physical mint -P\n" +" pipefail egy csővezeték-parancs kilépési kódja az utolsó\n" +" nem nullával kilépett parancs kilépési kódja,\n" +" vagy 0, ha nem volt ilyen\n" +" posix a bash viselkedésének megváltoztatása, ha az\n" +" alapértelmezett nem felel meg a Posix\n" +" szabványnak\n" +" privileged mint -p\n" +" verbose mint -v\n" +" vi vi-szerű sorszerkesztés\n" +" xtrace mint -x\n" +" -p Mindig be van kapcsolva, ha a valós és effektív felhasználó nem\n" +" egyezik. Letiltja az $ENV fájl értelmezését és a " +"parancsértelmező-\n" +" függvények betöltését. A kapcsoló kikapcsolása az effektív\n" +" uid és gid valósra állítását okozza\n" +" -t Egyetlen parancs beolvasása és végrehajtás után kilépés\n" +" -u Nem létező változók behelyettesítése legyen hiba\n" +" -v Beolvasott parancsok kiírása olvasáskor (értelmezés előtt).\n" +" -x Parancsok kiírása végrehajtáskor (értelmezés után).\n" +" -B Szögleteszárójel-kiegészítés végrehajtása\n" +" -C Létező normál fájlok felülírásának tiltása kimenetátirányításnál\n" +" -E Az ERR csapdát öröklik a függvények\n" +" -H Felkiáltójeles előzményhelyettesítés engedélyezése. Interaktív\n" +" parancsértelmezőnél alapértelmezés\n" +" -P Parancsok végrehajtásánál szimbolikus linkek követésének tiltása\n" +" (például cd esetében)\n" +" -T A DEBUG és RETURN csapdát öröklik a függvények\n" +" -- A további argumentumok hozzárendelése a pozicionális " +"paraméterekhez.\n" +" Ha nincsenek további argumentumok, akkora a pozicionális " +"paraméterek\n" +" törlésre kerülnek.\n" +" - A további argumentumok pozicionális paraméterekhez rendelése\n" +" A -x és -v kapcsolók ki vannak kapcsolva.\n" +" \n" +" „-” helyett „+” használatával a kapcsolók tilthatóak. A kapcsolók a\n" +" parancsértelmező indításakor is állíthatóak. Az érvényben lévő " +"kapcsolók\n" +" a $- változóban vannak. A záró nem értelmezhető argumentumok " +"pozicionális\n" +" paraméterek lesznek (rendre $1, $2 ... $n). Ha nincs ARG, minden\n" +" parancsértelmező-változó kiírásra kerül.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót kap." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Parancsértelmező-változók és -függvények értékeinek és jellemzőinek " +"törlése.\n" +" \n" +" Minden NÉV nevű függvény vagy változó törlése.\n" +" \n" +" Kapcsolók:\n" +" -f\tminden NÉV függvény\n" +" -v\tminden NÉV változó\n" +" -n\tminden NÉV névhivatkozás, és a változó törlése az általa\n" +" \t\thivatkozott változó helyett\n" +" \n" +" Kapcsolók nélkül az unset először változót, sikertelenség esetén " +"függvényt\n" +" próbál törölni.\n" +" \n" +" Néhány változót nem lehet törölni, lásd „readonly”.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha hibás kapcsolót kap, vagy egy NÉV csak\n" +" olvasható." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Parancsértelmező-változók exportálás attribútumának beállítása.\n" +" \n" +" Minden NÉV automatikus környezeti változóvá exportálásra jelölése. Így\n" +" minden ezután kiadott parancs környezetében megjelenik. Ha az ÉRTÉK is\n" +" meg van adva, értékadás is történik.\n" +" \n" +" Kapcsolók:\n" +" -f\tparancsértelmező-függvényekre vonatkozzon\n" +" -n\texport attribútum eltávolítása minden NÉVRŐL\n" +" -p\tösszes exportált változó és függvény listázása\n" +" \n" +" Egy „--” argumentum letiltja a további kapcsolóértelmezést.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót vagy NEVET kap." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Parancsértelmező-változó változtathatatlannak jelölése.\n" +" \n" +" Minden NÉV csak olvashatóvá állítása. A továbbiakban a NEVEK értéke\n" +" értékadással nem változtatható. Ha ÉRTÉK is van megadva, az írásvédelem\n" +" bekapcsolása előtt értékadás is történik.\n" +" \n" +" Kapcsolók:\n" +" -a\tindexelt tömbváltozókra vonatkozik\n" +" -A\tasszociatív tömbváltozókra vonatkozik\n" +" -f\tfüggvényekre vonatkozik\n" +" -p\taz összes csak olvasható változó vagy függvény listázása\n" +" \t\taz -f kapcsoló megadásától függően\n" +" \n" +" Egy „--” argumentum letiltja a további kapcsolóértelmezést.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót vagy NEVET kap." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Pozicionális paraméterek eltolása.\n" +" \n" +" Az $N+1, $N+2... pozicionális paraméterek átnevezése $1, $2... névre.\n" +" Ha nincs N megadva, értéke 1 lesz.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha N negatív vagy nagyobb mint $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Parancsok végrehajtása fájlból a futó parancsértelmezőben.\n" +" \n" +" A FÁJLNÉV fájlból a parancsok beolvasása és végrehajtása. A fájlnév\n" +" megtalálásához a $PATH által felsorolt könyvtárakban keres. Az " +"ARGUMENTUMOK\n" +" pozicionális paraméterek lesznek a FÁJLNÉV végrehajtásakor.\n" +" \n" +" Kilépési kód:\n" +" A FÁJLNÉV utolsó parancsának kilépési kódjával tér vissza; " +"sikertelenül,\n" +" ha a FÁJLNÉV nem olvasható." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Parancsvégrehajtás felfüggesztése.\n" +" \n" +" A futó parancsértelmező végrehajtásának felfüggesztése SIGCONT szignál\n" +" érkezéséig. Ha nincs erőltetve, bejelentkezési parancsértelmező nem\n" +" függeszthető fel.\n" +" \n" +" Kapcsolók:\n" +" -f\tfelfüggesztés erőltetése bejelentkezési parancsértelmezőn is\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a munkakezelés nem támogatott vagy hiba\n" +" történt." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Feltételes kifejezések kiértékelése.\n" +" \n" +" 0-val (igaz) vagy 1-gyel (hamis) lép ki a KIFEJEZÉS értékétől függően.\n" +" A kifejezéseknek egy vagy két operandusa lehet. Az egyoperandusú " +"kifejezések\n" +" többnyire fájlok állapotát vizsgálják. Karakterláncokat és\n" +" számokat is lehet összehasonlítani.\n" +" \n" +" Fájloperátorok:\n" +" \n" +" -a FÁJL Igaz, ha a fájl létezik.\n" +" -b FÁJL Igaz, ha a fájl blokkeszköz.\n" +" -c FÁJL Igaz, ha a fájl karakteres eszköz.\n" +" -d FÁJL Igaz, ha a fájl könyvtár.\n" +" -e FÁJL Igaz, ha a fájl létezik.\n" +" -f FÁJL Igaz, ha a fájl létezik és normál fájl.\n" +" -g FÁJL Igaz, ha a fájl SETGID jogosultságú.\n" +" -h FÁJL Igaz, ha a fájl szimbolikus link.\n" +" -L FÁJL Igaz, ha a fájl szimbolikus link.\n" +" -k FÁJL Igaz, ha a fájlnak „sticky” bitje (t-bitje) van.\n" +" -p FÁJL Igaz, ha a fájl egy elnevezett csővezeték.\n" +" -r FÁJL Igaz, ha a fájl olvasható a felhasználó számára.\n" +" -s FÁJL Igaz, ha a fájl létezik és nem üres.\n" +" -S FÁJL Igaz, ha a fájl egy foglalat (socket).\n" +" -t FD Igaz, ha a fájlleíró egy terminál.\n" +" -u FÁJL Igaz, ha a fájl SETUID jogosultságú.\n" +" -w FÁJL Igaz, ha a fájl írható a felhasználó számára.\n" +" -x FÁJL Igaz, ha a fájl végrehajtható a felhasználó számára.\n" +" -O FÁJL Igaz, ha a fájl effektíven a felhasználó tulajdona.\n" +" -G FÁJL Igaz, ha a fájl effektíven a csoport tulajdona.\n" +" -N FÁJL Igaz, ha a fájl módosult utolsó olvasása óta.\n" +" \n" +" FÁJL1 -nt FÁJL2 Igaz, ha fájl1 újabb fájl2-nél (a módosítási dátum\n" +" alapján).\n" +" \n" +" FÁJL1 -ot FÁJL2 Igaz, ha fájl1 régebbi fájl2-nél.\n" +" \n" +" FÁJL1 -ef FÁJL2 Igaz, ha fájl1 hard link fájl2-re.\n" +" \n" +" Karakterlánc-operátorok:\n" +" \n" +" -z SZÖVEG Igaz, ha SZÖVEG üres.\n" +" \n" +" -n SZÖVEG Igaz, ha SZÖVEG nem üres.\n" +" \n" +" SZÖVEG1 = SZÖVEG2\n" +" Igaz, ha a két SZÖVEG egyezik.\n" +" SZÖVEG1 != SZÖVEG2\n" +" Igaz, ha a két SZÖVEG nem egyezik.\n" +" SZÖVEG1 < SZÖVEG2\n" +" Igaz, ha SZÖVEG1 SZÖVEG2 előtt van a betűrendben.\n" +" SZÖVEG1 > SZÖVEG2\n" +" Igaz, ha SZÖVEG1 SZÖVEG2 után van a betűrendben.\n" +" \n" +" További operátorok:\n" +" \n" +" -o BEÁLLÍTÁS Igaz, ha a parancsértelmező-beállítás engedélyezve\n" +" van.\n" +" -v VÁLT Igaz, ha a VÁLT parancsértelmező-változó be van " +"állítva.\n" +" -R VÁLT Igaz, ha a VÁLT parancsértelmező-változó be van " +"állítva,\n" +" és névhivatkozás.\n" +" ! KIF Igaz, ha KIF hamis.\n" +" KIF1 -a KIF2 Igaz, ha KIF1 ÉS KIF2 is igaz.\n" +" KIF1 -o KIF2 Igaz, ha KIF1 VAGY KIF2 igaz.\n" +" \n" +" arg1 OP arg2 Aritmetikai összehasonlítások. OP lehet: -eq, -ne,\n" +" -lt, -le, -gt vagy -ge.\n" +" \n" +" A kétoperandusú aritmetikai operátorok igazat adnak, ha ARG1 rendre\n" +" egyenlő, nem egyenlő, kisebb, kisebb vagy egyenlő, nagyobb, nagyobb\n" +" vagy egyenlő, mint ARG2.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha a KIF igaz; sikertelenséggel, ha a KIF hamis, " +"vagy\n" +" érvénytelen argumentumokat kap." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Feltételes kifejezések kiértékelése.\n" +" \n" +" Ez a „test” beépített parancs szinonimája, de annyiban eltér tőle,\n" +" hogy az utolsó argumentuma „]” kell legyen – a nyitó „]”-lel összhangban." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Végrehajtási idők kiírása.\n" +" \n" +" Megjeleníti a kumulált felhasználói- és rendszergépidőt, amelyet a\n" +" parancsértelmező és gyermekfolyamatai használtak.\n" +" \n" +" Kilépési kód:\n" +" Mindig sikeres." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Szignálok és más események elfogása.\n" +" \n" +" Meghatároz és aktivál eseménykezelőket, amelyek szignálok érkezésekor\n" +" vagy más körülmények bekövetkezésekor futnak.\n" +" \n" +" Az ARG az a parancs, amelyet a parancsértelmező beolvas és végrehajt a\n" +" SZIGNÁLOK bekövetkezésekor. Ha az ARG hiányzik (és egy SZIGNÁL van\n" +" megadva) vagy az ARG egy „-”, akkor minden szignálkezelő visszaáll az\n" +" alapértelmezett viselkedésre. Ha az ARG üres, akkor a megadott " +"SZIGNÁLOK\n" +" bekövetkezésekor nem történik semmi a parancsértelmezőben és új\n" +" gyermekfolyamataiban.\n" +" \n" +" Ha a SZIGNÁL értéke EXIT (0), az ARG a parancsértelmezőből való " +"kilépéskor\n" +" fut. Ha értéke DEBUG, az ARG minden parancs előtt fut. Ha a SZIGNÁL " +"értéke\n" +" RETURN, az ARG a . vagy source kulcsszó használatával futtatott " +"függvény\n" +" vagy parancsfájl befejeződésekor fut le. Ha az érték ERR, akkor az ARG " +"a\n" +" parancsok olyan hibáikor fut le, amikor a parancsértelmező kilépne a -e\n" +" kapcsoló használatakor.\n" +" \n" +" Argumentumok nélkül a trap kilistázza az összes szignált és parancsot.\n" +" \n" +" Kapcsolók:\n" +" -l\ta rendszeren érvényes szignálnevek és sorszámaik kilistázása\n" +" -p\tkilistázza a trap által beállított eseménykezelőket\n" +" \n" +" A SZIGNÁL értéke a -ban megtalálható szignálnév vagy szám.\n" +" A szignálnevek kis- és nagybetűkre érzéketlenek, a SIG előtag " +"elhagyható.\n" +" Szignált a parancsértelmezőnek a „kill -szignál $$” paranccsal\n" +" lehet küldeni.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a SZIGNÁL érvénytelen, vagy érvénytelen\n" +" kapcsolót kap." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Tájékoztatás egy parancs típusáról.\n" +" \n" +" Minden NÉV esetén kiírja, hogy hogy lenne értelmezve parancsnévként.\n" +" \n" +" Kapcsolók:\n" +" -a\tminden NÉVRE illeszkedő futtatható parancs felsorolása,\n" +" \t\tbeleértve az aliasokat, beépített parancsokat, és a\n" +" \t\tfüggvényeket (ha „-p” nem tiltja)\n" +" -f\tfüggvényeket ne keressen\n" +" -P\tcsak a PATH-ban keresse a NEVET, akkor is, ha van ilyen nevű\n" +" \t\talias, parancs vagy függvény\n" +" -p\ta végrehajtható fájl nevét írja ki, ha amely végrehajtódna\n" +" \t\ta parancs kiadásakor. Ha ez nem fájl lenne, nem ír ki semmit\n" +" -t\tegyetlen szót ír ki, amely NÉV típusát jelzi: „alias”,\n" +" \t\t„keyword” (kulcsszó), „function” (függvény), „builtin”\n" +" \t\t(beépített parancs), „file” (fájl) vagy „” (nem található)\n" +" \n" +" Kapcsolók:\n" +" NÉV\tÉrtelmezendő parancsnév.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel lép ki, ha minden NÉV megtalálható, sikertelenül, ha nem." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Parancsértelmező erőforráskorlátjainak beállítása.\n" +" \n" +" Szabályozási lehetőséget ad a parancsértelmező által elérhető " +"erőforrások\n" +" korlátozásához, ha a rendszer támogatja.\n" +" \n" +" Kapcsolók:\n" +" -S\ta puha (soft) korlátozás használata\n" +" -H\ta kemény (hard) korlátozás használata\n" +" -a\taz összes aktuális korlátozás kilistázása\n" +" -b\tfoglalatok (socket) puffermérete\n" +" -c\tcore fájlok maximális mérete (0 tiltja)\n" +" -d\tfolyamatok maximális adatszegmens-mérete\n" +" -e\ta maximális ütemezési prioritás (nice)\n" +" -f\ta parancsértelmező és gyermekei által írható legnagyobb fájl\n" +" -i\tvárakozó szignálok maximális száma\n" +" -k\ta folyamathoz lefoglalt kqueue-k maximális száma\n" +" -l\tfolyamatonként foglalható memória maximális mérete\n" +" -m\ta maximálisan operatív memóriában tartható terület mérete\n" +" -n\tnyitott fájlleírók maximális száma\n" +" -p\ta csővezetékpuffer mérete\n" +" -q\ta POSIX üzenetsorokban tartható byte-ok száma\n" +" -r\ta maximális valós idejű ütemezési prioritás\n" +" -s\tmaximális veremméret\n" +" -t\tmaximális processzoridő másodpercekben\n" +" -u\tfelhasználói folyamatok maximális száma\n" +" -v\tvirtuális memória mérete\n" +" -x\tfájlzárolások maximális száma\n" +" -P\tpszeudoterminálok maximális száma\n" +" -T\tszálak maximális száma\n" +" \n" +" Nem minden kapcsoló érhető el minden platformon.\n" +" \n" +" Ha a KORLÁT meg van adva, az lesz az új értéke a megadott erőforrásnak.\n" +" Speciális KORLÁT-értékek: „hard” (jelenlegi kemény korlát értéke),\n" +" „soft” (jelenlegi puha korlát értéke) és „unlimited” (korlátozás " +"nélkül).\n" +" Ha nincs kapcsoló megadva, -f az alapértelmezett.\n" +" \n" +" Az értékek 1024 byte-os egységekben értendőek, kivéve a -t, amely\n" +" másodpercekben, a -p, amely 512 byte-okban, valamint a -u, amely " +"darabban\n" +" értendő.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen kapcsoló vagy hiba esetében." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"A fájlmódmaszk kiírása vagy beállítása.\n" +" \n" +" Beállítja a fájllétrehozási maszkot a MÓDRA. Ha a MÓD hiányzik, az\n" +" aktuális értékét írja ki.\n" +" Fájlok létrehozásakor az alapértelmezett jogokból ki lesznek maszkolva\n" +" az itt megadott bitek. Ez nem akadályozza meg, hogy a program vagy a\n" +" felhasználó később megváltoztassa a fájl jogait.\n" +" \n" +" Ha a MÓD számjeggyel kezdődik, oktális számként lesz értelmezve; " +"egyébként\n" +" a chmod(1) által használt szimbolikus formátumban.\n" +" \n" +" Kapcsolók:\n" +" -p\tha a MÓD hiányzik, a kimenet újrahasználható formátumban legyen\n" +" -S\ta kimenet használja a szimbolikus formát (különben oktálisat)\n" +" \n" +" Kilépési kód:\n" +" Sikerrel lép ki, kivéve ha a MÓD vagy egy kapcsoló érvénytelen." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Munka befejezésének megvárása, és a kilépési kód visszaadása.\n" +" \n" +" Az ID számú folyamat befejezésére vár, majd jelzi a kilépési kódját.\n" +" Az ID lehet egy PID vagy egy %MUNKASZÁM. Ha az ID nincs megadva, minden\n" +" aktív gyermekfolyamat befejezését bevárja, és nullával tér vissza. Ha " +"az\n" +" ID munkaszám, a csővezeték összes folyamatát bevárja.\n" +" \n" +" Ha a -n kapcsoló meg van adva, megvárja a következő feladat " +"befejezését,\n" +" és annak kilépési kódját adja vissza.\n" +" \n" +" Ha a -f kapcsoló meg van adva és a munkakezelés engedélyezve van, akkor\n" +" megvárja a megadott azonosító befejezését, ahelyett hogy arra várna az\n" +" az állapot megváltoztatásához.\n" +" \n" +" Kilépési kód:\n" +" ID kilépési kódjával tér vissza; érvénytelen ID vagy kapcsoló esetén\n" +" sikertelenül." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Folyamat befejezésének megvárása, és a kilépési kód visszaadása.\n" +" \n" +" A PID számú folyamat befejezésére vár, majd jelzi a kilépési kódját.\n" +" Ha nincs megadva PID, minden aktív gyermekfolyamatot bevár, és nullával\n" +" tér vissza. A PID egy folyamatazonosító kell legyen.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó PID kilépési kódjával tér vissza; érvénytelen PID vagy " +"kapcsoló\n" +" esetén sikertelenül." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Egy lista minden elemére parancs végrehajtása.\n" +" \n" +" A „for” ciklus végrehajt egy parancssorozatot a megadott listán. Ha az\n" +" „in SZAVAK ...;” rész hiányzik, „in \"$@\"” az alapértelmezés. Minden\n" +" iterációnál a NÉV értéke a SZAVAK lista megfelelő elemére lesz állítva,\n" +" és így futnak le a PARANCSOK.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja vissza." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetikai for-ciklus.\n" +" \n" +" Ekvivalens a következővel:\n" +" \t(( KIF1 ))\n" +" \twhile (( KIF2 )); do\n" +" \t\tPARANCSOK\n" +" \t\t(( KIF3 ))\n" +" \tdone\n" +" A KIF1, KIF2 és KIF3 aritmetikai kifejezések. Ha valamelyik el van " +"hagyva,\n" +" akkor úgy működik, mintha értéke 1 lenne.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Szavak kiválasztása egy listából, és egy parancs végrehajtása rá.\n" +" \n" +" A SZAVAK kiértékelésre kerülnek, és egy szólistát képeznek. A szavak a\n" +" szabványos hibakimenetre kerülnek soronként, sorszámozva. Ha az\n" +" „in SZAVAK ...;” rész hiányzik, „in \"$@\"” az alapértelmezés. Ezután\n" +" megjelenik a PS3 prompt, és egy sorszámot vár a szabványos bemeneten.\n" +" Érvényes sorszám megadásakor a PARANCSOKAT végrehajtja úgy, hogy a NÉV\n" +" a megfelelő sorszámú elem értékét kapja. Ha a sor üres, újból " +"megjelennek\n" +" a SZAVAK és a prompt, és újból lehet választani. A parancs EOF bemenet\n" +" esetén fejeződik be. Bármely más érték beolvasásakor a NÉV null lesz.\n" +" A beolvasott sor a REPLY változóba kerül. A PARANCSOK minden választás\n" +" után végrehajtásra kerülnek egy break parancs végrehajtásáig.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja vissza." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"A csővezeték végrehajtási idejének kiírása.\n" +" \n" +" A CSŐVEZETÉK végrehajtása és egy összefoglaló kiírása a végrehajtás " +"közben\n" +" eltelt valós időről, a használt felhasználói- és rendszergépidőkről\n" +" a CSŐVEZETÉK befejeződésekor.\n" +" \n" +" Kapcsolók:\n" +" -p\taz összefoglaló megjelenítése a hordozható POSIX formában\n" +" \n" +" A TIMEFORMAT változó értéke felhasználásra kerül a kimenet formázásakor\n" +" \n" +" Kilépési kód:\n" +" A kilépési kód a CSŐVEZETÉK kilépési kódja lesz." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Parancsok végrehajtása mintaillesztés alapján.\n" +" \n" +" A PARANCSOK végrehajtása azon SZAVAKON, amelyek illeszkednek a MINTÁRA.\n" +" Több mintát „|” jellel lehet elválasztani. A minták a fájlnév-" +"helyettesítés\n" +" formátumát használják.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja vissza." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Parancsok végrehajtása feltételesen.\n" +" \n" +" Az „if PARANCSOK” lista végrehajtásra kerül. Ha kilépési kódja nulla,\n" +" akkor a „then PARANCSOK” lista kerül végrehajtásra. Ha nem, akkor az\n" +" első nullával kilépő „elif PARANCSOK” listához tartozó „then PARANCSOK”\n" +" lista kerül végrehajtásra. Ha egyik sem teljesül, az „else\n" +" PARANCSOK” lista kerül végrehajtásra. Az egész szerkezet kilépési kódja\n" +" az utoljára végrehajtott parancs kilépési kódja, vagy nulla, ha nem\n" +" teljesült egyik feltétel sem.\n" +" \n" +" Kilépési kód:\n" +" Az utoljára végrehajtott parancs kilépési kódja." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Parancsok végrehajtása amíg a feltétel teljesül.\n" +" \n" +" A PARANCSOK végrehajtása addig, amíg a „while PARANCSOK” utolsó " +"parancsa\n" +" nullával lép ki.\n" +" \n" +" Kilépési kód:\n" +" Az utolsónak végrehajtott parancs kilépési kódja." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Parancsok végrehajtása amíg a feltétel nem teljesül.\n" +" \n" +" A PARANCSOK értelmezése és végrehajtása addig, amíg az „until " +"PARANCSOK”\n" +" utolsó parancsa nem nullával lép ki.\n" +" \n" +" Kilépési kód:\n" +" Az utolsónak végrehajtott parancs kilépési kódja." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Egy NÉV nevű társfolyamat létrehozása.\n" +" \n" +" PARANCS aszinkron végrehajtása, a parancs szabványos ki- és bemenetének\n" +" átirányításával egy-egy csővezetékbe, amelyek fájlleírói a NÉV tömb-\n" +" változó 0-s és 1-es elemeibe kerülnek a végrehajtó parancsértelmezőben.\n" +" Az alapértelmezett NÉV: „COPROC”.\n" +" \n" +" Kilépési kód:\n" +" A coproc parancs 0-s kilépési kóddal tér vissza." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Parancsértelmező-függvény definiálása.\n" +" \n" +" Létrehoz egy NÉV nevű függvényt. Ha a NÉV parancsként végrehajtásra\n" +" kerül, a PARANCSOK futnak a hívó parancsértelmező környezetében. A NÉV\n" +" hívásakor az argumentumok a függvényből $1...$n néven érhetőek el, míg " +"a\n" +" függvény neve $FUNCNAME-ként.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a NÉV csak olvasható." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Parancsok csoportosítása egy egységgé.\n" +" \n" +" Egy csoportként hajt végre egy parancssorozatot. Ez egy módja a ki- és\n" +" bemenetek parancshalmazba való átirányításának.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja vissza." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Egy munka előtérbe hozása.\n" +" \n" +" Megegyezik az „fg” parancs MUNKASZÁM argumentumával. Egy megszakított\n" +" vagy háttérben futó munkát hoz előtérbe. A MUNKASZÁM lehet munkanév " +"vagy\n" +" munkaazonosító is. Egy záró „&” megadása a munkát háttérbe küldi, mint\n" +" a „bg” parancs.\n" +" \n" +" Kilépési kód:\n" +" A visszaállított parancs kilépési kódjával lép ki." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Aritmetikai kifejezések kiértékelése.\n" +" \n" +" A KIFEJEZÉS az aritmetikai kiértékelés szabályai szerint kerül\n" +" kiértékelésre. Megegyezik a „let KIFEJEZÉS” paranccsal.\n" +" \n" +" Kilépési kód:\n" +" 1-gyel tér vissza, ha KIFEJEZÉS értéke 0, különben 0-val." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Feltételes parancs végrehajtása.\n" +" \n" +" 0 vagy 1 kilépési kódot ad a KIFEJEZÉS kiértékelésének eredményétől\n" +" függően. A kifejezések a „test” parancs által használt primitívekből\n" +" épülnek fel, és a következő operátorokkal keverhetőek.\n" +" \n" +" ( KIFEJEZÉS )\tA KIFEJEZÉS értékét adja vissza\n" +" ! KIFEJEZÉS\tIgaz, ha a KIFEJEZÉS hamis\n" +" KIF1 && KIF2\tIgaz, ha KIF1 és KIF2 is igaz\n" +" KIF1 || KIF2\tIgaz, ha KIF1 vagy KIF2 igaz\n" +" \n" +" Az „==” és „!=” operátorok használatánál a jobbérték mintaként\n" +" értelmeződik, és fájlnévillesztés történik. A hasonlóan működő „=~”\n" +" operátor használatakor a jobbérték reguláris kifejezésként kerül\n" +" illesztésre.\n" +" \n" +" Az „&&” és „||” operátorok rövidzár tulajdonságúak, vagyis KIF2-t nem\n" +" értékelik ki, ha KIF1-ből is megállapítható a kifejezés értéke.\n" +" \n" +" Kilépési kód:\n" +" 0 vagy 1 a KIFEJEZÉSTŐL függően." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Közös parancsértelmező-változók és használatuk.\n" +" \n" +" BASH_VERSION\tVerzióadatok erről a Bash-ről\n" +" CDPATH\tKettőspontokkal elválasztott könyvtárlista, amelyekben a\n" +" \t\t„cd” keres\n" +" GLOBIGNORE\tKettőspontokkal elválasztott mintalista, amelyekre\n" +" \t\tilleszkedő nevű fájlok nem kerülnek útvonal-kiegészítésre\n" +" HISTFILE\tA parancselőzményeket tároló fájl neve\n" +" HISTFILESIZE\tAz előzményfájl maximális hossza sorokban\n" +" HISTSIZE\tA parancsértelmező által kezelt előzménysorok maximális\n" +" \t\tszáma\n" +" HOME\tA saját könyvtár teljes abszolút útvonala\n" +" HOSTNAME\tA parancsértelmezőt futtató gép neve\n" +" HOSTTYPE\tA Bash-t futtató CPU típusa\n" +" IGNOREEOF\tA parancsértelmező viselkedését állítja, hogy mit tegyen,\n" +" \t\tha egy sor elején EOF karaktert kap bemenetén. Ha ez a változó\n" +" \t\tlétezik, az értékében megadott számú EOF karaktert nem\n" +" \t\tvesz figyelembe (alapértelmezetten 10). Ha nincs beállítva,\n" +" \t\tEOF-ra kilép a parancsértelmező\n" +" MACHTYPE\tA Bash-t futtató gépet leíró karakterlánc\n" +" MAILCHECK\tMegadott számú másodpercenként keres a Bash új leveleket\n" +" MAILPATH\tKettőspontokkal elválasztott fájlnévlista, ahol a Bash\n" +" \t\túj leveleket keres\n" +" OSTYPE\tA Bash-t futtató gépen futó UNIX-változat neve (verziója)\n" +" PATH\tKettőspontokkal elválasztott könyvtárlista, amelyekben a\n" +" \t\tBash futtatható programokat keres parancsvégrehajtáskor\n" +" PROMPT_COMMAND\tAz elsődleges prompt kiírása előtt végrehajtandó\n" +" \t\t\tparancs\n" +" PS1\t\tAz elsődleges prompt\n" +" PS2\t\tA másodlagos prompt\n" +" PWD\t\tAz aktuális könyvtár teljes útvonala\n" +" SHELLOPTS\tAz engedélyezett parancsértelmező-beállítások " +"kettőspontokkal\n" +" \t\telválasztott listája\n" +" TERM\tAz aktuális termináltípus neve\n" +" TIMEFORMAT\tA „time” parancs által használt időformátum\n" +" auto_resume\tNem üres érték esetén egy egy szóból álló parancs először\n" +" \t\ta megszakított munkák nevei között lesz keresve. Találat\n" +" \t\tesetén a munka előtérbe kerül. „exact” érték esetén\n" +" \t\tpontosan megegyező nevet keres, „substring” esetén tetszőleges\n" +" \t\tegyezést, minden más érték esetén a szó elején keres\n" +" histchars\tElőzménykiegészítést és gyors cserét vezérlő karaktereket\n" +" \t\tad meg. Az első karakter az előzménybehelyettesítő karakter\n" +" \t\t(általában „!”), a második a gyorscsere-karakter (általában\n" +" \t\t„^”), a harmadik pedig az előzménymegjegyzés (általában „#”)\n" +" HISTIGNORE\tKettőspontokkal elválasztott mintalista, amely mintákra\n" +" \t\tilleszkedő parancsok nem kerülnek az előzmények közé\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Könyvtárak verembe tétele.\n" +" \n" +" Egy könyvtárat tesz a könyvtárverem tetejére, vagy forgatja a vermet,\n" +" az új felső elemmé a jelenlegi munkakönyvtárat téve. Argumentumok\n" +" nélkül hívva a két felső könyvtárat cseréli meg.\n" +" \n" +" Kapcsolók:\n" +" -n\tNe váltson könyvtárat hozzáadáskor, vagyis csak a\n" +" \t\tvermet változtassa.\n" +" \n" +" Argumentumok:\n" +" +N\tÚgy forgatja a vermet, hogy az N-edik könyvtár (0-tól\n" +" \t\tkezdve, a „dirs” által kiírt listán balról számolva)\n" +" \t\tkerüljön a verem tetejére.\n" +" \n" +" -N\tÚgy forgatja a vermet, hogy az N-edik könyvtár (0-tól\n" +" \t\tkezdve, a „dirs” által kiírt listán jobbról számolva)\n" +" \t\tkerüljön a verem tetejére.\n" +" \n" +" ktár\tA verem tetejére helyezi KTÁR könyvtárat, és ugyanezt\n" +" \t\tállítja be új munkakönyvtárnak.\n" +" \n" +" A „dirs” beépített parancs listázza a könyvtárvermet.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen argumentum vagy könyvtárváltás\n" +" során történő hiba esetén." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Könyvtárak eltávolítása a veremből.\n" +" \n" +" Elemeket vesz ki a könyvtárveremből. Argumentumok nélkül kiveszi a\n" +" legfelső elemet, és a kivett elemre állítja az új munkakönyvtárat.\n" +" \n" +" Kapcsolók:\n" +" -n\tNe váltson könyvtárat eltávolításkor, vagyis csak a vermet\n" +" \t\tváltoztassa.\n" +" \n" +" Argumentumok:\n" +" +N\tEltávolítja az N-edik elemet a „dirs” által kiírt listán,\n" +" \t\tnullától, balról számolva. Pl. a „popd +0” az első, míg a\n" +" \t\t„popd +1” a második könyvtárat távolítja el.\n" +" -N\tEltávolítja az N-edik elemet a „dirs” által kiírt listán,\n" +" \t\tnullától, jobbról számolva. Pl. a „popd -0” az utolsó,\n" +" \t\ta „popd -1” az utolsó előtti könyvtárat távolítja el.\n" +" \n" +" A „dirs” beépített parancs listázza a könyvtárvermet.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen argumentum vagy könyvtárváltás\n" +" során történő hiba esetén." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"A könyvtárverem megjelenítése.\n" +" \n" +" Megjeleníti a jelenleg megjegyzett könyvtárakat. A könyvtárakat a\n" +" „pushd” paranccsal lehet a verembe rakni; és a „popd” paranccsal " +"kivenni.\n" +" \n" +" Kapcsolók:\n" +" -c\ta könyvtárverem törlése az összes elem eltávolításával\n" +" -l\ta saját könyvtárat ne rövidítse a listázáskor egy tilde (~)\n" +" -p\ta könyvtárverem kiírása soronként egy elemmel\n" +" -v\ta könyvtárverem kiírása soronként egy elemmel, a vermen\n" +" \t\tbelüli pozíció jelölésével\n" +" \n" +" Argumentumok:\n" +" +N\tN darab bejegyzést jelenít meg az argumentum nélkül a dirs\n" +" \t\táltal megjelenített listán balról számolva, nullától kezdve.\n" +" -N\tN darab bejegyzést jelenít meg az argumentum nélkül a dirs\n" +" \t\táltal megjelenített listán jobbról számolva, nullától kezdve.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen argumentum vagy hiba esetén." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Parancsételmező-kapcsolók beállítása és törlése.\n" +" \n" +" Minden megadott OPTNÉV kapcsoló beállítása. Argumentumok nélkül hívva\n" +" felsorol minden megadott OPTNEVET – vagy az összes parancsértelmező\n" +" kapcsolót, ha nincsenek OPTNEVEK megadva – annak jelzésével, hogy be\n" +" vannak-e állítva vagy sem.\n" +" \n" +" Kapcsolók:\n" +" -o\tOPTNEVEK korlátozása a „set -o”-val használtakra\n" +" -p\tminden kapcsoló kilistázása az állapotuk jelzésével\n" +" -q\tkimenet elnyelése\n" +" -s\tminden OPTNÉV engedélyezése\n" +" -u\tminden OPTNÉV tiltása\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha az OPTNÉV engedélyezve van; sikertelenül, ha\n" +" hibás kapcsolókat kap vagy az OPTNÉV tiltva van." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"FORMÁTUM alapján az ARGUMENTUMOK kiírása.\n" +" \n" +" Kapcsolók:\n" +" -v változó\ta kimenet VÁLTOZÓ nevű változóba írása a szabványos\n" +" \t\t\tkimenet helyett\n" +" \n" +" A FORMÁTUM egy karakterlánc, amely három fajta primitívből áll:\n" +" egyszerű karakterek, amelyeket a parancs a kimenetre másol; escape-\n" +" karaktersorozatok, amelyeket átalakítva másol a kimenetre; valamint\n" +" formátumjelzők, amelyek rendre a következő argumentum kiírását\n" +" szabályozzák.\n" +" \n" +" A printf(1) által használt szokásos jelzőkön túl a\n" +" következőket ismeri a printf parancs:\n" +" \n" +" %b\tkarakterlánc kiírása az escape-szekvenciák értelmezése után\n" +" %q\targumentum idézőjelezése olyan módon, hogy parancsértelmező\n" +" \t\tbemeneteként használható legyen\n" +" %(fmt)T\tdátum-idő karakterlánc kiírása az FMT mint strftime(3)\n" +" \t\tformátum-karakterlánc használatával\n" +" \n" +" A formátum szükség szerint újrafelhasználásra kerül az összes " +"argumentum\n" +" elfogyasztásához. Ha kevesebb argumentum van a formátumnak " +"szükségesnél,\n" +" az extra formátumjelzők úgy viselkednek, mintha nulla érték vagy null\n" +" karakterlánc lett volna megadva.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha hibás kapcsolókat kap, vagy az írás/\n" +" értékadás hibával járt." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Megadja, hogy a Readline hogyan egészítse ki az argumentumokat.\n" +" \n" +" Minden NÉVHEZ megadja, hogyan egészítse ki a Readline az " +"argumentumokat.\n" +" Ha nincsenek kapcsolók megadva, a jelenlegi érték kerül kiírásra,\n" +" újrafelhasználható módon.\n" +" \n" +" Kapcsolók:\n" +" -p\tmeglévő kiegészítésmegadások listázása újrahasználható módon\n" +" -r\tkiegészítésmegadások törlése minden NÉVTŐL; vagy ha nincs\n" +" \t\tNÉV megadva, az összes törlése\n" +" -D\tkiegészítések és műveletek alkalmazása alapértelmezésben, ha\n" +" \t\taz adott parancshoz nincs kiegészítés megadva\n" +" -E\tkiegészítések és műveletek alkalmazása az „üres” parancsokra,\n" +" \t\tvagyis a sor elején\n" +" -I\tkiegészítések és műveletek alkalmazása a kezdeti (általában a\n" +" \t\tparancs) szóra\n" +" \n" +" Kiegészítéskor a műveletek a nagybetűs kapcsolók felsorolásának\n" +" sorrendjében kísérli meg a Readline. A -D elsőbbséget élvez a -E-vel\n" +" szemben.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen kapcsoló és hiba esetén." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Lehetséges kiegészítések megjelenítése a kapcsolóktól függően.\n" +" \n" +" Függvényben való használatra szolgál a lehetséges kiegészítések " +"generálása\n" +" céljából. Ha az elhagyható SZÓ argumentum is meg van adva, a SZÓRA\n" +" elölről illeszkedő találatok jelennek csak meg.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel lép ki, kivéve érvénytelen kapcsoló vagy hiba esetén." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Kiegészítési beállítások módosítása vagy kiírása.\n" +" \n" +" Kiegészítési beállítások listázása minden NÉVHEZ, vagy ha nincs NÉV\n" +" megadva, akkor az éppen zajló kiegészítésre. Ha nincs KAPCSOLÓ megadva,\n" +" kiírja a kiegészítési beállításokat minden NÉVHEZ vagy az aktuális\n" +" kiegészítéshez.\n" +" \n" +" Kapcsolók:\n" +" \t-o kapcsoló\ta KAPCSOLÓ kiegészítési beállítás megadása minden NÉVHEZ\n" +" \t-D\t\tAz alapértelmezett kiegészítés beállításainak módosítása\n" +" \t-E\t\tAz üres kiegészítés beállításainak módosítása\n" +" \t-I\t\tA kezdeti szón történő kiegészítés beállításainak módosítása\n" +" \n" +" A „-o” helyett „+o” használatával a beállítás kikapcsolható.\n" +" \n" +" Argumentumok:\n" +" \n" +" Minden NÉV egy parancsra vonatkozik, amelyhez egy kiegészítést előzőleg\n" +" meg kell adni a „complete” paranccsal. Ha nincs NÉV megadva, a compopt-" +"ot\n" +" egy éppen kiegészítéseket generáló függvényből kell hívni, és a zajló\n" +" generálásra fog vonatkozni.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel lép ki, kivéve ha érvénytelen kapcsolókat kap, vagy a NÉV " +"nincs\n" +" még megadva." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Sorok beolvasása a szabványos bemenetről egy indexelt tömbbe.\n" +" \n" +" Sorok beolvasása a szabványos bemenetről – vagy a -u megadása esetén az " +"FD\n" +" fájlleíróból – egy megadott nevű TÖMBBE (elhagyása esetén az ARRAY-be).\n" +" \n" +" Kapcsolók:\n" +" -d elvál\tAz ELVÁL használata sorlezáróként újsor helyett\n" +" -n szám\tLegfeljebb SZÁM sor másolása. Ha a SZÁM 0, minden sor\n" +" \t\tmásolásra kerül\n" +" -O kezdet\tKEZDET számú indextől kezdje a TÖMB-be másolást.\n" +" \t\tAlapértelmezés: 0\n" +" -s szám\tAz első SZÁM sor eldobása olvasáskor\n" +" -t\tA sorok végéről a záró ELVÁL (alapesetben: újsor) eltávolítása\n" +" -u fd\tSzabványos bemenet helyett az FD fájlleíróból olvasson\n" +" -C parancs\tA PARANCS végrehajtása minden TÁVOLSÁG sor után\n" +" -c távolság\tA PARANCS végrehajtásai között beolvasott sorok száma\n" +" \n" +" Argumentumok:\n" +" TÖMB\tBeolvasáshoz használt tömb neve\n" +" \n" +" Ha a -C -c nélkül van megadva, az alapértelmezett távolság 5000.\n" +" A PARANCS végrehajtásakor utolsó argumentumként a parancs megkapja a\n" +" következő beolvasandó elem indexét.\n" +" \n" +" Ha nincs KEZDET megadva, a mapfile törli a TÖMB tömböt olvasás előtt.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen kapcsoló vagy csak olvasható,\n" +" vagy nem indexelt TÖMB megadása esetén." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Sorok olvasása egy tömbváltozóba.\n" +" \n" +" A „mapfile” szinonimája." + +# see $ help caller +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Az aktuális szubrutinhívás helyével tér vissza.\n" +#~ " \n" +#~ " EXPR nélkül a " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: %5ld. folyamat (%s) a the_pipeline-ban" + +#~ msgid "Unknown Signal #" +#~ msgstr "Ismeretlen szignál #" diff --git a/bash-5.1/po/id.gmo b/bash-5.1/po/id.gmo new file mode 100644 index 0000000000000000000000000000000000000000..61f53205e035b064b6f4360f0c7d18e42cc7751f Binary files /dev/null and b/bash-5.1/po/id.gmo differ diff --git a/bash-5.1/po/id.po b/bash-5.1/po/id.po new file mode 100644 index 0000000000000000000000000000000000000000..b0c244e4bbc61cfe35f3c717b82623ff20b07693 --- /dev/null +++ b/bash-5.1/po/id.po @@ -0,0 +1,6760 @@ +# Pesan Bahasa Indonesia untuk bash +# Copyright (C) 2008 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Arif E. Nugroho , 2008, 2009, 2010, 2011, 2012, 2013, 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: bash 4.3-rc2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2014-08-06 12:45+0700\n" +"Last-Translator: Arif E. Nugroho \n" +"Language-Team: Indonesian \n" +"Language: id\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "array subscript buruk" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: tidak dapat mengubah index ke array yang berassosiasi" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: kunci array assosiasi tidak valid" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: tidak dapat mengassign ke index tidak-numeric" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: harus menggunakan subscript ketika memberikan assosiasi array" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: tidak dapat membuat: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: tidak dapat menemukan keymap untuk perintah" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: bukan karakter whitespace (spasi) pertama ditemukan `\"'" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "tidak menutup '%c' dalam %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: hilang pemisah colon" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "'%s': tidak dapat melepaskan" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace expansion: cannot allocate memory for %s" + +#: braces.c:406 +#, fuzzy, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace expansion: failed to allocate memory for %d elements" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace expansion: failed to allocate memory for `%s'" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': nama alias tidak valid" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "pengubahan baris tidak aktif" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "'%s': nama keymap tidak valid" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: tidak dapat membaca: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "'%s': nama fungsi tidak dikenal" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s tidak terikat ke kunci apapun.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s dapat dipanggil melalui " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "'%s': tidak dapat melepaskan" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "jumlah loop" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "hanya berarti dalam sebuah `for', `while', atau `until'loop" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Mengembalikan context dari panggilan subroutine saat ini.\n" +" \n" +" Tanpa EXPR, mengembalikan \"$line $filename\". Dengan EXPR,\n" +" mengembalikan \"$line $subroutine $filename\"; informasi extra ini\n" +" dapat digunakan untuk menyediakan jejak stack.\n" +" \n" +" Nilai dari EXPR mengindikasikan bagaimana banyak panggilan frames " +"kembali sebelum\n" +" yang ada; Top frame adalah frame 0. \n" +" Status Keluar:\n" +" Mengembalikan 0 kecuali shell sedang tidak menjalankan sebuah fungsi " +"shell atau EXPR\n" +" tidak valid." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME tidak diset" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "terlalu banyak argumen" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "top direktori yang baru." + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD tidak diset" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "baris %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "peringatan: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: penggunaan: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: pilihan membutuhkan sebuah argumen" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: argumen numeric dibutuhkan" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: tidak ditemukan" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: pilihan tidak valid" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nama pilihan tidak valid" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': bukan sebuah identifier yang valid" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "nomor oktal tidak valid" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "nomor hexa tidak valid" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "nomor tidak valid" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: spesifikasi sinyal tidak valid" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': bukan sebuah pid atau spesifikasi pekerjaan yang valid" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variabel baca-saja" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s diluar jangkauan" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumen" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s diluar jangkauan" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: tidak ada pekerjaan seperti itu" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: tidak ada pengontrol kerja" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "tidak ada pengontrol kerja" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: terbatas" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "terbatas" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: bukan sebuah builtin shell" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "gagal menulis: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "error menentukan atribut terminal: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "error mendapatkan atribut terminal: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: error mengambil direktori saat ini: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: spesifikasi pekerjaan ambigu" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: tidak dapat unset: baca-saja %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: tidak dapat unset" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nama aksi tidak valid" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: tidak ada spesifikasi completion" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "" +"peringatan: pilihan -F mungkin tidak bekerja seperti yang anda harapkan" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "" +"peringatan: pilihan -C mungkin tidak bekerja seperti yang anda harapkan" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "saat ini sedang tidak menjalankan fungsi completion" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "hanya dapat digunakan dalam sebuah fungsi" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: reference variable cannot be an array" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref variable self references not allowed" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: circular name reference" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "%s: nilai dari berkas pendeskripsi penelusur tidak valid" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "tidak dapat menggunakan `-f' untuk membuat fungsi" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: fungsi baca-saja" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: tidak dapat menghapus variabel array secara ini" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: tidak dapat mengubah assosiasi ke array index" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamic loading tidak tersedia" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "tidak dapat membuka object shared %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "tidak dapat menemukan %s dalam shared object %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: bukan dinamically loaded" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: bukan dinamically loaded" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: tidak dapat menghapus: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: bukan sebuah direktori" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: bukan sebuah file umum" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: file terlalu besar" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: tidak dapat menjalankan berkas binary" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: tidak dapat menjalankan: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "bukan sebuah login shell: gunakan `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Ada pekerjaan yang terhenti.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Ada pekerjaan yang sedang berjalan.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "perintah tidak ditemukan" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "spesifikasi sejarah" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: tidak dapat membuka file sementara: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "sekarang" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "pekerjaan %d dimulai tanpa pengontrol pekerjaan" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: pilihan tidak legal -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: pilihan membutuhkan sebuah argumen -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing dinonaktifkan" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: tabel hash kosong\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "tekan\tperintah\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Perintah shell cocok dengan kata kunci `" +msgstr[1] "Perintah shell cocok dengan kata kunci `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"tidak ada topik bantuan yang cocok dengan `%s'. Coba `help help' atau 'man -" +"k %s' atau `info %s'." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: tidak dapat membuka: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Perintah shell ini didefinisikan secara internal. Ketik `help' untuk melihat " +"daftar ini.\n" +"Ketik `help nama' untuk informasi lebih lanjut mengenai fungsi `nama'.\n" +"Gunakan `info bash' untuk informasi lebih lanjut mengenasi shell secara " +"umum.\n" +"Gunakan `man -k' atau `info' untuk informasi lebih lanjut mengenai perintah " +"yang tidak ada dalam daftar ini.\n" +"\n" +"Sebuah asterisk (*) disebelah dari nama berarti perintah tersebut tidak " +"aktif.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "tidak dapat menggunakan lebih dari satu pilihan dari -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "posisi sejarah" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: argumen limit tidak valid" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: expansi sejarah gagal" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib gagal" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "tidak ada pilihan lain yang diperbolehkan dengan `-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumen harus diproses atau ID pekerjaan" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Kesalahan tidak diketahui" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "diduga sebuah ekspresi" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: bukan sebuah indeks array" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: spesifikasi file deskripsi tidak valid" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: file deskriptor %s tidak valid" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: jumlah baris tidak valid" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: asal array tidak valid" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: nama aksi tidak valid" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "nama variabel array kosong" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "bantuan array variabel dibutuhkan" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': hilang karakter format" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': spesifikasi timeout tidak valid" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': karakter format tidak valid" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "peringatan: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "format parsing problem: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "hilang digit hexa untuk \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "hilang digit hexa untuk \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "tidak ada direktori lain" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: argumen limit tidak valid" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "direktori stack kosong" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "index direktori stack" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Menampilkan daftar dari direktori yang diingat saat ini. Direktori\n" +" menemukan jalannya kedalam daftar dengan perintah `pushd'; anda dapat " +"memperoleh\n" +" backup melalui daftar dengan perintah `popd'.\n" +" \n" +" Pilihan:\n" +" -c\tmenghapus direktori stact dengan menghapus seluruh elemen\n" +" -l\tjangan menampilkan versi dengan tilde dari direktori relative\n" +" \tke direkori rumah anda\n" +" -p\tmenampilkan direktori stack dengan satu masukan per baris\n" +" -v\tmenampilkan direktori stack dengan satu masukan per baris diawali\n" +" \tdengan posisnya dalam stack\n" +" \n" +" Argumen:\n" +" +N\tMenampilkan masukan ke N dihitung dari kiri dari daftar yang " +"ditampilkan oleh\n" +" \tdirs ketika dipanggil tanpa pilihan, dimulai dari nol.\n" +" \n" +" -N\tMenampilkan masukan ke N dihitung dari kanan dari daftar yang " +"ditampilkan oleh\n" +" \tdirs ketika dipanggil tanpa pilihan, dimulai dari nol." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Menambahkan sebuah direktori ke top dari direktori stack, atau merotasi\n" +" stack, membuah top baru dari stack dari working direktori saat ini.\n" +" Tanpa argumen, menukar top dari dua direktori.\n" +" \n" +" Pilihan:\n" +" -n\tmenekan perubahan normal dari direktori ketika menambahkan " +"direktori\n" +" \tke stack, jadi hanya stack yang dimanipulasi.\n" +" \n" +" Argumen:\n" +" +N\tMerotasi stack sehingga direktori ke N (dihitung\n" +" \tdari kiri dari daftar yang terlihat oleh `dirs', dimulai dengan\n" +" \tnol) adalah di top.\n" +" \n" +" -N\tMerotasi stack sehingga direktori ke N (dihitung\n" +" \tdari kanan dari daftar yang terliha oleh `dirs', dimulai dengan\n" +" \tnol) adalah di top.\n" +" \n" +" dir\tenambahkan DIR ke direktori stack di puncak, membuatnya\n" +" \tcurrent working directory.\n" +" \n" +" Builtin `dirs' menampilkan direktori stack." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Manghapus masukan dalam direktori stack. Tanpa argumen,\n" +" menghapus top direktori dari stack, dan cd's ke top\n" +" direktori baru.\n" +" \n" +" Pilihan:\n" +" -n\tmenekan perubahan normal dari direktori ketika menghapus direktori\n" +" \tdari stack, jadi hanya stack yang dimanipulasi.\n" +" \n" +" Argumen:\n" +" -N\tmenghapus masukan ke N dihitung dari kiri dari daftar\n" +" \tyang ditampilkan oleh `dirs', dimulai dari nol. Sebagai contoh: `popd " +"+0'\n" +" \tmenghapus direktori terakhir, `popd -1' sebelum terakhir.\n" +" \n" +" Builtin `dirs' menampilkan direktori stack." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: spesifikasi timeout tidak valid" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "error baca: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "hanya dapat `return' dari sebuah fungsi atau script yang disource" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "tidak dapat secara simultan unset sebuah fungsi dan sebuah variable" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: bukan sebuah variabel array" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: bukan sebuah fungsi" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: tidak dapat unset" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift terhitung" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "tidak dapat menset dan menunset pilihan shell secara bersamaan" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nama pilihan shell tidak valid" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "argumen nama file dibutuhkan" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: berkas tidak ditemukan" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "tidak dapat suspend" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "tidak dapat suspend sebuah login shell" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s sudah dialiasi ke `%s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s adalah sebuah shell dengan kata kunci\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s adalah sebuah fungsi\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s adalah sebuah shell builtin\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s adalah sebuah shell builtin\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s adalah %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s memiliki hash (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: argumen limit tidak valid" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': perintah buruk" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: tidak dapat get limit: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "batas" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: tidak dapat memodifikasi batas: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "nomor oktal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': operator mode symbolic tidak valid" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': mode karakter symbolic tidak valid" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " baris " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "perintah terakhir: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "membatalkan..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "perintah error tidak diketahui" + +#: error.c:463 +msgid "bad command type" +msgstr "tipe perintah buruk" + +#: error.c:464 +msgid "bad connector" +msgstr "konektor buruk" + +#: error.c:465 +msgid "bad jump" +msgstr "lompat buruk" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variabel tidak terikat" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "kehabisan waktu menunggu masukan: otomatis-keluar\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "tidak dapat menyalurkan masukan standar dari /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': karakter format tidak valid" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "pipe error" + +#: execute_cmd.c:4793 +#, fuzzy, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: execute_cmd.c:4805 +#, fuzzy, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "" +"%s: dibatasi: tidak dapat menspesifikasikan '/' dalam nama nama perintah" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: perintah tidak ditemukan" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: interpreter buruk" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: tidak dapat menjalankan berkas binary: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': adalah sebuah shell builtin" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "tidak dapat menduplikasikan fd %d ke fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "expresi level rekursi terlewati" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "rekursi stack underflow" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "syntax error dalam expresi" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "mencoba menempatkan ke bukan sebuah variabel" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "syntax error dalam expresi" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "dibagi oleh 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bug: tanda expassign buruk" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "`:' diharapkan untuk sebuah pernyataan kondisional" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "eksponen kurang dari 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "idenfier diharapkan setelah pre-increment atau pre-decrement" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "hilang `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntax error: operand diharapkan" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntax error: operator arithmetic tidak valid" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (error token adalah \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "basis arithmetic tidak valid" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: jumlah baris tidak valid" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "nilai terlalu besar untuk basis" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: expresi error\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: tidak dapat mengakses direktori orang tua" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "tidak dapat mereset mode nodelay untuk fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"tidak dapat mengalokasikan berkas deskripsi bari untuk masukan bash dari fd " +"%d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "simpan bash_input: buffer telah ada untuk fd %d baru" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "forked pid %d terlihat dalam pekerjaan yang sedang berjalan %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "menghapus pekerjaan yang terhenti %d dengan proses grup %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) ditandai dengan tetap hidup" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: tidak ada pid seperti itu" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "sinyal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Selesai" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Terhenti" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Terhenti(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Berjalan" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Selesai(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Keluar %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Status tidak diketahui" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core didump) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "anak setpgid (%ld ke %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld bukan sebuah anak dari shell ini" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Tidak ada catatan untuk proses %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: pekerjaan %d terhenti" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: tidak ada pekerjaan seperti itu" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: pekerjaan telah selesai" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: pekerjaan %d sudah berjalan di belakang (background)" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: mengaktifkan WNOHANG untuk menghindari blok tak terhingga" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: baris %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core didump)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd sekarang: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp gagal" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: baris disiplin" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: baris disiplin" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "tidak dapat menset terminal proses grup (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "tidak ada pengontrol pekerjaan dalam shell ini" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: gagal assertion: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: assertion rusak\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "tidak diketahui" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: blok dalam daftar bebas clobbered" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: dipanggil dengan argumen blok yang sudah dibebaskan" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: dipanggil dengan argumen blok yang tidak dialokasikan" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: underflow terdeteksi; mh_nbytes diluar dari jangkauan" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underflow terdeteksi; mh_nbytes diluar dari jangkauan" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: awal dan akhir dari ukuran potongan berbeda" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: dipanggil dengan argumen blok yang tidak teralokasikan" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: underflow terdeteksi; my_nbytes diluar dari jangkauan" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflow terdeteksi; my_nbytes diluar dari jangkauan" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: awal dan akhir dari ukuran potongan berbeda" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: tabel alokasi penuh dengan FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "" +"register_alloc: %p sudah berada dalam tabel sepertinya sudah dialokasikan?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p sudah berada dalam tabel sebagai bebas?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "basis tidak valid" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: host tidak diketahui" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: layanan tidak valid" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: spesifikasi jalur network buruk" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "operasi jaringan tidak dilayani" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: tidak dapat mengubah lokal (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: tidak dapat mengubah local (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: tidak dapat mengubah lokal (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: tidak dapat mengubah lokal (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Anda memiliki surat dalam $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Anda memiliki surat baru dalam $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Surat dalam %s telah dibaca\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "syntax error: membutuhkan ekspresi arithmetic" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "syntax error: `;' tidak terduga" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntax error: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipe instruksi buruk %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"dokumen-disini di baris %d dibatasi oleh akhir-dari-berkas (diinginkan `%s')" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: instruksi redireksi `%d' diluar dari jangkauan" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF tidak terduga ketika mencari untuk pencocokan `%c'" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF tidak terduga ketika mencari untuk `]]'" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntax error dalam ekspresi kondisional: tanda `%s' tidak terduga" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "syntax error dalam ekspresi kondisional" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "tanda `%s' tidak terduga, diduga `)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "diduga `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argumen tidak terduga `%s' ke operator kondisional unary" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "argumen tidak terduga untuk operasi unary kondisional" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "tanda `%s' tidak terduga, operator binary kondisional diduga" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "operator binary kondisional diduga" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argumen `%s' tidak terduga ke operator binary kondisional" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "argumen tidak terduga ke operasi binary kondisional" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "tanda `%c' tidak terduga dalam perintah kondisional" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "tanda `%s' tidak terduga dalam perintah kondisional" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "tanda %d tidak terduga dalam perintah kondisional" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntax error didekat tanda `%s' yang tidak terduga" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntax error didekat `%s'" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "syntax error: tidak terduga diakhir dari berkas" + +#: parse.y:6365 +msgid "syntax error" +msgstr "syntax error" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Gunakan \"%s\" untuk meninggalkan shell.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF tidak terduga ketika mencari untuk pencocokan ')'" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: fungsi `%s' tidak ditemukan" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: konektor buruk `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: berkas pendeskripsi tidak valid" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: berkas penunjuk KOSONG" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: '%c': format karakter tidak valid" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "berkas deskripsi diluar dari jangkauan" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redirect ambigu" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: tidak dapat menulis berkas yang sudah ada" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restricted: tidak dapat meredirect keluaran" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "tidak dapat membuat berkas sementara untuk dokumen disini: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: tidak dapat meng-'assign' fd ke variabel" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port tidak dilayani tanpa jaringan" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "redirection error: tidak dapat menduplikasi fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "tidak dapat menemukan /tmp, tolong buat!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp harus berupa sebuah nama direktori yang valid" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: pilihan tidak valid" + +#: shell.c:1319 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "tidak dapat mereset mode nodelay untuk fd %d" + +#: shell.c:1330 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "tidak dapat mereset mode nodelay untuk fd %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: bukan sebuah direktori" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Aku tidak memiliki nama!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versi %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Penggunaan:\t%s [GNU pilihan panjang] [pilihan] ...\n" +"\t%s [GNU pilihan panjang] [pilihan] berkas-script ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU pilihan panjang:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Pilihan shell:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" +"\t-ilrsD atau -c perintah atau -O shopt_option\t\t(hanya pemanggilan)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s atau pilihan -o\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Ketik `%s -c \"help set\"' untuk informasi lebih lanjut mengenai pilihan " +"shell.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Ketik `%s -c help' untuk informasi lebih lanjut mengenai perintah builting " +"shell.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Gunakan perintah 'bashbug' untuk melaporkan bugs.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operasi tidak valid" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Sinyal palsu" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Hangup" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interupsi" + +#: siglist.c:58 +msgid "Quit" +msgstr "Berhenti" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Instruksi ilegal" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Instruksi ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Instruksi EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Floating point exception" + +#: siglist.c:86 +msgid "Killed" +msgstr "Dibunuh" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bus error" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Kesalahan segmentasi" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Pemanggilan sistem buruk" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Pipe rusak" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Alarm clock" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Selesai" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Kodisi IO penting" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Terhenti (sinyal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Melanjutkan" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Anak tewas atau berhenti" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Terhenti (tty input)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Terhenti (tty output)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O siap" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Batas CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Batas berkas" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profile)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Window berubah" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Catatan terkunci" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Sinyal pengguna 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Sinyal pengguna 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT masukan data tertunda" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "Kelihatannya akan terjadi kegagalan power suply" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "Kelihatannya akan terjadi kerusakan sistem" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "pindahkan proses ke CPU lain" + +#: siglist.c:198 +msgid "programming error" +msgstr "error dalam pemrograman" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT mode monitoring diberikan" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT mode monitoring ditarik" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFTP sound sequence telah selesai" + +#: siglist.c:214 +msgid "Information request" +msgstr "Permintaan informasi" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Sinyal tidak diketahui #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "substitusi buruk: tidak ada penutupan `%s' dalam %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: tidak dapat meng-assign daftar kedalam anggoya array" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "tidak dapat membuat pipe untuk proses substitusi" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "tidak dapat membuat anak untuk proses substitusi" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "tidak dapat membuka named pipe %s untuk membaca" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "tidak dapat membukan named pipe %s untuk menulis" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "tidak dapat menduplikasi nama pipe %s sebagai fd %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "substitusi buruk: tidak ada penutupan \"\" dalam %s" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "tidak dapat membuat pipe untuk perintah substitusi" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "tidak dapat membuat anak untuk perintah substitusi" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: tidak dapat menduplikasikan pipe sebagi fd 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nilai dari berkas pendeskripsi penelusur tidak valid" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: jumlah baris tidak valid" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "`%s': nama alias tidak valid" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter kosong atau tidak diset" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter kosong atau tidak diset" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: substring expresi < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: substitusi buruk" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: tidak dapat meng-assign dengan cara ini" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"versi selanjutnya dari shell akan memaksa evaluasi dari sebuah penggantian " +"aritmetika" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "substitusi buruk: tidak ada penutupan \"\" dalam %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "tidak cocok: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argumen diharapkan" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: expresi integer diduga" + +#: test.c:265 +msgid "`)' expected" +msgstr "')' diduga" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "`)' diduga, ditemukan %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: operator binary diduga" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: operator unary diduga" + +#: test.c:881 +msgid "missing `]'" +msgstr "hilang `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntax error: `;' tidak terduga" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "nomor sinyal tidak valid" + +#: trap.c:325 +#, fuzzy, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: nilai buruk dalam trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: sinyal handler adalah SIG_DFL, mengirimkan kembali %d " +"(%s) kediri sendiri" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: sinyal buruk %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "error mengimpor definisi fungsi untuk `%s'" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "level shell (%d) terlalu tinggi, mereset ke 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: tidak ada context fungsi di scope ini" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: tidak dapat meng-'assign' fd ke variabel" + +#: variables.c:3475 +#, fuzzy, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: nilai dari berkas pendeskripsi penelusur tidak valid" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: tidak ada context fungsi dalam scope ini" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s memiliki exportstr kosong" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "karakter %d tidak valid dalam exporstr untuk %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "bukan `=' dalam exportstr untuk %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: kepala dari shell_variables bukan sebuah fungsi cbntext" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: bukan global_variable context" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: kepala dari shell_variables bukan sebuah scope lingkungan " +"sementara" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: tidak dapat membuka sebagai BERKAS" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: nilai dari berkas pendeskripsi penelusur tidak valid" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: diluar jangkauan" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Hak Cipta (C) 2012 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Lisensi GPLv3+: GNU GPL versi 3 atau sesudahnya \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versi %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Ini adalah perangkat lunak bebas; anda bebas untuk mengubah dan " +"mendistribusikannya." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "TIDAK ADA GARANSI, selama masih diijinkan oleh hukum yang berlaku." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: tidak dapat mengalokasikan %lu bytes (%lu bytes teralokasi)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: tidak dapat mengalokasikan %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: tidak dapat mengalokasikan %lu bytes (%lu bytes teralokasi)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s: %d: tidak dapat teralokasi %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [name[=nilai] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] name [nama ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVSX] [-m keymap] [-f nama berkas] [-q nama] [-u nama] [-r " +"keyseq] [-x keyseq:perintah-shell] [keyseq:readline-function atau readline-" +"command]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "pemanggil [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [direktori]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "perintah [-pVv] perintah [argumen ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [name[=nilai] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilrtux] [-p] name[=nilai] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [pilihan] name[=nilai] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f nama berkas] [name ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [argumen ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts nama optstring [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nama] [perintah [argumen ...]] [redireksi ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e ename] [-lnr] [pertama] [terakhir] atau fc -s [pat=rep] [perintah]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [spesifikasi pekerjaan]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [spesifikasi pekerjaan ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p nama jalur] [-dt] [nama ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "bantuan [-dms] [pola ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"sejarah [-c] [-d ofset] [n] atau history -anrw [nama berkas] atau history -" +"ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [spesifikasi pekerjaan ...] atau jobs -x perintah [args]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [spesifikasi pekerjaan ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s spesifikasi sinyal | -n nomor sinyal | -sigspec] pid | jobsepc ... " +"atau kill -l [sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "biarkan arg [argumen ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a array] [-d pembatas] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nama-pilihan] [--] [argumen ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=nilai] ...] atau export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=nilai] ...] atau readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source nama berkas [argumen]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". nama berkas [argumen]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] spesifikasi sinyal ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nama [name ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefilmnpqrstuvxT] [batas]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAMA [in WORDS ...] ; do PERINTAH; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do PERINTAH; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAMA [ in WORDS ... ;] do PERINTAH; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case WORD in [POLA [| POLA]...) PERINTAH ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if PERINTAH; then PERINTAH; [ elif PERINTAH; then PERINTAH; ]... [ else " +"PERINTAH; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while PERINTAH; do PERINTAH; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until PERINTAH; do PERINTAH; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAMA] perintah [redireksi]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { PERINTAH; } atau name () { PERINTAH ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ PERINTAH ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expressi ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expressi ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variabel - Nama dan arti dari beberapa shell variabel" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optname ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [argumen]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o pilihan] [-A action] [-G globpat] [-" +"W daftar kata] [-F fungsi] [-C perintah] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o pilihan] [-A aksi] [-G globpat] [-W wordlist] [-" +"F fungsi] [-C perintah] [-X filterpat] [-P prefix] [-S suffix] [word]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o pilihan] [-DE] [nama ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n jumlah] [-O asal] [-s jumlah] [-t] [-u fd] [-C callback] [-c " +"quantum] [array]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n jumlah] [-O asal] [-s jumlah] [-t] [-u fd] [-C callback] [-c " +"quantum] [array]" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definisikan atau tampilkan aliases.\n" +" \n" +" `alias' dengan tanpa argumen atau dengan pilihan -p menampilkan daftar\n" +" dari aliases dalam bentuk alias NAMA=NILAI di keluaran standar.\n" +" \n" +" Jika tidak, sebuah alias didefinisikan untuk setiap NAMA yang NILAI-nya " +"diberikan.\n" +" sebuah tambahan spasi dalam NILAI menyebabkan kata selanjutnyan untuk " +"diperikasi untuk\n" +" pengganti alias ketika alias diexpand.\n" +" \n" +" Pilihan:\n" +" -p\tTampilkan seluruh alias yang terdefinisi dalam format yang " +"berguna\n" +" \n" +" Status Keluar:\n" +" alias mengembalikan true sampai sebuah NAMA diberikan yang mana belum " +"ada alias yang\n" +" terdefinisi." + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Hapus setiap NAMA dari daftar yang mendefinisikan aliases.\n" +" \n" +" Pilihan:\n" +" -a\thapus semua definisi alias.\n" +" \n" +" Mengembalikan sukses kecuali sebuah NAMA bukan alias yang sudah ada." + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Set Readline kunci pengikat dan variabel.\n" +" \n" +" Ikat sebuah urutan kunci ke fungsi readline atau sebuah macro, atau set\n" +" sebuah variabel readline. Argumen bukan-pilihan syntax yang equivalent\n" +" yang ditemukan dalam ~/.inputrc, tetapi harus dilewatkan sebagai sebuah " +"argumen tunggal:\n" +" yang terikat '\"\\C-x\\C-r\": membaca kembali berkas inisialisasi.\n" +" \n" +" Pilihan:\n" +" -m keymap Gunakan `keymap' sebagai keymap untuk durasi dari " +"perintah\n" +" ini. Nama keymap yang diterima adalah emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, dan vi-insert.\n" +" -l Daftar dari nama fungsi.\n" +" -p Daftar dari nama fungsi dan bindings.\n" +" -p Daftar dari fungsi dan bindings dalam bentuk yang " +"dapat digunakan sebagai\n" +" masukan.\n" +" -S Daftar urutan kunci yang memanggil macros " +"dannilainya\n" +" -s Daftar urutan kunci yang memanggil macros " +"dannilainya\n" +" dalam sebuah bentuk yang dapat digunakan sebagai " +"sebuah masukan. -V Daftar nama variabel dan nilai\n" +" -v Daftar nama variabel dan nilai dalam bentuk yang " +"dapat digunakan\n" +" sebagai masukan.\n" +" -q nama-fungsi Minta tentang kunci mana yang dipanggil oleh fungsi " +"yang disebut.\n" +" -u nama-fungsi Unbind semua kunci yang terikat dengan nama-" +"fungsi.\n" +" -r keyseq Hapus binding untuk KEYSEQ.\n" +" -f namafile Baca kunci bindings dari NAMAFILE.\n" +" -x keyseq:shell-command\tMenyebabkan SHELL-COMMAND untuk dijalankan " +"ketika\n" +" \t\t\t\tKEYSEQ dimasuki.\n" +" \n" +" Status Keluar:\n" +" bind memberikan kembalian 0 kecuali sebuah pilihan tidak dikenal " +"diberikan atau sebuah error terjadi." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Keluar dari for, while, atau until loops.\n" +" \n" +" Keluar untuk FOR, WHILE atau UNTIL loop. Jika N dispesifikasikan, keluar " +"N yang melingkupi\n" +" loops.\n" +" \n" +" Status Keluar:\n" +" Status keluar adalah 0 kecuali N tidak lebih besar atau sama dengan 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Melanjutkan for, while, atau until loops.\n" +" \n" +" Melanjutkan ke iterasi selanjutnya dari loop yang dilingkupi oleh FOR, " +"WHILE, atau UNTIL.\n" +" Jika N dispesifikasikan, melanjutkan di posisi ke N dari loop yang " +"dilingkupi. \n" +" Status Keluar:\n" +" Status keluar adalah 0 kecuali N tidak lebih besar atau sama dengan 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Menjalankan shell builtins.\n" +" \n" +" Menjalankan SHELL-BUILTIN dengan argumen ARGs tanpa menjalankan " +"pencarian\n" +" perintah. Ini berguna ketika anda menginginkan untuk mengimplementasikan " +"sebuah shell builtin\n" +" sebagai sebuah fungsi shell, tetapi butuh untuk menjalankan builtin " +"dalah fungsi.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status keluar dari SHELL-BUILTIN, atau salah jika SHELL-" +"BUILTIN adalah\n" +" bukan sebuah shell builtin.." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Mengembalikan context dari panggilan subroutine saat ini.\n" +" \n" +" Tanpa EXPR, mengembalikan \"$line $filename\". Dengan EXPR,\n" +" mengembalikan \"$line $subroutine $filename\"; informasi extra ini\n" +" dapat digunakan untuk menyediakan jejak stack.\n" +" \n" +" Nilai dari EXPR mengindikasikan bagaimana banyak panggilan frames " +"kembali sebelum\n" +" yang ada; Top frame adalah frame 0. \n" +" Status Keluar:\n" +" Mengembalikan 0 kecuali shell sedang tidak menjalankan sebuah fungsi " +"shell atau EXPR\n" +" tidak valid." + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Pindah direktori kerja shell.\n" +" \n" +" Pindah direktori saat ini ke DIR. Variabel $HOME adalah\n" +" default DIR.\n" +" \n" +" Variabel CDPATH mendefinisikan jalur pencarian untuk\n" +" direktori yang berisi DIR. Alternatif nama direktori dalam CDPATH\n" +" dipisahkan oleh sebuah colon (:). Sebuah nama direktori kosong adalah " +"sama dengan\n" +" direktori saat ini. i.e. `.'. Jika DIR dimulai dengan sebuah slash (/),\n" +" maka CDPATH tidak digunakan.\n" +" \n" +" Jika direktori tidak ditemukan, dan\n" +" pilihan shell cdable_vars' diset, maka coba kata sebagai sebuah nama\n" +" variabel. Jika variabel itu memiliki sebuah nilai, maka nilai dari " +"variabel itu yang digunakan\n" +" \n" +" Pilihan:\n" +" -L\tmemaksa link simbolik untuk diikuti\n" +" -P\tgunakan struktur physical direktori tanpa mengikuti link\n" +" symbolik\n" +" \n" +" Default adalah mengikuti link simbolik, seperti dalam `-L' " +"dispesifikasikan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan 0 jika direktori berubah; bukan nol jika tidak." + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Menampilkan nama dari direktori yang digunakan sekarang.\n" +" \n" +" Pilihan:\n" +" -L\tmenampilkan nilai dari $PWD jika ini nama dari direktori\n" +" \tyang digunakan sekarang\n" +" -P\tmenampilkan direktori pisik, tanpa link simbolik apapun\n" +" \n" +" Secara default, `pwd' berlaku seperi jika pilihan `-L' " +"dispesifikasikan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan 0 kecuali jika sebuah pilihan tidak valid diberikan atau " +"direktori sekarang\n" +" tidak bisa dibaca." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Perintah kosong.\n" +" \n" +" Tidak ada efek; perintah tidak melakukan apa-apa.\n" +" \n" +" Status Keluar:\n" +" Selalu sukses." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Mengembalikan sebuah hasil yang sukses.\n" +" \n" +" Status Keluar:\n" +" Selalu sukses." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Mengembalikan sebuah kembaliah yang tidak sukses.\n" +" \n" +" Status Keluar:\n" +" Selalu gagal." + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Menjalankan sebuah perintah sederhana atau menampilkan informasi mengenai " +"perintah.\n" +" \n" +" Menjalankan PERINTAH tanpa ARGS menekan fungsi pencarian shell, atau " +"menampilkan\n" +" informasi mengenasi PERINTAH tertentu. Dapat digunakan untuk memanggil " +"perintah\n" +" dalam disk ketika sebuah fungsi dengan nama yang sama ada.\n" +" \n" +" Pilihan:\n" +" -p\tgunakan sebuah nilai default untuk PATH yang menjamin untuk " +"mencari seluruh\n" +" \tpenggunaan stadar\n" +" -v\tmenampilkan deskripsi dari PERINTAH sama dengan `type' builtin\n" +" -V\tmenampilkan lebih jelas deskripsi dari setiap PERINTAH\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status keluar dari PERINTAH, atau gagal jika PERINTAH " +"tidak ditemukan." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Menset nilai variabel dan atribut.\n" +" \n" +" Variabel deklarasi dan memberikan atribut untuknya. Jika tidak ada NAMA " +"yang diberikan,\n" +" tampilkan atribut dan nilai dari seluruh variabel.\n" +" \n" +" Pilihan:\n" +" -f\tbatasi aksi atau tampilkan nama fungsi dan definisi\n" +" -F\tbatasi tampilan ke nama fungsi saja (tambahkan nomor baris dan\n" +" \tsumber berkas ketika debugging)\n" +" -p\ttampilkan atribut dan nilai dari setiap NAMA\n" +" \n" +" Pilihan yang menset atribut:\n" +" -a\tuntuk membuat NAMA idex array (jika didukung)\n" +" -A\tuntuk membuat NAMA assosiasi array (jika didukung)\n" +" -i\tuntuk membuat NAMA memiliki atribut `integer'\n" +" -l\tuntuk mengubah NAMA ke huruf kecil dalam assignment\n" +" -r\tuntuk membuah NAMA baca-saja\n" +" -u\tuntuk mengubah NAMA ke huruf besar dalam penempatan\n" +" -x\tuntuk membuah NAMA export\n" +" \n" +" Menggunakan `+' daripada `-' menonaktifkan atribut yang diberikan.\n" +" \n" +" Variabel dengan atribut integer memiliki evaluasi aritmetic (lihat\n" +" perintah `let') ditampilkan ketika variabel diberi sebuah nilai.\n" +" \n" +" Ketika digunakan dalam sebuah fungsi, `declare' membuat NAMA lokal, " +"seperti dengan\n" +" perintah `local'.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"sebuah error terjadi." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Menset nilai variabel dan atribut.\n" +" \n" +" Kadaluarsa. Lihat `help declare'." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Mendefinisikan variabel lokal.\n" +" \n" +" Membuat sebuah variabel locak dipanggil NAMA, dan memberikan kepadanya " +"NILAI. OPSI dapat\n" +" berupa semua pilihan yang diterima oleh `declare'.\n" +" \n" +" Variabel lokal hanya dapat digunakan dalam sebuah fungsi; mereka hanya\n" +" dapat dilihat ke fungsi dimana mereka terdefinisi dan anaknya.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan, " +"sebuah error terjadi.\n" +" atau shell tidak menjalankan sebuah fungsi." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Tulis argumen ke standar keluaran.\n" +" \n" +" Menampilkan ARG ke standar keluaran diikuti oleh baris baru.\n" +" \n" +" Pilihan:\n" +" -n\tjangan menambahkan sebuah baris baru\n" +" -e\taktifkan interpretasi dari karakter backslash\n" +" -E\tsecara eksplisit tekan interpretasi dari karakter backslash\n" +" \n" +" `echo' menginterpretasikan karakter backslash-escaped berikut:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress karakter baris baru yang tersisa\n" +" \\E\tescape karakter\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tkarakter yang memiliki kode ASCII NNN (oktal). NNN dapat " +"berupa\n" +" \t0 sampai 3 oktal digit\n" +" \\xHH\tdelapan-bit karakter yang nilainya adalah HH (hexadesimal). HH\n" +" \tdapat satu dari dua bilangan hex\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah penulisan error terjadi." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Menulis argumen ke standar output.\n" +" \n" +" Menampilkan ARG ke standard keluaran diikuti dengan sebuah baris baru.\n" +" \n" +" Pilihan:\n" +" -n\tjangan menambahkan sebuah baris baru\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah penulisan error terjadi." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Aktifkan dan non-aktifkan shell builtins.\n" +" \n" +" Aktifkan dan non-aktifkan perintah builtin shell. Menonaktifkan " +"membolehkan anda untuk\n" +" menjalankan sebuah perintah disk yang memiliki nama yang sama dengan " +"shell builtin\n" +" tanpa menggunakan sebuah nama jalur yang lengkap.\n" +" \n" +" Pilihan:\n" +" -a\ttampilkan daftar dari builtins memperlihatkan aktif atau tidak " +"setiap diaktifkan\n" +" -n\tmenonaktifkan setiap NAMA atau tampilkan daftar dari builtin yang " +"tidak aktif\n" +" -p\ttampilkan daftar dari builtins dalam format yang berguna\n" +" -s\ttampilkan yang nama dari Posix `special' builtins\n" +" \n" +" Pilihan mengontrol dynamic loading:\n" +" -f\tLoad builtin NAMA dari shared object NAMA BERKAS\n" +" -d\tHapus sebuah builtin diload dengan -f\n" +" \n" +" Tanpa pilihan, untuk setiap NAMA di aktifkan.\n" +" \n" +" Untuk menggunakan `test' ditemukan dalam $PATH daripada dalam shell " +"builtin\n" +" versi, ketik `enable -n test'.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali NAMA bukan sebuah shell builtin atau sebuah " +"error terjadi." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Menjalankan argumen sebagai sebuah perintah shell.\n" +" \n" +" Mengkombinasikan ARG dalam sebuah string tunggal, gunakan hasil sebagai " +"masukan dalam shell,\n" +" dan jalankan hasil dari perintah.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status keluar dari perintah atau sukses jika perintah " +"adalah kosong." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Ambil argumen pilihan.\n" +" \n" +" Getops digunakan oleh shell procedures untuk memparse parameter posisi.\n" +" \n" +" OPTSTRING berisi huruf pilihan yang dikenali; jika sebuah huruf\n" +" diikuti oleh sebuah colon, pilihan diduga akan berupa argumen,\n" +" yang seharusnya dipisahkan dari itu oleh spasi.\n" +" \n" +" Setiap waktu ini dipanggil, getopts akan menempatkan pilihan selanjutnya " +"dalam\n" +" $name shell variabel, menginisialisasi nama jiki ini tidak ada, dan\n" +" index dari argumen selanjutnya untuk diproses kedalam shell\n" +" variabel OPTIND. OPTIND diinisialisasi ke 1 setiap shell atau\n" +" sebuah shell script dipanggil. Ketika sebuah pilihan membutuhkan sebuah " +"argumen,\n" +" getopts menempatkan argumen itu kedalam variabel shell OPTARG.\n" +" \n" +" getopts melaporkan error dalam satu dari dua cara. Jika karakter " +"pertama\n" +" dari OPTSTRING adalah sebuah colon, getopts menggunakan silent error " +"laporan. Dalam\n" +" Mode ini, tidak ada pesan error yang ditampilkan. Jika sebuah pilihan " +"tidak valid terlihat\n" +" getops menempatkan karakter pilihan yang ditemukan ke OPTARG. Jika " +"sebuah\n" +" argumen yang dibutuhkan tidak ditemukan, getopts menempatkan sebuah ':' " +"kedalam NAME dan\n" +" menset OPTARG ke pilihan karakter yang ditemukan. Jika getopts tidak " +"dalam\n" +" mode silent, dan sebuah pilihan tidak valid terlihat getopts menempatkan " +"'?' kedalam\n" +" variabel NAME, OPTARG tidak diset, dan sebuah pesan analisis\n" +" tampilkan.\n" +" \n" +" Jika sebuah variabel shell OPTERR memiliki sebuah nilai 0, getopts " +"mendisable\n" +" pencetakan dari pesan error, bahkan jika karakter pertama dari\n" +" OPTSTRING bukan sebuah colon. OPTERR memiliki nilai 1 secara default.\n" +" \n" +" Getopts secara normal memparse parameter posisi ($0 - $9), tetapi jika\n" +" lebih dari satu argumen diberikan, mereka diparse. \n" +" Status Keluar:\n" +" Mengembalikan sukses jika sebuah pilihan ditemukan; gagal jika akhir " +"dari pilihan\n" +" ditemui atau sebuah error terjadi." + +#: builtins.c:694 +#, fuzzy +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Mengganti shell dengan perintah yang diberikan.\n" +" \n" +" Jalankan PERINTAH, ganti shell ini dengan aplikasi yang " +"dispesifikaskan.\n" +" ARGUMEN menjadi argumen dari PERINTAH. Jika PERINTAH tidak " +"dispesifikasikan,\n" +" setiap redireksi akan memiliki afek dalam shell sekarang.\n" +" \n" +" Pilihan:\n" +" -a nama\tlewatkan NAMA sebagai argumen ke nol ke PERINTAH\n" +" -c\t\tjalankan PERINTAH dengan sebuah environment kosong\n" +" -l\t\ttempatkan sebuah dash dalam argumen ke nol ke PERINTAH\n" +" \n" +" Jika perintah tidak dapat dijalankan, sebuah non-interaktif shell " +"keluar, kecuali\n" +" pilihan shell `execfail' diset.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali PERINTAH tidak ditemukan atau sebuah " +"redireksi error terjadi." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Keluar dari shell.\n" +" \n" +" Keluar dari shell dengan status dari N. Jika N diabaikan, status " +"keluaran\n" +" adalah status dari perintah terakhir yang dijalankan." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Keluar dari sebuah login shell.\n" +" \n" +" Keluar sebuah login shell dengan status keluar N. Mengembalikan sebuah " +"error jika tidak dijalankan\n" +" dalam sebuah login shell." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Tampilkan atau jalankan perintah dari daftar sejarah.\n" +" \n" +" fc biasa digunakan untuk mendaftar atau mengubah dan menjalankan " +"perintah dari daftar sejarah.\n" +" PERTAMA dan TERAKHIR dapat berupa nomor yang menspesifikasikan " +"jangkauan, atau PERTAMA dapat berupa sebuah\n" +" string, yang berarti adalah perintah yang berawal dengan string.\n" +" \n" +" Pilihan:\n" +" -e ENAME\tmemilih editor yang akan digunakan. Default adalah FCEDIT, " +"kemudian EDITOR,\n" +" \t\tkemudian vi.\n" +" -l \tdaftar baris daripada mengubahnya.\n" +" -n \tabaikan nomor baris ketika MENDAFTAR.\n" +" -r \tmembalik urutan dari baris (membuat yang terbaru terdaftar " +"pertama).\n" +" \n" +" Dengan `fc -s [pat=rep ...] [perintah]' format, perintah\n" +" dijalankan setelah substitusi OLD=NEW dilakukan.\n" +" \n" +" Sebuah alias yang berguna yang digunakan dengan ini r='fc -s', jadi " +"mengetikan `r cc'\n" +" menjalankan perintah terakhir yang diawali dengan `cc' dan mengetikan " +"'r' menjalankan kembali\n" +" perintah terakhir.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses atau status dari perintah yang dijalankan; tidak-" +"nol jika sebuah error terjadi." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Pindahkan pekerjaan di foreground.\n" +" \n" +" Tempatkan JOB_SPEC di foreground, dan buat ini pekerjaan saat ini. Jika\n" +" JOB_SPEC tidak ada, shell notion dari pekerjaan saat ini\n" +" yang digunakan.\n" +" \n" +" Status Keluar:\n" +" Status dari perintah yang ditempatkan di foreground, atau gagal jika " +"sebuah error terjadi." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Pindahkan pekerjaan ke background.\n" +" \n" +" Tempatkan setiap JOB_SPEC dalam background, seperti jika ini telah " +"dimulai dengan\n" +" `&'. Jika JOB_SPEC tidak ada, notion shell's dari pekerjaan\n" +" yang saat berjalan digunakan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali pengontrol pekerjaan tidak aktif atau " +"sebuah error terjadi." + +#: builtins.c:793 +#, fuzzy +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Ingat atau tampilkan lokasi aplikasi.\n" +" \n" +" Tentukan dan ingat nama jalur lengkap dari setiap NAMA perintah. Jika\n" +" tidak ada argumen yang diberikan, informasi mengenai perintah yang " +"diingat akan ditampilkan.\n" +" \n" +" Pilihan:\n" +" -d\t\tlupakan lokasi yang diingat untuk setiap NAMA\n" +" -l\t\ttampilkan dalam format yang bisa digunakan sebagai masukan\n" +" -p pathname\tgunakan NAMA JALUR yang nama jalur lengkap dari NAMA\n" +" -r\t\tlupakan semua lokasi yang diingat\n" +" -t\t\ttampilkan lokasi yang diingat untuk setiap NAMA, diawali\n" +" \t\tuntuk setiap lokasi diberikan NAMA yang sesuai jika multiple\n" +" \t\tNAMA diberikan\n" +" Argumen:\n" +" NAMA\t\tSetiap NAMA yang ditemukan dalam $PATH dan ditambahkan dalam " +"daftar\n" +" \t\tdari perintah yang diingat.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali NAMA tidak ditemukan atau sebuah pilihan " +"tidak valid telah diberikan." + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Tampilkan informasi mengenai perintah builtin.\n" +" \n" +" Tampilkan ringkasan singkat dari perintah builtin. Jika POLA\n" +" dispesifikasikan, tampilkan bantuan lengkap di seluruh perintah yang " +"cocok dengan POLA,\n" +" jika tidak daftar dari topik bantuan ditampilkan.\n" +" \n" +" Pilihan:\n" +" -d\tkeluarkan deskripsi singkat untuk setiap topik\n" +" -m\ttampilkan penggunaan dalam format pseudo-manpage\n" +" -s\tkeluarkan hanya penggunaan singkat untuk setiap topik yang cocok\n" +" \tdengan POLA\n" +" \n" +" Argumen:\n" +" POLA\tPola menspesifikasikan topik bantuan\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali POLA tidak ditemukan atau pilihan tidak " +"valid diberikan." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Menampilkan atau memanipulasi daftar sejarah.\n" +" \n" +" Menampilkan daftar sejarah dengan nomor baris. Baris yang ditampilkan " +"dengan\n" +" sebuah `*' telah diubah. Argumen dari N mengatakan untuk menampilkan " +"hanya\n" +" N baris terakhir.\n" +" \n" +" Pilihan:\n" +" -c\tmenghapus daftar sejarah dengan cara menghapus seluruh masukan\n" +" -d menghapus masukan sejarah di offset OFFSET.\n" +" \n" +" -a\tmenambahkan ke daftar sejarah dari sesi ini ke berkas sejarah.\n" +" -n\tmembaca seluruh baris sejarah yang belum dibaca dari berkas " +"sejarah\n" +" -r\tmembaca berkas sejarah dan menambahkan isinya ke daftar\n" +" \tsejarah\n" +" -w menulis sejarah sekarang ke berkas sejarah\n" +" \tdan menambahkannya kedalam daftar sejarah\n" +" \n" +" -p\tjalankan expansi sejarah untuk setiap ARG dan tampilkan hasilnya\n" +" \ttanpa menyimpannya kedalam daftar sejarah\n" +" -s\ttambahkan ARG ke daftar sejarah sebagai sebuah masukan tunggal\n" +" \n" +" \n" +" Jika NAMAFILE diberikan, maka itu digunakan sebagai berkas sejarah " +"selain itu\n" +" jika $HISTFILE memiliki nilai, maka itu digunakan, selain itu ~/." +"bash_history.\n" +" \n" +" \n" +" Jika variabel $HISTTIMEFORMAT diset dan tidak kosong, nilai ini yang " +"akan digunakan\n" +" sebagai format untuk string untuk strftime(3) untuk mencetak timestamp " +"yang berhubungan\n" +" dengan setiap masukan sejarah yang ditampilkan. Tidak ada time stamp " +"yang ditampilkan jika tidak.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"sebuah error terjadi." + +#: builtins.c:879 +#, fuzzy +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Menampilkan status dari pekerjaan.\n" +" \n" +" Tampilkan pekerjaan yang aktif. JOBSPEC membatasi keluaran ke pekerjaan " +"itu.\n" +" Tanpa pilihan, status dari seluruh aktif job ditampilkan.\n" +" \n" +" Pilihan:\n" +" -l menampilkan daftar dari proses id sebagai informasi tambahan.\n" +" -n diberikan, hanya proses yang sudah berubah status saja sejak\n" +" \tnotifikasi terakhir yang ditampilkan.\n" +" -p hanya menampilkan proses id saja.\n" +" -r membatasi keluaran ke pekerjaan yang sedang jalan\n" +" -s membatasi keluaran ke pekerjaan yang berhenti\n" +" \n" +" Jika pilihan -x diberikan, PERINTAH dijalankan setelah semua spesifikasi " +"pekerjaan\n" +" yang tampil di ARGS telah diganti dengan proses ID dari proses " +"pekerjaan\n" +" grup leader.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecualis sebuah pilihan tidak valid diberikan atau " +"sebuah error terjadi.\n" +" Jika -x digunakan, mengembalikan status keluar dari PERINTAH." + +#: builtins.c:906 +#, fuzzy +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Hapus pekerjaan dari shell sekarang.\n" +" \n" +" Hapus setiap JOBSPEC argumen dari tabel dari pekerjaan aktif. Tanpa\n" +" JOBSPEC apapun, shell menggunakan indikasi ini dari pekerjaan sekarang.\n" +" \n" +" Pilihan:\n" +" -a\thapus seluruh pekerjaan jika JOBSPEC tidak diberikan\n" +" -h\ttandai setiap JOBSPEC sehingga SIGHUP tidak dikirim ke pekerjaan " +"jika\n" +" \tshell menerima sebuah SIGHUP\n" +" -r\thapus hanya pekerjaan yang sedang berjalan\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali ada sebuah pilihan tidak valid atau JOBSPEC " +"diberikan." + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Mengirim sebuah sinyal ke sebuah pekerjaan.\n" +" \n" +" Mengirim ke sebuah proses yang diidentifikasikan oleh PID atau JOBSPEC " +"dengan sinyal yang diberi name\n" +" oleh SIGSPEC atau SIGNUM. Jika SIGSPEC atau SIGNUM tidak ada, maka\n" +" SIGTERM diasumsikan.\n" +" \n" +" Pilihan:\n" +" -s sig\tSIG adalah sebuah nama sinyal\n" +" -n sig\tSIG adalah sebuah nomor sinyal\n" +" -l\tdaftar dari nama sinyal; jika argumen diikuti dengan `-l' mereka " +"mengasumsikan ke\n" +" \tnomor sinyal yang namanya ditampilkan.\n" +" Kill adalah sebuah shell builtin untuk dua alasan; ini membolehkan " +"sebuah jobs ID untuk digunakan dari pada\n" +" proses IDs, dan memperbolehkan proses untuk dimatikan jika batas\n" +" dari proses yang dibuat tercapai.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"sebuah error terjadi." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Evaluasi ekspresi arithmetic.\n" +" \n" +" Setiap ARG adalah sebuah ekspresi arithmetic yang dievaluasi. Evaluasi\n" +" dilakukan dalam fixed-width integers dengan tidak ada pemeriksaan untuk " +"overflow, walaupun\n" +" pembagian dengan 0 ditangkap dan ditandai sebagai error. Berikut\n" +" daftar dari operator yang dikelompokkan dalam tingkat tingkat dari equal " +"precedence operators.\n" +" Tingkat yang ditampilkan dalam urutan dari decreasing precedence.\n" +" \n" +" \tid++, id--\tvariabel post-increment, post-decrement\n" +" \t++id, --id\tvariabel pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical dan bitwise negasi\n" +" \t**\t\texponential\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+. -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shift\n" +" \t<=. >=, <, >\tperbandingan\n" +" \t==, !=\t\tpersamaan, dan ketidak samaan\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\toperator kondisional\n" +" \t=, *=, /=, %=,\n" +" \t+=. -=. <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Variabel shell dibolehkan sebagai operand. Nama dari variabel\n" +" digantikan oleh nilainya (coerced ke fixed-width integer) dalam\n" +" sebuah expresi. Variabel tidak butuh atribut integer\n" +" dinyalakan untuk digunakan dalam sebuah expresi.\n" +" \n" +" Operator yang dievaluasi dalam urutan precedence. Sub-expresi dalam\n" +" parentheses dievaluasi terlebih dahulu dan boleh dioverride precedence\n" +" aturan diatasnya.\n" +" \n" +" Status Keluar:\n" +" Jika ARG terakhir dievaluasi ke 0, membiarkan kembali ke 1; 0 " +"dikembalikan Jika tidak." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Membaca sebuah baris dari standar masukan dan membaginya dalam bagian " +"bagian.\n" +" \n" +" Satu baris dibaca dari masukan standar, atau dari berkas deskripsi FD " +"jika\n" +" pilihan -u diberikan, dan kata pertama diberikan ke NAMA pertama,\n" +" kata kedua ke NAMA kedua, dan seterusnya. dengan kata yang tersisa " +"ditempatkan\n" +" ke NAMA terakhir. Hanya karakter yang ditemukan dalam $IFS yang dikenal " +"sebagai pembatas\n" +" kata.\n" +" \n" +" Jika tidak ada NAMA yang diberikan, baris yang dibaca disimpan dalam " +"variabel BALASAN\n" +" \n" +" Pilihan:\n" +" -a array\tditempatkan kata dibaca secara berurutan indice dari array\n" +" \t\tvariabel ARRAY, dimulai dari nol\n" +" -d delim\tdilanjutkan sampai karakter pertama dari PEMBATAS dibaca, " +"daripada\n" +" \t\tbaris baru\n" +" -e\t\tgunakan Readline untuk memperoleh baris dalam sebuah shell " +"interaktif\n" +" -i text\tGunakan TEXT sebagai text inisial untuk Readline\n" +" -n nchars\tkembali setelah membaca NCHARS characters daripada " +"menunggu\n" +" \t\tuntuk sebuah baris baru\n" +" -N nchars\thanya kembali setelah membaca tepat NCHARS karakter, " +"kecuali\n" +" \t\tEOF ditemui atau waktu habis dalam pembacaan, abaikan pembatas " +"apapun\n" +" -p prompt\tkeluarkan string PROMPT tanpa tambahan baris baru sebelum\n" +" \t\tmencoba untuk membaca\n" +" -r\t\tjangan ijinkan backslash untuk mengeluarkan karakter apapun\n" +" -s\t\tjangan echo masukan yang datang dari sebuah terminal\n" +" -t menyebabkan pembacaan untuk time out dan kembali gagal jika sebuah " +"baris lengkap\n" +" \t\tdari masukan tidak dibaca dalam TIMEOUT detik. Jika variabel TMOUT " +"terset,\n" +" \t\tnilai ini akan menjadi nilai default timeout. TIMEOUT mungkin " +"sebuah\n" +" \t\tbilangan fraksional. Status keluaran lebih besar dari 128 jika\n" +" \t\ttimeout dilewati\n" +" -u fd\t\tbaca dari berkas deskripsi FD daripada standar masukan\n" +" \n" +" Status Keluar:\n" +" Kode kembali adalah nol, kecuali akhir-dari-berkas ditemui, baca " +"kehabisan waktu,\n" +" atau sebuah berkas deskripsi disupply sebagai sebuah argumen ke pilihan -" +"u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Kembali dari sebuah fungsi shell.\n" +" \n" +" Menyebabkan sebuah fungsi atau sebuah script untuk keluar dengan nilai " +"kembali\n" +" yang dispesifikasikan oleh N. Jika N diabaikan, status kembalian adalah\n" +" perintah terakhir yang dijalankan dalam fungsi atau script.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan N, atau gagal jika shell tidak menjalan sebuah fungsi atau " +"script." + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Set atau unset nilai dari pilihan shell dan parameter posisi.\n" +" \n" +" Ubah nilai dari atribut shell dan parameter posisi, atau\n" +" tampilkan nama dan nilai dari variabel shell.\n" +" \n" +" Pilihan:\n" +" -a Tandai variabel yang telah termodifikasi atau dibuat untuk " +"export.\n" +" -b Notifikasi penyelesaian pekerjaan secara langsung.\n" +" -e Keluar langsung jika sebuah perintah keluar dengan status tidak " +"nol.\n" +" -f Menonaktifkan pembuatan nama berkas (globbing).\n" +" -h Ingat lokasi dari perintah sebagai mereka dicari.\n" +" -k Semua argumen assignment ditempatkan dalam environment untuk " +"sebuah\n" +" perintah, tidak hanya mengawali nama perintah.\n" +" -m Pengendali pekerjaan diaktifkan.\n" +" -n Baca perintah tapi jangan menjalankan perintah tersebut.\n" +" -o nama-pilihan\n" +" Set variabel menurut nama-pilihan:\n" +" allexport sama seperti -a\n" +" braceexpand sama seperti -B\n" +" emacs gunakan gaya emacs dalam line editing interface\n" +" errexit sama seperti -e\n" +" errtrace sama seperti -E\n" +" functrace sama seperti -T\n" +" hashall sama seperti -h\n" +" histexpand sama seperti -H\n" +" history aktifkan sejarah perintah\n" +" ignoreeof shell tidak akan keluar ketika membaca EOF\n" +" interactive-comments\n" +" membolehkan komentar ada dalam perintah " +"interaktif\n" +" keyword sama seperti -k\n" +" monitor sama seperti -m\n" +" noclobber sama seperti -C\n" +" noexec sama seperti -n\n" +" noglob sama seperti -f\n" +" nolog saat ini diterima tetapi diabaikan\n" +" notify sama seperti -b\n" +" nounset sama seperti -u\n" +" onecmd sama seperti -t\n" +" physical sama seperti -P\n" +" pipefail nilai kembalian dari sebuah pipelie adalah status " +"dari\n" +" perintah terakhir yang keluar dengan sebuah status " +"tidak nol,\n" +" atau nol jika tidak ada perintah yang keluar " +"dengan status tidak nol\n" +" posix ubah perilaku dari bash dimana operasi\n" +" default berbeda dari 1003.2 standar ke\n" +" sesuai dengan standar\n" +" privileged sama seperti -p\n" +" verbose sama seperti -v\n" +" vi gunakan sebuah gaya vi dalam line editing " +"interface.\n" +" xtrace sama seperti -x\n" +" -p Aktif ketika real dan efektif id pengguna tidak cocok.\n" +" Menonaktifkan pemrosesan dari berkas $ENV dan mengimpor dari " +"fungsi\n" +" shell. Mengubah pilihan ini off menyebabkan efektif uid dan\n" +" gid untuk diset ke real uid dan gid.\n" +" -t Keluar setelah membaca dan menjalankan satu perintah.\n" +" -u Perlakukan variabel yang tidak diset sebagai error ketika " +"mensubstitusi.\n" +" -v Tampilkan baris masukan shell seperti ketika dibaca.\n" +" -x Tampilkan perintah dan argumennya ketika menjalankan perintah " +"tersebut.\n" +" -B Shell akan melakukan expansi brace\n" +" -C Jika diset, melarang berkas regular yang telah ada untuk " +"ditulis\n" +" oleh keluaran redirection.\n" +" -E Jika diset, trap ERR diturunkan oleh fungsi shell.\n" +" -H Mengaktifkan ! gaya pengubahan sejarah. Tanda ini aktif\n" +" secara default ketika shell interaktif.\n" +" -P Jika diset, jangan ikuti symbolic link ketika menjalankan " +"perintah\n" +" seperti cd ketika mengubah direktori kerja sekarang.\n" +" -T Jika diset, Debug trap diturunkan oleh fungsi shell.\n" +" - Assign argumen yang tersisa ke parameter posisi.\n" +" Pilihan -x dan -v akan dimatikan.\n" +" \n" +" Menggunakan + daripada - akan menyebabkan tanda untuk dimatikan. Tanda\n" +" juga bisa digunakan dalam pemanggilan shell. Tanda yang terset\n" +" saat ini dapat ditemukan dalam $-. ARG n yang tersisa adalah parameter\n" +" posisi dan ditempatkan, dalam urutan, ke $1, $2, ... $n. Jika tidak ada\n" +" ARG yang diberikan, semua shell variabel ditampilkan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan." + +#: builtins.c:1139 +#, fuzzy +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Unset nilai dan atribut dari variabel shell dan fungsi.\n" +" \n" +" Untuk setiap NAMA, hapus variabel atau fungsi yang berhubungan.\n" +" \n" +" Pilihan:\n" +" -f\tperlakukan setiap NAMA sebagai sebuah fungsi shell\n" +" -v\tperlakukan setiap NAMA sebagai sebuah variabel shell\n" +" \n" +" Tanpa pilihan, unset pertama mencoba untuk menunset sebuah variabel, dan " +"jika itu gagal,\n" +" mencoba untuk menunset sebuah fungsi.\n" +" \n" +" Beberapa variabel tidak dapat diunset; Lihat juga `readonly'.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"sebuah NAMA adalah baca-saja." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Set export atribut untuk variabel shell.\n" +" \n" +" Tandai setiap NAMA untuk otomatis export ke environment setelah\n" +" perintah dijalankan. Jika NILAI diberikan, berikan NILAI sebelum " +"export.\n" +" \n" +" Pilihan:\n" +" -f\tmerujuk ke fungsi shell\n" +" -n\thapus properti export dari setiap NAMA\n" +" -p\ttampilkan daftar dari seluruh variabel dan fungsi yang terexport\n" +" \n" +" Sebuah argumen dari `--' menonaktifkan pemrosesan pilihan selanjutnya.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"NAMA tidak valid." + +#: builtins.c:1180 +#, fuzzy +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Tandai variabel shell sebagai tidak bisa diubah.\n" +" \n" +" Tandai setiap NAMA sebagai baca-saja; nilai dari NAMA ini tidak boleh\n" +" diubah untuk penggunaan selanjutnya. Jika NILAI diberikan, berikan " +"NILAI\n" +" sebelum menandainya sebagai baca-saja.\n" +" \n" +" Pilihan:\n" +" -a\tmerujuk ke aray index variabel\n" +" -A\tmerujuk ke variabel aray assosiasi\n" +" -f\tmerujuk ke fungsi shell\n" +" -p\tmenampilkan sebuah daftar dari seluruh variabel dan fungsi baca-" +"saja\n" +" \n" +" Sebuah argumen dari `--' menonaktifkan pemrosesan pilihan selanjutnya.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecual sebuah pilihan tidak valid diberikan atau " +"NAMA tidak valid." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Geser parameter posisi.\n" +" \n" +" Ubah nama parameter posisi $N+1,$N+2 ... ke $1,$2 ... Jika N\n" +" tidak diberikan, N diasumsikan 1.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali N adalah negatif atau lebih besar dari $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Jalankan perintah dari sebuah berkas dalam shell sekarang.\n" +" \n" +" Baca dan jalankan perintah dari FILENAME dan kembali. Nama jalur dalam\n" +" $PATH digunakan untuk mencari direktori yang berisi NAMABERKAS. Jika " +"salah satu\n" +" dari ARGUMENTS diberikan, mereka menjadi parameter posisi ketika\n" +" NAMABERKAS dijalankan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari perintah terakhir yang dijalankan dalam NAMA " +"BERKAS; gagal jika\n" +" NAMA BERKAS tidak dapat dibaca." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspend eksekusi shell.\n" +" \n" +" Suspend eksekusi dari shell ini sampai menerima sebuah sinyal SIGCONT.\n" +" Kecuali dipaksa, login shell tidak dapat disuspend.\n" +" \n" +" Pilihan:\n" +" -f\tpaksa untuk suspend, walaupun jika shell adalah sebuah login " +"shell\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali pengontrol pekerjaan tidak aktif atau " +"sebuah error terjadi." + +#: builtins.c:1261 +#, fuzzy +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Evaluasi ekspresi kondisi.\n" +" \n" +" Keluar dengan sebuah status dari 0 (benar) atau 1 (salah) tergantung " +"dari\n" +" evaluasi dari EXPR. Expresi dapat berupa unary atau binary. Unary\n" +" expresi sering digunakan untuk memeriksa status dari sebuah berkas.\n" +" Terdapat operator string juga, dan operator pembanding numerik.\n" +" \n" +" Operator berkas:\n" +" \n" +" -a BERKAS Benar jika berkas ada.\n" +" -b BERKAS Benar jika berkas berupa blok spesial.\n" +" -c BERKAS Benar jika berkas adalah karakter spesial.\n" +" -d BERKAS Benar jika berkas adalah sebuah direktori.\n" +" -e BERKAS Benar jika berkas ada.\n" +" -f BERKAS Benar jika berkas ada dan berupa sebuah berkas " +"regular.\n" +" -g BERKAS Benar jika berkas memiliki set-grup-id.\n" +" -h BERKAS Benar jika berkas adalah symbolic link.\n" +" -L BERKAS Benar jika berkas adalah symbolic link.\n" +" -k BERKAS Benar jika berkas memiliki `sticky' bit diset.\n" +" -p BERKAS Benar jika berkas adalah named pipe.\n" +" -r BERKAS Benar jika berkas dapat dibaca oleh anda.\n" +" -s BERKAS Benar jika berkas ada dan tidak kosong.\n" +" -S BERKAS Benar jika berkas adalah socket.\n" +" -t FD Benar jika FD dibuka dalam sebuah terminal.\n" +" -u BERKAS Benar jika berkas memiliki set-user-id.\n" +" -w BERKAS Benar jika berkas dapat ditulis oleh anda.\n" +" -x BERKAS Benar jika berkas dapat dijalankan oleh anda.\n" +" -O BERKAS Benar jika berkas secara efektif dimiliki oleh " +"anda.\n" +" -G BERKAS Benar jika berkas secara efektif dimiliki oleh grup " +"anda.\n" +" -N BERKAS Benar jika berkas telah dimodifikasi sejak terakhir " +"ini dibaca.\n" +" \n" +" FILE1 -nt FILE2 Benar jika file1 lebih baru dari file2 (menurut \n" +" tanggal modifikasi).\n" +" \n" +" FILE1 -ot FILE2 Benar jika file1 lebih lama dari file2.\n" +" \n" +" FILE1 -ef FILE2 Benar jika file1 adalah hard link ke file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING Benar jika string kosong.\n" +" \n" +" -n STRING\n" +" STRING Benar jika string tidak kosong.\n" +" \n" +" STRING1 = STRING2\n" +" Benar jika string sama.\n" +" STRING1 != STRING2\n" +" Benar jika string tidak sama.\n" +" STRING1 < STRING2\n" +" Benar jika STRING1 sorts sebelum STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" Benar jika STRING1 sorts sesudah STRING2 " +"lexicographically.\n" +" \n" +" Operator lain:\n" +" \n" +" -o Pilihan Benar jika pilihan shell OPSI diaktifkan.\n" +" ! EXPR Benar jika expr salah.\n" +" EXPR1 -a EXPR2 Benar jika kedua expr1 dan expr2 adalah benar.\n" +" EXPR1 -o EXPR2 Benar jika salah satu dari expr1 atau expr2 adalah " +"benar.\n" +" \n" +" arg1 OP arg2 Pemeriksaan arithmetik. OP adalah salah satu dari -" +"eq, -ne,\n" +" -lt, -le, -gt, atau -ge.\n" +" \n" +" Arithmetic binary operator mengembalikan benar jika ARG1 adalah " +"equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, atau greater-than-or-" +"equal\n" +" than ARG2.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses jika EKSPR mengevaluasi ke benar; gagal jika " +"EXPR mengevaluasi ke\n" +" salah atau sebuah argumen tidak valid diberikan." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Evaluasi expresi kondisional.\n" +" \n" +" Ini sinonim untuk \"test\" builtin, tetapi argumen terakhir\n" +" harus berupa sebuah literal `]', untuk mencocokan dengan pembukaan `['." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Tampilkan waktu pemrosesan.\n" +" \n" +" Tampilkan akumulasi waktu penggunaan pengguna dan sistem untuk shell dan " +"seluruh proses dari\n" +" anaknya.\n" +" \n" +" Status Keluar:\n" +" Selalu sukses." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Tangkap sinyal dan even lainnya.\n" +" \n" +" Definisikan dan aktivasi handlers yang harus dijalankan ketika shell " +"menerima sinyal\n" +" atau kondisi lain.\n" +" \n" +" ARG perintah dibaca dan dijalankan ketika shell menerima\n" +" sinyal SIGNAL_SPEC. Jika ARG tidak ada (dan sebuah sinyal SIGNAL_SPEC\n" +" diberikan) atau `-', setiap sinyal yang dispesifikasikan akan direset " +"kenilai\n" +" original. Jika ARG adalah string kosong untuk setiap SIGNAL_SPEC " +"diabaikan oleh\n" +" shell dan oleh perintah yang dipanggil.\n" +" \n" +" Jika sebuah SIGNAL_SPEC adalah EXIT(0) perintah ARG dijalankan pada saat " +"keluar dari shell. Jika\n" +" sebuah SIGNAL_SPEC adalah DEBUG, ARG dijalankan setiap perintah " +"sederhana.\n" +" \n" +" Jika tidak ada argumen yang diberikan, trap menampilkan daftar dari " +"perintah yang berasosiasi\n" +" dengan setiap sinyal.\n" +" \n" +" Pilihan:\n" +" -l\tmenampilkan sebuah daftar dari nama sinyal dan nomor yang " +"berhubungan\n" +" -p\tmenampilkan perintah trap yang berasosiasi dengan setiap " +"SIGNAL_SPEC\n" +" \n" +" Setiap SIGNAL_SPEC yang ada di nama sinyal dalam atau nomor " +"sinyal. Nama sinyal\n" +" adalah case insensitive dan SIG prefix adalah opsional. sebuah\n" +" sinyal dapat dikirim ke sebuah shell dengan \"kill -signal $$\".\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah SIGSPEC adalah tidak valid atau " +"sebuah pilihan tidak valid diberikan." + +#: builtins.c:1400 +#, fuzzy +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Tampilkan informasi tentang perintah yang diketik.\n" +" \n" +" Untuk setiap NAMA, indikasikan bagaimana ini akan diinterpretasikan jika " +"digunakan sebagai sebuah\n" +" nama perintah.\n" +" \n" +" Pilihan:\n" +" -a\tmenampilkan seluruh lokasi yang berisi sebuah nama NAMA yang dapat " +"dijalankan;\n" +" \tmeliputi aliases, builtins, dan fungsi, jika dan hanya jika\n" +" \tpilihan `-p' juga sedang tidak digunakan\n" +" -f\tmenekan pencarian fungsi shell\n" +" -P\tmemaksa sebuah JALUR pencarian untuk setiap NAMA, bahkan jika ini " +"adalah sebuah alias,\n" +" \tbuiltin, atau fungsi, dan mengembalikan nama dari berkas disk\n" +" \tyang akan dijalankan\n" +" -p\tmengembalikan baik nama dari berkas disk yang akan dijalankan,\n" +" \tatau tidak sama sekali jika `type -t NAME' akan mengembalikan " +"`berkas'.\n" +" -t\tkeluarkan sebuah kata tunggal yang merupakan salah satu dari " +"`alias', `keyword',\n" +" \t`fungsi', `builtin', `berkas', atau `', jika NAMA adalah sebuah alias, " +"shell\n" +" \treserved word, fungsi shell, builtin shell, berkas disk, atau\n" +" \ttidak ditemukan\n" +" \n" +" Argumen:\n" +" NAMA\tNama perintah yang akan diinterpretasikan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses jika seluruh dari NAMA ditemukan; gagal jika ada " +"yang tidak ditemukan." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modifikasi batas sumber daya shell.\n" +" \n" +" memberikan kontrol terhadap sarana yang tersedia untuk proses\n" +" yang dimulai oleh shell, dalam sistem yang mengijinkan untuk kontrol " +"tersebut.\n" +" \n" +" Pilihan:\n" +" -S\tgunakan `soft' batas sarana\n" +" -H\tgunakan `hard' batas sarana\n" +" -a\tsemua batas ditampilkan\n" +" -c\tukuram maksimum untuk berkas cores yang dibuat\n" +" -d\tukuran maksimum untuk sebuah proses data segment\n" +" -e\tprioritas antrian maksimum ('nice')\n" +" -f\tukuran maksimum berkas yang ditulis oleh shell dan anaknya\n" +" -l\tjumlah maksimum dari sinyal tertunda\n" +" -m\tukuran maksimum dari resident\n" +" -n\tjumlah maksimum dari berkas deskriptor yang terbuka\n" +" -p\tukuran pipe buffer\n" +" -q\tjumlah maksimum dari bytes dalam POSIX pesan antrian\n" +" -r\tprioritas maksimum dari real-time scheduling\n" +" -s\tukuran maksimum dari stack\n" +" -t\tjumlah maksimum dari waktu cpu dalam detik\n" +" -u\tjumlah maksimum dari proses pengguna\n" +" -v\tukuran dari memori virtual\n" +" -x\tjumlah maksimum dari berkas pengunci\n" +" \n" +" Jika BATAS diberikan, maka nilai baru yang dispesifikasikan untuk " +"sarana;\n" +" nilai spesial LIMIT `soft', `hard', dan `unlimited' berarti untuk\n" +" soft limit saat ini, jika hard limit saat ini dan no limit, " +"respectively.\n" +" Jika tidak, nilai sekarang dari sarana yang dispesifikasikan " +"ditampilkan.\n" +" Jika tidak ada pilihan yang diberikan, maka -f diasumsikan.\n" +" \n" +" Nilai adalah dalam 1024-byte increments, kecuali untuk -t, yang berarti " +"dalam detik\n" +" -p, yang berarti increment dalam 512 bytes, dan -u, yang berarti " +"unscaled dari\n" +" jumlah proses.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"sebuah error terjadi." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Tampilkan atau set mask mode dari berkas.\n" +" \n" +" Set pembuatan berkas pengguna mask dengan MODE. Jika MODE diabaikan, " +"tampilkan\n" +" nilai dari mask sekarang.\n" +" \n" +" Jika MODE diawali dengan sebuah digit, ini diinterpretasikan sebagai " +"sebuah bilangan oktal;\n" +" jika tidak ini adalah sebuah mode simbolik seperti yang diterima oleh " +"chmod(1).\n" +" \n" +" Pilihan:\n" +" -p\tjika MODE diabaikan, keluarkan dalam sebuah format yang bisa " +"digunakan sebagai masukan\n" +" -S\tmembuat keluaran simbolik; jika tidak sebuah bilangan oktal adalah " +"keluarannya\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali MODE tidak valid atau sebuah pilihan tidak " +"valid diberikan." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Tunggu untuk penyelesaian pekerjaan dan kembalikan status keluar.\n" +" \n" +" Tunggu untuk proses yang diidentifikasikan oleh ID, yang mungkin sebuah " +"proses ID atau sebuah\n" +" spesifikasi pekerjaan, dan laporkan status selesainya. Jika ID tidak\n" +" diberikan, tunggu untuk seluruh proses anak yang aktif, dan status " +"kembalian\n" +" adalah nol. Jika ID adalah sebuah spesifikasi pekerjaan, tunggu untuk " +"seluruh proses\n" +" dalam pipeline pekerjaan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari ID; gagal jika ID tidak valid atau sebuah " +"pilihan tidak\n" +" valid diberikan." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Tunggu untuk penyelesaian proses dan kembalikan status keluar.\n" +" \n" +" Tunggu untuk proses yang dispesifikasikan dan laporkan status " +"selesainya. Jika\n" +" PID tidak diberikan, maka semua aktif proses anak ditunggu,\n" +" dan kode kembalian adalah nol. PID dapat berupa proses ID.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari ID; gagal jika ID tidak valid atau sebuah " +"pilihan tidak valid\n" +" diberikan." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Jalankan perintah untuk setiap anggota dalam sebuah daftar.\n" +" \n" +" `for' loop menjalankan urutan dari perintah untuk setiap anggota dalam " +"sebuah\n" +" daftar dari items. Jika `in KATA ...;' tidak ada, maka `in \"$@\"' yang\n" +" menjadi asumsi. Untuk setiap elemen dalam KATA, NAMA di set untuk elemen " +"tersebut, dan\n" +" PERINTAH dijalankan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari perintah terakhir yang dijalankan." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Arithmetic untuk loop.\n" +" \n" +" Sama dengan\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tPERINTAH\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, dan EXP3 adalah expresi arithmetic. Jika setiap expresi\n" +" diabaikan, ini berjalan seperti jika dievaluasi ke 1.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari perintah terakhir yang dijalankan." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Pilih kata dari sebuah daftar dan jalankan perintah.\n" +" \n" +" WORDS diexpand, menghasilkan daftar dari kata.\n" +" set dari kata yang diexpand ditampilkan dalam standar error, setiap\n" +" keluaran diawali dengan sebuah nomor. Jika `in WORDS' tidak ada, `in \"$@" +"\"'\n" +" diasumsikan. Kemudian PS3 prompt ditampilkan dan sebuah baris dibaca\n" +" dari standar masukan. Jika baris berisi dari nomor yang\n" +" berhubungan dengan salah sata kata yang ditampilkan, maka NAMA diset\n" +" ke WORD tersebut. Jika baris kosong, WORDS dan prompt\n" +" ditampilkan kembali. Jika EOF dibaca, perintah selesai. Baris yang " +"dibaca disimpan\n" +" dalam variabel REPLY. PERINTAH dijalankan setelah setiap seleksi\n" +" sampai perintah break dijalankan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari perintah terakhir yang dijalankan." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Melaporkan waktu yang dihabiskan dalam menjalan eksekusi pipeline.\n" +" \n" +" Jalankan PIPELINE dan tampilkan ringkasan dari real time, user CPU " +"time,\n" +" dan sistem CPU time yang dihabiskan dalam menjalankan PIPELINE ketika " +"ini selesai.\n" +" \n" +" Pilihan:\n" +" -p\tmenampilkan ringkasan waktu dalam format portable Posix\n" +" \n" +" Status Keluar:\n" +" Status kembali adalah status kembali dari PIPELINE." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Menjalankan perintah berdasarkan pencocokan pola.\n" +" \n" +" Secara selektif menjalankan PERINTAH berdasarkan dari KATA yang cocok " +"dengan POLA.\n" +" `|' digunakan untuk memisahkan beberapa pola. \n" +" Status Keluar:\n" +" Mengembalikan setatus dari perintah terakhir yang dijalankan." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Menjalankan perintah berdasarkan kondisi.\n" +" \n" +" Daftar `if PERINTAH' dijalankan. Jika ini memberikan status keluaran " +"nol, maka\n" +" daftar `then PERINTAH' dijalankan. Jika tidak, setiap daftar dari `elif " +"PERINTAH' \n" +" dijalankan satu satu, dan jika ini memberikan status keluaran nol, untuk " +"setiap\n" +" daftar dari `then PERINTAH' yang dijalankan maka perintah `if' selesai. " +"Jika tidak,\n" +" daftar `else PERINTAH' dijalankan, jika ada. Status keluaran dari \n" +" seluruh construct adalah status keluaran dari perintah terakhir yang " +"dijalankan, atau nol\n" +" jika tidak ada kondisi yang diperiksa benar.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari perintah terakhir yang dijalankan." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Menjalankan perintah sepanjang pemeriksaan sukses.\n" +" \n" +" Expand dan jalankan PERINTAH sepanjang akhir perintah dari\n" +" PERINTAH `while' telah memberikan status keluaran nol.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari perintah terakhir yang dijalankan." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Menjalankan perintah sepanjang pemeriksaan tidak sukses.\n" +" \n" +" Expand dan jalankan PERINTAH sepanjang akhir perintah dari\n" +" PERINTAH `until' telah memberikan status keluaran bukan nol. \n" +" Status Keluar:\n" +" Mengembalikan status dari perintah terakhir yang dijalankan." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Buat sebuah koproses dengan nama NAMA.\n" +" \n" +" Jalankan PERINTAH secara tidak sinkron, dengan standar keluaran dan\n" +" standar masukan dari perintah terhubung melalui sebuah pipa berkas\n" +" pipa deskripsi yang ditandai dengan 0 dan 1 dari sebuah susunan NAMA\n" +" variabel dalam shell yang dijalankan.\n" +" Nama baku adalah \"COPROC\".\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status keluar dari PERINTAH." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Definisikan fungsi shell.\n" +" \n" +" Buat sebuah fungsi shell dengan nama NAMA. Ketika dipanggil sebagai " +"sebuah perintah sederhana,\n" +" NAMA menjalankan PERINTAH dalam context shell pemanggil. Ketika NAMA " +"dipanggil,\n" +" argumen dilewatkan ke fungsi sebagai $1...$n, dan nama fungsi\n" +" dalam $FUNCNAME.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali NAMA adalah baca-saja." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Grup perintah sebagai sebuah unit.\n" +" \n" +" Jalankan sebuah set dari perintah dalam grup. Ini adalah salah satu cara " +"untuk meredirect\n" +" seluruh set dari perintah.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari perintah terakhir yang dieksekusi." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Melanjutkan pekerjaan dalam foreground.\n" +" \n" +" Sama dengan JOB_SPEC argumen untuk perintah `fg'. Melanjutkan sebuah\n" +" pekerjaan yang telah berhenti atau menjadi background. JOB_SPEC dapat " +"dispesifikasikan dengan nama job\n" +" atau nomor job. JOB_SPEC diikuti dengan sebuah `&' menempatkan job " +"dalam\n" +" background, seperti dalam spesifikasi pekerjaan yang telah " +"dispesifikasikan sebagai sebuah\n" +" argumen untuk `bg'.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan status dari pekerjaan yang dilanjutkan." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Evaluasi ekspresi arithmetic.\n" +" \n" +" EXPRESI dievaluasi berdasarkan dalam aturan evaluasi\n" +" arithmetic. Sama dengan \"let EXPRESI\".\n" +" \n" +" Status Keluar:\n" +" Mengembalikan 1 jika EXPRESI dievaluasi ke 0; mengembalikan 0 jika tidak." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Menjalankan perintah kondisional.\n" +" \n" +" Mengembalikan sebuah status dari 0 atau 1 tergantung dari evaluasi dari\n" +" kondisi expresi EXPRESI. Expresi disusun dari primari yang sama dari " +"yang digunakan\n" +" oleh `test' builtin, dan boleh dikombinasikan dengan menggunakan " +"operator berikut\n" +" \n" +" ( EXPRESI )\tMengembalikan nilai dari EXPRESI\n" +" ! EXPRESI\t\tBenar jika kedua EXPR1 dan EXPR2 adalah benar; selain itu " +"salah\n" +" EXPR1 && EXPR2\tBenar jika kedua EXPR1 dan EXPR2 adalah benar; selain " +"itu salah\n" +" EXPR1 || EXPR2\tBenar jika salah satu EXPR1 atau EXPR2 adalah benar; " +"selain itu salah\n" +" \n" +" Ketika operator `==' dan `!=' digunakan, string yang disebelah kanan " +"dari \n" +" operator yang digunakan sebagai sebuah pola dan pencocokan pola " +"dilakukan.\n" +" Ketika operator `=~' digunakan, string yang dikanan dari operator\n" +" dicocokan sebagai sebuah ekspresi regular.\n" +" \n" +" Operator && dan || tidak mengevaluasi EXPR2 jika EXPR1 tidak mencukupi " +"untuk\n" +" menentukan nilai dari expresi.\n" +" \n" +" Status Keluar:\n" +" 0 atau 1 tergantun dari nilai dari EKSPRESI." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Nama variabel shell umum dan penggunaannya.\n" +" \n" +" BASH_VERSION\tInformasi versi dari Bash ini.\n" +" CDPATH\tSebuah daftar yang dipisahkan oleh titik dua dari direktori " +"untuk mencari\n" +" \t\tdirektori yang diberikan sebagai argumen untuk `cd'.\n" +" GLOBIGNORE\tSebuah daftar pola yang dipisahkan dengan titik dua " +"menjelaskan nama berkas yang\n" +" \t\tdiabaikan oleh pathname expansion.\n" +" HISTFILE\tNama dari berkas dimana sejara perintah anda disimpan.\n" +" HISTFILESIZE\tJumlah maksimum dari baris dimana berkas ini berisi.\n" +" HISTSIZE\tJumlah maksimum dari baris sejarah yang sedang berjalan\n" +" \t\tketika shell sedang menaksesnya.\n" +" HOME\tNama jalur lengkap ke direktori login anda.\n" +" HOSTNAME\tNama dari host saat ini.\n" +" HOSTTYPE\tTipe dari CPU dari veri Bash yang sedang berjalan.\n" +" IGNOREEOF\tKendalikan aksi dari shell ketika menerima sebuah EOF\n" +" \t\tkarakter sebagai masukan. Jika diset, maka nilai\n" +" \t\tdari jumlah karakter EOF yang bisa diterima\n" +" \t\tdalam sebuah baris dalam baris kosong sebelum shell keluar\n" +" \t\t(default 10). Ketika diunset, EOF menandakan akhir dari masukan.\n" +" MACHTYPE\tSebuah kata yang menjelaskan system yang berjalan ketika Bash " +"berjalan.\n" +" MAILCHECK\tSeberapa sering, dalam detik, Bash memeriksa pesan baru.\n" +" MAILPATH\tDaftar dari nama berkas yang dipisahkan oleh titik-dua dimana " +"Bash memeriksa\n" +" \t\tpesan baru.\n" +" OSTYPE\tVersi Unix dari Versi Bash yang sedang berjalan.\n" +" PATH\tDaftar direktori yang dipisahkan oleh titik-dua untuk mencari " +"ketika\n" +" \t\tmencari perintah.\n" +" PROMPT_COMMAND\tSebuah perintah yang dijalankan sebelum menampilkan " +"setiap\n" +" \t\tmasukan utama.\n" +" PS1\t\tKata prompt utama.\n" +" PS2\t\tKata prompt kedua.\n" +" PWD\t\tNama jalur lengkat dari direktori sekarang.\n" +" SHELLOPTS\tDaftar dari shell pilihan yang dipisahkan oleh titik-dua.\n" +" TERM\tNama dari tipe terminal sekarang.\n" +" TIMEFORMAT\tFormat keluaran dari statistik waktu yang ditampilkan oleh\n" +" \t\t`time' kata yang direserved.\n" +" auto_resume\tTidak kosong berarti sebuah kata perintah akan munncul di " +"sebuah baris dengan\n" +" \t\tsendirinya adalah pertama dicari dalam daftar dari\n" +" \t\tpekerjaan yang terhenti sekarang. Jika ditemukan disana, maka " +"pekerjaan intu di foregroundkan.\n" +" \t\tNila dari `exact' berarti kata perintah harus\n" +" \t\tcocok secara tepat dalam daftar dari pekerjaan yang terhenti. " +"Sebuah\n" +" \t\tNila dari `substring' berarti bahwa kata perintah harus cocok\n" +" \t\tdengan substring dari pekerjaan. Nilai yang lain berarti\n" +" \t\tperintah harus diawali dari sebuah pekerjaan yang terhenti.\n" +" histchars\tKarakter pengendali history expansion dan pensubstitusi\n" +" \t\tcepat. Karakter pertama adalah karakter\n" +" \t\tpengganti sejarah, biasanya `!'. Karakter kedua\n" +" \t\tdari `quick substitution', biasanya `^'. Karakter\n" +" \t\tketiga adalah karakter `history comment'. biasanya `#',\n" +" HISTIGNORE\tSebuah daftar pola yang dipisahkan oleh titik dua yang " +"digunakan untuk menentukan dimana\n" +" \t\tperintah seharusnya disimpan dalam daftar sejarah.\n" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Menambahkan direktori ke stack.\n" +" \n" +" Menambahkan sebuah direktori ke top dari direktori stack, atau merotasi\n" +" stack, membuah top baru dari stack dari working direktori saat ini.\n" +" Tanpa argumen, menukar top dari dua direktori.\n" +" \n" +" Pilihan:\n" +" -n\tmenekan perubahan normal dari direktori ketika menambahkan " +"direktori\n" +" \tke stack, jadi hanya stack yang dimanipulasi.\n" +" \n" +" Argumen:\n" +" +N\tMerotasi stack sehingga direktori ke N (dihitung\n" +" \tdari kiri dari daftar yang terlihat oleh `dirs', dimulai dengan\n" +" \tnol) adalah di top.\n" +" \n" +" -N\tMerotasi stack sehingga direktori ke N (dihitung\n" +" \tdari kanan dari daftar yang terliha oleh `dirs', dimulai dengan\n" +" \tnol) adalah di top.\n" +" \n" +" dir\tenambahkan DIR ke direktori stack di puncak, membuatnya\n" +" \tdirektori kerja sekarang.\n" +" \n" +" Builtin `dirs' menampilkan direktori stack.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali ada sebuah argumen tidak valid diberikan " +"atau pemindahan\n" +" direktori gagal." + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Hapus direktori dari stack.\n" +" \n" +" Manghapus masukan dalam direktori stack. Tanpa argumen,\n" +" menghapus top direktori dari stack, dan cd's ke top\n" +" direktori baru.\n" +" \n" +" Pilihan:\n" +" -n\tmenekan perubahan normal dari direktori ketika menghapus " +"direktori\n" +" \tdari stack, jadi hanya stack yang dimanipulasi.\n" +" \n" +" Argumen:\n" +" +N\tmenghapus masukan ke N dihitung dari kiri dari daftar\n" +" \tyang ditampilkan oleh `dirs', dimulai dari nol. Sebagai contoh: `popd " +"+0'\n" +" \tmenghapus direktori terakhir, `popd +1' sebelum terakhir.\n" +" \n" +" -N\tmenghapus masukan ke N dihitung dari kanan dari daftar\n" +" \tyang ditampilkan oleh `dirs', dimulai dari nol. Sebagai contoh: `popd " +"-0'\n" +" \tmenghapus direktori terakhir, `popd -1' sebelum terakhir.\n" +" \n" +" Builtin `dirs' menampilkan direktori stack.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali ada sebuah argumen tidak valid diberikan " +"atau pemindahan\n" +" direktori gagal." + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Menampilkan direktori stack.\n" +" \n" +" Menampilkan daftar dari direktori yang diingat saat ini. Direktori\n" +" menemukan jalannya kedalam daftar dengan perintah `pushd'; anda dapat " +"memperoleh\n" +" backup melalui daftar dengan perintah `popd'.\n" +" \n" +" Pilihan:\n" +" -c\tmenghapus direktori stack dengan menghapus seluruh elemen.\n" +" -l\tjangan menampilkan versi yang diawali tilde dari direktori yang " +"relatif\n" +" \tke direktori rumah anda\n" +" -p\tmenampilkan direktori stack dengan satu masukan setiap baris\n" +" -v\tmenampilkan direktori stack dengan satu masukan setiap baris " +"diawali\n" +" \tdengan posisinya dalam stack\n" +" Argumen:\n" +" +N\tmenampilkan masukan ke N dihitung dari kiri dari daftar yang " +"ditampilkan oleh\n" +" \tdirs ketika dijalankan tanpa pilihan, dimulai dari nol.\n" +" \n" +" -N\tmenampilkan masukan ke N dihitung dari kanan dari daftar yang " +"ditampilkan oleh\n" +" \tdirs ketika dijalankan tanpa pilihan, dimulai dari nol. \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali ada sebuah pilihan tidak valid diberikan " +"atau sebuah error terjadi." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Set dan unset pilihan shell.\n" +" \n" +" Ubah setting untuk setiap pilihan shell OPTNAME. Tanpa pilihan\n" +" argumen apapun, tampilkan daftar shell pilihan dengan sebuah indikasi\n" +" ya atau tidak setiap pilihan di set.\n" +" \n" +" Pilihan:\n" +" -o\tbatasi OPTNAME ke definisi untuk digunakan dengan `set -o'\n" +" -p\ttampilkan setiap pilihan shell dengan sebuah indikasi dari " +"statusnya\n" +" -q\ttekan keluaran\n" +" -s\taktifkan (set) setiap OPTNAME\n" +" -u\tnonaktifkan (unset) setiap OPTNAME\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses jika OPTNAME diaktifkan; gagal jika sebuah pilihan " +"tidak valid diberikan\n" +" atau OPTNAME dinonaktifkan." + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Format dan tampilkan ARGUMEN dalam kontrol dari FORMAT.\n" +" \n" +" Pilihan:\n" +" -v var\tkeluaran ditempatkan dalam sebuah nilai dari variabel\n" +" shell VAR daripada dikirimkan ke keluaran standar.\n" +" \n" +" FORMAT adalah sebuah karakter string yang berisi dari tiga tipe dari " +"objects: plain\n" +" karakter, yang disalin secara sederhana dari keluaran standar, karakter " +"escape\n" +" sequences yang mengubah dan menyalin keluaran standar, dan\n" +" spesifikasi format, yang selalu menampilkan argumen\n" +" \n" +" Tambahan dari spesifikasi standar printf(1) formats dan\n" +" printf(3), printf menginterprestasikan:\n" +" \n" +" %b berarti untuk menexpand backslash escape sequences dalam argumen " +"yang sesuai\n" +" %q berarti meng-quote argumen dalam sebuah cara yang dapat digunakan " +"sebagai masukan shell.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"sebuah penulisan atau penempatan\n" +" error terjadi." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Spesifikasikan bagaimana argumen akan diselesaikan oleh Readline.\n" +" \n" +" Untuk setiap NAMA, spesifikasikan bagaimana argumen akan diselesaikan. " +"Jika tidak ada pilihan\n" +" yang diberikan, spesifikasi penyelesaian yang sudah ada akan ditampilkan " +"dalam cara\n" +" yang diperbolehkan untuk digunakan sebagai masukan.\n" +" \n" +" Pilihan:\n" +" -p\ttampilkan spesifikasi penyelesaian yang telah ada dalam format " +"yang berguna\n" +" -r\thapus sebuah spesifikasi penyelesaian untuk setiap NAMA, atau jika " +"tidak ada\n" +" \tNAMA yang diberikan, seluruh spesifikasi penyelesaian\n" +" -D\taplikasikan pelengkapan dan aksi sebagai perintah baku tanpa " +"pelengkapan\n" +" \tspesifik yang didefinisikan\n" +" -E\taplikasikan pelengkapan dan aksi ke perintah \"empty\" --\n" +" \tpelengkapan dilakukan di baris kosong\n" +" \n" +" Ketika penyelesaian dicoba, aksi yang dilakukan dalam urutan\n" +" huruf besar pilihan yang ditampilkan diatas.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"sebuah error terjadi." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Menampilkan kemungkinan penyelesaian tergantung dari pilihan.\n" +" \n" +" Ditujukan untuk digunakan dari dalam sebuah fungsi shell yang " +"menghasilkan kemungkinan untuk completions.\n" +" Jika argumen WORD opsional yang diberikan, cocok dengan WORD telah\n" +" dihasilkan.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"sebuah error terjadi." + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modifikasi atau tampilkan pilihan penyelesaian.\n" +" \n" +" Modifikasi pilihan penyelesaian untuk setiap NAMA, atau, jika tidaka ada " +"NAMA yang diberikan,\n" +" penyelesaian mulai dijalankan. Jika tidak ada OPSI yang diberikan, " +"tampilkan\n" +" pilihan penyelesaian untuk setiap NAMA atau spesifikasi penyelesaian " +"sekarang.\n" +" \n" +" Pilihan:\n" +" \t-o option\tSet pilihan penyelesaian OPSI untuk setiap NAMA\n" +" \t-D\t\tUbah pilihan untuk perintah pelengkapan \"default\"\n" +" \t-E\t\tUbah pilihan untuk perintah pelengkapan \"empty\"\n" +" \n" +" Gunakan `+o' daripada `-o' matikan pilihan yang dispesifikasikan.\n" +" \n" +" Argumen:\n" +" \n" +" Setiap NAMA yang dirujuk dalam sebuah perintah untuk sebuah spesifikasi " +"penyelesaian harus\n" +" sebelumnya telah didefinisikan dengan menggunakan builtin `complete'. " +"Jika tidak ada NAMA\n" +" yang diberikan, compopt harus dipanggil oleh sebuah fungsi yang dibuat " +"oleh penyelesaian sekarang,\n" +" dan pilihan untuk menjalankan penyelesaian sekarang\n" +" telah dimodifikasi.\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"NAMA tidak memiliki\n" +" spesifikasi penyelesaian yang terdefinisi." + +#: builtins.c:2047 +#, fuzzy +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Baca baris dari standar masukan kedalam sebuah susunan variabel.\n" +" \n" +" Baca baris dari standar masukan kedalam variabel array ARRAY, atau dari\n" +" berkas deskripsi FD jika pilihan -u diberikan. Variabel MAPFILE adalah\n" +" ARRAY baku.\n" +" \n" +" Pilihan:\n" +" -n count\tSalin di baris COUNT. Jika COUNT adalah 0, semua baris " +"disalin.\n" +" -O origin\tAwal penempatan ke ARRAY di index ORIGIN. Indeks baku " +"adalah 0.\n" +" -s count \tAbaikan baris COUNT pertama yang dibaca.\n" +" -t\t\tHapus sebuah akhiran baris baru dari setiap baris yang dibaca.\n" +" -u fd\t\tBaca baris dari berkas deskripsi FD daripada dari masukan " +"standar.\n" +" -C callback\tEvaluasi CALLBACK untuk setiap waktu QUANTUM baris adalah " +"baca.\n" +" -c quantum\tSpesifikasikan jumlah dari baris yang dibaca diantara " +"setiap pemanggilan ke CALLBACK.\n" +" \n" +" Argumen:\n" +" ARRAY\t\tNama variabel array yang digunakan untuk berkas data.\n" +" \n" +" Jika -C Diberikan tanpa -c, default quantum adalah 5000. Ketika " +"CALLBACK\n" +" dievaluasi , ini diberikan ke indeks dari element 'array' selanjutnya\n" +" untuk di-'assign' sebagai sebuah argumen tambahan.\n" +" \n" +" Jika tidak diberikan dengan asal secara eksplisit, berkas peta akan " +"menghapus ARRAY sebelum\n" +" ditempatkan kepadanya\n" +" \n" +" Status Keluar:\n" +" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " +"ARRAY adalah baca-saja." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Baca baris dari sebuah berkas kedalam sebuah susunan variabel.\n" +" \n" +" Sebuah sinonim untuk `mapfile'." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Hak Cipta (C) 2013 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Mengembalikan konteks dari panggilan subroutine saat ini.\n" +#~ " \n" +#~ " Tanpa EXPR, kembali " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: process %5ld (%s) dalam the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Sinyal tidak diketahui #" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "benar" + +#~ msgid "false" +#~ msgstr "salah" + +#~ msgid "times" +#~ msgstr "kali" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". Dengan EXPR, kembali\n" +#~ " " + +#~ msgid "" +#~ "; this extra information can be used to\n" +#~ " provide a stack trace.\n" +#~ " \n" +#~ " The value of EXPR indicates how many call frames to go back before " +#~ "the\n" +#~ " current one; the top frame is frame 0." +#~ msgstr "" +#~ "; informasi tambahan ini dapat digunakan untuk\n" +#~ " menyediakan penelusuran 'stack'.\n" +#~ " \n" +#~ " Nilai dari EXPR mengindikasikan berapa banyak panggilan 'frame' untuk " +#~ "kembali\n" +#~ " sebelum saat ini; 'frame' paling atas adalah 'frame' 0." + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Hak Cipta (C) 2009 Free Software Foundation, Inc.\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Lisensi GPLv2+: GNU GPL versi 2 atau sesudahnya \n" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: tidak dapat menrealokasikan %lu bytes (%lu bytes teralokasikan)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: tidak dapat mengalokasikan %lu bytes" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: %s: %d: tidak dapat melakukan reallokasi %lu bytes (%lu bytes " +#~ "teralokasi)" + +#~ msgid " " +#~ msgstr " " + +#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," +#~ msgstr "" +#~ "Tanpa EXPR, mengembalikan kembalian \"$line $filename\". Dengan EXPR," + +#~ msgid "returns \"$line $subroutine $filename\"; this extra information" +#~ msgstr "" +#~ "mengembalikan \"$line $subroutine $filename\"; informasi tambahan ini" + +#~ msgid "can be used used to provide a stack trace." +#~ msgstr "dapat digunakan untuk menyediakan jejak sebuah stack." + +#~ msgid "" +#~ "The value of EXPR indicates how many call frames to go back before the" +#~ msgstr "" +#~ "Nilai dari EXPR mengindikasikan berapa banyak call frames untuk kembali " +#~ "sebelum" + +#~ msgid "current one; the top frame is frame 0." +#~ msgstr "salah satu ini; top frame adalah frame 0." + +#~ msgid "%s: invalid number" +#~ msgstr "%s: nomor invalid" + +#~ msgid "Shell commands matching keywords `" +#~ msgstr "Perintah shell cocok dengan kata kunci `" + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "Tampilkan daftar dari direktori yang diingat sekarang. Direktori" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "" +#~ "menemukan jalannya sendiri kedalam daftar dengan perintah `pushd'; anda " +#~ "dapat memperoleh" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "bantuan melalui daftar dari perintah `popd'." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "" +#~ "Flag -l menspesifikasikan bahwa `dirs' seharusnya tidak menampilkan versi " +#~ "pendek" + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "dari direktori yang relatif dari direktori home anda. Ini berarti" + +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "" +#~ "bahwa `~/bin' mungkin ditampilkan sebagai `/homes/bfox/bin'. Pilihan -v" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "" +#~ "menyebabkan `dirs' ditampilkan di stack direktori dengan satu masukan per " +#~ "baris," + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "mendahului nama direktori dengan posisinya dalam stack. Pilihan -p" + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "melakukan hal yang sama, tetapi posisi stack tidak didahului." + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "" +#~ "Pilihan -c menghapus direktori stack dengan cara menghapus seluruh elemen." + +#~ msgid "" +#~ "+N displays the Nth entry counting from the left of the list shown by" +#~ msgstr "" +#~ "+N menampilkan masukan ke N dihitung dari kiri dari daftar yang " +#~ "ditampilkan oleh" + +#~ msgid " dirs when invoked without options, starting with zero." +#~ msgstr " dirs ketika dipanggil tanpa pilihan, dimulai dengan nol." + +#~ msgid "" +#~ "-N displays the Nth entry counting from the right of the list shown by" +#~ msgstr "" +#~ "-N menampilkan masukan ke N dihitung dari kanan dari daftar yang " +#~ "ditampilkan dengan" + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "" +#~ "menambahkan sebuah direktori ke ujung atas dari direktori stack, atau " +#~ "memutar" + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "stack, membuat sebuah top baru dari stack direktori yang dipakai" + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "saat ini. Tanpa argumen, menukar top dari dua direktori." + +#~ msgid "+N Rotates the stack so that the Nth directory (counting" +#~ msgstr "+N Memutar stack sehingga direktori ke N (dihitung" + +#~ msgid " from the left of the list shown by `dirs', starting with" +#~ msgstr "" +#~ " dari kiri dari daftar yang ditampilkan oleh `dirs', dimulai dari" + +#~ msgid " zero) is at the top." +#~ msgstr " nol) ini dilakukan di top." + +#~ msgid "-N Rotates the stack so that the Nth directory (counting" +#~ msgstr "-N Memutar stact sehingga direktori ke N (dihitung" + +#~ msgid " from the right of the list shown by `dirs', starting with" +#~ msgstr "" +#~ " dari kanan dari daftar yang ditampilkan oleh `dirs', dimulai dengan" + +#~ msgid "-n suppress the normal change of directory when adding directories" +#~ msgstr "" +#~ "-n menekan perubahan normal dari direktori ketika menambahkan direktori" + +#~ msgid " to the stack, so only the stack is manipulated." +#~ msgstr " ke stack, jadi hanya stack yang dimanipulasi." + +#~ msgid "dir adds DIR to the directory stack at the top, making it the" +#~ msgstr "dir menambahkan DIR ke direktori stack di top, membuatnya " + +#~ msgid " new current working directory." +#~ msgstr " menjadi direktori baru untuk bekerja." + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "Anda dapat melihat direktori stack dengan perintah `dirs'." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Hapus masukan dari direktori stack. Tanpa argumen," + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "menghapus top direktori dari stack, dan pindah ke" + +#~ msgid "+N removes the Nth entry counting from the left of the list" +#~ msgstr "+N menghapus masukan ke-N dihitung dari kiri dari daftar" + +#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr " yang terlihat oleh `dirs', dimulai dari nol. Contoh: `popd +0'" + +#~ msgid " removes the first directory, `popd +1' the second." +#~ msgstr " menghapus direktori pertama, `popd +1' kedua." + +#~ msgid "-N removes the Nth entry counting from the right of the list" +#~ msgstr "-N menghapus masukan ke N dihitung dari kanan dari daftar" + +#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr " yang terlihat oleh `dirs', dimulai dari nol. Contoh: `popd -0'" + +#~ msgid " removes the last directory, `popd -1' the next to last." +#~ msgstr "" +#~ " menghapus direktori terakhir, `popd -1' selanjutnya ke terakhir." + +#~ msgid "" +#~ "-n suppress the normal change of directory when removing directories" +#~ msgstr "" +#~ "-n menekan perubahan normal dari direktori ketika menghapus direktori" + +#~ msgid " from the stack, so only the stack is manipulated." +#~ msgstr " dari stack, sehingga hanya stack yang dimanipulasi." + +#~ msgid "allocated" +#~ msgstr "teralokasi" + +#~ msgid "freed" +#~ msgstr "terbebaskan" + +#~ msgid "requesting resize" +#~ msgstr "meminta resize" + +#~ msgid "just resized" +#~ msgstr "just resized" + +#~ msgid "bug: unknown operation" +#~ msgstr "bug: operasi tidak diketahui" + +#~ msgid "malloc: watch alert: %p %s " +#~ msgstr "malloc: watch alert: %p %s " + +#~ msgid "" +#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n" +#~ " break N levels." +#~ msgstr "" +#~ "Keluar dari dalam sebuah FOR, WHILE, atau UNTIL loop. jika N " +#~ "dispesifikasikan,\n" +#~ " break N levels." + +#~ msgid "" +#~ "Run a shell builtin. This is useful when you wish to rename a\n" +#~ " shell builtin to be a function, but need the functionality of the\n" +#~ " builtin within the function itself." +#~ msgstr "" +#~ "Jalankan sebuah builtin shell. Ini akan berguna ketika anda mengharapkan " +#~ "untuk mengganti nama sebuah\n" +#~ " shell builting ke sebuah fungsi, tetapi membutuhkan sebuah " +#~ "fungsionalitas dari\n" +#~ " sebuah fungsi builtin itu sendiri." + +#~ msgid "" +#~ "Print the current working directory. With the -P option, pwd prints\n" +#~ " the physical directory, without any symbolic links; the -L option\n" +#~ " makes pwd follow symbolic links." +#~ msgstr "" +#~ "Tampilkan direktori yang sedang digunakan saat ini. Dengan pilihan -P, " +#~ "pwd menampilkan\n" +#~ " direktori physical, tanpa symbolic link yang lain; dengan pilihan -L\n" +#~ " membuat pwd mengikuti symbolic links." + +#~ msgid "Return a successful result." +#~ msgstr "Mengembalikan sebuah kembalian yang sukses." + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n" +#~ " function called `ls', and you wish to call the command `ls', you can\n" +#~ " say \"command ls\". If the -p option is given, a default value is " +#~ "used\n" +#~ " for PATH that is guaranteed to find all of the standard utilities. " +#~ "If\n" +#~ " the -V or -v option is given, a string is printed describing " +#~ "COMMAND.\n" +#~ " The -V option produces a more verbose description." +#~ msgstr "" +#~ "Menjalankan PERINTAH dengan ARGS mengabaikan fungsi shell. Jika anda " +#~ "memiliki sebuah shell\n" +#~ " fungsi yang memanggil `ls', dan anda berharap untuk memanggil " +#~ "perintah `ls', anda dapat\n" +#~ " mengatakan \"command ls\". Jika pilihan -p diberikan, sebuah nilai " +#~ "default digunakan\n" +#~ " untuk PATH yang menjamin untuk mencari semua utilitis standar. Jika\n" +#~ " pilihan -V atau -v diberikan, sebuah string ditampilkan " +#~ "mendeskripsikan PERINTAH.\n" +#~ " Pilihan -V menghasilkan deskripsi yang lebih detail." + +#~ msgid "" +#~ "Declare variables and/or give them attributes. If no NAMEs are\n" +#~ " given, then display the values of variables instead. The -p option\n" +#~ " will display the attributes and values of each NAME.\n" +#~ " \n" +#~ " The flags are:\n" +#~ " \n" +#~ " -a\tto make NAMEs arrays (if supported)\n" +#~ " -f\tto select from among function names only\n" +#~ " -F\tto display function names (and line number and source file name " +#~ "if\n" +#~ " \tdebugging) without definitions\n" +#~ " -i\tto make NAMEs have the `integer' attribute\n" +#~ " -r\tto make NAMEs readonly\n" +#~ " -t\tto make NAMEs have the `trace' attribute\n" +#~ " -x\tto make NAMEs export\n" +#~ " \n" +#~ " Variables with the integer attribute have arithmetic evaluation (see\n" +#~ " `let') done when the variable is assigned to.\n" +#~ " \n" +#~ " When displaying values of variables, -f displays a function's name\n" +#~ " and definition. The -F option restricts the display to function\n" +#~ " name only.\n" +#~ " \n" +#~ " Using `+' instead of `-' turns off the given attribute instead. " +#~ "When\n" +#~ " used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "" +#~ "Declare variabel dan/atau memberikan atribut kepada mereka. Jika tidak " +#~ "ada NAMA yang\n" +#~ " diberikan, maka menampilkan nilai dari variabel. Pilihan -p\n" +#~ " akan menampilkan atribut dan nilai dari setiap NAMA.\n" +#~ " \n" +#~ " Flags adalah:\n" +#~ " \n" +#~ " -a\tuntuk membuat aray NAMA (jika disupport)\n" +#~ " -f\tuntuk memilih dari nama fungsi saja\n" +#~ " -F\tuntuk menampilkan nama fungsi (dan nomor baris dan source nama " +#~ "file jika\n" +#~ " \tdebugging) tanpa definisi\n" +#~ " -i\tuntuk membuat NAMA memiliki atribut `integer'\n" +#~ " -r\tuntuk membuat NAMA baca-saja\n" +#~ " -t\tuntuk membuat NAMA memiliki atribut `trace'\n" +#~ " -x\tuntuk membuat NAME export\n" +#~ " \n" +#~ " Variabel dengan atribut integer memiliki arithmetic evaluasi (lihat\n" +#~ " `let') selesai ketika variabel diberikan ke.\n" +#~ " \n" +#~ " Ketika menampilkan nilai dari variabel, -f menampilkan sebuah nama " +#~ "fungsi\n" +#~ " dan definisi. Pilihan -F menekan untuk menampikan nama\n" +#~ " fungsi saja.\n" +#~ " \n" +#~ " Menggunakan `+' daripada `-' mematikan atribut yang diberikan. " +#~ "Ketika\n" +#~ " sedang digunkan dalam sebuah fungsi, membuat NAMA lokal, seperti " +#~ "dalam perintah 'local'." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Kadaluarsa. Lihat `declare'." + +#~ msgid "" +#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n" +#~ " can only be used within a function; it makes the variable NAME\n" +#~ " have a visible scope restricted to that function and its children." +#~ msgstr "" +#~ "Membuat sebuah variabel lokal yang disebut NAMA, dan menampilkan NILAI-" +#~ "nya. LOKAL\n" +#~ " hanya dapat digunakan dalam sebuah fungsi; ini membuat NAMA variabel\n" +#~ " memiliki scope visibel terbatas untuk fungsi itu dan anaknya." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "Keluaran dari ARGs. Jika pilihan -n dispesifikasikan, akhiran baris baru " +#~ "dihapus." + +#~ msgid "" +#~ "Enable and disable builtin shell commands. This allows\n" +#~ " you to use a disk command which has the same name as a shell\n" +#~ " builtin without specifying a full pathname. If -n is used, the\n" +#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n" +#~ " to use the `test' found in $PATH instead of the shell builtin\n" +#~ " version, type `enable -n test'. On systems supporting dynamic\n" +#~ " loading, the -f option may be used to load new builtins from the\n" +#~ " shared object FILENAME. The -d option will delete a builtin\n" +#~ " previously loaded with -f. If no non-option names are given, or\n" +#~ " the -p option is supplied, a list of builtins is printed. The\n" +#~ " -a option means to print every builtin with an indication of whether\n" +#~ " or not it is enabled. The -s option restricts the output to the " +#~ "POSIX.2\n" +#~ " `special' builtins. The -n option displays a list of all disabled " +#~ "builtins." +#~ msgstr "" +#~ "Enable dan disable perintah builtin shell. Ini membolehkan\n" +#~ " anda untuk menggunakan perintah disk yang memiliki nama sama seperti " +#~ "sebuah NAMA\n" +#~ " shell builtin tanpa menspesifikasikan sebuah pathname full. Jika " +#~ "pilihan -n digunakan,\n" +#~ " NAMA menjadi disabled; jika tidak NAMA menjadi enabled. Contoh,\n" +#~ " gunakan `test' ditemukan dalam $PATH daripada dalam builtin versi\n" +#~ " builtin shell, ketik `enable -n test'. Di system mensupport dynamic\n" +#~ " loading, pilihan -f mungkin bisa digunakan untuk menload builtin baru " +#~ "dari\n" +#~ " shared object NAMAFILE. Pilihan -d akan menghapus sebuah builting\n" +#~ " yang sebelumnya diload dengan pilihan -f. Jika tidak ada nama pilihan " +#~ "yang diberikan, atau\n" +#~ " pilihan -p diberikan, daftar dari builtin ditampilkan.\n" +#~ " Pilihan -a berarti menampilkan setiap builtin dengan sebuah indikasi " +#~ "apakah\n" +#~ " atau tidak ini enabled. Pilihan -s membatasi keluaran ke POSIX.2\n" +#~ " `special' builtins. Pilihan -n menampilkan daftar dari semua yang " +#~ "builtins yang disabled." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "" +#~ "Baca ARGs sebagai masukan ke shell dan jalankan untuk menghasilkan " +#~ "perintah(s)." + +#~ msgid "" +#~ "Exec FILE, replacing this shell with the specified program.\n" +#~ " If FILE is not specified, the redirections take effect in this\n" +#~ " shell. If the first argument is `-l', then place a dash in the\n" +#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n" +#~ " is supplied, FILE is executed with a null environment. The `-a'\n" +#~ " option means to make set argv[0] of the executed process to NAME.\n" +#~ " If the file cannot be executed and the shell is not interactive,\n" +#~ " then the shell exits, unless the shell option `execfail' is set." +#~ msgstr "" +#~ "Exec FILE, menimpa shell ini dengan aplikasi yang dispesifikasikan.\n" +#~ " Jika FILE tidak dispesifikasikan, redirectiions mengambil efek dalam\n" +#~ " shell ini. Jika argumen pertama adalah `-l', maka tempatkan sebuah " +#~ "dash dalam\n" +#~ " argument ke nol yang dilewatkan ke FILE, seperti yang dilakukan oleh " +#~ "login. Jika pilihan `-c'\n" +#~ " diberikan, FILE dijalankan dengan environmen kosong. Jika pilihan `-" +#~ "a'\n" +#~ " berarti menset argv[0] dari proses yang dijalankan ke NAMA.\n" +#~ " Jika berkas tidak dapat dijalankan dan shell bukan interaktif,\n" +#~ " maka shell keluar, unless pilihan shell `execfail' diset." + +#~ msgid "Logout of a login shell." +#~ msgstr "Logout dari sebuah login shell." + +#~ msgid "" +#~ "For each NAME, the full pathname of the command is determined and\n" +#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n" +#~ " full pathname of NAME, and no path search is performed. The -r\n" +#~ " option causes the shell to forget all remembered locations. The -d\n" +#~ " option causes the shell to forget the remembered location of each " +#~ "NAME.\n" +#~ " If the -t option is supplied the full pathname to which each NAME\n" +#~ " corresponds is printed. If multiple NAME arguments are supplied " +#~ "with\n" +#~ " -t, the NAME is printed before the hashed full pathname. The -l " +#~ "option\n" +#~ " causes output to be displayed in a format that may be reused as " +#~ "input.\n" +#~ " If no arguments are given, information about remembered commands is " +#~ "displayed." +#~ msgstr "" +#~ "Untuk setiap NAMA, full pathname dari perintah ditentukan dan\n" +#~ " diingat. Jika pilihan -p diberikan, PATHNAME digunakan sebagai\n" +#~ " full pathname dari NAME, dan tidak ada jalur pencarian yang " +#~ "dilakukan. Pilihan -r\n" +#~ " menyebabkan shell untuk melupakan semua lokasi yang diingat. Pilihan -" +#~ "d\n" +#~ " menyebabkan shell untuk melupakan lokasi dari setiap NAMA.\n" +#~ " Jika pilihan -t diberikan ful pathname ke setiap NAMA\n" +#~ " yang bersesuaian ditampilkan. Jika beberapa argumen NAMA diberikan " +#~ "dengan\n" +#~ " pilihan -t, NAME ditampilkan sebelum hashed full pathname. Pilihan -" +#~ "l\n" +#~ " menyebabkan keluaran untuk ditampilkan dalam format yang biasa " +#~ "digunakan sebagai masukan.\n" +#~ " Jika tidak ada argumen yang diberikan, informasi mengenai perintah " +#~ "yang diingat akan ditampilkan." + +#~ msgid "" +#~ "Display helpful information about builtin commands. If PATTERN is\n" +#~ " specified, gives detailed help on all commands matching PATTERN,\n" +#~ " otherwise a list of the builtins is printed. The -s option\n" +#~ " restricts the output for each builtin command matching PATTERN to\n" +#~ " a short usage synopsis." +#~ msgstr "" +#~ "Menampilkan informasi yang berharga mengenai perintah builtin. Jika " +#~ "PATTERN\n" +#~ " dispesifikasikan, memberikan bantuan detail mengenail seluruh " +#~ "perintah yang cocok dengan PATTERN,\n" +#~ " jika tidak sebuah daftar dari builtings akan ditampilkan. Pilihan -s\n" +#~ " membatasi keluaran dari setiap perintah builtin yang cocok dengan " +#~ "PATTERN ke\n" +#~ " ringkasan penggunaan singkat." + +#~ msgid "" +#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n" +#~ " If the -h option is given, the job is not removed from the table, but " +#~ "is\n" +#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n" +#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove " +#~ "all\n" +#~ " jobs from the job table; the -r option means to remove only running " +#~ "jobs." +#~ msgstr "" +#~ "Secara default, menghapus setiap JOBSPEC argumen dari tabel actif jobs.\n" +#~ " Jika pilihan -n diberikan, pekerjaan tidak dihapus dari tabel, tetap " +#~ "ditandai\n" +#~ " sehingga ketika SIGHUP tidak terkirim ke job ketika shell menerima " +#~ "sebuah\n" +#~ " SIGHUP. Pilihan -a, ketika JOBSPEC tidak diberikan, berarti menghapus " +#~ "seluruh\n" +#~ " pekerjaan dari job tabel; Pilihan -r berarti hanya menghapus " +#~ "pekerjaan yang berjalan." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N\n" +#~ " is omitted, the return status is that of the last command." +#~ msgstr "" +#~ "Menyebabkan sebuah fungsi untuk keluar dengan nilai kembalian " +#~ "dispesifikasikan oleh N. Jika N\n" +#~ " diabaikan, maka status kembalian adalah status dari perintah terakhir." + +#~ msgid "" +#~ "For each NAME, remove the corresponding variable or function. Given\n" +#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n" +#~ " unset will only act on functions. With neither flag, unset first\n" +#~ " tries to unset a variable, and if that fails, then tries to unset a\n" +#~ " function. Some variables cannot be unset; also see readonly." +#~ msgstr "" +#~ "Untuk setiap NAMA, hapus variabel atau fungsi yang berhubungan. Dengan\n" +#~ " pilihan `-v', unset hanya berlaku di variabel. Dengan pilihan `-f',\n" +#~ " unset hanya berlaku untuk fungsi. Dengan tidak menggunakan dua " +#~ "pilihan itu,\n" +#~ " pertama akan mencoba mengunset variabel, dan jika itu gagal maka " +#~ "akan\n" +#~ " mencoba untuk mengunset sebuah fungsi. Beberapa variabel tidak dapat " +#~ "diunset. Lihat readonly." + +#~ msgid "" +#~ "NAMEs are marked for automatic export to the environment of\n" +#~ " subsequently executed commands. If the -f option is given,\n" +#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n" +#~ " is given, a list of all names that are exported in this shell is\n" +#~ " printed. An argument of `-n' says to remove the export property\n" +#~ " from subsequent NAMEs. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "NAMA ditandai untuk otomatis export ke environment dari\n" +#~ " perintah yang akan dijalankan selanjutnya. Jika pilihan -f " +#~ "diberikan,\n" +#~ " NAMA akan menunjuk ke fungsi. Jika tidak ada NAMA diberikan, atau " +#~ "jika pilihan `-p'\n" +#~ " diberikan, daftar dari seluruh nama yang diexport dalam shell ini\n" +#~ " ditampilkan. Sebuah argumen dari pilihan `-n' mengatakan untuk " +#~ "menghapus expor properti\n" +#~ " dari NAMA selanjutnya. Sebuah argumen dari `--' menonaktifkan " +#~ "pemrosesan\n" +#~ " pilihan selanjutnya." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n" +#~ " not be changed by subsequent assignment. If the -f option is given,\n" +#~ " then functions corresponding to the NAMEs are so marked. If no\n" +#~ " arguments are given, or if `-p' is given, a list of all readonly " +#~ "names\n" +#~ " is printed. The `-a' option means to treat each NAME as\n" +#~ " an array variable. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "NAMA yang diberikan ditandai secara baca-saja dan nilai dari NAMA ini " +#~ "tidak\n" +#~ " boleh diubah oleh assignmen selanjutnya. Jika pilihan -f diberikan,\n" +#~ " maka fungsi yang berhubungan dengan NAMA akan ditandai. Jika tidak\n" +#~ " ada argumen yang diberikan, atau jika pilihan `-p' diberikan, sebuah " +#~ "daftar dari seluruh nama baca-saja\n" +#~ " ditampilkan. Pilihan `-a' berarti memperlakukan setiap NAMA sebagai\n" +#~ " sebuah variabel array. Sebuah argumen dari `--' menonaktifkan " +#~ "pemrosesan\n" +#~ " pilihan selanjutnya." + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n" +#~ " not given, it is assumed to be 1." +#~ msgstr "" +#~ "Parameter posisi dari $N+1 ... diubah namanya menjadi $1 ... Jika N\n" +#~ " tidak diberikan, ini diasumsikan untuk menjadi 1." + +#~ msgid "" +#~ "Suspend the execution of this shell until it receives a SIGCONT\n" +#~ " signal. The `-f' if specified says not to complain about this\n" +#~ " being a login shell if it is; just suspend anyway." +#~ msgstr "" +#~ "Suspend eksekusi dari shell ini sampai ini menerima sebuah sinyal " +#~ "SIGCONT\n" +#~ " Jika pilihan `-f' dispesifikasikan maka tidak komplain tentang ini " +#~ "menjadi\n" +#~ " sebuah login shell jika emang begitu. Hanya lakukan suspend saja." + +#~ msgid "" +#~ "Print the accumulated user and system times for processes run from\n" +#~ " the shell." +#~ msgstr "" +#~ "Tampilkan waktu yang terakumulasi oleh pengguna dan system untuk proses " +#~ "yang berjalan dari\n" +#~ " shell." + +#~ msgid "" +#~ "For each NAME, indicate how it would be interpreted if used as a\n" +#~ " command name.\n" +#~ " \n" +#~ " If the -t option is used, `type' outputs a single word which is one " +#~ "of\n" +#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is " +#~ "an\n" +#~ " alias, shell reserved word, shell function, shell builtin, disk " +#~ "file,\n" +#~ " or unfound, respectively.\n" +#~ " \n" +#~ " If the -p flag is used, `type' either returns the name of the disk\n" +#~ " file that would be executed, or nothing if `type -t NAME' would not\n" +#~ " return `file'.\n" +#~ " \n" +#~ " If the -a flag is used, `type' displays all of the places that " +#~ "contain\n" +#~ " an executable named `file'. This includes aliases, builtins, and\n" +#~ " functions, if and only if the -p flag is not also used.\n" +#~ " \n" +#~ " The -f flag suppresses shell function lookup.\n" +#~ " \n" +#~ " The -P flag forces a PATH search for each NAME, even if it is an " +#~ "alias,\n" +#~ " builtin, or function, and returns the name of the disk file that " +#~ "would\n" +#~ " be executed." +#~ msgstr "" +#~ "Untuk setiap NAMA, mengindikasikan bagaimana ini akan diinterpretasikan " +#~ "jika digunakan sebagai sebuah\n" +#~ " nama perintah.\n" +#~ " \n" +#~ " Jika sebuah pilihan -t digunakan, `type' mengeluarkan sebuah kata " +#~ "tunggal yang salah satu dari\n" +#~ " `alias', `keyword', `function', `builtin', `file', atau `', jika NAMA " +#~ "adalah sebuah\n" +#~ " alias, shell kata yang dipesan, shell fungsi, shell builtin, disk " +#~ "file,\n" +#~ " atau tidak ditemukan, respectively.\n" +#~ " \n" +#~ " Jika flag -p digunakan, `type' menampilkan semua dari tempat yang " +#~ "berisi\n" +#~ " nama executable `file'. Ini meliputi aliases, builtings, dan\n" +#~ " fungsi, jika dan hanya jika flag -p juga tidak digunakan.\n" +#~ " \n" +#~ " Flag -f menekan seluruh fungsi shell lookup.\n" +#~ " \n" +#~ " Flag -P memaksa sebuah JALUR pencarian untuk setiap NAMA, bahkan jika " +#~ "ini merupakan sebuah alias,\n" +#~ " builtin, atau fungsi, dan mengembalikan nama ke disk file yang akan\n" +#~ " dijalankan." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n" +#~ " `-S' is supplied, the current value of the mask is printed. The `-" +#~ "S'\n" +#~ " option makes the output symbolic; otherwise an octal number is " +#~ "output.\n" +#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n" +#~ " that may be used as input. If MODE begins with a digit, it is\n" +#~ " interpreted as an octal number, otherwise it is a symbolic mode " +#~ "string\n" +#~ " like that accepted by chmod(1)." +#~ msgstr "" +#~ "File-creation mask pengguna diset ke MODE. Jika MODE diabaikan, atau " +#~ "jika\n" +#~ " `-S' diberikan, nilai sekaran dari mask ditampilkan. Pilihan `-S'\n" +#~ " membuah keluaran symbolic; jika tidak sebuah bilangan octal " +#~ "dikeluarkan.\n" +#~ " Jika pilihan `-p' diberikan, dan MODE diabaikan, keluaran adalah " +#~ "dalam format\n" +#~ " yang bisa digunakan sebagai masukan. Jika MODE dimulai dengan sebuah " +#~ "digit, ini\n" +#~ " diinterpretasikan sebagai sebuah bilangan octal, jika tidak ini " +#~ "adalah sebuah symbolic mode string\n" +#~ " yang diterima oleh chmod(1)." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If\n" +#~ " N is not given, all currently active child processes are waited for,\n" +#~ " and the return code is zero. N is a process ID; if it is not given,\n" +#~ " all child processes of the shell are waited for." +#~ msgstr "" +#~ "Menunggu sampai proses yang dispesifikasikan dan laporkan status " +#~ "selesainya. Jika\n" +#~ " N tidak diberikan, semua proses anak yang masih aktif ditunggu " +#~ "untuk,\n" +#~ " dan mengembalikan kode kembalian nol. N adalah sebuah proses ID; jika " +#~ "ini tidak diberikan,\n" +#~ " semua proses anak dari shell ditunggu." + +#~ msgid "" +#~ "Create a simple command invoked by NAME which runs COMMANDS.\n" +#~ " Arguments on the command line along with NAME are passed to the\n" +#~ " function as $0 .. $n." +#~ msgstr "" +#~ "Buat sebuah perintah sederhana yang memanggil dengan NAMA yang " +#~ "menjalankan PERINTAH.\n" +#~ " Argumen dalam baris perintah dengan NAMA dilewatkan ke\n" +#~ " fungsi sebagai $0 .. $n." + +#~ msgid "" +#~ "Toggle the values of variables controlling optional behavior.\n" +#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n" +#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n" +#~ " status indicates whether each OPTNAME is set or unset. The -o\n" +#~ " option restricts the OPTNAMEs to those defined for use with\n" +#~ " `set -o'. With no options, or with the -p option, a list of all\n" +#~ " settable options is displayed, with an indication of whether or\n" +#~ " not each is set." +#~ msgstr "" +#~ "Ubah nilai dari variabel yang mengontrol perilaku opsional.\n" +#~ " Pilihan -s berarti untuk mengaktifkan (set) setiap OPTNAME; pilihan -" +#~ "u\n" +#~ " mengunset setiap OPTNAME. tanda -q menekan keluaran; status keluaran\n" +#~ " mengindikasikan apakah setiap OPTNAME diset atau diunset. Pilihan -o\n" +#~ " membatasi OPTNAME ke nilai yang didefinisikan untuk digunakan dengan\n" +#~ " `set -o'. Tanpa pilihan, atau dengan pilihan -p, sebuah daftar dari " +#~ "seluruh\n" +#~ " pilihan yang bisa diset ditampilkan, tanpa sebuah indikasi apakah " +#~ "salah satu atau\n" +#~ " bukan setiap dari variabel diset." + +#~ msgid "" +#~ "For each NAME, specify how arguments are to be completed.\n" +#~ " If the -p option is supplied, or if no options are supplied, " +#~ "existing\n" +#~ " completion specifications are printed in a way that allows them to " +#~ "be\n" +#~ " reused as input. The -r option removes a completion specification " +#~ "for\n" +#~ " each NAME, or, if no NAMEs are supplied, all completion " +#~ "specifications." +#~ msgstr "" +#~ "Untuk setiap NAMA, spesifikasikan bagaimana argumen akan diselesaikan.\n" +#~ " Jika pilihan -p diberikan, atau tidak ada pilihan yang diberikan, " +#~ "completion\n" +#~ " spesifikasi yang telah ada ditampilkan dalam sebuah cara yang " +#~ "membolehkan mereka untuk\n" +#~ " digunakan sebagai masukan. Pilihan -r menghapus sebuah spesifikasi " +#~ "completion untuk\n" +#~ " setiap NAMA, atau jika tidak ada NAMA yang diberikan, untuk semua " +#~ "spesifikasi completion." diff --git a/bash-5.1/po/insert-header.sin b/bash-5.1/po/insert-header.sin new file mode 100644 index 0000000000000000000000000000000000000000..b26de01f6c88c7b15bb4815a8fcd5120d479300d --- /dev/null +++ b/bash-5.1/po/insert-header.sin @@ -0,0 +1,23 @@ +# Sed script that inserts the file called HEADER before the header entry. +# +# At each occurrence of a line starting with "msgid ", we execute the following +# commands. At the first occurrence, insert the file. At the following +# occurrences, do nothing. The distinction between the first and the following +# occurrences is achieved by looking at the hold space. +/^msgid /{ +x +# Test if the hold space is empty. +s/m/m/ +ta +# Yes it was empty. First occurrence. Read the file. +r HEADER +# Output the file's contents by reading the next line. But don't lose the +# current line while doing this. +g +N +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/bash-5.1/po/it.gmo b/bash-5.1/po/it.gmo new file mode 100644 index 0000000000000000000000000000000000000000..4bbd10a4e300f3ea4f654c759073cd8a7cca9e1d Binary files /dev/null and b/bash-5.1/po/it.gmo differ diff --git a/bash-5.1/po/it.po b/bash-5.1/po/it.po new file mode 100644 index 0000000000000000000000000000000000000000..1defc4061cfa8bc632c3c08a842d2d0c14651404 --- /dev/null +++ b/bash-5.1/po/it.po @@ -0,0 +1,6136 @@ +# Italian translation for bash +# Copyright (C) 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Sergio Zanchetta , 2010, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2011-10-17 09:14+0200\n" +"Last-Translator: Sergio Zanchetta \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural= (n != 1)\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "indice dell'array errato" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: impossibile convertire un array indicizzato in uno associativo" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: chiave dell'array associativo non valida" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: impossibile assegnare a un indice non numerico" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" +"%s: %s: deve essere usato un indice nell'assegnazione di un array associativo" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: impossibile creare: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: impossibile trovare una mappatura per il comando" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: il primo carattere non spazio non è \"\"\"" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "carattere di chiusura \"%c\" non presente in %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: separatore di tipo due punti mancante" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "\"%s\": impossibile eliminare l'associazione" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "\"%s\": nome alias non valido" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "modifica delle righe non abilitata" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "\"%s\": nome della mappatura non valido" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: impossibile leggere: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "\"%s\" nome della funzione sconosciuto" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s non è associato ad alcun tasto.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s può essere invocato tramite " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "\"%s\": impossibile eliminare l'associazione" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "numero di cicli" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "significativo solo in un ciclo \"for\", \"while\" o \"until\"" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Restituisce il contesto della chiamata alla subroutine corrente.\n" +" \n" +" Senza ESPR, restituisce \"$riga $nomefile\". Con ESPR, restituisce\n" +" \"$riga $subroutine $nomefile\"; questa informazione aggiuntiva può " +"essere usata\n" +" per fornire uno stack trace.\n" +" \n" +" Il valore dell'ESPR indica di quanti frame di chiamata tornare indietro " +"rispetto\n" +" a quello attuale; in cima c'è il frame 0.\n" +" \n" +" Stato di uscita:\n" +" Restituisce 0 a meno che non sia in esecuzione una funzione di shell o " +"che l'ESPR\n" +" non sia valida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME non impostata" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "troppi argomenti" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "nessun'altra directory" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD non impostata" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "riga %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "attenzione: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uso: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: l'opzione richiede un argomento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: è necessario un argomento numerico" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: non trovata" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: opzione non valida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nome dell'opzione non valido" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "\"%s\": non è un identificatore valido" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "numero ottale non valido" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "numero esadecimale non valido" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "numero non valido" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: specifica di segnale non valida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "\"%s\": non è un pid o un numero di job valido" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variabile in sola lettura" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fuori dall'intervallo" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argomento" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s fuori dall'intervallo" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: job inesistente" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: nessun controllo dei job" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "nessun controllo dei job" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: limitato" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "limitato" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: non è un comando interno di shell" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "errore in scrittura: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "errore nell'impostazione degli attributi del terminale: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "errore nel recupero degli attributi del terminale: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: errore nel recupero della directory corrente: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: specifica di job ambigua" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: impossibile azzerare: %s in sola lettura" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: impossibile azzerare" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nome azione non valido" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: nessun completamento specificato" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "attenzione: l'opzione -F potrebbe non funzionare come previsto" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "attenzione: l'opzione -C potrebbe non funzionare come previsto" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "funzione di completamento attualmente non in esecuzione" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "può essere usato solo in una funzione" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": nome alias non valido" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "impossibile usare \"-f\" per creare funzioni" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funzione in sola lettura" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: impossibile eliminare variabili array in questo modo" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: impossibile convertire un array associativo in uno indicizzato" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "caricamento dinamico non disponibile" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "impossibile aprire l'oggetto condiviso %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "impossibile trovare %s nell'oggetto condiviso %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: non caricato dinamicamente" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: non caricato dinamicamente" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: impossibile eliminare: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: è una directory" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: non è un file regolare" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: file troppo grande" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: impossibile eseguire il file binario" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: impossibile eseguire: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "non è una shell di login: utilizzare \"exit\"" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Sono presenti job interrotti.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Ci sono job in esecuzione.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "nessun comando trovato" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "specifica della cronologia" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: impossibile aprire il file temp: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "attuale" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "job %d avviato senza controllo dei job" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opzione illecita -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: l'opzione richiede un argomento -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing disabilitato" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s tabella di hash vuota\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "rich.\tcomando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Comandi di shell corrispondenti alla parola chiave \"" +msgstr[1] "Comandi di shell corrispondenti alle parole chiave \"" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nessun argomento della guida corrisponde a \"%s\". Provare \"help help\" o " +"\"man -k %s\" o \"info %s\"." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: impossibile aprire: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Questi comandi della shell sono definiti internamente. Digitare \"help\" per " +"consultare questa lista.\n" +"Digitare \"help nome\" per saperne di più sulla funzione \"nome\".\n" +"Usare \"info bash\" per saperne di più sulla shell in generale.\n" +"Usare \"man -k\" o \"info\" per saperne di più su comandi non presenti nella " +"lista.\n" +"\n" +"Un asterisco (*) vicino a un nome significa che il comando è disabilitato.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "impossibile usare più di uno tra -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "posizione nella cronologia" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: nome dell'opzione non valido" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: espansione della cronologia non riuscita" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib non riuscito" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "nessuna altra opzione permessa con \"-x\"" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: gli argomenti devono essere ID di processo o di job" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Errore sconosciuto" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "attesa espressione" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: non è un array indicizzato" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: specifica di descrittore di file non valida" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: descrittore di file non valido: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: numero di righe non valido" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: origine dell'array non valida" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: quantum di callback non valido" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "nome della variabile array vuoto" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "necessario il supporto alla variabile array" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "\"%s\": manca il carattere di formato" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "\"%c\": specifica di formato dell'orario non valida" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "\"%c\": carattere di formato non valido" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "attenzione: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "cifra esadecimale mancante in \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "cifra unicode mancante in \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nessun'altra directory" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: argomento di limite non valido" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "stack delle directory vuoto" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "indice dello stack delle directory" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Visualizza l'elenco delle directory attualmente in memoria. Le directory\n" +" vengono inserite nell'elenco con il comando \"pushd\"; è possibile\n" +" andare a ritroso nell'elenco con il comando \"popd\".\n" +" \n" +" Opzioni:\n" +" -c\tPulisce lo stack delle directory eliminandone tutti gli elementi\n" +" -l\tNon stampa la tilde come prefisso per le directory relative alla\n" +" \tpropria directory home\n" +" -p\tStampa lo stack delle directory una voce per riga\n" +" -v\tStampa lo stack delle directory una voce per riga usando la\n" +" \tposizione nello stack stesso come prefisso\n" +" \n" +" Argomenti:\n" +" +N\tVisualizza l'N-sima voce contando a partire da sinistra " +"dell'elenco\n" +" \tmostrato da dirs quando invocato senza opzioni, iniziando da zero.\n" +" \n" +" -N\tVisualizza l'N-sima voce contando a partire da destra dell'elenco\n" +"\tmostrato da dirs quando invocato senza opzioni, iniziando da zero." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Aggiunge una directory in cima allo stack delle directory o ruota lo\n" +" stack stesso, mettendo come primo elemento l'attuale directory\n" +" di lavoro. Senza argomenti scambia le prime due directory in cima.\n" +" \n" +" Opzioni:\n" +" -n\tEvita il normale cambio di directory quando vengono aggiunte\n" +" \tdirectory allo stack, così da manipolare solo lo stack stesso.\n" +" \n" +" Argomenti:\n" +" +N\tRuota lo stack in modo che l'N-sima directory (contando\n" +" \ta partire da sinistra dell'elenco mostrato da \"dirs\", iniziando da\n" +" \tzero) sia in cima.\n" +" \n" +" -N\tRuota lo stack in modo che l'N-sima directory (contando\n" +" \ta partire da destra dell'elenco mostrato da \"dirs\", iniziando da\n" +" \tzero) sia in cima.\n" +" \n" +" dir\tAggiunge DIR in cima allo stack delle directory, facendone la\n" +" \tdirectory di lavoro corrente.\n" +" \n" +" Il comando interno \"dirs\" visualizza lo stack delle directory." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Rimuove voci dallo stack delle directory. Senza argomenti, rimuove\n" +" la directory in cima allo stack e passa alla nuova prima directory.\n" +" \n" +" Opzioni:\n" +" -n\tEvita il normale cambio di directory quando vengono rimosse\n" +" \tdirectory dallo stack, così da manipolare solo lo stack stesso.\n" +" \n" +" Argomenti:\n" +" +N\tRimuove l'N-sima voce contando a partire da sinistra dell'elenco\n" +" \tmostrato da \"dirs\", iniziando da zero. Per esempio: \"popd +0\"\n" +" \trimuove la prima directory, \"popd +1\" la seconda.\n" +" \n" +" -N\tRimuove l'N-sima voce contando a partire da destra dell'elenco\n" +" \tmostrato da \"dirs\", iniziando da zero. Per esempio: \"popd -0\"\n" +" \trimuove l'ultima directory, \"popd -1\" la penultima.\n" +" \n" +" Il comando interno \"dirs\" visualizza lo stack delle directory." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: specifica di timeout non valida" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "errore in lettura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"è possibile eseguire \"return\" solo da una funzione o da uno script chiamato" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "impossibile azzerare contemporaneamente una funzione e una variabile" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: non è una variabile array" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: non è una funzione" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: impossibile azzerare" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "numero di scorrimenti" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "impossibile impostare e azzerare opzioni di shell contemporaneamente" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nome dell'opzione di shell non valido" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "necessario un nome file come argomento" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: file non trovato" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "impossibile sospendere" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "impossibile sospendere una shell di login" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s ha \"%s\" come alias\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s è una parola chiave di shell\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s è una funzione\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s è un comando interno di shell\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s è un comando interno di shell\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s è %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "hash effettuato su %s (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: argomento di limite non valido" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "\"%c\": comando errato" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: impossibile recuperare il limite: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limite" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: impossibile modificare il limite: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "numero ottale" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "\"%c\": operatore di modo simbolico non valido" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "\"%c\": carattere di modo simbolico non valido" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " riga " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "ultimo comando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Interruzione..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "errore di comando sconosciuto" + +#: error.c:463 +msgid "bad command type" +msgstr "tipo di comando errato" + +#: error.c:464 +msgid "bad connector" +msgstr "connettore errato" + +#: error.c:465 +msgid "bad jump" +msgstr "salto errato" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variabile non assegnata" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atempo di attesa scaduto per l'input: auto-logout\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "impossibile redirigere lo standard input da /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: \"%c\": carattere di formato non valido" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "errore della pipe" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: limitato: impossibile specificare \"/\" nei nomi dei comandi" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: comando non trovato" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: interprete errato" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: impossibile eseguire il file binario" + +#: execute_cmd.c:5977 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s è un comando interno di shell\n" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "impossibile duplicare fd %d su fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "superato il livello di ricorsione dell'espressione" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "underflow dello stack di ricorsione" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "errore di sintassi nell'espressione" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "tentata un'assegnazione a una non variabile" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "errore di sintassi nell'espressione" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "divisione per 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "bug: token di expassign errato" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "atteso \":\" per l'espressione condizionale" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "esponente minore di 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "atteso identificatore dopo un pre-incremento o un pre-decremento" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "\")\" mancante" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "errore di sintassi: atteso un operando" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "errore di sintassi: operatore aritmetico non valido" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (il token dell'errore è \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "base aritmetica non valida" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: numero di righe non valido" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "valore troppo grande per la base" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: errore di espressione\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: impossibile accedere alle directory padre" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "impossibile reimpostare il modo nodelay per fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"impossibile allocare un nuovo descrittore di file per l'input della bash da " +"fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer già esistente per il nuovo fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pipe pgrp" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "il pid %d del fork appare nel job in esecuzione %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "eliminazione del job %d interrotto con il gruppo di processi %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) segnato come ancora in vita" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: pid inesistente" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Segnale %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Completato" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Fermato" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Fermato(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "In esecuzione" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Eseguito(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Uscita %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Stato sconosciuto" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core dump creato) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (dir: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid del figlio (%ld a %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: il pid %ld non è un figlio di questa shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: nessun record del processo %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: il job %d è fermo" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: job inesistente" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: il job è terminato" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: il job %d è già in background" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: attivato WNOHANG per evitare blocchi indefiniti" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: riga %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core dump creato)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(dir ora: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp non riuscita" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: disciplina di linea" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplina di linea" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "impossibile impostare il gruppo di processi del terminale (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "nessun controllo dei job in questa shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: asserzione non riuscita: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: asserzione non riuscita\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "sconosciuto" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: blocco eliminato nell'elenco dei disponibili" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: chiamata con un argomento di blocco già liberato" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: chiamata con un argomento di blocco non allocato" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: riscontrato un underflow; mh_nbytes fuori intervallo" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: riscontrato un underflow; mh_nbytes fuori intervallo" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: dimensioni diverse dei blocchi di inizio e di fine" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: chiamata con un argomento di blocco non allocato" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: riscontrato un underflow; mh_nbytes fuori intervallo" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: riscontrato un underflow; mh_nbytes fuori intervallo" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: dimensioni diverse dei blocchi di inizio e di fine" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" +"register_alloc: forse la tavola di allocazione è piena con FIND_ALLOC\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: forse %p è già come allocato nella tabella\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_alloc: forse %p è già come libero nella tabella\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base non valida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: host sconosciuto" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: servizio non valido" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: specifica del percorso di rete errata" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "operazione di rete non supportata" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: impossibile cambiare la localizzazione (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: impossibile cambiare la localizzazione (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: impossibile cambiare la localizzazione (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: impossibile cambiare la localizzazione (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "È presente della posta in $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "È presente della nuova posta in $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "La posta in %s è stata letta\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "errore di sintassi: richiesta espressione aritmetica" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "errore di sintassi: \";\" non atteso" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "errore di sintassi: \"((%s))\"" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipo di istruzione errata %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document alla riga %d è delimitato da un EOF (era richiesto \"%s\")" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection: istruzione di reindirizzamento \"%d\" fuori dell'intervallo" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF non atteso durante la ricerca di \"%c\"" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF non atteso durante la ricerca di \"]]\"" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "" +"errore di sintassi nell'espressione condizionale: token non atteso \"%s\"" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "errore di sintassi nell'espressione condizionale" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "token non atteso \"%s\", era atteso \")\"" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "atteso \")\"" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argomento non atteso \"%s\" per l'operatore unario condizionale" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "argomento non atteso per l'operatore unario condizionale" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "token non atteso \"%s\", era atteso un operatore binario condizionale" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "atteso operatore binario condizionale" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argomento non atteso \"%s\" per l'operatore binario condizionale" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "argomento non atteso per l'operatore binario condizionale" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "token non atteso \"%c\" nel comando condizionale" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "token non atteso \"%s\" nel comando condizionale" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "token non atteso %d nel comando condizionale" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "errore di sintassi vicino al token non atteso \"%s\"" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "errore di sintassi vicino a \"%s\"" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "errore di sintassi: EOF non atteso" + +#: parse.y:6365 +msgid "syntax error" +msgstr "errore di sintassi" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Usare \"%s\" per uscire dalla shell.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF non atteso durante la ricerca di \")\"" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: funzione \"%s\" non trovata" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: COMPSPEC NULL" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: connettore errato \"%d\"" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: descrittore di file non valido" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: puntatore a file NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != numfile xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: \"%c\": carattere di formato non valido" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "descrittore di file fuori dell'intervallo" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redirezione ambigua" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: impossibile sovrascrivere il file esistente" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: limitato: impossibile redirigere l'output" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "impossibile creare un file temporaneo per here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: impossibile assegnare fd a una variabile" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port non supportata senza rete" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "errore di reindirizzamento: impossibile duplicare fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "impossibile trovare /tmp, è necessario crearla" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp deve essere un nome di directory valido" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opzione non valida" + +#: shell.c:1319 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "impossibile reimpostare il modo nodelay per fd %d" + +#: shell.c:1330 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "impossibile reimpostare il modo nodelay per fd %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: è una directory" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Manca il nome" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versione %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uso:\t%s [opzione lunga GNU] [opzione] ...\n" +"\t%s [opzione lunga GNU] [opzione] file-script ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Opzioni lunghe GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opzioni di shell:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD o -c comando o -O opzione_shopt\t\t(solo invocazione)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\topzione -%s oppure -o\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Digitare «%s -c \"help set\"» per ulteriori informazioni sulle opzioni di " +"shell.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Digitare \"%s -c help\" per ulteriori informazioni sui comandi interni di " +"shell.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Usare il comando \"bashbug\" per segnalare i bug.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operazione non valida" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Segnale inesistente" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Chiusura" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interruzione" + +#: siglist.c:58 +msgid "Quit" +msgstr "Uscita (con core dump)" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Istruzione non consentita" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Rilevato trace/breakpoint" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Istruzione ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Istruzione EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Eccezione in virgola mobile" + +#: siglist.c:86 +msgid "Killed" +msgstr "Ucciso" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Errore di bus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Errore di segmentazione" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Chiamata di sistema errata" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Pipe interrotta" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Sveglia" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminato" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Condizione di I/O urgente" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Fermato (segnale)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continuato" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Processo figlio concluso o fermato" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Fermato (input da terminale)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Fermato (output da terminale)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O pronto" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Limite di CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Limite di file" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Timer (virtuale)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Timer (profilo)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Finestra modificata" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Blocco del record" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Segnale 1 dell'utente" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Segnale 2 dell'utente" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Dati di input HTF in sospeso" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "mancanza di alimentazione imminente" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "crash di sistema imminente" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "processo spostato su un'altra CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "errore di programmazione" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Modalità di monitoraggio HFT concessa" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Modalità di monitoraggio HFT revocata" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "la sequenza sonora HFT è stata completata" + +#: siglist.c:214 +msgid "Information request" +msgstr "Richiesta di informazioni" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Segnale sconosciuto n° %d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "sostituzione errata: nessuna chiusura di \"%s\" in %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: impossibile assegnare una lista a un membro di un array" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "impossibile creare una pipe per la sostituzione del processo" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "impossibile creare un figlio per la sostituzione del processo" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "impossibile aprire la pipe con nome %s in lettura" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "impossibile aprire la pipe con nome %s in scrittura" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "impossibile duplicare una pipe con nome %s come fd %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "sostituzione errata: manca «\"» di chiusura in %s" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "impossibile creare una pipe per la sostituzione del comando" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "impossibile creare un figlio per la sostituzione del comando" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: impossibile duplicare la pipe come fd 1" + +#: subst.c:6883 subst.c:9952 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: %s: valore non valido per il descrittore del file di traccia" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: numero di righe non valido" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "\"%s\": nome alias non valido" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parametro nullo o non impostato" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametro nullo o non impostato" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expressione di sottostringa < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: sostituzione errata" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: impossibile assegnare in questo modo" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"le versioni future della shell forzeranno la valutazione come fosse una " +"sostituzione aritmetica" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "sostituzione errata: manca «\"» di chiusura in %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "nessuna corrispondenza: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "atteso argomento" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: attesa espressione intera" + +#: test.c:265 +msgid "`)' expected" +msgstr "atteso \")\"" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "atteso \")\", trovato %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: atteso operatore binario" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: atteso operatore unario" + +#: test.c:881 +msgid "missing `]'" +msgstr "\"]\" mancante" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "errore di sintassi: \";\" non atteso" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "numero di segnale non valido" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valore errato in trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: il gestore dei segnali è SIG_DFL, viene inviato " +"nuovamente %d (%s)" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: segnale errato %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "errore nell'importazione della definizione di funzione per \"%s\"" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "livello di shell (%d) troppo alto, reimpostato a 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: nessun contesto di funzione nell'ambito corrente" + +#: variables.c:2693 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: impossibile assegnare fd a una variabile" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: nessun contesto di funzione nell'ambito corrente" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s ha exportstr null" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "carattere non valido %d in exportstr per %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "nessun \"=\" in exportstr per %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: la prima parte di shell_variables non è un contesto di " +"funzione" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: nessun contesto global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: la prima parte di shell_variables non è un ambito temporaneo " +"d'ambiente" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: impossibile aprire come FILE" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: valore non valido per il descrittore del file di traccia" + +#: variables.c:6437 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s fuori dall'intervallo" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright © 2009 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licenza GPLv3+: GNU GPL versione 3 o successiva \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versione %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "Questo è software libero; è possibile modificarlo e ridistribuirlo.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Non c'è ALCUNA GARANZIA, nei limiti permessi dalla legge.\n" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: impossibile allocare %lu byte (%lu byte allocati)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: impossibile allocare %lu byte" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: impossibile allocare %lu byte (%lu byte allocati)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: impossibile allocare %lu byte" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nome[=valore] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nome [nome ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m mappatura] [-f nomefile] [-q nome] [-u nome] [-r " +"seqtasti] [-x seqtasti:comando-shell] [seqtasti:funzione-readline o comando-" +"readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [comandoint-shell [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [espr]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] comando [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilrtux] [-p] [nome[=valore] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilrtux] [-p] nome[=valore] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [opzione] nome[=valore] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f nome_file] [nome ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts stringaopz nome [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nome] [comando [argomenti ...]] [redirezione ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [primo] [ultimo] oppure fc -s [pat=rep] [comando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [spec_job]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [spec_job ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p nomepercorso] [-dt] [nome ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [modello ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d posiz] [n] oppure history -anrw [nomefile] oppure history -" +"ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [specjob ...] oppure jobs -x comando [argomenti]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [specjob ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s specsegn | -n numsegn | -specsegn] pid | specjob ... oppure kill -l " +"[specsegn]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a array] [-d delim] [-i testo] [-n ncaratt] [-N ncaratt] [-p " +"stringa] [-t secondi] [-u fd] [nome ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nome-opzione] [--] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [nome ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nome[=valore] ...] oppure export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nome[=valore] ...] oppure readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source nomefile [argomenti]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". nomefile [argomenti]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [espr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] spec_segnale ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nome [nome ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [limite]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modo]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOME [in PAROLE ... ] ; do COMANDI; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( espr1; espr2; espr3 )); do COMANDI; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOME [in PAROLE ... ;] do COMANDI; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PAROLA in [MODELLO [| MODELLO]...) COMANDI ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMANDI; then COMANDI; [ elif COMANDI; then COMANDI; ]... [ else " +"COMANDI; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMANDI; do COMANDI; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMANDI; do COMANDI; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOME] comando [redirezioni]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { COMANDI ; } oppure name () { COMANDI ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMANDI ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "spec_job [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( espressione ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ espressione ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variabili - nomi e significati di alcune variabili di shell" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nomeopz ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] formato [argomenti]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o opzione] [-A azione] [-G modglob] [-" +"W elencoparole] [-F funzione] [-C comando] [-X modfiltro] [-P prefisso] [-S " +"suffisso] [nome ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o opzione] [-A azione] [-G modglob] [-W " +"elencoparole] [-F funzione] [-C comando] [-X modfiltro] [-P prefisso] [-S " +"suffisso] [parola]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opzione] [-DE] [nome ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n numero] [-O origine] [-s numero] [-t] [-u fd] [-C callback] [-c " +"quantità] [array]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n numero] [-O origine] [-s numero] [-t] [-u fd] [-C callback] [-" +"c quantità] [array]" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definisce o visualizza alias.\n" +" \n" +" Senza argomenti, \"alias\" stampa l'elenco degli alias nella forma\n" +" riusabile \"alias NOME=VALORE\" sullo standard output.\n" +" \n" +" Altrimenti, un alias è definito per ogni NOME a cui è fornito un " +"VALORE.\n" +" Uno spazio finale in VALORE determina un controllo della parola " +"successiva\n" +" che andrà a sostituire l'alias quando viene espanso.\n" +" \n" +" Opzioni:\n" +" -p\tStampa tutti gli alias definiti in un formato riusabile\n" +" \n" +" Stato di uscita:\n" +" alias restituisce vero a meno che non venga fornito un NOME per il " +"quale\n" +" non sia stato definito alcun alias." + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Rimuove ogni NOME dall'elenco degli alias definiti.\n" +" \n" +" Opzioni:\n" +" -a\tRimuove tutte le definizioni di alias.\n" +" \n" +" Restituisce successo a meno che NOME non sia un alias esistente." + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Imposta le associazioni di tasti e le variabili di Readline.\n" +" \n" +" Associa una sequenza di tasti a una funzione o a una macro Readline, " +"oppure imposta una\n" +" variabile di Readline. La sintassi di argomento senza opzione è " +"equivalente a quella\n" +" trovata in ~/.inputrc, ma deve essere passata come singolo argomento:\n" +" es., bind '\"\\C-x\\C-r\": ri-leggi-file-init'.\n" +" \n" +" Opzioni:\n" +" -m mappatura Usa MAPPATURA come la mappatura per la durata di " +"questo\n" +" comando. Nomi accettabili per la mappatura sono " +"emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command e vi-insert.\n" +" -l Elenca i nomi delle funzioni.\n" +" -P Elenca i nomi delle funzioni e le associazioni.\n" +" -p Elenca le funzioni e le associazioni in una forma " +"che\n" +" possa essere riusata come input.\n" +" -S Elenca le sequenze di tasti che invocano le macro e " +"i loro valori.\n" +" -s Elenca le sequenze di tasti che invocano le macro e " +"i loro valori\n" +" in una forma che possa essere riusata come input.\n" +" -V Elenca i nomi e i valori delle variabili.\n" +" -v Elenca i nomi e i valori delle variabili in una " +"forma che possa\n" +" essere riusata come input.\n" +" -q nome-funzione Identifica il tasto che invoca la funzione " +"nominata.\n" +" -u nome-funzione Rimuove l'associazione tra la funzione nominata e " +"tutti i tasti associati.\n" +" -r seqtasti Rimuove l'associazione per la SEQTASTI.\n" +" -f nomefile Legge le associazioni di tasti da NOMEFILE.\n" +" -x seqtasti:comando-shell\tEsegue il COMANDO-SHELL quando viene " +"inserita\n" +" \t\t\t\t\tla SEQTASTI.\n" +" \n" +" Stato di uscita:\n" +" bind restituisce 0 a meno che non sia fornita una opzione non " +"riconosciuta o si riscontri un errore." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Esce da cicli for, while o until.\n" +" \n" +" Esce da un ciclo FOR, WHILE o UNTIL. Se è specificato N, interrompe N " +"cicli\n" +" racchiusi.\n" +" \n" +" Stato di uscita:\n" +" Lo stato di uscita è 0 a meno che N non sia maggiore o uguale a 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Riprende cicli for, while o until.\n" +" \n" +" Riprende l'iterazione successiva del ciclo chiuso FOR, WHILE o UNTIL.\n" +" Se è specificato N, riprende l'N-simo ciclo chiuso.\n" +" \n" +" Stato di uscita:\n" +" Lo stato di uscita è 0 a meno che N non sia maggiore o uguale a 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Esegue comandi interni di shell.\n" +" \n" +" Esegue il COMINTERNO-SHELL con ARGOMENTI senza portare a termine una " +"ricerca\n" +" comandi. Ciò è utile quando si desidera reimplementare un comando " +"interno come una\n" +" funzione di shell, ma è necessario eseguire il comando all'interno della " +"funzione.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita del COMINTERNO-SHELL, o falso se il " +"COMINTERNO-SHELL\n" +" non è un comando interno di shell." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Restituisce il contesto della chiamata alla subroutine corrente.\n" +" \n" +" Senza ESPR, restituisce \"$riga $nomefile\". Con ESPR, restituisce\n" +" \"$riga $subroutine $nomefile\"; questa informazione aggiuntiva può " +"essere usata\n" +" per fornire uno stack trace.\n" +" \n" +" Il valore dell'ESPR indica di quanti frame di chiamata tornare indietro " +"rispetto\n" +" a quello attuale; in cima c'è il frame 0.\n" +" \n" +" Stato di uscita:\n" +" Restituisce 0 a meno che non sia in esecuzione una funzione di shell o " +"che l'ESPR\n" +" non sia valida." + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Cambia la directory di lavoro della shell.\n" +" \n" +" Cambia la directory corrente a DIR. La DIR predefinita è il valore della " +"variabile\n" +" HOME della shell.\n" +" \n" +" La variabile CDPATH definisce il percorso di ricerca per la directory " +"che contiene\n" +" DIR. I nomi di directory alternative in CDPATH sono separati da un due " +"punti (:).\n" +" Una nome nullo di directory corrisponde alla directory corrente. Se DIR " +"inizia\n" +" con uno slash (/), CDPATH non viene usato.\n" +" \n" +" Se la directory non viene trovata e l'opzione di shell \"cdable_vars\" è " +"impostata,\n" +" si assume che la parola sia un nome di variabile. Se questa variabile ha " +"un valore,\n" +" viene usato per DIR.\n" +" \n" +" Opzioni:\n" +" -L\tForza a seguire i collegamenti simbolici\n" +" -P\tUsa la struttura fisica della directory senza seguire i " +"collegamenti\n" +" \tsimbolici\n" +" -e\tSe viene fornita l'opzione -P e non può essere determinata con " +"successo\n" +" \tla directory di lavoro corrente, esce con uno stato diverso da zero\n" +" \n" +" Il valore predefinito è seguire i collegamenti simbolici, come se fosse " +"specificato \"-L\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce 0 se viene cambiata la directory o se $PWD è impostata con " +"successo quando\n" +" viene usato -P; altrimenti un valore diverso da zero." + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Stampa il nome della directory di lavoro corrente.\n" +" \n" +" Opzioni:\n" +" -L\tStampa il valore di $PWD se contiene il nome della directory\n" +" \tdi lavoro corrente\n" +" -P\tStampa la directory fisica senza alcun collegamento simbolico\n" +" \n" +" In maniera predefinita \"pwd\" si comporta come se fosse specificato \"-L" +"\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce 0 a meno che non venga fornita una opzione non valida o che " +"la\n" +" directory corrente non possa essere letta." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Comando nullo.\n" +" \n" +" Nessun effetto; il comando non esegue nulla.\n" +" \n" +" Stato di uscita:\n" +" ha sempre successo." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Restituisce successo come risultato.\n" +" \n" +" Stato di uscita:\n" +" ha sempre successo." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Restituisce un risultato di insuccesso.\n" +" \n" +" Stato di uscita:\n" +" Sempre un insuccesso." + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Esegue un comando semplice o visualizza informazioni sui comandi.\n" +" \n" +" Esegue il COMANDO con gli ARGOMENTI ignorando la ricerca delle funzioni " +"di shell o\n" +" visualizza informazioni sui COMANDI specificati. Può essere usato per " +"invocare comandi\n" +" sul disco quando esiste una funzione con lo stesso nome.\n" +" \n" +" Opzioni:\n" +" -p\tUsa un valore predefinito per il PERCORSO che garantisce che " +"vengano trovate tutte\n" +" \tle utilità standard\n" +" -v\tStampa una descrizione del COMANDO simile al comando interno \"type" +"\"\n" +" -V\tStampa una descrizione più prolissa di ciascun COMANDO\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita del COMANDO o insuccesso se il COMANDO " +"non viene trovato." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Imposta i valori e gli attributi delle variabili.\n" +" \n" +" Dichiara le variabili e fornisce loro attributi. Se non vengono forniti " +"NOMI,\n" +" visualizza gli attributi e i valori di tutte le variabili.\n" +" \n" +" Opzioni:\n" +" -f\tLimita l'azione o la visualizzazione ai nomi e alle definizioni di " +"funzione\n" +" -F\tLimita la visualizzazione ai soli nomi di funzione (più numero di " +"riga e\n" +" \tfile sorgente durante il debug)\n" +" -g\tCrea variabili globali quando usato in una funzione di shell; " +"altrimenti\n" +" \tè ignorato\n" +" -p\tVisualizza gli attributi e i valori di ciascun NOME\n" +" \n" +" Opzioni che impostano gli attributi:\n" +" -a\tRende i NOMI array indicizzati (se supportata)\n" +" -A\tRende i NOMI array associativi (se supportata)\n" +" -i\tFornisce ai NOMI l'attributo \"integer\"\n" +" -l\tConverte i NOMI in lettere minuscole in fase di assegnazione\n" +" -r\tImposta i NOMI in sola lettura\n" +" -t\tFornisce ai NOMI l'attributo \"trace\"\n" +" -u\tConverte i NOMI in lettere maiuscole in fase di assegnazione\n" +" -x\tImposta i NOMI come esportabili\n" +" \n" +" Usando \"+\" al posto di \"-\" disattiva l'attributo fornito.\n" +" \n" +" Le variabili con attributo intero vengono valutate aritmeticamente " +"(vedere\n" +" il comando \"let\") quando alla variabile è assegnato un valore.\n" +" \n" +" Quando viene usato in una funzione, \"declare\" rende locali i NOMI, " +"come con\n" +" il comando \"local\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Imposta valori e attributi di variabile.\n" +" \n" +" Obsoleto. Vedere \"help declare\"." + +#: builtins.c:540 +#, fuzzy +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definisce variabili locali.\n" +" \n" +" Crea una variabile locale chiamata NOME fornendogli un VALORE. L'OPZIONE " +"può\n" +" essere una qualsiasi opzione accettata da \"declare\".\n" +" \n" +" Le variabili locali possono essere usate solo all'interno di una " +"funzione; sono\n" +" visibili solo alla funzione nella quale sono definite e ai relativi " +"figli.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita un'opzione non valida, " +"non si\n" +" riscontri un errore o la shell non stia eseguendo una funzione." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Scrive argomenti sullo standard output.\n" +" \n" +" Visualizza gli ARG sullo standard output seguiti da un ritorno a capo.\n" +" \n" +" Opzioni:\n" +" -n\tNon accoda un carattere di ritorno a capo\n" +" -e\tAbilita l'interpretazione dei seguenti caratteri backslash di " +"escape\n" +" -E\tDisabilita esplicitamente l'interpretazione dei caratteri " +"backslash di escape\n" +" \n" +" \"echo\" interpreta i seguenti caratteri backslash di escape:\n" +" \\a\tavviso (campanello)\n" +" \\b\tbackspace\n" +" \\c\telimina ulteriore output\n" +" \\e\tcarattere di escape\n" +" \\f\tavanzamento pagina\n" +" \\n\tritorno a capo\n" +" \\r\tritorno carrello\n" +" \\t\ttabulazione orizzontale\n" +" \\v\ttabulazione verticale\n" +" \\\\\tbackslash\n" +" \\0nnn\til carattere il cui codice ASCII è NNN (ottale). NNN può " +"avere\n" +" \tda 0 a 3 cifre ottali\n" +" \\xHH\til carattere otto bit il cui valore è HH (esadecimale). HH " +"può\n" +" \tavere una o due cifre esadecimali\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga riscontrato un errore di " +"scrittura." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Scrive argomenti sullo standard output.\n" +" \n" +" Visualizza gli ARG sullo standard output seguiti da un ritorno a capo.\n" +" \n" +" Opzioni:\n" +" -n\tNon accoda un ritorno a capo\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga riscontrato un errore di " +"scrittura." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Abilita o disabilita comandi interni di shell.\n" +" \n" +" Abilita o disabilita comandi interni di shell. La disabilitazione " +"permette di\n" +" eseguire un comando su disco che abbia lo stesso nome del comando " +"interno\n" +" di shell senza dover usare un nome di percorso completo.\n" +" \n" +" Opzioni:\n" +" -a\tStampa un elenco di comandi interni mostrando se sono abilitati o " +"meno\n" +" -n\tDisabilita ogni NOME o visualizza un elenco di comandi interni " +"disabilitati\n" +" -p\tStampa l'elenco dei comandi interni in un formato riusabile\n" +" -s\tStampa solo i nomi dei comandi interni \"speciali\" Posix\n" +" \n" +" Opzioni che controllano il caricamento dinamico:\n" +" -f\tCarica il comando interno NOME dall'oggetto condiviso NOMEFILE\n" +" -d\tRimuove un comando interno caricato con -f\n" +" \n" +" Senza opzioni viene abilitato ogni NOME.\n" +" \n" +" Per usare il comando \"test\" trovato in $PATH invece di quello interno " +"della\n" +" shell, digitare \"enable -n test\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che NOME non sia un comando interno di shell " +"o si riscontri un errore." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Esegue argomenti come un comando di shell.\n" +" \n" +" Combina gli ARGOMENTI dentro una singola stringa usando il risultato\n" +" come input per la shell ed esegue i comandi risultanti.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita del comando o successo se il comando è " +"nullo." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Analizza gli argomenti di opzione.\n" +" \n" +" Getopts è usato dalle procedure di shell per analizzare i parametri\n" +" posizionali come opzioni.\n" +" \n" +" STRINGAOPZ contiene le lettere di opzione da riconoscere; se una " +"lettera\n" +" è seguita da un due punti, ci si aspetta che l'opzione abbia un " +"argomento,\n" +" che dovrebbe essere separato da uno spazio.\n" +" \n" +" Ogni volta che viene evocato getopts posiziona l'opzione successiva\n" +" nella variabile di shell $nome inizializzando il nome, se non esiste,\n" +" e l'indice dell'argomento successivo da elaborare nella variabile di\n" +" shell OPTIND. OPTIND è inizializzata a 1 ogni volta che viene invocata\n" +" la shell o uno script di shell. Quando una opzione richiede un " +"argomento,\n" +" getopts posiziona tale argomento nella variabile di shell OPTARG.\n" +" \n" +" getopts riporta gli errori in uno o due modi. Se il primo carattere " +"della\n" +" STRINGAOPZ è un due punti, riporta gli errori in silenzio. In questa\n" +" modalità non vengono stampati messaggi di errore. Se viene riscontrata " +"una\n" +" opzione non valida, getopts posiziona il carattere di opzione trovato " +"in\n" +" ARGOPZ. Se un argomento richiesto non viene trovato, getopts posiziona\n" +" un \":\" nel NOME e imposta ARGOPZ al carattere di opzione trovato. Se " +"getopts\n" +" non è in modalità silenziosa e viene riscontrata una opzione non valida, " +"getopts\n" +" posiziona \"?\" nel NOME e azzera ARGOPZ. Se un argomento richiesto non " +"viene\n" +" trovato, viene posizionato un \"?\" nel NOME, ARGOPZ viene azzerato e " +"viene stampato\n" +" un messaggio diagnostico.\n" +" \n" +" Se il valore della variabile di shell ERROPZ è pari a 0, getopts " +"disabilita\n" +" la stampa dei messaggi di errore anche se il primo carattere della " +"STRINGAOPZ\n" +" non è un due punti. Il valore predefinito di ERROPZ è pari a 1.\n" +" \n" +" Getopts normalmente analizza i parametri posizionali ($0 - $9), ma se\n" +" vengono forniti più argomenti, vengono analizzati questi ultimi.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo se viene trovata una opzione, insuccesso se viene " +"raggiunta\n" +" la fine delle opzioni o viene riscontrato un errore." + +#: builtins.c:694 +#, fuzzy +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Sostituisce la shell con il comando fornito.\n" +" \n" +" Esegue il COMANDO, sostituendo questa shell con il programma " +"specificato.\n" +" Gli ARGOMENTI diventano gli argomenti per il COMANDO. Se il COMANDO non " +"è specificato,\n" +" ogni redirezione avrà effetto nella shell corrente.\n" +" \n" +" Opzioni:\n" +" -a nome\tPassa NOME come l'argomento zero per il COMANDO\n" +" -c\t\tEsegue il COMANDO con un ambiente vuoto\n" +" -l\t\tPosiziona un trattino nell'argomento zero per il COMANDO\n" +" \n" +" Se il comando non può essere eseguito una shell non interattiva esce, a " +"meno che\n" +" non venga impostata l'opzione di shell \"execfail\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia trovato il COMANDO o si " +"riscontri un errore di ridirezione." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Esce dalla shell.\n" +" \n" +" Esce dalla shell con uno stato N. Se N è omesso lo stato di uscita\n" +" è quello dell'ultimo comando eseguito." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Esce da una shell di login.\n" +" \n" +" Esce da una shell di login con stato di uscita N. Restituisce un errore " +"se non eseguito\n" +" in una shell di login." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Visualizza o esegue comandi dall'elenco della cronologia.\n" +" \n" +" fc è usato per elencare, modificare e rieseguire comandi dall'elenco " +"della cronologia.\n" +" PRIMO e ULTIMO possono essere numeri che specificano l'intervallo oppure " +"PRIMO può\n" +" essere una stringa, nel qual caso significa il comando più recente che " +"inizia con\n" +" quella stringa.\n" +" \n" +" Opzioni:\n" +" -e EDITOR\tSeleziona l'editor da usare. Il predefinito è FCEDIT, " +"quindi EDITOR,\n" +" \t\tinfine vi\n" +" -l \tElenca le righe invece di modificarle\n" +" -n\tOmette i numeri di riga nell'elencare i comandi\n" +" -r\tInverte l'ordine delle righe (elenca prima le più recenti)\n" +" \n" +" Con il formato \"fc -s [pat=rep ...] [comando]\", il COMANDO è\n" +" rieseguito dopo aver effettuato la sostituzione VECCHIO=NUOVO.\n" +" \n" +" Un alias utile da usare insieme è r=\"fc -s\", in modo che digitando \"r " +"cc\"\n" +" viene eseguito l'ultimo comando che inizia con \"cc\" e digitando \"r\" " +"riesegue\n" +" l'ultimo comando.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo o lo stato del comando eseguito, non zero se si " +"riscontra un errore." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Sposta i job in primo piano.\n" +" \n" +" Mette il job identificato da SPEC_JOB in primo piano, rendendolo il\n" +" job corrente. Se SPEC_JOB non è presente, viene usata la nozione di\n" +" job corrente della shell.\n" +" \n" +" Stato di uscita:\n" +" Stato del comando messo in primo piano, o insuccesso se si riscontra un " +"errore." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Sposta i job sullo sfondo.\n" +" \n" +" Mette il jobs identificato da ogni SPEC_JOB sullo sfondo, come se " +"fossero\n" +" stati avviati con \"&\". Se SPEC_JOB non è presente, viene usata la " +"nozione\n" +" di job corrente della shell.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che il controllo dei job non sia abilitato o " +"si riscontri un errore." + +#: builtins.c:793 +#, fuzzy +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Ricorda o visualizza le posizioni dei programmi.\n" +" \n" +" Determina e ricorda il nome completo di percorso per ogni comando NOME. " +"Se non\n" +" viene fornito alcun argomento, sono visualizzate le informazioni sui " +"comandi memorizzati.\n" +" \n" +" Opzioni:\n" +" -d\t\tDimentica la posizione memorizzata di ogni NOME\n" +" -l\t\tVisualizza in un formato che può essere riusato come input\n" +" -p nomepercorso\tUsa NOMEPERCORSO come il nome completo di percorso " +"per NOME\n" +" -r\t\tDimentica tutte le posizioni memorizzate\n" +" -t\t\tStampa la posizione memorizzata di ogni NOME, facendo\n" +" \t\tprecedere ciascuna posizione con il NOME corrispondente se vengono\n" +" \t\tforniti valori NOME multipli\n" +" Argomenti:\n" +" NOME\t\tOgni NOME è ricercato in $PATH e aggiunto all'elenco\n" +" \t\tdei comandi memorizzati.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia trovato NOME o sia fornita una " +"opzione non valida." + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Visualizza informazioni sui comandi interni.\n" +" \n" +" Visualizza un breve sommario dei comandi interni. Se viene specificato " +"il\n" +" MODELLO fornisce un aiuto dettagliato su tutti i comandi corrispondenti " +"al\n" +" MODELLO, altrimenti viene stampato l'elenco degli argomenti di aiuto.\n" +" \n" +" Opzioni:\n" +" -d\tVisualizza una breve descrizione per ciascun argomento\n" +" -m\tVisualizza l'uso in formato pseudo manpage\n" +" -s\tVisualizza solo una breve sintassi sull'uso per ciascun argomento " +"che\n" +" \tcorrisponde al MODELLO\n" +" \n" +" Argomenti:\n" +" MODELLO\tModello che specifica un argomento di aiuto\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga trovato il MODELLO o sia " +"fornita una opzione non valida." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Visualizza o manipola l'elenco della cronologia.\n" +" \n" +" Visualizza l'elenco della cronologia con i numeri di riga, aggiungendo a " +"ciascuna voce\n" +" modificata il prefisso \"*\". Un argomento pari a N elenca solo le " +"ultime N voci.\n" +" \n" +" Opzioni:\n" +" -c\tPulisce la cronologia eliminando tutte le voci\n" +" -d posiz\tElimina la voce della cronologia alla posizione POSIZ.\n" +" \n" +" -a\tAccoda righe al file della cronologia relative alla sessione " +"attuale\n" +" -n\tLegge tutte le righe non ancora lette dal file della cronologia\n" +" -r\tLegge il file della cronologia e ne accoda il contenuto all'elenco " +"della\n" +" \t\tcronologia\n" +" -w\tScrive la cronologia corrente nel file della cronologia\n" +" \t\te ne accoda le voci all'elenco della cronologia\n" +" \n" +" -p\tEffettua l'espansione della cronologia su ciascun ARG e visualizza " +"il\n" +" \t\trisultato senza memorizzarlo nell'elenco della cronologia\n" +" -s\tAccoda gli ARG all'elenco della cronologia come una voce singola\n" +" \n" +" Se viene fornito il NOMEFILE, viene usato come file della cronologia. " +"Altrimenti,\n" +" se presente, viene usato il valore di $HISTFILE, in alternativa ~/." +"bash_history.\n" +" \n" +" Se la variabile $HISTTIMEFORMAT è impostata e non è nulla, il suo valore " +"viene usato\n" +" come una stringa di formato per strftime(3) per stampare l'orario " +"associato a ciascuna\n" +" voce di cronologia visualizzata. Altrimenti non viene stampato alcun " +"orario.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:879 +#, fuzzy +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Visualizza lo stato dei job.\n" +" \n" +" Elenca i job attivi. SPECJOB limita l'output a quei job.\n" +" Senza opzioni, è visualizzato lo stato di tutti i job attivi.\n" +" \n" +" Opzioni:\n" +" -l\tElenca gli ID dei processi in aggiunta alle normali informazioni\n" +" -n\tElenca solo i processi che hanno cambiato stato dall'ultima\n" +" \tnotifica\n" +" -p\tElenca solo l'ID dei processi\n" +" -r\tLimita l'output ai job in esecuzione\n" +" -s\tLimita l'output ai processi fermati\n" +" \n" +" Se viene fornito -x, il COMANDO è eseguito dopo che tutte le specifiche " +"dei job che\n" +" appaiono in ARGOMENTI sono state rimpiazzate con l'ID del processo " +"leader nel gruppo di\n" +" quel job.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore.\n" +" Se viene usato -x, restituisce lo stato di uscita del COMANDO." + +#: builtins.c:906 +#, fuzzy +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Rimuove job dalla shell corrente.\n" +" \n" +" Rimuove ciascun argomento SPECJOB dalla tabella dei job attivi. Senza " +"alcun\n" +" SPECJOB, la shell usa la sua nozione del job corrente.\n" +" \n" +" Opzioni:\n" +" -a\tRimuove tutti i job se non viene fornito uno SPECJOB\n" +" -h\tMarca ciascun SPECJOB in modo che non venga inviato un SIGHUP al " +"job se la\n" +" \tshell lo riceve\n" +" -r\tRimuove solo i job in esecuzione\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o uno SPECJOB." + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Invia un segnale a un job.\n" +" \n" +" Invia il segnale chiamato dallo SPECSEGN o dal NUMSEGN ai processi " +"identificati\n" +" dal PID o dallo SPECJOB. Se non è presente né lo SPECSEGN né il " +"NUMSEGN, viene\n" +" allora considerato SIGTERM.\n" +" \n" +" Opzioni:\n" +" -s segn\tSEGN è il nome di un segnale\n" +" -n segn\tSEGN è il numero di un segnale\n" +" -l\tElenca i nomi dei segnali; Se ci sono argomenti dopo \"-l\"\n" +" \tvengono valutati come numeri di segnale di cui elencare i nomi\n" +" \n" +" Kill è un comando interno di shell per due ragioni: permette di usare " +"gli ID\n" +" dei job invece degli ID dei processi e permette di uccidere quei " +"processi che\n" +" abbiano raggiunto un numero limite prefissato di processi creabili.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Valuta espressioni aritmetiche.\n" +" \n" +" Valuta ciascun ARG come una espressione aritmetica. La valutazione è " +"effettuata con\n" +" interi a larghezza fissa senza alcun controllo per overflow, sebbene la " +"divisione\n" +" per 0 sia bloccata e contrassegnata come un errore. Il seguente elenco " +"di operatori\n" +" è raggruppato per livelli di operatore di uguale precedenza. I livelli " +"sono elencati\n" +" in ordine di precedenza decrescente.\n" +" \n" +" \tid++, id--\tIncremento e decremento successivo di variabile\n" +" \t++id, --id\tIncremento e decremento precedente di variabile\n" +" \t-, +\t\tMeno e più unari\n" +" \t!, ~\t\tNegazione logica e bit a bit\n" +" \t**\t\tEsponenziazione\n" +" \t*, /, %\t\tMoltiplicazione, divisione, resto\n" +" \t+, -\t\tAddizione, sottrazione\n" +" \t<<, >>\t\tScorrimento bit a bit sinistro e destro\n" +" \t<=, >=, <, >\tComparazione\n" +" \t==, !=\t\tUguaglianza, disuguaglianza\n" +" \t&\t\tAND bit a bit\n" +" \t^\t\tXOR bit a bit\n" +" \t|\t\tOR bit a bit\n" +" \t&&\t\tAND logico\n" +" \t||\t\tOR logico\n" +" \tespr ? espr : espr\n" +" \t\t\tOperatore condizionale\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tAssegnazione\n" +" \n" +" Le variabili di shell sono ammesse come operandi. Il nome della " +"variabile è\n" +" sostituito dal suo valore (forzato a un intero a larghezza fissa) " +"all'interno\n" +" di una espressione. Non è necessario che la variabile abbia il proprio " +"attributo\n" +" intero abilitato per essere usata in una espressione.\n" +" \n" +" Gli operatori sono valutati in ordine di precedenza. Le " +"sottoespressioni tra\n" +" parentesi sono valutate per prime e possono avere la precedenza sulle " +"regole\n" +" sopradescritte.\n" +" \n" +" Stato di uscita:\n" +" Se l'ultimo ARG viene valutato pari a 0 restituisce 1, altrimenti " +"restituisce 0." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Legge una riga dallo standard input e la divide in campi.\n" +" \n" +" Legge una singola riga dallo standard input o, se viene fornita " +"l'opzione -u,\n" +" dal descrittore di file FD. La riga è divisa in campi corrispondenti a\n" +" parole dove la prima parola è assegnata al primo NOME, la seconda " +"parola\n" +" al secondo NOME e così via, con ciascuna parola rimanente assegnata al\n" +" corrispondente ultimo NOME. Sono riconosciuti come delimitatori di " +"parola\n" +" solo quelli presenti in $IFS.\n" +" \n" +" Se non viene fornito alcun NOME, la riga letta è memorizzata nella " +"variabile REPLY.\n" +" \n" +" Opzioni:\n" +" -a array\tAssegna le parole lette agli indici sequenziali della " +"variabile\n" +" \t\tdi ARRAY, iniziando da zero\n" +" -d delim\tContinua fino alla lettura del primo carattere di DELIM, " +"invece\n" +" \t\tdi un ritorno a capo \n" +" -e\t\tUsa Readline per ottenere la riga in una shell interattiva\n" +" -i testo\tUsa TESTO come testo iniziale per Readline\n" +" -n ncarat\tRitorna dopo la lettura di NCARAT caratteri invece di " +"attendere\n" +" \t\tun a capo, ma rispetta un delimitatore se vengono letti meno di\n" +" \t\tNCARAT caratteri prima del delimitatore stesso\n" +" -N ncarat\tRitorna solo dopo la lettura di NCARAT caratteri esatti, a " +"meno che non si\n" +" \t\triscontri un EOF o un time out di lettura, ignorando qualsiasi " +"delimitatore\n" +" -p stringa\tVisualizza la stringa PROMPT senza un a capo finale prima\n" +" \t\tdel tentativo di lettura\n" +" -r\t\tNon ammette backslash per fare l'escape dei caratteri\n" +" -s\t\tNon fa l'echo dell'input proveniente da un terminale\n" +" -t secondi\tVa in timeout e restituisce insuccesso se non viene letta " +"una\n" +" \t\triga di input completa entro i SECONDI forniti. Il valore della\n" +" \t\tvariabile TMOUT è il timeout predefinito. SECONDI può essere\n" +" \t\tuna frazione. Se SECONDI è pari a 0, la lettura restituisce " +"successo\n" +" \t\tsolo se l'input è disponibile sul descrittore di file specificato. " +"Lo\n" +" \t\tstato di uscita è maggiore di 128 se viene superato il timeout\n" +" -u fd\t\tLegge dal descrittore di file FD invece che dallo standard " +"input\n" +" \n" +" Stato di uscita:\n" +" Il codice restituito è zero a meno che non sia riscontrato un EOF, un " +"timeout in lettura\n" +" o venga fornito un descrittore di file non valido come argomento per -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Ritorna da una funzione di shell.\n" +" \n" +" Causa l'uscita da una funzione o da uno script sorgente con il valore " +"di\n" +" ritorno specificato da N. Se N è omesso, lo stato di ritorno è quello\n" +" dell'ultimo comando eseguito all'interno della funzione o dello script.\n" +" \n" +" Stato di uscita:\n" +" Restituisce N, oppure insuccesso se la shell non sta eseguendo una " +"funzione o uno script." + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Imposta o azzera i valori delle opzioni di shell e dei parametri " +"posizionali.\n" +" \n" +" Cambia il valore degli attributi di shell e dei parametri posizionali, " +"o\n" +" visualizza i nomi e i valori delle variabili di shell.\n" +" \n" +" Opzioni:\n" +" -a Marca le variabili che sono modificate o create per " +"l'esportazione.\n" +" -b Notifica immediatamente della terminazione di un job.\n" +" -e Esce immediatamente se un comando esce con uno stao diverso da " +"zero.\n" +" -f Disabilita la generazione dei nomi file (globbing).\n" +" -h Ricorda la posizione dei comandi quando vengono cercati.\n" +" -k Tutte le assegnazioni degli argomenti sono posizionate " +"nell'ambiente per un\n" +" comando, non solo quelle che precedono il nome del comando " +"stesso.\n" +" -m Abilita il controllo dei job.\n" +" -n Legge i comandi senza eseguirli.\n" +" -o nome-opzione\n" +" Imposta la variabile corrispondente al nome dell'opzione:\n" +" allexport Uguale a -a\n" +" braceexpand Uguale a -B\n" +" emacs Usa una interfaccia di modifica righe di stile " +"emacs\n" +" errexit Uguale a -e\n" +" errtrace Uguale a -E\n" +" functrace Uguale a -T\n" +" hashall Uguale a -h\n" +" histexpand Uguale a -H\n" +" history Abilita la cronologia comandi\n" +" ignoreeof Non esce dalla shell dopo aver raggiunto EOF\n" +" interactive-comments\n" +" Permette ai commenti di comparire nei comandi " +"interattivi\n" +" keyword Uguale a -k\n" +" monitor Uguale a -m\n" +" noclobber Uguale a -C\n" +" noexec Uguale a -n\n" +" noglob Uguale a -f\n" +" nolog Accettato al momento ma ignorato\n" +" notify Uguale a -b\n" +" nounset Uguale a -u\n" +" onecmd Uguale a -t\n" +" physical Uguale a -P\n" +" pipefail Il valore restituito da una pipeline è lo stato\n" +" dell'ultimo comando che esce con uno stato " +"diverso da zero,\n" +" oppure zero se nessun comando esce con uno stato " +"diverso da zero\n" +" posix Modifica il comportamento di bash dove " +"l'operazione\n" +" predefinita è diversa dallo standard Posix per " +"rispettare\n" +" lo standard stesso\n" +" privileged Uguale a -p\n" +" verbose Uguale a -v\n" +" vi Usa un'editor di riga stile vi\n" +" xtrace Uguale a -x\n" +" -p Abilitato ogni qualvolta gli id utente reali non corrispondono a " +"quelli effettivi.\n" +" Disabilita l'analisi del file $ENV e l'importazione delle funzioni " +"di\n" +" shell. Disabilitare questa opzione comporta l'impostazione degli\n" +" uid e gid effettivi a uid e gid reali.\n" +" -t Esce dopo la lettura e l'esecuzione di un comando.\n" +" -u Tratta le variabili non impostate come un errore durante la " +"sostituzione.\n" +" -v Stampa le righe di input della shell mentre vengono lette.\n" +" -x Stampa i comandi e i loro argomenti mentre vengono eseguiti.\n" +" -B La shell effettua l'espansione delle parentesi graffe\n" +" -C Se impostata, non permette la sovrascrittura dei file regolari " +"esistenti\n" +" da parte della redirezione dell'output.\n" +" -E Se impostata, la trap ERR è ereditata dalle funzioni di shell.\n" +" -H Abilita la sostituzione per la cronologia stile !. Questo flag è " +"abilitato\n" +" in modo predefinito quando la shell è interattiva.\n" +" -P Se impostata, non segue i link simbolici quando vengono eseguiti " +"dei comandi\n" +" come cd, il quale cambia la directory corrente.\n" +" -T Se impostata, la trap DEBUG è ereditata dalle funzioni di shell.\n" +" -- Assegna tutti gli argomenti rimasti ai parametri posizionali.\n" +" Se non sono rimasti argomenti, i parametri posizionali\n" +" vengono azzerati.\n" +" - Assegna tutti gli argomenti rimasti ai parametri posizionali.\n" +" Le opzioni -x e -v sono disabilitate.\n" +" \n" +" Usando + al posto di - questi flag vengono disabilitati. I\n" +" flag possono anche essere usati subito dopo l'invocazione della shell. " +"Il set corrente\n" +" dei flag può essere trovato in $-. I restanti n ARG sono parametri\n" +" posizionali e vengono assegnati, in ordine, a $1, $2, .. $n. Se non\n" +" vengono forniti ARG, vengono stampate tutte le variabili di shell.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida." + +#: builtins.c:1139 +#, fuzzy +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Azzera i valori e gli attributi delle variabili e delle funzioni di shell.\n" +" \n" +" Per ciascun NOME, rimuove la corrispondente variabile o funzione.\n" +" \n" +" Opzioni:\n" +" -f\tConsidera ciascun NOME come una funzione di shell\n" +" -v\tConsidera ciascun NOME come una variabile di shell\n" +" \n" +" Senza opzioni, unset prova prima ad azzerare una variabile e, in caso di " +"insuccesso,\n" +" prova ad azzerare una funzione.\n" +" \n" +" Alcune variabili non possono essere azzerate; vedere anche \"readonly" +"\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"NOME sia in sola lettura." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Imposta l'attributo di esportazione per le variabili di shell.\n" +" \n" +" Marca ciascun NOME per l'esportazione automatica all'ambiente dei " +"comandi\n" +" eseguiti successivi. Se è fornito un VALORE, lo assegna prima " +"dell'esportazione.\n" +" \n" +" Opzioni:\n" +" -f\tRimanda alle funzioni di shell\n" +" -n\tRimuove la proprietà di esportazione da ciascun NOME\n" +" -p\tVisualizza un elenco di tutte le variabili e funzioni esportate\n" +" \n" +" L'argomento \"--\" disabilita l'elaborazione di ulteriori opzioni.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"il NOME non sia valido." + +#: builtins.c:1180 +#, fuzzy +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marca la variabili di shell come non modificabili.\n" +" \n" +" Marca ciascun NOME in sola lettura; i valori di questi NOMI non possono\n" +" essere modificati da un assegnamento successivo. Se viene fornito il\n" +" VALORE, lo assegna prima di marcarlo in sola lettura.\n" +" \n" +" Opzioni:\n" +" -a\tRimanda alle variabili degli array indicizzati\n" +" -A\tRimanda alle variabili degli array associativi\n" +" -f\tRimanda alle funzioni di shell\n" +" -p\tVisualizza un elenco di tutte le variabili e le funzioni in sola " +"lettura\n" +" \n" +" Un argomento pari a \"--\" disabilita ulteriori analisi delle opzioni.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o NOME non sia valido." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Sposta i parametri posizionali.\n" +" \n" +" Rinomina i parametri posizionali $N+1,$N+2 ... a $1,$2 ... Se N non\n" +" è fornito, viene assunto a 1.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che N non sia negativo o maggiore di $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Esegue comandi da un file nella shell corrente.\n" +" \n" +" Legge ed esegue comandi da NOMEFILE nella shell corrente. Le voci\n" +" in $PATH sono usate per trovare la directory contenente il NOMEFILE.\n" +" Se vengono forniti ARGOMENTI, essi diventano i parametri di posizione\n" +" quando viene eseguito NOMEFILE.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito in NOMEFILE; " +"insuccesso se\n" +" il NOMEFILE non può essere letto." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Sospende l'esecuzione della shell.\n" +" \n" +" Sospende l'esecuzione di questa shell fino a che non riceve un segnale " +"SIGCONT.\n" +" A meno di forzature, le shell di login non possono essere sospese.\n" +" \n" +" Opzioni:\n" +" -f\tForza la sospensione, anche se in presenza di una shell di login\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia abilitato il controllo job o si " +"riscontri un errore." + +#: builtins.c:1261 +#, fuzzy +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Analizza espressioni condizionali.\n" +" \n" +" Esce con stato 0 (vero) o 1 (falso) in base all'analisi\n" +" dell'ESPR. Le espressioni possono essere unarie o binarie. Le\n" +" espressioni unarie sono spesso usate per esaminare lo stato di un file.\n" +" Esistono anche operatori di stringa e di comparazione numerica.\n" +" \n" +" Il comportamento del test dipende dal numero degli argomenti. Leggere\n" +" la pagina di manuale di bash per le specifiche complete.\n" +" \n" +" Operatori su file:\n" +" \n" +" -a FILE Vero se il file esiste.\n" +" -b FILE Vero se è un file speciale a blocchi.\n" +" -c FILE Vero se è un file speciale a caratteri.\n" +" -d FILE Vero se il file è una directory.\n" +" -e FILE Vero se il file esiste.\n" +" -f FILE Vero se il file esiste ed è un file regolare.\n" +" -g FILE Vero se il file è un set-group-id.\n" +" -h FILE Vero se il file è un link simbolico.\n" +" -L FILE Vero se il file è un link simbolico.\n" +" -k FILE Vero se il file ha il suo bit \"sticky\" impostato.\n" +" -p FILE Vero se il file è una pipe con nome.\n" +" -r FILE Vero se il file è leggibile dall' utente corrente.\n" +" -s FILE Vero se il file esiste e non è vuoto.\n" +" -S FILE Vero se il file è un socket.\n" +" -t FD Vero se il descrittore di file è aperto su un " +"terminale.\n" +" -u FILE Vero se il file è un set-user-id.\n" +" -w FILE Vero se il file è scrivibile dall'utente corrente.\n" +" -x FILE Vero se il file è eseguibile dall'utente corrente.\n" +" -O FILE Vero se l'utente corrente è il reale proprietario del " +"file.\n" +" -G FILE Vero se il gruppo dell'utente corrente è il reale " +"proprietario del file.\n" +" -N FILE Vero se il file è stato modificato dall'ultima volta " +"che è stato letto.\n" +" \n" +" FILE1 -nt FILE2 Vero se il file1 è più recente del file2 (in accordo " +"con la\n" +" data di modifica).\n" +" \n" +" FILE1 -ot FILE2 Vero se il file1 è più vecchio del file2.\n" +" \n" +" FILE1 -ef FILE2 Vero se il file1 è un link hardware al file2.\n" +" \n" +" Operatori di stringa:\n" +" \n" +" -z STRINGA Vero se la stringa e vuota.\n" +" \n" +" -n STRINGA\n" +" STRINGA Vero se la stringa non è vuota.\n" +" \n" +" STRINGA1 = STRINGA2\n" +" Vero se le stringhe sono uguali.\n" +" STRINGA1 != STRINGA2\n" +" Vero se le stringhe non sono uguali.\n" +" STRINGA1 < STRINGA2\n" +" Vero se la STRINGA1 viene ordinata lessicograficamente " +"prima della STRINGA2.\n" +" STRINGA1 > STRINGA2\n" +" Vero se la STRINGA1 viene ordinata lessicograficamente " +"dopo la STRINGA2.\n" +" \n" +" Altri operatori:\n" +" \n" +" -o OPZIONE Vero se l'OPZIONE di shell è abilitata.\n" +" -v VAR\t Vero se la variabile di shell VAR è impostata.\n" +" ! ESPR Vero se l'ESPR è falsa.\n" +" ESPR1 -a ESPR2 Vero se entrambe le espressioni espr1 E espr2 sono " +"vere.\n" +" ESPR1 -o ESPR2 Vero se sono vere le espressioni espr1 O espr2.\n" +" \n" +" arg1 OP arg2 Test aritmetici. OP è uno tra -eq, -ne,\n" +" -lt, -le, -gt oppure -ge.\n" +" \n" +" Gli operatori aritmetici binari restituiscono vero se ARG1 è uguale, non " +"uguale,\n" +" più piccolo di, più piccolo o uguale, più grande di o più grande o " +"uguale\n" +" ad ARG2.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo se l'ESPR viene valutata vera; insuccesso se l'ESPR " +"viene valutata\n" +" falsa o viene fornito un argomento non valido." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Valuta l'espressione condizionale.\n" +" \n" +" Questo è un sinonimo del comando interno \"test\", ma l'ultimo argomento " +"deve\n" +" essere un \"]\" letterale per corrispondere al \"[\" di apertura." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Visualizza le durate dei processi.\n" +" \n" +" Stampa i tempi utente e di sistema accumulati per la shell e per tutti " +"i\n" +" relativi processi figli.\n" +" \n" +" Stato di uscita:\n" +" Sempre successo." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Esegue il trap dei segnali e di altri eventi.\n" +" \n" +" Definisce e attiva i gestori da eseguire quando la shell riceve segnali\n" +" o altre condizioni.\n" +" \n" +" ARG è un comando da leggere ed eseguire quando la shell riceve il o i\n" +" segnali SPEC_SEGNALE. Se ARG o \"-\" non sono presenti (e viene " +"fornito\n" +" un singolo SPEC_SEGNALE), ciascun segnale specificato è riportato\n" +" al suo valore originario. Se ARG è pari a null, ogni SPEC_SEGNALE è\n" +" ignorato dalla shell e dai comandi che invoca.\n" +" \n" +" Se uno SPEC_SEGNALE è EXIT (0) ARG viene eseguito all'uscita dalla " +"shell. Se\n" +" lo SPEC_SEGNALE è DEBUG, ARG viene eseguito prima di ogni comando " +"semplice. Se\n" +" uno SPEC_SEGNALE è RETURN, ARG viene eseguito al termine di ogni " +"esecuzione\n" +" di una funzione di shell o di uno script avviato dai comandi interni . o " +"source.\n" +" Un SPEC_SEGNALE di ERR significa eseguire ARG ogni volta che un errore " +"di comando\n" +" causi l'uscita della shell quando è abilitata l'opzione -e.\n" +" \n" +" Se non vengono forniti argomenti, trap stampa l'elenco di comandi " +"associati\n" +" a ciascun segnale.\n" +" \n" +" Ozioni:\n" +" -l\tStampa un elenco di nomi di segnale e i loro corrispondenti " +"numeri\n" +" -p\tVisualizza i comandi trap associati a ciascun SPEC_SEGNALE\n" +" \n" +" Ciascun SPEC_SEGNALE è un nome di segnale in oppure un numero " +"di segnale.\n" +" I nomi di segnale sono case insensitive e il prefisso SIG è opzionale. " +"Per\n" +" inviare un segnale alla shell usare \"kill -signal $$\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che SPEC_SEGNALE non sia valido o si " +"fornisca una opzione non valida." + +#: builtins.c:1400 +#, fuzzy +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Visualizza informazioni sul tipo di comando.\n" +" \n" +" Per ciascun NOME, indica come sarebbe interpretato se fosse usato come\n" +" un nome di comando.\n" +" \n" +" Opzioni:\n" +" -a\tVisualizza tutte le posizioni contenenti un eseguibile chiamato " +"NOME,\n" +" \tincludendo alias, comandi interni e funzioni se e solo se\n" +" \tnon viene usata anche l'opzione \"-p\"\n" +" -f\tNon esegue la ricerca delle funzioni di shell\n" +" -P\tForza una ricerca del PERCORSO per ciascun NOME anche se è un " +"alias,\n" +" \tun comando interno o una funzione, e restituisce il nome del file su " +"disco\n" +" \tche sarebbe eseguito\n" +" -p\tRestituisce o il nome del file su disco che sarebbe eseguito,\n" +" \toppure niente se \"type -t NOME\" non restituisce \"file\".\n" +" -t\tVisualizza una singola parola che è una tra \"alias\", \"keyword" +"\",\n" +" \t\"function\", \"builtin\", \"file\" or \"\", se il NOME è " +"rispettivamente un alias,\n" +" \tuna parola riservata di shell, una funzione di shell, un comando " +"interno di shell,\n" +" \tun file su disco o non trovato\n" +" \n" +" Argomenti:\n" +" NOME\tIl nome del comando da interpretare.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo se tutti i NOMI vengono trovati; insuccesso in caso " +"contrario." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modifica i limiti delle risorse di shell.\n" +" \n" +" Fornisce il controllo sulle risorse disponibili per la shell e per i " +"processi\n" +" che crea, sui sistemi che permettono tale controllo.\n" +" \n" +" Opzioni:\n" +" -S\tUsa il limite di risorse \"leggero\"\n" +" -H\tUsa il limite di risorse \"pesante\"\n" +" -a\tRiporta tutti i limiti correnti\n" +" -b\tLa dimensione del buffer del socket\n" +" -c\tLa dimensione massima dei file di core creati\n" +" -d\tLa dimensione massima di un segmento di dati di processo\n" +" -e\tLa priorità massima di scheduling (\"nice\")\n" +" -f\tLa dimensione massima dei file scritti dalla shell e dai suoi " +"figli\n" +" -i\tIl numero massimo di segnali pendenti\n" +" -l\tLa dimensione massima di memoria che un processo può impegnare\n" +" -m\tIl numero massimo di set residenti\n" +" -n\tIl numero massimo di descrittori di file aperti\n" +" -p\tLa dimensione del buffer della pipe\n" +" -q\tIl numero massimo di byte nelle code messaggi POSIX\n" +" -r\tLa priorità massima di scheduling in tempo reale\n" +" -s\tLa dimensione massima dello stack\n" +" -t\tLa quantità massima di tempo CPU in secondi\n" +" -u\tIl numero massimo di processi utente\n" +" -v\tLa dimensione della memoria virtuale\n" +" -x\tIl numero massimo di lock dei file\n" +" \n" +" Se viene fornito un LIMITE, sarà il nuovo valore della risorsa " +"specificata;\n" +" I valori LIMITE speciali \"soft\", \"hard\" e \"unlimited\" " +"corrispondono\n" +" rispettivamente agli attuali limiti leggero, pesante e senza limite.\n" +" Altrimenti viene stampato il valore attuale della risorsa specificata. " +"Se\n" +" non viene fornita alcuna opzione, viene assunta -f.\n" +" \n" +" I valori sono ad incrementi di 1024-byte, ad eccezione di -t che è in " +"secondi,\n" +" -p che è ad incrementi di 512 byte e -u che è un numero di processi non\n" +" scalato.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o venga riscontrato un errore." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Visualizza o imposta la maschera del modo file.\n" +" \n" +" Imposta la maschera di creazione file dell'utente su MODO. Se MODO " +"viene omesso, stampa\n" +" il valore corrente della maschera.\n" +" \n" +" Se MODO inizia con una cifra, è interpretato con un numero ottale;\n" +" altrimenti come una stringa di modo simbolico come quella accettata da " +"chmod(1).\n" +" \n" +" Opzioni:\n" +" -p\tSe MODO viene omesso, mostra in una forma che possa essere riusata " +"come input\n" +" -S\tRende simbolico l'output; altrimenti viene mostrato un numero " +"ottale\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che MODO non sia valido o venga fornita una " +"opzione non valida." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Attende il completamento del job restituendo lo stato di uscita.\n" +" \n" +" Attende il processo identificato dall'ID, che può essere un ID di " +"processo o\n" +" una specifica di job, riportando il suo stato di termine. Se non è\n" +" fornito un ID, attende tutti i processi figlio correntemente attivi, " +"restituendo\n" +" zero come stato. Se l'ID è una specifica di job, attende tutti i " +"processi\n" +" presenti nella pipeline del job.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ID; insuccesso se l'ID non è valido o viene " +"fornita una\n" +" opzione non valida." + +#: builtins.c:1533 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Attende il completamento del processo e restituisce lo stato di uscita.\n" +" \n" +" Attende per il processo specificato e riporta il suo stato di " +"terminazione. Se non\n" +" viene fornito il PID, l'attesa comprende tutti i processi figlio " +"correntemente attivi\n" +" e il codice restituito è zero. Il PID deve essere un ID di processo.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ID; insuccesso se l'ID non è valido o viene " +"fornita una opzione non\n" +" valida." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Esegue comandi per ciascun membro di un elenco.\n" +" \n" +" Il ciclo \"for\" esegue una sequenza di comandi per ciascun membro di " +"un\n" +" elenco di voci. Se \"in PAROLE ...;\" non è presente, allora viene " +"assunto\n" +" \"in \"$@\"\". Per ciascun elemento in PAROLE, NOME è impostato a " +"quell'elemento e\n" +" i COMANDI vengono eseguiti.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ciclo \"for\" aritmetico.\n" +" \n" +" Equivalente a\n" +" \t(( ESPR1 ))\n" +" \twhile (( ESPR2 )); do\n" +" \t\tCOMANDI\n" +" \t\t(( ESPR3 ))\n" +" \tdone\n" +" ESPR1, ESPR2 e ESPR3 sono espressioni aritmetiche. Se viene omessa " +"qualche\n" +" espressione, si comporta come se valesse 1.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Seleziona le parole da un elenco ed esegue i comandi.\n" +" \n" +" Le PAROLE vengono estese, generando un elenco di parole. L'insieme\n" +" di parole estese viene stampato sullo standard error, ognuna delle\n" +" quali preceduta da un numero. Se non è presente \"in PAROLE\", viene\n" +" assunto `in \"$@\". Viene poi visualizzato il prompt PS3 e viene letta\n" +" una riga dallo standard input. Se la riga è composta dal numero che\n" +" corrisponde a una delle parole visualizzate, NOME è impostato a quella\n" +" parola. Se la riga è vuota, Le PAROLE e il prompt vengono " +"rivisualizzati.\n" +" Se viene letto EOF, il comando termina. Se vengono letti altri valori\n" +" NOME viene impostato a null. La riga letta viene salvata nella " +"variabile\n" +" REPLY. I COMANDI vengono eseguiti dopo ogni selezione finché non viene\n" +" eseguito un comando di interruzione.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita dell'ultimo comando eseguito." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Riporta il tempo speso nell'esecuzione della pipeline.\n" +" \n" +" Esegue la PIPELINE e stampa, quando termina, un sommario del tempo " +"reale, tempo utente della CPU\n" +" e tempo di sistema della CPU dedicato all'esecuzione della PIPELINE.\n" +" \n" +" Opzioni:\n" +" -p\tStampa il riepilogo dei tempi nel formato portabile Posix format\n" +" \n" +" Il valore della variabile TIMEFORMAT è usato come formato di output.\n" +" \n" +" Stato di uscita:\n" +" Viene restituito lo stato della PIPELINE." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Esegue comandi basati sulla corrispondenza di modello.\n" +" \n" +" Esegue in modo selettivo COMANDI basati sulla PAROLA corrispondente al " +"MODELLO. Il\n" +" carattere \"|\" è usato per separare modelli multipli.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Esegue comandi basati su condizioni.\n" +" \n" +" Viene eseguito l'elenco degli \"if COMANDI\". Se lo stato di uscita è " +"zero\n" +" viene eseguito l'elenco \"then COMANDI\", altrimenti viene eseguito " +"l'elenco\n" +" degli \"elif COMANDI\" e, se il loro stato è zero, viene eseguito " +"l'elenco dei\n" +" \"then COMANDI\" corrispondente e viene completato l'\"if COMANDO\". " +"Altrimenti,\n" +" viene eseguito l'elenco \"else COMANDI\", se presente. Lo stato di " +"uscita\n" +" dell'intero costrutto corrisponde a quello dell'ultimo comando eseguito, " +"o\n" +" zero se nessuna condizione provata è vera.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Esegue i comandi finché un test ha successo.\n" +" \n" +" Espande ed esegue i COMANDI fino a quando il comando finale nei\n" +" COMANDI \"while\" ha uno stato di uscita pari a zero.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Esegue i comandi finché un test non ha successo.\n" +" \n" +" Espande ed esegue i COMANDI fino a quando il comando finale nei\n" +" COMANDI \"until\" ha uno stato di uscita diverso da zero.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Crea un coprocesso chiamato NOME.\n" +" \n" +" Esegue il COMANDO in modo asincrono, con lo standard output e lo " +"standard\n" +" input del comando connessi attraverso una pipe ai descrittori di file " +"assegnati\n" +" agli indici 0 e 1 di una variabile di array NOME nella shell in " +"esecuzione.\n" +" Il NOME predefinito è \"COPROC\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita del COMANDO." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Definisce una funzione di shell.\n" +" \n" +" Crea una funzione di shell chiamata NOME. Quando invocato come un " +"semplice comando,\n" +" NOME esegue i COMANDI nel contesto delle chiamate di shell. Quando " +"viene invocato NOME,\n" +" gli argomenti sono passati alla funzione come $1...$n e il nome della " +"funzione si trova\n" +" in $FUNCNAME.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che il NOME non sia in sola lettura." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Raggruppa i comandi come un'unità.\n" +" \n" +" Esegue un set di comandi in un gruppo. Questo è un modo per " +"reindirizzare un\n" +" intero set di comandi.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Ripristina un job in primo piano.\n" +" \n" +" Equivale all'argomento SPEC_JOB per il comando \"fg\". Ripristina\n" +" un job fermato o sullo sfondo. SPEC_JOB può specificare un nome\n" +" job o un numero di job. SPEC_JOB seguito da \"&\" mette il job\n" +" sullo sfondo, come se la specifica del job fosse stata fornita\n" +" come argomento per \"bg\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato del job ripristinato." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Valuta espressioni aritmetiche.\n" +" \n" +" L'ESPRESSIONE è valutata seguendo le regole di valutazione\n" +" aritmetica. Equivalente a \"let ESPRESSIONE\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce 1 se ESPRESSIONE è valutata 0, altrimenti restituisce 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Esegue comandi condizionali.\n" +" \n" +" Resituisce uno stato di 0 o 1 a seconda della valutazione " +"dell'espressione\n" +" condizionale ESPRESSIONE. Le espressioni sono composte dalle stesse " +"basilari usate\n" +" dal comando interno \"test\", e possono essere combinate usando i " +"seguenti operatori:\n" +" \n" +" ( ESPRESSIONE )\tRestituisce il valore dell'ESPRESSIONE\n" +" ! ESPRESSIONE\t\tVero se l'ESPRESSIONE è falsa; falso in caso " +"contrario\n" +" ESPR1 && ESPR2\tVero se sia ESPR1 che ESPR2 sono vere; falso in caso " +"contrario\n" +" ESPR1 || ESPR2\tVero se una tra ESPR1 ed ESPR2 è vera; falso in caso " +"contrario\n" +" \n" +" Quando vengono usati gli operatori \"==\" e \"!=\", la stringa a destra " +"dell'operatore\n" +" è usata come un modello e ne viene effettuata la corrispondenza.\n" +" Quando viene usato l'operatore \"=~\", la stringa a destra " +"dell'operatore è valutata\n" +" corrispondente a un'espressione regolare.\n" +" \n" +" Gli operatori && e || non valutano ESPR2 se ESPR1 è sufficiente a\n" +" determinare il valore dell'espressione.\n" +" \n" +" Stato di uscita:\n" +" 0 o 1 a seconda del valore dell'ESPRESSIONE." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Nomi e usi comuni delle variabili di shell.\n" +" \n" +" BASH_VERSION\tInformazioni sulla versione di Bash.\n" +" CDPATH\tUn elenco di directory da cercare separate da un due punti\n" +" \tfornite come argomenti per \"cd\".\n" +" GLOBIGNORE\tUn elenco di modelli separato da un due punti che descrivono " +"i nomi\n" +" \t\tdi file che devono essere ignorati dall'espansione di percorso.\n" +" HISTFILE\tIl nome del file in cui è memorizzata la cronologia dei " +"comandi.\n" +" HISTFILESIZE\tIl numero massimo di righe che può contenere questo file.\n" +" HISTSIZE\tIl numero massimo di righe di cronologia a cui può accedere\n" +" \t\tuna shell in esecuzione.\n" +" HOME\tIl nome completo del percorso della propria directory di login.\n" +" HOSTNAME\tIl nome dell'host corrente.\n" +" HOSTTYPE\tIl tipo di CPU sulla quale è in esecuzione questa versione di " +"bash.\n" +" IGNOREEOF\tControlla il comportamento della shell quando riceve un " +"carattere EOF\n" +" \t\tcome unico input. Se impostato, il suo valore corrisponde al " +"numero\n" +" \t\tdi caratteri EOF che si possono trovare in una fila in una riga " +"vuota\n" +" \t\tprima che la shell esca (predefinito 10). Quando viene azzerato, " +"EOF\n" +" \t\tindica la fine dell'input.\n" +" MACHTYPE\tUna stringa che descrive l'attuale sistema dove è in " +"esecuzione bash.\n" +" MAILCHECK\tQuanto spesso, in secondi, Bash controlla la presenza di " +"nuova posta.\n" +" MAILPATH\tUn elenco di nomi di file separati da un due punti usati da " +"Bash per\n" +" \t\tcontrollare la presenza di nuova posta.\n" +" OSTYPE\tLa versione di Unix sulla quale è in esecuzione questa versione " +"di bash.\n" +" PATH\tUn elenco di directory, separato da un due punti, da analizzare " +"quando\n" +" \t\tsi cercano i comandi.\n" +" PROMPT_COMMAND\tUn comando da eseguire prima della stampa di ciascun " +"prompt\n" +" \t\tprimario.\n" +" PS1\t\tLa stringa del prompt primario.\n" +" PS2\t\tLa stringa del prompt secondario.\n" +" PWD\t\tIl nome completo del percorso della directory corrente.\n" +" SHELLOPTS\tUn elenco di opzioni di shell abilitate, separate da un due " +"punti.\n" +" TERM\tIl nome del tipo di terminale corrente.\n" +" TIMEFORMAT\tIl formato di output per le statistiche temporali " +"visualizzato dalla\n" +" \t\tparola riservata \"time\".\n" +" auto_resume\tNon null significa che una parola di un comando che compare " +"da\n" +" \t\taol in una riga viene prima cercata nell'elenco dei job correnti\n" +" \t\tfermati. Se trovato, questo job viene messo in primo piano.\n" +" \t\tUn valore pari a \"exact\" significa che la parola del comando deve\n" +" \t\tcorrispondere esattamente a un comando nell'elenco dei job fermati. " +"Un\n" +" \t\tvalore pari a \"substring\" significa che la parola del comando " +"deve\n" +" \t\tcorrispondere a una sottostringa del job. Qualsiasi altro valore " +"significa\n" +" \t\tche il comando deve essere un prefisso di un lavoro fermato.\n" +" histchars\tCaratteri che controllano l'espansione della cronologia e la " +"sostituzione\n" +" \t\trapida. Il primo carattere è quello di sostituzione della " +"cronologia,\n" +" \t\tsolitamente \"!\". Il secondo è il carattere di \"sostituzione " +"rapida\",\n" +" \t\tsolitamente \"^\". Il terzo è il carattere di \"commento della " +"cronologia\",\n" +" \t\tsolitamente \"#\".\n" +" HISTIGNORE\tUn elenco di modelli separato da un due punti usato per " +"decidere quale\n" +" \t\tcomando dovrebbe essere salvato nell'elenco della cronologia.\n" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Aggiunge directory allo stack.\n" +" \n" +" Aggiunge una directory in cima allo stack delle directory o ruota lo\n" +" stack stesso, mettendo come primo elemento la directory di lavoro\n" +" corrente. Senza argomenti scambia le prime due directory in cima.\n" +" \n" +" Opzioni:\n" +" -n\tEvita il normale cambio di directory quando vengono aggiunte\n" +" \tdirectory allo stack, così da manipolare solo lo stack stesso.\n" +" \n" +" Argomenti:\n" +" +N\tRuota lo stack in modo che l'N-sima directory (contando\n" +" \ta partire da sinistra dell'elenco mostrato da \"dirs\", iniziando da\n" +" \tzero) sia in cima.\n" +" \n" +" -N\tRuota lo stack in modo che l'N-sima directory (contando\n" +" \ta partire da destra dell'elenco mostrato da \"dirs\", iniziando da\n" +" \tzero) sia in cima.\n" +" \n" +" dir\tAggiunge DIR in cima allo stack delle directory, facendone la\n" +" \tdirectory di lavoro corrente.\n" +" \n" +" Il comando interno \"dirs\" mostra lo stack delle directory.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornito un argomento valido o " +"non abbia\n" +" successo il cambio di directory." + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Rimuove directory dallo stack.\n" +" \n" +" Rimuove voci dallo stack delle directory. Senza argomenti, rimuove\n" +" la directory in cima allo stack e cambia alla nuova prima directory.\n" +" \n" +" Opzioni:\n" +" -n\tEvita il normale cambio di directory quando vengono rimosse\n" +" \tdirectory dallo stack, così da manipolare solo lo stack stesso.\n" +" \n" +" Argomenti:\n" +" +N\tRimuove l'N-sima voce contando a partire da sinistra dell'elenco\n" +" \tmostrato da \"dirs\", iniziando da zero. Per esempio: \"popd +0\"\n" +" \trimuove la prima directory, \"popd +1\" la seconda.\n" +" \n" +" -N\tRimuove l'N-sima voce contando a partire da destra dell'elenco\n" +" \tmostrato da \"dirs\", iniziando da zero. Per esempio: \"popd -0\"\n" +" \trimuove l'ultima directory, \"popd -1\" la penultima.\n" +" \n" +" Il comando interno \"dirs\" mostra lo stack delle directory.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornito un argomento non " +"valido o non\n" +" abbia successo il cambio di directory." + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Visualizza lo stack delle directory.\n" +" \n" +" Visualizza l'elenco delle directory ricordate attualmente. Le directory\n" +" vengono inserite nell'elenco con il comando \"pushd\"; è possibile\n" +" andare a ritroso nell'elenco con il comando \"popd\".\n" +" \n" +" Opzioni:\n" +" -c\tPulisce lo stack delle directory eliminandone tutti gli elementi\n" +" -l\tNon stampa le directory con prefisso tilde relative alla propria\n" +" \tdirectory home\n" +" -p\tStampa lo stack delle directory una voce per riga\n" +" -v\tStampa lo stack delle directory una voce per riga usando come\n" +" \tprefisso la posizione nello stack\n" +" \n" +" Argomenti:\n" +" +N\tMostra l'N-sima voce contando a partire da sinistra dell'elenco\n" +" \tmostrato da dirs quando invocato senza opzioni, iniziando da zero.\n" +" \n" +" -N\tMostra l'N-sima voce contando a partire da destro dell'elenco\n" +" \tmostrato da dirs quando invocato senza opzioni, iniziando da zero.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita un'opzione non valida o " +"si riscontri un errore." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Imposta le opzioni della shell.\n" +" \n" +" Cambia le impostazioni di ciascuna opzione di shell NOMEOPZ. Senza " +"argomenti\n" +" per le opzioni, elenca tutte le opzioni di shell indicando se sono o non " +"sono\n" +" impostate.\n" +" \n" +" Opzioni:\n" +" -o\tLimita i NOMEOPZ a quelli definiti per essere usati con \"set -o" +"\"\n" +" -p\tStampa ogni opzione di shell indicando il relativo stato\n" +" -q\tNon stampa l'output\n" +" -s\tAbilita (imposta) ciascun NOMEOPZ\n" +" -u\tDisabilita (elimina) ciascun NOMEOPZ\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo se NOMEOPZ è abilitato; insuccesso se viene " +"fornita\n" +" una opzione non valida o NOMEOPZ è disabilitato." + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formatta e stampa gli ARGOMENTI come indicato dal FORMATO.\n" +" \n" +" Opzioni:\n" +" -v var\tAssegna l'output alla variabile di shell VAR invece\n" +" \t\tdi visualizzarlo sullo standard output\n" +" \n" +" FORMATO è una stringa di caratteri che contiene tre tipi di oggetto: " +"caratteri\n" +" semplici, che sono semplicemente copiati sullo standard output; sequenze " +"di escape\n" +" dei caratteri, che sono convertite e copiate sullo standard output;\n" +" specifiche di formato, ognuna delle quali provoca la stampa del " +"successivo argomento\n" +" consecutivo.\n" +" \n" +" In aggiunta alle specifiche di formato standard descritte in printf(1)\n" +" e printf(3), printf interpreta:\n" +" \n" +" %b\tEspande le sequenze di escape di backslash nell'argomento " +"corrispondente\n" +" %q\tQuota l'argomento in modo che possa essere riusato come input per " +"la shell\n" +" %(fmt)T Visualizza la stringa della data/ora risultante dall'uso di " +"FMT come stringa\n" +" di formato per strftime(3)\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o si riscontri\n" +" un errore di scrittura o assegnazione." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Specifica come gli argomenti debbano essere completati da Readline.\n" +" \n" +" Per ciascun NOME, specifica come gli argomenti debbano essere " +"completati. Se non\n" +" vengono fornite opzioni, le specifiche di completamento esistenti sono " +"stampate in modo\n" +" che possano essere riusate come input.\n" +" \n" +" Opzioni:\n" +" -p\tStampa le specifiche di completamento esistenti in un formato " +"riusabile\n" +" -r\tRimuove una specifica di completamento per ciascun NOME, oppure " +"tutte\n" +" \tse non viene fornito alcun NOME\n" +" -D\tApplica i completamenti e le azioni come predefiniti per i " +"comandi\n" +" \tsenza alcun completamento definito specifico\n" +" -E\tApplica i completamenti e le azioni ai comandi \"vuoti\" --\n" +" \tcompletamenti tentati su una riga vuota\n" +" \n" +" Quando viene tentato un completamento, le azioni sono applicate " +"nell'ordine\n" +" in cui sono sopra elencate le opzioni a lettera maiuscola.\n" +" L'opzione -D ha precedenza su -E.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Visualizza i possibili completamenti a seconda delle opzioni.\n" +" \n" +" È pensata per essere usata all'interno di una funzione di shell per " +"generare\n" +" dei possibili completamenti. Se viene fornito l'argomento opzionale " +"PAROLA,\n" +" vengono generate le corrispondenze relative a PAROLA.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modifica o visualizza le opzioni di completamento.\n" +" \n" +" Modifica le opzioni di completamento per ciascun NOME, oppure, se non " +"viene fornito alcun NOME,\n" +" il completamento attualmente in esecuzione. Con nessuna OPZIONE " +"fornita, stampa\n" +" le opzioni di completamento per ciascun NOME o le specifiche di " +"completamento correnti.\n" +" \n" +" Opzioni:\n" +" \t-o opzione\tImposta l'OPZIONE di completamento per ciascun NOME\n" +" \t-D\t\tCambia le opzioni per il completamento di comando \"predefinito" +"\"\n" +" \t-E\t\tCambia le opzioni per il completamento di comando \"vuoto\"\n" +" \n" +" Usando \"+o\" al posto di \"-o\" disabilita l'opzione specificata.\n" +" \n" +" Argomenti:\n" +" \n" +" Ciascun NOME si riferisce a un comando per il quale deve essere stata " +"precedentemente\n" +" definita una specifica di completamento con il comando interno \"complete" +"\". Se non viene fornito\n" +" alcun NOME, compopt deve essere richiamato da una funzione che generi " +"attualmente\n" +" completamenti, e le opzioni per questo generatore di completamenti " +"attualmente\n" +" in esecuzione sono modificate\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o NOME non\n" +" abbia una specifica di completamento definita." + +#: builtins.c:2047 +#, fuzzy +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Legge righe dallo standard input in una variabile di array indicizzato.\n" +" \n" +" Legge righe dallo standard input nella variabile di ARRAY indicizzato, " +"oppure\n" +" dal descrittore di file FD se viene fornita l'opzione -u. La variabile " +"MAPFILE\n" +" è l'ARRAY predefinito.\n" +" \n" +" Opzioni:\n" +" -n numero\t\tCopia al massimo un NUMERO di righe. Se NUMERO è 0, " +"vengono copiate tutte.\n" +" -O origine\tInizia assegnando all'ARRAY all'indice ORIGINE. L'indice " +"predefinito è 0.\n" +" -s numero \tScarta le prime NUMERO righe lette.\n" +" -t\t\tRimuove un ritorno a capo finale da ciascuna riga letta.\n" +" -u fd\t\tLegge le righe da un descrittore di file FD invece che dallo " +"standard input.\n" +" -C callback\tEsamina CALLBACK ogni volta che vengono lette un numero " +"QUANTO di righe.\n" +" -c quantità\tSpecifica il numero di righe lette tra ciascuna chiamata " +"a CALLBACK.\n" +" \n" +" Argomenti:\n" +" ARRAY\t\tNome della variabile di array da usare per i dati dei file.\n" +" \n" +" Se viene fornito -C senza -c, il quanto predefinito è 5000. Quando\n" +" viene analizzata CALLBACK, viene fornito l'indice dell'elemento di\n" +" array successivo da assegnare e la riga da attribuire a quell'elemento\n" +" come argomenti aggiuntivi.\n" +" \n" +" Se non viene fornito con una origine esplicita, il file di mappa " +"azzererà l'ARRAY\n" +" prima della relativa assegnazione.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non " +"valida, ARRAY sia\n" +" in sola lettura oppure non indicizzato." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Legge le righe da un file in una variabile di array.\n" +" \n" +" Sinonimo per \"mapfile\"." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright © 2011 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Restituisce il contesto della chiamata alla subroutine corrente.\n" +#~ " \n" +#~ " Senza ESPR, restituisce " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: processo %5ld (%s) in the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Numero di segnale sconosciuto" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licenza GPLv2+: GNU GPL versione 2 o successive \n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "vero" + +#~ msgid "false" +#~ msgstr "falso" + +#~ msgid "times" +#~ msgstr "times" diff --git a/bash-5.1/po/ja.gmo b/bash-5.1/po/ja.gmo new file mode 100644 index 0000000000000000000000000000000000000000..b1c1af95f54a2f86c0613b0b9f3fbf8efab314ff Binary files /dev/null and b/bash-5.1/po/ja.gmo differ diff --git a/bash-5.1/po/ja.po b/bash-5.1/po/ja.po new file mode 100644 index 0000000000000000000000000000000000000000..d8802a2f7ad61b6d27beb5d067938d22825e675b --- /dev/null +++ b/bash-5.1/po/ja.po @@ -0,0 +1,5897 @@ +# Japanese messages for GNU bash +# Copyright (C) 1999, 2010, 2011, 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Kyoichi Ozaki , 2000. +# Takeshi Hamasaki , 2011, 2013. +# Yasuaki Taniguchi , 2011, 2014, 2017. +msgid "" +msgstr "" +"Project-Id-Version: GNU bash 4.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2017-07-02 01:46+0100\n" +"Last-Translator: Yasuaki Taniguchi \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 2.0.2\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "誤った配列の添字" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: インデックス配列から連想配列に変換することはできません" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: 無効な連想配列のキーです" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: 配列の添字に非数字を設定できません" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: 連想配列を設定するときには添字をつけなければいけません" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: %s を作成できません" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: コマンドのキーマップがありません" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: 最初の非空白類文字が `\"' ではありません" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "閉じる `%c' が %s にありません" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: 区切り文字コロン(:)がありません" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': 割り当て解除できません" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "中括弧展開: %s へメモリを割り当てられません" + +#: braces.c:406 +#, fuzzy, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"中括弧展開: failed to allocate memory for %d 要素のメモリの割り当てに失敗しま" +"した" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "中括弧展開: `%s' へのメモリ割り当てに失敗しました" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': 無効なエイリアス名です" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "行編集が有効になっていません" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': 無効なキーマップ名です" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: %s を読み込めません" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': 不明な関数名です" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s はどのキーにも割り当てられていません。\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s は次を通して起動します " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': 割り当て解除できません" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "ループ回数" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "`for'、`while' または `until' ループでのみ意味があります" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"現在のサブルーチン呼び出しのコンテキストを返します。\n" +" \n" +" EXPR が無い場合 \"$line $filename\" を返します。 EXPR がある場合、\n" +" \"$line $subroutine $filename\" を返します。この追加の情報はスタックト" +"レース\n" +" を提供する時に利用します。\n" +" \n" +" EXPR の値は現在のフレームに戻るまでに何回フレームが呼び出されているかを\n" +" 意味します。最上位のフレームは 0 です。\n" +" \n" +" 終了ステータス:\n" +" シェルが関数を実行できないか式 EXPR が無効な場合を除き 0 を返します。" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME が設定されていません" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "引数が多すぎます" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "他のディレクトリはありません" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD が設定されていません" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "%d 行: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "警告: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: 使用法: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: オプションには引数が必要です" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: 数字の引数が必要です" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: 見つかりません" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: 無効なオプションです" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: 無効なオプション名です" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': 有効な識別子ではありません" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "無効な八進数です" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "無効な十六進数です" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "無効な数字です" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: 無効なシグナル指定です" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': pid または有効なジョブ指定ではありません" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: 読み取り専用の変数です" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s が範囲外です" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "引数" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s が範囲外です" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: そのようなジョブはありません" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: ジョブ制御が無効になっています" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "ジョブ制御が無効になっています" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: 制限されています" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "制限されています" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: シェルのビルトイン関数ではありません" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "書き込みエラー: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "ターミナル属性の設定時にエラーが発生しました : %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "ターミナル属性の取得時にエラーが発生しました : %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: カレントディレクトリの取得時にエラーが発生しました : %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: 曖昧なジョブ指定です" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "このバージョンではヘルプが利用できません" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: 消去できません: %s は読み取り専用です" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: 消去できません" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: 無効なアクション名です" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: 補完指定がありません" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "警告: -F オプションは期待通りに動作しないかもしれません" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "警告: -C オプションは期待通りに動作しないかもしれません" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "補完機能は現在実行されていません" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "関数の中でのみ使用できます" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: 参照変数は配列であってはいけません" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: 自身を参照する名前参照変数は許可されていません" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: 循環名前参照です" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': 名前参照として無効な変数です" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "関数作成時に `-f' を使用できません" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: 読み取り専用関数です" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: この方法で配列変数を消去することはできません" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: 連想配列からインデックス配列に変換することはできません" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "動的ロードは利用できません" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "共有オブジェクト %s を開くことができません : %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "%s が共有オブジェクト %s に存在しません: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: 動的にロードされていません" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "関数 %s のロードが失敗を返しました(%d): ロードされませんでした" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: 動的にロードされていません" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: 削除できません: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: ディレクトリです" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: 通常ファイルではありません" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: ファイルが大きすぎます" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: バイナリファイルを実行できません" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: 実行できません: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "ログアウト\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ログインシェルではありません: `exit' を使用してください" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "停止しているジョブがあります。\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "動作中のジョブがあります。\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "コマンドが見つかりません" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "ヒストリ指定" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: 一時ファイルを開くことができません: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "カレント" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "ジョブ %d がジョブ制御なしで開始されました" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: 不正なオプションです -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: オプションには引数が必要です -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "ハッシュが無効になっています" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: ハッシュテーブルが空です\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tcommand\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "キーワードに一致したシェルコマンド `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"`%s' に一致するヘルプ項目がありません。`help help'、`man -k %s' または `info " +"%s' を試してください" + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: 開くことができません: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"これらのシェルコマンドは内部で定義されています。`help' と入力して一覧を参照し" +"てください。\n" +"`help 名前' と入力すると `名前' という関数のより詳しい説明が得られます。\n" +"'info bash' を使用するとシェル全般のより詳しい説明が得られます。\n" +"`man -k' または info を使用すると一覧にないコマンドのより詳しい説明が得られま" +"す。\n" +"\n" +"名前の後にアスタリスク (*) がある場合はそのコマンドが無効になっていることを意" +"味します。\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "-anrw を2つ以上一緒に使用することはできません" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "ヒストリ位置" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: 無効なタイムスタンプです" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: ヒストリの展開に失敗しました" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib が失敗しました" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "`-x' は他のオプションを同時に使用できません" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: 引数はプロセスIDかジョブIDでなければいけません" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "不明なエラーです" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "式が予期されます" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: インデックス配列ではありません" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: 無効なファイル記述子指定です" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: 無効なファイル記述子: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: 無効な行数です" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: 無効な配列の原点です" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: コールバックの quantum が無効です" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "空の配列変数名です" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "配列変数のサポートが必要です" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': 書式指定文字がありません" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': 無効な時間書式指定です" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': 無効な書式指定文字です" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "警告: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "書式解析問題です: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "\\x 用の十六進数字がありません" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "\\%c 用のユニコード数値がありません" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "他のディレクトリはありません" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: 無効な引数です" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<カレントディレクトリがありません>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "ディレクトリスタックが空です" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "ディレクトリスタックのインデックス" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"現在記憶されているディレクトリスタックを表示します。ディレクトリは `pushd'\n" +" コマンドによってスタックの一番上に保存されます。`popd'コマンドによって\n" +" スタックから取り戻すことができます。\n" +" \n" +" オプション:\n" +" -c\tディレクトリスタックからすべての要素を取り除き空にする\n" +" -l\tホームディレクトリからの相対パスを ~ を利用した形式で\n" +" \t表示しない\n" +" -p\tディレクトリスタックの要素を1行毎に表示する\n" +" -v\tディレクトリスタックの要素を1行ごとに番号をつけて\n" +" \t表示する\n" +" \n" +" 引数:\n" +" +N\tオプションなしで起動された場合にリストの先頭から数えて\n" +" \tN番目の要素を表示します。開始番号は0です。\n" +" \n" +" -N\tオプションなしで起動された場合にリストの末尾から数えて\n" +"\tN番目の要素を表示します。開始番号は0です。" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"ディレクトリスタックの先頭にディレクトリを追加します。またはディレクトリ\n" +" スタックを回転します。新しいスタックの先頭がカレントディレクトリにな\n" +" ります。引数なしで起動された場合、先頭の2つのディレクトリを交換します。\n" +" \n" +" オプション:\n" +" -n\tスタックにディレクトリを追加した時に通常のディレクトリ変更\n" +" \tを抑止します。よって、スタックのみ操作されます。\n" +" \n" +" 引数:\n" +" +N\t先頭がN番目のディレクトリになるように回転します(`dirs'で\n" +" \t表示されるスタックの先頭から数えた数です。開始番号は0です)。\n" +" \n" +" -N\t先頭がN番目のディレクトリになるように回転します(`dirs'で\n" +" \t表示されるスタックの末尾から数えた数です。開始番号は0です)。\n" +" \n" +" ディレクトリ\tディレクトリをスタックの先頭に加え、そのディレク\n" +" \tトリを新しいカレントディレクトリにします。\n" +" \n" +" `dirs' ビルトインコマンドでディレクトリスタックを表示します。" + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"ディレクトリスタックから要素を削除します。引数が無い場合スタックの先頭から\n" +" 削除し、新しいスタックの先頭ディレクトリに移動します。\n" +" \n" +" オプション:\n" +" -n\tスタックからディレクトリを削除した時に通常のディレクトリ変更\n" +" \tを抑止します。よって、スタックのみ操作されます。\n" +" \n" +" 引数:\n" +" +N\tディレクトリスタック(`dirs' で表示される)の先頭から数えて\n" +" \t N 番目の要素を削除します。開始番号は 0 です。例: `popd +0'\n" +" \tは最初のディレクトリを削除します。`popd +1' は2番目です。\n" +" \n" +" -N\tディレクトリスタック(`dirs' で表示される)の最後から数えて\n" +" \t N 番目の要素を削除します。開始番号は 0 です。例: `popd +0'\n" +" \tは最後のディレクトリを削除します。`popd +1' は最後から2番目です。\n" +" \n" +" `dirs' ビルトインコマンドでディレクトリスタックを表示します。" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: 無効なタイムアウト指定です" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "読み込みエラー: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "`return' は関数または source されたスクリプト内のみで利用できます" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "変数と関数を同時に消去することはできません" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: 配列変数ではありません" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: 関数ではありません" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: export できません" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "シフト回数" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "シェルオプションを同時に有効かつ無効にできません" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: 無効なシェルオプション名です" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "ファイル名が引数として必要です" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: ファイルが見つかりません" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "中断できません" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "ログインシェルを中断できません" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s は `%s' のエイリアスです\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s はシェルの予約語です\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s は関数です\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s は特殊シェル組み込み関数です\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s はシェル組み込み関数です\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s は %s です\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s はハッシュされています (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: limit の無効な引数です" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': 誤ったコマンドです" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: limit を取得できません: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limit" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: limit を変更できません : %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "八進数" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': 無効なシンボリックモード演算子です" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': 無効なシンボリックモード文字です" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " 行 " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "最後のコマンド: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "中止しています..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "情報: " + +#: error.c:462 +msgid "unknown command error" +msgstr "不明なコマンドエラーです" + +#: error.c:463 +msgid "bad command type" +msgstr "誤ったコマンドタイプです" + +#: error.c:464 +msgid "bad connector" +msgstr "誤った接続です" + +#: error.c:465 +msgid "bad jump" +msgstr "誤ったジャンプです" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: 未割り当ての変数です" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\a入力待ちがタイムアウトしました: 自動ログアウト\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "/dev/null から標準入力に対してリダイレクトできません: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': 無効な書式文字です" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "パイプエラー" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: eval の入れ子レベルの最大値を超えています (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: source の入れ子レベルの最大値を超えています (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: 関数の入れ子レベルの最大値を超えています (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: 制限されています: `/' をコマンド名の中に指定できません" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: コマンドが見つかりません" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: 誤ったインタプリタです" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: バイナリファイルを実行できません: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': 特殊シェル組み込み関数です" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "fd %d を fd %d に複製できません" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "式の再帰可能レベルを越えました" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "再帰スタックがアンダーフローしました" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "式に構文エラーがあります" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "非変数に割り当てを行おうとしてます" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "式に構文エラーがあります" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "0 による除算です" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "バグ: 誤った式のトークンです" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "条件式には `:' が予期されます" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "0より小さい指数部です" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "識別子は前置インクリメントまたは前置デクリメントが予期されます" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "`)' がありません" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "構文エラー: オペランドが予期されます" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "構文エラー: 無効な計算演算子です" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (エラーのあるトークンは \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "無効な基底の数値です" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: 無効な行数です" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "基底の値が大きすぎます" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: 式のエラー\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: 親ディレクトリにアクセスできません" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "ファイル記述子(fd) %d を無遅延モードに再設定できません" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "新規ファイル記述子(fd) %d を bash の入力として割り当てられません" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: 新規 fd %d のバッファはすでに存在します" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "実行中のジョブ %2$d で fork した pid %1$d が出現しました" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "プロセスグループ %2$ld のジョブ %1$d を削除しています" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) はまだ存在しているとマークされています" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: そのような pid は存在しません" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "シグナル %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "終了" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "停止" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "停止 (%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "実行中" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "終了(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "終了 %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "不明なステータス" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(コアダンプ) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "子プロセス setpgid (%ld から %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld はこのシェルの子プロセスではありません" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: プロセス %ld の記録がありません" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: ジョブ %d は停止しています" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: そのようなジョブはありません" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: ジョブは終了しました" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: ジョブ %d はすでにバックグラウンドで動作しています" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: 不定のブロックを避けるために WNOHANG をオンにしました。" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: %d 行: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (コアダンプ)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd now: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp が失敗しました" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: line discipline" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: line discipline" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "端末プロセスグループを設定できません (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "このシェルではジョブ制御が無効になっています" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: 失敗したアサーション: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: アサーション失敗\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "不明" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: free ブロックリストが壊れています" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: 既に free されたブロックを引数として呼び出されました" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: 未割当のブロックを引数として呼び出されました" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: アンダーフローを検出しました。 mh_nbytes が範囲外です" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: アンダーフローを検出しました。 mh_nbytes が範囲外です" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: 開始と終了の塊の大きさが異なっています" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: 未割当のブロックを引数として呼び出されました" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: アンダーフローを検出しました。 mh_nbytes が範囲外です" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: アンダーフローを検出しました。 mh_nbytes が範囲外です" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: 開始と終了の塊の大きさが異なっています" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: FIND_ALLOC で割り当てテーブルがいっぱいです\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p 既にテーブル上では割り当てられています\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p テーブル上では既に解放されています\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "無効な基底" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: 不明なホストです" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: 無効なサービスです" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: ネットワークパス指定に誤りがあります" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "ネットワーク操作はサポートされていません" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: ロケールを変更できません (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: ロケールを変更できません (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: ロケールを変更できません (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: ロケールを変更できません (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "メールが $_ にあります" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "新しいメールが $_ にあります" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "%s のメールは既読です\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "構文エラー: 数値の式が必要です" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "構文エラー: 予期しない `;' です" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "構文エラー: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: 誤った指定の種類 %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"ヒアドキュメントの %d 行目でファイル終了 (EOF) に達しました (`%s' が必要)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: リダイレクト指定 `%d' は範囲外です" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "対応する `%c' を探索中に予期しないファイル終了 (EOF) です" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "`]]' を探索中に予期しないファイル終了 (EOF) です" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "条件式に構文エラー: 予期しないトークン `%s' です" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "条件式に構文エラーがあります" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "予期しないトークン `%s' です。`)' が予期されます" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "`)' が予期されます" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "条件単項演算子に予期しない引数 `%s' です" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "条件単項演算子に予期しない引数です" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "`%s` は予期しないトークンです。条件二項演算子が予期されます" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "条件二項演算子が予期されます" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "条件二項演算子に予期しない引数 `%s' です" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "条件二項演算子に予期しない引数です" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "条件コマンドに予期しないトークン `%c' があります" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "条件コマンドに予期しないトークン `%s' があります" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "条件コマンドに予期しないトークン %d があります" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "予期しないトークン `%s' 周辺に構文エラーがあります" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "`%s' 周辺に構文エラーがあります" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "構文エラー: 予期しないファイル終了 (EOF) です" + +#: parse.y:6365 +msgid "syntax error" +msgstr "構文エラー" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "シェルから脱出するには \"%s\" を使用してください。\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "対応する `)' を探索中に予期しないファイル終了(EOF)です" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: 関数 `%s' が見つかりません" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: 誤った接続 `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: 無効なファイル記述子です" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL ファイルポインタです" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': 無効な書式文字です" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "ファイル記述子が範囲外です" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: 曖昧なリダイレクトです" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: 存在するファイルを上書きできません" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: 制限されています: 出力をリダイレクト出来ません" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "ヒアドキュメント用一時ファイルを作成できません: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: ファイル記述子 (fd) を変数に設定することはできません" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "ネットワークが無効な場合 /dev/(tcp|udp)/host/port はサポートされません" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "リダイレクトエラー: ファイル記述子を複製できません" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "/tmp が見つかりません。作成してください!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp は有効なディレクトリ名でなければいけません" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: 無効なオプション" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "uidを %d に設定できません: 実効uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "gidを %d に設定できません: 実効gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "デバッガを開始できません。デバッガモードが無効になっています" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: ディレクトリです" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "私は名前がありません!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, バージョン %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"使用法:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU 形式の長いオプション:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "シェルオプション:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD, -c command または -O shopt_option\t\t(起動時のみ)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s または -o option\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"シェルオプションの詳細については `%s -c \"help set\"'と入力してください。\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "シェル組み込みコマンドについては `%s -c help' と入力してください。\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "バグ報告をする場合は `bashbug' コマンドを使用してください。\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bashホームページ: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"GNUソフトウェアを使用する時の一般的なヘルプ : \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: 無効な操作です" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "悪いシグナル" + +#: siglist.c:50 +msgid "Hangup" +msgstr "停止" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "割り込み" + +#: siglist.c:58 +msgid "Quit" +msgstr "終了" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "不正な指定" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT 指定" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT 指定" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "浮動小数点例外" + +#: siglist.c:86 +msgid "Killed" +msgstr "Killed" + +#: siglist.c:90 +msgid "Bus error" +msgstr "バスエラー" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "セグメンテーションフォルト" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "誤ったシステムコール" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "パイプが切れました" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "アラーム時計" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminated" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "急ぎの IO 状態" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "停止 (シグナル)" + +#: siglist.c:126 +msgid "Continue" +msgstr "続行" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "子プロセスの死亡または停止 " + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "停止 (tty 入力)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "停止 (tty 出力)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O 用意ができています" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU limit" + +#: siglist.c:154 +msgid "File limit" +msgstr "ファイル limit" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "警報 (仮想)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "警報 (プロファイル)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "ウィンドウが変更されました" + +#: siglist.c:170 +msgid "Record lock" +msgstr "記録のロック" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "ユーザシグナル 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "ユーザシグナル 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT 未決の入力データ" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "電源故障の危険" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "システムクラッシュの危険" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "プロセスを別のCPUに移動" + +#: siglist.c:198 +msgid "programming error" +msgstr "プログラミングエラー" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT monitorモードが与えられました" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT monitorモードが奪われました" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT サウンドシーケンスが完了しました" + +#: siglist.c:214 +msgid "Information request" +msgstr "情報要求" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "不明なシグナル番号 %d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "誤った代入: 閉じる `%s' が %s に存在しません" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: リストを配列要素に割り当てできません" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "プロセス代入ではパイプを作成できません" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "プロセス代入では子プロセスを作成できません" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "名前付きパイプ %s を読み込み用に開けません" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "名前付きパイプ %s を書き込み用に開けません" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "名前付きパイプ %s をファイル記述子(fd) %d として複製できません" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "誤った代入: %s に閉じる \"`\" がありません" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "コマンド代入ではパイプを作成できません" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "コマンド代入では子プロセスを作成できません" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: パイプを fd 1 として複製できません" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: 名前参照として無効な変数です" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: 無効な行数です" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: 無効な変数名です" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: パラメータが null または設定されていません" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: パラメータが null または設定されていません" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: substring expression < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: 誤った代入です" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: この方法で割当はできません" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "将来のバージョンのシェルでは強制的に数値代入として評価されます" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "誤った代入: %s に閉じる \"`\" がありません" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "一致しません: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "引数が予期されます" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: 整数の式が予期されます" + +#: test.c:265 +msgid "`)' expected" +msgstr "`)' が予期されます" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "`)' が予期されますが、見つかったのは %s です" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: 二項演算子が予期されます" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: 単項演算子が予期されます" + +#: test.c:881 +msgid "missing `]'" +msgstr "`]'がありません" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "構文エラー: 予期しない `;' です" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "無効なシグナル番号" + +#: trap.c:325 +#, fuzzy, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: eval の入れ子レベルの最大値を超えています (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: trap_list[%d] に誤った値があります: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: シグナルハンドラーは SIG_DFLです。, %d (%s) を自身に再送し" +"ます。" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: 誤ったシグナル %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "`%s' の関数定義をインポート中にエラーが発生しました" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "シェルレベル (%d) は高すぎます。1に再設定されました" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: 現在のスコープは関数コンテキストではありません" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: 変数が初期化されていないかもしれません" + +#: variables.c:3475 +#, fuzzy, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: 名前参照として無効な変数です" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: 現在のスコープは関数コンテキストではありません" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s は null の exportstr を持っています" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%2$s に対する exportstr で %1$d は無効な文字です" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "%s に対する exportstr に `=' がありません" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: shell_variables の先頭です。関数コンテキストではありません" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: global_variables コンテキストではありません" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: shell_variables の先頭です。一時環境スコープではありません" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: ファイルとして開くことができません" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: トレースファイル記述子として無効な値です" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: 値の互換性が範囲外です" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2012 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"ライセンス GPLv3+: GNU GPL バージョン 3 またはそれ以降 \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, バージョン %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %lu バイトを割当できません (%lu バイトを割当済み)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: %lu バイトを割当できません" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: %lu バイトを割当できません (%lu バイトを割当済み)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: %lu バイトを割当できません" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [name[=value] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] name [name ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function または readline-command]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [name[=value] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] name[=value] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] name[=value] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filename] [name ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [first] [last] または fc -s [pat=rep] [command]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [pattern ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d offset] [n] または history -anrw [filename] または history -" +"ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] または jobs -x command [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... または kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let 引数 [引数 ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] または export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] または readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filename [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". filename [arguments]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] name [name ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMMANDS; do COMMANDS; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMMANDS; do COMMANDS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAME] command [redirections]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { COMMANDS ; } または name () { COMMANDS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMMANDS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expression ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expression ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "変数 - 変数の名前とその意味" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optname ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [arguments]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " +"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DE] [name ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " +"quantum] [array]" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"エイリアスを定義または表示します。\n" +" \n" +" 引数がない場合、`alias` は再使用可能なエイリアス一覧を `alias 名前=値'\n" +" 形式で標準出力に表示します。\n" +" \n" +" そうでなければ、与えられた名前と値でエイリアスを定義します。値の後続に空" +"白\n" +" が存在する場合は次の語はエイリアス展開時にエイリアス代入対象として確認さ" +"れ\n" +" ます。\n" +"\n" +" オプション:\n" +" -p\tすべての定義されたエイリアスを再利用可能な形式で表示します\n" +" \n" +" 終了ステータス:\n" +" alias は与えられた名前でエイリアスが定義されなかった場合を除き true を返" +"します。" + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"定義されたエイリアス一覧から各名前のエイリアスを削除します。\n" +" \n" +" Options:\n" +" -a\tすべてのエイリアス定義を削除します。\n" +" \n" +" 名前がエイリアスに存在しない場合を除き true を返します。" + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Readline のキー割り当てと変数を設定します。\n" +" \n" +" キーシーケンスを Readline 関数またはマクロに割り当てを行うか、Readline\n" +" 変数を設定します。オプションが無い引数の構文は ~/.inputrc の構文と\n" +" 同じです。しかし、単一の引数として与えなければなりません。\n" +" 例: bind '\"\\C-x\\C-r\": re-read-init-file'\n" +"\n" +" Options:\n" +" オプション:\n" +" -m keymap このコマンドの間のキーマップとして KEYMAP を使用す" +"る。\n" +" 利用可能なキーマップ名は emacs, emacs-standard, " +"emacs-meta,\n" +" emacs-ctlx, vi, vi-move, vi-command, および vi-" +"insertです。\n" +" -l 関数名一覧を表示する。\n" +" -P 関数名およびキー割り当て一覧を表示する。\n" +" -p 入力として再利用可能な形式で、関数名とキー割り当てを" +"一覧\n" +" 表示する\n" +" -S マクロを起動するキーシーケンスとその値を一覧表示す" +"る\n" +" -s 入力として再利用可能な形式で、マクロを起動する\n" +" キーシーケンスとその値を一覧表示する\n" +" -V 変数名と値の一覧を表示する\n" +" -v 入力として再利用可能な形式で、変数名と値を一覧\n" +" 表示する\n" +" -q function-name 関数名がどのキーによって起動されるか探索する\n" +" -u function-name 関数名にバインドされたすべてのキーを解除する\n" +" -r keyseq KEYSEQ に対する割り当てを解除する\n" +" -f filename FILENAME からキーバインドを読み込む\n" +" -x keyseq:shell-command\tKEYSEQ が入力された時に SHELL-COMMAND \n" +" \t\t\t\tが実行されるようにする\n" +" -X\t\t 入力として再利用可能な形式で -x によって割り当て\n" +" られたキーシーケンスとコマンドを一覧表示する\n" +" \n" +" 終了ステータス:\n" +" bind は解釈できないオプションが渡された場合およびエラーが発生した場合\n" +" を除き 0 を返します。" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"for、 while、または until ループを脱出します。\n" +" \n" +" FOR、 WHILE、または UNTIL ループを脱出します もし N が指定されている場" +"合、\n" +" N階層のループを終了します。\n" +" \n" +" 終了ステータス:\n" +" N が1未満の場合を除き、終了ステータスは 0 です。" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"for, while, または until ループを再開します。\n" +" \n" +" FOR, WHILE または UNTIL ループの次の繰り返しを再開します。\n" +" もし N が指定された場合、N 階層のループを再開します。\n" +" \n" +" 終了ステータス:\n" +" N が1未満の場合を除き、終了ステータスは 0 です。" + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"シェル組み込みコマンドを実行します。\n" +" \n" +" コマンドを検索しないでシェル組み込みコマンドを ARG をつけて実行し\n" +" ます。これはシェル組み込みコマンドをシェル関数として実装するが、関数\n" +" 内で組み込みコマンドを実行する必要がある場合に役に立ちます。\n" +" \n" +" 終了ステータス:\n" +" シェル組み込みコマンドの終了ステータスを返します。シェル組み込みコマ\n" +" ンドが無い場合は false を返します。" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"現在のサブルーチン呼び出しのコンテキストを返します。\n" +" \n" +" EXPR が無い場合 \"$line $filename\" を返します。 EXPR がある場合、\n" +" \"$line $subroutine $filename\" を返します。この追加の情報はスタックト" +"レース\n" +" を提供する時に利用します。\n" +" \n" +" EXPR の値は現在のフレームに戻るまでに何回フレームが呼び出されているかを\n" +" 意味します。最上位のフレームは 0 です。\n" +" \n" +" 終了ステータス:\n" +" シェルが関数を実行できないか式 EXPR が無効な場合を除き 0 を返します。" + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"シェルの作業ディレクトリを変更します。\n" +" \n" +" カレントディレクトリを DIR へ変更します。DIR のデフォルトは HOME シェル\n" +" 変数の値です。\n" +" \n" +" 変数 CDPATH は DIR を含んでいる検索パスを定義します。CDPATH にはコロン" +"(:)\n" +" で区切られた代替ディレクトリ名を指定します。\n" +" 値がないディレクトリ名はカレントディレクトリと同義です。 DIR が\n" +" スラッシュ (/) から始まる場合は CDPATH は使用されません。\n" +" \n" +" ディレクトリが見つからなく、かつ `cdabl_vars' シェルオプションが設定され" +"て\n" +" いる場合、引数は変数名として扱われます。その変数に値がある場合、その値" +"が\n" +" DIR として扱われます。\n" +" \n" +" オプション:\n" +" -L\tシンボリックリンクを強制的にたどります: resolve symbolic links " +"in\n" +" DIR after processing instances of `..'\n" +" -P\tシンボリックリンクをたどらず物理構造を利用します: resolve\n" +" symbolic links in DIR before processing instances\n" +" \tof `..'\n" +" -e\t-P オプションが与えられ、かつ、現在の作業ディレクトリが正しく\n" +" 決定できない場合、終了ステータスが 0 以外で終了します\n" +" -@ on systems that support it, present a file with extended " +"attributes\n" +" as a directory containing the file attributes\n" +" \n" +" デフォルトでは `-L' が指定された場合と同様シンボリックリンクをたどりま" +"す。\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" 終了ステータス:\n" +" ディレクトリを変更した場合、および -P が使用されている時に $PWD が正し" +"く\n" +" 設定された場合は 0、それ以外は 0 以外の値です。" + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"カレントディレクトリの名前を表示します。\n" +" \n" +" オプション:\n" +" -L\t$PWD がカレントディレクトリの名前を指している場合は $PWD\n" +" \tを表示する\n" +" -P\tシンボリックリンクを辿った物理的なディレクトリを表示する\n" +" \n" +" デフォルトでは `pwd' は `-L' が指定されたように動作します。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションまたはカレントディレクトリを読み込めない場合を除き\n" +" 0を返します。" + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"何もしないコマンド\n" +" \n" +" 何も効果がありません。コマンドは何も行いません\n" +" \n" +" 終了ステータス:\n" +" 常に成功です。" + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"結果として成功を返します。\n" +" \n" +" 終了ステータス:\n" +" 常に成功です。" + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"結果として失敗を返します。\n" +" \n" +" 終了ステータス:\n" +" 常に失敗です。" + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"単純なコマンドを実行するかコマンドに関する情報を表示します。\n" +" \n" +" シェル関数の探索を抑止して COMMAND を引数 ARGS で実行します。または\n" +" 指定した COMMANDs の情報を表示します。シェル関数と同じ名前のコマンド\n" +" がディスク上に存在する時に使用します。\n" +" \n" +" オプション:\n" +" -p\t全ての標準ユーティリティが見つかると保証される PATH を\n" +" \tデフォルトの値として使用する\n" +" -v\t`type'組み込み関数と同様に COMMAND の説明を表示する\n" +" -V\tCOMMAND に対してより冗長な説明を表示する\n" +" \n" +" 終了ステータス:\n" +" COMMAND の終了ステータスを返します。または COMMAND が見つからない時に失敗" +"を返します。" + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"変数の値および属性を設定します。\n" +" \n" +" 変数を宣言し、それに属性を与えます。NAME を指定しない場合\n" +" すべての変数に関する属性と値を表示します。\n" +" \n" +" オプション:\n" +" -f\t関数名と関数定義に表示を制限する\n" +" -F\t関数名のみ表示するように制限する (デバッグ中は行番号と\n" +" \tソースファイルも追加される)\n" +" -g\tシェル関数内で使用された時に大域変数を作成する。それ以\n" +" \t外の場合は無視される\n" +" -p\t各 NAME の属性と値を表示する\n" +" \n" +" 属性を設定するオプション:\n" +" -a\tNAME をインデックス型配列にする(サポートされている場合)\n" +" -A\tNAME を連想配列にする(サポートされている場合)\n" +" -i\tNAME に`整数型'の属性を設定する\n" +" -l\tNAME の設定時に値を小文字に変換する\n" +" -n\tNAME の値が変数名の参照となるようにする\n" +" -r\tNAME を読み取り専用にする\n" +" -t\tNAME に `trace' 属性を設定する\n" +" -u\tNAME 設定時に値を大文字に設定する\n" +" -x\tNAME をエクスポートする\n" +" \n" +" `-' の代わりに `+' を使用すると与えられた属性を無効にします。\n" +" \n" +" 整数属性を与えられた変数は値を割り当てられた時に、数値として評価され\n" +" ます。(`let' コマンド参照してください。)\n" +"\n" +" 関数内で使用された場合は `local' コマンドを使用した時と同様に " +"`declare' \n" +" は NAME をローカル変数にします。`-g' オプションはこの動作を抑止します。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられたかエラーが発生しない限り成功を返します。" + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"変数の値および属性を設定します。\n" +" \n" +" 旧式です。`help declare'を参照してください。" + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"ローカル変数を定義します。\n" +" \n" +" NAME という名前のローカル変数を定義し値を VALUE に設定します。OPTION は\n" +" `declare'と同じすべてのオプションを受け付けます。\n" +" \n" +" 局所変数はシェル関数の中でのみ使用できます。宣言された関数の中およびそ" +"の\n" +" 子関数のみで参照できます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられる、エラーが発生する、またはシェルが関数を実行" +"できない\n" +" 場合を除き成功を返します。" + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"引数を標準出力に書き出します。\n" +" \n" +" 引数 ARG を単一空白文字で区切り、最後に改行を加えて標準出力に表示しま" +"す。\n" +" \n" +" オプション:\n" +" -n\t最後に改行を加えない\n" +" -e\t下記に示すバックスラッシュエスケープの解釈を有効にする\n" +" -E\tバックスラッシュエスケープの解釈を明示的に無効にする\n" +" \n" +" `echo' では下記のバックスラッシュエスケープ文字を解釈します:\n" +" \\a\tアラート (bell)\n" +" \\b\tバックスペース\n" +" \\c\t以降の出力を抑止\n" +" \\e\tエスケープ文字\n" +" \\E\tエスケープ文字\n" +" \\f\tフォームフィード\n" +" \\n\t改行\n" +" \\r\tキャリッジリターン\n" +" \\t\t水平タブ\n" +" \\v\t垂直タブ\n" +" \\\\\tバックスラッシュ\n" +" \\0nnn\tASCII コードが NNN (8進数) の文字。 NNN は0から3個の8進数字\n" +" \\xHH\t値が HH (16進数) の8ビット文字。HH は 1 または2個の16進数字\n" +"\n" +" 終了ステータス:\n" +" 書き込みエラーが発生しない限り成功を返します。" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"引数を標準出力に書き出します。\n" +" \n" +" 引数 ARG を最後に改行を加えて標準出力に表示します。\n" +" \n" +" オプション:\n" +" -n\t最後に改行を加えない\n" +" \n" +" 終了ステータス:\n" +" 書き込みエラーが発生しない限り成功を返します。" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"シェル組み込み関数を有効または無効にします。\n" +" \n" +" シェル組み込み関数を有効または無効にします。シェル組み込み関数を無効にす" +"ると\n" +" ディスク上に存在するシェル組み込み関数と同じ名前のコマンドをフルパスを指" +"定す\n" +" ることなく実行することが出来ます。\n" +" \n" +" オプション:\n" +" -a\t組み込み関数の一覧をそれぞれが有効か否かを含めて表示します\n" +" -n\tNAME を無効にするか、または無効な組み込み関数一覧を表示します\n" +" -p\t組み込み関数一覧を再利用可能な形式で表示します\n" +" -s\tPosix で定義されている組み込み関数のみ表示します\n" +" \n" +" 動的ロードを制御するオプション:\n" +" -f\t共有オブジェクト FILENAME から組み込み関数 NAME を読み込みます\n" +" -d\t-f で読み込まれた組み込み関数を削除します\n" +" \n" +" オプション無しで起動された場合、各 NAME は有効になります。\n" +" \n" +" $PATH 上に存在する `test' をシェル組み込み関数の代わりに利用する場合は\n" +" `enable -n test'と入力してください。\n" +" \n" +" 終了ステータス:\n" +" NAME が組み込み関数ではないかエラーが発生しない限り成功を返します。" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"引数をシェルコマンドとして実行します。\n" +" \n" +" 引数を一つの文字列に連結し、その結果をシェルへの入力として使用し、\n" +" その結果をコマンドとして実行します。\n" +" \n" +" 終了ステータス:\n" +" コマンドの終了ステータスを返します。コマンドが null の場合は成功を\n" +" 返します。" + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"オプション引数を解析します。\n" +" \n" +" getopts は位置パラメーターをオプションとして解析する際にシェルによっ\n" +" て使用される手続です。\n" +" \n" +" OPTSTRING には認識されるオプションの文字が含まれます。文字の後に\n" +" コロン(:)が続く場合は、オプションは空白文字でオプションから区切\n" +" られた引数を持つと予期されます。\n" +" \n" +" getopts は起動されるたびに、次のオプションをシェル変数 $name に保存\n" +" します。name が存在しない場合は初期化されます。そして処理する必要が\n" +" ある次の引数の位置をシェル変数 OPTIND に保存します。OPTIND はシェル\n" +" またはシェルスクリプトが起動するたびに 1 に初期化されます。オプショ\n" +" ンに引数が要求される場合、getopt は引数をシェル変数 OPTARG に保存し\n" +" ます。\n" +" \n" +" getopts はエラーを2つの方法のいずれかで報告します。OPTSTRINGの最初\n" +" の文字がコロン (:) の場合、getopts はサイレントエラー報告を使用し\n" +" ます。このモードではエラーメッセージは表示されません。無効なオプシ\n" +" ョンを見つけた時、 getopts はオプションの文字を OPTARG に設定しま\n" +" す。必要なオプション引数が見つからない場合は、getopts は NAME に\n" +" ':' を設定し、OPTARG にオプションの文字を設定します。getopts が\n" +" サイレントモードで無い場合、無効なオプションを見つけた時、getopts \n" +" は NAME に '?' を設定し、OPTARG を未定義状態にします。そして\n" +" 診断メッセージを表示します。\n" +" \n" +" シェル変数 OPTERR の値が 0 の場合、getopts は OPTSTRING の最初が\n" +" コロン (:) か否かにかかわらずエラーメッセージの表示を抑止します。\n" +" OPTERR のデフォルト値は 1 です。\n" +" \n" +" getopts では通常位置パラメーター ($0 - $9) を解析します。しかし\n" +" 他の引数が与えられた場合、それらが解析されます。\n" +" \n" +" 終了ステータス:\n" +" オプションが見つかった場合に成功を返します。オプションの終わり\n" +" に到達するかエラーが発生した時に失敗を返します。" + +#: builtins.c:694 +#, fuzzy +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"シェルを与えられたコマンドで置換します。\n" +" \n" +" 指定したプログラムでシェルを置換して COMMAND を実行します。ARGUMENTS は\n" +" COMMAND の引数となります。もし COMMAND が指定されない場合は、現在のシェ" +"ル\n" +" に対する全てのリダイレクトが行われます。\n" +" \n" +" オプション:\n" +" -a name\tNAME を COMMAND の 0 番目の引数として与えます\n" +" -c\t\tCOMMAND を環境変数なしで実行します\n" +" -l\t\tdash(-) を COMMAND の 0 番目の引数とします\n" +" \n" +" もしコマンドが実行できない場合、非対話的なシェルは終了し、対話的なシェル" +"は\n" +" オプション `execfail' が設定されます。\n" +" \n" +" 終了ステータス:\n" +" COMMAND が見つからないかリダイレクトエラーが発生しない限り成功を返しま" +"す。" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"シェルを終了します。\n" +" \n" +" 終了ステータス N でシェルを終了します。 N を指定しない場合は\n" +" 最後に実行したコマンドの終了ステータスになります。" + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"ログインシェルを終了します。\n" +" \n" +" 終了ステータス N でログインシェルを終了します。実行したのがログインシェ" +"ル\n" +" 内で無い場合はエラーを返します。" + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"ヒストリ一覧からコマンドを表示または実行します。\n" +" \n" +" fc はヒストリ一覧を表示または編集してコマンドを再実行するために使用しま" +"す。\n" +" FIRST および LAST は範囲を指定する数値です。FIRST は文字列を指定すること" +"も\n" +" できます。その場合はその文字列で始まる直近に実行したコマンドを表しま" +"す。\n" +" \n" +" オプション:\n" +" -e ENAME\t使用するエディタを選択します。デフォルトは FCEDIT で、次は " +"EDITOR、\n" +" \t\tそして vi の順です。\n" +" -l \t編集ではなく行を一覧表示します\n" +" -n\t一覧表示時に行番号を表示しません\n" +" -r\t行を逆順にします (最新のコマンドを最初にする)\n" +" \n" +" `fc -s [pat=rep ...] [command]' 形式を使用すると、COMMAND は\n" +" OLD=NEW の置換が行われた後に再実行されます。\n" +" \n" +" これを使った使いやすいエイリアスは r='fc -s' です。これで `r cc' を実行す" +"る\n" +" と最後に実行した cc で始まるコマンドが実行されます。`r' で直前のコマンド" +"が\n" +" 実行されます。\n" +" \n" +" 終了ステータス:\n" +" 実行したコマンドのステータスまたは成功が帰ります。エラーが発生した場合は " +"0 \n" +" 以外の値になります。" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"ジョブをフォアグランドにします。\n" +" \n" +" JOB_SPEC で識別されたジョブをフォアグランドにして、現在のジョブにしま" +"す。\n" +" もし JOB_SPEC が存在しない場合、シェルが現在のレントジョブとして考えてい" +"る\n" +" ものが利用されます。\n" +" \n" +" \n" +" 終了ステータス:\n" +" フォアグラウンドになったコマンドのステータスを返します。または、エラー" +"が\n" +" 発生した時に失敗を返します。" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"ジョブをバックグラウンドにします。\n" +" \n" +" JOB_SPEC で識別されるジョブを `&' と共に始めた時のようにバックグラウンド" +"に\n" +" します。もし JOB_SPEC が存在しない場合、シェルが現在のジョブとして考えて" +"い\n" +" るものが利用されます。\n" +" \n" +" 終了ステータス:\n" +" ジョブ制御が有効になっていないかエラーが発生しない限り成功を返します。" + +#: builtins.c:793 +#, fuzzy +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"プログラムの位置を記憶または表示します。\n" +" \n" +" 各コマンド NAME のフルパスを決定し記憶します。もし引数が与えられなかった" +"場合、\n" +" 記憶しているコマンドの情報が表示されます。\n" +" \n" +" オプション:\n" +" -d\t\t各 NAME に対して記憶している情報を消去します\n" +" -l\t\t入力として再可能な形式で表示します\n" +" -p pathname\tNAME のフルパス名として PATHNAME を使用します\n" +" -r\t\t全ての記憶している位置情報を消去します\n" +" -t\t\t各 NAME に対して記憶している位置を表示します。複数の NAME\n" +" \t\tが与えられた場合、位置を表示する前に対象となる NAME を表示します。\n" +" 引数:\n" +" NAME\t\t各 NAME は $PATH の中を探索され、記録されたコマンド一覧に\n" +" \t\t追加されます。\n" +" \n" +" 終了ステータス:\n" +" NAME が見つからないか、無効なオプションが与えられない限り成功を返します。" + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"組み込みコマンドの情報を表示します。\n" +" \n" +" 組み込みコマンドに関する簡潔な要約を表示します。もし PATTERN が\n" +" 指定された場合は、PATTERN に一致する全てのコマンドに対する詳細な\n" +" ヘルプを表示します。それ以外はヘルプトピックを表示します。\n" +" \n" +" オプション:\n" +" -d\t各ヘルプトピックに対して短い説明を出力します\n" +" -m\t使用法を擬似的な man ページ形式で表示します\n" +" -s\t一致した各トピックに対して簡単な使用法のみを表示します\n" +" \tPATTERN\n" +" \n" +" 引数:\n" +" PATTERN\tヘルプトピックを指定するパターン\n" +" \n" +" 終了ステータス:\n" +" PATTERN が見つからないか無効なオプションが与えられない限り成功を返しま" +"す。" + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"ヒストリ一覧を表示または操作します。\n" +" \n" +" 行番号をつけてヒストリを表示します。操作した各項目には前に`*'が付きま" +"す。\n" +" 引数 N がある場合は最後の N 個の項目のみを表示します。\n" +" \n" +" オプション:\n" +" -c\tヒストリ一覧から全ての項目を削除します。\n" +" -d offset\tOFFSET 番目のヒストリ項目を削除します。\n" +" \n" +" -a\tこのセッションからヒストリファイルに行を追加します\n" +" -n\tヒストリファイルからまだ読み込まれていない行を全て読み込みます\n" +" -r\tヒストリファイルを読み込み、内容をヒストリ一覧に追加します\n" +" -w\t現在のヒストリをヒストリファイルに書き込みます。そしてそれらを\n" +" \tヒストリ一覧に追加します\n" +" \n" +" -p\t各 ARG に対してヒストリ展開を実行し、結果をヒストリ一覧に追加し\n" +" \tしないで表示します\n" +" -s\tARG を単一の項目としてヒストリ一覧に追加します\n" +" \n" +" FILENAME を与えた場合、FILENAME がヒストリファイルをして使用されます。そ" +"れが\n" +" 無く、$HISTFILE に値がある場合その値が使用されます。そうでなければ \n" +" ~/.bash_history が使用されます。\n" +"\n" +" もし $HISTTIMEFORMAT 変数が設定され、NULL で無ければ、strftime(3) の書" +"式\n" +" 文字列として各ヒストリ項目の時刻を表示する際に使用されます。それ以外は\n" +" 時刻は表示されません。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" + +#: builtins.c:879 +#, fuzzy +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"ジョブのステータスを表示します。\n" +" \n" +" アクティブなジョブを一覧表示します。JOBSPEC はジョブの出力を制限しま" +"す。\n" +" オプションがない場合全てのアクティブなジョブのステータスが表示されま" +"す。\n" +" \n" +" オプション:\n" +" -l\t通常の情報に加えてプロセスIDを一覧表示する\n" +" -n\t最後の通知からステータスが変更になったプロセスのみ一覧表示\n" +" \tする\n" +" -p\tプロセスIDのみを一覧表示する\n" +" -r\t実行中のジョブの出力を制限する\n" +" -s\t停止中のジョブの出力を制限する\n" +" \n" +" -x が指定された場合、 COMMAND は ARGS に現れるジョブをプロセスグルー\n" +" プリーダーのプロセス ID に置き換えた全てのジョブ指定の後に実行されま" +"す。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。\n" +" もし -x が使用された場合、COMMAND の終了ステータスを返します。" + +#: builtins.c:906 +#, fuzzy +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"現在のシェルからジョブを削除します。\n" +" \n" +" アクティブなジョブのテーブルから各引数の JOBSPEC を削除します。JOBSPEC が" +"指定\n" +" されない場合、シェルが現在のジョブと考えているものが使用されます。\n" +" \n" +" オプション:\n" +" -a\tJOBSPEC が与えられない時に全てのジョブを削除する\n" +" -h\tシェルが SIGHUP を受け取った時に各 JOBSPEC のジョブに対して " +"SIGHUP \n" +" \tが送られないようにマークする\n" +" -r\t実行中のジョブのみ削除する\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションか JOBSPEC が与えられない限り成功を返します。" + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"ジョブにシグナルを送ります。\n" +" \n" +" PID または JOBSPEC で識別されるプロセスに SIGSPEC または SIGNUM で名付け" +"ら\n" +" れるシグナルを送ります。もし SIGSPEC も SIGNUM も指定されない場合、" +"SIGTERM\n" +" と見なされます。\n" +" \n" +" オプション:\n" +" -s sig\tSIG をシグナル名とする\n" +" -n sig\tSIG をシグナル番号とする\n" +" -l\tシグナル名を一覧表示する。-l の後に引数が続いた場合、\n" +" \tそれらは一覧表示されるべきシグナル番号であると見なされる\n" +" \n" +" Kill は次の2つの理由からシェル組み込み関数です。一つはプロセスIDの代わり" +"に\n" +" ジョブIDを使用できるようにするためです。もう一つは作成したプロセスが制限" +"に\n" +" 達した時にプロセスを kill することができるようにするためです。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"数式を評価します。\n" +" \n" +" 各 ARG を数式として評価します。評価は固定長の整数として行われ、桁溢れは\n" +" 検査されません。しかし、0 による除算は捕捉されエラーとしてフラグが\n" +" 立ちます。次の演算子一覧は同一優先順位の演算子ごとにグループ化されてい\n" +" ます。優先順位は降順になっています。\n" +" \n" +" \tid++, id--\t変数の後置インクリメント、デクリメント\n" +" \t++id, --id\t変数の前置インクリメント、デクリメント\n" +" \t-, +\t\t単項マイナス、プラス\n" +" \t!, ~\t\t論理およびビット否定\n" +" \t**\t\t指数演算\n" +" \t*, /, %\t\t乗算、除算、剰余演算\n" +" \t+, -\t\t加算、減算\n" +" \t<<, >>\t\t左および右ビットシフト\n" +" \t<=, >=, <, >\t比較\n" +" \t==, !=\t\t等価、不等価\n" +" \t&\t\tビット論理積\n" +" \t^\t\tビット排他的論理和\n" +" \t|\t\tビット論理和\n" +" \t&&\t\t論理積\n" +" \t||\t\t論理和\n" +" \texpr ? expr : expr\n" +" \t\t\t条件演算子\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\t代入\n" +" \n" +" シェル変数は被演算子として使用できます。変数名は数式内で (強制的に固定" +"長\n" +" 整数の) 値に置き換えられます。変数は数式内で使用する時には必ずしも\n" +" 整数属性を持っている必要はありません。\n" +"\n" +" 演算子は優先順位の順に評価されます。小括弧でくくられた数式は先に評価さ" +"れ、\n" +" 上記の優先順位を上書きするかもしれません。\n" +" \n" +" 終了ステータス:\n" +" ARG の最終的な評価値が 0 の場合 let は 1 を返します。それ以外の場合は\n" +" let は 0 を返します。" + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"標準入力から一行読み込みフィールド毎に分割します。\n" +" \n" +" 標準入力から一行読み込みます。または -u が指定されている場合はファイル記" +"述子\n" +" FD から読み込みます。行は単語分割によってフィールドに分割され、最初の単語" +"が\n" +" 最初の NAME に、2番目の単語が2番目に NAME にという順で割り当てられます。" +"残っ\n" +" た単語は全て最後の NAME に割り当てられます。変数 $IFS に設定された文字の" +"みが\n" +" 単語の区切りとして認識されます。\n" +" \n" +" もし NAME を指定しなかった場合、行は REPLY 変数に保存されます。\n" +" \n" +" オプション:\n" +" -a array\t読み込んだ単語をインデックス型配列 ARRAY に順番に割り当てま" +"す。\n" +" \t\t開始番号は 0 です。\n" +" -d delim\t改行ではなく文字 DELIM が最初に現れるまで読み込みを続けます\n" +" -e\t\t対話的シェルで行を得るのに Readline を使用します\n" +" -i text\tReadline の初期テキストとして TEXT を使用します\n" +" -n nchars\t改行が無くても文字数 NCHARS を読み込んだら復帰します。" +"NCHARS\n" +" \t\tより前に区切り文字 (DELIMITER) が現れた場合は区切り文字が\n" +" \t\t優先されます\n" +" -N nchars\t厳密に文字数 NCHARS を読み込み復帰します。ただし、ファイル" +"終\n" +" \t\t了(EOF) になるか読み込みタイムアウトが発生した場合は除きます。\n" +" \t\t区切り文字 (DELIMITER) は無視されます\n" +" -p prompt\t読み込み前に文字列 PROMPT を後ろに改行を付けないで表示しま" +"す\n" +" -r\t\tバックスペースで文字をエスケープすることを禁止します\n" +" -s\t\t端末から読み込まれる文字をエコーバックしません\n" +" -t timeout\tTIMEOUT 秒以内に入力行が完全に読み込まれなかった場合\n" +" \t\tタイムアウトを発生させ失敗として復帰します。TMOUT 変数の値が\n" +" \t\tデフォルトのタイムアウトです。TIMEOUT を小数にすることもでき\n" +" \t\tます。もし TIMEOUT が 0 の場合、read は何のデータも読み込ま\n" +" \t\tずに直ちに終了し、指定したファイル記述子で入力が使用可能な場\n" +" \t\t合のみ成功返します。タイムアウト発生時の終了ステータスは128\n" +" \t\tより大きくなります\n" +" -u fd\t\t読み込みに標準入力ではなくファイル記述子 FD を使用します\n" +" \n" +" 終了ステータス:\n" +" ファイル終了(EOF)、読み込みタイムアウト(この場合は128以上)、変数への代入" +"エ\n" +" ラーが発生、 -u に無効なファイル記述子が与えられた場合を除き0を返します。" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"シェル関数から復帰します。\n" +" \n" +" N で指定した値を戻り値として関数または source されたスクリプトを終了しま" +"す。\n" +" N が指定されない場合、関数またはスクリプトで最後に実行したコマンドの戻り" +"値\n" +" が使用されます。\n" +" \n" +" 終了ステータス:\n" +" 戻り値 N、またはシェルが関数またはスクリプトを実行していない場合は失敗" +"を\n" +" 返します。" + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"シェルオプションや位置パラメーターの値を設定・消去します\n" +" \n" +" シェル属性や位置パラメーターの値を変更、またはシェル変数の名前と値\n" +" を表示します。\n" +" \n" +" オプション:\n" +" -a 変数を変更または変更してエクスポートするようにマークする\n" +" -b ジョブ終了を即時通知する\n" +" -e コマンドの終了ステータスが 0 以外の場合は即時終了する\n" +" -f ファイル名生成 (globbing) を無効にする\n" +" -h 検索したコマンドの位置を記憶する\n" +" -k 全ての値を設定する引数がコマンド実行時の環境に配置される。コ\n" +" マンド名の前にあるものに限らない\n" +" -m ジョブ制御を有効にする\n" +" -n コマンドを読み込むが実行しない\n" +" -o option-name\n" +" option-name に対応した変数を設定する:\n" +" allexport -a と同様\n" +" braceexpand -B と同様\n" +" emacs emacs スタイルの行編集インターフェースを使用\n" +" errexit -e と同様\n" +" errtrace -E と同様\n" +" functrace -T と同様\n" +" hashall -h と同様\n" +" histexpand -H と同様\n" +" history コマンドヒストリを有効にする\n" +" ignoreeof ファイル終了 (EOF) 読み込み時にシェルを終了\n" +" しない\n" +" interactive-comments\n" +" 対話コマンドでコメントの使用を許可する\n" +" keyword -k と同様\n" +" monitor -m と同様\n" +" noclobber -C と同様\n" +" noexec -n と同様\n" +" noglob -f と同様\n" +" nolog 受け付けられるが無視される\n" +" notify -b と同様\n" +" nounset -u と同様\n" +" onecmd -t と同様\n" +" physical -P と同様\n" +" pipefail パイプラインの戻り値を最後に 0 以外で終了したコ" +"マ\n" +" ンドの終了ステータスにする。0 以外のステータスで\n" +" 終了したコマンドが無い場合には 0 にする。\n" +" posix Posix 標準とデフォルト動作が異なる bash の動作を\n" +" Posix と一致するようにする\n" +" privileged -p と同様\n" +" verbose -v と同様\n" +" vi vi スタイルの行編集インターフェースを使用する\n" +" xtrace -x と同様\n" +" -p 実 uid と実効 uid が異なる時に常にオンになる。$ENV ファイルの処理\n" +" およびシェル関数のインポートが無効になる。このオプションをオフに\n" +" すると実効 uid, gid が実 uid, gid と同じに設定される\n" +" -t 一つのコマンドを読み込み、実行した後に終了する\n" +" -u 代入時に変数を未設定にするとエラーとして扱う\n" +" -v シェルの入力行を読み込んだ通りに表示する\n" +" -x 実行されるコマンドと引数をその通りに表示する\n" +" -B 中括弧の展開をシェルで行う\n" +" -C 設定した場合、リダイレクトで既存の通常ファイルを上書きすることを\n" +" 禁止する\n" +" -E 設定した場合 ERR トラップがシェル関数に継承される\n" +" -H ! スタイルのヒストリ置換を有効にする。このフラグは対話的シェルで\n" +" はデフォルトでオンになる\n" +" -P 設定した場合、 cd などのカレントディレクトリを変更するコマンドを\n" +" 実行した時にシンボリックリンクを辿らない\n" +" -T 設定した場合、 DEBUG トラップがシェル関数に継承される\n" +" -- これ以降の引数を位置パラメーターとして割り当てる。もしこれ以降の\n" +" 引数が無い場合は位置パラメーターは設定解除される\n" +" - これ以降の引数を位置パラメーターとして割り当てる。-x と -v \n" +" オプションはオフになる\n" +" \n" +" - の代わりに + を使用すると、フラグがオフになります。フラグはシェルの起\n" +" 動時にも使用することもできます。現在の設定されているフラグの組は $- で\n" +" 得られます。残りの n 個の引数 ARG は位置パラメータとして$1, $2, .. $n\n" +" の順に設定されます。もし引数 ARG が与えられない場合、全てのシェル変数が\n" +" 表示されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられない限り成功を返します。" + +#: builtins.c:1139 +#, fuzzy +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"シェル変数および関数の値・属性を消去します。\n" +" \n" +" 各 NAMEに対して関連する値または関数を削除します。\n" +" \n" +" オプション:\n" +" -f\t各 NAME をシェル関数として扱う\n" +" -v\t各 NAME をシェル変数として扱う\n" +" -n\t各 NAME を名前参照として扱い、変数自身を消去する。参照として\n" +"\t\t評価はしない。 \n" +" \n" +" オプションが無い場合、最初に変数を消去しようと試みます。失敗した場合に" +"は\n" +" 関数を消去しようと試みます。\n" +" \n" +" いくつかの変数は消去できません。`readonly' も参照してください。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるか NAME が読み取り専用の場合を除き成功を返し" +"ます。" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"シェル変数に export 属性を設定します。\n" +" \n" +" 各 NAME に対して後に続けて実行されるコマンドの環境変数として自動的に\n" +" エクスポートされるようにマークします。VALUE が与えられた場合はエクス\n" +" ポートする前に値を設定します。\n" +"\n" +" オプション:\n" +" -f\tシェル関数を参照します\n" +" -n\t各 NAME に対してエクスポート属性を削除します\n" +" -p\t全てのエクスポートされた変数・関数一覧を表示します\n" +" \n" +" 引数 `--' 以降はオプションとして処理されません。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるか、無効な NAME が与えられない限り成功\n" +" を返します。" + +#: builtins.c:1180 +#, fuzzy +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"シェル変数を変更不可にします。\n" +" \n" +" 各 NAME を読み取り専用にします。これらの NAME の値はこれ以降の代入で\n" +" 変更ができなくなります。VALUE が与えられた場合、読み取り専用にする前\n" +" に値が設定されます。\n" +" \n" +" オプション:\n" +" -a\tインデックス型配列変数を示します\n" +" -A\t連想配列変数を示します\n" +" -f\tシェル関数を示します\n" +" -p\t全ての読み取り専用変数・関数の一覧を表示します。-fオプシ\n" +"\t\t ョンがあるかないかで動作が変わります。\n" +" \n" +" 引数 `--' は以降のオプション処理を無効にします\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるか、与えられた NAME が無効な場合を除き成功\n" +" を返します。" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"位置パラメーターをシフトします。\n" +" \n" +" 位置パラメーター名 $N+1,$N+2 ... を $1,$2 ... に変更します。 \n" +" N が与えられなかった場合、1 と見なされます。\n" +" \n" +" 終了ステータス:\n" +" Nが負の値または $# より大きい場合を除き成功を返します。" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"ファイルを読み込み現在のシェルでコマンドを実行します。\n" +" \n" +" FILENAME を読み込み現在のシェルでコマンドを実行します。$PATH の項目が\n" +" FILENAME が含まれるディレクトリを見つけるために使用されます。引数\n" +" ARGUMENTS が与えられた場合 FILENAME を実行する際の位置パラメーターと\n" +" して使用されます。\n" +" \n" +" 終了ステータス:\n" +" FILENAME で最後に実行したコマンドのステータスを返します。FILENAME が\n" +" 読み込めなかった場合は失敗を返します。" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"シェルの実行を一時停止します。\n" +" \n" +" SIGCONT シグナルを受け取るまでこのシェルの実行を一時停止します。強制\n" +" オプションが無い限りログインシェルは一時停止できません。\n" +" \n" +" オプション:\n" +" -f\tシェルがログインシェルだとしても強制的に一時停止する\n" +" \n" +" 終了ステータス:\n" +" ジョブ制御が有効でないかエラーが発生しない限り成功を返します。" + +#: builtins.c:1261 +#, fuzzy +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"条件式を評価します。\n" +" \n" +" 式 EXPR の結果に応じて 0 (真、true) または 1 (偽、false) を返します。\n" +" 式は単項演算子または二項演算子です。単項演算子はファイルのステータス\n" +" を評価するために使用されます。文字列演算子と数値比較演算子も加えて\n" +" 存在します。\n" +" \n" +" ファイル演算子:\n" +" \n" +" -a FILE ファイルが存在する時に真(true)\n" +" -b FILE ファイルがブロック特殊デバイスの時に真(true)\n" +" -c FILE ファイルがキャラクタ特殊デバイスの時に真(true)\n" +" -d FILE ファイルがディレクトリの時に真(true)\n" +" -e FILE ファイルが存在する時に真(true)\n" +" -f FILE ファイルが存在し、通常ファイルの時に真(true)\n" +" -g FILE ファイルに setgid が設定されている時に真(true)\n" +" -h FILE ファイルがシンボリックリンクの時に真(true)\n" +" -L FILE ファイルがシンボリックリンクの時に真(true)\n" +" -k FILE ファイルに sticky ビットが設定されている時に真(true)\n" +" -p FILE ファイルが名前付きパイプの時に真(true)\n" +" -r FILE ファイルがユーザに対して読み込み可能な時に真(true)\n" +" -s FILE ファイルが存在し、かつ空ファイルでない場合に真(true)\n" +" -S FILE ファイルがソケットの場合に真(true)\n" +" -t FD FD(ファイル識別子) が端末に開いている時に真(true)\n" +" -u FILE ファイルに setuid が設定されている時に真(true)\n" +" -w FILE ファイルがユーザに対して書き込み可能な時に真(true)\n" +" -x FILE ファイルがユーザに対して実行可能な時に真(true)\n" +" -O FILE ファイルをユーザが実効的に所有されている時に真(true)\n" +" -G FILE ファイルのグループにユーザが実効的に所属している時に真" +"(true)\n" +" -N FILE ファイルを最後に読み込んだ以降に変更されている時に真" +"(true)\n" +" \n" +" FILE1 -nt FILE2 file1 が file2 より新しい時(更新時間に基づく)に真" +"(true)\n" +" \n" +" \n" +" FILE1 -ot FILE2 file1 が file2 より古い時に真(true)\n" +" \n" +" FILE1 -ef FILE2 file1 が file2 に対するハードリンクの時に真(true)\n" +" \n" +" 文字列演算子:\n" +" \n" +" -z STRING 文字列が空の時に真(true)\n" +" \n" +" -n STRING\n" +" STRING 文字列が空でない時に真(true)\n" +" \n" +" STRING1 = STRING2\n" +" 文字列が同一の時に真(true)\n" +" STRING1 != STRING2\n" +" 文字列が同一でない時に真(true)\n" +" STRING1 < STRING2\n" +" 辞書順で STRING1 が STRING2 より前の時に真(true)\n" +" STRING1 > STRING2\n" +" 辞書順で STRING1 が STRING2 より後の時に真(true)\n" +" \n" +" その他演算子:\n" +" \n" +" -o OPTION シェルオプション OPTION が有効な時に真(true)\n" +" -v VAR シェル変数 VAR が設定されている時に真(true)\n" +" -R VAR シェル変数 VAR が設定され、名前参照の時に真(true)\n" +" ! EXPR 式 expr が偽(fales)の時に真(true)\n" +" EXPR1 -a EXPR2 式 expr1 および expr2 の両方とも真(true)の時に真(true)\n" +" EXPR1 -o EXPR2 式 expr1 または expr2 のいずれかが真(true)の時に真" +"(true)\n" +" \n" +" arg1 OP arg2 数値比較演算を行なう。OP は -eq, -ne, -lt, -le, -gt,\n" +" または -ge のいずれかとなる。\n" +" \n" +" 数値演算二項演算子は ARG1 と ARG2 の関係がそれぞれ、等しい(-eq)、\n" +" 等しくない(-ne)、より小さい(-lt)、以下(-le)、より大きい(-gt)、または\n" +" 以上(-ge)の時に真(true)を返します。\n" +" \n" +" 終了ステータス:\n" +" 式 EXPR の評価値が真(true)の時に成功を返します。EXPR の評価値が偽(false) " +"または\n" +" 引数が無効な場合に失敗を返します。" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"条件式を評価します。\n" +" \n" +" これは test 組み込み関数と同義語です。ただし、最後の引数に開始の`['と一" +"致\n" +" するように文字`]'を与えなければいけません。" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"プロセスの時間を表示します。\n" +" \n" +" シェルとその子プロセスが使用したユーザー時間とシステム時間それぞれの累積" +"を\n" +" 表示します。\n" +" \n" +" 終了ステータス:\n" +" 常に成功を返します。" + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"シグナルまたは他のイベントをトラップします。\n" +" \n" +" シェルがシグナルを受け取るか他の条件が発生した時に実行されるハンドラー" +"を\n" +" 定義および有効化します。\n" +" \n" +" ARG はシグナル SIGNAL_SPEC を受け取った時に読み込まれ実行されるコマンド\n" +" です。もし ARG が無い (かつシグナル SIGNAL_SPEC が与えられた場合) また" +"は\n" +" `-' の場合、各指定したシグナルはオリジナルの値にリセットされます。\n" +" ARG が NULL 文字列の場合、各シグナル SIGNAL_SPEC はシェルにおよび起動さ\n" +" れたコマンドによって無視されます。\n" +" \n" +" もし SIGNAL_SPEC が EXIT (0) の場合、ARG がシェルの終了時に実行されま" +"す。\n" +" もし SIGNAL_SPEC が DEBUG の場合 ARG は単に毎回コマンドの前に実行されま" +"す。\n" +" もし SIGNAL_SPEC が RETURN の場合 ARG はシェル関数または . か source に\n" +" よって実行されたスクリプトが終了した時に実行されます。 SIGNAL_SPEC が " +"ERR\n" +" の場合、-e オプションが有効な場合にシェルが終了するようなコマンド失敗が" +"発\n" +" 生するたびに実行されます。\n" +" \n" +" もし引数が与えられない場合、 trap は各シグナルに割り当てられたコマンド" +"の\n" +" 一覧を表示します。\n" +" \n" +" オプション:\n" +" -l\tシグナル名とシグナル番号の対応一覧を表示します\n" +" -p\t各 SIGNAL_SPEC に関連づけられた trap コマンドを表示します\n" +" \n" +" 各 SIGNAL_SPEC は にあるシグナル名かシグナル番号です。シグ\n" +" ナル名は大文字小文字を区別しません。また SIG 接頭辞はオプションです。\n" +" シグナルはシェルに対して \"kill -signal $$\" で送ることができます。\n" +" \n" +" 終了ステータス:\n" +" SIGSPEC が無効か、無効なオプションを与えられない限り成功を返します。" + +#: builtins.c:1400 +#, fuzzy +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"コマンドの種類に関する情報を表示します。\n" +" \n" +" 各 NAME に対してコマンド名として使われた時にどのように解釈されるかを\n" +" 示します。\n" +" \n" +" オプション:\n" +" -a\tNAME という名前になっている実行可能なものの全ての位置を表示し\n" +" \tます。これには `-p' が同時に指定されていない場合に限ってエイリアス、\n" +" \t組み込み関数、シェル関数も含みます\n" +" -f\tシェル関数の検索を抑止します\n" +" -P\t各 NAME に対して PATH 探索を強制します。エイリアス、組み込み\n" +" \t関数、シェル関数があったとしても実行されるディスク上のファイル名を\n" +" \t返します\n" +" -p\t実行されるディスク上のファイル名を返します。`type -t NAME'\n" +" \tが `file' を返さない場合、何も返しません。\n" +" -t\t次のいずれかの単語を返します。`alias', `keyword', `function',\n" +" \t `builtin', `file' or `'。それぞれ NAME がエイリアス、シェル予約語、\n" +" \tシェル関数、シェル組み込み関数、ディスク上のファイル、何も見つからな" +"い\n" +" \tに対応します。\n" +" \n" +" 引数:\n" +" NAME\t解釈するコマンドの名前です。\n" +" \n" +" 終了ステータス:\n" +" 全ての NAME が見つかった場合に成功を返します。どれかが見つからなかった場" +"合\n" +" は失敗を返します。" + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"シェルの資源制限を変更します。\n" +" \n" +" システムがシェルの資源制御を提供している場合、シェル、およびシェルが生" +"成\n" +" するプロセスに対する資源の制御を行います。\n" +" \n" +" オプション:\n" +" -S\t緩い (soft) 資源制御を使用する\n" +" -H\t厳しい (hard) 資源制御を使用する\n" +" -a\t現在の制限を表示する\n" +" -b\tソケットの大きさ\n" +" -c\t作成されるコアファイルの最大サイズ\n" +" -d\tプロセスのデータセグメントの最大サイズ\n" +" -e\tスケジューリング優先度 (`nice') の最大値\n" +" -f\tシェルおよびその子プロセスが書き込める最大ファイルサイズ\n" +" -i\tシグナル抑制の最大数\n" +" -l\tメモリ内に固定できるプロセスの最大サイズ\n" +" -m\tthe maximum resident set size\n" +" -n\t開けるファイル記述子の最大数\n" +" -p\tパイプのバッファサイズ\n" +" -q\tPOSIX メッセージキュー内の最大バイト数\n" +" -r\tリアルタイムスケジューリング優先度の最大値\n" +" -s\t最大スタックサイズ\n" +" -t\tCPU時間量の最大値 (単位:秒)\n" +" -u\tユーザプロセスの最大数\n" +" -v\t仮想メモリの最大サイズ\n" +" -x\tファイルロックの最大数\n" +" -T\tスレッドの最大数\n" +" \n" +" すべてのプラットフォームですべてのオプションが利用可能とは限りません。\n" +" \n" +" LIMIT を指定した場合、指定した資源に新しい値が設定されます。`soft', \n" +" `hard' および `unlimited' という特別な値は現在の緩やかな制限、現在の\n" +" 厳しい制限、および無制限を意味します。\n" +" LIMIT を指定しない場合、指定した資源の現在の値を表示します。オプション" +"を\n" +" 指定しない場合、-f と見なされます。\n" +" \n" +" -t は秒単位、-p は 512バイトごと、-u はプロセス数であり、それ以外は\n" +" 1024 バイト単位です。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションを与えるか、エラーが発生しない限り、成功を返します。" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"ファイルのモードマスクを表示または設定します。\n" +" \n" +" ユーザーがファイル作成時のマスクを MODE に設定します。MODE が指定されない" +"場合\n" +" 現在のマスクの値を表示します。\n" +" \n" +" MODE が数値で開始した場合8進数として解釈されます。それ以外は chmod(1) で" +"受け\n" +" 入れられるシンボルモードの文字列として扱われます。\n" +" \n" +" オプション:\n" +" -p\tMODE が指定されない場合、入力として再利用可能な形式で表示します\n" +" -S\tシンボルモードで出力します。それ以外は8進数で出力します\n" +" \n" +" 終了ステータス:\n" +" MODE が無効か、無効なオプションが与えられない限り成功を返します。" + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"ジョブの実行完了を待ち、終了ステータスを返します。\n" +" \n" +" ID で識別される各プロセス (プロセスID または ジョブ指定) を待ち、その終" +"了\n" +" ステータスを返します。ID が与えられない場合、現在アクティブな全ての子プ\n" +" ロセスを待ち 0 を返します。ID がジョブ指定の場合ジョブのパイプラインに\n" +" ある全てのプロセスを待ちます。\n" +" \n" +" 終了ステータス:\n" +" 最後の ID の終了ステータスを返します。IDが無効であるか、無効なオプ\n" +" ションが与えられた場合には失敗を返します。" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"プロセスの実行完了を待ち、終了ステータスを返します。\n" +" \n" +" PIDで指定された各プロレスを待ち、その終了ステータスを返します。PID が与え" +"られ\n" +" ない場合、現在アクティブな全ての子プロセスを待ち、0 を返します。PID は\n" +" プロセスIDでなければいけません。\n" +" \n" +" 終了ステータス:\n" +" 最後の PID の終了ステータスを返します。PIDが無効か、無効なオプションが与" +"えられた\n" +" 場合は失敗します。" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"リストの各要素に対してコマンドを実行します。\n" +" \n" +" `for' ループではリストの各要素に対して一連のコマンドを実行します。\n" +" `in WORDS ...;' が存在しない場合、`in \"$@\"' であると見なされます。\n" +" WORDS の要素が NAME の値として代入され COMMANDS が実行されます。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"算術 for ループ\n" +" \n" +" 以下と等価です。\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1、EXP2、および EXP3 は数式です。いずれかの数式を省略した場合、\n" +" 値が 1 であるとして評価されます。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"一覧から項目を選択し、COMMANDS を実行します。\n" +" \n" +" WORDS が展開され、項目の一覧が生成されます。展開された項目\n" +" の組は標準エラー出力に表示されます。各項目の前には数値が付け\n" +" られます。`in WORDS' が存在しない場合、`in \"$@\"' と仮定されます。\n" +" 次に PS3 プロンプトが表示され、標準入力から 1 行読み込まれます。\n" +" 行が表示した項目の一つに関連づけられた数値で構成されていた場合、\n" +" NAME に項目が設定されます。空行の場合、プロンプトが再度表示され\n" +" ます。ファイル終了(EOF) が読み込まれた場合、コマンドが終了します。\n" +" それ以外の場合は NAME に null が設定されます。読み込んだ行は変数\n" +" REPLY に保存されます。行が読み込まれるごとに break コマンドが実\n" +" 行されるまで COMMANDS が繰り返し実行されます。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"パイプラインを実行する時に消費された時間を報告します。\n" +" \n" +" PIPELINE を実行し、終了時に PIPELINE を実行するために費やされた実\n" +" 時間、ユーザー CPU 時間、およびシステム CPU 時間の要約を表示します。\n" +" \n" +" オプション:\n" +" -p\t移植性のある Posix 形式で時間の要約を表示します\n" +" \n" +" 変数 TIMEFORMAT の値が出力の形式として使用されます。\n" +" \n" +" 終了ステータス:\n" +" PIPELINE の戻り値が終了ステータスとなります。" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"パターン一致の結果に基づいてコマンドを実行します。\n" +" \n" +" WORD が PATTERN に一致するかどうかに基づいて選択的に COMMANDS を実行しま" +"す。\n" +" 複数のパターンを区切るために `|' が使用されます。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"条件に従ってコマンドを実行します。\n" +" \n" +" `if COMMANDS' を実行します。この終了ステータスが 0 の場合、`then " +"COMMANDS'\n" +" を実行します。そうでない場合は、各 `elif COMMANDS' を順番に実行し、その\n" +" 終了ステータスが 0 の場合に、関連した `then COMMANDS' を実行し、if 文が\n" +" 完了します。それ以外の場合、 `else COMMANDS' が存在する場合には実行され\n" +" ます。文全体の終了ステータスは、最後に実行したコマンドの終了ステータス" +"か、\n" +" または、テストした条件に true となるものが無い場合は 0 です。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドの終了ステータスを返します。" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"テストが成功する限りコマンドを実行します。\n" +" \n" +" `while' COMMANDS にある最後のコマンドの終了ステータスが 0 である間 \n" +" COMMANDS を展開して実行します。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"テストが失敗する限りコマンドを実行します。\n" +" \n" +" `until' COMMANDS にある最後のコマンドの終了ステータスが 0 でない間\n" +" COMMANDS を展開して実行します。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"NAME という名前の非同期プロセスを作成します。\n" +" \n" +" COMMAND を非同期で実行します。コマンドの標準出力および標準入力は実行\n" +" しているシェルのインデックス型配列変数 NAME の要素添字 0、1 に設定\n" +" されるファイル記述子へのパイプとして接続されます。\n" +" デフォルトの NAME は \"COPROC\" です。\n" +" \n" +" 終了ステータス:\n" +" COMMAND の終了ステータスを返します。" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"シェル関数を定義します。\n" +" \n" +" NAME という名前のシェル関数を作成します。単にコマンドとして起動された時" +"は\n" +" NAME は COMMANDs をシェルのコンテキスト内で呼び出します。NAME を起動し" +"た\n" +" 時に引数は関数に $1...$n という位置パラメーターで、関数名は $FUNCNAME\n" +" 変数として渡されます。\n" +" \n" +" 終了ステータス:\n" +" NAME が読み取り専用でない限り成功を返します。" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"複数のコマンドを一つにグループ化します。\n" +" \n" +" 複数のコマンドをグループにして1セットとして実行します。これはコマンド\n" +" のセット全体をリダイレクトする一つの方法です。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"ジョブをフォアグラウンドで再開します。\n" +" \n" +" `fg' コマンドの引数として与える JOB_SPEC と等価です。停止または\n" +" バックグラウンドのジョブを再開します。JOB_SPEC はジョブ名または\n" +" ジョブ番号で指定します。JOB_SPEC の後に `&' を続けると、`bg' の\n" +" 引数として与えられたようにジョブをバックグラウンドにします。\n" +" \n" +" 終了ステータス:\n" +" 再開されたジョブの終了ステータスを返します。" + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"算術式を評価します。\n" +" \n" +" 算術式の規定に基づいて EXPRESSION を評価します。\"let EXPRESSION\"\n" +" と等価です。\n" +" \n" +" 終了ステータス:\n" +" EXPRESSION の評価値が 0 の場合は 1、それ以外は 0 を返します。" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"条件式のコマンドを実行します。\n" +" \n" +" 条件式 EXPRESSION の評価結果に基づいて 0 または 1 を返します。\n" +" 条件式は test 組み込み関数と同じ優先順位で組み合わされます。また、\n" +" 次の演算子とも組み合わされます。\n" +" \n" +" ( EXPRESSION )\tEXPRESSION の値を返します\n" +" ! EXPRESSION\t\tEXPRESSION が true の時 false を返します。それ\n" +" \t\t以外は false を返します\n" +" EXPR1 && EXPR2\tEXPR1 および EXPR2 の両方が true の時 true を返しま" +"す。\n" +" \tそれ以外は false を返します。\n" +" EXPR1 || EXPR2\tEXPR1 および EXPR2 のいずれかが true の時 true を返し\n" +" \tます。それ以外は false を返します。\n" +" \n" +" `==' および `!=' 演算子が使用された場合、演算子の右側の文字列をパターン" +"と\n" +" した左側の文字列に対するパターン一致処理が行われます。\n" +" `=~' 演算子が使用された場合、演算子の右側の文字列が正規表現として扱われ" +"ま\n" +" す。\n" +" \n" +" && および || 演算子は EXPR1 で式の値を決定するのに十分な場合は EXPR2 を\n" +" 評価しません。\n" +" \n" +" 終了ステータス:\n" +" EXPRESSION の値に基づいて 0 または 1 を返します。" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"通常の変数名とその使用法。\n" +" \n" +" BASH_VERSION\tBashのバージョン情報。\n" +" CDPATH\t`cd`の引数として与えられたディレクトリを検索する際に\n" +" \t\t使用されるコロン (:) で区切られたディレクトリの一覧。\n" +" GLOBIGNORE\tパス名を展開する時に無視されるコロン (:) で区切られた\n" +" \t\tファイル名パターンの一覧。\n" +" HISTFILE\tコマンドヒストリが保存されるファイル名。\n" +" HISTFILESIZE\tヒストリファイルに保存することができる最大行数。\n" +" HISTSIZE\t実行中のシェルがアクセスできる最大ヒストリ行数。\n" +" HOME\tログインディレクトリの完全パス名。\n" +" HOSTNAME\t現在のホスト名。\n" +" HOSTTYPE\tこのバージョンの Bash を実行している CPU の種類。\n" +" IGNOREEOF\tシェルがファイル終了 (EOF) 文字を単一の入力として受け\n" +" \t\t取った時の動作を制御します。設定されている場合、空白行\n" +" \t\tで EOF 文字をその数連続して受け取った時にシェルを終了\n" +" \t\tします (デフォルト 10)。設定が解除された場合、EOF で\n" +" \t\t入力が終了することを意味します。\n" +" MACHTYPE\tBash が実行されている現在のシステムを表す文字列。\n" +" MAILCHECK\tBash がメールを確認する頻度 (秒単位)。\n" +" MAILPATH\tBash が新規メールを確認するコロン (:) で区切られた\n" +" \t\tファイル名の一覧。\n" +" OSTYPE\tこのバージョンの Bash を実行している OS のバージョン。\n" +" PATH\tコマンドを検索する際に使用されるコロン (:) で区切ら\n" +" \t\tれたディレクトリの一覧。\n" +" PROMPT_COMMAND\tプライマリプロンプトが表示される前に毎回実行\n" +" \t\tされるコマンド。\n" +" PS1\t\tプライマリプロンプト文字列。\n" +" PS2\t\tセカンダリプロンプト文字列。\n" +" PWD\t\t現在のディレクトリの完全パス名。\n" +" SHELLOPTS\tコロン (:) で区切られた有効なシェルオプション一覧。\n" +" TERM\t現在の端末種類名。\n" +" TIMEFORMAT\t`time' 予約語による時間統計情報の表示書式。\n" +" auto_resume\tnull で無い場合、その行に現れたコマンドは、まず現在停止\n" +" \t\tされているジョブから検索されます。それで見つかった場合、\n" +" \t\tジョブがフォアグランドになります。値が `exact' の場合、\n" +" \t\tコマンドが停止しているジョブの一覧と厳密に一致していなけ\n" +" \t\tればなりません。値が `substring' の場合、コマンドがジョ\n" +" \t\tブの部分文字列に一致しなければなりません。その他の値の\n" +" \t\t場合はコマンドが停止しているジョブの先頭部分に一致しな\n" +" \t\tければなりません。\n" +" histchars\tヒストリ展開とクイック置換を制御する文字。最初の文字が\n" +" \t\tヒストリ展開の文字で通常は `!' です。二番目がクイック\n" +" \t\t置換で通常は `^' です。三番目がヒストリのコメントで\n" +" \t\t通常は `#' です。\n" +" HISTIGNORE\tヒストリ一覧に保存されるコマンドを決める時に使用される\n" +" \t\tコロン (:) で区切られたパターンの一覧。\n" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"ディレクトリをディレクトリスタックに加えます。\n" +" \n" +" ディレクトリをディレクトリスタックの先頭に加える、またはディレ\n" +" クトリを回転してカレントディレクトリがスタックの先頭になるよう\n" +" にします。引数がない場合、先頭の二つのディレクトリを入れ替えま\n" +" す。\n" +" \n" +" オプション:\n" +" -n\tスタックに加えた時、通常のディレクトリ変更を抑止し\n" +" \tます。よってスタックのみ操作されます。\n" +" \n" +" 引数:\n" +" +N\tN 番目のディレクトリが先頭になるようスタックを回転\n" +" \tします (`dirs' で表示される一覧の左から数えます。開始番号\n" +" \tは 0 です)。\n" +" \n" +" -N\tN 番目のディレクトリが先頭になるようスタックを回転\n" +" \tします (`dirs' で表示される一覧の右から数えます。開始番号\n" +" \tは 0 です)。\n" +" \n" +" dir\tDIR をディレクトリスタックの先頭に加え、カレント\n" +" \tディレクトリにします。\n" +" \n" +" `dirs' 組み込み関数でディレクトリスタックを表示します。\n" +" \n" +" 終了ステータス:\n" +" 無効な引数が与えられるかディレクトリ変更が失敗しない限り成功を\n" +" 返します。" + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"ディレクトリスタックからディレクトリを削除します。\n" +" \n" +" ディレクトリスタックから要素を削除します。引数がない場合、ディレクトリ\n" +" スタックの先頭から削除し、新しいスタック先頭のディレクトリに移動しま" +"す。\n" +" \n" +" オプション:\n" +" -n\tスタックからディレクトリを削除した時、通常のディレクトリ変\n" +" \t更を抑止します。よってスタックのみ操作されます。\n" +" \n" +" 引数:\n" +" +N\t`dirs' で表示される一覧の左から数えて N 番目の要素を削除し\n" +" \tます。開始番号は 0 です。例えば、`popd +0' は先頭のディレクトリを\n" +" \t削除します。`popd +1' は二番目です。\n" +" \n" +" -N\t`dirs' で表示される一覧の右から数えて N 番目の要素を削除し\n" +" \tます。開始番号は 0 です。例えば、`popd -0' は最後のディレクトリを\n" +" \t削除します。`popd -1' は最後から二番目です。\n" +" \n" +" `dirs' 組み込み関数でディレクトリスタックを表示します。\n" +" \n" +" 終了ステータス:\n" +" 無効な引数が与えられるかディレクトリ変更が失敗しない限り成功を\n" +" 返します。" + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"ディレクトリスタックを表示します。\n" +" \n" +" 現在記憶されているディレクトリ一覧を表示します。ディレクトリは `pushd'\n" +" コマンドを使用して一覧に追加され、`popd' コマンドを通して一覧から取り\n" +" 戻されます。\n" +" \n" +" オプション:\n" +" -c\t全ての要素を削除してディレクトリスタックを空にします\n" +" -l\tホームディレクトリからの相対パスを ~ を先頭にした形式で\n" +" \t表示しません\n" +" -p\t一行に一つのディレクトリスタック要素を表示します\n" +" -v\t一行に一つのディレクトリスタック要素を位置に関する番号\n" +" \tをつけて表示します\n" +" \n" +" 引数:\n" +" +N\tdirs を引数無しで実行した時の一覧で左から数えて N 番目の\n" +" \t要素のみを表示します。開始番号は 0 です。\n" +" \n" +" -N\tdirs を引数無しで実行した時の一覧で右から数えて N 番目の\n" +" \t要素のみを表示します。開始番号は 0 です。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"シェルオプションを設定、および設定解除します。\n" +" \n" +" 各シェルオプション OPTNAME の設定を変更します。引数がない場合、シェル\n" +" オプション全てを、それぞれ設定されているか否かを含めて表示します。\n" +" \n" +" オプション:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tそれぞれのシェルオプションを、状態を含めて表示します\n" +" -q\t出力を抑止します\n" +" -s\tOPTNAME をそれぞれ有効 (設定) にします\n" +" -u\tOPTNAME をそれぞれ無効 (非設定) にします\n" +" \n" +" 終了ステータス:\n" +" OPTNAME が有効な場合は成功を返します。無効なオプションが与えられた場合\n" +" または OPTNAME が無効な場合は失敗を返します。" + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"ARGUMENTS を FORMAT で書式整形して表示します。\n" +" \n" +" オプション:\n" +" -v var\t標準出力に表示するのではなく、出力をシェル変数 VAR に代入しま" +"す\n" +" \n" +" FORMAT は次の3種類のオブジェクトを含む文字列です。一つ目は普通の文字で単" +"に\n" +" 標準出力にコピーされます。二つ目はエスケープ文字で変換された後標準出力" +"に\n" +" コピーされます。三つ目は書式指定文字で、各文字は後に続く引数を表示しま" +"す。\n" +" \n" +" printf(1) に記述される標準の書式指定に加えて、printf は次の文字を解釈しま" +"す。\n" +" \n" +" %b\t対応する引数のバックスラッシュエスケープ文字を展開する\n" +" %q\tシェル入力として引数をクオートする\n" +" %(fmt)T FMT を strftime(3) 用の書式文字列として日付と時間の文字列を出" +"力する\n" +" \n" +" FORMAT はすべての ARGUMENTS を使い切る必要があります。FORMATが必要とす" +"る\n" +" ARGUMENTS より少ない場合、残りの書式指定は値が 0 または null 文字列が適" +"切\n" +" に与えられているかのように動作します。\n" +"\n" +" 終了ステータス:\n" +" 無効な引数が与えられるか、書き込み、代入エラーが発生しない限り成功を返し" +"ます。" + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"引数が Readline によってどのように補完されるかを指定します。\n" +" \n" +" 各 NAME に対してどのように引数が補完されるかを指定します。オプションが与" +"え\n" +" られない場合、既存の補完指定が入力として再利用可能な形式で表示されま" +"す。\n" +" \n" +" \n" +" オプション:\n" +" -p\t既存の補完指定を再利用可能な形式で表示する\n" +" -r\t補完指定 NAME を削除します。NAME が与えられない場合、全ての\n" +" \t補完指定を削除する\n" +" -D\t補完指定が定義されていない時のコマンドに対するデフォルトの\n" +" \t補完と動作を適用する\n" +" -E\t\"空\" コマンドに対する補完 (空行に対する補完の試み) と動作\n" +" \tを適用する\n" +" \n" +" 補完が試みられた時、上記オプションのうち大文字のオプションの動作が\n" +" 行われます。-D オプションは -E オプションより優先されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"オプションに基づいた補完候補を表示します。\n" +" \n" +" シェル関数の中で補完候補を生成するために使用するように意図されていま" +"す。\n" +" オプション引数 WORD が与えられた場合、WORD に対して一致した候補が生成\n" +" されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"補完オプションを編集または表示します。\n" +" \n" +" 各 NAME に対して補完オプションを変更します。NAME が与えられない場合、\n" +" 補完が直ちに実行されます。もし OPTION が与えられない場合、各 NAME \n" +" または現在の補完に対する補完オプションを表示します。\n" +" \n" +" オプション:\n" +" \t-o option\t各 NAME に対して補完オプション OPTION を設定する\n" +" \t-D\t\t\"デフォルト\" コマンド補完オプションを変更する\n" +" \t-E\t\t\"空\" コマンド補完オプションを変更する\n" +" \n" +" `-o' の代わりに `+o' を使用すると指定したオプションをオフにします。\n" +" \n" +" 引数:\n" +" \n" +" 各 NAME は `complete' 組み込み関数を使って事前に定義された補完指定をコ" +"マ\n" +" ンドを指し示さなければなりません。NAME が与えられない場合、compopt は\n" +" 補完をこれから生成する関数から呼び出されなければいけません。そして\n" +" 補完をこれから生成する関数に対するオプションが変更されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるか、 NAME が補完指定として定義されていない場" +"合\n" +" を除き、成功を返します。" + +#: builtins.c:2047 +#, fuzzy +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"標準入力から行を読み込みインデックス型配列に代入します。\n" +" \n" +" 標準入力、-u オプションが与えられた場合はファイル記述子 FD から行を読み込" +"み、\n" +" インデックス型配列変数 ARRAY に代入します。変数 ARRAY のデフォルトは " +"MAPFILE\n" +" です。\n" +" \n" +" オプション:\n" +" -n count\t最大 COUNT 行をコピーする。COUNT が 0 の場合、全ての行をコ" +"ピーする\n" +" -O origin\t配列の開始番号を ORIGIN にする。デフォルトは 0\n" +" -s count \t最初の COUNT 行の読み込みを破棄する\n" +" -t\t\t各行を読み込んだ時に最後の改行を削除する\n" +" -u fd\t\t標準入力ではなくファイル記述子 FD から行を読み込む\n" +" -C callback\tQUANTUM 行を読み込む毎に CALLBACK を評価する\n" +" -c quantum\tCALLBACK を何行読み込む毎に実行するかを指定する\n" +" \n" +" 引数:\n" +" ARRAY\t\tデータを保存するために使用する配列変数名\n" +" \n" +" もし -c が指定されずに -C が与えられた場合、デフォルトの quantum は 5000 " +"です。\n" +" CALLBACK が評価された時、代入される配列の次要素のインデックスと、要素に代" +"入さ\n" +" れる行が追加の引数として渡されます。\n" +" \n" +" 明示的に開始番号が与えられない場合、mapfile は代入前に ARRAY を空にしま" +"す。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられる、配列が読み取り専用、またはインデックス型配" +"列で無い\n" +" 場合を除き成功を返します。" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"ファイルから行を読み込み配列変数に代入します。\n" +" \n" +" `mapfile'の別名です。" + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2016 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "現在のサブルーチン呼び出しのコンテキストを返します。\n" +#~ " \n" +#~ " EXPR が無い場合、次を返します " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: プロセス %5ld (%s) が the_pipeline にあります" + +#~ msgid "Unknown Signal #" +#~ msgstr "不明なシグナル番号" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/bash-5.1/po/ko.gmo b/bash-5.1/po/ko.gmo new file mode 100644 index 0000000000000000000000000000000000000000..e8dbf4963447029ab9a8c8dceee7c1ff22964daa Binary files /dev/null and b/bash-5.1/po/ko.gmo differ diff --git a/bash-5.1/po/ko.po b/bash-5.1/po/ko.po new file mode 100644 index 0000000000000000000000000000000000000000..0131769131c7fce0746e3dd10ee0555407e74149 --- /dev/null +++ b/bash-5.1/po/ko.po @@ -0,0 +1,4447 @@ +# Korean Translation for bash +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# SooHyun Kim , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-11-23 16:28+0900\n" +"Last-Translator: SooHyun Kim \n" +"Language-Team: Korean \n" +"Language: ko\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "잘못된 배열 첨자" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: 이름 참조 속성을 지우는 중" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: 인덱스 배열을 연관 배열로 변환할 수 없음" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: 유효하지 않은 연관 배열 키" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: 숫자가 아닌 인덱스에 할당할 수 없음" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: 연관 배열을 할당하기 위해서 반드시 첨자를 사용해야 함" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: 생성할 수 없음: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: 명령어를 위한 keymap을 찾을 수 없음" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: 공백이 아닌 첫 문자가 '\"' 가 아님" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "%2$s에 닫는 '%1$c' 없음" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: 콜론(:) 구분자 없음" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "'%s': unbind 할 수 없음" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "괄호 확장: '%s'를 위해 메모리를 할당할 수 없음" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "괄호 확장: %u개 요소를 위한 메모리 할당 실패" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "괄호 확장: '%s'를 위한 메모리 할당 실패" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "'%s': 유효하지 않은 별명" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "줄 편집 활성화되어있지 않음" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "'%s': 유효하지 않은 keymap 이름" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: %s를 읽을 수 없음" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': 알 수 없는 함수 이름" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s 는 어느 키에도 bind 되어있지 않음.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s 는 다음을 통해 호출될 수 있음 " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "'%s': unbind 할 수 없음" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "반복 횟수" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "'for', 'while' 또는 'until' 반복문에서만 의미가 있음" + +#: builtins/caller.def:136 +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME 설정되지 않음" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "인자가 너무 많음" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null 디렉토리" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD 설정되지 않음" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "%d 줄: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "경고: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: 사용법: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: 옵션에 인자가 필요함" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: 숫자로 된 인자가 필요함" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: 찾을 수 없음" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: 유효하지 않은 옵션" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: 유효하지 않은 옵션 이름" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': 유효한 식별자가 아님" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "유효하지 않은 8진수" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "유효하지 않은 16진수" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "유효하지 않은 수" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: 유효하지 않은 신호 정의" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "'%s': pid가 아니거나 유효한 job spec이 아님" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: 읽기 전용 변수임" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s가 범위를 벗어남" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "인자" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s가 범위를 벗어남" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: 그러한 job이 없음" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: job control이 없음" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "job control이 없음" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: 제한됨" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "제한됨" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: 쉘 내장이 아님" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "쓰기 오류: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "터미널 속성 설정 오류: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "터미널 속성 읽기 오류: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: 현재 디렉토리를 받아오는 데 오류 발생: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: 모호한 job spec" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "이 버전에는 도움말이 없음" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: unset할 수 없음: %s가 읽기 전용임" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: unset할 수 없음" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: 유효하지 않은 액션 이름" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: 완료 사양 없음" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "경고: -F 옵션이 예상대로 작동하지 않을 수 있음" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "경고: -C 옵션이 예상대로 작동하지 않을 수 있음" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "현재 완료 함수가 실행중이 아님" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "함수에서만 사용될 수 있음" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: 참조 변수로 배열이 올 수 없음" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: 이름 참조 변수의 자가 참조는 허용되지 않음" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: 순환 이름 참조" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "'%s': 유효하지 않은 이름 참조 변수 이름" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "함수를 만들기 위해 '-f'를 사용할 수 없음" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: 읽기 전용 함수임" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: 따옴표를 이용한 복합 배열 할당은 향후 제거될 예정임" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: 이 방법으로 배열 변수를 파괴할 수 없음" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: 참조 배열을 인덱스 배열로 변환할 수 없음" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "동적 로딩을 이용할 수 없음" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "공유 오브젝트 %s를 열 수 없음: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "공유 오브젝트 %2$s에서 %1$s를 찾을 수 없음: %3$s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: 동적으로 로드되지 않음" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "%s에 대한 함수 로드가 실패 반환 (%d): 로드되지 않음" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: 동적으로 로드되지 않음" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: 삭제할 수 없음: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: 디렉터리임" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: 일반적인 파일이 아님" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: 파일이 너무 큼" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: 바이너리 파일을 실행할 수 없음" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: 실행할 수 없음: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "로그아웃\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "로그인 쉘이 아님: 'exit'를 사용하세요" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "정지된 job이 있습니다.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "실행중인 job이 있습니다.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "명령어를 찾을 수 없음" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "히스토리 사양" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: 임시 파일을 열 수 없음: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "현재" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "job %d가 job control 없이 시작함" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: 잘못된 옵션 -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: 옵션이 인자를 필요로 함 -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "해싱 비활성화됨" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: 해시 테이블이 비어있음\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tcommand\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "다음 키워드에 일치하는 쉘 명령어 '" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"'%s'에 해당하는 도움말 주제가 없습니다. 'man -k %s' 또는 'info %s'를 사용해 " +"보세요." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: 열 수 없음: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"이 쉘 명령어들은 내부적으로 정의되어 있습니다. 목록을 보려면 `help' 를 입력" +"하세요.\n" +"`help name' 을 입력하면 함수 `name' 에 대한 정보를 더 확인할 수 있습니다.\n" +"쉘에 대한 일반적인 정보를 더 확인하려면 `info bash' 를 사용하세요.\n" +"이 목록에 없는 명령어에 대해 더 알아보려면 `man -k' 또는 `info' 를 사용하세" +"요.\n" +"\n" +"명령어 이름 다음의 별 (*) 은 해당 명령어가 비활성화 되었음을 의미합니다.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "-anrw를 한 개 이상 사용할 수 없음" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "히스토리 위치" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: 유효하지 않은 타임스탬프" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: 히스토리 확장 실패" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib 실패" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "'-x'와 다른 옵션들은 같이 사용할 수 없음" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: 인자는 반드시 프로세스 또는 job ID이어야 함" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "알 수 없는 오류" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "표현식을 예상함" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: 인덱스 배열이 아님" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: 유효하지 않은 파일 디스크립터 명세" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: 유효하지 않은 파일 디스크립터: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: 유효하지 않은 줄 수" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: 유효하지 않은 배열의 시작" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: 유효하지 않은 콜백 양자" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "빈 배열 변수 이름" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "배열 변수 지원이 필요함" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "'%s': 서식 문자 없음" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "'%c': 유효하지 않은 시간 포맷 사양" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "'%c': 유효하지 않은 서식 문자" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "경고: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "형식 파싱 문제: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "\\x에 16진수 숫자 없음" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "\\%c에 해당하는 유니코드 문자 없음" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "다른 디렉토리 없음" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: 유효하지 않은 인자" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<현재 디렉토리 없음>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "디렉토리 스택이 비어있음" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "디렉토리 스택 인덱스" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"현재 기억된 디렉토리의 목록을 보여줍니다. 디렉토리들은\n" +" `pushd' 명령을 통해 목록에 경로를 저장할 수 있고; 'popd' \n" +" 명령을 통해 거슬러 올라갈 수 있습니다.\n" +" \n" +" 옵션:\n" +" -c\t원소를 전부 삭제함으로써 디렉토리 스택을 초기화합니다\n" +" -l\t홈 디렉토리까지 ~로 축약된 상대경로를 표시하지 않습니다\n" +" -p\t한 줄에 하나씩 디렉토리 스택을 표시합니다\n" +" -v\t한 줄에 하나씩 스택의 위치와 함께 디렉토리 스택을 표시합니다\n" +" \n" +" 인자:\n" +" +N\t인자 없이 실행될 때 보여지는 목록의 왼쪽부터 N번째 항목을 보여줍니" +"다.\n" +" \t세는 수는 0부터 시작합니다.\n" +" \n" +" -N\t인자 없이 실행될 때 보여지는 목록의 오른쪽부터 N번째 항목을 보여줍" +"니다.\n" +"\t세는 수는 0부터 시작합니다." + +#: builtins/pushd.def:723 +#, fuzzy +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"디렉토리 스택의 최상위에 디렉토리를 추가하거나 스택을 회전\n" +" 하거나, 현재 작업중인 디렉토리에서 스택의 새 최상위를 \n" +" 만듭니다. 인자가 없다면 상위 두 디렉토리를 교환합니다.\n" +" \n" +" 옵션:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" `dirs' 내장은 디렉토리 스택을 보여줍니다." + +#: builtins/pushd.def:748 +#, fuzzy +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"디렉토리 스택에서 항목을 제거합니다. 주어진 인자가 없을 경우\n" +" 최상위 디렉토리를 스택에서 제거하고 새 최상위 디렉토리로 변경합니다.\n" +" \n" +" 옵션:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: 유효하지 않은 타임아웃 정의" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "읽기 오류: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "함수 또는 소스된 스크립트에서만 'return' 할 수 있음" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "함수와 변수를 동시에 unset할 수 없음" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: 배열 변수가 아님" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: 함수가 아님" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: export할 수 없음" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "시프트 횟수" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "쉘 옵션을 동시에 set 하고 unset 할 수 없음" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: 유효하지 않은 쉘 옵션 이름" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "인자로 파일 이름이 반드시 필요함" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: 파일을 찾을 수 없음" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "일시 정지할 수 없음" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "로그인 쉘을 일시 정지할 수 없음" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s는 '%s'의 별칭임\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s 는 쉘 키워드임\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s 는 함수임\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s 는 특수한 쉘 내장임\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s 는 쉘 내장임\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s 는 %s 임\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s 는 해시됨 (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: 유효하지 않은 제한 인자" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "'%c': 잘못된 명령어" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: 제한을 읽을 수 없음: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "제한" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: 제한을 변경할 수 없음: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "8진수" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "'%c': 유효하지 않은 심볼릭 모드 연산자" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "'%c': 유효하지 않은 심볼릭 모드 문자" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " 줄 " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "마지막 명령: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "취소중..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "정보: " + +#: error.c:462 +msgid "unknown command error" +msgstr "알 수 없는 명령어 오류" + +#: error.c:463 +msgid "bad command type" +msgstr "잘못된 명령어 타입" + +#: error.c:464 +msgid "bad connector" +msgstr "잘못된 커넥터" + +#: error.c:465 +msgid "bad jump" +msgstr "잘못된 점프" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: 해제된 변수" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\a입력 대기중 시간 초과: 자동으로 로그아웃\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "표준 입력을 /dev/null에서 리다이렉트 할 수 없음: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': 유효하지 않은 서식 문자" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] 가 여전히 존재" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "파이프 오류" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: 최대 eval 중첩 레벨 초과 (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: 최대 소스 중첩 레벨 초과 (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: 최대 함수 중첩 레벨 초과 (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: 제한됨: 명령 이름에 '/'를 지정할 수 없음" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: 명령어를 찾을 수 없음" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: 잘못된 인터프리터" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: 이진 파일을 실행할 수 없음: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "'%s': 특수한 내장 명령임" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "fd %d를 fd %d로 복제할 수 없음" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "표현식 재귀 레벨 초과됨" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "재귀 스택 언더플로우" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "표현식 문법 오류" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "변수가 아닌 것에 할당을 시도함" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "변수 할당 문법 오류" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "0으로 나눔" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "버그: 잘못된 표현식 토큰" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "조건문에 ':' 예상함" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "지수가 0보다 작음" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "전위 증가 또는 후위 감소 후에 식별자를 예상함" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "')' 빠짐" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "문법 오류: 피연산자 예상함" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "문법 오류: 유효하지 않은 산술 연산자" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (오류 토큰은 \"%s\" 임)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "유효하지 않은 진법" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: 유효하지 않은 줄 수" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "해당 진법에서 표현할 수 없는 값" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: 표현식 오류\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: 부모 디렉터리에 접근할 수 없음" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "fd %d에 대해 nodelay 모드를 재설정 할 수 없음" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "fd %d에서 bash 입력을 위한 새 파일 디스크립터를 할당할 수 없음" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: 새로운 fd %d를 위한 버퍼가 이미 존재함" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "포크된 pid %d가 실행중인 job %d에 나타남" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "프로세스 그룹 %2$ld의 정지된 작업 %1$d 를 삭제중" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) 가 현재도 살아있다고 표시됨" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: 그런 pid가 없음" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "신호 %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "완료" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "멈춤" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "멈춤(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "실행중" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "완료(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "나감 %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "알 수 없는 상태" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(코어 덤프됨) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "child setpgid (%ld 에서 %ld 로)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld는 이 쉘의 자식이 아님" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: 프로세스 %ld에 대한 기록 없음" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: job %d 은 정지됨" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: 그러한 job이 없음" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: 작업이 종료됨" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: job %d는 이미 백그라운드에 있음" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: 정의되지 않은 블록을 피하기 위해 WNOHANG를 켜는 중" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: 줄 %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (코어 덤프됨)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd now: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp 실패" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: 백그라운드에 job control 없음" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: line discipline" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "터미털 프로세스 그룹 (%d)을 설정할 수 없음" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "이 쉘에 job control 없음" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: assertion 실패: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: assertion 망가짐\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "알 수 없음" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: block on free list clobbered" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: 이미 해제된 블록 인자를 가지고 호출됨" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: 할당되지 않은 블록 인자와 호출됨" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: 언더플로우 감지; mh_nbytes가 범위를 벗어남" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: 언더플로우 감지; mh_nbytes가 범위를 벗어남" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: 시작과 끝의 청크 사이즈가 다름" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: 할당되지 않은 블록 인자를 가지고 호출됨" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: 언더플로우 감지; mh_nbytes가 범위를 벗어남" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: 언더플로우 감지; mh_nbytes가 범위를 벗어남" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: 시작과 끝의 청크 사이즈가 다름" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: FIND_ALLOC이 할당 테이블이 가득 찼다고 함?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p가 할당된 테이블에 있음?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p가 이미 해제된 테이블에 있음?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "유효하지 않은 진법" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: 알 수 없는 호스트" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: 유효하지 않은 서비스" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: 잘못된 네트워크 경로 사양" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "네트워크 작업은 지원되지 않음" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: 로케일을 바꿀 수 없음 (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: 로케일을 바꿀 수 없음 (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: 로케일을 바꿀 수 없음 (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: 로케일을 바꿀 수 없음 (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "$_에 메일이 있습니다" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "$_에 새로운 메일이 있습니다" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "%s에 있는 메일은 읽었습니다\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "문법 오류: 산술 표현식이 필요함" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "문법 오류: ';' 예상되지 않음" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "문법 오류: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: 잘못된 명령어 형식 %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document가 줄 %d 에서 파일의 끝으로 구분됨 (`%s'를 예상함)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: 리다이렉션 명령어 `%d' 범위 벗어남" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu)가 SIZE_MAX (%lu)를 초과함: 줄 잘림" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "최대 here-document 카운트 초과" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "'%c'를 찾는 도중 예상하지 못한 파일의 끝" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "']]'를 찾던 도중 예상하지 못한 파일의 끝" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "조건 표현식에 문법 오류: 예상하지 못한 토큰 '%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "조건 표현식에 문법 오류" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "예상되지 않은 토큰 '%s', ')' 예상됨" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "')' 예상됨" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "조건 단항 연산자에 예기치 않은 인자 '%s'" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "조건 단항 연산자에 예기치 않은 인자" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "예기치 않은 토큰 '%s', 조건 이항 연산자 예상됨" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "조건 이항 연산자 예상됨" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "조건 이항 연산자에 대해 예기치 않은 인자 '%s'" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "조건 이항 연산자에 대해 예기치 않은 인자" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "조건 명령어에서 예기치 않은 토큰 '%c'" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "조건 명령어에서 예기치 않은 토큰 '%s'" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "조건 명령어에서 예기치 않은 토큰 %d" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "예기치 않은 토큰 '%s' 근처에서 문법 오류" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "'%s' 근처에서 문법 오류" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "문법 오류: 예기치 않은 파일의 끝" + +#: parse.y:6365 +msgid "syntax error" +msgstr "문법 오류" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "쉘을 나가려면 \"%s\"를 사용하세요.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "맞는 ')'를 찾던 도중 예기치 않은 파일의 끝" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: 함수 `%s' 를 찾을 수 없음" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: 가능한 재시도 루프" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: 잘못된 커넥터 `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: 유효하지 않은 파일 디스크립터" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL 파일 포인터" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': 잘못된 서식 문자" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "파일 디스크립터 범위 벗어남" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: 모호한 리다이렉트" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: 이미 있는 파일을 덮어쓸 수 없음" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: 제한됨: 출력을 리다이렉트할 수 없음" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "here-document를 위한 임시 파일을 생성할 수 없음: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: fd를 변수에 할당할 수 없음" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port 는 네트워킹 없이 지원되지 않음" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "리다이렉션 오류: fd를 복제할 수 없음" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "/tmp를 찾을 수 없음, 만들어 주세요!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp는 반드시 유효한 디렉토리 이름이어야 함" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "상호적 쉘에서는 pretty-printing 모드가 무시됨" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: 유효하지 않은 옵션" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "uid를 %d로 설정할 수 없음: effective uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "gid를 %d로 설정할 수 없음: effective gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "디버거를 시작할 수 없음; 디버깅 모드 비활성화됨" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: 는 디렉터리임" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "이름 없음!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, 버전 %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"사용법:\t%s [GNU 긴 옵션] [옵션] ...\n" +"\t%s [GNU 긴 옵션] [옵션] 스크립트-파일 ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU 긴 옵션:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "쉘 옵션:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD 또는 -c 명령 또는 -O shopt_option\t\t(invocation 전용)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s 또는 -o 옵션\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"`%s -c \"help set\"' 를 사용하면 쉘 옵션에 관해 더 많은 정보를 확인할 수 있습" +"니다.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"`%s -c help' 를 사용하면 쉘 내장 명령어에 관해 더 많은 정보를 확인할 수 있습" +"니다.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "버그를 보고하려면 'bashbug' 명령을 사용하세요.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash 홈페이지: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"GNU 소프트웨어를 사용하는데 일반적인 도움말: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: 유효하지 않은 작업" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Bogus 신호" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Hangup" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "인터럽트" + +#: siglist.c:58 +msgid "Quit" +msgstr "나가기" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Illegal instruction" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT 명령" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT 명령" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "부동 소수점 예외" + +#: siglist.c:86 +msgid "Killed" +msgstr "Killed" + +#: siglist.c:90 +msgid "Bus error" +msgstr "버스 오류" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "세그멘테이션 오류" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "잘못된 시스템 콜" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "고장난 파이프" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "알람 시계" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminated" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "긴급한 IO 상황" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "멈춤 (신호)" + +#: siglist.c:126 +msgid "Continue" +msgstr "계속" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "자식이 죽거나 멈춤" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "멈춤 (tty 입력)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "멈춤 (tty 출력)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O 준비" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU 제한" + +#: siglist.c:154 +msgid "File limit" +msgstr "파일 제한" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "알람 (가상)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "알람 (프로파일)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "윈도우 변경됨" + +#: siglist.c:170 +msgid "Record lock" +msgstr "기록 잠금" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "유저 신호 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "유저 신호 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT 입력 데이터 대기중" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "전원 문제 임박" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "시스템 충돌 임박" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "다른 CPU로 프로세스 이전" + +#: siglist.c:198 +msgid "programming error" +msgstr "프로그래밍 오류" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT 모니터 모드 승인됨" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT 모니터 모드 철회됨" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT 사운드 절차가 완료됨" + +#: siglist.c:214 +msgid "Information request" +msgstr "정보 요청" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "알 수 없는 신호 #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "잘못된 대체: %2$s에 닫는 '%1$s' 없음" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: 리스트를 배열 멤버에 할당할 수 없음" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "프로세스 대체를 위해 파이프를 만들 수 없음" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "프로세스 대체를 위해 자식을 만들 수 없음" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "읽기를 위해 명명된 파이프 %s를 열 수 없음" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "쓰기를 위해 명명된 파이프 %s를 열 수 없음" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "명명된 파이프 %s를 fd %d로 복제할 수 없음" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "command substitution: 입력의 null 바이트 무시됨" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "명령어 대체를 위해 파이프를 만들 수 없음" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "명령어 대체를 위해 자식을 만들 수 없음" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: 파이프를 fd 1로 복제할 수 없음" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: 이름 참조에 대해 유효하지 않은 변수 이름" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: 유효하지 않은 간접 확장" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: 유효하지 않은 변수 이름" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: 파라미터 설정되지 않음" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: 파라미터가 null 또는 설정되지 않음" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: 부분 문자열 표현식 < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: 잘못된 대체" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: 이 방법으로 할당할 수 없음" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "향후 버전의 쉘에서는 산술 대체로 연산이 강제됩니다" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "잘못된 대체: %s에 닫는 \"`\" 없음" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "일치 없음: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "인자 예상됨" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: 정수 표현식 예상됨" + +#: test.c:265 +msgid "`)' expected" +msgstr "`)' 예상됨" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "`)' 예상되었으나 %s를 발견" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: 이항 연산자 예상됨" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: 단항 연산자 예상됨" + +#: test.c:881 +msgid "missing `]'" +msgstr "']' 없음" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "문법 오류: ';' 예상되지 않음" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "유효하지 않은 신호 번호" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: 최대 trap handler 레벨 초과 (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: trap_list[%d]에 잘못된 값: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: 신호 핸들러는 SIG_DFL 이고, %d (%s)를 자신에게 보내는 중" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: 잘못된 신호 %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "'%s'에 대해 함수 정의를 불러오는데 오류 발생" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "쉘 레벨 (%d)이 너무 높습니다, 1로 재설정합니다" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: 현재 범위에서 함수 컨텍스트 없음" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: 변수는 할당된 값이 될 수 없음" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: 이름 참조에 정수를 할당하고 있음" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: 현재 범위에서 함수 컨텍스트 없음" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s가 null exportstr을 가짐" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%2$s를 위한 exportstr에서 유효하지 않은 문자 %1$d" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "%s를 위한 exportstr에 '=' 없음" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: shell_variables의 시작이 함수의 컨텍스트가 아님" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: 컨텍스트에 global_variables 없음" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: shell_variables의 시작이 임시 환경 범위가 아님" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: 파일로써 열 수 없음" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: 추척 파일 디스크립터에 유효하지 않은 값" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: 호환 값이 범위를 벗어남" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"라이선스 GPLv3+: GNU GPL version 3 or later \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, 버전 %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %lu bytes를 할당할 수 없음 (%lu bytes 할당됨)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: %lu bytes를 할당할 수 없음" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: %lu bytes를 할당할 수 없음 (%lu bytes 할당됨)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: %lu bytes를 할당할 수 없음" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [name[=value] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] name [name ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function 또는 readline-command]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [name[=value] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] name[=value] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [옵션] name[=value] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [인자 ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [인자 ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f 파일명] [이름 ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [인자 ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [first] [last] 또는 fc -s [pat=rep] [command]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [패턴 ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d 오프셋] [n] 또는 history -anrw [파일명] 또는 history -ps " +"arg [인자...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] 또는 jobs -x command [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... 또는 kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o 옵션이름] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] 또는 export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] 또는 readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source 파일명 [인자들]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". 파일명 [인자들]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ 인자... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] name [name ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [모드]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case 단어 in [패턴 [| 패턴]...) 명령어 ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if 명령어; then 명령어; [ elif 명령어; then 명령어; ]... [ else 명령어; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while 명령어; do 명령어; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until 명령어; do 명령어; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAME] command [redirections]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { 명령어 ; } 또는 name () { 명령어 ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ 명령어 ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( 표현식 ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ 표현식 ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [옵션이름...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v 변수] format [인자]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " +"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DEI] [name ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Null 명령.\n" +" \n" +" 효과 없음; 아무것도 하지 않습니다.\n" +" \n" +" 종료 상태:\n" +" 항상 성공합니다." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"성공적인 결과를 반환합니다.\n" +" \n" +" 종료 상태:\n" +" 항상 성공합니다." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"실패한 결과를 반환합니다.\n" +" \n" +" 종료 상태:\n" +" 항상 실패합니다." + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"간단한 명령을 실행하거나 명령에 관한 정보를 표시합니다..\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" 옵션:\n" +" -p 표준 유틸리티를 전부 찾을 수 있다고 보장된 PATH의\n" +" 기본 값을 사용합니다.\n" +" -v `type' 빌트인과 유사한 명령의 설명을 보여줍니다\n" +" -V 각 명령에 관해 더 상세한 정보를 보여줍니다\n" +" \n" +" 종료 상태:\n" +" 명령의 실행 결과를 반환하거나 명령이 없을 경우 오류를 반환합니다." + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"변수의 값과 속성을 설정합니다.\n" +" \n" +" `declare'의 동의어 입니다. `help declare'를 보십시오." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"로그인 쉘을 나갑니다.\n" +" \n" +" 종료 상태 N으로 로그인 쉘을 나갑니다. 로그인 쉘에서 실행되지 않는 경우\n" +" 에러가 발생합니다." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"쉘 실행을 일시정지합니다.\n" +" \n" +" SIGCONT 신호를 받을 때 까지 쉘의 실행을 일시 정지합니다.\n" +" 강제 옵션이 없는 경우 로그인 쉘은 일시 정지될 수 없습니다.\n" +" \n" +" 옵션:\n" +" -f\t로그인 쉘의 경우에도 일시 정지를 강제합니다.\n" +" \n" +" 종료 상태:\n" +" job control이 활성화되지 않았거나 오류가 발생하지 않으면 성공을 반환합니" +"다." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +#: builtins.c:1726 +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"디렉토리 스택을 보여줍니다.\n" +" \n" +" 현재 기억된 디렉토리의 목록을 보여줍니다. 디렉토리들은\n" +" `pushd' 명령을 통해 목록에 경로를 저장할 수 있고; 'popd' \n" +" 명령을 통해 거슬러 올라갈 수 있습니다.\n" +" \n" +" 옵션:\n" +" -c\t원소를 전부 삭제함으로써 디렉토리 스택을 초기화합니다\n" +" -l\t홈 디렉토리까지 ~로 축약된 상대경로를 표시하지 않습니다\n" +" -p\t한 줄에 하나씩 디렉토리 스택을 표시합니다\n" +" -v\t한 줄에 하나씩 스택의 위치와 함께 디렉토리 스택을 표시합니다\n" +" \n" +" 인자:\n" +" +N\t인자 없이 실행될 때 보여지는 목록의 왼쪽부터 N번째 항목을 보여줍니" +"다.\n" +" \t세는 수는 0부터 시작합니다.\n" +" \n" +" -N\t인자 없이 실행될 때 보여지는 목록의 오른쪽부터 N번째 항목을 보여줍" +"니다.\n" +"\t세는 수는 0부터 시작합니다.\n" +" 종료 상태:\n" +" 유효하지 않은 옵션이 주어지거나 오류가 발생하지 않는다면 성공을 반환합니" +"다." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"파일에서 줄을 읽어 배열 변수에 넣습니다.\n" +" \n" +" `mapfile'의 동의어." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "현재 서브루틴 콜의 컨텍스트를 반환합니다.\n" +#~ " \n" +#~ " EXPR이 없으면, 다음을 반환 " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: 프로세스 %5ld (%s) 는 the_pipeline에 있음" + +#~ msgid "Unknown Signal #" +#~ msgstr "알 수 없는 신호 #" diff --git a/bash-5.1/po/lt.gmo b/bash-5.1/po/lt.gmo new file mode 100644 index 0000000000000000000000000000000000000000..31a29ca45d16415baed89fddab49bab81724b063 Binary files /dev/null and b/bash-5.1/po/lt.gmo differ diff --git a/bash-5.1/po/lt.po b/bash-5.1/po/lt.po new file mode 100644 index 0000000000000000000000000000000000000000..06bdb4492a9b88a509f71fda6face462c853b0e8 --- /dev/null +++ b/bash-5.1/po/lt.po @@ -0,0 +1,4694 @@ +# translation of bash-4.0.po to Lithuanian +# Copyright (C) 2008 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Gintautas Miliauskas , 2009. +msgid "" +msgstr "" +"Project-Id-Version: bash-4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2009-03-25 16:49+0200\n" +"Last-Translator: Gintautas Miliauskas \n" +"Language-Team: Lithuanian \n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" +"%100<10 || n%100>=20) ? 1 : 2);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "blogas masyvo indeksas" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" + +#: arrayfunc.c:700 +#, fuzzy, c-format +msgid "%s: invalid associative array key" +msgstr "%s: netaisyklingas veiksmo pavadinimas" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: nepavyko priskirti prie neskaitinio indekso" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: nepavyko sukurti: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: nepavyko rasti keymapo komandai" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: pirmas ne tarpo simbolis nėra „\"“" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "nėra uždarančiojo „%c“ %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: trūksta dvitaškio skirtuko" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: nepavyko atjungti (unbind)" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, fuzzy, c-format +msgid "`%s': invalid alias name" +msgstr "„%s“: netaisyklingas keymap'o pavadinimas" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "eilutės redagavimas neįgalintas" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s“: netaisyklingas keymap'o pavadinimas" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: nepavyko perskaityti: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s“: nežinomas funkcijos pavadinimas" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s nėra priskirtas jokiam klavišui.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s gali būti iškviestas su " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: nepavyko atjungti (unbind)" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "prasminga tik „for“, „while“ arba „until“ cikle" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Grąžina esamos procedūros kontekstą.\n" +" \n" +" Be IŠRAIŠKOS, grąžina „$eilutė $failo_vardas“. Su IŠRAIŠKA,\n" +" grąžina „$eilutė $procedūra $failo_vardas“; ši papildoma informacija\n" +" gali būti panaudota kuriant steko išrašą (stack trace).\n" +" \n" +" IŠRAIŠKOS reikšmė nurodo, per kiek kvietimo freimų grįžti nuo\n" +" esamo; viršutinis freimas yra 0." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME nenustatytas" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "per daug argumentų" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "steko viršūnėje esančiu." + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD nenustatytas" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "eilutė %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "įspėjimas: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: naudojimas: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: parametrui reikia argumento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: reikia skaitinio argumento" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: nerasta" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: negalimas parametras" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: netaisyklingas parametro vardas" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': netaisyklingas identifikatorius" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "netaisyklingas aštuonetainis skaičius" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "netaisyklingas šešioliktainis skaičius" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "netaisyklingas skaičius" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: netaisyklinga signalo specifikacija" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s“: ne pid'as ar taisyklinga darbo specifikacija" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: kintamasis tik skaitymui" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s išėjo už ribų" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumentas" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s už ribų" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: nėra tokio darbo" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: nėra darbų valdymo" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "nėra darbų valdymo" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: apribota" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "apribota" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ne vidinė aplinkos komanda" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "rašymo klaida: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: klaida skaitant esamą aplanką: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: dviprasmis darbo aprašymas" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nepavyko ištrinti: %s tik skaitymui" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nepavyko ištrinti" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: netaisyklingas veiksmo pavadinimas" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: nėra baigimo specifikacijos" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "įspėjimas: parametras -F gali neveikti taip, kaip tikitės" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "įspėjimas: parametras -C gali neveikti taip, kaip tikitės" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "galima naudoti tik funkcijoje" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "negalima naudoti „-f“ funkcijoms kurti" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funkcija tik skaitymui" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: negalima tokiu būdu sunaikinti masyvų kintamųjų" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dinaminis įkrovimas negalimas" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "nepavyko atverti bendrojo objekto %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "nepavyko rasti %s bendrajame objekte %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: nedinamiškai įkrauta" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: nedinamiškai įkrauta" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: nepavyko ištrinti: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: aplankas" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ne paprastas failas" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: failas per didelis" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: negalima vykdyti dvejetainių failų" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: nepavyko paleisti: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ne prisijungimo aplinka: naudokite „exit“" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Yra sustabdytų darbų.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Yra veikiančių darbų.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "komandų nerasta" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "istorijos specifikacija" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: nepavyko atverti laikinojo failo: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "darbas %d pradėtas be darbų valdymo" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: neleistinas parametras -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: parametrui reikia argumento -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "maiša išjungta" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: maišos lentelė tuščia\n" + +#: builtins/hash.def:267 +#, fuzzy, c-format +msgid "hits\tcommand\n" +msgstr "paskutinė komanda: %s\n" + +#: builtins/help.def:133 +#, fuzzy +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Aplinkos komandos, atitinkančios raktažodį „" +msgstr[1] "Aplinkos komandos, atitinkančios raktažodį „" +msgstr[2] "Aplinkos komandos, atitinkančios raktažodį „" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nėra žinyno temų, atitinkančių „%s“. Bandykite „help help“, „man -k %s“ arba " +"„info %s“." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: nepavyko atverti: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Šios aplinkos komandos vidinės. Jei norite pamatyti šį sąrašą, įveskite " +"„help“.\n" +"Įveskite „help fn“, jei norite sužinoti daugiau apie funkciją „fn“.\n" +"Įveskite „info bash“, jei norite daugiau sužinoti apie aplinką apskritai.\n" +"Naudokite „man -k“ ir „info“, jei norite sužinoti daugiau apie komandas, " +"nesančiasšiame sąraše.\n" +"\n" +"Žvaigždutė (*) prie vardo reiškia, kad komanda išjungta.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "negalima naudoti daugiau negu vieno parametro iš -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "istorijos pozicija" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: netaisyklingas parametro vardas" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: istorijos išskleidimas nesėkmingas" + +#: builtins/inlib.def:71 +#, fuzzy, c-format +msgid "%s: inlib failed" +msgstr "%s: istorijos išskleidimas nesėkmingas" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "su „-x“ neleidžiama naudoti kitų parametrų" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumentai turi būti procesų arba darbų ID" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Nežinoma klaida" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "tikėtasi išraiškos" + +#: builtins/mapfile.def:178 +#, fuzzy, c-format +msgid "%s: not an indexed array" +msgstr "%s: ne masyvo kintamasis" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: netaisyklinga failo deskriptoriaus specifikacija" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: netaisyklingas failo deskriptorius: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, fuzzy, c-format +msgid "%s: invalid line count" +msgstr "%s: nesamas parametras" + +#: builtins/mapfile.def:299 +#, fuzzy, c-format +msgid "%s: invalid array origin" +msgstr "%s: nesamas parametras" + +#: builtins/mapfile.def:316 +#, fuzzy, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: netaisyklingas veiksmo pavadinimas" + +#: builtins/mapfile.def:349 +#, fuzzy +msgid "empty array variable name" +msgstr "%s: ne masyvo kintamasis" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s“: trūksta formato simbolio" + +#: builtins/printf.def:474 +#, fuzzy, c-format +msgid "`%c': invalid time format specification" +msgstr "%s: klaidinga laiko ribos (timeout) specifikacija" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c“: netaisyklingas formato simbolis" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "įspėjimas: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "trūksta šešioliktainio skaitmens išraiškoje \\x" + +#: builtins/printf.def:900 +#, fuzzy, c-format +msgid "missing unicode digit for \\%c" +msgstr "trūksta šešioliktainio skaitmens išraiškoje \\x" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nėra kito aplanko" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: netaisyklingas limito argumentas" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "" + +#: builtins/pushd.def:526 +#, fuzzy +msgid "directory stack index" +msgstr "rekursijos steko atvirkštinis perpildymas" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: klaidinga laiko ribos (timeout) specifikacija" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "skaitymo klaida: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "galima grįžti (return) tik iš funkcijos ar scenarijaus" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "negalima kartu ištrinti funkcijos ir kintamojo" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ne masyvo kintamasis" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ne funkcija" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: nepavyko ištrinti" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "postūmių skaičius" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "negalima aplinkos nuostatos vienu metu įjungti ir išjungti" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: netaisyklingas aplinkos nuostatos pavadinimas" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "reikia failo pavadinimo argumento" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: failas nerastas" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "nepavyko sustabdyti" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "nepavyko sustabdyti prisijungimo aplinkos" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s yra „%s“ sinonimas\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s yra aplinkos raktinis žodis\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s yra funkcija\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s yra aplinkos vidinė komanda\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s yra aplinkos vidinė komanda\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s yra %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s yra hešuotas (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: netaisyklingas limito argumentas" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': bloga komanda" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: nepavyko gauti limito: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "riba" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: nepavyko pakeisti limito: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "aštuntainis skaičius" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c“: netaisyklingas simbolinės veiksenos operatorius" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c“: netaisyklingas simbolinės veiksenos simbolis" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " eilutė " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "paskutinė komanda: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Nutraukiama..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "nežinoma komandos klaida" + +#: error.c:463 +msgid "bad command type" +msgstr "blogas komandos tipas" + +#: error.c:464 +msgid "bad connector" +msgstr "blogas jungtukas" + +#: error.c:465 +msgid "bad jump" +msgstr "blogas šuolis" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: nepriskirtas kintamasis" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\alaukiant įvedimo baigėsi laikas: automatiškai atsijungta\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "nepavyko peradresuoti standartinio įvedimo iš /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: „%c“: netaisyklingas formato simbolis" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +#, fuzzy +msgid "pipe error" +msgstr "rašymo klaida: %s" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: apribota: negalima naudoti „/“ komandų pavadinimuose" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: komanda nerasta" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: blogas interpretatorius" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: negalima vykdyti dvejetainių failų" + +#: execute_cmd.c:5977 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s yra aplinkos vidinė komanda\n" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "nepavyko dublikuoti fd %d į fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "viršytas išraiškos rekursijos lygis" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "rekursijos steko atvirkštinis perpildymas" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "sintaksės klaida išraiškoje" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "bandymas priskirti ne kintamajam" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "sintaksės klaida išraiškoje" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "dalyba iš 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "klaida: bloga expassign leksema" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "sąlygos išraiškoje tikėtasi „:“" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "eksponentė mažesnis už 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" +"po prieš-didinimo ar prieš-mažinimo operatoriaus tikėtasi identifikatoriaus" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "Trūksta „)“" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "sintaksės klaida: tikėtasi operando" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "sintaksės klaida: netaisyklingas aritmetinis operatorius" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "netaisyklingas aritmetinis pagrindas" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: nesamas parametras" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "per didelė pagrindo reikšmė" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: išraiškos klaida\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: nepavyko pasiekti aukštesnių aplankų" + +#: input.c:99 subst.c:6069 +#, fuzzy, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "nepavyko dublikuoti fd %d į fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "nepavyko išskirti naujo failo deskriptoriaus bash įvedimui iš fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: naujam fd %d buferis jau egzistuoja" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "trinamas sustabdytas darbas %d procesų grupėje %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: tokio pid nėra" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signalas %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Atlikta" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "" + +#: jobs.c:1892 +msgid "Running" +msgstr "" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Atlikta(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Nežinoma būsena" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr "" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld nėra šios aplinkos dukterinis procesas" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: nėra proceso %ld įrašo" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: darbas %d yra sustabdytas" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: nėra tokio darbo" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: darbas užsibaigė" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: darbas %d jau fone" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: %d eilutė: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr "" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "šioje aplinkoje nėra darbų valdymo" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: pažeista prielaida: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: prielaida pažeista\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "nežinoma" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: blokas iš laisvų blokų sąrašo sugadintas" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: iškviestas su jau atlaisvintu bloku" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: iškviestas su nerezervuotu bloku" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: atvirkštinis perpildymas (underflow); mh_nbytes už ribos" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: atvirkštinis perpildymas (underflow); mh_nbytes už ribos" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: pradžios ir pabaigos blokų (chunk) dydžiai skiriasi" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: iškviestas su nerezervuotu bloku" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: atvirkštinis perpildymas (underflow); mh_nbytes už ribos" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: atvirkštinis perpildymas (underflow); mh_nbytes už ribos" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: pradžios ir pabaigos blokų (chunk) dydžiai skiriasi" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: alloc lentelė pilna su FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p jau lentelėje kaip rezervuotas?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p jau lentelėje kaip laisvas?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "netaisyklingas pagrindas" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: adresas nežinomas" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: netaisyklinga tarnyba" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: netaisyklingas tinklo kelias" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "tinklo operacijos nepalaikomos" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" + +#: locale.c:292 +#, fuzzy, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų" + +#: locale.c:294 +#, fuzzy, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Turite laiškų $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Turite naujų laiškų $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Paštas %s perskaitytas\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "sintaksės klaida: reikia aritmetinės išraiškos" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "sintaksės klaida: netikėtas „;“" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "sintaksės klaida: „((%s))“" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: blogas instrukcijos tipas %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: nukreipimo instrukcija „%d“ už ribų" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "netikėta failo pabaiga ieškant atitinkamo „%c“" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "netikėta failo pabaiga ieškant „]]“" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "sintaksės klaida sąlygos išraiškoje: netikėta leksema „%s“" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "sintaksės klaida sąlygos išraiškoje" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "netikėta leksema „%s“, tikėtasi „)“" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "tikėtasi „)“" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "netikėtas argumentas „%s“ sąlygos unariniam operatoriui" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "netikėtas argumentas sąlygos unariniam operatoriui" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "netikėta leksema „%s“, tikėtasi sąlyginio binarinio operatoriaus" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "tikėtasi sąlygos binarinio operatoriaus" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "netikėtas argumentas „%s“ sąlygos binariniam operatoriui" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "netikėtas argumentas sąlygos binariniam operatoriui" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "netikėta leksema „%c“ sąlygos komandoje" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "netikėta leksema „%s“ sąlygos komandoje" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "netikėta leksema %d sąlygos komandoje" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "sintaksės klaida prie netikėtos leksemos: „%s“" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "sintaksės klaida prie „%s“" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "sintaksės klaida: netikėta failo pabaiga" + +#: parse.y:6365 +msgid "syntax error" +msgstr "sintaksės klaida" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Naudokite „%s“, jei norite išeiti iš ap.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "netikėta failo pabaiga ieškant atitinkamo „)“" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: funkcija „%s“ nerasta" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: blogas jungtukas  „%d“" + +#: print_cmd.c:375 +#, fuzzy, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "%d: netaisyklingas failo deskriptorius: %s" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: „%c“: netaisyklingas formato simbolis" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "failo deskriptorius už ribų" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: ambiguous redirect" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: negalima perrašyti egzistuojančio failo" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: apribota: negalima peradresuoti išvedimo" + +#: redir.c:218 +#, fuzzy, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "nepavyko sukurti laikino failo „here“ dokumentui: %s" + +#: redir.c:222 +#, fuzzy, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: negalima priskirti sąrašo masyvo elementui" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/serveris/prievadas nepalaikoma be tinklo" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "nukreipimo klaida: nepavyko dublikuoti fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "nepavyko rasti /tmp, sukurkite šį aplanką!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp turi būti taisyklingas aplanko pavadinimas" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: netaisyklingas parametras" + +#: shell.c:1319 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nepavyko dublikuoti fd %d į fd %d" + +#: shell.c:1330 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nepavyko dublikuoti fd %d į fd %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: aplankas" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Neturiu vardo!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versija %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Naudojimas:\t%s [GNU ilgas parametras] [parametras] ...\n" +"\t%s [GNU ilgas parametras] [parametras] scenarijaus-failas ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU ilgi parametrai:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Aplinkos parametrai:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" +"\t-irsD arba -c komanda arba -O shopt_nustatymas\t\t(tik iškvietimui)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s arba -o nustatymas\n" + +#: shell.c:2068 +#, fuzzy, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Bandykite „%s --help“ arba „%s --usage“, jei norite gauti daugiau " +"informacijos.\n" + +#: shell.c:2069 +#, fuzzy, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Bandykite „ldd --help“, jei norite daugiau informacijos." + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Naudokite komandą „bashbug“ klaidoms pranešti.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: netaisyklinga operacija" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "" + +#: siglist.c:50 +msgid "Hangup" +msgstr "" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "" + +#: siglist.c:58 +msgid "Quit" +msgstr "" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT instrukcija" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Slankaus kablelio klaida" + +#: siglist.c:86 +msgid "Killed" +msgstr "" + +#: siglist.c:90 +#, fuzzy +msgid "Bus error" +msgstr "sintaksės klaida" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Segmentacijos klaida" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Žadintuvas" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Nutraukta" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Sustabdyta (signalas)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Tęsti" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Sustabdyta (tty įvedimas)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Sustabdyta (tty išvedimas)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU riba" + +#: siglist.c:154 +msgid "File limit" +msgstr "Failų riba" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Langas pakeistas" + +#: siglist.c:170 +msgid "Record lock" +msgstr "" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "proceso migravimas į kitą CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "programavimo klaida" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "" + +#: siglist.c:214 +msgid "Information request" +msgstr "Informacijos užklausa" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Nežinomas signalas #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "blogas keitinys: trūksta „%s“ %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: negalima priskirti sąrašo masyvo elementui" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "blogas keitinys: trūksta „%s“ %s" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: nesamas parametras" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "%s: netaisyklingas veiksmo pavadinimas" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parametras tuščias arba nenustatytas" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametras tuščias arba nenustatytas" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: posekio išraiška < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: blogas keitinys" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: negalima tokiu būdu priskirti" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" + +#: subst.c:10367 +#, fuzzy, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "blogas keitinys: trūksta „%s“ %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "nėra atitikmenų: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "tikėtasi argumento" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: tikėtasi skaitinės išraiškos" + +#: test.c:265 +msgid "`)' expected" +msgstr "tikėtasi „)“" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "tikėtasi „)“, rasta %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: tikėtasi binarinio operatoriaus" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: tikėtasi unarinio operatoriaus" + +#: test.c:881 +msgid "missing `]'" +msgstr "trūksta „]“" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "sintaksės klaida: netikėtas „;“" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "netaisyklingas signalo numeris" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: bloga trap_list[%d] reikšmė: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: signalo doroklė yra SIG_DFL, siunčiamas %d (%s) sau" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: blogas signalas %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "klaida importuojant funkcijos apibrėžimą „%s“" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "aplinkos lygmuo (%d) per aukštas, nustatoma į 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" + +#: variables.c:4771 +#, fuzzy, c-format +msgid "%s has null exportstr" +msgstr "%s: parametras tuščias arba nenustatytas" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "netaisyklingas simbolis %d %s exportstr'e" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "%s exportstr'e trūksta „=“" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: nėra global_variables konteksto" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" + +#: variables.c:6387 +#, fuzzy, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: nepavyko atverti: %s" + +#: variables.c:6392 +#, fuzzy, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%d: netaisyklingas failo deskriptorius: %s" + +#: variables.c:6437 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s išėjo už ribų" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Autorinės teisės (C) 2009 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licencija GPLv3+: GNU GPL versija 3 arba naujesnė \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versija %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Tai yra laisva programinė įranga; jūs esate laisvas keisti ir platinti ją.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Nėra JOKIOS GARANTIJOS, kiek tik tą leidžia įstatymas.\n" + +#: xmalloc.c:93 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: nepavyko išskirti %lu baitų (%lu baitų išskirta)" + +#: xmalloc.c:95 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "xmalloc: nepavyko išskirti %lu baitų" + +#: xmalloc.c:165 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: %s:%d: nepavyko išskirti %lu baitų (išskirta %lu baitų)" + +#: xmalloc.c:167 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "xmalloc: %s:%d: nepavyko išskirti %lu baitų" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [pavadinimas[=reikšmė] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] pavadinimas [pavadinimas ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [aplinkos-komanda [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [išraiška]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|-P] [aplankas]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] komanda [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFilrtux] [-p] [pavadinimas[=reikšmė] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFilrtux] [-p] pavadinimas[=reikšmė] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] pavadinimas[=reikšmė] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f failopavadinimas] [pavadinimas ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts optsekos pavadinimas [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "" +"exec [-cl] [-a pavadinimas] [komanda [argumentai ...]] [nukreipimas ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e evardas] [-lnr] [pirm] [pask] arba fc -s [pat=rep] [komanda]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "" + +#: builtins.c:119 +#, fuzzy +msgid "help [-dms] [pattern ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | darbospec ... arba kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o nustatymas] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [pavadinimas ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [pavadinimas[=vertė] ...] arba export -p" + +#: builtins.c:148 +#, fuzzy +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-af] [pavadinimas[=vertė] ...] arba readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source failopavadinimas [argumentai]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". failopavadinimas [argumentai]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [išrk]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signalo_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] pavadinimas [pavadinimas ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [riba]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [režimas]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for PAVADINIMAS [in ŽODŽIAI ... ] ; do KOMANDOS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( išrk1; išrk2; išrk3 )); do KOMANDOS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select PAVADINIMAS [in ŽODŽIAI ... ;] do KOMANDOS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if KOMANDOS; then KOMANDOS; [ elif KOMANDOS; then KOMANDOS; ]... [ else " +"KOMANDOS; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while KOMANDOS; do KOMANDOS; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until KOMANDOS; do KOMANDOS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "funkcijos pavadinimas { KOMANDOS ; } arba name () { KOMANDOS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMANDOS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "darbo_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( išraiška ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ išraiška ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "kintamieji – Kai kurių aplinkos kintamųjų pavadinimai ir reikšmės" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optvardas ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v kint] formatas [argumentai]" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" + +#: builtins.c:235 +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "shopt [-pqsu] [-o] [optvardas ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"„alias“ be argumentų arba su -p nuostata išspausdina alternatyviųjų\n" +" vardų sąrašą formatu VARDAS=REIKŠMĖ į standartinį išvedimą.\n" +" Kitu atveju aprašomas alternatyvusis vardas kiekvienam VARDUI,\n" +" kurio REIKŠMĖ nurodyta.\n" +"Jei REIKŠMĖ baigiasi tarpo simboliu, kitame\n" +" žodyje ieškoma alternatyviųjų vardų keitinių, kai alternatyvusis vardas\n" +" išskleidžiamas. „alias“ grąžina „true“, nebent duotas VARDAS, kuriam\n" +" neaprašytas joks alternatyvusis vardas." + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Pašalinti VARDUS iš aprašytų alternatyviųjų vardų sąrašo. Jei nurodyta\n" +" nuostata -a, pašalinti visus alternatyviuosius vardus." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:342 +#, fuzzy +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Tęsti kitą FOR, WHILE arba UNTIL ciklo iteraciją.\n" +" Jei N nurodytas, tęsti ciklą, esantį N lygmenų virš esamo." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" + +#: builtins.c:369 +#, fuzzy +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Grąžina esamos procedūros kontekstą.\n" +" \n" +" Be IŠRAIŠKOS, grąžina „$eilutė $failo_vardas“. Su IŠRAIŠKA,\n" +" grąžina „$eilutė $procedūra $failo_vardas“; ši papildoma informacija\n" +" gali būti panaudota kuriant steko išrašą (stack trace).\n" +" \n" +" IŠRAIŠKOS reikšmė nurodo, per kiek kvietimo freimų grįžti nuo\n" +" esamo; viršutinis freimas yra 0." + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Pakeisti esamą aplanką į DIR. Kintamasis $HOME yra\n" +" numatytasis DIR. Kintamasis CDPATH nurodo aplankus, kuriuose bus\n" +" ieškoma DIR. Aplankų pavadinimai CDPATH skiriami dvitaškiu (:).\n" +" Tuščias aplanko vardas tapatus esamam aplankui, t.y. „.“.\n" +" Jei DIR prasideda pasviruoju brūkšniu (/), į CDPATH neatsižvelgiama.\n" +" Jei aplankas nerastas ir aplinkos nuostata „cdable_vars“ įjungta,\n" +" tada žodis bandomas kaip kintamojo pavadinimas. Jei kintamasis\n" +" turi reikšmę, tada esamas aplankas pakeičiamas į kintamojo reikšmę.\n" +" Parametras -P nurodo, kad turi būti naudojama fizinė aplankų struktūra,\n" +" užuot sekus simbolines nuorodas; parametras -L nurodo, kad turi būti\n" +" sekama simbolinėmis nuorodomis." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" + +#: builtins.c:442 +#, fuzzy +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "Jokio efekto; komanda nieko nedaro. Grąžinamas klaidos kodas 0." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:462 +#, fuzzy +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "Grąžinti nesėkmingą rezultatą." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" + +#: builtins.c:715 +#, fuzzy +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Išeiti iš aplinkos su klaidos kodu N. Jei N nenurodytas, išeinant " +"nustatomas\n" +" paskutinės vykdytos komandos klaidos kodas." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +#, fuzzy +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Skaityti ir vykdyti komandas iš FAILO ir grįžti. Keliai\n" +" kintamajame $PATH naudojami aplankui, kuriame yra FAILAS, rasti.\n" +" Jei nurodyta ARGUMENTŲ, jie tampa poziciniais parametrais iškvietus\n" +" FAILĄ." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +#, fuzzy +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Išskleisti ir vykdyti KOMANDAS tol, kol galutinė komanda iš\n" +" „while“ komandų grąžina klaidos kodą 0." + +#: builtins.c:1659 +#, fuzzy +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Išskleisti ir vykdyti KOMANDAS tol, kol galutinė komanda iš\n" +" „until“ komandų grąžina klaidos kodą, nelygų 0." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +#, fuzzy +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykdyti eilę komandų grupėje. Tai yra vienas iš būdų nukreipti\n" +" visos eilės komandų įvedimą/išvedimą." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +#: builtins.c:1726 +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"printf formatuoja ir spausdina ARGUMENTUS nurodytu FORMATU. FORMATAS\n" +" yra simbolių seka, sudaryta iš trijų tipų objektų: paprastų\n" +" simbolių, tiesiog nukopijuojamų į standartinį išvedimą,\n" +" kaitos sekų, konvertuojamų ir kopijuojamų į standartinį išvedimą,\n" +" ir formato specifikacijų, kurių kiekviena išspausdina kitą argumentą.\n" +" Be įprastų printf(1) formatų, %b reiškia išplėsti kairinio brūkšnio\n" +" („\\“) kaitos sekas atitinkamame argumente, o %q reiškia išvesti\n" +" argumentą kabutėse tokia forma, kad rezultatą būtų galima\n" +" panaudoti įvedimui.\n" +" Jei pateiktas parametras -v, išvedimas įrašomas į aplinkos kintamąjį\n" +" KINT, užuot spausdinus į standartinį išvedimą." + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +#, fuzzy +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Rodyti galimus užbaigimus priklausomai nuo nustatymų. Naudotina\n" +" iš aplinkos funkcijos, generuojančios galimus užbaigimus.\n" +" Jei pateiktas nebūtinasis ŽODŽIO argumentas, išvedami įrašai,\n" +" atitinkantys ŽODĮ." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" + +#, fuzzy +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "Grąžina esamos procedūros kontekstą." + +#~ msgid "Unknown Signal #" +#~ msgstr "Nežinomas signalas #" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: nepavyko išskirti %lu baitų (išskirta %lu baitų)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: nepavyko išskirti %lu baitų" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų (išskirta %lu baitų)" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid " " +#~ msgstr " " + +#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," +#~ msgstr "Be EXPR, grąžina „$line $filename“. Su EXPR," + +#~ msgid "returns \"$line $subroutine $filename\"; this extra information" +#~ msgstr "grąžina „$line $subroutine $filename“; ši papildoma informacija" + +#~ msgid "can be used used to provide a stack trace." +#~ msgstr "gali būti panaudota generuojant steko išrašą (stack trace)." + +#~ msgid "" +#~ "The value of EXPR indicates how many call frames to go back before the" +#~ msgstr "EXPR reikšmė nurodo, per kiek kvietimo freimų eiti atgal prieš" + +#~ msgid "current one; the top frame is frame 0." +#~ msgstr "esamą. Viršutinis freimas yra 0." + +#~ msgid "%s: invalid number" +#~ msgstr "%s: netaisyklingas skaičius" + +#~ msgid "Shell commands matching keywords `" +#~ msgstr "Aplinkos komandos, atitinkančios raktažodžius „" + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "Rodyti prisimenamų aplankų sąrašą. Aplankai" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "atsiduria sąraše su „pushd“ komanda; galite kilti" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "sąrašu su „popd“ komanda." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "Parametras -l nurodo, kad „dirs“ neturėtų spausdinti sutrumpintų" + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "aplankų, santykinių namų aplinkui, pavadinimų. Tai reiškia, kad" + +#, fuzzy +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "kad „~/bin“ bus rodomas kaip „/home/bfox/bin“. Su parametru -v" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "„dirs“ išveda aplankų steką po vieną pavadinimą eilutėje," + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "prieš pavadinimą prirašoma aplanko pozicija steke. Parametras -p" + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "turi tokį patį efektą, tačiau pozicija steke neišvedama." + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "Parametras -c išvalo aplankų steką." + +#~ msgid "" +#~ "+N displays the Nth entry counting from the left of the list shown by" +#~ msgstr "+N rodo N-tąjį įrašą skaičiuojant iš kairės sąraše, rodomame" + +#~ msgid " dirs when invoked without options, starting with zero." +#~ msgstr " „dirs“, iškviesto be parametrų (skaičiuojama nuo nulio)." + +#~ msgid "" +#~ "-N displays the Nth entry counting from the right of the list shown by" +#~ msgstr "-N rodo N-tajį įrašą skaičiuojant iš dešinės sąraše, rodomame" + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "Įdeda aplanką į aplankų steko viršų, arba pasuka" + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "steką, nustatydamas esamą aplanką į naująją steko viršūnės reikšmę." + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "Be argumentų, sukeičia viršutinius du aplankus." + +#~ msgid "+N Rotates the stack so that the Nth directory (counting" +#~ msgstr "+N Pasuka steką, kad N-tasis aplankas (skaičiuojant" + +#~ msgid " from the left of the list shown by `dirs', starting with" +#~ msgstr " iš kairės sąraše, rodomame „dirs“, pradedant nuo nulio)" + +#~ msgid " zero) is at the top." +#~ msgstr " būtų viršuje." + +#~ msgid "-N Rotates the stack so that the Nth directory (counting" +#~ msgstr "-N Pasuka steką, kad N-tasis aplankas (skaičiuojant" + +#~ msgid " from the right of the list shown by `dirs', starting with" +#~ msgstr " iš dešinės sąraše, rodomame „dirs“, pradedant nuo nulio)" + +#~ msgid "-n suppress the normal change of directory when adding directories" +#~ msgstr "-n išjungti įprastą aplanko pakeitimą pridedant aplankus" + +#~ msgid " to the stack, so only the stack is manipulated." +#~ msgstr " į steką, taigi, pakeičiamas tik stekas." + +#~ msgid "dir adds DIR to the directory stack at the top, making it the" +#~ msgstr "dir prideda DIR į aplankų steko viršų; DIR nustatomas" + +#~ msgid " new current working directory." +#~ msgstr " naujuoju darbiniu aplanku." + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "Galite pamatyti aplankų steką komanda „dirs“." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Šalina įrašus iš aplankų steko. Jei nenurodyta argumentų," + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "pašalina viršutinį aplanką iš steko ir pakeičia darbinį aplanką" + +#~ msgid "+N removes the Nth entry counting from the left of the list" +#~ msgstr "" +#~ "+N pašalina N-tąjį įrašą skaičiuojant iš kairės sąraše, išvedamame „dir“" + +#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr " (skaičiuojama nuo nulio). Pavyzdžiui: „popd +0“" + +#~ msgid " removes the first directory, `popd +1' the second." +#~ msgstr " pašalina pirmąjį aplanką, „popd +1“ – antrąjį." + +#~ msgid "-N removes the Nth entry counting from the right of the list" +#~ msgstr "" +#~ "+N pašalina N-tąjį įrašą skaičiuojant iš dešinės sąraše, išvedamame " +#~ "„dir“" + +#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr " (skaičiuojama nuo nulio). Pavyzdžiui: „popd -0“" + +#~ msgid " removes the last directory, `popd -1' the next to last." +#~ msgstr " pašalina paskutinį aplanką, „popd -1“ – priešpaskutinį." + +#~ msgid "" +#~ "-n suppress the normal change of directory when removing directories" +#~ msgstr " išjungti įprastą darbinio aplanko keitimą šalinant aplankus" + +#~ msgid " from the stack, so only the stack is manipulated." +#~ msgstr " iš steko, taigi, pakeičiamas tik stekas." + +#~ msgid "allocated" +#~ msgstr "išskirta" + +#~ msgid "freed" +#~ msgstr "atlaisvinta" + +#~ msgid "requesting resize" +#~ msgstr "prašoma dydžio keitimo" + +#~ msgid "just resized" +#~ msgstr "tik ką pakeistas dydis" + +#~ msgid "bug: unknown operation" +#~ msgstr "klaida: nežinoma operacija" + +#~ msgid "malloc: watch alert: %p %s " +#~ msgstr "malloc: stebinio įspėjimas: %p %s " + +#~ msgid "" +#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n" +#~ " break N levels." +#~ msgstr "" +#~ "Išeiti iš FOR, WHILE arba UNTIL ciklo. Jei nurodytas N,\n" +#~ " išeiti aukštyn per N lygmenų." + +#~ msgid "" +#~ "Run a shell builtin. This is useful when you wish to rename a\n" +#~ " shell builtin to be a function, but need the functionality of the\n" +#~ " builtin within the function itself." +#~ msgstr "" +#~ "Vykdyti aplinkos įtaisytą funkciją. Ši komanda naudinga, kai norite\n" +#~ " vietoje įtaisytos funkcijos naudoti savąją, tačiau reikia\n" +#~ " pasinaudoti įtaisytąja šios funkcijos viduje." + +#~ msgid "" +#~ "Print the current working directory. With the -P option, pwd prints\n" +#~ " the physical directory, without any symbolic links; the -L option\n" +#~ " makes pwd follow symbolic links." +#~ msgstr "" +#~ "Išspausdinti esamą aplanką. Su parametru -P „pwd“ spausdina\n" +#~ " fizinį aplanką, be jokių simbolinių nuorodų; su parametru -L\n" +#~ " „pwd“ seka simbolinėmis nuorodomis." + +#~ msgid "Return a successful result." +#~ msgstr "Grąžinti sėkmingą rezultatą." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Pasenusi komanda. Žr. „declare“." + +#~ msgid "" +#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n" +#~ " can only be used within a function; it makes the variable NAME\n" +#~ " have a visible scope restricted to that function and its children." +#~ msgstr "" +#~ "Sukurti vietinį kintamąjį nurodytu PAVADINIMU ir suteikti jam REIKŠMĘ.\n" +#~ " „local“ gali būti naudojamas tik funkcijose; jis sukuria kintamąjį,\n" +#~ " matomą tik pačioje funkcijoje ir jos dukterinėse funkcijose." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "Išspausdinti ARGUMENTUS. Jei nurodytas -n, nespausdinamas naujos " +#~ "eilutės\n" +#~ " simbolis pabaigoje." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "Skaityti ARGUMENTUS kaip aplinkos komandas ir jas vykdyti." + +#~ msgid "Logout of a login shell." +#~ msgstr "Atsijungti nuo prisijungimo aplinkos (login shell)." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N\n" +#~ " is omitted, the return status is that of the last command." +#~ msgstr "" +#~ "Išeina iš funkcijos, grąžinama reikšmė N. Jei N nenurodyta,\n" +#~ " grąžinama paskutinės vykdytos komandos reikšmė." + +#~ msgid "" +#~ "For each NAME, remove the corresponding variable or function. Given\n" +#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n" +#~ " unset will only act on functions. With neither flag, unset first\n" +#~ " tries to unset a variable, and if that fails, then tries to unset a\n" +#~ " function. Some variables cannot be unset; also see readonly." +#~ msgstr "" +#~ "Kiekvienam PAVADINIMUi, pašalinti atitinkamą kintamąjį ar funkciją.\n" +#~ " Jei nurodytas „-v“, unset veiks tik su kintamaisiais. Jei nurodytas\n" +#~ " „-f“, unset veiks tik su funkcijomis. Jei nenurodytas nei vienas iš\n" +#~ " šių parametrų, unset pirmiausiai bandys pašalinti kintamąjį, ir jei\n" +#~ " tai nepasiseks, bandys pašalinti funkciją. Kai kurie kintamieji " +#~ "negali\n" +#~ " būti pašalinti; žr. „readonly“." + +#~ msgid "" +#~ "Suspend the execution of this shell until it receives a SIGCONT\n" +#~ " signal. The `-f' if specified says not to complain about this\n" +#~ " being a login shell if it is; just suspend anyway." +#~ msgstr "" +#~ "Sustabdyti šios aplinkos darbą, kol bus gautas SIGCONT\n" +#~ " signalas. Jei nurodyta „-f“, nesiskųsti, jei ši aplinka yra " +#~ "prisijungimo\n" +#~ " aplinka (login shell) ir sustabdyti ją bet kuriuo atveju." + +#~ msgid "" +#~ "Create a simple command invoked by NAME which runs COMMANDS.\n" +#~ " Arguments on the command line along with NAME are passed to the\n" +#~ " function as $0 .. $n." +#~ msgstr "" +#~ "Sukurti paprastą komandą, iškviečiamą PAVADINIMU, vykdančią KOMANDAS.\n" +#~ " Argumentai komandų eilutėje kartu su PAVADINIMU perduodami funkcijai\n" +#~ " kaip $0 .. $n." + +#~ msgid "" +#~ "For each NAME, specify how arguments are to be completed.\n" +#~ " If the -p option is supplied, or if no options are supplied, " +#~ "existing\n" +#~ " completion specifications are printed in a way that allows them to " +#~ "be\n" +#~ " reused as input. The -r option removes a completion specification " +#~ "for\n" +#~ " each NAME, or, if no NAMEs are supplied, all completion " +#~ "specifications." +#~ msgstr "" +#~ "Kiekvienam VARDUI nurodyti, kaip argumentai turėtų būti užbaigti.\n" +#~ " Jei pateiktas -p nustatymas arba nepateikta jokių nustatymų,\n" +#~ " spausdinamos esamos užbaigimo specifikacijos tokiu formatu, kad\n" +#~ " jas būtų galima panaudoti kaip įvestį. Nustatymas -r pašalina\n" +#~ " užbaigimo specifikaciją kiekvienam VARDUI, arba, jei nenurodyta\n" +#~ " VARDO, visas užbaigimo specifikacijas." diff --git a/bash-5.1/po/nb.gmo b/bash-5.1/po/nb.gmo new file mode 100644 index 0000000000000000000000000000000000000000..894af69262b9e18e2562732855c4b1434784c419 Binary files /dev/null and b/bash-5.1/po/nb.gmo differ diff --git a/bash-5.1/po/nb.po b/bash-5.1/po/nb.po new file mode 100644 index 0000000000000000000000000000000000000000..cdeff4d168da93dbcecf66c4e9fcd76e6ac774de --- /dev/null +++ b/bash-5.1/po/nb.po @@ -0,0 +1,5867 @@ +# Norwegian (bokmål) translation of GNU Bash +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Åka Sikrom , 2015-2019. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-08 19:40+0100\n" +"Last-Translator: Åka Sikrom \n" +"Language-Team: Norwegian Bokmaal \n" +"Language: nb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.0.6\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "feil i tabell-underskript" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: fjerner navnref-egenskap" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: indeksert tabell kan ikke konverteres til assosiativ tabell" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: ugyldig nøkkel for assosiativ tabell" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: kan ikke tildeles ikke-numerisk indeks" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: underskript må brukes ved tildeling av assosiative tabeller" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: klarte ikke å opprette: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: fant ikke tastaturoppsett for kommando" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: første ikke-blanktegn må være «\"»" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "avsluttende «%c» mangler i %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: kolon-skilletegn mangler" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: klarte ikke å fjerne tildeling" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace-utvidelse: klarte ikke å tildele minne for %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace-utvidelse: klarte ikke å tildele minne for %u elementer" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace-utvidelse: klarte ikke å tildele minne for «%s»" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "«%s»: ugyldig alias" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "linjeredigering er ikke slått på" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "«%s»: ugyldig navn på tastaturoppsett" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: klarte ikke å lese: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "«%s»: ukjent funksjonsnavn" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s er ikke tilknyttet en knapp.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s kan startes via" + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: klarte ikke å fjerne tildeling" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "antall sløyfer" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "gir bare mening i «for»-, «while»- og «until»-sløyfer" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Vis konteksten for gjeldende underrutine-kall.\n" +" \n" +" Hvis UTTRykk ikke er valgt, vises «$line $filename». Med UTTRykk vises\n" +" «$line $subroutine $filename». Denne ekstrainformasjonen kan brukes\n" +" til stabelsporing.\n" +" \n" +" Verdien av UTTRykk viser hvor mange kall-rammer programmet skal bevege " +"seg\n" +" gjennom tilbake fra gjeldende ramme. Øverste ramme er 0.\n" +" \n" +" Avslutningsstatus:\n" +" Status er 0, med mindre skallet ikke kjører en skallfunksjon eller\n" +" valgt UTTRykk er ugyldig." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME har ingen verdi" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "for mange argumenter" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null-mappe" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD har ingen verdi" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linje %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "advarsel:" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: bruk: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: valget krever et argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: valget krever et tall-argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "fant ikke %s" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: ugyldig valg" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: ugyldig valgnavn" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "«%s»: ugyldig navn" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "ugyldig oktal-tall" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "ugldig heksadesimalt tall" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "ugyldig tall" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: ugyldig signalspesifikasjon" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "«%s» er hverken hverken et PID eller en gyldig jobbspesifikasjon" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: skrivebeskyttet variabel" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s er utenfor rekkevidde" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s er utenfor rekkevidde" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: jobben finnes ikke" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: ingen jobbkontroll" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "ingen jobbkontroll" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: begrenset" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "begrenset" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ikke innebygd i skall" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "skrivefeil: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "feil under endring av terminal-egenskaper: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "feil under henting av terminal-egenskaper: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: feil under henting av gjeldende mappe: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: flertydig jobbspesifikasjon" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "hjelp er ikke tilgjengelig for denne versjonen" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: klarte ikke å fjerne verdi fra skrivebeskyttet %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: klarte ikke å fjerne verdi" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: ugyldig handlingsnavn" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: ingen spesifikasjon for fullføring" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "advarsel: valget «-F» virker kanskje ikke slik du forventer" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "advarsel: valget «-C» virker kanskje ikke slik du forventer" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "fullføringsfunksjon kjøres ikke nå" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "kan bare brukes i funksjoner" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: referansevariabler kan ikke være tabeller (arrays)" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: navnref.-variabler kan ikke referere til seg selv" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: sirkulær navnreferanse" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: ugyldig variabelnavn for navnreferanse" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "valget«-f» kan ikke brukes til å lage funksjoner" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: skrivebeskyttet funksjon" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: sammensatt tabell-tideling i hermetegn er utgått" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: tabellvariabler kan ikke ødelegges på denne måten" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: assosiative tabeller kan ikke konverteres til indekserte tabeller" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamisk innlasting er ikke tilgjengelig" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "klarte ikke å åpne delt objekt %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "fant ikke %s i delt objekt %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: ikke dynamisk innlastet" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "innlastingsfunksjon for %s førte til feilkode (%d). Ikke lastet inn" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: ikke dynamisk innlastet" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: klarte ikke å slette: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: er en mappe" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ikke en vanlig fil" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: fila er for stor" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: klarte ikke å kjøre binærfil" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: klarte ikke å kjøre: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logg ut\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ikke innloggingsskall. Bruk «exit»" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Bakgrunnsjobb(er) venter.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Bakgrunnsjobb(er) kjører.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "fant ingen kommando" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "historikk-spesifikasjon" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: klarte ikke å åpne midlertidig fil: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "gjeldende" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "jobb %d startet uten jobbkontroll" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: -- %c er et ugyldig valg\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: -- %c krever et argument\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "nøkkelsummering er slått av" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: kontrollsum-tabell er tom\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "treff\tkommando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Skallkommandoer som samsvarer med nøkkelordet `" +msgstr[1] "Skallkommandoer som samsvarer med nøkkelordene `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"ingen hjelpeemner samsvarer med «%s». Prøv «help help», «man -k %s» eller " +"«info %s»." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: klarte ikke å åpne: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Disse skallkommandoene er internt definert. Skriv «help» for å se denne " +"lista.\n" +"Skriv «help name» for å finne ut mer om funksjonen «name».\n" +"Bruk «info bash» for å finne generell info om skallet.\n" +"Bruk «man -k» eller «info» for å finne ut mer om kommandoer som ikke er på " +"denne lista.\n" +"\n" +"Stjerne (*) ved siden av et kommandonavn betyr at gjeldende kommando er " +"slått av.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "du kan ikke bruke flere enn ett av valgene -anrw på én gang" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "historikkposisjon" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: ugyldig tidsstempel" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: historikk-utvidelse mislyktes" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib mislyktes" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "valget «-x» kan ikke brukes i kombinasjon med andre valg" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenter må være prosess- eller jobb-ID-er" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Ukjent feil" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "forventet uttrykk" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: ikke en indeksert tabell" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: ugyldig spesifikasjon av fildeskriptor" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: ugyldig fildeskriptor: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: ugyldig linjeantall" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: ugyldig tabellopphav" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: ugyldig tilbakekallsmengde" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "tomt navn på tabellvariabel" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "støtte for tabellvariabler kreves" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "«%s»: formattegn mangler" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: ugyldig spesifikasjon av tidsformat" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "«%c»: ugyldig formattegn" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "advarsel: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "problem med tolkning av format: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "heks-siffer mangler for \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "unicode-siffer mangler for \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "ingen annen mappe" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: ugyldig argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "mappestabel er tom" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "mappestabel-indeks" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Vis liste over mapper som blir husket. Mapper\n" +" havner på denne lista med kommandoen «pushd». Du kan gå\n" +" tilbake i lista med kommandoen «popd».\n" +" \n" +" Valg:\n" +" -c\ttøm mappestabel ved å slette alle elementer\n" +" -l\tikke legg til tildeprefiks på stier som er relative\n" +" \ttil gjeldende hjemmemappe\n" +" -p\tskriv ut mappetsabel med ett element per linje\n" +" -v\tskriv ut mappestabel med ett element per linje som har\n" +" \tstabelposisjon som prefiks\n" +" \n" +" Argumenter:\n" +" +N\tVis N-te mappe talt fra null\n" +" \tpå venstre side av lista (gjelder når programmet kjøres uten valg).\n" +" \n" +" -N\tVis N-te mappe talt fra null\n" +"\tpå høyre side av lista (gjelder når programmet kjøres uten valg)." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Legger til en mappe i toppen av mappestabelen, eller rullerer\n" +" stabelen slik at øverste mappe blir gjeldende arbeidsmappe.\n" +" Hvis ingen argumenter er valgt, bytter de to øverste mappene plass.\n" +" \n" +" Valg:\n" +" -n\tLar være å bytte mappe når mapper legges til i stabelen,\n" +" \tslik at kun selve stabelen blir endret.\n" +" \n" +" Argumenter:\n" +" +N\tRullerer stabelen slik at N-te mappe - talt fra\n" +" \tnull til venstre i lista etter «dirs» - havner øverst.\n" +" \n" +" -N\tRullerer stabelen slik at N-te mappe - talt fra\n" +" \tnull til høyre i lista etter «dirs» - havner øverst\n" +" \n" +" dir\tLegger til DIR i toppen av mappestabelen, og tar den\n" +" \ti bruk som gjeldende arbeidsmappe.\n" +" \n" +" Den innebygde funksjonen «dirs» viser mappestabelen." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Fjerner mapper fra mappestabelen. Hvis ingen argumenter brukes,\n" +" fjerner programmet øverste mappe fra stabelen og bytter til det som " +"deretter er øverste mappe.\n" +" \n" +" Valg:\n" +" -n\tLar være å bytte mappe når mapper fjernes fra stabelen,\n" +" \tslik at bare stabelen blir endret.\n" +" \n" +" Argumenter:\n" +" +N\tFjerner N-te oppføring - talt fra null til venstre i lista\n" +" \tetter «dirs». For eksempel fjerner «popd +0»\n" +" \tførste mappe, og «popd +1» den andre.\n" +" \n" +" -N\tFjerner N-te oppføring - talt fra null til høyre i lista\n" +" \tetter «dirs». For eksempel fjerner «popd -0»\n" +" \tsiste mappe, og «popd -1» den nest siste.\n" +" \n" +" Den innebygde funksjonen «dirs» viser mappestabelen." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: ugyldig spesifikasjon av tidsavbrudd" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "lesefeil: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "du kan bare «return» fra en funksjon eller kildeskript" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" +"du kan ikke utføre «unset» (tømme både en funksjon og en variabel for " +"verdier) samtidig" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ikke en tabellvariabel" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ikke en funksjon" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: klarte ikke å eksportere" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift-antall" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "du kan ikke både definere og fjerne skallvalg samtidig" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: ugyldig navn på skallvalg" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "filnavn-argument kreves" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: fant ikke fil" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "klarte ikke å sette i hvilemodus" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "klarte ikke å sette et innloggingsskall i hvilemodus" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s har alias «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s er et skall-nøkkelord\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s er en funksjon\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s er en innebygd skallkommando\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s er en innebygget skallfunksjon\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s er %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s er nøkkelsummert («hashed») (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: ugyldig grenseargument" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "«%c»: ugyldig kommando" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: klarte ikke å hente grense: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "grense" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: klarte ikke å endre grense: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktalt tall" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "«%c»: ugyldig symbolsk modus-operatør" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "«%c»: ugyldig symbolsk modustegn" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " linje " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "forrige kommando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Abryter …" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:462 +msgid "unknown command error" +msgstr "ukjent kommandofeil" + +#: error.c:463 +msgid "bad command type" +msgstr "ugyldig kommandotype" + +#: error.c:464 +msgid "bad connector" +msgstr "ugyldig tilkobling" + +#: error.c:465 +msgid "bad jump" +msgstr "ugyldig hopp" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: utildelt variabel" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atidsavbrudd for inndata: auto-utlogging\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "klarte ikke å videresende standard inndata fra «/dev/null». %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: «%c» er et ugyldig formattegn" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] finnes fremdeles" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "datarør-feil" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: grensa for nivåer av eval-funksjoner (%d) er overskredet" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: grensa for nivåer av kilder i kilder (%d) er overskredet" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: grensa for nivåer av funksjoner i funksjoner (%d) er overskredet" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: ikke tillatt: kommandonavn kan ikke inneholde «/»" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "fant ikke kommando %s" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: ugyldig tolk" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: klarte ikke å kjøre binærfil: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "«%s» er en innebygd spesialfunksjon" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "klarte ikke å duplisere fd %d til fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "grensa for rekursjonsnivåer i uttrykk er overskredet" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "rekursjonsstabelen er tom" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "uttrykk inneholder syntaksfeil" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "du forsøkte å tilordne en verdi til noe som ikke er en variabel" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "variabeltildeling inneholder syntaksfeil" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "forsøkte å dele på 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "programfeil: ugyldig expassign-symbol" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "forventet «:» for betinget uttrykk" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "eksponent er lavere enn 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "forventet identifikator etter pre-økning eller pre-forminskelse" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "mangler «)»" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntaksfeil: forventet operand" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntaksfeil: ugyldig aritmetisk operatør" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (feilaktig symbol er «%s»)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "ugyldig aritmetisk grunntall" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: ugyldig linjeantall" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "verdien er for høy for grunntallet" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: feil i uttrykk\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: fikk ikke tilgang til foreldermapper" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "klarte ikke å tilbakestille nodelay-modus for fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "klarte ikke å knytte ny fildeskriptor til bash-inndata fra fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: mellomlager for ny fd %d finnes allerede" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp-datarør" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "kopiert pid %d finnes i kjørende jobb %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "sletter ventende bakgrunnsjobb %d med prosessgruppe %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: markert PID %5ld (%s) som levende" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: pid-en finnes ikke" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Ferdig" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Venter" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Venter(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Kjører" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Ferdig(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Avsluttet %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Ukjent status" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(kjerne lagret i fil) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "underprosess setpgid (%ld til %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld er ikke en underprosess av dette skallet" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Ingen kjennskap til prosess %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: prosess %d venter" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: jobben finnes ikke" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: jobben er avsluttet" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: jobb %d kjører allerede i bakgrunnen" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: slår på WNOHANG for å unngå kronisk blokkering" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: linje %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (kjerne lagret i fil)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd nå: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp mislyktes" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: ingen jobbkontroll i bakgrunn" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: linjeregler" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "klarte ikke å velge terminal-prosessgruppe (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "ingen jobbkontroll i dette skallet" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: mislykket premiss: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: urimelig premiss\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "ukjent" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: rotete blokk på befrielsesliste" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: ble bedt om å behandle blokk som allerede er ledig" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: ble bedt om å behandle blokk som ikke er tildelt" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: tomt. mh_nbytes er utenfor rekkevidde" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: tomt. mh_nbytes er utenfor rekkevidde" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: start- og sluttdel er av ulik størrelse" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: ble bedt om å behandle blokk som ikke er tildelt" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: tomt. mh_nbytes er utenfor rekkevidde" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: tomt. mh_nbytes er utenfor rekkevidde" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: start- og sluttdel er av ulik størrelse" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: tildelingstabell er full med FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: finnes %p allerede i tabellen som tildelt?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: finnes %p allerede i tabellen som ledig?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "ugyldig grunntall" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: ukjent vert" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: ugyldig tjeneste" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: ugyldig spesifikasjon av nettverkssti" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "nettverkshandlinger støttes ikke" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: klarte ikke å bytte region (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: klarte ikke å bytte region (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: klarte ikke å bytte region (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: klarte ikke å bytte region (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Du har e-post i $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Du har ny e-post i $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Posten i %s er lest\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "syntaksfeil: aritmetisk uttrykk kreves" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "syntaksfeil: uforventet «;»" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntaksfeil: «((%s))»" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: %d er en ugyldig instrukstype" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-dokument ved linje %d adskilt av slutt på fil (forventet «%s»)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection: videresendinginstruks «%d» er utenfor tillatt rekkevidde" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: «shell_input_line_size» (%zu) overskrider SIZE_MAX (%lu): linja " +"er forkortet" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "grensa for maksimalt antall here-dokumenter er overskredet" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "uforventet slutt på fil (EOF) under søk etter «%c»" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "uforventet slutt på fil (EOF) under søk etter «]]»" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntaksfeil i betinget uttrykk: forventet ikke symbolet «%s»" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "syntaksfeil i betinget uttrykk" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "forventet ikke symbolet «%s», men «)»" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "forventet «)»" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "«%s» er et uforventet argument for betinget unær operatør" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "uforventet argument for betinget unær operatør" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "«%s» er et uforventet symbol. Forventet betinget binær operatør" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "forventet betinget binæroperatør" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "«%s» er et uforventet argument for betinget binæroperatør" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "uforventet argument for betinget binæroperatør" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "«%c» er et uforventet symbol i en betinget kommando" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "«%s» er et uforventet symbol i en betinget kommando" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "«%d» er et uforventet symbol i en betinget kommando" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntaksfeil ved «%s», som er et uforventet symbol" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntaksfeil ved «%s»" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "syntaksfeil: uforventet slutt på fil" + +#: parse.y:6365 +msgid "syntax error" +msgstr "syntaksfeil" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Bruk «%s» for å gå ut av skallet.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "uforventet slutt på fil (EOF) under søk etter «)»" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "fullføring: fant ikke funksjonen «%s»" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: mulig løkke av nye forsøk" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: «%d» er en ugyldig tilkobling" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: ugyldig fildeskriptor" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: filpeker er NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: «%c»: ugyldig formattegn" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "fildeskriptor er utenfor tillatt rekkevidde" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: flertydig videresending" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: klarte ikke å overskrive fil" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ikke tillatt: klarte ikke å videresende utdata" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "klarte ikke å lage midlertidig fil for here-dokument: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: klarte ikke å knytte fd til variabel" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port støttes ikke uten nettverkstilkobling" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "videresendingsfeil: klarte ikke å duplisere fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "fant ikke «/tmp». Opprett denne mappa!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "«/tmp» må være et gyldig mappenavn" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pen utskriftsmodus blir ignorert i interaktive skall" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: ugyldig valg" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "klarte ikke å velge %d som uid. Effektiv uid: %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "klarte ikke å velge %d som gid. Effektiv gid: %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "klarte ikke å starte feilsøkingsverktøy. Feilsøkingsmodus slått av" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: er en mappe" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Jeg manger navn!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versjon %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Bruk:\t%s [langt GNU-valg] [valg] …\n" +"\t%s [langt GNU-valg] [valg] skriptfil …\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Lange GNU-valg:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Skallvalg:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" +"\t«-ilrsD», «-c kommando» eller «-O kortvalg_valg»\t\t(kun programkall)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t«-%s» eller «-o»\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Skriv «%s -c \"help set\"» for mer informasjon om skallvalg.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Skriv «%s -c help» for mer informasjon om innebygde skallkommandoer.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Bruk kommandoen «bashbug» for å rapportere programfeil.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash-nettside: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Generell hjelp til bruk av GNU-programvare: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: ugyldig handling" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Ugyldig signal" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Legg på" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Forstyrr" + +#: siglist.c:58 +msgid "Quit" +msgstr "Avslutt" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Ugyldig instruks" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT-sporing/-fanging" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT-instruks" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT-instruks" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Flyttallsfeil" + +#: siglist.c:86 +msgid "Killed" +msgstr "Drept" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bussfeil" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Segmenteringsfeil" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Ugyldig systemkall" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Ødelagt datarør" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Alarmklokke" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Avsluttet" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Hastende IO-tilstand" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Stoppet (signal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Fortsett" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Død eller stans av underprosess" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Stoppet (tty-inndata)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Stoppet (tty-utdata)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O klar" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU-grense" + +#: siglist.c:154 +msgid "File limit" +msgstr "Filgrense" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtuell)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Vindu endret" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Husk lås" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Brukersignal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Brukersignal 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT-inndata venter" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "strømstans er nærliggende" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "systemkræsj er nærliggende" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "flytt prosess til annen CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "programmeringsfeil" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT-skjermmodus tildelt" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT-skjermmodus tilbaketrukket" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT-lydsekvens er fullført" + +#: siglist.c:214 +msgid "Information request" +msgstr "Informasjonsforespørsel" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "#%d er et ukjent signal" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "ugyldig substitutt: %2$s mangler avsluttende «%1$s»" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: klarte ikke å knytte liste til tabellmedlem" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "klarte ikke å lage datarør for substitusjon av prosess" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "klarte ikke å lage underprosess for substitusjon av prosess" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "klarte ikke å åpne navngitt datarør %s for lesing" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "klarte ikke å åpne navngitt datarør %s for skriving" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "klarte ikke å duplisere navngitt datarør %s som fd %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "kommandosubstitusjon: null-byte i inndata ignorert" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "klarte ikke å lage datarør for substitusjon av kommando" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "klarte ikke å lage underprosess for substitusjon av kommando" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: klarte ikke å duplisere datarør som fd 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: ugyldig variabelnavn for navnreferanse" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: ugyldig indirekte utvidelse" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: ugyldig variabelnavn" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter har ingen verdi" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter har null-verdi eller står tomt" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: understreng-uttrykk < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: ugyldig substitusjon" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: du kan ikke tildele på denne måten" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"fremtidige versjoner av skallet skal tvinge evaluering som en aritmetisk " +"substitusjon" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "ugyldig substitusjon. %s mangler avsluttende «`»" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "ingen treff på %s" + +#: test.c:147 +msgid "argument expected" +msgstr "forventet argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: forventet heltallsuttrykk" + +#: test.c:265 +msgid "`)' expected" +msgstr "forventet «)»" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "forventet «)», men fant %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: forventet binær operatør" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: forventet unær operatør" + +#: test.c:881 +msgid "missing `]'" +msgstr "«]» mangler" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntaksfeil: uforventet «;»" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "ugyldig signalnummer" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" +"fellehåndtering: øvre grense for fellehåndteringsnivå (%d) er overskredet" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: ugyldig verdi i «trap_list[%d]»: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: SIG_DFL er signalbehandler. Sender %d (%s) til meg selv " +"på nytt" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: %d er et ugyldig signal" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "feil under importering av definisjonen av funksjonen «%s»" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "skallnivået (%d) er for høyt. Tilbakestiller til 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: ingen funksjonskontekst i gjeldende virkefelt" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variabel kan ikke tilknyttes verdi" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: knytter heltall til navnreferanse" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: ingen funksjonskontekst i gjeldende virkefelt" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s har exportstr som er null" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%d er et ugyldig tegn i exportstr for %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "exportstr for %s mangler «=»" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: toppen av «shell_variables» er ikke en funksjonskontekst" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: kontekst for «global_variables» mangler" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: toppen av «shell_variables» er ikke et midlertidig miljøfelt" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: klarte ikke å åpne som FIL" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: ugyldig verdi for sporing av fildeskriptor" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: samspill-verdi er utenfor tillatt rekkevidde" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Opphavsrett (C) 2012 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Lisens GPLv3+: GNU GPL versjon 3 eller nyere \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versjon %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Dette er fri programvare. Du står fritt til å endre og dele den videre." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "" +"Det stilles INGEN GARANTI, i den grad dette tillates av gjeldende lovverk." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: klarte ikke å tildele %lu byte (%lu byte tildelt)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: klarte ikke å tildele %lu byte" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: klarte ikke å tildele %lu byte (%lu byte tildelt)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: klarte ikke å tildele %lu byte" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [navn[=verdi] … ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] navn [navn …]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m tastaturoppsett] [-f filnavn] [-q navn] [-u navn] [-r " +"knappesekv] [-x knappesekv:skallkommando] [knappesekv:readline-funksjon " +"eller readline-kommando]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [innebygd-skallfunksjon [arg …]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [uttr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [mappe]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg …]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [navn[=verdi] …]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] navn[=verdi] …" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [valg] navn[=verdi] …" + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg …]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg …]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filnavn] [navn …]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg …]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts valgstreng navn [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a navn] [kommando [argumenter …]] [videresending …]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e enavn] [-lnr] [første] [siste] eller fc -s [pat=rep] [kommando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [jobbspes]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [jobbspes …]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p stinavn] [-dt] [navn …]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [mønster …]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d posisjon] [n] eller history -anrw [filnavn] eller history -" +"ps arg [arg …]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobbspes …] eller jobs -x kommando [arg]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobbspes … | pid …]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspes | -n signum | -sigspes] pid | jobbspes … eller kill -l " +"[sigspes]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg …]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a tabell] [-d adskill] [-i tekst] [-n ntegn] [-N ntegn] [-p " +"ledetekst] [-t tidsavbrudd] [-u fd] [navn …]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o valgnavn] [--] [arg …]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [navn …]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [navn[=verdi] …] eller export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [navn[=verdi] …] eller readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filnavn [argumenter]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". filnavn [argumenter]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [uttr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg … ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signalspes …]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] navn [navn …]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [grense]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modus]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id …]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid …]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAVN [in ORD … ] ; do KOMMANDOER; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( uttr1; uttr2; uttr3 )); do KOMMANDOER; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAVN [in ORD … ;] do KOMMANDOER; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] kommandokø" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case ORD in [MØNSTER [| MØNSTER] …) KOMMANDOER ;;] … esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if KOMMANDOER; then KOMMANDOER; [ elif KOMMANDOER; then KOMMANDOER; ] … " +"[ else KOMMANDOER; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while KOMMANDOER; do KOMMANDOER; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until KOMMANDOER; do KOMMANDOER; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAVN] kommando [videresendinger]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function navn { KOMAMNDOER ; } eller navn () { KOMMANDOER ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMMANDOER ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( uttrykk ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ uttrykk ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variabler - Navn og betydninger av enkelte skallvariabler" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | mappe]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [valgnavn …]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [argumenter]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o valg] [-A handling] [-G globpat] [-" +"W ordliste] [-F funksjon] [-C kommando] [-X filterpat] [-P prefiks] [-S " +"suffiks] [navn …]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o valg] [-A handling] [-G globpat] [-W ordliste] " +"[-F funksjon] [-C kommando] [-X filtersti] [-P prefiks] [-S suffiks] [ord]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o valg] [-DEI] [navn …]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d skilletegn] [-n antall] [-O opphav] [-s antall] [-t] [-u fd] [-C " +"tilbakekall] [-c mengde] [tabell]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d skilletegn] [-n antall] [-O opphav] [-s antall] [-t] [-u fd] [-" +"C tilbakekall] [-c mengde] [tabell]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definer eller vis alias.\n" +" \n" +" Hvis ingen argumenter er gitt, skriver programmet ut en liste over\n" +" gjeldende alias i form av «alias NAVN=verdi» til standardutdata.\n" +" \n" +" Ellers defineres et alias per NAVN med en VERDI.\n" +" Avsluttende mellomrom i VERDI fører til at neste ord kontrolleres for\n" +" alias-substitusjon når aliaset utvides.\n" +" \n" +" Valg:\n" +" -p\tSkriv ut alle definerte alias i brukbart format\n" +" \n" +" Avslutningsstatus:\n" +" alias avslutter med positiv verdi («true»), med mindre bruker skriver " +"inn et NAVN\n" +" som mangler definert alias." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Fjern hvert NAVN fra lista over definerte alias.\n" +" \n" +" Valg:\n" +" -a\tfjern alle alias-definisjoner.\n" +" \n" +" Programmet avslutter som vellykket med mindre bruker velger et aliasNAVN " +"som ikke finnes." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Velg hurtigtaster og variabler for Readline.\n" +" \n" +" Knytt en knappekombinasjon til en Readline-funksjon eller makro, eller " +"gi\n" +" verdi til en Readline-variabel. Argumentsyntaksen tilsvarer det som " +"finnes\n" +" i «~/.inputrc», men må oppgis som ett argument.\n" +" F.eks.: bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Valg:\n" +" -m OPPSETT Bruk valgt tastaturOPPSETT under kjøring av denne " +"kommandoen.\n" +" Gyldige oppsettsnavn er «emacs», «emacs-standard»,\n" +" «emacs-meta», «emacs-ctlx», «vi», «vi-move»,\n" +" «vi-command» og «vi-insert».\n" +" -l Vis funksjonsnavn.\n" +" -P Vis funksjonsnavn og tildelinger.\n" +" -p Vis funksjoner og tildelinger i et format som kan " +"gjenbrukes\n" +" som inndata.\n" +" -S Vis knappekombinasjoner som kaller makroer og " +"tilhørende verdier\n" +" -s Tilsvarer «-S», men i et format som kan gjenbrukes " +"i inndata.\n" +" -V Vis variabelnavn og verdier\n" +" -v Tilsvarer «-V», men i et format som kan gjenbrukes " +"i inndata.\n" +" -q function-name Spør hvilke knapper som kaller aktuell funksjon.\n" +" -u function-name Fjern alle knappekombinasjoner som er tilknyttet " +"aktuell funksjon.\n" +" -r KOMB Fjern tildeling av valgt knappeKOMBinasjon.\n" +" -f FILNAVN Les knappekombinasjoner fra FILNAVN.\n" +" -x KOMB:KOMMANDO\tGjør slik at valgt skallKOMMANDO kjøres når\n" +" \t\t\t\tvalgt knappeKOMBinasjon trykkes.\n" +" -X Vis knappekombinasjoner som er tildelt med «-x», og " +"aktuelle kommandoer \n" +" i et format som kan gjenbrukes i inndata.\n" +" \n" +" Avslutningsstatus:\n" +" bind avslutter med 0, med mindre bruker tar et ukjent valg eller det " +"oppstår feil." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Gå ut av en «FOR»-, «WHILE»- eller «UNTIL»-løkke.\n" +" \n" +" Hvis N er valgt, brytes N antall underløkker.\n" +" \n" +" Avslutningsstatus:\n" +" Statuskoden er 0, med mindre N er mindre enn 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Fortsett neste runde av gjeldende FOR-, WHILE- eller WHILE-løkke..\n" +" \n" +" Hvis N er valgt, fortsetter N-te løkke.\n" +" \n" +" Avslutningsstatus:\n" +" Statuskoden er 0, med mindre N er mindre enn 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Kjør innebygde skallfunksjoner.\n" +" \n" +" Kjør SKALLFUNKSJON med valgte ARGumenter uten å slå opp\n" +" kommandonavn. Dette er nyttig når du vil re-implementere en innebygd\n" +" skallkommando som en funksjon, samtidig som du kjører den innenfor en " +"skallfunksjon.\n" +" \n" +" Avslutningsstatus:\n" +" Statuskoden er den samme som aktuell SKALLFUNKSJON gir, eller\n" +" negativ («false») hvis SKALLFUNKSJON ikke er en innebygd skallkommando." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Vis konteksten for gjeldende underrutine-kall.\n" +" \n" +" Hvis UTTRykk ikke er valgt, vises «$line $filename». Med UTTRykk vises\n" +" «$line $subroutine $filename». Denne ekstrainformasjonen kan brukes\n" +" til stabelsporing.\n" +" \n" +" Verdien av UTTRykk viser hvor mange kall-rammer programmet skal bevege " +"seg\n" +" gjennom tilbake fra gjeldende ramme. Øverste ramme er 0.\n" +" \n" +" Avslutningsstatus:\n" +" Status er 0, med mindre skallet ikke kjører en skallfunksjon eller\n" +" valgt UTTRykk er ugyldig." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Bytt arbeidsmappe for skallet.\n" +" \n" +" Bytt gjeldende mappe til MAP. Standard MAPpe er verdien av\n" +" skallvariabelen HOME.\n" +" \n" +" Variabelen CDPATH bestemmer søkestien for mapper som inneholder\n" +" MAP. Alternative mappenavn i CDPATH er adskilt med «:».\n" +" Et null-mappenavn er det samme som gjeldende mappe. Hvis MAP begynner\n" +" med skråstrek (/), brukes ikke CDPATH.\n" +" \n" +" Hvis valgt mappe ikke finnes, og skallvalget «cdable_vars» har en " +"verdi,\n" +" antas ordet å være et variabelnavn. Hvis den variabelen har en verdi,\n" +" brukes denne verdien som MAP.\n" +" \n" +" Valg:\n" +" -L\ttving følging av symbolske lenker. Følg symbolske lenker i\n" +" \tMAP etter å ha behandlet forekomster av «..»\n" +" -P\tbruk fysisk mappestruktur uten å følge symbolske\n" +" \tlenker. Følg lenker i MAP før forekomster av «..» behandles.\n" +" -e\thvis «-P» er valgt, og det er uklart hva som er gjeldende\n" +" \tarbeidsmappe, avslutt med en annen status enn 0\n" +" -@ hvis systemet støtter det, vis en fil med utvidede attributter\n" +" som en mappe med attributtene som innhold\n" +" \n" +" Standard for symbolske lenker er at de følges, som om «-L» er valgt.\n" +" «..» behandles ved at den nå tidligere stinavn-komponenten fjernes\n" +" én skråstrek tilbake eller til begynnelsen av MAP.\n" +" \n" +" Avslutningsstatus:\n" +" Status er 0 hvis skallet har byttet mappe, og hvis $PWD er valgt uten " +"problemer\n" +" ved bruk av «-P». Ellers er status noe annet enn 0." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Skriv ut navn på gjeldende arbeidsmappe.\n" +" \n" +" Valg:\n" +" -L\tskriv ut verdien av $PWD hvis dette er navnet på\n" +" \tgjeldende arbeidsmappe\n" +" -P\tskriv ut fysisk mappe, uten symbolske lenker\n" +" \n" +" «pwd» kjører med valget «-L» som standard.\n" +" \n" +" Avslutningsstatus:\n" +" Status er 0, med mindre bruker tar et ugyldig valg eller\n" +" programmet ikke klarer å lese gjeldende mappe." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Null-kommando.\n" +" \n" +" Dette har ingen effekt. Kommandoen gjør ingenting.\n" +" \n" +" Avslutningsstatus:\n" +" Alltid vellykket." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Gi et vellykket resultat.\n" +" \n" +" Avslutningsstatus:\n" +" Alltid vellykket." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Gi et mislykket resultat.\n" +" \n" +" Avslutningsstatus:\n" +" Alltid mislykket." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Kjør en enkel kommando, eller vis informasjon om kommandoer.\n" +" \n" +" Kjører valgt KOMMANDO med ARG uten oppslag av skallfunksjoner, eller " +"viser\n" +" informasjon om valgte KOMMANDOer. Dette kan brukes til å kalle " +"kommandoer\n" +" på disk når det finens en funksjon med samme navn.\n" +" \n" +" Valg:\n" +" -p\tbruk en standardverdi for STI som garantert finner alle\n" +" \tstandardverktøyene\n" +" -v\tskriv ut en beskrivelse av KOMMANDO i «type»-stil\n" +" -V\tskriv ut en mer detaljert beskrivelse av hver KOMMANDO\n" +" \n" +" Avslutningsstatus:\n" +" Samme som statuskoden fra KOMMANDO, eller mislykket hvis KOMMANDO ikke " +"finnes." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Gi verdier og attributter til variabler.\n" +" \n" +" Lag variabler og gi dem attributter. Hvis ingen NAVN er valgt,\n" +" vises attributter og verdier av alle variabler.\n" +" \n" +" Valg:\n" +" -f\tbegrens handling eller visning til funksjonsnavn og definisjoner\n" +" -F\tbegrens visning til funksjonsnavn (linjenummer og\n" +" \tkildefil kommer i tillegg ved feilsøking)\n" +" -g\tlag globale variabler ved bruk innenfor en skallfunksjon\n" +" \t(ignoreres ved annen bruk)\n" +" -p\tvis attributter og verdi av hvert valgt NAVN\n" +" \n" +" Valg som justerer attributter:\n" +" -a\tgjør valgte NAVN til indekserte tabeller (hvis det støttes)\n" +" -A\tgjør valgte NAVN til assosiative tabeller (hvis det støttes)\n" +" -i\tgi valgte NAVN attributten «integer» (heltall)\n" +" -l\tkonverter valgte NAVN til små bokstaver\n" +" -n\tgjør valgt NAVN til en referanse til variabelen med egen verdi som " +"navn\n" +" -r\tskrivebeskytt valgte NAVN\n" +" -t\tgi valgte NAVN attirbutten «trace»\n" +" -u\tkonverter valgte NAVN til store bokstaver\n" +" -x\tgjør valgte NAVN eksporterbare\n" +" \n" +" Bruk «+» i stedet for «-» for å slå av aktuell attributt.\n" +" \n" +" Variabler med heltallsattributt blir evaluert aritmetisk (se\n" +" kommandoen «let») når de får en verdi.\n" +" \n" +" Ved bruk innenfor funksjoner gjør «declare» valgte NAVN lokale, som med\n" +" kommandoen «local». Valget «-g» slår av denne oppførselen.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller\n" +" det oppstår en variabel-tildelingsfeil." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Gi verdier og attributter til variabler.\n" +" \n" +" Dette er synonymt med «declare» (se «help declare»)." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definer lokale variabler.\n" +" \n" +" Lag en lokal variabel med valgt NAVN og VERDI. Du kan foreta\n" +" VALG i henhold til kommandoen «declare».\n" +" \n" +" Lokale variabler kan bare brukes innenfor en funksjon. De er kun " +"synlige\n" +" for funksjonen de lages innenfor, samt underfunksjoner.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg, det oppstår\n" +" en feil under variabeltildeling eller skallet ikke kjører en funksjon." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skriv argumenter til standardutdata.\n" +" \n" +" Vis ARGumenter, adskilt med enkelt mellomromtegn og\n" +" etterfulgt av linjeskift, på standardutdata. \n" +" \n" +" Valg:\n" +" -n\tikke legg til linjeskift\n" +" -e\tslå på tolkning av skråstrek-skiftetegn\n" +" -E\tslå uttrykkelig av tolkning av skåstrek-skiftetegn\n" +" \n" +" «echo» tolker følgende skiftetegn:\n" +" \a\tsystemvarsel\n" +" \\b\trettetast\n" +" \\c\tignorer videre utdata\n" +" \\e\tskiftetegn\n" +" \\E\tskiftetegn\n" +" \\f\tsideskift\n" +" \\n\tny linje\n" +" \\r\tlinjeskift-tegn\n" +" \\t\thorisontal tabulator\n" +" \\v\tvertikal tabulator\n" +" \\\\\tomvendt skråstrek\n" +" \\0nnn\ttegn med ASCII-kode NNN (oktal). NNN kan bestå av\n" +" \t0 til 3 oktale sifre\n" +" \\xHH\t8-bit-tegn med verdi HH (heksadesimal). HH\n" +" \tkan bestå av ett eller to hex-sifre\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre det oppstår en skrivefeil." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skriv ut argumenter til standardutdata.\n" +" \n" +" Vis ARGumenter på standardutdata, etterfulgt av linjeskift.\n" +" \n" +" Valg:\n" +" -n\tikke ta med linjeskift\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre det oppstår en skrivefeil." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Slå på og av innebygde skallfunksjoner.\n" +" \n" +" Slår av og på innebygde skallkommandoer. Ved å slå av kan du\n" +" kjøre en kommando på disk med samme navnet som en skallkommando\n" +" uten å måtte bruke fullstendig filsti.\n" +" \n" +" Valg:\n" +" -a\tskriv ut en liste som viser hvilke kommandoer som er slått på\n" +" -n\tslå av hvert valgt NAVN, eller vis en liste over kommandoer som er " +"slått av\n" +" -p\tskriv ut liste over kommandoer i et gjenbrukbart format\n" +" -s\tbare skriv ut navn på innebygde Posix-spesialkommandoer\n" +" \n" +" Valg for dynamisk innlasting:\n" +" -f\tHent NAVN fra delt objekt-FILNAVN\n" +" -d\tFjern en kommando som er lastet inn med -f\n" +" \n" +" Hvis du ikke tar noen valg, blir hvert NAVN slått på.\n" +" \n" +" Bruk «enable -n test» for å bruke «test» i $PATH i stedet for\n" +" versjonen som er innebygd i skallet.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre valgt NAVN ikke er innebygd eller det oppstår feil." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Kjør argumenter som en skallkommando.\n" +" \n" +" Kombiner ARGumenter i én streng, bruk resultatet som inndata i skallet,\n" +" og kjør dette som kommando(er).\n" +" \n" +" Avslutningsstatus:\n" +" Samme som valgt kommando, eller vellykket hvis kommando er null." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Tolk valg-argumenter.\n" +" \n" +" Getopts brukes av skallprosedyrer til å tolke posisjonsparametre\n" +" som valg.\n" +" \n" +" VALGSTRENG inneholder bokstaver som skal behandles som valg.\n" +" Hvis en bokstav etterfølges av kolon, forventer valget et argument.\n" +" Argumentet holdes adskilt fra valget med blanktegn.\n" +" \n" +" getopts plasserer neste valg i skallvariabelen $name hver gang det\n" +" kalles, laster inn navnet hvis det ikke finnes, og\n" +" indeks for neste argument som skal behandles i skallvariabelen OPTIND.\n" +" OPTIND lastes inn til 1 hver gang skallet eller et skallskript kjøres.\n" +" Når et valg krever et argument plasseres argumentet i skallvariabelen " +"OPTARG.\n" +" \n" +" getopts rapporterer feil på én av to måter. Hvis første tegn i " +"VALGSTRENG\n" +" er kolon, rapporteres feil uten direkte feilmeldinger til bruker.\n" +" Hvis getopts ser et ugyldig valg, plasseres aktuelt valgtegn i OPTARG.\n" +" Hvis et obligatorisk argument ikke er gitt, legger getopts et «:» i NAVN " +"og\n" +" bruker oppdaget valgtegn som OPTARG. Hvis getopts ikke er i " +"stillemodus,\n" +" og ser et ugyldig valg, brukes «?» som NAVN, og OPTARG tømmes.\n" +" Hvis et obligatorisk argument ikke er gitt, legger getopts et «?»\n" +" i NAVN, tømmer OPTARG og skriver ut en feilmelding.\n" +" \n" +" Hvis skallvariabelen OPTERR har verdien 0, slår getopts av utskrift\n" +" av feilmeldinger, selv hvis første tegn i VALGSTRENG ikke er kolon.\n" +" OPTERR har verdien 1 som standard.\n" +" \n" +" Getopts tolker vanligvis posisjonsparametre ($0 - $9), men hvis\n" +" flere argumenter er gitt, blir disse tolket i stedet.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket hvis et valg finnes, og mislykket hvis et valg ikke finnes\n" +" eller det oppstår en annen feil." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Erstatt skallet med valgt kommando.\n" +" \n" +" Kjør KOMMANDO, og erstatt dette skallet med valgt program.\n" +" ARGUMENTER sendes videre til valgt KOMMANDO. Hvis KOMMANDO ikke er " +"valgt,\n" +" blir videresendinger brukt i gjeldende skall.\n" +" \n" +" Valg:\n" +" -a name\tsend NAVN som argument nummer null for KOMMANDO\n" +" -c\t\tkjør valgt KOMMANDO med et tomt miljø\n" +" -l\t\tbruk bindestrek som argument nummer null for COMMAND\n" +" \n" +" Hvis kommandoen ikke kan kjøres, avsluttes ikke-interaktivt skall, med " +"mindre\n" +" skallvalget «execfail» er brukt.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre valgt KOMMANDO ikke finnes eller det oppstår en " +"videresendingsfeil." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Avslutt skallet.\n" +" \n" +" Avslutt skallet med status N. Hvis N utelates, er statuskoden\n" +" den samme som forrige kjørte kommando." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Avslutt et innloggingsskall.\n" +" \n" +" Avslutter et innloggingsskall med status N. Dette gir feilmelding hvis " +"det\n" +" ikke kjøres i et innloggingsskall." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Vis eller kjør kommandoer fra historikklista.\n" +" \n" +" fc brukes til å vise list eller redigere og kjøre kommandoer på nytt fra " +"historikklista.\n" +" FØRSTE og SISTE kan være tall som angir rekkevidde. FØRSTE kan også være " +"en\n" +" streng, som betyr nyeste kommando som begynner med denne strengen.\n" +" \n" +" Valg:\n" +" -e ENAME\tvelg hvilket redigeringsprogram som skal brukes. Standard er " +"FCEDIT, evt. EDITOR\n" +" \t\teller vi\n" +" -l \tvis linjer i stedet for å redigere\n" +" -n\tikke vis linjenumre\n" +" -r\tvis linjer i omvendt rekkefølge (nyeste linjer øverst)\n" +" \n" +" I formatet «fc -s [pat=rep …] [kommando]» kjøres KOMMANDO\n" +" på nytt etter at GAMMEL=NY er utført.\n" +" \n" +" Et nyttig alias for dette er r='fc -s'. Slik blir «r cc» ensbetydende\n" +" med å kjøre forrige kommando med navn som begynner på «cc», og «r»\n" +" betyr å kjøre forrige kommando.\n" +" \n" +" Avslutningsstatus:\n" +" Enten vellykket, samme som kjørt kommando eller noe annet enn null hvis " +"det oppstår feil." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Flytt jobb til forgrunnen.\n" +" \n" +" Plasser jobb med id-en JOB_SPEC i forgrunnen, slik at den blir\n" +" gjeldende jobb. Hvis JOB_SPEC ikke er oppgitt, brukes jobben som\n" +" allerede oppfattes som gjeldende i skallet.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som kommandoen som legges i forgrunnen, eller mislykket hvis det " +"oppstår feil." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Flytt jobber til bakgrunnen.\n" +" \n" +" Plasser jobber med id-er JOB_SPEC i bakgrunnen, som om de\n" +" ble startet med «&». Hvis JOB_SPEC ikke er oppgitt, brukes jobben som " +"allerede\n" +" som gjeldende i skallet.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre jobbkontroll er slått av eller det oppstår feil." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Husk eller vis programplasseringer.\n" +" \n" +" Finn ut og husk fullstendige stinavn på hvert kommandoNAVN. Hvis\n" +" ingen argumenter er gitt, viser programmet lagrede programplasseringer.\n" +" \n" +" Valg:\n" +" -d\t\tglem lagret plassering av valgt(e) NAVN\n" +" -l\t\tskriv ut i gjenbrukbart format\n" +" -p stinavn\tbruk valgt STINAVN som fullstendig stinavn på valgt NAVN\n" +" -r\t\tglem alle lagrede plasseringer\n" +" -t\t\tskriv ut lagret plassering av valgt(e) NAVN, med\n" +" \t\tNAVN foran aktuell plassering hvis flere NAVN er valgt\n" +" Argumenter:\n" +" NAVN\t\tProgrammet søker etter hvert NAVN i $PATH og legger det til i " +"lista\n" +" \t\tover lagrede kommandoer.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre NAVN ikke finnes eller bruker tar et ugyldig valg." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Vis informasjon om innebygde kommandoer.\n" +" \n" +" Vis kort sammendrag om innebygde kommandoer. Hvis MØNSTER er\n" +" valgt, vises detaljert hjelp til bruk av alle kommandoer som samsvarer\n" +" med MØNSTER. Ellers vises en liste over hjelpeemner.\n" +" \n" +" Valg:\n" +" -d\tskriv ut en kort beskrivelse av hvert emne\n" +" -m\tetterlikn «manpage»-format i bruksdata\n" +" -s\tbare vis et kort brukssammendrag per emne som samsvarer\n" +" \t\tmed MØNSTER\n" +" \n" +" Argumenter:\n" +" MØNSTER\tVelger hjelpeemne\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre et MØNSTER ikke finnes eller bruker tar et ugyldig " +"valg." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Vis eller gjør endringer i kommandohistorikk.\n" +" \n" +" Vis historikk som en liste med linjenumre, og legg til «*» foran\n" +" endrede oppføringer. Argumentet N viser siste N antall oppføringer.\n" +" \n" +" Valg:\n" +" -c\ttøm historikk ved å slette alle oppføringer\n" +" -d posisjon\tslett historikkoppføring ved valgt posisjon.\n" +"\t\tNegativ posisjon teller fra slutten.\n" +" \n" +" -a\tlegg til linjer fra gjeldende økt i historikkfil\n" +" -n\tles alle historikklinjer som ikke allerede er lest inn fra " +"historikkfil\n" +" -r\tles historikkfil og legg til innhold i historikkliste\n" +" -w\tlagre gjeldende historikk i historikkfil\n" +" \n" +" -p\tutfør historikkutvidelse per ARGument og vis resultatet\n" +" \tuten å lagre det i historikkliste\n" +" -s\tlegg til ARGumenter i historikkliste som én enkelt oppføring\n" +" \n" +" Hvis FILNAVN er valgt, brukes dette som historikkfil. Ellers brukes\n" +" $HISTFILE hvis den har en verdi. Ellers brukes «~/.bash_history».\n" +" \n" +" Hvis $HISTTIMEFORMAT har en verdi som ikke er null, brukes denne\n" +" verdien som formatstreng for strftime(3) for å skriv ut tidsstempelet i\n" +" hver historikkoppføring. Ellers skrives ingen tidsstempler ut.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Vis status for bakgrunnsjobber.\n" +" \n" +" Vis aktive bakgrunnsjobber. JOBBSPES begrenser utskrift til valgt jobb.\n" +" Hvis ingenting er valgt, vises status for alle aktive jobber.\n" +" \n" +" Valg:\n" +" -l\tvis prosess-ID-er i tillegg til vanlig informasjon\n" +" -n\tbare vis prosesser som har endret stattus siden forrige\n" +" \tvarsling\n" +" -p\tbare vis prosess-ID-er\n" +" -r\tbare skriv ut kjørende jobber\n" +" -s\tbare skriv ut ventende jobber\n" +" \n" +" Hvis «-x» er valgt, kjøres KOMMANDO straks alle ARGumenterte\n" +" jobber er erstattet med prosess-ID-en til gjeldende prosessgruppeleder.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår " +"feil.\n" +" Hvis «-x» er valgt, hentes statuskode fra aktuell KOMMANDO." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Fjern jobber fra gjeldende skall.\n" +" \n" +" Fjerner hvert JOBBSPES-argument fra tabellen med aktive jobber.\n" +" Hvis ingen JOBBSPES er valgt, brukes jobben som regnes som gjeldende.\n" +" \n" +" Valg:\n" +" -a\tfjern alle jobber hvis JOBBSPES ikke er angitt\n" +" -h\tmarker hver JOBBSPES slik at SIGHUP ikke sendes til jobben hvis " +"skallet\n" +" \tmottar et SIGHUP\n" +" -r\tbare fjern kjørende jobber\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar ugyldig(e) valg eller JOBBSPES." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Send signal til en jobb.\n" +" \n" +" Gi prosesser (valgt med PID eller JOBBSPES) et signal\n" +" (valgt med SIGSPES eller SIGNUM). Hvis hverken SIGSPES eller SIGNUM er " +"valgt,\n" +" brukes SIGTERM.\n" +" \n" +" Valg:\n" +" -s sig\tSIG er et signalnavn\n" +" -n sig\tSIG er et signalnummer\n" +" -l\tvis signalnavn. Hvis «-l» etterfølges av argumenter,\n" +" \tantas disse å være signalnumre som det skal vises navn på\n" +" -L\ttilsvarer «-l»\n" +" \n" +" Kill er en innebygget skallkommando av to grunner: den tillater bruk av " +"jobb-ID\n" +" i stedet for prosess-ID, og lar bruker drepe prosesser hvis grensa for\n" +" antall tillatte prosesser er nådd.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Kontroller aritmetiske uttrykk.\n" +" \n" +" Kontroller hvert ARGument som et aritmetisk uttrykk. Kontroll utføres i\n" +" breddefaste heltall uten overflodssjekk, men deling på 0 fanges opp\n" +" og markeres som en feil. Følgende liste over operatører er\n" +" sortert gruppevis på presedensnivå, som vises i synkende rekkefølge.\n" +" \n" +" \tid++, id--\tvariabel post-inkrement, post-dekrement\n" +" \t++id, --id\tvariabel pre-inkrement, pre-dekrement\n" +" \t-, +\t\tunær minus, pluss\n" +" \t!, ~\t\tlogisk og bitvis negasjon\n" +" \t**\t\teksponentiasjon\n" +" \t*, /, %\t\tmultiplikasjon, divisjon, rest\n" +" \t+, -\t\taddisjon, subtraksjon\n" +" \t<<, >>\t\tvenstre og høyre bitvis bytte\n" +" \t<=, >=, <, >\tsammenlikning\n" +" \t==, !=\t\tlikhet, ulikhet\n" +" \t&\t\tbitvis AND\n" +" \t^\t\tbitvis XOR\n" +" \t|\t\tbitvis OR\n" +" \t&&\t\tlogisk AND\n" +" \t||\t\tlogisk OR\n" +" \texpr ? expr : expr\n" +" \t\t\tbetinget operatør\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\toppgave\n" +" \n" +" Skallvariabler tillates som operand. Variabelens navn erstattes med\n" +" verdien (tvunget til et breddefast heltall) i et uttrykk.\n" +" Variabelen behøver ikke heltallsattributt for å kunne brukes i et " +"uttrykk.\n" +" \n" +" Operatører regnes ut etter presedens. Underuttrykk i parentes\n" +" regnes ut først, og kan overstyre overnevnte presedensregler.\n" +" \n" +" Avslutningsstatus:\n" +" Hvis siste ARGument blir 0, er status 1. Ellers er statuskoden 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Les en linje fra standard inndata og del den opp i felt.\n" +" \n" +" Leser en enkeltlinje fra standard inndata, eller fra fildeskriptor FD\n" +" hvis «-u» er valgt. Linja deles opp i felt på samme måte som orddeling.\n" +" Første ord tildeles første NAVN, ord nummer to til NAVN nummer to,\n" +" og så videre. Eventuelle restrerende ord tildeles siste NAVN.\n" +" Bare tegn som finnes i $IFS regnes som ord-skilletegn.\n" +" \n" +" Hvis ingen NAVN er oppgitt, legges lest linje i variabelen REPLY.\n" +" \n" +" Valg:\n" +" -a tabell\tknytt leste ord til sekvens-indekser i \n" +" \t\ttabellvariabelen TABELL, talt fra null\n" +" -d skill\tfortsett frem til første SKILLetegn, i stedet for frem til " +"linjeskift\n" +" -e\t\tbruk Readline til å hente linje\n" +" -i tekst\tBruk valgt TEKST med Readline\n" +" -n n\tgå tilbake etter å ha lest N antall tegn i stedet for å vente på " +"ny linje,\n" +" \t\tmen bruk skilletegn hvis linja er kortere enn N\n" +" \t\tles tegn før skilletegn\n" +" -N N\tgå tilbake etter å ha lest nøyaktig N antall tegn, med mindre\n" +" \t\tEOF eller tidsavbrudd oppstår (skilletegn ignoreres)\n" +" -p ledet\tskriv ut valgt LEDETekst uten å legge til linjeskift før " +"lesing\n" +" -r\t\tikke tillat bruk av skråstrek som skiftetegn\n" +" -s\t\tikke skriv ut inndata som kommer fra en terminal\n" +" -t tidsav\tavbryt og avslutt med feil hvis en hel linje med inndata\n" +" \t\tikke blir lest ferdig innen valgt TIDSAVbrudd (i sekunder).\n" +" \t\tStandard avbruddstid hentes fra variabelen TMOUT. TIDSAVbrudd kan " +"være\n" +" \t\tet brøktall. Hvis TIDSAV er 0, går read tilbake umiddelbart,\n" +" \t\tog prøver ikke å lese data. I sistnevnte tilfelle avslutter read " +"bare\n" +" \t\tvellykket hvis inndata er tilgjengelig på valgt fildeskriptor.\n" +" \t\tAvslutningsstatus er større enn 128 ved tidsavbrudd\n" +" -u fd\t\tles fra fildeskriptor FD i stedet for standard inndata\n" +" \n" +" Avslutningsstatus:\n" +" Null (vellykket), med mindre programmet møter EOF, får tidsavbrudd\n" +" (i så fall er verdien høyere enn 128), det oppstår en variabel-" +"tidelingsfeil,\n" +" eller valget «-u» argumenteres med en ugyldig fildeskriptor." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Gå ut av en skallfunksjon.\n" +" \n" +" Avslutter en funksjon eller kildeskript med status N.\n" +" Hvis N er utelatt, brukes statuskoden fra forrige kommando\n" +" i funksjonen eller skriptet.\n" +" \n" +" Avslutningsstatus:\n" +" N, eller mislykket hvis skallet ikke kjører en funksjon eller et skript." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Legg til eller fjern verdier for skallvalg og posisjonsparametre.\n" +" \n" +" Endre verdier av skall-attributter og posisjonsparametre, eller\n" +" vis navn og verdier av skallvariabler.\n" +" \n" +" Valg:\n" +" -a Marker variabler som er endret eller laget for eksportering.\n" +" -b Varsle jobbavbrudd umiddelbart.\n" +" -e Avslutt hvis en kommando avslutter med annen status enn null.\n" +" -f Slå av generering av filnavn («globbing»).\n" +" -h Husk plassering av kommandoer ved oppslag.\n" +" -k Legg alle tildelingsargumenter for en kommando i miljøet,\n" +" og ikke bare de som kommer før kommandonavnet.\n" +" -m Slå på jobbkontroll.\n" +" -n Les kommandoer, men ikke kjør dem.\n" +" -o valgnavn\n" +" Gi verdi til variabelen som samsvarer med valgnavn:\n" +" allexport tilsvarer «-a»\n" +" braceexpand tilsvarer «-B»\n" +" emacs rediger linjer med et emacs-aktig grensesnitt\n" +" errexit tilsvarer «-e»\n" +" errtrace tilsvarer «-E»\n" +" functrace tilsvarer «-T»\n" +" hashall tilsvarer «-h»\n" +" histexpand tilsvarer «-H»\n" +" history slå på kommandohistorikk\n" +" ignoreeof ikke avslutt skall ved lesing av EOF\n" +" interactive-comments\n" +" tillat kommentarer i interaktive kommandoer\n" +" keyword tilsvarer «-k»\n" +" monitor tilsvarer «-m»\n" +" noclobber tilsvarer «-C»\n" +" noexec tilsvarer «-n»\n" +" noglob tilsvarer «-f»\n" +" nolog godtas, men ignoreres\n" +" notify tilsvarer «-b»\n" +" nounset tilsvarer «-u»\n" +" onecmd tilsvarer «-t»\n" +" physical tilsvarer «-P»\n" +" pipefail returverdi av en kommandokø er statusen for\n" +" siste kommando som avslutter med en annen status " +"enn null,\n" +" eller null hvis alle kommandoer avsluttet med " +"null\n" +" posix endre bash-oppførsel hvor standardoppførselen er\n" +" annerledes enn Posix-standarden, slik at bash\n" +" samsvarer med Posix\n" +" privileged tilsvarer «-p»\n" +" verbose tilsvarer «-v»\n" +" vi rediger linjer med et vi-aktig grensesnitt\n" +" xtrace tilsvarer «-x»\n" +" -p Slått på når virkelig og effektiv bruker-ID ikke er like.\n" +" Dette slår av behandling av fila $ENV og importering av\n" +" skallfunksjoner. Hvis du slår av dette valget, blir effektiv uid " +"og\n" +" gid det samme som virkelig uid og gid.\n" +" -t Avslutt når én kommando er lest og kjørt.\n" +" -u Behandle udefinerte variabler som en feil.\n" +" -v Skriv ut skall-inndatalinjer når de leses.\n" +" -x Skriv ut kommandoer og argumenter når de kjøres.\n" +" -B utfør «brace»-utvidelse\n" +" -C Ikke tillat overskriving av vanlige filer ved\n" +" videresending av utdata.\n" +" -E Gi ERR-felle videre til skallfunksjoner.\n" +" -H Slå på historikk-subsidiering i «!»-stil. Dette er slått på\n" +" som standard i interaktive skall.\n" +" -P Ikke følg symbolske lenker ved kjøring av kommandoer\n" +" som «cd».\n" +" -T Gi DEBUG-felle videre til skallfunksjoner.\n" +" -- Tildel gjenstående argumenter til posisjonsparametre.\n" +" Hvis ingen argumenter gjenstår, tømmes posisjonsparametrene.\n" +" - Knytt gjenstående argumenter til posisjonsparametre.\n" +" Valgene «-x» og «-v» er slått av.\n" +" \n" +" Bruk «+» i stedet for «-» for å slå av disse valgene.\n" +" De kan også brukes når skallet kalles. Gjeldende valgsett finnes\n" +" i «$-». Gjenstående antall ARGumenter er posisjonsparametre,\n" +" og tildeles i rekkefølge til $1, $2, … $n. Hvis ingen\n" +" ARGumenter er brukt, skrives alle skallvariabler ut.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Fjern verdier og attributter fra skallvariabler og funksjoner.\n" +" \n" +" Fjern variabel og funksjon per oppgitt NAVN.\n" +" \n" +" Valg:\n" +" -f\tbehandle hvert NAVN som en skallfunksjon\n" +" -v\tbehandle hvert NAVN som en skallvariabel\n" +" -n\tbehandle hvert NAVN som en navnreferanse, og tilbakestill selve " +"variabelen\n" +" \ti stedet for variabelen den refererer til\n" +" \n" +" Hvis ingen valg er tatt, prøver programmet først å tømme en variabel.\n" +" Hvis dette mislykkes, prøver programmet å tømme en funksjon.\n" +" \n" +" Enkelte variabler kan ikke tømmes. Se også «readonly».\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller et NAVN er " +"skrivebeskyttet." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Gi skallvariabler eksport-attributt.\n" +" \n" +" Markerer hvert valgt NAVN for automatisk eksportering til miljøet ved " +"etterfølgende\n" +" kjørte kommandoer. Hvis VERDI er oppgitt, tildeles VERDI før " +"eksportering.\n" +" \n" +" Valg:\n" +" -f\thenvis til skallfunksjoner\n" +" -n\tfjern eksport-attributt fra valgt(e) NAVN\n" +" -p\tvis en liste over alle eksporterte variabler og funksjoner\n" +" \n" +" Bruk argumentet«--» for å slå av videre behandling av valg.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg, eller et NAVN er " +"ugyldig." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marker skallvariabler som skrivebeskyttet.\n" +" \n" +" Marker hvert valgt NAVN som skrivebeskyttet. Verdier av NAVN kan ikke " +"endres\n" +" av etterfølgende tildeling. Hvis VERDI er oppgitt, tildeles denne før\n" +" variabelen markeres som skrivebeskyttet.\n" +" \n" +" Valg:\n" +" -a\thenvis til indekserte tabellvariabler\n" +" -A\thenvis til assosiative tabellvariabler\n" +" -f\thenvis til skallfunksjoner\n" +" -p\tvis en liste over alle skrivebeskyttede variabler eller " +"funksjoner,\n" +" avhengig av hvorvidt «-f» er valgt\n" +" \n" +" Bruk argumentet «--» for å slå av videre behandling av valg.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller NAVN." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Flytt posisjonsparametre.\n" +" \n" +" Gi parametrene $N+1,$N+2 osv. nye navn som $1,$2 osv. Hvis N er\n" +" utelatt, brukes verdien 1.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre N er negativ eller større enn $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Kjør kommandoer fra en fil i gjeldende skall.\n" +" \n" +" Les og kjør kommandoer fra valgt FILNAVN i gjeldende kall.\n" +" Elementene i $PATH brukes til å finne mappa med valgt FILNAVN.\n" +" Hvis ARGUMENTER brukes, bruke disse som posisjonsparametre\n" +" når valgt FILNAVN kjøres.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som siste kommando som ble kjørt via FILNAVN, eller\n" +" mislykket hvis FILNAVN ikke kan leses." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Sett skallkjøring på pause.\n" +" \n" +" Sett kjøring av dette skallet på pause inntil det mottar et SIGCONT-" +"signal.\n" +" Innloggingsskall kan ikke settes på pause med mindre du tvinger det " +"fram.\n" +" \n" +" Valg:\n" +" -f\ttving skallpause, selv hvis skallet er et innloggingsskall\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre jobbkontroll er slått av eller det oppstår feil." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Kontroller betinget uttrykk.\n" +" \n" +" Avslutter med status 0 (positiv, «true») eller 1 (negativ, «false»)\n" +" i henhold til resultatet av valgt UTTRykk. Uttrykk kan være unære eller " +"binære.\n" +" Unære uttrykk brukes ofte for å undersøke status for en fil.\n" +" Streng- og tallkontroll-valg kan også brukes.\n" +" \n" +" Test endrer oppførsel i henhold til antall argumenter.\n" +" Se bash-bruksanvisninga for en fullstendig spesifikasjon.\n" +" \n" +" Filvalg:\n" +" \n" +" -a FIL Positiv hvis FIL finnes.\n" +" -b FIL Positiv hvis FIL er blokk-spesialfil.\n" +" -c FIL Positiv hvis FIL er tegn-spesialfil.\n" +" -d FIL Positiv hvis FIL er en mappe.\n" +" -e FIL Positiv hvis FIL finnes.\n" +" -f FIL Positiv hvis FIL finnes og er en vanlig fil.\n" +" -g FIL Positiv hvis FIL er «set-group-id».\n" +" -h FIL Positiv hvis FIL er en symbolsk lenke.\n" +" -L FIL Positiv hvis FIL er en symbolsk lenke.\n" +" -k FIL Positiv hvis FIL er «sticky».\n" +" -p FIL Positiv hvis FIL er et navngitt datarør.\n" +" -r FIL Positiv hvis FIL kan leses av deg.\n" +" -s FIL Positiv hvis FIL finnes og ikke er tom.\n" +" -S FIL Positiv hvis FIL er en sokkel.\n" +" -t FD Positiv hvis FD er åpen i en terminal.\n" +" -u FIL Positiv hvis FIL er «set-user-id».\n" +" -w FIL Positiv hvis FIL kan overskrives av deg.\n" +" -x FIL Positiv hvis FIL kan kjøres av deg.\n" +" -O FIL Positiv hvis FIL har deg som effektiv eier.\n" +" -G FIL Positiv hvis FIL har din gruppe som effektiv " +"gruppetilhørighet.\n" +" -N FIL Positiv hvis FIL er blitt endret siden den ble lest " +"sist.\n" +" \n" +" FIL1 -nt FIL2 Positiv hvis FIL1 er nyere enn FIL2 (i følge\n" +" endringsdato).\n" +" \n" +" FIL1 -ot FIL2 Positiv hvis FIL1 er eldre enn FIL2.\n" +" \n" +" FIL1 -ef FIL2 Positiv hvis FIL1 er en hard lenke til FIL2.\n" +" \n" +" Strengvalg:\n" +" \n" +" -z STRENG Positiv hvis STRENG er tom.\n" +" \n" +" -n STRENG\n" +" STRENG Positiv hvis STRENG ikke er tom.\n" +" \n" +" STRENG1 = STRENG2\n" +" Positiv hvis STRENGene er like.\n" +" STRENG1 != STRENG2\n" +" Positiv hvis STRENGene ikke er like.\n" +" STRENG1 < STRENG2\n" +" Positiv hvis STRENG1 havner over STRENG2 når de " +"sorteres leksikografisk.\n" +" STRENG1 > STRENG2\n" +" Positiv hvis STRENG1 havner under STRENG2 når de " +"sorteres leksikografisk.\n" +" \n" +" Andre valg:\n" +" \n" +" -o VALG Positiv hvis skallvalget OPTION er slått på.\n" +" -v VAR\t Positiv hvis skallvariabelen VAR har en verdi\n" +" -R VAR\t Positiv hvis skallvariabelen VAR har en verdi, og er en " +"navnreferanse.\n" +" ! UTTR Positiv hvis UTTR er usant.\n" +" UTTR1 -a UTTR2 Positiv hvis både UTTR1 og UTTR2 er sanne.\n" +" UTTR1 -o UTTR2 Positiv hvis enten UTTR1 eller UTTR2 er sanne.\n" +" \n" +" arg1 OP arg2 Aritmetiske tester. OP må være enten «-eq», «-ne»,\n" +" «-lt», «-le», «-gt» eller «-ge».\n" +" \n" +" Aritmetiske binærvalg gir positiv verdi hvis ARG1 er lik, ulik, mindre " +"enn,\n" +" lik-eller-mindre-enn, større enn eller større-enn-eller-lik ARG2.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket hvis UTTR gir positiv verdi, og mislykket hvis det gir negativ " +"verdi eller\n" +" bruker skriver inn et ugyldig argument." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Kontroller betinget uttrykk.\n" +" \n" +" Dette er synonymt med den innebygde kommandoen «test», men\n" +" siste argument må være «]» for å samsvare med «[»." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Vis prosesstider.\n" +" \n" +" Skriver ut oppsamlet bruker- og systemtid for skallet og alle " +"underprosesser.\n" +" \n" +" Avslutningsstatus:\n" +" Alltid vellykket." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Fang signaler og andre hendelser.\n" +" \n" +" Definerer og slår på brytere som skal kjøres når skallet mottar " +"signaler\n" +" eller havner i andre tilstander.\n" +" \n" +" ARG er en kommando som skal leses og kjøres når skallet mottar signalet/-" +"ene\n" +" i henhold til SIGNALSPES. Hvis ARG er enten utelatt eller «-»,\n" +" og én SIGNALSPES er brukt, tilbakestilles valgt(e) signal(er) til\n" +" opprinnelig verdi. Hvis ARG er null, ignoreres SIGNALSPES av skallet\n" +" og kommandoene det kjører.\n" +" \n" +" Hvis en SIGNALSPES er EXIT (0), kjøres ARG når skallet avslutter.\n" +" Hvis en SIGNALSPES er DEBUG, kjøres ARG før hver kommando.\n" +" Hvis en SIGNALSPES er RETURN, kjøres ARG hver gang en skallfunksjon, " +"skript\n" +" eller innebygd kommando har kjørt ferdig. Hvis en SIGNALSPES\n" +" er ERR, kjøres ARG hver gang en feilkjørt kommando ville ført til at " +"skallet\n" +" avsluttes når «-e» er valgt.\n" +" \n" +" Hvis ingen argumenter er brukt, skriver trap ut en liste over " +"kommandoer\n" +" som er tilknyttet hvert signal.\n" +" \n" +" Valg:\n" +" -l\tskriv ut en liste over signalnavn og tilknyttede numre\n" +" -p\tvis trap-kommandoer som er tilknyttet hver SIGNALSPESifikasjon\n" +" \n" +" Hver SIGNALSPES er enten et signalnavn fra eller et " +"signalnummer.\n" +" Signalnavn skiller mellom små og store bokstaver. Prefikset «SIG» er " +"valgfritt.\n" +" Du kan sende et signal til skallet med «kill -signal $$».\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre en SIGNALSPES eller et valg er ugyldig." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Vis informasjon om kommandotype.\n" +" \n" +" Vis hvordan hvert NAVN ville blitt tolket hvis det ble brukt som\n" +" et kommandonavn.\n" +" \n" +" Valg:\n" +" -a\tvis alle plasseringer som inneholder en kjørbar fil med oppgitt " +"NAVN.\n" +" \tHer inngår alle alias, innebygde kommandoer og funksjoner, med mindre\n" +" \t«-p» er valgt i tillegg\n" +" -f\tikke slå opp skallfunksjoner\n" +" -P\ttving et søk i STI etter NAVN, selv hvis det er et alias,\n" +" \tinnebygd kommando eller en funksjon, og vis navn på fila\n" +" \tsom ville blitt kjørt\n" +" -p\tvis enten navn på fila som ville blitt kjørt, eller ingenting " +"hvis\n" +" \t«type -t NAVN» ikke fører til «file».\n" +" -t\tbeskriv NAVN som enten «alias», «keyword» (nøkkelord),\n" +" \t«function» (funksjon), «builtin» (innebygd kommando), «file» (fil) " +"eller \n" +" \t«'» (ikke funnet), if NAME is an alias, shell\n" +" \n" +" Argumenter:\n" +" NAVN\tKommandonavn som skal tolkes.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket hvis alle NAVN finnes, og mislykket hvis ett eller flere ikke " +"finnes." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Endre grenser for skallressurser.\n" +" \n" +" Lar deg kontrollere mengden ressurser som skal være tilgjengelig for " +"skall og\n" +" prosessene det lager på systemer som tillater det.\n" +" \n" +" Valg:\n" +" -S\tbruk myk («soft») ressursgrense\n" +" -H\tbruk «hard» ressursgrense\n" +" -a\tvis alle gjeldende grenser\n" +" -b\tstørrelse på sokkel-mellomlager\n" +" -c\tmaksimal størrelse på opprettede kjernefiler\n" +" -d\tmaksimal størrelse på datasegment av en prosess\n" +" -e\tmaksimal prioritet («nice»-verdi)\n" +" -f\tmaksimal størrelse på filer som skrives av skallet og " +"underprosesser\n" +" -i\tmaksimalt antall ventende signaler\n" +" -l\tmaksimal minnemengde en prosess kan låse\n" +" -m\tmaksimal «resident set»-størrelse\n" +" -n\tmaksimalt antall åpne fildeskriptorer\n" +" -p\tstørrelse på mellomlager for datarør\n" +" -q\tmaksimalt antall byte i POSIX-meldingskøer\n" +" -r\tmaksimal sanntidsprioritet\n" +" -s\tmaksimal stabelstørrelse\n" +" -t\tmaksimal cpu-tid (i sekunder)\n" +" -u\tmaksimalt antall brukerprosesser\n" +" -v\tstørrelsen på virtuelt minne\n" +" -x\tmaksimalt antall fillåser\n" +" -T maksimalt antall tråder\n" +" \n" +" Det er ikke alle valg som støttes på alle plattformer.\n" +" \n" +" Hvis GRENSE er oppgitt, brukes denne som ny verdi for valgt ressurs.\n" +" Du kan også bruke spesialverdiene «soft» (myk), «hard», og " +"«unlimited» (ubegrenset).\n" +" Ellers skriver programmet ut gjeldende verdi av valgt ressurs. Hvis " +"ingenting\n" +" er valgt, brukes «-f».\n" +" \n" +" Verdier oppgis i 1024-byte-enheter, bortsett fra «-t» som oppgis i " +"sekunder,\n" +" «-p» som oppgis i 512-byte-enheter og «-u» som er et uskalert antall " +"prosesser.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Vis eller endre filmodus-maske.\n" +" \n" +" Endrer brukers standardmaske for nye filer til valgt MODUS. Hvis ingen\n" +" MODUS er valgt, skrives gjeldende maskeverdi ut.\n" +" \n" +" Hvis MODUS begynner med et siffer, tolkes den som et oktalt tall,\n" +" og ellers som en symbolsk modusstreng av typen som brukes av chmod(1).\n" +" \n" +" Valg:\n" +" -p\tskriv ut i et format som kan gjenbrukes som inndata hvis ingen " +"MODUS er valgt\n" +" -S\tgjør utdata symbolsk (ikke skriv ut oktaltall)\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre MODUS er ugyldig eller bruker tar et ugyldig valg." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Vent på fullføring av jobb, og skriv ut avslutningsstatus.\n" +" \n" +" Vent på valgt(e) prosess(er) (valgt med ID, som kan være prosess-ID " +"eller\n" +" jobbspesifikasjon), og skriv ut statuskode. Hvis ID ikke er valgt,\n" +" venter programmet på alle aktive underprosesser, og avslutter\n" +" med kode null. Hvis ID er en jobbspesifikasjon, venter programmet på " +"alle\n" +" prosesser i kommandokøen for valgt jobb.\n" +" \n" +" Hvis «-n» er valgt, skriver programmet ut avslutningsstatus for neste " +"jobb.\n" +" \n" +" Hvis «f» er valgt og jobbkontroll er slått på, venter programmet på at\n" +" valgt ID skal avslutte i stedet for å vente på statusendring.\n" +" Avslutningsstatus:\n" +" Samme som siste ID, eller mislykket hvis enten ID er ugyldig eller\n" +" bruker tar et ugyldig valg." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Vent på ferdigstillelse av prosess, og rapporter avslutningsstatus.\n" +" \n" +" Venter på hver prosess som er valgt med PID, og rapporterer avsluttende " +"statuskode.\n" +" Hvis PID ikke er valgt, venter kommandoen på alle aktive " +"underprosesser,\n" +" og avslutter med null-status. PID må være en prosess-ID.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som siste PID. Mislykket hvis PID er ugyldig, eller hvis\n" +" bruker tar et ugyldig valg." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Kjør kommandoer for hvert medlem i en liste.\n" +" \n" +" Løkka «for» kjører en rekke kommandoer per medlem i en liste\n" +" over elementer. Hvis «in ORD …;» ikke er angitt, brukes«in \"$@\"».\n" +" NAVN gis til hvert element i ORD, og KOMMANDOER kjøres.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørte kommando." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetisk «for»-løkke.\n" +" \n" +" Tilsvarer\n" +" \t(( UTTR1 ))\n" +" \twhile (( UTTR2 )); do\n" +" \t\tKOMMANDOER\n" +" \t\t(( UTTR3 ))\n" +" \tdone\n" +" UTTR1, UTTR2 og UTTR3 er aritmetiske uttrykk. Hvis et uttrykk\n" +" utelates, oppfører programmet seg som om uttrykket er lik 1.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørte kommando." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Velg ord fra en liste og kjør kommandoer.\n" +" \n" +" Utvid og lag en liste av valgt(e) ORD.\n" +" Utvidede ord skrive ut på standard feilkanal, anledet av et tall.\n" +" Hvis «in ORD» ikke er valgt, brukes «in \"$@\"». Deretter vises\n" +" PS3-ledetekst, og en linje leses fra standard inndata. Hvis linja\n" +" består av et tall som tilsvarer antall ord, endres NAVN slik at det\n" +" tilsvarer dette tallet. Hvis linja er tom, vises ORD og ledetekst på\n" +" nytt. Hvis programmet møter EOF, avslutter kommandoen. Andre\n" +" verdier fører til at NAVN endres til null. Lest linje lagres i " +"variabelen\n" +" REPLY. KOMMANDOER kjøres etter hvert utvalg frem til programmet\n" +" støter på en bruddkommando.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørt kommando." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Rapporter medgått tid i kommandokø-kjøring.\n" +" \n" +" Kjør valgt DATARØR og skriv ut en oppsummering av reell tid, bruker-CPU-" +"tid\n" +" og system-CPU-tid som er medgått ved kjøring av DATARØR idet det " +"avsluttes.\n" +" \n" +" Valg:\n" +" -p\tkjør tidsoppsummering i gjenbrukbart Posix-format.\n" +" \n" +" Verdien av variabelen «TIMEFORMAT» brukes som utdata-format.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som statuskoden fra valgt DATARØR." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Kjør kommandoer basert på mønster-søk.\n" +" \n" +" Kjør KOMMANDOER som samsvarer med ORD og MØNSTER.\n" +" Tegnet «|» brukes til å holde mønstre adskilt.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørte kommando." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Kjør kommandoer på gitte betingelser.\n" +" \n" +" Kjør lista «if KOMMANDOER». Hvis avslutningsstatus er null, kjøres\n" +" «then KOMMANDOER». Ellers kjøres hver «elif KOMMANDOER»-liste\n" +" etter tur. Hvis status er null ved sistnevnte, kjøres tilhørende «then " +"KOMMANDOER»\n" +" og if-kommandoen avslutter. Ellers kjøres evt. lista «else KOMMANDOER».\n" +" Avslutningsstatus for hele betingelsesuttrykket er statuskoden fra sist " +"kjørt kommando,\n" +" eller null hvis ingen tilstand er sann.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørt kommando." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Kjør kommandoer så lenge en test lykkes.\n" +" \n" +" Utvid og kjør KOMMANDOER så lenge siste kommando i\n" +" «while» avslutter med null-status.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørte kommando." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Kjør kommandoer så lenge en test mislykkes.\n" +" \n" +" Utvid og kjør KOMMANDOER så lenge siste kommando i\n" +" «until» avslutter med en annen statuskode enn null.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørte kommando." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Lag medprosess med valgt NAVN.\n" +" \n" +" Kjør valgt KOMMANDO synkront, med standard inn- og utdata for " +"kommandoen\n" +" som er tilkoblet via et datarør til fildeskriptorer med indeks 0 og 1 i " +"en tabellvariabel \n" +" med oppgitt NAVN i kjørende skall.\n" +"\v StandardNAVN er «COPROC».\n" +" \n" +" coproc avslutter med kode 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Definer en skallfunksjon.\n" +" \n" +" Lag en skallfunksjon med valgt NAVN. NAVN kjører KOMMANDOer i gjeldende " +"skallkontekst\n" +" når det kjøres som en enkel kommando, og argumenter videresendes til " +"funksjonen som\n" +" $1…$n. Funksjonens navn ligger i $FUNCNAME.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre valgt NAVN er skrivebeskyttet." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Organiser kommandoer i grupper.\n" +" \n" +" Kjør en rekke kommandoer som en gruppe. Slik kan du videresende\n" +" et helt kommandosett.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørt kommando." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Gjenoppta jobb i forgrunnen.\n" +" \n" +" Tilsvarer argumentet «JOBBSPES» for kommandoen «fg». Gjenoppta\n" +" en jobb som venter eller kjører i bakgrunnen. «JOBBSPES» kan\n" +" enten være et jobbnavn eller -nummer. Bruk «&» etter JOBBSPES for å\n" +" legge jobben i bakgrunnen, som om jobbspesifikasjonen var et argument " +"for «bg».\n" +" \n" +" Avslutningsstatus:\n" +" Samme som statuskoden for gjenopptatt jobb." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Gå gjennom aritmetisk uttrykk.\n" +" \n" +" Valgt UTTRYKK prøves i henhold til regler for aritmetisk utregning.\n" +" Tilsvarer «let UTTRYKK».\n" +" \n" +" Avslutningsstatus:\n" +" 1 hvis UTTRYKK blir 0, og ellers 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Kjør betinget kommando.\n" +" \n" +" Gir statuskode 0 eller 1, avhengig av utfallet av betinget UTTRYKK.\n" +" Uttrykk bygges opp på samme måte som i den innebygde kommandoen «test»,\n" +" og kan kombineres som følger:\n" +" \n" +" ( UTTRYKK )\tViser verdien av UTTRYKK\n" +" ! UTTRYKK\t\tPositiv hvis UTTRYKK er usant, ellers negativ\n" +" UTTR1 && UTTR2\tPositiv hvis både UTTR1 og UTTR2 er sant, ellers " +"negativ\n" +" UTTR1 || UTTR2\tPositiv hvis enten UTTR1 eller UTTR2 er sant, ellers " +"negativ\n" +" \n" +" Ved bruk av «==» og «!=» brukes etterfølgende streng som\n" +" et mønster, og programmet utfører mønsterutlikning.\n" +" Ved bruk av «=~» utliknes etterfølgende streng som\n" +" et regulært uttrykk.\n" +" \n" +" Valgene «&&» og «||» kontrollerer ikke UTTR2 hvis UTTR1 allerede\n" +" har gitt svar på uttrykkets verdi.\n" +" \n" +" Avslutningsstatus:\n" +" 0 eller 1, avhengig av UTTRYKKets verdi." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Vanlige skallvariabel-navn og bruk.\n" +" \n" +" BASH_VERSION\tInformasjon om Bash-versjon.\n" +" CDPATH\tEn kolondelt liste over mapper som skal gjennomsøkes\n" +" \t\tfor mapper som er brukt som argumenter for «cd».\n" +" GLOBIGNORE\tEn kolondelt liste over mønstre som beskriver filnavn\n" +" \t\tsom skal ignoreres av stinavn-utvidelse.\n" +" HISTFILE\tNavn på fil hvor kommandohistorikk for gjeldende bruker er " +"lagret.\n" +" HISTFILESIZE\tMaksimalt antall linjer denne fila kan inneholde.\n" +" HISTSIZE\tMaksimalt antall historikklinjer et kjørende skall har tilgang " +"til.\n" +" HOME\tFullstendig sti til gjeldende brukers hjemmemappe.\n" +" HOSTNAME\tNavn på gjeldende vert.\n" +" HOSTTYPE\tType prosessor denne versjonen av Bash kjører på.\n" +" IGNOREEOF\tKontrollerer skallets handling ved mottak av\n" +" \t\tEOF-tegn som eneste inndata. Hvis denne har en verdi, er verdien\n" +" \t\tgjeldende antall EOF-tegn som kan dukke opp på rad på en tom linje\n" +" \t\tfør skallet avslutter (standard: 10). Hvis denne ikke har en verdi,\n" +" \t\ttolkes EOF som slutt på inndata.\n" +" MACHTYPE\tEn streng som beskriver systemet Bash kjører på nå.\n" +" MAILCHECK\tHvor ofte (i sekunder) Bash skal se etter ny e-post.\n" +" MAILPATH\tEn kolondelt liste over filnavn som Bash skal gjennomsøke\n" +" \t\tfor ny e-post.\n" +" OSTYPE\tVersjonen av Unix som denne versjonen av Bash kjører på.\n" +" PATH\tEn kolondelt liste over mapper som skal gjennomsøkes\n" +" \t\tved søk etter kommandoer.\n" +" PROMPT_COMMAND\tEn kommando som skal kjøres før utskrift av\n" +" \t\tprimær ledetekst.\n" +" PS1\t\tPrimær ledetekst-streng.\n" +" PS2\t\tSekundær ledetekst-streng.\n" +" PWD\t\tFullstendig sti til gjeldende mappe.\n" +" SHELLOPTS\tEn kolondelt liste over skallvalg som er i bruk.\n" +" TERM\tNavn på gjeldende terminaltype.\n" +" TIMEFORMAT\tUtdata-format for tidsstatistikk som vises av\n" +" \t\tdet reserverte ordet «time».\n" +" auto_resume\tEt kommandoord som dukker opp alene på en linje\n" +" \t\tblir kontrollert mot lista over ventende jobber. Hvis kommandoen " +"finnes\n" +" \t\ti lista, flyttes den til forgrunnen.\n" +" \t\tVerdien «exact» betyr at kommandoen må være helt lik\n" +" \t\tet kommandonavn i lista over ventende jobber.\n" +" \t\t«substring» betyr at kommandoen må samsvare med en del\n" +" \t\tav navnet. Andre verdier betyr at kommandoen må\n" +" \t\tvære et prefiks av en ventende jobb.\n" +" histchars\tTegn som styrer historikkutvidelse og hurtig-subsidiering.\n" +" \t\tFørste tegn er historikk-subsidieringstegnet (vanligvis «!»),\n" +" \t\tdet andre er hurtig-subsidieringstegnet (vanligvis «^»), og\n" +" \t\tdet tredje er historikk-kommentar-tegnet (vanligvis «#»).\n" +" HISTIGNORE\tEn kolondelt liste over mønstre som bestemmer\n" +" \t\thvilke kommandoer som skal lagres i historikklista.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Legg til mapper i stabel.\n" +" \n" +" Legg til en mappe i toppen av mappestabelen, eller roter\n" +" stabelen og gjør toppen av stabelen til gjeldende arbeidsmappe.\n" +" Hvis ingen argumenter er gitt, bytter de to øverste mappene plass..\n" +" \n" +" Valg:\n" +" -n\tIkke bytt mappe når mapper legges til i stabelen\n" +" \t(bare endre stabelen).\n" +" \n" +" Argumenter:\n" +" +N\tRoter stabelen og legg N-te mappe (talt fra\n" +" \tnull til venstre, etter «dirs») i toppen.\n" +" \n" +" -N\tRoter stabelen og legg N-te mappe (talt fra\n" +" \tnull til høyre, etter «dirs») i toppen.\n" +" \n" +" dir\tLegg til MAP i toppen av mappestabelen, og ta den i bruk\n" +" \tsom arbeidsmappe.\n" +" \n" +" Bruk kommandoen «dirs» for å vise mappestabelen.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre et ugyldig argument er brukt eller\n" +" mappebytte mislykkes." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Fjern mapper fra stabelen.\n" +" \n" +" Fjern oppføringer fra mappestabelen. Hvis ingen argumenter er gitt,\n" +" fjernes øverste mappe fra stabelen, og tar i bruk ny toppmappe som " +"arbeidsmappe.\n" +" \n" +" Valg:\n" +" -n\tIkke bytt mappe når mapper fjernes fra stabelen\n" +" \t(bare endre stabelen).\n" +" \n" +" Argumenter:\n" +" +N\tFjern N-te mappe (talt fra null til venstre, etter «dirs»).\n" +" F.eks.: «popd +0» fjerner første mappe, og «popd +1» mappe nr. 2.\n" +" \n" +" -N\tFjern N-te mappe (talt fra null til høyre, etter «dirs»).\n" +" F.eks.: «popd -0» fjerner siste mappe, og «popd -1» nest siste " +"mappe.\n" +" \n" +" Bruk kommandoen «dirs» for å vise mappestabelen.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre et ugyldig argument er brukt eller\n" +" mappebytte mislykkes." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Vis mappestabel.\n" +" \n" +" Vis liste over hurtiglagrede mapper som er hurtiglagret med\n" +" kommandoen «pushd». Du kan gå opp igjen med kommandoen «popd». \n" +" Valg:\n" +" -c\ttøm mappestabel ved å slette alle elementer\n" +" -l\tikke skriv ut undermapper av brukers hjemmemappe som\n" +" \trelative stier med tilde-prefiks\n" +" -p\tskriv ut mappestabel med én oppføring per linje\n" +" -v\ttilsvarer «-p», men med stabelposisjon som prefiks\n" +" \n" +" Argumenter:\n" +" +N\tVis N-te oppføring (talt fra null til venstre, etter «dirs»).\n" +" -N\tVis N-te oppføring (talt fra null til høyre, etter «dirs»).\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Juster og tilbakestill skallvalg.\n" +" \n" +" Endre innstilling for hvert VALGNAVN. Hvis ingen valg/argumenter er " +"brukt,\n" +" skriver programmet ut alle oppgitte VALGNAVN og viser hvorvidt de har en " +"verdi.\n" +" Hvis ingen VALGNAVN er oppgitt, skriver programmet ut alle skallvalg.\n" +" \n" +" Valg:\n" +" -o\tbegrense VALGNAVN til det som er definert med «set -o»\n" +" -p\tskriv ut hvert skallvalg og vis status\n" +" -q\tikke skriv ut noe\n" +" -s\tslå på (gi verdi til) hvert VALGNAVN\n" +" -u\tslå av (tilbakestill) hvert VALGNAVN\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket hvis VALGNAVN er slått på, og mislykket hvis enten bruker \n" +" tar et ugyldig valg eller VALGNAVN er slått av." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formaterer og skriver ut ARGUMENTER på FORMATets premisser.\n" +" \n" +" Valg:\n" +" -v var\tlegg utdata i valgt VARiabel i stedet for å\n" +" \t\tvise den på standardutdata\n" +" \n" +" FORMAT er en tegnstreng som inneholder tre typer objekter:\n" +" - rene tegn (som kopieres til standardutdata),\n" +" - skiftetegn (som konverteres og kopieres til standardutdata), og\n" +" - formatspesifikasjoner (som skriver ut påfølgende argument).\n" +" \n" +" Printf tolker følgende standard-formatspes. i tillegg til de som " +"står beskrevet i printf(1):\n" +" \n" +" %b\tutvid omvendt skråstrek-skiftesekvenser i gjeldende argument\n" +" %q\tgi argumentet anførselstegn slik at det kan brukes som skall-" +"inndata\n" +" %(fmt)T skriv ut «date-time»-streng etter bruk av FMT som " +"formatstreng\n" +" med strftime(3)\n" +" \n" +" Formatet gjenbrukes etter nødvendighet for å bruke opp alle " +"argumentene.\n" +" Hvis det finnes færre argumenter enn formatet krever, oppfører " +"overflødige\n" +" formatstrenger seg som om de var 0-verdier eller null-strenger.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår en\n" +" skrive- eller tidelingsfeil." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Velg hvordan argumenter skal fullføres av Readline.\n" +" \n" +" Velg hvordan argumenter skal fullføres per NAVN.\n" +" Hvis brukeren ikke tar noen valg, blir gjeldende " +"fullføringsspesifikasjoner\n" +" skrevet ut i et format som egner seg til gjenbruk.\n" +" \n" +" Valg:\n" +" -p\tskriv ut gjeldende fullføringsoppsett i et gjenbrukbart format " +"(standard)\n" +" -r\tfjern en fullføringsspesifikasjon per NAVN\n" +" \t(eller fra alle spesifikasjoner hvis ingen NAVN er valgt)\n" +" -D\tbruk fullføringer og handlinger som standard for kommandoer uten\n" +" \tspesifikke definisjoner av fullføring\n" +" -E\tbruk fullføringer og handlinger på «tomme» kommandoer\n" +" -I\tbruk fullføringer og handlinger på første (kommando-) ord\n" +" \n" +" Handlinger tas i bruk i samme rekkefølge som valgene med\n" +" store bokstaver ovenfor. Valget «-D» har høyere prioritet\n" +" enn «-E», og begge har høyere prioritet enn «-I».\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Vis mulige fullføringer basert på valgene.\n" +" \n" +" Dette er ment for å brukes i en skallfunksjon som genererer mulige\n" +" fullføringer. Hvis argumentet ORD brukes, genererer programmet\n" +" søketreff på ORD.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Endre eller vis fullføringsvalg.\n" +" \n" +" Endre fullføringsvalg per NAVN, eller kjørende fullføringsprosess hvis " +"ingen\n" +" NAVN er valgt. Hvis ingen VALG er brukt, skriv enten ut fullføringsvalg " +"per NAVN,\n" +" eller gjeldende fullføringsoppsett.\n" +" \n" +" Valg:\n" +" \t-o option\tEndre fullføringsVALG per NAVN\n" +" \t-D\t\tEndre valg for kommandofullføringa «default»\n" +" \t-E\t\tEndre valg for kommandofullføringa «empty»\n" +" \t-I\t\tEndre valg for fullføring av første ord\n" +" \n" +" Bruk «+o» i stedet for «-o» for å slå av valg.\n" +" \n" +" Argumenter:\n" +" \n" +" Hvert NAVN henviser til en kommando som må ha en " +"fullføringsspesifikasjon\n" +" definert med den innebyde kommandoen «complete». Hvis ingen NAVN\n" +" er valgt, må compopt brukes av en funksjon som genererer fullføringer.\n" +" Valgene for den aktuelle fullføringsgeneratoren blir i så fall endret.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller NAVN\n" +" mangler fullføringsoppsett." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Legg linjer fra standard inndata i en indeksert tabellvariabel.\n" +" \n" +" Legg linjer fra standard inndata i indeksert tabellvariabel TABELL, " +"eller\n" +" fra fildeskriptor FD ved bruk av «-u». Variabelen MAPFILE er\n" +" standard TABELL.\n" +" \n" +" Valg:\n" +" -d skill\tBruk SKILLetegn til å avslutte linjer (i stedet for " +"linjeskift)\n" +" -n antall\tIkke kopier flere enn valgt ANTALL linjer. Hvis ANTALL er " +"0, kopieres alle linjer.\n" +" -O oppr\tTildel til TABELL ved indeks-OPPRinnelse. Standard indeks er " +"0.\n" +" -s antall \tForkast valgt ANTALL linjer i starten.\n" +" -t\t\tFjern etterfølgende linjeskift fra hver lest linje.\n" +" -u fd\t\tLes linjer fra fildeskriptor FD i stedet for standard " +"inndata.\n" +" -C tilbakekall\tVurder TILBAKEKALL hver gang valgt ANTALL linjer er " +"lest.\n" +" -c antall\tVelg antall linjer som skal leses mellom hvert " +"TILBAKEKALL.\n" +" \n" +" Argumenter:\n" +" ARRAY\t\tTabellvariabel-navn som skal brukes i fildata.\n" +" \n" +" Hvis «-C» er valgt men ikke «-c», brukes standardantallet 5000. Når\n" +" TILBAKEKALL vurderes, argumenteres det i tillegg med indeks av neste " +"tabellelement\n" +" samt linjenummeret som skal tildeles aktuelt element.\n" +" \n" +" Hvis ingen eksplisitt opprinnelse er gitt, tømmes TABELL før den får " +"tildelt noe.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller TABELL enten er\n" +" skrivebeskyttet eller en ikke-indeksert tabell." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Legg linjer fra en fil inn i en tabellvariabel.\n" +" \n" +" Dette er synonymt med «mapfile»." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Viser kontekst for kall av gjeldende underrutine.\n" +#~ " \n" +#~ " Hvis EXPR mangler, vises" + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: prosess %5ld (%s) i _kommandokø" + +#~ msgid "Unknown Signal #" +#~ msgstr "Ukjent signal #" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Opphavsrett (C) 2018 Free Software Foundation, Inc." + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Opphavsrett (C) 2014 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/bash-5.1/po/nl.gmo b/bash-5.1/po/nl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..6131322859472ed5e82e4f36a3b9d03a6747c6ee Binary files /dev/null and b/bash-5.1/po/nl.gmo differ diff --git a/bash-5.1/po/nl.po b/bash-5.1/po/nl.po new file mode 100644 index 0000000000000000000000000000000000000000..60b9d48d8d1f69ee04a7aecf74adbcdaf9314407 --- /dev/null +++ b/bash-5.1/po/nl.po @@ -0,0 +1,5919 @@ +# Dutch translations for GNU bash. +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# «Lernfähiger Software! Ich lach mich kaputt!» +# +# De vertaling van de ruim 70 laatste hulpteksten (65%) in dit bestand +# volgt niet helemaal het normale stramien van "onbepaalde wijs voor +# elke functieomschrijvende tekst". De hoofddocstring gebruikt wel +# de onbepaalde wijs, maar het begin van de gedetailleerde omschrijving +# stapt over op de derde persoon, om daarna een passieve vorm te +# gebruiken voor de rest van de preciseringen en uitzonderingen. +# +# Opmerking over vocabulair: +# 'Stopped' wordt consequent vertaald met "Gepauzeerd", omdat "Gestopt" +# te veel zou doen denken aan "Beëindigd", terwijl het alleen maar gaat +# om stilstaan en niet om finale opgave. Een alternatieve vertaling +# zou dus "Stilstand" kunnen zijn. +# +# Benno Schulenberg , 2006, 2008, 2010, 2011, 2013, 2014. +# Benno Schulenberg , 2015, 2016, 2019. +# Erwin Poeze , 2009. +# Julie Vermeersch , 2004. +# Erick Branderhorst , 1996. +msgid "" +msgstr "" +"Project-Id-Version: bash-5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-05-30 14:14+0200\n" +"Last-Translator: Benno Schulenberg \n" +"Language-Team: Dutch \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "ongeldige array-index" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: 'nameref'-eigenschap wordt verwijderd" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: kan geïndexeerd array niet omzetten naar associatief array" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: ongeldige sleutel voor associatief array" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: niet-numerieke index is niet mogelijk" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: een index is nodig bij toekenning aan associatief array" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "Kan %s niet aanmaken: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command(): kan voor opdracht geen toetsenkaart vinden" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: eerste teken dat geen witruimte is is niet '\"'" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "geen sluit-'%c' in %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: ontbrekend scheidingsteken (dubbele punt)" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "Kan %s niet losmaken" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "accoladevervanging: onvoldoende geheugen beschikbaar voor %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "accoladevervanging: onvoldoende geheugen beschikbaar voor %u elementen" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "accoladevervanging: onvoldoende geheugen beschikbaar voor '%s'" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "'%s': ongeldige naam voor alias" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "regelbewerking is niet ingeschakeld" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "'%s': ongeldige naam voor toetsenkaart" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "Kan %s niet lezen: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "'%s': onbekende functienaam" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s is aan geen enkele toets gebonden\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s kan worden aangeroepen via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "Kan %s niet losmaken" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "herhalingsaantal" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "heeft alleen betekenis in een 'for'-, 'while'- of 'until'-lus" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"De context van de aanroep van de huidige functie tonen.\n" +"\n" +" Zonder argument produceert het \"$regelnummer $bestandsnaam\"; met\n" +" argument \"$regelnummer $functienaam $bestandsnaam\". Deze tweede\n" +" vorm kan gebruikt worden om een 'stack trace' te produceren. De\n" +" waarde van het argument geeft aan hoeveel frames er teruggegaan\n" +" moet worden; het huidige frame heeft nummer 0.\n" +"\n" +" De afsluitwaarde is 0, tenzij de shell momenteel geen functie uitvoert\n" +" of EXPRESSIE ongeldig is." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME is niet gedefinieerd" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "te veel argumenten" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null-map" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD is niet gedefinieerd" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "regel %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "waarschuwing: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: Gebruik: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: optie vereist een argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: vereist een numeriek argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: niet gevonden" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: ongeldige optie" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: ongeldige optienaam" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "'%s': is geen geldige naam" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "ongeldig octaal getal" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "ongeldig hexadecimaal getal" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "ongeldig getal" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: ongeldige signaalaanduiding" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "'%s': is geen PID en geen geldige taakaanduiding" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: is een alleen-lezen variabele" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s valt buiten bereik" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s valt buiten bereik" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: taak bestaat niet" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: geen taakbesturing" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "geen taakbesturing" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: beperkte modus" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "beperkte modus" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: is geen ingebouwde opdracht van de shell" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "schrijffout: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "fout tijdens instellen van terminaleigenschappen: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "fout tijdens verkrijgen van terminaleigenschappen: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: fout tijdens bepalen van huidige map: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: taakaanduiding is niet eenduidig" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "hulp is niet beschikbaar in deze versie" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "Kan '%s' niet verwijderen: %s is alleen-lezen" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "Kan '%s' niet verwijderen" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: ongeldige actienaam" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: is geen completerings-aanduiding" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "waarschuwing: optie -F functioneert mogelijk niet zoals verwacht" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "waarschuwing: optie -C functioneert mogelijk niet zoals verwacht" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "er wordt momenteel geen completeringsfunctie uitgevoerd" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "kan alleen worden gebruikt binnen een functie" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: verwijzingsvariabele mag geen array zijn" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: zelfverwijzing door naamsverwijzingsvariabele is niet toegestaan" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: circulaire naamsverwijzing" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "'%s': ongeldige variabelenaam voor naamsverwijzing" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "'-f' kan niet gebruikt worden om een functie te definiëren" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: is een alleen-lezen functie" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: aangehaalde samengesteld-array-toekenning is verouderd" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: kan array-variabelen niet op deze manier verwijderen" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: kan associatief array niet omzetten naar geïndexeerd array" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamisch-laden is niet beschikbaar" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "kan gedeeld object %s niet openen: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "kan %s niet vinden in gedeeld object %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: is niet dynamisch geladen" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "laadfunctie voor %s geeft foutcode (%d): is niet geladen" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: is niet dynamisch geladen" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "Kan %s niet verwijderen: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: is een map" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: is geen normaal bestand" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: bestand is te groot" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: kan binair bestand niet uitvoeren" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "Kan %s niet uitvoeren: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "uitgelogd\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "geen login-shell; gebruik 'exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Er zijn nog gepauzeerde taken.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Er zijn nog draaiende taken.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "geen opdracht gevonden" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "geschiedenisaanduiding" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "Kan tijdelijk bestand '%s' niet openen: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "huidige" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "taak %d is gestart zonder taakbesturing" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ongeldige optie -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: optie vereist een argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashen is uitgeschakeld" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: de hash-tabel is leeg\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "treffers commando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Shell-opdrachten die overeenkomen met '" +msgstr[1] "Shell-opdrachten die overeenkomen met '" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"Er is geen hulptekst voor '%s'.\n" +"Probeer 'help help' of 'man -k %s' of 'info %s'." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "Kan %s niet openen: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Hieronder staan alle interne shell-opdrachten opgesomd. Typ 'help' om dit\n" +"overzicht opnieuw te zien. Typ 'help naam' voor meer informatie over de\n" +"opdracht met die naam. Typ 'info bash' voor gedetailleerde informatie over\n" +"de gehele shell. En gebruik 'man -k ...' of 'info ...' voor meer " +"informatie\n" +"over andere opdrachten.\n" +"\n" +"(Een sterretje (*) naast een naam betekent dat de functie uitgeschakeld " +"is.)\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "slechts één van '-a', '-n', '-r' of '-w' is mogelijk" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "geschiedenispositie" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: ongeldig tijdsstempel" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: geschiedenisexpansie is mislukt" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: 'inlib' is mislukt" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "bij '-x' zijn geen andere opties toegestaan" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenten moeten proces-IDs of taak-IDs zijn" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Onbekende fout" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "uitdrukking werd verwacht" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: is geen geïndexeerd array" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: ongeldige aanduiding van bestandsdescriptor" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: ongeldige bestandsdescriptor: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: ongeldig regelaantal" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: ongeldig array-begin" + +# Quantum is een hoeveelheid regels, een getal. +# Callback is de aan te roepen functie, maar onnodig in de vertaling. +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: ongeldige hoeveelheid" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "lege naam van array-variabele" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "ondersteuning van arrayvariabelen is vereist" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "'%s': ontbrekend opmaakteken" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "'%c': ongeldige aanduiding van tijdsopmaak" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "'%c': ongeldig opmaakteken" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "waarschuwing: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "probleem bij ontleden van opmaak: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "ontbrekend hexadecimaal cijfer bij \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "ontbrekend Unicode-cijfer bij \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "geen andere map" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: ongeldig argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "mappenstapel is leeg" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "mappenstapelindex" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Toont de huidige lijst van onthouden mappen. Mappen worden aan deze\n" +" lijst toegevoegd met de opdracht 'pushd', en verwijderd met 'popd'.\n" +"\n" +" Opties:\n" +" -c de mappenstapel wissen door alle elementen te verwijderen\n" +" -l paden niet afkorten (relatief ten opzichte van uw thuismap)\n" +" maar volledig weergegeven\n" +" -p de mappenstapel tonen met één item per regel\n" +" -v als '-p' maar met elk item voorafgegaan wordt door diens positie\n" +" in de stapel\n" +"\n" +" Argumenten:\n" +" +N Toont het N-de item, tellend vanaf links, van de lijst getoond\n" +" door 'dirs' wanneer opgeroepen zonder opties, beginnend bij nul.\n" +" -N Toont het N-de item, tellend vanaf rechts, van de lijst getoond\n" +" door 'dirs' wanneer opgeroepen zonder opties, beginnend bij nul." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Voegt een map toe aan de top van de mappenstapel, of roteert de stapel\n" +" en maakt de huidige werkmap gelijk aan de nieuwe top van de stapel.\n" +" Zonder argumenten worden de bovenste twee mappen verwisseld.\n" +"\n" +" Optie:\n" +" -n de verandering van map onderdukken bij het toevoegen van mappen\n" +" aan de stapel, zodat alleen de stapel wordt gemanipuleerd\n" +"\n" +" Argumenten:\n" +" +N Roteert de stapel zodat de N-de map (tellend vanaf links, van\n" +" de lijst getoond door 'dirs', beginned bij nul) bovenaan komt.\n" +" -N Roteert de stapel zodat de N-de map (tellend vanaf rechts, van\n" +" de lijst getoond door 'dirs', beginned bij nul) bovenaan komt.\n" +" MAP Voegt deze map toe aan de top van de mappenstapel, en maakt het\n" +" de nieuwe werkmap.\n" +"\n" +" De opdracht 'dirs' toont de huidige mappenstapel." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Verwijdert items van de mappenstapel. Zonder argumenten verwijdert\n" +" het de bovenste map van de stapel, en maakt de huidige werkmap\n" +" gelijk aan de nieuwe bovenste map.\n" +"\n" +" Optie:\n" +" -n de verandering van map onderdukken bij het toevoegen van mappen\n" +" aan de stapel, zodat alleen de stapel wordt gemanipuleerd\n" +"\n" +" Argumenten:\n" +" +N Verwijdert het N-de item tellend vanaf links (van de lijst\n" +" getoond door 'dirs', beginnend met nul). Bijvoorbeeld:\n" +" 'popd +0' verwijdert de eerste map, 'popd +' de tweede.\n" +" -N Verwijdert het N-de item tellend vanaf rechts (van de lijst\n" +" getoond door 'dirs', beginnend met nul). Bijvoorbeeld:\n" +" 'popd -0' verwijdert de laatste map, 'popd -1' de voorlaatste.\n" +"\n" +" De opdracht 'dirs' toont de huidige mappenstapel." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: ongeldige aanduiding van tijdslimiet" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "leesfout: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"kan alleen een 'return' doen uit een functie of een uit script aangeroepen " +"met 'source'" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "kan niet tegelijk een functie en een variabele verwijderen" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: is geen array-variabele" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: is geen functie" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "Kan '%s' niet exporteren" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift-aantal" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "kan shell-opties niet tegelijk inschakelen en uitschakelen" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: ongeldige shell-optienaam" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "vereist een bestandsnaam als argument" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: bestand niet gevonden" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "kan niet pauzeren" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "kan een inlog-shell niet pauzeren" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s is een alias voor '%s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s is een shell-sleutelwoord\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s is een functie\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s is een speciale ingebouwde shell-functie\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s is een ingebouwde shell-functie\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s is %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s is gehasht (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: ongeldige limietwaarde" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "'%c': ongeldige opdracht" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: kan de limiet niet bepalen: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limiet" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: kan de limiet niet wijzigen: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "octaal getal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "'%c': ongeldige operator in symbolische modus" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "'%c': ongeldig teken in symbolische modus" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " regel " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "laatste opdracht: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Afbreken..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "informatie: " + +#: error.c:462 +msgid "unknown command error" +msgstr "onbekende opdrachtfout" + +#: error.c:463 +msgid "bad command type" +msgstr "ongeldig opdrachttype" + +#: error.c:464 +msgid "bad connector" +msgstr "ongeldige verbinder" + +#: error.c:465 +msgid "bad jump" +msgstr "ongeldige sprong" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: ongebonden variabele" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\awachten op invoer duurde te lang -- automatisch afgemeld\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "kan standaardinvoer niet omleiden vanaf /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: '%c': ongeldig opmaakteken" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc(): coproc [%d:%s] bestaat nog steeds" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "pijpfout" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximum 'eval'-nestingsniveau is overschreden (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximum 'source'-nestingsniveau is overschreden (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximum functie-nestingsniveau is overschreden (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: beperkte modus: '/' in opdrachtnamen is niet toegestaan" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: opdracht niet gevonden" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: ongeldige interpreter" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: kan binair bestand %s niet uitvoeren" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "'%s' is een speciale ingebouwde shell-functie" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "kan bestandsdescriptor %d niet dupliceren naar bestandsdescriptor %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "recursieniveau van expressies is overschreden" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "recursiestapel-onderloop" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "syntaxfout in expressie" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "poging tot toewijzing aan een niet-variabele" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "syntaxfout in toewijzing aan variabele" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "deling door nul" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "**interne fout**: onjuist symbool in toewijzingsexpressie" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "':' werd verwacht voor een voorwaardelijke expressie" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exponent is kleiner dan 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "naam verwacht na pre-increment of pre-decrement" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "ontbrekend ')'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntaxfout: operator verwacht" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntaxfout: ongeldige rekenkundige operator" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (het onjuiste symbool is \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "ongeldige rekenkundige basis" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: ongeldig regelaantal" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "waarde is te groot voor basis" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: expressiefout\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getwd(): kan geen geen toegang verkrijgen tot bovenliggende mappen" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "kan 'nodelay'-modus niet uitschakelen voor bestandsdescriptor %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"kan geen nieuwe bestandsdescriptor reserveren voor bash-invoer vanuit " +"bestandsdescriptor %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" +"check_bash_input(): buffer bestaat al voor nieuwe bestandsdescriptor %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline(): procesgroep van pijp" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "afgesplitst PID %d hoort bij draaiende taak %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "verwijderen van gepauzeerde taak %d met procesgroep %ld..." + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process(): PID %5ld (%s) staat gemarkeerd als nog actief" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid(): PID %ld bestaat niet" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signaal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Klaar" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Gepauzeerd" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Gepauzeerd(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Wordt uitgevoerd" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Klaar(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Exit %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Onbekende afsluitwaarde" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(geheugendump gemaakt) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (werkmap: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "instellen van procesgroep %2$ld van dochter %1$ld" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait(): PID %ld is geen dochterproces van deze shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for(): proces %ld is nergens geregistreerd" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job(): taak %d is gepauzeerd" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: taak bestaat niet" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: taak is afgesloten" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: taak %d draait al op de achtergrond" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" +"waitchld(): WNOHANG wordt ingeschakeld om een onbegrensde blokkering te " +"vermijden" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: regel %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (geheugendump gemaakt)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(werkmap is nu: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp() is mislukt" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: geen taakbesturing in de achtergrond" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: lijnprotocol" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid()" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "kan procesgroep (%d) van terminal niet instellen" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "er is geen taakbesturing in deze shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc(): controletest is mislukt: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc(): %s:%d: controletest is mislukt\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "onbekend" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc(): een pointer op de lijst van vrije blokken is overschreven" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free(): aangeroepen met als argument een blok dat al vrijgegeven is" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free(): aangeroepen met als argument een ongebruikt blok" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free(): onderloop: 'mh_nbytes' valt buiten bereik" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free(): onderloop: 'mh_nbytes' valt buiten bereik" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free(): blokgroottes van begin en eind zijn verschillend" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc(): aangeroepen met als argument een ongebruikt blok" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc(): onderloop: 'mh_nbytes' valt buiten bereik" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc(): onderloop: 'mh_nbytes' valt buiten bereik" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc(): blokgroottes van begin en eind zijn verschillend" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc(): reserveringstabel is vol??\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc(): %p staat al als gereserveerd in tabel??\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free(): %p staat al als vrij in tabel??\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "ongeldige basis" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: onbekende host" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: ongeldige service" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: ongeldige aanduiding van netwerkpad" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "netwerkoperaties worden niet ondersteund" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale(): LC_ALL: kan niet van taalregio veranderen (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale(): LC_ALL: kan niet van taalregio veranderen (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale(): %s: kan niet van taalregio veranderen (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale(): %s: kan niet van taalregio veranderen (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "U hebt post in $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "U hebt nieuwe post in $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "De post in %s is gelezen.\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "syntaxfout: een rekenkundige uitdrukking is vereist" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "syntaxfout: onverwachte ';'" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntaxfout: '((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document(): ongeldig instructietype %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"regel %d van \"hier\"-document eindigt met einde van bestand (verwachtte " +"'%s')" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection(): omleidingsinstructie '%d' valt buiten bereik" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc(): lengte van invoerregel (%zu) overschrijdt SIZE_MAX (%lu): " +"regel is afgekapt" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "maximum aantal \"hier\"-documenten is overschreden" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "onverwacht bestandseinde tijdens zoeken naar bijpassende '%c'" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "onverwacht bestandseinde tijdens zoeken naar ']]'" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntaxfout in conditionele expressie: onverwacht symbool '%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "syntaxfout in conditionele expressie" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "onverwacht symbool '%s'; ')' werd verwacht" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "')' werd verwacht" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "onverwacht argument '%s' bij eenzijdige conditionele operator" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "onverwacht argument bij eenzijdige conditionele operator" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "" +"onverwacht symbool '%s'; tweezijdige conditionele operator werd verwacht" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "tweezijdige conditionele operator werd verwacht" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "onverwacht argument '%s' bij tweezijdige conditionele operator" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "onverwacht argument bij tweezijdige conditionele operator" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "onverwacht symbool '%c' in conditionele opdracht" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "onverwacht symbool '%s' in conditionele opdracht" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "onverwacht symbool %d in conditionele opdracht" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntaxfout nabij onverwacht symbool '%s'" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntaxfout nabij '%s'" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "syntaxfout: onverwacht bestandseinde" + +#: parse.y:6365 +msgid "syntax error" +msgstr "syntaxfout" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Gebruik \"%s\" om de shell te verlaten.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "onverwacht bestandseinde tijdens zoeken naar bijpassende ')'" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion(): functie '%s' niet gevonden" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion(): %s: mogelijke herprobeerlus" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert(): %s: lege COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command(): ongeldige verbinder '%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set(): %d: ongeldige bestandsdescriptor" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set(): bestandspointer is NIL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" +"xtrace-bestandsdescriptor (%d) != bestandsnummer van xtrace-bestandspointer " +"(%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf(): '%c': ongeldig opmaakteken" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "bestandsdescriptor valt buiten bereik" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: omleiding is niet eenduidig" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: kan bestaand bestand niet overschrijven" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: beperkte modus: omleiden van uitvoer is niet toegestaan" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "kan geen tijdelijk bestand maken voor \"hier\"-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: kan bestandsdescriptor niet toewijzen aan variabele" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port is niet mogelijk zonder netwerk" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "omleidingsfout: kan bestandsdescriptor niet dupliceren" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "Kan /tmp niet vinden; maak deze aan!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp dient een geldige mapnaam te zijn" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pretty-printing-modus wordt genegeerd in interactieve shells" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: ongeldige optie" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "kan UID niet op %d instellen; effectieve UID is %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "kan GID niet op %d instellen; effectieve GID is %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "kan debugger niet starten; debugging-modus is uitgeschakeld" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: is een map" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Ik heb geen naam!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versie %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Gebruik: %s [opties]\n" +" %s [opties] scriptbestand...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Lange opties:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Korte opties:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD, of -c OPDRACHT, of -O SHOPT-OPTIE (enkel bij aanroep)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s, of -o optie (veranderbaar via 'set')\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Typ '%s -c \"help set\"' voor meer informatie over shell-opties.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Typ '%s -c help' voor meer informatie over ingebouwde shell-functies.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Gebruik de opdracht 'bashbug' om fouten in bash te rapporteren.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Webpagina van 'bash': \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Algemene hulp bij gebruik van GNU-software: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask(): %d: ongeldige operatie" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Niet-bestaand signaal" + +# Vroeger ging dit over het afsluiten van een modemverbinding, +# tegenwoordig over het afsluiten van een pseudoterminal. +#: siglist.c:50 +msgid "Hangup" +msgstr "Opgehangen" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Onderbroken" + +# Verleden tijd, "Afgesloten", net als de andere actiesignaalnamen. +#: siglist.c:58 +msgid "Quit" +msgstr "Afgesloten" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Ongeldige instructie" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Traceer/breekpunt-instructie" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT-instructie" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT-instructie" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Drijvendekomma-berekeningsfout" + +#: siglist.c:86 +msgid "Killed" +msgstr "Geëlimineerd" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Busfout" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Segmentatiefout" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Onjuiste systeemaanroep" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Gebroken pijp" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Wekker" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Beëindigd" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Urgente in-/uitvoertoestand" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Gepauzeerd (signaal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Doorgaan" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Dochter is geëlimineerd of gestopt" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Gepauzeerd (terminalinvoer)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Gepauzeerd (terminaluitvoer)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O is mogelijk" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU-limiet" + +#: siglist.c:154 +msgid "File limit" +msgstr "Bestandslimiet" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtueel)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profiel)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Venster is veranderd" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Recordvergrendeling" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Gebruikerssignaal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Gebruikerssignaal 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT-invoergegevens staan te wachten" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "stroomstoring dreigt" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "systeemcrash dreigt" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "proces naar andere processor verplaatsen" + +#: siglist.c:198 +msgid "programming error" +msgstr "programmeerfout" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT-monitormodus is gegeven" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT-monitormodus is herroepen" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT-geluidssequentie is afgespeeld" + +#: siglist.c:214 +msgid "Information request" +msgstr "Verzoek om informatie" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Onbekend signaal #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "ongeldige vervanging: geen sluit-'%s' in %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: kan geen lijst toewijzen aan een array-element" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "kan geen pijp maken voor procesvervanging" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "kan geen dochterproces maken voor procesvervanging" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "kan pijp genaamd %s niet openen om te lezen" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "kan pijp genaamd %s niet openen om te schrijven" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "kan pijp genaamd %s niet dupliceren als bestandsdescriptor %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "opdrachtsubstitutie: null-byte in invoer is genegeerd" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "kan geen pijp maken voor opdrachtvervanging" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "kan geen dochterproces maken voor opdrachtvervanging" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" +"command_substitute(): kan pijp niet dupliceren als bestandsdescriptor 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: ongeldige variabelenaam voor naamsverwijzing" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: ongeldige indirecte expansie" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: ongeldige variabelenaam" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter is niet ingesteld" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: lege parameter, of niet ingesteld" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: resultaat van deeltekenreeks is kleiner dan nul" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: ongeldige vervanging" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: kan niet op deze manier toewijzen" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"toekomstige versies van de shell zullen dit als een rekenkundige vervanging " +"evalueren" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "ongeldige vervanging: geen afsluitende '`' in %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "geen overeenkomst: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argument werd verwacht" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: een geheel-getaluitdrukking werd verwacht" + +#: test.c:265 +msgid "`)' expected" +msgstr "')' werd verwacht" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "')' werd verwacht; %s gevonden" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "tweezijdige operator werd verwacht, %s gevonden" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "eenzijdige operator werd verwacht, %s gevonden" + +#: test.c:881 +msgid "missing `]'" +msgstr "ontbrekende ']'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntaxfout: onverwachte ';'" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "ongeldig signaalnummer" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: maximum 'trap-handler'-niveau is overschreden (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps(): ongeldige waarde in trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signaalverwerker is SIG_DFL, herzenden van %d (%s) aan " +"mezelf..." + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler(): ongeldig signaal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "fout tijdens importeren van functiedefinitie voor '%s'" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "shell-niveau is te hoog (%d); teruggezet op 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "" +"make_local_variable(): er is geen functiecontext in huidige geldigheidsbereik" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: aan variabele mag geen waarde toegewezen worden" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: toekenning van geheel getal aan naamsverwijzing" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" +"all_local_variables(): er is geen functiecontext in huidige geldigheidsbereik" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "*** %s heeft lege export-tekenreeks" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "*** ongeldig teken '%d' in export-tekenreeks voor %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "*** geen '=' in export-tekenreeks voor %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context(): top van 'shell_variables' is geen functiecontext" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context(): er is geen 'global_variables'-context" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope(): top van 'shell_variables' is geen tijdelijk geldigheidsbereik" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: Kan %s niet openen als BESTAND" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: ongeldige waarde %s voor 'trace'-bestandsdescriptor" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: compatibiliteitswaarde valt buiten bereik" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"De licentie is GPLv3+: GNU GPL versie 3 of later.\n" +"Zie http://gnu.org/licenses/gpl.html voor de volledige tekst.\n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versie %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Dit is vrije software; u mag het vrijelijk wijzigen en verder verspreiden." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Er is GEEN GARANTIE, voor zover de wet dit toestaat." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: kan geen %lu bytes reserveren (%lu bytes gereserveerd)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: kan geen %lu bytes reserveren" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: kan geen %lu bytes reserveren (%lu bytes gereserveerd)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: kan geen %lu bytes reserveren" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [NAAM[=WAARDE] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] NAAM [NAAM...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPSVX] [-m TOETSENKAART] [-f BESTANDSNAAM] [-q NAAM] [-u NAAM]\n" +" [-r TOETSENREEKS] [-x TOETSENREEKS:SHELL-OPDRACHT]\n" +" [TOETSENREEKS:READLINE-FUNCTIE | TOETSENREEKS:READLINE-OPDRACHT]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [N]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [N]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [INGEBOUWDE_SHELLFUNCTIE [ARGUMENT...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [EXPRESSIE]" + +# XXX FIXME is this right? +# can -@ only combine with -P, not with -L? +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|(-P [-e])] [-@] [MAP]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] OPDRACHT [ARGUMENT...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [NAAM[=WAARDE] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] NAAM[=WAARDE]..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [OPTIE] NAAM[=WAARDE]..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [ARGUMENT...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [ARGUMENT...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f BESTANDSNAAM] [NAAM...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [ARGUMENT...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts OPTIETEKENREEKS NAAM [ARGUMENT]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a NAAM] [OPDRACHT [ARGUMENT...]] [OMLEIDING...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [N]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [N]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e EDITORNAAM] [-lnr] [EERSTE] [LAATSTE] of: fc -s " +"[PATROON=VERVANGING] [OPDRACHT]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [TAAKAANDUIDING]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [TAAKAANDUIDING...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p PADNAAM] [-dt] [NAAM...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [PATROON...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d POSITIE] [N] of: history -anrw [BESTANDSNAAM] of: " +"history -ps ARGUMENT..." + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "" +"jobs [-lnprs] [TAAKAANDUIDING...] of: jobs -x OPDRACHT [ARGUMENT...]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [TAAKAANDUIDING... | PID...] " + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s SIGNAALNAAM | -n SIGNAALNUMMER | -SIGNAAL] PID | TAAKAANDUIDING\n" +" of: kill -l [SIGNAAL]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let ARGUMENT..." + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a ARRAY] [-d SCHEIDINGSTEKEN] [-i TEKST] [-p PROMPT]\n" +" [-n AANTAL_TEKENS] [-N AANTAL_TEKENS] [-t TIJDSLIMIET]\n" +" [-u BESTANDSDESCRIPTOR] [NAAM...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [N]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o OPTIENAAM] [--] [ARGUMENT...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [NAAM...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [NAAM[=WAARDE] ...] of: export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [NAAM[=WAARDE] ...] of: readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [N]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source BESTANDSNAAM [ARGUMENTEN]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". BESTANDSNAAM [ARGUMENTEN]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [EXPRESSIE]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ EXPRESSIE... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[ARGUMENT] SIGNAALAANDUIDING...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] NAAM..." + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [GRENSWAARDE]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [MODUS]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [ID ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [-n] [PID ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAAM [in WOORDEN...] ; do OPDRACHTEN; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( EXPR1; EXPR2; EXPR3 )); do OPDRACHTEN; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAAM [in WOORDEN... ;] do OPDRACHTEN; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] PIJPLIJN" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case WOORD in [PATROON [| PATROON]...) OPDRACHTEN ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if OPDRACHTEN; then OPDRACHTEN; [elif OPDRACHTEN; then OPDRACHTEN;]... [else " +"OPDRACHTEN;] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while OPDRACHTEN; do OPDRACHTEN; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until OPDRACHTEN; do OPDRACHTEN; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAAM] OPDRACHT [OMLEIDINGEN]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function NAAM { OPDRACHTEN ; } of: NAAM () { OPDRACHTEN ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ OPDRACHTEN ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "TAAKAANDUIDING [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( EXPRESSIE ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ EXPRESSIE ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "var - namen en betekenissen van enkele shell-variabelen" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | MAP]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [OPTIENAAM...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v VARIABELE] OPMAAK [ARGUMENTEN]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPTIE] [-A ACTIE] [-C OPDRACHT]\n" +" [-F FUNCTIE] [-G PATROON] [-P PREFIX] [-S SUFFIX]\n" +" [-W WOORDENLIJST] [-X FILTERPATROON] [NAAM...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o OPTIE] [-A ACTIE] [-C OPDRACHT] [-F FUNCTIE]\n" +" [-G PATROON] [-P PREFIX] [-S SUFFIX]\n" +" [-W WOORDENLIJST] [-X FILTERPATROON] [WOORD]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o OPTIE] [-DEI] [NAAM...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d SCHEIDINGSTEKEN] [-n AANTAL] [-O BEGIN] [-s AANTAL] [-t]\n" +" [-u BESTANDSDESCRIPTOR] [-C FUNCTIE] [-c HOEVEELHEID] " +"[ARRAY]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d SCHEIDINGSTEKEN] [-n AANTAL] [-O BEGIN] [-s AANTAL] [-t]\n" +" [-u BESTANDSDESCRIPTOR] [-C FUNCTIE] [-c HOEVEELHEID] " +"[ARRAY]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Aliassen definiëren of tonen.\n" +"\n" +" Zonder argumenten, of met optie '-p', toont 'alias' op standaarduitvoer\n" +" de huidige lijst van aliassen in de vorm: alias NAAM='VERVANGING'.\n" +" Met argumenten, wordt er een alias gedefinieerd voor elke NAAM waarvoor\n" +" een VERVANGING gegeven is. Als de VERVANGING eindigt op een spatie, " +"dan\n" +" wordt bij aliasexpansie ook van het nakomende woord gecontroleerd of " +"het\n" +" een alias is.\n" +"\n" +" De afsluitwaarde is 0, tenzij er een NAAM gegeven is waarvoor geen " +"alias\n" +" gedefinieerd is." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Elke gegeven NAAM verwijderen uit de lijst van gedefinieerde aliassen.\n" +"\n" +" Met optie '-a' worden alle gedefinieerde aliassen verwijderd.\n" +"\n" +" De afsluitwaarde is 0, tenzij NAAM geen bestaande alias is." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Toetsbindingen en variabelen van 'readline' instellen.\n" +"\n" +" Verbindt een toetsenreeks aan een 'readline'-functie of aan een macro,\n" +" of stelt een 'readline'-variabele in. De syntax van argumenten die " +"geen\n" +" opties zijn is gelijkaardig aan die voor ~/.inputrc, maar zij dienen " +"één\n" +" geheel te zijn, bijvoorbeeld: bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +"\n" +" Opties:\n" +" -f BESTANDSNAAM de toetsbindingen uit dit bestand lezen\n" +" -l alle bekende functienamen opsommen\n" +" -m TOETSENKAART deze toetsenkaart gebruiken voor de duur van deze\n" +" opdracht; mogelijke toetsenkaarten zijn 'emacs',\n" +" 'emacs-standard', 'emacs-meta', 'emacs-ctlx',\n" +" 'vi', 'vi-move', 'vi-insert' en 'vi-command'\n" +" -P functienamen en hun bindingen tonen\n" +" -p functienamen en hun bindingen tonen, in een vorm " +"die\n" +" hergebruikt kan worden als invoer\n" +" -r TOETSENREEKS de binding voor deze toetsenreeks verwijderen\n" +" -q FUNCTIENAAM tonen welke toetsen deze functie aanroepen\n" +" -S toetsenreeksen tonen die macro's aanroepen\n" +" -s toetsenreeksen tonen die macro's aanroepen, in een\n" +" vorm die hergebruikt kan worden als invoer\n" +" -u FUNCTIENAAM verwijdert alle toetsbindingen aan deze functie\n" +" -V variabelenamen en hun waarden tonen\n" +" -v variabelenamen en hun waarden tonen, in een vorm " +"die\n" +" hergebruikt kan worden als invoer\n" +" -x TOETSENREEKS:SHELL-OPDRACHT deze shell-opdracht uitvoeren als " +"deze\n" +" toetsenreeks ingevoerd wordt\n" +" -X met '-x' gebonden toetsenreeksen en opdrachten " +"tonen\n" +" in een vorm die hergebruikt kan worden als " +"invoer\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" fout optrad." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Een 'for'-, 'while'- of 'until'-lus beëindigen.\n" +"\n" +" Als N gegeven is, dan worden N niveaus van lussen beëindigd.\n" +"\n" +" De afsluitwaarde is 0, tenzij N kleiner dan 1 is." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"De volgende herhaling van huidige 'for'-, 'while'- of 'until'-lus beginnen.\n" +" Als N gegeven is, dan wordt N niveaus hoger doorgegaan.\n" +"\n" +" De afsluitwaarde is 0, tenzij N kleiner dan 1 is." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Een ingebouwde shell-functie uitvoeren.\n" +"\n" +" Voert de gegeven ingebouwde shell-functie met de gegeven argumenten " +"uit.\n" +" Dit is handig als u de naam van een ingebouwde functie voor een eigen\n" +" functie wilt gebruiken, maar toch de functionaliteit van de ingebouwde\n" +" functie nodig hebt.\n" +"\n" +" De afsluitwaarde is die van de uitgevoerde shell-functie, of 1\n" +" of 1 als INGEBOUWDE_SHELLFUNCTIE geen ingebouwde shell-functie is." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"De context van de aanroep van de huidige functie tonen.\n" +"\n" +" Zonder argument produceert het \"$regelnummer $bestandsnaam\"; met\n" +" argument \"$regelnummer $functienaam $bestandsnaam\". Deze tweede\n" +" vorm kan gebruikt worden om een 'stack trace' te produceren. De\n" +" waarde van het argument geeft aan hoeveel frames er teruggegaan\n" +" moet worden; het huidige frame heeft nummer 0.\n" +"\n" +" De afsluitwaarde is 0, tenzij de shell momenteel geen functie uitvoert\n" +" of EXPRESSIE ongeldig is." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"De huidige map wijzigen.\n" +"\n" +" Wijzigt de huidige map naar de gegeven MAP. Als geen MAP gegeven is,\n" +" dan wordt de waarde van de variabele HOME gebruikt.\n" +"\n" +" De variabele CDPATH definieert de mappen waarin naar MAP gezocht wordt.\n" +" De mapnamen in CDPATH worden gescheiden door dubbele punten (:); een\n" +" lege mapnaam is hetzelfde als de huidige map (.). Als MAP begint met\n" +" een slash (/), dan wordt CDPATH niet gebruikt.\n" +"\n" +" Als de gegeven map niet wordt gevonden, en shell-optie 'cdable_vars'\n" +" is ingeschakeld, dan wordt het gegeven woord als een variabelenaam\n" +" begrepen, en als die variabele een naam bevat, dan gaat 'cd' naar de\n" +" map met die naam.\n" +"\n" +" Opties:\n" +" -L symbolische koppelingen volgen; symbolische koppelingen in MAP\n" +" worden herleid ná verwerking van instantiaties van '..'\n" +" -P de fysieke mappenstructuur gebruiken zonder symbolische " +"koppelingen\n" +" te volgen; symbolische koppelingen in MAP worden herleid vóór\n" +" verwerking van instantiaties van '..'\n" +" -e als optie '-P' gegeven is en de huidige map kan niet bepaald " +"worden,\n" +" dan afsluiten met een niet-nul waarde\n" +" -@ een bestand met uitgebreide kenmerken presenteren als een map " +"die\n" +" deze bestandskenmerken bevat (op systemen die het " +"ondersteunen)\n" +"\n" +" Standaard worden symbolische koppelingen gevolgd, alsof '-L' gegeven " +"is.\n" +" Een '..' wordt verwerkt door het verwijderen van de direct voorafgaande\n" +" padcomponent terug tot een slash of tot het begin van MAP.\n" +"\n" +" De afsluitwaarde is 0 als de gewenste map ingesteld kon worden, en als " +"ook\n" +" omgevingsvariabele PWD ingesteld kon worden als '-P' gegeven is, anders " +"1." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"De naam van de huidige werkmap tonen.\n" +"\n" +" Opties:\n" +" -L de waarde van $PWD tonen (als het de huidige werkmap aangeeft)\n" +" -P het werkelijke, fysieke pad tonen, zonder symbolische " +"koppelingen\n" +"\n" +" Zonder opties wordt optie '-L' aangenomen.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of de\n" +" huidige map niet bepaald kon worden." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "Doet niets; de opdracht heeft geen effect; de afsluitwaarde is 0." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "Geeft afsluitwaarde 0, horend bij \"gelukt\"." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "Geeft afsluitwaarde 1, horend bij \"mislukt\"." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Een opdracht uitvoeren of informatie over een opdracht tonen.\n" +"\n" +" Voert de gegeven opdracht uit met de gegeven argumenten, waarbij een\n" +" eventueel gelijknamige shell-functie genegeerd wordt. Dit kan gebruikt\n" +" worden om een programma op schijf uit te voeren wanneer er een functie\n" +" met dezelfde naam bestaat.\n" +"\n" +" Opties:\n" +" -p een standaardwaarde voor PATH gebruiken, zodat alle\n" +" standaardprogramma's gegarandeerd gevonden worden\n" +" -v tonen welke opdracht er uitgevoerd zou worden\n" +" -V als '-v' maar gedetailleerder\n" +"\n" +" De afsluitwaarde is die van de uitgevoerde OPDRACHT,\n" +" of 1 als de OPDRACHT niet gevonden is." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Waarden en eigenschappen van variabelen instellen.\n" +"\n" +" Declareert de gegeven variabelen en/of kent hen eigenschappen toe.\n" +" Als er geen namen van variabelen gegeven zijn, dan worden de\n" +" bestaande variabelen en hun waarden getoond.\n" +"\n" +" Opties:\n" +" -f alleen de gedefinieerde functies tonen (geen variabelen)\n" +" -F alleen de namen van de functies tonen, zonder de definities\n" +" -g globale variabelen aanmaken wanneer gebruikt in een shell-" +"functie;\n" +" elders genegeerd\n" +" -p van elke gegeven variabele de eigenschappen en waarde tonen\n" +"\n" +" Eigenschappen:\n" +" -a van gegeven variabelen arrays maken (indien mogelijk)\n" +" -A van gegeven variabelen associatieve arrays maken (indien " +"mogelijk)\n" +" -i aan gegeven variabelen de 'geheel getal'-eigenschap toekennen\n" +" -l waarde van variabelen bij toekenning omzetten naar kleine " +"letters\n" +" -n de gegeven variabele een verwijzing maken naar de variabele die\n" +" gegeven is als waarde\n" +" -r de gegeven variabelen alleen-lezen maken\n" +" -t aan gegeven variabelen de 'trace'-eigenschap toekennen\n" +" -u waarde van variabelen bij toekenning omzetten naar hoofdletters\n" +" -x de gegeven variabelen exporteren\n" +"\n" +" Een '+' in plaats van een '-' voor de letter schakelt de betreffende\n" +" eigenschap uit.\n" +"\n" +" Bij variabelen met de 'geheel getal'-eigenschap wordt bij toewijzingen\n" +" een rekenkundige evaluatie gedaan (zie 'let').\n" +"\n" +" Als 'declare' wordt gebruikt in een functie, dan maakt het elke gegeven\n" +" naam lokaal, net zoals de opdracht 'local'. Optie '-g' onderdrukt dit.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" toekenningsfout optrad." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Waarden en eigenschappen van variabelen instellen.\n" +"\n" +" Een synoniem van 'declare'. Zie 'help declare'." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Lokale variabelen definiëren.\n" +"\n" +" Maakt een lokale variabele NAAM aan, en kent deze de waarde WAARDE toe.\n" +" OPTIE kan elke optie zijn die ook door 'declare' geaccepteerd wordt.\n" +"\n" +" 'local' kan alleen binnen een functie gebruikt worden, en zorgt ervoor\n" +" dat het geldigheidsbereik van de variabele NAAM beperkt wordt tot de\n" +" betreffende functie en diens dochters.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd, er een\n" +" toekenningsfout optrad, of de shell geen functie aan het uitvoeren is." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"De gegeven argumenten naar standaarduitvoer schrijven.\n" +"\n" +" Schrijft de gegeven argumenten naar standaarduitvoer, elke twee " +"gescheiden\n" +" door een spatie en aan het eind gevolgd door een nieuwe regel.\n" +"\n" +" Opties:\n" +" -n de afsluitende nieuwe regel onderdrukken\n" +" -e onderstaande backslash-stuurcodes interpreteren\n" +" -E onderstaande backslash-stuurcodes niet interpreteren\n" +"\n" +" 'echo' kent de volgende stuurcodes:\n" +" \\a geluidssignaal\n" +" \\b backspace\n" +" \\c geen verdere uitvoer produceren\n" +" \\e escapecode\n" +" \\E escapecode\n" +" \\f nieuwe pagina (FF-teken)\n" +" \\n nieuwe regel (LF-teken)\n" +" \\r naar begin van huidige regel (CR-teken)\n" +" \\t horizontale tab\n" +" \\v verticale tab\n" +" \\\\ een backslash (\\)\n" +" \\0NNN het teken met ASCII-code NNN (octaal, 1 tot 3 cijfers)\n" +" \\xHH het teken met code HH (hexadecimaal, 1 of 2 cijfers)\n" +" \\uHHHH het Unicode-teken met code HHHH\n" +" (hexadecimaal, 1 tot 4 cijfers)\n" +" \\UHHHHHHHH het Unicode-teken met code HHHHHHHH\n" +" (hexadecimaal, 1 tot 8 cijfers)\n" +"\n" +" De afsluitwaarde is 0, tenzij een schrijffout optrad." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"De gegeven argumenten naar standaarduitvoer schrijven.\n" +"\n" +" Schrijft de gegeven argumenten naar standaarduitvoer, gevolgd door een\n" +" nieuwe regel. Optie '-n' onderdrukt deze afsluitende nieuwe regel.\n" +"\n" +" De afsluitwaarde is 0, tenzij een schrijffout optrad." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Ingebouwde shell-opdrachten in- of uitschakelen.\n" +"\n" +" Schakelt ingebouwde opdrachten in of uit. Dit laatste maakt het " +"mogelijk\n" +" om een bestand op schijf uit te voeren dat dezelfde naam heeft als een\n" +" ingebouwde opdracht, zonder het volledige pad op te moeten geven.\n" +"\n" +" Opties:\n" +" -a de ingebouwde opdrachten tonen en of ze in- of uitgeschakeld " +"zijn\n" +" -n genoemde opdrachten uitschakelen of uitgeschakelde opdrachten " +"tonen\n" +" -p uitvoer produceren die hergebruikt kan worden als invoer " +"(standaard)\n" +" -s alleen de speciale POSIX ingebouwde opdrachten tonen\n" +"\n" +" Opties die het dynamisch laden besturen:\n" +" -f ingebouwde opdracht NAAM laden uit gedeeld object BESTANDSNAAM\n" +" -d opdracht die geladen is met '-f' verwijderen.\n" +"\n" +" Zonder opties wordt elke gegeven NAAM ingeschakeld. Zonder namen " +"worden\n" +" de ingeschakelde opdrachten getoond (of met '-n' de uitgeschakelde).\n" +"\n" +" Voorbeeld: om in plaats van de ingebouwde 'test' het bestand 'test' te\n" +" gebruiken dat zich in uw zoekpad PATH bevindt, typt u 'enable -n test'.\n" +"\n" +" De afsluitwaarde is 0, tenzij NAAM geen ingebouwde shell-opdracht is of\n" +"  er een fout optreedt." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Argumenten uitvoeren als een shell-opdracht.\n" +"\n" +" Combineert de gegeven argumenten tot een enkele tekenreeks, gebruikt " +"deze\n" +" als invoer voor de shell, en voert de resulterende opdrachten uit.\n" +"\n" +" De afsluitwaarde is die van de uitgevoerde opdracht, of 0 als de " +"opdracht\n" +" leeg is." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Opties ontleden.\n" +"\n" +" 'getopts' kan door shell-scripts gebruikt worden om positionele " +"parameters\n" +" als opties te ontleden.\n" +"\n" +" De OPTIETEKENREEKS bevat de te herkennen optieletters; als een letter\n" +" gevolgd wordt door een dubbele punt, dan hoort de optie een argument\n" +" te hebben, ervan gescheiden door witruimte.\n" +"\n" +" Elke keer dat 'getopts' wordt aangeroepen, plaatst het de volgende\n" +" gevonden optie in de gegeven shell-variabele NAAM, en het nummer van\n" +" het daarna te behandelen argument in de variabele OPTIND. Deze OPTIND\n" +" wordt geïnitialiseerd op 1 elke keer als de shell of een shell-script\n" +" wordt aangeroepen. Als een optie een argument heeft, dan wordt dat\n" +" argument in de shell-variabele OPTARG geplaatst.\n" +"\n" +" 'getopts' kan fouten op twee manieren rapporteren: in stille modus of\n" +" in normale modus. Stille modus wordt gebruikt als het eerste teken\n" +" van de optietekenreeks een dubbele punt is. In deze modus worden er\n" +" geen foutmeldingen geprint. In stille modus geldt: als 'getopts' een\n" +" ongeldige optie vindt, wordt dat teken in OPTARG geplaatst; als een\n" +" vereist argument bij een optie ontbreekt, dan wordt een ':' in NAAM\n" +" geplaatst en de optieletter in OPTARG. In normale modus geldt: als\n" +" 'getopts' een ongeldige optie vindt, wordt een '?' in NAME geplaatst,\n" +" en OPTARG leeggemaakt; als een vereist argument ontbreekt, dan wordt\n" +" een ':' in NAAM geplaatst en de gevonden optieletter in OPTARG; in\n" +" beide gevallen wordt er ook een foutmelding geprint.\n" +"\n" +" Als de shell-variabele OPTERR de waarde 0 heeft, wordt het printen\n" +" van foutmeldingen uitgeschakeld, zelfs als het eerste teken van de\n" +" optiereeks geen dubbele punt is. De standaardwaarde van OPTERR is 1.\n" +"\n" +" Normaliter ontleedt 'getopts' de positionele parameters: $0...$9.\n" +" Maar als er argumenten gegeven worden, dan worden deze ontleed." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"De shell vervangen door de gegeven opdracht.\n" +"\n" +" Voert de gegeven OPDRACHT uit, daarbij deze shell vervangend door dat\n" +" programma. Eventuele ARGUMENTen worden de argumenten van OPDRACHT.\n" +" Als er geen OPDRACHT gegeven is, dan worden eventuele omleidingen van\n" +" kracht voor deze shell zelf.\n" +"\n" +" Opties:\n" +" -a NAAM deze naam als nulde argument aan OPDRACHT meegeven\n" +" -c de opdracht uitvoeren met een lege omgeving\n" +" -l een koppelteken als nulde argument aan OPDRACHT meegeven\n" +"\n" +" Als de opdracht niet kan worden uitgevoerd, dan sluit een niet-" +"interactieve\n" +" shell af, tenzij de shell-optie 'execfail' aan staat.\n" +"\n" +" De afsluitwaarde is 0, tenzij OPDRACHT niet gevonden wordt of er een\n" +" omleidingsfout optreedt." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"De shell beëindigen.\n" +"\n" +" Beëindigt de shell met een afsluitwaarde van N. Zonder N is de\n" +" afsluitwaarde die van de laatst uitgevoerde opdracht." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Een login-shell beëindigen.\n" +"\n" +" Beëindigt een login-shell met een afsluitwaarde van N. Geeft een\n" +" foutmelding als de huidige shell geen login-shell is." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Opdrachten uit de geschiedenis tonen of uitvoeren.\n" +"\n" +" Kan gebruikt worden om oude opdrachten te tonen, of om deze te bewerken\n" +" en opnieuw uit te voeren. EERSTE en LAATSTE kunnen getallen zijn die " +"een\n" +" bereik opgeven, of EERSTE kan een tekenreeksje zijn waarmee de " +"recentste\n" +" opdracht wordt bedoeld die met die letters begint.\n" +"\n" +" Opties:\n" +" -e EDITORNAAM de te gebruiken editor; standaard wordt de waarde van\n" +" FCEDIT gebruikt, anders die van EDITOR, anders 'vi'\n" +" -l een lijst met opdrachten tonen (in plaats van ze te bewerken)\n" +" -n de lijst zonder nummers weergeven\n" +" -r de volgorde van de lijst omdraaien (nieuwste eerst)\n" +"\n" +" In de vorm 'fc -s [PATROON=VERVANGING]... [OPDRACHT]', wordt OPDRACHT\n" +" opnieuw uitgevoerd nadat de aangegeven vervangingen zijn gedaan.\n" +"\n" +" Een handige alias bij deze functie is r='fc -s', zodat het typen van\n" +" 'r' de laatste opdracht opnieuw uitvoert, en het typen van 'r cc' de\n" +" laatste opdracht die met 'cc' begon opnieuw uitvoert.\n" +"\n" +" De afsluitwaarde die van de uitgevoerde opdracht, of 0, of niet-nul als\n" +" er een fout optreedt." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"De gegeven taak in de voorgrond plaatsen.\n" +"\n" +" Plaatst de gegeven taak in de voorgrond, en maakt deze tot de huidige " +"taak.\n" +" Als er geen taak gegeven is, dan wordt dat wat volgens de shell de " +"huidige\n" +" taak is gebruikt.\n" +"\n" +" De afsluitwaarde is die van de in voorgrond geplaatste taak, of 1 als " +"er\n" +" een fout optreedt." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"De gegeven taken in de achtergrond plaatsen.\n" +"\n" +" Plaatst gegeven taken in de achtergrond, alsof deze gestart waren met " +"'&'.\n" +" Als er geen taak gegeven is, dan wordt dat wat volgens de shell de " +"huidige\n" +" taak is gebruikt.\n" +"\n" +" De afsluitwaarde is 0, tenzij taakbeheer uitgeschakeld is of er een " +"fout\n" +" optreedt." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Programmalocaties onthouden of tonen.\n" +"\n" +" Bepaalt en onthoudt voor elke gegeven opdracht-NAAM het volledige pad.\n" +" Als er geen argumenten gegeven zijn, dan wordt informatie over de\n" +" onthouden paden getoond.\n" +"\n" +" Opties:\n" +" -d het pad van elke gegeven NAAM vergeten\n" +" -l uitvoer produceren die herbruikbaar is als invoer\n" +" -p PADNAAM te gebruiken PADNAAM van de opdracht NAAM\n" +" -r alle paden vergeten\n" +" -t voor elke gegeven naam het onthouden pad tonen\n" +"\n" +" Elke gegeven NAAM wordt opgezocht in $PATH en wordt toegevoegd aan de\n" +" lijst met onthouden opdrachten.\n" +"\n" +" De afsluitwaarde is 0, tenzij NAAM niet gevonden wordt of een ongeldige\n" +" optie gegeven werd." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Informatie tonen over ingebouwde opdrachten.\n" +"\n" +" Toont korte hulpteksten voor ingebouwde opdrachten van de shell.\n" +" Als een PATROON gegeven is, dan worden hulpteksten getoond voor alle\n" +" opdrachten die aan dit PATROON voldoen, anders wordt een lijst met\n" +" onderwerpen waarvoor hulp beschikbaar is getoond.\n" +"\n" +" Opties:\n" +" -d een korte omschrijving tonen voor elk onderwerp\n" +" -m gebruiksbericht tonen in pseudo-opmaak van een man-pagina\n" +" -s de uitvoer beperken tot een beknopt gebruiksbericht\n" +"\n" +" De afsluitwaarde is 0, tenzij niets aan PATROON voldoet of een " +"ongeldige\n" +" optie gegeven werd." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"De opdrachtengeschiedenis tonen of bewerken.\n" +"\n" +" Geeft de lijst met uitgevoerde opdrachten weer (de \"geschiedenis\"),\n" +" inclusief regelnummers; voor bewerkte items staat een '*'. Met een\n" +" argument van N worden alleen de laatste N opdrachten getoond.\n" +"\n" +" Opties:\n" +" -c huidige geschiedenis wissen: alle uitgevoerde opdrachten " +"vergeten\n" +" -d POSITIE het geschiedenisitem op deze positie verwijderen; een\n" +" negatieve POSITIE telt terug vanaf het einde van de " +"lijst\n" +"\n" +" -a huidige geschiedenis aan eind van geschiedenisbestand toevoegen\n" +" -n alle nog niet gelezen regels uit het geschiedenisbestand lezen\n" +" en toevoegen aan het einde van huidige geschiedenis\n" +" -r het geschiedenisbestand lezen en toevoegen aan het einde van\n" +" huidige geschiedenis\n" +" -w huidige geschiedenis naar het geschiedenisbestand schrijven\n" +"\n" +" -p geschiedenisopzoeking uitvoeren voor elk ARGUMENT en het " +"resultaat\n" +" tonen zonder dit in de geschiedenis op te slaan\n" +" -s de ARGUMENTen als één enkel item aan de geschiedenis toevoegen\n" +"\n" +" Als een BESTANDSNAAM gegeven is, dan wordt dat gebruikt als het\n" +" geschiedenisbestand, anders wordt de waarde van HISTFILE gebruikt, en\n" +" als die variabele leeg is, dan ~/.bash_history.\n" +"\n" +" Als de variabele HISTTIMEFORMAT ingesteld en niet leeg is, dan wordt de\n" +" waarde ervan gebruikt als een opmaaktekenreeks for strftime(3), om een\n" +" tijdsstempel bij elk geschiedenisitem weer te geven. Anders worden " +"geen\n" +" tijdsstempels getoond.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" fout optrad." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"De status van taken tonen.\n" +"\n" +" Toont de actieve taken. Een TAAKAANDUIDING beperkt de uitvoer tot " +"alleen\n" +" die taak. Zonder opties wordt de status van alle actieve taken " +"getoond.\n" +"\n" +" Opties:\n" +" -l ook de proces-ID's tonen, naast de gewone informatie\n" +" -n alleen processen tonen die sinds de vorige melding zijn " +"veranderd\n" +" -p alleen de proces-ID's tonen\n" +" -r uitvoer beperken tot draaiende taken\n" +" -s uitvoer beperken tot gepauzeerde taken\n" +"\n" +" Als optie '-x' gegeven is, wordt de gegeven OPDRACHT uitgevoerd nadat\n" +" alle gegeven taken (in ARGUMENTen) afgesloten zijn (dat wil zeggen: hun\n" +" proces-ID is vervangen door dat van hun moederproces).\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" fout optrad. Met optie '-x' is de afsluitwaarde die van OPDRACHT." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Taken uit de huidige shell verwijderen.\n" +"\n" +" Verwijdert elke gegeven taak uit de tabel met actieve taken. Zonder\n" +" een TAAKAANDUIDING wordt dat wat volgens de shell de huidige taak is\n" +" verwijderd.\n" +"\n" +" Opties:\n" +" -a alle taken verwijderen (als geen TAAKAANDUIDING gegeven is)\n" +" -h taken niet verwijderen maar zodanig markeren dat deze geen " +"SIGHUP\n" +" krijgen wanneer de shell een SIGHUP krijgt\n" +" -r alleen draaiende taken verwijderen\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie of TAAKAANDUIDING\n" +" gegeven werd." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Een signaal naar een taak sturen.\n" +"\n" +" Stuurt de via PID of TAAKAANDUIDING aangeduide processen het gegeven\n" +" signaal. Als er geen signaal gegeven is, dan wordt SIGTERM gestuurd.\n" +"\n" +" Opties:\n" +" -n NAAM het signaal met deze naam sturen\n" +" -s NUMMER het signaal met dit nummer sturen\n" +" -l lijst met beschikbare signalen tonen; als na '-l' " +"argumenten\n" +" volgen, dan wordt voor elk nummer de bijbehorende naam\n" +" getoond, en voor elke naam het bijbehorende nummer\n" +" -L synoniem van '-l'\n" +"\n" +" 'kill' is om twee redenen een ingebouwde shell-opdracht: het " +"accepteert\n" +" ook taakaanduidingen in plaats van alleen proces-ID's, en als het " +"maximum\n" +" aantal processen bereikt is hoeft u geen nieuw proces te starten om een\n" +" ander proces te elimineren.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" fout optrad." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Rekenkundige uitdrukkingen evalueren.\n" +"\n" +" Evalueert elk ARGUMENT als een rekenkundige uitdrukking.\n" +" De evaluatie gebeurt in gehele getallen zonder controle op overloop;\n" +" maar deling door nul wordt gedetecteerd en wordt getoond als een fout.\n" +"\n" +" Onderstaande lijst toont de beschikbare operatoren in groepjes van " +"gelijke\n" +" voorrang; de groepjes zijn gerangschikt volgens afnemende voorrang.\n" +"\n" +" var++, var-- post-increment, post-decrement van variabele\n" +" ++var, --var pre-increment, pre-decrement van variabele\n" +" -, + eenzijdig minteken, eenzijdig plusteken\n" +" !, ~ logisch tegengestelde, bitsgewijs tegengestelde\n" +" ** machtsverheffing\n" +" *, /, % vermenigvuldiging, deling, rest\n" +" +, - optelling, aftrekking\n" +" <<, >> bitsgewijze verschuiving naar links, naar rechts\n" +" <=, >=, <, > vergelijkingen\n" +" ==, != gelijkheid, ongelijkheid\n" +" & bitsgewijze AND\n" +" ^ bitsgewijze XOR\n" +" | bitsgewijze OR\n" +" && logische AND\n" +" || logische OR\n" +"\n" +" expr ? expr : expr voorwaardelijke uitdrukking\n" +"\n" +" =, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |= toewijzingen\n" +"\n" +" Shell-variabelen zijn toegestaan als parameters. De naam van een " +"variabele\n" +" wordt vervangen door zijn waarde (zonodig omgezet naar een geheel " +"getal).\n" +" Variabelen hoeven geen 'geheel getal'-eigenschap te hebben om gebruikt " +"te\n" +" kunnen worden in een expressie.\n" +"\n" +" Operatoren worden geëvalueerd in volgorde van voorrang. Subexpressies\n" +" tussen haakjes worden altijd eerst geëvalueerd en overstijgen zodoende\n" +" bovengenoemde voorrangsregels.\n" +"\n" +" Als het laatste ARGUMENT evalueert tot 0, dan is de afsluitwaarde van\n" +" 'let' 1; anders 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Een regel van standaardinvoer lezen en in velden opsplitsen.\n" +"\n" +" Leest één regel van standaardinvoer (of van de gegeven " +"bestandsdescriptor\n" +" als optie '-u' gegeven is) en wijst het eerste woord aan de eerste NAAM " +"toe,\n" +" het tweede woord aan de tweede NAAM, en zo verder; de resterende " +"woorden\n" +" worden toegewezen aan de laatste NAAM. Alleen de tekens in de " +"variabele\n" +" IFS worden herkend als woordscheidingstekens. Als er geen namen " +"gegeven\n" +" zijn, dan wordt de gelezen regel opgeslagen in de variabele REPLY.\n" +"\n" +" Opties:\n" +" -a ARRAY de gelezen woorden toekennen aan de opeenvolgende posities\n" +" van het genoemde array, beginnend bij index nul\n" +" -d TEKEN doorgaan met lezen tot TEKEN gelezen wordt (i.p.v. LF-" +"teken)\n" +" -e 'readline' gebruiken om de regel in te lezen\n" +" -i TEKST door 'readline' te gebruiken begintekst\n" +" -n AANTAL stoppen na maximaal dit aantal tekens gelezen te hebben, " +"of\n" +" na een LF-teken (i.p.v. altijd te wachten op een LF-" +"teken)\n" +" -N AANTAL alleen stoppen na dit aantal tekens gelezen te hebben, of " +"na\n" +" EOF of tijdsoverschrijding, elk scheidingsteken negerend\n" +" -p PROMPT deze tekenreeks tonen als prompt (zonder afsluitende " +"nieuwe\n" +" regel) alvorens te beginnen met lezen\n" +" -r backslash-codes niet omzetten naar hun betekenis\n" +" -s invoer die van een terminal komt niet echoën\n" +" -t AANTAL na dit aantal seconden stoppen met wachten op invoer en\n" +" afsluiten met een code groter dan 128; de waarde van de\n" +" variabele TMOUT is de standaardwaarde voor het aantal te\n" +" wachten seconden; het aantal mag drijvendepuntgetal " +"zijn;\n" +" als AANTAl 0 is, dan keert 'read' onmiddellijk terug " +"zonder\n" +" enige data te lezen, maar is alleen succesvol als er op " +"de\n" +" betreffende bestandsdescriptor invoer beschikbaar is\n" +" -u BS.DS. van deze bestandsdescriptor lezen i.p.v. van " +"standaardinvoer\n" +"\n" +" De afsluitwaarde is 0, tenzij einde-van-bestand (EOF) bereikt werd,\n" +" de tijdslimiet overschreden werd, er een toekenningsfout optrad, of een\n" +" ongeldige bestandsdescriptor als argument van '-u' gegeven werd." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Terugkeren uit een shell-functie.\n" +"\n" +" Doet een functie of gesourced script afsluiten met afsluitwaarde N.\n" +" Zonder N is de afsluitwaarde die van de laatst uitgevoerde opdracht\n" +" in functie of script.\n" +"\n" +" De afsluitwaarde is N, of 1 als de shell geen functie of script aan het\n" +" uitvoeren is." + +# Voor de duidelijkheid is de tekstvolgorde veranderd. +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Waarden van shell-opties of positionele parameters instellen.\n" +"\n" +" Schakelt shell-eigenschappen in/uit, of verandert waarden van " +"positionele\n" +" parameters. Zonder opties of argumenten toont 'set' de namen en " +"waarden\n" +" van alle gedefinieerde variabelen en functies, in een vorm die als " +"invoer\n" +" hergebruikt kan worden. De volgende opties zijn beschikbaar (een '+' " +"in\n" +" plaats van een '-' schakelt de betreffende eigenschap _uit_ i.p.v. in):\n" +"\n" +" -a nieuwe of gewijzigde variabelen en functies automatisch " +"exporteren\n" +" -B accoladevervanging uitvoeren (is standaard, b.v. a{b,c} -> ab ac)\n" +" -b beëindiging van een taak direct melden (i.p.v. na huidige " +"opdracht)\n" +" -C omleiding van uitvoer mag gewone bestanden niet overschrijven\n" +" -E een 'trap' op ERR door laten werken in functies en " +"dochterprocessen\n" +" -e de shell afsluiten zodra afsluitwaarde van een opdracht niet nul " +"is\n" +" -f jokertekens voor bestandsnamen uitschakelen (geen 'globbing')\n" +" -H geschiedenisopdracht '!' beschikbaar stellen (standaard)\n" +" -h het volledige pad van opdrachten onthouden na eerste keer " +"opzoeken\n" +" -k ook nakomende toewijzingen aan variabelen in de omgeving plaatsen\n" +" -m taakbesturing beschikbaar stellen (standaard)\n" +" -n opdrachten wel lezen maar niet uitvoeren (\"droogzwemmen\")\n" +" -o OPTIENAAM deze optie inschakelen (zie verderop voor de lange " +"namen)\n" +" -P geen symbolische koppelingen herleiden bij opdrachten als 'cd' " +"die\n" +" de huidige map wijzigen\n" +" -p geprivilegeerde modus: de bestanden aangeduid door ENV en " +"BASH_ENV\n" +" worden genegeerd, functies worden niet uit de omgeving " +"geïmporteerd,\n" +" en ook eventuele SHELLOPTS worden genegeerd; modus wordt " +"automatisch\n" +" ingeschakeld als effectieve en echte UID of GID niet " +"overeenkomen;\n" +" uitschakelen maakt dan effectieve UID en GID gelijk aan de echte\n" +" -T een 'trap' op DEBUG of RETURN door laten werken in functies en\n" +" dochterprocessen\n" +" -t afsluiten na het lezen en uitvoeren van één opdracht\n" +" -u het gebruik van niet-bestaande variabelen behandelen als een fout\n" +" -v invoerregel weergeven (\"echoën\") zodra deze gelezen is\n" +" -x elke opdracht met argumenten weergeven voordat deze wordt " +"uitgevoerd\n" +" -- nakomende argumenten zijn positionele parameters; als er geen " +"verdere\n" +" argumenten zijn, worden de bestaande positionele parameters " +"gewist\n" +" - opties -v en -x uitschakelen; nakomende argumenten zijn " +"positionele\n" +" parameters; maar zonder argumenten worden de bestaande niet " +"gewist\n" +"\n" +" De opties kunnen ook gebruikt worden bij het starten van de shell.\n" +" De huidige toestand van de eigenschappen is te vinden in $-. Eventuele\n" +" extra argumenten van 'set' worden begrepen als positionele parameters\n" +" en worden toegewezen aan $1, $2, ... $N.\n" +"\n" +" De lange namen voor gebruik met optie -o (of +o) zijn:\n" +" allexport == -a (automatisch exporteren van nieuwen/gewijzigden)\n" +" braceexpand == -B (accoladevervanging uitvoeren)\n" +" emacs regelbewerkingsinterface in stijl van 'emacs' gebruiken\n" +" errexit == -e (shell afsluiten bij eerste fout)\n" +" errtrace == -E ('trap' op ERR overal laten gelden)\n" +" functrace == -T ('trap' op DEBUG overal laten gelden)\n" +" hashall == -h (gevonden pad van opdrachten onthouden)\n" +" histexpand == -H ('!'-opdracht beschikbaar stellen)\n" +" history opdrachtengeschiedenis beschikbaar stellen\n" +" ignoreeof Ctrl-D negeren; de shell niet afsluiten bij lezen van " +"EOF\n" +" interactive-comments commentaar in interactieve opdrachten toestaan\n" +" keyword == -k (nakomende toewijzingen ook meenemen)\n" +" monitor == -m (taakbesturing beschikbaar stellen)\n" +" noclobber == -C (omleidingen geen bestanden laten overschrijven)\n" +" noexec == -n (opdrachten lezen maar niet uitvoeren)\n" +" noglob == -f (jokertekens uitschakelen)\n" +" nolog (herkend maar genegeerd)\n" +" notify == -b (beëindiging van een taak direct melden)\n" +" nounset == -u (niet-bestaande variabelen als een fout " +"beschouwen)\n" +" onecmd == -t (afsluiten na uitvoeren van één opdracht)\n" +" physical == -P (fysieke paden volgen i.p.v. symbolische)\n" +" pipefail de afsluitwaarde van een pijplijn gelijkmaken aan die " +"van\n" +" de laatste niet-succesvolle opdracht in de reeks, of " +"aan\n" +" 0 als alle opdrachten succesvol waren\n" +" posix de voorschriften van de POSIX-standaard strict volgen\n" +" privileged == -p (geprivilegeerde modus)\n" +" verbose == -v (elke invoerregel echoën)\n" +" vi regelbewerkingsinterface in stijl van 'vi' gebruiken\n" +" xtrace == -x (elke opdracht echoën)\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Shell-variabelen en -functies verwijderen.\n" +"\n" +" Verwijdert voor elke NAAM de bijbehorende variabele of functie.\n" +"\n" +" Opties:\n" +" -f elke NAAM als een shell-functie begrijpen\n" +" -v elke NAAM als een shell-variabele begrijpen\n" +" -n elke NAAM als een naamsverwijzing begrijpen en de variabele zelf\n" +" verwijderen in plaats de variabele waar naar verwezen wordt\n" +"\n" +" Zonder opties zal 'unset' eerst een variabele proberen te verwijderen,\n" +" en als dat niet lukt, dan een functie. Sommige variabelen kunnen niet\n" +" verwijderd worden; zie ook 'readonly'.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of een\n" +" NAAM alleen-lezen is." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"De export-eigenschap van shell-variabelen instellen.\n" +"\n" +" Markeert elke gegeven naam voor automatische export naar de omgeving\n" +" van latere opdrachten. Als een WAARDE gegeven is, dan wordt deze " +"WAARDE\n" +" toegekend alvorens te exporteren.\n" +"\n" +" Opties:\n" +" -f gegeven namen verwijzen alleen naar functies\n" +" -n voor de gegeven namen de exportmarkering juist verwijderen\n" +" -p een lijst van alle geëxporteerde namen tonen\n" +"\n" +" Het argument '--' schakelt verdere optieverwerking uit.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie of NAAM gegeven werd." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Shell-variabelen als onveranderbaar markeren.\n" +"\n" +" Markeert elke gegeven NAAM als alleen-lezen, zodat de waarde van deze\n" +" NAAM niet meer veranderd kan worden door een latere toewijzing. Als " +"een\n" +" WAARDE gegeven is, dan deze WAARDE toekennen alvorens deze te fixeren.\n" +"\n" +" Opties:\n" +" -a elke naam als een array begrijpen\n" +" -A elke naam als een associatief array begrijpen\n" +" -f gegeven namen verwijzen alleen naar functies\n" +" -p een lijst tonen van alle onveranderbare variabelen of functies,\n" +" al naar gelang optie '-f' gegeven is\n" +"\n" +" Het argument '--' schakelt verdere optieverwerking uit.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie of NAAM gegeven werd." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Positionele parameters opschuiven.\n" +"\n" +" Hernoemt positionele parameters $N+1,$N+2,... naar $1,$2,...\n" +" Als N niet gegeven is, wordt de waarde 1 aangenomen.\n" +"\n" +" De afsluitwaarde is 0 tenzij N negatief is of groter dan $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Opdrachten uit bestand in de huidige shell uitvoeren.\n" +"\n" +" Leest opdrachten uit het gegeven bestand en voert deze uit in de " +"huidige\n" +" shell. De mappen in PATH worden nagezocht om het genoemde bestand te\n" +" vinden. Als er verder nog argumenten gegeven zijn, dan worden dit de\n" +" positionele parameters tijdens de uitvoering van het genoemde bestand.\n" +"\n" +" De afsluitwaarde is die van de laatst uitgevoerde opdracht in het " +"gegeven\n" +" bestand, of 1 als dit bestand niet gelezen kan worden." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Uitvoering van de shell pauzeren.\n" +"\n" +" Pauzeert de uitvoering van deze shell totdat een SIGCONT-signaal\n" +" ontvangen wordt. Een login-shell kan niet gepauzeerd worden, tenzij\n" +" optie '-f' gegeven is.\n" +"\n" +" Optie:\n" +" -f pauzering afdwingen, ook als dit een login-shell is\n" +"\n" +" De afsluitwaarde is 0, tenzij taakbeheer uitgeschakeld is of er een " +"fout\n" +" optreedt." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Een conditionele expressie evalueren.\n" +"\n" +" Evalueert de gegeven EXPRESSIE; afhankelijk van het resultaat is de\n" +" afsluitwaarde 0 (\"waar\") of 1 (\"onwaar\"). De expressies kunnen\n" +" eenzijdig of tweezijdig zijn; eenzijdige expressies worden vaak\n" +" gebruikt om de toestand van een bestand te inspecteren. Er zijn ook\n" +" operatoren voor tekenreeksen en voor getalsmatige vergelijkingen.\n" +"\n" +" Het gedrag van 'test' is afhankelijk van het aantal argumenten.\n" +" Lees de handleiding van 'bash' voor een complete beschrijving.\n" +"\n" +" Bestandsoperatoren:\n" +" -a BESTAND waar als bestand bestaat\n" +" -b BESTAND waar als bestand een blok-apparaat is\n" +" -c BESTAND waar als bestand een byte-apparaat is\n" +" -d BESTAND waar als bestand een map is\n" +" -e BESTAND waar als bestand bestaat\n" +" -f BESTAND waar als bestand een gewoon bestand is\n" +" -G BESTAND waar als uw groep het bestand effectief bezit\n" +" -g BESTAND waar als bestand SETGUID is\n" +" -h BESTAND waar als bestand een symbolische koppeling is\n" +" -k BESTAND waar als bestand \"sticky\"-bit aan heeft staan\n" +" -L BESTAND waar als bestand een symbolische koppeling is\n" +" -N BESTAND waar als bestand gewijzigd is sinds laatste lezing\n" +" -O BESTAND waar als u het bestand effectief bezit\n" +" -p BESTAND waar als bestand een benoemde pijp is\n" +" -r BESTAND waar als bestand voor u leesbaar is\n" +" -S BESTAND waar als bestand een socket is\n" +" -s BESTAND waar als bestand niet leeg is\n" +" -t DESCRIPTOR waar als bestandsdescriptor geopend is op een " +"terminal\n" +" -u BESTAND waar als bestand SETUID is\n" +" -w BESTAND waar als bestand voor u schrijfbaar is\n" +" -x BESTAND waar als bestand door u uitvoerbaar is\n" +"\n" +" BEST1 -nt BEST2 waar als eerste bestand later gewijzigd is dan " +"tweede\n" +" BEST1 -ot BEST2 waar als eerste bestand eerder gewijzigd is dan " +"tweede\n" +" BEST1 -ef BEST2 waar als eerste bestand harde koppeling is naar " +"tweede\n" +"\n" +" Tekenreeksoperatoren:\n" +" -z REEKS waar als tekenreeks leeg is\n" +" -n REEKS waar als tekenreeks niet leeg is\n" +" REEKS waar als tekenreeks niet leeg is\n" +" RKS1 = RKS2 waar als de tekenreeksen gelijk zijn\n" +" RKS1 != RKS2 waar als de tekenreeksen niet gelijk zijn\n" +" RKS1 < RKS2 waar als eerste reeks lexicografisch voor de tweede " +"komt\n" +" RKS1 > RKS2 waar als eerste reeks lexicografisch na de tweede " +"komt\n" +"\n" +" Andere operatoren:\n" +" -o OPTIE waar als deze shell-optie ingeschakeld is\n" +" -v VARIABELE waar als deze variabele een waarde heeft\n" +" -R VARIABELE waar als deze variabele een naamsverwijzing is\n" +" ! EXPRESSIE waar als EXPRESSIE onwaar is\n" +" EXPR1 -a EXPR2 waar als beide expressies waar zijn\n" +" EXPR1 -o EXPR2 onwaar als beide expressies onwaar zijn\n" +" ARG1 VGL ARG2 waar als rekenkundige vergelijking klopt; VGL is één\n" +" van de volgende: -eq, -ne, -lt, -le, -gt, -ge;\n" +" ze betekenen: gelijk, ongelijk, kleiner dan,\n" +" kleiner of gelijk, groter dan, groter of gelijk\n" +"\n" +" De afsluitwaarde is 0 als EXPRESSIE waar is, 1 als EXPRESSIE onwaar is,\n" +" en 2 als een ongeldig argument gegeven werd." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Een conditionele expressie evalueren.\n" +"\n" +" Dit is een synoniem voor de ingebouwde functie 'test', behalve dat\n" +" het laatste argument een ']' moet zijn, horend bij de begin-'['." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Procestijden tonen.\n" +"\n" +" Geeft de totaal verbruikte gebruikers- en systeemtijd weer; eerst de\n" +" tijden verbruikt door de shell zelf, en daaronder de tijden verbruikt\n" +" door de processen uitgevoerd door de shell.\n" +"\n" +" De afsluitwaarde is altijd 0." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Signalen en andere gebeurtenissen opvangen.\n" +"\n" +" Definieert en activeert afhandelingsprocedures die uitgevoerd moeten\n" +" worden wanneer de shell een signaal of andere gebeurtenissen ontvangt.\n" +"\n" +" ARGUMENT is een opdracht die gelezen en uitgevoerd wordt wanneer de " +"shell\n" +" een van de opgegeven signalen ontvangt. Als ARGUMENT ontbreekt en er " +"één\n" +" signaal gegeven is, of wanneer ARGUMENT '-' is, dan worden de opgegeven\n" +" signalen teruggezet op de waarde die ze hadden bij het starten van deze\n" +" shell. Als ARGUMENT de lege tekenreeks is, dan worden de opgegeven\n" +" signalen genegeerd door zowel deze shell als door alle " +"dochterprocessen.\n" +"\n" +" Als EXIT (0) als signaal opgegeven wordt, dan wordt ARGUMENT uitgevoerd\n" +" bij het afsluiten van de shell. Als DEBUG als signaal opgegeven wordt,\n" +" dan wordt ARGUMENT uitgevoerd vóór elke enkelvoudige opdracht. Als " +"RETURN\n" +" als signaal opgegeven wordt, dan wordt ARGUMENT uitgevoerd elke keer " +"als\n" +" een functie (of een met 'source' aangeroepen script) terugkeert. Als " +"ERR\n" +" als signaal opgegeven wordt, dan wordt ARGUMENT uitgevoerd elke keer " +"als\n" +" de mislukking van een opdracht de shell zou beëindigen als optie '-e'\n" +" gegeven was.\n" +"\n" +" Als er geen enkel argument gegeven is, dan toont 'trap' welke " +"opdrachten\n" +" er met welke signalen verbonden zijn.\n" +"\n" +" Opties:\n" +" -l een overzicht tonen van signaalnummers en hun namen\n" +" -p voor elk gegeven signaal tonen welke opdracht ermee verbonden is\n" +"\n" +" Signalen kunnen als naam of als nummer opgegeven worden, in hoofd- of " +"in\n" +" kleine letters, en het voorvoegsel 'SIG' is optioneel. Merk op dat met\n" +" 'kill -signaal $$' een signaal naar de huidige shell gestuurd kan " +"worden.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie of SIGNAALAANDUIDING\n" +" gegeven werd." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Informatie tonen over een opdracht.\n" +"\n" +" Toont voor elke gegeven NAAM hoe deze zou worden geïnterpreteerd als\n" +" deze als opdracht gebruikt zou worden.\n" +"\n" +" Opties:\n" +" -a alle plaatsen tonen met een uitvoerbaar bestand genaamd NAAM;\n" +" dit omvat aliassen, ingebouwde shell-opdrachten, functies,\n" +" sleutelwoorden, en bestanden op schijf (alleen zonder '-p')\n" +" -f functies negeren, alsof ze niet gedefinieerd zijn\n" +" -P naar elke gegeven naam zoeken in het huidige zoekpad (PATH), ook\n" +" als het een alias, ingebouwde shell-opdracht of functie is\n" +" -p voor elke gegeven naam het volledige pad tonen van het bestand " +"dat\n" +" uitgevoerd zou worden, of niets als er een alias, functie,\n" +" ingebouwde shell-opdracht of sleutelwoord met die naam is\n" +" -t alleen het type van de opgegeven namen tonen: 'alias', 'builtin',\n" +" 'file', 'function' of 'keyword', al naar gelang het een alias,\n" +" een ingebouwde shell-opdracht, een bestand op schijf, een\n" +" gedefinieerde functie of een sleutelwoord betreft; of niets\n" +" als de naam onbekend is\n" +"\n" +" De afsluitwaarde is 0 als elke NAAM gevonden werd, anders 1." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Grenzen van hulpbronnen aanpassen.\n" +"\n" +" Begrenst de beschikbare hulpbronnen voor processen gestart door deze " +"shell\n" +" -- op systemen die zulke begrenzing toestaan.\n" +"\n" +" Opties:\n" +" -S een \"zachte\" hulpbrongrens gebruiken\n" +" -H een \"harde\" hulpbrongrens gebruiken\n" +" -a alle huidige begrenzingen tonen\n" +" -b de maximum grootte van een socketbuffer\n" +" -c de maximum grootte van een core-bestand (in kB)\n" +" -d de maximum hoeveelheid gegevensgeheugen van een proces (in kB)\n" +" -e de maximum procespriotiteit (de 'nice'-waarde)\n" +" -f de maximum grootte van bestanden geschreven door shell of " +"dochters\n" +" -i het maximum aantal nog wachtende signalen\n" +" -l de maximum hoeveelheid geheugen die een proces mag vastpinnen " +"(kB)\n" +" -k het maximum aantal gereserveerde kqueues voor dit proces\n" +" -m de maximum hoeveelheid fysiek geheugen van een proces (in kB)\n" +" -n het maximum aantal open bestandsdescriptors\n" +" -p de maximum grootte van een pijpbuffer\n" +" -q het maximum aantal bytes in POSIX berichtwachtrijen\n" +" -r de maximum realtime-procesprioriteit\n" +" -s de maximum stapelgrootte (in kB)\n" +" -t de maximum hoeveelheid CPU-tijd (in seconden)\n" +" -u het maximum aantal gebruikersprocessen\n" +" -v de maximum hoeveelheid virtueel geheugen van een proces (in kB)\n" +" -x het maximum aantal bestandsvergrendelingen\n" +" -P het maximum aantal pseudoterminals\n" +" -T het maximum aantal threads\n" +"\n" +" Niet alle opties zijn beschikbaar op alle platformen.\n" +"\n" +" Als een GRENSWAARDE opgegeven is, dan wordt dit de nieuwe waarde van de\n" +" aangegeven hulpbron, anders wordt de huidige waarde ervan getoond.\n" +" De speciale grenswaarden 'soft', 'hard' en 'unlimited' staan voor de\n" +" huidige zachte grens, de huidige harde grens, en onbegrensd.\n" +" Als geen optie gegeven is, dan wordt optie '-f' aangenomen.\n" +"\n" +" De waardes gaan in stappen van 1024 bytes, behalve voor '-t', die in\n" +" seconden is, voor '-p', die in stappen van 512 bytes gaat, en voor '-" +"u',\n" +" dat een ongeschaald aantal is.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" fout optrad." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Het bestandsaanmaakmasker tonen of instellen.\n" +"\n" +" Stelt het bestandsaanmaakmasker van de gebruiker in op de gegeven " +"MODUS.\n" +" Als MODUS ontbreekt, dan wordt de huidige waarde van het masker " +"getoond.\n" +"\n" +" Als MODUS begint met een cijfer, wordt het begrepen als een octaal " +"getal,\n" +" anders als een symbolische modus-tekenreeks zoals chmod (1) die kent.\n" +"\n" +" Opties:\n" +" -p als invoer herbruikbare uitvoer produceren (indien MODUS " +"ontbreekt)\n" +" -S symbolische uitvoer produceren; anders octale getallen\n" +"\n" +" De afsluitwaarde is 0, tenzij MODUS ongeldig is of een ongeldige optie\n" +" gegeven werd." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Op taakafsluiting wachten en de afsluitwaarde rapporteren.\n" +"\n" +" Wacht op elk proces aangeduid door een ID -- dat een taakaanduiding of\n" +" een proces-ID mag zijn -- en rapporteert diens afsluitwaarde. Als geen " +"ID\n" +" gegeven is, dan wordt er gewacht op alle actieve dochterprocessen, en " +"is\n" +" de afsluitwaarde van 'wait' automatisch 0. Als ID een taakaanduiding " +"is,\n" +" dan wordt er gewacht op alle processen in de pijplijn van die taak.\n" +"\n" +" Als optie '-n' gegeven is, dan wordt gewacht op de eerstvolgende " +"voltooiing\n" +" van een taak en wordt diens afsluitwaarde geretourneerd.\n" +" \n" +" Als optie '-f' gegeven is, en taakbesturing is ingeschakeld, dan wordt\n" +" gewacht tot de taak met de gegeven ID beëindigd is, in plaats van te\n" +" wachten op een toestandswijziging.\n" +"\n" +" De afsluitwaarde is die van de laatste ID, 1 als ID ongeldig is,\n" +" of 2 als een ongeldige optie gegeven werd." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Op procesafsluiting wachten en de afsluitwaarde rapporteren.\n" +"\n" +" Wacht op elk proces aangeduid door een PID en rapporteert diens\n" +" afsluitwaarde. Als geen PID gegeven is, dan wordt er gewacht op alle\n" +" momenteel actieve dochterprocessen, en is de afsluitwaarde van 'wait'\n" +" automatisch 0. PID moet een proces-ID zijn.\n" +"\n" +" De afsluitwaarde is die van de laatste PID, 1 als PID ongeldig is,\n" +" of 2 als een ongeldige optie gegeven werd." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Opdrachten uitvoeren voor elk element in een lijst.\n" +"\n" +" De 'for'-lus voert een reeks opdrachten uit voor elk element in een\n" +" lijst van items. Als 'in WOORDEN...;' afwezig is, wordt 'in \"$@\";'\n" +" aangenomen. Voor elk element in WOORDEN wordt NAAM gelijkgemaakt aan\n" +" dat element en worden de OPDRACHTEN uitgevoerd.\n" +"\n" +" De afsluitwaarde is die van de laatst uitgevoerde opdracht." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Een rekenkundige 'for'-lus.\n" +"\n" +" Dit is het equivalent van:\n" +"\n" +" (( EXP1 )); while (( EXP2 )); do OPDRACHTEN; (( EXP3 )); done\n" +"\n" +" EXP1, EXP2, and EXP3 zijn rekenkundige expressies. Als een expressie\n" +" weggelaten wordt, wordt de waarde 1 ervoor in de plaats genomen.\n" +"\n" +" De afsluitwaarde is die van de laatst uitgevoerde opdracht." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Een keuzelijst aanbieden en opdrachten uitvoeren.\n" +"\n" +" Toont een menu op standaardfoutuitvoer: een genummerde lijst met de\n" +" gegeven woorden nadat alle shell-vervangingen erop zijn toegepast.\n" +" Als het 'in'-gedeelte afwezig is, wordt 'in \"$@\";' aangenomen.\n" +"\n" +" Na het menu wordt de PS3-prompt getoond, en wordt een regel van\n" +" standaardinvoer gelezen. Als de gelezen regel één van de getoonde\n" +" nummers is, dan wordt NAAM gelijkgemaakt aan het bijbehorende woord;\n" +" als de regel leeg is, worden het menu en de prompt opnieuw getoond;\n" +" als einde-van-bestand (Ctrl-D) wordt gelezen, dan wordt de opdracht\n" +" beëindigd. Elke andere waarde zorgt ervoor dat de variabele NAAM\n" +" wordt leeggemaakt. De gelezen regel wordt altijd opgeslagen in de\n" +" variabele REPLY. Na elke keuze worden de bijbehorende opdrachten\n" +" uitgevoerd. Dit gaat door totdat een 'break' de opdracht beëindigt.\n" +"\n" +" De afsluitwaarde is die van de laatst uitgevoerde opdracht." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"De door een pijplijn verbruikte tijd tonen.\n" +"\n" +" Voert de in de PIJPLIJN gegeven opdrachten uit en toont daarna een\n" +" tijdssamenvatting: de totale verlopen tijd, de in gebruikersprocessen\n" +" verbruikte processortijd , en de in systeemprocessen verbruikte\n" +" processortijd.\n" +"\n" +" De uitvoer kan via de omgevingsvariabele TIMEFORMAT aangepast worden.\n" +" Optie '-p' negeert deze omgevingsvariabele en toont de tijden in een\n" +" overdraagbare standaardopmaak.\n" +" De afsluitwaarde is die van de PIJPLIJN." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Opdrachten uitvoeren afhankelijk van patroonovereenkomsten.\n" +"\n" +" Voert één van de gegeven sets met opdrachten uit, afhankelijk van met\n" +" welk PATROON het WOORD overeenkomt. Met '|' kunnen meerdere patronen\n" +" gegroepeerd worden.\n" +"\n" +" De afsluitwaarde is die van de laatst uitgevoerde opdracht." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Opdrachten uitvoeren afhankelijk van voorwaarden.\n" +"\n" +" Voert eerst de opdrachten na 'if' uit; als de afsluitwaarde daarvan\n" +" nul is, dan worden de opdrachten na de eerste 'then' uitgevoerd; anders\n" +" de opdrachten na de eerstvolgende 'elif' (indien aanwezig) of de 'else'\n" +" (indien aanwezig). Als de afsluitwaarde van de opdrachten na een " +"'elif'\n" +" nul is, dan worden de opdrachten na de bijbehorende 'then' uitgevoerd.\n" +" Als er geen verdere 'elif' of 'else' meer is, of zodra de opdrachten na\n" +" een 'then' zijn uitgevoerd, is de 'if'-opdracht voltooid.\n" +"\n" +" De afsluitwaarde van de gehele opdracht is die van de laatst " +"uitgevoerde\n" +" deelopdracht, of nul als geen enkele 'if' of 'elif' nul opleverde." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Opdrachten uitvoeren zolang een test slaagt.\n" +"\n" +" Voert de gegeven opdrachten uit zolang de laatste opdracht achter\n" +" 'while' een afsluitwaarde van 0 heeft.\n" +"\n" +" De afsluitwaarde is die van de laatst uitgevoerde opdracht." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Opdrachten uitvoeren zolang een test niet slaagt.\n" +"\n" +" Voert de gegeven opdrachten uit zolang de laatste opdracht achter\n" +" 'until' een afsluitwaarde ongelijk aan 0 heeft.\n" +"\n" +" De afsluitwaarde is die van de laatst uitgevoerde opdracht." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Een co-proces aanmaken genaamd NAAM.\n" +"\n" +" Voert OPDRACHT asynchroon uit, met standaardinvoer en -uitvoer via\n" +" een pijp verbonden met bestandsdescriptors die toegewezen zijn aan\n" +" indices 0 en 1 van array-variabele NAAM in de uitvoerende shell.\n" +" De standaard-NAAM is \"COPROC\".\n" +"\n" +" De afsluitwaarde van coproc is 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Een shell-functie definiëren.\n" +"\n" +" Maakt een shell-functie aan die met NAAM aangeroepen kan worden en die\n" +" de gegeven OPDRACHTEN uitvoert in de context van de aanroepende shell.\n" +" Wanneer NAAM aangeroepen wordt, worden de argumenten aan de functie\n" +" doorgegeven als $0...$N, en de functienaam in $FUNCNAME.\n" +"\n" +" De afsluitwaarde is 0, tenzij NAAM onveranderbaar is." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Opdrachten als een eenheid groeperen.\n" +"\n" +" Voert een set opdrachten als een eenheid uit. Dit is een manier om\n" +" de in- en uitvoer van een hele set opdrachten om te kunnen leiden.\n" +"\n" +" De afsluitwaarde is die van de laatst uitgevoerde opdracht." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Een taak hervatten in de voorgrond.\n" +"\n" +" Hervat de gegeven achtergrondtaak of gepauzeerde taak in de voorgrond.\n" +" Dit is equivalent aan de opdracht 'fg'. De taak kan met een nummer of\n" +" met een naam aangeduid worden.\n" +"\n" +" Als na de taakaanduiding een '&' volgt, dan wordt de taak in de\n" +" achtergrond geplaatst. Dit is equivalent aan de opdracht 'bg'.\n" +"\n" +" De afsluitwaarde is die van de hervatte taak." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Een rekenkundige uitdrukking evalueren.\n" +"\n" +" Evalueert de gegeven expressie als een rekenkundige uitdrukking.\n" +" Dit is equivalent aan 'let EXPRESSIE'.\n" +"\n" +" De afsluitwaarde is 1 als de EXPRESSIE tot 0 evalueert; anders 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Een voorwaardelijke opdracht uitvoeren.\n" +"\n" +" Evalueert de gegeven conditionele expressie; afhankelijk van het " +"resultaat\n" +" is de afsluitwaarde 0 (\"waar\") of 1 (\"onwaar\"). De expressies " +"bestaan uit\n" +" dezelfde basiscomponenten als die van ingebouwde opdracht 'test', en " +"kunnen\n" +" worden gecombineerd met de volgende operatoren:\n" +"\n" +" ( EXPRESSIE ) de waarde van de gegeven expressie\n" +" ! EXPRESSIE waar als EXPRESSIE onwaar is, anders onwaar\n" +" EXPR1 && EXPR2 waar als beide expressies waar zijn, anders " +"onwaar\n" +" EXPR1 || EXPR2 onwaar als beide expressies onwaar zijn, anders " +"waar\n" +"\n" +" Als '==' of '!=' als operator gebruikt wordt, dan wordt de rechter\n" +" tekenreeks als patroon begrepen en wordt patroonherkenning uitgevoerd.\n" +" Als '=~' als operator gebruikt wordt, dan wordt de rechter tekenreeks\n" +" als een reguliere expressie begrepen.\n" +"\n" +" De operatoren '&&' en '||' evalueren de tweede expressie níét als de " +"waarde\n" +" van de eerste voldoende is om het eindresulaat te bepalen.\n" +"\n" +" De afsluitwaarde is 0 of 1, afhankelijk van EXPRESSIE." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"De betekenis van enkele algemene shell-variabelen.\n" +"\n" +" Hieronder volgt de beschrijving van een aantal variabelen. (In elke\n" +" lijst worden de elementen van elkaar gescheiden door dubbele punten.)\n" +"\n" +" BASH_VERSION versie-informatie van deze 'bash'\n" +" CDPATH lijst van mappen om te doorzoeken wanneer het argument " +"van\n" +" 'cd' niet in de huidige map voorkomt\n" +" GLOBIGNORE lijst van patronen die de bestandsnamen beschrijven die " +"bij\n" +" bestandsnaamjokertekenexpansie genegeerd moeten worden\n" +" HISTFILE naam van het bestand dat uw opdrachtengeschiedenis bevat\n" +" HISTFILESIZE maximum aantal regels dat geschiedenisbestand mag " +"bevatten\n" +" HISTIGNORE lijst van patronen die niet in geschiedenis moeten komen\n" +" HISTSIZE maximum aantal geschiedenisregels dat huidige shell " +"gebruikt\n" +" HOME het volledige pad naar uw thuismap\n" +" HOSTNAME de naam van de computer waarop deze 'bash' wordt " +"uitgevoerd\n" +" HOSTTYPE de soort CPU waarop deze 'bash' wordt uitgevoerd\n" +" IGNOREEOF het aantal te negeren Ctrl-D's alvorens de shell afsluit\n" +" MACHTYPE de soort machine waarop deze 'bash' wordt uitgevoerd\n" +" MAILCHECK hoe vaak (in seconden) 'bash' controleert op nieuwe mail\n" +" MAILPATH lijst van bestandsnamen die 'bash' controleert op nieuwe " +"mail\n" +" OSTYPE de soort Unix waarop deze 'bash' wordt uitgevoerd\n" +" PATH lijst van mappen waar opdrachten in gezocht moeten worden\n" +" PROMPT_COMMAND uit te voeren opdracht vóór het tonen van primaire " +"prompt\n" +" PS1 tekenreeks die primaire prompt beschrijft\n" +" PS2 tekenreeks die secundaire prompt beschrijft (standaard '> " +"')\n" +" PWD het volledige pad van de huidige map\n" +" SHELLOPTS lijst van ingeschakelde shell-opties\n" +" TERM soortnaam van de huidige terminal\n" +" TIMEFORMAT opmaakvoorschrift voor de uitvoer van 'time'\n" +" auto_resume niet-leeg betekent dat één opdrachtwoord op de " +"opdrachtregel\n" +" eerst opgezocht wordt in de lijst van gepauzeerde " +"taken,\n" +" en indien daar gevonden, dan wordt die taak in de " +"voorgrond\n" +" geplaatst; de waarde 'exact' betekent dat het gegeven " +"woord\n" +" exact moet overeenkomen met een opdracht in de lijst " +"van\n" +" gepauzeerde taken; de waarde 'substring' betekent dat " +"een\n" +" overeenkomst met een deeltekenreeks voldoende is; elke\n" +" andere waarde betekent dat het gegeven woord aan het " +"begin\n" +" moet staan van de opdracht van een gepauzeerde taak\n" +" histchars tekens die geschiedenisexpansie en -vervanging besturen;\n" +" het eerste teken is het geschiedenisvervangingsteken,\n" +" gewoonlijk '!'; het tweede teken is het snelle\n" +" vervangingsteken, gewoonlijk '^'; het derde teken is " +"het\n" +" geschiedeniscommentaarteken, gewoonlijk '#'\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Mappen aan de mappenstapel toevoegen.\n" +"\n" +" Voegt een map toe aan de top van de mappenstapel, of roteert de stapel\n" +" en maakt de huidige werkmap gelijk aan de nieuwe top van de stapel.\n" +" Zonder argumenten worden de bovenste twee mappen verwisseld.\n" +"\n" +" Optie:\n" +" -n onderdrukt de verandering van map bij het toevoegen van mappen\n" +" aan de stapel, zodat enkel de stapel wordt gemanipuleerd\n" +"\n" +" Argumenten:\n" +" MAP Voegt deze map toe aan de top van de mappenstapel, het de nieuwe\n" +" werkmap makend.\n" +" +N Roteert de stapel zodat de N-de map (tellend vanaf links, van\n" +" de lijst getoond door 'dirs', beginned bij nul) bovenaan komt.\n" +" -N Roteert de stapel zodat de N-de map (tellend vanaf rechts, van\n" +" de lijst getoond door 'dirs', beginned bij nul) bovenaan komt.\n" +"\n" +" De opdracht 'dirs' toont de huidige mappenstapel.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldig argument gegeven werd of de\n" +" mapwijziging mislukte." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Mappen van de mappenstapel verwijderen.\n" +"\n" +" Verwijdert items van de mappenstapel. Zonder argumenten verwijdert\n" +" het de bovenste map van de stapel, en maakt de huidige werkmap\n" +" gelijk aan de nieuwe bovenste map.\n" +"\n" +" Optie:\n" +" -n onderdrukt de verandering van map bij het toevoegen van mappen\n" +" aan de stapel, zodat enkel de stapel wordt gemanipuleerd\n" +"\n" +" Argumenten:\n" +" +N Verwijdert het N-de item tellend vanaf links (van de lijst\n" +" getoond door 'dirs', beginnend met nul). Bijvoorbeeld:\n" +" 'popd +0' verwijdert de eerste map, 'popd +' de tweede.\n" +" -N Verwijdert het N-de item tellend vanaf rechts (van de lijst\n" +" getoond door 'dirs', beginnend met nul). Bijvoorbeeld:\n" +" 'popd -0' verwijdert de laatste map, 'popd -1' de voorlaatste.\n" +"\n" +" De opdracht 'dirs' toont de huidige mappenstapel.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldig argument gegeven werd of de\n" +" mapwijziging mislukte." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"De mappenstapel tonen.\n" +"\n" +" Toont de huidige lijst van onthouden mappen. Mappen worden aan deze\n" +" lijst toegevoegd met de opdracht 'pushd', en verwijderd met 'popd'.\n" +"\n" +" Opties:\n" +" -c de mappenstapel wissen door alle elementen te verwijderen\n" +" -l paden volledig tonen, niet afgekort ten opzichte van uw thuismap\n" +" -p de mappenstapel tonen met één item per regel\n" +" -v als '-p', maar met elk item voorafgegeaan wordt door zijn " +"positie\n" +" in de stapel\n" +"\n" +" Argumenten:\n" +" +N Het N-de item tonen, tellend vanaf links, van de lijst getoond\n" +" door 'dirs' wanneer opgeroepen zonder opties, beginnend bij nul.\n" +" -N Het N-de item tonen, tellend vanaf rechts, van de lijst getoond\n" +" door 'dirs' wanneer opgeroepen zonder opties, beginnend bij nul.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" fout optrad." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Shell-opties in- of uitschakelen.\n" +"\n" +" Stelt de waarde in van elke gegeven OPTIENAAM -- van een shell-optie\n" +" die bepaald shell-gedrag beïnvloedt. Zonder opties wordt elke gegeven\n" +" OPTIENAAM getoond, of alle shell-opties als geen OPTIENAAM gegeven is,\n" +" met bij elke optie de vermelding of deze al dan niet ingeschakeld is.\n" +"\n" +" Opties:\n" +" -o de verzameling mogelijke OPTIENAMEN naar diegene die " +"gedefinieerd\n" +" zijn voor gebruik met 'set -o'\n" +" -p uitvoer produceren die herbruikbaar is als invoer\n" +" -q uitvoer onderdrukken\n" +" -s elke gegeven OPTIENAAM inschakelen\n" +" -u elke gegeven OPTIENAAM uitschakelen\n" +"\n" +" Zonder opties (of met alleen '-q') is de afsluitwaarde 0 indien " +"OPTIENAAM\n" +" ingeschakeld is, 1 indien uitgeschakeld. De afsluitwaarde is ook 1 als\n" +" een ongeldige optienaam gegeven werd, en de afsluitwaarde is 2 als een\n" +" ongeldige optie gegeven werd." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Argumenten volgens een opmaakvoorschrift opmaken en printen.\n" +"\n" +" Print de gegeven ARGUMENTEN, opgemaakt volgens de gegeven OPMAAK.\n" +"\n" +" Optie:\n" +" -v VAR de uitvoer in de variabele VAR plaatsen in plaats van deze\n" +" naar standaarduitvoer te sturen\n" +"\n" +" De OPMAAK-tekenreeks bestaat uit drie soorten tekens: gewone tekens,\n" +" die simpelweg naar standaarduitvoer gekopieerd worden; stuurtekens,\n" +" die omgezet worden en dan naar standaarduitvoer gekopieerd worden;\n" +" en opmaaksymbolen, die elk steeds het volgende argument doen printen.\n" +"\n" +" Naast de standaard %-opmaaksymbolen van printf(1), \"diouxXfeEgGcs\",\n" +" betekent %b dat de backslash-stuurtekens in het betreffende argument\n" +" omgezet moeten worden, en betekent %q dat het argument op zo'n manier\n" +" aangehaald moet worden dat het als invoer voor de shell hergebruikt\n" +" kan worden. Verder betekent %(OPMAAK)T dat datum-plus-tijd getoond\n" +" moet worden door deze opmaak aan strftime(3) mee te geven.\n" +"\n" +" De gegeven opmaak wordt zo vaak hergebruikt als nodig is om alle " +"argumenten\n" +" te consumeren. Als er minder argumenten zijn dan de opmaak verwacht, " +"dan\n" +" gedragen de overtollige opmaakspecificaties zich alsof (al naar gelang) " +"de\n" +" waarde nul of een lege tekenreeks gegeven werd.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" schrijf- of toekenningsfout optrad." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Aangeven hoe argumenten door 'readline' gecompleteerd moeten worden.\n" +"\n" +" Geeft voor elke gegeven NAAM aan hoe de argumenten gecompleteerd dienen\n" +" te worden. Zonder opties worden de bestaande " +"completeringsvoorschriften\n" +" getoond (in een vorm die als invoer hergebruikt kan worden).\n" +"\n" +" Opties:\n" +" -p bestaande completeringsvoorschriften in herbruikbare vorm tonen\n" +" -r elk genoemd voorschrift verwijderen, of alle voorschriften als\n" +" geen NAAM gegeven is\n" +" -D de gegeven completeringen en acties als standaard nemen voor\n" +" opdrachten die geen specifieke eigen completering hebben\n" +" -E de gegeven completeringen en acties als standaard nemen voor\n" +" lege opdrachten -- de completering van een lege regel\n" +" -I de gegeven completeringen en acties als standaard nemen voor\n" +" een initieel woord (gewoonlijk een opdracht)\n" +"\n" +" Als completering geprobeerd wordt, dan worden de acties toegepast in\n" +" de volgorde van de bovenstaande hoofdletteropties. Optie '-D' gaat\n" +" voor optie '-E', en beide gaan voor '-I'\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" fout optrad." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"De mogelijke completeringen tonen, afhankelijk van de gegeven opties.\n" +"\n" +" Bedoeld voor gebruik binnen een functie die mogelijke completeringen\n" +" genereert. Als het optionele argument WOORD aanwezig is, worden alleen\n" +" de daarbij passende completeringen gegenereerd.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " +"een\n" +" fout optrad." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Completeringsopties wijzigen of tonen.\n" +"\n" +" Wijzigt de completeringsopties van elke gegeven NAAM, of als geen NAAM\n" +" gegeven is, die van de huidige completering. Als geen OPTIE gegeven " +"is,\n" +" dan worden de completeringsopties van elke gegeven NAAM getoond, of die\n" +" van de huidige completering.\n" +"\n" +" Opties:\n" +" -o OPTIE deze completeringsoptie inschakelen voor elke gegeven NAAM\n" +" -D opties wijzigen voor de standaardcompletering\n" +" -E opties wijzigen voor de completering van een lege opdracht\n" +" -I opties wijzigen voor de completering van initieel woord\n" +"\n" +" Het gebruik van '+o' i.p.v. '-o' schakelt de betreffende optie _uit_.\n" +"\n" +" Elke NAAM dient te refereren aan een opdracht waarvoor reeds een\n" +" completeringsvoorschrift gedefinieerd is via de opdracht 'complete'.\n" +" Als geen NAAM gegeven is, dan dient 'compopt' aangeroepen te worden " +"door\n" +" een functie die momenteel completeringen genereert; dan worden de " +"opties\n" +" voor die draaiende completeringsgenerator gewijzigd.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of voor\n" +" NAAM geen completeringsvoorschrift gedefinieerd is." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Regels inlezen in een geïndexeerde array-variabele.\n" +"\n" +" Leest regels van standaardinvoer in in de array-variabele ARRAY.\n" +" De variabele MAPFILE wordt gebruikt als geen ARRAY gegeven is.\n" +"\n" +" Opties:\n" +" -d TEKEN dit teken (i.p.v. LF) gebruiken als einde van regel\n" +" -n AANTAL maximaal dit aantal regels kopiëren (0 = alles)\n" +" -O BEGIN met toekennen beginnen bij deze index (standaard 0)\n" +" -s AANTAL dit aantal regels overslaan\n" +" -t nieuweregelteken aan eind van elke gelezen regel " +"verwijderen\n" +" -u BES.DES. uit deze bestandsdescriptor lezen i.p.v. uit " +"standaardinvoer\n" +" -C FUNCTIE deze functie evalueren na elke HOEVEELHEID regels\n" +" -c HOEVEELHEID het aantal te lezen regels voor elke aanroep van " +"FUNCTIE\n" +"\n" +" Argument:\n" +" ARRAY naam van array-variabele waarin regels ingelezen moeten " +"worden\n" +"\n" +" Als '-C' gegeven is zonder '-c', is de standaard-HOEVEELHEID 5000.\n" +" Wanneer FUNCTIE aangeroepen wordt, dan wordt hieraan de index van het\n" +" volgende array-element en de daaraan toe te kennen regel als extra\n" +" argumenten meegegeven.\n" +"\n" +" Als geen expliciet BEGIN gegeven is, wordt het array gewist alvorens\n" +" met toekennen te beginnen.\n" +"\n" +" De afsluitwaarde is 0, tenzij ARRAY alleen-lezen is of geen array is, " +"of\n" +" een ongeldige optie gegeven werd." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Regels inlezen vanuit een bestand in een array-variabele.\n" +"\n" +" Een synoniem voor 'mapfile'." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "De context geven van de huidige functie-aanroep.\n" +#~ "\n" +#~ " Zonder EXPR, resulteert " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process(): proces %5ld (%s) in de pijplijn" + +#~ msgid "Unknown Signal #" +#~ msgstr "Onbekend signaalnummer" + +# Dit is een commandonaam. +#~ msgid "true" +#~ msgstr "true" + +# Dit is een commandonaam. +#~ msgid "false" +#~ msgstr "false" + +# Dit is een commandonaam. +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "De licentie is GPLv2+: GNU GPL versie 2 of later.\n" +#~ "Zie http://gnu.org/licenses/gpl.html voor de volledige tekst.\n" diff --git a/bash-5.1/po/pl.gmo b/bash-5.1/po/pl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..be60e28c334907fc053c934e47d8a507b467a4b5 Binary files /dev/null and b/bash-5.1/po/pl.gmo differ diff --git a/bash-5.1/po/pl.po b/bash-5.1/po/pl.po new file mode 100644 index 0000000000000000000000000000000000000000..af6bfbd50b2e095e1206f4aa6b75c4986c20e550 --- /dev/null +++ b/bash-5.1/po/pl.po @@ -0,0 +1,5989 @@ +# Polish translation of bash +# Copyright (C) 2007, 2010, 2011, 2013, 2014, 2015, 2016, 2018, 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Andrzej M. Krzysztofowicz 2006,2007. +# Jakub Bogusz 2010-2019. +# +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-08 21:45+0100\n" +"Last-Translator: Jakub Bogusz \n" +"Language-Team: Polish \n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "nieprawidłowy indeks tablicy" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: usuwanie atrybutu nameref" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nie można przekształcić tablicy indeksowanej na asocjacyjną" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: błędny klucz tablicy asocjacyjnej" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: nie można przypisać do nienumerycznego indeksu" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: przy przypisaniu do tablicy asocjacyjnej należy użyć nawiasów" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: nie można utworzyć: %s" + +# ??? +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: nie można znaleźć mapy klawiszy dla polecenia" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: pierwszym drukowalnym znakiem nie jest `\"'" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "brak zamykającego `%c' w %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: brak separującego dwukropka" + +# ??? +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': nie można usunąć dowiązania" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "rozwijanie nawiasów: nie można przydzielić pamięci dla %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"rozwijanie nawiasów: nie udało się przydzielić pamięci dla elementów w " +"liczbie %u" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "rozwijanie nawiasów: nie udało się przydzielić pamięci dla `%s'" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': błędna nazwa aliasu" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "edycja wiersza nie została włączona" + +# ??? +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': nieprawidłowa nazwa mapy klawiszy" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: nie można odczytać: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': nie znana nazwa funkcji" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s nie jest przypisany do żadnego klawisza.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s może być wywołany przez " + +# ??? +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': nie można usunąć dowiązania" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "licznik pętli" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "ma sens tylko w pętli `for', `while' lub `until'" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Zwrócenie kontekstu wywołania bieżącej procedury.\n" +" \n" +" Bez WYRAŻENIA zwracane jest \"$linia $plik\". Z WYRAŻENIEM zwracane " +"jest\n" +" \"$linia $procedura $plik\"; dodatkowe informacje służą do " +"udostępnienia\n" +" śladu stosu.\n" +" \n" +" Wartość WYRAŻENIA określa o ile ramek wywołań względem bieżącej ramki\n" +" należy się cofnąć; numer najwyższej ramki to 0.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca 0, chyba że powłoka nie wykonuje funkcji lub WYRAŻENIE\n" +" jest nieprawidłowe." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "Nie ustawiono HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "za dużo argumentów" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "zerowy katalog" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "Nie ustawiono OLDPWD" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linia %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "uwaga: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: składnia: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: opcja wymaga argumentu" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: wymagany argument numeryczny" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: nie znaleziono" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: nieprawidłowa opcja" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nieprawidłowa nazwa opcji" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': nieprawidłowy identyfikator" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "błędna liczba ósemkowa" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "błędna liczba szesnastkowa" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "nieprawidłowa liczba" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: nieprawidłowo określony sygnał" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': nie jest to nr PID ani prawidłowe określenie zadania" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: zmienna tylko do odczytu" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s poza zakresem" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s poza zakresem" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: brak takiego zadania" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: brak kontroli zadań" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "brak kontroli zadań" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: ograniczony" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "ograniczony" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: nie jest to polecenie powłoki" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "błąd zapisu: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "błąd podczas ustawiania atrybutów terminala: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "błąd podczas pobierania atrybutów terminala: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: błąd przy określaniu katalogu bieżącego: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: niejednoznaczne określenie zadania" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "pomoc nie jest dostępna w tej wersji" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nie można anulować definicji: %s jest tylko do odczytu" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nie można anulować definicji" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nieprawidłowa nazwa akcji" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: brak definicji dla uzupełnienia" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "uwaga: opcja -F może działać inaczej niż oczekiwano" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "uwaga: opcja -C może działać inaczej niż oczekiwano" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "aktualnie nie jest wykonywana funkcja dopełniania" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "można używać tylko w funkcji" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: zmienna referencyjna nie może być tablicą" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: zmienna referencyjna nie może wskazywać na siebie" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: cykliczne odwołanie do nazwy" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': błędna nazwa zmiennej przy odwołaniu do nazwy" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "nie można używać `-f' do tworzenia funkcji" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funkcja tylko do odczytu" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: przypisanie złożonej tablicy z cytowaniem jest przestarzałe" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: nie można w ten sposób unicestwić zmiennej tablicowej" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: nie można przekształcić tablicy asocjacyjnej na indeksowaną" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "ładowanie dynamiczne nie jest dostępne" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "nie można otworzyć obiektu współdzielonego %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "nie można znaleźć %s w obiekcie współdzielonym %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: nie jest ładowany dynamicznie" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "funkcja ładująca dla %s zwraca niepowodzenie (%d): nie załadowano" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: nie jest ładowany dynamicznie" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: nie można usunąć: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: jest katalogiem" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: nie jest zwykłym plikiem" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: plik jest za duży" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: nie można uruchomić pliku binarnego" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: nie można uruchomić: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "wylogowanie\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "to nie jest powłoka logowania: użyj `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Istnieją zatrzymane zadania.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Istnieją działające zadania.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "nie znaleziono polecenia" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "specyfikacja historii" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: nie udało się otworzyć pliku tymczasowego: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "bieżące" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "zadanie %d uruchomiono bez kontroli zadań" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: niedozwolona opcja -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opcja wymaga argumentu -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "zapamiętywanie ścieżek poleceń w tablicy asocjacyjnej wyłączone" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: tablica asocjacyjna pusta\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "trafienia\tpolecenie\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Polecenia powłoki pasujące do słowa kluczowego `" +msgstr[1] "Polecenia powłoki pasujące do słów kluczowych `" +msgstr[2] "Polecenia powłoki pasujące do słów kluczowych `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"żaden temat pomocy nie pasuje do `%s'. Spróbuj `help help', `man -k %s'\n" +"lub `info %s'." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: nie można otworzyć: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Te polecenia powłoki są poleceniami wewnętrznymi. Napisz `help', aby\n" +"zobaczyć listę.\n" +"Napisz `help nazwa', aby otrzymać więcej informacji o funkcji `nazwa'.\n" +"Użyj `info bash', aby otrzymać więcej informacji ogólnych o powłoce.\n" +"Użyj `man -k' lub `info', aby otrzymać więcej informacji o poleceniach z " +"tej\n" +"listy.\n" +"\n" +"Gwiazdka (*) po nazwie oznacza, że dane polecenie jest wyłączone.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "nie można używać więcej niż jednego spośród -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "pozycja historii" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: nieprawidłowy znacznik czasu" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: rozwinięcie wg historii nie powiodło się" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib nie powiodło się" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "nie można używać innych opcji przy `-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumentami muszą być numery procesów lub zadań" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Nieznany błąd" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "spodziewano się wyrażenia" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: nie jest tablicą indeksowaną" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: nieprawidłowo określony deskryptor pliku" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: nieprawidłowy deskryptor pliku: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: błędna liczba linii" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: błędny początek tablicy" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: błędna liczba linii między wywołaniami" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "pusta nazwa zmiennej tablicowej" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "wymagana obsługa zmiennych tablicowych" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': brak znaku formatującego" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': błędne określenie formatu czasu" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': nieprawidłowy znak formatujący" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "uwaga: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "problem z analizą formatu: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "brak cyfry szesnastkowej dla \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "brak cyfry unikodowej dla \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "brak innego katalogu" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: nieprawidłowy argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "pusty stos katalogów" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "indeks stosu katalogów" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Wypisanie listy aktualnie pamiętanych katalogów. Katalogi umieszczane są\n" +" na liście za pomocą polecenia `pushd'; można cofać się w obrębie listy\n" +" za pomocą polecenia `popd'.\n" +" \n" +" Opcje:\n" +" -c\twyczyszczenie stosu katalogów poprzez usunięcie wszystkich " +"elementów\n" +" -l\tniewypisywanie katalogów względem kat. domowego użytkownika\n" +" \tw postaci skróconej z tyldą\n" +" -p\twypisanie stosu katalogów po jednym wpisie w linii\n" +" -v\twypisanie stosu katalogów po jednym wpisie w linii, poprzedzonych\n" +" \tpozycją na stosie\n" +" \n" +" Argumenty:\n" +" +N\tWypisanie N-tej pozycji licząc od lewej strony listy wypisywanej\n" +" \tprzez dirs wywołane bez opcji, począwszy od zera.\n" +" \n" +" -N\tWypisanie N-tej pozycji licząc od prawej strony listy wypisywanej\n" +"\tprzez dirs wywołane bez opcji, począwszy od zera." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Dodanie katalogu na wierzchołku stosu katalogów lub rotacja stosu czyniąca\n" +" jego nowym wierzchołkiem bieżący katalog roboczy. Wywołane bez\n" +" argumentów zamienia na stosie dwa najwyższe katalogi.\n" +" \n" +" Opcje:\n" +" -n\tPominięcie zmiany katalogu podczas umieszczania katalogów na\n" +" \tstosie tak, że zmieniany jest tylko stos.\n" +" \n" +" Argumenty:\n" +" +N\tRotacja stosu czyniąca jego wierzchołkiem N-ty katalog (licząc\n" +" \tod lewej strony listy wypisywanej przez `dirs', począwszy od zera).\n" +" \n" +" -N\tRotacja stosu czyniąca jego wierzchołkiem N-ty katalog (licząc\n" +" \tod prawej strony listy wypisywanej przez `dirs', począwszy od zera).\n" +" \n" +" katalog\tUmieszczenie KATALOGU na wierzchołku stosu i uczynienie go\n" +" \tnowym bieżącym katalogiem roboczym.\n" +" \n" +" Zawartość stosu katalogów można zobaczyć za pomocą polecenia `dirs'." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Usunięcie pozycji ze stosu katalogów. Wywołane bez argumentów usuwa\n" +" katalog z wierzchołka stosu i zmienia katalog bieżący na katalog\n" +" będący nowym wierzchołkiem stosu.\n" +" \n" +" Opcje:\n" +" -n\tPominięcie zmiany katalogu podczas usuwania katalogów ze stosu\n" +" \ttak, że zmieniany jest tylko stos.\n" +" \n" +" Argumenty:\n" +" +N\tUsunięcie ze stosu N-tej pozycji licząc od lewej strony listy\n" +" \twypisywanej przez `dirs', począwszy od zera. Na przykład: `popd +0'\n" +" \tusuwa pierwszy katalog, `popd +1' usuwa drugi.\n" +" \n" +" -N\tUsunięcie ze stosu N-tej pozycji licząc od prawej strony listy\n" +" \twypisywanej przez `dirs', począwszy od zera. Na przykład: `popd -0'\n" +" \tusuwa ostatni katalog, `popd -1' usuwa poprzedni.\n" +" \n" +" Zawartość stosu katalogów można zobaczyć za pomocą polecenia `dirs'." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: nieprawidłowo określony limit czasu" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "błąd odczytu: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "wyjście przez `return' możliwe tylko z funkcji lub skryptu" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "nie można jednocześnie anulować definicji funkcji i zmiennej" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: nie jest zmienną tablicową" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: nie jest funkcją" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: nie można wyeksportować" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "licznik przesunięcia" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "nie można opcji powłoki jednocześnie ustawić i unieważnić" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nieprawidłowa nazwa opcji powłoki" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "wymagany argument w postaci nazwy pliku" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: nie znaleziono pliku" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "nie można wstrzymać" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "nie można wstrzymać powłoki logowania" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s jest aliasem do %s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s jest słowem kluczowym powłoki\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s jest funkcją\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s jest specjalnym wewnętrznym poleceniem powłoki\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s jest wewnętrznym poleceniem powłoki\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s jest %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "ścieżka do %s jest zapamiętana (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: nieprawidłowy argument stanowiący ograniczenie" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': złe polecenie" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: nie można odczytać ograniczenia: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "ograniczenie" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: nie można zmienić ograniczenia: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "liczba ósemkowa" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': nieprawidłowy operator trybu symbolicznego" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': nieprawidłowy znak trybu symbolicznego" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " linia " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "ostatnie polecenie: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Przerywanie..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:462 +msgid "unknown command error" +msgstr "nieznany błąd polecenia" + +#: error.c:463 +msgid "bad command type" +msgstr "zły rodzaj polecenia" + +#: error.c:464 +msgid "bad connector" +msgstr "zły łącznik" + +#: error.c:465 +msgid "bad jump" +msgstr "zły skok" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: nieustawiona zmienna" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aprzekroczony czas oczekiwania na dane wejściowe: auto-wylogowanie\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "nie można przekierować standardowego wejścia z /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': nieprawidłowy znak formatujący" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: koproces [%d:%s] nadal istnieje" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "błąd potoku" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: przekroczono maksymalny poziom zagnieżdżenia polecenia eval (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: przekroczono maksymalny poziom zagnieżdżenia polecenia source (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: przekroczono maksymalny poziom zagnieżdżenia funkcji (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: ograniczony: nie można podawać `/' w nazwach poleceń" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: nie znaleziono polecenia" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: zły interpreter" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: nie można uruchomić pliku binarnego: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s' jest specjalnym poleceniem wewnętrznym" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "nie można skopiować deskryptora pliku %d do %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "przekroczone ograniczenie poziomu rekursji dla wyrażenia" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "niedomiar stosu rekursji" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "błąd składniowy w wyrażeniu" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "próba przypisania do nie-zmiennej" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "błąd składniowy w przypisaniu zmiennej" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "dzielenie przez 0" + +# ??? +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "błąd: zły prefiks operatora przypisującego" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "spodziewano się `:' w wyrażeniu warunkowym" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "wykładnik mniejszy niż 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" +"spodziewany identyfikator po operatorze preinkrementacji lub predekrementacji" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "brakujący `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "błąd składni: spodziewany argument" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "błąd składni: nieprawidłowy operator arytmetyczny" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (błędny znacznik to \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "nieprawidłowa podstawa arytmetyczna" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: błędna liczba linii" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "wartość za duża na podstawę" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: błąd w wyrażeniu\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: niemożliwy dostęp do katalogów nadrzędnych" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "nie można wyłączyć trybu nieblokującego dla deskryptora %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "nie można przydzielić nowego deskryptora pliku dla wejścia basha z %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: bufor dla nowego deskryptora %d już istnieje" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +# ??? +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "proces o PID %d występuje w działającym zadaniu %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "usuwanie zatrzymanego zadania %d z grupą procesów %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) oznaczony jako nadal żywy" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: brak takiego PID-u" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Sygnał %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Zakończono" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Zatrzymano" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Zatrzymano(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Działa" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Zakończono(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Kod wyjścia %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Stan nieznany" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(zrzut pamięci) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (katalog: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid potomka (%ld na %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: PID %ld nie jest potomkiem tej powłoki" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Brak rekordu dla procesu %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: zadanie %d jest zatrzymane" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: brak takiego zadania" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: zadanie zostało przerwane" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: zadanie %d już pracuje w tle" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" +"waitchld: wyłączanie WNOHANG w celu uniknięcia nieskończonego oczekiwania" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: linia %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (zrzut pamięci)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(katalog: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp nie powiodło się" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: brak kontroli zadań w tle" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: dyscyplina linii" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "nie można ustawić grupy procesów terminala (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "w tej powłoce nie ma kontroli zadań" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: założenie, że %s nie jest spełnione\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: spartaczone założenie\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "nieznany" + +# ??? +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: nieprawidłowy blok na liście wolnych bloków" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: wywołane dla bloku, który już został zwolniony" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: wywołane dla bloku, który nie został przydzielony" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: wykryto niedomiar; mh_nbytes poza zakresem" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: wykryto niedomiar; mh_nbytes poza zakresem" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: rozmiar początkowy i końcowy fragmentu są różne" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: wywołane dla bloku, który nie został przydzielony" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: wykryto niedomiar; mh_nbytes poza zakresem" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: wykryto niedomiar; mh_nbytes poza zakresem" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: rozmiar początkowy i końcowy fragmentu są różne" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: tablica alokacji jest pełna podczas FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p już znajduje się w tablicy jako przydzielony?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p już znajduje się w tablicy jako wolny?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "nieprawidłowa podstawa" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: nieznany host" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: nieznana usługa" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: źle określona ścieżka sieciowa" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "operacje sieciowe nie są wspierane" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: nie można zmienić lokalizacji (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: nie można zmienić lokalizacji (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: nie można zmienić lokalizacji (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: nie można zmienić lokalizacji (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Masz pocztę w $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Masz nową pocztę w $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Poczta w %s jest przeczytana\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "błąd składni: oczekiwano wyrażenia arytmetycznego" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "błąd składni: oczekiwany `;'" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "błąd składni: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: zły rodzaj instrukcji %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"dokument miejscowy w linii %d ograniczony końcem pliku (oczekiwano `%s')" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: instrukcja przekierowania `%d' poza zakresem" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) przekracza SIZE_MAX (%lu): linia " +"skrócona" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "przekroczono maksymalną liczbę dokumentów w miejscu" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "nieoczekiwany EOF podczas poszukiwania pasującego `%c'" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "nieoczekiwany EOF podczas poszukiwania `]]'" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "błąd składni w wyrażeniu warunkowym: nieoczekiwany znacznik `%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "błąd składni w wyrażeniu warunkowym" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "nieoczekiwany znacznik `%s', oczekiwano `)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "oczekiwano `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "nieoczekiwany argument `%s' jednoargumentowego operatora warunkowego" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "nieoczekiwany argument jednoargumentowego operatora warunkowego" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "nieoczekiwany argument `%s', oczekiwano dwuarg. operatora warunkowego" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "oczekiwano dwuargumentowego operatora warunkowego" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "nieoczekiwany argument `%s' dwuargumentowego operatora warunkowego" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "nieoczekiwany argument dwuargumentowego operatora warunkowego" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "nieoczekiwany znacznik `%c' w poleceniu warunkowym" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "nieoczekiwany znacznik `%s' w poleceniu warunkowym" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "nieoczekiwany znacznik %d w poleceniu warunkowym" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "błąd składni przy nieoczekiwanym znaczniku `%s'" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "błąd składni przy `%s'" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "błąd składni: nieoczekiwany koniec pliku" + +#: parse.y:6365 +msgid "syntax error" +msgstr "błąd składni" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Użyj \"%s\", aby opuścić tę powłokę.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "nieoczekiwany EOF podczas poszukiwania pasującego `)'" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "uzupełnienie: nie znaleziono funkcji `%s'" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: możliwe zapętlenie wznowień" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: zły łącznik `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: nieprawidłowy deskryptor pliku" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: pusty wskaźnik pliku" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': nieprawidłowy znak formatujący" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "deskryptor pliku poza zakresem" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: niejednoznaczne przekierowanie" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: nie można nadpisać istniejącego pliku" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ograniczony: nie można przekierować wyjścia" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "nie można utworzyć pliku tymczasowego dla dokumentu miejscowego: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: nie można przypisać deskryptora pliku do zmiennej" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port nie są wspierane bez sieci" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "błąd przekierowania: nie można powielić deskryptora pliku" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "nie można znaleźć /tmp, proszę o utworzenie!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp musi być prawidłową nazwą katalogu" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "tryb ładnego wypisywania jest ignorowany w powłokach interaktywnych" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: nieprawidłowa opcja" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nie można ustawić uid-a na %d: efektywny uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nie można ustawić gid-a na %d: efektywny gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "nie można uruchomić debuggera; tryb diagnostyczny wyłączony" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: jest katalogiem" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Nie mam nazwy!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, wersja %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Użycie:\t%s [długa opcja GNU] [opcja] ...\n" +"\t%s [długa opcja GNU] [opcja] plik-skryptu ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Długie opcje GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opcje powłoki:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD lub -c polecenie lub -O shopt_option\t\t(tylko wywołanie)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s lub -o opcja\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Aby uzyskać więcej informacji o opcjach powłoki, napisz `%s -c \"help set" +"\"'.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Aby uzyskać więcej informacji o poleceniach wewnętrznych powłoki,\n" +"napisz `%s -c help'.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Do zgłaszania błędów należy używać polecenia `bashbug'.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "strona domowa basha: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Ogólna pomoc przy użytkowaniu oprogramowania GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: nieprawidłowa operacja" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Błędny sygnał" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Rozłączenie" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Przerwanie" + +#: siglist.c:58 +msgid "Quit" +msgstr "Wyjście" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Niedozwolona instrukcja" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Pułapka debuggera/breakpoint" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Instrukcja ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Pułapka EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Błąd w obliczeniach zmiennoprzecinkowych" + +#: siglist.c:86 +msgid "Killed" +msgstr "Unicestwiony" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Błąd szyny" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Naruszenie ochrony pamięci" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Błędne wywołanie systemowe" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Przerwany potok" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Budzik" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Zakończony" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Nagłe żądanie we/wy" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Zatrzymany (sygnał)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Kontynuacja" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Śmierć lub zatrzymanie potomka" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Zatrzymany (wejście z tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Zatrzymany (wyjście na tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "We/wy gotowe" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Przekroczony limit procesora" + +#: siglist.c:154 +msgid "File limit" +msgstr "Przekroczony limit pliku" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (wirtualny)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profiler)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Okno zmienione" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Zasoby utracone" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Sygnał użytkownika 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Sygnał użytkownika 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Dane wejściowe HFT" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "Bliska awaria zasilania" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "Bliska awaria systemu" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "Przeniesienie procesu na inny procesor" + +#: siglist.c:198 +msgid "programming error" +msgstr "Błąd programowania" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Nadany tryb monitora HFT" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Wycofany tryb monitora HFT" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "Sekwencja dźwiękowa HFT zakończona" + +#: siglist.c:214 +msgid "Information request" +msgstr "Żądanie informacji" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Nieznany sygnał #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "złe podstawienie: brak zamykającego `%s' w %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: nie można przypisać listy do elementu tablicy" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "nie można utworzyć potoku dla podstawienia procesu" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "nie można utworzyć procesu potomnego dla podstawienia procesu" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "nie można otworzyć nazwanego potoku %s do odczytu" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "nie można otworzyć nazwanego potoku %s do zapisu" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "nie można powielić nazwanego potoku %s jako deskryptor %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "podstawienie polecenia: zignorowano zerowy bajt na wejściu" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "nie można utworzyć potoku dla podstawienia polecenia" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "nie można utworzyć procesu potomnego dla podstawienia polecenia" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: nie można powielić potoku jako deskryptora 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nieprawidłowa nazwa zmiennej przy odwołaniu do nazwy" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: błędne rozwinięcie niebezpośrednie" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "`%s': błędna nazwa zmiennej" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametr nieustawiony" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametr pusty lub nieustawiony" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: wyrażenie dla podłańcucha < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: złe podstawienie" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: nie można przypisywać w ten sposób" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"przyszłe wersje powłoki będą wymuszać obliczenie jako podstawienie " +"arytmetyczne" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "złe podstawienie: brak zamykającego \"`\" w %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "brak pasującego: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "oczekiwano argumentu" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: oczekiwano wyrażenia całkowitego" + +#: test.c:265 +msgid "`)' expected" +msgstr "oczekiwano `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "oczekiwano `)', znaleziono %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: oczekiwano operatora dwuargumentowego" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: oczekiwano operatora jednoargumentowego" + +#: test.c:881 +msgid "missing `]'" +msgstr "brakujący `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "błąd składni: oczekiwany `;'" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "nieprawidłowy numer sygnału" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "obsługa pułapki: przekroczono maksymalny poziom obsługi pułapek (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: zła wartość trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: obsługa sygnału jest ustawiona na SIG_DFL, wysyłając %d " +"(%s) do siebie" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: zły sygnał %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "błąd importu definicji funkcji dla `%s'" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "poziom powłoki (%d) jest za duży, ustawiono na 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: brak kontekstu funkcji w bieżącym zakresie" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: nie można przypisać wartości do zmiennej" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: przypisanie wartości całkowitej przy odwołaniu do nazwy" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: brak kontekstu funkcji w bieżącym zakresie" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s ma pusty exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "nieprawidłowy znak %d w exportstr dla %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "brak `=' w exportstr dla %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: nagłówek shell_variables poza kontekstem funkcji" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: brak kontekstu global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: nagłówek shell_variables poza zakresem tymczasowego środowiska" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: nie można otworzyć jako PLIK" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: nieprawidłowa wartość dla deskryptora pliku do śledzenia" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: wartość zgodności poza zakresem" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licencja GPLv3+: GNU GPL wersja 3 lub późniejsza \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, wersja %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"To oprogramowanie jest wolnodostępne; można je swobodnie zmieniać i " +"rozpowszechniać." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Nie ma ŻADNEJ GWARANCJI w granicach dopuszczanych przez prawo." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: nie można przydzielić %lu bajtów (przydzielono %lu)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: nie można przydzielić %lu bajtów" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: nie można przydzielić %lu bajtów (przydzielono %lu)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: nie można przydzielić %lu bajtów" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nazwa[=wartość] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nazwa [nazwa ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVSX] [-m mapa] [-f plik] [-q nazwa] [-u nazwa] [-r sekwencja] [-" +"x sekwencja:polecenie-powłoki] [sekwencja:funkcja-readline lub polecenie-" +"readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [polecenie-wbudowane [arg ... ]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [wyrażenie]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [katalog]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] polecenie [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [nazwa[=wartość] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] nazwa[=wartość] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [opcja] nazwa[=wartość] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f plik] [nazwa ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts łańcuch-opcji nazwa [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nazwa] [polecenie [argumenty ...]] [przekierowanie ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e nazwa-ed] [-lnr] [pierwszy] [ostatni] lub fc -s [wz=zam] [polecenie]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [zadanie]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [zadanie ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ścieżka] [-dt] [nazwa ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [wzorzec ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d offset] [n] lub history -anrw [plik] lub history -ps arg " +"[arg ...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [zadanie ...] lub jobs -x polecenie [argumenty]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [zadanie ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sygnał | -n numer-sygnału | -sygnał] pid | zadanie ... lub kill -l " +"[sygnał]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a tablica] [-d separator] [-i tekst] [-n liczba] [-N liczba] [-" +"p zachęta] [-t czas] [-u fd] [nazwa ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nazwa-opcji] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nazwa ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nazwa[=wartość] ...] lub export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [aAf] [nazwa[=wartość] ...] lub readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source plik [argumenty]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". plik [argumenty]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [wyrażenie]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] sygnał ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nazwa [nazwa ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [ograniczenie]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [uprawnienia]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAZWA [in SŁOWA ... ] ; do POLECENIA; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( wyr1; wyr2; wyr3 )); do POLECENIA; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAZWA [in SŁOWA ... ;] do POLECENIA; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] potok" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case SŁOWO in [WZORZEC [| WZORZEC]...) POLECENIA ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if POLECENIA; then POLECENIA; [ elif POLECENIA; then POLECENIA; ]... [ else " +"POLECENIA; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while POLECENIA; do POLECENIA; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until POLECENIA; do POLECENIA; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAZWA] polecenie [przekierowania]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nazwa { POLECENIA ; } lub nazwa () { POLECENIA ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ POLECENIA ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "zadanie [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( wyrażenie ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ wyrażenie ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "zmienne - nazwy i znaczenie niektórych zmiennych powłoki" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | katalog]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nazwa-opcji ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [argumenty]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o opcja] [-A akcja] [-G wzorzec-" +"glob] [-W lista-słów] [-F funkcja] [-C polecenie] [-X wzorzec-filtra] [-P " +"przedrostek] [-S przyrostek] [nazwa ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o opcja] [-A akcja] [-G wzorzec-glob] [-W lista-" +"słów] [-F funkcja] [-C polecenie] [-X wzorzec-filtra] [-P przedrostek ] [-S " +"przyrostek] [słowo]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opcja] [-DEI] [nazwa ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d separator] [-n liczba] [-O początek] [-s liczba] [-t] [-u fd] [-" +"C wywołanie] [-c co-ile] [tablica]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d ogranicznik] [-n liczba] [-O początek] [-s liczba] [-t] [-u " +"fd] [-C wywołanie] [-c krok] [tablica]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definiowanie i wyświetlanie aliasów.\n" +" \n" +" Bez argumentów `alias' wypisuje na standardowym wyjściu listę aliasów\n" +" w postaci alias NAZWA=WARTOŚĆ.\n" +" \n" +" W przeciwnym przypadku definiowany jest alias dla każdej NAZWY, dla " +"której\n" +" podano WARTOŚĆ. Spacja na końcu WARTOŚCI powoduje, że podczas " +"rozwijania\n" +" tego aliasu podstawienie aliasów będzie przeprowadzone także dla\n" +" następnego słowa.\n" +" \n" +" Opcje:\n" +" -p\twypisanie wszystkich zdefiniowanych aliasów w formacie do\n" +" \tponownego użycia\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie alias zwraca prawdę, chyba że poda się NAZWĘ, dla której nie\n" +" zdefiniowano aliasu." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Usuwa wszystkich NAZW z listy zdefiniowanych aliasów.\n" +" \n" +" Opcje:\n" +" -a\tusunięcie wszystkich definicji aliasów\n" +" \n" +" Zwracana jest prawda, chyba że NAZWA nie jest istniejącym aliasem." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Ustawianie przypisań klawiszy i zmiennych Readline.\n" +" \n" +" Przypisanie sekwencji klawiszy do funkcji Readline lub makra albo\n" +" ustawienie zmiennej Readline. Składnia pozbawiona opcji jest równoważna\n" +" stosowanej w ~/.inputrc, ale musi być przekazana jako jeden argument, " +"np.:\n" +" bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Opcje:\n" +" -m MAPA Użycie MAPY jako mapy klawiatury na czas tego\n" +" polecenia. Dozwolone nazwy map klawiatury to " +"emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command i vi-insert.\n" +" -l Wypisanie nazw funkcji.\n" +" -P Wypisanie nazw funkcji i dowiązań.\n" +" -p Wypisanie funkcji i dowiązań w postaci nadającej " +"się\n" +" do użycia jako dane wejściowe.\n" +" -S Wypisanie sekwencji klawiszy wywołujących makra " +"oraz\n" +" ich wartości.\n" +" -s Wypisanie sekwencji klawiszy wywołujących makra " +"oraz\n" +" ich wartości w postaci nadającej się do użycia " +"jako\n" +" dane wejściowe.\n" +" -V Wypisanie nazw zmiennych i ich wartości.\n" +" -v Wypisanie nazw zmiennych i ich wartości w postaci\n" +" nadającej się do użycia jako dane wejściowe.\n" +" -q nazwa-funkcji Określenie, które klawisze wywołują zadaną " +"funkcję.\n" +" -u nazwa-funkcji Anulowanie wszystkich dowiązań dla klawiszy\n" +" przypisanych do funkcji o podanej nazwie.\n" +" -r sekwencja Usunięcie dowiązania dla SEKWENCJI klawiszy.\n" +" -f plik Odczyt dowiązań dla klawiszy z podanego PLIKU.\n" +" -x sekwencja:polecenie-powłoki\tPowoduje uruchomienie POLECENIA-" +"POWŁOKI\n" +" \t\t\t\tgdy wprowadzona zostanie podana SEKWENCJA klawiszy.\n" +" -X Lista sekwencji klawiszy przypisanych przez -x " +"oraz\n" +" powiązane polecenia w postaci nadającej się do " +"użycia\n" +" jako dane wejściowe.\n" +" \n" +" Stan wyjściowy:\n" +" bind zwraca 0, chyba że podano nieznaną opcję lub wystąpi błąd." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Wyjście z pętli for, while lub until.\n" +" \n" +" Wyjście z pętli FOR, WHILE lub UNTIL. Jeśli podano N, sterowanie " +"wychodzi\n" +" za N-tą zagnieżdżoną pętlę.\n" +" \n" +" Stan wyjściowy:\n" +" Instrukcja zwraca prawdę, chyba że N jest mniejsze niż 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Wznowienie pętli for, while lub until.\n" +" \n" +" Wznowienie następnej iteracji otaczającej pętli FOR, WHILE lub UNTIL.\n" +" Jeśli podano N, to wznawiana jest N-ta otaczająca pętla.\n" +" \n" +" Stan wyjściowy:\n" +" Instrukcja zwraca 0, chyba że N jest mniejsze niż 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Wywołanie polecenia wbudowanego powłoki.\n" +" \n" +" Wywołanie POLECENIA-WBUDOWANEGO z argumentami ARG bez wykonywania\n" +" wyszukiwania polecenia. Jest to przydatne w przypadku ponownego\n" +" implementowania polecenia wbudowanego jako funkcji powłoki i " +"wywoływania\n" +" polecenia wbudowanego z wewnątrz tej funkcji.\n" +" \n" +" Stan wyjściowy:\n" +" Instrukcja zwraca stan wyjściowy POLECENIA-WBUDOWANEGO lub fałsz, jeśli\n" +" POLECENIE-WBUDOWANE nie jest poleceniem wbudowanym powłoki." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Zwrócenie kontekstu wywołania bieżącej procedury.\n" +" \n" +" Bez WYRAŻENIA zwracane jest \"$linia $plik\". Z WYRAŻENIEM zwracane " +"jest\n" +" \"$linia $procedura $plik\"; dodatkowe informacje służą do " +"udostępnienia\n" +" śladu stosu.\n" +" \n" +" Wartość WYRAŻENIA określa o ile ramek wywołań względem bieżącej ramki\n" +" należy się cofnąć; numer najwyższej ramki to 0.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca 0, chyba że powłoka nie wykonuje funkcji lub WYRAŻENIE\n" +" jest nieprawidłowe." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Zmiana bieżącego katalogu powłoki.\n" +" \n" +" Zmiana bieżącego katalogu na KATALOG. Domyślnym KATALOGIEM jest wartość\n" +" zmiennej powłoki HOME.\n" +" \n" +" Zmienna CDPATH określa ścieżkę przeszukiwania w poszukiwaniu katalogu\n" +" zawierającego KATALOG. Alternatywne nazwy katalogów są w CDPATH " +"rozdzielone\n" +" dwukropkami (:). Pusta nazwa katalogu oznacza to samo, co katalog\n" +" bieżący. Jeśli KATALOG zaczyna się od ukośnika (/), to CDPATH nie\n" +" nie jest używane.\n" +" \n" +" Gdy katalog nie zostanie znaleziony, a ustawiona jest zmienna powłoki\n" +" `cdable_vars', to następuje próba użycia podanej nazwy jako nazwy " +"zmiennej.\n" +" Jeśli zmienna ta ma wartość, to jako KATALOG jest używana jej wartość.\n" +" \n" +" Opcje:\n" +" -L\twymuszenie śledzenia dowiązań symbolicznych: rozwiązanie\n" +" \t\tdowiązań w KATALOGU po przetworzeniu wszystkich `..'\n" +" -P\tkorzystanie z fizycznej struktury katalogów zamiast śledzenia\n" +" \t\tdowiązań symbolicznych: rozwiązanie dowiązań w KATALOGU przed\n" +" \t\tprzetworzeniem wszystkich `..'\n" +" -e\tjeśli podano opcję -P, a nie można określić bieżącego katalogu,\n" +" \t\tpolecenie kończy się stanem niezerowym\n" +" -@ na systemach obsługujących je, zaprezentowanie pliku mającego\n" +" \t\trozszerzone atrybuty jako katalogu zawierającego atrybuty pliku\n" +" \n" +" Domyślne jest śledzenie dowiązań symbolicznych, jak z opcją `-L'.\n" +" `..' jest przetwarzane przez usunięcie bezpośredniego poprzedniego\n" +" elementu ścieżki przed ukośnikiem lub początkiem KATALOGU.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca 0 jeśli katalog został zmieniony oraz $PWD zostało\n" +" zmienione pomyślnie w przypadku użycia -P; w przeciwnym razie zwraca\n" +" wartość niezerową." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Wypisanie nazwy bieżącego katalogu roboczego.\n" +" \n" +" Opcje:\n" +" -L\twypisanie wartości $PWD jeśli określa bieżący katalog roboczy\n" +" -P\twypisanie katalogu fizycznego, bez dowiązań symbolicznych\n" +" \n" +" Domyślnie `pwd' zachowuje się tak, jak z opcją `-L'.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca 0, chyba że podano nieprawidłową opcję lub katalog\n" +" bieżący nie może być odczytany." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Polecenie puste.\n" +" \n" +" Żadnego efektu; polecenie nic nie robi.\n" +" \n" +" Stan wyjściowy:\n" +" Zawsze zwracana jest prawda." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Zwrócenie wyniku pozytywnego.\n" +" \n" +" Stan wyjściowy:\n" +" Zawsze zwracana jest prawda." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Zwrócenie wyniku negatywnego.\n" +" \n" +" Stan wyjściowy:\n" +" Zawsze zwracany jest fałsz." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Wywołanie prostego polecenia lub wyświetlenie informacji o poleceniach.\n" +" \n" +" Uruchomienie POLECENIA z ARGUMENTAMI z pominięciem wyszukiwania funkcji\n" +" powłoki lub wyświetlenie informacji o podanych POLECENIACH. Może być " +"użyte\n" +" do wywołania poleceń z dysku jeśli już istnieje funkcja o danej nazwie.\n" +" \n" +" Opcje:\n" +" -p\tużycie domyślnej wartości PATH, pod którą powinny być wszystkie\n" +" \t\tstandardowe narzędzia\n" +" -v\twypisanie opisu POLECENIA w sposób podobny do polecenia `type'\n" +" -V\twypisanie szczegółowego opisu każdego POLECENIA\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca stan POLECENIA lub fałsz, jeśli POLECENIE nie zostało\n" +" znalezione." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Ustawienie wartości i atrybutów zmiennej.\n" +" \n" +" Deklaracja zmiennych i nadanie im wartości. Jeśli nie podano NAZW,\n" +" wyświetlane są atrybuty i wartości wszystkich zmiennych.\n" +" \n" +" Opcje:\n" +" -f\tograniczenie akcji lub wyświetlania do nazw i definicji funkcji\n" +" -F\tograniczenie wyświetlania tylko do nazw funkcji (oraz numeru\n" +" \t\tlinii i pliku źródłowego w przypadku diagnostyki)\n" +" -g\ttworzenie zmiennych globalnych w przypadku użycia w funkcji\n" +" \t\tpowłoki; w przeciwnym wypadku ignorowane\n" +" -p\twyświetlenie atrybutów i wartości dla każdej NAZWY\n" +" \n" +" Opcje ustawiające atrybuty:\n" +" -a\tczyni NAZWĘ tablicą indeksowaną (jeśli są one obsługiwane)\n" +" -A\tczyni NAZWĘ tablicą asocjacyjną (jeśli są one obsługiwane)\n" +" -i\tnadaje NAZWIE atrybut `integer' (zmiennej całkowitej)\n" +" -l\tprzekształca wartość każdej NAZWY na małe litery przy przypisaniu\n" +" -n\tczyni NAZWĘ odwołaniem do zmiennej o nazwie wskazanej przez " +"wartość\n" +" -r\tczyni NAZWĘ tylko do odczytu\n" +" -t\tnadaje NAZWIE atrybut `trace'\n" +" -u\tprzekształca wartość każdej NAZWY na wielkie litery przy " +"przypisaniu\n" +" -x\teksportuje NAZWĘ\n" +" \n" +" Użycie `+' zamiast `-' wyłącza podany atrybut.\n" +" \n" +" Zmienne z atrybutem `integer' mają obliczaną wartość arytmetyczną\n" +" (jak w poleceniu `let') podczas przypisywania wartości.\n" +" \n" +" W przypadku użycia w funkcji `declare' czyni NAZWĘ lokalną, podobnie\n" +" jak polecenie `local'. Opcja `-g' zmienia to zachowanie.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca prawdę, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Ustawienie wartości i atrybutów zmiennej.\n" +" \n" +" Synonim `declare' - p. `help declare'." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definiowanie zmiennych lokalnych.\n" +" \n" +" Utworzenie zmiennej lokalnej o podanej NAZWIE i nadanie jej WARTOŚCI.\n" +" OPCJA może być dowolną opcją przyjmowaną przez `declare'.\n" +" \n" +" Zmienne lokalne mogą być używane tylko w funkcji; są widoczne wyłącznie\n" +" w funkcji, w której zostały zdefiniowanej, oraz jej potomkach.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję, wystąpi błąd przy\n" +" przypisaniu zmiennej lub powłoka nie wykonuje żadnej funkcji." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Wypisanie argumentów na standardowym wyjściu.\n" +" \n" +" Wypisanie na standardowym wyjściu argumentów ARG oddzielonych " +"pojedynczymi\n" +" spacjami oraz znaku końca linii.\n" +" \n" +" Opcje:\n" +" -n\tniedołączanie znaku końca linii\n" +" -e\twłączenie interpretowania poniższych znaków poprzedzonych\n" +" \todwrotnym ukośnikiem\n" +" -E\twyłączenie interpretowania poniższych znaków poprzedzonych\n" +" \todwrotnym ukośnikiem\n" +" \n" +" `echo' interpretuje następujące znaki poprzedzone odwrotnym ukośnikiem:\n" +" \\a\talarm (dzwonek)\n" +" \\b\tcofnięcie\n" +" \\c\tpominięcie dalszego wyjścia (w tym znaku nowego wiersza)\n" +" \\e\tznak ESCAPE\n" +" \\E\tznak ESCAPE\n" +" \\f\twysuw strony\n" +" \\n\tnowy wiersz\n" +" \\r\tpowrót karetki\n" +" \\t\ttabulacja pozioma\n" +" \\v\ttabulacja pionowa\n" +" \\\\\todwrotny ukośnik\n" +" \\0nnn\tznak o kodzie ASCII NNN (ósemkowo). NNN może stanowić od\n" +" \t\t0 do 3 cyfr ósemkowych\n" +" \\xHH\tznak ośmiobitowy o wartości HH (szesnastkowo). HH może być\n" +" \t\tjedną lub dwiema cyframi szesnastkowymi\n" +" \\uHHHH\tznak Unicode o wartości HHHH (szesnastkowo). HHHH może mieć\n" +" \t\tod jednej do czterech cyfr szesnastkowych.\n" +" \\UHHHHHHHH znak Unicode o wartości HHHHHHHH (szesnastkowo). HHHHHHHH\n" +" \t\tmoże mieć od jednej do ośmiu cyfr szesnastkowych.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że wystąpi błąd zapisu." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Wypisanie argumentów na standardowym wyjściu.\n" +" \n" +" Wypisanie na standardowym wyjściu argumentów ARG i znaku końca linii.\n" +" \n" +" Opcje:\n" +" -n\tniedołączanie znaku końca linii\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że wystąpi błąd zapisu." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Włączanie i wyłączanie poleceń wbudowanych powłoki.\n" +" \n" +" Włączanie i wyłączanie poleceń wbudowanych powłoki. Wyłączenie pozwala\n" +" na wykonanie polecenia z dysku, mającego tę samą nazwę, co polecenie\n" +" wbudowane bez używania pełnej ścieżki.\n" +" \n" +" Opcje:\n" +" -a\twypisanie listy poleceń wbudowanych z informacją, które są " +"włączone\n" +" -n\twyłączenie każdej NAZWY lub wypisanie listy wyłączonych poleceń\n" +" -p\twypisanie listy poleceń w formacie do ponownego użycia\n" +" -s\twypisanie tylko nazw posiksowych \"specjalnych\" poleceń " +"wbudowanych\n" +" \n" +" Opcje sterujące dynamicznym ładowaniem:\n" +" -f\tWczytanie polecenia wbudowanego NAZWA z obiektu współdzielonego " +"PLIK\n" +" -d\tUsunięcie polecenia wczytanego przez -f\n" +" \n" +" Bez opcji włączana jest każda NAZWA.\n" +" \n" +" Aby użyć polecenia `test' z $PATH zamiast wersji wbudowanej, należy\n" +" wykonać `enable -n test'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że NAZWA nie jest poleceniem wbudowanym lub\n" +" wystąpi błąd." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Wykonanie argumentów jako polecenia powłoki.\n" +" \n" +" Połączenie argumentów ARG w pojedynczy łańcuch, użycie rezultatu jako\n" +" wejścia dla powłoki i wykonanie wynikowych poleceń.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest stan wyjściowy polecenia lub prawdę, jeśli polecenie jest\n" +" puste." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Analiza opcji z argumentów.\n" +" \n" +" Polecenie getopts jest używane przez procedury powłoki przy " +"analizowaniu\n" +" parametrów pozycyjnych jako opcji.\n" +" \n" +" ŁAŃCUCH-OPCJI zawiera litery opcji, które mają być rozpoznane; jeśli po\n" +" literze następuje dwukropek, opcja wymaga argumentu, który powinien być\n" +" oddzielony od opcji spacją.\n" +" \n" +" Przy każdym wywołaniu getopts umieszcza następną opcję w zmiennej " +"powłoki\n" +" $nazwa, inicjując ją, jeśli nie istnieje; natomiast indeks następnego\n" +" argumentu do przetworzenia jest umieszczany w zmiennej powłoki OPTIND\n" +" OPTIND jest inicjowany wartością 1 przy każdym wywołaniu powłoki lub\n" +" skryptu powłoki. Jeśli opcja wymaga argumentu, getopts umieszcza ten\n" +" argument w zmiennej powłoki OPTARG.\n" +" \n" +" getopts zgłasza błędy na jeden z dwóch sposobów. Jeśli pierwszy znak\n" +" ŁAŃCUCHA-OPCJI jest dwukropkiem, getopts wykorzystuje ciche zgłaszanie\n" +" błędów. W tym trybie komunikaty błędów nie są wypisywane. Jeśli " +"napotkana\n" +" zostanie błędna opcja, getopts umieszcza znak opcji w OPTARG. Jeśli\n" +" nie znaleziono wymaganego argumentu, getopts umieszcza znak ':' w " +"NAZWIE\n" +" i ustawia OPTARG na napotkany znak opcji. Jeśli getopts nie jest w " +"trybie\n" +" cichym i napotkana zostanie błędna opcja, getopts umieszcza znak '?'\n" +" w NAZWIE i anuluje OPTARG. Jeśli nie znaleziono wymaganego argumentu,\n" +" w NAZWIE umieszczany jest znak '?', OPTARG jest anulowany i wypisywany\n" +" jest komunikat diagnostyczny.\n" +" \n" +" Jeśli zmienna powłoki OPTERR ma wartość 0, getopts wyłącza wypisywanie\n" +" komunikatów błędów, nawet jeśli pierwszym znakiem ŁAŃCUCHA-OPCJI nie " +"jest\n" +" dwukropek. OPTERR domyślnie ma wartość 1.\n" +" \n" +" Polecenie getopts normalnie przetwarza parametry pozycyjne ($0 - $9), " +"ale\n" +" jeśli podano więcej argumentów, są one przetwarzane zamiast nich.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, jeśli napotkano opcję; fałsz, jeśli wystąpi " +"koniec\n" +" opcji lub błąd." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Zastąpienie powłoki podanym poleceniem.\n" +" \n" +" Wywoływane jest POLECENIE, zastępując tę powłokę podanym programem.\n" +" ARGUMENTY stają się argumentami POLECENIA. Jeśli nie podano POLECENIA,\n" +" wszystkie podane przekierowania odnoszą skutek dla bieżącej powłoki.\n" +" \n" +" Opcje:\n" +" -a nazwa\tprzekazanie NAZWY jako zerowego argumentu POLECENIA\n" +" -c\twywołanie POLECENIA z pustym środowiskiem\n" +" -l\tumieszczenie kreski w zerowym argumencie POLECENIA\n" +" \n" +" Jeśli polecenia nie można wywołać, powłoka nieinteraktywna kończy się,\n" +" chyba że ustawiona jest opcja powłoki `execfail'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że nie uda się znaleźć POLECENIA lub " +"wystąpi\n" +" błąd przekierowania." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Opuszczenie powłoki.\n" +" \n" +" Opuszczenie powłoki z kodem zakończenia N. Jeśli N pominięto, kodem\n" +" zakończenia będzie kod zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Opuszczenie powłoki logowania.\n" +" \n" +" Opuszczenie powłoki logowania z kodem zakończenia N. Zwraca błąd, jeśli\n" +" powłoka nie jest powłoką logowania." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Wyświetlanie lub wykonywanie poleceń z listy historii.\n" +" \n" +" fc służy do wypisywania, edycji i ponownego uruchamiania poleceń z " +"listy\n" +" historii. PIERWSZY i OSTATNI jako liczby określają zakres lub PIERWSZY\n" +" jako napis oznacza najpóźniej wykonywane polecenie zaczynające się od " +"tego\n" +" napisu.\n" +" \n" +" Opcje:\n" +" -e NAZWA-ED\tokreśla edytor, który ma być używany. Domyślnymi\n" +" \twartościami są: najpierw FCEDIT, potem EDITOR, a na końcu vi\n" +" -l\twypisywanie wierszy zamiast ich edycji\n" +" -n\tniewypisywanie numerów wierszy\n" +" -r\todwrócenie kolejności wierszy (czyniąc najnowsze wypisane\n" +" \tpolecenie pierwszym)\n" +" \n" +" Przy wywołaniu polecenia w postaci `fc -s [wz=zam ...] [polecenie]',\n" +" jest ono wywoływane ponownie po wykonaniu podstawienia WZ=ZAM.\n" +" \n" +" Przydatnym aliasem korzystającym z tego jest r='fc -s' tak, że " +"napisanie\n" +" `r cc' uruchamia ostatnie polecenie zaczynające się od `cc', a " +"napisanie\n" +" `r' uruchamia ponownie ostatnie polecenie.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda lub stan wykonanego polecenia; wartość niezerowa\n" +" w przypadku błędu." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Przeniesienie zadania na pierwszy plan.\n" +" \n" +" Umieszczenie ZADANIA na pierwszym planie oraz uczynienie go bieżącym\n" +" zadaniem. Jeśli nie określono ZADANIA, użyte zostanie zadanie bieżące\n" +" w rozumieniu powłoki.\n" +" \n" +" Stan wyjściowy:\n" +" Stan zadania umieszczonego na pierwszym planie lub fałsz, jeśli wystąpi\n" +" błąd." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Przeniesienie zadań w tło.\n" +" \n" +" Umieszczenie wszystkich ZADAŃ w tle tak, jakby zostały uruchomione\n" +" z `&'. Jeśli nie określono ZADAŃ, użyte zostanie zadanie bieżące\n" +" w rozumieniu powłoki.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że sterowanie zadaniami nie jest włączone\n" +" lub wystąpi błąd." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Zapamiętanie lub wypisanie położenia programów.\n" +" \n" +" Określenie i zapamiętanie pełnej ścieżki każdego polecenia NAZWA. Jeśli\n" +" nie podano argumentów, wyświetlane są informacje o zapamiętanych\n" +" poleceniach.\n" +" \n" +" Opcje:\n" +" -d\tzapomnienie położenia każdej NAZWY\n" +" -l\twypisanie w formacie do wykorzystania jako wejście\n" +" -p ścieżka\tużycie ŚCIEŻKI jako pełnej ścieżki NAZWY\n" +" -r\tzapomnienie wszystkich pamiętanych położeń\n" +" -t\twypisanie pamiętanych położeń każdej NAZWY poprzedzając\n" +" \t\tkażde położenie odpowiednią NAZWĄ, jeśli podano wiele NAZW\n" +" Argumenty:\n" +" NAZWA\tKażda nazwa jest wyszukiwana w $PATH i dodawana do listy\n" +" \t\tpamiętanych poleceń.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że nie znaleziono NAZWY lub podano błędną\n" +" opcję." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Wyświetlenie informacji o poleceniach wbudowanych.\n" +" \n" +" Wyświetlenie krótkiego przeglądu poleceń wbudowanych. Jeśli podano\n" +" WZORZEC, wypisywany jest szczegółowy opis wszystkich poleceń pasujących " +"do\n" +" WZORCA, w przeciwnym wypadku - lista tematów.\n" +" \n" +" Opcje:\n" +" -d\twypisanie krótkiego opisu każdego tematu\n" +" -m\twyświetlenie sposobu użycia w formacie zbliżonym do stron man\n" +" -s\twypisanie tylko krótkiej informacji o składni dla każdego\n" +" \t\ttematu pasującego do WZORCA\n" +" \n" +" Argumenty:\n" +" WZORZEC\tWzorzec określający temat pomocy\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że WZORCA nie znaleziono lub podano błędną\n" +" opcję." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Wyświetlanie i modyfikowanie listy historii.\n" +" \n" +" Wyświetlanie listy historii z numerami linii z oznaczeniem każdej\n" +" zmodyfikowanej linii przedrostkiem `*'. Podanie argumentu N wypisuje\n" +" tylko ostatnich N wpisów.\n" +" \n" +" Opcje:\n" +" -c\twyczyszczenie listy historii poprzez usunięcie wszystkich wpisów\n" +" -d offset\tusunięcie wpisu historii o podanym OFFSECIE. Ujemne " +"offsety\n" +" \t\tliczą się wstecz od końca listy historii\n" +" \n" +" -a\tdołączenie linii historii z tej sesji do pliku historii\n" +" -n\todczyt wszystkich jeszcze nie przeczytanych linii z pliku\n" +" \t\thistorii i dołączenie ich do listy historii\n" +" -r\todczyt pliku historii i dołączenie zawartości do listy historii\n" +" -w\tzapis bieżącej historii do pliku historii\n" +" \n" +" -p\trozwinięcie wg historii każdego ARG i wypisanie wyniku bez\n" +" \t\tzapisywania go na liście historii\n" +" -s\tdołączenie wszystkich ARG do listy historii jako pojedynczych\n" +" \t\twpisów\n" +" \n" +" Jeśli podano PLIK, jest używany jako plik historii. W przeciwnym " +"wypadku\n" +" używany jest $HISTFILE, a jeśli ta zmienna nie jest ustawiona -\n" +" ~/.bash_history.\n" +" \n" +" Jeśli zmienna $HISTTIMEFORMAT jest ustawiona i niepusta, jej wartość " +"jest\n" +" używana jako łańcuch formatujący dla strftime(3) do wypisywania momentu\n" +" czasu powiązanego z każdym wypisywanym wpisem. W przeciwnym wypadku " +"czas\n" +" nie jest wypisywany.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Wyświetlenie stanu zadań.\n" +" \n" +" Wypisanie aktywnych zadań. ZADANIE ogranicza wyjście tylko do tego " +"zadania.\n" +" Bez opcji wypisywany jest stan wszystkich aktywnych zadań.\n" +" \n" +" Opcje:\n" +" -l\twypisanie dodatkowo numerów PID procesów\n" +" -n\twypisanie tylko procesów, które zmieniły stan od ostatniego\n" +" \t\tpowiadomienia\n" +" -p\twypisanie tylko numerów PID procesów\n" +" -r\tograniczenie wyjścia do zadań działających\n" +" -s\tograniczenie wyjścia do zadań zatrzymanych\n" +" \n" +" Przy podaniu -x, uruchamiane jest podane POLECENIE po zastąpieniu\n" +" każdej z występujących w argumentach ARG specyfikacji zadań numerem PID\n" +" procesu wiodącego danego zadania.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd.\n" +" Jeśli użyto -x, zwracany jest stan wyjściowy POLECENIA." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Usunięcie poleceń z bieżącej powłoki.\n" +" \n" +" Usunięcie każdego podanego ZADANIA z tablicy aktywnych zadań. Bez\n" +" podania ZADANIA powłoka używa pojęcia bieżącego zadania.\n" +" \n" +" Opcje:\n" +" -a\tusunięcie wszystkich zadań, jeśli nie podano ZADANIA\n" +" -h\toznaczenie każdego zadania tak, że SIGHUP nie jest wysyłany do\n" +" \t\tzadania, jeśli powłoka otrzyma SIGHUP\n" +" -r\tusunięcie tylko działających zadań\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub ZADANIE." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Wysłanie sygnału do zadania.\n" +" \n" +" Wysłanie do procesów określonych przez PID lub ZADANIE sygnału o nazwie\n" +" SYGNAŁ lub NUMERZE-SYGNAŁU. Jeśli nie podano SYGNAŁU ani NUMERU-" +"SYGNAŁU,\n" +" przyjmowany jest SIGTERM.\n" +" \n" +" Opcje:\n" +" -s SYG\tSYG jest nazwą sygnału\n" +" -n SYG\tSYG jest numerem sygnału\n" +" -l\tlista nazw sygnałów; jeśli `-l' występuje z argumentami, są one\n" +" \t\ttraktowane jako numery sygnałów, dla których mają być wypisane " +"nazwy\n" +" -L\tsynonim -l\n" +" \n" +" Kill jest poleceniem wewnętrznym z dwóch powodów: umożliwia korzystanie\n" +" z identyfikatorów zadań zamiast numerów PID oraz, w przypadku " +"osiągnięcia\n" +" ograniczenia na liczbę procesów, nie powoduje potrzeby uruchamiania\n" +" dodatkowego procesu, aby jakiś zabić.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest sukces, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Obliczanie wyrażeń arytmetycznych.\n" +" \n" +" Obliczenie każdego argumentu ARG jako wyrażenia arytmetycznego. " +"Obliczenia\n" +" są wykonywane dla liczb całkowitych o stałej długości bez sprawdzania\n" +" przepełnienia, jednakże dzielenie przez 0 jest przechwytywane i " +"oznaczane\n" +" jako błąd. Poniższa lista operatorów jest pogrupowana na poziomy\n" +" operatorów o jednakowym priorytecie. Poziomy są wypisane w kolejności\n" +" malejącego priorytetu.\n" +" \n" +" \tid++, id--\tpost-inkrementacja, post-dekrementacja zmiennej\n" +" \t++id, --id\tpre-inkrementacja, pre-dekrementacja zmiennej\n" +" \t-, +\t\tjednoargumentowy minus, plus\n" +" \t!, ~\t\tlogiczna i bitowa negacja\n" +" \t**\t\tpotęgowanie\n" +" \t*, /, %\t\tmnożenie, dzielenie, reszta z dzielenia\n" +" \t+, -\t\tdodawanie, odejmowanie\n" +" \t<<, >>\t\tprzesunięcie bitowe w lewo i w prawo\n" +" \t<=, >=, <, >\tporównanie\n" +" \t==, !=\t\trówność, nierówność\n" +" \t&\t\tbitowe AND\n" +" \t^\t\tbitowe XOR\n" +" \t|\t\tbitowe OR\n" +" \t&&\t\tlogiczne AND\n" +" \t||\t\tlogiczne OR\n" +" \texpr ? expr : expr\n" +" \t\t\toperator warunkowy\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tprzypisanie\n" +" \n" +" Jako operandy mogą występować zmienne powłoki. Nazwa zmiennej jest\n" +" zastępowana w w wyrażeniu jej wartością (po konwersji do liczby\n" +" całkowitej o stałej długości). Zmienna, aby mogła być użyta\n" +" w wyrażeniu, nie musi mieć ustawionego atrybutu integer.\n" +" \n" +" Operacje są wykonywane wg. priorytetów operatorów. Najpierw są\n" +" wykonywane podwyrażenia w nawiasach i mają one pierwszeństwo przed\n" +" powyższymi priorytetami operatorów.\n" +" \n" +" Stan wyjściowy:\n" +" Jeśli wartością ostatniego argumentu jest 0, let zwraca 1;\n" +" w pozostałych przypadkach zwracane jest 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Odczyt wiersza ze standardowego wejścia i podział go na pola.\n" +" \n" +" Odczytanie wiersza ze standardowego wejścia lub deskryptora FD (jeśli\n" +" podano opcję -u). Wiersz jest dzielony na pola wg reguł podziału na " +"słowa,\n" +" pierwsze słowo jest przypisywane pierwszej NAZWIE, drugie - drugiej " +"NAZWIE\n" +" itd.; wszystkie pozostałe słowa są przypisywane ostatniej NAZWIE. Jako\n" +" ograniczniki słów są rozpoznawane tylko znaki ze zmiennej $IFS.\n" +" \n" +" Jeśli nie podano NAZW, odczytany wiersz jest zapisywany w zmiennej " +"REPLY.\n" +" \n" +" Opcje:\n" +" -a tablica\tprzypisanie odczytanych słów do indeksów sekwencyjnych\n" +" \t\tzmiennej tablicowej TABLICA, począwszy od zera\n" +" -d ogr\tkontynuacja do odczytu pierwszego znaku OGR zamiast znaku " +"nowej\n" +" \t\tlinii\n" +" -e\tużycie Readline'a do odczytania wiersza\n" +" -o tekst\tużycie TEKSTU jako początkowego tekstu dla Readline'a\n" +" -n liczba\tpowrót po odczycie LICZBY znaków zamiast oczekiwania na\n" +" \t\tznak nowej linii; ogranicznik jest honorowany, jeśli odczytano " +"mniej\n" +" \t\tniż podana LICZBA znaków przed ogranicznikiem\n" +" -N liczba\tpowrót tylko po odczycie dokładnie podanej LICZBY znaków,\n" +" \t\tchyba że zostanie napotkany EOF lub opłynie czas; ograniczniki są\n" +" \t\tignorowane\n" +" -p zachęta\twypisanie łańcucha ZACHĘTY bez końcowego znaku nowej " +"linii\n" +" \t\tprzed próbą odczytu\n" +" -r\twyłączenie interpretowania odwrotnych ukośników jako przedrostka\n" +" \t\tznaków specjalnych\n" +" -s\tbez wypisywania wejścia pochodzącego z terminala\n" +" -t czas\tzakończenie i zwrócenie niepowodzenia, jeśli nie zostanie\n" +" \t\todczytany cały wiersz przed upłynięciem podanego CZASU (w " +"sekundach).\n" +" \t\tWartość zmiennej TMOUT jest domyślnym limitem czasu. CZAS może być\n" +" \t\tułamkowy. Przy wartości 0 odczyt powiedzie się tylko wtedy, gdy\n" +" \t\twejście jest dostępne na podanym deskryptorze. Kod (stan) wyjściowy\n" +" \t\tw przypadku osiągnięcia limitu czasu jest większy niż 128\n" +" -u fd\todczyt z deskryptora pliku FD zamiast ze standardowego wejścia\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest wartość 0, chyba że zostanie napotkany koniec pliku,\n" +" osiągnięty limit czasu (w tym przypadku jest większy niż 128), wystąpi\n" +" błąd przypisania zmiennej albo podano nieprawidłowy deskryptor dla\n" +" argumentu -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Powrót z funkcji powłoki.\n" +" \n" +" Polecenie powoduje, że funkcja lub włączony skrypt kończy się zwracając\n" +" wartość podaną jako N. Jeśli pominięto N, stanem wyjściowym będzie stan\n" +" ostatniego polecenia wykonanego w funkcji lub skrypcie.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracane jest N lub niepowodzenie, jeśli powłoka nie wykonuje żadnej\n" +" funkcji ani skryptu." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Ustawianie lub anulowanie opcji powłoki i parametrów pozycyjnych.\n" +" \n" +" Zmiana wartości atrybutów powłoki i parametrów pozycyjnych lub\n" +" wyświetlenie nazw i wartości zmiennych powłoki.\n" +" \n" +" Opcje:\n" +" -a Oznaczenie zmiennych, które zostały zmodyfikowane lub utworzone\n" +" jako eksportowane.\n" +" -b Natychmiastowe powiadomienie o zakończeniu zadania.\n" +" -e Natychmiastowe zakończenie, gdy polecenie zakończy się z\n" +" niezerowym stanem (kodem powrotu).\n" +" -f Wyłączenie generowania nazw plików (globbing).\n" +" -h Pamiętanie położenia znalezionych poleceń.\n" +" -k Umieszczanie w środowisku polecenia wszystkich argumentów\n" +" o postaci przypisania, nie tylko tych, które poprzedzają nazwę\n" +" polecenia.\n" +" -m Włączenie kontroli zadań.\n" +" -n Czytanie poleceń bez wykonywania ich.\n" +" -o nazwa-opcji\n" +" Ustawienie zmiennej odpowiadającej nazwa-opcji:\n" +" allexport to samo, co -a\n" +" braceexpand to samo, co -B\n" +" emacs korzystanie z interfejsu edycji wiersza w stylu\n" +" emacsa\n" +" errexit to samo, co -e\n" +" errtrace to samo, co -E\n" +" functrace to samo, co -T\n" +" hashall to samo, co -h\n" +" histexpand to samo, co -H\n" +" history włączenie historii poleceń\n" +" ignoreeof niekończenie powłoki po odczytaniu EOF\n" +" interactive-comments\n" +" zezwolenie na wystąpienie komentarzy\n" +" w poleceniach interaktywnych\n" +" keyword to samo, co -k\n" +" monitor to samo, co -m\n" +" noclobber to samo, co -C\n" +" noexec to samo, co -n\n" +" noglob to samo, co -f\n" +" nolog aktualnie akceptowane ale ignorowane\n" +" notify to samo, co -b\n" +" nounset to samo, co -u\n" +" onecmd to samo, co -t\n" +" physical to samo, co -P\n" +" pipefail kodem powrotu potoku jest kod powrotu ostatniego\n" +" polecenia kończącego się z niezerowym kodem lub\n" +" zero, gdy żadne polecenie nie zakończyło się z\n" +" niezerowym kodem powrotu\n" +" posix zmiana zachowania basha, gdy standardowe\n" +" zachowanie operacji różni się od standardu\n" +" POSIX na zgodne ze standardem\n" +" privileged to samo, co -p\n" +" verbose to samo, co -v\n" +" vi korzystanie z interfejsu edycji wiersza w stylu " +"vi\n" +" xtrace to samo, co -x\n" +" -p Włączone, gdy nie zgadzają się rzeczywisty i efektywny ID\n" +" użytkownika. Wyłącza przetwarzanie pliku $ENV oraz import " +"funkcji\n" +" powłoki. Wyłączenie tej opcji powoduje, że efektywne UID i GID\n" +" zostaną ustawione na rzeczywiste UID i GID.\n" +" -t Zakończenie po przeczytaniu i uruchomieniu jednego polecenia.\n" +" -u Traktowanie podczas podstawienia nieustawionych zmiennych jako\n" +" błędów.\n" +" -v Wypisywanie wejścia powłoki tak, jak zostało przeczytane.\n" +" -x Wypisywanie poleceń i ich argumentów tak, jak są uruchamiane.\n" +" -B Przeprowadzanie przez powłokę rozwijania nawiasów.\n" +" -C Gdy ustawione, niepozwalanie na nadpisywanie istniejących\n" +" zwykłych plików przez przekierowanie wyjścia.\n" +" -E Gdy ustawione, dziedziczenie pułapki ERR przez funkcje powłoki.\n" +" -H Włączenie podstawienia historii w stylu `!'. Znacznik ten jest\n" +" domyślnie włączony dla powłoki interaktywnej.\n" +" -P Gdy ustawione, nierozwiązywanie dowiązań symbolicznych podczas\n" +" uruchamiania poleceń takich, jak cd, które zmieniają katalog\n" +" bieżący.\n" +" -T Gdy ustawione, dziedziczenie pułapek DEBUG i RETURN przez " +"funkcje.\n" +" -- Przypisanie pozostałych argumentów do parametrów pozycyjnych.\n" +" Jeśli nie ma więcej argumentów, parametry pozycyjne są anulowane.\n" +" - Przypisanie pozostałych argumentów do argumentów pozycyjnych.\n" +" Wyłączenie opcji -x i -v.\n" +" \n" +" Użycie + zamiast - powoduje wyłączenie powyższych znaczników. Można z " +"nich\n" +" także korzystać przy uruchomieniu powłoki. Aktualny zestaw opcji można\n" +" znaleźć w $-. Pozostałe n argumentów staje się parametrami pozycyjnymi\n" +" i są one przypisane, kolejno, do $1, $2, .. $n. Gdy nie zostaną podane\n" +" żadne argumenty, wypisywane są wszystkie zmienne powłoki.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano nieprawidłową opcję." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Anulowanie wartości i atrybutów zmiennych i funkcji powłoki.\n" +" \n" +" Usunięcie zmiennych i funkcji o podanych NAZWACH.\n" +" \n" +" Opcje:\n" +" -f\tpotraktowanie wszystkich NAZW jako funkcji powłoki\n" +" -v\tpotraktowanie wszystkich NAZW jako zmiennych powłoki\n" +" -n\tpotraktowanie wszystkich NAZW jako referencji do nazw\n" +" \t\ti anulowanie samej zmiennej zamiast tej, do której się odnosi\n" +" \n" +" Bez opcji unset próbuje najpierw anulować definicję zmiennej, a jeśli " +"to\n" +" się nie powiedzie, próbuje anulować definicję funkcji.\n" +" \n" +" Niektórych zmiennych nie można usunąć - p. `readonly'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub NAZWA jest tylko " +"do\n" +" odczytu." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Ustawienie atrybutu eksportowania dla zmiennych powłoki.\n" +" \n" +" Zaznaczenie każdej NAZWY do automatycznego eksportowania do środowiska\n" +" później wywoływanych poleceń. Jeśli podano WARTOŚĆ, jest ona " +"przypisywana\n" +" przed eksportowaniem.\n" +" \n" +" Opcje:\n" +" -f\tdziałanie na funkcjach powłoki\n" +" -n\tusunięcie atrybutu eksportowania z każdej NAZWY\n" +" -p\twyświetlenie listy wszystkich eksportowanych zmiennych i funkcji\n" +" \n" +" Argument `--' kończy dalsze przetwarzanie opcji.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano nieprawidłową opcję lub NAZWĘ." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Oznaczenie zmiennych powłoki jako niezmiennych.\n" +" \n" +" Oznaczenie każdej NAZWY jako tylko do odczytu; wartości tych NAZW nie " +"mogą\n" +" być zmieniane przez późniejsze podstawienia. Jeśli podano WARTOŚĆ, jest\n" +" ona przypisywana przed oznaczeniem jako tylko do odczytu.\n" +" \n" +" Opcje:\n" +" -a\tdziałanie na zmiennych tablicowych indeksowanych\n" +" -A\tdziałanie na zmiennych tablicowych asocjacyjnych\n" +" -f\tdziałanie na funkcjach powłoki\n" +" -p\twyświetlenie listy wszystkich zmiennych lub funkcji tylko do " +"odczytu,\n" +" \t\tw zależności od tego, czy podano opcję -f\n" +" \n" +" Argument `--' wyłącza dalsze przetwarzanie opcji.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano nieprawidłową opcję lub NAZWĘ." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Przesunięcie argumentów pozycyjnych.\n" +" \n" +" Zmiana nazw argumentów pozycyjnych $N+1,$N+2 ... na $1,$2 ...\n" +" Jeśli nie podano N, przyjmuje się 1.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że N jest ujemne lub większe niż $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Wykonanie poleceń z pliku w bieżącej powłoce.\n" +" \n" +" Odczytanie i uruchomienie poleceń z PLIKU w bieżącej powłoce. Do\n" +" znalezienia katalogu zawierającego PLIK używane są ścieżki zawarte\n" +" w $PATH. Jeśli podane zostaną jakiekolwiek ARGUMENTY, stają się\n" +" parametrami pozycyjnymi podczas uruchomienia PLIKU.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest stan ostatnio wykonanego polecenia z PLIKU lub błąd, " +"jeśli\n" +" PLIKU nie udało się odczytać." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Wstrzymanie wykonywania powłoki.\n" +" \n" +" Wstrzymanie wykonywania danego skryptu do czasu otrzymania sygnału\n" +" SIGCONT. Jeśli nie podano opcji wymuszenia, powłoki logowania nie można\n" +" wstrzymać.\n" +" \n" +" Opcje:\n" +" -f\twymuszenie wstrzymania, nawet jeśli powłoka jest powłoką " +"logowania\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że kontrola zadań jest wyłączona lub " +"wystąpi\n" +" błąd." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Obliczenie wyrażenia warunkowego.\n" +" \n" +" Polecenie zwracające kod 0 (prawda) lub 1 (fałsz) w zależności od " +"wyniku\n" +" obliczenia WYRAŻENIA. Wyrażenia mogą mieć postać jedno- lub " +"dwuargumentową.\n" +" Jednoargumentowe wyrażenia służą zwykle do badania stanu pliku. " +"Istnieją\n" +" również operatory działające na łańcuchach tekstowych, jak też " +"operatory\n" +" numerycznego porównania.\n" +" \n" +" Zachowanie polecenia test zależy od liczby argumentów. Pełną " +"specyfikację\n" +" można znaleźć w podręczniku man do basha.\n" +" \n" +" Operatory plikowe:\n" +" \n" +" -a PLIK Prawda, gdy PLIK istnieje.\n" +" -b PLIK Prawda, gdy PLIK jest plikiem specjalnym urządzenia\n" +" blokowego.\n" +" -c PLIK Prawda, gdy PLIK jest plikiem specjalnym urządzenia\n" +" znakowego.\n" +" -d PLIK Prawda, gdy PLIK jest katalogiem.\n" +" -e PLIK Prawda, gdy PLIK istnieje.\n" +" -f PLIK Prawda, gdy PLIK istnieje i jest zwykłym plikiem.\n" +" -g PLIK Prawda, gdy PLIK ma ustawiony bit SGID.\n" +" -h PLIK Prawda, gdy PLIK jest dowiązaniem symbolicznym.\n" +" -L PLIK Prawda, gdy PLIK jest dowiązaniem symbolicznym.\n" +" -k PLIK Prawda, gdy PLIK ma ustawiony bit `sticky'.\n" +" -p PLIK Prawda, gdy PLIK jest nazwanym potokiem.\n" +" -r PLIK Prawda, gdy PLIK jest odczytywalny przez użytkownika.\n" +" -s PLIK Prawda, gdy PLIK istnieje i jest niepusty.\n" +" -S PLIK Prawda, gdy PLIK jest gniazdem.\n" +" -t FD Prawda, gdy deskryptor FD jest otwarty na terminalu.\n" +" -u FILE Prawda, gdy PLIK ma ustawiony bit SUID.\n" +" -w FILE Prawda, gdy PLIK jest zapisywalny przez użytkownika.\n" +" -x FILE Prawda, gdy PLIK jest uruchamialny przez użytkownika.\n" +" -O FILE Prawda, gdy użytkownik jest efektywnym właścicielem " +"PLIKU.\n" +" -G FILE Prawda, grupa użytkownika jest efektywnym właścicielem\n" +" PLIKU.\n" +" -N FILE Prawda, gdy PLIK został zmodyfikowany po ostatnim\n" +" odczycie.\n" +" \n" +" PLIK1 -nt PLIK2 Prawda, gdy PLIK1 jest nowszy niż PLIK2 (porównując\n" +" czas ostatniej modyfikacji).\n" +" \n" +" PLIK1 -ot PLIK2 Prawda, gdy PLIK1 jest starszy niż PLIK2.\n" +" \n" +" PLIK1 -ef PLIK2 Prawda, gdy PLIK1 jest twardym dowiązaniem do PLIK2.\n" +" \n" +" Operatory łańcuchowe:\n" +" \n" +" -z ŁAŃCUCH Prawda, gdy ŁAŃCUCH jest pusty.\n" +" \n" +" -n ŁAŃCUCH\n" +" ŁAŃCUCH Prawda, gdy ŁAŃCUCH nie jest pusty.\n" +" \n" +" ŁAŃCUCH1 = ŁAŃCUCH2\n" +" Prawda, gdy ŁAŃCUCH1 i ŁAŃCUCH2 są równe.\n" +" ŁAŃCUCH1 != ŁAŃCUCH2\n" +" Prawda, gdy ŁAŃCUCH1 i ŁAŃCUCH2 nie są równe.\n" +" ŁAŃCUCH1 < ŁAŃCUCH2\n" +" Prawda, gdy ŁAŃCUCH1 znajduje się w porządku\n" +" leksykograficznym przed ŁAŃCUCHEM2.\n" +" ŁAŃCUCH1 > ŁAŃCUCH2\n" +" Prawda, gdy ŁAŃCUCH1 znajduje się w porządku\n" +" leksykograficznym po ŁAŃCUCHU2.\n" +" \n" +" Inne operatory:\n" +" \n" +" -o OPCJA Prawda, gdy podana OPCJA powłoki jest włączona.\n" +" -v ZMIENNA Prawda, gdy ZMIENNA powłoki jest ustawiona\n" +" -R ZMIENNA Prawda, gdy zmienna powłoki jest ustawiona i jest\n" +" referencją do nazwy\n" +" ! WYRAŻENIE Prawda, gdy WYRAŻENIE jest fałszywe.\n" +" WYR1 -a WYR2 Prawda, gdy zarówno WYR1, jak i WYR2 są prawdziwe.\n" +" WYR1 -o WYR2 Prawda, gdy WYR1 lub WYR2 jest prawdziwe.\n" +" \n" +" arg1 OP arg2 Testy arytmetyczne. OP jest jednym z operatorów:\n" +" -eq, -ne, -lt, -le, -gt lub -ge.\n" +" \n" +" Dwuargumentowe operatory arytmetyczne zwracają prawdę, gdy ARG1 jest\n" +" równy, nierówny, mniejszy niż, mniejszy lub równy, większy niż lub\n" +" większy lub równy ARG2.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, jeśli wartością WYRAŻENIA jest prawda; fałsz, gdy\n" +" wartością WYRAŻENIA jest fałsz lub podano błędny argument." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Obliczenie wyrażenia warunkowego.\n" +" \n" +" Jest to synonim dla wbudowanego polecenia \"test\", ale wymagający, by\n" +" ostatnim argumentem był `]' pasujący do początkowego `['." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Wyświetlenie czasów procesu.\n" +" \n" +" Wypisanie łącznych czasów w przestrzeni użytkownika i systemu dla " +"powłoki\n" +" i wszystkich procesów potomnych.\n" +" \n" +" Stan wyjściowy:\n" +" Zawsze prawda." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Przechwytywanie sygnałów i innych zdarzeń.\n" +" \n" +" Polecenie definiujące i włączające daną akcję w przypadku, kiedy " +"powłoka\n" +" otrzyma sygnał lub pod innymi warunkami.\n" +" \n" +" Gdy powłoka otrzyma podany SYGNAŁ (lub sygnały), odczytywane i " +"uruchamiane\n" +" jest polecenie podane jako argument ARG. W razie braku argumentu (i " +"podaniu\n" +" pojedynczego SYGNAŁU) lub gdy argumentem jest `-', każdemu z podanych\n" +" sygnałów jest przywracane pierwotne zachowanie. Jeśli ARG jest pustym\n" +" łańcuchem, każdy SYGNAŁ jest ignorowany przez powłokę i wywołane przez " +"nią\n" +" polecenia.\n" +" \n" +" Jeżeli jako SYGNAŁ podano EXIT (0), polecenie ARG jest uruchamiane przy\n" +" opuszczaniu powłoki. Jeśli jako SYGNAŁ podano DEBUG, ARG jest " +"uruchamiane\n" +" po każdym poleceniu prostym. Jeśli jako SYGNAŁ podano RETURN, ARG jest\n" +" uruchamiane przy każdym zakończeniu funkcji powłoki lub skryptu\n" +" uruchamianego przez polecenia wbudowane . lub source. Jeśli jako SYGNAŁ\n" +" podano ERR, ARG jest uruchamiane za każdym razem, kiedy niepowodzenie\n" +" polecenia spowodowałoby zakończenie powłoki w przypadku włączenia opcji -" +"e.\n" +" \n" +" Jeśli nie podano argumentów, trap wypisuje listę poleceń przypisanych " +"do\n" +" każdego sygnału.\n" +" \n" +" Opcje:\n" +" -l\twypisanie listy nazw sygnałów i ich numerów\n" +" -p\twypisanie poleceń trap powiązanych z każdym SYGNAŁEM\n" +" \n" +" Każdy podawany SYGNAŁ może być nazwą sygnału wg. lub numerem\n" +" sygnału. Nazwy sygnałów są niewrażliwe na wielkość liter, a prefiks SIG\n" +" jest opcjonalny. Sygnał do powłoki można wysłać poleceniem\n" +" \"kill -sygnał $$\".\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędny SYGNAŁ lub błędną opcję." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Wyświetlenie informacji o rodzaju polecenia.\n" +" \n" +" Określenie, w jaki sposób byłaby interpretowana każda NAZWA w przypadku\n" +" użycia jako polecenie.\n" +" \n" +" Opcje:\n" +" -a\twyświetlenie wszystkich położeń zawierających program wykonywalny\n" +" \t\to podanej NAZWIE; obejmuje aliasy, polecenia wbudowane i funkcje\n" +" \t\ttylko jeśli nie podano dodatkowo opcji `-p'\n" +" -f\tpominięcie wyszukiwania funkcji powłoki\n" +" -P\twymuszenie wyszukiwania w PATH każdej nazwy, nawet jeśli jest\n" +" \t\taliasem, poleceniem wbudowanym lub funkcją i zwrócenie nazwy pliku\n" +" \t\tna dysku\n" +" -p\tzwrócenie nazwy pliku na dysku lub niczego, jeśli `type -t NAZWA'\n" +" \t\tnie zwróciłoby `file'.\n" +" -t\tzwrócenie pojedynczego słowa: `alias', `keyword', `function',\n" +" \t\t`builtin', `file' lub `', jeśli nazwa jest odpowiednio: aliasem,\n" +" \t\tzarezerwowanym słowem kluczowym powłoki, funkcją powłoki, " +"poleceniem\n" +" \t\twbudowanym powłoki, plikiem na dysku lub nie zostanie znaleziona\n" +" \n" +" Argumenty:\n" +" NAZWA\tNazwa polecenia do zinterpretowania.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, jeśli każda NAZWA zostanie znaleziona; fałsz, " +"jeśli\n" +" którakolwiek nie zostanie znaleziona." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modyfikowanie limitów zasobów powłoki.\n" +" \n" +" Ulimit zapewnia kontrolę ilości zasobów udostępnionych powłoce i " +"procesom\n" +" w systemach, które taką kontrolę umożliwiają.\n" +" \n" +" Opcje:\n" +" -S\tkorzystanie z \"miękkiego\" limitu zasobów\n" +" -H\tkorzystanie ze \"sztywnego\" limitu zasobów\n" +" -a\twypisanie wszystkich aktualnych limitów\n" +" -b\trozmiar bufora dla gniazd\n" +" -c\tmaksymalny rozmiar tworzonych plików core\n" +" -d\tmaksymalny rozmiar segmentu danych procesu\n" +" -e\tmaksymalny priorytet szeregowania procesów (`nice')\n" +" -f\tmaksymalny rozmiar plików zapisywanych przez powłokę i jej " +"potomków\n" +" -i\tmaksymalna liczba oczekujących sygnałów\n" +" -k\tmaksymalna liczba kolejek jądra (kqueue) przydzielonych dla " +"procesu\n" +" -l\tmaksymalny rozmiar pamięci, którą proces może zablokować\n" +" -m\tmaksymalny rozmiar obszaru rezydentnego procesu\n" +" -n\tmaksymalna liczba otwartych deskryptorów plików\n" +" -p\trozmiar bufora potoku\n" +" -q\tmaksymalna liczba bajtów w POSIX-owych kolejkach komunikatów\n" +" -r\tmaksymalny priorytet szeregowania dla procesów czasu " +"rzeczywistego\n" +" -s\tmaksymalny rozmiar stosu\n" +" -t\tmaksymalna ilość czasu procesora w sekundach\n" +" -u\tmaksymalna liczba procesów użytkownika\n" +" -v\trozmiar pamięci wirtualnej\n" +" -x\tmaksymalna liczba blokad plików\n" +" -P\tmaksymalna liczba pseudoterminali\n" +" -T\tmaksymalna liczba wątków\n" +" \n" +" Nie wszystkie opcje są dostępne na wszystkich platformach.\n" +" \n" +" Gdy podano wartość LIMITU, stanowi ona nową wartość ograniczenia dla\n" +" danego zasobu; specjalne wartości LIMITU: `soft', `hard' i `unlimited'\n" +" oznaczają, odpowiednio, aktualne ograniczenie miękkie, sztywne i brak\n" +" ograniczenia. W przeciwnym przypadku wypisywana jest aktualna wartość\n" +" podanego ograniczenia. Gdy nie podano opcji, przyjmuje się, że podano -" +"f.\n" +" \n" +" Wartości są podawane w jednostkach 1024-bajtowych, za wyjątkiem -t, " +"które\n" +" jest w sekundach, -p, które jest w jednostkach 512-bajtowych oraz -u, " +"które\n" +" jest bezwymiarową liczbą procesów.\n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Wyświetlanie i ustawianie maski uprawnień plików.\n" +" \n" +" Ustawienie maski uprawnień tworzonych plików na UPRAWNIENIA. Jeśli\n" +" pominięto UPRAWNIENIA, wypisywana jest aktualna wartość maski.\n" +" \n" +" Jeśli UPRAWNIENIA zaczynają się od cyfry, są interpretowane jako liczba\n" +" ósemkowa; w przeciwnym wypadku jako łańcuch symbolicznych uprawnień,\n" +" jak w poleceniu chmod(1).\n" +" \n" +" Opcje:\n" +" -p\tjeśli pominięto UPRAWNIENIA, wypisywanie w formie nadającej się\n" +" \tdo ponownego użycia jako wejście\n" +" -S\twyjście w postaci symbolicznej; bez tej opcji jest ósemkowe\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędne uprawnienia lub błędną " +"opcję." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Oczekiwanie na zakończenie zadania i zwrócenie stanu (kodu) wyjścia.\n" +" \n" +" Oczekiwanie na każdy proces o podanym identyfikatorze ID, który może " +"być\n" +" numerem PID lub określeniem zadania i zgłoszenie jego stanu (kodu)\n" +" zakończenia. Jeśli nie podano ID, polecenie oczekuje na wszystkie " +"aktualnie\n" +" aktywne procesy potomne i zwraca prawdę. Jeśli ID jest określeniem " +"zadania,\n" +" oczekuje na wszystkie procesy w potoku przetwarzania danego zadania.\n" +" \n" +" Jeśli podano opcję -n, oczekiwanie na zakończenie następnego zadania\n" +" i zwrócenie jego kodu zakończenia.\n" +" \n" +" Jeśli podano opcję -f, a kontrola zadań jest włączona, oczekiwanie na\n" +" zakończenie podanego ID zamiast czekania na zmianę jego stanu.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest stan zakończenia ID; niepowodzenie, jeśli ID jest\n" +" nieprawidłowe lub podano błędną opcję." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Oczekiwanie na zakończenie procesu i zwrócenie stanu (kodu) wyjścia.\n" +" \n" +" Oczekiwanie na każdy z procesów podany przez PID i zgłoszenie jego " +"statusu\n" +" zakończenia. Gdy nie zostanie podany PID, oczekiwanie dotyczy " +"wszystkich\n" +" aktualnie aktywnych procesów potomnych, a kodem powrotu jest zero. PID " +"musi\n" +" być identyfikatorem procesu.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status ID lub niepowodzenie, jeśli ID jest błędny lub " +"podano\n" +" nieprawidłową opcję." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Wykonanie poleceń dla każdego elementu z listy.\n" +" \n" +" Pętla `for' uruchamia ciąg poleceń dla każdego elementu podanej listy. " +"Gdy\n" +" nie zostanie podane `in SŁOWA ...;', zakłada się, że podano `in \"$@" +"\"'.\n" +" Dla każdego elementu SŁÓW, NAZWA jest ustawiana na ten element\n" +" i uruchamiane są POLECENIA. \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Arytmetyczna pętla for.\n" +" \n" +" Równoważne\n" +" \t(( WYR1 ))\n" +" \twhile (( WYR2 )); do\n" +" \t\tPOLECENIA\n" +" \t\t(( WYR3 ))\n" +" \tdone\n" +" WYR1, WYR2 i WYR3 są wyrażeniami arytmetycznymi. Jeśli któreś z wyrażeń\n" +" zostanie pominięte, zachowanie jest takie, jakby miało ono wartość " +"1. \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Wybór słów z listy i wykonanie poleceń.\n" +" SŁOWA są rozwijane, co tworzy listę słów. Zbiór rozwiniętych słów\n" +" wypisywany jest na standardowym wyjściu diagnostycznym, a każde słowo " +"jest\n" +" poprzedzone przez liczbę. Gdy nie zostanie podane `in SŁOWA', zakłada\n" +" się, że podano `in \"$@\"'. Wyświetlany jest wówczas tekst zachęty PS3\n" +" i odczytywany jest wiersz ze standardowego wejścia. Gdy wiersz ten " +"składa\n" +" się z liczby przypisanej do jednego z wypisanych słów, to NAZWA jest\n" +" ustawiana na to słowo. Gdy wiersz jest pusty, SŁOWA i tekst zachęty są\n" +" wyświetlane ponownie. Gdy odczytany zostanie EOF, polecenie się kończy.\n" +" Każda inna wartość powoduje przypisanie NAZWIE wartości pustej. " +"Odczytany\n" +" wiersz jest zachowywany w zmiennej REPLY. Po każdym wyborze uruchamiane\n" +" są POLECENIA aż do polecenia break. \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Zgłoszenie czasu zajętego przez wykonanie potoku poleceń.\n" +" \n" +" Uruchomienie POTOKU poleceń i wypisanie podsumowania zawierającego czas\n" +" rzeczywisty, czas procesora w trybie użytkownika oraz czas procesora\n" +" w trybie systemu, jakie spędził POTOK poleceń do chwili zakończenia.\n" +" \n" +" Opcje:\n" +" -p\twypisanie podsumowania czasów w przenośnym formacie POSIX\n" +" \n" +" Jako format danych wyjściowych używana jest wartość zmiennej " +"TIMEFORMAT.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca status zakończenia POTOKU poleceń." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Wykonanie poleceń w oparciu o dopasowanie do wzorców.\n" +" \n" +" Wybiórcze uruchamianie POLECEŃ w zależności od tego, czy SŁOWO pasuje\n" +" do WZORCA. Znak `|' służy do rozdzielania wielu wzorców.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Wykonanie poleceń w zależności od spełnienia warunku.\n" +" \n" +" Uruchamiana jest lista `if POLECENIA'. Gdy jej kod powrotu jest zerem,\n" +" uruchamiana jest lista `then POLECENIA'. W przeciwnym przypadku\n" +" uruchamiane są poszczególne listy `elif POLECENIA' i, jeśli kod powrotu\n" +" takiej listy jest zerem, uruchamiana jest odpowiednia lista\n" +" `then POLECENIA', po czym polecenie if się kończy. W przeciwnym " +"przypadku\n" +" uruchamiana jest lista `else POLECENIA', jeśli taka istnieje. Kodem\n" +" zakończenia całej konstrukcji jest kod zakończenia ostatniego\n" +" uruchomionego polecenia lub zero, gdy żaden ze sprawdzanych warunków\n" +" nie był prawdziwy.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Wykonywanie poleceń dopóki test kończy się powodzeniem.\n" +" \n" +" Rozwijanie i uruchamianie POLECEŃ dopóki ostatnie polecenie\n" +" w POLECENIACH `while' kończy się z kodem zero.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Wykonywanie poleceń dopóki test nie kończy się powodzeniem.\n" +" \n" +" Rozwijanie i uruchamianie POLECEŃ dopóki ostatnie polecenie\n" +" w POLECENIACH `until' kończy się z kodem niezerowym.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Utworzenie koprocesu o podanej NAZWIE.\n" +" \n" +" Asynchroniczne wykonanie POLECENIA ze standardowym wyjściem i " +"standardowym\n" +" wejściem polecenia połączonych potokiem z deskryptorami plików\n" +" przypisanymi do indeksów 0 i 1 zmiennej tablicowej NAZWA w powłoce.\n" +" Domyślną NAZWĄ jest \"COPROC\".\n" +" Stan wyjściowy:\n" +" Polecenie coproc zwraca status wyjścia 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Zdefiniowanie funkcji powłoki.\n" +" \n" +" Utworzenie funkcji powłoki o podanej NAZWIE. Przy wywołaniu jako " +"zwykłego\n" +" polecenia NAZWA uruchamia POLECENIA w kontekście powłoki wywołującej.\n" +" Przy wywoływaniu NAZWY, argumenty są przekazywane do funkcji jako $1..." +"$n,\n" +" a nazwa funkcji w $FUNCNAME.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest sukces, chyba że NAZWA jest tylko do odczytu." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Grupowanie poleceń jako jednostki.\n" +" \n" +" Uruchomienie zbioru poleceń jako grupy. W ten sposób można przekierować\n" +" cały zbiór poleceń.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Wznowienie zadania jako pierwszoplanowego.\n" +" \n" +" Równoważne argumentowi ZADANIE polecenia `fg'. Wznowienie zatrzymanego " +"lub\n" +" działającego w tle zadania. ZADANIE może określać nazwę zadania albo " +"jego\n" +" numer. Umieszczenie `&' po ZADANIU umieszcza zadanie w tle tak, jak to " +"się\n" +" dzieje po podaniu specyfikacji zadania jako argumentu dla `bg'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest stan wznowionego zadania." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Obliczenie wyrażenia arytmetycznego.\n" +" \n" +" Obliczenie WYRAŻENIA zgodnie z zasadami obliczania wyrażeń " +"arytmetycznych.\n" +" Równoważne \"let WYRAŻENIE\".\n" +" \n" +" Stan wyjściowy:\n" +" Zwracane jest 1, jeśli wartością WYRAŻENIA jest 0; 0 w przeciwnym " +"wypadku." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Wykonanie polecenia warunkowego.\n" +" \n" +" Zwracany jest status wynoszący 0 lub 1 w zależności od wyniku WYRAŻENIA\n" +" warunkowego. Wyrażenia są tworzone na tych samych zasadach, co w " +"poleceniu\n" +" `test' i mogą być łączone za pomocą następujących operatorów:\n" +" \n" +" ( WYRAŻENIE )\tzwraca wartość WYRAŻENIA\n" +" ! WYRAŻENIE\tprawdziwe, gdy WYRAŻENIE jest fałszywe; fałszywe\n" +" \t\t\tw innym przypadku\n" +" WYR1 && WYR2\tPrawdziwe, gdy zarówno WYR1 jak i WYR2 są prawdziwe;\n" +" \t\t\tfałszywe w innym przypadku\n" +" WYR1 || WYR2\tPrawdziwe, gdy WYR1 lub WYR2 jest prawdziwe;\n" +" \t\t\tfałszywe w innym przypadku\n" +" \n" +" W przypadku użycia operatorów `==' lub `!=' napis po prawej stronie\n" +" operatora jest traktowany jak wzorzec i wykonywane jest dopasowywanie " +"do\n" +" wzorca. W przypadku użycia operatora `=~' łańcuch po prawej stronie\n" +" operatora jest dopasowywany jako wyrażenie regularne.\n" +" \n" +" Operatory && i || nie obliczają WYR2, jeśli obliczenie WYR1 wystarcza " +"do\n" +" określenia wartości wyrażenia.\n" +" \n" +" Stan wyjściowy:\n" +" 0 lub 1 w zależności od wartości WYRAŻENIA." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Popularne zmienne powłoki i ich zastosowanie.\n" +" \n" +" BASH_VERSION\tInformacja o wersji tego Basha.\n" +" CDPATH\tRozdzielona dwukropkami lista katalogów do wyszukiwania\n" +" \t\tkatalogów podanych jako argumenty `cd'.\n" +" GLOBIGNORE\tRozdzielona dwukropkami lista wzorców nazw plików\n" +" \t\tdo ignorowania przy rozwijaniu ścieżek.\n" +" HISTFILE\tNazwa pliku, w którym zapisywana jest historia poleceń.\n" +" HISTFILESIZE\tMaksymalna liczba linii w tym pliku.\n" +" HISTSIZE\tMaksymalna liczba linii historii, do której ma dostęp\n" +" \t\tdziałająca powłoka.\n" +" HOME\tPełna ścieżka do katalogu logowania.\n" +" HOSTNAME\tNazwa bieżącego hosta.\n" +" HOSTTYPE\tRodzaj procesora, na jakim działa ta wersja Basha.\n" +" IGNOREEOF\tSterowanie akcją powłoki w przypadku odebrania znaku\n" +" \t\tEOF jako jedynego wejścia. Jeśli zmienna jest ustawiona,\n" +" \t\tjej wartością jest liczba znaków EOF, które mogą wystąpić\n" +" \t\tw pustym wierszu przed zakończeniem powłoki (domyślnie 10).\n" +" \t\tJeśli nie jest ustawiona, EOF oznacza koniec wejścia.\n" +" MACHTYPE\tŁańcuch opisujący bieżący system, na jakim działa Bash.\n" +" MAILCHECK\tOkreślenie jak często (w sekundach) Bash ma sprawdzać\n" +" \t\tobecność nowej poczty.\n" +" MAILPATH\tRozdzielona dwukropkami lista nazw plików, w których\n" +" \t\tBash ma sprawdzać obecność nowej poczty.\n" +" OSTYPE\tWersja Uniksa, na której działa ta wersja Basha.\n" +" PATH\tRozdzielona dwukropkami lista katalogów do przeszukiwania\n" +" \t\tprzy wyszukiwaniu poleceń.\n" +" PROMPT_COMMAND\tPolecenie do wykonania przed wypisaniem każdego\n" +" \t\tgłównego napisu zachęty.\n" +" PS1\t\tGłówny napis zachęty.\n" +" PS2\t\tDrugorzędny napis zachęty.\n" +" PWD\t\tPełna ścieżka do bieżącego katalogu.\n" +" SHELLOPTS\tRozdzielona dwukropkami lista włączonych opcji powłoki.\n" +" TERM\tNazwa typu bieżącego terminala.\n" +" TIMEFORMAT\tFormat wyjściowy do statystyk czasu wyświetlanych przez\n" +" \t\tpolecenie wbudowane `time'.\n" +" auto_resume\tWartość niepusta oznacza, że słowo polecenia występujące\n" +" \t\tw linii jako jedyne jest najpierw wyszukiwane na liście aktualnie\n" +" \t\tzatrzymanych zadań. Jeśli tam zostanie znalezione, to zadanie\n" +" \t\tjest wznawiane jako pierwszoplanowe. Wartość `exact' oznacza, że\n" +" \t\tsłowo polecenia musi dokładnie pasować do polecenia na liście\n" +" \t\tzadań zatrzymanych. Wartość `substring' oznacza, że słowo\n" +" \t\tpolecenia musi pasować do podciągu zadania. Każda inna wartość\n" +" \t\toznacza, że polecenie musi być przedrostkiem zatrzymanego\n" +" \t\tzadania.\n" +" histchars\tZnaki sterujące rozwijaniem wg historii i szybkim\n" +" \t\tpodstawianiem. Pierwszy znak jest znakiem podstawiania\n" +" \t\thistorii, zwykle `!'. Drugi jest znakiem \"szybkiego podstawienia" +"\",\n" +" \t\tzwykle `^'. Trzeci znak jest znakiem \"komentarza historii\",\n" +" \t\tzwykle `#'.\n" +" HISTIGNORE\tRozdzielona dwukropkami lista wzorców używanych przy\n" +" \t\tdecydowaniu, które polecenia powinny być zapisywane na liście\n" +" \t\thistorii.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Dodanie katalogów do stosu.\n" +" \n" +" Dodanie katalogu na wierzchołku stosu katalogów lub rotacja stosu\n" +" czyniąca jego nowym wierzchołkiem bieżący katalog roboczy. Wywołane bez\n" +" argumentów zamienia na stosie dwa najwyższe katalogi.\n" +" \n" +" Opcje:\n" +" -n\tPominięcie zmiany katalogu podczas umieszczania katalogów na\n" +" \t\tstosie tak, że zmieniany jest tylko stos.\n" +" \n" +" Argumenty:\n" +" +N\tRotacja stosu czyniąca jego wierzchołkiem N-ty katalog (licząc\n" +" \t\tod lewej strony listy wypisywanej przez `dirs', począwszy od zera).\n" +" \n" +" -N\tRotacja stosu czyniąca jego wierzchołkiem N-ty katalog (licząc\n" +" \t\tod prawej strony listy wypisywanej przez `dirs', począwszy od " +"zera).\n" +" \n" +" KATALOG\tUmieszczenie KATALOGU na wierzchołku stosu i uczynienie go\n" +" \t\tnowym bieżącym katalogiem roboczym.\n" +" \n" +" Zawartość stosu katalogów można zobaczyć za pomocą polecenia `dirs'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędny argument lub zmiana " +"katalogu\n" +" się nie powiedzie." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Usunięcie katalogów ze stosu.\n" +" \n" +" Usunięcie pozycji ze stosu katalogów. Wywołane bez argumentów usuwa\n" +" katalog z wierzchołka stosu i zmienia katalog bieżący na katalog\n" +" będący nowym wierzchołkiem stosu.\n" +" \n" +" Opcje:\n" +" -n\tPominięcie zmiany katalogu podczas usuwania katalogów ze stosu\n" +" \t\ttak, że zmieniany jest tylko stos.\n" +" \n" +" Argumenty:\n" +" +N\tUsunięcie ze stosu N-tej pozycji licząc od lewej strony listy\n" +" \t\twypisywanej przez `dirs', począwszy od zera. Na przykład: `popd +0'\n" +" \t\tusuwa pierwszy katalog, `popd +1' usuwa drugi.\n" +" \n" +" -N\tUsunięcie ze stosu N-tej pozycji licząc od prawej strony listy\n" +" \t\twypisywanej przez `dirs', począwszy od zera. Na przykład: `popd -0'\n" +" \t\tusuwa pierwszy katalog, `popd -1' usuwa drugi.\n" +" \n" +" Zawartość stosu katalogów można zobaczyć za pomocą polecenia `dirs'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędny argument lub zmiana " +"katalogu\n" +" się nie powiedzie." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Wypisanie stosu katalogów.\n" +" \n" +" Wypisanie listy aktualnie pamiętanych katalogów. Katalogi umieszczane " +"są\n" +" na liście za pomocą polecenia `pushd'; można cofać się w obrębie listy\n" +" za pomocą polecenia `popd'.\n" +" \n" +" Opcje:\n" +" -c\twyczyszczenie stosu katalogów poprzez usunięcie wszystkich jego\n" +" \t\telementów\n" +" -l\tnieużywanie wersji skróconej wersji z tyldą przy wypisywaniu\n" +" \t\tkatalogów względem katalogu domowego\n" +" -p\twypisanie katalogów ze stosu w osobnych wierszach\n" +" -v\twypisanie katalogów ze stosu w osobnych wierszach, poprzedzając\n" +" \t\tkażdy jego pozycją na stosie\n" +" \n" +" Argumenty:\n" +" +N\tWypisanie N-tej pozycji licząc od lewej strony listy wypisywanej\n" +" \t\tprzez dirs wywołane bez opcji, począwszy od zera.\n" +" \n" +" -N\tWypisanie N-tej pozycji licząc od prawej strony listy wypisywanej\n" +" \t\tprzez dirs wywołane bez opcji, począwszy od zera.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Ustawianie i anulowanie opcji powłoki.\n" +" \n" +" Zmiana ustawienia każdej z NAZWY-OPCJI. Bez argumentów będących " +"opcjami,\n" +" wypisywane są wszystkie podane NAZWY-OPCJI, lub wszystkie opcje " +"powłoki,\n" +" jeśli nie podano NAZW-OPCJI, wraz z zaznaczeniem włączonych.\n" +" \n" +" Opcje:\n" +" -o\tograniczenie NAZW-OPCJI do używanych z `set -o'\n" +" -p\twypisanie opcji powłoki z określeniem stanu\n" +" -q\tpominięcie wyjścia\n" +" -s\twłączenie (ustawienie) każdej NAZWY-OPCJI\n" +" -u\twyłączenie (anulowanie) każdej NAZWY-OPCJI\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda jeśli NAZWA-OPCJI jest włączona; niepowodzenie, " +"jeśli\n" +" podano błędną opcję lub NAZWA-OPCJI jest wyłączona." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formatowanie i wypisanie ARGUMENTÓW zgodnie z FORMATEM.\n" +" \n" +" Opcje:\n" +" -v ZMIENNA\tprzypisanie wyjścia do podanej ZMIENNEJ powłoki zamiast\n" +" \t\twypisywania na standardowym wyjściu\n" +" \n" +" FORMAT jest łańcuchem znakowym zawierającym trzy rodzaje obiektów:\n" +" zwykłe znaki, które są kopiowane na standardowe wyjście; znaki " +"sekwencji\n" +" sterujących, które są przekształcane i kopiowane na standardowe " +"wyjście;\n" +" oraz sekwencje formatujące, z których każda powoduje wypisanie " +"kolejnego\n" +" argumentu.\n" +" \n" +" Poza standardowymi sekwencjami formatującymi opisanymi w printf(1) oraz\n" +" printf(3), printf interpretuje:\n" +" \n" +" %b\trozwinięcie sekwencji z odwrotnym ukośnikiem w odpowiadającym\n" +" \t\targumencie\n" +" %q\tcytowanie argumentu w sposób umożliwiający użycie na wejściu\n" +" \t\tpowłoki\n" +" %(fmt)T\twypisanie łańcucha daty-czasu otrzymanego z użycia FMT jako\n" +" \t łańcucha formatującego dla strftime(3)\n" +" \n" +" Format jest używany ponownie w razie potrzeby w celu pochłonięcia\n" +" wszystkich argumentów. Jeśli argumentów jest mniej, niż wymaga format,\n" +" nadmiarowe sekwencje zachowują się tak, jakby podano wartość zerową lub\n" +" łańcuch pusty.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub zapis albo\n" +" przypisanie zakończy się niepowodzeniem." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Określenie sposobu dopełniania argumentów przez Readline.\n" +" \n" +" Określenie dla każdej NAZWY sposobu dopełniania argumentów. Jeśli nie\n" +" podano opcji, wypisywane są istniejące specyfikacje dopełniania w " +"sposób\n" +" pozwalający na ich ponowne użycie jako wejście.\n" +" \n" +" Opcje:\n" +" -p\twypisanie istniejących dopełnień w formacie do ponownego użycia\n" +" -r\tusunięcie specyfikacji dopełniania dla każdej NAZWY lub, jeśli\n" +" \t\tnie podano NAZW, wszystkich specyfikacji dopełniania\n" +" -D\tstosowanie dopełniania i akcji domyślnie dla poleceń bez\n" +" \t\tokreślonych żadnych konkretnych reguł dopełniania\n" +" -E\tstosowanie dopełniania i akcji dla \"pustych\" poleceń -\n" +" \t\tpróby dopełnienia w pustej linii\n" +" -I\tstosowanie dopełniania i akcji do początkowego słowa (zwykle\n" +" \t\tpolecenia)\n" +" \n" +" Przy próbie dopełnienia akcje są wykonywane w kolejności takiej, jak\n" +" wielkie litery wymienione powyżej. Jeśli podano wiele opcji, opcja -D\n" +" ma priorytet nad -E, a obie mają priorytet nad -I.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Wypisanie możliwych uzupełnień w zależności od opcji.\n" +" \n" +" Przeznaczone do wykorzystania w funkcjach powłoki generujących możliwe\n" +" uzupełnienia. Gdy podany jest opcjonalny argument SŁOWO, generowane są\n" +" uzupełnienia pasujące do SŁOWA.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Zmiana lub wyświetlenie opcji dopełniania.\n" +" \n" +" Zmiana opcji dopełniania dla każdej NAZWY lub, jeśli nie podano NAZW,\n" +" aktualnie wykonywanego dopełniania. Jeśli nie podano OPCJI, wypisanie\n" +" opcji dopełniania dla każdej NAZWY lub bieżącej specyfikacji " +"dopełniania.\n" +" \n" +" Opcje:\n" +" \t-o opcja\tUstawienie podanej OPCJI dopełniania dla każdej NAZWY\n" +" \t-D\t\tZmiana opcji dla \"domyślnego\" dopełniania polecenia\n" +" \t-E\t\tZmiana opcji dla dopełniania \"pustego\" polecenia\n" +" \t-I\t\tZmiana opcji dla dopełniania dla początkowego słowa\n" +" \n" +" Użycie `+o' zamiast `-o' wyłącza podaną opcję.\n" +" \n" +" Argumenty:\n" +" \n" +" Każda NAZWA odnosi się do polecenia, dla którego specyfikacja " +"dopełniania\n" +" musi być wcześniej zdefiniowana przy użyciu polecenia wbudowanego\n" +" `complete'. Jeśli nie podano NAZW, compopt musi być wywołane z funkcji\n" +" aktualnie generującej dopełnienia, wtedy zmieniane są opcje dla " +"aktualnie\n" +" wykonywanego generatora dopełnień.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub NAZWA nie ma\n" +" zdefiniowanej specyfikacji dopełniania." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Odczyt linii ze standardowego wejścia do zmiennej tablicowej indeksowanej.\n" +" \n" +" Odczyt linii ze standardowego wejścia (lub deskryptora FD, jeśli podano\n" +" opcję -u) do zmiennej tablicowej indeksowanej TABLICA. Zmienna MAPFILE\n" +" jest domyślną TABLICĄ.\n" +" \n" +" Opcje:\n" +" -d ogr\tUżycie OGRanicznika do kończenia linii zamiast znaku nowej " +"linii\n" +" -n liczba\tSkopiowanie maksymalnie podanej LICZBY linii. Jeśli LICZBA\n" +" \t\t\twynosi 0, kopiowane są wszystkie linie.\n" +" -O początek\tRozpoczęcie wpisywania do TABLICY od indeksu POCZĄTKU.\n" +" \t\t\tDomyślny indeks wynosi 0.\n" +" -s liczba\tPominięcie pierwszych LICZBA odczytanych linii.\n" +" -t\tUsunięcie końcowego znaku końca linii z każdej wczytanej linii.\n" +" -u fd\tOdczyt linii z deskryptora FD zamiast standardowego wejścia.\n" +" -C wywołanie\tObliczenie WYWOŁANIA po odczycie każdego CO-ILE linii.\n" +" -c co-ile\tLiczba linii do wczytania między każdym WYWOŁANIEM.\n" +" \n" +" Argumenty:\n" +" TABLICA\tNazwa zmiennej tablicowej do użycia na dane z pliku.\n" +" \n" +" Jeśli podano -C bez -c, domyślnym krokiem jest 5000. Podczas obliczania\n" +" WYWOŁANIA jest przekazywany indeks do następnego elementu tablicy, " +"który\n" +" ma być przypisany oraz - jako kolejne argumenty - linia do przypisania.\n" +" \n" +" Jeśli nie podano jawnie początku, mapfile czyści TABLICĘ przed\n" +" przypisywaniem.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub TABLICA jest " +"tylko\n" +" do odczytu, lub nie jest tablicą indeksowaną." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Odczyt linii z pliku do zmiennej tablicowej.\n" +" \n" +" Synonim polecenia `mapfile'." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Zwraca kontekst wywołania bieżącego podprogramu.\n" +#~ " \n" +#~ " Bez WYRAŻENIA zwraca " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: proces %5ld (%s) w potoku" + +#~ msgid "Unknown Signal #" +#~ msgstr "Nieznany sygnał #" diff --git a/bash-5.1/po/pt.gmo b/bash-5.1/po/pt.gmo new file mode 100644 index 0000000000000000000000000000000000000000..a66d7c7c51fdfffc942dd4819f28fe4e9c27edaa Binary files /dev/null and b/bash-5.1/po/pt.gmo differ diff --git a/bash-5.1/po/pt.po b/bash-5.1/po/pt.po new file mode 100644 index 0000000000000000000000000000000000000000..7868edb666dcca8dba0e5f027d47893fe33b1b17 --- /dev/null +++ b/bash-5.1/po/pt.po @@ -0,0 +1,5990 @@ +# Bash - Bourne Again Shell. +# Copyright (C) 2018 Free Software Foundation, Inc. +# This file is distributed under the same license as the Bash package. +# Pedro Albuquerque , 2018, 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-09 07:09+0000\n" +"Last-Translator: Pedro Albuquerque \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=n !=1;\n" +"X-Generator: Gtranslator 2.91.7\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "subscrito de matriz inválido" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: a remover atributo nameref" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: impossível converter matriz indexada para associativa" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: chave de matriz associativa inválida" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: impossível atribuir a índice não numérico" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: tem de usar subscrito ao atribuir a matriz associativa" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: impossível criar: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: impossível encontrar mapa de teclado para o " +"comando" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: o 1º carácter não-espaço não é \"\"\"" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "sem \"%c\" de fecho em %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: separador dois pontos em falta" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "\"%s\": impossível desassociar" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansão: impossível alocar memória para %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansão: falha ao alocar memória para %u elementos" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansão: falha ao alocar memória para \"%s\"" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "\"%s\": aliás inválido" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "Edição de linha não activada" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "\"%s\": mapa de teclado inválido" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: impossível ler: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "\"%s\": nome de função desconhecido" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s: não tem associação a qualquer tecla.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s pode ser chamado via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "\"%s\": impossível desassociar" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "total de ciclos" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "só tem significado num ciclo \"for\", \"while\" ou \"until\"" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Devolver o contexto da actual chamada a sub-rotina.\n" +" \n" +" Sem EXPR, devolve \"$linha $nomefich\". Com EXPR, devolve\n" +" \"$linha $sub-rotina $nomefich\"; esta informação extra pode ser usada\n" +" para obter um rasto da pilha.\n" +" \n" +" O valor de EXPR indica quantas chamadas deve recuar antes da\n" +" actual; a chamada superior é a chamada 0.\n" +" \n" +" Estado de saída:\n" +" Devolve 0 a não ser que a consola não esteja a executar uma função ou " +"EXPR\n" +" seja inválida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME não definida" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "demasiados argumentos" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "pasta nula" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD não definida" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linha %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "aviso: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uso: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: a opção requer um argumento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: requer um argumento numérico" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: não encontrado" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: opção inválida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nome de opção inválido" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "\"%s\": identificador inválido" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "número octal inválido" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "número hexadecimal inválido" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "número inválido" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: especificação de sinal inválida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "\"%s\": especificação de pid ou tarefa inválida" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variável só de leitura" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fora do intervalo" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumento" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s fora do intervalo" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: tarefa inexistente" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: sem controlo da tarefa" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "sem controlo da tarefa" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: restrita" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "restrita" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: não é interno da consola" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "erro de escrita: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "erro ao definir atributos do terminal: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "erro ao obter atributos do terminal: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: erro ao obter a pasta actual: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: especificação de tarefa ambígua" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "ajuda indisponível nesta versão" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: impossível desactivar: %s só de leitura" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: impossível desactivar" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nome de acção inválido" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: sem especificação de conclusão" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "aviso: a opção -F pode não resultar como esperado" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "aviso: a opção -C pode não resultar como esperado" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "a função de conclusão não está em execução" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "só pode ser usado numa função" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: variável de referência não pode ser uma matriz" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: não são permitidas auto-referências de nameref" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: referência circular de nome" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": nome de variável inválido para referência de nome" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "impossível usar \"-f\" para fazer funções" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: função só de leitura" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: atribuição de matriz composta citada obsoleta" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: impossível destruir variáveis de matriz assim" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: impossível converter matriz associativa em indexada" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "carregamento dinâmico indisponível" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "impossível abrir objecto partilhado %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "impossível encontrar %s no objecto partilhado %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: não carregada dinamicamente" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "carregamento da função %s devolve falha (%d): não carregada" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: não carregada dinamicamente" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: impossível eliminar: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: é uma pasta" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: não é um ficheiro normal" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: ficheiro muito grande" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: impossível executar o binário" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: impossível executar: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "não é consola de sessão: use \"exit\"" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Há tarefas interrompidas.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Há tarefas em curso.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "sem comando encontrado" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "especificação de histórico" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: impossível abrir ficheiro temporário: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "actual" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "tarefa %d começou sem controlo de tarefa" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opção ilegal -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: a opção requer um argumento -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing desactivado" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: tabela de hash vazia\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "sucessos\tcomando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Comandos de consola correspondentes à palavra-chave \"" +msgstr[1] "Comandos de consola correspondentes a palavras-chave \"" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nenhum tópico de ajuda para \"%s\". Tente \"help help\", \"man -k %s\" ou " +"\"info %s\"." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: impossível abrir: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Estes comandos de consola são definidos internamente. Insira \"help\" para " +"ver a lista.\n" +"Insira \"help nome\" para saber mais sobre a função \"nome\".\n" +"Use \"info bash\" para saber mais sobre a consola em geral.\n" +"Use \"man -k ou \"info\" para saber mais sobre comandos não listados.\n" +"\n" +"Um asterisco (*) junto a um nome significa que o comando está inactivo.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "impossível usar mais de um -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "posição do histórico" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: datação inválida" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: falha na expansão do histórico" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: falha inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "não são permitidas mais opções com \"-x\"" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: os argumentos têm de ser IDs de processos ou tarefas" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Erro desconhecido" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "esperada expressão" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: não é uma matriz indexada" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: especificação de descritor de ficheiro inválida" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: descritor de ficheiro inválido: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: total de linhas inválido" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: origem de matriz inválida" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: callback inválida" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "nome de variável de matriz vazio" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "requerido suporte a variáveis de matriz" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "%s: carácter de formato em falta" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "\"%c\": especificação de formato de hora inválida" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "\"%c\": carácter de formato inválido" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "aviso: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "problema de análise de formato: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "dígito hex em falta para \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "dígito unicode em falta para \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nenhuma outra pasta" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: argumento inválido" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "pilha de pastas vazia" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "índice da pilha de pastas" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Mostrar a lista de pastas actualmente lembradas. As pastas\n" +" entram na lista com o comando \"pushd\"; pode recuar\n" +" na lista com o comando \"popd\".\n" +" \n" +" Opções:\n" +" -c\tlimpar a pilha de pastas eliminando todos os elementos\n" +" -l\tnão imprimir versões com prefixo til de pastas relativas\n" +" \tà sua pasta home\n" +" -p\timprimir a pilha de pastas com uma entrada por linha\n" +" -v\timprimir a pilha de pastas com uma entrada por linha com a sua\n" +" \tposição na pilha como prefixo\n" +" \n" +" Argumentos:\n" +" +N\tmostra a N entrada a contar da esquerda da lista mostrada por\n" +" \tpastas quando chamada sem opções, começando com zero.\n" +" \n" +" -N\tmostra a N entrada a contar da direita da lista mostrada por\n" +" \tpastas quando chamada sem opções, começando com zero." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Adiciona uma pasta ao cimo da pilha de pastas ou roda a pilha\n" +" tornando a pasta actual o novo cimo da pilha.\n" +" Sem argumentos, troca as duas pastas superiores.\n" +" \n" +" Opções:\n" +" -n\tSuprime a troca normal de pastas ao adicionar\n" +" \tpastas à pilha, só a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRoda a pilha de forma a que a N pasta (contando\n" +" \tda esquerda da lista mostrada por pastas, começando com\n" +" \tzero) fique no topo.\n" +" \n" +" -N\tRoda a pilha de forma a que a N pasta (contando\n" +" \tda direita da lista mostrada por pastas, começando com\n" +" \tzero) fique no topo.\n" +" \n" +" PST\tAdiciona PST ao cimo da pilha de pastas, tornando-a a\n" +" \tnova pasta de trabalho actual.\n" +" \n" +" O \"dirs\" interno mostra a pilha de pastas." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Remove entradas da pilha de pastas. Sem argumentos, remove\n" +" a pasta superior da pilha e muda para a nova pasta de topo.\n" +" \n" +" Opções:\n" +" -n\tSuprime a troca normal de pastas ao remover\n" +" \tpastas da pilha, só a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRemove a N pasta contando da esquerda da lista\n" +" \tmostrada por pastas, começando com zero Por exemplo: \"popd +0\"\n" +" \tremove a primeira pasta, \"popd +1\" a segunda.\n" +" \n" +" -N\tRemove a N pasta contando da direita da lista\n" +" \tmostrada por pastas, começando com zero Por exemplo: \"popd +0\"\n" +" \tremove a última pasta, \"popd +1\" a penúltima.\n" +" \n" +" O \"dirs\" interno mostra a pilha de pastas." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: especificação de inacção inválida" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "erro de leitura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "só pode usar \"return\" a partir de uma função ou script baseado" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "impossível desactivar simultaneamente uma função e uma variável" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: não é variável de matriz" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: não é função" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: impossível exportar" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "total de trocas" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "impossível definir e desactivar opções da consola em simultâneo" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nome de opção da consola inválido" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "requerido argumento de nome de ficheiro" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: ficheiro não encontrado" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "impossível suspender" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "impossível suspender uma consola de sessão" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s usa o aliás \"%s\"\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s é palavra-chave da consola\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s é uma função\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s é opção interna especial da consola\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s é opção interna da consola\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s é %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s tem hash (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: argumento de limite inválido" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "\"%c\": comando errado" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: impossível obter limite: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limite" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: impossível modificar limite: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "número octal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "\"%c\": operador de modo simbólico inválido" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "\"%c\": carácter de modo simbólico inválido" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " linha " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "último comando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "A abortar..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM.: " + +#: error.c:462 +msgid "unknown command error" +msgstr "erro de comando desconhecido" + +#: error.c:463 +msgid "bad command type" +msgstr "tipo de comando errado" + +#: error.c:464 +msgid "bad connector" +msgstr "conector errado" + +#: error.c:465 +msgid "bad jump" +msgstr "salto errado" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variável desassociada" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aDemasiada inacção à espera de entrada: sessão terminada\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "impossível redireccionar entrada padrão de /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "FORMATOHORA: \"%c\": carácter de formato inválido" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] ainda existe" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "erro de pipe" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: nível máximo de aninhamento de eval excedido (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: nível máximo de aninhamento de fonte excedido (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: nível máximo de aninhamento de função excedido (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restrito: impossível especificar \"/\" em nomes de comando" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: comando não encontrado" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: interpretador errado" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: impossível executar binário: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "%s: é uma opção interna especial" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "impossível duplicar fd %d para fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "nível de recursão da expressão excedido" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "sub-fluxo da pilha de recursividade" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "erro de sintaxe na expressão" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "tentativa de atribuição a não-variável" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "erro de sintaxe na atribuição de variável" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "divisão por 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "problema: símbolo expassign errado" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "\":\" esperados para expressão condicional" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "expoente menor que 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "identificador esperado após pré-incremento ou pré-decremento" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "\")\" em falta" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "erro de sintaxe: operando esperado" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "erro de sintaxe: operador aritmético inválido" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (símbolo de erro é \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "base aritmética inválida" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: total de linhas inválido" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "valor muito grande para a base" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: erro de expressão\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: impossível aceder a pastas-mãe" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "impossível repor modo nodelay para fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"impossível alocar novo descritor de ficheiro para entrada bash de fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer já existe para o novo fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pipe pgrp" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "pid %d aparece em tarefa em execução %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "a eliminar tarefa interrompida %d com grupo de processo %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) marcado como ainda activo" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: pid não existente" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Sinal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Feito" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Interrompido" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Interrompido(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Em execução" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Feito(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Sair de %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Estado desconhecido" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(núcleo despejado) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid filho (%ld para %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld não é um filho desta consola" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: sem registo do processo %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_tarefa: tarefa %d está interrompida" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: tarefa inexistente" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: tarefa terminada" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: tarefa %d já em 2º plano" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: a ligar WNOHANG para evitar bloquieo indefinido" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: linha %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (núcleo despejado)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd agora: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp falhou" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: sem controlo de tarefa em 2º plano" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplina de linha" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "impossível definir grupo de processo do terminal (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "não há controlo de tarefa nesta consola" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: asserção falhada: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: asserção frustrada\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "desconhecido" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: bloqueio na lista livre clobbered" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: chamado com argumento de bloco já liberto" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: chamado com argumento de bloco não alocado" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: sub-fluxo detectado; mh_nbytes fora do intervalo" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: sub-fluxo detectado; mh_nbytes fora do intervalo" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: tamanho dos pontos inicial e final difere" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: chamado com argumento de bloco não alocado" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: sub-fluxo detectado; mh_nbytes fora do intervalo" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: sub-fluxo detectado; mh_nbytes fora do intervalo" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: tamanho dos pontos inicial e final difere" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: tabela de alocação cheia com FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p já na tabela como alocado?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p já na tabela como livre?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base inválida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: anfitrião desconhecido" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: serviço inválido" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: especificação de caminho de rede errada" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "operações de rede não suportadas" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: não pode alterar o idioma (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: não pode alterar o idioma (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: não pode alterar o idioma (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: não pode alterar o idioma (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Tem correio em $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Tem novo correio em $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "O correio em %s já foi lido\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "erro de sintaxe: requerida expressão aritmética" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "erro de sintaxe: \";\" inesperado" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "erro de sintaxe: \"((%s))\"" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipo de instrução %d errado" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document na linha %d delimitado por fim-de-ficheiro (desejado \"%s\")" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection: instrução de redireccionamento \"%d\" fora do intervalo" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"consola_getc: consola_input_line_size (%zu) excede SIZE_MAX (%lu): linha " +"truncada" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "total here-document máximo excedido" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF inesperado ao procurar \"%c\" correspondentes" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF inesperado ao procurar \"]]\"" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "erro de sintaxe em expressão condicional: símbolo inesperado \"%s\"" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "erro de sintaxe em expressão condicional" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "símbolo inesperado \"%s\", esperado \")\"" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "esperado \")\"" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argumento \"%s\" inesperado para operador unário condicional" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "argumento inesperado para operador unário condicional" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "símbolo \"%s\" inesperado, esperado operador binário condicional" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "esperado operador binário condicional" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argumento \"%s\" inesperado para operador binário condicional" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "argumento inesperado para operador binário condicional" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "símbolo \"%c\" inesperado em comando condicional" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "símbolo \"%s\" inesperado em comando condicional" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "símbolo %d inesperado em comando condicional" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "erro de sintaxe junto a símbolo \"%s\" inesperado" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "erro de sintaxe junto a \"%s\"" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "erro de sintaxe: fim de ficheiro inesperado" + +#: parse.y:6365 +msgid "syntax error" +msgstr "erro de sintaxe" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Use \"%s\" para sair da consola.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF inesperado ao procurar o \")\" correspondente" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: função \"%s\" não encontrada" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possível ciclo de repetição" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: conector \"%d\" errado" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: descritor de ficheiro inválido" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: ponteiro de ficheiro NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: \"%c\": carácter de formato inválido" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "descritor de ficheiro fora de alcance" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redireccionamento ambíguo" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: impossível sobrescrever ficheiro existente" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restricto: impossível redireccionar saída" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "impossível criar ficheiro temporário para here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: impossível atribuir fd a variável" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port não suportado em trabalho de rede" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "erro de redireccionamento: impossível duplicar fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "impossível encontrar /tmp, por favor crie-a!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp tem de ser um nome de pasta válido" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "modo pretty-printing ignorado em consolas interactivas" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opção inválida" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "impossível definir uid como %d: uid efectiva %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "impossível definir gid como %d: gid efectiva %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "impossível iniciar o depurador; modo de depuração desactivado" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: é uma pasta" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Não tenho nome!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versão %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uso:\t%s [opção longa GNU] [opção] ...\n" +"\t%s [opção longa GNU] [opção] script-file ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Opções longas GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opções da consola:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\tcomando -ilrsD ou -c ou -O shopt_option\t\t(só chamada)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\topção -%s ou -o\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Insira \"%s -c \"help set\"\" para mais informação sobre opções da consola.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Insira \"%s -c help\" para mais informação sobre comandos internos da " +"consola.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Use o comando \"bashbug\" para reportar erros.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Página inicial do bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ajuda geral para usar programas GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operação inválida" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Sinal falso" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Desligar" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interromper" + +#: siglist.c:58 +msgid "Quit" +msgstr "Sair" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Instrução ilegal" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Instrução ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Instrução EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Excepção de vírgula flutuante" + +#: siglist.c:86 +msgid "Killed" +msgstr "Morto" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Erro de bus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Falha de segmentação" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Chamada de sistema errada" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Pipe quebrado" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Alarme" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminado" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Condição IO urgente" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Parado (sinal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continuar" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Morte ou paragem do filho" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Parado (entrada tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Parado (saída tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O pronto" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Limite do CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Limite do ficheiro" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarme (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarme (perfil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Janela alterada" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Bloqueio de registo" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Sinal de utilizador 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Sinal de utilizador 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "entrada de dados HTF pendente" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "falha de energia iminente" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "acidente do sistema iminente" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migrar processo para outro CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "erro de programação" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "concedido modo de monitor HTF" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "retirado modo de monitor HTF" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "sequência de som HTF terminou" + +#: siglist.c:214 +msgid "Information request" +msgstr "Pedido de informação" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Sinal desconhecido #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "má substituição: sem \"%s\" de fecho em %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: impossível atribuir lista a membro de matriz" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "impossível fazer pipe para substituição de processo" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "impossível fazer filho para substituição de processo" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "impossível abrir pipe chamado %s para leitura" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "impossível abrir pipe chamado %s para escrita" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "imossível duplicar pipe chamado %s como fd %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "substituição de comando: byte nulo ignorado na entrada" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "impossível fazer pipe para substituição de comando" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "impossível fazer filho para substituição de comando" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: impossível duplicar pipe como fd 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nome de variável inválido para referência de nome" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: expansão indirecta inválida" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nome de variável inválido" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parâmetro não definido" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parâmetro nulo ou não definido" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expressão de sub-cadeia < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: má substituição" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: impossível atribuir desta forma" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"futuras versões da consola vão forçar a avaliação como uma substituição " +"aritmética" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "má substituição: sem \"\"\" de fecho em %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "sem par:%s" + +#: test.c:147 +msgid "argument expected" +msgstr "argumento esperado" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: expressão inteira esperada" + +#: test.c:265 +msgid "`)' expected" +msgstr "\")\" esperado" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "\")\" esperado, encontrado %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: operador bináro esperado" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: operador unáro esperado" + +#: test.c:881 +msgid "missing `]'" +msgstr "\"]\" em falta" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "erro de sintaxe: \";\" inesperado" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "número de sinal inválido" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "gestor de trap: nível máximo de gestor de captura excedido (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valor errado em trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: gestor de sinal é SIG_DFL, a reenviar %d (%s) para mim " +"próprio" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: sinal errado %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "erro ao importar definição de função para \"%s\"" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "nível da consola (%d) muito alto, a repor para 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variável: sem contexto de função no âmbito actual" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: não pode atribuir um valor à variável" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: a atribuir inteiro à referência de nome" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: sem contexto de função no âmbito actual" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s tem exportstr nulo" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "carácter %d inválido em exportstr para %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "sem \"=\" em exportstr para %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: cabeça de consola_variables não é contexto de função" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: sem contexto de global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: cabeça de consola_variables não é âmbito de ambiente temporário" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: impossível abrir como FICHEIRO" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: valor inválido para descritor de ficheiro trace" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: valor de compatibilidade fora do intervalo" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licença GPLv3+: GNU GPL versão 3 ou posterior \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versão %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Este é um programa gratuito; pode alterá-lo e distribuí-lo à vontade." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Não há QUALQUER GARANTIA, até aos limites previstos pela Lei." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: impossível alocar %lu bytes (%lu bytes alocados)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: impossível alocar %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: impossível alocar %lu bytes (%lu bytes alocados)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: impossível alocar %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nome[=valor] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nome [nome ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m mapa de teclado] [-f ficheiro] [-q nome] [-u nome] [-r " +"seqtecl] [-x seqtecl:comando-consola] [seqtecl:função-readline ou comando-" +"readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [consola-interno [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [pst]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "comando [-pVv] comando [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [nome[=valor] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] nome[=valor] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [opção] nome[=valor] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f ficheiro] [nome ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "" +"exec [-cl] [-a nome] [comando [argumentos ...]] [redireccionamento ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [primeiro] [último] ou fc -s [pat=rep] [comando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p caminho] [-dt] [nome ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [padrão ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d desvio] [n], history -anrw [ficheiro] ou history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "tarefas [-lnprs] [tarefaspec ...] ou tarefas -x comando [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [tarefaspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | tarefaspec ... ou kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a matriz] [-d delim] [-i texto] [-n ncars] [-N ncars] [-p " +"prompt] [-t inacção] [-u fd] [nome ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nome-opção] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nome ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nome[=valor] ...] ou export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nome[=valor] ...] ou readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source ficheiro [argumentos]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". ficheiro [argumentos]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nome [nome ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limite]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modo]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOME [in PALAVRAS ... ] ; do COMANDOS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMANDOS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOME [in PALAVRAS ... ;] do COMANDOS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PALAVRA in [PADRÃO [| PADRÃO]...) COMANDOS ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMANDOS; then COMANDOS; [ elif COMANDOS; then COMANDOS; ]... [ else " +"COMANDOS; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMANDOS; do COMANDOS; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMANDOS; do COMANDOS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOME] comando [redireccionamentos]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "nome de função { COMANDOS ; } ou nome () { COMANDOS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMANDOS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expressão ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expressão ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variáveis - nomes e significados de algumas variáveis da consola" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | pasta]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nomeopção ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] formato [argumentos]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o opção] [-A acção] [-G " +"padrãoglobal] [-W listapalavras] [-F função] [-C comando] [-X filterpat] [-" +"P prefixo] [-S sufixo] [nome ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o opção] [-A acção] [-G padrglob] [-W listpal] [-" +"F função] [-C comando] [-X padrfiltro] [-P prefixo] [-S sufixo] [palavra]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opção] [-DEI] [nome ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n total] [-O origem] [-s total] [-t] [-u fd] [-C " +"callback] [-c quantia] [matriz]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d delim] [-n total] [-O origem] [-s total] [-t] [-u fd] [-C " +"callback] [-c quantum] [matriz]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definir ou mostrar aliás.\n" +" \n" +" Sem argumentos, \"alias imprime a lista de aliás na forma\n" +" reutilizável \"alias NOME=VALOR\" na saída padrão.\n" +" \n" +" Com argumetos, é definido um aliás para cada NOME cujo VALOR é dado.\n" +" Um espaço final em VALOR causa uma verificação à palavra seguinte para\n" +" substituição do aliás quando o aliás for expandido.\n" +" \n" +" Opções:\n" +" -p\timprimir todos os aliás definidos em formato reutilizável\n" +" \n" +" Estado de saída:\n" +" alias devolve verdadeiro a não ser que seja fornecido um NOME para o " +"qual\n" +"ainda não haja um aliás." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Remover cada NOME da lista de aliás definidos.\n" +" \n" +" Opções:\n" +" -a\tremove todas as definições de aliás\n" +" \n" +" Devolve sucesso a não ser que NOME seja um aliás inexistente." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Definir associações de teclas e variáveis para Readline.\n" +" \n" +" Associar uma sequência de teclas a uma função ou macro Readline, ou\n" +" defina uma variável Readline. A sintaxe de argumento não-opção é " +"equivalente\n" +" à encontrada em ~/.inputrc, mas tem de ser passada como argumento " +"único:\n" +" e.g., bind \"\"\\C-x\\C-r\": re-read-init-file\".\n" +" \n" +" Opções:\n" +" -m maptecl Use MAPTECL como mapa de teclado para a " +"duração deste\n" +" comando. Nomes de mapas aceitáveis são " +"emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, " +"vi-move,\n" +" vi-command, e vi-insert.\n" +" -l Listar nomes de funções.\n" +" -P Listar nomes de funções e associações.\n" +" -p Listar funções funçãos e associações de " +"forma a que possam\n" +" ser reutilizados como entrada.\n" +" -S Listar sequências de teclas que chamem " +"macros e seus valores\n" +" -s Listar sequências de teclas que chamem " +"macros e seus valores\n" +" de forma a que possam ser reutilizados como " +"entrada.\n" +" -V Listar nomes de variáveis e seus valores\n" +" -v Listar nomes de variáveis e seus valores de " +"forma a que possam\n" +" ser reutilizados como entrada.\n" +" -q nome-função Consultar que teclas chamaram a função em " +"causa.\n" +" -u nome-função Unbind all keys which are bound to the named " +"função.\n" +" -r seqtecl Remover associação de SEQTECL.\n" +" -f nomefich Ler associações de teclas a partir de " +"NOMEFICH.\n" +" -x seqtecl:comando-consola\tCausa a execuçaõ de COMANDO-SHELL " +"quando\n" +" \t\t\t\tSEQTECL for inserido.\n" +" -X Listarsequências de teclas associadas a -x e " +"comandos ligados\n" +" de forma a que possam ser reutilizados como " +"entrada.\n" +" \n" +" Estado de saída:\n" +" bind devolve 0 a não ser que seja dada uma opção desconhecida ou ocorra " +"um erro." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Sair de ciclos for, while, ou until.\n" +" \n" +" Sai de um ciclo FOR, WHILE ou UNTIL. Se N for especificado, quebrar N " +"ciclos\n" +" envolventes.\n" +" \n" +" Estado de saída:\n" +" O estado de saída é 0 a não ser que N não seja maior ou igual que 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Retomar ciclos for, while, ou until.\n" +" \n" +" Retoma a iteração seguinte do ciclo FOR, WHILE ou UNTIL envolvente.\n" +" Se N for especificado, retoma o N-ésimo ciclo envolvente.\n" +" \n" +" Estado de saída:\n" +" O estado de saída é 0 a não ser que N não seja maior ou igual que 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Executa comandos internos da consola.\n" +" \n" +" Executa SHELL-INTERNO com argumentos ARGs sem realizar procura do " +"comando.\n" +" Útil quando deseja re-implementar um comando interno da consola como\n" +" função da consola, mas tem de executar o comando interno dentro da " +"função.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado de saída de SHELL-INTERNO ou falso se SHELL-INTERNO " +"não\n" +" for um comando interno da consola." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Devolver o contexto da actual chamada a sub-rotina.\n" +" \n" +" Sem EXPR, devolve \"$linha $nomefich\". Com EXPR, devolve\n" +" \"$linha $sub-rotina $nomefich\"; esta informação extra pode ser usada\n" +" para obter um rasto da pilha.\n" +" \n" +" O valor de EXPR indica quantas chamadas deve recuar antes da\n" +" actual; a chamada superior é a chamada 0.\n" +" \n" +" Estado de saída:\n" +" Devolve 0 a não ser que a consola não esteja a executar uma função ou " +"EXPR\n" +" seja inválida." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Alterar a pasta de trabalho da consola.\n" +" \n" +" Altera a pasta actual para PASTA. A PASTA predefinida é o valor da " +"variável\n" +" HOME.\n" +" \n" +" A variável CDPATH define o caminho de procura para a pasta que contém\n" +" PASTA. Nomes de pasta alternativos em CDPATH são separados por \":" +"\" (:).\n" +" Um nome de pasta nulo é equivalente à pasta actual. Se PASTA começar " +"com\n" +" uma barra (/), CDPATH não é usada.\n" +" \n" +" Se a pasta não for encontrada e a opção de consola \"cdable_vars\" " +"estiver definida,\n" +" a palavra é assumida como nome de variável. Se essa variável tiver um " +"valor,\n" +" será usado como PASTA.\n" +" \n" +" Opções:\n" +" -L\tforçar seguimento de ligações simbólicas: resolve ligações\n" +" \t\tsimbólicas em PASTA após processar instâncias de \"..\"\n" +" -P\tusa a estrutura física de pastas sem seguir ligações\n" +" \t\tsimbólicas: resolve ligações simbólicas em PASTA antes de\n" +" \t\tprocessar instâncias de \"..\"\n" +" -e\tse a opção -P for usada e a pasta de trabalho actual não puder\n" +" \t\tser determinada com sucesso, sair com\n" +" \t\testado não-zero\n" +" -@\tem sistemas que o suportam, apresentar um ficheiro com " +"atributos\n" +" \t\testendidos como uma pasta contendo os atributos do ficheiro.\n" +" \n" +" A predefinição é seguir ligações simbólicas, como se \"-L\" fosse " +"especificada.\n" +" \"..\" é processado colocando o componente de caminho imediatamente " +"anterior\n" +" como barra ou o começo de PASTA.\n" +" \n" +" Estado de saída:\n" +" Devolve 0 se a pasta for alterada e se $PWD for definida com sucesso " +"quando\n" +" -P é usada; caso contrário, não-zero." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Imprimir o nome da actual pasta de trabalho.\n" +" \n" +" Opções:\n" +" -L\tImprimir o valor de $PWD se nomear a actual pasta de\n" +" \t\ttrabalho\n" +" -P\timprimir a pasta física, sem quaisquer ligações simbólicas\n" +" \n" +" Por predefinição, \"pwd\" comporta-se como se \"-L\" fosse " +"especificada.\n" +" \n" +" Estado de saída:\n" +" Devolve 0 a não ser que seja indicada uma opçãoinválida ou a pasta " +"actual\n" +" não possa ser lida." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Comando nulo.\n" +" \n" +" Sem efeito; o comando não faz nada.\n" +" \n" +" Estado de saída:\n" +" Sempre com sucesso." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Devolve um resultado com sucesso.\n" +" \n" +" Estado de saída:\n" +" Sempre com sucesso." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Devolve um resultado sem sucesso.\n" +" \n" +" Estado de saída:\n" +" Falha sempre." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Executar um comando simples ou mostrar informação sobre comandos.\n" +" \n" +" Executa COMANDO com ARGS suprimindo procura de funções da consola ou " +"mostra\n" +" informação acerca dos COMANDOs especificados. Pode ser usado para " +"chamar comandos\n" +" em disco quando existe uma função com o mesmo nome.\n" +" \n" +" Opções:\n" +" -p usar valor predefinido para CAMINHO que garanta que se " +"encontram\n" +" todos os utilitários padrão\n" +" -v imprimir uma descrição de COMANDO similar ao interno \"type" +"\"\n" +" -V imprimir uma descrição mais detalhada de COMANDO\n" +" \n" +" Estado de saída:\n" +" Devolve o estado de saída de COMANDO ou falha se COMANDO não for " +"encontrado." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Define valores e atributos de variáveis.\n" +" \n" +" Declara variáveis e dá-lhes atributos. Se não indicar NOMEs,\n" +" mostrar os atributos e valores de todas as variáveis.\n" +" \n" +" Opções:\n" +" -f\trestringe acção ou exibição a nomes e definições de função\n" +" -F\trestringe exibição só a nomes de função (mais nº de linha e\n" +" \t\tficheiro fonte ao depurar)\n" +" -g\tcria variáveis globais quando usadas numa função da consola; " +"senão\n" +" \t\té ignorada\n" +" -p\tmostra atributos e valores de cada NOME\n" +" \n" +" Opções que definem atributos:\n" +" -a\tpara tornar NOMEs matrizes indexadas (se suportado)\n" +" -A\tpara tornar NOMEs matrizes associativas (se suportado)\n" +" -i\tpara dar a NOMEs o atributo \"integer\"\n" +" -l\tpara converter NOMEs em minúsculas ao atribuir\n" +" -n\ttornar NOME uma referência à variável chamada pelo seu valor\n" +" -r\tpara tornar NOMEs só de leitura\n" +" -t\tpara dar a NOMEs o atributo \"trace\"\n" +" -u\tpara converter NOMEs em maiúsculas ao atribuir\n" +" -x\tpara tornar NOMEs exportáveis\n" +" \n" +" Usar \"+\" em vez de \"-\" desliga o atributo indicado.\n" +" \n" +" Variáveis com o atributo integer têm avaliação aritmética (veja o\n" +" comando \"let\") realizada quando lhe é atribuído um valor.\n" +" \n" +" Quando usado numa função, \"declare\" torna NOMEs locais, como o " +"comando\n" +" \"local\". A opção \"-g\" suprime este comportamento.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que seja indicada uma opção inválida ou " +"ocorra um\n" +" erro de atribuição da variável." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Define variáveis e atributos.\n" +" \n" +" Um sinónimo para \"declare\". Veja \"help declare\"." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Define variáveis locais.\n" +" \n" +" Cria uma variável local chamada NOME e dá-lhe VALOR. OPÇÃO pode\n" +" ser qualquer opção aceite por \"declare\".\n" +" \n" +" Variáveis locais só podem ser usadas dentro de uma função; só são " +"visíveis\n" +" para a função onde foram definidas e para os seus filhos.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que uma opção inválida seja fornecida, " +"ocorra \n" +" um erro de atribuição ou a consola não esteja a executar uma função." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escreve argumentos para a saída padrão.\n" +" \n" +" Mostrar ARGs, separados por espaço único e seguidos de nova linha (LF)\n" +" na saída padrão.\n" +" \n" +" Opções:\n" +" -n\tnaõ acrescentar nova linha\n" +" -e\tpermitir interpretação dos escapes seguintes com barra esquerda\n" +" -E\tsuprimir explicitamente interpretação de escapes com barra " +"esquerda\n" +" \n" +" \"echo\" interpreta os seguintes caracteres de escapes com barra " +"esquerda:\n" +" \\a\talerta (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuprimir mais saídas\n" +" \\e\tcarácter de escape\n" +" \\E\tcarácter de escape\n" +" \\f\tform feed\n" +" \\n\tnova linha (LF)\n" +" \\r\tcarriage return (CR)\n" +" \\t\ttabulação horizontal\n" +" \\v\ttabulação vertical\n" +" \\\\\tbarra esquerda (\"\\\")\n" +" \\0nnn\to carácter cujo código ASCII é NNN (octal). NNN pode ter\n" +" \t\tde 0 a 3 dígitos octais\n" +" \\xHH\to carácter de 8-bit cujo valor é HH (hexadecimal). HH\n" +" \t\tpode ter um ou dois dígitos hexadecimais\n" +" \\uHHHH\to carácter Unicode cujo valor é o valor hexadecimal HHHH.\n" +" \t\tHHHH pode ser de um a quatro dígitos hexadecimais.\n" +" \\UHHHHHHHH o carácter Unicode cujo valor é o valor hexadecimal\n" +" \t\tHHHHHHHH. HHHHHHHH pode ser de um a oito dígitos hexadecimais.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que ocorra um erro de escrita." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escreve argumentos para a saída padrão.\n" +" \n" +" Mostrar ARGs na saída padrão seguidos de nova linha (LF).\n" +" \n" +" Opções:\n" +" -n\tnão acrescentar nova linha\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que ocorra um erro de escrita." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Activar e desactivar internos da consola.\n" +" \n" +" Activa e desactiva comandos internos da consola. Desativar permite\n" +" executar um comando de disco com o mesmo nome que comando interno\n" +" sem ter de usar um caminho completo.\n" +" \n" +" Opções:\n" +" -a\timprimir lista de internos mostrando se estão ou não activos\n" +" -n\tdesactivar cada NOME ou mostrar uma lista de internos " +"desactivados\n" +" -p\timprimir a lista de internos em formato reutilizável\n" +" -s\timprimir só os nomes de internos \"especiais\" Posix\n" +" \n" +" Opções que controlam o carregamento dinâmico:\n" +" -f\tCarregar interno NOME de objecto partilhado NOMEFICH\n" +" -d\tRemover um interno carregado com -f\n" +" \n" +" Sem opções, cada NOME é activado.\n" +" \n" +" Para usar o \"test\" encontado em $PATH em vez do interno da consola\n" +" insira \"enable -n test\".\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que NOME não seja um interno da consola ou " +"ocorra um erro." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Executa argumentos como comando da consola.\n" +" \n" +" Combina ARGs numa única cadeia, usa o resultado como entrada da " +"consola,\n" +" e executa os comandos resultantes.\n" +" \n" +" Estado de saída:\n" +" Devolve estado de saída do comando ou sucesso se o comando for nulo." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Analisa argumentos da opção.\n" +" \n" +" Getopts é usado pelos procedimentos da consola para analisar parâmetros " +"posicionais\n" +" como opções.\n" +" \n" +" CADEIAOPÇÕES contém as letras de opção a reconhecer; se uma letra\n" +" for seguida de \":\", espera-se que a opção tenha um argumento,\n" +" separado da opção por um espaço.\n" +" \n" +" Sempre que é chamado, getopts coloca a opção seguinte na variável\n" +" da consola $name, inicializa name se não existir e o índice do\n" +" argumento seguinte a processar na variável da consola OPTIND.\n" +" OPTIND é inicializado em 1 sempre que a consola ou um script da\n" +" shellé chamado. Quando uma opção requer um argumento, o\n" +" getopts coloca esse argumento na variável da consola OPTARG.\n" +" \n" +" O getopts reporta erros de duas formas. Se o primeiro carácter\n" +" de OPTCADEIA é \":\", o getopts usa um relatório de erro\n" +" silencioso. Neste modo não verá mensagens de erro. Se for vista uma\n" +" opção inválida is seen, o getopts põe o carácter de opção em OPTARG.\n" +" Se não houver um argumento requerido, o getopts põe um \":\" no NOME e\n" +" define OPTARG como o carácter de opção encontrado. Se o getopts não\n" +" estiver em modo silêncio e for vista uma opção inválida, o getopts\n" +" põe \"?\" no NOME e limpa OPTARG. Se não houver um argumento " +"requeriso,\n" +" é posto \"?\" no NOME, OPTARG é limpoe é imprimida uma mensagem de\n" +" diagnóstico.\n" +" \n" +" Se a variável da consola OPTERR tiver valor 0, o getopts desactiva a\n" +" impressão de mensagens de erro, mesmo que o 1º carácter de\n" +" CADEIAOPÇÕES não seja \":\". OPTERR tem o valor 1 predefinido.\n" +" \n" +" O getopts normalmente analisa os parâmetros posicionais ($0 - $9), mas " +"se\n" +" receber mais argumentos, são eles que são analisados.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso se encontrar uma opção; falha se o fim da opção for\n" +" encontrado ou se ocorrer um erro." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Substitui a consola com o comando indicado.\n" +" \n" +" Executar COMANDO, substituindo esta consola pelo programa " +"especificado.\n" +" ARGUMENTOS tornam-se os argumentos de COMANDO. Se COMANDO não for " +"especificado,\n" +" quaisquer redireccionamentos têm efeito na consola actual.\n" +" \n" +" Opções:\n" +" -a nome\tpassa NOME como argumento 0 a COMANDO\n" +" -c\texecuta COMANDO com um ambiente vazio\n" +" -l\tpõe uma barra no argumento 0 de COMANDO\n" +" \n" +" Se o comando não puder ser executado, uma consola não interactiva sai, " +"a não ser que\n" +" a opção de consola \"execfail\" esteja definida.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que COMANDO não seja encontrado ou ocorra um " +"erro de redireccionamento." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Sai da consola.\n" +" \n" +" Sai da consola com estado N. Se N for omitido, o estado de saída\n" +" é o do último comando executado." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Sai de uma consola com sessão.\n" +" \n" +" Sai de uma consola com sessão com estado de saída N. Devolve um erro " +"se não for\n" +" executado numa consola com sessão." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Mostra ou executa comandos da lista do histórico.\n" +" \n" +" fc é usado para listar ou editar e re-executar comandos da lsiat do " +"histórico.\n" +" PRIMEIRO e ÚLTIMO podem ser números especificando o intervalo, ou " +"PRIMEIRO pode ser\n" +" cadeia, que significa o comando mais recente começado por essa\n" +" cadeia.\n" +" \n" +" Opções:\n" +" -e NOMEED\tseleciona o editor a usar. A predefinição é FCEDIT, " +"depois EDITOR,\n" +" \t\tdepois vi\n" +" -l \tlistar linhas em vez de editar\n" +" -n\tomitir nºs de linha ao ouvir\n" +" -r\treverter a ordem das linhas (mais recentes primeiro)\n" +" \n" +" Com o formato \"fc -s [pat=rep ...] [comando]\", COMANDO é\n" +" re-executado após a substituição VELHO=NOVO ser realizada.\n" +" \n" +" Um aliás útil a usar aqui é r=\"fc -s\", para que inserir \"r cc\"\n" +" executa o último comando começado por \"cc\" e inserir \"r\" re-" +"executa\n" +" o último comando.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso ou estado do comando executado; não-zero se ocorrer um " +"erro." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Move a tarefa para 1º plano.\n" +" \n" +" Coloca a tarefa identificada com JOB_SPEC em 1º plano, tornando-a a\n" +" tarefa actual. Se JOB_SPEC não existir, é usada a noção da consola de\n" +" tarefa actual.\n" +" \n" +" Estado de saída:\n" +" Estado do comando colocado em 1º plano ou falha se ocorrer um erro." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Move a tarefa para 2º plano.\n" +" \n" +" Coloca a tarefa identificada com cada JOB_SPEC em 2º plano, como se " +"tivessem\n" +" sido iniciados com \"&\". Se JOB_SPEC não existir, é usada a noção da " +"consola de\n" +" tarefa actual.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que o controlo de tarefas esteja inactivo ou " +"ocorra um erro." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Recorda ou mostra localizações de programas.\n" +" \n" +" Determina e recorda o caminho completo de cada comando NOME. Se\n" +" não tiver argumentos, é mostrada informação sobre comando recordados.\n" +" \n" +" Opções:\n" +" -d\tesquecer a localização recordada de cada NOME\n" +" -l\tmostrar num formato que possa ser usado como entrada\n" +" -p caminho\tuse CAMINHO como caminho completo para NOME\n" +" -r\tesquecer todas as localizações recordadas\n" +" -t\timprimir a localização recordada de cada NOME, precedendo-a\n" +" \t\tdo correspondente NOME se forem\n" +" \t\tindicados múltiplos NOMEs\n" +" Argumentos:\n" +" NOME\tCada NOME é procurado no $PATH e adicionado à lista\n" +" \t\tde comandos lembrados.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que NOME não seja encontrado ou indique uma " +"opção inválida." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Mostra informação sobre comandos internos.\n" +" \n" +" Mostra breves resumos de comandos internos. Se PADRÃO for\n" +" especificado, dá ajuda detalhada em todos os comandos que cumpram " +"PADRÃO,\n" +" senão imprime a lista de tópicos de ajuda.\n" +" \n" +" Opções:\n" +" -d\tmostra uma descrição breve de cada tópico\n" +" -m\tmostra uso em formato pseudo-manpage\n" +" -s\tmostra só uma sinopse curta para cada tópico que cumpre\n" +" \t\tPADRÃO\n" +" \n" +" Argumentos:\n" +" PADRÃO\tPadrão que especifica um tópico de ajuda\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que PADRÃO não seja encontrado ou indique uma " +"opção inválida." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Mostra ou manipula a lista do histórico.\n" +" \n" +" Mostra a lista do histórico com nºs de linha, prefixando cada entrada\n" +" modificada com um \"*\". Um argumento de N lista só as últimas N " +"entradas.\n" +" \n" +" Opções:\n" +" -c\tlimpa a lista eliminado todas as entradas\n" +" -d desvio\telimina a entrada do histórico na posição DESVIO.\n" +" \t\tDesvios negativos contam-se do final da lista do histórico\n" +" \n" +" -a\tacrescenta linhas de histórico desta sessão ao ficheiro de " +"histórico\n" +" -n\tlê todas as linhas de histórico ainda não lidas do ficheiro de " +"histórico\n" +" \t\te acrescenta-as à lista de histórico\n" +" -r\tlê o ficheiro de histórico e acrescenta o conteúdo à lista de\n" +" \t\thistórico\n" +" -w\tescreve o histórico actual no ficheiro de histórico\n" +" \n" +" -p\trealiza expansão do histórico em cada ARG e mostra o resultado\n" +" \t\tsem gravar na lista de histórico\n" +" -s\tacrescenta ARGs à lista de histórico como entrada única\n" +" \n" +" Se NOMEFICH for dado, é usado como ficheiro de histórico. Senão,\n" +" se FICHHIST tiver um valor, será usado, caso contrário ~/." +"bash_history.\n" +" \n" +" Se a variável HISTTIMEFORMAT estiver definida e não for nula, o valor é " +"usado\n" +" como cadeia de formato para strftime(3) para imprimir o carimbo " +"associado\n" +" a cada entrada de histórico mostrada. Senão, não são imprimidos " +"quaisquer carimbos.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Mostra o estado das tarefas.\n" +" \n" +" Lista as tarefas activas. JOBSPEC rea cadeiae a saída a essa tarefa.\n" +" Sem opções, é mostrado o estado de todas as tarefas activas.\n" +" \n" +" Opções:\n" +" -l\tlista IDs de processo além da informação normal\n" +" -n\tlista só processos com estado alterado desde a última\n" +" \t\tnotificação\n" +" -p\tlista só IDs de processo\n" +" -r\trea cadeiae saída a tarefas em execução\n" +" -s\trea cadeiae saída a tarefas paradas\n" +" \n" +" Se -x for usado, COMANDO é executado após todas as especificações de " +"tarefas\n" +" que aparecem em ARGS terem sido substituídas pela ID de processo do " +"líder de\n" +" grupo do processo dessat tarefa.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro.\n" +" Se -x for usado, devolve o estado de saída de COMANDO." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Remove tarefas da consola actual.\n" +" \n" +" Remove cada argumento JOBSPEC da tabela de tarefas activas. Sem\n" +" JOBSPECs, a consola usa a sua noção de tarefa actual.\n" +" \n" +" Opções:\n" +" -a\tremove todas as tarefas se JOBSPEC não for indicado\n" +" -h\tmarcar cada JOBSPEC para que SIGHUP não seja enviado para a " +"tarefa\n" +" \t\tse a consola receber um SIGHUP\n" +" -r\tremove só tarefas em execução\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que uma opção inválida ou JOBSPEC seja " +"indicada." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Envia um sinal a uma tarefa.\n" +" \n" +" Envia aos processos identificados por PID ou JOBSPEC o sinal chamado\n" +" SIGSPEC ou SIGNUM. Se nem SIGSPEC nem SIGNUM estiverem presentes,\n" +" SIGTERM é presumido.\n" +" \n" +" Opções:\n" +" -s sig\tSIG é um nome de sinal\n" +" -n sig\tSIG é um número de sinal\n" +" -l\tlista nomes de sinais; se se seguirem argumentos, são\n" +" \t\tassumidos como nºs de sinal para listar os nomes\n" +" -L\tsinónimo de -l\n" +" \n" +" Mata um interno da consola por dois motivos: permite usar as IDs de " +"tarefa\n" +" em vez de IDs de processo e permite matar processos se o limite de\n" +" processos que pode criar for atingido.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Avalia as expressões aritméticas.\n" +" \n" +" Avalia cada ARG como uma expressão aritmética. A avaliação é feita em\n" +" inteiros de largura fixa sem verificação de transporte, embora a " +"divisão\n" +" por 0 seja sinalizada como erro. A seguinte lista de operadores é " +"agrupada\n" +" em níveis de igual prioridade. Os níveis estão listados\n" +" por ordem de precedência decrescente.\n" +" \n" +" \tid++, id--\tvariável pós-incremento, pós-decremento\n" +" \t++id, --id\tvariável pré-incremento, pré-decremento\n" +" \t-, +\t\tmenos, mais unário\n" +" \t!, ~\t\tnegação lógica e bitwise\n" +" \t**\t\texponenciação\n" +" \t*, /, %\t\tmultiplicação, divisão, resto\n" +" \t+, -\t\tadição, subtracção\n" +" \t<<, >>\t\tdeslocação esquerda e direita bitwise\n" +" \t<=, >=, <, >\tcomparação\n" +" \t==, !=\t\tigualdade, não igualdade\n" +" \t&\t\tE bitwise\n" +" \t^\t\tOUEX bitwise\n" +" \t|\t\tOU bitwise\n" +" \t&&\t\tE lógico\n" +" \t||\t\tOU lógico\n" +" \texpr ? expr : expr\n" +" \t\t\toperador condicional\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tatribuição\n" +" \n" +" As variáveis de consola são permitidas como operandos. O nome da " +"variável\n" +" é substituído pelo seu valor (convertido em inteiro de largura fixa) " +"dentro\n" +" de uma expressão. A variável não tem de ter o seu atributo inteiro\n" +" activado para ser usado numa expressão.\n" +" \n" +" Os operadores são avaliados por ordem de precedência. Sub-expressões\n" +" entre parênteses são avaliadas primeiro e ignoram as regras de\n" +" precedência acima.\n" +" \n" +" Estado de saída:\n" +" Se o último ARG for avaliado como 0, let devolve 1; senão let devolve 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Lê uma linha da entrada padrão e divide-a em campos.\n" +" \n" +" Lê uma linha da entrada padrão ou do descritor de ficheiro FD\n" +" se a opção -u for usada. A linha é dividida em campos como na divisão\n" +" de palavras e a primeira palavra é atribuída ao primeiro NOME, a " +"segunda\n" +" ao segundo NOME, e assim por diante, com quaisquer palavras que " +"sobrem \n" +" atribuídas ao último NOME. Só caracteres encontrados em $IFS são " +"reconhecidos\n" +" como delimitadores de palavras.\n" +" \n" +" Se não indicar NOMEs, a linha é armazenada na variável RESPONDER.\n" +" \n" +" Opções:\n" +" -a matriz\tatribui as palavras lidas a índices sequenciais da " +"MATRIZ\n" +" \t\tcomeçando em zero\n" +" -d delim\tcontinua até que o primeiro carácter de DELIM seja lido, " +"em vez de\n" +" \t\tnewline\n" +" -e\tusa Readline para obter a linha numa consola interactiva\n" +" -i texto\tusa TEXTO como texto inicial para Readline\n" +" -n ncars\tvolta após ler NCARS caracteres em vez de esperar\n" +" \t\tpor newline, mas respeita um delimitador se estiver\n" +" \t\tantes de NCARS caracteres\n" +" -N ncars\tvolta após ler exactamente NCARS caracteres, a não ser " +"que\n" +" \t\tEOF seja encontrado ou a leitura esteja inactiva, ignorando\n" +" \t\tqualquer delimitador\n" +" -p prompt\timprime PROMPT na saída sem newline final antes de\n" +" \t\ttentar ler\n" +" -r\tnão permite que barras esquerdas escapem qualquer carácter\n" +" -s\tnão ecoa entradas vindas de um terminal\n" +" -t inacção\tesgota o tempo e devolve falha se uma linha completa\n" +" \t\tde entrada não for lida em INACÇÃO segundos. O valor da\n" +" \t\tvariável TMOUT é o predefinido de inacção. INACÇÃO pode ser\n" +" \t\tuma fracção. Se INACÇÃO for 0, read volta\n" +" \t\timediatamente, sem tentar ler quaisquer dados, devolvendo\n" +" \t\tsucesso só se a entrada estiver disponível no descritor de\n" +" \t\tficheiro especificado. O estado de saída é maior que 128\n" +" \t\tse a inacção for excedida\n" +" -u fd\tlê do descritor de ficheiro FD em vez da entrada padrão\n" +" \n" +" Estado de saída:\n" +" O código devolvido é zero, a não ser que end-of-file seja encontrado, " +"haja\n" +" inacção (caso em que é maior que 128), ocorra um erro de atribuição de " +"variável,\n" +" ou seja indicado um descritor de ficheiro inválido como argumento de -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Volta de uma função de consola.\n" +" \n" +" Força a saída de uma função ou script baseado com o valor especificado\n" +" por N. Se N for omitido, o estado de saída é o do último comando\n" +" executado dentro da função ou script.\n" +" \n" +" Estado de saída:\n" +" Devolve N, ou falha se a consola não estiver a executar uma função ou " +"script." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Define ou limpa valores de opções ou parâmetros posicionais da consola.\n" +" \n" +" Altera o valor de atributos ou parâmetros posicionais da consola, ou\n" +" mostra os nomes e valores de variáveis da consola.\n" +" \n" +" Opções:\n" +" -a Marca variáveis modificadas ou criadas para exportação.\n" +" -b Notifica o fim da tarefa imediatamente.\n" +" -e Sai imediatamente se um comando sair com estado diferente de " +"zero.\n" +" -f Desactiva geração de nome de ficheiro (globbing).\n" +" -h Recordar localização de comandos à medida que são procurados.\n" +" -k Todos os argumentos de atribuição são colocados no ambiente para " +"um\n" +" comando, não só os que precedem o nome do comando.\n" +" -m Activa o controlo de tarefas.\n" +" -n Lê comandos, mas não os executa.\n" +" -option-name\n" +" Define a variável correspondente a option-name:\n" +" allexport igual a -a\n" +" braceexpand igual a -B\n" +" emacs usa estilo emacs de edição de linhas\n" +" errexit igual a -e\n" +" errtrace igual a -E\n" +" functrace igual a -T\n" +" hashall igual a -h\n" +" histexpand igual a -H\n" +" history activa histórico de comandos\n" +" ignoreeof a consola não sai após ler EOF\n" +" interactive-comments\n" +" permite que comentários apareçam em " +"comandos interactivos\n" +" keyword igual a -k\n" +" monitor igual a -m\n" +" noclobber igual a -C\n" +" noexec igual a -n\n" +" noglob igual a -f\n" +" nolog actualmente aceite mas ignorado\n" +" notify igual a -b\n" +" nounset igual a -u\n" +" onecmd igual a -t\n" +" physical igual a -P\n" +" pipefail o valor devolvido de um pipeline é o estado " +"do\n" +" último comando a sair com estado não-" +"zero,\n" +" ou zero se nenhum saiu com estado não-" +"zero\n" +" posix altera o comportamento do bash onde a " +"operação\n" +" predefinida diferir da norma Posix para " +"cumprir\n" +" a norma\n" +" privileged igual a -p\n" +" verbose igual a -v\n" +" vi usa estilo vi de edição de linhas\n" +" xtrace igual a -x\n" +" -p Activado sempre que as ID de utilizador reais e efectivas não\n" +" coincidam. Desactiva o processamento do ficheiro $ ENV e a \n" +" importação de funções da consola. Desligar esta opção faz com\n" +" que os uid e gid efectivos sejam definidos para os uid e gid " +"reais.\n" +" -t Sair depois de ler e executar um comando.\n" +" -u Trata as variáveis ​​não definidas como erro ao substituir.\n" +" -v Imprime as linhas de entrada da consola à medida que são lidas.\n" +" -x Imprime comandos e seus argumentos à medida que são executados.\n" +" -B a consola realizará expansão de suporte\n" +" -C Se definido, não permitir que ficheiros normais existentes " +"sejam\n" +" sobrescritos pelo redireccionamento da saída.\n" +" -E se definido, ERR é herdada pelas funções de consola.\n" +" -H Activa estilo ! de substituição do histórico. Esta bandeira\n" +" está activada por predefinição, em consolas interativas.\n" +" -P Se definido, não resolve ligações simbólicas ao executar\n" +" comandos como \"cd\" que altera a pasta actual.\n" +" -T Se definido, DEBUG e RETURN são herdadas por funções de " +"consola.\n" +" -- Atribui quaisquer outros argumentos aos parâmetros posicionais.\n" +" Se não houver mais argumentos, os parâmetros posicionais\n" +" são limpos.\n" +" - Atribui quaisquer outros argumentos aos parâmetros " +"posicionais.\n" +" As opções -x e -v são desactivadas.\n" +" \n" +" Usar + em vez de - faz com que as bandeiras sejam desactivadas. As\n" +" bandeiras também podem ser usadas por chamada da consola. O actual\n" +" conjunto de bandeiras pode ser encontrado em $-. Os n restantes ARGs\n" +" são parâmetros posicionais e são atribuídos, em ordem, a $1, $2 .. $n.\n" +" Se não houver ARGs, todas as variáveis de consola são imprimidas.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Limpa valores e atributos de variáveis e funções da consola.\n" +" \n" +" Para cada NOME, remove a correspondente variável ou função.\n" +" \n" +" Opções:\n" +" -f\ttrata cada NOME como função de consola\n" +" -v\ttrata cada NOME como variável de consola\n" +" -n\ttrata cada NOME como referência de nome e limpa a própria\n" +" \t\tvariável em vez da variável que referencia\n" +" \n" +" Sem opções, unset primeiro tenta limpar uma variável e, se falhar,\n" +" tenta limpar uma função.\n" +" \n" +" Algumas variáveis não podem ser limpas; veja também \"readonly\".\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou NOME seja " +"só de leitura." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Define o atributo de exportação em variáveis de consola.\n" +" \n" +" Marca cada NOME para exportação automática para o ambiente de futuros\n" +" comandos executados. Se VALOR for fornecido, atribui VALOR antes de " +"exportar.\n" +" \n" +" Opções:\n" +" -f\trefere funções de consola\n" +" -n\tremove a propriedade de exportação de cada NOME\n" +" -p\tmostra uma lista de todas as funções e variáveis exportadas\n" +" \n" +" Um argumento \"--\" desactiva futuro processamento da opção.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou NOME seja " +"inválido." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marca as variáveis de consola como imutáveis.\n" +" \n" +" Marca cada NOME como só de leitura; os valores destes NOMEs não podem\n" +" ser alterados por subsequentes atribuições. Se VALOR for fornecido,\n" +" atribui VALOR antes de marcar como só de leitura.\n" +" \n" +" Opções:\n" +" -a\trefere a variáveis de matriz indexadas\n" +" -A\trefere a variáveis de matriz associativas\n" +" -f\trefere a funções de consola\n" +" -p\tmostra uma lista de todas as variáveis ou funções só de " +"leitura,\n" +" \t\tdependendo ou não se a opção -f é indicada\n" +" \n" +" Um argumento \"--\" desactiva futuro processamento da opção.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou NOME seja " +"inválido." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Deslocar parâmetros posicionais.\n" +" \n" +" Renomear os parâmetros posicionais $N+1,$N+2 ... para $1,$2 ... Se N\n" +" for omitido, presume-se como 1.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que N seja negativo ou maior que $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Executa comandos de um ficheiro na consola actual.\n" +" \n" +" Lê e execute comandos do NOMEFICH na consola actual. As\n" +" entradas em $PATH são usadas para encontrar a pasta contendo NOMEFICH.\n" +" Se nenhum ARGUMENTO for fornecido,tornam-se parâmetros posicionais\n" +" quando NOMEFICH é executado.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado em NOMEFICH; falha se\n" +" NOMEFICH não pode ser lido." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspende a execução da consola.\n" +" \n" +" Suspende a execução desta consola até receber um sinal SIGCONT.\n" +" Se não forem forçadas, as consolas com sessão não podem ser suspensas.\n" +" \n" +" Opções:\n" +" -f\tforçar a suspensão, mesmo que seja uma consola com sessão\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que o controlo de tarefa esteja inactivo ou " +"ocorra um erro." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Avalia a expressão condicional.\n" +" \n" +" Sai com estado 0 (verdadeiro) ou 1 (falso) dependendo da\n" +" avaliação de EXPR. As expressões podem ser unárias ou binárias. " +"Expressões\n" +" uinárias são frequentemente usadas para examinar o estado de um " +"ficheiro. Há\n" +" também operadores de cadeias e operadores de comparação numérica.\n" +" \n" +" O comportamento do teste depende do número de argumentos. Leia a\n" +" página do manual do bash para a especificação completa.\n" +" \n" +" Operadores de ficheiros:\n" +" \n" +" -a FICHEIRO Verdadeiro se o ficheiro existir.\n" +" -b FICHEIRO Verdadeiro se o ficheiro for bloqueio especial.\n" +" -c FICHEIRO Verdadeiro se o ficheiro for especial de " +"caracteres.\n" +" -d FICHEIRO Verdadeiro se o ficheiro for uma pasta.\n" +" -e FICHEIRO Verdadeiro se o ficheiro existir.\n" +" -f FICHEIRO Verdadeiro se o ficheiro existe e é um ficheiro " +"normal.\n" +" -g FICHEIRO Verdadeiro se o ficheiro for set-group-id.\n" +" -h FICHEIRO Verdadeiro se o ficheiro for uma ligação simbólica.\n" +" -L FICHEIRO Verdadeiro se o ficheiro for uma ligação simbólica.\n" +" -k FICHEIRO Verdadeiro se o ficheiro tiver o bit \"sticky\" " +"definido.\n" +" -p FICHEIRO Verdadeiro se o ficheiro for um pipe com nome.\n" +" -r FICHEIRO Verdadeiro se o ficheiro for legível.\n" +" -s FICHEIRO Verdadeiro se o ficheiro existe e não está vazio.\n" +" -S FICHEIRO Verdadeiro se o ficheiro for um socket.\n" +" -t FD Verdadeiro se FD for aberto num terminal.\n" +" -u FICHEIRO Verdadeiro se o ficheiro for set-user-id.\n" +" -w FICHEIRO Verdadeiro se o ficheiro for gravável por si.\n" +" -x FICHEIRO Verdadeiro se o ficheiro for executável por si.\n" +" -O FICHEIRO Verdadeiro se o ficheiro for efectivamente sua " +"propriedade.\n" +" -G FICHEIRO Verdadeiro se o ficheiro for efectivamente " +"propriedade do seu grupo.\n" +" -N FICHEIRO Verdadeiro se o ficheiro foi modificado desde a " +"última vez que foi lido.\n" +" \n" +" FICHEIRO1 -nt FICHEIRO2 Verdadeiro se o ficheiro1 for mais novo " +"que\n" +" o ficheiro2 (de acordo com a data " +"de modificação).\n" +" \n" +" FICHEIRO1 -ot FICHEIRO2 Verdadeiro se ficheiro1 for mais antigo que " +"o ficheiro2.\n" +" \n" +" FICHEIRO1 -ef FICHEIRO2 Verdadeiro se ficheiro1 for uma ligação " +"rígida a file2.\n" +" \n" +" Operadores de cadeias:\n" +" \n" +" -z CADEIA Verdadeiro se a cadeia estiver vazia.\n" +" \n" +" -n CADEIA\n" +" CADEIA Verdadeiro se a cadeia não estiver vazia.\n" +" \n" +" CADEIA1 = CADEIA2\n" +" Verdadeiro se as cadeias são iguais.\n" +" CADEIA1 != CADEIA2\n" +" Verdadeiro se as cadeias não são iguais.\n" +" CADEIA1 < CADEIA2\n" +" Verdadeiro se CADEIA1 ficar antes de CADEIA2 " +"lexicamente.\n" +" CADEIA1 > CADEIA2\n" +" Verdadeiro se CADEIA1 ficar após CADEIA2 " +"lexicamente.\n" +" \n" +" Outros operadores:\n" +" \n" +" -o OPÇÃO Verdadeiro se a opção de consola OPÇÃO está " +"activada.\n" +" -v VAR Verdadeiro se a variável de consola VAR estiver " +"definida.\n" +" -R VAR Verdadeiro se a variável de consola VAR estiver " +"definida e for um nome\n" +" referência.\n" +" ! EXPR Verdadeiro se EXPR for falso.\n" +" EXPR1 -a EXPR2 Verdadeiro se EXPR1 e EXPR2 forem verdadeiros.\n" +" EXPR1 -o EXPR2 Verdadeiro se EXPR1 OU EXPR2 forem verdadeiros.\n" +" \n" +" arg1 OP arg2 Testes aritméticos. OP é um de -eq, -ne,\n" +" -lt, -le, -gt, ou -ge.\n" +" \n" +" Operadores binários aritméticos devolvem verdadeiro se ARG1 for igual, " +"não\n" +" igual, menor que, menor ou igual que, maior que ou maior ou igual que\n" +" ARG2.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso se EXPR for avaliada como verdadeiro; falha se EXPR " +"for\n" +" avaliado como falso ou for indicado um argumento inválido." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Avalia uma expressão condicional.\n" +" \n" +" Este é um sinónimo para o interno \"test\", mas o último argumento tem\n" +" de ser um \"]\" literal, para fechar o \"[\" aberto." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Mostrar tempos de processo.\n" +" \n" +" Imprime os tempos acumulados de utilizador e sistema para a consola e " +"todos\n" +" os seus processos-filho.\n" +" \n" +" Estado de saída:\n" +" Sempre com sucesso." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Capturar sinais e outros eventos.\n" +" \n" +" Define e activa gestores a executar quando a consola recebe sinais ou\n" +" outras condições.\n" +" \n" +" ARG é um comando a ser lido e executado quando a consola recebe o(s)\n" +" sinal(is) SIGNAL_SPEC. Se ARG estiver ausente (e um único SIGNAL_SPEC\n" +" for fornecido) ou \"-\", cada sinal especificado é reposto no seu " +"valor\n" +" original. Se ARG for a cadeia nula, cada SIGNAL_SPEC será ignorado\n" +" pela consola e pelos comandos que chama.\n" +" \n" +" Se um SIGNAL_SPEC for EXIT (0) ARG é executado na saída da consola. Se\n" +" SIGNAL_SPEC é DEBUG, ARG é executado antes de cada comando simples. Se\n" +" SIGNAL_SPEC é RETURN, ARG é executado cada vez que uma função de " +"consola\n" +" ou um script executado pelo . ou os internos terminam a execução. " +"SIGNAL_SPEC\n" +" de ERR significa executar ARG cada vez que uma falha do comando faça " +"com\n" +" que a consola sair quando a opção -e está activa.\n" +" \n" +" Se nenhum argumento for fornecido, trap imprime a lista de comandos \n" +" associados a cada sinal.\n" +" \n" +" Opções:\n" +" -l imprime uma lista de nomes de sinais e seus números " +"correspondentes\n" +" -p mostra os comandos trap associados a cada SIGNAL_SPEC\n" +" \n" +" Cada SIGNAL_SPEC é um nome de sinal em ou um número de " +"sinal.\n" +" Os nomes dos sinais são insensíveis a maiúsculas e o prefixo SIG é " +"opcional.\n" +" Um sinal pode ser enviado para a consola com \"kill -signal $$\".\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que SIGSPEC seja inválido ou indique uma " +"opção inválida." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Mostra informações sobre o tipo de comando.\n" +" \n" +" Para cada NOME, indica como seria interpretado se usado como um\n" +" nome de comando.\n" +" \n" +" Opções:\n" +" -a\tmostra todos os locais contendo um executável chamado NOME;\n" +" \t\tinclui aliás, internos e funções, se e só se a opção \"-p\"\n" +" \t\ttambém não for usada\n" +" -f\tsuprime a procura da função de consola\n" +" -P\tforça uma procura em PATH para cada NOME, mesmo que seja um\n" +" \t\taliás, interno ou função e devolve o nome do ficheiro em disco\n" +" \t\tque seria executado\n" +" -p\tdevolve o nome do ficheiro em disco que seria executado,\n" +" \t\tou nada se \"type -t NOME\" não devolver \"file\"\n" +" -t\tdevolve uma só palavra de entre \"alias\", \"keyword\", " +"\"function\"\n" +" \t\t\"builtin\", \"file\" ou \"\", se NOME for um aliás, palavra " +"reservada\n" +" \t\tda consola, função de consola, interno da consola, ficheiro em\n" +" \t\tdisco, ou não encontrados, respectivamente\n" +" \n" +" Argumentos:\n" +" Nome do comando NOME a interpretar.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso se todos os NOMEs forem encontrados; falha se algum não " +"for." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modifica os limites de recursos da consola.\n" +" \n" +" Fornece controlo sobre os recursos disponíveis para consola e " +"processos\n" +" que cria, em sistemas que permitem esse controlo.\n" +" \n" +" Opções:\n" +" -S\tusa o limite de recursos \"soft\"\n" +" -H\tusa o limite de recursos \"hard\"\n" +" -a\ttodos os limites actuais são reportados\n" +" -b\to tamanho do buffer de socket\n" +" -c\to tamanho máximo dos ficheiros núcleo criados\n" +" -d\to tamanho máximo do segmento de dados de um processo\n" +" -e\ta prioridade máxima de agendamento (\"nice\")\n" +" -f\to tamanho máximo dos ficheiros escritos pela consola e seus " +"filhos\n" +" -i\to número máximo de sinais pendentes\n" +" -k\to número máximo de kqueues alocados para este processo\n" +" -l\to tamanho máximo que um processo pode bloquear na memória\n" +" -m\to tamanho máximo do conjunto residente\n" +" -n\to número máximo de descritores de ficheiros abertos\n" +" -p\to tamanho do buffer do pipe\n" +" -q\to número máximo de bytes nas filas de mensagens POSIX\n" +" -r\ta prioridade máxima de programação em tempo real\n" +" -s\to tamanho máximo da pilha\n" +" -t\ta quantidade máxima de tempo de CPU em segundos\n" +" -u\to número máximo de processos do utilizador\n" +" -v\to tamanho da memória virtual\n" +" -x\to número máximo de bloqueios de ficheiros\n" +" -P\to número máximo de pseudo-terminais\n" +" -T\to número máximo de threads\n" +" \n" +" Nem todas as opções estão disponíveis em todas as plataformas.\n" +" \n" +" Se LIMIT for indicada, é o novo valor do recurso especificado; Os\n" +" valores LIMIT especiais \"soft\", \"hard\" e \"unlimited\" representam\n" +" olimite flexível actual, o limite rígido actual e nenhum limite, " +"respectivamente.\n" +" Caso contrário, é imprimido o valor actual do recurso especificado. Se\n" +" nenhuma opção for indicada, então -f é assumido.\n" +" \n" +" Os valores estão em incrementos de 1024 bytes, exceto para -t, que é em " +"segundos,\n" +" -p, que é em incrementos de 512 bytes e -u, que é um número de " +"processos\n" +" sem escala.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que seja indicada uma opção inválida ou " +"ocorra um erro." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Mostrar ou definir a máscara do modo de ficheiro.\n" +" \n" +" Define a máscara do utilizador de criação de ficheiro para MODO. Se " +"MODO\n" +" for omitido, imprime o valor actual da máscara.\n" +" \n" +" Se MODO começa com um dígito, é interpretado como um número octal;\n" +" caso contrário, é uma cadeia de modo simbólico como a aceite por " +"chmod(1).\n" +" \n" +" Opções:\n" +" -p\tse MODO for omitido, saída de forma a que possa ser reutilizado " +"como entrada\n" +" -S\ttorna a saída simbólica; caso contrário, a saída é um número " +"octal\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que MODO seja inválido ou indique uma opção " +"inválida." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Aguarda a conclusão da tarefa e devolve o estado de saída.\n" +" \n" +" Espera por cada processo identificado por uma ID, que pode ser uma ID " +"de\n" +" processo ou uma especificação de tarefa e reporta o estado final. Se " +"não\n" +" for dada uma ID, aguarda por todos os processos-filho actualmente " +"activos e o\n" +" estado de saída é zero. Se ID for uma especificação de tarefa, espera " +"por\n" +" todos os processos no pipeline da tarefa.\n" +" \n" +" Se a opção -n for fornecida, espera que a próxima tarefa termine e\n" +" devolve seu estado de saída.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado da última ID; falha se a ID for inválida ou for " +"indicada\n" +" uma opção inválida." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Aguarda a conclusão do processo e devolve o estado de saída.\n" +" \n" +" Espera por cada processo especificado por uma PID e reporta o estado " +"final.\n" +" Se PID não for dada, aguarda por todos os processos-filho actualmente " +"activos,\n" +" e o estado devolvido é zero. A PID tem de ser uma ID de processo.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado da última PID; falha se PID for inválido ou for " +"indicada\n" +" uma opção inválida." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos para cada membro numa lista.\n" +" \n" +" O ciclo \"for\" executa uma seqüência de comandos para cada membro " +"numa\n" +" lista de itens. Se \"in PALAVRAS ...;\" não estiver presente, \" in \"$@" +"\" \" é\n" +" assumido. Para cada elemento em PALAVRAS, NOME está definido para " +"esseelemento,\n" +" e os COMANDOS são executados.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ciclo for aritmético.\n" +" \n" +" Equivalente a\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMANDOS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2 e EXP3 são expressões aritméicas. Se alguma delas for " +"omitida\n" +" comporta-se como se fosse avaliada como 1.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Selecciona palavras de uma lista e executa comandos.\n" +" \n" +" As PALAVRAS são expandidas, gerando uma lista de palavras. O\n" +" conjunto de palavras expandidas é imprimido no erro padrão, cada\n" +" um precedido por um número. Se \"in PALAVRAS\" não estiver presente,\n" +" \" in \"$@\" \" é assumido. O prompt PS3 é então exibido e é lida uma\n" +" linha da entrada padrão. Se a linha for constituída pelo número\n" +" correspondente a uma das palavras mostradas, NOME é definido para\n" +" essa palavra. Se a linha estiver vazia, PALAVRAS e o prompt são\n" +" mostrados de novo. Se for lido EOF, o comando é concluído. Qualquer\n" +" outro valor lido faz com que NOME seja definido como nulo. A linha\n" +" lida é gravada na variável RESPOSTA. COMANDOS são executados após cada\n" +" selecção até que um comando de interrupção seja executado.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Reporta o tempo consumido pela execução do pipeline.\n" +" \n" +" Executa PIPELINE e imprime um resumo do tempo real, tempo de CPU do,\n" +" utilizador e tempo de CPU do sistema na execução de PIPELINE quando " +"terminar.\n" +" \n" +" Opções:\n" +" -p\timprime o resumo do tempo no formato portátil Posix\n" +" \n" +" O valor da variável FORMATOTEMPO é usado como formato de saída.\n" +" \n" +" Estado de saída:\n" +" O estado devolvido é o estado de PIPELINE." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executea comandos baseado em comparação de padrões.\n" +" \n" +" Executar selectivamente COMANDOS baseado na comparação entre PALAVRA e\n" +" PADRÃO. \"|\" é usado para separar múltiplos padrões.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos com base em condicional.\n" +" \n" +" A lista \"if COMANDOS\" é executada. Se o estado de saída for zero, é\n" +" executada a lista \"then COMANDOS\". Caso contrário, cada lista \"elif " +"COMANDOS\"\n" +" é executado por sua vez e se o estado de saída for zero, a " +"correspondente\n" +" lista \"then COMANDOS\" é executada e o comando if é concluído. De " +"outra forma,\n" +" a lista \"else COMANDOS\" é executada, se presente. O estado de saída " +"da\n" +" construção inteira é o estado de saída do último comando executado, ou " +"zero\n" +" se nenhuma condição for verdadeira.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos enquanto o teste tiver sucesso.\n" +" \n" +" Expande e executa COMANDOS enquanto o comando final no ciclo\n" +" \"while COMANDOS\" tenha um estado de saída zero.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos enquanto o teste não tiver sucesso.\n" +" \n" +" Expande e executa COMANDOS enquanto o comando final no ciclo\n" +" \"until COMANDOS\" tenha um estado de saída não zero.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Cria um co-processo chamado NOME.\n" +" \n" +" Executa COMANDO assincronamente, com a saída e a entrada padrão " +"ligadas\n" +" via pipe a descritores de ficheiro atribuídos a índices 0 e 1 de uma \n" +" variável de matriz NOME na consola em execução.\n" +" O NOME predefinido é \"COPROC\".\n" +" \n" +" Estado de saída:\n" +" O comando coproc devolve um estado de saída 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Define uma função de consola.\n" +" \n" +" Cria uma função de consola chamada NOME. Quando chamado como comando\n" +" simples, NOME executa COMANDOs no contexto da consola. Quando NOME é\n" +" invoked, os argumentos são passados à função como $1...$n e o nome da\n" +" função está em $FUNCNAME.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que NOME seja só de leitura." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Agrupa comandos como uma unidade.\n" +" \n" +" Executa um conjunto de comandos num grupo. Esta é uma maneira de\n" +" redireccionar um conjunto completo de comandos.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Retoma a tarefa em primeiro plano.\n" +" \n" +" Equivalente ao argumento JOB_SPEC para o comando \"fg\". Retoma uma\n" +" tarefa parada ou em 2º plano. JOB_SPEC pode especificar um nome de\n" +" tarefa ou um número de tarefa. Pôr \"&\" a seguir a JOB_SPEC coloca a\n" +" tarefa em 2º plano, como se a especificação da tarefa tivesse sido\n" +" fornecida como um argumento para \"bg\".\n" +" \n" +" Estado de saída:\n" +" Devolve o estado da tarefa retomada." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Avalia uma expressão aritmética.\n" +" \n" +" A expressão EXPRESSÃO é avaliada de acordo com as regras aritméticas.\n" +" Equivalente a \"let EXPRESSÃO\".\n" +" \n" +" Estado de saída:\n" +" Devolve 1 se EXPRESSÃO avaliar como 0; senão, devolve 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Executa o comando condicional.\n" +" \n" +" Devolve um estado de 0 ou 1, dependendo da avaliação da expressão\n" +" condicional EXPRESSÃO. As expressões são compostas pelas mesmas " +"primárias\n" +" usadas pelo interno \"test\" e pode ser combinado com os seguintes " +"operadores:\n" +" \n" +" ( EXPRESSÃO )\tDevolve o valor de EXPRESSÃO\n" +" ! EXPRESSÃO\t\tVerdadeiro se EXPRESSÃO for falsa; senão falso\n" +" EXPR1 && EXPR2\tVerdadeiro se EXPR1 e EXPR2 forem verdadeiras; senão " +"falso\n" +" EXPR1 || EXPR2\tVerdadeiro se EXPR1 ou EXPR2 forem verdadeiras; " +"senão falso\n" +" \n" +" Quando os operadores \"==\" e \"! =\" são usados, a cadeia à direita do " +"operador\n" +" é usada como padrão e é feita a comparação de padrões. Quando o " +"operador \"= ~\"\n" +" é usado, a cadeia à direita do operador é comparada como expressão " +"regular.\n" +" \n" +" Os operadores && e || não avaliam EXPR2 se EXPR1 for suficiente para\n" +" determinar o valor da expressão." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Nomes e uso comuns de variáveis de consola.\n" +" \n" +" BASH_VERSION\tInformações de versão para esta bash.\n" +" CDPATH\tUma lista de pastas separadas por \":\" para procurar\n" +" \t\tpor pastas dadas como argumentos a \"cd\".\n" +" GLOBIGNORE\tUma lista de padrões separada por \":\" que descreve nomes " +"de\n" +" ficheiro a ignorar pela expansão do nome do caminho.\n" +" HISTFILE\tNome de ficheiro onde o seu histórico de comandos é " +"armazenado.\n" +" HISTFILESIZE\tNúmero máximo de linhas que este ficheiro pode conter.\n" +" HISTSIZE\tNúmero máximo de linhas de histórico a que uma consola em \n" +" \t\texecução pode aceder.\n" +" HOME\tNome completo do caminho para a pasta de início de sessão.\n" +" HOSTNAME\tNome do anfitrião actual.\n" +" HOSTTYPE\tTipo de CPU em que esta versão do Bash está em execução.\n" +" IGNOREEOF\tControla a acção da consola ao receber um carácter EOF\n" +" \t\tcomo única entrada. Se definido, então o seu valor é o\n" +" \t\tnúmero de caracteres EOF que podem ser vistos numa linha\n" +" \t\tvazia antes que a consola saia (predefinição 10).\n" +" \t\tQuando não definido, EOF significa o fim da entrada.\n" +" MACHTYPE\tDescrição do sistema actual em que a bash está em execução.\n" +" MAILCHECK\tFrequência, em segundos, com que a bash procura novo " +"correio.\n" +" MAILPATH\tLista de ficheiros separados por \":\" onde a bash procura\n" +" \t\tnovas mensagens.\n" +" OSTYPE\tVersão Unix em que esta versão da bash está em execução.\n" +" PATH\tLista de pastas separadas por \":\" a procurar quando\n" +" \t\tprocura comandos.\n" +" PROMPT_COMMAND\tComando a executar antes da impressão de cada\n" +" \t\tprompt primário.\n" +" PS1\t\tCadeia do prompt primário.\n" +" PS2\t\tCadeia do prompt secundário\n" +" PWD\t\tCaminho completo da pasta actual.\n" +" SHELLOPTS\tLista separada por \":\" de opções da consola activadas.\n" +" TERM\tNome do tipo de terminal actual.\n" +" TIMEFORMAT\tFormato de saída para estatísticas de tempo mostradas\n" +" pela palavra reservada \"time\".\n" +" auto_resume\tNão-nulo significa que uma palavra de comando numa linha\n" +" \t\tpor si só é procurada primeiro na lista de tarefas actualmente\n" +" \t\tparadas. Se encontrado, a tarefa passa a primeiro plano. Um\n" +" \t\tvalor \"exact\" significa que a palavra de comando deve ser\n" +" \t\texactamente igual a um comando na lista de tarefas paradas.\n" +" \t\t\"substring\" significa que a palavra de comando deve ser igual\n" +" \t\ta uma sub-cadeia da tarefa. Qualquer outro valor significa que\n" +" \t\to comando deve ser um prefixo de uma tarefa interrompida.\n" +" histchars\tCaracteres que controlam a expansão do histórico e " +"substituições\n" +" \t\trápidas. O primeiro carácter é o carácter de subtituição do\n" +" \t\thistórico, normalmente \"!\". O 2º é o de substituição rápida,\n" +" \t\thabitualmente \"^\". O terceiro é o comentário do histórico,\n" +" \t\tnormalmente \"#\".\n" +" HISTIGNORE\tLista de padrões separada por \":\" usados para decidir " +"quais\n" +" \t\tos comandos que devem ser gravados na lista de histórico.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Adiciona pastas à pilha.\n" +" \n" +" Adiciona uma pasta ao topo da pilha de pastas, ou roda a pilha\n" +" tornando o novo topo da pilha a actual pasta de trabalho.\n" +" Sem argumentos, troca as duas pastas de topo.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de pasta ao adicionar\n" +" pastas à pilha, para que só a pilha seja manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRoda a pilha de modo a que a N-ésima pasta (contando\n" +" \t\tda esquerda da lista mostrada por \"dirs\", começando por\n" +" \t\tzero) fique no topo.\n" +" \n" +" -N\tRoda a pilha de modo a que a N-ésima pasta (contando\n" +" \t\tda direita da lista mostrada por \"dirs\", começando por\n" +" \t\tzero) fique no topo.\n" +" \n" +" dir\tAdiciona DIR à pilha de pastas no topo, tornando-a a\n" +" \t\tnova pasta de trabalho actual.\n" +" \n" +" O interno \"dirs\" mostra a pilha de pastas.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique um argumento inválido ou a\n" +" troca de pastas falhe." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Remove pastas da pilha.\n" +" \n" +" Remove entradas da pilha de pastas. Sem argumentos, remove\n" +" a pasta do topo da pilha e muda para a nova pasta superior.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de pasta ao remover\n" +" \t\tpastas da pilha, para que só a pilha seja manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRemove a N-ésima entrada contando da esquerda da lista\n" +" \t\tmostrada por \"dirs\", começando por zero. E.g.: \"popd +0\"\n" +" \t\tremove a primeira pasta, \"popd +1\" a segunda.\n" +" \n" +" -N\tRemove a N-ésima entrada contando da direita da lista\n" +" \t\tmostrada por \"dirs\", começando por zero. E.g.: \"popd -0\"\n" +" \t\tremove a última pasta, \"popd -1\" a penúltima.\n" +" \n" +" O interno \"dirs\" mostra a pilha de pastas.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique um argumento inválido ou a troca\n" +" de pastas falhe." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Mostra a pilha de pastas.\n" +" \n" +" Mostra a lista de pastas actualmente lembradas. As pastas\n" +" entram na lista com o comando \"pushd\"; pode recuar na\n" +" lista com o comando \"popd\".\n" +" \n" +" Opções:\n" +" -c\tlimpa a pilha de pastas eliminando todos os elementos\n" +" -l\tnão imprime versões prefixadas com til de pastas relativas\n" +" \t\tà sua pasta inicial\n" +" -p\timprime a pilha de pastas com uma entrada por linha\n" +" -v\timprime a pilha de pastas com uma entrada por linha prefixada\n" +" \t\tcom a sua posição na pilha\n" +" \n" +" Argumentos:\n" +" +N\tMostra a N-ésima entrada contando da esquerda da lista\n" +" \t\tmostrada por \"dirs\" quando chamado sem opções, começando\n" +" \t\tpor zero.\n" +" \n" +" -N\tMostra a N-ésima entrada contando da direita da lista\n" +" \t\tmostrada por \"dirs\" quando chamado sem opções, começando\n" +" \t\tpor zero.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Define e cancela opções de consola.\n" +" \n" +" Altera a definição de cada opção de consola OPTNOME. Sem qualquer\n" +" argumento, lista todas as opções de consola com indicação de definição\n" +" ou não de estado.\n" +" \n" +" Opções:\n" +" -o\trestringe OPTNOMEs para os definidos para uso com \"set -o\"\n" +" -p\timprime cada opção de consola com indicação do seu estado\n" +" -q\tsuprime a saída\n" +" -s\tactiva (define) cada OPTNOME\n" +" -u\tdesactiva (limpa) cada OPTNOME\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso se OPTNOME estiver activado; falha se indicar uma opção\n" +" inválida ou OPTNOME esteja desactivada." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formata e imprime ARGUMENTOS sob controlo do FORMATO.\n" +" \n" +" Opções:\n" +" -v var\tatribui a saída à variável de consola VAR em vez de\n" +" \t\tmostrar na saída padrão\n" +" \n" +" FORMATO é uma cadeia de caracteres que contém três tipos de objectos: \n" +" caracteres simples, que são simplesmente copiados para a saída padrão;\n" +" sequências de escape, que são convertidas e copiadas para a saída " +"padrão; e\n" +" especificações de formato, cada uma das quais causa a impressão do " +"argumento\n" +" sucessivo seguinte.\n" +" \n" +" Além das especificações de formato padrão descritas em printf (1),\n" +" printf interpreta:\n" +" \n" +" %b\texpande sequências de escape para o argumento correspondente\n" +" %q\tcita o argumento de forma a ser reutilizado como entrada de " +"consola\n" +" %(fmt)T\timprime a cadeia de data-hora resultante da utilização do " +"FMT\n" +" \t\tcomo formato para strftime(3)\n" +" \n" +" O formato é reutilizado conforme necessário para consumir todos os " +"argumentos.\n" +" E se há menos argumentos do que o formato requer, especificações de " +"formato\n" +" extra comportam-se como um valor zero ou uma cadeia nula, conforme " +"apropriado,\n" +" tenha sido fornecido.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro de\n" +" escrita ou atribuição." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Especifica como os argumentos devem ser concluídos por Readline.\n" +" \n" +" Para cada NOME, especifica como os argumentos devem ser concluídos. Se " +"não \n" +" fornecer opções, as especificações de conclusão existentes são " +"imprimidas\n" +" de forma a permitir que sejam reutilizados como entrada.\n" +" \n" +" Opções:\n" +" -p\timprime especificações de conclusão existentes em formato " +"reutilizável\n" +" -r\tremove uma especificação de conclusão para cada NOME, ou, se não\n" +" \t\tforneceu NOMEs, todas as especificações de conclusão\n" +" -D\taplica as conclusões e acções como predefinição para comandos\n" +" \t\tsem qualquer especificação de conclusão definida\n" +" -E\taplica as conclusões e acções a comandos -- \"vazios\"\n" +" \t\tconclusão tentada numa linha em branco\n" +" -I\taplica as conclusões e acções à palavra inicial (normalmente o\n" +" \t\tcomando)\n" +" \n" +" Quando a conclusão é tentada, as acções são aplicadas na ordem em que \n" +" as opções de letras maiúsculas estão listadas acima. Se forem fornecidas " +"múltiplas\n" +" opções, a opção -D toma precedência sobre -E e ambas têm precedência " +"sobre -I.\n" +" \n" +" Estado da saída: Devolve sucesso a não ser que seja fornecida uma opção\n" +" inválida ou ocorra um erro." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Mostrar possíveis conclusões, dependendo das opções.\n" +" \n" +" Destinado a ser usado de dentro de uma função de consola gerando\n" +" possíveis conclusões. Se o argumento PALAVRA opcional for fornecido,\n" +" são geradas comparações com PALAVRA.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modifica ou mostra as opções de conclusão.\n" +" \n" +" Modifica as opções de conclusão para cada NOME, ou, se não fornecer " +"NOME,\n" +" a conclusão actualmente em execução. Se nenhuma OPÇÃO for fornecida, " +"imprime\n" +" as opções de conclusão para cada NOME ou a especificação de conclusão " +"actual.\n" +" \n" +" Opções:\n" +" \t-o opção\tDefine opção de conclusão OPÇÃO para cada NOME\n" +" \t-D\t\tAltera opções para a conclusão do comando \"predefinido\"\n" +" \t-E\t\tAltera opções para a conclusão do comando \"vazio\"\n" +" \t-I\t\tAltera opções para a conclusão na palavra inicial\n" +" \n" +" Usar \"+ o\" em vez de \"-o\" desliga a opção especificada.\n" +" \n" +" Argumentos:\n" +" \n" +" Cada NOME refere-se a um comando para o qual uma especificação de " +"conclusão\n" +" deve ter sido anteriormente definida usando o interno \"complete\". Se " +"não\n" +" forneceu NOMEs, compopt tem de ser chamado por uma função actualmente a\n" +" gerar conclusões e as opções para esse gerador de conclusões " +"actualmente\n" +" em execução são modificadas.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou NOME não " +"tenha\n" +" uma especificação de conclusão definida." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Lê linhas da entrada padrão para uma variável de matriz indexada.\n" +" \n" +" Lê linhas da entrada padrão para a variável de matriz indexada MATRIZ, " +"ou\n" +" do descritor de ficheiro FD se a opção -u for fornecida. A variável " +"MAPFILE\n" +" é a MATRIZ predefinida.\n" +" \n" +" Opções:\n" +" -d delim\tUsa DELIM para terminar as linhas, em vez de nova linha\n" +" -n total\tCopia no máximo TOTAL linhas. Se TOTAL for 0, copia todas\n" +" -O origem\tComeça a atribuir a MATRIZ no índice ORIGEM. A predefinição " +"é 0\n" +" -s total\tDescarta as primeiras TOTAL linhas lidas\n" +" -t\tRemove um DELIM inicial de cada linha lida (predefinição é nova " +"linha)\n" +" -u fd\tLê linhas do descritor de ficheiro FD em vez da entrada padrão\n" +" -C retorno\tAvalia RETORNO cada vez que QUANTUM linhas são lidas\n" +" -c quantum\tEspecifica o número de linhas lidas entre cada chamada a\n" +" \t\t\tRETORNO\n" +" \n" +" Argumentos:\n" +" ARRAY\tNome de variável de matriz a usar para dados de ficheiro\n" +" \n" +" Se -C for fornecido sem -c, a quantidade predefinida é 5000. Quando\n" +" RETORNO é avaliado, é fornecido o índice do elemento seguinte da\n" +" matriz a ser atribuído e a linha a ser atribuída a esse elemento\n" +" como argumentos adicionais.\n" +" \n" +" Se não for fornecido com uma origem explícita, mapfile limpa MATRIZ " +"antes\n" +" de lhe fazer atribuições.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida, MATRIZ seja " +"só\n" +" de leitura ou não seja uma matriz indexada." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Lê linhas de um ficheiro para uma variável de matriz.\n" +" \n" +" Um sinónimo para \"mapfile\"." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Devolve o contexto da presente chamada a sub-rotina.\n" +#~ " \n" +#~ " Sem EXPR, devolve " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: processo %5ld (%s) na _pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Sinal desconhecido #" diff --git a/bash-5.1/po/pt_BR.gmo b/bash-5.1/po/pt_BR.gmo new file mode 100644 index 0000000000000000000000000000000000000000..cd1093ad72e47fb9c9a4d1b9bdce78729fcb1e9f Binary files /dev/null and b/bash-5.1/po/pt_BR.gmo differ diff --git a/bash-5.1/po/pt_BR.po b/bash-5.1/po/pt_BR.po new file mode 100644 index 0000000000000000000000000000000000000000..919784c39599c9dd90333fc4433e90cd04f1aff0 --- /dev/null +++ b/bash-5.1/po/pt_BR.po @@ -0,0 +1,8636 @@ +# Brazilian Portuguese translation for bash +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Halley Pacheco de Oliveira , 2002. +# Rafael Fontenelle , 2015, 2016, 2018, 2019. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-09 15:13-0200\n" +"Last-Translator: Rafael Fontenelle \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Virtaal 1.0.0-beta1\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "subscrito de array incorreto" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: removendo o atributo nameref" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: impossível converter array indexado para associativo" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: chave de array associativo inválida" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: impossível atribuir a índice não numérico" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: deve usar subscrito ao atribuir um array associativo" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: impossível criar: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: impossível localizar mapa de teclas para comando" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: primeiro caractere não-espaço em branco não é `\"'" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "sem `%c' de fechamento em %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s faltando separador dois-pontos" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': impossível desassociar (unbind)" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansão de chaves: impossível alocar memória para %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansão de chaves: falha ao alocar memória para %u elementos" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansão de chaves: falha ao alocar memória para `%s'" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': nome de apelido (alias) inválido" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "edição de linha não habilitada" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': nome de mapa de teclas inválido" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: impossível ler: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': nome de função desconhecida" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s não está associada a qualquer tecla.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s pode ser chamado via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': impossível desassociar (unbind)" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "número de loops" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "significativo apenas em um loop de `for', `while' ou `until'" + +# help caller +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Retorna o contexto da chamada de sub-rotina atual.\n" +" \n" +" Sem EXPR, retorna \"$linha $arquivo\". Com EXPR, retorna\n" +" \"$linha $sub-rotina $arquivo\"; essa informação extra pode ser usada " +"para\n" +" fornecer um rastro da pilha.\n" +" \n" +" O valor de EXPR indica quantos quadros de chamada deve voltar antes do\n" +" atual; o quadro do topo é o quadro 0.\n" +" \n" +" Status de saída:\n" +" Retorna 0, a menos que o shell não esteja executando uma função de\n" +" shell ou EXPR seja inválida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME não definida" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "número excessivo de argumentos" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "diretório nulo" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD não definida" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linha %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "aviso: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uso: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: a opção requer um argumento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: requer argumento numérico" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: não encontrado" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: opção inválida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nome de opção inválido" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': não é um identificador válido" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "número octal inválido" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "número do hexa inválido" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "número inválido" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: especificação de sinal inválida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "" +"`%s': não é um identificador de processo (pid) nem é uma especificação de " +"trabalho válida" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: a variável permite somente leitura" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fora dos limites" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argumento" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s fora dos limites" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: trabalho não existe" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: nenhum controle de trabalho" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "nenhum controle de trabalho" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: restrição" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "restrição" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: não é um comando interno do shell" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "erro de escrita: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "erro ao definir atributos do terminal: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "erro ao obter atributos do terminal: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: erro ao obter o diretório atual: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: especificação de trabalho ambígua" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "ajuda não disponível nesta versão" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: impossível remover definição: %s somente-leitura" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: impossível remover definição" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nome de ação inválido" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: nenhuma especificação de completação" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "aviso: a opção -F pode não funcionar como esperado" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "aviso: a opção -C pode não funcionar como esperado" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "não se está executando atualmente função de completação" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "somente pode ser usado em uma função" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: variável de referência não pode ser um array" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: referência a si próprio da variável nameref não é permitido" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s referência circular de nome" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": nome de variável inválido para referência de nome" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "impossível usar `-f' para criar funções" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: função somente para leitura" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: atribuição de array composto com aspas está obsoleto" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: impossível destruir variáveis de array desta maneira" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: impossível converter array associativo para indexado" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "carregamento dinâmico não está disponível" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "impossível abrir objeto compartilhado %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "impossível localizar %s no objeto compartilhado %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: não foi carregado dinamicamente" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "função de carregamento para %s retorna falha (%d): não foi carregada" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: não foi carregado dinamicamente" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: impossível excluir: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: é um diretório" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: não é um arquivo irregular" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: arquivo é muito grande" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: impossível executar o arquivo binário" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: impossível executar: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "sair\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "não é um shell de login: use `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Há trabalhos parados.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Há trabalhos em execução.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "nenhum comando encontrado" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "especificação do histórico" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: impossível abrir arquivo temporário: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "atual" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "o trabalho %d iniciou sem controle de trabalho" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opção ilegal -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: a opção requer um argumento: -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing está desabilitado" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: tabela de hash está vazia\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "número\tcomando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Comandos shell correspondendo à palavra-chave `" +msgstr[1] "Comandos shell correspondendo às palavras-chave `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nenhum tópico de ajuda corresponde a `%s'. Tente `help help' ou `man -k %s' " +"ou `info %s'." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: impossível abrir: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Esses comandos shell são definidos internamente. Digite `help' para ver " +"essa\n" +"lista. Digite `help NOME' para descobrir mais sobre a função `NOME'.\n" +"Use `info bash' para descobrir mais sobre o shell em geral.\n" +"Use `man -k' ou `info' para descobrir mais sobre comandos que não estão " +"nesta\n" +"lista.\n" +"\n" +"Um asterisco (*) próximo ao nome significa que o comando está desabilitado.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "impossível usar mais de um dentre -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "posição no histórico" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: marca de tempo inválida" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: expansão do histórico falhou" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib falhou" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "nenhuma outra opção permitida com `-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumentos devem ser IDs de trabalhos ou processo" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Erro desconhecido" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "esperava uma expressão" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: não é um array indexado" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: especificação de descritor de arquivo inválida" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: descritor de arquivo inválido: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: número de linhas inválido" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: origem do array inválido" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: quantidade de chamadas inválida" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "nome de variável array vazio" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "requer suporte a variável de array" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': faltando caractere de formato" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': especificação de formato de tempo inválida" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': caractere de formato inválido" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "aviso: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "problema ao analisar formato: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "faltando dígito hexa para \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "faltando dígito unicode para \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nenhum outro diretório" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s argumento inválido" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "pilha de diretórios está vazia" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "índice de pilha de diretórios" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Exibe a lista de diretórios atualmente memorizados. Diretórios são\n" +" inseridos na lista por meio do comando `pushd'; você pode obter\n" +" de volta da lista com o comando `popd'.\n" +" \n" +" Opções:\n" +" -c\tlimpa a pilha de diretórios excluindo todos os elementos\n" +" -l\tnão mostra versões de diretórios prefixadas por til,\n" +" \t\trelativos ao seu diretório HOME\n" +" -p\texibe a pilha de diretório com uma entrada por linha\n" +" -v\texibe a pilha de diretório com uma entrada por linha,\n" +" \t\tprefixada com sua posição na pilha\n" +" \n" +" Argumentos:\n" +" +N\tExibe a n-ésima entrada a partir da esquerda da linha\n" +" \t\tmostrada por `dirs' chamado sem opções, iniciando com zero.\n" +" \n" +" -N\tExibe a n-ésima entrada a partir da esquerda da linha\n" +" \t\tmostrada por `dirs' chamado sem opções, iniciando com zero." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Adiciona um diretório ao topo da pilha de diretórios ou movimenta\n" +" a pilha, fazendo o novo topo da pilha ser o diretório atual de\n" +" trabalho. Com nenhum argumento, efetua troca do topo entre dois\n" +" diretórios.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de diretório ao adicionar\n" +" \t\tdiretórios à pilha, de forma que apenas a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tMovimenta a pilha de forma que o n-ésimo diretório (a contar\n" +" \t\tda esquerda da lista mostrada por `dirs', iniciando com zero)\n" +" \t\testá no topo.\n" +" \n" +" -N\tMovimenta a pilha de forma que o n-ésimo diretório (a contar\n" +" \t\tda direita da lista mostrada por `dirs', iniciando com zero)\n" +" \t\testá no topo.\n" +" \n" +" dir\tAdiciona DIR à pilha de diretórios no topo, fazendo dele o\n" +" \t\tnovo diretório de trabalho atual.\n" +" \n" +" O comando interno `dirs' exibe a pilha de diretórios." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Remove entradas da pilha de diretórios. Com nenhum argumento, remove\n" +" o diretório do topo da pilha e altera o novo diretório do topo.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de diretório ao remover\n" +" \t\tdiretórios da pilha, de forma que apenas a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRemove a n-ésima entrada a contar da esquerda da lista\n" +" \t\tmostrada por `dirs', iniciando com zero. Ex.: `popd +0'\n" +" \t\tremove o primeiro diretório e `popd +1', o segundo.\n" +" \n" +" -N\tRemove a n-ésima entrada a contar da direita da lista\n" +" \t\tmostrada por `dirs', iniciando com zero. Ex.: `popd +0'\n" +" \t\tremove o último diretório e `popd -1', o penúltimo.\n" +" \n" +" O comando interno `dirs' exibe a pilha de diretório." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: especificação de tempo limite inválida" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "erro de leitura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"possível retornar (`return') apenas de uma função ou script carregado (com " +"`source')" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" +"impossível simultaneamente remover definição de uma função e uma variável" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: não é uma variável array" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: não é uma função" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: impossível exportar" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "número de shift" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" +"impossível simultaneamente definir e remover definição de opções do shell" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nome de opção de shell inválido" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "requer argumento arquivo" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: arquivo não encontrado" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "impossível suspender" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "impossível suspender um shell de login." + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s está apelidada para `%s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s é uma palavra-chave do shell\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s é uma função\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s é um comando interno especial do shell\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s é um comando interno do shell\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s é %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s está na tabela hash (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: argumento limite inválido" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': comando incorreto" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: impossível obter limite: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limite" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: impossível modificar limite: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "número octal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': operador de modo simbólico inválido" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': caractere de modo simbólico inválido" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " linha " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "último comando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Abortando..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:462 +msgid "unknown command error" +msgstr "erro de comando desconhecido" + +#: error.c:463 +msgid "bad command type" +msgstr "tipo de comando incorreto" + +#: error.c:464 +msgid "bad connector" +msgstr "conector incorreto" + +#: error.c:465 +msgid "bad jump" +msgstr "desvio incorreto" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variável não associada" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "" +"\atempo limite de espera excedido aguardando entrada: fim automático da " +"sessão\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "impossível redirecionar a entrada padrão para /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': caractere de formato inválido" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] ainda existe" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "erro de `pipe'" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: excedido o nível máximo de aninhamento de `eval' (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: excedido o nível máximo de aninhamento de `function' (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: excedido o nível máximo de aninhamento de avaliação (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restrição: não é permitido especificar `/' em nomes de comandos" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: comando não encontrado" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: interpretador incorreto" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: impossível executar o arquivo binário: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': é um comando interno especial" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "impossível duplicar fd (descritor de arquivo) %d para fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "excedido o nível de recursividade da expressão" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "esvaziamento de pilha de recursão" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "erro de sintaxe na expressão" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "tentativa de atribuição para algo que não é uma variável" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "erro de sintaxe na atribuição de variável" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "divisão por 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "erro de programação: token incorreto passado para expassign()" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "esperava `:' para expressão condicional" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exponente menor que 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "esperava identificador após pré-acréscimo ou pré-decréscimo" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "faltando `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "erro de sintaxe: esperava operando" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "erro de sintaxe: operador aritmético inválido" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (token de erro é \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "base aritmética inválida" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: número de linhas inválido" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "valor muito grande para esta base de numeração" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: erro de expressão\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: impossível acessar os diretórios pais (anteriores)" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "" +"impossível redefinir modo `nodelay' para o descritor de arquivo (fd) %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"impossível alocar novo descritor de arquivo (fd) para a entrada do `bash' a " +"partir do fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" +"save_bash_input: buffer já existe para o novo descritor de arquivo (fd) %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: `pipe' de pgrp" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "" +"identificador de processo (pid) %d bifurcado (fork) aparece no trabalho em " +"execução %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "excluindo trabalho parado %d com grupo de processo %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) marcado como ainda vivo" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: o identificador do processo (pid) não existe" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Sinal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Concluído" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Parado" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Parado(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Executando" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Concluído(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Fim da execução com status %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Status desconhecido" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(imagem do núcleo gravada)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "`setpgid' filho (%ld para %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: o pid %ld não é um processo filho deste shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Sem registro do processo %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: trabalho %d está parado" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: trabalho não existe" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: o trabalho terminou" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: o trabalho %d já está em plano de fundo" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: ativando WNOHANG para evitar bloqueio indefinido" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s, linha %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (imagem do núcleo gravada)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd agora: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp falhou" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: nenhum controle de trabalho em plano de fundo" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplina da linha" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "impossível definir grupo do processo do terminal (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "nenhum controle de trabalho neste shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: asserção falhou: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: asserção remendada\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "desconhecido" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: bloco socado em lista livre" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: chamado com argumento de bloco já liberado" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: chamado com argumento de bloco não alocado" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: esvaziamento de pilha detectado; mh_nbytes fora do limite" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: esvaziamento de pilha detectado; mh_nbytes fora do limite" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: tamanhos de porções do início e do fim são diferentes" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: chamado com argumento de bloco não alocado" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: esvaziamento de pilha detectado; mh_nbytes fora do limite" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: esvaziamento de pilha detectado; mh_nbytes fora do limite" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: tamanhos de porções do início e do fim são diferentes" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: tabela de `alloc' está cheia com FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p já na tabela como alocado?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p já na tabela como livre?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base inválida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: máquina desconhecida" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: serviço inválido" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: especificação de caminho de rede inválida" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "sem suporte a operações de rede" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: impossível alterar locale (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: impossível alterar locale (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: impossível alterar locale (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: impossível alterar locale (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Você tem mensagem de correio em $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Você tem mensagem nova de correio em $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "As mensagens de correio em %s foram lidas\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "erro de sintaxe: requer expressão aritmética" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "erro de sintaxe: `;' inesperado" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "erro de sintaxe: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipo da instrução incorreto %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document na linha %d delimitado pelo fim do arquivo (desejava `%s')" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: instrução de redirecionamento `%d' fora do limite" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) excede SIZE_MAX (%lu): linha truncada" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "excedido o número máximo de here-document" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "encontrado EOF inesperado enquanto procurava por `%c' correspondente" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "encontrado EOF inesperado enquanto procurava por `]]'" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "erro de sintaxe na expressão condicional: token inesperado `%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "erro de sintaxe na expressão condicional" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "token inesperado `%s', esperava`)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "esperava `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argumento inesperado `%s' para operador unário condicional" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "argumento inesperado para operador unário condicional" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "token inesperado `%s', esperava operador binário condicional" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "esperava operador binário condicional" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argumento inesperado `%s' para operador binário condicional" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "argumento inesperado para operador binário condicional" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "token inesperado `%c' em comando condicional" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "token inesperado `%s' em comando condicional" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "token inesperado %d em comando condicional" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "erro de sintaxe próximo ao token inesperado `%s'" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "erro de sintaxe próximo a `%s'" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "erro de sintaxe: fim prematuro do arquivo" + +#: parse.y:6365 +msgid "syntax error" +msgstr "erro de sintaxe" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Use \"%s\" para sair do shell.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "encontrado EOF inesperado enquanto procurava por `)' correspondente" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: função `%s' não encontrada" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possível loop de nova tentativa" + +# COMPSPEC é variável no código fonte, manter sem tradução para português. +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: COMPSPEC NULO" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: conector incorreto `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: descritor de arquivo inválido" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: ponteiro de arquivo NULO" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': caractere de formato inválido" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "descritor de arquivo fora dos limites" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redirecionamento ambíguo" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: impossível sobrescrever arquivo existente" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restrição: impossível redirecionar saída" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "impossível criar arquivo temporário para here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: impossível atribuir fd a variável" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "sem suporte a /dev/(tcp|udp)/máquina/porta sem rede" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "erro de redirecionamento: impossível duplicar fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "impossível localizar /tmp, por favor crie!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp deve ser um nome de diretório válido" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "modo de impressão bonita ignorada em shells interativos" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opção inválida" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "impossível definir uid para %d: uid efetivo %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "impossível definir gid para %d: gid efetivo %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "possível iniciar o depurador; modo de depuração desabilitado" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: É um diretório" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Eu não tenho nome!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versão %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Utilização:\t%s [opção-longa-GNU] [opção] ...\n" +"\t%s [opção-longa-GNU] [opção] arquivo-de-script ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "opções-longas-GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opções do shell:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD or -c comando ou -O opção-shopt\t\t(somente para chamada)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ou -o opção\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Digite `%s -c \"help set\"' para mais informações sobre as opções do shell.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Digite `%s -c help' para mais informações sobre os comandos internos do " +"shell.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Uso o comando `bashbug' para relatar erros.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "página do bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ajuda geral sobre uso de software GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operação inválida" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Sinal falso" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Hangup" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Interromper" + +#: siglist.c:58 +msgid "Quit" +msgstr "Sair" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Instrução ilegal" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT Rastreamento/Captura (BPT trace/trap)" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Instrução ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Instrução EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Exceção de ponto flutuante" + +#: siglist.c:86 +msgid "Killed" +msgstr "Morto (Killed)" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Erro do barramento" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Falha de segmentação" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Chamada incorreta do sistema" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "`Pipe' partido (escrita sem leitura)" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Relógio de alarme" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminado" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Condição urgente de Entrada/Saída" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Parado (sinal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continuar" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Processo filho parado ou terminado" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Parado (entrada tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Parado (saída tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "Entrada/Saída pronta" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Tempo limite de CPU excedido" + +#: siglist.c:154 +msgid "File limit" +msgstr "Tamanho limite do arquivo excedido" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarme (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarme (perfil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Janela mudada" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Registro bloqueado (lock)" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Sinal 1 definido pelo usuário" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Sinal 2 definido pelo usuário" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "entrada de dados HFT pendente" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "falha iminente de energia" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "falha iminente do sistema" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migrar o processo para outra CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "erro de programação" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "modo monitor HFT autorizado" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "modo monitor HFT rescindido" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "a seqüência de som HFT foi completada" + +#: siglist.c:214 +msgid "Information request" +msgstr "Requisição de informação" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Sinal desconhecido #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "substituição incorreta: sem `%s' de fechamento em %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: impossível atribuir uma lista a um membro de um array" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "impossível criar `pipe' para a substituição do processo" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "impossível criar um processo filho para a substituição do processo" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "impossível abrir `pipe' %s para leitura" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "impossível abrir `pipe' %s para escrita" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "impossível duplicar `pipe' %s como descritor de arquivo (fd) %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "substituição de comando: byte nulo ignorado na entrada" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "impossível criar um `pipe' para substituição do comando" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "impossível criar um processo filho para substituição do comando" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" +"command_substitute: impossível duplicar o `pipe' como descritor de arquivo " +"(fd) 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nome de variável inválido para referência de nome" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: expansão indireta inválida" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nome de variável inválido" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parâmetro não inicializado" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parâmetro nulo ou não inicializado" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expressão de substring < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: substituição incorreta" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: impossível atribuir desta maneira" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"versões futuras do shell vão forçar avaliação como um substituto aritmético" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "substituição incorreta: sem \"`\" de fechamento em %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "sem correspondência: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "esperava argumento" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: esperava expressão de número inteiro" + +#: test.c:265 +msgid "`)' expected" +msgstr "esperava `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "esperava `)', encontrado %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: esperava operador binário" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: esperava operador unário" + +#: test.c:881 +msgid "missing `]'" +msgstr "faltando `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "erro de sintaxe: `;' inesperado" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "número de sinal inválido" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" +"manipulador de trap: excedido o nível máximo de manipulador de captura (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valor incorreto em trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: manipulador de sinal é SIG_DFL, enviando novamente %d " +"(%s) para mim mesmo" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: sinal incorreto %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "erro ao importar a definição da função para `%s'" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "nível do shell (%d) muito grande, redefinindo para 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: nenhum contexto de função no atual escopo" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: a variável pode não ter um valor atribuído" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: atribuindo inteiro para referência de nome" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: nenhum contexto de função no escopo atual" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s possui a string de exportação nula" + +# exportstr é uma variável no código fonte do bash (arquivo variiables.c) +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "caractere inválido na %d na exportstr para %s" + +# exportstr é uma variável no código fonte do bash (arquivo variiables.c) +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "Sem `=' na exportstr para %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: cabeça de shell_variables não é um contexto de função" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: nenhum contexto em no global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: cabeça de shell_variables não é um escopo de ambiente temporário" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: impossível abrir como ARQUIVO" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: valor inválido para rastrear descritor de arquivo" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: valor de compatibilidade fora dos limites" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licença GPLv3+: GNU GPL versão 3 ou posterior .\n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versão %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Este é um software livre; você é livre para alterar e redistribuí-lo." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Há NENHUMA GARANTIA, na extensão permitida pela lei." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: impossível alocar %lu bytes (%lu bytes alocados)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: impossível alocar %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: impossível alocar %lu bytes (%lu bytes alocados)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: impossível alocar %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [NOME[=VALOR] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] NOME [NOME ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m MAPA-TECLAS] [-f ARQUIVO] [-q NOME] [-u NOME] [-r SEQ-" +"TECLAS] [-x SEQ-TECLAS:COMANDO-SHELL] [SEQ-TECLAS:FUNÇÃO-DE-LINHA ou " +"COMANDO-DE-LINHA]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [COMANDO-INTERNO-SHELL [ARG ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [EXPR]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [DIR]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] COMANDO [ARG ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [NOME[=VALOR] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] NOME[=VALOR] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [OPÇÃO] NOME[=VALOR] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [ARG ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [ARG ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-DnPs] [-f ARQUIVO] [NOME ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [ARG ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts OPTSTRING NOME [ARG]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a NOME] [COMANDO [ARGUMENTOS ...]] [REDIRECIONAMENTO ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e EDITOR] [-lnr] [PRIMEIRO] [ÚLTIMO] ou fc -s [ANTIGO=NOVO] [COMANDO]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [ESPEC-JOB]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [ESPEC-JOB ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p CAMINHO] [-dt] [NOME ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [PADRÃO ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d POSIÇÃO] [n] ou history -anrw [ARQUIVO] ou history -ps ARG " +"[ARG...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [ESPEC-JOB ...] ou jobs -x COMANDO [ARGS]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [ESPEC-JOB ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s SIGSPEC | -n SIGNUM | -SIGSPEC] PID | ESPEC-JOB ... ou kill -l " +"[SIGSPEC]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let ARG [ARG ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a ARRAY] [-d DELIM] [-i TEXTO] [-n NCHARS] [-N NCHARS] [-p " +"CONFIRMAR ] [-t TEMPO] [-u FD] [NOME ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o NOME-OPÇÃO] [--] [ARG ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [NOME ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [NOME[=VALOR] ...] ou export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [NOME[=VALOR] ...] ou readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source ARQUIVO [ARGUMENTOS]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". ARQUIVO [ARGUMENTOS]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [EXPR]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ ARG... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[ARG] ESPEC-SINAL ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-apt] NOME [NOME ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [LIMITE]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [MODO]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [ID ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [PID ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOME [in PALAVRAS ...] ; do COMANDOS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( EXP1; EXP2; EXP3 )); do COMANDOS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOME [in PALAVRAS ... ;] do COMANDOS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] LINHA-COMANDOS" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PALAVRA in [PADRÃO [| PADRÃO]...) COMANDOS ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMANDOS; then COMANDOS; [ elif COMANDOS; then COMANDOS; ]... [ else " +"COMANDOS; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMANDOS; do COMANDOS; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMANDOS; do COMANDOS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOME] COMANDO [REDIRECIONAMENTOS]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function NOME { COMANDOS ; } ou NOME () { COMANDOS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMANDOS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "ESPEC-JOB [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( EXPRESSÃO ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ EXPRESSÃO ]]" + +# Não traduzir "variables", esta é uma opção "builtin" do "bash" que é exibida ao executar "help" e acessível com "help variables". +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Nomes e significados de algumas variáveis do shell" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | DIR]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [NOME-OPÇÃO ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v VAR] FORMATO [ARGUMENTOS]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPÇÃO] [-A AÇÃO] [-G GLOBAL] [-W " +"LISTA-PALAVRAS] [-F FUNÇÃO] [-C COMANDO] [-X FILTRO] [-P PREFIXO] [-S " +"SUFIXO] [NOME ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o OPÇÃO] [-A AÇÃO] [-G GLOBAL] [-W LISTA-" +"PALAVRAS] [-F FUNÇÃO] [-C COMANDO] [-X FILTRO] [-P PREFIXO] [-S SUFIXO] " +"[PALAVRA]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o OPÇÃO] [-DEI] [NOME ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d DELIM] [-n NÚMERO] [-O ORIGEM] [-s NÚMERO] [-t] [-u FD] [-C " +"CHAMADA] [-c QUANTIDADE] [ARRAY]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d DELIM] [-n NÚMERO] [-O ORIGEM] [-s NÚMERO] [-t] [-u FD] [-C " +"CHAMADA] [-c QUANTIDADE] [ARRAY]" + +# help alias +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Define ou exibe apelidos (aliases).\n" +" \n" +" Sem argumentos, `alias' mostra a lista de apelidos no formato usável\n" +" `alias NOME=VALOR' na saída padrão.\n" +" \n" +" Do contrário, um apelido é definido para cada NOME cujo VALOR é dado.\n" +" Um espaço ao final em VALOR resulta na próxima palavra ser verificada\n" +" por substituição de apelido quando o apelido for expandido.\n" +" \n" +" Opções:\n" +" -p\tmostra todos os apelidos definidos em uma formato usável\n" +" \n" +" Status de saída:\n" +" `alias' retorna verdadeiro, a menos que seja fornecido um NOME para\n" +" o qual não se tenha definido um apelido" + +# help unalias +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Remove cada NOME da lista de apelidos definidos.\n" +" \n" +" Opções:\n" +" -a\tremove todas as definições de apelidos\n" +" \n" +" Retorna sucesso, a menos que NOME não seja um apelido existente." + +# help bind +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Define variáveis e associações de teclas para Readline.\n" +" \n" +" Associa uma sequência de teclas para uma função Readline ou uma macro\n" +" ou define uma variável de Readline. A sintaxe de argumento sem opção é\n" +" equivalente àquela encontrada em ~/.inputrc, mas deve ser passada como\n" +" um argumento singular.\n" +" \n" +" Opções:\n" +" -m MAPA-TECLAS Usa MAPA-TECLAS como mapa de teclas para a duração\n" +" deste comando. Nomes de mapa de teclas aceitáveis\n" +" são emacs, emacs-standard, emacs-meta, emacs-ctlx,\n" +" vi, vi-move, vi-command e vi-insert.\n" +" -l Lista nomes de funções.\n" +" -P Lista nomes e associações de função.\n" +" -p Lista funções e associações em uma forma que pode " +"ser\n" +" usada como entrada.\n" +" -S Lista sequências de teclas que chamam macros e " +"seus\n" +" valores\n" +" -s Lista sequências de teclas que chamam macros e " +"seus\n" +" valores em uma forma que pode ser usada como " +"entrada.\n" +" -V Lista nomes e valores de variáveis\n" +" -v Lista nomes e valores de variáveis em uma forma " +"que\n" +" pode ser usada como entrada.\n" +" -q NOME Consulta sobre quais teclas chamam a função " +"informada.\n" +" -u NOME Desassocia todas teclas que estão associadas à " +"função\n" +" informada.\n" +" -r SEQ-TECLAS Remove a associação para SEQ-TECLAS.\n" +" -f ARQUIVO Lê associações de tecla de ARQUIVO.\n" +" -x SEQ-TECLAS:COMANDO-SHELL\n" +" Faz com que COMANDO-SHELL seja executado ao " +"inserir\n" +" SEQ-TECLAS.\n" +" -X Lista sequência de teclas associadas com -x e " +"comandos\n" +" associados em uma forma que pode ser usada como\n" +" entrada.\n" +" \n" +" Status de saída:\n" +" `bind' retorna 0 a mesmo que uma opção desconhecida seja fornecida ou\n" +" um erro ocorrer." + +# help break +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Sai de loops de for, while ou until.\n" +" \n" +" Sai de um loop de FOR, WHILE ou UNTIL. Se N for especificado, quebra N \n" +" blocos de declaração de loops.\n" +" \n" +" Status de saída:\n" +" O status de saída é 0, a menos que N não seja maior ou igual a 1." + +# help continue +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Resume loops de for, while ou until.\n" +" \n" +" Resume a próxima iteração do bloco de declaração de loop de FOR, WHILE\n" +" ou UNTIL.\n" +" Se N for especificado, resume o N-ésimo bloco de declaração de loop.\n" +" \n" +" Status de saída:\n" +" O status de saída é 0, a menos que N não seja maior ou igual a 1." + +# help builtin +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Executa comandos internos (builtin) do shell.\n" +" \n" +" Executa COMANDO-INTERNO-SHELL com argumentos ARGs sem realizar procura\n" +" por comandos. Isso é útil quando você deseja reimplementar um comando\n" +" interno como uma função shell, mas precisa executar o comando interno\n" +" dentro de uma função.\n" +" \n" +" Status de saída:\n" +" Retorna o status de saída de COMANDO-INTERNO-SHELL ou falso, se\n" +" COMANDO-INTERNO-SHELL não for de fato um comando interno de shell." + +# help caller +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Retorna o contexto da chamada de sub-rotina atual.\n" +" \n" +" Sem EXPR, retorna \"$linha $arquivo\". Com EXPR, retorna\n" +" \"$linha $sub-rotina $arquivo\"; essa informação extra pode ser usada " +"para\n" +" fornecer um rastro da pilha.\n" +" \n" +" O valor de EXPR indica quantos quadros de chamada deve voltar antes do\n" +" atual; o quadro do topo é o quadro 0.\n" +" \n" +" Status de saída:\n" +" Retorna 0, a menos que o shell não esteja executando uma função de\n" +" shell ou EXPR seja inválida." + +# help cd +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Altera o diretório de trabalho do shell.\n" +" \n" +" Altera o diretório atual para DIR, sendo o padrão de DIR o mesmo valor\n" +" da variável HOME.\n" +" \n" +" A variável CDPATH define o caminho de pesquisa para o diretório " +"contendo\n" +" DIR. Nomes de diretórios alternativos em CDPATH são separados por\n" +" dois-pontos (:). Um nome de diretório nulo é o mesmo que o diretório\n" +" atual. Se DIR inicia com uma barra (/), então CDPATH não é usada.\n" +" \n" +" Se o diretório não for encontrado e a opção `cdable_vars` estiver " +"definida\n" +" no shell, a palavra é presumida como sendo o nome de uma variável. Se\n" +" tal variável possuir um valor, este valor é usado para DIR.\n" +" \n" +" Opções:\n" +" -L\tforça links simbólicos a serem seguidos: resolver links " +"simbólicos\n" +" \t\tem DIR após processar instâncias de `..'\n" +" -P\tusa a estrutura do diretório físico sem seguir links\n" +" \t\tsimbólicos: resolve links simbólicos em DIR antes de processar\n" +" \t\tinstâncias de `..'\n" +" -e\tse a opção -P for fornecida e o diretório de trabalho atual não\n" +" \t\tpuder ser determinado com sucesso, sai com um status não-zero\n" +" -@\tem sistemas nos quais haja suporte, apresenta um arquivo com\n" +" \t\tatributos estendidos como um diretório contendo os atributos de\n" +" \t\tarquivo\n" +" \n" +" O padrão é seguir links simbólicos, como se `-L' tivesse sido " +"especificada.\n" +" `..' é processada removendo o componente de caminho imediatamente " +"anterior\n" +" de volta para uma barra ou para o início de DIR.\n" +" \n" +" Status de saída:\n" +" Retorna 0, se o diretório tiver sido alterado e se $PWD está definida " +"com\n" +" sucesso quando a opção -P for usada; do contrário, retorna não-zero." + +# help pwd +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Mostra o nome do diretório de trabalho atual.\n" +" \n" +" Opções:\n" +" -L\tmostra o valor de $PWD se ele tiver o nome do diretório de\n" +" \t\ttrabalho atual\n" +" -P\tmostra o diretório físico, sem quaisquer links simbólicos\n" +" \n" +" Por padrão, `pwd' se comporta como se a opção `-L' foi especificada.\n" +" \n" +" Status de saída:\n" +" Retorna 0, a menos que uma opção inválida seja fornecida ou o diretório\n" +" atual não possa ser lido." + +# help : +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Comando nulo.\n" +" \n" +" Nenhum efeito; o comando não faz nada.\n" +" \n" +" Status de saída:\n" +" Sempre com sucesso." + +# help true +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Retorna um resultado de sucesso.\n" +" \n" +" Status de saída:\n" +" Sempre sucesso." + +# help false +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Retorna um resultado de insucesso.\n" +" \n" +" Status de saída:\n" +" Sempre falha." + +# help command +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Executa um comando simples ou exibe informação sobre comandos.\n" +" \n" +" Executa COMANDO com ARG suprimindo a procura por função do shell ou\n" +" exibe informação sobre os COMANDOs especificados. Pode ser usado para\n" +" chamar comandos no disco quando um função com o mesmo nome existe.\n" +" \n" +" Opções:\n" +" -p\tusa um valor padrão como variável PATH no qual garantidamente\n" +" \t\tse encontram todas os utilitários padrão\n" +" -v\tmostra uma descrição de COMANDO similar ao comando `type'\n" +" -V\tmostra uma descrição detalhada (verboso) para cada COMANDO\n" +" \n" +" Status de saída:\n" +" Retorna status de saída de COMANDO ou falha, se COMANDO não for \n" +" encontrado." + +# help declare +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Define valores e atributos de variável.\n" +" \n" +" Declara variáveis e a elas fornece atributos. Se nenhum NOME for " +"fornecido,\n" +" exibe os atributos e valores de todas as variáveis.\n" +" \n" +" Opções:\n" +" -f\trestringe ação ou exibição dos nomes e definições de funções\n" +" -F\trestringe exibição a nomes de função apenas (mais número de linha\n" +" \t\te arquivo fonte, na depuração)\n" +" -g\tcria variáveis globais quando usado em uma função do shell;\n" +" \t\tdo contrário, ignorado\n" +" -p\texibe os atributos e valores de cada NOME\n" +" \n" +" Opções que definem atributos:\n" +" -a\tpara fazer NOMEs serem arrrays indexados (se houver suporte)\n" +" -A\tpara fazer NOMEs serem arrrays associativos (se houver suporte)\n" +" -i\tpara fazer NOMEs terem o atributo `integer'\n" +" -l\tpara converter o valor de cada NOME para minúsculo em sua " +"atribuição\n" +" -n\tfazer de NOME uma referência à variável chamada por seu valor\n" +" -r\tpara fazer de NOMEs somente-leitura\n" +" -t\tpara fazer NOMEs terem o atributo `trace'\n" +" -u\tpara converter o valor de cada NOME para maiúsculo em sua " +"atribuição\n" +" -x\tpra fazer NOMEs exportar\n" +" \n" +" Usar `+' ao invés de `-' desliga o atributo dado.\n" +" \n" +" Variáveis com o atributo `integer' têm sua avaliação aritmética (veja o\n" +" comando `let') realizada quando é atribuído um valor à variável.\n" +" \n" +" Quando usado em uma função, `declare' torna NOMEs local, da mesma forma\n" +" que o comando `local'. A opção `-g' suprime este comportamento.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida tenha sido fornecida ou\n" +" ocorrer um erro de atribuição de variável." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Define valores e atributos de variável.\n" +" \n" +" Um sinônimo para `declare'. Veja `help declare'." + +# help local +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Define variáveis locais.\n" +" \n" +" Cria uma variável local chamada NOME e lhe dá VALOR. OPÇÃO pode ser\n" +" qualquer opção aceita pelo `declare'.\n" +" \n" +" Variáveis locais podem ser usadas apenas em uma função; elas são " +"visíveis\n" +" apenas para a função na qual elas foram definidas, bem como para seus\n" +" filhos.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida, ocorrer\n" +" um erro de atribuição de uma variável ou o shell não estiver executando\n" +" uma função." + +# help echo +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escreve argumentos para a saída padrão.\n" +" \n" +" Exibe os ARGs, separados por um único caractere de espaço e seguido\n" +" por uma nova linha, na saída padrão.\n" +" \n" +" Opções:\n" +" -n\tnão anexa uma nova linha\n" +" -e\thabilita interpretação de escapes de contrabarra a seguir\n" +" -E\texplicitação suprime interpretação de escapes de contrabarra\n" +" \n" +" `echo' interpreta os caracteres escapados por contrabarra:\n" +" \\a\talerta (bipe)\n" +" \\b\tbackspace\n" +" \\c\tsuprime futuras saídas\n" +" \\e\tcaractere de escape\n" +" \\E\tcaractere de escape\n" +" \\f\talimentação de formulário (form feed)\n" +" \\n\tnova linha\n" +" \\r\tretorno de carro (carrier return)\n" +" \\t\tTAB horizontal\n" +" \\v\tTAB vertical\n" +" \\\\\tcontrabarra\n" +" \\0nnn\to caractere cujo código ASCII é NNN (octal). NNN pode\n" +" \t\tter 0 a 3 dígitos octais\n" +" \\xHH\to caractere de 8 bits cujo valor é HH (hexadecimal). HH\n" +" \t\tpode ter um ou dois dígitos hexa\n" +" \\uHHHH\to caractere Unicode cujo valor é o valor hexadecimal HHHH.\n" +" \t\tHHHH pode ter um a quatro dígitos hexa.\n" +" \\UHHHHHHHH o caractere Unicode cujo valor é o valor hexadecimal\n" +" \t\tHHHHHHHH. HHHHHHHH pode ter um a oito dígitos hexa.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que ocorra um erro de escrita." + +# help echo +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escreve argumentos para a saída padrão.\n" +" \n" +" Exibe os ARGs na saída padrão seguido por uma nova linha.\n" +" \n" +" Opções:\n" +" -n\tnão anexa uma nova linha\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que ocorra um erro de escrita." + +# help enable +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Habilita e desabilita comandos internos do shell.\n" +" \n" +" Habilita e desabilita comandos internos do shell. Desabilitar\n" +" permite que você executa um comando do disco que possui o mesmo\n" +" nome que um outro comando interno sem usar um caminho completo.\n" +" \n" +" Opções:\n" +" -a\tmostra uma lista de comandos internos mostrando se cada\n" +" \t\tum está habilitado\n" +" -n\tdesabilita cada NOME ou exibe uma lista de comandos\n" +" \t\tinternos desabilitados\n" +" -p\texibe a lista de comandos internos em um formato usável\n" +" -s\texibe apenas nomes dos comandos internos 'especial' Posix\n" +" \n" +" Opções de controle de carregamento dinâmico:\n" +" -f\tcarrega comando interno NOME do objeto compartilhado ARQUIVO\n" +" -d\tremove um comando interno carregado com -f\n" +" \n" +" Não sendo informado uma opção, cada NOME é habilitado.\n" +" \n" +" Para usar o `test' encontrado em $PATH, ao invés da versão de comando\n" +" interno do shell, digite `enable -n test'.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que NOME não seja um comando interno de shell\n" +" ou ocorrer um erro." + +# help eval +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Executa argumentos como um comando de shell.\n" +" \n" +" Combina ARGs em uma única string, usa o resultado como entrada para o\n" +" shell, e executa os comandos resultantes.\n" +" \n" +" Status de saída:\n" +" Retorna status de saída do comando ou sucesso, se o comando for nulo." + +# help getopts +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Analisa argumentos de opções.\n" +" \n" +" Getopts é usado pelos procedimentos do shell para analisar parâmetros\n" +" posicionais como opções.\n" +" \n" +" OPÇÕES é uma string que contém as letras de opções a ser reconhecidas;\n" +" se uma letra é seguida por dois-pontos, é esperado que a opção tenha\n" +" um argumento, o que deveria ser separado dela por um espaço em branco.\n" +" \n" +" A cada vez que ele é chamado, getopts coloca a próxima opção\n" +" na variável shell $NOME, inicializando NOME se ela não existir,\n" +" e o índice do próximo argumento a ser processado para dentro da\n" +" variável OPTIND. OPTIND é inicializado para 1 a cada vez que o\n" +" shell ou um script shell é chamado. Quando uma opção requer\n" +" um argumento, getopts coloca aquele argumento em uma variável\n" +" shell chamada OPTARG.\n" +" \n" +" getopts relata erros em um de duas formas. Se o primeiro caractere\n" +" de OPÇÕES for caractere dois-pontos, getopts usa sistema silencioso de\n" +" relatório de erro. Neste modo, nenhuma mensagem de erro é mostrada.\n" +" Se uma opção inválida é vista, getopts coloca o caractere de opção\n" +" encontrada dentro do OPTARG. Se um argumento obrigatório não for\n" +" encontrado, getopts coloca um ':' em NOME e define OPTARG para o\n" +" caractere de opção encontrada. Se getopts não estiver no modo\n" +" silencioso, uma opção inválida é vista, getopts coloca um '?' em\n" +" NOME e remove definição de OPTARG. Se um argumento obrigatório não for\n" +" encontrado, um '?' é colocado em NOME, OPTARG tem sua definição " +"removida\n" +" e uma mensagem de diagnóstico é mostrada.\n" +" \n" +" Se a variável shell OPTERR possuir o valor 0, getopts desabilita a\n" +" exibição de mensagens de erro, mesmo se o primeiro caractere de\n" +" OPÇÕES não for dois-pontos. OPTERR tem o valor por padrão.\n" +" \n" +" Getopts normalmente analisa os parâmetros posicionais ($0 - $9), mas se\n" +" mais argumentos forem fornecidos, eles serão analisados.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, se uma opção for encontrada; falha se o fim das opções\n" +" for encontrado ou ocorrer um erro." + +# help exec +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Substitui o shell com o comando fornecido.\n" +" \n" +" Executa COMANDO, substituindo o shell com o programa especificado.\n" +" ARGUMENTOS se tornam os argumentos para COMANDO. Se COMANDO não for\n" +" especificado, quaisquer redirecionamentos surtem efeito no shell\n" +" atual.\n" +" \n" +" Opções:\n" +" -a NOME\tpassa NOME como argumento zero para COMANDO\n" +" -c\texecuta COMANDO com um ambiente vazio\n" +" -l\tcoloca um traço no argumento zero para COMANDO\n" +" \n" +" Se o comando não puder ser executado, um shell não-interativo sai,\n" +" a menos que a opção `execfail' esteja definida.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que COMANDO não seja encontrado ou ocorrer um\n" +" erro no redirecionamento." + +# help exit +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Sai do shell.\n" +" \n" +" Sai do shell com status igual a N. Se N for omitido, o status\n" +" de saída é o mesmo do último comando executado." + +# help exit +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Sai de um shell de login.\n" +" \n" +" Sai de um shell de login com o status de saída N. Retorna um erro\n" +" se não for executada em um shell de login." + +# help fc +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Exibe ou executa comandos da lista do histórico.\n" +" \n" +" fc é usado para listar ou editar e re-executar comandos da lista de\n" +" histórico. PRIMEIRO e ÚLTIMO podem ser números especificando o " +"intervalo\n" +" ou PRIMEIRO pode ser uma string, o que significa o comando mais recente\n" +" iniciando com aquela string.\n" +" \n" +" Opções:\n" +" -e EDITOR\tseleciona qual editor usar. O padrão é FCEDIT,\n" +" \t\t\tentão EDITOR, então vi\n" +" -l\t\tlista linhas ao invés de editar\n" +" -n\t\tomite números de linhas ao listar\n" +" -r\t\tordem reversa de linhas (mais novos listados primeiro)\n" +" \n" +" Com o formato `fc -s [ANTIGO=NOVO ...] [COMANDO]', COMANDO é\n" +" re-executado após a substituição ANTIGO=NOVO ser realizada.\n" +" \n" +" Um apelido útil para usar isso é r='fc -s', de forma que digitar `r cc'\n" +" executa o último comando iniciando com `cc' e digitar `r' re-executa\n" +" o último comando.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso ou status do comando executado; ocorrendo um erro,\n" +" retorna não-zero." + +# help fg +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Move um trabalho para o primeiro plano.\n" +" \n" +" Coloca o trabalho identificado por ESPEC-JOB em primeiro plano,\n" +" tornando o trabalho atual. Se ESPEC-JOB não estiver presente,\n" +" a noção do shell de trabalho atual é usada.\n" +" \n" +" Status de saída:\n" +" Status do comando colocado em primeiro plano ou falha, se ocorrer um " +"erro." + +# help bg +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Move trabalhos para o plano de fundo.\n" +"\n" +" Coloca os trabalhos identificados por ESPEC-JOB em plano de fundo,\n" +" como se eles tivessem sido iniciado com `&'. Se ESPEC-JOB não\n" +" estiver presente, a noção do shell de trabalho atual é usada.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que controle de trabalho não esteja\n" +" habilitado ou ocorra um erro." + +# help hash +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Memoriza ou exibe localizações de programas.\n" +" \n" +" Determina e memoriza do caminho completo de cada comando NOME. Se " +"nenhum\n" +" argumento for fornecido, exibe informação sobre comandos memorizados.\n" +" \n" +" Opções:\n" +" -d\t\tesquece a localização memorizada de cada NOME\n" +" -l\t\texibe em um formato que pode ser usado como entrada\n" +" -p CAMINHO\tusa CAMINHO como o caminho completo de NOME\n" +" -r\t\tesquece de todas as localizações memorizadas\n" +" -t\t\tmostra a localização memorizada de cada NOME, iniciando\n" +" \t\t\tcada localização com o NOME correspondente, se múltiplos\n" +" \t\t\tNOMEs forem fornecidos\n" +" Argumentos:\n" +" NOME\t\tCada NOME é pesquisado em $PATH e adicionado à lista de\n" +" \t\t\tcomandos memorizados.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que NOME não seja encontrado ou uma opção\n" +" inválida seja fornecida." + +# help help +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Exibe informação sobre comandos internos (builtin).\n" +" \n" +" Exibe resumos de comandos internos. Se PADRÃO for especificado,\n" +" fornece ajuda detalhada sobre todos os comandos correspondendo\n" +" a PADRÃO; do contrário, a lista de tópicos de ajuda é mostrada.\n" +" \n" +" Opções:\n" +" -d\texibe uma descrição breve para cada tópico\n" +" -m\texibe o uso em formato pseudo-manpage\n" +" -s\texibe apenas uma breve sinopse de uso para cada tópico\n" +" \t\tcorrespondendo a PADRÃO\n" +" \n" +" Argumentos:\n" +" PADRÃO\tPadrão especificando um tópico de ajuda\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que PADRÃO não seja encontrado ou uma opção\n" +" inválida seja fornecida." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Exibe ou manipula a lista de histórico.\n" +" \n" +" Exibe a lista de histórico com números de linhas, prefixando cada\n" +" entrada modificada com um `*'. Um argumento de N lista apenas as\n" +" últimas N entradas.\n" +" \n" +" Opções:\n" +" -c\t\tlimpa a lista de histórico ao excluir todas as entradas\n" +" -d POSIÇÃO\texclui a entrada de histórico na posição POSIÇÃO. " +"Posições\n" +"\t\t\tnegativas contam a partir do fim da lista de histórico\n" +" \n" +" -a\t\tanexa linhas de histórico desta sessão no arquivo de\n" +" \t\t\thistórico\n" +" -n\t\tlê todas as linhas de histórico ainda não lidas do\n" +" \t\t\tarquivo de histórico e anexa-os à lista de histórico\n" +" -r\t\tlê o histórico e anexa os conteúdos à lista de histórico\n" +" -w\t\tescreve o histórico atual para o arquivo de histórico\n" +" \n" +" -p\t\texecuta expansão de histórico em cada ARG e exibe o\n" +" \t\t\tresultado sem armazená-lo na lista de histórico\n" +" -s\t\tanexa os ARGs à lista de histórico como uma única entrada\n" +" \n" +" Se ARQUIVO for fornecido, ele é usado como o arquivo de histórico.\n" +" Do contrário, se a variável HISTFILE tiver um valor, este será usado;\n" +" senão, usa de ~/.bash_history.\n" +" \n" +" Se a variável HISTTIMEFORMAT for definida e não for nula, seu valor é\n" +" usado como uma string de formato para strftime(3) para mostrar a marca\n" +" de tempo associada com cada entrada de histórico exibida. Do contrário,\n" +" nenhuma marca de tempo é mostrada.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." + +# help jobs +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Exibe status de trabalhos.\n" +" \n" +" Lista os trabalhos ativos. ESPEC-JOB restringe a saída àquele trabalho.\n" +" Não sendo informado qualquer opção, o status de todos os trabalhos\n" +" ativos é exibido.\n" +" \n" +" Opções:\n" +" -l\tlista IDs de processo junto com a informação normal\n" +" -n\tlista apenas processos que tiverem seu status alterado desde\n" +" \t\ta última notificação\n" +" -p\tlista apenas IDs de processo\n" +" -r\trestringe a saída apenas a trabalhos em execução\n" +" -s\trestringe a saída apenas a trabalhos parados\n" +" \n" +" Se -x for fornecido, COMANDO é executado após as demais especificações\n" +" de trabalho que aparecerem em ARGs terem sido substituídas com o ID de\n" +" processo daquele líder de grupo de processos do trabalhos.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro. Se -x for usado, retorna o status de saída do COMANDO." + +# help disown +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Remove trabalhos do shell atual.\n" +" \n" +" Remove cada argumento ESPEC-JOB da tabela de trabalhos ativos. Sem\n" +" qualquer ESPEC-JOB, o shell usa sua noção de trabalho atual.\n" +" \n" +" Opções:\n" +" -a\tremove todos os trabalhos se ESPEC-JOB não for fornecido\n" +" -h\tmarca cada ESPEC-JOB, de forma que SIGHUP não seja fornecido\n" +" \t\tao trabalho, caso o shell receba um SIGHUP\n" +" -r\tremove apenas trabalhos em execução\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida ou ESPEC-JOB inválido\n" +" sejam fornecidos." + +# help kill +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Envia um sinal para um trabalho.\n" +"\n" +" Envia aos processos identificados pelo PID ou pelo ESPEC-JOB o sinal\n" +" informado por SIGSPEC ou SIGNUM. Se SIGSPEC e SIGNUM\n" +" não estiverem presentes, então, SIGTERM é presumido.\n" +" \n" +" Opções:\n" +" -s SIGSPEC\tSIGSPEC especifica o nome do sinal\n" +" -n SIGNUM\t\tSIGNUM representa um número de sinal\n" +" -l\t\t\tlista os nomes dos sinais; se `-l' for acompanhado por\n" +" \t\t\t\toutros argumentos, presume-se estes sejam números de\n" +" \t\t\t\tsinais para os quais nomes deveriam ser listados\n" +" -L\t\t\tsinônimo de -l\n" +" \n" +" `Kill' é um comando interno do shell por duas razões: ele permite\n" +" IDs de trabalho serem usados ao invés de IDs de processo e permite\n" +" que processos sejam matados caso o limite de processos que você pode\n" +" criar seja atingido.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." + +# help let +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Avalia expressões aritméticas.\n" +" \n" +" Avalia cada ARG como uma expressão aritmética. A avaliação é feita\n" +" em inteiros com largura fixa com nenhuma verificação de estouro de\n" +" pilha. A lista de operadores a seguir está agrupada em níveis de\n" +" operadores de igual precedência. Os níveis estão listados em ordem\n" +" de precedência decrescente.\n" +" \n" +" \tid++, id-- pós-acréscimo, pós-decréscimo de variável\n" +" \t++id, --id pré-acréscimo, pré-decréscimo de variável\n" +" \t-, + menos, mais unário\n" +" \t!, ~ negação lógica e bit-a-bit\n" +" \t** exponenciação\n" +" \t*, /, % multiplicação, divisão, resto de divisão\n" +" \t+, - adição, subtração\n" +" \t<<, >> deslocamento bit-a-bit para esquerda, direita\n" +" \t<=, >=, <, > comparação\n" +" \t==, != igualdade, desigualdade\n" +" \t& E (AND) bit-a-bit\n" +" \t^ OU eXclusivo (XOR) bit-a-bit\n" +" \t| OU (OR) bit-a-bit\n" +" \t&& E lógico\n" +" \t|| OU lógico\n" +" \texpr ? expr : expr operador condicional\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |= atribuição\n" +" \n" +" As variáveis de shell são permitidas como operandos. O nome da\n" +" variável é substituída pelo seu valor (coagida a um inteiro com\n" +" largura fixa) dentro de uma expressão. A variável não precisa ter\n" +" seu atributo de `inteiro' ligado para ser usada em uma expressão.\n" +" \n" +" Operadores são avaliados em ordem de precedência. Sub-expressões em\n" +" parênteses são avaliados primeiro e podem sobrescrever as regras de\n" +" precedência acima.\n" +" \n" +" Status de saída:\n" +" Se o último ARG for avaliado como 0, let retorna 1; do contrário,\n" +" let retorna 0." + +# help read +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Lê uma linha da entrada padrão e separa em campos.\n" +"\n" +" Lê uma linha da entrada padrão ou do descritor de arquivo FD, caso a\n" +" opção -u seja fornecida. A linha é separada em campos, na mesma forma " +"de\n" +" separação de palavras, e a primeira palavra é atribuída ao primeiro " +"NOME,\n" +" o segundo ao segundo NOME e por aí vai, com qualquer palavras restantes\n" +" atribuídas para o último NOME. Apenas os caracteres encontrados em $IFS\n" +" são reconhecidos como delimitadores de palavras.\n" +" \n" +" Se nenhum NOME for fornecido, a linha lida é armazenada na variável\n" +" REPLY (resposta).\n" +" \n" +" Opções:\n" +" -a ARRAY atribui as palavras lidas a índices sequenciais da\n" +" variável array ARRAY, iniciando em zero\n" +" -d DELIM continua até o primeiro caractere de DELIM ser lido, ao\n" +" invés de nova linha\n" +" -e usa Readline para obter a linha\n" +" -i TEXTO usa TEXTO como o texto inicial para Readline\n" +" -n NCHARS retorna após ler NCHARS caracteres, ao invés de esperar\n" +" por uma nova linha, mas respeita um delimitador se " +"número\n" +" de caracteres menor que NCHARS sejam lidos antes do\n" +" delimitador\n" +" -N NCHARS retorna apenas após ler exatamente NCHARS caracteres, a\n" +" menos que EOF (fim do arquivo) seja encontrado ou " +"`read'\n" +" esgote o tempo limite, ignorando qualquer delimitador\n" +" -p CONFIRMAR mostra a string PROMPT sem remover nova linha antes de\n" +" tentar ler\n" +" -r não mostra barra invertida para escapar quaisquer\n" +" caracteres\n" +" -s não ecoa entrada vindo de um terminal\n" +" -t TEMPO esgota-se o tempo limite e retorna falha, caso uma toda\n" +" uma linha não seja lida em TEMPO segundos. O valor da\n" +" variável TMOUT é o tempo limite padrão. TEMPO pode ser " +"um\n" +" número fracionado. SE TEMPO for 0, `read' retorna " +"sucesso\n" +" apenas se a entrada estiver disponível no descritor de\n" +" arquivo especificado. O status de saída é maior que " +"128,\n" +" se o tempo limite for excedido\n" +" -u FD lê do descritor de arquivo FD, ao invés da entrada " +"padrão\n" +" \n" +" Status de saída:\n" +" O código de retorno é zero, a menos que o EOF (fim do arquivo) seja\n" +" encontrado, `read' esgote o tempo limite (caso em que o código de " +"retorno\n" +" será 128), ocorra erro de atribuição de uma variável ou um descritor de\n" +" arquivo inválido seja fornecido como argumento para -u." + +# help return +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Retorna de uma função de shell.\n" +" \n" +" Causa uma função ou script carregado (source) a sair retornando o valor\n" +" especificado por N. Se N for omitido, o status de retorno é do último\n" +" comando executado dentro da função ou script.\n" +" \n" +" Status de saída:\n" +" Retorna N ou falha se o shell não estiver executando uma função ou\n" +" script." + +# help set +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Define ou remove definição de valores das opções e dos parâmetros " +"posicionais\n" +"do shell:\n" +" \n" +" Altera o valor de opções e de parâmetros posicionais do shell ou mostra\n" +" os nomes ou valores de variáveis shell.\n" +" \n" +" Opções:\n" +" -a Marca variáveis, que foram modificadas ou criadas, para " +"exportação.\n" +" -b Notifica sobre terminação de trabalho imediatamente.\n" +" -e Sai imediatamente se um comando sai com um status não-zero.\n" +" -f Desabilita a geração de nome de arquivo (\"globbing\").\n" +" -h Memoriza a localização de comandos à medida em que são " +"procurados.\n" +" -k Todos argumentos de atribuição são colocados no ambiente para um\n" +" comando, e não apenas aqueles que precedem o nome do comando.\n" +" -m Controle de trabalho está habilitado.\n" +" -n Lê comandos, mas não os executa.\n" +" -o NOME-OPÇÃO\n" +" Define a variável correspondendo a NOME-OPÇÃO:\n" +" allexport mesmo que -a\n" +" braceexpand mesmo que -B\n" +" emacs usa interface de edição de linha estilo Emacs\n" +" errexit mesmo que -e\n" +" errtrace mesmo que -E\n" +" functrace mesmo que -T\n" +" hashall mesmo que -h\n" +" histexpand mesmo que -H\n" +" history habilita histórico de comandos\n" +" ignoreeof shell não vai sair após leitura de EOF\n" +" interactive-comments\n" +" permite mostrar comentários em comandos " +"interativos\n" +" keyword mesmo que -k\n" +" monitor mesmo que -m\n" +" noclobber mesmo que -C\n" +" noexec mesmo que -n\n" +" noglob mesmo que -f\n" +" nolog atualmente aceito, mas ignorado\n" +" notify mesmo que -b\n" +" nounset mesmo que -u\n" +" onecmd mesmo que -t\n" +" physical mesmo que -P\n" +" pipefail o valor de retorno de uma linha de comandos é o\n" +" status do último comando a sair com status não-" +"zero,\n" +" ou zero se nenhum comando saiu com status não " +"zero\n" +" posix altera o comportamento do bash, onde a operação\n" +" padrão diverge dos padrões do Posix para\n" +" corresponder a estes padrões\n" +" privileged mesmo que -p\n" +" verbose mesmo que -v\n" +" vi usa interface de edição de linha estilo vi\n" +" xtrace mesmo que -x\n" +" -p Ligado sempre que IDs de usuário real e efetivo não " +"corresponderem.\n" +" Desabilita processamento do arquivo $ENV e importação de funções " +"da\n" +" shell. Ao desligar essa opção, causa o uid e o gid efetivo serem\n" +" os uid e gid reais.\n" +" -t Sai após a leitura e execução de um comando.\n" +" -u Trata limpeza (unset) de variáveis como um erro quando " +"substituindo.\n" +" -v Mostra linhas de entrada do shell na medida em que forem lidas.\n" +" -x Mostra comandos e seus argumentos na medida em que forme " +"executados.\n" +" -B o shell vai realizar expansão de chaves\n" +" -C Se definido, não permite arquivos normais existentes serem\n" +" sobrescritos por redirecionamento da saída.\n" +" -E Se definido, a armadilha ERR é herdada por funções do shell.\n" +" -H Habilita substituição de histórico estilo \"!\". Essa sinalização " +"está\n" +" habilitada por padrão quando shell é interativa.\n" +" -P Se definida, não resolve links simbólicos ao sair de comandos, " +"tais\n" +" como `cd' (que altera o diretório atual).\n" +" -T Se definido, a armadilha DEBUG e RETURN são herdadas por funções " +"do shell.\n" +" -- Atribui quaisquer argumentos restantes aos parâmetros " +"posicionais.\n" +" Se não houver argumentos restantes, os parâmetros posicionais são\n" +" limpos (unset).\n" +" - Atribui quaisquer argumentos restantes aos parâmetros " +"posicionais.\n" +" As opções -x e -v são desligadas.\n" +" \n" +" Usar +, ao invés de -, causa essas sinalizações serem desligadas. As\n" +" sinalizações também podem ser usadas por meio de chamada do shell. As\n" +" sinalizações atualmente definidas podem ser encontradas em $-. Os n " +"ARGs\n" +" restantes são parâmetros posicionais e são atribuídos, em ordem, a $1, " +"$2,\n" +" .. $n. Se nenhuma ARG for fornecido, todas as variáveis shell são\n" +" mostradas.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida." + +# help unset +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Remove valores e atributos de variáveis e funções do shell.\n" +" \n" +" Para cada NOME, remove a variável ou função correspondente.\n" +" \n" +" Opções:\n" +" -f trata cada NOME como uma função de shell\n" +" -v trata cada NOME como uma variável de shell\n" +" -n trata cada NOME como um nome referência e remove o valor em si\n" +" ao invés da variável a qual ele se refere\n" +" \n" +" Se opções, `unset' primeiro tenta remover uma variável e, se falhar,\n" +" tenta remover uma função.\n" +" \n" +" Algumas variáveis não podem ser removida; veja também `readonly'.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" um NOME seja somente-leitura." + +# help export +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Define atributo de exportação para variáveis shell.\n" +" \n" +" Marca cada NOME para exportação automática para o ambiente dos comandos\n" +" executados subsequentemente. Se VALOR for fornecido, atribui VALOR " +"antes\n" +" de exportar.\n" +" \n" +" Opções:\n" +" -f\tfaz referência a funções do shell\n" +" -n\tremove a propriedade de exportação para cada NOME\n" +" -p\texibe uma lista de todas as variáveis e funções exportadas\n" +" \n" +" Um argumento de `--' desabilita processamento de opções posteriores.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" NOME seja inválido." + +# help readonly +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Marca variáveis shell como inalteráveis.\n" +" \n" +" Marca cada NOME como somente-leitura; os valores desses NOMEs pode não\n" +" ser alterados por atribuídos subsequentes. Se VALOR for fornecido,\n" +" atribui VALOR antes de marcar como somente-leitura.\n" +" \n" +" Opções:\n" +" -a\tfaz referência a variáveis array indexados\n" +" -A\tfaz referência a variáveis array associativos\n" +" -f\tfaz referência a funções de shell\n" +" -p\texibe uma lista de todas as variáveis ou funções somente-leitura,\n" +" \t\tdependendo da opção -f ser informada ou não\n" +" \n" +" Um argumento de `--' desabilita processamento de opções posteriores.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" NOME seja inválido." + +# help shift +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Desloca parâmetros posicionais.\n" +" \n" +" Renomeia os parâmetros posicionais $N+1,$N+2 ... até $1,$2 ... Se N " +"não\n" +" for fornecido, presume-se que ele seja 1.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que N seja negativo ou maior que $#." + +# help source +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Executa comandos de um arquivo no shell atual.\n" +" \n" +" Lê e executa comandos de ARQUIVO no shell atual. As entradas em\n" +" $PATH são usadas para localizar o diretório contendo ARQUIVO. Se\n" +" quaisquer ARGUMENTOS forem fornecidos, eles se tornam parâmetros\n" +" posicionais quando ARQUIVO é executado.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado em ARQUIVO; falha se\n" +" ARQUIVO não puder ser lido." + +# help suspend +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspende execução do shell.\n" +" \n" +" Suspende a execução deste shell até que receba um sinal SIGCONT.\n" +" A menos que seja forçado, `shells` de login não podem ser suspensas.\n" +" \n" +" Opções:\n" +" -f\tforça a suspensão, ainda que o shell seja um de login\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que controle de trabalho não esteja habilitado\n" +" ou ocorra um erro." + +# help test +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Avalia expressão condicional.\n" +" \n" +" Sai com um status de 0 (verdadeiro) ou 1 (falso) dependendo da " +"avaliação\n" +" de EXPR. As expressões podem ser unárias ou binárias. Expressões " +"unárias\n" +" são normalmente usadas para examinar o status de um arquivo. Há\n" +" operadores de strings e também há operadores de comparação numérica.\n" +" \n" +" O comportamento do teste depende do número de argumentos. Leia a página\n" +" de manual do `bash' para a especificação completa.\n" +" \n" +" Operadores de arquivos:\n" +" \n" +" -a ARQUIVO Verdadeiro, se arquivo existir.\n" +" -b ARQUIVO Verdadeiro, se arquivo for um bloco especial.\n" +" -c ARQUIVO Verdadeiro, se arquivo for um caractere especial.\n" +" -d ARQUIVO Verdadeiro, se arquivo for um diretório.\n" +" -e ARQUIVO Verdadeiro, se arquivo existir.\n" +" -f ARQUIVO Verdadeiro, se arquivo existir e for um arquivo " +"normal.\n" +" -g ARQUIVO Verdadeiro, se arquivo for set-group-id.\n" +" -h ARQUIVO Verdadeiro, se arquivo for um link simbólico.\n" +" -L ARQUIVO Verdadeiro, se arquivo for um link simbólico.\n" +" -k ARQUIVO Verdadeiro, se arquivo tiver o bit `sticky' definido.\n" +" -p ARQUIVO Verdadeiro, se arquivo for um `pipe' dado.\n" +" -r ARQUIVO Verdadeiro, se arquivo for um legível por você.\n" +" -s ARQUIVO Verdadeiro, se arquivo existir e não estiver vazio.\n" +" -S ARQUIVO Verdadeiro, se arquivo for um socket.\n" +" -t FD Verdadeiro, se FD estiver aberto em um terminal.\n" +" -u ARQUIVO Verdadeiro, se arquivo estiver com set-user-id.\n" +" -w ARQUIVO Verdadeiro, se arquivo puder ser escrito por você.\n" +" -x ARQUIVO Verdadeiro, se arquivo puder ser executado por você.\n" +" -O ARQUIVO Verdadeiro, se arquivo efetivamente for seu (owned).\n" +" -G ARQUIVO Verdadeiro, se arquivo efetivamente for do seu grupo.\n" +" -N ARQUIVO Verdadeiro, se arquivo foi modificado desde a última\n" +" leitura.\n" +" \n" +" ARQ1 -nt ARQ2 Verdadeiro se ARQ1 for mais novo que ARQ2, conforme\n" +" última data de modificação.\n" +" \n" +" ARQ1 -ot ARQ2 Verdadeiro, se ARQ1 for mais velho que ARQ2.\n" +" \n" +" ARQ1 -ef ARQ2 Verdadeiro, se ARQ1 for um link rígido para ARQ2.\n" +" \n" +" Operadores de string:\n" +" \n" +" -z STRING Verdadeiro, se string estiver vazia.\n" +" \n" +" -n STRING\n" +" STRING Verdadeiro, se string não estiver vazia.\n" +" \n" +" STRING1 = STRING2\n" +" Verdadeiro, se strings forem iguais.\n" +" STRING1 != STRING2\n" +" Verdadeiro, se strings não forem iguais.\n" +" STRING1 < STRING2\n" +" Verdadeiro, se STRING1 estiver antes de STRING2, de\n" +" acordo com a ordem alfabética.\n" +" STRING1 > STRING2\n" +" Verdadeiro, se STRING1 estiver depois de STRING2, de\n" +" acordo com a ordem alfabética.\n" +" \n" +" Outros operadores:\n" +" \n" +" -o OPÇÃO Verdadeiro, se a opção shell OPÇÃO estiver habilitada.\n" +" -v VAR Verdadeiro, se a variável shell VAR estiver definida.\n" +" -R VAR Verdadeiro, se a variável shell VAR estiver definida\n" +" e for uma referência de nome.\n" +" ! EXPR Verdadeiro, se a expressão EXPR for falsa.\n" +" EXPR1 -a EXPR2 Verdadeiro, se ambas EXPR1 e EXPR2 forem verdadeiras.\n" +" EXPR1 -o EXPR2 Verdadeiro, se ao menos uma das expressões for " +"verdadeira.\n" +" \n" +" arg1 OP arg2 Testes aritméticos. OP é um dentre -eq, -ne, -lt, -" +"le,\n" +" -gt, or -ge.\n" +" \n" +" Operadores binários de aritmética retornam verdadeiro se ARG1 for " +"igual,\n" +" não-igual, menor-que, menor-ou-igual-a ou maior-ou-igual-a ARG2.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, se EXPR for avaliada como verdadeira; falha, se EXPR " +"for\n" +" avaliada como falsa ou um argumento inválido for informado." + +# help [ +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Avalia expressões condicionais.\n" +" \n" +" Esse é um sinônimo para o comando interno `test', mas o último\n" +" argumento deve ser um `]' literal, para corresponder ao `[' que abriu." + +# help times +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Exibe tempos de processos.\n" +" \n" +" Imprime os tempos de sistema e de usuário acumulados pelo shell e\n" +" todos seus processo filhos.\n" +" \n" +" Status de saída:\n" +" Sempre com sucesso." + +# help trap +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Tratamento de sinais e outros eventos.\n" +" \n" +" Define e ativa manipuladores a serem executados quando o shell recebe\n" +" sinais ou outras condições.\n" +" \n" +" ARG é um comando a ser lido e executado quando o shell recebe o\n" +" ESPEC-SINAL do(s) sinal(is). Se ARG for vazio (e um único ESPEC-SINAL\n" +" for informado) ou `-', cada sinal especificado é redefinido para seu\n" +" valor original. Se ARG for uma string nula, cada ESPEC-SINAL é ignorado\n" +" pela seu shell e pelos comados chamados por ela.\n" +" \n" +" Se um ESPEC-SINAL for EXIT (0), ARG é executado na saída do shell.\n" +" Se ESPEC-SINAL for DEBUG, ARG é executado antes de todo comando.\n" +" Se ESPEC-SINAL for RETURN, ARG é executado toda vez que uma função ou\n" +" um script shell executados pelos comandos internos `.' ou `source'\n" +" finalizarem suas execuções. Um ESPEC-SINAL sendo ERR significa executar\n" +" ARG toda vez que uma falha do comando poderia causar o shell sair,\n" +" quando a opção -e está habilitada.\n" +" \n" +" Se nenhum argumento for fornecido, `trap' imprime a lista de comandos\n" +" associados a cada sinal.\n" +" \n" +" Opções:\n" +" -l\timprime uma lista de nomes de sinais e seus números\n" +" \t\tcorrespondentes\n" +" -p\texibe os comandos associados ao tratamento com cada\n" +" \t\tESPEC-SINAL\n" +" \n" +" Cada ESPEC-SINAL é um nome de sinal em ou um número\n" +" de sinal. Nomes de sinais são sensíveis a caracteres maiúsculo e\n" +" minúsculo e o prefixo SIG (sinal) é opcional. Um SINAL pode ser enviado\n" +" para o shell com \"kill -SINAL $$\".\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que um ESPEC-SINAL seja inválido ou\n" +" uma opção inválida seja fornecida." + +# help type +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Exibe informação sobre o tipo de comando.\n" +" \n" +" Para cada NOME, indica como ele seria interpretado se fosse usado como\n" +" um nome de comando.\n" +" \n" +" Opções:\n" +" -a\texibe todas as localizações contendo um executável chamado NOME;\n" +" \t\tinclui apelidos (alias), comandos internos e funções,\n" +" \t\tse, e somente se, a opção `-p' não for usada em conjunto\n" +" -f\tsuprime a procura por função do shell\n" +" -P\tforça uma pesquisa em PATH por cada NOME, mesmo se ele for\n" +" \t\tum apelido, um comando interno ou uma função, e retorna o nome\n" +" \t\tdo arquivo de disco que seria executado\n" +" -p\tretorna o nome do arquivo de disco que seria executado ou nada,\n" +" \t\tse `type -t NOME' não retornasse `file'\n" +" -t\tmostra uma única palavra que é uma dentre `alias', `keyword',\n" +" \t\t`function', `builtin', `file' ou `', se NOME for um apelido,\n" +" \t\tpalavra reservada da shell, comando interno do shell,\n" +" \t\tarquivo de disco ou não encontrado, respectivamente\n" +" \n" +" Argumentos:\n" +" NOME\tNome de comando a ser interpretado.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, se todos os NOMEs forem encontrados; falha, se algum\n" +" deles não for encontrado." + +# help ulimit +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modifica limites de recursos do shell.\n" +" \n" +" Fornece controle sobre os recursos disponíveis para o shell e\n" +" seus processos, em sistemas que permitem tal controle.\n" +" \n" +" Opções:\n" +" -S\tusa um limite `soft' de recursos\n" +" -H\tusa um limite `hard' de recursos\n" +" -a\ttodos os limites atuais são relatados\n" +" -b\to tamanho do buffer do socket\n" +" -c\to tamanho máximo dos arquivos centrais criados\n" +" -d\to tamanho máximo de um segmento de dados do processo\n" +" -e\ta prioridade máxima de agendamento (`nice')\n" +" -f\to tamanho máximo de arquivos escritos pelo shell e seus filhos\n" +" -i\to número máximo de sinais pendentes\n" +" -k\to número máximo de kqueues alocadas para este processo\n" +" -l\to tamanho máximo que um processo pode alocar da memória\n" +" -m\to tamanho máximo de conjunto residente\n" +" -n\to número máximo de descritores de arquivo abertos\n" +" -p\to tamanho de buffer de `pipe'\n" +" -q\to número máximo de bytes em files de mensagem POSIX\n" +" -r\to tempo real máximo de prioridade de agendamento\n" +" -s\to tamanho máximo de pilha\n" +" -t\ta quantidade máxima de tempo de CPU em segundos\n" +" -u\to número máximo de processos de usuário\n" +" -v\to tamanho de memória virtual\n" +" -x\to número máximo de travas de arquivos\n" +" -P\to número máximo de pseudo-terminais\n" +" -T\to número máximo de fluxos (threads)\n" +" \n" +" Nem todas as opções estão disponíveis em todas as plataformas.\n" +" \n" +" Se LIMITE for fornecido, ele é o novo valor do recurso especificado;\n" +" os valores especiais de LIMITE `soft', `hard' e `unlimited' referem-se\n" +" ao atual limite suave, o atual limite rígido e nenhum limite,\n" +" respectivamente. Do contrário, o valor atual do recurso especificado\n" +" é impresso. Se nenhuma opção for fornecida, então -f é presumida.\n" +" \n" +" Valores estão em acréscimos de 1024 bytes, exceto para -t, que está\n" +" em segundos; -p, que é em 512 bytes; e -u, que é um número sem\n" +" escala de processos.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." + +# help umask +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Exibe ou define máscara de modo de arquivo.\n" +" \n" +" Define a máscara de criação de arquivos do usuário para MODO. Se MODO\n" +" for omitido, imprime o valor atual da máscara.\n" +" \n" +" Se MODO inicia com um dígito, ele é interpretado como um número octal;\n" +" do contrário, ele é uma string de modo simbólico como a que é aceita\n" +" pelo chmod(1).\n" +" \n" +" Opções:\n" +" -p\tse MODO for omitido, exibe em um formulário que pode ser usado\n" +" \t\tcomo entrada\n" +" -S\ttorna a saída simbólica; do contrário, um número octal é mostrado\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que MODO seja inválido ou uma opção\n" +" inválida seja fornecida." + +# help wait +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Espera por conclusão de trabalho e retorna o status de saída.\n" +" \n" +" Espera por cada processo identificado por um ID, o que pode ser um ID\n" +" de processo ou uma especificação de trabalho, e relata seu status de\n" +" término. Se ID não for fornecido, espera por todos os processos filhos\n" +" ativos e o status de retorno é zero. Se ID é uma especificação de\n" +" trabalho, espera por todos os processos naquela sequência de comandos\n" +" dos trabalhos.\n" +" \n" +" Se a opção -n for fornecida, espera pelo próximo trabalho terminar e\n" +" retorna seu status de trabalho.\n" +" \n" +" Se a opção -f for fornecida, e o controle de trabalho estiver ativado,\n" +" espera o ID especificado terminar, em vez de esperar ele alterar o\n" +" status.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último ID; falha, se ID for inválido ou uma opção\n" +" inválida for fornecida." + +# help wait +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Espera por conclusão de processo e retorna o status de saída.\n" +" \n" +" Espera por cada processo especificado por um PID e relata seu status\n" +" de término. SE PID não for fornecido, espera por todos os processos\n" +" filhos atualmente ativos e o status de retorno é zero. PID deve ser\n" +" um ID de processo.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último ID; falha, se ID for inválido ou uma opção\n" +" inválida for fornecida." + +# help for +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos para cada membro em uma lista.\n" +" \n" +" O loop `for' executa uma sequência de comandos para cada membro em\n" +" uma lista de itens. Se `in PALAVRAS ...;' não estiver presente, então\n" +" `in \"$@\"' é presumido. Para cada elemento em PALAVRAS, NOME é " +"definido\n" +" com aquele elemento e os COMANDOS são executados.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +# help for (( (?) +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Loop `for' aritmético.\n" +" \n" +" Equivalente a\n" +" \t(( EXPR1 ))\n" +" \twhile (( EXPR2 )); do\n" +" \t\tCOMANDOS\n" +" \t\t(( EXPR3 ))\n" +" \tdone\n" +" EXPR1, EXPR2 e EXPR3 são expressões aritméticas. Se alguma expressão\n" +" for omitida, ele se comporta como se a avaliação resultasse em 1.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +# help select +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Seleciona palavras de uma lista e executa comandos.\n" +" \n" +" As PALAVRAS são expandidas, gerando uma lista de palavras.\n" +" O conjunto de palavras expandidas é exibido no erro padrão,\n" +" cada um precedido por um número. Se `in PALAVRAS' não estiver\n" +" presente, `in \"$@\"' é presumido. Então, o prompt PS3 é exibido\n" +" e uma linha é lida da entrada padrão. Se a linha consiste\n" +" do número correspondendo àquele nas palavras exibidas, então\n" +" NOME é definido para aquela palavra. Se a linha estiver vazia,\n" +" PALAVRAS e o prompt são exibidos novamente. Se EOF (fim do\n" +" arquivo) for lido, o comando conclui. Qualquer outro valor\n" +" lido causa NOME ser definido como nulo. A linha lida é salva\n" +" na variável REPLY. COMANDOS são executados após cada seleção\n" +" até um comando `break' ser executado.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +# help time +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Relata o tempo consumido pela execução da linha de comandos.\n" +" \n" +" Executa LINHA-COMANDOS e imprime um resumo do tempo real,\n" +" tempo de CPU do usuário e do sistema, gastos executando\n" +" LINHA-COMANDOS, quando este terminar.\n" +" \n" +" Opções:\n" +" -p\timprime o resumo do tempo no formato portátil do Posix\n" +" \n" +" O valor da variável TIMEFORMAT é usada como formato de saída.\n" +" \n" +" Status de saída:\n" +" O status de retorno é o status retornado por LINHA-COMANDOS." + +# help case +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos baseados em correspondência de padrão.\n" +" \n" +" Seletivamente executa COMANDOS baseados na PALAVRA correspondendo\n" +" a PADRÃO. O `|' é usado para separar múltiplos padrões.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +# help if +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos baseados em condicional.\n" +" \n" +" A lista `if COMANDOS' é executada. Se seu status de saída for zero,\n" +" então a lista `then COMANDOS' é executada. Do contrário, cada lista\n" +" `elif COMANDOS' é executada em turnos e, se seu status de saída for\n" +" zero, a lista `then COMANDOS' correspondente é executada e o comando\n" +" `if' conclui. Do contrário, a lista `else COMANDOS' é executada, se\n" +" presente. O status de saída de toda construção é o status de saída do\n" +" último comando executado, ou zero, se nenhuma condição testada\n" +" resultou em verdadeiro.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +# help while +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos desde que se obtenha sucesso nos testes.\n" +" \n" +" Expande e executa COMANDOS desde que o último comando nos\n" +" COMANDOS de `while' tenham status de saída zero.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +# help until +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos desde que não se obtenha sucesso nos testes.\n" +" \n" +" Expande e executa COMANDOS desde que o último comando nos\n" +" COMANDOS de `until' tenham status de saída zero que seja\n" +" não-zero.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Cria um coprocesso chamado NOME.\n" +" \n" +" Executa COMANDO assincronamente, com a saída padrão e entrada padrão\n" +" do comando conectados via um `pipe' (redirecionamento) para descritores\n" +" de arquivo atribuídos para índices 0 e 1 de uma variável array NOME\n" +" no shell em execução. O NOME padrão é \"COPROC\".\n" +" \n" +" Status de saída:\n" +" O comando coproc retorna um status de saída de 0." + +# help function +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Define uma função de shell.\n" +" \n" +" Cria uma função de shell chamada NOME. Quando chamado como um comando\n" +" simples, NOME executa COMANDOs no contexto de chamada shell. Quando\n" +" NOME é chamado, os argumentos são passados para a função como $1..$n\n" +" e o nome da função está em $FUNCNAME.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que NOME seja somente-leitura." + +# help -m { +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Agrupa comandos como uma unidade.\n" +" \n" +" Executa um conjunto de comandos em um grupo. Essa é uma\n" +" forma de redirecionar um todo um conjunto de comandos.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Resume trabalho em primeiro plano.\n" +" \n" +" Equivalente ao argumento ESPEC-JOB para comando `fg'. Resume um\n" +" trabalho parado ou enviado para plano de fundo. ESPEC-JOB pode\n" +" especificar tanto um nome de trabalho quanto um número de trabalho.\n" +" ESPEC-JOB seguido de um `&' coloca o trabalho em plano de fundo,\n" +" como se a especificação do trabalho tivesse sido fornecida como um\n" +" argumento para `bg'.\n" +" \n" +" Status de saída:\n" +" Retorna o status de um trabalho resumido." + +# help '((' +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Avalia expressões aritméticas.\n" +" \n" +" A EXPRESSÃO é avaliada de acordo com as regras de avaliação aritmética.\n" +" Equivalente a \"let EXPRESSÃO\".\n" +" \n" +" Status de saída:\n" +" Retorna 1, se EXPRESSÃO for avaliada como 0; do contrário, retorna 0." + +# help '[' +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Executa comando condicional.\n" +" \n" +" Retorna um status de 0 ou 1 dependendo da avaliação da expressão\n" +" condicional EXPRESSÃO. Expressões são compostas dos mesmos primários\n" +" usados pelo comando interno `test' e pode ser combinado usando os\n" +" seguintes operadores:\n" +" \n" +" ( EXPRESSÃO )\tRetorna o valor de EXPRESSÃO\n" +" ! EXPRESSÃO\tVerdadeiro, se EXPRESSÃO for falsa; senão, falso\n" +" EXPR1 && EXPR2\tVerdadeiro, se ambas EXPR1 e EXPR2 forem verdadeiras;\n" +" \t\t\tsenão, falso\n" +" EXPR1 || EXPR2\tVerdadeiro, se EXPR1 ou EXPR2 for verdadeira;\n" +" \t\t\tsenão, falso\n" +" \n" +" Quando os operadores `==' e `!=' forem usados, a string à direita do\n" +" operador é usado como um padrão e uma correspondência de padrão é\n" +" realizada. Quando o operador `=~' é usado, a string à direita do\n" +" operador é correspondida como uma expressão regular.\n" +" \n" +" Os operadores && e || não avaliam EXPR2, se EXPR1 for suficiente para\n" +" determinar o valor da expressão.\n" +" \n" +" Status de saída:\n" +" 0 ou 1 dependendo do valor de EXPRESSÃO." + +# help variables +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Nomes e uso de variáveis comuns do shell.\n" +" \n" +" BASH_VERSION\tInformação da versão deste Bash.\n" +" CDPATH\t\tUma lista separada por dois-pontos de diretórios para\n" +" \t\t\tpesquisar por diretórios fornecidos como argumentos a `cd'.\n" +" GLOBIGNORE\t\tUma lista separada por dois-pontos de padrões descrevendo\n" +" \t\t\tarquivos a serem ignorados pela expansão de caminho.\n" +" HISTFILE\t\tO nome do arquivo no qual o histórico de comandos é\n" +" \t\t\tarmazenado.\n" +" HISTFILESIZE\tO número máximo de linhas que esse arquivo pode conter.\n" +" HISTSIZE\t\tO número máximo de linhas de histórico que um shell\n" +" \t\t\tpode acessar.\n" +" HOME\t\t\tO caminho completo para seu diretório de login.\n" +" HOSTNAME\t\tO nome da sua máquina.\n" +" HOSTTYPE\t\tO tipo de CPU sob a qual esta versão do Bash está\n" +" \t\t\tfuncionando.\n" +" IGNOREEOF\t\tControla a ação do shell na recepção de um caractere\n" +" \t\t\tde fim de arquivo (EOF) como uma entrada única. Se\n" +" \t\t\tdefinida, então seu valor é o número de caracteres de EOF\n" +" \t\t\tque podem ser vistos numa leva em uma linha vazia antes\n" +" \t\t\tdo shell sair (padrão 10). Do contrário, EOF significa\n" +" \t\t\to fim da entrada.\n" +" MACHTYPE\t\tUma string descrevendo o sistema no qual Bash está sendo\n" +" \t\t\texecutado.\n" +" MAILCHECK\t\tCom qual frequência, em segundos, Bash verifica por novo\n" +" \t\t\tcorreio.\n" +" MAILPATH\t\tUma lista separada por dois-pontos de arquivos que Bash\n" +" \t\t\tverifica por novo correio.\n" +" OSTYPE\t\t\tA versão do Unix no qual Bash está sendo executado.\n" +" PATH\t\t\tUma lista separada por dois-pontos de diretórios para\n" +" \t\t\tpesquisar ao se procurar por comandos.\n" +" PROMPT_COMMAND\tUm comando a ser executado antes de imprimir cada " +"prompt\n" +" \t\t\tprimário.\n" +" PS1\t\t\t\tA string de prompt primário.\n" +" PS2\t\t\t\tA string de prompt secundária.\n" +" PWD\t\t\t\tO caminho completo do diretório atual.\n" +" SHELLOPTS\t\tUma lista separada por dois-pontos de opções shell\n" +" \t\t\t\thabilitadas.\n" +" TERM\t\t\tO nome do tipo de terminal atual.\n" +" TIMEFORMAT\t\tO formato de saída para estatísticas de tempo exibidas\n" +" \t\t\t\tpela palavra reservada `time'.\n" +" auto_resume\t\tNão-nulo significa que uma palavra de comando aparecendo\n" +" \t\t\t\tem uma linha, por si só, é procurada primeiro na lista de\n" +" \t\t\t\ttrabalhos atualmente parados. Se encontrado lá, aquele\n" +" \t\t\t\ttrabalho é levado para primeiro plano. Um valor de `exact'\n" +" \t\t\t\tsignifica que a palavra de comando deve corresponder\n" +" \t\t\t\texatamente um comando na lista de trabalhos parados. Um\n" +" \t\t\t\tvalor de `substring' significa que a palavra de comando\n" +" \t\t\t\tdeve corresponder a uma substring do trabalho. Qualquer\n" +" \t\t\t\toutro valor significa que o comando deve ser um prefixo\n" +" \t\t\t\tde um trabalho parado.\n" +" histchars\t\tCaracteres controlando expansão de histórico e\n" +" \t\t\t\tsubstituição rápida. O primeiro caractere é o de\n" +" \t\t\t\tsubstituição de histórico, normalmente `!'. O segundo\n" +" \t\t\t\té o caractere `quick substitution', normalmente `^'.\n" +" \t\t\t\tO terceiro é o caractere `quick sbustitution',\n" +" \t\t\t\tnormalmente `#'\n" +" HISTIGNORE\t\tUma lista separada por dois-pontos de padrões usados para\n" +" \t\t\t\tdecidir quais comandos deveriam ser salvos na lista de\n" +" \t\t\t\thistórico.\n" + +# help pushd +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Adiciona diretórios a uma pilha.\n" +" \n" +" Adiciona um diretório ao topo da pilha de diretórios ou movimenta\n" +" a pilha, fazendo o novo topo da pilha ser o diretório atual de\n" +" trabalho. Com nenhum argumento, efetua troca do topo entre dois\n" +" diretórios.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de diretório ao adicionar\n" +" \t\tdiretórios à pilha, de forma que apenas a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tMovimenta a pilha de forma que o n-ésimo diretório (a contar\n" +" \t\tda esquerda da lista mostrada por `dirs', iniciando com zero)\n" +" \t\testá no topo.\n" +" \n" +" -N\tMovimenta a pilha de forma que o n-ésimo diretório (a contar\n" +" \t\tda direita da lista mostrada por `dirs', iniciando com zero)\n" +" \t\testá no topo.\n" +" \n" +" dir\tAdiciona DIR à pilha de diretórios no topo, fazendo dele o\n" +" \t\tnovo diretório de trabalho atual.\n" +" \n" +" O comando interno `dirs' exibe a pilha de diretórios.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que um argumento inválido seja fornecido ou\n" +" a alteração de diretório falhar." + +# help popd +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Remove diretórios de uma pilha.\n" +"\n" +" Remove entradas da pilha de diretórios. Com nenhum argumento, remove\n" +" o diretório do topo da pilha e altera o novo diretório do topo.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de diretório ao remover\n" +" \t\tdiretórios da pilha, de forma que apenas a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRemove a n-ésima entrada a contar da esquerda da lista\n" +" \t\tmostrada por `dirs', iniciando com zero. Ex.: `popd +0'\n" +" \t\tremove o primeiro diretório e `popd +1', o segundo.\n" +" \n" +" -N\tRemove a n-ésima entrada a contar da direita da lista\n" +" \t\tmostrada por `dirs', iniciando com zero. Ex.: `popd +0'\n" +" \t\tremove o último diretório e `popd -1', o penúltimo.\n" +" \n" +" O comando interno `dirs' exibe a pilha de diretório.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que um argumento inválido seja fornecido ou\n" +" a alteração de diretório falhar." + +# help dirs +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Exibe pilha de diretórios.\n" +" \n" +" Exibe a lista de diretórios atualmente memorizados. Diretórios são\n" +" inseridos na lista por meio do comando `pushd'; você pode obter\n" +" de volta da lista com o comando `popd'.\n" +" \n" +" Opções:\n" +" -c\tlimpa a pilha de diretórios excluindo todos os elementos\n" +" -l\tnão mostra versões de diretórios prefixadas por til,\n" +" \t\trelativos ao seu diretório HOME\n" +" -p\texibe a pilha de diretório com uma entrada por linha\n" +" -v\texibe a pilha de diretório com uma entrada por linha,\n" +" \t\tprefixada com sua posição na pilha\n" +" \n" +" Argumentos:\n" +" +N\tExibe a n-ésima entrada a partir da esquerda da linha\n" +" \t\tmostrada por `dirs' chamado sem opções, iniciando com zero.\n" +" \n" +" -N\tExibe a n-ésima entrada a partir da esquerda da linha\n" +" \t\tmostrada por `dirs' chamado sem opções, iniciando com zero.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorrer um erro." + +# help shopt +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Define e remove definições de opções de shell.\n" +" \n" +" Altera a configuração de cada opção shell NOME-OPÇÃO. Sem qualquer\n" +" argumento de opção, lista cada OPTNAME fornecido com uma indicação\n" +" de se cada uma está definida ou não.\n" +" \n" +" Opções:\n" +" -o\trestringe NOME-OPÇÃO àqueles definidos para usar com `set -o'\n" +" -p\timprime cada opção shell com uma indicação de seu status\n" +" -q\tsuprime a saída\n" +" -s\thabilita (set) com NOME-OPÇÃO\n" +" -u\tdesabilita (unset) com NOME-OPÇÃO\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, se NOME-OPÇÃO estiver habilitado; falha, se uma\n" +" opção inválida for fornecida ou NOME-OPÇÃO estiver desabilitado." + +# help printf +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formata e imprime ARGUMENTOS sob controle de FORMATO.\n" +" \n" +" Options:\n" +" -v var\tatribui a saída à variável shell VAR, ao invés de exibi-la\n" +" \t\t\tna saída padrão\n" +" \n" +" FORMATO é uma string de caractere que contém três tipos de objetos;\n" +" caracteres planos, que são simplesmente copiados para a saída padrão;\n" +" sequências de escape de caracteres, que são convertidas e copiadas\n" +" para a saída padrão; e especificações de formatos, cada um que causa\n" +" impressão do próximo argumento sucessivo.\n" +" \n" +" Além das especificações de formato padrão descritas em printf(1),\n" +" printf interpreta:\n" +" \n" +" %b\texpande sequências de escape com contrabarras no argumento\n" +" \t\tcorrespondente\n" +" %q\tcita o argumento de uma forma que pode ser usado como entrada\n" +" \t\tno shell\n" +" %(fmt)T\texibe a string de data-hora resultante do uso de FMT como\n" +" \t\t\tuma string de formato para strftime(3)\n" +" \n" +" O formato é usado como necessário para consumir todos os argumentos.\n" +" Se houver menos argumentos que o formato requer, especificações de\n" +" formato extras se comportam como se uma string com valor zero ou nula,\n" +" como apropriado, tivesse sido fornecida.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro de escrita ou atribuição." + +# help complete +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Especifica como argumentos são completados por Readline.\n" +" \n" +" Para cada NOME, especifica como argumentos são completados. Se nenhuma\n" +" opção for fornecida, especificações existente para completar são\n" +" impressas em uma forma que permite-as serem usadas como entrada.\n" +" \n" +" Opções:\n" +" -p\timprime especificações existentes de completar em um formato " +"usável\n" +" -r\tremove uma especificação de completar para cada NOME ou, se " +"nenhum\n" +" \t\tNOME for fornecido, todas as especificações de completar\n" +" -D\taplica as completações e ações como sendo o padrão para comandos\n" +" \t\tsem qualquer especificação definida\n" +" -E\taplica as completações e ações para tentativa de completar\n" +" \t\tcomandos -- \"vazios\" em uma linha vazia\n" +" -I\taplica completações e ações para a palavra inicial (geralmente o\n" +" \t\tcomando)\n" +" \n" +" Ao tentar completar, as ações são fornecidas na ordem em que as opções\n" +" de letras de caixa alta são listadas acima. Se várias opções forem " +"fornecidas,\n" +" a opção -D tem precedência sobre -E, e ambos têm precedência sobre -I.\n" +" sobre -E.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." + +# help compgen +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Exibe possibilidades de completação dependendo das opções.\n" +" \n" +" Tem a intenção de ser usado de dentro de uma função shell gerando\n" +" completações possíveis. Se o argumento opcional PALAVRA for fornecido,\n" +" comparações entre PALAVRA é gerada.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." + +# help compopt +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modifica ou exibe opções de completação.\n" +" \n" +" Modifica as opções de completação para cada NOME ou, se nenhum NOME for\n" +" fornecido, a completação sendo executada atualmente. Se nenhuma OPÇÃO\n" +" for fornecida, imprime as opções de completação para cada NOME ou a\n" +" especificação de completação atual.\n" +" \n" +" Opções:\n" +" \t-o OPÇÃO\tDefine a opção de completação OPÇÃO para cada NOME\n" +" \t-D\t\tAltera opções para a completação de comando \"padrão\"\n" +" \t-E\t\tAltera opções para a completação de comando \"vazio\"\n" +" \t-I\t\tAltera as opções para completação na palavra inicial\n" +" \n" +" Ao usar `+o', ao invés de `-o', desliga a opção especificada.\n" +" \n" +" Argumentos:\n" +" \n" +" Cada NOME se refere a um comando para o qual uma especificação de\n" +" completação deve ter sido definida anteriormente usando o comando\n" +" interno `complete'. Se nenhum NOME for fornecido, `compopt` deve\n" +" ser chamado por uma função atualmente gerando completações e as\n" +" opções para aquele gerador de completações atualmente em execução\n" +" são modificados.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválido seja fornecido ou\n" +" NOME não tem uma especificação de completação definida." + +# help mapfile +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Lê linhas da entrada padrão para uma variável array indexado.\n" +" \n" +" Lê linhas da entrada padrão para a variável array indexado ARRAY ou\n" +" do descritor de arquivo FD, se a opção -u for fornecida. A variável\n" +" MAPFILE é o ARRAY padrão.\n" +" \n" +" Opções:\n" +" -d DELIM Usa DELIM para terminar linhas, ao invés de nova linha\n" +" -n NÚMERO Copia no máximo NÚMERO linhas. Se NÚMERO for 0, todas " +"as\n" +" linhas são copiadas\n" +" -O ORIGEM Inicia atribuição de ARRAY no índice ORIGEM. O índice\n" +" padrão é 0\n" +" -s NÚMERO Descarta as primeiras NÚMERO linhas lidas\n" +" -t Remove uma DELIM ao final para cada linha lida\n" +" (padrão: nova linha)\n" +" -u FD Lê linhas do descritor de arquivos FD, ao invés da " +"entrada\n" +" padrão\n" +" -C CHAMADA Avalia CHAMADA a cada vez que QUANTIDADE linhas foram " +"lidas\n" +" -c QUANTIDADE Especifica o número de linhas lidas entre cada chamada " +"para\n" +" CHAMADA\n" +" \n" +" Argumentos:\n" +" ARRAY Nome da variável array para usar para arquivos de dados\n" +" \n" +" Se -C for fornecido sem -c, a quantidade padrão é 5000. Quando CHAMADA " +"é\n" +" avaliada, é fornecido o índice para o próximo elemento da array ser\n" +" atribuído e a linha para ser atribuída àquele elemento como argumentos\n" +" adicionais\n" +" \n" +" Se não for fornecido com uma origem explícita, mapfile vai limpar ARRAY\n" +" antes de lhe atribuir.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja dada ou ARRAY for\n" +" somente leitura ou não for um array indexado." + +# help readarray +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Lê linhas de um arquivo para uma variável array.\n" +" \n" +" Um sinônimo para `mapfile'." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Retorna o contexto da chamada de sub-rotina atual.\n" +#~ " \n" +#~ " Sem EXPR, retorna " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: processo %5ld (%s) em the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Sinal desconhecido #" + +#~ msgid "Copyright (C) 2015 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2015 Free Software Foundation, Inc." + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2014 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +# Não traduzir "true", esta é uma opção "builtin" do "bash" que é exibida ao executar "help" e acessível com "help true". +#~ msgid "true" +#~ msgstr "true" + +# Não traduzir "false", esta é uma opção "builtin" do "bash" que é exibida ao executar "help" e acessível com "help false". +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "disown [-h] [-ar] [jobspec ...]" +#~ msgstr "disown [-h] [-ar] [ESPEC-JOB ...]" + +# não traduzir, este é um comando +#~ msgid "times" +#~ msgstr "times" + +# help typeset +#~ msgid "" +#~ "Set variable values and attributes.\n" +#~ " \n" +#~ " Obsolete. See `help declare'." +#~ msgstr "" +#~ "Define valores e atributos de variável.\n" +#~ " \n" +#~ " Obsoleto. Veja `help declare'." + +# help history +#~ msgid "" +#~ "Display or manipulate the history list.\n" +#~ " \n" +#~ " Display the history list with line numbers, prefixing each modified\n" +#~ " entry with a `*'. An argument of N lists only the last N entries.\n" +#~ " \n" +#~ " Options:\n" +#~ " -c\tclear the history list by deleting all of the entries\n" +#~ " -d offset\tdelete the history entry at offset OFFSET.\n" +#~ " \n" +#~ " -a\tappend history lines from this session to the history file\n" +#~ " -n\tread all history lines not already read from the history file\n" +#~ " -r\tread the history file and append the contents to the history\n" +#~ " \t\tlist\n" +#~ " -w\twrite the current history to the history file\n" +#~ " \t\tand append them to the history list\n" +#~ " \n" +#~ " -p\tperform history expansion on each ARG and display the result\n" +#~ " \t\twithout storing it in the history list\n" +#~ " -s\tappend the ARGs to the history list as a single entry\n" +#~ " \n" +#~ " If FILENAME is given, it is used as the history file. Otherwise,\n" +#~ " if HISTFILE has a value, that is used, else ~/.bash_history.\n" +#~ " \n" +#~ " If the HISTTIMEFORMAT variable is set and not null, its value is " +#~ "used\n" +#~ " as a format string for strftime(3) to print the time stamp " +#~ "associated\n" +#~ " with each displayed history entry. No time stamps are printed " +#~ "otherwise.\n" +#~ " \n" +#~ " Exit Status:\n" +#~ " Returns success unless an invalid option is given or an error occurs." +#~ msgstr "" +#~ "Exibe ou manipula a lista de histórico.\n" +#~ " \n" +#~ " Exibe a lista de histórico com números de linhas, prefixando cada\n" +#~ " entrada modificada com um `*'. Um argumento de N lista apenas as\n" +#~ " últimas N entradas.\n" +#~ " \n" +#~ " Opções:\n" +#~ " -c\t\t\tlimpa a lista de histórico ao excluir todas as entradas\n" +#~ " -d POSIÇÃO\texclui a entrada de histórico na posição POSIÇÃO.\n" +#~ " -a\t\t\tanexa linhas de histórico desta sessão no arquivo de\n" +#~ " \t\t\t\thistórico\n" +#~ " -n\t\t\tlê todas as linhas de histórico ainda não lidas do\n" +#~ " \t\t\t\tarquivo de histórico\n" +#~ " -r\t\t\tlê o histórico e anexa os conteúdos à lista de histórico\n" +#~ " -w\t\t\tescreve o histórico atual para o arquivo de histórico e\n" +#~ " \t\t\t\tanexa-os à lista de histórico \n" +#~ " -p\t\t\texecuta expansão de histórico em cada ARG e exibe o\n" +#~ " \t\t\t\tresultado sem armazená-lo na lista de histórico\n" +#~ " -s\t\t\tanexa os ARGs à lista de histórico como uma única entrada\n" +#~ " \n" +#~ " Se ARQUIVO for fornecido, ele é usado como o arquivo de histórico.\n" +#~ " Do contrário, se a variável HISTFILE tiver um valor, este será " +#~ "usado;\n" +#~ " senão, usa de ~/.bash_history.\n" +#~ " \n" +#~ " Se a variável HISTTIMEFORMAT for definida e não for nula, seu valor " +#~ "é\n" +#~ " usado como uma string de formato para strftime(3) para mostrar a " +#~ "marca\n" +#~ " de tempo associada com cada entrada de histórico exibida. Do " +#~ "contrário,\n" +#~ " nenhuma marca de tempo é mostrada.\n" +#~ " \n" +#~ " Status de saída:\n" +#~ " Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +#~ " ocorra um erro." + +# help kill +#~ msgid "" +#~ "Send a signal to a job.\n" +#~ " \n" +#~ " Send the processes identified by PID or JOBSPEC the signal named by\n" +#~ " SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +#~ " SIGTERM is assumed.\n" +#~ " \n" +#~ " Options:\n" +#~ " -s sig\tSIG is a signal name\n" +#~ " -n sig\tSIG is a signal number\n" +#~ " -l\tlist the signal names; if arguments follow `-l' they are\n" +#~ " \t\tassumed to be signal numbers for which names should be listed\n" +#~ " \n" +#~ " Kill is a shell builtin for two reasons: it allows job IDs to be " +#~ "used\n" +#~ " instead of process IDs, and allows processes to be killed if the " +#~ "limit\n" +#~ " on processes that you can create is reached.\n" +#~ " \n" +#~ " Exit Status:\n" +#~ " Returns success unless an invalid option is given or an error occurs." +#~ msgstr "" +#~ "Envia um sinal para um trabalho.\n" +#~ "\n" +#~ " Envia aos processos identificados pelo PID ou pelo ESPEC-JOB o sinal\n" +#~ " informado por SIGSPEC ou SIGNUM. Se SIGSPEC e SIGNUM\n" +#~ " não estiverem presentes, então, SIGTERM é presumido.\n" +#~ " \n" +#~ " Opções:\n" +#~ " -s SIGSPEC\tSIGSPEC especifica o nome do sinal\n" +#~ " -n SIGNUM\t\tSIGNUM representa um número de sinal\n" +#~ " -l\t\t\tlista os nomes dos sinais; se `-l' for acompanhado por\n" +#~ " \t\t\t\toutros argumentos, presume-se estes sejam números de\n" +#~ " \t\t\t\tsinais para os quais nomes deveriam ser listados\n" +#~ " \n" +#~ " `Kill' é um comando interno do shell por duas razões: ele permite\n" +#~ " IDs de trabalho serem usados ao invés de IDs de processo e permite\n" +#~ " que processos sejam matados caso o limite de processos que você pode\n" +#~ " criar seja atingido.\n" +#~ " \n" +#~ " Status de saída:\n" +#~ " Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +#~ " ocorra um erro." + +# help set +#~ msgid "" +#~ "Set or unset values of shell options and positional parameters.\n" +#~ " \n" +#~ " Change the value of shell attributes and positional parameters, or\n" +#~ " display the names and values of shell variables.\n" +#~ " \n" +#~ " Options:\n" +#~ " -a Mark variables which are modified or created for export.\n" +#~ " -b Notify of job termination immediately.\n" +#~ " -e Exit immediately if a command exits with a non-zero status.\n" +#~ " -f Disable file name generation (globbing).\n" +#~ " -h Remember the location of commands as they are looked up.\n" +#~ " -k All assignment arguments are placed in the environment for a\n" +#~ " command, not just those that precede the command name.\n" +#~ " -m Job control is enabled.\n" +#~ " -n Read commands but do not execute them.\n" +#~ " -o option-name\n" +#~ " Set the variable corresponding to option-name:\n" +#~ " allexport same as -a\n" +#~ " braceexpand same as -B\n" +#~ " emacs use an emacs-style line editing interface\n" +#~ " errexit same as -e\n" +#~ " errtrace same as -E\n" +#~ " functrace same as -T\n" +#~ " hashall same as -h\n" +#~ " histexpand same as -H\n" +#~ " history enable command history\n" +#~ " ignoreeof the shell will not exit upon reading EOF\n" +#~ " interactive-comments\n" +#~ " allow comments to appear in interactive " +#~ "commands\n" +#~ " keyword same as -k\n" +#~ " monitor same as -m\n" +#~ " noclobber same as -C\n" +#~ " noexec same as -n\n" +#~ " noglob same as -f\n" +#~ " nolog currently accepted but ignored\n" +#~ " notify same as -b\n" +#~ " nounset same as -u\n" +#~ " onecmd same as -t\n" +#~ " physical same as -P\n" +#~ " pipefail the return value of a pipeline is the status " +#~ "of\n" +#~ " the last command to exit with a non-zero " +#~ "status,\n" +#~ " or zero if no command exited with a non-zero " +#~ "status\n" +#~ " posix change the behavior of bash where the default\n" +#~ " operation differs from the Posix standard to\n" +#~ " match the standard\n" +#~ " privileged same as -p\n" +#~ " verbose same as -v\n" +#~ " vi use a vi-style line editing interface\n" +#~ " xtrace same as -x\n" +#~ " -p Turned on whenever the real and effective user ids do not " +#~ "match.\n" +#~ " Disables processing of the $ENV file and importing of shell\n" +#~ " functions. Turning this option off causes the effective uid " +#~ "and\n" +#~ " gid to be set to the real uid and gid.\n" +#~ " -t Exit after reading and executing one command.\n" +#~ " -u Treat unset variables as an error when substituting.\n" +#~ " -v Print shell input lines as they are read.\n" +#~ " -x Print commands and their arguments as they are executed.\n" +#~ " -B the shell will perform brace expansion\n" +#~ " -C If set, disallow existing regular files to be overwritten\n" +#~ " by redirection of output.\n" +#~ " -E If set, the ERR trap is inherited by shell functions.\n" +#~ " -H Enable ! style history substitution. This flag is on\n" +#~ " by default when the shell is interactive.\n" +#~ " -P If set, do not resolve symbolic links when executing commands\n" +#~ " such as cd which change the current directory.\n" +#~ " -T If set, the DEBUG trap is inherited by shell functions.\n" +#~ " -- Assign any remaining arguments to the positional parameters.\n" +#~ " If there are no remaining arguments, the positional parameters\n" +#~ " are unset.\n" +#~ " - Assign any remaining arguments to the positional parameters.\n" +#~ " The -x and -v options are turned off.\n" +#~ " \n" +#~ " Using + rather than - causes these flags to be turned off. The\n" +#~ " flags can also be used upon invocation of the shell. The current\n" +#~ " set of flags may be found in $-. The remaining n ARGs are " +#~ "positional\n" +#~ " parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +#~ " ARGs are given, all shell variables are printed.\n" +#~ " \n" +#~ " Exit Status:\n" +#~ " Returns success unless an invalid option is given." +#~ msgstr "" +#~ "Define ou remove definição de valores das opções e dos parâmetros " +#~ "posicionais\n" +#~ "do shell:\n" +#~ " \n" +#~ " Altera o valor de opções e de parâmetros posicionais do shell ou " +#~ "mostra\n" +#~ " os nomes ou valores de variáveis shell.\n" +#~ " \n" +#~ " Opções:\n" +#~ " -a Marca variáveis, que foram modificadas ou criadas, para " +#~ "exportação.\n" +#~ " -b Notifica sobre terminação de trabalho imediatamente.\n" +#~ " -e Sai imediatamente se um comando sai com um status não-zero.\n" +#~ " -f Desabilita a geração de nome de arquivo (\"globbing\").\n" +#~ " -h Memoriza a localização de comandos à medida em que são " +#~ "procurados.\n" +#~ " -k Todos argumentos de atribuição são colocados no ambiente para " +#~ "um\n" +#~ " comando, e não apenas aqueles que precedem o nome do comando.\n" +#~ " -m Controle de trabalho está habilitado.\n" +#~ " -n Lê comandos, mas não os executa.\n" +#~ " -o NOME-OPÇÃO\n" +#~ " Define a variável correspondendo a NOME-OPÇÃO:\n" +#~ " allexport mesmo que -a\n" +#~ " braceexpand mesmo que -B\n" +#~ " emacs usa interface de edição de linha estilo Emacs\n" +#~ " errexit mesmo que -e\n" +#~ " errtrace mesmo que -E\n" +#~ " functrace mesmo que -T\n" +#~ " hashall mesmo que -h\n" +#~ " histexpand mesmo que -H\n" +#~ " history habilita histórico de comandos\n" +#~ " ignoreeof shell não vai sair após leitura de EOF\n" +#~ " interactive-comments\n" +#~ " permite mostrar comentários em comandos " +#~ "interativos\n" +#~ " keyword mesmo que -k\n" +#~ " monitor mesmo que -m\n" +#~ " noclobber mesmo que -C\n" +#~ " noexec mesmo que -n\n" +#~ " noglob mesmo que -f\n" +#~ " nolog atualmente aceito, mas ignorado\n" +#~ " notify mesmo que -b\n" +#~ " nounset mesmo que -u\n" +#~ " onecmd mesmo que -t\n" +#~ " physical mesmo que -P\n" +#~ " pipefail o valor de retorno de uma linha de comandos é " +#~ "o\n" +#~ " status do último comando a sair com status não-" +#~ "zero,\n" +#~ " ou zero se nenhum comando saiu com status não " +#~ "zero\n" +#~ " posix altera o comportamento do bash, onde a " +#~ "operação\n" +#~ " padrão diverge dos padrões do Posix para\n" +#~ " corresponder a estes padrões\n" +#~ " privileged mesmo que -p\n" +#~ " verbose mesmo que -v\n" +#~ " vi usa interface de edição de linha estilo vi\n" +#~ " xtrace mesmo que -x\n" +#~ " -p Ligado sempre que IDs de usuário real e efetivo não " +#~ "corresponderem.\n" +#~ " Desabilita processamento do arquivo $ENV e importação de " +#~ "funções da\n" +#~ " shell. Ao desligar essa opção, causa o uid e o gid efetivo " +#~ "serem\n" +#~ " os uid e gid reais.\n" +#~ " -t Sai após a leitura e execução de um comando.\n" +#~ " -u Trata limpeza (unset) de variáveis como um erro quando " +#~ "substituindo.\n" +#~ " -v Mostra linhas de entrada do shell na medida em que forem " +#~ "lidas.\n" +#~ " -x Mostra comandos e seus argumentos na medida em que forme " +#~ "executados.\n" +#~ " -B o shell vai realizar expansão de chaves\n" +#~ " -C Se definido, não permite arquivos normais existentes serem\n" +#~ " sobrescritos por redirecionamento da saída.\n" +#~ " -E Se definido, a armadilha ERR é herdada por funções do shell.\n" +#~ " -H Habilita substituição de histórico estilo \"!\". Essa " +#~ "sinalização está\n" +#~ " habilitada por padrão quando shell é interativa.\n" +#~ " -P Se definida, não resolve links simbólicos ao sair de comandos, " +#~ "tais\n" +#~ " como `cd' (que altera o diretório atual).\n" +#~ " -T Se definido, a armadilha DEBUG é herdada por funções do shell.\n" +#~ " -- Atribui quaisquer argumentos restantes aos parâmetros " +#~ "posicionais.\n" +#~ " Se não houver argumentos restantes, os parâmetros posicionais " +#~ "são\n" +#~ " limpos (unset).\n" +#~ " - Atribui quaisquer argumentos restantes aos parâmetros " +#~ "posicionais.\n" +#~ " As opções -x e -v são desligadas.\n" +#~ " \n" +#~ " Usar +, ao invés de -, causa essas sinalizações serem desligadas. As\n" +#~ " sinalizações também podem ser usadas por meio de chamada do shell. " +#~ "As\n" +#~ " sinalizações atualmente definidas podem ser encontradas em $-. Os n " +#~ "ARGs\n" +#~ " restantes são parâmetros posicionais e são atribuídos, em ordem, a " +#~ "$1, $2,\n" +#~ " .. $n. Se nenhuma ARG for fornecido, todas as variáveis shell são\n" +#~ " mostradas.\n" +#~ " \n" +#~ " Status de saída:\n" +#~ " Retorna sucesso, a menos que uma opção inválida seja fornecida." + +# help coproc +#~ msgid "" +#~ "Create a coprocess named NAME.\n" +#~ " \n" +#~ " Execute COMMAND asynchronously, with the standard output and " +#~ "standard\n" +#~ " input of the command connected via a pipe to file descriptors " +#~ "assigned\n" +#~ " to indices 0 and 1 of an array variable NAME in the executing shell.\n" +#~ " The default NAME is \"COPROC\".\n" +#~ " \n" +#~ " Exit Status:\n" +#~ " Returns the exit status of COMMAND." +#~ msgstr "" +#~ "Cria um coprocesso chamado NOME.\n" +#~ " \n" +#~ " Executa COMANDO assincronamente, com a saída padrão e entrada padrão\n" +#~ " do comando conectados via um `pipe' (redirecionamento) para " +#~ "descritores\n" +#~ " de arquivo atribuídos para índices 0 e 1 de uma variável array NOME\n" +#~ " no shell em execução. O NOME padrão é \"COPROC\".\n" +#~ " \n" +#~ " Status de saída:\n" +#~ " Retorna o status de saída de COMANDO." + +#~ msgid "Missing `}'" +#~ msgstr "Faltando `}'" + +#~ msgid "brace_expand> " +#~ msgstr "brace_expand> " + +#~ msgid "Attempt to free unknown command type `%d'.\n" +#~ msgstr "Tentativa de liberar um tipo de comando desconhecido `%d'.\n" + +#~ msgid "Report this to %s\n" +#~ msgstr "Informar o ocorrido para %s\n" + +#~ msgid "Stopping myself..." +#~ msgstr "Parando-me..." + +#~ msgid "Tell %s to fix this someday.\n" +#~ msgstr "Informar %s para corrigir o ocorrido.\n" + +#~ msgid "execute_command: bad command type `%d'" +#~ msgstr "execute_command: `%d' é um tipo incorreto de comando " + +#~ msgid "real\t" +#~ msgstr "real\t" + +#~ msgid "user\t" +#~ msgstr "usuário\t" + +#~ msgid "sys\t" +#~ msgstr "sistema\t" + +#~ msgid "" +#~ "real\t0m0.00s\n" +#~ "user\t0m0.00s\n" +#~ "sys\t0m0.00s\n" +#~ msgstr "" +#~ "real \t0m0.00s\n" +#~ "usuário\t0m0.00s\n" +#~ "sistema\t0m0.00s\n" + +#~ msgid "cannot duplicate fd %d to fd 1: %s" +#~ msgstr "impossível duplicar fd (descritor de arquivo) %d para fd 1: %s" + +#~ msgid "%s: output redirection restricted" +#~ msgstr "%s: redirecionamento da saída restringido" + +#~ msgid "Out of memory!" +#~ msgstr "Memória esgotada!" + +#~ msgid "You have already added item `%s'\n" +#~ msgstr "Você já adicionou o item `%s'\n" + +#~ msgid "You have entered %d (%d) items. The distribution is:\n" +#~ msgstr "Entrados %d (%d) itens. A distribuição é:\n" + +#~ msgid "slot %3d: " +#~ msgstr "encaixe (slot) %3d: " + +#~ msgid "" +#~ msgstr "" + +#~ msgid "%s: bg background job?" +#~ msgstr "%s: bg trabalho no segundo plano?" + +#~ msgid "" +#~ "Redirection instruction from yyparse () '%d' is\n" +#~ "out of range in make_redirection ()." +#~ msgstr "" +#~ "A instrução de redirecionamento do yyparse () '%d' está\n" +#~ "fora do intervalo em make_redirection ()." + +#~ msgid "clean_simple_command () got a command with type %d." +#~ msgstr "clean_simple_command () recebeu um comando do tipo %d." + +#~ msgid "got errno %d while waiting for %d" +#~ msgstr "recebido erro número %d enquanto aguardava por %d" + +#~ msgid "syntax error near unexpected token `%c'" +#~ msgstr "erro de sintaxe próximo do `token' não esperado `%c'" + +#~ msgid "print_command: bad command type `%d'" +#~ msgstr "print_command: tipo de comando incorreto `%d'" + +#~ msgid "cprintf: bad `%%' argument (%c)" +#~ msgstr "cprintf: argumento `%%' incorreto (%c)" + +#~ msgid "option `%s' requires an argument" +#~ msgstr "a opção `%s' requer um argumento" + +#~ msgid "%s: unrecognized option" +#~ msgstr "%s: a opção não é reconhecida" + +#~ msgid "`-c' requires an argument" +#~ msgstr "A opção `-c' requer um argumento" + +#~ msgid "%s: cannot execute directories" +#~ msgstr "%s: impossível executar diretórios" + +#~ msgid "Bad code in sig.c: sigprocmask" +#~ msgstr "Código incorreto em sig.c: sigprocmask" + +#~ msgid "can't make pipes for process substitution: %s" +#~ msgstr "impossível criar `pipes' para a substituição do processo: %s" + +#~ msgid "reading" +#~ msgstr "lendo" + +#~ msgid "writing" +#~ msgstr "escrevendo" + +#~ msgid "process substitution" +#~ msgstr "substituição de processo" + +#~ msgid "command substitution" +#~ msgstr "substituição de comando" + +#~ msgid "Can't reopen pipe to command substitution (fd %d): %s" +#~ msgstr "" +#~ "Impossível reabrir o `pipe' para substituição de comando (fd %d): %s" + +#~ msgid "$%c: unbound variable" +#~ msgstr "$%c: variável não associada" + +#~ msgid "%s: bad arithmetic substitution" +#~ msgstr "%s: substituição aritmética incorreta" + +#~ msgid "-%s: binary operator expected" +#~ msgstr "-%s: esperado operador binário" + +#~ msgid "%s[%s: bad subscript" +#~ msgstr "%s[%s: índice incorreto" + +#~ msgid "[%s: bad subscript" +#~ msgstr "[%s: índice incorreto" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: impossível realocar %lu bytes (%lu bytes alocados)" + +#~ msgid "digits occur in two different argv-elements.\n" +#~ msgstr "os dígitos aparecem em dois elementos argv diferentes.\n" + +#~ msgid "option %c\n" +#~ msgstr "opção %c\n" + +#~ msgid "option a\n" +#~ msgstr "opção a\n" + +#~ msgid "option b\n" +#~ msgstr "opção b\n" + +#~ msgid "option c with value `%s'\n" +#~ msgstr "opção c com o valor `%s'\n" + +#~ msgid "?? sh_getopt returned character code 0%o ??\n" +#~ msgstr "?? sh_getopt retornou o código de caracter 0%o ??\n" + +#~ msgid "non-option ARGV-elements: " +#~ msgstr "elementos de ARGV que não são opção:" + +#~ msgid "%s: Unknown flag %s.\n" +#~ msgstr "%s: Opção %s desconhecida.\n" + +#~ msgid "Unknown directive `%s'" +#~ msgstr "Diretiva desconhecida `%s'" + +#~ msgid "%s must be inside of a $BUILTIN block" +#~ msgstr "%s deve estar dentro de um bloco $BUILTIN" + +#~ msgid "%s found before $END" +#~ msgstr "%s encontrado antes de $END" + +#~ msgid "%s already has a function (%s)" +#~ msgstr "%s já possui uma função (%s)" + +#~ msgid "%s already had a docname (%s)" +#~ msgstr "%s já possui um nome de documento (%s)" + +#~ msgid "%s already has short documentation (%s)" +#~ msgstr "%s já possui uma documentação curta (%s)" + +#~ msgid "%s already has a %s definition" +#~ msgstr "%s já possui a definição %s" + +#~ msgid "mkbuiltins: Out of virtual memory!\n" +#~ msgstr "mkbuiltins: Memória virtual esgotada!\n" + +#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]" +#~ msgstr "read [-r] [-p MENSAGEM] [-a ARRAY] [-e] [NOME ...]" + +#~ msgid "%[DIGITS | WORD] [&]" +#~ msgstr "%[DÍGITOS | PALAVRA] [&]" + +#~ msgid "variables - Some variable names and meanings" +#~ msgstr "variáveis - Alguns nomes de variáveis e suas descrições" + +#~ msgid "`alias' with no arguments or with the -p option prints the list" +#~ msgstr "`alias' sem nenhum argumento, ou com a opção -p, exibe a lista" + +#~ msgid "of aliases in the form alias NAME=VALUE on standard output." +#~ msgstr "de aliases na forma `alias NOME=VALOR' na saída padrão." + +#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given." +#~ msgstr "" +#~ "Ou então, um alias é definido para cada NOME cujo VALOR for fornecido." + +#~ msgid "A trailing space in VALUE causes the next word to be checked for" +#~ msgstr "Um espaço após VALOR faz a próxima palavra ser verificada para" + +#~ msgid "alias substitution when the alias is expanded. Alias returns" +#~ msgstr "substituição do alias quando o alias é expandido. Alias retorna" + +#~ msgid "true unless a NAME is given for which no alias has been defined." +#~ msgstr "" +#~ "verdadeiro, a não ser que seja fornecido um NOME sem alias definido." + +#~ msgid "" +#~ "Remove NAMEs from the list of defined aliases. If the -a option is given," +#~ msgstr "" +#~ "Remove NOMEs da lista de aliases definidos. Se a opção -a for fornecida," + +#~ msgid "then remove all alias definitions." +#~ msgstr "então todas as definições de alias são removidas." + +#~ msgid "Bind a key sequence to a Readline function, or to a macro. The" +#~ msgstr "" +#~ "Víncula uma seqüência de teclas a uma função de leitura de linha, ou a uma" + +#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be" +#~ msgstr "" +#~ "macro. A sintaxe é equivalente à encontrada em ~/.inputrc, mas deve ser" + +#~ msgid "" +#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'." +#~ msgstr "" +#~ "passada como um único argumento: bind '\"\\C-x\\C-r\": re-read-init-file'." + +#~ msgid "Arguments we accept:" +#~ msgstr "Argumentos permitidos:" + +#~ msgid "" +#~ " -m keymap Use `keymap' as the keymap for the duration of this" +#~ msgstr "" +#~ " -m MAPA-TECLAS Usar `MAPA-TECLAS' como mapa das teclas pela duração" + +#~ msgid " command. Acceptable keymap names are emacs," +#~ msgstr " deste comando. Os nomes aceitos são emacs," + +#~ msgid "" +#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," +#~ msgstr "" +#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + +#~ msgid " vi-command, and vi-insert." +#~ msgstr " vi-command, and vi-insert." + +#~ msgid " -l List names of functions." +#~ msgstr " -l Listar os nomes das funções." + +#~ msgid " -P List function names and bindings." +#~ msgstr " -P Listar nomes e associações das funções." + +#~ msgid "" +#~ " -p List functions and bindings in a form that can be" +#~ msgstr "" +#~ " -p Listar nomes e associações das funções de uma forma" + +#~ msgid " reused as input." +#~ msgstr " que pode ser reutilizada como entrada." + +#~ msgid " -r keyseq Remove the binding for KEYSEQ." +#~ msgstr " -r SEQ-TECLAS Remove o vínculo para SEQ-TECLAS." + +#~ msgid " -f filename Read key bindings from FILENAME." +#~ msgstr " -f ARQUIVO Ler os vínculos das teclas em ARQUIVO." + +#~ msgid "" +#~ " -q function-name Query about which keys invoke the named function." +#~ msgstr " -q NOME-FUNÇÃO Consultar quais teclas chamam esta função." + +#~ msgid " -V List variable names and values" +#~ msgstr " -V Listar os nomes e os valores das variáveis." + +#~ msgid "" +#~ " -v List variable names and values in a form that can" +#~ msgstr "" +#~ " -v Listar os nomes e os valores das variáveis de uma" + +#~ msgid " be reused as input." +#~ msgstr " forma que pode ser reutilizada como entrada." + +#~ msgid "" +#~ " -S List key sequences that invoke macros and their " +#~ "values" +#~ msgstr "" +#~ " -S Listar as seqüências de teclas que chamam macros\n" +#~ " e seus valores." + +#~ msgid "" +#~ " -s List key sequences that invoke macros and their " +#~ "values in" +#~ msgstr " -s Listar seqüências de teclas que chamam macros" + +#~ msgid " a form that can be reused as input." +#~ msgstr "" +#~ " e seus valores de uma forma que pode ser\n" +#~ " reutilizada como entrada." + +#~ msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," +#~ msgstr "Sair de um laço FOR, WHILE ou UNTIL." + +#~ msgid "break N levels." +#~ msgstr "Se N for especificado, sai de N níveis." + +#~ msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." +#~ msgstr "Prossegue no próximo ciclo do laço FOR, WHILE ou UNTIL envolvente." + +#~ msgid "If N is specified, resume at the N-th enclosing loop." +#~ msgstr "Se N for especificado, prossegue no N-ésimo laço envolvente." + +#~ msgid "Run a shell builtin. This is useful when you wish to rename a" +#~ msgstr "" +#~ "Executa um comando interno do shell. Útil quando desejamos substituir" + +#~ msgid "shell builtin to be a function, but need the functionality of the" +#~ msgstr "um comando interno do shell por uma função, mas necessitamos da" + +#~ msgid "builtin within the function itself." +#~ msgstr "funcionalidade do comando interno dentro da própria função." + +#~ msgid "Change the current directory to DIR. The variable $HOME is the" +#~ msgstr "Troca o diretório atual para DIR. A variável $HOME é o padrão" + +#~ msgid "default DIR. The variable $CDPATH defines the search path for" +#~ msgstr "para DIR. A variável $CDPATH define o caminho de procura para" + +#~ msgid "the directory containing DIR. Alternative directory names in CDPATH" +#~ msgstr "" +#~ "o diretório que contém DIR. Nomes de diretórios alternativos em CDPATH" + +#~ msgid "are separated by a colon (:). A null directory name is the same as" +#~ msgstr "" +#~ "são separados por dois pontos (:). Um nome de diretório nulo é o mesmo" + +#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," +#~ msgstr "que o diretório atual, i.e. `.'. Se DIR inicia com uma barra (/)," + +#~ msgid "then $CDPATH is not used. If the directory is not found, and the" +#~ msgstr "então $CDPATH não é usado. Se o diretório não for encontrado, e a" + +#~ msgid "shell option `cdable_vars' is set, then try the word as a variable" +#~ msgstr "" +#~ "opção `cdable_vars' estiver definida, tentar usar DIR como um nome de" + +#~ msgid "name. If that variable has a value, then cd to the value of that" +#~ msgstr "" +#~ "variável. Se esta variável tiver valor, então `cd' para o valor desta" + +#~ msgid "" +#~ "variable. The -P option says to use the physical directory structure" +#~ msgstr "" +#~ "variável. A opção -P indica para usar a estrutura física do diretório" + +#~ msgid "" +#~ "instead of following symbolic links; the -L option forces symbolic links" +#~ msgstr "em vez de seguir os vínculos simbólicos; a opção -L força seguir os" + +#~ msgid "to be followed." +#~ msgstr "vínculos simbólicos." + +#~ msgid "Print the current working directory. With the -P option, pwd prints" +#~ msgstr "Exibe o diretório atual de trabalho. Com a opção -P, `pwd' exibe" + +#~ msgid "the physical directory, without any symbolic links; the -L option" +#~ msgstr "o diretório físico, sem nenhum vínculo simbólico; a opção -L faz" + +#~ msgid "makes pwd follow symbolic links." +#~ msgstr "com que `pwd' siga os vínculos simbólicos." + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" +#~ msgstr "" +#~ "Executa COMANDO com ARGs ignorando as funções da shell. Ex: Havendo" + +#~ msgid "function called `ls', and you wish to call the command `ls', you can" +#~ msgstr "" +#~ "uma função `ls', e se for necessário executar o comando `ls', executa-se" + +#~ msgid "" +#~ "say \"command ls\". If the -p option is given, a default value is used" +#~ msgstr "" +#~ "\"command ls\". Se a opção -p for fornecida, o valor padrão é utilizado" + +#~ msgid "" +#~ "for PATH that is guaranteed to find all of the standard utilities. If" +#~ msgstr "" +#~ "para PATH, garantindo-se o encontro de todos os utilitários padrão. Se" + +#~ msgid "" +#~ "the -V or -v option is given, a string is printed describing COMMAND." +#~ msgstr "a opção -V ou -v for fornecida, é exibida a descrição do COMANDO." + +#~ msgid "The -V option produces a more verbose description." +#~ msgstr "A opção -V produz uma descrição mais extensa." + +#~ msgid "Declare variables and/or give them attributes. If no NAMEs are" +#~ msgstr "Declara variáveis e/ou dá-lhes atributos. Se nenhum nome for" + +#~ msgid "given, then display the values of variables instead. The -p option" +#~ msgstr "fornecido, então são exibidos os valores das variáveis. A opção -p" + +#~ msgid "will display the attributes and values of each NAME." +#~ msgstr "exibe os atributos e valores para cada NOME." + +#~ msgid "The flags are:" +#~ msgstr "As opções são:" + +#~ msgid " -a\tto make NAMEs arrays (if supported)" +#~ msgstr " -a\tpara tornar NOMEs arrays, se houver suporte" + +#~ msgid " -f\tto select from among function names only" +#~ msgstr " -f\tpara selecionar somente entre nomes de funções" + +#~ msgid " -F\tto display function names without definitions" +#~ msgstr " -F\tpara exibir os nomes das funções omitindo suas definições" + +#~ msgid " -r\tto make NAMEs readonly" +#~ msgstr " -r\tpara tornar NOMEs somente para leitura" + +#~ msgid " -x\tto make NAMEs export" +#~ msgstr " -x\tpara fazer a exportação de NOMEs" + +#~ msgid " -i\tto make NAMEs have the `integer' attribute set" +#~ msgstr " -i\tpara ativar o atributo `inteiro' em NOMEs " + +#~ msgid "Variables with the integer attribute have arithmetic evaluation (see" +#~ msgstr "Variáveis com atributo inteiro são avaliadas aritmeticamente (veja" + +#~ msgid "`let') done when the variable is assigned to." +#~ msgstr "`let') quando é feita uma atribuição de valor." + +#~ msgid "When displaying values of variables, -f displays a function's name" +#~ msgstr "Ao exibir os valores das variáveis, -f exibe o nome da função e" + +#~ msgid "and definition. The -F option restricts the display to function" +#~ msgstr "sua definição. A opção -F restringe a exibição ao nome da função" + +#~ msgid "name only." +#~ msgstr "somente." + +#~ msgid "" +#~ "Using `+' instead of `-' turns off the given attribute instead. When" +#~ msgstr "Usando `+' em vez de `-' faz o atributo ser desabilitado. Quando" + +#~ msgid "used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "usado em uma função, torna NOMEs local, como no comando `local'." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Obsoleta. Veja `declare'." + +#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL" +#~ msgstr "Cria uma variável local chamada NOME, e atribui VALOR. LOCAL" + +#~ msgid "have a visible scope restricted to that function and its children." +#~ msgstr "da variável NOME fique restrito à própria função e às suas filhas." + +#~ msgid "Output the ARGs. If -n is specified, the trailing newline is" +#~ msgstr "Exibe ARGs. Se -n for fornecido, o caracter final de nova linha é" + +#~ msgid "suppressed. If the -e option is given, interpretation of the" +#~ msgstr "" +#~ "suprimido. Se a opção -e for fornecida, a interpretação dos seguintes" + +#~ msgid "following backslash-escaped characters is turned on:" +#~ msgstr "caracteres após a contrabarra é ativada:" + +#~ msgid "\t\\a\talert (bell)" +#~ msgstr "\t\\a\talerta (bell)" + +#~ msgid "\t\\b\tbackspace" +#~ msgstr "\t\\b\tbackspace" + +#~ msgid "\t\\c\tsuppress trailing newline" +#~ msgstr "\t\\c\tsuprimir o caracter final de nova linha" + +#~ msgid "\t\\E\tescape character" +#~ msgstr "\t\\E\to caracter de escape" + +#~ msgid "\t\\f\tform feed" +#~ msgstr "\t\\f\talimentação de formulário (form feed)" + +#~ msgid "\t\\n\tnew line" +#~ msgstr "\t\\n\tnova linha" + +#~ msgid "\t\\r\tcarriage return" +#~ msgstr "\t\\r\tretorno de carro (cr)" + +#~ msgid "\t\\t\thorizontal tab" +#~ msgstr "\t\\t\ttabulação horizontal (ht)" + +#~ msgid "\t\\v\tvertical tab" +#~ msgstr "\t\\v\ttabulação vertical (vt)" + +#~ msgid "\t\\\\\tbackslash" +#~ msgstr "\t\\\\\tcontrabarra" + +#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)." +#~ msgstr "\t\\num\to caracter com código ASCII igual a NUM (octal)." + +#~ msgid "" +#~ "You can explicitly turn off the interpretation of the above characters" +#~ msgstr "" +#~ "Pode-se explicitamente desabilitar a interpretação dos caracteres acima" + +#~ msgid "with the -E option." +#~ msgstr "através da opção -E." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "Exibe ARGS. Se -n for fornecido, o caracter final de nova linha é " +#~ "suprimido." + +#~ msgid "Enable and disable builtin shell commands. This allows" +#~ msgstr "" +#~ "Habilita e desabilita os comandos internos do shell, permitindo usar" + +#~ msgid "you to use a disk command which has the same name as a shell" +#~ msgstr "" +#~ "um comando de disco que tenha o mesmo nome do comando interno do shell." + +#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise" +#~ msgstr "" +#~ "Se -n for especificado, os NOMEs são desabilitados, senão os nomes são" + +#~ msgid "NAMEs are enabled. For example, to use the `test' found on your" +#~ msgstr "" +#~ "habilitados. Por exemplo, para usar `test' encontrado pelo PATH em vez" + +#~ msgid "path instead of the shell builtin version, type `enable -n test'." +#~ msgstr "" +#~ "da versão interna do comando, digite `enable -n test'. Em sistemas que" + +#~ msgid "On systems supporting dynamic loading, the -f option may be used" +#~ msgstr "" +#~ "suportam carregamento dinâmico, pode-se usar a opção -f para carregar" + +#~ msgid "to load new builtins from the shared object FILENAME. The -d" +#~ msgstr "" +#~ "novos comandos internos do objeto compartilhado ARQUIVO. A opção -d" + +#~ msgid "option will delete a builtin previously loaded with -f. If no" +#~ msgstr "" +#~ "elimina os comandos internos previamente carregados com -f. Se nenhum" + +#~ msgid "non-option names are given, or the -p option is supplied, a list" +#~ msgstr "" +#~ "nome for fornecido, ou se a opção -p for fornecida, uma lista de comandos" + +#~ msgid "of builtins is printed. The -a option means to print every builtin" +#~ msgstr "" +#~ "internos é exibida. A opção -a faz com que todos os comandos internos" + +#~ msgid "with an indication of whether or not it is enabled. The -s option" +#~ msgstr "sejam exibidos indicando se estão habilitados ou não. A opção -s" + +#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n" +#~ msgstr "" +#~ "restringe a saída aos comandos internos `especiais' Posix.2. A opção" + +#~ msgid "option displays a list of all disabled builtins." +#~ msgstr "-n exibe a lista de todos os comandos internos desabilitados." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "" +#~ "Ler ARGs como entrada do shell e executar o(s) comando(s) resultante(s)." + +#~ msgid "Getopts is used by shell procedures to parse positional parameters." +#~ msgstr "" +#~ "Getopts é utilizado pelos procedimentos do shell para fazer a leitura\n" +#~ " (parse) dos parâmetros posicionais." + +#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter" +#~ msgstr "OPÇÕES contém as letras das opções a serem reconhecidas; Se uma" + +#~ msgid "is followed by a colon, the option is expected to have an argument," +#~ msgstr "letra é seguida por dois pontos, a opção espera a presença de um" + +#~ msgid "which should be separated from it by white space." +#~ msgstr "argumento que deve ser separado dela por espaço em branco." + +#~ msgid "Each time it is invoked, getopts will place the next option in the" +#~ msgstr "Cada vez que for chamada, `getopts' irá colocar a próxima opção na" + +#~ msgid "shell variable $name, initializing name if it does not exist, and" +#~ msgstr "variável do shell $NOME, inicializando NOME caso não exista, e o" + +#~ msgid "the index of the next argument to be processed into the shell" +#~ msgstr "índice do próximo argumento a ser processado dentro da variável da" + +#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" +#~ msgstr "shell OPTIND. OPTIND é inicializado com 1 cada vez que o script" + +#~ msgid "a shell script is invoked. When an option requires an argument," +#~ msgstr "" +#~ "do shell é chamado. Quando uma opção requer um argumento, `getopts'" + +#~ msgid "getopts places that argument into the shell variable OPTARG." +#~ msgstr "coloca este argumento dentro da variável do shell OPTARG." + +#~ msgid "getopts reports errors in one of two ways. If the first character" +#~ msgstr "" +#~ "`getopts' informa os erros de duas maneiras. Se o primeiro caracter de" + +#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" +#~ msgstr "OPÇÕES for dois pontos, `getopts' usa o modo silencioso. Neste" + +#~ msgid "this mode, no error messages are printed. If an illegal option is" +#~ msgstr "modo, nenhuma mensagem de erro é exibida. Se uma opção ilegal for" + +#~ msgid "seen, getopts places the option character found into OPTARG. If a" +#~ msgstr "encontrada, `getopts' coloca o caracter da opção em OPTARG. Se um" + +#~ msgid "required argument is not found, getopts places a ':' into NAME and" +#~ msgstr "" +#~ "argumento requerido não for encontrado, `getopts' coloca ':' em NOME e" + +#~ msgid "sets OPTARG to the option character found. If getopts is not in" +#~ msgstr "" +#~ "atribui a OPTARG o caracter de opção encontrado. Se `getopts' não está em" + +#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into" +#~ msgstr "" +#~ "modo silencioso, e uma opção ilegal é encontrada, `getopts' coloca '?' em" + +#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'" +#~ msgstr "" +#~ "NOME e desativa OPTARG. Se uma opção requerida não é encontrada, uma '?'" + +#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" +#~ msgstr "" +#~ "é colocada em NOME, OPTARG é desativado, e uma mensagem de diagnóstico é" + +#~ msgid "printed." +#~ msgstr "exibida." + +#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the" +#~ msgstr "Se a variável do shell OPTERR tem o valor 0, `getopts' desabilita a" + +#~ msgid "printing of error messages, even if the first character of" +#~ msgstr "exibição de mensagens de erro, mesmo que o primeiro caracter de" + +#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." +#~ msgstr "OPTSTRING não seja dois pontos. OPTERR tem o valor 1 por padrão." + +#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if" +#~ msgstr "" +#~ "`getopts' normalmente faz a leitura dos parãmetros posicionais ($0 - $9)," + +#~ msgid "more arguments are given, they are parsed instead." +#~ msgstr "mas, se mais argumentos forem fornecidos, então estes são lidos." + +#~ msgid "Exec FILE, replacing this shell with the specified program." +#~ msgstr "" +#~ "Executa ARQUIVO, substituindo esta shell pelo programa especificado." + +#~ msgid "If FILE is not specified, the redirections take effect in this" +#~ msgstr "" +#~ "Se ARQUIVO não for especificado, os redirecionamentos são efetivados" + +#~ msgid "shell. If the first argument is `-l', then place a dash in the" +#~ msgstr "neste shell. Se o primeiro argumento for `-l', coloca um hífen no" + +#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option" +#~ msgstr "argumento `0' passado para ARQUIVO, como no login. Se a opção `-c'" + +#~ msgid "is supplied, FILE is executed with a null environment. The `-a'" +#~ msgstr "for fornecida, ARQUIVO é executado com um ambiente nulo. A opção" + +#~ msgid "option means to make set argv[0] of the executed process to NAME." +#~ msgstr "`-a' significa atribuir NOME para argv[0] do processo executado." + +#~ msgid "If the file cannot be executed and the shell is not interactive," +#~ msgstr "Se o arquivo não puder ser executado e o shell não for interativa," + +#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\"" +#~ msgstr "" +#~ "então o shell termina, a menos que a variável \"no_exit_on_failed_exec\"" + +#~ msgid "is set." +#~ msgstr "esteja inicializada." + +#~ msgid "is that of the last command executed." +#~ msgstr "de saída é igual ao do último comando executado." + +#~ msgid "" +#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a" +#~ msgstr "PRIMEIRO e ÚLTIMO podem ser números especificando o intervalo, ou" + +#~ msgid "string, which means the most recent command beginning with that" +#~ msgstr "PRIMEIRO pode ser uma cadeia de caracteres, representando o comando" + +#~ msgid "string." +#~ msgstr "mais recente começado por estes caracteres." + +#~ msgid "" +#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," +#~ msgstr "" +#~ " -e EDITOR seleciona qual editor usar. O padrão é FCEDIT, depois " +#~ "EDITOR," + +#~ msgid "" +#~ " then the editor which corresponds to the current readline editing" +#~ msgstr "" +#~ " depois o editor correspondente ao modo de edição atual da leitura" + +#~ msgid " mode, then vi." +#~ msgstr " de linha, e depois o vi." + +#~ msgid " -l means list lines instead of editing." +#~ msgstr " -l indica para listar as linha em vez de editá-las." + +#~ msgid " -n means no line numbers listed." +#~ msgstr " -n indica para não listar os números das linhas." + +#~ msgid "" +#~ " -r means reverse the order of the lines (making it newest listed " +#~ "first)." +#~ msgstr "" +#~ " -r faz reverter a ordem das linhas (a última torna-se a primeira)." + +#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" +#~ msgstr "" +#~ "No formato `fc -s [ANTIGO=NOVO ...] [COMANDO]', o comando é executado" + +#~ msgid "re-executed after the substitution OLD=NEW is performed." +#~ msgstr "novamente após a substituição de ANTIGO por NOVO ser realizada." + +#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" +#~ msgstr "" +#~ "Um alias útil a ser usado é r='fc -s' para que, ao se digitar `r cc'," + +#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes" +#~ msgstr "seja executado o último comando começado por `cc' e, ao se digitar" + +#~ msgid "Place JOB_SPEC in the foreground, and make it the current job. If" +#~ msgstr "" +#~ "Colocar JOB-ESPECIFICADO no primeiro plano, e torná-lo o trabalho atual." + +#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is" +#~ msgstr "" +#~ "Se JOB-ESPECIFICADO não estiver presente, a noção do shell do trabalho" + +#~ msgid "used." +#~ msgstr "atual é utilizada." + +#~ msgid "Place JOB_SPEC in the background, as if it had been started with" +#~ msgstr "" +#~ "Colocar JOB-ESPECIFICADO no segundo plano, como se tivesse sido ativado" + +#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" +#~ msgstr "com `&'. Se JOB-ESPECIFICADO não estiver presente, a noção do shell" + +#~ msgid "job is used." +#~ msgstr "do trabalho atual é utilizada." + +#~ msgid "For each NAME, the full pathname of the command is determined and" +#~ msgstr "" +#~ "Para cada NOME, o caminho completo do comando é determinado e lembrado." + +#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the" +#~ msgstr "" +#~ "Se a opção -p for fornecida, CAMINHO é utilizado como o caminho completo" + +#~ msgid "full pathname of NAME, and no path search is performed. The -r" +#~ msgstr "para NOME, e nenhuma procura de caminho é realizada. A opção -r" + +#~ msgid "option causes the shell to forget all remembered locations. If no" +#~ msgstr "" +#~ "faz com que a shell esqueça todas as localizações lembradas. Sem nenhum" + +#~ msgid "" +#~ "arguments are given, information about remembered commands is displayed." +#~ msgstr "argumento, as informações sobre os comandos lembrados são exibidas." + +#~ msgid "Display helpful information about builtin commands. If PATTERN is" +#~ msgstr "Exibe informações úteis sobre os comandos internos. Se PADRÃO for" + +#~ msgid "specified, gives detailed help on all commands matching PATTERN," +#~ msgstr "especificado, fornece ajuda detalhada para todos os comandos que" + +#~ msgid "otherwise a list of the builtins is printed." +#~ msgstr "" +#~ "correspondem ao PADRÃO, senão a lista dos comandos internos é exibida." + +#~ msgid "Display the history list with line numbers. Lines listed with" +#~ msgstr "" +#~ "Exibe a lista histórica com os números das linhas. Linhas contendo um" + +#~ msgid "with a `*' have been modified. Argument of N says to list only" +#~ msgstr "`*' foram modificadas. O argumento N faz listar somente as últimas" + +#~ msgid "the last N lines. The -c option causes the history list to be" +#~ msgstr "N linhas. A opção -c faz com que a lista histórica seja apagada" + +#~ msgid "" +#~ "cleared by deleting all of the entries. The `-w' option writes out the" +#~ msgstr "" +#~ "removendo todas as entradas. A opção `-w' escreve o histórico atual no" + +#~ msgid "" +#~ "current history to the history file; `-r' means to read the file and" +#~ msgstr "" +#~ "arquivo de histórico; A opção `-r' significa ler o arquivo e apensar seu" + +#~ msgid "append the contents to the history list instead. `-a' means" +#~ msgstr "" +#~ "conteúdo à lista histórica. A opção `-a' significa apensar as linhas de" + +#~ msgid "to append history lines from this session to the history file." +#~ msgstr "histórico desta sessão ao arquivo de histórico." + +#~ msgid "Argument `-n' means to read all history lines not already read" +#~ msgstr "A opção `-n' faz ler todas as linhas de histórico ainda não lidas" + +#~ msgid "from the history file and append them to the history list. If" +#~ msgstr "" +#~ "do arquivo histórico, e apensá-las à lista de histórico. Se ARQUIVO" + +#~ msgid "FILENAME is given, then that is used as the history file else" +#~ msgstr "for fornecido, então este é usado como arquivo de histórico, senão" + +#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." +#~ msgstr "" +#~ "se $HISTFILE possui valor, este é usado, senão ~/.bash_history. Se a" + +#~ msgid "If the -s option is supplied, the non-option ARGs are appended to" +#~ msgstr "" +#~ "opção -s for fornecida, os ARGs, que não forem opções, são apensados à" + +#~ msgid "the history list as a single entry. The -p option means to perform" +#~ msgstr "" +#~ "lista histórica como uma única entrada. A opção -p significa realizar a" + +#~ msgid "" +#~ "history expansion on each ARG and display the result, without storing" +#~ msgstr "" +#~ "expansão da história em cada ARG e exibir o resultado, sem armazenar" + +#~ msgid "anything in the history list." +#~ msgstr "nada na lista de histórico." + +#~ msgid "Lists the active jobs. The -l option lists process id's in addition" +#~ msgstr "" +#~ "Lista os trabalhos ativos. A opção -l lista os ID's dos processos além" + +#~ msgid "to the normal information; the -p option lists process id's only." +#~ msgstr "" +#~ "das informações usuais; a opção -p lista somente os ID's dos processos." + +#~ msgid "" +#~ "If -n is given, only processes that have changed status since the last" +#~ msgstr "" +#~ "Se -n for fornecido, somente os processos que mudaram de status desde a" + +#~ msgid "" +#~ "notification are printed. JOBSPEC restricts output to that job. The" +#~ msgstr "" +#~ "última notificação são exibidos. JOB-ESPECIFICADO restringe a saída a " +#~ "este" + +#~ msgid "-r and -s options restrict output to running and stopped jobs only," +#~ msgstr "" +#~ "trabalho. As opções -r e -s restringem a saída apenas aos trabalhos" + +#~ msgid "respectively. Without options, the status of all active jobs is" +#~ msgstr "" +#~ "executando e parados, respectivamente. Sem opções, o status de todos os" + +#~ msgid "" +#~ "printed. If -x is given, COMMAND is run after all job specifications" +#~ msgstr "" +#~ "trabalhos ativos são exibidos. Se -x for fornecido, COMANDO é executado" + +#~ msgid "" +#~ "that appear in ARGS have been replaced with the process ID of that job's" +#~ msgstr "" +#~ "após todas as especificações de trabalho que aparecem em ARGS terem sido" + +#~ msgid "process group leader." +#~ msgstr "substituídas pelo ID do processo líder deste grupo de processos." + +#~ msgid "Removes each JOBSPEC argument from the table of active jobs." +#~ msgstr "" +#~ "Remove cada argumento JOB-ESPECIFICADO da tabela de trabalhos ativos." + +#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" +#~ msgstr "" +#~ "Envia ao processo identificado pelo PID (ou JOB) o sinal SIGSPEC. Se" + +#~ msgid "" +#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" +#~ msgstr "" +#~ "SIGSPEC não estiver presente, então SIGTERM é assumido. A opção `-l'" + +#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to" +#~ msgstr "" +#~ "lista os nomes dos sinais; havendo argumentos após `-l', são assumidos" + +#~ msgid "be signal numbers for which names should be listed. Kill is a shell" +#~ msgstr "" +#~ "como sendo os números dos sinais cujos nomes devem ser exibidos. Kill" + +#~ msgid "builtin for two reasons: it allows job IDs to be used instead of" +#~ msgstr "" +#~ "é um comando interno por duas razões: permite o uso do ID do trabalho em" + +#~ msgid "process IDs, and, if you have reached the limit on processes that" +#~ msgstr "" +#~ "vez do ID do processo e, caso tenha sido atingido o limite de processos " +#~ "que" + +#~ msgid "" +#~ "you can create, you don't have to start a process to kill another one." +#~ msgstr "" +#~ "podem ser criados, não é necessário um novo processo para remover outro." + +#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" +#~ msgstr "Cada ARG é uma expressão aritmética a ser avaliada. A avaliação é" + +#~ msgid "is done in long integers with no check for overflow, though division" +#~ msgstr "" +#~ "feita usando inteiros longos sem verificar estouro, embora a divisão" + +#~ msgid "by 0 is trapped and flagged as an error. The following list of" +#~ msgstr "por 0 seja capturada e indicada como erro. A lista abaixo está" + +#~ msgid "operators is grouped into levels of equal-precedence operators." +#~ msgstr "grupada em níveis de igual de precedência dos operadores." + +#~ msgid "The levels are listed in order of decreasing precedence." +#~ msgstr "Os níveis estão listados em ordem decrescente de precedência." + +#~ msgid "\t-, +\t\tunary minus, plus" +#~ msgstr "\t-, +\t\tmenos, mais unários" + +#~ msgid "\t!, ~\t\tlogical and bitwise negation" +#~ msgstr "\t!, ~\t\tnegação lógica e bit a bit" + +#~ msgid "\t*, /, %\t\tmultiplication, division, remainder" +#~ msgstr "\t*, /, %\t\tmultiplicação, divisão, resto" + +#~ msgid "\t+, -\t\taddition, subtraction" +#~ msgstr "\t+, -\t\tadição, subtração" + +#~ msgid "\t<<, >>\t\tleft and right bitwise shifts" +#~ msgstr "\t<<, >>\t\tdeslocamento à esquerda e à direita bit a bit" + +#~ msgid "\t<=, >=, <, >\tcomparison" +#~ msgstr "\t<=, >=, <, >\tcomparação" + +#~ msgid "\t==, !=\t\tequality, inequality" +#~ msgstr "\t==, !=\t\tigualdade, desigualdade" + +#~ msgid "\t&\t\tbitwise AND" +#~ msgstr "\t&\t\tE bit a bit" + +#~ msgid "\t^\t\tbitwise XOR" +#~ msgstr "\t^\t\tOU Exclusivo (XOR) bit a bit" + +#~ msgid "\t|\t\tbitwise OR" +#~ msgstr "\t|\t\tOU Inclusivo (OR) bit a bit" + +#~ msgid "\t&&\t\tlogical AND" +#~ msgstr "\t&&\t\tE lógico" + +#~ msgid "\t||\t\tlogical OR" +#~ msgstr "\t||\t\tOU lógico" + +#~ msgid "\texpr ? expr : expr" +#~ msgstr "\texpr ? expr : expr" + +#~ msgid "\t\t\tconditional expression" +#~ msgstr "\t\t\texpressão condicional" + +#~ msgid "\t=, *=, /=, %=," +#~ msgstr "\t=, *=, /=, %=," + +#~ msgid "\t+=, -=, <<=, >>=," +#~ msgstr "\t+=, -=, <<=, >>=," + +#~ msgid "\t&=, ^=, |=\tassignment" +#~ msgstr "\t&=, ^=, |=\tatribuição" + +#~ msgid "is replaced by its value (coerced to a long integer) within" +#~ msgstr "substituído pelo seu valor (convertido em inteiro longo) dentro" + +#~ msgid "an expression. The variable need not have its integer attribute" +#~ msgstr "da expressão. A variável não precisa ter seu atributo inteiro" + +#~ msgid "turned on to be used in an expression." +#~ msgstr "ativo para ser usada em uma expressão." + +#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in" +#~ msgstr "" +#~ "Os operadores são avaliados em ordem de precedência. Sub-expressões" + +#~ msgid "parentheses are evaluated first and may override the precedence" +#~ msgstr "entre parênteses são avaliadas primeiro e podem prevalecer sobre as" + +#~ msgid "rules above." +#~ msgstr "regras de precedência anteriores." + +#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" +#~ msgstr "Se o último argumento for avaliado como 0, `let' retorna 1, caso" + +#~ msgid "otherwise." +#~ msgstr "contrário, retorna 0." + +#~ msgid "One line is read from the standard input, and the first word is" +#~ msgstr "Uma linha é lida a partir da entrada padrão, e a primeira palavra é" + +#~ msgid "" +#~ "assigned to the first NAME, the second word to the second NAME, and so" +#~ msgstr "" +#~ "atribuída ao primeiro NOME, a segunda ao segundo NOME, e assim por diante," + +#~ msgid "" +#~ "on, with leftover words assigned to the last NAME. Only the characters" +#~ msgstr "" +#~ "com as palavras restantes atribuídas ao último NOME. Somente os " +#~ "caracteres" + +#~ msgid "found in $IFS are recognized as word delimiters. The return code is" +#~ msgstr "" +#~ "encontrados em $IFS são reconhecidos como delimitadores. O código de " +#~ "retorno" + +#~ msgid "" +#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the" +#~ msgstr "" +#~ "é zero, a menos que EOF seja encontrado. Se nenhum NOME for fornecido," + +#~ msgid "" +#~ "line read is stored in the REPLY variable. If the -r option is given," +#~ msgstr "" +#~ "a linha lida é armazenada na variável REPLY. Se a opção -r for fornecida," + +#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If" +#~ msgstr "" +#~ "significa entrada `textual', desabilitando a interpretação da contrabarra." + +#~ msgid "the `-p' option is supplied, the string supplied as an argument is" +#~ msgstr "" +#~ "Se a opção `-p' for fornecida a MENSAGEM fornecida como argumento é " +#~ "exibida," + +#~ msgid "" +#~ "output without a trailing newline before attempting to read. If -a is" +#~ msgstr "" +#~ "sem o caracter de nova linha, antes de efetuar a leitura. Se a opção -a" + +#~ msgid "" +#~ "supplied, the words read are assigned to sequential indices of ARRAY," +#~ msgstr "" +#~ "for fornecida, as palavras lidas são atribuídas aos índices seqüenciais" + +#~ msgid "starting at zero. If -e is supplied and the shell is interactive," +#~ msgstr "" +#~ "do ARRAY, começando por zero. Se a opção -e for fornecida, e a shell for" + +#~ msgid "readline is used to obtain the line." +#~ msgstr "interativa, `readline' é utilizado para ler a linha." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N" +#~ msgstr "Faz a função terminar com o valor de retorno especificado por N." + +#~ msgid "is omitted, the return status is that of the last command." +#~ msgstr "Se N for omitido, retorna o status do último comando executado." + +#~ msgid " -a Mark variables which are modified or created for export." +#~ msgstr "" +#~ " -a Marcar para exportação as variáveis que são criadas ou " +#~ "modificadas." + +#~ msgid " -b Notify of job termination immediately." +#~ msgstr " -b Notificar imediatamente o término do trabalho." + +#~ msgid " -e Exit immediately if a command exits with a non-zero status." +#~ msgstr "" +#~ " -e Terminar imediatamente se um comando terminar com status != 0." + +#~ msgid " -f Disable file name generation (globbing)." +#~ msgstr " -f Desabilitar a geração de nome de arquivo (metacaracteres)." + +#~ msgid " -h Remember the location of commands as they are looked up." +#~ msgstr " -h Lembrar da localização dos comandos ao procurá-los." + +#~ msgid "" +#~ " -i Force the shell to be an \"interactive\" one. Interactive shells" +#~ msgstr " -i Forçar a shell ser do tipo \"interativa\". `Shells'" + +#~ msgid " always read `~/.bashrc' on startup." +#~ msgstr " interativas sempre lêem `~/.bashrc' ao iniciar." + +#~ msgid " -k All assignment arguments are placed in the environment for a" +#~ msgstr "" +#~ " -k Todos os argumentos de atribuição são colocados no ambiente," + +#~ msgid " command, not just those that precede the command name." +#~ msgstr " e não somente os que precedem o nome do comando." + +#~ msgid " -m Job control is enabled." +#~ msgstr " -m O controle de trabalho está habilitado." + +#~ msgid " -n Read commands but do not execute them." +#~ msgstr " -n Ler os comandos, mas não executá-los." + +#~ msgid " -o option-name" +#~ msgstr " -o NOME-DA-OPÇÃO" + +#~ msgid " Set the variable corresponding to option-name:" +#~ msgstr " Inicializar a variável correspondente ao nome da opção:" + +#~ msgid " allexport same as -a" +#~ msgstr " allexport o mesmo que -a" + +#~ msgid " braceexpand same as -B" +#~ msgstr " braceexpand o mesmo que -B" + +#~ msgid " emacs use an emacs-style line editing interface" +#~ msgstr "" +#~ " emacs usar interface de edição de linha estilo emacs" + +#~ msgid " errexit same as -e" +#~ msgstr " errexit o mesmo que -e" + +#~ msgid " hashall same as -h" +#~ msgstr " hashall o mesmo que -h" + +#~ msgid " histexpand same as -H" +#~ msgstr " histexpand o mesmo que -H" + +#~ msgid " ignoreeof the shell will not exit upon reading EOF" +#~ msgstr " ignoreeof a shell não termina após ler EOF" + +#~ msgid " interactive-comments" +#~ msgstr " interactive-comments" + +#~ msgid "" +#~ " allow comments to appear in interactive commands" +#~ msgstr "" +#~ " permite comentários em comandos interativos" + +#~ msgid " keyword same as -k" +#~ msgstr " keyword o mesmo que -k" + +#~ msgid " monitor same as -m" +#~ msgstr " monitor o mesmo que -m" + +#~ msgid " noclobber same as -C" +#~ msgstr " noclobber o mesmo que -C" + +#~ msgid " noexec same as -n" +#~ msgstr " noexec o mesmo que -n" + +#~ msgid " noglob same as -f" +#~ msgstr " noglob o mesmo que -f" + +#~ msgid " notify save as -b" +#~ msgstr " notify o mesmo que -b" + +#~ msgid " nounset same as -u" +#~ msgstr " nounset o mesmo que -u" + +#~ msgid " onecmd same as -t" +#~ msgstr " onecmd o mesmo que -t" + +#~ msgid " physical same as -P" +#~ msgstr " physical o mesmo que -P" + +#~ msgid "" +#~ " posix change the behavior of bash where the default" +#~ msgstr "" +#~ " posix mudar o comportamento do `bash' onde o padrão" + +#~ msgid "" +#~ " operation differs from the 1003.2 standard to" +#~ msgstr "" +#~ " for diferente do padrão 1003.2, para tornar" + +#~ msgid " match the standard" +#~ msgstr " igual ao padrão" + +#~ msgid " privileged same as -p" +#~ msgstr " privileged o mesmo que -p" + +#~ msgid " verbose same as -v" +#~ msgstr " verbose o mesmo que -v" + +#~ msgid " vi use a vi-style line editing interface" +#~ msgstr "" +#~ " vi usar interface de edição de linha estilo vi" + +#~ msgid " xtrace same as -x" +#~ msgstr " xtrace o mesmo que -x" + +#~ msgid "" +#~ " -p Turned on whenever the real and effective user ids do not match." +#~ msgstr "" +#~ " -p Habilitado sempre que o usuário real e efetivo forem diferentes." + +#~ msgid " Disables processing of the $ENV file and importing of shell" +#~ msgstr "" +#~ " Desabilita o processamento do arquivo $ENV e importação das " +#~ "funções" + +#~ msgid "" +#~ " functions. Turning this option off causes the effective uid and" +#~ msgstr "" +#~ " da shell. Desabilitando esta opção faz com que o `uid' e `gid'" + +#~ msgid " gid to be set to the real uid and gid." +#~ msgstr " efetivos sejam feitos o mesmo que o `uid' e `gid' reais." + +#~ msgid " -t Exit after reading and executing one command." +#~ msgstr " -t Sair após ler e executar um comando." + +#~ msgid " -u Treat unset variables as an error when substituting." +#~ msgstr "" +#~ " -u Tratar como erro as variáveis não inicializadas na substituição." + +#~ msgid " -v Print shell input lines as they are read." +#~ msgstr " -v Exibir as linhas de entrada da shell ao lê-las." + +#~ msgid " -x Print commands and their arguments as they are executed." +#~ msgstr " -x Exibir os comandos e seus argumentos ao executá-los." + +#~ msgid " -B the shell will perform brace expansion" +#~ msgstr " -B a shell irá realizar a expansão das chaves {}" + +#~ msgid " -H Enable ! style history substitution. This flag is on" +#~ msgstr " -H Habilitar o estilo ! para substituição do histórico." + +#~ msgid " by default." +#~ msgstr " Esta opção está ativa por padrão." + +#~ msgid " -C If set, disallow existing regular files to be overwritten" +#~ msgstr " -C Não permite que arquivos regulares existentes sejam" + +#~ msgid " by redirection of output." +#~ msgstr " sobrescritos pelo redirecionamento da saída." + +#~ msgid " -P If set, do not follow symbolic links when executing commands" +#~ msgstr " -P Não seguir os vínculos simbólicos ao executar comandos," + +#~ msgid " such as cd which change the current directory." +#~ msgstr " tais como `cd', que troca o diretório atual." + +#~ msgid "Using + rather than - causes these flags to be turned off. The" +#~ msgstr "Usando + em vez de - faz com que as opções sejam desabilitadas. As" + +#~ msgid "flags can also be used upon invocation of the shell. The current" +#~ msgstr "" +#~ "opções também podem ser usadas na chamada da shell. O conjunto atual" + +#~ msgid "" +#~ "set of flags may be found in $-. The remaining n ARGs are positional" +#~ msgstr "" +#~ "de opções pode ser encontrado em $-. Os n ARGs restantes são parâmetros" + +#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" +#~ msgstr "posicionais e são atribuídos, em ordem, a $1, $2, .. $n. Se nenhum" + +#~ msgid "ARGs are given, all shell variables are printed." +#~ msgstr "ARG for fornecido, todas as variáveis da shell são exibidas." + +#~ msgid "For each NAME, remove the corresponding variable or function. Given" +#~ msgstr "" +#~ "Para cada NOME, remove a variável ou a função correspondente. Usando-se a" + +#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag," +#~ msgstr "" +#~ "opção `-v', `unset' atua somente nas variáveis. Usando-se a opção `-f'" + +#~ msgid "unset will only act on functions. With neither flag, unset first" +#~ msgstr "`unset' atua somente nas funções. Sem nenhuma opção, inicialmente" + +#~ msgid "tries to unset a variable, and if that fails, then tries to unset a" +#~ msgstr "`unset' tenta remover uma variável e, se falhar, tenta remover uma" + +#~ msgid "" +#~ "function. Some variables (such as PATH and IFS) cannot be unset; also" +#~ msgstr "" +#~ "função. Algumas variáveis (como PATH e IFS) não podem ser removidas." + +#~ msgid "see readonly." +#~ msgstr "Veja também o comando `readonly'." + +#~ msgid "NAMEs are marked for automatic export to the environment of" +#~ msgstr "" +#~ "NOMEs são marcados para serem automaticamente exportados para o ambiente" + +#~ msgid "subsequently executed commands. If the -f option is given," +#~ msgstr "dos comando executados a seguir. Se a opção -f for fornecida," + +#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" +#~ msgstr "" +#~ "os NOMEs se referem a funções. Se nenhum nome for fornecido, ou se `-p'" + +#~ msgid "is given, a list of all names that are exported in this shell is" +#~ msgstr "" +#~ "for usado, uma lista com todos os nomes que são exportados nesta shell é" + +#~ msgid "printed. An argument of `-n' says to remove the export property" +#~ msgstr "" +#~ "exibida. O argumento `-n' faz remover a propriedade de exportação dos" + +#~ msgid "from subsequent NAMEs. An argument of `--' disables further option" +#~ msgstr "NOMEs subseqüentes. O argumento `--' desabilita o processamento de" + +#~ msgid "processing." +#~ msgstr "opções posteriores." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may" +#~ msgstr "" +#~ "Os NOMEs são marcados como somente para leitura, e os valores destes" + +#~ msgid "not be changed by subsequent assignment. If the -f option is given," +#~ msgstr "" +#~ "NOMEs não poderão ser alterados por novas atribuições. Se a opção -f for" + +#~ msgid "then functions corresponding to the NAMEs are so marked. If no" +#~ msgstr "" +#~ "fornecida, as funções correspondentes a NOMEs também são marcadas. Sem" + +#~ msgid "" +#~ "arguments are given, or if `-p' is given, a list of all readonly names" +#~ msgstr "" +#~ "nenhum argumento, ou se `-p' for usado, uma lista com todos os nomes" + +#~ msgid "" +#~ "is printed. An argument of `-n' says to remove the readonly property" +#~ msgstr "" +#~ "somente para leitura é exibida. O argumento `-n' remove a propriedade" + +#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as" +#~ msgstr "somente para leitura. A opção `-a' faz tratar cada NOME como uma" + +#~ msgid "an array variable. An argument of `--' disables further option" +#~ msgstr "" +#~ "variável tipo array. Um argumento `--' desabilita o processamento de" + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is" +#~ msgstr "" +#~ "Os parâmetros posicionais a partir de $N+1 ... são deslocados para $1 ..." + +#~ msgid "not given, it is assumed to be 1." +#~ msgstr "Se N não for especificado, o valor 1 é assumido ($2 vira $1 ...)." + +#~ msgid "Read and execute commands from FILENAME and return. The pathnames" +#~ msgstr "Ler e executar os comandos em ARQUIVO e retornar. Os caminhos em" + +#~ msgid "in $PATH are used to find the directory containing FILENAME." +#~ msgstr "$PATH são usados para encontrar o diretório contendo o ARQUIVO." + +#~ msgid "Suspend the execution of this shell until it receives a SIGCONT" +#~ msgstr "" +#~ "Suspender a execução desta shell até que o sinal SIGCONT seja recebido." + +#~ msgid "signal. The `-f' if specified says not to complain about this" +#~ msgstr "Se a opção `-f' for especificada indica para não reclamar sobre ser" + +#~ msgid "being a login shell if it is; just suspend anyway." +#~ msgstr "" +#~ "uma `shell de login', caso seja; simplesmente suspender de qualquer forma." + +#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on" +#~ msgstr "" +#~ "Termina com status 0 (verdadeiro) ou 1 (falso) conforme EXPR for avaliada." + +#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" +#~ msgstr "" +#~ "As expressões podem ser unárias ou binárias. As expressões unárias são" + +#~ msgid "expressions are often used to examine the status of a file. There" +#~ msgstr "" +#~ "muito usadas para examinar o status de um arquivo. Existem, também," + +#~ msgid "are string operators as well, and numeric comparison operators." +#~ msgstr "" +#~ "operadores para cadeias de caracteres (strings) e comparações numéricas." + +#~ msgid "File operators:" +#~ msgstr "Operadores para arquivos:" + +#~ msgid " -b FILE True if file is block special." +#~ msgstr " -b ARQUIVO Verdade se o arquivo for do tipo especial de bloco." + +#~ msgid " -c FILE True if file is character special." +#~ msgstr "" +#~ " -c ARQUIVO Verdade se o arquivo for do tipo especial de caracter." + +#~ msgid " -d FILE True if file is a directory." +#~ msgstr " -d ARQUIVO Verdade se o arquivo for um diretório." + +#~ msgid " -e FILE True if file exists." +#~ msgstr " -e ARQUIVO Verdade se o arquivo existir." + +#~ msgid " -f FILE True if file exists and is a regular file." +#~ msgstr " -f ARQUIVO Verdade se o arquivo existir e for do tipo regular." + +#~ msgid " -g FILE True if file is set-group-id." +#~ msgstr "" +#~ " -g ARQUIVO Verdade se o arquivo tiver o bit \"set-group-id\" ativo." + +#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"." +#~ msgstr "" +#~ " -h ARQUIVO Verdade se arquivo for um vínculo simbólico. Usar \"-L\"." + +#~ msgid " -L FILE True if file is a symbolic link." +#~ msgstr " -L ARQUIVO Verdade se o arquivo for um vínculo simbólico." + +#~ msgid " -k FILE True if file has its \"sticky\" bit set." +#~ msgstr " -k ARQUIVO Verdade se o arquivo tiver o bit \"sticky\" ativo." + +#~ msgid " -p FILE True if file is a named pipe." +#~ msgstr " -p ARQUIVO Verdade se o arquivo for um `named pipe'." + +#~ msgid " -r FILE True if file is readable by you." +#~ msgstr "" +#~ " -r ARQUIVO Verdade se você tiver autorização para ler o arquivo." + +#~ msgid " -s FILE True if file exists and is not empty." +#~ msgstr " -s ARQUIVO Verdade se o arquivo existir e não estiver vazio." + +#~ msgid " -S FILE True if file is a socket." +#~ msgstr " -S ARQUIVO Verdade se o arquivo for um soquete." + +#~ msgid " -t FD True if FD is opened on a terminal." +#~ msgstr "" +#~ " -t FD Verdade se o descritor de arquivo (FD) estiver aberto\n" +#~ " em um terminal." + +#~ msgid " -u FILE True if the file is set-user-id." +#~ msgstr "" +#~ " -u ARQUIVO Verdade se o arquivo tiver o bit \"set-user-id\" ativo." + +#~ msgid " -w FILE True if the file is writable by you." +#~ msgstr "" +#~ " -w ARQUIVO Verdade se você tiver autorização para escrever no " +#~ "arquivo." + +#~ msgid " -x FILE True if the file is executable by you." +#~ msgstr "" +#~ " -x ARQUIVO Verdade se você tiver autorização para executar o arquivo." + +#~ msgid " -O FILE True if the file is effectively owned by you." +#~ msgstr "" +#~ " -O ARQUIVO Verdade se o arquivo pertencer ao seu usuário efetivo." + +#~ msgid "" +#~ " -G FILE True if the file is effectively owned by your group." +#~ msgstr "" +#~ " -G ARQUIVO Verdade se o arquivo pertencer ao seu grupo efetivo." + +#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to" +#~ msgstr " ARQ1 -nt ARQ2 Verdade se ARQ1 for mais novo (conforme a data" + +#~ msgid " modification date) file2." +#~ msgstr " de modificação) do que ARQ2." + +#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2." +#~ msgstr " ARQ1 -ot ARQ2 Verdade se ARQ1 for mais antigo que ARQ2." + +#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." +#~ msgstr "" +#~ " ARQ1 -ef ARQ2 Verdade se ARQ1 for um vínculo direto para ARQ2.\n" +#~ " (mesma unidade e mesmo número do inode)" + +#~ msgid "String operators:" +#~ msgstr "Operadores para cadeias de caracteres (strings):" + +#~ msgid " -z STRING True if string is empty." +#~ msgstr " -z STRING Verdade se STRING estiver vazia." + +#~ msgid " -n STRING" +#~ msgstr " -n STRING" + +#~ msgid " STRING True if string is not empty." +#~ msgstr " STRING Verdade se STRING não estiver vazia." + +#~ msgid " STRING1 = STRING2" +#~ msgstr " STRING1 = STRING2" + +#~ msgid " True if the strings are equal." +#~ msgstr " Verdade se STRING1 for idêntica à STRING2." + +#~ msgid " STRING1 != STRING2" +#~ msgstr " STRING1 != STRING2" + +#~ msgid " True if the strings are not equal." +#~ msgstr " Verdade se STRING1 não for idêntica à STRING2." + +#~ msgid " STRING1 < STRING2" +#~ msgstr " STRING1 < STRING2" + +#~ msgid "" +#~ " True if STRING1 sorts before STRING2 lexicographically" +#~ msgstr "" +#~ " Verdade se STRING1 tiver ordenação anterior à STRING2." + +#~ msgid " STRING1 > STRING2" +#~ msgstr " STRING1 > STRING2" + +#~ msgid "" +#~ " True if STRING1 sorts after STRING2 lexicographically" +#~ msgstr "" +#~ " Verdade se STRING1 tiver ordenação posterior à STRING2." + +#~ msgid "Other operators:" +#~ msgstr "Outros operadores:" + +#~ msgid " ! EXPR True if expr is false." +#~ msgstr " ! EXPR Verdade se a expressão EXPR for falsa." + +#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." +#~ msgstr " EXPR1 -a EXPR2 Verdade se EXPR1 `E' EXPR2 forem verdadeiras." + +#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." +#~ msgstr " EXPR1 -o EXPR2 Verdade se EXPR1 `OU' EXPR2 for verdadeira." + +#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," +#~ msgstr " arg1 OP arg2 Testes aritméticos. OP pode ser -eq, -ne," + +#~ msgid " -lt, -le, -gt, or -ge." +#~ msgstr " -lt, -le, -gt, ou -ge." + +#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal," +#~ msgstr "" +#~ "Operadores aritméticos binários retornam verdadeiro se ARG1 for igual," + +#~ msgid "" +#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" +#~ msgstr "diferente, menor, menor ou igual, maior, ou maior ou igual do que" + +#~ msgid "than ARG2." +#~ msgstr "ARG2, respectivamente." + +#~ msgid "This is a synonym for the \"test\" builtin, but the last" +#~ msgstr "É um sinônimo para o comando interno \"test\", mas o último" + +#~ msgid "argument must be a literal `]', to match the opening `['." +#~ msgstr "argumento deve ser o literal `]', para fechar o `[' de abertura." + +#~ msgid "Print the accumulated user and system times for processes run from" +#~ msgstr "" +#~ "Exibe os tempos acumulados do usuário e do sistema para os processos" + +#~ msgid "the shell." +#~ msgstr "executados por esta shell." + +#~ msgid "The command ARG is to be read and executed when the shell receives" +#~ msgstr "" +#~ "O comando em ARG é para ser lido e executado quando a shell receber o(s)" + +#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" +#~ msgstr "" +#~ "sinal(is) SINAL-ESPEC. Se ARG for omitido, todos os sinais especificados" + +#~ msgid "reset to their original values. If ARG is the null string each" +#~ msgstr "" +#~ "retornam aos seus valores originais. Se ARG for uma string nula, cada" + +#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." +#~ msgstr "" +#~ "SINAL-ESPEC é ignorado pela shell e pelos comandos chamados por ela." + +#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" +#~ msgstr "" +#~ "Se SINAL-ESPEC for EXIT (0) o comando em ARG é executado na saída da" + +#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every" +#~ msgstr "" +#~ "shell. Se SINAL-ESPEC for DEBUG, o comando em ARG é executado após cada" + +#~ msgid "command. If ARG is `-p' then the trap commands associated with" +#~ msgstr "" +#~ "comando. Se ARG for `-p' então os comandos de captura associados com cada" + +#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" +#~ msgstr "SINAL-ESPEC são exibidos. Se nenhum argumento for fornecido, ou se" + +#~ msgid "only `-p' is given, trap prints the list of commands associated with" +#~ msgstr "" +#~ "somente `-p' for fornecido, é exibida a lista dos comandos associados" + +#~ msgid "" +#~ "each signal number. SIGNAL_SPEC is either a signal name in " +#~ msgstr "" +#~ "com cada número de sinal. SINAL-ESPEC é um nome de sinal em ou" + +#~ msgid "" +#~ "or a signal number. `trap -l' prints a list of signal names and their" +#~ msgstr "" +#~ "um número de sinal. `trap -l' exibe a lista de nomes de sinais com seus" + +#~ msgid "corresponding numbers. Note that a signal can be sent to the shell" +#~ msgstr "" +#~ "números correspondentes. Note que o sinal pode ser enviado para a shell" + +#~ msgid "with \"kill -signal $$\"." +#~ msgstr "através do comando \"kill -SINAL $$\"." + +#~ msgid "For each NAME, indicate how it would be interpreted if used as a" +#~ msgstr "Para cada NOME, indica como este deve ser interpretado caso seja" + +#~ msgid "If the -t option is used, returns a single word which is one of" +#~ msgstr "" +#~ "Se a opção -t for fornecida, `type' retorna uma única palavra dentre" + +#~ msgid "" +#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" +#~ msgstr "" +#~ "`alias', `keyword', `function', `builtin', `file' ou `', se NOME for um" + +#~ msgid "" +#~ "alias, shell reserved word, shell function, shell builtin, disk file," +#~ msgstr "" +#~ "alias, uma palavra reservada, função ou comando interno da shell, um " +#~ "arquivo" + +#~ msgid "or unfound, respectively." +#~ msgstr "em disco, ou não for encontrado, respectivamente." + +#~ msgid "If the -p flag is used, either returns the name of the disk file" +#~ msgstr "Se a opção -p for fornecida, retorna o nome do arquivo em disco que" + +#~ msgid "that would be executed, or nothing if -t would not return `file'." +#~ msgstr "deve ser executado, ou nada, caso -t não retorne `file'." + +#~ msgid "If the -a flag is used, displays all of the places that contain an" +#~ msgstr "Se a opção -a for fornecida, exibe todos os locais que contém um" + +#~ msgid "" +#~ "executable named `file'. This includes aliases and functions, if and" +#~ msgstr "" +#~ "arquivo executável chamado `ARQUIVO', incluindo os aliases e funções," + +#~ msgid "only if the -p flag is not also used." +#~ msgstr "mas somente se a opção -p não for fornecida conjuntamente." + +#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t," +#~ msgstr "O comando `type' aceita -all, -path, e -type no lugar de" + +#~ msgid "respectively." +#~ msgstr "-a, -p, and -t, respectivamente." + +#~ msgid "Ulimit provides control over the resources available to processes" +#~ msgstr "" +#~ "Ulimit estabelece controle sobre os recursos disponíveis para os processos" + +#~ msgid "started by the shell, on systems that allow such control. If an" +#~ msgstr "" +#~ "iniciados por esta shell, em sistemas que permitem estes controles. Se uma" + +#~ msgid "option is given, it is interpreted as follows:" +#~ msgstr "opção for fornecida, é interpretada como mostrado a seguir:" + +#~ msgid " -S\tuse the `soft' resource limit" +#~ msgstr " -S\tutilizar os limites correntes (`soft') dos recursos" + +#~ msgid " -H\tuse the `hard' resource limit" +#~ msgstr " -H\tutilizar os limites absolutos (`hard') dos recursos" + +#~ msgid " -a\tall current limits are reported" +#~ msgstr " -a\ttodos os limites correntes são informados" + +#~ msgid " -c\tthe maximum size of core files created" +#~ msgstr "" +#~ " -c\to tamanho máximo para os arquivos de imagem do núcleo criados" + +#~ msgid " -d\tthe maximum size of a process's data segment" +#~ msgstr " -d\to tamanho máximo do segmento de dados de um processo" + +#~ msgid " -m\tthe maximum resident set size" +#~ msgstr "" +#~ " -m\to tamanho máximo do conjunto de processos residentes em memória" + +#~ msgid " -s\tthe maximum stack size" +#~ msgstr " -s\to tamanho máximo da pilha" + +#~ msgid " -t\tthe maximum amount of cpu time in seconds" +#~ msgstr " -t\ta quantidade máxima de tempo de CPU em segundos" + +#~ msgid " -f\tthe maximum size of files created by the shell" +#~ msgstr " -f\to tamanho máximo dos arquivos criados pela shell" + +#~ msgid " -p\tthe pipe buffer size" +#~ msgstr " -p\to tamanho da área intermediária (buffer) do `pipe'" + +#~ msgid " -n\tthe maximum number of open file descriptors" +#~ msgstr " -n\to número máximo de descritores de arquivos abertos" + +#~ msgid " -u\tthe maximum number of user processes" +#~ msgstr " -u\to número máximo de processos do usuário" + +#~ msgid " -v\tthe size of virtual memory" +#~ msgstr " -v\to tamanho da memória virtual" + +#~ msgid "If LIMIT is given, it is the new value of the specified resource." +#~ msgstr "" +#~ "Se LIMITE for fornecido, torna-se o novo valor do recurso especificado." + +#~ msgid "Otherwise, the current value of the specified resource is printed." +#~ msgstr "Senão, o valor atual do recurso especificado é exibido." + +#~ msgid "If no option is given, then -f is assumed. Values are in 1k" +#~ msgstr "" +#~ "Se nenhuma opção for fornecida, então -f é assumido. Os valores são em" + +#~ msgid "increments, except for -t, which is in seconds, -p, which is in" +#~ msgstr "incrementos de 1k, exceto para -t, que é em segundos, -p, que é em" + +#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of" +#~ msgstr "incrementos de 512 bytes, e -u, que é o número cardinal de" + +#~ msgid "processes." +#~ msgstr "processos." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if" +#~ msgstr "" +#~ "MODO é atribuído à máscara de criação de arquivos do usuário. Se omitido," + +#~ msgid "" +#~ "`-S' is supplied, the current value of the mask is printed. The `-S'" +#~ msgstr "" +#~ "ou se `-S' for especificado, a máscara em uso é exibida. A opção `-S'" + +#~ msgid "" +#~ "option makes the output symbolic; otherwise an octal number is output." +#~ msgstr "exibe símbolos na saída; sem esta opção um número octal é exibido." + +#~ msgid "If MODE begins with a digit, it is interpreted as an octal number," +#~ msgstr "" +#~ "Se MODO começar por um dígito, é interpretado como sendo um número octal," + +#~ msgid "" +#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)." +#~ msgstr "" +#~ "senão devem ser caracteres simbólicos, como os aceitos por chmod(1)." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If" +#~ msgstr "" +#~ "Aguardar pelo processo especificado e informar seu status de término. Se N" + +#~ msgid "N is not given, all currently active child processes are waited for," +#~ msgstr "" +#~ "não for especificado, todos os processos filhos ativos são aguardados," + +#~ msgid "and the return code is zero. N may be a process ID or a job" +#~ msgstr "e o código de retorno é zero. N pode ser o ID de um processo ou a" + +#~ msgid "specification; if a job spec is given, all processes in the job's" +#~ msgstr "" +#~ "especificação de um trabalho; Se for a especificação de um trabalho, todos" + +#~ msgid "pipeline are waited for." +#~ msgstr "os processos presentes no `pipeline' do trabalho são aguardados." + +#~ msgid "and the return code is zero. N is a process ID; if it is not given," +#~ msgstr "" +#~ "e o código de retorno é zero. N é o ID de um processo; se N não for" + +#~ msgid "all child processes of the shell are waited for." +#~ msgstr "especificado, todos os processos filhos da shell são aguardados." + +#~ msgid "The `for' loop executes a sequence of commands for each member in a" +#~ msgstr "" +#~ "O laço `for' executa a seqüência de comandos para cada membro na lista de" + +#~ msgid "" +#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" +#~ msgstr "" +#~ "items. Se `in PALAVRAS ...;' não estiver presente, então `in \"$@\"'" + +#~ msgid "" +#~ "assumed. For each element in WORDS, NAME is set to that element, and" +#~ msgstr "" +#~ "(parâmetros posicionais) é assumido. Para cada elemento em PALAVRAS, NOME" + +#~ msgid "the COMMANDS are executed." +#~ msgstr "assume seu valor, e os COMANDOS são executados." + +#~ msgid "The WORDS are expanded, generating a list of words. The" +#~ msgstr "" +#~ "As palavras são expandidas, gerando uma lista de palavras. O conjunto" + +#~ msgid "set of expanded words is printed on the standard error, each" +#~ msgstr "" +#~ "de palavras expandidas é enviado para a saída de erro padrão, cada uma" + +#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" +#~ msgstr "" +#~ "precedida por um número. Se `in PALAVRAS' for omitido, `in \"$@\"' é" + +#~ msgid "is assumed. The PS3 prompt is then displayed and a line read" +#~ msgstr "assumido. Em seguida o prompt PS3 é exibido, e uma linha é lida da" + +#~ msgid "from the standard input. If the line consists of the number" +#~ msgstr "" +#~ "entrada padrão. Se a linha consistir do número correspondente ao número" + +#~ msgid "corresponding to one of the displayed words, then NAME is set" +#~ msgstr "de uma das palavras exibidas, então NOME é atribuído para esta" + +#~ msgid "to that word. If the line is empty, WORDS and the prompt are" +#~ msgstr "" +#~ "PALAVRA. Se a linha estiver vazia, PALAVRAS e o prompt são exibidos" + +#~ msgid "redisplayed. If EOF is read, the command completes. Any other" +#~ msgstr "" +#~ "novamente. Se EOF for lido, o comando termina. Qualquer outro valor" + +#~ msgid "value read causes NAME to be set to null. The line read is saved" +#~ msgstr "lido faz com que NOME seja tornado nulo. A linha lida é salva" + +#~ msgid "in the variable REPLY. COMMANDS are executed after each selection" +#~ msgstr "na variável REPLY. COMANDOS são executados após cada seleção" + +#~ msgid "until a break or return command is executed." +#~ msgstr "até que o comando `break' ou `return' seja executado." + +#~ msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" +#~ msgstr "" +#~ "Executar seletivamente COMANDOS tomando por base a correspondência entre" + +#~ msgid "`|' is used to separate multiple patterns." +#~ msgstr "" +#~ "PALAVRA e PADRÃO. O caracter `|' é usado para separar múltiplos padrões." + +#~ msgid "" +#~ "The if COMMANDS are executed. If the exit status is zero, then the then" +#~ msgstr "" +#~ "Os COMANDOS `if' são executados. Se os status de saída for zero, então os" + +#~ msgid "" +#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" +#~ msgstr "" +#~ "COMANDOS `then' são executados, senão, os COMANDOS `elif' são executados " +#~ "em" + +#~ msgid "" +#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS" +#~ msgstr "" +#~ "seqüência e, se o status de saída for zero, os COMANDOS `then' associados" + +#~ msgid "" +#~ "are executed and the if command completes. Otherwise, the else COMMANDS" +#~ msgstr "" +#~ "são executados e o `if' termina. Senão, os COMANDOS da cláusula `else'" + +#~ msgid "" +#~ "are executed, if present. The exit status is the exit status of the last" +#~ msgstr "" +#~ "são executados, se houver. O status de saída é o status de saída do" + +#~ msgid "command executed, or zero if no condition tested true." +#~ msgstr "" +#~ "último comando executado, ou zero, se nenhuma condição for verdadeira." + +#~ msgid "Expand and execute COMMANDS as long as the final command in the" +#~ msgstr "Expande e executa COMANDOS enquanto o comando final nos" + +#~ msgid "`while' COMMANDS has an exit status of zero." +#~ msgstr "COMANDOS `while' tiver um status de saída igual a zero." + +#~ msgid "`until' COMMANDS has an exit status which is not zero." +#~ msgstr "COMANDOS `until' tiver um status de saída diferente de zero." + +#~ msgid "Create a simple command invoked by NAME which runs COMMANDS." +#~ msgstr "Cria um comando chamado NOME o qual executa COMANDOS." + +#~ msgid "Arguments on the command line along with NAME are passed to the" +#~ msgstr "Os argumentos na linha de comando juntamente com NOME são passados" + +#~ msgid "function as $0 .. $n." +#~ msgstr "para a função como $0 .. $n." + +#~ msgid "Run a set of commands in a group. This is one way to redirect an" +#~ msgstr "Executa um conjunto de comandos agrupando-os. Esta é uma forma de" + +#~ msgid "entire set of commands." +#~ msgstr "redirecionar todo um conjunto de comandos." + +#~ msgid "This is similar to the `fg' command. Resume a stopped or background" +#~ msgstr "" +#~ "Semelhante ao comando `fg'. Prossegue a execução de um trabalho parado ou" + +#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify" +#~ msgstr "" +#~ "em segundo plano. Se DÍGITOS for especificado, então este trabalho é " +#~ "usado." + +#~ msgid "" +#~ "WORD, then the job whose name begins with WORD is used. Following the" +#~ msgstr "" +#~ "Se for especificado PALAVRA, o trabalho começado por PALAVRA é usado." + +#~ msgid "job specification with a `&' places the job in the background." +#~ msgstr "" +#~ "Seguindo-se a especificação por um `&' põe o trabalho em segundo plano." + +#~ msgid "BASH_VERSION The version numbers of this Bash." +#~ msgstr "BASH_VERSION Os números da versão desta `bash'." + +#~ msgid "CDPATH A colon separated list of directories to search" +#~ msgstr "CDPATH Uma lista, separada por dois pontos, de diretórios" + +#~ msgid "\t\twhen the argument to `cd' is not found in the current" +#~ msgstr "\t\ta serem pesquisados quando o argumento para `cd' não for" + +#~ msgid "\t\tdirectory." +#~ msgstr "\t\tencontrado no diretório atual." + +#~ msgid "" +#~ "HISTFILE The name of the file where your command history is stored." +#~ msgstr "" +#~ "HISTFILE O nome do arquivo onde o histórico de comandos é " +#~ "armazenado." + +#~ msgid "HISTFILESIZE The maximum number of lines this file can contain." +#~ msgstr "" +#~ "HISTFILESIZE O número máximo de linhas que este arquivo pode conter." + +#~ msgid "HISTSIZE The maximum number of history lines that a running" +#~ msgstr "HISTSIZE O número máximo de linhas do histórico que uma" + +#~ msgid "\t\tshell can access." +#~ msgstr "\t\tshell em execução pode acessar." + +#~ msgid "HOME The complete pathname to your login directory." +#~ msgstr "" +#~ "HOME O nome completo do caminho do seu diretório de login." + +#~ msgid "" +#~ "HOSTTYPE The type of CPU this version of Bash is running under." +#~ msgstr "" +#~ "HOSTTYPE O tipo de CPU sob a qual esta `bash' está executando." + +#~ msgid "" +#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF" +#~ msgstr "IGNOREEOF Controla a ação da shell ao receber um caracter" + +#~ msgid "\t\tcharacter as the sole input. If set, then the value" +#~ msgstr "\t\tEOF como única entrada. Se estiver ativa, então o valor da" + +#~ msgid "\t\tof it is the number of EOF characters that can be seen" +#~ msgstr "\t\tvariável é o número de caracteres EOF que podem ser recebidos," + +#~ msgid "\t\tin a row on an empty line before the shell will exit" +#~ msgstr "\t\tde forma seguida em uma linha vazia, antes da shell terminar" + +#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input." +#~ msgstr "" +#~ "\t\t(padrão 10). Caso contrário, EOF significa o fim da entrada de dados." + +#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." +#~ msgstr "" +#~ "MAILCHECK\tFreqüência, em segundos, para a `bash' verificar novo e-mail." + +#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" +#~ msgstr "" +#~ "MAILPATH\tUma lista, separada por dois pontos, de nomes de arquivos," + +#~ msgid "\t\tfor new mail." +#~ msgstr "\t\tnos quais a `bash' vai verificar se existe novo e-mail." + +#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." +#~ msgstr "OSTYPE\t\tA versão do Unix sob a qual a `bash' está executando." + +#~ msgid "PATH A colon-separated list of directories to search when" +#~ msgstr "" +#~ "PATH Uma lista, separada por dois pontos, de diretórios a" + +#~ msgid "\t\tlooking for commands." +#~ msgstr "\t\tserem pesquisados quando os comandos forem procurados." + +#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each" +#~ msgstr "PROMPT_COMMAND O comando a ser executado antes da exibição de cada" + +#~ msgid "\t\tprimary prompt." +#~ msgstr "\t\tmensagem de prompt primária." + +#~ msgid "PS1 The primary prompt string." +#~ msgstr "PS1 A mensagem primária de prompt exibida." + +#~ msgid "PS2 The secondary prompt string." +#~ msgstr "PS2 A mensagem secundária de prompt exibida." + +#~ msgid "TERM The name of the current terminal type." +#~ msgstr "TERM O nome do tipo de terminal em uso no momento." + +#~ msgid "auto_resume Non-null means a command word appearing on a line by" +#~ msgstr "" +#~ "auto_resume Não nulo significa que um comando aparecendo sozinho em" + +#~ msgid "\t\titself is first looked for in the list of currently" +#~ msgstr "" +#~ "\t\tlinha deve ser procurado primeiro na lista de trabalhos parados." + +#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded." +#~ msgstr "" +#~ "\t\tSe for encontrado na lista, o trabalho vai para o primeiro plano." + +#~ msgid "\t\tA value of `exact' means that the command word must" +#~ msgstr "" +#~ "\t\tO valor `exact' significa que a palavra do comando deve corresponder" + +#~ msgid "\t\texactly match a command in the list of stopped jobs. A" +#~ msgstr "\t\texatamente a um comando da lista de trabalhos parados." + +#~ msgid "\t\tvalue of `substring' means that the command word must" +#~ msgstr "\t\tO valor `substring' significa que a palavra do comando deve" + +#~ msgid "\t\tmatch a substring of the job. Any other value means that" +#~ msgstr "\t\tcorresponder a uma parte do trabalho. Qualquer outro valor" + +#~ msgid "\t\tthe command must be a prefix of a stopped job." +#~ msgstr "" +#~ "\t\tsignifica que o comando deve ser um prefixo de um trabalho parado." + +#~ msgid "command_oriented_history" +#~ msgstr "command_oriented_history" + +#~ msgid "" +#~ " Non-null means to save multiple-line commands together on" +#~ msgstr "" +#~ " Se não for nulo significa salvar comandos com múltiplas" + +#~ msgid " a single history line." +#~ msgstr " linhas, juntas em uma única linha do histórico." + +#~ msgid "histchars Characters controlling history expansion and quick" +#~ msgstr "" +#~ "histchars Caracteres que controlam a expansão do histórico e a" + +#~ msgid "\t\tsubstitution. The first character is the history" +#~ msgstr "\t\tsubstituição rápida. O primeiro caracter é o de substituição" + +#~ msgid "\t\tsubstitution character, usually `!'. The second is" +#~ msgstr "\t\tdo histórico, geralmente o `!'. O segundo caracter é o" + +#~ msgid "\t\tthe `quick substitution' character, usually `^'. The" +#~ msgstr "\t\tde substituição rápida, geralmente o `^'. O terceiro caracter" + +#~ msgid "\t\tthird is the `history comment' character, usually `#'." +#~ msgstr "\t\té o de comentário do histórico, geralmente o `#'." + +#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter" +#~ msgstr "" +#~ "HISTCONTROL\tCom valor igual a `ignorespace', significa não introduzir" + +#~ msgid "\t\tlines which begin with a space or tab on the history" +#~ msgstr "" +#~ "\t\tlinhas que iniciam por espaço ou tabulação na lista de histórico." + +#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't" +#~ msgstr "\t\tCom valor igual a `ignoredups', significa não introduzir linhas" + +#~ msgid "\t\tenter lines which match the last entered line. Set to" +#~ msgstr "\t\tque correspondam à última linha introduzida. Com valor igual a" + +#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset," +#~ msgstr "\t\t`ignoreboth' significa combinar as duas opções. Remover," + +#~ msgid "\t\tor set to any other value than those above means to save" +#~ msgstr "" +#~ "\t\tou atribuir algum outro valor que não os acima, significa salvar" + +#~ msgid "\t\tall lines on the history list." +#~ msgstr "\t\ttodas as linhas na lista de histórico." + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "Adiciona o diretório no topo da pilha de diretórios, ou rotaciona a" + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "" +#~ "pilha, fazendo o diretório atual de trabalho ficar no topo da pilha." + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "Sem nenhum argumento, troca os dois diretórios do topo." + +#~ msgid "+N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "" +#~ "+N\tRotaciona a pilha de tal forma que o n-ésimo diretório (contado a" + +#~ msgid "\tfrom the left of the list shown by `dirs') is at the top." +#~ msgstr "\tpartir da esquerda da lista exibida por `dirs') fique no topo." + +#~ msgid "-N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "" +#~ "-N\tRotaciona a pilha de tal forma que o n-ésimo diretório (contado a" + +#~ msgid "\tfrom the right) is at the top." +#~ msgstr "\tpartir da direita) fique no topo." + +#~ msgid "-n\tsuppress the normal change of directory when adding directories" +#~ msgstr "-n\tsuprime a troca normal de diretório ao se adicionar diretórios" + +#~ msgid "\tto the stack, so only the stack is manipulated." +#~ msgstr "\tà pilha, fazendo com que somente a pilha seja manipulada." + +#~ msgid "dir\tadds DIR to the directory stack at the top, making it the" +#~ msgstr "dir\tadiciona DIR à pilha de diretórios, no topo, tornando-o o" + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "Você pode exibir a pilha de diretórios através do comando `dirs'." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Remove entradas da pilha de diretórios. Sem nenhum argumento," + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "remove o diretório que está no topo da pilha, e executa `cd' para" + +#~ msgid "+N\tremoves the Nth entry counting from the left of the list" +#~ msgstr "+N\tremove a n-ésima entrada contada a partir da esquerda da lista" + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr "\texibida por `dirs', começando por zero. Por exemplo: `popd +0'" + +#~ msgid "\tremoves the first directory, `popd +1' the second." +#~ msgstr "\tremove o primeiro diretório, `popd +1' o segundo." + +#~ msgid "-N\tremoves the Nth entry counting from the right of the list" +#~ msgstr "-N\tremove a n-ésima entrada contada a partir da direita da lista" + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr "\texibida por `dirs', começando por zero. Por exemplo: `popd -0'" + +#~ msgid "\tremoves the last directory, `popd -1' the next to last." +#~ msgstr "\tremove o último diretório, `popd -1' o penúltimo." + +#~ msgid "" +#~ "-n\tsuppress the normal change of directory when removing directories" +#~ msgstr "-n\tsuprime a troca normal de diretório ao remover-se diretórios" + +#~ msgid "\tfrom the stack, so only the stack is manipulated." +#~ msgstr "\tda pilha, fazendo com que somente a pilha seja manipulada." + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "Exibe a lista atual de diretórios memorizados. Os diretórios são" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "introduzidos na lista através do comando `pushd'; os diretórios são" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "removidos da lista através do comando `popd'." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "A opção -l especifica que `dirs' não deve exibir a versão resumida" + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "" +#~ "dos diretórios relativos ao seu diretório `home'. Isto significa que" + +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "" +#~ "`~/bin' deve ser exibido como `/home/você/bin'. A opção -v faz com que" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "`dirs' exiba a pilha de diretórios com uma entrada por linha," + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "antecedendo o nome do diretório com a sua posição na pilha. A opção" + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "-p faz a mesma coisa, mas a posição na pilha não é exibida. A opção" + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "-c limpa a pilha de diretórios apagando todos os seus elementos." + +#~ msgid "" +#~ "+N\tdisplays the Nth entry counting from the left of the list shown by" +#~ msgstr "" +#~ "+N\texibe a n-ésima entrada contada a partir da esquerda da lista exibida" + +#~ msgid "\tdirs when invoked without options, starting with zero." +#~ msgstr "\tpor `dirs', quando este é chamado sem opções, começando por zero." + +#~ msgid "" +#~ "-N\tdisplays the Nth entry counting from the right of the list shown by" +#~ msgstr "" +#~ "-N\texibe a n-ésima entrada contada a partir da direita da lista exibida" + +#~ msgid "Toggle the values of variables controlling optional behavior." +#~ msgstr "" +#~ "Alterna os valores das variáveis controladoras de comportamentos " +#~ "opcionais." + +#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" +#~ msgstr "A opção -s ativa (set) cada NOME-OPÇÃO; a opção -u desativa cada" + +#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" +#~ msgstr "" +#~ "NOME-OPÇÃO. A opção -q suprime a saída; o status de término indica se" + +#~ msgid "status indicates whether each OPTNAME is set or unset. The -o" +#~ msgstr "cada NOME-OPÇÃO foi ativado ou desativado A opção -o restringe" + +#~ msgid "option restricts the OPTNAMEs to those defined for use with" +#~ msgstr "NOME-OPÇÃO para aqueles definidos para uso através de `set -o'." + +#~ msgid "`set -o'. With no options, or with the -p option, a list of all" +#~ msgstr "Sem nenhuma opção, ou com a opção -p, uma lista com todas as" + +#~ msgid "settable options is displayed, with an indication of whether or" +#~ msgstr "" +#~ "opções que podem ser ativadas é exibida, com indicação sobre se cada uma" + +#~ msgid "not each is set." +#~ msgstr "das opções está ativa ou não." diff --git a/bash-5.1/po/quot.sed b/bash-5.1/po/quot.sed new file mode 100644 index 0000000000000000000000000000000000000000..0122c46318dc8bc115167fa2c259f8456668f861 --- /dev/null +++ b/bash-5.1/po/quot.sed @@ -0,0 +1,6 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g diff --git a/bash-5.1/po/remove-potcdate.sin b/bash-5.1/po/remove-potcdate.sin new file mode 100644 index 0000000000000000000000000000000000000000..2436c49e786dea6c9b4a8f87803288496ed38164 --- /dev/null +++ b/bash-5.1/po/remove-potcdate.sin @@ -0,0 +1,19 @@ +# Sed script that remove the POT-Creation-Date line in the header entry +# from a POT file. +# +# The distinction between the first and the following occurrences of the +# pattern is achieved by looking at the hold space. +/^"POT-Creation-Date: .*"$/{ +x +# Test if the hold space is empty. +s/P/P/ +ta +# Yes it was empty. First occurrence. Remove the line. +g +d +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/bash-5.1/po/ro.gmo b/bash-5.1/po/ro.gmo new file mode 100644 index 0000000000000000000000000000000000000000..3a69a47a6886390bdef097f5959f6420b3e57842 Binary files /dev/null and b/bash-5.1/po/ro.gmo differ diff --git a/bash-5.1/po/ro.po b/bash-5.1/po/ro.po new file mode 100644 index 0000000000000000000000000000000000000000..13ab3543d349dd1f989d611da12d69fe16d668cf --- /dev/null +++ b/bash-5.1/po/ro.po @@ -0,0 +1,6747 @@ +# Mesajele în limba română pentru pachetul bash +# Copyright (C) 2003 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Eugen Hoanca , 2003. +# Daniel Șerbănescu , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-08-25 10:11+0200\n" +"Last-Translator: Daniel Șerbănescu \n" +"Language-Team: Romanian \n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n==0 || (n!=1 && n%100>=1 && n" +"%100<=19) ? 1 : 2);\n" +"X-Generator: Poedit 2.2.3\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "incluziune greșită în interval" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: nu se poate atribui către index ne-numeric" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: nu s-a putut crea: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: lipsește separatorul două puncte" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "%s: comandă negăsită" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s”: nume alias nevalid" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "sfârșitul de linie nu este activat" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "" + +#: builtins/bind.def:252 +#, fuzzy, c-format +msgid "%s: cannot read: %s" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, fuzzy, c-format +msgid "`%s': unknown function name" +msgstr "%s: funcție doar în citire (readonly)" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s nu este asociat niciunei taste.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s poate fi invocat prin " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, fuzzy, c-format +msgid "`%s': cannot unbind" +msgstr "%s: comandă negăsită" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "contor buclă" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "are sens numai într-o buclă „for”, „while” sau „until”" + +#: builtins/caller.def:136 +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME nu este stabilit" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "prea mulți parametri" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "director null" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD nu este stabilit" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linia %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "avertizare: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: utilizare: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: opțiunea necesită un parametru" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: argument numeric necesar" + +#: builtins/common.c:207 +#, fuzzy, c-format +msgid "%s: not found" +msgstr "%s: comandă negăsită" + +#: builtins/common.c:216 shell.c:857 +#, fuzzy, c-format +msgid "%s: invalid option" +msgstr "%c%c: opțiune invalidă" + +#: builtins/common.c:223 +#, fuzzy, c-format +msgid "%s: invalid option name" +msgstr "%c%c: opțiune invalidă" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, fuzzy, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s' nu este un identificator valid" + +#: builtins/common.c:240 +#, fuzzy +msgid "invalid octal number" +msgstr "număr de semnal invalid" + +#: builtins/common.c:242 +#, fuzzy +msgid "invalid hex number" +msgstr "număr de semnal invalid" + +#: builtins/common.c:244 expr.c:1569 +#, fuzzy +msgid "invalid number" +msgstr "număr de semnal invalid" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variabilă doar în citire" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "" + +#: builtins/common.c:274 builtins/common.c:276 +#, fuzzy +msgid "argument" +msgstr "se așteaptă parametru" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "" + +#: builtins/common.c:292 +#, fuzzy, c-format +msgid "%s: no job control" +msgstr "nici un control de job în acest shell" + +#: builtins/common.c:294 +#, fuzzy +msgid "no job control" +msgstr "nici un control de job în acest shell" + +#: builtins/common.c:304 +#, fuzzy, c-format +msgid "%s: restricted" +msgstr "%s: jobul a fost terminat" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "" + +#: builtins/common.c:323 +#, fuzzy, c-format +msgid "write error: %s" +msgstr "eroare de legătură (pipe): %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "" + +#: builtins/common.c:701 builtins/common.c:703 +#, fuzzy, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: Redirectare ambiguă" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, fuzzy, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, fuzzy, c-format +msgid "%s: cannot unset" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "" + +#: builtins/declare.def:134 +#, fuzzy +msgid "can only be used in a function" +msgstr "poate fi folosit doar într-o funcție, și face ca variabila NUME" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funcție doar în citire (readonly)" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, fuzzy, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "$%s: nu se poate asigna în acest mod" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "" + +#: builtins/enable.def:343 +#, fuzzy, c-format +msgid "cannot open shared object %s: %s" +msgstr "nu pot deschide legătura numită %s pentru %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "" + +#: builtins/enable.def:388 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "" + +#: builtins/enable.def:543 +#, fuzzy, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: este director" + +#: builtins/evalfile.c:144 +#, fuzzy, c-format +msgid "%s: not a regular file" +msgstr "%s: nu se poate executa fișierul binar" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: nu se poate executa fișierul binar" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, fuzzy, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "deautentificare\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +#, fuzzy +msgid "no command found" +msgstr "%s: comandă negăsită" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "" + +#: builtins/fc.def:444 +#, fuzzy, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opțiune ilegală -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opțiunea necesită un parametru: -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "potriviri\tcomandă\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" + +#: builtins/help.def:224 +#, fuzzy, c-format +msgid "%s: cannot open: %s" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "" + +#: builtins/history.def:451 +#, fuzzy, c-format +msgid "%s: history expansion failed" +msgstr "%s: se așteaptă expresie întreagă (integer)" + +#: builtins/inlib.def:71 +#, fuzzy, c-format +msgid "%s: inlib failed" +msgstr "%s: variabilă fără limită" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "" + +#: builtins/kill.def:274 +#, fuzzy +msgid "Unknown error" +msgstr "Eroare necunoscută %d" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "se așteaptă expresie" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "" + +#: builtins/mapfile.def:299 +#, fuzzy, c-format +msgid "%s: invalid array origin" +msgstr "%s:subscriere interval invalid" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "niciun alt director" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s necesită un parametru" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "" + +#: builtins/read.def:755 +#, fuzzy, c-format +msgid "read error: %d: %s" +msgstr "eroare de legătură (pipe): %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" + +#: builtins/set.def:869 +#, fuzzy +msgid "cannot simultaneously unset a function and a variable" +msgstr "poate fi folosit doar într-o funcție, și face ca variabila NUME" + +#: builtins/set.def:966 +#, fuzzy, c-format +msgid "%s: not an array variable" +msgstr "%s: variabilă fără limită" + +#: builtins/setattr.def:189 +#, fuzzy, c-format +msgid "%s: not a function" +msgstr "%s: funcție doar în citire (readonly)" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/shift.def:72 builtins/shift.def:79 +#, fuzzy +msgid "shift count" +msgstr "shift [n]" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "" + +#: builtins/source.def:154 +#, fuzzy, c-format +msgid "%s: file not found" +msgstr "%s: comandă negăsită" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "nu se poate suspenda un shell de autentificare" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s este o funcție\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "" + +#: builtins/ulimit.def:426 +#, fuzzy, c-format +msgid "`%c': bad command" +msgstr "%c%c: opțiune invalidă" + +#: builtins/ulimit.def:455 +#, fuzzy, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/ulimit.def:481 +#, fuzzy +msgid "limit" +msgstr "limită CPU" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, fuzzy, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins/umask.def:115 +#, fuzzy +msgid "octal number" +msgstr "număr de semnal invalid" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr "" + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "ultima comandă: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "eroare de comandă necunoscută" + +#: error.c:463 +msgid "bad command type" +msgstr "tip rău de comandă" + +#: error.c:464 +#, fuzzy +msgid "bad connector" +msgstr "conector greșit `%d'" + +#: error.c:465 +msgid "bad jump" +msgstr "salt rău" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variabilă fără limită" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aa expirat așteptând introducerea datelor: auto-logout\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +#, fuzzy +msgid "pipe error" +msgstr "eroare de legătură (pipe): %s" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: limitat: nu se poate specifica `/' în numele comenzilor" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: comandă negăsită" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5854 +#, fuzzy, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: este director" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: nu se poate executa fișierul binar" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "" + +#: execute_cmd.c:6029 +#, fuzzy, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "nu se poate duplica fd %d în fd 0: %s" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "nivel de recursivitate al expresiei depășit" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "stivă recursivă prea puțin folosită (underflow)" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "eroare de sintaxă în expresie" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "s-a încercat asignare către non-variabilă" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "eroare de sintaxă în atribuirea variabilei" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "împărțire la 0" + +#: expr.c:592 +#, fuzzy +msgid "bug: bad expassign token" +msgstr "bug: identificator(token) expassign greșit %d" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "`:' așteptat după expresie condițională" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "`)' lipsă" + +#: expr.c:1107 expr.c:1487 +#, fuzzy +msgid "syntax error: operand expected" +msgstr "eroare de sintaxă: sfârșit de fișier neașteptat" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (identificatorul erorii este „%s”)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "" + +#: expr.c:1582 +msgid "invalid integer constant" +msgstr "" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "valoare prea mare pentru bază" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: eroare în expresie\n" + +#: general.c:70 +#, fuzzy +msgid "getcwd: cannot access parent directories" +msgstr "getwd: nu s-au putut accesa directoarele părinte" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "" + +#: input.c:266 +#, fuzzy, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"nu se poate aloca descriptor de fișier nou pentru inputul bash din fd %d: %s" + +#: input.c:274 +#, fuzzy, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "check_bash_input: buffer deja existent pentru fd nou %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: nu există un asemenea pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Semnal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Finalizat" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Stopat" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Oprit(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "În rulare" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Finalizat(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Ieșire %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Stare necunoscută" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(core dumped) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid copil (de la%ld la %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, fuzzy, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "așteptați: pid-ul %d nu este rezultat(child) al acestui shell" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: nu s-a putut crea: %s" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: jobul a fost terminat" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "" + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (core dumped)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd actual: %s)\n" + +#: jobs.c:4391 +#, fuzzy +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_jobs: getpgrp eșuat: %s" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4463 +#, fuzzy +msgid "initialize_job_control: line discipline" +msgstr "initialize_jobs: disciplină linie: %s" + +#: jobs.c:4473 +#, fuzzy +msgid "initialize_job_control: setpgid" +msgstr "initialize_jobs: getpgrp eșuat: %s" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "nici un control de job în acest shell" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "necunoscut" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:1141 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "" + +#: lib/sh/netopen.c:168 +#, fuzzy, c-format +msgid "%s: host unknown" +msgstr "necunoscut" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Aveți mail în $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Aveți mail nou în $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Mailul din %s a fost citit\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "eroare de sintaxă: expresie aritmetică necesară" + +#: make_cmd.c:319 +#, fuzzy +msgid "syntax error: `;' unexpected" +msgstr "eroare de sintaxă: sfârșit de fișier neașteptat" + +#: make_cmd.c:320 +#, fuzzy, c-format +msgid "syntax error: `((%s))'" +msgstr "eroare de sintaxă" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tip de instrucțiune greșit %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF neașteptat în căutare după potrivirea „%c”" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF neașteptat în căutare după „]]”" + +#: parse.y:4701 +#, fuzzy, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "eroare de sintaxă neașteptată lângă `%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "eroare de sintaxă în expresia condițională" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "se aștepta „)”" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "" + +#: parse.y:4865 +#, fuzzy, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "%s: se așteaptă operator binar" + +#: parse.y:4869 +#, fuzzy +msgid "conditional binary operator expected" +msgstr "%s: se așteaptă operator binar" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "" + +#: parse.y:4906 +#, fuzzy, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "`:' așteptat după expresie condițională" + +#: parse.y:4909 +#, fuzzy, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "`:' așteptat după expresie condițională" + +#: parse.y:4913 +#, fuzzy, c-format +msgid "unexpected token %d in conditional command" +msgstr "`:' așteptat după expresie condițională" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "eroare de sintaxă neașteptată lângă `%s'" + +#: parse.y:6355 +#, fuzzy, c-format +msgid "syntax error near `%s'" +msgstr "eroare de sintaxă neașteptată lângă `%s'" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "eroare de sintaxă: sfârșit de fișier neașteptat" + +#: parse.y:6365 +msgid "syntax error" +msgstr "eroare de sintaxă" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Folosiți \"%s\" pentru a părăsi shellul.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF neașteptat în căutare după perechea lui „)”" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: conector greșitr `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "" + +#: redir.c:204 +#, fuzzy, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: Redirectare ambiguă" + +#: redir.c:208 +#, fuzzy, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: nu se poate accesa(clobber) fișierul existent" + +#: redir.c:213 +#, fuzzy, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: limitat: nu se poate specifica `/' în numele comenzilor" + +#: redir.c:218 +#, fuzzy, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "nu pot face legătură (pipe) pentru substituția procesului: %s" + +#: redir.c:222 +#, fuzzy, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: nu pot asigna listă membrului intervalului" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +#, fuzzy +msgid "redirection error: cannot duplicate fd" +msgstr "eroare de redirectare" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, fuzzy, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opțiune invalidă" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: este director" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Nu am nici un nume!" + +#: shell.c:2035 +#, fuzzy, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU %s, versiunea %s\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Folosire:\t%s [GNU opțiune lungă] [opțiune] ...\n" +"\t%s [GNU opțiune lungă] [opțiune] fișier script ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Opțiuni lungi GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Opțiuni ale shell-ului:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD sau -c comandă\t\t(doar invocație)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s sau -o opțiune\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Apăsați `%s -c \"set-ajutor\"' pentru mai multe informații despre opțiunile " +"shell-ului.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Apăsați `%s -c ajutor' pentru mai multe informații despre comenzile interne " +"ale shell-ului.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Semnal fals" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Deconectare" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Întrerupere" + +#: siglist.c:58 +msgid "Quit" +msgstr "Părăsire" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Instrucțiune ilegală" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Instrucțiune ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Instrucțiune EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Excepție virgulă mobilă" + +#: siglist.c:86 +msgid "Killed" +msgstr "Terminat(killed)" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Eroare de bus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Eroare de segmentare (Segmentation fault)" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Apelare sistem invalidă" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Legătură(pipe) întreruptă" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Ceas alarmă" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Terminat" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Condiție IO urgentă" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Oprit (semnal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Continuare" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Succesor mort sau oprit" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Oprit (tty input)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Oprit (tty output)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O pregătit" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Limită CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Limită fișier" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarmă (virtual)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarmă (profil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Fereastră schimbată" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Reținere (lock) înregistrare" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Semnal utilizator 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Semnal utilizator 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Date de intrare HFT în curs de rezolvare(pending)" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "probleme electrice iminente" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "crash de sistem iminent" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migrare proces spre alt CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "eroare de programare" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Mod monitor HFT acordat" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Mod monitor HFT retras" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "Secvență de sunet HFT completată" + +#: siglist.c:214 +msgid "Information request" +msgstr "" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Semnal Necunoscut #%d" + +#: subst.c:1476 subst.c:1666 +#, fuzzy, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "substituție invalidă: nu există '%s' în %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: nu pot asigna listă membrului intervalului" + +#: subst.c:5910 subst.c:5926 +#, fuzzy +msgid "cannot make pipe for process substitution" +msgstr "nu pot face legătură (pipe) pentru substituția procesului: %s" + +#: subst.c:5985 +#, fuzzy +msgid "cannot make child for process substitution" +msgstr "nu pot crea un proces copil pentru substituirea procesului: %s" + +#: subst.c:6059 +#, fuzzy, c-format +msgid "cannot open named pipe %s for reading" +msgstr "nu pot deschide legătura numită %s pentru %s: %s" + +#: subst.c:6061 +#, fuzzy, c-format +msgid "cannot open named pipe %s for writing" +msgstr "nu pot deschide legătura numită %s pentru %s: %s" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "nu se poate duplica țeava numită %s ca fd %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "substituție invalidă: nu există ')' de final în %s" + +#: subst.c:6353 +#, fuzzy +msgid "cannot make pipe for command substitution" +msgstr "nu pot face legături(pipes) pentru substituția de comenzi: %s" + +#: subst.c:6397 +#, fuzzy +msgid "cannot make child for command substitution" +msgstr "nu pot crea un copil pentru substituția de comenzi: %s" + +#: subst.c:6423 +#, fuzzy +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: nu se poate duplica legătura (pipe) ca fd 1: %s" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "%s: variabilă fără limită" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parametru null sau nesetat" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametru null sau nesetat" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expresie subșir < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: substituție invalidă" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: nu se poate asigna în acest mod" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" + +#: subst.c:10367 +#, fuzzy, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "substituție invalidă: nu există ')' de final în %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "" + +#: test.c:147 +msgid "argument expected" +msgstr "se așteaptă parametru" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: se așteaptă expresie întreagă (integer)" + +#: test.c:265 +msgid "`)' expected" +msgstr "se așteaptă `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "se așteaptă `)', s-a primit %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: se așteaptă operator binar" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: se așteaptă operator unar" + +#: test.c:881 +msgid "missing `]'" +msgstr "lipsește ']'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "eroare de sintaxă: sfârșit de fișier neașteptat" + +#: trap.c:220 +#, fuzzy +msgid "invalid signal number" +msgstr "număr de semnal invalid" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" + +#: trap.c:487 +#, fuzzy, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: Semnal invalid %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "eroare în importarea definiției funcției pentru '%s'" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "" + +#: variables.c:4771 +#, fuzzy, c-format +msgid "%s has null exportstr" +msgstr "%s: parametru null sau nesetat" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" + +#: version.c:86 version2.c:86 +#, fuzzy, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU %s, versiunea %s\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "" + +#: xmalloc.c:93 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: nu pot aloca %lu octeți (%lu octeți alocați)" + +#: xmalloc.c:95 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: nu s-a putut crea: %s" + +#: xmalloc.c:165 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: nu pot aloca %lu octeți (%lu octeți alocați)" + +#: xmalloc.c:167 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: nu s-a putut crea: %s" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nume[=valoare] ... ]" + +#: builtins.c:49 +#, fuzzy +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] [nume ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m keymap] [-f nume_fișier] [-q nume] [-r keyseq] [keyseq:" +"funcție readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +#, fuzzy +msgid "caller [expr]" +msgstr "test [expr]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-PL] [dir]" + +#: builtins.c:68 +#, fuzzy +msgid "pwd [-LP]" +msgstr "pwd [-PL]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] comandă [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-afFrxi] [-p] nume[=valoare] ..." + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-afFrxi] [-p] nume[=valoare] ..." + +#: builtins.c:82 +#, fuzzy +msgid "local [option] name[=value] ..." +msgstr "local nume[=valoare] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +#, fuzzy +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-pnds] [-a] [-f nume_fișier] [nume ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring nume [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nume] fișier [redirectare ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +#, fuzzy +msgid "logout [n]" +msgstr "logout" + +#: builtins.c:105 +#, fuzzy +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e enume] [-nlr] [prim] [u8ltim] sau fc -s [pat=rep] [cmd]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +#, fuzzy +msgid "bg [job_spec ...]" +msgstr "bg [job_spec]" + +#: builtins.c:116 +#, fuzzy +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-r] [-p nume_cale] [nume ...]" + +#: builtins.c:119 +#, fuzzy +msgid "help [-dms] [pattern ...]" +msgstr "help [tipar ...]" + +#: builtins.c:123 +#, fuzzy +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [n] sau history -awrn [nume_fișier] sau history -ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] sau jobs -x comandă [args]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [jobspec ...]" + +#: builtins.c:134 +#, fuzzy +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] [pid | job]... sau kill -l [sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o opțiune] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [nume ...]" + +#: builtins.c:146 +#, fuzzy +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-nf] [nume ...] sau export -p" + +#: builtins.c:148 +#, fuzzy +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-anf] [nume ...] sau readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +#, fuzzy +msgid "source filename [arguments]" +msgstr "nume fișier sursă" + +#: builtins.c:154 +#, fuzzy +msgid ". filename [arguments]" +msgstr ". nume fișier" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +#, fuzzy +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [arg] [signal_spec] sau trap -l" + +#: builtins.c:168 +#, fuzzy +msgid "type [-afptP] name [name ...]" +msgstr "type [-apt] nume [nume ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHacdfmstpnuv] [limită]" + +#: builtins.c:174 +#, fuzzy +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-S] [mod]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [n]" + +#: builtins.c:184 +#, fuzzy +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NUME [în EXPRESIE ... ;] execută COMENZI; done" + +#: builtins.c:186 +#, fuzzy +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for NUME [în EXPRESIE ... ;] execută COMENZI; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NUME [în EXPRESIE ... ;] execută COMENZI; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case EXPRESIE în [TIPAR[[TIPAR]..) COMENZI ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMENZI; then COMENZI; [elif COMENZI; then COMENZI; ]... [ else " +"COMENZI; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while COMENZI; do COMENZI; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until COMENZI; do COMENZI; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "" + +#: builtins.c:202 +#, fuzzy +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function NUME { COMENZI ; } sau NUME () { COMENZI ; }" + +#: builtins.c:204 +#, fuzzy +msgid "{ COMMANDS ; }" +msgstr "{ COMENZI }" + +#: builtins.c:206 +#, fuzzy +msgid "job_spec [&]" +msgstr "fg [job_spec]" + +#: builtins.c:208 +#, fuzzy +msgid "(( expression ))" +msgstr "se așteaptă expresie" + +#: builtins.c:210 +#, fuzzy +msgid "[[ expression ]]" +msgstr "se așteaptă expresie" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variabile - Numele și înțelesurile unor variabile din shell" + +#: builtins.c:215 +#, fuzzy +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [dir | +N | -N] [-n]" + +#: builtins.c:219 +#, fuzzy +msgid "popd [-n] [+N | -N]" +msgstr "popd [+N | -N] [-n]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +#, fuzzy +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o opțiune lungă] nume_opt [nume_opt...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" + +#: builtins.c:235 +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "unset [-f] [-v] [nume ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" + +#: builtins.c:442 +#, fuzzy +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Nici un efect, comanda nu face nimic. Un cod de ieșire zero este returnat." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" + +#: builtins.c:490 +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" + +#: builtins.c:652 +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Ieste din shell.\n" +" \n" +" Iese din shell cu starea lui N. Dacă N este omis, starea de ieșire\n" +" este starea ultimei comenzi executate." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" + +#: builtins.c:1726 +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Returnează contextul apelului subrutină curent.\n" +#~ " \n" +#~ " Fără EXPR, returnează " + +#~ msgid "Unknown Signal #" +#~ msgstr "Semnal Necunoscut #" + +#~ msgid "Missing `}'" +#~ msgstr "`}' lipsă" + +#~ msgid "brace_expand> " +#~ msgstr "brace_expand> " + +#~ msgid "Attempt to free unknown command type `%d'.\n" +#~ msgstr "Încercare de eliberare(free) tip comandă necunoscută `%d'.\n" + +#~ msgid "Report this to %s\n" +#~ msgstr "Raportaţi asta la %s\n" + +#~ msgid "Stopping myself..." +#~ msgstr "Mă opresc..." + +#~ msgid "Tell %s to fix this someday.\n" +#~ msgstr "Spuneţi lui %s să repare asta într-o bun zi.\n" + +#~ msgid "execute_command: bad command type `%d'" +#~ msgstr "execute_command: tip de comandă greşită `%d'" + +#~ msgid "real\t" +#~ msgstr "real\t" + +#~ msgid "user\t" +#~ msgstr "user\t" + +#~ msgid "sys\t" +#~ msgstr "sis\t" + +#~ msgid "" +#~ "real\t0m0.00s\n" +#~ "user\t0m0.00s\n" +#~ "sys\t0m0.00s\n" +#~ msgstr "" +#~ "real\t0m0.00s\n" +#~ "user\t0m0.00s\n" +#~ "sis\t0m0.00s\n" + +#~ msgid "cannot duplicate fd %d to fd 1: %s" +#~ msgstr "nu se poate duplica fd %d în fd 1: %s" + +#~ msgid "%s: output redirection restricted" +#~ msgstr "%s redirectare spre output limitată" + +#~ msgid "Out of memory!" +#~ msgstr "Memorie plină!" + +#~ msgid "You have already added item `%s'\n" +#~ msgstr "Aţi adăugat deja elementul `%s'\n" + +#~ msgid "You have entered %d (%d) items. The distribution is:\n" +#~ msgstr "Aţi introdus %d (%d) elemente. Distribuţia este:\n" + +#~ msgid "slot %3d: " +#~ msgstr "slot %3d: " + +#~ msgid "" +#~ msgstr "" + +#~ msgid "%s: bg background job?" +#~ msgstr "%s: bg job din fundal?" + +#~ msgid "" +#~ "Redirection instruction from yyparse () '%d' is\n" +#~ "out of range in make_redirection ()." +#~ msgstr "" +#~ "Redirectare instrucţiune din yyparse () '%d' is\n" +#~ "în afara intervalului în make_redirection ()." + +#~ msgid "clean_simple_command () got a command with type %d." +#~ msgstr "clean_simple_command () a primit o comandă de tipul %d." + +#~ msgid "got errno %d while waiting for %d" +#~ msgstr "s-a primit errno %d în aşteptarea lui %d" + +#~ msgid "syntax error near unexpected token `%c'" +#~ msgstr "eroare de sintaxă neaşteptată lângă `%c'" + +#~ msgid "print_command: bad command type `%d'" +#~ msgstr "print_command: tip comandă greşit `%d'" + +#~ msgid "cprintf: bad `%%' argument (%c)" +#~ msgstr "cprintf: parametru `%%' invalid (%c)" + +#~ msgid "option `%s' requires an argument" +#~ msgstr "opţiunea `%s' necesită un parametru" + +#~ msgid "%s: unrecognized option" +#~ msgstr "%s: opţiune necunoscută" + +#~ msgid "`-c' requires an argument" +#~ msgstr "`-c' necesită un parametru" + +#~ msgid "%s: cannot execute directories" +#~ msgstr "%s: directoarele nu se pot executa" + +#~ msgid "Bad code in sig.c: sigprocmask" +#~ msgstr "Cod invalid în sig.c: sigprocmask" + +#~ msgid "can't make pipes for process substitution: %s" +#~ msgstr "nu pot face legături (pipes) pentru substituţia procesului: %s" + +#~ msgid "reading" +#~ msgstr "în citire" + +#~ msgid "writing" +#~ msgstr "în scriere" + +#~ msgid "process substitution" +#~ msgstr "substituire de proces" + +#~ msgid "command substitution" +#~ msgstr "substituire de comenzi" + +#~ msgid "Can't reopen pipe to command substitution (fd %d): %s" +#~ msgstr "" +#~ "Nu se poate redeschide legătura (pipe) către substituţia de comenzi (fd " +#~ "%d): %s" + +#~ msgid "$%c: unbound variable" +#~ msgstr "$%c: variabilă fără limită" + +#~ msgid "%s: bad arithmetic substitution" +#~ msgstr "%s: substituţie aritmetică greşită" + +#~ msgid "-%s: binary operator expected" +#~ msgstr "-%s: se aşteaptă operator binar" + +#~ msgid "%s[%s: bad subscript" +#~ msgstr "%s[%s: subsctipţie invalidă" + +#~ msgid "[%s: bad subscript" +#~ msgstr "[%s: subscripţie invalidă" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: nu pot realoca %lu octeţi (%lu octeţi alocaţi)" + +#~ msgid "digits occur in two different argv-elements.\n" +#~ msgstr "se regăsesc digiţi în două elemente argv diferite.\n" + +#~ msgid "option %c\n" +#~ msgstr "opţiunea %c\n" + +#~ msgid "option a\n" +#~ msgstr "opţiunea a\n" + +#~ msgid "option b\n" +#~ msgstr "opţiunea b\n" + +#~ msgid "option c with value `%s'\n" +#~ msgstr "opţiunea c cu valoarea '%s'\n" + +#~ msgid "?? sh_getopt returned character code 0%o ??\n" +#~ msgstr "?? sh_getopt a returnat codul de caracter 0%o ??\n" + +#~ msgid "non-option ARGV-elements: " +#~ msgstr "elemente ARGV fără opţiuni: " + +#~ msgid "%s: Unknown flag %s.\n" +#~ msgstr "%s: Marcaj (flag) necunoscut %s.\n" + +#~ msgid "Unknown directive `%s'" +#~ msgstr "Directivă necunoscută '%s'" + +#~ msgid "%s must be inside of a $BUILTIN block" +#~ msgstr "%s trebuie sa fie înăuntrul unui bloc $BUILTIN" + +#~ msgid "%s found before $END" +#~ msgstr "s-a găsit %s înainte de $END" + +#~ msgid "%s already has a function (%s)" +#~ msgstr "%s avea deja o funcţie (%s)" + +#~ msgid "%s already had a docname (%s)" +#~ msgstr "%s avea deja un docname (%s)" + +#~ msgid "%s already has short documentation (%s)" +#~ msgstr "%s are deja documentaţie scurtă (%s)" + +#~ msgid "%s already has a %s definition" +#~ msgstr "%s are deja o definiţie %s" + +#~ msgid "mkbuiltins: Out of virtual memory!\n" +#~ msgstr "mkbuiltins: Memorie virtuală plină!\n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]" +#~ msgstr "read [-r] [-p prompt] [-a interval] [-e] [nume ...]" + +#~ msgid "times" +#~ msgstr "ori" + +#~ msgid "%[DIGITS | WORD] [&]" +#~ msgstr "%[DIGIŢI | CUVÂNT] [&]" + +#~ msgid "variables - Some variable names and meanings" +#~ msgstr "variabile - Câteva nume de variabile şi ce înseamnă" + +#~ msgid "`alias' with no arguments or with the -p option prints the list" +#~ msgstr "`alias' fără parametri sau cu opţiunea -p printează lista" + +#~ msgid "of aliases in the form alias NAME=VALUE on standard output." +#~ msgstr "aliasurilor în forma alias NUME=VALOARE la ieşirea standard" + +#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given." +#~ msgstr "" +#~ "În caz contrar, aliasul este definit pentru fiecare NUME a cărui VALOARE " +#~ "este dată." + +#~ msgid "A trailing space in VALUE causes the next word to be checked for" +#~ msgstr "" +#~ "Un spaţiu la sfârşit în VALOARE va face ca următorul cuvânt sa fie " +#~ "interogat de" + +#~ msgid "alias substitution when the alias is expanded. Alias returns" +#~ msgstr "substituţii de alias când aliasul este extins. Aliasul returnează" + +#~ msgid "true unless a NAME is given for which no alias has been defined." +#~ msgstr "" +#~ "adevărat în afară de cazul în care NUME nu este dat şi pentru care nu a " +#~ "fost definit nici un alias." + +#~ msgid "" +#~ "Remove NAMEs from the list of defined aliases. If the -a option is given," +#~ msgstr "" +#~ "Elimină NUME din lista de aliasuri definite. Dacă este dată opţiunea -a," + +#~ msgid "then remove all alias definitions." +#~ msgstr "atunci şterge toate definiţiile aliasurilor." + +#~ msgid "Bind a key sequence to a Readline function, or to a macro. The" +#~ msgstr "" +#~ "Leagă (bind) o secvenţă de taste de o funcţie Readline, sau de un macro. " + +#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be" +#~ msgstr "" +#~ "Sintaxa este echivalentă cu cea întâlnită în ~/.inputrc, dar trebuie" + +#~ msgid "" +#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'." +#~ msgstr "" +#~ "trimisă parametru singular: bind '\"\\C-x\\C-r\": re-read-init-file'." + +#~ msgid "Arguments we accept:" +#~ msgstr "Parametri acceptaţi:" + +#~ msgid "" +#~ " -m keymap Use `keymap' as the keymap for the duration of this" +#~ msgstr "" +#~ " -m keymap Foloseşte `keymap' ca şi mapare de taste pentru " +#~ "durata" + +#~ msgid " command. Acceptable keymap names are emacs," +#~ msgstr "" +#~ " acestei comenzi. Nume acceptate de keymaps sunt " +#~ "emacs," + +#~ msgid "" +#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," +#~ msgstr "" +#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + +#~ msgid " vi-command, and vi-insert." +#~ msgstr " vi-command, şi vi-insert." + +#~ msgid " -l List names of functions." +#~ msgstr " -l Listează numele funcţiilor." + +#~ msgid " -P List function names and bindings." +#~ msgstr "" +#~ " -P Listează numele funcţiilor şi legăturile (bindings)." + +#~ msgid "" +#~ " -p List functions and bindings in a form that can be" +#~ msgstr "" +#~ " -p Listează funcţiile şi legăturile (bindings) într-o " +#~ "formă care" + +#~ msgid " reused as input." +#~ msgstr " poate fi refolosită ca intrare(input)." + +#~ msgid " -r keyseq Remove the binding for KEYSEQ." +#~ msgstr " -r keyseq Elimină legăturile(bindings) pentru KEYSEQ." + +#~ msgid " -f filename Read key bindings from FILENAME." +#~ msgstr "" +#~ " -f nume_fişier Citeşte legăturile (bindings) din NUME_FIŞIER" + +#~ msgid "" +#~ " -q function-name Query about which keys invoke the named function." +#~ msgstr " -q nume_funcţie Verifică tastele care invocă funcţia numită." + +#~ msgid " -V List variable names and values" +#~ msgstr " -V Listează numele variabilelor şi valorile" + +#~ msgid "" +#~ " -v List variable names and values in a form that can" +#~ msgstr "" +#~ " -v Listează numele variabilelor şi valorile într-o " +#~ "formă care poate" + +#~ msgid " be reused as input." +#~ msgstr " fi reutilizată ca date de intrare." + +#~ msgid "" +#~ " -S List key sequences that invoke macros and their " +#~ "values" +#~ msgstr "" +#~ " -S Listează secvenţele de taste care invocă macrourile " +#~ "şi valorile lor" + +#~ msgid "" +#~ " -s List key sequences that invoke macros and their " +#~ "values in" +#~ msgstr "" +#~ " -s Listează secvenţele de taste care invocă macrourile " +#~ "şi valorile lorîntr-o" + +#~ msgid " a form that can be reused as input." +#~ msgstr "" +#~ " formă care poate fi reutilizată ca date de intrare." + +#~ msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," +#~ msgstr "" +#~ "Ieşire dintr-un ciclu FOR, WHILE sau UNTIL. Daca N este specificat," + +#~ msgid "break N levels." +#~ msgstr "întrerupe N nivele" + +#~ msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." +#~ msgstr "" +#~ "Continuă urmatoarea iteraţie din ciclul închis FOR, WHILE sau UNTIL." + +#~ msgid "If N is specified, resume at the N-th enclosing loop." +#~ msgstr "Dacă N este specificat, continuă al N-ulea ciclu închis." + +#~ msgid "Run a shell builtin. This is useful when you wish to rename a" +#~ msgstr "" +#~ "Rulează un shell intern. Aceasta este folositoare când doriţi sa " +#~ "redenumiţi " + +#~ msgid "shell builtin to be a function, but need the functionality of the" +#~ msgstr "un shell intern drept funcţie, dar aveţi nevoie de funcţionalitatea" + +#~ msgid "builtin within the function itself." +#~ msgstr "funcţiei interne de asemenea." + +#~ msgid "Change the current directory to DIR. The variable $HOME is the" +#~ msgstr "Schimbă directorul curent cu DIR. Variabila $HOME este" + +#~ msgid "default DIR. The variable $CDPATH defines the search path for" +#~ msgstr "DIR implicit. Variabila $CDPATH defineşte calea de căutare pentru" + +#~ msgid "the directory containing DIR. Alternative directory names in CDPATH" +#~ msgstr "" +#~ "directorul care conţine DIR. Numele de directoare alternative în CDPATH" + +#~ msgid "are separated by a colon (:). A null directory name is the same as" +#~ msgstr "" +#~ "sunt separate de două puncte (:). Un nume de director nul reprezintă " +#~ "referire la" + +#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," +#~ msgstr "directorul curent, i.e. `.'. Dacă DIR începe cu un slash (/)," + +#~ msgid "then $CDPATH is not used. If the directory is not found, and the" +#~ msgstr "atunci $CDPATH nu este folosită. Dacă directorul nu este găsit, şi" + +#~ msgid "shell option `cdable_vars' is set, then try the word as a variable" +#~ msgstr "" +#~ "opţiunea de shell `cdable_vars' este setată, atunci cuvântul este un nume" + +#~ msgid "name. If that variable has a value, then cd to the value of that" +#~ msgstr "" +#~ "de variabilă. Dacă variabila are o valoare, se va face cd pe valoarea " +#~ "acelei" + +#~ msgid "" +#~ "variable. The -P option says to use the physical directory structure" +#~ msgstr "" +#~ "variabile. Opţiunea -P trimite la folosirea structurii fizice de " +#~ "directoare" + +#~ msgid "" +#~ "instead of following symbolic links; the -L option forces symbolic links" +#~ msgstr "" +#~ "în loc de urmarea legăturilor simbolice; opţiunea -L forţează urmarea" + +#~ msgid "to be followed." +#~ msgstr "legăturilor simbolice." + +#~ msgid "Print the current working directory. With the -P option, pwd prints" +#~ msgstr "Afişează directorul de lucru curent. Cu opţiunea -P, pwd afişează" + +#~ msgid "the physical directory, without any symbolic links; the -L option" +#~ msgstr "directoarele simbolice, fără nici o legătură simbolică; opţiunea -L" + +#~ msgid "makes pwd follow symbolic links." +#~ msgstr "face ca pwd să urmeze legăturile simbolice." + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" +#~ msgstr "" +#~ "Rulează COMANDA cu PARAMETRI ignorând funcţiile shellului. Dacă aveţi" + +#~ msgid "function called `ls', and you wish to call the command `ls', you can" +#~ msgstr "" +#~ "o funcţie a shellului care se cheamă `ls', şi doriţi sa numiţi comanda " +#~ "`ls', puteţi" + +#~ msgid "" +#~ "say \"command ls\". If the -p option is given, a default value is used" +#~ msgstr "" +#~ "spune \"command ls\". Daca este dată opţiunea -p este folosită o valoare " +#~ "implicită" + +#~ msgid "" +#~ "for PATH that is guaranteed to find all of the standard utilities. If" +#~ msgstr "" +#~ "pentru CALE care e garantată să găsească toate utilitarele standard. Dacă" + +#~ msgid "" +#~ "the -V or -v option is given, a string is printed describing COMMAND." +#~ msgstr "" +#~ "sunt date opţiunile -V sau -v, este tipărit un şir care descrie COMANDA." + +#~ msgid "The -V option produces a more verbose description." +#~ msgstr "Opţiunea -V produce o descriere mult mai detaliată." + +#~ msgid "Declare variables and/or give them attributes. If no NAMEs are" +#~ msgstr "" +#~ "Declară variabile şi/sau le dă atribute. Dacă nu e dat nici un NUME," + +#~ msgid "given, then display the values of variables instead. The -p option" +#~ msgstr "va afişa în loc valorile variabilelor. Opţiunea -p" + +#~ msgid "will display the attributes and values of each NAME." +#~ msgstr "va afişa atributele şi valorile fiecărui NUME." + +#~ msgid "The flags are:" +#~ msgstr "Marcajele(flags) sunt:" + +#~ msgid " -a\tto make NAMEs arrays (if supported)" +#~ msgstr " -a\tpentru a crea intervale de NUME (dacă este suportat)" + +#~ msgid " -f\tto select from among function names only" +#~ msgstr " -f\tpentru a selecta doar prin numele funcţiilor" + +#~ msgid " -F\tto display function names without definitions" +#~ msgstr " -F\tpentru a afişa numele funcţiilor fără definiţii" + +#~ msgid " -r\tto make NAMEs readonly" +#~ msgstr " -r\tpentru a face NUME doar în citire (readonly)" + +#~ msgid " -x\tto make NAMEs export" +#~ msgstr " -x\tpentru a exporta NUME" + +#~ msgid " -i\tto make NAMEs have the `integer' attribute set" +#~ msgstr " -i\tpentru ca NUME să aibe setat atributul de `integer'" + +#~ msgid "Variables with the integer attribute have arithmetic evaluation (see" +#~ msgstr "Variabilele cu atributul integer au evaluarea aritmetică (vezi" + +#~ msgid "`let') done when the variable is assigned to." +#~ msgstr "`let') efectuată când îi este atribuită variabila." + +#~ msgid "When displaying values of variables, -f displays a function's name" +#~ msgstr "La afişarea valorilor variabilelor, -f afişează numele funcţiei" + +#~ msgid "and definition. The -F option restricts the display to function" +#~ msgstr "şi definiţia. Opţiunea -F restrânge afişarea doar la" + +#~ msgid "name only." +#~ msgstr "numele funcţiei." + +#~ msgid "" +#~ "Using `+' instead of `-' turns off the given attribute instead. When" +#~ msgstr "Folosirea `+' în locul `-' dezactivează atributul dat. Când" + +#~ msgid "used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "" +#~ "este folosit într-o funcţie, se consideră NUME locale, ca şi în comanda " +#~ "`local'." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Învechit. Vezi `declare'." + +#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL" +#~ msgstr "" +#~ "Creează o variabilă locală denumită NUME, şi îi atribuie VALOARE. LOCAL" + +#~ msgid "have a visible scope restricted to that function and its children." +#~ msgstr "" +#~ "să aibă un domeniu vizibil restrâns la acea funcţie şi copilul (children) " +#~ "ei." + +#~ msgid "Output the ARGs. If -n is specified, the trailing newline is" +#~ msgstr "" +#~ "Afişează (output) ARGumenetele. Dacă -n este specificat,sfârşitul de " +#~ "linie este" + +#~ msgid "suppressed. If the -e option is given, interpretation of the" +#~ msgstr "suprimat. Dacă este dată opţiunea -e, interpretarea" + +#~ msgid "following backslash-escaped characters is turned on:" +#~ msgstr "" +#~ "următorului caracterelor speciale (backslash-escaped) este activată:" + +#~ msgid "\t\\a\talert (bell)" +#~ msgstr "\t\\a\talertă (clopoţel (bell))" + +#~ msgid "\t\\b\tbackspace" +#~ msgstr "\t\\b\tbackspace" + +#~ msgid "\t\\c\tsuppress trailing newline" +#~ msgstr "\t\\c\tsuprimă sfârşitul de linie" + +#~ msgid "\t\\E\tescape character" +#~ msgstr "\t\\E\tcaracterul escape" + +#~ msgid "\t\\f\tform feed" +#~ msgstr "\t\\f\ttrecere la început de linie (form feed)" + +#~ msgid "\t\\n\tnew line" +#~ msgstr "\t\\n\tlinie nouă" + +#~ msgid "\t\\r\tcarriage return" +#~ msgstr "\t\\r\tretur de car (carriage return)" + +#~ msgid "\t\\t\thorizontal tab" +#~ msgstr "\t\\t\ttab orizontal" + +#~ msgid "\t\\v\tvertical tab" +#~ msgstr "\t\\v\ttab vertical" + +#~ msgid "\t\\\\\tbackslash" +#~ msgstr "\t\\\\\tbackslash" + +#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)." +#~ msgstr "\t\\num\tcaracterul al cărui cod ASCII este NUM (octal)." + +#~ msgid "" +#~ "You can explicitly turn off the interpretation of the above characters" +#~ msgstr "Puteţi dezactiva explicit interpretarea caracterelor de mai sus" + +#~ msgid "with the -E option." +#~ msgstr "cu ajutorul opţiunii -E." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "Afişează (output) ARGumentele. Dacă este specificat -n, sfârşitul de " +#~ "linie este suprimat." + +#~ msgid "Enable and disable builtin shell commands. This allows" +#~ msgstr "" +#~ "Activează şi dezactivează comenzile interne ale shell-ului. Aceasta vă" + +#~ msgid "you to use a disk command which has the same name as a shell" +#~ msgstr "" +#~ "permite utilizarea unei comenzi disk care să aibă acelaşi nume ca şi cea " + +#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise" +#~ msgstr "" +#~ "internă a shell-ului. Dacă este folosit -n, NUME devine dezactivat; în " +#~ "caz contrar" + +#~ msgid "NAMEs are enabled. For example, to use the `test' found on your" +#~ msgstr "" +#~ "NUME este activat. De exemplu, pentru a folosi funcţia `test; aflată în" + +#~ msgid "path instead of the shell builtin version, type `enable -n test'." +#~ msgstr "" +#~ "calea(path) dumneavoastră în loc de versiunea internă, tastaţi `enable -n " +#~ "test'." + +#~ msgid "On systems supporting dynamic loading, the -f option may be used" +#~ msgstr "" +#~ "Pe sistemele care suportă încărcarea dinamică, opţiunea -f poate fi " +#~ "folosită" + +#~ msgid "to load new builtins from the shared object FILENAME. The -d" +#~ msgstr "" +#~ "pentru a încărca noile elemente (builtins) din obiectul distribuit " +#~ "(shared object) NUME_FIŞIER. Opţiunea -d" + +#~ msgid "option will delete a builtin previously loaded with -f. If no" +#~ msgstr "va şterge un element (builtin) deja încărcat cu -f. Dacă nu" + +#~ msgid "non-option names are given, or the -p option is supplied, a list" +#~ msgstr "" +#~ "este dat nici un nume non-opţiune, sau este prezentă opţiunea -p, o listă" + +#~ msgid "of builtins is printed. The -a option means to print every builtin" +#~ msgstr "" +#~ "de elemente(builtins) este tipărită. Opţiunea -a înseamnă tipărirea " +#~ "fiecărui " + +#~ msgid "with an indication of whether or not it is enabled. The -s option" +#~ msgstr "" +#~ "element(builtin) cu o indicaţie dacă este sau nu activ. Opţiunea -s" + +#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n" +#~ msgstr "" +#~ "restricţionează output-ul la elementele(builtins) `speciale' Posix 2. " +#~ "Opţiunea" + +#~ msgid "option displays a list of all disabled builtins." +#~ msgstr "-n afişează o listă a tuturor elementelor(builtins) inactive." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "" +#~ "Citeşte ARGumente ca input al shell-ului şi execută comanda(comenzile) " +#~ "rezultată(e)." + +#~ msgid "Getopts is used by shell procedures to parse positional parameters." +#~ msgstr "" +#~ "Getopts este folosit de procedurile de shell pentru a analiza(parse) " +#~ "parametrii poziţionali." + +#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter" +#~ msgstr "" +#~ "OPTSTRING conţine literele optiunilor care vor fi recunoscute; dacă o " +#~ "literă" + +#~ msgid "is followed by a colon, the option is expected to have an argument," +#~ msgstr "e urmată de două puncte, opţiunea va trebui să aibă un parametru," + +#~ msgid "which should be separated from it by white space." +#~ msgstr "care va fi separat de aceasta printr-un spaţiu." + +#~ msgid "Each time it is invoked, getopts will place the next option in the" +#~ msgstr "" +#~ "De fiecare dată când este invocat, getopts va pune următoarea opţiune în" + +#~ msgid "shell variable $name, initializing name if it does not exist, and" +#~ msgstr "variabile de shell $name, iniţializând name dacă nu există, şi" + +#~ msgid "the index of the next argument to be processed into the shell" +#~ msgstr "indexul următorilor parametri care vor fi procesaţi în variabila" + +#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" +#~ msgstr "" +#~ "de shell OPTIND. OPTIND este iniţializată cu 1 de fiecare dată când " +#~ "shellul sau" + +#~ msgid "a shell script is invoked. When an option requires an argument," +#~ msgstr "" +#~ "un script al shellului este invocat. Când opţiunea necesită un parametru," + +#~ msgid "getopts places that argument into the shell variable OPTARG." +#~ msgstr "getopts plasează acest parametru în variabila de shell OPTARG." + +#~ msgid "getopts reports errors in one of two ways. If the first character" +#~ msgstr "getopts raportează erori în două feluri. Dacă primul caracter" + +#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" +#~ msgstr "" +#~ "al OPTSTRING este 'două puncte', getopts va folosi raportarea " +#~ "silenţioasă. În" + +#~ msgid "this mode, no error messages are printed. If an illegal option is" +#~ msgstr "" +#~ "acest mod, nici un mesaj de eroare nu este tipărit. Dacă o opţiune " +#~ "ilegală este" + +#~ msgid "seen, getopts places the option character found into OPTARG. If a" +#~ msgstr "întâlnită, getopts plasează caracterul opţiunii în OPTARG. Dacă un" + +#~ msgid "required argument is not found, getopts places a ':' into NAME and" +#~ msgstr "parametru necesar nu este întâlnit, getopts pune ':' la NUME şi" + +#~ msgid "sets OPTARG to the option character found. If getopts is not in" +#~ msgstr "" +#~ "setează OPTARG la caracterul întâlnit al opţiunii. Dacă getopts nu este " +#~ "în" + +#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into" +#~ msgstr "" +#~ "modul silenţios, şi se întâlneşte o opţiune ilegală, getopts pune '?' în" + +#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'" +#~ msgstr "" +#~ "NUME şi desetează OPTARG. Dacă o opţiune necesară nu este întâlnită, un " +#~ "'?'" + +#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" +#~ msgstr "" +#~ "va fi pus în NUME, OPTARG va fi desetat, şi un mesaj de diagnosticare va " +#~ "fi" + +#~ msgid "printed." +#~ msgstr "afişat." + +#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the" +#~ msgstr "Dacă variabila de shell OPTERR are valoarea 0, getopts dezactivează" + +#~ msgid "printing of error messages, even if the first character of" +#~ msgstr "afişarea mesajelor de eroare, chiar daca primul caracter al" + +#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." +#~ msgstr "OPTSTRING nu este 'două puncte'. OPTERR are implicit valoarea 1." + +#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if" +#~ msgstr "" +#~ "Getopts analizează(parses) normal parametrii poziţionali ($0 - $9), dar " +#~ "dacă" + +#~ msgid "more arguments are given, they are parsed instead." +#~ msgstr "sunt daţi mai mulţi parametri, aceştia sunt analizaţi în loc." + +#~ msgid "Exec FILE, replacing this shell with the specified program." +#~ msgstr "Exec FIŞIER, înlocuind acest shell cu un program specificat." + +#~ msgid "If FILE is not specified, the redirections take effect in this" +#~ msgstr "Dacă FIŞIER nu este specificat, redirectările au efect în acest" + +#~ msgid "shell. If the first argument is `-l', then place a dash in the" +#~ msgstr "" +#~ "shell. Dacă primul parametru este `-l', atunci se va plasa o liniuţă în" + +#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option" +#~ msgstr "" +#~ "al zero-ulea arg pasat FIŞIERului, cum face login-ul. Dacă opţiunea `-c'" + +#~ msgid "is supplied, FILE is executed with a null environment. The `-a'" +#~ msgstr "este furnizată, FIŞIER este executat cu un mediu null. Opţiunea" + +#~ msgid "option means to make set argv[0] of the executed process to NAME." +#~ msgstr "'-a' înseamnă setarea argv[0] a procesului executat la NUME." + +#~ msgid "If the file cannot be executed and the shell is not interactive," +#~ msgstr "Dacă fişierul nu poate fi executat şi shell-ul nu este interactiv," + +#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\"" +#~ msgstr "atunci shell-ul iese, dacă variabila \"no_exit_on_failed_exec\"" + +#~ msgid "is set." +#~ msgstr "nu este setată." + +#~ msgid "is that of the last command executed." +#~ msgstr "este aceea a ultimei comenzi executate." + +#~ msgid "" +#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a" +#~ msgstr "" +#~ "PRIMUL şi ULTIMUL pot fi numere care specifică intervalul, sau PRIMUL " +#~ "poate fi" + +#~ msgid "string, which means the most recent command beginning with that" +#~ msgstr "" +#~ "un şir care reprezintă cea mai recentă comandă care începea cu acest" + +#~ msgid "string." +#~ msgstr "şir." + +#~ msgid "" +#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," +#~ msgstr "" +#~ " -e ENUME selectează editorul de folosit. implicit este FCEDIT, apoi " +#~ "EDITOR," + +#~ msgid "" +#~ " then the editor which corresponds to the current readline editing" +#~ msgstr "" +#~ " apoi editorul care corespunde cu modul de editare al " +#~ "liniei(readline)" + +#~ msgid " mode, then vi." +#~ msgstr " curente, şi apoi vi." + +#~ msgid " -l means list lines instead of editing." +#~ msgstr " -l reprezintă afişarea liniilor în locul editării acestora." + +#~ msgid " -n means no line numbers listed." +#~ msgstr " -n înseamnă că nu vor fi afişate numerele liniilor." + +#~ msgid "" +#~ " -r means reverse the order of the lines (making it newest listed " +#~ "first)." +#~ msgstr "" +#~ " -r reprezintă inversarea ordinii liniilor (cele mai noi fiind listate " +#~ "primele)." + +#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" +#~ msgstr "Cu `fc -s [pat=rep ...] [comandă]' format, comanda este" + +#~ msgid "re-executed after the substitution OLD=NEW is performed." +#~ msgstr "reexecutată după ce s-a produs substituţia VECHI=NOU." + +#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" +#~ msgstr "Un alias folositor este r='fc -s', aşa că tastând `r cc'" + +#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes" +#~ msgstr "" +#~ "se rulează ultima comandă care începe cu `cc' şi tastând `r' se reexecută" + +#~ msgid "Place JOB_SPEC in the foreground, and make it the current job. If" +#~ msgstr "" +#~ "Aduce JOB_SPEC în prim plan(foreground), ?şi îl face jobul curent. Dacă" + +#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is" +#~ msgstr "" +#~ "JOB_SPEC nu este prezent, este folosită noţiunea shell-ului despre jobul" + +#~ msgid "used." +#~ msgstr "curent." + +#~ msgid "Place JOB_SPEC in the background, as if it had been started with" +#~ msgstr "Pune JOB_SPEC în fundal(background), ca şi cum ar fi fost pornit cu" + +#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" +#~ msgstr "" +#~ "`&'. Dacă JOB_SPEC nu este prezent, va fi folosită noţiunea shell-ului " +#~ "despre" + +#~ msgid "job is used." +#~ msgstr "jobul curent." + +#~ msgid "For each NAME, the full pathname of the command is determined and" +#~ msgstr "Pentru fiecare NUME, calea întreagă a comenzii este determinată şi" + +#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the" +#~ msgstr "" +#~ "reţinută. Daca este furnizată şi opţiunea -p, CALE este folosită ca şi" + +#~ msgid "full pathname of NAME, and no path search is performed. The -r" +#~ msgstr "" +#~ "cale de căutare întreagă a NUMElui, şi nu se mai face căutare în calea " +#~ "curentă. " + +#~ msgid "option causes the shell to forget all remembered locations. If no" +#~ msgstr "" +#~ "Opţiunea -r face ca shell-ul să uite toate locaţiile reţinute. Dacă nu" + +#~ msgid "" +#~ "arguments are given, information about remembered commands is displayed." +#~ msgstr "" +#~ "este furnizat nici un parametru sunt afişate informaţii despre comenzile " +#~ "reţinute." + +#~ msgid "Display helpful information about builtin commands. If PATTERN is" +#~ msgstr "" +#~ "Se afişează informaţii folositoare despre comenzile interne. Dacă TIPAR " +#~ "este" + +#~ msgid "specified, gives detailed help on all commands matching PATTERN," +#~ msgstr "" +#~ "specificat, se dă ajutor detaliat pentru toate comenzile potrivite " +#~ "TIPARului," + +#~ msgid "otherwise a list of the builtins is printed." +#~ msgstr "în caz contrar se va tipări o listă a comenzilor interne." + +#~ msgid "Display the history list with line numbers. Lines listed with" +#~ msgstr "Afişează istoricul cu numerele liniilor. Liniile listate cu" + +#~ msgid "with a `*' have been modified. Argument of N says to list only" +#~ msgstr "un `*' au fost modificate. Parametrul N va aduce afişarea doar " + +#~ msgid "the last N lines. The -c option causes the history list to be" +#~ msgstr "a ultimelor N linii. Opţiunea -c face ca lista istoricului să fie" + +#~ msgid "" +#~ "cleared by deleting all of the entries. The `-w' option writes out the" +#~ msgstr "ştearsă prin ştergerea tuturor intrărilor. Opţiunea `-w' scrie" + +#~ msgid "" +#~ "current history to the history file; `-r' means to read the file and" +#~ msgstr "" +#~ "istoricul curent în fişierul de istoric; `-r' înseamnă citirea " +#~ "fişierului şi" + +#~ msgid "append the contents to the history list instead. `-a' means" +#~ msgstr "adăugare a conţinutului listei istoricului în loc. `-a' înseamnă" + +#~ msgid "to append history lines from this session to the history file." +#~ msgstr "" +#~ "adăugare a liniilor istoricului din această sesiune la fişierul de " +#~ "istoric." + +#~ msgid "Argument `-n' means to read all history lines not already read" +#~ msgstr "" +#~ "Parametrul `-n' înseamnă citirea tuturor liniilor istoricului care nu " +#~ "sunt deja citite" + +#~ msgid "from the history file and append them to the history list. If" +#~ msgstr "" +#~ "din fişierul de istoric şi adăugarea lor la lista istoricului. Dacă" + +#~ msgid "FILENAME is given, then that is used as the history file else" +#~ msgstr "" +#~ "este dat NUME_FIŞIER, acesta va fi utilizat ca fişier de istoric, în caz " +#~ "contrar" + +#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." +#~ msgstr "" +#~ "dacă $HISTFILE are valoare, aceasta este utilizată, altfel ~/." +#~ "bash_history." + +#~ msgid "If the -s option is supplied, the non-option ARGs are appended to" +#~ msgstr "" +#~ "Dacă este furnizată opţiunea -s ARGumentele non-opţiuni sunt adăugate la" + +#~ msgid "the history list as a single entry. The -p option means to perform" +#~ msgstr "lista istoricului ca intrări singure. Opţiunea -p înseamnă" + +#~ msgid "" +#~ "history expansion on each ARG and display the result, without storing" +#~ msgstr "" +#~ "expandarea istoricului la fiecare ARGument şi afişarea rezultatului, fără " +#~ "a stoca" + +#~ msgid "anything in the history list." +#~ msgstr "nimic în lista istoricului." + +#~ msgid "Lists the active jobs. The -l option lists process id's in addition" +#~ msgstr "" +#~ "Listează joburile active. Opţiunea -l listează id-urile proceselor în " +#~ "plus faţă de" + +#~ msgid "to the normal information; the -p option lists process id's only." +#~ msgstr "" +#~ "informaţiile normale; optiunea -p listează doar id-urile proceselor." + +#~ msgid "" +#~ "If -n is given, only processes that have changed status since the last" +#~ msgstr "" +#~ "Dacă este dat -n,sunt afişate doar procesele care şi-au schimbat starea" + +#~ msgid "" +#~ "notification are printed. JOBSPEC restricts output to that job. The" +#~ msgstr "" +#~ "de la ultima notificare. JOBSPEC restricţionează output-ul spre acel " +#~ "job. " + +#~ msgid "-r and -s options restrict output to running and stopped jobs only," +#~ msgstr "" +#~ "Opţiunile -r şi -s restricţionează output-ul doar spre joburile care " +#~ "rulează şi respectiv," + +#~ msgid "respectively. Without options, the status of all active jobs is" +#~ msgstr "care sunt stopate. Fără opţiuni, este afişată starea joburilor" + +#~ msgid "" +#~ "printed. If -x is given, COMMAND is run after all job specifications" +#~ msgstr "" +#~ "active. Dacă este furnizat -x, COMANDĂ este rulată după ce toate " +#~ "specificaţiile" + +#~ msgid "" +#~ "that appear in ARGS have been replaced with the process ID of that job's" +#~ msgstr "" +#~ "joburilor care aparîn ARGS au fost înlocuite cu ID-urile proceselor a" + +#~ msgid "process group leader." +#~ msgstr "liderului de grup al proceselor acelui job(process group-leader)." + +#~ msgid "Removes each JOBSPEC argument from the table of active jobs." +#~ msgstr "Şterge fiecare parametru JOBSPEC din tabela de joburi active." + +#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" +#~ msgstr "Trimite proceselor numite de PID (sau JOB) semnalul SIGSPEC. Dacă" + +#~ msgid "" +#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" +#~ msgstr "SIGSPEC nu este prezent, atunci se asumă SIGTERM. Parametrul `-l'" + +#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to" +#~ msgstr "" +#~ "listează numele semnalelor; dacă urmează parametri după `-l' se asumă că" + +#~ msgid "be signal numbers for which names should be listed. Kill is a shell" +#~ msgstr "" +#~ "sunt numere de semnale pentru care numele ar trebui listate. Kill este " +#~ "comandă" + +#~ msgid "builtin for two reasons: it allows job IDs to be used instead of" +#~ msgstr "" +#~ "internă a sehll-ului din două motive: permite utilizarea ID-urilor de " +#~ "joburi în locul" + +#~ msgid "process IDs, and, if you have reached the limit on processes that" +#~ msgstr "ID-urilor de procese, şi, daca s-a ajuns la limita de procese care " + +#~ msgid "" +#~ "you can create, you don't have to start a process to kill another one." +#~ msgstr "" +#~ "se pot crea, nu mai e nevoie să se pornească un proces pentru a omorî " +#~ "altul." + +#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" +#~ msgstr "" +#~ "Fiecare ARGument este o expresie aritmetică ce va fi evaluată. Evaluarea" + +#~ msgid "is done in long integers with no check for overflow, though division" +#~ msgstr "" +#~ "se face în întregi lungi (long integers) fără verificări de overflow, " +#~ "totuşi împărţirea" + +#~ msgid "by 0 is trapped and flagged as an error. The following list of" +#~ msgstr "la 0 este reţinută şi marcată ca eroare. Următoarea listă de" + +#~ msgid "operators is grouped into levels of equal-precedence operators." +#~ msgstr "operatori este grupată în nivele de operatori 'equal-precedence'." + +#~ msgid "The levels are listed in order of decreasing precedence." +#~ msgstr "Nivelele sunt listate în ordinea inversă a întâietăţii." + +#~ msgid "\t-, +\t\tunary minus, plus" +#~ msgstr "\t-, +\t\tplus, minus unar" + +#~ msgid "\t!, ~\t\tlogical and bitwise negation" +#~ msgstr "\t!, ~\t\tnegare logică" + +#~ msgid "\t*, /, %\t\tmultiplication, division, remainder" +#~ msgstr "\t*, /, %\t\tînmulţire, împărţire, rest" + +#~ msgid "\t+, -\t\taddition, subtraction" +#~ msgstr "\t+, -\t\tadăugare, scădere" + +#~ msgid "\t<<, >>\t\tleft and right bitwise shifts" +#~ msgstr "\t<<, >>\t\toperaţii pe un bit la stânga şi la dreapta" + +#~ msgid "\t<=, >=, <, >\tcomparison" +#~ msgstr "\t<=, >=, <, >\tcomparare" + +#~ msgid "\t==, !=\t\tequality, inequality" +#~ msgstr "\t==, !=\t\tegalitate, inegalitate" + +#~ msgid "\t&\t\tbitwise AND" +#~ msgstr "\t&\t\tŞI pe un bit" + +#~ msgid "\t^\t\tbitwise XOR" +#~ msgstr "\t^\t\tSAU exclusiv(XOR) pe un bit" + +#~ msgid "\t|\t\tbitwise OR" +#~ msgstr "\t|\t\tSAU pe un bit" + +#~ msgid "\t&&\t\tlogical AND" +#~ msgstr "\t&&\t\tŞI logic" + +#~ msgid "\t||\t\tlogical OR" +#~ msgstr "\t||\t\tSAU logic" + +#~ msgid "\texpr ? expr : expr" +#~ msgstr "\texpr ? expr : expr" + +#~ msgid "\t\t\tconditional expression" +#~ msgstr "\t\t\texpresie condiţională" + +#~ msgid "\t=, *=, /=, %=," +#~ msgstr "\t=, *=, /=, %=," + +#~ msgid "\t+=, -=, <<=, >>=," +#~ msgstr "\t+=, -=, <<=, >>=," + +#~ msgid "\t&=, ^=, |=\tassignment" +#~ msgstr "\t&=, ^=, |=\tatribuire" + +#~ msgid "is replaced by its value (coerced to a long integer) within" +#~ msgstr "este înlocuit de valoarea sa (trunchiată la un întreg lung) într-o" + +#~ msgid "an expression. The variable need not have its integer attribute" +#~ msgstr "expresie. Variabila nu trebuie să aibă atributul său întreg" + +#~ msgid "turned on to be used in an expression." +#~ msgstr "activat pentru a fi folosită într-o expresie." + +#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in" +#~ msgstr "Operatorii sunt evaluaţi în ordinea întâietăţii. Subexpresiile din" + +#~ msgid "parentheses are evaluated first and may override the precedence" +#~ msgstr "paranteze sunt evaluate primele şi pot suprascrie regulile de" + +#~ msgid "rules above." +#~ msgstr "întâietate de mai sus." + +#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" +#~ msgstr "" +#~ "Dacă ultimul ARGument este evaluat la 0 let returnează 1; 0 este returnat" + +#~ msgid "otherwise." +#~ msgstr "în caz contrar." + +#~ msgid "One line is read from the standard input, and the first word is" +#~ msgstr "" +#~ "Linia este citită de la intrarea(input) standard, şi primul cuvânt este" + +#~ msgid "" +#~ "assigned to the first NAME, the second word to the second NAME, and so" +#~ msgstr "" +#~ "atribuit primului NUME, al doilea cuvânt celui de-al doilea NUME, şi aşa" + +#~ msgid "" +#~ "on, with leftover words assigned to the last NAME. Only the characters" +#~ msgstr "" +#~ "mai departe, cu cele rămase atribuite ultimelor NUME. Doar caracterele" + +#~ msgid "found in $IFS are recognized as word delimiters. The return code is" +#~ msgstr "" +#~ "găsite în $IFS sunt recunoscute ca delimitatoare de cuvinte. Codul " +#~ "returnat este" + +#~ msgid "" +#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the" +#~ msgstr "" +#~ "zero, cu excepţia cazului în care este întâlnit sfârşit de fişier. Dacă " +#~ "nici un NUME" + +#~ msgid "" +#~ "line read is stored in the REPLY variable. If the -r option is given," +#~ msgstr "" +#~ "nu este furnizat, linia citită este stocată în variabila RĂSPUNS. Dacă e " +#~ "dată " + +#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If" +#~ msgstr "" +#~ "opţiunea -r, aceasta înseamnă intrare `brută' şi caractere speciale " +#~ "dezactivate." + +#~ msgid "the `-p' option is supplied, the string supplied as an argument is" +#~ msgstr "Dacă este dată opţiunea `-p', şirul furnizat ca argument este" + +#~ msgid "" +#~ "output without a trailing newline before attempting to read. If -a is" +#~ msgstr "trimis la output cu linie nouă înainte de citire. Dacă -a este" + +#~ msgid "" +#~ "supplied, the words read are assigned to sequential indices of ARRAY," +#~ msgstr "" +#~ "furnizată, cuvintele citite sunt atribuite indicilor secvenţiali de " +#~ "INTERVAL," + +#~ msgid "starting at zero. If -e is supplied and the shell is interactive," +#~ msgstr "" +#~ "începând de la zero. Dacă -e este furnizat şi shell-ul este interactiv," + +#~ msgid "readline is used to obtain the line." +#~ msgstr "se va citi linia pentru obţinerea acesteia." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N" +#~ msgstr "" +#~ "Cauzează terminarea unei funcţii cu valoarea specificată de N. Dacă N" + +#~ msgid "is omitted, the return status is that of the last command." +#~ msgstr "este omis, starea returnată va fi aceea a ultimei comenzi." + +#~ msgid " -a Mark variables which are modified or created for export." +#~ msgstr "" +#~ " -a Marchează variabilele de modificat sau create pentru export." + +#~ msgid " -b Notify of job termination immediately." +#~ msgstr " -b Notificare de terminare de job imediată." + +#~ msgid " -e Exit immediately if a command exits with a non-zero status." +#~ msgstr "" +#~ " -e Iese imediat dacă există o comandă cu stare diferită de zero." + +#~ msgid " -f Disable file name generation (globbing)." +#~ msgstr " -f Inhibă generarea de nume de fişiere (globalizare)." + +#~ msgid " -h Remember the location of commands as they are looked up." +#~ msgstr " -h Reţine locaţiile comenzilor pe măsura verificării lor." + +#~ msgid "" +#~ " -i Force the shell to be an \"interactive\" one. Interactive shells" +#~ msgstr "" +#~ " -i Forţează shell-ul să fie unul \"interactiv\". Shell-urile " +#~ "interactive" + +#~ msgid " always read `~/.bashrc' on startup." +#~ msgstr " citesc întotdeauna `~/.bashrc' la rulare." + +#~ msgid " -k All assignment arguments are placed in the environment for a" +#~ msgstr " -k Toţi parametrii atribuirii sunt plasaţi în mediu pentru o" + +#~ msgid " command, not just those that precede the command name." +#~ msgstr " comandă, nu doar cele care preced numele comenzii." + +#~ msgid " -m Job control is enabled." +#~ msgstr " -m Controlul job-urilor este activat." + +#~ msgid " -n Read commands but do not execute them." +#~ msgstr " -n Citeşte comenzile, dar nu le execută." + +#~ msgid " -o option-name" +#~ msgstr " -o nume-opţiune" + +#~ msgid " Set the variable corresponding to option-name:" +#~ msgstr " Setează variabila corespunzătoare numelui opţiunii:" + +#~ msgid " allexport same as -a" +#~ msgstr " allexport la fel ca -a" + +#~ msgid " braceexpand same as -B" +#~ msgstr " braceexpand la fel ca -B" + +#~ msgid " emacs use an emacs-style line editing interface" +#~ msgstr "" +#~ " emacs foloseşte o interfaţă de editare de linii stil " +#~ "emacs" + +#~ msgid " errexit same as -e" +#~ msgstr " errexit la fel ca -e" + +#~ msgid " hashall same as -h" +#~ msgstr " hashall la fel ca -h" + +#~ msgid " histexpand same as -H" +#~ msgstr " histexpand la fel ca -H" + +#~ msgid " ignoreeof the shell will not exit upon reading EOF" +#~ msgstr " ignoreeof shellul nu va ieşi după citirea EOF" + +#~ msgid " interactive-comments" +#~ msgstr " interactive-comments" + +#~ msgid "" +#~ " allow comments to appear in interactive commands" +#~ msgstr "" +#~ " permite comentariilor să apară în comenzi " +#~ "interactive." + +#~ msgid " keyword same as -k" +#~ msgstr " keyword la fel ca -k" + +#~ msgid " monitor same as -m" +#~ msgstr " monitor sla fel ca -m" + +#~ msgid " noclobber same as -C" +#~ msgstr " noclobber la fel ca -C" + +#~ msgid " noexec same as -n" +#~ msgstr " noexec la fel ca -n" + +#~ msgid " noglob same as -f" +#~ msgstr " noglob la fel ca -f" + +#~ msgid " notify save as -b" +#~ msgstr " notify la fel ca -b" + +#~ msgid " nounset same as -u" +#~ msgstr " nounset la fel ca -u" + +#~ msgid " onecmd same as -t" +#~ msgstr " onecmd la fel ca -t" + +#~ msgid " physical same as -P" +#~ msgstr " physical la fel ca -P" + +#~ msgid "" +#~ " posix change the behavior of bash where the default" +#~ msgstr "" +#~ " posix schimbă comportamentul bash în care implicit" + +#~ msgid "" +#~ " operation differs from the 1003.2 standard to" +#~ msgstr "" +#~ " operaţiile diferă de standardul 1003.2 pentru" + +#~ msgid " match the standard" +#~ msgstr " a se potrivi standardului" + +#~ msgid " privileged same as -p" +#~ msgstr " privileged la fel ca -p" + +#~ msgid " verbose same as -v" +#~ msgstr " verbose la fel ca -v" + +#~ msgid " vi use a vi-style line editing interface" +#~ msgstr "" +#~ " vi foloseşte o interfaţă de editare de linii stil vi" + +#~ msgid " xtrace same as -x" +#~ msgstr " xtrace la fel ca -x" + +#~ msgid "" +#~ " -p Turned on whenever the real and effective user ids do not match." +#~ msgstr "" +#~ " -p Activat de fiecare dată când id-urile de user real şi efectiv nu " +#~ "se potrivesc." + +#~ msgid " Disables processing of the $ENV file and importing of shell" +#~ msgstr " Inhibă procesarea fişierului $ENV şi importarea funcţiilor" + +#~ msgid "" +#~ " functions. Turning this option off causes the effective uid and" +#~ msgstr "" +#~ " shell-ului. Dezactivarea acestei opţiuni face ca uid-ul şi gid-ul" + +#~ msgid " gid to be set to the real uid and gid." +#~ msgstr " efectiv să fie setate drept uid-ul şi gid-ul real." + +#~ msgid " -t Exit after reading and executing one command." +#~ msgstr " -t Iese după citirea şi executarea unei comenzi." + +#~ msgid " -u Treat unset variables as an error when substituting." +#~ msgstr " -u Tratează variabilele nesetate drept erori în substituţie." + +#~ msgid " -v Print shell input lines as they are read." +#~ msgstr "" +#~ " -v Tipăreşte liniile de intrare(input) ale shell-ului pe măsură ce " +#~ "sunt citite." + +#~ msgid " -x Print commands and their arguments as they are executed." +#~ msgstr "" +#~ " -x Tipăreşte comenzile şi parametrii acestora pe măsura executării." + +#~ msgid " -B the shell will perform brace expansion" +#~ msgstr " -B shell-ul va executa expansiune de legături(brace)" + +#~ msgid " -H Enable ! style history substitution. This flag is on" +#~ msgstr "" +#~ " -H Activează substituţia istoricului stil ! . Acest marcaj(flag) " +#~ "este activat" + +#~ msgid " by default." +#~ msgstr " în mod implicit." + +#~ msgid " -C If set, disallow existing regular files to be overwritten" +#~ msgstr "" +#~ " -C Dacă este setat, nu va permite suprascrierea fişierelor existente" + +#~ msgid " by redirection of output." +#~ msgstr " prin redirectarea output-ului." + +#~ msgid " -P If set, do not follow symbolic links when executing commands" +#~ msgstr "" +#~ " -P Dacă este setat, nu va urma legăturile simbolice în executarea " +#~ "comenzilor" + +#~ msgid " such as cd which change the current directory." +#~ msgstr " precum cd care schimbă directorul curent." + +#~ msgid "Using + rather than - causes these flags to be turned off. The" +#~ msgstr "" +#~ "Folosind + în locul lui - provoacă dezactivarea acestor marcaje(flags)." + +#~ msgid "flags can also be used upon invocation of the shell. The current" +#~ msgstr "" +#~ " Marcajele pot fi folosite de asemenea pentru invocarea shell-ului. " +#~ "Setul" + +#~ msgid "" +#~ "set of flags may be found in $-. The remaining n ARGs are positional" +#~ msgstr "" +#~ "curent de marcaje(flags) poate fi găsit în $-. ARGumentele n rămase sunt" + +#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" +#~ msgstr "" +#~ "parametri poziţionali şi sunt atribuiţi, în ordine, lui $1, $2, .. $n. " +#~ "Dacă nu" + +#~ msgid "ARGs are given, all shell variables are printed." +#~ msgstr "" +#~ "este dat nici un ARGument, sunt tipărite toate variabilele shell-ului." + +#~ msgid "For each NAME, remove the corresponding variable or function. Given" +#~ msgstr "" +#~ "Pentru fiecare NUME, şterge variabila sau funcţia corespunzătoare. Dacă " +#~ "se" + +#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag," +#~ msgstr "" +#~ "dă `-v', desetarea(unset) va acţiona numai pe variabile. Dacă se dă `-f'," + +#~ msgid "unset will only act on functions. With neither flag, unset first" +#~ msgstr "" +#~ "desetarea(unset) va acţiona numai pe funcţii. Fără nici un marcaj(flag), " + +#~ msgid "tries to unset a variable, and if that fails, then tries to unset a" +#~ msgstr "" +#~ "desetarea(unset) va încerca întâi pe variabile, şi dacă eşueazăm va " +#~ "încerca" + +#~ msgid "" +#~ "function. Some variables (such as PATH and IFS) cannot be unset; also" +#~ msgstr "" +#~ "pe o funcţie. Anumite variabile ( precum PATH şi IFS) nu pot fi " +#~ "desetate(unset);" + +#~ msgid "see readonly." +#~ msgstr "de asemenea, vedeţi readonly." + +#~ msgid "NAMEs are marked for automatic export to the environment of" +#~ msgstr "NUMEle sunt marcate pentru exportul automat către mediul" + +#~ msgid "subsequently executed commands. If the -f option is given," +#~ msgstr "comenzilor executate ulterior. Dacă este dată opţiunea -f," + +#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" +#~ msgstr "" +#~ "NUMEle se referă la funcţii. Dacă nu este dat nici un NUME, sau este dat " +#~ "`-p'`," + +#~ msgid "is given, a list of all names that are exported in this shell is" +#~ msgstr "" +#~ "va fi tipărită o listă a tuturor numelor care sunt exportate în acest" + +#~ msgid "printed. An argument of `-n' says to remove the export property" +#~ msgstr "shell. Parametrul `-n' va elimina proprietatea de export " + +#~ msgid "from subsequent NAMEs. An argument of `--' disables further option" +#~ msgstr "" +#~ "din NUMEle ulterioare. Parametrul `--' dezactivează procesarea opţiunilor" + +#~ msgid "processing." +#~ msgstr "viitoare." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may" +#~ msgstr "NUMEle date sunt marcate readonly şi valorile acestor NUME nu poate" + +#~ msgid "not be changed by subsequent assignment. If the -f option is given," +#~ msgstr "fi schimbat de atribuiri ulterioare. Dacă este dată opţiunea -f," + +#~ msgid "then functions corresponding to the NAMEs are so marked. If no" +#~ msgstr "atunci funcţiile corespunzătoare NUMElor sunt marcate. Dacă nu" + +#~ msgid "" +#~ "arguments are given, or if `-p' is given, a list of all readonly names" +#~ msgstr "" +#~ "sunt furnizaţidaţ paramet, sau este dat parametrul `-p'` o listă de nume " +#~ "readonlyri " + +#~ msgid "" +#~ "is printed. An argument of `-n' says to remove the readonly property" +#~ msgstr "" +#~ "va fi tipărită. Parametrul `-n' va elimina proprietatea de readonly" + +#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as" +#~ msgstr "" +#~ "pentru NUMEle ulterioare. Opţiunea `-a' reprezintă tratarea fiecărui " +#~ "NUME ca" + +#~ msgid "an array variable. An argument of `--' disables further option" +#~ msgstr "o variabilă interval. Parametrul `--' dezactivează alte opţiuni" + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is" +#~ msgstr "" +#~ "Parametrii poziţionali de la $N+1 ... sunt redenumiţi în $1 ... Dacă N " +#~ "nu este" + +#~ msgid "not given, it is assumed to be 1." +#~ msgstr "furnizat, se presupune că e 1." + +#~ msgid "Read and execute commands from FILENAME and return. The pathnames" +#~ msgstr "Citeşte şi execută comenzi din NUME_FIŞIER şi returnare. Căile" + +#~ msgid "in $PATH are used to find the directory containing FILENAME." +#~ msgstr "" +#~ "din $PATH sunt folosite pentru a găsi directorul care conţine NUME_FIŞIER." + +#~ msgid "Suspend the execution of this shell until it receives a SIGCONT" +#~ msgstr "" +#~ "Suspendă execuţia acestui shell până se va primi un semnal de SIGCONT." + +#~ msgid "signal. The `-f' if specified says not to complain about this" +#~ msgstr " Dacă este specificat `-f' va elimina avertismentele despre acest " + +#~ msgid "being a login shell if it is; just suspend anyway." +#~ msgstr "login shell; va suspenda oricum." + +#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on" +#~ msgstr "Iese cu o stare de 0 (adevăr) sau 1 (falsitate) depinzând de" + +#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" +#~ msgstr "evaluarea EXPR. Expresiile pot fi unare sau binare. Expresiile" + +#~ msgid "expressions are often used to examine the status of a file. There" +#~ msgstr "" +#~ "unare sunt des folosite pentru a examina starea unui fişier. Mai există" + +#~ msgid "are string operators as well, and numeric comparison operators." +#~ msgstr "operatori de şir de asemenea, şi operator de comparare numerică." + +#~ msgid "File operators:" +#~ msgstr "Operatori de fişier:" + +#~ msgid " -b FILE True if file is block special." +#~ msgstr " -b FIŞIER Adevărat dacă fişierul este bloc special." + +#~ msgid " -c FILE True if file is character special." +#~ msgstr " -c FIŞIER Adevărat dacă fişierul este caracter special." + +#~ msgid " -d FILE True if file is a directory." +#~ msgstr " -b FIŞIER Adevărat dacă fişierul este director." + +#~ msgid " -e FILE True if file exists." +#~ msgstr " -e FIŞIER Adevărat dacă fişierul există." + +#~ msgid " -f FILE True if file exists and is a regular file." +#~ msgstr "" +#~ " -b FIŞIER Adevărat dacă fişierul există şi este fişier " +#~ "obişnuit (regular)." + +#~ msgid " -g FILE True if file is set-group-id." +#~ msgstr "" +#~ " -g FIŞIER Adevărat dacă fişierul are setat id-ul de grup." + +#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"." +#~ msgstr "" +#~ " -h FIŞIER Adevărat dacă fişierul este legătură simbolică. " +#~ "Folosiţi \"-L\"." + +#~ msgid " -L FILE True if file is a symbolic link." +#~ msgstr "" +#~ " -L FIŞIER Adevărat dacă fişierul este legătură simbolică." + +#~ msgid " -k FILE True if file has its \"sticky\" bit set." +#~ msgstr "" +#~ " -k FIŞIER Adevărat dacă fişierul are setat \"sticky\" bit." + +#~ msgid " -p FILE True if file is a named pipe." +#~ msgstr "" +#~ " -p FIŞIER Adevărat dacă fişierul este o legătură(pipe) numită." + +#~ msgid " -r FILE True if file is readable by you." +#~ msgstr " -r FIŞIER Adevărat dacă fişierul poate fi citit de tine." + +#~ msgid " -s FILE True if file exists and is not empty." +#~ msgstr " -s FIŞIER Adevărat dacă fişierul există şi nu este vid." + +#~ msgid " -S FILE True if file is a socket." +#~ msgstr " -S FIŞIER Adevărat dacă fişierul este un socket." + +#~ msgid " -t FD True if FD is opened on a terminal." +#~ msgstr " -t FD Adevărat dacă FD este deschis într-un terminal." + +#~ msgid " -u FILE True if the file is set-user-id." +#~ msgstr " -u FIŞIER Adevărat dacă fişierul are setat user id-ul." + +#~ msgid " -w FILE True if the file is writable by you." +#~ msgstr " -w FIŞIER Adevărat dacă fişierul poate fi scris de tine." + +#~ msgid " -x FILE True if the file is executable by you." +#~ msgstr "" +#~ " -x FIŞIER Adevărat dacă fişierul poate fi executat de către " +#~ "tine." + +#~ msgid " -O FILE True if the file is effectively owned by you." +#~ msgstr "" +#~ " -O FIŞIER Adevărat dacă fişierul este efectiv propriu(owned) " +#~ "ţie." + +#~ msgid "" +#~ " -G FILE True if the file is effectively owned by your group." +#~ msgstr "" +#~ " -O FIŞIER Adevărat dacă fişierul este efectiv propriu(owned) " +#~ "grupului tău." + +#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to" +#~ msgstr "" +#~ " FIŞIER1 -nt FIŞIER2 Adevărat dacă fişier1 este mai nou decât (potrivit " + +#~ msgid " modification date) file2." +#~ msgstr " datei modificării) fişier2." + +#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2." +#~ msgstr "" +#~ " FIŞIER1 -ot FIŞIER2 Adevărat dacă fişier1 este mai vechi decât fişier2." + +#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." +#~ msgstr "" +#~ " FIŞIER1 -ef FIŞIER2 Adevărat dacă fişier1 este hard link către fişier2." + +#~ msgid "String operators:" +#~ msgstr "Operatori de şiruri:" + +#~ msgid " -z STRING True if string is empty." +#~ msgstr " -z ŞIR Adevărat dacă şirul este vid." + +#~ msgid " -n STRING" +#~ msgstr " -n ŞIR" + +#~ msgid " STRING True if string is not empty." +#~ msgstr " ŞIR Adevărat dacă şirul nu este vid." + +#~ msgid " STRING1 = STRING2" +#~ msgstr " ŞIR1 = ŞIR2" + +#~ msgid " True if the strings are equal." +#~ msgstr " Adevărat dacă şirurile sunt egale." + +#~ msgid " STRING1 != STRING2" +#~ msgstr " ŞIR1 != ŞIR2" + +#~ msgid " True if the strings are not equal." +#~ msgstr " Adevărat dacă şirurile nu sunt egale." + +#~ msgid " STRING1 < STRING2" +#~ msgstr " ŞIR1 < ŞIR2" + +#~ msgid "" +#~ " True if STRING1 sorts before STRING2 lexicographically" +#~ msgstr "" +#~ " Adevărat dacă ŞIR1 se ordonează lexical înaintea lui " +#~ "ŞIR2" + +#~ msgid " STRING1 > STRING2" +#~ msgstr " ŞIR1 > ŞIR2" + +#~ msgid "" +#~ " True if STRING1 sorts after STRING2 lexicographically" +#~ msgstr "" +#~ " Adevărat dacă ŞIR1 se ordonează lexical după ŞIR2" + +#~ msgid "Other operators:" +#~ msgstr "Alţi operatori:" + +#~ msgid " ! EXPR True if expr is false." +#~ msgstr " ! EXPR Adevărat dacă expr e falsă." + +#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." +#~ msgstr " EXPR1 -a EXPR2 Adevărat dacă şi expr1 ŞI expr2 sunt adevărate." + +#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." +#~ msgstr "" +#~ " EXPR1 -a EXPR2 Adevărat dacă una din expr1 sau expr2 e adevărată." + +#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," +#~ msgstr " arg1 OP arg2 Teste aritmetice. OP este unul din -eq, -ne," + +#~ msgid " -lt, -le, -gt, or -ge." +#~ msgstr " -lt, -le, -gt, or -ge." + +#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal," +#~ msgstr "Operatorii aritmetici binari returnează adevărat(true) dacă ARG1 " + +#~ msgid "" +#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" +#~ msgstr "" +#~ "este egal cu, nu este egal cu,mai mic, mai mic sau egal, mai mare, mai " +#~ "mare sau egal" + +#~ msgid "than ARG2." +#~ msgstr "decât ARG2." + +#~ msgid "This is a synonym for the \"test\" builtin, but the last" +#~ msgstr "Acesta este un sinonim pentru comanda internă \"test\", dar ultimul" + +#~ msgid "argument must be a literal `]', to match the opening `['." +#~ msgstr "argument trebuie să fie un `]' literal, pentru a închide un `['." + +#~ msgid "Print the accumulated user and system times for processes run from" +#~ msgstr "" +#~ "Afişează timpurile acumulate de user şi sistem pentru procesele rulate din" + +#~ msgid "the shell." +#~ msgstr "shell." + +#~ msgid "The command ARG is to be read and executed when the shell receives" +#~ msgstr "" +#~ "ARGumentele comenzii vor fi citite şi executate când shell-ul primeşte" + +#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" +#~ msgstr "" +#~ "semnal(e). SIGNAL_SPEC. Dacă ARGumentul este absent toate semnalele" + +#~ msgid "reset to their original values. If ARG is the null string each" +#~ msgstr "" +#~ "specifice sunt resetate la valorile lor originale. Dacă ARGumentul este " +#~ "un şir vid" + +#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." +#~ msgstr "" +#~ "fiecare SIGNAL_SPEC este ignorat de shell şi de comanda invocată de " +#~ "acesta." + +#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" +#~ msgstr "" +#~ "Dacă SIGNAL_SPEC este EXIT (0) ARGumentele comenzii sunt executate la " + +#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every" +#~ msgstr "" +#~ "ieşirea din shell. Dacă SIGNAL_SPEC este DEBUG, ARGument este executat" + +#~ msgid "command. If ARG is `-p' then the trap commands associated with" +#~ msgstr "" +#~ "după fiecare comandă. Dacă ARGument este `-' atunci vor fi afişate " +#~ "comenzile" + +#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" +#~ msgstr "trap asociate cu fiecare SIGNAL_SPEC. Dacă nu sunt furnizaţi " + +#~ msgid "only `-p' is given, trap prints the list of commands associated with" +#~ msgstr "" +#~ "parametri sau este dat doar `-p', trap afişează lista de comenzi asociate " +#~ "cu " + +#~ msgid "" +#~ "each signal number. SIGNAL_SPEC is either a signal name in " +#~ msgstr "" +#~ "fiecare număr de semnal. SIGNAL_SPEC este ori un nume de semnal din " +#~ "" + +#~ msgid "" +#~ "or a signal number. `trap -l' prints a list of signal names and their" +#~ msgstr "" +#~ "sau un număr de semnal. `trap -l' tipăreşte o listă de numere de semnale " +#~ "şi " + +#~ msgid "corresponding numbers. Note that a signal can be sent to the shell" +#~ msgstr "" +#~ "numerele corespunzătoare. Notaţi că un semnal poate fi trimis shell-ului" + +#~ msgid "with \"kill -signal $$\"." +#~ msgstr "cu \"kill -signal $$\"." + +#~ msgid "For each NAME, indicate how it would be interpreted if used as a" +#~ msgstr "" +#~ "Pentru fiecare NUME, indică în ce mod va fi interpretat dacă este " +#~ "utilizat ca" + +#~ msgid "If the -t option is used, returns a single word which is one of" +#~ msgstr "" +#~ "Dacă este folosită opţiunea -t, returnează un singur cuvânt care este " +#~ "unul din" + +#~ msgid "" +#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" +#~ msgstr "" +#~ "`alias', `keyword', `function', `builtin', `file' or `', dacă NUME este un" + +#~ msgid "" +#~ "alias, shell reserved word, shell function, shell builtin, disk file," +#~ msgstr "" +#~ "alias, cuvânt rezervat de shell, funcţie de shell, comandă internă, " +#~ "fişier de pe disk," + +#~ msgid "or unfound, respectively." +#~ msgstr "sau negăsit, respectiv." + +#~ msgid "If the -p flag is used, either returns the name of the disk file" +#~ msgstr "" +#~ "Dacă este utilizat marcajul(flag) -p se returnează fie numele fişierului " +#~ "de disk" + +#~ msgid "that would be executed, or nothing if -t would not return `file'." +#~ msgstr "" +#~ "care urmează să fie executat, sau nimic dacă -t nu va returna `fişier'." + +#~ msgid "If the -a flag is used, displays all of the places that contain an" +#~ msgstr "Dacă este folosit -a, se vor afişa toate locurile care conţin" + +#~ msgid "" +#~ "executable named `file'. This includes aliases and functions, if and" +#~ msgstr "" +#~ "un executabil numit `fişier'. Aceasta include aliasuri şi funcţii, şi " +#~ "numai" + +#~ msgid "only if the -p flag is not also used." +#~ msgstr "marcajul(flag) -p nu este folosit de asemenea." + +#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t," +#~ msgstr "Type acceptă -all, -path şi -type în loc de -a, -p şi -t," + +#~ msgid "respectively." +#~ msgstr "respectiv" + +#~ msgid "Ulimit provides control over the resources available to processes" +#~ msgstr "Ulimit oferă control al resurselor disponibile pentru procesele" + +#~ msgid "started by the shell, on systems that allow such control. If an" +#~ msgstr "" +#~ "rulate de shell, în sisteme care permit acest tip de control. Dacă este" + +#~ msgid "option is given, it is interpreted as follows:" +#~ msgstr "dată o opţiune, este interpretată precum urmează:" + +#~ msgid " -S\tuse the `soft' resource limit" +#~ msgstr " -S\tfoloseşte limita `soft' a resursei" + +#~ msgid " -H\tuse the `hard' resource limit" +#~ msgstr " -H\tfoloseşte limita `hard' a resursei" + +#~ msgid " -a\tall current limits are reported" +#~ msgstr " -a\tsunt raportate toate limitele curente" + +#~ msgid " -c\tthe maximum size of core files created" +#~ msgstr " -c\tmărimea maximă de fişiere core creată" + +#~ msgid " -d\tthe maximum size of a process's data segment" +#~ msgstr " -d\ttmărimea maximă a unui segment de date al procesului" + +#~ msgid " -m\tthe maximum resident set size" +#~ msgstr " -m\tmărimea maximă de rezidenţă" + +#~ msgid " -s\tthe maximum stack size" +#~ msgstr " -s\tmărimea maximă a stivei(stack)" + +#~ msgid " -t\tthe maximum amount of cpu time in seconds" +#~ msgstr " -t\tsuma maximă a timpului cpu în secunde" + +#~ msgid " -f\tthe maximum size of files created by the shell" +#~ msgstr " -f\ttmărimea maximă a fişierelor create de shell" + +#~ msgid " -p\tthe pipe buffer size" +#~ msgstr " -p\tmărimea tamponului de legătură (pipe buffer)" + +#~ msgid " -n\tthe maximum number of open file descriptors" +#~ msgstr " -n\tnumărul maxim de fişiere deschise" + +#~ msgid " -u\tthe maximum number of user processes" +#~ msgstr " -u\tnumărul maxim de procese utilizator" + +#~ msgid " -v\tthe size of virtual memory" +#~ msgstr " -v\tmărimea memoriei virtuale" + +#~ msgid "If LIMIT is given, it is the new value of the specified resource." +#~ msgstr "Dacă este dată LIMITĂ, va fi noua valoare a resursei specificate." + +#~ msgid "Otherwise, the current value of the specified resource is printed." +#~ msgstr "" +#~ "În caz contrar, este tipărită valoarea curentă a resursei specificate." + +#~ msgid "If no option is given, then -f is assumed. Values are in 1k" +#~ msgstr "" +#~ "Dacă nu este dată nici o opţiune se presupune -f. Valorile sunt exprimate" + +#~ msgid "increments, except for -t, which is in seconds, -p, which is in" +#~ msgstr "" +#~ "în incrementări de 1k, exceptând -t, care este în secunde, -p, care este " +#~ "în" + +#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of" +#~ msgstr "incrementări de 512 octeţi, şi -u, care este un număr nescalat de" + +#~ msgid "processes." +#~ msgstr "procese." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if" +#~ msgstr "" +#~ "Masca de crearecreation mask) a fişierului utilizatorului e setată la " +#~ "MOD. Dacă" + +#~ msgid "" +#~ "`-S' is supplied, the current value of the mask is printed. The `-S'" +#~ msgstr "" +#~ "MOD este omis sau este dat `-S', este tipărită valoarea curentă a " +#~ "măştii. Opţiunea" + +#~ msgid "" +#~ "option makes the output symbolic; otherwise an octal number is output." +#~ msgstr "" +#~ "`-S' returnează output simbolic; în caz contrar outputul este un număr " +#~ "octal." + +#~ msgid "If MODE begins with a digit, it is interpreted as an octal number," +#~ msgstr "Dacă MOD începe cu un digit, este interpretat ca număr octal," + +#~ msgid "" +#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)." +#~ msgstr "în caz contrar este un şir mod simbolic premis de chmod(1)." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If" +#~ msgstr "" +#~ "Aşteaptă după procesul specificat şi raportează starea de terminare. Dacă" + +#~ msgid "N is not given, all currently active child processes are waited for," +#~ msgstr "" +#~ "N nu este dat,se aşteaptă după toate procesele copil(child) curente," + +#~ msgid "and the return code is zero. N may be a process ID or a job" +#~ msgstr "" +#~ "şi codul returnat este zero. N poate fi un ID de proces sau o " +#~ "specificaţie" + +#~ msgid "specification; if a job spec is given, all processes in the job's" +#~ msgstr "de job; Dacă este dată o specificaţie de job,se aşteaptă după" + +#~ msgid "pipeline are waited for." +#~ msgstr " toate procesele din legătură(pipeline)." + +#~ msgid "and the return code is zero. N is a process ID; if it is not given," +#~ msgstr "" +#~ "şi codul returnat este zero. N este un ID de proces; dacă nu este dat," + +#~ msgid "all child processes of the shell are waited for." +#~ msgstr "se va aştepta după doate procesele copil(child) din shell." + +#~ msgid "The `for' loop executes a sequence of commands for each member in a" +#~ msgstr "" +#~ "Ciclul `for' execută o secvenţă de comenzi pentru fiecare membru dintr-o" + +#~ msgid "" +#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" +#~ msgstr "" +#~ "listă de elemente. Dacă `in CUVINTE...;' nu este prezent, atunci `in \"$@" +#~ "\"'" + +#~ msgid "" +#~ "assumed. For each element in WORDS, NAME is set to that element, and" +#~ msgstr "" +#~ "este presupus. Pentru fiecare element din CUVINTE, NUME este setat ca " +#~ "acel" + +#~ msgid "the COMMANDS are executed." +#~ msgstr "element şi COMENZI sunt executate." + +#~ msgid "The WORDS are expanded, generating a list of words. The" +#~ msgstr "CUVINTEle sunt expandate, generând o listă de cuvinte. Setul de" + +#~ msgid "set of expanded words is printed on the standard error, each" +#~ msgstr "" +#~ "de cuvinte expandate este tipărit la dispozitivul de eroare standard, " +#~ "fiecare" + +#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" +#~ msgstr "" +#~ "fiind precedat de un număr. Dacă `in CUVINTE' nu este prezent, `in \"$@" +#~ "\"'" + +#~ msgid "is assumed. The PS3 prompt is then displayed and a line read" +#~ msgstr "" +#~ "este presupus. Promptul PS3 este apoi afişat şi o linie va fi citită de" + +#~ msgid "from the standard input. If the line consists of the number" +#~ msgstr "" +#~ "la intrare(input) standard. Dacă linia e alcătuită dintr-unul din " +#~ "numerele" + +#~ msgid "corresponding to one of the displayed words, then NAME is set" +#~ msgstr "corespunzătoare unuia din cuvintele afişate, atunci NUME este setat" + +#~ msgid "to that word. If the line is empty, WORDS and the prompt are" +#~ msgstr "" +#~ "drept cuvântul respectiv. Dacă linia este vidă, CUVINTEle şi promptul " +#~ "sunt" + +#~ msgid "redisplayed. If EOF is read, the command completes. Any other" +#~ msgstr "" +#~ "reafişate. Dacă se citeşte EOF, comanda ajunge la sfârşit. Orice altă" + +#~ msgid "value read causes NAME to be set to null. The line read is saved" +#~ msgstr "" +#~ "valoare citită va face ca NUMEle setat să fie setat null. Linia citită " +#~ "este salvată" + +#~ msgid "in the variable REPLY. COMMANDS are executed after each selection" +#~ msgstr "" +#~ "în variabila RĂSPUNS. COMENZIle sunt executate după fiecare selecţie" + +#~ msgid "until a break or return command is executed." +#~ msgstr "până când se execută o comandă break sau return." + +#~ msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" +#~ msgstr "" +#~ "Execută selectiv COMENZI bazându-se pe potrivirea CUVÂNTului în TIPAR." + +#~ msgid "`|' is used to separate multiple patterns." +#~ msgstr " `|' este folosit pentru a separa mai multe tipare." + +#~ msgid "" +#~ "The if COMMANDS are executed. If the exit status is zero, then the then" +#~ msgstr "" +#~ "COMENZIle if sunt executate. Dacă starea de ieşire este zero, atunc" + +#~ msgid "" +#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" +#~ msgstr "" +#~ "COMENZIle then sunt executate. În caz contrar, fiecare din COMENZIle " +#~ "elif sunt executate" + +#~ msgid "" +#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS" +#~ msgstr "" +#~ "pe rând, şi dacă starea de ieşire este zero, atunci COMENZIle then " +#~ "corespunzătoare" + +#~ msgid "" +#~ "are executed and the if command completes. Otherwise, the else COMMANDS" +#~ msgstr "" +#~ "sunt executate şi comanda if se termină. În caz contrar, COMENZIle else" + +#~ msgid "" +#~ "are executed, if present. The exit status is the exit status of the last" +#~ msgstr "" +#~ "sunt executate, în cazul în care sunt prezente. Starea de ieşire este " +#~ "starea de ieşire" + +#~ msgid "command executed, or zero if no condition tested true." +#~ msgstr "" +#~ "a ultimei comenzi executate, sau zero dacă nici o condiţie nu s-a dovedit " +#~ "adevărată." + +#~ msgid "Expand and execute COMMANDS as long as the final command in the" +#~ msgstr "Expandează şi execută COMENZI atâta timp cât comanda finală din" + +#~ msgid "`while' COMMANDS has an exit status of zero." +#~ msgstr "COMENZIle `while' au o stare de ieşire de zero." + +#~ msgid "`until' COMMANDS has an exit status which is not zero." +#~ msgstr "COMENZIle `until' au o stare de ieşire diferită de zero." + +#~ msgid "Create a simple command invoked by NAME which runs COMMANDS." +#~ msgstr "Crează o comandă simplă invocată de NUME care rulează COMENZI." + +#~ msgid "Arguments on the command line along with NAME are passed to the" +#~ msgstr "Parametrii din linia de comandă împreună cu NUMEle sunt pasaţi" + +#~ msgid "function as $0 .. $n." +#~ msgstr "funcţiei drept $0 .. $n." + +#~ msgid "Run a set of commands in a group. This is one way to redirect an" +#~ msgstr "" +#~ "Rulează un set de comenzi dintr-un grup. Aceasta este o cale de a " +#~ "redirecta un" + +#~ msgid "entire set of commands." +#~ msgstr "întreg set de comenzi." + +#~ msgid "This is similar to the `fg' command. Resume a stopped or background" +#~ msgstr "" +#~ "Aceasta este similară comenzii `fg'. Continuă(resume) un job stopat sau " +#~ "din" + +#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify" +#~ msgstr "" +#~ "fundal(background). Dacă se specifică DIGIŢI, atunci este folosit acel " +#~ "job. Dacă" + +#~ msgid "" +#~ "WORD, then the job whose name begins with WORD is used. Following the" +#~ msgstr "" +#~ "se specifică CUVÂNT, atunci e folosit jobul al cărui nume începe cu " +#~ "CUVÂNT." + +#~ msgid "job specification with a `&' places the job in the background." +#~ msgstr "" +#~ "Specificând jobului un `&' după, va plasa jobul în fundal(background)." + +#~ msgid "BASH_VERSION The version numbers of this Bash." +#~ msgstr "BASH_VERSION Numărul de versiune a acestui Bash." + +#~ msgid "CDPATH A colon separated list of directories to search" +#~ msgstr "" +#~ "CDPATH O listă de directoare separată prin două-puncte pentru a " +#~ "se" + +#~ msgid "\t\twhen the argument to `cd' is not found in the current" +#~ msgstr "" +#~ "\t\tcăuta atunci când parametrii specificaţi comenzii `cd' nu sunt găsiţi " +#~ "în" + +#~ msgid "\t\tdirectory." +#~ msgstr "\t\tdirectorul curent." + +#~ msgid "" +#~ "HISTFILE The name of the file where your command history is stored." +#~ msgstr "" +#~ "HISTFILE Numele fişierului unde istoricul comenzilor voastre este " +#~ "stocat." + +#~ msgid "HISTFILESIZE The maximum number of lines this file can contain." +#~ msgstr "" +#~ "HISTFILESIZE Numărul maxim de linii pe care acest fişier poate să le " +#~ "conţină." + +#~ msgid "HISTSIZE The maximum number of history lines that a running" +#~ msgstr "" +#~ "HISTSIZE Numărul maxim de linii de istoric care pot fi accesate" + +#~ msgid "\t\tshell can access." +#~ msgstr "\t\tde un shell activ." + +#~ msgid "HOME The complete pathname to your login directory." +#~ msgstr "HOME Calea completă către directorul vostru de login." + +#~ msgid "" +#~ "HOSTTYPE The type of CPU this version of Bash is running under." +#~ msgstr "" +#~ "HOSTTYPE Tipul de CPU pe care rulează această versiune de Bash." + +#~ msgid "" +#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF" +#~ msgstr "" +#~ "IGNOREEOF Controlează acţiunea shell-ului la întâlnirea unui " +#~ "caracter" + +#~ msgid "\t\tcharacter as the sole input. If set, then the value" +#~ msgstr "" +#~ "\t\tEOF ca singură intrare(input). Dacă este setat, atunci valoarea" + +#~ msgid "\t\tof it is the number of EOF characters that can be seen" +#~ msgstr "\t\tacestuia este numărul de caractere EOF care pot fi întâlnite" + +#~ msgid "\t\tin a row on an empty line before the shell will exit" +#~ msgstr "\t\tpe rând într-o linie vidă înainte de ieşirea shell-ului." + +#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input." +#~ msgstr "" +#~ "\t\t(implicit 10). Când este desetat(unset), EOF semnifică sfârşitul " +#~ "intrării(input)." + +#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." +#~ msgstr "" +#~ "MAILCHECK\tCât de des, în secunde, Bash-ul să verifice dacă există mail " +#~ "nou." + +#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" +#~ msgstr "" +#~ "MAILPATH\tO listă de fişiere separate prin două-puncte pe care Bash o " +#~ "verifică" + +#~ msgid "\t\tfor new mail." +#~ msgstr "\t\tpentru mail nou." + +#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." +#~ msgstr "" +#~ "OSTYPE\t\tVersiunea de Unix pe care această versiune de Bash rulează." + +#~ msgid "PATH A colon-separated list of directories to search when" +#~ msgstr "" +#~ "PATH O listă de directoare separată prin două-puncte care se va" + +#~ msgid "\t\tlooking for commands." +#~ msgstr "\t\tindexa în căutarea comenzilor." + +#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each" +#~ msgstr "" +#~ "PROMPT_COMMAND O comandă care va fi executată înainte de tipărirea " +#~ "fiecărui" + +#~ msgid "\t\tprimary prompt." +#~ msgstr "\t\tprompt primar." + +#~ msgid "PS1 The primary prompt string." +#~ msgstr "PS1 Şirul promptului primar." + +#~ msgid "PS2 The secondary prompt string." +#~ msgstr "PS2 Şirul promptului secundar." + +#~ msgid "TERM The name of the current terminal type." +#~ msgstr "TERM Numele tipului de terminal curent." + +#~ msgid "auto_resume Non-null means a command word appearing on a line by" +#~ msgstr "" +#~ "auto_resume Dacă nu e vid rezultă că un cuvânt comandă ce apare pe o " +#~ "linie" + +#~ msgid "\t\titself is first looked for in the list of currently" +#~ msgstr "\t\tsingur este prima dată căutat în lista " + +#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded." +#~ msgstr "" +#~ "\t\tjoburilor.curente stopate. Dacă este găsit acolo, acel job este adus " +#~ "în prim-plan(foreground)." + +#~ msgid "\t\tA value of `exact' means that the command word must" +#~ msgstr "\t\tO valoare de `exact' înseamnă că acel cuvânt comandă trebuie" + +#~ msgid "\t\texactly match a command in the list of stopped jobs. A" +#~ msgstr "" +#~ "\t\tsă se potrivească perfect unei comenzi din lista de joburi stopate. O" + +#~ msgid "\t\tvalue of `substring' means that the command word must" +#~ msgstr "\t\tvaloare de `substring' înseamnă că acel cuvânt comandă trebuie" + +#~ msgid "\t\tmatch a substring of the job. Any other value means that" +#~ msgstr "" +#~ "\t\tsă se potrivească unui subşir al jobului. Orice altă valoare " +#~ "înseamnă că" + +#~ msgid "\t\tthe command must be a prefix of a stopped job." +#~ msgstr "\t\tacea comandă trebuie să fie prefixul unui job stopat." + +#~ msgid "command_oriented_history" +#~ msgstr "command_oriented_history" + +#~ msgid "" +#~ " Non-null means to save multiple-line commands together on" +#~ msgstr "" +#~ " Nevid reprezintă salvarea mai multor linii de comandă " +#~ "împreună într-o" + +#~ msgid " a single history line." +#~ msgstr " singură linie de istoric." + +#~ msgid "histchars Characters controlling history expansion and quick" +#~ msgstr "" +#~ "histchars Caractere care controlează expansiunea istoricului şi" + +#~ msgid "\t\tsubstitution. The first character is the history" +#~ msgstr "" +#~ "\t\tsubstituţii rapide. Primul caracter este caracterul de substituţie al" + +#~ msgid "\t\tsubstitution character, usually `!'. The second is" +#~ msgstr "\t\tistoricului, de obicei `!'. Al doilea este" + +#~ msgid "\t\tthe `quick substitution' character, usually `^'. The" +#~ msgstr "\t\tcaracterul de `quick substitution', de obicei `^'. Al treilea" + +#~ msgid "\t\tthird is the `history comment' character, usually `#'." +#~ msgstr "\t\teste caracterul de `history comment', de obicei `#'." + +#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter" +#~ msgstr "" +#~ "HISTCONTROL\tSetează o valoare de `ignorespace', care înseamnă să nu" + +#~ msgid "\t\tlines which begin with a space or tab on the history" +#~ msgstr "\t\tintroduci în lista de istoric linii care încep cu un" + +#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't" +#~ msgstr "" +#~ "\t\tspaţiu sau un tab. Setează o valoare de `ignoredups', care înseamnă" + +#~ msgid "\t\tenter lines which match the last entered line. Set to" +#~ msgstr "" +#~ "\t\ta nu se introduce linii care sunt asemănătoare ultimei linii " +#~ "introduse." + +#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset," +#~ msgstr "" +#~ "\t\tSetează o valaore de `ignoreboth' însemnând combinarea celor două " +#~ "opţiuni." + +#~ msgid "\t\tor set to any other value than those above means to save" +#~ msgstr "" +#~ "\t\t Desetat(unset) sau setat la orice altă valoare decât acelea de mai " +#~ "sus" + +#~ msgid "\t\tall lines on the history list." +#~ msgstr "\t\taînseamnă salvarea tuturor liniilor în lista istoricului." + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "" +#~ "Adaugă un director în partea superioară a stivei de directoare, sau " +#~ "roteşte" + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "stiva, făcând noul element superior al listei directorul curent" + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "" +#~ "de lucru. Fără parametri, interchimbă cele două directoare superioare." + +#~ msgid "+N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "+N\tRoteşte stiva astfel încât al N-ulea director (numărând" + +#~ msgid "\tfrom the left of the list shown by `dirs') is at the top." +#~ msgstr "\tde la stânga listei afişată de `dirs') va fi în vârf(top)." + +#~ msgid "-N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "-N\tRoteşte stiva astfel încât al N-ulea director (numărând" + +#~ msgid "\tfrom the right) is at the top." +#~ msgstr "\tde la dreapta) va fi în vârf." + +#~ msgid "-n\tsuppress the normal change of directory when adding directories" +#~ msgstr "" +#~ "-n\tinhibă schimbarea normală de directoare la adăugarea directoarelor" + +#~ msgid "\tto the stack, so only the stack is manipulated." +#~ msgstr "\tîn stivă, astfel încât doar stiva să fie manipulată." + +#~ msgid "dir\tadds DIR to the directory stack at the top, making it the" +#~ msgstr "dir\tadaugă DIR în vârful stivei de directoare, făcându-l" + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "Puteţi vedea stiva de directoare cu ajutorul comenzii `dirs'." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Şterge intrările din stiva de directoare. Fără parametri, " + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "şterge directorul superior din stivă, şi face cd la noul" + +#~ msgid "+N\tremoves the Nth entry counting from the left of the list" +#~ msgstr "+N\tşterge al N-ulea element numărând din stânga listei" + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr "\tafişate de `dirs', începând cu zero. De exemplu: `popd +0'" + +#~ msgid "\tremoves the first directory, `popd +1' the second." +#~ msgstr "\tşterge primul director, `popd +1' al doilea." + +#~ msgid "-N\tremoves the Nth entry counting from the right of the list" +#~ msgstr "-N\tşterge al N-ulea element numărând din dreapta listei" + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr "\tafişate de `dirs', începând cu zero. De exemplu: `popd -0'" + +#~ msgid "\tremoves the last directory, `popd -1' the next to last." +#~ msgstr "\tşterge ultimul director, `popd -1' penultimul." + +#~ msgid "" +#~ "-n\tsuppress the normal change of directory when removing directories" +#~ msgstr "" +#~ "-n\tinhibă schimbarea normală de directoare când se şterg diurectoare" + +#~ msgid "\tfrom the stack, so only the stack is manipulated." +#~ msgstr "\tdin stivă, astfel încât numai stiva să fie manipulată." + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "Afişează lista curentă de directoare reţinute. Directoarele" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "" +#~ "îşi gasesc locul în listă cu ajutorul comenzii `pushd'; puteţi merge" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "prin listă cu ajutorul comenzii `popd'." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "" +#~ "Parametrul(flag) -l specifică faptul că `dirs' nu ar trebui să " +#~ "tipărească " + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "" +#~ "versiuni prescurtate ale directoarelor care au legătură(relative) cu home-" +#~ "directory-ul." + +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "" +#~ " Aceasta înseamnă că `~/bin' poate fi afişat ca `/homes/bfox/bin' " +#~ "Parametrul" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "" +#~ "-v face ca `dirs' să afişeze stiva de directoare doar câte o intrare pe " +#~ "linie," + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "prefixând numele directorului cu poziţia în stivă. Parametrul -p" + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "face acelaşi lucru, dar poziţia în stivă nu este prefix." + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "" +#~ "Parametrul(flag) -c şterge stiva de directoare prin ştergerea tuturor " +#~ "elementelor." + +#~ msgid "" +#~ "+N\tdisplays the Nth entry counting from the left of the list shown by" +#~ msgstr "+N\tafişează a N-a intrare numărând de la stânga listei afişate de" + +#~ msgid "\tdirs when invoked without options, starting with zero." +#~ msgstr "\tdirs atunci când e invocată fără opţiuni, începând cu zero." + +#~ msgid "" +#~ "-N\tdisplays the Nth entry counting from the right of the list shown by" +#~ msgstr "-N\tafişează a N-a intrare numărând de la dreapta listei afişate de" + +#~ msgid "Toggle the values of variables controlling optional behavior." +#~ msgstr "" +#~ "Schimbă(toggle) valorile variabilelor, controlând comportamentul opţional." + +#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" +#~ msgstr "" +#~ "Parametrul -s înseamnă activarea(setarea) fiecărei NUME_OPT; parametrul -u" + +#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" +#~ msgstr "desetează(unset) fiecare NUME_OPT. Parametrul -q inhibă output-ul;" + +#~ msgid "status indicates whether each OPTNAME is set or unset. The -o" +#~ msgstr "" +#~ "starea de ieşire indică dacă fiecare NUME_OPT este setat sau desetat." + +#~ msgid "option restricts the OPTNAMEs to those defined for use with" +#~ msgstr "" +#~ " Parametrul -o restricţionează NUME_OPT la acelea definite pentru a fi " + +#~ msgid "`set -o'. With no options, or with the -p option, a list of all" +#~ msgstr "" +#~ "folosite cu `set -o'. Fără nici o opţiune, sau cu opţiunea -p, este " +#~ "afişată" + +#~ msgid "settable options is displayed, with an indication of whether or" +#~ msgstr "" +#~ "o listă a tuturor opţiunilor setabile, ceea ce indică dacă fiecare este" + +#~ msgid "not each is set." +#~ msgstr "setată sau nu." diff --git a/bash-5.1/po/ru.gmo b/bash-5.1/po/ru.gmo new file mode 100644 index 0000000000000000000000000000000000000000..f16a5378f2d985cae59d638c189a4e835af5bccc Binary files /dev/null and b/bash-5.1/po/ru.gmo differ diff --git a/bash-5.1/po/ru.po b/bash-5.1/po/ru.po new file mode 100644 index 0000000000000000000000000000000000000000..99302fce3e611990786da92a817ad5fe3b977369 --- /dev/null +++ b/bash-5.1/po/ru.po @@ -0,0 +1,8206 @@ +# GNU Bourne Again SHell. +# Copyright (C) 2002 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Ruslan Batdalov , 2002. +# Pavel Maryanov , 2014, 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: bash 4.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2018-04-17 14:09+0300\n" +"Last-Translator: Pavel Maryanov \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Poedit 2.0.6\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "неправильный индекс массива" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: удаляется атрибут nameref" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: не удаётся преобразовать индекс в ассоциативный массив" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: недопустимый ключ ассоциативного массива" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: не удаётся присвоить значение нечисловому индексу" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" +"%s: %s: необходимо использовать индекс при назначении ассоциативному массиву" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: не удаётся создать файл: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: не удаётся найти keymap для команды" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: первый непробельный символ не является «\"»" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "нет закрывающего «%c» в %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: отсутствует разделитель-двоеточие" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: не удаётся отменить привязку" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "расширение скобки: не удаётся выделить память для %s" + +#: braces.c:406 +#, fuzzy, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "расширение скобки: не удаётся выделить память для %d элементов" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "расширение скобки: не удалось выделить память для «%s»" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "«%s»: недопустимый псевдоним" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "редактирование строки не включено" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "«%s»: недопустимое название keymap" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: не удаётся прочитать файл: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "«%s»: неизвестное название функции" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s не привязан ни к какой клавише.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s можно вызвать через " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: не удаётся отменить привязку" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "счётчик циклов" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "имеет значение только для циклов «for», «while» или «until»" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Возвращает контекст вызова текущей подпрограммы.\n" +" \n" +" Если выражение не указано, возвращает «$line $filename». Если выражение " +"указано, возвращает\n" +" «$line $subroutine $filename». Эти дополнительные данные можно\n" +" использовать для трассировки стека.\n" +" \n" +" Значение выражения означает количество кадров, которое нужно вызвать\n" +" для возврата к текущему кадру. Первый кадр имеет номер 0.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если командный процессор не выполняет функцию, или " +"выражение\n" +" является допустимым." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "Не задана переменная HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "слишком много аргументов" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "нулевой каталог" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "Не задана переменная OLDPWD" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "строка %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "предупреждение: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: использование: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: для параметра требуется аргумент" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: требуется числовой аргумент" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: не найден" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: недопустимый параметр" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: недопустимое название параметра" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "«%s»: это недопустимый идентификатор" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "недопустимое восьмеричное число" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "недопустимое шестнадцатеричное число" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "недопустимое число" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: недопустимое указание сигнала" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "«%s»: это не идентификатор процесса и не допустимый указатель задания" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: переменная только для чтения" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s за пределами диапазона" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "аргумент" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s за пределами диапазона" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: нет такого задания" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: нет управления заданиями" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "нет управления заданиями" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: ограниченный режим" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "ограниченный режим" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: это не не встроенная команда bash" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "ошибка записи: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "ошибка назначения атрибутов терминала: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "ошибка получения атрибутов терминала: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: ошибка определения текущего каталога: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: неоднозначный указатель задания" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "справка отсутствует в этой версии" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: не удаётся выполнить сброс: %s доступен только для чтения" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: не удаётся выполнить сброс" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: недопустимое название действия" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: нет определения завершения" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "предупреждение: параметр -F может работать не так, как ожидается" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "предупреждение: параметр -C может работать не так, как ожидается" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "сейчас не выполняет функцию завершения" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "можно использовать только внутри функции" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: ссылочная переменная не может быть массивом" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: переменные nameref, ссылающиеся сами на себя, не допускаются" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: круговая ссылка на имя" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: недопустимое название переменной для ссылки на имя" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "«-f» нельзя использовать для создания функций" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: значение функции можно только считать" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: присвоение составного массива в кавычках устарело" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: переменные массива нельзя уничтожить таким образом" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: не удаётся преобразовать ассоциативный массив в индексированный" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "динамическая загрузка недоступна" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "не удаётся открыть общий объект %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "не удаётся найти %s в общем объекте %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: не загружается динамически" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "загрузка функции %s завершилась ошибкой (%d): не загружена" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: не загружается динамически" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: не удаётся удалить: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: это каталог" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: это не обычный файл" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: файл слишком велик" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: не удаётся запустить бинарный файл" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: не удаётся запустить: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "выход\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "не командный процессор login: используйте «exit»" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Есть остановленные задания.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Есть выполняемые задания.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "команда не найдена" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "указание журнала команд" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: не удаётся открыть временный файл: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "текущий" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "задание %d запущено без возможности управления" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: недопустимый параметр — %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: для параметра требуется аргумент — %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "хэширование отключено" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: таблица хэшей пустая\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "вызовы\tкоманда\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Команды, соответствующие ключевому слову «" +msgstr[1] "Команды, соответствующие ключевым словам «" +msgstr[2] "Команды, соответствующие ключевым словам «" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"нет разделов справки, соответствующих «%s». Попробуйте ввести «help help» " +"или «man -k %s» или «info %s»." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: не удаётся открыть файл: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Показанные ниже команды определены внутри командного процессора. Чтобы " +"вывести полный список, введите «help».\n" +"Чтобы вывести справку по функции «name», введите «help name».\n" +"Чтобы вывести справку по командному процессору, введите «info bash».\n" +"Чтобы вывести справку по командам, которые отсутствуют в этом списке, " +"введите «man -k» или «info».\n" +"\n" +"Звёздочка (*) рядом с названием команды означает, что эта команда " +"отключена.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "нельзя использовать больше одного параметра -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "положение журнала команд" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: недопустимая метка времени" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: не удалось расширить журнал команд" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: ошибка inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "с параметром «-x» нельзя указывать другие параметры" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: аргументами должны быть идентификаторы процессов или заданий" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Неизвестная ошибка" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "ожидается выражение" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: это не индексированный массив" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: недопустимое указание дескриптора файла" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: invalid недопустимый дескриптор файла: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: недопустимое число строк" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: недопустимое начало массива" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: недопустимый квант обратного вызова" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "пустое имя переменной массива" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "требуется поддержка переменных массива" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "«%s»: отсутствует символ форматирования" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: недопустимое указание формата времени" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "«%c»: недопустимый символ форматирования" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "предупреждение: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "ошибка анализа формата: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "отсутствует шестнадцатеричная цифра для \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "отсутствует цифра Юникода для \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "отсутствует другой каталог" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: недопустимый аргумент" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<отсутствует текущий каталог>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "стек каталогов пуст" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "индекс стека каталогов" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Выводит список запомненных на данный момент каталогов. Каталоги\n" +" помещаются в список командой «pushd». Для очистки\n" +" списка используется команда «popd».\n" +" \n" +" Параметры:\n" +" -c\tочистить стек каталогов, удалив из него все элементы\n" +" -l\tне выводить каталоги, начинающиеся с тильды (~),\n" +" \tкоторая означает домашний каталог\n" +" -p\tпоказать стек по одному каталогу в строке\n" +" -v\tпоказать стек по одному каталогу в строке\n" +" \tи с номером в стеке\n" +" \n" +" Аргументы:\n" +" +N\tпоказать N-ю запись слева в списке каталогов,\n" +" \tпоказанного при вызове без параметров, начиная с нуля.\n" +" \n" +" -N\tпоказать N-ю запись справа в списке каталогов,\n" +"\tпоказанного при вызове без параметров, начиная с нуля." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Добавляет каталог в начало стека каталогов или выполняет\n" +" ротацию стека, помещая в начало стека текущий рабочий\n" +" каталог. Если аргументы не указаны, меняет местами два первых " +"каталога.\n" +" \n" +" Параметры:\n" +" -n\tпредотвращает обычное изменение каталога при добавлении\n" +" \tкаталогов в стек, чтобы действия выполнялись только над стеком.\n" +" \n" +" Аргументы:\n" +" +N\tвыполняет ротацию стека, чтобы N-й каталог (слева\n" +" \tв списке, показанного командой «dirs», начиная с нуля)\n" +" \tстал первым в стеке.\n" +" \n" +" -N\tвыполняет ротацию стека, чтобы N-й каталог (справа\n" +" \tв списке, показанного командой «dirs», начиная с нуля)\n" +" \tстал первым в стеке.\n" +" \n" +" каталог\tдобавляет каталог в начало стека каталогов, делая его\n" +" \tновым текущим каталогом.\n" +" \n" +" Встроенная команда dirs показывает стек каталогов." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Удаляет записи из стека каталогов. Если аргументы не указаны,\n" +" удаляет первый каталог из стека и назначает новый первый каталог.\n" +" \n" +" Параметры:\n" +" -n\tпредотвращает обычное изменение каталога при удалении\n" +" \tкаталогов из стека, чтобы действия выполнялись только над стеком.\n" +" \n" +" Аргументы:\n" +" +N\tудаляет N-ю слева запись в списке каталогов,\n" +" \tпоказанного командой «dirs», начиная с нуля. Например, «popd +0»\n" +" \tудаляет первый каталог, а «popd +1» — второй каталог.\n" +" \n" +" -N\tудаляет N-ю справа запись в списке каталогов,\n" +" \tпоказанного командой «dirs», начиная с нуля. Например, «popd -0»\n" +" \tудаляет последний каталог, а «popd -1» — предпоследний каталог.\n" +" \n" +" Встроенная команда dirs показывает стек каталогов." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: недопустимое указание тайм-аута" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "ошибка чтения: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "возврат можно выполнить только из функции или исходного скрипта" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "нельзя одновременно сбросить функцию и переменную" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: это не переменная массива" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: это не функция" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: не удаётся экспортировать" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "счётчик смещений" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "нельзя одновременно задать и сбросить параметры командного процессора" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: недопустимое название параметра командного процессора" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "требуется аргумент с именем файла" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: файл не найден" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "не удаётся приостановить" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "не удаётся приостановить командный процессор login" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s — это псевдонимом для «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s — это ключевое слово командного процессора\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s — это функция\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s — это специальная встроенная команда bash\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s — это встроенная команда bash\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s является %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "для %s вычислен хэш (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: недопустимый аргумент ограничения" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "«%c»: недопустимая команда" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: не удаётся получить ограничение: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "ограничение" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: не удаётся изменить ограничение: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "восьмеричное число" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "«%c»: недопустимый оператор символьного режима" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "«%c»: недопустимый знак символьного режима" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " строка " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "последняя команда: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Прерывание..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "ИНФО: " + +#: error.c:462 +msgid "unknown command error" +msgstr "неизвестная ошибка команды" + +#: error.c:463 +msgid "bad command type" +msgstr "неверный тип команды" + +#: error.c:464 +msgid "bad connector" +msgstr "неверный соединитель" + +#: error.c:465 +msgid "bad jump" +msgstr "ошибка перехода" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: не заданы границы переменной" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aпревышено время ожидания ввода: auto-logout\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "не удаётся перенаправить стандартный ввод из /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: «%c»: недопустимый символ форматирования" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] всё ещё существует" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "ошибка конвейера" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: достигнут максимальный уровень вложенности eval (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: достигнут максимальный уровень вложенности source (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: достигнут максимальный уровень вложенности функций (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "" +"%s: ограниченный режим: в названиях команд нельзя использовать косую черту " +"«/»" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: команда не найдена" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: неверный интерпретатор" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: не удаётся запустить бинарный файл: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "«%s»: это специальная встроенная команда" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "не удаётся скопировать файловый дескриптор %d в %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "слишком много вложенных выражений" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "отрицательное переполнение стека вложенных выражений" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "синтаксическая ошибка в выражении" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "значение можно присвоить только переменной" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "синтаксическая ошибка в выражении" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "деление на 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "ошибка: недопустимый маркер присвоения выражения" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "в условном выражении должен быть символ «:»" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "экспонента меньше нуля" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" +"после предварительного инкремента или декремента ожидается идентификатор " + +#: expr.c:1056 +msgid "missing `)'" +msgstr "отсутствует символ «)»" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "синтаксическая ошибка: ожидается операнд" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "ошибка синтаксиса: недопустимый математический оператор" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (неверный маркер «%s»)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "недопустимое математическое основание" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: недопустимое число строк" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "слишком большое значение для основания" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: ошибка выражения\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: нет доступа к родительским каталогам" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "не удаётся сбросить режим nodelay для файлового дескриптора %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"не удаётся выделить новый дескриптор для входных данных bash из файлового " +"дескриптора %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: у нового файлового дескриптора %d уже есть буфер" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "идентификатор дочернего процесса %d принадлежит запущенному заданию %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "удаление остановленного задания %d с группой процесса %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "" +"add_process: процесс с идентификатором %5ld (%s) помечен как всё ещё активный" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: нет процесса с таким идентификатором" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Сигнал %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Завершён" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Остановлен" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Остановлен (%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Запущен" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Завершён (%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Выход %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Состояние неизвестно" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(стек памяти сброшен на диск) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (рабочий каталог: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "дочерний setpgid (%ld к %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "" +"wait: процесс %ld не является дочерним процессом этого командного процессора" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: нет записей процесса %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: задание %d остановлено" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: нет такого задания" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: выполнение задания прервано" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: задание %d уже выполняется в фоновом режиме" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" +"waitchld: включается WNOHANG, чтобы предотвратить появление неопределённого " +"блока" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: строка %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (стек памяти сброшен на диск)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(рабочий каталог: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: ошибка вызова getpgrp " + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: дисциплина строки" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: дисциплина строки" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "не удаётся задать группу процесса терминала (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "этот командный процессор не может управлять заданиями" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: ошибка утверждения: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\\r\n" +"malloc: %s:%d: утверждение не удалось\\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "неизвестно" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: блок в списке свободных затёрт" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: вызван с аргументом уже освобождённого блока" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: вызван с аргументом невыделенного блока" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" +"free: обнаружено отрицательное переполнение; mh_nbytes байт за пределами " +"диапазона" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "" +"free: обнаружено отрицательное переполнение; mh_nbytes байт за пределами " +"диапазона" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: размеры начального и конечного блока отличаются" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: вызван с аргументом невыделенного блока" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" +"realloc: обнаружено отрицательное переполнение; mh_nbytes байт за пределами " +"диапазона" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" +"realloc: обнаружено отрицательное переполнение; mh_nbytes байт за пределами " +"диапазона" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: размеры начального и конечного блока отличаются" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: таблица выделения заполнена записями FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p уже есть в таблице как выделенный?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p уже есть в таблице как свободный?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "недопустимое основание" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: узел неизвестен" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: недопустимая служба" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: недопустимое указание сетевого пути" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "сетевые операции не поддерживаются" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: не удаётся изменить язык (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: не удаётся изменить язык (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: не удаётся изменить язык (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: не удаётся изменить язык (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Для вас есть почта в $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Для вас есть почта в $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Сообщения в %s были прочитаны\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "синтаксическая ошибка: требуется математическое выражение" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "синтаксическая ошибка: ожидается «;»" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "синтаксическая ошибка: «((%s))»" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: недопустимый тип инструкции %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"блок here-document в строке %d разделён знаком конца файла (ожидался «%s»)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection: инструкция перенаправления «%d» вышла за пределы диапазона" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) превысил SIZE_MAX (%lu): строка " +"обрезана" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "достигнуто максимальное число переменных here-document" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "неожиданный конец файла во время поиска «%c»" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "неожиданный конец файла во время поиска «]]»" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "синтаксическая ошибка в условном выражении: неожиданный маркер «%s»" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "синтаксическая ошибка в условном выражении" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "неожиданный маркер «%s», ожидался «)»" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "ожидается символ «)»" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "неожиданный аргумент «%s» для условного унарного оператора" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "неожиданный аргумент для условного унарного оператора" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "неожиданный маркер «%s», ожидается условный бинарный оператор" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "ожидается условный бинарный оператор" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "неожиданный аргумент «%s» для условного бинарного оператора" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "неожиданный аргумент для условного бинарного оператора" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "неожиданный маркер «%c» в условной команде" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "неожиданный маркер «%s» в условной команде" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "неожиданный маркер %d в условной команде" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "синтаксическая ошибка рядом с неожиданным маркером «%s»" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "синтаксическая ошибка рядом с «%s»" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "синтаксическая ошибка: неожиданный конец файла" + +#: parse.y:6365 +msgid "syntax error" +msgstr "синтаксическая ошибка" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Для выхода из командного процессора используйте «%s».\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "неожиданный конец файла во время поиска «)»" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: функция «%s» не найдена" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: возможен бесконечный цикл повторов" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: неверный соединитель «%d»" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: недопустимый идентификатор файла" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: пустой указатель на файл" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: «%c»: недопустимый символ форматирования" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "файловый дескриптор за пределами диапазона" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: неоднозначное перенаправление" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: не удаётся перезаписать существующий файл" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ограниченный режим: не удаётся перенаправить вывод" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "не удаётся создать временный файл для блока here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: не удаётся присвоить файловый дескриптор переменной" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port не поддерживается без сети" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "ошибка перенаправления: не удаётся создать копию файлового дескриптора" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "не удалось найти /tmp; создайте этот каталог" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp должен быть допустимым названием каталога" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: недопустимый параметр" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "не удаётся установить UID %d: эффективный UID %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "не удаётся установить GID %d: эффективный GID %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "не удаётся запустить отладчик: режим отладки отключён" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: это каталог" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Не удаётся определить название" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, версия %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Использование:\t%s [длинные параметры GNU] [параметры] ...\n" +"\t\t%s [длинные параметры GNU] [параметры] файл_скрипта ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Длинные параметры GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Параметры командного процессора:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" +"\t-irsD или -c команда или -O короткие_параметры\t\t(только при запуске)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s или -o параметр\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Для получения дополнительных сведений о параметрах командного процессора " +"введите «%s -c \"help set\"».\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Для получения дополнительных сведений о встроенных командах введите «%s -c " +"help».\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Для отправки сообщений об ошибках используйте команду «bashbug».\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Домашняя страница bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Общая справка по использованию программ GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: недопустимая операция" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Фиктивный сигнал" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Отбой" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Прерывание" + +#: siglist.c:58 +msgid "Quit" +msgstr "Выход" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Недопустимая инструкция" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Трасса/ловушка BPT" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Инструкция ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Инструкция EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Исключение при обработке чисел с плавающей точкой" + +#: siglist.c:86 +msgid "Killed" +msgstr "Убит" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Ошибка шины" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Ошибка сегментации" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Неверный системный вызов" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Конвейер не работает" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Сигнал часов" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Прерван" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Срочное событие ввода/вывода" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Остановлен (сигналом)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Продолжение" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Смерть или остановка дочернего процесса" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Остановлен (ввод с tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Остановлен (вывод на tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "Готов к вводу/выводу" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Ограничение ЦП" + +#: siglist.c:154 +msgid "File limit" +msgstr "Ограничение величины файла" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Сигнал часов (виртуальный)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Сигнал часов (профиль)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Окно изменено" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Запись блокирована" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Сигнал пользователя 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Сигнал пользователя 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Ожидание входных данных HFT" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "неизбежна ошибка питания" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "неизбежно падение системы" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "процесс переносится на другой ЦП" + +#: siglist.c:198 +msgid "programming error" +msgstr "программная ошибка" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Установлен режим монитора HFT" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Выход из режима монитора HFT" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "Последовательность звуков HFT завершена" + +#: siglist.c:214 +msgid "Information request" +msgstr "Информационный запрос" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Неизвестный номер сигнала %d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "неверная подстановка: нет закрывающей «%s» в %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: не удаётся присвоить список элементу массива" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "не удаётся создать конвейер для подстановки процесса" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "не удаётся создать дочерний процесс для подстановки" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "не удаётся открыть именованный конвейер %s для чтения" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "не удаётся открыть именованный конвейер %s для записи" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "" +"не удаётся скопировать именованный конвейер %s в файловый дескриптор %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "подстановка команды: во входных данных проигнорирован нулевой байт" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "не удаётся создать конвейер для подстановки команды" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "не удаётся создать дочерний процесс для подстановки команды" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" +"command_substitute: не удаётся скопировать конвейер в файловый дескриптор 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: недопустимое название переменной для ссылки на имя" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: недопустимое непрямое раскрытие" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: недопустимое имя переменной" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: параметр не задан или пустой" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: параметр не задан или пустой" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: заданное подстрокой выражение меньше нуля" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: недопустимая подстановка" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: такое присвоение невозможно" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"в будущих версиях командный процессор оценка будет выполняться как " +"математическая подстановка" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "неверная подстановка: нет закрывающей «`» в %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "нет совпадений: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "ожидается аргумент" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: ожидается целочисленное выражение" + +#: test.c:265 +msgid "`)' expected" +msgstr "ожидается символ «)»" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "ожидается символ «)», обнаружено %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: ожидается бинарный оператор" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: ожидается унарный оператор" + +#: test.c:881 +msgid "missing `]'" +msgstr "отсутствует символ «]»" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "синтаксическая ошибка: ожидается «;»" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "недопустимый номер сигнала" + +#: trap.c:325 +#, fuzzy, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: достигнут максимальный уровень вложенности eval (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: неверное значение в trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: обработчик сигнала — SIG_DFL; повторная отправка %d (%s) " +"самому себе" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: неверный сигнал %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "ошибка импорта определения функции для «%s»" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "слишком высокий уровень командного процессора (%d); сбрасывается до 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: в текущей области отсутствует контекст функции" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: переменной не может быть присвоено значение" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: целое числе присваивается ссылке на имя" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: в текущей области отсутствует контекст функции" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s имеет пустую exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "недопустимый символ %d в exportstr для %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "отсутствует «=» в exportstr для %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: заголовок shell_variables не является контекстом функции" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: отсутствует контекст global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: заголовок shell_variables не является областью временного " +"окружения" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: не удаётся открыть как ФАЙЛ" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: недопустимое значение для дескриптора файла трассировки" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: значение совместимости за пределами диапазона" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "© Free Software Foundation, Inc, 2012." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Лицензия GPLv3+: GNU GPL версии 3 или более поздней \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, версия %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Это свободное программное обеспечение. Вы можете изменять и распространять " +"его." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "НИКАКАЯ ГАРАНТИЯ не предоставляется в пределах, допускаемых законом." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: не удаётся выделить %lu байт (выделено %lu байт)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: не удаётся выделить %lu байт" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: не удаётся выделить %lu байт (выделено %lu байт)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: не удаётся выделить %lu байт" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [имя[=значение] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] имя [имя ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPSVX] [-m раскладка] [-f файл] [-q имя] [-u name] [-r " +"послед_клавиш] [-x послед_клавиш:команда_shell] [послед_клавиш:фнкц_readline " +"или команда_readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [встр_команда [аргумент ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [выражение]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [каталог]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] команда [аргумент ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [имя[=значение] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] имя[=значение] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [параметр] имя[=значение] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [аргумент ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [аргумент ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f файл] [имя ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [аргумент ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts строка_параметров имя [аргумент]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a имя] [команда] [аргументы ...]] [перенаправление ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e редактор] [-lnr] [первая] [последняя] или fc -s [шаблон=замена] " +"[команда]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [задание]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [задание ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p путь] [-dt] [имя ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [шаблон ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d смещение] [n] или history -anrw [файл] или history -ps " +"аргумент [аргумент...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [задание ...] или jobs -x команда [аргументы]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [задание ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s назв_сигнала | -n номер_сигнала | -назв_сигнала] ид_процесса | " +"назв_задания] ... или kill -l [назв_сигнала]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let аргумент [аргумент ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a массив] [-d разделитель] [-i текст] [-n число_символов] [-N " +"число_символов] [-p приглашение] [-t тайм-аут] [-u fd] [имя ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o параметр] [--] [аргумент ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [имя ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [имя[=значение ...] или export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [имя[=значение] ...] или readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source файл [аргументы]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". файл [аргументы]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [выражение]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ аргумент... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[аргумент] сигнал ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] имя [имя ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [ограничение]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [режим]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [идентификатор ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [идентификатор ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for ИМЯ [in СЛОВА... ;] do КОМАНДЫ; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( выраж1; выраж2; выраж3 )); do КОМАНДЫ; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select ИМЯ [in СЛОВА ... ;] do КОМАНДЫ; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] конвейер" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case СЛОВО in [ШАБЛОН [| ШАБЛОН]...) КОМАНДЫ ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if КОМАНДЫ; then КОМАНДЫ; [ elif КОМАНДЫ; then КОМАНДЫ; ]... [ else " +"КОМАНДЫ; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while КОМАНДЫ; do КОМАНДЫ; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until КОМАНДЫ; do КОМАНДЫ; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [ИМЯ] команда [перенаправления]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function ИМЯ { КОМАНДЫ ; } или ИМЯ () { КОМАНДЫ ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ КОМАНДЫ ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "задание [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( выражение ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ выражение ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "" +"переменные — имена и значения некоторых переменных командного процессора" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | каталог]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [параметр ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v переменная] формат [аргументы]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o параметр] [-A действие] [-G " +"глоб_шаблон] [-W список_слов] [-F функция] [-C команда] [-X фильтр_шабл] [-" +"P префикс] [-S суффикс] [имя ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o параметр] [-A действие] [-G глоб_шабл] [-W " +"список_слов] [-F функция] [-C команда] [-X фильтр_шабл] [-P префикс] [-S " +"суффикс] [слово]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o параметр] [-DE] [имя ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d разделитель] [-n число] [-O начало] [-s число] [-t] [-u fd] [-C " +"callback] [-c quantum] [массив]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n число] [-O начало] [-s число] [-t] [-u fd] [-C callback] [-c " +"quantum] [массив]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Определение или отображение псевдонимов.\n" +" \n" +" Если не указать аргументы, alias выводит список псевдонимов\n" +" в виде «alias имя=значение» на стандартный вывод.\n" +" \n" +" В противном случае каждому имени, для которого указано значение,\n" +" назначается псевдоним. Если значение в конце содержит пробел,\n" +" следующее слово будет проверяться на замену псевдонима при его\n" +" развёртывании.\n" +" \n" +" Параметры:\n" +" -p\tвыводит все определённые псевдонимы\n" +" \n" +" Состояние выхода:\n" +" alias возвращает истину, если для указанного имени был задан\n" +" псевдоним." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Удаляет все имена из списка определённых псевдонимов.\n" +" \n" +" Параметры:\n" +" -a\tудаляет все псевдонимы\n" +" \n" +" Возвращает успех, если имя связано с существующим псевдонимом." + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Определение привязок клавиш и переменных readline.\n" +" \n" +" Привязывает последовательность клавиш функции readline или макросу\n" +" или задаёт переменную readline. Синтаксис аргументов без параметров " +"аналогичен\n" +" синтаксису файла ~/.inputrc, но всё должно передаваться в одном " +"аргументе,\n" +" например bind '\"\\C-x\\C-r\": перечитать-init-файл'.\n" +" \n" +" Параметры:\n" +" -m раскладка использовать указанную раскладку во время " +"выполнения\n" +" данной команды. Допустимые раскладки: emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command и vi-insert.\n" +" -l вывести названия функций\n" +" -P вывести названия функций и их привязки\n" +" -p вывести функции и их привязки в формате\n" +" для повторного использования\n" +" -S вывести список последовательностей клавиш, которые\n" +" вызывают макросы, и их значения\n" +" -s вывести список последовательностей клавиш, которые\n" +" вызывают макросы, и их значения\n" +" в формате для повторного использования\n" +" -V вывести названия переменных и их значения\n" +" -v вывести имена переменных и их значения\n" +" в формате для повторного использования\n" +" -q имя_функции\t вывести клавиши, вызывающие указанную функцию\n" +" -u имя_функции отвязать все клавиши, привязанные к указанной " +"функции\n" +" -r посл-клавиш удалить привязку для последовательности клавиш\n" +" -f файл прочитать привязки из файла\n" +" -x посл-клавиш:кмнд-shell выполнить команду bash, если введена\n" +" \t\t\t\tпоследовательность клавиш\n" +" -X\t\t вывести последовательности клавиш, привязанные с помощью -" +"x, и связанные команды\n" +" в формате для повторного использования\n" +" \n" +" Состояние выхода:\n" +" bind возвращает 0, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Прерывание цикла for, while или until.\n" +" \n" +" Прерывает цикл for, while или until. Если указано N, прерывает N " +"вложенных\n" +" циклов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если N не больше или равно 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Возобновление цикла for, while или until.\n" +" \n" +" Возобновляет следующую итерацию вложенного цикла for, while или until.\n" +" Если указано N, возобновляет N-й вложенный цикл.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если N не больше или равно 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Выполнение встроенных команд.\n" +" \n" +" Выполняет встроенную команду bash с аргументами\n" +" без поиска команды. Это полезно, если нужно переопределить встроенную " +"команду\n" +" как функцию командного процессора, в этой функции нужно выполнить " +"встроенную команду.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние выхода встроенной команды или ложь, если указанная " +"команда bash\n" +" не является встроенной." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Возвращает контекст вызова текущей подпрограммы.\n" +" \n" +" Если выражение не указано, возвращает «$line $filename». Если выражение " +"указано, возвращает\n" +" «$line $subroutine $filename». Эти дополнительные данные можно\n" +" использовать для трассировки стека.\n" +" \n" +" Значение выражения означает количество кадров, которое нужно вызвать\n" +" для возврата к текущему кадру. Первый кадр имеет номер 0.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если командный процессор не выполняет функцию, или " +"выражение\n" +" является допустимым." + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Смена рабочего каталога командного процессора.\n" +" \n" +" Изменяет текущий каталог на указанный каталог. Каталог по умолчанию " +"хранится в\n" +" переменной $HOME командного процессора.\n" +" \n" +" Переменная $CDPATH определяет путь поиска каталога, содержащего\n" +" указанный каталог. Альтернативные каталоги в $CDPATH разделяются " +"двоеточием (:).\n" +" Пустое название каталога соответствует текущему каталогу. Если каталог " +"начинается\n" +" с косой черты (/), переменная $CDPATH не используется.\n" +" \n" +" Если каталог не найден и задан параметр «cdable_vars»,\n" +" слово считается названием переменной. Если эта переменная содержит " +"значение,\n" +" оно используется для каталога.\n" +" \n" +" Параметры:\n" +" -L\tпереходить по символьным ссылкам: ссылки раскрываются \n" +" \tв каталоге после обработки экземпляров «..»\n" +" -P\tиспользовать физическую структуру каталогов без перехода\n" +" \tпо символьным ссылкам: ссылки раскрываются в каталоге до\n" +" \tобработки «..»\n" +" -e\tесли указан параметр -P, и не удаётся определить текущий\n" +" \tрабочий каталог, команда завершается с ненулевым состоянием\n" +" -@ на системах, которые это поддерживают, представляет файл с " +"расширенными\n" +" атрибутами как каталог, содержащий атрибуты файла\n" +" \n" +" По умолчанию выполняется переход по символьным ссылкам (как при указании " +"параметра «-L»).\n" +" «..» обрабатывается путём удаления первого компонента пути до косой " +"черты\n" +" или из начала каталога.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если каталог был изменён, и если $PWD был успешно " +"установлен\n" +" при использовании параметра -P. В противном случае возвращается " +"ненулевое состояние." + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Вывод названия текущего рабочего каталога.\n" +" \n" +" Параметры:\n" +" -L\tпоказать значение $PWD, если переменная указывает на\n" +" \tтекущий рабочий каталог\n" +" -P\tпоказать название физического каталога без символьных ссылок\n" +" \n" +" По умолчанию pwd работает, как если бы «-L» не был указан.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если был указан допустимый параметр или можно прочитать\n" +" текущий каталог." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Пустая команда.\n" +" \n" +" Команда не выполняет никаких действий и ни на что не влияет.\n" +" \n" +" Состояние выхода:\n" +" Всегда возвращает успех." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Возвращает результат успешного выполнения.\n" +" \n" +" Состояние выхода:\n" +" Всегда возвращает успех." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Возвращает результат неудачного выполнения.\n" +" \n" +" Состояние выхода:\n" +" Всегда возвращает ошибку." + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Выполнение простой команды или вывод информации о командах.\n" +" \n" +" Выполняет команду с аргументами без поиска функции командного " +"процессора\n" +" или выводит информацию об указанных командах. Можно использовать для " +"вызова команд\n" +" с диска, когда функция с таким именем уже существует.\n" +" \n" +" Параметры:\n" +" -p\tиспользовать значение по умолчанию для $PATH, чтобы " +"гарантированно\n" +" \tнайти все стандартные команды\n" +" -v\tвывести описание команды аналогично встроенной команде «type»\n" +" -V\tвывести более подробное описание каждой команды\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние выхода КОМАНДЫ или ошибку, если КОМАНДА не найдена." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Указание значений переменных и атрибутов.\n" +" \n" +" Объявление переменных и назначение им атрибутов. Если имена не " +"указаны,\n" +" выводит атрибуты и значения всех переменных.\n" +" \n" +" Параметры:\n" +" -f\tограничить действие или вывести имена функций и их определения\n" +" -F\tвывести только имена функций (а также номер строки\n" +" \tв исходном файле при отладке)\n" +" -g\tсоздать глобальные переменные при использовании в функции " +"командного процессора; в противном случае\n" +" \tигнорируется\n" +" -p\tвывести атрибуты и значения каждого имени\n" +" \n" +" Параметры, задающие атрибуты:\n" +" -a\tсделать имена индексированными массивами (если поддерживается)\n" +" -A\tсделать имена ассоциативными массивами (если поддерживается)\n" +" -i\tназначить именам атрибут «integer»\n" +" -l\tперевести имена в нижний регистр при назначении\n" +" -n\tсделать имя ссылкой на переменную с именем, соответствующим её " +"значению\n" +" -r\tотключить запись в имена\n" +" -t\tназначить именам атрибут «trace»\n" +" -l\tперевести имена в верхний регистр при назначении\n" +" -x\tэкспортировать имена\n" +" \n" +" Знак «+» вместо «-» отключает указанный атрибут.\n" +" \n" +" Переменные с атрибутом «integer» содержат математическое выражение (см.\n" +" команду «let»), которое рассчитывается при назначении значения " +"переменной.\n" +" \n" +" При использовании в функции «declare» делает имена локальными как при " +"использовании\n" +" данной команды. Параметр «-g» отключает это поведение.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла\n" +" ошибка присвоения." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Указание значений переменных и атрибутов.\n" +" \n" +" Устарел. См. «help declare»." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Определение локальных переменных.\n" +" \n" +" Создаёт локальную переменную с указанным именем и присваивает ей " +"указанное значение. Параметром может быть\n" +" любой параметр, принимаемый командой «declare».\n" +" \n" +" Локальные переменные можно использовать только внутри функции. Они " +"видны\n" +" только той функции, в которой они определены, и её дочерним функциям.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр, не возникла\n" +" ошибка присвоения переменной или командный процессор не выполняет " +"функцию." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Вывод аргументов на стандартный вывод.\n" +" \n" +" Выводит аргументы, разделённые пробелом, добавляя в конце символ новой " +"строки,\n" +" на стандартный вывод.\n" +" \n" +" Параметры:\n" +" -n\tне добавлять символ новой строки\n" +" -e\tвключить интерпретацию символов, экранированных обратной косой " +"чертой\n" +" -E\tявно отключить интерпретацию символов, экранированных обратной " +"косой чертой\n" +" \n" +" echo интерпретирует следующие символы, экранированные обратной косой " +"чертой:\n" +" \\a\tоповещение (звуковой сигнал)\n" +" \\b\tbackspace\n" +" \\c\tотключение дальнейшего вывода\n" +" \\e\tсимвол escape\n" +" \\E\tсимвол escape\n" +" \\f\tпрогон страницы\n" +" \\n\tновая строка\n" +" \\r\tвозврат каретки\n" +" \\t\tгоризонтальная табуляция\n" +" \\v\tвертикальная табуляция\n" +" \\\\\tобратная косая черта\n" +" \\0nnn\tсимвол с ASCII-кодом NNN (восьмеричным) NNN может быть " +"длиной\n" +" \tот 0 до 3 восьмеричных цифр\n" +" \\xHH\tвосьмиразрядный символ, значение которого — HH " +"(шестнадцатеричное) HH\n" +" \tможет быть одной или двумя шестнадцатеричными цифрами\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если не произошла ошибка записи." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Вывод аргументов на стандартный вывод.\n" +" \n" +" Выводит аргументы на стандартный вывод, добавляя в конце символ новой " +"строки.\n" +" \n" +" Параметры:\n" +" -n\tне добавлять символ новой строки\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если не произошла ошибка записи." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Включение и отключение встроенных команд командного процессора.\n" +" \n" +" Включает и отключает команды, встроенные в командный процессор. " +"Отключение позволит\n" +" выполнить команду с диска, название которой совпадает с названием " +"встроенной команды,\n" +" без указания полного пути к ней.\n" +" \n" +" Параметры:\n" +" -a\tпоказать список встроенных команд и их состояние\n" +" -n\tотключить все указанные имена или вывести список отключённых " +"команд\n" +" -p\tпоказать список встроенных команд\n" +" -s\tпоказать только названия встроенных команд «special» Posix\n" +" \n" +" Параметры, управляющие динамической загрузкой:\n" +" -f\tзагрузить встроенную указанную команду из указанного файла\n" +" -d\tудалить встроенную функцию, загруженную с параметром -f\n" +" \n" +" Без указания параметров включаются все указанные команды.\n" +" \n" +" Чтобы использовать команду «test», найденную в переменной $PATH,\n" +" а не встроенную в командный процессор, введите «enable -n test».\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если указанное имя не является встроенной командой или " +"не произошла ошибка." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Выполнение аргументов как команды командного процессора.\n" +" \n" +" Объединяет аргументы в одну строку, результат передаётся\n" +" в командный процессор с выполнением полученных команд.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние выхода команды или успех, если команда пустая." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Анализ аргументов параметра.\n" +" \n" +" getopts используется процедурами командного процессора для анализа\n" +" позиционных параметров.\n" +" \n" +" «строка_параметров» содержит буквы распознаваемых параметров. Если " +"после\n" +" буквы идёт двоеточие, считается, что у параметра есть аргумент,\n" +" который должен быть отделён пробелом.\n" +" \n" +" При каждом своём вызове getopts поместит следующий параметр в " +"переменную\n" +" $имя, проинициализировав это имя, если оно не существует,\n" +" и проиндексирует следующий обрабатываемый аргумент в переменной\n" +" $OPTIND. Переменная $OPTIND инициализируется при каждом вызове\n" +" командного процессора или скрипта. Когда для параметра нужен аргумент,\n" +" getopts помещает этот аргумент в переменную $OPTARG.\n" +" \n" +" getopts сообщает об ошибках двумя способами. Если первый символ\n" +" в «строке_параметров» является двоеточием, getopts включает режим " +"молчания. В этом\n" +" режиме сообщения об ошибках не выводятся. Если указан неверный\n" +" параметр, getopts помещает символ параметра в переменную $OPTARG. Если\n" +" обязательный аргумент не найден, getopts помещает «:» в «имя»\n" +" и задаёт для $OPTARG символ найденного параметра. Если getopts не в " +"режиме\n" +" молчания, и был указан неверный параметр, getopts помещает «?»\n" +" в НАЗВАНИЕ и удаляет переменную OPTARG. Если обязательный аргумент не " +"найден, в НАЗВАНИЕ\n" +" помещается «?», переменная OPTARG удаляется и выводится диагностическое\n" +" сообщение.\n" +" \n" +" Если переменная OPTERR имеет значение 0, getopts отключает\n" +" вывод сообщений об ошибках, даже если первый символ переменной\n" +" OPTSTRING не является двоеточием. По умолчанию переменная OPTERR имеет " +"значение 1.\n" +" \n" +" Getopts обычно анализирует позиционные параметры ($0–$9), но если\n" +" задано больше аргументов, анализируются последние.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если найден параметр. Возвращает ошибку, если " +"достигнут\n" +" конец параметров или возникла ошибка." + +#: builtins.c:694 +#, fuzzy +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Замена командного процессора указанной командой.\n" +" \n" +" Выполняет команду, заменяя текущий командный процессор указанной " +"программой.\n" +" Указанные аргументы становятся аргументами для команды. Если команда не " +"указана,\n" +" все перенаправления будет выполняться в текущем командном процессоре.\n" +" \n" +" Параметры:\n" +" -a имя\t\tпередать имя как нулевой аргумент в команду\n" +" -c\t\tвыполнить команду с пустым окружением\n" +" -l\t\tпоместить тире в нулевой аргумент для команды\n" +" \n" +" Если команду не удаётся выполнить, неинтерактивный командный процессор\n" +" закроется (если только на задан «execfail»).\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если команда не была найдена или не возникла ошибка " +"перенаправления." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Выход из командного процессора.\n" +" \n" +" Закрывает командный процессор с состоянием N. Если N не указан,\n" +" состоянием выхода будет состояние последней выполненной команды." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Выход из командного процессора login.\n" +" \n" +" Закрывает командный процессор login с состоянием выхода N. Возвращает\n" +" ошибку, если выполняется не в командном процессоре login." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Отображение или выполнение команд из журнала.\n" +" \n" +" fc выводит список команд из журнала или позволяет изменить и повторно " +"выполнить их.\n" +" Аргументы «первая» и «последняя» могут быть числами, определяющими " +"диапазон.\n" +" Аргумент «первая» также может быть строкой, которая означает\n" +" последнюю команду, начинающуюся с этой строки.\n" +" \n" +" Параметры:\n" +" -e редактор\tуказать редактор По умолчанию используется $FCEDIT, \n" +" \t\tзатем следует $EDITOR, а затем — vi\n" +" -l \tпоказать строки вместо редактирования\n" +" -n\tне показывать номера строк в списке\n" +" -r\tинвертировать порядок строк (новые в начале)\n" +" \n" +" При запуске в формате «fc -s [шаблон=замена ...] [команда]» команда\n" +" выполняется повторно после замены старая=новая.\n" +" \n" +" Полезный псевдоним для команды — r='fc -s'. Так если ввести «r cc»,\n" +" будет выполнена последняя команда, начинающаяся с «cc», а если ввести " +"«r»,\n" +" будет выполнена последняя команда.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех или состояние выполненной команды. В случае ошибки " +"возвращает ненулевое состояние." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Перевод задания в интерактивный режим.\n" +" \n" +" Переводит указанное задание в интерактивный режим, делая\n" +" его текущим заданием. Если задание не указано, используется\n" +" текущее задание.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние команды, переведённой в интерактивный режим, или " +"ошибку, если возникла ошибка." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Перевод заданий в фоновый режим.\n" +" \n" +" Переводит указанные задания в фоновый режим, как если бы\n" +" они были запущены с «&». Если задание не указано, используются данные\n" +" текущего задания.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если не включено управление заданиями или не произошла " +"ошибка." + +#: builtins.c:793 +#, fuzzy +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Запоминание или отображение местоположений программ.\n" +" \n" +" Определяет и запоминает полный путь для всех указанных команд. Если\n" +" аргументы не указаны, выводит информацию о запомненных командах.\n" +" \n" +" Параметры:\n" +" -d\t\tзабыть запомненные местоположения всех указанных команд\n" +" -l\t\tотобразить данные в формате для повторного использования\n" +" -p путь\t\tиспользовать указанный путь как полный путь к команде\n" +" -r\t\tзабыть все запомненные местоположения\n" +" -t\t\tвывести запомненные местоположение всех команд,\n" +" \t\tуказав перед каждым из них соответствующее имя команды,\n" +" \t\tесли указано несколько команд.\n" +" Аргументы:\n" +" ИМЯ\t\tвсе команды ищутся в $PATH и добавляются в список\n" +" \t\tзапомненных команд.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если команда была найдена или был указан допустимый " +"параметр." + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Вывод информации о встроенных командах.\n" +" \n" +" Показывает краткую справку о встроенных командах. Если указан\n" +" шаблон, выводит подробную справку по всем командам, удовлетворяющим " +"шаблону.\n" +" В противном случае выводится список разделов справки.\n" +" \n" +" Параметры:\n" +" -d\tпоказать краткое описание каждого раздела\n" +" -m\tпоказать справку по использованию в формате man\n" +" -s\tпоказать только краткую справку по использованию для каждого\n" +" \tраздела, соответствующего шаблону\n" +" \n" +" Аргументы:\n" +" ШАБЛОН\tшаблон, определяющий раздел справки\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был найден шаблон или был указан допустимый " +"параметр." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Отображение или изменение журнала команд.\n" +" \n" +" Выводит журнал команд с номерами строк и звёздочками (*) перед всеми\n" +" изменёнными записями. С аргументом N показываются только последние N " +"записей.\n" +" \n" +" Параметры:\n" +" -c\tочистить журнал, удалив из него все записи\n" +" -d смещение\tудалить запись журнала по указанному смещению\n" +" \n" +" -a\tдобавить журнал текущего сеанса в файл журнала\n" +" -n\tпрочитать все записи, которые ещё не были прочитаны из файла " +"журнала\n" +" -r\tпрочитать файл журнала и добавить его содержимое\n" +" \tв журнал\n" +" -w\tзаписать текущий журнал в файл журнала\n" +" \tи добавить записи в журнал\n" +" \n" +" -p\tдобавить в журнал указанные аргументы и показать результат,\n" +" \tне сохраняя его в журнал\n" +" -s\tдобавить аргументы в журнал как одну запись\n" +" \n" +" Если указан файл, он используется как файл журнала. В противном случае\n" +" если $HISTFILE содержит значение, используется этот файл, иначе — файл " +"~/.bash_history.\n" +" \n" +" Если переменная $HISTTIMEFORMAT задана и не является пустой, её " +"значение\n" +" используется как строка форматирования для strftime(3) для вывода метки\n" +" времени для каждой показанной записи журнала. В противном случае метки " +"времени не будут показаны.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:879 +#, fuzzy +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Отображение состояния заданий.\n" +" \n" +" Выводит список активных заданий. Если указан номер задания, выводится " +"только это задание.\n" +" Если не указать параметры, будет показано состояние всех активных " +"заданий.\n" +" \n" +" Параметры:\n" +" -l\tпоказать идентификаторы процессов в дополнение к обычной " +"информации\n" +" -n\tпоказать только те процессы, у которых изменилось состояние\n" +" \tс момента после последнего уведомления\n" +" -p\tпоказать только идентификаторы процессов\n" +" -r\tпоказать только запущенные задания\n" +" -s\tпоказать только остановленные задания\n" +" \n" +" Если указан параметр -x, команда выполняется после замены всех номеров\n" +" заданий, указанных в аргументах, на идентификатор процесса\n" +" лидера группы процессов задания.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка.\n" +" Если указан параметр -x, возвращает состояние выхода команды." + +#: builtins.c:906 +#, fuzzy +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Удаление заданий в текущем командном процессоре.\n" +" \n" +" Удаляет все указанные задания из списка активных заданий. Если\n" +" задание не указано, удаляется текущее задание.\n" +" \n" +" Параметры:\n" +" -a\tудалить все задания, если не указано конкретное задание\n" +" -h\tпометить все задания, чтобы им не отправлялся сигнал SIGHUP,\n" +" \tесли командный процессор получает сигнал SIGHUP\n" +" -r\tудалить только активные задания\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или задание." + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Отправка сигнала заданию.\n" +" \n" +" Отправляет процессам или заданиям сигнал с указанным названием\n" +" или номером. Если номер или название сигнала\n" +" не указаны, отправляется сигнал SIGTERM.\n" +" \n" +" Параметры:\n" +" -s сигнал\tназвание сигнала\n" +" -n сигнал\tномер сигнала\n" +" -l\t\tпоказывает названия сигналов; если после аргументов указано «-" +"l»,\n" +" \tони считаются номерами сигналов, для которых необходимо показать " +"названия\n" +" \n" +" kill — это встроенная команда, предназначенная для двух задач: " +"использовать\n" +" номера заданий вместо номеров процессов и убивать процессы\n" +" при достижении предельного числа процессов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Расчёт математических выражений.\n" +" \n" +" Выполняет расчёт всех аргументов в математическом выражении. Расчёт " +"выполняется\n" +" для целых чисел фиксированной ширины с без проверки на переполнение.\n" +" Однако деление на 0 перехватывается и выдаётся ошибка. Указанные ниже " +"операторы объединены\n" +" в группы с одинаковым приоритетом. Группы перечислены\n" +" в порядке уменьшения приоритета.\n" +" \n" +" \tid++, id--\tпоследующее увеличение и уменьшение переменной\n" +" \t++id, --id\tпредварительное увеличение и уменьшение переменной\n" +" \t-, +\t\tунарный минус и плюс\n" +" \t!, ~\t\tлогическое и побитовое отрицание\n" +" \t**\t\tвозведение в степень\n" +" \t*, /, %\t\tумножение, деление, остаток\n" +" \t+, -\t\tсложение, вычитание\n" +" \t<<, >>\t\tбитовые сдвиги влево или вправо\n" +" \t<=, >=, <, >\tсравнение\n" +" \t==, !=\t\tравенство, неравенство\n" +" \t&\t\tпобитовое И\n" +" \t^\t\tпобитовое исключающее ИЛИ\n" +" \t|\t\tпобитовое ИЛИ\n" +" \t&&\t\tлогическое И\n" +" \t||\t\tлогические ИЛИ\n" +" \tвыражение ? выражение : выражение\n" +" \t\t\tусловный оператор\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tприсвоение\n" +" \n" +" в качестве операндов можно использовать переменные командного " +"процессора. Название переменной\n" +" заменяется её значением (приводится к целому числу фиксированной " +"ширины)\n" +" в выражении. У переменной не должен быть включён атрибут integer,\n" +" чтобы её можно было использовать в выражении.\n" +" \n" +" Операторы вычисляются в порядке старшинства. Вложенные выражения в\n" +" скобках вычисляются первыми и могут переопределить указанные\n" +" выше правила старшинства.\n" +" \n" +" Состояние выхода:\n" +" Если последний АРГУМЕНТ имеет значение 0, let возвращает 1. В противном " +"случае let возвращает 0." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Чтение строки со стандартного ввода и разделение её на поля.\n" +" \n" +" Читает одну строку со стандартного ввода или из файлового дескриптора,\n" +" если указан параметр -u. Строка разделяется на поля по словам.\n" +" Первое слово присваивается первому указанному имени, второе слово — " +"второму\n" +" имени и так далее.\n" +" Оставшиеся слова присваиваются последнему указанному имени. В качестве " +"разделителей слов используются только символы\n" +" из переменной $IFS.\n" +" \n" +" Если имена не указаны, прочитанная строка сохраняется в переменной " +"$REPLY.\n" +" \n" +" Параметры:\n" +" -a массив\tпоследовательно присвоить прочитанные слова указателям\n" +" \t\tмассива, начиная с нуля\n" +" -d разделитель\tпродолжить до первого разделителя,\n" +" \t\tа не до символа новой строки\n" +" -e\t\tс помощью readline получить строку в интерактивном командном " +"процессоре\n" +" -i текст\t\tиспользовать текст в качестве исходного для readline\n" +" -n число_знаков\tвыполнить возврат после прочтения числа знаков, а не " +"ждать\n" +" \t\tсимвола новой строки; учитывать разделитель, если до него было " +"прочитано\n" +" \t\tменьше указанного числа знаков\n" +" -N число_знаков\tвыполнить возврат только после прочтения указанного " +"числа знаков,\n" +" \t\tесли только не был получен конец строки или не истекло время " +"ожидания, игнорируя все разделители\n" +" -p приглашение\tпоказать приглашение без символа новой строки в конце\n" +" \t\tперед тем как читать\n" +" -r\t\tне выполнять экранирование символами косой черты\n" +" -s\t\tне показывать данные, полученные из терминала\n" +" -t тайм-аут\tпрекратить ожидание и вывести ошибку, если полная " +"входная\n" +" \t\tстрока не была прочитана за указанное число секунд В переменной " +"$TMOUT хранится\n" +" \t\tзначение тайм-аута по умолчанию. Время ожидания\n" +" \t\tможет быть дробным числом. Если тайм-аут равен 0, read немедленно " +"выполняет возврат,\n" +" \t\tне пытаясь прочитать никакие данные. Успех возвращается,\n" +" \t\tтолько если входные данные доступны по указанному файловому " +"дескриптору. \n" +" \t\tСостояние выхода больше 128, если время ожидания было превышено.\n" +" -u fd\t\tчитать из файлового дескриптора, а не со стандартного входа\n" +" \n" +" Состояние выхода:\n" +" Состояние выхода будет нулевым, если не был встречен конец файла, не " +"истекло время ожидания\n" +" (в этом случае состояние выхода будет больше 128), не возникла ошибка " +"присвоения переменной\n" +" или не был указан недопустимый файловый дескриптор как аргумент для -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Возврат из функции командного процессора.\n" +" \n" +" Выполняет выход из функции или исходного скрипта со значением возврата,\n" +" указанным как N. Если N не указан, используется состояние возврата\n" +" последней команды, выполненной в функции или скрипте.\n" +" \n" +" Состояние выхода:\n" +" Возвращает N или ошибку, если командный процессор не выполняет функцию " +"или скрипт." + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Присвоение или удаление значений параметров командного процессора и " +"позиционных параметров.\n" +" \n" +" Изменяет значение атрибутов командного процессора и позиционных " +"параметров или\n" +" выводит названия и значения переменных командного процессора.\n" +" \n" +" Параметры:\n" +" -a пометить переменные, которые были изменены или созданы для " +"экспорта\n" +" -b немедленно уведомить о завершении задания\n" +" -e немедленно выйти, если команда выполняет выход с ненулевым " +"состоянием\n" +" -f отключить генерацию имён файлов (подстановка)\n" +" -h запомнить расположение команд, как они выглядели ранее\n" +" -k поместить в окружение для команды все аргументы присвоения,\n" +" а не только те, что были указаны перед командой\n" +" -m включено управление заданиями\n" +" -n прочитать команды, но не выполнять их\n" +" -o название-параметра\n" +" Задаёт переменную, соответствующую названию параметра:\n" +" allexport эквивалент -a\n" +" braceexpand эквивалент -B\n" +" emacs использовать стиль emacs для редактирования " +"строк\n" +" errexit эквивалент -e\n" +" errtrace эквивалент -E\n" +" functrace эквивалент -T\n" +" hashall эквивалент -h\n" +" histexpand эквивалент -H\n" +" history включить журнал команд\n" +" ignoreeof не закрывать командный процессор после получения " +"конца файла\n" +" interactive-comments\n" +" разрешить показ комментариев в интерактивных " +"командах\n" +" keyword эквивалент -k\n" +" monitor эквивалент -m\n" +" noclobber эквивалент -C\n" +" noexec эквивалент -n\n" +" noglob эквивалент -f\n" +" nolog допускается, но игнорируется\n" +" notify эквивалент -b\n" +" nounset эквивалент -u\n" +" onecmd эквивалент -t\n" +" physical эквивалент -P\n" +" pipefail возвращаемое значение конвейера является " +"состоянием\n" +" последней команды, завершившейся с ненулевым " +"состоянием,\n" +" или нулём, если не было команды, завершившейся с " +"ненулевым состоянием\n" +" posix изменить поведение bash там, где операции\n" +" по умолчанию отличаются от стандарта Posix, " +"чтобы\n" +" соответствовать этому стандарту\n" +" privileged эквивалент -p\n" +" verbose эквивалент -v\n" +" vi использовать стиль vi для редактирования строк\n" +" xtrace эквивалент -x\n" +" -p Включён, когда реальный и эффективный идентификаторы пользователя " +"не совпадают.\n" +" Отключает обработку файла $ENV и импорт функций командного\n" +" процессора. Если отключить этот параметр, эффективные UID и GID\n" +" будут назначены реальным UID и GID.\n" +" -t Выйти после прочтения и выполнения одной команды.\n" +" -u Считать незаданные переменные ошибкой при замене.\n" +" -v Выводить входные строки на экран после их чтения.\n" +" -x Выводить команды и их аргументы во время их выполнения.\n" +" -B Командный процессор развернёт скобки.\n" +" -C Если задано, запретить перезапись существующих обычных файлов\n" +" вследствие перенаправления вывода.\n" +" -E Если задано, ловушка ERR наследуется функциями командного " +"процессора.\n" +" -H Включить замену журнала с использованием !. По умолчанию этот " +"флаг\n" +" установлен, если командный процессор интерактивный.\n" +" -P Если задано, не разрешать символьные ссылки при выполнении " +"команд,\n" +" таких как cd, которые изменяют текущий каталог.\n" +" -T Если задано, ловушка DEBUG наследуется функциями командного " +"процессора.\n" +" -- Назначить все оставшиеся аргументы позиционным параметрам.\n" +" Если аргументов не осталось, позиционные параметры\n" +" удаляются.\n" +" - Назначить все оставшиеся аргументы позиционным параметрам.\n" +" Параметры -x и -v выключены.\n" +" \n" +" Если вместо - указать +, флаги будут выключены. \n" +" Флаги также можно использовать до вызова командного процессора. " +"Текущий\n" +" набор флагов можно просмотреть в $-. Оставшиеся n аргументов являются " +"позиционными\n" +" параметрами и назначаются в порядке $1, $2, .. $n. Если\n" +" аргументы не указаны, выводятся все переменные командного процессора.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр." + +#: builtins.c:1139 +#, fuzzy +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Удаление значений и атрибутов переменных и функций командного процессора.\n" +" \n" +" Для каждого названия удаляет соответствующую переменную или функцию.\n" +" \n" +" Параметры:\n" +" -f\tсчитать каждое указанное имя функцией командного процессора\n" +" -v\tсчитать каждое указанное имя переменной командного процессора\n" +" -n\tсчитать каждое указанное имя ссылкой на название и удалить саму " +"переменную,\n" +" \tа не переменную, на которую указывает ссылка\n" +" \n" +" Если параметры не указаны, unset сначала пытается удалить переменную. " +"Если это не удаётся,\n" +" пытается удалить функцию.\n" +" \n" +" Некоторые переменные нельзя удалить. См. также «readonly».\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или указанное имя " +"доступно для записи." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Установка атрибута экспорта для переменных командного процессора.\n" +" \n" +" Помечает все имена для автоматического экспорта в среду для\n" +" последующих выполняемых команд. Если указано значение, оно " +"присваивается перед экспортом.\n" +" \n" +" Параметры:\n" +" -f\tиспользовать функции командного процессора\n" +" -n\tудалить свойство экспорта изо всех имён\n" +" -p\tвывести список всех экспортированных переменных и функций\n" +" \n" +" Аргумент «--» отключает дальнейшую обработку параметров.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или имя." + +#: builtins.c:1180 +#, fuzzy +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Запрет изменения переменных командного процессора.\n" +" \n" +" Делает каждое имя доступным только чтения. Значения этих имён нельзя\n" +" будет изменить в будущем. Если указано значение, присваивает это " +"значение\n" +" перед тем, как сделать его доступным только для чтения.\n" +" \n" +" Параметры:\n" +" -a\tссылаться на переменные индексированного массива\n" +" -A\tссылаться на переменные ассоциативного массива\n" +" -f\tиспользовать функции командного процессора\n" +" -p\tвывести список всех переменных или функций, доступных только для " +"чтения,\n" +" в зависимости от того, указан ли параметр -f\n" +" \n" +" Аргумент «--» отключает дальнейшую обработку параметров.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или имя." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Сдвиг позиционных параметров.\n" +" \n" +" Переименовывает позиционные параметры $N+1,$N+2,.. в $1,$2,..\n" +" Если N не указан, считается, что указано 1.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если N положительный или меньше $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Выполнение команд из файла в текущем командном процессоре.\n" +" \n" +" Читает и выполняет команды из указанного файла в текущем командном " +"процессоре. \n" +" Файла ищется в каталогах, указанных в переменной $PATH.\n" +" Если указаны аргументы, они становятся позиционными параметрами\n" +" при выполнении файла.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды из файла. Возвращает " +"ошибку,\n" +" если файл не удаётся прочитать." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Приостановка работы командного процессора.\n" +" \n" +" Приостанавливает работу текущего командного процессора до получения " +"сигнала SIGCONT.\n" +" Работу командных процессоров login можно приостановить только в " +"принудительном режиме.\n" +" \n" +" Параметры:\n" +" -f\tпринудительно приостановить работу, даже если командный " +"процессор — login\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если не включено управление заданиями или не произошла " +"ошибка." + +#: builtins.c:1261 +#, fuzzy +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Расчёт условного выражения.\n" +" \n" +" Возвращает состояние 0 (истина) или 1 (ложь) после\n" +" расчёта выражения. Выражения могут быть унарными или бинарными. " +"Унарные\n" +" выражения часто используются для определения состояния файла. Также\n" +" доступны стоковые операторы и операторы сравнения чисел.\n" +" \n" +" Поведение команды test зависит от количества аргументов. Полное\n" +" описание см. в странице руководства bash.\n" +" \n" +" Операторы работы с файлами:\n" +" \n" +" -a ФАЙЛ Истина, если файл существует.\n" +" -b ФАЙЛ Истина, если файл представляет блочное устройство.\n" +" -c ФАЙЛ Истина, если файл представляет символьное устройство.\n" +" -d ФАЙЛ Истина, если файл является каталогом.\n" +" -e ФАЙЛ Истина, если файл существует.\n" +" -f ФАЙЛ Истина, если файл существует и является обычным " +"файлом.\n" +" -g ФАЙЛ Истина, если для файла установлен бит SGID.\n" +" -h ФАЙЛ Истина, если файл является символьной ссылкой.\n" +" -L ФАЙЛ Истина, если файл является символьной ссылкой.\n" +" -k ФАЙЛ Истина, если для файла установлен sticky-бит.\n" +" -p ФАЙЛ Истина, если файл является именованным конвейером.\n" +" -r ФАЙЛ Истина, если вы можете прочитать файл.\n" +" -s ФАЙЛ Истина, если файл существует и не является пустым.\n" +" -S ФАЙЛ Истина, если файл является сокетом.\n" +" -t ФД Истина, если файловый дескриптор ФД открыт в " +"терминале.\n" +" -u ФАЙЛ Истина, если для файла установлен бит SUID.\n" +" -w ФАЙЛ Истина, если вы можете выполнить запись в файл.\n" +" -x ФАЙЛ Истина, если вы можете выполнить файл.\n" +" -O ФАЙЛ Истина, если вы являетесь эффективным владельцем " +"файла.\n" +" -G ФАЙЛ Истина, если ваша группа является эффективным " +"владельцем файла.\n" +" -N ФАЙЛ Истина, если файл был изменён после последнего чтения.\n" +" \n" +" ФАЙЛ1 -nt ФАЙЛ2 Истина, если файл1 новее файла2 (согласно\n" +" дате изменения).\n" +" \n" +" ФАЙЛ1 -ot ФАЙЛ2 Истина, если файл1 старее файла2.\n" +" \n" +" ФАЙЛ1 -ef ФАЙЛ2 Истина, если файл1 является жёсткой ссылкой на " +"файл2.\n" +" \n" +" Строковые операторы:\n" +" \n" +" -z СТРОКА Истина, если строка является пустой.\n" +" \n" +" -n СТРОКА\n" +" СТРОКА Истина, если строка не является пустой.\n" +" \n" +" СТРОКА1 = СТРОКА2\n" +" Истина, если строки совпадают.\n" +" СТРОКА1 != СТРОКА2\n" +" Истина, если строки не совпадают.\n" +" СТРОКА1 < СТРОКА2\n" +" Истина, если СТРОКА1 сортируется до СТРОКИ2 " +"лексикографически.\n" +" СТРОКА1 > СТРОКА2\n" +" Истина, если СТРОКА1 сортируется после СТРОКИ2 " +"лексикографически.\n" +" \n" +" Остальные операторы:\n" +" \n" +" -o ПАРАМЕТР Истина, если параметр командного процессора включён.\n" +" -v ПЕР\t Истина, если переменная командного процессора задана\n" +" -R ПЕР\t Истина, если переменная командного процессора задана и " +"является именованной ссылкой.\n" +" ! ВЫРАЖ Истина, если выражение возвращает ложь.\n" +" ВЫРАЖ1 -a ВЫРАЖ2 Истина, если оба выражения возвращают истину.\n" +" ВЫРАЖ1 -o ВЫРАЖ2 Истина, если хотя бы одно из выражений возвращает " +"истину.\n" +" \n" +" арг1 ОП арг2 Математические проверки. ОП может быть одним из " +"следующих: -eq, -ne,\n" +" -lt, -le, -gt или -ge.\n" +" \n" +" Математические бинарные операторы возвращают истину, если АРГУМЕНТ1 " +"равен, не равен,\n" +" меньше, меньше или равен либо больше или равен\n" +" АРГУМЕНТУ2.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если выражение истинно, или ошибку, если выражение " +"ложно\n" +" или указан недопустимый аргумент." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Расчёт условного выражения.\n" +" \n" +" Это синоним встроенной команды test, но последним аргументом должна\n" +" быть скобка «]», соответствующая открывающей «[»." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Отображение времени процесса.\n" +" \n" +" Показывает объединённые значения времени пользователя и системы для " +"командного\n" +" процессора и всех его дочерних процессов.\n" +" \n" +" Состояние выхода:\n" +" Всегда возвращает успех." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Захват сигналов и других событий.\n" +" \n" +" Определяет и активирует обработчики, которые будут выполняться, когда\n" +" командный процессор получает сигналы или при других условиях.\n" +" \n" +" Аргумент — это команда, которая считывается и выполняется, когда\n" +" командный процессор получает указанные сигнал(ы). Если аргумент " +"отсутствует (и указан один сигнал)\n" +" или указано «-», для всех указанных сигналов восстанавливаются\n" +" исходные значения. Если аргумент — пустая строка, все указанные сигналы " +"игнорируются\n" +" командным процессором и вызываемыми им командами.\n" +" \n" +" Если сигнал — EXIT (0), аргумент выполняется при выходе из командного " +"процессора. Если\n" +" сигнал — DEBUG, аргумент выполняется перед каждой простой командой. " +"Если\n" +" сигнал — RETURN, аргумент выполняется каждый раз, когда функция\n" +" или скрипт выполняется в . или исходные встроенные команды завершают " +"свою работу. Сигнал\n" +" ERR означает выполнение аргумента каждый раз, когда ошибка команды " +"приведёт\n" +" к выходу из командного процессора, когда включён параметр -e.\n" +" \n" +" Если аргументы не указаны, trap выводит список команд, связанных\n" +" с каждом сигналом.\n" +" \n" +" Параметры:\n" +" -l\tпоказать названия сигналов и их номера\n" +" -p\tпоказать команды trap, связанные с каждым сигналом\n" +" \n" +" Идентификатор сигнала — это название сигнала в или номер " +"сигнала.\n" +" Названия сигналов не зависят от регистра, а префикс SIG не является " +"обязательным. \n" +" Сигнал можно отправить в командный процессор командой «kill -signal $" +"$».\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый сигнал или параметр." + +#: builtins.c:1400 +#, fuzzy +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Вывод информации о типе команды.\n" +" \n" +" Для каждого указанного имени показывает, как оно будет интерпретировано " +"при\n" +" использовании в качестве названия команды.\n" +" \n" +" Параметры:\n" +" -a\tпоказать все местоположения, где есть исполняемый файл с указанным " +"именем,\n" +" \tвключая псевдонимы, встроенные команды и функции, а также при условии\n" +" \tчто не используется параметр «-p»\n" +" -f\tне искать функции командного процессора\n" +" -P\tпринудительно искать в $PATH все указанные имена, даже если это " +"псевдоним,\n" +" \tвстроенная команда или функция, и возвращать название файла на диске,\n" +" \tкоторый будет запущен\n" +" -p\tвозвращает название файла на диске, который будет запущен,\n" +" \tили ничего, если «type -t имя» не возвращает «file».\n" +" -t\tвывести одно из слов «alias», «keyword»,\n" +" \t«function», «builtin», «file» или «», если указанное имя является, " +"соответственно,\n" +" \tпсевдонимом, зарезервированным словом, функцией, встроенной командой\n" +" \tкомандного процессора, файлом на диске или имя не было найдено\n" +" \n" +" Аргументы:\n" +" ИМЯ\tназвание интерпретируемой команды\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если все указанные имена были найдены, или ошибку в " +"противном случае." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Изменение ограничений ресурсов командного процессора.\n" +" \n" +" Позволяет контролировать ресурсы, доступные командному процессору и " +"создаваемым\n" +" им процессам, в системах, где возможен такой контроль.\n" +" \n" +" Параметры:\n" +" -S\tиспользовать «мягкое» ограничение ресурсов\n" +" -H\tиспользовать «жёсткое» ограничение ресурсов\n" +" -a\tпоказать все текущие ограничения\n" +" -b\tразмер буфера сокета\n" +" -c\tмаксимальный размер создаваемых core-файлов\n" +" -d\tмаксимальный размер сегмента данных процесса\n" +" -e\tмаксимальный приоритет планирования («nice»)\n" +" -f\tмаксимальный размер файлов, записываемых командным процессором и " +"его дочерними процессами\n" +" -i\tмаксимальное число ожидающих сигналов\n" +" -l\tмаксимальный объём, который процесс может заблокировать в памяти\n" +" -m\tмаксимальный объём резидентной памяти\n" +" -n\tмаксимальное число открытых файловых дескрипторов\n" +" -p\tразмер буфера конвейера\n" +" -q\tмаксимальное число байт в очередях сообщений POSIX\n" +" -r\tмаксимальный приоритет планирования в реальном времени\n" +" -s\tмаксимальный размер стека\n" +" -t\tмаксимальный объём процессорного времени в секундах\n" +" -u\tмаксимальное количество пользовательских процессов\n" +" -v\tобъём виртуальной памяти\n" +" -x\tмаксимальное число блокировок файлов\n" +" -T максимальное количество потоков\n" +" \n" +" Не все параметры доступны на всех платформах.\n" +" \n" +" Если указано ограничение, оно является новым значением для указанного " +"ресурса.\n" +" Специальные значения «soft», «hard» и «unlimited» означают,\n" +" соответственно, текущее мягкое ограничение, текущее жёсткое ограничение " +"и отсутствие ограничения.\n" +" В противном случае выводится текущее значение указанного ресурса. Если\n" +" параметр не указан, подразумевается использование параметра -f.\n" +" \n" +" Значения задаются с шагом 1024 байт, кроме параметра -t с шагом в " +"секундах,\n" +" параметра -p с шагом 512 байт и параметра -u, представляющего\n" +" количество процессов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Отображение или указание маски режима для файлов.\n" +" \n" +" Задаёт маску РЕЖИМ для файлов, создаваемых пользователем. Если РЕЖИМ не " +"указан,\n" +" выводит текущее значение маски.\n" +" \n" +" Если РЕЖИМ начинается с цифры, он интерпретируется как восьмеричное " +"число.\n" +" В противном случае он считается символьной строкой как для команды " +"chmod(1).\n" +" \n" +" Параметры:\n" +" -p\tесли РЕЖИМ не указан, вывести маску, пригодную для повторного " +"использования\n" +" -S\tвывести маску в символьном виде, в противном случае выводится " +"восьмеричное число\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый РЕЖИМ или параметр." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Ожидание завершения задания и возврат состояния выхода.\n" +" \n" +" Ожидает завершения всех процессов, заданных идентификаторами\n" +" (идентификатор процесса или номер задания), и возвращает их состояние " +"выхода. Если идентификатор\n" +" не указан, ожидает завершения всех активных дочерних процессов\n" +" и возвращает нулевое состояние выхода. Если идентификатор не является " +"номером задания, ожидает завершения\n" +" всех процессов в конвейере данного задания.\n" +" \n" +" Если указан параметр -n, ожидает завершения следующего задания\n" +" возвращает его состояние выхода.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последнего идентификатора. Возвращает ошибку, если\n" +" указан недопустимый идентификатор или параметр." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Ожидание завершения процесса и возврат состояния выхода.\n" +" \n" +" Ожидает завершения всех процессов, заданных идентификаторами (PID), и " +"возвращает их состояние выхода.\n" +" Если идентификатор процесса не указан, ожидает завершения всех активных\n" +" дочерних процессов и возвращает нулевое состояние выхода. PID должен " +"быть идентификатором процесса.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последнего идентификатора. Возвращает ошибку, если\n" +" указан недопустимый идентификатор или параметр." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Выполнение команд для всех элементов списка.\n" +" \n" +" Цикл «for» выполняет последовательность команд для каждого элемента\n" +" списка. Если операнд «in СЛОВА ...;» отсутствует, подразумевается\n" +" операнд «in \"$@\"». Каждому элементу в списке СЛОВА присваивается ИМЯ " +"и для него\n" +" выполняются КОМАНДЫ.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Математические операции в циклах.\n" +" \n" +" Эквивалентно\n" +" \t(( ВЫРАЖ1))\n" +" \twhile (( ВЫРАЖ2 )); do\n" +" \t\tКОМАНДЫ\n" +" \t\t(( ВЫРАЖ3 ))\n" +" \tdone\n" +" ВЫРАЖ1, ВЫРАЖ2 и ВЫРАЖ3 — это математические выражения. Если любое из " +"выражений\n" +" не указано, считается, что оно возвращает 1.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Выбор слов из списка и выполнение команд.\n" +" \n" +" СЛОВА разворачиваются, формируя список слов. \n" +" Набор развёрнутых слов выводится в поток ошибок с номерами\n" +" в начале строк. Если операнд «in СЛОВА ...;» отсутствует, " +"подразумевается\n" +" операнд «in \"$@\"». Затем выводится приглашение $PS3 и со стандартного " +"ввода\n" +" считывается строка. Если строка состоит из номера,\n" +" соответствующего одному из показанных слов, этому слову\n" +" присваивается указанное имя. Если строка пустая, будут повторно " +"показаны указанные слова\n" +" и приглашение. Если прочитан символ конца файла, команда завершает свою " +"работу. Если прочитаны\n" +" любые другие значения, указанному имени присваивается пустое значение. " +"Прочитанная строка\n" +" сохраняется в переменную $REPLY. Команды выполняются после каждой " +"выборки,\n" +" пока не будет выполнена команда прерывания.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Вывод времени, потраченного на выполнение конвейера.\n" +" \n" +" Выполняет конвейер и выводит значения реального времени, " +"пользовательского времени\n" +" и системного времени ЦП, потраченного на выполнения конвейера.\n" +" \n" +" Параметры:\n" +" -p\tпоказать значения времени в формате Posix\n" +" \n" +" Для форматирования выходных данных используется значение переменной " +"$TIMEFORMAT.\n" +" \n" +" Состояние выхода:\n" +" Возвращаемое состояние соответствует состоянию выхода конвейера." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Выполнение команд согласно шаблону.\n" +" \n" +" Выполняет команды, когда слово соответствует шаблону. \n" +" Для разделения шаблонов используется знак «|».\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Выполнение команд в зависимости от условий.\n" +" \n" +" Сначала выполняется список «if КОМАНДЫ». Если состояние выхода " +"нулевое,\n" +" выполняется список «then КОМАНДЫ». В противном случае выполняется по " +"очереди\n" +" все списки «elif КОМАНДЫ», и если их состояние выхода будет нулевым,\n" +" выполнится список «then КОМАНДЫ», и команда if завершится. В противном " +"случае\n" +" выполнится список «else КОМАНДЫ», если он указан. Состояние выхода " +"всей\n" +" конструкции соответствует состоянию выхода последней выполненной команды " +"или будет нулевым,\n" +" если ни одна проверка условия не возвратила истину.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Выполнение команд до тех пор, пока проверка условия возвращает истину.\n" +" \n" +" Разворачивает и выполняет команды до тех пор, пока последняя команда в\n" +" командах «while» завершается с нулевым состоянием.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Выполнение команд до тех пор, пока проверка условия не возвращает истину.\n" +" \n" +" Разворачивает и выполняет команды до тех пор, пока последняя команда в\n" +" командах «until» завершается с ненулевым состоянием.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Создание дополнительного процесса с указанным именем.\n" +" \n" +" Выполняет команду асинхронно, когда стандартный вывод и стандартный\n" +" вход команды подключены через конвейер к дескрипторам файлов, которые " +"назначены\n" +" указателям 0 и 1 массива переменных ИМЯ в активном командном " +"процессоре.\n" +" Имя по умолчанию — «COPROC».\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние выхода команды." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Определение функции командного процессора.\n" +" \n" +" Создаёт функцию командного процессора с указанным именем. При запуске в " +"качестве простой команды\n" +" ИМЯ выполняет КОМАНДЫ в контексте вызывающего их командного процессора. " +"При вызове ИМЕНИ\n" +" аргументы передаются в функцию как $1...$n, а функция получает\n" +" название $FUNCNAME.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если переменная ИМЯ доступно для записи." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Группировка команд.\n" +" \n" +" Выполняет набор команд, объединённых в группу. Это единственный способ " +"перенаправления\n" +" всего набора команд.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Возобновление работы задания в интерактивном режиме.\n" +" \n" +" Аналогично аргументу JOB_SPEC для команды «fg». Возобновляет\n" +" работу остановленного или фонового задания. Через JOB_SPEC можно задать " +"название\n" +" или номер задания. Если после номера задания указать «&», задание будет " +"переведено\n" +" в фоновый режим, как если бы идентификатор задания был указан как\n" +" аргумент для команды «bg».\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние возобновлённого задания." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Расчёт арифметического выражения.\n" +" \n" +" Выражение рассчитывается по правилам для математических\n" +" выражений. Аналогично «let выражение».\n" +" \n" +" Состояние выхода:\n" +" Возвращает 1, если выражение равно 0, в противном случае возвращает 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Выполнение условной команды.\n" +" \n" +" Возвращает состояние 0 или 1 в зависимости от результата расчёта\n" +" условного выражения. Выражения составляются из тех же примитивов, " +"которые используются\n" +" во встроенной команде «test». Их можно объединить с помощью следующих " +"операторов:\n" +" \n" +" ( выражение )\tВозвращает значение выражения\n" +" ! выражение\tВозвращает истину, если выражение ложно, в противном " +"случае возвращает ложь\n" +" ВЫРАЖ1 && ВЫРАЖ2\tВозвращает истину, если оба выражения истинны, в " +"противном случае возвращает ложь\n" +" ВЫРАЖ1 || ВЫРАЖ2\tВозвращает истину, если хотя бы одно из выражений " +"истинно, в противном случае возвращает ложь\n" +" \n" +" Если используются операторы «==» и «!=», строка справа от\n" +" оператора используется как шаблон, и выполняется сопоставление по " +"шаблону.\n" +" Если используется оператор «=~», строка справа от оператора\n" +" оценивается как регулярное выражение.\n" +" \n" +" Операторы && и || не рассчитывают ВЫРАЖ2, если ВЫРАЖ1 достаточно для\n" +" определения значения выражения.\n" +" \n" +" Состояние выхода:\n" +" 0 или 1 в зависимости от значения выражения." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Стандартные имена переменных командного процессора и их использование.\n" +" \n" +" BASH_VERSION\tНомер версии bash.\n" +" CDPATH\t\tСписок каталогов, разделённых двоеточиями, для поиска\n" +" \t\tв них каталогов, указанных как аргументы для «cd».\n" +" GLOBIGNORE\tСписок шаблонов, разделённых двоеточиями и описывающих имена " +"файлов,\n" +" \t\tкоторые будут игнорироваться при развёртывании пути.\n" +" HISTFILE\t\tИмя файла, в котором хранится журнал команд.\n" +" HISTFILESIZE\tЧисло строк в файле журнала.\n" +" HISTSIZE\t\tЧисло строк журнала, к которым может\n" +" \t\tполучить доступ командный процессор.\n" +" HOME\t\tПолный путь к вашему домашнему каталогу.\n" +" HOSTNAME\t\tИмя данной системы.\n" +" HOSTTYPE\t\tТип процессора, на котором работает данная версия bash.\n" +" IGNOREEOF\tУправляет действием командного процессора при получении " +"символа\n" +" \t\tсимвола конца файла в качестве единственных входных данных. Если " +"задано, тогда значение\n" +" \t\tявляется числом символов EOF, которые могут быть\n" +" \t\tпрочитаны подряд в пустой строке, после чего командный процессор " +"будет закрыт\n" +" \t\t(по умолчанию — 10). Если не задано, EOF означает конец входных " +"данных.\n" +" MACHTYPE\t\tСтрока с описанием текущей системы, в которой запущен bash.\n" +" MAILCHECK\tКак часто (в секундах) bash проверяет наличие новой почты.\n" +" MAILPATH\t\tСписок имён файлов, разделённых двоеточиями, в которых bash\n" +" \t\tищет почту.\n" +" OSTYPE\t\tВерсия Unix, в которой запущена данная версия bash.\n" +" PATH\t\tСписок каталогов, разделённых двоеточиями, для поиска\n" +" \t\tвыполняемых команд.\n" +" PROMPT_COMMAND\tКоманда, выполняемая перед выводом каждого\n" +" \t\tосновного приглашения.\n" +" PS1\t\tОсновная строка приглашения.\n" +" PS2\t\tДополнительная строка приглашения.\n" +" PWD\t\tПолный путь до текущего каталога.\n" +" SHELLOPTS\tСписок включённых параметров командного процессора, " +"разделённых двоеточиями.\n" +" TERM\t\tНазвание текущего типа терминала.\n" +" TIMEFORMAT\tФормат вывода данных о времени, показываемых\n" +" \t\tкомандой time.\n" +" auto_resume\tНепустое значение означает слово в строке запуска команды,\n" +" \t\tкоторое сначала ищется в списке\n" +" \t\tостановленных заданий. Если команда найдена, задание переводится в " +"интерактивный режим.\n" +" \t\tЗначение «exact» означает, что слово команды должно\n" +" \t\tточно совпадать с командой в списке остановленных заданий. \n" +" \t\tЗначение «substring» означает, что слово команды\n" +" \t\tдолжно быть частью строки задания. Все другие значения означают,\n" +" \t\tчто команда должна быть префиксом остановленного задания.\n" +" histchars\tСимволы, управляющие расширением журнала\n" +" \t\tи быстрой подстановкой. Первый символ означает\n" +" \t\tподстановку журнала. Обычно это «!». Второй символ\n" +" \t\tозначает «быструю подстановку». Обычно это «^». \n" +" \t\tТретий символ означает примечание журнала. Обычно это «#».\n" +" HISTIGNORE\tСписок шаблонов, разделённых двоеточиями и описывающих " +"команды,\n" +" \t\tкоторые должны быть сохранены в журнале.\n" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Добавление каталогов в стек.\n" +" \n" +" Добавляет каталог в начало стека каталогов или выполняет\n" +" ротацию стека, помещая в начало стека текущий рабочий\n" +" каталог. Если аргументы не указаны, меняет местами два первых " +"каталога.\n" +" \n" +" Параметры:\n" +" -n\tпредотвращает обычное изменение каталога при добавлении\n" +" \tкаталогов в стек, чтобы действия выполнялись только над стеком.\n" +" \n" +" Аргументы:\n" +" +N\tвыполняет ротацию стека, чтобы N-й каталог (слева\n" +" \tв списке, показанного командой «dirs», начиная с нуля)\n" +" \tстал первым в стеке.\n" +" \n" +" -N\tвыполняет ротацию стека, чтобы N-й каталог (справа\n" +" \tв списке, показанного командой «dirs», начиная с нуля)\n" +" \tстал первым в стеке.\n" +" \n" +" каталог\tдобавляет каталог в начало стека каталогов, делая его\n" +" \tновым текущим каталогом.\n" +" \n" +" Встроенная команда dirs показывает стек каталогов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или удалось\n" +" перейти в каталог." + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Удаление каталогов из стека.\n" +" \n" +" Удаляет записи из стека каталогов. Если аргументы не указаны,\n" +" удаляет первый каталог из стека и назначает новый первый каталог.\n" +" \n" +" Параметры:\n" +" -n\tпредотвращает обычное изменение каталога при удалении\n" +" \tкаталогов из стека, чтобы действия выполнялись только над стеком.\n" +" \n" +" Аргументы:\n" +" +N\tудаляет N-ю слева запись в списке каталогов,\n" +" \tпоказанного командой «dirs», начиная с нуля. Например, «popd +0»\n" +" \tудаляет первый каталог, а «popd +1» — второй каталог.\n" +" \n" +" -N\tудаляет N-ю справа запись в списке каталогов,\n" +" \tпоказанного командой «dirs», начиная с нуля. Например, «popd -0»\n" +" \tудаляет последний каталог, а «popd -1» — предпоследний каталог.\n" +" \n" +" Встроенная команда dirs показывает стек каталогов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или удалось\n" +" перейти в каталог." + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Отображение стека каталогов.\n" +" \n" +" Выводит список запомненных на данный момент каталогов. Каталоги\n" +" помещаются в список командой «pushd». Для очистки\n" +" списка используется команда «popd».\n" +" \n" +" Параметры:\n" +" -c\tочистить стек каталогов, удалив из него все элементы\n" +" -l\tне выводить каталоги, начинающиеся с тильды (~),\n" +" \tкоторая означает домашний каталог\n" +" -p\tпоказать стек по одному каталогу в строке\n" +" -v\tпоказать стек по одному каталогу в строке\n" +" \tи с номером в стеке\n" +" \n" +" Аргументы:\n" +" +N\tпоказать N-ю запись слева в списке каталогов,\n" +" \tпоказанного при вызове без параметров, начиная с нуля.\n" +" \n" +" -N\tпоказать N-ю справа в списке каталогов запись,\n" +" \tпоказанного при вызове без параметров, начиная с нуля.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Установка и удаление параметров командного процессора.\n" +" \n" +" Изменяет настройки указанных параметров командного процессора. Если не " +"указать\n" +" аргумент с параметром, выводит все параметры командного процессора, " +"показывая\n" +" какой из них установлен, а какой нет.\n" +" \n" +" Параметры:\n" +" -o\tограничиться до параметров, которые заданы с помощью «set -o»\n" +" -p\tпоказать все параметры командного процессора и их состояние\n" +" -q\tничего не выводить\n" +" -s\tвключить (set) все указанные параметры\n" +" -u\tотключить (unset) все указанные параметры\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если указанный параметр включён. Возвращает ошибку,\n" +" если был указан недопустимый параметр или параметр отключён." + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Форматирует и выводит аргументы согласно указанному формату.\n" +" \n" +" Параметры:\n" +" -v перем\tвыводить в указанную переменную bash, а не\n" +" \t\tна стандартный вывод\n" +" \n" +" ФОРМАТ — это символьная строка, содержащая три типа объектов: простые\n" +" символы, которые копируются на стандартный вывод, экранирующие\n" +" последовательности, которые преобразовываются и копируются на " +"стандартный\n" +" вывод, и спецификации, которые активируют вывод следующего успешного\n" +" аргумента.\n" +" \n" +" В дополнение к стандартным спецификациям формата, описанным в " +"printf(1),\n" +" printf интерпретирует:\n" +" \n" +" %b\tразвёртывание экранирующих последовательностей с обратной косой " +"чертой в соответствующий аргумент;\n" +" %q\tзаключение аргумента в кавычки, чтобы его можно было повторно " +"использовать в качестве входных данных для командного процессора;\n" +" %(fmt)T вывод строки дата-время, полученной после использования FMT в " +"качестве\n" +" строки форматирования для strftime(3)\n" +" \n" +" Если необходимо задействовать все аргументы, формат используется " +"повторно. Если\n" +" аргументов меньше, чем требуется для форматирования, дополнительные\n" +" спецификации форматирования интерпретируются как содержащие нулевое\n" +" или пустое значение.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка\n" +" записи или присвоения." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Определение количества аргументов, завершаемых функцией readline.\n" +" \n" +" Для каждого имени нужно указать количество завершаемых аргументов. Если " +"параметры\n" +" не указаны, выводятся существующие спецификации завершения формате\n" +" для повторного использования.\n" +" \n" +" Параметры:\n" +" -p\tвывести существующие спецификации завершения в формате для " +"повторного использования\n" +" -r\tудалить спецификации завершения для каждого имени или,\n" +" \tесли имена не указаны, все спецификации\n" +" -D\tприменить завершения и действия как стандартные для команд,\n" +" \tдля которых не определены завершения\n" +" -E\tприменить завершения и действия к «пустым» командам —\n" +" \tзавершение применяется к пустой строке\n" +" \n" +" Когда применяется завершение, действия выполняются в алфавитном порядке\n" +" перечисленных выше параметров. Параметр -D имеет более\n" +" высокий приоритет, чем -E.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Вывод возможных завершений в зависимости от параметров.\n" +" \n" +" compgen предназначен для использования в функциях bash, генерирующих\n" +" возможные завершения. Если указан необязательный аргумент слово, " +"выполняет\n" +" сопоставление со сгенерированным словом.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Изменение или вывод параметров завершения.\n" +" \n" +" Изменяет параметры завершения для каждого имени или, если имена\n" +" не указаны, для текущего завершения. Если параметры не указаны, " +"выводит\n" +" параметры завершения для каждого имени или текущую спецификацию " +"завершения.\n" +" \n" +" Параметры:\n" +" \t-o параметр\tзадать параметр завершения для каждого имени\n" +" \t-D\t\tизменить параметры для завершения команды «по умолчанию»\n" +" \t-E\t\tизменить параметры для завершения «пустой» команды\n" +" \n" +" Использование «+o» вместо «-o» отключает указанный параметр.\n" +" \n" +" Аргументы:\n" +" \n" +" Каждое имя ссылается на команду, для которой уже должна быть определена\n" +" спецификация завершения с помощью встроенной команды «complete». Если " +"имена\n" +" не указаны, функция, которая сейчас генерирует завершения, должна " +"вызвать\n" +" compopt, и должны измениться параметры для текущего\n" +" генератора завершения.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или для имени\n" +" определена спецификация завершения." + +#: builtins.c:2047 +#, fuzzy +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Чтение строк со стандартного ввода в переменную индексированного массива.\n" +" \n" +" Читает строки со стандартного ввода в переменную указанного " +"индексированного массива\n" +" или из указанного файлового дескриптора, если указан параметр -u. " +"Переменная $MAPFILE\n" +" является массивом по умолчанию.\n" +" \n" +" Параметры:\n" +" -n число\tкопировать указанное число строк Если число равно 0, " +"копируются все строки.\n" +" -O начало\tначать присвоение массиву, начиная с заданного указателя " +"По умолчанию указатель равен 0.\n" +" -s число \tотбросить указанное число первых строк\n" +" -t\t\tудалить завершающие переводы строки изо всех прочитанных строк\n" +" -u fd\t\tчитать строки из файлового дескриптора, а не со стандартного " +"входа\n" +" -C callback\tоценивать callback при чтении каждой строки quantum\n" +" -c quantum\tчисло строк, читаемых от каждого вызова до callback\n" +" \n" +" Аргументы:\n" +" МАССИВ\t\tназвание переменной массива, используемой для данных файла.\n" +" \n" +" Если параметр -C указан без -c, quantum по умолчанию равен 5000. Когда\n" +" оценивается callback, он предоставляет указатель на следующий " +"присваиваемый\n" +" элемента массива и на строку, присваиваемую этому элементу,\n" +" в качестве дополнительных аргументов.\n" +" \n" +" Если явно не указано начало, mapfile очистит массив до\n" +" операции присвоения.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или массив " +"доступен для записи\n" +" и является индексированным." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Чтение строк из файла в переменную массива.\n" +" \n" +" Синоним команды «mapfile»." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "© Free Software Foundation, Inc, 2016." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Возвращает контекст вызова текущей подпрограммы.\n" +#~ " \n" +#~ " Без EXPR выполняет возврат " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: процесс %5ld (%s) в the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Неизвестный номер сигнала" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Missing `}'" +#~ msgstr "Пропущен символ `}'" + +#~ msgid "brace_expand> " +#~ msgstr "brace_expand> " + +#~ msgid "Attempt to free unknown command type `%d'.\n" +#~ msgstr "" +#~ "Попытка освободить память структуры команды неизвестного типа `%d'.\n" + +#~ msgid "Report this to %s\n" +#~ msgstr "Сообщите об этом по адресу %s\n" + +#~ msgid "Stopping myself..." +#~ msgstr "Прекращение работы..." + +#~ msgid "Tell %s to fix this someday.\n" +#~ msgstr "Скажите %s, чтобы он исправил это.\n" + +#~ msgid "execute_command: bad command type `%d'" +#~ msgstr "execute_command: неверный тип команды '%d'" + +#~ msgid "real\t" +#~ msgstr "реальное\t" + +#~ msgid "user\t" +#~ msgstr "пользователя\t" + +#~ msgid "sys\t" +#~ msgstr "системное\t" + +#~ msgid "" +#~ "real\t0m0.00s\n" +#~ "user\t0m0.00s\n" +#~ "sys\t0m0.00s\n" +#~ msgstr "" +#~ "реальное\t0m0.00s\n" +#~ "пользователя\t0m0.00s\n" +#~ "системное\t0m0.00s\n" + +#~ msgid "cannot duplicate fd %d to fd 1: %s" +#~ msgstr "невозможно скопировать файловый дескриптор %d в 1: %s" + +#~ msgid "%s: output redirection restricted" +#~ msgstr "%s: перенаправление вывода запрещено (ограниченный режим)" + +#~ msgid "Out of memory!" +#~ msgstr "Недостаточно памяти!" + +#~ msgid "You have already added item `%s'\n" +#~ msgstr "Элемент `%s' уже добавлен\n" + +#~ msgid "You have entered %d (%d) items. The distribution is:\n" +#~ msgstr "Создано %d (%d) элементов. Распределение:\n" + +#~ msgid "slot %3d: " +#~ msgstr "слот %3d: " + +#~ msgid "" +#~ msgstr "<неизв>" + +#~ msgid "%s: bg background job?" +#~ msgstr "%s: задача уже фоновая" + +#~ msgid "" +#~ "Redirection instruction from yyparse () '%d' is\n" +#~ "out of range in make_redirection ()." +#~ msgstr "" +#~ "Инструкция перенаправления yyparse () `%d'\n" +#~ "не может быть обработана make_redirection ()." + +#~ msgid "clean_simple_command () got a command with type %d." +#~ msgstr "функции clean_simple_command () передана команда типа %d." + +#~ msgid "got errno %d while waiting for %d" +#~ msgstr "ошибка %d при ожидании %d" + +#~ msgid "syntax error near unexpected token `%c'" +#~ msgstr "синтаксическая ошибка около неожиданной лексемы `%c'" + +#~ msgid "print_command: bad command type `%d'" +#~ msgstr "print_command: неверный тип команды `%d'" + +#~ msgid "cprintf: bad `%%' argument (%c)" +#~ msgstr "cprintf: неверный спецификатор после `%%' (%c)" + +#~ msgid "option `%s' requires an argument" +#~ msgstr "параметр `%s' должен использоваться с аргументом" + +#~ msgid "%s: unrecognized option" +#~ msgstr "%s: неизвестный параметр" + +#~ msgid "`-c' requires an argument" +#~ msgstr "`-c' должен использоваться с аргументом" + +#~ msgid "%s: cannot execute directories" +#~ msgstr "%s: каталоги не могут запускаться как исполняемые файлы" + +#~ msgid "Bad code in sig.c: sigprocmask" +#~ msgstr "Неверный код в sig.c: sigprocmask" + +#~ msgid "can't make pipes for process substitution: %s" +#~ msgstr "невозможно создать каналы для подстановки: %s" + +#~ msgid "reading" +#~ msgstr "чтения" + +#~ msgid "writing" +#~ msgstr "записи" + +#~ msgid "process substitution" +#~ msgstr "подстановка процессов" + +#~ msgid "command substitution" +#~ msgstr "подстановка команд" + +#~ msgid "Can't reopen pipe to command substitution (fd %d): %s" +#~ msgstr "" +#~ "Невозможно вновь открыть канал для подстановки команд (файловый " +#~ "дексриптор %d): %s" + +#~ msgid "$%c: unbound variable" +#~ msgstr "$%c: не заданы границы" + +#~ msgid "%s: bad arithmetic substitution" +#~ msgstr "%s: неверная арифметическая подстановка" + +#~ msgid "-%s: binary operator expected" +#~ msgstr "-%s: ожидается бинарная операция" + +#~ msgid "%s[%s: bad subscript" +#~ msgstr "%s[%s: неверный индекс" + +#~ msgid "[%s: bad subscript" +#~ msgstr "[%s: неверный индекс" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xmalloc: невозможно заново выделить %lu байтов (выделено %lu байтов)" + +#~ msgid "digits occur in two different argv-elements.\n" +#~ msgstr "цифры встречаются в двух разных элементах argv.\n" + +#~ msgid "option %c\n" +#~ msgstr "параметр %c\n" + +#~ msgid "option a\n" +#~ msgstr "параметр a\n" + +#~ msgid "option b\n" +#~ msgstr "параметр b\n" + +#~ msgid "option c with value `%s'\n" +#~ msgstr "параметр c со значением `%s'\n" + +#~ msgid "?? sh_getopt returned character code 0%o ??\n" +#~ msgstr "?? sh_getopt вернула код символа 0%o ??\n" + +#~ msgid "non-option ARGV-elements: " +#~ msgstr "элементы ARGV, не являющиеся параметрами: " + +#~ msgid "%s: Unknown flag %s.\n" +#~ msgstr "%s: Неизвестный флаг %s.\n" + +#~ msgid "Unknown directive `%s'" +#~ msgstr "Неизвестная директива `%s'" + +#~ msgid "%s must be inside of a $BUILTIN block" +#~ msgstr "%s должно быть внутри блока $BUILTIN" + +#~ msgid "%s found before $END" +#~ msgstr "%s обнаружено раньше $END" + +#~ msgid "%s already has a function (%s)" +#~ msgstr "В %s уже есть функция (%s)" + +#~ msgid "%s already had a docname (%s)" +#~ msgstr "В %s уже есть название документации (%s)" + +#~ msgid "%s already has short documentation (%s)" +#~ msgstr "В %s уже есть короткая документация (%s)" + +#~ msgid "%s already has a %s definition" +#~ msgstr "В %s уже есть определение %s" + +#~ msgid "mkbuiltins: Out of virtual memory!\n" +#~ msgstr "mkbuiltins: Не хватает виртуальной памяти!\n" + +#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]" +#~ msgstr "read [-r] [-p приглашение] [-a массив] [-e] [имя ...]" + +#~ msgid "%[DIGITS | WORD] [&]" +#~ msgstr "%[ЦИФРЫ | СЛОВО] [&]" + +#~ msgid "variables - Some variable names and meanings" +#~ msgstr "variables -- Имена и смысл некоторых переменных" + +#~ msgid "`alias' with no arguments or with the -p option prints the list" +#~ msgstr "`alias' без аргументов или с параметром -p выводит на стандартный" + +#~ msgid "of aliases in the form alias NAME=VALUE on standard output." +#~ msgstr "вывод список псевдокоманд в виде ИМЯ=ЗНАЧЕНИЕ. В противном" + +#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given." +#~ msgstr "случае, для каждого ИМЕНИ определяется псевдокоманда со ЗНАЧЕНИЕМ." + +#~ msgid "A trailing space in VALUE causes the next word to be checked for" +#~ msgstr "" +#~ "Если на конце ЗНАЧЕНИЯ есть пробелы, при разворачивании псевдокоманды" + +#~ msgid "alias substitution when the alias is expanded. Alias returns" +#~ msgstr "следующее слово проверяется на подстановку псевдокоманд. Alias" + +#~ msgid "true unless a NAME is given for which no alias has been defined." +#~ msgstr "" +#~ "возвращает true, если только не задано ИМЯ, для которого нет псевдокоманд." + +#~ msgid "" +#~ "Remove NAMEs from the list of defined aliases. If the -a option is given," +#~ msgstr "" +#~ "Удаляет ИМЕНА из списка определённых псевдокоманд. Если задан параметр -a," + +#~ msgid "then remove all alias definitions." +#~ msgstr "удаляет все определения псевдокоманд." + +#~ msgid "Bind a key sequence to a Readline function, or to a macro. The" +#~ msgstr "" +#~ "Связывает последовательность клавиш с функцией Readline или с макросом." + +#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be" +#~ msgstr "Синтаксис тот же, что и в ~/.inputrc, но должен передаваться" + +#~ msgid "" +#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'." +#~ msgstr "одним аргументом: bind '\"\\C-x\\C-r\": re-read-init-file'." + +#~ msgid "Arguments we accept:" +#~ msgstr "Принимаемые аргументы:" + +#~ msgid "" +#~ " -m keymap Use `keymap' as the keymap for the duration of this" +#~ msgstr "" +#~ " -m раскладка Использовать во время работы программы указанную" + +#~ msgid " command. Acceptable keymap names are emacs," +#~ msgstr " раскладку. Допустимые имена раскладок: emacs," + +#~ msgid "" +#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," +#~ msgstr "" +#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + +#~ msgid " vi-command, and vi-insert." +#~ msgstr " vi-command и vi-insert." + +#~ msgid " -l List names of functions." +#~ msgstr " -l Вывести список имён функций." + +#~ msgid " -P List function names and bindings." +#~ msgstr " -P Вывести список имён функций и связей." + +#~ msgid "" +#~ " -p List functions and bindings in a form that can be" +#~ msgstr " -p Вывести список имён функций и связей в виде," + +#~ msgid " reused as input." +#~ msgstr " который можно использовать на входе." + +#~ msgid " -r keyseq Remove the binding for KEYSEQ." +#~ msgstr " -r послед_клавиш Удалить связь для `послед_клавиш'." + +#~ msgid " -f filename Read key bindings from FILENAME." +#~ msgstr " -f имя_файла Прочесть связи из файла." + +#~ msgid "" +#~ " -q function-name Query about which keys invoke the named function." +#~ msgstr "" +#~ " -q имя_функции Запрос, какие клавиши вызовут указанную функцию." + +#~ msgid " -V List variable names and values" +#~ msgstr " -V Вывести список имён и значений переменных." + +#~ msgid "" +#~ " -v List variable names and values in a form that can" +#~ msgstr "" +#~ " -v Вывести список имён и значений переменных в виде," + +#~ msgid " be reused as input." +#~ msgstr " который можно использовать на входе" + +#~ msgid "" +#~ " -S List key sequences that invoke macros and their " +#~ "values" +#~ msgstr "" +#~ " -S Вывести список последовательностей клавиш, " +#~ "вызывающих макросы и их значений." + +#~ msgid "" +#~ " -s List key sequences that invoke macros and their " +#~ "values in" +#~ msgstr "" +#~ " -s Вывести список последовательностей клавиш, вызывающих " +#~ "макросы" + +#~ msgid " a form that can be reused as input." +#~ msgstr "" +#~ " и их значений в виде, который можно использовать на " +#~ "входе" + +#~ msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," +#~ msgstr "Выйти из цикла FOR, WHILE или UNTIL. Если указано N," + +#~ msgid "break N levels." +#~ msgstr "выйти из N вложенных уровней." + +#~ msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." +#~ msgstr "Перейти к следующей итерации цикла FOR, WHILE или UNTIL." + +#~ msgid "If N is specified, resume at the N-th enclosing loop." +#~ msgstr "Если задано N, перейти к N-му обрамляющему циклу." + +#~ msgid "Run a shell builtin. This is useful when you wish to rename a" +#~ msgstr "Выполнить встроенную команду оболочки. Это полезно, если вы хотите" + +#~ msgid "shell builtin to be a function, but need the functionality of the" +#~ msgstr "создать функцию с именем встроенной команды, но хотите сохранить" + +#~ msgid "builtin within the function itself." +#~ msgstr "возможность использования команды из самой функции" + +#~ msgid "Change the current directory to DIR. The variable $HOME is the" +#~ msgstr "Изменить текущий каталог на заданный. Переменная $HOME содержит" + +#~ msgid "default DIR. The variable $CDPATH defines the search path for" +#~ msgstr "" +#~ "каталог по умолчанию. Переменная $CDPATH определяет путь, в котором" + +#~ msgid "the directory containing DIR. Alternative directory names in CDPATH" +#~ msgstr "" +#~ "ищется каталог, содержащий КАТАЛОГ. Альтернативные каталоги в CDPATH" + +#~ msgid "are separated by a colon (:). A null directory name is the same as" +#~ msgstr "" +#~ "разделяются точкой с запятой (:). Пустое имя каталога -- то же самое," + +#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," +#~ msgstr "" +#~ "что текущий каталог, т.е. `.'. Если КАТАЛОГ начинается с дроби (/)," + +#~ msgid "then $CDPATH is not used. If the directory is not found, and the" +#~ msgstr "" +#~ "$CDPATh не используется. Если каталог не найден, и установлен параметр" + +#~ msgid "shell option `cdable_vars' is set, then try the word as a variable" +#~ msgstr "" +#~ "оболочки `cdable_vars', делается попытка интерпретировать это слово как " +#~ "имя" + +#~ msgid "name. If that variable has a value, then cd to the value of that" +#~ msgstr "" +#~ "переменной. Если эта переменная имеет значение, каталог меняется на это" + +#~ msgid "" +#~ "variable. The -P option says to use the physical directory structure" +#~ msgstr "" +#~ "значение. Параметр -P указывает использовать физическую структуру " +#~ "каталогов," + +#~ msgid "" +#~ "instead of following symbolic links; the -L option forces symbolic links" +#~ msgstr "" +#~ "а не следовать символчиеским ссылкам, параметр -L заставляет следовать" + +#~ msgid "to be followed." +#~ msgstr "символическим ссылкам." + +#~ msgid "Print the current working directory. With the -P option, pwd prints" +#~ msgstr "" +#~ "Вывести имя текущего рабочего каталога. С параметром -P pwd выводит" + +#~ msgid "the physical directory, without any symbolic links; the -L option" +#~ msgstr "" +#~ "физический каталог, без символических ссылок, параметр -L заставляет" + +#~ msgid "makes pwd follow symbolic links." +#~ msgstr "pwd следовать символическим ссылкам." + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" +#~ msgstr "" +#~ "Выполняет КОМАНДУ с АРГУМЕНТАМИ, игнорируя функции оболочки. Если у вас " +#~ "есть" + +#~ msgid "function called `ls', and you wish to call the command `ls', you can" +#~ msgstr "" +#~ "функция оболочки `ls', а вы хотите вызвать команду `ls', можно " +#~ "использовать" + +#~ msgid "" +#~ "say \"command ls\". If the -p option is given, a default value is used" +#~ msgstr "" +#~ "\"command ls\". Если задан параметр -p, используется значение $PATH" + +#~ msgid "" +#~ "for PATH that is guaranteed to find all of the standard utilities. If" +#~ msgstr "по умолчанию, что гарантирует отыскание стандартных утилит. Если" + +#~ msgid "" +#~ "the -V or -v option is given, a string is printed describing COMMAND." +#~ msgstr "задан параметр -V или -v, выводится строка, описывающая КОМАНДУ." + +#~ msgid "The -V option produces a more verbose description." +#~ msgstr "Параметр -V создаёт более подробное описание." + +#~ msgid "Declare variables and/or give them attributes. If no NAMEs are" +#~ msgstr "" +#~ "Объявляет переменные и/или придаёт им атрибуты. Если не заданы ИМЕНА," + +#~ msgid "given, then display the values of variables instead. The -p option" +#~ msgstr "выводит вместо этого значения переменных. Параметр -p выведет" + +#~ msgid "will display the attributes and values of each NAME." +#~ msgstr "атрибуты и значения каждого ИМЕНИ." + +#~ msgid "The flags are:" +#~ msgstr "Флаги:" + +#~ msgid " -a\tto make NAMEs arrays (if supported)" +#~ msgstr " -a\tсчитать ИМЕНА массивами (если поддерживаются)" + +#~ msgid " -f\tto select from among function names only" +#~ msgstr " -f\tискать только среди имён функций" + +#~ msgid " -F\tto display function names without definitions" +#~ msgstr " -F\tпоказать имена функций без определений" + +#~ msgid " -r\tto make NAMEs readonly" +#~ msgstr " -r\tсделать ИМЕНА переменными только для чтения" + +#~ msgid " -x\tto make NAMEs export" +#~ msgstr " -x\tпозволить экспорт ИМЁН" + +#~ msgid " -i\tto make NAMEs have the `integer' attribute set" +#~ msgstr " -i\tпридать ИМЕНАМ набор атрибутов `integer' (целочисленный)" + +#~ msgid "Variables with the integer attribute have arithmetic evaluation (see" +#~ msgstr "Для переменных с атрибутом `integer' арифметические вычисления (см." + +#~ msgid "`let') done when the variable is assigned to." +#~ msgstr "`let') выполняются при присвоении переменной значения." + +#~ msgid "When displaying values of variables, -f displays a function's name" +#~ msgstr "При выводе значений переменных -f выводит имя и определение" + +#~ msgid "and definition. The -F option restricts the display to function" +#~ msgstr "функции. Параметр -F ограничивает вывод именем" + +#~ msgid "name only." +#~ msgstr "функции." + +#~ msgid "" +#~ "Using `+' instead of `-' turns off the given attribute instead. When" +#~ msgstr "Использование `+' вместо `-' выключает заданный атрибут. При" + +#~ msgid "used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "" +#~ "использовании в функции делает ИМЕНа локальными, как команда `local'." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Устарела. См. `declare'." + +#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL" +#~ msgstr "Создать локальную переменную ИМЯ и придать ей ЗНАЧЕНИЕ. LOCAL" + +#~ msgid "have a visible scope restricted to that function and its children." +#~ msgstr "область видимости ИМЕНИ этой функцией и её потомками." + +#~ msgid "Output the ARGs. If -n is specified, the trailing newline is" +#~ msgstr "Выводит АРГУМЕНТЫ. Если задано -n, подавляется завершающий переход" + +#~ msgid "suppressed. If the -e option is given, interpretation of the" +#~ msgstr "" +#~ "на новую строку. Если задан параметр -e, интерпретируются следующие" + +#~ msgid "following backslash-escaped characters is turned on:" +#~ msgstr "экранированные символы:" + +#~ msgid "\t\\a\talert (bell)" +#~ msgstr "\t\\a\tпредупреждение (звонок)" + +#~ msgid "\t\\b\tbackspace" +#~ msgstr "\t\\b\tзабой (откат)" + +#~ msgid "\t\\c\tsuppress trailing newline" +#~ msgstr "\t\\c\tподавить завершающий переход на новую строку" + +#~ msgid "\t\\E\tescape character" +#~ msgstr "\t\\E\tэкранировать символ" + +#~ msgid "\t\\f\tform feed" +#~ msgstr "\t\\f\tсдвиг на следующую строку" + +#~ msgid "\t\\n\tnew line" +#~ msgstr "\t\\n\tновая строка" + +#~ msgid "\t\\r\tcarriage return" +#~ msgstr "\t\\r\tвозврат каретки" + +#~ msgid "\t\\t\thorizontal tab" +#~ msgstr "\t\\t\tгоризонтальная табуляция" + +#~ msgid "\t\\v\tvertical tab" +#~ msgstr "\t\\v\tвертикальная табуляция" + +#~ msgid "\t\\\\\tbackslash" +#~ msgstr "\t\\\\\tобратная косая черта" + +#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)." +#~ msgstr "\t\\число\tсимвол, восьмеричный ASCII-код которого равен ЧИСЛУ" + +#~ msgid "" +#~ "You can explicitly turn off the interpretation of the above characters" +#~ msgstr "Вы можете явно выключить интерпретацию вышеприведённых символов" + +#~ msgid "with the -E option." +#~ msgstr "параметром -E." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "Выводит АРГУМЕНТЫ. Если задано -n, подавляется завершающий переход на " +#~ "новую строку." + +#~ msgid "Enable and disable builtin shell commands. This allows" +#~ msgstr "Включает и блокирует встроенные команды оболочки. Это позволяет" + +#~ msgid "you to use a disk command which has the same name as a shell" +#~ msgstr "использовать внешние команды с теми же именами, что команды" + +#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise" +#~ msgstr "" +#~ "оболочки. При использовании -n ИМЕНА блокируются, в противном случае" + +#~ msgid "NAMEs are enabled. For example, to use the `test' found on your" +#~ msgstr "" +#~ "включаются. Например, чтобы использовать файл `test', а не встроенную" + +#~ msgid "path instead of the shell builtin version, type `enable -n test'." +#~ msgstr "в оболочку версию, введите enable -n test'. На системах," + +#~ msgid "On systems supporting dynamic loading, the -f option may be used" +#~ msgstr "поддерживающих динамическую загрузку можно использовать параметр -f" + +#~ msgid "to load new builtins from the shared object FILENAME. The -d" +#~ msgstr "" +#~ "чтобы загрузить новые встроенные команды из разделяемого объекта ФАЙЛ." + +#~ msgid "option will delete a builtin previously loaded with -f. If no" +#~ msgstr "Параметр -d удаляет команды, загруженные -f. Если имена, кроме" + +#~ msgid "non-option names are given, or the -p option is supplied, a list" +#~ msgstr "как в параметрах, не заданы, или если задан параметр -p, выводится" + +#~ msgid "of builtins is printed. The -a option means to print every builtin" +#~ msgstr "" +#~ "список встроенных команд. Параметр -a требует вывести все встроенные" + +#~ msgid "with an indication of whether or not it is enabled. The -s option" +#~ msgstr "команды с информацией, блокированы ли они. Параметр -s выводит" + +#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n" +#~ msgstr "только `специальные' команды Posix.2. Параметр -n выводит список" + +#~ msgid "option displays a list of all disabled builtins." +#~ msgstr "всех блокированных встроенных команд." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "" +#~ "Читает АРГУМЕНТЫ как входной текст оболочки и выполняет полученные " +#~ "команды." + +#~ msgid "Getopts is used by shell procedures to parse positional parameters." +#~ msgstr "" +#~ "Getopts используется процедурами оболочки для анализа параметров командной" + +#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter" +#~ msgstr "строки. СТРОКА_ПАРАМЕТРОВ содержит буквы параметров, которые нужно" + +#~ msgid "is followed by a colon, the option is expected to have an argument," +#~ msgstr "" +#~ "распознать. Если за буквой следует двоеточие, параметр должен иметь" + +#~ msgid "which should be separated from it by white space." +#~ msgstr "аргумент, отделённый от него промежутком." + +#~ msgid "Each time it is invoked, getopts will place the next option in the" +#~ msgstr "При каждом вызове getopts помещает следующий параметр в переменную" + +#~ msgid "shell variable $name, initializing name if it does not exist, and" +#~ msgstr "оболочки $имя, инициализируя имя, если оно не существует, а индекс" + +#~ msgid "the index of the next argument to be processed into the shell" +#~ msgstr "следующего аргумента в переменную оболочки OPTIND. OPTIND" + +#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" +#~ msgstr "" +#~ "принимает значение 1 при каждом вызове оболочки или скрипта оболочки." + +#~ msgid "a shell script is invoked. When an option requires an argument," +#~ msgstr "Если параметр требует аргумента, getopts помещает этот аргумент" + +#~ msgid "getopts places that argument into the shell variable OPTARG." +#~ msgstr "в переменную оболочки OPTARG." + +#~ msgid "getopts reports errors in one of two ways. If the first character" +#~ msgstr "" +#~ "getopts сообщает об ошибках одним из двух способов. Если первый символ" + +#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" +#~ msgstr "" +#~ "OPTSTRING -- двоеточие, getopts использует бесшумный способ. В этом" + +#~ msgid "this mode, no error messages are printed. If an illegal option is" +#~ msgstr "случае сообщения об ошибках не выводятся. Если найден недопустимый" + +#~ msgid "seen, getopts places the option character found into OPTARG. If a" +#~ msgstr "" +#~ "параметр, getopts помещает найденный символ в OPTARG. Если не найден" + +#~ msgid "required argument is not found, getopts places a ':' into NAME and" +#~ msgstr "требуемый аргумент, getopts помещает в ИМЯ ':', а в OPTARG --" + +#~ msgid "sets OPTARG to the option character found. If getopts is not in" +#~ msgstr "найденный символ. Если getopts работает не в бесшумном режиме" + +#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into" +#~ msgstr "и обнаружен недопустимый параметр, getopts помещает в ИМЯ '?', и" + +#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'" +#~ msgstr "сбрасывает OPTARG. Если не найден требуемый параметр, в ИМЯ" + +#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" +#~ msgstr "помещается '?', OPTARG сбрасывается, и выводится диагностическое" + +#~ msgid "printed." +#~ msgstr "сообщение." + +#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the" +#~ msgstr "Если переменная оболочки OPTERR имеет значение 0, getopts блокирует" + +#~ msgid "printing of error messages, even if the first character of" +#~ msgstr "вывод сообщений об ошибках, даже если первый символ OPTSTRING" + +#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." +#~ msgstr "не двоеточие. По умолчанию OPTERR имеет значение 1." + +#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if" +#~ msgstr "Getopts обычно разбирает позиционные параметры ($0 - $9), но если" + +#~ msgid "more arguments are given, they are parsed instead." +#~ msgstr "заданы дополнительные аргументы, вместо этого разбираются они" + +#~ msgid "Exec FILE, replacing this shell with the specified program." +#~ msgstr "Запустить ФАЙЛ, замещая эту копию оболочки указанной программой." + +#~ msgid "If FILE is not specified, the redirections take effect in this" +#~ msgstr "Если ФАЙЛ не задан, могут быть переназначены файловые дескрипторы." + +#~ msgid "shell. If the first argument is `-l', then place a dash in the" +#~ msgstr "Если первый аргумент `-l', в начало нулевого аргумента, переданного" + +#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option" +#~ msgstr "ФАЙЛУ, добавляется `-', как при работе login. Если задан параметр" + +#~ msgid "is supplied, FILE is executed with a null environment. The `-a'" +#~ msgstr "`-c', ФАЙЛ выполняется в пустой среде. Параметр `-a' устанавливает" + +#~ msgid "option means to make set argv[0] of the executed process to NAME." +#~ msgstr "argv[0] запущенного процесса в ИМЯ." + +#~ msgid "If the file cannot be executed and the shell is not interactive," +#~ msgstr "Если файл не может быть запущен, а оболочка не интерактивна," + +#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\"" +#~ msgstr "" +#~ "производится выход из оболочки, если только не установлена переменная" + +#~ msgid "is set." +#~ msgstr "\"no_exit_on_failed_exec\"" + +#~ msgid "is that of the last command executed." +#~ msgstr "завершения будет таким же, как у последней выполненной команды." + +#~ msgid "" +#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a" +#~ msgstr "" +#~ "ПЕРВАЯ и ПОСЛЕДНЯЯ могут быть числами, ограничивающими диапазон, или" + +#~ msgid "string, which means the most recent command beginning with that" +#~ msgstr "же ПЕРВАЯ может быть строкой, означающей самую недавнюю команду," + +#~ msgid "string." +#~ msgstr "начинающуюся с этой строки." + +#~ msgid "" +#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," +#~ msgstr "" +#~ " -e ИМЯ_РЕДАКТОРА выбирает используемый редактор. По умолчанию FCEDIT," + +#~ msgid "" +#~ " then the editor which corresponds to the current readline editing" +#~ msgstr " затем EDITOR, затем редактор, соответствуюший текущему режиму" + +#~ msgid " mode, then vi." +#~ msgstr " редактирования readline, затем vi." + +#~ msgid " -l means list lines instead of editing." +#~ msgstr " -l вывести, а не редактировать строки." + +#~ msgid " -n means no line numbers listed." +#~ msgstr " -n не выводить номера строк." + +#~ msgid "" +#~ " -r means reverse the order of the lines (making it newest listed " +#~ "first)." +#~ msgstr " -r вывести строки в обратном порядке (в начале самые новые)." + +#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" +#~ msgstr "" +#~ "В формате `fc -s [шаблон=замена] [команда] команда выполняется заново" + +#~ msgid "re-executed after the substitution OLD=NEW is performed." +#~ msgstr "после того, как произведена подстановка." + +#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" +#~ msgstr "Полезная псевдокоманда -- r='fc -s', так `r cc' выполняет последнюю" + +#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes" +#~ msgstr "команду, начинающуюся с `cc', а `r' заново выполняет последнюю" + +#~ msgid "Place JOB_SPEC in the foreground, and make it the current job. If" +#~ msgstr "" +#~ "Возвращает задачу с указанным номером из фонового режима и делает её" + +#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is" +#~ msgstr "текущей задачей. Если номер не задан, используется представление" + +#~ msgid "used." +#~ msgstr "оболочки о текущей задаче." + +#~ msgid "Place JOB_SPEC in the background, as if it had been started with" +#~ msgstr "" +#~ "Переводит задачу с указанным номером в фоновый режим, как если бы она" + +#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" +#~ msgstr "" +#~ "была запущена с `&'. Если номер не задан, используется представление" + +#~ msgid "job is used." +#~ msgstr "оболочки о текущей задаче." + +#~ msgid "For each NAME, the full pathname of the command is determined and" +#~ msgstr "Для каждого ИМЕНИ определяются и запоминаются полные пути команды." + +#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the" +#~ msgstr "Если задан параметр -p, в качестве пути используется заданный, а" + +#~ msgid "full pathname of NAME, and no path search is performed. The -r" +#~ msgstr "поиск не выполняется. Параметр -r заставляет оболочку очистить" + +#~ msgid "option causes the shell to forget all remembered locations. If no" +#~ msgstr "список положений в памяти. Если аргументы не заданы, выводится" + +#~ msgid "" +#~ "arguments are given, information about remembered commands is displayed." +#~ msgstr "информация о запомненных командах." + +#~ msgid "Display helpful information about builtin commands. If PATTERN is" +#~ msgstr "" +#~ "Вывести полезную информацию о встроенных командах. Если задан ШАБЛОН," + +#~ msgid "specified, gives detailed help on all commands matching PATTERN," +#~ msgstr "" +#~ "вывести подробную справку по всем командам, соответствующим ШАБЛОНУ," + +#~ msgid "otherwise a list of the builtins is printed." +#~ msgstr "в противном случае вывести список встроенных команд." + +#~ msgid "Display the history list with line numbers. Lines listed with" +#~ msgstr "Вывести историю команд в виде списка с номерами строк. Изменённые" + +#~ msgid "with a `*' have been modified. Argument of N says to list only" +#~ msgstr "" +#~ "строки помечаются символом `*'. Аргумент N указывает выводить только" + +#~ msgid "the last N lines. The -c option causes the history list to be" +#~ msgstr "последние N строк. Параметр -c очищает историю команд, удаляя" + +#~ msgid "" +#~ "cleared by deleting all of the entries. The `-w' option writes out the" +#~ msgstr "все строки. Параметр `-w' записывает текущую историю в указанный" + +#~ msgid "" +#~ "current history to the history file; `-r' means to read the file and" +#~ msgstr "файл; `-r' читает такой файл и дополняет его содержимым историю" + +#~ msgid "append the contents to the history list instead. `-a' means" +#~ msgstr "команд. `-a' добавляет историю этой сессии к файлу истории" + +#~ msgid "to append history lines from this session to the history file." +#~ msgstr "команд. Аргумент `-n' читает из файла истории все строки, не" + +#~ msgid "Argument `-n' means to read all history lines not already read" +#~ msgstr "прочитанные ранее, и добавляет их к истории. Если задан ФАЙЛ," + +#~ msgid "from the history file and append them to the history list. If" +#~ msgstr "в качестве файла истории команд используется он, иначе, если" + +#~ msgid "FILENAME is given, then that is used as the history file else" +#~ msgstr "переменной $HISTFILE присвоено значение, используется оно, иначе" + +#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." +#~ msgstr "используется ~/.bash_history. Если задан параметр -s, АРГУМЕНТЫ," + +#~ msgid "If the -s option is supplied, the non-option ARGs are appended to" +#~ msgstr "являющиеся параметрами, добавляются к истории как один элемент." + +#~ msgid "the history list as a single entry. The -p option means to perform" +#~ msgstr "Параметр -p выполняет развёртывание каждого АРГУМЕНТА и выводит" + +#~ msgid "" +#~ "history expansion on each ARG and display the result, without storing" +#~ msgstr "результат, не сохраняя ничего в списке истории команд." + +#~ msgid "anything in the history list." +#~ msgstr " " + +#~ msgid "Lists the active jobs. The -l option lists process id's in addition" +#~ msgstr "Выводит список активных задач. Параметр -l выводит, кроме того," + +#~ msgid "to the normal information; the -p option lists process id's only." +#~ msgstr "идентификаторы процессов: параметр -p выодит только идентификаторы." + +#~ msgid "" +#~ "If -n is given, only processes that have changed status since the last" +#~ msgstr "Если задано -n, выводятся только процессы, статус которых изменился" + +#~ msgid "" +#~ "notification are printed. JOBSPEC restricts output to that job. The" +#~ msgstr "" +#~ "со времени последнего уведомления. Если задан номер задачи, выводится" + +#~ msgid "-r and -s options restrict output to running and stopped jobs only," +#~ msgstr "только она. Параметры -r и -s выводит только работающие или только" + +#~ msgid "respectively. Without options, the status of all active jobs is" +#~ msgstr "" +#~ "остановленные задачи соответственно. Без параметров выодится статус" + +#~ msgid "" +#~ "printed. If -x is given, COMMAND is run after all job specifications" +#~ msgstr "" +#~ "всех активных задач. Если задано -x, в КОМАНДЕ вместо всех АРГУМЕНТОВ" + +#~ msgid "" +#~ "that appear in ARGS have been replaced with the process ID of that job's" +#~ msgstr "(номеров задач) подставляется идентификатор лидера соответствующей" + +#~ msgid "process group leader." +#~ msgstr "группы процессов, и КОМАНДА выполняется." + +#~ msgid "Removes each JOBSPEC argument from the table of active jobs." +#~ msgstr "" +#~ "Удаляет все задачи, заданные спецификациями в аргументе, из таблицы задач." + +#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" +#~ msgstr "" +#~ "Посылает указанным процессам (заданным PID или спецификацией) сигнал" + +#~ msgid "" +#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" +#~ msgstr "SIGSPEC. Если отсутствует SIGSPEC, посылается SIGTERM. Аргументом" + +#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to" +#~ msgstr "" +#~ "параметра `-l' служит список сигналов. Если он присутствует, выводятся" + +#~ msgid "be signal numbers for which names should be listed. Kill is a shell" +#~ msgstr "" +#~ "названия сигналов с этими номерами. Kill является встроенной командой" + +#~ msgid "builtin for two reasons: it allows job IDs to be used instead of" +#~ msgstr "оболочки по двум причинам: она позволяет использовать номера задач," + +#~ msgid "process IDs, and, if you have reached the limit on processes that" +#~ msgstr "а не процессов, и если вы исчерпаете лимит созданных процессов," + +#~ msgid "" +#~ "you can create, you don't have to start a process to kill another one." +#~ msgstr "вы не сможете запустить новый процесс, уничтожающий один из старых." + +#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" +#~ msgstr "Каждый аргумент рассматривается как арифметическое выражение." + +#~ msgid "is done in long integers with no check for overflow, though division" +#~ msgstr "" +#~ "Вычисление производится над длинными целыми без контроля переполнения," + +#~ msgid "by 0 is trapped and flagged as an error. The following list of" +#~ msgstr "хотя деление на ноль отслеживается и считается ошибкой. Операции в" + +#~ msgid "operators is grouped into levels of equal-precedence operators." +#~ msgstr "следующем списке сгруппированы по уровням равного приоритета." + +#~ msgid "The levels are listed in order of decreasing precedence." +#~ msgstr "Уровни перечислены в порядке уменьшения приоритета." + +#~ msgid "\t-, +\t\tunary minus, plus" +#~ msgstr "\t-, +\t\tунарный минус, унарный плюс" + +#~ msgid "\t!, ~\t\tlogical and bitwise negation" +#~ msgstr "\t!, ~\t\tлогическое и побитовое отрицание" + +#~ msgid "\t*, /, %\t\tmultiplication, division, remainder" +#~ msgstr "\t*, /, %\t\tумножение, деление, взятие остатка" + +#~ msgid "\t+, -\t\taddition, subtraction" +#~ msgstr "\t+, -\t\tсложение, вычитание" + +#~ msgid "\t<<, >>\t\tleft and right bitwise shifts" +#~ msgstr "\t<<, >>\t\tлевый и правый побитовый сдвиг" + +#~ msgid "\t<=, >=, <, >\tcomparison" +#~ msgstr "\t<=, >=, <, >\tсравнение" + +#~ msgid "\t==, !=\t\tequality, inequality" +#~ msgstr "\t==, !=\t\tравенство, неравенство" + +#~ msgid "\t&\t\tbitwise AND" +#~ msgstr "\t&\t\tпобитовое И" + +#~ msgid "\t^\t\tbitwise XOR" +#~ msgstr "\t^\t\tпобитовое ИСКЛЮЧАЮЩЕЕ ИЛИ" + +#~ msgid "\t|\t\tbitwise OR" +#~ msgstr "\t|\t\tпобитовое ИЛИ" + +#~ msgid "\t&&\t\tlogical AND" +#~ msgstr "\t&&\t\tлогическое И" + +#~ msgid "\t||\t\tlogical OR" +#~ msgstr "\t||\t\tлогическое ИЛИ" + +#~ msgid "\texpr ? expr : expr" +#~ msgstr "\texpt ? expr : expr" + +#~ msgid "\t\t\tconditional expression" +#~ msgstr "\t\t\tусловное выражение" + +#~ msgid "\t=, *=, /=, %=," +#~ msgstr "\t=, *=, /=, %=," + +#~ msgid "\t+=, -=, <<=, >>=," +#~ msgstr "\t+=, -=, <<=, >>=," + +#~ msgid "\t&=, ^=, |=\tassignment" +#~ msgstr "\t&=, ^=, |=\tприсваивание" + +#~ msgid "is replaced by its value (coerced to a long integer) within" +#~ msgstr "переменной заменяется её значение (преобразованным в длинное" + +#~ msgid "an expression. The variable need not have its integer attribute" +#~ msgstr "целое). Для использования в выражении переменная не обязана иметь" + +#~ msgid "turned on to be used in an expression." +#~ msgstr "установленный целочисленный атрибут." + +#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in" +#~ msgstr "Операции обрабатываются в порядке приоритета. Подвыражения в" + +#~ msgid "parentheses are evaluated first and may override the precedence" +#~ msgstr "скобках вычисляются вначале, что может не соответствовать правилам" + +#~ msgid "rules above." +#~ msgstr "приоритета." + +#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" +#~ msgstr "Если вычисление последнего аргумента дало 0, let возвращает 1," + +#~ msgid "otherwise." +#~ msgstr "иначе 0." + +#~ msgid "One line is read from the standard input, and the first word is" +#~ msgstr "Со стандартного ввода считывается одна строка, первое её слово" + +#~ msgid "" +#~ "assigned to the first NAME, the second word to the second NAME, and so" +#~ msgstr "становится значением первого ИМЕНИ, второе -- второго ИМЕНИ и т.д." + +#~ msgid "" +#~ "on, with leftover words assigned to the last NAME. Only the characters" +#~ msgstr "" +#~ "Последнему ИМЕНИ присваивается весь остаток строки. Разделителями слов" + +#~ msgid "found in $IFS are recognized as word delimiters. The return code is" +#~ msgstr "считаются только символы, входящие в $IFS. Код возврата равен нулю," + +#~ msgid "" +#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the" +#~ msgstr "за исключением случая, если встретился конец файла. Если ИМЕНА не" + +#~ msgid "" +#~ "line read is stored in the REPLY variable. If the -r option is given," +#~ msgstr "" +#~ "заданы, прочитанная строка помещается в переменную REPLY. Если задан" + +#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If" +#~ msgstr "" +#~ "параметр -r, это означает `сырой' ввод, т.е. символ \\ не экранирует" + +#~ msgid "the `-p' option is supplied, the string supplied as an argument is" +#~ msgstr "" +#~ "символы. Если задано `-p', перед чтением на вывод в качестве аргумента" + +#~ msgid "" +#~ "output without a trailing newline before attempting to read. If -a is" +#~ msgstr "" +#~ "подаётся заданная строка (без завершающего символа перевода строки)." + +#~ msgid "" +#~ "supplied, the words read are assigned to sequential indices of ARRAY," +#~ msgstr "Если задано -a, прочитанные слова становятся значениями элементов" + +#~ msgid "starting at zero. If -e is supplied and the shell is interactive," +#~ msgstr "" +#~ "МАССИВА, начиная с нулевого. Если задано -c и оболочка интерактивна," + +#~ msgid "readline is used to obtain the line." +#~ msgstr "чтобы получить строку используется readline." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N" +#~ msgstr "Заставляет функцию завершить работу с кодом возврата, заданным N." + +#~ msgid "is omitted, the return status is that of the last command." +#~ msgstr "Если N опущено, им становится код возврата последней команды." + +#~ msgid " -a Mark variables which are modified or created for export." +#~ msgstr "" +#~ " -a Экспортировать переменные, которые изменялись или создавались." + +#~ msgid " -b Notify of job termination immediately." +#~ msgstr " -b Немедленно выводить сообщения о завершении задач." + +#~ msgid " -e Exit immediately if a command exits with a non-zero status." +#~ msgstr " -e Завершить работу, если команд возврата команды не равен 0." + +#~ msgid " -f Disable file name generation (globbing)." +#~ msgstr " -f Прекратить расширение имён файлов (globbing)." + +#~ msgid " -h Remember the location of commands as they are looked up." +#~ msgstr " -h Запоминать расположение обработанных команд." + +#~ msgid "" +#~ " -i Force the shell to be an \"interactive\" one. Interactive shells" +#~ msgstr " -i Сделать оболочку \"интерактивной\". Интерактивные оболочки" + +#~ msgid " always read `~/.bashrc' on startup." +#~ msgstr " читают `~/.bashrc' при каждом запуске." + +#~ msgid " -k All assignment arguments are placed in the environment for a" +#~ msgstr " -k В среду команды помещаются все аргументы присваивания," + +#~ msgid " command, not just those that precede the command name." +#~ msgstr " а не только предшествующие её имени." + +#~ msgid " -m Job control is enabled." +#~ msgstr " -m Включить управление задачами." + +#~ msgid " -n Read commands but do not execute them." +#~ msgstr " -n Считывать команды, но не выполнять их." + +#~ msgid " -o option-name" +#~ msgstr " -o имя_параметра" + +#~ msgid " Set the variable corresponding to option-name:" +#~ msgstr " Установить режим в соответствии с заданным именем:" + +#~ msgid " allexport same as -a" +#~ msgstr " allexport то же, что -a" + +#~ msgid " braceexpand same as -B" +#~ msgstr " braceexpand то же, что -B" + +#~ msgid " emacs use an emacs-style line editing interface" +#~ msgstr "" +#~ " emacs использовать стиль редактирования строк emacs" + +#~ msgid " errexit same as -e" +#~ msgstr " errexit то же, что -e" + +#~ msgid " hashall same as -h" +#~ msgstr " hashall то же, что -h" + +#~ msgid " histexpand same as -H" +#~ msgstr " histexpand то же, что -H" + +#~ msgid " ignoreeof the shell will not exit upon reading EOF" +#~ msgstr " ignoreeof при чтении EOF оболочка не завершит работу" + +#~ msgid " interactive-comments" +#~ msgstr " interactive-comments" + +#~ msgid "" +#~ " allow comments to appear in interactive commands" +#~ msgstr "" +#~ " допускает комментарии в интерактивных командах" + +#~ msgid " keyword same as -k" +#~ msgstr " keyword то же, что -k" + +#~ msgid " monitor same as -m" +#~ msgstr " monitor то же, что -m" + +#~ msgid " noclobber same as -C" +#~ msgstr " noclobber то же, что -C" + +#~ msgid " noexec same as -n" +#~ msgstr " noexec то же, что -n" + +#~ msgid " noglob same as -f" +#~ msgstr " noglob то же, что -f" + +#~ msgid " notify save as -b" +#~ msgstr " notify то же, что -b" + +#~ msgid " nounset same as -u" +#~ msgstr " nounset то же, что -u" + +#~ msgid " onecmd same as -t" +#~ msgstr " onecmd то же, что -t" + +#~ msgid " physical same as -P" +#~ msgstr " physical то же, что -P" + +#~ msgid "" +#~ " posix change the behavior of bash where the default" +#~ msgstr " posix привести поведение bash, по умолчанию не" + +#~ msgid "" +#~ " operation differs from the 1003.2 standard to" +#~ msgstr " соответствующее стандарту 1003.2, в" + +#~ msgid " match the standard" +#~ msgstr " соответствие с ним" + +#~ msgid " privileged same as -p" +#~ msgstr " privileged то же, что -p" + +#~ msgid " verbose same as -v" +#~ msgstr " verbose то же, что -v" + +#~ msgid " vi use a vi-style line editing interface" +#~ msgstr " vi использовать стиль редактирования строк vi" + +#~ msgid " xtrace same as -x" +#~ msgstr " xtrace то же, что -x" + +#~ msgid "" +#~ " -p Turned on whenever the real and effective user ids do not match." +#~ msgstr "" +#~ " -p Если реальный и эффективный uid не совпадают, включается всегда." + +#~ msgid " Disables processing of the $ENV file and importing of shell" +#~ msgstr " Отключает обработку файла $ENV и импорт функций оболочки." + +#~ msgid "" +#~ " functions. Turning this option off causes the effective uid and" +#~ msgstr "" +#~ " При выключении этого параметра эффективные uid и gid становятся" + +#~ msgid " gid to be set to the real uid and gid." +#~ msgstr " равными реальным." + +#~ msgid " -t Exit after reading and executing one command." +#~ msgstr " -t Завершить работу после чтения и выполнения одной команды." + +#~ msgid " -u Treat unset variables as an error when substituting." +#~ msgstr "" +#~ " -u При подстановке считать не установленные переменные ошибками." + +#~ msgid " -v Print shell input lines as they are read." +#~ msgstr " -v Выводить прочитанные строки входного текста оболочки." + +#~ msgid " -x Print commands and their arguments as they are executed." +#~ msgstr " -x Выводить по мере исполнения команд и их аргументы." + +#~ msgid " -B the shell will perform brace expansion" +#~ msgstr " -B оболочка будет производить подстановку скобок" + +#~ msgid " -H Enable ! style history substitution. This flag is on" +#~ msgstr " -H Включить !-стиль подстановки истории. Включено" + +#~ msgid " by default." +#~ msgstr " по умолчанию." + +#~ msgid " -C If set, disallow existing regular files to be overwritten" +#~ msgstr " -C Если установлен, запретить перезапись существующих" + +#~ msgid " by redirection of output." +#~ msgstr " обычных файлов при перенаправлении вывода." + +#~ msgid " -P If set, do not follow symbolic links when executing commands" +#~ msgstr "" +#~ " -P Не следовать символическим ссылкам при выполнении таких команд," + +#~ msgid " such as cd which change the current directory." +#~ msgstr " как cd, т.е. изменяющих текущий каталог." + +#~ msgid "Using + rather than - causes these flags to be turned off. The" +#~ msgstr "Использование + вместо - отключает флаг. Эти флаги могут также" + +#~ msgid "flags can also be used upon invocation of the shell. The current" +#~ msgstr "" +#~ "использоваться при запуске оболочки. Текущий набор флагов содержится" + +#~ msgid "" +#~ "set of flags may be found in $-. The remaining n ARGs are positional" +#~ msgstr "в $-. Остальные n аргументов -- позиционные параметры, и им, по" + +#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" +#~ msgstr "порядку, присваиваются значения $1, $2, ..., $n. Если аргументы" + +#~ msgid "ARGs are given, all shell variables are printed." +#~ msgstr "не заданы, выводятся все переменные оболочки." + +#~ msgid "For each NAME, remove the corresponding variable or function. Given" +#~ msgstr "Для каждого ИМЕНИ удаляет соответствующую переменную или функцию." + +#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag," +#~ msgstr "" +#~ "Если задано -v, unset влияет только на переменные, если -f -- только" + +#~ msgid "unset will only act on functions. With neither flag, unset first" +#~ msgstr "на функции. Без флагов unset в первую очередь пытается удалить" + +#~ msgid "tries to unset a variable, and if that fails, then tries to unset a" +#~ msgstr "переменную, если это не удаётся -- функцию. Некоторые переменные" + +#~ msgid "" +#~ "function. Some variables (such as PATH and IFS) cannot be unset; also" +#~ msgstr "(такие как PATH и IFS) не могут быть удалены. См." + +#~ msgid "see readonly." +#~ msgstr "также readonly." + +#~ msgid "NAMEs are marked for automatic export to the environment of" +#~ msgstr "ИМЕНА автоматически экспортируются в среду выполняемых" + +#~ msgid "subsequently executed commands. If the -f option is given," +#~ msgstr "впоследствии команд. Если задан параметр -f, ИМЕНА" + +#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" +#~ msgstr "обозначают функции. Если ИМЕНа не заданы, или если задано -p," + +#~ msgid "is given, a list of all names that are exported in this shell is" +#~ msgstr "выводится список всех имён, экспортированных в эту оболочку." + +#~ msgid "printed. An argument of `-n' says to remove the export property" +#~ msgstr "Аргумент -n указывает убрать заданные имена из списка" + +#~ msgid "from subsequent NAMEs. An argument of `--' disables further option" +#~ msgstr "экспортируемых. Аргумент -- отключает дальнейшую обработку" + +#~ msgid "processing." +#~ msgstr "параметров." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may" +#~ msgstr "" +#~ "Заданные ИМЕНА помечаются только для чтения, и значения этих ИМЁН не" + +#~ msgid "not be changed by subsequent assignment. If the -f option is given," +#~ msgstr "" +#~ "могут изменяться в последующих присваиваниях. Если задан параметр -f," + +#~ msgid "then functions corresponding to the NAMEs are so marked. If no" +#~ msgstr "так помечаются функции с соответствующими ИМЕНАМИ. Если аргументы" + +#~ msgid "" +#~ "arguments are given, or if `-p' is given, a list of all readonly names" +#~ msgstr "не заданы, или если задано `-p', выводится список имён только для" + +#~ msgid "" +#~ "is printed. An argument of `-n' says to remove the readonly property" +#~ msgstr "чтения. Аргумент `-n' указывает снять свойство `только для чтения'" + +#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as" +#~ msgstr "с указанных ИМЁН. Параметр `-a' заставляет рассматривать каждое ИМЯ" + +#~ msgid "an array variable. An argument of `--' disables further option" +#~ msgstr "как массив. Аргумент `--' прекращает дальнейшую обработку" + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is" +#~ msgstr "" +#~ "Позиционные параметры начиная с $N+1 переобозначаются как $1,... Если" + +#~ msgid "not given, it is assumed to be 1." +#~ msgstr "N не задано, оно предполагается равным 1." + +#~ msgid "Read and execute commands from FILENAME and return. The pathnames" +#~ msgstr "Читает и выполняет команды из файла с заданным именем и завершает" + +#~ msgid "in $PATH are used to find the directory containing FILENAME." +#~ msgstr "работу. Файл ищется в каталогах, перечисленных в $PATH." + +#~ msgid "Suspend the execution of this shell until it receives a SIGCONT" +#~ msgstr "Приостанавливает работу оболочки до получения сигнала" + +#~ msgid "signal. The `-f' if specified says not to complain about this" +#~ msgstr "SIGCONT. `-f', если задан, указывает приостановить работу, даже" + +#~ msgid "being a login shell if it is; just suspend anyway." +#~ msgstr "если это оболочка сессии" + +#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on" +#~ msgstr "Завершает работу со статусом 0 (истина) или 1 (ложь) в зависимости" + +#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" +#~ msgstr "от значения ВЫРАЖЕНИЯ. Выражения могут быть унарными или бинарными." + +#~ msgid "expressions are often used to examine the status of a file. There" +#~ msgstr "Унарные выражения часто используются для проверки состояния файла." + +#~ msgid "are string operators as well, and numeric comparison operators." +#~ msgstr "Допустимы операции как строкового, так и численного сравнения." + +#~ msgid "File operators:" +#~ msgstr "Файловые операции:" + +#~ msgid " -b FILE True if file is block special." +#~ msgstr " -b ФАЙЛ Истина, если файл -- специальный блочный файл." + +#~ msgid " -c FILE True if file is character special." +#~ msgstr "" +#~ " -c ФАЙл Истина, если файл -- специальный символьный файл." + +#~ msgid " -d FILE True if file is a directory." +#~ msgstr " -d ФАЙЛ Истина, если файл -- каталог." + +#~ msgid " -e FILE True if file exists." +#~ msgstr " -e ФАЙЛ Истина, если файл существует." + +#~ msgid " -f FILE True if file exists and is a regular file." +#~ msgstr "" +#~ " -f ФАЙЛ Истина, если файл существует и является обычным файлом." + +#~ msgid " -g FILE True if file is set-group-id." +#~ msgstr " -g ФАЙЛ Истина, если у файла установлен атрибут SGID." + +#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"." +#~ msgstr "" +#~ " -h ФАЙЛ Истина, если файл -- символическая ссылка. Используйте " +#~ "\"-L\"." + +#~ msgid " -L FILE True if file is a symbolic link." +#~ msgstr " -L ФАЙЛ Истина, если файл -- символическая ссылка." + +#~ msgid " -k FILE True if file has its \"sticky\" bit set." +#~ msgstr "" +#~ " -k ФАЙЛ Истина, если у файла устанолвен \"бит привязчивости\"." + +#~ msgid " -p FILE True if file is a named pipe." +#~ msgstr " -p ФАЙЛ Истина, если файл -- именованный канал." + +#~ msgid " -r FILE True if file is readable by you." +#~ msgstr " -r ФАЙЛ Истина, если файл доступен вам для чтения." + +#~ msgid " -s FILE True if file exists and is not empty." +#~ msgstr " -s ФАЙЛ Истина, если файл существует и не пуст." + +#~ msgid " -S FILE True if file is a socket." +#~ msgstr " -S ФАЙЛ Истина, если файл -- сокет." + +#~ msgid " -t FD True if FD is opened on a terminal." +#~ msgstr "" +#~ " -t FD Истина, если файл с дескриптором FD связан с " +#~ "терминалом." + +#~ msgid " -u FILE True if the file is set-user-id." +#~ msgstr " -u ФАЙЛ Истина, если у файла установлен атрибут SUID." + +#~ msgid " -w FILE True if the file is writable by you." +#~ msgstr " -w ФАЙЛ Истина, если файл доступен вам для записи" + +#~ msgid " -x FILE True if the file is executable by you." +#~ msgstr " -x ФАЙЛ Истина, если файл доступен вам для выполнения." + +#~ msgid " -O FILE True if the file is effectively owned by you." +#~ msgstr " -O ФАЙЛ Истина, если вы -- эффективный владелец файла." + +#~ msgid "" +#~ " -G FILE True if the file is effectively owned by your group." +#~ msgstr "" +#~ " -G ФАЙЛ Истина, если ваша группа -- эффективная группа файла." + +#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to" +#~ msgstr "" +#~ " ФАЙЛ1 -nt ФАЙЛ2 Истина, если файл1 более новый (по дате последнего" + +#~ msgid " modification date) file2." +#~ msgstr " изменения), чем файл2." + +#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2." +#~ msgstr " ФАЙЛ1 -ot ФАЙЛ2 Истина, если файл1 более старый, чем файл2." + +#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." +#~ msgstr " ФАЙЛ1 -ef ФАЙЛ2 Истина, если файл1 -- жёсткая ссылка на файл2." + +#~ msgid "String operators:" +#~ msgstr "Строковые операции:" + +#~ msgid " -z STRING True if string is empty." +#~ msgstr " -z СТРОКА Истина, если строка пуста." + +#~ msgid " -n STRING" +#~ msgstr " -n СТРОКА" + +#~ msgid " STRING True if string is not empty." +#~ msgstr " СТРОКА Истина, если стркоа не пуста." + +#~ msgid " STRING1 = STRING2" +#~ msgstr " СТРОКА1 = СТРОКА2" + +#~ msgid " True if the strings are equal." +#~ msgstr " Истина, если строки равны." + +#~ msgid " STRING1 != STRING2" +#~ msgstr " СТРОКА1 != СТРОКА2" + +#~ msgid " True if the strings are not equal." +#~ msgstr " Истина, если строки не равны." + +#~ msgid " STRING1 < STRING2" +#~ msgstr " СТРОКА1 < СТРОКА2" + +#~ msgid "" +#~ " True if STRING1 sorts before STRING2 lexicographically" +#~ msgstr "" +#~ " Истина, если СТРОКА1 лексикографически стоит раньше " +#~ "СТРОКИ2" + +#~ msgid " STRING1 > STRING2" +#~ msgstr " СТРОКА1 > СТРОКА2" + +#~ msgid "" +#~ " True if STRING1 sorts after STRING2 lexicographically" +#~ msgstr "" +#~ " Истина, если СТРОКА1 лексикографически стоит позже " +#~ "СТРОКИ2" + +#~ msgid "Other operators:" +#~ msgstr "Прочие операции:" + +#~ msgid " ! EXPR True if expr is false." +#~ msgstr " ! ВЫРАЖЕНИЕ Истина, если выражение ложно." + +#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." +#~ msgstr " ВЫР1 -a ВЫР2 Истина, если истинны оба выражения." + +#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." +#~ msgstr " ВЫР1 -o ВЫР2 Истина, если истинно хотя бы одно из выражений." + +#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," +#~ msgstr " арг1 ОП арг2 Арифметическая проверка. ОП -- один из -eq, -ne," + +#~ msgid " -lt, -le, -gt, or -ge." +#~ msgstr " -lt, -le, -gt или -ge." + +#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal," +#~ msgstr "" +#~ "Бинарные арифметические операции возвращают истину, если АРГ1 равен," + +#~ msgid "" +#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" +#~ msgstr "не равен, меньше, меньше или равен, больше или больше или равен" + +#~ msgid "than ARG2." +#~ msgstr "АРГ2." + +#~ msgid "This is a synonym for the \"test\" builtin, but the last" +#~ msgstr "Это синоним встроенной команды \"test\", но последним аргументом" + +#~ msgid "argument must be a literal `]', to match the opening `['." +#~ msgstr "должен быть литерал ']'. соответствующий открывающей `['." + +#~ msgid "Print the accumulated user and system times for processes run from" +#~ msgstr "Вывести пользовательское и системное время работы процессов," + +#~ msgid "the shell." +#~ msgstr "запущенных из оболочки." + +#~ msgid "The command ARG is to be read and executed when the shell receives" +#~ msgstr "" +#~ "Команда АРГ должна быть прочитана и выполнена при получении оболочкой" + +#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" +#~ msgstr "" +#~ "указанного(ых) сигнала(ов). Если АРГ не задан, все указанные сигналы" + +#~ msgid "reset to their original values. If ARG is the null string each" +#~ msgstr "" +#~ "обрабатываются обработчиками по умолчанию. Если АРГ -- пустая строка," + +#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." +#~ msgstr "" +#~ "все указанные сигналы будут игнорироваться оболочкой и вызываемыми ей" + +#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" +#~ msgstr "командами. Если задан сигнал EXIT (0), команда АРГ выполняется при" + +#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every" +#~ msgstr "" +#~ "выходе из оболочки, если DEBUG, АРГ выполняется при выполнении каждой" + +#~ msgid "command. If ARG is `-p' then the trap commands associated with" +#~ msgstr "команды. Если АРГ -- `-p', выводятся команды, связанные с заданными" + +#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" +#~ msgstr "сигналами. Если аргументы не заданы или если задано только `-p'," + +#~ msgid "only `-p' is given, trap prints the list of commands associated with" +#~ msgstr "trap выводит список команд, связанных со всеми сигналами. Сигнал" + +#~ msgid "" +#~ "each signal number. SIGNAL_SPEC is either a signal name in " +#~ msgstr "задаётся либо своим именем в , либо номером. `trap -l'" + +#~ msgid "" +#~ "or a signal number. `trap -l' prints a list of signal names and their" +#~ msgstr "выводит список имён сигналов и соответствующих им номеров." + +#~ msgid "corresponding numbers. Note that a signal can be sent to the shell" +#~ msgstr "Заметьте, что оболочке можно послать сигнал командой" + +#~ msgid "with \"kill -signal $$\"." +#~ msgstr "\"kill -signal $$\"." + +#~ msgid "For each NAME, indicate how it would be interpreted if used as a" +#~ msgstr "Для каждого ИМЕНИ определяет, как оно будет обрабатываться" + +#~ msgid "If the -t option is used, returns a single word which is one of" +#~ msgstr "Если задан параметр -t, возвращает слово -- `alias', `keyword'," + +#~ msgid "" +#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" +#~ msgstr "`function', `builtin', `file' или `' -- если, соответственно, ИМЯ" + +#~ msgid "" +#~ "alias, shell reserved word, shell function, shell builtin, disk file," +#~ msgstr "является псевдокомандой, зарезервированным словом, функцией, или" + +#~ msgid "or unfound, respectively." +#~ msgstr "встроенной командой оболочки, дисковым файлом или не найдено." + +#~ msgid "If the -p flag is used, either returns the name of the disk file" +#~ msgstr "" +#~ "При использовании флага -p либо возвращается имя выполняемого дискового " +#~ "файла," + +#~ msgid "that would be executed, or nothing if -t would not return `file'." +#~ msgstr "либо ничего, если -t вернуло бы значение, отличное от `file'" + +#~ msgid "If the -a flag is used, displays all of the places that contain an" +#~ msgstr "" +#~ "При использовании флага -a выводится расположение всех исполняемых файлов" + +#~ msgid "" +#~ "executable named `file'. This includes aliases and functions, if and" +#~ msgstr "" +#~ "с указанным именем. Если одновременно не используется флаг -p и только" + +#~ msgid "only if the -p flag is not also used." +#~ msgstr "тогда, выводятся также псевдокоманды и функции." + +#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t," +#~ msgstr "Вместо -a, -p и -t можно использовать, соответственно, -all," + +#~ msgid "respectively." +#~ msgstr "-path и -type." + +#~ msgid "Ulimit provides control over the resources available to processes" +#~ msgstr "ulimit позволяет управлять ресурсами, доступными запущенным" + +#~ msgid "started by the shell, on systems that allow such control. If an" +#~ msgstr "оболочкой процессам (на системах, допускающих такое управление)." + +#~ msgid "option is given, it is interpreted as follows:" +#~ msgstr "Параметры интерпретируются следующим образом:" + +#~ msgid " -S\tuse the `soft' resource limit" +#~ msgstr " -S\tиспользовать `мягкое' ограничение ресурсов" + +#~ msgid " -H\tuse the `hard' resource limit" +#~ msgstr " -H\tиспользовать `жёсткое' ограничение ресурсов" + +#~ msgid " -a\tall current limits are reported" +#~ msgstr " -a\tвывести информацию о всех текущих ограничениях" + +#~ msgid " -c\tthe maximum size of core files created" +#~ msgstr " -c\tмаксимальный размер создаваемых файлов слепков памяти" + +#~ msgid " -d\tthe maximum size of a process's data segment" +#~ msgstr " -d\tмаксимальный размер сегмента данных процесса" + +#~ msgid " -m\tthe maximum resident set size" +#~ msgstr " -m\tмаксимальный размер резидентной части процесса" + +#~ msgid " -s\tthe maximum stack size" +#~ msgstr " -s\tмаксимальный размер стека" + +#~ msgid " -t\tthe maximum amount of cpu time in seconds" +#~ msgstr " -t\tмаксимальное процессорное время (в секундах)" + +#~ msgid " -f\tthe maximum size of files created by the shell" +#~ msgstr " -f\tмаксимальный размер создаваемых оболочкой файлов" + +#~ msgid " -p\tthe pipe buffer size" +#~ msgstr " -p\tразмер буфера конвейера" + +#~ msgid " -n\tthe maximum number of open file descriptors" +#~ msgstr " -n\tмаксимальное количество открытых файловых дексрипторов" + +#~ msgid " -u\tthe maximum number of user processes" +#~ msgstr " -u\tмаксимальное число процессов одного пользователя" + +#~ msgid " -v\tthe size of virtual memory" +#~ msgstr " -v\tразмер виртуальной памяти" + +#~ msgid "If LIMIT is given, it is the new value of the specified resource." +#~ msgstr "" +#~ "Если задано ОГРАНИЧЕНИЕ, оно задёт новое значение для указанного ресурса." + +#~ msgid "Otherwise, the current value of the specified resource is printed." +#~ msgstr "" +#~ "В противном случае выводится текущее значение для указанного ресурса." + +#~ msgid "If no option is given, then -f is assumed. Values are in 1k" +#~ msgstr "Если параметры не заданы, предполагается, что задано -f. Значения" + +#~ msgid "increments, except for -t, which is in seconds, -p, which is in" +#~ msgstr "" +#~ "измеряются в КБ, кроме -t, измеряемого в секундах, -p, единица измерения" + +#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of" +#~ msgstr "которого -- 512 байтов, и -u, задающего безразмерное число" + +#~ msgid "processes." +#~ msgstr "процессов." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if" +#~ msgstr "" +#~ "Устанавливает маску создания пользователем файлов в РЕЖИМ. Если опущен" + +#~ msgid "" +#~ "`-S' is supplied, the current value of the mask is printed. The `-S'" +#~ msgstr "" +#~ "РЕЖИМ или задан параметр -S выводится текущее значение маски. Параметр" + +#~ msgid "" +#~ "option makes the output symbolic; otherwise an octal number is output." +#~ msgstr "-S делает вывод символическим, в противном случае используется" + +#~ msgid "If MODE begins with a digit, it is interpreted as an octal number," +#~ msgstr "" +#~ "восьмеричое число. Если РЕЖИм начинается с цифры, он интерпретируется" + +#~ msgid "" +#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)." +#~ msgstr "" +#~ "как восьмеричное число, в противном случае как строка, принимаемая " +#~ "chmod(1)." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If" +#~ msgstr "" +#~ "Подождать завершения указанного процесса и сообщить код завершения. Если" + +#~ msgid "N is not given, all currently active child processes are waited for," +#~ msgstr "" +#~ "N не задано, ожидается завершение работы всех активных дочерних процессов" + +#~ msgid "and the return code is zero. N may be a process ID or a job" +#~ msgstr "и код возврата равен 0. N может быть идентификатором процесса" + +#~ msgid "specification; if a job spec is given, all processes in the job's" +#~ msgstr "" +#~ "или спецификацией задачи, если задана спецификация задачи, ожидается" + +#~ msgid "pipeline are waited for." +#~ msgstr "завершение работы всех процессов конвейера задачи." + +#~ msgid "and the return code is zero. N is a process ID; if it is not given," +#~ msgstr "" +#~ "и код возврата равен 0. N -- идентификатор процесса, если он не задан," + +#~ msgid "all child processes of the shell are waited for." +#~ msgstr "ожидается завершение работы всех дочерних процессов оболочки." + +#~ msgid "The `for' loop executes a sequence of commands for each member in a" +#~ msgstr "Цикл `for' выполняет последовательность команд для каждого члена" + +#~ msgid "" +#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" +#~ msgstr "" +#~ "списка. Если отсутствует `in СЛОВА ...;', предполагается, что задано" + +#~ msgid "" +#~ "assumed. For each element in WORDS, NAME is set to that element, and" +#~ msgstr "`in \"$@\"'. Для каждого из СЛОВ ИМЕНИ присваивается его значение" + +#~ msgid "the COMMANDS are executed." +#~ msgstr "и затем выполняются КОМАНДЫ." + +#~ msgid "The WORDS are expanded, generating a list of words. The" +#~ msgstr "СЛОВА разворачиваются и образуют список слов. Полученный список" + +#~ msgid "set of expanded words is printed on the standard error, each" +#~ msgstr "" +#~ "выводится на стандартный поток ошибок, каждому приписывается спереди" + +#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" +#~ msgstr "число. Если `in СЛОВА' отсутствует, предполагается заданным" + +#~ msgid "is assumed. The PS3 prompt is then displayed and a line read" +#~ msgstr "" +#~ "`in \"$@\"'. Затем выводится приглашение PS3 и со стандартного ввода" + +#~ msgid "from the standard input. If the line consists of the number" +#~ msgstr "считывается строка. Если строка состоит из числа, соответствующего" + +#~ msgid "corresponding to one of the displayed words, then NAME is set" +#~ msgstr "одному из выведенных слов, ИМЯ устанавливается равным этому" + +#~ msgid "to that word. If the line is empty, WORDS and the prompt are" +#~ msgstr "слову. Если строка пуста, слова и приглашение выводятся ещё раз." + +#~ msgid "redisplayed. If EOF is read, the command completes. Any other" +#~ msgstr "Если прочитан символ конца файла, выполнение команды завершается." + +#~ msgid "value read causes NAME to be set to null. The line read is saved" +#~ msgstr "любое другое значение устанавливает ИМЯ в NULL. Прочитанная строка" + +#~ msgid "in the variable REPLY. COMMANDS are executed after each selection" +#~ msgstr "сохраняется в переменной REPLY. После каждого выбора выполняются" + +#~ msgid "until a break or return command is executed." +#~ msgstr "" +#~ "КОМАНДЫ до тех пор, пока не будет выполнена команда break или return." + +#~ msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" +#~ msgstr "" +#~ "Выполняет КОМАНДЫ в зависимости от того, какому ШАБЛОНУ соответствует" + +#~ msgid "`|' is used to separate multiple patterns." +#~ msgstr "" +#~ "СЛОВО. Для разделения нескольких допустимых шаблонов используется `|'." + +#~ msgid "" +#~ "The if COMMANDS are executed. If the exit status is zero, then the then" +#~ msgstr "" +#~ "Выполняются КОМАНДЫ, заданные в if. Если код возврата нулевой, выполняются" + +#~ msgid "" +#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" +#~ msgstr "КОМАНДЫ then, иначе по очереди выполняются КОМАНДЫ elif, и если код" + +#~ msgid "" +#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS" +#~ msgstr "" +#~ "возврата нулевой, выполняются соответствующие КОМАНДЫ then и выполнение" + +#~ msgid "" +#~ "are executed and the if command completes. Otherwise, the else COMMANDS" +#~ msgstr "" +#~ "команды if завершается. В противном случае выполняются КОМАНДЫ else," + +#~ msgid "" +#~ "are executed, if present. The exit status is the exit status of the last" +#~ msgstr "если они присутствуют. Код возврата равен коду возврата последней" + +#~ msgid "command executed, or zero if no condition tested true." +#~ msgstr "" +#~ "выполненной команды, либо нулю, если ни одно условие не было истинным." + +#~ msgid "Expand and execute COMMANDS as long as the final command in the" +#~ msgstr "" +#~ "Разворачивает и выполняет КОМАНДЫ до тех пор, пока последняя команда" + +#~ msgid "`while' COMMANDS has an exit status of zero." +#~ msgstr "предложения `while' не завершит работу с нулевым кодом возврата." + +#~ msgid "`until' COMMANDS has an exit status which is not zero." +#~ msgstr "предложения `until' не завершит работу с ненулевым кодом возврата." + +#~ msgid "Create a simple command invoked by NAME which runs COMMANDS." +#~ msgstr "Создаёт простую команду, вызываемую по ИМЕНИ и выполняющую КОМАНДЫ." + +#~ msgid "Arguments on the command line along with NAME are passed to the" +#~ msgstr "Аргументы командной строки, переданные ИМЕНИ, передаются в функцию" + +#~ msgid "function as $0 .. $n." +#~ msgstr "как $0 .. $n." + +#~ msgid "Run a set of commands in a group. This is one way to redirect an" +#~ msgstr "Выполняет набор команд. Это один из способов осуществить" + +#~ msgid "entire set of commands." +#~ msgstr "перенаправление для целого набора команд." + +#~ msgid "This is similar to the `fg' command. Resume a stopped or background" +#~ msgstr "" +#~ "Похоже на команду `fg'. Продолжает выполнение остановленной или фоновой" + +#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify" +#~ msgstr "" +#~ "задачи. Если заданы ЦИФРЫ, использяется задача с этим номером, а если" + +#~ msgid "" +#~ "WORD, then the job whose name begins with WORD is used. Following the" +#~ msgstr "СЛОВО -- задача, имя которой начинается с этого слова. Завершение" + +#~ msgid "job specification with a `&' places the job in the background." +#~ msgstr "спецификации задачи символом & переводит задачу в фоновый режим." + +#~ msgid "BASH_VERSION The version numbers of this Bash." +#~ msgstr "BASH_VERSION Номер версии Bash." + +#~ msgid "CDPATH A colon separated list of directories to search" +#~ msgstr "CDPATH Разделённый запятыми список каталогов, где ищется" + +#~ msgid "\t\twhen the argument to `cd' is not found in the current" +#~ msgstr "\t\tаргумент команды `cd', если он не найден в текущем" + +#~ msgid "" +#~ "HISTFILE The name of the file where your command history is stored." +#~ msgstr "HISTFILE Имя файла, где сохраняется история команд." + +#~ msgid "HISTFILESIZE The maximum number of lines this file can contain." +#~ msgstr "HISTFILESIZE Максимальное число строк в этом файле." + +#~ msgid "HISTSIZE The maximum number of history lines that a running" +#~ msgstr "HISTSIZE Максимальное число строк истории команд, к которым" + +#~ msgid "\t\tshell can access." +#~ msgstr "\t\tимеет доступ оболочка." + +#~ msgid "HOME The complete pathname to your login directory." +#~ msgstr "HOME Полный путь к домашнему каталогу." + +#~ msgid "" +#~ "HOSTTYPE The type of CPU this version of Bash is running under." +#~ msgstr "" +#~ "HOSTTYPE Тип процессора, на котором работает эта версия Bash." + +#~ msgid "" +#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF" +#~ msgstr "" +#~ "IGNOREEOF Управляет действиями, совершаемыми оболочкой при вводе" + +#~ msgid "\t\tcharacter as the sole input. If set, then the value" +#~ msgstr "\t\tсимвола конца файла. Если установлена, её значение -- число" + +#~ msgid "\t\tof it is the number of EOF characters that can be seen" +#~ msgstr "\t\tсимволов конца файла, которые могут быть встречены подряд," + +#~ msgid "\t\tin a row on an empty line before the shell will exit" +#~ msgstr "\t\tв пустой строке, после чего оболочка завершит работу" + +#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input." +#~ msgstr "" +#~ "\t\t(по умолчанию 10). Если не установлена, EOF обозначает конец ввода." + +#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." +#~ msgstr "" +#~ "MAILCHECK\tКак часто, в секундах, Bash проверяет наличие новой почты." + +#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" +#~ msgstr "MAILPATH\tРазделённый запятыми список имён файлов, где Bash" + +#~ msgid "\t\tfor new mail." +#~ msgstr "\t\tпроверяет наличие новой почты." + +#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." +#~ msgstr "OSTYPE\t\tВерсия Unix, под которой работает эта версия Bash." + +#~ msgid "PATH A colon-separated list of directories to search when" +#~ msgstr "PATH Разделённый запятыми список каталогов, где ищутся" + +#~ msgid "\t\tlooking for commands." +#~ msgstr "\t\tкоманды." + +#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each" +#~ msgstr "PROMPT_COMMAND Команда, выполняемая перед выводом каждого" + +#~ msgid "\t\tprimary prompt." +#~ msgstr "\t\tпервичного приглашения." + +#~ msgid "PS1 The primary prompt string." +#~ msgstr "PS1 Строка первичного приглашения." + +#~ msgid "PS2 The secondary prompt string." +#~ msgstr "PS2 Строка вторичного приглашения." + +#~ msgid "TERM The name of the current terminal type." +#~ msgstr "TERM Имя типа текущего терминала." + +#~ msgid "auto_resume Non-null means a command word appearing on a line by" +#~ msgstr "" +#~ "auto_resume Ненулевые значения слов команд, встречающиеся в строке" + +#~ msgid "\t\titself is first looked for in the list of currently" +#~ msgstr "\t\tотдельно, сначала ищутся в списке остановленных" + +#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded." +#~ msgstr "\t\tв данный момент задач. Если найдено, задача активируется." + +#~ msgid "\t\tA value of `exact' means that the command word must" +#~ msgstr "\t\t`exact' значит, что команда должна в точности" + +#~ msgid "\t\texactly match a command in the list of stopped jobs. A" +#~ msgstr "\t\tсоответствовать команде в списке остановленных задач." + +#~ msgid "\t\tvalue of `substring' means that the command word must" +#~ msgstr "\t\t`substring' значит, что команда должна быть подстрокой" + +#~ msgid "\t\tmatch a substring of the job. Any other value means that" +#~ msgstr "\t\tзадачи. Любые другие значения означают, что" + +#~ msgid "\t\tthe command must be a prefix of a stopped job." +#~ msgstr "\t\tкоманда должна быть префиксом остановленной задачи." + +#~ msgid "command_oriented_history" +#~ msgstr "command_oriented_history" + +#~ msgid "" +#~ " Non-null means to save multiple-line commands together on" +#~ msgstr "" +#~ " Ненулевое значение означает, что многострочные команды" + +#~ msgid " a single history line." +#~ msgstr " будут сохраняться в одной строке истории." + +#~ msgid "histchars Characters controlling history expansion and quick" +#~ msgstr "histchars Управляющие символы расширения истории и быстрой" + +#~ msgid "\t\tsubstitution. The first character is the history" +#~ msgstr "\t\tподстановки. Первый символ -- символ подстановки" + +#~ msgid "\t\tsubstitution character, usually `!'. The second is" +#~ msgstr "\t\tистории, обычно `!'. Второй -- символ `быстрой" + +#~ msgid "\t\tthe `quick substitution' character, usually `^'. The" +#~ msgstr "\t\tподстановки', обычно `^'. Третий -- символ `комментария" + +#~ msgid "\t\tthird is the `history comment' character, usually `#'." +#~ msgstr "\t\tистории', обычно `#'." + +#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter" +#~ msgstr "HISTCONTROL\tЕсли равен `ignorespace', это означает, что строки," + +#~ msgid "\t\tlines which begin with a space or tab on the history" +#~ msgstr "\t\tначинающиеся с пробела или знака табуляции, не попадают" + +#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't" +#~ msgstr "\t\tв историю. `ignoredups' означает, что строки, сопадающие" + +#~ msgid "\t\tenter lines which match the last entered line. Set to" +#~ msgstr "\t\tс предыдущей, не попадают в историю. `ignoreboth' --" + +#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset," +#~ msgstr "\t\tодновременное действие обоих параметров. Если не" + +#~ msgid "\t\tor set to any other value than those above means to save" +#~ msgstr "\t\tустановлено, или равно другому значению, то в историю" + +#~ msgid "\t\tall lines on the history list." +#~ msgstr "\t\tкоманд попадают все строки." + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "Помещает каталог на вершину стека каталогов или вращает" + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "стек так, чтобы на вершине находился текущий каталог. Без" + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "аргументов меняет местами два верхних каталога." + +#~ msgid "+N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "+N\tВращает стек так, чтобы N-й каталог (считая с левой стороны " + +#~ msgid "\tfrom the left of the list shown by `dirs') is at the top." +#~ msgstr "\tсписка, выводимого `dirs') оказался на вершине стека." + +#~ msgid "-N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "-N\tВращает стек так, чтобы N-й каталог (считая с правой" + +#~ msgid "\tfrom the right) is at the top." +#~ msgstr "\tстороны) оказался на вершине стека." + +#~ msgid "-n\tsuppress the normal change of directory when adding directories" +#~ msgstr "-n\tподавляет обычную смену каталога при добавлении каталога" + +#~ msgid "\tto the stack, so only the stack is manipulated." +#~ msgstr "\tв стек, так что меняется только содержимое стека." + +#~ msgid "dir\tadds DIR to the directory stack at the top, making it the" +#~ msgstr "dir\tпомещает DIR на вершину стека и делает его новым" + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "Просматривать стек каталогов можно командой `dirs'." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Удаляет значения из стека каталогов. Без аргументов" + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "удаляет из стека каталог на вершине и делает рабочим каталог," + +#~ msgid "+N\tremoves the Nth entry counting from the left of the list" +#~ msgstr "+N\tудаляет N-й каталог, считая с левой стороны списка," + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr "\tвыводимого `dirs', начиная с нуля. Например, `popd +0'" + +#~ msgid "\tremoves the first directory, `popd +1' the second." +#~ msgstr "\tудаляет первый каталог, `popd +1' -- второй." + +#~ msgid "-N\tremoves the Nth entry counting from the right of the list" +#~ msgstr "-N\tудаляет N-й каталог, считая с правой стороны списка," + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr "\tвыводимого `dirs', начиная с нуля. Например, `popd -0'" + +#~ msgid "\tremoves the last directory, `popd -1' the next to last." +#~ msgstr "\tудаляет последний каталог, `popd -1' -- предпоследний." + +#~ msgid "" +#~ "-n\tsuppress the normal change of directory when removing directories" +#~ msgstr "-n\tподавляет обычную смену каталога при удалении каталогов из" + +#~ msgid "\tfrom the stack, so only the stack is manipulated." +#~ msgstr "\tстека, так что меняется только содержимое стека." + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "Выводит список запомненных на данный момент каталогов. Каталоги" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "" +#~ "попадают в список при использовании команды `pushd', вы можете забрать" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "их из списка командой `popd'." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "" +#~ "Флаг -l указывает, что `dirs' не должна выводит сокращённые варианты" + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "каталогов, заданных относительно домашнего. Это означает, что" + +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "`~/bin' будет отображаться как `/homes/bfox/bin'. Флаг -v" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "заставляет `dirs' выводить каталоги по одному в строке, предваряя" + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "" +#~ "имя каталога номером его позиции в стеке. Флаг -p делает то же самое," + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "но не добавляются номера позиций. Флаг -c очищает стек каталогов," + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "удаляя все его элементы." + +#~ msgid "" +#~ "+N\tdisplays the Nth entry counting from the left of the list shown by" +#~ msgstr "+N\tвыводит N-й каталог, считая с левой стороны списка, выводимого" + +#~ msgid "\tdirs when invoked without options, starting with zero." +#~ msgstr "\tdirs при вызове без параметров, начиная с нуля." + +#~ msgid "" +#~ "-N\tdisplays the Nth entry counting from the right of the list shown by" +#~ msgstr "-N\tвыводит N-й каталог, считая с правой стороны списка, выводимого" + +#~ msgid "Toggle the values of variables controlling optional behavior." +#~ msgstr "Меняет значение переменных, управляющих поведением оболочки." + +#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" +#~ msgstr "Флаг -s означает включить (установить) каждое ИМЯ_ПАРАМЕТРА," + +#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" +#~ msgstr "флаг -u сбрасывает. Флаг -q подавляет вывод, установлен или" + +#~ msgid "status indicates whether each OPTNAME is set or unset. The -o" +#~ msgstr "сброшен параметр определяется по коду возврата. Параметр -o" + +#~ msgid "option restricts the OPTNAMEs to those defined for use with" +#~ msgstr "ограничивает работу параметрами, определёнными с помощью" + +#~ msgid "`set -o'. With no options, or with the -p option, a list of all" +#~ msgstr "`set -o'. Без параметров или при заданном параметре -p, выводится" + +#~ msgid "settable options is displayed, with an indication of whether or" +#~ msgstr "список всех установленных параметров и информация, установлены" + +#~ msgid "not each is set." +#~ msgstr "они или нет." diff --git a/bash-5.1/po/sk.gmo b/bash-5.1/po/sk.gmo new file mode 100644 index 0000000000000000000000000000000000000000..c6c89c52bf64cd40fba6651e2a096e722872b2fc Binary files /dev/null and b/bash-5.1/po/sk.gmo differ diff --git a/bash-5.1/po/sk.po b/bash-5.1/po/sk.po new file mode 100644 index 0000000000000000000000000000000000000000..f0b750fd7a08d20ce3b4d6bc776b29b5660af233 --- /dev/null +++ b/bash-5.1/po/sk.po @@ -0,0 +1,6505 @@ +# Slovak translation for bash. +# Copyright (C) 2006 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Ivan Masár , 2007, 2008, 2009, 2010, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: bash 4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2011-03-16 21:22+0100\n" +"Last-Translator: Ivan Masár \n" +"Language-Team: Slovak \n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "chybný index poľa" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nie je možné previesť indexované pole na asociatívne" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: neplatný kľúč asociatívneho poľa" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: nie je možné priradiť nenumerickému indexu" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: pri priraďovaní asociatívnemu poľu je potrebné použiť index" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: nie je možné vytvoriť: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: nie je možné nájsť klávesovú mapu pre príkaz" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: prvý znak (okrem bielych znakov) nie je „\"“" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "chýba zatvárajúca „%c“ v %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: chýba oddeľovač dvojbodka" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: nie je možné zrušiť väzbu (unbind)" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s“: neplatný názov aliasu" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "úpravy riadka nie sú zapnuté" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s“: neplatný názov klávesovej mapy" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: nie je možné prečítať: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s“: neznámy názov funkcie" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s nie je zviazaný (bind) s žiadnymi klávesmi.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s je možné vyvolať ako " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: nie je možné zrušiť väzbu (unbind)" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "počet cyklov" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "dáva zmysel iba v cykle „for“, „while“ alebo „until“" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Vrátiť kontext aktuálneho volania podprocedúry.\n" +" \n" +" Bez VÝR, vráti „$line $filename“. S VÝR,\n" +" vráti „$line $subroutine $filename“; túto informáciu\n" +" je možné využiť pre trasovanie zásobníka.\n" +" \n" +" Hodnota VÝR určuje o koľko rámcov volania sa vrátiť\n" +" pred aktuálny; najvyšší rámec má číslo 0.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak shell nevykonáva funkciu shellu a EXPR nie je neplatný." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME nebola nastavená" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "príliš veľa argumentov" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "na nový vrchol zásobníka." + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD nebola nastavená" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "riadok %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "upozornenie: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: použitie " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: voľba vyžaduje argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: vyžaduje sa numerický argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: nenájdené" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: neplatná voľba" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: neplatný názov voľby" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s“: nie je platný identifikátor" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "neplatné osmičkové číslo" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "neplatné šestnástkové číslo" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "neplatné číslo" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: neplatné určenie signálu" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s“: nie je pid ani platný špecifikátor úlohy" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: premenná len na čítanie" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s je mimo rozsahu" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s mimo rozsahu" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: taká úloha neexistuje" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: riadenie úloh nedostupné" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "riadenie úloh nedostupné" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: obmedzené" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "obmedzené" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: nie je vstavaný príkaz (builtin) shellu" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "chyba zapisovania: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "chyba pri nastavovaní atribútov terminálu: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "chyba pri zisťovaní atribútov terminálu: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: chyba pri zisťovaní aktuálneho adresára: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: nejednoznačné určenie úlohy" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nie je možné zrušiť: len na čítanie %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nie je možné zrušiť" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: neplatný názov akcie" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: chýba špecifikácia dokončovania" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "upozornenie: voľba -F nemusí fungovať tak ako očakávate" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "upozornenie: voľba -C nemusí fungovať tak ako očakávate" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "momentálne sa nevykonáva funkcia doplňovania" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "je možné použiť iba vo funkcii" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: neplatný názov aliasu" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "nie je možné použiť „-f“ pre tvorbu funkcií" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funkcia iba na čítanie" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: nie je možné takto robiť deštrukciu premenných polí" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: nie je možné previesť asociatívne pole na indexované" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamické načítavanie nie je dostupné" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "nie je možné otvoriť zdieľaný objekt %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "nemožem nájsť %s v zdieľanom objekte %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: nie je dynamicky načítané" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: nie je dynamicky načítané" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: nie je možné zmazať: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: je adresár" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: nie je obyčajný súbor" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: súbor je príliš veľký" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: nie je možné vykonať binárny súbor" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: nie je možné spustiť: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "odhlásenie\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "toto nie je login shell: použite „exit“" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Existujú zastavené úlohy.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Existujú bežiace úlohy.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "prákaz nenájdený" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "špecifikácia histórie" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: nie je možné otvoriť odkladací súbor: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "aktuálny" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "úloha %d začala bez riadenia úloh" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: neplatná voľba -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: voľba vyžaduje argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hašovanie vypnuté" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hašovacia tabuľka je prázdna\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "použití\tpríkaz\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Príkazy shellu zodpovedajúce kľúčovému slovu „" +msgstr[1] "Príkazy shellu zodpovedajúce kľúčovým slovám „" +msgstr[2] "Príkazy shellu zodpovedajúce kľúčovým slovám „" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"pre „%s“ neboli nájdené zodpovedajúce témy pomocníka.\n" +"Skúste „help help“ alebo „man -k %s“ alebo „info %s“." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: nie je možné otvoriť: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Tieto príkazy shellu sú definované interne. Napísaním „help“ zobrazíte tento " +"zoznam.\n" +"Napísaním „help názov“ zistíte viac o funkcii „názov“.\n" +"Napísaním „info bash“ zistíte viac o shelli vo všeobecnosti.\n" +"Napísaním „man -k“ alebo „info“ zistíte viac príkazoch, ktoré nie sú v " +"zozname.\n" +"\n" +"Hviezdička (*) vedľa názvu znamená, že príkaz je vypnutý.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "nie je možné použiť viac ako jednu z volieb -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "poloha histórie" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: neplatný názov voľby" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: rozšírenie histórie zlyhalo" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib zlyhalo" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "iné voľby prípustné s „-x“" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenty musia byť ID procesov alebo úloh" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Neznáma chyba" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "očakával sa výraz" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: nie je indexované pole" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: neplatná špecifikácia popisovača súboru" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: neplatný popisovač súboru: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: neplatný počet riadkov" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: neplatný začiatok poľa" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: neplatné kvantum spätného volania" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "názov prázdnej premennej poľa" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "vyžaduje sa podpora premennej poľa" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s“: chýba formátovací znak" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: neplatná špecifikácia formátu času" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c“: neplatný formátovací znak" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "upozornenie: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "chýba hexadecimálna číslica v \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "chýba číslica Unicode pre \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "žiadny iný adresár" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: neplatný argument limitu" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<žiadny aktuálny adresár>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "zásobník adresárov je prázdny" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "index zásobníka adresárov" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Zobrazí zoznam momentálne zapamätaných adresárov. Adresáre\n" +" sa do zoznamu dostávajú príkazom „pushd“; zo zoznamu ich môžete\n" +" vyberať postupne príkazom „popd“.\n" +" \n" +" Voľby:\n" +" -c\tvyprázdni zásobník adresárov zmazaním všetkých položiek\n" +" -l\tnevypisovať skrátené verzie adresárov relatívne vzhľadom\n" +" \tna váš domovský adresár\n" +" -p\tvypíše zásobník adresárov vo formáte jedna položka na riadok\n" +" -v\tvypíše zásobník adresárov vo formáte jedna položka na riadok\n" +" \ta pred ňu vypíše jej pozíciu na zásobníku\n" +" \n" +" Argumenty:\n" +" +N\tzobrazuje N-tú položku počítajúc zľava zoznamu, ktorý zobrazuje\n" +" \tdirs vyvolaný bez volieb, počínajúc nulou.\n" +" \n" +" -N\tzobrazuje N-tú položku počítajúc sprava zoznamu, ktorý zobrazuje\n" +" \tdirs vyvolaný bez volieb, počínajúc nulou." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Pridá adresár na vrchol zásobníka adresárov alebo ho otočí tak, že\n" +" nový vrchol zásobníka sa stane aktuálnym pracovným adresárom.\n" +" Bez argumentov vymení vrchné dva adresáre.\n" +" \n" +" Voľby:\n" +" -n\tPotlačí normálnu zmenu adresára pri odstraňovaní položiek\n" +" \tzo zásobníka, takže sa zmení iba zásobník.\n" +" \n" +" Argumenty:\n" +" +N\tOtočí zásobník tak, že N-tý adresár (počítajúc zľava zoznamu,\n" +" \tktorý zobrazuje „dirs“, počínajúc nulou) je na vrchu.\n" +" \n" +" -N\tOtočí zásobník tak, že N-tý adresár (počítajúc sprava zoznamu,\n" +" \tktorý zobrazuje „dirs“, počínajúc nulou) je na vrchu.\n" +" \n" +" adr\tPridá ADR na vrchol zásobníka adresárov, čím sa tento stane\n" +" \tnovým aktuálnym pracovným adresárom.\n" +" \n" +" Zásobník adresárov môžete zobraziť vstavaným príkazom „dirs“." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Odstráni položky zo zásobníka adresárov. Bez argumentov odstráni\n" +" vrchnú položku zo zásobníka a zmení adresár na adresár, ktorý\n" +" sa následne nachádza na vrchu zásobníka.\n" +" \n" +" Voľby:\n" +" -n\tpotlačí normálnu zmenu adresára pri odstraňovaní položiek\n" +" \tzo zásobníka, takže sa zmení iba zásobník.\n" +" \n" +" Argumenty:\n" +" +N\todstráni N-tú položku položku počítajúc zľava zoznamu,\n" +" \tktorý zobrazuje „dirs“, počínajúc nulou. Napríklad: „popd +0“\n" +" \todstráni prvý adresár, „popd +1“ druhý.\n" +" \n" +" -N\todstráni N-tú položku položku počítajúc sprava zoznamu,\n" +" \tktorý zobrazuje „dirs“, počínajúc nulou. Napríklad: „popd -0“\n" +" \todstráni posledný adresár, „popd -1“ predposledný.\n" +" \n" +" Zásobník adresárov môžete zobraziť vstavaným príkazom „dirs“." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: neplatná špecifikácia expirácie (timeout)" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "chyba pri čítaní: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"návrat („return“) je možné vykonať iba z funkcie alebo skriptu vyvolaného " +"pomocou „source“" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "nie je možné zároveň zrušiť funkciu a premennú" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: nie je premenná poľa" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: nie je funkcia" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: nie je možné zrušiť" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "posun o" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "nie je možné zároveň nastaviť aj zrušiť voľby shellu" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: neplatný názov voľby shellu" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "vyžaduje sa argument názov súboru" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: súbor sa nepodarilo nájsť" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "nie je možné suspendovať" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "nie je možné suspendovať login shell" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s má alias „%s“\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s je kľúčové slovo shellu\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s je funkcia\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s je vstavaný príkaz (builtin) shellu\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s je vstavaný príkaz (builtin) shellu\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s je %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s je hašovaný (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: neplatný argument limitu" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c“: chybný príkaz" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: nie je možné zistiť limit: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "obmedzenie" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: nie je možné zmeniť limit: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "osmičkové číslo" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c“: neplatný operátor symbolického režimu" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c“: neplatný znak symbolického režimu" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " riadok " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "posledný príkaz: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Ruší sa..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "chyba neznámeho príkazu" + +#: error.c:463 +msgid "bad command type" +msgstr "chybný typ príkazu" + +#: error.c:464 +msgid "bad connector" +msgstr "chybný konektor" + +#: error.c:465 +msgid "bad jump" +msgstr "chybný skok" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: neviazaná premenná" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\ačas vypršal pri čakaní na vstup: automatické odhlásenie\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "nie je možné presmerovať štandardný vstup z /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: „%c“: neplatný formátovácí znak" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "chyba rúry" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: obmedzené: nie jemožné uviesť „/“ v názvoch príkazov" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: príkaz nenájdený" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: chybný interpreter" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: nie je možné vykonať binárny súbor" + +#: execute_cmd.c:5977 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s je vstavaný príkaz (builtin) shellu\n" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "nie je možné duplikovať fd %d na fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "bola prekročená úroveň rekurzie výrazu" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "podtečenie zásobníka rekurzie" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "chyba syntaxe vo výraze" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "pokus o priradenie mimo premennej" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "chyba syntaxe vo výraze" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "delenie nulou" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "chyba: chybný expassign token" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "pre podmienený výraz sa očakáva „:“" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exponent menší ako 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "po pre-inkrementácii alebo pre-dekrementácii sa očakáva identifikátor" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "chýba „)“" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "chyba syntaxe: očakáva sa operand" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "chyba syntaxe: neplatný aritmetický operátor" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (chybný token je „%s”)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "neplatný aritmetický základ" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: neplatný počet riadkov" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "hodnota je ako základ príliš veľká" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: chyba výrazu\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: nie je možné pristupovať k rodičovským adresárom" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "nie j emožné resetovať nodelay režim fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "nie je možné alokovať nový popisovač súboru pre vstup bashu z fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: bufer už existuje pre nový fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp rúra" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "pid %d získaný pomocou fork sa vyskytuje v bežiacej úlohe %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "mažem zastavenú úlohu %d so skupinou procesu %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) je stále označený ako živý" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: taký pid neexistuje" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signál %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Hotovo" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Zastavené" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Zastavené(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Beží" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Hotovo(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Ukončenie %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Neznámy stav" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(bol uložený výpis pamäte) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid detského procesu (%ld to %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld nie je dieťa tohto shellu" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Neexistuje záznam o procese %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: úloha %d je zastavená" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: taká úloha neexistuje" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: úloha skončila" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: úloha %d už je v pozadí" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: zapína sa WNOHANG aby sme sa vyhli neurčitému blokovaniu" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: riadok %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (bol uložený výpis pamäte)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd teraz: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: funkcia getpgrp zlyhala" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: riadkový systém" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: riadkový systém" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "nie je možné nastaviť skupinu procesu terminálu (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "v tomto shelli nie je riadenie úloh" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: zlyhal predpoklad: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: zbabraný predpoklad\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "neznámy" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: blok na zozname voľných zaprataný" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: zavolaný s argumentom už uvoľneného bloku" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: zavolaný s argumentom nealokovaného bloku" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: bolo detekované podtečenie; mh_nbytes mimo rozsahu" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: bolo detekované podtečenie; mh_nbytes mimo rozsahu" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: veľkosti začiatočného a konečného bloku (chunk) sa líšia" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: zavolaný s argumentom nealokovaného bloku" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: bolo detekované podtečenie; mh_nbytes mimo rozsahu" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: bolo detekované podtečenie; mh_nbytes mimo rozsahu" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: veľkosti začiatočného a konečného bloku (chunk) sa líšia" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: alok. tabuľla je plná s FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p už je v tabuľke ako alokovaný?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p už je v tabuľke ako voľný?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "neplatný základ" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: hostiteľ neznámy" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: neplatná služba" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: chybná špecifikácia sieťovej cesty" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "sieťové operácie nie sú podporované" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: nemožno zmeniť locale (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: nemožno zmeniť locale (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: nie je možné zmeniť locale (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: nie je možné zmeniť locale (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Máte poštu v súbore $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Máte novú poštu v súbore $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Pošta v súbore %s bola prečítaná\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "chyba syntaxe: vyžaduje sa aritmetický výraz" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "chyba syntaxe: neočakávaná „;“" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "chyba syntaxe: „((%s))“" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: chybný typ inštrukcie %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document na riadku %d oddelený znakom konca riadku (očakávalo sa „%s”)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: inštrukcia presmerovania „%d“ mimo rozsahu" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "neočakávaný koniec súboru počas hľadania zodpovedajúceho „%c“" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "neočakávaný koniec súboru počas hľadania „]]“" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "chyba syntaxe v podmienečnom príkaze: neočakávaný token „%s“" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "chyba syntaxe v podmienečnom príkaze" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "neočakávaný token „%s“, očakávalo sa `)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "očakávalo sa `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "neočakávaný argument „%s“ podmienečného unárneho operátora" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "neočakávaný argument podmienečného unárneho operátora" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "neočakávaný token „%s“, očakáva sa podmienečný binárny operátor" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "očakáva sa podmienečný binárny operátor" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "neočakávaný argument „%s“ v podmienečnom binárnom operátore" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "neočakávaný argument v podmienečnom binárnom operátore" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "neočakávaný token „%c“ v podmienečnom príkaze" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "neočakávaný token „%s“ v podmienečnom príkaze" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "neočakávaný token %d v podmienečnom príkaze" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "chyba syntaxe neďaleko neočakávaného tokenu „%s“" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "chyba syntaxe neďaleko „%s“" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "chyba syntaxe: neočakávaný koniec súboru" + +#: parse.y:6365 +msgid "syntax error" +msgstr "chyba syntaxe" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Na opustenie shellu použite „%s“.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "neočakávaný koniec súboru počas hľadania zodpovedajúceho „)“" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "dokončovanie: funkcia „%s“ nebola nájdená" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: chybný konektor `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: neplatný popisovač súboru" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: ukazovateľ súboru je NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: „%c“: neplatný formátovací znak" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "popisovač súboru mimo rozsahu" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: nejednoznačné presmerovanie" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: nie je možné prepísať existujúci súbor" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ombedzené: nie je možné presmerovať výstup" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "nie je možné vytvoriť odkladací súbor pre here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: nie je možné priradiť popisovač súboru premennej" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port nie je podporovaný bez podpory sietí" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "chyba presmerovania: nie je možné duplikovať fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "nenašiel sa /tmp, vytvorte ho prosím!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp musí byť platný názov adresára" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: neplatná voľba" + +#: shell.c:1319 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nie j emožné resetovať nodelay režim fd %d" + +#: shell.c:1330 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nie j emožné resetovať nodelay režim fd %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: je adresár" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Nemám meno!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, verzia %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Použitie:\t%s [GNU dlhá voľba] [voľba] ...\n" +"\t%s [GNU dlhá voľba] [voľba] súbor-skriptu ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU dlhé voľby:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Voľby shellu:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD alebo -c príkaz alebo -O krátka_voľba\t\t(iba vyvolanie)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s alebo -o voľba\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Napísaním „%s -c \"help set\"“ získate viac informácií o voľbách shellu.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Napísaním „%s -c help“ získate viac informácií o vstavaných príkazoch " +"(builtins) shellu.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Na ohlasovanie chýb použite príkaz „bashbug“.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: neplatná operácia" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Neplatný signál" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Zavesenie" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Prerušenie" + +#: siglist.c:58 +msgid "Quit" +msgstr "Ukončenie" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Neplatná inštrukcia" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "inštrukcia ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "inštrukcia EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Výnimka pri operácii s plávajúcou desatinnou čiarkou" + +#: siglist.c:86 +msgid "Killed" +msgstr "Zabitý" + +#: siglist.c:90 +msgid "Bus error" +msgstr "chyba zbernice" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Chyba segmentácie" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Chybné systémové volanie" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Prerušená rúra" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Budík" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Ukončené" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Naliehavý stav V/V" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Zastavené (signál)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Pokračovať" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Zastavenie alebo zabitie detského procesu" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Zastavené (vstup z tty)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Zastavené (výstup na tty)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "V/V pripravený" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "obmedzenie CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "obmedzenie súborov" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Budík (virtuálny)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Budík (profil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Okno sa zmenilo" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Zámok záznamu" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Používateľský signál 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Používateľský signál 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "čaká sa na vstupné údaje HFT" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "nastane výpadok napájania" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "nastane havária systému" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "presunúť proces na iný CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "chyba programovania" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "udelený režim monitoru HFT" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "stiahnutý režim monitoru HFT" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "dokončila sa zvuková sekvencia HFT" + +#: siglist.c:214 +msgid "Information request" +msgstr "Žiadosť o informácie" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Neznámy signál #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "chybná substitúcia: chýba „%s“ v %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: nie je možné priradiť zoznam položke poľa" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "nie je možné vytvoriť rúru pre substitúciu procesov" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "nie je možné vytvoriť potomka pre substitúciu procesov" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "nie je možné otvoriť pomenovanú rúru %s na čítanie" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "nie je možné otvoriť pomenovanú rúru %s na zápis" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "nie je možné duplikovať pomenovanú rúru %s ako fd %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "chybná substitúcia: : v reťazci %s chýba uzatvárajúci „`”" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "nie je možné vytvoriť rúru pre substitúciu príkazov" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "nie je možné vytvoriť potomka pre substitúciu príkazov" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: nie je možné duplikovať rúru ako fd 1" + +#: subst.c:6883 subst.c:9952 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: %s: neplatná hodnota popisovača trasovacieho súboru" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: neplatný počet riadkov" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "„%s“: neplatný názov aliasu" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter je null alebo nenastavený" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter je null alebo nenastavený" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: výraz podreťazca < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: chybná substitúcia" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: nie je možné vykonať priradenie takýmto spôsobom" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"budúce verzie shellu budú vynucovať vyhodnocovanie ako aritmetickú " +"substitúciu" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "chybná substitúcia: : v reťazci %s chýba uzatvárajúci „`”" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "bez zhody: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "očakával sa argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: očakával sa celočíselný výraz" + +#: test.c:265 +msgid "`)' expected" +msgstr "očakávala sa „)“" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "očakávala sa „)“, bolo nájdené %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: očakával sa binárny operátor" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: očakával sa unárny operátor" + +#: test.c:881 +msgid "missing `]'" +msgstr "chýba „]“" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "chyba syntaxe: neočakávaná „;“" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "neplatné číslo signálu" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: chybná hodnota v trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: obsluha signálu je SIG_DFL, znovu posielam %d (%s) sebe" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: chybný signál %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "chyba pri importe definície funkcie „%s“" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "úroveň shellu (%d) je príliš vysoká, nastavujem späť na 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: v aktuálnom rozsahu sa nenachádza kontext funkcie" + +#: variables.c:2693 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: nie je možné priradiť popisovač súboru premennej" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: v aktuálnom rozsahu sa nenachádza kontext funkcie" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s má null exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "neplatný znak %d v exportstr %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "žiadne „=“ v exportstr %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: hlavička shell_variables nie je kontext funkcie" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: chýba kontext global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: hlavička shell_variables nie je dočasný rozsah prostredia" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: nemožno otvoriť ako SÚBOR" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: neplatná hodnota popisovača trasovacieho súboru" + +#: variables.c:6437 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s je mimo rozsahu" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licencia GPLv3+: GNU GPL verzie 3 alebo novšia http://gnu.org/licenses/gpl." +"html\n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, verzia %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "Toto je slobodný softvér; môžete ho slobodne meniť a šíriť.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "" +"Nie sú poskytované ŽIADNE ZÁRUKY v rozsahu aký povoľuje\n" +"aplikovateľné právo.\n" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: nie je možné alokovať %lu bajtov (%lu bajtov alokovaných)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: nie je možné alokovať %lu bajtov" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: nie je možné alokovať %lu bajtov (%lu bajtov alokovaných)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: nie je možné alokovať %lu bajtov" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [názov[=hodnota] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] názov [názov ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m kláv_mapa] [-f názov_súboru] [-q názov] [-u názov] [-r " +"postup_kláv] [-x postup_kláv:príkaz_shellu] [postup_kláv:funkcia_readline " +"alebo príkaz-readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [vstavaná funcia shellu [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [výraz]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [adresár]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilrtux] [-p] [názov[=hodnota] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilrtux] [-p] name[=value] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [voľba] názov[=hodnota] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f názov_súboru] [názov ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts názov_reťazca_volieb [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a názov] [príkaz [argumenty ...]] [presmerovanie ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e enázov] [-lnr] [prvý] [posledný] alebo fc -s [vzor=opak] [príkaz]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [špec_úlohy]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [špec_úlohy ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p cesta] [-dt] [názov ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [vzor ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d ofset] [n] alebo history -anrw [názov_súboru] alebo history " +"-ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [špec_úlohy ...] alebo jobs -x príkaz [argumenty]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [špec_úlohy ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s špec_signálu | -n číslo_signálu | -špec_signálu] pid | " +"špec_úlohy ... alebo kill -l [špec_signálu]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a pole] [-d oddeľovač] [-i text] [-n nznakov] [-N nznakov] [-p " +"výzva] [-t zdržadnie] [-u fd] [názov ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o názov_voľby] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [názov ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [názov[=hodnota] ...] alebo export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [názov[=hodnota] ...] alebo readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source názov_súboru [argumenty]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". názov_súboru [argumenty]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [výraz]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] špec_signálu ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] názov [názov ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [obmedzenie]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [režim]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAME [in SLOVÁ ... ] ; do PRÍKAZY; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( výraz1; výraz2; výraz3 )); do PRÍKAZY; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NÁZOV [in SLOVÁ ... ;] do PRÍKAZY; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] rúra" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case SLOVO in [VZOR [| VZOR]...) PRÍKAZY ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if PRÍKAZY; then PRÍKAZY; [ elif PRÍKAZY; then PRÍKAZY; ]... [ else " +"PRÍKAZY; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while PRÍKAZY; do PRÍKAZY; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until PRÍKAZY; do PRÍKAZY; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NÁZOV] príkaz [presmerovania]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "" +"function názov_funkcie { PRÍKAZY ; } alebo názov_funkcie () { PRÍKAZY ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ PRÍKAZY ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "špec_úlohy [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( výraz ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ výraz ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "premenné - Názvy a významy niektorých premenných shellu" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | adr]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [názov_voľby ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] formát [argumenty]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o voľba] [-A operácia] [-G glob_vzor] " +"[-W zoznam_slov] [-F funkcia] [-C príkaz] [-X vzor_filtra] [-P predpona] [-S " +"prípona] [názov ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o voľba] [-A operácia] [-G glob_vzor] [-W " +"zoznam_slov] [-F funkcia] [-C príkaz] [-X vzor_filtra] [-P predpona] [-S " +"prípona] [slovo]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o voľba] [-DE] [názov ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n počet] [-O začiatok] [-s počet] [-t] [-u fd] [-C spätné_volanie] " +"[-c kvantum] [pole]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n počet] [-O začiatok] [-s počet] [-t] [-u fd] [-C " +"spätné_volanie] [-c kvantum] [pole]" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definovať alebo zobraziť aliasy.\n" +" \n" +" Bez argumentov vypíše všetky definované aliasy vo formáte, ktorý je\n" +" možné znova použiť v tvare NÁZOV=HODNOTA na štandardný výstup.\n" +" \n" +" Inak definuje alias pre každý NÁZOV, ktorého HODNOTA je zadaná.\n" +" Medzera na konci HODNOTY spôsobí, že sa v ďalšom slove\n" +" skontroluje substitúcia aliasu pri expanzii aliasu.\n" +" \n" +" Voľby:\n" +" -p\tVypíše všetky definované aliasy vo formáte, ktorý je možné\n" +" \tznova použiť\n" +" \n" +" Návratová hodnota:\n" +" Vráti vždy pravdu ak nebol zadaný NÁZOV, pre ktorý nie je definovaný " +"alias." + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Odstrániť NÁZVY zo zoznamu definovaných aliasov.\n" +" \n" +" Voľby:\n" +" -a\todstráni všetky definície aliasov.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebol zadaný NÁZOV, pre ktorý nie je definovaný alias." + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Nastaviť klávesové väzby a premenné Readline.\n" +" \n" +" Naviaže sekvenciu klávesov na funkciu alebo makro Readline alebo\n" +" nastaviť premennú Readline. Syntax argumentu je rovnaká ako tá\n" +" v ~/.inputrc, ale musí sa podať ako jediný argument:\n" +" bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Voľby:\n" +" -m klávmap Použije „klávmap“ ako mapu klávesov počas trvania\n" +" tohto príkazu. Prijateľné názvy klávesových máp sú\n" +" emacs emacs-standard, emacs-meta, emacs-ctlx, vi,\n" +" vi-move, vi-command a vi-insert.\n" +" -l Vypíše názvy funkcií.\n" +" -P Vypíše názvy funkcií a väzby.\n" +" -p Vypíše názvy funkcií a väzby v tvare, ktorý je\n" +" možné znova použiť ako vstup.\n" +" -S Vypíše klávesové sekvencie, ktoré vyvolávajú makrá " +"a\n" +" ich hodnoty\n" +" -s Vypíše klávesové sekvencie, ktoré vyvolávajú makrá " +"a\n" +" ich hodnoty\n" +" v tvare, ktorý je možné znova použiť ako vstup.\n" +" -V Vypíše názvy premenných a hodnoty\n" +" -v Vypíše názvy premenných a hodnoty v tvare, ktorý " +"je\n" +" -q názov-funkcie Zistí, ktoré klávesy vyvolávajú túto funkciu.\n" +" -u názov-funkcie Zruší väzby všetkých kláves naviazaných na túto " +"funkciu\n" +" možné znova použiť ako vstup.\n" +" -r kláv_sek Odstráni väzbu pre kláv_sek.\n" +" -f súboru Načíta klávesové väzby z SÚBORU.\n" +" -x kláv_sek:príkaz_shellu\tSpôsobí vykonanie PRÍKAZU_SHELLU po\n" +" \t\t\t\tzadaní KLÁV_SEK.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Ukončenie cyklu for, while alebo until.\n" +" \n" +" Ukončiť cyklus FOR, WHILE alebo UNTIL. Ak je zadané N, ukončiť N\n" +" nadradených vnorených cyklov.\n" +" \n" +" Návratová hodnota:\n" +" Návratová hodnota je 0 ak N nie je väčšie alebo rovné 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Pokračovať v cykle for, while alebo until\n" +" \n" +" Pokračuje v nasledujúcej iterácii cyklu FOR, WHILE alebo UNTIL.\n" +" Ak je uvedené N, pokračovať v ďalšej iterácii cyklu o N úrovní vyššej.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak N nie je väčšie alebo rovné 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Vykonať vstavenú funkciu shellu.\n" +" \n" +" Vykoná vstavenú funkciu shellu s argumentami ARG bez vykonania\n" +" vyhľadania príkazu. To sa hodí, keď chcete reimplementovať vstavanú\n" +" funkciu shellu ako funkciu shellu, ale potrebujete vstavanú funkciu " +"volať\n" +" v rámci vašej funkcie.\n" +" \n" +" Návratová hodnota:\n" +" Vracia návratový kód vstavanej funkcie shellu alebo 0 ak argument nie " +"je\n" +" vstavaná funkcia shellu." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Vrátiť kontext aktuálneho volania podprocedúry.\n" +" \n" +" Bez VÝR, vráti „$line $filename“. S VÝR,\n" +" vráti „$line $subroutine $filename“; túto informáciu\n" +" je možné využiť pre trasovanie zásobníka.\n" +" \n" +" Hodnota VÝR určuje o koľko rámcov volania sa vrátiť\n" +" pred aktuálny; najvyšší rámec má číslo 0.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak shell nevykonáva funkciu shellu a EXPR nie je neplatný." + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Zmeniť aktuálny adresár shellu.\n" +" \n" +" Zmení aktuálny adresár na ADR. Predvolený aktuálny adresár je hodnota\n" +" premennej shellu HOME.\n" +" \n" +" Premenná CDPATH definuje cesty, v ktorých sa hľadá adresár obsahujúci " +"ADR.\n" +" Alternatívne názvy adresárov v CDPATH sú oddelené dvojbodkou (:).\n" +" Prázdny (null) názov adresára zodpovedá aktuálnemu adresáru, t.j. „.“.\n" +" Ak ADR začína lomkou (/), CDPATH sa nepoužije.\n" +" \n" +" Ak adresár nebol nájdený a je nastavená voľba shellu „cdable_vars“,\n" +" predpokladá sa, že toto slovo je názov premennej.\n" +" Ak táto premenná má hodnotu, vykoná cd na hodnotu premennej.\n" +" \n" +" Voľby:\n" +" -L\tvynúti nasledovanie symbolických odkazov\n" +" -P\tpoužije sa fyzická štruktúra adresárov a nie nasledovať\n" +" \t\tsymbolické odkazy.\n" +" -e\tak je zadaná voľba -P a aktuálny adresár nie je možné\n" +" \túspešne určiť, ukončiť s nenulovou návratovou hodnotou\n" +" \n" +" Štandardne sa budú nasledovať symbolické odkazy ako keby bola\n" +" zadaná voľba „-L“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak bol aktuálny adresár zmenený a ak sa pri použití voľby -P\n" +" úspešne nastaví $PWD, inak nenulovú hodnotu." + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Vypísať názov aktuálneho pracovného adresára.\n" +" \n" +" Voľby:\n" +" -L\tvypísať hodnotu $PWD ak pomenúva aktuálny pracovný\n" +" \tadresár\n" +" -P\tvypísať fyzický adresár bez symbolických odkazov\n" +" \n" +" Štandardne sa „pwd“ správa ako keby bolo uvedené „-L“.\n" +" \n" +" Návratová hodnota:\n" +" Vracia 0 ak nie je zadaná neplatná voľba alebo nie je možné\n" +" prečítať aktuálny adresár." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Prázdny príkaz.\n" +" \n" +" Bez účinku; príkaz nič nerobí.\n" +" \n" +" Návratová hodnota:\n" +" Vždy vráti pravda." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Vráti úspešný výsledok\n" +" \n" +" Návratová hodnota:\n" +" Vždy vráti 0." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Prázdny príkaz.\n" +" \n" +" Vráti neúspešný výsledok.\n" +" \n" +" Návratová hodnota:\n" +" Vždy vráti nepravda." + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Vykonať jednoduchý príkaz alebo zobraziť informácie o príkazoch.\n" +" \n" +" Spustí PRÍKAZ s ARG potlačiac vyhľadanie funkcie shellu alebo\n" +" zobrazí informácie o uvedených PRÍKAZoch. Možno použiť na\n" +" vyvolanie externých príkazov ak existuje funkcia s rovnakým názvom.\n" +" \n" +" Voľby:\n" +" -p\tpoužiť štandardnú hodnotu PATH, ktorá zaručene nájde všetky\n" +" \t\tštandardné nástroje\n" +" -v\tvypísať popis PRÍKAZu podobný zabudovanému príkazu „type“\n" +" -v\tvypísať podrobnejší popis každého PRÍKAZu\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu PRÍKAZu alebo zlyhá ak nenájde PRÍKAZ." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Nastaviť hodnoty a atribúty premennných.\n" +" \n" +" Deklaruje premenné a dáva im atribúty. Ak nie sú zadané NÁZVY,\n" +" zobrazí atribúty a hodnoty všetkých premenných.\n" +" \n" +" Voľby:\n" +" -f\tobmedzí operáciu alebo výpis na názvy funkcií a definície\n" +" -F\tobmedzí výpis iba na názvy funkcií (plus číslo riadka a\n" +" \t\tzdrojový súbor pri ladení)\n" +" -g\tvytvorí globálne premenné pri použití vo funkcii shellu; inak\n" +" \tsa ignoruje\n" +" -p\tzobrazí atribúty a hodnotu každého NÁZVU\n" +" \n" +" Voľby, ktoré nastavujú atribúty:\n" +" -a\turobí z NÁZVU indexované polia (ak sú podporované)\n" +" -A\turobí z NÁZVOV asociatívne polia (ak sú podporované)\n" +" -i\tdá NÁZVU atribút „celé číslo“\n" +" -l\tprevedie NÁZVY pri priradení na malé písmená\n" +" -r\tnastaví NÁZVY iba na čítanie\n" +" -t\tdá NÁZVU atribút „trace“\n" +" -u\tprevedie NÁZVY pri priradení na veľké písmená\n" +" -x\tprevedie NÁZVY na export\n" +" \n" +" Pomocou „+“ namiesto „-“ vypnete uvedený atribút.\n" +" \n" +" Premenné s atribútom „celé číslo“ vykonávajú aritmetické vyhodnocovanie\n" +" (pozri príkaz „let“), keď je im priradená hodnota.\n" +" \n" +" Keď sa „declare“ použije vo funkcii, NÁZVY budú lokálne ako pri príkaze\n" +" „local“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Nastaviť hodnoty a atribúty premenných.\n" +" \n" +" Zastaralé. Pozri „help declare“." + +#: builtins.c:540 +#, fuzzy +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definovať lokálne premenné.\n" +" \n" +" Vytvorí lokálnu premennú s názvom NÁZOV a priradí jej HODNOTU.\n" +" VOĽBA je ľubovoľná voľba, ktorú prijme „declare“\n" +" \n" +" Lokálne premenné možno použiť iba v rámci funkcie; sú viditeľné\n" +" iba v rámci funkcie, kde sú definované a v jej potomkoch.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba, nevyskytla sa chyba a\n" +" shell práve nevykonáva funkciu." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Vypísať argumenty na štandardný výstup.\n" +" \n" +" Vypíše ARGumenty na štandardný výstup ukončené znakom\n" +" nového riadka.\n" +" Voľby:\n" +" -n\tpotlačí znak nového riadka na konci.\n" +" -e\tzapne interpretáciu nasledovných únikových klauzúl\n" +" -E\tvypne interpretáciu nasledovných únikových klauzúl\n" +" \n" +" „echo“ interpretuje nasledovné únikové klauzuly:\n" +" \t\\a\tvýstraha (zvonček)\n" +" \t\\b\tbackspace\n" +" \t\\c\tptlačiť posledný znak nového riadka\n" +" \t\\e\tescape znaku\n" +" \t\\f\tform feed\n" +" \t\\n\tnový riadok\n" +" \t\\r\tnávrat vozíka\n" +" \t\\t\thorizontálny tabulátor\n" +" \t\\v\tvertikálny tabulátor\n" +" \t\\\\\tspätná lomka\n" +" \t\\0nnn\tznak s ASCII kódom NNN (osmičkový). NNN môže mať\n" +" \t\t0 až 3 osmičkové číslice\n" +" \\xHH\tosembitový znak, ktorého hodnota je HH (hexadecimálne).\n" +" \tHH môže mať jednu alebo dve hexadecimálne číslice.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nevyskytla sa chyba pri zápise." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Vypísať argumenty na štandardný výstup.\n" +" \n" +" Vypíše ARGumenty na štandardný výstup ukončené znakom\n" +" nového riadka.\n" +" Voľby:\n" +" -n\tpotlačí znak nového riadka na konci.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nevyskytla sa chyba pri zápise." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Zapnúť a vypnúť vstavané funkcie shellu.\n" +" \n" +" Zapína a vypína vstavané funkcie shellu. Vypnutie vám umožní\n" +" vykonať externý príkaz s rovnakým názvom ako vstavaná funkcia\n" +" shellu bez toho, aby ste museli použiť úplnú cestu k nemu.\n" +" \n" +" Voľby:\n" +" -a\tvypíše zoznam vstavaných funkcií a zobrazí pi každej\n" +" \tči je zapnutá\n" +" -n\tvypne každý NÁZOV alebo zobrazí zoznam vypnutých\n" +" \tvstavaných funkcií\n" +" -p\tvypíše zoznam vstavaných funkcií v tvare, ktorý je\n" +" \tmožné znova použiť ako vstup\n" +" -s\tvypísať iba názvy Posixových „špeciálnych“\n" +" \tvstavaných funkcií\n" +" \n" +" Voľby riadiace dynamické načítanie:\n" +" -f\tNačítať vstavanú funkciu NÁZOV zo zdieľaného objektu SÚBOR\n" +" -d\todstrániť vstavanú funkciu načítanú voľbou -f\n" +" \n" +" Bez volieb zapne každý NÁZOV.\n" +" \n" +" Ak chcete použiť „test“, ktorý sa nachádza v ceste $PATH namiesto\n" +" vstavanej funkcie shellu, napíšte „enable -n test“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak NÁZOV nie je vstavaná funkcia shellu a nevyskytla sa chyba." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Vykonať argumenty ako príkaz shellu.\n" +" \n" +" Skombinovať ARGumenty do jediného reťazca a použiť výsledok\n" +" ako vstup shellu a vykonať tieto príkazy.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu príkazu alebo 0 ak je príkaz prázdny." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Syntaktická analýza volieb.\n" +" \n" +" Getopts používajú procedúry shellu na analýzu pozičných parametrov.\n" +" \n" +" OPTSTRING obsahuje písmená volieb, ktoré pozná; ak po písmene\n" +" nasleduje dvojbodka, po voľbe sa očakáva argument, ktorý by mal\n" +" od nej byť oddelený netlačiteľným znakom (medzera).\n" +" \n" +" Po každom zavolaní getopts dá nasledujúcu voľbu do premennej\n" +" shellu $name, ak name neexeistuje, tak ho inicializuje a index\n" +" ďalšieho argumentu, ktorý sa má spracovať, dá do premennej\n" +" shellu OPTIND. OPTIND je inicializovaný na 1 po každom vyvolaní\n" +" shellu alebo shell skriptu. Keď voľba vyžaduje argument, getopts\n" +" dá tento argument do premennej shellu OPTARG.\n" +" \n" +" getopts oznamuje chyby jedným z dvoch spôsobov. Ak je prvý znak\n" +" OPTSTRING dvojbodka, getopts použije tiché oznamovanie chýb. V\n" +" Tomto režime sa nevypíšu žiadne chybové správy. Ak getopts vidí\n" +" neplatnú voľbu, dá znak nájdenej voľby do OPTARG. Ak nenájde\n" +" požadovaný argument, getopts dá do NAME „:“ a nastaví OPTARG\n" +" na znak nájdenej voľby. Ak getopts nie je v tichom režime a vidí\n" +" neplatnú voľbu, dá do NAME „?“ a zruší (unset) OPTARG. Ak nenájde\n" +" požadovaný argument, getopts dá do NAME „?“, zruší (unset) OPTARG\n" +" a vypíše diagnostickú správu.\n" +" \n" +" Ak premenná shellu OPTERR má hodnotu 0, getopts vypne vypisovanie\n" +" chybových správ, aj ak prvý znak OPTSTRING nie je dvojbodka.\n" +" OPTERR má štandardne hodnotu 1.\n" +" \n" +" Getopts normálne spracúva pozičné parametre ($0 - $9), ale ak je\n" +" zadaných viac argumentov, spracuje tieto.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak je voľba nájdená; zlyhá po dosiahnutí konca reťazca volieb\n" +" alebo ak sa vyskytne chyba." + +#: builtins.c:694 +#, fuzzy +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Nahradiť shell zadaným príkazom.\n" +" \n" +" Vykonať PRÍKAZ, pričom sa nahradí tento shell určeným programom.\n" +" ARGUMENTy dostane PRÍKAZ ako argumenty. Ak nie je zadaný PRÍKAZ,\n" +" všetky presmerovania sa uskutočnia v aktuálnom shelli.\n" +" \n" +" Voľby:\n" +" -a názov\tpošle NÁZOV ako nultý argument PRÍKAZU\n" +" -c\tvykoná PRÍKAZ s prázdnym prostredím\n" +" -l\tdá pomlčku na nultý argument PRÍKAZu\n" +" \n" +" Ak príkaz nemožno vykonať, neinteraktívny shell sa ukončí ak nie je\n" +" nastavená voľba shellu „execfail“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestane, že PRÍKAZ nebol nájdený a nevyskytne sa chyba\n" +" presmerovania." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Ukončiť shell\n" +" \n" +" Ukončí shell s návratovou hodnotou N. Ak sa N vynechá, návratová\n" +" hodnota sa nastaví podľa stavu posledného vykonaného príkazu." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Ukončiť login shell.\n" +" \n" +" Ukončí login shell s návratovou hodnotou N. Vráti chybu ak nie je\n" +" spustený v login shelli." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Zobraziť alebo vykonať príkazy z histórie.\n" +" \n" +" fc sa používa na vypísanie alebo úpravu a opätovné vykonanie príkazov.\n" +" z histórie.\n" +" PRVÝ a POSLEDNÝ môžu byť čísla udávajúce rozsah alebo PRVÝ môže byť\n" +" reťazec, ktorý znamená najnedávnejší príkaz začínajúci týmto reťazcom.\n" +" \n" +" -e ENAME zvolí editor, ktorý sa má použiť. Štandardne je to FCEDIT,\n" +" \t\tpotom EDITOR, potom vi.\n" +" \n" +" -l znamená vypísať riadky namiesto úpravy.\n" +" -n znamená nevypisovať čísla riadkov.\n" +" -r znamená obrátiť poradie riadkov (najnovšie budú vypísané prvé).\n" +" \n" +" S formátom „fc -s [pat=rep ...] [príkaz]“ sa znova vykoná uvedený\n" +" príkaz po vykonaní náhrady OLD=NEW.\n" +" \n" +" Užitočný alias, ktorý sa dá s týmto použiť, je r='fc -s', takže " +"napísaním\n" +" „r cc“ spustíte posledný príkaz začínajúci „cc“ a napísaním „r“ " +"opätovne\n" +" vykonáte posledný príkaz.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 alebo stav vykonaného príkazu; nenulovú hodnotu ak sa vyskytne\n" +" chyba." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Presunúť úlohu do popredia.\n" +" \n" +" Umiestni JOB_SPEC do popredia a urobí ju aktuálnou úlohou. Ak JOB_SPEC\n" +" nie je prítomná, použije sa aktuálna úloha shellu.\n" +" \n" +" Návratová hodnota:\n" +" Stav príkazu umiestneného do popredia; nenulovú hodnotu ak sa vyskytne\n" +" chyba." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Presunúť úlohu do popredia.\n" +" \n" +" Umiestni každú JOB_SPEC do pozadia, ako keby bola spustená s „&“. Ak\n" +" JOB_SPEC nie je prítomná, použije sa aktuálna úloha shellu.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nie je riadenie úloh vypnuté a nevyskytne sa chyba." + +#: builtins.c:793 +#, fuzzy +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Vyvolať alebo zobraziť umiestnenia programu.\n" +" \n" +" Určiť a zapamätať si úplnú cestu ku každému PRÍKAZu. Ak nie sú\n" +" uvedené žiadne argumenty, zobrazia sa informácie o zapamätaných\n" +" príkazoch.\n" +" \n" +" Voľby:\n" +" -d\tzabudnúť zapamätanné umiestnenia každého NÁZVU\n" +" -l\tzobraziť vo formáte, ktoré je možné znova použiť ako \t" +"\tvstup\n" +" -p cesta\tpoužiť CESTU ako plnú cestu k NÁZVU\n" +" -r\tzabudnúť všetky zapamätané umiestnenia\n" +" -t\tvypísať zapamätané umiestnenia každého NÁZVU, pred\n" +" \tne vypísať zodpovedajúci NÁZOV ak sú zadané viaceré\n" +" \tNÁZVY\n" +" \n" +" Argumenty:\n" +" NÁZOV\tKaždý NÁZOV sa vyhľadá v $PATH a pridá\n" +" \t\tsa do zoznnamu zapamätaných príkazov.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že NÁZOV nebol nájdený a nebola zadaná\n" +" neplatná voľba." + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Zobraziť informácie o vstavaných príkazoch.\n" +" \n" +" Zobrazí stručné zhrnutia vstavaných príkazov. Ak je zadaný VZOR,\n" +" uvedie podrobnosti o všetkých príkazoch zodpovedajúcich VZORu,\n" +" inak vypíše zoznam tém pomocníka.\n" +" \n" +" Voľby:\n" +" -d\tvypíše krátky popis každej z tém\n" +" -m\tvypíše použitie vo formáte podobnom manuálovej stránke\n" +" -s\tvypíše iba krátku syntax použitia každej z tém zodpovedajúcich\n" +" \tVZORu\n" +" \n" +" Argumenty:\n" +" VZOR\tVzor určujúci tému pomocníka\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že VZOR nebol nájdený a nebola zadaná\n" +" neplatná voľba." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Zobraziť alebo zmeniť históriu.\n" +" \n" +" Zobrazí históriu s číslami riadkov. Riadky s „*“ boli zmenené.\n" +" Argument N znamená zobraziť iba posledných N riadkov.\n" +" \n" +" Voľby:\n" +" -c\tvyčistenie histórie vymazaním všetkých jej položiek.\n" +" -d\tzmaže položku histórie na pozícii OFSET\n" +" \n" +" -a\tpridať riadky histórie z aktuálnej relácie do súbory s históriou.\n" +" -n\tprečítať všetky zatiaľ neprečítané riadky\n" +" -r\tprečítať súbor a pridať jeho obsah do zoznamu histórie\n" +" \tzo súboru histórie a pridať ich do zoznamu histórie.\n" +" -w\tvypíše aktuálnu históriu do súboru histórie.\n" +" \n" +" -p\tvykoná expanziu histórie každého ARG a zobrazí výsledok\n" +" \tbez toho aby ukladal čokoľvek do histórie.\n" +" -s\tpridá ARG, ktoré nie sú voľbami do histórie ako jednu položku.\n" +" \n" +" Ak je uvedený SÚBOR, použije sa ako súbor histórie, inak sa použije\n" +" $HISTFILE ak má nastavenú hodnotu, inak ~/.bash_history.\n" +" \n" +" Ak je premenná $HISTTIMEFORMAT nastavená a neprázdna, jej hodnota\n" +" sa použije ako formátovací reťazec strftime(3) na tlač príslušných\n" +" časových známok zobrazených pri každej položke histórie.\n" +" V opačnom prípade sa nebudú tlačiť časové známky.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." + +#: builtins.c:879 +#, fuzzy +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Zobraziť stav úloh.\n" +" \n" +" Vypíše aktívne úlohy. JOBSPEC vypíše iba úlohu s daným JOBSPEC.\n" +" Bez volieb sa vypíše stav všetkých aktívnych úloh.\n" +" \n" +" Voľby:\n" +" -l\tvypíše okrem bežných informácií aj ID procesov\n" +" -n\tvypíše iba procesy, ktorých stav sa zmenil od poslednej kontroly.\n" +" -p\tvypíše iba ID procesov\n" +" -r\tobmedzí výstup iba na bežiace úlohy\n" +" -s\tobmedzí výstup iba na zastavené úlohy\n" +" \n" +" Ak je zadaná voľba „-x“ PRÍKAZ sa spustí po tom, ako každá\n" +" zo špecifikácií úloh, ktoré sú uvedené v ARGS, boli nahradené\n" +" ID procesu lídra skupiny procesov danej úlohy.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba.\n" +" Ak je použitá voľba -x, vráti sa návratová hodnota PRÍKAZu." + +#: builtins.c:906 +#, fuzzy +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Odstrániť úlohy z aktuálneho shellu.\n" +" \n" +" Odstráni každý argument JOBSPEC z tabuľky aktívnych úloh. Bez uvedenia\n" +" akýchkoľvek JOBSPEC, shell použije svoj pojem aktuálnej úlohy.\n" +" \n" +" Voľby:\n" +" -a\todstráni všetky úlohy ak nie sú uvedené JOBSPEC\n" +" -h\toznačí každú JOBSPEC tak, že sa jej nepošle SIGHUP ak shell\n" +" \t\tdostane SIGHUP\n" +" -r\todstráni iba bežiace úlohy\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná JOBSPEC." + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Poslať úlohe signál.\n" +" \n" +" Pošle procesom s uvedeným PID (alebo JOBSPEC) signál SIGSPEC. Ak\n" +" nie je SIGSPEC uvedená, predpokladá sa SIGTERM.\n" +" \n" +" Voľby:\n" +" -s sig\tSIG je názov signálu\n" +" -n sig\tSIG je číslo signálu\n" +" -l\tvypíše názvy signálov; ak sú argumenty uvedené po „-l“,\n" +" \tpredpokladá sa, že sú to čísla signálov ktorých názvy sa majú\n" +" \tzobraziť.\n" +" \n" +" Kill je vstavaný (builtin) príkaz shellu z dvoch dôvodov: umožňuje\n" +" použitie ID úlohy okrem ID procesu a ak dosiahnete limit procesov, \n" +" ktoré môžete vytvoriť, nemusíte spúšťať proces na ukončenie iného.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Vyhodnotiť aritmetické výrazy.\n" +" \n" +" Vyhodnotí každý ARG ako aritmetický výraz. Vyhodnocuje\n" +" sa v celých číslach bez kontroly pretečenia, hoci delenie nulou sa\n" +" detekuje a označí ako chyba. Nasledujúci zoznam operátorov je\n" +" zoskupený do úrovní s rovnakou precedenciou operátorov.\n" +" Úrovne sú v poradí so zvyšujúcou sa precedenciou.\n" +" \n" +" \tid++, id--\tpostinkrementácia premennej, postdekrementácia\n" +" \t++id, --id--\tpreinkrementácia premennej, predekrementácia\n" +" \t-, +\t\tunárne mínus, plus\n" +" \t!, ~\t\tlogická negácia a negácia po bitoch\n" +" \t**\t\tumocnenie\n" +" \t*, /, %\t\tnásobenie, delenie, zvyšok po delení\n" +" \t+, -\t\tsčítanie, odčítanie\n" +" \t<<, >>\t\tposun doľava resp. doprava po bitoch\n" +" \t<=, >=, <, >\tporovnanie\n" +" \t==, !=\t\trovnosť, nerovnosť\n" +" \t&\t\tA po bitoch\n" +" \t^\t\tXOR po bitoch\n" +" \t|\t\tALEBO po bitoch\n" +" \t&&\t\tkonjunkcia\n" +" \t||\t\talternatíva\n" +" \tvýraz ? výraz : výraz\n" +" \t\t\tpodmienený operátor\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tpriradenie\n" +" \n" +" Premenné shellu sú prípustné ako oeprandy. Názov premennej sa\n" +" v rámci výrazu nahradí jej hodotou (prevedenou na celé číslo).\n" +" Nie je nutné, aby bol celočíselný atribút premennej zapnutý,\n" +" aby ju bolo možné použiť vo výraze.\n" +" \n" +" Operátory sa vyhodnocujú v pradí podľa precedencie. Sub-výrazy\n" +" v zátvorkách sa vyhodnocujú ako prvé a majú prednosť pred\n" +" hore uvedenými pravidlami precedencie.\n" +" \n" +" Návratová hodnota:\n" +" Ak sa posledný ARG vyhodnotí na 0, let vráti 1; 0 inak sa vráti 0." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Načítať riadok zo štandardného vstupu a rozdeliť ho do polí.\n" +" \n" +" Zo štandardného vstupu (alebo z popisovača FD ak je uvedená voľba -u)\n" +" sa načíta jeden riadok. Riadok sa rozdelí do polí ako pri delení \n" +" na slová a prvé slovo sa priradí prvému NÁZVU, druhé\n" +" slovo druhému NÁZVU atď. až zvyšné slová sa priradia poslednému\n" +" NÁZVU. Iba znaky, ktoré sa nachádzajú v $IFS sa považujú za\n" +" oddeľovače slov.\n" +" \n" +" Ak nie sú uvedené žiadne NÁZVY, načítaný riadok sa uloží do premennej\n" +" REPLY.\n" +" \n" +" Voľby:\n" +" -a pole\tvšetky načítané slová sa priradia postupne indexom poľa POLE,\n" +" \t\tpočínajúc nulou.\n" +" -d\tpokračovanie čítania až kým sa nevyskytne prvý znak znak DELIM\n" +" \t\tnamiesto znaku nového riadka.\n" +" -e\t\tna načítanie riadka sa použije Readline ak je shell " +"interaktívny.\n" +" -i text\tpoužije TEXT ako prvotný text pre Readline\n" +" -n nznakov\tčítanie vstupu skončí po načítaní NZNAKOV znakov bez " +"čakania\n" +" \t\tna nový riadok, ale rešpektovať oddeľovač v prípade menej ako " +"NZNAKOV\n" +" -N nchars\tčítanie vstupu skončí presne po načítaní ZNAKOV znakov,\n" +" \t\tiba ak by sa skôr vyskytol koniec súboru alebo časový interval na\n" +" \t\tčítanie vypršal, ignorujúc oddeľovače\n" +" -p\tvýzva\tpred pokusom o čítanie vypíše reťazec VÝZVA bez koncového\n" +" \t\tznaku nového riadka.\n" +" -r\tzápis únikových klauzúl pomocou spätnej lomky je vypnutý.\n" +" -s\tvstup načítaný z terminálu nebude vypisovať (echo).\n" +" -t interval\tukončenie čítania po vypršaní časového INTERVALu a ak\n" +" \tsa do intervalu nenačíta úplný riadok vstupu, vráti chybu. Ak je\n" +" \tnastavená premenná TIMEOUT, jej hodnota je štandardný interval\n" +" \texpirácie. TIMEOUT môže byť zlomok. Ak je TIMEOUT 0, read sa ukončí\n" +" \túspešne iba ak je na požadovanom popisovači k dispozícii vsup.\n" +" \tNávratová hodnota je väčšia ako 128 aj sa prekročí INTERVAL.\n" +" -u fd\tnamiesto štandardného vstupu čítať z popisovača súboru FD.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nenarazí pri čítaní nakoniec súboru, nevyprší čas na\n" +" čítanie a ako argument -u nebol je zadaný neplatný popisovač." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Návrat z funkcie shellu.\n" +" \n" +" Spôsobí ukončenie funkcie alebo skriptu vyvolaného pomocou source\n" +" s návratovou hodnotou N. Ak sa N vynechá, návratovou hodnotu je\n" +" návratová hodnota posledného vykonaného príkazu v tejto funkcii či\n" +" skripte.\n" +" \n" +" Návratová hodnota:\n" +" Vráti N alebo zlyhá ak shell nevykonáva funkciu či skript." + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Nastaviť alebo zrušiť nastavenie volieb shellu a pozičných parametrov.\n" +" \n" +" Zmení hodnotu atribútov shellu a pozičných parametrov alebo zobrazí\n" +" názvy a hodnoty premenných shellu.\n" +" \n" +" Voľby:\n" +" -a Označí premenné, ktoré sú zmenené alebo vytvorené na export.\n" +" -b Okamžite oznámi ukončenie úlohy.\n" +" -e Okamžite sa ukončí, keď sa príkaz ukončí s nenulovou návratovou\n" +" hodnotou.\n" +" -f Vypnúť tvorbu názvov súborov (globbing).\n" +" -h Pamätať si, kde sú umiestnené príkazy po ich vyhľadaní.\n" +" -k Všetky argumenty priradenia sa odovzdávajú do prostredia\n" +" príkazu, nie len tie, ktoré predchádzajú názvy príkazu.\n" +" -m Riadenie úloh je zapnuté.\n" +" -n Načítať príkazy, ale nevykonávať ich.\n" +" -o názov-voľby\n" +" Nastaví premennú zodpovedajúcu názvu-voľby:\n" +" allexport rovnaké ako -a\n" +" braceexpand rovnaké ako -B\n" +" emacs použiť rozhranie na úpravu príkazového riadka\n" +" v štýle emacs\n" +" errexit rovnaké ako -e\n" +" errtrace rovnaké ako -E\n" +" functrace rovnaké ako -T\n" +" hashall rovnaké ako -h\n" +" histexpand rovnaké ako -H\n" +" history zapnúť históriu príkazov\n" +" ignoreeof shell sa neukončí po načítaní znaku EOF\n" +" interactive-comments\n" +" umožní výskyt komentárov v interaktívnych " +"príkazoch\n" +" keyword rovnaké ako -k\n" +" monitor rovnaké ako -m\n" +" noclobber rovnaké ako -C\n" +" noexec rovnaké ako -n\n" +" noglob rovnaké ako -f\n" +" nolog momentálne sa prijme, ale ignoruje sa\n" +" notify rovnaké ako -b\n" +" nounset rovnaké ako -u\n" +" onecmd rovnaké ako -t\n" +" physical rovnaké ako -P\n" +" pipefail návratová hodnota postupnosti rúr je hodnota\n" +" posledného príkazu, ktorý skončil s nenulovou\n" +" hodnotou, alebo nula ak žiadny príkaz nevrátil\n" +" nenulovú hodnotu\n" +" posix zmeniť správanie bash, kde sa štandardné " +"správanie\n" +" líši od štandardu 1003.2 tak, aby mu zodpovedalo\n" +" privileged rovnaké ako -p\n" +" verbose rovnaké ako -v\n" +" vi použiť rozhranie na úpravu príkazového riadka\n" +" v štýle vi\n" +" xtrace rovnaké ako -x\n" +" -p Zapnuté vždy, keď sa skutočné a účinné ID používateľa nezhoduje.\n" +" Vypína spracúvanie súboru $ENV a importovanie funkcií shellu.\n" +" Vypnutie tejto voľby spôsobí, že účinný UID a GID sa nastavia\n" +" na skutočný UID a GID.\n" +" -t Ukončiť po načítaní a vykonaní jedného príkazu.\n" +" -u Považovať nenastavené premenné za chybu pri substitúcii.\n" +" -v Vypisovať vstupné riadky shellu postupne ako sa načítavajú.\n" +" -x Vypisovať príkazy a ich argumenty postupne ako sa načítavajú.\n" +" -B Shell bude vykonávať expanziu zložených zátvoriek\n" +" -C Ak je voľba nastavená, zamedzí prepísaniu existujúcich súborov\n" +" persmerovaním výstupu.\n" +" -E Ak je voľba nastavená, zachytenie ERR zdedia funkcie shellu.\n" +" -H Zapne substitúciu príkazov z histórie pomocou znaku !. Tento\n" +" prepínač je štandardne zapnutý, keď je shell interaktívny.\n" +" -P Ak je voľba nastavená, nenasledovať symbolické odkazy pri\n" +" vykonávaní príkazov ako cd, ktoré menia aktuálny adresár.\n" +" -T Ak je voľba nastavená, zachytenie DEBUG zdedia funkcie shellu.\n" +" -- Odovzdať všetky zostávajúce argumenty pozičným parametrom.\n" +" Ak nezostávajú žiadne argumenty, zruší sa nastavenie pozičných\n" +" parametrov.\n" +" - Odovzdať všetky zostávajúce argumenty pozičným parametrom.\n" +" Voľby -x a -v sú vypnuté.\n" +" \n" +" Použitie + namiesto - spôsobí vypnutie voľby. Voľby je tiež možné\n" +" použiť pri vyvolaní shellu. Momentálne nastavené voľby možno nájsť v\n" +" $-. Zostávajúcich n ARGumentov je pozičných a priradia sa postupne\n" +" premenným $1, $2, .. $n. Ak nie sú zadané žiadne ARGumenty, všetky\n" +" premenné shellu sa vypíšu.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba." + +#: builtins.c:1139 +#, fuzzy +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Zrušiť nastavenie hodnôt a atribútov premenných shellu a funkcií.\n" +" \n" +" Pre každý NÁZOV odstráni zodpovedajúcu premennú alebo funkciu.\n" +" \n" +" Voľby:\n" +" -f\tpovažovať každý NÁZOV za funkciu shellu\n" +" -v\tpovažovať každý NÁZOV za premennú shellu\n" +" \n" +" Bez uvedenia volieb sa unset najskôr pokúša zrušiť nastavenie\n" +" premennej a ak sa mu to nepodarí, pokúsi sa zrušiť nastavenie\n" +" funkcie.\n" +" \n" +" Nastavenie niektorých premenných nemožno zrušiť; pozri aj „readonly“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že je NÁZOV iba na čítanie a nebola zadaná\n" +" neplatná voľba." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Nastaviť atribút export premenným shellu.\n" +" \n" +" Označí každý NÁZOV na automatický export do prostredia ďalších\n" +" spúšťaných príkazov. Ak je zadaná HODNOTA, pred exportovaním priradí\n" +" premenej HODNOTU.\n" +" \n" +" Voľby:\n" +" -f\toznačuje funkcie shellu\n" +" -n\todoberie z NÁZVU atribút export\n" +" -p\tzobrazí zoznam exportovaných premenných a funkcií\n" +" \n" +" Argument „--“ vypína spracovanie ďalších volieb.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že je NÁZOV neplatný a nebola zadaná\n" +" neplatná voľba." + +#: builtins.c:1180 +#, fuzzy +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Označiť premenné shellu ako nemeniteľné.\n" +" \n" +" Označí každý NÁZOV ako len na čítanie (atribút readonly); hodnoty " +"týchto\n" +" NÁZVOV nie je možné ďalej meniť priradením. Ak je zadaná HODNOTA,\n" +" pred označením ako readonly priradiť premenej HODNOTU.\n" +" \n" +" Voľby:\n" +" -a\todkazuje na premenné indexovaných polí\n" +" -A\todkazuje na premenné asociatívnych polí\n" +" -f\todkazuje na funkcie shellu\n" +" -p\tzobrazí zoznam premenných a funkcií len na čítanie\n" +" \n" +" Argument „--“ vypína spracovanie ďalších volieb.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že je NÁZOV neplatný a nebola zadaná\n" +" neplatná voľba." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Posunúť pozičné parametre.\n" +" \n" +" Premenovať pozičné parametre $N+1,$N+2 ... to $1,$2 ... Ak N nie je\n" +" zadané, predpokladá sa N=1.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že je N záporné alebo väčšie ako $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Vykonať príkazy zo súboru v aktuálnom shelli.\n" +" \n" +" Načítať a vykonať príkazy zo SÚBORu v aktuálnom shelli.\n" +" Na nájdenie adresára obsahujúceho SÚBOR sa použijú cesty z $PATH.\n" +" Ak sú zadané nejaké ARGUMENTY, použijú sa ako pozičné argumenty\n" +" pri vykonaní SÚBORu.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného príkazu v SÚBORe; zlyhá ak nie je\n" +" možné SÚBOR načítať." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Pozastaviť vykonávanie shellu.\n" +" \n" +" Pozastaviť vykonávanie shellu pokým nedostane signál SIGCONT.\n" +" Ak to nie je vynútené, login shell nie je možné pozastaviť.\n" +" \n" +" Voľby:\n" +" -f\tvynútiť pozastavenie aj v prípade, že shell je login shell\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že je vypnuté riadenie úloh a nevyskytla sa chyba." + +#: builtins.c:1261 +#, fuzzy +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Vyhodnotiť podmienený výraz.\n" +" \n" +" Skončí s návratovou hodnotou 0 (pravda) alebo 1 (nepravda)\n" +" v závislosti na vyhodnotení VÝR. Výrazy môžu byť unárne alebo\n" +" binárne. Unárne výrazy sa často používajú na vyhodnotenie stavu\n" +" súboru. Existujú aj operátory pracujúce s reťazcami a na\n" +" porovnávanie.\n" +" \n" +" Správanie príkazu test závisí na počte argumentov. Úplnú\n" +" špecifikáciu si môžete prečítať na manuálovej stránke bash.\n" +" \n" +" Operátory súborov:\n" +" \n" +" -a SÚBOR Pravda ak súbor existuje.\n" +" -b SÚBOR Pravda ak je súbor špeciálne blokové zariadenie.\n" +" -c SÚBOR Pravda ak je súbor špeciálne znakové zariadenie.\n" +" -d SÚBOR Pravda ak je súbor adresárom.\n" +" -e SÚBOR Pravda ak súbor existuje.\n" +" -f SÚBOR Pravda ak súbor existuje a je to obyčajný súbor.\n" +" -g SÚBOR Pravda ak je súbor set-group-id.\n" +" -h SÚBOR Pravda ak je súbor symbolický odkaz.\n" +" -L SÚBOR Pravda ak je súbor symbolický odkaz.\n" +" -k SÚBOR Pravda ak má súbor nastavený „sticky“ bit.\n" +" -p SÚBOR Pravda ak je súbor pomenovaná rúra.\n" +" -r SÚBOR Pravda ak je pre vás súbor čitateľný.\n" +" -s SÚBOR Pravda ak súbor existuje a nie je prázdny.\n" +" -S SÚBOR Pravda ak súbor socket.\n" +" -t FD Pravda ak je deskriptor FD otvorený v termináli.\n" +" -u SÚBOR Pravda ak je súbor set-user-id.\n" +" -w SÚBOR Pravda ak je pre vás súbor zapisovateľný.\n" +" -x SÚBOR Pravda ak je pre vás súbor vykonateľný.\n" +" -O SÚBOR Pravda ak ste účinným vlastníkom súboru.\n" +" -G SÚBOR Pravda ak je vaša skupina účinným vlastníkom súboru.\n" +" -N SÚBOR Pravda ak bol súbor od posledného čítania zmenený.\n" +" \n" +" SÚBOR1 -nt SÚBOR2 Pravda ak je SÚBOR1 novší ako SÚBOR2 (podľa\n" +" dátumu poslednej zmeny).\n" +" \n" +" SÚBOR1 -ot SÚBOR2 Pravda ak je SÚBOR1 starší ako SÚBOR2.\n" +" \n" +" SÚBOR1 -ef SÚBOR2 Pravda ak je SÚBOR1 pevným odkazom na SÚBOR2.\n" +" \n" +" Operátory reťazcov:\n" +" \n" +" -z REŤAZEC Pravda ak je reťazec prázdny.\n" +" \n" +" -n REŤAZEC\n" +" REŤAZEC Pravda ak je reťazec neprázdny\n" +" \n" +" REŤAZEC1 = REŤAZEC2\n" +" Pravda ak sa reťazce rovnajú.\n" +" REŤAZEC1 != REŤAZEC2\n" +" Pravda ak sa reťazce nerovnajú.\n" +" REŤAZEC1 < REŤAZEC2\n" +" Pravda ak je REŤAZEC1 pre REŤAZCOM2 v lexikografickom " +"poradí.\n" +" REŤAZEC1 > REŤAZEC2\n" +" Pravda ak je REŤAZEC1 po REŤAZCI2 v lexikografickom " +"poradí.\n" +" \n" +" Iné operátory:\n" +" \n" +" -o VOĽBA Pravda ak je VOĽBA shellu zapnutá.\n" +" -v PREM\t Pravda ak je premenná PREM shellu nastavená.\n" +" ! VÝR Pravda ak je VÝR nepravdivý.\n" +" VÝR1 -a VÝR2 Pavda ak sú oba VÝR1 aj VÝR2 pravdivé.\n" +" VÝR1 -o VÝR2 Pavda ak je aspoň jeden z VÝR1 a VÝR2 pravdivý.\n" +" \n" +" arg1 OP arg2 Aritmetické testy. OP je jeden z -eq, -ne,\n" +" -lt, -le, -gt alebo -ge.\n" +" \n" +" Aritmetické binárne operátory vracajú pravdu, keď sa ARG1 rovná,\n" +" nerovná, je menší, menší alebo rovný, väčší, väčší alebo rovný ako\n" +" ARG2.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak VÝR vyhodnotí ako pravdivý; zlyhá ako sa VÝR vyhodnotí\n" +" ako nepravdivý alebo je zadaný neplatný argument." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Vyhodnotiť podmienený výraz.\n" +" \n" +" Toto je synonymum vsatavanej funkcie „test“, ale posledný\n" +" argument musí byť literál „]“, ktorý uzatvára otvárajúcu „[“." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Zobraziť časy procesov\n" +" \n" +" Vypíše súhrnné používateľské a systmové časy shellu a všetkých jeho\n" +" potomkov.\n" +" \n" +" Návratová hodnota:\n" +" Vždy vráti 0." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Zachytiť signály a iné udalosti.\n" +" \n" +" Definuje a aktivuje spustenie obsluhy udalosti, keď shell dostane " +"signál\n" +" SIGNAL_SPEC alebo iných podmienok.\n" +" \n" +" Príkaz ARG sa načíta a vykoná, keď shell dostane signál(y) SIGNAL_SPEC.\n" +" Ak ARG chýba (a je uvedený jediný SIGNAL_SPEC) alebo je „-“,\n" +" každý uvedený signál sa obnoví na pôvodnú hodnotu. Ak je ARG\n" +" prázdny režazec, každý SIGNAL_SPEC shell a príkaz, ktorý vyvolá,\n" +" ignoruje.\n" +" \n" +" Ak SIGNAL_SPEC je EXIT (0), príkaz ARG sa vykoná pri ukončení shellu.\n" +" Ak je SIGNAL_SPEC DEBUG, ARG sa vykoná po každom jednoduchom príkaze.\n" +" Ak je SIGNAL_SPEC RETURN, ARG sa vykoná po každom vykonaní funkcie " +"shellu\n" +" alebo dokončení skriptu spusteného pomocou „.“ alebo „source“.\n" +" Ak je SIGNAL_SPEC ERR, ARG sa vykoná po každom ukončení shellu " +"spôsobenom\n" +" chybou príkazu, keď je zapnutá voľba -e.\n" +" \n" +" Ak nie sú uvedené žiadne argumenty, trap vypíše zoznam príkazov\n" +" asociovaných s každým signálom.\n" +" \n" +" Voľby:\n" +" -l\tvypíše zoznam názvov signálov a ich zodpovedajúce čísla\n" +" -p\tzobrazia sa príkazy trap asociované s každým SIGNAL_SPEC\n" +" \n" +" Každý SIGNAL_SPEC je buď názov signálu ako v alebo číslo\n" +" signálu. V názvoch signálov sa nerozlišuje veľkosť písmen a predpona\n" +" SIG je nepovinná. Signál je možné shellu poslať príkazom „kill -signal $" +"$“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že je SIGSPEC neplatný a nebola zadaná\n" +" neplatná voľba." + +#: builtins.c:1400 +#, fuzzy +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Zobraziť informácie o type príkazu.\n" +" \n" +" Pre každý NÁZOV vypíše ako by sa interpretoval keby bol použitý\n" +" ako názov príkazu.\n" +" \n" +" Voľby:\n" +" -a\tzobrazí všetky umiestnenia, ktoré obsahujú spustiteľný súbor\n" +" \ts názvom NÁZOV; vrátane aliasov, vstavaných funkcií a funkcií\n" +" \tak a iba ak nebola použitá voľba „-p“\n" +" -f\tpotlačiť hľadanie vo funkciách shellu\n" +" -P\tvynútiť pri každom NÁZVE vyhľadanie v CESTE, aj ak je to alias,\n" +" \tvstavaná funkcia alebo funkcia a vráti názov súboru na disku,\n" +" \tktorý by sa spustil\n" +" -p\tvráti buď názov súboru na disku, ktorý by sa spustil, alebo nič\n" +" \tak by „type -t NAME“ nevrátilo „file“.\n" +" -t\tvypísať jediné slovo, jedno zo slov „alias“, „keyword“,\n" +" \t„function“, „builtin“, „file“ alebo „“, ak je názov alias,\n" +" \tvyhradené slovo shellu, funkcia shellu, vstavaná funkcia shellu,\n" +" \tsúbor na disku alebo NÁZOV nebol nájdený\n" +" \n" +" Argumenty:\n" +" NÁZOV\tNázov príkazu, ktorý sa má interpretovať.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak boli nájdené všetky NÁZVY; zlyhá ak nie." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Zmeniť obmedzenia prostriedkov shellu.\n" +" \n" +" Poskytuje kontrolu nad prostriedkami dostupnými procesu,\n" +" ktorý spustil shell na systémoch, ktoré takúto kontrolu umožňujú.\n" +" Ak sú zadané voľby, vyhodnocujú sa nasledovne:\n" +" \n" +" -S\tpoužiť „mäkký“ limit prostriedkov\n" +" -H\tpoužiť „tvrdý“ limit prostriedkov\n" +" -a\toznámi všetky aktuálne limity\n" +" -c\tmaximálna veľkosť vytvorených core súborov\n" +" -d\tmaximálna veľkosť dátového segmentu procesu\n" +" -e\tmaximálna priorita plánovania („nice“)\n" +" -f\tmaximálna veľkosť súborov, ktoré zapíše shell a jeho potomkovia\n" +" -i\tmaximálny počet čakajúcich signálov\n" +" -l\tmaximálna veľkosť pamäte, ktorú môže proces uzamknúť\n" +" -m\tmaximálna veľkosť pracovnej množiny\n" +" -n\tmaximálny počet otvorených popisovačov súborov\n" +" -p\tveľkosť bufera rúry\n" +" -q\tmaximálny počet bajtov v POSIX frontoch správ\n" +" -r\tmaximálna priorita plánovania v reálnom čase\n" +" -s\tmaximálna veľkosť zásobníka\n" +" -t\tmaximálne množstvo času CPU v sekundách\n" +" -u\tmaximálny počet používateľských procesov\n" +" -v\tveľkosť virtuálnej pamäte\n" +" -x\tmaximálny počet zámkov súborov\n" +" \n" +" Ak je zadaný LIMIT, je to nová hodnota zadaného prostriedku;\n" +" špeciálne hodnoty LIMIT sú „soft“, „hard“ a „unlimited“, ktoré\n" +" znamenajú aktuálny mäkký limit, aktuálny tvrdý limit resp. žiadny " +"limit.\n" +" Inak sa vypíše aktuálna hodnota zadaného prostriedku.\n" +" Ak nie je zadaná žiada voľba, predpokladá sa -f.\n" +" \n" +" Hodnoty sú v násobkoch 1024 bajtov okrem -t, ktorý je v sekundách,\n" +" -p, ktorý je v násobkoch 512 bajtov a -u, čo znamená neobmedzený\n" +" počet procesov.\n" +" \n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Zobraziť alebo nastaviť masku režimu súboru.\n" +" \n" +" Nastaví masku súborov vytvorených používateľom na REŽIM. Ak sa\n" +" REŽIM vynechá, vypíše aktuálnu hodnotu masky.\n" +" \n" +" Ak REŽIM začína bodkou, interpretuje sa ako osmičkové číslo;\n" +" inak je to symbolické označenie režimu aké prijíma chmod(1).\n" +" \n" +" Voľby:\n" +" -p\tak sa REŽIM vynechá, vypíše výstup v tvare, ktorý je možné\n" +" \tpoužiť ako vstup\n" +" -S\tvýpis v symbolickom tvare; inak osmičkové číslo\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že je REŽIM neplatný a nebola zadaná\n" +" neplatná voľba." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Čakať na dokončenie úlohy a vrátiť návratovú hodnotu.\n" +" \n" +" Počká na proces s identifikátorom ID, čo môže byť PID alebo " +"špecifikácia\n" +" úlohy a oznámi stav jeho ukončenia. Ak nie je ID zadaný, počká na " +"všetky\n" +" momentálne aktívne detské procesy vo fronte úloh.\n" +" \n" +" Návratová hodnota:\n" +" Vráti stav ID; zlyhá ak je ID neplatný alebo bola zadaná\n" +" neplatná voľba." + +#: builtins.c:1533 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Čakať na ukončenie zadaného procesu a vypísať jeho návratovú hodnotu.\n" +" \n" +" Čaká na ukončenie zadaného procesu a oznámi jeho návratovú\n" +" hodnotu. Ak nie je PID zadané, čaká sa na všetky momentálne\n" +" aktívne procesy potomkov a návratová hodnota je nula.\n" +" PID musí byť ID procesu.\n" +" \n" +" Návratová hodnota:\n" +" Vráti stav ID; zlyhá ak je ID neplatný alebo bola zadaná neplatná\n" +" voľba." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykoná množinu príkazov pre každú položku zoznamu.\n" +" \n" +" Cyklus „for“ vykonáva postupnosť príkazov pre každú položku v zozname.\n" +" Ak nie je prítomné „in SLOVÁ ...;“, potom sa predpokladá „in \"$@\"“.\n" +" Pre každý prvok v SLOVÁch sa NÁZOV nastaví na hodnotu položky a\n" +" vykonajú sa PRÍKAZY.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného vykonaného príkazu." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetický cyklus for.\n" +" \n" +" Ekvivalent\n" +" \t(( VÝR1 ))\n" +" \twhile (( VÝR2 )); do\n" +" \t\tPRÍKAZY\n" +" \t\t(( VÝR3 ))\n" +" \tdone\n" +" VÝR1, VÝR2 a VÝR3 sú aritmetické výrazy. Ak sa vykoná ktorýkoľvek\n" +" výraz, chovanie je ako by sa vyhodnotil na 1.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného vykonaného príkazu." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vybrať slová zo zoznamu a vykonať príkazy.\n" +" \n" +" SLOVÁ sa rozbalia, čím sa vytvorí zoznam slov. Zoznam slov sa\n" +" vypíše na štandardný chybový výstup, pred každým z nich číslo.\n" +" Ak nie je prítomné „in SLOVÁ“, použije sa „in \"$@\"“. Zobrazí sa\n" +" výzva PS3 a načíta sa riadok zo štandardného vstupu. Ak riadok\n" +" pozostáva z čísla zodpovedajúcemu jednému zo zobrazených slov,\n" +" NÁZOV sa nastaví na dané slovo. Ak je riadok prázdny, SLOVÁ a\n" +" výzva sa znova zobrazia. Po načítaní znaku konca súboru príkaz\n" +" končí. Načítanie akejkoľvek inej hodnoty spôsobí nastavenie NÁZVU\n" +" na NULL. Načítaný riadok sa uloží do premennej ODPOVEĎ. PRÍKAZY\n" +" sa vykonajú po každom výbere až kým sa nevykoná príkaz break.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného vykonaného príkazu." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Oznámiť čas využitý vykonávaním rúry.\n" +" \n" +" Vykonať RÚRU a po jej skončení vypísať zhrnutie skutočného času,\n" +" času CPU a systémového času CPU stráveného vykonaním RÚRY.\n" +" \n" +" Voľby:\n" +" -p\tvypíše zhrnutie časov v prenosnom formáte Posix.\n" +" \n" +" Na formátovanie výstupu sa použije hodnota premennej TIMEFORMAT.\n" +" \n" +" Návratová hodnota:\n" +" Návratová hodnota je návratová hodnota RÚRY." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykonať príkazy na základe porovnávania vzorov\n" +" \n" +" Selektívne vykonávať PRÍKAZY na základe toho, či SLOVO zodpovedá\n" +" VZORu.. „|“ sa použije na oddelenie viacerých vzorov.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného vykonaného príkazu." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykonať príkazy na základe podmienky.\n" +" \n" +" Vykoná sa zoznam „if PRÍKAZY“. Ak je jeho návratová hodnota nula, " +"vykoná\n" +" sa zoznam „then PRÍKAZY“. Inak sa postupne vykoná každý zoznam\n" +" „elif PRÍKAZY“ a ak je jeho návratová hodnota nula, vykoná sa " +"zodpovedajúci\n" +" zoznam „then PRÍKAZY“ a príkaz if skončí. Inak sa vykoná „else " +"PRÍKAZY“,\n" +" ak je prítomný. Návratová hodnota celej konštrukcie je návratová " +"hodnota\n" +" posledného vykonaného príkazu alebo nula ak sa žiadna podmienka\n" +" nevyhodnotila na pravdu.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného vykonaného príkazu." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykonávať príkazy kým podmienka platí.\n" +" \n" +" Rozbaliť a vykonávať PRÍKAZY pokým posledný príkaz medzi PRÍKAZMI\n" +" „while“ nemá návratovú hodnotu nula.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného vykonaného príkazu." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Vykonávať príkazy kým podmienka neplatí.\n" +" \n" +" Rozbaliť a vykonávať PRÍKAZY pokým posledný príkaz medzi PRÍKAZMI\n" +" „until“ nemá nenulovú návratovú hodnotu.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného vykonaného príkazu." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Vytvoriť koproces s názvom NÁZOV.\n" +" \n" +" Vykoná PRÍKAZ asynchrónne, pričom štandardný výstup a vstup príkazu\n" +" spojí rúrou s popsiovačmi súborov priradeným indexom poľa 0 a 1\n" +" premennej poľa NÁZOV v spúštajúcom shelli.\n" +" Štandardný NÁZOV je „COPROC“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu PRÍKAZu." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Definovať funkciu shellu.\n" +" \n" +" Vytvorí funkciu shellu NÁZOV. Keď sa spustí ako jednoduchý príkaz, " +"NÁZOV\n" +" spustí PRÍKAZy v kontexte vulajúceho shellu. Keď sa spustí v tvare " +"NÁZOV,\n" +" argumenty sa odovzdajú funkcii ako $1...$n a názov funkcie je " +"$FUNCNAME.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak sa nestalo, že je NÁZOV iba na čítanie." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Zoskupiť príkazy do jednotky.\n" +" \n" +" Spustiť množinu príkazov v skupine. Toto je jeden zo spôsobov ako\n" +" presmerovať celú možinu príkazov.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu posledného vykonaného príkazu." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Vyhodnotiť podmienený výraz.\n" +" \n" +" Ekvivalentné argumentu JOB_SPEC príkazu „fg“ Obnoví beh\n" +" zastavenej úlohy alebo úlohyu bežiacej v pozadí. JOB_SPEC môže\n" +" určiť buď názov alebo číslo úlohy. Ak po JOB_SPEC nasleduje „&“, úloha\n" +" sa umiestni do pozadia, ako keby bola špecifikácia úlohy zadaná ako\n" +" argument príkazu „bg“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti návratovú hodnotu obnovenej úlohy." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Vyhodnotiť aritmetický výraz.\n" +" \n" +" VÝRAZ sa vyhodnotí podľa pravidiel aritmetického vyhodnocovania.\n" +" Ekvivalentné s „let VÝRAZ“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 1 ak sa VÝRAZ vyhodnotí na 0; inak vráti 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Vykonať podmienený výraz.\n" +" \n" +" Vráti 0 alebo 1 v závislosti na vyhodnotení výrazu podmienky VÝRAZ.\n" +" Výrazy sa skladajú z rovnakých zložiek ako pri vstavanom príkaze\n" +" „test“ a je možné ich kombinovať pomocou nasledovných operátorov\n" +" \n" +" \t( VÝRAZ )\tVracia hodnoru výrazu VÝRAZ\n" +" \t! VÝRAZ\tPravdivý, ak je VÝRAZ nepravdivý; inak pravdivý\n" +" \tVÝR1 && VÝR2\tPravdivý ak je VÝR1 a zároveň VÝR2 pravdivý; inak " +"nepravdivý\n" +" \tVÝR1 || VÝR2\tPravdivý ak je VÝR1 alebo VÝR2 pravdivý; inak " +"nepravdivý\n" +" \n" +" Ak sú použité operátory „==“ a „!=“, reťazec napravo od operátora\n" +" sa použije ako vzor a vykoná sa hľadanie zhody reťazcov. Operátory\n" +" && a || nevyhodnocujú VÝR2 ak hodnota VÝR1 postačuje na určenie\n" +" hodnoty výrazu.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 alebo 1 v závislosti na hodnote VÝRAZu." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Bežné názvy premenných shellu a ich použitie\n" +" \n" +" BASH_VERSION\tInformácie o verzii tohto Bash.\n" +" CDPATH\tBodkočiarkami oddelený zoznam adresárov, v ktorých sa budú\n" +" \t\thľadať adresáre dané ako argument príkazu „cd“.\n" +" GLOBIGNORE\tBodkočiarkami oddelený zoznam vzorov popisujúcich názvy\n" +" \t\tsúborov, ktoré má expanzia názvov ciest ignorovať.\n" +" HISTFILE\tNázov súboru, kde je uložená vaša história príkazov.\n" +" HISTFILESIZE\tMaximálny počet riadkov, ktorý môže obsahovať.\n" +" HISTSIZE\tMaximálny počet riadkov, su ktorým môže pristupovať\n" +" \t\tbežiaci shell.\n" +" HOME\tÚplná cesta k vášmu prihlasovaciemu adresáru.\n" +" HOSTNAME\tNázov stroja, na ktorom sa momentálne nachádzate.\n" +" HOSTTYPE\tTyp procesora, na ktorom beží táto verzia Bash.\n" +" IGNOREEOF\tRiadi činnosť shellu po prijatí znaku EOF ako\n" +" \t\tjediného na vstupe. Ak je voľba nastavená, jej hodnota je\n" +" \t\tpočet znakov EOF, ktoré budú za sebou prijaté na prázdnom\n" +" \t\triadku predtým, než sa shell ukončí (štandardne 10). Ak voľba\n" +" \t\tNie je nastavená, EOF značí koniec vstupu.\n" +" MACHTYPE\tReťazec popisujúci systém, na ktorom Bash práve beží.\n" +" MAILCHECK\tAko často v sekundách Bash kontroluje novú poštu.\n" +" MAILPATH\tBodkočiarkami oddelený zoznam názvov súborov,\n" +" \t\tv ktorých Bash kontroluje novú poštu.\n" +" OSTYPE\tVerzia Unixu na ktorej tento Bash beží.\n" +" PATH\tBodkočiarkami oddelený zoznam adresárov, v ktorých sa\n" +" \t\tmajú hľadať príkazy.\n" +" PROMPT_COMMAND\tPríkaz, ktorý sa má vykonať pred každým\n" +" \t\tvypísaním primárnej výzvy.\n" +" PS1\t\tReťazec primárnej výzvy.\n" +" PS2\t\tReťazec sekundárnej výzvy.\n" +" PWD\t\tPlná cesta k aktuálnemu adresáru.\n" +" SHELLOPTS\tBodkočiarkami oddelený zoznam zapnutých volieb shellu.\n" +" TERM\tNázov aktuálneho typu terminálu.\n" +" TIMEFORMAT\tFormát výstupu štatistiky doby behu, ktorú zobrazuje\n" +" \t\tvyhradené slovo „time“.\n" +" auto_resume\tNenulová hodnota značí príkaz, ktorý keď sa vyskytuje na\n" +" \t\tsamostatnom riadku, vyhľadá sa v zozname momentálne\n" +" \t\tzastavených úloh. Ak sa je tam nachádza, úloha sa prenesie do\n" +" \t\tpopredia. Hodnota „exact“ znamená, že slovo príkazu sa musí\n" +" \t\tpresne zhodovať s príkazom v zozname zastavených úloh.\n" +" \t\tHodnota „substring“ znamená, že slovo príkazu sa musí zhodovať s\n" +" \t\tpodreťazcom úlohy. Akákoľvek iná hodnota znamená, že\n" +" \t\tpríkaz musí byť predponou zastavenej úlohy.\n" +" histchars\tZnaky riadiace dopĺňanie histórie a rýchle\n" +" \t\tnahrádzanie. prvý znak je znak nahrádzania z\n" +" \t\thistórie, zvyčajne „!“. Druhý je znak „rýchleho\n" +" \t\tnahrádzania“, zvyčajne „^“. Tretí je znak\n" +" \t\t„komentára histórie“, zvyčajne „#“.\n" +" HISTIGNORE\tBodkočiarkami oddelený zoznam vzoriek, ktoré\n" +" \t\tsa používajú na rozhodovanie, či sa príkaz uloží do histórie.\n" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Pridať adresár na zásobník.\n" +" \n" +" Pridá adresár na vrchol zásobníka adresárov alebo ho otočí tak, že\n" +" nový vrchol zásobníka sa stane aktuálnym pracovným adresárom.\n" +" Bez argumentov vymení vrchné dva adresáre.\n" +" \n" +" Voľby:\n" +" -n\tpotlačí normálnu zmenu adresára pri odstraňovaní položiek\n" +" \tzo zásobníka, takže sa zmení iba zásobník.\n" +" \n" +" Argumenty:\n" +" +N\tOtočí zásobník tak, že N-tý adresár (počítajúc zľava zoznamu,\n" +" \tktorý zobrazuje „dirs“, počínajúc nulou) je na vrchu.\n" +" \n" +" -N\tOtočí zásobník tak, že N-tý adresár (počítajúc sprava zoznamu,\n" +" \tktorý zobrazuje „dirs“, počínajúc nulou) je na vrchu.\n" +" \n" +" adr\tpridá ADR na vrchol zásobníka adresárov, čím sa tento stane\n" +" \tnovým aktuálnym pracovným adresárom.\n" +" \n" +" Zásobník adresárov môžete zobraziť vstavaným príkazom „dirs“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa\n" +" chyba pri zmene adresára." + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Odstrániť položky zo zásobníka adresárov.\n" +" \n" +" Odstráni položky zo zásobníka adresárov. Bez argumentov odstráni\n" +" vrchnú položku zo zásobníka a zmení adresár na adresár, ktorý\n" +" sa následne nachádza na vrchu zásobníka.\n" +" \n" +" Voľby:\n" +" -n\tpotlačí normálnu zmenu adresára pri odstraňovaní položiek\n" +" \tzo zásobníka, takže sa zmení iba zásobník.\n" +" \n" +" +N\todstráni N-tú položku položku počítajúc zľava zoznamu,\n" +" \tktorý zobrazuje „dirs“, počínajúc nulou. Napríklad: „popd +0“\n" +" \todstráni prvý adresár, „popd +1“ druhý.\n" +" \n" +" -N\todstráni N-tú položku položku počítajúc sprava zoznamu,\n" +" \tktorý zobrazuje „dirs“, počínajúc nulou. Napríklad: „popd -0“\n" +" \todstráni posledný adresár, „popd -1“ predposledný.\n" +" \n" +" Zásobník adresárov môžete zobraziť príkazom „dirs“.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa\n" +" chyba pri zmene adresára." + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Zobraziť zoznam momentálne zapamätaných adresárov.\n" +" \n" +" Zobrazí zoznam momentálne zapamätaných adresárov. Adresáre\n" +" sa do zoznamu dostávajú príkazom „pushd“; zo zoznamu ich môžete\n" +" vyberať postupne príkazom „popd“.\n" +" \n" +" Voľby:\n" +" -c\tvyprázdniť zásobník adresárov zmazaním všetkých položiek.\n" +" -l\tnevypisovať skrátené verzie adresárov vzhľadom na domovský\n" +" \t\trelatívne k vášmu domovskému adresáru\n" +" -p\tvypisovať zásobník adresárov vo formáte jedna položka na riadok\n" +" -v\tvypisovať zásobník adresárov vo formáte jedna položka na\n" +" \t\triadok a pred adresár vypísať jeho pozíciu v zásobníku.\n" +" \n" +" +N\tzobrazuje N-tú položku počítajúc zľava zoznamu, ktorý zobrazuje\n" +" \t\tdirs vyvolaný bez volieb, počínajúc nulou.\n" +" \n" +" -N\tzobrazuje N-tú položku počítajúc sprava zoznamu, ktorý zobrazuje\n" +" \t\tdirs vyvolaný bez volieb, počínajúc nulou.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa chyba." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Nastaviť a zrušiť nastavenie volieb shellu.\n" +" \n" +" Zmení nastavenie každej z volieb shellu OPTNAME. Bez akýchkoľvek\n" +" argumentov volieb vypíše všetky voľby shellu s označením, či je každá\n" +" z nich nastavená alebo nie.\n" +" \n" +" Voľby:\n" +" -o\tobmedzí OPTNAME na tie, ktoré sú definované na použitie\n" +" \tso „set -o“\n" +" -p\tvypíše každú voľbu shellu s označením jej stavu\n" +" -q\tpotlačí výstup\n" +" -s\tzapnúť (nastaviť) každú OPTNAME\n" +" -u\tvypnúť (zrušiť nastavenie) každú OPTNAME\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak je OPTNAME zapnuté; zlyhá ak bola zadaná\n" +" neplatná voľba alebo OPTNAME je vypnuté." + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formátuje a vypisuje ARGUMENTY podľa FORMÁTu.\n" +" \n" +" Voľby:\n" +" -v PREM\tpriradiť výstup premennej shellu PREM namiesto\n" +" \t\tzobrazenia na štandarný výstup\n" +" \n" +" FORMÁT je reťazec znakov, ktorý obsahuje tri typy objektov: čisté " +"znaky,\n" +" ktoré sa jednoducho skopírujú na štandardný výstup, únikové klauzuly,\n" +" ktoré sa nahradia zodpovedajúcim výstupom a skopírujú na štandardný\n" +" výstup a špecifikácie formátu, z ktorých každá spôsobí vypísanie\n" +" nasledovného argumentu.\n" +" \n" +" Okrem štandardných formátov popísaných v printf(1) a printf(3)\n" +" printf rozoznáva:\n" +" \n" +" %b\trozšíriť únikové klauzuly backspace v zodpovedajúcom argumente\n" +" %q\tdať argument do zátvoriek tak, aby ho bolo možné použiť ako\n" +" \tvstup shellu.\n" +" %(fmt)T vyspísať reťacez dátumu a času, ktorý vznikne použitím FMT\n" +" ako formátovacieho reťazca pre strftime(3)\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba pri\n" +" zápise či priradení." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Definuje ako má Readline dopĺňať argumenty.\n" +" \n" +" Pre každý NÁZOV uviesť ako sa majú dopĺňať argumenty. Ak nie sú zadané\n" +" žiadne argumenty, vypíšu sa existujúce dopĺňania v takom tvare, ktorý\n" +" je možné znova použiť ako vstup.\n" +" \n" +" Voľby:\n" +" -p\tvypísať existujúce špecifikácie dopĺňania v znovapoužiteľnom\n" +" \ttvare\n" +" -r\todstrániť špecifikáciu dopĺňania každého NÁZVU alebo ak nie je\n" +" \tzadaný žiadny NÁZOV, všetky špecifikácie dopĺňania\n" +" -D\tpoužiť dopĺňanie a operácie ako predvolené pre príkazy\n" +" \tbez definovaného konkrétneho dopĺňania\n" +" -E\tpoužiť dopĺňanie a operácie pre príkazy „empty“ --\n" +" \tpokus o dopĺňanie na prázdnom príkazovom riadku\n" +" \n" +" Pri pokuse o doplnenie sa operácie použijú v poradí hore uvedených\n" +" volieb veľkými písmenami.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Zobraziť možné dokončenie v závislosti na voľbách.\n" +" \n" +" Slúži na použitie z shell funkcií tvoriacich možné dokončenia\n" +" Ak je daný voliteľný parameter SLOVO, tvoria sa zhody so SLOVOm.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Zmeniť alebo zobraziť voľby dopĺňania.\n" +" \n" +" Zmení voľby dopĺňania pre každý NÁZOV alebo ak nie je zadaný žiadny\n" +" NÁZOV pre momentálne vykonávané dopĺňanie. Ak nie sú zadané žiadne\n" +" voľby, vypíše špecifikácie dopĺňania pre každý NÁZOV alebo pre\n" +" momentálne vykonávané dopĺňanie.\n" +" \n" +" Voľby:\n" +" \t-o voľba\tNastaví voľbu dopĺňania VOĽBA pre každý NÁZOV\n" +" \t-D\t\tZmení voľby dopĺňania príkazov „default“\n" +" \t-E\t\tZmení voľby dopĺňania príkazov „empty“\n" +" \n" +" Použitím „+o“ namiesto „-o“ vypnete určenú voľbu.\n" +" \n" +" Argumenty:\n" +" \n" +" Každý NÁZOV odkazuje na príkaz, pre ktorý musela byť vopred definovaná\n" +" špecifikácia dopĺňania pomocou vstavaného príkazu „complete“. Ak nie sú\n" +" zadané žiadne NÁZVY, compopt musí byť volaný priamo funkciou, ktorá\n" +" práve tvorí dopĺňanie a voľby generátora momentálne vykonávaného\n" +" dopĺňania sa zmenia.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a NÁZOV nemá definovanú\n" +" špecifikáciu dopĺňania." + +#: builtins.c:2047 +#, fuzzy +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Načítať riadky zo štandardného vstupu do premennej indexovaného poľa.\n" +" \n" +" Načíta riadky zo štandardného vstupu do premennej poľa POLE alebo z\n" +" popisovača súboru FD ak je zadaná voľba -u. Štandardné POLE je premenná\n" +" MAPFILE.\n" +" \n" +" Voľby:\n" +" -n počet\tSkopírovať najviac POČET riadkov. Ak je POČET 0, všetky " +"riadky.\n" +" -O začiatok\tZačať priraďovanie položiek POĽA na indexe ZAČIATOK.\n" +" \t\tPredvolený index je 0.\n" +" -s počet\tIgnorovať prvých prečítaných POČET riadkov.\n" +" -t\t\tOdstrániť znak nového riadka z konca každého načítaného riadka.\n" +" -u fd\t\tNačítať riadky z popisovača FD namiesto štandardného vstupu.\n" +" -C callback\tVyhodnotiť CALLBACK po prečítaní každých QUANTUM " +"riadkov.\n" +" -c quantum\tUrčuje počet riadkov, ktoré sa majú prečítať pred každým\n" +" \t\tvolaním CALLBACK.\n" +" \n" +" Argumenty:\n" +" ARRAY\t\tNázov premennej poľa, kam sa majú uložiť údaje.\n" +" \n" +" Ak uvediete -C bez -c, predvolená hodnota quantum je 5000.\n" +" Pri vyhodnotení CALLBACK sa dodá index ďalšieho prvku poľa,\n" +" ktorý sa má priradiť ako ďalší argument.\n" +" \n" +" Ak nie je zadaný ZAČIATOK explicitne, mapfile POLE vyčistí predtým,\n" +" než ho začne plniť.\n" +" \n" +" Návratová hodnota:\n" +" Vráti 0 ak nebola zadaná neplatná voľba a POLE nie je len na čítanie a\n" +" nie je to indexované pole." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Načítať riadky zo súboru do premennej poľa.\n" +" \n" +" Synonymum k „mapfile“." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2011 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Vracia kontext aktuálneho volania podprocedúry.\n" +#~ " \n" +#~ " Bez EXPR, vracia " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: proces %5ld (%s) v the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Neznáme číslo signálu" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licencia GPLv2+: GNU GPL verzie 2 alebo novšia http://gnu.org/licenses/" +#~ "gpl.html\n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "pravda" + +#~ msgid "false" +#~ msgstr "nepravda" + +#~ msgid "times" +#~ msgstr "-krát" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". S VÝR vracia\n" +#~ " " + +#~ msgid "" +#~ "; this extra information can be used to\n" +#~ " provide a stack trace.\n" +#~ " \n" +#~ " The value of EXPR indicates how many call frames to go back before " +#~ "the\n" +#~ " current one; the top frame is frame 0." +#~ msgstr "" +#~ "; tieto informácie naviac možno použiť na\n" +#~ " trasovania zásobníka.\n" +#~ " \n" +#~ " Hodnota VÝR značí o koľko rámcov sa vrátiť pred súčasný\n" +#~ " Vrchný rámec je rámec 0." + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: nie je možné realokovať %lu bajtov (%lu bajtov alokovaných)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: nie je možné alokovať %lu bajtov" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: %s:%d: nie je možné realokovať %lu bajtov (%lu bajtov " +#~ "alokovaných)" + +#~ msgid " " +#~ msgstr " " + +#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," +#~ msgstr "Bez VÝR, vráti „$line $filename“. S VÝR," + +#~ msgid "returns \"$line $subroutine $filename\"; this extra information" +#~ msgstr "vráti „$line $subroutine $filename“; túto informáciu" + +#~ msgid "can be used used to provide a stack trace." +#~ msgstr "je možné využiť pre trasovanie zásobníka." + +#~ msgid "" +#~ "The value of EXPR indicates how many call frames to go back before the" +#~ msgstr "Hodnota VÝR určuje o koľko rámcov volania sa vrátiť" + +#~ msgid "current one; the top frame is frame 0." +#~ msgstr "pred aktuálny; najvyšší rámec má číslo 0." + +#~ msgid "%s: invalid number" +#~ msgstr "%s: neplatné číslo" + +#~ msgid "Shell commands matching keywords `" +#~ msgstr "Príkazy shellu zodpovedajúce kľúčovým slovám „" + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "Zobraziť zoznam momentálne zapamätaných adresárov. Adresáre" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "sa do zoznamu dostanú príkazom „pushd“; späť hore v zozname" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "sa môžete dostať príkazom „popd“." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "Voľba -l hovorí, že „dirs“ by nemal vypísovať skrátené verzie" + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "" +#~ "adresárov, ktoré sa vzťahujú k vášmu domovskému adresáru. To znamená," + +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "že „~/bin“ sa može zobraziť ako „/homes/bfox/bin“. Voľba -v" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "" +#~ "hovorí, aby „dirs“ vypísal zásobník adresárov s jednou položkou na riadok," + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "a pred názov adresára vypísal jeho polohu v zásobníku. Voľba -p" + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "robí presne to isté, len sa nepridáva poloha v zásobníku." + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "Voľba -c čistí zásobník adresárov odstránením všetkých prvkov." + +#~ msgid "" +#~ "+N displays the Nth entry counting from the left of the list shown by" +#~ msgstr "+N zobrazí N-tú položku zľava zoznamu zobrazenú pomocou" + +#~ msgid " dirs when invoked without options, starting with zero." +#~ msgstr " dirs vyvolaného bez volieb, počínajúc nulou." + +#~ msgid "" +#~ "-N displays the Nth entry counting from the right of the list shown by" +#~ msgstr "+N zobrazí N-tú položku sprava zoznamu zobrazenú pomocou" + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "Pridá adresár na vrch zásobníka adresárov alebo otočí" + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "zásobník, čím aktuálny pracovný adresár bude na vrchu" + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "zásobníka. Bez argumentov vymení vrchné dva adresáre." + +#~ msgid "+N Rotates the stack so that the Nth directory (counting" +#~ msgstr "+N Otočí zásobník tak, že N-tý adresár (počítajúc" + +#~ msgid " from the left of the list shown by `dirs', starting with" +#~ msgstr " zľava zoznamu, ktorý vráti „dirs“, počínajúc nulou)" + +#~ msgid " zero) is at the top." +#~ msgstr " je na vrchu." + +#~ msgid "-N Rotates the stack so that the Nth directory (counting" +#~ msgstr "-N Otočí zásobník tak, že N-tý adresár (počítajúc" + +#~ msgid " from the right of the list shown by `dirs', starting with" +#~ msgstr " sprava zoznamu, ktorý vráti „dirs“, počínajúc nulou)" + +#~ msgid "-n suppress the normal change of directory when adding directories" +#~ msgstr "-n potlačiť normálnu zmenu adresára pri pridávaní adresárov" + +#~ msgid " to the stack, so only the stack is manipulated." +#~ msgstr " na zásobník, takže sa zmení iba zásobník." + +#~ msgid "dir adds DIR to the directory stack at the top, making it the" +#~ msgstr "dir pridá DIR na vrch zásobníka adreárov, čím ho učiní" + +#~ msgid " new current working directory." +#~ msgstr " novým aktuálnym adresárom." + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "Zásobník adresárov môžete zobraziť príkazom „dirs“." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Odstráni položky zo zásobníka adresárov. Bez argumentov" + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "odstráni vrchný adresár zo zásobníka a zmení aktuálny adresár" + +#~ msgid "+N removes the Nth entry counting from the left of the list" +#~ msgstr "+N Odstráni N-túä položku (počítajúc zľava zoznamu," + +#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr " ktorý vráti „dirs“, počínajúc nulou). Napríklad: „popd +0“" + +#~ msgid " removes the first directory, `popd +1' the second." +#~ msgstr " odstráni prvý adresár, „popd +1“ druhý." + +#~ msgid "-N removes the Nth entry counting from the right of the list" +#~ msgstr "-N Odstráni N-túä položku (počítajúc sprava zoznamu," + +#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr " ktorý vráti „dirs“, počínajúc nulou). Napríklad: „popd -0“" + +#~ msgid " removes the last directory, `popd -1' the next to last." +#~ msgstr " odstráni posledný adresár, „popd -1“ predposledný." + +#~ msgid "" +#~ "-n suppress the normal change of directory when removing directories" +#~ msgstr "-n potlačiť normálnu zmenu adresára pri odoberaní adresárov" + +#~ msgid " from the stack, so only the stack is manipulated." +#~ msgstr " zo zásobníka, takže sa zmení iba zásobník." + +#~ msgid "allocated" +#~ msgstr "alokované" + +#~ msgid "freed" +#~ msgstr "uvoľnené" + +#~ msgid "requesting resize" +#~ msgstr "žiadam o zmenu veľkosti" + +#~ msgid "just resized" +#~ msgstr "veľkosť bola práve zmenená" + +#~ msgid "bug: unknown operation" +#~ msgstr "chyba: neznáma operácia" + +#~ msgid "malloc: watch alert: %p %s " +#~ msgstr "malloc: upozornenie sledovania: %p %s " + +#~ msgid "" +#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n" +#~ " break N levels." +#~ msgstr "" +#~ "Vyskočí zvnútra cyklu FOR, WHILE alebo UNTIL. Ak je uvedené N,\n" +#~ " vyskočí o N úrovní." + +#~ msgid "" +#~ "Run a shell builtin. This is useful when you wish to rename a\n" +#~ " shell builtin to be a function, but need the functionality of the\n" +#~ " builtin within the function itself." +#~ msgstr "" +#~ "Spustí vstavaný príkaz (builtin) shellu. Toto je užitočné, keď\n" +#~ " chcete premenovať vstavaný príkaz shellu na funkciu, ale\n" +#~ " potrebujete funkcionalitu samotného vstavaného príkazu\n" +#~ " vnútri funkcie." + +#~ msgid "" +#~ "Print the current working directory. With the -P option, pwd prints\n" +#~ " the physical directory, without any symbolic links; the -L option\n" +#~ " makes pwd follow symbolic links." +#~ msgstr "" +#~ "Vypíše aktuálny pracovný adresár. S voľbou -P pwd vypíše\n" +#~ " fyzický adresár bez symbolických odkazov; s voľbou -L\n" +#~ " bude pwd nasledovať symbolické odkazy." + +#~ msgid "Return a successful result." +#~ msgstr "Vráti úspešný výsledok." + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n" +#~ " function called `ls', and you wish to call the command `ls', you can\n" +#~ " say \"command ls\". If the -p option is given, a default value is " +#~ "used\n" +#~ " for PATH that is guaranteed to find all of the standard utilities. " +#~ "If\n" +#~ " the -V or -v option is given, a string is printed describing " +#~ "COMMAND.\n" +#~ " The -V option produces a more verbose description." +#~ msgstr "" +#~ "Spustí PRÍKAZ s ARG ignorujúc funkcie shellu. Ak máte funkciu shellu\n" +#~ " zvanú „ls“ a chcete zavolať príkaz „ls“, môžete napísať\n" +#~ " „command ls“. Ak je zadaná voľba -p, použije sa štandardná hodnota\n" +#~ " PATH, ktorá zaručene nájde všetky štandardné nástroje. Ak je zadaná\n" +#~ " voľba -V alebo -v, vypíše sa popis PRÍKAZU.\n" +#~ " Voľba -V poskytuje podrobnejší výstup." + +#~ msgid "" +#~ "Declare variables and/or give them attributes. If no NAMEs are\n" +#~ " given, then display the values of variables instead. The -p option\n" +#~ " will display the attributes and values of each NAME.\n" +#~ " \n" +#~ " The flags are:\n" +#~ " \n" +#~ " -a\tto make NAMEs arrays (if supported)\n" +#~ " -f\tto select from among function names only\n" +#~ " -F\tto display function names (and line number and source file name " +#~ "if\n" +#~ " \tdebugging) without definitions\n" +#~ " -i\tto make NAMEs have the `integer' attribute\n" +#~ " -r\tto make NAMEs readonly\n" +#~ " -t\tto make NAMEs have the `trace' attribute\n" +#~ " -x\tto make NAMEs export\n" +#~ " \n" +#~ " Variables with the integer attribute have arithmetic evaluation (see\n" +#~ " `let') done when the variable is assigned to.\n" +#~ " \n" +#~ " When displaying values of variables, -f displays a function's name\n" +#~ " and definition. The -F option restricts the display to function\n" +#~ " name only.\n" +#~ " \n" +#~ " Using `+' instead of `-' turns off the given attribute instead. " +#~ "When\n" +#~ " used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "" +#~ "Deklaruje premenné a/alebo im dodá argumenty. Ak nie sú zadané\n" +#~ " NÁZVY, zobraziť hodnoty premenných. Voľba -p zobrazí atribúty\n" +#~ " a hotnoty každého NÁZVU.\n" +#~ " \n" +#~ " Príznaky sú:\n" +#~ " \n" +#~ " -a\tna vytvorenie polí NÁZVOV (ak sú podporované)\n" +#~ " -f\tna výber iba spomedzi názvov funkcií\n" +#~ " -F\tna zobrazenie názvov funkcií (a čísla riadku a zdrojového " +#~ "súboru\n" +#~ " \tpre ladenie) bez definícií\n" +#~ " -i\taby mali NÁZVY atribút „integer“\n" +#~ " -r\taby boli NÁZVY len na čítanie\n" +#~ " -t\taby mali NÁZVY atribút „trace“\n" +#~ " -x\taby sa NÁZVY exportovali\n" +#~ " \n" +#~ " Premenné s atribútom integer vykonávajú aritmetické vyhodnocovanie " +#~ "(pozri\n" +#~ " „let“) po priradení výrazu premennej.\n" +#~ " \n" +#~ " Pri zobrazovaní hodnôt premenných, -f zobrazí názov a definíciu\n" +#~ " funkcie. Voľba -F obmedzí zobrazovanie iba na názov funkcie.\n" +#~ " \n" +#~ " Pomocou „+“ namiesto „-“ sa vypína daný atribút. Keď sa použije vo\n" +#~ " funkcii, spôsobí lokálnosť NÁZVOV ako pri príkaze „local“ command." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Zastaralé. Pozri „declare“." + +#~ msgid "" +#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n" +#~ " can only be used within a function; it makes the variable NAME\n" +#~ " have a visible scope restricted to that function and its children." +#~ msgstr "" +#~ "Vytvorí lokálnu premennú s NÁZVOM a priradí jej HODNOTU. LOCAL\n" +#~ " je možné použiť iba v rámci funkcie; spôsobí obmedzenie viditeľnosti\n" +#~ " premennej NÁZOV iba na túto funkciu a jej potomkov." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "Vypíše ARGumenty. S voľbou -n bude posledný znak nového riadka potlačený." + +#~ msgid "" +#~ "Enable and disable builtin shell commands. This allows\n" +#~ " you to use a disk command which has the same name as a shell\n" +#~ " builtin without specifying a full pathname. If -n is used, the\n" +#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n" +#~ " to use the `test' found in $PATH instead of the shell builtin\n" +#~ " version, type `enable -n test'. On systems supporting dynamic\n" +#~ " loading, the -f option may be used to load new builtins from the\n" +#~ " shared object FILENAME. The -d option will delete a builtin\n" +#~ " previously loaded with -f. If no non-option names are given, or\n" +#~ " the -p option is supplied, a list of builtins is printed. The\n" +#~ " -a option means to print every builtin with an indication of whether\n" +#~ " or not it is enabled. The -s option restricts the output to the " +#~ "POSIX.2\n" +#~ " `special' builtins. The -n option displays a list of all disabled " +#~ "builtins." +#~ msgstr "" +#~ "Zapína a vypína vstavené (builtin) príkazy shellu. Toto vám umožní\n" +#~ " použiť príkaz s rovnakým názvom ako má vstavaný príkaz shellu\n" +#~ " bez toho, aby ste uvádzali plnú cestu. S voľbou -n budú NÁZVY\n" +#~ " vypnuté; inak budú NÁZVY zapnuté. Napríklad ak chcete použiť\n" +#~ " „test“, ktorý sa nachádza v $PATH namiesto vstavaného príkazu,\n" +#~ " napíšte „enable -n test“. Na systémoch, ktoré podporujú dynamické\n" +#~ " nahrávanie je možné použiť voľbu -f na načítanie nových vstavaných\n" +#~ " príkazov zo zdieľaného objektu NÁZOVSÚBORU. Voľba -d zmaže\n" +#~ " vstavaný príkaz, ktorý bol predtým načítaný pomocou -f. Ak nie sú\n" +#~ " zadané žiadne názvy okrem volieb alebo je zadaná voľba -p , vypíše\n" +#~ " sa zoznam vstavaných príkazov. Voľba -a znamená, že sa má vypísať\n" +#~ " každý vstavaný príkaz a či je zapnutý alebo vypnutý. Voľba -s " +#~ "obmedzí\n" +#~ " výstup na POSIX.2 „special“ vstavané príkazy. Voľba -n zobrazí " +#~ "zoznam\n" +#~ " všetkých vypnutých vstavaných príkazov." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "Prečíta ARGumenty ako vstup do shellu a vykoná výsledné príkazy." + +#~ msgid "" +#~ "Exec FILE, replacing this shell with the specified program.\n" +#~ " If FILE is not specified, the redirections take effect in this\n" +#~ " shell. If the first argument is `-l', then place a dash in the\n" +#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n" +#~ " is supplied, FILE is executed with a null environment. The `-a'\n" +#~ " option means to make set argv[0] of the executed process to NAME.\n" +#~ " If the file cannot be executed and the shell is not interactive,\n" +#~ " then the shell exits, unless the shell option `execfail' is set." +#~ msgstr "" +#~ "Vykoná SÚBOR, pričom nahradí tento shell uvedeným programom.\n" +#~ " Ak SÚBOR nie je zadaný, presmerovania sa uskutočnia v tomto\n" +#~ " shelli. Ak je prvý argument „-l“, potom dá znak spojovník do\n" +#~ " nultého arg, ktorý sa dáva SÚBORU, tak ako to robí login. Ak sa\n" +#~ " zadá voľba „-c“, SÚBOR sa vykoná s null prostredím. Voľba „-a“\n" +#~ " znamená nastaviľ argv[0] vykonávaného procesu na NÁZOV.\n" +#~ " Ak súbor nie je možné vykonať a shell nie je interaktívny, potom,\n" +#~ " shell skončí, ak nie je nastavená voľba „execfail“." + +#~ msgid "Logout of a login shell." +#~ msgstr "Odhlásiť sa z login shelu." + +#~ msgid "" +#~ "For each NAME, the full pathname of the command is determined and\n" +#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n" +#~ " full pathname of NAME, and no path search is performed. The -r\n" +#~ " option causes the shell to forget all remembered locations. The -d\n" +#~ " option causes the shell to forget the remembered location of each " +#~ "NAME.\n" +#~ " If the -t option is supplied the full pathname to which each NAME\n" +#~ " corresponds is printed. If multiple NAME arguments are supplied " +#~ "with\n" +#~ " -t, the NAME is printed before the hashed full pathname. The -l " +#~ "option\n" +#~ " causes output to be displayed in a format that may be reused as " +#~ "input.\n" +#~ " If no arguments are given, information about remembered commands is " +#~ "displayed." +#~ msgstr "" +#~ "Pre každý NÁZOV sa určí a zapamätá plná cesta k príkazu. Ak je daná voľba " +#~ "-p\n" +#~ " CESTA sa použije ako plná cesta k NÁZOV a nevykoná sa hľadanie " +#~ "cesty.\n" +#~ " Voľba -r spôsobí, že shell zabudne všetky zapamätané miesta.\n" +#~ " Voľba -d spôsobí, že shell zabudne zapamätané miesto každého NÁZVU.\n" +#~ " Ak je zadaná voľba -t, vypíše sa plná cesta zodpovedajúca každému\n" +#~ " NÁZVU. Ak sú s voľbou -t uvedené viaceré argumenty NÁZOV, pred\n" +#~ " plnou cestou sa vypíše NÁZOV. Voľba -l vypíše výstup vo forme, ktorú\n" +#~ " je možné znova použiť ako vstup. Ak nie sú zadané žiadne argumenty,\n" +#~ " zobrazia sa informácie o zapamätaných príkazoch." + +#~ msgid "" +#~ "Display helpful information about builtin commands. If PATTERN is\n" +#~ " specified, gives detailed help on all commands matching PATTERN,\n" +#~ " otherwise a list of the builtins is printed. The -s option\n" +#~ " restricts the output for each builtin command matching PATTERN to\n" +#~ " a short usage synopsis." +#~ msgstr "" +#~ "Zobrazí užitočné informácie o vstavaných (builtin) príkazoch. Ak je\n" +#~ " uvedený VZOR, poskytne podrobné informácie o všetkých príkazoch\n" +#~ " zodpovedajúcich VZORU. Inak sa vypíše zoznam vstavaných príkazov.\n" +#~ " Voľba -s obmedzí výstup pre každý príkaz zodpovedajúci VZORU na\n" +#~ " krátke zhrnutie použitia." + +#~ msgid "" +#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n" +#~ " If the -h option is given, the job is not removed from the table, but " +#~ "is\n" +#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n" +#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove " +#~ "all\n" +#~ " jobs from the job table; the -r option means to remove only running " +#~ "jobs." +#~ msgstr "" +#~ "Štandardne odstráni argument JOBSPEC z tabuľky aktívnych úloh.\n" +#~ " Ak je uvedená voľba „-h“, úloha sa neodstráni z tabuľky, ale označí " +#~ "sa\n" +#~ " tak, že SIGHUP sa nepošle úlohe, ak shell dostane SIGHUP. Voľba „-a“\n" +#~ " bez uvedenej JOBSPEC znamená odstránenie všetkých úloh z tabuľky\n" +#~ " úloh; voľba „-r“ znamená odstrániť iba bežiace úlohy." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N\n" +#~ " is omitted, the return status is that of the last command." +#~ msgstr "" +#~ "Spôsobí, že sa funkcia ukončí s návratovou hodnotou N. Ak N\n" +#~ " vynecháte, vráti sa návratová hodnota posledného vykonaného\n" +#~ " príkazu." + +#~ msgid "" +#~ "For each NAME, remove the corresponding variable or function. Given\n" +#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n" +#~ " unset will only act on functions. With neither flag, unset first\n" +#~ " tries to unset a variable, and if that fails, then tries to unset a\n" +#~ " function. Some variables cannot be unset; also see readonly." +#~ msgstr "" +#~ "Pre každý NÁZOV odstráni zodpovedajúcu premennú alebo funkciu.\n" +#~ " Ak je zadaný prepínač „-v“, unset bude účinkovať iba na premenné.\n" +#~ " Ak je zadaný prepínač „-t“, unset bude účinkovať iba na funkcie.\n" +#~ " Bez prepínačov sa unset pokúsi najprv zrušiť nastavenie premennej\n" +#~ " a ak to zlyhá, pokúsi sa zrušiť nastavenie funkcie.\n" +#~ " Niektoré premenné nemožno zrušiť; pozri aj readonly." + +#~ msgid "" +#~ "NAMEs are marked for automatic export to the environment of\n" +#~ " subsequently executed commands. If the -f option is given,\n" +#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n" +#~ " is given, a list of all names that are exported in this shell is\n" +#~ " printed. An argument of `-n' says to remove the export property\n" +#~ " from subsequent NAMEs. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "NÁZVY sa označia na automatický export do prostredia následne\n" +#~ " vykonaných príkazov. Ak je zadaná voľba -f, NÁZVY odkazujú na\n" +#~ " funkcie. Ak nezadáte žiadne NÁZVY alebo zadáte voľbu „-p“,\n" +#~ " vypíše sa zoznam všetkých názvov, ktoré sú exportované v tomto\n" +#~ " shelli. Argument „-n“ hovorí, že sa má odstrániť vlastnosť export z\n" +#~ " nasledujúcich NÁZVOV. Argument „--“ vypína spracovanie ďalších\n" +#~ " volieb." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n" +#~ " not be changed by subsequent assignment. If the -f option is given,\n" +#~ " then functions corresponding to the NAMEs are so marked. If no\n" +#~ " arguments are given, or if `-p' is given, a list of all readonly " +#~ "names\n" +#~ " is printed. The `-a' option means to treat each NAME as\n" +#~ " an array variable. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "Zadané NÁZVY sa označia iba na čítanie a hodnoty týchto NÁZVOV nebude\n" +#~ " možné zmeniť ďalším priradením. Ak je zadaná voľba -f, označia sa " +#~ "takto\n" +#~ " funkcie zodpovedajúce NÁZVU. Ak nie sú zadané žiadne argumenty alebo\n" +#~ " je zadané „-p“, vypíše sa zoznam všetkých názvov len na čítanie. " +#~ "Voľba „-a“\n" +#~ " znamená, že sa každá premenná NÁZOV bude považovať za pole. Argument\n" +#~ " „--“ vypína spracovanie ďalších volieb." + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n" +#~ " not given, it is assumed to be 1." +#~ msgstr "" +#~ "Pozičné parametre od $N+1 ... sa premenujú na $1 ... Ak\n" +#~ " neuvediete N, predpokladá sa 1." + +#~ msgid "" +#~ "Suspend the execution of this shell until it receives a SIGCONT\n" +#~ " signal. The `-f' if specified says not to complain about this\n" +#~ " being a login shell if it is; just suspend anyway." +#~ msgstr "" +#~ "Odstaviť vykonávanie tohto shellu, kým nedostane signál\n" +#~ " SIGCONT. Zadanie voľby „-f“ hovorí, že sa shell nemá sťažovať,\n" +#~ " ak je prihlasovací a napriek tomu sa má odhlásiť." + +#~ msgid "" +#~ "Print the accumulated user and system times for processes run from\n" +#~ " the shell." +#~ msgstr "" +#~ "Vypísať kumulatívne používateľské a systémové časy procesov\n" +#~ " spustených zo shellu." + +#~ msgid "" +#~ "For each NAME, indicate how it would be interpreted if used as a\n" +#~ " command name.\n" +#~ " \n" +#~ " If the -t option is used, `type' outputs a single word which is one " +#~ "of\n" +#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is " +#~ "an\n" +#~ " alias, shell reserved word, shell function, shell builtin, disk " +#~ "file,\n" +#~ " or unfound, respectively.\n" +#~ " \n" +#~ " If the -p flag is used, `type' either returns the name of the disk\n" +#~ " file that would be executed, or nothing if `type -t NAME' would not\n" +#~ " return `file'.\n" +#~ " \n" +#~ " If the -a flag is used, `type' displays all of the places that " +#~ "contain\n" +#~ " an executable named `file'. This includes aliases, builtins, and\n" +#~ " functions, if and only if the -p flag is not also used.\n" +#~ " \n" +#~ " The -f flag suppresses shell function lookup.\n" +#~ " \n" +#~ " The -P flag forces a PATH search for each NAME, even if it is an " +#~ "alias,\n" +#~ " builtin, or function, and returns the name of the disk file that " +#~ "would\n" +#~ " be executed." +#~ msgstr "" +#~ "Pre každý NÁZOV určí ako by sa interpretoval, keby sa použil ako\n" +#~ " názov príkazu.\n" +#~ " \n" +#~ " Ak je použitá voľba -t, „type“ vypíše jediné slovo, ktoré je jedno z\n" +#~ " „alias“, „keyword“, „function“, „builtin“, „file“ alebo „“, ak NÁZOV\n" +#~ " je alias, vyhradené slovo shellu, funkcia shellu, vstavaný príkaz " +#~ "shellu,\n" +#~ " súbor na disku resp. nezistený typ.\n" +#~ " \n" +#~ " Ak je použitá voľba -p, „type“ vypíše buď názov súboru na disku,\n" +#~ " ktorý by sa vykonal alebo nič ak by „type -t NÁZOV“ nevrátilo\n" +#~ " „file“.\n" +#~ " \n" +#~ " Ak je použitá voľba -a, „type“ vypíše všetky miesta, ktoré obsahujú\n" +#~ " spustiteľný súbor s názvom Ak je použitá voľba -t, „file“. Sem " +#~ "patria\n" +#~ " aliasy, vstavané premenné a funkcie ak a iba ak nie je zároveň " +#~ "zadaný\n" +#~ " prepínač -p.\n" +#~ " \n" +#~ " Voľba -f potlačí vyhľadávanie funkcií shellu.\n" +#~ " \n" +#~ " Voľba -P vynúti vyhľadanie každého NÁZVU v ceste (premenná PATH),\n" +#~ " aj ak je to alias, vstavaný príkaz shellu alebo funkcia a vráti " +#~ "názov\n" +#~ " súboru na disku, ktorý by sa vykonal." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n" +#~ " `-S' is supplied, the current value of the mask is printed. The `-" +#~ "S'\n" +#~ " option makes the output symbolic; otherwise an octal number is " +#~ "output.\n" +#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n" +#~ " that may be used as input. If MODE begins with a digit, it is\n" +#~ " interpreted as an octal number, otherwise it is a symbolic mode " +#~ "string\n" +#~ " like that accepted by chmod(1)." +#~ msgstr "" +#~ "Používateľská maska pre tvorbu súborov sa nastaví na REŽIM. Ak\n" +#~ " vynecháte REŽIM alebo zadáte „-S“, vypíše sa aktuálna hodnota masky.\n" +#~ " Voľba „-S“ vypisuje symbolický výstup; inak sa vypisuje číslo v " +#~ "osmičkovej\n" +#~ " sústave. Ak je zadaná voľba „-p“ a REŽIM sa vynechá, výstup je v " +#~ "tvare,\n" +#~ " ktorý je možné použiť ako vstup. Ak REŽIM začína číslicou, " +#~ "interpretuje sa\n" +#~ " ako číslo v osmičkovej sústave, inak je to symbolický reťazec " +#~ "režimu,\n" +#~ " v tvare, aký prijíma chmod(1)." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If\n" +#~ " N is not given, all currently active child processes are waited for,\n" +#~ " and the return code is zero. N is a process ID; if it is not given,\n" +#~ " all child processes of the shell are waited for." +#~ msgstr "" +#~ "Čakať na ukončenie zadaného procesu a vypísať jeho návratovú\n" +#~ " hodnotu. Ak nie je N zadané, čaká sa na všetky momentálne\n" +#~ " aktívne procesy potomkov a návratová hodnota je nula. N je\n" +#~ " ID procesu; ak nie je zadaný, čaká sa na ukončenie všetkých\n" +#~ " procesov potomkov shellu." + +#~ msgid "" +#~ "Create a simple command invoked by NAME which runs COMMANDS.\n" +#~ " Arguments on the command line along with NAME are passed to the\n" +#~ " function as $0 .. $n." +#~ msgstr "" +#~ "Vytvoriť jednoduchý príkaz, ktorý sa vyvolá pomocou NÁZVU a spustí\n" +#~ " PRÍKAZY. Argumenty príkazového riadka sa spolu s NÁZVOM dodajú\n" +#~ " funkcii v premenných $0 až $n." + +#~ msgid "" +#~ "Toggle the values of variables controlling optional behavior.\n" +#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n" +#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n" +#~ " status indicates whether each OPTNAME is set or unset. The -o\n" +#~ " option restricts the OPTNAMEs to those defined for use with\n" +#~ " `set -o'. With no options, or with the -p option, a list of all\n" +#~ " settable options is displayed, with an indication of whether or\n" +#~ " not each is set." +#~ msgstr "" +#~ "Obráti hodnoty premenných riadiacich voliteľné správanie.\n" +#~ " Voľba -s znamená zapnúť (nastaviť) naždého NÁZVU_VOĽBY;\n" +#~ " voľba -u ruší nastavenie každého NÁZVU_VOĽBY. Voľba -q\n" +#~ " potlačí výpis; stav ukončenia indikuje, či je každý NÁZOV_VOĽBY\n" +#~ " nastavený alebo nenastavený. Voľba -o obmedzuje NÁZOV_VOĽBY\n" +#~ " na tie, ktoré sú definované pre použitie so „set -o“. Bez volieb\n" +#~ " alebo s voľbou -p sa vypíše zoznam nastaviteľných volieb\n" +#~ " s označením, či je každá nastavená alebo nenastavená." + +#~ msgid "" +#~ "For each NAME, specify how arguments are to be completed.\n" +#~ " If the -p option is supplied, or if no options are supplied, " +#~ "existing\n" +#~ " completion specifications are printed in a way that allows them to " +#~ "be\n" +#~ " reused as input. The -r option removes a completion specification " +#~ "for\n" +#~ " each NAME, or, if no NAMEs are supplied, all completion " +#~ "specifications." +#~ msgstr "" +#~ "Pre každý NÁZOV určí, koľko argumentov sa má doplniť.\n" +#~ " Ak je daná voľba -p alebo žiadne voľby, vypíšu sa existujúce " +#~ "špecifikácie doplnení v takom formáte, že je ich možné použiť na\n" +#~ " vstupe. Voľba -r odstráni špecifikáciu doplnenia pre každý NÁZOV,\n" +#~ " alebo, ak nebol uvedený žiadny NÁZOV, pre všetky špecifikácie." diff --git a/bash-5.1/po/sl.gmo b/bash-5.1/po/sl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..db02245a7115b718b8160e82b45c4900d3a15926 Binary files /dev/null and b/bash-5.1/po/sl.gmo differ diff --git a/bash-5.1/po/sl.po b/bash-5.1/po/sl.po new file mode 100644 index 0000000000000000000000000000000000000000..d1ad41359b70d4e2f20cecb3369f49676f35346b --- /dev/null +++ b/bash-5.1/po/sl.po @@ -0,0 +1,5876 @@ +# Slovenian translation of bash. +# Copyright (C) 2012 - 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Damir Jerovšek , 2012 - 2013. +# Klemen Košir , 2012 - 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2013-03-09 20:21+0100\n" +"Last-Translator: Klemen Košir \n" +"Language-Team: Slovenian \n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" +"%100==4 ? 3 : 0);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "slab podpis polja" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: ni mogoče pretvoriti zabeleženega polja v povezano polje" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: neveljaven ključ povezanega polja" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: ni mogoče dodeliti v ne-številčno kazalo" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: treba je uporabiti podpis pri dodeljevanju povezanega polja" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: ni mogoče ustvariti: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: ni mogoče najti tipkovne razvrstitve za ukaz" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: prvi znak brez presledka ni `\"'" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "brez zaključka `%c' v %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: manjka ločilnik dvopičja" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': ni mogoče odvezati" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': neveljaven vzdevek" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "urejanje vrstic ni omogočeno" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': neveljavno ime tipkovne razvrstitve" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: ni mogoče brati: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': neznano ime funkcije" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s ni vezan na nobeno tipko.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s se lahko pokliče s pomočjo " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': ni mogoče odvezati" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "števec zanke" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "smiselno samo v `for', `while', ali `until' zanki" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Vrne vsebino trenutnega klica podprograma.\n" +" \n" +" Brez IZRAZA vrne \"$line $filename\". Z IZRAZOM vrne\n" +" \"$line $subroutine $filename\"; ta dodaten podatek se lahko uporabi\n" +" za zagotovitev sledenja sklada.\n" +" \n" +" Vrednost IZRAZA nakazuje, koliko okvirjev klicev mora nazaj\n" +" pred trenutnega; zgornji okvir je okvir 0.\n" +" \n" +" Stanje končanja:\n" +" Vrne 0, razen če lupina ne izvršuje funkcije lupine ali pa IZRAZ\n" +" ni veljaven." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME ni nastavljen" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "preveč argumentov" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "ni druge mape" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD ni nastavljen" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "vrstica %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "opozorilo: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uporaba: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: možnost zahteva argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: zahtevan je števni argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: ni mogoče najti" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: neveljavna možnost" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: neveljavno ime možnosti" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': neveljavno določilo" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "neveljavno osmiško število" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "neveljavno šestnajstiško število" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "neveljavno število" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: neveljavno določilo signala" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': ni določilo opravila ali neveljavno določilo posla" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: spremenljivka le za branje" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s izven dosega" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s izven dosega" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: ni takšnega posla" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: ni nadzora posla" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "ni nadzora posla" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: omejeno" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "omejeno" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ni vgrajena lupina" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "napaka med pisanjem: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "napaka med nastavljanjem atributov terminala: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "napaka med pridobivanjem atributov terminala: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: napaka med pridobivanjem trenutne mape: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: dvoumno določilo posla" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ni mogoče ponastaviti: samo za branje %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ni mogoče ponastaviti" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: neveljavno ime dejanja" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: ni določila dopolnjevanja" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "Opozorilo: možnost -F morda ne bo delovala po pričakovanjih" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "Opozorilo: možnost -C morda ne bo delovala po pričakovanjih" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "trenutno se ne izvaja funkcija dopolnjevanja" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "se lahko uporabi samo v funkciji" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': neveljaven vzdevek" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "ni mogoče uporabiti `-f' za ustvarjanje funkcij" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funkcija samo za branje" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: na ta način ni mogoče uničiti spremenljivk polja" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: ni mogoče pretvoriti povezanega polja v zabeleženo polje" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dinamično nalaganje ni na voljo" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "ni mogoče odpreti predmeta v souporabi %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "ni mogoče najti %s v predmetu v souporabi %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: ni dinamično naloženo" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: ni dinamično naloženo" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: ni mogoče izbrisati: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: je mapa" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ni običajna datoteka" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: datoteka je prevelika" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: ni mogoče izvesti binarne datoteke" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: ni mogoče izvesti: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "odjava\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ni prijavna lupina: uporabite `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Obstajajo ustavljeni posli.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Obstajajo posli, ki se izvajajo.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "najdenega ni nobenega ukaza" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "določilo zgodovine" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: ni mogoče odpreti začasne datoteke: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "trenutno" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "posel %d se je pričel brez nadzora" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: neveljavna možnost -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: možnost zahteva argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "razpršitev je onemogočena" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: razpršitvena razpredelnica je prazna\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "zadetki\tukaz\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Ključnih besed, ki se ujemajo z ukazi lupine `" +msgstr[1] "Ključna beseda, ki se ujema z ukazi lupine `" +msgstr[2] "Ključni besedi, ki se ujemata z ukazi lupine `" +msgstr[3] "Ključne besede, ki se ujemajo z ukazi lupine `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nobena tema pomoči se ne ujema s `%s'. Poskusite `help help' ali `man -k " +"%s' ali `info %s'." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: ni mogoče odpreti: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Ti ukazi lupine so določeni znotraj lupine. Vpišite `help' za prikaz tega " +"seznama.\n" +"Vpišite `help ime', če želite izvedeti več o `imenu' funkcije.\n" +"Uporabite `info bash', če želite izvedeti več o lupini na splošno.\n" +"Uporabite `man -k' ali `info', če želite izvedeti več o ukazih, ki niso na " +"tem seznamu.\n" +"\n" +"Zvezdica (*) poleg imena pomeni, da je ukaz onemogočen.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "ni mogoče uporabiti več kot eno od -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "položaj zgodovine" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: neveljavno ime možnosti" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: razširitev zgodovine je spodletela" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib je spodletel" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "druge možnosti niso dovoljene z `-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenti morajo biti določila opravila ali posla" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Neznana napaka" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "izraz je bil pričakovan" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: ni zabeleženo polje" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: neveljavno določilo opisnika datoteke" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: neveljaven opisnik datoteke: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: neveljavno štetje vrstic" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: neveljaven izvor polja" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: neveljaven del povratnega klica" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "prazno ime spremenljivke polja" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "potrebna podpora spremenljivke polja" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': manjka znak oblike" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': neveljavno določilo vrste časa" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': neveljaven znak oblike" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "opozorilo: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "manjka šestnajstiška števka za \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "manjka števka s podporo unicode za \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "ni druge mape" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: neveljaven argument omejitve" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "sklad mape je prazen" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "kazalo sklada mape" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Prikaže seznam trenutno pomnjenih map. Mape\n" +" so prikazane na seznamu z ukazom `pushd'; na vrh\n" +" seznama se lahko vrnete z ukazom `popd'.\n" +" \n" +" Možnosti:\n" +" -c\tizbriši sklad mape z brisanjem vseh elementov\n" +" -l\tne izpiši sorodnih map s predpono `~' v mojo domačo mapo\n" +" -p\tizpiši sklad mape z enim vnosom v vrstici\n" +" -v\tizpiši sklad mape z enim vnosom v vrstici z določenim\n" +" \tpoložajem v skladu\n" +" \n" +" Argumenti:\n" +" +N\tPrikaže Nti vnos s štetjem z leve strani seznama, prikazan s\n" +" \tpomočjo map, ko kličemo brez možnosti, začenši z nič.\n" +" \n" +" -N\tPrikaže Nti vnos s štetjem z desne strani seznama, prikazan s\n" +"\tpomočjo map, ko kličemo brez možnosti, začenši z nič." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Doda mapo na vrh sklada mape ali zavrti\n" +" sklad, kar spremeni nov vrh sklada v trenutno delovno\n" +" mapo. Če je brez argumentov, se izmenjata najvišji mapi.\n" +" \n" +" Možnosti:\n" +" -n\tPreprečuje običajno spremembo mape pri dodajanju\n" +" \tmap na sklad, tako se obdeluje le sklad.\n" +" \n" +" Argumenti:\n" +" +N\tZavrti sklad tako, da je N-ta mapa (štetje\n" +" \tz leve strani seznama, prikazano z `dirs', začenši z\n" +" \tnič) na vrhu.\n" +" \n" +" -N\tZavrti sklad tako, da je N-ta mapa (štetje\n" +" \tz desne strani seznama, prikazano z `dirs', začenši z\n" +" \tnič) na vrhu.\n" +" \n" +" dir\tDoda DIR skladu mape na vrhu, kar jo spremeni v\n" +" \tnovo trenutno delovno mapo.\n" +" \n" +" Ukaz lupine `dirs' prikaže sklad map." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Odstrani vnose iz sklada map. Če je brez argumentov, odstrani\n" +" najvišjo mapo iz sklada in spremeni v novo mapo na vrhu.\n" +" \n" +" Možnosti:\n" +" -n\tPreprečuje običajno spremembo mape pri dodajanju\n" +" \tmap iz sklada, tako se obdeluje le sklad.\n" +" \n" +" Argumenti:\n" +" +N\tOdstrani N-ti vnos s štetjem z leve strani seznama,\n" +" \tprikazano z `dirs', začenši z nič. Na primer: `popd +0'\n" +" \todstrani prvo mapo, `popd +1' odstrani drugo.\n" +" \n" +" -N\tOdstrani N-ti vnos s štetjem z desne strani seznama,\n" +" \tprikazano z `dirs', začenši z nič. Na primer: `popd +0'\n" +" \todstrani zadnjo mapo, `popd -1' odstrani predzadnjo.\n" +" \n" +" Ukaz lupine `dirs' prikaže sklad map." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: neveljavno določilo časovne omejitve" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "napaka med branjem: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "`return' lahko vrne samo iz funkcije ali skripte z izvorno kodo" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "ni mogoče ponastaviti funkcije in spremenljivke hkrati" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ni spremenljivka polja" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ni funkcija" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: ni mogoče ponastaviti" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "štetje premika" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "ni mogoče nastaviti in ponastaviti možnosti lupine hkrati" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: neveljavno ime možnosti lupine" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "zahtevan je argument imena datoteke" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: datoteke ni mogoče najti" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "ni mogoče dati v pripravljenost" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "prijavne lupine ni mogoče dati v pripravljenost" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s je drugo ime za `%s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s je ključna beseda lupine\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s je funkcija\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s je vgrajena lupina\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s je vgrajena lupina\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s je %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s je razpršeno (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: neveljaven argument omejitve" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': slab ukaz" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: ni mogoče dobiti omejitve: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "omejitev" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: ni mogoče spremeniti omejitve: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "osmiško število" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': neveljaven operator simbolnega načina" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': neveljaven znak simbolnega načina" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " vrstica " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "zadnji ukaz: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Prekinjanje ..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:462 +msgid "unknown command error" +msgstr "neznana napaka ukaza" + +#: error.c:463 +msgid "bad command type" +msgstr "slaba vrsta ukaza" + +#: error.c:464 +msgid "bad connector" +msgstr "slab povezovalnik" + +#: error.c:465 +msgid "bad jump" +msgstr "slab skok" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: nedoločena spremenljivka" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\apotekla je časovna omejitev med čakanjem na vnos: samodejna odjava\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "ni mogoče preusmeriti običajnega vnosa iz /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': neveljaven znak oblike" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "napaka cevi" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: omejeno: ni mogoče določiti `/' v imenih ukaza" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: ukaza ni mogoče najti" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: slab tolmač" + +#: execute_cmd.c:5891 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: ni mogoče izvesti binarne datoteke" + +#: execute_cmd.c:5977 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s je vgrajena lupina\n" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "ni mogoče podvajati fd %d v fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "stopnja rekurzivnosti izraza presežena" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "prekoračitev spodnje meje sklada rekurzivnosti" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "skladenjska napaka v izrazu" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "poskus dodelitve ne-spremenljivki" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "skladenjska napaka v izrazu" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "delitev z 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "hrošč: slab žeton expassign" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "`:' pričakovano za pogojni izraz" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "eksponent je manjši kot 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "po predhodnem večanju ali manjšanju je pričakovano določilo" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "manjka `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "skladenjska napaka: pričakovan operand" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "skladenjska napaka: neveljaven aritmetični operand" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (žeton napake je \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "neveljavna aritmetična zbirka" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: neveljavno štetje vrstic" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "vrednost je prevelika za zbirko" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: napaka izraza\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: ni mogoče dostopati do nadrejenih map" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "ni mogoče ponastaviti načina brez zakasnitve za fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "ni mogoče dodeliti opisnika novih map za vnos bash iz fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: medpomnilnik že obstaja za nov fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: cev pgrp" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "razvejen id opravila %d se pojavi v izvajajočem se poslu %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "brisanje ustavljenega posla %d s skupino opravila %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: id opravila %5ld (%s) je označen kot še živ" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: ni takšnega določila opravila" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Končano" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Zaustavljeno" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Zaustavljeno(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Se izvaja" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Končano(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Končaj %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Neznano stanje" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(izpis jedra) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "podrejeno opravilo setpgid (%ld v %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: opravilo z id %ld ni podrejeno opravilo te lupine" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: ni zapisov o opravilu %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: posel %d je zaustavljen" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: ni takšnega posla" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: posel je uničen" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: posel %d se že izvaja v ozadju" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: vklop WNOHANG za preprečitev nedoločenosti bloka" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: vrstica %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (izpis jedra)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd zdaj: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp je spodletel" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: vrstična disciplina" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: vrstična disciplina" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "ni mogoče nastaviti skupine opravil terminala (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "brez nadzora posla v tej lupini" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: spodletela trditev: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: trditev je bila slabo izpeljana\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "neznano" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: vsebina bloka na prostem seznamu je bila prepisana" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: poklican z že sproščenim argumentom bloka" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: klic z nedodeljenim argumentom bloka" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: zaznana prekoračitev spodnje meje; mh_nbytes je izven dosega" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: zaznana prekoračitev spodnje meje; mh_nbytes je izven dosega" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "" +"free: velikosti začetnih in končnih podatkovnih kosov \"chunk\" se " +"razlikujejo" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: klic z nedodeljenim argumentom bloka" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: zaznana prekoračitev spodnje meje; mh_nbytes je izven dosega" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: zaznana prekoračitev spodnje meje; mh_nbytes je izven dosega" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "" +"realloc: velikosti začetnih in končnih podatkovnih kosov \"chunk\" se " +"razlikujejo" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: je dodelitvena razpredelnica polna z FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: je %p že v razpredelnici kot dodeljen?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: je %p že v razpredelnici kot prost?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "neveljavna zbirka" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: gostitelj je neznan" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: neveljavna storitev" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: slabo določilo omrežne poti" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "omrežno opravilo ni podprto" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: ni mogoče spremeniti jezikovne oznake (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: ni mogoče spremeniti jezikovne oznake (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: ni mogoče spremeniti jezikovne oznake (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: ni mogoče spremeniti jezikovne oznake (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Imate pošto v $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Imate novo pošto v $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Pošta v %s je bila prebrana\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "skladenjska napaka: potreben je aritmetični izraz" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "skladenjska napaka: `;' nepričakovano" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "skladenjska napaka: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: slaba vrsta navodila %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document v vrstici %d razmejen z end-of-file (želeno `%s')" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: navodilo preusmeritve `%d' je izven dosega" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "nepričakovan konec datoteke med iskanjem ujemanja z `%c'" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "nepričakovan konec datoteke med iskanjem ujemanja z `]]'" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "skladenjska napaka v pogojnem izrazu: nepričakovan žeton `%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "skladenjska napaka v pogojnem izrazu" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "nepričakovan žeton `%s', pričakovan je bil `)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "pričakovan `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "nepričakovan argument `%s' do pogojnega enoslovnega operatorja" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "nepričakovan argument do pogojnega enoslovnega operatorja" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "nepričakovan žeton `%s', pričakovan je binarni pogojni operator" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "pričakovan je binarni pogojni operator" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "nepričakovan argument `%s' do pogojnega binarnega operatorja" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "nepričakovan argument do pogojnega binarnega operatorja" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "nepričakovan žeton `%c' v pogojnem ukazu" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "nepričakovan žeton `%s' v pogojnem ukazu" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "nepričakovan žeton %d v pogojnem ukazu" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "skladenjska napaka blizu nepričakovanega žetona `%s'" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "skladenjska napaka blizu `%s'" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "skladenjska napaka: nepričakovan konec datoteke" + +#: parse.y:6365 +msgid "syntax error" +msgstr "skladenjska napaka" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Uporabite \"%s\", če želite zapustiti lupino.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "nepričakovan konec datoteke med iskanjem ujemanja z `)'" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "končano: funkcije `%s' ni mogoče najti" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: slab povezovalnik `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: neveljaven opisnik datoteke" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: prazen kazalec datoteke NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': neveljaven znak oblike" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "opisnik datoteke je izven dosega" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: dvoumna preusmeritev" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: ni mogoče prepisati obstoječe datoteke" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: omejitev: ni mogoče preusmeriti izhoda" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "ni mogoče ustvariti začasne datoteke za here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: ni mogoče dodeliti fd spremenljivki" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port ni podprt brez omrežja" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "napaka preusmeritve: ni mogoče podvajati fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "ni mogoče najti /tmp, ustvarite ga!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp mora biti veljavno ime mape" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: neveljavna možnost" + +#: shell.c:1319 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "ni mogoče ponastaviti načina brez zakasnitve za fd %d" + +#: shell.c:1330 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "ni mogoče ponastaviti načina brez zakasnitve za fd %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: je mapa" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Ni imena!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, različica %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uporaba:\t%s [dolga možnost GNU] [možnost] ...\n" +"\t%s [dolga možnost GNU] [možnost] skriptni dokument ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Dolge možnosti GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Možnosti lupine:\n" + +#: shell.c:2043 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD ali ukaz -c ali -O shopt_option\t\t(samo sklicevanje)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ali možnost -o\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Vpišite `%s -c \"help set\"' za več podrobnosti o možnostih lupine.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Vpišite `%s -c help' za več podrobnosti o možnostih ukazov lupine.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Uporabite ukaz `bashbug' za poročanje hroščev.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: neveljavno opravilo" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Lažen signal" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Odloži" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Prekini" + +#: siglist.c:58 +msgid "Quit" +msgstr "Končaj" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Neveljaven ukaz" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ukaz ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "ukaz EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Izjema s plavajočo vejico" + +#: siglist.c:86 +msgid "Killed" +msgstr "Uničen" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Napaka vodila" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Napaka segmentacije" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Slab sistemski klic" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Prekinjena cev" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Budilka" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Zaključen" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Nujen pogoj IO" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Ustavljen (signal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Nadaljuj" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Podrejeno opravilo je uničeno ali zaustavljeno" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Ustavljen (vhod TTY)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Ustavljen (izhod TTY)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O je pripravljen" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "omejitev CPE" + +#: siglist.c:154 +msgid "File limit" +msgstr "omejitev datoteke" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Budilka (navidezna)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Budilka (profil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Okno se je spremenilo" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Zaklep zapisa" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Signal uporabnika 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Signal uporabnika 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "vnos podatkov HFT je na čakanju" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "izpad električnega toka je neizbežen" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "sesutje sistema je neizbežno" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "preseli opravilo na drug CPE" + +#: siglist.c:198 +msgid "programming error" +msgstr "napaka programiranja" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "način nadzora HFT je odobren" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "način nadzora HFT je umaknjen" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "zaporedje zvoka HFT je končano" + +#: siglist.c:214 +msgid "Information request" +msgstr "zahteva po podatkih" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Neznan signal #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "slaba zamenjava: ni zaključka `%s' v %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: ni mogoče dodeliti seznama članu polja" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "ni mogoče ustvariti cevi za zamenjavo opravila" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "ni mogoče ustvariti podrejenega opravila za zamenjavo opravila" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "ni mogoče odpreti imenovane cevi %s za branje" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "ni mogoče odpreti imenovane cevi %s za pisanje" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "ni mogoče podvajati imenovane cevi %s kot fd %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "slaba zamenjava: ni zaključka \"`\" v %s" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "ni mogoče ustvariti cevi za zamenjavo ukaza" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "ni mogoče ustvariti podrejenega opravila za zamenjavo ukaza" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: ni mogoče podvajati cevi kot fd 1" + +#: subst.c:6883 subst.c:9952 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: %s: neveljavna vrednost za opisnik sledenja datotek" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: neveljavno štetje vrstic" + +#: subst.c:7013 subst.c:7177 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "`%s': neveljaven vzdevek" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter je prazen ali pa ni določen" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter je prazen ali pa ni določen" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: izraz podniza < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: slaba zamenjava" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: ni mogoče dodeliti na tak način" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"prihodnje različice lupine bodo prisilile ocenitev kot aritmetično zamenjavo" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "slaba zamenjava: ni zaključka \"`\" v %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "ni ujemanja: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "pričakovan je argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: pričakovan je izraz celega števila" + +#: test.c:265 +msgid "`)' expected" +msgstr "pričakovan je `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "pričakovan je `)', najden je %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: pričakuje se binarni operator" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: pričakuje se enosnoven operator" + +#: test.c:881 +msgid "missing `]'" +msgstr "manjka `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "skladenjska napaka: `;' nepričakovano" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "neveljavna števka signala" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: slaba vrednost v trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: ročnik signala je SIG_DFL, ponovno pošiljanje %d (%s) sebi" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: slab signal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "napaka med uvozom določila funkcije `%s'" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "raven lupine (%d) je previsoka, ponastavljanje na 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: v trenutnem dosegu ni vsebine funkcije" + +#: variables.c:2693 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: ni mogoče dodeliti fd spremenljivki" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: v trenutnem dosegu ni vsebine funkcije" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s ima prazen exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "neveljaven znak %d v exportstr za %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "ni `=' v exportstr za %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: glava shell_variables ni vsebina funkcije" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: ni vsebine global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: glava shell_variables ni trenuten obseg okolja" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: ni mogoče odpreti kot DATOTEKO" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: neveljavna vrednost za opisnik sledenja datotek" + +#: variables.c:6437 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s izven dosega" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Avtorske pravice (C) 2009 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Dovoljenje GPLv3+: GNU GPL različica 3 ali poznejše \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, različica %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "To je prosta programska oprema; lahko jo spreminjate in razširjate.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Je BREZ KAKRŠNEKOLI GARANCIJE, v obsegu, ki ga dovoljuje zakonodaja.\n" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: ni mogoče dodeliti %lu bajtov (%lu bajtov je dodeljenih)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: ni mogoče dodeliti %lu bajtov" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: ni mogoče dodeliti %lu bajtov (%lu bajtov dodeljenih)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: ni mogoče dodeliti %lu bajtov" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [ime[=vrednost] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] ime [ime ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m tipk_razvrstitev] [-f ime_dat] [-q ime] [-u ime] [-r " +"tipk_zaporedje] [-x tipk_zaporedje:ukaz_lupine] [tipk_zaporedje:" +"funkcija_brane_vrstice ali ukaz_brane_vrstice]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [vgrajena_lupina [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [izraz]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [mapa]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "ukaz [-pVv] ukaz [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilrtux] [-p] [ime[=vrednost] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilrtux] [-p] ime[=vrednost] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [možnost] ime[=vrednost] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f ime_datoteke] [ime ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts niz_možnosti ime[arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a ime] [ukaz [argumenti ...]] [preusmeritev ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e ime_urejevalnika] [-lnr] [prvi] [zadnji] ali fc -s [vzorec=zamenjava] " +"[ukaz]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [določilo_posla]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [določilo_posla ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ime_poti] [-dt] [ime ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [vzorec ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d odmik] [n] ali history -anrw [ime_datoteke] ali history -ps " +"arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [določilo_posla ...] ali jobs -x ukaz [argumenti]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [določilo_posla ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s določilo_signala | -n št_signala | -določilo_signala] pid | " +"določilo_posla ... ali kill -l [določilo_signala]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a polje] [-d razmejilnik] [-i besedilo] [-n n-znakov] [-N n-" +"znakov] [-p poziv] [-t časovna_omejitev] [-u fd] [ime ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o ime_možnosti] [--] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [ime ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [ime[=vrednost] ...] ali export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [ime[=vrednost] ...] ali readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source ime_datoteke [argumenti]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". ime_datoteke [argumenti]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [izraz]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] določilo_signala ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] ime [ime ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [meja]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [način]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [id_opravila]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for IME [in IMENA ... ] ; do UKAZI; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( izraz1; izraz2; izraz3 )); do UKAZI; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select IME [in IMENA ... ;] do UKAZI; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] cevovod" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case IME in [VZOREC [| VZOREC]...) UKAZI ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if UKAZI; then UKAZI; [ elif UKAZI; then UKAZI; ]... [ else UKAZI; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while UKAZI; do UKAZI; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until UKAZI; do UKAZI; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [IME] ukaz [preusmeritve]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function ime { UKAZI ; } ali ime () { UKAZI ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ UKAZI ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "določilo_posla [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( izraz ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ izraz ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "spremenljivke - Imena in pomeni nekaterih spremenljivk lupine" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | mapa]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [ime_možnosti ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v spremenljivka] oblika [argumenti]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o možnost] [-A dejanje] [-G " +"krajevni_vzorec] [-W seznam_besed] [-F funkcija] [-C ukaz] [-X " +"filtrirni_vzorec] [-P predpona] [-S pripona] [ime ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o možnost] [-A dejanje] [-G krajevni_vzorec] [-W " +"seznam_besed] [-F funkcija] [-C ukaz] [-X filtrirni_vzorec] [-P predpona] [-" +"S pripona] [beseda]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o možnost] [-DE] [ime ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n števec] [-O izvor] [-s števec] [-t] [-u fd] [-C povratni_klic] [-" +"c del] [polje]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n števec] [-O izvor] [-s števec] [-t] [-u fd] [-C povratni_klic] " +"[-c del] [polje]" + +#: builtins.c:256 +#, fuzzy +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Določi ali prikaže vzdevke.\n" +" \n" +" Če je `alias' brez argumentov, izpiše seznam vzdevkov v obliki za\n" +" večkratno uporabo `alias IME=VREDNOST' na standardnem izpisu.\n" +" \n" +" V nasprotnem primeru je za vsako IME določen vzdevek, čigar\n" +" VREDNOST je podana.\n" +" Vmesni presledni znak v VREDNOSTI povzroči, da naslednjo\n" +" besedo preveri za zamenjavo vzdevka, ko je ta razširjen.\n" +" \n" +" Možnosti:\n" +" -p\tIzpiši vse določene vzdevke v obliki za večkratno uporabo\n" +" \n" +" Status končanja:\n" +" vzdevek vrne pravilno, razen če je predloženo IME, za katero ni\n" +" bil določen noben vzdevek." + +#: builtins.c:278 +#, fuzzy +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Odstrani vsako IME s seznama določenih vzdevkov.\n" +" \n" +" Možnosti:\n" +" -a\todstrani vsa določila vzdevkov.\n" +" \n" +" Vrne pravilno, razen če IME ni obstoječ vzdevek." + +#: builtins.c:291 +#, fuzzy +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Nastavi tipkovne bližnjice in spremenljivke funkcije Readline.\n" +" \n" +" Veže zaporedje tipk na funkcijo Readline ali makro ali nastavi\n" +" spremenljivko Readline. Skladnja argumenta brez možnosti\n" +" je enakovredna najdbi v ~/.inputrc, vendar mora biti podana\n" +" kot en argument:\n" +" na primer, bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Možnosti:\n" +" -m tipk_razvr Uporabi TIPK_RAZVR kot tipkovno razvrstitev za čas " +"trajanja\n" +" tega ukaza. Sprejemljiva imena tipkovnih " +"razvrstitev so emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command in vi-insert.\n" +" -l Prikaži imena funkcij.\n" +" -P Prikaži imena funkcij in tipkovne bližnjice.\n" +" -p Prikaži imena funkcij in tipkovne bližnjice v obliki, ki se lahko\n" +" ponovno uporabi kot vnos.\n" +" -S Prikaži tipkovna zaporedja, ki se sklicujejo na makre in njihove " +"vrednosti.\n" +" -s Prikaži tipkovna zaporedja, ki se sklicujejo na makre in njihove " +"vrednosti\n" +" v obliki, ki se lahko ponovno uporabi kot vnos.\n" +" -V Prikaži imena spremenljivk in vrednosti\n" +" -v Prikaži imena spremenljivk in vrednosti v obliki, ki se lahko\n" +" ponovno uporabi kot vnos.\n" +" -q ime_funkcije Poizvedi, katere tipke se sklicujejo na imenovano " +"funkcijo.\n" +" -u ime_funkcije Odveži vse tipke, ki se vežejo na imenovano funkcijo.\n" +" -r zaporedje_tipk Odstrani vez za ZAPOREDJE_TIPK.\n" +" -f ime_datoteke Beri tipkovne bližnjice iz IME_DATOTEKE.\n" +" -x zaporedje_tipk:ukaz_lupine\tPovzroči, da se UKAZ_LUPINE izvrši,\n" +" \t\t\t\tko je vnešeno ZAPOREDJE_TIPK.\n" +" \n" +" Status končanja:\n" +" bind vrne 0, razen, če je dana neprepoznana možnost ali se pojavi napaka." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Konča zanko for, while ali until.\n" +" \n" +" Končaj zanko FOR, WHILE ali UNTIL. Če je N podan, prekini N obdanih\n" +" zank.\n" +" \n" +" Stanje končanja:\n" +" Stanje končanja je 0, razen če N ni večji kot ali enak 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Nadaljuje zanko for, while ali until.\n" +" \n" +" Nadaljuje naslednjo ponovitev obdane zanke FOR, WHILE ali UNTIL.\n" +" Če je N podan, nadaljuje N-to obdano zanko.\n" +" \n" +" Stanje končanja:\n" +" Stanje končanja je 0, razen če N ni večji kot ali enak 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Izvede vgrajeno lupino.\n" +" \n" +" Izvede VGRAJENO_LUPINO z argumenti ARG brez opravljanja iskanja\n" +" ukaza. To je uporabno, ko želite ponovno izvesti vgrajeno lupino\n" +" kot funkcijo lupine, vendar bi radi izvedli vgrajeno lupino znotraj " +"funkcije.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje končanja VGRAJENE_LUPINE ali napak, če VGRAJENA_LUPINA\n" +" ni vgrajena lupina .." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Vrne vsebino trenutnega klica podprograma.\n" +" \n" +" Brez IZRAZA vrne \"$line $filename\". Z IZRAZOM vrne\n" +" \"$line $subroutine $filename\"; ta dodaten podatek se lahko uporabi\n" +" za zagotovitev sledenja sklada.\n" +" \n" +" Vrednost IZRAZA nakazuje, koliko okvirjev klicev mora nazaj\n" +" pred trenutnega; zgornji okvir je okvir 0.\n" +" \n" +" Stanje končanja:\n" +" Vrne 0, razen če lupina ne izvršuje funkcije lupine ali pa IZRAZ\n" +" ni veljaven." + +#: builtins.c:387 +#, fuzzy +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Spremeni delovno mapo lupine.\n" +" \n" +" Spremeni trenutno mapo v DIR. Privzet DIR je vrednost spremenljivke\n" +" lupine HOME.\n" +" \n" +" Spremenljivka CDPATH določa iskalno pot za mapo, ki vsebuje DIR.\n" +" Nadomestna imena map v CDPATH so ločena z dvopičjem (:).\n" +" Prazno ime mape se enači s trenutno mapo. Če se DIR začne\n" +" s poševnico (/), potem se CDPATH ne uporabi.\n" +" \n" +" Če mapa ni najdena in je možnost lupine `cdable_vars' določena,\n" +" se predvideva, da je beseda ime spremenljivke. Če spremenljivka\n" +" ima vrednost, se le-ta uporabi za DIR.\n" +" \n" +" Možnosti:\n" +" -L\tprisili sledenje simbolnim povezavam\n" +" -P\tuporabi fizično strukturo map brez sledenja simbolnim\n" +" \tpovezavam\n" +" -e\tče je možnost -P predložena in trenutne delovne mape\n" +" \tni mogoče uspešno določiti, končaj z ne-ničelnim stanjem\n" +" \n" +" Sledenje simbolnim povezavam je privzeto, kot če bi možnost `-L'\n" +" bila predložena\n" +" \n" +" Stanje končanja:\n" +" Vrne 0, če je mapa spremenjena in če je $PWD uspešno nastavljen, kadar\n" +" je uporabljena možnost -P; drugače je ne-ničelna vrednost" + +#: builtins.c:425 +#, fuzzy +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Izpiše ime trenutne delovne mape.\n" +" \n" +" Možnosti:\n" +" -L\tprikaže vrednost $PWD, če imenuje trenutno delovno\n" +" \tmapo\n" +" -P\tprikaže fizično mapo brez vsakršnih simbolnih povezav\n" +" \n" +" Privzeto se `pwd\" obnaša, kot če bi možnost `-L ' bila določena.\n" +" \n" +" Stanje končanja:\n" +" Vrne 0, razen če je dana neveljavna možnost ali pa trenutne mape\n" +" ni mogoče prebrati." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Prazen ukaz.\n" +" \n" +" Brez učinka; ukaz ne naredi ničesar.\n" +" \n" +" Stanje končanja:\n" +" Vedno uspešno." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Vrne uspešen rezultat.\n" +" \n" +" Stanje končanja:\n" +" Vedno uspešno." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Vrne neuspešen rezultat.\n" +" \n" +" Stanje končanja:\n" +" Vedno neuspešno." + +#: builtins.c:471 +#, fuzzy +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Izvede preprost ukaz ali prikaže podrobnosti o ukazih.\n" +" \n" +" Zažene UKAZ z ARGUMENTI in zavira iskanje funkcije lupine ali prikaže\n" +" podrobnosti o določenih UKAZIH. Lahko se uporabi za klic ukazov\n" +" na disku, kadar obstaja funkcija z enakim imenom.\n" +" \n" +" Možnosti:\n" +" -p\tuporabi privzeto vrednost za POT, ki bo zagotovo našla vse\n" +" \tstandardne pripomočke\n" +" -v\tprikaži opis UKAZA, podobno kot vgrajena lupina `type'\n" +" -V\tprikaži bolj podrobni izpis vsakega UKAZA\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje končanja UKAZA ali neuspešno, če UKAZA ni mogoče najti." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Nastavi vrednosti spremenljivk in atributov.\n" +" \n" +" Deklarira spremenljivke in jim da atribute. Če ni podanih IMEN,\n" +" prikaže atribute in vrednosti vseh spremenljivk.\n" +" \n" +" Možnosti:\n" +" -f\tomeji ukrep ali prikaži imena funkcij in določilom\n" +" -F\tomeji prikaz samo imen funkcij (ter število vrstice in\n" +" \tizvorno datoteko, kadar je dejavno razhroščevanje)\n" +" -g\tustvari splošne spremenljivke, kadar so uporabljene v funkciji\n" +" \tlupine; v nasprotnem primeru je prezrto\n" +" -p\tprikaži atribute in vrednost vsakega IMENA\n" +" \n" +" Možnosti, ki določajo atribute\n" +" -a\tda so IMENA zabeležena polja (če je podprto)\n" +" -A\tda so IMENA povezana polja (če je podprto)\n" +" -i\tda imajo IMENA atribute celih števil `integer'\n" +" -l\tda se IMENA pretvorijo v male črke pri dodelitvi\n" +" -r\tda so IMENA samo za branje\n" +" -t\tda imajo IMENA atribut sledenja `trace'\n" +" -u\tda se IMENA pretvorijo v velike črke pri dodelitvi\n" +" -x\tda se IMENA izvozijo\n" +" \n" +" Uporaba `+' namesto `-' izklopi dan atribut.\n" +" \n" +" Spremenljivkam z atributom celega števila se izvede aritmetično\n" +" vrednotenje (poglejte ukaz `let'), kadar je spremenljivki\n" +" dodeljena vrednost.\n" +" \n" +" Ko se uporabi v funkciji, `declare' naredi IMENA krajevna kot\n" +" pri ukazu `local'. Možnost `-g' zavira to obnašanje.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost ali pride\n" +" do napake." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Nastavi vrednosti spremenljivk in atributov.\n" +" \n" +" Zastarelo. Oglejte si `help declare'." + +#: builtins.c:540 +#, fuzzy +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Določi krajevne spremenljivke.\n" +" \n" +" Ustvari krajevno spremenljivko z imenom IME in ji dodeli VREDNOST.\n" +" MOŽNOST je lahko katera koli, sprejeta z `declare'.\n" +" \n" +" Krajevne spremenljivke se lahko uporabijo samo znotraj funkcije;\n" +" vidne so samo funkciji, kjer so določene in njenim podprogramom.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost, pride\n" +" do napake ali pa lupina ne izvaja funkcije." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Piše argumente na standardni izhod.\n" +" \n" +" Prikaže ARGUMENTE na standardnem izhodu, ki mu sledi nova vrstica.\n" +" \n" +" Možnosti:\n" +" -n\tne pripni nove vrstice\n" +" -e\tomogoči tolmačenje naslednjih ubežnih levih poševnic\n" +" -E\tizrecno zatri tolmačenje ubežnih levih poševnic\n" +" \n" +" `echo' tolmači naslednje znake ubežnih levih poševnic:\n" +" \\a\talarm (zvonec)\n" +" \\b\tvračalka\n" +" \\c\tzatre nadaljni izpis\n" +" \\e\tubežni znak\n" +" \\f\tnova stran\n" +" \\n\tnova vrstica\n" +" \\r\tpomik na začetek vrstice\n" +" \\t\tvodoravni tabulator\n" +" \\v\tnavpični tabulator\n" +" \\[tab]leva poševnica\n" +" \\0nnn\tznak, katerega vrednost ASCII je NNN (osmiška). NNN je lahko\n" +" \tod 0 do 3 osmiška števila\n" +" \\xHH\t8-bitni znak, katerega vrednost je HH (šestnajstiška). HH\n" +" \tje lahko ena ali dve šestnajstiški števili\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če pride do napake pri pisanju." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Piše argumente na standardni izhod.\n" +" \n" +" Prikaže ARGUMENTE na standardni izhod, temu sledi nova vrstica.\n" +" \n" +" Možnosti:\n" +" -n\tne pripni nove vrstice\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če pride do napake pri pisanju." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Omogoči in onemogoči vgrajene lupine.\n" +" \n" +" Omogoči in onemogoči ukaze vgrajene lupine. Onemogočenje dovoli\n" +" izvedbo ukaza diska, ki ima enako ime kot vgrajena lupina, brez\n" +" uporabe polnega imena poti.\n" +" \n" +" Možnosti:\n" +" -a\tprikaži seznam vgrajenih lupin, ki kaže, katera je omogočena\n" +" -n\tonemogoči vsako IME ali pa prikaži seznam onemogočenih\n" +" \tvgrajenih lupin\n" +" -p\tprikaži seznam vgrajenih lupin v obliki za večkratno uporabo\n" +" -s\tprikaži samo imena posebnih vgrajenih lupin `special'\n" +" \tpo POSIX standardu\n" +" \n" +" Možnosti, ki nadzorujejo dinamično nalaganje:\n" +" -f\tnaloži IME iz predmeta IME_DATOTEKE v souporabi\n" +" -d\todstrani vgrajeno lupino, naloženo z -f\n" +" \n" +" Brez podanih možnosti je vsako IME omogočeno.\n" +" \n" +" Za uporabo preizkusa 'test', najdenega v $PATH, in ne različice\n" +" vgrajene lupine, vpišite `enable -n test'.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če IME ni vgrajena lupina ali če pride do napake." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Zažene argumente kot ukaze lupine.\n" +" \n" +" Združi ARGUMENTA v en niz, uporabi rezultat kot vnos v lupino\n" +" in zaženi končne ukaze.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje končanja ali uspešno, če je ukaz prazen." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Razčleni argumente možnosti.\n" +" \n" +" Getopts je uporabljen s strani postopkov lupine za razčlenitev\n" +" položajnih parametrov kot možnosti.\n" +" \n" +" NIZ_MOŽNOSTI vsebuje črke možnosti za prepoznavo; če dvopičju\n" +" sledi črka, se za možnost pričakuje dodeljen argument, ki mora\n" +" biti ločen s preslednim znakom.\n" +" \n" +" Vsakič, ko je klican, bo getopts postavil naslednjo možnost v\n" +" spremenljivko lupine $name, nastavil ime, če še ne obstaja, in\n" +" kazalo naslednjega argumenta bo obdelano v spremenljivko\n" +" lupine OPTIND. OPTIND je nastavljen na 1 vsakič, ko je lupina ali\n" +" skripta lupine poklicana. Ko možnost zahteva argument, ga\n" +" getopts premakne v spremenljivko lupine OPTARG. \n" +" \n" +" getopts poroča napake na eden izmed dveh načinov. Če je prvi\n" +" znak OPTSTRING dvopičje, getopts uporabi tiho poročanje napak.\n" +" V tem načinu ni izpisanih sporočil o napakah. Če je videna neveljavna\n" +" možnost, getopts postavi najden znak možnosti v OPTARG. Če\n" +" zahtevan argument ni najden, getopts postavi ':' v IME in dodeli\n" +" OPTARG nadenemu znaku možnosti. Če getopts ni v tihem načinu\n" +" in je videnaneveljavna možnost, getopts postavi '?' v IME in\n" +" ponastavi OPTARG. Če zahtevan argument ni najden, je '?'\n" +" postavljen v IME, OPTARG je ponastavljen in prikazano je\n" +" diagnostično sporočilo.\n" +" \n" +" Če ima spremenljivka lupine OPTERR vrednost 0, getopts\n" +" onemogoči prikaz sporočil o napakah, tudi če prvi znak OPTSTRING\n" +" ni dvopičje. OPTERR ima privzeto vrednost 1.\n" +" \n" +" Getopts običajno razčleni položajne parametre ($0 - $9), toda če je\n" +" danih več argumentov, se jih razčleni.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, če je možnost najdena; neuspešno, če pride\n" +" do konca možnosti ali do napake." + +#: builtins.c:694 +#, fuzzy +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Zamenja lupino z danim ukazom.\n" +" \n" +" Izvede UKAZ, ki zamenja to lupino z določenim programom.\n" +" ARGUMENTI postanejo argumenti UKAZU. Če UKAZ ni določen,\n" +" se vsaka preusmeritev uveljavi v trenutni lupini.\n" +" \n" +" Možnosti:\n" +" -a ime\tposreduj IME kot nični argument UKAZU\n" +" -c\t\tizvedi UKAZ s praznim okoljem\n" +" -l\t\tpostavi pomišljaj v nični argument UKAZU\n" +" \n" +" Če ukaza ni bilo mogoče izvesti, se ne-vzajemna lupina konča, razen\n" +" če je nastavljena možnost lupine `execfail' .\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če UKAZ ni najden ali pride do napake preusmeritve." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Konča lupino.\n" +" \n" +" Konča lupino s stanjem N. Če je N izpuščen, se uporabi stanje\n" +" končanja zadnjega izvršenega ukaza." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Konča prijavno lupino.\n" +" \n" +" Konča prijavno lupino s stanjem končanja N. Vrne napako, če se\n" +" ne izvede v prijavni lupini." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Prikaže ali izvede ukaze s seznama zgodovine.\n" +" \n" +" fc se uporablja za seznam ali urejanje in ponovno izvajanje ukazov\n" +" s seznama zgodovine. PRVI in ZADNJI sta lahko števili, ki določata " +"obseg\n" +" oz. PRVI je lahko niz, kar pomeni, da se nedavni ukaz začne s tem " +"nizom.\n" +" \n" +" Možnosti:\n" +" -e IME_UREJEVALNIKA\tizbere urejevalnik za uporabo. Privzet je\n" +" \t\tFCEDIT, nato EDITOR, nato vi\n" +" -l \tprikaže vrstice namesto urejanja\n" +" -n\tzanemari številke vrstic med navedbo\n" +" -r\tobrni vrstni red vrstic (najnovejše so navedene prve)\n" +" \n" +" Z obliko `fc -s [vzorec=zamenjava] [ukaz]' se UKAZ ponovno izvede \n" +" po tem, ko se opravi nadomeščanje OLD=NEW.\n" +" \n" +" Lahko se uporabi uporaben vzdevek r='fc -s' tako, da se z vnosom \n" +" `r cc' zažene zadnji ukaz, ki se začne z `cc' in vnosom `r' se ponovno \n" +" izvede zadnji ukaz.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno ali stanje izvedenega ukaza; ne-ničelno, če pride do napake." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Premakne posel v ospredje.\n" +" \n" +" Premakne posel, določen s strani DOLOČILA_POSLA, v ospredje,\n" +" kar ga spremeni v trenutni posel. Če DOLOČILO_POSLA ni prisotno,\n" +" se uporabi označba lupine trenutnega posla.\n" +" \n" +" Stanje končanja:\n" +" Stanje ukaza, postavljenega v ospredje, ali neuspešno, če se\n" +" pojavi napaka." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Premakne posle v ozadje.\n" +" \n" +" Postavi posle, določene s strani JOB_SPEC, v ozadje, kot če bi se\n" +" začeli z `&'. Če JOB_SPEC ni prisoten, se uporabi označba lupine\n" +" trenutnega posla.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če nadzor posla ni omogočen ali če pride\n" +" do napake." + +#: builtins.c:793 +#, fuzzy +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Shrani ali prikaži mesta programov.\n" +" \n" +" Določi in shrani polno ime poti vsakega IMENA ukaza. Če\n" +" ni danih argumentov, se prikažejo podrobnosti o shranjenih ukazih.\n" +" \n" +" Možnosti:\n" +" -d\t\tpozabi shranjeno mesto vsakega IMENA\n" +" -l\t\tprikaži v obliki, ki se lahko ponovno uporabi kot vnos\n" +" -p ime_poti\tuporabi IME_POTI kot polno ime poti IMENA\n" +" -r\t\tpozabi vsa shranjena mesta\n" +" -t\t\tprikaži shranjena mesta vsakega IMENA, temu sledi\n" +" \t\tvsako mesto z ustreznim IMENOM, če je danih več IMEN\n" +" ArgumentI:\n" +" IME\t\tVsako IME je iskano v $PATH in dodano na seznam\n" +" \t\tshranjenih ukazov.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če IME ni najdeno ali če je dana neveljavna možnost." + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Prikaže podrobnosti o ukazih vgrajene lupine.\n" +" \n" +" Prikaže kratke povzetke ukazov vgrajene lupine. Če je VZOREC\n" +" določen, da podrobno pomoč za vse ukaze, ki se ujemajo z VZORCEM,\n" +" v nasprotnem primeru prikaže seznam tem pomoči.\n" +" \n" +" Možnosti:\n" +" -d\tizpiši kratek opis za vsako temo\n" +" -m\tprikaži uporabo v obliki psevdo-priročniške strani\n" +" -s\tprikaži samo kratek povzetek uporabe za vsako temo, ki se\n" +" \tujema z VZORCEM\n" +" \n" +" ArgumentI:\n" +" VZOREC\tVzorec, ki navaja temo pomoči\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če VZOREC ni najden ali pa je dana neveljavna\n" +" možnost." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Prikaže ali obdela seznam zgodovine.\n" +" \n" +" Prikaže seznam zgodovine s številkami vrstic, vsak spremenjen vnos\n" +" označi s predpono `*'. Argument N navede samo N zadnjih vnosov.\n" +" \n" +" Možnosti:\n" +" -c\tpobriši seznam zgodovine z brisanjem vseh vnosov\n" +" -d odmik\tpobriši vnos zgodovine pri odmiku ODMIK.\n" +" \n" +" -a\tpripni vrstice zgodovine iz te seje v datoteko zgodovine\n" +" -n\tpreberi vse vrstice zgodovine, ki še niso prebrane iz datoteke\n" +" \tzgodovine\n" +" -r\tpreberi datoteko zgodovine in pripni vsebino seznama\n" +" \tzgodovine\n" +" -w\tpiši trenutno zgodovino v datoteko zgodovine\n" +" \tin jo pripni na seznam zgodovine\n" +" \n" +" -p\topravi razširitev zgodovine na vsak ARG in prikaži rezultat\n" +" \tbrez shranitve na seznam zgodovine\n" +" -s\tpripni ARGUMENTE na seznam zgodovine kot edini vnos\n" +" \n" +" Če je IME_DATOTEKE podan, se uporabi kot datoteka zgodovine.\n" +" V nasprotnem primeru, če $HISTFILE ima vrednost, ki se uporabi,\n" +" pa ~/.bash_history.\n" +" \n" +" Če je spremenljivka $HISTTIMEFORMAT določena in ni prazna, se\n" +" njena vrednost uporabi kot niz oblike za strftime(3) za prikaz časovnih\n" +" žigov, ki so povezani z vsakim vnosom prikazane zgodovine.\n" +" V nasprotnem primeru časovni žigi niso prikazani.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je podana neveljavna možnost ali če pride\n" +" do napake." + +#: builtins.c:879 +#, fuzzy +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Prikaže stanje poslov.\n" +" \n" +" Navede dejavne posle. DOLOČILO_POSLA omejuje izpis v ta posel.\n" +" Brez podanih možnosti se prikaže stanje vseh dejavnih poslov.\n" +" \n" +" Možnosti:\n" +" -l\tnavedi ID-je opravil zraven običajnih podatkov\n" +" -n\tnavedi samo opravila, ki imajo od zadnjega obvestila\n" +" \tspremenjena stanja\n" +" -p\tnavedi samo ID-je opravil\n" +" -r\tomeji izhod na posle, ki se izvajajo\n" +" -s\tomeji izhod na ustavljene posle\n" +" \n" +" Če je -x naveden, se zažene UKAZ, ko se določila poslov, ki se\n" +" pojavijo v ARGUMENTIH, zamenjajo z ID-jem opravila vodje skupine\n" +" opravil tega posla.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do\n" +" napake. Če se uporabi -x, vrne stanje končanja UKAZA." + +#: builtins.c:906 +#, fuzzy +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Odstrani posle iz trenutne lupine.\n" +" \n" +" Odstrani vsak argument DOLOČILA_POSLA s seznama dejavnih poslov.\n" +" Brez danih DOLOČIL_POSLA lupina uporabi svojo označbo trenutnega\n" +" posla.\n" +" \n" +" Možnosti:\n" +" -a\todstrani vse posle, če DOLOČILO_POSLA ni navedeno\n" +" -h\toznači vsako DOLOČILO_POSLA, tako da se SIGHUP ne pošlje\n" +" \tposlu, če lupina prejme SIGHUP \n" +" -r\todstrani samo posle, ki se izvajajo\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če je dano\n" +" DOLOČILO_POSLA." + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Pošlje signal poslu.\n" +" \n" +" Pošlje opravila, določena s strani ID-ja opravila ali uporabi\n" +" DOLOČILO_POSLA za signal, ki je imenovan s strani SIGSPEC ali SIGNUM.\n" +" Če SIGSPEC in SIGNUM nista prisotna, se predvideva SIGTERM.\n" +" \n" +" Možnosti:\n" +" -s sig\tSIG je ime signala\n" +" -n sig\tSIG je številka signala\n" +" -l\tnavedi imena signalov; če `-l' sledijo argumenti, se predvideva,\n" +" \tda so številke signalov, za katere bi morala biti navedena imena\n" +" \n" +" Kill je vgrajena lupina zaradi dveh razlogov: omogoča ID-jem poslov,\n" +" da se jih uporabi namesto ID-jev opravil in omogoča uničenje opravil,\n" +" če se prekorači meja ustvarjenih opravil.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do\n" +" napake." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Ovrednoti aritmetične izraze.\n" +" \n" +" Ovrednoti vsak ARG kot aritmetični izraz. Vrednotenje se opravi\n" +" v celih številih z nespremenjeno širino brez preverjanja za " +"prekoračitev,\n" +" čeprav je deljenje z 0 ujeto in označeno kot napaka. Seznam " +"operatorjev,\n" +" ki sledi, je združen v stopnje operatorjev enakih prednosti. Stopnje so\n" +" razvrščene po padajoči prednosti.\n" +" \n" +" \tid++, id--\tnaknadno večanje spremenljivke, naknadno manjšanje\n" +" \t++id, --id\tpredhodno večanje spremenljivke, predhodno manjšanje\n" +" \t-, +\t\tenosloven minus, plus\n" +" \t!, ~\t\tlogična in bitna negacija\n" +" \t**\t\tpotenciranje\n" +" \t*, /, %\t\tmnoženje, deljenje, ostanek\n" +" \t+, -\t\tseštevanje, odštevanje\n" +" \t<<, >>\t\tlevi in desni bitni premiki\n" +" \t<=, >=, <, >\tprimerjava\n" +" \t==, !=\t\tenakost, neenakost\n" +" \t&\t\tbitni AND\n" +" \t^\t\tbitni XOR\n" +" \t|\t\tbitni OR\n" +" \t&&\t\tlogični AND\n" +" \t||\t\tlogični OR\n" +" \tizraz ? izraz : izraz\n" +" \t\t\tpogojni operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tdodeljevanje \n" +" \n" +" Spremenljivke lupine so dovoljene kot operandi. Ime spremenljivke\n" +" se zamenja z njeno vrednostjo (prisiljena na celo število z\n" +" nespremenljivo širino) znotraj izraza. Za uporabo spremenljivke v ni\n" +" treba vklopliti atributa celega števila.\n" +" \n" +" Operatorji so ovrednoteni v prednostnem vrstnem redu. Podizrazi\n" +" v oklepajih so ovrednoteni prvi in lahko prepišejo prednostna \n" +" pravila, omenjena zgoraj.\n" +" \n" +" Stanje končanja\n" +" Če zadnji ARG ovrednoti na 0, let vrne 1; sicer let vrne 0." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Prebere vrstico iz standardnega vhoda in jo razdeli v polja.\n" +" \n" +" Prebere eno vrstico iz standardnega vhoda ali iz opisnika FD, če je\n" +" navedena možnost -u. Vrstica je razdeljena na polja, kot je delitev\n" +" besed in prva beseda je dodeljena prvemu IMENU, druga beseda drugemu\n" +" IMENU itd., ostanek zadnje besede pa se dodeli zadnjemu IMENU.\n" +" Samo znaki, najdeni v $IFS, so prepoznani kot razmejilniki besed.\n" +" \n" +" Če ni navedenih IMEN, se prebrana vrstica shrani v spremenljivko REPLY.\n" +" \n" +" Možnosti:\n" +" -a polje\tdodeli prebrane besede zaporednim kazalom spremenljivke \n" +" \t\tpolja POLJE, začenši z 0\n" +" -d razmejilnik\tnadaljuj, dokler ni prvi znak RAZMEJILNIKA prebran,\n" +" \t\tnamesto v novo vrstico\n" +" -e\t\tuporabi Readline za pridobitev vrstice v vzajemni lupini\n" +" -i besedilo\tuporabi BESEDILO kot prvotno besedilo za Readline\n" +" -n n-znakov\tvrni po branju znakov N-ZNAKOV, namesto čakanja na\n" +" \t\tnovo vrstico, toda spoštuj razmejilnik, če je prebranih znakov\n" +" \t\tmanj kot N-ZNAKOV pred razmejilnikom\n" +" -N n-znakov\tvrni samo po branju N-ZNAKOV znakov, razen če naleti\n" +" \t\tna konec datoteke ali če branju poteče časovna omejitev, brez\n" +" \t\tupoštevanja katerega koli razmejilnika\n" +" -p poziv\tizpiši niz POZIV brez vmesne nove vrstice, preden se\n" +" \t\tposkuša prebrati\n" +" -r\t\tne dovoli levih poševnic za izognitev vsem znakom\n" +" -s\t\tne izpiši vnosa, ki prihaja s terminala\n" +" -t časovna_omejitev\tpreseži časovno omejitev in vrni neuspešno, če\n" +" \t\tznotraj ČASOVNE_OMEJITVE sekund ni prebrana celotna vrstica\n" +" \t\tvnosa. Vrednost spremenljivke TMOUT je privzeta časovna\n" +" \t\tomejitev. ČASOVNA_OMEJITEV je lahko decimalno število.\n" +" \t\tČe je ČASOVNA_OMEJITEV 0, branje vrne uspešno samo, če je na\n" +" \t\tdoločenem opisniku datoteke na voljo vnos. Stanje končanja je\n" +" \t\tvečje kot 128, če je časovna omejitev prekoračena\n" +" -u fd\t\tberi iz opisnika datotek FD, namesto standardnega vhoda\n" +" \n" +" Stanje končanja\n" +" Koda vrnitve je nič, razen če pride do konca datoteke, če je časovna \n" +" omejitev prekoračena ali če je dan neveljaven opisnik datotek kot\n" +" argument v -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Vrne iz funkcije lupine.\n" +" \n" +" Povzroči, da funkcija ali skripta izvorne kode konča z vrednostjo\n" +" vrnitve, določene z N. Če je N izpuščen, se uporabi stanje vrnitve\n" +" zadnjega izvršenega ukaza znotraj funkcije ali skripta.\n" +" \n" +" Stanje končanja\n" +" Vrne N ali neuspešno, če lupina ne izvede funkcije ali skripta." + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Nastavi ali ponastavi vrednosti možnosti lupine in položajne parametre.\n" +" \n" +" Spremeni vrednost atributov lupine in položajnih parametrov ali\n" +" prikaže imena in vrednosti spremenljivk lupine.\n" +" \n" +" Možnosti:\n" +" -a Označi vrednosti, ki so spremenjene ali ustvarjene za izvoz.\n" +" -b Takoj obvesti o uničenju posla.\n" +" -e Takoj končaj, če ukaz obstaja z ne-ničelnim stanjem.\n" +" -f Onemogoči ustvarjanje imen datotek (globbing).\n" +" -h Zapomni si mesto ukazov, ko se jih išče.\n" +" -k Vsi argumenti dodeljevanja so postavljeni v okolje za ukaz, ne\n" +" samo tisti, ki imajo predhodna imena ukazov.\n" +" -m Nadzor poslov je omogočen.\n" +" -n Preberi ukaze, toda ne izvedi jih.\n" +" -o ime_možnosti\n" +" Nastavi spremenljivke, ki ustrezajo ime_možnosti:\n" +" allexport enako kot -a\n" +" braceexpand enako kot -B\n" +" emacs uporabi vmesnik urejanja vrstic s slogom emacs\n" +" errexit enako kot -e\n" +" errtrace enako kot -E\n" +" functrace enako kot -T\n" +" hashall enako kot -h\n" +" histexpand enako kot -H\n" +" history omogoči zgodovino ukazov\n" +" ignoreeof lupina se ne bo končala po koncu branja datoteke\n" +" interactive-comments\n" +" omogoči, da se ukazi pojavijo v vzajemnih ukazih\n" +" keyword enako kot -k\n" +" monitor enako kot -m\n" +" noclobber enako kot -C\n" +" noexec enako kot -n\n" +" noglob enako kot -f\n" +" nolog trenutno sprejeto, toda neupoštevano\n" +" notify enako kot -b\n" +" nounset enako kot -u\n" +" onecmd enako kot -t\n" +" physical enako kot -P\n" +" pipefail vrnjena vrednost cevovoda je stanje zadnjega\n" +" ukaza, ki je končal z ne-ničelnim stanjem ali " +"nič,\n" +" če noben ukaz ni končal ne-ničelnim stanjem\n" +" posix spremeni obnašanje bash-a, kjer se privzeto\n" +" opravilo razlikuje od standarda POSIX pri\n" +" ujemanju standarda\n" +" privileged enako kot -p\n" +" verbose enako kot -v\n" +" vi uporabi vmesnik urejanja vrstic s slogom vi\n" +" xtrace enako kot -x\n" +" -p Vklopljeno, kadar se pravi in učinkoviti uporabniški ID-ji ne\n" +" ujamajo. Onemogoči obdelavo datoteke $ENV in uvoz funkcij\n" +" lupine. Onemogočenje te možnosti povzroči, da sta učinkovit\n" +" uporabniški id in id skupine nastavljena na resničen\n" +" uporabniški id in id skupine.\n" +" -t Končaj po branju in izvedbi enega ukaza.\n" +" -u Obravnavaj ponastavljene spremenljivke kot napako pri\n" +" zamenjavi.\n" +" -v Prikaži vrstice vnosa lupine kot so prebrane.\n" +" -x Prikaži ukaze in njihove argumente kot so izvedeni.\n" +" -B lupina bo izvedla širitev oklepaja\n" +" -C če je nastavljen, ne dovoli običajnim datotekam,\n" +" da bi bile prepisane s preusmeritvijo izhoda.\n" +" -E Če je nastavljeno, je past ERR dedovana s strani\n" +" funkcij lupine.\n" +" -H Omogoči zamenjavo zgodovine s slogom! . Ta zastavica\n" +" je privzeto omogočena, kadar je lupina vzajemna.\n" +" -P Če je nastavljeno, ne sledi simbolnim povezavam, kadar se\n" +" izvajajo ukazi, kot je cd, ki spremeni trenutno mapo.\n" +" -T Če je nastavljeno, je past DEBUG dedovana s strani\n" +" funkcij lupine.\n" +" -- Dodeli vse preostale argumente v položajne parametre.\n" +" Če ni preostalih argumentov, so položajni parametri\n" +" ponastavljeni.\n" +" - Dodeli vse preostale argumente v položajne parametre.\n" +" Možnosti -x in -v sta izključeni.\n" +" \n" +" Uporaba + namesto - povzroči, da se te zastave izklopijo.\n" +" Zastave se lahko tudi uporabijo za po klicu lupine. Trenuten\n" +" niz zastavic je mogoče najti v $-. Preostali n ARGUMENTI so\n" +" položajni parametri in so dodeljeni vrstnem redu k $1, $2, .. $n.\n" +" Če ni danih ARGUMENTOV, se izpišejo vse spremenljivke\n" +" lupine.\n" +" \n" +" Stanje končanja\n" +" Vrne uspešno, razen če je dana neveljavna možnost." + +#: builtins.c:1139 +#, fuzzy +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Ponastavi vrednosti in atribute spremenljivk in funkcij lupine.\n" +" \n" +" Za vsako IME odstrani ustrezno spremenljivko ali funkcijo.\n" +" \n" +" Možnosti:\n" +" -f\tobravnavaj vsako IME kot funkcijo lupine\n" +" -v\tobravnavaj vsako IME kot spremenljivko lupine\n" +" \n" +" Če ni danih možnosti, poskuša unset ponastaviti spremenljivko in če\n" +" to ne uspe, poskuša ponastaviti funkcijo.\n" +" \n" +" Nekaterih spremenljivk ni mogoče ponastaviti; glejte tudi `readonly'.\n" +" \n" +" Stanje končanja\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če je IME samo\n" +" za branje." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Nastavi atribut izvoza za spremenljivke lupine.\n" +" \n" +" Označi vsako IME za samodejni izvoz v okolje naknadno izvedenih\n" +" ukazov. Če je VREDNOST vnesena, dodeli VREDNOST pred izvozom.\n" +" \n" +" Možnosti:\n" +" -f\tnanašaj se na funkcije lupine\n" +" -n\todstrani lastnost izvoza iz vsakega IMENA\n" +" -p\tprikaži seznam vseh izvoženih spremenljivk in funkcij\n" +" \n" +" Argument od `--' onemogoči nadaljnjo obdelavo možnosti.\n" +" \n" +" Stanje končanja\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če je\n" +" neveljavno IME." + +#: builtins.c:1180 +#, fuzzy +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Označi spremenljivke lupine kot nespremenljive.\n" +" \n" +" Označi vsako IME kot samo za branje; vrednosti teh IMEN se morda\n" +" ne bodo spremenile s strani naknadne dodelitve. Če je VREDNOST\n" +" predložena, dodeli VREDNOST pred označitvijo samo za branje.\n" +" \n" +" Možnosti:\n" +" -a\tnanašaj se na spremenljivke zabeleženih polj\n" +" -A\tnanašaj se spremenljivke povezanih polj\n" +" -f\tnanašaj se na funkcije lupine\n" +" -p\tprikaži seznam vseh spremenljivk in funkcij, ki so samo\n" +" \tza branje\n" +" \n" +" Argument od `--' onemogoči nadaljnjo obdelavo možnosti.\n" +" \n" +" Stanje končanja\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če je\n" +" neveljavno IME." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Premakne položajne parametre.\n" +" \n" +" Preimenuje položajne parametre $N+1, $N+2 ... v $1,$2 ...\n" +" Če N ni dan, se predvideva, da je 1.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je N negativen ali večji kot $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Izvede ukaze iz datoteke v trenutni lupini.\n" +" \n" +" Prebere in izvede ukaze iz DATOTEKE v trenutni lupini. Vnosi v $PATH\n" +" so uporabljeni za iskanje mape, ki vsebuje IME_DATOTEKE. \n" +" Če so kakšni ARGUMENTI predloženi, postanejo položajni parametri,\n" +" kadar se izvede IME_DATOTEKE.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza v IMENU_DATOTEKE; vrne\n" +" neuspešno, če IMENA_DATOTEKE ni mogoče brati." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Da izvedbo lupine v pripravljenost.\n" +" \n" +" Da izvedbo te lupine v pripravljenost, dokler ne prejme signala\n" +" SIGCONT. Lupine prijave ni mogoče dati v pripravljenost, razen če se\n" +" jo prisili.\n" +" \n" +" Možnosti:\n" +" -f\tprisili stanje pripravljenosti, tudi če je lupina lupina prijave\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če nadzor posla ni omogočen ali če pride do\n" +" napake." + +#: builtins.c:1261 +#, fuzzy +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Ovrednoti pogojni izraz.\n" +" \n" +" Konča s stanjem 0 (prav) ali 1 (napak), odvisno od ovrednotenja IZRAZA.\n" +" Izrazi so lahko enoslovni ali binarni. Enoslovni izrazi so pogosto\n" +" uporabljeni za preverjanje stanja datoteke. Obstajajo tudi operatorji\n" +" nizov in operatorji številskih primerjav.\n" +" \n" +" Obnašanje preizkusa je odvisno od števila argumentov. Preberite \n" +" si stran priročnika bash za popolno razčlenitev.\n" +" \n" +" Operatorji datotek:\n" +" \n" +" -a DATOTEKA Prav, če datoteka obstaja.\n" +" -b DATOTEKA Prav, če je datoteka posebnost bloka.\n" +" -c DATOTEKA Prav, če je datoteka posebnost znaka.\n" +" -d DATOTEKA Prav, če je datoteka mapa.\n" +" -e DATOTEKA Prav, če datoteka obstaja.\n" +" -f DATOTEKA Prav, če datoteka obstaja in je običajna.\n" +" -g DATOTEKA Prav, če je datoteka set-group-id.\n" +" -h DATOTEKA Prav, če je datoteka simbolna povezava.\n" +" -L DATOTEKA Prav, če je datoteka simbolna povezava.\n" +" -k DATOTEKA Prav, če ima datoteka nastavljeno zastavo `sticky' bit\n" +" -p DATOTEKA Prav, če je datoteka imenovana cev.\n" +" -r DATOTEKA Prav, če je datoteka berljiva za Vas.\n" +" -s DATOTEKA Prav, če datoteka obstaja in ni prazna.\n" +" -S DATOTEKA Prav, če datoteka ni vstavek.\n" +" -t FD Prav, če je FD odprt v terminalu.\n" +" -u DATOTEKA Prav, če je datoteka set-user-id.\n" +" -w DATOTEKA Prav, če je datoteka zapisljiva za Vas.\n" +" -x DATOTEKA Prav, če je datoteka izvedljiva za Vas.\n" +" -O DATOTEKA Prav, če datoteka v vaši lasti.\n" +" -G DATOTEKA Prav, če je datoteka v lasti vaše skupine.\n" +" -N DATOTEKA Prav, če je datoteka bila spremenjena, odkar je bila\n" +" nazadnje prebrana.\n" +" \n" +" DATOTEKA1 -nt DATOTEKA Prav, če je datoteka1 novejša kot\n" +" datoteka2 (glede na datum spremembe).\n" +" \n" +" DATOTEKA1 -ot DATOTEKA2 Prav, če je datoteka1 starejša kot\n" +" datoteka2.\n" +" \n" +" DATOTEKA1 -ef DATOTEKA2 Prav, če je datoteka1 nespremenljivo\n" +" vezana na datoteko2.\n" +" \n" +" Operatorji nizov:\n" +" \n" +" -z NIZ Prav, če je niz prazen.\n" +" \n" +" -n NIZ\n" +" NIZ Prav, če niz ni prazen.\n" +" \n" +" NIZ1 = NIZ2\n" +" Prav, če sta niza enaka.\n" +" NIZ1 != NIZ2\n" +" Prav, če niza nista enaka.\n" +" NIZ1 < NIZ2\n" +" Prav, če NIZ1 razvrsti po abecedi prej kot NIZ2.\n" +" NIZ1 > NIZ2\n" +" Prav, če NIZ1 razvrsti po abecedi kasneje kot NIZ2.\n" +" \n" +" Drugi operatorji:\n" +" \n" +" -o MOŽNOST Prav, če je možnost lupine MOŽNOST omogočena.\n" +" -v SPR\t Prav, če je spremenljivka lupine SPR nastavljena\n" +" ! IZRAZ Prav, če je izraz napak.\n" +" IZRAZ1 -a IZRAZ2 Prav, če sta izraz1 IN izraz2 prav.\n" +" IZRAZ1 -o IZRAZ2 Prav, če je izraz1 ALI izraz2 prav.\n" +" \n" +" arg1 OP arg2 Aritmetični preizkusi. OP je eden od -eq, -ne,\n" +" -lt, -le, -gt, ali -ge.\n" +" \n" +" Aritmetična binarna operatorja vrneta prav, če je ARG1 enak, neenak,\n" +" manjši-kot, manjši-kot-ali-enak, večji-kot ali večji-kot-ali-enak\n" +" kot ARG2.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, če IZRAZ ovrednoti prav, neuspešno vrne, če IZRAZ \n" +" ovrednoti napak ali če je dan neveljaven argument." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Ovrednoti pogojni izraz.\n" +" \n" +" To je sopomenka za vgrajeno lupino \"test\", toda zadnji argument\n" +" mora biti dobesedni `]' za ujemanje z uklepajem `['." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Prikaže čase opravila.\n" +" \n" +" Prikaže zbrane čase uporabnika in sistema za lupino in vsa njena\n" +" podrejena opravila.\n" +" \n" +" Stanje končanja:\n" +" Vedno uspešno." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Signali trap in ostali dogodki.\n" +" \n" +" Določi in omogoči ročnik, da se jih zažene, kadar lupina sprejme " +"signale\n" +" ali ostale pogoje.\n" +" \n" +" ARG je ukaz, ki se ga prebere in izvrši, kadar lupina sprejme signal(e)\n" +" SIGNAL_SPEC. Če je ARG odsoten (in predložen en SIGNAL_SPEC)\n" +" ali `-', je vsak določen signal ponastavljen na svojo prvotno vrednost.\n" +" Če je ARG prazen niz, je vsak SIGNAL_SPEC prezrt s strani lupine\n" +" in ukazov, ki jih pokliče.\n" +" \n" +" Če je SIGNAL_SPEC EXIT (0), se ARG izvrši ob izhodu iz lupine. Če je\n" +" SIGNAL_SPEC DEBUG, je ARG izvršen pred vsakim ukazom. Če je\n" +" SIGNAL_SPEC RETURN, se ARG izvrši vsakič, ko funkcija lupine ali " +"skript,\n" +" zagnan s strani . ali vgrajenih virov, konča z izvajanjem. SIGNAL_SPEC\n" +" od ERR pomeni, da se ARG izvede vsakič, ko bi napaka ukaza povzročila, " +"da\n" +" bi se lupina končala, kadar je omogočena možnost -e.\n" +" \n" +" Če ni predloženih argumentov, trap prikaže seznam ukazov, povezanih z\n" +" vsakim signalom.\n" +" \n" +" Možnosti:\n" +" -l\tPrikaži seznam imen signalov in njihove ustrezne številke\n" +" -p\tprikaži ukaze trap, povezane z vsakim SIGNAL_SPEC\n" +" \n" +" Vsak SIGNAL_SPEC je bodisi ime signala v bodisi številka " +"signala.\n" +" Imena signalov ločujejo velikost črk in predpona SIG je izbirna.\n" +" Signal je lahko poslan v lupino s \"kill -signal $$\".\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je SIGSPEC neveljaven ali je dana neveljavna " +"možnost." + +#: builtins.c:1400 +#, fuzzy +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Prikaže podrobnosti o vrsti ukaza.\n" +" \n" +" Za vsako IME nakaže, kako bi bilo tolmačeno, če bi bilo uporabljeno\n" +" v imenu ukaza.\n" +" \n" +" Možnosti:\n" +" -a\tprikaži vsa mesta, ki vsebujejo izvedljivo datoteko z imenom\n" +" \tIME;\n" +" \tvključuje vzdevke, vgrajene lupine in funkcije, ampak samo,\n" +" \tče možnost `-p' NI uporabljena.\n" +" -f\tzatri iskanje funkcij lupine\n" +" -P\tprisili iskanje POTI za vsako IME, tudi če je vzdevek,\n" +" \tvgrajena lupina ali funkcija, in vrni ime datoteke diska, ki bi\n" +" \tbil izvršen.\n" +" -p\tvrne ime datoteke diska, ki bi bila izvršena ali nič,\n" +" \tče `type -t NAME' ne bi vrnil datoteke `file'.\n" +" -t\tizpiši eno besedo, katera je ena izmed `vzdevkov', \n" +" \t`ključnih_besed', `funkcij', `vgrajenih_lupin', `datotek' ali `', \n" +" \tče je IME vzdevek, rezervirana beseda, funkcija lupine, vgrajena \n" +" \tlupina, datoteka diska ali ni najdeno, v tem zaporedju\n" +" \n" +" Argumenti:\n" +" IME\tIme ukaza, ki bo tolmačeno.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, če so vsa IMENA najdena; vrne neuspešno, če katero\n" +" ni najdeno." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Spremeni omejitve virov lupine.\n" +" \n" +" Zagotavlja nadzor nad sredstvi, ki so na voljo lupini in ustvarjenim\n" +" opravilom, na sistemih, ki omogočajo tak nadzor.\n" +" \n" +" Možnosti:\n" +" -S\tuporabi blago omejitev virov `soft'\n" +" -H\tuporabi strogo omejitev virov `hard'\n" +" -a\tvse trenutne omejitve so poročane\n" +" -b\tvelikost medpomnilnika vtiča\n" +" -c\tnajvečja velikost ustvarjenih datotek jedra\n" +" -d\tnajvečja velikost odseka podatkov opravila\n" +" -e\tnajvečja prednost razporejanja (`nice')\n" +" -f\tnajvečja velikost datotek, ki so napisane s strani lupine in " +"njenih\n" +" \tpodrejenih opravil\n" +" -i\tnajvečje število signalov na čakanju\n" +" -l\tnajvečja velikost, ki jo opravilo lahko zaklene v pomnilnik\n" +" -m\tnajvečja velikost stalnih naborov\n" +" -n\tnajvečje število odprtih opisnikov datotek\n" +" -p\tvelikost medpomnilnika cevi\n" +" -q\tnajvečje število bajtov v čakalnih vrstah sporočil POSIX\n" +" -r\tnajvečja prednost razporejanja v realnem času\n" +" -s\tnajvečja velikost sklada\n" +" -t\tnajvečja količina časa cpe v sekundah\n" +" -u\tnajvečje število uporabniških opravil\n" +" -v\tvelikost navideznega pomnilnika\n" +" -x\tnajvečje število datotečnih ključavnic\n" +" \n" +" Če je MEJA dana, je le-ta nova vrednost navedenega vira; posebne \n" +" vrednosti MEJE `soft', `hard' in `unlimited' pomenijo trenutno blago \n" +" omejitev, trenutno strogo omejitev in brez omejitev, v tem vrstem redu.\n" +" V nasprotnem primeru se izpiše trenutna vrednost navedenega vira.\n" +" Če ni danih možnosti, se predpostavlja -f.\n" +" \n" +" Vrednosti so v 1024-bajtnem povečanju, razen za -t, ki je v sekundah,\n" +" -p, ki je v povečanju za 512 bajtov, in -u, ki je nespremenjeno število\n" +" opravil.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do\n" +" napake." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Prikaži ali nastavi masko načina datoteke.\n" +" \n" +" Nastavi uporabniško masko ustvarjanja datoteke v NAČIN. Če je\n" +" NAČIN izpuščen, prikaže trenutno vrednost maske.\n" +" \n" +" Če se NAČIN začne z števko, se tolmači kot osmiško število;\n" +" sicer je niz simbolnega načina kot je sprejet s strani chmod(1).\n" +" \n" +" Možnosti:\n" +" -p\tče je NAČIN izpuščen, izpiši v obliki, ki se lahko uporabi kot " +"vnos\n" +" -S\tnaredi simbolni izpis; sicer se izpiše osmiško število\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je NAČIN neveljaven ali če je dana neveljavna\n" +" možnost." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Čaka na dokončanje posla in vrne stanje končanja.\n" +" \n" +" Počaka na opravilo, določeno s strani ID-ja, ki je lahko ID opravila " +"ali\n" +" določilo posla in poroča svoje stanje uničenja. Če ID ni dan, počaka\n" +" vsa trenutno dejavna podrejena opravila in stanje končanja je nič.\n" +" Če je ID določilo posla, počaka vsa opravila v cevovodu\n" +" posla.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje ID-ja; vrne neuspešno, če je ID neveljaven ali če je dana\n" +" neveljavna možnost." + +#: builtins.c:1533 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Čaka na končanje opravila in vrne stanje končanja.\n" +" \n" +" Počaka na določeno opravilo in poroča svoje stanje uničenja. Če ID\n" +" opravila ni dan, so vsa trenutno dejavna podrejena opravila na\n" +" čakanju in stanje končanja je nič.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje ID-ja; neuspešno, če je ID neveljaven ali če je dana\n" +" neveljavna možnost." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvede ukaze za vsakega člana na seznamu.\n" +" \n" +" Zanka `for' izvede zaporedje ukazov za vsakega člana na seznamu\n" +" predmetov. Če `in BESEDE ...;' niso prisotna, se predvideva `in \"$@" +"\"'.\n" +" Za vsak element v BESEDAH je IME nastavljeno temu predmetu in\n" +" UKAZI so izvršeni.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetična zanka for.\n" +" \n" +" Enakovredna je \n" +" \t(( IZRAZ1 ))\n" +" \twhile (( IZRAZ2 )); do\n" +" \t\tUKAZI\n" +" \t\t(( IZRAZ3 ))\n" +" \tdone\n" +" IZRAZ1, IZRAZ2, in IZRAZ3 so aritmetični izrazi. Če je kateri izraz " +"izpuščen,\n" +" se obnaša, kot da so enaki 1.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izbere besede s seznama in izvede ukaze.\n" +" \n" +" BESEDE so razširjene, kar ustvari seznam besed. Nabor razširjenih\n" +" besed se izpiše na standardno napako, vsaka s svojo številko.\n" +" Če `in BESEDE ...;' niso prisotne, se predvideva\n" +" `in \"$@\"'. Potem je prikazan poziv PS3 in vrstica prebrana\n" +" s standardnega vnosa. Če je vrstica sestavljena iz številke, ki ustreza\n" +" eni od prikazanih besed, potem je IME nastavljeno tej besedi.\n" +" Če je vrstica prazna, so BESEDE v pozivu prikazane \n" +" ponovno. Če se prebere konec datoteke, se ukaz zaključi. Vsaka druga \n" +" prebrana vrednost povzroči, da se IME nastavi na prazno vrednost.\n" +" Prebrana vrstica je shranjena v spremenljivki ODGOVOR. UKAZI so " +"izvršeni \n" +" po vsakem izboru, dokler se ne izvede ukaz break.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Poroča porabljen čas s strani izvedbe cevovoda.\n" +" \n" +" Izvede CEVOVOD in prikaže povzetek dejanskega časa, čas \n" +" uporabniške CPE in čas sistemske CPE, porabljen za izvajanje CEVOVODA,\n" +" ko se konča.\n" +" \n" +" Možnosti:\n" +" -p\tprikaži časovni povzetek v prenosni obliki POSIX\n" +" \n" +" Vrednost spremenljivke TIMEFORMAT se uporabi kot oblika izpisa.\n" +" \n" +" Stanje končanja:\n" +" Stanje končanja je stanje končanja CEVOVODA." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvrši ukaze na podlagi ujemanja vzorcev.\n" +" \n" +" Izbirno izvrši UKAZE, ki temeljijo na VZORCU BESEDNEGA ujemanja.\n" +" `|' se uporablja za ločevanje večih vzorcev.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvaja ukaze, ki temeljijo na pogojih.\n" +" \n" +" Izvede se seznam `if UKAZI'. Če je njegovo stanje nič, se izvede seznam\n" +" `then UKAZI'. V nasprotnem primeru se izvede vsak seznam `elif UKAZI' \n" +" in če je njegovo stanje nič, se izvede ustrezen seznam `then UKAZI' \n" +" in ukaz if se zaključi. V nasprotnem primeru se izvede seznam \n" +" `else UKAZI', če je prisoten. Stanje končanja celotnega izgrajenja \n" +" je stanje končanja zadnjega izvršenega ukaza ali nič, če noben pogoj " +"ni \n" +" dal prav.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvaja ukaze, dokler je preizkus uspešen.\n" +" \n" +" Razširja in izvaja UKAZE tako dolgo, dokler ima zadnji ukaz v UKAZIH\n" +" `while' stanje končanja, ki je nič.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvaja ukaze, dokler je preizkus neuspešen.\n" +" \n" +" Razširja in izvaja UKAZE tako dolgo, dokler ima zadnji ukaz v UKAZIH\n" +" `until' stanje končanja, ki ni nič.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Ustvari soopravilo, imenovano IME.\n" +" \n" +" Izvrši UKAZ neusklajeno, s standardnim izhodom in vnosom ukaza, ki sta \n" +" povezana preko cevi z opisniki datotek, ki so dodeljeni kazalom 0 in 1 \n" +" spremenljivke polja IME v izvršilni lupini.\n" +" Privzeto IME je \"COPROC\".\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje končanja UKAZA." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Določi funkcijo lupine.\n" +" \n" +" Ustvari funkcijo lupine, imenovano IME. Kadar je poklicana kot preprost " +"ukaz,\n" +" IME zažene UKAZE v vsebini klicoče lupine. Kadar se kliče IME, so " +"argumenti\n" +" posredovani v funkcijo kot $1...$n in ime funkcije je v $FUNCNAME.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je IME samo za branje." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Združi ukaze kot enoto.\n" +" \n" +" Zažene nabor ukazov v skupini. To je eden od načinov za \n" +" preusmeritev celotnega nabora ukazov.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Obnovi posel v ospredju.\n" +" \n" +" Je enakovreden argumentu DOLOČILO_POSLA v ukazu `fg'. Obnovi posel,\n" +" ki je ustavljen ali v ozadju. DOLOČILO_POSLA lahko določi bodisi ime\n" +" posla bodisi številko posla. DOLOČILU_POSLA sledi `&', ki postavi posel\n" +" v ozadje, kot če bi določilo posla bilo dobavljeno kot argument ukazu " +"`bg'.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje obnovljenega posla." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Ovrednoti aritmetični izraz.\n" +" \n" +" IZRAZ je ovrednoten v skladu s pravili za aritmetično ovrednotenje.\n" +" Je enakovreden ukazu \"let IZRAZ\".\n" +" \n" +" Stanje končanja:\n" +" Vrne 1, če je IZRAZ enakovreden; sicer vrne 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Izvrši pogojni ukaz.\n" +" \n" +" Vrne stanje 0 ali 1, odvisno od vrednotenja pogojnega izraza IZRAZ.\n" +" expression EXPRESSION. Izrazi so sestavljeni iz istih osnov, ki so " +"uporabljajo\n" +" s strani vgrajene lupine `test' in se lahko spajajo s pomočjo " +"naslednjih\n" +" operatorjev:\n" +" \n" +" ( IZRAZ )\tVrne vrednost IZRAZA\n" +" ! IZRAZ\t\tPrav, če je IZRAZ napak; sicer vrne napak\n" +" IZRAZ1 && IZRAZ2\tPrav, če sta IZRAZ1 in IZRAZ2 prav; sicer vrne " +"napak\n" +" IZRAZ1 || IZRAZ2\tTPrav, če je IZRAZ1 ali IZRAZ2 prav; sicer vrne " +"napak\n" +" \n" +" Kadar se uporabita operatorja `==' in `!=', se niz desno od operatorja \n" +" uporabi kot vzorec in izvrši se ujemanje vzorcev. Kadar se uporabi \n" +" operator `=~', se niz desno od operatorja ujema kot logični izraz.\n" +" \n" +" Operatorja && in || ne vrednotita IZRAZ2, če IZRAZ1 zadošča za " +"določitev \n" +" vrednosti izraza.\n" +" \n" +" Stanje končanja:\n" +" 0 ali 1, odvisno od vrednosti IZRAZA." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Pogosta imena spremenljivk lupine in uporaba.\n" +" \n" +" BASH_VERSION\tPodatki o različici Bash.\n" +" CDPATH\tZ dvopičjem ločen seznam map za iskanje map,\n" +" \t\tdanih kot argumenti ukazu `cd'.\n" +" GLOBIGNORE\tZ dvopičjem ločen seznam vzorcev z opisom imen datotek,\n" +" \t\tki se jih ne upošteva pri razširitvi imena poti.\n" +" HISTFILE\tIme datoteke, kjer je shranjena vaša zgodovina ukazov.\n" +" HISTFILESIZE\tNajvečje število vrstic, ki jih ta datoteka lahko " +"vsebuje.\n" +" HISTSIZE\tNajvečje število vrstic zgodovine, do katerih izvajajoča\n" +" \t\tlupina lahko dostopa.\n" +" HOME\tCelotno ime poti do vaše prijavne mape.\n" +" HOSTNAME\tIme trenutnega gostitelja.\n" +" HOSTTYPE\tVrsta CPE, na katerem se ta različica Bash izvaja.\n" +" IGNOREEOF\tNadzoruje delovanje lupine ob prejemu znaka za konec\n" +" \t\tdatoteke kot edini vnos. Če je nastavljen, je vrednost število\n" +" \t\tznakov za konec datoteke, ki jih je mogoče videti naenkrat\n" +" \t\tv prazni vrstici, preden se lupina konča (privzeto 10).\n" +" \t\tKo je ponastavljen, znak za konec datoteke označuje konec vnosa.\n" +" MACHTYPE\tNiz, ki opiše trenutni sistem, na katerem se izvaja Bash.\n" +" MAILCHECK\tKako pogosto, v sekundah, Bash preveri za novo pošto.\n" +" MAILPATH\tZ dvopičjem ločen seznam imen datotek, za katere Bash\n" +" \t\tpreveri za novo pošto.\n" +" OSTYPE\tRazličica sistema Unix, na katerem se ta različica Bash izvaja.\n" +" PATH\tZ dvopičjem ločen seznam iskanih map pri iskanju ukazov.\n" +" PROMPT_COMMAND\tUkaz, ki se bo izvršil pred izpisom vsakega\n" +" \t\tglavnega poziva.\n" +" PS1\t\tPrvotni niz poziva.\n" +" PS2\t\tDrugotni niz poziva.\n" +" PWD\t\tPolno ime poti trenutne mape.\n" +" SHELLOPTS\tZ dvopičjem ločen seznam omogočenih možnosti lupine.\n" +" TERM\tIme trenutne vrste terminala.\n" +" TIMEFORMAT\tOblika izpisa za časovno statistiko, ki je prikazana\n" +" \t\ts pridržanim imenom `time'.\n" +" auto_resume\tNe-prazno pomeni, da je beseda ukaza, ki se neodvisno\n" +" \t\tpojavlja na črti, iskana prva na seznamu trenutno zaustavljenih\n" +" \t\tposlov. Če je najdena tam, se ta posel postavi v ospredje.\n" +" \t\tVrednost `exact' pomeni, da se mora beseda ukaza natančno\n" +" \t\tujemati z ukazom na seznamu končanih poslov.\n" +" \t\tVrednost `substring' pomeni, da se beseda ukaza mora ujemati\n" +" \t\ts podnizom posla. Vsaka druga vrednost pomeni,\n" +" \t\tda mora ukaz biti predpona končanega posla.\n" +" histchars\tZnaki, ki nadzorujejo razširitev zgodovine in hitro\n" +" \t\tzamenjavo. Prvi znak je znak zamenjave \n" +" \t\tzgodovine, običajno `!'. Drugi znak je znak \n" +" \t\t`hitre zamenjave', običajno `^'.\n" +" \t\tTretji znak je znak `opomba zgodovine', običajno `#'.\n" +" HISTIGNORE\tZ dvopičjem ločen seznam vzorcev, ki so uporabljeni \n" +" \t\tza odločanje, kateri ukazi naj se shranijo na seznam zgodovine.\n" + +#: builtins.c:1821 +#, fuzzy +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Doda mape skladu.\n" +" \n" +" Doda mapo na vrh sklada map ali pa zavrti sklad, da spremeni\n" +" nov vrh sklada v trenutno delovno mapo.\n" +" Če je brez argumentov, izmenja dve vrhnji mapi.\n" +" \n" +" Možnosti:\n" +" -n\tPrepreči običajno spremembo mape pri dodajanju map skladu,\n" +" \ttako da se obdela le sklad.\n" +" \n" +" Argumenti:\n" +" +N\tZavrti sklad, tako da je N-ta mapa (štetje z leve strani\n" +" \tseznama, prikazano z `dirs', začenši z nič) na vrhu.\n" +" \n" +" -N\tZavrti sklad, tako da je N-ta mapa (štetje z desne strani\n" +" \tseznama, prikazano z `dirs', začenši z nič) na vrhu.\n" +" \n" +" dir\tDoda DIR skladu mape na vrhu, kar jo spremeni v novo\n" +" \ttrenutno delovno mapo.\n" +" \n" +" Vgrajena lupina `dirs' prikaže sklad map.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložen neveljaven argument ali če\n" +" sprememba mape spodleti." + +#: builtins.c:1855 +#, fuzzy +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Odstrani mape sklada.\n" +" \n" +" Odstrani vnose sklada map. Če je brez argumentov, \n" +" odstrani vrhnjo mapo sklada in spremeni v novo vrhnjo mapo.\n" +" \n" +" Možnosti:\n" +" -n\tPrepreči običajno spremembo mape pri odstranjevanju map\n" +" \tsklada, tako da se obdela le sklad.\n" +" \n" +" Argumenti:\n" +" +N\tOdstrani N-ti vnos s štetjem z leve strani seznama,\n" +" \tprikazanega z `dirs', začenši z nič. Na primer:\n" +" \t`popd +0' odstrani prvo mapo, `popd +1' odstrani drugo.\n" +" \n" +" -N\tOdstrani N-ti vnos s štetjem z desne strani seznama,\n" +" \tprikazanega z `dirs', začenši z nič. Na primer:\n" +" \t`popd +0' odstrani zadnjo mapo, `popd +1' odstrani predzadnjo.\n" +" \n" +" Vgrajena lupina `dirs' prikaže sklad map.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložen neveljaven argument ali če\n" +" sprememba mape spodleti." + +#: builtins.c:1885 +#, fuzzy +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Prikaže sklad map.\n" +" \n" +" Prikaže seznam trenutno pomnjenih map. Mape najdejo \n" +" svojo pot na seznam z ukazom `pushd'; navzgor po seznamu\n" +" se lahko vrnete z ukazom `popd'.\n" +" \n" +" Možnosti:\n" +" -c\tpočisti sklad map z brisanjem vseh predmetov\n" +" -l\tne izpiši sorodnih map s predpono `~' v mojo domačo mapo\n" +" -p\tprikaži sklad map z enim vnosom v vrstici\n" +" -v\tizpiši sklad mape z enim vnosom v vrstici z določenim\n" +" \tpoložajem v skladu\n" +" \n" +" Argumenti:\n" +" +N\tPrikaže N-ti vnos s štetjem z leve strani seznama, prikazan\n" +" \ts pomočjo map, ko kličemo brez možnosti, začenši z nič.\n" +" \n" +" -N\tPrikaže N-ti vnos s štetjem z desne strani seznama, prikazan\n" +" \ts pomočjo map, ko kličemo brez možnosti, začenši z nič.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do napake." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Nastavi in ponastavi možnosti lupine.\n" +" \n" +" Spremeni nastavitev vsake možnosti lupine IME_MOŽNOSTI.\n" +" Če ni navedenih argumentov možnosti, navede vse možnosti\n" +" lupine z označbo, če so vsi nastavljeni ali ne.\n" +" \n" +" Možnosti:\n" +" -o\tomeji IMENA_MOŽNOSTI tem, ki so določeni za uporabo s `set -o'\n" +" -p\tprikaži vsako možnost lupine z navedbo stanja\n" +" -q\tprepreči izhod\n" +" -s\tomogoči (nastavi) vsako IME_MOŽNOSTI\n" +" -u\tonemogoči (ponastavi) vsako IME_MOŽNOSTI\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, če je IME_MOŽNOSTI omogočeno; neuspešno, če je\n" +" dana neveljavna možnost ali če je IME_MOŽNOSTI onemogočeno." + +#: builtins.c:1937 +#, fuzzy +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Oblikuje in prikaže ARGUMENTE pod nadzorom OBLIKE.\n" +" \n" +" Možnosti:\n" +" -v var\tdodeli izhod spremenljivki SPREMENLJIVKA namesto\n" +" \t\tprikaza na standardni izpis\n" +" \n" +" OBLIKA je niz znakov, ki vsebuje tri vrste predmetov: običajni znaki, \n" +" ki so preprosto kopirani na standardni izhod; zaporedja ubežnega " +"zaporedja, \n" +" ki so pretvorjena in kopirana na standardni izhod; in določila oblike, \n" +" od katerih vsako povzroči prikaz naslednjega zaporednega argumenta.\n" +" \n" +" Poleg določil standardne oblike, opisanih v printf(1) in printf(3), \n" +" printf tolmači:\n" +" \n" +" %b\trazširi ubežno zaporedje levih poševnic v ustreznem argumentu\n" +" %q\tnavedi argument na način, ki je lahko ponovno uporaben kot\n" +" \tvnos lupine\n" +" %(fmt)T izpiši niz datuma-časa, ki izhaja iz uporabe FMT-ja kot niza " +"oblike \n" +" za strftime(3)\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do " +"napake\n" +" branja ali dodelitve." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Navede, kako bodo argumenti dopolnjeni s pomočjo Readline.\n" +" \n" +" Za vsako IME navedi, kako bodo argumenti dopolnjeni. Če ni predloženih\n" +" možnosti, so obstoječe določitve dopolnjevanja prikazane na način, ki " +"jim\n" +" omogoča, da se ponovno uporabijo kot vnos.\n" +" \n" +" Možnosti:\n" +" -p\tprikaži obstoječe določitve dopolnjevanja v obliki za večkratno\n" +" \tuporabo\n" +" -r\todstrani določitev dopolnjevanja za vsako IME ali če IMENA\n" +" \tniso predložena, vse določitve dopolnjevanja\n" +" -D\tuveljavi dopolnjevanja in dejanja kot privzeta za ukaze brez\n" +" \tdoločenih dopolnjevanj\n" +" -E\tuveljavi dopolnjevanja in dejanja v \"praznih\" ukazih -- \n" +" \tposkus dopolnjevanja v prazni vrstici\n" +" \n" +" Ko se poskuša dopolnjevanje, se dejanja uveljavijo v takšnem\n" +" vrstnem redu, kot z velikimi črkami zgoraj navedene možnosti.\n" +" Možnost -D ima prednost pred -E.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost ali če pride\n" +" do napake." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Prikaže možne dopolnitve, odvisne od možnosti.\n" +" \n" +" Namenjen je za uporabo znotraj funkcije lupine za ustvarjanje možnih\n" +" dopolnitev. Če je izbirni argument BESEDE predložen, se ustvarijo\n" +" ujemanja proti BESEDI.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost ali če pride\n" +" do napake." + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Spremeni ali prikaže možnosti dopolnjevanja.\n" +" \n" +" Spremeni možnosti dopolnjevanja za vsako IME oz. trenutno izvedeno \n" +" dopolnitev, če IMENA niso predložena. Če ni danih MOŽNOSTI,\n" +" prikaže možnosti dopolnjevanja za vsako IME ali trenutno določitev\n" +" dopolnjevanja.\n" +" \n" +" Možnosti:\n" +" \t-o možnost\tNastavi možnost dopolnitve MOŽNOST za vsako IME\n" +" \t-D\t\tSpremeni možnosti za \"privzeto\" dopolnitev ukaza\n" +" \t-E\t\tSpremeni možnosti za \"prazno\" dopolnitev ukaza\n" +" \n" +" Uporaba `+o' namesto `-o' izklopi navedeno možnost.\n" +" \n" +" Argumenti:\n" +" \n" +" Vsako IME se nanaša na ukaz, za katerega mora že predhodno biti\n" +" določeno določilo dopolnjevanja z uporabo vgrajene lupine `complete'.\n" +" Če ni predloženih IMEN, mora compopt biti klican s strani funkcije, \n" +" ki trenutno ustvarja dopolnjevanja in možnosti za tega trenutno \n" +" izvajajočega ustvarjalnika dopolnjevanj se bodo spremenile.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost ali pa IME\n" +" nima določenega določila dopolnjevanja." + +#: builtins.c:2047 +#, fuzzy +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Prebere vrstice s standardnega vnosa v spremenljivko zabeleženega polja.\n" +" \n" +" Prebere vrstice iz standardnega vnosa v spremenljivko zabeleženega " +"polja \n" +" POLJE ali iz opisnika datotek FD, če je predložena možnost -u.\n" +" Spremenljivka MAPFILE je privzeto POLJE.\n" +" \n" +" Možnosti:\n" +" -n števec\tKopiraj največ vrstic ŠTEVCA. Če je ŠTEVEC 0, se kopirajo\n" +" \tvse vrstice.\n" +" -O izvor\tZačni dodeljevati POLJU pri kazalu IZVOR. Privzeto kazalo je " +"0.\n" +" -s števec \tZavrzi prve prebrane vrstice ŠTEVCA.\n" +" -t\t\tIz vsake prebrane vrstice odstrani vmesno novo vrstico.\n" +" -u fd\t\tBeri vrstice iz opisnika datotek FD namesto standardnega\n" +" \tvnosa.\n" +" -C povratni_klic\tOvrednoti POVRATNI_KLIC vsakič, ko so prebrane\n" +" \tvrstice DELOV.\n" +" -c del\tNavedi število vrstic, prebranih med vsakim klicem\n" +" \tPOVRATNEGA_KLICA.\n" +" \n" +" Argumenti:\n" +" POLJE\t\tIme spremenljivke polja za uporabo za podatke datotek\n" +" \n" +" Če je -C predložen brez -c, je privzet del 5000. Ko je POVRATNI_KLIC\n" +" ovrednoten, je predloženo kazalo naslednjega predmeta polja, ki bo\n" +" dodeljen in vrstica, ki bo dodeljena temu predmetu kot dodatni\n" +" argumenti.\n" +" \n" +" Če ni predloženo z izrecnim izvorom, bo mapfile počistil POLJE, preden\n" +" ji bo dodeljen.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost oz. je POLJE samo\n" +" za branje ali pa ni zabeleženo polje." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Prebere vrstice iz datoteke v spremenljivko polja.\n" +" \n" +" Je sopomenka za `mapfile'." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Avtorske pravice (C) 2011 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Vrne vsebino trenutnega klica podprograma.\n" +#~ " \n" +#~ " Brez EXPR vrne " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: opravilo %5ld (%s) v the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Neznan signal #" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Dovoljenje GPLv2+: GNU GPL različica 2 ali kasnejše \n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "prav" + +#~ msgid "false" +#~ msgstr "napak" + +#~ msgid "times" +#~ msgstr "krat" diff --git a/bash-5.1/po/sr.gmo b/bash-5.1/po/sr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..6e2fdf9297ec8709d998fb4d72dbb83ee47dbe9f Binary files /dev/null and b/bash-5.1/po/sr.gmo differ diff --git a/bash-5.1/po/sr.po b/bash-5.1/po/sr.po new file mode 100644 index 0000000000000000000000000000000000000000..a5d5efd600f681c355e23cce39b6eb5aa096c6c3 --- /dev/null +++ b/bash-5.1/po/sr.po @@ -0,0 +1,5951 @@ +# Serbian translation for bash. +# Copyright © 2020 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Мирослав Николић , 2014—2020. +msgid "" +msgstr "" +"Project-Id-Version: bash-5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2020-03-31 15:52+0200\n" +"Last-Translator: Мирослав Николић \n" +"Language-Team: Serbian <(nothing)>\n" +"Language: sr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Virtaal 0.7.1\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "лош индекс низа" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: уклањам атрибут упуте назива" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: не могу да претворим пописани низ у придружив" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: неисправан кључ придруживог низа" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: не могу да доделим у не-бројевни попис" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: мора користити индекс приликом додељивања придруживог низа" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: не могу да направим: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "баш_изврши_јуникс_наредбу: не могу да нађем мапу кључа за наредбу" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: први не-празан знак није \"" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "нема затварајућег „%c“ у %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: недостаје раздвојник двотачке" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: не могу да развежем" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "ширење заграде: не могу да доделим меморију за „%s“" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "ширење заграде: нисам успео да доделим меморију за %u елемента" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "ширење заграде: нисам успео да доделим меморију за „%s“" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s“: неисправан назив алијаса" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "уређивање реда није укључено" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s“: неисправан назив мапе кључа" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: не могу да читам: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s“: непознат назив функције" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "„%s“ није привезано ни за један кључ.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "„%s“ не може бити призвано путем" + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: не могу да развежем" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "број петљи" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "једино има смисла у петљи „for“, „while“, или „until“" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Даје садржај текућег позива подрутине.\n" +" \n" +" Без ИЗРАЗА, даје „$ред $назив_датотеке“. Са ИЗРАЗОМ, даје\n" +" „$ред $подрутина $назив_датотеке“; овај додатни податак може бити\n" +" коришћен за обезбеђивање праћења спремника.\n" +" \n" +" Вредност ИЗРАЗА показује колико кадрова позива да се иде уназад пре\n" +" текућег; први кадар је кадар 0.\n" +" \n" +" Излазно стање:\n" +" Даје 0 осим ако шкољка не извршава функцију шкољке или ИЗРАЗ\n" +" није исправан." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "„HOME“ није подешено" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "превише аргумената" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "ништаван директоријум" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "„OLDPWD“ није подешено" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "%d. ред:" + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "упозорење:" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: употреба:" + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: опција захтева аргумент" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: потребан је бројевни аргумент" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: не постоји" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: неисправна опција" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: неисправан назив опције" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s“: није исправан одредник" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "неисправан октални број" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "неисправан хексадецимални број" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "неисправан број" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: неисправна одредба сигнала" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s“: није пиб или исправна одредба посла" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: променљива само за читање" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: „%s“ је ван опсега" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "аргумент" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "„%s“ је ван опсега" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: нема таквог посла" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: нема управљања послом" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "нема управљања послом" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: ограничено" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "ограничено" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: није уграђеност шкољке" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "грешка писања: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "грешка подешавања особина терминала: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "грешка добављања особина терминала: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: грешка довлачења текућег директоријума: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: нејасна одредба посла" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "помоћ није доступна у овом издању" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: не могу да расподесим: „%s“ је само за читање" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: не могу да расподесим" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: неисправан назив радње" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: нема одредбе довршавања" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "упозорење: опција „-F“ можда неће радити како сте очекивали" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "упозорење: опција „-C“ можда неће радити како сте очекивали" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "тренутно не обавља функцију довршавања" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "може бити коришћено једино у функцији" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: променљива упуте не може бити низ" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: самоупућивање променљиве упуте назива није дозвољено" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: кружна упута назива" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "%s: неисправан назив променљиве за упуту назива" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "не можете користити „-f“ да направите функције" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: функција само за читање" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: додела низа цитираног споја је застарела" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: не могу да уништим променљиве низа на овај начин" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: не могу да претворим придруживи низ у пописани" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "променљиво учитавање није доступно" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "не могу да отворим дељени предмет „%s“: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "не могу да нађем „%s“ у дељеном предмету „%s“: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: није динамички учитано" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "функција учитавања за „%s“ није успела (%d): није учитано" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: није динамички учитано" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: не могу да обришем: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: је директоријум" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: није обична датотека" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: датотека је превелика" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: не могу да извршим бинарну датотеку" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: не могу да извршим: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "одјави\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "није шкољка пријављивања: користите „exit“" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Има заустављених послова.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Има покренутих послова.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "нема такве наредбе" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "одредба историјата" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: не могу да отворим привремену датотеку: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "текуће" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "посао „%d“ је започет без управљања послом" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: неисправна опција -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: опција захтева аргумент -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "хеширање је искључено" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: хеш табела је празна\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "покреће\tнаредбу\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Наредбе шкољке које одговарају кључној речи `" +msgstr[1] "Наредбе шкољке које одговарају кључним речима `" +msgstr[2] "Наредбе шкољке које одговарају кључним речима `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"нема тема помоћи које одговарају „%s“. Покушајте „help help“ или „man -k " +"%s“ или „info %s“." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: не могу да отворим: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Ове наредбе шкољке су одређене изнутра. Укуцајте „help“ за овај списак.\n" +"Укуцајте „help name“ да сазнате више о функцији „name“.\n" +"Користите „info bash“ да сазнате више о шкољци уопште.\n" +"Користите „man -k“ или „info“ да сазнате више о наредбама ван списка.\n" +"\n" +"Звездица (*) поред назива значи да је наредба искључена.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "не могу користити више од једног „-anrw“" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "положај историјата" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: неисправна ознака времена" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: није успело ширење историјата" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: није успело „inlib“" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "нису допуштене друге опције уз „-x“" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: аргументи морају бити процеси или ИБ-ови посла" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Непозната грешка" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "очекиван је израз" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: није пописани низ" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: неисправна одредба описника датотеке" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: неисправан описник датотеке: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: неисправан број реда" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: неисправно порекло низа" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: неисправна количина опозива" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "празан назив променљиве низа" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "потребна је подршка променљиве низа" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s“: недостаје знак записа" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: неисправна одредба записа времена" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c“: неисправан знак записа" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "упозорење: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "проблем обраде записа: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "недостаје хексадецимална цифра за \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "недостаје цифра уникода за \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "нема другог директоријума" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: неисправан аргумент" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<нема текућег директоријума>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "празан спремник директоријума" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "попис спремника директоријума" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Приказује списак тренутно запамћених директоријума. Директоријуми\n" +" налазе свој пут на списку наредбом „pushd“; можете да се\n" +" вратите назад на списак наредбом „popd“.\n" +" \n" +" Опције:\n" +" -c\tчисти спремник директоријума брисањем свих елемената\n" +" -l\tне исписује тилдом префиксована издања директоријума\n" +" \t који се односе на ваш лични директоријум\n" +" -p\tисписује спремник директоријума са једним уносом у реду\n" +" -v\tисписује спремник директоријума са једним уносом у реду\n" +" \t са префиксом његовог положаја у спремнику\n" +" \n" +" Аргументи:\n" +" +N\tПриказује н-ти унос бројећи с лева на списку приказаном\n" +" \t директоријумима када се призову опцијама, почевши од нуле.\n" +" \n" +" -N\tПриказује н-ти унос почевши с десна на списку приказаном\n" +"\t директоријумима када се призову без опција, почевши од нуле." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Додаје директоријум на врх спремника директоријума, или заокреће\n" +" спремник, чинећи нови први спремника текућим радним директоријумом.\n" +" Без аргумената, замењује прва два директоријума.\n" +" \n" +" Опције:\n" +" -n\tПотискује нормалну замену директоријума приликом додавања\n" +" \t директоријума у спремник, тако да се ради само са спремником.\n" +" \n" +" Аргументи:\n" +" +N\tЗаокреће спремник тако да н-ти директоријум (бројећи\n" +" \t с лева на списку кога приказује „dirs“, почевши нулом)\n" +" \t буде на врху.\n" +" \n" +" -N\tЗаокреће спремник тако да н-ти директоријум (бројећи\n" +" \t с десна на списку кога приказује „dirs“, почевши нулом)\n" +" \t буде на врху.\n" +" \n" +" dir\tДодаје ДИРЕКТОРИЈУМ у спремник директоријума на врху,\n" +" начинивши га новим текућим радним директоријумом.\n" +" \n" +" Уграђено „dirs“ приказује спремник директоријума." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Уклања уносе из спремника директоријума. Без аргумената, уклања први\n" +" директоријум из спремника, и пребацује на нови први директоријум.\n" +" \n" +" Опције:\n" +" -n\tПотискује нормалну замену директоријума приликом уклањања\n" +" \t директоријума из спремника, тако да се ради само са " +"спремником.\n" +" \n" +" Аргументи:\n" +" +N\tУклања н-ти унос бројећи с лева на списку кога приказује\n" +" \t „dirs“, почевши од нуле. На пример: „popd +0“ уклања\n" +" \t први директоријум, „popd +1“ други.\n" +" \n" +" -N\tУклања н-ти унос бројећи с десна на списку кога приказује\n" +" \t „dirs“, почевши од нуле. На пример: „popd -0“ уклања\n" +" \t последњи директоријум, „popd -1“ претпоследњи.\n" +" \n" +" Уграђено „dirs“ приказује спремник директоријума." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: неисправна одредба временског истека" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "грешка читања: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "могу једино да „испишем“ из функције или изворног списа" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "не могу истовремено да расподесим функцију и променљиву" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: није променљива низа" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: није функција" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: не могу да извезем" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "број помака" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "не могу истовремено да подесим и да расподесим опције шкољке" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: неисправан назив опције шкољке" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "потребан је аргумент назива датотеке" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: нисам пронашао датотеку" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "не могу да обуставим" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "не могу да обуставим шкољку пријављивања" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s је измењен у псеудоним „%s“\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "„%s“ је кључна реч шкољке\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s: је функција\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s: је нарочита уграђеност шкољке\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s: јесте уграђеност шкољке\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "„%s“ јесте „%s“\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "„%s“ је хеширано (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: неисправан аргумент ограничења" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c“: лоша наредба" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: не могу да добавим ограничење: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "ограничење" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: не могу да изменим ограничење: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "октални број" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c“: неисправан оператер симболичког режима" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c“: неисправан знак симболичког режима" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " ред " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "последња наредба: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Прекидам..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "ПОДАЦИ: " + +#: error.c:462 +msgid "unknown command error" +msgstr "непозната грешка наредбе" + +#: error.c:463 +msgid "bad command type" +msgstr "лоша врста наредбе" + +#: error.c:464 +msgid "bad connector" +msgstr "лош спајач" + +#: error.c:465 +msgid "bad jump" +msgstr "лош скок" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: несвезана променљива" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aистекло је време чекајући на улаз: сам се одјављујем\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "не могу да преусмерим стандардни улаз из „/dev/null:“: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "ЗАПИСВРЕМЕНА: „%c“: неисправан знак записа" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "изврши_копроц: копроцес [%d:%s] још увек постоји" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "грешка спојке" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "процена: премашен је највећи ниво угнежђивања процене (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: премашен је највећи ниво угнежђивања извора (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: премашен је највећи ниво угнежђивања функције (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: ограничено: не могу да наведем / у називима наредби" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: нема такве наредбе" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: лош тумач" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: не могу да извршим бинарну датотеку: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s“: јесте посебна уграђеност" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "не могу да удвостручим „fd %d“ у „fd %d“" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "премашен је ниво дубачења израза" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "недоток спремника дубачења" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "садржајна грешка у изразу" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "покушано је додељивање у не-променљиву" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "садржајна грешка у додели променљиве" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "дељење 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "грешка: лош симбол доделе израза" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "„:“ је очекивано за условни израз" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "изложилац је мањи од 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "одредник је очекиван након пре-увећања или пре-умањења" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "недостаје )" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "садржајна грешка: очекиван је операнд" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "садржајна грешка: неисправан аритметички оператор" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (симбол грешке је „%s“)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "неисправна аритметичка основа" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: неисправан број реда" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "вредност је превише велика за основу" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: грешка израза\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: не могу да приступим родитељском директоријуму" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "не могу да поништим режим без-кашњења за фд „%d“" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "не могу да доделим нови описник датотеке за улаз баша из фд „%d“" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: већ постоји међумеморија за нови фд „%d“" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: „pgrp“ спојка" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "исцепљени пиб „%d“ се јавља у покренутом послу „%d“" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "бришем заустављени посао „%d“ са групом процеса %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: пиб %5ld (%s) је означен да је још жив" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: нема таквог пиб-а" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Сигнал %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Урађен" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Заустављен" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Заустављен(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Покренут" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Урађен(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Изађи из „%d“" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Непознато стање" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(језгрени избачај)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "сетпгиб порода (%ld у %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: пиб %ld није пород ове шкољке" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Нема записа о процесу %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: посао „%d“ је заустављен" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: нема таквог посла" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: посао је завршио" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: посао „%dд је већ у позадини" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: укључујем „WNOHANG“ да избегнем неодређени блок" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: ред %d:" + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (језгрени избачај)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(„wd“ сада: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: није успело „getpgrp“" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: нема контроле посла у позадини" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: дисциплина реда" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "не могу да подесим групу процеса терминала (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "нема управљања послом у овој шкољци" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: тврдња није успела: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: тврдња је лоше изведена\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "непознато" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: блок на слободном списку је преписан" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: позвана са већ ослобођеним аргументом блока" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: позвана са недодељеним аргументом блока" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: откривена је недовољност тока; mh_n-бајтова је ван опсега" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: откривена је недовољност тока; mh_n-бајтова је ван опсега" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: почетна и крајња величина дела се разликују" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: позвана са недодељеним аргументом блока" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: откривена је недовољност тока; mh_n-бајтова је ван опсега" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: откривена је недовољност тока; mh_n-бајтова је ван опсега" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: почетна и крајња величина дела се разликују" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: табела доделе је пуна са „FIND_ALLOC“?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: „%p“ је већ у табели као додељено?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: „%p“ је већ у табели као слободно?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "неисправна основа" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: непознат домаћин" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: неисправна услуга" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: лоша одредба путање мреже" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "радње мреже нису подржане" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: не могу да изменим језик (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: не могу да изменим језик (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: не могу да изменим језик (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: не могу да изменим језик (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Имате пошту у $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Имате нову пошту у $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Пошта у „%s“ је прочитана\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "садржајна грешка: потребан је аритметички израз" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "садржајна грешка: није очекивано „;“" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "садржајна грешка: „((%s))“" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: лоша врста упутства „%d“" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "овде-документ у %d. реду је ограничен крајем-датотеке (тражи се „%s“)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: упутсво преусмерења „%d“ је ван опсега" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: величина_реда_улаза_шкољке (%zu) је премашила НАЈВЕЋУ_ВЕЛИЧИНУ " +"(%lu): ред је скраћен" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "премашен је највећи број „овде-документ“" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "неочекивани крај датотеке приликом тражења поклапања „%c“" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "неочекивани крај датотеке приликом тражења „]]“" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "садржајна грешка у условном изразу: неочекивани симбол „%s“" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "садржајна грешка у условном изразу" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "неочекивани симбол „%s“, очекивана је )" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "очекивана је )" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "неочекивани аргумент „%s“ условном једночланом оператору" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "неочекивани аргумент условном једночланом оператору" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "неочекивани симбол „%s“, очекиван је условни двочлани оператор" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "очекиван је условни двочлани оператор" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "неочекивани аргумент „%s“ условном двочланом оператору" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "неочекивани аргумент условном двочланом оператору" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "неочекивани симбол „%c“ у условној наредби" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "неочекивани симбол „%s“ у условној наредби" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "неочекивани симбол „%d“ у условној наредби" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "садржајна грешка близу неочекиваног симбола „%s“" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "садржајна грешка близу „%s“" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "садржајна грешка: неочекивани крај датотеке" + +#: parse.y:6365 +msgid "syntax error" +msgstr "садржајна грешка" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Користите „%s“ да напустите шкољку.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "неочекивани крај датотеке приликом тражења поклапајуће )" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "довршавање: нисам нашао функцију „%s“" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: могуће понављање покушаја" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: НИШТАВНА ОДРЕДБА_ДОВРШАВАЊА" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: лош спајач „%d“" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: неисправан описник датотеке" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: НИШТАВАН указивач датотеке" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: „%c“: неисправан знак записа" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "описник датотеке је ван опсега" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: нејасно преусмерење" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: не могу да препишем постојећу датотеку" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ограничено: не могу да преусмерим излаз" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "не могу да направим привремену датотеку за документ-овде: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: не могу да доделим фд променљивој" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "„/dev/(tcp|udp)/домаћин/прикључник“ није подржано без умрежавања" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "грешка преусмерења: не могу да удвостручим фд" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "не могу да нађем „/tmp“, направите га!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "„/tmp“ мора бити исправан назив директоријума" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "режим уредног исписа је занемарен у међудејственим шкољкама" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: неисправна опција" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "не могу да подесим јиб на %d: стварни јиб %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "не могу да подесим гиб на %d: стварни гиб %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "не могу да покренем прочишћавача; режим прочишћавања је искључен" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: је директоријум" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Немам назив!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "Гну баш, издање %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Употреба:\t%s [Гнуова дуга опција] [опција] ...\n" +" \t%s [Гнуова дуга опција] [опција] датотека-списа ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Гнуове дуге опције:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Опције шкољке:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t„-ilrsD“ или наредба „-c“ или -O шопц_опција\t\t(призивање само)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t„-%s“ или опција „-o“\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Укуцајте „%s -c \"help set\"“ за више података о опцијама шкољке.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Укуцајте „%s -c help“ за више података о уграђеним наредбама шкољке.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Користите наредбу „bashbug“ да известите о грешкама.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Матична страница баша: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Општа помоћ коришћења Гну софтвера: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: неисправна операција" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Нетачан сигнал" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Обустави" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Прекини" + +#: siglist.c:58 +msgid "Quit" +msgstr "Изађи" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Неисправна инструкција" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Прати/ухвати БПТ" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Инструкција „ABORT“" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Инструкција „EMT“" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Изузетак покретног зареза" + +#: siglist.c:86 +msgid "Killed" +msgstr "Убијен" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Грешка сабирнице" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Неуспех сегментације" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Лош системски позив" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Сломљена спојка" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Аларм" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Окончано" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Хитан УИ услов" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Заустављен (сигнал)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Настави" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Пород је преминуо или заустављен" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Заустављен (улаз конзоле)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Заустављен (излаз конзоле)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "Спреман на У/И" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Ограничење процесора" + +#: siglist.c:154 +msgid "File limit" +msgstr "Ограничење датотеке" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Аларм (виртуелни)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Аларм (профил)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Промењени прозор" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Закључавање снимка" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Кориснички сигнал 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Кориснички сигнал 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Улазни ХФТ подаци на чекању" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "неизбежан пад напајања" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "неизбежан пад система" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "пребацује процес на други процесор" + +#: siglist.c:198 +msgid "programming error" +msgstr "грешка програмирања" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Осигуран је режим ХФТ праћења" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Понови је испраћен режим ХФТ праћења" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "Низ ХФТ звука је завршен" + +#: siglist.c:214 +msgid "Information request" +msgstr "Захтев за подацима" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Непознат сигнал #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "лоша замена: нема затварајуће „%s“ у „%s“" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: не могу да доделим списак члану низа" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "не могу да начиним спојку за замену процеса" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "не могу да начиним пород за замену процеса" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "не могу да отворим именовану спојку „%s“ за читање" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "не могу да отворим именовану спојку „%s“ за писање" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "не могу да удвостручим именовану спојку „%s“ као фд %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "замена наредбе: занемарих ништавни бајт у улазу" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "не могу да начиним спојку за замену наредбе" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "не могу да начиним пород за замену наредбе" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: не могу да удвостручим спојку као фд 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: неисправан назив променљиве за упуту назива" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: неисправно посредно ширење" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: неисправан назив променљиве" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: параметар није подешен" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: параметар је ништаван или није подешен" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: израз подниске < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: лоша замена" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: не могу дадоделим на овај начин" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "будућа издања шкољке ће приморати процену као аритметичку замену" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "лоша замена: нема затварајућег „`“ у „%s“" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "нема поклапања: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "очекиван је аргумент" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: очекиван је израз целог броја" + +#: test.c:265 +msgid "`)' expected" +msgstr "очекивана је )" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "очекивана је ), а пронађена %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: очекиван је двочлани оператор" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: очекиван је једночлани оператор" + +#: test.c:881 +msgid "missing `]'" +msgstr "недостаје ]" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "садржајна грешка: није очекивано „;“" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "неисправан сигнални број" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "руковалац изузетком: премашен је највећи ниво руковаоца изузецима (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: лоша вредност у „trap_list[%d]“: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: руковалац сигналом је „SIG_DFL“, поново шаљем %d (%s) " +"мени самом" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: лош сигнал %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "грешка увоза одреднице функције за „%s“" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "ниво шкољке (%d) је превисок, поново постављам на 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: нема садржаја функције на текућем досегу" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: вредности не може бити додељена вредност" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: додељујем цео број упути назива" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variable: нема садржаја функције на текућем досегу" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s има ништавну ниску извоза" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "неисправан знак %d у нисци извоза за „%s“" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "нема = у нисци извоза за „%s“" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: глава променљивих шкољке није садржајност функције" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: нема садржаја општих променљивих" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: глава променљивих шкољке није привремени досег окружења" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: не могу да отворим као ДАТОТЕКУ" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: неисправна вредност за описник праћења датотеке" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: вреднсот сагласности је ван опсега" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Ауторска права (C) 2012 Задужбина слободног софтвера, Доо." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Дозвола ОЈЛи3+: Гнуова ОЈЛ издање 3 или касније \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "Гну баш, издање %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Ово је слободан софтвер; слободни сте да га мењате и да га расподељујете." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Нема НИКАКВЕ ГАРАНЦИЈЕ у оквирима дозвољеним законом." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: не могу да доделим %lu бајта (%lu бајта је додељено)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: не могу да доделим %lu бајта" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: не могу да доделим %lu бајта (%lu бајта је додељено)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: не могу да доделим %lu бајта" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [назив[=вредност] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] назив [назив ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m мапа кључа] [-f датотека] [-q назив] [-u назив] [-r низ " +"кључа] [-x низ кључа:наредба-шкољке] [низ кључа:функција-читањареда или " +"наредба-читањареда]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [уграђеност-шкољке [аргумент ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [израз]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [дир]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [арг ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [назив[=вредност] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] назив[=вредност] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [опција] назив[=вредност] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [арг ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [арг ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f датотека] [назив ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [арг ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts ниска_опција назив [арг]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a назив] [наредба [аргументи ...]] [преусмерење ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e е-назив] [-lnr] [прво] [последње] или fc -s [пут=реп] [наредба]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [одредба_посла ...]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [одредба_посла ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p путања] [-dt] [назив ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [шаблон ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d померај] [n] или history -anrw [датотека] или history -ps " +"arg [аргумент...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [одредба_посла ...] или jobs -x наредба [аргументи]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [одредба_посла ... | пид ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s одредба-сигнала | -n бр.сигнала | -sigspec] пиб | одредба_посла ... " +"или kill -l [одредба_посла]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [аргумент ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a низ] [-d ограничи] [-i текст] [-n н-знак] [-N н-знак] [-p " +"упит] [-t временски рок] [-u фд] [назив ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o назив-опције] [--] [арг ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [назив ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [назив[=вредност] ...] или export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [назив[=вредност] ...] или readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source датотека [аргументи]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". датотека [аргументи]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [израз]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ арг... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[арг] одредба_сигнала ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] назив [назив ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [ограничење]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [режим]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [иб ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [пиб ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for НАЗИВ [у РЕЧИМА ... ] ; do НАРЕДБЕ; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( израз1; израз2; израз3 )); do НАРЕДБЕ; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select НАЗИВ [у РЕЧИМА ... ;] do НАРЕДБЕ; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] спојни_ред" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case РЕЧ у [ШАБЛОН [| ШАБЛОН]...) НАРЕДБЕ ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if НАРЕДБЕ; then НАРЕДБЕ; [ elif НАРЕДБЕ; then НАРЕДБЕ; ]... [ else " +"НАРЕДБЕ; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while НАРЕДБЕ; do НАРЕДБЕ; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until НАРЕДБЕ; do НАРЕДБЕ; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [НАЗИВ] наредба [преусмерења]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { НАРЕДБЕ ; } или name () { НАРЕДБЕ ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ НАРЕДБЕ ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( израз ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ израз ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables — Називи и значења неких променљивих шкољке" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | дир]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [називопције ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v променљива] format [аргументи]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o опција] [-A радња] [-G " +"општапутања] [-W списакречи] [-F функција] [-C наредба] [-X путањауслова] [-" +"P префикс] [-S суфикс] [назив ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o опција] [-A радња] [-G општапутања] [-W " +"списакречи] [-F функција] [-C наредба] [-X путањауслова] [-P префикс] [-S " +"суфикс] [реч]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o опција] [-DEI] [назив ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d раздвој] [-n број] [-O порекло] [-s број] [-t] [-u фд] [-C " +"опозив] [-c количина] [низ]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d гранич] [-n број] [-O порекло] [-s број] [-t] [-u фд] [-C " +"опозив] [-c количина] [низ]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Одређује или приказује псеудониме.\n" +" \n" +" Без аргумената, „alias“ исписује списак псеудонима у поново\n" +" употрбљивом облику „alias НАЗИВ=ВРЕДНОСТ“ на стандардном излазу.\n" +" \n" +" У супротном, псеудоним се одређује за сваки НАЗИВ чија ВРЕДНОСТ је " +"дата.\n" +" Претходећи размак у ВРЕДНОСТИ доводи до тога да следећа реч бива\n" +" проверена за заменом псеудонима када је псеудоним раширен.\n" +" \n" +" Опције:\n" +" -p\tисписује све одређене псеудониме у поново употребљивом облику\n" +" \n" +" Излазно стање:\n" +" „alias“ даје тачност осим ако је достављен НАЗИВ за који ниједан\n" +" псеудоним није одређен." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Уклања сваки НАЗИВ са списка одређених псеудонима.\n" +" \n" +" Опције:\n" +" -a\tуклања све одреднице псеудонима\n" +" \n" +" Резултат је успешан осим ако НАЗИВ није постојећи псеудоним." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Подешава свезе тастера читања реда и променљиве.\n" +" \n" +" Повезује низ тастера ка функцији читања реда или макроу, или подешава\n" +" променљиву читања реда. Синтакса не-опционог аргумента је иста као и\n" +" она која се налази у „~/.inputrc“, али мора бити прослеђена као један\n" +" аргумент: нпр., bind „\"\\C-x\\C-r\": re-read-init-file“.\n" +" \n" +" Опције:\n" +" -m мапа тастера Користи МАПУ_ТАСТЕРА као мапу тастера " +"за трајање ове\n" +" наредбе. Прихватљиви називи мапе " +"тастера су: „emacs,\n" +" emacs-standard, emacs-meta, emacs-" +"ctlx, vi, vi-move,\n" +" vi-command, и vi-insert“.\n" +" -l Исписује називе функција.\n" +" -P Исписује називе функција и свезе.\n" +" -p Испсиује функције и свезе у облику " +"који може бити поново\n" +" коришћен као улаз.\n" +" -S Исписује низове тастера који призивају " +"макрое и њихове вредности\n" +" -s Исписује низове тастера који призивају " +"макрое и њихове вредности\n" +" у облику који може бити поново " +"коришћен као улаз.\n" +" -V Исписује називе и вредности " +"променљивих\n" +" -v Исписује називе и вредности " +"променљивих у облику који може бити\n" +" поново коришћен као улаз.\n" +" -q назив-функције Пропитује о томе који тастери " +"призивају именовану функцију.\n" +" -u назив-функције Развезује све тастере који су " +"привезани за именовану функцију.\n" +" -r низ тастера Укалања свезу за НИЗ_ТАСТЕРА.\n" +" -f назив датотеке Чита свезе тастера из " +"НАЗИВА_ДАТОТЕКЕ.\n" +" -x низ_тастера:наредба-шкољке Доводи до извршавања НАРЕДБЕ-ШКОЉКЕ " +"приликом уноса\n" +" \t\t\t НИЗА_ТАСТЕРА.\n" +" -X Исписује свезе низова тастера са -x и " +"придружене наредбе у облику\n" +" који може бити поново коришћен као " +"улаз.\n" +" \n" +" Излазно стање:\n" +" „bind“ даје 0 осим ако није дата непозната опција или ако не дође до " +"грешке." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Излазне петље „for“, „while“, или „until“.\n" +" \n" +" Излази из петље FOR, WHILE или UNTIL. Ако је наведено N, слама N " +"затварајућих\n" +" петљи.\n" +" \n" +" Излазно стање:\n" +" Излазно стање је 0 осим ако N није веће или једнако 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Наставља петље „for“, „while“, или „until“.\n" +" \n" +" Наставља следеће понављање затварајуће петље FOR, WHILE или UNTIL.\n" +" Ако је наведено N, наставља од N-те затварајуће петље.\n" +" \n" +" Излазно стање:\n" +" Излазно стање је 0 осим ако N није веће или једнако 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Извршава уграђености шкољке.\n" +" \n" +" Извршава УГРАЂЕНОСТ-ШКОЉКЕ са аргументима АРГ-и без обављања тражења\n" +" наредбе. Ово је корисно када желите поново да примените уграђеност\n" +" шкољке као функцију шкољке, али морате да извршите уграђеност у " +"функцији.\n" +" \n" +" Излазно стање:\n" +" Даје излазно стање УГРАЂЕНОСТИ-ШКОЉКЕ, или нетачност ако УГРАЂЕНОСТ-" +"ШКОЉКЕ\n" +" није уграђеност шкољке." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Даје садржај текућег позива подрутине.\n" +" \n" +" Без ИЗРАЗА, даје „$ред $назив_датотеке“. Са ИЗРАЗОМ, даје\n" +" „$ред $подрутина $назив_датотеке“; овај додатни податак може бити\n" +" коришћен за обезбеђивање праћења спремника.\n" +" \n" +" Вредност ИЗРАЗА показује колико кадрова позива да се иде уназад пре\n" +" текућег; први кадар је кадар 0.\n" +" \n" +" Излазно стање:\n" +" Даје 0 осим ако шкољка не извршава функцију шкољке или ИЗРАЗ\n" +" није исправан." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Мења радни директоријум шкољке.\n" +" \n" +" Мења текући директоријум у ДИР. Основни ДИР је вредност променљиве\n" +" шкољке „ЛИЧНО“.\n" +" \n" +" Променљива „ЦДПУТАЊА“ одређује путању претраге за директоријум који " +"садржи\n" +" ДИР. Заменски називи директоријума у ЦДПУТАЊИ су раздвојени двотачком " +"(:).\n" +" Назив ништавног директоријума је исти као текући директоријум. Ако ДИР " +"почиње\n" +" косом цртом (/), тада се ЦДПУТАЊА не користи.\n" +" \n" +" Ако се не нађе директоријум, а опција шкољке „cdable_vars“ је подешена,\n" +" сматра се да је реч назив променљиве. Ако та променљива има вредност,\n" +" њена вредност се користи за ДИР.\n" +" \n" +" Опције:\n" +" -L\tприморава праћење симболичких веза: решава симболичке везе у\n" +" ДИР-у након обраде примерака „..“\n" +" -P\tкористи физичку структуру директоријума без праћења симболичких\n" +" веза: решава симболичке везе у ДИР-у пре обраде3 примерака " +"„..“\n" +" -e\tако је достављена опција „-P“, а текући радни директоријум не\n" +" може бити успешно одређен, излази са не-нултим стањем\n" +" -@ на системима који подржавају, представља датотеку са " +"проширеним\n" +" особинама као директоријум који садржи особине датотеке\n" +" \n" +" Основно је да прати симболичке везе, као да је наведено „-L“.\n" +" „..“ се обрађује уклањањем претходног састојка назива путање назад на\n" +" косу цтрицу или на почетак ДИР-а.\n" +" \n" +" Излазно стање:\n" +" Даје 0 ако је директоријум измењен, и ако је $PWD успешно подешено када " +"је\n" +" коришћено „-P“; у супротном вредност различиту од нуле." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Исписује назив текућег радног директоријума.\n" +" \n" +" Опције:\n" +" -L\tисписује вредност наредбе $PWD ако именује текући радни\n" +" директоријум\n" +" -P\tисписује физички директоријум, без симболичких веза\n" +" \n" +" По основи, „pwd“ се понаша као да је наведено „-L“.\n" +" \n" +" Излазно стање:\n" +" Даје 0 осим ако није дата неисправна опција или текући директоријум\n" +" не може бити прочитан." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Ништавна наредба.\n" +" \n" +" Нема дејства; наредба не ради ништа.\n" +" \n" +" Излазно стање:\n" +" Увек успешна." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Даје успешан резултат.\n" +" \n" +" Излазно стање:\n" +" Увек успешно." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Даје неуспешан резултат.\n" +" \n" +" Излазно стање:\n" +" Увек неуспешно." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Извршава једноставну наредбу или приказује податке о наредбама.\n" +" \n" +" Покреће НАРЕДБУ са АРГУМЕНТИМА потискујући тражење функције шкољке, или\n" +" приказује податке о наведеним НАРЕДБАМА. Може да се користи за " +"позивање\n" +" наредби на диску када постоји функција са истим називом.\n" +" \n" +" Опције:\n" +" -p користи основну вредност за ПУТАЊУ којом се осигурава налажење\n" +" свих стандардних помагала\n" +" -v исписује опис НАРЕДБЕ слично уграђености „type“\n" +" -V исписује опширнији опис сваке НАРЕДБЕ\n" +" \n" +" Излазно стање:\n" +" Даје излазно стање НАРЕДБЕ, или неуспех ако се НАРЕДБА не пронађе." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Подешава вредности и особине променљиве.\n" +" \n" +" Објављује променљиве и даје им особине. Ако нису дати НАЗИВИ,\n" +" приказује особине и вредности свих променљивих.\n" +" \n" +" Опције:\n" +" -f\tограничава радњу или приказ називима и одредницама функције\n" +" -F\tограничава приказ само називима функција (плус број реда и\n" +" изворну датотеку приликом прочишћавања)\n" +" -g\tствара опште променљиве када се користи у функцији шкољке;\n" +" у супротном се занемарује\n" +" -p\tприказује особине и вредност сваког НАЗИВА\n" +" \n" +" Опције које подешавају особине:\n" +" -a\tда учини НАЗИВЕ пописаним низовима (ако је подржано)\n" +" -A\tда учини НАЗИВЕ придруживим низовима (ако је подржано)\n" +" -i\tда учини да НАЗИВИ имају особину „integer“ (целог броја)\n" +" -l\tда претвори НАЗИВЕ у мала слова при додели\n" +" -n\tчини НАЗИВ упутом ка променљивој именованој својом вредношћу\n" +" -r\tда учини НАЗИВЕ само за читање\n" +" -t\tда учини да НАЗИВИ имају особину „trace“ (прати)\n" +" -u\tда претвори НАЗИВЕ у велика слова при додели\n" +" -x\tда уради извоз НАЗИВА\n" +" \n" +" Употреба + уместо - искључује дату особину.\n" +" \n" +" Променљиве са особином целог броја имају аритметичку процену (видите\n" +" наредбу „let“) обављену када се променљивој додели вредност.\n" +" \n" +" Када се користи у функцији, „declare“ чини НАЗИВЕ месним, као наредбом\n" +" „local“. Опција „-g“ потискује ово понашање.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или " +"ако\n" +" не дође до грешке доделе променљиве." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Подешава вредности и атрибуте променљиве.\n" +" \n" +" Синоним за „declare“. Погледајте „help declare“." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Одређује месне променљиве.\n" +" \n" +" Ствара месну променљиву звану НАЗИВ, и даје јој ВРЕДНОСТ. ОПЦИЈА може\n" +" бити свака опција коју прихвати „declare“.\n" +" \n" +" Месне променљиве могу бити коришћене једино у функцији; виде их једино\n" +" функције у којима су одређене и уњиховим породима.\n" +" \n" +" Излазно стање:\n" +" Резултат је позитиван осим ако се не достави неисправна опција, ако не " +"дође\n" +" до грешке додељивања променљиве, или ако шкољка не извршава функцију." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Пише аргументе на стандардни излаз.\n" +" \n" +" Приказује АРГ-те, раздвојене једним знаком размака и праћене\n" +" новим редом, на стандардном излазу.\n" +" \n" +" Опције:\n" +" -n\tне прикачиње нови ред\n" +" -e\tукључује тумачење пратећих контра косих црта новог реда\n" +" -E\tизричито потискује тумачење контра косих црта новог реда\n" +" \n" +" „echo“ тумачи пратеће знаке контра косе црте новог реда:\n" +" \\a\tупозорење (звонце)\n" +" \\b\tповратница\n" +" \\c\tпотискује будући излаз\n" +" \\e\tзнак новог реда\n" +" \\E\tзнак новог реда\n" +" \\f\tдовод обрасца\n" +" \\n\tнови ред\n" +" \\r\tповратак носача\n" +" \\t\tводоравни табулатор\n" +" \\v\tусправни табулатор\n" +" \\\\\tконтра коса црта\n" +" \\0nnn\tзнак чији АСКРИ код јесте „NNN“ (октално). „NNN“ може бити " +"од\n" +" \t 0 до 3 окталне цифре\n" +" \\xHH\tосмобитни знак чија вредност јесте „HH“ (хексадецимално). " +"„HH“\n" +" може бити једна или две хексадецималне цифре\n" +" \\uHHHH\tзнак Јуникода чија вредност јесте хексадецимална вредност " +"„HHHH“.\n" +" \t\t„HHHH“ може имати једну до четири хексадецималне цифре.\n" +" \\UHHHHHHHH знак Јуникода чија вредност јесте хексадецимална вредност\n" +" \t\t„HHHHHHHH“. „HHHHHHHH“ може бити једна од осам хексадецималних " +"цифара.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако не дође до грешке писања." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Записује аргументе на стандардни излаз.\n" +" \n" +" Приказује АРГ-те на стандардном излазу за којима следи нови ред.\n" +" \n" +" Опције:\n" +" -n\tне придодаје нови ред\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако не дође до грешке писања." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Укључује и искључује уграђености шкољке.\n" +" \n" +" Укључује и искључује уграђене наредбе шкољке. Искључивање вам " +"омогућава\n" +" да извршите наредбу диска која носи исти назив као уграђеност шкољке\n" +" без коришћења пуне путање.\n" +" \n" +" Опције:\n" +" -a\tисписује списак уграђености приказујући да ли је свака укључена\n" +" -n\tискључује сваки НАЗИВ или приказује списак искључених уграђености\n" +" -p\tисписује списак уграђености у поново користивом облику\n" +" -s\tисписује само називе Посиксових „посебних“ уграђености\n" +" \n" +" Опције које управљају динамичним учитавањем:\n" +" -f\tУчитава уграђеност НАЗИВА из дељеног објекта НАЗИВ_ДАТОТЕКЕ\n" +" -d\tУклања уграђеност учитану помоћу „-f“\n" +" \n" +" Без опција, сваки НАЗИВ је укључен.\n" +" \n" +" Да користите „test“ пронађен у $ПУТАЊИ уместо издања уграђености\n" +" шкољке, укуцајте „enable -n test“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако НАЗИВ није уграђеност шкољке или ако не " +"дође до грешке." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Извршава аргументе као наредбе шкољке.\n" +" \n" +" Обједињује АРГ-те у једну ниску, користи резултат као улаз шкољке,\n" +" и извршава резултирајуће наредбе.\n" +" \n" +" Излазно стање:\n" +" Даје излазно стање наредбе или успех ако је наредба ништавна." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Обрађује аргументе опције.\n" +" \n" +" „Getopts“ се користи поступцима шкољке за обраду положајних параметара\n" +" као опција.\n" +" \n" +" „OPTSTRING“ сдаржи слова опције зарад препознавања; ако након слова\n" +" долази двотачка, очекује се да опција има аргумент, који од њега треба\n" +" да буде раздвојен празнином.\n" +" \n" +" Након сваког призивања, „добави_опцију“ ће поставити следећу опцију у\n" +" $називу променљиве шкољке, покрећући назив ако не постоји, и индекс\n" +" следећег аргумента зарад обраде у променљиве шкољке ОПЦИНД. ОПЦИНД\n" +" се покреће на 1 сваки пут када се призове шкољка или спис шкољке.\n" +" Када опција захтева аргумент, „добави_опцију“ поставља тај аргумент\n" +" у променљиву шкољке ОПЦАРГ.\n" +" \n" +" „добави_опцију“ извештава о грешкама на један од два начина. Ако је\n" +" први знак ОПЦНИСКЕ двотачка, „добави_опцију користи нечујно извештавање\n" +" о грешци. У овом режиму, поруке о грешкама се не исписују. Ако је\n" +" виђена неисправна опција, поставља знак опцијепронађен у ОПЦАРГ-у. Ако\n" +" захтевани аргумент није нађен, поставља двотачку „:“ у НАЗИВ и подешава\n" +" ОПЦАРГ на нађени знак опције. Ако „добави_опцију“ није у нечујном " +"режиму,\n" +" а виђена је неисправна опција, онда поставља знак питања „?“ у НАЗИВ и\n" +" расподешава ОПЦАРГ. Ако није пронађен захтевани аргумент, питање „?“ " +"се\n" +" поставља у НАЗИВУ, ОПЦАРГ се расподешава, а исписује се порука о " +"дијагнози.\n" +" \n" +" Ако променљива шкољке ОПЦГРЕШКА има вредност 0, „добави_опцију“ " +"искључује\n" +" исписивање порука о грешкама, чак и ако први знак ОПЦНИСКЕ није " +"двотачка.\n" +" ОПЦГРЕШКА има вредност 1 по основи.\n" +" \n" +" „Добави_опцију“ обично обрађује положајне параметре ($0 - $9), али ако " +"је\n" +" дато више аргумената, онда се они обрађују.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат ако је пронађена опција; неуспех ако се наиђе " +"на\n" +" крај опције или ако не дође до грешке." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Замењује шкољку датом наредбом.\n" +" \n" +" Извршава НАРЕДБУ, замењујући ову шкољку наведеним програмом. АРГУМЕНТИ\n" +" постају аргументи НАРЕДБЕ. Ако није наведена НАРЕДБА, свако " +"преусмеравање\n" +" има дејства у текућој шкољци.\n" +" \n" +" Опције:\n" +" -a назив прослеђује НАЗИВ као нулти аргумент НАРЕДБЕ\n" +" -c\t\tизвршава НАРЕДБУ са празним окружењем\n" +" -l\t\tпоставља цртицу у нултом аргументу НАРЕДБЕ\n" +" \n" +" Ако наредба не може бити извршена, постоји не-међудејствена шкољка, " +"осим\n" +" ако није подешена опција шкољке „execfail“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако НАРЕДБА није нађена или ако не дође до " +"грешке преусмеравања." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Напушта шкољку.\n" +" \n" +" Напушта шкољку са стањем N. Ако је N изостављено, излазно стање\n" +" је оно последње извршене наредбе." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Напушта шкољку пријављивања.\n" +" \n" +" Напушта шкољку пријављивања са излазним стањем N. Даје грешку ако није " +"извршено\n" +" у шкољци пријављивања." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Приказује или извршава наредбе са списка историјата.\n" +" \n" +" „fc“ се користи за исписивање или уређивање и за поновно извршавање " +"наредби\n" +" са списка историјата. ПРВИ и ПОСЛЕДЊИ могу бити бројеви који наводе " +"опсег,\n" +" или ПРВИ може бити ниска, што значи да најсвежија наредба почиње том " +"ниском.\n" +" \n" +" Опције:\n" +" -e ЕНАЗИВ\t бира уређивача за коришћење. Основно је „FCEDIT“, затим " +"„EDITOR“,\n" +" \t\t затим „vi“\n" +" -l \t прави списак редова уместо да уређује\n" +" -n\t изоставља бројеве редова приликом стварања списка\n" +" -r\t преокреће редослед редова (новије поставља као прве)\n" +" \n" +" Са записом „fc -s [пат=реп ...] [наредба]“, НАРЕДБА се поново\n" +" извршава након обављене замене СТАРО=НОВО.\n" +" \n" +" Користан псеудоним за коришћење с овим је „r='fc -s'“, тако да „r cc“\n" +" покреће последњу наредбу која почиње са „cc“ а „r“ поново извршава\n" +" последњу наредбу.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат или стање извршене наредбе; не-нулу ако дође до " +"грешке." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Премешта посао у први план.\n" +" \n" +" Поставља посао одређен са „JOB_SPEC“ у први план, учинивши га текућим\n" +" послом. Ако „JOB_SPEC“ није присутно, користи се шкољкино поимање\n" +" текућег посла.\n" +" \n" +" Излазно стање:\n" +" Стање наредбе постављене у први план, или неуспех ако дође до грешке." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Премешта посао у позадину.\n" +" \n" +" Поставља посао одређен сваком „JOB_SPEC“ у позадину, као да су " +"покренути\n" +" са &. Ако „JOB_SPEC“ није присутно, користи се шкољкино поимање\n" +" текућег посла.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није укључено управљање послом или ако " +"не дође до грешке." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Памти или приказује места програма.\n" +" \n" +" Одређује и памти пуну путању сваког НАЗИВА наредбе. Ако нису\n" +" дати аргументи, приказује се податак о упамћеним наредбама.\n" +" \n" +" Опције:\n" +" -d\tзаборавља запамћено место сваког НАЗИВА\n" +" -l\tприказује у облику који може бити поново коришћен као улаз\n" +" -p путања користи ПУТАЊУ као пуну путању НАЗИВА\n" +" -r\tзаборавља сва запамћена места\n" +" -t\tисписује запамћено место сваког НАЗИВА, постављајући\n" +" \t\tодговарајући НАЗИВ испред сваког места ако је дато\n" +" \t\tвише НАЗИВА\n" +" Аргументи:\n" +" НАЗИВ\tСваки НАЗИВ се тражи у $ПУТАЊИ и додаје на списак\n" +" \t\tзапамћених наредби.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се НАЗИВ не нађе или ако је дата " +"неисправна опција." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Приказује податке о уграђеним наредбама.\n" +" \n" +" Приказује кратке сажетке уграђених наредби. Ако је наведен\n" +" ШАБЛОН, даје опширну помоћ свих наредби које одговарају ШАБЛОНУ,\n" +" у супротном исписује се списак тема помоћи.\n" +" \n" +" Опције:\n" +" -d\tисписује кратак опис за сваку тему\n" +" -m\tприказује коришћење у запису квази странице упутства\n" +" -s\tисписује само кртак сиже употребе за сваку тему која\n" +" \t одговара ШАБЛОНУ\n" +" \n" +" Аргументи:\n" +" ШАБЛОН\tШаблон који наводи тему помоћи\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако ШАБЛОН није пронађен или ако је дата " +"неисправна опција." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Приказује или управља списком историјата.\n" +" \n" +" Приказује списак историјата са бројевима редова, постављајући ипред\n" +" сваког измењеног уноса *. Аргумент N исписује само последња N уноса.\n" +" \n" +" Опције:\n" +" -c\t чисти списак историјата бришући све уносе\n" +" -d померај брише унос историјата на померају ПОМЕРАЈ.\n" +" \n" +" -a\t додаје редове историјата из ове сесије у датотеку историјата\n" +" -n\t чита све редове историјата који нису прочитани из датотеке " +"историјата\n" +" \t\tи додаје их на списак историјата\n" +" -r\t чита датотеку историјата и додаје садржај на списак историјата\n" +" -w\t пише текући историјат у датотеку историјата\n" +" \n" +" -p\t обавља ширење историјата на сваком АРГ-у и приказује резултат\n" +" \t без смештања на списак историјата\n" +" -s\t додаје АРГ-те на списак историјата као један унос\n" +" \n" +" Ако је дата ДАТОТЕКА, користи се као датотека историјата. У супротном,\n" +" ако ДАТОТЕКА_ИСТОРИЈАТА има вредност, она се користи, другачије „~/." +"bash_history“.\n" +" \n" +" Ако је променљива ЗАПИСВРЕМЕНАИСТОРИЈАТА подешена и није ништавна, " +"користи се\n" +" њена вредност као ниска записа за „strftime(3)“ да исписше временску " +"ознаку придружену\n" +" сваком приказаном уносу историјата. У супротном временске ознаке се не " +"исписују.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако не " +"дође до грешке." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Приказује стање посла.\n" +" \n" +" Исписује радне послове. ОДРЕДБАПОСЛА ограничава излаз на тај посао.\n" +" Без опција, стање свих радних послова је приказано.\n" +" \n" +" Опције:\n" +" -l\tисписује ИБ-ове процеса као додатак обичним подацима\n" +" -n\tисписује само процесе који су променили стање од последњег\n" +" \t обавештавања\n" +" -p\tисписује само ИБ-ове процеса\n" +" -r\tограничава излаз на покренуте послове\n" +" -s\tограничава излаз на заустављене послове\n" +" \n" +" Ако је достављено „-x“, НАРЕДБА се покреће након што се све одредбе " +"посла које\n" +" се јављају у АРГУМЕНТИМА замене ИБ-ом процеса тог вође групе процеса " +"посла.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако не " +"дође до грешке.\n" +" Ако се користи „-x“, даје излазно стање НАРЕДБЕ." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Уклања послове из текуће шкољке.\n" +" \n" +" Уклања сваки аргумент ОДРЕДБЕПОСЛА из табеле радних послова. Без\n" +" ОДРЕДБИПОСЛА, шкољка користи своје тумачење текућег посла.\n" +" \n" +" Опције:\n" +" -a\tуклања све послове ако није достављена ОДРЕДБАПОСЛА\n" +" -h\tозначава сваку ОДРЕДБУПОСЛА тако да СИГНАЛГОРЕ није послат послу " +"ако\n" +" \t шкољка прими СИГНАЛГОРЕ\n" +" -r\tуклања само покренуте послове\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или " +"ОДРЕДБАПОСЛА." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Шаље сигнал послу.\n" +" \n" +" Шаље процесима препознатих ПИБ-ом или ОДРЕДБОМПОСЛА сигнал именован\n" +" ОДРЕДБОМСИГНАЛА или БРОЈЕМСИГНАЛА. Ако није присутно ни " +"ОДРЕДБА_СИГНАЛА\n" +" ни БРОЈ_СИГНАЛА, подразумева се ТЕРМ_СИГНАЛА.\n" +" \n" +" Опције:\n" +" -s сиг\tСИГ је назив сигнала\n" +" -n сиг\tСИГ је број сигнала\n" +" -l\tисписује називе сигнала; ако аргументи прате „-l“ подразумева\n" +" \t се да су бројеви сигнала за које називи требају бити исписани\n" +" -L\tсиноним за „-l“\n" +" \n" +" „Kill“ је уграђеност шкољке из два разлога: омогућава да ИБ-ови послова " +"буду\n" +" коришћени уместо ИБ-ова процеса, и омогућава убијање процеса ако је " +"достигнуто\n" +" ограничење процеса које можете да направите.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако не " +"дође до грешке." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Процењује аритметичке изразе.\n" +" \n" +" Процењује сваки АРГ као аритметички израз. Процењивање се ради у\n" +" целим бројевима сталне ширине без провере за прекорачењем, тако да се\n" +" дељење нулом хвата и означава као грешка. Следећи списак оператора је\n" +" груписан у нивое оператора једнаког првенства. Нивои су исписани према\n" +" поретку растућег првенства.\n" +" \n" +" \tid++, id--\tпроменљива пост-увећања, пост-умањења\n" +" \t++id, --id\tпроменљива пре-увећања, пре-умањења\n" +" \t-, +\t\tједночлани минус, плус\n" +" \t!, ~\t\tлогичка и битска негација\n" +" \t**\t\tстепеновање\n" +" \t*, /, %\t\tмножење, дељење, остатак\n" +" \t+, -\t\tсабирање, одузимање\n" +" \t<<, >>\t\tлеви и десни битски помаци\n" +" \t<=, >=, <, >\tпоређење\n" +" \t==, !=\t\tједнакост, неједнакост\n" +" \t&\t\tбитско И\n" +" \t^\t\tбитско ИСКЉУЧИВО ИЛИ\n" +" \t|\t\tбитско ИЛИ\n" +" \t&&\t\tлогичко И\n" +" \t||\t\tлогичко ИЛИ\n" +" \texpr ? expr : expr\n" +" \t\t\tусловни оператор\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tдодела\n" +" \n" +" Променљиве шкољке су дозвољене као операнди. Назив променљиве\n" +" се замењује њеном вредношћу (присиљеном на цео број сталне ширине)\n" +" у изразу. Променљива не мора да има укључен атрибут целог броја\n" +" да би била коришћена у изразу.\n" +" \n" +" Оператори се процењују према првенству. Под-изрази у заградама\n" +" се први процењују и могу да препишу горња правила првенства.\n" +" \n" +" Излазно стање:\n" +" Ако се последњи АРГ процени на 0, исписује 1; у супротном даје 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Чита ред са стандардног улаза и дели га на поља.\n" +" \n" +" Чита један ред са стандардног улаза, или из описника датотеке ФД\n" +" ако је достављена опција „-u“. Ред је подељен на поља као при дељењу\n" +" речи, а прва реч се додељује првом НАЗИВУ, друга реч другом НАЗИВУ,\n" +" и тако редом, са сваком наредном речју додељеном последњем НАЗИВУ.\n" +" Само знаци пронађени у „$IFS“ се признају за граничнике речи.\n" +" \n" +" Ако нису достављени НАЗИВИ, читани ред је смештен у променљивој " +"ОДГОВОР.\n" +" \n" +" Опције:\n" +" -a низ\t додељује читање речи секвенцијалним индексима променљиве\n" +" \t\t низа НИЗ, почевши од нуле\n" +" -d гран\t наставља све док се не прочита први знак ГРАНИЧНИКА,\n" +" \t\t радије него нови ред\n" +" -e\t користи читање реда да добије ред у међудејственој шкољци\n" +" -i текст\t користи ТЕКСТ као почетни текст за читање реда\n" +" -n n-знака даје резултат након читања знакова N-ЗНАКОВА радије него " +"да\n" +" \t\t чека на нови ред, али поштује граничника ако је прочитано\n" +" \t\t мање знакова од N-ЗНАКОВА пре граничника\n" +" -N n-знака даје резултат само након читања тачно знакова N-ЗНАКОВА, " +"осим\n" +" \t\t ако не наиђе на крај датотеке или ако не истекне време читања,\n" +" занемарујући све граничнике\n" +" -p упит\t исписује ниску УПИТ без пратећег новог реда пре покушаја " +"читања\n" +" -r\t не дозвољава контра косим цртама да преломе ниједан од знакова\n" +" -s\t не оглашава улаз који долази са терминала\n" +" -t истек\t неуспех временског рока и давања резултата ако читав ред " +"улаза\n" +" \t\t није прочитан за време од ВРЕМЕ_РОК секунде. Вредност променљиве\n" +" \t\t ВИСТЕКА је основни временски рок. ВРЕМЕНСКИ_РОК може бити " +"разломак.\n" +" \t\t Ако је ВРЕМЕНСКИ_РОК 0, читање даје резултат одмах, без покушаја\n" +" \t\t читања некох података, дајући позитиван резултат само ако је улаз\n" +" \t\t доступан на наведеном описнику датотеке. Излазно стање је веће\n" +" \t\t од 128 ако је временски рок прекорачен\n" +" -u фд\t чита из описника датотеке ФД уместо са стандардног улаза\n" +" \n" +" Излазно стање:\n" +" Резултат је нула, осим ако се не наиђе на крај датотеке, не истекне " +"време\n" +" читања (у том случају је већи од 128), ако не дође до грешке доделе " +"променљиве,\n" +" или ако се не достави неисправан описник датотеке као аргумент опције „-" +"u“." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Враћа из функције шкољке.\n" +" \n" +" Доводи до тога да функција или изворни спис изађу са вредношћу\n" +" коју наводи N. Ако је N изостављено, стање резултата је оно\n" +" последње извршене наредбе унутар функције или списа.\n" +" \n" +" Излазно стање:\n" +" Даје N, или неуспех ако шкољка не извршава функцију или спис." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Подешава или расподешава вредности опција шкољке и положајних параметара.\n" +" \n" +" Мења вредност особина шкољке и положајних параметара, или\n" +" приказује називе и вредности променљивих шкољке.\n" +" \n" +" Опције:\n" +" -a Означава променљиве које су измењене или направљене за извоз.\n" +" -b Одмах обавештава о окнчавању посла.\n" +" -e Одмах излази ако наредба постоји са не-нултим стањем.\n" +" -f Искључује стварање назива датотеке (уопштавање).\n" +" -h Памти место наредби као што су тражене.\n" +" -k Сви аргументи додељивања се постављају у окружењу за\n" +" наредбу, не само они који претходе називу наредбе.\n" +" -m Управљање послом је укључено.\n" +" -n Чита наредбе али их не извршава.\n" +" -o назив-опције\n" +" Подешава променљиву према називу-опције:\n" +" allexport исто као -a\n" +" braceexpand исто као -B\n" +" emacs користи сучеље уређивања реда у стилу емакса\n" +" errexit исто као -e\n" +" errtrace исто као -E\n" +" functrace исто као -T\n" +" hashall исто као -h\n" +" histexpand исто као -H\n" +" history укључује историјат наредбе\n" +" ignoreeof шкољка неће изаћи док читање међудејствених\n" +" напомена краја датотеке допушта напоменама\n" +" да се појављују у међудејственим наредбама\n" +" keyword исто као -k\n" +" monitor исто као -m\n" +" noclobber исто као -C\n" +" noexec исто као -n\n" +" noglob исто као -f\n" +" nolog тренутно прихваћено али занемарено\n" +" notify исто као -b\n" +" nounset исто као -u\n" +" onecmd исто као -t\n" +" physical исто као -P\n" +" pipefail вредност резултата спојнице јесте стање последње " +"наредбе\n" +" за прекид са не-нултим стањем, или са нулом ако " +"ниједна\n" +" наредба није завршила са не-нултим стањем\n" +" posix мења понашање баша где се основна радња " +"разликује\n" +" од стандарда Посикса да би одговарала стандарду\n" +" privileged исто као -p\n" +" verbose исто као -v\n" +" vi користи сучеље уређивања реда у стилу вија\n" +" xtrace исто као -x\n" +" -p Укључено кад год се ибови стварног и ефективног корисника не " +"подударају.\n" +" Искључује обраду датотеке „$ENV“ и увоз функција шкољке. " +"Искључивање ове\n" +" опције доводи до тога да ефективни јиб и гиб буду подешени на " +"стварни\n" +" јиб и гиб.\n" +" -t Излази након читања и извршавања једне наредбе.\n" +" -u Сматра променљиве расподешавања за грешку приликом замењивања.\n" +" -v Исписује редове улаза шкољке како бивају читани.\n" +" -x Исписује наредбе и њихове аргументе како бивају извршени.\n" +" -B шкољка ће обавити ширење заграде\n" +" -C Ако је подешено, онемогућава преписивање постојећих редовних\n" +" датотека преусмеравањем излаза.\n" +" -E Ако је подешено, хватање ГРЕШКЕ се наслеђује функцијама шкољке.\n" +" -H Укључује замену историјата у стилу !. Ова опција је укључена\n" +" по основи када је шкољка међудејствена.\n" +" -P Ако је подешено, не решава симболичке везе приликом извршавања\n" +" наредби као што је „cd“ која мења текући директоријум.\n" +" -T Ако је подешено, хватања ПРОЧИШЋАВАЊА и РЕЗУЛТАТА се наслеђују " +"функцијама шкољке.\n" +" -- Додељује све преостале аргументе положајним параметрима.\n" +" Ако нема преосталих аргумената, положајни параметри се\n" +" расподешавају.\n" +" - Додељује све преостале аргументе положајним параметрима.\n" +" Опције „-x“ и „-v“ су искључене.\n" +" \n" +" Коришћење + радије него - доводи до искључивања ових опција. Опције\n" +" могу такође бити коришћене над призивањем шкољке. Текући скуп опција\n" +" може бити пронађен у $-. Преосталих n АРГ-та јесу положајни параметри\n" +" и додељени су, по реду, $1, $2, .. $n. Ако нису дати АРГументи, све\n" +" променљиве шкољке се исписују.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Расподешава вредности и особине променљивих и функција шкољке.\n" +" \n" +" За сваки НАЗИВ, уклања одговарајућу променљиву или функцију.\n" +" \n" +" Опције:\n" +" -f\tсматра сваки НАЗИВ као функцију шкољке\n" +" -v\tсматра сваки НАЗИВ као променљиву шкољке\n" +" -n\tсматра сваки НАЗИВ као упуту назива и расподешава\n" +" \t саму променљиву радије него упуте променљиве\n" +" \n" +" Без опција, „unset“ прво покушава да расподеси променљиву, а ако то не " +"успе,\n" +" покушава да расподеси функцију.\n" +" \n" +" Неке променљиве не могу бити расподешене; видите такође „readonly“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако је " +"НАЗИВ само за читање." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Подешава особину извоза за променљиве шкољке.\n" +" \n" +" Означава сваки НАЗИВ за самосталан извоз у окружење накнадно извршених\n" +" наредби. Ако је достављена ВРЕДНОСТ, додељује ВРЕДНОСТ пре извоза.\n" +" \n" +" Опције:\n" +" -f\tупућује на функције шкољке\n" +" -n\tуклања својство извоза из сваког НАЗИВА\n" +" -p\tприказује списак свих извезених променљивих и функција\n" +" \n" +" Аргумент „--“ искључује даљу обраду опције.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако је дата неисправна опција или је НАЗИВ " +"неисправан." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Означава променљиве шкољке непроменљивим.\n" +" \n" +" Означава сваки НАЗИВ као само за читање; вредности тих НАЗИВА не могу " +"бити\n" +" измењене подсеквенционалним додељивањем. Ако је достављена ВРЕДНОСТ, " +"додељује\n" +" ВРЕДНОСТ пре него ли јеозначи само за читање.\n" +" \n" +" Опције:\n" +" -a\tупућује на променљиве пописивог низа\n" +" -A\tупућује на променљиве придруживог низа\n" +" -f\tупућује на функције шкољке\n" +" -p\tприказује списак свих променљивих и функција само за читање, " +"зависно\n" +" од тога да ли је опција „-f“ дата или није\n" +" \n" +" Аргумент „--“ искључује даље обрађивање опције.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако је " +"НАЗИВ неисправан." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Помера параметре положаја.\n" +" \n" +" Преименује параметре положаја $N+1,$N+2 ... у $1,$2 ... Ако N није\n" +" дато, подразумева се да је 1.\n" +" \n" +" Излазно стање:\n" +" Резултати су успешни осим ако N није негативно иливеће од $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Извршава наредбе из датотеке у текућој шкољци.\n" +" \n" +" Чита и извршава наредбе из ДАТОТЕКЕ у текућој шкољци. Уноси у\n" +" $ПУТАЊИ се користе за налажење директоријума који садржи ДАТОТЕКУ.\n" +" Ако је достављен неки од АРГУМЕНТАТА, постају параметри положаја\n" +" приликом извршавања ДАТОТЕКЕ.\n" +" \n" +" Излазно стање:\n" +" Даје стање последње извршене наредбе у ДАТОТЕЦИ; не успева\n" +" ако назив ДАТОТЕКЕ не може бити прочитан." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Обуставља извршавање шкољке.\n" +" \n" +" Обуставља извршавање ове шкољке све док не прими сигнал БРОЈ_СИГНАЛА.\n" +" Осим ако нису присиљене, шкољке пријављивања не могу бити обустављене.\n" +" \n" +" Опције:\n" +" -f\tприморава обустављање, чак и ако је шкољка пријављивања\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није укључено управљање послом или ако " +"не дође до грешке." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Процењује условни израз.\n" +" \n" +" Излази са стањем 0 (тачно) или 1 (нетачно) у зависности од\n" +" процене ИЗРАЗА. Изрази могу бити једночлани или двочлани. Једночлани\n" +" изрази се често користе за испитивање стања датотеке. Ту су такође и\n" +" оператори ниске и оператори поређења бројева.\n" +" \n" +" Понашање пробе зависи од броја аргумената. Прочитајте\n" +" страницу упутства баша потпуну одредбу.\n" +" \n" +" Оператори датотеке:\n" +" \n" +" -a ДАТОТЕКА Тачно ако датотека постоји.\n" +" -b ДАТОТЕКА Тачно ако је датотека посебног блока.\n" +" -c ДАТОТЕКА Тачно ако је датотека посебног знака.\n" +" -d ДАТОТЕКА Тачно ако је датотека директоријум.\n" +" -e ДАТОТЕКА Тачно ако датотека постоји.\n" +" -f ДАТОТЕКА Тачно ако датотека постоји и ако је обична " +"датотека.\n" +" -g ДАТОТЕКА Тачно ако је датотека подеси-иб-групе.\n" +" -h ДАТОТЕКА Тачно ако је датотека симболичка веза.\n" +" -L ДАТОТЕКА Тачно ако је датотека симболичка веза.\n" +" -k ДАТОТЕКА Тачно ако датотека има свој „лепљиви“ скуп бита.\n" +" -p ДАТОТЕКА Тачно ако је датотека именована спојка.\n" +" -r ДАТОТЕКА Тачно ако датотеку само ви можете да читате.\n" +" -s ДАТОТЕКА Тачно ако датотека постоји и није празна.\n" +" -S ДАТОТЕКА Тачно ако је датотека прикључница.\n" +" -t ФД Тачно ако је ФД отворен на терминалу.\n" +" -u ДАТОТЕКА Тачно ако је датотека подеси-иб-корисника.\n" +" -w ДАТОТЕКА Тачно ако у датотеку можете ви да пишете.\n" +" -x ДАТОТЕКА Тачно ако датотеку можете ви да извршите.\n" +" -O ДАТОТЕКА Тачно ако је датотека заправо у вашем власништву.\n" +" -G ДАТОТЕКА Тачно ако је датотека заправо у власништву ваше " +"групе.\n" +" -N ДАТОТЕКА Тачно ако је датотека измењена након последњег " +"читања.\n" +" \n" +" ДАТОТЕКА1 -nt ДАТОТЕКА2 Тачно ако је датотека1 новија од датотеке2 " +"(према датуму измене).\n" +" \n" +" ДАТОТЕКА1 -ot ДАТОТЕКА2 Тачно ако је датотека1 старија од датотеке2.\n" +" \n" +" ДАТОТЕКА1 -ef ДАТОТЕКА2 Тачно ако је датотека1 чврста веза до " +"датотеке2.\n" +" \n" +" Оператори ниске:\n" +" \n" +" -z НИСКА Тачно ако је ниска празна.\n" +" \n" +" -n НИСКА\n" +" НИСКА Тачно ако ниска није празна.\n" +" \n" +" НИСКА1 = НИСКА2 Тачно ако су ниске једнаке.\n" +" НИСКА1 != НИСКА2 Тачно ако ниске нису једнаке.\n" +" НИСКА1 < НИСКА2 Тачно ако НИСКА1 долази пре НИСКЕ2 " +"лексикографски.\n" +" НИСКА1 > НИСКА2 Тачно ако НИСКА1 долази после НИСКЕ2 " +"лексикографски.\n" +" \n" +" Остали оператори:\n" +" \n" +" -o ОПЦИЈА Тачно ако је опција шкољке ОПЦИЈА укључена.\n" +" -v ПРОМ Тачно ако је променљива шкољке ПРОМ подешена\n" +" -R ПРОМ Тачно ако је променљива шкољке ПРОМ подешена и ако " +"је упута назива.\n" +" ! ИЗРАЗ Тачно ако је израз нетачан.\n" +" ИЗРАЗ1 -a ИЗРАЗ2 Тачно ако је тачан и израз1 И израз2.\n" +" ИЗРАЗ1 -o ИЗРАЗ2 Тачно ако је тачан или израз1 ИЛИ израз2.\n" +" \n" +" арг1 ОП арг2 Аритметичка проба. ОП је једно од следећег: -eq, -" +"ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Аритметички двочлани оператори дају тачно ако је АРГ1 једнак, није-" +"једнак,\n" +" мањи-од, мањи-од-или-једнак, већи-од, или већи-од-или-једнак са АРГ2.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат ако се ИЗРАЗ процени на тачно; неуспех ако се " +"ИЗРАЗ процени\n" +" на нетачно или ако је дат неисправан аргумент." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Процењује условни израз.\n" +" \n" +" Ово је синоним за уграђеност „test“, али последњи аргумент мора\n" +" бити дословна ], да поклопи отворену [." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Приказује времена процеса.\n" +" \n" +" Исписује нагомилана времена корисника и система за шкољку и за све\n" +" њене проистекле процесе.\n" +" \n" +" Излазно стање:\n" +" Увек успешно." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Хвата сигнале и друге догађаје.\n" +" \n" +" Одређује и покреће руковаоце који ће бити покренути када шкољка прими\n" +" сигнале или друге услове.\n" +" \n" +" АРГ је наредба за читање и извршавање када шкољка прими ОДРЕДБУ_СИГНАЛА\n" +" сигнала. Ако АРГ недостаје (а достављена је једна ОДРЕДБА_СИГНАЛА) или\n" +" „-“, сваки наведени сигнал се враћа на првобитну вредност. Ако је АРГ\n" +" ништавна ниска свака ОДРЕДБА_СИГНАЛА се занемарује од стране шкољке и " +"од\n" +" наредби које призива.\n" +" \n" +" Ако је ОДРЕДБА_СИГНАЛА ИЗАЂИ (0) АРГ се извршава при изласку из шкољке.\n" +" Ако је ОДРЕДБА_СИГНАЛА ПРОЧИСТИ, АРГ се извршава пре сваке једноставне\n" +" наредбе. Ако је ОДРЕДБА_СИГНАЛА ВРАТИ, АРГ се извршава сваки пут када " +"се\n" +" заврши извршавање функције шкољке или списа покренутих . или " +"уграђености\n" +" извора. ОДРЕДБА_СИГНАЛА или ГРЕШКА значи извршавање АРГ-а сваки пут " +"када\n" +" би неуспех наредбе довео до изласка шкољке када је укључена опција „-" +"e“.\n" +" \n" +" Ако нису достављени аргументи, „trap“ исписује списак наредби " +"придружених\n" +" сваком сигналу.\n" +" \n" +" Опције:\n" +" -l\tисписује списак назива сигнала и њихових одговарајућих бројева\n" +" -p\tприказује наредбе хватања придружене свакој ОДРЕДБИ_СИГНАЛА\n" +" \n" +" Свака ОДРЕДБА_СИГНАЛА је или назив сигнала у или број " +"сигнала.\n" +" Називи сигнала нису осетљиви на величину слова а префикс СИГ је опција.\n" +" Сигнал може бити послат шкољци помоћу „kill -signal $$“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим за неисправну ОДРЕДБА_СИГНАЛА или за " +"неисправну опцију." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Приказује податке о врсти наредбе.\n" +" \n" +" За сваки НАЗИВ, показује како би био тумачен ако би се користио као\n" +" назив наредбе.\n" +" \n" +" Опције:\n" +" -a\tприказује сва места која садрже извршну под називом НАЗИВ;\n" +" \t укључује псеудониме, уграђености, и функције, ако и само ако\n" +" \t опција „-p“ није такође коришћена\n" +" -f\tпотискује тражење функције шкољке\n" +" -P\tприморава претрагу ПУТАЊЕ за сваким НАЗИВОМ, чак и ако је " +"псеудоним,\n" +" \t уграђеност, или функција, и враћа назив датотеке диска која ће " +"бити\n" +" \t извршена\n" +" -p\tдаје или назив датотеке диска која ће бити извршена, или ништа\n" +" \t ако „type -t НАЗИВ“ неће дати „датотеку“.\n" +" -t\tисписује једну реч која је једна од следећих: „alias“, „keyword“,\n" +" \t „function“, „builtin“, „file“ или „“, ако је НАЗИВ псеудоним, " +"реч\n" +" \t резервисана шкољком, функција шкољке, уграђеност шкољке, " +"датотека диска,\n" +" или ако није пронађена\n" +" \n" +" Аргументи:\n" +" НАЗИВ\tНазив наредбе за тумачење.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат ако су пронађени сви НАЗИВИ; неуспех ако ниједан " +"није пронађен." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Мења ограничења изворишта шкољке.\n" +" \n" +" Обезбеђује управљање над извориштима доступним шкољци и обрађује\n" +" његово стварање, на системима који омогућавају такво управљање.\n" +" \n" +" Опције:\n" +" -S\tкористи „меко“ ограничење изворишта\n" +" -H\tкористи „јако“ ограничење изворишта\n" +" -a\tизвештено је о свим текућим ограничењима\n" +" -b\tвеличина међумеморије прикључнице\n" +" -c\tнајвећа величина створених кључних датотека\n" +" -d\tнајвећа величина подеока податка процеса\n" +" -e\tнајвећа хитност заказивања („фино“)\n" +" -f\tнајвећа величина датотеке коју запише шкољка и њен пород\n" +" -i\tнајвећи број сигнала на чекању\n" +" -k\tнајвећи број к-чекања додељених овом процесу\n" +" -l\tнајвећа величина коју процес може да закључа у меморији\n" +" -m\tнајвећа величина боравишног скупа\n" +" -n\tнајвећи број отворених описника датотеке\n" +" -p\tвеличина међумеморије спојке\n" +" -q\tнајвећи број бајтова у редовима поруке ПОСИКС-а\n" +" -r\tнајвећа хитност заказивања у стварном времену\n" +" -s\tнајвећа величина спремника\n" +" -t\tнајвећи износ времена процесора у секундама\n" +" -u\tнајвећи број корисничких процеса\n" +" -v\tвеличина виртуелне меморије\n" +" -x\tнајвећи број закључавања датотеке\n" +" -P\tнајвећи број псеудотерминала\n" +" -T\tнајвећи број нити\n" +" \n" +" Нису све опције доступне на свим платформама.\n" +" \n" +" Ако је дато ОГРАНИЧЕЊЕ, то је нова вредност наведеног изворишта;\n" +" посебне вредности ОГРАНИЧЕЊА „soft“, „hard“, и „unlimited“ стоје\n" +" за текуће меко ограничење, текуће јако ограничење, и без ограничења.\n" +" У супротном, тренутна вредност наведеног изворишта се исписује. Ако\n" +" није дата ниједна опција, онда се подразумева „-f“.\n" +" \n" +" Вредности су у 1024-битном повећавању, изузев за „-t“ која је у " +"секундама,\n" +" „-p“ која се повећава за 512 бајта, и „-u“ која је произвољан број\n" +" процеса.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако " +"не дође до грешке." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Приказује или подешава маску режима датотеке.\n" +" \n" +" Подешава корисничку маску стварања датотеке на РЕЖИМ. Ако је РЕЖИМ\n" +" изостављен, исписује текућу вредност маске.\n" +" \n" +" Ако РЕЖИМ почиње цифром, тумачи се као октални број; у супротном то је\n" +" симболичка ниска режима као она коју прихвата „chmod(1)“.\n" +" \n" +" Опције:\n" +" -p\tако је РЕЖИМ изостављен, исписује у облику који може бити поново " +"коришћен као улаз\n" +" -S\tчини излаз симболичким; у супротном излаз је октални број\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако је РЕЖИМ неисправан или ако је дата " +"неисправна опција." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Чека на довршавање посла и даје излазно стање.\n" +" \n" +" Чека на сваки процес одређен ИБ-ом, који може бити ИБ процеса или\n" +" одредба посла, и извештава о његовом стању окончавања. Ако ИБ није\n" +" дат, чека на све тренутно радне потпроцесе, а излазно стање је нула.\n" +" Ако је ИБ одредба посла, чека на све процесе у тој спојници посла.\n" +" \n" +" Ако је достављена опција „-n“, чека на следећи посао да заврши и\n" +" исписује његово излазно стање.\n" +" \n" +" Ако је достављена опција „-f“, а контрола посла је укључена, чека на\n" +" наведени ИБ да оконча, уместо да чека на њега да промени статус.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последњег ИБ-а; неуспех ако је ИБ неисправан или ако је\n" +" дата неисправна опција." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Чека на довршавање процеса и даје излазно стање.\n" +" \n" +" Чека на сваки процес наведен ПИБ-ом и извештава о његовом излазном " +"стању.\n" +" Ако ПИБ ниије дат, чека на све тренутно радне потпроцесе, а враћено " +"стање\n" +" је нула. ПИБ мора бити ИБ процеса.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последњег ПИБ-а; неуспех ако је ПИБ неисправан или ако је " +"дата\n" +" неисправна опција." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Извршава наредбе за сваког члана на списку.\n" +" \n" +" Петља `„for“ извршава низ наредбиза сваког члана на списку ставки.\n" +" Ако „in WORDS ...;“ није присутно, тада се подразумева „in \"$@\"“.\n" +" За сваки елемент у РЕЧИМА, НАЗИВ се подешава на тај елемент, и\n" +" НАРЕДБЕ се извршавају.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Аритметика за петљу.\n" +" \n" +" Исто што и\n" +" \t(( ИЗРАЗ1 ))\n" +" \twhile (( ИЗРАЗ2 )); do\n" +" \t\tНАРЕДБЕ\n" +" \t\t(( ИЗРАЗ3 ))\n" +" \tdone\n" +" ИЗРАЗ1, ИЗРАЗ2, и ИЗРАЗ3 јесу аритметички изрази. Ако је изостављен " +"неки израз,\n" +" понаша се као да се процењује на 1.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Бира речи са списка и извршава наредбе.\n" +" \n" +" РЕЧИ су раширене, стварајући списак речи. Скуп раширених\n" +" речи се исписује на стандардној грешци, где свакој претходи\n" +" број. Ако „in WORDS“ није присутно, подразумева се „in \"$@\"“.\n" +" ПС3 упит се тада приказује а ред се чита са стандардног улаза.\n" +" Ако се ред састоји од броја који одговара једној од приказаних\n" +" речи, тада се НАЗИВ подешава на ту реч. Ако је ред празан,\n" +" РЕЧИ и упит се поново приказују. Ако је прочитан крај датотеке, \n" +" наредба се довршава. Свака друга прочитана вредност доводи\n" +" до тога да НАЗИВ бива подешен на ништа. Читање реда се чува\n" +" у променљивој ОДГОВОРИ. НАРЕДБЕ се извршавају након сваког\n" +" избора све док се не изврши наредба за прекид.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Извештава о утрошеном времену извршавањем спојног реда.\n" +" \n" +" Извршава СПОЈНИРЕД и исписује сажетак стварног времена, корисничког\n" +" времена процесора, и времена системског процесора утрошеног на\n" +" извршавање СПОЈНОГРЕДА када се оконча.\n" +" \n" +" Опције:\n" +" -p\tисписује сажетак времена у преносном запису Посикса\n" +" \n" +" Вредност променљиве ЗАПИСАВРЕМЕНА се користи као излазни запис.\n" +" \n" +" Излазно стање:\n" +" Стање резултата јесте стање резултата СПОЈНОГРЕДА." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Извршава наредбе на основу поклапања шаблона.\n" +" \n" +" Изборно извршава НАРЕДБЕ на основу РЕЧИ која поклапа ШАБЛОН.\n" +" | се користи за раздвајање више шаблона.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Извршава наредбе на основу условности.\n" +" \n" +" Извршава се списак „if НАРЕДБЕ“. Ако је његово излазно стање нула, тада " +"се\n" +" извршава списак „then НАРЕДБЕ“. У супротном, сваки списак „elif " +"НАРЕДБЕ“\n" +" се извршава на смену, и ако је његово излазно стање нула, одговарајући " +"списак\n" +" „then НАРЕДБЕ“ се извршава и наредба „if“ се завршава. У супротном, " +"извршава\n" +" се списак „else НАРЕДБЕ“, ако постоји. Излазно стање читаве " +"конструкције је\n" +" излазно стање последње извршене наредбе, или нула ако нема испробаног " +"услова.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Извршава наредбе након што се проба успешно обави.\n" +" \n" +" Шири и извршава НАРЕДБЕ након што завршна наредба у „while“ НАРЕДБАМА\n" +" има излазно стање нуле.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Извршава наредбе након што се проба успешно обави.\n" +" \n" +" Шири и извршава НАРЕДБЕ након што завршна наредба у „until“ НАРЕДБАМА\n" +" има излазно стање које није нула.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Ствара копроцес под називом НАЗИВ.\n" +" \n" +" Извршава наредбу несагласно, са стандардним излазом и стандардним\n" +" улазом наредбе повезане путем спојке са описницима датотека додељених\n" +" да назначе 0 и 1 НАЗИВА променљиве низа у шкољци извршавања.\n" +" Основни НАЗИВ је „COPROC“.\n" +" \n" +" Излазно стање:\n" +" Наредба копроцеса даје излазно стање 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Одређује функцију шкољке.\n" +" \n" +" Ствара функцију шкољке под називом НАЗИВ. Када се призове као једна " +"наредба,\n" +" НАЗИВ покреће НАРЕДБЕ у контексту шкољке позивања. Када се призове " +"НАЗИВ,\n" +" аргументи се прослеђују функцији као $1...$n, а назив функције се налази " +"у\n" +" $НАЗИВУ_ФУНКЦИЈЕ.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако је НАЗИВ само за читање." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Групише наредбе као јединицу.\n" +" \n" +" Покреће скуп наредби у групи. Ово је један од начина за преусмеравање\n" +" читавог скупа наредби.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Наставља посао у првом плану.\n" +" \n" +" Исто као и аргумент ОДРЕДБА_ПОСЛА у наредби „fg“. Наставља заустављени\n" +" или посао у позадини. ОДРЕДБА_ПОСЛА може да наведе назив посла или " +"број\n" +" посла. Пропративши ОДРЕДБУ_ПОСЛА са & поставља посао у позадину, као\n" +" да је одредба посла достављена као аргумент уз „bg“.\n" +" \n" +" Излазно стање:\n" +" Даје стање настављеног посла." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Процењује аритметички израз.\n" +" \n" +" ИЗРАЗ се процењује у складу са правилима за аритметичко процењивање.\n" +" Исто што и „let ИЗРАЗ“.\n" +" \n" +" Излазно стање:\n" +" Даје 1 ако се ИЗРАЗ процени на 0; у супротном даје 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Извршава условну наредбу.\n" +" \n" +" Даје стање 0 или 1 у зависности од процене условног израз ИЗРАЗ.\n" +" Изрази су састављени од истих примарних које користи уграђеност\n" +" „test“, и може бити комбиновано употребом следећих оператора:\n" +" \n" +" ( ИЗРАЗ )\t Даје вредност ИЗРАЗА\n" +" ! ИЗРАЗ\t\tТачно ако је ИЗРАЗ нетачан; у супротном нетачно\n" +" ИЗРАЗ1 && ИЗРАЗ2\tТачно ако су и ИЗРАЗ1 и ИЗРАЗ2 тачни; у супротном " +"нетачно\n" +" ИЗРАЗ1 || ИЗРАЗ2\tТачно ако је или ИЗРАЗ1 или ИЗРАЗ2 тачан; у " +"супротном нетачно\n" +" \n" +" КАда се користе оператори „==“ и „!=“, ниска са десне стране оператора\n" +" се користи као шаблон а поређење са шаблоном се обавља. Када се " +"користи\n" +" оператор „=~“, ниска са десне стране оператора се поклапа као регуларни\n" +" израз.\n" +" \n" +" Оператори && и || не процењују ИЗРАЗ2 ако је ИЗРАЗ1 довољан за " +"одређивање\n" +" вредности израза.\n" +" \n" +" Излазно стање:\n" +" 0 или 1 у зависности од вредност ИЗРАЗА." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Општи називи променљивих шкољке и употреба.\n" +" \n" +" ИЗДАЊЕ_БАША Подаци о издању за овај Баш.\n" +" ЦДПУТАЊА Списак директоријума раздвојен двотачком за тражење\n" +" директоријума који су дати као аргументи за „cd“.\n" +" ОПШТЕЗАНЕМАРИ Списак шаблона раздвојен двотачком који описује " +"називе\n" +" датотека који ће бити занемарени ширењем назива " +"путање.\n" +" ИСТОРИОТЕКА Назив датотеке у којој је смештен историјат " +"наредби.\n" +" ВЕЛИЧИНАИСТОРИОТЕКЕ Највећи број редова које може да садржи ова " +"датотека.\n" +" ВЕЛИЧИНАИСТОРИЈАТА Највећи број редова историјата којима покренута\n" +" шкољка може да приступи.\n" +" ЛИЧНО Потпуна путања до вашег директоријума пријављивања.\n" +" НАЗИВДОМАЋИНА Назив текућег домаћина.\n" +" ВРСТАДОМАЋИНА Врста процесора под којим ради ово издање Баша.\n" +" ЗАНЕМАРИКРД Управља радњом шкољке при пријему знака за крај " +"датотеке\n" +" само као улаза. Ако је подешено, онда је његова " +"вредност\n" +" број знакова КРД-а који могу бити виђени у реду " +"празног\n" +" реда пре него ли шкољка изађе (основно је 10). " +"Када\n" +" није подешено, КРД значи крај улаза.\n" +" ВРСТАМАШИНЕ Ниска која описује текући систем на коме је Баш " +"покренут.\n" +" ПРОВЕРАПОШТЕ Колико често, у секундама, Баш првоерава нову " +"пошту.\n" +" ПУТАЊАПОШТЕ Списак датотека раздвојен двотачком које Баш " +"проверава\n" +" за новом поштом.\n" +" ВРСТАОСА Издање Јуникса на коме је покренуто ово издање " +"Баша.\n" +" ПУТАЊА Списак директоријума раздвојен двотачком за " +"претрагу\n" +" приликом тражења наредби.\n" +" НАРЕДБА_УПИТА Наредба која ће бити извршена пре исписивања сваког\n" +" главног упита.\n" +" НГУ1 Ниска главног упита.\n" +" НСУ2 Ниска споредног упита.\n" +" ШРД Пуна путања текућег директоријума.\n" +" ОПЦИЈЕШКОЉКЕ Списак раздвојен двотачком укључених опција шкољке.\n" +" ТЕРМИНАЛ Назив врсте текућег терминала.\n" +" ЗАПИСВРЕМЕНА Излазни запис за статистике времена које приказује\n" +" резервисана реч „time“.\n" +" сам_настави Не-ништа значи да је реч наредбе која се појављује " +"на реду\n" +" сама по себи прва тражена на списку тренутно " +"заустављених\n" +" послова. Ако се ту пронађе, тај посао се поставља у " +"први\n" +" план. Вредност „exact“ значи да реч наредбе мора " +"тачно да\n" +" одговара наредби на списку заустављених послова. " +"Вредност\n" +" „substring“ значи да реч наредбе мора да одговара " +"поднисци\n" +" посла. Свака друга вредност значи да наредба мора " +"бити\n" +" префикс заустављеног посла.\n" +" знакисторијата Знаци који управљају ширењем историјата и брзом " +"заменом.\n" +" Први знак јесте знак замене историјата, обично је то " +"„!“.\n" +" Други јесте знак „брзе замене“, обично је то „^“. " +"Трећи\n" +" јесте знак „напомене историјата“, обично је то „#“.\n" +" ЗАНЕМАРИИСТОРИЈАТ Списак шаблона раздвојен двотачком коришћених за " +"одлучивање\n" +" о наредбама које требају бити сачуване на списку " +"историјата.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Додаје директоријуме у спремник.\n" +" \n" +" Додаје директоријум на врх спремника директоријума, или окреће\n" +" спремник, чинећи нови први у спремнику текућим радним директоријумом.\n" +" Без аргумената, замењује два прва директоријума.\n" +" \n" +" Опције:\n" +" -n\tПотискује нормалну замену директоријума приликом додавања\n" +" \t директоријума у спремник, тако да се ради само са спремником.\n" +" \n" +" Аргументи:\n" +" +N\tОкреће спремник тако да је N-ти директоријум на врху (бројећи\n" +" са леве стране списка кога приказује „dirs“, почевши од " +"нуле).\n" +" \n" +" -N\tОкреће спремник тако да је N-ти директоријум на врху (бројећи\n" +" са десне стране списка кога приказује „dirs“, почевши од " +"нуле).\n" +" \n" +" dir\tДодајеs ДИР у спремник директоријума на врху, учинивши га новим\n" +" \t текућим радним директоријумом.\n" +" \n" +" Уграђеност „dirs“ приказује спремник директоријума.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није достављен неисправан аргумент или " +"замена\n" +" директоријума не успе." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Уклања директоријуме из спремника.\n" +" \n" +" Уклања уносе из спремника директоријума. Без аргумената, уклања први\n" +" директоријум из спремника, и пребацује на нови први директоријум.\n" +" \n" +" Опције:\n" +" -n\tПотискује уобичајену замену директоријума приликом уклањања\n" +" \t директоријума из спремника, тако да се ради само са " +"спремником.\n" +" \n" +" Аргументи:\n" +" +N\tУклања N-ти унос почевши са леве стране списка кога приказује\n" +" \t „dirs“, почевши од нуле. На пример: „popd +0“ уклања први\n" +" \t директоријум, „popd +1“ други.\n" +" \n" +" -N\tУклања N-ти унос почевши са десне стране списка кога приказује\n" +" \t „dirs“, почевши од нуле. На пример: „popd -0“ уклања " +"последњи\n" +" \t директоријум, „popd -1“ претпоследњи.\n" +" \n" +" Уграђеност „dirs“ приказује спремник директоријума.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није достављен неисправан аргумент или " +"измена\n" +" директоријума не успе." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Приказује спремник директоријума.\n" +" \n" +" Приказује списак тренутно запамћених директоријума. Директоријуми\n" +" налазе свој пут до списка помоћу наредбе „pushd“; можете да се вратите\n" +" назад на списак помоћу наредбе „popd“.\n" +" \n" +" Опције:\n" +" -c\tчисти спремник директоријума брисањем свих елемената\n" +" -l\tне исписује издања директоријума са предметком тилде\n" +" \t односне на ваш лични директоријум\n" +" -p\tисписује спремник директоријума са једним уносом у реду\n" +" -v\tисписује спремник директоријума са једним уносом у реду\n" +" са предметком свог положаја у спремнику\n" +" \n" +" Аргументи:\n" +" +N\tПриказујеs N-ти унос бројећи са леве стране на списку кога\n" +" приказује „dirs“ када се призове без опција, почевши од " +"нуле.\n" +" \n" +" -N\tПриказујеs N-ти унос бројећи са десне стране на списку кога\n" +" приказује „dirs“ када се призове без опција, почевши од " +"нуле.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако " +"не дође до грешке." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Подешава и расподешава опције шкољке.\n" +" \n" +" Мења подешавање сваке оције шкољке НАЗИВ_ОПЦИЈЕ. Без аргумената " +"опција,\n" +" исписује сваки достављени НАЗИВ_ОПЦИЈЕ, или све опције шкољке ако није\n" +" дат ниједан НАЗИВ_ОПЦИЈЕ, са назнаком да ли је свака подешена или није.\n" +" \n" +" Опције:\n" +" -o\tограничава НАЗИВЕ_ОПЦИЈА на оне одређене за коришћење са „set -o“\n" +" -p\tисписује сваку опцију љуске са назнаком њеног стања\n" +" -q\tпотискује излаз\n" +" -s\tукључује (подешава) сваки НАЗИВ_ОПЦИЈЕ\n" +" -u\tискључује (расподешава) сваки НАЗИВ_ОПЦИЈЕ\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат ако је НАЗИВ_ОПЦИЈЕ укључен; неуспех ако је " +"дата\n" +" неисправна опција или ако је НАЗИВ_ОПЦИЈЕ искључен." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Обликује и исписује АРГУМЕНТЕ под управом ЗАПИСА.\n" +" \n" +" Опције:\n" +" -v пром\tдодељује излаз променљивој шкољке ПРОМ уместо да га\n" +" \t\tприкаже на стандардном излазу\n" +" \n" +" ЗАПИС јесте ниска знака која садржи три врсте објекта: обични знаци,\n" +" који се једноставно умножавају на стандардни излаз; низови прекида\n" +" знака, који се претварају и умножавају на стандардни излаз; и одредбе\n" +" записа, од којих свака доводи до исписивања следећег наредног " +"аргумента.\n" +" \n" +" Као додатак одредбама стандардног записа описаних у „printf(1)“,\n" +" „printf“ тумачи:\n" +" \n" +" %b\tшири низове прекида контра косе црте у одговарајући аргумент\n" +" %q\tцитира аргумент на начин како би био коришћен као улаз шкољке\n" +" %(fmt)T исписује ниску датум-време резултирајући коришћењем ФМТ-а " +"као\n" +" ниске записа за „strftime(3)“\n" +" \n" +" Запис се поново користи јер је потребно утрошити све аргументе. Ако\n" +" има више аргумената него што то захтева запис, излишне одредбе записа\n" +" се понашају као да је достављена вредност нуле или ништавна ниска.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако не\n" +" дође до грешке писања или доделе." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Наводи како ће аргументе да доврши Читај ред.\n" +" \n" +" За сваки НАЗИВ, наводи како ће аргументи бити довршени. Ако опције\n" +" нису достављене, постојеће одредбе довршавања се исписују на начин\n" +" који омогућава да буду поново коришћене као улаз.\n" +" \n" +" Опције:\n" +" -p\tисписује постојеће одредбе довршавања у поново употребљивом " +"запису\n" +" -r\tуклања одредбу довршавања за сваки НАЗИВ, или, ако НАЗИВИ нису\n" +" \t достављени, све одредбе довршавања\n" +" -D\tпримењује довршавања и радње као основне за радње\n" +" \t без одређеног посебног довршавања\n" +" -E\tпримењује довршавања и радње на „празне“ наредбе --\n" +" \t довршавање покушано на празном реду\n" +" -I\tпримењује довршавања и радње на почетну (обично наредбу) реч\n" +" \n" +" Када се покуша са довршавањем, радње се примењују по редоследу опција\n" +" великих слова наведених горе. Опција „-D“ има првенство над „-E“, и обе " +"имају предност у односу на „-I“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако " +"не дође до грешке." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Приказује могућа довршавања у зависности од опција.\n" +" \n" +" Замишљен за коришћење из функције шкољке стварајући могућа довршавања.\n" +" Ако је достављен изборни аргумент РЕЧ, стварају се поређења са РЕЧЈУ.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако " +"не дође до грешке." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Мења или приказује опције довршавања.\n" +" \n" +" Мења опције довршавања за сваки НАЗИВ, или, ако НАЗИВИ нису достављени,\n" +" довршавања које се тренутно извршава. Ако ОПЦИЈЕ нису дате, исписује\n" +" опције довршавања за сваки НАЗИВ или одредбу текућег довршавања.\n" +" \n" +" Опције:\n" +" \t-o опција\tПодешава опцију довршавања ОПЦИЈА за сваки НАЗИВ\n" +" \t-D\t\tМења опције за „основно“ довршавање наредбе\n" +" \t-E\t\tМења опције за „празно“ довршавање наредбе\n" +" \t-I\t\tМења опције за довршавање почетне речи\n" +" \n" +" Употреба „+o“ уместо „-o“ искључује наведену опцију.\n" +" \n" +" Аргументи:\n" +" \n" +" Сваки НАЗИВ упућује на наредбу за коју одредба довршавања мора " +"претходно\n" +" бити одређена употребом уграђености „complete“. Ако НАЗИВИ нису дати,\n" +" „compopt“ мора бити позвано функцијом која тренутно ствара довршавања,\n" +" а опције ствараоца који тренутно извршава довршавање су измењене.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или " +"НАЗИВ\n" +" нема одређену одредбу довршавања." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Чита редове са стандардног улаза у променљивој индексираног низа.\n" +" \n" +" Чита редове са стандардног улаза у променљивој индексираног низа НИЗ, " +"или\n" +" из описника датотеке ОД ако је достављена опција „-u“. Променљива " +"МАПОТЕКА\n" +" јесте основни НИЗ.\n" +" \n" +" Опције:\n" +" -d гранич Користи ГРАНИЧНИК да оконча редове, уместо новог реда\n" +" -n број Умножава највише БРОЈ редова. Ако је БРОЈ 0, умножавају " +"се сви редови\n" +" -O порекло Почиње додељивање НИЗУ при индексу ПОРЕКЛО. Основни " +"индекс је 0\n" +" -s број Одбацује првих БРОЈ прочитаних редова\n" +" -t Уклања пратећи ГРАНИЧНИК из сваког прочитаног реда " +"(основни нови ред)\n" +" -u од Чита редове из описника датотеке ОД уместо са стандардног " +"улаза\n" +" -C опозив Процењује ОПОЗИВ сваког пута када се прочита КОЛИЧИНА " +"редова\n" +" -c количина Наводи број прочитаних редова између сваког позива за " +"ОПОЗИВ\n" +" \n" +" Аргументи:\n" +" НИЗ Назив променљиве низа за податке датотеке\n" +" \n" +" Ако је „-C“ достављено без „-c“, основна количина је 5000. Када се\n" +" процени ОПОЗИВ, достављен је индекс следећег елемента низа који ће\n" +" бити додељен и ред који ће бити додељен том елементу као додатни\n" +" аргументи.\n" +" \n" +" Ако није достављено са изричитим пореклом, мапфајл ће очистити НИЗ пре\n" +" него што му додели.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако је " +"НИЗ само\n" +" за читање или није индексирани низ." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Чита редове из датотеке у променљиву низа.\n" +" \n" +" Синоним за „mapfile“." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Ауторска права © 2018 Задужбина слободног софтвера, Доо." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "%s%cИсписује контекст текућег позива подрутине.\n" +#~ "\n" +#~ " Без „EXPR“, исписује" + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: процес %5ld (%s) у спојном_реду" + +#~ msgid "Unknown Signal #" +#~ msgstr "Непознат сигнал #" + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Ауторска права (C) 2014 Задужбина слободног софтвера, Доо." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/bash-5.1/po/sv.gmo b/bash-5.1/po/sv.gmo new file mode 100644 index 0000000000000000000000000000000000000000..1b825f688ec5fd605856b84e40a114c53c08928d Binary files /dev/null and b/bash-5.1/po/sv.gmo differ diff --git a/bash-5.1/po/sv.po b/bash-5.1/po/sv.po new file mode 100644 index 0000000000000000000000000000000000000000..7f5df528208311ecfc0c19984fef95593c690f77 --- /dev/null +++ b/bash-5.1/po/sv.po @@ -0,0 +1,5877 @@ +# Swedish translation of bash +# Copyright © 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2018, 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Göran Uddeborg , 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2018, 2019. +# +# $Revision: 1.26 $ +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-02-04 15:33+0100\n" +"Last-Translator: Göran Uddeborg \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "felaktigt vektorindex" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: tar bort attributet namnreferens" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: det går inte att konvertera en indexerad vektor till associativ" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: ogiltig nyckel till associativ vektor" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: det går inte att tilldela till ickenumeriska index" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: måste använda index vid tilldelning av associativ vektor" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: det går inte att skapa: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: det går inte att hitta en tangentbindning för " +"kommandot" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: första ickeblanka tecknet är inte '\"'" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "ingen avslutande ”%c” i %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: kolonseparator saknas" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "”%s”: det går inte att avbinda" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "klammerexpansion: kan inte allokera minne för %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "klammerexpansion: misslyckades att allokera minne för %u element" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "klammerexpansion: misslyckades att allokera minne för ”%s”" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "”%s”: ogiltigt aliasnamn" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "radredigering är inte aktiverat" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "”%s”: ogiltigt tangentbindningsnamn" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: det går inte att läsa: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "”%s”: okänt funktionsnamn" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s är inte bundet till några tangenter.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s kan anropas via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "”%s”: det går inte att avbinda" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "slingräknare" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "endast meningsfullt i en ”for”-, ”while”- eller ”until”-slinga" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Returnera kontexten för det aktuella funktionsanropet.\n" +" \n" +" Utan UTTR, returneras ”$rad $filnamn”. Med UTTR, returneras\n" +" ”$rad $subrutin $filnamn”. Denna extra information kan användas för\n" +" att ge en stackspårning.\n" +" \n" +" Värdet på UTTR indikerar hur många anropsramar att gå tillbaka före den\n" +" aktuella, toppramen är ram 0.\n" +" \n" +" Slutstatus:\n" +" Returnerar 0 om inte skalet inte kör en skalfunktion eller UTTR är\n" +" ogiltigt." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME är inte satt" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "för många argument" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null-katalog" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD är inte satt" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "rad %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "varning: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: användning: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: flaggan kräver ett argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: numeriskt argument krävs" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: finns inte" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: ogiltig flagga" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: ogiltigt flaggnamn" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "”%s”: inte en giltig identifierare" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "ogiltigt oktalt tal" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "ogiltigt hexadecimalt tal" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "ogiltigt tal" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: ogiltig signalspecifikation" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "”%s”: inte en pid eller giltig jobbspecifikation" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: endast läsbar variabel" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s utanför giltigt intervall" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s utanför giltigt intervall" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: inget sådant jobb" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: ingen jobbstyrning" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "ingen jobbstyrning" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: begränsat" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "begränsat" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: inte inbyggt i skalet" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "skrivfel: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "fel när terminalattribut ställdes in: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "fel när terminalattribut hämtades: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: fel när aktuell katalog hämtades: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: tvetydig jobbspecifikation" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "hjälp är inte tillgängligt i denna version" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: det går inte att ta bort tilldelning: endast läsbar %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: det går inte att ta bort tilldelning" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: ogiltigt åtgärdsnamn" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: ingen kompletteringsspecifikation" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "varning: flaggan -F fungerar kanske inte som du väntar dig" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "varning: flaggan -C fungerar kanske inte som du väntar dig" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "kör inte en kompletteringsfunktion" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "kan endast användas i en funktion" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: en referensvariabel kan inte vara en vektor" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: att en namnreferensvariabel självrefererar är inte tillåtet" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: cirkulär namnreferens" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "”%s”: ogiltigt variabelnamn för referens" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "det går inte att använda ”-f” för att göra funktioner" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: endast läsbar funktion" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: citerad sammansatt tilldelning av vektorer undanbedes" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: det går inte att förstöra vektorvariabler på detta sätt" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: det går inte att konvertera en associativ vektor till indexerad" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "dynamisk laddning är inte tillgängligt" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "det går inte att öppna delat objekt %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "kan inte hitta %s i det delade objektet %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: inte dynamiskt laddad" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "inläsningsfunktionen för %s returnerar misslyckande (%d): inte inläst" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: inte dynamiskt laddad" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: kan inte ta bort: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: är en katalog" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: inte en normal fil" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: filen är för stor" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: det går inte att köra binär fil" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: kan inte köra: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "utloggning\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "inte ett inloggningsskal: använd ”exit”" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Det finns stoppade jobb.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Det finns körande jobb.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "hittar inget kommando" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "historiespecifikation" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: det går inte att öppna temporärfil: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "aktuell" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "jobb %d startade utan jobbstyrning" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ogiltig flagga -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: flaggan kräver ett argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashning avslaget" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hashtabellen tom\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "träffar\tkommando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Skalkommandon som matchar nyckelordet '" +msgstr[1] "Skalkommandon som matchar nyckelorden '" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"inget hjälpämne matchar ”%s”. Prova ”help help” eller ”man -k %s” eller " +"”info %s”." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: det går inte att öppna: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Dessa skalkommandon är definierade internt. Skriv ”help” för att se\n" +"denna lista. Skriv ”help namn” för att få reda på mer om funktionen\n" +"”namn”. Använd ”info bash” för att få reda på mer om skalet rent\n" +"allmänt. Använd ”man -k” eller ”info” för att få reda på mer om\n" +"kommandon som inte är i listan.\n" +"\n" +"En stjärna (*) bredvid ett namn betyder att det kommandot är avstängt.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "det går inte att använda mer än en av -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "historieposition" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: ogiltig tidsstämpel" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: historieexpansionen misslyckades" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib misslyckades" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "inga andra flaggor är tillåtna med ”-x”" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argument måste vara processer eller jobb-id:n" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Okänt fel" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "uttryck förväntades" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: inte en indexerad vektor" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: ogiltig filbeskrivarspecifikation" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: ogiltig filbeskrivare: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: ogiltigt radantal" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: ogiltig vektorstart" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: ogiltigt kvantum för återanrop" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "tomt vektorvariabelnamn" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "stöd för vektorvariabler krävs" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "”%s”: formateringstecken saknas" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "”%c”: ogiltig specifikation av tidsformat" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "”%c”: ogiltigt formateringstecken" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "varning: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "formattolkningsproblem: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "hexadecimal siffra saknas för \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "unicode-siffra saknas för \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "ingen annan katalog" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: ogiltigt argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "katalogstacken är tom" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "katalogstackindex" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Visa listan av kataloger i minnet just nu. Kataloger hamnar i listan\n" +" med kommandot ”pushd”. Du kan komma tillbaka upp genom listan med\n" +" kommandot ”popd”.\n" +" \n" +" Flaggor:\n" +" -c\tnollställ katalogstacken genom att bo bort alla elementen\n" +" -l\tskriv inte ut versioner med tildeprefix av kataloger som är\n" +" \trelativa din hemkatalog\n" +" -p\tskriv katalogstacken med en post per rad\n" +" -v\tskriv katalogstacken med en post per rad inledda med dess\n" +" \tposition i stacken\n" +" \n" +" Argument:\n" +" +N\tVisa den N:e posten räknat från vänster i listan som visas\n" +" \tav dirs när det anropas utan flaggor, räknat från noll.\n" +" \n" +" -N\tVisa den N:e posten räknat från höger i listan som visas\n" +"\tav dirs när det anropas utan flaggor, räknat från noll." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Lägger till en katalog till toppen av katalogstacken, eller roterar\n" +" stacken, och gör den nya toppen av stacken till den aktuella\n" +" arbetskatalogen. Utan argument, byt de två toppkatalogerna.\n" +" \n" +" Flaggor:\n" +" -n\tUndertryck det normala bytet av katalog när kataloger\n" +" \tläggs till på stacken, så att endast stacken ändras.\n" +" \n" +" Argument:\n" +" +N\tRoterar stacken så att den N:e katalogen (räknat från\n" +" \tvänster i listan som visas av ”dirs”, med början på noll) hamnar\n" +" \tpå toppen.\n" +" \n" +" -N\tRoterar stacken så att den N:e katalogen (räknat från\n" +" \thöger i listan som visas av ”dirs”, med början på noll) hamnar\n" +" \tpå toppen.\n" +" \n" +" kat\tLägger till KAT till toppen av katalogstacken, och gör den\n" +" \ttill den nya aktuella arbetskatalogen.\n" +" \n" +" Den inbyggda ”dirs” visar katalogstacken." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Tar bort poster från katalogstacken. Utan argument tas den översta\n" +" katalogen bort från stacken, och byte görs till den nya toppkatalogen.\n" +" \n" +" Flaggor:\n" +" -n\tUndertryck det normala bytet av katalog när kataloger\n" +" \tläggs till på stacken, så att endast stacken ändras.\n" +" \n" +" Arguments:\n" +" +N\tTar bort den N:e posten räknat från vänster i listan\n" +" \tsom visas av ”dirs”, med början på noll. Till exempel: ”popd +0”\n" +" \ttar bort den första katalogen, ”popd +1” den andra.\n" +" \n" +" -N\tTar bort den N:e posten räknat från höger i listan\n" +" \tsom visas av ”dirs”, med början på noll. Till exempel: ”popd -0”\n" +" \ttar bort den sista katalogen, ”popd -1” den näst sista.\n" +" \n" +" Den inbyggda ”dirs” visar katalogstacken." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: ogiltig tidsgränsspecifikation" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "läsfel: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"det går bara att göra ”return” från en funktion eller källinläst skript" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "det går inte att samtidigt ta bort en funktion och en variabel" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: inte en vektorvariabel" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: inte en funktion" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: det går inte att exportera" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "skiftantal" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "det går inte att sätta och ta bort skalflaggor samtidigt" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: ogiltigt skalflaggsnamn" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "filnamnsargument krävs" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: filen finns inte" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "det går inte att suspendera" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "det går inte att suspendera ett inloggningsskal" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s är ett alias för ”%s”\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s är ett nyckelord i skalet\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s är en funktion\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s är en special inbyggd i skalet\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s är inbyggt i skalet\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s är %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s är hashad (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: ogiltigt gränsargument" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "”%c”: felaktigt kommando" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: kan inte avgöra gränsen: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "gräns" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: kan inte ändra gränsen: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktalt tal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "”%c”: ogiltig operator för symboliskt läge" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "”%c”: ogiltigt tecken för symboliskt läge" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " rad " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "senaste kommando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Avbryter..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORMATION: " + +#: error.c:462 +msgid "unknown command error" +msgstr "okänt kommandofel" + +#: error.c:463 +msgid "bad command type" +msgstr "felaktig kommandotyp" + +#: error.c:464 +msgid "bad connector" +msgstr "felaktig anslutning" + +#: error.c:465 +msgid "bad jump" +msgstr "felaktigt hopp" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: obunden variabel" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atiden gick ut i väntan på indata: automatisk utloggning\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "det går inte att omdirigera standard in från /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: ”%c”: ogiltigt formateringstecken" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] finns fortfarande" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "rörfel" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximal nästning av eval överskriden (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximal nästning av source överskriden (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximal nästning av funktioner överskriden (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: begränsat: det går inte att ange ”/” i kommandonamn" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: kommandot finns inte" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: felaktig tolk" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: det går inte att köra binär fil: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "”%s”: är en speciell inbyggd" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "det går inte att duplicera fb %d till fb %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "rekursionsnivå i uttryck överskriden" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "underspill i rekursionsstacken" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "syntaxfel i uttrycket" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "försök att tilldela till en icke-variabel" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "syntaxfel i variabeltilldelning" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "division med 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "fel: felaktig expassign-symbol" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "”:” förväntades i villkorligt uttryck" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "exponenten är mindre än 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "en identifierare förväntades efter pre-ökning eller pre-minskning" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "”)” saknas" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "syntaxfel: en operand förväntades" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntaxfel: ogiltig aritmetisk operator" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (felsymbol är ”%s”)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "ogiltig aritmetisk bas" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: ogiltigt radantal" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "värdet är för stort för basen" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: uttrycksfel\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: det går inte att komma åt föräldrakatalogen" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "det går inte att återställa fördröjningsfritt läge för fb %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"det går inte att allokera en ny filbeskrivare för bashindata från fb %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffert finns redan för ny fb %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp rör" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "avgrenad pid %d finns i körande jobb %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "tar bort stoppat jobb %d med processgrupp %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) markerad som fortfarande vid liv" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: ingen sådan pid" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Klart" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Stoppad" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Stoppad(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Kör" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Klart(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Avslut %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Okänd status" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(minnesutskrift skapad) " + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (ak: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "barns setpgid (%ld till %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld är inte ett barn till detta skal" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Ingen uppgift om process %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: jobb %d är stoppat" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: inget sådant jobb" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: jobbet har avslutat" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: jobb %d är redan i bakgrunden" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: slår på WNOHANG för att undvika oändlig blockering" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: rad %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (minnesutskrift skapad)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(ak nu: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp misslyckades" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: ingen jobbstyrning i bakgrunden" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: linjedisciplin" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "det går inte att sätta terminalprocessgrupp (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "ingen jobbstyrning i detta skal" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: försäkran misslyckades: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: försäkran gick fel\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "okänd" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: block på frilista överskrivet" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: anropad med redan frigjort block som argument" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: anropad med oallokerat block som argument" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: underspill upptäckt: mh_nbytes utanför giltigt intervall" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underspill upptäckt: mh_nbytes utanför giltigt intervall" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: start- och slutstyckesstorlekar skiljer" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: anropat med oallokerat block som argument" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: underspill upptäckt: mh_nbytes utanför giltigt intervall" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underspill upptäckt: mh_nbytes utanför giltigt intervall" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: start- och slutstyckesstorlekar skiljer" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: allokeringstabellen är full med FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p finns redan i tabellen som allokerat?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p finns redan i tabellen som fritt?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "ogiltig bas" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: okänd värd" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: ogiltig tjänst" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: felaktig specifikation av nätverkssökväg" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "nätverksoperationer stöds inte" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: det går inte att ändra lokal (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: det går inte att ändra lokal (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: det går inte att ändra lokal (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: det går inte att ändra lokal (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Du har post i $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Du har ny post i $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Posten i %s har lästs\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "syntaxfel: aritmetiskt uttryck krävs" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "syntaxfel: oväntat ”;”" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntaxfel: ”((%s))”" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: felaktig instruktionstyp %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "här-dokument på rad %d avgränsas av filslut (ville ha ”%s”)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection: omdirigeringsinstruktion ”%d” utanför giltigt intervall" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) överstiger SIZE_MAX (%lu): raden " +"avhuggen" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "maximalt antal av här-dokument överskridet" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "oväntat filslut vid sökning efter matchande ”%c”" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "oväntat filslut vid sökning efter ”]]”" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntaxfel i villkorligt uttryck: oväntad symbol ”%s”" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "syntaxfel i villkorligt uttryck" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "oväntad symbol ”%s”, ”)” förväntades" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "”)” förväntades" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "oväntat argument ”%s” till villkorlig unär operator" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "oväntat argument till villkorlig unär operator" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "oväntad symbol ”%s”, villkorlig binär operator förväntades" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "villkorlig binär operator förväntades" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "oväntat argument ”%s” till villkorlig binär operator" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "oväntat argument till villkorlig binär operator" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "oväntad symbol ”%c” i villkorligt kommando" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "oväntad symbol ”%s” i villkorligt kommando" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "oväntad symbol %d i villkorligt kommando" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntaxfel nära den oväntade symbolen ”%s”" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntaxfel nära ”%s”" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "syntaxfel: oväntat filslut" + +#: parse.y:6365 +msgid "syntax error" +msgstr "syntaxfel" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Använd ”%s” för att lämna skalet.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "oväntat filslut när matchande ”)” söktes" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "komplettering: funktion ”%s” finns inte" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: möjlig slinga av omförsök" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: felaktig anslutning ”%d”" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: ogiltig filbeskrivare" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL-filpekare" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: ”%c”: ogiltigt formateringstecken" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "filbeskrivare utanför giltigt intervall" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: tvetydig omdirigering" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: det går inte att skriva över en existerande fil" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: begränsat: det går inte att omdirigera utdata" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "det går inte att skapa temporärfil för här-dokument: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: det går inte att tilldela fb till variabel" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port stöds inte utan nätverksfunktion" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "omdirigeringsfel: det går inte att duplicera fb" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "hittade inte /tmp, var god skapa!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp måste vara ett giltigt katalognamn" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "läget för snygg utskrift ignoreras i interaktiva skal" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: ogiltig flagga" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "det går sätta uid till %d: effektiv uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "det går inte att sätta gid till %d: effektiv gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "kan inte starta felsökaren, felsökningsläge avaktiverat" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: är en katalog" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Jag har inget namn!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, version %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Användning:\t%s [GNU lång flagga] [flagga] ...\n" +"\t\t%s [GNU lång flagga] [flagga] skriptfil ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU långa flaggor:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Skalflaggor:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD eller -c kommando eller -O shopt_flagga\t\t(bara uppstart)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s eller -o flagga\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Skriv ”%s -c 'help set'” för mer information om skalflaggor.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Skriv ”%s -c help” för mer information om inbyggda skalkommandon.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" +"Använd kommandot ”bashbug” för att rapportera fel.\n" +"Skicka synpunkter på översättningen till .\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash hemsida: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Allmän hjälp i att använda GNU-program: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: ogiltig operation" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Felaktig signal" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Avringd" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Avbruten" + +#: siglist.c:58 +msgid "Quit" +msgstr "Lämnad" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Otillåten instruktion" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Brytpunkt/spårningsfälla" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "ABORT-instruktion" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Emulatorfälla" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Flyttalsfel" + +#: siglist.c:86 +msgid "Killed" +msgstr "Dödad" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Bussfel" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Segmenteringsfel" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Felaktigt systemanrop" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Brutet rör" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Alarmklocka" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Avslutat" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Viktigt I/O-tillstånd" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Stoppad (signal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Återupptagen" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Barn dött eller stoppat" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Stoppad (terminalläsning)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Stoppad (terminalskrivning)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O möjligt" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU-gräns" + +#: siglist.c:154 +msgid "File limit" +msgstr "Filgräns" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (virtuell tid)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profilering)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Ändrat fönster" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Postlås" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Användarsignal 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Användarsignal 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT-indata väntar" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "strömavbrott omedelbart förestående" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "systemkrasch omedelbart förestående" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "migrera process till en annan CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "programmeringsfel" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT-övervakningsläge givet" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT-övervakare borttagen" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT-ljudsekvens har avslutat" + +#: siglist.c:214 +msgid "Information request" +msgstr "Informationsbegäran" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Okänd signal nr %d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "felaktig substitution: ingen avslutande ”%s” i %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: det går inte att tilldela listor till vektormedlemmar" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "det går inte att skapa rör för processubstitution" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "det går inte att skapa barn för processubstitution" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "det går inte att öppna namngivet rör %s för läsning" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "det går inte att öppna namngivet rör %s för skrivning" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "det går inte att duplicera namngivet rör %s som fb %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "kommandoersättning: ignorerade nollbyte i indata" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "det går inte att skapa rör för kommandosubstitution" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "det går inte att skapa barn för kommandosubstitution" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: det går inte att duplicera rör som fb 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: ogiltigt variabelnamn för referens" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: felaktig indirekt expansion" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: felaktigt variabelnamn" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametern är inte satt" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametern tom eller inte satt" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: delstränguttryck < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: felaktig substitution" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: det går inte att tilldela på detta sätt" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"framtida versioner av skalet kommer att framtvinga evaluering som en " +"aritmetisk substitution" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "felaktig ersättning: ingen avslutande ”`” i %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "ingen matchning: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argument förväntades" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: heltalsuttryck förväntades" + +#: test.c:265 +msgid "`)' expected" +msgstr "”)” förväntades" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "”)” förväntades, fann %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: binär operator förväntades" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: unär operator förväntades" + +#: test.c:881 +msgid "missing `]'" +msgstr "”]” saknas" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntaxfel: oväntat ”;”" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "ogiltigt signalnummer" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "fällhanterare: maximal nivå av fällhanterare överskriden (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: felaktigt värde i trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signalhanterare är SIG_DFL, skickar om %d (%s) till mig " +"själv" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: felaktig signal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "fel vid import av funktionsdefinition för ”%s”" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "skalnivå (%d) för hög, återställer till 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: ingen funktionskontext i aktuellt sammanhang" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variabeln får inte tilldelas ett värde" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: tilldelar ett heltal till en namnreferens" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: ingen funktionskontext i aktuellt sammanhang" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s har tom exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "ogiltigt tecken %d i exportstr för %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "inget ”=” i exportstr för %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: huvudet på shell_variables är inte en funktionskontext" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: ingen kontext global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: huvudet på shell_variables är inte en temporär omgivningsräckvidd" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: går inte att öppna som FILE" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: ogiltigt värde för spårningsfilbeskrivare" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: kompatibilitetsvärde utanför giltigt intervall" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Copyright © 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licens GPLv3+: GNU GPL version 3 eller senare \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, version %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Detta är fri programvara, du får fritt ändra och vidaredistribuera den." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Det finns INGEN GARANTI, så långt lagen tillåter." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: det går inte att allokera %lu byte (%lu byte allokerade)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: det går inte att allokera %lu byte" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: det går inte att allokera %lu byte (%lu byte allokerade)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: det går inte att allokera %lu byte" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [namn[=värde] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] namn [namn ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVSX] [-m tangentkarta] [-f filnamn] [-q namn] [-u namn] [-r " +"tangentsekv] [-x tangentsekv:skalkommando] [tangentsekv:readline-funktion " +"eller readline-kommando]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [skalinbyggd [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [uttr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [kat]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] kommando [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [namn[=värde] …]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] namn[=värde] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [flagga] namn[=värde] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filnamn] [namn ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts flgsträng namn [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a namn] [kommando [argument ...]] [omdirigering ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e rnamn] [-lnr] [första] [sista] eller fc -s [mnst=ers] [kommando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [jobbspec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [jobbspec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p sökväg] [-dt] [namn ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [mönster ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d avstånd] [n] eller history -anrw [filnamn] eller history -" +"ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobbspec ...] eller jobs -x kommando [arg]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobbspec … | pid …]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobbspec ... eller kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a vektor] [-d avgr] [-i text] [-n ntkn] [-N ntkn] [-p prompt] " +"[-t tidgräns] [-u fb] [namn ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o flaggnamn] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [namn …]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [namn[=värde] ...] eller export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [namn[=värde] ...] eller readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filnamn [argument]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". filnamn [argument]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [uttr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signalspec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] namn [namn ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [gräns]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [rättigheter]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id …]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid …]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAMN [in ORD ... ] ; do KOMMANDON; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( utr1; utr2; utr3 )); do KOMMANDON; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAMN [in ORD ... ;] do KOMMANDON; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] rör" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case ORD in [MÖNSTER [| MÖNSTER]...) KOMMANDON ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if KOMMANDON; then KOMMANDON; [ elif KOMMANDON; then KOMMANDON; ]... [ else " +"KOMMANDON; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while KOMMANDON; do KOMMANDON; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until KOMMANDON; do KOMMANDON; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAMN] kommando [omdirigeringar]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function namn { KOMMANDON ; } or namn () { KOMMANDON ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMMANDON ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "jobbspec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( uttryck ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ uttryck ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variabler - Namn och betydelse av några skalvariabler" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | kat]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [flgnamn ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [argument]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o flagga] [-A åtgärd] [-G globmnst] " +"[-W ordlista] [-F funktion] [-C kommando] [-X filtermnst] [-P prefix] [-S " +"suffix] [namn …]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o flagga] [-A åtgärd] [-G globmnst] [-W " +"ordlista] [-F funktion] [-C kommando] [-X filtermnst] [-P prefix] [-S " +"suffix] [ord]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o flagga] [-DEI] [namn …]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d avgränsare] [-n antal] [-O start] [-s antal] [-t] [-u fb] [-C " +"återanrop] [-c kvanta] [vektor]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d avgränsare] [-n antal] [-O start] [-s antal] [-t] [-u fb] [-C " +"återanrop] [-c kvanta] [vektor]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Definiera eller visa alias.\n" +" \n" +" Utan argument skriver ”alias” listan på alias på den återanvändbara " +"formen\n" +" ”alias NAMN=VÄRDE” på standard ut.\n" +" \n" +" Annars är ett alias definierat för varje NAMN vars VÄRDE är angivet.\n" +" Ett avslutande blanktecken i VÄRDE gör att nästa ord undersöks för\n" +" aliassubstitution när aliaset expanderas.\n" +" \n" +" Flaggor:\n" +" -p\tskriv alla definierade alias på en återanvändbar form\n" +" \n" +" Slutstatus:\n" +" alias returnerar sant om inte ett NAMN ges för vilket inget alias har\n" +" definierats." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Ta bort alla NAMN från listan med definierade alias.\n" +" \n" +" Flaggor:\n" +" -a\tta bort alla aliasdefinitioner\n" +" \n" +" Returnerar framgång om inte ett NAMN inte är ett existerande alias." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Sätt Readline-tangentbindningar och -variabler.\n" +" \n" +" Bind en tangentsekvens till en Readline-funktion eller -makro, eller " +"sätt\n" +" en Readline-variabel. Syntaxen för argument vid sidan om flaggor är\n" +" densamma som den i ~/.inputrc, men måste skickas som ett ensamt " +"argument:\n" +" t.ex., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Flaggor:\n" +" -m tangentkarta Använt TANGENTKARTA som tangentkarta under detta\n" +" kommando. Acceptabla tangentkartenamn är emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command och vi-insert.\n" +" -l Lista namnen på funktioner.\n" +" -P Lista funktionsnamn och bindningar.\n" +" -p Lista funktioner och bindningar på ett sätt som " +"kan\n" +" återanvändas som indata.\n" +" -S Lista tangentsekvenser som anropar makron och " +"deras\n" +" värden.\n" +" -s Lista tangentsekvenser som anropar makron och " +"deras\n" +" värden på ett sätt som kan återanvändas som " +"indata.\n" +" -V Lista variabelnamn och värden\n" +" -v Lista variabelnamn och värden på ett sätt som kan\n" +" återanvändas som indata.\n" +" -q funktionsnamn Fråga efter vilka tangenter som anropar den " +"namngivna\n" +" funktionen\n" +" -u funktionsnamn Tag bort alla tangenter som är bundna till den\n" +" namngivna funktionen.\n" +" -r tangentsekv Ta bort bindningen för TANGENTSEKV.\n" +" -f filnamn Läs tangentbindningar från FILNAMN.\n" +" -x tangentsekv:skalkommando Gör så att SKALKOMMANDO körs när\n" +" \t\t\t\t TANGENTSEKV skrivs.\n" +" -X Lista tangentsekvenser bundna med -x och " +"tillhörande\n" +" kommandon på ett format som kan återanvändas som\n" +" indata.\n" +" \n" +" Slutstatus:\n" +" bind returnerar 0 om inte en okänd flagga ges eller ett fel inträffar." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Avsluta for-, while- eller until-slinga.\n" +" \n" +" Avsluta en FOR-, WHILE eller UNTIL-slinga. Om N anges, avbryt N\n" +" omslutande slingor.\n" +" \n" +" Slutstatus:\n" +" Returvärdet är 0 förutsatt att N är större eller lika med 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Återuppta for-, while eller until-slinga.\n" +" \n" +" Återuppta nästa iteration i den omslutande FOR-, WHILE- eller UNTIL-" +"slingan.\n" +" Om N anges, återuppta den N:e omslutande slingan.\n" +" \n" +" Slutstatus:\n" +" Slutstatus är 0 förutsatt att N är större eller lika med 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Exekvera en i skalet inbyggd funktion.\n" +" \n" +" Exekvera SKALINBYGGD med argument ARG utan att utföra " +"kommandouppslagning.\n" +" Detta är användbart när du vill implementera om en inbyggd funktion i\n" +" skalet som en skalfunktion, men behöver köra den inbyggda funktionen i\n" +" skalfunktionen.\n" +" \n" +" Slutstatus:\n" +" Returnerar slutstatus från SKALINBYGGD, eller falskt om SKALINBYGGD " +"inte\n" +" är inbyggd i skalet." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Returnera kontexten för det aktuella funktionsanropet.\n" +" \n" +" Utan UTTR, returneras ”$rad $filnamn”. Med UTTR, returneras\n" +" ”$rad $subrutin $filnamn”. Denna extra information kan användas för\n" +" att ge en stackspårning.\n" +" \n" +" Värdet på UTTR indikerar hur många anropsramar att gå tillbaka före den\n" +" aktuella, toppramen är ram 0.\n" +" \n" +" Slutstatus:\n" +" Returnerar 0 om inte skalet inte kör en skalfunktion eller UTTR är\n" +" ogiltigt." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Ändra skalets arbetskatalog.\n" +" \n" +" Ändra den aktuella katalogen till KAT. Standardvärde på KAT är värdet\n" +" på skalvariabeln HOME.\n" +" \n" +" Variabeln CDPATH definierar sökvägen för katalogen som innehåller KAT.\n" +" Alternativa katalognamn i CDPATH separeras av ett kolon (:). Ett tomt\n" +" katalognamn är detsamma som aktuell katalog. Om KAT börjar med ett\n" +" snedstreck (/) används inte CDPATH.\n" +" \n" +" Om katalogen inte kan hittas, och skalvariabeln ”cdable_vars” är satt,\n" +" antas ordet vara ett variabelnamn. Om den variabeln har ett värde\n" +" används dess värde för KAT.\n" +" \n" +" Flaggor:\n" +" -L\tframtvinga att symboliska länkar följs: lös upp symboliska\n" +" \tKAT efter behandling av instanser av ”..”\n" +" -P\tanvänd den fysiska katalogstrukturen utan att följa\n" +" \tsymboliska länkar: lös upp symboliska länkar i KAT före behandling av\n" +" \t”..”\n" +" -e\tom flaggan -P ges, och det inte går att avgöra den aktuella\n" +" \tkatalogen, returnera då med status skild från noll\n" +" -@ på system som stödjer det, presentera en fil med utökade " +"attribut\n" +" som en katalog som innehåller filattributen\n" +" \n" +" Standardvärde är att följa symboliska länkar, som om ”-L” vore angivet.\n" +" ”..” behandlas genom att ta bort den omedelbart föregående\n" +" sökvägskomponenten tillbaka till ett snedstreck eller början av KAT\n" +" \n" +" Slutstatus:\n" +" Returnerar 0 om katalogen är ändrad, och om $PWD satts korrekt om -P\n" +" angetts; skilt från noll annars." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Skriv namnet på den aktuella arbetskatalogen.\n" +" \n" +" Flaggor:\n" +" -L\tskriv värdet på $PWD om det är namnet på den aktuella\n" +" \t\tarbetskatalogen\n" +" -P\tskriv den fysiska katalogen, utan några symboliska länkar\n" +" \n" +" Som standard beter sig ”pwd” som om ”-L” vore angivet.\n" +" \n" +" Slutstatus:\n" +" Returnerar 0 om inte en ogiltig flagga anges eller den aktuella " +"katalogen\n" +" inte kan läsas." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Tomt kommando.\n" +" \n" +" Ingen effekt. Kommandot gör ingenting.\n" +" \n" +" Slutstatus:\n" +" Lyckas alltid." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Returnerar ett lyckat resultat.\n" +" \n" +" Slutstatus:\n" +" Lyckas alltid." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Returnera ett misslyckat resultat.\n" +" \n" +" Slutstatus:\n" +" Misslyckas alltid." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Exekvera ett enkelt kommando eller visa information om kommandon.\n" +" \n" +" Kör KOMMANDO med ARGument och utelämna uppslagning av skalfunktioner,\n" +" eller visa information om det angivna KOMMANDOt. Kan användas för att\n" +" anropa kommandon på disk när det finns en funktion med samma namn.\n" +" \n" +" Flaggor:\n" +" -p använd ett standardvärde på PATH som är garanterat att hitta\n" +" \t alla standardverktygen\n" +" -v skriv en beskrivning av KOMMANDO liknande den inbyggda ”type”\n" +" -V skriv en mer utförlig beskrivning om varje KOMMANDO\n" +" \n" +" Slutstatus:\n" +" Returnerar slutstatus från KOMMANDO, eller misslyckande om KOMMANDO " +"inte\n" +" finns." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Sätt variabelvärden och -attribut.\n" +" \n" +" Deklarera variabler och ge dem attribut. Om inget NAMN anges, visa\n" +" attributen och värdena på alla variabler.\n" +" \n" +" Flaggor:\n" +" -f\tbegränsa åtgärden till att visa funktionsnamn och -definitioner\n" +" -F\tbegränsa visandet till endast funktionsnamn (plus radnummer\n" +" \t\toch källkodsfil vid felsökning)\n" +" -g\tskapa globala variabler när använt i en skalfunktion, ignoreras\n" +" \t\ti övrigt\n" +" -p\tvisa attributen och värden på varje NAMN\n" +" \n" +" Flaggor som sätter attribut:\n" +" -a\tför att göra NAMN till indexerade vektorer (om det stöds)\n" +" -A\tför att göra NAMN till associativa vektorer (om det stöds)\n" +" -i\tför att ge NAMN attributet ”heltal”\n" +" -l\tför att konvertera värdet av varje NAMN till gemena vid " +"tilldelning\n" +" -n\tgör NAMN till en referens till variabeln som namnges som värde\n" +" -r\tför att göra NAMN endast läsbart\n" +" -t\tför att ge NAMN attributet ”spåra”\n" +" -u\tför att konvertera värdet av varje NAMN till versaler vid " +"tilldelning\n" +" -x\tför att exportera NAMN\n" +" \n" +" Användning av ”+” istället för ”-” slår av det angivna attributet.\n" +" \n" +" För variabler med attributet heltal utförs aritmetisk beräkning (se\n" +" kommandot ”let”) när variabeln tilldelas ett värde.\n" +" \n" +" Vid användning i en funktion gör ”declare” NAMN lokala, som med " +"kommandot\n" +" ”local”. Flaggan ”-g” åsidosätter detta beteende.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel vid\n" +" variabeltilldelning inträffar." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Sätt variabelvärden och -attribut.\n" +" \n" +" En synonym för ”declare”. Se ”help declare”." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definiera lokala variabler.\n" +" \n" +" Skapa en lokal variabel kallad NAMN, och ge den VÄRDE. FLAGGA kan\n" +" vara alla flaggor som accepteras av ”declare”.\n" +" \n" +" Lokala variabler kan endast användas i en funktion; de är synliga " +"endast\n" +" för funktionen de definieras i och dess barn.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges, ett fel vid\n" +" variabeltilldelning inträffar eller skalet inte exekverar en funktion." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skriv argument på standard ut.\n" +" \n" +" Visa ARGumenten, separerade av ensamma blanktecken och följda av en\n" +" nyrad, på standard ut.\n" +" \n" +" Flaggor:\n" +" -n\tlägg inte till en nyrad\n" +" -e\taktivera tolkning av nedanstående specialsekvenser\n" +" -E\tundertryck uttryckligen tolkning av specialsekvenser\n" +" \n" +" ”echo” tolkar följande bakstrecksekvenser:\n" +" \\a\talarm (klocka)\n" +" \\b\tbacksteg\n" +" \\c\tundertryck följande utdata\n" +" \\e\tescape-tecknet\n" +" \\E\tescape-tecknet\n" +" \\f\tsidmatning\n" +" \\n\tnyrad\n" +" \\r\tvagnretur\n" +" \\t\thorisontell tabulator\n" +" \\v\tvertikal tabulator\n" +" \\\\\tbakstreck\n" +" \\0nnn\ttecknet vars ASCII-kod är NNN (oktalt). NNN kan vara\n" +" \t\t0 till 3 oktala siffror\n" +" \\xHH\tdet åttabitarstecken vars värde är HH (hexadecimalt). HH\n" +" \t\tkan vara en eller två hexadecimala siffror\n" +" \\uHHHH\tdet Unicode-tecken vars värde är det hexadeimala värdet " +"HHHH.\n" +" \t\tHHHH kan vara en till fyra hexadecimala siffror.\n" +" \\UHHHHHHHH det Unicode-tecken vars värde är det hexadecimala värdet\n" +" \t\tHHHHHHHH. HHHHHHHH kan vara en till åtta hexadecimala siffror.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte ett skrivfel inträffar." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skriv argument på standard ut.\n" +" \n" +" Visa ARGumenten på standard ut följt av en nyrad.\n" +" \n" +" Flaggor:\n" +" -n\tlägg inte till en nyrad\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte ett skrivfel inträffar." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Aktivera och avaktivera inbyggda kommandon i skalet.\n" +" \n" +" Aktiverar och avaktiverar inbyggda skalkommandon. Avaktivering låter\n" +" dig exekvera diskkommandon som har samma namn som ett inbyggt\n" +" skalkommando utan att använda en fullständig sökväg.\n" +" \n" +" Flaggor:\n" +" -a\tskriv en lista av inbyggda kommando och visa om de är\n" +" \taktiverade eller ej\n" +" -n\tavaktivera varje NAMN eller visa en lista av avaktiverade\n" +" \tkommandon\n" +" -p\tskriv listan av inbyggda kommandon på en återanvändbar\n" +" \tform\n" +" -s\tskriv endast namnen på Posix ”special”-inbyggda\n" +" \n" +" Flaggor som styr dynamisk inläsning:\n" +" -f\tLäs in inbyggt NAMN från en delad objektfil FILNAMN\n" +" -d\tTa bort en inbyggd inläst med -f\n" +" \n" +" Utan flaggor aktiveras varje NAMN.\n" +" \n" +" För att använda den ”test” som finns i sökvägen istället för den i\n" +" skalet inbyggda versionen, skriv ”enable -n test”.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte NAMN inte är inbyggd i skalet eller ett fel\n" +" inträffar." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Exekvera argument som ett skalkommando.\n" +" \n" +" Kombinera ARGument till en enda sträng, och använd resultatet som " +"indata\n" +" till skalet och exekvera de resulterande kommandona.\n" +" \n" +" Slutstatus:\n" +" Returnerar slutstatus av kommandot eller framgång om kommandot är tomt." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Tolka flaggargument.\n" +" \n" +" Getopts används av skalprocedurer för att tolka positionsparametrar\n" +" som flaggor.\n" +" \n" +" FLGSTRÄNG innehåller de flaggtecken som skall kännas igen. Om ett\n" +" tecken följs av ett kolon förväntas flaggan ha ett argument, som\n" +" skall separeras från den med blanktecken.\n" +" \n" +" Varje gång det anropas kommer getopts placera nästa flagga i skal-\n" +" variabeln $namn, initiera namnet om det inte redan finns, och\n" +" index på nästa argument läggas i skalvariabeln OPTIND. OPTIND\n" +" initieras till 1 varje gång skalet eller ett skalskript startas. När\n" +" en flagga behöver ett argument placerar getopts det argumentet i\n" +" skalvariabeln OPTARG.\n" +" \n" +" getopts rapporterar fel på ett av två sätt. Om det första tecknet\n" +" i OPTSTRING är ett kolon använder getopts tyst felrapportering. I\n" +" detta läge skrivs inget felmeddelande ut. Om en ogiltig flagga ses\n" +" placerar getopts det funna flaggtecknet i OPTARG. Om ett nödvändigt\n" +" argument inte finns placerar getopts ett ”:” i NAMN och sätter OPTARG\n" +" till det funna flaggtecknet. Om getopts inte är i tyst läge och en\n" +" felaktig flagga upptäcks placerar getopts ”?” i NAMN och tar bort\n" +" OPTARG. Om ett nödvändigt argument inte hittas placeras ett ”?” i\n" +" NAMN, OPTARG tas bort och ett felmeddelande skrivs.\n" +" \n" +" Om skalvariabeln OPTERR har värdet 0 avaktiverar getopts utskriften\n" +" av felmeddelanden, även om det första tecknet i FLGSTRÄNG inte är ett\n" +" kolon. OPTERR har värdet 1 som standard.\n" +" \n" +" Getopts tolkar normalt positionsparametrarna ($0 - $9), men om fler\n" +" argument ges tolkas de istället.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om en flagga hittas, misslyckas om slutet av\n" +" flaggorna nås eller ett fel inträffar." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Ersätt skalet med det givna kommandot.\n" +" \n" +" Exekvera KOMMANDO genom att ersätta detta skal med det angivna " +"programmet.\n" +" ARGUMENT blir argument till KOMMANDO. Om KOMMANDO inte anges kommer\n" +" eventuella omdirigeringar att gälla för det aktuella skalet.\n" +" \n" +" Flaggor:\n" +" -a namn\tskicka NAMN som det nollte argumentet till KOMMANDO\n" +" -c\texekvera KOMMANDO med en tom miljö\n" +" -l\tplacera ett streck i det nollte argumentet till KOMMANDO\n" +" \n" +" Om kommandot inte kan exekveras avslutar ett ickeinteraktivt skal, om\n" +" inte skalflaggan ”execfail” är satt.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte KOMMANDO inte finns eller ett fel vid\n" +" omdirigering inträffar." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Avsluta skalet.\n" +" \n" +" Avslutar skalet med statusen N. Om N utelämnas är slutstatusen den\n" +" hos det sist körda kommandot." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Avsluta ett inloggningsskal.\n" +" \n" +" Avslutar ett inloggningsskal med slutstatus N. Returnerar ett fel om\n" +" det inte körs i ett inloggningsskal." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Visa eller kör kommandon från historielistan.\n" +" \n" +" fc används för att lista eller redigera och köra om kommandon från\n" +" historielistan. FÖRSTA och SISTA kan vara tal som anger intervallet,\n" +" eller så kan FÖRSTA vara en sträng, som betyder det senaste kommandot\n" +" som börjar med den strängen.\n" +" \n" +" Flaggor:\n" +" -e RNAMN\tvälj vilken redigerar som skall användas. Standard är\n" +" \t\tFCEDIT, sedan EDITOR, sedan vi\n" +" -l \tlista rader istället för att redigera\n" +" -n\tutelämna radnummer vid listningen\n" +" -r\treversera ordningen på raderna (nyaste listas först)\n" +" \n" +" Med formatet ”fc -s [mnst=ers ...] [kommando]” körs KOMMANDO om efter\n" +" att substitutionen GAMMALT=NYTT har utförts.\n" +" \n" +" Ett användbart alias att använda med detta är r=\"fc -s\", så att " +"skriva\n" +" ”r cc” kör senaste kommandot som börjar med ”cc” och att skriva ”r” kör\n" +" om senaste kommandot.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång eller status på exekverat kommando, skilt från noll\n" +" om ett fel inträffar." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Flytta ett jobb till förgrunden.\n" +" \n" +" Placera jobbet som identifieras av JOBBSPEC i förgrunden, och gör det\n" +" till det aktuella jobbet. Om ingen JOBBSPEC finns används skalets\n" +" begrep om det aktuella jobbet.\n" +" \n" +" Slutstatus:\n" +" Status på kommandot som placerades i förgrunden, eller misslyckande om\n" +" ett fel inträffar." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Flytta jobb till bakgrunden.\n" +" \n" +" Placera jobben som identifieras av varje JOBBSPEC i bakgrunden som om " +"de\n" +" hade startats med ”&”. Om ingen JOBBSPEC finns används skalets begrepp\n" +" om det aktuella jobbet.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte jobbstyrning inte är aktiverat eller ett " +"fel\n" +" inträffar." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Kom ihåg eller visa programlägen.\n" +" \n" +" Bestäm och kom ihåg den fullständiga sökvägen till varje kommando NAMN.\n" +" Om inget argument ges visas information om kommandon som finns i " +"minnet.\n" +" \n" +" Flaggor:\n" +" -d\tglöm platsen i minnet för varje NAMN\n" +" -l\tvisa i ett format som kan återanvändas som indata\n" +" -p sökväg använd SÖKVÄG som den fullständiga sökvägen till NAMN\n" +" -r\tglöm alla platser i minnet\n" +" -t\tskriv platsen i minnet för varje NAMN, med NAMN före\n" +" \t\tvarje motsvarande plats om flera NAMN ges\n" +" Argument:\n" +" NAMN\tVarje NAMN söks efter i $PATH och läggs till i listan\n" +" \t\tav kommandon i minnet.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte NAMN inte hittas eller en ogiltig flagga ges." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Visa information om inbyggda kommandon.\n" +" \n" +" Visar korta sammanfattningar om inbyggda kommandon. Om MÖNSTER anges\n" +" ges detaljerad hjälp om alla kommandon som matchar MÖNSTER, annars " +"skrivs\n" +" listan med hjälpämnen.\n" +" \n" +" Flaggor:\n" +" -d\tvisa en kort beskrivning för varje ämne\n" +" -m\tvisa användning i låtsas-mansideformat\n" +" -s\tvisa endast ett kort användningsformat för varje ämne som\n" +" \t\tmatchar MÖNSTER\n" +" \n" +" Argument:\n" +" MÖNSTER\tMönster som anger hjälpämnen\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte MÖNSTER inte finns eller en ogiltig flagga " +"ges." + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Visa eller hantera historielistan.\n" +" \n" +" Visa historielistan med radnummer, inled varje modifierad post med en\n" +" ”*”. Ett argument N listar endast de N senaste posterna.\n" +" \n" +" Flaggor:\n" +" -c\tnollställ historielistan genom att ta bort alla poster\n" +" -d avstånd\tta bort historieposten på position AVSTÅND. Negativa\n" +" \t\tavstånd räknar baklänges från slutet av historielistan \n" +" \n" +" -a\tlägg till historierader från denna session till historiefilen\n" +" -n\tläs alla historierader som inte redan lästs från historiefilen\n" +" \t\toch lägg till dem till historielistan\n" +" -r\tläs historiefilen och lägg till innehållet till historielistan\n" +" -w\tskriv den aktuella historien till historiefilen\n" +" \n" +" -p\tutför historieexpansion på varje ARG och visa resultatet utan\n" +" \t\tatt lagra det i historielistan\n" +" -s\tlägg till ARG till historielistan som en ensam post\n" +" \n" +" Om FILNAMN anges används det som historiefil. Annars, om HISTFILE har\n" +" ett värde används det, annars ~/.bash_history.\n" +" \n" +" Om variabeln HISTTIMEFORMAT är satt och inte tom används dess värde som\n" +" en formatsträng till strftime(3) för att skriva tidsstämplar " +"tillhörande\n" +" varje visad historiepost. Inga tidsstämplar skrivs annars.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " +"inträffar." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Visa status på jobb.\n" +" \n" +" Lista de aktiva jobben. JOBBSPEC begränsar utdata till det jobbet.\n" +" Utan flaggor visas status på alla aktiva jobb.\n" +" \n" +" Flaggor:\n" +" -l\tlistar process-id:n utöver den normala informationen\n" +" -n\tlistar endast processer som har ändrat status sedan senaste\n" +" notifiering\n" +" -p\tlistar endast process-id:n\n" +" -r\tbegränsar utdata till körande jobb\n" +" -s\tbegränsar utdata till stoppade jobb\n" +" \n" +" Om -x anges körs KOMMANDO efter alla jobbspecifikationer som förekommer\n" +" i ARG har ersatts med process-id:t för det jobbets processgruppledare.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " +"inträffar.\n" +" Om -x används returneras slutstatus från KOMMANDO." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Ta bort jobb från det aktuella skalet.\n" +" \n" +" Tar bort varje JOBBSPEC-argument från tabellen över aktiva jobb. Utan\n" +" någon JOBBSPEC använder skalet sitt begrepp om det aktuella jobbet.\n" +" \n" +" Flaggor:\n" +" -a\tta bort alla jobb om JOBBSPEC inte anges\n" +" -h\tmärk varje JOBBSPEC så att SIGHUP inte skickas till jobbet om\n" +" \t\tskalet tar emot en SIGHUP\n" +" -r\ttar bara bort körande jobb\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga eller JOBBSPEC ges." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Skicka en signal till ett jobb.\n" +" \n" +" Skicka processerna som identifieras av PID eller JOBBSPEC signalerna " +"som\n" +" namnges av SIGSPEC eller SIGNUM. Om varken SIGSPEC eller SIGNUM är\n" +" angivna antas SIGTERM.\n" +" \n" +" Flaggor:\n" +" -s sig\tSIG är ett signalnamn\n" +" -n sig\tSIG är ett signalnummer\n" +" -l\tlista signalnamnen. Om argument följer ”-l” antas de vara\n" +" \t\tsignalnummer som namn skall listas för\n" +" -L\tsynonym för -l\n" +" \n" +" Kill är inbyggt i skalet av två skäl: det tillåter att jobb-id:n " +"används\n" +" istället för process-id:n, och det tillåter processer att dödas om " +"gränsen\n" +" för hur många processer du får skapa har nåtts.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga angivits eller ett fel\n" +" inträffar." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Evaluera aritmetiska uttryck.\n" +" \n" +" Evaluera varje ARG som ett aritmetiskt uttryck. Evaluering görs i " +"heltal\n" +" med fix bredd utan kontroll av spill, fast division med 0 fångas och\n" +" flaggas som ett fel. Följande lista över operatorer är grupperad i\n" +" nivåer av operatorer med samma precedens. Nivåerna är listade i " +"ordning\n" +" med sjunkande precedens.\n" +" \n" +" \tid++, id--\tpostinkrementering av variabel, postdekrementering\n" +" \t++id, --id\tpreinkrementering av variabel, predekrementering\n" +" \t-, +\t\tunärt minus, plus\n" +" \t!, ~\t\tlogisk och bitvis negering\n" +" \t**\t\texponentiering\n" +" \t*, /, %\t\tmultiplikation, division, rest\n" +" \t+, -\t\taddition, subtraktion\n" +" \t<<, >>\t\tvänster och höger bitvisa skift\n" +" \t<=, >=, <, >\tjämförelse\n" +" \t==, !=\t\tlikhet, olikhet\n" +" \t&\t\tbitvis OCH\n" +" \t^\t\tbitvis EXKLUSIVT ELLER\n" +" \t|\t\tbitvis ELLER\n" +" \t&&\t\tlogiskt OCH\n" +" \t||\t\tlogiskt ELLER\n" +" \tuttr ? uttr : uttr\n" +" \t\t\tvillkorlig operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\ttilldelning\n" +" \n" +" Skalvariabler är tillåtna som operander. namnet på variablerna ersätts\n" +" med deras värde (omformat till ett heltal med fix bredd) inom ett\n" +" uttryck. Variablerna behöver inte ha sina heltalsattribut påslagna för\n" +" att användas i ett uttryck.\n" +" \n" +" Operatorer beräknas i precedensordning. Deluttryck i parenteser " +"beräknas\n" +" först och kan åsidosätta precedensreglerna ovan.\n" +" \n" +" Slutstatus:\n" +" Om det sista ARG beräknas till 0, returnerar let 1; let returnerar 0 " +"annars." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Läs en rad från standard in och dela upp den i fält.\n" +" \n" +" Läser en ensam rad från standard in, eller från filbeskrivare FB om\n" +" flaggan -u ges. Raden delas upp i fält som vid orduppdelning, och " +"första\n" +" ordet tilldelas det första NAMNet, andra ordet till det andra NAMNet, " +"och\n" +" så vidare, med eventuella återstående ord tilldelade till det sista\n" +" NAMNet. Endast tecknen som finns i $IFS används som ordavgränsare.\n" +" \n" +" Om inga NAMN anges, lagras den inlästa raden i variabeln REPLY.\n" +" \n" +" Flaggor:\n" +" -a vektor\ttilldela de inlästa orden till sekventiella index i " +"vektor-\n" +" \t\tvariabeln VEKTOR, med start från noll\n" +" -d avgr\tfortsätt tills det första tecknet i AVGR lästs, istället för\n" +" \t\tnyrad\n" +" -e\tanvänd Readline för att få in raden\n" +" -i text\tAnvänd TEXT som starttext för Readline\n" +" -n ntkn\treturnera efter att ha läst NTKN tecken istället för att\n" +" \t\tvänta på en nyrad, men ta hänsyn till en avgränsare om färre\n" +" \t\tän NTKN tecken lästs före avgränsaren\n" +" -N ntkn\treturnera endast efter att ha läst exakt NTKN tecken, om " +"inte\n" +" \t\tfilslut påträffades eller tidsgränsen överskreds, ignorera\n" +" \t\talla avgränsare\n" +" -p prompt\tskriv ut strängen PROMPT utan en avslutande nyrad före\n" +" \t\tförsök att läsa\n" +" -r\ttillåt inte bakstreck att skydda några tecken\n" +" -s\teka inte indata som kommer från terminalen\n" +" -t tidgräns\tsluta vänta och returnera misslyckande om inte en\n" +" \t\tkomplett rad lästs inom TIDSGRÄNS sekunder. Värdet på variabeln\n" +" \t\tTMOUT är standardvärdet på tidsgränsen. TIDSGRÄNS kan vara ett\n" +" \t\tdecimaltal. Om TIDSGRÄNS är 0 returnerar read direkt, utan\n" +" att försöka läsa några data, och returnerar lyckad status " +"bara\n" +"\t\tom det finns indata tillgängligt på den angivna filbeskrivaren.\n" +" Slutstatus är större än 128 om tidsgränsen överskrids\n" +" -u fb\tläs från filbeskrivare FB istället för standard in\n" +" \n" +" Slutstatus:\n" +" Returkoden är noll om inte filslut nås, läsningens tidsgräns överskrids\n" +" (då den är större än 128), ett fel vid variabeltilldelning inträffar " +"eller\n" +" en ogiltig filbeskrivare ges som argument till -u." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Returnera från en skalfunktion.\n" +" \n" +" Får en funktion eller ett källinläst skript att avsluta med returvärdet\n" +" som anges av N. Om N utelämnas är returstatus den hos det sista\n" +" kommandot som körts i funktionen eller skriptet.\n" +" \n" +" Slutstatus:\n" +" Returnerar N, eller misslyckande om skalet inte kör en funktion eller\n" +" skript." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Sätt eller ta bort satta värden på skalflaggor och positionsparametrar.\n" +" \n" +" Ändra värdet på skalattribut och positionsparametrar, eller visa namnen\n" +" och värdena på skalvariabler.\n" +" \n" +" Flaggor:\n" +" -a Markera variabler om ändras eller skapas för export.\n" +" -b Rapportera om avslutade jobb omedelbart.\n" +" -e Avsluta omedelbart om ett kommando avslutar med nollskild status.\n" +" -f Avaktivera filnamnsgenerering (globbing).\n" +" -h Kom ihåg platsen för kommandon när de slås upp.\n" +" -k Alla tilldelningsargument placeras i miljön för ett kommando, " +"inte\n" +" bara de som föregår kommandonamnet.\n" +" -m Jobbstyrning är aktiverat.\n" +" -n Läs kommandon men exekvera dem inte.\n" +" -o flaggnamn\n" +" Sätt variabeln som motsvarar flaggnamn:\n" +" allexport samma som -a\n" +" braceexpand samma som -B\n" +" emacs använd radredigeringsgränssnitt i emacsstil\n" +" errexit samma som -e\n" +" errtrace samma som -E\n" +" functrace samma som -T\n" +" hashall samma som -h\n" +" histexpand samma som -H\n" +" history aktivera kommandohistoria\n" +" ignoreeof skalet kommer inte avsluta vid läsning av " +"filslut\n" +" interactive-comments\n" +" tillåt kommentarer att förekomma i interaktiva\n" +" kommandon\n" +" keyword samma som -k\n" +" monitor samma som -m\n" +" noclobber samma som -C\n" +" noexec samma som -n\n" +" noglob samma som -f\n" +" nolog accepteras men ignoreras för närvarande\n" +" notify samma som -b\n" +" nounset samma som -u\n" +" onecmd samma som -t\n" +" physical samma som -P\n" +" pipefail returvärdet av ett rör är status på det sista\n" +" kommandot som avslutas med en status skild från\n" +" noll, eller noll om inget kommando avslutas med\n" +" en status skild från noll\n" +" posix ändra beteendet på bash där standardbeteendet\n" +" skiljer sig från Posixstandarden till att stämma\n" +" med standarden\n" +" privileged samma som -p\n" +" verbose samma som -v\n" +" vi använd radredigeringsgränssnitt i vi-stil\n" +" xtrace samma som -x\n" +" -p Slås på när den verkliga och effektiva användar-id:n inte stämmer\n" +" överens. Avaktiverar bearbetning av $ENV-filen och import av\n" +" skalfunktioner. Att slå av denna flagga får den effektiva uid " +"och\n" +" gid att sättas till den verkliga uid och gid.\n" +" -t Avsluta efter att ha läst och exekverat ett kommando.\n" +" -u Behandla osatta variabler som fel vid substitution.\n" +" -v Skriv skalindatarader allteftersom de läses.\n" +" -x Skriv kommandon och deras argument allteftersom de körs.\n" +" -B skalet kommer utföra klammerexpansion\n" +" -C Om satt tillåts inte existerande normala filer att skrivas över\n" +" av omdirigering av utdata.\n" +" -E Om satt ärvs ERR-fällan av skalfunktioner.\n" +" -H Aktivera historiesubstitution i !-stil. Denna flagga är på som\n" +" standard när skalet är interaktivt.\n" +" -P Om satt löses inte symboliska länkar upp när kommandon såsom cd\n" +" körs som ändrar aktuell katalog.\n" +" -T Om satt ärvs DEBUG och RETURN-fällorna av skalfunktioner.\n" +" -- Tilldela eventuella återstående argument till " +"positionsparametrar.\n" +" Om det inte finns några återstående argument nollställs\n" +" positionsparametrarna.\n" +" - Tilldela eventuella återstående argument till " +"positionsparametrar.\n" +" Flaggorna -x och -v slås av.\n" +" \n" +" Användning av + istället för - får dessa flaggor att slås av. " +"Flaggorna\n" +" kan även användas vid uppstart av skalet. Den aktuella uppsättningen\n" +" flaggor finns i $-. De återstående n ARGumenten är positionsparametrar\n" +" och tilldelas, i ordning, till $1, $2, .. $n. Om inga ARGument ges\n" +" skrivs alla skalvariabler ut.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Ta bort värden och attribut på skalvariabler och -funktioner.\n" +" \n" +" Tag för varje NAMN bort motsvarande variabel eller funktion.\n" +" \n" +" Flaggor:\n" +" -f\tbehandla varje NAMN som en skalfunktion\n" +" -v\tbehandla varje NAMN som en skalvariabel\n" +" -n\tbehandla varje NAMN som en namnreferens tar bort värdet på\n" +" variabeln själv istället för variabeln den refererar\n" +" \n" +" Utan flaggor försöker unset först att ta bort en variabel, och, om det\n" +" misslyckas, försöker den ta bort en funktion.\n" +" \n" +" Några variabler kan inte tas bort, se även ”readonly”.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller NAMN endast är\n" +" läsbart." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Sätt exportattribut på skalvariabler.\n" +" \n" +" Markerar varje NAMN för automatisk export till miljön för senare\n" +" exekverade kommandon. Om VÄRDE anges tilldelas VÄRDE före export.\n" +" \n" +" Flaggor:\n" +" -f\treferera till skalfunktioner\n" +" -n\tta bort exportegenskapen från varje NAMN\n" +" -p\tvisa en lista av alla exporterade variabler och funktioner\n" +" \n" +" Ett argument ”--” avslutar vidare flaggbearbetning.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller NAMN är ogiltigt." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Markera skalvariabler som oföränderliga.\n" +" \n" +" Markera varje NAMN som oföränderligt. Värdena på dessa NAMN kan inte\n" +" ändras av senare tilldelningar. Om VÄRDE anges tilldelas VÄRDE före\n" +" variabeln markeras oföränderlig.\n" +" \n" +" Flaggor:\n" +" -a\treferera till indexerade vektorvariabler\n" +" -A\trefererar till associativa vektorvariabler\n" +" -f\treferera till skalfunktioner\n" +" -p\tvisa en lista över alla oföränderliga variabler eller funktioner,\n" +" beroende på huruvida flaggan -f ges\n" +" \n" +" Ett argument ”--” avslutar vidare flaggbearbetning.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller NAMN är ogiltigt." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Skifta positionsparametrar.\n" +" \n" +" Byt namn på positionsparametrarna $N+1,$N+2 ... till $1,$2 ... Om N " +"inte\n" +" anges antas det vara 1.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte N är negativt eller större än $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Exekvera kommandon från en fil i det aktuella skalet.\n" +" \n" +" Läs och exekvera kommandon från FILNAMN i det aktuella skalet. " +"Posterna\n" +" i $PATH används för att hitta katalogen som innehåller FILNAMN. Om\n" +" något ARGUMENT ges blir de positionsparametrar när FILNAMN körs.\n" +" \n" +" Slutstatus:\n" +" Returnerar status på det sista kommandot som körs i FILNAMN, misslyckas\n" +" om FILNAMN inte kan läsas." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Suspendera skalexekvering.\n" +" \n" +" Suspendera exekveringen av detta skal tills det får en SIGCONT-signal.\n" +" Om det inte framtvingas kan inloggningsskal inte suspenderas.\n" +" \n" +" Flaggor:\n" +" -f\tframtvinga suspendering, även om skalet är ett inloggningsskal\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte jobbstyrning inte är aktiverat eller ett " +"fel\n" +" inträffar." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Beräkna villkorligt uttryck.\n" +" \n" +" Avslutar med en status på 0 (sant) eller 1 (falskt) beroende på\n" +" beräkningen av UTTR. Uttryck kan vara unära eller binära. Unära\n" +" uttryck är ofta till för att undersöka status för en fil. Det finns\n" +" strängoperatorer och numeriska jämförelseoperatorer också.\n" +" \n" +" Beteendet hos test beror på antalet argument. Läs bash-manualsidan\n" +" för den fullständiga specifikationen.\n" +" \n" +" Filoperatorer:\n" +" \n" +" -a FIL Sant om filen finns.\n" +" -b FIL Sant om filen är en blockspecialfil.\n" +" -c FIL Sant om filen är en teckenspecialfil.\n" +" -d FIL Sant om filen är en katalog.\n" +" -e FIL Sant om filen finns.\n" +" -f FIL Sant om filen finns, och är en normal fil.\n" +" -g FIL Sant om filen är sätt-grupp-id.\n" +" -h FIL Sant om filen är en symbolisk länk.\n" +" -L FIL Sant om filen är en symbolisk länk.\n" +" -k FIL Sant om filen har ”fastbiten” satt.\n" +" -p FIL Sant om filen är ett namngivet rör.\n" +" -r FIL Sant om filen kan läsas av dig.\n" +" -s FIL Sant om filen finns och inte är tom.\n" +" -S FIL Sant om filen är ett uttag (socket).\n" +" -t FB Sant om FB är öppnad mot en terminal.\n" +" -u FIL Sant om filen är sätt-användar-id.\n" +" -w FIL Sant om filen är skrivbar av dig.\n" +" -x FIL Sant om filen är exekverbar av dig.\n" +" -O FIL Sant om filen ägs av din verksamma användare.\n" +" -G FIL Sant om filen ägs av din verksamma grupp.\n" +" -N FIL Sant om filen har ändrats sedan den sist lästes.\n" +" \n" +" FIL1 -nt FIL2 Sant om fil1 är nyare än fil2 (enligt\n" +" modifieringsdatum).\n" +" \n" +" FIL1 -ot FIL2 Sant om fil1 är äldre än fil2.\n" +" \n" +" FIL1 -ef FIL2 Sant om fil1 är en hård länk till fil2.\n" +" \n" +" Strängoperatorer:\n" +" \n" +" -z STRÄNG Sant om strängen är tom.\n" +" \n" +" -n STRÄNG\n" +" STRÄNG Sant om strängen inte är tom.\n" +" \n" +" STRÄNG1 = STRÄNG2\n" +" Sant om strängarna är lika.\n" +" STRÄNG1 != STRÄNG2\n" +" Sant om strängarna inte är lika.\n" +" STRÄNG1 < STRÄNG2\n" +" Sant om STRÄNG1 kommer före STRÄNG2 lexikografiskt.\n" +" STRÄNG1 > STRÄNG2\n" +" Sant om STRÄNG1 kommer efter STRÄNG2 lexikografiskt.\n" +" \n" +" Andra operatorer:\n" +" \n" +" -o FLAGGA Sant om skalflaggan FLAGGA är aktiv.\n" +" -v VAR Sant om skalvariabeln VAR är satt.\n" +" -R VAR Sant om skalvariabeln VAR är satt och är en " +"namnreferens.\n" +" ! UTTR Sant om uttr är falskt.\n" +" UTTR1 -a UTTR2 Sant om både uttr1 OCH uttr2 är sanna.\n" +" UTTR1 -o UTTR2 Sant om antingen uttr1 ELLER uttr2 är sanna.\n" +" \n" +" arg1 OP arg2 Aritmetiska test. OP är en av -eq, -ne,\n" +" -lt, -le, -gt eller -ge.\n" +" \n" +" Aritmetiska binära operatorer returnerar sant om ARG1 är lika-med,\n" +" inte-lika-med, mindre-än, mindre-än-eller-lika-med, större-än eller\n" +" större-än-eller-lika-med ARG2.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om UTTR beräknas till sant. Misslyckas ifall UTTR\n" +" beräknas till falskt eller ett ogiltigt argument ges." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Beräkna villkorligt uttryck.\n" +" \n" +" Detta är en synonym till det inbyggda ”test”, men det sista argumentet\n" +" måste vara en bokstavlig ”]”, för att matcha den inledande ”[”." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Visa processtider.\n" +" \n" +" Skriver ut den sammanlagda användar- och systemtiden för skalet och " +"alla\n" +" dess barnprocesser.\n" +" \n" +" Slutstatus:\n" +" Lyckas alltid." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Fånga signaler och andra händelser.\n" +" \n" +" Definierar och aktiverar hanterare som skall köras när skalet tar emot\n" +" signaler eller andra omständigheter.\n" +" \n" +" ARG är ett kommando som skall läsas och exekveras när skalet tar emot\n" +" signalen SIGNALSPEC. Om ARG inte anges (och en ensam SIGNALSPEC ges)\n" +" eller ”-” återställs varje angiven signal till sitt originalvärde. Om\n" +" ARG är den tomma strängen ignoreras varje SIGNALSPEC av skalet och av\n" +" kommandon det startar.\n" +" \n" +" Om en SIGNALSPEC är EXIT (0) exekveras ARG vid avslut från skalet. Om\n" +" en SIGNALSPEC är DEBUG exekveras ARG före varje enkelt kommando. Om\n" +" en SIGNALSPEC är RETURN exekveras ARG varje gång en skalfunktion eller\n" +" ett skript kört med den inbyggda . eller source avslutar körningen. En\n" +" SIGNALSPEC ERR betyder att köra ARG varje gång ett kommandos felstatus\n" +" skulle fått skalet att avsluta om flaggan -e vore satt.\n" +" \n" +" Om inga argument ges skriver trap listan av kommandon som hör till " +"varje\n" +" signal.\n" +" \n" +" Flaggor:\n" +" -l\tskriv en lista av signalnamn och deras motsvarande nummer\n" +" -p\tvisa trap-kommandona associerade med varje SIGNALSPEC\n" +" \n" +" Varje SIGNALSPEC är antingen ett signalnamn i eller ett\n" +" signalnummer. Signalnamn är skiftlägesokänsliga och SIG-prefixet är\n" +" frivilligt. En signal kan skickas till skalet med ”kill -signal $$”.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en SIGSPEC är ogiltig eller en ogiltig " +"flagga\n" +" ges." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Visa information om kommandotyper.\n" +" \n" +" Indikera för varje NAMN hur det skulle tolkats om det användes som ett\n" +" kommandonamn.\n" +" \n" +" Flaggor:\n" +" -a\tvisa alla platser som innehåller ett körbart program med namnet\n" +" \t\tNAMN, inklusive alias, inbyggda och funktioner, om och endast\n" +" \t\tom flaggan ”-p” inte också används\n" +" -f\tutelämna uppslagning av skalfunktioner\n" +" -P\tframtvinga en PATH-sökning för varje NAMN, även om det är ett\n" +" \t\talias, inbyggt eller funktion, och returnera namnet på diskfilen\n" +" \t\tsom skulle blivit exekverad\n" +" -p\treturnerar antingen namnet på diskfilen som skulle exekverats,\n" +" \t\teller ingenting om ”type -t NAMN” inte skulle returnerat ”file”.\n" +" -t\tskriv ut ett ensamt ord som är ett av ”alias”, ”keyword”,\n" +" \t\t”function”, ”builtin”, ”file” eller ””, om NAMN är ett alias, ett\n" +" \t\treserverat ord i skalet, en skalfunktion, inbyggt i skalet, en\n" +" \t\tdiskfil respektive inte finns\n" +" \n" +" Argument:\n" +" NAMN\tKommandonamn som skall tolkas.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om alla NAMNen finns, misslyckas om något inte finns." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Modifiera skalresursgränser.\n" +" \n" +" Ger kontroll över resurserna som är tillgängliga till skalet och " +"processer\n" +" det skapar, på system som möjliggör sådan styrning.\n" +" \n" +" Flaggor:\n" +" -S\tanvänd den ”mjuka” resursgränsen\n" +" -H\tanvänd den ”hårda” resursgränsen\n" +" -a\talla aktuella gränser rapporteras\n" +" -b\tstorleken på uttagsbuffertar\n" +" -c\tden maximala storleken på minnesutskrifter som skapas\n" +" -d\tden maximala storleken på en process datasegment\n" +" -e\tden maximala schemaläggningsprioriteten (”nice”)\n" +" -f\tden maximala storleken på filer som skrivs av skalet och dess\n" +" \tbarn\n" +" -i\tdet maximala antalet väntande signaler\n" +" -k\tdet maximala antalet kqueue:r allokerade för denna process\n" +" -l\tden maximala storleken en process kan låsa i minnet\n" +" -m\tden maximala residenta mängdstorleken\n" +" -n\tdet maximala antalet öppna filbeskrivare\n" +" -p\trörbuffertstorleken\n" +" -q\tdet maximala antalet byte i POSIX-meddelandeköer\n" +" -r\tden maximala prioriteten för realtidsschemaläggning\n" +" -s\tden maximala stackstorleken\n" +" -t\tden maximala mängden cpu-tid i sekunder\n" +" -u\tdet maximala antalet användarprocesser\n" +" -v\tstorleken på det virtuella minnet\n" +" -x\tdet maximala antalet fillås\n" +" -P det maximala antalet pseudoterminaler\n" +" -T det maximala antalet trådar\n" +" \n" +" Alla flaggor är inte tillgängliga på alla plattformar.\n" +" \n" +" Om GRÄNS anges är det ett nytt värde för den specificerade resursen; de\n" +" speciella GRÄNS-värdena ”soft”, ”hard” och ”unlimited” står för den\n" +" aktuella mjuka gränsen, den aktuella hårda gränsen respektive ingen " +"gräns.\n" +" Annars skrivs det aktuella värdet på den specificerade resursen. Om\n" +" ingen flagga ges antas -f.\n" +" \n" +" Värden är i 1024-bytesteg, utom för -t som är i sekunder, -p som är i " +"steg\n" +" på 512 byte och -u som är ett antal processer utan någon skalning.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga anges eller ett fel " +"inträffar." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Visa eller sätt filrättighetsmask.\n" +" \n" +" Sätter användarens filskapningsmask till RÄTTIGHETER. Om RÄTTIGHETER\n" +" utelämnas skrivs det aktuella värdet på masken.\n" +" \n" +" Om RÄTTIGHETER börjar med en siffra tolkas det som ett oktalt tal, " +"annars\n" +" är det en symbolisk rättighetssträng som den som tas av chmod(1).\n" +" \n" +" Flaggor:\n" +" -p\tom RÄTTIGHETER utelämnas, skriv ut i en form som kan\n" +" \tåteranvändas som indata\n" +" -S\tgör utmatningen symbolisk, annars används oktala tal\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte RÄTTIGHETER är ogiltig eller en ogiltig " +"flagga\n" +" ges." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Vänta på att jobb blir färdiga och returnera slutstatus.\n" +" \n" +" Väntar på varje process som identifieras av ett ID, som kan vara en\n" +" process-id eller en jobbspecifikation, och rapportera dess\n" +" avslutningsstatus. Om ID inte ges, vänta på alla nu körande\n" +" barnprocesser, och returstatus är noll. Om ID är en " +"jobbspecifikation, \n" +" vänta på alla processer i det jobbets rör.\n" +" \n" +" Om flaggan -n ges väntar på nästa jobb att avsluta och returnera dess\n" +" slutstatus.\n" +" \n" +" Om flaggan -f anges, och jobbstyrning är aktiverat, väntar på att det\n" +" angivna ID:t avslutas, istället för att vänta på att det ändrar status.\n" +" \n" +" Slutstatus:\n" +" Returnerar status på den sista ID, misslyckas ifall ID är ogiltig\n" +" eller en ogiltig flagga ges." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Vänta på att en process blir färdig och returnerar slutstatus.\n" +" \n" +" Väntar på varje process som identifieras av en PID rapporterar dess\n" +" slutstatus. Om PID inte ges, väntar på alla nu körande barnprocesser,\n" +" och returstatus är noll. PID måste vara en process-id.\n" +" \n" +" Slutstatus:\n" +" Returnerar status på den sista PID, misslyckas ifall PID är ogiltig\n" +" eller en ogiltig flagga ges." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exekvera kommandon för varje medlem i en lista.\n" +" \n" +" ”for”-slingan exekverar en sekvens av kommandon för varje medlem i en\n" +" lista av element. Om ”in ORD ...;” inte är med antas 'in \"$@\"'. För\n" +" varje element i ORD sätts NAMN till det elementet, och KOMMANDON\n" +" exekveras.\n" +" \n" +" Slutstatus:\n" +" Returnerar status för det sist exekverade kommandot." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Aritmetisk for-slinga.\n" +" \n" +" Likvärdigt med\n" +" \t(( UTR1 ))\n" +" \twhile (( UTR2 )); do\n" +" \t\tKOMMANDON\n" +" \t\t(( UTR3 ))\n" +" \tdone\n" +" UTR1, UTR2 och UTR3 är aritmetiska uttryck. Om något uttryck utelämnas\n" +" beter det sig som om det beräknas till 1.\n" +" \n" +" Slutstatus:\n" +" Returnerar statusen från det sist exekverade kommandot." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Välj ord från en lista och exekvera kommandon.\n" +" \n" +" ORD expanderas och genererar en lista med ord. Mängden av\n" +" expanderade ord skrivs på standard fel, vart och ett föregånget\n" +" av ett tal. Om `in ORD' inte är med antas 'in \"$@\"'. Prompten\n" +" PS3 skrivs sedan och en rad läses från standard in. OM raden\n" +" består av numret motsvarande en av de visade orden sätts NAMN\n" +" till det ordet. Om raden är tom visas ORD och prompten igen.\n" +" Om filslut läses avslutar kommandot. Alla andra värden får NAMN\n" +" att bli satt till tomt. Den inlästa raden sparas i variabeln\n" +" REPLY. KOMMANDON exekveras efter varje val tills ett\n" +" break-kommando exekveras.\n" +" \n" +" Slutstatus:\n" +" Returnerar statusen från det sist exekverade kommandot." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Rapportera tiden som används av rörets exekvering.\n" +" \n" +" Exekvera RÖR och skriv en sammanfattning av den verkliga tiden,\n" +" användar-CPU-tiden och system-CPU-tiden som använts för att exekvera\n" +" RÖRet när det avslutar.\n" +" \n" +" Flaggor:\n" +" -p\tskriv tidssammanfattningen i det portabla Posix-formatet\n" +" \n" +" Värdet på variabeln TIMEFORMAT används som utmatningsformat.\n" +" \n" +" Slutstatus:\n" +" Returstatusen är returstatusen från RÖR." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exekvera kommandon baserat på mönstermatchning.\n" +" \n" +" Välj att exekvera KOMMANDON baserat på om ORD matchar MÖNSTER. Ett\n" +" ”|” används för att separera flera mönster.\n" +" \n" +" Slutstatus:\n" +" Returnerar statusen från det sist exekverade kommandot." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exekvera kommandon baserat på ett villkor.\n" +" \n" +" Listan ”if KOMMANDON” exekveras. Om dess slutstatus är noll så " +"exekveras\n" +" listan ”then KOMMANDON”. Annars exekveras varje lista ”elif KOMMANDON”\n" +" i tur och ordning, och om dess slutstatus är noll exekveras motsvarande\n" +" lista ”then KOMMANDON” och if-kommandot avslutar. Annars exekveras " +"listan\n" +" ”else KOMMANDON” om den finns. Slutstatus av hela konstruktionen är\n" +" slutstatusen på det sist exekverade kommandot, eller noll om inget\n" +" villkor returnerade sant.\n" +" \n" +" Slutstatus:\n" +" Returnerar status från det sist exekverade kommandot." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exekvera kommandon så länge ett test lyckas.\n" +" \n" +" Expandera och exekvera KOMMANDON så länge det sista kommandot i\n" +" ”while”-KOMMANDONa har en slutstatus på noll.\n" +" \n" +" Slutstatus:\n" +" Returnerar statusen från det sist exekverade kommandot." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Exekvera kommandon så länge ett test inte lyckas.\n" +" \n" +" Expandera och exekvera KOMMANDON så länge det sista kommandot i\n" +" ”until”-KOMMANDONa har en slutstatus som inte är noll.\n" +" \n" +" Slutstatus:\n" +" Returnerar statusen från det sist exekverade kommandot." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Skapa en ko-process med namnet NAMN.\n" +" \n" +" Kör KOMMANDO asynkront, med standard ut och standard in för kommandot\n" +" ansluta via ett rör till filbeskrivare tilldelade indexen 0 och 1 i\n" +" en vektorvariabel NAMN i skalet som kör. Standardvärde på NAMN är\n" +" ”COPROC”.\n" +" \n" +" Slutstatus:\n" +" Kommandot coproc returnerar slutstatusen 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Definiera en skalfunktion.\n" +" \n" +" Skapa en skalfunktion med namnet NAMN. När den anropas som ett enkelt\n" +" kommando kör NAMN KOMMANDON i det anropande skalets kontext. När NAMN\n" +" anropas skickas argumenten till funktionen som $1...$n och funktionens\n" +" namn finns i $FUNCNAME.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte NAMN endast är läsbart." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Gruppera kommandon som en enhet.\n" +" \n" +" Kör ett antal kommandon i en grupp. Detta är ett sätt att omdirigera\n" +" en hel mängd kommandon.\n" +" \n" +" Slutstatus:\n" +" Returnerar statusen från det sist exekverade kommandot." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Återuppta jobb i förgrunden.\n" +" \n" +" Likvärdigt med JOBBSPEC-argumentet till kommandot ”fg”. Återuppta\n" +" ett stoppat eller bakgrundsjobb. JOBBSPEC kan ange antingen ett\n" +" jobbnamn eller ett jobbnummer. Om JOBBSPEC följs av ett ”&” placeras\n" +" jobbet i bakgrunden, som om jobbspecifikationen hade givits som ett\n" +" argument till ”bg”.\n" +" \n" +" Slutstatus:\n" +" Returnerar statusen på det återupptagna jobbet." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Beräkna aritmetiskt uttryck.\n" +" \n" +" UTTRYCKet beräknas enligt reglerna för aritmetisk beräkning.\n" +" Likvärdigt med ”let UTTRYCK”.\n" +" \n" +" Slutstatus:\n" +" Returnerar 1 om UTTRYCK beräknas till 0, returnerar 0 annars." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Kör ett villkorligt kommando.\n" +" \n" +" Returnerar en status av 0 eller 1 beroende på evalueringen av det\n" +" villkorliga uttrycket UTTRYCK. Uttryck är sammansatta av samma " +"primitiver\n" +" som används av det inbyggda ”test”, och kan kombineras med följande\n" +" operatorer:\n" +" \n" +" ( UTTRYCK )\tReturnerar värdet på UTTRYCK\n" +" ! UTTRYCK\t\tSant om UTTRYCK är falskt, annars falskt\n" +" UTTR1 && UTTR2\tSant om både UTTR1 och UTTR2 är sanna, annars falskt\n" +" UTTR1 || UTTR2\tSant om antingen UTTR1 eller UTTR2 är sant, annars\n" +" falskt\n" +" \n" +" När operatorerna ”==” och ”!=” används används strängen till höger om\n" +" som ett mönster och mönstermatchning utförs. När operatorn ”=~” " +"används\n" +" matchas strängen till höger om operatorn som ett reguljärt uttryck.\n" +" \n" +" Operatorerna && och || beräknar inte UTTR2 om UTTR1 är tillräckligt för\n" +" att avgöra uttryckets värde.\n" +" \n" +" Slutstatus:\n" +" 0 eller 1 beroende på värdet av UTTRYCK." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Vanliga skalvariablers namn och användning.\n" +" \n" +" BASH_VERSION\tVersionsinformation för denna Bash.\n" +" CDPATH\tEn kolonseparerad lista av kataloger att söka i efter\n" +" \t\tkataloger givna som argument till ”cd”.\n" +" GLOBIGNORE\tEn kolonseparerad lista av mönster som beskriver filnamn\n" +" \t\tatt ignorera vid söknamnsexpansion.\n" +" HISTFILE\tNamnet på filen där din kommandohistorik sparas.\n" +" HISTFILESIZE\tDet maximala antalet rader denna fil kan innehålla.\n" +" HISTSIZE\tDet maximala antalet historierade ett körande skal kan\n" +" \t\tkomma åt.\n" +" HOME\tDen fullständiga sökvägen till din inloggningskatalog.\n" +" HOSTNAME\tNamnet på den aktuella värden.\n" +" HOSTTYPE\tTyp av CPU denna version av Bash kör under.\n" +" IGNOREEOF\tStyr skalets åtgärd när det tar emot ett filslutstecken\n" +" \t\tsom enda indata. Om den är satt är dess värde det antal\n" +" \t\tfilslutstecken som kan ses i rad på en tom rad innan\n" +" \t\tskalet avslutar (10 som standard). När den inte är satt\n" +" \t\tbetyder filslut slut på indata.\n" +" MACHTYPE\tEn sträng som beskriver det aktuella systemet Bash kör på.\n" +" MAILCHECK\tHur ofta, i sekunder, Bash tittar efter ny post.\n" +" MAILPATH\tEn kolonseparerad lista av filnamn som Bash tittar efter\n" +" \t\tny post i.\n" +" OSTYPE\tDen version av Unix denna version av Bash kör på.\n" +" PATH\tEn kolonseparerad lista av kataloger att söka i när\n" +" \t\tkommandon skall letas upp.\n" +" PROMPT_COMMAND\tEtt kommando att köra före utskriften av varje\n" +" \t\tprimär prompt.\n" +" PS1\t\tDen primära promptsträngen.\n" +" PS2\t\tDen sekundära promptsträngen.\n" +" PWD\t\tDet fullständiga söknamnet till den aktuella katalogen.\n" +" SHELLOPTS\tEn kolonseparerad lista av aktiverade skalflaggor.\n" +" TERM\tNamnet på den aktuella terminaltypen.\n" +" TIMEFORMAT\tUtmatningsformatet för tidsstatistik som visas av det\n" +" \t\treserverade ordet ”time”.\n" +" auto_resume\tOm inte tomt betyder att ett kommandoord som förekommer\n" +" \t\tensamt på en rad först letas efter i listan av för tillfället\n" +" \t\tstoppade jobb. Om det hittas där läggs det jobbet i\n" +" \t\tförgrunden. Ett värde av ”exact” betyder att kommandoordet\n" +" \t\texakt måste stämma med ett kommando i listan över stoppade\n" +" \t\tjobb. Ett värde av ”substring” betyder att kommandoordet\n" +" \t\tmåste stämma med en delsträng av jobbet. Alla andra värden\n" +" \t\tbetyder att kommandot måste vara ett prefix av ett stoppat\n" +" \t\tjobb.\n" +" histchars\tTecken som styr historieexpansion och snabbsubstitution.\n" +" \t\tDet första tecknet är tecknet för historiesubstitution,\n" +" \t\tvanligen ”!”. Det andra tecknet är tecknet för ”snabb\n" +" \t\tsubstitution”, vanligen ”^”. Det tredje är tecknet för\n" +" \t\t”historiekommentar”, vanligen ”#”.\n" +" HISTIGNORE\tEn kolonseparerad lista av mönster som används för att\n" +" \t\tbestämma vilka kommandon som skall sparas i historielistan.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Lägg till kataloger på stacken.\n" +" \n" +" Lägger till en katalog till toppen av katalogstacken, eller roterar\n" +" stacken, och gör den nya toppen av stacken till den aktuella\n" +" arbetskatalogen. Utan argument byts de två toppkatalogerna.\n" +" \n" +" Flaggor:\n" +" -n\tUndertryck det normala bytet av katalog när kataloger\n" +" \t\tläggs till på stacken, så att endast stacken ändras.\n" +" \n" +" Argument:\n" +" +N\tRotera stacken så att den N:e katalogen (räknat från\n" +" \t\tvänster i listan som visas av ”dirs”, med start på noll)\n" +" \t\thamnar på toppen.\n" +" \n" +" -N\tRotera stacken så att den N:e katalogen (räknat från\n" +" \t\thöger i listan som visas av ”dirs”, med start på noll)\n" +" \t\thamnar på toppen.\n" +" \n" +" kat\tLägger till KAT till toppen av katalogstacken, och gör\n" +" \t\tden till den nya aktuella arbetskatalogen.\n" +" \n" +" Den inbyggda ”dirs” visar katalogstacken.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte ett ogiltigt argument ges eller bytet av\n" +" katalog misslyckas." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Ta bort kataloger från stacken.\n" +" \n" +" Tar bort poster från katalogstacken. Utan argument tas toppkatalogen\n" +" bort från stacken, och byter till den nya toppkatalogen.\n" +" \n" +" Flaggor:\n" +" -n\tUndertryck det normala bytet av katalog när kataloger\n" +" \t\ttas bort från stacken, så att endast stacken ändras.\n" +" \n" +" Argument:\n" +" +N\tTar bort den N:e katalogen räknat från vänster i listan som\n" +" \t\tvisas av ”dirs”, med start på noll. Till exempel: ”popd +0”\n" +" \t\ttar bort den första katalogen, ”popd +1” den andra.\n" +" \n" +" -N\tTar bort den N:e katalogen räknat från höger i listan som\n" +" \t\tvisas av ”dirs”, med start på noll. Till exempel: ”popd -0”\n" +" \t\ttar bort den sista katalogen, ”popd -1” den näst sista.\n" +" \n" +" Den inbyggda ”dirs” visar katalogstacken.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte ett ogiltigt argument ges eller bytet av\n" +" katalog misslyckas." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Visa katalogstacken.\n" +" \n" +" Visa listan av kataloger i minnet för närvarande. Kataloger kommer\n" +" in på listan med kommandot ”pushd”. Du kan komma tillbaka upp genom\n" +" listan med kommandot ”popd”.\n" +" \n" +" Flaggor:\n" +" -c\tnollställer katalogstacken genom att ta bort alla element\n" +" -l\tskriv inte ut versioner med tildeprefix av kataloger som\n" +" \t\tär relativa till din hemkatalog\n" +" -p\tskriv katalogstacken med en post per rad\n" +" -v\tskriv katalogstacken med en post per rad föregångna av\n" +" \t\tdess position i stacken\n" +" \n" +" Argument:\n" +" +N\tVisar den N:e posten räknat från vänster i listan som visas\n" +" \t\tav dirs när det anropas utan flaggor, med början från noll.\n" +" \n" +" -N\tVisar den N:e posten räknat från höger i listan som visas\n" +" \t\tav dirs när det anropas utan flaggor, med början från noll.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " +"inträffar." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Slå på och av skalflaggor.\n" +" \n" +" Ändra inställningen av varje flagga FLGNAMN. Utan några flaggargument\n" +" lista varje angivet FLGNAMN, eller alla skalflaggor med om inga FLGNAMN\n" +" anges, en indikation av huruvida var och en är satt eller inte.\n" +" \n" +" Flaggor:\n" +" -o\tbegränsa FLGNAMN till de som kan användas med ”set -o”\n" +" -p\tskriv varje skalflagga med en indikation på dess status\n" +" -q\tutelämna utmatning\n" +" -s\taktivera (slå på) varje FLGNAMN\n" +" -u\tavaktivera (slå av) varje FLGNAMN\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om FLGNAMN är aktiverat, misslyckas om en ogiltig\n" +" flagga ges eller FLGNAMN är avaktiverat." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formatera och skriv ARGUMENT styrda av FORMAT.\n" +" \n" +" Flaggor:\n" +" -v var\ttilldela utdata till skalvariabeln VAR istället för att\n" +" \t\tskriva den på standard ut\n" +" \n" +" FORMAT är en teckensträng som innehåller tre sorters objekt: vanliga\n" +" tecken, som helt enkelt kopieras till standard ut, teckenstyrsekvenser\n" +" som konverteras och kopieras till standard ut och " +"formatspecifikationer,\n" +" där var och en medför utskrift av det nästföljande argumentet.\n" +" \n" +" Förutom de standardformatspecifikationer som beskrivs a printf(1),\n" +" tolkar printf:\n" +" \n" +" %b\texpandera bakstrecksstyrsekvenser i motsvarande argument\n" +" %q\tcitera argumentet på ett sätt som kan återanvändas som\n" +" \t\tindata till ett skal\n" +" %(fmt)T skriv ut datum-/tidsträngen som blir resultatet av att\n" +" använda FMT som en formatsträng till strftime(3)\n" +" \n" +" Formatet återanvänds vid behov för att konsumera alla argument. Om\n" +" det finns färre argument än formatet behöver beter sig överskjutande\n" +" formatspecifikationer som om värdet noll eller den tomma strängen,\n" +" det som passar, hade angivits.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller ett skriv-\n" +" eller tilldelningsfel inträffar." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Ange hur argument skal kompletteras av Readline.\n" +" \n" +" För varje NAMN, ange hur argument skall kompletteras. Om inga flaggor\n" +" är givna skrivs nuvarande kompletteringsspecifikationer ut på ett sätt\n" +" som gör att de kan användas som indata.\n" +" \n" +" Flaggor:\n" +" -p\tskriv existerande kompletteringsspecifikationer på ett\n" +" återanvändbart format\n" +" -r\tta bort en kompletteringsspecifikation för varje NAMN eller\n" +" om inga NAMN är givna, alla kompletteringsinformationer\n" +" -D\tanvänd kompletteringarna och åtgärderna som standard för\n" +" kommandon utan någon särskild komplettering definierad\n" +" -E\tanvänd kompletteringarna och åtgärderna för ”tomma” kommandon\n" +" — kompletteringar som försöks på en tom rad\n" +" \n" +" När komplettering försöker göras används åtgärderna i den ordning de\n" +" versala flaggorna är uppräknade ovan. Om flera flaggor anges har\n" +" flaggan -D företräde framför -E, och båda har företräde framför -I.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " +"inträffar." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Visa möjliga kompletteringar beroende på flaggorna.\n" +" \n" +" Avsett att användas inifrån en skalfunktion för att generera möjliga\n" +" kompletteringar. Om det valfria argumentet ORD är givet genereras\n" +" matchningar av ORD.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " +"inträffar." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Modifiera eller visa kompletteringsflaggor.\n" +" \n" +" Modifiera kompletteringsflaggorna för varje NAMN, eller, om inga NAMN " +"är\n" +" givna, den komplettering som för närvarande körs. Om ingen FLAGGA är\n" +" given skrivs kompletteringsflaggorna för varje NAMN eller den aktuella\n" +" kompletteringsspecifikationen.\n" +" \n" +" Flaggor:\n" +" \t-o flagga\tSätt kompletteringsflagga FLAGGA för varje NAMN\n" +" \t-D\t\tÄndra flaggorna för ”standard” kommandokomplettering\n" +" \t-E\t\tÄndra flaggorna för den ”tomma” kommandokompletteringen\n" +" \t-I\t\tÄndra flaggorna för komplettering av den första flaggan.\n" +" \n" +" Genom att använda ”+o” istället för ”-o” slås den angivna flaggan av.\n" +" \n" +" Argument:\n" +" \n" +" Varje NAMN refererar till ett kommando för vilket en kompletterings-\n" +" specifikation måste ha definierats tidigare med det inbyggda " +"”complete”.\n" +" Om inget NAMN ges måste compopt anropas av en funktion som just nu\n" +" genererar kompletteringar, och flaggorna för den just nu exekverande\n" +" kompletteringsgeneratorn modifieras.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller NAMN inte har\n" +" någon kompletteringsspecifikation definierad." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Läs rader från standard in till en indexerad vektorvariabel.\n" +" \n" +" Läs rader från standard in till den indexerade vektorvariabeln VEKTOR,\n" +" eller från filbeskrivaren FB om flaggan -u ges. Variabeln MAPFILE är\n" +" standard för VEKTOR.\n" +" \n" +" Flaggor:\n" +" -d avgr Använd AVGR för att avsluta rader, istället för nyrad\n" +" -n antal\tKopiera högs ANTAL rader. Om ANTAL är 0 kopieras alla " +"rader\n" +" -O start\tBörja tilldela till VEKTOR vid index START. Standardindex " +"är 0\n" +" -s antal \tSläng de första ANTAL inlästa raderna\n" +" -t\tTa bort en avslutande AVGR från varje inläst rad (nyrad som\n" +" standard)\n" +" -u fb\tLäs rader från filbeskrivare FB istället för standard in.\n" +" -C återanrop\tBeräkna ÅTERANROP för varje KVANTA rader som läses.\n" +" -c kvanta Ange antalet rader att läsa mellan varje anrop av\n" +" \t\tÅTERANROP.\n" +" \n" +" Argument:\n" +" VEKTOR\tNamn på vektorvariabel att använda för fildata\n" +" \n" +" Om -C ges utan -c är standardkvanta 5000. När ÅTERANROP evalueras får\n" +" den indexet på nästa vektorelement att tilldelas och raden att " +"tilldelas\n" +" till det elementet som extra argument.\n" +" \n" +" Om det inte ges någon specificerad start kommer mapfile nollställa " +"VEKTOR\n" +" före tilldelning till den.\n" +" \n" +" Slutstatus:\n" +" Returnerar framgång om inte en ogiltig flagga ges eller VEKTOR är\n" +" oföränderlig eller inte en indexerad vektor." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Läs rader från en fil till en vektorvariabel.\n" +" \n" +" En synonym till ”mapfile”." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Returnera kontexten för det aktuella subrutinanropet.\n" +#~ " \n" +#~ " Utan UTTR, returnerar " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: process %5ld (%s) i the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Okänd signal nr " diff --git a/bash-5.1/po/tr.gmo b/bash-5.1/po/tr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..49558623c784bb928b20eb9b73652a6863cb5484 Binary files /dev/null and b/bash-5.1/po/tr.gmo differ diff --git a/bash-5.1/po/tr.po b/bash-5.1/po/tr.po new file mode 100644 index 0000000000000000000000000000000000000000..cb0e0cb1f0aec54fb6833bee47649b48933fe633 --- /dev/null +++ b/bash-5.1/po/tr.po @@ -0,0 +1,6425 @@ +# translation of bash-4.2.po to Turkish +# Copyright (C) 2006 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Nilgün Belma Bugüner , 2006. +# Volkan Gezer , 2013, 2014, 2017. +msgid "" +msgstr "" +"Project-Id-Version: bash 4.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2017-05-05 11:49+0100\n" +"Last-Translator: Volkan Gezer \n" +"Language-Team: Turkish \n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "hatalı dizi indisi" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: removing nameref niteliği kaldırılıyor" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: indisli dizi, ilişkisel diziye dönüştürülemez" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: geçersiz ilişkisel dizi anahtarı" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: sayısal olmayan indise atama yapılamaz" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: ilişkisel bir dizi ataması yapılırken indis kullanılmalıdır" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: oluşturulamıyor: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: komut için kısayol bulunamıyor" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: boşluk olmayan ilk karakter `\"' değil" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "%2$s içinde kapatan `%1$c' yok" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: ikinokta imi eksik" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': kısayol değiştirilemiyor" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "destek genişletme: %s için bellek ayrılamıyor" + +#: braces.c:406 +#, fuzzy, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "destek genişletme: %d öge için bellek ayrılamıyor" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "destek genişletme: `%s' için bellek ayrılamıyor" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': geçersiz takma isim" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "satır düzenleme etkin değil" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': kısayol ismi geçersiz" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: okunamıyor: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': işlev ismi bilinmiyor" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s için bir kısayol atanmamış.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s bunun üzerinden çağrılabilir: " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': kısayol değiştirilemiyor" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "döngü sayısı" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "sadece bir `for', `while' veya `until' döngüsünde anlamlı" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Geçerli alt yordam çağrısının bağlamını döndürür.\n" +" \n" +" İFADE olmadan, \"$satır $dosyaadı\" döndürür. İFADE ile " +"kullanıldığında\n" +" \"$satır $altyordam $dosyaadı\" döndürür; bu ek bilgi bir yığın izi " +"sağlamak\n" +" için kullanılabilir.\n" +" \n" +" İFADE değeri, geçerli çerçeveden önce kaç tane çerçeve çağrılacağını\n" +" belirtir. Üst çerçeve 0. çerçevedir. \n" +" Çıkış Durumu:\n" +" İFADE geçersiz olmadığı ve bir kabuk işlevi çalıştırmadığı durumda 0 " +"döndürür." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME atanmamış" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "çok fazla argüman" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "boş dizini" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD boş" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "satır %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "uyarı: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: kullanım: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: seçenek bir argüman gerektirir" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: sayısal argüman gerekli" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s:yok" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: seçenek geçersiz" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: seçenek ismi geçersiz" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': geçerli bir belirteç değil" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "geçersiz sekizli sayı" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "geçersiz onaltılık sayı" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "geçersiz sayı" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: sinyal belirtimi geçersiz" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': geçerli bir iş belirtimi veya süreç numarası değil" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: salt okunur değişken" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s aralık dışı" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "argüman" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s aralık dışı" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: böyle bir iş yok" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: iş denetimi yok" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "iş denetimi yok" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: kısıtlı" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "kısıtlı" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: bir kabuk yerleşiği değil" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "yazma hatası: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "uçbirim nitelikleri ayarlanırken hata: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "uçbirim nitelikleri alınırken hata: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: geçerli dizin alınırken hata: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: iş belirtimi belirsiz" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "bu sürümde yardım kullanılamıyor" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s:unset yapılamaz: %s salt okunur" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: unset yapılamaz" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: eylem adı geçersiz" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: tamamlama belirtimi yok" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "uyarı: -F seçeneği umduğunuz gibi çalışmayabilir" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "uyarı: -C seçeneği umduğunuz gibi çalışmayabilir" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "şuan tamamlama işlevi çalıştırılmıyor" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "sadece bir işlevde kullanılabilir" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: referans değeri bir dizi olamaz" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref değişkeninin kendine yaptığı referanslara izin verilmiyor" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: çembersel isim referansı" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': dosya izleme tanımlayıcısı için geçersiz değer" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "işlev yapmak için `-f' kullanılamaz" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: salt okunur işlev" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: alıntılanmış bileşik dizi ataması artık kullanılmıyor" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: dizi değişkenleri bu yolla iptal edilemez" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: ilişkisel dizi, indisli diziye dönüştürülemez" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "özdevimli yükleme mümkün değil" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "%s paylaşımlı nesnesi açılamıyor: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "%2$s paylaşımlı nesnesinde %1$s bulunamıyor: %3$s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: özdevimli olarak yüklenmemiş" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "%s için yükleme ifadesi hata döndürdü (%d): yüklenmedi" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: özdevimli olarak yüklenmemiş" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: silinemiyor: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: bir dizin" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: bir dosya değil" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: dosya çok büyük" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: ikili dosya çalıştırılamıyor" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: çalıştırılamıyor: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "çıkış\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "oturum açma kabuğu değil: `exit' kullanın" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Durmuş işler var.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Çalışan görevler mevcut.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "komut yok" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "geçmiş belirtimi" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: geçici dosya açılamıyor: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "şimdiki" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "%d. iş, iş denetimsiz başlamış" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: kuraldışı seçenek -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: seçenek bir argüman gerektirir -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "çitleme iptal edildi" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: çitleme tablosu boş\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "eşleşme\tkomut\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Bu anahtar sözcükle eşleşen komutlar: `" +msgstr[1] "Bu anahtar sözcüklerle eşleşen komutlar: `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"`%s' ile ilgili bir yardım metni yok. `help help' veya `man -k %s' ya da " +"`info %s'.yazmayı deneyebilirsiniz." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: açılamıyor: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Bu kabuk komutları dahili olarak tanımlı. Listeyi görmek için `help'yazın.\n" +"`AD' gibi bir işlev hakkında bilgi almak için `help AD' yazınız.\n" +"Kabuk hakkında genel bir bilgi edinmek için `info bash'yazınız.\n" +"Bu listede olmayan komutlar hakkında bilgi bulmak isterseniz,\n" +"`man -k' veya `info' yazın.\n" +"\n" +"Bir ismin yanında bir yıldız imi (*) varsa komut iptal edilmiş demektir.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "tek bir -anrw kullanılabilir" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "geçmiş konumu" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: geçersiz zaman damgası" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: geçmiş yorumlaması başarısız" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib başarısız" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "`-x' ile başka seçenek kullanılamaz" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argümanlar süreç veya iş kimlikleri olmalı" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Bilinmeyen hata" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "ifade bekleniyordu" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: bir sıralı dizi değil" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: dosya tanıtıcı belirtimi geçersiz" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: dosya tanıtıcı geçersiz: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: geçersiz satır sayısı" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: geçersiz dizi kökeni" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: geçersiz geri çağırım niceliği" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "boş bir dizi değişken adı" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "dizi değişken desteği gerekli" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': biçim karakteri eksik" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': geçersiz zaman biçimi belirtimi" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': biçim karakteri geçersiz" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "uyarı: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "biçim ayıklama sorunu: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "\\x için onaltılık rakam eksik" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "evrensel kod rakamı eksik \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "başka dizin yok" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: geçersiz argüman" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "dizin yığını boş" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "dizin yığını indisi" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Geçerli hatırlanan dizinlerin listesini görüntüler. Dizinler\n" +" listeye yollarını `pushd' komutu ile bulurlar; ve liste boyunca\n" +" yedeği `popd' komutu ile alabilirsiniz.\n" +" \n" +" Seçenekler:\n" +" -c\tögelerin tümünü silerek dizin yığınını temizle\n" +" -l\tev dizininize göreceli dizinlerin yaklaşık işareti\n" +" \tile başlayan sürümlerini yazdırma\n" +" -p\tdizin yığınını her satırda bir girdi ile yazdır\n" +" -v\tdizin yığınını, yığındaki konumu ile her satıra\n" +" \tön ek yapılmış bir girişi yazdır\n" +" \n" +" Argümanlar:\n" +" +N\tDizinler tarafından gösterilen listenin solundan başlayarak\n" +" \tN'inci girdiyi gösterir. Seçenek kullanılmadığında sıfırdan başlar.\n" +" \n" +" -N\tDizinler tarafından gösterilen listenin sağından başlayarak\n" +"\tN'inci girdiyi gösterir. Seçenek kullanılmadığında sıfırdan başlar." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Dizin yığıtının en üstüne bir dizin ekler, ya da geçerli çalışma\n" +" dizini yığıtın tepesine gelecek şekilde yığıtı döndürür. Hiç\n" +" argüman verilmemişse en üstteki iki dizini yer değiştirir.\n" +" \n" +" Seçenekler\n" +" -n\tYığıta dizin eklenirken dizinin normal değişimini yoksayar\n" +" \tböylece sadece yığıt değiştirilir.\n" +" Argümanlar:\n" +" +N\t(`dirs' tarafından gösterilen listenin solundan saymaya\n" +" \tsıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n" +" \tyığıtı döndürür.\n" +" \n" +" -N\t(`dirs' tarafından gösterilen listenin sağından saymaya\n" +" \tsıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n" +" \tyığıtı döndürür.\n" +" \n" +" dizin\tDiZiNi yeni çalışma dizini yaparak dizin yığıtının\n" +" \ttepesine ekler.\n" +" \n" +" Dizin yığıtını `dirs' komutuyla görebilirsiniz." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Dizin yığıtından girdileri siler. Hiç argüman verilmemişse,\n" +" yığıtın en üstündeki dizini yığıttan kaldırır ve yığıtın\n" +" tepesinde kalan dizine geçer.\n" +" \n" +" Seçenekler:\n" +" -n\tdizinleri yığıttan silerken normal dizin değişikliğini\n" +" \tengeller, böylece sadece yığıt değiştirilmiş olur. \n" +" \n" +" Argümanlar:\n" +" +N\t`dirs' tarafından gösterilen listenin solundan saymaya\n" +" \tsıfırla başlandığında N'inci girdiyi siler. Örneğin,\n" +" \t`popd +0' ilk dizini `popd +1' ikincisini siler. \n" +" -N\t`dirs' tarafından gösterilen listenin sağından saymaya\n" +" \tsıfırla başlandığında N'inci girdiyi siler. Örneğin,\n" +" \t`popd -0' son dizini `popd -1' sonuncudan öncekini siler. \n" +" \n" +" Dizin yığıtını `dirs' komutuyla görebilirsiniz." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: zamanaşımı belirtimi geçersiz" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "okuma hatası: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "sadece bir işlev veya betikten kaynaklı olarak `return' yapılabilir" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "bir işlev ve bir değişken aynı anda unset yapılamaz" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: bir dizi değişkeni değil" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: bir işlev değil" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: export yapılamıyor" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift sayısı" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "kabuk seçenekleri aynı anda hem atanıp hem de iptal edilemez" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: kabuk seçenek ismi geçersiz" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "dosya ismi argüman gerekir" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: dosya yok" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "engellenemez" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "bir oturum açma kabuğu engellenemez" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s `%s' için takma addır\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s bir kabuk anahtar sözcüğüdür\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s bir işlevdir\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s özel bir kabuk yerleşiğidir\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s bir kabuk yerleşiğidir\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s %s'dir\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s çitilmiş (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: sınırlama argümanı geçersiz" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': hatalı komut" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: sınır alınamıyor: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "sınır" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: sınır değiştirilemiyor: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "sekizlik sayı" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': simgesel kip işleci geçersiz" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': simgesel kip karakteri geçersiz" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " satır " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "son komut: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Çıkılıyor..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "BİLGİLENDİR:" + +#: error.c:462 +msgid "unknown command error" +msgstr "bilinmeyen komut hatası" + +#: error.c:463 +msgid "bad command type" +msgstr "hatalı komut türü" + +#: error.c:464 +msgid "bad connector" +msgstr "hatalı bağlantı" + +#: error.c:465 +msgid "bad jump" +msgstr "hatalı sıçrama" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: bağlanmamış değişken" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\agirdi beklerken zamanaşımı: auto-logout\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "/dev/null'dan standart girdiye yönlendirme yapılamaz: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': biçim karakteri geçersiz" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] hala mevcut" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "iletişim tüneli hatası" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: azami eval yuvalama sınırı aşıldı (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: azami kaynak yuvalama sınırı aşıldı (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: azami fonksiyon yuvalama sınırı aşıldı (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: kısıtlı: komut adında `/' kullanamazsınız" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: komut yok" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: hatalı yorumlayıcı" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: ikili dosya çalıştırılamıyor: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "%s: bir kabuk yerleşiğidir" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "fd %d, fd %d olarak yinelenemiyor" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "ifade özyineleme düzeyi aşıldı" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "özyineleme yığıtı alttan taştı" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "ifadede sözdizimi hatası" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "değişken olmayana atama yapmaya çalışıldı" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "ifadede sözdizimi hatası" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "sıfırla bölme" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "yazılım hatası: bad expassign token" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "koşullu ifade için `:' bekleniyordu" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "üs sıfırdan küçük" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "belirteç ön-arttırım veya ön-eksiltim sonrası bekleniyordu" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "eksik `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "sözdizimi hatası: terim umuluyordu" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "sözdizimi hatası: geçersiz aritmetik işleci" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (hata belirtisi \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "geçersiz sayı tabanı" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: geçersiz satır sayısı" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "değer taban için fazla büyük" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: ifade hatası\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: üst dizinlere erişilemiyor" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "fd %d için geciktirmeme kipi sıfırlanamıyor" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"fd %d tanıtıcısındaki bash girdisi için yeni dosya tanıtıcısı ayrılamıyor" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: yeni fd %d için tampon zaten var" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp iletişim tüneli" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "çatallanan pid %d, çalışan iş %d içinde görünüyor" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "durdurulan %2$ld süreç gruplu iş %1$d siliniyor" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: %5ld (%s) program kimliği hala canlı olarak işaretli" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: böyle bir pid yok" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Sinyal %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Bitti" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Durdu" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Durdu(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Çalışıyor" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Bitti(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Çıkış %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Bilinmeyen durum" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(çekirdek döküldü)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "alt setpgid (şuradan: %ld şuraya: %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld bu kabuğun bir alt sürecine ait değil" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: süreç %ld için kayıt yok" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: iş %d durdu" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: böyle bir iş yok" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: iş sonlanmış" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: iş %d zaten artalanda" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: belirsiz blok önlenmek için WNOHANG açılıyor" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: satır %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (çekirdek döküldü)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd artık: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp başarısız" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: satır düzeni" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: satır düzeni" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "uçbirim süreç grunu (%d) ayarlanamaz" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "bu kabukta iş denetimi yok" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: kanaat doğrulaması başarısız: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: kanaat doğrulaması battı\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "bilinmeyen" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: serbest bırakılmış liste üstünde blok üste yazdı" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: zaten serbest bırakılmış blok argümanı ile çağrıldı" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: ayrılmamış blok argümanı ile çağrıldı" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: alttan taşma saptandı; mh_nbytes aralık dışında" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: alttan taşma saptandı; mh_nbytes aralık dışında" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: başlangıç ve son tomar boyutları farklı" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: ayrılmamış blok argümanı ile çağrıldı" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: alttan taşma saptandı; mh_nbytes aralık dışında" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: alttan taşma saptandı; mh_nbytes aralık dışında" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: başlangıç ve son tomar boyutları farklı" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: alloc tablosu FIND_ALLOC ile dolu olabilir mi?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p zaten ayrılmış olarak tabloda değil mi?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p zaten serbest bırakılmış olarak tabloda değil mi?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "geçersiz taban" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: konak bilinmiyor" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: geçersiz hizmet" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: hatalı ağ yolu belirtimi" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "desteklenmeyen ağ işlemleri" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: (%s) diline değiştirilemedi" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: şu dile (%s) değiştirilemedi: %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: yerel (%s) değiştirilemiyor" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: yerel (%s) değiştirilemiyor: %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "$_'de postanız var" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "$_'de yeni postanız var" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "%s'deki posta okundu\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "sözdizimi hatası: aritmetik ifadesi gerekli" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "sözdizimi hatası: `;' beklenmiyordu" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "sözdizimi hatası: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: hatalı yönerge türü %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "bu belgede %d satırında dosya sonu sonlandırılmış (istenen `%s')" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: yönlendirme yönergesi `%d' aralık dışında" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) SIZE_MAX değerini aşıyor (%lu): " +"satır kırpıldı" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "en fazla buraya belge sayısı aşıldı" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "`%c' için eşleşme aranırken beklenmedik dosya sonu" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "`]]' aranırken beklenmedik dosya sonu" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "koşullu ifadede sözdizimi hatası: beklenmedik dizgecik `%s'" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "koşullu ifadede sözdizimi hatası" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "beklenmedik dizgecik `%s', `)' umuluyordu" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "`)' umuluyordu" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "koşullu tek terimli işlece beklenmedik argüman `%s'" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "koşullu tek terimli işlece beklenmedik argüman" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "beklenmedik dizgecik `%s', koşullu iki terimli işleç umuluyordu" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "koşullu iki terimli işleç umuluyordu" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "koşullu iki terimli işlece beklenmedik argüman `%s'" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "koşullu iki terimli işlece beklenmedik argüman" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "koşullu komutta beklenmeyen dizgecik `%c'" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "koşullu komutta beklenmeyen dizgecik `%s'" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "koşullu komutta beklenmeyen dizgecik %d" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "beklenmeyen dizgecik `%s' yakınında sözdizimi hatası" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "`%s' yakınında sözdizimi hatası" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "sözdizimi hatası: beklenmeyen dosya sonu" + +#: parse.y:6365 +msgid "syntax error" +msgstr "sözdizimi hatası" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Kabuğu bırakmak için \"%s\" kullanın.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "`)' için eşleşme aranırken beklenmedik dosya sonu" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: `%s' işlevi yok" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: muhtemel yeniden deneme döngüsü" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: hatalı bağlayıcı `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: geçersiz dosya tanımlayıcısı" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: BOŞ dosya işaretçisi" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': geçersiz biçim karakteri" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "dosya tanıtıcı aralık dışında" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: belirsiz yönlendirme" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: mevcut dosyanın üzerine yazılamıyor" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: kısıtlı: çıktı yönlendirilemiyor" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "belge için geçici dosya oluşturulamıyor: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: fd değişkene atanamıyor" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port ağ olmaksızın desteklenmiyor" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "yönlendirme hatası: fd yinelenemiyor" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "/tmp bulunamadı, lütfen oluşturun!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp geçerli bir dizinin adı olmalıdır" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: geçersiz seçenek" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "uid %d olarak ayarlanamıyor: etkin uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "gid %d olarak ayarlanamıyor: etkin gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "hata ayıklayıcı başlatılamadı, hata ayıklama devre dışı" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Bir dizin" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Hiç ismim yok!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, sürüm %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Kullanım:\t%s [GNU uzun seçeneği] [seçenek] ...\n" +"\t%s [GNU uzun seçeneği] [seçenek] betik-dosyası ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU uzun seçenekleri:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Kabuk seçenekleri:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD veya -c KOMUT veya -O shopt_seçeneği\t\t(sadece çağrı için)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ya da -o seçeneği\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Kabuk seçenekleriyle ilgili daha fazla bilgi için `%s -c \"help set\"' " +"yazın.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Kabuk yerleşik komutlarıyla ilgili bilgi almak için `%s -c help' yazın.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" +"Yazılım hatalarını raporlamak için `bashbug' komutunu kullanınız.\n" +"Çeviri hatalarını ise adresine bildiriniz.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash ana sayfası: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"GNU yazılımı kullanımı hakkında genel yardım: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: geçersiz işlem" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Bogus sinyali" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Engelle" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Kes" + +#: siglist.c:58 +msgid "Quit" +msgstr "Çık" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Geçersiz talimat" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "BPT izle/tuzak" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Talimatı DURDUR" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "EMT talimatı" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Kayan nokta istisnası" + +#: siglist.c:86 +msgid "Killed" +msgstr "Öldürüldü" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Veriyolu hatası" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Bölünme hatası" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Bozuk sistem çağırımı" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Bozuk iletişim tüneli" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Çalar saat" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Sonlandırıldı" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Acil GÇ koşulu" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Durduruldu (sinyal)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Devam et" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Alt ölümü veya durdurulma" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Durduruldu (tty girişi)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Durduruldu (tty çıkışı)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "G/Ç hazır" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU sınırı" + +#: siglist.c:154 +msgid "File limit" +msgstr "Dosya sınırı" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Alarm (sanal)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Alarm (profil)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Pencere değiştirildi" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Kayıt kilidi" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Kullanıcı sinyali 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Kullanıcı sinyali 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT girdi verisi bekliyor" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "yakın güç başarısızlığı" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "yakın sistem çökmesi" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "süreci başka bir işlemciye aktar" + +#: siglist.c:198 +msgid "programming error" +msgstr "programlama hatası" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "HFT izleyici kipine geçildi" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "HFT izleyici kipi kapatıldı" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "HFT ses sırası tamamlandı" + +#: siglist.c:214 +msgid "Information request" +msgstr "Bilgi talebi" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Bilinmeyen Sinyal #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "hatalı ikame: %2$s içinde kapatan `%1$s' yok" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: dizi üyesine liste atanamaz" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "süreç ikamesi için borulama yapılamıyor" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "süreç ikamesi için alt süreç yapılamıyor" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "isimli boru %s okumak için açılamıyor" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "isimli boru %s yazmak için açılamıyor" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "isimli boru %s fd %d olarak yinelenemiyor" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "komut ikamesi: girdideki null bayt yoksayıldı" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "komut ikamesi için boru yapılamıyor" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "komut ikamesi için alt süreç yapılamıyor" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: boru fd 1 olarak yinelenemiyor" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: dosya izleme tanımlayıcısı için geçersiz değer" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: geçersiz dolaylı yayılım" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: geçersiz değişken adı" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parametre boş ya da değer atanmamış" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametre boş ya da değer atanmamış" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: altdizge ifadesi < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: hatalı ikame" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: bu yolla atama yapılmaz" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"kabuk gelecekteki sürümlerinde, bir aritmetik ikame olarak değerlendirmeye " +"zorlayacak" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "hatalı ikame: %s içinde kapatan \"`\" yok" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "eşleşme yok: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argüman bekleniyordu" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: tamsayı ifadesi bekleniyordu" + +#: test.c:265 +msgid "`)' expected" +msgstr "`)' bekleniyordu" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "`)' bekleniyordu, %s bulundu" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: iki terimli işleci bekleniyordu" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: tek terimli işleci bekleniyordu" + +#: test.c:881 +msgid "missing `]'" +msgstr "eksik `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "sözdizimi hatası: `;' beklenmiyordu" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "geçersiz sinyal numarası" + +#: trap.c:325 +#, fuzzy, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: azami eval yuvalama sınırı aşıldı (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps:trap_list[%d] içinde hatalı değer: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: sinyal yakalayıcı SIG_DFL'dir, kendime %d (%s) göndererek" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler:hatalı sinyal %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "`%s'nin işlev tanımının içeri aktarılmasında hata" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "kabuk düzeyi (%d) çok yüksek, 1 yapılıyor" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: geçerli etki alanında hiç işlev bağlamı yok" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: değişkene değer atanmamış olabilir" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: isim referansına tamsayı ataması" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: geçerli etki alanında hiç işlev bağlamı yok" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s boş exportstr içeriyor" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%2$s için exportstr içinde geçersiz karakter %1$d" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "%s için exportstr içinde `=' yok" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: kabuk değişkenlerinin başı bir işlev bağlamı değil" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: genel değişkenler bağlamı yok" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: kabuk değişkenlerinin başı bir geçici ortam etki alanı değil" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: DOSYA olarak açılamaz" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: dosya izleme tanımlayıcısı için geçersiz değer" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: uyumlulukdeğeri aralık dışı" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Telif Hakkı (C) 2012 Özgür Yazılım Vakfı A.Ş." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Lisans GPLv3+: GNU GPL sürüm 3 veya sonrası \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, sürüm %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Bu ücretsiz bir yazılımdır; değiştirmekte ve dağıtmakta özgürsünüz." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "İzin verilen yasalar kapsamında hiçbir GARANTİSİ BULUNMAMAKTADIR." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %lu bayt ayrılamıyor (%lu bayt ayrıldı)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: %lu bayt ayrılamıyor" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: %lu bayt ayrılamıyor (%lu bayt ayrıldı)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: %lu bayt ayrılamıyor" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [isim[=değer] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] isim [isim ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVSX] [-m anahtar eşleniği] [-f dosyaadı] [-q isim] [-u isim] [-r " +"anahtar sırası] [-x keyseq:kabuk-komutu] [keyseq:satırokuma-işlevi veya " +"satırokuma-komutu]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [kabuk-dahili [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [ifade]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dizin]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [isim[=değer] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] isim[=değer] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [seçenek] isim[=değer] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f dosyaadı] [isim ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring isim [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a isim] [komut [argümanlar ...]] [yönlendirme ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [ilk] [son] veya fc -s [pat=rep] [komut]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [görev_tan]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [görev_tan ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p yoladı] [-dt] [isim ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [desen ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d başlangıç] [n] veya history -anrw [dosyaadı] veya history -" +"ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [görevtan ...] veya jobs -x komut [argü]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [görevtan ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sinspec | -n signum | -sigspec] pid | görevtan ... veya kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a dizi] [-d sonlandırıcı] [-i metin] [-n nkarakter] [-N " +"nkarakter] [-p istem] [-t zamanaşımı] [-u fd] [isim ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [isim ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [isim[=değer] ...] veya export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [isim[=değer] ...] veya readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source dosyaadı [argümanlar]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". dosyaadı [argümanlar]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [ifade]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] sinyal_tan ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] isim [isim ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [sınır]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [kip]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for İSİM [in KELİMELER ... ] ; do KOMUTLAR; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( ifade1; ifade2; ifade3 )); do KOMUTLAR; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select İSİM [in KELİMELER ... ;] do KOMUTLAR; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] zamantüneli" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case KELİME in [DESEN [| DESEN]...) KOMUTLAR ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if KOMUTLAR; then KOMUTLAR; [ elif KOMUTLAR; then KOMUTLAR; ]... [ else " +"KOMUTLAR; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while KOMUTLAR; do KOMUTLAR; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until KOMUTLAR; do KOMUTLAR; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [isim] command [yönlendirmeler]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function isim { KOMUTLAR ; } veya isim () { KOMUTLAR ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMUTLAR ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "görev_tan [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( ifade ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ ifade ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Bazı kabuk değişkenlerinin isim ve anlamları" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dizin]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optname ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] biçim [argümanlar]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o seçenek] [-A işlem] [-G genelyol] [-" +"W kelimelistesi] [-F işlev] [-C komut] [-X süzgeçyolu] [-P önek] [-S sonek] " +"[isim ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o seçenek] [-A işlem] [-G genelyol] [-W " +"kelimelistesi] [-F işlev] [-C komut] [-X süzgeçyolu] [-P önek] [-S sonek] " +"[kelime]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o seçenek] [-DE] [isim ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d sonlandrc] [-n say] [-O kaynak] [-s say] [-t] [-u fd] [-C " +"geriçağırım] [-c parçacık] [dizi]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n say] [-O kaynak] [-s say] [-t] [-u fd] [-C geriçağırım] [-c " +"parçacık] [dizi]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Rumuz tanımla veya görüntüle.\n" +" \n" +" `alias' argümansız kullanıldığında standart çıktıda kullanılabilecek " +"tüm\n" +" rumuzları `alias İSİM=DEĞER' biçiminde listeler.\n" +" \n" +" Diğer durumda DEĞERi verilmiş her İSİM için bir rumuz tanımlanır.\n" +" DEĞERdeki boşluk, rumuz genişletildiğinde sonraki kelimenin rumuz\n" +" ikamesi için denetlenmesine sebep olur.\n" +" \n" +" Seçenekler:\n" +" -p\tTüm rumuzları tekrar kullanılabilir biçimde listele\n" +" \n" +" Çıkış Durumu:\n" +" Hiçbir şeyin rumuzu olmayan bir İSİM verilmedikçe alias doğru döndürür." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Tanımlı rumuzlar listesinden her İSMİ kaldır.\n" +" \n" +" Seçenekler:\n" +" -a\ttüm rumuz tanımlamalarını kaldır\n" +" \n" +" İSİM mevcut olmayan bir rumuz olmadığı takdirde doğru\n" +" döndür." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Readline tuş atamalarını ve değişkenlerini ayarla.\n" +" \n" +" Bir tuş dizilimini bir Readline işlevine veya makrosuna bağlar ya da\n" +" bir Readline değişkeni atar. Seçeneksiz argüman sözdizimi ~/.initrc\n" +" içinde bulunana eşdeğerdir, ama tek bir argüman olarak aktarılması\n" +" gerekir: bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Seçenekler:\n" +" -m TUŞDİZİSİ Bu komut süresince kısayol olarak TUŞDİZİSİ\n" +" kullanılır. Olası kısayol isimleri: emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi,\n" +" vi-move, vi-command ve vi-insert.\n" +" -l İşlev isimlerini listeler.\n" +" -P İşlev isimlerini ve kısayolları listeler.\n" +" -p İşlev isimlerini ve kısayolları, girdi olarak\n" +" kullanılabilir biçimde listeler.\n" +" -S Makroları çağıran tuş dizilerini ve değerlerini\n" +" listeler\n" +" -s Makroları çağıran tuş dizilerini ve değerlerini\n" +" girdi olarak kullanılabilir biçimde listeler. " +"-V Değişken isimlerini ve değerlerini listeler.\n" +" -v Değişken isimlerini ve değerlerini girdi olarak\n" +" kullanılabilir biçimde listeler.\n" +" -q İŞLEV İsmi belirtilen İŞLEVi çağıran tuşlar hakkında " +"sorgu.\n" +" -u İŞLEV İsmi belirtilen İŞLEVi çağıran tüm tuş " +"kısayollarını\n" +" kaldırır.\n" +" -r TUŞDİZİSİ TUŞDİZİSİ için mevcut kısayolları kaldırır.\n" +" -x TUŞDİZİSİ:KABUK-KOMUTU\tTUŞDİZİSİnin her girilişinde KABUK-" +"KOMUTUnun\n" +" \t\t\t\tçalıştırılmasını sağlar.\n" +" -X Tuş dizilerini -x ve ilişkili komutlarını tekrar " +"bir girdi olarak kullanılabilecek\n" +" biçimde listeler.\n" +" \n" +" Çıkış Durumu:\n" +" tanınmayan bir seçenek girilmediği veya bir hata oluşmadığı durumda 0 " +"döndürür." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"for, while veya until döngülerinden çık.\n" +" \n" +" Bir FOR, WHILE veya UNTIL döngüsünden çık. Eğer N belirtilmişse, N " +"ilişkili\n" +" döngüden çık.\n" +" \n" +" Çıkış Durumu:\n" +" N, 1'e eşit veya daha fazla olmadığında çıkış durumu 0'dır." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"for, while veya until döngülerine devam et.\n" +" \n" +" İlişkili FOR, WHILE veya UNTIL döngüsünün sonraki adımına devam eder.\n" +" N tanımlanmışsa, N'inci ilişkili döngüye devam eder.\n" +" \n" +" Çıkış Durumu:\n" +" N, 1 veya daha büyük olmadığında çıkış durumu 0'dır." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Kabuk dahillerini çalıştır.\n" +" \n" +" Komut araması yapmadan KABUK-DAHİLİ, ARGÜMANLAR argümanları ile\n" +" çalıştır. Bu, bir KABUK-DAHİLİ, bir kabuk işlevi olarak tekrar uygulamak " +"isteyip\n" +" işlev içerisinde dahili olanı da çalıştırmanız gerektiğinizde " +"kullanışlıdır.\n" +" \n" +" Çıkış Durumu:\n" +" KABUK-DAHİLİnin çıkış durumunu veya eğer KABUK-DAHİLİ değilse false " +"döndürür." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Geçerli alt yordam çağrısının bağlamını döndürür.\n" +" \n" +" İFADE olmadan, \"$satır $dosyaadı\" döndürür. İFADE ile " +"kullanıldığında\n" +" \"$satır $altyordam $dosyaadı\" döndürür; bu ek bilgi bir yığın izi " +"sağlamak\n" +" için kullanılabilir.\n" +" \n" +" İFADE değeri, geçerli çerçeveden önce kaç tane çerçeve çağrılacağını\n" +" belirtir. Üst çerçeve 0. çerçevedir. \n" +" Çıkış Durumu:\n" +" İFADE geçersiz olmadığı ve bir kabuk işlevi çalıştırmadığı durumda 0 " +"döndürür." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Kabuk çalışma dizinini değiştir.\n" +" \n" +" Geçerli dizini DİZİN olarak değiştir. Öntanımlı dizin kabuk değişkeninin " +"EV\n" +" dizini değeridir.\n" +" \n" +" CDPATH değişkeni, DİZİN içeren dizinler için arama yolunu tanımlar. " +"CDPATH\n" +" için alternatif dizin isimleri iki nokta (:) ile ayrılır.\n" +" Boş dizin adı, geçerli dizinle aynıdır. Eğer DİZİN bölü (/) ile " +"başlıyorsa, CDPATH\n" +" kullanılmaz.\n" +" \n" +" Eğer dizin bulunamazsa ve kabuk seçeneği `cdable_vars' ayarlanmışsa, " +"kelime\n" +" bir değişken adı olarak varsayılır. Eğer değişken bir değere sahipse, " +"değeri DİZİN\n" +" için kullanılır\n" +" \n" +" Seçenekler:\n" +" -L\tsembolik bağlantıların takip edilmesini zorla: '..' " +"örneklerinin\n" +" \t\tişlenmesinden sonra DİZİN içindeki sembolik bağlantıları çöz\n" +" -P\tsembolik bağlantıları takip etmeden fiziksel dizini kullan: '..' " +"örneklerinin\n" +" \t\tişlenmesinden önce DİZİN içindeki sembolik bağlantıları çöz\n" +" -e\teğer -P seçeneği belirtilmişse ve geçerli çalışma dizini " +"başarılı şekilde\n" +" \tbelirlenemiyorsa, sıfır olmayan bir durumla çık\n" +" -@\tdestekleyen sistemlerde, dosya niteliklerini içeren bir dizin " +"olarak uzatılmış\n" +" niteliklere sahip bir dosya sun \n" +" Öntanımlı olan `-L' tanımlanmış gibi sembolik bağlantıları takip " +"etmektir.\n" +" \n" +" Çıkış Durumu:\n" +" Eğer dizin değişmişse ve -P kullanıldığında $PWD başarılı ayarlanırsa 0; " +"diğer durumda\n" +" sıfır olmayan bir değer döndürür." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Geçerli çalışma dizininin ismini yazdır.\n" +" \n" +" Seçenekler:\n" +" -L\teğer geçerli çalışma dizinini isimlendirmişse $PWD değerini " +"yazdır\n" +" -P\thiçbir sembolik bağlantı kullanmadan fiziksel dizini yazdır\n" +" \n" +" Öntanımlı olarak `pwd', `-L' tanımlanmış şekilde davranır.\n" +" \n" +" Çıkış Durumu:\n" +" Dizin okunamadığı veya geçersiz seçenek verilmediği takdirde 0 döndürür." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Boş komut.\n" +" \n" +" Etkisizdir; bu komut birşey yapmaz.\n" +" \n" +" Çıkış Durumu:\n" +" Her zaman başarılıdır." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Bir başarılı sonuç dönrürür.\n" +" \n" +" Çıkış Durumu:\n" +" Her zaman başarılıdır." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Başarısız bir sonuç döndür.\n" +" \n" +" Çıkış Durumu:\n" +" Her zaman başarısızdır." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Basit bir komut çalıştır veya komutlar hakkında bilgi görüntüle.\n" +" \n" +" KOMUTU ARGümanları ile kabuk işlevi aramasını ihmal ederek çalıştırır " +"veya\n" +" belirtilen KOMUTlar hakkında bilgi görüntüler. Aynı isimde bir işlev " +"varsa\n" +" diskte komutları çalıştırmak için kullanılabilir.\n" +" \n" +" Seçenekler:\n" +" -p YOL için, tüm standart yardımcıları bulabilmek için bir " +"öntanımlı değer\n" +" \tkullan\n" +" -v `type' dahilisine benzer bir KOMUT açıklaması göster\n" +" -V her KOMUTun fazla açıklamasını göster\n" +" \n" +" Çıkış Durumu:\n" +" KOMUTun çıkış durumunu döndürür. KOMUT bulunamazsa başarısız olur." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Değişken değer ve niteliklerini ayarla.\n" +" \n" +" Değişkenleri ayarla ve nitelik ver. Eğer İSİM verilmemişse, tüm " +"değişkenlerin, niteliklerini ve değerlerini görüntüle.\n" +" \n" +" Seçenekler:\n" +" -f\teylemi veya işlev ismi ile tanımları gösterimini kısıtla\n" +" -F\tsadece işlev isim gösterimlerini kısıtla (ek olarak satır sayısı " +"ve hata ayıklarken\n" +" \t\tkaynak dosyayı)\n" +" -g\tbir kabuk fonksiyonunda kullanıldığında evrensel değişken " +"oluştur,\n" +" \t\taksi takdirde yoksayılır\n" +" -p\ther İSİMin değeri ve niteliklerini görüntüle\n" +" \n" +" Nitelik ayarlayan seçenekler:\n" +" -a\tİSİMleri indisli diziler yapmak için (destekleniyorsa)\n" +" -A\tİSİMleri ilişkisel dizi yapmak için (destekleniyorsa)\n" +" -i\tİSİMleri `integer' niteliği sahibi yapmak için\n" +" -l\tİSİMleri atamada küçük harfe dönüştürmek için\n" +" -n\tİSİMi değeriyle isimlendirilmiş bir değişkene referans yapmak " +"için\n" +" -r\tİSİMleri salt okunur yapmak için\n" +" -t\tİSİMlerin `trace' niteliği sahibi yapmak için\n" +" -u\tİSİMleri atamada büyük harfe dönüştürmek için\n" +" -x\tİSİMleri dışarı çıkarabilir yapmak için\n" +" \n" +" `-' yerine `+' kullanmak belirtilen niteliği kapatır.\n" +" \n" +" Tamsayı niteliğine sahip değişkenler, bir değere atandıklarında " +"aritmetik değerlendirmeye tabi tutulurlar (`let' komutuna bakın).\n" +" \n" +" Bir fonksiyonda kullanıldığında, `declare' İSİMleri, `local' komutu\n" +"gibi yerel\n" +" yapar. `-g' seçeneği bu davranışı iptal eder.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir değer sağlanmadığı veya değişken atama hatası olmadığı " +"sürece\n" +" başarılı döner." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Değişken isim ve niteliklerini ayarla.\n" +" \n" +" `declare' ile eş anlamlıdır. Bkz. `help declare'." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Yerel değişkenleri tanımla.\n" +" \n" +" İSİM adıyla bir yerel değişken oluştur ve DEĞER ata. SEÇENEK `declare'\n" +" tarafından kabul edilen herhangi bir seçenek olabilir.\n" +" \n" +" Yerel değişkenler sadece bir işlev içerisinde kullanılabilirler ve " +"tanımlandıkları\n" +" işleve ve alt işlevlerine görünebilirler.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir seçenek verilmediğinde, bir değişken hatası oluşmadığında " +"veya\n" +" kabuk bir işlev çalıştırmıyorsa başarılı döner." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Argümanları standart çıktıya yaz.\n" +" \n" +" ARGümanları yeni satırla izlenen standart çıktıda bir boşluk karakteri\n" +" kullandıktan sonra göster.\n" +" \n" +" Seçenekler:\n" +" -n\tyeni satıra başvurma\n" +" -e\ttakip eden ters bölü kaçışlarının yorumlanmasını etkinleştir\n" +" -E\tters bölü kaçışlarının yorumlanmasını açıkça gizle\n" +" \n" +" `echo' aşağıdaki ters bölü kaçışlı karakterleri yorumlar:\n" +" \\a\tuyarı (zil)\n" +" \\b\tgerisilme\n" +" \\c\tsonraki çıktıları gizle\n" +" \\e\tkaçış karakteri\n" +" \\E\tkaçış karakteri\n" +" \\f\tform besleme\n" +" \\n\tyeni satır\n" +" \\r\tsatırbaşı\n" +" \\t\tyatay sekme\n" +" \\v\tdikey sekme\n" +" \\\\\tters bölü\n" +" \\0nnn\tASCII kodu NNN (sekizlik) olan karakter. NNN 0-3 arası " +"sekizli\n" +" \t\trakamlardan oluşabilir.\n" +" \\xHH\tdeğeri HH (onaltılık) olan sekiz bit karakter. HH bir veya iki\n" +" \t\tonaltılık rakam olabilir\n" +" \n" +" Çıkış Durumu:\n" +" Yazma hatası oluşmadığı takdirde başarılı döner." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Argümanları standart çıktıya yaz.\n" +" \n" +" ARGümanları yeni satır ile takip eden standart çıktıda görüntüle.\n" +" \n" +" Seçenekler:\n" +" -n\tyeni bir satıra başvurma\n" +" \n" +" Çıkış Durumu:\n" +" Bir hata oluşmadığı sürece başarılı döner." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Kabuk yerleşiklerini etkinleştir/devre dışı bırak.\n" +" \n" +" Dahili kabuk komutlarını etkinleştirir ve devre dışı bırakır. Devre " +"dışı\n" +" bırakmak bir kabuk yerleşiği ile aynı isme sahip bir disk komutunu tam\n" +" bir yol adı kullanmadan çalıştırmanızı sağlar. \n" +" Seçenekler:\n" +" -a\ttüm yerleşikler listesini etkin olup olmadıkları bilgisi ile " +"yazdır\n" +" -n\ther İSİMi devre dışı bırak veya devre dışı olanları listele\n" +" -p\tyerleşik listesini tekrar kullanılabilir biçimde yazdır\n" +" -s\tsadece Posix `özel' yerleşiklerinin isimlerini yazdır\n" +" \n" +" Hareketli yüklemeyi denetleyen seçenekler:\n" +" -f\tİSİM yerleşiğini paylaşılan DOSYAADI nesnesinden yükle\n" +" -d\t-f ile yüklenmiş bir yerleşiği kaldır\n" +" \n" +" Seçenek olmazsa her İSİM etkinleştirilir.\n" +" \n" +" Kabuk yerleşiği sürümü yerine $PATH içerisinde bulunan `test' kullanmak\n" +" için `enable -n test' yazın.\n" +" \n" +" Çıktı Durumu:\n" +" İSİM bir kabuk yerleşiği değilse ve hata oluşmazsa başarılı döner." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Argümanları kabuk komutu olarak çalıştır.\n" +" \n" +" ARGümanları tek bir dizgeye birleştir, sonucu kabuğa girdi olarak " +"kullan,\n" +" ve sonuçlanan komutları çalıştır.\n" +" \n" +" Çıkış Durumu:\n" +" Komutun çıkış durumunu döndürür veya komut boşsa başarılı döner." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Seçenek argümanlarını ayıklar.\n" +" \n" +" Getopts kabuk betikleri tarafından konumsal parametreleri " +"çözümlemekte\n" +" kullanılır.\n" +" \n" +" SÇNDİZGESİ tanınan seçenek karakterlerini içerir; bir karakterden " +"sonra\n" +" bir ikinokta imi (:) geliyorsa seçeneğin ondan bir boşlukla ayrılmış " +"bir\n" +" argümana sahip olacağı umulur.\n" +" \n" +" Her çağrılışında getopts işlenecek sonraki argümanın indisini " +"OPTIND\n" +" kabuk değişkenine ve AD değişkenini de mevcut değilse " +"ilklendirerek\n" +" sonraki seçeneği $AD kabuk değişkenine yerleştirir. OPTIND kabuğun ya " +"da\n" +" bir kabuk betiğinin her çağrılışında 1 ile ilklendirilir. Bir " +"seçenek\n" +" bir argüman gerektirdiğinde getopts argümanı OPTARG " +"değişkenine\n" +" yerleştirir.\n" +" \n" +" getopts hataları iki yolla raporlayabilir. Eğer SÇNDİZGESİnin " +"ilk\n" +" karakteri bir ':' ise sessiz hata raporlaması kullanılır. Bu " +"kipte\n" +" hiçbir hata iletisi basılmaz. Bir geçersiz seçenek saptanırsa " +"getopt\n" +" OPTARG'a bulunan seçenek karakterini yerleştirir. Bir gerekli " +"argüman\n" +" verilmemişse, getopts AD'a bir ':' yerleştirir. Getopts sessiz " +"kipte\n" +" değilse ve geçersiz bir seçenek görüldüğünde, getopts ? karakterini " +"AD'a\n" +" yerleştirir ve OPTARG değişkenini kaldırır. Eğer bir gerekli " +"argüman\n" +" bulunamazsa ve getopts sessiz kipte değilse AD'a ? " +"karakteri\n" +" yerleştirilir, OPTARG kaldırılır ve bir tanı iletisi basılır.\n" +" \n" +" OPTERR değişkeninin değeri 0 ise SÇNDİZGESİnin ilk karakteri bir " +"':'\n" +" olmasa bile hata iletileri gösterilmez. OPTERR değişkeninin " +"öntanımlı\n" +" değeri 1'dir.\n" +" \n" +" Getopts normalde konumsal parametreleri ($0 - $9) çözümlese de " +"başka\n" +" argümanlar verilmişse bunları çözümler.\n" +" \n" +" Çıktı Durumu:\n" +" Bir seçenek bulunduğunda başarılı, seçenek sonuna gelindiğinde veya " +"bir hata oluştuğunda başarısız döner.\n" +" encountered or an error occurs." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Kabuğu verilen komutla değiştir.\n" +" \n" +" KOMUTU, belirtilen program ile değiştirerek çalıştır.\n" +" ARGÜMANLAR, KOMUTUN argümanları olur. Eğer KOMUT belirtilmemişse, tüm\n" +" yönlendirmeler geçerli kabukta uygulanır.\n" +" \n" +" Seçenekler:\n" +" -a isim\tİSMİ, KOMUTun sıfırıncı argümanına ata\n" +" -c\tKOMUTu boş bir ortamla çalıştır\n" +" -l\tKOMUTun sıfırıncı argümanına bir çizgi koy\n" +" \n" +" Eğer komut çalıştırılamıyorsa, `execfail' ayarlanmadığı sürece " +"etkileşimsiz kabuk\n" +" çıkış yapar.\n" +" \n" +" Çıkış Durumu:\n" +" KOMUT bulunduğu ve bir yönlendirme hatası olmadığı sürece başarılı döner." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Exit the shell.\n" +" \n" +" N durumu ile dönerek kabuk çıkar. N verilmezse son çalıştırılan komutun\n" +" çıkış durumu döner." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Oturum kabuğundan çık.\n" +" \n" +" N durumuyla bir oturum kabuğundan çıkar. Eğer çalıştırılmamışsa oturum\n" +" kabuğunda bir hata döndürür." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Geçmiş listesindeki komutları görüntüle veya çalıştır\n" +" \n" +" fc, komut geçmişi listesindeki komutları listelemek, düzenlemek " +"ve\n" +" yeniden çalıştırmak için kullanılır. İLK ve SON olarak numara " +"vererek\n" +" bir aralık belirtilebileceği gibi İLK bir dizge de olabilir, bu " +"takdirde\n" +" bu dizge ile başlayan en son komut anlamına gelir.\n" +" \n" +" Seçenekler:\n" +" -e DÜZENLEYİCİ ile hangi düzenleyicinin kullanılacağı belirtilir.\n" +" \t\tÖntanımlısı FCEDIT ardından EDITOR ve vi'dir.\n" +" -l\tile komutlar stardart çıktıya listelenir.\n" +" -n\tile listede satır numaraları bulunmaz.\n" +" -r\tile komutlar ters sırada (en yeniler listesi olarak) listelenir\n" +" \n" +" `fc -s [ESKİ=YENİ] [KOMUT]' biçiminde, ESKİ=YENİ ikamesi yapıldıktan\n" +" sonra komut yeniden çalıştırılır.\n" +" \n" +" Bununla kullanılacak yararlı bir rümuz r='fc -s' olurdu.\n" +" Böylece `r cc' yazarak `cc' ile başlayan son komut,\n" +" r' yazarak en son komut çalıştırılabilir.\n" +" \n" +" Çıktı Durumu:\n" +" Başarılı veya çalıştırılan komut durumu döndürülür; hata oluştuğunda " +"sıfır harici değer döner." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"İşi ön plana taşı.\n" +" \n" +" İŞ_BELİRTİMİni önalana yerleştirir ve onu o an ki iş yapar.\n" +" Eğer İŞ_BELİRTİMİ belirtilmemişse kabuk iş belirtimi olarak\n" +" o an ki işi kullanır.\n" +" \n" +" Çıktı Durumu:\n" +" Ön plana yerleştirilmiş komutun durumu veya hata olduğunda başarısız." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"İşi arkaplana taşı.\n" +" \n" +" `&' ile başlatılmışçasına İŞ_BELİRTİMİni artalana yerleştirir.\n" +" İŞ_BELİRTİMİ verilmemişse, iş belirtimi olarak o an ki iş " +"kullanılır. \n" +" Çıktı Durumu:\n" +" İş kontrolü etkin olmadığı veya bir hata oluşmadığı sürece başarılı " +"döner." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Dahili komutlar hakkında bilgi görüntüle.\n" +" \n" +" Dahili komutların özetlerini görüntüler. Eğer DESEN belirtilmişse,\n" +" DESEN ile eşleşen tüm komutlar hakkında ayrıntılı bilgi verir, aksi\n" +" halde, yardım konuları yazdırılır.\n" +" \n" +" Seçenekler:\n" +" -d\ther konu için kısa açıklama yazdır\n" +" -m\tkullanımı pseudo-man sayfası biçiminde yazdır\n" +" -s\tsadece DESEN ile eşleşen konular için kısa kullanım\n" +" \t\tbilgisi yazdır\n" +" \n" +" Argümanlar:\n" +" DESEN\tBir yardım konusunu belirten desen\n" +" \n" +" Çıktı Durumu:\n" +" DESEN bulunmadığı veya geçersiz bir seçenek verilmediğinde başarılı " +"döner." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Geçmiş listesini görüntüle veya düzenle.\n" +" \n" +" Seçeneksiz kullanıldığında komut geçmişi listesini satır numaraları ile\n" +" gösterir. Değişiklik yapılmış satırlarda numaralardan önce bir `*'\n" +" vardır. Argüman olarak N belirtildiğinde sadece son N satır listelenir.\n" +" \n" +" Seçenekler:\n" +" -c\tkomut geçmişi listesini tüm girdilerini silerek temizler.\n" +" -d\tile konumu KONUM olan geçmiş girdisi silinir.\n" +" \n" +" -a\tile oturumunun başlangıcından itibaren girilen geçmiş satırları\n" +" \tgeçmiş dosyasına eklenir.\n" +" -n\tile geçmiş dosyasından henüz okunmamış olan geçmiş satırları okur\n" +" \t\tve geçmiş listesine ekler\n" +" -r\tile dosya okunur ve içeriği geçmiş listesine eklenir.\n" +" -w\tile geçmiş listesi çıktısı geçmiş dosyasına yazılır.\n" +" \n" +" -p\ther ARGümanda geçmiş açılımı yap ve sonucu geçmiş listesinde\n" +" \tdepolamadan görüntüle\n" +" -s\tARGümanları geçmiş listesine tek bir girdi olarak ekle\n" +" \n" +" DOSYAİSMİ verilmezse, HISTFILE değişkenindeki değer, o da yoksa\n" +" ~/.bash_history dosyası kullanılır.\n" +" \n" +" HISTTIMEFORMAT kabuk değişkeni tanımlanmış ve anlamlı bir değere\n" +" sahipse, değeri, gösterilen her geçmiş girdisi ile ilişkili zaman\n" +" damgasını basacak olan strftime(3) işlevine biçim girdisi olur; aksi\n" +" takdirde hiç zaman damgası basılmaz. \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek girilmediği veya bir hata oluşmadığı takdirde " +"başarılı döner." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Görev durumlarını görüntüle.\n" +" \n" +" Etkin işleri listeler. İŞ_BELİRTİMİ bu çıktıya çıktıyı kısıtlar.\n" +" Seçenekler olmadan, tüm etkin görev durumları görüntülenir.\n" +" \n" +" Seçenekler:\n" +" -l\tile normal bilgilere ek olarak süreç kimliklerini de (PID) " +"listele\n" +" -n\tile sadece kullanıcının durumları hakkında aldığı son uyarıdan\n" +" \t\tberi durumları değişen işler hakkında bilgi gösterir.\n" +" -p\tile işlerin sadece süreç kimliklerini listeler\n" +" -r\tile sadece çalışmakta olan,\n" +" -s\tile ise sadece durmuş olan işler listelenir.\n" +" \n" +" -x seçeneği verilmişse, ARGümanlar ile belirtilen tüm iş belirtimleri,\n" +" işlerin süreç grup liderinin süreç grup kimliğine yerleştirilip KOMUT\n" +" çalıştırılır.\n" +" \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek girilmediği veya bir hata oluşmadığı takdirde " +"başarılı döner.\n" +" -x kullanılmışsa, KOMUTun çıkış durumu döndürülür." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Görevleri geçerli kabuktan kaldır.\n" +" \n" +" Her İŞTANIMı argümanını etkin görevler tablosundan kaldırır. İŞTANIMı " +"olmadan,\n" +" kabuk geçerli görev kavramını kullanır.\n" +" \n" +" Seçenekler:\n" +" -a\tİŞTANIMı belirtilmemişse tüm görevleri kaldır\n" +" -h\ther İŞTANIMını işaretle, böylece kabul bir SIGHUP aldığında göreve " +"SIGHUP\n" +" \t\tgönderme\n" +" -r\tsadece çalışan görevleri kaldırremove \n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir seçenek veya İŞTANIMı girilmedikçe başarılı döner." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Bir göreve sinyal gönder.\n" +" \n" +" PID ile belirtilen süreç kimliğine veya İŞ_BELİRTİMİ ile belirtilen\n" +" işin sürecine SİNYAL veya SİNYALNUM ile belirtilen sinyali gönderir.\n" +" SİNYAL veya SİNYALNUM verilmezse öntanımlı olarak SIGTERM kullanılır.\n" +" \n" +" Seçenekler:\n" +" -s sig\tSİNYAL bir sinyal\n" +" -n sig\tSİNYAL bir sinyal numarası\n" +" -l\t-l seçeneği ile sinyal isimleri listelenir.\n" +" \t\tArgümanlı -l seçeneğinde argümanların listelenecek\n" +" sinyal isimlerinin numaraları olduğu varsayılır. \n" +" -L\t, -l anahtarının eş anlamlısıdır\n" +" Kill iki sebepten dolayı bir kabuk yerleşiğidir: süreç kimlikleri yerine " +"iş\n" +" kimliklerinin kullanımını mümkün kılar ve eğer oluşturabileceğiniz " +"süreç\n" +" sayısı sınırını aşarsanız başka bir süreci öldürecek bir süreci " +"başlatmak\n" +" zorunda kalmazsınız.\n" +" \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek belirtilmediği veya bir hata oluşmadığında başarılı " +"döner." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Aritmetik ifadeleri değerlendir.\n" +" \n" +" Her ARG değerlendirilecek bir aritmetik ifadesidir. Değerlendirme\n" +" sabit genişlikli tamsayılarla, taşma denetimi uygulanmaksızın yapılır,\n" +" sıfırla bölme bir hata olarak bayraklanır ve onun için bir sinyal\n" +" kapanı vardır. İşleçler için öncelikler ve çağrışımsallık ve değerler\n" +" C dilindeki ile aynıdır. Aşağıdaki işleçler eşit öncelikli işleç\n" +" düzeylerine göre öbeklenmiş ve azalan öncelikle listelenmişlerdir.\n" +" \n" +" \tid++ id--\tsonradan-arttırım ve sonradan-eksiltim\n" +" \t++id --id\tönceden-arttırım ve önceden-eksiltim\n" +" \t- +\t\ttek terimli eksi ve artı imi\n" +" \t! ~\t\tmantıksal ve bitseviyesinde olumsuzlama\n" +" \t**\t\tüs imi\n" +" \t* / %\t\tçarpma, bölme, kalan\n" +" \t+ -\t\ttoplama, çıkarma\n" +" \t<< >> \tbit seviyesinde sola ve sağa ötelemeler\n" +" \t<= >= < >\tkarşılaştırmalar\n" +" \t== !=\t\teşitlik, eşitsizlik\n" +" \t&\t\tbit seviyesinde VE\n" +" \t^\t\tbit seviyesinde ayrıcalıklı VEYA\n" +" \t|\tbit seviyesinde VEYA\n" +" \t&&\t\tmantıksal VE\n" +" \t||\t\tmantıksal VEYA\n" +" \tifade ? ifade : ifade\n" +" \t\t\tkoşullu üç terimlisi\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tatamalar\n" +" \n" +" Kabuk değişkenleri terim olarak kullanılabilir. İfade içinde değişken\n" +" ismi değeriyle değiştirilir (sabit genişlikli tamsayıya zorlanır).\n" +" Bir kabuk değişkeni ifade içinde kullanılırken tamsayı niteliğinin\n" +" etkinleştirilmesini gerektirmez.\n" +" \n" +" İşleçler öncelik sırasına göre değerlendirilir. Parantez içine alınmış\n" +" alt ifadeler öncelikle değerlendirilir. Bu nedenle parantez içine alma\n" +" işleçlerin önceliklerini arttırmak amacıyla kullanılabilir.\n" +" \n" +" Çıktı Durumu:\n" +" Son ifade'nin sonucu 0 ise dönüş durumu 1 dir, aksi takdirde 0 dır." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Bir kabuk fonksiyonundan dön.\n" +" \n" +" Bir fonksiyon veya kaynak betiğinin N ile belirtilen dönüş değeri ile\n" +" çıkmasına neden olur. N girilmezse, dönüş durumu fonksiyon veya\n" +" betikte çalıştırılmış en son komutun dönüş durumudur.\n" +" \n" +" Çıkış Durumu:\n" +" N veya kabul bir fonksiyon ya da betik çalıştırmıyorsa başarısız döner." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Kabuk seçenekleri ve konumsal parametrelerin değerlerini ata veya kaldır\n" +" \n" +" Kabuk nitelikleri veya konumsal parametre değerlerini değiştir veya\n" +" kabuk değişkenlerinin isim ve değerlerini görüntüle.\n" +" \n" +" Seçenekler:\n" +" -a Müteakip komutların ortamına aktarılmak üzere değiştirilen veya\n" +" oluşturulan işlev ve değişkenleri imler.\n" +" -b Sonlandırılan artalan işlerin durumunun anında raporlanmasını " +"sağlar.\n" +" -e Bir komut sıfırdan farklı bir çıkış durumu ile çıkarsa anında " +"çıkar.\n" +" -f Dosya ismi üretimini (globbing) iptal eder.\n" +" -h Çalıştırmak için aranan komutları bulur ve yerlerini hatırlar " +"(hash).\n" +" -k Atama deyimleri şeklindeki tüm argümanları komut isminden önce\n" +" belirtmek yerine ortama yerleştirir.\n" +" -m İş denetimi etkinleştirilir.\n" +" -n Komutları okur ama onları çalıştırmaz.\n" +" -o seçenek-ismi\n" +" seçenek-ismi olarak aşağıdakilerden biri verildiğinde karşılığı\n" +" olan seçenekler kullanılmış olur:\n" +" allexport -a ile aynı\n" +" braceexpand -B ile aynı\n" +" emacs emacs tarzı bir satır düzenleme arayüzü kullanılır\n" +" errexit -e ile aynı\n" +" errtrace -E ile aynı\n" +" functrace -T ile aynı\n" +" hashall -h ile aynı\n" +" histexpand -H ile aynı\n" +" history komut geçmişini etkinleştirir\n" +" ignoreeof kabuk dosyasonu karakterine rastlanınca çıkmaz.\n" +" interactive-comments\n" +" etkileşimli komutlarda görünecek açıklamalara\n" +" izin verir.\n" +" keyword -k ile aynı\n" +" monitor -m ile aynı\n" +" noclobber -C ile aynı\n" +" noexec -n ile aynı\n" +" noglob -f ile aynı\n" +" nolog o an kabul edilir ama yoksayılır\n" +" notify -b ile aynı\n" +" nounset -u ile aynı\n" +" onecmd -t ile aynı\n" +" physical -P ile aynı\n" +" pipefail bir boruhattının dönüş değeri ya sıfırdan farklı " +"bir\n" +" durumla çıkan son (en sağdaki) komutun değeridir " +"ya\n" +" da boruhattındaki tüm komutlar başarılıysa " +"sıfırdır\n" +" posix Standart uyumu için POSIX 1003.2 " +"standardındakinden\n" +" farklı öntanımlı işlemde Bash davranışını " +"değiştirir\n" +" privileged -p ile aynı\n" +" verbose -v ile aynı\n" +" vi vi tarzı bir satır düzenleme arayüzü kullanılır\n" +" xtrace -x ile aynı\n" +" -p Ayrıcalıklı kipi etkinleştirir. Bu kipte, $BASH_ENV ve $ENV " +"dosyaları\n" +" işlenmez, kabuk işlevleri ortamdan miras alınmaz. Kabuk, gerçek\n" +" kullanıcı (grup) kimliği ile aynı olmayan etkin kullanıcı (grup)\n" +" kimliği ile başlatılmışsa ve -p seçeneği verilmemişse, bu eylemler\n" +" alınır ve etkin kullanıcı (grup) kimliği, gerçek kullanıcı (grup)\n" +" kimliğine ayarlanır. Başlatırken -p seçeneği verilmişse, etkin\n" +" kullanıcı (grup) kimliği sıfırlanmaz. Bu seçeneğin kapatılması " +"etkin\n" +" kullanıcı ve grup kimliklerinin gerçek kullanıcı ve grup " +"kimliklerine\n" +" ayarlanmasına sebep olur.\n" +" -t Tek bir komutu okuyup çalıştırdıktan sonra çıkar..\n" +" -u Parametre yorumlaması uygulanırken bir hata sonucu değişkenlerin\n" +" kaldırılmasına benzer bir davranış gösterir.\n" +" -v Kabuk girdi satırlarını okunuyormuş gibi basar.\n" +" -x Komutları ve argümanlarını çalıştırılıyormuş gibi basar.\n" +" -B Kabuk kaşlı ayraç yorumlaması uygular.\n" +" -C Çıktının > kullanılarak yönlendirilmesini ve <> kullanılarak mevcut\n" +" dosyaların üzerine yazılmasını engeller.\n" +" -E Etkinse ERR üstündeki bir tuzak kabuk işlevlerince miras alınır.\n" +" -H ! tarzı geçmiş ikamesini etkinleştirir. Bu seçenek etkileşimli\n" +" kabuklarda öntanımlı olarak etkindir.\n" +" -P Verildiğinde, örneğin çalışılan dizini değiştirmek için cd gibi bir\n" +" komut sembolik bağları izlemez.\n" +" -T Etkinse DEBUG ve RETURN üstündeki tuzaklar kabuk işlevlerince\n" +" miras alınır.\n" +" -- Geri kalan argümanları konumsal parametrelere ata. Eğer kalan\n" +" argüman yoksa, konumsal parametrelerin ataması kaldırılır.\n" +" - Seçeneklerin sonunu belirtir. Kalan tüm argümanlar konumsal\n" +" parametrelere ayarlanır. -x ve -v seçenekleri kapatılır.\n" +"\n" +" Seçeneklerdeki - işaretleri yerine + kullanıldığında bu seçenekler\n" +" kapatılır. Ayrıca, seçenekler kabuğun çağrılması sırasında da\n" +" kullanılabilir. Seçeneklerin mevcut listesi $- içinde bulunabilir.\n" +" Kalan N argüman konumsal parametrelerdir ve $1, $2, ... $N şeklinde\n" +" atanır. Özel parametre # ise N'e ayarlanır. Hiç argüman verilmezse,\n" +" tüm kabuk değişkenleri basılır. \n" +" Çıktı Durumu:\n" +" Geçersiz seçenek belirtilmediği sürece başarılı döner." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Geçerli kabukta bir dosyadan komut çalıştır.\n" +" \n" +" DOSYAİSMİndeki komutlar okunur ve çalıştırılır. DOSYAİSMİ içermiyorsa\n" +" DOSYAİSMİnin yerini bulmak için $PATH değişkeni kullanılır. Bash POSIX\n" +" kipinde değilse ve $PATH içinde DOSYAİSMİ yoksa bulunulan dizine " +"bakılır.\n" +" Verilmiş ARGÜMANlar varsa, DOSYAİSMİ çalıştırılırken bunlar konumsal\n" +" parametreler haline gelir. Aksi takdirde, konumsal parametreler\n" +" değiştirilmez.\n" +" \n" +" Çıktı Durumu:\n" +" DOSYAİSMİnde çalıştırılan son komutun durumunu döndürür. DOSYAİSMİ\n" +" okunamazsa başarısız döner." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Koşullu ifade değerlendir.\n" +" \n" +" İFADEnin değerlendirilmesine bağlı olarak 0 (doğru) veya 1 (yanlış)\n" +" durumu ile çıkar. İfadeler tek terimli ya da iki terimli olabilir.\n" +" Tek terimli ifadeler çoğunlukla bir dosyanın durumunu saptamakta\n" +" kullanılır. Dizge işleçleri ve sayısal karşılaştırma işleçleri de\n" +" vardır.\n" +" \n" +" Dosya işleçleri:\n" +" \n" +" -a DOSYA DOSYA varsa doğrudur.\n" +" -b DOSYA DOSYA varsa ve bloka özelse doğrudur.\n" +" -c DOSYA DOSYA varsa ve karaktere özelse doğrudur.\n" +" -d DOSYA DOSYA varsa ve bir dizinse doğrudur.\n" +" -e DOSYA DOSYA varsa doğrudur.\n" +" -f DOSYA DOSYA varsa ve normal bir dosyaysa doğrudur.\n" +" -g DOSYA DOSYA varsa ve grup kimliği biti 1 ise doğrudur.\n" +" -h DOSYA DOSYA varsa ve bir sembolik bağ ise doğrudur.\n" +" -L DOSYA DOSYA varsa ve bir sembolik bağ ise doğrudur.\n" +" -k DOSYA DOSYA dosya varsa ve yapışkan biti 1 ise doğrudur.\n" +" -p DOSYA DOSYA varsa ve bir isimli boru (FIFO) ise doğrudur.\n" +" -r DOSYA DOSYA varsa ve okuyabiliyorsanız doğrudur.\n" +" -s DOSYA DOSYA varsa ve uzunluğu sıfırdan büyükse doğrudur.\n" +" -S DOSYA DOSYA varsa ve bir soketse doğrudur.\n" +" -t DSYTNT DSYTNT açık ve bir uçbirime karşılıksa doğrudur.\n" +" -u DOSYA DOSYA varsa ve kullanıcı kimliği biti 1 ise doğrudur.\n" +" -w DOSYA DOSYA dosya varsa ve yazabiliyorsanız doğrudur.\n" +" -x DOSYA DOSYA dosya varsa ve çalıştırabiliyorsanız doğrudur.\n" +" -O DOSYA DOSYA varsa ve etkin sahibi sizseniz doğrudur.\n" +" -G DOSYA DOSYA varsa ve etkin grubu sizinkiyse doğrudur.\n" +" -N DOSYA DOSYA varsa ve son okunduğundan beri değiştirilmişse\n" +" doğrudur.\n" +" \n" +" DOSYA1 -nt DOSYA2 dosya1, dosya2'den değişiklik tarihine göre\n" +" daha yeni ise ya da dosya1 mevcutken dosya2 yoksa\n" +" doğrudur.\n" +" \n" +" DOSYA1 -ot DOSYA2 dosya1, dosya2 den daha eski ise ya da dosya2\n" +" mevcutken dosya1 yoksa doğrudur.\n" +" \n" +" DOSYA1 -ef DOSYA2 dosya1 ile dosya2 aynı aygıt ve aynı dosya " +"düğümünü\n" +" gösteriyorsa (ona sabit bağ ise) doğrudur.\n" +" \n" +" Dizge işleçleri:\n" +" \n" +" -z DİZGE dizge uzunluğu sıfırsa doğrudur.\n" +" \n" +" -n DİZGE\n" +" DİZGE dizge uzunluğu sıfırdan farklıysa doğrudur.\n" +" \n" +" DİZGE1 = DİZGE2 dizgeler aynıysa doğrudur.\n" +" DİZGE1 != DİZGE2 dizgeler aynı değilse doğrudur.\n" +" DİZGE1 < DİZGE2 dizge1 yerele göre sıralamada dizge2'den\n" +" önceyse doğrudur.\n" +" DİZGE1 > DİZGE2 dizge1 yerele göre sıralamada dizge2'den\n" +" sonraysa doğrudur.\n" +" \n" +" Diğer işleçler:\n" +" \n" +" -o SEÇENEK Kabuk seçeneği SEÇENEK etkinse doğrudur.\n" +" -v DEĞŞ Kabuk DEĞŞ ayarlanmış ise true.\n" +" -R DEĞŞ Kabuk DEĞŞ ayarlanmış ve bir isim referansı ise true\n" +" ! İFADE İFADE yanlışsa doğrudur.\n" +" İFADE1 -a İFADE2 İFADE1 ve İFADE2 her ikisi de doğruysa doğrudur.\n" +" İFADE1 -o İFADE2 İFADE1 veya İFADE2 doğruysa doğrudur.\n" +" \n" +" arg1 İM arg2 Aritmetik sınamalar. İM bunlardan biri " +"olmalıdır:\n" +" -eq, -ne, -lt, -le, -gt veya -ge.\n" +" \n" +" Bir aritmetik ifadede ARG1 ve ARG2 arasında, aranan eşitlik, " +"eşitsizlik,\n" +" küçüklük, büyüklük, küçüklük veya eşitlik, büyüklük veya eşitlik varsa\n" +" ifadenin sonucu doğrudur. \n" +" Çıktı Durumu:\n" +" Eğer İFADE true olursa başarılı, İFADE false ile sonuçlanırsa veya " +"geçersiz\n" +" argümanda başarısız döner." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Şartlı ifadeyi değerlendir.\n" +" \n" +" \"test\" yerleşiği ile aynıdır, fakat son argüman açan `[' ile eşleşen\n" +" kapatan `]' olmak zorundadır." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"İşleme süresini görüntüle.\n" +" \n" +" Kabuk ve tüm alt süreçleri için kümülatif kullanıcı ve sistem süresini\n" +" yazdırır.\n" +" \n" +" Çıktı Durumu:\n" +" Her zaman başarılı döner." + +#: builtins.c:1364 +#, fuzzy +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"\rtrap [-lp] [ARG SİNYAL ...]\n" +" ARGüman içindeki komutlar, kabuk SİNYAL sinyalini aldığında okunur ve\n" +" çalıştırılır. ARGüman verilmezse (ve tek bir SİNYAL varsa) ya da `-'\n" +" verilirse, belirtilen tüm sinyallere kabuk başlatıldığındaki değerleri\n" +" yerleştirilir. ARGüman bir boş dizge ise her SİNYAL sinyali kabuk ve\n" +" onu çağıran komutlar tarafından yoksayılır. Eğer SİNYAL 0 ya da EXIT\n" +" ise ARGüman kabuk çıkarken çalıştırılır. Eğer SİNYAL olarak DEBUG\n" +" verilmişse, ARGüman komutu her basit komuttan önce çalıştırılır. -p\n" +" seçeneği verilmişse trap, her SİNYAL ile ilişkili trap komutlarını\n" +" gösterir. Hiç ARGüman verilmemişse veya sadece -p verilmişse, trap\n" +" her SİNYAL ile ilişkili komutların listesini basar. Her SİNYAL ya\n" +" dosyasındaki bir sinyal ismi ya da bir sinyal numarası\n" +" olarak verilmelidir. Sinyal isimleri harf büyüklüğüne duyarsızdır ve\n" +" SIG öneki isteğe bağlıdır. -l seçeneği kabuğun sinyal isimlerini\n" +" numaraları ile birlikte listelemesini sağlar. Kabuğa bir sinyal\n" +" göndermek isterseniz \"kill -SİGNAL $$\" sözdizimini kullanabilirsiniz." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Kabuk kaynak sınırlarını değiştir.\n" +" \n" +" Kabuk ve oluşturduğu süreçlere, izin veren sistemlerde mevcut kaynaklar\n" +" üzerinde denetim sağlar.\n" +" \n" +" Seçenekler:\n" +" -S\tYazılımsal (`soft') sınır kullanılır.\n" +" -H\tDonanımsal (`hard') sınır kullanılır.\n" +" -a\tMevcut tüm sınırlamalar gösterilir.\n" +" -c\tOluşan core dosyalarının azami boyu\n" +" -d\tBir sürecin veri segmanının azami boyu\n" +" -e\tAzami zamanlama önceliği (`nice')\n" +" -f\tKabuk ve çocukları tarafından oluşturulan dosyaların azami boyu\n" +" -i\tAskıdaki sinyallerin azami sayısı\n" +" -k\tBu süreç için ayrılmış kqueue'lerin azami sayısı\n" +" -l\tBelleğe kilitlenebilen azami boyut\n" +" -m\tAzami bellek boyu\n" +" -n\tAçık dosya tanıtıcılarının azami sayısı\n" +" -p\tİletişim tüneli tamponunun boyu\n" +" -q\tPOSIX ileti kuyruklarındaki azami bayt miktarı\n" +" -r\tAzami anında çalıştırma zamanlaması önceliği\n" +" -s\tYığıtın azami boyu\n" +" -t\tİşlemci zamanının saniye cinsinden azami miktarı\n" +" -u\tTek bir kullanıcının kullanabileceği azami süreç sayısı\n" +" -v\tBir sürecin kullanabileceği sanal belleğin azami miktarı\n" +" -x\tDosya kilitlerinin azami sayısı\n" +" -T\tAzami iş parçacık sayısı\n" +" \n" +" Tüm seçenekler tüm platformlarda kullanılabilir olmayabilir.\n" +" \n" +" SINIR verilmişse, belirtilen özkaynağın yeni değeridir; özel sınır\n" +" değerleri mevcut donanımsal sınır için `hard', mevcut yazılımsal sınır\n" +" için `soft' ve sınırsız için `unlimited''dir. Aksi takdirde, belirtilen\n" +" özkaynak için mevcut değer gösterilir. Hiç seçenek verilmezse -f\n" +" seçeneği verilmiş kabul edilir.\n" +" \n" +" Değerler -t için saniye cinsinden, -p\n" +" için 512 baytlık blok sayısı olarak, -n ve -u için birimsiz, kalan\n" +" seçenekler için 1024 baytlık blok sayısı olarak belirtilmelidir. \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek girilmediği veya bir hata oluşmadığı takdirde " +"başarılı döner." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Sürecin tamamlanmasını bekle ve çıkış durumunu döndür.\n" +" \n" +" Belirtilen süreci bekler ve sonlandırma durumunu raporlar. Eğer ID " +"verilmemişse\n" +" geçerli tüm alt süreçler beklenir ve dönüş kodu sıfırdır. Eğer ID bir " +"görev tanımıysa\n" +" görevin iletişim tünelindeki tüm süreçler beklenir.\n" +" \n" +" -n seçeneği verilirse, sonraki görevin sonlanması beklenir ve çıkış " +"durumunı döndürür.\n" +" \n" +" Çıkış Durumu:\n" +" Kimlik durumunu döndürür, kimlik geçersizse veya geçersiz bir seçenek " +"verilmişse\n" +" başarısız olur." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Sürecin tamamlanmasını bekle ve çıkış durumunu döndür.\n" +" \n" +" PID tarafından belirtilen her süreci bekler ve sonlandırma durumunu " +"raporlar.\n" +" Eğer PID verilmemişse geçerli tüm alt süreçler beklenir ve dönüş kodu " +"sıfırdır.\n" +" PID bir süreç kimliği olmalıdır.\n" +" \n" +" Çıkış Durumu:\n" +" Son PID'nin durumunu döndürür, PID geçersizse veya geçersiz bir seçenek " +"verilmişse\n" +" başarısız olur." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Bir listedeki her üye için komut çalıştır.\n" +" \n" +" `for' döngüsü bir öge listesindeki her üye için komut sırasını " +"çalıştırır.\n" +" Eğer `in KELİMELER ...;' belirtilmemişse `in \"$@\"' varsayılır. " +"KELİMELER\n" +" içerisindeki her eleman için, İSİM bu elemana atanır ve KOMUTLAR " +"çalıştırılır.\n" +" \n" +" Çıkış Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Döngü için aritmetik.\n" +" \n" +" Şuna eşdeğerdir:\n" +" \t(( İFADE1 ))\n" +" \twhile (( İFADE2 )); do\n" +" \t\tKOMUTLAR\n" +" \t\t(( İFADE3 ))\n" +" \tdone\n" +" İFADE1, İFADE2 ve İFADE3 aritmetik ifadelerdir. Eğer ifadelerden biri " +"yoksa\n" +" 1'e değerlendirilmiş şekilde davranır.\n" +" \n" +" Çıkış Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Listeden kelimeleri seç ve komutları çalıştır.\n" +" \n" +" `SÖZ ...;' listesi yorumlanarak öğe listesi üretilir. Öğe " +"listesindeki\n" +" her öğenin başına bir numara eklenerek standart hataya çıktılanır. " +"Eğer\n" +" `in SÖZ ... ;' parçası verilmezse, in \"$@\"' verilmiş gibi konuma " +"bağlı\n" +" parametreler basılır ve standart girdide PS3 istemi ile girdi " +"beklenir.\n" +" Listede belirtilen numaralardan biri girdi olarak verilirse, o " +"konuma\n" +" bağlı SÖZcük ile AD eşleştirilir. Girdi satırı boş verilirse, " +"dosyasonu\n" +" okununcaya kadar komut istemi tekrarlanır. Listede belirtilenler " +"dışında\n" +" verilen her değer için AD null ile eşleştirilir. Okunan satır " +"$REPLY\n" +" değişkeninde tutulur. Her seçimden sonra bir break komutu ile\n" +" sonlandırılıncaya kadar komutlar çalıştırılır.\n" +" \n" +" Çıktı Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Veriyolu çalıştırması tarafından harcanan zamanı bildir.\n" +" \n" +" VERİYOLUnu çalıştır ve sonlandığında kullanıcı işlemci zamanı ile " +"sistem\n" +" işlemci zamanını içeren gerçek zamanın bir özetini yazdır.\n" +" \n" +" Seçenekler:\n" +" -p\ttaşınabilir Posix biçiminde zaman özetini yaz\n" +" \n" +" ZAMANBİÇİMİ değişkeninin değeri çıktı biçimi olarak kullanılır.\n" +" \n" +" Çıktı Durumu:\n" +" VERİYOLU döndürme değerini döndürür." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Kalıp eşleştirme tabanlı komutları çalıştır.\n" +" \n" +" SÖZcük ile eşleşen ilk KALIP'a karşı düşen KOMUTLARı çalıştırır.\n" +" `|' çok sayıda kalıbı ayırmak için kullanılır.\n" +" \n" +" Çıkış Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Komutları şartlara göre çalıştırır.\n" +" \n" +" `if KOMUTlar;' listesi çalıştırılır; çıkış durumu sıfırsa\n" +" `then KOMUTlar;' listesi çalıştırılır, değilse `elif KOMUTlar;'\n" +" listesi çalıştırılır; bunun çıkış durumu sıfırsa `then KOMUTlar;'\n" +" listesi çalıştırılır ve if komutu tamamlanır, değilse varsa\n" +" `else KOMUTlar;' listesi çalıştırılır ve if komutu tamamlanır.\n" +" Oluşumun tamamının dönüş durumu çalıştırılmış olan son komutun\n" +" çıkış durumudur. Bir komut çalıştırılmamışsa ve hiçbir koşul\n" +" doğru sonuç vermemişse sıfır döner. Çıkış Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Testler başarılı olduğu sürece komutları çalıştırır.\n" +" \n" +" KOMUTLARı, `while' KOMUTLARı sıfır çıktı durumuna sahip oluncaya\n" +" kadar genişlet ve çalıştır.\n" +" \n" +" Çıktı Durumu:\n" +" En son çalıştırılan komutun durumunu döndürür." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Bir sınama başarısız oluncaya kadar komutları çalıştır.\n" +" \n" +" `until KOMUTlar; listesinin çıkış durumu sıfırdan farklı olduğu sürece\n" +" `do KOMUTlar;' listesi çalıştırılır.\n" +" \n" +" Çıktı Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Komutları bir birim olarak grupla.\n" +" \n" +" KOMUTlar bir grup olarak çalıştırılır. Bu, bir komut kümesini bir\n" +" yönlendirmede kullanmanın tek yoludur.\n" +" \n" +" Çıktı Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Göreve ön planda devam et.\n" +" \n" +" `fg' komutunu İŞ_BELİRTİMİ argümanı ile kullanmaya eşdeğerdir.\n" +" Durmuş veya artalandaki bir işin önalanda sürdürülmesini sağlar.\n" +" İŞ_BELİRTİMİ bir iş ismi veya iş numarası olarak belirtilebilir.\n" +" İŞ_BELİRTİMİ'nden sonra bir & gelmesi işin `bg' komutununa argüman\n" +" olarak kullanılmış gibi artalana yerleştirilmesine sebep olur.\n" +" \n" +" Çıktı Durumu:\n" +" Devam edilen görevin durumunu döndürür." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Aritmetik ifadeyi değerlendir.\n" +" \n" +" Verilen aritmetik İFADE aritmetik değerlendirme kurallarına göre\n" +" değerlendirilir. \"let İFADE\" ile eşdeğerdir.\n" +" \n" +" Çıktı Durumu:\n" +" İFADE 0 olursa 1; aksi takdirde 0 döndürür." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Koşullu komut çalıştır.\n" +" \n" +" Koşullu İFADEnin değerine bağlı olarak 0 ya da 1 durumu ile döner.\n" +" İfadeler test yerleşiği tarafından kullanılan aynı ilkelerle " +"oluşturulur\n" +" ve aşağıdaki işleçler kullanılarak biraraya getirilebilirler:\n" +"\n" +" ( İFADE ) İFADEnin değeri döner\n" +" ! İFADE İFADE yanlışsa doğru, doğruysa yanlıştır.\n" +" İFADE1 && İFADE2 İFADE1 ve İFADE2 her ikisi de doğruysa doğrudur\n" +" İFADE1 || İFADE2 İFADE1 veya İFADE2 doğruysa doğrudur\n" +"\n" +" `==' ve `!=' işleçleri kullanıldığında, işlecin sağındaki dizge bir " +"kalıp\n" +" olarak ele alınır ve kalıp eşleştirmesi uygulanır. `=~' kullanıldığında\n" +" işlecin sağındaki dizge düzenli ifade olarak eşleştirilir. \n" +" İFADE1, ifadenin değeri için tek başına yeterli ise && ve || İFADE2'yi\n" +" çalıştırmaz.\n" +" \n" +" Çıkış Durumu:\n" +" İFADE değerine göre 0 veya 1." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Bazı değişkenler ve anlamları:\n" +" \n" +" BASH_VERSION\tBu Bash'in sürüm bilgisi.\n" +" CDPATH\t`cd'ye argüman olarak verilecek dizinlerin aranacağı\n" +" \t\tdizinlerin iki nokta imi ayraçlı listesi.\n" +" GLOBIGNORE\tDosyayolu yorumlaması tarafından yoksayılacak dosya\n" +" \t\tisimlerini belirten kalıpların ikinokta imi ayraçlı\n" +" \t\tlistesi.\n" +" HISTFILE\tKomut geçmişinizin saklanacağı dosyanın ismi.\n" +" HISTFILESIZE\tBu dosyanın içerebileceği azami satır sayısı.\n" +" HISTSIZE\tÇalışan bir kabuğun erişebileceği geçmiş satırlarının\n" +" \t\tazami sayısı.\n" +" HOME\tKullanıcının ev dizininin tam yolu.\n" +" HOSTNAME\tMakinenizin ağdaki konak ismi.\n" +" HOSTTYPE\tBash'in bu sürümünün altında çalıştığı işlemcinin türü\n" +" IGNOREEOF\tTek girdi olarak EOF karakteri alındığında kabuğun\n" +" \t\teylemini kontrol eder. Atandığında değeri, kabuk\n" +" \t\tçıkmadan önce bir girdi satırındaki ilk karakter\n" +" \t\tolarak okunabilen ardışık EOF karakterlerinin sayısını\n" +" \t\tgösterir (öntanımlı 10). Eğer değişken mevcut değilse,\n" +" \t\tEOF girdi sonunu belirtir.\n" +" MACHTYPE\tBash'in üzerinde çalıştığı sistemi açıklayan dizge.\n" +" MAILCHECK\tBash'in yeni postaya kaç saniyede bir bakacağı.\n" +" MAILPATH\tBash'in yeni posta var mı diye bakacağı dosya\n" +" \t\tisimlerinin ikinokta imi ayraçlı listesi.\n" +" OSTYPE\tBash'in üzerinde çalıştığı çekirdeğin türü.\n" +" PATH\tKomutları ararken bakılacak dizinlerin ikinokta imi\n" +" \t\tayraçlı listesi.\n" +" PROMPT_COMMAND\tBirincil komut istemi ($PS1) basılmadan önce\n" +" \t\tçalıştırılacak komut\n" +" PS1\tBirincil komut istemi dizgesi.\n" +" PS2\tİkincil komut istemi dizgesi.\n" +" PWD\tÇalışma dizininizin tam yolu.\n" +" SHELLOPTS\tEtkin kabuk seçeneklerinin ikinokta imi ayraçlı listesi\n" +" TERM\tGeçerli uçbirim türünün ismi.\n" +" TIMEFORMAT\ttime anahtar sözcüğü ile başlayan zamanlama bilgisinin\n" +" \t\tnasıl belirtileceğini gösteren biçim dizgesi.\n" +" auto_resume\tDeğerin boş olmaması durmuş işin isminin onu\n" +" \t\tbaşlatmakta kullanılan komut satırı olduğudur ve\n" +" \t\toradaysa iş önalana alınır. `exact' değeri, komut\n" +" \t\tsözcüğünün durmuş işler listesindeki komutla tam\n" +" \t\tolarak eşleşmesi gerektiği anlamına gelir. `substring'\n" +" \t\tdeğeri, komut sözcüğünün işin bir altdizgesi ile\n" +" \t\teşleşmesi gerektiğini belirtir. Bunlar dışında bir\n" +" \t\tdeğer komutun durmuş bir işe önek olması gerektiği\n" +" \t\tanlamına gelir.\n" +" histchars\tGeçmiş yorumlaması, hızlı ikame ve sembolleştirmeyi\n" +" \t\tdenetleyen en çok üç karakter. İlk karakter geçmiş\n" +" \t\tyorumlamasının başlatılmasını sağlayan geçmiş\n" +" \t\tyorumlama karakteridir ve normalde ! işaretidir.\n" +" \t\tİkinci karakter, bir satırdaki ilk karakter olduğunda\n" +" \t\t`hızlı ikame'yi imleyen karakterdir ve normalde ^\n" +" \t\timidir. İstemlik olan üçüncü karakter ise, bir\n" +" \t\tsözcüğün ilk karakteri olarak bulunduğunda satırın\n" +" \t\tkalanının açıklama olmasını sağlayan karakterdir ve\n" +" \t\tnormalde # imidir.\n" +" HISTIGNORE\tGeçmiş listesine hangi satırların kaydedilmesi\n" +" \t\tgerektiğine karar vermek için kullanılan kalıpların\n" +" \t\tikinokta imi ayraçlı listesi.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Dizinleri yığına ekle.\n" +" \n" +" Dizin yığıtının en üstüne bir dizin ekler, ya da geçerli çalışma\n" +" dizini yığıtın tepesine gelecek şekilde yığıtı döndürür. Hiç\n" +" argüman verilmemişse en üstteki iki dizini yer değiştirir.\n" +" \n" +" Seçenekler:\n" +" -n\tdizinleri yığıta eklerken normal dizin değişikliğini engeller,\n" +" \t\tböylece sadece yığıt değiştirilmiş olur.\n" +" \n" +" Argümanlar:\n" +" +N\t(`dirs' tarafından gösterilen listenin solundan saymaya\n" +" \t\tsıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n" +" \t\tyığıtı döndürür.\n" +" \n" +" -N\t(`dirs' tarafından gösterilen listenin sağından saymaya\n" +" \t\tsıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n" +" \t\tyığıtı döndürür.\n" +" \n" +" dizin\tDİZİNi yeni çalışma dizini yaparak dizin yığıtının\n" +" \t\ttepesine ekler.\n" +" \n" +" Dizin yığıtını `dirs' komutuyla görebilirsiniz.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir argüman belirtilmediği veya dizin değişikliği başarısız\n" +" olmadıkça başarılı döner." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Dizin yığıtından girdileri sil.\n" +" \n" +" Dizin yığıtından girdileri siler. Hiç argüman verilmemişse,\n" +" yığıtın en üstündeki dizini yığıttan kaldırır ve yığıtın\n" +" tepesinde kalan dizine geçer. \n" +" \n" +" Seçenekler:\n" +" -n\tdizinleri yığıttan silerken normal dizin değişikliğini\n" +" \t\tengeller, böylece sadece yığıt değiştirilmiş olur. \n" +" \n" +" Argümanlar:\n" +" +N\t\t`dirs' tarafından gösterilen listenin solundan saymaya\n" +" \t\tsıfırla başlandığında N'inci girdiyi siler. Örneğin,\n" +" \t\t`popd +0' ilk dizini `popd +1' ikincisini siler. \n" +" \n" +" -N\t\t`dirs' tarafından gösterilen listenin sağından saymaya\n" +" \t\tsıfırla başlandığında N'inci girdiyi siler. Örneğin,\n" +" \t\t`popd -0' son dizini `popd -1' sonuncudan öncekini siler. \n" +" \n" +" Dizin yığıtını `dirs' komutuyla görebilirsiniz. \n" +" Çıkış Durumu:\n" +" Geçersiz bir argüman belirtilmediği veya dizin değişikliği başarısız\n" +" olmadıkça başarılı döner." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Dizin yığıtını görüntüle.\n" +" \n" +" O an anımsanan dizinleri listeler. Dizinler listeye `pushd'\n" +" komutuyla eklenir; listeden tek tek geri almak içinse `popd'\n" +" komutu kullanılır.\n" +" \n" +" Seçenekler:\n" +" -c\ttüm girdileri silerek dizin yığıtını boşaltır.\n" +" -l\t`dirs'in dizinleri ev dizininize göreli kısayollar\n" +" \t\tolarak göstermemesine yol açar.\n" +" -p\tyığıttaki konumu göstermemesi dışında aynı çıktıyı verir.\n" +" -v\t`dirs'in dizin yığıtını dizin adının önüne yığıt konumunu\n" +" \t\tekleyerek her satırda bir girdi göstermesini sağlar.\n" +" \n" +" Argümanlar:\n" +" +N\tdirs seçeneksiz çağrıldığında gösterdiği listenin solundan\n" +" \t\tsıfırla başlayarak sayılan N'inci girdiyi gösterir.\n" +" \n" +" \n" +" -N\tdirs seçeneksiz çağrıldığında gösterdiği listenin sağından\n" +" \t\tsıfırla başlayarak sayılan N'inci girdiyi gösterir.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz seçenek belirtilmediği veya bir hata oluşmadığı sürece başarılı " +"döner." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"BİÇİMin denetimi altında ARGümanları standart çıktıya biçimleyerek " +"yazar\n" +" \n" +" Seçenekler:\n" +" -v değişken\tseçeneği çıktının standart çıktıya\n" +" \t\tbasılması yerine DEĞİŞKENe atanmasını sağlar.\n" +" \n" +" BİÇİM üç tür nesne içeren bir dizgedir: salt karakterler\n" +" basitçe standart çıktıya kopyalanır, öncelenmiş karakterler\n" +" dönüştürülüp standart çıktıya kopyalanır ve biçim belirtimleri;\n" +" belirtimlerin her biri sırayla karşı düşen ARGümanların basılmasını\n" +" sağlar.\n" +" \n" +" Standart printf(1) biçimlerine ek olarak, printf aşağıdakileri de " +"yorumlar:\n" +" \n" +" %b\ttersbölü öncelemeli karakterlerin karşı düşen ARGümanda " +"yorumlanmasını sağlar\n" +" %q\tARGümanın kabuk girdisi olarak kullanılabilecek biçimde " +"kullanılabilmesi\n" +" \t\tiçin alıntılar.\n" +" %(fmt)T\tstrftime(3) için bir biçim dizgesi olarak FMT tarafından " +"kullanılmak üzere\n" +" \t\ttarih zaman dizgesi çıktısısı verir\n" +" \n" +" Biçim argümanların tümünün kullanılabilmesi için gerektiğinde yeniden " +"kullanılır.\n" +" Biçimin gerektirdiğinden daha az argüman varsa, ek biçim tanımlamaları " +"uygun olduğu\n" +" şekilde sıfır değeri veya BOŞ (null) dizge değeri olarak davranırlar.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir seçenek belirtilmediği veya yazılmadığı takdirde ya da bir " +"atama\n" +" hatası oluşmadığı sürece başarılı döner." + +#: builtins.c:1971 +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Seçeneklere bağlı olarak olası tamamlamaları gösterir.\n" +" \n" +" Olası tamamlamaları üretmek üzere bir kabuk işlevinin içinde kullanmak\n" +" amacıyla tasarlanmıştır. İsteğe bağlı SÖZCÜK argümanı sağlandığı\n" +" takdirde eşleşmelerden sadece SÖZCÜK ile eşleşenler üretilir.\n" +" \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek girilmediği veya bir hata oluşmadığı takdirde " +"başarılı döner." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Bir dosyadaki satırları bir dizi değişkenine oku.\n" +" \n" +" `mapfile' ile eşanlamlıdır." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Telif Hakkı (C) 2016 Özgür Yazılım Vakfı A.Ş." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Geçerli altyordam çağrısının bağlamı döndürür.\n" +#~ " \n" +#~ " İFADE olmadan, şu döner " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: %5ld (%s) süreci iletişim_tünelinde" + +#~ msgid "Unknown Signal #" +#~ msgstr "Bilinmeyen Sinyal #" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Telif Hakkı (C) 2009 Free Software Foundation, Inc.\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Lisans GPLv2+: GNU GPL sürüm 2 veya sonrası \n" + +#~ msgid " " +#~ msgstr " " + +#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," +#~ msgstr "İFADE olmaksızın \"$line $filename\" döner. İFADE ile ise" + +#~ msgid "returns \"$line $subroutine $filename\"; this extra information" +#~ msgstr "\"$line $subroutine $filename\" döner; bu ek bilgi" + +#~ msgid "can be used used to provide a stack trace." +#~ msgstr "bir yığıt izini sürmek için kullanılabilir." + +#~ msgid "" +#~ "The value of EXPR indicates how many call frames to go back before the" +#~ msgstr "" +#~ "İFADE değeri şu ankinden önce kaç çağrı çerçevesinin geri döneceğini" + +#~ msgid "current one; the top frame is frame 0." +#~ msgstr "belirtir; tepe çerçeve 0. çerçevedir." + +#~ msgid "%s: invalid number" +#~ msgstr "%s: sayı geçersiz" + +#~ msgid "Shell commands matching keywords `" +#~ msgstr "Bu anahtar sözcüklere uygun kabuk komutları: `" + +#~ msgid "Display the list of currently remembered directories. Directories" +#~ msgstr "" +#~ "\rdirs [-clpv] [+N] [-N]\n" +#~ " O an anımsanan dizinleri listeler. Dizinler listeye" + +#~ msgid "find their way onto the list with the `pushd' command; you can get" +#~ msgstr "`pushd' komutuyla eklenir; listeden tek tek geri almak içinse" + +#~ msgid "back up through the list with the `popd' command." +#~ msgstr "`popd' komutu kullanılır." + +#~ msgid "" +#~ "The -l flag specifies that `dirs' should not print shorthand versions" +#~ msgstr "-l seçeneği `dirs'in dizinleri ev dizininize göreli kısayollar" + +#~ msgid "" +#~ "of directories which are relative to your home directory. This means" +#~ msgstr "" +#~ "olarak göstermemesine yol açar. Yani `~/bin' yerine `/homes/bfox/bin'" + +#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +#~ msgstr "gibi bir gösterimle karşılaşabilirsiniz. -v seçeneği `dirs'in" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "dizin yığıtını dizin adının önüne yığıt konumunu ekleyerek her" + +#~ msgid "" +#~ "prepending the directory name with its position in the stack. The -p" +#~ msgstr "satırda bir girdi göstermesini sağlar. -p seçeneği yığıttaki" + +#~ msgid "flag does the same thing, but the stack position is not prepended." +#~ msgstr "konumu göstermemesi dışında aynı çıktıyı verir." + +#~ msgid "" +#~ "The -c flag clears the directory stack by deleting all of the elements." +#~ msgstr "-c seçeneği tüm girdileri silerek dizin yığıtını boşaltır." + +#~ msgid "" +#~ "+N displays the Nth entry counting from the left of the list shown by" +#~ msgstr "+N dirs seçeneksiz çağrıldığında gösterdiği listenin solundan" + +#~ msgid " dirs when invoked without options, starting with zero." +#~ msgstr " sıfırla başlayarak sayılan N'inci girdiyi gösterir." + +#~ msgid "" +#~ "-N displays the Nth entry counting from the right of the list shown by" +#~ msgstr "-N dirs seçeneksiz çağrıldığında gösterdiği listenin sağından" + +#~ msgid "Adds a directory to the top of the directory stack, or rotates" +#~ msgstr "Dizin yığıtının en üstüne bir dizin ekler, ya da geçerli çalışma" + +#~ msgid "the stack, making the new top of the stack the current working" +#~ msgstr "dizini yığıtın tepesine gelecek şekilde yığıtı döndürür." + +#~ msgid "directory. With no arguments, exchanges the top two directories." +#~ msgstr "Hiç argüman verilmemişse en üstteki iki dizini yer değiştirir." + +#~ msgid "+N Rotates the stack so that the Nth directory (counting" +#~ msgstr "+N (`dirs' tarafından gösterilen listenin solundan saymaya" + +#~ msgid " from the left of the list shown by `dirs', starting with" +#~ msgstr " sıfırla başlandığında) N'inci dizin tepeye gelecek şekilde" + +#~ msgid " zero) is at the top." +#~ msgstr " yığıtı döndürür." + +#~ msgid "-N Rotates the stack so that the Nth directory (counting" +#~ msgstr "-N (`dirs' tarafından gösterilen listenin sağından saymaya" + +#~ msgid " from the right of the list shown by `dirs', starting with" +#~ msgstr " sıfırla başlandığında) N'inci dizin tepeye gelecek şekilde" + +#~ msgid "-n suppress the normal change of directory when adding directories" +#~ msgstr "+n dizinleri yığıta eklerken normal dizin değişikliğini engeller," + +#~ msgid " to the stack, so only the stack is manipulated." +#~ msgstr " böylece sadece yığıt değiştirilmiş olur." + +#~ msgid "dir adds DIR to the directory stack at the top, making it the" +#~ msgstr "dir DİZİNi yeni çalışma dizini yaparak dizin yığıtının" + +#~ msgid " new current working directory." +#~ msgstr " tepesine ekler." + +#~ msgid "You can see the directory stack with the `dirs' command." +#~ msgstr "Dizin yığıtını `dirs' komutuyla görebilirsiniz." + +#~ msgid "Removes entries from the directory stack. With no arguments," +#~ msgstr "Dizin yığıtından girdileri siler. Hiç argüman verilmemişse," + +#~ msgid "removes the top directory from the stack, and cd's to the new" +#~ msgstr "yığıtın en üstündeki dizini yığıttan kaldırır ve" + +#~ msgid "+N removes the Nth entry counting from the left of the list" +#~ msgstr "+N `dirs' tarafından gösterilen listenin solundan saymaya" + +#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr " sıfırla başlandığında N'inci girdiyi siler. Örneğin," + +#~ msgid " removes the first directory, `popd +1' the second." +#~ msgstr " `popd +0' ilk dizini `popd +1' ikincisini siler." + +#~ msgid "-N removes the Nth entry counting from the right of the list" +#~ msgstr "-N `dirs' tarafından gösterilen listenin sağından saymaya" + +#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr " sıfırla başlandığında N'inci girdiyi siler. Örneğin," + +#~ msgid " removes the last directory, `popd -1' the next to last." +#~ msgstr " `popd -0' son dizini `popd -1' sonuncudan öncekini siler." + +#~ msgid "" +#~ "-n suppress the normal change of directory when removing directories" +#~ msgstr "" +#~ "-n dizinleri yığıttan silerken normal dizin değişikliğini engeller," + +#~ msgid " from the stack, so only the stack is manipulated." +#~ msgstr " böylece sadece yığıt değiştirilmiş olur." + +#~ msgid "allocated" +#~ msgstr "ayrılmış" + +#~ msgid "freed" +#~ msgstr "serbest bırakılmış" + +#~ msgid "requesting resize" +#~ msgstr "yeniden boyutlandırma isteniyor" + +#~ msgid "just resized" +#~ msgstr "yeniden boyutlandırıldı" + +#~ msgid "bug: unknown operation" +#~ msgstr "yazılım hatası: unknown operation" + +#~ msgid "malloc: watch alert: %p %s " +#~ msgstr "malloc: yakalama alarmı: %p %s " + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: %lu bayt yeniden ayrılamıyor (%lu bayt ayrıldı)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: %lu bayt yeniden ayrılamıyor" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: %s:%d: %lu bayt yeniden ayrılamıyor (%lu bayt ayrıldı)" + +#~ msgid "" +#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n" +#~ " break N levels." +#~ msgstr "" +#~ "\rbreak [N]\n" +#~ " FOR, WHILE veya UNTIL döngülerinden çıkılmasını sağlar. N " +#~ "verilmişse,\n" +#~ " dışa doğru N. döngüden çıkılır. N >= 1 olmalıdır." + +#~ msgid "" +#~ "Run a shell builtin. This is useful when you wish to rename a\n" +#~ " shell builtin to be a function, but need the functionality of the\n" +#~ " builtin within the function itself." +#~ msgstr "" +#~ "\rbuiltin [kabuk-yerleşiği [argümanlar]]\n" +#~ " Bir kabuk yerleşiğini çalıştırır. Bu bir kabuk işlevinin bir " +#~ "kabul\n" +#~ " yerleşiği ile aynı isimde atanması durumunda faydalıdır, fakat " +#~ "işlevin\n" +#~ " içinde yerleşiğin işlevselliğinin sağlanması gerekir." + +#~ msgid "" +#~ "Print the current working directory. With the -P option, pwd prints\n" +#~ " the physical directory, without any symbolic links; the -L option\n" +#~ " makes pwd follow symbolic links." +#~ msgstr "" +#~ "\rpwd [-LP]\n" +#~ " Geçerli çalışma dizinini basar. -P seçeneği ile sembolik bağlar\n" +#~ " olmaksızın fiziksel dizini basar; -L seçeneği ile sembolik bağları " +#~ "izler." + +#~ msgid "Return a successful result." +#~ msgstr "" +#~ "\rtrue\n" +#~ " Başarılı bir sonuç döndürür." + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n" +#~ " function called `ls', and you wish to call the command `ls', you can\n" +#~ " say \"command ls\". If the -p option is given, a default value is " +#~ "used\n" +#~ " for PATH that is guaranteed to find all of the standard utilities. " +#~ "If\n" +#~ " the -V or -v option is given, a string is printed describing " +#~ "COMMAND.\n" +#~ " The -V option produces a more verbose description." +#~ msgstr "" +#~ "\rcommand [-pVv] KOMUT [ARGümanlar ...]\n" +#~ " KOMUT komutunu KOMUT isimli kabuk işlevini yoksayarak " +#~ "ARGümanlarla\n" +#~ " çalıştırır. Örneğin, `ls' isimli bir kabuk işlevi varsa ve siz " +#~ "`ls'\n" +#~ " komutunu çalıştırmak istiyorsanız \"command ls\" " +#~ "diyebilirsiniz.\n" +#~ " -p seçeneği verilmişse, tüm standart uygulamaların bulunmasını " +#~ "garanti\n" +#~ " eden PATH için bir öntanımlı değer kullanılır. -V ya da -v " +#~ "seçeneği\n" +#~ " verilmişse, KOMUTu açıklayan bir dizge basılır. -V seçeneği " +#~ "daha\n" +#~ " ayrıntılı açıklama üretilmesini sağlar. " + +#~ msgid "" +#~ "Declare variables and/or give them attributes. If no NAMEs are\n" +#~ " given, then display the values of variables instead. The -p option\n" +#~ " will display the attributes and values of each NAME.\n" +#~ " \n" +#~ " The flags are:\n" +#~ " \n" +#~ " -a\tto make NAMEs arrays (if supported)\n" +#~ " -f\tto select from among function names only\n" +#~ " -F\tto display function names (and line number and source file name " +#~ "if\n" +#~ " \tdebugging) without definitions\n" +#~ " -i\tto make NAMEs have the `integer' attribute\n" +#~ " -r\tto make NAMEs readonly\n" +#~ " -t\tto make NAMEs have the `trace' attribute\n" +#~ " -x\tto make NAMEs export\n" +#~ " \n" +#~ " Variables with the integer attribute have arithmetic evaluation (see\n" +#~ " `let') done when the variable is assigned to.\n" +#~ " \n" +#~ " When displaying values of variables, -f displays a function's name\n" +#~ " and definition. The -F option restricts the display to function\n" +#~ " name only.\n" +#~ " \n" +#~ " Using `+' instead of `-' turns off the given attribute instead. " +#~ "When\n" +#~ " used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "" +#~ "\rdeclare [-afFirtx] [-p] [İSİM[=DEĞER] ...]\n" +#~ " Değişkenlerin özellikleri ile bildirilmesini sağlar. Hiçbir İSİM\n" +#~ " verilmezse değişkenleri ve değerlerini listeler. -p seçeneği ile her\n" +#~ " İSİM için değerler ve özellikleri gösterecektir.\n" +#~ "\n" +#~ " Seçenekler:\n" +#~ "\n" +#~ " -a Her İSİM bir dizi değişkenidir(destekleniyorsa)\n" +#~ " -f Sadece işlev isimleri kullanılır.\n" +#~ " -F Tanımları olmaksızın sadece işlev isimleri (ve hata " +#~ "ayıklaması\n" +#~ " yapılıyorsa kaynak dosya isimleri ve satır sayıları) " +#~ "gösterilir\n" +#~ " -i Her İSİMe `integer' özniteliği verir.\n" +#~ " -r İSİMleri salt-okunur yapar.\n" +#~ " -t Her İSİMe `trace' özniteliği verir.\n" +#~ " -x İSİMleri ihraç edilebilir yapar\n" +#~ "\n" +#~ " Tamsayı öznitelikli değişkenlere bir DEĞER atandığında aritmetik\n" +#~ " değerlendirme uygulanır (bkz, `let').\n" +#~ "\n" +#~ " Değişken değerleri gösterilirken, -f bir işlevin ismini ve " +#~ "tanımını\n" +#~ " gösterir. -F seçeneği ile sadece işlev isminin gösterilmesini " +#~ "sağlar.\n" +#~ "\n" +#~ " `-' yerine `+' kullanarak belirtilen öznitelik kapatılabilir.\n" +#~ " Bir işlevde kullanıldığında declare her İSİMi `local' komutu " +#~ "kullanılmış\n" +#~ " gibi yerel yapar." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "" +#~ "\rtypeset [-afFirtx] [-p] İSİM[=DEĞER] ...\n" +#~ " Geçersiz (eski). `declare'ye bakın." + +#~ msgid "" +#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n" +#~ " can only be used within a function; it makes the variable NAME\n" +#~ " have a visible scope restricted to that function and its children." +#~ msgstr "" +#~ "\rlocal [seçenek] İSİM[=DEĞER] ...\n" +#~ " İSİM isimli bir yerel değişken oluşturulup, ona DEĞER atar.\n" +#~ " local sadece bir işlev içinde kullanılabilir; İSİM değişkeninin\n" +#~ " sadece işlev ve çocuklarının etki alanında görünür olmasını sağlar." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "\recho [-neE] [ARG ...]\n" +#~ " ARGümanlarını çıktılar. -n belirtilmişse, satırsonu bastırılır." + +#~ msgid "" +#~ "Enable and disable builtin shell commands. This allows\n" +#~ " you to use a disk command which has the same name as a shell\n" +#~ " builtin without specifying a full pathname. If -n is used, the\n" +#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n" +#~ " to use the `test' found in $PATH instead of the shell builtin\n" +#~ " version, type `enable -n test'. On systems supporting dynamic\n" +#~ " loading, the -f option may be used to load new builtins from the\n" +#~ " shared object FILENAME. The -d option will delete a builtin\n" +#~ " previously loaded with -f. If no non-option names are given, or\n" +#~ " the -p option is supplied, a list of builtins is printed. The\n" +#~ " -a option means to print every builtin with an indication of whether\n" +#~ " or not it is enabled. The -s option restricts the output to the " +#~ "POSIX.2\n" +#~ " `special' builtins. The -n option displays a list of all disabled " +#~ "builtins." +#~ msgstr "" +#~ "\renable [-n] [-p] [-f DOSYAİSMİ] [-ads] [İSİM ...]\n" +#~ " Yerleşik kabuk komutlarını etkinleştirir ve kaldırır. Bir " +#~ "kabuk\n" +#~ " yerleşiği ile aynı isme sahip bir disk komutunun tam dosya " +#~ "yolu\n" +#~ " belirtmeksizin kullanılabilmesini mümkün kılar. -n " +#~ "seçeneği\n" +#~ " kullanılmışsa İSİMler kullanımdan kaldırılır; aksi takdirde " +#~ "İSİMler\n" +#~ " etkin kılınır. Örneğin `test' yerleşiği yerine `test' " +#~ "uygulamasının\n" +#~ " yerleşik komut olarak kullanılmasını sağlamak için `enable -n " +#~ "test'\n" +#~ " yazmalısınız. Dinamik yüklemenin desteklendiği sistemlerde, -" +#~ "f\n" +#~ " seçeneği ile yeni bir İSİM yerleşik komutunun DOSYAİSMİ ile " +#~ "belirtilen\n" +#~ " paylaşımlı nesneden yüklenmesi sağlanır. -d seçeneği -f ile " +#~ "yüklenen\n" +#~ " yerleşiği silmek için kullanılır. Hiç seçenek verilmezse ya da -" +#~ "p\n" +#~ " seçeneği verilirse kabuk yerleşiklerinin bir listesi gösterilir. -" +#~ "a\n" +#~ " seçeneği ile her yerleşik etkin olup olmadığı belirtilerek " +#~ "listelenir.\n" +#~ " -s seçeneği ile sadece POSIX'e özel yerleşikleri içerir. -n " +#~ "seçeneği\n" +#~ " bir İSİM belirtilmeksizin kullanılırsa kullanımdan " +#~ "kaldırılmış\n" +#~ " yerleşikleri listeler." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "" +#~ "\reval [ARG ...]\n" +#~ " Kabuğa girilmiş biçimleriyle ARG'ları okur ve sonuçlanan komutları " +#~ "çalıştır." + +#~ msgid "" +#~ "Exec FILE, replacing this shell with the specified program.\n" +#~ " If FILE is not specified, the redirections take effect in this\n" +#~ " shell. If the first argument is `-l', then place a dash in the\n" +#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n" +#~ " is supplied, FILE is executed with a null environment. The `-a'\n" +#~ " option means to make set argv[0] of the executed process to NAME.\n" +#~ " If the file cannot be executed and the shell is not interactive,\n" +#~ " then the shell exits, unless the shell option `execfail' is set." +#~ msgstr "" +#~ "\rexec [-cl] [-a AD] DOSYA [YÖNLENDİRMELER]]\n" +#~ " DOSYA'yı yeni bir süreç oluşturmadan kabukla değiştirip çalıştırır.\n" +#~ " Eğer DOSYA belirtilmemişse, kabukta YÖNLENDİRMELER etkili olur.\n" +#~ " Eğer ilk argüman -l ise, login'in yaptığı gibi DOSYAya aktarılan\n" +#~ " sıfırıncı argümana bir tire yerleştirilir. -c seçeneği verilmişse,\n" +#~ " DOSYA boş bir ortamda çalıştırılır. -a seçeneği verilirse kabuk,\n" +#~ " DOSYAya ADı 0. argüman (argv[0]) olarak aktarır. Eğer DOSYA\n" +#~ " çalıştırılamazsa ve kabuk etkileşimli değilse, `execfail' kabuk\n" +#~ " değişkeni etkin olmadıkça kabuk çıkar." + +#~ msgid "Logout of a login shell." +#~ msgstr "" +#~ "\rlogout\n" +#~ " Oturum kabuğundan çıkıp oturumu kapatır." + +#~ msgid "" +#~ "For each NAME, the full pathname of the command is determined and\n" +#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n" +#~ " full pathname of NAME, and no path search is performed. The -r\n" +#~ " option causes the shell to forget all remembered locations. The -d\n" +#~ " option causes the shell to forget the remembered location of each " +#~ "NAME.\n" +#~ " If the -t option is supplied the full pathname to which each NAME\n" +#~ " corresponds is printed. If multiple NAME arguments are supplied " +#~ "with\n" +#~ " -t, the NAME is printed before the hashed full pathname. The -l " +#~ "option\n" +#~ " causes output to be displayed in a format that may be reused as " +#~ "input.\n" +#~ " If no arguments are given, information about remembered commands is " +#~ "displayed." +#~ msgstr "" +#~ "\rhash [-lr] [-p DOSYAYOLU] [-dt] [AD]\n" +#~ " AD argümanları olarak belirtilen komutların tam dosya yollarını\n" +#~ " hatırlar, böylece müteakip çağrılarda aranmalarına gerek kalmaz.\n" +#~ " Komutlar $PATH içinde listelenmiş dizinler aranarak bulunur. -p\n" +#~ " seçeneği dosya yolu aramalarını engeller ve ADın konumu olarak\n" +#~ " DOSYAYOLU kullanılır. -r seçeneği hatırlanan tüm konumları kabuğun\n" +#~ " unutmasına sebep olur. -d seçeneği her AD için hatırlanan konumun\n" +#~ " kabuk tarafından unutulmasına sebep olur. -t seçeneği verildiğinde\n" +#~ " her ADa karşılık gelen dosya konumları basılır. -t seçeneği ile çok\n" +#~ " sayıda AD verilirse, AD hatırlanan tam dosya yolundan önce basılır.\n" +#~ " -l seçeneği çıktının girdi olarak tekrar kullanılmasını sağlayacak\n" +#~ " biçimde basılmasını sağlar. Hiç argüman belirtilmezse ya da sadece\n" +#~ " -l seçeneği belirtilirse hatırlanan komutlar hakkında bilgi basılır." + +#~ msgid "" +#~ "Display helpful information about builtin commands. If PATTERN is\n" +#~ " specified, gives detailed help on all commands matching PATTERN,\n" +#~ " otherwise a list of the builtins is printed. The -s option\n" +#~ " restricts the output for each builtin command matching PATTERN to\n" +#~ " a short usage synopsis." +#~ msgstr "" +#~ "\rhelp [-s] [KALIP]\n" +#~ " Yerleşik komutlar hakkında yardım bilgisi gösterir. KALIP " +#~ "belirtilmişse,\n" +#~ " help KALIP ile eşleşen tüm komutlar için yardım bilgisi gösterir, " +#~ "aksi\n" +#~ " takdirde yerleşikler listelenir. -s seçeneği ile yardım bilgisi " +#~ "yerine\n" +#~ " komutun kullanımını gösteren sözdizimini basar." + +#~ msgid "" +#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n" +#~ " If the -h option is given, the job is not removed from the table, but " +#~ "is\n" +#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n" +#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove " +#~ "all\n" +#~ " jobs from the job table; the -r option means to remove only running " +#~ "jobs." +#~ msgstr "" +#~ "\rdisown [-h] [-ar] [İŞ_BELİRTİMİ ...]\n" +#~ " Seçeneksiz kullanımda her İŞ_BELİRTİMİ etkin işler tablosundan\n" +#~ " kaldırılır. -h seçeneği ile iş tablodan kaldırılmaz ama imlenir\n" +#~ " böylece kabuk bir SIGHUP alırsa bunu işe göndermez. İŞ_BELİRTİMİ\n" +#~ " verilmeden -a seçeneğinin kullanılması durumunda iş tablosundaki\n" +#~ " tüm işler kaldırılır. İŞ_BELİRTİMİ verilmeden -r seçeneğinin\n" +#~ " kullanılması durumunda ise sadece çalışmakta olan işler kaldırılır." + +#~ msgid "" +#~ "One line is read from the standard input, or from file descriptor FD if " +#~ "the\n" +#~ " -u option is supplied, and the first word is assigned to the first " +#~ "NAME,\n" +#~ " the second word to the second NAME, and so on, with leftover words " +#~ "assigned\n" +#~ " to the last NAME. Only the characters found in $IFS are recognized " +#~ "as word\n" +#~ " delimiters. If no NAMEs are supplied, the line read is stored in the " +#~ "REPLY\n" +#~ " variable. If the -r option is given, this signifies `raw' input, " +#~ "and\n" +#~ " backslash escaping is disabled. The -d option causes read to " +#~ "continue\n" +#~ " until the first character of DELIM is read, rather than newline. If " +#~ "the -p\n" +#~ " option is supplied, the string PROMPT is output without a trailing " +#~ "newline\n" +#~ " before attempting to read. If -a is supplied, the words read are " +#~ "assigned\n" +#~ " to sequential indices of ARRAY, starting at zero. If -e is supplied " +#~ "and\n" +#~ " the shell is interactive, readline is used to obtain the line. If -n " +#~ "is\n" +#~ " supplied with a non-zero NCHARS argument, read returns after NCHARS\n" +#~ " characters have been read. The -s option causes input coming from a\n" +#~ " terminal to not be echoed.\n" +#~ " \n" +#~ " The -t option causes read to time out and return failure if a " +#~ "complete line\n" +#~ " of input is not read within TIMEOUT seconds. If the TMOUT variable " +#~ "is set,\n" +#~ " its value is the default timeout. The return code is zero, unless " +#~ "end-of-file\n" +#~ " is encountered, read times out, or an invalid file descriptor is " +#~ "supplied as\n" +#~ " the argument to -u." +#~ msgstr "" +#~ "\rread [-ers] [-u DSYTNT] [-t ZMAŞM] [-p İSTEM] [-a DİZİ]\n" +#~ " [-n KRKSAY] [-d AYRAÇ] [İSİM ...]\n" +#~ " Standart girdiden ya da -u seçeneği ile sağlanan DoSYaTaNıTıcıdan " +#~ "tek\n" +#~ " satır okur ve ilk sözcük ilk İSİMe, ikinci sözcük ikinci İSİMe ve " +#~ "böyle\n" +#~ " giderek, aradaki sözcükler ve ayraçlar son İSİMe kadar atanır. " +#~ "Satırı\n" +#~ " sözcüklere ayırmakta sadece $IFS değişkeninin değerindeki " +#~ "karakterler\n" +#~ " kullanılır. Tersbölü satırın devam ettirilmesi için ve kendinden " +#~ "sonra\n" +#~ " gelen özel karakterlerin yorumlanması için kullanılabilir. Hiç " +#~ "isim\n" +#~ " verilmemişse, satırın tamamı okunur ve REPLY değişkenine atanır. -" +#~ "r\n" +#~ " verildiğinde tersbölü bir önceleme karakteri olarak ele " +#~ "alınmaz,\n" +#~ " dolayısıyla tersbölü-satırsonu çifti satırın alt satırda devam " +#~ "edeceğini\n" +#~ " belirtmekte kullanılamaz. -d ile satırın satırsonu karakterine " +#~ "kadar\n" +#~ " değil AYRAÇ karakterine kadar okunması sağlanır. -p ile " +#~ "girdi\n" +#~ " beklendiğini belirtecek İSTEM dizgesi satırsonu karakteri " +#~ "olmaksızın\n" +#~ " görüntülenir. İstem sadece girdi bir uçbirimden gelecekse " +#~ "gösterilir.\n" +#~ " -a ile sözcükler sırayla DİZİ dizisinin elemanlarına atanır; dizinin " +#~ "ilk\n" +#~ " elemanının indisi 0'dır; atama yapılmadan önce DİZİ dizisinin " +#~ "tüm\n" +#~ " elemanları silinir; diğer İSİM argümanları yoksayılır. -e ile " +#~ "kabuk\n" +#~ " etkileşimliyse, satırı sağlamak için readline kullanılır. -n " +#~ "ile\n" +#~ " satırın okunması KRKSAYıncı karakterde sona erer; satırın kalanı " +#~ "yok\n" +#~ " sayılır. -s ile sessiz kipe girilir, girdi bir uçbirimden " +#~ "geliyorsa\n" +#~ " karakterler yansılanmaz. -t ile satır ZMAŞM saniye sonra " +#~ "hala\n" +#~ " sonlandırılmamışsa read zamanaşımına düşer ve hata döner. " +#~ "$TMOUT\n" +#~ " değişkeni bir değerle atanmışsa değeri öntanımlı zamanaşımı " +#~ "değeri\n" +#~ " olarak ele alınır. Bu seçenek, girdi bir uçbirim ya da " +#~ "boruhattından\n" +#~ " okunmuyorsa etkisizdir. Dosyasonu karakteri (Ctrl-D) " +#~ "saptanmadıkça,\n" +#~ " okuma zamanaşımına düşmedikçe ya da -u seçeneği ile sağlanan\n" +#~ " DoSYaTaNıTıcı geçersiz olmadıkça dönüş durumu sıfırdır." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N\n" +#~ " is omitted, the return status is that of the last command." +#~ msgstr "" +#~ "\rreturn [N]\n" +#~ " Bir işlevin N değeri ile dönerek çıkmasına sebep olur. N verilmezse\n" +#~ " son komutun dönüş durumu döner." + +#~ msgid "" +#~ "For each NAME, remove the corresponding variable or function. Given\n" +#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n" +#~ " unset will only act on functions. With neither flag, unset first\n" +#~ " tries to unset a variable, and if that fails, then tries to unset a\n" +#~ " function. Some variables cannot be unset; also see readonly." +#~ msgstr "" +#~ "\runset [-f] [-v] [AD ...]\n" +#~ " ADı belirtilen her işlev ya da değişken kaldırılır. -v verilmişse,\n" +#~ " işlem sadece kabuk değişkenlerine uygulanır. -f verilmişse, işlem\n" +#~ " sadece kabuk işlevlerine uygulanır ve işlev tanımı kaldırılır.\n" +#~ " Hiçbir seçenek verilmemişse, unset önce bir değişkeni kaldırmayı\n" +#~ " dener, başarısız olursa bir işlevi kaldırmayı dener. Salt-okunur\n" +#~ " değişkenler ve işlevler kaldırılamaz." + +#~ msgid "" +#~ "NAMEs are marked for automatic export to the environment of\n" +#~ " subsequently executed commands. If the -f option is given,\n" +#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n" +#~ " is given, a list of all names that are exported in this shell is\n" +#~ " printed. An argument of `-n' says to remove the export property\n" +#~ " from subsequent NAMEs. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "\rexport [-nf] [İSİM[=DEĞER] ...]\n" +#~ "export -p\n" +#~ " Ortamdaki çocuk sürece aktarılacak her İSİM'i imler. -f " +#~ "verilmişse\n" +#~ " İSİM'ler kabuk işlevleridir, aksi takdirde kabuk " +#~ "değişkenleridir.\n" +#~ " -n seçeneği verilirse aktarılacak İSİM'ler artık imlenmez. " +#~ "İSİM\n" +#~ " verilmemişse veya -p seçeneği verilmişse aktarılan İSİM'lerin " +#~ "listesi\n" +#~ " gösterilir. -p seçeneği çıktının girdi olarak tekrar " +#~ "kullanılabilir\n" +#~ " biçimde gösterilmesini sağlar. Bir değişken isminden sonra " +#~ "=DEĞER\n" +#~ " geliyorsa değer değişkenin değeri yapılır. `--' ile seçenek " +#~ "işlemleri\n" +#~ " kapatılır." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n" +#~ " not be changed by subsequent assignment. If the -f option is given,\n" +#~ " then functions corresponding to the NAMEs are so marked. If no\n" +#~ " arguments are given, or if `-p' is given, a list of all readonly " +#~ "names\n" +#~ " is printed. The `-a' option means to treat each NAME as\n" +#~ " an array variable. An argument of `--' disables further option\n" +#~ " processing." +#~ msgstr "" +#~ "\rreadonly [-af] [İSİM[=DEĞER] ...]\n" +#~ "readonly -p\n" +#~ " Her İSİM'i salt-okunur olarak imler. Bu İSİM'lerin değerleri\n" +#~ " müteakip çağrılarda değiştirilemez. -f seçeneği verilirse, her\n" +#~ " İSİM bir kabuk işlevi olarak imlenir. -a seçeneği verilirse, her\n" +#~ " isim bir dizi değişkeni olarak ele alınır. Hiç argüman verilmezse\n" +#~ " veya -p seçeneği verilirse salt-okunur isimlerin hepsi basılır. Bir\n" +#~ " değişken isminden sonra bir =DEĞER geliyorsa DEĞER değişkenin değeri\n" +#~ " yapılır. `--' ile seçenek işlemleri kapatılır." + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n" +#~ " not given, it is assumed to be 1." +#~ msgstr "" +#~ "\rshift [N]\n" +#~ " $N+1 ... konumsal parametreleri $1 ... olarak ele alınır.\n" +#~ " N verilmezse 1 kabul edilir." + +#~ msgid "" +#~ "Suspend the execution of this shell until it receives a SIGCONT\n" +#~ " signal. The `-f' if specified says not to complain about this\n" +#~ " being a login shell if it is; just suspend anyway." +#~ msgstr "" +#~ "\rsuspend [-f]\n" +#~ " Bu kabuğun çalışmasını bir SIGCONT sinyali alana kadar askıya alır.\n" +#~ " -f seçeneği kullanıldığında kabuk bir giriş kabuğu olsa bile askıya " +#~ "alınır." + +#~ msgid "" +#~ "Print the accumulated user and system times for processes run from\n" +#~ " the shell." +#~ msgstr "" +#~ "\rtimes\n" +#~ " Kabukta çalışan süreçlerden toplanan kullanıcı ve sistem zamanlarını " +#~ "basar." + +#~ msgid "" +#~ "For each NAME, indicate how it would be interpreted if used as a\n" +#~ " command name.\n" +#~ " \n" +#~ " If the -t option is used, `type' outputs a single word which is one " +#~ "of\n" +#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is " +#~ "an\n" +#~ " alias, shell reserved word, shell function, shell builtin, disk " +#~ "file,\n" +#~ " or unfound, respectively.\n" +#~ " \n" +#~ " If the -p flag is used, `type' either returns the name of the disk\n" +#~ " file that would be executed, or nothing if `type -t NAME' would not\n" +#~ " return `file'.\n" +#~ " \n" +#~ " If the -a flag is used, `type' displays all of the places that " +#~ "contain\n" +#~ " an executable named `file'. This includes aliases, builtins, and\n" +#~ " functions, if and only if the -p flag is not also used.\n" +#~ " \n" +#~ " The -f flag suppresses shell function lookup.\n" +#~ " \n" +#~ " The -P flag forces a PATH search for each NAME, even if it is an " +#~ "alias,\n" +#~ " builtin, or function, and returns the name of the disk file that " +#~ "would\n" +#~ " be executed." +#~ msgstr "" +#~ "\rtype [-afptP] AD [AD ...]\n" +#~ " Her ADın bir komut ismi olarak kullanılırsa nasıl yorumlanması\n" +#~ " gerektiğini belirtir.\n" +#~ "\n" +#~ " -t seçeneği verildiğinde, AD bir takma ad ise `alias', bir işlev ise\n" +#~ " `function', bir yerleşik komut ise `builtin', bir disk dosyası ise \n" +#~ " `file' veya bir anahtar sözcük ise `keyword' sözcüğünü basar.\n" +#~ "\n" +#~ " -p seçeneği verildiğinde, AD, `type -t AD' çıktısı file sonucunu\n" +#~ " vermiyorsa hiçbir şey dönmez, aksi takdirde çalıştırılacak disk\n" +#~ " dosyasının ismi basılır.\n" +#~ "\n" +#~ " -a seçeneği verildiğinde, isim çalıştırılabilir dosyasının\n" +#~ " bulunabileceği yerleri basar. Bu, sadece ve sadece -p seçeneği\n" +#~ " kullanılmamışsa takma adları, yerleşik komutları ve işlevleri\n" +#~ " de içerir.\n" +#~ "\n" +#~ " -f seçeneği belirtilmişse type kabuk işlevlerini bulmaya çalışmaz.\n" +#~ "\n" +#~ " -P seçeneği her ADiçin, bir takma ad, yerleşik komut veya işlev " +#~ "olmasa\n" +#~ " bile bir yol araması yapılmasını için zorlar ve çalıştırılabilir " +#~ "disk\n" +#~ " dosyası ismi ile döner." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n" +#~ " `-S' is supplied, the current value of the mask is printed. The `-" +#~ "S'\n" +#~ " option makes the output symbolic; otherwise an octal number is " +#~ "output.\n" +#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n" +#~ " that may be used as input. If MODE begins with a digit, it is\n" +#~ " interpreted as an octal number, otherwise it is a symbolic mode " +#~ "string\n" +#~ " like that accepted by chmod(1)." +#~ msgstr "" +#~ "\rumask [-p] [-S] [KİP]\n" +#~ " Kabuk sürecinin dosya oluşturma maskesini KİP olarak ayarlar.\n" +#~ " -S seçeneği bir KİP olmaksızın verilirse, maske sembolik kipte\n" +#~ " gösterilir. -S seçeneği çıktının sembolik olmasını sağlar, yoksa\n" +#~ " sekizlik değer basılır. -p seçeneği bir KİP olmaksızın verilirse,\n" +#~ " maske, kabuğa girdi olarak verilebilecek biçemde gösterilir. KİP\n" +#~ " bir rakam ile başlıyorsa sekizlik bir sayı olarak yorumlanır;\n" +#~ " rakamla başlamıyorsa, chmod(1) komutundaki gibi bir sembolik kip\n" +#~ " maskesi olarak yorumlanır. Eğer KİP verilmezse, maskenin mevcut\n" +#~ " değeri gösterilir." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If\n" +#~ " N is not given, all currently active child processes are waited for,\n" +#~ " and the return code is zero. N is a process ID; if it is not given,\n" +#~ " all child processes of the shell are waited for." +#~ msgstr "" +#~ "\rwait [N]\n" +#~ " Belirtilen süreci bekler ve sonlandırma durumunu raporlar. N\n" +#~ " verilmezse, o an etkin olan tüm süreçler için beklenir ve sıfır\n" +#~ " durumu ile dönülür. N bir süreç kimliğidir; verilmezse kabuğun\n" +#~ " tüm alt süreçleri için beklenir." + +#~ msgid "" +#~ "Create a simple command invoked by NAME which runs COMMANDS.\n" +#~ " Arguments on the command line along with NAME are passed to the\n" +#~ " function as $0 .. $n." +#~ msgstr "" +#~ "\rfunction AD { KOMUTlar ; }\n" +#~ "\tveya\n" +#~ "AD () { KOMUTlar ; }\n" +#~ " ADıyla çağrılarak KOMUTları çalıştıran basit bir komut oluşturur.\n" +#~ " AD ile birlikte verilen komut satırı argümanları işleve $0 .. $N\n" +#~ " olarak aktarılır." + +#~ msgid "" +#~ "Toggle the values of variables controlling optional behavior.\n" +#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n" +#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n" +#~ " status indicates whether each OPTNAME is set or unset. The -o\n" +#~ " option restricts the OPTNAMEs to those defined for use with\n" +#~ " `set -o'. With no options, or with the -p option, a list of all\n" +#~ " settable options is displayed, with an indication of whether or\n" +#~ " not each is set." +#~ msgstr "" +#~ "\rshopt [-pqsu] [-o UZUN-SEÇENEK] SÇNKADI [SÇNKADI...]\n" +#~ " İsteğe bağlı kabuk davranışlarını kontrol eden değişken değerlerini " +#~ "açıp\n" +#~ " kapar. -s ile belirtilen her SÇNKADInı etkinleştirir. -u ile " +#~ "belirtilen\n" +#~ " her SÇNKADInı iptal eder. -q ile normal çıktıyı engeller; dönüş " +#~ "durumu\n" +#~ " SÇNKADInın etkin olup olmadığını gösterir. -o ile set yerleşiğinin " +#~ "-o\n" +#~ " seçeneğinde kullanılabilecek SÇNKADI değerlerini sınırlar. Seçeneksiz " +#~ "ya\n" +#~ " da -p seçeneği ile tüm atanabilir seçenekleri etkin olup " +#~ "olmadıklarını\n" +#~ " belirterek listeler." + +#~ msgid "" +#~ "For each NAME, specify how arguments are to be completed.\n" +#~ " If the -p option is supplied, or if no options are supplied, " +#~ "existing\n" +#~ " completion specifications are printed in a way that allows them to " +#~ "be\n" +#~ " reused as input. The -r option removes a completion specification " +#~ "for\n" +#~ " each NAME, or, if no NAMEs are supplied, all completion " +#~ "specifications." +#~ msgstr "" +#~ "\rcomplete [-abcdefgjksuv] [-pr] [-o SEÇENEK] [-A EYLEM] [-G KALIP]\n" +#~ " [-W SÖZLİST] [-P ÖNEK] [-S SONEK] [-X SÜZGEÇ] [-F İŞLEV]\n" +#~ " [-C KOMUT] [AD ...]\n" +#~ " Her AD için argümanların nasıl tamamlanmaları gerektiği belirtilir.\n" +#~ " -p seçeneği verilirse veya hiç seçenek verilmezse, mevcut tamamlama\n" +#~ " belirtimleri girdi olarak yeniden kullanılabilir şekilde basılır.\n" +#~ " -r seçeneği her AD için tamamlama belirtimini kaldırır,\n" +#~ " hiç AD belirtilmezse tümü kaldırılır." diff --git a/bash-5.1/po/uk.gmo b/bash-5.1/po/uk.gmo new file mode 100644 index 0000000000000000000000000000000000000000..0e79dd2c71f85bb4bb9d1bb7ebc81c6cd9365fae Binary files /dev/null and b/bash-5.1/po/uk.gmo differ diff --git a/bash-5.1/po/uk.po b/bash-5.1/po/uk.po new file mode 100644 index 0000000000000000000000000000000000000000..de3c9459a96a7a64fcabecd1ace397bbbddf8752 --- /dev/null +++ b/bash-5.1/po/uk.po @@ -0,0 +1,6018 @@ +# Bash Ukrainian messages +# Copyright (C) 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Myhailo Danylenko , 2009. +# Maxim V. Dziumanenko , 2010. +# Yuri Chornoivan , 2011, 2013, 2014, 2015, 2016, 2018, 2019. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-08 20:48+0200\n" +"Last-Translator: Yuri Chornoivan \n" +"Language-Team: Ukrainian \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Lokalize 2.0\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "неправильний індекс масиву" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: вилучаємо атрибут nameref" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: неможливо перетворити індексований масив на асоціативний" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: неправильний ключ асоціативного масиву" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: означення нечислових елементів неможливе" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: при означенні асоціативних масивів слід вказувати ключ" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: не вдалося створити: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: не вдалося знайти відповідне призначення для " +"команди" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: перший непробільний символ не є «\"»" + +# c-format +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "нема заключної «%c» у %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: пропущено двокрапку-роздільник" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: не вдалося зняти призначення" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "розкриття дужок: не вдалося отримати пам’ять для %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "розкриття дужок: не вдалося отримати об’єм пам’яті для %u елементів" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "розкриття дужок: не вдалося отримати об’єм пам’яті для «%s»" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "«%s»: некоректна назва замінника" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "редагування рядку не ввімкнено" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "«%s»: неправильна назва набору призначень клавіш" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: не вдалося прочитати: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "«%s»: невідома назва функції" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s не призначено жодної клавіші.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s можна запустити за допомогою " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: не вдалося зняти призначення" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "кількість циклів" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "має сенс лише усередині циклів `for', `while' та `until'" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Повертає контекст виконання поточної підпрограми.\n" +" \n" +" Якщо ВИРАЗ не вказано, виводить \"$line $filename\". Інакше виводить\n" +" \"$line $subroutine $filename\"; цю додаткову інформацію можна\n" +" використовувати для трасування стеку.\n" +" \n" +" Значення ВИРАЗУ визначає на скільки рівнів викликів піднятися від\n" +" поточного; поточний рівень є нульовим.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо оболонка зараз не виконує функцію\n" +" або якщо ВИРАЗ є неправильним." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "змінну HOME не встановлено" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "забагато аргументів" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "порожній каталог" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "змінну OLDPWD не встановлено" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "рядок %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "попередження: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: використовуйте: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: параметр потребує аргументу" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: потрібен числовий аргумент" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: не знайдено" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: неправильний параметр" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: некоректна назва параметра" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "«%s»: неправильний ідентифікатор" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "неправильне вісімкове число" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "неправильне шістнадцяткове число" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "неправильне число" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: сигнал вказано з помилками" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "«%s»: не є ідентифікатором процесу чи завдання" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: змінна призначена лише для читання" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s виходить за встановлені межі" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "аргумент" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s виходить за встановлені межі" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: нема такого завдання" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: керування завданнями не ввімкнене" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "керування завданнями не ввімкнене" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: заборонено обмеженнями" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "заборонено обмеженнями" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: не є вбудованою командою оболонки" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "помилка запису: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "помилка встановлення параметрів термінала: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "помилка отримання параметрів термінала: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: помилка отримання поточного каталогу: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: завдання вказано неоднозначно" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "у цій версії не можна скористатися довідкою" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: не вдалося знищити: %s лише для читання" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: не вдалося знищити" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: неправильна назва дії" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: не вказано специфікація завершення" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "попередження: можливо параметр -F працює не так, як ви очікуєте" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "попередження: можливо параметр -C працює не так, як ви очікуєте" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "наразі функція завершення рядку не виконується" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "може використовуватися лише усередині функції" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: еталонна змінна не може бути масивом" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: не можна використовувати циклічне посилання у змінній посилання" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: циклічне посилання за назвою" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: некоректна назва змінної для посилання за назвою" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "`-f' не використовується для створення функцій" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: незмінна функція" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" +"%s: встановлення значень для складеного масиву у лапках вважається застарілим" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: неможливо знищити масив таким чином" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: неможливо перетворити асоціативний масив на індексований" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "динамічне завантаження недоступне" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "не вдалося відкрити колективний об’єкт %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "не вдалося знайти %s у колективному об’єкті %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: завантажений не динамічно" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" +"функцією завантаження для %s повернуто повідомлення щодо помилки (%d): не " +"завантажено" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: завантажений не динамічно" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: не вдалося вилучити: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: це каталог" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: не є звичайним файлом" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: файл завеликий" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: не вдалося виконати бінарний файл" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: не вдалося виконати: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "вихід\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "це не оболонка сеансу: використовуйте `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Залишилися призупинені завдання.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Фонові завдання все ще виконуються.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "команду не знайдено" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "параметри журналу" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: не вдалося відкрити тимчасовий файл: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "поточне" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "завдання %d запущене без контролю завдань" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: неправильний параметр — %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: параметр потребує аргументу — %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "кешування вимкнене" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: в кеші нічого немає\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "влучень\tкоманда\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Команди оболонки, що відповідають слову `" +msgstr[1] "Команди оболонки, що відповідають словам `" +msgstr[2] "Команди оболонки, що відповідають словам `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"«%s» не відповідає жодний розділ довідки. Спробуйте `help help' чи `man -k " +"%s' або `info %s'." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: не вдалося відкрити: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Ці команди оболонки визначені внутрішньо. Введіть `help', щоб побачити їх " +"список.\n" +"Введіть `help name', щоб дізнатися більше про функцію `name'.\n" +"Використовуйте `info bash', щоб отримати більше інформації про оболонку в " +"цілому.\n" +"`man -k' чи `info' можуть стати в пригоді для отримання довідки з команд, " +"яких немає\n" +"у цьому списку.\n" +"\n" +"Зірочка (*) поряд з назвою команди означає, що команда заборонена.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "-anrw можуть зустрічатися лише один раз" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "позиція у журналу команд" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: некоректна часова позначка" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: невдалий пошук по журналу команд" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: помилка inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "не можна використовувати інші параметри разом з `-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: аргументи мають бути ідентифікаторами завдань чи процесів" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Невідома помилка" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "очікувався вираз" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: не є індексованим масивом" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: неправильно вказаний дескриптор файла" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: неправильний дескриптор файла: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: неправильна кількість рядків" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: неправильний початковий індекс" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: неправильний крок виклику функції" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "порожня назва змінної-масиву" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "змінні-масиви не підтримуються" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "«%s»: пропущено символ у шаблоні" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: помилкове визначення формату часу" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "«%c»: помилковий символ у шаблоні" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "попередження: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "проблема з обробкою форматування: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "пропущено шістнадцяткову цифру у \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "пропущено цифру Unicode у \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "немає іншого каталогу" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: некоректний аргумент" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<немає поточного каталогу>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "стек каталогів порожній" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "рівень стеку каталогів" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Показує список збережених каталогів. Каталоги\n" +" додаються до цього списку командою `pushd'; ви можете повернутися\n" +" назад по списку за допомогою команди `popd'.\n" +" \n" +" Параметри:\n" +" -c\tочистити список каталогів, вилучивши усі його елементи\n" +" -l\tне використовувати ~ для каталогів, що перебувають усередині\n" +" \tвашого домашнього каталогу\n" +" -p\tвиводити каталоги по одному на рядок\n" +" -v\tвиводити каталоги по одному на рядок з зазначенням позиції у\n" +" \tсписку\n" +" \n" +" Аргументи:\n" +" +N\tПоказує N-ний зліва каталог у списку, що виводиться командою\n" +" \tdirs без аргументів, відлік починається з нуля.\n" +" \n" +" -N\tПоказує N-ний з кінця каталог у списку, що виводиться командою\n" +"\tdirs без аргументів, відлік починається з нуля." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Додає каталог на вершину стеку каталогів, чи циклічно обертає\n" +" стек, встановлюючи поточний робочий каталог відповідно до його нової\n" +" вершини. Без аргументів міняє місцями дві найвищих каталоги.\n" +" \n" +" Параметри:\n" +" -n\tНе робити звичайного переходу у новий каталог при додаванні\n" +" \tкаталогів до стеку, виконувати операції лише над стеком.\n" +" \n" +" Аргументи:\n" +" +N\tЦиклічно обертає стек так, щоб N-ний каталог, рахуючи\n" +" \tзліва (починаючи з нуля) у списку, що виводиться командою `dirs'\n" +" \tопиниться на вершині стеку.\n" +" \n" +" -N\tЦиклічно обертає стек так, щоб N-ний каталог, рахуючи\n" +" \tз кінця (починаючи з нуля) у списку, що виводиться командою `dirs'\n" +" \tопиниться на вершині стеку.\n" +" \n" +" dir\tДодає DIR на вершину стеку, й робить його поточним робочим\n" +" \tкаталогом.\n" +" \n" +" Вбудована команда `dirs' показує стек каталогів." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Вилучає каталоги зі стеку збережених каталогів. Без аргументів, вилучає\n" +" верхній каталог у стеку і змінює поточний каталог відповідно до нової\n" +" вершини стеку.\n" +" \n" +" Параметри:\n" +" -n\tНе робити звичайного переходу до нової каталоги при вилученні\n" +" \tкаталогів зі стеку, проводити операції лише над стеком.\n" +" \n" +" Аргументи:\n" +" +N\tВилучає N-ний зліва каталог у списку, що показується командою " +"`dirs'\n" +" \t(відлік починається з нуля). Наприклад: `popd +0' вилучає перший " +"каталог,\n" +" \t`popd +1' — другий.\n" +" \n" +" -N\tВилучає N-ний з кінця каталог у списку, що показується командою\n" +" \t`dirs' (відлік починається з нуля). Наприклад: `popd -0' вилучає\n" +" \tостанній каталог, `popd -1' — передостанній.\n" +" \n" +" Вбудована команда `dirs' показує стек каталогів." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: некоректне визначення часу очікування" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "помилка читання: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"`return' працює лише у функції чи скрипті, запущеному за допомогою `source'" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "не можна одночасно знищити і функцію і змінну" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: не є масивом" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: не є функцією" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: не вдалося експортувати" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "кількість зсувів" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "не можна одночасно встановлювати й скасовувати параметри оболонки" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: неправильна назва параметра оболонки" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "потрібна назва файла" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: файл не знайдено" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "не вдалося призупинити" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "не можна призупинити оболонку сеансу" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s є псевдонімом до «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s — це ключове слово оболонки\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s є функцією\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s є спеціальною вбудованою командою оболонки\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s є вбудованою командою оболонки\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s — це %s\n" + +# I know the difference between hash and cache, but here, +# I think, this is more suitable... +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s знаходиться в кеші (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: помилковий аргумент обмеження" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "«%c»: неправильна команда" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: не вдалося отримати значення обмеження: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "значення обмеження" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: не вдалося змінити обмеження: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "вісімкове число" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "«%c»: помилковий оператор у символьному режимі" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "«%c»: помилковий символ у символьному режимі" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " рядок " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "остання команда: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Припинення..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "ІНФОРМАЦІЯ: " + +#: error.c:462 +msgid "unknown command error" +msgstr "невідома помилка команди" + +#: error.c:463 +msgid "bad command type" +msgstr "неправильний тип команди" + +#: error.c:464 +msgid "bad connector" +msgstr "неправильний з’єднувальний оператор" + +#: error.c:465 +msgid "bad jump" +msgstr "неправильний перехід" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: неозначена змінна" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aчас очікування вводу вичерпано: автоматичний вихід\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "не вдалося переспрямувати /dev/null на стандартний ввід: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: «%c»: помилковий символ шаблону" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] все ще існує" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "помилка каналу" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: перевищено максимальний рівень вкладеності eval (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: перевищено максимальний рівень вкладеності джерела (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: перевищено максимальний рівень вкладеності функцій (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: обмеження: не можна вказувати `/' у назві команди" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: команду не знайдено" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: неправильний інтерпретатор" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: не вдалося виконати бінарний файл: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "%s є спеціальною вбудованою командою оболонки" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "не вдалося створити копію файлового дескриптору %d у %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "рівень вкладення виразів перевищено" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "нестача стеку рекурсії" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "синтаксична помилка у виразі" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "спроба призначення не-змінної" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "синтаксична помилка при спробі надати змінній значення" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "ділення на 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "вада: неправильна лексема у виразі" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "очікувалася `:' умовного виразу" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "експонента менша за 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "пре-інкремент чи пре-декремент потребують ідентифікатор" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "відсутня `)'" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "синтаксична помилка: очікувався операнд" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "синтаксична помилка: помилковий арифметичний оператор" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (позначка помилки \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "некоректна арифметична основа" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: неправильна кількість рядків" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "завелике значення основи" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: помилка у виразі\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: не вдалося отримати доступ до каталогів вищого рівня" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "не вдалося перевстановити режим без затримки файлового дескриптору %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"не вдалося отримати новий файловий дескриптор для вводу bash з файлового " +"дескриптору %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: для нового файлового дескриптору %d вже існує буфер" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "" +"ідентифікатор відгалуженого процесу %d знайдено у поточному завданні %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "вилучення зупиненого завдання %d, що має групу процесів %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "" +"add_process: ідентифікатор процесу %5ld (%s) вказує на його працездатність" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: ідентифікатор процесу не існує" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Сигнал %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Завершено" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Зупинено" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Зупинено(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Працює" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Зроблено(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Вихід %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Невідомий стан" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(збережено знімок оперативної пам’яті)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (РД: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "зміна групи дочірнього процесу (%ld на %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: процес %ld не є відгалуженим від цієї оболонки" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Нема запису для процесу %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: завдання %d зупинене" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: нема такого завдання" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: завдання завершилося" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: завдання %d вже працює в фоні" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: увімкнути WNOHANG, щоб уникнути нескінченного блокування" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: рядок %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (збережено знімок оперативної пам’яті)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(тепер РД: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: помилка getpgrp" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: немає керування завданнями у тлі" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: алгоритм реалізації рядків" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "не вдалося встановити групу процесу для термінала (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "ця оболонка не може керувати завданнями" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: умова не виконується: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: потрібна умова не виконується\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "невідомий" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: зайнятий блок у списку вільних" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: аргумент є вже звільненим блоком" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: блок ще не виділено" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" +"free: виявлено перехід за нижню границю блоку; mh_nbytes не вкладається у " +"рамки" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "" +"free: виявлено перехід за нижню границю блоку; mh_nbytes не вкладається у " +"рамки" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: розмір у записах на початку та в кінці блоку відрізняється" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: блок ще не виділено" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" +"realloc: виявлено перехід за нижню границю блоку; mh_nbytes не вкладається у " +"рамки" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" +"realloc: виявлено перехід за нижню границю блоку; mh_nbytes не вкладається у " +"рамки" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: розмір у записах на початку та в кінці блоку відрізняється" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: таблицю виділення заповнено FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p вже позначений як виділений у таблиці?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p вже позначений як вільний у таблиці?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "неправильна основа" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: невідомий хост" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: неправильна служба" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: неправильно вказаний мережевий шлях" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "мережеві операції не підтримуються" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: не вдалося змінити локаль (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: не вдалося змінити локаль (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: не вдалося змінити локаль (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: не вдалося змінити локаль (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Присутня пошта у $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Нова пошта у $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Пошту у %s прочитано\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "синтаксична помилка: потрібен арифметичний вираз" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "синтаксична помилка: неочікувана `;'" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "синтаксична помилка: `((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: неправильний тип інструкції %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document з рядка %d закінчено кінцем файла (очікувалося «%s»)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: інструкція переспрямування `%d' поза межами" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) перевищує обмеження SIZE_MAX (%lu): " +"рядок обрізано" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "перевищено максимальну можливу кількість here-document" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "файл скінчився раніше, ніж було знайдено відповідний «%c»" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "файл скінчився раніше, ніж було знайдено `]]'" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "синтаксична помилка в умовному виразі: неочікувана лексема «%s»" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "синтаксична помилка в умовному виразі" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "неочікувана лексема «%s», очікувалася `)'" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "очікувалася `)'" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "неочікуваний аргумент унарного умовного оператора «%s»" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "неочікуваний аргумент унарного умовного оператора" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "неочікувана лексема «%s», очікувався бінарний умовний оператор" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "очікувався бінарний умовний оператор" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "неочікуваний аргумент бінарного умовного оператора «%s»" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "неочікуваний аргумент бінарного умовного оператора" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "неочікувана лексема «%c» в умовній команді" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "неочікувана лексема «%s» в умовній команді" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "неочікувана лексема %d в умовній команді" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "синтаксична помилка коло неочікуваної лексеми «%s»" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "синтаксична помилка коло «%s»" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "синтаксична помилка: раптово скінчився файл" + +#: parse.y:6365 +msgid "syntax error" +msgstr "синтаксична помилка" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Використовуйте \"%s\", щоб вийти з оболонки.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "файл скінчився, перш ніж було знайдено відповідну `)'" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "завершення: функцію «%s» не знайдено" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: можливий цикл повторних спроб" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: неправильний з’єднувальний оператор `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: некоректний дескриптор файла" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: нульовий вказівник на файл" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" +"дескриптор файла xtrace (%d) не дорівнює номеру файла у вказівнику xtrace " +"(%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: «%c»: неправильний символ шаблону" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "дескриптор файла поза можливими межами" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: неоднозначне переспрямування" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: заборонено перезаписувати наявні файли" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: обмеження: переспрямування виводу заборонене" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "не вдалося створити тимчасовий файл для here-document: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: не вдалося надати змінній значення дескриптора файла" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port не підтримується" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "помилка переспрямування: не вдалося створити копію дескриптора файла" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "не вдалося знайти /tmp, будь ласка створіть його!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp має бути чинною назвою каталогу" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" +"режим форматованого виведення даних у інтерактивних оболонках буде " +"проігноровано" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: помилковий параметр" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "не вдалося встановити uid %d: ефективним є uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "не вдалося встановити gid %d: ефективним є gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "не вдалося запустити засіб діагностики: режим діагностування вимкнено" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: це каталог" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "У мене нема назви!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, версія %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Використовуйте:\t%s [довгий параметр GNU] [параметр] ...\n" +"\t%s [довгий параметр GNU] [параметр] файл_сценарію ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Довгі параметри GNU:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Параметри оболонки:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD чи -c команда чи -O параметр_shopt\t\t(тільки на початку)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s чи -o параметр\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Введіть `%s -c \"help set\"', щоб отримати більше інформації про параметри " +"оболонки.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Введіть `%s -c help', щоб отримати більше інформації про вбудовані команди " +"оболонки.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" +"Щоб повідомити про помилку в програмі, використовуйте команду `bashbug'.\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Домашня сторінка bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Загальна довідкова інформація щодо використання програмного забезпечення " +"GNU: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: некоректна операція" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Ненаявний сигнал" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Зависання" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Переривання" + +#: siglist.c:58 +msgid "Quit" +msgstr "Вихід" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Помилкова інструкція" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Точка зупину trace/trap" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Інструкція ABORT" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Інструкція EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Помилка обчислень з рухомою комою" + +#: siglist.c:86 +msgid "Killed" +msgstr "Вбитий" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Помилка шини" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Помилка адресування" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Помилковий системний виклик" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Зламаний канал" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Таймер" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Припинено" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Невідкладні події В/В" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Зупинено (сигнал)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Продовження" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Зупинка чи припинення дочірнього процесу" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Зупинено (ввід з термінала)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Зупинено (вивід на термінал)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "В/В готовий" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Обмеження часу CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Обмеження розміру файла" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Таймер (віртуальний)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Таймер (профілювання)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Зміна вікна" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Блокування втрачено" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Сигнал користувача 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Сигнал користувача 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Вхідні дані HFT очікують" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "наближається втрата живлення" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "наближається аварійна ситуація" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "перенесення процесу на інший CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "помилка програмування" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Режим монітору HFT надано" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Режим монітору HFT відкликано" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "Завершено звукову послідовність HFT" + +#: siglist.c:214 +msgid "Information request" +msgstr "Інформаційний запит" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Невідомий сигнал №%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "неправильна заміна: немає заключної «%s» у %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: неможливо означити елемент масиву списком" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "не вдалося створити канал для підставляння процесу" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "не вдалося створити дочірній процес для підставляння процесу" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "не вдалося відкрити іменований канал %s для читання" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "не вдалося відкрити іменований канал %s для запису" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "не вдалося здублювати іменований канал %s як fd %d" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "заміна команди: проігноровано порожній байт у вхідних даних" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "не вдалося створити канал для підставляння команди" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "не вдалося створити дочірній процес для підставляння команди" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" +"command_substitute: не вдалося створити копію каналу із файловим " +"дескриптором 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: некоректна назва змінної для посилання за назвою" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: некоректне непряме розгортання" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: некоректна назва змінної" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: параметр не встановлено" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: параметр нульової довжини чи не вказаний" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: підрядок коротший за 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: неправильна заміна" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: не можна призначити таким чином" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"у наступних версіях оболонки буде виконуватися обчислення для заміни " +"арифметичних виразів" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "неправильна заміна: немає заключної \"`\" у %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "нема відповідника: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "очікувався аргумент" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: очікувався числовий вираз" + +#: test.c:265 +msgid "`)' expected" +msgstr "очікувалася `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "очікувалася `)', отримано %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: очікувався бінарний оператор" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: очікувався унарний оператор" + +#: test.c:881 +msgid "missing `]'" +msgstr "відсутня `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "синтаксична помилка: неочікувана `;'" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "неправильний номер сигналу" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" +"обробник пасток: досягнуто максимального рівня для обробника пасток (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: неправильне значення у trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: обробник сигналу є SIG_DFL, %d (%s) повторно надсилається " +"собі" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: неправильний сигнал %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "помилка імпортування означення функції «%s»" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "рівень оболонки (%d) занадто високий, перевстановлено у 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: немає контексту функції у поточній області" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: змінною не може бути значення, яке приймають інші змінні" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: присвоєння цілого числа посиланню з назвою" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: немає контексту функції у поточній області" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s має нульове значення рядка експортування" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "Помилковий символ %d у рядку експорту для %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "немає `=' у рядку експорту для %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: перший елемент shell_variables не є контекстом функції" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: немає контексту global_variables" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: перший елемент shell_variables не є тимчасовим оточенням виконання" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: не вдалося відкрити ФАЙЛ" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: некоректне значення дескриптора файла трасування" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: значення сумісності не належить припустимому діапазону значень" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "© Free Software Foundation, Inc., 2012" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Ліцензія GPLv3+: GNU GPL версія 3 чи новіша \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, версія %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "" +"Це вільне програмне забезпечення; ви можете його змінювати та " +"розповсюджувати." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Не надається НІЯКИХ ГАРАНТІЙ у межах, передбачених законом." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: не вдалося виділити %lu байтів (виділено %lu байтів)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: не вдалося виділити %lu байтів" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: не вдалося виділити %lu байтів (виділено %lu байтів)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: не вдалося виділити %lu байтів" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-3] [назва[=значення] ...]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] назва [назва ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m keymap] [-f файл] [-q назва] [-u назва] [-r " +"послідовність-клавіш] [-x послідовність-клавіш:команда-оболонки] " +"[послідовність-клавіш:функція-readline чи команда-readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [вбудована-команда [аргумент ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [вираз]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [каталог]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] команда [аргумент ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [назва[=значення] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] назва[=значення] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [параметр] назва[=значення] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [аргумент ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [аргумент ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f файл] [назва ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [аргумент ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts рядок-параметрів назва [аргумент]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a назва] [команда [аргументи ...]] [переспрямування ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e редактор] [-lnr] [перший] [останній] чи fc -s [шаблон=заміна] " +"[команда]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [завдання]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [завдання ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p шлях] [-dt] [назва ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [шаблон ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d позиція] [n] чи history -anrw [файл] чи history -ps " +"аргумент [аргумент ...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [завдання ...] чи jobs -x команда [аргументи]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [специфікація завдання ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s сигнал | -n номер-сигналу | -сигнал] pid | завдання ... чи kill -l " +"[сигнал]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let аргумент [аргумент ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a масив] [-d роздільник] [-i текст] [-n кількість-символів] [-" +"N кількість-символів][-p запрошення] [-t ліміт-часу] [-u дескриптор-файла] " +"[назва ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o назва-параметра] [--] [аргумент ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [назва ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [назва[=значення] ...] чи export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonli [-af [назва[=значення] ...] чи readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source файл [аргументи]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". файл [аргументи]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [вираз]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ аргумент... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[аргумент] сигнал ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] назва [назва ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [обмеження]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [режим-доступу]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [ідентифікатор]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [ідентифікатор-процесу ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for НАЗВА [in СЛОВА ... ] ; do КОМАНДИ; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( вираз1; вираз2; вираз3 )); do КОМАНДИ; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select НАЗВА [in СЛОВА ...;] do КОМАНДИ; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] канал" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case СЛОВО in [ШАБЛОН [| ШАБЛОН]...) КОМАНДИ ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if КОМАНДИ; then КОМАНДИ; [ elif КОМАНДИ; then КОМАНДИ; ]... [ else " +"КОМАНДИ; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while КОМАНДИ; do КОМАНДИ; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until КОМАНДИ; do КОМАНДИ; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [НАЗВА] команда [переспрямування]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function НАЗВА { КОМАНДИ ; } чи НАЗВА () { КОМАНДИ ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ КОМАНДИ ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "завдання [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( вираз ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ вираз ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - назви та значення деяких змінних оболонки" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | каталог]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [назва-параметра ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v змінна] шаблон-форматування [аргументи]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o параметр] [-A дія] [-G шаблон-" +"оболонки] [-W список-слів] [-F функція] [-C команда] [-X шаблон-" +"фільтрування] [-P префікс] [-S суфікс] [назва ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o параметр] [-A дія] [-G шаблон-оболонки] [-W " +"список-слів] [-F функція] [-C команда] [-X шаблон-фільтрування] [-P " +"префікс] [-S суфікс] [слово]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o параметр] [-DEI] [назва ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d роздільник] [-n кількість] [-O початок-відліку] [-s кількість] [-" +"t] [-u дескриптор] [-C обробник] [-c крок] [масив]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d роздільник] [-n кількість] [-O початок-відліку] [-s кількість] " +"[-t] [-u дескриптор] [-C обробник] [-c крок] [масив]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Додає чи показує псевдоніми для команд.\n" +" \n" +" Викликана без аргументів, команда `alias' друкує список псевдонімів у\n" +" придатній до подальшого виконання формі `alias НАЗВА=ЗНАЧЕННЯ'.\n" +" \n" +" Інакше вона додає псевдоніми для кожної вказаної НАЗВИ, для якої надане\n" +" ЗНАЧЕННЯ. Пробіли в кінці ЗНАЧЕННЯ дозволяють увімкнути подальше " +"розкриття\n" +" псевдонімів усередині цього псевдоніму під час його підставляння.\n" +" \n" +" Параметри:\n" +" -p\tвивести усі визначені псевдоніми у придатній до виконання формі.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо було вказано НАЗВУ, для якої немає\n" +" псевдоніма." + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Вилучає усі вказані НАЗВИ зі списку визначених псевдонімів.\n" +" \n" +" Параметри:\n" +" -a\tВилучити визначення усіх псевдонімів.\n" +" \n" +" Код завершення:\n" +" Завершується невдало, якщо НАЗВА не є визначеним псевдонімом." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Встановлює призначення клавіш та змінні readline.\n" +" \n" +" Призначає функції чи макровизначенню readline послідовність клавіш чи\n" +" встановлює змінну readline. Аргумент, що не відносяться до параметрів\n" +" має синтаксис такий же як у ~/.inputrc, але мають бути вказані як один\n" +" аргумент, наприклад, bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Параметри:\n" +" -m набір Використовувати НАБІР призначень клавіш на час\n" +" виконання цієї команди. Назви існучих наборів: " +"emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command та vi-insert.\n" +" -l Вивести назви функцій.\n" +" -P Вивести назви функцій та які послідовності клавіш " +"їм\n" +" призначено.\n" +" -p Вивести функції та призначення у формі, придатній " +"для\n" +" подальшого використання як ввід.\n" +" -S Вивести послідовності клавіш, які запускають\n" +" макровизначення.\n" +" -s Вивести послідовності клавіш, які запускають\n" +" макровизначення у формі, придатній для подальшого\n" +" використання як ввід.\n" +" -V Вивести назви та значення змінних.\n" +" -v Вивести назви та значення змінних у формі, що може\n" +" бути надалі використана як ввід.\n" +" -q функція Показати, які послідовності клавіш запускають цю\n" +" функцію.\n" +" -u функція Скасувати усі призначені цій функції " +"послідовності.\n" +" -r послідовність Скасувати призначення ПОСЛІДОВНОСТІ.\n" +" -f файл Прочитати призначення клавіш з ФАЙЛУ.\n" +" -x послідовність:команда-оболонки\tПри введенні ПОСЛІДОВНОСТІ буде\n" +" \t\t\t\tзапускатися КОМАНДА-ОБОЛОНКИ.\n" +" -X Показати список послідовностей клавіш, пов’язани з -" +"x та відповідні\n" +" команди у форматі, яким можна скористатися як " +"вхідними даними\n" +" для іншої програми.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні параметри та не\n" +" виникло помилки під час виконання." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Виходить з циклів for, while чи until.\n" +" \n" +" Перериває цикли FOR, WHILE чи UNTIL. Якщо вказано N, перериває\n" +" N вкладених циклів.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо N менше за 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Переходить до наступної ітерації циклів for, while чи until.\n" +" \n" +" Переходить до наступної ітерації циклу for, while чи until.\n" +" Якщо вказане N, перехід відбувається у N-ному охоплюючому циклі.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо N менше 1." + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Виконує вбудовану команду оболонки.\n" +" \n" +" Запускає ВБУДОВАНУ-КОМАНДУ з вказаними АРГУМЕНТАМИ, пошук команди не\n" +" робиться. Це може стати в нагоді, якщо ви хочете замінити вбудовану\n" +" команду функцією оболонки, але вам треба запускати вбудовану команду\n" +" зсередини цієї функції.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення ВБУДОВАНОЇ-КОМАНДИ або помилку, якщо\n" +" ВБУДОВАНА-КОМАНДА не є вбудованою командою оболонки." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Повертає контекст виконання поточної підпрограми.\n" +" \n" +" Якщо ВИРАЗ не вказано, виводить \"$line $filename\". Інакше виводить\n" +" \"$line $subroutine $filename\"; цю додаткову інформацію можна\n" +" використовувати для трасування стеку.\n" +" \n" +" Значення ВИРАЗУ визначає на скільки рівнів викликів піднятися від\n" +" поточного; поточний рівень є нульовим.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо оболонка зараз не виконує функцію\n" +" або якщо ВИРАЗ є неправильним." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Змінює робочий каталог оболонки.\n" +" \n" +" Змінює поточний каталог на КАТАЛОГ. Якщо КАТАЛОГ не вказано,\n" +" значення буде взято зі значення змінної середовища HOME.\n" +" \n" +" Змінна CDPATH визначає набір каталогів, в яких слід шукати КАТАЛОГ.\n" +" Каталоги у цій змінній розділяються двокрапкою (:).\n" +" Порожня назва каталогу означає поточний каталог. Якщо КАТАЛОГ\n" +" починається з похилої риски (/), CDPATH не використовується.\n" +" \n" +" Якщо каталог не буде знайдено, у разі визначеного параметра оболонки\n" +" `cdable_vars', КАТАЛОГ вважатиметься назвою змінної. Якщо змінна з\n" +" такою назвою існуватиме, її значення буде використане замість КАТАЛОГУ.\n" +" \n" +" Параметри:\n" +" -L\tПримусово переходити за символічними посиланнями: визначати\n" +" \tджерело символічних посилань як КАТАЛОГ після обробки записів `..'.\n" +" -P\tВикористовувати фізичну структуру каталогів, не переходити за\n" +" \tсимволічними посиланнями: визначати джерело символічних посилань як\n" +" \tКАТАЛОГ до обробки записів `..'.\n" +" -e\tякщо вказано параметр -P і програмі не вдасться визначити " +"поточний\n" +" \tробочий каталог, вийти з ненульовим значенням стану.\n" +" -@ у системах, де передбачено таку підтримку, показати файл з " +"розширеними\n" +" атрибутами як каталог, що містить атрибути файла\n" +" \n" +" Зазвичай команда переходитиме за символічними посиланнями, неначе було\n" +" вказано параметр `-L'.\n" +" `..' обробляється шляхом вилучення компонентів шляху до символу\n" +" похилої риски або за початковим компонентом каталогу КАТАЛОГ.\n" +" \n" +" Код завершення:\n" +" Повертає 0, якщо каталог було змінено і якщо було успішно встановлено " +"значення\n" +" $PWD у разі використання -P. За інших результатів повертає ненульове " +"значення." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"Виводить назву поточного робочого каталогу.\n" +" \n" +" Параметри:\n" +" -L\tВивести значення $PWD, якщо вона вказує поточний робочий каталог.\n" +" -P\tВивести фізичне розташування каталогу, без символічних посилань.\n" +" \n" +" Зазвичай `pwd' працює як ніби вказано `-L'.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи\n" +" не вдалося отримати доступ до поточного робочого каталогу." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Нічого не робить.\n" +" \n" +" Не має жодного ефекту; ця команда нічого не робить.\n" +" \n" +" Код завершення:\n" +" Команда завжди успішна." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Завершується успішно.\n" +" \n" +" Код завершення:\n" +" Команда завжди успішна." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Завершується помилково.\n" +" \n" +" Код завершення:\n" +" Команда завжди завершується невдало." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Запускає звичайну команду чи показує інформацію про команди.\n" +" \n" +" Запускає КОМАНДУ з АРГУМЕНТАМИ, не роблячи пошуку серед функцій " +"оболонки,\n" +" чи показує інформацію про вказані КОМАНДИ. Може використовуватися для\n" +" запуску команд з диску, коли існує функція з такою ж назвою.\n" +" \n" +" Параметри:\n" +" -p Використовувати стандартне значення PATH, яке забезпечує\n" +" знаходження усіх стандартних утиліт.\n" +" -v Вивести опис КОМАНД, подібний до виводу вбудованої команди " +"`type'.\n" +" -V Вивести більш багатослівний опис кожної з КОМАНД.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення КОМАНДИ або помилку, якщо КОМАНДУ не " +"буде\n" +" знайдено." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Встановлює значення та властивості змінних.\n" +" \n" +" Описує змінні та встановлює їх властивості. Якщо НАЗВИ не вказано,\n" +" показує властивості та значення усіх змінних.\n" +" \n" +" Параметри:\n" +" -f\tОбмежити поле дії лише назвами та визначеннями функцій.\n" +" -F\tОбмежити показ лише назвами функцій (плюс номер рядку та\n" +" \t\tфайл, звідки походить функція, якщо виконується діагностика).\n" +" -g\tстворити загальні змінні, якщо використано у функції оболонки,\n" +" \t\tякщо це не функція оболонки, буде проігноровано.\n" +" -p\tПоказати властивості та значення кожної з НАЗВ.\n" +" \n" +" Параметри, що встановлюють властивості:\n" +" -a\tЗробити НАЗВИ індексованими масивами (якщо підтримується).\n" +" -A\tЗробити НАЗВИ асоціативними масивами (якщо підтримується).\n" +" -i\tНадати НАЗВА властивість `ціле число'.\n" +" -n\tЗробити НАЗВУ посиланням на змінну, вказану як значення\n" +" -l\tПереворити значення кожної НАЗВИ до нижнього регістру, якщо НАЗВИ " +"визначено.\n" +" -r\tЗробити НАЗВИ незмінними (лише для читання).\n" +" -t\tНадати НАЗВАМ властивість `trace'.\n" +" -u\tПеретворити значення кожної НАЗВИ до верхнього регістру, якщо " +"НАЗВИ визначено.\n" +" -x\tЕкспортувати НАЗВИ.\n" +" \n" +" Замінивши `+' на `-' можна вимкнути відповідну властивість.\n" +" \n" +" При означенні змінні з властивістю цілого числа виконується арифметичне\n" +" обчислення (див. команду `let') значення.\n" +" \n" +" При використанні всередині функції `declare' робить НАЗВИ локальними\n" +" змінними, як команда `local'. Параметр `-g' вимикає таку поведінку.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні параметри і не " +"виникло\n" +" помилки під час виконання." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Встановлює значення та властивості змінних.\n" +" \n" +" Синонім `declare'. Дивіться `help declare'." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Описує локальні змінні.\n" +" \n" +" Створює локальну змінну НАЗВА та призначає їй ЗНАЧЕННЯ. ПАРАМЕТР може " +"бути\n" +" будь-яким параметром, що приймається командою `declare'.\n" +" \n" +" Локальні змінні можуть використовуватися лише усередині функції; їх " +"видно\n" +" лише у функції, де їх визначено та її нащадках.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано помилкові параметри, " +"стається\n" +" помилка під час надання змінній значення або якщо оболонка не виконує " +"функцію." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Друкує аргументи до стандартного виводу.\n" +" \n" +" Виводить АРГУМЕНТИ, відокремлені один від одного одинарним символом " +"пробілу, із\n" +" завершальним символом розриву рядка до стандартного виводу.\n" +" \n" +" Параметри:\n" +" -n\tНе додавати символ нового рядку в кінці.\n" +" -e\tУвімкнути інтерпретацію нижченаведених послідовностей.\n" +" -E\tЯвно заборонити інтерпретацію послідовностей.\n" +" \n" +" `echo' інтерпретує наступні послідовності, що починаються зі зворотньої\n" +" похилої риски:\n" +" \\a\tсигнал (дзвінок)\n" +" \\b\tповернення курсору\n" +" \\c\tне виводити все, що далі\n" +" \\e\tсимвол escape\n" +" \\E\tсимвол escape\n" +" \\f\tперехід на рядок нижче\n" +" \\n\tпочаток нового рядку\n" +" \\r\tповернення до початку рядку\n" +" \\t\tгоризонтальна табуляція\n" +" \\v\tвертикальна табуляція\n" +" \\\\\tзворотня похила риска\n" +" \\0nnn\tсимвол з вісімковим ASCII-кодом NNN. NNN може мати від\n" +" \t\tнуля до трьох вісімкових цифр\n" +" \\xHH\tвосьмибітовий символ із шістнадцятковим кодом HH. HH\n" +" \t\tможе бути одною чи двома шістнадцятковими цифрами\n" +" \\uHHHH\tсимвол Unicode, чиє значення є шістнадцятковим числом HHHH.\n" +" \t\tHHHH може складатися з одної, двох, трьох або чотирьох " +"шістнадцяткових цифр.\n" +" \\UHHHHHHHH символ Unicode, чиє значення є шістнадцятковим числом\n" +" \t\tHHHHHHHH. HHHHHHHH може містити від однією до восьми шістнадцяткових " +"цифр.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо виникне помилка запису." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Друкує аргументи до стандартного виводу.\n" +" \n" +" Виводить АРГУМЕНТИ до стандартного виводу з переходом на новий рядок.\n" +" \n" +" Параметри:\n" +" -n\tНе додавати символ нового рядку в кінці.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо трапиться помилка запису." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Вмикає та вимикає вбудовані команди оболонки.\n" +" \n" +" Вмикає та вимикає вбудовані команди оболонки. Вимкнення команди " +"дозволяє\n" +" вам запускати команду з диску, що має таку ж назву, як і вбудована " +"команда\n" +" оболонки, без потреби вказувати повний шлях до команди.\n" +" \n" +" Параметри:\n" +" -a\tНадрукувати список вбудованих команд, вказуючи чи вони ввімкнені.\n" +" -n\tВимкнути кожну з НАЗВ або надрукувати список вимкнених команд.\n" +" -p\tНадрукувати список вбудованих команд у придатній для подальшого\n" +" \tвиконання формі.\n" +" -s\tДрукувати лише назви `спеціальних' команд Posix.\n" +" \n" +" Параметри, що контролюють динамічне завантаження:\n" +" -f\tЗавантажити вбудовану команду НАЗВА з колективного об’єктного " +"ФАЙЛУ.\n" +" -d\tВилучити вбудовану команду, завантажену за допомогою -f.\n" +" \n" +" Без параметрів вмикає кожну з НАЗВ.\n" +" \n" +" Щоб використовувати `test', що знаходиться десь у $PATH замість\n" +" вбудованої у оболонку версії, введіть `enable -n test'.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо НАЗВА не є вбудованою командою\n" +" оболонки або якщо трапиться помилка під час виконання." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Виконує аргументи як команду оболонки.\n" +" \n" +" Об’єднує АРГУМЕНТИ в один рядок та виконує результат як команди, " +"введені\n" +" до оболонки.\n" +" \n" +" Код завершення:\n" +" Команда повертає результат виконання команди. Якщо отриманий рядок " +"команди\n" +" є порожнім рядком, команда завершується успішно." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Аналізує рядок параметрів.\n" +" \n" +" Getopts використовується підпрограмами оболонки для аналізу позиційних\n" +" аргументів як параметрів командного рядку.\n" +" \n" +" РЯДОК-ПАРАМЕТРІВ містить літери параметрів, які можуть бути вказані; " +"якщо\n" +" за літерою іде двокрапка, цей параметр очікує аргументу, відокремленого\n" +" від нього пробілом.\n" +" \n" +" Після кожного запуску getopts кладе наступний параметр до змінної " +"оболонки\n" +" $name, створюючи її, якщо треба. Номер наступного неопрацьованого\n" +" аргументу кладеться до змінної оболонки OPTIND. OPTIND встановлюється у " +"1\n" +" кожного разу, як запускається оболонка чи скрипт. Якщо параметр очікує\n" +" аргументу, getopts кладе аргумент до змінної оболонки OPTARG.\n" +" \n" +" Getopts може повідомляти про помилки двома способами. Якщо першим " +"символом\n" +" РЯДКУ-ПАРАМЕТРІВ є двокрапка, getopts використовує `тихе' повідомлення " +"про\n" +" помилки. В такому режимі повідомлення про помилки не виводяться. Якщо " +"буде\n" +" знайдено неправильний параметр, getopts покладе його до OPTARG. Якщо не\n" +" буде вказано очікуваний аргумент, getopts покладе ':' до НАЗВА, а " +"символ\n" +" параметра — до OPTARG. У `гучному' режимі, при з помилками у параметрі у " +"NAME\n" +" кладеться '?', а OPTARG скидається. Якщо потрібний аргумент не вказано, " +"у\n" +" NAME кладеться '?', OPTARG скидається і друкується діагностичне\n" +" повідомлення.\n" +" \n" +" Якщо змінна оболонки OPTERR встановлена у 0, getopts не друкуватиме\n" +" повідомлення про помилки навіть у `гучному режимі'. Стандартне значення\n" +" OPTERR — 1.\n" +" \n" +" Зазвичай getopts аналізує позиційні параметри ($0 - $9), але якщо " +"надано\n" +" більше аргументів, замість цього аналізуються вони.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо знайдено параметр; помилково, якщо\n" +" параметри скінчилися або трапилася помилка." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Заміщує оболонку вказаною командою.\n" +" \n" +" Запускає КОМАНДУ, заміщаючи поточну оболонку вказаною програмою.\n" +" АРГУМЕНТИ передаються КОМАНДІ. Якщо КОМАНДУ не вказано, будь-які\n" +" переспрямування застосовуються до поточної оболонки.\n" +" \n" +" Параметри:\n" +" -a назва\tПередати НАЗВУ як нульовий аргумент КОМАНДИ.\n" +" -c\tЗапустити КОМАНДУ з порожнім оточенням.\n" +" -l\tПокласти риску до нульового аргументу КОМАНДИ.\n" +" \n" +" Якщо команду не вдасться запустити, неінтерактивна оболонка " +"завершується,\n" +" якщо тільки не встановлено параметр оболонки `execfail'.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо команду не буде знайдено або якщо\n" +" трапиться помилка переспрямування." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Виходить з оболонки.\n" +" \n" +" Виходить з оболонки, повертаючи статус N. Якщо N не вказано, береться\n" +" статус останньої запущеної команди." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Виходить з оболонки сеансу.\n" +" \n" +" Виходить з оболонки сеансу зі статусом N. Повертає помилку, якщо " +"команду\n" +" запущено не у оболонці сеансу." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Показує чи запускає команди зі списку попередньо запущених.\n" +" \n" +" Fc використовується для показу чи редагування та подальшого повторного\n" +" запуску команд з журналу. ПЕРШИЙ та ОСТАННІЙ можуть вказувати діапазон\n" +" або ПЕРШИЙ може бути рядком, тоді він означатиме останню команду, що\n" +" починалася з цього рядка.\n" +" \n" +" Параметри:\n" +" -e РЕДАКТОР\tВказує редактор. Зазвичай це FCEDIT, EDITOR чи vi,\n" +" \t\tщо перше буде знайдене.\n" +" -l\tПоказати рядки журналу, замість редагування.\n" +" -n\tНе виводити номери рядків у списку.\n" +" -r\tПоказувати у зворотньому порядку (найновіші першими).\n" +" \n" +" У форматі `fc -s [шаблон=заміна ...] [команда]', КОМАНДА запускається\n" +" після заміни ШАБЛОН=ЗАМІНА.\n" +" \n" +" При використанні цієї команди може бути зручним псевдонім r='fc -s' — " +"тоді\n" +" `r cc' запустить останню команду, що починається з `cc', а `r' повторно\n" +" виконає останню команду.\n" +" \n" +" Код завершення:\n" +" Команда завершується зі статусом запущених команд, або помилкою, якщо\n" +" трапиться помилка." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Переводить завдання у пріоритетний режим.\n" +" \n" +" Переводить ЗАВДАННЯ у пріоритетний режим виконання і робить його " +"поточним\n" +" завданням. Якщо ЗАВДАННЯ не вказане, береться завдання, яке оболонка\n" +" вважає поточним.\n" +" \n" +" Код завершення:\n" +" Команда завершується зі статусом завершення завдання, що переведене\n" +" у пріоритетний режим, або помилкою, якщо трапиться помилка." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Переводить завдання у фоновий режим.\n" +" \n" +" Переводить кожне з ЗАВДАНЬ у фоновий режим виконання, як ніби їх " +"запущено\n" +" із `&'. Якщо ЗАВДАННЯ не вказані, береться завдання, що оболонка вважає\n" +" поточним.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо контроль завдань не ввімкнено або " +"якщо\n" +" трапиться помилка." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Запам’ятовує чи показує розміщення програм.\n" +" \n" +" Визначає та запам’ятовує повний шлях до кожної з вказаних програм. Якщо\n" +" НАЗВИ не вказані, показує інформацію про збережені команди.\n" +" \n" +" Параметри:\n" +" -d\tВилучити з кешу розміщення НАЗВ.\n" +" -l\tПоказувати у форматі, що можна потім виконати.\n" +" -p шлях\tвикористовувати ШЛЯХ як повний шлях до НАЗВИ.\n" +" -r\tСпорожнити кеш.\n" +" -t\tВивести збережені розташування НАЗВ, вказуючи перед розташуванням\n" +" \t\tвідповідну НАЗВУ, якщо вказано декілька НАЗВ.\n" +" Аргументи:\n" +" НАЗВА\tКожна з НАЗВ шукається у $PATH та додається до списку " +"збережених\n" +" \t\tкоманд.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо НАЗВУ не вдалося знайти або якщо\n" +" вказано помилковий параметр." + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Показує інформацію про вбудовані команди.\n" +" \n" +" Показує коротку довідку з вбудованих команд. Якщо вказано ШАБЛОН, надає\n" +" детальну довідку з усіх команд, що відповідають цьому ШАБЛОНУ. Якщо " +"його\n" +" не вказано, друкує список пунктів довідки.\n" +" \n" +" Параметри:\n" +" -d\tВивести короткий опис кожного з пунктів.\n" +" -m\tПоказати довідку у форматі, подібному до man(1).\n" +" -s\tВивести лише короткий опис синтаксису використання кожної з " +"команд,\n" +" \tщо відповідають ШАБЛОНУ\n" +" \n" +" Аргументи:\n" +" ШАБЛОН\tШаблон, що визначає тему довідки.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало якщо ШАБЛОН не знайдено або якщо вказано\n" +" помилковий параметр." + +# WTF??? history list += history + history file ??? +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Показує чи змінює список попередніх команд.\n" +" \n" +" Показує список журналу команд з номерами рядків, вказуючи `*' перед " +"кожним\n" +" зміненим рядком. Якщо вказано аргумент N, показує лише N останніх " +"рядків.\n" +" \n" +" Параметри:\n" +" -c\tВилучити зі списку усі збережені команди.\n" +" -d позиція\tВилучити рядок у ПОЗИЦІЇ (відносній). Відлік від'ємних " +"значень\n" +" \t\tпозиції ведеться від кінця списку журналу\n" +" \n" +"\n" +" \n" +" -a\tДодати записи з поточного сеансу до файла журналу.\n" +" -n\tДодати записи, яких ще немає у списку з файла журналу, і\n" +" \t\tдописати їх до файла журналу.\n" +" -r\tПрочитати файл журналу та додати його вміст до кінця списку.\n" +" -w\tЗаписати поточний журнал команд до файла журналу.\n" +" \n" +" -p\tЗробити розкриття журналу команд на кожному з АРГУМЕНТІВ та\n" +" \tпоказати результат (без збереження у списку журналу команд).\n" +" -s\tДодати АРГУМЕНТИ до списку журналу як один запис.\n" +" \n" +" Якщо вказаний ФАЙЛ, його буде використано як файл журналу команд. " +"Інакше,\n" +" якщо визначено $HISTFILE, береться її значення, якщо ні — ~/." +"bash_history.\n" +" \n" +" Якщо змінна $HISTTIMEFORMAT має значення, відмінне від порожнього " +"рядку,\n" +" її буде використано як шаблон strftime(3) для показу часових позначок.\n" +" Інакше часові позначки не виводяться.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано вірні параметри та не " +"виникло\n" +" помилки під час виконання." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Виводить стан завдань.\n" +" \n" +" Показує список активних завдань. ЗАВДАННЯ обмежує вивід цим завданням.\n" +" Без параметрів показує стан усіх активних завдань.\n" +" \n" +" Параметри:\n" +" -l\tДодатково виводити ідентифікатори процесів.\n" +" -n\tПоказувати лише процеси, стан яких змінився з часу останнього\n" +" \tзвідомлення.\n" +" -p\tПоказувати лише ідентифікатори процесів.\n" +" -r\tОбмежити вивід поточними завданнями.\n" +" -s\tОбмежити вивід зупиненими завданнями.\n" +" \n" +" Якщо вказано -x, КОМАНДУ буде виконано після заміни усіх згадок про\n" +" завдання у АРГУМЕНТАХ на ідентифікатори головних процесів відповідних\n" +" завдань.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та не\n" +" виникло помилки під час виконання. При використанні -x команда\n" +" завершується зі статусом завершення КОМАНДИ." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Вилучає завдання з поточної оболонки.\n" +" \n" +" Вилучає кожне з ЗАВДАНЬ з таблиці активних завдань. Якщо ЗАВДАННЯ не\n" +" вказано, береться завдання, яке оболонка вважає поточним.\n" +" \n" +" Параметри:\n" +" -a\tВилучити усі завдання, якщо ЗАВДАННЯ не вказані.\n" +" -h\tПозначити ЗАВДАННЯ так, щоб вони не отримали SIGHUP, якщо " +"оболонка\n" +" \t\tотримає SIGHUP.\n" +" -r\tВилучати лише поточні завдання.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи\n" +" ЗАВДАННЯ." + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Надіслати сигнал до завдання.\n" +" \n" +" Надіслати процесу, вказаному за ідентифікатором процесу чи завдання\n" +" сигнал, вказаний за його номером чи назвою. Якщо не вказано ані " +"першого,\n" +" ані другого, буде надіслано SIGTERM.\n" +" \n" +" Параметри:\n" +" -s сигнал\tСИГНАЛ є назвою сигналу.\n" +" -n сигнал\tСИГНАЛ є номером сигналу.\n" +" -l\tПерелічити назви сигналів; якщо за -l ідуть іще аргументи, вони\n" +" \t\tвважаються номерами сигналів, які треба показати.\n" +" -L\tсинонім до -l\n" +" \n" +" Kill є вбудованою командою з двох причин: це дозволяє вказувати\n" +" ідентифікатори завдань замість ідентифікаторів процесів та дозволяє\n" +" вбивати процеси, навіть якщо ви вичерпали ліміт процесів.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні аргументи та не\n" +" трапилося помилки під час виконання." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Обчислює арифметичні вирази.\n" +" \n" +" Обчислює кожен АРГУМЕНТ як арифметичний вираз. Обчислення виконується у\n" +" цілих числах фіксованої довжини без перевірки переповнення, але все ж\n" +" ділення на 0 визначається і вважається помилкою. Нижченаведений список\n" +" операторів згруповано за рівнями пріоритету. Їх перелічено у порядку\n" +" спадання пріоритету.\n" +" \n" +" \tid++, id--\tпост-інкремент та пост-декремент змінної\n" +" \t++id, --id\tпре-інкремент та пре-декремент змінної\n" +" \t-, +\t\tунарний мінус та плюс\n" +" \t!, ~\t\tлогічна та побітова інверсія\n" +" \t**\t\tпіднесення до степеня\n" +" \t*, /, %\t\tмноження, ділення, залишок\n" +" \t+, -\t\tдодавання, віднімання\n" +" \t<<, >>\t\tпобітовий зсув вправо та вліво\n" +" \t<=, >=, <, >\tпорівняння\n" +" \t==, !=\t\tрівність, нерівність\n" +" \t&\t\tпобітове AND\n" +" \t^\t\tпобітове XOR\n" +" \t|\t\tпобітове OR\n" +" \t&&\t\tлогічне AND\n" +" \t||\t\tлогічне OR\n" +" \tвираз ? вираз : вираз\n" +" \t\t\tумовний оператор\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tприсвоєння\n" +" \n" +" Змінні оболонки можуть виступати операндами. Назву змінної буде " +"замінено\n" +" її значенням (приведеним до цілого числа фіксованої довжини) у виразі.\n" +" Для цього не потрібно встановлювати властивість змінної `ціле число'.\n" +" \n" +" Оператори обчислюються за пріоритетами. Вкладені вирази у дужках\n" +" обчислюються першими та можуть змінювати правила пріоритетів, наведені\n" +" вище.\n" +" \n" +" Код завершення:\n" +" Якщо результатом обчислення останнього АРГУМЕНТУ є 0, let повертає 1,\n" +" інакше — 0." + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Читає рядок зі стандартного вводу та розбиває його на поля.\n" +" \n" +" Зчитує один рядок зі стандартного вводу чи з ФАЙЛОВОГО-ДЕСКРИПТОРА, " +"якщо\n" +" вказано параметр -u. Рядок розбивається на поля по словах, перше слово\n" +" призначується першій НАЗВІ, друге слово — другій НАЗВІ тощо, якщо\n" +" залишаться непризначені слова, їх буде призначено останній НАЗВІ. Як\n" +" роздільники полів розпізнаються символи, вказані у змінній $IFS.\n" +" \n" +" Якщо НАЗВ не вказано, рядок цілком буде збережено у змінній REPLY.\n" +" \n" +" Параметри:\n" +" -a масив\tПризначити прочитані слова послідовним елементам МАСИВУ,\n" +" \t\tпочинаючи з нульового.\n" +" -d роздільник\tЧитати ввід доки не знайдеться символ РОЗДІЛЬНИК\n" +" \t\t(замість кінця рядка, як звичайно).\n" +" -e\t\tВикористовувати Readline для отримання рядку.\n" +" -i текст\tВказати початковий ТЕКСТ для Readline.\n" +" -n кількість\tПрипинити після зчитування КІЛЬКОСТІ символів, замість\n" +" \t\tтого, щоб чекати на кінець рядка.\n" +" -N кількість\tПрипинити, лише після читання КІЛЬКОСТІ символів, якщо\n" +" \t\tсеред них не виявиться символі кінця файла або не буде перевищено\n" +" \t\tчас очікування, ігнорувати роздільники.\n" +" -p запрошення\tВивести рядок ЗАПРОШЕННЯ (без переведення рядка в " +"кінці)\n" +" \t\tперед читанням.\n" +" -r\t\tНе обробляти зворотню похилу риску для екранування символів.\n" +" -s\t\tНе виводити отриманий ввід на термінал.\n" +" -t ліміт-часу\tПрипинити читання та вийти з помилкою якщо за вказаний\n" +" \t\tпроміжок часу (в секундах) не було прочитано рядок цілком. Значення\n" +" \t\tзмінної TMOUT є стандартним значенням обмеження за часом. ЛІМІТ-" +"ЧАСУ\n" +" \t\tможе бути дробовим числом. Якщо ЛІМІТ-ЧАСУ 0, read завершується\n" +" \t\tуспішно, лише якщо ввід вже наявний на вказаному файловому\n" +" \t\tдескрипторі. Якщо перевищено термін очікування, код завершення буде\n" +" \t\tбільшим за 128.\n" +" -u файловий-дескриптор\tЧитати ввід з ФАЙЛОВОГО-ДЕСКРИПТОРУ замість\n" +" \t\tстандартного вводу.\n" +" \n" +" Код завершення:\n" +" Команда повертає помилку, якщо знайдено кінець файла, якщо вичерпано " +"час\n" +" очікування (значення, більше за 128), якщо сталася помилка під час\n" +" встановлення значення змінної, або якщо із -u вказано неправильний " +"файловий дескриптор." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Повертається з функції оболонки.\n" +" \n" +" Виходить з функції чи сценарію, виконаного за допомогою source зі " +"вказаним\n" +" кодом завершення N. Якщо N не вказане, return повертає статус останньої\n" +" виконаної всередині сценарію чи функції команди.\n" +" \n" +" Код завершення:\n" +" Команда повертає N, або помилку, якщо викликана не у функції чи сценарії." + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Встановлює та скидає параметри оболонки та позиційні параметри.\n" +" \n" +" Змінює значення властивостей оболонки та позиційних параметрів чи " +"показує\n" +" назви та значення змінних оболонки.\n" +" \n" +" Параметри:\n" +" -a Експортувати змінні, які будуть змінюватися чи створюватися.\n" +" -b Сповіщати про припинення завдань негайно.\n" +" -e Завершити роботу, якщо одна з команд завершиться помилкою.\n" +" -f Вимкнути розкриття шаблонів назв файлів (globbing).\n" +" -h Запам’ятовувати розміщення команд по мірі використання.\n" +" -k Переносити усі аргументи-присвоєння до оточення команди, не лише " +"ті,\n" +" що йдуть перед назвою команди.\n" +" -m Ввімкнути контроль завдань.\n" +" -n Читати команди, але не виконувати їх.\n" +" -o параметр\n" +" Встановити параметр оболонки:\n" +" allexport те саме, що й -a\n" +" braceexpand те саме, що й -B\n" +" emacs використовувати подібний до emacs інтерфейс\n" +" редагування\n" +" errexit те саме, що й -e\n" +" errtrace те саме, що й -E\n" +" functrace те саме, що й -T\n" +" hashall те саме, що й -h\n" +" histexpand те саме, що й -H\n" +" history ввімкнути збереження журналу команд\n" +" ignoreeof не виходити з оболонки після зчитування кінця " +"файла\n" +" interactive-comments\n" +" дозволити коментарі у інтерактивній оболонці\n" +" keyword те саме, що й -k\n" +" monitor те саме, що й -m\n" +" noclobber те саме, що й -C\n" +" noexec те саме, що й -n\n" +" noglob те саме, що й -f\n" +" nolog наразі приймається, але ігнорується\n" +" notify те саме, що й -b\n" +" nounset те саме, що й -u\n" +" onecmd те саме, що й -t\n" +" physical те саме, що й -P\n" +" pipefail кодом завершення ланцюжка команд є код " +"завершення\n" +" останньої команди, що завершилася невдало, або\n" +" нуль, якщо усі команди завершилися успішно\n" +" posix змінити поведінку bash у ситуаціях, де її " +"поведінка\n" +" зазвичай відхиляється від стандарту Posix так, " +"щоб\n" +" вона відповідала стандарту\n" +" privileged те саме, що й -p\n" +" verbose те саме, що й -v\n" +" vi використовувати подібний до vi інтерфейс\n" +" редагування рядку\n" +" xtrace те саме, що й -x\n" +" -p Ввімкнений, якщо дійсний та ефективний ідентифікатори користувача " +"не\n" +" збігаються. Вимикає обробку файла $ENV та імпортування функцій\n" +" оболонки. Вимикання цього параметра встановлює ефективні\n" +" ідентифікатори користувача та групи у реальні.\n" +" -t Завершити роботу після зчитування та виконання однієї команди.\n" +" -u Обробляти неозначені змінні як помилку під час їх підставляння.\n" +" -v Друкувати рядки вводу по мірі їх читання.\n" +" -x Друкувати команди та їх аргументи при їх виконанні.\n" +" -B Виконувати розкриття дужок.\n" +" -C Вмикання параметра забороняє перезапис наявних звичайних файлів\n" +" переспрямуванням виводу.\n" +" -E Якщо ввімкнений, пастка ERR успадковується функціями оболонки.\n" +" -H Ввімкнути підставляння журналу за допомогою !. Цей параметр " +"зазвичай\n" +" ввімкнено у інтерактивних оболонках.\n" +" -P Не переходити за символічними посиланнями при запуску команд,\n" +" таких як cd, яка змінює поточний каталог.\n" +" -T Якщо ввімкнений, пастки DEBUG і RETURN будуть успадковуватися " +"функціями\n" +" оболонки.\n" +" -- Призначити всі аргументи, які ще не призначено до позиційних " +"параметрів.\n" +" Якщо всі аргументи вже призначено, позиційні параметри " +"вважатимуться\n" +" невстановленими.\n" +" - Призначити аргументи, що залишилися позиційним параметрам.\n" +" Параметри -x та -v вимикаються.\n" +" \n" +" Вимкнути параметр можна вказавши + замість -. Параметри можна змінювати\n" +" й після запуску оболонки. Наразі ввімкнені параметри можна побачити у\n" +" змінній $-. Залишкові аргументи вважаються позиційними параметрами\n" +" та призначаються по порядку відповідно до $1 $2, .. $n. Якщо АРГУМЕНТИ " +"не\n" +" вказані, виводиться список усіх змінних оболонки.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні параметри." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Скидає значення та параметри змінних та функцій оболонки.\n" +" \n" +" Вилучає змінні чи функції, вказані за НАЗВАМИ.\n" +" \n" +" Параметри:\n" +" -f\tНАЗВИ є функціями оболонки.\n" +" -v\tНАЗВИ є змінними оболонки.\n" +" -n\tНАЗВИ є посиланнями на назви, визначення самих змінних " +"скасовується.\n" +" \n" +" Без параметрів, unset спочатку намагається скинути змінну, якщо це не\n" +" вдасться, тоді функцію.\n" +" \n" +" Деякі змінні не можуть бути скинутими; див. `readonly'.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи " +"НАЗВА\n" +" доступна лише для читання." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Вмикає властивість експортування змінних оболонки.\n" +" \n" +" Позначає кожну з НАЗВ для експорту до середовища запущених надалі " +"команд.\n" +" Якщо вказане ЗНАЧЕННЯ, призначає ЗНАЧЕННЯ перед тим, як експортувати.\n" +" \n" +" Параметри:\n" +" -f\tПрацювати з функціями оболонки.\n" +" -n\tВимкнути властивість експортування для усіх НАЗВ.\n" +" -p\tВивести список усіх експортованих змінних та функцій.\n" +" \n" +" Аргумент `--' вимикає подальший аналіз параметрів.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та НАЗВИ." + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Робить змінні оболонки незмінними.\n" +" \n" +" Позначає кожну з НАЗВ як незмінну; після цього значення НАЗВИ не можуть\n" +" бути змінені призначенням. Якщо вказане ЗНАЧЕННЯ, воно призначається, " +"перш\n" +" ніж змінну буде позначено незмінною.\n" +" \n" +" Параметри:\n" +" -a\tПрацювати з індексованими масивами.\n" +" -A\tПрацювати з асоціативними масивами.\n" +" -f\tПрацювати з функціями оболонки.\n" +" -p\tВивести список всіх незмінних змінних та функцій, залежно від\n" +" того, чи вказано параметр -f.\n" +" \n" +" Аргумент `--' вимикає подальший аналіз параметрів.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та НАЗВИ." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Зсуває позиційні параметри.\n" +" \n" +" Перейменовує позиційні параметри $N+1,$N+2 ... у $1,$2 ... Якщо N не\n" +" вказане, береться 1.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо N менше за нуль чи більше за $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Виконує команди з файла у поточній оболонці.\n" +" \n" +" Читає та виконує команди з ФАЙЛУ у поточній оболонці. Елементи $PATH\n" +" використовуються при пошуку ФАЙЛУ. Якщо вказані АРГУМЕНТИ, вони стають\n" +" позиційними параметрами при запуску ФАЙЛУ.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої команди, виконаної у ФАЙЛІ, " +"або\n" +" помилку, якщо ФАЙЛ не вдалося прочитати." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Призупиняє виконання оболонки.\n" +" \n" +" Призупиняє виконання оболонки до отримання сигналу SIGCONT. Зазвичай,\n" +" оболонки сеансу не можуть бути призупинені.\n" +" \n" +" Параметри:\n" +" -f\tПризупинити, навіть якщо це оболонка сеансу.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо не ввімкнене керування завданнями чи\n" +" якщо трапиться помилка." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Перевіряє умовний вираз.\n" +" \n" +" Завершується з кодом 0 (істинний) чи 1 (хибний), залежно від\n" +" результату обчислення ВИРАЗУ. Вирази можуть бути унарними чи бінарними.\n" +" Унарні вирази часто використовуються для визначення властивостей " +"файлів.\n" +" Також є оператори для рядків та для порівняння чисел.\n" +" \n" +" Файлові оператори:\n" +" \n" +" -a файл Істинний, якщо файл існує.\n" +" -b файл Істинний, якщо файл є блоковим пристроєм.\n" +" -c файл Істинний, якщо файл є символьним пристроєм.\n" +" -d файл Істинний, якщо файл є каталогом.\n" +" -e файл Істинний, якщо файл існує.\n" +" -f файл Істинний, якщо файл існує та є звичайним файлом.\n" +" -g файл Істинний, якщо файл має встановлений біт `set-group-" +"id'.\n" +" -h файл Істинний, якщо файл є символічним посиланням.\n" +" -L файл Істинний, якщо файл є символічним посиланням.\n" +" -k файл Істинний, якщо файл має встановленим біт `sticky'.\n" +" -p файл Істинний, якщо файл є іменованим каналом.\n" +" -r файл Істинний, якщо ви можете читати файл.\n" +" -s файл Істинний, якщо файл існує і не є порожнім.\n" +" -S файл Істинний, якщо файл є сокетом.\n" +" -t дескриптор Істинний, якщо дескриптор відкритий у терміналі.\n" +" -u файл Істинний, якщо файл має встановлений біт `set-user-" +"id'.\n" +" -w файл Істинний, якщо ви можете записувати до файла.\n" +" -x файл Істинний, якщо ви можете виконати файл.\n" +" -O файл Істинний, якщо ви є власником файла.\n" +" -G файл Істинний, якщо ваша група є власником файла.\n" +" -N файл Істинний, якщо файл був змінений після останнього\n" +" читання\n" +" \n" +" файл1 -nt файл2 Істинний, якщо файл1 новіший за файл2 (за датою " +"зміни).\n" +" \n" +" файл1 -ot файл2 Істинний, якщо файл1 старіший за файл2.\n" +" \n" +" файл1 -ef файл2 Істинний, якщо файл1 є жорстким посиланням на файл2.\n" +" \n" +" Оператори з рядками:\n" +" \n" +" -z рядок Істинний, якщо рядок порожній.\n" +" \n" +" -n рядок\n" +" рядок Істинний, якщо рядок не порожній.\n" +" \n" +" рядок1 = рядок2\n" +" Істинний, якщо рядки однакові.\n" +" рядок1 != рядок2\n" +" Істинний, якщо рядки не однакові.\n" +" рядок1 < рядок2\n" +" Істинний, якщо при лексикографічному сортуванні рядок1\n" +" буде іти перед рядком\n" +" рядок1 > рядок2\n" +" Істинний, якщо при лексикографічному сортуванні рядок1\n" +" ітиме після рядка2.\n" +" \n" +" Інші оператори:\n" +" \n" +" -o параметр Істинний, якщо параметр оболонки ввімкнено.\n" +" -v ЗМІННА\t Істинний, якщо встановлено змінну середовища ЗМІННА\n" +" -R ЗМІННА\t Істинний, якщо встановлено змінну середовища ЗМІННА і ця " +"змінна є посиланням на назву.\n" +" ! вираз Істинний, якщо вираз хибний.\n" +" вираз1 -a вираз2 Істинний, якщо обидва вирази істинні.\n" +" вираз1 -o вираз2 Істинний, якщо хоч один з виразів істинний.\n" +" \n" +" аргумент1 ОПЕРАТОР аргумент2\n" +" Арифметичне порівняння. ОПЕРАТОР може бути: -eq, -ne,\n" +" -lt, -le, -gt, чи -ge.\n" +" \n" +" Арифметичні бінарні оператори істинні, якщо аргумент1 рівний, не " +"рівний,\n" +" менший, менший чи рівний, більший, чи більший чи рівний аргументу2.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо ВИРАЗ істинний; невдало, якщо " +"вказано\n" +" помилковий аргумент чи ВИРАЗ хибний." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Перевіряє умовний вираз.\n" +" \n" +" Це синонім до вбудованої команди \"test\", але на відміну від неї " +"останнім\n" +" аргументом має бути `]'." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Показує час виконання процесу.\n" +" \n" +" Виводить збірний час виконання оболонки та всіх її нащадків на рівні\n" +" користувача та на рівні системи.\n" +" \n" +" Код завершення:\n" +" Команда завжди успішна." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Перехоплює сигнали чи інші події.\n" +" \n" +" Визначає та активує обробники для отриманих оболонкою сигналів чи інших\n" +" подій.\n" +" \n" +" АРГУМЕНТ є командою, яку буде запущено оболонкою при отриманні\n" +" СИГНАЛУ(ІВ). Якщо АРГУМЕНТ не вказано (а СИГНАЛ вказано) або вказано\n" +" `-' як АРГУМЕНТ, кожен вказаний СИГНАЛ встановлюється у його\n" +" початковий стан. Якщо АРГУМЕНТ є порожнім рядком, СИГНАЛ(И) буде\n" +" ігноруватися оболонкою та запущеними з неї командами.\n" +" \n" +" Якщо СИГНАЛ є EXIT (0), АРГУМЕНТ буде виконано при виході з оболонки. " +"Якщо\n" +" СИГНАЛ є DEBUG, АРГУМЕНТ буде виконуватися перед кожною простою " +"командою.\n" +" \n" +" Якщо аргументи взагалі не вказано, trap покаже список команд,\n" +" призначених до сигналів.\n" +" \n" +" Параметри:\n" +" -l\tВивести список сигналів та їх номерів.\n" +" -p\tПоказати команди, призначені СИГНАЛАМ.\n" +" \n" +" Кожен з СИГНАЛІВ має бути або назвою сигналу з або номером\n" +" номером сигналу. Назви сигналів нечутливі до регістру літер, префікс " +"SIG\n" +" необов’язковий. Сигнал можна надіслати оболонці за допомогою\n" +" \"kill -signal $$\".\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні параметри та " +"СИГНАЛИ." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Показує тип команди.\n" +" \n" +" Для кожної НАЗВИ показує, як її буде оброблено як назву команди.\n" +" \n" +" Параметри:\n" +" -a\tПоказати усі можливі інтерпретації НАЗВИ; якщо не вказано\n" +" \tпараметр `-p', охоплює також псевдоніми, вбудовані команди, функції.\n" +" -f\tНе шукати серед функцій оболонки.\n" +" -P\tВиводити лише дискові команди, знайдені за PATH.\n" +" -p\tВивести лише назву файла на диску, або нічого.\n" +" -t\tВивести одне слово, що вказує тип — `alias', `keyword',\n" +" \t`function', `builtin', `file' чи `', якщо НАЗВА, відповідно, є\n" +" \tпсевдонімом, зарезервованим словом оболонки, функцією оболонки\n" +" \tвбудованою командою оболонки, файлом на диску чи не знайдене.\n" +" \n" +" Аргументи:\n" +" НАЗВА\tназва команди для інтерпретації.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо буде знайдено усі НАЗВИ; невдало, " +"якщо\n" +" хоч одне з них не вдасться знайти." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Змінює обмеження ресурсів оболонки.\n" +" \n" +" Дозволяє керувати доступними оболонці та створеним нею процесам " +"ресурсами,\n" +" якщо це підтримується системою.\n" +" \n" +" Параметри:\n" +" -S\tВикористовувати `soft' обмеження.\n" +" -H\tВикористовувати `hard' обмеження.\n" +" -a\tНадати звіт про поточні обмеження.\n" +" -b\tРозмір буфера сокетів.\n" +" -c\tМаксимальний розмір файла дампу пам’яті.\n" +" -d\tМаксимальний розмір сегменту даних процесу.\n" +" -e\tМаксимальний пріоритет виконання (`nice').\n" +" -f\tМаксимальний розмір файлів, записаних оболонкою та нащадками.\n" +" -i\tМаксимальна кількість сигналів, що очікують обробки.\n" +" -k\tМаксимальна кількість k-черг, визначених для цього процесу\n" +" -l\tМаксимальний розмір, який процес може заблокувати в пам’яті.\n" +" -m\tМаксимальний розмір резидентного набору.\n" +" -n\tМаксимальна кількість відкритих файлових дескрипторів.\n" +" -p\tРозмір буфера каналу.\n" +" -q\tМаксимальний розмір повідомлення у чергах повідомлень POSIX\n" +" \t(у байтах).\n" +" -r\tМаксимальний пріоритет виконання у реальному часі.\n" +" -s\tМаксимальний розмір стеку.\n" +" -t\tМаксимальний час використання процесору (у секундах).\n" +" -u\tМаксимальна кількість процесів користувача.\n" +" -v\tРозмір віртуальної пам’яті.\n" +" -x\tМаксимальна кількість блокувань файлів.\n" +" -T максимальна кількість потоків обобки\n" +" \n" +" Перелік доступних параметрів залежить від програмної платформи.\n" +" \n" +" Якщо вказане ОБМЕЖЕННЯ, воно встановлюється як нове значення обмеження\n" +" використання вказаного ресурсу; спеціальні значення ОБМЕЖЕННЯ `soft',\n" +" `hard', та `unlimited' означають, відповідно, поточне м’яке обмеження,\n" +" поточне жорстке обмеження та відсутність обмежень. Якщо ОБМЕЖЕННЯ не\n" +" вказане, виводиться поточне значення вказаного ресурсу. Якщо не вказано\n" +" жодного параметра, береться -f.\n" +" \n" +" Значення можуть змінюватися із кроком у 1024 байти, за винятком -t,\n" +" що вказується в секундах, -p, яке має крок 512 байтів та -u, що є\n" +" кількістю процесів без кроку.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи\n" +" трапилася помилка під час виконання." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Встановлює чи показує маску дозволів для файлів.\n" +" \n" +" Встановлює МАСКУ дозволів для створених файлів. Якщо МАСКУ не вказано,\n" +" виводить поточне значення маски.\n" +" \n" +" Якщо МАСКА починається з цифри, вона вважається вісімковим числом;\n" +" якщо ні — вона має бути рядком символьного режиму, подібним до того, що\n" +" використовується chmod(1).\n" +" \n" +" Параметри:\n" +" -p\tЯкщо МАСКУ не вказано, вивести її у формі, придатній для " +"виконання.\n" +" -S\tВиводити у символьному режимі; інакше виводиться вісімкове число.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильну МАСКУ та параметри." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Чекає завершення виконання завдання та повертає його код завершення.\n" +" \n" +" Очікує завершення роботи процесу, вказаного за ІДЕНТИФІКАТОРОМ, що може\n" +" бути ідентифікатором процесу чи завдання, та повертає його код " +"завершення.\n" +" Якщо ІДЕНТИФІКАТОР не вказано, очікує завершення усіх активних дочірніх\n" +" процесів та повертає код 0. Якщо ІДЕНТИФІКАТОР є завданням, очікує на\n" +" завершення усіх процесів у ланцюжку завдання.\n" +" \n" +" Якщо вказано параметр -n, очікує на завершення наступного завдання\n" +" і повертає його код завершення.\n" +" \n" +" Якщо вказано параметр -f і увімкнено керування завданнями, очікує на\n" +" вказаний ідентифікатор для переривання, замість очікування на зміну\n" +" його стану.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення вказаного завдання; помилку, якщо " +"вказано\n" +" неправильні параметри чи ІДЕНТИФІКАТОР." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Очікує на завершення роботи процесу та повертає його код завершення.\n" +" \n" +" Очікує, поки завершиться вказаний процес, та доповідає про його " +"успішність.\n" +" Якщо ІДЕНТИФІКАТОР-ПРОЦЕСУ не вказаний, очікує завершення усіх дочірніх\n" +" процесів й завершується з кодом 0. ІДЕНТИФІКАТОР має бути " +"ідентифікатором\n" +" процесу.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення процесу з останнім вказаним " +"ідентифікатором.\n" +" Повертає код помилки, якщо вказано неправильний ІДЕНТИФІКАТОР чи " +"параметр." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Виконати команди для кожного з пунктів списку.\n" +" \n" +" Цикл `for' виконує послідовність команд для кожного елементу списку.\n" +" Якщо `in СЛОВА ...;' не вказано, тоді береться `in \"$@\"'. НАЗВА\n" +" послідовно встановлюється у кожне зі СЛІВ, потім виконуються КОМАНДИ.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Арифметичний цикл.\n" +" \n" +" Те ж саме, що й\n" +" \t(( ВИРАЗ1 ))\n" +" \twhile (( ВИРАЗ2 )); do\n" +" \t\tКОМАНДИ\n" +" \t\t(( ВИРАЗ3 ))\n" +" \tdone\n" +" ВИРАЗИ мають бути арифметичними виразами. Якщо будь-який з них не\n" +" вказаний, цикл поводиться, як ніби його результатом є 1.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Пропонує вибрати слово та виконує відповідні команди.\n" +" \n" +" СЛОВА розгортаються, утворюючи список слів. Отриманий список слів\n" +" виводиться пронумерованим до стандартного виводу помилок. Якщо `in " +"СЛОВА'\n" +" не вказано, береться `in \"$@\"'. Тоді виводиться запрошення PS3 та зі\n" +" стандартного вводу зчитується рядок. Якщо цей рядок є числом, що вказує\n" +" номер одного зі слів, НАЗВА встановлюється у це слово. Якщо рядок " +"порожній,\n" +" СЛОВА та запрошення виводяться знов. Якщо прочитано кінець файла, " +"команда\n" +" завершується. Якщо рядок містить щось інше, НАЗВІ призначається " +"порожній\n" +" рядок. Прочитаний рядок зберігається у змінній REPLY. Після кожного\n" +" зчитування виконуються КОМАНДИ. Команда продовжує виконання доки не\n" +" буде викликано команду break.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Доповідає про час виконання ланцюжка команд.\n" +" \n" +" Виконує ЛАНЦЮЖОК та, по його завершенні, друкує звіт про час процесора,\n" +" витрачений користувачем, системою та сумарно на виконання ЛАНЦЮЖКА.\n" +" \n" +" Параметри:\n" +" -p\tДрукує звіт у форматі, що відповідає стандарту POSIX.\n" +" \n" +" Час виводиться у форматі, вказаному у змінній TIMEFORMAT.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення ЛАНЦЮЖКА-КОМАНД." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Вибірково виконує команди відповідно до шаблону.\n" +" \n" +" Вибірково виконує КОМАНДИ, залежно від відповідності СЛОВА ШАБЛОНУ.\n" +" Декілька шаблонів можуть бути вказані через `|'.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Виконує команди відповідно до умови.\n" +" \n" +" КОМАНДИ з `if КОМАНДИ' виконуються, і якщо їх код завершення нульовий,\n" +" виконуються КОМАНДИ з `then КОМАНДИ'. Інакше в свою чергу виконуються\n" +" команди з `elif КОМАНДИ', і якщо їх код завершення нульовий, " +"виконуються\n" +" КОМАНДИ з відповідного `then КОМАНДИ'. Інакше виконуються КОМАНДИ з\n" +" `else КОМАНДИ'. Блоки elif та else не обов’язкові.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди або нуль,\n" +" якщо жодна з перевірених умов не була істинною." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Циклічно виконує команди поки виконується умова.\n" +" \n" +" Виконуватиме КОМАНДИ, поки остання команда з КОМАНД у `while'\n" +" не завершиться невдало.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Виконує команди доки умову не буде виконано.\n" +" \n" +" Виконуватиме КОМАНДИ, поки остання команда з КОМАНД у `until'\n" +" не завершиться успішно.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +# WTF? How can it return exit code of _asynchronous_ process... +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Створює співпроцес з назвою НАЗВА.\n" +" \n" +" Починає асинхронне виконання КОМАНДИ, під’єднавши її стандартний ввід " +"та\n" +" вивід через канали до файлових дескрипторів, які присвоюються елементам " +"0\n" +" та 1 змінної-масиву НАЗВА.\n" +" Стандартна назва змінної — \"COPROC\".\n" +" \n" +" Код завершення:\n" +" Команда coproc повертає стан виходу 0." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Описує функцію оболонки.\n" +" \n" +" Створює функцію оболонки з назвою НАЗВА. Функція запускається як " +"звичайна\n" +" команда з назвою НАЗВА та послідовно виконує КОМАНДИ. Аргументи до " +"команди\n" +" призначаються на час виконання змінним $1...$n, а назва функції — " +"змінній\n" +" $FUNCNAME.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо НАЗВА є незмінною." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Групує команди в один блок.\n" +" \n" +" Виконує згрупований набір команд. Це один з методів перенаправлення " +"виводу\n" +" групи команд.\n" +" \n" +" Код завершення:\n" +" Конструкція повертає код завершення останньої виконаної команди." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Продовжує виконання завдання на передньому плані.\n" +" \n" +" Продовжує на передньому плані виконання призупиненого чи фонового\n" +" завдання, як це робить команда `fg'. ЗАВДАННЯ може бути назвою чи " +"номером\n" +" завдання. Якщо після ЗАВДАННЯ вказано `&', завдання продовжує виконання " +"у\n" +" фоні, тобто команда має ефект команди `bg'.\n" +" \n" +" Код завершення:\n" +" Команда повертає статус продовженого завдання." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Обчислює арифметичний вираз.\n" +" \n" +" Обчислює ВИРАЗ відповідно до правил арифметичного розкриття. Те ж саме,\n" +" що й \"let ВИРАЗ\".\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо результат обчислення ненульовий." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Виконує умовну команду.\n" +" \n" +" Повертає статус 0 чи 1, в залежності від результату обчислення умовного\n" +" ВИРАЗУ. Вирази складаються з тих самих складових, що використовуються у\n" +" вбудованій команді `test', але можуть також комбінуватися за допомогою:\n" +" \n" +" ( ВИРАЗ )\t\tПовертає значення ВИРАЗУ.\n" +" ! ВИРАЗ\t\tІстинний, якщо ВИРАЗ хибний.\n" +" ВИРАЗ1 && ВИРАЗ2\tІстинний, якщо обидва ВИРАЗИ істинні.\n" +" ВИРАЗ1 || ВИРАЗ2\tІстинний, якщо хоч один з ВИРАЗІВ істинний.\n" +" \n" +" Якщо застосовуються оператори `==' та `!=', рядок з правої сторони\n" +" вважається шаблоном, й проводиться перевірка на відповідність цьому\n" +" шаблону. При застосуванні `=~' рядок зліва вважається регулярним\n" +" виразом, відносно якого перевіряється правий рядок.\n" +" \n" +" Оператори && та || не обчислюють ВИРАЗ2, якщо ВИРАЗУ1 достатньо для\n" +" визначення результату.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо ВИРАЗ істинний." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Загальні назви змінних оболонки та їхнє використання.\n" +" \n" +" BASH_VERSION\tІнформація щодо версії Bash.\n" +" CDPATH\tРозділений двокрапкою список каталогів, у яких оболонка буде\n" +" \t\tшукати каталоги, вказані команді `cd'.\n" +" GLOBIGNORE\tРозділений двокрапкою список шаблонів назв файлів, які " +"будуть\n" +" \t\tігноруватися під час розкриття шляхів.\n" +" HISTFILE\tНазва файла, де зберігається історія команд.\n" +" HISTFILESIZE\tНайбільша дозволена кількість записів у файлі журналу.\n" +" HISTSIZE\tНайбільша кількість записів, які може використовувати\n" +" \t\tпоточна оболонка.\n" +" HOME\tПовний шлях до вашої домівки.\n" +" HOSTNAME\tНазва поточної машини.\n" +" HOSTTYPE\tТип процесора, на якому виконується оболонка.\n" +" IGNOREEOF\tВизначає реакцію оболонки на символ кінця файла на вводі.\n" +" \t\tЯкщо змінна визначена, її значення є кількістю таких символів,\n" +" \t\tщо можуть бути отримані під ряд й бути проігнорованими. Звичайне\n" +" \t\tзначення — 10. Якщо змінна не визначена, символ кінця файла\n" +" \t\tозначатиме кінець вводу.\n" +" MACHTYPE\tРядок, що описує поточну систему, на якій виконується Bash.\n" +" MAILCHECK\tВизначає частоту перевірки пошти оболонкою.\n" +" MAILPATH\tРозділений двокрапкою список файлів, які оболонка буде\n" +" \t\tперевіряти на наявність нової пошти.\n" +" OSTYPE\tВаріант Unix, на якому виконується оболонка.\n" +" PATH\tРозділений двокрапкою список каталогів, де оболонка шукатиме\n" +" \t\tвиконувані файли команд.\n" +" PROMPT_COMMAND\tКоманда, яку оболонка буде виконувати перш ніж вивести\n" +" \t\tосновне запрошення вводу.\n" +" PS1\t\tРядок основного запрошення вводу.\n" +" PS2\t\tРядок вторинного запрошення вводу.\n" +" PWD\t\tПовний шлях до поточного каталогу.\n" +" SHELLOPTS\tРозділений двокрапкою список увімкнених параметрів оболонки.\n" +" TERM\tТип поточного термінала.\n" +" TIMEFORMAT\tФормат виводу часу командою `time'.\n" +" auto_resume\tЯкщо встановлена, введені команди, що складаються з\n" +" \t\tодного слова, спочатку будуть шукатися у списку поточних\n" +" \t\tпризупинених завдань. Якщо таке завдання буде знайдене, йому буде\n" +" \t\tнадано пріоритет. Значення цієї змінної `exact' означає,\n" +" \t\tщо слово має точно відповідати команді у списку завдань. Значення\n" +" \t\t`substring' означає, що слово має міститися у команді завдання.\n" +" \t\tБудь-яке інше значення означає, що команда завдання має\n" +" \t\tпочинатися з вказаного слова.\n" +" histchars\tСимволи, що використовуються для розкриття журналу та\n" +" \t\tшвидкої заміни. Перший символ є символом підставляння журналу,\n" +" \t\tзазвичай це `!'. Другий — символ «швидкої заміни», зазичай `^'.\n" +" \t\tТретій — символ «коментаря журналу», зазвичай це `#'.\n" +" HISTIGNORE\tРозділений двокрапкою список шаблонів, що використовуються\n" +" \t\tпри визначенні, чи зберігати команду у списку журналу.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Додає каталоги до списку збережених каталогів.\n" +" \n" +" Додає каталог на вершину стеку каталогів, чи циклічно обертає\n" +" стек, встановлюючи поточний робочий каталог відповідно до його нової\n" +" вершини. Без аргументів міняє місцями дві найвищих каталоги.\n" +" \n" +" Параметри:\n" +" -n\tНе робити звичайного переходу у новий каталог при додаванні\n" +" \t\tкаталогів до стеку, проводити операції лише над стеком.\n" +" \n" +" Аргументи:\n" +" +N\tЦиклічно обертає стек так, щоб N-ний каталог, рахуючи\n" +" \t\tзліва (починаючи з нуля) у списку, що виводиться командою `dirs'\n" +" \t\tопинилася на вершині стеку.\n" +" \n" +" -N\tЦиклічно обертає стек так, щоб N-ний каталог, рахуючи\n" +" \t\tз кінця (починаючи з нуля) у списку, що виводиться командою `dirs'\n" +" \t\tопинився на вершині стеку.\n" +" \n" +" КАТАЛОГ\tДодає КАТАЛОГ на вершину стеку і робить його поточним\n" +" \t\t\tробочим каталогом.\n" +" \n" +" Вбудована команда `dirs' показує стек каталогів.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказаний неправильний аргумент чи\n" +" якщо не вдалося змінити поточну каталог." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Вилучає каталоги зі списку збережених каталогів.\n" +" \n" +" Вилучає каталоги зі стеку збережених каталогів. Якщо аргументи не\n" +" вказані, вилучає верхній каталог стеку і змінює поточний каталог\n" +" відповідно до нової вершини стеку.\n" +" \n" +" Параметри:\n" +" -n\tНе виконувати звичайного переходу до нового каталогу при " +"вилученні\n" +" \t\tкаталогів зі стеку, проводити операції лише над стеком.\n" +" \n" +" Аргументи:\n" +" +N\tВилучає N-ний зліва каталог у списку, що показується командою\n" +" \t\t`dirs' (відлік починається з нуля). Приклад: `popd +0' вилучає\n" +" \t\tперший каталог, `popd +1' — другий.\n" +" \n" +" -N\tВилучає N-ний з кінця каталог у списку, що показується\n" +" \t\tкомандою `dirs' (відлік починається з нуля). Приклад: `popd -0'\n" +" \t\tвилучає останній каталог, `popd -1' — передостанній.\n" +" \n" +" Вбудована команда `dirs' показує список збережених каталогів.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано помилковий аргумент чи якщо\n" +" не вдалося змінити поточний каталог." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Показує список збережених каталогів.\n" +" \n" +" Показує список збережених каталогів. Каталоги додаються до цього списку\n" +" командою `pushd'; ви можете повернутися назад по цьому списку за " +"допомогою\n" +" команди `popd'.\n" +" \n" +" Параметри:\n" +" -c\tСпорожнити список каталогів, вилучивши усі його елементи.\n" +" -l\tНе використовувати ~ при виводі каталогів, що знаходяться\n" +" \t\tусередині вашої домівки.\n" +" -p\tВиводити каталоги по одній на рядок.\n" +" -v\tВиводити каталоги по одній на рядок із вказанням позиції у\n" +" \t\tсписку.\n" +" \n" +" Аргументи:\n" +" +N\tПоказує N-ний зліва каталог у списку, що виводиться командою\n" +" \t\tdirs без аргументів, відлік починається з нуля.\n" +" \n" +" -N\tПоказує N-ний з кінця каталог у списку, що виводиться\n" +" \t\tкомандою dirs без аргументів, відлік починається з нуля. \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи " +"якщо\n" +" трапиться помилка." + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Встановлює та скидає параметри оболонки.\n" +" \n" +" Змінює значення ПАРАМЕТРІВ. Якщо аргументи ПАРАМЕТРИ не вказані, " +"виводить\n" +" список усіх вказаних параметрів оболонки. Якщо ж параметрів не вказано,\n" +" виводить список усіх параметрів, вказуючи, чи параметр ввімкнений, чи " +"ні.\n" +" \n" +" Параметри:\n" +" -o\tПриймати лише ПАРАМЕТРИ, з якими працює `set -o'.\n" +" -p\tВивести список параметрів оболонки та їх поточний стан.\n" +" -q\tНе виводити нічого.\n" +" -s\tВвімкнути (встановити) кожен з ПАРАМЕТРІВ.\n" +" -u\tВимкнути (скинути) кожен з ПАРАМЕТРІВ.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо ПАРАМЕТР ввімкнено; невдало, якщо\n" +" вказано неправильні параметри чи ПАРАМЕТР вимкнено." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Форматує та виводить аргументи відповідно до шаблону ФОРМАТ.\n" +" \n" +" Параметри:\n" +" -v змінна\tПризначити результат змінній оболонки, замість\n" +" \t\tвиведення його до стандартного виводу.\n" +" \n" +" ШАБЛОН складається з символів, які можуть належати до трьох типів:\n" +" звичайні символи, які просто копіюються у вивід; спеціальні\n" +" послідовності, які інтерпретуються, а потім копіюються у вивід; та\n" +" вказівки форматування, замість кожної з яких підставляється відповідний\n" +" аргумент.\n" +" \n" +" Окрім стандартних вказівок форматування, описаних у printf(1)б\n" +" printf також розуміє:\n" +" \n" +" %b\tІнтерпретувати спеціальні послідовності (що починаються зі\n" +" \t\tзворотної похилої риски) у відповідному аргументі.\n" +" %q\tВзяти аргумент в лапки так, щоб його можна було використати як\n" +" \t\tввід оболонки\n" +" %(формат)T – вивести рядок дати і часу з використанням ФОРМАТУ\n" +" для форматування даних strftime(3)\n" +" \n" +" Визначене форматування використовується так, щоб було оброблено усі " +"аргументи.\n" +" Якщо аргументів виявиться менше за кількість визначених форматів, для " +"зайвих\n" +" специфікаторів форматів буде використано нульові значення або порожні " +"рядки, залежно від типу форматування.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало лише якщо вказано неправильний параметр " +"або\n" +" якщо трапиться помилка запису чи присвоєння." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Вказує, як буде завершувати аргументи readline.\n" +" \n" +" Визначає як завершувати аргументи для НАЗВ. Якщо параметри не вказано,\n" +" буде виведено поточні вказівки завершення аргументів у формі,\n" +" придатній для подальшого виконання.\n" +" \n" +" Параметри:\n" +" -p\tВивести вказівки доповнення у формі, придатній до виконання.\n" +" -r\tВилучити вказівки доповнення аргументів для НАЗВ (або, якщо\n" +" \t\tНАЗВ не вказано, усі вказівки завершення).\n" +" -D\tзастосувати доповнення та дії як типові для команд\n" +" \tбез визначених вказівок щодо доповнення.\n" +" -E\tзастосувати доповнення та дії до «порожніх» команд, спроби --\n" +" \tзавершення на порожньому рядку.\n" +" -I\tзастосовувати доповнення та дій до початкового слова\n" +" \t\t(зазвичай, команди)\n" +" \n" +" Якщо виконується спроба доповнення, дії виконуються у порядку, в якому\n" +" вказані наведені вище параметри у верхньому регістрі. Якщо вказано\n" +" декілька параметрів, параметр -D має пріоритет над параметром -E,\n" +" а обидва ці параметри мають пріоритет над параметром -I.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та не\n" +" трапиться помилки під час виконання." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Показати можливі завершення залежно від параметрів.\n" +" \n" +" Команда призначена для використання зсередини функції для генерації\n" +" можливих завершень. Якщо вказано необов’язковий аргумент СЛОВО,\n" +" генеруються завершення, що відповідають цьому слову.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри і не\n" +" трапиться помилки під час виконання." + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Змінює чи показує параметри завершення аргументів.\n" +" \n" +" Змінює параметри завершення аргументів для НАЗВ (якщо НАЗВИ не вказано,\n" +" для завершення, що наразі виконується). Якщо ПАРАМЕТРИ не вказані,\n" +" виводить параметри завершення для кожної з НАЗВ (чи завершення, що\n" +" наразі виконується).\n" +" \n" +" Параметри:\n" +" \t-o параметр\tУвімкнути параметр завершення для всіх НАЗВ.\n" +" \t-D\t\tЗмінити параметри для доповнення \"типових\" команд\n" +" \t-E\t\tЗмінити параметри для доповнення \"порожніх\" команд\n" +" \t-I\t\tЗмінити параметри для доповнення за початковим словом\n" +" \n" +" Параметри можна вимикати, використовуючи `+o' замість `-o'.\n" +" \n" +" Аргументи:\n" +" \n" +" Кожна з НАЗВ відповідає команді, для якої попередньо має бути вказано,\n" +" як завершувати її аргументи за допомогою вбудованої команди `complete'.\n" +" Якщо НАЗВ не вказано, compopt має виконуватися усередині функції, що\n" +" генерує список завершень, тоді змінюються параметрі вказівки завершень,\n" +" що відповідає цій функції.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та\n" +" вказівки завершень для НАЗВ існують." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Читає рядки зі стандартного вводу й заносить їх до масиву.\n" +" \n" +" Читає рядки зі стандартного вводу чи з ФАЙЛОВОГО-ДЕСКРИПТОРА, якщо " +"вказано\n" +" параметр -u, і вставляє їх до вказаної змінної-масиву. Якщо назву " +"змінної\n" +" не вказано, використовується змінна MAPFILE.\n" +" \n" +" Параметри:\n" +" -d роздільник\tВикористати для поділу на рядки вказаний роздільник, а " +"не\n" +" символ розриву рядка\n" +" -n кількість\tПрочитати вказану кількість рядків. Нуль означає\n" +" \t\t\t«без обмежень».\n" +" -O початок\tПочати вставляти до масиву з вказаного\n" +" \t\t\tелемента масиву. Зазвичай відлік починається з нуля.\n" +" -s кількість\tПропустити вказану кількість рядків на початку\n" +" \t\t\tфайла.\n" +" -t\t\tПрибирати символ переведення рядку в кінці прочитаних\n" +" \t\t\tз файла рядків.\n" +" -u дескриптор\tЧитати рядки з вказаного дескриптора замість\n" +" \t\t\tстандартного вводу\n" +" -C обробник\tВиконувати вказаний обробник після прочитання рядка.\n" +" -c крок\t\tВикликати обробник лише після того, як буде прочитано\n" +" \t\t\tвказану кількість рядків.\n" +" \n" +" Аргументи:\n" +" МАСИВ\t\tНазва змінної-масиву для збереження даних з файла.\n" +" \n" +" Якщо вказано лише -C, без -c, обробник викликатиметься із кроком 5000.\n" +" Обробник викликається із параметром, що вказує наступний елемент " +"масиву,\n" +" якому буде призначено значення.\n" +" \n" +" Якщо початковий елемент не вказано, mapfile спорожнить МАСИВ, перш ніж\n" +" починати присвоєння.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало лише якщо вказано неправильний параметр " +"або\n" +" якщо МАСИВ є незмінним." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Читає рядки з файла до масиву.\n" +" \n" +" Синонім до `mapfile'." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Повертає контекст поточної підпрограми.\n" +#~ " \n" +#~ " Якщо EXPR не вказано, повертає " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: процес %5ld (%s) у the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Невідомий сигнал №" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "© Free Software Foundation, Inc., 2018" + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "© Free Software Foundation, Inc., 2014" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "© Free Software Foundation, Inc., 2009\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Ліцензія GPLv2+: GNU GPL версія 2 чи новіша \n" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: не вдається змінити розмір виділеного блоку до %lu байтів " +#~ "(виділено %lu байтів)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: не вдається виділити %lu байтів" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: %s:%d: не вдається змінити розмір виділеного блоку до %lu " +#~ "байтів (виділено %lu байтів)" diff --git a/bash-5.1/po/vi.gmo b/bash-5.1/po/vi.gmo new file mode 100644 index 0000000000000000000000000000000000000000..256ec8eef76f2becb3b0613248fa51d17a504df8 Binary files /dev/null and b/bash-5.1/po/vi.gmo differ diff --git a/bash-5.1/po/vi.po b/bash-5.1/po/vi.po new file mode 100644 index 0000000000000000000000000000000000000000..583c7050a28666550ec67d68d1afa4bac501d783 --- /dev/null +++ b/bash-5.1/po/vi.po @@ -0,0 +1,5841 @@ +# Vietnamese translation for BASH (Bourne Again SHell). +# Bản dịch tiếng Việt dành cho bash. +# Copyright © 2015 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Clytie Siddall , 2008, 2009, 2010. +# Nguyễn Thái Ngọc Duy , 2012. +# Trần Ngọc Quân , 2012-2014, 2015. +# +msgid "" +msgstr "" +"Project-Id-Version: bash 4.4-beta1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2015-10-18 07:47+0700\n" +"Last-Translator: Trần Ngọc Quân \n" +"Language-Team: Vietnamese \n" +"Language: vi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Gtranslator 2.91.7\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "sai chỉ số mảng" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: không thể chuyển đổi mảng kiểu chỉ số sang mảng kết hợp" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: khóa mảng liên kết không hợp lệ" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: không thể gán cho chỉ số không thuộc kiểu số" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: phải sử dụng chỉ số phụ khi gán mảng kết hợp" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: không thể tạo: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: không tìm thấy ánh xạ phím (keymap) cho câu lệnh" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: ký tự khác khoảng trắng đầu tiên không phải là “\"”" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "thiếu dấu đóng “%c” trong %s" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: thiếu dấu hai chấm phân cách" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "“%s”: không thể tháo" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "khai triển ngoặc ôm: không thể phân bổ bộ nhớ cho %s" + +#: braces.c:406 +#, fuzzy, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "khai triển ngoặc ôm: gặp lỗi khi phân bổ bộ nhớ cho “%d” phần tử" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "khai triển ngoặc ôm: gặp lỗi khi phân bổ bộ nhớ cho “%s”" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "“%s”: tên bí danh không hợp lệ" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "chưa bật sửa đổi dòng" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "“%s”: tên sơ đồ phím không hợp lệ" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: không thể đọc: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "“%s”: không hiểu tên hàm" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s không được ràng buộc với bất kỳ phím nào.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s có thể được gọi thông qua " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "“%s”: không thể tháo" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "đếm vòng" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "chỉ có nghĩa trong vòng lặp “for”, “while” hay “until”" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"Trả về ngữ cảnh của lệnh gọi hàm hiện thời.\n" +"\n" +" Không có BTHỨC thì trả lại \"$line $filename\". Có BTHỨC thì trả\n" +" lại \"$line $subroutine $filename\"; thông tin bổ sung này có thể\n" +" được dùng để cung cấp stack trace.\n" +"\n" +" Giá trị của BTHỨC thì ngụ ý bao nhiêu lần gọi cần lùi lại đằng\n" +" trước lệnh gọi hiện tại; khung gọi đầu là khung 0.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại 0 trừ khi hệ vỏ đang chạy hàm hệ vỏ, BTHỨC cũng hợp lệ." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "Chưa đặt biến môi trường HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "quá nhiều đối số" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "không có thư mục khác" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "Chưa đặt biến môi trường OLDPWD" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "dòng %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "cảnh báo: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: cách dùng: " + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: tùy chọn cần một đối số" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: cần đối số thuộc kiểu số" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: không tìm thấy" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s: tùy chọn không hợp lệ" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: tên tùy chọn không hợp lệ" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "“%s”: không phải là định danh hợp lệ" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "số bát phân không hợp lệ" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "số thập lục không hợp lệ" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "số không hợp lệ" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: sai đặc tả tín hiệu" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "“%s”: không phải một pid hoặc đặc tả công việc hợp lệ" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: biến chỉ đọc" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s nằm ngoài phạm vi" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "đối số" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s nằm ngoài phạm vi" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s: không có công việc như vậy" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s: không có điều khiển công việc" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "không có điều khiển công việc" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s: bị hạn chế" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "bị hạn chế" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: không phải là lệnh tích hợp trong hệ vỏ" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "lỗi ghi: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "lỗi đặt các thuộc tính thiết bị cuối: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "lỗi lấy các thuộc tính thiết bị cuối: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: lỗi lấy thư mục hiện thời: %s: %s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: đặc tả công việc chưa rõ ràng" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "trợ giúp không sẵn có ở phiên bản này" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: không thể hủy đặt: %s chỉ đọc" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: không thể hủy đặt" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: tên hành động không hợp lệ" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: không có đặc tả tự hoàn thiện" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "cảnh báo: tùy chọn “-F” có thể không hoạt động như mong đợi" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "cảnh báo: tùy chọn “-C” có thể không hoạt động như bạn mong đợi" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "hiện thời không thực thi chức năng tự hoàn thiện" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "chỉ có thể dùng trong một hàm" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: biến tham chiếu không thể là một mảng" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: biến nameref tự tham chiếu là không được phép" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: tên tham chiếu quẩn tròn" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "%s: tên biến không hợp lệ cho một tham chiếu tên" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "không thể dùng “-f” để tạo hàm" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: hàm chỉ đọc" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: gán mảng phức hợp được trích dẫn đã lạc hậu" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: không thể hủy biến mảng bằng cách này" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: không thể chuyển đổi mảng kết hợp sang mảng chỉ số" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "không có chức năng nạp động" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "không thể mở đối tượng dùng chung %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "không tìm thấy %s trong đối tượng dùng chung %s: %s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s không được tải động" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "tải hàm cho %s trả về lỗi nghiêm trọng (%d): nên không được tải" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s không được tải động" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: không thể xóa: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: là thư mục" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: không phải là tập tin thường" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: tập tin quá lớn" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: không thể thực hiện tập tin nhị phân" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: không thể thực thi: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "đăng xuất\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "không phải hệ vỏ đăng nhập: hãy dùng lệnh “exit”" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Có công việc bị dừng.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Có công việc đang chạy.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "không tìm thấy lệnh" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "đặc tả lịch sử" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: không thể mở tập tin tạm: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "hiện tại" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "công việc %d đã khởi chạy mà không có điều khiển công việc" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: tùy chọn không được phép -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: tùy chọn cần đối số -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "tắt băm" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: bảng băm rỗng\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "gợi ý\tlệnh\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Câu lệnh hệ vỏ tương ứng với từ khóa “" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"không có trợ giúp cho “%s”. Hãy chạy lệnh “help help” hoặc “man -k %s” hay " +"“info %s”." + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: không thể mở: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"Những câu lệnh này được định nghĩa nội bộ. Gõ lệnh “help” để xem danh sách " +"này.\n" +"Gõ “help TÊN” để biết chi tiết về hàm “TÊN”.\n" +"Dùng “info bash” để tìm thông tin chung về hệ vỏ nói chung.\n" +"Dùng “man -k” hoặc “info” để tìm thông tin về lệnh ngoài danh sách này.\n" +"\n" +"Dấu sao (*) bên cạnh tên nghĩa là lệnh bị tắt.\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "chỉ có thể dùng một của những tùy chọn -anrw" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "vị trí lịch sử" + +#: builtins/history.def:340 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: đối số không hợp lệ" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: gặp lỗi khi khai triển lịch sử" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib bị lỗi" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "không cho phép dùng tùy chọn thêm với “-x”" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: đối số phải là ID tiến trình hoặc công việc" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Lỗi không rõ" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "cần biểu thức" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: không phải là mảng chỉ số" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: đặc tả bộ mô tả tập tin không hợp lệ" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: bộ mô tả tập tin không hợp lệ: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: sai số lượng dòng" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: gốc mảng không hợp lệ" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: lượng gọi ngược không hợp lệ" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "tên biến mảng vẫn trống" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "cần hỗ trợ biến mảng" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "“%s”: thiếu ký tự định dạng" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "“%c”: đặc tả định dạng thời gian không đúng" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "“%c”: ký tự định dạng không hợp lệ" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "cảnh báo: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "vấn đề phân tích cú pháp định dạng: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "thiếu chữ số thập lục phân cho \\x" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "thiếu chữ số unicode cho \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "không có thư mục khác" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: đối số không hợp lệ" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "ngăn xếp thư mục trống" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "chỉ số ngăn xếp thư mục" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"Hiển thị danh sách các thư mục được nhớ hiện thời. Lệnh “pushd” thêm\n" +" thư mục vào danh sách này. “popd” lấy thư mục khỏi danh sách.\n" +"\n" +" Tùy chọn:\n" +" -c\txóa mọi phần tử trong ngăn xếp thư mục\n" +" -l\tkhông in phiên bản thư mục có dấu ngã nằm trước\n" +" \tmà tương ứng với thư mục chính của người dùng\n" +" -p\tin ngăn xếp thư mục mỗi dòng một mục\n" +" -v\tin ngăn xếp thư mục mỗi dòng một mục kèm vị trí trong ngăn xếp\n" +"\n" +" Đối số:\n" +" +N\thiển thị mục thứ N đếm từ bên trái khi gọi không tùy chọn,\n" +" bắt đầu từ số không.\n" +"\n" +" -N\thiển thị mục thứ N đếm từ bên phải khi gọi không tùy chọn,\n" +" bắt đầu từ số không." + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Thêm thư mục vào trên ngăn xếp thư mục, hoặc xoay ngăn xếp, làm cho thư mục\n" +" hiện thời nằm ở trên đầu. Đổi vị trí hai thư mục trên cùng nếu\n" +" không có đối số.\n" +"\n" +" Tùy chọn:\n" +" -n\tngăn thay đổi thư mục bình thường khi thêm, chỉ thao tác\n" +" \ttrên ngăn xếp thư mục.\n" +"\n" +" Đối số:\n" +" +N\txoay ngăn xếp để thư mục thứ N (đếm từ bên trái “dirs”, bắt\n" +" \tđầu từ số không) nằm ở đầu.\n" +"\n" +" -N\txoay ngăn xếp để thư mục thứ N (đếm từ bên phải “dirs”, bắt\n" +" \tđầu từ số không) nằm ở đầu.\n" +"\n" +" THƯ-MỤC\tthêm THƯ-MỤC vào đầu ngăn xếp thư mục và dùng làm thư mục\n" +" \tlàm việc hiện thời.\n" +"\n" +" Lệnh “dirs” hiển thị ngăn xếp thư mục." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"Gỡ bỏ thư mục khỏi ngăn xếp thư mục. Không đưa ra đối số thì bỏ thư mục\n" +" đầu khỏi ngăn xếp và chuyển đổi sang thư mục đầu mới.\n" +"\n" +" Tùy chọn:\n" +" -n\tngăn thay đổi thư mục bình thường khi thêm, chỉ thao tác\n" +"\t\ttrên ngăn xếp thư mục.\n" +"\n" +" Đối số:\n" +" +N\txoay ngăn xếp để thư mục thứ N (đếm từ bên trái “dirs”. bắt\n" +" \tđầu từ số không) nằm ở đầu. Ví dụ “popd +0” bỏ thư mục\n" +" đầu tiên, “popd +1” bỏ thư mục thứ hai.\n" +"\n" +" -N\txoay ngăn xếp để thư mục thứ N (đếm từ bên phải “dirs”. bắt\n" +" \tđầu từ số không) nằm ở đầu. Ví dụ “popd -0” bỏ thư mục\n" +" cuối cùng, “popd -1” bỏ thư mục kế cuối.\n" +"\n" +" Lệnh “dirs” hiển thị ngăn xếp thư mục." + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: sai đặc tả thời gian chờ tối đa" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "lỗi đọc: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "chỉ có thể “return” từ một hàm hoặc văn lệnh được “source”" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "không thể hủy đặt đồng thời một hàm VÀ một biến" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: không phải biến mảng" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: không phải hàm" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: không thể xuất" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "số lượng dịch" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "không thể đồng thời đặt và hủy đặt các tùy chọn hệ vỏ" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: tên tùy chọn hệ vỏ không hợp lệ" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "cần đối số tên tập tin" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: không tìm thấy tập tin" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "không thể ngưng" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "không thể ngưng hệ vỏ đăng nhập" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s là bí danh của “%s”\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s là từ khóa của hệ vỏ\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s là một hàm\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s là lệnh tích hợp đặc biệt của hệ vỏ\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s là lệnh tích hợp hệ vỏ\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s là %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s được băm (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: đối số giới hạn không hợp lệ" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "“%c”: câu lệnh sai" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: không thể lấy giới hạn: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "giới hạn" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: không thể sửa đổi giới hạn: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "số bát phân" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "“%c”: toán tử chế độ ký hiệu không hợp lệ" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "“%c”: ký tự chế độ ký hiệu không hợp lệ" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " dòng " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "lệnh cuối: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Hủy bỏ…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "THBÁO:" + +#: error.c:462 +msgid "unknown command error" +msgstr "lỗi lệnh không rõ" + +#: error.c:463 +msgid "bad command type" +msgstr "kiểu lệnh sai" + +#: error.c:464 +msgid "bad connector" +msgstr "bộ kết nối sai" + +#: error.c:465 +msgid "bad jump" +msgstr "nhảy sai" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: biến chưa liên kết" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aquá thời hạn đợi dữ liệu nhập: tự động đăng xuất\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "không thể chuyển hướng đầu vào chuẩn từ /dev/null: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "ĐỊNH DẠNG THỜI GIAN: “%c”: ký tự định dạng không hợp lệ" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "lỗi ống dẫn" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: vượt quá mức độ eval lồng nhau tối đa (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: vượt quá mức độ nguồn lồng nhau tối đa (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: vượt quá mức độ các hàm lồng nhau tối đa (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: bị hạn chế: không thể dùng “/” trong tên lệnh" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s: không tìm thấy lệnh" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: bộ thông dịch sai" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: không thể thực hiện tập tin nhị phân: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "“%s”: là lệnh tích hợp đặc biệt" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "không thể nhân đôi fd %d thành fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "vượt quá ngưỡng đệ quy của biểu thức" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "tràn ngược ngăn xếp đệ quy" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "lỗi cú pháp trong biểu thức" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "thử gán cho thứ không phải biến" + +#: expr.c:530 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "lỗi cú pháp trong biểu thức" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "chia cho không" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "lỗi: “token expassign” sai" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "cần “:” cho biểu thức điều kiện" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "số mũ nhỏ hơn 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "cần định danh sau tăng/giảm dần trước" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "thiếu “)”" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "lỗi cú pháp: cần toán hạng" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "lỗi cú pháp: toán tử số học không hợp lệ" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (thẻ bài lỗi là \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "cơ số (toán học) không hợp lệ" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: sai số lượng dòng" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "cơ số có giá trị quá lớn" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: lỗi biểu thức\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: không thể truy cập thư mục cấp trên" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "không thể đặt lại chế độ “nodelay” cho fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "không thể cấp phát bộ mô tả tập tin mới cho dữ liệu nhập bash từ fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: đã có bộ đệm cho fd mới %d" + +# Nghĩa chữ ? +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "pid được tánh nhánh %d có vẻ đang chạy trong công việc %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "đang xóa công việc bị dừng chạy %d với nhóm tiến trình %ld" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) được đánh dấu vẫn hoạt động" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: không có pid như vậy" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "Tín hiệu %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "Xong" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "Bị dừng" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "Bị dừng(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "Đang chạy" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "Xong(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "Thoát %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "Không rõ trạng thái" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(xuất ra core)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid tiến trình con (%ld thành %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld không phải là tiến trình con của hệ vỏ này" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Không có mục ghi về tiến trình %ld" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: công việc %d bị dừng chạy" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: không có công việc như vậy" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: công việc bị chấm dứt" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: công việc %d đã đang chạy nền" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: đang bật WNOHANG để tránh bị chặn vô hạn" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: dòng %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (xuất ra core)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd ngay: %s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp bị lỗi" + +#: jobs.c:4447 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: kỷ luật dòng" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: kỷ luật dòng" + +# Nghĩa chữ : dừng dịch +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "không thể đặt nhóm tiến trình cuối cùng (%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "không có điều khiển công việc trong hệ vỏ này" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: khẳng định gặp lỗi: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: khẳng định bị sai\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "không rõ" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "" +"malloc (cấp phát bộ nhớ): khối bộ nhớ dành riêng trên danh sách các khối còn " +"trống bị ghi vào" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: đã được gọi với đối số khối đã được giải phóng" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: đã được gọi với đối số khối chưa cấp phát" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: phát hiện sự tràn ngược; mh_nbytes ở ngoại phạm vi" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: phát hiện sự tràn ngược; mh_nbytes ở ngoại phạm vi" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: kích cỡ đoạn đầu và cuối không trùng" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: đã được gọi với đối số khối chưa cấp phát" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: phát hiện sự tràn ngược; mh_nbytes nằm ngoài phạm vi cho phép" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: phát hiện sự tràn ngược; mh_nbytes nằm ngoài phạm vi cho phép" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: kích cỡ đoạn đầu và cuối không trùng" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: bảng cấp phát đầy với FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p đã có trong bảng như được cấp phát?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p đã có trong bảng như còn trống?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "cơ số không hợp lệ" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: không rõ máy" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: dịch vụ không hợp lệ" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: đặc tả đường dẫn mạng sai" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "không hỗ trợ thao tác mạng" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: không thể chuyển đổi miền địa phương (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: không thể chuyển đổi miền địa phương (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: không thể chuyển đổi miền địa phương (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: không thể chuyển đổi miền địa phương (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Bạn có thư trong $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Bạn có thư mới trong $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Đã đọc thư trong %s\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "lỗi cú pháp: cần biểu thức số học" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "lỗi cú pháp: gặp dấu chấm phẩy “;” bất thường" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "lỗi cú pháp: “((%s))”" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: kiểu chỉ lệnh sai %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "tài liệu này ở dòng %d định giới bằng kết thúc tập tin (muốn “%s”)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: chỉ dẫn chuyển hướng “%d” nằm ngoài phạm vi" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "vượt quá số lượng tài-liệu-đây tối đa" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "gặp kết thúc tập tin bất thường trong khi tìm “%c” tương ứng" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "gặp kết thúc tập tin bất thường trong khi tìm “]]”" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "gặp lỗi cú pháp trong biểu thức điều kiện: thẻ bài bất thường “%s”" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "gặp lỗi cú pháp trong biểu thức điều kiện" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "gặp thẻ bài bất thường “%s”, cần “)”" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "cần “)”" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "đối số bất thường “%s” cho toán tử một ngôi điều kiện" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "đối số bất thường cho toán tử một ngôi điều kiện" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "thẻ bài bất thường “%s”, cần toán tử hai ngôi điều kiện" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "cần toán tử hai ngôi điều kiện" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "đối số bất thường “%s” cho toán tử hai ngôi điều kiện" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "đối số bất thường cho toán tử hai ngôi điều kiện" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "gặp thẻ bài bất thường “%c” trong câu lệnh điều kiện" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "gặp thẻ bài bất thường “%s” trong câu lệnh điều kiện" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "gặp thẻ bài bất thường “%d” trong câu lệnh điều kiện" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "có lỗi cú pháp ở gần thẻ bài bất thường “%s”" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "lỗi cú pháp ở gần “%s”" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "lỗi cú pháp: kết thúc tập tin bất thường" + +#: parse.y:6365 +msgid "syntax error" +msgstr "lỗi cú pháp" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Dùng \"%s\" để rời hệ vỏ.\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "gặp kết thúc tập tin bất thường trong khi tìm “)” tương ứng" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "tự hoàn thiện: không tìm thấy hàm “%s”" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: bộ kết nối sai “%d”" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: sai bộ mô tả tập tin" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: con trỏ tập tin NULL" + +# Nghĩa chữ ? +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: “%c”: ký tự định dạng không hợp lệ" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "bộ mô tả tập tin ở ngoại phạm vi" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: chuyển hướng chưa rõ ràng" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: không thể ghi đè lên tập tin đã có" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: bị hạn chế: không thể chuyển hướng kết xuất" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "không thể tạo tập tin tạm thời cho tài liệu này: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: không thể gán fd vào biến" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port không được hỗ trợ nếu không có mạng" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "lỗi chuyển hướng: không thể nhân đôi fd" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "không tìm thấy /tmp, hãy tạo mới!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "“/tmp” phải là tên thư mục hợp lệ" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: tùy chọn không hợp lệ" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "không thể đặt uid thành %d: uid chịu tác động %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "không thể đặt gid thành %d: gid chịu tác động %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Là một thư mục" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "Không có tên!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, phiên bản %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Cách dùng:\t%s [tùy chọn GNU dài] [tùy chọn] …\n" +"\t\t%s [tùy chọn GNU dài] [tùy chọn] tập-tin-văn-lệnh …\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "Tùy chọn dài:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Tùy chọn:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD hoặc -c lệnh hay -O tùy-chọn-ngắn\t\t(chỉ gọi)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s hoặc -o tùy-chọn\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Gõ “%s -c \"help set\"” để xem thông tin về các tùy chọn hệ vỏ.\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Gõ “%s -c help” để xem thông tin về các lệnh hệ vỏ tích hợp.\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" +"Dùng lệnh “bashbug” để thông báo lỗi.\n" +"Báo cáo các lỗi dịch cho: .\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "Trang chủ bash: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Trợ giúp chung về cách sử dụng phần mềm GNU : \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: thao tác không hợp lệ" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "Tín hiệu giả" + +#: siglist.c:50 +msgid "Hangup" +msgstr "Treo" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "Ngắt" + +#: siglist.c:58 +msgid "Quit" +msgstr "Thoát" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "Câu lệnh không được phép" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "Theo vết/đặt bẫy BPT" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "Câu lệnh HỦY BỎ" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "Câu lệnh EMT" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "Lỗi dấu chấm động" + +#: siglist.c:86 +msgid "Killed" +msgstr "Bị giết" + +#: siglist.c:90 +msgid "Bus error" +msgstr "Lỗi bus" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "Lỗi phân đoạn" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "Lỗi lệnh gọi hệ thống" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "Ống dẫn hỏng" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "Đồng hồ báo thức" + +#: siglist.c:110 +msgid "Terminated" +msgstr "Bị chấm dứt" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "Điều kiện IO gấp" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "Bị dừng (tín hiệu)" + +#: siglist.c:126 +msgid "Continue" +msgstr "Tiếp tục" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "Tiến trình con đã giết hoặc dừng" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "Bị dừng (tty nhập)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "Bị dừng (tty xuất)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O sẵn sàng" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "Giới hạn CPU" + +#: siglist.c:154 +msgid "File limit" +msgstr "Giới hạn tập tin" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "Báo động (ảo)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "Báo động (hồ sơ)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "Cửa sổ bị thay đổi" + +#: siglist.c:170 +msgid "Record lock" +msgstr "Khóa bản ghi" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "Tín hiệu người dùng 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "Tín hiệu người dùng 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "Dữ liệu nhập HFT bị hoãn" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "sắp bị mất điện đột ngột" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "hệ thống sắp sụp đổ" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "chuyển tiến trình sang CPU khác" + +#: siglist.c:198 +msgid "programming error" +msgstr "lỗi lập trình" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "Có chế độ màn hình HFT" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "Không có chế độ màn hình HFT" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "Đã hoàn thành chuỗi âm thanh HFT" + +#: siglist.c:214 +msgid "Information request" +msgstr "yêu cầu thông tin" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Tín hiệu lạ #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "sai chỉ số phụ: không có đóng “%s” trong %s" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: không thể gán danh sách cho bộ phận của mảng" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "không thể tạo ống dẫn để thay thế tiến trình" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "không thể tạo tiến trình con để thay thế tiến trình" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "không thể mở ống dẫn đặt tên %s để đọc" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "không thể mở ống dẫn có tên %s để ghi" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "không thể nhân đôi ống dẫn đặt tên %s thành fd %d" + +#: subst.c:6213 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "sai thay thế: không có \"“\" đóng trong %s" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "không thể tạo ống dẫn để thay thế lệnh" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "không thể tạo tiến trình con để thay thế lệnh" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: không thể nhân đôi ống dẫn thành fd 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: tên biến không hợp lệ cho một tham chiếu tên" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: triển khai gián tiếp không hợp lệ" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "“%s”: tên biến không hợp lệ" + +#: subst.c:7256 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: tham số null hoặc chưa được đặt" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: tham số null hoặc chưa được đặt" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: biểu thức chuỗi con < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: thay thế sai" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: không thể gán bằng cách này" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"phiên bản hệ vỏ mới sẽ ép buộc ước lượng dưới dạng một hàm thay thế số học" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "sai thay thế: không có \"“\" đóng trong %s" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "không khớp: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "cần đối số" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: cần biểu thức số nguyên" + +#: test.c:265 +msgid "`)' expected" +msgstr "cần “)”" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "cần “)” nhưng lại nhận được %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: cần toán tử hai ngôi" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: cần toán tử một ngôi" + +#: test.c:881 +msgid "missing `]'" +msgstr "thiếu “]”" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "lỗi cú pháp: gặp dấu chấm phẩy “;” bất thường" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "số thứ tự tín hiệu không hợp lệ" + +#: trap.c:325 +#, fuzzy, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: vượt quá mức độ eval lồng nhau tối đa (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: giá trị sai trong danh sách trap_list[%d]: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: bộ xử lý tín hiệu là SIG_DFL, đang gửi lại %d (%s) cho " +"chính mình" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: tín hiệu sai %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "gặp lỗi khi nhập vào định nghĩa hàm cho “%s”" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "cấp hệ vỏ (%d) quá cao nên đặt lại thành 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: không có ngữ cảnh hàm ở phạm vi hiện thời" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: không thể gán giá trị cho biến" + +#: variables.c:3475 +#, fuzzy, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: tên biến không hợp lệ cho một tham chiếu tên" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: không có ngữ cảnh hàm ở phạm vi hiện thời" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s có exportstr null" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "sai ký tự %d trong exportstr cho %s" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "không có “=” trong exportstr cho %s" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: đầu của shell_variables (các biến hệ vỏ) không phải là ngữ " +"cảnh hàm" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "" +"pop_var_context: không có ngữ cảnh global_variables (các biến toàn cục)" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: đầu của shell_variables (các biến hệ vỏ) không phải là phạm vi " +"môi trường tạm thời" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: không thể mở như là TẬP-TIN" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: sai đặt giá trị cho bộ mô tả tập tin vết" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: giá trị so sánh nằm ngoài phạm vi" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Tác quyền (C) năm 2014 của Tổ chức Quỹ Phần mềm Tự do, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Giấy phép GPLv3+: GNU GPL phiên bản 3 hoặc mới hơn \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, phiên bản %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Đây là phần mềm tự do; bạn có quyền sửa đổi và phát hành lại nó." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Ở đây KHÔNG BẢO HÀNH GÌ CẢ, với điều kiện được pháp luật cho phép." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: không thể cấp phát %lu byte (%lu byte được cấp phát)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: không thể cấp phát %lu byte" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: không thể cấp phát %lu byte (%lu byte được cấp phát)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: không thể cấp phát %lu byte" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [TÊN[=GIÁ-TRỊ] … ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] TÊN [TÊN …]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVSX] [-m SƠ-ĐỒ-PHÍM] [-f TẬP-TIN] [-q TÊN] [-u TÊN] [-r DÃY-" +"PHÍM] [-x DÃY-PHÍM:LỆNH] [DÃY-PHÍM:HÀM-READLINE hay LỆNH-READLINE]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [SHELL-BUILTIN [ĐỐI-SỐ …]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [BTHỨC]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [-@]] [THƯ-MỤC]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] LỆNH [Đ.SỐ …]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [TÊN[=GIÁ-TRỊ] …]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] TÊN[=GIÁ-TRỊ] …" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [tùy_chọn] TÊN[=GIÁ-TRỊ] …" + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [Đ.SỐ …]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [Đ.SỐ …]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f TẬP-TIN] [TÊN …]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [Đ.SỐ …]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts CHUỖI-TÙY-CHỌN TÊN [Đ.SỐ]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a TÊN] [LỆNH [ĐỐI-SỐ …]] [CHUYỂN-HƯỚNG …]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ENAME] [-lnr] [ĐẦU] [CUỐI] hoặc fc -s [MẪU=LẶP_LẠI] [LỆNH]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [ĐTCV]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [ĐTCV …]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ĐƯỜNG-DẪN] [-dt] [TÊN …]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [MẪU …]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d OFFSET] [n] hay history -anrw [T.TIN] hay history -ps Đ.SỐ " +"[Đ.SỐ…]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [ĐTCV …] hoặc jobs -x LỆNH [ĐỐI-SỐ]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [ĐTCV …]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s ĐTTH | -n số_tín_hiệu | -ĐTTH] pid | ĐTCV … hoặc kill -l [ĐTTH]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let ĐỐI-SỐ [ĐỐI-SỐ …]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a MẢNG] [-d GIỚI-HẠN] [-i VĂN-BẢN] [-n SỐ-KÝ-TỰ] [-N SỐ-KÝ-TỰ] " +"[-p NHẮC] [-t THỜI-HẠN] [-u fd] [TÊN …]" + +# nghĩa chữ +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o TÊN-TÙY-CHỌN] [--] [ĐỐI-SỐ …]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [TÊN …]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [TÊN[=GIÁ-TRỊ] …] hoặc export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [TÊN[=GIÁ-TRỊ] …] hay readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source TẬP-TIN [ĐỐI-SỐ …]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". TẬP-TIN [ĐỐI-SỐ …]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [BTHỨC]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ Đ.SỐ … ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[Đ.SỐ] ĐTTH …]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] TÊN [TÊN …]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [GIỚI-HẠN]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [CHẾ-ĐỘ]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [id …]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid …]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for TÊN [in TỪ… ;] do CÁC;CÂU;LỆNH; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( BTHỨC1; BTHỨC2; BTHỨC3 )); do CÁC;CÂU;LỆNH; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select TÊN [in CÁC TỪ … ;] do CÁC;CÂU;LỆNH; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] ỐNG-DẪN" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case TỪ in [MẪU [| MẪU]…) CÁC;CÂU;LỆNH;;]… esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if LỆNH; then CÁC;CÂU;LỆNH; [ elif CÁC;CÂU;LỆNH; then CÁC;CÂU;LỆNH; ]… " +"[ else CÁC;CÂU;LỆNH; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while CÁC;CÂU;LỆNH; do CÁC;CÂU;LỆNH; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until CÁC;CÂU;LỆNH; do CÁC;CÂU;LỆNH; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [TÊN] LỆNH [CHUYỂN-HƯỚNG]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function TÊN { CÁC;CÂU;LỆNH; } or TÊN () { CÁC;CÂU;LỆNH; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ CÁC;CÂU;LỆNH ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "ĐTCV [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( BTHỨC ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ BTHỨC ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "biến — tên và nghĩa của một số biến hệ vỏ" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | tmục]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [tên-tùy-chọn …]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v BIẾN] ĐỊNH-DẠNG [CÁC-ĐỐI-SỐ]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DE] [-o TÙY-CHỌN] [-A HÀNH-ĐỘNG] [-G MẪU-" +"GLOB] [-W DANH-SÁCH-TỪ] [-F HÀM] [-C LỆNH] [-X MẪU-LỌC] [-P TIỀN-TỐ] [-S " +"HẬU-TỐ] [TÊN …]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o TÙY-CHỌN] [-A HÀNH-ĐỘNG] [-G MẪU-GLOB] [-W DANH-" +"SÁCH-TỪ] [-F HÀM] [-C LỆNH] [-X MẪU-LỌC] [-P TIỀN-TỐ] [-S HẬU-TỐ] [TỪ]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o TÙY-CHỌN] [-DE] [TÊN …]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n SỐ-LƯỢNG] [-O GỐC] [-s SỐ-LƯỢNG] [-t] [-u fd] [-C " +"GỌI-NGƯỢC] [-c LƯỢNG] [MẢNG]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n ĐẾM] [-O GỐC] [-s SỐ-LƯỢNG] [-t] [-u FD] [-C GỌI-NGƯỢC] [-c " +"LƯỢNG] [MẢNG]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"Định nghĩa hoặc hiển thị bí danh.\n" +"\n" +" Không đưa ra đối số thì “alias” in danh sách các bí danh ở dạng dùng lại " +"được\n" +" “alias TÊN=GIÁ-TRỊ” trên đầu ra chuẩn.\n" +"\n" +" Nếu không thì một bí danh được định nghĩa cho mỗi TÊN theo giá trị\n" +" đưa ra. Khoảng trắng ở đâu trong GIÁ-TRỊ làm kiểm tra thay thế bí\n" +" danh cho từ kế tiếp, khi phân giải bí danh.\n" +" \n" +" Tùy chọn:\n" +" -p\tin tất cả các bí danh được định nghĩa theo định dạng\n" +" \tcó thể dùng lại được\n" +" \n" +" Trạng thái thoát:\n" +" alias trả lại thành công trừ khi TÊN đã cho không phải là\n" +" một bí danh đã được định nghĩa" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"Gỡ bỏ TÊN khỏi danh sách các bí danh.\n" +" \n" +" Tùy chọn:\n" +" -a\tbỏ tất cả các bí danh.\n" +" \n" +" Trả lại thành công trừ khi TÊN không phải là một bí danh." + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Đặt các tổ hợp phím và biến Readline.\n" +" \n" +" Gắn tổ hợp phím với một chức năng hay vĩ lệnh Readline, hoặc\n" +" đặt biến Readline. Cú pháp đối số không tùy chọn giống như trong\n" +" ~/.inputrc, nhưng phải được chuyển qua dưới dạng đối số đơn. Ví\n" +" dụ: bind “\"\\C-x\\C-r\": re-read-init-file”.\n" +" \n" +" Tùy chọn:\n" +" -m SƠ-ĐỒ-PHÍM dùng sơ_đồ_phím làm sơ đồ phím khi lệnh này\n" +" chạy. Giá trị hợp lệ là emacs, emacs-standard,\n" +" emacs-meta, emacs-ctlx, vi, vi-move, vi-command\n" +" và vi-insert.\n" +" -l Liệt kê tên các hàm\n" +" -P Liệt kê tên hàm và tổ hợp phím\n" +" -p Liệt kê tên hàm và tổ hợp phím theo dạng dùng\n" +" lại làm đầu vào được\n" +" -S Liệt kê chuỗi phím mà gọi vĩ lệnh và các giá-trị\n" +" của chúng\n" +" -s Liệt kê chuỗi phím mà gọi vĩ lệnh và các giá-trị\n" +" của chúng theo định dạng có thể dùng làm đầu vào\n" +" -V Liệt kê các biến và giá trị của chúng\n" +" -v Liệt kê các biến và giá trị của chúng\n" +" theo định dạng có thể tái sử dụng làm đầu vào.\n" +" -q TÊN-HÀM Hỏi phím nào gọi hàm này\n" +" -u TÊN-HÀM Gỡ bỏ tất cả phím tắt gắn với hàm này\n" +" -r DÃY-PHÍM Gỡ bỏ tổ hợp phím này\n" +" -f TẬP-TIN Đọc tổ hợp phím từ tập tin này\n" +" -x DÃY-PHÍM:LỆNH Chạy LỆNH khi nhập DÃY-PHÍM\n" +" -X Liệt kê dãy phím với tùy-chọn -x và các lệnh kết " +"hợp\n" +" theo dạng có thể dùng làm đầu vào.\n" +" \n" +" Trạng thái thoát:\n" +" lệnh bind trả về 0 trừ khi đưa ra tùy chọn không nhận ra hay gặp lỗi." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Thoát khỏi vòng lặp for, while hoặc until.\n" +"\n" +" Thoát khỏi vòng lặp for, while hoặc until. Nếu xác định N thì\n" +" thoát N vòng lặp.\n" +"\n" +" Trạng thái thoát:\n" +" Trạng thái thoát là 0 trừ khi N nhỏ hơn 1." + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"Tiếp tục lại chạy vòng lặp for, while hoặc until.\n" +"\n" +" Tiếp tục lại chạy vòng lặp for, while hoặc until. Nếu xác định N\n" +" thì tiếp tục vòng lặp thứ N.\n" +"\n" +" Trạng thái thoát:\n" +" Trạng thái thoát là 0 trừ khi N nhỏ hơn 1." + +#: builtins.c:354 +#, fuzzy +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"Chạy lệnh tích hợp hệ vỏ.\n" +"\n" +" Chạy SHELL-BUILTIN với ĐỐI-SỐ mà không thực hiện tìm lệnh. Hữu ích\n" +" khi bạn muốn cài đặt lại lệnh hệ vỏ tích hợp dạng hàm hệ vỏ, nhưng\n" +" cần chạy lệnh tích hợp trong hàm đó.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái thoát của SHELL-BUILTIN, hoặc sai nếu\n" +" SHELL-BUILTIN không phải là một lệnh tích hợp hệ vỏ." + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"Trả về ngữ cảnh của lệnh gọi hàm hiện thời.\n" +"\n" +" Không có BTHỨC thì trả lại \"$line $filename\". Có BTHỨC thì trả\n" +" lại \"$line $subroutine $filename\"; thông tin bổ sung này có thể\n" +" được dùng để cung cấp stack trace.\n" +"\n" +" Giá trị của BTHỨC thì ngụ ý bao nhiêu lần gọi cần lùi lại đằng\n" +" trước lệnh gọi hiện tại; khung gọi đầu là khung 0.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại 0 trừ khi hệ vỏ đang chạy hàm hệ vỏ, BTHỨC cũng hợp lệ." + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Đổi thư mục làm việc của hệ vỏ.\n" +" \n" +" Chuyển đổi thư mục hiện thời sang THƯ-MỤC. Thư mục mặc định là giá\n" +" trị của biến HOME.\n" +" \n" +" Biến CDPATH định nghĩa đường dẫn tìm kiếm cho thư mục chứa\n" +" THƯ-MỤC. Tên thư mục thay thế trong CDPATH được phân cách bằng dấu hai " +"chấm\n" +" (:). Tên thư mục trống tương đương với thư mục hiện tại. Nếu\n" +" THƯ-MỤC bắt đầu với dấu gạch chéo (/) thì không dùng CDPATH.\n" +" \n" +" Nếu không tìm thấy thư mục, và biến “cdable_vars” được đặt,\n" +" thì lệnh sẽ coi là một tên biến. Nếu biến đó có giá trị,\n" +" thì giá trị này được dùng cho THƯ-MỤC.\n" +" \n" +" Tùy chọn:\n" +" -L buộc theo liên kết mềm: phân giải liên kết mềm\n" +" \tTH.MỤC sau khi xử lý “..”\n" +" -P dùng cấu trúc thư mục vật lý mà không theo liên kết mềm:\n" +" \tphân giải liên kết mềm TH.MỤC sau khi xử lý “..”\n" +" -e nếu có tùy chọn -P và không thể xác định thư mục làm việc\n" +" \thiện tại thì thoát với trạng thái khác không\n" +" -@ trên các hệ thống mà hỗ trợ nó, hiện diện một tập tin với các\n" +" thuộc tính mở rộng như là một thư mục chứa các thuộc tính tập " +"tin\n" +" \n" +" Mặc định là theo liên kết mềm, như có mặt tùy chọn “-L”.\n" +" “..” được xử lý bằng cách gỡ bỏ phần trước của đường dẫn\n" +" cho đến dấu gạch chéo hay điểm bắt đầu của TH.MỤC.\n" +" \n" +" Trạng thái thoát:\n" +" Trả về 0 nếu thay đổi thư mục, và nếu $PWD được đặt thành công khi\n" +" -P được sử dụng; không thì khác không." + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"In tên thư mục hiện tại.\n" +" \n" +" Tùy chọn:\n" +" -L in giá trị của $PWD nếu nó chứa tên của thư mục hiện tại\n" +" -P in thư mục vật lý, không liên kết mềm\n" +" \n" +" Mặc định “pwd” chạy như có mặt “-L”.\n" +" \n" +" Trạng thái thoát:\n" +" Trả về 0 trừ khi đưa ra tùy chọn sai hoặc không đọc được thư mục hiện " +"tại." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Câu lệnh vô giá trị.\n" +" \n" +" Không có tác dụng gì: câu lệnh không làm gì cả.\n" +" \n" +" Trạng thái thoát:\n" +" Lúc nào cũng thành công." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Trả lại kết quả thành công.\n" +" \n" +" Trạng thái thoát:\n" +" Lúc nào cũng thành công." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Trả về kết quả không thành công.\n" +" \n" +" Trạng thái thoát:\n" +" Lúc nào cũng không thành công." + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"Thực thi một lệnh đơn giản, hoặc hiển thị thông tin về lệnh.\n" +" \n" +" Chạy LỆNH với các ĐỐI-SỐ mà không thực hiện tra cứu hàm hệ vỏ,\n" +" hoặc hiển thị thông tin về LỆNH. Có thể được dùng để gọi lệnh trên\n" +" đĩa khi đã có hàm cùng tên.\n" +" \n" +" Tùy chọn:\n" +" -p dùng giá trị mặc định cho ĐƯỜNG_DẪN\n" +" mà chắc chắn sẽ tìm mọi tiện ích chuẩn\n" +" -v in mô tả về LỆNH mà tương tự như lệnh tích hợp “type”\n" +" -V in mô tả chi tiết hơn của mỗi LỆNH\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại trạng thái thoát của LỆNH, hoặc thất bại nếu không tìm\n" +" thấy LỆNH." + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Đặt giá trị và thuộc tính biến.\n" +" \n" +" Khai báo biến và gán cho thuộc tính cho nó. Nếu không đưa TÊN thì\n" +" hiển thị thuộc tính và giá trị của mọi biến.\n" +" \n" +" Tùy chọn:\n" +" -f\thạn chế hành động hoặc hiển thị tên hàm và định nghĩa\n" +" -F\thạn chế hiển thị chỉ tên hàm mà thôi\n" +" \t(và số thứ tự dòng và tập tin nguồn khi gỡ lỗi)\n" +" -g\ttạo biến toàn cục khi sử dụng trong hàm hệ vỏ; nếu không\n" +" \tthì bị bỏ qua\n" +" -p\thiển thị thuộc tính và giá trị của mỗi TÊN\n" +" \n" +" Tùy chọn dùng để đặt thuộc tính:\n" +" -a\ttạo mảng chỉ số tên TÊN (nếu hỗ trợ)\n" +" -A\ttạo mảng kết hợp tên TÊN (nếu hỗ trợ)\n" +" -i\tđặt thuộc tính “integer” (số nguyên) cho TÊN\n" +" -l\tchuyển đổi TÊN sang chữ thường khi gán\n" +" -n\tlàm một TÊN tham chiếu đến biến có tên là giá trị của nó\n" +" -r\tlàm cho TÊN chỉ đọc\n" +" -t\tđặt thuộc tính “trace” cho TÊN\n" +" -u\tchuyển đổi TÊN sang chữ hoa khi gán\n" +" -x\txuất khẩu TÊN\n" +" \n" +" Dùng “+” thay cho “-” để tắt thuộc tính đưa ra.\n" +" \n" +" Biến có thuộc tính số nguyên thì định giá theo số học (xem lệnh\n" +" “let” khi biến được gán.\n" +" \n" +" Khi dùng trong hàm, “declare” đặt TÊN là cục bộ, như khi dùng lệnh\n" +" “local” (cục bộ). Tùy chọn -g ngăn hành vi này.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi đưa ra tùy chọn sai hoặc gặp lỗi khi gán biến." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Đặt giá trị và thuộc tính của biến.\n" +"\n" +" Lệnh này đã lạc hậu. Xem “help declare”." + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Định nghĩa biến cục bộ.\n" +" \n" +" Tạo biến cục bộ tên TÊN và gán GIÁ-TRỊ cho nó. TÙY_CHỌN có thể là\n" +" bất cứ tùy chọn nào “declare” chấp nhận.\n" +" \n" +" Biến cục bộ chỉ dùng được bên trong hàm, chỉ truy cập được từ hàm\n" +" mà biến được định nghĩa và các hàm con.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi đưa ra tùy chọn sai hay gặp lỗi,\n" +" hoặc nếu hệ vỏ không chạy hàm." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Ghi đối số vào đầu ra tiêu chuẩn.\n" +" \n" +" Hiển thị các ĐỐI-SỐ, ngăn cách bằng dấu cách đơn và kèm ký tự dòng mới\n" +" ra đầu ra tiêu chuẩn .\n" +" \n" +" Tùy chọn:\n" +" -n\tđừng thêm ký tự dòng mới\n" +" -e\tbật diễn dịch ký tự thoát theo sau ký tự “\\”\n" +" -E\tchặn diễn dịch ký tự thoát\n" +" \n" +" “echo” hiểu những ký tự thoát sau:\n" +" \\a\ttiếng chuông\n" +" \\b\txóa lùi\n" +" \\c\tchặn kết xuất tiếp\n" +" \\e\tký tự thoát\n" +" \\E\tký tự thoát\n" +" \\f\ttải giấy\n" +" \\n\tdòng mới\n" +" \\r\txuống dòng\n" +" \\t\ttab đứng\n" +" \\v\ttab ngang\n" +" \\\\\tgạch ngược\n" +" \\0nnn\tký tự có mã ASCII NNN (1-3 chữ số bát phân)\n" +" \\xHH\tký tự 8-bit có giá trị HH (1-2 chữ số thập lục phân)\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không gặp lỗi khi ghi." + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Ghi đối số vào đầu ra chuẩn.\n" +"\n" +" Hiển thị ĐỐI-SỐ trên đầu ra chuẩn, kèm ký tự xuống hàng ở cuối.\n" +"\n" +" Tùy chọn:\n" +" -n\tđừng thêm ký tự xuống hàng\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không gặp lỗi ghi." + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"Bật và tắt lệnh hệ vỏ tích hợp.\n" +"\n" +" Bật và tắt các lệnh hệ vỏ tích hợp. Chức năng tắt cho phép bạn\n" +" chạy một lệnh trên đĩa cùng tên với một lệnh hệ vỏ tích hợp mà\n" +" không cần dùng tên đường dẫn đầy đủ.\n" +"\n" +" Tùy chọn:\n" +" -a in danh sách các lệnh tích hợp kèm trạng thái bật/tắt\n" +" -n tắt TÊN hoặc hiển thị danh sách lệnh bị tắt\n" +" -p in danh sách lệnh tích hợp theo định dạng dùng lại được\n" +" -s chỉ in tên các lệnh tích hợp Posix “đặc biệt”\n" +"\n" +" Tùy chọn điều khiển chức năng tải động:\n" +" -f nạp lệnh tích hợp TÊN từ TẬP-TIN\n" +" -d bỏ một tích hợp được nạp bằng “-f”\n" +"\n" +" Không có tùy chọn thì coi như bật TÊN.\n" +"\n" +" Để sử dụng lệnh “test” trên đĩa (nếu tìm thấy trong $PATH) thay\n" +" cho phiên bản hệ vỏ tích hợp, gõ “enable -n test”.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi TÊN không phải lệnh tích hợp hoặc gặp lỗi." + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"Dùng các đối số để chạy lệnh hệ vỏ.\n" +"\n" +" Gộp các ĐỐI-SỐ thành một chuỗi đơn, dùng kết quả làm đầu vào cho\n" +" hệ vỏ và chạy lệnh đó.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái thoát của câu lệnh hay thành công nếu lệnh rỗng." + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"Phân tích đối số tùy chọn.\n" +"\n" +" Getopts được hệ vỏ dùng để phân tích tham số thành tùy chọn.\n" +"\n" +" CHUỖI-TÙY-CHỌN chứa những chữ tùy chọn cần nhận ra; một chữ có dấu hai\n" +" chấm theo sau thì tùy chọn cần đối số, cách tùy chọn bằng khoảng\n" +" trắng.\n" +"\n" +" Mỗi lần gọi, getopts sẽ đặt tùy chọn kế tiếp vào biến hệ vỏ $TÊN,\n" +" tạo biến mới nếu tên đó chưa tồn tại, và đặt chỉ số của đối số kế\n" +" tiếp cần xử lý vào biến hệ vỏ OPTIND. OPTIND được khởi động bằng 1\n" +" mỗi lần hệ vỏ hay một văn lệnh hệ vỏ được gọi. Khi tùy chọn cần\n" +" đối số, getopts đặt đối số đó vào biến hệ vỏ OPTARG.\n" +"\n" +" getopts thông báo lỗi bằng một trong hai cách. Nếu ký tự đầu tiên\n" +" của CHUỖI-TÙY-CHỌN là dấu hai chấm, getopts thông báo lỗi im\n" +" lặng. Chế độ này không in ra thông báo nào. Nếu gặp tùy chọn sai\n" +" thì getopts lưu mã ký tự tùy chọn trong biến OPTARG. Không tìm\n" +" thấy đối số cần thiết thì getopts lưu dấu hai chấm trong biến $TÊN\n" +" và đặt lưu mã ký tự tùy chọn trong OPTARG. Nếu getopts không trong\n" +" chế độ im lặng và gặp tùy chọn sai, getopts lưu dấu hỏi “?” vào\n" +" biến $TÊN và xóa OPTARG. Không tìm thấy tùy chọn cần thiết thì “?”\n" +" được lưu vào $TÊN, OPTARG bị xlá, và in ra một thông điệp chẩn\n" +" đoán.\n" +"\n" +" Nếu biến hệ vỏ OPTERR có giá trị 0, getopts sẽ không in thông báo\n" +" kể cả khi ký tự đầu tiên của CHUỖI-TÙY-CHỌN không phải dấu hai\n" +" chấm. OPTERR có giá trị mặc định là 1.\n" +"\n" +" Getopts bình thường phân tích tham số vị trí ($0 - $9). Tuy nhiên,\n" +" các đối số bổ sung cũng được phân tích.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu tìm thấy một tùy chọn; không thành công nếu\n" +" gặp kết thúc các tùy chọn, hoặc nếu gặp lỗi." + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"Thay thế hệ vỏ bằng câu lệnh đưa ra.\n" +" \n" +" Thực thi LỆNH, thay thế hệ vỏ này bằng chương trình được chạy.\n" +" ĐỐI-SỐ trở thành đối số của LỆNH. Không định nghĩa LỆNH thì bất cứ " +"chuyển\n" +" hướng nào sẽ xảy ra trong hệ vỏ đang chạy.\n" +" \n" +" Tùy chọn:\n" +" -a TÊN\ttruyền TÊN cho LỆNH dạng đối số thứ không\n" +" -c\tthực thi LỆNH với một môi trường rỗng\n" +" -l\tđặt một dấu gạch vào đối số thứ không của LỆNH\n" +" \n" +" Nếu LỆNH không thể thực thi, hệ vỏ không tương tác sẽ thoát, trừ\n" +" khi đặt tùy chọn hệ vỏ “execfail”.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi không tìm được LỆNH hoặc gặp lỗi chuyển hướng." + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"Thoát hệ vỏ.\n" +"\n" +" Thoát khỏi hệ vỏ với trạng thái N. Không xác định N thì trạng thái\n" +" thoát là trạng thái của lệnh cuối cùng được chạy." + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"Thoát hệ vỏ đăng nhập.\n" +"\n" +" Thoát khỏi hệ vỏ đăng nhập với trạng thái N. Trả về lỗi nếu không\n" +" phải hệ vỏ đăng nhập." + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"Hiển thị hoặc thực thi lệnh từ lịch sử.\n" +"\n" +" fc được dùng để liệt kê, chỉnh sửa và thực thi lại lệnh từ danh\n" +" sách lịch sử. ĐẦU và CUỐI có thể là số xác định phạm vi, hoặc ĐẦU\n" +" có thể là chuỗi chứa phần đầu lệnh chạy gần đây nhất.\n" +"\n" +" Tùy chọn:\n" +" -e ENAME\tchọn trình soạn thảo nào cần dùng.\n" +" \tMặc định là FCEDIT, sau đó là EDITOR, rồi đến vi\n" +" -l\tliệt kê thay vì chỉnh sửa\n" +" -n\tliệt kê không in số thứ tự dòng\n" +" -r\tđảo ngược thứ tự các dòng (mới nhất trước)\n" +"\n" +" Định dạng “fc -s [mẫu=lần_lập_lại …] [lệnh]” được dùng để chạy\n" +" lại lệnh sau khi thay thế CŨ=MỚI.\n" +"\n" +" Một bí danh hữu ích là r=\".c -s\" để có thể gõ “r cc” để chạy lệnh\n" +" cuối cùng bắt đầu bằng “cc” và gõ “r” để chạy lại lệnh cuối.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công hay trạng thái của câu lệnh được thực thi; gặp\n" +" lỗi thì khác số không." + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"Nâng công việc nền lên trước.\n" +"\n" +" Nâng lên trước công việc được định nghĩa bởi đặc tả công việc ĐTCV\n" +" làm công việc hiện thời. Không có ĐTCV thì dùng công việc hiện\n" +" thời của hệ vỏ.\n" +"\n" +" Trạng thái thoát:\n" +" Trạng thái của câu lệnh được nâng lên trước; hoặc thất bại nếu xảy\n" +" ra lỗi." + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Chuyển công việc xuống chạy nền.\n" +"\n" +" Chuyển công việc định nghĩa theo đặc tả công việc ĐTCV sang chạy\n" +" nền, như thể lệnh được chạy với “&”. Nếu không có ĐTCV, dùng công\n" +" việc hiện thời của hệ vỏ.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu chức năng điều khiển công việc được bật và\n" +" không gặp lỗi." + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"Nhớ hoặc hiển thị vị trí chương trình.\n" +" \n" +" Xác định và ghi nhớ tên đường dẫn đầy đủ của mỗi TÊN câu lệnh.\n" +" Nếu không đưa ra đối số, hiển thị thông tin về các câu lệnh được\n" +" ghi nhớ.\n" +" \n" +" Tùy chọn:\n" +" -d\tquên vị trí đã nhớ của TÊN\n" +" -l\thiển thị theo định dạng dùng lại làm đầu vào được\n" +" -p\tTÊN_ĐƯỜNG_DẪN\tdùng TÊN_ĐƯỜNG_DẪN là tên đường dẫn đầy đủ của TÊN\n" +" -r\tquên mọi vị trí đã nhớ\n" +" -t\tin vị trí đã nhớ của TÊN, in tên trước vị\n" +" \t\ttrí nếu TÊN tương ứng với nhiều vị trí\n" +" \n" +" Đối số:\n" +" TÊN\tmỗi TÊN được tìm trong $PATH và được thêm vào\n" +" \t\tdanh sách các câu lệnh được ghi nhớ.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu tìm được TÊN và không đưa ra tùy chọn sai." + +#: builtins.c:818 +#, fuzzy +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Hiển thị thông tin về lệnh tích hợp.\n" +" \n" +" Hiển thị bản tóm tắt ngắn về các câu lệnh tích hợp. Nếu chỉ định\n" +" MẪU thì in ra trợ giúp chi tiết về tất cả các câu lệnh tương\n" +" ứng với mẫu đó; không thì in ra danh sách các chủ đề trợ giúp.\n" +" \n" +" Tùy chọn:\n" +" -d\txuất mô tả ngắn về mỗi chủ đề\n" +" -m\thiện cách dùng theo định dạng trang hướng dẫn (man)\n" +" -s\txuất chỉ một bản tóm tắt cách dùng cho mỗi\n" +" \t\tchủ đề tương ứng với MẪU\n" +" \n" +" Đối số:\n" +" MẪU\tmẫu xác định một chủ đề trợ giúp\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu tìm được MẪU và không đưa ra tùy chọn sai." + +#: builtins.c:842 +#, fuzzy +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Hiển thị hoặc thao tác danh sách lịch sử.\n" +" \n" +" Hiển thị danh sách lịch sử kèm số dòng, “*” ở đầu dòng cho các mục\n" +" nhập bị sửa đổi. Đối số N thì liệt kê chỉ N mục tin cuối cùng.\n" +" \n" +" Tùy chọn:\n" +" -c\txóa sạch danh sách lịch sử bằng cách xóa mọi mục tin\n" +" -d offset\txóa mục tin lịch sử ở vị trí tương đối này\n" +" \n" +" -a\tnối đuôi lịch sử từ phiên làm việc này vào tập tin\n" +" \tlịch sử.\n" +" -n\tđọc mọi dòng lịch sử chưa đọc từ tập tin lịch sử\n" +" -r\tđọc tập tin lịch sử và nối thêm vào danh sách lịch sử\n" +" -w\tghi lịch sử hiện thời vào tập tin lịch sử,\n" +" \tvào nối đuôi vào danh sách lịch sử\n" +" \n" +" -p\tkhai triển lịch sử với mỗi ĐỐI-SỐ và hiển thị kết quả\n" +" \tmà không lưu vào danh sách lịch sử\n" +" -s\tnối đuôi ĐỐI-SỐ vào danh sách lịch sử làm một mục đơn\n" +" \n" +" Nếu có TẬP-TIN thì nó được dùng làm tập tin lịch sử. Ngược\n" +" lại, nếu $HISTFILE có giá trị thì dùng; nếu $HISTFILE không có giá\n" +" trị thì dùng “~/.bash_history”.\n" +" \n" +" Nếu biến $HISTTIMEFORMAT đã được đặt và khác rỗng, giá trị đó được\n" +" dùng làm chuỗi định dạng cho strftime(3) để in nhãn thời gian\n" +" tương ứng với mỗi mục tin lịch sử được hiển thị. Ngược lại không\n" +" in nhãn thời gian.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không gặp tùy chọn sai hay gặp lỗi." + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"Hiển thị trạng thái của công việc.\n" +" \n" +" Liệt kê các công việc đang chạy. Đặc tả công việc ĐTCV hạn chế chỉ\n" +" hiện công việc đó thôi. Không có tùy chọn thì hiển thị trạng thái\n" +" của mọi công việc đang chạy.\n" +" \n" +" Tùy chọn:\n" +" -l\tliệt kê mã số tiến trình ngoài thông tin bình thường\n" +" -n\tliệt kê chỉ những tiến trình đã thay đổi trạng thái\n" +" \tkể từ lần thông báo cuối cùng\n" +" -s\tchỉ hiện những công việc đang dừng chạy\n" +" \n" +" Nếu có “-x” thì chạy LỆNH sau khi thay thế tất cả đặc tả công việc\n" +" trên đối số bằng mã tiến trình của trình dẫn đầu nhóm tiến trình\n" +" của công việc đó.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không gặp tùy chọn sai hay gặp lỗi.\n" +" Đưa ra “-x” thì trả lại trạng thái thoát của LỆNH." + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"Bỏ công việc khỏi hệ vỏ đang chạy.\n" +" \n" +" Gỡ bỏ công việc xác định bởi đặc tả công việc ĐTCV ra khỏi bảng các\n" +" công việc hoạt động. Không có ĐTCV thì dùng công việc hiện thời của hệ " +"vỏ.\n" +" \n" +" Tùy chọn:\n" +" -a\tbỏ mọi công việc nếu không có ĐTCV\n" +" -h\tđánh dấu ĐTCV để không gửi tín hiệu SIGHUP\n" +" \tcho công việc khi hệ vỏ nhận được SIGHUP\n" +" -r\tchỉ bỏ những công việc đang chạy\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn hay ĐTCV sai." + +#: builtins.c:925 +#, fuzzy +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"Gửi tín hiệu cho công việc.\n" +" \n" +" Gửi tín hiệu xác định bởi SIGSPEC hoặc SIGNUM cho những tiến trình\n" +" xác định bởi PID hoặc JOBSPEC. Nếu SIGSPEC và SIGNUM không hiện diện\n" +" thì ngầm định SIGTERM.\n" +" \n" +" Tùy chọn:\n" +" -s TTH\tTTH là tên tín hiệu\n" +" -n STH\tSTH là mã số tín hiệu\n" +" -l\tliệt kê tên tín hiệu; đối số sau “-l” nếu có được coi\n" +" \tlà mã số tín hiệu cần hiện tên\n" +" \n" +" Kill là lệnh hệ vỏ tích hợp vì hai lý do: nó cho phép dùng mã số\n" +" công việc thay cho mã số tiến trình và cho phép giết tiến trình\n" +" đạt giới hạn số các tiến trình được phép tạo.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay gặp lỗi." + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Định giá biểu thức số học.\n" +"\n" +" Định giá mỗi ĐỐI-SỐ dạng biểu thức số học. Định giá theo số nguyên\n" +" có giới hạn, không kiểm tra tràn số, mặc dù có bẫy chia cho không\n" +" và bật cờ lỗi. Danh sách toán tử bên dưới được nhóm theo nhóm độ\n" +" ưu tiên ngang hàng. Danh sách theo độ ưu tiên giảm dần.\n" +"\n" +" \tid++, id--\ttiền tiền/giảm\n" +" \t++id, --id\thậu gia/giảm\n" +" \t-, +\t\ttrừ, cộng (dấu)\n" +" \t!, ~\t\tphủ định lôgíc và trên bit\n" +" \t**\t\tsố mũ\n" +" \t*, /, %\t\tnhân, chia, số dư\n" +" \t+, -\t\tcộng, trừ\n" +" \t<<, >>\t\tdịch bit trái/phải\n" +" \t<=, >=, <, >\tso sánh\n" +" \t==, !=\t\tbằng, không bằng\n" +" \t&\t\tphép AND trên bit\n" +" \t^\t\tphép XOR trên bit\n" +" \t|\t\tphép OR trên bit\n" +" \t&&\t\tphép AND lôgíc\n" +" \t||\t\tphép OR lôgíc\n" +" \tBTHỨC ? BTHỨC : BTHỨC\n" +" \t\t\ttoán từ điều kiện\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tphép gán\n" +"\n" +" Biến hệ vỏ có thể dùng làm toán hạng. Tên biến được thay thế bằng\n" +" giá trị biến (chuyển thành số nguyên) trong biểu thức. Biến không\n" +" cần có thuộc tính số nguyên để dùng làm biểu thức.\n" +"\n" +" Các toán tử được định giá theo thứ tự ưu tiên. Các biểu thức con\n" +" nằm trong dấu ngoặc được định giá trước tiên, và có quyền cao hơn\n" +" các quy tắc đi trước bên trên.\n" +"\n" +" Trạng thái thoát:\n" +" Nếu ĐỐI-SỐ cuối cùng được định giá thành 0 thì trả về 1; không thì\n" +" trả về 0." + +#: builtins.c:994 +#, fuzzy +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Đọc một dòng từ đầu vào tiêu chuẩn và tách ra nhiều trường.\n" +" \n" +" Đọc một dòng từ đầu vào tiêu chuẩn, hoặc từ bộ mô tả tập tin FD nếu\n" +" dùng tùy chọn “-u”. Dòng được chia ra nhiều trường, trường đầu\n" +" tiên được gán cho biến TÊN đầu tiên, từ thứ hai cho TÊN thứ hai,\n" +" và cứ như vậy, và từ còn lại nào được gán cho TÊN cuối cùng. Chỉ những " +"ký\n" +" tự trong $IFS được coi là ký tự phân cách.\n" +" \n" +" Không có TÊN thì dòng được đọc sẽ lưu vào biến REPLY.\n" +" \n" +" Tùy chọn:\n" +" -a MẢNG\tlưu các trường vào biến mảng chỉ số MẢNG theo thứ tự,\n" +" \tbắt đầu từ không.\n" +" -d NGĂN_CÁCH\ttiếp tục đến khi đọc ký tự đầu tiên của DELIM thay\n" +" \t\tcho ký tự xuống dòng\n" +" -e \tdùng Readline để lấy dòng trong hệ vỏ tương tác\n" +" -i CHUỖI\tdùng CHUỖI làm văn bản đầu tiên cho Readline\n" +" -n nChữ\ttrả về sau khi đọc đủ số lượng ký tự này thay vì đọc hết " +"dòng\n" +" \t\tnhưng nếu gặp chuỗi phân tách khi ít hơn Nchữ\n" +" \t\tcác ký tự được đọc trước chuỗi phân tách\n" +" -N N\ttrả về chỉ sau khi đọc chính xác số lượng ký tự này,\n" +" \tnếu không gặp kết thúc tập tin (EOF) hay quá hạn đọc,\n" +" \tcũng bỏ qua dấu tách nào\n" +" -p NHẮC\txuất chuỗi NHẮC mà không có ký tự dòng mới theo sau,\n" +" \ttrước khi đọc\n" +" -r\tkhông cho phép gạch chéo ngược để thoát ký tự\n" +" -s\tkhông hiện lại dữ liệu nhập đến từ thiết bị cuối\n" +" -t\tTHỜI_GIAN_CHỜ\n" +" \tthời gian chờ tối đa và trả vềi không thành công nếu chưa đọc một\n" +" \tdòng dữ liệu nhập hoàn toàn trong số giây này. Giá trị\n" +" \tcủa biến TMOUT là thời hạn mặc định. Thời hạn này có\n" +" \tthể là một phân số. Nếu THỜI_HẠN là 0 thì việc đọc trả\n" +" \tlại thành công chỉ nếu dữ liệu nhập sẵn sàng trên bộ\n" +" \tmô tả tập tin đưa ra. Trạng thái thoát lớn hơn 128\n" +" \tnếu vượt quá thời hạn này.\n" +" -u FD\tđọc từ bộ mô tả tập tin FD thay cho đầu vào tiêu chuẩn\n" +" \n" +" Trạng thái thoát:\n" +" Mã trả lại là số không, nếu không gặp kết thúc tập tin, hay chờ quá\n" +" lâu, hoặc đưa ra bộ mô tả tập tin sai làm đối số cho “-u”." + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"Trở về từ hàm hệ vỏ.\n" +"\n" +" Thoát hàm hệ vỏ hoặc văn lệnh được “source” với mã trả về xác định\n" +" bởi N. Nếu không có N, trạng thái thoát là của lệnh thực hiện cuối\n" +" cùng trong hàm/văn lệnh.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại N, hoặc bị lỗi nếu hệ vỏ không đang chạy một hàm hay văn\n" +" lệnh." + +#: builtins.c:1054 +#, fuzzy +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"Đặt hay hủy giá trị của tùy chọn hệ vỏ và tham số vị trí.\n" +" \n" +" Sửa đổi giá trị của thuộc tính hệ vỏ và tham số vị trí,\n" +" hoặc hiển thị tên và giá trị của biến hệ vỏ.\n" +" \n" +" Tùy chọn:\n" +" -a Đánh dấu các biến được tạo hay sửa đổi để xuất ra\n" +" -b Thông báo ngay về công việc bị chấm dứt\n" +" -e Thoát ngay nếu câu lệnh thoát với trạng thái khác số không\n" +" -f Tắt chức năng tạo tên tập tin (glob)\n" +" -h Nhớ vị trí của mỗi câu lệnh khi nó được dò tìm\n" +" -k Mọi đối số gán được đặt vào môi trường cho một câu lệnh,\n" +" không phải chỉ những đối số nằm trước tên câu lệnh\n" +" -m Bật chức năng điều khiển công việc\n" +" -n Đọc câu lệnh mà không thực thi\n" +" -o TÊN_TÙY_CHỌN\n" +" Đặt biến tương ứng với TÊN_TÙY_CHỌN:\n" +" allexport giống -a\n" +" braceexpand giống -B\n" +" emacs dùng giao diện soạn thảo kiểu emacs\n" +" errexit giống -e\n" +" errtrace giống -E\n" +" functrace giống -T\n" +" hashall giống -h\n" +" histexpand giống -H\n" +" history bật lịch sử câu lệnh\n" +" ignoreeof hệ vỏ không thoát khi đọc EOF\n" +" interactive-comments\n" +" cho phép ghi chú trong lệnh tương tác\n" +" keyword giống -k\n" +" monitor giống -m\n" +" noclobber giống -C\n" +" noexec giống -n\n" +" noglob giống -f\n" +" nolog hiện thời chấp nhận nhưng bỏ qua\n" +" notify giống -b\n" +" nounset giống -u\n" +" onecmd giống -t\n" +" physical giống -P\n" +" pipefail giá trị trả lại của ống dẫn là\n" +" trạng thái của câu lệnh cuối cùng\n" +" có trạng thái khác không, hoặc số\n" +" không nếu không có câu lệnh thoát\n" +" với trạng thái khác không\n" +" posix thay đổi những thao tác khác với\n" +" Posix thành tuân theo Posix\n" +" privileged giống -p\n" +" verbose giống -v\n" +" vi dùng giao diện soạn thảo kiểu vi\n" +" xrace giống -x\n" +" -p Bật khi nào mã số thật và mã số có kết quả\n" +" không tương ứng với nhau.\n" +" Tắt tính năng xử lý tập tin $ENV\n" +" và nhập các hàm vào hệ vỏ.\n" +" Việc tắt tùy chọn này thì gây ra uid và gid có kết quả\n" +" được đặt thành uid và gid thật.\n" +" -t Thoát sau khi đọc và thực thi một câu lệnh\n" +" -u Xử lý biến chưa đặt là lỗi khi thay thế\n" +" -v In ra mỗi dòng nhập vào hệ vỏ khi nó được đọc\n" +" -x On ra mỗi câu lệnh và đối số tương ứng khi nó được thực thi\n" +" -B hệ vỏ sẽ mở rộng các dấu ngoặc móc\n" +" -C Nếu đặt thì không cho phép ghi đè lên tập tin bình thường\n" +" đã tồn tại bằng cách chuyển hướng kết xuất\n" +" -E Nếu đặt thì bẫy ERR được chức năng hệ vỏ kế thừa\n" +" -H Bật! bật chức năng thay thế kiểu. Cờ này được bật\n" +" theo mặc định khi hệ vỏ tương tác\n" +" -P Đặt thì không theo liên kết mềm\n" +" khi thực thi câu lệnh như cd mà chuyển đổi thư mục hiện tại\n" +" -T Nếu đặt thì bẫy DEBUG (gỡ lỗi) được các hàm của hệ vỏ kế " +"thừa\n" +" -- Gán bất cứ đối số còn lại nào cho những tham số thuộc vị " +"trí.\n" +" Nếu không còn thừa lại đối số nào, tham số vị trí\n" +" ìm kiếm được đặt.\n" +" - Gán bất cứ đối số còn lại nào cho những tham số thuộc vị " +"trí.\n" +" Hai tùy chọn -x và -v đều bị tắt.\n" +" \n" +" Việc dùng + thay - làm tắt cờ. Các cờ cũng có thể được dùng khi\n" +" gọi hệ vỏ. Giá trị các cờ hiện hành có thể tìm thấy trong biến\n" +" $-. Các đối số còn lại là tham số thuộc vị trí, và được gán (theo\n" +" thứ tự) cho $1, $2, .. $n. Không đưa ra đối số thì in ra mọi biến\n" +" shell.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi gặp tùy chọn sai." + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"Xóa giá trị và thuộc tính của biến hệ vỏ và các hàm.\n" +" \n" +" Đối với mỗi TÊN, gỡ bỏ biến hay hàm tương ứng.\n" +" \n" +" Tùy chọn:\n" +" -f\tcoi mỗi TÊN là hàm hệ vỏ\n" +" -v\tcoi mỗi TÊN là biến hệ vỏ\n" +" -n\tcoi TÊN như là tên tham chiếu và bỏ đặt biến đó thay vì\n" +" biến mà nó tham chiếu đến\n" +" \n" +" Không có tùy chọn thì sẽ thử xóa biến, và nếu không thành công,\n" +" sau đó thử xóa hàm.\n" +" \n" +" Một số biến không thể gỡ bỏ; nên xem “readonly”.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay TÊN chỉ-đọc." + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Đặt thuộc tính xuất khẩu cho biến hệ vỏ.\n" +"\n" +" Đánh dấu TÊN để tự động xuất vào môi trường của các lệnh được chạy\n" +" sau đó. Có GIÁ-TRỊ thì gán GIÁ-TRỊ trước khi xuất ra.\n" +"\n" +" Tùy chọn:\n" +" -f\ttham chiếu đến hàm hệ vỏ\n" +" -n\tgỡ bỏ thuộc tính xuất khẩu khỏi TÊN\n" +" -p\thiển thị danh sách các biến và hàm được xuất ra\n" +"\n" +" Đối số “--” ngừng phân tích tùy chọn cho các tham số còn lại.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn hay TÊN sai," + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"Đánh dấu biến hệ vỏ là không thể thay đổi.\n" +" \n" +" Đánh dấu TÊN là chỉ đọc; giá trị những TÊN này không được thay\n" +" đổi trong các phép gán sau. Nếu có GIÁ-TRỊ thì gán GIÁ-TRỊ trước\n" +" khi đánh dấu là chỉ đọc.\n" +" \n" +" Tùy chọn:\n" +" -a\ttham chiếu đến biến kiểu mảng chỉ số\n" +" -A\ttham chiếu đến biến kiểu mảng kết hợp\n" +" -f\ttham chiếu đến hàm hệ vỏ\n" +" -p\thiển thị danh sách biến và hàm chỉ đọc, tùy thuộc vào\n" +" \t\tcó tùy chọn -f hay không\n" +" \n" +" Đối số “--” ngừng phân tích tùy chọn cho các tham số còn lại.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay TÊN không hợp lệ." + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"Dịch vị trí đối số.\n" +"\n" +" Thay đổi tên của đối số vị trí $N+1,$N+2 … thành $1,$2 …\n" +" N là 1 nếu không chỉ định.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi N âm hay lớn hơn $#." + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"Thực thi lệnh từ tập tin trong hệ vỏ hiện tại.\n" +"\n" +" Đọc và thực thi lệnh từ TẬP-TIN trong hệ vỏ đang chạy. $PATH được\n" +" dùng để tìm thư mục chứa tập tin này. Nếu có đối số thì mỗi đối số\n" +" trở thành tham số vị trí khi TẬP-TIN được thực thi.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được thực thi trong\n" +" TẬP-TIN; không thành công nếu không thể đọc TẬP-TIN." + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"Ngưng chạy hệ vỏ.\n" +"\n" +" Ngưng chạy hệ vỏ này đến khi nhận tín hiệu SIGCONT. Nếu không ép\n" +" buộc thì không thể ngưng chạy hệ vỏ đăng nhập.\n" +"\n" +" Tùy chọn:\n" +" \t-f\tbuộc ngưng, thậm chí với hệ vỏ đăng nhập\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi chức năng điều khiển công việc không\n" +" được bật hoặc gặp lỗi." + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"Định giá biểu thức điều kiện.\n" +" \n" +" Thoát với trạng thái 0 (đúng) hoặc 1 (sai), tùy kết quả định giá\n" +" BTHỨC. Biểu thức có thể kiểu một ngôi hoặc hai ngôi. Biểu thức\n" +" một ngôi thường dùng để kiểm tra trạng thái tập tin. Ngoài ra còn\n" +" có toán tử chuỗi và so sánh số.\n" +" \n" +" Hành vi của lệnh test phụ thuộc vào số đối số. Đọc sổ tay hướng dẫn của\n" +" bash để có mô tả đầy đủ.\n" +" \n" +" Toán tử tập tin:\n" +" \n" +" -a TẬP-TIN Đúng nếu tập tin tồn tại.\n" +" -b TẬP-TIN Đúng nếu tập tin là biệt khối.\n" +" -c TẬP-TIN Đúng nếu tập tin là đặc biệt ký tự.\n" +" -d TẬP-TIN Đúng nếu tập tin là thư mục.\n" +" -e TẬP-TIN Đúng nếu tập tin tồn tại.\n" +" -f TẬP-TIN Đúng nếu tập tin tồn tại và là tập tin thường\n" +" -g TẬP-TIN Đúng nếu tập tin là set-group-id.\n" +" -h TẬP-TIN Đúng nếu tập tin là liên kết mềm.\n" +" -L TẬP-TIN Đúng nếu tập tin là liên kết mềm.\n" +" -k TẬP-TIN Đúng nếu tập tin có bit “sticky”.\n" +" -p TẬP-TIN Đúng nếu tập tin là ống dẫn có tên.\n" +" -r TẬP-TIN Đúng nếu tập tin bạn đọc được.\n" +" -s TẬP-TIN Đúng nếu tập tin tồn tại và không rỗng.\n" +" -S TẬP-TIN Đúng nếu tập tin là socket.\n" +" -t FD Đúng nếu FD được mở trên thiết bị cuối.\n" +" -u TẬP-TIN Đúng nếu tập tin là set-user-id.\n" +" -w TẬP-TIN Đúng nếu tập tin ghi được (bởi bạn).\n" +" -x TẬP-TIN Đúng nếu tập tin chạy được (bởi bạn).\n" +" -O TẬP-TIN Đúng nếu tập tin thực tế được bạn sở hữu.\n" +" -G TẬP-TIN Đúng nếu tập tin thực tế được nhóm của bạn sở hữu.\n" +" -N TẬP-TIN Đúng nếu tập tin đã bị sửa đổi từ lần đọc cuối.\n" +" \n" +" TẬP-TIN1 -nt TẬP-TIN2\n" +" Đúng nếu tập tin 1 mới hơn tập tin 2 (dựa theo\n" +" ngày sửa đổi)\n" +" \n" +" TẬP-TIN1 -ot TẬP-TIN2\n" +" Đúng nếu tập tin 1 cũ hơn tập tin 2.\n" +" \n" +" TẬP-TIN1 -ef TẬP-TIN2\n" +" Đúng nếu tập tin 1 là liên kết cứng tới tập tin 2.\n" +" \n" +" Toán tử chuỗi:\n" +" \n" +" -z CHUỖI Đúng nếu chuỗi rỗng.\n" +" \n" +" -n CHUỖI\n" +" CHUỖI Đúng nếu chuỗi khác rỗng.\n" +" \n" +" CHUỖI1 = CHUỖI2 Đúng nếu hai chuỗi bằng nhau.\n" +" CHUỖI1 != CHUỖI2 Đúng nếu hai chuỗi khác nhau.\n" +" CHUỖI1 < CHUỖI2 Đúng nếu CHUỖI1 xếp trước CHUỖI2 theo thứ tự từ " +"điển.\n" +" CHUỖI1 > CHUỖI2 Đúng nếu CHUỖI1 xếp sau CHUỖI2 theo thứ tự từ điển.\n" +" \n" +" Toán tử khác:\n" +" \n" +" -o TÙY_CHỌN Đúng nếu tùy chọn hệ vỏ này được bật.\n" +" -v BIẾN Đúng nếu BIẾN hệ vỏ này được đặt\n" +" -R BIẾN Đúng nếu BIẾN hệ vỏ này được đặt là tham chiếu tên.\n" +" ! BTHỨC Đúng nếu biểu thức này không đúng.\n" +" BTHỨC1 -a BTHỨC2 Đúng nếu cả hai biểu thức là đúng.\n" +" BTHỨC1 -o BTHỨC2 Đúng nếu một hoặc hai biểu thức đúng.\n" +" \n" +" ĐỐI-SỐ1 OP ĐỐI-SỐ2\n" +" Phép thử số học. OP (toán tử) là một trong -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Phép toán số học hai ngôi trả về đúng nếu ĐỐI-SỐ1 bằng, khác, nhỏ\n" +" hơn, nhỏ hơn hoặc bằng, lớn hơn, lớn hơn hoặc bằng ĐỐI-SỐ2.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu BTHỨC định giá là Đúng; không thành công\n" +" nếu BTHỨC định giá thành Sai hay đối số được chỉ ra sai." + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"Định giá biểu thức điều kiện.\n" +" \n" +" Lệnh này cùng chức năng lệnh tích hợp \"test\", nhưng đối số cuối\n" +" cùng phải là ký tự “]” để khớp với “[” ở đầu." + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Hiển thị thời lượng chạy tiến trình.\n" +"\n" +" In thời lượng chạy ở mức người dùng và hệ thống của hệ vỏ và các\n" +" tiến trình con.\n" +"\n" +" Trạng thái thoát:\n" +" Lúc nào cũng thành công." + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"Bẫy tín hiệu và sự kiện khác.\n" +"\n" +" Định nghĩa và kích hoạt các bộ xử lý khi hệ vỏ nhận được tín hiệu\n" +" hay các điều kiện khác.\n" +"\n" +" ĐỐI-SỐ là một lệnh cần đọc và thực thi khi hệ vỏ nhận được tín\n" +" hiệu theo đặc tả tín hiệu ĐTTH. Nếu không có ĐỐI-SỐ (và chỉ cung\n" +" cấp một ĐTTH), hoặc cung cấp “-”. mỗi tín hiệu được xác định thì\n" +" được đặt lại về giá trị gốc. Nếu ĐỐI-SỐ là chuỗi rỗng thì mỗi ĐTTH\n" +" bị hệ vỏ và những lệnh bên trong bỏ qua.\n" +"\n" +" Nếu ĐTTH là EXIT (0) thì ĐỐI-SỐ được thực thi khi thoát\n" +" khỏi hệ vỏ. Nếu là DEBUG, ĐỐI-SỐ được thực thi trước mỗi lệnh đơn\n" +" giản. Nếu là RETURN, ĐỐI-SỐ được thực thi mỗi khi hàm hệ vỏ hay\n" +" một văn lệnh, được chạy bởi lệnh “.” hoặc “source”. kết thúc thực\n" +" thi. ĐTTH ERR nghĩa là thực thi ĐỐI-SỐ mỗi khi lệnh gặp\n" +" lỗi dẫn đến thoát hệ vỏ khi bật tùy chọn -e.\n" +" \n" +" Nếu không có đối số, “trap” sẽ in danh sách của các lệnh gắn với\n" +" các tín hiệu.\n" +" \n" +" Tùy chọn:\n" +" -l\tin danh sách tên tín hiệu và mã số tương ứng\n" +" -p\thiển thị lệnh bắt tương ứng với mỗi ĐTTH\n" +"\n" +" Mỗi ĐTTH hoặc là tên tín hiệu trong , hoặc mã\n" +" số tín hiệu. Tên tín hiệu không phân biệt chữ hoa/thường, và không\n" +" bắt buộc phải dùng tiền tố SIG. Có thể gửi tín hiệu cho hệ vỏ bằng\n" +" \"kill -signal $$\".\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi đưa ra ĐTTH sai hay tùy chọn\n" +" sai." + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"Hiển thị thông tin về kiểu câu lệnh.\n" +" \n" +" Đối với mỗi TÊN, chỉ ra cách thông dịch lệnh khi được thực thi\n" +" theo tên lệnh.\n" +" \n" +" Tùy chọn:\n" +" -a\thiển thị mọi vị trí chứa tập tin thực thi được có TÊN;\n" +" \tkhông đặt tùy chọn “-p” thì bao gồm các bí danh, lệnh\n" +" \ttích hợp và hàm.\n" +" -f\tngăn tra cứu hàm hệ vỏ\n" +" -P\tbuộc tìm kiếm PATH đối với mỗi TÊN, thậm chí nếu nó là\n" +" \tbí danh, lệnh tích hợp hay hàm, và trả lại tên của tập\n" +" \ttin trên đĩa mà sẽ được thực thi\n" +" -p\ttrả về hoặc tên của tập tin trên đĩa mà sẽ được thực\n" +" \t\tthi, hoặc gì cả “type -t TÊN” sẽ không trả về “file”\n" +" \t\t(tập tin).\n" +" -t\txuất một trong những từ đơn “alias”, “keyword”, “function”,\n" +" \t“builtin”, “file” hoặc “”, nếu TÊN tương ứng là bí danh,\n" +" \ttừ khóa,hàm, lệnh hệ vỏ tích hợp, tập tin\n" +" \ttrên đĩa, hoặc không tìm thấy.\n" +" \n" +" Đối số:\n" +" TÊN\ttên câu lệnh cần giải thích.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu tìm thấy tất cả các TÊN; bị lỗi nếu không tìm " +"thấy." + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Sửa đổi giới hạn tài nguyên hệ vỏ.\n" +" \n" +" Điều khiển tài nguyên sẵn có của hệ vỏ và các tiến trình nó tạo ra,\n" +" trên hệ thống hỗ trợ điểu khiển tài nguyên như vậy.\n" +" \n" +" Tùy chọn:\n" +" -S\tdùng giới hạn tài nguyên “soft” (mềm)\n" +" -H\tdùng giới hạn tài nguyên “hard” (cứng)\n" +" -a\tthông báo mọi giới hạn hiện thời\n" +" -b\tkích cỡ của vùng đệm socket\n" +" -c\tkích cỡ tối đa của tập tin core được tạo\n" +" -d\tkích cỡ tối đa của từng đoạn dữ liệu của một tiến trình\n" +" -e\tmức ưu tiên lập lịch cao nhất (“nice”)\n" +" -f\tkích cỡ tập tin tối đa được ghi bởi hệ vỏ và tiến trình con\n" +" -i\tsố tín hiệu bị hoãn tối đa\n" +" -k\tsố lượng kqueues được phân bổ tối đa cho tiến trình này\n" +" -l\tkích cỡ tối đa mà tiến trình có thể khóa vào bộ nhớ\n" +" -m\tkích cỡ tập nội trú (RSS) tối đa\n" +" -n\tsố bộ mô tả tập tin tối đa được mở\n" +" -p\tkích thước vùng đệm ống dẫn\n" +" -q\tsố byte tối đa trong hàng đợi thông điệp POSIX\n" +" -r\tmức ưu lập lịch thời gian thực cao nhất\n" +" -s\tkích thước ngăn xếp tối đa\n" +" -t\tlượng thời gian cpu tối đa theo giây\n" +" -u\tsố tiến trình người dùng tối đa\n" +" -v\tkích cỡ của bộ nhớ ảo\n" +" -x\tsố khóa tập tin tối đa\n" +" -P\tsố lượng thiết bị cuối ảo tối đa\n" +" -T\tsố lượng tuyến trình tối đa\n" +" \n" +" Không phải tất cả các tùy-chọn này đều sẵn sàng trên mọi nền tảng.\n" +" \n" +" Nếu có GIỚI_HẠN thì nó là giá trị mới của tài nguyên được ghi. Ba\n" +" giá trị GIỚI_HẠN đặc biệt “soft”, “hard” và “unlimited” tương ứng\n" +" là giới hạn mềm hiện tại, giới hạn cứng hiện tại và không giới\n" +" hạn. Không có thì in giá trị hiện thời của tài nguyên được ghi.\n" +" Ngầm định “-f” nếu không chỉ định tùy chọn.\n" +" \n" +" Giá trị tính theo khối 1024 byte, trừ -t tính theo giây, -p theo\n" +" khối 512 byte và -u theo số tiến trình.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay có lỗi phát sinh." + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"Hiển thị hoặc đặt mặt nạ chế độ tập tin.\n" +"\n" +" Đặt mặt nạ tạo tập tin của người dùng thành CHẾ_ĐỘ. Không tham số\n" +" thì in chế độ hiện thời.\n" +"\n" +" Nếu CHẾ_ĐỘ bắt đầu bằng chữ số thì hiểu là số bát phân; không thì\n" +" nó là chuỗi chế độ ký hiệu được chmod(1) chấp nhận.\n" +"\n" +" Tùy chọn:\n" +" -p\tkhông có CHẾ_ĐỘ thì xuất theo định dạng dùng lại\n" +" \tlàm dữ liệu đầu vào\n" +" -S\tin kết xuất ký hiệu thay vì bát phân\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không có CHẾ_ĐỘ sai hay tùy chọn sai." + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Chờ công việc chạy xong và trả về trạng thái thoát.\n" +"\n" +" Đợi tiến trình xác định bởi ID, có thể là mã số tiến trình hay đặc\n" +" tả công việc, sau đó trả về trạng thái kết thúc của nó. Không có\n" +" ID thì đợi tất cả các tiến trình con đang chạy và trạng thái trả\n" +" về là không. Nếu ID là đặc tả công việc thì đợi tất cả các tiến\n" +" trình vẫn nằm trong ống dẫn của công việc đó.\n" +" \n" +" Nếu tùy-chọn -n được áp dùng thì đợi cho đến khi công việc kế chấm dứt " +"và\n" +" trả về trạng thái thoát của nó.\n" +"\n" +" Trạng thái thoát:\n" +" Trả về trạng thái của ID cuối; không thành công nếu ID sai hoặc đưa\n" +" ra tùy chọn sai." + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Đợi tiến trình chạy xong và trả về trạng thái thoát.\n" +"\n" +" Đợi từng tiến trình đã chỉ ra theo PID và báo cáo trạng thái kết thúc\n" +" của nó. Nếu không chỉ ra PID thì đợi tất cả các tiến trình con đang\n" +" chạy, và mã về là không. PID phải là mã số tiến trình.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của PID; không thành công nếu PID sai, hoặc nếu\n" +" đưa ra tùy chọn sai." + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Thực thi lệnh cho từng phần tử nằm trong danh sách.\n" +"\n" +" Vòng lặp “for” thực thi lệnh cho từng phần tử nằm trong danh sách. " +"Không\n" +" ghi “in TỪ …” thì ngầm định “in \"$@\"”. Đối với mỗi phần tử trong\n" +" danh sách, đặt giá trị phần tử đó cho biến TÊN rồi thực thi CÁC;CÂU;" +"LỆNH.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Số học cho vòng lặp.\n" +"\n" +" Tương đương với:\n" +" \t(( BTHỨC1 ))\n" +" \twhile (( BTHỨC2 )); do\n" +" \t\tCÁC;CÂU;LỆNH;\n" +" \t\t(( BTHỨC3 ))\n" +" \tdone\n" +" BTHỨC1, BTHỨC2 và BTHỨC3 là biểu thức số học. Ngầm định 1 cho bất\n" +" kì biểu thức bỏ trống nào.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Chọn từ từ một danh sách và thực thi lệnh.\n" +"\n" +" TỪ được triển khai, phát sinh danh sách từ. Tập hợp các từ kết quả được\n" +" in ra đầu ra lỗi chuẩn với một con số ở phía trước. Ngầm định “in\n" +" \"$@\"” nếu không có “in TỪ”. Dấu nhắc PS3 được hiển thị và một dòng\n" +" được đọc từ đầu vào tiêu chuẩn. Nếu dòng bao gồm số tương ứng với từ\n" +" hiển thị thì đặt từ đó vào biến TÊN. Nếu dòng rỗng thì hiển thị\n" +" lại TỪ và dấu nhắc. Nếu gặp EOF thì kết thúc. Đặt TÊN là rỗng với\n" +" các giá trị khác. Dòng đọc được lưu vào biến REPLY. LỆNH được thực\n" +" thi sau mỗi lần chọn đến khi gặp lệnh “break”.\n" +"\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"Thông báo thời gian sử dụng để thực thi ống dẫn.\n" +"\n" +" Thực thi ỐNG-DẪN và in tóm tắt thời gian thật, thời gian CPU người\n" +" dùng, và thời gian CPU hệ thống được dùng để thực thi ống dẫn đến\n" +" khi chấm dứt.\n" +"\n" +" Tùy chọn:\n" +" -p\tin bản tóm tắt thời gian theo định dạng POSIX\n" +"\n" +" Giá trị biến TIMEFORMAT được dùng làm định dạng kết xuất.\n" +"\n" +" Trạng thái thoát:\n" +" Trạng thái trả về là trạng thái trả về của ỐNG-DẪN." + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Thực thi lệnh chọn theo mẫu.\n" +"\n" +" Thực thi LỆNH một cách chọn dựa vào TỪ tương ứng với MẪU. Nhiều\n" +" mẫu cách nhau bằng “|”.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Thực thi câu lệnh có điều kiện.\n" +"\n" +" Danh sách “if CÁC;CÂU;LỆNH” được thực thi. Nếu trạng thái thoát là " +"không,\n" +" thì thực thi danh sách “then LỆNH”. Không thì thực thi lần lượt\n" +" mỗi danh sách “elif LỆNH”. và nếu trạng thái thoát là không, thì\n" +" thực thi danh sách “then LỆNH” tương ứng và hoàn tất lệnh\n" +" “if”. Không thì thực thi danh sách “else LỆNH” nếu có. Trạng thái\n" +" thoát của toàn bộ lệnh “if” là trạng thái của lệnh cuối cùng được\n" +" chạy, hoặc không nếu không có điều kiện nào trả về kết quả là\n" +" đúng.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Thực thi lệnh chừng nào phép thử còn thành công.\n" +"\n" +" Khai triển và thực thi CÁC;CÂU;LỆNH chừng nào lệnh cuối cùng trong " +"“while” LỆNH\n" +" có trạng thái thoát là không.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Thực thi lệnh chừng nào phép thử vẫn không thành công.\n" +"\n" +" Khai triển và thực thi CÁC;CÂU;LỆNH chừng nào lệnh cuối cùng trong " +"“until” LỆNH\n" +" có trạng thái thoát là khác không.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1671 +#, fuzzy +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"Tạo tiến trình phụ tên TÊN.\n" +"\n" +" Thực hiện LỆNH không đồng bộ có đầu vào/ra chuẩn nối đến ống dẫn\n" +" của bộ mô tả tập tin chỉ số 0 và 1 trong biến mảng TÊN trong hệ vỏ\n" +" được thực thi. TÊN mặc định là \"COPROC\".\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái thoát của câu LỆNH." + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"Định nghĩa hàm hệ vỏ.\n" +"\n" +" Tạo hàm hệ vỏ tên TÊN. Khi được gọi dưới dạng một câu lệnh đơn\n" +" giản, TÊN chạy LỆNH trong ngữ cảnh của hệ vỏ gọi. Khi TÊN được\n" +" gọi, các đối số được gửi cho hàm dạng $1…$n, và tên hàm nằm\n" +" trong $FUNCNAME.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu TÊN không phải chỉ đọc." + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Nhóm lệnh làm một đơn vị.\n" +"\n" +" Chạy tập hợp các lệnh trong cùng một nhóm. Đây là một cách để\n" +" chuyển hướng toàn bộ một nhóm lệnh.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"Tiếp tục lại công việc ở trước.\n" +"\n" +" Tương đương với đối số đặc tả công việc ĐTCV trong lệnh “fg”.\n" +" Tiếp tục lại công việc bị dừng chạy hay chạy nền. ĐTCV có thể xác\n" +" định tên công việc hoặc mã số công việc. Đặt “&” sau ĐTCV sẽ chạy\n" +" công việc ở nền, như là đối số đặc tả công việc trong “bg”.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của công việc đã tiếp tục lại." + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"Định giá biểu thức số học.\n" +"\n" +" BTHỨC được tính tùy theo các quy tắc về định giá số học.\n" +" Tương đương với “let BTHỨC”.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại 1 nếu BTHỨC tính là 0; không thì trả lại 0." + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"Thực thi câu lệnh có điều kiện.\n" +"\n" +" Trả về trạng thái 0 hoặc 1 tùy vào phép tính biểu thức điều kiện\n" +" BTHỨC. Biểu thức bao gồm các thành phần dùng trong lệnh tích hợp\n" +" “test” và có thể được tổ hợp bằng các toán tử sau:\n" +" \n" +" ( BTHỨC )\t\tTrả về giá trị của BTHỨC\n" +" ! BTHỨC\t\tĐúng nếu BTHỨC là không đúng. Ngược lại sai\n" +" BTHỨC1 && BTHỨC2\tĐúng nếu cả hai biểu thức đều đúng. Ngược lại sai.\n" +" BTHỨC1 || BTHỨC2\tĐúng nếu một trong hai biểu thức đúng. Ngược lại " +"sai.\n" +" \n" +" Khi dùng toán từ “==” và “!=”, chuỗi bên phải toán tử được dùng\n" +" làm mẫu, và thực hiện khớp mẫu. Khi dùng toán tử “=~”, chuỗi bên\n" +" phải toán tử được dùng làm biểu thức chính quy.\n" +"\n" +" Toán tử “&&” và “||” không tính BTHỨC2 nếu BTHỨC1 đủ để xác định\n" +" giá trị toàn biểu thức.\n" +"\n" +" Trạng thái thoát:\n" +" 0 hay 1 phụ thuộc vào giá trị của BTHỨC." + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"Tên và cách dùng các biến hệ vỏ thường dùng.\n" +"\n" +" BASH_VERSION\n" +" \tThông tin phiên bản của Bash đang chạy.\n" +" CDPATH\tDanh sách thư mục cách nhau bằng dấu hai chấm để tìm\n" +" \tđối số thư mục trong lệnh “cd”.\n" +" GLOBIGNORE\tDanh sách mẫu cách nhau bằng dấu hai chấm diễn tả\n" +" \ttên tập tin bị bỏ qua không bung đường dẫn.\n" +" HISTFILE\tTên tập tin chứa lịch sử câu lệnh của bạn.\n" +" HISTFILESIZE\n" +" \tSố dòng tối đa tập tin này có thể chứa.\n" +" HISTSIZE\tSố dòng tối đa mà hệ vỏ đang chạy có thể truy cập.\n" +" HOME\tTên đường dẫn đầy đủ của thư mục đăng nhập của bạn.\n" +" HOSTNAME\tTên của máy hiện thời của bạn.\n" +" HOSTTYPE\tLoại CPU phiên bản Bash này đang chạy.\n" +" IGNOREEOF\tĐiều khiển hành vi hệ vỏ khi nhận EOF là dữ liệu nhập\n" +" \tduy nhất. Đặt thì giá trị của nó là EOF có thể gặp\n" +" \tliên tục trên một dòng rỗng trước khi hệ vỏ kết thúc\n" +" \t(mặc định là 10). Không đặt thì EOF nghĩa là kết thúc\n" +" \tnhập.\n" +" MACHTYPE\tChuỗi mô tả hệ thống Bash đang chạy.\n" +" MAILCHECK\tSố giây giữa hai lần Bash kiểm tra có thư mới không.\n" +" MAILPATH\tDanh sách tên tập tin cách nhau bằng dấu hai chấm\n" +" \tđể Bash kiểm tra có thư mới không.\n" +" OSTYPE\tPhiên bản UNIX Bash đang chạy.\n" +" PATH\tDanh sách thư mục cách nhau bằng dấu hai chấm để tìm lệnh.\n" +" PROMPT_COMMAND\n" +" \tLệnh cần thực hiện trước khi in dấu nhắc chính.\n" +" PS1\t\tChuỗi dấu nhắc chính.\n" +" PS2\t\tChuỗi dấu nhắc phụ.\n" +" PWD\t\tTên đường dẫn đầy đủ của thư mục hiện tại.\n" +" SHELLOPTS\tDanh sách tùy chọn hệ vỏ được bật cách nhau bằng\n" +" \tdấu hai chấm.\n" +" TERM\tTên kiểu thiết bị cuối hiện thời.\n" +" TIMEFORMAT\tĐịnh dạng kết xuất cho thống kê thời gian của lệnh “time”.\n" +" auto_resume\tGiá trị khác rỗng thì trước tiên tìm một từ lệnh xuất\n" +" \thiện một mình trên một dòng, trong danh sách các công\n" +" \tviệc bị dừng chạy. Tìm ra thì đặt công việc đó vào nền\n" +" \ttrước. Giá trị “exact” có nghĩa là từ lệnh phải tương\n" +" \tứng chính xác với một câu lệnh trong danh sách các\n" +" \tcông việc bị dừng chạy. Giá trị “substring” có nghĩa\n" +" \tlà từ lệnh phải tương ứng với một chuỗi phụ của công\n" +" \tviệc đó.\n" +" histchars\tCác ký tự điều khiển bung và thay thế lịch sử. Ký tự\n" +" \tđầu tiên thường là ký tự thay thế lịch sử, thường là\n" +" \t“!”. Ký tự thứ hai là ký tự thay thế nhanh, thường là\n" +" \t“^”. Ký tự thứ ba là ký tự ghi chú về lịch sử, thường\n" +" \tlà “#”.\n" +" HISTIGNORE\tDanh sách mẫu cách bằng dấu hai chấm dùng để quyết định\n" +" \tnhững câu lệnh nào nên được lưu vào danh sách lịch sử.\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Thêm thư mục vào ngăn xếp.\n" +" \n" +" Thêm thư mục vào đỉnh của ngăn xếp thư mục, hoặc xoay ngăn xếp, làm cho\n" +" thư mục mới đầu ngăn xếp là thư mục làm việc hiện thời. Không có đối\n" +" số thì trao đổi hai thư mục đầu.\n" +" \n" +" -n\tNgăn chuyển đổi bình thường khi thêm thư mục\n" +" \tvào ngăn xếp, để thao tác chỉ ngăn xếp.\n" +" \n" +" +N\tXoay ngăn xếp để thư mục thứ N (đếm từ trái danh sách\n" +" \t“dirs” (bắt đầu từ số không) dời lên đầu.\n" +" \n" +" -N\tXoay ngăn xếp để thư mục thứ N (đếm từ phải danh sách\n" +" \t“dirs” (bắt đầu từ số không) dời lên đầu.\n" +" \n" +" dir\tThêm THMỤC vào đầu ngăn xếp thư mục, cho nó làm thư mục\n" +" \tlàm việc hiện thời mới.\n" +" \n" +" Lệnh tích hợp “dirs” hiển thị ngăn xếp thư mục.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra đối số sai, cũng không sai\n" +" chuyển đổi thư mục." + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"Gỡ bỏ thư mục khỏi ngăn xếp.\n" +" \n" +" Gỡ bỏ thư mục khỏi ngăn xếp thư mục. Không có đối số thì gỡ bỏ thư\n" +" mục đầu khỏi ngăn xếp và “cd” sang thư mục đầu mới.\n" +" \n" +" -n\tNgăn chuyển đổi bình thường khi gỡ bỏ thư mục\n" +" \tkhỏi ngăn xếp, để thao tác chỉ ngăn xếp.\n" +" \n" +" +N\tGỡ bỏ thư mục thứ N (đếm từ trái danh sách\n" +" \t“dirs” (bắt đầu từ số không). Ví dụ: “popd +0” bỏ\n" +" \tthư mục cuối cùng, “popd +1” bỏ thư mục thứ hai.\n" +" \n" +" -N\tGỡ bỏ thư mục thứ N (đếm từ phải danh sách\n" +" \t“dirs” (bắt đầu từ số không). Ví dụ: “popd -0” bỏ\n" +" \tthư mục cuối cùng, “popd -1” bỏ thư mục giáp cuối.\n" +" \n" +" Lệnh tích hợp “dirs” hiển thị ngăn xếp thư mục.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra đối số sai, cũng không sai\n" +" chuyển đổi thư mục." + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Hiển thị ngăn xếp thư mục.\n" +" \n" +" Hiển thị danh sách các thư mục được nhớ hiện thời. Các thư mục\n" +" tìm thấy chỗ của chúng trong danh sách với lệnh “pushd”;\n" +" bạn có thể lấy bản sao dự phòng thông qua danh sách với lệnh “popd”.\n" +" \n" +" Tùy chọn:\n" +" -c\txóa mọi phần tử trong ngăn xếp thư mục\n" +" -l\tđừng in phiên bản thư mục có dấu ngã\n" +" \t(tương đối so với thư mục chính của người dùng)\n" +" -p\tin ngăn xếp thư mục, mỗi dòng một mục\n" +" -v\tin ngăn xếp thư mục, mỗi dòng một mục kèm vị trí trong ngăn xếp\n" +" \n" +" Đối số:\n" +" +N\thiển thị mục thứ N bắt đầu từ bên trái danh sách\n" +" được hiển thị bằng “dirs” khi được gọi mà không đưa ra\n" +" tùy chọn, bắt đầu từ số không.\n" +" \n" +" -N\thiển thị mục thứ N bắt đầu từ bên phải danh sách\n" +" được hiển thị bằng “dirs” khi được gọi mà không đưa ra\n" +" tùy chọn, bắt đầu từ số không.\n" +" \n" +" Trạng thái thoát:\n" +" Trả về thành công nếu không đưa ra tùy chọn sai hay gặp lỗi." + +#: builtins.c:1916 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"Đặt và bỏ các tùy chọn hệ vỏ.\n" +" \n" +" Thay đổi thiết lập của mỗi tùy chọn hệ vỏ TÊN_TÙY_CHỌN. Không có\n" +" đối số tùy chọn thì liệt kê tất cả các tùy chọn hệ vỏ kèm chỉ dẫn\n" +" tùy chọn được đặt hay không.\n" +" \n" +" Tùy chọn:\n" +" -o\thạn chế TÊN_TÙY_CHỌN những tên được định nghĩa\n" +" \tđể sử dụng với “set -o”\n" +" -p\tin mỗi tùy chọn hệ vỏ kèm trạng thái\n" +" -q\tngăn kết xuất\n" +" -u\ttắt TÊN_TÙY_CHỌN\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu TÊN_TÙY_CHỌN được bật; không thành công nếu\n" +" đưa ra tùy chọn sai hay TÊN_TÙY_CHỌN bị tắt." + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Định dạng và in ĐỐI-SỐ theo điều khiển của ĐỊNH_DẠNG.\n" +" \n" +" Tùy chọn:\n" +" -v BIẾN\tgán kết xuất cho biến hệ vỏ này thay vì\n" +" \thiển thị nó trên đầu ra chuẩn\n" +" \n" +" ĐỊNH_DẠNG là chuỗi ký tự mà chứa ba kiểu đối tượng: ký tự bình\n" +" thường, cái này được chép ra đầu ra chuẩn; dãy ký tự thoát, dùng để\n" +" chuyển đổi sau đó sao chép sang đầu ra chuẩn; và các ký hiệu đặc tả định " +"dạng,\n" +" mỗi đặc tả này tác động lên đối số tương ứng.\n" +" \n" +" Ngoài đặc tả định dạng chuẩn được dùng trong printf(1) và printf(3),\n" +" printf được hiểu những đặc tả sau:\n" +" \n" +" %b\tkhai triển dãy thoát gạch chéo ngược trong đối số tương ứng\n" +" %q\ttrích dẫn đối số theo cách dùng lại làm dữ liệu đầu vào hệ vỏ\n" +" %(fmt)T\txuất chuỗi ngày tháng theo định dạng FMT từ strftime(3)\n" +" \n" +" Định dạng được dùng lại để có thể dùng hết đối số. Nếu\n" +" ở đây có ít đối số hơn yêu cầu của định dạng, định dạng thừa đó được\n" +" xử lý theo cách là sẽ có giá trị bằng số không hay chuỗi rỗng,\n" +" được áp dụng.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi đưa ra tùy chọn sai hay gặp lỗi khi ghi\n" +" hay gán." + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Chỉ định cách tự hoàn thiện đối số bằng Readline.\n" +" \n" +" Đối với mỗi TÊN, ghi rõ các đối số sẽ được tự hoàn thiện như thế nào.\n" +" Không đưa ra tùy chọn thì in ra các đặc tả tự hoàn thiện bằng một cách\n" +" cho phép dùng lại đặc tả làm dữ liệu nhập vào.\n" +" \n" +" Tùy chọn:\n" +" -p\tin đặc tả tự hoàn thiện đã tồn tại theo định dạng dùng lại được\n" +" -r\tgỡ bỏ đặc tả tự hoàn thiện cho mỗi TÊN,\n" +" \thoặc nếu có TÊN thì gỡ bỏ tất cả các đặc tả tự hoàn thiện\n" +" -D\táp dụng các sự hoàn thành và hành động làm mặc định\n" +" \tcho câu lệnh mà không xác định sự hoàn thành riêng\n" +" -E\táp dụng các sự hoàn thành và hành động cho câu lệnh “trống”\n" +" \t(empty) -- thử hoàn thành trên dòng trắng\n" +" \n" +" Khi chức năng tự hoàn thiện được thử, những hành động được làm theo thứ\n" +" tự của những tùy chọn chữ HOA bên trên. Tùy chọn -D có quyền ưu tiên\n" +" hơn -E. \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay gặp lỗi." + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Hiển thị từ gợi ý có thể phụ thuộc vào các tùy chọn.\n" +" \n" +" Dự định dùng từ bên trong một chức năng hệ vỏ mà tạo các việc\n" +" tự hoàn thiện có thể làm. Nếu đưa ra đối số TỪ vẫn tùy chọn, thì tạo\n" +" các kết quả tương ứng với TỪ.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay gặp lỗi." + +#: builtins.c:2016 +#, fuzzy +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"Sửa đổi hoặc hiển thị các tùy chọn tự hoàn thiện.\n" +"\n" +" Sửa đổi các tùy chọn tự hoàn thiện đối với mỗi TÊN, hoặc nếu không đưa\n" +" ra TÊN thì chức năng tự hoàn thiện hiện tại sẽ được thi hành, nếu không\n" +" TÙY_CHỌN được chỉ ra, in ra các tùy chọn tự hoàn thiện cho mỗi TÊN hay\n" +" các đặc tính kỹ thuật hiện có\n" +"\n" +" Tùy chọn:\n" +" -o tùy_chọn\tđặt TÙY_CHỌN tự hoàn thiện này đối với mỗi TÊN\n" +" -D\t\tSửa TÙY_CHỌN về tự hoàn thiện lệnh “default”\n" +" -E\t\tSửa TÙY_CHỌN về tự hoàn thiện lệnh “empty”\n" +"\n" +" Dùng “+o” thay cho “-o” thì tắt tùy chọn đưa ra.\n" +"\n" +" Đối số:\n" +"\n" +" Mỗi TÊN tham chiếu đến một câu lệnh cho đó một đặc tả tự hoàn thiện\n" +" phải được xác định trước dùng tích hợp “complete”. Nếu không đưa\n" +" ra TÊN để áp dụng, thì “compopt” phải được gọi bởi một hàm đang\n" +" tạo việc tự hoàn thiện, và các tùy chọn về hàm tạo việc tự hoàn thiện " +"đang\n" +" chạy cũng được sửa đổi.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi đưa ra tùy chọn sai, hoặc TÊN có một\n" +" đặc tả tự hoàn thiện được xác định." + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"Đọc các dòng từ đầu vào tiêu chuẩn vào một biến mảng chỉ số.\n" +" \n" +" Đọc các dòng từ đầu vào tiêu chuẩn vào biến mảng MẢNG, hoặc từ bộ\n" +" mô tả tập tin FD nếu đưa ra tùy chọn -u. Biến MAPFILE là MẢNG mặc\n" +" định.\n" +" \n" +" Tùy chọn:\n" +" -d ngăn_cách\tDùng NGĂN_CÁCH chấm dứt dòng, thay cho ký tự dòng mới\n" +" -n SỐ\tsao chép nhiều nhất SỐ dòng. Nếu là 0 thì sao chép mọi dòng.\n" +" -O GỐC\tbắt đầu gán cho MẢNG ở chỉ số GỐC. Chỉ số mặc định là 0.\n" +" -s SỐ\tbỏ qua SỐ dòng đầu tiên được đọc.\n" +" -t\tgỡ bỏ một ký tự NGĂN_CÁCH theo sau khỏi mỗi dòng được đọc\n" +" \t(mặc định là ký tự dòng mới).\n" +" -u FD\tđọc các dòng từ bộ mô tả tập tin FD thay vào từ đầu vào tiêu " +"chuẩn.\n" +" -C GỌI_NGƯỢC\tđịnh giá GỌI_NGƯỢC mỗi lần đọc LƯỢNG dòng.\n" +" -c LƯỢNG\tghi rõ số các dòng được đọc giữa hai lần GỌI_NGƯỢC.\n" +" \n" +" Đối số:\n" +" MẢNG\ttên biến mảng cần dùng cho dữ liệu tập tin.\n" +" \n" +" Nếu đưa ra -C mà không có -c thì lượng mặc định là 5000. Khi ước\n" +" lượng lời GỌI_NGƯỢC thì nó nhận chỉ số của phần tử mảng kế tiếp\n" +" được gán dưới dạng một đối số bổ sung.\n" +" \n" +" Không đưa ra một GỐC rõ ràng thì mapfile (tập tin sơ đồ) sẽ xóa\n" +" sạch MẢNG trước khi gán cho nó.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi đưa ra tùy chọn sai và MẢNG không phải\n" +" chỉ đọc hay không là một mảng chỉ số." + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Đọc các dòng từ một tập tin vào một biến mảng.\n" +" \n" +" Giống với “mapfile”." + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Tác quyền (C) năm 2015 của Tổ chức Quỹ Phần mềm Tự do, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Trả lại ngữ cảnh của cú gọi thủ tục con hiện thời.\n" +#~ "\n" +#~ " Nếu không có BTHỨC thì trả về " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: tiến trình %5ld (%s) trong the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Tín hiệu lạ #" + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Tác quyền (C) năm 2014 của Tổ chức Quỹ Phần mềm Tự do, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Tác quyền (C) năm 2009 của Tổ chức Phần mềm Tự do.\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Giấy phép GPLv2+: GNU GPL phiên bản 2 hoặc mới hơn \n" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". Cũng dùng BTHỨC thì trả lại\n" +#~ " " + +#~ msgid "" +#~ "; this extra information can be used to\n" +#~ " provide a stack trace.\n" +#~ " \n" +#~ " The value of EXPR indicates how many call frames to go back before " +#~ "the\n" +#~ " current one; the top frame is frame 0." +#~ msgstr "" +#~ "; thông tin thêm này có thể được sử dụng\n" +#~ "\tđể cung cấp một vết ngăn xếp (stack trace).\n" +#~ "\n" +#~ "\tGiá trị của BTHỨC ngụ ý bao nhiêu khung gọi cần lùi lại\n" +#~ "\ttương đối với cái hiện thời; khung trên cùng là khung 0." diff --git a/bash-5.1/po/zh_CN.gmo b/bash-5.1/po/zh_CN.gmo new file mode 100644 index 0000000000000000000000000000000000000000..9712f241e78ff2425ea55e002794ad94cafb70ee Binary files /dev/null and b/bash-5.1/po/zh_CN.gmo differ diff --git a/bash-5.1/po/zh_CN.po b/bash-5.1/po/zh_CN.po new file mode 100644 index 0000000000000000000000000000000000000000..17b11c3253e326e981440a60ff9077ac5d99cc18 --- /dev/null +++ b/bash-5.1/po/zh_CN.po @@ -0,0 +1,5724 @@ +# Chinese (Simplified) translation for bash package +# Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Xin Ye , 2010. +# Aron Xu , 2011. +# Anthony Fok , 2013. +# Wylmer Wang , 2014. +# Mingcong Bai , 2015. +# liushuyu , 2016. +# Mingye Wang , 2015, 2016. +# Boyuan Yang <073plan@gmail.com>, 2018, 2019. +# +# KNOWN DEFECTS (easy fixes, tedious work; sorted by priority): +# 0. Translation coverage when upstream sends new strings. +# +# 1. Argument lists in `help` are translated, but the `help blah` text still +# refers to the original name like WORDS. +# +# These long helps should be changed to follow their `help` synopsis. Use +# <参数> to refer to `参数' in the one-line synopsis. +# +# 2. Passive voice. When used inappropriately, they sound even worse in +# Chinese than in English. In fact huge amounts of `被' is what you use to +# spot translated text. (You don't always need `被' for passive voice +# either.) +# +# 3. Typography. +# a. Capitalization. English convensions mangle command names in help text +# if it's the first word of the sentense (e.g. `Getopts blah blah...'). +# Do yourself a favor and change the names back into lowercase. +# b. Quotes. Chinese has no `typewriter quote' convension, and standard +# “curly quotes” should be used. +# c. Colons. We don't use `: ` in Chinese; use `:`. Sometimes `:` is seen +# w/o a space (worse). +# d. Other stuff like parentheses and whitespace. Alignment can be quite +# important for Feeling Good(TM). +# +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2019-01-08 15:20-0500\n" +"Last-Translator: Boyuan Yang <073plan@gmail.com>\n" +"Language-Team: Chinese (simplified) \n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 2.2\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "数组下标不正确" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s:正在移除名称引用属性" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s:无法将索引数组转化为关联数组" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s:无效的关联数组键" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s:无法为非数字的索引赋值" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s:%s:为关联数组赋值时必须使用下标" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s:无法创建: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: 无法为命令找到键映射" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s:第一个非空字符不是“\"”" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "%2$s 中没有闭合的“%1$c”" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s:缺少冒号分隔符" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "“%s”: 无法解除绑定" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "大括号展开:无法为 %s 分配内存" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "大括号展开:为 %u 个元素分配内存失败" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "大括号展开:为“%s”分配内存失败" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "“%s”: 无效的别名" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "未启用行编辑" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "“%s”: 无效的键映射名" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s:无法读取: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "“%s”: 未知函数名" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s 未与任何键绑定。\n" + +# Blame the source string. +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s 可以被调用,通过 " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "“%s”: 无法解除绑定" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "循环计数" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "仅在 `for', `while', 或者`until' 循环中有意义" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"返回当前子调用的上下文。\n" +" \n" +" 不带有 EXPR 时,返回 \"$line $filename\"。带有 EXPR 时,返回\n" +" \"$line $subroutine $filename\";这个额外的信息可以被用于提供\n" +" 栈追踪。\n" +" \n" +" EXPR 的值 显示了到当前调用帧需要回去多少个调用帧;顶部帧\n" +" 是第 0 帧。\n" +" \n" +" 退出状态:\n" +" 除非 shell 不在执行一个 shell 函数或者 EXPR 无效,否则返回结\n" +" 果为0。" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME 未设定" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "参数太多" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "空目录" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD 未设定" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "第 %d 行:" + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "警告:" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s:用法:" + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s:选项需要一个参数" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s:需要数字参数" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s:未找到" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s:无效选项" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s:无效的选项名" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "“%s”: 不是有效的标识符" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "无效的八进制数" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "无效的十六进制数" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "无效数字" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s:无效的信号声明" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "“%s”: 不是有效的进程号或者任务声明" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s:只读变量" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s:%s 越界" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "参数" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s 越界" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s:无此任务" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s:无任务控制" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "无任务控制" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s:受限的" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "受限的" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s:不是 shell 内建" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "写错误: %s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "设定终端属性时出错: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "获取终端属性时出错: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s:获取当前目录时出错: %s:%s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s:模糊的任务声明" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "此版本内帮助不可用" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s:无法取消设定: 只读 %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s:无法取消设定" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s:无效的动作名" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s:没有补全声明" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "警告: -F 选项可能不像您预期的那样工作" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "警告: -C 选项可能不像您预期的那样工作" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "当前未执行补全功能" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "只能在函数中使用" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s:引用变量不能为数组" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s:不允许名称引用变量引用自身" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s:循环变量名引用" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "“%s”: 无效的名称引用变量名" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "无法用 `-f' 生成函数" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s:只读函数" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s:引号内的复合数组赋值已被弃用" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s:无法以这种方式销毁数组变量" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s:无法将关联数组转化为索引数组" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "动态加载不可用" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "无法打开共享对象 %s:%s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "无法在共享对象 %2$s 中找到 %1$s: %3$s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s:未以动态方式加载" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "为 %s 载入函数失败 (%d): 未载入" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s:未以动态方式加载" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s:无法删除: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s:是一个目录" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s:不是常规文件" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s:文件太大" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s:无法执行二进制文件" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s:无法执行: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "注销\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "不是登录 shell: 使用 `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "有停止的任务。\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "有运行中的任务。\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "未找到命令" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "历史声明" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s:无法打开临时文件: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "当前" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "在不带任务控制的情况下启动了任务 %d" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s:非法选项 -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s:选项需要一个参数 -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "已禁用哈希" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s:哈希表为空\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "命中\t命令\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Shell 命令匹配关键字“" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"没有与“%s”匹配的帮助主题。尝试使用“help help”、“man -k %s”或“info %s”。" + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s:无法打开: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"这些 shell 命令是内部定义的。请输入 `help' 以获取一个列表。\n" +"输入 `help 名称' 以得到有关函数`名称'的更多信息。\n" +"使用 `info bash' 来获得关于 shell 的更多一般性信息。\n" +"使用 `man -k' 或 `info' 来获取不在列表中的命令的更多信息。\n" +"\n" +"名称旁边的星号(*)表示该命令被禁用。\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "最多只能使用 -anrw 选项中的一个" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "历史位置" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s:无效时间戳" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s:历史扩展失败" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s:inlib 失败" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "其他选项不能与 `-x' 同时使用" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s:参数必须是进程或任务 ID" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "未知错误" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "需要表达式" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s:不是一个索引数组" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s:无效的文件描述符声明" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: 无效的文件描述符: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s:无效的行数" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s:无效的数组基数" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s:无效的回调量子" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "空数组变量名" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "需要数组变量支持" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "“%s”: 缺少格式字符" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "“%c”:无效的时间格式声明" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "“%c”:无效格式字符" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "警告: %s:%s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "格式解析问题: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "使用了 \\x 但缺少十六进制位" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "使用了 \\%c 但缺少 unicode 数" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "无其他目录" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s:无效参数" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<无当前目录>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "目录栈为空" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "目录栈索引" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"显示当前记住的目录列表。 目录\n" +" 通过 `pushd' 命令加入这个列表;您可以\n" +" 使用 `popd' 命令对列表进行遍历。\n" +" \n" +" 选项:\n" +" -c\t删除所有元素以清除目录栈\n" +" -l\t不打印与家目录相关的以波浪号\n" +" \t为前缀的目录\n" +" -p\t每行一个条目打印目录栈\n" +" -v\t以栈位置为前缀,每行一个条目\n" +" \t打印目录栈\n" +" \n" +" 参数:\n" +" +N\t以 dirs 不带选项输出的顺序显示列表从左起第N个条目,\n" +" \t从 0 开始。\n" +" \n" +" -N\t以 dirs 不带选项输出的顺序显示列表从右起第N个项目,\n" +"\t从 0 开始。" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"在目录栈顶部加入一个目录,或者论询\n" +" 目录栈,是当前工作目录成为新的栈顶\n" +" 不带参数时,交换栈顶的两个目录。\n" +" \n" +" 选项:\n" +" -n\t抑制增加栈中目录时通常的改变目录的操作,\n" +" \t从而只进行栈操作。\n" +" \n" +" 参数:\n" +" +N\t轮转栈使得第N个目录(`dirs' 的\n" +" \t输出列表中左起,从0开始)\n" +" \t升至栈顶。\n" +" \n" +" -N\t轮转栈使得第N个目录(`dirs' 的\n" +" \t输出列表中右起,从0开始)\n" +" \t升至栈顶\n" +" \n" +" dir\t添加目录至栈顶,并\n" +" \t使其成为新的当前工作目录。\n" +" \n" +" `dirs' 内建命令显示目录栈." + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"从目录栈中删除条目。不带参数时,删除\n" +" 栈顶目录并改变至新的栈顶目录。\n" +" \n" +" 选项:\n" +" -n\t抑制从栈中删除目录时通常的改变目录操作,\n" +" \t从而只进行栈操作。\n" +" \n" +" 参数:\n" +" +N\t从 `dirs' 输出的列表中,\n" +" \t删除左起第N个条目,计数从0开始。例如:`popd +0'\n" +" \t删除第一个目录,`popd +1' 删除第二个。\n" +" \n" +" -N\t从 `dirs' 输出的列表中,\n" +" \t删除右起第N个条目,计数从0开始,例如:`popd -0'\n" +" \t删除最后一个条目,`popd -1' 删除倒数第二个。\n" +" \n" +" `dirs' 内建变量显示目录栈。" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s:无效的超时声明" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "读错误: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "只能从函数或者源脚本返回(`return')" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "无法同时取消设定一个函数和一个变量" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s:不是数组变量" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s:不是函数" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s:无法导出" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "位移计数" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "无法同时设定和取消设定 shell 选项" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s:无效的 shell 选项名" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "需要文件名参数" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s:文件未找到" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "无法挂起" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "无法挂起一个登录 shell" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s 是“%s”的别名\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s 是 shell 关键字\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s 是函数\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s 是特殊 shell 内建\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s 是 shell 内建\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s 是 %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s 已被录入哈希表 (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s:无效的 limit 参数" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "“%c”:命令错误" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s:无法获取 limit 值: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limit" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s:无法修改 limit 值: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "八进制数" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "“%c”:无效的符号状态运算符" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "“%c”:无效的符号状态字符" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr "行" + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "上一个命令: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "中止..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "报告:" + +#: error.c:462 +msgid "unknown command error" +msgstr "未知的命令错误" + +#: error.c:463 +msgid "bad command type" +msgstr "错误的命令类型" + +#: error.c:464 +msgid "bad connector" +msgstr "错误的条件连接符" + +#: error.c:465 +msgid "bad jump" +msgstr "错误的跳转" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s:未绑定的变量" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\a 等待输入超时:自动注销\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "无法从 /dev/null 重定向标准输入: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "时间格式: `%c': 无效的格式字符" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: 副进程 [%d:%s] 仍然存在" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "管道错误" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: 超出最大 eval 嵌套层数 (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s:超出最大 source 嵌套层数 (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s:超出最大函数嵌套层数 (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s:受限的: 无法在命令名中使用 `/'" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s:未找到命令" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s:%s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s:%s:解释器错误" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s:无法执行二进制文件: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "“%s”: 特殊内建" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "无法复制文件描述符 %d 到文件描述符 %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "表达式递归层次越界" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "递归栈下溢" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "表达式中有语法错误" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "尝试给非变量赋值" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "变量赋值中有语法错误" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "除以 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "错误:表达式赋值符号错误" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "条件表达式需要 `:'" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "指数小于 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "预增符或预减符后应跟有标识符" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "缺少“)”" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "语法错误: 需要操作数" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "语法错误: 无效的算术运算符" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s:%s (错误符号是 \"%s\")" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "无效的算术进制" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s:无效的行数" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "数值太大不可为算术进制的基" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s:表达式错误\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: 无法访问父目录" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "无法为文件描述符 %d 重置nodelay模式" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "无法从文件描述符 %d 为 bash 的输入获取一个新的文件描述符" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: 已经存在新的文件描述符 %d 的缓冲区" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: 进程组管道" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "叉分 (fork) 出的的进程号 %d 出现在运行中的任务 %d 中" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "删除进程组 %2$ld 中已停止的任务 %1$d" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: 进程号 %5ld(%s) 标注为仍活着" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: 无此进程号" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "信号 %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "已完成" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "已停止" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "已停止(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "运行中" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "已完成(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "退出 %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "未知状态" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(核心已转储)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (工作目录: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "子进程 setpgid (%ld 到 %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: 进程号 %ld 不是当前 shell 的子进程" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wiat_for: 没有进程 %ld 的记录" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: 任务 %d 已停止" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s:无此任务" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s:任务已经终止" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s:任务 %d 已在后台" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: 打开 WNOHANG 以避免无限阻塞" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s:行 %d: " + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (核心已转储)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(当前工作目录:%s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp 失败" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: 后台无任务控制" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: 行规则" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "无法设定终端进程组(%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "此 shell 中无任务控制" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: 断言失败: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d:断言已修补\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "未知" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: 空闲链表中的块损坏" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free:调用时用了已经释放的块作为参数" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: 调用时用了未分配的块作为参数" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: 检测到下溢;mh_nbytes 越界" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: 检测到下溢;mh_nbytes 越界" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: 其实和末尾块大小不一致" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc:调用时用了未分配的块作为参数" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: 检测到下溢;mh_nbytes 越界" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: 检测到下溢;mh_nbytes 越界" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: 其实和末尾块大小不一致" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: 分配表已经充满了 FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p 在表中显示为已分配?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p 在表中显示为已释放?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "无效的基" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s:未知主机" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s:无效的服务" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s:错误的网络路径声明" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "不支持网络操作" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale:LC_ALL:无法改变区域选项 (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale:LC_ALL:无法改变区域选项 (%s):%s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale:%s:无法改变区域选项 (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale:%s:无法改变区域选项 (%s):%s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "您在 $_ 中有邮件" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "您在 $_ 中有新邮件" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "%s 中的邮件已被读过\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "语法错误:需要算术表达式" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "语法错误:需要 `;'" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "语法错误:`((%s))'" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document:错误的指令类型 %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "立即文档在第 %d 行被文件结束符分隔 (需要“%s”)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection:重定向指令“%d”越界" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "shell_getc:shell_input_line_size (%zu) 超过 SIZE_MAX (%lu):行被截断" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "超出最大立即文档数量" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "寻找匹配的“%c”时遇到了未预期的文件结束符" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "寻找“]]”时遇到了未预期的文件结束符" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "条件表达式中有语法错误:未预期的符号“%s”" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "条件表达式中有语法错误" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "未预期的符号“%s” ,需要“)”" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "需要“)”" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "一元条件运算符使用了未预期的参数“%s”" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "一元条件运算符使用了未预期的参数" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "未预期的符号“%s”,需要二元条件运算符" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "需要二元条件运算符" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "二元条件运算符使用了未预期的参数“%s”" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "二元条件运算符使用了未预期的参数" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "条件命令中有未预期的符号“%c”" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "条件命令中有未预期的符号“%s”" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "条件命令中有未预期的符号 %d" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "未预期的符号“%s”附近有语法错误" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "“%s”附近有语法错误" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "语法错误: 未预期的文件结尾" + +#: parse.y:6365 +msgid "syntax error" +msgstr "语法错误" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "使用 \"%s\" 退出 shell 。\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "寻找匹配的“)”时遇到了未预期的文件结束符" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "补全:未找到函数 “%s”" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s:疑似重试循环" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s:空的补全声明" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: 错误的条件连接符 `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: 无效的文件描述符" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: 空的文件指针" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': 无效的格式字符" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "文件描述符超出范围" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s:模糊的重定向" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s:无法覆盖已存在的文件" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s:受限的: 无法重定向输出" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "无法为立即文档创建临时文件: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s:无法将文件描述符赋值给变量" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "没有网络时不支持 /dev/(tcp|udp)/host/port" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "重定向错误: 无法复制文件描述符" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "无法找到 /tmp ,请创建!" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp 必须为有效的目录名" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "在交互式 shell 中将忽略美化输出模式" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: 无效的选项" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "无法将 uid 设为 %d: 有效 uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "无法将 gid 设为 %d: 有效 gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "无法启动调试器;调试模式已禁用" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s:是一个目录" + +# 这个是查看用户的 /etc/passwd 信息得到的名字。既然是用户的名字,就叫做无名氏吧。(有点想写“红领巾”来着。) +#: shell.c:1881 +msgid "I have no name!" +msgstr "无名氏!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash,版本 %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"用法:\t%s [GNU 长选项] [选项] ...\n" +"\t%s [GNU 长选项] [选项] 脚本文件 ...\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU 长选项:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Shell 选项:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD 或 -c <命令> 或 -O \t\t(仅适合调用)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s 或 -o <选项>\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "请输入`%s -c \"help set\"' 以获得关于 shell 选项的更多信息\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "请输入 `%s -c help' 以获得关于 shell 内建命令的更多信息.\n" + +# 写如何报告程序错误的地方应该提到如何报告翻译问题。 +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" +"请使用“bashbug”命令来报告程序错误。\n" +"请将翻译错误报告到 。\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash 首页:\n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "使用 GNU 软件的通用帮助:\n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: 无效的操作" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "伪信号" + +#: siglist.c:50 +msgid "Hangup" +msgstr "挂断" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "中断" + +#: siglist.c:58 +msgid "Quit" +msgstr "退出" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "非法的指令" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "断点追踪/陷阱" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "放弃指令" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "模拟器陷阱指令" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "浮点数异常" + +#: siglist.c:86 +msgid "Killed" +msgstr "已杀死" + +#: siglist.c:90 +msgid "Bus error" +msgstr "总线错误" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "段错误" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "错误的系统调用" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "管道破裂" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "闹钟" + +#: siglist.c:110 +msgid "Terminated" +msgstr "已终止" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "紧急 I/O 状况" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "已停止(信号)" + +#: siglist.c:126 +msgid "Continue" +msgstr "继续" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "子进程已死或者停止" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "已停止(tty 输入)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "已停止(tty 输出)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O 就绪" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU 限制" + +#: siglist.c:154 +msgid "File limit" +msgstr "文件限制" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "报警(虚拟)" + +# Personally I treat this as something coming from alarm() by a profiler. +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "报警(分析)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "窗口已改变" + +#: siglist.c:170 +msgid "Record lock" +msgstr "记录锁" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "用户信号1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "用户信号2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT 待输入数据" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "即将停电" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "系统即将崩溃" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "迁移进程至另一个 CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "编程错误" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "已授予 HFT 监视模式" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "已撤销 HFT 监视模式" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "已完成 HFT 声音序列" + +#: siglist.c:214 +msgid "Information request" +msgstr "信息请求" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "未知信号 #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "错误的替换: 在 %2$s 中没有闭合的 `%1$s'" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s:无法将链表赋值给数组成员" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "无法为进程替换创建管道" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "无法为进程替换创建子进程" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "无法打开命名管道 %s 以读取" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "无法打开命名管道 %s 进行写入" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "无法将命名管道 %s 作为文件描述符 %d 复制" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "命令替换:忽略输入中的 null 字节" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "无法为命令替换创建管道" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "无法为命令替换创建子进程" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: 无法将管道复制为文件描述符 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s:无效的引用变量名" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s:无效的间接展开" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s:无效的变量名" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s:参数未设置" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s:参数为空或未设置" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s:子串表达式 < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s:错误的替换" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s:无法这样赋值" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "未来版本的 shell 会强制估值为算术替换" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "错误的替换: 在 %s 中没有闭合的 \"`\"" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "无匹配: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "需要参数" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s:需要整数表达式" + +#: test.c:265 +msgid "`)' expected" +msgstr "需要“)”" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "需要“)”,却找到 %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s:需要二元表达式" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s:需要一元表达式" + +#: test.c:881 +msgid "missing `]'" +msgstr "缺少 `]'" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "语法错误:需要 `;'" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "无效的信号数" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: 超出最大的 trap handler 层次 (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: trap_list[%d] 中的错误值: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: 信号处理器是 SIG_DFL,重新发送 %d (%s) 给自己" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: 错误的信号 %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "“%s”函数定义导入错误" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "shell 层次 (%d) 太高,重置为 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: 当前作用域中没有函数上下文" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s:变量不可赋值" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s:将整数赋值给名称引用" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: 当前作用域中没有函数上下文" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s 的 exportstr 为空" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%2$s 的 exportstr 中有无效的字符 %1$d" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "%s 的 exportstr 中没有“=”" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: shell_variables 的头部不是函数上下文" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: 没有 global_variables 上下文" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: shell_variables 的头部不是临时环境作用域" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s:%s:无法作为文件打开" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s:%s:追踪文件描述符的值无效" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s:%s:兼容版本数值越界" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "版权所有 (C) 2013 自由软件基金会." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"许可证 GPLv3+: GNU GPL 许可证第三版或者更新版本 \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash,版本 %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "本软件是自由软件,您可以自由地更改和重新发布。" + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "在法律许可的情况下特此明示,本软件不提供任何担保。" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s:无法分配 %lu 字节 (已分配 %lu 字节)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s:无法分配 %lu 字节" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s:%s:%d:无法分配 %lu 字节 (已分配 %lu 字节)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s:%s:%d:无法分配 %lu 字节" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [名称[=值] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] 名称 [名称 ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPSVX] [-m 键映射] [-f 文件名] [-q 名称] [-u 名称] [-r 键序列] [-x " +"键序列:shell-命令] [键序列:readline-函数 或 readline-命令]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell 内建 [参数 ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [表达式]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [目录]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] 命令 [参数 ...]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [名称[=值] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] 名称[=值] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] 名称[=值] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [参数 ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [参数 ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f 文件名] [名称 ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [参数 ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts 选项字符串 名称 [参数]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a 名称] [命令 [参数 ...]] [重定向 ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e 编辑器名] [-lnr] [起始] [终结] 或 fc -s [模式=替换串] [命令]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [任务声明]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [任务声明 ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p 路径名] [-dt] [名称 ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [模式 ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d 偏移量] [n] 或 history -anrw [文件名] 或 history -ps 参数 " +"[参数...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [任务声明 ...] 或 jobs -x 命令 [参数]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [任务声明 ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s 信号声明 | -n 信号编号 | -信号声明] 进程号 | 任务声明 ... 或 kill -" +"l [信号声明]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let 参数 [参数 ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a 数组] [-d 分隔符] [-i 缓冲区文字] [-n 读取字符数] [-N 读取字" +"符数] [-p 提示符] [-t 超时] [-u 文件描述符] [名称 ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o 选项名] [--] [参数 ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [名称 ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [名称[=值] ...] 或 export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [名称[=值] ...] 或 readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source 文件名 [参数]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". 文件名 [参数]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [表达式]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ 参数... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[参数] 信号声明 ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] 名称 [名称 ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [限制]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [模式]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [编号 ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [进程号 ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for 名称 [in 词语 ... ] ; do 命令; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( 表达式1; 表达式2; 表达式3 )); do 命令; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in 词语 ... ;] do 命令; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] 管道" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case 词 in [模式 [| 模式]...) 命令 ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "if 命令; then 命令; [ elif 命令; then 命令; ]... [ else 命令; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while 命令; do 命令; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until 命令; do 命令; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [名称] 命令 [重定向]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function 名称 { 命令 ; } 或 name () { 命令 ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ 命令 ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( 表达式 ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ 表达式 ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - 一些 shell 变量的名称和含义" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | 目录]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [选项名 ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] 格式 [参数]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o 选项] [-A 动作] [-G 全局模式] [-W " +"词语列表] [-F 函数] [-C 命令] [-X 过滤模式] [-P 前缀] [-S 后缀] [名称 ...]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o 选项] [-A 动作] [-G 全局模式] [-W 词语列表] [-" +"F 函数] [-C 命令] [-X 过滤模式] [-P 前缀] [-S 后缀] [词语]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o 选项] [-DEI] [名称 ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d 分隔符] [-n 计数] [-O 起始序号] [-s 计数] [-t] [-u fd] [-C 回调] " +"[-c 量子] [数组]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d 定界符] [-n 计数] [-O 起始序号] [-s 计数] [-t] [-u fd] [-C 回" +"调] [-c 量子] [数组]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"定义或显示别名。\n" +" \n" +" 不带参数时,`alias' 以可重用的格式\n" +" `alias 名称=值'在标准输出设备上打印别名列表。\n" +" \n" +" 否则,对于每个给定值的名称定义一个别名。\n" +" 值末尾的空格会使下一个词被检测作为别名替换展开。\n" +" \n" +" 选项:\n" +" -p\t以可重用的格式打印所有的已定义的别名\n" +" \n" +" 退出状态:\n" +" 除非一个没有定义的名字被作为参数提供,否则 alias \n" +" 返回值为真。" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"从别名定义列表中删除每一个“名字”。\n" +" \n" +" 选项:\n" +" -a\t删除所有的别名定义\n" +" \n" +" 返回成功,除非“名字”不是一个已存在的别名。" + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"设定 Readline 键绑定和变量。\n" +" \n" +" 绑定一个键序列到一个 Readline 函数或者宏,或者设定一个\n" +" Readline 变量。非选项参数的语法和 ~/.inputrc 文件中的等\n" +" 同,但是必须作为一个参数被传递,\n" +" 例如,bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" 选项:\n" +" -m 键映射 在此命令执行过程中使用指定的键映射。\n" +" 可被接受的键映射名字有 emacs、emacs-standard、emacs-" +"meta、\n" +" emacs-ctlx、vi、vi-move、vi-command、和 vi-insert。\n" +" -l 列出函数名称。\n" +" -P 列出函数名称和绑定。\n" +" -p 以可以重新用作输入的格式列出函数名称和绑定。\n" +" -S 列出可以启动宏的键序列以及它们的值\n" +" -s 以可以重新用作输入的格式列出可以启动宏的键以及它们的" +"值。\n" +" -V 列出变量名成和它们的值\n" +" -v 以可以重新用作输入的格式列出变量的名称和它们的值\n" +" -q 函数名 查询指定的函数可以由哪些键启动。\n" +" -u 函数名 反绑定所有绑定至指定函数的键。\n" +" -r 键序列 取消指定键序列的绑定。\n" +" -f 文件名 从指定文件中读取键绑定。\n" +" -x 键序列:shell命令\t当指定的键序列被输入时,执行指定的 shell 命令。\n" +" -X 以可被重用的形式列出用 -x 绑定的键序列和命令。\n" +" \n" +" 退出状态:\n" +" 除非使用了无法辨认的选项或者错误发生,否则返回0." + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"退出 for、while 或 until 循环\n" +" \n" +" 退出一个 FOR、WHILE 或 UNTIL 循环。如果指定了N,则跳出N重\n" +" 循环\n" +" \n" +" 退出状态:\n" +" 退出状态为0除非 N 不大于或等于 1。" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"继续 for、while 或 until 循环。\n" +" \n" +" 继续当前 FOR、WHILE 或 UNTIL 循环的下一步。\n" +" 如果指定了 N, 则继续当前的第 N 重循环。\n" +" \n" +" 退出状态:\n" +" 退出状态为 0 除非 N 不大于或等于1。" + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"执行 shell 内建。\n" +" \n" +" 带参数 ARGs 执行 SHELL-BUILTIN 内建,并且不做命令查询\n" +" 在希望以 shell 函数的形式来重新实现 shell 内建,\n" +" 并且希望在函数之内执行该 shell 内建的情况下有用处。\n" +" \n" +" 退出状态:\n" +" 以 SHELL-BUILTIN 内建的退出状态为准,或者如果 SHELL-BUILTIN 不是一个\n" +" shell 内建时为假。" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"返回当前子调用的上下文。\n" +" \n" +" 不带有 EXPR 时,返回 \"$line $filename\"。带有 EXPR 时,返回\n" +" \"$line $subroutine $filename\";这个额外的信息可以被用于提供\n" +" 栈追踪。\n" +" \n" +" EXPR 的值 显示了到当前调用帧需要回去多少个调用帧;顶部帧\n" +" 是第 0 帧。\n" +" \n" +" 退出状态:\n" +" 除非 shell 不在执行一个 shell 函数或者 EXPR 无效,否则返回结\n" +" 果为0。" + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"改变 shell 工作目录。\n" +" \n" +" 改变当前目录至 DIR 目录。默认的 DIR 目录是 shell 变量 HOME\n" +" 的值。\n" +" \n" +" 变量 CDPATH 定义了含有 DIR 的目录的搜索路径,其中不同的目录名称由冒号 (:)" +"分隔。\n" +" 一个空的目录名称表示当前目录。如果要切换到的 DIR 由斜杠 (/) 开头,则 " +"CDPATH\n" +" 不会用上变量。\n" +" \n" +" 如果路径找不到,并且 shell 选项 `cdable_vars' 被设定,则参数词被假定为一" +"个\n" +" 变量名。如果该变量有值,则它的值被当作 DIR 目录。\n" +" \n" +" 选项:\n" +" -L\t强制跟随符号链接: 在处理 `..' 之后解析 DIR 中的符号链接。\n" +" -P\t使用物理目录结构而不跟随符号链接: 在处理 `..' 之前解析 DIR 中的符" +"号链接。\n" +" -e\t如果使用了 -P 参数,但不能成功确定当前工作目录时,返回非零的返回" +"值。\n" +" -@\t在支持拓展属性的系统上,将一个有这些属性的文件当作有文件属性的目" +"录。\n" +" \n" +" 默认情况下跟随符号链接,如同指定 `-L'。\n" +" `..' 使用移除向前相邻目录名成员直到 DIR 开始或一个斜杠的方式处理。\n" +" \n" +" 退出状态:\n" +" 如果目录改变,或在使用 -P 选项时 $PWD 修改成功时返回 0,否则非零。" + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"打印当前工作目录的名字。\n" +" \n" +" 选项:\n" +" -L\t打印 $PWD 变量的值,如果它包含了当前的工作目录\n" +" -P\t打印当前的物理路径,不带有任何的符号链接\n" +" \n" +" 默认情况下,`pwd' 的行为和带 `-L' 选项一致\n" +" \n" +" 退出状态:\n" +" 除非使用了无效选项或者当前目录不可读,否则返回状态为0。" + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"空的命令。\n" +" \n" +" 没有效果; 此命令不做任何操作。\n" +" \n" +" 退出状态:\n" +" 总是成功。" + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"返回一个成功结果。\n" +" \n" +" 退出状态:\n" +" 总是成功。" + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"返回一个不成功的结果。\n" +" \n" +" 退出状态:\n" +" 总是失败。" + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"执行一个简单命令或者显示命令的相关信息。\n" +" \n" +" 带 ARGS 参数运行 COMMAND 命令且抑制 shell 函数查询,或显示\n" +" 指定的 COMMAND 命令的信息。可以在存在相同名称的函数定义的\n" +" 情况下用于启动磁盘上的命令。\n" +" \n" +" 选项:\n" +" -p\t使用 PATH 变量的一个默认值以确保所有的标准工具都能被找到。\n" +" -v\t打印 COMMAND 命令的描述,和 `type' 内建相似\n" +" -V\t打印每个 COMMAND 命令的详细描述\n" +" \n" +" 退出状态\n" +" 返回 COMMAND 命令的返回状态,或者当找不到 COMMAND 命令时失败。" + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"设定变量值和属性。\n" +" \n" +" 声明变量并且赋予它们属性。如果没有给定名称,\n" +" 则显示所有变量的属性和值。\n" +" \n" +" 选项:\n" +" -f\t限制动作或显示为仅函数名称和定义\n" +" -F\t限制仅显示函数名称 (以及调试时显示行号和源文件名)\n" +" -g\t当用于 shell 函数内时创建全局变量; 否则忽略\n" +" -p\t显示每个 NAME 变量的属性和值\n" +" \n" +" 设定属性的选项:\n" +" -a\t使 NAME 成为下标数组 (如果支持)\n" +" -A\t使 NAME 成为关联数组 (如果支持)\n" +" -i\t使 NAME 带有 `integer' (整数)属性\n" +" -l\t将 NAME 在赋值时转为小写\n" +" -n\t使 NAME 成为指向一个以其值为名称的变量的引用\n" +" -r\t将 NAME 变为只读\n" +" -t\t使 NAME 带有 `trace' (追踪)属性\n" +" -u\t将每个 NAME 在赋值时转为大写\n" +" -x\t将 NAME 导出\n" +" \n" +" 用 `+' 代替 `-' 会关闭指定选项。\n" +" \n" +" 带有整数属性的变量在赋值时将使用算术估值(见\n" +" `let' 命令)\n" +" \n" +" 在函数中使用时,`declare' 使 NAME 成为本地变量,和 `local'\n" +" 命令一致。`-g' 选项抑制此行为。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非提供了无效选项或者发生变量赋值错误。" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"设置变量的值和属性。\n" +" \n" +" `declare' 的等价形式。参见 `help declare'。" + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"定义本地变量。\n" +" \n" +" 创建一个以 NAME 为名称的变量,并且将 VALUE 赋值给它。\n" +" OPTION 选项可以是任何能被 `declare' 接受的选项。\n" +" \n" +" 本地变量只能在函数内部被使用,它们只能在定义它们的函数内\n" +" 部以及子函数中可见。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项、发生了赋值错误或者 shell 不在执行一个函" +"数。" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"将参数写到标准输出。\n" +" \n" +" 在标准输出上,显示用空格分割的 ARG 参数后跟一个换行。\n" +" \n" +" 选项:\n" +" -n\t不要追加换行\n" +" -e\t启用下列反斜杠转义的解释\n" +" -E\t显式地抑制对于反斜杠转义的解释\n" +" \n" +" `echo' 对下列反斜杠字符进行转义:\n" +" \a\t警告(响铃)\n" +" \\b\t退格\n" +" \\c\t抑制更多的输出\n" +" \\e\t转义字符\n" +" \\f\t换页字符\n" +" \\n\t换行\n" +" \\r\t回车\n" +" \\t\t横向制表符\n" +" \\v\t纵向制表符\n" +" \\\\\t反斜杠\n" +" \\0nnn\t以 NNN(八进制)为 ASCII 码的字符。NNN 可以是 0 到 3 个八进制" +"位\n" +" \\xHH\t以 HH(十六进制)为值的八比特字符。HH 可以是一个或两个十六进制" +"位\n" +" \\uHHHH\t以 HHHH(十六进制)为值的 Unicode 字符。HHHH 可以是一个到\n" +" \t\t四个十六进制位。\n" +" \\UHHHHHHHH 以 HHHHHHHH(十六进制)为值的 Unicode 字符。\n" +" \t\tHHHHHHHH 可以是一到八个十六进制位。\n" +" \n" +" 退出状态:\n" +" 返回成功除非有写错误发生。" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"写参数至标准输出设备。\n" +" \n" +" 在标准输出设备上显示 ARGs 参数和一个换行。\n" +" \n" +" 选项:\n" +" -n\t不附加换行\n" +" \n" +" 退出状态:\n" +" 除非写错误发生,否则返回成功。" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"启用和禁用 shell 内建。\n" +" \n" +" 启用和禁用 shell 的内建命令。禁用使您能够执行一个和内建\n" +" 命令同名的磁盘上的命令,而无须使用完整的路径名。\n" +" \n" +" \n" +" 选项:\n" +" -a\t打印一个内建的列表,并显示其中每一个是否启用\n" +" -n\t禁用每一个 NAME 内建或者显示一个被禁用的内建的列表\n" +" -p\t以可重用的格式打印一个内建的列表\n" +" -s\t仅打印Posix `special' 内建的名称\n" +" \n" +" 控制动态加载的选项:\n" +" -f\t从共享对象 FILENAME 文件中加载 NAME 内建\n" +" -d\t删除以 -f 选项加载的内建\n" +" \n" +" 不带选项时,每一个 NAME 内建都被启用。\n" +" \n" +" 如果要使用 $PATH 中找到的 `test' 而不是 shell 内建的版本,\n" +" 输入 `enable -n test'。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非 NAME 不是一个 shell 内建或者有错误发生。" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"将参数作为 shell 命令执行。\n" +" \n" +" 将 ARGs 合成一个字符串,用结果作为 shell 的输入,\n" +" 并且执行得到的命令。\n" +" \n" +" 退出状态:\n" +" 以命令的状态退出,或者在命令为空的情况下返回成功。" + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"解析选项参数。\n" +" \n" +" getopts 被 shell 过程用于解析可定位的参数作为选项。\n" +" \n" +" \n" +" OPTSTRING 字符串包含待识别的选项字母;如果一个字母后面跟\n" +" 着分号,则该选项需要一个参数,而该参数应用空格与选项分开。\n" +" \n" +" \n" +" 每次启动时,getopts 会将下一个选项放到 shell 变量 $name\n" +" 中,如果 name 变量不存在则先将其初始化,而下一个待处\n" +" 理的参数序号放入 shell 变量 OPTIND 中。OPTIND 变量在每\n" +" 次 shell 或者 shell 脚本启动时都被初始化为1。当一个选项要\n" +" 求有一个参数时,getopts 将参数放入 shell 变量 OPTARG\n" +" 中。\n" +" \n" +" getopts 有两种报告错误的方法。如果 OPTSTRING 变量的第\n" +" 一个字符是冒号,getopts 使用沉默错误报告。在这种模式\n" +" 下,不会打印错误消息。如果看到了一个无效的选项,\n" +" getopts 将找到的选项字符放至 OPTARG 变量中。如果一个必\n" +" 须的选项没有找到,getopts 放一个 ':' 到 NAME 变量中并且设\n" +" 置 OPTARG 变量为找到的选项字符。如果 getopts 不在沉默模\n" +" 式中,并且遇到了一个无效的选项,getopts 放置一个 '?' 到 NAME \n" +" 变量中并且取消设定 OPTARG变量。如果必须的选项没有找到,\n" +" 一个'?'会被放入 NAME变量中,OPTARG 将被取消设定,并且会\n" +" 打印一个诊断信息。\n" +" \n" +" 如果 shell 变量 OPTERR 的值为0,getopts 禁用\n" +" 错误信息的打印,即使 OPTSTRING 变量的第一个字符不是一\n" +" 个冒号。OPTERR 的默认值为1.\n" +" \n" +" getopts 通常解析可定位的参数($0 - $9),不过如果提供了\n" +" 更多的参数,它们反而会被解析。\n" +" \n" +" 退出状态:\n" +" 如果一个选项被找到则返回成功;如果遇到了选项的结尾或者\n" +" 有错误发生则返回失败。" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"使用指定命令替换 shell。\n" +" \n" +" 执行 COMMAND 命令,以指定的程序替换这个 shell。\n" +" ARGUMENTS 参数成为 COMMAND命令的参数。如果\n" +" 没有指定COMMAND 命令,则任何的重定向在当前 shell 中生效。\n" +" \n" +" 选项:\n" +" -a 名称\t作为第0个参数传递给 COMMAND 命令\n" +" -c\t\t在一个空环境中执行 COMMAND 命令\n" +" -l\t\t在COMMAND 命令的第0个参数中加一个短线\n" +" \n" +" 如果命令不能被执行,则退出一个非交互式的 shell,除非\n" +" shell 选项`execfail' 已经设定。\n" +" \n" +" 退出状态:\n" +" 返回成功除非 COMMAND 命令没有找到或者出现一个重定向错误。" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"退出shell。\n" +" \n" +" 以状态 N 退出 shell。 如果 N 被省略,则退出状态\n" +" 为最后一个执行的命令的退出状态。" + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"退出一个登录 shell.\n" +" \n" +" 以状态 N 退出一个登录 shell。如果不在登录 shell 中执行,则\n" +" 返回一个错误。" + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"从历史列表中显示或者执行命令。\n" +" \n" +" fc 被用于从历史列表中列出或者重新编辑并执行命令。\n" +" FIRST 和 LAST 变量可以是数字用于指定范围,或者 FIRST 可以是\n" +" 字符串,意味着以这个字符串打头的最近的一个命令。\n" +" \n" +" \n" +" 选项:\n" +" -e ENAME\t选择使用哪个编辑器。默认的是 FCEDIT, 然后是 EDITOR,\n" +" \t\t然后是 vi\n" +" -l \t列出行而不编辑\n" +" -n\t列举时省略行号\n" +" -r\t反转行的顺序(最新行在前)\n" +" \n" +" 用 `fc -s [模式=替换 ...] [命令]' 的格式,COMMAND 命令会在 OLD=NEW\n" +" 替换之后被重新执行。\n" +" \n" +" r='fc -s' 是一个有用的别名,这样的话输入 `r cc'会执行最后一个以 `cc'\n" +" 开头的命令,输入 `r'会重新执行最后一个命令。\n" +" \n" +" \n" +" 退出状态:\n" +" 返回成功,或者执行的命令的状态;如果错误发生则返回非零。" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"将任务移至前台。\n" +" \n" +" 将以 JOB_SPEC 标识的任务放至前台,使其成为\n" +" 当前任务。如果 JOB_SPEC 不存在,shell 观念中的当前任务 \n" +" 将被使用。\n" +" \n" +" 退出状态:\n" +" 放至前台的命令状态,或者当错误发生时为失败。" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"移动任务至后台。\n" +" \n" +" 将 JOB_SPEC 标识的任务放至后台,就像它们\n" +" 是带 `&' 启动的一样。如果 JOB_SPEC 不存在,shell 观念中的\n" +" 当前任务将会被使用。\n" +" \n" +" 退出状态:\n" +" 返回成功除非任务管理没有启用或者错误发生。" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"记住或显示程序位置。\n" +" \n" +" 确定并记住每一个给定 NAME 名称的命令的完整路径。\n" +" 如果不提供参数,则显示已经记住的命令的信息。\n" +" \n" +" 选项:\n" +" -d\t\t忘记每一个已经记住的 NAME 的位置\n" +" -l\t\t以可作为输入重用的格式显示\n" +" -p pathname\t使用 pathname 路径作为 NAME 命令的全路径\n" +" -r\t\t忘记所有记住的位置\n" +" -t\t\t打印记住的每一个 NAME 名称的位置,如果指定了多个\n" +" \t\tNAME 名称,则每个位置前面会加上相应的 NAME 名称\n" +" \t\t\n" +" 参数:\n" +" NAME\t\t每个 NAME 名称会在 $PATH 路径变量中被搜索,并且添加到记住的命" +"令\n" +" 列表中。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非 NAME 命令没有找到或者使用了无效的选项。" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"显示内建命令的相关信息。\n" +" \n" +" 显示内建命令的简略信息。如果指定了 PATTERN 模式,\n" +" 给出所有匹配 PATTERN 模式的命令的详细帮助,否则打\n" +" 印一个帮助主题列表\n" +" \n" +" 选项:\n" +" -d\t输出每个主题的简短描述\n" +" -m\t以伪 man 手册的格式显示使用方法\n" +" -s\t为每一个匹配 PATTERN 模式的主题仅显示一个用法\n" +" \t简介\n" +" \n" +" 参数:\n" +" PATTERN\t指定帮助主题的模式\n" +" \n" +" 退出状态:\n" +" 返回成功,除非未找到 PATTERN 模式没有找到或者使用了无效选项。" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"显示或操纵历史列表。\n" +" \n" +" 带行号显示历史列表,将每个被修改的条目加上 `*' 前缀。\n" +" 参数 N 会仅列出最后的 N 个条目。\n" +" \n" +" 选项:\n" +" -c\t删除所有条目从而清空历史列表。\n" +" -d 偏移量\t从指定位置删除历史列表。负偏移量将从历史条目末尾\n" +" \t\t开始计数\n" +" \n" +" -a\t将当前会话的历史行追加到历史文件中\n" +" -n\t从历史文件中读取所有未被读取的行\n" +" \t\t并且将它们附加到历史列表\n" +" -r\t读取历史文件并将内容追加到历史列表中\n" +" -w\t将当前历史写入到历史文件中\n" +" \n" +" -p\t对每一个 ARG 参数展开历史并显示结果,而不存储到历史列表中\n" +" -s\t以单条记录追加 ARG 到历史列表中\n" +" \n" +" 如果给定了 FILENAME 文件名,则它将被作为历史文件。否则\n" +" 如果 $HISTFILE 变量有值的话使用之,不然使用 ~/.bash_history 文件。\n" +" \n" +" 如果 $HISTTIMEFORMAT 变量被设定并且不为空,它的值会被用于\n" +" strftime(3) 的格式字符串来打印与每一个显示的历史条目想关联的\n" +" 时间戳,否则不打印时间戳。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者发生错误。" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"显示任务状态。\n" +" \n" +" 列出活动的任务。JOBSPEC 限制仅输出指定的任务。\n" +" 不带选项时,所有活动任务的状态都会显示。\n" +" \n" +" 选项:\n" +" -l\t在正常信息基础上列出进程号\n" +" -n\t仅列出上次通告之后改变了状态的进程\n" +" -p\t仅列出进程号\n" +" -r\t限制仅输出运行中的任务\n" +" -s\t限制仅输出停止的任务\n" +" \n" +" 如果使用了 -x 选项,ARG 参数中的所有任务声明会被替换为该任务\n" +" 的进程组头领的进程号,然后执行 COMMAND 命令。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者有错误发生。\n" +" 如果使用 -x 选项,则返回 COMMAND 命令的退出状态。" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"从当前 shell 中删除任务。\n" +" \n" +" 从活动任务表中删除每一个 JOBSPEC 参数。不带任何\n" +" JOBSPEC 参数时,shell 使用观念中的当前任务。\n" +" \n" +" 选项:\n" +" -a\t如果不提供 JOBSPEC 参数,则删除所有任务\n" +" -h\t标识每个 JOBSPEC 任务,从而当 shell 接收到 SIGHUP\n" +" \t\t信号时不发送 SIGHUP 给指定任务\n" +" -r\t仅删除运行中的任务\n" +" \n" +" 退出状态:\n" +" 返回成功除非使用了无效的选项或者 JOBSPEC 声明。" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"向一个任务发送一个信号。\n" +" \n" +" 向以 PID 进程号或者 JOBSPEC 任务声明指定的进程发送一个以\n" +" SIGSPEC 信号声明或 SIGNUM 信号编号命名的信号。如果没有指定\n" +" SIGSPEC 或 SIGNUM,那么假定发送 SIGTERM 信号。\n" +" \n" +" 选项:\n" +" -s sig\tSIG 是信号名称\n" +" -n sig\tSIG 是信号编号\n" +" -l\t列出信号名称;如果参数后跟 `-l'则被假设为信号编号,\n" +" \t\t而相应的信号名称会被列出\n" +" \n" +" Kill 成为 shell 内建有两个理由:它允许使用任务编号而不是进程号,\n" +" 并且在可以创建的进程数上限达到是允许进程被杀死。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者有错误发生。" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"估值算术表达式。\n" +" \n" +" 将每个 ARG 参赛作为算术表达式来估值。估值的计算以定宽的整\n" +" 数完成,不带溢出检测,不过除 0 是被置陷阱的并且会报一个错\n" +" 误。下列操作符被按照相同的算术优先级组合。列表的顺序按照\n" +" 优先级从高至低。\n" +" \n" +" \n" +" \tid++, id--\t变量后置加,后置减\n" +" \t++id, --id\t变量前置加,前置减\n" +" \t-, +\t\t一元减法,一元加法\n" +" \t!, ~\t\t逻辑和位取反\n" +" \t**\t\t指数\n" +" \t*, /, %\t\t乘法,除法,取余数\n" +" \t+, -\t\t增加,减少\n" +" \t<<, >>\t\t向左和向右按位移位\n" +" \t<=, >=, <, >\t比较\n" +" \t==, !=\t\t等于,不等于\n" +" \t&\t\t按位与\n" +" \t^\t\t按位异或\n" +" \t|\t\t按位或\n" +" \t&&\t\t逻辑与\n" +" \t||\t\t逻辑或\n" +" \texpr ? expr : expr\n" +" \t\t\t条件操作符\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\t赋值\n" +" \n" +" Shell 变量允许作为操作数。表达式中的变量的名称会被取代以值\n" +" (强制转换为定宽的整数)。表达式中的变量不需要打开整数属性。\n" +" \n" +" 操作符按照优先级进行估值。括号中的子表达式将被先估值,并可取代上述表达式" +"规则。\n" +" \n" +" 退出状态:\n" +" 如果最后一个 ARG 参数估值为 0,则 let 返回 1; 否则 let 返回 0。" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"从标准输入读取一行并将其分为不同的域。\n" +" \n" +" 从标准输入读取单独的一行,或者如果使用了 -u 选项,从文件描述符 FD 中读" +"取。\n" +" 该行被分割成域,如同词语分割一样,并且第一个词被赋值给第一个 NAME 变量," +"第二\n" +" 个词被赋值给第二个 NAME 变量,如此继续,直到剩下所有的词被赋值给最后一个 " +"NAME\n" +" 变量。只有 $IFS 变量中的字符被认作是词语分隔符。\n" +" \n" +" 如果没有提供 NAME 变量,则读取的行被存放在 REPLY 变量中。\n" +" \n" +" 选项:\n" +" -a array\t将词语赋值给 ARRAY 数组变量的序列下标成员,从零开始\n" +" -d delim\t持续读取直到读入 DELIM 变量中的第一个字符,而不是换行符\n" +" -e\t使用 Readline 获取行\n" +" -i text\t使用 TEXT 文本作为 Readline 的初始文字\n" +" -n nchars\t读取 nchars 个字符之后返回,而不是等到读取换行符。\n" +" \t\t但是分隔符仍然有效,如果遇到分隔符之前读取了不足 nchars 个字符。\n" +" -N nchars\t在准确读取了 nchars 个字符之后返回,除非遇到文件结束符或者读" +"超时,\n" +" \t\t任何的分隔符都被忽略\n" +" -p prompt\t在尝试读取之前输出 PROMPT 提示符并且不带\n" +" \t\t换行符\n" +" -r\t不允许反斜杠转义任何字符\n" +" -s\t不回显终端的任何输入\n" +" -t timeout\t如果在 TIMEOUT 秒内没有读取一个完整的行则超时并且返回失" +"败。\n" +" \t\tTMOUT 变量的值是默认的超时时间。TIMEOUT 可以是小数。\n" +" \t\t如果 TIMEOUT 是 0,那么仅当在指定的文件描述符上输入有效的时候,\n" +" \t\tread 才返回成功;否则它将立刻返回而不尝试读取任何数据。\n" +" \t\t如果超过了超时时间,则返回状态码大于 128\n" +" -u fd\t从文件描述符 FD 中读取,而不是标准输入\n" +" \n" +" 退出状态:\n" +" 返回码为零,除非遇到了文件结束符、读超时(且返回码不大于128)、\n" +" 出现了变量赋值错误或者无效的文件描述符作为参数传递给了 -u 选项。" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"从一个 shell 函数返回。\n" +" \n" +" 使一个函数或者被引用的脚本以指定的返回值 N 退出。\n" +" 如果 N 被省略,则返回状态就是\n" +" 函数或脚本中的最后一个执行的命令的状态。\n" +" \n" +" 退出状态:\n" +" 返回 N,或者如果 shell 不在执行一个函数或引用脚本时,失败。" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"设定或取消设定 shell 选项和位置参数的值。\n" +" \n" +" 改变 shell 选项和位置参数的值,或者显示 shell 变量的\n" +" 名称和值。\n" +" \n" +" 选项:\n" +" -a 标记修改的或者创建的变量为导出。\n" +" -b 立即通告任务终结。\n" +" -e 如果一个命令以非零状态退出,则立即退出。\n" +" -f 禁用文件名生成(模式匹配)。\n" +" -h 当查询命令时记住它们的位置\n" +" -k 所有的赋值参数被放在命令的环境中,而不仅仅是\n" +" 命令名称之前的参数。\n" +" -m 启用任务控制。\n" +" -n 读取命令但不执行\n" +" -o 选项名\n" +" 设定与选项名对应的变量:\n" +" allexport 与 -a 相同\n" +" braceexpand 与 -B 相同\n" +" emacs 使用 emacs 风格的行编辑界面\n" +" errexit 与 -e 相同\n" +" errtrace 与 -E 相同\n" +" functrace 与 -T 相同\n" +" hashall 与 -h 相同\n" +" histexpand 与 -H 相同\n" +" history 启用命令历史\n" +" ignoreeof shell 读取文件结束符时不会退出\n" +" interactive-comments\n" +" 允许在交互式命令中显示注释\n" +" keyword 与 -k 相同\n" +" monitor 与 -m 相同\n" +" noclobber 与 -C 相同\n" +" noexec 与 -n 相同\n" +" noglob 与 -f 相同\n" +" nolog 目前可接受但是被忽略\n" +" notify 与 -b 相同\n" +" nounset 与 -u 相同\n" +" onecmd 与 -t 相同\n" +" physical 与 -P 相同\n" +" pipefail 管道的返回值是最后一个非零返回值的命令的返回结" +"果,\n" +" 或者当所有命令都返回零是也为零。\n" +" posix 改变默认时和 Posix 标准不同的 bash 行为\n" +" 以匹配标准\n" +" privileged 与 -p 相同\n" +" verbose 与 -v 相同\n" +" vi 使用 vi 风格的行编辑界面\n" +" xtrace 与 -x 相同\n" +" -p 无论何时当真实的有效的用户身份不匹配时打开。\n" +" 禁用对 $ENV 文件的处理以及导入 shell 函数。\n" +" 关闭此选项会导致有效的用户编号和组编号设定\n" +" 为真实的用户编号和组编号\n" +" -t 读取并执行一个命令之后退出。\n" +" -u 替换时将为设定的变量当作错误对待。\n" +" -v 读取 shell 输入行时将它们打印。\n" +" -x 执行命令时打印它们以及参数。\n" +" -B shell 将执行花括号扩展。\n" +" -C 设定之后禁止以重定向输出的方式覆盖常\n" +" 规文件。\n" +" -E 设定之后 ERR 陷阱会被 shell 函数继承。\n" +" -H 启用 ! 风格的历史替换。当 shell 是交互式的\n" +" 时候这个标识位默认打开。\n" +" -P 设定之后类似 cd 的会改变当前目录的命令不\n" +" 追踪符号链接。\n" +" -T 设定之后 DEBUG 陷阱会被 shell 函数继承。\n" +" -- 任何剩余的参数会被赋值给位置参数。如果没\n" +" 有剩余的参数,位置参数不会被设置。\n" +" - 任何剩余的参数会被赋值给位置参数。\n" +" -x 和 -v 选项已关闭。\n" +" \n" +" 使用 + 而不是 - 会使标志位被关闭。标志位也可以在\n" +" shell 被启动时使用。当前的标志位设定可以在 $- 变\n" +" 量中找到。剩余的 ARG 参数是位置参数并且是按照\n" +" $1, $2, .. $n 的顺序被赋值的。如果没有给定 ARG\n" +" 参数,则打印所有的 shell 变量。\n" +" \n" +" 退出状态:\n" +" 返回成功除非使用了无效的参数。" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"取消设定 shell 变量和函数的值和属性。\n" +" \n" +" 对每一个 NAME 名称,删除对应的变量或函数。\n" +" \n" +" 选项:\n" +" -f\t将每个 NAME 视为函数\n" +" -v\t将每个 NAME 视为变量\n" +" -n\t将每个 NAME 视为名称引用,只取消其本身而非其指向的变量\n" +" \n" +" 不带选项时,unset 首先尝试取消设定一个变量,如果失败,再尝试取消设定一个" +"函数。\n" +" \n" +" 某些变量不可以被取消设定;参见 `readonly'。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者 NAME 名称为只读。" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"为 shell 变量设定导出属性。\n" +" \n" +" 标记每个 NAME 名称为自动导出到后续命令执行的环境。如果提供了 VALUE\n" +" 则导出前将 VALUE 作为赋值。\n" +" \n" +" 选项:\n" +" -f\t指 shell 函数\n" +" -n\t删除每个 NAME 名称的导出属性\n" +" -p\t显示所有导出的变量和函数的列表\n" +" \n" +" `--' 的参数禁用进一步的选项处理。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者 NAME 名称。" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"标记 shell 变量为不可改变。\n" +" \n" +" 标记每一个 NAME 名称为只读;这些 NAME 变量的值将不可以被后续的赋值\n" +" 操作所改变。如果提供了 VALUE,则在标记为只读之前将 VALUE 值赋给变量。\n" +" \n" +" 选项:\n" +" -a\t指下标数组变量\n" +" -A\t指关联数组标量\n" +" -f\t指 shell 函数\n" +" -p\t显示只读变量或函数列表,取决于是否提供了 -f 选项\n" +" \n" +" `--' 的参数禁用进一步的选项处理。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者 NAME 名称。" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"移位位置参数。\n" +" \n" +" 重命名位置参数 $N+1、$N+2 ... 到 $1、$2 ... 如果没有给定 N,\n" +" 则假设为1.\n" +" \n" +" 退出状态:\n" +" 返回成功,除非 N 为负或者大于 $#。" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"在当前 shell 中执行一个文件中的命令。\n" +" \n" +" 在当前 shell 中读取并执行 FILENAME 文件中的命令。$PATH 变量中的\n" +" 条目被用于寻找包含 FILENAME 文件的目录。如果提供了任何的 ARGUMENTS\n" +" 参数,则它们将成为 FILENAME 文件执行时的位置参数。\n" +" \n" +" 退出状态:\n" +" 返回 FILENAME 文件中最后一个命令的状态;如果 FILENAME 文件不可读则失败。" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"挂起 shell 执行。\n" +" \n" +" 挂起 shell 的执行直到收到 SIGCONT 信号。\n" +" 登录 shell 不可以被挂起,除非强制执行。\n" +" \n" +" 选项:\n" +" -f\t强制挂起,即使是登录 shell。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非没有启用任务控制或者有错误发生。" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"对条件表达式进行估值。\n" +" \n" +" 根据 EXPR 表达式的估值以状态 0 (真) 或 1 (伪) 退出。\n" +" 表达式可以是一元或者二元的。一元表达式通常用于检测\n" +" 文件状态。同时还有字符串操作符和数字比较操作符。\n" +" \n" +" 文件操作符:\n" +" \n" +" -a 文件 如果文件存在则为真。\n" +" -b 文件 如果文件为块特殊文件则为真。\n" +" -c 文件 如果文件为字符特殊文件则为真。\n" +" -d 文件 如果文件为目录则为真。\n" +" -e 文件 如果文件存在则为真。\n" +" -f 文件 如果文件存在且为常规文件则为真。\n" +" -g 文件 如果文件的组属性设置打开则为真。\n" +" -h 文件 如果文件为符号链接则为真。\n" +" -L 文件 如果文件为符号链接则为真。\n" +" -k 文件 如果文件的粘滞 (sticky) 位设定则为真。\n" +" -p 文件 如果文件为命名管道则为真。\n" +" -r 文件 如果文件对于您是可读的则为真。\n" +" -s 文件 如果文件存在且不为空则为真。\n" +" -S 文件 如果文件是套接字则为真。\n" +" -t 文件描述符 如果文件描述符在一个终端上打开则为真。\n" +" -u 文件 如果文件的用户数行设置打开则为真。\n" +" -w 文件 如果文件对您是可写的则为真\n" +" -x 文件 如果文件对您是可执行的则为真。\n" +" -O 文件 如果文件是被您所有的则为真。\n" +" -G 文件 如果文件被您的组所有则为真。\n" +" -N 文件 如果文件上次被读取之后修改过则为真。\n" +" \n" +" FILE1 -nt FILE2 如果 file1 文件新于 file2 文件则为真(根据\n" +" 修改日期)。\n" +" \n" +" FILE1 -ot FILE2 如果 file1 文件旧于 file2 文件则为真。\n" +" \n" +" FILE1 -ef FILE2 如果 file1 文件是 file2 文件的硬链接则为真。\n" +" \n" +" 字符串操作符\n" +" \n" +" -z 字符串 如果字符串为空则为真。\n" +" \n" +" -n 字符串\n" +" 字符串 如果字符串不为空则为真。\n" +" \n" +" STRING1 = STRING2\n" +" 如果 string1 和 string2 字符串相同则为真。\n" +" STRING1 != STRING2\n" +" 如果 string1 和 string2 字符串不相同则为真。\n" +" STRING1 < STRING2\n" +" 如果按字典排序 string1 在 string2 串之前则为真。\n" +" STRING1 > STRING2\n" +" 如果按字典排序 string1 在 string2 串之前则为真。\n" +" \n" +" 其他操作符:\n" +" \n" +" -o 选项 如果指定 shell 选项启用则为真。\n" +" -v VAR 如果指定 Shell 变量 VAR 已赋值则为真。\n" +" -R VAR 如果指定 Shell 变量 VAR 已赋值且为名称引用则为真。\n" +" ! EXPR 如果表达式 expr 为假则为真。\n" +" EXPR1 -a EXPR2 如果 expr1 和 expr2 都为真则为真。\n" +" EXPR1 -o EXPR2 如果 expr1 和 expr2 有一个为真则为真。\n" +" \n" +" arg1 OP arg2 算术测试。OP操作符可以是 -eq、-ne、\n" +" -lt、-le、-gt、或 -ge 中的一个。\n" +" \n" +" 二元算术操作返回真,如果 ARG1 参数等于、不等于、\n" +" 小于、小于等于、大于、或者大于等于 ARG2 参数。\n" +" \n" +" 退出状态:\n" +" 如果 EXPR 表达式估值为真则返回成功;如果 EXPR 表达式估值\n" +" 为假或者使用了无效的参数则返回失败。" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"估值条件表达式。\n" +" \n" +" 是内建命令 \"test\" 的同义词,但是最后一个参数必须是\n" +" 字符 `]',以匹配起始的 `['。" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"显示进程时间\n" +" \n" +" 打印 shell 及其所有子进程的累计用户空间和\n" +" 系统空间执行时间。\n" +" \n" +" 退出状态\n" +" 总是成功。" + +# EXIT and DEBUG should be as-is. Use before you translate, please. +# The -signal is only an example; Read carefully. +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"对信号和其他事件设陷阱。\n" +" \n" +" 定义一个处理器,在 shell 接收到信号和其他条件下执行。\n" +" \n" +" ARG 参数是当 shell 接收到 SIGNAL_SPEC 信号时读取和执行的命令。\n" +" 如果没有指定 ARG 参数 (并且只给出一个 SIGNAL_SPEC 信号) 或者\n" +" ARG 参数为\n" +" `-',每一个指定的参数会被重置为原始值。如果 ARG 参数是一个空串,则每一" +"个\n" +" SIGNAL_SPEC 信号会被 shell 和它启动的命令忽略。\n" +" \n" +" 如果一个 SIGNAL_SPEC 信号是 EXIT (0) ,则 ARG 命令会在 shell 退出时被\n" +" 执行。如果一个 SIGNAL_SPEC 信号是 DEBUG,则 ARG命令会在每一个简单命\n" +" 令之前执行。\n" +" \n" +" 如果不提供参数,trap 打印列表显示每一个与每一个信号相关联的命令。\n" +" \n" +" 选项:\n" +" -l\t打印一个信号名称和它们对应的编号的列表\n" +" -p\t打印与每个 SIGNAL_SPEC 信号相关联的陷阱命令\n" +" \n" +" 每一个 SIGNAL_SPEC 信号可以是 中的信号名称或者信号编号。\n" +" 信号名称大小写敏感且可以使用 SIG 前缀。信号可用 \"kill -信号 $$\"\n" +" 发送给 shell。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者 SIGSPEC。" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"显示命令类型的信息。\n" +" \n" +" 对于每一个 NAME 名称,指示如果作为命令它将如何被解释。\n" +" \n" +" 选项:\n" +" -a\t显示所有包含名称为 NAME 的可执行文件的位置;\n" +" \t\t包括别名、内建和函数。仅当 `-p' 选项没有使用时\n" +" -f\t抑制 shell 函数查询\n" +" -P\t为每个 NAME 名称惊醒 PATH 路径搜索,即使它是别名、\n" +" \t\t内建或函数,并且返回将被执行的磁盘上文件的名称。\n" +" -p\t返回将被执行的磁盘上文件的名称,或者当 `type -t NAME'\n" +" \t不返回 `file' 时,不返回任何值。\n" +" -t\t返回下列词中的任何一个 `alias'、`keyword'、\n" +" \t`function'、`builtin'、`file' 或者 `',相应地如果 NAME 是\n" +" \t一个别名、shell 保留字、shell 函数、shell 内建、\n" +" \t磁盘文件或没有找到。\n" +" \n" +" 参数:\n" +" NAME\t将要解析的命令。\n" +" \n" +" 退出状态:\n" +" 如果所有的 NAME 命令都找到则返回成功;任何一个找不到则失败。" + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"修改 shell 资源限制。\n" +" \n" +" 在允许此类控制的系统上,提供对于 shell 及其创建的进程所可用的\n" +" 资源的控制。\n" +" \n" +" 选项:\n" +" -S\t使用软 (`soft') 资源限制\n" +" -H\t使用硬 (`hard') 资源限制\n" +" -a\t所有当前限制都被报告\n" +" -b\t套接字缓存尺寸\n" +" -c\t创建的核文件的最大尺寸\n" +" -d\t一个进程的数据区的最大尺寸\n" +" -e\t最高的调度优先级 (`nice')\n" +" -f\t有 shell 及其子进程可以写的最大文件尺寸\n" +" -i\t最多的可以挂起的信号数\n" +" -k\t分配给此进程的最大 kqueue 数量\n" +" -l\t一个进程可以锁定的最大内存尺寸\n" +" -m\t最大的内存进驻尺寸\n" +" -n\t最多的打开的文件描述符个数\n" +" -p\t管道缓冲区尺寸\n" +" -q\tPOSIX 信息队列的最大字节数\n" +" -r\t实时调度的最大优先级\n" +" -s\t最大栈尺寸\n" +" -t\t最大的CPU时间,以秒为单位\n" +" -u\t最大用户进程数\n" +" -v\t虚拟内存尺寸\n" +" -x\t最大的文件锁数量\n" +" -P\t最大伪终端数量\n" +" -T\t最大线程数量\n" +" \n" +" 并非所有选项在所有系统上可用。\n" +" \n" +" 如果提供了 LIMIT 变量,则它为指定资源的新的值;特别的 LIMIT 值为\n" +" `soft'、`hard'和`unlimited',分别表示当前的软限制,硬限制和无限制。\n" +" 否则打印指定资源的当前限制值,不带选项则假定为 -f\n" +" \n" +" 取值都是 1024 字节为单位,除了 -t 以秒为单位,-p 以 512 字节递增,\n" +" -u 为无范围的进程数量。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者错误发生。" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"显示或设定文件模式掩码。\n" +" \n" +" 设定用户文件创建掩码为 MODE 模式。如果省略了 MODE,则\n" +" 打印当前掩码的值。\n" +" \n" +" 如果 MODE 模式以数字开头,则被当作八进制数解析;否则是一个\n" +" chmod(1) 可接收的符号模式串。\n" +" \n" +" 选项:\n" +" -p\t如果省略 MODE 模式,以可重用为输入的格式输入\n" +" -S\t以符号形式输出,否则以八进制数格式输出\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的 MODE 模式或者选项。" + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"等待任务完成并返回退出状态。\n" +" \n" +" 等待以 ID 编号识别的进程,其中 ID 可以是进程编号或者任务声明,\n" +" 并报告它的终止状态。如果 ID 没有给出,则等待所有的当前活跃子\n" +" 进程,并且返回状态为零。如果 ID 是任务声明,等待任务管道中的\n" +" 所有进程。\n" +" \n" +" 若给定了 -n 选项,等待下一个任务完成并返回其状态。\n" +" \n" +" 若给定了 -f 选项,且已启用了任务控制,则等待指定的 ID 终止\n" +" 而非等待它改变状态。\n" +" 退出状态:\n" +" 返回最后一个 ID 进程的状态;如果使用了无效的 ID 或者选项则失败。" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"等待进程完成并且返回退出状态。\n" +" \n" +" 等待指定进程并报告它的终止状态。如果没有提供 PID,则当前所有的活跃\n" +" 子进程都会被等待,并且返回码为零。PID 必须为进程号。\n" +" \n" +" 退出状态:\n" +" 返回进程 ID 的状态;如果 PID 是无效的进程号或者指定了无效的选项则失败。" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"为列表中的每个成员执行命令。\n" +" \n" +" “for”循环为列表中的每个成员执行一系列的命令。如果没有\n" +" “in <词语> ...;”则假定使用“in \"$@\"”。对于 <词语> 中的每\n" +" 个元素,<名称> 变量被设定为该元素后执行 <命令>。\n" +" \n" +" 退出状态:\n" +" 返回最后执行的命令的状态。" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"算术 for 循环。\n" +" \n" +" 等价于\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\t命令们\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1、EXP2 和 EXP3 都是算术表达式。如果省略任何表达式,\n" +" 则等同于使用了估值为1的表达式。\n" +" \n" +" 退出状态:\n" +" 返回最后执行的命令的状态。" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"从列表中选取词并且执行命令。\n" +" \n" +" <词语...> 被展开,生成一个词的列表。展开的词集合被打印\n" +" 在标准错误输出设备上,每个以一个数字做前缀。如果没有 `in WORDS'\n" +" 则假定使用`in \"$@\"'。PS3提示符会被显示并且从标准输入读入一行\n" +" 如果该行由被显示的词对应的数字组成,则 NAME 变量被设定为相应\n" +" 的词。如果行为空,则 WORDS 变量和提示符被重新显示。如果读取了\n" +" 文件结束符,则命令完成。读入任何其他的值会导致 NAME 变量被设定\n" +" 为空。读入的行被存放在变量 REPLY 中。COMMANDS 命令在每次选择\n" +" 之后执行直到执行一个 break 命令。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"报告管道执行的消耗时间。\n" +" \n" +" 执行 PIPELINE 并且打印 PIPELINE 终结时实际时间、用户 CPU 时间和系统\n" +" CPU 时间的总结。\n" +" \n" +" 选项:\n" +" -p\t用可迁移的 POSIX 格式打印用时总结。\n" +" \n" +" TIMEFORMAT 变量的值被作为输出格式。\n" +" \n" +" 退出状态:\n" +" 返回状态即PIPELINE 的返回状态。" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"基于模式匹配来执行命令。\n" +" \n" +" 基于 PATTERN 模式匹配的词 WORD,有选择的执行 COMMANDS 命令。\n" +" `|' 用于分隔多个模式。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"根据条件执行命令。\n" +" \n" +" `if COMMANDS'列表被执行。如果退出状态为零,则执行`then COMMANDS' \n" +" 列表。否则按顺序执行每个 `elif COMMANDS'列表,并且如果它的退出状态为\n" +" 零,则执行对应的 `then COMMANDS' 列表并且 if 命令终止。否则如果存在的\n" +" 情况下,执行 `else COMMANDS'列表。整个结构的退出状态是最后一个执行\n" +" 的命令的状态,或者如果没有条件测试为真的话,为零。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"只要测试成功即执行命令。\n" +" \n" +" 只要在 `while' COMMANDS 中的最终命令返回结果为0,则\n" +" 展开并执行 COMMANDS 命令。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"当测试不同过时执行命令。\n" +" \n" +" `until' COMMANDS 命令的最终命令返回状态不为 0 时,\n" +" 展开并执行 COMMANDS 命令。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"创建一个以 NAME 为名的副进程。\n" +" \n" +" 异步执行 COMMANDS 命令,在执行 shell 中的数组变量 NAME\n" +" 的 0 号和 1 号元素作为文件描述符,以一个管道连接命令\n" +" 分别作为命令的标准输出和输入设备。\n" +" 默认的 NAME 是 \"COPROC\"。\n" +" \n" +" 退出状态:\n" +" 副进程会返回退出状态 0。" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"定义 shell 函数。\n" +" \n" +" 创建一个以 NAME 为名的 shell 函数。当作为一个简单的命令启用时,\n" +" NAME 函数执行调用 shell 的上下文中的 COMMANDs 命令。当 NAME\n" +" 被启用时,参数作为 $1...$n 被传递给函数,函数的名字储存在变量\n" +" $FUNCNAME 中。\n" +" \n" +" 退出状态:\n" +" 返回成功除非 NAME 为只读。" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"将命令组合为一个单元。\n" +" \n" +" 运行组中的命令集合。这是对整个命令集合\n" +" 做重定向的方法之一。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"在前台继续任务\n" +" \n" +" 对于 JOB_SPEC 参数来说和 `fg' 命令等同。继续一个\n" +" 停止的或者后台任务。JOB_SPEC 可以指定一个任务\n" +" 名字或任务号。在 JOB_SPEC 后加上一个 `&' 将会把\n" +" 任务放至后台,就像任务声明被作为 `bg' 命令的参数\n" +" 执行一样。\n" +" \n" +" 退出状态:\n" +" 返回被继续的任务的状态。" + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"估值算术表达式。\n" +" \n" +" 表达式按照算术法则进行估值。\n" +" 等价于 \"let 表达式\".\n" +" \n" +" 退出状态\n" +" 如果表达式估值为0则返回 1;否则返回0。" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"执行条件命令。\n" +" \n" +" 根据条件表达式 EXPRESSION 的估值返回状态0或1。表达式按照\n" +" `test' 内建的相同条件组成,或者可以有下列操作符连接而成:\n" +" \n" +" ( EXPRESSION )\t返回 EXPRESSION 表达式的值\n" +" ! EXPRESSION\t\t如果 EXPRESSION表达式为假则为真,否则为假\n" +" EXPR1 && EXPR2\t如果 EXPR1 和 EXPR2 表达式均为真则为真,否则为假\n" +" EXPR1 || EXPR2\t如果 EXPR1 和 EXPR2 表达式中有一个为真则为真,否则为" +"假\n" +" \n" +" 当使用 `==' 和 `!=' 操作符时,操作符右边的字符串被用作模式并且执行一个\n" +" 匹配。当使用 `=~' 操作符时,操作符右边的字符串被当作正则表达式来进行\n" +" 匹配。\n" +" \n" +" 操作符 && 和 || 将不对 EXPR2 表达式进行估值,如果 EXPR1 表达式足够确定\n" +" 整个表达式的值。\n" +" \n" +" 退出状态:\n" +" 根据 EXPRESSION 的值为0或1。" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"常用 shell 变量名称和使用。\n" +" \n" +" BASH_VERSION\t当前 Bash 的版本信息。\n" +" CDPATH\t用于 `cd' 命令参数搜索的分号分隔的目录列表\n" +" GLOBIGNORE\t路径扩展时忽略的文件名匹配模式列表,\n" +" \t\t以分号分隔。\n" +" HISTFILE\t您的命令历史存放的文件名称。\n" +" HISTFILESIZE\t历史文件最多可以保存的行数。\n" +" HISTSIZE\t一个运行的 shell 最多可以访问的历史命令行数。\n" +" HOME\t您的登录目录的完整路径。\n" +" HOSTNAME\t当前主机的主机名。\n" +" HOSTTYPE\t当前版本的 BASH 在其之上运行的 CPU 类型。\n" +" IGNOREEOF\t控制 shell 收到文件结束符作为单一输入后的\n" +" \t\t动作。如果设定这个变量,则它的值是 shell 退出之前在\n" +" \t\t一个空行上可以连续看到的文件结束符数量(默认为10)。\n" +" \t\t未设定时,文件结束符标志着输入的结束。\n" +" MACHTYPE\t描述当前运行 Bash 的系统的字符串。\n" +" MAILCHECK\tBash 检测新邮件的频率,以秒为单位。\n" +" MAILPATH\tBash 从中检测新邮件的文件列表,以分号分隔。\n" +" OSTYPE\t运行 Bash 的 Unix 版本。\n" +" PATH\t当寻找命令时搜索的目录列表,以冒号分隔。\n" +" PROMPT_COMMAND\t打印每一个主提示符之前执行的命\n" +" \t\t令。\n" +" PS1\t\t主提示符字符串。\n" +" PS2\t\t从提示符字符串。\n" +" PWD\t\t当前目录的完整路径。\n" +" SHELLOPTS\t已启用的 shell 选项列表,以冒号分隔。\n" +" TERM\t当前终端类型的名称。\n" +" TIMEFORMAT\t以关键则 `time' 显示的时间统计信息的输出\n" +" \t\t格式。\n" +" auto_resume\t非空时,一个单独的命令词会首先被在当前\n" +" \t\t停止的任务列表中搜索。如果找到则该任务被置于前台。\n" +" \t\t如果值为 `exact' 则意味着命令词必须精确匹配停止任务\n" +" \t\t列表中的命令。如果值为 `substring' 则意味着命令词必\n" +" \t\t须匹配任务的一个子字符串。任何其他的值意味着命令词\n" +" \t\t必须是停止任务的一个前缀。\n" +" histchars\t控制历史展开和快速替换的字符。第一个字符是\n" +" \t\t历史替换字符,通常是 `!'。第二个字符是快速替换字符,\n" +" \t\t通常是 `^'。第三个是历史注释字符,通常是 `#'。\n" +" HISTIGNORE\t用于决定哪些命令被存入历史文件的模式\n" +" \t\t列表,以冒号分隔。\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"将目录添加到栈中。\n" +" \n" +" 将目录添加到目录栈顶,或着旋转栈直到当前工作目录成为\n" +" 新的栈顶。不带参数时,交换栈顶的两个目录。\n" +" \n" +" 选项:\n" +" -n\t抑制添加目录至栈时通常的改变目录操作,从而仅对栈\n" +" \t进行操作。\n" +" \n" +" 参数:\n" +" +N\t旋转栈从而第 N 个目录 (`dirs' 显示的列表中左起,从零开始)\n" +" \t将移动到栈顶。\n" +" \n" +" -N\t旋转栈从而第 N 个目录 (`dirs' 显示的列表中右起,从零开始)\n" +" \t将移动到栈顶。\n" +" \n" +" dir\t将 DIR 目录添加到栈顶,并且使其成为当前工作目录。\n" +" \n" +" `dirs' 内建显示目录栈。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的参数或者目录转换失败。" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"从栈中删除目录。\n" +" \n" +" 从目录栈中删除条目。不带参数时,删除栈顶目录,并改变至新的栈\n" +" 顶目录。\n" +" \n" +" 选项:\n" +" -n\t抑制从栈中删除目录时通常的目录变换操作,从而仅对栈\n" +" \t进行操作。\n" +" \n" +" 参数:\n" +" +N\t删除第 N 个目录 (`dirs' 显示的目录列表中左起,从零开始)。\n" +" \t例如:`popd +0' 删除第一个目录,`popd +1' 删除第二个。\n" +" \n" +" -N\t删除第 N 个目录 (`dirs' 显示的目录列表中右起,从零开始)。\n" +" \t例如:`popd -0' 删除最后一个目录,,`popd -1' 删除倒数第二个。\n" +" \n" +" `dirs' 内建显示目录栈。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的参数或者目录变换失败。" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"显示目录栈。\n" +" \n" +" 显示当前记住的目录列表。通过 `pushd' 命令可以将目录存入列表\n" +" 中;`popd' 命令可用于遍历弹出列表。\n" +" \n" +" 选项:\n" +" -c\t删除所有元素以清空目录栈\n" +" -l\t不打印与主目录相关的波浪号前缀的目录\n" +" -p\t每行一个条目打印目录栈\n" +" -v\t每行一个条目,以栈中位置为前缀打印目录栈\n" +" \n" +" 参数:\n" +" +N\t显示 dirs 不带选项启动时显示的目录列表左起中第\n" +" \tN 个目录,从零开始。\n" +" \n" +" -N\t显示 dirs 不带选项启动时显示的目录列表右起中第\n" +" \tN 个目录,从零开始。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者发生错误。" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"设定和取消设定 shell 选项。\n" +" \n" +" 改变每个 shell 选项 OPTNAME 的设定。不带参数时,\n" +" 列出每个提供的 OPTNAME,否则列出所有 shell 选项;\n" +" 同时标注每一个选项是否被设定。\n" +" \n" +" 选项:\n" +" -o\t限制 OPTNAME 为定义用于`set -o' 的选项\n" +" -p\t打印每个 shell 选项并标注它的状态。\n" +" -q\t抑制输出\n" +" -s\t启用(设定)每个 OPTNAME 选项\n" +" -u\t禁用(取消设定)每个 OPTNAME 选项\n" +" \n" +" 退出状态:\n" +" 如果 OPTNAME 选项被启用则返回成功;如果是\n" +" 无效的选项或 OPTNAME 被禁用则失败。" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"在 FORMAT 的控制下格式化并打印 ARGUMENTS 参数。\n" +" \n" +" 选项:\n" +" -v var\t将输出赋值给 shell 变量 VAR 而不显示在标准输出上\n" +" \n" +" FORMAT 是包含三种对象的字符串:简单地被拷贝到标准输出的普通字符;\n" +" 被变换之后拷贝到标准输入的转义字符;以及每个都会影响到下个参数的打印的格" +"式化声明。\n" +" \n" +" 在 printf(1) 中描述的标准控制声明之外,printf 解析:\n" +" \n" +" %b\t扩展对应参数中的反斜杠转义序列\n" +" %q\t以可作为 shell 输入的格式引用参数\n" +" %(fmt)T\t以 FMT 为供给 strftime(3) 的格式输出日期时间字符串\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者写或赋值错误发生。" + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"指定 Readline 如何补全参数。\n" +" \n" +" 声明对于每一个 NAME 名称如何补全参数。如果不带选项,\n" +" 现有的补全声明会以可以重用为输入的格式打印出来。\n" +" \n" +" 选项:\n" +" -p\t以可重用的格式打印现有的补全声明。\n" +" -r\t对于每个 NAME 名称删除补全声明,或者如果没有提供 NAME\n" +" \t名称,删除所有的补全声明。\n" +" -D\t对于没有补全声明定义的命令,设定默认的补全动作\n" +" -E\t对于 \"empty\" 命令设定补全动作,—— 对于空行的补全。\n" +" -I\t将补全和动作应用在首单词(通常是所给命令)上\n" +" \n" +" 尝试补全时,按照上述大写字母选项的顺序进行动作。\n" +" 如果给出了多个选项,-D 选项优先级高于 -E 选项,且\n" +" 这两个选项优先级均高于 -I。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者错误发生。" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"依据选项显示可能的补全。\n" +" \n" +" 意图在能产生可能的补全的 shell 函数内部使用。\n" +" 如果提供了可选的 WORD 参数,则产生按照 WORD\n" +" 进行的匹配。\n" +" \n" +" 退出状态:\n" +" 除非使用了无效选项或者错误发生,否则返回成功。" + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"修改或显示补全选项。\n" +" \n" +" 修改每个 NAME 名称的补全选项,或如果没有提供 NAME 名称,执行当前的补" +"全。\n" +" 如果不带选项,打印每个 NAME 名称的补全选项或当前的补全声明。\n" +" \n" +" 选项:\n" +" \t-o option\t为每个 NAME 名称设定补全选项 option\n" +" \t-D\t\t为 \"default\" 命令补全改变选项\n" +" \t-E\t\t为 \"empty\" 命令补全改变选项\n" +" \t-I\t\t为首单词的补全改变选项\n" +" \n" +" 使用 `+o' 而不是 `-o' 可以关闭指定的选项。\n" +" \n" +" 参数:\n" +" \n" +" 每个 NAME 名称都对应一个之前以通过 `complete' 内建定义了的补全声明的\n" +" 命令。如果不提供 NAME 名称,当前生成补全的函数必须调用 compopt,\n" +" 并且当前执行的补全生成器选项会被修改。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者 NAME 名称没有定义补全声明。" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"从标准输入读取行到下标数组变量中。\n" +" \n" +" 从标准输入读取行到下标数组变量 ARRAY 中,或者如果使用了 -u 选项,\n" +" 从文件描述符 FD 中读取。MAPFILE 变量是默认的 ARRAY 变量。\n" +" \n" +" 选项:\n" +" -d delim\t使用 DELIM 而非换行符断行\n" +" -n count\t最多拷贝 COUNT 行,如果 COUNT 为 0,则拷贝所有行。\n" +" -O origin\t从下标 ORIGIN 开始 赋值给 ARRAY 变量。默认下标是0.\n" +" -s count \t丢弃最先读取的 COUNT 行。\n" +" -t\t\t从读取的每行末尾删除一个换行符。\n" +" -u fd\t\t从文件描述符 FD 中读取行而不是标准输入。\n" +" -C callback\t每 QUANTUM 次读行之后对 CALLBACK 回调进行估值。\n" +" -c quantum\t定义每次调用 CALLBACK 回调之间读取的行数。\n" +" \n" +" 参数:\n" +" ARRAY\t\t存储数据使用的数组变量\n" +" \n" +" 如果使用了 -C 而没有 -c,默认的量子是5000。当对 CALLBACK 估值时,\n" +" 下一个将被赋值的数组元素的下标作为额外参数被传递。\n" +" \n" +" 如果没有显式指定起始下标,mapfile 将在赋值前清空 ARRAY 变量。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者 ARRAY 变量只读或不是下标数组。" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"从一个文件中读取行到数组变量中。\n" +" \n" +" 一个 `mapfile'的同义词。" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "返回当前子例程调用的上下文\n" +#~ " \n" +#~ " 不带 EXPR 时,返回 " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: 进程 %5ld(%s) 进入 the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "未知信号 #" + +# Inc. 的 . 是个缩写 +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "版权所有 (C) 2018 自由软件基金会" + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "版权所有 (C) 2014 自由软件基金会." + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "版权所有 (C) 2009 自由软件基金会\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "许可证 GPLv2+: GNU GPL 许可证第二版或者更新版本 \n" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". 带有 EXPR 时, 返回\n" +#~ " " + +#~ msgid "" +#~ "; this extra information can be used to\n" +#~ " provide a stack trace.\n" +#~ " \n" +#~ " The value of EXPR indicates how many call frames to go back before " +#~ "the\n" +#~ " current one; the top frame is frame 0." +#~ msgstr "" +#~ "; 这个额外信息可被用于\n" +#~ " 提供栈追踪.\n" +#~ " \n" +#~ " EXPR 的值显示了回到当前调用帧之前\n" +#~ " 的调用帧书目; 栈顶帧是第0帧." diff --git a/bash-5.1/po/zh_TW.gmo b/bash-5.1/po/zh_TW.gmo new file mode 100644 index 0000000000000000000000000000000000000000..f566ab31872c22446175e44e409ddc354b8f7c9d Binary files /dev/null and b/bash-5.1/po/zh_TW.gmo differ diff --git a/bash-5.1/po/zh_TW.po b/bash-5.1/po/zh_TW.po new file mode 100644 index 0000000000000000000000000000000000000000..457e876a58e3aff248b91106f400f2a9192c7762 --- /dev/null +++ b/bash-5.1/po/zh_TW.po @@ -0,0 +1,5648 @@ +# Traditional Chinese translations for bash package. +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Zi-You Dai , 2008. +# Mingye Wang (Arthur2e5) , 2015. +# Wei-Lun Chao , 2015. +# pan93412 , 2018, 2019. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2020-01-19 00:50+0800\n" +"Last-Translator: pan93412 \n" +"Language-Team: Chinese (traditional) \n" +"Language: zh_TW\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Lokalize 19.04.3\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "陣列下標不正確" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s:正在移除 nameref 屬性" + +#: arrayfunc.c:446 builtins/declare.def:851 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: 無法將索引陣列轉化為關聯陣列" + +#: arrayfunc.c:700 +#, c-format +msgid "%s: invalid associative array key" +msgstr "%s: 無效的關聯陣列鍵值" + +#: arrayfunc.c:702 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: 無法指派為非數字的索引" + +#: arrayfunc.c:747 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: 指派為關聯陣列時必須使用下標" + +#: bashhist.c:452 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: 無法建立: %s" + +#: bashline.c:4310 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: 無法為指令找到按鍵映射" + +#: bashline.c:4459 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: 第一個非空字元不是「\"」" + +#: bashline.c:4488 +#, c-format +msgid "no closing `%c' in %s" +msgstr "%2$s 中沒有閉合的「%1$c」" + +#: bashline.c:4519 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: 缺少冒號分隔符" + +#: bashline.c:4555 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "「%s」: 無法解除綁定" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "大括號展開:無法為 %s 分配記憶體" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "大括號展開:為 %u 個元素分配記憶體失敗" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "大括號展開:為「%s」分配記憶體失敗" + +#: builtins/alias.def:131 variables.c:1844 +#, c-format +msgid "`%s': invalid alias name" +msgstr "「%s」: 無效的別名" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "未啟用列編輯" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "「%s」: 無效的按鍵映射名" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s:不能讀取:%s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "「%s」:不明函數名稱" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s 未與任何按鍵綁定。\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s 可以被呼叫,藉由" + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "「%s」: 無法解除綁定" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "迴圈計數" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "僅在「for」,「while」, 或者「until」迴圈中有意義" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" +"回傳目前子呼叫的語境。\n" +" \n" +" 不帶有 EXPR 時,回傳「$line $filename」。帶有 EXPR 時,回傳\n" +" 「$line $subroutine $filename」;這個額外的資訊可以被用於提供\n" +" 堆疊追蹤。\n" +" \n" +" EXPR 的值顯示了到目前呼叫框格需要回去多少個呼叫框格;頂部框格\n" +" 是第 0 框格。\n" +" \n" +" 退出狀態:\n" +" 除非 shell 不在執行一個 shell 函數或者 EXPR 無效,否則回傳結\n" +" 果為 0。" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "未設定 HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "太多參數" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "空的目錄" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "未設定 OLDPWD" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "第 %d 列:" + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "警告:" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s:用法:" + +#: builtins/common.c:193 shell.c:516 shell.c:844 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s:選項需要一個參數" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s:需要數字參數" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s:沒有找到" + +#: builtins/common.c:216 shell.c:857 +#, c-format +msgid "%s: invalid option" +msgstr "%s:無效選項" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s:無效選項名稱" + +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "「%s」:不是一個有效的識別符" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "無效的八進位數字" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "無效的十六進位數字" + +#: builtins/common.c:244 expr.c:1569 +msgid "invalid number" +msgstr "無效數字" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s:無效的訊號規格" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "「%s」:不是一個 pid 或有效的工作規格" + +#: builtins/common.c:266 error.c:510 +#, c-format +msgid "%s: readonly variable" +msgstr "%s:唯讀的變數" + +#: builtins/common.c:274 +#, c-format +msgid "%s: %s out of range" +msgstr "%s:%s 超出範圍" + +#: builtins/common.c:274 builtins/common.c:276 +msgid "argument" +msgstr "參數" + +#: builtins/common.c:276 +#, c-format +msgid "%s out of range" +msgstr "%s 超出範圍" + +#: builtins/common.c:284 +#, c-format +msgid "%s: no such job" +msgstr "%s:沒有此類工作" + +#: builtins/common.c:292 +#, c-format +msgid "%s: no job control" +msgstr "%s:沒有工作控制" + +#: builtins/common.c:294 +msgid "no job control" +msgstr "沒有工作控制" + +#: builtins/common.c:304 +#, c-format +msgid "%s: restricted" +msgstr "%s:受限的" + +#: builtins/common.c:306 +msgid "restricted" +msgstr "受限的" + +#: builtins/common.c:314 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s:不是一個內建 shell" + +#: builtins/common.c:323 +#, c-format +msgid "write error: %s" +msgstr "寫入時發生錯誤:%s" + +#: builtins/common.c:331 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "設定終端屬性時發生錯誤: %s" + +#: builtins/common.c:333 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "取得終端屬性時發生錯誤: %s" + +#: builtins/common.c:635 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s:檢索目前目錄時發生錯誤:%s:%s\n" + +#: builtins/common.c:701 builtins/common.c:703 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s:模稜兩可的工作規格" + +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "這個版本沒有可用的說明" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: 無法取消設定: 唯讀 %s" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: 無法取消設定" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s:無效的功能名稱" + +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 +#, c-format +msgid "%s: no completion specification" +msgstr "%s:沒有完成的規格" + +#: builtins/complete.def:688 +msgid "warning: -F option may not work as you expect" +msgstr "警告:-F 選項可能無法按預期工作" + +#: builtins/complete.def:690 +msgid "warning: -C option may not work as you expect" +msgstr "警告:-C 選項可能無法按預期工作" + +#: builtins/complete.def:838 +msgid "not currently executing completion function" +msgstr "目前未執行補完功能" + +#: builtins/declare.def:134 +msgid "can only be used in a function" +msgstr "只能用在函數中" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: 引用變數不能為陣列" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: 不允許名稱引用變數引用自身" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: 迴圈變數名引用" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "「%s」:無效的引用變數名" + +#: builtins/declare.def:514 +msgid "cannot use `-f' to make functions" +msgstr "無法用「-f」產生函數" + +#: builtins/declare.def:526 execute_cmd.c:5986 +#, c-format +msgid "%s: readonly function" +msgstr "%s:唯讀函數" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s:不建議使用引用的複合陣列指定" + +#: builtins/declare.def:838 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: 無法以這種方式銷毀陣列變數" + +#: builtins/declare.def:845 builtins/read.def:815 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: 無法將關聯陣列轉化為索引陣列" + +#: builtins/enable.def:143 builtins/enable.def:151 +msgid "dynamic loading not available" +msgstr "動態載入不可用" + +#: builtins/enable.def:343 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "無法開啟共享物件 %s: %s" + +#: builtins/enable.def:371 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "無法在共享物件 %2$s 中找到 %1$s: %3$s" + +#: builtins/enable.def:388 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: 未以動態方式載入" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "為 %s 載入函式時回傳錯誤 (%d):尚未載入" + +#: builtins/enable.def:517 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: 未以動態方式載入" + +#: builtins/enable.def:543 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: 無法刪除: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 +#, c-format +msgid "%s: is a directory" +msgstr "%s: 是一個目錄" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: 不是一般檔案" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: 檔案太大" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: 無法執行二進位檔案" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: 無法執行: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "登出\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "不是登入 shell: 使用「exit」" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "有停止的工作。\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "有執行中的工作。\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "未找到指令" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "歷史記錄規格" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: 無法開啟暫存檔案: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "目前" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "在不帶工作控制的情況下啟動了工作 %d" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s:不合法的選項 ─ %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: 選項需要一個參數 -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "已停用雜湊" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: 雜湊表為空\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "命中\t指令\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Shell 指令,符合關鍵字 `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"沒有與「%s」符合的說明主題。嘗試「help help」或「man -k %s」或「info %s」。" + +#: builtins/help.def:224 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: 無法開啟: %s" + +#: builtins/help.def:524 +#, c-format +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" +"這些 shell 指令是內部定義的。請輸入「help」以取得一個列表。\n" +"輸入「help 名稱」以得到有關函數「名稱」的更多資訊。\n" +"使用「info bash」來獲得關於 shell 的更多一般性資訊。\n" +"使用「man -k」或「info」來取得不在列表中指令的更多資訊。\n" +"\n" +"名稱旁邊的星號(*)表示該指令被停用。\n" +"\n" + +#: builtins/history.def:155 +msgid "cannot use more than one of -anrw" +msgstr "最多能使用 -anrw 選項之一" + +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 +msgid "history position" +msgstr "歷史記錄位置" + +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s:無效時間戳" + +#: builtins/history.def:451 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: 歷史記錄擴充套件失敗" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib 失敗" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "其他選項不能與「-x」同時使用" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: 參數必須是行程或工作 ID" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "未知錯誤" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 +msgid "expression expected" +msgstr "需要表示式" + +#: builtins/mapfile.def:178 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: 不是一個索引陣列" + +#: builtins/mapfile.def:271 builtins/read.def:308 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: 無效的檔案描述符規格" + +#: builtins/mapfile.def:279 builtins/read.def:315 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: 無效的檔案描述符: %s" + +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: 無效的列數" + +#: builtins/mapfile.def:299 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: 無效的陣列原點" + +#: builtins/mapfile.def:316 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: 無效的回呼定量" + +#: builtins/mapfile.def:349 +msgid "empty array variable name" +msgstr "空陣列變數名" + +#: builtins/mapfile.def:370 +msgid "array variable support required" +msgstr "需要陣列變數支援" + +#: builtins/printf.def:419 +#, c-format +msgid "`%s': missing format character" +msgstr "「%s」: 缺少格式字元" + +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "「%c」: 無效的時間格式規格" + +#: builtins/printf.def:676 +#, c-format +msgid "`%c': invalid format character" +msgstr "「%c」: 無效格式字元" + +#: builtins/printf.def:702 +#, c-format +msgid "warning: %s: %s" +msgstr "警告: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "格式解析問題: %s" + +#: builtins/printf.def:885 +msgid "missing hex digit for \\x" +msgstr "使用了 \\x 但缺少十六進位數字" + +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "使用了 \\%c 但缺少萬國碼數字" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "無其他目錄" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: 無效參數" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<無目前目錄>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "目錄堆疊為空" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "目錄堆疊索引" + +#: builtins/pushd.def:701 +msgid "" +"Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list shown " +"by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list shown " +"by\n" +"\tdirs when invoked without options, starting with zero." +msgstr "" +"顯示目前記住的目錄列表。 目錄\n" +" 藉由「pushd」指令加入這個列表;您可以\n" +" 使用「popd」指令對列表進行遍歷。\n" +" \n" +" 選項:\n" +" -c\t刪除所有元素以清除目錄堆疊\n" +" -l\t不印出與家目錄相關的以波浪號\n" +" \t為字首的目錄\n" +" -p\t每列一個條目印出目錄堆疊\n" +" -v\t以堆疊位置為字首,每列一個條目\n" +" \t印出目錄堆疊\n" +" \n" +" 參數:\n" +" +N\t以 dirs 不帶選項輸出的順序,從左起第 N 個條目顯示列表,\n" +" \t從 0 開始。\n" +" \n" +" -N\t以 dirs 不帶選項輸出的順序,從右起第 N 個項目顯示列表,\n" +"\t從 0 開始。" + +#: builtins/pushd.def:723 +msgid "" +"Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"在目錄堆疊頂部加入一個目錄,或者論詢\n" +" 目錄堆疊,是目前工作目錄成為新的堆疊頂端\n" +" 不帶參數時,交換堆疊頂端的兩個目錄。\n" +" \n" +" 選項:\n" +" -n\t抑制增加堆疊中目錄時通常變更目錄的操作,\n" +" \t從而只有堆疊被操作。\n" +" \n" +" 參數:\n" +" +N\t輪轉堆疊使得第 N 個目錄(「dirs」的\n" +" \t輸出列表中左起,從 0 開始)\n" +" \t升至堆疊頂端。\n" +" \n" +" -N\t輪轉堆疊使得第 N 個目錄(「dirs」的\n" +" \t輸出列表中右起,從 0 開始)\n" +" \t升至堆疊頂端\n" +" \n" +" dir\t新增目錄至堆疊頂端,並\n" +" \t使其成為新的目前工作目錄。\n" +" \n" +" 「dirs」內建指令顯示目錄堆疊。" + +#: builtins/pushd.def:748 +msgid "" +"Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack." +msgstr "" +"從目錄堆疊中刪除條目。不帶參數時,刪除\n" +" 堆疊頂端目錄並變更至新的堆疊頂端目錄。\n" +" \n" +" 選項:\n" +" -n\t抑制從堆疊中刪除目錄時通常變更目錄操作,\n" +" \t從而只有堆疊被操作。\n" +" \n" +" 參數:\n" +" +N\t從「dirs」輸出的列表中,\n" +" \t刪除左起第 N 個條目,計數從 0 開始。例如:「popd +0」\n" +" \t刪除第一個目錄,「popd +1」刪除第二個。\n" +" \n" +" -N\t從「dirs」輸出的列表中,\n" +" \t刪除右起第 N 個條目,計數從 0 開始,例如:「popd -0」\n" +" \t刪除最後一個條目,「popd -1」刪除倒數第二個。\n" +" \n" +" 「dirs」內建變數顯示目錄堆疊。" + +#: builtins/read.def:280 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: 無效的逾時規格" + +#: builtins/read.def:755 +#, c-format +msgid "read error: %d: %s" +msgstr "讀取錯誤: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "只能從函數或者原始指令稿「return」" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "無法同時取消設定一個函數和一個變數" + +#: builtins/set.def:966 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: 不是陣列變數" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: 不是函數" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s:無法匯出" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "位移計數" + +#: builtins/shopt.def:310 +msgid "cannot set and unset shell options simultaneously" +msgstr "無法同時設定和取消設定 shell 選項" + +#: builtins/shopt.def:428 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: 無效的 shell 選項名稱" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "需要檔名參數" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: 檔案未找到" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "無法暫停" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "無法暫停登入 shell" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s 是「%s」的別名\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s 是 shell 關鍵字\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s 是一個函數\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s 是特別的 shell 內建物件\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s 是 shell 內建物件\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s 是 %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s 已進行雜湊操作 (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: 無效的 limit 參數" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "「%c」:不當的指令" + +#: builtins/ulimit.def:455 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s:不能得到 limit: %s" + +#: builtins/ulimit.def:481 +msgid "limit" +msgstr "limit" + +#: builtins/ulimit.def:493 builtins/ulimit.def:793 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s:不能修改 limit: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "八進位數字" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "「%c」: 無效的符號狀態運算子" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "「%c」: 無效的符號狀態字元" + +#: error.c:89 error.c:347 error.c:349 error.c:351 +msgid " line " +msgstr " 列 " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "最後的指令:%s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "中止…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "通知:" + +#: error.c:462 +msgid "unknown command error" +msgstr "不明指令錯誤" + +#: error.c:463 +msgid "bad command type" +msgstr "不當的指令類型" + +#: error.c:464 +msgid "bad connector" +msgstr "不當的連接器" + +#: error.c:465 +msgid "bad jump" +msgstr "錯誤的跳轉" + +#: error.c:503 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: 未綁定的變數" + +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\a 等待輸入逾時:自動登出\n" + +#: execute_cmd.c:537 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "無法從 /dev/null 重定向標準輸入: %s" + +#: execute_cmd.c:1297 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "時間格式:「%c」: 無效的格式字元" + +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc:coproc [%d:%s] 仍然存在" + +#: execute_cmd.c:2486 +msgid "pipe error" +msgstr "管道錯誤" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval:超出最大 eval 巢狀層數 (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: 超出最大來源巢狀層數 (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: 超出最大函數巢狀層數 (%d)" + +#: execute_cmd.c:5467 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: 受限的: 無法在指令名稱中使用「/」" + +#: execute_cmd.c:5574 +#, c-format +msgid "%s: command not found" +msgstr "%s:指令找不到" + +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: 不當的直譯器" + +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: 無法執行二進位檔案: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "「%s」: 特殊內建" + +#: execute_cmd.c:6029 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "無法複製檔案描述符 %d 到檔案描述符 %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "表示式遞迴層次超出範圍" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "遞迴堆疊下限溢位" + +#: expr.c:477 +msgid "syntax error in expression" +msgstr "表示式語法錯誤" + +#: expr.c:521 +msgid "attempted assignment to non-variable" +msgstr "嘗試指派給非變數" + +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "變數定義語法錯誤" + +#: expr.c:544 expr.c:911 +msgid "division by 0" +msgstr "除 0" + +#: expr.c:592 +msgid "bug: bad expassign token" +msgstr "錯誤:不當的表示式字組" + +#: expr.c:646 +msgid "`:' expected for conditional expression" +msgstr "條件表示式需要「:」" + +#: expr.c:972 +msgid "exponent less than 0" +msgstr "指數小於 0" + +#: expr.c:1029 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "預增符或預減符後應跟有識別符" + +#: expr.c:1056 +msgid "missing `)'" +msgstr "缺少「)」" + +#: expr.c:1107 expr.c:1487 +msgid "syntax error: operand expected" +msgstr "語法錯誤: 需要運算元" + +#: expr.c:1489 +msgid "syntax error: invalid arithmetic operator" +msgstr "語法錯誤: 無效的算術運算子" + +#: expr.c:1513 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (錯誤字組是「%s」)" + +#: expr.c:1573 +msgid "invalid arithmetic base" +msgstr "無效的算術進位" + +#: expr.c:1582 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: 無效的列數" + +#: expr.c:1598 +msgid "value too great for base" +msgstr "數值太大不可為算術進位的基底" + +#: expr.c:1647 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: 表示式錯誤\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: 無法存取上層目錄" + +#: input.c:99 subst.c:6069 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "無法為檔案描述符 %d 重設無延遲模式" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "無法為來自 fd %d 的 bash 輸入分配新的檔案描述符" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: 已經存在提供給新 fd %d 的緩衝區" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: 行程群組管道" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "產生的行程識別碼 %d 顯示為執行中的工作 %d" + +#: jobs.c:1402 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "刪除行程群組 %2$ld 中已停止的工作 %1$d" + +#: jobs.c:1511 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: 行程識別碼 %5ld(%s) 標註為仍活著" + +#: jobs.c:1850 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: 無此行程識別碼" + +#: jobs.c:1865 +#, c-format +msgid "Signal %d" +msgstr "訊號 %d" + +#: jobs.c:1879 jobs.c:1905 +msgid "Done" +msgstr "已完成" + +#: jobs.c:1884 siglist.c:122 +msgid "Stopped" +msgstr "停止" + +#: jobs.c:1888 +#, c-format +msgid "Stopped(%s)" +msgstr "已停止(%s)" + +#: jobs.c:1892 +msgid "Running" +msgstr "執行中" + +#: jobs.c:1909 +#, c-format +msgid "Done(%d)" +msgstr "已完成(%d)" + +#: jobs.c:1911 +#, c-format +msgid "Exit %d" +msgstr "退出 %d" + +#: jobs.c:1914 +msgid "Unknown status" +msgstr "不明狀態" + +#: jobs.c:2001 +#, c-format +msgid "(core dumped) " +msgstr "(核心已傾印)" + +#: jobs.c:2020 +#, c-format +msgid " (wd: %s)" +msgstr " (工作目錄: %s)" + +#: jobs.c:2259 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "子行程 setpgid (%ld 到 %ld)" + +#: jobs.c:2617 nojobs.c:664 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: 行程識別碼 %ld 不是目前 shell 的子行程" + +#: jobs.c:2893 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wiat_for: 沒有行程 %ld 的紀錄" + +#: jobs.c:3236 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: 工作 %d 已停止" + +#: jobs.c:3564 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s:沒有此類工作" + +#: jobs.c:3571 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: 工作已經終止" + +#: jobs.c:3580 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: 工作 %d 已在背景執行" + +#: jobs.c:3806 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: 開啟 WNOHANG 以避免無限阻塞" + +#: jobs.c:4320 +#, c-format +msgid "%s: line %d: " +msgstr "%s: 第 %d 列:" + +#: jobs.c:4334 nojobs.c:919 +#, c-format +msgid " (core dumped)" +msgstr " (核心已傾印)" + +#: jobs.c:4346 jobs.c:4359 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(目前工作目錄:%s)\n" + +#: jobs.c:4391 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp 失敗" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control:背景中沒有工作控制" + +#: jobs.c:4463 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: 列規律" + +#: jobs.c:4473 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4494 jobs.c:4503 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "無法設定終端行程群組(%d)" + +#: jobs.c:4508 +msgid "no job control in this shell" +msgstr "此 shell 中無工作控制" + +#: lib/malloc/malloc.c:353 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: 主張失敗: %s\n" + +#: lib/malloc/malloc.c:369 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: 主張已修補\r\n" + +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 +msgid "unknown" +msgstr "不明" + +#: lib/malloc/malloc.c:882 +msgid "malloc: block on free list clobbered" +msgstr "malloc: 空閒串列中的區塊損壞" + +#: lib/malloc/malloc.c:972 +msgid "free: called with already freed block argument" +msgstr "free: 用已經釋放的區塊做為呼叫參數" + +#: lib/malloc/malloc.c:975 +msgid "free: called with unallocated block argument" +msgstr "free: 用未分配的區塊做為呼叫參數" + +#: lib/malloc/malloc.c:994 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: 檢測到下限溢位;mh_nbytes 超出範圍" + +#: lib/malloc/malloc.c:1001 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: 檢測到下限溢位;mh_nbytes 超出範圍" + +#: lib/malloc/malloc.c:1009 +msgid "free: start and end chunk sizes differ" +msgstr "free: 啟始和末尾區塊大小不一致" + +#: lib/malloc/malloc.c:1119 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: 用未分配的區塊做為呼叫參數" + +#: lib/malloc/malloc.c:1134 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: 檢測到下限溢位;mh_nbytes 超出範圍" + +#: lib/malloc/malloc.c:1141 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: 檢測到下限溢位;mh_nbytes 超出範圍" + +#: lib/malloc/malloc.c:1150 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: 啟始和末尾區塊大小不一致" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: 分配表已經充滿了 FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p 在表中顯示為已分配?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p 在表中顯示為已釋放?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "無效的基底" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s:不明的主機" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s:無效服務" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s:不當的網路路徑規格" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "不支援網路操作" + +#: locale.c:217 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: 無法變更語區選項 (%s)" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: 無法變更語區選項 (%s): %s" + +#: locale.c:292 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: 無法變更語區選項 (%s)" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: 無法變更語區選項 (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "您有郵件在 $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "您有新郵件在 $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "郵件在 %s 已閱讀\n" + +#: make_cmd.c:317 +msgid "syntax error: arithmetic expression required" +msgstr "語法錯誤:需要算式" + +#: make_cmd.c:319 +msgid "syntax error: `;' unexpected" +msgstr "語法錯誤:「;」意外" + +#: make_cmd.c:320 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "語法錯誤:「((%s))」" + +#: make_cmd.c:572 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document:不當的指示類型 %d" + +#: make_cmd.c:657 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "立即檔案在第 %d 列被檔案結束符分隔 (需要「%s」)" + +#: make_cmd.c:756 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection:重新導向指示「%d」超出範圍" + +#: parse.y:2393 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "shell_getc: shell_input_line_size (%zu) 超過 SIZE_MAX (%lu):列被截斷" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "超過此處檔案上限最大值" + +#: parse.y:3581 parse.y:3957 parse.y:4556 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "尋找符合的「%c」時遇到了未預期的檔案結束符" + +#: parse.y:4696 +msgid "unexpected EOF while looking for `]]'" +msgstr "尋找「]]」時遇到了未預期的檔案結束符" + +#: parse.y:4701 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "條件表示式中有語法錯誤: 未預期的字組「%s」" + +#: parse.y:4705 +msgid "syntax error in conditional expression" +msgstr "語法錯誤,在有條件的表示式" + +#: parse.y:4783 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "未預期的字組「%s」,需要「)」" + +#: parse.y:4787 +msgid "expected `)'" +msgstr "預期「)」" + +#: parse.y:4815 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "一元條件運算子使用了未預期的參數「%s」" + +#: parse.y:4819 +msgid "unexpected argument to conditional unary operator" +msgstr "一元條件運算子使用了未預期的參數" + +#: parse.y:4865 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "未預期的字組「%s」,需要二元條件運算子" + +#: parse.y:4869 +msgid "conditional binary operator expected" +msgstr "需要二元條件運算子" + +#: parse.y:4891 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "二元條件運算子使用了未預期的參數「%s」" + +#: parse.y:4895 +msgid "unexpected argument to conditional binary operator" +msgstr "二元條件運算子使用了未預期的參數" + +#: parse.y:4906 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "條件指令中有未預期的字組「%c」" + +#: parse.y:4909 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "條件指令中有未預期的字組「%s」" + +#: parse.y:4913 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "條件指令中有未預期的字組 %d" + +#: parse.y:6336 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "未預期的字組「%s」附近有語法錯誤" + +#: parse.y:6355 +#, c-format +msgid "syntax error near `%s'" +msgstr "「%s」附近有語法錯誤" + +#: parse.y:6365 +msgid "syntax error: unexpected end of file" +msgstr "語法錯誤: 未預期的檔案結尾" + +#: parse.y:6365 +msgid "syntax error" +msgstr "語法錯誤" + +#: parse.y:6428 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "使用「%s」退出 shell。\n" + +#: parse.y:6602 +msgid "unexpected EOF while looking for matching `)'" +msgstr "尋找符合的「)」時遇到了未預期的檔案結束符" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "補完: 未找到函數「%s」" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion:%s:可能重試迴圈" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: 空的補完規格" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: 錯誤的條件連接符「%d」" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: 無效的檔案描述符" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: 空的檔案指標" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1540 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf:「%c」: 無效的格式字元" + +#: redir.c:149 redir.c:197 +msgid "file descriptor out of range" +msgstr "檔案描述符超出範圍" + +#: redir.c:204 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: 模稜兩可的重定向" + +#: redir.c:208 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: 無法覆寫已存在的檔案" + +#: redir.c:213 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: 受限的: 無法重定向輸出" + +#: redir.c:218 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "無法為立即檔案建立暫存檔案: %s" + +#: redir.c:222 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: 無法將檔案描述符指派給變數" + +#: redir.c:649 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "沒有網路時不支援 /dev/(tcp|udp)/host/port" + +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 +msgid "redirection error: cannot duplicate fd" +msgstr "重定向錯誤: 無法複製檔案描述符" + +#: shell.c:347 +msgid "could not find /tmp, please create!" +msgstr "無法找到 /tmp,請建立" + +#: shell.c:351 +msgid "/tmp must be a valid directory name" +msgstr "/tmp 必須為有效的目錄名稱" + +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "已在互動式 shell 中忽略美化輸出模式" + +#: shell.c:948 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c:無效選項" + +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "無法設定 UID 至 %d:有效的 UID %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "無法設定 GID 至 %d:有效的 GID %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "無法開啟偵錯器;偵錯模式已停用" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: 是一個目錄" + +#: shell.c:1881 +msgid "I have no name!" +msgstr "我沒有名字!" + +#: shell.c:2035 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash,版本 %s-(%s)\n" + +#: shell.c:2036 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"用法:\t%s [GNU 長選項] [選項] …\n" +"\t%s [GNU 長選項] [選項] 指令稿檔案 …\n" + +#: shell.c:2038 +msgid "GNU long options:\n" +msgstr "GNU 長選項:\n" + +#: shell.c:2042 +msgid "Shell options:\n" +msgstr "Shell 選項:\n" + +#: shell.c:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD 或 -c <指令> 或 -O \t\t(僅適合呼叫)\n" + +#: shell.c:2062 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s or -o 選項\n" + +#: shell.c:2068 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "輸入「%s -c \"help set\"」更多關於 shell 選項的訊息。\n" + +#: shell.c:2069 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "輸入「%s -c help」更多關於內建 shell 指令的訊息。\n" + +#: shell.c:2070 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "使用「bashbug」指令通報程式錯誤。\n" + +#: shell.c:2072 +#, c-format +msgid "bash home page: \n" +msgstr "bash 官網:\n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "GNU 軟體的常見使用說明:\n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask:%d:無效操作" + +#: siglist.c:47 +msgid "Bogus signal" +msgstr "偽訊號" + +#: siglist.c:50 +msgid "Hangup" +msgstr "掛斷" + +#: siglist.c:54 +msgid "Interrupt" +msgstr "中止" + +#: siglist.c:58 +msgid "Quit" +msgstr "結束" + +#: siglist.c:62 +msgid "Illegal instruction" +msgstr "無效指令" + +#: siglist.c:66 +msgid "BPT trace/trap" +msgstr "斷點追蹤/陷阱" + +#: siglist.c:74 +msgid "ABORT instruction" +msgstr "放棄指令" + +#: siglist.c:78 +msgid "EMT instruction" +msgstr "模擬器陷阱指令" + +#: siglist.c:82 +msgid "Floating point exception" +msgstr "期望浮點數" + +#: siglist.c:86 +msgid "Killed" +msgstr "強制結束" + +#: siglist.c:90 +msgid "Bus error" +msgstr "匯流排錯誤" + +#: siglist.c:94 +msgid "Segmentation fault" +msgstr "程式記憶體區段錯誤" + +#: siglist.c:98 +msgid "Bad system call" +msgstr "無效系統呼叫" + +#: siglist.c:102 +msgid "Broken pipe" +msgstr "管線損壞" + +#: siglist.c:106 +msgid "Alarm clock" +msgstr "鬧鐘" + +#: siglist.c:110 +msgid "Terminated" +msgstr "終止" + +#: siglist.c:114 +msgid "Urgent IO condition" +msgstr "緊急 I/O 狀況" + +#: siglist.c:118 +msgid "Stopped (signal)" +msgstr "停止(信號)" + +#: siglist.c:126 +msgid "Continue" +msgstr "繼續" + +#: siglist.c:134 +msgid "Child death or stop" +msgstr "子行程已死或者停止" + +#: siglist.c:138 +msgid "Stopped (tty input)" +msgstr "停止(tty 輸入)" + +#: siglist.c:142 +msgid "Stopped (tty output)" +msgstr "停止(tty 輸出)" + +#: siglist.c:146 +msgid "I/O ready" +msgstr "I/O 就緒" + +#: siglist.c:150 +msgid "CPU limit" +msgstr "CPU 限制" + +#: siglist.c:154 +msgid "File limit" +msgstr "檔案限制" + +#: siglist.c:158 +msgid "Alarm (virtual)" +msgstr "警報(虛擬)" + +#: siglist.c:162 +msgid "Alarm (profile)" +msgstr "警報(側寫)" + +#: siglist.c:166 +msgid "Window changed" +msgstr "已變更視窗" + +#: siglist.c:170 +msgid "Record lock" +msgstr "記錄鎖" + +#: siglist.c:174 +msgid "User signal 1" +msgstr "使用者訊號 1" + +#: siglist.c:178 +msgid "User signal 2" +msgstr "使用者訊號 2" + +#: siglist.c:182 +msgid "HFT input data pending" +msgstr "HFT 待輸入資料" + +#: siglist.c:186 +msgid "power failure imminent" +msgstr "即將停止電源" + +#: siglist.c:190 +msgid "system crash imminent" +msgstr "系統即將崩潰" + +#: siglist.c:194 +msgid "migrate process to another CPU" +msgstr "遷移行程至另一個 CPU" + +#: siglist.c:198 +msgid "programming error" +msgstr "程式設計錯誤" + +#: siglist.c:202 +msgid "HFT monitor mode granted" +msgstr "已授予 HFT 監視模式" + +#: siglist.c:206 +msgid "HFT monitor mode retracted" +msgstr "已復原 HFT 監視模式" + +#: siglist.c:210 +msgid "HFT sound sequence has completed" +msgstr "已完成 HFT 聲音序列" + +#: siglist.c:214 +msgid "Information request" +msgstr "資訊請求" + +#: siglist.c:222 siglist.c:224 +#, c-format +msgid "Unknown Signal #%d" +msgstr "不明訊號 #%d" + +#: subst.c:1476 subst.c:1666 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "錯誤的取代: 在 %2$s 中沒有閉合的「%1$s」" + +#: subst.c:3281 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: 無法將串列指派給陣列成員" + +#: subst.c:5910 subst.c:5926 +msgid "cannot make pipe for process substitution" +msgstr "無法為行程取代建立管道" + +#: subst.c:5985 +msgid "cannot make child for process substitution" +msgstr "無法為行程取代建立子行程" + +#: subst.c:6059 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "無法開啟命名管道 %s 進 readline-" + +#: subst.c:6061 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "無法開啟命名管道 %s 進行寫入" + +#: subst.c:6084 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "無法將命名管道 %s 做為檔案描述符 %d 複製" + +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "指令取代:在輸入中忽略了空位元組" + +#: subst.c:6353 +msgid "cannot make pipe for command substitution" +msgstr "無法為指令取代建立管道" + +#: subst.c:6397 +msgid "cannot make child for command substitution" +msgstr "無法為指令取代建立子行程" + +#: subst.c:6423 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: 無法將管道複製為檔案描述符 1" + +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: 無效的引用變數名" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: 無效的間接擴充" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s:無效的變數名稱" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s:參數未設定" + +#: subst.c:7258 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: 參數為空或未設定" + +#: subst.c:7503 subst.c:7518 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: 子串表示式 < 0" + +#: subst.c:9281 subst.c:9302 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: 錯誤的取代" + +#: subst.c:9390 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: 無法如此指派" + +#: subst.c:9814 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "未來版本的 shell 會強制以算術取代求值" + +#: subst.c:10367 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "錯誤的取代: 在 %s 中沒有閉合的「`」" + +#: subst.c:11434 +#, c-format +msgid "no match: %s" +msgstr "無符合: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "需要參數" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: 需要整數表示式" + +#: test.c:265 +msgid "`)' expected" +msgstr "需要「)」" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "需要「)」,得到 %s" + +#: test.c:466 test.c:799 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: 需要二元表示式" + +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: 需要一元表示式" + +#: test.c:881 +msgid "missing `]'" +msgstr "缺少「]」" + +#: test.c:899 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "語法錯誤:「;」意外" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "無效訊號數字" + +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "捕捉處理函式:達到最大捕捉處理函式等級 (%d)" + +#: trap.c:414 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: trap_list[%d] 中的錯誤值: %p" + +#: trap.c:418 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps:訊號處理是 SIG_DFL,resending %d (%s) to myself" + +#: trap.c:487 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler:不當的訊號 %d" + +#: variables.c:421 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "錯誤,輸入的函數定義為「%s」" + +#: variables.c:833 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "shell 層次 (%d) 太高,重設為 1" + +#: variables.c:2674 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: 目前作用域中沒有函數語境" + +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: 變數不可指派值" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s:指定數字至名稱參考" + +#: variables.c:4404 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: 目前作用域中沒有函數語境" + +#: variables.c:4771 +#, c-format +msgid "%s has null exportstr" +msgstr "%s 有空的 exportstr" + +#: variables.c:4776 variables.c:4785 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%2$s 的 exportstr 中有無效的字元 %1$d" + +#: variables.c:4791 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "%s 的 exportstr 中沒有「=」" + +#: variables.c:5331 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: shell_variables 的前端不是函數語境" + +#: variables.c:5344 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: 沒有 global_variables 語境" + +#: variables.c:5424 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: shell_variables 的前端不是臨時環境作用域" + +#: variables.c:6387 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: 無法做為檔案開啟" + +#: variables.c:6392 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: 追蹤檔案描述符的值無效" + +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: 相容版本數值超出範圍" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "著作權所有 (C) 2018 自由軟體基金會" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"授權條款 GPLv3+: GNU GPL 授權條款第三版或者更新版本 \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash,版本 %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "本軟體是自由軟體,您可以自由地變更和重新發布。" + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "在法律許可的情況下特此明示,本軟體不提供任何擔保。" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: 無法分配 %lu 位元組 (已分配 %lu 位元組)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: 無法分配 %lu 位元組" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: 無法分配 %lu 位元組 (已分配 %lu 位元組)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: 無法分配 %lu 位元組" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [名稱[=值] … ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] 名稱 [名稱 …]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPSVX] [-m 按鍵映射] [-f 檔名] [-q 名稱] [-u 名稱] [-r 按鍵序列] [-" +"x 按鍵序列:shell-指令] [按鍵序列:readline-函數 或 readline-指令]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell 內建物件 [參數 …]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [表示式]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [目錄]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] 指令 [參數 …]" + +#: builtins.c:78 +#, fuzzy +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [名稱[=值] …]" + +#: builtins.c:80 +#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgilnrtux] [-p] 名稱[=值] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] 名稱[=值] …" + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [參數 …]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [參數 …]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f 檔名] [名稱 …]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [參數 …]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts 選項字串 名稱 [參數]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a 名稱] [指令 [參數 …]] [重定向 …]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e 編輯器名] [-lnr] [起始] [終止] 或 fc -s [模式=取代串] [指令]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [工作規格]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [工作規格 …]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p 路徑名] [-dt] [名稱 …]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [模式 …]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d 偏移量] [n] 或 history -anrw [檔名] 或 history -ps 參數 [參" +"數…]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [工作規格 …] 或 jobs -x 指令 [參數]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s 訊號規格 | -n 訊號編號 | -訊號規格] 行程識別碼 | 工作規格 … 或 kill " +"-l [訊號規格]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let 參數 [參數 …]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a 陣列] [-d 分隔符] [-i 緩衝區文字] [-n 讀取字元數] [-N 讀取字" +"元數] [-p 提示符] [-t 逾時] [-u 檔案描述符] [名稱 …]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o 選項名] [--] [參數 …]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [名稱 …]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [名稱[=值] …] 或 export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [名稱[=值] …] 或 readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source 檔名 [參數]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". 檔名 [參數]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [表示式]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ 參數… ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[參數] 訊號規格 …]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] 名稱 [名稱 …]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [模式]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [編號 …]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [行程識別碼 …]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for 名稱 [in 字詞 … ] ; do 指令 ; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( 表示式1; 表示式2; 表示式3 )); do 指令 ; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in 字詞 … ;] do 指令 ; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] 管道" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case 詞 in [模式 [| 模式]…) 指令 ;;]… esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "if 指令 ; then 指令 ; [ elif 指令 ; then 指令 ; ]… [ else 指令 ; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while 指令 ; do 指令 ; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until 指令 ; do 指令 ; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [名稱] 指令 [重定向]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function 名稱 { 指令 ; } 或 name () { 指令 ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ 指令 ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( 表示式 ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ 表示式 ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - 一些 shell 變數的名稱和含義" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | 目錄]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [選項名 …]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] 格式 [參數]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o 選項] [-A 動作] [-G 全域模式] [-W " +"詞語列表] [-F 函數] [-C 指令] [-X 過濾模式] [-P 字首] [-S 字尾] [名稱 …]" + +#: builtins.c:235 +#, fuzzy +msgid "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-" +"F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +msgstr "" +"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " +"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o 選項] [-DEI] [名稱 …]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d 分割符號] [-n 計數] [-O 起始序號] [-s 計數] [-t] [-u fd] [-C 回" +"呼] [-c 定量] [陣列]" + +#: builtins.c:256 +msgid "" +"Define or display aliases.\n" +" \n" +" Without arguments, `alias' prints the list of aliases in the reusable\n" +" form `alias NAME=VALUE' on standard output.\n" +" \n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded.\n" +" \n" +" Options:\n" +" -p\tprint all defined aliases in a reusable format\n" +" \n" +" Exit Status:\n" +" alias returns true unless a NAME is supplied for which no alias has " +"been\n" +" defined." +msgstr "" +"定義或顯示別名。\n" +" \n" +" 不帶參數時,「alias」以可重用的格式\n" +" 「alias 名稱=值」在標準輸出裝置上印出別名列表。\n" +" \n" +" 否則,對於每個指定值的名稱定義一個別名。\n" +" 值末尾的空格會使下一個字詞被檢測\n" +" 做為別名取代展開。\n" +" \n" +" 選項:\n" +" -p\t以可重用的格式印出所有的已定義別名\n" +" \n" +" 退出狀態:\n" +" 除非一個沒有定義的名字被做為參數提供,否則 alias \n" +" 回傳值為真。" + +#: builtins.c:278 +msgid "" +"Remove each NAME from the list of defined aliases.\n" +" \n" +" Options:\n" +" -a\tremove all alias definitions\n" +" \n" +" Return success unless a NAME is not an existing alias." +msgstr "" +"從別名定義列表中刪除每一個 <名稱>。\n" +" \n" +" 選項:\n" +" -a\t刪除所有的別名定義\n" +" \n" +" 回傳成功,除非 <名稱> 不是一個已存在的別名。" + +#: builtins.c:291 +msgid "" +"Set Readline key bindings and variables.\n" +" \n" +" Bind a key sequence to a Readline function or a macro, or set a\n" +" Readline variable. The non-option argument syntax is equivalent to\n" +" that found in ~/.inputrc, but must be passed as a single argument:\n" +" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Options:\n" +" -m keymap Use KEYMAP as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -S List key sequences that invoke macros and their " +"values\n" +" -s List key sequences that invoke macros and their " +"values\n" +" in a form that can be reused as input.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named " +"function.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -f filename Read key bindings from FILENAME.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"設定 Readline 按鍵綁定和變數。\n" +" \n" +" 綁定一個按鍵序列到一個 Readline 函數或者巨集,或者設定一個\n" +" Readline 變數。非選項參數的語法和 ~/.inputrc 檔案中的等\n" +" 同,但是必須做為一個參數被傳遞,\n" +" 例如,bind '\"\\C-x\\C-r\": re-read-init-file'。\n" +" \n" +" 選項:\n" +" -m 按鍵映射 在此指令執行過程中使用指定的按鍵映射。\n" +" 可被接受的按鍵映射名字有 emacs、emacs-standard、emacs-" +"meta、\n" +" emacs-ctlx、vi、vi-move、vi-command、和 vi-insert。\n" +" -l 列出函數名稱。\n" +" -P 列出函數名稱和綁定。\n" +" -p 以可以重新用作輸入的格式列出函數名稱和綁定。\n" +" -S 列出可以啟動巨集的按鍵序列以及它們的值\n" +" -s 以可以重新用作輸入的格式列出可以啟動巨集的鍵以及它們的" +"值。\n" +" -V 列出變數名稱和它們的值\n" +" -v 以可以重新用作輸入的格式列出變數的名稱和它們的值\n" +" -q 函數名 查詢指定的函數可以由哪些鍵啟動。\n" +" -u 函數名 反綁定所有綁定至指定函數的鍵。\n" +" -r 按鍵序列 取消指定按鍵序列的綁定。\n" +" -f 檔名 從指定檔案中讀取按鍵綁定。\n" +" -x 按鍵序列:shell 指令\t當指定的按鍵序列被輸入時,執行指定的 shell 指" +"令。\n" +" -X 以可被重用的形式列出用 -x 綁定的按鍵序列和指令。\n" +" \n" +" 退出狀態:\n" +" 除非使用了無法識別的選項或者錯誤發生,否則回傳 0。" + +#: builtins.c:330 +msgid "" +"Exit for, while, or until loops.\n" +" \n" +" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n" +" loops.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"退出 for、while 或 until 迴圈\n" +" \n" +" 退出一個 FOR、WHILE 或 UNTIL 迴圈。如果指定了 N,則跳出 N 重\n" +" 迴圈\n" +" \n" +" 退出狀態:\n" +" 退出狀態為 0 除非 N 不大於或等於 1。" + +#: builtins.c:342 +msgid "" +"Resume for, while, or until loops.\n" +" \n" +" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resumes the Nth enclosing loop.\n" +" \n" +" Exit Status:\n" +" The exit status is 0 unless N is not greater than or equal to 1." +msgstr "" +"繼續 for、while 或 until 迴圈。\n" +" \n" +" 繼續目前 FOR、WHILE 或 UNTIL 迴圈的下一步。\n" +" 如果指定了 N, 則繼續目前的第 N 重迴圈。\n" +" \n" +" 退出狀態:\n" +" 退出狀態為 0 除非 N 不大於或等於 1。" + +#: builtins.c:354 +msgid "" +"Execute shell builtins.\n" +" \n" +" Execute SHELL-BUILTIN with arguments ARGs without performing command\n" +" lookup. This is useful when you wish to reimplement a shell builtin\n" +" as a shell function, but need to execute the builtin within the " +"function.\n" +" \n" +" Exit Status:\n" +" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" +" not a shell builtin." +msgstr "" +"執行 shell 內建物件。\n" +" \n" +" 帶 <參數> 執行 而不做指令查詢\n" +" 在希望以 shell 函數的形式來重新實現 shell 內建物件,\n" +" 但需要在函數之內執行該 shell 內建物件的情況下有用處。\n" +" \n" +" 退出狀態:\n" +" 以 的退出狀態為準,或者如果 不是一個 " +"shell 內建物件時\n" +" 回傳 false。" + +#: builtins.c:369 +msgid "" +"Return the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns \"$line $filename\". With EXPR, returns\n" +" \"$line $subroutine $filename\"; this extra information can be used to\n" +" provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless the shell is not executing a shell function or EXPR\n" +" is invalid." +msgstr "" +"回傳目前子呼叫的語境。\n" +" \n" +" 不帶有 EXPR 時,回傳「$line $filename」。帶有 EXPR 時,回傳\n" +" 「$line $subroutine $filename」;這個額外的資訊可以被用於提供\n" +" 堆疊追蹤。\n" +" \n" +" EXPR 的值顯示了到目前呼叫框格需要回去多少個呼叫框格;頂部框格\n" +" 是第 0 框格。\n" +" \n" +" 退出狀態:\n" +" 除非 shell 不在執行一個 shell 函數或者 EXPR 無效,否則回傳結\n" +" 果為 0。" + +#: builtins.c:387 +msgid "" +"Change the shell working directory.\n" +" \n" +" Change the current directory to DIR. The default DIR is the value of " +"the\n" +" HOME shell variable.\n" +" \n" +" The variable CDPATH defines the search path for the directory " +"containing\n" +" DIR. Alternative directory names in CDPATH are separated by a colon " +"(:).\n" +" A null directory name is the same as the current directory. If DIR " +"begins\n" +" with a slash (/), then CDPATH is not used.\n" +" \n" +" If the directory is not found, and the shell option `cdable_vars' is " +"set,\n" +" the word is assumed to be a variable name. If that variable has a " +"value,\n" +" its value is used for DIR.\n" +" \n" +" Options:\n" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"變更 shell 工作目錄。\n" +" \n" +" 變更目前目錄至 <目錄>。預設的 <目錄> 是 shell 變數 HOME\n" +" 的值。\n" +" \n" +" 變數 CDPATH 定義了含有 <目錄> 的目錄搜尋路徑,其中不同的目錄名稱由冒號 " +"(:)分隔。\n" +" 一個空的目錄名稱表示目前目錄。如果要切換到的 <目錄> 由斜線 (/) 開頭,則 " +"CDPATH\n" +" 變數不會被使用。\n" +" \n" +" 如果路徑找不到,並且 shell 選項「cdable_vars」被設定,則參數詞被假定為一" +"個\n" +" 變數名。如果該變數有值,則它的值被當做 <目錄>。\n" +" \n" +" 選項:\n" +" -L\t強制跟隨符號連結: 在處理「..」之後解析 <目錄> 中的符號連結。\n" +" -P\t使用實體目錄結構而不跟隨符號連結: 在處理「..」之前解析 <目錄> 中" +"的符號連結。\n" +" -e\t如果使用了 -P 參數,但不能成功確定目前工作目錄時,回傳非零的回傳" +"值。\n" +" -@\t在支援擴充屬性的系統上,將一個有這些屬性的檔案當做有檔案屬性的目" +"錄。\n" +" \n" +" 預設情況下跟隨符號連結,如同指定「-L」。\n" +" 「..」使用移除向前相鄰目錄名成員直到 <目錄> 開始或一個斜線的方式處理。\n" +" \n" +" 退出狀態:\n" +" 如果目錄變更,或在使用 -P 選項時 $PWD 修改成功時回傳 0,否則非零。" + +#: builtins.c:425 +msgid "" +"Print the name of the current working directory.\n" +" \n" +" Options:\n" +" -L\tprint the value of $PWD if it names the current working\n" +" \t\tdirectory\n" +" -P\tprint the physical directory, without any symbolic links\n" +" \n" +" By default, `pwd' behaves as if `-L' were specified.\n" +" \n" +" Exit Status:\n" +" Returns 0 unless an invalid option is given or the current directory\n" +" cannot be read." +msgstr "" +"印出目前工作目錄的名字。\n" +" \n" +" 選項:\n" +" -L\t印出 $PWD 變數的值,如果它包含了目前的工作目錄\n" +" -P\t印出目前的實體路徑,不帶有任何的符號連結\n" +" \n" +" 預設情況下,「pwd」的行為和帶「-L」選項一致\n" +" \n" +" 退出狀態:\n" +" 除非使用了無效選項或者目前目錄不可讀,否則回傳狀態為 0。" + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"空的指令。\n" +" \n" +" 沒有效果;此指令不做任何操作。\n" +" \n" +" 退出狀態:\n" +" 一律成功。" + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"回傳一個成功結果。\n" +" \n" +" 退出狀態:\n" +" 一律成功。" + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"回傳一個不成功的結果。\n" +" \n" +" 退出狀態:\n" +" 一律失敗。" + +#: builtins.c:471 +msgid "" +"Execute a simple command or display information about commands.\n" +" \n" +" Runs COMMAND with ARGS suppressing shell function lookup, or display\n" +" information about the specified COMMANDs. Can be used to invoke " +"commands\n" +" on disk when a function with the same name exists.\n" +" \n" +" Options:\n" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" +" \n" +" Exit Status:\n" +" Returns exit status of COMMAND, or failure if COMMAND is not found." +msgstr "" +"執行一個簡單指令或者顯示指令的相關資訊。\n" +" \n" +" 帶 ARGS 參數執行 COMMAND 指令且抑制 shell 函數查詢,或顯示\n" +" 指定的 COMMAND 指令的資訊。可以在存在相同名稱函數定義的\n" +" 情況下被用於啟動磁碟上的指令。\n" +" \n" +" 選項:\n" +" -p\t使用 PATH 變數的一個預設值以確保所有的標準工具都能被找到。\n" +" -v\t印出 COMMAND 指令的描述,和「type」內建相似\n" +" -V\t印出每個 COMMAND 指令的詳細描述\n" +" \n" +" 退出狀態:\n" +" 回傳 COMMAND 指令的回傳狀態,或者當找不到 COMMAND 指令時失敗。" + +#: builtins.c:490 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" Declare variables and give them attributes. If no NAMEs are given,\n" +" display the attributes and values of all variables.\n" +" \n" +" Options:\n" +" -f\trestrict action or display to function names and definitions\n" +" -F\trestrict display to function names only (plus line number and\n" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\n" +" -p\tdisplay the attributes and value of each NAME\n" +" \n" +" Options which set attributes:\n" +" -a\tto make NAMEs indexed arrays (if supported)\n" +" -A\tto make NAMEs associative arrays (if supported)\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME to upper case on assignment\n" +" -x\tto make NAMEs export\n" +" \n" +" Using `+' instead of `-' turns off the given attribute.\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" the `let' command) performed when the variable is assigned a value.\n" +" \n" +" When used in a function, `declare' makes NAMEs local, as with the " +"`local'\n" +" command. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"設定變數值和屬性。\n" +" \n" +" 規範變數並且賦予它們屬性。如果沒用指定名稱,\n" +" 則顯示所有變數的屬性和值。\n" +" \n" +" 選項:\n" +" -f\t限制動作或顯示為只有函數名稱和定義\n" +" -F\t限制僅顯示函數名稱 (以及列號和原始檔名於偵錯時)\n" +" -g\t當用於 shell 函數內時建立全域變數 ; 否則忽略\n" +" -p\t顯示每個 <名稱> 變數的屬性和值\n" +" \n" +" 設定屬性的選項:\n" +" -a\t使 <名稱> 成為索引陣列 (如果支援)\n" +" -A\t使 <名稱> 成為關聯陣列 (如果支援)\n" +" -i\t使 <名稱> 帶有「integer」(整數)屬性\n" +" -l\t將每個 <名稱> 的值在指派時轉為小寫\n" +" -n\t使 <名稱> 成為指向一個以其值為名稱的變數引用\n" +" -r\t將 <名稱> 變為唯讀\n" +" -t\t使 <名稱> 帶有「trace」(追蹤)屬性\n" +" -u\t將每個 <名稱> 的值在指派時轉為大寫\n" +" -x\t將 <名稱> 匯出\n" +" \n" +" 用「+」代替「-」會關閉指定選項。\n" +" \n" +" 帶有整數屬性的變數在指派時將使用算術求值(見\n" +" 「let」指令)\n" +" \n" +" 在函數中使用時,「declare」使 <名稱> 成為本機變數,和「local」\n" +" 指令一致。「-g」選項壓制這個行為\n" +" \n" +" 退出狀態:\n" +" 回傳成功除非使用了無效選項或者發生錯誤。" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"設定變數的值和屬性。\n" +" \n" +" 功能相同於「declare」。參見「help declare」。" + +#: builtins.c:540 +msgid "" +"Define local variables.\n" +" \n" +" Create a local variable called NAME, and give it VALUE. OPTION can\n" +" be any option accepted by `declare'.\n" +" \n" +" Local variables can only be used within a function; they are visible\n" +" only to the function where they are defined and its children.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"定義本機變數。\n" +" \n" +" 建立一個以 <名稱> 為名稱的變數,並且將 VALUE 指派給它。\n" +" OPTION 選項可以是任何能被「declare」接受的選項。\n" +" \n" +" 本機變數只能在函數內部被使用,它們只能在定義它們的函數內\n" +" 部以及子函數中可見。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項、發生了指派錯誤或者 shell 不在執行一個函" +"數。" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" -e\tenable interpretation of the following backslash escapes\n" +" -E\texplicitly suppress interpretation of backslash escapes\n" +" \n" +" `echo' interprets the following backslash-escaped characters:\n" +" \\a\talert (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuppress further output\n" +" \\e\tescape character\n" +" \\E\tescape character\n" +" \\f\tform feed\n" +" \\n\tnew line\n" +" \\r\tcarriage return\n" +" \\t\thorizontal tab\n" +" \\v\tvertical tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"將參數寫入標準輸出。\n" +" \n" +" 在標準輸出上,顯示用空格分割的 ARG 參數後跟一個換列。\n" +" \n" +" 選項:\n" +" -n\t不要追加換列\n" +" -e\t啟用下列反斜線逸出的解釋\n" +" -E\t顯式地抑制對於反斜線逸出的解釋\n" +" \n" +" 「echo」對下列反斜線字元進行逸出:\n" +" \\a\t警告(響鈴)\n" +" \\b\t退格\n" +" \\c\t抑制更多的輸出\n" +" \\e\t逸出字元\n" +" \\f\t換頁字元\n" +" \\n\t換列\n" +" \\r\t輸入鍵\n" +" \\t\t橫向製表符\n" +" \\v\t縱向製表符\n" +" \\\\\t反斜線\n" +" \\0nnn\t以 NNN (八進位)為 ASCII 碼的字元。 NNN 可以是 0 到 3 個八進位數" +"字\n" +" \\xHH\t以 HH (十六進位)為值的八進位字元。HH 可以是一個或兩個十六進位數" +"字\n" +" \\uHHHH\t以十六進位 HHHH 為值的 Unicode 字元。\n" +" \t\tHHHH 可為一個到四個十六進位數字。\n" +" \\UHHHHHHHH 以十六進位 HHHHHHHH 為值的 Unicode 字元。\n" +" \t\tHHHHHHHH 可為一個到八個十六進位數字。\n" +" \n" +" 退出狀態:\n" +" 回傳成功除非有寫入錯誤發生。" + +#: builtins.c:597 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs on the standard output followed by a newline.\n" +" \n" +" Options:\n" +" -n\tdo not append a newline\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"寫入參數至標準輸出裝置。\n" +" \n" +" 在標準輸出裝置上顯示 <參數> 和一個換列。\n" +" \n" +" 選項:\n" +" -n\t不附加換列\n" +" \n" +" 退出狀態:\n" +" 除非寫錯誤發生,否則回傳成功。" + +#: builtins.c:612 +msgid "" +"Enable and disable shell builtins.\n" +" \n" +" Enables and disables builtin shell commands. Disabling allows you to\n" +" execute a disk command which has the same name as a shell builtin\n" +" without using a full pathname.\n" +" \n" +" Options:\n" +" -a\tprint a list of builtins showing whether or not each is enabled\n" +" -n\tdisable each NAME or display a list of disabled builtins\n" +" -p\tprint the list of builtins in a reusable format\n" +" -s\tprint only the names of Posix `special' builtins\n" +" \n" +" Options controlling dynamic loading:\n" +" -f\tLoad builtin NAME from shared object FILENAME\n" +" -d\tRemove a builtin loaded with -f\n" +" \n" +" Without options, each NAME is enabled.\n" +" \n" +" To use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not a shell builtin or an error occurs." +msgstr "" +"啟用和停用 shell 內建物件。\n" +" \n" +" 啟用和停用 shell 的內建指令。停用使您能夠執行一個和內建\n" +" 指令同名磁碟上的指令,而無須使用完整的路徑名。\n" +" \n" +" \n" +" 選項:\n" +" -a\t印出一個內建的列表,並顯示其中每一個是否啟用\n" +" -n\t停用每一個 <名稱> 內建或者顯示一個被停用的內建列表\n" +" -p\t以可重用的格式印出一個內建的列表\n" +" -s\t僅印出 Posix「special」 內建的名稱\n" +" \n" +" 控制動態載入的選項:\n" +" -f\t從共享物件 <檔名> 檔案中載入 <名稱> 內建\n" +" -d\t刪除以 -f 選項載入的內建\n" +" \n" +" 不帶選項時,每一個 <名稱> 內建都被啟用。\n" +" \n" +" 如果要使用 $PATH 中找到的「test」而不是 shell 內建物件的版本,\n" +" 輸入「enable -n test」。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非 <名稱> 不是一個 shell 內建物件或者有錯誤發生。" + +#: builtins.c:640 +msgid "" +"Execute arguments as a shell command.\n" +" \n" +" Combine ARGs into a single string, use the result as input to the " +"shell,\n" +" and execute the resulting commands.\n" +" \n" +" Exit Status:\n" +" Returns exit status of command or success if command is null." +msgstr "" +"將參數做為 shell 指令執行。\n" +" \n" +" 將 <參數> 合成一個字串,用結果做為 shell 的輸入,\n" +" 並且執行得到的指令。\n" +" \n" +" 退出狀態:\n" +" 以指令的狀態退出,或者在指令為空的情況下回傳成功。" + +#: builtins.c:652 +#, fuzzy +msgid "" +"Parse option arguments.\n" +" \n" +" Getopts is used by shell procedures to parse positional parameters\n" +" as options.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" +" \n" +" Exit Status:\n" +" Returns success if an option is found; fails if the end of options is\n" +" encountered or an error occurs." +msgstr "" +"解析選項參數。\n" +" \n" +" Getopts 被 shell 過程用於解析可定位的參數做為選項。\n" +" \n" +" \n" +" <選項字串> 字串包含待識別的選項字母;如果一個字母後面跟\n" +" 著分號,則該選項需要一個參數,而該參數應用空格與選項分開。\n" +" \n" +" \n" +" 每次啟動時,getopts 會將下一個選項放到 shell 變數 $name\n" +" 中,如果 name 變數不存在則先將其初始化,而下一個待處\n" +" 理的參數序號放入 shell 變數 OPTIND 中。OPTIND 變數在每\n" +" 次 shell 或者 shell 指令稿啟動時都被初始化為 1。當一個選項要\n" +" 求有一個參數時,getopts 將參數放入 shell 變數 OPTARG\n" +" 中。\n" +" \n" +" getopts 有兩種通報錯誤的方法。如果 <選項字串> 變數的第\n" +" 一個字元是冒號,getopts 使用沉默錯誤通報。在這種模式\n" +" 下,不會印發生錯誤誤訊息。如果看到了一個無效的選項,\n" +" getopts 將找到的選項字元放至 OPTARG 變數中。如果一個必\n" +" 須的選項沒有找到,getopts 放一個「:」到 <名稱> 變數中並且設\n" +" 置 OPTARG 變數為找到的選項字元。如果 getopts 不在沉默模\n" +" 式中,並且遇到了一個無效的選項,getopts 放置一個「?」到 <名稱> \n" +" 變數中並且取消設定 OPTARG 變數。如果必須的選項沒有找到,\n" +" 一個「?」會被放入 <名稱> 變數中,OPTARG 將被取消設定,並且會\n" +" 印出一個診斷資訊。\n" +" \n" +" 如果 shell 變數 OPTERR 的值為 0,getopts 停用\n" +" 錯誤資訊的印出,即使 <選項字串> 變數的第一個字元不是一\n" +" 個冒號。OPTERR 的預設值為 1。\n" +" \n" +" Getopts 通常解析可定位的參數($0 - $9),不過如果提供了\n" +" 更多的參數,它們反而會被解析。\n" +" \n" +" 退出狀態:\n" +" 如果一個選項被找到則回傳成功;如果遇到了選項的結尾或者\n" +" 有錯誤發生則回傳失敗。" + +#: builtins.c:694 +msgid "" +"Replace the shell with the given command.\n" +" \n" +" Execute COMMAND, replacing this shell with the specified program.\n" +" ARGUMENTS become the arguments to COMMAND. If COMMAND is not " +"specified,\n" +" any redirections take effect in the current shell.\n" +" \n" +" Options:\n" +" -a name\tpass NAME as the zeroth argument to COMMAND\n" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" +" \n" +" If the command cannot be executed, a non-interactive shell exits, " +"unless\n" +" the shell option `execfail' is set.\n" +" \n" +" Exit Status:\n" +" Returns success unless COMMAND is not found or a redirection error " +"occurs." +msgstr "" +"使用指定指令取代 shell。\n" +" \n" +" 執行 COMMAND 指令,以指定的程式取代這個 shell。\n" +" ARGUMENTS 參數成為 COMMAND 指令的參數。如果\n" +" 沒有指定 COMMAND 指令,則任何的重定向在目前 shell 中生效。\n" +" \n" +" 選項:\n" +" -a 名稱\t做為第 0 個參數傳遞給 COMMAND 指令\n" +" -c\t\t在空環境中執行 COMMAND 指令\n" +" -l\t\t在 COMMAND 指令的第 0 個參數中加一個短線\n" +" \n" +" 如果指令不能被執行,則退出一個非互動式的 shell,除非\n" +" shell 選項「execfail」已經設定。\n" +" \n" +" 退出狀態:\n" +" 回傳成功除非 COMMAND 指令沒有找到或者出現一個重定向錯誤。" + +#: builtins.c:715 +msgid "" +"Exit the shell.\n" +" \n" +" Exits the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" +"退出 shell。\n" +" \n" +" 以狀態 N 退出 shell。 如果 N 被省略,則退出狀態\n" +" 為最後一個執行指令的退出狀態。" + +#: builtins.c:724 +msgid "" +"Exit a login shell.\n" +" \n" +" Exits a login shell with exit status N. Returns an error if not " +"executed\n" +" in a login shell." +msgstr "" +"退出一個登入 shell。\n" +" \n" +" 以狀態 N 退出一個登入 shell。如果不在登入 shell 中執行,則\n" +" 回傳一個錯誤。" + +#: builtins.c:734 +msgid "" +"Display or execute commands from the history list.\n" +" \n" +" fc is used to list or edit and re-execute commands from the history " +"list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" Options:\n" +" -e ENAME\tselect which editor to use. Default is FCEDIT, then " +"EDITOR,\n" +" \t\tthen vi\n" +" -l \tlist lines instead of editing\n" +" -n\tomit line numbers when listing\n" +" -r\treverse the order of the lines (newest listed first)\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command.\n" +" \n" +" Exit Status:\n" +" Returns success or status of executed command; non-zero if an error " +"occurs." +msgstr "" +"從歷史記錄列表中顯示或者執行指令。\n" +" \n" +" fc 被用於從歷史記錄列表中列出或者重新編輯並執行指令。\n" +" FIRST 和 LAST 變數可以是數字用於指定範圍,或者 FIRST 可以是\n" +" 字串,意味著以這個字串開頭的最近一個指令。\n" +" \n" +" \n" +" 選項:\n" +" -e ENAME\t選擇使用哪個編輯器。預設的是 FCEDIT,然後是 EDITOR,\n" +" \t\t然後是 vi\n" +" -l \t列出列而不編輯\n" +" -n\t列舉時省略列號\n" +" -r\t反轉列的順序(最新列在前)\n" +" \n" +" 用「fc -s [模式=取代 …] [指令]」的格式,COMMAND 指令會在 OLD=NEW\n" +" 取代之後被重新執行。\n" +" \n" +" r=「fc -s」是一個有用的別名,這樣的話輸入「r cc」會執行最後一個以「cc」\n" +" 開頭的指令,輸入「r」會重新執行最後一個指令。\n" +" \n" +" \n" +" 退出狀態:\n" +" 回傳成功,或者執行指令的狀態;如果錯誤發生則回傳非零。" + +#: builtins.c:764 +msgid "" +"Move job to the foreground.\n" +" \n" +" Place the job identified by JOB_SPEC in the foreground, making it the\n" +" current job. If JOB_SPEC is not present, the shell's notion of the\n" +" current job is used.\n" +" \n" +" Exit Status:\n" +" Status of command placed in foreground, or failure if an error occurs." +msgstr "" +"將工作移至前臺。\n" +" \n" +" 將以 JOB_SPEC 識別的工作放至前臺,使其成為\n" +" 目前工作。如果 JOB_SPEC 不存在,shell 觀念中的目前工作 \n" +" 將被使用。\n" +" \n" +" 退出狀態:\n" +" 放至前臺的指令狀態,或者當錯誤發生時為失敗。" + +#: builtins.c:779 +msgid "" +"Move jobs to the background.\n" +" \n" +" Place the jobs identified by each JOB_SPEC in the background, as if " +"they\n" +" had been started with `&'. If JOB_SPEC is not present, the shell's " +"notion\n" +" of the current job is used.\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"移動工作至後臺。\n" +" \n" +" 將 JOB_SPEC 識別的工作放至後臺,就像它們\n" +" 是帶「&」啟動的一樣。如果 JOB_SPEC 不存在,shell 觀念中的\n" +" 目前工作將會被使用。\n" +" \n" +" 退出狀態:\n" +" 回傳成功除非工作管理沒有啟用或者錯誤發生。" + +#: builtins.c:793 +msgid "" +"Remember or display program locations.\n" +" \n" +" Determine and remember the full pathname of each command NAME. If\n" +" no arguments are given, information about remembered commands is " +"displayed.\n" +" \n" +" Options:\n" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -t\tprint the remembered location of each NAME, preceding\n" +" \t\teach location with the corresponding NAME if multiple\n" +" \t\tNAMEs are given\n" +" Arguments:\n" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" +" \t\tof remembered commands.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is not found or an invalid option is given." +msgstr "" +"記住或顯示程式位置。\n" +" \n" +" 確定並記住每一個指定 <名稱> 指令的完整路徑。\n" +" 如果不提供參數,則顯示已經記住指令的資訊。\n" +" \n" +" 選項:\n" +" -d\t\t忘記每一個已經記住的 <名稱> 的位置\n" +" -l\t\t以可做為輸入重用的格式顯示\n" +" -p pathname\t使用 pathname 路徑做為 <名稱> 指令的全路徑\n" +" -r\t\t忘記所有記住的位置\n" +" -t\t\t印出記住的每一個 <名稱> 的位置,如果指定了多個\n" +" \t\t<名稱>,則每個位置前面會加上相應的 <名稱> \n" +" \t\t\n" +" 參數:\n" +" <名稱>\t\t每個 <名稱> 會在 $PATH 路徑變數中被搜尋,並且新增到記住的指" +"令\n" +" 列表中。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非 <名稱> 指令沒有找到或者使用了無效的選項。" + +#: builtins.c:818 +msgid "" +"Display information about builtin commands.\n" +" \n" +" Displays brief summaries of builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise the list of help topics is printed.\n" +" \n" +" Options:\n" +" -d\toutput short description for each topic\n" +" -m\tdisplay usage in pseudo-manpage format\n" +" -s\toutput only a short usage synopsis for each topic matching\n" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"顯示內建指令的相關資訊。\n" +" \n" +" 顯示內建指令的簡略資訊。如果指定了 PATTERN 模式,\n" +" 給出所有符合 PATTERN 模式指令的詳細說明,否則印出\n" +" 一個說明主題列表\n" +" \n" +" 選項:\n" +" -d\t輸出每個主題的簡短描述\n" +" -m\t以偽 man 手冊的格式顯示使用方法\n" +" -s\t為每一個符合 PATTERN 模式的主題僅顯示一個用法\n" +" \t簡介\n" +" \n" +" 參數:\n" +" PATTERN\tPattern 模式指定一個說明主題\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非 PATTERN 模式沒有找到或者使用了無效選項。" + +#: builtins.c:842 +msgid "" +"Display or manipulate the history list.\n" +" \n" +" Display the history list with line numbers, prefixing each modified\n" +" entry with a `*'. An argument of N lists only the last N entries.\n" +" \n" +" Options:\n" +" -c\tclear the history list by deleting all of the entries\n" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\n" +" \n" +" -a\tappend history lines from this session to the history file\n" +" -n\tread all history lines not already read from the history file\n" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\twithout storing it in the history list\n" +" -s\tappend the ARGs to the history list as a single entry\n" +" \n" +" If FILENAME is given, it is used as the history file. Otherwise,\n" +" if HISTFILE has a value, that is used, else ~/.bash_history.\n" +" \n" +" If the HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed " +"otherwise.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"顯示或操縱歷史記錄列表。\n" +" \n" +" 帶列號顯示歷史記錄列表,將每個被修改的條目加上字首「*」。\n" +" 參數 N 會僅列出最後的 N 個條目。\n" +" \n" +" 選項:\n" +" -c\t刪除所有條目從而清空歷史記錄列表。\n" +" -d 偏移量\t從指定位置刪除歷史記錄列表。負數偏移量會從歷史記錄列表\n" +" \t\t的尾端數回來。\n" +" \n" +" -a\t將目前工作階段的歷史記錄列追加到歷史記錄檔案中\n" +" -n\t從歷史記錄檔案中讀取所有未被讀取的列\n" +"\t\t並且將它們追加到歷史列表 -r\t讀取歷史記錄檔案並將內容追加到歷史記錄" +"列表中\n" +" -w\t將目前歷史記錄寫入到歷史記錄檔案中,並追加到歷史記錄列表中\n" +" \n" +" -p\t對每一個 <參數> 展開歷史記錄並顯示結果,而不儲存到歷史記錄列表中\n" +" -s\t以單條紀錄追加 <參數> 到歷史記錄列表中\n" +" \n" +" 如果指定了 <檔名>,則它將被做為歷史記錄檔案。否則\n" +" 如果 $HISTFILE 變數有值的話使用之,不然使用 ~/.bash_history 檔案。\n" +" \n" +" 如果 $HISTTIMEFORMAT 變數被設定並且不為空,它的值會被用於\n" +" strftime(3) 的格式字串來印出與每一個顯示的歷史記錄條目想關聯的時\n" +" 間戳,否則不印出時間戳。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者發生錯誤。" + +#: builtins.c:879 +msgid "" +"Display status of jobs.\n" +" \n" +" Lists the active jobs. JOBSPEC restricts output to that job.\n" +" Without options, the status of all active jobs is displayed.\n" +" \n" +" Options:\n" +" -l\tlists process IDs in addition to the normal information\n" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" +" -p\tlists process IDs only\n" +" -r\trestrict output to running jobs\n" +" -s\trestrict output to stopped jobs\n" +" \n" +" If -x is supplied, COMMAND is run after all job specifications that\n" +" appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs.\n" +" If -x is used, returns the exit status of COMMAND." +msgstr "" +"顯示工作狀態。\n" +" \n" +" 列出活動的工作。JOBSPEC 限制僅輸出指定的工作。\n" +" 不帶選項時,所有活動工作的狀態都會顯示。\n" +" \n" +" 選項:\n" +" -l\t在正常資訊基礎上列出行程識別碼\n" +" -n\t僅列出上次通告之後變更了狀態的行程\n" +" -p\t僅列出行程識別碼\n" +" -r\t限制僅輸出執行中的工作\n" +" -s\t限制僅輸出停止的工作\n" +" \n" +" 如果使用了 -x 選項,<參數> 中的所有工作規格會被取代為該工作\n" +" 的行程群組首領的行程識別碼,然後執行 COMMAND 指令。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者有錯誤發生。\n" +" 如果使用 -x 選項,則回傳 COMMAND 指令的退出狀態。" + +#: builtins.c:906 +msgid "" +"Remove jobs from current shell.\n" +" \n" +" Removes each JOBSPEC argument from the table of active jobs. Without\n" +" any JOBSPECs, the shell uses its notion of the current job.\n" +" \n" +" Options:\n" +" -a\tremove all jobs if JOBSPEC is not supplied\n" +" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n" +" \t\tshell receives a SIGHUP\n" +" -r\tremove only running jobs\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option or JOBSPEC is given." +msgstr "" +"從目前 shell 中刪除工作。\n" +" \n" +" 從活動工作表中刪除每一個 JOBSPEC 參數。不帶任何\n" +" JOBSPEC 參數時,shell 使用觀念中的目前工作。\n" +" \n" +" 選項:\n" +" -a\t如果不提供 JOBSPEC 參數,則刪除所有工作\n" +" -h\t識別每個 JOBSPEC 工作,從而當 shell 接收到 SIGHUP\n" +" \t訊號時不傳送 SIGHUP 給指定工作\n" +" -r\t僅刪除執行中的工作\n" +" \n" +" 退出狀態:\n" +" 回傳成功除非使用了無效的選項或者 JOBSPEC 規格。" + +#: builtins.c:925 +msgid "" +"Send a signal to a job.\n" +" \n" +" Send the processes identified by PID or JOBSPEC the signal named by\n" +" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n" +" SIGTERM is assumed.\n" +" \n" +" Options:\n" +" -s sig\tSIG is a signal name\n" +" -n sig\tSIG is a signal number\n" +" -l\tlist the signal names; if arguments follow `-l' they are\n" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\n" +" \n" +" Kill is a shell builtin for two reasons: it allows job IDs to be used\n" +" instead of process IDs, and allows processes to be killed if the limit\n" +" on processes that you can create is reached.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or an error occurs." +msgstr "" +"向一個工作傳送一個訊號。\n" +" \n" +" 向以 PID 行程識別碼或者 JOBSPEC 工作規格指定的行程傳送一個以\n" +" SIGSPEC 訊號規格或 SIGNUM 訊號編號命名的訊號。如果沒有指定\n" +" SIGSPEC 或 SIGNUM,那麼假定傳送 SIGTERM 訊號。\n" +" \n" +" 選項:\n" +" -s sig\tSIG 是訊號名稱\n" +" -n sig\tSIG 是訊號編號\n" +" -l\t列出訊號名稱;如果參數後跟「-l」則被假設為訊號編號,\n" +" \t而相應的訊號名稱會被列出\n" +" \n" +" Kill 成為 shell 內建物件有兩個理由:它允許使用工作編號而不是行程識別" +"碼,\n" +" 並且在可以建立的行程數上限達到時允許行程被砍除。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者有錯誤發生。" + +#: builtins.c:949 +msgid "" +"Evaluate arithmetic expressions.\n" +" \n" +" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n" +" fixed-width integers with no check for overflow, though division by 0\n" +" is trapped and flagged as an error. The following list of operators is\n" +" grouped into levels of equal-precedence operators. The levels are " +"listed\n" +" in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" Exit Status:\n" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"求值算術表示式。\n" +" \n" +" 將每個 <參數> 做為算術表示式來求值。求值的計算以定寬的整\n" +" 數完成,不帶溢位檢測,不過除 0 是被置陷阱的並且會報一個錯\n" +" 誤。下列運算子被按照相同的算術優先順序組合。列表的順序按照\n" +" 優先順序從高至低。\n" +" \n" +" \n" +" \tid++, id--\t變數後置加,後置減\n" +" \t++id, --id\t變數前置加,前置減\n" +" \t-, +\t\t一元減法,一元加法\n" +" \t!, ~\t\t邏輯和位取反\n" +" \t**\t\t指數\n" +" \t*, /, %\t\t乘法,除法,取餘數\n" +" \t+, -\t\t增加,減少\n" +" \t<<, >>\t\t向左和向右按位移位\n" +" \t<=, >=, <, >\t比較\n" +" \t==, !=\t\t等於,不等於\n" +" \t&\t\t按位與\n" +" \t^\t\t按位異或\n" +" \t|\t\t按位或\n" +" \t&&\t\t邏輯與\n" +" \t||\t\t邏輯或\n" +" \texpr ? expr : expr\n" +" \t\t\t條件運算子\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\t指派\n" +" \n" +" Shell 變數允許做為運算元。表示式中的變數名稱會以值取代\n" +" (強制轉換為定寬的整數)。表示式中的變數不需要開啟整數屬性。\n" +" \n" +" 運算子按照優先順序進行求值。括號中的子表示式將被先求值,並可取代上述表示" +"式規則。\n" +" \n" +" 退出狀態:\n" +" 如果最後一個 <參數> 求值為 0,則 let 回傳 1;否則 let 回傳 0。" + +#: builtins.c:994 +msgid "" +"Read a line from the standard input and split it into fields.\n" +" \n" +" Reads a single line from the standard input, or from file descriptor FD\n" +" if the -u option is supplied. The line is split into fields as with " +"word\n" +" splitting, and the first word is assigned to the first NAME, the second\n" +" word to the second NAME, and so on, with any leftover words assigned to\n" +" the last NAME. Only the characters found in $IFS are recognized as " +"word\n" +" delimiters.\n" +" \n" +" If no NAMEs are supplied, the line read is stored in the REPLY " +"variable.\n" +" \n" +" Options:\n" +" -a array\tassign the words read to sequential indices of the array\n" +" \t\tvariable ARRAY, starting at zero\n" +" -d delim\tcontinue until the first character of DELIM is read, rather\n" +" \t\tthan newline\n" +" -e\tuse Readline to obtain the line\n" +" -i text\tuse TEXT as the initial text for Readline\n" +" -n nchars\treturn after reading NCHARS characters rather than waiting\n" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters are read before the delimiter\n" +" -N nchars\treturn only after reading exactly NCHARS characters, " +"unless\n" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\tread from file descriptor FD instead of the standard input\n" +" \n" +" Exit Status:\n" +" The return code is zero, unless end-of-file is encountered, read times " +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"從標準輸入讀取一列並將其分為不同的區域。\n" +" \n" +" 從標準輸入讀取單獨的一列,或者如果使用了 -u 選項,從檔案描述符 FD 中讀" +"取。\n" +" 該列被分割成區域,如同字詞分割一樣,並且第一個字詞被指派給第一個 <名稱> " +"變數,第二\n" +" 個字詞被指派給第二個 <名稱> 變數,如此繼續,直到剩下所有的字詞被指派給最" +"後一個 <名稱>\n" +" 變數。只有 $IFS 變數中的字元被認做是字詞分隔符。\n" +" \n" +" 如果沒有提供 <名稱> 變數,則讀取的列被存放在 REPLY 變數中。\n" +" \n" +" 選項:\n" +" -a array\t將字詞指派給 ARRAY 陣列變數的序列索引成員,從零開始。\n" +" -d delim\t持續讀取直到讀入 DELIM 變數中的第一個字元,而不是換列符\n" +" -e\t使用 Readline 取得列\n" +" -i text\t使用 TEXT 文字做為 Readline 的初始文字\n" +" -n nchars\t讀取 nchars 個字元之後回傳,而不是等到讀取換列符。\n" +" \t\t但是分隔符仍然有效,如果遇到分隔符之前讀取了不足 nchars 個字元。\n" +" -N nchars\t在準確讀取了 nchars 個字元之後回傳,除非遇到檔案結束符或者讀" +"取逾時,\n" +" \t\t任何的分隔符都被忽略\n" +" -p prompt\t在嘗試讀取之前輸出 PROMPT 提示符並且不帶\n" +" \t\t換列符\n" +" -r\t不允許反斜線逸出任何字元\n" +" -s\t不顯示終端的任何輸入\n" +" -t timeout\t如果在 TIMEOUT 秒內沒有讀取一個完整的列則逾時並且回傳失" +"敗。\n" +" \t\tTMOUT 變數的值是預設逾時時間。\n" +" \t\tTIMEOUT 可以是小數。如果 TIMEOUT 是 0,那麼僅當在指定的檔案描述符上\n" +" \t\t輸入有效的時候,read 才回傳成功。\n" +" \t\t如果超過了逾時時間,則回傳狀態碼大於 128\n" +" -u fd\t從檔案描述符 FD 中讀取,而不是標準輸入\n" +" \n" +" 退出狀態:\n" +" 回傳碼為零,除非遇到了檔案結束符,讀取逾時,或者無效的文\n" +" 件描述符做為參數傳遞給了 -u 選項。" + +#: builtins.c:1041 +msgid "" +"Return from a shell function.\n" +" \n" +" Causes a function or sourced script to exit with the return value\n" +" specified by N. If N is omitted, the return status is that of the\n" +" last command executed within the function or script.\n" +" \n" +" Exit Status:\n" +" Returns N, or failure if the shell is not executing a function or script." +msgstr "" +"從一個 shell 函數回傳。\n" +" \n" +" 使一個函數或者被引用的指令稿以指定的回傳值 N 退出。\n" +" 如果 N 被省略,則回傳狀態就是\n" +" 函數或指令稿中的最後一個執行指令的狀態。\n" +" \n" +" 退出狀態:\n" +" 回傳 N,或者如果 shell 不在執行一個函數或引用指令稿時,失敗。" + +#: builtins.c:1054 +msgid "" +"Set or unset values of shell options and positional parameters.\n" +" \n" +" Change the value of shell attributes and positional parameters, or\n" +" display the names and values of shell variables.\n" +" \n" +" Options:\n" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero " +"status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the Posix standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given." +msgstr "" +"設定或取消設定 shell 選項和位置參數的值。\n" +" \n" +" 變更 shell 選項和位置參數的值,或者顯示 shell 變數的\n" +" 名稱和值。\n" +" \n" +" 選項:\n" +" -a 標記修改或者建立的變數為匯出。\n" +" -b 立即通告工作終止。\n" +" -e 如果一個指令以非零狀態退出,則立即退出。\n" +" -f 停用檔名產生(模式符合)。\n" +" -h 當查詢指令時記住它們的位置\n" +" -k 所有的指派參數被放在指令的環境中,而不僅僅是\n" +" 指令名稱之前的參數。\n" +" -m 啟用工作控制。\n" +" -n 讀取指令但不執行\n" +" -o 選項名\n" +" 設定與選項名對應的變數:\n" +" allexport 與 -a 相同\n" +" braceexpand 與 -B 相同\n" +" emacs 使用 emacs 風格的列編輯介面\n" +" errexit 與 -e 相同\n" +" errtrace 與 -E 相同\n" +" functrace 與 -T 相同\n" +" hashall 與 -h 相同\n" +" histexpand 與 -H 相同\n" +" history 啟用指令歷史記錄\n" +" ignoreeof shell 讀取檔案結束符時不會退出\n" +" interactive-comments\n" +" 允許在互動式指令中顯示註釋\n" +" keyword 與 -k 相同\n" +" monitor 與 -m 相同\n" +" noclobber 與 -C 相同\n" +" noexec 與 -n 相同\n" +" noglob 與 -f 相同\n" +" nolog 目前可接受但是被忽略\n" +" notify 與 -b 相同\n" +" nounset 與 -u 相同\n" +" onecmd 與 -t 相同\n" +" physical 與 -P 相同\n" +" pipefail 管道的回傳值是最後一個非零回傳值指令的回傳結果,\n" +" 或者當所有指令都回傳零時也為零。\n" +" posix 變更預設時和 Posix 標準不同的 bash 行為\n" +" 以符合標準\n" +" privileged 與 -p 相同\n" +" verbose 與 -v 相同\n" +" vi 使用 vi 風格的列編輯介面\n" +" xtrace 與 -x 相同\n" +" -p 無論何時當真實的有效使用者身分不符合時開啟。\n" +" 停用對 $ENV 檔案的處理以及匯入 shell 函數。\n" +" 關閉此選項會導致有效的使用者編號和群組編號設定\n" +" 為真實的使用者編號和群組編號\n" +" -t 讀取並執行一個指令之後退出。\n" +" -u 取代時將為設定的變數當做錯誤對待。\n" +" -v 讀取 shell 輸入列時將它們印出。\n" +" -x 執行指令時印出它們以及參數。\n" +" -B shell 將執行大括號擴充套件。\n" +" -C 設定之後禁止以重定向輸出的方式覆蓋常\n" +" 規檔案。\n" +" -E 設定之後 ERR 陷阱會被 shell 函數繼承。\n" +" -H 啟用 ! 風格的歷史記錄取代。當 shell 是互動式的\n" +" 時候這個識別位預設開啟。\n" +" -P 設定之後類似 cd 的會變更目前目錄的指令嗎\n" +" 追蹤符號連結。\n" +" -T 設定之後 DEBUG 和 RETURN 陷阱會被 shell 函數繼承。\n" +" - 任何剩餘的參數會被指派給位置參數。\n" +" -x 和 -v 選項已關閉。\n" +" \n" +" 使用 + 而不是 - 會使標誌位被關閉。標誌位也可以在\n" +" shell 被啟動時使用。目前的標誌位設定可以在 $- 變\n" +" 量中找到。剩餘的 <參數> 是位置參數並且是按照\n" +" $1,$2,.。$n 的順序被指派的。如果沒有指定 <參數>\n" +" 參數,則印出所有的 shell 變數。\n" +" \n" +" 退出狀態:\n" +" 回傳成功除非使用了無效的參數。" + +#: builtins.c:1139 +msgid "" +"Unset values and attributes of shell variables and functions.\n" +" \n" +" For each NAME, remove the corresponding variable or function.\n" +" \n" +" Options:\n" +" -f\ttreat each NAME as a shell function\n" +" -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" +" \n" +" Without options, unset first tries to unset a variable, and if that " +"fails,\n" +" tries to unset a function.\n" +" \n" +" Some variables cannot be unset; also see `readonly'.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a NAME is read-only." +msgstr "" +"取消設定 shell 變數和函數的值和屬性。\n" +" \n" +" 對每一個 <名稱>,刪除對應的變數或函數。\n" +" \n" +" 選項:\n" +" -f\t將每個 <名稱> 視為函數\n" +" -v\t將每個 <名稱> 視為變數\n" +" -n\t將每個 <名稱> 視為名稱引用,只取消其本身而非其指向的變數\n" +" \n" +" 不帶選項時,unset 首先嘗試取消設定一個變數,如果失敗,再嘗試取消設定一個" +"函數。\n" +" \n" +" 某些變數不可以被取消設定;參見「readonly」。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者 NAME 名稱為唯讀。" + +#: builtins.c:1161 +msgid "" +"Set export attribute for shell variables.\n" +" \n" +" Marks each NAME for automatic export to the environment of subsequently\n" +" executed commands. If VALUE is supplied, assign VALUE before " +"exporting.\n" +" \n" +" Options:\n" +" -f\trefer to shell functions\n" +" -n\tremove the export property from each NAME\n" +" -p\tdisplay a list of all exported variables and functions\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"為 shell 變數設定匯出屬性。\n" +" \n" +" 標記每個 <名稱> 為自動匯出到後續指令執行的環境。如果提供了 VALUE\n" +" 則匯出前將 VALUE 做為指派。\n" +" \n" +" 選項:\n" +" -f\t指 shell 函數\n" +" -n\t刪除每個 <名稱> 的匯出屬性\n" +" -p\t顯示所有匯出的變數和函數的列表\n" +" \n" +" 「--」的參數停用進一步的選項處理。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者 <名稱>。" + +#: builtins.c:1180 +msgid "" +"Mark shell variables as unchangeable.\n" +" \n" +" Mark each NAME as read-only; the values of these NAMEs may not be\n" +" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n" +" before marking as read-only.\n" +" \n" +" Options:\n" +" -a\trefer to indexed array variables\n" +" -A\trefer to associative array variables\n" +" -f\trefer to shell functions\n" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" +" \n" +" An argument of `--' disables further option processing.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or NAME is invalid." +msgstr "" +"標記 shell 變數為不可變更。\n" +" \n" +" 標記每一個 <名稱> 為唯讀;這些 <名稱> 變數的值將不可以被後續的指派\n" +" 操作所變更。如果提供了 VALUE,則在標記為唯讀之前將 VALUE 值指派給變數。\n" +" \n" +" 選項:\n" +" -a\t指索引陣列變數\n" +" -A\t指關聯陣列變數\n" +" -f\t指 shell 函數\n" +" -p\t顯示唯讀變數或函數列表,取決於是否提供了 -f 選項\n" +" \n" +" 「--」的參數停用進一步的選項處理。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者 <名稱>。" + +#: builtins.c:1202 +msgid "" +"Shift positional parameters.\n" +" \n" +" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n" +" not given, it is assumed to be 1.\n" +" \n" +" Exit Status:\n" +" Returns success unless N is negative or greater than $#." +msgstr "" +"移位位置參數。\n" +" \n" +" 重新命名位置參數 $N+1、$N+2 … 到 $1、$2 … 如果沒有指定 N,\n" +" 則假設為 1。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非 N 為負或者大於 $#。" + +#: builtins.c:1214 builtins.c:1229 +msgid "" +"Execute commands from a file in the current shell.\n" +" \n" +" Read and execute commands from FILENAME in the current shell. The\n" +" entries in $PATH are used to find the directory containing FILENAME.\n" +" If any ARGUMENTS are supplied, they become the positional parameters\n" +" when FILENAME is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed in FILENAME; fails if\n" +" FILENAME cannot be read." +msgstr "" +"在目前 shell 中執行一個檔案中的指令。\n" +" \n" +" 在目前 shell 中讀取並執行 <檔名> 檔案中的指令。$PATH 變數中的\n" +" 條目被用於尋找包含 <檔名> 檔案的目錄。如果提供了任何的 <參數>\n" +" 參數,則它們將成為 <檔名> 檔案執行時的位置參數。\n" +" \n" +" 退出狀態:\n" +" 回傳 <檔名> 檔案中最後一個指令的狀態;如果 <檔名> 檔案不可讀則失敗。" + +#: builtins.c:1245 +msgid "" +"Suspend shell execution.\n" +" \n" +" Suspend the execution of this shell until it receives a SIGCONT signal.\n" +" Unless forced, login shells cannot be suspended.\n" +" \n" +" Options:\n" +" -f\tforce the suspend, even if the shell is a login shell\n" +" \n" +" Exit Status:\n" +" Returns success unless job control is not enabled or an error occurs." +msgstr "" +"暫停 shell 執行。\n" +" \n" +" 暫停 shell 的執行直到收到 SIGCONT 訊號。\n" +" 登入 shell 不可以被暫停,除非強制執行。\n" +" \n" +" 選項:\n" +" -f\t強制暫停,即使是登入 shell。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非沒有啟用工作控制或者有錯誤發生。" + +#: builtins.c:1261 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last " +"read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 " +"lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2.\n" +" \n" +" Exit Status:\n" +" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" +" false or an invalid argument is given." +msgstr "" +"對條件表示式進行求值。\n" +" \n" +" 根據 EXPR 表示式的求值以狀態 0 (真) 或 1 (偽) 退出。\n" +" 表示式可以是一元或者二元的。一元表示式通常用於檢測\n" +" 檔案狀態。同時還有字串運算子和數字比較運算子。\n" +" \n" +" 檔案運算子:\n" +" \n" +" -a 檔案 如果檔案存在則為真。\n" +" -b 檔案 如果檔案為區塊特殊檔案則為真。\n" +" -c 檔案 如果檔案為字元特殊檔案則為真。\n" +" -d 檔案 如果檔案為目錄則為真。\n" +" -e 檔案 如果檔案存在則為真。\n" +" -f 檔案 如果檔案存在且為一般檔案則為真。\n" +" -g 檔案 如果檔案的群組屬性設定開啟則為真。\n" +" -h 檔案 如果檔案為符號連結則為真。\n" +" -L 檔案 如果檔案為符號連結則為真。\n" +" -k 檔案 如果檔案的黏著位元已設定則為真。\n" +" -p 檔案 如果檔案為命名管道則為真。\n" +" -r 檔案 如果檔案對於您是可讀的則為真。\n" +" -s 檔案 如果檔案存在且不為空則為真。\n" +" -S 檔案 如果檔案是通訊端則為真。\n" +" -t 檔案描述符 如果檔案描述符在終端上開啟則為真。\n" +" -u 檔案 如果檔案的使用者數列設定開啟則為真。\n" +" -w 檔案 如果檔案對您是可寫的則為真\n" +" -x 檔案 如果檔案對您是可執行的則為真。\n" +" -O 檔案 如果檔案是您所有的則為真。\n" +" -G 檔案 如果檔案是您的群組所有則為真。\n" +" -N 檔案 如果檔案上次被讀取之後修改過則為真。\n" +" \n" +" FILE1 -nt FILE2 如果 file1 檔案新於 file2 檔案則為真(根據\n" +" 修改日期)。\n" +" \n" +" FILE1 -ot FILE2 如果 file1 檔案舊於 file2 檔案則為真。\n" +" \n" +" FILE1 -ef FILE2 如果 file1 檔案是 file2 檔案的硬式連結則為真。\n" +" \n" +" 字串運算子\n" +" \n" +" -z 字串 如果字串為空則為真。\n" +" \n" +" -n 字串\n" +" 字串 如果字串不為空則為真。\n" +" \n" +" STRING1 = STRING2\n" +" 如果 string1 和 string2 字串相同則為真。\n" +" STRING1 != STRING2\n" +" 如果 string1 和 string2 字串不相同則為真。\n" +" STRING1 < STRING2\n" +" 如果按字典排序 string1 在 string2 串之前則為真。\n" +" STRING1 > STRING2\n" +" 如果按字典排序 string1 在 string2 串之前則為真。\n" +" \n" +" 其他運算子:\n" +" \n" +" -o 選項 如果指定 shell 選項啟用則為真。\n" +" -v VAR\t 如果指定 Shell 變數 VAR 已指派則為真。\n" +" -R VAR\t 如果指定 Shell 變數 VAR 已指派且為名稱引用則為真。\n" +" ! EXPR 如果表示式 expr 為假則為真。\n" +" EXPR1 -a EXPR2 如果 expr1 和 expr2 都為真則為真。\n" +" EXPR1 -o EXPR2 如果 expr1 和 expr2 有一個為真則為真。\n" +" \n" +" arg1 OP arg2 算術測試。OP 運算子可以是 -eq、-ne、\n" +" -lt、-le、-gt、或 -ge 之一。\n" +" \n" +" 二元算術運算回傳真,如果 ARG1 參數等於、不等於、\n" +" 小於、小於等於、大於、或者大於等於 ARG2 參數。\n" +" \n" +" 退出狀態:\n" +" 如果 EXPR 表示式求值為真則回傳成功;如果 EXPR 表示式求值\n" +" 為假或者使用了無效的參數則回傳失敗。" + +#: builtins.c:1343 +msgid "" +"Evaluate conditional expression.\n" +" \n" +" This is a synonym for the \"test\" builtin, but the last argument must\n" +" be a literal `]', to match the opening `['." +msgstr "" +"求值條件表示式。\n" +" \n" +" 是內建指令「test」的同義詞,但是最後一個參數必須是\n" +" 字元「]」,以符合起始的「[」。" + +#: builtins.c:1352 +msgid "" +"Display process times.\n" +" \n" +" Prints the accumulated user and system times for the shell and all of " +"its\n" +" child processes.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"顯示行程時間\n" +" \n" +" 印出 shell 及其所有子行程的累計使用者空間和\n" +" 系統空間執行時間。\n" +" \n" +" 退出狀態:\n" +" 一律成功。" + +#: builtins.c:1364 +msgid "" +"Trap signals and other events.\n" +" \n" +" Defines and activates handlers to be run when the shell receives " +"signals\n" +" or other conditions.\n" +" \n" +" ARG is a command to be read and executed when the shell receives the\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes.\n" +" \n" +" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. " +"If\n" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" +" \n" +" If no arguments are supplied, trap prints the list of commands " +"associated\n" +" with each signal.\n" +" \n" +" Options:\n" +" -l\tprint a list of signal names and their corresponding numbers\n" +" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n" +" \n" +" Each SIGNAL_SPEC is either a signal name in or a signal " +"number.\n" +" Signal names are case insensitive and the SIG prefix is optional. A\n" +" signal may be sent to the shell with \"kill -signal $$\".\n" +" \n" +" Exit Status:\n" +" Returns success unless a SIGSPEC is invalid or an invalid option is " +"given." +msgstr "" +"對訊號和其他事件設陷阱。\n" +" \n" +" 定義一個處理器,在 shell 接收到訊號和其他條件下執行。\n" +" \n" +" <參數> 是當 shell 接收到 SIGNAL_SPEC 訊號時讀取和執行的指令。\n" +" 如果沒有指定 <參數> (並且只給出一個 SIGNAL_SPEC 訊號) 或者\n" +" <參數> 為\n" +" 「-」,每一個指定的參數會被重設為原始值。如果 <參數> 是一個空串,則每一" +"個\n" +" SIGNAL_SPEC 訊號會被 shell 和它啟動的指令忽略。\n" +" \n" +" 如果一個 SIGNAL_SPEC 訊號是 EXIT (0),則 <參數> 指令會在 shell 退出時被\n" +" 執行。如果一個 SIGNAL_SPEC 訊號是 DEBUG,則 <參數> 指令會在每一個簡單命\n" +" 令之前執行。\n" +" \n" +" 如果不提供參數,trap 印出列表顯示每一個與每一個訊號相關聯的指令。\n" +" \n" +" 選項:\n" +" -l\t印出一個訊號名稱和它們對應的編號列表\n" +" -p\t印出與每個 SIGNAL_SPEC 訊號相關聯的陷阱指令\n" +" \n" +" 每一個 SIGNAL_SPEC 訊號可以是 中的訊號名稱或者訊號編號。\n" +" 訊號名稱大小寫相符且可以使用 SIG 字首。訊號可用「kill - 訊號 $$」\n" +" 傳送給 shell。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者 SIGSPEC。" + +#: builtins.c:1400 +msgid "" +"Display information about command type.\n" +" \n" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" Options:\n" +" -a\tdisplay all locations containing an executable named NAME;\n" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\tthe `-p' option is not also used\n" +" -f\tsuppress shell function lookup\n" +" -P\tforce a PATH search for each NAME, even if it is an alias,\n" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" +" \n" +" Arguments:\n" +" NAME\tCommand name to be interpreted.\n" +" \n" +" Exit Status:\n" +" Returns success if all of the NAMEs are found; fails if any are not " +"found." +msgstr "" +"顯示指令類型的資訊。\n" +" \n" +" 對於每一個 <名稱>,指示如果做為指令它將如何被解釋。\n" +" \n" +" 選項:\n" +" -a\t顯示所有包含名稱為 <名稱> 的可執行檔案的位置;\n" +" \t包括別名、內建和函數。僅當「-p」選項沒有使用時\n" +" -f\t抑制 shell 函數查詢\n" +" -P\t為每個 <名稱> 驚醒 PATH 路徑搜尋,即使它是別名、\n" +" \t內建或函數,並且回傳將被執行的磁碟上檔案的名稱。\n" +" -p\t回傳將被執行的磁碟上檔案的名稱,或者當「type -t <名稱>」\n" +" \t不回傳「file」時,不回傳任何值。\n" +" -t\t回傳下列詞中的任何一個「alias」、「keyword」、\n" +" \t「function」、「builtin」、「file」或者「」,如果 <名稱> 是相應的\n" +" \t一個別名、shell 保留字、shell 函數、shell 內建物件、\n" +" \t磁碟檔案或沒有找到。\n" +" \n" +" 參數:\n" +" <名稱>\t將要解析的指令。\n" +" \n" +" 退出狀態:\n" +" 如果所有的 <名稱> 指令都找到則回傳成功;任何找不到則失敗。" + +#: builtins.c:1431 +#, fuzzy +msgid "" +"Modify shell resource limits.\n" +" \n" +" Provides control over the resources available to the shell and " +"processes\n" +" it creates, on systems that allow such control.\n" +" \n" +" Options:\n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -b\tthe socket buffer size\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -e\tthe maximum scheduling priority (`nice')\n" +" -f\tthe maximum size of files written by the shell and its children\n" +" -i\tthe maximum number of pending signals\n" +" -k\tthe maximum number of kqueues allocated for this process\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q\tthe maximum number of bytes in POSIX message queues\n" +" -r\tthe maximum real-time scheduling priority\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource; the\n" +" special LIMIT values `soft', `hard', and `unlimited' stand for the\n" +" current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed. If\n" +" no option is given, then -f is assumed.\n" +" \n" +" Values are in 1024-byte increments, except for -t, which is in seconds,\n" +" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n" +" number of processes.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"修改 shell 資源限制。\n" +" \n" +" 在允許此類控制的系統上,提供對於 shell 及其建立的行程所可用的\n" +" 資源的控制。\n" +" \n" +" 選項:\n" +" -S\t使用軟 (「soft」) 資源限制\n" +" -H\t使用硬 (「hard」) 資源限制\n" +" -a\t所有目前限制都被通報\n" +" -b\t通訊端快取尺寸\n" +" -c\t建立核心檔案的最大尺寸\n" +" -d\t一個行程的資料區最大尺寸\n" +" -e\t最高的排程優先順序 (「nice」)\n" +" -f\t有 shell 及其子行程可以寫入的最大檔案尺寸\n" +" -i\t最多可以暫停的訊號數\n" +" -k\t為這個進程所分配的最大 kqueues 數量\n" +" -l\t一個行程可以鎖定的最大記憶體尺寸\n" +" -m\t最大的記憶體進駐尺寸\n" +" -n\t最多開啟的檔案描述符個數\n" +" -p\t管道緩衝區尺寸\n" +" -q\tPOSIX 資訊佇列的最大位元組數\n" +" -r\t即時排程的最大優先順序\n" +" -s\t最大堆疊尺寸\n" +" -P\t偽終端的最大數量\n" +" -t\t最大的 CPU 時間,以秒為單位\n" +" -u\t最大使用者行程數\n" +" -v\t虛擬記憶體尺寸\n" +" -x\t最大的檔案鎖數量\n" +" -T\t最大執行緒數量\n" +" \n" +" 並非所有選項在所有系統上可用。\n" +" \n" +" 如果提供了 LIMIT 變數,則它為指定資源的新值;特別的 LIMIT 值為\n" +" 「soft」、「hard」和「unlimited」,分別表示目前的軟限制,硬限制和無限" +"制。\n" +" 否則印出指定資源的目前限制值,不帶選項則假定為 -f\n" +" \n" +" 取值都是 1024 位元組為單位,除了 -t 以秒為單位,-p 以 512 位元組遞增,\n" +" -u 為無尺度的行程數量。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者錯誤發生。" + +#: builtins.c:1482 +msgid "" +"Display or set file mode mask.\n" +" \n" +" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n" +" the current value of the mask.\n" +" \n" +" If MODE begins with a digit, it is interpreted as an octal number;\n" +" otherwise it is a symbolic mode string like that accepted by chmod(1).\n" +" \n" +" Options:\n" +" -p\tif MODE is omitted, output in a form that may be reused as input\n" +" -S\tmakes the output symbolic; otherwise an octal number is output\n" +" \n" +" Exit Status:\n" +" Returns success unless MODE is invalid or an invalid option is given." +msgstr "" +"顯示或設定檔案模式遮罩。\n" +" \n" +" 設定使用者檔案建立遮罩為 MODE 模式。如果省略了 MODE,則\n" +" 印出目前遮罩的值。\n" +" \n" +" 如果 MODE 模式以數字開頭,則被當做八進位數字解析;否則是一個\n" +" chmod(1) 可接收的符號模式串。\n" +" \n" +" 選項:\n" +" -p\t如果省略 MDOE 模式,以可重用為輸入的格式輸入\n" +" -S\t以符號形式輸出,否則以八進位數字格式輸出\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的 MODE 模式或者選項。" + +#: builtins.c:1502 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an ID, which may be a process ID or " +"a\n" +" job specification, and reports its termination status. If ID is not\n" +" given, waits for all currently active child processes, and the return\n" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"等待工作完成並回傳退出狀態。\n" +" \n" +" 等待以 ID 編號識別的行程,其中 ID 可以是行程編號或者工作規格,\n" +" 並通報它的終止狀態。如果 ID 沒有給出,則等待所有的目前活躍子\n" +" 行程,並且回傳狀態為零。如果 ID 是工作規格,等待工作管道中的\n" +" 所有行程。\n" +" \n" +" 若指定了 -n 選項,等待下一個工作完成並回傳其狀態。\n" +" \n" +" 如果指定了 -f 選項且啟用工作管理,則等待指定 ID 終止,而非\n" +" 等到其變更狀態。\n" +" \n" +" 退出狀態:\n" +" 回傳最後一個 ID 行程的狀態;如果使用了無效的 ID 或者選項則失敗。" + +#: builtins.c:1533 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"等待行程完成並且回傳退出狀態。\n" +" \n" +" 等待指定行程並通報它的終止狀態。如果沒有提供 PID,則目前所有的活躍\n" +" 子行程都會被等待,並且回傳碼為零。PID 必須為行程識別碼。\n" +" \n" +" 退出狀態:\n" +" 回傳行程 ID 的狀態;如果 PID 是無效的行程識別碼或者指定了無效的選項則失" +"敗。" + +#: builtins.c:1548 +msgid "" +"Execute commands for each member in a list.\n" +" \n" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"為列表中的每個成員執行指令。\n" +" \n" +" 「for」迴圈為列表中的每個成員執行一系列的指令。如果沒有\n" +" 「in WORDS ...;」則假定使用「in \"$@\"」。對於 WORDS 中的每\n" +" 個元素,<名稱> 被設定為該元素,並且執行 <指令>。\n" +" \n" +" 退出狀態:\n" +" 回傳最後執行指令的狀態。" + +#: builtins.c:1562 +msgid "" +"Arithmetic for loop.\n" +" \n" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"算術 for 迴圈。\n" +" \n" +" 等價於\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\t<指令>\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1、EXP2 和 EXP3 都是算術表示式。如果省略任何表示式,\n" +" 則等同於使用了求值為 1 的表示式。\n" +" \n" +" 退出狀態:\n" +" 回傳最後執行指令的狀態。" + +#: builtins.c:1580 +msgid "" +"Select words from a list and execute commands.\n" +" \n" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"從列表中選取詞並且執行指令。\n" +" \n" +" WORDS 變數被展開,產生一個字詞的列表。展開的字詞集合被印出\n" +" 在標準錯誤輸出裝置上,每個以一個數字做字首。如果沒有「in WORDS」\n" +" 則假定使用「in \"$@\"」。PS3 提示符會被顯示並且從標準輸入讀入一列\n" +" 如果該列由被顯示字詞對應的數字組成,則 <名稱> 變數被設定為相應\n" +" 的字詞。如果列為空,則 WORDS 變數和提示符被重新顯示。如果讀取了\n" +" 檔案結束符,則指令完成。讀入任何其他的值會導致 <名稱> 變數被設定\n" +" 為空。讀入的列被存放在變數 REPLY 中。<指令> 在每次選擇\n" +" 之後執行直到執行一個 break 指令。\n" +" \n" +" 退出狀態:\n" +" 回傳最後一個執行指令的狀態。" + +#: builtins.c:1601 +msgid "" +"Report time consumed by pipeline's execution.\n" +" \n" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" \n" +" Options:\n" +" -p\tprint the timing summary in the portable Posix format\n" +" \n" +" The value of the TIMEFORMAT variable is used as the output format.\n" +" \n" +" Exit Status:\n" +" The return status is the return status of PIPELINE." +msgstr "" +"通報管道執行的消耗時間。\n" +" \n" +" 執行 PIPELINE 並且印出 PIPELINE 終止時實際時間、使用者 CPU 時間和系統\n" +" CPU 時間的總結。\n" +" \n" +" 選項:\n" +" -p\t用可移植的 POSIX 格式印出用時總結。\n" +" \n" +" TIMEFORMAT 變數的值被做為輸出格式。\n" +" \n" +" 退出狀態:\n" +" 回傳狀態即 PIPELINE 的回傳狀態。" + +#: builtins.c:1618 +msgid "" +"Execute commands based on pattern matching.\n" +" \n" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"基於模式符合來執行指令。\n" +" \n" +" 基於 PATTERN 模式符合的字詞 WORD,有選擇的執行 <指令>。\n" +" 「|」用於分隔多個模式。\n" +" \n" +" 退出狀態:\n" +" 回傳最後一個執行指令的狀態。" + +#: builtins.c:1630 +msgid "" +"Execute commands based on conditional.\n" +" \n" +" The `if COMMANDS' list is executed. If its exit status is zero, then " +"the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list " +"is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. " +"Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of " +"the\n" +" entire construct is the exit status of the last command executed, or " +"zero\n" +" if no condition tested true.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"根據條件執行指令。\n" +" \n" +" 「if <指令>」列表被執行。如果退出狀態為零,則執行「then <指令>」\n" +" 列表。否則按順序執行每個「elif <指令>」列表,並且如果它的退出狀態為\n" +" 零,則執行對應的「then <指令>」列表並且 if 指令終止。否則如果存在的\n" +" 情況下,執行「else <指令>」列表。整個結構的退出狀態是最後一個執行\n" +" 指令的狀態,或者如果沒有條件測試為真的話,則為零。\n" +" \n" +" 退出狀態:\n" +" 回傳最後一個執行指令的狀態。" + +#: builtins.c:1647 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"只要測試成功即執行指令。\n" +" \n" +" 只要在「while」<指令> 中的最終指令回傳結果為 0,則\n" +" 展開並執行 <指令>。\n" +" \n" +" 退出狀態:\n" +" 回傳最後一個執行指令的狀態。" + +#: builtins.c:1659 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"當測試不同過時執行指令。\n" +" \n" +" 「until」<指令> 的最終指令回傳狀態不為 0 時,\n" +" 展開並執行 <指令>。\n" +" \n" +" 退出狀態:\n" +" 回傳最後一個執行指令的狀態。" + +#: builtins.c:1671 +msgid "" +"Create a coprocess named NAME.\n" +" \n" +" Execute COMMAND asynchronously, with the standard output and standard\n" +" input of the command connected via a pipe to file descriptors assigned\n" +" to indices 0 and 1 of an array variable NAME in the executing shell.\n" +" The default NAME is \"COPROC\".\n" +" \n" +" Exit Status:\n" +" The coproc command returns an exit status of 0." +msgstr "" +"建立一個以 <名稱> 為名的副行程。\n" +" \n" +" 非同步執行 <指令>,在執行 shell 中的陣列變數 <名稱>\n" +" 的 0 號和 1 號元素做為檔案描述符,以一個管道連接指令\n" +" 分別做為指令的標準輸出和輸入裝置。\n" +" 預設的 <名稱> 是「COPROC」。\n" +" \n" +" 退出狀態:\n" +" coprc 指令回傳離開代碼 0。" + +#: builtins.c:1685 +msgid "" +"Define shell function.\n" +" \n" +" Create a shell function named NAME. When invoked as a simple command,\n" +" NAME runs COMMANDs in the calling shell's context. When NAME is " +"invoked,\n" +" the arguments are passed to the function as $1...$n, and the function's\n" +" name is in $FUNCNAME.\n" +" \n" +" Exit Status:\n" +" Returns success unless NAME is readonly." +msgstr "" +"定義 shell 函數。\n" +" \n" +" 建立一個以 <名稱> 為名的 shell 函數。當做為一個簡單的指令啟用時,\n" +" <名稱> 函數執行呼叫 shell 語境中的 COMMANDs 指令。當 <名稱>\n" +" 被啟用時,參數做為 $1…$n 被傳遞給函數,函數的名字儲存在變數\n" +" $FUNCNAME 中。\n" +" \n" +" 退出狀態:\n" +" 回傳成功除非 <名稱> 為唯讀。" + +#: builtins.c:1699 +msgid "" +"Group commands as a unit.\n" +" \n" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"將指令組合為一個單元。\n" +" \n" +" 執行群組中的指令集合。這是對整個指令集合\n" +" 做重定向的方法之一。\n" +" \n" +" 退出狀態:\n" +" 回傳最後一個執行指令的狀態。" + +#: builtins.c:1711 +msgid "" +"Resume job in foreground.\n" +" \n" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'.\n" +" \n" +" Exit Status:\n" +" Returns the status of the resumed job." +msgstr "" +"在前臺繼續工作\n" +" \n" +" 對於 JOB_SPEC 參數來說和「fg」指令等同。繼續一個\n" +" 停止的或者後臺工作。JOB_SPEC 可以指定一個工作\n" +" 名字或工作號。在 JOB_SPEC 後加上一個「&」將會把\n" +" 工作放至後臺,就像工作規格被做為「bg」指令的參數\n" +" 執行一樣。\n" +" \n" +" 退出狀態:\n" +" 回傳被繼續的工作狀態。" + +#: builtins.c:1726 +#, fuzzy +msgid "" +"Evaluate arithmetic expression.\n" +" \n" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" +" \n" +" Exit Status:\n" +" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." +msgstr "" +"求值算術表示式。\n" +" \n" +" 表示式按照算術法則進行求值。\n" +" 等價於「let 表示式」。\n" +" \n" +" 退出狀態:\n" +" 如果表示式求值為 0 則回傳 1;否則回傳 0。" + +#: builtins.c:1738 +msgid "" +"Execute conditional command.\n" +" \n" +" Returns a status of 0 or 1 depending on the evaluation of the " +"conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries " +"used\n" +" by the `test' builtin, and may be combined using the following " +"operators:\n" +" \n" +" ( EXPRESSION )\tReturns the value of EXPRESSION\n" +" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n" +" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of\n" +" the operator is used as a pattern and pattern matching is performed.\n" +" When the `=~' operator is used, the string to the right of the operator\n" +" is matched as a regular expression.\n" +" \n" +" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value.\n" +" \n" +" Exit Status:\n" +" 0 or 1 depending on value of EXPRESSION." +msgstr "" +"執行條件指令。\n" +" \n" +" 根據條件表示式 EXPRESSION 的求值回傳狀態 0 或 1。表示式按照\n" +" 「test」內建的相同條件組成,或者可以有下列運算子連接而成:\n" +" \n" +" ( EXPRESSION )\t回傳 EXPRESSION 表示式的值\n" +" ! EXPRESSION\t\t如果 EXPRESSION 表示式為假則為真,否則為假\n" +" EXPR1 && EXPR2\t如果 EXPR1 和 EXPR2 表示式均為真則為真,否則為假\n" +" EXPR1 || EXPR2\t如果 EXPR1 和 EXPR2 表示式中有一個為真則為真,否則為" +"假\n" +" \n" +" 當使用「==」和「!=」運算子時,運算子右邊的字串被用作模式並且執行一個\n" +" 符合。當使用「=~」運算子時,運算子右邊的字串被當做正規表示式來進行\n" +" 符合。\n" +" \n" +" 運算子 && 和 || 將不對 EXPR2 表示式進行求值,如果 EXPR1 表示式足夠確定\n" +" 整個表示式的值。\n" +" \n" +" 退出狀態:\n" +" 根據 EXPRESSION 的值為 0 或 1。" + +#: builtins.c:1764 +msgid "" +"Common shell variable names and usage.\n" +" \n" +" BASH_VERSION\tVersion information for this Bash.\n" +" CDPATH\tA colon-separated list of directories to search\n" +" \t\tfor directories given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE\tThe name of the file where your command history is stored.\n" +" HISTFILESIZE\tThe maximum number of lines this file can contain.\n" +" HISTSIZE\tThe maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME\tThe complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n" +" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\tThe version of Unix this version of Bash is running on.\n" +" PATH\tA colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND\tA command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1\t\tThe primary prompt string.\n" +" PS2\t\tThe secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM\tThe name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume\tNon-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars\tCharacters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" +"常用 shell 變數名稱和使用。\n" +" \n" +" BASH_VERSION\t目前 Bash 的版本資訊。\n" +" CDPATH\t用於「cd」指令參數搜尋分號分隔的目錄列表\n" +" GLOBIGNORE\t路徑擴充套件時忽略的檔名符合模式列表,\n" +" \t\t以分號分隔。\n" +" HISTFILE\t您的指令歷史記錄存放的檔案名稱。\n" +" HISTFILESIZE\t歷史記錄檔案最多可以儲存的列數。\n" +" HISTSIZE\t一個執行的 shell 最多可以訪問的歷史記錄指令列數。\n" +" HOME\t您登入目錄的完整路徑。\n" +" HOSTNAME\t目前主機的主機名稱。\n" +" HOSTTYPE\t目前版本的 BASH 在其之上執行的 CPU 類型。\n" +" IGNOREEOF\t控制 shell 收到檔案結束符做為單一輸入後的\n" +" \t\t動作。如果設定這個變數,則它的值是 shell 退出之前在\n" +" \t\t一個空列上可以連續看到的檔案結束符數量(預設為 10)。\n" +" \t\t未設定時,檔案結束符標誌著輸入的結束。\n" +" MACHTYPE\t描述目前執行 Bash 的系統字串。\n" +" MAILCHECK\tBash 檢測新郵件的頻率,以秒為單位。\n" +" MAILPATH\tBash 從中檢測新郵件的檔案列表,以分號分隔。\n" +" OSTYPE\t執行 Bash 的 Unix 版本。\n" +" PATH\t當尋找指令時搜尋的目錄列表,以冒號分隔。\n" +" PROMPT_COMMAND\t印出每一個主提示符之前執行的命\n" +" \t\t令。\n" +" PS1\t\t主提示符字串。\n" +" PS2\t\t從提示符字串。\n" +" PWD\t\t目前目錄的完整路徑。\n" +" SHELLOPTS\t已啟用的 shell 選項列表,以冒號分隔。\n" +" TERM\t目前終端類型的名稱。\n" +" TIMEFORMAT\t以關鍵則「time」顯示的時間統計資訊的輸出\n" +" \t\t格式。\n" +" auto_resume\t非空時,一個單獨的指令詞會首先被在目前\n" +" \t\t停止的工作列表中搜尋。如果找到則該工作被置於前臺。\n" +" \t\t如果值為「exact」則意味著指令詞必須精確符合停止工作\n" +" \t\t列表中的指令。如果值為「substring」則意味著指令詞必\n" +" \t\t須符合工作的一個子字串。任何其他的值意味著指令詞\n" +" \t\t必須是停止工作的一個字首。\n" +" histchars\t控制歷史記錄展開和快速取代的字元。第一個字元是\n" +" \t\t歷史記錄取代字元,通常是「!」。第二個字元是快速取代字元,\n" +" \t\t通常是「^」。第三個是歷史記錄註釋字元,通常是「#」。\n" +" HISTIGNORE\t用於決定哪些指令被存入歷史記錄檔案的模式\n" +" \t\t列表,以冒號分隔。\n" + +#: builtins.c:1821 +msgid "" +"Add directories to stack.\n" +" \n" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when adding\n" +" \t\tdirectories to the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\tnew current working directory.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"從堆疊中建立目錄。\n" +" \n" +" 從目錄堆疊中建立條目。不帶參數時,建立堆疊頂端目錄,並變更至新的堆疊\n" +" 頂端目錄。\n" +" \n" +" 選項:\n" +" -n\t抑制從堆疊中刪除目錄時通常的目錄變換操作,從而僅對堆疊\n" +" \t進行操作。\n" +" \n" +" 參數:\n" +" +N\t刪除第 N 個目錄 (「dirs」顯示的目錄列表中左起,從零開始)。\n" +" \t例如:「popd +0」刪除第一個目錄,「popd +1」刪除第二個。\n" +" \n" +" -N\t刪除第 N 個目錄 (「dirs」顯示的目錄列表中右起,從零開始)。\n" +" \t例如:「popd -0」刪除最後一個目錄,,「popd -1」刪除倒數第二個。\n" +" \n" +" 「dirs」內建顯示目錄堆疊。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的參數或者目錄變換失敗。" + +#: builtins.c:1855 +msgid "" +"Remove directories from stack.\n" +" \n" +" Removes entries from the directory stack. With no arguments, removes\n" +" the top directory from the stack, and changes to the new top directory.\n" +" \n" +" Options:\n" +" -n\tSuppresses the normal change of directory when removing\n" +" \t\tdirectories from the stack, so only the stack is manipulated.\n" +" \n" +" Arguments:\n" +" +N\tRemoves the Nth entry counting from the left of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" The `dirs' builtin displays the directory stack.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid argument is supplied or the directory\n" +" change fails." +msgstr "" +"從堆疊中刪除目錄。\n" +" \n" +" 從目錄堆疊中刪除條目。不帶參數時,刪除堆疊頂端目錄,並變更至新的堆疊\n" +" 頂端目錄。\n" +" \n" +" 選項:\n" +" -n\t抑制從堆疊中刪除目錄時通常的目錄變換操作,從而僅對堆疊\n" +" \t進行操作。\n" +" \n" +" 參數:\n" +" +N\t刪除第 N 個目錄 (「dirs」顯示的目錄列表中左起,從零開始)。\n" +" \t例如:「popd +0」刪除第一個目錄,「popd +1」刪除第二個。\n" +" \n" +" -N\t刪除第 N 個目錄 (「dirs」顯示的目錄列表中右起,從零開始)。\n" +" \t例如:「popd -0」刪除最後一個目錄,,「popd -1」刪除倒數第二個。\n" +" \n" +" 「dirs」內建顯示目錄堆疊。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的參數或者目錄變換失敗。" + +#: builtins.c:1885 +msgid "" +"Display directory stack.\n" +" \n" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" Options:\n" +" -c\tclear the directory stack by deleting all of the elements\n" +" -l\tdo not print tilde-prefixed versions of directories relative\n" +" \t\tto your home directory\n" +" -p\tprint the directory stack with one entry per line\n" +" -v\tprint the directory stack with one entry per line prefixed\n" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"顯示目錄堆疊。\n" +" \n" +" 顯示目前記住的目錄列表。藉由「pushd」指令可以將目錄存入列表\n" +" 中;「popd」指令可用於遍歷彈出列表。\n" +" \n" +" 選項:\n" +" -c\t刪除所有元素以清空目錄堆疊\n" +" -l\t不印出與主目錄相關的波浪號字首的目錄\n" +" -p\t每列一個條目印出目錄堆疊\n" +" -v\t每列一個條目,以堆疊中位置為字首印出目錄堆疊\n" +" \n" +" 參數:\n" +" +N\t顯示 dirs 不帶選項啟動時顯示的目錄列表左起中第\n" +" \tN 個目錄,從零開始。\n" +" \n" +" -N\t顯示 dirs 不帶選項啟動時顯示的目錄列表右起中第\n" +" \tN 個目錄,從零開始。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者發生錯誤。" + +#: builtins.c:1916 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" +" \n" +" Options:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tprint each shell option with an indication of its status\n" +" -q\tsuppress output\n" +" -s\tenable (set) each OPTNAME\n" +" -u\tdisable (unset) each OPTNAME\n" +" \n" +" Exit Status:\n" +" Returns success if OPTNAME is enabled; fails if an invalid option is\n" +" given or OPTNAME is disabled." +msgstr "" +"設定和取消設定 shell 選項。\n" +" \n" +" 變更每個 shell <選項名稱> 的設定。不帶選項參數時,\n" +" 顯示每個提供的 <選項名稱> 或所有 shell 選項 (如果沒有\n" +" 傳入任何 <選項名稱>) 和是否每個都有設定到的指示。\n" +" \n" +" 選項:\n" +" -o\t限制 <選項名稱> 為定義用於「set -o」的選項\n" +" -p\t印出每個 shell 選項並標註它的狀態。\n" +" -q\t抑制輸出\n" +" -s\t啟用(設定)每個 <選項名稱> 選項\n" +" -u\t停用(取消設定)每個 <選項名稱> 選項\n" +" \n" +" 退出狀態:\n" +" 如果 <選項名稱> 選項被啟用則回傳成功;如果是\n" +" 無效的選項或 <選項名稱> 被停用則失敗。" + +#: builtins.c:1937 +msgid "" +"Formats and prints ARGUMENTS under control of the FORMAT.\n" +" \n" +" Options:\n" +" -v var\tassign the output to shell variable VAR rather than\n" +" \t\tdisplay it on the standard output\n" +" \n" +" FORMAT is a character string which contains three types of objects: " +"plain\n" +" characters, which are simply copied to standard output; character " +"escape\n" +" sequences, which are converted and copied to the standard output; and\n" +" format specifications, each of which causes printing of the next " +"successive\n" +" argument.\n" +" \n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" printf interprets:\n" +" \n" +" %b\texpand backslash escape sequences in the corresponding argument\n" +" %q\tquote the argument in a way that can be reused as shell input\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"在 <格式> 的控制下格式化並印出 <參數>。\n" +" \n" +" 選項:\n" +" -v var\t將輸出指派給 shell 變數 VAR 而不顯示在標準輸出上\n" +" \n" +" <格式> 是包含三種物件的字串:簡單地被複製到標準輸出的普通字元;\n" +" 被變換之後複製到標準輸入的逸出字元;以及每個都會影響到下個參數的印出格式" +"化規格。\n" +" \n" +" 在 printf(1) 中描述的標準控制規格之外,printf 解析:\n" +" \n" +" %b\t擴充套件對應參數中的反斜線逸出序列\n" +" %q\t以可做為 shell 輸入的格式引用參數\n" +" %(fmt)T\t以 FMT 為提供 strftime(3) 的格式輸出日期與時間字串 \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者發生寫入或指派錯誤。" + +#: builtins.c:1971 +#, fuzzy +msgid "" +"Specify how arguments are to be completed by Readline.\n" +" \n" +" For each NAME, specify how arguments are to be completed. If no " +"options\n" +" are supplied, existing completion specifications are printed in a way " +"that\n" +" allows them to be reused as input.\n" +" \n" +" Options:\n" +" -p\tprint existing completion specifications in a reusable format\n" +" -r\tremove a completion specification for each NAME, or, if no\n" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"規範 readline 如何完成讀取參數。\n" +" \n" +" 規格對於每一個<名稱>如何完成讀取參數。如果不帶選項,\n" +" 現有的補完規格會以可以重用為輸入的格式印出。\n" +" \n" +" 選項:\n" +" -p\t以可重用的格式印出現有的補完規格。\n" +" -r\t對於每個<名稱>刪除補完規格,或者如果沒有提供<名稱>\n" +" \t名稱,刪除所有的補完規格。\n" +" -D\t對於沒有補完規格定義的指令,設定預設的補完動作\n" +" -E\t對於「empty」指令設定補完動作,—— 對於空列的補完。\n" +" -I\t套用補完和動作到首個 (通常是指令) 單詞\n" +" \n" +" 嘗試補完時,按照上述大寫字母選項的順序進行動作。 如果傳入了多個選項,\n" +" -D 選項優先於 -E 選項,而兩者優先於 -I 選項。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者錯誤發生。" + +#: builtins.c:2001 +msgid "" +"Display possible completions depending on the options.\n" +" \n" +" Intended to be used from within a shell function generating possible\n" +" completions. If the optional WORD argument is supplied, matches " +"against\n" +" WORD are generated.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"依據選項顯示可能的補完。\n" +" \n" +" 意圖在能產生可能的補完 shell 函數內部使用。\n" +" 如果提供了可選的 WORD 參數,則產生按照 WORD\n" +" 進行的符合。\n" +" \n" +" 退出狀態:\n" +" 除非使用了無效選項或者錯誤發生,否則回傳成功。" + +#: builtins.c:2016 +msgid "" +"Modify or display completion options.\n" +" \n" +" Modify the completion options for each NAME, or, if no NAMEs are " +"supplied,\n" +" the completion currently being executed. If no OPTIONs are given, " +"print\n" +" the completion options for each NAME or the current completion " +"specification.\n" +" \n" +" Options:\n" +" \t-o option\tSet completion option OPTION for each NAME\n" +" \t-D\t\tChange options for the \"default\" command completion\n" +" \t-E\t\tChange options for the \"empty\" command completion\n" +" \t-I\t\tChange options for completion on the initial word\n" +" \n" +" Using `+o' instead of `-o' turns off the specified option.\n" +" \n" +" Arguments:\n" +" \n" +" Each NAME refers to a command for which a completion specification must\n" +" have previously been defined using the `complete' builtin. If no NAMEs\n" +" are supplied, compopt must be called by a function currently generating\n" +" completions, and the options for that currently-executing completion\n" +" generator are modified.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or NAME does not\n" +" have a completion specification defined." +msgstr "" +"修改或顯示補完選項。\n" +" \n" +" 修改每個 <名稱> 的補完選項,或如果沒有提供 <名稱>,執行目前的補完。\n" +" 如果不帶選項,印出每個 <名稱> 的補完選項或目前的補完規格。\n" +" \n" +" 選項:\n" +" \t-o option\t為每個 <名稱> 設定補完選項 option\n" +" \t-D\t\t為「default」指令補完變更選項\n" +" \t-E\t\t為「empty」指令補完變更選項\n" +" \t-I\t\t為首單詞上的補完變更選項\n" +" \n" +" 使用「+o」而不是「-o」可以關閉指定的選項。\n" +" \n" +" 參數:\n" +" \n" +" 每個 <名稱> 都對應一個之前以藉由「complete」內建定義了補完規格的\n" +" 指令。如果不提供 <名稱>,目前產生補完的函數必須呼叫 compopt,\n" +" 並且目前執行的補完產生器選項會被修改。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項或者 <名稱> 沒有定義補完規格。" + +#: builtins.c:2047 +msgid "" +"Read lines from the standard input into an indexed array variable.\n" +" \n" +" Read lines from the standard input into the indexed array variable " +"ARRAY, or\n" +" from file descriptor FD if the -u option is supplied. The variable " +"MAPFILE\n" +" is the default ARRAY.\n" +" \n" +" Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" +" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " +"copied\n" +" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default " +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\tRead lines from file descriptor FD instead of the standard " +"input\n" +" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read\n" +" -c quantum\tSpecify the number of lines read between each call to\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\tArray variable name to use for file data\n" +" \n" +" If -C is supplied without -c, the default quantum is 5000. When\n" +" CALLBACK is evaluated, it is supplied the index of the next array\n" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" +" \n" +" If not supplied with an explicit origin, mapfile will clear ARRAY " +"before\n" +" assigning to it.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or ARRAY is readonly " +"or\n" +" not an indexed array." +msgstr "" +"從標準輸入讀取列到索引陣列變數中。\n" +" \n" +" 從標準輸入讀取列到索引陣列變數 ARRAY 中,或者如果使用了 -u 選項,\n" +" 從檔案描述符 FD 中讀取。MAPFILE 變數是預設的 ARRAY 變數。\n" +" \n" +" 選項:\n" +" -d delim\t使用 DELIM 取代換行符號來斷行\n" +" -n count\t最多複製 COUNT 列,如果 COUNT 為 0,則複製所有列。\n" +" -O origin\t從索引 ORIGIN 開始 指派給 ARRAY 變數。預設索引是 0。\n" +" -s count \t丟棄最先讀取的 COUNT 列。\n" +" -t\t\t從讀取的每列末尾刪除一個換列符。\n" +" -u fd\t\t從檔案描述符 FD 中讀取列而不是標準輸入。\n" +" -C callback\t每 QUANTUM 次讀列之後對 CALLBACK 回呼求值。\n" +" -c quantum\t定義每次呼叫 CALLBACK 回呼之間讀取的列數。\n" +" \n" +" 參數:\n" +" ARRAY\t\t儲存資料使用的陣列變數\n" +" \n" +" 如果使用了 -C 而沒有 -c,預設的定量是 5000。當對 CALLBACK 求值時,\n" +" 下一個將被指派的陣列元素索引做為額外參數被傳遞。\n" +" \n" +" 如果沒有顯式指定起始索引,mapfile 將在指派前清空 ARRAY 變數。\n" +" \n" +" 退出狀態:\n" +" 回傳成功,除非使用了無效的選項,或者 ARRAY 變數唯讀或不是索引陣列。" + +#: builtins.c:2083 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"從一個檔案中讀取列到陣列變數中\n" +" \n" +" 一個「mapfile」的同義詞。" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "回傳目前子例程呼叫的語境\n" +#~ " \n" +#~ " 不帶 <表示式> 時,回傳" + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: 行程 %5ld(%s) 進入 the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "不明訊號 #" diff --git a/bash-5.1/print_cmd.c b/bash-5.1/print_cmd.c new file mode 100644 index 0000000000000000000000000000000000000000..3c8c2d8fff892d82664caee0bb840d8affd5cbd4 --- /dev/null +++ b/bash-5.1/print_cmd.c @@ -0,0 +1,1613 @@ +/* print_command -- A way to make readable commands from a command tree. */ + +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#if defined (PREFER_STDARG) +# include +#else +# include +#endif + +#include "bashansi.h" +#include "bashintl.h" + +#define NEED_XTRACE_SET_DECL + +#include "shell.h" +#include "flags.h" +#include /* use <...> so we pick it up from the build directory */ +#include "input.h" + +#include "shmbutil.h" + +#include "builtins/common.h" + +#if !HAVE_DECL_PRINTF +extern int printf PARAMS((const char *, ...)); /* Yuck. Double yuck. */ +#endif + +static int indentation; +static int indentation_amount = 4; + +#if defined (PREFER_STDARG) +typedef void PFUNC PARAMS((const char *, ...)); + +static void cprintf PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +static void xprintf PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +#else +#define PFUNC VFunction +static void cprintf (); +static void xprintf (); +#endif + +static void reset_locals PARAMS((void)); +static void newline PARAMS((char *)); +static void indent PARAMS((int)); +static void semicolon PARAMS((void)); +static void the_printed_command_resize PARAMS((int)); + +static void make_command_string_internal PARAMS((COMMAND *)); +static void _print_word_list PARAMS((WORD_LIST *, char *, PFUNC *)); +static void command_print_word_list PARAMS((WORD_LIST *, char *)); +static void print_case_clauses PARAMS((PATTERN_LIST *)); +static void print_redirection_list PARAMS((REDIRECT *)); +static void print_redirection PARAMS((REDIRECT *)); +static void print_heredoc_header PARAMS((REDIRECT *)); +static void print_heredoc_body PARAMS((REDIRECT *)); +static void print_heredocs PARAMS((REDIRECT *)); +static void print_heredoc_bodies PARAMS((REDIRECT *)); +static void print_deferred_heredocs PARAMS((const char *)); + +static void print_for_command PARAMS((FOR_COM *)); +#if defined (ARITH_FOR_COMMAND) +static void print_arith_for_command PARAMS((ARITH_FOR_COM *)); +#endif +#if defined (SELECT_COMMAND) +static void print_select_command PARAMS((SELECT_COM *)); +#endif +static void print_group_command PARAMS((GROUP_COM *)); +static void print_case_command PARAMS((CASE_COM *)); +static void print_while_command PARAMS((WHILE_COM *)); +static void print_until_command PARAMS((WHILE_COM *)); +static void print_until_or_while PARAMS((WHILE_COM *, char *)); +static void print_if_command PARAMS((IF_COM *)); +#if defined (COND_COMMAND) +static void print_cond_node PARAMS((COND_COM *)); +#endif +static void print_function_def PARAMS((FUNCTION_DEF *)); + +#define PRINTED_COMMAND_INITIAL_SIZE 64 +#define PRINTED_COMMAND_GROW_SIZE 128 + +char *the_printed_command = (char *)NULL; +int the_printed_command_size = 0; +int command_string_index = 0; + +int xtrace_fd = -1; +FILE *xtrace_fp = 0; + +#define CHECK_XTRACE_FP xtrace_fp = (xtrace_fp ? xtrace_fp : stderr) + +/* shell expansion characters: used in print_redirection_list */ +#define EXPCHAR(c) ((c) == '{' || (c) == '~' || (c) == '$' || (c) == '`') + +#define PRINT_DEFERRED_HEREDOCS(x) \ + do { \ + if (deferred_heredocs) \ + print_deferred_heredocs (x); \ + } while (0) + +/* Non-zero means the stuff being printed is inside of a function def. */ +static int inside_function_def; +static int skip_this_indent; +static int was_heredoc; +static int printing_connection; +static REDIRECT *deferred_heredocs; + +/* The depth of the group commands that we are currently printing. This + includes the group command that is a function body. */ +static int group_command_nesting; + +/* A buffer to indicate the indirection level (PS4) when set -x is enabled. */ +static char *indirection_string = 0; +static int indirection_stringsiz = 0; + +/* Print COMMAND (a command tree) on standard output. */ +void +print_command (command) + COMMAND *command; +{ + command_string_index = 0; + printf ("%s", make_command_string (command)); +} + +/* Make a string which is the printed representation of the command + tree in COMMAND. We return this string. However, the string is + not consed, so you have to do that yourself if you want it to + remain around. */ +char * +make_command_string (command) + COMMAND *command; +{ + command_string_index = was_heredoc = 0; + deferred_heredocs = 0; + make_command_string_internal (command); + return (the_printed_command); +} + +/* The internal function. This is the real workhorse. */ +static void +make_command_string_internal (command) + COMMAND *command; +{ + char s[3]; + + if (command == 0) + cprintf (""); + else + { + if (skip_this_indent) + skip_this_indent--; + else + indent (indentation); + + if (command->flags & CMD_TIME_PIPELINE) + { + cprintf ("time "); + if (command->flags & CMD_TIME_POSIX) + cprintf ("-p "); + } + + if (command->flags & CMD_INVERT_RETURN) + cprintf ("! "); + + switch (command->type) + { + case cm_for: + print_for_command (command->value.For); + break; + +#if defined (ARITH_FOR_COMMAND) + case cm_arith_for: + print_arith_for_command (command->value.ArithFor); + break; +#endif + +#if defined (SELECT_COMMAND) + case cm_select: + print_select_command (command->value.Select); + break; +#endif + + case cm_case: + print_case_command (command->value.Case); + break; + + case cm_while: + print_while_command (command->value.While); + break; + + case cm_until: + print_until_command (command->value.While); + break; + + case cm_if: + print_if_command (command->value.If); + break; + +#if defined (DPAREN_ARITHMETIC) + case cm_arith: + print_arith_command (command->value.Arith->exp); + break; +#endif + +#if defined (COND_COMMAND) + case cm_cond: + print_cond_command (command->value.Cond); + break; +#endif + + case cm_simple: + print_simple_command (command->value.Simple); + break; + + case cm_connection: + + skip_this_indent++; + printing_connection++; + make_command_string_internal (command->value.Connection->first); + + switch (command->value.Connection->connector) + { + case '&': + case '|': + { + char c = command->value.Connection->connector; + + s[0] = ' '; + s[1] = c; + s[2] = '\0'; + + print_deferred_heredocs (s); + + if (c != '&' || command->value.Connection->second) + { + cprintf (" "); + skip_this_indent++; + } + } + break; + + case AND_AND: + print_deferred_heredocs (" && "); + if (command->value.Connection->second) + skip_this_indent++; + break; + + case OR_OR: + print_deferred_heredocs (" || "); + if (command->value.Connection->second) + skip_this_indent++; + break; + + case ';': + if (deferred_heredocs == 0) + { + if (was_heredoc == 0) + cprintf (";"); + else + was_heredoc = 0; + } + else + print_deferred_heredocs (inside_function_def ? "" : ";"); + + if (inside_function_def) + cprintf ("\n"); + else + { + cprintf (" "); + if (command->value.Connection->second) + skip_this_indent++; + } + break; + + default: + cprintf (_("print_command: bad connector `%d'"), + command->value.Connection->connector); + break; + } + + make_command_string_internal (command->value.Connection->second); + PRINT_DEFERRED_HEREDOCS (""); + printing_connection--; + break; + + case cm_function_def: + print_function_def (command->value.Function_def); + break; + + case cm_group: + print_group_command (command->value.Group); + break; + + case cm_subshell: + cprintf ("( "); + skip_this_indent++; + make_command_string_internal (command->value.Subshell->command); + PRINT_DEFERRED_HEREDOCS (""); + cprintf (" )"); + break; + + case cm_coproc: + cprintf ("coproc %s ", command->value.Coproc->name); + skip_this_indent++; + make_command_string_internal (command->value.Coproc->command); + break; + + default: + command_error ("print_command", CMDERR_BADTYPE, command->type, 0); + break; + } + + + if (command->redirects) + { + cprintf (" "); + print_redirection_list (command->redirects); + } + } +} + +static void +_print_word_list (list, separator, pfunc) + WORD_LIST *list; + char *separator; + PFUNC *pfunc; +{ + WORD_LIST *w; + + for (w = list; w; w = w->next) + (*pfunc) ("%s%s", w->word->word, w->next ? separator : ""); +} + +void +print_word_list (list, separator) + WORD_LIST *list; + char *separator; +{ + _print_word_list (list, separator, xprintf); +} + +void +xtrace_set (fd, fp) + int fd; + FILE *fp; +{ + if (fd >= 0 && sh_validfd (fd) == 0) + { + internal_error (_("xtrace_set: %d: invalid file descriptor"), fd); + return; + } + if (fp == 0) + { + internal_error (_("xtrace_set: NULL file pointer")); + return; + } + if (fd >= 0 && fileno (fp) != fd) + internal_warning (_("xtrace fd (%d) != fileno xtrace fp (%d)"), fd, fileno (fp)); + + xtrace_fd = fd; + xtrace_fp = fp; +} + +void +xtrace_init () +{ + xtrace_set (-1, stderr); +} + +void +xtrace_reset () +{ + if (xtrace_fd >= 0 && xtrace_fp) + { + fflush (xtrace_fp); + fclose (xtrace_fp); + } + else if (xtrace_fd >= 0) + close (xtrace_fd); + + xtrace_fd = -1; + xtrace_fp = stderr; +} + +void +xtrace_fdchk (fd) + int fd; +{ + if (fd == xtrace_fd) + xtrace_reset (); +} + +/* Return a string denoting what our indirection level is. */ + +char * +indirection_level_string () +{ + register int i, j; + char *ps4; + char ps4_firstc[MB_LEN_MAX+1]; + int ps4_firstc_len, ps4_len, ineed, old; + + ps4 = get_string_value ("PS4"); + if (indirection_string == 0) + indirection_string = xmalloc (indirection_stringsiz = 100); + indirection_string[0] = '\0'; + + if (ps4 == 0 || *ps4 == '\0') + return (indirection_string); + + old = change_flag ('x', FLAG_OFF); + ps4 = decode_prompt_string (ps4); + if (old) + change_flag ('x', FLAG_ON); + + if (ps4 == 0 || *ps4 == '\0') + return (indirection_string); + +#if defined (HANDLE_MULTIBYTE) + ps4_len = strnlen (ps4, MB_CUR_MAX); + ps4_firstc_len = MBLEN (ps4, ps4_len); + if (ps4_firstc_len == 1 || ps4_firstc_len == 0 || ps4_firstc_len < 0) + { + ps4_firstc[0] = ps4[0]; + ps4_firstc[ps4_firstc_len = 1] = '\0'; + } + else + memcpy (ps4_firstc, ps4, ps4_firstc_len); +#else + ps4_firstc[0] = ps4[0]; + ps4_firstc[ps4_firstc_len = 1] = '\0'; +#endif + + /* Dynamically resize indirection_string so we have room for everything + and we don't have to truncate ps4 */ + ineed = (ps4_firstc_len * indirection_level) + strlen (ps4); + if (ineed > indirection_stringsiz - 1) + { + indirection_stringsiz = ineed + 1; + indirection_string = xrealloc (indirection_string, indirection_stringsiz); + } + + for (i = j = 0; ps4_firstc[0] && j < indirection_level && i < indirection_stringsiz - 1; i += ps4_firstc_len, j++) + { + if (ps4_firstc_len == 1) + indirection_string[i] = ps4_firstc[0]; + else + memcpy (indirection_string+i, ps4_firstc, ps4_firstc_len); + } + + for (j = ps4_firstc_len; *ps4 && ps4[j] && i < indirection_stringsiz - 1; i++, j++) + indirection_string[i] = ps4[j]; + + indirection_string[i] = '\0'; + free (ps4); + return (indirection_string); +} + +void +xtrace_print_assignment (name, value, assign_list, xflags) + char *name, *value; + int assign_list, xflags; +{ + char *nval; + + CHECK_XTRACE_FP; + + if (xflags) + fprintf (xtrace_fp, "%s", indirection_level_string ()); + + /* VALUE should not be NULL when this is called. */ + if (*value == '\0' || assign_list) + nval = value; + else if (sh_contains_shell_metas (value)) + nval = sh_single_quote (value); + else if (ansic_shouldquote (value)) + nval = ansic_quote (value, 0, (int *)0); + else + nval = value; + + if (assign_list) + fprintf (xtrace_fp, "%s=(%s)\n", name, nval); + else + fprintf (xtrace_fp, "%s=%s\n", name, nval); + + if (nval != value) + FREE (nval); + + fflush (xtrace_fp); +} + +/* A function to print the words of a simple command when set -x is on. Also used to + print the word list in a for or select command header; in that case, we suppress + quoting the words because they haven't been expanded yet. XTFLAGS&1 means to + print $PS4; XTFLAGS&2 means to suppress quoting the words in LIST. */ +void +xtrace_print_word_list (list, xtflags) + WORD_LIST *list; + int xtflags; +{ + WORD_LIST *w; + char *t, *x; + + CHECK_XTRACE_FP; + + if (xtflags&1) + fprintf (xtrace_fp, "%s", indirection_level_string ()); + + for (w = list; w; w = w->next) + { + t = w->word->word; + if (t == 0 || *t == '\0') + fprintf (xtrace_fp, "''%s", w->next ? " " : ""); + else if (xtflags & 2) + fprintf (xtrace_fp, "%s%s", t, w->next ? " " : ""); + else if (sh_contains_shell_metas (t)) + { + x = sh_single_quote (t); + fprintf (xtrace_fp, "%s%s", x, w->next ? " " : ""); + free (x); + } + else if (ansic_shouldquote (t)) + { + x = ansic_quote (t, 0, (int *)0); + fprintf (xtrace_fp, "%s%s", x, w->next ? " " : ""); + free (x); + } + else + fprintf (xtrace_fp, "%s%s", t, w->next ? " " : ""); + } + fprintf (xtrace_fp, "\n"); + fflush (xtrace_fp); +} + +static void +command_print_word_list (list, separator) + WORD_LIST *list; + char *separator; +{ + _print_word_list (list, separator, cprintf); +} + +void +print_for_command_head (for_command) + FOR_COM *for_command; +{ + cprintf ("for %s in ", for_command->name->word); + command_print_word_list (for_command->map_list, " "); +} + +void +xtrace_print_for_command_head (for_command) + FOR_COM *for_command; +{ + CHECK_XTRACE_FP; + fprintf (xtrace_fp, "%s", indirection_level_string ()); + fprintf (xtrace_fp, "for %s in ", for_command->name->word); + xtrace_print_word_list (for_command->map_list, 2); +} + +static void +print_for_command (for_command) + FOR_COM *for_command; +{ + print_for_command_head (for_command); + cprintf (";"); + newline ("do\n"); + + indentation += indentation_amount; + make_command_string_internal (for_command->action); + PRINT_DEFERRED_HEREDOCS (""); + semicolon (); + indentation -= indentation_amount; + + newline ("done"); +} + +#if defined (ARITH_FOR_COMMAND) +static void +print_arith_for_command (arith_for_command) + ARITH_FOR_COM *arith_for_command; +{ + cprintf ("for (("); + command_print_word_list (arith_for_command->init, " "); + cprintf ("; "); + command_print_word_list (arith_for_command->test, " "); + cprintf ("; "); + command_print_word_list (arith_for_command->step, " "); + cprintf ("))"); + newline ("do\n"); + indentation += indentation_amount; + make_command_string_internal (arith_for_command->action); + PRINT_DEFERRED_HEREDOCS (""); + semicolon (); + indentation -= indentation_amount; + newline ("done"); +} +#endif /* ARITH_FOR_COMMAND */ + +#if defined (SELECT_COMMAND) +void +print_select_command_head (select_command) + SELECT_COM *select_command; +{ + cprintf ("select %s in ", select_command->name->word); + command_print_word_list (select_command->map_list, " "); +} + +void +xtrace_print_select_command_head (select_command) + SELECT_COM *select_command; +{ + CHECK_XTRACE_FP; + fprintf (xtrace_fp, "%s", indirection_level_string ()); + fprintf (xtrace_fp, "select %s in ", select_command->name->word); + xtrace_print_word_list (select_command->map_list, 2); +} + +static void +print_select_command (select_command) + SELECT_COM *select_command; +{ + print_select_command_head (select_command); + + cprintf (";"); + newline ("do\n"); + indentation += indentation_amount; + make_command_string_internal (select_command->action); + PRINT_DEFERRED_HEREDOCS (""); + semicolon (); + indentation -= indentation_amount; + newline ("done"); +} +#endif /* SELECT_COMMAND */ + +static void +print_group_command (group_command) + GROUP_COM *group_command; +{ + group_command_nesting++; + cprintf ("{ "); + + if (inside_function_def == 0) + skip_this_indent++; + else + { + /* This is a group command { ... } inside of a function + definition, and should be printed as a multiline group + command, using the current indentation. */ + cprintf ("\n"); + indentation += indentation_amount; + } + + make_command_string_internal (group_command->command); + PRINT_DEFERRED_HEREDOCS (""); + + if (inside_function_def) + { + cprintf ("\n"); + indentation -= indentation_amount; + indent (indentation); + } + else + { + semicolon (); + cprintf (" "); + } + + cprintf ("}"); + + group_command_nesting--; +} + +void +print_case_command_head (case_command) + CASE_COM *case_command; +{ + cprintf ("case %s in ", case_command->word->word); +} + +void +xtrace_print_case_command_head (case_command) + CASE_COM *case_command; +{ + CHECK_XTRACE_FP; + fprintf (xtrace_fp, "%s", indirection_level_string ()); + fprintf (xtrace_fp, "case %s in\n", case_command->word->word); +} + +static void +print_case_command (case_command) + CASE_COM *case_command; +{ + print_case_command_head (case_command); + + if (case_command->clauses) + print_case_clauses (case_command->clauses); + newline ("esac"); +} + +static void +print_case_clauses (clauses) + PATTERN_LIST *clauses; +{ + indentation += indentation_amount; + while (clauses) + { + newline (""); + command_print_word_list (clauses->patterns, " | "); + cprintf (")\n"); + indentation += indentation_amount; + make_command_string_internal (clauses->action); + indentation -= indentation_amount; + PRINT_DEFERRED_HEREDOCS (""); + if (clauses->flags & CASEPAT_FALLTHROUGH) + newline (";&"); + else if (clauses->flags & CASEPAT_TESTNEXT) + newline (";;&"); + else + newline (";;"); + clauses = clauses->next; + } + indentation -= indentation_amount; +} + +static void +print_while_command (while_command) + WHILE_COM *while_command; +{ + print_until_or_while (while_command, "while"); +} + +static void +print_until_command (while_command) + WHILE_COM *while_command; +{ + print_until_or_while (while_command, "until"); +} + +static void +print_until_or_while (while_command, which) + WHILE_COM *while_command; + char *which; +{ + cprintf ("%s ", which); + skip_this_indent++; + make_command_string_internal (while_command->test); + PRINT_DEFERRED_HEREDOCS (""); + semicolon (); + cprintf (" do\n"); /* was newline ("do\n"); */ + indentation += indentation_amount; + make_command_string_internal (while_command->action); + PRINT_DEFERRED_HEREDOCS (""); + indentation -= indentation_amount; + semicolon (); + newline ("done"); +} + +static void +print_if_command (if_command) + IF_COM *if_command; +{ + cprintf ("if "); + skip_this_indent++; + make_command_string_internal (if_command->test); + semicolon (); + cprintf (" then\n"); + indentation += indentation_amount; + make_command_string_internal (if_command->true_case); + PRINT_DEFERRED_HEREDOCS (""); + indentation -= indentation_amount; + + if (if_command->false_case) + { + semicolon (); + newline ("else\n"); + indentation += indentation_amount; + make_command_string_internal (if_command->false_case); + PRINT_DEFERRED_HEREDOCS (""); + indentation -= indentation_amount; + } + semicolon (); + newline ("fi"); +} + +#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) +void +print_arith_command (arith_cmd_list) + WORD_LIST *arith_cmd_list; +{ + cprintf ("(("); + command_print_word_list (arith_cmd_list, " "); + cprintf ("))"); +} +#endif + +#if defined (COND_COMMAND) +static void +print_cond_node (cond) + COND_COM *cond; +{ + if (cond->flags & CMD_INVERT_RETURN) + cprintf ("! "); + + if (cond->type == COND_EXPR) + { + cprintf ("( "); + print_cond_node (cond->left); + cprintf (" )"); + } + else if (cond->type == COND_AND) + { + print_cond_node (cond->left); + cprintf (" && "); + print_cond_node (cond->right); + } + else if (cond->type == COND_OR) + { + print_cond_node (cond->left); + cprintf (" || "); + print_cond_node (cond->right); + } + else if (cond->type == COND_UNARY) + { + cprintf ("%s", cond->op->word); + cprintf (" "); + print_cond_node (cond->left); + } + else if (cond->type == COND_BINARY) + { + print_cond_node (cond->left); + cprintf (" "); + cprintf ("%s", cond->op->word); + cprintf (" "); + print_cond_node (cond->right); + } + else if (cond->type == COND_TERM) + { + cprintf ("%s", cond->op->word); /* need to add quoting here */ + } +} + +void +print_cond_command (cond) + COND_COM *cond; +{ + cprintf ("[[ "); + print_cond_node (cond); + cprintf (" ]]"); +} + +#ifdef DEBUG +void +debug_print_word_list (s, list, sep) + char *s; + WORD_LIST *list; + char *sep; +{ + WORD_LIST *w; + + if (s) + fprintf (stderr, "%s: ", s); + for (w = list; w; w = w->next) + fprintf (stderr, "%s%s", w->word->word, w->next ? sep : ""); + fprintf (stderr, "\n"); +} + +void +debug_print_cond_command (cond) + COND_COM *cond; +{ + fprintf (stderr, "DEBUG: "); + command_string_index = 0; + print_cond_command (cond); + fprintf (stderr, "%s\n", the_printed_command); +} +#endif + +void +xtrace_print_cond_term (type, invert, op, arg1, arg2) + int type, invert; + WORD_DESC *op; + char *arg1, *arg2; +{ + CHECK_XTRACE_FP; + command_string_index = 0; + fprintf (xtrace_fp, "%s", indirection_level_string ()); + fprintf (xtrace_fp, "[[ "); + if (invert) + fprintf (xtrace_fp, "! "); + + if (type == COND_UNARY) + { + fprintf (xtrace_fp, "%s ", op->word); + fprintf (xtrace_fp, "%s", (arg1 && *arg1) ? arg1 : "''"); + } + else if (type == COND_BINARY) + { + fprintf (xtrace_fp, "%s", (arg1 && *arg1) ? arg1 : "''"); + fprintf (xtrace_fp, " %s ", op->word); + fprintf (xtrace_fp, "%s", (arg2 && *arg2) ? arg2 : "''"); + } + + fprintf (xtrace_fp, " ]]\n"); + + fflush (xtrace_fp); +} +#endif /* COND_COMMAND */ + +#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) +/* A function to print the words of an arithmetic command when set -x is on. */ +void +xtrace_print_arith_cmd (list) + WORD_LIST *list; +{ + WORD_LIST *w; + + CHECK_XTRACE_FP; + fprintf (xtrace_fp, "%s", indirection_level_string ()); + fprintf (xtrace_fp, "(( "); + for (w = list; w; w = w->next) + fprintf (xtrace_fp, "%s%s", w->word->word, w->next ? " " : ""); + fprintf (xtrace_fp, " ))\n"); + + fflush (xtrace_fp); +} +#endif + +void +print_simple_command (simple_command) + SIMPLE_COM *simple_command; +{ + command_print_word_list (simple_command->words, " "); + + if (simple_command->redirects) + { + cprintf (" "); + print_redirection_list (simple_command->redirects); + } +} + +static void +print_heredocs (heredocs) + REDIRECT *heredocs; +{ + REDIRECT *hdtail; + + cprintf (" "); + for (hdtail = heredocs; hdtail; hdtail = hdtail->next) + { + print_redirection (hdtail); + cprintf ("\n"); + } + was_heredoc = 1; +} + +static void +print_heredoc_bodies (heredocs) + REDIRECT *heredocs; +{ + REDIRECT *hdtail; + + cprintf ("\n"); + for (hdtail = heredocs; hdtail; hdtail = hdtail->next) + { + print_heredoc_body (hdtail); + cprintf ("\n"); + } + was_heredoc = 1; +} + +/* Print heredocs that are attached to the command before the connector + represented by CSTRING. The parsing semantics require us to print the + here-doc delimiters, then the connector (CSTRING), then the here-doc + bodies. We print the here-doc delimiters in print_redirection_list + and print the connector and the bodies here. We don't print the connector + if it's a `;', but we use it to note not to print an extra space after the + last heredoc body and newline. */ +static void +print_deferred_heredocs (cstring) + const char *cstring; +{ + /* We now print the heredoc headers in print_redirection_list */ + if (cstring && cstring[0] && (cstring[0] != ';' || cstring[1])) + cprintf ("%s", cstring); + if (deferred_heredocs) + { + print_heredoc_bodies (deferred_heredocs); + if (cstring && cstring[0] && (cstring[0] != ';' || cstring[1])) + cprintf (" "); /* make sure there's at least one space */ + dispose_redirects (deferred_heredocs); + was_heredoc = 1; + } + deferred_heredocs = (REDIRECT *)NULL; +} + +static void +print_redirection_list (redirects) + REDIRECT *redirects; +{ + REDIRECT *heredocs, *hdtail, *newredir; + char *rw; + + heredocs = (REDIRECT *)NULL; + hdtail = heredocs; + + was_heredoc = 0; + while (redirects) + { + /* Defer printing the here document bodiess until we've printed the rest of the + redirections, but print the headers in the order they're given. */ + if (redirects->instruction == r_reading_until || redirects->instruction == r_deblank_reading_until) + { + newredir = copy_redirect (redirects); + newredir->next = (REDIRECT *)NULL; + + print_heredoc_header (newredir); + + if (heredocs) + { + hdtail->next = newredir; + hdtail = newredir; + } + else + hdtail = heredocs = newredir; + } + else if (redirects->instruction == r_duplicating_output_word && (redirects->flags & REDIR_VARASSIGN) == 0 && redirects->redirector.dest == 1) + { + /* Temporarily translate it as the execution code does. */ + rw = redirects->redirectee.filename->word; + if (rw && *rw != '-' && DIGIT (*rw) == 0 && EXPCHAR (*rw) == 0) + redirects->instruction = r_err_and_out; + print_redirection (redirects); + redirects->instruction = r_duplicating_output_word; + } + else + print_redirection (redirects); + + redirects = redirects->next; + if (redirects) + cprintf (" "); + } + + /* Now that we've printed all the other redirections (on one line), + print the here documents. If we're printing a connection, we wait until + we print the connector symbol, then we print the here document bodies */ + if (heredocs && printing_connection) + deferred_heredocs = heredocs; + else if (heredocs) + { + print_heredoc_bodies (heredocs); + dispose_redirects (heredocs); + } +} + +static void +print_heredoc_header (redirect) + REDIRECT *redirect; +{ + int kill_leading; + char *x; + + kill_leading = redirect->instruction == r_deblank_reading_until; + + /* Here doc header */ + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}", redirect->redirector.filename->word); + else if (redirect->redirector.dest != 0) + cprintf ("%d", redirect->redirector.dest); + + /* If the here document delimiter is quoted, single-quote it. */ + if (redirect->redirectee.filename->flags & W_QUOTED) + { + x = sh_single_quote (redirect->here_doc_eof); + cprintf ("<<%s%s", kill_leading ? "-" : "", x); + free (x); + } + else + cprintf ("<<%s%s", kill_leading ? "-" : "", redirect->here_doc_eof); +} + +static void +print_heredoc_body (redirect) + REDIRECT *redirect; +{ + /* Here doc body */ + cprintf ("%s%s", redirect->redirectee.filename->word, redirect->here_doc_eof); +} + +static void +print_redirection (redirect) + REDIRECT *redirect; +{ + int redirector, redir_fd; + WORD_DESC *redirectee, *redir_word; + + redirectee = redirect->redirectee.filename; + redir_fd = redirect->redirectee.dest; + + redir_word = redirect->redirector.filename; + redirector = redirect->redirector.dest; + + switch (redirect->instruction) + { + case r_input_direction: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}", redir_word->word); + else if (redirector != 0) + cprintf ("%d", redirector); + cprintf ("< %s", redirectee->word); + break; + + case r_output_direction: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}", redir_word->word); + else if (redirector != 1) + cprintf ("%d", redirector); + cprintf ("> %s", redirectee->word); + break; + + case r_inputa_direction: /* Redirection created by the shell. */ + cprintf ("&"); + break; + + case r_output_force: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}", redir_word->word); + else if (redirector != 1) + cprintf ("%d", redirector); + cprintf (">| %s", redirectee->word); + break; + + case r_appending_to: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}", redir_word->word); + else if (redirector != 1) + cprintf ("%d", redirector); + cprintf (">> %s", redirectee->word); + break; + + case r_input_output: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}", redir_word->word); + else if (redirector != 1) + cprintf ("%d", redirector); + cprintf ("<> %s", redirectee->word); + break; + + case r_deblank_reading_until: + case r_reading_until: + print_heredoc_header (redirect); + cprintf ("\n"); + print_heredoc_body (redirect); + break; + + case r_reading_string: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}", redir_word->word); + else if (redirector != 0) + cprintf ("%d", redirector); +#if 0 + /* Don't need to check whether or not to requote, since original quotes + are still intact. The only thing that has happened is that $'...' + has been replaced with 'expanded ...'. */ + if (ansic_shouldquote (redirect->redirectee.filename->word)) + { + char *x; + x = ansic_quote (redirect->redirectee.filename->word, 0, (int *)0); + cprintf ("<<< %s", x); + free (x); + } + else +#endif + cprintf ("<<< %s", redirect->redirectee.filename->word); + break; + + case r_duplicating_input: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}<&%d", redir_word->word, redir_fd); + else + cprintf ("%d<&%d", redirector, redir_fd); + break; + + case r_duplicating_output: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}>&%d", redir_word->word, redir_fd); + else + cprintf ("%d>&%d", redirector, redir_fd); + break; + + case r_duplicating_input_word: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}<&%s", redir_word->word, redirectee->word); + else + cprintf ("%d<&%s", redirector, redirectee->word); + break; + + case r_duplicating_output_word: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}>&%s", redir_word->word, redirectee->word); + else + cprintf ("%d>&%s", redirector, redirectee->word); + break; + + case r_move_input: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}<&%d-", redir_word->word, redir_fd); + else + cprintf ("%d<&%d-", redirector, redir_fd); + break; + + case r_move_output: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}>&%d-", redir_word->word, redir_fd); + else + cprintf ("%d>&%d-", redirector, redir_fd); + break; + + case r_move_input_word: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}<&%s-", redir_word->word, redirectee->word); + else + cprintf ("%d<&%s-", redirector, redirectee->word); + break; + + case r_move_output_word: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}>&%s-", redir_word->word, redirectee->word); + else + cprintf ("%d>&%s-", redirector, redirectee->word); + break; + + case r_close_this: + if (redirect->rflags & REDIR_VARASSIGN) + cprintf ("{%s}>&-", redir_word->word); + else + cprintf ("%d>&-", redirector); + break; + + case r_err_and_out: + cprintf ("&> %s", redirectee->word); + break; + + case r_append_err_and_out: + cprintf ("&>> %s", redirectee->word); + break; + } +} + +static void +reset_locals () +{ + inside_function_def = 0; + indentation = 0; + printing_connection = 0; + deferred_heredocs = 0; +} + +static void +print_function_def (func) + FUNCTION_DEF *func; +{ + COMMAND *cmdcopy; + REDIRECT *func_redirects; + + func_redirects = NULL; + /* When in posix mode, print functions as posix specifies them. */ + if (posixly_correct == 0) + cprintf ("function %s () \n", func->name->word); + else + cprintf ("%s () \n", func->name->word); + add_unwind_protect (reset_locals, 0); + + indent (indentation); + cprintf ("{ \n"); + + inside_function_def++; + indentation += indentation_amount; + + cmdcopy = copy_command (func->command); + if (cmdcopy->type == cm_group) + { + func_redirects = cmdcopy->redirects; + cmdcopy->redirects = (REDIRECT *)NULL; + } + make_command_string_internal (cmdcopy->type == cm_group + ? cmdcopy->value.Group->command + : cmdcopy); + PRINT_DEFERRED_HEREDOCS (""); + + remove_unwind_protect (); + indentation -= indentation_amount; + inside_function_def--; + + if (func_redirects) + { /* { */ + newline ("} "); + print_redirection_list (func_redirects); + cmdcopy->redirects = func_redirects; + } + else + newline ("}"); + + dispose_command (cmdcopy); +} + +/* Return the string representation of the named function. + NAME is the name of the function. + COMMAND is the function body. It should be a GROUP_COM. + flags&FUNC_MULTILINE is non-zero to pretty-print, or zero for all on one line. + flags&FUNC_EXTERNAL means convert from internal to external form + */ +char * +named_function_string (name, command, flags) + char *name; + COMMAND *command; + int flags; +{ + char *result; + int old_indent, old_amount; + COMMAND *cmdcopy; + REDIRECT *func_redirects; + + old_indent = indentation; + old_amount = indentation_amount; + command_string_index = was_heredoc = 0; + deferred_heredocs = 0; + + if (name && *name) + { + if (find_reserved_word (name) >= 0) + cprintf ("function "); + cprintf ("%s ", name); + } + + cprintf ("() "); + + if ((flags & FUNC_MULTILINE) == 0) + { + indentation = 1; + indentation_amount = 0; + } + else + { + cprintf ("\n"); + indentation += indentation_amount; + } + + inside_function_def++; + + cprintf ((flags & FUNC_MULTILINE) ? "{ \n" : "{ "); + + cmdcopy = copy_command (command); + /* Take any redirections specified in the function definition (which should + apply to the function as a whole) and save them for printing later. */ + func_redirects = (REDIRECT *)NULL; + if (cmdcopy->type == cm_group) + { + func_redirects = cmdcopy->redirects; + cmdcopy->redirects = (REDIRECT *)NULL; + } + make_command_string_internal (cmdcopy->type == cm_group + ? cmdcopy->value.Group->command + : cmdcopy); + PRINT_DEFERRED_HEREDOCS (""); + + indentation = old_indent; + indentation_amount = old_amount; + inside_function_def--; + + if (func_redirects) + { /* { */ + newline ("} "); + print_redirection_list (func_redirects); + cmdcopy->redirects = func_redirects; + } + else + newline ("}"); + + result = the_printed_command; + + if ((flags & FUNC_MULTILINE) == 0) + { +#if 0 + register int i; + for (i = 0; result[i]; i++) + if (result[i] == '\n') + { + strcpy (result + i, result + i + 1); + --i; + } +#else + if (result[2] == '\n') /* XXX -- experimental */ + memmove (result + 2, result + 3, strlen (result) - 2); +#endif + } + + dispose_command (cmdcopy); + + if (flags & FUNC_EXTERNAL) + result = remove_quoted_escapes (result); + + return (result); +} + +static void +newline (string) + char *string; +{ + cprintf ("\n"); + indent (indentation); + if (string && *string) + cprintf ("%s", string); +} + +static char *indentation_string; +static int indentation_size; + +static void +indent (amount) + int amount; +{ + register int i; + + RESIZE_MALLOCED_BUFFER (indentation_string, 0, amount, indentation_size, 16); + + for (i = 0; amount > 0; amount--) + indentation_string[i++] = ' '; + indentation_string[i] = '\0'; + cprintf ("%s", indentation_string); +} + +static void +semicolon () +{ + if (command_string_index > 0 && + (the_printed_command[command_string_index - 1] == '&' || + the_printed_command[command_string_index - 1] == '\n')) + return; + cprintf (";"); +} + +/* How to make the string. */ +static void +#if defined (PREFER_STDARG) +cprintf (const char *control, ...) +#else +cprintf (control, va_alist) + const char *control; + va_dcl +#endif +{ + register const char *s; + char char_arg[2], *argp, intbuf[INT_STRLEN_BOUND (unsigned int) + 1]; + int digit_arg, arg_len, c; + va_list args; + + SH_VA_START (args, control); + + arg_len = strlen (control); + the_printed_command_resize (arg_len + 1); + + char_arg[1] = '\0'; + s = control; + while (s && *s) + { + c = *s++; + argp = (char *)NULL; + if (c != '%' || !*s) + { + char_arg[0] = c; + argp = char_arg; + arg_len = 1; + } + else + { + c = *s++; + switch (c) + { + case '%': + char_arg[0] = c; + argp = char_arg; + arg_len = 1; + break; + + case 's': + argp = va_arg (args, char *); + arg_len = strlen (argp); + break; + + case 'd': + /* Represent an out-of-range file descriptor with an out-of-range + integer value. We can do this because the only use of `%d' in + the calls to cprintf is to output a file descriptor number for + a redirection. */ + digit_arg = va_arg (args, int); + if (digit_arg < 0) + { + sprintf (intbuf, "%u", (unsigned int)-1); + argp = intbuf; + } + else + argp = inttostr (digit_arg, intbuf, sizeof (intbuf)); + arg_len = strlen (argp); + break; + + case 'c': + char_arg[0] = va_arg (args, int); + argp = char_arg; + arg_len = 1; + break; + + default: + programming_error (_("cprintf: `%c': invalid format character"), c); + /*NOTREACHED*/ + } + } + + if (argp && arg_len) + { + the_printed_command_resize (arg_len + 1); + FASTCOPY (argp, the_printed_command + command_string_index, arg_len); + command_string_index += arg_len; + } + } + + va_end (args); + + the_printed_command[command_string_index] = '\0'; +} + +/* Ensure that there is enough space to stuff LENGTH characters into + THE_PRINTED_COMMAND. */ +static void +the_printed_command_resize (length) + int length; +{ + if (the_printed_command == 0) + { + the_printed_command_size = (length + PRINTED_COMMAND_INITIAL_SIZE - 1) & ~(PRINTED_COMMAND_INITIAL_SIZE - 1); + the_printed_command = (char *)xmalloc (the_printed_command_size); + command_string_index = 0; + } + else if ((command_string_index + length) >= the_printed_command_size) + { + int new; + new = command_string_index + length + 1; + + /* Round up to the next multiple of PRINTED_COMMAND_GROW_SIZE. */ + new = (new + PRINTED_COMMAND_GROW_SIZE - 1) & ~(PRINTED_COMMAND_GROW_SIZE - 1); + the_printed_command_size = new; + + the_printed_command = (char *)xrealloc (the_printed_command, the_printed_command_size); + } +} + +#if defined (HAVE_VPRINTF) +/* ``If vprintf is available, you may assume that vfprintf and vsprintf are + also available.'' */ + +static void +#if defined (PREFER_STDARG) +xprintf (const char *format, ...) +#else +xprintf (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + SH_VA_START (args, format); + + vfprintf (stdout, format, args); + va_end (args); +} + +#else + +static void +xprintf (format, arg1, arg2, arg3, arg4, arg5) + const char *format; +{ + printf (format, arg1, arg2, arg3, arg4, arg5); +} + +#endif /* !HAVE_VPRINTF */ diff --git a/bash-5.1/quit.h b/bash-5.1/quit.h new file mode 100644 index 0000000000000000000000000000000000000000..db8a776b595d780ea1734309c283446bd7b44674 --- /dev/null +++ b/bash-5.1/quit.h @@ -0,0 +1,81 @@ +/* quit.h -- How to handle SIGINT gracefully. */ + +/* Copyright (C) 1993-2013 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_QUIT_H_) +#define _QUIT_H_ + +#include "sig.h" /* for sig_atomic_t */ + +/* Non-zero means SIGINT has already occurred. */ +extern volatile sig_atomic_t interrupt_state; +extern volatile sig_atomic_t terminating_signal; + +/* Macro to call a great deal. SIGINT just sets the interrupt_state variable. + When it is safe, put QUIT in the code, and the "interrupt" will take + place. The same scheme is used for terminating signals (e.g., SIGHUP) + and the terminating_signal variable. That calls a function which will + end up exiting the shell. */ +#define QUIT \ + do { \ + if (terminating_signal) termsig_handler (terminating_signal); \ + if (interrupt_state) throw_to_top_level (); \ + } while (0) + +#define CHECK_ALRM \ + do { \ + if (sigalrm_seen) \ + sh_longjmp (alrmbuf, 1); \ + } while (0) + +#define SETINTERRUPT interrupt_state = 1 +#define CLRINTERRUPT interrupt_state = 0 + +#define ADDINTERRUPT interrupt_state++ +#define DELINTERRUPT interrupt_state-- + +#define ISINTERRUPT interrupt_state != 0 + +/* The same sort of thing, this time just for signals that would ordinarily + cause the shell to terminate. */ + +#define CHECK_TERMSIG \ + do { \ + if (terminating_signal) termsig_handler (terminating_signal); \ + } while (0) + +#define LASTSIG() \ + (terminating_signal ? terminating_signal : (interrupt_state ? SIGINT : 0)) + +#define CHECK_WAIT_INTR \ + do { \ + if (wait_intr_flag && wait_signal_received && this_shell_builtin && (this_shell_builtin == wait_builtin)) \ + sh_longjmp (wait_intr_buf, 1); \ + } while (0) + +#define RESET_SIGTERM \ + do { \ + sigterm_received = 0; \ + } while (0) + +#define CHECK_SIGTERM \ + do { \ + if (sigterm_received) termsig_handler (SIGTERM); \ + } while (0) +#endif /* _QUIT_H_ */ diff --git a/bash-5.1/redir.c b/bash-5.1/redir.c new file mode 100644 index 0000000000000000000000000000000000000000..fa92b4d4179ca5c7dc7d30c99657e064519f17b0 --- /dev/null +++ b/bash-5.1/redir.c @@ -0,0 +1,1505 @@ +/* redir.c -- Functions to perform input and output redirection. */ + +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX) + #pragma alloca +#endif /* _AIX && RISC6000 && !__GNUC__ */ + +#include +#include "bashtypes.h" +#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include "filecntl.h" +#include "posixstat.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#if !defined (errno) +extern int errno; +#endif + +#include "bashansi.h" +#include "bashintl.h" +#include "memalloc.h" + +#define NEED_FPURGE_DECL + +#include "shell.h" +#include "flags.h" +#include "execute_cmd.h" +#include "redir.h" +#include "trap.h" + +#if defined (BUFFERED_INPUT) +# include "input.h" +#endif + +#include "builtins/pipesize.h" + +/* FreeBSD 13 can reliably handle atomic writes at this capacity without + hanging. */ +#if __FreeBSD__ && !defined (HEREDOC_PIPESIZE) +# define HEREDOC_PIPESIZE 4096 +#endif + +/* Normally set by a build process command that computes pipe capacity */ +#ifndef PIPESIZE +# ifdef PIPE_BUF +# define PIPESIZE PIPE_BUF +# else +# define PIPESIZE 4096 +# endif +#endif + +#ifndef HEREDOC_PIPESIZE +# define HEREDOC_PIPESIZE PIPESIZE +#endif + +#if defined (HEREDOC_PIPEMAX) +# if HEREDOC_PIPESIZE > HEREDOC_PIPEMAX +# define HEREDOC_PIPESIZE HEREDOC_PIPEMAX +# endif +#endif + +#define SHELL_FD_BASE 10 + +int expanding_redir; + +extern REDIRECT *redirection_undo_list; +extern REDIRECT *exec_redirection_undo_list; + +/* Static functions defined and used in this file. */ +static void add_exec_redirect PARAMS((REDIRECT *)); +static int add_undo_redirect PARAMS((int, enum r_instruction, int)); +static int add_undo_close_redirect PARAMS((int)); +static int expandable_redirection_filename PARAMS((REDIRECT *)); +static int stdin_redirection PARAMS((enum r_instruction, int)); +static int undoablefd PARAMS((int)); +static int do_redirection_internal PARAMS((REDIRECT *, int, char **)); + +static char *heredoc_expand PARAMS((WORD_DESC *, enum r_instruction, size_t *)); +static int heredoc_write PARAMS((int, char *, size_t)); +static int here_document_to_fd PARAMS((WORD_DESC *, enum r_instruction)); + +static int redir_special_open PARAMS((int, char *, int, int, enum r_instruction)); +static int noclobber_open PARAMS((char *, int, int, enum r_instruction)); +static int redir_open PARAMS((char *, int, int, enum r_instruction)); + +static int redir_varassign PARAMS((REDIRECT *, int)); +static int redir_varvalue PARAMS((REDIRECT *)); + +/* Spare redirector used when translating [N]>&WORD[-] or [N]<&WORD[-] to + a new redirection and when creating the redirection undo list. */ +static REDIRECTEE rd; + +/* Set to errno when a here document cannot be created for some reason. + Used to print a reasonable error message. */ +static int heredoc_errno; + +#define REDIRECTION_ERROR(r, e, fd) \ +do { \ + if ((r) < 0) \ + { \ + if (fd >= 0) \ + close (fd); \ + set_exit_status (EXECUTION_FAILURE);\ + return ((e) == 0 ? EINVAL : (e));\ + } \ +} while (0) + +void +redirection_error (temp, error, fn) + REDIRECT *temp; + int error; + char *fn; /* already-expanded filename */ +{ + char *filename, *allocname; + int oflags; + + allocname = 0; + if ((temp->rflags & REDIR_VARASSIGN) && error < 0) + filename = allocname = savestring (temp->redirector.filename->word); + else if ((temp->rflags & REDIR_VARASSIGN) == 0 && temp->redirector.dest < 0) + /* This can happen when read_token_word encounters overflow, like in + exec 4294967297>x */ + filename = _("file descriptor out of range"); +#ifdef EBADF + /* This error can never involve NOCLOBBER */ + else if (error != NOCLOBBER_REDIRECT && temp->redirector.dest >= 0 && error == EBADF) + { + /* If we're dealing with two file descriptors, we have to guess about + which one is invalid; in the cases of r_{duplicating,move}_input and + r_{duplicating,move}_output we're here because dup2() failed. */ + switch (temp->instruction) + { + case r_duplicating_input: + case r_duplicating_output: + case r_move_input: + case r_move_output: + filename = allocname = itos (temp->redirectee.dest); + break; + case r_duplicating_input_word: + if (temp->redirector.dest == 0) /* Guess */ + filename = temp->redirectee.filename->word; /* XXX */ + else + filename = allocname = itos (temp->redirector.dest); + break; + case r_duplicating_output_word: + if (temp->redirector.dest == 1) /* Guess */ + filename = temp->redirectee.filename->word; /* XXX */ + else + filename = allocname = itos (temp->redirector.dest); + break; + default: + filename = allocname = itos (temp->redirector.dest); + break; + } + } +#endif + else if (fn) + filename = fn; + else if (expandable_redirection_filename (temp)) + { + oflags = temp->redirectee.filename->flags; + if (posixly_correct && interactive_shell == 0) + temp->redirectee.filename->flags |= W_NOGLOB; + temp->redirectee.filename->flags |= W_NOCOMSUB; + filename = allocname = redirection_expand (temp->redirectee.filename); + temp->redirectee.filename->flags = oflags; + if (filename == 0) + filename = temp->redirectee.filename->word; + } + else if (temp->redirectee.dest < 0) + filename = _("file descriptor out of range"); + else + filename = allocname = itos (temp->redirectee.dest); + + switch (error) + { + case AMBIGUOUS_REDIRECT: + internal_error (_("%s: ambiguous redirect"), filename); + break; + + case NOCLOBBER_REDIRECT: + internal_error (_("%s: cannot overwrite existing file"), filename); + break; + +#if defined (RESTRICTED_SHELL) + case RESTRICTED_REDIRECT: + internal_error (_("%s: restricted: cannot redirect output"), filename); + break; +#endif /* RESTRICTED_SHELL */ + + case HEREDOC_REDIRECT: + internal_error (_("cannot create temp file for here-document: %s"), strerror (heredoc_errno)); + break; + + case BADVAR_REDIRECT: + internal_error (_("%s: cannot assign fd to variable"), filename); + break; + + default: + internal_error ("%s: %s", filename, strerror (error)); + break; + } + + FREE (allocname); +} + +/* Perform the redirections on LIST. If flags & RX_ACTIVE, then actually + make input and output file descriptors, otherwise just do whatever is + necessary for side effecting. flags & RX_UNDOABLE says to remember + how to undo the redirections later, if non-zero. If flags & RX_CLEXEC + is non-zero, file descriptors opened in do_redirection () have their + close-on-exec flag set. */ +int +do_redirections (list, flags) + REDIRECT *list; + int flags; +{ + int error; + REDIRECT *temp; + char *fn; + + if (flags & RX_UNDOABLE) + { + if (redirection_undo_list) + { + dispose_redirects (redirection_undo_list); + redirection_undo_list = (REDIRECT *)NULL; + } + if (exec_redirection_undo_list) + dispose_exec_redirects (); + } + + for (temp = list; temp; temp = temp->next) + { + fn = 0; + error = do_redirection_internal (temp, flags, &fn); + if (error) + { + redirection_error (temp, error, fn); + FREE (fn); + return (error); + } + FREE (fn); + } + return (0); +} + +/* Return non-zero if the redirection pointed to by REDIRECT has a + redirectee.filename that can be expanded. */ +static int +expandable_redirection_filename (redirect) + REDIRECT *redirect; +{ + switch (redirect->instruction) + { + case r_output_direction: + case r_appending_to: + case r_input_direction: + case r_inputa_direction: + case r_err_and_out: + case r_append_err_and_out: + case r_input_output: + case r_output_force: + case r_duplicating_input_word: + case r_duplicating_output_word: + case r_move_input_word: + case r_move_output_word: + return 1; + + default: + return 0; + } +} + +/* Expand the word in WORD returning a string. If WORD expands to + multiple words (or no words), then return NULL. */ +char * +redirection_expand (word) + WORD_DESC *word; +{ + char *result; + WORD_LIST *tlist1, *tlist2; + WORD_DESC *w; + int old; + + w = copy_word (word); + if (posixly_correct) + w->flags |= W_NOSPLIT; + + tlist1 = make_word_list (w, (WORD_LIST *)NULL); + expanding_redir = 1; + /* Now that we've changed the variable search order to ignore the temp + environment, see if we need to change the cached IFS values. */ + sv_ifs ("IFS"); + tlist2 = expand_words_no_vars (tlist1); + expanding_redir = 0; + /* Now we need to change the variable search order back to include the temp + environment. We force the temp environment search by forcing + executing_builtin to 1. This is what makes `read' get the right values + for the IFS-related cached variables, for example. */ + old = executing_builtin; + executing_builtin = 1; + sv_ifs ("IFS"); + executing_builtin = old; + dispose_words (tlist1); + + if (tlist2 == 0 || tlist2->next) + { + /* We expanded to no words, or to more than a single word. + Dispose of the word list and return NULL. */ + if (tlist2) + dispose_words (tlist2); + return ((char *)NULL); + } + result = string_list (tlist2); /* XXX savestring (tlist2->word->word)? */ + dispose_words (tlist2); + return (result); +} + +/* Expand a here-document or here-string (determined by RI) contained in + REDIRECTEE and return the expanded document. If LENP is non-zero, put + the length of the returned string into *LENP. + + This captures everything about expanding here-documents and here-strings: + the returned document should be written directly to whatever file + descriptor is specified. In particular, it adds a newline to the end of + a here-string to preserve previous semantics. */ +static char * +heredoc_expand (redirectee, ri, lenp) + WORD_DESC *redirectee; + enum r_instruction ri; + size_t *lenp; +{ + char *document; + size_t dlen; + int old; + + if (redirectee->word == 0 || redirectee->word[0] == '\0') + { + if (lenp) + *lenp = 0; + return (redirectee->word); + } + + /* Quoted here documents are not expanded */ + if (ri != r_reading_string && (redirectee->flags & W_QUOTED)) + { + if (lenp) + *lenp = STRLEN (redirectee->word); + return (redirectee->word); + } + + expanding_redir = 1; + /* Now that we've changed the variable search order to ignore the temp + environment, see if we need to change the cached IFS values. */ + sv_ifs ("IFS"); + document = (ri == r_reading_string) ? expand_assignment_string_to_string (redirectee->word, 0) + : expand_string_to_string (redirectee->word, Q_HERE_DOCUMENT); + expanding_redir = 0; + /* Now we need to change the variable search order back to include the temp + environment. We force the temp environment search by forcing + executing_builtin to 1. This is what makes `read' get the right values + for the IFS-related cached variables, for example. */ + old = executing_builtin; + executing_builtin = 1; + sv_ifs ("IFS"); + executing_builtin = old; + + dlen = STRLEN (document); + /* XXX - Add trailing newline to here-string */ + if (ri == r_reading_string) + { + document = xrealloc (document, dlen + 2); + document[dlen++] = '\n'; + document[dlen] = '\0'; + } + if (lenp) + *lenp = dlen; + + return document; +} + +/* Write HEREDOC (of length HDLEN) to FD, returning 0 on success and ERRNO on + error. Don't handle interrupts. */ +static int +heredoc_write (fd, heredoc, herelen) + int fd; + char *heredoc; + size_t herelen; +{ + ssize_t nw; + int e; + + errno = 0; + nw = write (fd, heredoc, herelen); + e = errno; + if (nw != herelen) + { + if (e == 0) + e = ENOSPC; + return e; + } + return 0; +} + +/* Create a temporary file or pipe holding the text of the here document + pointed to by REDIRECTEE, and return a file descriptor open for reading + to it. Return -1 on any error, and make sure errno is set appropriately. */ +static int +here_document_to_fd (redirectee, ri) + WORD_DESC *redirectee; + enum r_instruction ri; +{ + char *filename; + int r, fd, fd2, herepipe[2]; + char *document; + size_t document_len; +#if HEREDOC_PARANOID + struct stat st1, st2; +#endif + + /* Expand the here-document/here-string first and then decide what to do. */ + document = heredoc_expand (redirectee, ri, &document_len); + + /* If we have a zero-length document, don't mess with a temp file */ + if (document_len == 0) + { + fd = open ("/dev/null", O_RDONLY); + r = errno; + if (document != redirectee->word) + FREE (document); + errno = r; + return fd; + } + +#if defined (HEREDOC_PIPESIZE) + /* Try to use a pipe internal to this process if the document is shorter + than the system's pipe capacity (computed at build time). We want to + write the entire document without write blocking. */ + if (document_len <= HEREDOC_PIPESIZE) + { + if (pipe (herepipe) < 0) + { + r = errno; + if (document != redirectee->word) + free (document); + errno = r; + return (-1); + } + +#if defined (F_GETPIPE_SZ) + if (fcntl (herepipe[1], F_GETPIPE_SZ, 0) < document_len) + goto use_tempfile; +#endif + + r = heredoc_write (herepipe[1], document, document_len); + if (document != redirectee->word) + free (document); + close (herepipe[1]); + if (r) /* write error */ + { + close (herepipe[0]); + errno = r; + return (-1); + } + return (herepipe[0]); + } +#endif + +use_tempfile: + + fd = sh_mktmpfd ("sh-thd", MT_USERANDOM|MT_USETMPDIR, &filename); + + /* If we failed for some reason other than the file existing, abort */ + if (fd < 0) + { + r = errno; + FREE (filename); + if (document != redirectee->word) + FREE (document); + errno = r; + return (fd); + } + + fchmod (fd, S_IRUSR | S_IWUSR); + SET_CLOSE_ON_EXEC (fd); + + errno = r = 0; /* XXX */ + r = heredoc_write (fd, document, document_len); + if (document != redirectee->word) + FREE (document); + + if (r) + { + close (fd); + unlink (filename); + free (filename); + errno = r; + return (-1); + } + + /* In an attempt to avoid races, we close the first fd only after opening + the second. */ + /* Make the document really temporary. Also make it the input. */ + fd2 = open (filename, O_RDONLY|O_BINARY, 0600); + + if (fd2 < 0) + { + r = errno; + unlink (filename); + free (filename); + close (fd); + errno = r; + return -1; + } + +#if HEREDOC_PARANOID + /* We can use same_file here to check whether or not fd and fd2 refer to + the same file, but we don't do that unless HEREDOC_PARANOID is defined. */ + if (fstat (fd, &st1) < 0 || S_ISREG (st1.st_mode) == 0 || + fstat (fd2, &st2) < 0 || S_ISREG (st2.st_mode) == 0 || + same_file (filename, filename, &st1, &st2) == 0) + { + unlink (filename); + free (filename); + close (fd); + close (fd2); + errno = EEXIST; + return -1; + } +#endif + + close (fd); + if (unlink (filename) < 0) + { + r = errno; + close (fd2); + free (filename); + errno = r; + return (-1); + } + + free (filename); + + fchmod (fd2, S_IRUSR); + return (fd2); +} + +#define RF_DEVFD 1 +#define RF_DEVSTDERR 2 +#define RF_DEVSTDIN 3 +#define RF_DEVSTDOUT 4 +#define RF_DEVTCP 5 +#define RF_DEVUDP 6 + +/* A list of pattern/value pairs for filenames that the redirection + code handles specially. */ +static STRING_INT_ALIST _redir_special_filenames[] = { +#if !defined (HAVE_DEV_FD) + { "/dev/fd/[0-9]*", RF_DEVFD }, +#endif +#if !defined (HAVE_DEV_STDIN) + { "/dev/stderr", RF_DEVSTDERR }, + { "/dev/stdin", RF_DEVSTDIN }, + { "/dev/stdout", RF_DEVSTDOUT }, +#endif +#if defined (NETWORK_REDIRECTIONS) + { "/dev/tcp/*/*", RF_DEVTCP }, + { "/dev/udp/*/*", RF_DEVUDP }, +#endif + { (char *)NULL, -1 } +}; + +static int +redir_special_open (spec, filename, flags, mode, ri) + int spec; + char *filename; + int flags, mode; + enum r_instruction ri; +{ + int fd; +#if !defined (HAVE_DEV_FD) + intmax_t lfd; +#endif + + fd = -1; + switch (spec) + { +#if !defined (HAVE_DEV_FD) + case RF_DEVFD: + if (all_digits (filename+8) && legal_number (filename+8, &lfd) && lfd == (int)lfd) + { + fd = lfd; + fd = fcntl (fd, F_DUPFD, SHELL_FD_BASE); + } + else + fd = AMBIGUOUS_REDIRECT; + break; +#endif + +#if !defined (HAVE_DEV_STDIN) + case RF_DEVSTDIN: + fd = fcntl (0, F_DUPFD, SHELL_FD_BASE); + break; + case RF_DEVSTDOUT: + fd = fcntl (1, F_DUPFD, SHELL_FD_BASE); + break; + case RF_DEVSTDERR: + fd = fcntl (2, F_DUPFD, SHELL_FD_BASE); + break; +#endif + +#if defined (NETWORK_REDIRECTIONS) + case RF_DEVTCP: + case RF_DEVUDP: +#if defined (RESTRICTED_SHELL) + if (restricted) + return (RESTRICTED_REDIRECT); +#endif +#if defined (HAVE_NETWORK) + fd = netopen (filename); +#else + internal_warning (_("/dev/(tcp|udp)/host/port not supported without networking")); + fd = open (filename, flags, mode); +#endif + break; +#endif /* NETWORK_REDIRECTIONS */ + } + + return fd; +} + +/* Open FILENAME with FLAGS in noclobber mode, hopefully avoiding most + race conditions and avoiding the problem where the file is replaced + between the stat(2) and open(2). */ +static int +noclobber_open (filename, flags, mode, ri) + char *filename; + int flags, mode; + enum r_instruction ri; +{ + int r, fd; + struct stat finfo, finfo2; + + /* If the file exists and is a regular file, return an error + immediately. */ + r = stat (filename, &finfo); + if (r == 0 && (S_ISREG (finfo.st_mode))) + return (NOCLOBBER_REDIRECT); + + /* If the file was not present (r != 0), make sure we open it + exclusively so that if it is created before we open it, our open + will fail. Make sure that we do not truncate an existing file. + Note that we don't turn on O_EXCL unless the stat failed -- if + the file was not a regular file, we leave O_EXCL off. */ + flags &= ~O_TRUNC; + if (r != 0) + { + fd = open (filename, flags|O_EXCL, mode); + return ((fd < 0 && errno == EEXIST) ? NOCLOBBER_REDIRECT : fd); + } + fd = open (filename, flags, mode); + + /* If the open failed, return the file descriptor right away. */ + if (fd < 0) + return (errno == EEXIST ? NOCLOBBER_REDIRECT : fd); + + /* OK, the open succeeded, but the file may have been changed from a + non-regular file to a regular file between the stat and the open. + We are assuming that the O_EXCL open handles the case where FILENAME + did not exist and is symlinked to an existing file between the stat + and open. */ + + /* If we can open it and fstat the file descriptor, and neither check + revealed that it was a regular file, and the file has not been replaced, + return the file descriptor. */ + if ((fstat (fd, &finfo2) == 0) && (S_ISREG (finfo2.st_mode) == 0) && + r == 0 && (S_ISREG (finfo.st_mode) == 0) && + same_file (filename, filename, &finfo, &finfo2)) + return fd; + + /* The file has been replaced. badness. */ + close (fd); + errno = EEXIST; + return (NOCLOBBER_REDIRECT); +} + +static int +redir_open (filename, flags, mode, ri) + char *filename; + int flags, mode; + enum r_instruction ri; +{ + int fd, r, e; + + r = find_string_in_alist (filename, _redir_special_filenames, 1); + if (r >= 0) + return (redir_special_open (r, filename, flags, mode, ri)); + + /* If we are in noclobber mode, you are not allowed to overwrite + existing files. Check before opening. */ + if (noclobber && CLOBBERING_REDIRECT (ri)) + { + fd = noclobber_open (filename, flags, mode, ri); + if (fd == NOCLOBBER_REDIRECT) + return (NOCLOBBER_REDIRECT); + } + else + { + do + { + fd = open (filename, flags, mode); + e = errno; + if (fd < 0 && e == EINTR) + { + QUIT; + run_pending_traps (); + } + errno = e; + } + while (fd < 0 && errno == EINTR); + +#if defined (AFS) + if ((fd < 0) && (errno == EACCES)) + { + fd = open (filename, flags & ~O_CREAT, mode); + errno = EACCES; /* restore errno */ + } +#endif /* AFS */ + } + + return fd; +} + +static int +undoablefd (fd) + int fd; +{ + int clexec; + + clexec = fcntl (fd, F_GETFD, 0); + if (clexec == -1 || (fd >= SHELL_FD_BASE && clexec == 1)) + return 0; + return 1; +} + +/* Do the specific redirection requested. Returns errno or one of the + special redirection errors (*_REDIRECT) in case of error, 0 on success. + If flags & RX_ACTIVE is zero, then just do whatever is necessary to + produce the appropriate side effects. flags & RX_UNDOABLE, if non-zero, + says to remember how to undo each redirection. If flags & RX_CLEXEC is + non-zero, then we set all file descriptors > 2 that we open to be + close-on-exec. FNP, if non-null is a pointer to a location where the + expanded filename is stored. The caller will free it. */ +static int +do_redirection_internal (redirect, flags, fnp) + REDIRECT *redirect; + int flags; + char **fnp; +{ + WORD_DESC *redirectee; + int redir_fd, fd, redirector, r, oflags; + intmax_t lfd; + char *redirectee_word; + enum r_instruction ri; + REDIRECT *new_redirect; + REDIRECTEE sd; + + redirectee = redirect->redirectee.filename; + redir_fd = redirect->redirectee.dest; + redirector = redirect->redirector.dest; + ri = redirect->instruction; + + if (redirect->flags & RX_INTERNAL) + flags |= RX_INTERNAL; + + if (TRANSLATE_REDIRECT (ri)) + { + /* We have [N]>&WORD[-] or [N]<&WORD[-] (or {V}>&WORD[-] or {V}<&WORD-). + and WORD, then translate the redirection into a new one and + continue. */ + redirectee_word = redirection_expand (redirectee); + + /* XXX - what to do with [N]<&$w- where w is unset or null? ksh93 + closes N. */ + if (redirectee_word == 0) + return (AMBIGUOUS_REDIRECT); + else if (redirectee_word[0] == '-' && redirectee_word[1] == '\0') + { + sd = redirect->redirector; + rd.dest = 0; + new_redirect = make_redirection (sd, r_close_this, rd, 0); + } + else if (all_digits (redirectee_word)) + { + sd = redirect->redirector; + if (legal_number (redirectee_word, &lfd) && (int)lfd == lfd) + rd.dest = lfd; + else + rd.dest = -1; /* XXX */ + switch (ri) + { + case r_duplicating_input_word: + new_redirect = make_redirection (sd, r_duplicating_input, rd, 0); + break; + case r_duplicating_output_word: + new_redirect = make_redirection (sd, r_duplicating_output, rd, 0); + break; + case r_move_input_word: + new_redirect = make_redirection (sd, r_move_input, rd, 0); + break; + case r_move_output_word: + new_redirect = make_redirection (sd, r_move_output, rd, 0); + break; + default: + break; /* shut up gcc */ + } + } + else if (ri == r_duplicating_output_word && (redirect->rflags & REDIR_VARASSIGN) == 0 && redirector == 1) + { + sd = redirect->redirector; + rd.filename = make_bare_word (redirectee_word); + new_redirect = make_redirection (sd, r_err_and_out, rd, 0); + } + else + { + free (redirectee_word); + return (AMBIGUOUS_REDIRECT); + } + + free (redirectee_word); + + /* Set up the variables needed by the rest of the function from the + new redirection. */ + if (new_redirect->instruction == r_err_and_out) + { + char *alloca_hack; + + /* Copy the word without allocating any memory that must be + explicitly freed. */ + redirectee = (WORD_DESC *)alloca (sizeof (WORD_DESC)); + xbcopy ((char *)new_redirect->redirectee.filename, + (char *)redirectee, sizeof (WORD_DESC)); + + alloca_hack = (char *) + alloca (1 + strlen (new_redirect->redirectee.filename->word)); + redirectee->word = alloca_hack; + strcpy (redirectee->word, new_redirect->redirectee.filename->word); + } + else + /* It's guaranteed to be an integer, and shouldn't be freed. */ + redirectee = new_redirect->redirectee.filename; + + redir_fd = new_redirect->redirectee.dest; + redirector = new_redirect->redirector.dest; + ri = new_redirect->instruction; + + /* Overwrite the flags element of the old redirect with the new value. */ + redirect->flags = new_redirect->flags; + dispose_redirects (new_redirect); + } + + switch (ri) + { + case r_output_direction: + case r_appending_to: + case r_input_direction: + case r_inputa_direction: + case r_err_and_out: /* command &>filename */ + case r_append_err_and_out: /* command &>> filename */ + case r_input_output: + case r_output_force: + if (posixly_correct && interactive_shell == 0) + { + oflags = redirectee->flags; + redirectee->flags |= W_NOGLOB; + } + redirectee_word = redirection_expand (redirectee); + if (posixly_correct && interactive_shell == 0) + redirectee->flags = oflags; + + if (redirectee_word == 0) + return (AMBIGUOUS_REDIRECT); + +#if defined (RESTRICTED_SHELL) + if (restricted && (WRITE_REDIRECT (ri))) + { + free (redirectee_word); + return (RESTRICTED_REDIRECT); + } +#endif /* RESTRICTED_SHELL */ + + fd = redir_open (redirectee_word, redirect->flags, 0666, ri); + if (fnp) + *fnp = redirectee_word; + else + free (redirectee_word); + + if (fd == NOCLOBBER_REDIRECT || fd == RESTRICTED_REDIRECT) + return (fd); + + if (fd < 0) + return (errno); + + if (flags & RX_ACTIVE) + { + if (redirect->rflags & REDIR_VARASSIGN) + { + redirector = fcntl (fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */ + r = errno; + if (redirector < 0) + sys_error (_("redirection error: cannot duplicate fd")); + REDIRECTION_ERROR (redirector, r, fd); + } + + if ((flags & RX_UNDOABLE) && (redirect->rflags & REDIR_VARASSIGN) == 0) + { + /* Only setup to undo it if the thing to undo is active. */ + if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1)) + r = add_undo_redirect (redirector, ri, -1); + else + r = add_undo_close_redirect (redirector); + REDIRECTION_ERROR (r, errno, fd); + } + +#if defined (BUFFERED_INPUT) + /* inhibit call to sync_buffered_stream() for async processes */ + if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0) + check_bash_input (redirector); +#endif + + /* Make sure there is no pending output before we change the state + of the underlying file descriptor, since the builtins use stdio + for output. */ + if (redirector == 1 && fileno (stdout) == redirector) + { + fflush (stdout); + fpurge (stdout); + } + else if (redirector == 2 && fileno (stderr) == redirector) + { + fflush (stderr); + fpurge (stderr); + } + + if (redirect->rflags & REDIR_VARASSIGN) + { + if ((r = redir_varassign (redirect, redirector)) < 0) + { + close (redirector); + close (fd); + return (r); /* XXX */ + } + } + else if ((fd != redirector) && (dup2 (fd, redirector) < 0)) + { + close (fd); /* dup2 failed? must be fd limit issue */ + return (errno); + } + +#if defined (BUFFERED_INPUT) + /* Do not change the buffered stream for an implicit redirection + of /dev/null to fd 0 for asynchronous commands without job + control (r_inputa_direction). */ + if (ri == r_input_direction || ri == r_input_output) + duplicate_buffered_stream (fd, redirector); +#endif /* BUFFERED_INPUT */ + + /* + * If we're remembering, then this is the result of a while, for + * or until loop with a loop redirection, or a function/builtin + * executing in the parent shell with a redirection. In the + * function/builtin case, we want to set all file descriptors > 2 + * to be close-on-exec to duplicate the effect of the old + * for i = 3 to NOFILE close(i) loop. In the case of the loops, + * both sh and ksh leave the file descriptors open across execs. + * The Posix standard mentions only the exec builtin. + */ + if ((flags & RX_CLEXEC) && (redirector > 2)) + SET_CLOSE_ON_EXEC (redirector); + } + + if (fd != redirector) + { +#if defined (BUFFERED_INPUT) + if (INPUT_REDIRECT (ri)) + close_buffered_fd (fd); + else +#endif /* !BUFFERED_INPUT */ + close (fd); /* Don't close what we just opened! */ + } + + /* If we are hacking both stdout and stderr, do the stderr + redirection here. XXX - handle {var} here? */ + if (ri == r_err_and_out || ri == r_append_err_and_out) + { + if (flags & RX_ACTIVE) + { + if (flags & RX_UNDOABLE) + add_undo_redirect (2, ri, -1); + if (dup2 (1, 2) < 0) + return (errno); + } + } + break; + + case r_reading_until: + case r_deblank_reading_until: + case r_reading_string: + /* REDIRECTEE is a pointer to a WORD_DESC containing the text of + the new input. Place it in a temporary file. */ + if (redirectee) + { + fd = here_document_to_fd (redirectee, ri); + + if (fd < 0) + { + heredoc_errno = errno; + return (HEREDOC_REDIRECT); + } + + if (redirect->rflags & REDIR_VARASSIGN) + { + redirector = fcntl (fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */ + r = errno; + if (redirector < 0) + sys_error (_("redirection error: cannot duplicate fd")); + REDIRECTION_ERROR (redirector, r, fd); + } + + if (flags & RX_ACTIVE) + { + if ((flags & RX_UNDOABLE) && (redirect->rflags & REDIR_VARASSIGN) == 0) + { + /* Only setup to undo it if the thing to undo is active. */ + if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1)) + r = add_undo_redirect (redirector, ri, -1); + else + r = add_undo_close_redirect (redirector); + REDIRECTION_ERROR (r, errno, fd); + } + +#if defined (BUFFERED_INPUT) + check_bash_input (redirector); +#endif + if (redirect->rflags & REDIR_VARASSIGN) + { + if ((r = redir_varassign (redirect, redirector)) < 0) + { + close (redirector); + close (fd); + return (r); /* XXX */ + } + } + else if (fd != redirector && dup2 (fd, redirector) < 0) + { + r = errno; + close (fd); + return (r); + } + +#if defined (BUFFERED_INPUT) + duplicate_buffered_stream (fd, redirector); +#endif + + if ((flags & RX_CLEXEC) && (redirector > 2)) + SET_CLOSE_ON_EXEC (redirector); + } + + if (fd != redirector) +#if defined (BUFFERED_INPUT) + close_buffered_fd (fd); +#else + close (fd); +#endif + } + break; + + case r_duplicating_input: + case r_duplicating_output: + case r_move_input: + case r_move_output: + if ((flags & RX_ACTIVE) && (redirect->rflags & REDIR_VARASSIGN)) + { + redirector = fcntl (redir_fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */ + r = errno; + if (redirector < 0) + sys_error (_("redirection error: cannot duplicate fd")); + REDIRECTION_ERROR (redirector, r, -1); + } + + if ((flags & RX_ACTIVE) && (redir_fd != redirector)) + { + if ((flags & RX_UNDOABLE) && (redirect->rflags & REDIR_VARASSIGN) == 0) + { + /* Only setup to undo it if the thing to undo is active. */ + if (fcntl (redirector, F_GETFD, 0) != -1) + r = add_undo_redirect (redirector, ri, redir_fd); + else + r = add_undo_close_redirect (redirector); + REDIRECTION_ERROR (r, errno, -1); + } + if ((flags & RX_UNDOABLE) && (ri == r_move_input || ri == r_move_output)) + { + /* r_move_input and r_move_output add an additional close() + that needs to be undone */ + if (fcntl (redirector, F_GETFD, 0) != -1) + { + r = add_undo_redirect (redir_fd, r_close_this, -1); + REDIRECTION_ERROR (r, errno, -1); + } + } +#if defined (BUFFERED_INPUT) + /* inhibit call to sync_buffered_stream() for async processes */ + if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0) + check_bash_input (redirector); +#endif + if (redirect->rflags & REDIR_VARASSIGN) + { + if ((r = redir_varassign (redirect, redirector)) < 0) + { + close (redirector); + return (r); /* XXX */ + } + } + /* This is correct. 2>&1 means dup2 (1, 2); */ + else if (dup2 (redir_fd, redirector) < 0) + return (errno); + +#if defined (BUFFERED_INPUT) + if (ri == r_duplicating_input || ri == r_move_input) + duplicate_buffered_stream (redir_fd, redirector); +#endif /* BUFFERED_INPUT */ + + /* First duplicate the close-on-exec state of redirectee. dup2 + leaves the flag unset on the new descriptor, which means it + stays open. Only set the close-on-exec bit for file descriptors + greater than 2 in any case, since 0-2 should always be open + unless closed by something like `exec 2<&-'. It should always + be safe to set fds > 2 to close-on-exec if they're being used to + save file descriptors < 2, since we don't need to preserve the + state of the close-on-exec flag for those fds -- they should + always be open. */ + /* if ((already_set || set_unconditionally) && (ok_to_set)) + set_it () */ +#if 0 + if (((fcntl (redir_fd, F_GETFD, 0) == 1) || redir_fd < 2 || (flags & RX_CLEXEC)) && + (redirector > 2)) +#else + if (((fcntl (redir_fd, F_GETFD, 0) == 1) || (redir_fd < 2 && (flags & RX_INTERNAL)) || (flags & RX_CLEXEC)) && + (redirector > 2)) +#endif + SET_CLOSE_ON_EXEC (redirector); + + /* When undoing saving of non-standard file descriptors (>=3) using + file descriptors >= SHELL_FD_BASE, we set the saving fd to be + close-on-exec and use a flag to decide how to set close-on-exec + when the fd is restored. */ + if ((redirect->flags & RX_INTERNAL) && (redirect->flags & RX_SAVCLEXEC) && redirector >= 3 && (redir_fd >= SHELL_FD_BASE || (redirect->flags & RX_SAVEFD))) + SET_OPEN_ON_EXEC (redirector); + + /* dup-and-close redirection */ + if (ri == r_move_input || ri == r_move_output) + { + xtrace_fdchk (redir_fd); + + close (redir_fd); +#if defined (COPROCESS_SUPPORT) + coproc_fdchk (redir_fd); /* XXX - loses coproc fds */ +#endif + } + } + break; + + case r_close_this: + if (flags & RX_ACTIVE) + { + if (redirect->rflags & REDIR_VARASSIGN) + { + redirector = redir_varvalue (redirect); + if (redirector < 0) + return AMBIGUOUS_REDIRECT; + } + + r = 0; + /* XXX - only if REDIR_VARASSIGN not set? */ + if (flags & RX_UNDOABLE) + { + if (fcntl (redirector, F_GETFD, 0) != -1) + r = add_undo_redirect (redirector, ri, -1); + else + r = add_undo_close_redirect (redirector); + REDIRECTION_ERROR (r, errno, redirector); + } + +#if defined (COPROCESS_SUPPORT) + coproc_fdchk (redirector); +#endif + xtrace_fdchk (redirector); + +#if defined (BUFFERED_INPUT) + /* inhibit call to sync_buffered_stream() for async processes */ + if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0) + check_bash_input (redirector); + r = close_buffered_fd (redirector); +#else /* !BUFFERED_INPUT */ + r = close (redirector); +#endif /* !BUFFERED_INPUT */ + + if (r < 0 && (flags & RX_INTERNAL) && (errno == EIO || errno == ENOSPC)) + REDIRECTION_ERROR (r, errno, -1); + } + break; + + case r_duplicating_input_word: + case r_duplicating_output_word: + case r_move_input_word: + case r_move_output_word: + break; + } + return (0); +} + +/* Remember the file descriptor associated with the slot FD, + on REDIRECTION_UNDO_LIST. Note that the list will be reversed + before it is executed. Any redirections that need to be undone + even if REDIRECTION_UNDO_LIST is discarded by the exec builtin + are also saved on EXEC_REDIRECTION_UNDO_LIST. FDBASE says where to + start the duplicating. If it's less than SHELL_FD_BASE, we're ok, + and can use SHELL_FD_BASE (-1 == don't care). If it's >= SHELL_FD_BASE, + we have to make sure we don't use fdbase to save a file descriptor, + since we're going to use it later (e.g., make sure we don't save fd 0 + to fd 10 if we have a redirection like 0<&10). If the value of fdbase + puts the process over its fd limit, causing fcntl to fail, we try + again with SHELL_FD_BASE. Return 0 on success, -1 on error. */ +static int +add_undo_redirect (fd, ri, fdbase) + int fd; + enum r_instruction ri; + int fdbase; +{ + int new_fd, clexec_flag, savefd_flag; + REDIRECT *new_redirect, *closer, *dummy_redirect; + REDIRECTEE sd; + + savefd_flag = 0; + new_fd = fcntl (fd, F_DUPFD, (fdbase < SHELL_FD_BASE) ? SHELL_FD_BASE : fdbase+1); + if (new_fd < 0) + new_fd = fcntl (fd, F_DUPFD, SHELL_FD_BASE); + if (new_fd < 0) + { + new_fd = fcntl (fd, F_DUPFD, 0); + savefd_flag = 1; + } + + if (new_fd < 0) + { + sys_error (_("redirection error: cannot duplicate fd")); + return (-1); + } + + clexec_flag = fcntl (fd, F_GETFD, 0); + + sd.dest = new_fd; + rd.dest = 0; + closer = make_redirection (sd, r_close_this, rd, 0); + closer->flags |= RX_INTERNAL; + dummy_redirect = copy_redirects (closer); + + sd.dest = fd; + rd.dest = new_fd; + if (fd == 0) + new_redirect = make_redirection (sd, r_duplicating_input, rd, 0); + else + new_redirect = make_redirection (sd, r_duplicating_output, rd, 0); + new_redirect->flags |= RX_INTERNAL; + if (savefd_flag) + new_redirect->flags |= RX_SAVEFD; + if (clexec_flag == 0 && fd >= 3 && (new_fd >= SHELL_FD_BASE || savefd_flag)) + new_redirect->flags |= RX_SAVCLEXEC; + new_redirect->next = closer; + + closer->next = redirection_undo_list; + redirection_undo_list = new_redirect; + + /* Save redirections that need to be undone even if the undo list + is thrown away by the `exec' builtin. */ + add_exec_redirect (dummy_redirect); + + /* experimental: if we're saving a redirection to undo for a file descriptor + above SHELL_FD_BASE, add a redirection to be undone if the exec builtin + causes redirections to be discarded. There needs to be a difference + between fds that are used to save other fds and then are the target of + user redirections and fds that are just the target of user redirections. + We use the close-on-exec flag to tell the difference; fds > SHELL_FD_BASE + that have the close-on-exec flag set are assumed to be fds used internally + to save others. */ + if (fd >= SHELL_FD_BASE && ri != r_close_this && clexec_flag) + { + sd.dest = fd; + rd.dest = new_fd; + new_redirect = make_redirection (sd, r_duplicating_output, rd, 0); + new_redirect->flags |= RX_INTERNAL; + + add_exec_redirect (new_redirect); + } + + /* File descriptors used only for saving others should always be + marked close-on-exec. Unfortunately, we have to preserve the + close-on-exec state of the file descriptor we are saving, since + fcntl (F_DUPFD) sets the new file descriptor to remain open + across execs. If, however, the file descriptor whose state we + are saving is <= 2, we can just set the close-on-exec flag, + because file descriptors 0-2 should always be open-on-exec, + and the restore above in do_redirection() will take care of it. */ + if (clexec_flag || fd < 3) + SET_CLOSE_ON_EXEC (new_fd); + else if (redirection_undo_list->flags & RX_SAVCLEXEC) + SET_CLOSE_ON_EXEC (new_fd); + + return (0); +} + +/* Set up to close FD when we are finished with the current command + and its redirections. Return 0 on success, -1 on error. */ +static int +add_undo_close_redirect (fd) + int fd; +{ + REDIRECT *closer; + REDIRECTEE sd; + + sd.dest = fd; + rd.dest = 0; + closer = make_redirection (sd, r_close_this, rd, 0); + closer->flags |= RX_INTERNAL; + closer->next = redirection_undo_list; + redirection_undo_list = closer; + + return 0; +} + +static void +add_exec_redirect (dummy_redirect) + REDIRECT *dummy_redirect; +{ + dummy_redirect->next = exec_redirection_undo_list; + exec_redirection_undo_list = dummy_redirect; +} + +/* Return 1 if the redirection specified by RI and REDIRECTOR alters the + standard input. */ +static int +stdin_redirection (ri, redirector) + enum r_instruction ri; + int redirector; +{ + switch (ri) + { + case r_input_direction: + case r_inputa_direction: + case r_input_output: + case r_reading_until: + case r_deblank_reading_until: + case r_reading_string: + return (1); + case r_duplicating_input: + case r_duplicating_input_word: + case r_close_this: + return (redirector == 0); + case r_output_direction: + case r_appending_to: + case r_duplicating_output: + case r_err_and_out: + case r_append_err_and_out: + case r_output_force: + case r_duplicating_output_word: + case r_move_input: + case r_move_output: + case r_move_input_word: + case r_move_output_word: + return (0); + } + return (0); +} + +/* Return non-zero if any of the redirections in REDIRS alter the standard + input. */ +int +stdin_redirects (redirs) + REDIRECT *redirs; +{ + REDIRECT *rp; + int n; + + for (n = 0, rp = redirs; rp; rp = rp->next) + if ((rp->rflags & REDIR_VARASSIGN) == 0) + n += stdin_redirection (rp->instruction, rp->redirector.dest); + return n; +} +/* bind_var_to_int handles array references */ +static int +redir_varassign (redir, fd) + REDIRECT *redir; + int fd; +{ + WORD_DESC *w; + SHELL_VAR *v; + + w = redir->redirector.filename; + v = bind_var_to_int (w->word, fd); + if (v == 0 || readonly_p (v) || noassign_p (v)) + return BADVAR_REDIRECT; + + stupidly_hack_special_variables (w->word); + return 0; +} + +/* Handles {array[ind]} for redirection words */ +static int +redir_varvalue (redir) + REDIRECT *redir; +{ + SHELL_VAR *v; + char *val, *w; + intmax_t vmax; + int i; +#if defined (ARRAY_VARS) + char *sub; + int len, vr; +#endif + + w = redir->redirector.filename->word; /* shorthand */ + /* XXX - handle set -u here? */ +#if defined (ARRAY_VARS) + if (vr = valid_array_reference (w, 0)) + { + v = array_variable_part (w, 0, &sub, &len); + } + else +#endif + { + v = find_variable (w); +#if defined (ARRAY_VARS) + if (v == 0) + { + v = find_variable_last_nameref (w, 0); + if (v && nameref_p (v)) + { + w = nameref_cell (v); + if (vr = valid_array_reference (w, 0)) + v = array_variable_part (w, 0, &sub, &len); + else + v = find_variable (w); + } + } +#endif + } + + if (v == 0 || invisible_p (v)) + return -1; + +#if defined (ARRAY_VARS) + /* get_variable_value handles references to array variables without + subscripts */ + if (vr && (array_p (v) || assoc_p (v))) + val = get_array_value (w, 0, (int *)NULL, (arrayind_t *)0); + else +#endif + val = get_variable_value (v); + if (val == 0 || *val == 0) + return -1; + + if (legal_number (val, &vmax) < 0) + return -1; + + i = vmax; /* integer truncation */ + return i; +} diff --git a/bash-5.1/redir.h b/bash-5.1/redir.h new file mode 100644 index 0000000000000000000000000000000000000000..64a3d26698707a9e62e6af29e05cc17d396c19cb --- /dev/null +++ b/bash-5.1/redir.h @@ -0,0 +1,40 @@ +/* redir.h - functions from redir.c. */ + +/* Copyright (C) 1997, 2001, 2005, 2008, 2009-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_REDIR_H_) +#define _REDIR_H_ + +#include "stdc.h" + +/* Values for flags argument to do_redirections */ +#define RX_ACTIVE 0x01 /* do it; don't just go through the motions */ +#define RX_UNDOABLE 0x02 /* make a list to undo these redirections */ +#define RX_CLEXEC 0x04 /* set close-on-exec for opened fds > 2 */ +#define RX_INTERNAL 0x08 +#define RX_USER 0x10 +#define RX_SAVCLEXEC 0x20 /* set close-on-exec off in restored fd even though saved on has it on */ +#define RX_SAVEFD 0x40 /* fd used to save another even if < SHELL_FD_BASE */ + +extern void redirection_error PARAMS((REDIRECT *, int, char *)); +extern int do_redirections PARAMS((REDIRECT *, int)); +extern char *redirection_expand PARAMS((WORD_DESC *)); +extern int stdin_redirects PARAMS((REDIRECT *)); + +#endif /* _REDIR_H_ */ diff --git a/bash-5.1/shell.c b/bash-5.1/shell.c new file mode 100644 index 0000000000000000000000000000000000000000..7dcd000a67b1bfa36f0616c01d02324d366c5e6b --- /dev/null +++ b/bash-5.1/shell.c @@ -0,0 +1,2113 @@ +/* shell.c -- GNU's idea of the POSIX shell specification. */ + +/* Copyright (C) 1987-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* + Birthdate: + Sunday, January 10th, 1988. + Initial author: Brian Fox +*/ +#define INSTALL_DEBUG_MODE + +#include "config.h" + +#include "bashtypes.h" +#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) +# include +#endif +#include "posixstat.h" +#include "posixtime.h" +#include "bashansi.h" +#include +#include +#include +#include "filecntl.h" +#if defined (HAVE_PWD_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashintl.h" + +#define NEED_SH_SETLINEBUF_DECL /* used in externs.h */ + +#include "shell.h" +#include "parser.h" +#include "flags.h" +#include "trap.h" +#include "mailcheck.h" +#include "builtins.h" +#include "builtins/common.h" + +#if defined (JOB_CONTROL) +#include "jobs.h" +#else +extern int running_in_background; +extern int initialize_job_control PARAMS((int)); +extern int get_tty_state PARAMS((void)); +#endif /* JOB_CONTROL */ + +#include "input.h" +#include "execute_cmd.h" +#include "findcmd.h" + +#if defined (USING_BASH_MALLOC) && defined (DEBUG) && !defined (DISABLE_MALLOC_WRAPPERS) +# include +#endif + +#if defined (HISTORY) +# include "bashhist.h" +# include +#endif + +#if defined (READLINE) +# include +# include "bashline.h" +#endif + +#include +#include + +#if defined (__OPENNT) +# include +#endif + +#if !defined (HAVE_GETPW_DECLS) +extern struct passwd *getpwuid (); +#endif /* !HAVE_GETPW_DECLS */ + +#if !defined (errno) +extern int errno; +#endif + +#if defined (NO_MAIN_ENV_ARG) +extern char **environ; /* used if no third argument to main() */ +#endif + +extern int gnu_error_format; + +/* Non-zero means that this shell has already been run; i.e. you should + call shell_reinitialize () if you need to start afresh. */ +int shell_initialized = 0; +int bash_argv_initialized = 0; + +COMMAND *global_command = (COMMAND *)NULL; + +/* Information about the current user. */ +struct user_info current_user = +{ + (uid_t)-1, (uid_t)-1, (gid_t)-1, (gid_t)-1, + (char *)NULL, (char *)NULL, (char *)NULL +}; + +/* The current host's name. */ +char *current_host_name = (char *)NULL; + +/* Non-zero means that this shell is a login shell. + Specifically: + 0 = not login shell. + 1 = login shell from getty (or equivalent fake out) + -1 = login shell from "--login" (or -l) flag. + -2 = both from getty, and from flag. + */ +int login_shell = 0; + +/* Non-zero means that at this moment, the shell is interactive. In + general, this means that the shell is at this moment reading input + from the keyboard. */ +int interactive = 0; + +/* Non-zero means that the shell was started as an interactive shell. */ +int interactive_shell = 0; + +/* Non-zero means to send a SIGHUP to all jobs when an interactive login + shell exits. */ +int hup_on_exit = 0; + +/* Non-zero means to list status of running and stopped jobs at shell exit */ +int check_jobs_at_exit = 0; + +/* Non-zero means to change to a directory name supplied as a command name */ +int autocd = 0; + +/* Tells what state the shell was in when it started: + 0 = non-interactive shell script + 1 = interactive + 2 = -c command + 3 = wordexp evaluation + This is a superset of the information provided by interactive_shell. +*/ +int startup_state = 0; +int reading_shell_script = 0; + +/* Special debugging helper. */ +int debugging_login_shell = 0; + +/* The environment that the shell passes to other commands. */ +char **shell_environment; + +/* Non-zero when we are executing a top-level command. */ +int executing = 0; + +/* The number of commands executed so far. */ +int current_command_number = 1; + +/* Non-zero is the recursion depth for commands. */ +int indirection_level = 0; + +/* The name of this shell, as taken from argv[0]. */ +char *shell_name = (char *)NULL; + +/* time in seconds when the shell was started */ +time_t shell_start_time; +struct timeval shellstart; + +/* Are we running in an emacs shell window? */ +int running_under_emacs; + +/* Do we have /dev/fd? */ +#ifdef HAVE_DEV_FD +int have_devfd = HAVE_DEV_FD; +#else +int have_devfd = 0; +#endif + +/* The name of the .(shell)rc file. */ +static char *bashrc_file = DEFAULT_BASHRC; + +/* Non-zero if we are finding the scripts requirements. */ +int rpm_requires; + +/* Non-zero means to act more like the Bourne shell on startup. */ +static int act_like_sh; + +/* Non-zero if this shell is being run by `su'. */ +static int su_shell; + +/* Non-zero if we have already expanded and sourced $ENV. */ +static int sourced_env; + +/* Is this shell running setuid? */ +static int running_setuid; + +/* Values for the long-winded argument names. */ +static int debugging; /* Do debugging things. */ +static int no_rc; /* Don't execute ~/.bashrc */ +static int no_profile; /* Don't execute .profile */ +static int do_version; /* Display interesting version info. */ +static int make_login_shell; /* Make this shell be a `-bash' shell. */ +static int want_initial_help; /* --help option */ + +int debugging_mode = 0; /* In debugging mode with --debugger */ +#if defined (READLINE) +int no_line_editing = 0; /* non-zero -> don't do fancy line editing. */ +#else +int no_line_editing = 1; /* can't have line editing without readline */ +#endif +int dump_translatable_strings; /* Dump strings in $"...", don't execute. */ +int dump_po_strings; /* Dump strings in $"..." in po format */ +int wordexp_only = 0; /* Do word expansion only */ +int protected_mode = 0; /* No command substitution with --wordexp */ + +int pretty_print_mode = 0; /* pretty-print a shell script */ + +#if defined (STRICT_POSIX) +int posixly_correct = 1; /* Non-zero means posix.2 superset. */ +#else +int posixly_correct = 0; /* Non-zero means posix.2 superset. */ +#endif + +/* Some long-winded argument names. These are obviously new. */ +#define Int 1 +#define Charp 2 +static const struct { + const char *name; + int type; + int *int_value; + char **char_value; +} long_args[] = { + { "debug", Int, &debugging, (char **)0x0 }, +#if defined (DEBUGGER) + { "debugger", Int, &debugging_mode, (char **)0x0 }, +#endif + { "dump-po-strings", Int, &dump_po_strings, (char **)0x0 }, + { "dump-strings", Int, &dump_translatable_strings, (char **)0x0 }, + { "help", Int, &want_initial_help, (char **)0x0 }, + { "init-file", Charp, (int *)0x0, &bashrc_file }, + { "login", Int, &make_login_shell, (char **)0x0 }, + { "noediting", Int, &no_line_editing, (char **)0x0 }, + { "noprofile", Int, &no_profile, (char **)0x0 }, + { "norc", Int, &no_rc, (char **)0x0 }, + { "posix", Int, &posixly_correct, (char **)0x0 }, + { "pretty-print", Int, &pretty_print_mode, (char **)0x0 }, +#if defined (WORDEXP_OPTION) + { "protected", Int, &protected_mode, (char **)0x0 }, +#endif + { "rcfile", Charp, (int *)0x0, &bashrc_file }, + { "rpm-requires", Int, &rpm_requires, (char **)0x0 }, +#if defined (RESTRICTED_SHELL) + { "restricted", Int, &restricted, (char **)0x0 }, +#endif + { "verbose", Int, &verbose_flag, (char **)0x0 }, + { "version", Int, &do_version, (char **)0x0 }, +#if defined (WORDEXP_OPTION) + { "wordexp", Int, &wordexp_only, (char **)0x0 }, +#endif + { (char *)0x0, Int, (int *)0x0, (char **)0x0 } +}; + +/* These are extern so execute_simple_command can set them, and then + longjmp back to main to execute a shell script, instead of calling + main () again and resulting in indefinite, possibly fatal, stack + growth. */ +procenv_t subshell_top_level; +int subshell_argc; +char **subshell_argv; +char **subshell_envp; + +char *exec_argv0; + +#if defined (BUFFERED_INPUT) +/* The file descriptor from which the shell is reading input. */ +int default_buffered_input = -1; +#endif + +/* The following two variables are not static so they can show up in $-. */ +int read_from_stdin; /* -s flag supplied */ +int want_pending_command; /* -c flag supplied */ + +/* This variable is not static so it can be bound to $BASH_EXECUTION_STRING */ +char *command_execution_string; /* argument to -c option */ +char *shell_script_filename; /* shell script */ + +int malloc_trace_at_exit = 0; + +static int shell_reinitialized = 0; + +static FILE *default_input; + +static STRING_INT_ALIST *shopt_alist; +static int shopt_ind = 0, shopt_len = 0; + +static int parse_long_options PARAMS((char **, int, int)); +static int parse_shell_options PARAMS((char **, int, int)); +static int bind_args PARAMS((char **, int, int, int)); + +static void start_debugger PARAMS((void)); + +static void add_shopt_to_alist PARAMS((char *, int)); +static void run_shopt_alist PARAMS((void)); + +static void execute_env_file PARAMS((char *)); +static void run_startup_files PARAMS((void)); +static int open_shell_script PARAMS((char *)); +static void set_bash_input PARAMS((void)); +static int run_one_command PARAMS((char *)); +#if defined (WORDEXP_OPTION) +static int run_wordexp PARAMS((char *)); +#endif + +static int uidget PARAMS((void)); + +static void set_option_defaults PARAMS((void)); +static void reset_option_defaults PARAMS((void)); + +static void init_interactive PARAMS((void)); +static void init_noninteractive PARAMS((void)); +static void init_interactive_script PARAMS((void)); + +static void set_shell_name PARAMS((char *)); +static void shell_initialize PARAMS((void)); +static void shell_reinitialize PARAMS((void)); + +static void show_shell_usage PARAMS((FILE *, int)); + +#ifdef __CYGWIN__ +static void +_cygwin32_check_tmp () +{ + struct stat sb; + + if (stat ("/tmp", &sb) < 0) + internal_warning (_("could not find /tmp, please create!")); + else + { + if (S_ISDIR (sb.st_mode) == 0) + internal_warning (_("/tmp must be a valid directory name")); + } +} +#endif /* __CYGWIN__ */ + +#if defined (NO_MAIN_ENV_ARG) +/* systems without third argument to main() */ +int +main (argc, argv) + int argc; + char **argv; +#else /* !NO_MAIN_ENV_ARG */ +int +main (argc, argv, env) + int argc; + char **argv, **env; +#endif /* !NO_MAIN_ENV_ARG */ +{ + register int i; + int code, old_errexit_flag; +#if defined (RESTRICTED_SHELL) + int saverst; +#endif + volatile int locally_skip_execution; + volatile int arg_index, top_level_arg_index; +#ifdef __OPENNT + char **env; + + env = environ; +#endif /* __OPENNT */ + + USE_VAR(argc); + USE_VAR(argv); + USE_VAR(env); + USE_VAR(code); + USE_VAR(old_errexit_flag); +#if defined (RESTRICTED_SHELL) + USE_VAR(saverst); +#endif + + /* Catch early SIGINTs. */ + code = setjmp_nosigs (top_level); + if (code) + exit (2); + + xtrace_init (); + +#if defined (USING_BASH_MALLOC) && defined (DEBUG) && !defined (DISABLE_MALLOC_WRAPPERS) + malloc_set_register (1); /* XXX - change to 1 for malloc debugging */ +#endif + + check_dev_tty (); + +#ifdef __CYGWIN__ + _cygwin32_check_tmp (); +#endif /* __CYGWIN__ */ + + /* Wait forever if we are debugging a login shell. */ + while (debugging_login_shell) sleep (3); + + set_default_locale (); + + running_setuid = uidget (); + + if (getenv ("POSIXLY_CORRECT") || getenv ("POSIX_PEDANTIC")) + posixly_correct = 1; + +#if defined (USE_GNU_MALLOC_LIBRARY) + mcheck (programming_error, (void (*) ())0); +#endif /* USE_GNU_MALLOC_LIBRARY */ + + if (setjmp_sigs (subshell_top_level)) + { + argc = subshell_argc; + argv = subshell_argv; + env = subshell_envp; + sourced_env = 0; + } + + shell_reinitialized = 0; + + /* Initialize `local' variables for all `invocations' of main (). */ + arg_index = 1; + if (arg_index > argc) + arg_index = argc; + command_execution_string = shell_script_filename = (char *)NULL; + want_pending_command = locally_skip_execution = read_from_stdin = 0; + default_input = stdin; +#if defined (BUFFERED_INPUT) + default_buffered_input = -1; +#endif + + /* Fix for the `infinite process creation' bug when running shell scripts + from startup files on System V. */ + login_shell = make_login_shell = 0; + + /* If this shell has already been run, then reinitialize it to a + vanilla state. */ + if (shell_initialized || shell_name) + { + /* Make sure that we do not infinitely recurse as a login shell. */ + if (*shell_name == '-') + shell_name++; + + shell_reinitialize (); + if (setjmp_nosigs (top_level)) + exit (2); + } + + shell_environment = env; + set_shell_name (argv[0]); + + gettimeofday (&shellstart, 0); + shell_start_time = shellstart.tv_sec; + + /* Parse argument flags from the input line. */ + + /* Find full word arguments first. */ + arg_index = parse_long_options (argv, arg_index, argc); + + if (want_initial_help) + { + show_shell_usage (stdout, 1); + exit (EXECUTION_SUCCESS); + } + + if (do_version) + { + show_shell_version (1); + exit (EXECUTION_SUCCESS); + } + + echo_input_at_read = verbose_flag; /* --verbose given */ + + /* All done with full word options; do standard shell option parsing.*/ + this_command_name = shell_name; /* for error reporting */ + arg_index = parse_shell_options (argv, arg_index, argc); + + /* If user supplied the "--login" (or -l) flag, then set and invert + LOGIN_SHELL. */ + if (make_login_shell) + { + login_shell++; + login_shell = -login_shell; + } + + set_login_shell ("login_shell", login_shell != 0); + + if (dump_po_strings) + dump_translatable_strings = 1; + + if (dump_translatable_strings) + read_but_dont_execute = 1; + + if (rpm_requires) + { + read_but_dont_execute = 1; + initialize_shell_builtins (); + } + + if (running_setuid && privileged_mode == 0) + disable_priv_mode (); + + /* Need to get the argument to a -c option processed in the + above loop. The next arg is a command to execute, and the + following args are $0...$n respectively. */ + if (want_pending_command) + { + command_execution_string = argv[arg_index]; + if (command_execution_string == 0) + { + report_error (_("%s: option requires an argument"), "-c"); + exit (EX_BADUSAGE); + } + arg_index++; + } + this_command_name = (char *)NULL; + + /* First, let the outside world know about our interactive status. + A shell is interactive if the `-i' flag was given, or if all of + the following conditions are met: + no -c command + no arguments remaining or the -s flag given + standard input is a terminal + standard error is a terminal + Refer to Posix.2, the description of the `sh' utility. */ + + if (forced_interactive || /* -i flag */ + (!command_execution_string && /* No -c command and ... */ + wordexp_only == 0 && /* No --wordexp and ... */ + ((arg_index == argc) || /* no remaining args or... */ + read_from_stdin) && /* -s flag with args, and */ + isatty (fileno (stdin)) && /* Input is a terminal and */ + isatty (fileno (stderr)))) /* error output is a terminal. */ + init_interactive (); + else + init_noninteractive (); + + /* + * Some systems have the bad habit of starting login shells with lots of open + * file descriptors. For instance, most systems that have picked up the + * pre-4.0 Sun YP code leave a file descriptor open each time you call one + * of the getpw* functions, and it's set to be open across execs. That + * means one for login, one for xterm, one for shelltool, etc. There are + * also systems that open persistent FDs to other agents or files as part + * of process startup; these need to be set to be close-on-exec. + */ + if (login_shell && interactive_shell) + { + for (i = 3; i < 20; i++) + SET_CLOSE_ON_EXEC (i); + } + + /* If we're in a strict Posix.2 mode, turn on interactive comments, + alias expansion in non-interactive shells, and other Posix.2 things. */ + if (posixly_correct) + { + bind_variable ("POSIXLY_CORRECT", "y", 0); + sv_strict_posix ("POSIXLY_CORRECT"); + } + + /* Now we run the shopt_alist and process the options. */ + if (shopt_alist) + run_shopt_alist (); + + /* From here on in, the shell must be a normal functioning shell. + Variables from the environment are expected to be set, etc. */ + shell_initialize (); + + set_default_lang (); + set_default_locale_vars (); + + /* + * M-x term -> TERM=eterm-color INSIDE_EMACS='251,term:0.96' (eterm) + * M-x shell -> TERM='dumb' INSIDE_EMACS='25.1,comint' (no line editing) + * + * Older versions of Emacs may set EMACS to 't' or to something like + * '22.1 (term:0.96)' instead of (or in addition to) setting INSIDE_EMACS. + * They may set TERM to 'eterm' instead of 'eterm-color'. They may have + * a now-obsolete command that sets neither EMACS nor INSIDE_EMACS: + * M-x terminal -> TERM='emacs-em7955' (line editing) + */ + if (interactive_shell) + { + char *term, *emacs, *inside_emacs; + int emacs_term, in_emacs; + + term = get_string_value ("TERM"); + emacs = get_string_value ("EMACS"); + inside_emacs = get_string_value ("INSIDE_EMACS"); + + if (inside_emacs) + { + emacs_term = strstr (inside_emacs, ",term:") != 0; + in_emacs = 1; + } + else if (emacs) + { + /* Infer whether we are in an older Emacs. */ + emacs_term = strstr (emacs, " (term:") != 0; + in_emacs = emacs_term || STREQ (emacs, "t"); + } + else + in_emacs = emacs_term = 0; + + /* Not sure any emacs terminal emulator sets TERM=emacs any more */ + no_line_editing |= STREQ (term, "emacs"); + no_line_editing |= in_emacs && STREQ (term, "dumb"); + + /* running_under_emacs == 2 for `eterm' */ + running_under_emacs = in_emacs || STREQN (term, "emacs", 5); + running_under_emacs += emacs_term && STREQN (term, "eterm", 5); + + if (running_under_emacs) + gnu_error_format = 1; + } + + top_level_arg_index = arg_index; + old_errexit_flag = exit_immediately_on_error; + + /* Give this shell a place to longjmp to before executing the + startup files. This allows users to press C-c to abort the + lengthy startup. */ + code = setjmp_sigs (top_level); + if (code) + { + if (code == EXITPROG || code == ERREXIT) + exit_shell (last_command_exit_value); + else + { +#if defined (JOB_CONTROL) + /* Reset job control, since run_startup_files turned it off. */ + set_job_control (interactive_shell); +#endif + /* Reset value of `set -e', since it's turned off before running + the startup files. */ + exit_immediately_on_error += old_errexit_flag; + locally_skip_execution++; + } + } + + arg_index = top_level_arg_index; + + /* Execute the start-up scripts. */ + + if (interactive_shell == 0) + { + unbind_variable ("PS1"); + unbind_variable ("PS2"); + interactive = 0; +#if 0 + /* This has already been done by init_noninteractive */ + expand_aliases = posixly_correct; +#endif + } + else + { + change_flag ('i', FLAG_ON); + interactive = 1; + } + +#if defined (RESTRICTED_SHELL) + /* Set restricted_shell based on whether the basename of $0 indicates that + the shell should be restricted or if the `-r' option was supplied at + startup. */ + restricted_shell = shell_is_restricted (shell_name); + + /* If the `-r' option is supplied at invocation, make sure that the shell + is not in restricted mode when running the startup files. */ + saverst = restricted; + restricted = 0; +#endif + + /* Set positional parameters before running startup files. top_level_arg_index + holds the index of the current argument before setting the positional + parameters, so any changes performed in the startup files won't affect + later option processing. */ + if (wordexp_only) + ; /* nothing yet */ + else if (command_execution_string) + arg_index = bind_args (argv, arg_index, argc, 0); /* $0 ... $n */ + else if (arg_index != argc && read_from_stdin == 0) + { + shell_script_filename = argv[arg_index++]; + arg_index = bind_args (argv, arg_index, argc, 1); /* $1 ... $n */ + } + else + arg_index = bind_args (argv, arg_index, argc, 1); /* $1 ... $n */ + + /* The startup files are run with `set -e' temporarily disabled. */ + if (locally_skip_execution == 0 && running_setuid == 0) + { + old_errexit_flag = exit_immediately_on_error; + exit_immediately_on_error = 0; + + run_startup_files (); + exit_immediately_on_error += old_errexit_flag; + } + + /* If we are invoked as `sh', turn on Posix mode. */ + if (act_like_sh) + { + bind_variable ("POSIXLY_CORRECT", "y", 0); + sv_strict_posix ("POSIXLY_CORRECT"); + } + +#if defined (RESTRICTED_SHELL) + /* Turn on the restrictions after executing the startup files. This + means that `bash -r' or `set -r' invoked from a startup file will + turn on the restrictions after the startup files are executed. */ + restricted = saverst || restricted; + if (shell_reinitialized == 0) + maybe_make_restricted (shell_name); +#endif /* RESTRICTED_SHELL */ + +#if defined (WORDEXP_OPTION) + if (wordexp_only) + { + startup_state = 3; + last_command_exit_value = run_wordexp (argv[top_level_arg_index]); + exit_shell (last_command_exit_value); + } +#endif + + cmd_init (); /* initialize the command object caches */ + uwp_init (); + + if (command_execution_string) + { + startup_state = 2; + + if (debugging_mode) + start_debugger (); + +#if defined (ONESHOT) + executing = 1; + run_one_command (command_execution_string); + exit_shell (last_command_exit_value); +#else /* ONESHOT */ + with_input_from_string (command_execution_string, "-c"); + goto read_and_execute; +#endif /* !ONESHOT */ + } + + /* Get possible input filename and set up default_buffered_input or + default_input as appropriate. */ + if (shell_script_filename) + open_shell_script (shell_script_filename); + else if (interactive == 0) + { + /* In this mode, bash is reading a script from stdin, which is a + pipe or redirected file. */ +#if defined (BUFFERED_INPUT) + default_buffered_input = fileno (stdin); /* == 0 */ +#else + setbuf (default_input, (char *)NULL); +#endif /* !BUFFERED_INPUT */ + read_from_stdin = 1; + } + else if (top_level_arg_index == argc) /* arg index before startup files */ + /* "If there are no operands and the -c option is not specified, the -s + option shall be assumed." */ + read_from_stdin = 1; + + set_bash_input (); + + if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0 && (reading_shell_script || interactive_shell == 0)) + start_debugger (); + + /* Do the things that should be done only for interactive shells. */ + if (interactive_shell) + { + /* Set up for checking for presence of mail. */ + reset_mail_timer (); + init_mail_dates (); + +#if defined (HISTORY) + /* Initialize the interactive history stuff. */ + bash_initialize_history (); + /* Don't load the history from the history file if we've already + saved some lines in this session (e.g., by putting `history -s xx' + into one of the startup files). */ + if (shell_initialized == 0 && history_lines_this_session == 0) + load_history (); +#endif /* HISTORY */ + + /* Initialize terminal state for interactive shells after the + .bash_profile and .bashrc are interpreted. */ + get_tty_state (); + } + +#if !defined (ONESHOT) + read_and_execute: +#endif /* !ONESHOT */ + + shell_initialized = 1; + + if (pretty_print_mode && interactive_shell) + { + internal_warning (_("pretty-printing mode ignored in interactive shells")); + pretty_print_mode = 0; + } + if (pretty_print_mode) + exit_shell (pretty_print_loop ()); + + /* Read commands until exit condition. */ + reader_loop (); + exit_shell (last_command_exit_value); +} + +static int +parse_long_options (argv, arg_start, arg_end) + char **argv; + int arg_start, arg_end; +{ + int arg_index, longarg, i; + char *arg_string; + + arg_index = arg_start; + while ((arg_index != arg_end) && (arg_string = argv[arg_index]) && + (*arg_string == '-')) + { + longarg = 0; + + /* Make --login equivalent to -login. */ + if (arg_string[1] == '-' && arg_string[2]) + { + longarg = 1; + arg_string++; + } + + for (i = 0; long_args[i].name; i++) + { + if (STREQ (arg_string + 1, long_args[i].name)) + { + if (long_args[i].type == Int) + *long_args[i].int_value = 1; + else if (argv[++arg_index] == 0) + { + report_error (_("%s: option requires an argument"), long_args[i].name); + exit (EX_BADUSAGE); + } + else + *long_args[i].char_value = argv[arg_index]; + + break; + } + } + if (long_args[i].name == 0) + { + if (longarg) + { + report_error (_("%s: invalid option"), argv[arg_index]); + show_shell_usage (stderr, 0); + exit (EX_BADUSAGE); + } + break; /* No such argument. Maybe flag arg. */ + } + + arg_index++; + } + + return (arg_index); +} + +static int +parse_shell_options (argv, arg_start, arg_end) + char **argv; + int arg_start, arg_end; +{ + int arg_index; + int arg_character, on_or_off, next_arg, i; + char *o_option, *arg_string; + + arg_index = arg_start; + while (arg_index != arg_end && (arg_string = argv[arg_index]) && + (*arg_string == '-' || *arg_string == '+')) + { + /* There are flag arguments, so parse them. */ + next_arg = arg_index + 1; + + /* A single `-' signals the end of options. From the 4.3 BSD sh. + An option `--' means the same thing; this is the standard + getopt(3) meaning. */ + if (arg_string[0] == '-' && + (arg_string[1] == '\0' || + (arg_string[1] == '-' && arg_string[2] == '\0'))) + return (next_arg); + + i = 1; + on_or_off = arg_string[0]; + while (arg_character = arg_string[i++]) + { + switch (arg_character) + { + case 'c': + want_pending_command = 1; + break; + + case 'l': + make_login_shell = 1; + break; + + case 's': + read_from_stdin = 1; + break; + + case 'o': + o_option = argv[next_arg]; + if (o_option == 0) + { + set_option_defaults (); + list_minus_o_opts (-1, (on_or_off == '-') ? 0 : 1); + reset_option_defaults (); + break; + } + if (set_minus_o_option (on_or_off, o_option) != EXECUTION_SUCCESS) + exit (EX_BADUSAGE); + next_arg++; + break; + + case 'O': + /* Since some of these can be overridden by the normal + interactive/non-interactive shell initialization or + initializing posix mode, we save the options and process + them after initialization. */ + o_option = argv[next_arg]; + if (o_option == 0) + { + shopt_listopt (o_option, (on_or_off == '-') ? 0 : 1); + break; + } + add_shopt_to_alist (o_option, on_or_off); + next_arg++; + break; + + case 'D': + dump_translatable_strings = 1; + break; + + default: + if (change_flag (arg_character, on_or_off) == FLAG_ERROR) + { + report_error (_("%c%c: invalid option"), on_or_off, arg_character); + show_shell_usage (stderr, 0); + exit (EX_BADUSAGE); + } + } + } + /* Can't do just a simple increment anymore -- what about + "bash -abouo emacs ignoreeof -hP"? */ + arg_index = next_arg; + } + + return (arg_index); +} + +/* Exit the shell with status S. */ +void +exit_shell (s) + int s; +{ + fflush (stdout); /* XXX */ + fflush (stderr); + + /* Clean up the terminal if we are in a state where it's been modified. */ +#if defined (READLINE) + if (RL_ISSTATE (RL_STATE_TERMPREPPED) && rl_deprep_term_function) + (*rl_deprep_term_function) (); +#endif + if (read_tty_modified ()) + read_tty_cleanup (); + + /* Do trap[0] if defined. Allow it to override the exit status + passed to us. */ + if (signal_is_trapped (0)) + s = run_exit_trap (); + +#if defined (PROCESS_SUBSTITUTION) + unlink_all_fifos (); +#endif /* PROCESS_SUBSTITUTION */ + +#if defined (HISTORY) + if (remember_on_history) + maybe_save_shell_history (); +#endif /* HISTORY */ + +#if defined (COPROCESS_SUPPORT) + coproc_flush (); +#endif + +#if defined (JOB_CONTROL) + /* If the user has run `shopt -s huponexit', hangup all jobs when we exit + an interactive login shell. ksh does this unconditionally. */ + if (interactive_shell && login_shell && hup_on_exit) + hangup_all_jobs (); + + /* If this shell is interactive, or job control is active, terminate all + stopped jobs and restore the original terminal process group. Don't do + this if we're in a subshell and calling exit_shell after, for example, + a failed word expansion. We want to do this even if the shell is not + interactive because we set the terminal's process group when job control + is enabled regardless of the interactive status. */ + if (subshell_environment == 0) + end_job_control (); +#endif /* JOB_CONTROL */ + + /* Always return the exit status of the last command to our parent. */ + sh_exit (s); +} + +/* A wrapper for exit that (optionally) can do other things, like malloc + statistics tracing. */ +void +sh_exit (s) + int s; +{ +#if defined (MALLOC_DEBUG) && defined (USING_BASH_MALLOC) + if (malloc_trace_at_exit && (subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)) == 0) + trace_malloc_stats (get_name_for_error (), (char *)NULL); + /* mlocation_write_table (); */ +#endif + + exit (s); +} + +/* Exit a subshell, which includes calling the exit trap. We don't want to + do any more cleanup, since a subshell is created as an exact copy of its + parent. */ +void +subshell_exit (s) + int s; +{ + fflush (stdout); + fflush (stderr); + + /* Do trap[0] if defined. Allow it to override the exit status + passed to us. */ + if (signal_is_trapped (0)) + s = run_exit_trap (); + + sh_exit (s); +} + +void +set_exit_status (s) + int s; +{ + set_pipestatus_from_exit (last_command_exit_value = s); +} + +/* Source the bash startup files. If POSIXLY_CORRECT is non-zero, we obey + the Posix.2 startup file rules: $ENV is expanded, and if the file it + names exists, that file is sourced. The Posix.2 rules are in effect + for interactive shells only. (section 4.56.5.3) */ + +/* Execute ~/.bashrc for most shells. Never execute it if + ACT_LIKE_SH is set, or if NO_RC is set. + + If the executable file "/usr/gnu/src/bash/foo" contains: + + #!/usr/gnu/bin/bash + echo hello + + then: + + COMMAND EXECUTE BASHRC + -------------------------------- + bash -c foo NO + bash foo NO + foo NO + rsh machine ls YES (for rsh, which calls `bash -c') + rsh machine foo YES (for shell started by rsh) NO (for foo!) + echo ls | bash NO + login NO + bash YES +*/ + +static void +execute_env_file (env_file) + char *env_file; +{ + char *fn; + + if (env_file && *env_file) + { + fn = expand_string_unsplit_to_string (env_file, Q_DOUBLE_QUOTES); + if (fn && *fn) + maybe_execute_file (fn, 1); + FREE (fn); + } +} + +static void +run_startup_files () +{ +#if defined (JOB_CONTROL) + int old_job_control; +#endif + int sourced_login, run_by_ssh; + + /* get the rshd/sshd case out of the way first. */ + if (interactive_shell == 0 && no_rc == 0 && login_shell == 0 && + act_like_sh == 0 && command_execution_string) + { +#ifdef SSH_SOURCE_BASHRC + run_by_ssh = (find_variable ("SSH_CLIENT") != (SHELL_VAR *)0) || + (find_variable ("SSH2_CLIENT") != (SHELL_VAR *)0); +#else + run_by_ssh = 0; +#endif + + /* If we were run by sshd or we think we were run by rshd, execute + ~/.bashrc if we are a top-level shell. */ + if ((run_by_ssh || isnetconn (fileno (stdin))) && shell_level < 2) + { +#ifdef SYS_BASHRC +# if defined (__OPENNT) + maybe_execute_file (_prefixInstallPath(SYS_BASHRC, NULL, 0), 1); +# else + maybe_execute_file (SYS_BASHRC, 1); +# endif +#endif + maybe_execute_file (bashrc_file, 1); + return; + } + } + +#if defined (JOB_CONTROL) + /* Startup files should be run without job control enabled. */ + old_job_control = interactive_shell ? set_job_control (0) : 0; +#endif + + sourced_login = 0; + + /* A shell begun with the --login (or -l) flag that is not in posix mode + runs the login shell startup files, no matter whether or not it is + interactive. If NON_INTERACTIVE_LOGIN_SHELLS is defined, run the + startup files if argv[0][0] == '-' as well. */ +#if defined (NON_INTERACTIVE_LOGIN_SHELLS) + if (login_shell && posixly_correct == 0) +#else + if (login_shell < 0 && posixly_correct == 0) +#endif + { + /* We don't execute .bashrc for login shells. */ + no_rc++; + + /* Execute /etc/profile and one of the personal login shell + initialization files. */ + if (no_profile == 0) + { + maybe_execute_file (SYS_PROFILE, 1); + + if (act_like_sh) /* sh */ + maybe_execute_file ("~/.profile", 1); + else if ((maybe_execute_file ("~/.bash_profile", 1) == 0) && + (maybe_execute_file ("~/.bash_login", 1) == 0)) /* bash */ + maybe_execute_file ("~/.profile", 1); + } + + sourced_login = 1; + } + + /* A non-interactive shell not named `sh' and not in posix mode reads and + executes commands from $BASH_ENV. If `su' starts a shell with `-c cmd' + and `-su' as the name of the shell, we want to read the startup files. + No other non-interactive shells read any startup files. */ + if (interactive_shell == 0 && !(su_shell && login_shell)) + { + if (posixly_correct == 0 && act_like_sh == 0 && privileged_mode == 0 && + sourced_env++ == 0) + execute_env_file (get_string_value ("BASH_ENV")); + return; + } + + /* Interactive shell or `-su' shell. */ + if (posixly_correct == 0) /* bash, sh */ + { + if (login_shell && sourced_login++ == 0) + { + /* We don't execute .bashrc for login shells. */ + no_rc++; + + /* Execute /etc/profile and one of the personal login shell + initialization files. */ + if (no_profile == 0) + { + maybe_execute_file (SYS_PROFILE, 1); + + if (act_like_sh) /* sh */ + maybe_execute_file ("~/.profile", 1); + else if ((maybe_execute_file ("~/.bash_profile", 1) == 0) && + (maybe_execute_file ("~/.bash_login", 1) == 0)) /* bash */ + maybe_execute_file ("~/.profile", 1); + } + } + + /* bash */ + if (act_like_sh == 0 && no_rc == 0) + { +#ifdef SYS_BASHRC +# if defined (__OPENNT) + maybe_execute_file (_prefixInstallPath(SYS_BASHRC, NULL, 0), 1); +# else + maybe_execute_file (SYS_BASHRC, 1); +# endif +#endif + maybe_execute_file (bashrc_file, 1); + } + /* sh */ + else if (act_like_sh && privileged_mode == 0 && sourced_env++ == 0) + execute_env_file (get_string_value ("ENV")); + } + else /* bash --posix, sh --posix */ + { + /* bash and sh */ + if (interactive_shell && privileged_mode == 0 && sourced_env++ == 0) + execute_env_file (get_string_value ("ENV")); + } + +#if defined (JOB_CONTROL) + set_job_control (old_job_control); +#endif +} + +#if defined (RESTRICTED_SHELL) +/* Return 1 if the shell should be a restricted one based on NAME or the + value of `restricted'. Don't actually do anything, just return a + boolean value. */ +int +shell_is_restricted (name) + char *name; +{ + char *temp; + + if (restricted) + return 1; + temp = base_pathname (name); + if (*temp == '-') + temp++; + return (STREQ (temp, RESTRICTED_SHELL_NAME)); +} + +/* Perhaps make this shell a `restricted' one, based on NAME. If the + basename of NAME is "rbash", then this shell is restricted. The + name of the restricted shell is a configurable option, see config.h. + In a restricted shell, PATH, SHELL, ENV, and BASH_ENV are read-only + and non-unsettable. + Do this also if `restricted' is already set to 1; maybe the shell was + started with -r. */ +int +maybe_make_restricted (name) + char *name; +{ + char *temp; + + temp = base_pathname (name); + if (*temp == '-') + temp++; + if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME))) + { +#if defined (RBASH_STATIC_PATH_VALUE) + bind_variable ("PATH", RBASH_STATIC_PATH_VALUE, 0); + stupidly_hack_special_variables ("PATH"); /* clear hash table */ +#endif + set_var_read_only ("PATH"); + set_var_read_only ("SHELL"); + set_var_read_only ("ENV"); + set_var_read_only ("BASH_ENV"); + set_var_read_only ("HISTFILE"); + restricted = 1; + } + return (restricted); +} +#endif /* RESTRICTED_SHELL */ + +/* Fetch the current set of uids and gids and return 1 if we're running + setuid or setgid. */ +static int +uidget () +{ + uid_t u; + + u = getuid (); + if (current_user.uid != u) + { + FREE (current_user.user_name); + FREE (current_user.shell); + FREE (current_user.home_dir); + current_user.user_name = current_user.shell = current_user.home_dir = (char *)NULL; + } + current_user.uid = u; + current_user.gid = getgid (); + current_user.euid = geteuid (); + current_user.egid = getegid (); + + /* See whether or not we are running setuid or setgid. */ + return (current_user.uid != current_user.euid) || + (current_user.gid != current_user.egid); +} + +void +disable_priv_mode () +{ + int e; + +#if HAVE_SETRESUID + if (setresuid (current_user.uid, current_user.uid, current_user.uid) < 0) +#else + if (setuid (current_user.uid) < 0) +#endif + { + e = errno; + sys_error (_("cannot set uid to %d: effective uid %d"), current_user.uid, current_user.euid); +#if defined (EXIT_ON_SETUID_FAILURE) + if (e == EAGAIN) + exit (e); +#endif + } +#if HAVE_SETRESGID + if (setresgid (current_user.gid, current_user.gid, current_user.gid) < 0) +#else + if (setgid (current_user.gid) < 0) +#endif + sys_error (_("cannot set gid to %d: effective gid %d"), current_user.gid, current_user.egid); + + current_user.euid = current_user.uid; + current_user.egid = current_user.gid; +} + +#if defined (WORDEXP_OPTION) +static int +run_wordexp (words) + char *words; +{ + int code, nw, nb; + WORD_LIST *wl, *tl, *result; + + code = setjmp_nosigs (top_level); + + if (code != NOT_JUMPED) + { + switch (code) + { + /* Some kind of throw to top_level has occurred. */ + case FORCE_EOF: + return last_command_exit_value = 127; + case ERREXIT: + case EXITPROG: + return last_command_exit_value; + case DISCARD: + return last_command_exit_value = 1; + default: + command_error ("run_wordexp", CMDERR_BADJUMP, code, 0); + } + } + + /* Run it through the parser to get a list of words and expand them */ + if (words && *words) + { + with_input_from_string (words, "--wordexp"); + if (parse_command () != 0) + return (126); + if (global_command == 0) + { + printf ("0\n0\n"); + return (0); + } + if (global_command->type != cm_simple) + return (126); + wl = global_command->value.Simple->words; + if (protected_mode) + for (tl = wl; tl; tl = tl->next) + tl->word->flags |= W_NOCOMSUB|W_NOPROCSUB; + result = wl ? expand_words_no_vars (wl) : (WORD_LIST *)0; + } + else + result = (WORD_LIST *)0; + + last_command_exit_value = 0; + + if (result == 0) + { + printf ("0\n0\n"); + return (0); + } + + /* Count up the number of words and bytes, and print them. Don't count + the trailing NUL byte. */ + for (nw = nb = 0, wl = result; wl; wl = wl->next) + { + nw++; + nb += strlen (wl->word->word); + } + printf ("%u\n%u\n", nw, nb); + /* Print each word on a separate line. This will have to be changed when + the interface to glibc is completed. */ + for (wl = result; wl; wl = wl->next) + printf ("%s\n", wl->word->word); + + return (0); +} +#endif + +#if defined (ONESHOT) +/* Run one command, given as the argument to the -c option. Tell + parse_and_execute not to fork for a simple command. */ +static int +run_one_command (command) + char *command; +{ + int code; + + code = setjmp_nosigs (top_level); + + if (code != NOT_JUMPED) + { +#if defined (PROCESS_SUBSTITUTION) + unlink_fifo_list (); +#endif /* PROCESS_SUBSTITUTION */ + switch (code) + { + /* Some kind of throw to top_level has occurred. */ + case FORCE_EOF: + return last_command_exit_value = 127; + case ERREXIT: + case EXITPROG: + return last_command_exit_value; + case DISCARD: + return last_command_exit_value = 1; + default: + command_error ("run_one_command", CMDERR_BADJUMP, code, 0); + } + } + return (parse_and_execute (savestring (command), "-c", SEVAL_NOHIST|SEVAL_RESETLINE)); +} +#endif /* ONESHOT */ + +static int +bind_args (argv, arg_start, arg_end, start_index) + char **argv; + int arg_start, arg_end, start_index; +{ + register int i; + WORD_LIST *args, *tl; + + for (i = arg_start, args = tl = (WORD_LIST *)NULL; i < arg_end; i++) + { + if (args == 0) + args = tl = make_word_list (make_word (argv[i]), args); + else + { + tl->next = make_word_list (make_word (argv[i]), (WORD_LIST *)NULL); + tl = tl->next; + } + } + + if (args) + { + if (start_index == 0) /* bind to $0...$n for sh -c command */ + { + /* Posix.2 4.56.3 says that the first argument after sh -c command + becomes $0, and the rest of the arguments become $1...$n */ + shell_name = savestring (args->word->word); + FREE (dollar_vars[0]); + dollar_vars[0] = savestring (args->word->word); + remember_args (args->next, 1); + if (debugging_mode) + { + push_args (args->next); /* BASH_ARGV and BASH_ARGC */ + bash_argv_initialized = 1; + } + } + else /* bind to $1...$n for shell script */ + { + remember_args (args, 1); + /* We do this unconditionally so something like -O extdebug doesn't + do it first. We're setting the definitive positional params + here. */ + if (debugging_mode) + { + push_args (args); /* BASH_ARGV and BASH_ARGC */ + bash_argv_initialized = 1; + } + } + + dispose_words (args); + } + + return (i); +} + +void +unbind_args () +{ + remember_args ((WORD_LIST *)NULL, 1); + pop_args (); /* Reset BASH_ARGV and BASH_ARGC */ +} + +static void +start_debugger () +{ +#if defined (DEBUGGER) && defined (DEBUGGER_START_FILE) + int old_errexit; + int r; + + old_errexit = exit_immediately_on_error; + exit_immediately_on_error = 0; + + r = force_execute_file (DEBUGGER_START_FILE, 1); + if (r < 0) + { + internal_warning (_("cannot start debugger; debugging mode disabled")); + debugging_mode = 0; + } + error_trace_mode = function_trace_mode = debugging_mode; + + set_shellopts (); + set_bashopts (); + + exit_immediately_on_error += old_errexit; +#endif +} + +static int +open_shell_script (script_name) + char *script_name; +{ + int fd, e, fd_is_tty; + char *filename, *path_filename, *t; + char sample[80]; + int sample_len; + struct stat sb; +#if defined (ARRAY_VARS) + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; + ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; +#endif + + filename = savestring (script_name); + + fd = open (filename, O_RDONLY); + if ((fd < 0) && (errno == ENOENT) && (absolute_program (filename) == 0)) + { + e = errno; + /* If it's not in the current directory, try looking through PATH + for it. */ + path_filename = find_path_file (script_name); + if (path_filename) + { + free (filename); + filename = path_filename; + fd = open (filename, O_RDONLY); + } + else + errno = e; + } + + if (fd < 0) + { + e = errno; + file_error (filename); +#if defined (JOB_CONTROL) + end_job_control (); /* just in case we were run as bash -i script */ +#endif + sh_exit ((e == ENOENT) ? EX_NOTFOUND : EX_NOINPUT); + } + + free (dollar_vars[0]); + dollar_vars[0] = exec_argv0 ? savestring (exec_argv0) : savestring (script_name); + if (exec_argv0) + { + free (exec_argv0); + exec_argv0 = (char *)NULL; + } + + if (file_isdir (filename)) + { +#if defined (EISDIR) + errno = EISDIR; +#else + errno = EINVAL; +#endif + file_error (filename); +#if defined (JOB_CONTROL) + end_job_control (); /* just in case we were run as bash -i script */ +#endif + sh_exit (EX_NOINPUT); + } + +#if defined (ARRAY_VARS) + GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a); + + array_push (bash_source_a, filename); + if (bash_lineno_a) + { + t = itos (executing_line_number ()); + array_push (bash_lineno_a, t); + free (t); + } + array_push (funcname_a, "main"); +#endif + +#ifdef HAVE_DEV_FD + fd_is_tty = isatty (fd); +#else + fd_is_tty = 0; +#endif + + /* Only do this with non-tty file descriptors we can seek on. */ + if (fd_is_tty == 0 && (lseek (fd, 0L, 1) != -1)) + { + /* Check to see if the `file' in `bash file' is a binary file + according to the same tests done by execute_simple_command (), + and report an error and exit if it is. */ + sample_len = read (fd, sample, sizeof (sample)); + if (sample_len < 0) + { + e = errno; + if ((fstat (fd, &sb) == 0) && S_ISDIR (sb.st_mode)) + { +#if defined (EISDIR) + errno = EISDIR; + file_error (filename); +#else + internal_error (_("%s: Is a directory"), filename); +#endif + } + else + { + errno = e; + file_error (filename); + } +#if defined (JOB_CONTROL) + end_job_control (); /* just in case we were run as bash -i script */ +#endif + exit (EX_NOEXEC); + } + else if (sample_len > 0 && (check_binary_file (sample, sample_len))) + { + internal_error (_("%s: cannot execute binary file"), filename); +#if defined (JOB_CONTROL) + end_job_control (); /* just in case we were run as bash -i script */ +#endif + exit (EX_BINARY_FILE); + } + /* Now rewind the file back to the beginning. */ + lseek (fd, 0L, 0); + } + + /* Open the script. But try to move the file descriptor to a randomly + large one, in the hopes that any descriptors used by the script will + not match with ours. */ + fd = move_to_high_fd (fd, 1, -1); + +#if defined (BUFFERED_INPUT) + default_buffered_input = fd; + SET_CLOSE_ON_EXEC (default_buffered_input); +#else /* !BUFFERED_INPUT */ + default_input = fdopen (fd, "r"); + + if (default_input == 0) + { + file_error (filename); + exit (EX_NOTFOUND); + } + + SET_CLOSE_ON_EXEC (fd); + if (fileno (default_input) != fd) + SET_CLOSE_ON_EXEC (fileno (default_input)); +#endif /* !BUFFERED_INPUT */ + + /* Just about the only way for this code to be executed is if something + like `bash -i /dev/stdin' is executed. */ + if (interactive_shell && fd_is_tty) + { + dup2 (fd, 0); + close (fd); + fd = 0; +#if defined (BUFFERED_INPUT) + default_buffered_input = 0; +#else + fclose (default_input); + default_input = stdin; +#endif + } + else if (forced_interactive && fd_is_tty == 0) + /* But if a script is called with something like `bash -i scriptname', + we need to do a non-interactive setup here, since we didn't do it + before. */ + init_interactive_script (); + + free (filename); + + reading_shell_script = 1; + return (fd); +} + +/* Initialize the input routines for the parser. */ +static void +set_bash_input () +{ + /* Make sure the fd from which we are reading input is not in + no-delay mode. */ +#if defined (BUFFERED_INPUT) + if (interactive == 0) + sh_unset_nodelay_mode (default_buffered_input); + else +#endif /* !BUFFERED_INPUT */ + sh_unset_nodelay_mode (fileno (stdin)); + + /* with_input_from_stdin really means `with_input_from_readline' */ + if (interactive && no_line_editing == 0) + with_input_from_stdin (); +#if defined (BUFFERED_INPUT) + else if (interactive == 0) + with_input_from_buffered_stream (default_buffered_input, dollar_vars[0]); +#endif /* BUFFERED_INPUT */ + else + with_input_from_stream (default_input, dollar_vars[0]); +} + +/* Close the current shell script input source and forget about it. This is + extern so execute_cmd.c:initialize_subshell() can call it. If CHECK_ZERO + is non-zero, we close default_buffered_input even if it's the standard + input (fd 0). */ +void +unset_bash_input (check_zero) + int check_zero; +{ +#if defined (BUFFERED_INPUT) + if ((check_zero && default_buffered_input >= 0) || + (check_zero == 0 && default_buffered_input > 0)) + { + close_buffered_fd (default_buffered_input); + default_buffered_input = bash_input.location.buffered_fd = -1; + bash_input.type = st_none; /* XXX */ + } +#else /* !BUFFERED_INPUT */ + if (default_input) + { + fclose (default_input); + default_input = (FILE *)NULL; + } +#endif /* !BUFFERED_INPUT */ +} + + +#if !defined (PROGRAM) +# define PROGRAM "bash" +#endif + +static void +set_shell_name (argv0) + char *argv0; +{ + /* Here's a hack. If the name of this shell is "sh", then don't do + any startup files; just try to be more like /bin/sh. */ + shell_name = argv0 ? base_pathname (argv0) : PROGRAM; + + if (argv0 && *argv0 == '-') + { + if (*shell_name == '-') + shell_name++; + login_shell = 1; + } + + if (shell_name[0] == 's' && shell_name[1] == 'h' && shell_name[2] == '\0') + act_like_sh++; + if (shell_name[0] == 's' && shell_name[1] == 'u' && shell_name[2] == '\0') + su_shell++; + + shell_name = argv0 ? argv0 : PROGRAM; + FREE (dollar_vars[0]); + dollar_vars[0] = savestring (shell_name); + + /* A program may start an interactive shell with + "execl ("/bin/bash", "-", NULL)". + If so, default the name of this shell to our name. */ + if (!shell_name || !*shell_name || (shell_name[0] == '-' && !shell_name[1])) + shell_name = PROGRAM; +} + +/* Some options are initialized to -1 so we have a way to determine whether + they were set on the command line. This is an issue when listing the option + values at invocation (`bash -o'), so we set the defaults here and reset + them after the call to list_minus_o_options (). */ +/* XXX - could also do this for histexp_flag, jobs_m_flag */ +static void +set_option_defaults () +{ +#if defined (HISTORY) + enable_history_list = 0; +#endif +} + +static void +reset_option_defaults () +{ +#if defined (HISTORY) + enable_history_list = -1; +#endif +} + +static void +init_interactive () +{ + expand_aliases = interactive_shell = startup_state = 1; + interactive = 1; +#if defined (HISTORY) + if (enable_history_list == -1) + enable_history_list = 1; /* set default */ + remember_on_history = enable_history_list; +# if defined (BANG_HISTORY) + histexp_flag = history_expansion; /* XXX */ +# endif +#endif +} + +static void +init_noninteractive () +{ +#if defined (HISTORY) + if (enable_history_list == -1) /* set default */ + enable_history_list = 0; + bash_history_reinit (0); +#endif /* HISTORY */ + interactive_shell = startup_state = interactive = 0; + expand_aliases = posixly_correct; /* XXX - was 0 not posixly_correct */ + no_line_editing = 1; +#if defined (JOB_CONTROL) + /* Even if the shell is not interactive, enable job control if the -i or + -m option is supplied at startup. */ + set_job_control (forced_interactive||jobs_m_flag); +#endif /* JOB_CONTROL */ +} + +static void +init_interactive_script () +{ +#if defined (HISTORY) + if (enable_history_list == -1) + enable_history_list = 1; +#endif + init_noninteractive (); + expand_aliases = interactive_shell = startup_state = 1; +#if defined (HISTORY) + remember_on_history = enable_history_list; /* XXX */ +#endif +} + +void +get_current_user_info () +{ + struct passwd *entry; + + /* Don't fetch this more than once. */ + if (current_user.user_name == 0) + { +#if defined (__TANDEM) + entry = getpwnam (getlogin ()); +#else + entry = getpwuid (current_user.uid); +#endif + if (entry) + { + current_user.user_name = savestring (entry->pw_name); + current_user.shell = (entry->pw_shell && entry->pw_shell[0]) + ? savestring (entry->pw_shell) + : savestring ("/bin/sh"); + current_user.home_dir = savestring (entry->pw_dir); + } + else + { + current_user.user_name = _("I have no name!"); + current_user.user_name = savestring (current_user.user_name); + current_user.shell = savestring ("/bin/sh"); + current_user.home_dir = savestring ("/"); + } +#if defined (HAVE_GETPWENT) + endpwent (); +#endif + } +} + +/* Do whatever is necessary to initialize the shell. + Put new initializations in here. */ +static void +shell_initialize () +{ + char hostname[256]; + int should_be_restricted; + + /* Line buffer output for stderr and stdout. */ + if (shell_initialized == 0) + { + sh_setlinebuf (stderr); + sh_setlinebuf (stdout); + } + + /* Sort the array of shell builtins so that the binary search in + find_shell_builtin () works correctly. */ + initialize_shell_builtins (); + + /* Initialize the trap signal handlers before installing our own + signal handlers. traps.c:restore_original_signals () is responsible + for restoring the original default signal handlers. That function + is called when we make a new child. */ + initialize_traps (); + initialize_signals (0); + + /* It's highly unlikely that this will change. */ + if (current_host_name == 0) + { + /* Initialize current_host_name. */ + if (gethostname (hostname, 255) < 0) + current_host_name = "??host??"; + else + current_host_name = savestring (hostname); + } + + /* Initialize the stuff in current_user that comes from the password + file. We don't need to do this right away if the shell is not + interactive. */ + if (interactive_shell) + get_current_user_info (); + + /* Initialize our interface to the tilde expander. */ + tilde_initialize (); + +#if defined (RESTRICTED_SHELL) + should_be_restricted = shell_is_restricted (shell_name); +#endif + + /* Initialize internal and environment variables. Don't import shell + functions from the environment if we are running in privileged or + restricted mode or if the shell is running setuid. */ +#if defined (RESTRICTED_SHELL) + initialize_shell_variables (shell_environment, privileged_mode||restricted||should_be_restricted||running_setuid); +#else + initialize_shell_variables (shell_environment, privileged_mode||running_setuid); +#endif + + /* Initialize the data structures for storing and running jobs. */ + initialize_job_control (jobs_m_flag); + + /* Initialize input streams to null. */ + initialize_bash_input (); + + initialize_flags (); + + /* Initialize the shell options. Don't import the shell options + from the environment variables $SHELLOPTS or $BASHOPTS if we are + running in privileged or restricted mode or if the shell is running + setuid. */ +#if defined (RESTRICTED_SHELL) + initialize_shell_options (privileged_mode||restricted||should_be_restricted||running_setuid); + initialize_bashopts (privileged_mode||restricted||should_be_restricted||running_setuid); +#else + initialize_shell_options (privileged_mode||running_setuid); + initialize_bashopts (privileged_mode||running_setuid); +#endif +} + +/* Function called by main () when it appears that the shell has already + had some initialization performed. This is supposed to reset the world + back to a pristine state, as if we had been exec'ed. */ +static void +shell_reinitialize () +{ + /* The default shell prompts. */ + primary_prompt = PPROMPT; + secondary_prompt = SPROMPT; + + /* Things that get 1. */ + current_command_number = 1; + + /* We have decided that the ~/.bashrc file should not be executed + for the invocation of each shell script. If the variable $ENV + (or $BASH_ENV) is set, its value is used as the name of a file + to source. */ + no_rc = no_profile = 1; + + /* Things that get 0. */ + login_shell = make_login_shell = interactive = executing = 0; + debugging = do_version = line_number = last_command_exit_value = 0; + forced_interactive = interactive_shell = 0; + subshell_environment = running_in_background = 0; + expand_aliases = 0; + bash_argv_initialized = 0; + + /* XXX - should we set jobs_m_flag to 0 here? */ + +#if defined (HISTORY) + bash_history_reinit (enable_history_list = 0); +#endif /* HISTORY */ + +#if defined (RESTRICTED_SHELL) + restricted = 0; +#endif /* RESTRICTED_SHELL */ + + /* Ensure that the default startup file is used. (Except that we don't + execute this file for reinitialized shells). */ + bashrc_file = DEFAULT_BASHRC; + + /* Delete all variables and functions. They will be reinitialized when + the environment is parsed. */ + delete_all_contexts (shell_variables); + delete_all_variables (shell_functions); + + reinit_special_variables (); + +#if defined (READLINE) + bashline_reinitialize (); +#endif + + shell_reinitialized = 1; +} + +static void +show_shell_usage (fp, extra) + FILE *fp; + int extra; +{ + int i; + char *set_opts, *s, *t; + + if (extra) + fprintf (fp, _("GNU bash, version %s-(%s)\n"), shell_version_string (), MACHTYPE); + fprintf (fp, _("Usage:\t%s [GNU long option] [option] ...\n\t%s [GNU long option] [option] script-file ...\n"), + shell_name, shell_name); + fputs (_("GNU long options:\n"), fp); + for (i = 0; long_args[i].name; i++) + fprintf (fp, "\t--%s\n", long_args[i].name); + + fputs (_("Shell options:\n"), fp); + fputs (_("\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n"), fp); + + for (i = 0, set_opts = 0; shell_builtins[i].name; i++) + if (STREQ (shell_builtins[i].name, "set")) + { + set_opts = savestring (shell_builtins[i].short_doc); + break; + } + + if (set_opts) + { + s = strchr (set_opts, '['); + if (s == 0) + s = set_opts; + while (*++s == '-') + ; + t = strchr (s, ']'); + if (t) + *t = '\0'; + fprintf (fp, _("\t-%s or -o option\n"), s); + free (set_opts); + } + + if (extra) + { + fprintf (fp, _("Type `%s -c \"help set\"' for more information about shell options.\n"), shell_name); + fprintf (fp, _("Type `%s -c help' for more information about shell builtin commands.\n"), shell_name); + fprintf (fp, _("Use the `bashbug' command to report bugs.\n")); + fprintf (fp, "\n"); + fprintf (fp, _("bash home page: \n")); + fprintf (fp, _("General help using GNU software: \n")); + } +} + +static void +add_shopt_to_alist (opt, on_or_off) + char *opt; + int on_or_off; +{ + if (shopt_ind >= shopt_len) + { + shopt_len += 8; + shopt_alist = (STRING_INT_ALIST *)xrealloc (shopt_alist, shopt_len * sizeof (shopt_alist[0])); + } + shopt_alist[shopt_ind].word = opt; + shopt_alist[shopt_ind].token = on_or_off; + shopt_ind++; +} + +static void +run_shopt_alist () +{ + register int i; + + for (i = 0; i < shopt_ind; i++) + if (shopt_setopt (shopt_alist[i].word, (shopt_alist[i].token == '-')) != EXECUTION_SUCCESS) + exit (EX_BADUSAGE); + free (shopt_alist); + shopt_alist = 0; + shopt_ind = shopt_len = 0; +} diff --git a/bash-5.1/shell.h b/bash-5.1/shell.h new file mode 100644 index 0000000000000000000000000000000000000000..29b0efb8e3a8178cd295c089d4c1ffd535610d38 --- /dev/null +++ b/bash-5.1/shell.h @@ -0,0 +1,230 @@ +/* shell.h -- The data structures used by the shell */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "bashjmp.h" + +#include "command.h" +#include "syntax.h" +#include "general.h" +#include "error.h" +#include "variables.h" +#include "arrayfunc.h" +#include "quit.h" +#include "maxpath.h" +#include "unwind_prot.h" +#include "dispose_cmd.h" +#include "make_cmd.h" +#include "ocache.h" +#include "subst.h" +#include "sig.h" +#include "pathnames.h" +#include "externs.h" + +extern int EOF_Reached; + +#define NO_PIPE -1 +#define REDIRECT_BOTH -2 + +#define NO_VARIABLE -1 + +/* Values that can be returned by execute_command (). */ +#define EXECUTION_FAILURE 1 +#define EXECUTION_SUCCESS 0 + +/* Usage messages by builtins result in a return status of 2. */ +#define EX_BADUSAGE 2 + +#define EX_MISCERROR 2 + +/* Special exit statuses used by the shell, internally and externally. */ +#define EX_RETRYFAIL 124 +#define EX_WEXPCOMSUB 125 +#define EX_BINARY_FILE 126 +#define EX_NOEXEC 126 +#define EX_NOINPUT 126 +#define EX_NOTFOUND 127 + +#define EX_SHERRBASE 256 /* all special error values are > this. */ + +#define EX_BADSYNTAX 257 /* shell syntax error */ +#define EX_USAGE 258 /* syntax error in usage */ +#define EX_REDIRFAIL 259 /* redirection failed */ +#define EX_BADASSIGN 260 /* variable assignment error */ +#define EX_EXPFAIL 261 /* word expansion failed */ +#define EX_DISKFALLBACK 262 /* fall back to disk command from builtin */ + +/* Flag values that control parameter pattern substitution. */ +#define MATCH_ANY 0x000 +#define MATCH_BEG 0x001 +#define MATCH_END 0x002 + +#define MATCH_TYPEMASK 0x003 + +#define MATCH_GLOBREP 0x010 +#define MATCH_QUOTED 0x020 +#define MATCH_ASSIGNRHS 0x040 +#define MATCH_STARSUB 0x080 + +/* Some needed external declarations. */ +extern char **shell_environment; +extern WORD_LIST *rest_of_args; + +/* Generalized global variables. */ +extern char *command_execution_string; + +extern int debugging_mode; +extern int executing, login_shell; +extern int interactive, interactive_shell; +extern int startup_state; +extern int reading_shell_script; +extern int shell_initialized; +extern int rpm_requires; +extern int bash_argv_initialized; +extern int subshell_environment; +extern int current_command_number; +extern int indirection_level; +extern int shell_compatibility_level; +extern int running_under_emacs; + +extern int posixly_correct; +extern int no_line_editing; + +extern char *shell_name; +extern char *current_host_name; + +extern int subshell_argc; +extern char **subshell_argv; +extern char **subshell_envp; + +/* variables managed using shopt */ +extern int hup_on_exit; +extern int check_jobs_at_exit; +extern int autocd; +extern int check_window_size; + +/* from version.c */ +extern int build_version, patch_level; +extern char *dist_version, *release_status; + +extern int locale_mb_cur_max; +extern int locale_utf8locale; + +/* Structure to pass around that holds a bitmap of file descriptors + to close, and the size of that structure. Used in execute_cmd.c. */ +struct fd_bitmap { + int size; + char *bitmap; +}; + +#define FD_BITMAP_SIZE 32 + +#define CTLESC '\001' +#define CTLNUL '\177' + +/* Information about the current user. */ +struct user_info { + uid_t uid, euid; + gid_t gid, egid; + char *user_name; + char *shell; /* shell from the password file */ + char *home_dir; +}; + +extern struct user_info current_user; + +/* Force gcc to not clobber X on a longjmp(). Old versions of gcc mangle + this badly. */ +#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 8) +# define USE_VAR(x) ((void) &(x)) +#else +# define USE_VAR(x) +#endif + +#define HEREDOC_MAX 16 + +/* Structure in which to save partial parsing state when doing things like + PROMPT_COMMAND and bash_execute_unix_command execution. */ + +typedef struct _sh_parser_state_t { + + /* parsing state */ + int parser_state; + int *token_state; + + char *token; + int token_buffer_size; + + /* input line state -- line number saved elsewhere */ + int input_line_terminator; + int eof_encountered; + +#if defined (HANDLE_MULTIBYTE) + /* Nothing right now for multibyte state, but might want something later. */ +#endif + + char **prompt_string_pointer; + + /* history state affecting or modified by the parser */ + int current_command_line_count; +#if defined (HISTORY) + int remember_on_history; + int history_expansion_inhibited; +#endif + + /* execution state possibly modified by the parser */ + int last_command_exit_value; +#if defined (ARRAY_VARS) + ARRAY *pipestatus; +#endif + sh_builtin_func_t *last_shell_builtin, *this_shell_builtin; + + /* flags state affecting the parser */ + int expand_aliases; + int echo_input_at_read; + int need_here_doc; + int here_doc_first_line; + + /* structures affecting the parser */ + REDIRECT *redir_stack[HEREDOC_MAX]; +} sh_parser_state_t; + +typedef struct _sh_input_line_state_t { + char *input_line; + size_t input_line_index; + size_t input_line_size; + size_t input_line_len; +#if defined (HANDLE_MULTIBYTE) + char *input_property; + size_t input_propsize; +#endif +} sh_input_line_state_t; + +/* Let's try declaring these here. */ +extern char *parser_remaining_input PARAMS((void)); + +extern sh_parser_state_t *save_parser_state PARAMS((sh_parser_state_t *)); +extern void restore_parser_state PARAMS((sh_parser_state_t *)); + +extern sh_input_line_state_t *save_input_line_state PARAMS((sh_input_line_state_t *)); +extern void restore_input_line_state PARAMS((sh_input_line_state_t *)); diff --git a/bash-5.1/sig.c b/bash-5.1/sig.c new file mode 100644 index 0000000000000000000000000000000000000000..6964d862cb76e15e207720e20dcfefcb6d20600c --- /dev/null +++ b/bash-5.1/sig.c @@ -0,0 +1,809 @@ +/* sig.c - interface for shell signal handlers and signal initialization. */ + +/* Copyright (C) 1994-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include + +#include "bashintl.h" + +#include "shell.h" +#include "execute_cmd.h" +#if defined (JOB_CONTROL) +#include "jobs.h" +#endif /* JOB_CONTROL */ +#include "siglist.h" +#include "sig.h" +#include "trap.h" + +#include "builtins/common.h" +#include "builtins/builtext.h" + +#if defined (READLINE) +# include "bashline.h" +# include +#endif + +#if defined (HISTORY) +# include "bashhist.h" +#endif + +extern void initialize_siglist (); + +#if !defined (JOB_CONTROL) +extern void initialize_job_signals PARAMS((void)); +#endif + +/* Non-zero after SIGINT. */ +volatile sig_atomic_t interrupt_state = 0; + +/* Non-zero after SIGWINCH */ +volatile sig_atomic_t sigwinch_received = 0; + +/* Non-zero after SIGTERM */ +volatile sig_atomic_t sigterm_received = 0; + +/* Set to the value of any terminating signal received. */ +volatile sig_atomic_t terminating_signal = 0; + +/* The environment at the top-level R-E loop. We use this in + the case of error return. */ +procenv_t top_level; + +#if defined (JOB_CONTROL) || defined (HAVE_POSIX_SIGNALS) +/* The signal masks that this shell runs with. */ +sigset_t top_level_mask; +#endif /* JOB_CONTROL */ + +/* When non-zero, we throw_to_top_level (). */ +int interrupt_immediately = 0; + +/* When non-zero, we call the terminating signal handler immediately. */ +int terminate_immediately = 0; + +#if defined (SIGWINCH) +static SigHandler *old_winch = (SigHandler *)SIG_DFL; +#endif + +static void initialize_shell_signals PARAMS((void)); + +void +initialize_signals (reinit) + int reinit; +{ + initialize_shell_signals (); + initialize_job_signals (); +#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_STRSIGNAL) + if (reinit == 0) + initialize_siglist (); +#endif /* !HAVE_SYS_SIGLIST && !HAVE_UNDER_SYS_SIGLIST && !HAVE_STRSIGNAL */ +} + +/* A structure describing a signal that terminates the shell if not + caught. The orig_handler member is present so children can reset + these signals back to their original handlers. */ +struct termsig { + int signum; + SigHandler *orig_handler; + int orig_flags; + int core_dump; +}; + +#define NULL_HANDLER (SigHandler *)SIG_DFL + +/* The list of signals that would terminate the shell if not caught. + We catch them, but just so that we can write the history file, + and so forth. */ +static struct termsig terminating_signals[] = { +#ifdef SIGHUP +{ SIGHUP, NULL_HANDLER, 0 }, +#endif + +#ifdef SIGINT +{ SIGINT, NULL_HANDLER, 0 }, +#endif + +#ifdef SIGILL +{ SIGILL, NULL_HANDLER, 0, 1}, +#endif + +#ifdef SIGTRAP +{ SIGTRAP, NULL_HANDLER, 0, 1 }, +#endif + +#ifdef SIGIOT +{ SIGIOT, NULL_HANDLER, 0, 1 }, +#endif + +#ifdef SIGDANGER +{ SIGDANGER, NULL_HANDLER, 0 }, +#endif + +#ifdef SIGEMT +{ SIGEMT, NULL_HANDLER, 0 }, +#endif + +#ifdef SIGFPE +{ SIGFPE, NULL_HANDLER, 0, 1 }, +#endif + +#ifdef SIGBUS +{ SIGBUS, NULL_HANDLER, 0, 1 }, +#endif + +#ifdef SIGSEGV +{ SIGSEGV, NULL_HANDLER, 0, 1 }, +#endif + +#ifdef SIGSYS +{ SIGSYS, NULL_HANDLER, 0, 1 }, +#endif + +#ifdef SIGPIPE +{ SIGPIPE, NULL_HANDLER, 0 }, +#endif + +#ifdef SIGALRM +{ SIGALRM, NULL_HANDLER, 0 }, +#endif + +#ifdef SIGTERM +{ SIGTERM, NULL_HANDLER, 0 }, +#endif + +/* These don't generate core dumps on anything but Linux, but we're doing + this just for Linux anyway. */ +#ifdef SIGXCPU +{ SIGXCPU, NULL_HANDLER, 0, 1 }, +#endif + +#ifdef SIGXFSZ +{ SIGXFSZ, NULL_HANDLER, 0, 1 }, +#endif + +#ifdef SIGVTALRM +{ SIGVTALRM, NULL_HANDLER, 0 }, +#endif + +#if 0 +#ifdef SIGPROF +{ SIGPROF, NULL_HANDLER, 0 }, +#endif +#endif + +#ifdef SIGLOST +{ SIGLOST, NULL_HANDLER, 0 }, +#endif + +#ifdef SIGUSR1 +{ SIGUSR1, NULL_HANDLER, 0 }, +#endif + +#ifdef SIGUSR2 +{ SIGUSR2, NULL_HANDLER, 0 }, +#endif +}; + +#define TERMSIGS_LENGTH (sizeof (terminating_signals) / sizeof (struct termsig)) + +#define XSIG(x) (terminating_signals[x].signum) +#define XHANDLER(x) (terminating_signals[x].orig_handler) +#define XSAFLAGS(x) (terminating_signals[x].orig_flags) +#define XCOREDUMP(x) (terminating_signals[x].core_dump) + +static int termsigs_initialized = 0; + +/* Initialize signals that will terminate the shell to do some + unwind protection. For non-interactive shells, we only call + this when a trap is defined for EXIT (0) or when trap is run + to display signal dispositions. */ +void +initialize_terminating_signals () +{ + register int i; +#if defined (HAVE_POSIX_SIGNALS) + struct sigaction act, oact; +#endif + + if (termsigs_initialized) + return; + + /* The following code is to avoid an expensive call to + set_signal_handler () for each terminating_signals. Fortunately, + this is possible in Posix. Unfortunately, we have to call signal () + on non-Posix systems for each signal in terminating_signals. */ +#if defined (HAVE_POSIX_SIGNALS) + act.sa_handler = termsig_sighandler; + act.sa_flags = 0; + sigemptyset (&act.sa_mask); + sigemptyset (&oact.sa_mask); + for (i = 0; i < TERMSIGS_LENGTH; i++) + sigaddset (&act.sa_mask, XSIG (i)); + for (i = 0; i < TERMSIGS_LENGTH; i++) + { + /* If we've already trapped it, don't do anything. */ + if (signal_is_trapped (XSIG (i))) + continue; + + sigaction (XSIG (i), &act, &oact); + XHANDLER(i) = oact.sa_handler; + XSAFLAGS(i) = oact.sa_flags; + /* Don't do anything with signals that are ignored at shell entry + if the shell is not interactive. */ + /* XXX - should we do this for interactive shells, too? */ + if (interactive_shell == 0 && XHANDLER (i) == SIG_IGN) + { + sigaction (XSIG (i), &oact, &act); + set_signal_hard_ignored (XSIG (i)); + } +#if defined (SIGPROF) && !defined (_MINIX) + if (XSIG (i) == SIGPROF && XHANDLER (i) != SIG_DFL && XHANDLER (i) != SIG_IGN) + sigaction (XSIG (i), &oact, (struct sigaction *)NULL); +#endif /* SIGPROF && !_MINIX */ + } +#else /* !HAVE_POSIX_SIGNALS */ + + for (i = 0; i < TERMSIGS_LENGTH; i++) + { + /* If we've already trapped it, don't do anything. */ + if (signal_is_trapped (XSIG (i))) + continue; + + XHANDLER(i) = signal (XSIG (i), termsig_sighandler); + XSAFLAGS(i) = 0; + /* Don't do anything with signals that are ignored at shell entry + if the shell is not interactive. */ + /* XXX - should we do this for interactive shells, too? */ + if (interactive_shell == 0 && XHANDLER (i) == SIG_IGN) + { + signal (XSIG (i), SIG_IGN); + set_signal_hard_ignored (XSIG (i)); + } +#ifdef SIGPROF + if (XSIG (i) == SIGPROF && XHANDLER (i) != SIG_DFL && XHANDLER (i) != SIG_IGN) + signal (XSIG (i), XHANDLER (i)); +#endif + } + +#endif /* !HAVE_POSIX_SIGNALS */ + + termsigs_initialized = 1; +} + +static void +initialize_shell_signals () +{ + if (interactive) + initialize_terminating_signals (); + +#if defined (JOB_CONTROL) || defined (HAVE_POSIX_SIGNALS) + /* All shells use the signal mask they inherit, and pass it along + to child processes. Children will never block SIGCHLD, though. */ + sigemptyset (&top_level_mask); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &top_level_mask); +# if defined (SIGCHLD) + if (sigismember (&top_level_mask, SIGCHLD)) + { + sigdelset (&top_level_mask, SIGCHLD); + sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL); + } +# endif +#endif /* JOB_CONTROL || HAVE_POSIX_SIGNALS */ + + /* And, some signals that are specifically ignored by the shell. */ + set_signal_handler (SIGQUIT, SIG_IGN); + + if (interactive) + { + set_signal_handler (SIGINT, sigint_sighandler); + get_original_signal (SIGTERM); + set_signal_handler (SIGTERM, SIG_IGN); + set_sigwinch_handler (); + } +} + +void +reset_terminating_signals () +{ + register int i; +#if defined (HAVE_POSIX_SIGNALS) + struct sigaction act; +#endif + + if (termsigs_initialized == 0) + return; + +#if defined (HAVE_POSIX_SIGNALS) + act.sa_flags = 0; + sigemptyset (&act.sa_mask); + for (i = 0; i < TERMSIGS_LENGTH; i++) + { + /* Skip a signal if it's trapped or handled specially, because the + trap code will restore the correct value. */ + if (signal_is_trapped (XSIG (i)) || signal_is_special (XSIG (i))) + continue; + + act.sa_handler = XHANDLER (i); + act.sa_flags = XSAFLAGS (i); + sigaction (XSIG (i), &act, (struct sigaction *) NULL); + } +#else /* !HAVE_POSIX_SIGNALS */ + for (i = 0; i < TERMSIGS_LENGTH; i++) + { + if (signal_is_trapped (XSIG (i)) || signal_is_special (XSIG (i))) + continue; + + signal (XSIG (i), XHANDLER (i)); + } +#endif /* !HAVE_POSIX_SIGNALS */ + + termsigs_initialized = 0; +} +#undef XHANDLER + +/* Run some of the cleanups that should be performed when we run + jump_to_top_level from a builtin command context. XXX - might want to + also call reset_parser here. */ +void +top_level_cleanup () +{ + /* Clean up string parser environment. */ + while (parse_and_execute_level) + parse_and_execute_cleanup (-1); + +#if defined (PROCESS_SUBSTITUTION) + unlink_fifo_list (); +#endif /* PROCESS_SUBSTITUTION */ + + run_unwind_protects (); + loop_level = continuing = breaking = funcnest = 0; + executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0; +} + +/* What to do when we've been interrupted, and it is safe to handle it. */ +void +throw_to_top_level () +{ + int print_newline = 0; + + if (interrupt_state) + { + if (last_command_exit_value < 128) + last_command_exit_value = 128 + SIGINT; + set_pipestatus_from_exit (last_command_exit_value); + print_newline = 1; + DELINTERRUPT; + } + + if (interrupt_state) + return; + + last_command_exit_signal = (last_command_exit_value > 128) ? + (last_command_exit_value - 128) : 0; + last_command_exit_value |= 128; + set_pipestatus_from_exit (last_command_exit_value); + + /* Run any traps set on SIGINT, mostly for interactive shells */ + if (signal_is_trapped (SIGINT) && signal_is_pending (SIGINT)) + run_interrupt_trap (1); + + /* Clean up string parser environment. */ + while (parse_and_execute_level) + parse_and_execute_cleanup (-1); + + if (running_trap > 0) + { + run_trap_cleanup (running_trap - 1); + running_trap = 0; + } + +#if defined (JOB_CONTROL) + give_terminal_to (shell_pgrp, 0); +#endif /* JOB_CONTROL */ + + /* This needs to stay because jobs.c:make_child() uses it without resetting + the signal mask. */ + restore_sigmask (); + + reset_parser (); + +#if defined (READLINE) + if (interactive) + bashline_reset (); +#endif /* READLINE */ + +#if defined (PROCESS_SUBSTITUTION) + unlink_fifo_list (); +#endif /* PROCESS_SUBSTITUTION */ + + run_unwind_protects (); + loop_level = continuing = breaking = funcnest = 0; + executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0; + + if (interactive && print_newline) + { + fflush (stdout); + fprintf (stderr, "\n"); + fflush (stderr); + } + + /* An interrupted `wait' command in a script does not exit the script. */ + if (interactive || (interactive_shell && !shell_initialized) || + (print_newline && signal_is_trapped (SIGINT))) + jump_to_top_level (DISCARD); + else + jump_to_top_level (EXITPROG); +} + +/* This is just here to isolate the longjmp calls. */ +void +jump_to_top_level (value) + int value; +{ + sh_longjmp (top_level, value); +} + +void +restore_sigmask () +{ +#if defined (JOB_CONTROL) || defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL); +#endif +} + +sighandler +termsig_sighandler (sig) + int sig; +{ + /* If we get called twice with the same signal before handling it, + terminate right away. */ + if ( +#ifdef SIGHUP + sig != SIGHUP && +#endif +#ifdef SIGINT + sig != SIGINT && +#endif +#ifdef SIGDANGER + sig != SIGDANGER && +#endif +#ifdef SIGPIPE + sig != SIGPIPE && +#endif +#ifdef SIGALRM + sig != SIGALRM && +#endif +#ifdef SIGTERM + sig != SIGTERM && +#endif +#ifdef SIGXCPU + sig != SIGXCPU && +#endif +#ifdef SIGXFSZ + sig != SIGXFSZ && +#endif +#ifdef SIGVTALRM + sig != SIGVTALRM && +#endif +#ifdef SIGLOST + sig != SIGLOST && +#endif +#ifdef SIGUSR1 + sig != SIGUSR1 && +#endif +#ifdef SIGUSR2 + sig != SIGUSR2 && +#endif + sig == terminating_signal) + terminate_immediately = 1; + + terminating_signal = sig; + + if (terminate_immediately) + { +#if defined (HISTORY) + /* XXX - will inhibit history file being written */ +# if defined (READLINE) + if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0)) +# endif + history_lines_this_session = 0; +#endif + terminate_immediately = 0; + termsig_handler (sig); + } + +#if defined (READLINE) + /* Set the event hook so readline will call it after the signal handlers + finish executing, so if this interrupted character input we can get + quick response. If readline is active or has modified the terminal we + need to set this no matter what the signal is, though the check for + RL_STATE_TERMPREPPED is possibly redundant. */ + if (RL_ISSTATE (RL_STATE_SIGHANDLER) || RL_ISSTATE (RL_STATE_TERMPREPPED)) + bashline_set_event_hook (); +#endif + + SIGRETURN (0); +} + +void +termsig_handler (sig) + int sig; +{ + static int handling_termsig = 0; + int i, core; + sigset_t mask; + + /* Simple semaphore to keep this function from being executed multiple + times. Since we no longer are running as a signal handler, we don't + block multiple occurrences of the terminating signals while running. */ + if (handling_termsig) + return; + handling_termsig = 1; + terminating_signal = 0; /* keep macro from re-testing true. */ + + /* I don't believe this condition ever tests true. */ + if (sig == SIGINT && signal_is_trapped (SIGINT)) + run_interrupt_trap (0); + +#if defined (HISTORY) + /* If we don't do something like this, the history will not be saved when + an interactive shell is running in a terminal window that gets closed + with the `close' button. We can't test for RL_STATE_READCMD because + readline no longer handles SIGTERM synchronously. */ + if (interactive_shell && interactive && (sig == SIGHUP || sig == SIGTERM) && remember_on_history) + maybe_save_shell_history (); +#endif /* HISTORY */ + + if (this_shell_builtin == read_builtin) + read_tty_cleanup (); + +#if defined (JOB_CONTROL) + if (sig == SIGHUP && (interactive || (subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)))) + hangup_all_jobs (); + + if ((subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)) == 0) + end_job_control (); +#endif /* JOB_CONTROL */ + +#if defined (PROCESS_SUBSTITUTION) + unlink_all_fifos (); +# if defined (JOB_CONTROL) + procsub_clear (); +# endif +#endif /* PROCESS_SUBSTITUTION */ + + /* Reset execution context */ + loop_level = continuing = breaking = funcnest = 0; + executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0; + + run_exit_trap (); /* XXX - run exit trap possibly in signal context? */ + + /* We don't change the set of blocked signals. If a user starts the shell + with a terminating signal blocked, we won't get here (and if by some + magic chance we do, we'll exit below). What we do is to restore the + top-level signal mask, in case this is called from a terminating signal + handler context, in which case the signal is blocked. */ + restore_sigmask (); + + set_signal_handler (sig, SIG_DFL); + + kill (getpid (), sig); + + if (dollar_dollar_pid != 1) + exit (128+sig); /* just in case the kill fails? */ + + /* We get here only under extraordinary circumstances. */ + + /* We are PID 1, and the kill above failed to kill the process. We assume + this means that we are running as an init process in a pid namespace + on Linux. In this case, we can't send ourselves a fatal signal, so we + determine whether or not we should have generated a core dump with the + kill call and attempt to trick the kernel into generating one if + necessary. */ + sigprocmask (SIG_SETMASK, (sigset_t *)NULL, &mask); + for (i = core = 0; i < TERMSIGS_LENGTH; i++) + { + set_signal_handler (XSIG (i), SIG_DFL); + sigdelset (&mask, XSIG (i)); + if (sig == XSIG (i)) + core = XCOREDUMP (i); + } + sigprocmask (SIG_SETMASK, &mask, (sigset_t *)NULL); + + if (core) + *((volatile unsigned long *) NULL) = 0xdead0000 + sig; /* SIGSEGV */ + + exit (128+sig); +} +#undef XSIG + +/* What we really do when SIGINT occurs. */ +sighandler +sigint_sighandler (sig) + int sig; +{ +#if defined (MUST_REINSTALL_SIGHANDLERS) + signal (sig, sigint_sighandler); +#endif + + /* interrupt_state needs to be set for the stack of interrupts to work + right. Should it be set unconditionally? */ + if (interrupt_state == 0) + ADDINTERRUPT; + + /* We will get here in interactive shells with job control active; allow + an interactive wait to be interrupted. wait_intr_flag is only set during + the execution of the wait builtin and when wait_intr_buf is valid. */ + if (wait_intr_flag) + { + last_command_exit_value = 128 + sig; + set_pipestatus_from_exit (last_command_exit_value); + wait_signal_received = sig; + SIGRETURN (0); + } + + /* In interactive shells, we will get here instead of trap_handler() so + note that we have a trap pending. */ + if (signal_is_trapped (sig)) + set_trap_state (sig); + + /* This is no longer used, but this code block remains as a reminder. */ + if (interrupt_immediately) + { + interrupt_immediately = 0; + set_exit_status (128 + sig); + throw_to_top_level (); + } +#if defined (READLINE) + /* Set the event hook so readline will call it after the signal handlers + finish executing, so if this interrupted character input we can get + quick response. */ + else if (RL_ISSTATE (RL_STATE_SIGHANDLER)) + bashline_set_event_hook (); +#endif + + SIGRETURN (0); +} + +#if defined (SIGWINCH) +sighandler +sigwinch_sighandler (sig) + int sig; +{ +#if defined (MUST_REINSTALL_SIGHANDLERS) + set_signal_handler (SIGWINCH, sigwinch_sighandler); +#endif /* MUST_REINSTALL_SIGHANDLERS */ + sigwinch_received = 1; + SIGRETURN (0); +} +#endif /* SIGWINCH */ + +void +set_sigwinch_handler () +{ +#if defined (SIGWINCH) + old_winch = set_signal_handler (SIGWINCH, sigwinch_sighandler); +#endif +} + +void +unset_sigwinch_handler () +{ +#if defined (SIGWINCH) + set_signal_handler (SIGWINCH, old_winch); +#endif +} + +sighandler +sigterm_sighandler (sig) + int sig; +{ + sigterm_received = 1; /* XXX - counter? */ + SIGRETURN (0); +} + +/* Signal functions used by the rest of the code. */ +#if !defined (HAVE_POSIX_SIGNALS) + +/* Perform OPERATION on NEWSET, perhaps leaving information in OLDSET. */ +sigprocmask (operation, newset, oldset) + int operation, *newset, *oldset; +{ + int old, new; + + if (newset) + new = *newset; + else + new = 0; + + switch (operation) + { + case SIG_BLOCK: + old = sigblock (new); + break; + + case SIG_SETMASK: + old = sigsetmask (new); + break; + + default: + internal_error (_("sigprocmask: %d: invalid operation"), operation); + } + + if (oldset) + *oldset = old; +} + +#else + +#if !defined (SA_INTERRUPT) +# define SA_INTERRUPT 0 +#endif + +#if !defined (SA_RESTART) +# define SA_RESTART 0 +#endif + +SigHandler * +set_signal_handler (sig, handler) + int sig; + SigHandler *handler; +{ + struct sigaction act, oact; + + act.sa_handler = handler; + act.sa_flags = 0; + + /* XXX - bash-4.2 */ + /* We don't want a child death to interrupt interruptible system calls, even + if we take the time to reap children */ +#if defined (SIGCHLD) + if (sig == SIGCHLD) + act.sa_flags |= SA_RESTART; /* XXX */ +#endif + /* Let's see if we can keep SIGWINCH from interrupting interruptible system + calls, like open(2)/read(2)/write(2) */ +#if defined (SIGWINCH) + if (sig == SIGWINCH) + act.sa_flags |= SA_RESTART; /* XXX */ +#endif + /* If we're installing a SIGTERM handler for interactive shells, we want + it to be as close to SIG_IGN as possible. */ + if (sig == SIGTERM && handler == sigterm_sighandler) + act.sa_flags |= SA_RESTART; /* XXX */ + + sigemptyset (&act.sa_mask); + sigemptyset (&oact.sa_mask); + if (sigaction (sig, &act, &oact) == 0) + return (oact.sa_handler); + else + return (SIG_DFL); +} +#endif /* HAVE_POSIX_SIGNALS */ diff --git a/bash-5.1/sig.h b/bash-5.1/sig.h new file mode 100644 index 0000000000000000000000000000000000000000..a564e3cd9a857314695a07014d69065cecd27f31 --- /dev/null +++ b/bash-5.1/sig.h @@ -0,0 +1,140 @@ +/* sig.h -- header file for signal handler definitions. */ + +/* Copyright (C) 1994-2013 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Make sure that this is included *after* config.h! */ + +#if !defined (_SIG_H_) +# define _SIG_H_ + +#include "stdc.h" + +#include /* for sig_atomic_t */ + +#if !defined (SIGABRT) && defined (SIGIOT) +# define SIGABRT SIGIOT +#endif + +#define sighandler RETSIGTYPE +typedef RETSIGTYPE SigHandler PARAMS((int)); + +#if defined (VOID_SIGHANDLER) +# define SIGRETURN(n) return +#else +# define SIGRETURN(n) return(n) +#endif /* !VOID_SIGHANDLER */ + +/* Here is a definition for set_signal_handler () which simply expands to + a call to signal () for non-Posix systems. The code for set_signal_handler + in the Posix case resides in general.c. */ +#if !defined (HAVE_POSIX_SIGNALS) +# define set_signal_handler(sig, handler) (SigHandler *)signal (sig, handler) +#else +extern SigHandler *set_signal_handler PARAMS((int, SigHandler *)); /* in sig.c */ +#endif /* _POSIX_VERSION */ + +#if !defined (SIGCHLD) && defined (SIGCLD) +# define SIGCHLD SIGCLD +#endif + +#if !defined (HAVE_POSIX_SIGNALS) && !defined (sigmask) +# define sigmask(x) (1 << ((x)-1)) +#endif /* !HAVE_POSIX_SIGNALS && !sigmask */ + +#if !defined (HAVE_POSIX_SIGNALS) +# if !defined (SIG_BLOCK) +# define SIG_BLOCK 2 +# define SIG_SETMASK 3 +# endif /* SIG_BLOCK */ + +/* sigset_t defined in config.h */ + +/* Make sure there is nothing inside the signal set. */ +# define sigemptyset(set) (*(set) = 0) + +/* Initialize the signal set to hold all signals. */ +# define sigfillset(set) (*set) = sigmask (NSIG) - 1 + +/* Add SIG to the contents of SET. */ +# define sigaddset(set, sig) *(set) |= sigmask (sig) + +/* Delete SIG from signal set SET. */ +# define sigdelset(set, sig) *(set) &= ~sigmask (sig) + +/* Is SIG a member of the signal set SET? */ +# define sigismember(set, sig) ((*(set) & sigmask (sig)) != 0) + +/* Suspend the process until the reception of one of the signals + not present in SET. */ +# define sigsuspend(set) sigpause (*(set)) +#endif /* !HAVE_POSIX_SIGNALS */ + +/* These definitions are used both in POSIX and non-POSIX implementations. */ + +#define BLOCK_SIGNAL(sig, nvar, ovar) \ +do { \ + sigemptyset (&nvar); \ + sigaddset (&nvar, sig); \ + sigemptyset (&ovar); \ + sigprocmask (SIG_BLOCK, &nvar, &ovar); \ +} while (0) + +#define UNBLOCK_SIGNAL(ovar) sigprocmask (SIG_SETMASK, &ovar, (sigset_t *) NULL) + +#if defined (HAVE_POSIX_SIGNALS) +# define BLOCK_CHILD(nvar, ovar) BLOCK_SIGNAL (SIGCHLD, nvar, ovar) +# define UNBLOCK_CHILD(ovar) UNBLOCK_SIGNAL(ovar) +#else /* !HAVE_POSIX_SIGNALS */ +# define BLOCK_CHILD(nvar, ovar) ovar = sigblock (sigmask (SIGCHLD)) +# define UNBLOCK_CHILD(ovar) sigsetmask (ovar) +#endif /* !HAVE_POSIX_SIGNALS */ + +/* Extern variables */ +extern volatile sig_atomic_t sigwinch_received; +extern volatile sig_atomic_t sigterm_received; + +extern int interrupt_immediately; /* no longer used */ +extern int terminate_immediately; + +/* Functions from sig.c. */ +extern sighandler termsig_sighandler PARAMS((int)); +extern void termsig_handler PARAMS((int)); +extern sighandler sigint_sighandler PARAMS((int)); +extern void initialize_signals PARAMS((int)); +extern void initialize_terminating_signals PARAMS((void)); +extern void reset_terminating_signals PARAMS((void)); +extern void top_level_cleanup PARAMS((void)); +extern void throw_to_top_level PARAMS((void)); +extern void jump_to_top_level PARAMS((int)) __attribute__((__noreturn__)); +extern void restore_sigmask PARAMS((void)); + +extern sighandler sigwinch_sighandler PARAMS((int)); +extern void set_sigwinch_handler PARAMS((void)); +extern void unset_sigwinch_handler PARAMS((void)); + +extern sighandler sigterm_sighandler PARAMS((int)); + +/* Functions defined in trap.c. */ +extern SigHandler *set_sigint_handler PARAMS((void)); +extern SigHandler *trap_to_sighandler PARAMS((int)); +extern sighandler trap_handler PARAMS((int)); + +extern int block_trapped_signals PARAMS((sigset_t *, sigset_t *)); +extern int unblock_trapped_signals PARAMS((sigset_t *)); +#endif /* _SIG_H_ */ diff --git a/bash-5.1/siglist.c b/bash-5.1/siglist.c new file mode 100644 index 0000000000000000000000000000000000000000..d8361dd791aad5a6e87dac8076a58e4daa02f4ed --- /dev/null +++ b/bash-5.1/siglist.c @@ -0,0 +1,228 @@ +/* siglist.c -- signal list for those machines that don't have one. */ + +/* Copyright (C) 1989-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_STRSIGNAL) + +#include +#include "general.h" +#include + +#include "siglist.h" + +#if !defined (NSIG) +# include "trap.h" +#endif + +#include "bashintl.h" + +char *sys_siglist[NSIG]; + +void +initialize_siglist () +{ + register int i; + + for (i = 0; i < NSIG; i++) + sys_siglist[i] = (char *)0x0; + + sys_siglist[0] = _("Bogus signal"); + +#if defined (SIGHUP) + sys_siglist[SIGHUP] = _("Hangup"); +#endif + +#if defined (SIGINT) + sys_siglist[SIGINT] = _("Interrupt"); +#endif + +#if defined (SIGQUIT) + sys_siglist[SIGQUIT] = _("Quit"); +#endif + +#if defined (SIGILL) + sys_siglist[SIGILL] = _("Illegal instruction"); +#endif + +#if defined (SIGTRAP) + sys_siglist[SIGTRAP] = _("BPT trace/trap"); +#endif + +#if defined (SIGIOT) && !defined (SIGABRT) +#define SIGABRT SIGIOT +#endif + +#if defined (SIGABRT) + sys_siglist[SIGABRT] = _("ABORT instruction"); +#endif + +#if defined (SIGEMT) + sys_siglist[SIGEMT] = _("EMT instruction"); +#endif + +#if defined (SIGFPE) + sys_siglist[SIGFPE] = _("Floating point exception"); +#endif + +#if defined (SIGKILL) + sys_siglist[SIGKILL] = _("Killed"); +#endif + +#if defined (SIGBUS) + sys_siglist[SIGBUS] = _("Bus error"); +#endif + +#if defined (SIGSEGV) + sys_siglist[SIGSEGV] = _("Segmentation fault"); +#endif + +#if defined (SIGSYS) + sys_siglist[SIGSYS] = _("Bad system call"); +#endif + +#if defined (SIGPIPE) + sys_siglist[SIGPIPE] = _("Broken pipe"); +#endif + +#if defined (SIGALRM) + sys_siglist[SIGALRM] = _("Alarm clock"); +#endif + +#if defined (SIGTERM) + sys_siglist[SIGTERM] = _("Terminated"); +#endif + +#if defined (SIGURG) + sys_siglist[SIGURG] = _("Urgent IO condition"); +#endif + +#if defined (SIGSTOP) + sys_siglist[SIGSTOP] = _("Stopped (signal)"); +#endif + +#if defined (SIGTSTP) + sys_siglist[SIGTSTP] = _("Stopped"); +#endif + +#if defined (SIGCONT) + sys_siglist[SIGCONT] = _("Continue"); +#endif + +#if !defined (SIGCHLD) && defined (SIGCLD) +#define SIGCHLD SIGCLD +#endif + +#if defined (SIGCHLD) + sys_siglist[SIGCHLD] = _("Child death or stop"); +#endif + +#if defined (SIGTTIN) + sys_siglist[SIGTTIN] = _("Stopped (tty input)"); +#endif + +#if defined (SIGTTOU) + sys_siglist[SIGTTOU] = _("Stopped (tty output)"); +#endif + +#if defined (SIGIO) + sys_siglist[SIGIO] = _("I/O ready"); +#endif + +#if defined (SIGXCPU) + sys_siglist[SIGXCPU] = _("CPU limit"); +#endif + +#if defined (SIGXFSZ) + sys_siglist[SIGXFSZ] = _("File limit"); +#endif + +#if defined (SIGVTALRM) + sys_siglist[SIGVTALRM] = _("Alarm (virtual)"); +#endif + +#if defined (SIGPROF) + sys_siglist[SIGPROF] = _("Alarm (profile)"); +#endif + +#if defined (SIGWINCH) + sys_siglist[SIGWINCH] = _("Window changed"); +#endif + +#if defined (SIGLOST) + sys_siglist[SIGLOST] = _("Record lock"); +#endif + +#if defined (SIGUSR1) + sys_siglist[SIGUSR1] = _("User signal 1"); +#endif + +#if defined (SIGUSR2) + sys_siglist[SIGUSR2] = _("User signal 2"); +#endif + +#if defined (SIGMSG) + sys_siglist[SIGMSG] = _("HFT input data pending"); +#endif + +#if defined (SIGPWR) + sys_siglist[SIGPWR] = _("power failure imminent"); +#endif + +#if defined (SIGDANGER) + sys_siglist[SIGDANGER] = _("system crash imminent"); +#endif + +#if defined (SIGMIGRATE) + sys_siglist[SIGMIGRATE] = _("migrate process to another CPU"); +#endif + +#if defined (SIGPRE) + sys_siglist[SIGPRE] = _("programming error"); +#endif + +#if defined (SIGGRANT) + sys_siglist[SIGGRANT] = _("HFT monitor mode granted"); +#endif + +#if defined (SIGRETRACT) + sys_siglist[SIGRETRACT] = _("HFT monitor mode retracted"); +#endif + +#if defined (SIGSOUND) + sys_siglist[SIGSOUND] = _("HFT sound sequence has completed"); +#endif + +#if defined (SIGINFO) + sys_siglist[SIGINFO] = _("Information request"); +#endif + + for (i = 0; i < NSIG; i++) + { + if (!sys_siglist[i]) + { + sys_siglist[i] = + (char *)xmalloc (INT_STRLEN_BOUND (int) + 1 + strlen (_("Unknown Signal #%d"))); + + sprintf (sys_siglist[i], _("Unknown Signal #%d"), i); + } + } +} +#endif /* !HAVE_SYS_SIGLIST && !HAVE_UNDER_SYS_SIGLIST && !HAVE_STRSIGNAL */ diff --git a/bash-5.1/siglist.h b/bash-5.1/siglist.h new file mode 100644 index 0000000000000000000000000000000000000000..321c20c461ecfb54e64b29c30a4f874bfb4855c8 --- /dev/null +++ b/bash-5.1/siglist.h @@ -0,0 +1,44 @@ +/* siglist.h -- encapsulate various definitions for sys_siglist */ + +/* Copyright (C) 1993, 2001, 2005, 2008-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_SIGLIST_H_) +#define _SIGLIST_H_ + +#if !defined (SYS_SIGLIST_DECLARED) && !defined (HAVE_STRSIGNAL) + +#if defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_SYS_SIGLIST) && !defined (sys_siglist) +# define sys_siglist _sys_siglist +#endif /* HAVE_UNDER_SYS_SIGLIST && !HAVE_SYS_SIGLIST && !sys_siglist */ + +#if !defined (sys_siglist) +extern char *sys_siglist[]; +#endif /* !sys_siglist */ + +#endif /* !SYS_SIGLIST_DECLARED && !HAVE_STRSIGNAL */ + +#if !defined (strsignal) && !defined (HAVE_STRSIGNAL) +# define strsignal(sig) (char *)sys_siglist[sig] +#endif /* !strsignal && !HAVE_STRSIGNAL */ + +#if !defined (strsignal) && !HAVE_DECL_STRSIGNAL +extern char *strsignal PARAMS((int)); +#endif + +#endif /* _SIGLIST_H */ diff --git a/bash-5.1/stringlib.c b/bash-5.1/stringlib.c new file mode 100644 index 0000000000000000000000000000000000000000..745e5363a99ab14e194248e756b0a96bb0a6d489 --- /dev/null +++ b/bash-5.1/stringlib.c @@ -0,0 +1,287 @@ +/* stringlib.c - Miscellaneous string functions. */ + +/* Copyright (C) 1996-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" +#include +#include "chartypes.h" + +#include "shell.h" +#include "pathexp.h" + +#include + +#if defined (EXTENDED_GLOB) +# include +#endif + +/* **************************************************************** */ +/* */ +/* Functions to manage arrays of strings */ +/* */ +/* **************************************************************** */ + +/* Find STRING in ALIST, a list of string key/int value pairs. If FLAGS + is 1, STRING is treated as a pattern and matched using strmatch. */ +int +find_string_in_alist (string, alist, flags) + char *string; + STRING_INT_ALIST *alist; + int flags; +{ + register int i; + int r; + + for (i = r = 0; alist[i].word; i++) + { +#if defined (EXTENDED_GLOB) + if (flags) + r = strmatch (alist[i].word, string, FNM_EXTMATCH) != FNM_NOMATCH; + else +#endif + r = STREQ (string, alist[i].word); + + if (r) + return (alist[i].token); + } + return -1; +} + +/* Find TOKEN in ALIST, a list of string/int value pairs. Return the + corresponding string. Allocates memory for the returned + string. FLAGS is currently ignored, but reserved. */ +char * +find_token_in_alist (token, alist, flags) + int token; + STRING_INT_ALIST *alist; + int flags; +{ + register int i; + + for (i = 0; alist[i].word; i++) + { + if (alist[i].token == token) + return (savestring (alist[i].word)); + } + return ((char *)NULL); +} + +int +find_index_in_alist (string, alist, flags) + char *string; + STRING_INT_ALIST *alist; + int flags; +{ + register int i; + int r; + + for (i = r = 0; alist[i].word; i++) + { +#if defined (EXTENDED_GLOB) + if (flags) + r = strmatch (alist[i].word, string, FNM_EXTMATCH) != FNM_NOMATCH; + else +#endif + r = STREQ (string, alist[i].word); + + if (r) + return (i); + } + + return -1; +} + +/* **************************************************************** */ +/* */ +/* String Management Functions */ +/* */ +/* **************************************************************** */ + +/* Cons a new string from STRING starting at START and ending at END, + not including END. */ +char * +substring (string, start, end) + const char *string; + int start, end; +{ + register int len; + register char *result; + + len = end - start; + result = (char *)xmalloc (len + 1); + memcpy (result, string + start, len); + result[len] = '\0'; + return (result); +} + +/* Replace occurrences of PAT with REP in STRING. If GLOBAL is non-zero, + replace all occurrences, otherwise replace only the first. + This returns a new string; the caller should free it. */ +char * +strsub (string, pat, rep, global) + char *string, *pat, *rep; + int global; +{ + int patlen, replen, templen, tempsize, repl, i; + char *temp, *r; + + patlen = strlen (pat); + replen = strlen (rep); + for (temp = (char *)NULL, i = templen = tempsize = 0, repl = 1; string[i]; ) + { + if (repl && STREQN (string + i, pat, patlen)) + { + if (replen) + RESIZE_MALLOCED_BUFFER (temp, templen, replen, tempsize, (replen * 2)); + + for (r = rep; *r; ) /* can rep == "" */ + temp[templen++] = *r++; + + i += patlen ? patlen : 1; /* avoid infinite recursion */ + repl = global != 0; + } + else + { + RESIZE_MALLOCED_BUFFER (temp, templen, 1, tempsize, 16); + temp[templen++] = string[i++]; + } + } + if (temp) + temp[templen] = 0; + else + temp = savestring (string); + return (temp); +} + +/* Replace all instances of C in STRING with TEXT. TEXT may be empty or + NULL. If DO_GLOB is non-zero, we quote the replacement text for + globbing. Backslash may be used to quote C. */ +char * +strcreplace (string, c, text, do_glob) + char *string; + int c; + const char *text; + int do_glob; +{ + char *ret, *p, *r, *t; + int len, rlen, ind, tlen; + + len = STRLEN (text); + rlen = len + strlen (string) + 2; + ret = (char *)xmalloc (rlen); + + for (p = string, r = ret; p && *p; ) + { + if (*p == c) + { + if (len) + { + ind = r - ret; + if (do_glob && (glob_pattern_p (text) || strchr (text, '\\'))) + { + t = quote_globbing_chars (text); + tlen = strlen (t); + RESIZE_MALLOCED_BUFFER (ret, ind, tlen, rlen, rlen); + r = ret + ind; /* in case reallocated */ + strcpy (r, t); + r += tlen; + free (t); + } + else + { + RESIZE_MALLOCED_BUFFER (ret, ind, len, rlen, rlen); + r = ret + ind; /* in case reallocated */ + strcpy (r, text); + r += len; + } + } + p++; + continue; + } + + if (*p == '\\' && p[1] == c) + p++; + + ind = r - ret; + RESIZE_MALLOCED_BUFFER (ret, ind, 2, rlen, rlen); + r = ret + ind; /* in case reallocated */ + *r++ = *p++; + } + *r = '\0'; + + return ret; +} + +#ifdef INCLUDE_UNUSED +/* Remove all leading whitespace from STRING. This includes + newlines. STRING should be terminated with a zero. */ +void +strip_leading (string) + char *string; +{ + char *start = string; + + while (*string && (whitespace (*string) || *string == '\n')) + string++; + + if (string != start) + { + int len = strlen (string); + FASTCOPY (string, start, len); + start[len] = '\0'; + } +} +#endif + +/* Remove all trailing whitespace from STRING. This includes + newlines. If NEWLINES_ONLY is non-zero, only trailing newlines + are removed. STRING should be terminated with a zero. */ +void +strip_trailing (string, len, newlines_only) + char *string; + int len; + int newlines_only; +{ + while (len >= 0) + { + if ((newlines_only && string[len] == '\n') || + (!newlines_only && whitespace (string[len]))) + len--; + else + break; + } + string[len + 1] = '\0'; +} + +/* A wrapper for bcopy that can be prototyped in general.h */ +void +xbcopy (s, d, n) + char *s, *d; + int n; +{ + FASTCOPY (s, d, n); +} diff --git a/bash-5.1/subst.c b/bash-5.1/subst.c new file mode 100644 index 0000000000000000000000000000000000000000..bac3c756475fb67a93e79748c215f58df5f5744e --- /dev/null +++ b/bash-5.1/subst.c @@ -0,0 +1,12072 @@ +/* subst.c -- The part of the shell that does parameter, command, arithmetic, + and globbing substitutions. */ + +/* ``Have a little faith, there's magic in the night. You ain't a + beauty, but, hey, you're alright.'' */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include +#include "chartypes.h" +#if defined (HAVE_PWD_H) +# include +#endif +#include +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#define NEED_FPURGE_DECL + +#include "bashansi.h" +#include "posixstat.h" +#include "bashintl.h" + +#include "shell.h" +#include "parser.h" +#include "flags.h" +#include "jobs.h" +#include "execute_cmd.h" +#include "filecntl.h" +#include "trap.h" +#include "pathexp.h" +#include "mailcheck.h" + +#include "shmbutil.h" +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif +#include "typemax.h" + +#include "builtins/getopt.h" +#include "builtins/common.h" + +#include "builtins/builtext.h" + +#include +#include + +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +/* The size that strings change by. */ +#define DEFAULT_INITIAL_ARRAY_SIZE 112 +#define DEFAULT_ARRAY_SIZE 128 + +/* Variable types. */ +#define VT_VARIABLE 0 +#define VT_POSPARMS 1 +#define VT_ARRAYVAR 2 +#define VT_ARRAYMEMBER 3 +#define VT_ASSOCVAR 4 + +#define VT_STARSUB 128 /* $* or ${array[*]} -- used to split */ + +/* Flags for quoted_strchr */ +#define ST_BACKSL 0x01 +#define ST_CTLESC 0x02 +#define ST_SQUOTE 0x04 /* unused yet */ +#define ST_DQUOTE 0x08 /* unused yet */ + +/* These defs make it easier to use the editor. */ +#define LBRACE '{' +#define RBRACE '}' +#define LPAREN '(' +#define RPAREN ')' +#define LBRACK '[' +#define RBRACK ']' + +#if defined (HANDLE_MULTIBYTE) +#define WLPAREN L'(' +#define WRPAREN L')' +#endif + +#define DOLLAR_AT_STAR(c) ((c) == '@' || (c) == '*') +#define STR_DOLLAR_AT_STAR(s) (DOLLAR_AT_STAR ((s)[0]) && (s)[1] == '\0') + +/* Evaluates to 1 if C is one of the shell's special parameters whose length + can be taken, but is also one of the special expansion characters. */ +#define VALID_SPECIAL_LENGTH_PARAM(c) \ + ((c) == '-' || (c) == '?' || (c) == '#' || (c) == '@') + +/* Evaluates to 1 if C is one of the shell's special parameters for which an + indirect variable reference may be made. */ +#define VALID_INDIR_PARAM(c) \ + ((posixly_correct == 0 && (c) == '#') || (posixly_correct == 0 && (c) == '?') || (c) == '@' || (c) == '*') + +/* Evaluates to 1 if C is one of the OP characters that follows the parameter + in ${parameter[:]OPword}. */ +#define VALID_PARAM_EXPAND_CHAR(c) (sh_syntaxtab[(unsigned char)c] & CSUBSTOP) + +/* Evaluates to 1 if this is one of the shell's special variables. */ +#define SPECIAL_VAR(name, wi) \ + (*name && ((DIGIT (*name) && all_digits (name)) || \ + (name[1] == '\0' && (sh_syntaxtab[(unsigned char)*name] & CSPECVAR)) || \ + (wi && name[2] == '\0' && VALID_INDIR_PARAM (name[1])))) + +/* This can be used by all of the *_extract_* functions that have a similar + structure. It can't just be wrapped in a do...while(0) loop because of + the embedded `break'. The dangling else accommodates a trailing semicolon; + we could also put in a do ; while (0) */ + +#define CHECK_STRING_OVERRUN(oind, ind, len, ch) \ + if (ind >= len) \ + { \ + oind = len; \ + ch = 0; \ + break; \ + } \ + else \ + +/* An expansion function that takes a string and a quoted flag and returns + a WORD_LIST *. Used as the type of the third argument to + expand_string_if_necessary(). */ +typedef WORD_LIST *EXPFUNC PARAMS((char *, int)); + +/* Process ID of the last command executed within command substitution. */ +pid_t last_command_subst_pid = NO_PID; +pid_t current_command_subst_pid = NO_PID; + +/* Variables used to keep track of the characters in IFS. */ +SHELL_VAR *ifs_var; +char *ifs_value; +unsigned char ifs_cmap[UCHAR_MAX + 1]; +int ifs_is_set, ifs_is_null; + +#if defined (HANDLE_MULTIBYTE) +unsigned char ifs_firstc[MB_LEN_MAX]; +size_t ifs_firstc_len; +#else +unsigned char ifs_firstc; +#endif + +/* If non-zero, command substitution inherits the value of errexit option */ +int inherit_errexit = 0; + +/* Sentinel to tell when we are performing variable assignments preceding a + command name and putting them into the environment. Used to make sure + we use the temporary environment when looking up variable values. */ +int assigning_in_environment; + +/* Used to hold a list of variable assignments preceding a command. Global + so the SIGCHLD handler in jobs.c can unwind-protect it when it runs a + SIGCHLD trap and so it can be saved and restored by the trap handlers. */ +WORD_LIST *subst_assign_varlist = (WORD_LIST *)NULL; + +/* Tell the expansion functions to not longjmp back to top_level on fatal + errors. Enabled when doing completion and prompt string expansion. */ +int no_longjmp_on_fatal_error = 0; + +/* Non-zero means to allow unmatched globbed filenames to expand to + a null file. */ +int allow_null_glob_expansion; + +/* Non-zero means to throw an error when globbing fails to match anything. */ +int fail_glob_expansion; + +/* Extern functions and variables from different files. */ +extern struct fd_bitmap *current_fds_to_close; +extern int wordexp_only; + +#if defined (JOB_CONTROL) && defined (PROCESS_SUBSTITUTION) +extern PROCESS *last_procsub_child; +#endif + +#if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE) +extern wchar_t *wcsdup PARAMS((const wchar_t *)); +#endif + +#if 0 +/* Variables to keep track of which words in an expanded word list (the + output of expand_word_list_internal) are the result of globbing + expansions. GLOB_ARGV_FLAGS is used by execute_cmd.c. + (CURRENTLY UNUSED). */ +char *glob_argv_flags; +static int glob_argv_flags_size; +#endif + +static WORD_LIST *cached_quoted_dollar_at = 0; + +/* Distinguished error values to return from expansion functions */ +static WORD_LIST expand_word_error, expand_word_fatal; +static WORD_DESC expand_wdesc_error, expand_wdesc_fatal; +static char expand_param_error, expand_param_fatal, expand_param_unset; +static char extract_string_error, extract_string_fatal; + +/* Set by expand_word_unsplit and several of the expand_string_XXX functions; + used to inhibit splitting and re-joining $* on $IFS, primarily when doing + assignment statements. The idea is that if we're in a context where this + is set, we're not going to be performing word splitting, so we use the same + rules to expand $* as we would if it appeared within double quotes. */ +static int expand_no_split_dollar_star = 0; + +/* A WORD_LIST of words to be expanded by expand_word_list_internal, + without any leading variable assignments. */ +static WORD_LIST *garglist = (WORD_LIST *)NULL; + +static char *quoted_substring PARAMS((char *, int, int)); +static int quoted_strlen PARAMS((char *)); +static char *quoted_strchr PARAMS((char *, int, int)); + +static char *expand_string_if_necessary PARAMS((char *, int, EXPFUNC *)); +static inline char *expand_string_to_string_internal PARAMS((char *, int, EXPFUNC *)); +static WORD_LIST *call_expand_word_internal PARAMS((WORD_DESC *, int, int, int *, int *)); +static WORD_LIST *expand_string_internal PARAMS((char *, int)); +static WORD_LIST *expand_string_leave_quoted PARAMS((char *, int)); +static WORD_LIST *expand_string_for_rhs PARAMS((char *, int, int, int, int *, int *)); +static WORD_LIST *expand_string_for_pat PARAMS((char *, int, int *, int *)); + +static char *quote_escapes_internal PARAMS((const char *, int)); + +static WORD_LIST *list_quote_escapes PARAMS((WORD_LIST *)); +static WORD_LIST *list_dequote_escapes PARAMS((WORD_LIST *)); + +static char *make_quoted_char PARAMS((int)); +static WORD_LIST *quote_list PARAMS((WORD_LIST *)); + +static int unquoted_substring PARAMS((char *, char *)); +static int unquoted_member PARAMS((int, char *)); + +#if defined (ARRAY_VARS) +static SHELL_VAR *do_compound_assignment PARAMS((char *, char *, int)); +#endif +static int do_assignment_internal PARAMS((const WORD_DESC *, int)); + +static char *string_extract_verbatim PARAMS((char *, size_t, int *, char *, int)); +static char *string_extract PARAMS((char *, int *, char *, int)); +static char *string_extract_double_quoted PARAMS((char *, int *, int)); +static inline char *string_extract_single_quoted PARAMS((char *, int *)); +static inline int skip_single_quoted PARAMS((const char *, size_t, int, int)); +static int skip_double_quoted PARAMS((char *, size_t, int, int)); +static char *extract_delimited_string PARAMS((char *, int *, char *, char *, char *, int)); +static char *extract_dollar_brace_string PARAMS((char *, int *, int, int)); +static int skip_matched_pair PARAMS((const char *, int, int, int, int)); + +static char *pos_params PARAMS((char *, int, int, int, int)); + +static unsigned char *mb_getcharlens PARAMS((char *, int)); + +static char *remove_upattern PARAMS((char *, char *, int)); +#if defined (HANDLE_MULTIBYTE) +static wchar_t *remove_wpattern PARAMS((wchar_t *, size_t, wchar_t *, int)); +#endif +static char *remove_pattern PARAMS((char *, char *, int)); + +static int match_upattern PARAMS((char *, char *, int, char **, char **)); +#if defined (HANDLE_MULTIBYTE) +static int match_wpattern PARAMS((wchar_t *, char **, size_t, wchar_t *, int, char **, char **)); +#endif +static int match_pattern PARAMS((char *, char *, int, char **, char **)); +static int getpatspec PARAMS((int, char *)); +static char *getpattern PARAMS((char *, int, int)); +static char *variable_remove_pattern PARAMS((char *, char *, int, int)); +static char *list_remove_pattern PARAMS((WORD_LIST *, char *, int, int, int)); +static char *parameter_list_remove_pattern PARAMS((int, char *, int, int)); +#ifdef ARRAY_VARS +static char *array_remove_pattern PARAMS((SHELL_VAR *, char *, int, int, int)); +#endif +static char *parameter_brace_remove_pattern PARAMS((char *, char *, int, char *, int, int, int)); + +static char *string_var_assignment PARAMS((SHELL_VAR *, char *)); +#if defined (ARRAY_VARS) +static char *array_var_assignment PARAMS((SHELL_VAR *, int, int, int)); +#endif +static char *pos_params_assignment PARAMS((WORD_LIST *, int, int)); +static char *string_transform PARAMS((int, SHELL_VAR *, char *)); +static char *list_transform PARAMS((int, SHELL_VAR *, WORD_LIST *, int, int)); +static char *parameter_list_transform PARAMS((int, int, int)); +#if defined ARRAY_VARS +static char *array_transform PARAMS((int, SHELL_VAR *, int, int)); +#endif +static char *parameter_brace_transform PARAMS((char *, char *, int, char *, int, int, int, int)); +static int valid_parameter_transform PARAMS((char *)); + +static char *process_substitute PARAMS((char *, int)); + +static char *read_comsub PARAMS((int, int, int, int *)); + +#ifdef ARRAY_VARS +static arrayind_t array_length_reference PARAMS((char *)); +#endif + +static int valid_brace_expansion_word PARAMS((char *, int)); +static int chk_atstar PARAMS((char *, int, int, int *, int *)); +static int chk_arithsub PARAMS((const char *, int)); + +static WORD_DESC *parameter_brace_expand_word PARAMS((char *, int, int, int, arrayind_t *)); +static char *parameter_brace_find_indir PARAMS((char *, int, int, int)); +static WORD_DESC *parameter_brace_expand_indir PARAMS((char *, int, int, int, int *, int *)); +static WORD_DESC *parameter_brace_expand_rhs PARAMS((char *, char *, int, int, int, int *, int *)); +static void parameter_brace_expand_error PARAMS((char *, char *, int)); + +static int valid_length_expression PARAMS((char *)); +static intmax_t parameter_brace_expand_length PARAMS((char *)); + +static char *skiparith PARAMS((char *, int)); +static int verify_substring_values PARAMS((SHELL_VAR *, char *, char *, int, intmax_t *, intmax_t *)); +static int get_var_and_type PARAMS((char *, char *, arrayind_t, int, int, SHELL_VAR **, char **)); +static char *mb_substring PARAMS((char *, int, int)); +static char *parameter_brace_substring PARAMS((char *, char *, int, char *, int, int, int)); + +static int shouldexp_replacement PARAMS((char *)); + +static char *pos_params_pat_subst PARAMS((char *, char *, char *, int)); + +static char *parameter_brace_patsub PARAMS((char *, char *, int, char *, int, int, int)); + +static char *pos_params_casemod PARAMS((char *, char *, int, int)); +static char *parameter_brace_casemod PARAMS((char *, char *, int, int, char *, int, int, int)); + +static WORD_DESC *parameter_brace_expand PARAMS((char *, int *, int, int, int *, int *)); +static WORD_DESC *param_expand PARAMS((char *, int *, int, int *, int *, int *, int *, int)); + +static WORD_LIST *expand_word_internal PARAMS((WORD_DESC *, int, int, int *, int *)); + +static WORD_LIST *word_list_split PARAMS((WORD_LIST *)); + +static void exp_jump_to_top_level PARAMS((int)); + +static WORD_LIST *separate_out_assignments PARAMS((WORD_LIST *)); +static WORD_LIST *glob_expand_word_list PARAMS((WORD_LIST *, int)); +#ifdef BRACE_EXPANSION +static WORD_LIST *brace_expand_word_list PARAMS((WORD_LIST *, int)); +#endif +#if defined (ARRAY_VARS) +static int make_internal_declare PARAMS((char *, char *, char *)); +static void expand_compound_assignment_word PARAMS((WORD_LIST *, int)); +static WORD_LIST *expand_declaration_argument PARAMS((WORD_LIST *, WORD_LIST *)); +#endif +static WORD_LIST *shell_expand_word_list PARAMS((WORD_LIST *, int)); +static WORD_LIST *expand_word_list_internal PARAMS((WORD_LIST *, int)); + +/* **************************************************************** */ +/* */ +/* Utility Functions */ +/* */ +/* **************************************************************** */ + +#if defined (DEBUG) +void +dump_word_flags (flags) + int flags; +{ + int f; + + f = flags; + fprintf (stderr, "%d -> ", f); + if (f & W_ARRAYIND) + { + f &= ~W_ARRAYIND; + fprintf (stderr, "W_ARRAYIND%s", f ? "|" : ""); + } + if (f & W_ASSIGNASSOC) + { + f &= ~W_ASSIGNASSOC; + fprintf (stderr, "W_ASSIGNASSOC%s", f ? "|" : ""); + } + if (f & W_ASSIGNARRAY) + { + f &= ~W_ASSIGNARRAY; + fprintf (stderr, "W_ASSIGNARRAY%s", f ? "|" : ""); + } + if (f & W_SAWQUOTEDNULL) + { + f &= ~W_SAWQUOTEDNULL; + fprintf (stderr, "W_SAWQUOTEDNULL%s", f ? "|" : ""); + } + if (f & W_NOPROCSUB) + { + f &= ~W_NOPROCSUB; + fprintf (stderr, "W_NOPROCSUB%s", f ? "|" : ""); + } + if (f & W_DQUOTE) + { + f &= ~W_DQUOTE; + fprintf (stderr, "W_DQUOTE%s", f ? "|" : ""); + } + if (f & W_HASQUOTEDNULL) + { + f &= ~W_HASQUOTEDNULL; + fprintf (stderr, "W_HASQUOTEDNULL%s", f ? "|" : ""); + } + if (f & W_ASSIGNARG) + { + f &= ~W_ASSIGNARG; + fprintf (stderr, "W_ASSIGNARG%s", f ? "|" : ""); + } + if (f & W_ASSNBLTIN) + { + f &= ~W_ASSNBLTIN; + fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : ""); + } + if (f & W_ASSNGLOBAL) + { + f &= ~W_ASSNGLOBAL; + fprintf (stderr, "W_ASSNGLOBAL%s", f ? "|" : ""); + } + if (f & W_COMPASSIGN) + { + f &= ~W_COMPASSIGN; + fprintf (stderr, "W_COMPASSIGN%s", f ? "|" : ""); + } + if (f & W_EXPANDRHS) + { + f &= ~W_EXPANDRHS; + fprintf (stderr, "W_EXPANDRHS%s", f ? "|" : ""); + } + if (f & W_ITILDE) + { + f &= ~W_ITILDE; + fprintf (stderr, "W_ITILDE%s", f ? "|" : ""); + } + if (f & W_NOTILDE) + { + f &= ~W_NOTILDE; + fprintf (stderr, "W_NOTILDE%s", f ? "|" : ""); + } + if (f & W_ASSIGNRHS) + { + f &= ~W_ASSIGNRHS; + fprintf (stderr, "W_ASSIGNRHS%s", f ? "|" : ""); + } + if (f & W_NOASSNTILDE) + { + f &= ~W_NOASSNTILDE; + fprintf (stderr, "W_NOASSNTILDE%s", f ? "|" : ""); + } + if (f & W_NOCOMSUB) + { + f &= ~W_NOCOMSUB; + fprintf (stderr, "W_NOCOMSUB%s", f ? "|" : ""); + } + if (f & W_DOLLARSTAR) + { + f &= ~W_DOLLARSTAR; + fprintf (stderr, "W_DOLLARSTAR%s", f ? "|" : ""); + } + if (f & W_DOLLARAT) + { + f &= ~W_DOLLARAT; + fprintf (stderr, "W_DOLLARAT%s", f ? "|" : ""); + } + if (f & W_TILDEEXP) + { + f &= ~W_TILDEEXP; + fprintf (stderr, "W_TILDEEXP%s", f ? "|" : ""); + } + if (f & W_NOSPLIT2) + { + f &= ~W_NOSPLIT2; + fprintf (stderr, "W_NOSPLIT2%s", f ? "|" : ""); + } + if (f & W_NOSPLIT) + { + f &= ~W_NOSPLIT; + fprintf (stderr, "W_NOSPLIT%s", f ? "|" : ""); + } + if (f & W_NOBRACE) + { + f &= ~W_NOBRACE; + fprintf (stderr, "W_NOBRACE%s", f ? "|" : ""); + } + if (f & W_NOGLOB) + { + f &= ~W_NOGLOB; + fprintf (stderr, "W_NOGLOB%s", f ? "|" : ""); + } + if (f & W_SPLITSPACE) + { + f &= ~W_SPLITSPACE; + fprintf (stderr, "W_SPLITSPACE%s", f ? "|" : ""); + } + if (f & W_ASSIGNMENT) + { + f &= ~W_ASSIGNMENT; + fprintf (stderr, "W_ASSIGNMENT%s", f ? "|" : ""); + } + if (f & W_QUOTED) + { + f &= ~W_QUOTED; + fprintf (stderr, "W_QUOTED%s", f ? "|" : ""); + } + if (f & W_HASDOLLAR) + { + f &= ~W_HASDOLLAR; + fprintf (stderr, "W_HASDOLLAR%s", f ? "|" : ""); + } + if (f & W_COMPLETE) + { + f &= ~W_COMPLETE; + fprintf (stderr, "W_COMPLETE%s", f ? "|" : ""); + } + if (f & W_CHKLOCAL) + { + f &= ~W_CHKLOCAL; + fprintf (stderr, "W_CHKLOCAL%s", f ? "|" : ""); + } + if (f & W_FORCELOCAL) + { + f &= ~W_FORCELOCAL; + fprintf (stderr, "W_FORCELOCAL%s", f ? "|" : ""); + } + + fprintf (stderr, "\n"); + fflush (stderr); +} +#endif + +#ifdef INCLUDE_UNUSED +static char * +quoted_substring (string, start, end) + char *string; + int start, end; +{ + register int len, l; + register char *result, *s, *r; + + len = end - start; + + /* Move to string[start], skipping quoted characters. */ + for (s = string, l = 0; *s && l < start; ) + { + if (*s == CTLESC) + { + s++; + continue; + } + l++; + if (*s == 0) + break; + } + + r = result = (char *)xmalloc (2*len + 1); /* save room for quotes */ + + /* Copy LEN characters, including quote characters. */ + s = string + l; + for (l = 0; l < len; s++) + { + if (*s == CTLESC) + *r++ = *s++; + *r++ = *s; + l++; + if (*s == 0) + break; + } + *r = '\0'; + return result; +} +#endif + +#ifdef INCLUDE_UNUSED +/* Return the length of S, skipping over quoted characters */ +static int +quoted_strlen (s) + char *s; +{ + register char *p; + int i; + + i = 0; + for (p = s; *p; p++) + { + if (*p == CTLESC) + { + p++; + if (*p == 0) + return (i + 1); + } + i++; + } + + return i; +} +#endif + +#ifdef INCLUDE_UNUSED +/* Find the first occurrence of character C in string S, obeying shell + quoting rules. If (FLAGS & ST_BACKSL) is non-zero, backslash-escaped + characters are skipped. If (FLAGS & ST_CTLESC) is non-zero, characters + escaped with CTLESC are skipped. */ +static char * +quoted_strchr (s, c, flags) + char *s; + int c, flags; +{ + register char *p; + + for (p = s; *p; p++) + { + if (((flags & ST_BACKSL) && *p == '\\') + || ((flags & ST_CTLESC) && *p == CTLESC)) + { + p++; + if (*p == '\0') + return ((char *)NULL); + continue; + } + else if (*p == c) + return p; + } + return ((char *)NULL); +} + +/* Return 1 if CHARACTER appears in an unquoted portion of + STRING. Return 0 otherwise. CHARACTER must be a single-byte character. */ +static int +unquoted_member (character, string) + int character; + char *string; +{ + size_t slen; + int sindex, c; + DECLARE_MBSTATE; + + slen = strlen (string); + sindex = 0; + while (c = string[sindex]) + { + if (c == character) + return (1); + + switch (c) + { + default: + ADVANCE_CHAR (string, slen, sindex); + break; + + case '\\': + sindex++; + if (string[sindex]) + ADVANCE_CHAR (string, slen, sindex); + break; + + case '\'': + sindex = skip_single_quoted (string, slen, ++sindex, 0); + break; + + case '"': + sindex = skip_double_quoted (string, slen, ++sindex, 0); + break; + } + } + return (0); +} + +/* Return 1 if SUBSTR appears in an unquoted portion of STRING. */ +static int +unquoted_substring (substr, string) + char *substr, *string; +{ + size_t slen; + int sindex, c, sublen; + DECLARE_MBSTATE; + + if (substr == 0 || *substr == '\0') + return (0); + + slen = strlen (string); + sublen = strlen (substr); + for (sindex = 0; c = string[sindex]; ) + { + if (STREQN (string + sindex, substr, sublen)) + return (1); + + switch (c) + { + case '\\': + sindex++; + if (string[sindex]) + ADVANCE_CHAR (string, slen, sindex); + break; + + case '\'': + sindex = skip_single_quoted (string, slen, ++sindex, 0); + break; + + case '"': + sindex = skip_double_quoted (string, slen, ++sindex, 0); + break; + + default: + ADVANCE_CHAR (string, slen, sindex); + break; + } + } + return (0); +} +#endif + +/* Most of the substitutions must be done in parallel. In order + to avoid using tons of unclear goto's, I have some functions + for manipulating malloc'ed strings. They all take INDX, a + pointer to an integer which is the offset into the string + where manipulation is taking place. They also take SIZE, a + pointer to an integer which is the current length of the + character array for this string. */ + +/* Append SOURCE to TARGET at INDEX. SIZE is the current amount + of space allocated to TARGET. SOURCE can be NULL, in which + case nothing happens. Gets rid of SOURCE by freeing it. + Returns TARGET in case the location has changed. */ +INLINE char * +sub_append_string (source, target, indx, size) + char *source, *target; + int *indx; + size_t *size; +{ + if (source) + { + int n; + size_t srclen; + + srclen = STRLEN (source); + if (srclen >= (int)(*size - *indx)) + { + n = srclen + *indx; + n = (n + DEFAULT_ARRAY_SIZE) - (n % DEFAULT_ARRAY_SIZE); + target = (char *)xrealloc (target, (*size = n)); + } + + FASTCOPY (source, target + *indx, srclen); + *indx += srclen; + target[*indx] = '\0'; + + free (source); + } + return (target); +} + +#if 0 +/* UNUSED */ +/* Append the textual representation of NUMBER to TARGET. + INDX and SIZE are as in SUB_APPEND_STRING. */ +char * +sub_append_number (number, target, indx, size) + intmax_t number; + char *target; + int *indx; + size_t *size; +{ + char *temp; + + temp = itos (number); + return (sub_append_string (temp, target, indx, size)); +} +#endif + +/* Extract a substring from STRING, starting at SINDEX and ending with + one of the characters in CHARLIST. Don't make the ending character + part of the string. Leave SINDEX pointing at the ending character. + Understand about backslashes in the string. If (flags & SX_VARNAME) + is non-zero, and array variables have been compiled into the shell, + everything between a `[' and a corresponding `]' is skipped over. + If (flags & SX_NOALLOC) is non-zero, don't return the substring, just + update SINDEX. If (flags & SX_REQMATCH) is non-zero, the string must + contain a closing character from CHARLIST. */ +static char * +string_extract (string, sindex, charlist, flags) + char *string; + int *sindex; + char *charlist; + int flags; +{ + register int c, i; + int found; + size_t slen; + char *temp; + DECLARE_MBSTATE; + + slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0; + i = *sindex; + found = 0; + while (c = string[i]) + { + if (c == '\\') + { + if (string[i + 1]) + i++; + else + break; + } +#if defined (ARRAY_VARS) + else if ((flags & SX_VARNAME) && c == LBRACK) + { + int ni; + /* If this is an array subscript, skip over it and continue. */ + ni = skipsubscript (string, i, 0); + if (string[ni] == RBRACK) + i = ni; + } +#endif + else if (MEMBER (c, charlist)) + { + found = 1; + break; + } + + ADVANCE_CHAR (string, slen, i); + } + + /* If we had to have a matching delimiter and didn't find one, return an + error and let the caller deal with it. */ + if ((flags & SX_REQMATCH) && found == 0) + { + *sindex = i; + return (&extract_string_error); + } + + temp = (flags & SX_NOALLOC) ? (char *)NULL : substring (string, *sindex, i); + *sindex = i; + + return (temp); +} + +/* Extract the contents of STRING as if it is enclosed in double quotes. + SINDEX, when passed in, is the offset of the character immediately + following the opening double quote; on exit, SINDEX is left pointing after + the closing double quote. If STRIPDQ is non-zero, unquoted double + quotes are stripped and the string is terminated by a null byte. + Backslashes between the embedded double quotes are processed. If STRIPDQ + is zero, an unquoted `"' terminates the string. */ +static char * +string_extract_double_quoted (string, sindex, flags) + char *string; + int *sindex, flags; +{ + size_t slen; + char *send; + int j, i, t; + unsigned char c; + char *temp, *ret; /* The new string we return. */ + int pass_next, backquote, si; /* State variables for the machine. */ + int dquote; + int stripdq; + DECLARE_MBSTATE; + + slen = strlen (string + *sindex) + *sindex; + send = string + slen; + + stripdq = (flags & SX_STRIPDQ); + + pass_next = backquote = dquote = 0; + temp = (char *)xmalloc (1 + slen - *sindex); + + j = 0; + i = *sindex; + while (c = string[i]) + { + /* Process a character that was quoted by a backslash. */ + if (pass_next) + { + /* XXX - take another look at this in light of Interp 221 */ + /* Posix.2 sez: + + ``The backslash shall retain its special meaning as an escape + character only when followed by one of the characters: + $ ` " \ ''. + + If STRIPDQ is zero, we handle the double quotes here and let + expand_word_internal handle the rest. If STRIPDQ is non-zero, + we have already been through one round of backslash stripping, + and want to strip these backslashes only if DQUOTE is non-zero, + indicating that we are inside an embedded double-quoted string. */ + + /* If we are in an embedded quoted string, then don't strip + backslashes before characters for which the backslash + retains its special meaning, but remove backslashes in + front of other characters. If we are not in an + embedded quoted string, don't strip backslashes at all. + This mess is necessary because the string was already + surrounded by double quotes (and sh has some really weird + quoting rules). + The returned string will be run through expansion as if + it were double-quoted. */ + if ((stripdq == 0 && c != '"') || + (stripdq && ((dquote && (sh_syntaxtab[c] & CBSDQUOTE)) || dquote == 0))) + temp[j++] = '\\'; + pass_next = 0; + +add_one_character: + COPY_CHAR_I (temp, j, string, send, i); + continue; + } + + /* A backslash protects the next character. The code just above + handles preserving the backslash in front of any character but + a double quote. */ + if (c == '\\') + { + pass_next++; + i++; + continue; + } + + /* Inside backquotes, ``the portion of the quoted string from the + initial backquote and the characters up to the next backquote + that is not preceded by a backslash, having escape characters + removed, defines that command''. */ + if (backquote) + { + if (c == '`') + backquote = 0; + temp[j++] = c; /* COPY_CHAR_I? */ + i++; + continue; + } + + if (c == '`') + { + temp[j++] = c; + backquote++; + i++; + continue; + } + + /* Pass everything between `$(' and the matching `)' or a quoted + ${ ... } pair through according to the Posix.2 specification. */ + if (c == '$' && ((string[i + 1] == LPAREN) || (string[i + 1] == LBRACE))) + { + int free_ret = 1; + + si = i + 2; + if (string[i + 1] == LPAREN) + ret = extract_command_subst (string, &si, (flags & SX_COMPLETE)); + else + ret = extract_dollar_brace_string (string, &si, Q_DOUBLE_QUOTES, 0); + + temp[j++] = '$'; + temp[j++] = string[i + 1]; + + /* Just paranoia; ret will not be 0 unless no_longjmp_on_fatal_error + is set. */ + if (ret == 0 && no_longjmp_on_fatal_error) + { + free_ret = 0; + ret = string + i + 2; + } + + /* XXX - CHECK_STRING_OVERRUN here? */ + for (t = 0; ret[t]; t++, j++) + temp[j] = ret[t]; + temp[j] = string[si]; + + if (si < i + 2) /* we went back? */ + i += 2; + else if (string[si]) + { + j++; + i = si + 1; + } + else + i = si; + + if (free_ret) + free (ret); + continue; + } + + /* Add any character but a double quote to the quoted string we're + accumulating. */ + if (c != '"') + goto add_one_character; + + /* c == '"' */ + if (stripdq) + { + dquote ^= 1; + i++; + continue; + } + + break; + } + temp[j] = '\0'; + + /* Point to after the closing quote. */ + if (c) + i++; + *sindex = i; + + return (temp); +} + +/* This should really be another option to string_extract_double_quoted. */ +static int +skip_double_quoted (string, slen, sind, flags) + char *string; + size_t slen; + int sind; + int flags; +{ + int c, i; + char *ret; + int pass_next, backquote, si; + DECLARE_MBSTATE; + + pass_next = backquote = 0; + i = sind; + while (c = string[i]) + { + if (pass_next) + { + pass_next = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + else if (c == '\\') + { + pass_next++; + i++; + continue; + } + else if (backquote) + { + if (c == '`') + backquote = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + else if (c == '`') + { + backquote++; + i++; + continue; + } + else if (c == '$' && ((string[i + 1] == LPAREN) || (string[i + 1] == LBRACE))) + { + si = i + 2; + if (string[i + 1] == LPAREN) + ret = extract_command_subst (string, &si, SX_NOALLOC|(flags&SX_COMPLETE)); + else + ret = extract_dollar_brace_string (string, &si, Q_DOUBLE_QUOTES, SX_NOALLOC); + + /* These can consume the entire string if they are unterminated */ + CHECK_STRING_OVERRUN (i, si, slen, c); + + i = si + 1; + continue; + } + else if (c != '"') + { + ADVANCE_CHAR (string, slen, i); + continue; + } + else + break; + } + + if (c) + i++; + + return (i); +} + +/* Extract the contents of STRING as if it is enclosed in single quotes. + SINDEX, when passed in, is the offset of the character immediately + following the opening single quote; on exit, SINDEX is left pointing after + the closing single quote. */ +static inline char * +string_extract_single_quoted (string, sindex) + char *string; + int *sindex; +{ + register int i; + size_t slen; + char *t; + DECLARE_MBSTATE; + + /* Don't need slen for ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0; + i = *sindex; + while (string[i] && string[i] != '\'') + ADVANCE_CHAR (string, slen, i); + + t = substring (string, *sindex, i); + + if (string[i]) + i++; + *sindex = i; + + return (t); +} + +/* Skip over a single-quoted string. We overload the SX_COMPLETE flag to mean + that we are splitting out words for completion and have encountered a $'...' + string, which allows backslash-escaped single quotes. */ +static inline int +skip_single_quoted (string, slen, sind, flags) + const char *string; + size_t slen; + int sind; + int flags; +{ + register int c; + DECLARE_MBSTATE; + + c = sind; + while (string[c] && string[c] != '\'') + { + if ((flags & SX_COMPLETE) && string[c] == '\\' && string[c+1] == '\'' && string[c+2]) + ADVANCE_CHAR (string, slen, c); + ADVANCE_CHAR (string, slen, c); + } + + if (string[c]) + c++; + return c; +} + +/* Just like string_extract, but doesn't hack backslashes or any of + that other stuff. Obeys CTLESC quoting. Used to do splitting on $IFS. */ +static char * +string_extract_verbatim (string, slen, sindex, charlist, flags) + char *string; + size_t slen; + int *sindex; + char *charlist; + int flags; +{ + register int i; +#if defined (HANDLE_MULTIBYTE) + wchar_t *wcharlist; +#endif + int c; + char *temp; + DECLARE_MBSTATE; + + if ((flags & SX_NOCTLESC) && charlist[0] == '\'' && charlist[1] == '\0') + { + temp = string_extract_single_quoted (string, sindex); + --*sindex; /* leave *sindex at separator character */ + return temp; + } + + /* This can never be called with charlist == NULL. If *charlist == NULL, + we can skip the loop and just return a copy of the string, updating + *sindex */ + if (*charlist == 0) + { + temp = string + *sindex; + c = (*sindex == 0) ? slen : STRLEN (temp); + temp = savestring (temp); + *sindex += c; + return temp; + } + + i = *sindex; +#if defined (HANDLE_MULTIBYTE) + wcharlist = 0; +#endif + while (c = string[i]) + { +#if defined (HANDLE_MULTIBYTE) + size_t mblength; +#endif + if ((flags & SX_NOCTLESC) == 0 && c == CTLESC) + { + i += 2; + CHECK_STRING_OVERRUN (i, i, slen, c); + continue; + } + /* Even if flags contains SX_NOCTLESC, we let CTLESC quoting CTLNUL + through, to protect the CTLNULs from later calls to + remove_quoted_nulls. */ + else if ((flags & SX_NOESCCTLNUL) == 0 && c == CTLESC && string[i+1] == CTLNUL) + { + i += 2; + CHECK_STRING_OVERRUN (i, i, slen, c); + continue; + } + +#if defined (HANDLE_MULTIBYTE) + if (locale_utf8locale && slen > i && UTF8_SINGLEBYTE (string[i])) + mblength = (string[i] != 0) ? 1 : 0; + else + mblength = MBLEN (string + i, slen - i); + if (mblength > 1) + { + wchar_t wc; + mblength = mbtowc (&wc, string + i, slen - i); + if (MB_INVALIDCH (mblength)) + { + if (MEMBER (c, charlist)) + break; + } + else + { + if (wcharlist == 0) + { + size_t len; + len = mbstowcs (wcharlist, charlist, 0); + if (len == -1) + len = 0; + wcharlist = (wchar_t *)xmalloc (sizeof (wchar_t) * (len + 1)); + mbstowcs (wcharlist, charlist, len + 1); + } + + if (wcschr (wcharlist, wc)) + break; + } + } + else +#endif + if (MEMBER (c, charlist)) + break; + + ADVANCE_CHAR (string, slen, i); + } + +#if defined (HANDLE_MULTIBYTE) + FREE (wcharlist); +#endif + + temp = substring (string, *sindex, i); + *sindex = i; + + return (temp); +} + +/* Extract the $( construct in STRING, and return a new string. + Start extracting at (SINDEX) as if we had just seen "$(". + Make (SINDEX) get the position of the matching ")". ) + XFLAGS is additional flags to pass to other extraction functions. */ +char * +extract_command_subst (string, sindex, xflags) + char *string; + int *sindex; + int xflags; +{ + char *ret; + + if (string[*sindex] == LPAREN || (xflags & SX_COMPLETE)) + return (extract_delimited_string (string, sindex, "$(", "(", ")", xflags|SX_COMMAND)); /*)*/ + else + { + xflags |= (no_longjmp_on_fatal_error ? SX_NOLONGJMP : 0); + ret = xparse_dolparen (string, string+*sindex, sindex, xflags); + return ret; + } +} + +/* Extract the $[ construct in STRING, and return a new string. (]) + Start extracting at (SINDEX) as if we had just seen "$[". + Make (SINDEX) get the position of the matching "]". */ +char * +extract_arithmetic_subst (string, sindex) + char *string; + int *sindex; +{ + return (extract_delimited_string (string, sindex, "$[", "[", "]", 0)); /*]*/ +} + +#if defined (PROCESS_SUBSTITUTION) +/* Extract the <( or >( construct in STRING, and return a new string. + Start extracting at (SINDEX) as if we had just seen "<(". + Make (SINDEX) get the position of the matching ")". */ /*))*/ +char * +extract_process_subst (string, starter, sindex, xflags) + char *string; + char *starter; + int *sindex; + int xflags; +{ +#if 0 + /* XXX - check xflags&SX_COMPLETE here? */ + return (extract_delimited_string (string, sindex, starter, "(", ")", SX_COMMAND)); +#else + xflags |= (no_longjmp_on_fatal_error ? SX_NOLONGJMP : 0); + return (xparse_dolparen (string, string+*sindex, sindex, xflags)); +#endif +} +#endif /* PROCESS_SUBSTITUTION */ + +#if defined (ARRAY_VARS) +/* This can be fooled by unquoted right parens in the passed string. If + each caller verifies that the last character in STRING is a right paren, + we don't even need to call extract_delimited_string. */ +char * +extract_array_assignment_list (string, sindex) + char *string; + int *sindex; +{ + int slen; + char *ret; + + slen = strlen (string); + if (string[slen - 1] == RPAREN) + { + ret = substring (string, *sindex, slen - 1); + *sindex = slen - 1; + return ret; + } + return 0; +} +#endif + +/* Extract and create a new string from the contents of STRING, a + character string delimited with OPENER and CLOSER. SINDEX is + the address of an int describing the current offset in STRING; + it should point to just after the first OPENER found. On exit, + SINDEX gets the position of the last character of the matching CLOSER. + If OPENER is more than a single character, ALT_OPENER, if non-null, + contains a character string that can also match CLOSER and thus + needs to be skipped. */ +static char * +extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) + char *string; + int *sindex; + char *opener, *alt_opener, *closer; + int flags; +{ + int i, c, si; + size_t slen; + char *t, *result; + int pass_character, nesting_level, in_comment; + int len_closer, len_opener, len_alt_opener; + DECLARE_MBSTATE; + + slen = strlen (string + *sindex) + *sindex; + len_opener = STRLEN (opener); + len_alt_opener = STRLEN (alt_opener); + len_closer = STRLEN (closer); + + pass_character = in_comment = 0; + + nesting_level = 1; + i = *sindex; + + while (nesting_level) + { + c = string[i]; + + /* If a recursive call or a call to ADVANCE_CHAR leaves the index beyond + the end of the string, catch it and cut the loop. */ + if (i > slen) + { + i = slen; + c = string[i = slen]; + break; + } + + if (c == 0) + break; + + if (in_comment) + { + if (c == '\n') + in_comment = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + + if (pass_character) /* previous char was backslash */ + { + pass_character = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + + /* Not exactly right yet; should handle shell metacharacters and + multibyte characters, too. See COMMENT_BEGIN define in parse.y */ + if ((flags & SX_COMMAND) && c == '#' && (i == 0 || string[i - 1] == '\n' || shellblank (string[i - 1]))) + { + in_comment = 1; + ADVANCE_CHAR (string, slen, i); + continue; + } + + if (c == CTLESC || c == '\\') + { + pass_character++; + i++; + continue; + } + + /* Process a nested command substitution, but only if we're parsing an + arithmetic substitution. */ + if ((flags & SX_COMMAND) && string[i] == '$' && string[i+1] == LPAREN) + { + si = i + 2; + t = extract_command_subst (string, &si, flags|SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si + 1; + continue; + } + + /* Process a nested OPENER. */ + if (STREQN (string + i, opener, len_opener)) + { + si = i + len_opener; + t = extract_delimited_string (string, &si, opener, alt_opener, closer, flags|SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si + 1; + continue; + } + + /* Process a nested ALT_OPENER */ + if (len_alt_opener && STREQN (string + i, alt_opener, len_alt_opener)) + { + si = i + len_alt_opener; + t = extract_delimited_string (string, &si, alt_opener, alt_opener, closer, flags|SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si + 1; + continue; + } + + /* If the current substring terminates the delimited string, decrement + the nesting level. */ + if (STREQN (string + i, closer, len_closer)) + { + i += len_closer - 1; /* move to last byte of the closer */ + nesting_level--; + if (nesting_level == 0) + break; + } + + /* Pass old-style command substitution through verbatim. */ + if (c == '`') + { + si = i + 1; + t = string_extract (string, &si, "`", flags|SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si + 1; + continue; + } + + /* Pass single-quoted and double-quoted strings through verbatim. */ + if (c == '\'' || c == '"') + { + si = i + 1; + i = (c == '\'') ? skip_single_quoted (string, slen, si, 0) + : skip_double_quoted (string, slen, si, 0); + continue; + } + + /* move past this character, which was not special. */ + ADVANCE_CHAR (string, slen, i); + } + + if (c == 0 && nesting_level) + { + if (no_longjmp_on_fatal_error == 0) + { + last_command_exit_value = EXECUTION_FAILURE; + report_error (_("bad substitution: no closing `%s' in %s"), closer, string); + exp_jump_to_top_level (DISCARD); + } + else + { + *sindex = i; + return (char *)NULL; + } + } + + si = i - *sindex - len_closer + 1; + if (flags & SX_NOALLOC) + result = (char *)NULL; + else + { + result = (char *)xmalloc (1 + si); + strncpy (result, string + *sindex, si); + result[si] = '\0'; + } + *sindex = i; + + return (result); +} + +/* Extract a parameter expansion expression within ${ and } from STRING. + Obey the Posix.2 rules for finding the ending `}': count braces while + skipping over enclosed quoted strings and command substitutions. + SINDEX is the address of an int describing the current offset in STRING; + it should point to just after the first `{' found. On exit, SINDEX + gets the position of the matching `}'. QUOTED is non-zero if this + occurs inside double quotes. */ +/* XXX -- this is very similar to extract_delimited_string -- XXX */ +static char * +extract_dollar_brace_string (string, sindex, quoted, flags) + char *string; + int *sindex, quoted, flags; +{ + register int i, c; + size_t slen; + int pass_character, nesting_level, si, dolbrace_state; + char *result, *t; + DECLARE_MBSTATE; + + pass_character = 0; + nesting_level = 1; + slen = strlen (string + *sindex) + *sindex; + + /* The handling of dolbrace_state needs to agree with the code in parse.y: + parse_matched_pair(). The different initial value is to handle the + case where this function is called to parse the word in + ${param op word} (SX_WORD). */ + dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM; + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP)) + dolbrace_state = DOLBRACE_QUOTE; + + i = *sindex; + while (c = string[i]) + { + if (pass_character) + { + pass_character = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + + /* CTLESCs and backslashes quote the next character. */ + if (c == CTLESC || c == '\\') + { + pass_character++; + i++; + continue; + } + + if (string[i] == '$' && string[i+1] == LBRACE) + { + nesting_level++; + i += 2; + continue; + } + + if (c == RBRACE) + { + nesting_level--; + if (nesting_level == 0) + break; + i++; + continue; + } + + /* Pass the contents of old-style command substitutions through + verbatim. */ + if (c == '`') + { + si = i + 1; + t = string_extract (string, &si, "`", flags|SX_NOALLOC); + + CHECK_STRING_OVERRUN (i, si, slen, c); + + i = si + 1; + continue; + } + + /* Pass the contents of new-style command substitutions and + arithmetic substitutions through verbatim. */ + if (string[i] == '$' && string[i+1] == LPAREN) + { + si = i + 2; + t = extract_command_subst (string, &si, flags|SX_NOALLOC); + + CHECK_STRING_OVERRUN (i, si, slen, c); + + i = si + 1; + continue; + } + +#if defined (PROCESS_SUBSTITUTION) + /* Technically this should only work at the start of a word */ + if ((string[i] == '<' || string[i] == '>') && string[i+1] == LPAREN) + { + si = i + 2; + t = extract_process_subst (string, (string[i] == '<' ? "<(" : ">)"), &si, flags|SX_NOALLOC); + + CHECK_STRING_OVERRUN (i, si, slen, c); + + i = si + 1; + continue; + } +#endif + + /* Pass the contents of double-quoted strings through verbatim. */ + if (c == '"') + { + si = i + 1; + i = skip_double_quoted (string, slen, si, 0); + /* skip_XXX_quoted leaves index one past close quote */ + continue; + } + + if (c == '\'') + { +/*itrace("extract_dollar_brace_string: c == single quote flags = %d quoted = %d dolbrace_state = %d", flags, quoted, dolbrace_state);*/ + if (posixly_correct && shell_compatibility_level > 42 && dolbrace_state != DOLBRACE_QUOTE && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ADVANCE_CHAR (string, slen, i); + else + { + si = i + 1; + i = skip_single_quoted (string, slen, si, 0); + } + + continue; + } + +#if defined (ARRAY_VARS) + if (c == LBRACK && dolbrace_state == DOLBRACE_PARAM) + { + si = skipsubscript (string, i, 0); + CHECK_STRING_OVERRUN (i, si, slen, c); + if (string[si] == RBRACK) + c = string[i = si]; + } +#endif + + /* move past this character, which was not special. */ + ADVANCE_CHAR (string, slen, i); + + /* This logic must agree with parse.y:parse_matched_pair, since they + share the same defines. */ + if (dolbrace_state == DOLBRACE_PARAM && c == '%' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == '#' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == '/' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE2; /* XXX */ + else if (dolbrace_state == DOLBRACE_PARAM && c == '^' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == ',' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* This is intended to handle all of the [:]op expansions and the substring/ + length/pattern removal/pattern substitution expansions. */ + else if (dolbrace_state == DOLBRACE_PARAM && strchr ("#%^,~:-=?+/", c) != 0) + dolbrace_state = DOLBRACE_OP; + else if (dolbrace_state == DOLBRACE_OP && strchr ("#%^,~:-=?+/", c) == 0) + dolbrace_state = DOLBRACE_WORD; + } + + if (c == 0 && nesting_level) + { + if (no_longjmp_on_fatal_error == 0) + { /* { */ + last_command_exit_value = EXECUTION_FAILURE; + report_error (_("bad substitution: no closing `%s' in %s"), "}", string); + exp_jump_to_top_level (DISCARD); + } + else + { + *sindex = i; + return ((char *)NULL); + } + } + + result = (flags & SX_NOALLOC) ? (char *)NULL : substring (string, *sindex, i); + *sindex = i; + + return (result); +} + +/* Remove backslashes which are quoting backquotes from STRING. Modifies + STRING, and returns a pointer to it. */ +char * +de_backslash (string) + char *string; +{ + register size_t slen; + register int i, j, prev_i; + DECLARE_MBSTATE; + + slen = strlen (string); + i = j = 0; + + /* Loop copying string[i] to string[j], i >= j. */ + while (i < slen) + { + if (string[i] == '\\' && (string[i + 1] == '`' || string[i + 1] == '\\' || + string[i + 1] == '$')) + i++; + prev_i = i; + ADVANCE_CHAR (string, slen, i); + if (j < prev_i) + do string[j++] = string[prev_i++]; while (prev_i < i); + else + j = i; + } + string[j] = '\0'; + + return (string); +} + +#if 0 +/*UNUSED*/ +/* Replace instances of \! in a string with !. */ +void +unquote_bang (string) + char *string; +{ + register int i, j; + register char *temp; + + temp = (char *)xmalloc (1 + strlen (string)); + + for (i = 0, j = 0; (temp[j] = string[i]); i++, j++) + { + if (string[i] == '\\' && string[i + 1] == '!') + { + temp[j] = '!'; + i++; + } + } + strcpy (string, temp); + free (temp); +} +#endif + +#define CQ_RETURN(x) do { no_longjmp_on_fatal_error = oldjmp; return (x); } while (0) + +/* This function assumes s[i] == open; returns with s[ret] == close; used to + parse array subscripts. FLAGS & 1 means to not attempt to skip over + matched pairs of quotes or backquotes, or skip word expansions; it is + intended to be used after expansion has been performed and during final + assignment parsing (see arrayfunc.c:assign_compound_array_list()) or + during execution by a builtin which has already undergone word expansion. */ +static int +skip_matched_pair (string, start, open, close, flags) + const char *string; + int start, open, close, flags; +{ + int i, pass_next, backq, si, c, count, oldjmp; + size_t slen; + char *temp, *ss; + DECLARE_MBSTATE; + + slen = strlen (string + start) + start; + oldjmp = no_longjmp_on_fatal_error; + no_longjmp_on_fatal_error = 1; + + i = start + 1; /* skip over leading bracket */ + count = 1; + pass_next = backq = 0; + ss = (char *)string; + while (c = string[i]) + { + if (pass_next) + { + pass_next = 0; + if (c == 0) + CQ_RETURN(i); + ADVANCE_CHAR (string, slen, i); + continue; + } + else if ((flags & 1) == 0 && c == '\\') + { + pass_next = 1; + i++; + continue; + } + else if (backq) + { + if (c == '`') + backq = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + else if ((flags & 1) == 0 && c == '`') + { + backq = 1; + i++; + continue; + } + else if ((flags & 1) == 0 && c == open) + { + count++; + i++; + continue; + } + else if (c == close) + { + count--; + if (count == 0) + break; + i++; + continue; + } + else if ((flags & 1) == 0 && (c == '\'' || c == '"')) + { + i = (c == '\'') ? skip_single_quoted (ss, slen, ++i, 0) + : skip_double_quoted (ss, slen, ++i, 0); + /* no increment, the skip functions increment past the closing quote. */ + } + else if ((flags&1) == 0 && c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE)) + { + si = i + 2; + if (string[si] == '\0') + CQ_RETURN(si); + + /* XXX - extract_command_subst here? */ + if (string[i+1] == LPAREN) + temp = extract_delimited_string (ss, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */ + else + temp = extract_dollar_brace_string (ss, &si, 0, SX_NOALLOC); + + CHECK_STRING_OVERRUN (i, si, slen, c); + + i = si; + if (string[i] == '\0') /* don't increment i past EOS in loop */ + break; + i++; + continue; + } + else + ADVANCE_CHAR (string, slen, i); + } + + CQ_RETURN(i); +} + +#if defined (ARRAY_VARS) +/* Flags has 1 as a reserved value, since skip_matched_pair uses it for + skipping over quoted strings and taking the first instance of the + closing character. */ +int +skipsubscript (string, start, flags) + const char *string; + int start, flags; +{ + return (skip_matched_pair (string, start, '[', ']', flags)); +} +#endif + +/* Skip characters in STRING until we find a character in DELIMS, and return + the index of that character. START is the index into string at which we + begin. This is similar in spirit to strpbrk, but it returns an index into + STRING and takes a starting index. This little piece of code knows quite + a lot of shell syntax. It's very similar to skip_double_quoted and other + functions of that ilk. */ +int +skip_to_delim (string, start, delims, flags) + char *string; + int start; + char *delims; + int flags; +{ + int i, pass_next, backq, dquote, si, c, oldjmp; + int invert, skipquote, skipcmd, noprocsub, completeflag; + int arithexp, skipcol; + size_t slen; + char *temp, open[3]; + DECLARE_MBSTATE; + + slen = strlen (string + start) + start; + oldjmp = no_longjmp_on_fatal_error; + if (flags & SD_NOJMP) + no_longjmp_on_fatal_error = 1; + invert = (flags & SD_INVERT); + skipcmd = (flags & SD_NOSKIPCMD) == 0; + noprocsub = (flags & SD_NOPROCSUB); + completeflag = (flags & SD_COMPLETE) ? SX_COMPLETE : 0; + + arithexp = (flags & SD_ARITHEXP); + skipcol = 0; + + i = start; + pass_next = backq = dquote = 0; + while (c = string[i]) + { + /* If this is non-zero, we should not let quote characters be delimiters + and the current character is a single or double quote. We should not + test whether or not it's a delimiter until after we skip single- or + double-quoted strings. */ + skipquote = ((flags & SD_NOQUOTEDELIM) && (c == '\'' || c =='"')); + if (pass_next) + { + pass_next = 0; + if (c == 0) + CQ_RETURN(i); + ADVANCE_CHAR (string, slen, i); + continue; + } + else if (c == '\\') + { + pass_next = 1; + i++; + continue; + } + else if (backq) + { + if (c == '`') + backq = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + else if (c == '`') + { + backq = 1; + i++; + continue; + } + else if (arithexp && skipcol && c == ':') + { + skipcol--; + i++; + continue; + } + else if (arithexp && c == '?') + { + skipcol++; + i++; + continue; + } + else if (skipquote == 0 && invert == 0 && member (c, delims)) + break; + /* the usual case is to use skip_xxx_quoted, but we don't skip over double + quoted strings when looking for the history expansion character as a + delimiter. */ + /* special case for programmable completion which takes place before + parser converts backslash-escaped single quotes between $'...' to + `regular' single-quoted strings. */ + else if (completeflag && i > 0 && string[i-1] == '$' && c == '\'') + i = skip_single_quoted (string, slen, ++i, SX_COMPLETE); + else if (c == '\'') + i = skip_single_quoted (string, slen, ++i, 0); + else if (c == '"') + i = skip_double_quoted (string, slen, ++i, completeflag); + else if (c == LPAREN && arithexp) + { + si = i + 1; + if (string[si] == '\0') + CQ_RETURN(si); + + temp = extract_delimited_string (string, &si, "(", "(", ")", SX_NOALLOC); /* ) */ + i = si; + if (string[i] == '\0') /* don't increment i past EOS in loop */ + break; + i++; + continue; + } + else if (c == '$' && ((skipcmd && string[i+1] == LPAREN) || string[i+1] == LBRACE)) + { + si = i + 2; + if (string[si] == '\0') + CQ_RETURN(si); + + if (string[i+1] == LPAREN) + temp = extract_delimited_string (string, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */ + else + temp = extract_dollar_brace_string (string, &si, 0, SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si; + if (string[i] == '\0') /* don't increment i past EOS in loop */ + break; + i++; + continue; + } +#if defined (PROCESS_SUBSTITUTION) + else if (skipcmd && noprocsub == 0 && (c == '<' || c == '>') && string[i+1] == LPAREN) + { + si = i + 2; + if (string[si] == '\0') + CQ_RETURN(si); + + temp = extract_delimited_string (string, &si, (c == '<') ? "<(" : ">(", "(", ")", SX_COMMAND|SX_NOALLOC); /* )) */ + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si; + if (string[i] == '\0') + break; + i++; + continue; + } +#endif /* PROCESS_SUBSTITUTION */ +#if defined (EXTENDED_GLOB) + else if ((flags & SD_EXTGLOB) && extended_glob && string[i+1] == LPAREN && member (c, "?*+!@")) + { + si = i + 2; + if (string[si] == '\0') + CQ_RETURN(si); + + open[0] = c; + open[1] = LPAREN; + open[2] = '\0'; + temp = extract_delimited_string (string, &si, open, "(", ")", SX_NOALLOC); /* ) */ + + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si; + if (string[i] == '\0') /* don't increment i past EOS in loop */ + break; + i++; + continue; + } +#endif + else if ((flags & SD_GLOB) && c == LBRACK) + { + si = i + 1; + if (string[si] == '\0') + CQ_RETURN(si); + + temp = extract_delimited_string (string, &si, "[", "[", "]", SX_NOALLOC); /* ] */ + + i = si; + if (string[i] == '\0') /* don't increment i past EOS in loop */ + break; + i++; + continue; + } + else if ((skipquote || invert) && (member (c, delims) == 0)) + break; + else + ADVANCE_CHAR (string, slen, i); + } + + CQ_RETURN(i); +} + +#if defined (BANG_HISTORY) +/* Skip to the history expansion character (delims[0]), paying attention to + quoted strings and command and process substitution. This is a stripped- + down version of skip_to_delims. The essential difference is that this + resets the quoting state when starting a command substitution */ +int +skip_to_histexp (string, start, delims, flags) + char *string; + int start; + char *delims; + int flags; +{ + int i, pass_next, backq, dquote, c, oldjmp; + int histexp_comsub, histexp_backq, old_dquote; + size_t slen; + DECLARE_MBSTATE; + + slen = strlen (string + start) + start; + oldjmp = no_longjmp_on_fatal_error; + if (flags & SD_NOJMP) + no_longjmp_on_fatal_error = 1; + + histexp_comsub = histexp_backq = old_dquote = 0; + + i = start; + pass_next = backq = dquote = 0; + while (c = string[i]) + { + if (pass_next) + { + pass_next = 0; + if (c == 0) + CQ_RETURN(i); + ADVANCE_CHAR (string, slen, i); + continue; + } + else if (c == '\\') + { + pass_next = 1; + i++; + continue; + } + else if (backq && c == '`') + { + backq = 0; + histexp_backq--; + dquote = old_dquote; + i++; + continue; + } + else if (c == '`') + { + backq = 1; + histexp_backq++; + old_dquote = dquote; /* simple - one level for now */ + dquote = 0; + i++; + continue; + } + /* When in double quotes, act as if the double quote is a member of + history_no_expand_chars, like the history library does */ + else if (dquote && c == delims[0] && string[i+1] == '"') + { + i++; + continue; + } + else if (c == delims[0]) + break; + /* the usual case is to use skip_xxx_quoted, but we don't skip over double + quoted strings when looking for the history expansion character as a + delimiter. */ + else if (dquote && c == '\'') + { + i++; + continue; + } + else if (c == '\'') + i = skip_single_quoted (string, slen, ++i, 0); + /* The posixly_correct test makes posix-mode shells allow double quotes + to quote the history expansion character */ + else if (posixly_correct == 0 && c == '"') + { + dquote = 1 - dquote; + i++; + continue; + } + else if (c == '"') + i = skip_double_quoted (string, slen, ++i, 0); +#if defined (PROCESS_SUBSTITUTION) + else if ((c == '$' || c == '<' || c == '>') && string[i+1] == LPAREN && string[i+2] != LPAREN) +#else + else if (c == '$' && string[i+1] == LPAREN && string[i+2] != LPAREN) +#endif + { + if (string[i+2] == '\0') + CQ_RETURN(i+2); + i += 2; + histexp_comsub++; + old_dquote = dquote; + dquote = 0; + } + else if (histexp_comsub && c == RPAREN) + { + histexp_comsub--; + dquote = old_dquote; + i++; + continue; + } + else if (backq) /* placeholder */ + { + ADVANCE_CHAR (string, slen, i); + continue; + } + else + ADVANCE_CHAR (string, slen, i); + } + + CQ_RETURN(i); +} +#endif /* BANG_HISTORY */ + +#if defined (READLINE) +/* Return 1 if the portion of STRING ending at EINDEX is quoted (there is + an unclosed quoted string), or if the character at EINDEX is quoted + by a backslash. NO_LONGJMP_ON_FATAL_ERROR is used to flag that the various + single and double-quoted string parsing functions should not return an + error if there are unclosed quotes or braces. The characters that this + recognizes need to be the same as the contents of + rl_completer_quote_characters. */ + +int +char_is_quoted (string, eindex) + char *string; + int eindex; +{ + int i, pass_next, c, oldjmp; + size_t slen; + DECLARE_MBSTATE; + + slen = strlen (string); + oldjmp = no_longjmp_on_fatal_error; + no_longjmp_on_fatal_error = 1; + i = pass_next = 0; + while (i <= eindex) + { + c = string[i]; + + if (pass_next) + { + pass_next = 0; + if (i >= eindex) /* XXX was if (i >= eindex - 1) */ + CQ_RETURN(1); + ADVANCE_CHAR (string, slen, i); + continue; + } + else if (c == '\\') + { + pass_next = 1; + i++; + continue; + } + else if (c == '$' && string[i+1] == '\'' && string[i+2]) + { + i += 2; + i = skip_single_quoted (string, slen, i, SX_COMPLETE); + if (i > eindex) + CQ_RETURN (i); + } + else if (c == '\'' || c == '"') + { + i = (c == '\'') ? skip_single_quoted (string, slen, ++i, 0) + : skip_double_quoted (string, slen, ++i, SX_COMPLETE); + if (i > eindex) + CQ_RETURN(1); + /* no increment, the skip_xxx functions go one past end */ + } + else + ADVANCE_CHAR (string, slen, i); + } + + CQ_RETURN(0); +} + +int +unclosed_pair (string, eindex, openstr) + char *string; + int eindex; + char *openstr; +{ + int i, pass_next, openc, olen; + size_t slen; + DECLARE_MBSTATE; + + slen = strlen (string); + olen = strlen (openstr); + i = pass_next = openc = 0; + while (i <= eindex) + { + if (pass_next) + { + pass_next = 0; + if (i >= eindex) /* XXX was if (i >= eindex - 1) */ + return 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + else if (string[i] == '\\') + { + pass_next = 1; + i++; + continue; + } + else if (STREQN (string + i, openstr, olen)) + { + openc = 1 - openc; + i += olen; + } + /* XXX - may want to handle $'...' specially here */ + else if (string[i] == '\'' || string[i] == '"') + { + i = (string[i] == '\'') ? skip_single_quoted (string, slen, i, 0) + : skip_double_quoted (string, slen, i, SX_COMPLETE); + if (i > eindex) + return 0; + } + else + ADVANCE_CHAR (string, slen, i); + } + return (openc); +} + +/* Split STRING (length SLEN) at DELIMS, and return a WORD_LIST with the + individual words. If DELIMS is NULL, the current value of $IFS is used + to split the string, and the function follows the shell field splitting + rules. SENTINEL is an index to look for. NWP, if non-NULL, + gets the number of words in the returned list. CWP, if non-NULL, gets + the index of the word containing SENTINEL. Non-whitespace chars in + DELIMS delimit separate fields. This is used by programmable completion. */ +WORD_LIST * +split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp) + char *string; + int slen; + char *delims; + int sentinel, flags; + int *nwp, *cwp; +{ + int ts, te, i, nw, cw, ifs_split, dflags; + char *token, *d, *d2; + WORD_LIST *ret, *tl; + + if (string == 0 || *string == '\0') + { + if (nwp) + *nwp = 0; + if (cwp) + *cwp = 0; + return ((WORD_LIST *)NULL); + } + + d = (delims == 0) ? ifs_value : delims; + ifs_split = delims == 0; + + /* Make d2 the non-whitespace characters in delims */ + d2 = 0; + if (delims) + { + size_t slength; +#if defined (HANDLE_MULTIBYTE) + size_t mblength = 1; +#endif + DECLARE_MBSTATE; + + slength = strlen (delims); + d2 = (char *)xmalloc (slength + 1); + i = ts = 0; + while (delims[i]) + { +#if defined (HANDLE_MULTIBYTE) + mbstate_t state_bak; + state_bak = state; + mblength = MBRLEN (delims + i, slength, &state); + if (MB_INVALIDCH (mblength)) + state = state_bak; + else if (mblength > 1) + { + memcpy (d2 + ts, delims + i, mblength); + ts += mblength; + i += mblength; + slength -= mblength; + continue; + } +#endif + if (whitespace (delims[i]) == 0) + d2[ts++] = delims[i]; + + i++; + slength--; + } + d2[ts] = '\0'; + } + + ret = (WORD_LIST *)NULL; + + /* Remove sequences of whitespace characters at the start of the string, as + long as those characters are delimiters. */ + for (i = 0; member (string[i], d) && spctabnl (string[i]); i++) + ; + if (string[i] == '\0') + { + FREE (d2); + return (ret); + } + + ts = i; + nw = 0; + cw = -1; + dflags = flags|SD_NOJMP; + while (1) + { + te = skip_to_delim (string, ts, d, dflags); + + /* If we have a non-whitespace delimiter character, use it to make a + separate field. This is just about what $IFS splitting does and + is closer to the behavior of the shell parser. */ + if (ts == te && d2 && member (string[ts], d2)) + { + te = ts + 1; + /* If we're using IFS splitting, the non-whitespace delimiter char + and any additional IFS whitespace delimits a field. */ + if (ifs_split) + while (member (string[te], d) && spctabnl (string[te]) && ((flags&SD_NOQUOTEDELIM) == 0 || (string[te] != '\'' && string[te] != '"'))) + te++; + else + while (member (string[te], d2) && ((flags&SD_NOQUOTEDELIM) == 0 || (string[te] != '\'' && string[te] != '"'))) + te++; + } + + token = substring (string, ts, te); + + ret = add_string_to_list (token, ret); /* XXX */ + free (token); + nw++; + + if (sentinel >= ts && sentinel <= te) + cw = nw; + + /* If the cursor is at whitespace just before word start, set the + sentinel word to the current word. */ + if (cwp && cw == -1 && sentinel == ts-1) + cw = nw; + + /* If the cursor is at whitespace between two words, make a new, empty + word, add it before (well, after, since the list is in reverse order) + the word we just added, and set the current word to that one. */ + if (cwp && cw == -1 && sentinel < ts) + { + tl = make_word_list (make_word (""), ret->next); + ret->next = tl; + cw = nw; + nw++; + } + + if (string[te] == 0) + break; + + i = te; + /* XXX - honor SD_NOQUOTEDELIM here */ + while (member (string[i], d) && (ifs_split || spctabnl(string[i])) && ((flags&SD_NOQUOTEDELIM) == 0 || (string[te] != '\'' && string[te] != '"'))) + i++; + + if (string[i]) + ts = i; + else + break; + } + + /* Special case for SENTINEL at the end of STRING. If we haven't found + the word containing SENTINEL yet, and the index we're looking for is at + the end of STRING (or past the end of the previously-found token, + possible if the end of the line is composed solely of IFS whitespace) + add an additional null argument and set the current word pointer to that. */ + if (cwp && cw == -1 && (sentinel >= slen || sentinel >= te)) + { + if (whitespace (string[sentinel - 1])) + { + token = ""; + ret = add_string_to_list (token, ret); + nw++; + } + cw = nw; + } + + if (nwp) + *nwp = nw; + if (cwp) + *cwp = cw; + + FREE (d2); + + return (REVERSE_LIST (ret, WORD_LIST *)); +} +#endif /* READLINE */ + +#if 0 +/* UNUSED */ +/* Extract the name of the variable to bind to from the assignment string. */ +char * +assignment_name (string) + char *string; +{ + int offset; + char *temp; + + offset = assignment (string, 0); + if (offset == 0) + return (char *)NULL; + temp = substring (string, 0, offset); + return (temp); +} +#endif + +/* **************************************************************** */ +/* */ +/* Functions to convert strings to WORD_LISTs and vice versa */ +/* */ +/* **************************************************************** */ + +/* Return a single string of all the words in LIST. SEP is the separator + to put between individual elements of LIST in the output string. */ +char * +string_list_internal (list, sep) + WORD_LIST *list; + char *sep; +{ + register WORD_LIST *t; + char *result, *r; + size_t word_len, sep_len, result_size; + + if (list == 0) + return ((char *)NULL); + + /* Short-circuit quickly if we don't need to separate anything. */ + if (list->next == 0) + return (savestring (list->word->word)); + + /* This is nearly always called with either sep[0] == 0 or sep[1] == 0. */ + sep_len = STRLEN (sep); + result_size = 0; + + for (t = list; t; t = t->next) + { + if (t != list) + result_size += sep_len; + result_size += strlen (t->word->word); + } + + r = result = (char *)xmalloc (result_size + 1); + + for (t = list; t; t = t->next) + { + if (t != list && sep_len) + { + if (sep_len > 1) + { + FASTCOPY (sep, r, sep_len); + r += sep_len; + } + else + *r++ = sep[0]; + } + + word_len = strlen (t->word->word); + FASTCOPY (t->word->word, r, word_len); + r += word_len; + } + + *r = '\0'; + return (result); +} + +/* Return a single string of all the words present in LIST, separating + each word with a space. */ +char * +string_list (list) + WORD_LIST *list; +{ + return (string_list_internal (list, " ")); +} + +/* An external interface that can be used by the rest of the shell to + obtain a string containing the first character in $IFS. Handles all + the multibyte complications. If LENP is non-null, it is set to the + length of the returned string. */ +char * +ifs_firstchar (lenp) + int *lenp; +{ + char *ret; + int len; + + ret = xmalloc (MB_LEN_MAX + 1); +#if defined (HANDLE_MULTIBYTE) + if (ifs_firstc_len == 1) + { + ret[0] = ifs_firstc[0]; + ret[1] = '\0'; + len = ret[0] ? 1 : 0; + } + else + { + memcpy (ret, ifs_firstc, ifs_firstc_len); + ret[len = ifs_firstc_len] = '\0'; + } +#else + ret[0] = ifs_firstc; + ret[1] = '\0'; + len = ret[0] ? 0 : 1; +#endif + + if (lenp) + *lenp = len; + + return ret; +} + +/* Return a single string of all the words present in LIST, obeying the + quoting rules for "$*", to wit: (P1003.2, draft 11, 3.5.2) "If the + expansion [of $*] appears within a double quoted string, it expands + to a single field with the value of each parameter separated by the + first character of the IFS variable, or by a if IFS is unset." */ +/* Posix interpretation 888 changes this when IFS is null by specifying + that when unquoted, this expands to separate arguments */ +char * +string_list_dollar_star (list, quoted, flags) + WORD_LIST *list; + int quoted, flags; +{ + char *ret; +#if defined (HANDLE_MULTIBYTE) +# if defined (__GNUC__) + char sep[MB_CUR_MAX + 1]; +# else + char *sep = 0; +# endif +#else + char sep[2]; +#endif + +#if defined (HANDLE_MULTIBYTE) +# if !defined (__GNUC__) + sep = (char *)xmalloc (MB_CUR_MAX + 1); +# endif /* !__GNUC__ */ + if (ifs_firstc_len == 1) + { + sep[0] = ifs_firstc[0]; + sep[1] = '\0'; + } + else + { + memcpy (sep, ifs_firstc, ifs_firstc_len); + sep[ifs_firstc_len] = '\0'; + } +#else + sep[0] = ifs_firstc; + sep[1] = '\0'; +#endif + + ret = string_list_internal (list, sep); +#if defined (HANDLE_MULTIBYTE) && !defined (__GNUC__) + free (sep); +#endif + return ret; +} + +/* Turn $@ into a string. If (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + is non-zero, the $@ appears within double quotes, and we should quote + the list before converting it into a string. If IFS is unset, and the + word is not quoted, we just need to quote CTLESC and CTLNUL characters + in the words in the list, because the default value of $IFS is + , IFS characters in the words in the list should + also be split. If IFS is null, and the word is not quoted, we need + to quote the words in the list to preserve the positional parameters + exactly. + Valid values for the FLAGS argument are the PF_ flags in command.h, + the only one we care about is PF_ASSIGNRHS. $@ is supposed to expand + to the positional parameters separated by spaces no matter what IFS is + set to if in a context where word splitting is not performed. The only + one that we didn't handle before is assignment statement arguments to + declaration builtins like `declare'. */ +char * +string_list_dollar_at (list, quoted, flags) + WORD_LIST *list; + int quoted; + int flags; +{ + char *ifs, *ret; +#if defined (HANDLE_MULTIBYTE) +# if defined (__GNUC__) + char sep[MB_CUR_MAX + 1]; +# else + char *sep = 0; +# endif /* !__GNUC__ */ +#else + char sep[2]; +#endif + WORD_LIST *tlist; + + /* XXX this could just be ifs = ifs_value; */ + ifs = ifs_var ? value_cell (ifs_var) : (char *)0; + +#if defined (HANDLE_MULTIBYTE) +# if !defined (__GNUC__) + sep = (char *)xmalloc (MB_CUR_MAX + 1); +# endif /* !__GNUC__ */ + /* XXX - testing PF_ASSIGNRHS to make sure positional parameters are + separated with a space even when word splitting will not occur. */ + if (flags & PF_ASSIGNRHS) + { + sep[0] = ' '; + sep[1] = '\0'; + } + else if (ifs && *ifs) + { + if (ifs_firstc_len == 1) + { + sep[0] = ifs_firstc[0]; + sep[1] = '\0'; + } + else + { + memcpy (sep, ifs_firstc, ifs_firstc_len); + sep[ifs_firstc_len] = '\0'; + } + } + else + { + sep[0] = ' '; + sep[1] = '\0'; + } +#else /* !HANDLE_MULTIBYTE */ + /* XXX - PF_ASSIGNRHS means no word splitting, so we want positional + parameters separated by a space. */ + sep[0] = ((flags & PF_ASSIGNRHS) || ifs == 0 || *ifs == 0) ? ' ' : *ifs; + sep[1] = '\0'; +#endif /* !HANDLE_MULTIBYTE */ + + /* XXX -- why call quote_list if ifs == 0? we can get away without doing + it now that quote_escapes quotes spaces */ + tlist = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES|Q_PATQUOTE)) + ? quote_list (list) + : list_quote_escapes (list); + + ret = string_list_internal (tlist, sep); +#if defined (HANDLE_MULTIBYTE) && !defined (__GNUC__) + free (sep); +#endif + return ret; +} + +/* Turn the positional parameters into a string, understanding quoting and + the various subtleties of using the first character of $IFS as the + separator. Calls string_list_dollar_at, string_list_dollar_star, and + string_list as appropriate. */ +/* This needs to fully understand the additional contexts where word + splitting does not occur (W_ASSIGNRHS, etc.) */ +char * +string_list_pos_params (pchar, list, quoted, pflags) + int pchar; + WORD_LIST *list; + int quoted, pflags; +{ + char *ret; + WORD_LIST *tlist; + + if (pchar == '*' && (quoted & Q_DOUBLE_QUOTES)) + { + tlist = quote_list (list); + word_list_remove_quoted_nulls (tlist); + ret = string_list_dollar_star (tlist, 0, 0); + } + else if (pchar == '*' && (quoted & Q_HERE_DOCUMENT)) + { + tlist = quote_list (list); + word_list_remove_quoted_nulls (tlist); + ret = string_list (tlist); + } + else if (pchar == '*' && quoted == 0 && ifs_is_null) /* XXX */ + ret = expand_no_split_dollar_star ? string_list_dollar_star (list, quoted, 0) : string_list_dollar_at (list, quoted, 0); /* Posix interp 888 */ + else if (pchar == '*' && quoted == 0 && (pflags & PF_ASSIGNRHS)) /* XXX */ + ret = expand_no_split_dollar_star ? string_list_dollar_star (list, quoted, 0) : string_list_dollar_at (list, quoted, 0); /* Posix interp 888 */ + else if (pchar == '*') + { + /* Even when unquoted, string_list_dollar_star does the right thing + making sure that the first character of $IFS is used as the + separator. */ + ret = string_list_dollar_star (list, quoted, 0); + } + else if (pchar == '@' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + /* We use string_list_dollar_at, but only if the string is quoted, since + that quotes the escapes if it's not, which we don't want. We could + use string_list (the old code did), but that doesn't do the right + thing if the first character of $IFS is not a space. We use + string_list_dollar_star if the string is unquoted so we make sure that + the elements of $@ are separated by the first character of $IFS for + later splitting. */ + ret = string_list_dollar_at (list, quoted, 0); + else if (pchar == '@' && quoted == 0 && ifs_is_null) /* XXX */ + ret = string_list_dollar_at (list, quoted, 0); /* Posix interp 888 */ + else if (pchar == '@' && quoted == 0 && (pflags & PF_ASSIGNRHS)) + ret = string_list_dollar_at (list, quoted, pflags); /* Posix interp 888 */ + else if (pchar == '@') + ret = string_list_dollar_star (list, quoted, 0); + else + ret = string_list ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? quote_list (list) : list); + + return ret; +} + +/* Return the list of words present in STRING. Separate the string into + words at any of the characters found in SEPARATORS. If QUOTED is + non-zero then word in the list will have its quoted flag set, otherwise + the quoted flag is left as make_word () deemed fit. + + This obeys the P1003.2 word splitting semantics. If `separators' is + exactly , then the splitting algorithm is that of + the Bourne shell, which treats any sequence of characters from `separators' + as a delimiter. If IFS is unset, which results in `separators' being set + to "", no splitting occurs. If separators has some other value, the + following rules are applied (`IFS white space' means zero or more + occurrences of , , or , as long as those characters + are in `separators'): + + 1) IFS white space is ignored at the start and the end of the + string. + 2) Each occurrence of a character in `separators' that is not + IFS white space, along with any adjacent occurrences of + IFS white space delimits a field. + 3) Any nonzero-length sequence of IFS white space delimits a field. + */ + +/* BEWARE! list_string strips null arguments. Don't call it twice and + expect to have "" preserved! */ + +/* This performs word splitting and quoted null character removal on + STRING. */ +#define issep(c) \ + (((separators)[0]) ? ((separators)[1] ? isifs(c) \ + : (c) == (separators)[0]) \ + : 0) + +/* member of the space character class in the current locale */ +#define ifs_whitespace(c) ISSPACE(c) + +/* "adjacent IFS white space" */ +#define ifs_whitesep(c) ((sh_style_split || separators == 0) ? spctabnl (c) \ + : ifs_whitespace (c)) + +WORD_LIST * +list_string (string, separators, quoted) + register char *string, *separators; + int quoted; +{ + WORD_LIST *result; + WORD_DESC *t; + char *current_word, *s; + int sindex, sh_style_split, whitesep, xflags, free_word; + size_t slen; + + if (!string || !*string) + return ((WORD_LIST *)NULL); + + sh_style_split = separators && separators[0] == ' ' && + separators[1] == '\t' && + separators[2] == '\n' && + separators[3] == '\0'; + for (xflags = 0, s = ifs_value; s && *s; s++) + { + if (*s == CTLESC) xflags |= SX_NOCTLESC; + else if (*s == CTLNUL) xflags |= SX_NOESCCTLNUL; + } + + slen = 0; + /* Remove sequences of whitespace at the beginning of STRING, as + long as those characters appear in IFS. Do not do this if + STRING is quoted or if there are no separator characters. We use the + Posix definition of whitespace as a member of the space character + class in the current locale. */ +#if 0 + if (!quoted || !separators || !*separators) +#else + /* issep() requires that separators be non-null, and always returns 0 if + separator is the empty string, so don't bother if we get an empty string + for separators. We already returned NULL above if STRING is empty. */ + if (!quoted && separators && *separators) +#endif + { + for (s = string; *s && issep (*s) && ifs_whitespace (*s); s++); + + if (!*s) + return ((WORD_LIST *)NULL); + + string = s; + } + + /* OK, now STRING points to a word that does not begin with white space. + The splitting algorithm is: + extract a word, stopping at a separator + skip sequences of whitespace characters as long as they are separators + This obeys the field splitting rules in Posix.2. */ + slen = STRLEN (string); + for (result = (WORD_LIST *)NULL, sindex = 0; string[sindex]; ) + { + /* Don't need string length in ADVANCE_CHAR unless multibyte chars are + possible, but need it in string_extract_verbatim for bounds checking */ + current_word = string_extract_verbatim (string, slen, &sindex, separators, xflags); + if (current_word == 0) + break; + + free_word = 1; /* If non-zero, we free current_word */ + + /* If we have a quoted empty string, add a quoted null argument. We + want to preserve the quoted null character iff this is a quoted + empty string; otherwise the quoted null characters are removed + below. */ + if (QUOTED_NULL (current_word)) + { + t = alloc_word_desc (); + t->word = make_quoted_char ('\0'); + t->flags |= W_QUOTED|W_HASQUOTEDNULL; + result = make_word_list (t, result); + } + else if (current_word[0] != '\0') + { + /* If we have something, then add it regardless. However, + perform quoted null character removal on the current word. */ + remove_quoted_nulls (current_word); + + /* We don't want to set the word flags based on the string contents + here -- that's mostly for the parser -- so we just allocate a + WORD_DESC *, assign current_word (noting that we don't want to + free it), and skip all of make_word. */ + t = alloc_word_desc (); + t->word = current_word; + result = make_word_list (t, result); + free_word = 0; + result->word->flags &= ~W_HASQUOTEDNULL; /* just to be sure */ + if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + result->word->flags |= W_QUOTED; + /* If removing quoted null characters leaves an empty word, note + that we saw this for the caller to act on. */ + if (current_word == 0 || current_word[0] == '\0') + result->word->flags |= W_SAWQUOTEDNULL; + } + + /* If we're not doing sequences of separators in the traditional + Bourne shell style, then add a quoted null argument. */ + else if (!sh_style_split && !ifs_whitespace (string[sindex])) + { + t = alloc_word_desc (); + t->word = make_quoted_char ('\0'); + t->flags |= W_QUOTED|W_HASQUOTEDNULL; + result = make_word_list (t, result); + } + + if (free_word) + free (current_word); + + /* Note whether or not the separator is IFS whitespace, used later. */ + whitesep = string[sindex] && ifs_whitesep (string[sindex]); + + /* Move past the current separator character. */ + if (string[sindex]) + { + DECLARE_MBSTATE; + ADVANCE_CHAR (string, slen, sindex); + } + + /* Now skip sequences of whitespace characters if they are + in the list of separators. */ + while (string[sindex] && ifs_whitesep (string[sindex]) && issep (string[sindex])) + sindex++; + + /* If the first separator was IFS whitespace and the current character + is a non-whitespace IFS character, it should be part of the current + field delimiter, not a separate delimiter that would result in an + empty field. Look at POSIX.2, 3.6.5, (3)(b). */ + if (string[sindex] && whitesep && issep (string[sindex]) && !ifs_whitesep (string[sindex])) + { + sindex++; + /* An IFS character that is not IFS white space, along with any + adjacent IFS white space, shall delimit a field. (SUSv3) */ + while (string[sindex] && ifs_whitesep (string[sindex]) && isifs (string[sindex])) + sindex++; + } + } + return (REVERSE_LIST (result, WORD_LIST *)); +} + +/* Parse a single word from STRING, using SEPARATORS to separate fields. + ENDPTR is set to the first character after the word. This is used by + the `read' builtin. + + This is never called with SEPARATORS != $IFS, and takes advantage of that. + + XXX - this function is very similar to list_string; they should be + combined - XXX */ + +/* character is in $IFS */ +#define islocalsep(c) (local_cmap[(unsigned char)(c)] != 0) + +char * +get_word_from_string (stringp, separators, endptr) + char **stringp, *separators, **endptr; +{ + register char *s; + char *current_word; + int sindex, sh_style_split, whitesep, xflags; + unsigned char local_cmap[UCHAR_MAX+1]; /* really only need single-byte chars here */ + size_t slen; + + if (!stringp || !*stringp || !**stringp) + return ((char *)NULL); + + sh_style_split = separators && separators[0] == ' ' && + separators[1] == '\t' && + separators[2] == '\n' && + separators[3] == '\0'; + memset (local_cmap, '\0', sizeof (local_cmap)); + for (xflags = 0, s = separators; s && *s; s++) + { + if (*s == CTLESC) xflags |= SX_NOCTLESC; + if (*s == CTLNUL) xflags |= SX_NOESCCTLNUL; + local_cmap[(unsigned char)*s] = 1; /* local charmap of separators */ + } + + s = *stringp; + slen = 0; + + /* Remove sequences of whitespace at the beginning of STRING, as + long as those characters appear in SEPARATORS. This happens if + SEPARATORS == $' \t\n' or if IFS is unset. */ + if (sh_style_split || separators == 0) + for (; *s && spctabnl (*s) && islocalsep (*s); s++); + else + for (; *s && ifs_whitespace (*s) && islocalsep (*s); s++); + + /* If the string is nothing but whitespace, update it and return. */ + if (!*s) + { + *stringp = s; + if (endptr) + *endptr = s; + return ((char *)NULL); + } + + /* OK, S points to a word that does not begin with white space. + Now extract a word, stopping at a separator, save a pointer to + the first character after the word, then skip sequences of spc, + tab, or nl as long as they are separators. + + This obeys the field splitting rules in Posix.2. */ + sindex = 0; + /* Don't need string length in ADVANCE_CHAR unless multibyte chars are + possible, but need it in string_extract_verbatim for bounds checking */ + slen = STRLEN (s); + current_word = string_extract_verbatim (s, slen, &sindex, separators, xflags); + + /* Set ENDPTR to the first character after the end of the word. */ + if (endptr) + *endptr = s + sindex; + + /* Note whether or not the separator is IFS whitespace, used later. */ + whitesep = s[sindex] && ifs_whitesep (s[sindex]); + + /* Move past the current separator character. */ + if (s[sindex]) + { + DECLARE_MBSTATE; + ADVANCE_CHAR (s, slen, sindex); + } + + /* Now skip sequences of space, tab, or newline characters if they are + in the list of separators. */ + while (s[sindex] && spctabnl (s[sindex]) && islocalsep (s[sindex])) + sindex++; + + /* If the first separator was IFS whitespace and the current character is + a non-whitespace IFS character, it should be part of the current field + delimiter, not a separate delimiter that would result in an empty field. + Look at POSIX.2, 3.6.5, (3)(b). */ + if (s[sindex] && whitesep && islocalsep (s[sindex]) && !ifs_whitesep (s[sindex])) + { + sindex++; + /* An IFS character that is not IFS white space, along with any adjacent + IFS white space, shall delimit a field. */ + while (s[sindex] && ifs_whitesep (s[sindex]) && islocalsep(s[sindex])) + sindex++; + } + + /* Update STRING to point to the next field. */ + *stringp = s + sindex; + return (current_word); +} + +/* Remove IFS white space at the end of STRING. Start at the end + of the string and walk backwards until the beginning of the string + or we find a character that's not IFS white space and not CTLESC. + Only let CTLESC escape a white space character if SAW_ESCAPE is + non-zero. */ +char * +strip_trailing_ifs_whitespace (string, separators, saw_escape) + char *string, *separators; + int saw_escape; +{ + char *s; + + s = string + STRLEN (string) - 1; + while (s > string && ((spctabnl (*s) && isifs (*s)) || + (saw_escape && *s == CTLESC && spctabnl (s[1])))) + s--; + *++s = '\0'; + return string; +} + +#if 0 +/* UNUSED */ +/* Split STRING into words at whitespace. Obeys shell-style quoting with + backslashes, single and double quotes. */ +WORD_LIST * +list_string_with_quotes (string) + char *string; +{ + WORD_LIST *list; + char *token, *s; + size_t s_len; + int c, i, tokstart, len; + + for (s = string; s && *s && spctabnl (*s); s++) + ; + if (s == 0 || *s == 0) + return ((WORD_LIST *)NULL); + + s_len = strlen (s); + tokstart = i = 0; + list = (WORD_LIST *)NULL; + while (1) + { + c = s[i]; + if (c == '\\') + { + i++; + if (s[i]) + i++; + } + else if (c == '\'') + i = skip_single_quoted (s, s_len, ++i, 0); + else if (c == '"') + i = skip_double_quoted (s, s_len, ++i, 0); + else if (c == 0 || spctabnl (c)) + { + /* We have found the end of a token. Make a word out of it and + add it to the word list. */ + token = substring (s, tokstart, i); + list = add_string_to_list (token, list); + free (token); + while (spctabnl (s[i])) + i++; + if (s[i]) + tokstart = i; + else + break; + } + else + i++; /* normal character */ + } + return (REVERSE_LIST (list, WORD_LIST *)); +} +#endif + +/********************************************************/ +/* */ +/* Functions to perform assignment statements */ +/* */ +/********************************************************/ + +#if defined (ARRAY_VARS) +static SHELL_VAR * +do_compound_assignment (name, value, flags) + char *name, *value; + int flags; +{ + SHELL_VAR *v; + int mklocal, mkassoc, mkglobal, chklocal; + WORD_LIST *list; + char *newname; /* used for local nameref references */ + + mklocal = flags & ASS_MKLOCAL; + mkassoc = flags & ASS_MKASSOC; + mkglobal = flags & ASS_MKGLOBAL; + chklocal = flags & ASS_CHKLOCAL; + + if (mklocal && variable_context) + { + v = find_variable (name); /* follows namerefs */ + newname = (v == 0) ? nameref_transform_name (name, flags) : v->name; + if (v && ((readonly_p (v) && (flags & ASS_FORCE) == 0) || noassign_p (v))) + { + if (readonly_p (v)) + err_readonly (name); + return (v); /* XXX */ + } + list = expand_compound_array_assignment (v, value, flags); + if (mkassoc) + v = make_local_assoc_variable (newname, 0); + else if (v == 0 || (array_p (v) == 0 && assoc_p (v) == 0) || v->context != variable_context) + v = make_local_array_variable (newname, 0); + if (v) + assign_compound_array_list (v, list, flags); + if (list) + dispose_words (list); + } + /* In a function but forcing assignment in global context. CHKLOCAL means to + check for an existing local variable first. */ + else if (mkglobal && variable_context) + { + v = chklocal ? find_variable (name) : 0; + if (v && (local_p (v) == 0 || v->context != variable_context)) + v = 0; + if (v == 0) + v = find_global_variable (name); + if (v && ((readonly_p (v) && (flags & ASS_FORCE) == 0) || noassign_p (v))) + { + if (readonly_p (v)) + err_readonly (name); + return (v); /* XXX */ + } + /* sanity check */ + newname = (v == 0) ? nameref_transform_name (name, flags) : name; + list = expand_compound_array_assignment (v, value, flags); + if (v == 0 && mkassoc) + v = make_new_assoc_variable (newname); + else if (v && mkassoc && assoc_p (v) == 0) + v = convert_var_to_assoc (v); + else if (v == 0) + v = make_new_array_variable (newname); + else if (v && mkassoc == 0 && array_p (v) == 0) + v = convert_var_to_array (v); + if (v) + assign_compound_array_list (v, list, flags); + if (list) + dispose_words (list); + } + else + { + v = assign_array_from_string (name, value, flags); + if (v && ((readonly_p (v) && (flags & ASS_FORCE) == 0) || noassign_p (v))) + { + if (readonly_p (v)) + err_readonly (name); + return (v); /* XXX */ + } + } + + return (v); +} +#endif + +/* Given STRING, an assignment string, get the value of the right side + of the `=', and bind it to the left side. If EXPAND is true, then + perform parameter expansion, command substitution, and arithmetic + expansion on the right-hand side. Perform tilde expansion in any + case. Do not perform word splitting on the result of expansion. */ +static int +do_assignment_internal (word, expand) + const WORD_DESC *word; + int expand; +{ + int offset, appendop, assign_list, aflags, retval; + char *name, *value, *temp; + SHELL_VAR *entry; +#if defined (ARRAY_VARS) + char *t; + int ni; +#endif + const char *string; + + if (word == 0 || word->word == 0) + return 0; + + appendop = assign_list = aflags = 0; + string = word->word; + offset = assignment (string, 0); + name = savestring (string); + value = (char *)NULL; + + if (name[offset] == '=') + { + if (name[offset - 1] == '+') + { + appendop = 1; + name[offset - 1] = '\0'; + } + + name[offset] = 0; /* might need this set later */ + temp = name + offset + 1; + +#if defined (ARRAY_VARS) + if (expand && (word->flags & W_COMPASSIGN)) + { + assign_list = ni = 1; + value = extract_array_assignment_list (temp, &ni); + } + else +#endif + if (expand && temp[0]) + value = expand_string_if_necessary (temp, 0, expand_string_assignment); + else + value = savestring (temp); + } + + if (value == 0) + { + value = (char *)xmalloc (1); + value[0] = '\0'; + } + + if (echo_command_at_execute) + { + if (appendop) + name[offset - 1] = '+'; + xtrace_print_assignment (name, value, assign_list, 1); + if (appendop) + name[offset - 1] = '\0'; + } + +#define ASSIGN_RETURN(r) do { FREE (value); free (name); return (r); } while (0) + + if (appendop) + aflags |= ASS_APPEND; + +#if defined (ARRAY_VARS) + if (t = mbschr (name, LBRACK)) + { + if (assign_list) + { + report_error (_("%s: cannot assign list to array member"), name); + ASSIGN_RETURN (0); + } + entry = assign_array_element (name, value, aflags); + if (entry == 0) + ASSIGN_RETURN (0); + } + else if (assign_list) + { + if ((word->flags & W_ASSIGNARG) && (word->flags & W_CHKLOCAL)) + aflags |= ASS_CHKLOCAL; + if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL) == 0) + aflags |= ASS_MKLOCAL; + if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL)) + aflags |= ASS_MKGLOBAL; + if (word->flags & W_ASSIGNASSOC) + aflags |= ASS_MKASSOC; + entry = do_compound_assignment (name, value, aflags); + } + else +#endif /* ARRAY_VARS */ + entry = bind_variable (name, value, aflags); + + if (entry) + stupidly_hack_special_variables (entry->name); /* might be a nameref */ + else + stupidly_hack_special_variables (name); + + /* Return 1 if the assignment seems to have been performed correctly. */ + if (entry == 0 || readonly_p (entry)) + retval = 0; /* assignment failure */ + else if (noassign_p (entry)) + { + set_exit_status (EXECUTION_FAILURE); + retval = 1; /* error status, but not assignment failure */ + } + else + retval = 1; + + if (entry && retval != 0 && noassign_p (entry) == 0) + VUNSETATTR (entry, att_invisible); + + ASSIGN_RETURN (retval); +} + +/* Perform the assignment statement in STRING, and expand the + right side by doing tilde, command and parameter expansion. */ +int +do_assignment (string) + char *string; +{ + WORD_DESC td; + + td.flags = W_ASSIGNMENT; + td.word = string; + + return do_assignment_internal (&td, 1); +} + +int +do_word_assignment (word, flags) + WORD_DESC *word; + int flags; +{ + return do_assignment_internal (word, 1); +} + +/* Given STRING, an assignment string, get the value of the right side + of the `=', and bind it to the left side. Do not perform any word + expansions on the right hand side. */ +int +do_assignment_no_expand (string) + char *string; +{ + WORD_DESC td; + + td.flags = W_ASSIGNMENT; + td.word = string; + + return (do_assignment_internal (&td, 0)); +} + +/*************************************************** + * * + * Functions to manage the positional parameters * + * * + ***************************************************/ + +/* Return the word list that corresponds to `$*'. */ +WORD_LIST * +list_rest_of_args () +{ + register WORD_LIST *list, *args; + int i; + + /* Break out of the loop as soon as one of the dollar variables is null. */ + for (i = 1, list = (WORD_LIST *)NULL; i < 10 && dollar_vars[i]; i++) + list = make_word_list (make_bare_word (dollar_vars[i]), list); + + for (args = rest_of_args; args; args = args->next) + list = make_word_list (make_bare_word (args->word->word), list); + + return (REVERSE_LIST (list, WORD_LIST *)); +} + +/* Return the value of a positional parameter. This handles values > 10. */ +char * +get_dollar_var_value (ind) + intmax_t ind; +{ + char *temp; + WORD_LIST *p; + + if (ind < 10) + temp = dollar_vars[ind] ? savestring (dollar_vars[ind]) : (char *)NULL; + else /* We want something like ${11} */ + { + ind -= 10; + for (p = rest_of_args; p && ind--; p = p->next) + ; + temp = p ? savestring (p->word->word) : (char *)NULL; + } + return (temp); +} + +/* Make a single large string out of the dollar digit variables, + and the rest_of_args. If DOLLAR_STAR is 1, then obey the special + case of "$*" with respect to IFS. */ +char * +string_rest_of_args (dollar_star) + int dollar_star; +{ + register WORD_LIST *list; + char *string; + + list = list_rest_of_args (); + string = dollar_star ? string_list_dollar_star (list, 0, 0) : string_list (list); + dispose_words (list); + return (string); +} + +/* Return a string containing the positional parameters from START to + END, inclusive. If STRING[0] == '*', we obey the rules for $*, + which only makes a difference if QUOTED is non-zero. If QUOTED includes + Q_HERE_DOCUMENT or Q_DOUBLE_QUOTES, this returns a quoted list, otherwise + no quoting chars are added. */ +static char * +pos_params (string, start, end, quoted, pflags) + char *string; + int start, end, quoted, pflags; +{ + WORD_LIST *save, *params, *h, *t; + char *ret; + int i; + + /* see if we can short-circuit. if start == end, we want 0 parameters. */ + if (start == end) + return ((char *)NULL); + + save = params = list_rest_of_args (); + if (save == 0 && start > 0) + return ((char *)NULL); + + if (start == 0) /* handle ${@:0[:x]} specially */ + { + t = make_word_list (make_word (dollar_vars[0]), params); + save = params = t; + } + + for (i = start ? 1 : 0; params && i < start; i++) + params = params->next; + if (params == 0) + { + dispose_words (save); + return ((char *)NULL); + } + for (h = t = params; params && i < end; i++) + { + t = params; + params = params->next; + } + t->next = (WORD_LIST *)NULL; + + ret = string_list_pos_params (string[0], h, quoted, pflags); + + if (t != params) + t->next = params; + + dispose_words (save); + return (ret); +} + +/******************************************************************/ +/* */ +/* Functions to expand strings to strings or WORD_LISTs */ +/* */ +/******************************************************************/ + +#if defined (PROCESS_SUBSTITUTION) +#define EXP_CHAR(s) (s == '$' || s == '`' || s == '<' || s == '>' || s == CTLESC || s == '~') +#else +#define EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~') +#endif + +/* If there are any characters in STRING that require full expansion, + then call FUNC to expand STRING; otherwise just perform quote + removal if necessary. This returns a new string. */ +static char * +expand_string_if_necessary (string, quoted, func) + char *string; + int quoted; + EXPFUNC *func; +{ + WORD_LIST *list; + size_t slen; + int i, saw_quote; + char *ret; + DECLARE_MBSTATE; + + /* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (string) : 0; + i = saw_quote = 0; + while (string[i]) + { + if (EXP_CHAR (string[i])) + break; + else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"') + saw_quote = 1; + ADVANCE_CHAR (string, slen, i); + } + + if (string[i]) + { + list = (*func) (string, quoted); + if (list) + { + ret = string_list (list); + dispose_words (list); + } + else + ret = (char *)NULL; + } + else if (saw_quote && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + ret = string_quote_removal (string, quoted); + else + ret = savestring (string); + + return ret; +} + +static inline char * +expand_string_to_string_internal (string, quoted, func) + char *string; + int quoted; + EXPFUNC *func; +{ + WORD_LIST *list; + char *ret; + + if (string == 0 || *string == '\0') + return ((char *)NULL); + + list = (*func) (string, quoted); + if (list) + { + ret = string_list (list); + dispose_words (list); + } + else + ret = (char *)NULL; + + return (ret); +} + +char * +expand_string_to_string (string, quoted) + char *string; + int quoted; +{ + return (expand_string_to_string_internal (string, quoted, expand_string)); +} + +char * +expand_string_unsplit_to_string (string, quoted) + char *string; + int quoted; +{ + return (expand_string_to_string_internal (string, quoted, expand_string_unsplit)); +} + +char * +expand_assignment_string_to_string (string, quoted) + char *string; + int quoted; +{ + return (expand_string_to_string_internal (string, quoted, expand_string_assignment)); +} + +char * +expand_arith_string (string, quoted) + char *string; + int quoted; +{ + WORD_DESC td; + WORD_LIST *list, *tlist; + size_t slen; + int i, saw_quote; + char *ret; + DECLARE_MBSTATE; + + /* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (string) : 0; + i = saw_quote = 0; + while (string[i]) + { + if (EXP_CHAR (string[i])) + break; + else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"') + saw_quote = 1; + ADVANCE_CHAR (string, slen, i); + } + + if (string[i]) + { + /* This is expanded version of expand_string_internal as it's called by + expand_string_leave_quoted */ + td.flags = W_NOPROCSUB|W_NOTILDE; /* don't want process substitution or tilde expansion */ +#if 0 /* TAG: bash-5.2 */ + if (quoted & Q_ARRAYSUB) + td.flags |= W_NOCOMSUB; +#endif + td.word = savestring (string); + list = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL); + /* This takes care of the calls from expand_string_leave_quoted and + expand_string */ + if (list) + { + tlist = word_list_split (list); + dispose_words (list); + list = tlist; + if (list) + dequote_list (list); + } + /* This comes from expand_string_if_necessary */ + if (list) + { + ret = string_list (list); + dispose_words (list); + } + else + ret = (char *)NULL; + FREE (td.word); + } + else if (saw_quote && (quoted & Q_ARITH)) + ret = string_quote_removal (string, quoted); + else if (saw_quote && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + ret = string_quote_removal (string, quoted); + else + ret = savestring (string); + + return ret; +} + +#if defined (COND_COMMAND) +/* Just remove backslashes in STRING. Returns a new string. */ +char * +remove_backslashes (string) + char *string; +{ + char *r, *ret, *s; + + r = ret = (char *)xmalloc (strlen (string) + 1); + for (s = string; s && *s; ) + { + if (*s == '\\') + s++; + if (*s == 0) + break; + *r++ = *s++; + } + *r = '\0'; + return ret; +} + +/* This needs better error handling. */ +/* Expand W for use as an argument to a unary or binary operator in a + [[...]] expression. If SPECIAL is 1, this is the rhs argument + to the != or == operator, and should be treated as a pattern. In + this case, we quote the string specially for the globbing code. If + SPECIAL is 2, this is an rhs argument for the =~ operator, and should + be quoted appropriately for regcomp/regexec. The caller is responsible + for removing the backslashes if the unquoted word is needed later. In + any case, since we don't perform word splitting, we need to do quoted + null character removal. */ +char * +cond_expand_word (w, special) + WORD_DESC *w; + int special; +{ + char *r, *p; + WORD_LIST *l; + int qflags; + + if (w->word == 0 || w->word[0] == '\0') + return ((char *)NULL); + + expand_no_split_dollar_star = 1; + w->flags |= W_NOSPLIT2; + l = call_expand_word_internal (w, 0, 0, (int *)0, (int *)0); + expand_no_split_dollar_star = 0; + if (l) + { + if (special == 0) /* LHS */ + { + if (l->word) + word_list_remove_quoted_nulls (l); + dequote_list (l); + r = string_list (l); + } + else + { + /* Need to figure out whether or not we should call dequote_escapes + or a new dequote_ctlnul function here, and under what + circumstances. */ + qflags = QGLOB_CVTNULL|QGLOB_CTLESC; + if (special == 2) + qflags |= QGLOB_REGEXP; + word_list_remove_quoted_nulls (l); + p = string_list (l); + r = quote_string_for_globbing (p, qflags); + free (p); + } + dispose_words (l); + } + else + r = (char *)NULL; + + return r; +} +#endif + +/* Call expand_word_internal to expand W and handle error returns. + A convenience function for functions that don't want to handle + any errors or free any memory before aborting. */ +static WORD_LIST * +call_expand_word_internal (w, q, i, c, e) + WORD_DESC *w; + int q, i, *c, *e; +{ + WORD_LIST *result; + + result = expand_word_internal (w, q, i, c, e); + if (result == &expand_word_error || result == &expand_word_fatal) + { + /* By convention, each time this error is returned, w->word has + already been freed (it sometimes may not be in the fatal case, + but that doesn't result in a memory leak because we're going + to exit in most cases). */ + w->word = (char *)NULL; + last_command_exit_value = EXECUTION_FAILURE; + exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF); + /* NOTREACHED */ + return (NULL); + } + else + return (result); +} + +/* Perform parameter expansion, command substitution, and arithmetic + expansion on STRING, as if it were a word. Leave the result quoted. + Since this does not perform word splitting, it leaves quoted nulls + in the result. */ +static WORD_LIST * +expand_string_internal (string, quoted) + char *string; + int quoted; +{ + WORD_DESC td; + WORD_LIST *tresult; + + if (string == 0 || *string == 0) + return ((WORD_LIST *)NULL); + + td.flags = 0; + td.word = savestring (string); + + tresult = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL); + + FREE (td.word); + return (tresult); +} + +/* Expand STRING by performing parameter expansion, command substitution, + and arithmetic expansion. Dequote the resulting WORD_LIST before + returning it, but do not perform word splitting. The call to + remove_quoted_nulls () is in here because word splitting normally + takes care of quote removal. */ +WORD_LIST * +expand_string_unsplit (string, quoted) + char *string; + int quoted; +{ + WORD_LIST *value; + + if (string == 0 || *string == '\0') + return ((WORD_LIST *)NULL); + + expand_no_split_dollar_star = 1; + value = expand_string_internal (string, quoted); + expand_no_split_dollar_star = 0; + + if (value) + { + if (value->word) + { + remove_quoted_nulls (value->word->word); /* XXX */ + value->word->flags &= ~W_HASQUOTEDNULL; + } + dequote_list (value); + } + return (value); +} + +/* Expand the rhs of an assignment statement */ +WORD_LIST * +expand_string_assignment (string, quoted) + char *string; + int quoted; +{ + WORD_DESC td; + WORD_LIST *value; + + if (string == 0 || *string == '\0') + return ((WORD_LIST *)NULL); + + expand_no_split_dollar_star = 1; + +#if 0 + /* Other shells (ksh93) do it this way, which affects how $@ is expanded + in constructs like bar=${@#0} (preserves the spaces resulting from the + expansion of $@ in a context where you don't do word splitting); Posix + interp 888 makes the expansion of $@ in contexts where word splitting + is not performed unspecified. */ + td.flags = W_ASSIGNRHS|W_NOSPLIT2; /* Posix interp 888 */ +#else + td.flags = W_ASSIGNRHS; +#endif + td.word = savestring (string); + value = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL); + FREE (td.word); + + expand_no_split_dollar_star = 0; + + if (value) + { + if (value->word) + { + remove_quoted_nulls (value->word->word); /* XXX */ + value->word->flags &= ~W_HASQUOTEDNULL; + } + dequote_list (value); + } + return (value); +} + + +/* Expand one of the PS? prompt strings. This is a sort of combination of + expand_string_unsplit and expand_string_internal, but returns the + passed string when an error occurs. Might want to trap other calls + to jump_to_top_level here so we don't endlessly loop. */ +WORD_LIST * +expand_prompt_string (string, quoted, wflags) + char *string; + int quoted; + int wflags; +{ + WORD_LIST *value; + WORD_DESC td; + + if (string == 0 || *string == 0) + return ((WORD_LIST *)NULL); + + td.flags = wflags; + td.word = savestring (string); + + no_longjmp_on_fatal_error = 1; + value = expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL); + no_longjmp_on_fatal_error = 0; + + if (value == &expand_word_error || value == &expand_word_fatal) + { + value = make_word_list (make_bare_word (string), (WORD_LIST *)NULL); + return value; + } + FREE (td.word); + if (value) + { + if (value->word) + { + remove_quoted_nulls (value->word->word); /* XXX */ + value->word->flags &= ~W_HASQUOTEDNULL; + } + dequote_list (value); + } + return (value); +} + +/* Expand STRING just as if you were expanding a word, but do not dequote + the resultant WORD_LIST. This is called only from within this file, + and is used to correctly preserve quoted characters when expanding + things like ${1+"$@"}. This does parameter expansion, command + substitution, arithmetic expansion, and word splitting. */ +static WORD_LIST * +expand_string_leave_quoted (string, quoted) + char *string; + int quoted; +{ + WORD_LIST *tlist; + WORD_LIST *tresult; + + if (string == 0 || *string == '\0') + return ((WORD_LIST *)NULL); + + tlist = expand_string_internal (string, quoted); + + if (tlist) + { + tresult = word_list_split (tlist); + dispose_words (tlist); + return (tresult); + } + return ((WORD_LIST *)NULL); +} + +/* This does not perform word splitting or dequote the WORD_LIST + it returns. */ +static WORD_LIST * +expand_string_for_rhs (string, quoted, op, pflags, dollar_at_p, expanded_p) + char *string; + int quoted, op, pflags; + int *dollar_at_p, *expanded_p; +{ + WORD_DESC td; + WORD_LIST *tresult; + int old_nosplit; + + if (string == 0 || *string == '\0') + return (WORD_LIST *)NULL; + + /* We want field splitting to be determined by what is going to be done with + the entire ${parameterOPword} expansion, so we don't want to split the RHS + we expand here. However, the expansion of $* is determined by whether we + are going to eventually perform word splitting, so we want to set this + depending on whether or not are are going to be splitting: if the expansion + is quoted, if the OP is `=', or if IFS is set to the empty string, we + are not going to be splitting, so we set expand_no_split_dollar_star to + note this to callees. + We pass through PF_ASSIGNRHS as W_ASSIGNRHS if this is on the RHS of an + assignment statement. */ + /* The updated treatment of $* is the result of Posix interp 888 */ + /* This was further clarified on the austin-group list in March, 2017 and + in Posix bug 1129 */ + old_nosplit = expand_no_split_dollar_star; + expand_no_split_dollar_star = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || op == '=' || ifs_is_null == 0; /* XXX - was 1 */ + td.flags = W_EXPANDRHS; /* expanding RHS of ${paramOPword} */ + td.flags |= W_NOSPLIT2; /* no splitting, remove "" and '' */ + if (pflags & PF_ASSIGNRHS) /* pass through */ + td.flags |= W_ASSIGNRHS; + if (op == '=') +#if 0 + td.flags |= W_ASSIGNRHS; /* expand b in ${a=b} like assignment */ +#else + td.flags |= W_ASSIGNRHS|W_NOASSNTILDE; /* expand b in ${a=b} like assignment */ +#endif + td.word = string; + tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, expanded_p); + expand_no_split_dollar_star = old_nosplit; + + return (tresult); +} + +/* This does not perform word splitting or dequote the WORD_LIST + it returns and it treats $* as if it were quoted. */ +static WORD_LIST * +expand_string_for_pat (string, quoted, dollar_at_p, expanded_p) + char *string; + int quoted, *dollar_at_p, *expanded_p; +{ + WORD_DESC td; + WORD_LIST *tresult; + int oexp; + + if (string == 0 || *string == '\0') + return (WORD_LIST *)NULL; + + oexp = expand_no_split_dollar_star; + expand_no_split_dollar_star = 1; + td.flags = W_NOSPLIT2; /* no splitting, remove "" and '' */ + td.word = string; + tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, expanded_p); + expand_no_split_dollar_star = oexp; + + return (tresult); +} + +/* Expand STRING just as if you were expanding a word. This also returns + a list of words. Note that filename globbing is *NOT* done for word + or string expansion, just when the shell is expanding a command. This + does parameter expansion, command substitution, arithmetic expansion, + and word splitting. Dequote the resultant WORD_LIST before returning. */ +WORD_LIST * +expand_string (string, quoted) + char *string; + int quoted; +{ + WORD_LIST *result; + + if (string == 0 || *string == '\0') + return ((WORD_LIST *)NULL); + + result = expand_string_leave_quoted (string, quoted); + return (result ? dequote_list (result) : result); +} + +/******************************************* + * * + * Functions to expand WORD_DESCs * + * * + *******************************************/ + +/* Expand WORD, performing word splitting on the result. This does + parameter expansion, command substitution, arithmetic expansion, + word splitting, and quote removal. */ + +WORD_LIST * +expand_word (word, quoted) + WORD_DESC *word; + int quoted; +{ + WORD_LIST *result, *tresult; + + tresult = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL); + result = word_list_split (tresult); + dispose_words (tresult); + return (result ? dequote_list (result) : result); +} + +/* Expand WORD, but do not perform word splitting on the result. This + does parameter expansion, command substitution, arithmetic expansion, + and quote removal. */ +WORD_LIST * +expand_word_unsplit (word, quoted) + WORD_DESC *word; + int quoted; +{ + WORD_LIST *result; + + result = expand_word_leave_quoted (word, quoted); + return (result ? dequote_list (result) : result); +} + +/* Perform shell expansions on WORD, but do not perform word splitting or + quote removal on the result. Virtually identical to expand_word_unsplit; + could be combined if implementations don't diverge. */ +WORD_LIST * +expand_word_leave_quoted (word, quoted) + WORD_DESC *word; + int quoted; +{ + WORD_LIST *result; + + expand_no_split_dollar_star = 1; + if (ifs_is_null) + word->flags |= W_NOSPLIT; + word->flags |= W_NOSPLIT2; + result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL); + expand_no_split_dollar_star = 0; + + return result; +} + +/*************************************************** + * * + * Functions to handle quoting chars * + * * + ***************************************************/ + +/* Conventions: + + A string with s[0] == CTLNUL && s[1] == 0 is a quoted null string. + The parser passes CTLNUL as CTLESC CTLNUL. */ + +/* Quote escape characters in string s, but no other characters. This is + used to protect CTLESC and CTLNUL in variable values from the rest of + the word expansion process after the variable is expanded (word splitting + and filename generation). If IFS is null, we quote spaces as well, just + in case we split on spaces later (in the case of unquoted $@, we will + eventually attempt to split the entire word on spaces). Corresponding + code exists in dequote_escapes. Even if we don't end up splitting on + spaces, quoting spaces is not a problem. This should never be called on + a string that is quoted with single or double quotes or part of a here + document (effectively double-quoted). + FLAGS says whether or not we are going to split the result. If we are not, + and there is a CTLESC or CTLNUL in IFS, we need to quote CTLESC and CTLNUL, + respectively, to prevent them from being removed as part of dequoting. */ +static char * +quote_escapes_internal (string, flags) + const char *string; + int flags; +{ + const char *s, *send; + char *t, *result; + size_t slen; + int quote_spaces, skip_ctlesc, skip_ctlnul, nosplit; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + + quote_spaces = (ifs_value && *ifs_value == 0); + nosplit = (flags & PF_NOSPLIT2); + + for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++) + { + skip_ctlesc |= (nosplit == 0 && *s == CTLESC); + skip_ctlnul |= (nosplit == 0 && *s == CTLNUL); + } + + t = result = (char *)xmalloc ((slen * 2) + 1); + s = string; + + while (*s) + { + if ((skip_ctlesc == 0 && *s == CTLESC) || (skip_ctlnul == 0 && *s == CTLNUL) || (quote_spaces && *s == ' ')) + *t++ = CTLESC; + COPY_CHAR_P (t, s, send); + } + *t = '\0'; + + return (result); +} + +char * +quote_escapes (string) + const char *string; +{ + return (quote_escapes_internal (string, 0)); +} + +char * +quote_rhs (string) + const char *string; +{ + return (quote_escapes_internal (string, PF_NOSPLIT2)); +} + +static WORD_LIST * +list_quote_escapes (list) + WORD_LIST *list; +{ + register WORD_LIST *w; + char *t; + + for (w = list; w; w = w->next) + { + t = w->word->word; + w->word->word = quote_escapes (t); + free (t); + } + return list; +} + +/* Inverse of quote_escapes; remove CTLESC protecting CTLESC or CTLNUL. + + The parser passes us CTLESC as CTLESC CTLESC and CTLNUL as CTLESC CTLNUL. + This is necessary to make unquoted CTLESC and CTLNUL characters in the + data stream pass through properly. + + We need to remove doubled CTLESC characters inside quoted strings before + quoting the entire string, so we do not double the number of CTLESC + characters. + + Also used by parts of the pattern substitution code. */ +char * +dequote_escapes (string) + const char *string; +{ + const char *s, *send; + char *t, *result; + size_t slen; + int quote_spaces; + DECLARE_MBSTATE; + + if (string == 0) + return (char *)0; + + slen = strlen (string); + send = string + slen; + + t = result = (char *)xmalloc (slen + 1); + + if (strchr (string, CTLESC) == 0) + return (strcpy (result, string)); + + quote_spaces = (ifs_value && *ifs_value == 0); + + s = string; + while (*s) + { + if (*s == CTLESC && (s[1] == CTLESC || s[1] == CTLNUL || (quote_spaces && s[1] == ' '))) + { + s++; + if (*s == '\0') + break; + } + COPY_CHAR_P (t, s, send); + } + *t = '\0'; + + return result; +} + +#if defined (INCLUDE_UNUSED) +static WORD_LIST * +list_dequote_escapes (list) + WORD_LIST *list; +{ + register WORD_LIST *w; + char *t; + + for (w = list; w; w = w->next) + { + t = w->word->word; + w->word->word = dequote_escapes (t); + free (t); + } + return list; +} +#endif + +/* Return a new string with the quoted representation of character C. + This turns "" into QUOTED_NULL, so the W_HASQUOTEDNULL flag needs to be + set in any resultant WORD_DESC where this value is the word. */ +static char * +make_quoted_char (c) + int c; +{ + char *temp; + + temp = (char *)xmalloc (3); + if (c == 0) + { + temp[0] = CTLNUL; + temp[1] = '\0'; + } + else + { + temp[0] = CTLESC; + temp[1] = c; + temp[2] = '\0'; + } + return (temp); +} + +/* Quote STRING, returning a new string. This turns "" into QUOTED_NULL, so + the W_HASQUOTEDNULL flag needs to be set in any resultant WORD_DESC where + this value is the word. */ +char * +quote_string (string) + char *string; +{ + register char *t; + size_t slen; + char *result, *send; + + if (*string == 0) + { + result = (char *)xmalloc (2); + result[0] = CTLNUL; + result[1] = '\0'; + } + else + { + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + + result = (char *)xmalloc ((slen * 2) + 1); + + for (t = result; string < send; ) + { + *t++ = CTLESC; + COPY_CHAR_P (t, string, send); + } + *t = '\0'; + } + return (result); +} + +/* De-quote quoted characters in STRING. */ +char * +dequote_string (string) + char *string; +{ + register char *s, *t; + size_t slen; + char *result, *send; + DECLARE_MBSTATE; + +#if defined (DEBUG) + if (string[0] == CTLESC && string[1] == 0) + internal_inform ("dequote_string: string with bare CTLESC"); +#endif + + slen = STRLEN (string); + + t = result = (char *)xmalloc (slen + 1); + + if (QUOTED_NULL (string)) + { + result[0] = '\0'; + return (result); + } + + /* A string consisting of only a single CTLESC should pass through unchanged */ + if (string[0] == CTLESC && string[1] == 0) + { + result[0] = CTLESC; + result[1] = '\0'; + return (result); + } + + /* If no character in the string can be quoted, don't bother examining + each character. Just return a copy of the string passed to us. */ + if (strchr (string, CTLESC) == NULL) + return (strcpy (result, string)); + + send = string + slen; + s = string; + while (*s) + { + if (*s == CTLESC) + { + s++; + if (*s == '\0') + break; + } + COPY_CHAR_P (t, s, send); + } + + *t = '\0'; + return (result); +} + +/* Quote the entire WORD_LIST list. */ +static WORD_LIST * +quote_list (list) + WORD_LIST *list; +{ + register WORD_LIST *w; + char *t; + + for (w = list; w; w = w->next) + { + t = w->word->word; + w->word->word = quote_string (t); + if (*t == 0) + w->word->flags |= W_HASQUOTEDNULL; /* XXX - turn on W_HASQUOTEDNULL here? */ + w->word->flags |= W_QUOTED; + free (t); + } + return list; +} + +WORD_DESC * +dequote_word (word) + WORD_DESC *word; +{ + register char *s; + + s = dequote_string (word->word); + if (QUOTED_NULL (word->word)) + word->flags &= ~W_HASQUOTEDNULL; + free (word->word); + word->word = s; + + return word; +} + +/* De-quote quoted characters in each word in LIST. */ +WORD_LIST * +dequote_list (list) + WORD_LIST *list; +{ + register char *s; + register WORD_LIST *tlist; + + for (tlist = list; tlist; tlist = tlist->next) + { + s = dequote_string (tlist->word->word); + if (QUOTED_NULL (tlist->word->word)) + tlist->word->flags &= ~W_HASQUOTEDNULL; + free (tlist->word->word); + tlist->word->word = s; + } + return list; +} + +/* Remove CTLESC protecting a CTLESC or CTLNUL in place. Return the passed + string. */ +char * +remove_quoted_escapes (string) + char *string; +{ + char *t; + + if (string) + { + t = dequote_escapes (string); + strcpy (string, t); + free (t); + } + + return (string); +} + +/* Remove quoted $IFS characters from STRING. Quoted IFS characters are + added to protect them from word splitting, but we need to remove them + if no word splitting takes place. This returns newly-allocated memory, + so callers can use it to replace savestring(). */ +char * +remove_quoted_ifs (string) + char *string; +{ + register size_t slen; + register int i, j; + char *ret, *send; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + + i = j = 0; + ret = (char *)xmalloc (slen + 1); + + while (i < slen) + { + if (string[i] == CTLESC) + { + i++; + if (string[i] == 0 || isifs (string[i]) == 0) + ret[j++] = CTLESC; + if (i == slen) + break; + } + + COPY_CHAR_I (ret, j, string, send, i); + } + ret[j] = '\0'; + + return (ret); +} + +char * +remove_quoted_nulls (string) + char *string; +{ + register size_t slen; + register int i, j, prev_i; + DECLARE_MBSTATE; + + if (strchr (string, CTLNUL) == 0) /* XXX */ + return string; /* XXX */ + + slen = strlen (string); + i = j = 0; + + while (i < slen) + { + if (string[i] == CTLESC) + { + /* Old code had j++, but we cannot assume that i == j at this + point -- what if a CTLNUL has already been removed from the + string? We don't want to drop the CTLESC or recopy characters + that we've already copied down. */ + i++; + string[j++] = CTLESC; + if (i == slen) + break; + } + else if (string[i] == CTLNUL) + { + i++; + continue; + } + + prev_i = i; + ADVANCE_CHAR (string, slen, i); /* COPY_CHAR_I? */ + if (j < prev_i) + { + do string[j++] = string[prev_i++]; while (prev_i < i); + } + else + j = i; + } + string[j] = '\0'; + + return (string); +} + +/* Perform quoted null character removal on each element of LIST. + This modifies LIST. */ +void +word_list_remove_quoted_nulls (list) + WORD_LIST *list; +{ + register WORD_LIST *t; + + for (t = list; t; t = t->next) + { + remove_quoted_nulls (t->word->word); + t->word->flags &= ~W_HASQUOTEDNULL; + } +} + +/* **************************************************************** */ +/* */ +/* Functions for Matching and Removing Patterns */ +/* */ +/* **************************************************************** */ + +#if defined (HANDLE_MULTIBYTE) +# ifdef INCLUDE_UNUSED +static unsigned char * +mb_getcharlens (string, len) + char *string; + int len; +{ + int i, offset, last; + unsigned char *ret; + char *p; + DECLARE_MBSTATE; + + i = offset = 0; + last = 0; + ret = (unsigned char *)xmalloc (len); + memset (ret, 0, len); + while (string[last]) + { + ADVANCE_CHAR (string, len, offset); + ret[last] = offset - last; + last = offset; + } + return ret; +} +# endif +#endif + +/* Remove the portion of PARAM matched by PATTERN according to OP, where OP + can have one of 4 values: + RP_LONG_LEFT remove longest matching portion at start of PARAM + RP_SHORT_LEFT remove shortest matching portion at start of PARAM + RP_LONG_RIGHT remove longest matching portion at end of PARAM + RP_SHORT_RIGHT remove shortest matching portion at end of PARAM +*/ + +#define RP_LONG_LEFT 1 +#define RP_SHORT_LEFT 2 +#define RP_LONG_RIGHT 3 +#define RP_SHORT_RIGHT 4 + +/* Returns its first argument if nothing matched; new memory otherwise */ +static char * +remove_upattern (param, pattern, op) + char *param, *pattern; + int op; +{ + register size_t len; + register char *end; + register char *p, *ret, c; + + len = STRLEN (param); + end = param + len; + + switch (op) + { + case RP_LONG_LEFT: /* remove longest match at start */ + for (p = end; p >= param; p--) + { + c = *p; *p = '\0'; + if (strmatch (pattern, param, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + *p = c; + return (savestring (p)); + } + *p = c; + + } + break; + + case RP_SHORT_LEFT: /* remove shortest match at start */ + for (p = param; p <= end; p++) + { + c = *p; *p = '\0'; + if (strmatch (pattern, param, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + *p = c; + return (savestring (p)); + } + *p = c; + } + break; + + case RP_LONG_RIGHT: /* remove longest match at end */ + for (p = param; p <= end; p++) + { + if (strmatch (pattern, p, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + c = *p; *p = '\0'; + ret = savestring (param); + *p = c; + return (ret); + } + } + break; + + case RP_SHORT_RIGHT: /* remove shortest match at end */ + for (p = end; p >= param; p--) + { + if (strmatch (pattern, p, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + c = *p; *p = '\0'; + ret = savestring (param); + *p = c; + return (ret); + } + } + break; + } + + return (param); /* no match, return original string */ +} + +#if defined (HANDLE_MULTIBYTE) +/* Returns its first argument if nothing matched; new memory otherwise */ +static wchar_t * +remove_wpattern (wparam, wstrlen, wpattern, op) + wchar_t *wparam; + size_t wstrlen; + wchar_t *wpattern; + int op; +{ + wchar_t wc, *ret; + int n; + + switch (op) + { + case RP_LONG_LEFT: /* remove longest match at start */ + for (n = wstrlen; n >= 0; n--) + { + wc = wparam[n]; wparam[n] = L'\0'; + if (wcsmatch (wpattern, wparam, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + wparam[n] = wc; + return (wcsdup (wparam + n)); + } + wparam[n] = wc; + } + break; + + case RP_SHORT_LEFT: /* remove shortest match at start */ + for (n = 0; n <= wstrlen; n++) + { + wc = wparam[n]; wparam[n] = L'\0'; + if (wcsmatch (wpattern, wparam, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + wparam[n] = wc; + return (wcsdup (wparam + n)); + } + wparam[n] = wc; + } + break; + + case RP_LONG_RIGHT: /* remove longest match at end */ + for (n = 0; n <= wstrlen; n++) + { + if (wcsmatch (wpattern, wparam + n, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + wc = wparam[n]; wparam[n] = L'\0'; + ret = wcsdup (wparam); + wparam[n] = wc; + return (ret); + } + } + break; + + case RP_SHORT_RIGHT: /* remove shortest match at end */ + for (n = wstrlen; n >= 0; n--) + { + if (wcsmatch (wpattern, wparam + n, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + wc = wparam[n]; wparam[n] = L'\0'; + ret = wcsdup (wparam); + wparam[n] = wc; + return (ret); + } + } + break; + } + + return (wparam); /* no match, return original string */ +} +#endif /* HANDLE_MULTIBYTE */ + +static char * +remove_pattern (param, pattern, op) + char *param, *pattern; + int op; +{ + char *xret; + + if (param == NULL) + return (param); + if (*param == '\0' || pattern == NULL || *pattern == '\0') /* minor optimization */ + return (savestring (param)); + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1) + { + wchar_t *ret, *oret; + size_t n; + wchar_t *wparam, *wpattern; + mbstate_t ps; + + /* XXX - could optimize here by checking param and pattern for multibyte + chars with mbsmbchar and calling remove_upattern. */ + + n = xdupmbstowcs (&wpattern, NULL, pattern); + if (n == (size_t)-1) + { + xret = remove_upattern (param, pattern, op); + return ((xret == param) ? savestring (param) : xret); + } + n = xdupmbstowcs (&wparam, NULL, param); + + if (n == (size_t)-1) + { + free (wpattern); + xret = remove_upattern (param, pattern, op); + return ((xret == param) ? savestring (param) : xret); + } + oret = ret = remove_wpattern (wparam, n, wpattern, op); + /* Don't bother to convert wparam back to multibyte string if nothing + matched; just return copy of original string */ + if (ret == wparam) + { + free (wparam); + free (wpattern); + return (savestring (param)); + } + + free (wparam); + free (wpattern); + + n = strlen (param); + xret = (char *)xmalloc (n + 1); + memset (&ps, '\0', sizeof (mbstate_t)); + n = wcsrtombs (xret, (const wchar_t **)&ret, n, &ps); + xret[n] = '\0'; /* just to make sure */ + free (oret); + return xret; + } + else +#endif + { + xret = remove_upattern (param, pattern, op); + return ((xret == param) ? savestring (param) : xret); + } +} + +/* Match PAT anywhere in STRING and return the match boundaries. + This returns 1 in case of a successful match, 0 otherwise. SP + and EP are pointers into the string where the match begins and + ends, respectively. MTYPE controls what kind of match is attempted. + MATCH_BEG and MATCH_END anchor the match at the beginning and end + of the string, respectively. The longest match is returned. */ +static int +match_upattern (string, pat, mtype, sp, ep) + char *string, *pat; + int mtype; + char **sp, **ep; +{ + int c, mlen; + size_t len; + register char *p, *p1, *npat; + char *end; + + /* If the pattern doesn't match anywhere in the string, go ahead and + short-circuit right away. A minor optimization, saves a bunch of + unnecessary calls to strmatch (up to N calls for a string of N + characters) if the match is unsuccessful. To preserve the semantics + of the substring matches below, we make sure that the pattern has + `*' as first and last character, making a new pattern if necessary. */ + /* XXX - check this later if I ever implement `**' with special meaning, + since this will potentially result in `**' at the beginning or end */ + len = STRLEN (pat); + if (pat[0] != '*' || (pat[0] == '*' && pat[1] == LPAREN && extended_glob) || pat[len - 1] != '*') + { + int unescaped_backslash; + char *pp; + + p = npat = (char *)xmalloc (len + 3); + p1 = pat; + if ((mtype != MATCH_BEG) && (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob))) + *p++ = '*'; + while (*p1) + *p++ = *p1++; +#if 1 + /* Need to also handle a pattern that ends with an unescaped backslash. + For right now, we ignore it because the pattern matching code will + fail the match anyway */ + /* If the pattern ends with a `*' we leave it alone if it's preceded by + an even number of backslashes, but if it's escaped by a backslash + we need to add another `*'. */ + if ((mtype != MATCH_END) && (p1[-1] == '*' && (unescaped_backslash = p1[-2] == '\\'))) + { + pp = p1 - 3; + while (pp >= pat && *pp-- == '\\') + unescaped_backslash = 1 - unescaped_backslash; + if (unescaped_backslash) + *p++ = '*'; + } + else if (mtype != MATCH_END && p1[-1] != '*') + *p++ = '*'; +#else + if (p1[-1] != '*' || p1[-2] == '\\') + *p++ = '*'; +#endif + *p = '\0'; + } + else + npat = pat; + c = strmatch (npat, string, FNMATCH_EXTFLAG | FNMATCH_IGNCASE); + if (npat != pat) + free (npat); + if (c == FNM_NOMATCH) + return (0); + + len = STRLEN (string); + end = string + len; + + mlen = umatchlen (pat, len); + if (mlen > (int)len) + return (0); + + switch (mtype) + { + case MATCH_ANY: + for (p = string; p <= end; p++) + { + if (match_pattern_char (pat, p, FNMATCH_IGNCASE)) + { + p1 = (mlen == -1) ? end : p + mlen; + /* p1 - p = length of portion of string to be considered + p = current position in string + mlen = number of characters consumed by match (-1 for entire string) + end = end of string + we want to break immediately if the potential match len + is greater than the number of characters remaining in the + string + */ + if (p1 > end) + break; + for ( ; p1 >= p; p1--) + { + c = *p1; *p1 = '\0'; + if (strmatch (pat, p, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) + { + *p1 = c; + *sp = p; + *ep = p1; + return 1; + } + *p1 = c; +#if 1 + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; +#endif + } + } + } + + return (0); + + case MATCH_BEG: + if (match_pattern_char (pat, string, FNMATCH_IGNCASE) == 0) + return (0); + + for (p = (mlen == -1) ? end : string + mlen; p >= string; p--) + { + c = *p; *p = '\0'; + if (strmatch (pat, string, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) + { + *p = c; + *sp = string; + *ep = p; + return 1; + } + *p = c; + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; + } + + return (0); + + case MATCH_END: + for (p = end - ((mlen == -1) ? len : mlen); p <= end; p++) + { + if (strmatch (pat, p, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) + { + *sp = p; + *ep = end; + return 1; + } + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; + } + + return (0); + } + + return (0); +} + +#if defined (HANDLE_MULTIBYTE) + +#define WFOLD(c) (match_ignore_case && iswupper (c) ? towlower (c) : (c)) + +/* Match WPAT anywhere in WSTRING and return the match boundaries. + This returns 1 in case of a successful match, 0 otherwise. Wide + character version. */ +static int +match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) + wchar_t *wstring; + char **indices; + size_t wstrlen; + wchar_t *wpat; + int mtype; + char **sp, **ep; +{ + wchar_t wc, *wp, *nwpat, *wp1; + size_t len; + int mlen; + int n, n1, n2, simple; + + simple = (wpat[0] != L'\\' && wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'['); +#if defined (EXTENDED_GLOB) + if (extended_glob) + simple &= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/ +#endif + + /* If the pattern doesn't match anywhere in the string, go ahead and + short-circuit right away. A minor optimization, saves a bunch of + unnecessary calls to strmatch (up to N calls for a string of N + characters) if the match is unsuccessful. To preserve the semantics + of the substring matches below, we make sure that the pattern has + `*' as first and last character, making a new pattern if necessary. */ + len = wcslen (wpat); + if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == WLPAREN && extended_glob) || wpat[len - 1] != L'*') + { + int unescaped_backslash; + wchar_t *wpp; + + wp = nwpat = (wchar_t *)xmalloc ((len + 3) * sizeof (wchar_t)); + wp1 = wpat; + if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == WLPAREN && extended_glob)) + *wp++ = L'*'; + while (*wp1 != L'\0') + *wp++ = *wp1++; +#if 1 + /* See comments above in match_upattern. */ + if (wp1[-1] == L'*' && (unescaped_backslash = wp1[-2] == L'\\')) + { + wpp = wp1 - 3; + while (wpp >= wpat && *wpp-- == L'\\') + unescaped_backslash = 1 - unescaped_backslash; + if (unescaped_backslash) + *wp++ = L'*'; + } + else if (wp1[-1] != L'*') + *wp++ = L'*'; +#else + if (wp1[-1] != L'*' || wp1[-2] == L'\\') + *wp++ = L'*'; +#endif + *wp = '\0'; + } + else + nwpat = wpat; + len = wcsmatch (nwpat, wstring, FNMATCH_EXTFLAG | FNMATCH_IGNCASE); + if (nwpat != wpat) + free (nwpat); + if (len == FNM_NOMATCH) + return (0); + + mlen = wmatchlen (wpat, wstrlen); + if (mlen > (int)wstrlen) + return (0); + +/* itrace("wmatchlen (%ls) -> %d", wpat, mlen); */ + switch (mtype) + { + case MATCH_ANY: + for (n = 0; n <= wstrlen; n++) + { + n2 = simple ? (WFOLD(*wpat) == WFOLD(wstring[n])) : match_pattern_wchar (wpat, wstring + n, FNMATCH_IGNCASE); + if (n2) + { + n1 = (mlen == -1) ? wstrlen : n + mlen; + if (n1 > wstrlen) + break; + + for ( ; n1 >= n; n1--) + { + wc = wstring[n1]; wstring[n1] = L'\0'; + if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) + { + wstring[n1] = wc; + *sp = indices[n]; + *ep = indices[n1]; + return 1; + } + wstring[n1] = wc; + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; + } + } + } + + return (0); + + case MATCH_BEG: + if (match_pattern_wchar (wpat, wstring, FNMATCH_IGNCASE) == 0) + return (0); + + for (n = (mlen == -1) ? wstrlen : mlen; n >= 0; n--) + { + wc = wstring[n]; wstring[n] = L'\0'; + if (wcsmatch (wpat, wstring, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) + { + wstring[n] = wc; + *sp = indices[0]; + *ep = indices[n]; + return 1; + } + wstring[n] = wc; + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; + } + + return (0); + + case MATCH_END: + for (n = wstrlen - ((mlen == -1) ? wstrlen : mlen); n <= wstrlen; n++) + { + if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) + { + *sp = indices[n]; + *ep = indices[wstrlen]; + return 1; + } + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; + } + + return (0); + } + + return (0); +} +#undef WFOLD +#endif /* HANDLE_MULTIBYTE */ + +static int +match_pattern (string, pat, mtype, sp, ep) + char *string, *pat; + int mtype; + char **sp, **ep; +{ +#if defined (HANDLE_MULTIBYTE) + int ret; + size_t n; + wchar_t *wstring, *wpat; + char **indices; +#endif + + if (string == 0 || pat == 0 || *pat == 0) + return (0); + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1) + { + if (mbsmbchar (string) == 0 && mbsmbchar (pat) == 0) + return (match_upattern (string, pat, mtype, sp, ep)); + + n = xdupmbstowcs (&wpat, NULL, pat); + if (n == (size_t)-1) + return (match_upattern (string, pat, mtype, sp, ep)); + n = xdupmbstowcs (&wstring, &indices, string); + if (n == (size_t)-1) + { + free (wpat); + return (match_upattern (string, pat, mtype, sp, ep)); + } + ret = match_wpattern (wstring, indices, n, wpat, mtype, sp, ep); + + free (wpat); + free (wstring); + free (indices); + + return (ret); + } + else +#endif + return (match_upattern (string, pat, mtype, sp, ep)); +} + +static int +getpatspec (c, value) + int c; + char *value; +{ + if (c == '#') + return ((*value == '#') ? RP_LONG_LEFT : RP_SHORT_LEFT); + else /* c == '%' */ + return ((*value == '%') ? RP_LONG_RIGHT : RP_SHORT_RIGHT); +} + +/* Posix.2 says that the WORD should be run through tilde expansion, + parameter expansion, command substitution and arithmetic expansion. + This leaves the result quoted, so quote_string_for_globbing () has + to be called to fix it up for strmatch (). If QUOTED is non-zero, + it means that the entire expression was enclosed in double quotes. + This means that quoting characters in the pattern do not make any + special pattern characters quoted. For example, the `*' in the + following retains its special meaning: "${foo#'*'}". */ +static char * +getpattern (value, quoted, expandpat) + char *value; + int quoted, expandpat; +{ + char *pat, *tword; + WORD_LIST *l; +#if 0 + int i; +#endif + /* There is a problem here: how to handle single or double quotes in the + pattern string when the whole expression is between double quotes? + POSIX.2 says that enclosing double quotes do not cause the pattern to + be quoted, but does that leave us a problem with @ and array[@] and their + expansions inside a pattern? */ +#if 0 + if (expandpat && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && *tword) + { + i = 0; + pat = string_extract_double_quoted (tword, &i, SX_STRIPDQ); + free (tword); + tword = pat; + } +#endif + + /* expand_string_for_pat () leaves WORD quoted and does not perform + word splitting. */ + l = *value ? expand_string_for_pat (value, + (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? Q_PATQUOTE : quoted, + (int *)NULL, (int *)NULL) + : (WORD_LIST *)0; + if (l) + word_list_remove_quoted_nulls (l); + pat = string_list (l); + dispose_words (l); + if (pat) + { + tword = quote_string_for_globbing (pat, QGLOB_CVTNULL); + free (pat); + pat = tword; + } + return (pat); +} + +#if 0 +/* Handle removing a pattern from a string as a result of ${name%[%]value} + or ${name#[#]value}. */ +static char * +variable_remove_pattern (value, pattern, patspec, quoted) + char *value, *pattern; + int patspec, quoted; +{ + char *tword; + + tword = remove_pattern (value, pattern, patspec); + + return (tword); +} +#endif + +static char * +list_remove_pattern (list, pattern, patspec, itype, quoted) + WORD_LIST *list; + char *pattern; + int patspec, itype, quoted; +{ + WORD_LIST *new, *l; + WORD_DESC *w; + char *tword; + + for (new = (WORD_LIST *)NULL, l = list; l; l = l->next) + { + tword = remove_pattern (l->word->word, pattern, patspec); + w = alloc_word_desc (); + w->word = tword ? tword : savestring (""); + new = make_word_list (w, new); + } + + l = REVERSE_LIST (new, WORD_LIST *); + tword = string_list_pos_params (itype, l, quoted, 0); + dispose_words (l); + + return (tword); +} + +static char * +parameter_list_remove_pattern (itype, pattern, patspec, quoted) + int itype; + char *pattern; + int patspec, quoted; +{ + char *ret; + WORD_LIST *list; + + list = list_rest_of_args (); + if (list == 0) + return ((char *)NULL); + ret = list_remove_pattern (list, pattern, patspec, itype, quoted); + dispose_words (list); + return (ret); +} + +#if defined (ARRAY_VARS) +static char * +array_remove_pattern (var, pattern, patspec, starsub, quoted) + SHELL_VAR *var; + char *pattern; + int patspec; + int starsub; /* so we can figure out how it's indexed */ + int quoted; +{ + ARRAY *a; + HASH_TABLE *h; + int itype; + char *ret; + WORD_LIST *list; + SHELL_VAR *v; + + v = var; /* XXX - for now */ + + itype = starsub ? '*' : '@'; + + a = (v && array_p (v)) ? array_cell (v) : 0; + h = (v && assoc_p (v)) ? assoc_cell (v) : 0; + + list = a ? array_to_word_list (a) : (h ? assoc_to_word_list (h) : 0); + if (list == 0) + return ((char *)NULL); + ret = list_remove_pattern (list, pattern, patspec, itype, quoted); + dispose_words (list); + + return ret; +} +#endif /* ARRAY_VARS */ + +static char * +parameter_brace_remove_pattern (varname, value, ind, patstr, rtype, quoted, flags) + char *varname, *value; + int ind; + char *patstr; + int rtype, quoted, flags; +{ + int vtype, patspec, starsub; + char *temp1, *val, *pattern, *oname; + SHELL_VAR *v; + + if (value == 0) + return ((char *)NULL); + + oname = this_command_name; + this_command_name = varname; + + vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val); + if (vtype == -1) + { + this_command_name = oname; + return ((char *)NULL); + } + + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + + patspec = getpatspec (rtype, patstr); + if (patspec == RP_LONG_LEFT || patspec == RP_LONG_RIGHT) + patstr++; + + /* Need to pass getpattern newly-allocated memory in case of expansion -- + the expansion code will free the passed string on an error. */ + temp1 = savestring (patstr); + pattern = getpattern (temp1, quoted, 1); + free (temp1); + + temp1 = (char *)NULL; /* shut up gcc */ + switch (vtype) + { + case VT_VARIABLE: + case VT_ARRAYMEMBER: + temp1 = remove_pattern (val, pattern, patspec); + if (vtype == VT_VARIABLE) + FREE (val); + if (temp1) + { + val = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + ? quote_string (temp1) + : quote_escapes (temp1); + free (temp1); + temp1 = val; + } + break; +#if defined (ARRAY_VARS) + case VT_ARRAYVAR: + temp1 = array_remove_pattern (v, pattern, patspec, starsub, quoted); + if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + { + val = quote_escapes (temp1); + free (temp1); + temp1 = val; + } + break; +#endif + case VT_POSPARMS: + temp1 = parameter_list_remove_pattern (varname[0], pattern, patspec, quoted); + if (temp1 && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + { + val = quote_escapes (temp1); + free (temp1); + temp1 = val; + } + break; + } + + this_command_name = oname; + + FREE (pattern); + return temp1; +} + +#if defined (PROCESS_SUBSTITUTION) + +static void reap_some_procsubs PARAMS((int)); + +/*****************************************************************/ +/* */ +/* Hacking Process Substitution */ +/* */ +/*****************************************************************/ + +#if !defined (HAVE_DEV_FD) +/* Named pipes must be removed explicitly with `unlink'. This keeps a list + of FIFOs the shell has open. unlink_fifo_list will walk the list and + unlink the ones that don't have a living process on the other end. + unlink_all_fifos will walk the list and unconditionally unlink them, trying + to open and close the FIFO first to release any child processes sleeping on + the FIFO. add_fifo_list adds the name of an open FIFO to the list. + NFIFO is a count of the number of FIFOs in the list. */ +#define FIFO_INCR 20 + +/* PROC value of -1 means the process has been reaped and the FIFO needs to + be removed. PROC value of 0 means the slot is unused. */ +struct temp_fifo { + char *file; + pid_t proc; +}; + +static struct temp_fifo *fifo_list = (struct temp_fifo *)NULL; +static int nfifo; +static int fifo_list_size; + +void +clear_fifo_list () +{ + int i; + + for (i = 0; i < fifo_list_size; i++) + { + if (fifo_list[i].file) + free (fifo_list[i].file); + fifo_list[i].file = NULL; + fifo_list[i].proc = 0; + } + nfifo = 0; +} + +void * +copy_fifo_list (sizep) + int *sizep; +{ + if (sizep) + *sizep = 0; + return (void *)NULL; +} + +static void +add_fifo_list (pathname) + char *pathname; +{ + int osize, i; + + if (nfifo >= fifo_list_size - 1) + { + osize = fifo_list_size; + fifo_list_size += FIFO_INCR; + fifo_list = (struct temp_fifo *)xrealloc (fifo_list, + fifo_list_size * sizeof (struct temp_fifo)); + for (i = osize; i < fifo_list_size; i++) + { + fifo_list[i].file = (char *)NULL; + fifo_list[i].proc = 0; /* unused */ + } + } + + fifo_list[nfifo].file = savestring (pathname); + nfifo++; +} + +void +unlink_fifo (i) + int i; +{ + if ((fifo_list[i].proc == (pid_t)-1) || (fifo_list[i].proc > 0 && (kill(fifo_list[i].proc, 0) == -1))) + { + unlink (fifo_list[i].file); + free (fifo_list[i].file); + fifo_list[i].file = (char *)NULL; + fifo_list[i].proc = 0; + } +} + +void +unlink_fifo_list () +{ + int saved, i, j; + + if (nfifo == 0) + return; + + for (i = saved = 0; i < nfifo; i++) + { + if ((fifo_list[i].proc == (pid_t)-1) || (fifo_list[i].proc > 0 && (kill(fifo_list[i].proc, 0) == -1))) + { + unlink (fifo_list[i].file); + free (fifo_list[i].file); + fifo_list[i].file = (char *)NULL; + fifo_list[i].proc = 0; + } + else + saved++; + } + + /* If we didn't remove some of the FIFOs, compact the list. */ + if (saved) + { + for (i = j = 0; i < nfifo; i++) + if (fifo_list[i].file) + { + if (i != j) + { + fifo_list[j].file = fifo_list[i].file; + fifo_list[j].proc = fifo_list[i].proc; + fifo_list[i].file = (char *)NULL; + fifo_list[i].proc = 0; + } + j++; + } + nfifo = j; + } + else + nfifo = 0; +} + +void +unlink_all_fifos () +{ + int i, fd; + + if (nfifo == 0) + return; + + for (i = 0; i < nfifo; i++) + { + fifo_list[i].proc = (pid_t)-1; + fd = open (fifo_list[i].file, O_RDWR|O_NONBLOCK); + unlink_fifo (i); + if (fd >= 0) + close (fd); + } + + nfifo = 0; +} + +/* Take LIST, which is a bitmap denoting active FIFOs in fifo_list + from some point in the past, and close all open FIFOs in fifo_list + that are not marked as active in LIST. If LIST is NULL, close + everything in fifo_list. LSIZE is the number of elements in LIST, in + case it's larger than fifo_list_size (size of fifo_list). */ +void +close_new_fifos (list, lsize) + void *list; + int lsize; +{ + int i; + char *plist; + + if (list == 0) + { + unlink_fifo_list (); + return; + } + + for (plist = (char *)list, i = 0; i < lsize; i++) + if (plist[i] == 0 && i < fifo_list_size && fifo_list[i].proc != -1) + unlink_fifo (i); + + for (i = lsize; i < fifo_list_size; i++) + unlink_fifo (i); +} + +int +find_procsub_child (pid) + pid_t pid; +{ + int i; + + for (i = 0; i < nfifo; i++) + if (fifo_list[i].proc == pid) + return i; + return -1; +} + +void +set_procsub_status (ind, pid, status) + int ind; + pid_t pid; + int status; +{ + if (ind >= 0 && ind < nfifo) + fifo_list[ind].proc = (pid_t)-1; /* sentinel */ +} + +/* If we've marked the process for this procsub as dead, close the + associated file descriptor and delete the FIFO. */ +static void +reap_some_procsubs (max) + int max; +{ + int i; + + for (i = 0; i < max; i++) + if (fifo_list[i].proc == (pid_t)-1) /* reaped */ + unlink_fifo (i); +} + +void +reap_procsubs () +{ + reap_some_procsubs (nfifo); +} + +#if 0 +/* UNUSED */ +void +wait_procsubs () +{ + int i, r; + + for (i = 0; i < nfifo; i++) + { + if (fifo_list[i].proc != (pid_t)-1 && fifo_list[i].proc > 0) + { + r = wait_for (fifo_list[i].proc, 0); + save_proc_status (fifo_list[i].proc, r); + fifo_list[i].proc = (pid_t)-1; + } + } +} +#endif + +int +fifos_pending () +{ + return nfifo; +} + +int +num_fifos () +{ + return nfifo; +} + +static char * +make_named_pipe () +{ + char *tname; + + tname = sh_mktmpname ("sh-np", MT_USERANDOM|MT_USETMPDIR); + if (mkfifo (tname, 0600) < 0) + { + free (tname); + return ((char *)NULL); + } + + add_fifo_list (tname); + return (tname); +} + +#else /* HAVE_DEV_FD */ + +/* DEV_FD_LIST is a bitmap of file descriptors attached to pipes the shell + has open to children. NFDS is a count of the number of bits currently + set in DEV_FD_LIST. TOTFDS is a count of the highest possible number + of open files. */ +/* dev_fd_list[I] value of -1 means the process has been reaped and file + descriptor I needs to be closed. Value of 0 means the slot is unused. */ + +static pid_t *dev_fd_list = (pid_t *)NULL; +static int nfds; +static int totfds; /* The highest possible number of open files. */ + +void +clear_fifo (i) + int i; +{ + if (dev_fd_list[i]) + { + dev_fd_list[i] = 0; + nfds--; + } +} + +void +clear_fifo_list () +{ + register int i; + + if (nfds == 0) + return; + + for (i = 0; nfds && i < totfds; i++) + clear_fifo (i); + + nfds = 0; +} + +void * +copy_fifo_list (sizep) + int *sizep; +{ + void *ret; + + if (nfds == 0 || totfds == 0) + { + if (sizep) + *sizep = 0; + return (void *)NULL; + } + + if (sizep) + *sizep = totfds; + ret = xmalloc (totfds * sizeof (pid_t)); + return (memcpy (ret, dev_fd_list, totfds * sizeof (pid_t))); +} + +static void +add_fifo_list (fd) + int fd; +{ + if (dev_fd_list == 0 || fd >= totfds) + { + int ofds; + + ofds = totfds; + totfds = getdtablesize (); + if (totfds < 0 || totfds > 256) + totfds = 256; + if (fd >= totfds) + totfds = fd + 2; + + dev_fd_list = (pid_t *)xrealloc (dev_fd_list, totfds * sizeof (dev_fd_list[0])); + /* XXX - might need a loop for this */ + memset (dev_fd_list + ofds, '\0', (totfds - ofds) * sizeof (pid_t)); + } + + dev_fd_list[fd] = 1; /* marker; updated later */ + nfds++; +} + +int +fifos_pending () +{ + return 0; /* used for cleanup; not needed with /dev/fd */ +} + +int +num_fifos () +{ + return nfds; +} + +void +unlink_fifo (fd) + int fd; +{ + if (dev_fd_list[fd]) + { + close (fd); + dev_fd_list[fd] = 0; + nfds--; + } +} + +void +unlink_fifo_list () +{ + register int i; + + if (nfds == 0) + return; + + for (i = totfds-1; nfds && i >= 0; i--) + unlink_fifo (i); + + nfds = 0; +} + +void +unlink_all_fifos () +{ + unlink_fifo_list (); +} + +/* Take LIST, which is a snapshot copy of dev_fd_list from some point in + the past, and close all open fds in dev_fd_list that are not marked + as open in LIST. If LIST is NULL, close everything in dev_fd_list. + LSIZE is the number of elements in LIST, in case it's larger than + totfds (size of dev_fd_list). */ +void +close_new_fifos (list, lsize) + void *list; + int lsize; +{ + int i; + pid_t *plist; + + if (list == 0) + { + unlink_fifo_list (); + return; + } + + for (plist = (pid_t *)list, i = 0; i < lsize; i++) + if (plist[i] == 0 && i < totfds && dev_fd_list[i]) + unlink_fifo (i); + + for (i = lsize; i < totfds; i++) + unlink_fifo (i); +} + +int +find_procsub_child (pid) + pid_t pid; +{ + int i; + + if (nfds == 0) + return -1; + + for (i = 0; i < totfds; i++) + if (dev_fd_list[i] == pid) + return i; + + return -1; +} + +void +set_procsub_status (ind, pid, status) + int ind; + pid_t pid; + int status; +{ + if (ind >= 0 && ind < totfds) + dev_fd_list[ind] = (pid_t)-1; /* sentinel */ +} + +/* If we've marked the process for this procsub as dead, close the + associated file descriptor. */ +static void +reap_some_procsubs (max) + int max; +{ + int i; + + for (i = 0; nfds > 0 && i < max; i++) + if (dev_fd_list[i] == (pid_t)-1) + unlink_fifo (i); +} + +void +reap_procsubs () +{ + reap_some_procsubs (totfds); +} + +#if 0 +/* UNUSED */ +void +wait_procsubs () +{ + int i, r; + + for (i = 0; nfds > 0 && i < totfds; i++) + { + if (dev_fd_list[i] != (pid_t)-1 && dev_fd_list[i] > 0) + { + r = wait_for (dev_fd_list[i], 0); + save_proc_status (dev_fd_list[i], r); + dev_fd_list[i] = (pid_t)-1; + } + } +} +#endif + +#if defined (NOTDEF) +print_dev_fd_list () +{ + register int i; + + fprintf (stderr, "pid %ld: dev_fd_list:", (long)getpid ()); + fflush (stderr); + + for (i = 0; i < totfds; i++) + { + if (dev_fd_list[i]) + fprintf (stderr, " %d", i); + } + fprintf (stderr, "\n"); +} +#endif /* NOTDEF */ + +static char * +make_dev_fd_filename (fd) + int fd; +{ + char *ret, intbuf[INT_STRLEN_BOUND (int) + 1], *p; + + ret = (char *)xmalloc (sizeof (DEV_FD_PREFIX) + 8); + + strcpy (ret, DEV_FD_PREFIX); + p = inttostr (fd, intbuf, sizeof (intbuf)); + strcpy (ret + sizeof (DEV_FD_PREFIX) - 1, p); + + add_fifo_list (fd); + return (ret); +} + +#endif /* HAVE_DEV_FD */ + +/* Return a filename that will open a connection to the process defined by + executing STRING. HAVE_DEV_FD, if defined, means open a pipe and return + a filename in /dev/fd corresponding to a descriptor that is one of the + ends of the pipe. If not defined, we use named pipes on systems that have + them. Systems without /dev/fd and named pipes are out of luck. + + OPEN_FOR_READ_IN_CHILD, if 1, means open the named pipe for reading or + use the read end of the pipe and dup that file descriptor to fd 0 in + the child. If OPEN_FOR_READ_IN_CHILD is 0, we open the named pipe for + writing or use the write end of the pipe in the child, and dup that + file descriptor to fd 1 in the child. The parent does the opposite. */ + +static char * +process_substitute (string, open_for_read_in_child) + char *string; + int open_for_read_in_child; +{ + char *pathname; + int fd, result, rc, function_value; + pid_t old_pid, pid; +#if defined (HAVE_DEV_FD) + int parent_pipe_fd, child_pipe_fd; + int fildes[2]; +#endif /* HAVE_DEV_FD */ +#if defined (JOB_CONTROL) + pid_t old_pipeline_pgrp; +#endif + + if (!string || !*string || wordexp_only) + return ((char *)NULL); + +#if !defined (HAVE_DEV_FD) + pathname = make_named_pipe (); +#else /* HAVE_DEV_FD */ + if (pipe (fildes) < 0) + { + sys_error ("%s", _("cannot make pipe for process substitution")); + return ((char *)NULL); + } + /* If OPEN_FOR_READ_IN_CHILD == 1, we want to use the write end of + the pipe in the parent, otherwise the read end. */ + parent_pipe_fd = fildes[open_for_read_in_child]; + child_pipe_fd = fildes[1 - open_for_read_in_child]; + /* Move the parent end of the pipe to some high file descriptor, to + avoid clashes with FDs used by the script. */ + parent_pipe_fd = move_to_high_fd (parent_pipe_fd, 1, 64); + + pathname = make_dev_fd_filename (parent_pipe_fd); +#endif /* HAVE_DEV_FD */ + + if (pathname == 0) + { + sys_error ("%s", _("cannot make pipe for process substitution")); + return ((char *)NULL); + } + + old_pid = last_made_pid; + +#if defined (JOB_CONTROL) + old_pipeline_pgrp = pipeline_pgrp; + if (pipeline_pgrp == 0 || (subshell_environment & (SUBSHELL_PIPE|SUBSHELL_FORK|SUBSHELL_ASYNC)) == 0) + pipeline_pgrp = shell_pgrp; + save_pipeline (1); +#endif /* JOB_CONTROL */ + + pid = make_child ((char *)NULL, FORK_ASYNC); + if (pid == 0) + { +#if 0 + int old_interactive; + + old_interactive = interactive; +#endif + /* The currently-executing shell is not interactive */ + interactive = 0; + + reset_terminating_signals (); /* XXX */ + free_pushed_string_input (); + /* Cancel traps, in trap.c. */ + restore_original_signals (); /* XXX - what about special builtins? bash-4.2 */ + QUIT; /* catch any interrupts we got post-fork */ + setup_async_signals (); +#if 0 + if (open_for_read_in_child == 0 && old_interactive && (bash_input.type == st_stdin || bash_input.type == st_stream)) + async_redirect_stdin (); +#endif + + subshell_environment |= SUBSHELL_COMSUB|SUBSHELL_PROCSUB|SUBSHELL_ASYNC; + + /* We don't inherit the verbose option for command substitutions now, so + let's try it for process substitutions. */ + change_flag ('v', FLAG_OFF); + + /* if we're expanding a redirection, we shouldn't have access to the + temporary environment, but commands in the subshell should have + access to their own temporary environment. */ + if (expanding_redir) + flush_temporary_env (); + } + +#if defined (JOB_CONTROL) + set_sigchld_handler (); + stop_making_children (); + /* XXX - should we only do this in the parent? (as in command subst) */ + pipeline_pgrp = old_pipeline_pgrp; +#else + stop_making_children (); +#endif /* JOB_CONTROL */ + + if (pid < 0) + { + sys_error ("%s", _("cannot make child for process substitution")); + free (pathname); +#if defined (HAVE_DEV_FD) + close (parent_pipe_fd); + close (child_pipe_fd); +#endif /* HAVE_DEV_FD */ +#if defined (JOB_CONTROL) + restore_pipeline (1); +#endif + return ((char *)NULL); + } + + if (pid > 0) + { +#if defined (JOB_CONTROL) + last_procsub_child = restore_pipeline (0); + /* We assume that last_procsub_child->next == last_procsub_child because + of how jobs.c:add_process() works. */ + last_procsub_child->next = 0; + procsub_add (last_procsub_child); +#endif + +#if defined (HAVE_DEV_FD) + dev_fd_list[parent_pipe_fd] = pid; +#else + fifo_list[nfifo-1].proc = pid; +#endif + + last_made_pid = old_pid; + +#if defined (JOB_CONTROL) && defined (PGRP_PIPE) + close_pgrp_pipe (); +#endif /* JOB_CONTROL && PGRP_PIPE */ + +#if defined (HAVE_DEV_FD) + close (child_pipe_fd); +#endif /* HAVE_DEV_FD */ + + return (pathname); + } + + set_sigint_handler (); + +#if defined (JOB_CONTROL) + /* make sure we don't have any job control */ + set_job_control (0); + + /* Clear out any existing list of process substitutions */ + procsub_clear (); + + /* The idea is that we want all the jobs we start from an async process + substitution to be in the same process group, but not the same pgrp + as our parent shell, since we don't want to affect our parent shell's + jobs if we get a SIGHUP and end up calling hangup_all_jobs, for example. + If pipeline_pgrp != shell_pgrp, we assume that there is a job control + shell somewhere in our parent process chain (since make_child initializes + pipeline_pgrp to shell_pgrp if job_control == 0). What we do in this + case is to set pipeline_pgrp to our PID, so all jobs started by this + process have that same pgrp and we are basically the process group leader. + This should not have negative effects on child processes surviving + after we exit, since we wait for the children we create, but that is + something to watch for. */ + + if (pipeline_pgrp != shell_pgrp) + pipeline_pgrp = getpid (); +#endif /* JOB_CONTROL */ + +#if !defined (HAVE_DEV_FD) + /* Open the named pipe in the child. */ + fd = open (pathname, open_for_read_in_child ? O_RDONLY : O_WRONLY); + if (fd < 0) + { + /* Two separate strings for ease of translation. */ + if (open_for_read_in_child) + sys_error (_("cannot open named pipe %s for reading"), pathname); + else + sys_error (_("cannot open named pipe %s for writing"), pathname); + + exit (127); + } + if (open_for_read_in_child) + { + if (sh_unset_nodelay_mode (fd) < 0) + { + sys_error (_("cannot reset nodelay mode for fd %d"), fd); + exit (127); + } + } +#else /* HAVE_DEV_FD */ + fd = child_pipe_fd; +#endif /* HAVE_DEV_FD */ + + /* Discard buffered stdio output before replacing the underlying file + descriptor. */ + if (open_for_read_in_child == 0) + fpurge (stdout); + + if (dup2 (fd, open_for_read_in_child ? 0 : 1) < 0) + { + sys_error (_("cannot duplicate named pipe %s as fd %d"), pathname, + open_for_read_in_child ? 0 : 1); + exit (127); + } + + if (fd != (open_for_read_in_child ? 0 : 1)) + close (fd); + + /* Need to close any files that this process has open to pipes inherited + from its parent. */ + if (current_fds_to_close) + { + close_fd_bitmap (current_fds_to_close); + current_fds_to_close = (struct fd_bitmap *)NULL; + } + +#if defined (HAVE_DEV_FD) + /* Make sure we close the parent's end of the pipe and clear the slot + in the fd list so it is not closed later, if reallocated by, for + instance, pipe(2). */ + close (parent_pipe_fd); + dev_fd_list[parent_pipe_fd] = 0; +#endif /* HAVE_DEV_FD */ + + /* subshells shouldn't have this flag, which controls using the temporary + environment for variable lookups. We have already flushed the temporary + environment above in the case we're expanding a redirection, so processes + executed by this command need to be able to set it independently of their + parent. */ + expanding_redir = 0; + + remove_quoted_escapes (string); + +#if 0 /* TAG: bash-5.2 */ + startup_state = 2; /* see if we can avoid a fork */ + parse_and_execute_level = 0; +#endif + + /* Give process substitution a place to jump back to on failure, + so we don't go back up to main (). */ + result = setjmp_nosigs (top_level); + + /* If we're running a process substitution inside a shell function, + trap `return' so we don't return from the function in the subshell + and go off to never-never land. */ + if (result == 0 && return_catch_flag) + function_value = setjmp_nosigs (return_catch); + else + function_value = 0; + + if (result == ERREXIT) + rc = last_command_exit_value; + else if (result == EXITPROG) + rc = last_command_exit_value; + else if (result) + rc = EXECUTION_FAILURE; + else if (function_value) + rc = return_catch_value; + else + { + subshell_level++; + rc = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST)); + /* leave subshell level intact for any exit trap */ + } + +#if !defined (HAVE_DEV_FD) + /* Make sure we close the named pipe in the child before we exit. */ + close (open_for_read_in_child ? 0 : 1); +#endif /* !HAVE_DEV_FD */ + + last_command_exit_value = rc; + rc = run_exit_trap (); + exit (rc); + /*NOTREACHED*/ +} +#endif /* PROCESS_SUBSTITUTION */ + +/***********************************/ +/* */ +/* Command Substitution */ +/* */ +/***********************************/ + +static char * +read_comsub (fd, quoted, flags, rflag) + int fd, quoted, flags; + int *rflag; +{ + char *istring, buf[512], *bufp; + int istring_index, c, tflag, skip_ctlesc, skip_ctlnul; + int mb_cur_max; + size_t istring_size; + ssize_t bufn; + int nullbyte; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + wchar_t wc; + size_t mblen; + int i; +#endif + + istring = (char *)NULL; + istring_index = istring_size = bufn = tflag = 0; + + skip_ctlesc = ifs_cmap[CTLESC]; + skip_ctlnul = ifs_cmap[CTLNUL]; + + mb_cur_max = MB_CUR_MAX; + nullbyte = 0; + + /* Read the output of the command through the pipe. */ + while (1) + { + if (fd < 0) + break; + if (--bufn <= 0) + { + bufn = zread (fd, buf, sizeof (buf)); + if (bufn <= 0) + break; + bufp = buf; + } + c = *bufp++; + + if (c == 0) + { +#if 1 + if (nullbyte == 0) + { + internal_warning ("%s", _("command substitution: ignored null byte in input")); + nullbyte = 1; + } +#endif + continue; + } + + /* Add the character to ISTRING, possibly after resizing it. */ + RESIZE_MALLOCED_BUFFER (istring, istring_index, mb_cur_max+1, istring_size, 512); + + /* This is essentially quote_string inline */ + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) /* || c == CTLESC || c == CTLNUL */) + istring[istring_index++] = CTLESC; + else if ((flags & PF_ASSIGNRHS) && skip_ctlesc && c == CTLESC) + istring[istring_index++] = CTLESC; + /* Escape CTLESC and CTLNUL in the output to protect those characters + from the rest of the word expansions (word splitting and globbing.) + This is essentially quote_escapes inline. */ + else if (skip_ctlesc == 0 && c == CTLESC) + istring[istring_index++] = CTLESC; + else if ((skip_ctlnul == 0 && c == CTLNUL) || (c == ' ' && (ifs_value && *ifs_value == 0))) + istring[istring_index++] = CTLESC; + +#if defined (HANDLE_MULTIBYTE) + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && (unsigned char)c > 127)) + { + /* read a multibyte character from buf */ + /* punt on the hard case for now */ + memset (&ps, '\0', sizeof (mbstate_t)); + mblen = mbrtowc (&wc, bufp-1, bufn+1, &ps); + if (MB_INVALIDCH (mblen) || mblen == 0 || mblen == 1) + istring[istring_index++] = c; + else + { + istring[istring_index++] = c; + for (i = 0; i < mblen-1; i++) + istring[istring_index++] = *bufp++; + bufn -= mblen - 1; + } + continue; + } +#endif + + istring[istring_index++] = c; + } + + if (istring) + istring[istring_index] = '\0'; + + /* If we read no output, just return now and save ourselves some + trouble. */ + if (istring_index == 0) + { + FREE (istring); + if (rflag) + *rflag = tflag; + return (char *)NULL; + } + + /* Strip trailing newlines from the output of the command. */ + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + { + while (istring_index > 0) + { + if (istring[istring_index - 1] == '\n') + { + --istring_index; + + /* If the newline was quoted, remove the quoting char. */ + if (istring[istring_index - 1] == CTLESC) + --istring_index; + } + else + break; + } + istring[istring_index] = '\0'; + } + else + strip_trailing (istring, istring_index - 1, 1); + + if (rflag) + *rflag = tflag; + return istring; +} + +/* Perform command substitution on STRING. This returns a WORD_DESC * with the + contained string possibly quoted. */ +WORD_DESC * +command_substitute (string, quoted, flags) + char *string; + int quoted; + int flags; +{ + pid_t pid, old_pid, old_pipeline_pgrp, old_async_pid; + char *istring, *s; + int result, fildes[2], function_value, pflags, rc, tflag, fork_flags; + WORD_DESC *ret; + sigset_t set, oset; + + istring = (char *)NULL; + + /* Don't fork () if there is no need to. In the case of no command to + run, just return NULL. */ +#if 1 + for (s = string; s && *s && (shellblank (*s) || *s == '\n'); s++) + ; + if (s == 0 || *s == 0) + return ((WORD_DESC *)NULL); +#else + if (!string || !*string || (string[0] == '\n' && !string[1])) + return ((WORD_DESC *)NULL); +#endif + + if (wordexp_only && read_but_dont_execute) + { + last_command_exit_value = EX_WEXPCOMSUB; + jump_to_top_level (EXITPROG); + } + + /* We're making the assumption here that the command substitution will + eventually run a command from the file system. Since we'll run + maybe_make_export_env in this subshell before executing that command, + the parent shell and any other shells it starts will have to remake + the environment. If we make it before we fork, other shells won't + have to. Don't bother if we have any temporary variable assignments, + though, because the export environment will be remade after this + command completes anyway, but do it if all the words to be expanded + are variable assignments. */ + if (subst_assign_varlist == 0 || garglist == 0) + maybe_make_export_env (); /* XXX */ + + /* Flags to pass to parse_and_execute() */ + pflags = (interactive && sourcelevel == 0) ? SEVAL_RESETLINE : 0; + + old_pid = last_made_pid; + + /* Pipe the output of executing STRING into the current shell. */ + if (pipe (fildes) < 0) + { + sys_error ("%s", _("cannot make pipe for command substitution")); + goto error_exit; + } + +#if defined (JOB_CONTROL) + old_pipeline_pgrp = pipeline_pgrp; + /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or + we've already forked to run a disk command (and are expanding redirections, + for example). */ + if ((subshell_environment & (SUBSHELL_FORK|SUBSHELL_PIPE)) == 0) + pipeline_pgrp = shell_pgrp; + cleanup_the_pipeline (); +#endif /* JOB_CONTROL */ + + old_async_pid = last_asynchronous_pid; + fork_flags = (subshell_environment&SUBSHELL_ASYNC) ? FORK_ASYNC : 0; + pid = make_child ((char *)NULL, fork_flags|FORK_NOTERM); + last_asynchronous_pid = old_async_pid; + + if (pid == 0) + { + /* Reset the signal handlers in the child, but don't free the + trap strings. Set a flag noting that we have to free the + trap strings if we run trap to change a signal disposition. */ + reset_signal_handlers (); + if (ISINTERRUPT) + { + kill (getpid (), SIGINT); + CLRINTERRUPT; /* if we're ignoring SIGINT somehow */ + } + QUIT; /* catch any interrupts we got post-fork */ + subshell_environment |= SUBSHELL_RESETTRAP; + } + +#if defined (JOB_CONTROL) + /* XXX DO THIS ONLY IN PARENT ? XXX */ + set_sigchld_handler (); + stop_making_children (); + if (pid != 0) + pipeline_pgrp = old_pipeline_pgrp; +#else + stop_making_children (); +#endif /* JOB_CONTROL */ + + if (pid < 0) + { + sys_error (_("cannot make child for command substitution")); + error_exit: + + last_made_pid = old_pid; + + FREE (istring); + close (fildes[0]); + close (fildes[1]); + return ((WORD_DESC *)NULL); + } + + if (pid == 0) + { + /* The currently executing shell is not interactive. */ + interactive = 0; + + set_sigint_handler (); /* XXX */ + + free_pushed_string_input (); + + /* Discard buffered stdio output before replacing the underlying file + descriptor. */ + fpurge (stdout); + + if (dup2 (fildes[1], 1) < 0) + { + sys_error ("%s", _("command_substitute: cannot duplicate pipe as fd 1")); + exit (EXECUTION_FAILURE); + } + + /* If standard output is closed in the parent shell + (such as after `exec >&-'), file descriptor 1 will be + the lowest available file descriptor, and end up in + fildes[0]. This can happen for stdin and stderr as well, + but stdout is more important -- it will cause no output + to be generated from this command. */ + if ((fildes[1] != fileno (stdin)) && + (fildes[1] != fileno (stdout)) && + (fildes[1] != fileno (stderr))) + close (fildes[1]); + + if ((fildes[0] != fileno (stdin)) && + (fildes[0] != fileno (stdout)) && + (fildes[0] != fileno (stderr))) + close (fildes[0]); + +#ifdef __CYGWIN__ + /* Let stdio know the fd may have changed from text to binary mode, and + make sure to preserve stdout line buffering. */ + freopen (NULL, "w", stdout); + sh_setlinebuf (stdout); +#endif /* __CYGWIN__ */ + + /* This is a subshell environment. */ + subshell_environment |= SUBSHELL_COMSUB; + + /* Many shells do not appear to inherit the -v option for command + substitutions. */ + change_flag ('v', FLAG_OFF); + + /* When inherit_errexit option is not enabled, command substitution does + not inherit the -e flag. It is enabled when Posix mode is enabled */ + if (inherit_errexit == 0) + { + builtin_ignoring_errexit = 0; + change_flag ('e', FLAG_OFF); + } + set_shellopts (); + + /* If we are expanding a redirection, we can dispose of any temporary + environment we received, since redirections are not supposed to have + access to the temporary environment. We will have to see whether this + affects temporary environments supplied to `eval', but the temporary + environment gets copied to builtin_env at some point. */ + if (expanding_redir) + { + flush_temporary_env (); + expanding_redir = 0; + } + + remove_quoted_escapes (string); + + startup_state = 2; /* see if we can avoid a fork */ + parse_and_execute_level = 0; + + /* Give command substitution a place to jump back to on failure, + so we don't go back up to main (). */ + result = setjmp_nosigs (top_level); + + /* If we're running a command substitution inside a shell function, + trap `return' so we don't return from the function in the subshell + and go off to never-never land. */ + if (result == 0 && return_catch_flag) + function_value = setjmp_nosigs (return_catch); + else + function_value = 0; + + if (result == ERREXIT) + rc = last_command_exit_value; + else if (result == EXITPROG) + rc = last_command_exit_value; + else if (result) + rc = EXECUTION_FAILURE; + else if (function_value) + rc = return_catch_value; + else + { + subshell_level++; + rc = parse_and_execute (string, "command substitution", pflags|SEVAL_NOHIST); + /* leave subshell level intact for any exit trap */ + } + + last_command_exit_value = rc; + rc = run_exit_trap (); +#if defined (PROCESS_SUBSTITUTION) + unlink_fifo_list (); +#endif + exit (rc); + } + else + { + int dummyfd; + +#if defined (JOB_CONTROL) && defined (PGRP_PIPE) + close_pgrp_pipe (); +#endif /* JOB_CONTROL && PGRP_PIPE */ + + close (fildes[1]); + + begin_unwind_frame ("read-comsub"); + dummyfd = fildes[0]; + add_unwind_protect (close, dummyfd); + + /* Block SIGINT while we're reading from the pipe. If the child + process gets a SIGINT, it will either handle it or die, and the + read will return. */ + BLOCK_SIGNAL (SIGINT, set, oset); + tflag = 0; + istring = read_comsub (fildes[0], quoted, flags, &tflag); + + close (fildes[0]); + discard_unwind_frame ("read-comsub"); + UNBLOCK_SIGNAL (oset); + + current_command_subst_pid = pid; + last_command_exit_value = wait_for (pid, JWAIT_NOTERM); + last_command_subst_pid = pid; + last_made_pid = old_pid; + +#if defined (JOB_CONTROL) + /* If last_command_exit_value > 128, then the substituted command + was terminated by a signal. If that signal was SIGINT, then send + SIGINT to ourselves. This will break out of loops, for instance. */ + if (last_command_exit_value == (128 + SIGINT) && last_command_exit_signal == SIGINT) + kill (getpid (), SIGINT); +#endif /* JOB_CONTROL */ + + ret = alloc_word_desc (); + ret->word = istring; + ret->flags = tflag; + + return ret; + } +} + +/******************************************************** + * * + * Utility functions for parameter expansion * + * * + ********************************************************/ + +#if defined (ARRAY_VARS) + +static arrayind_t +array_length_reference (s) + char *s; +{ + int len; + arrayind_t ind; + char *akey; + char *t, c; + ARRAY *array; + HASH_TABLE *h; + SHELL_VAR *var; + + var = array_variable_part (s, 0, &t, &len); + + /* If unbound variables should generate an error, report one and return + failure. */ + if ((var == 0 || invisible_p (var) || (assoc_p (var) == 0 && array_p (var) == 0)) && unbound_vars_is_error) + { + c = *--t; + *t = '\0'; + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (s); + *t = c; + return (-1); + } + else if (var == 0 || invisible_p (var)) + return 0; + + /* We support a couple of expansions for variables that are not arrays. + We'll return the length of the value for v[0], and 1 for v[@] or + v[*]. Return 0 for everything else. */ + + array = array_p (var) ? array_cell (var) : (ARRAY *)NULL; + h = assoc_p (var) ? assoc_cell (var) : (HASH_TABLE *)NULL; + + if (ALL_ELEMENT_SUB (t[0]) && t[1] == RBRACK) + { + if (assoc_p (var)) + return (h ? assoc_num_elements (h) : 0); + else if (array_p (var)) + return (array ? array_num_elements (array) : 0); + else + return (var_isset (var) ? 1 : 0); + } + + if (assoc_p (var)) + { + t[len - 1] = '\0'; + akey = expand_assignment_string_to_string (t, 0); /* [ */ + t[len - 1] = RBRACK; + if (akey == 0 || *akey == 0) + { + err_badarraysub (t); + FREE (akey); + return (-1); + } + t = assoc_reference (assoc_cell (var), akey); + free (akey); + } + else + { + ind = array_expand_index (var, t, len, 0); + /* negative subscripts to indexed arrays count back from end */ + if (var && array_p (var) && ind < 0) + ind = array_max_index (array_cell (var)) + 1 + ind; + if (ind < 0) + { + err_badarraysub (t); + return (-1); + } + if (array_p (var)) + t = array_reference (array, ind); + else + t = (ind == 0) ? value_cell (var) : (char *)NULL; + } + + len = MB_STRLEN (t); + return (len); +} +#endif /* ARRAY_VARS */ + +static int +valid_brace_expansion_word (name, var_is_special) + char *name; + int var_is_special; +{ + if (DIGIT (*name) && all_digits (name)) + return 1; + else if (var_is_special) + return 1; +#if defined (ARRAY_VARS) + else if (valid_array_reference (name, 0)) + return 1; +#endif /* ARRAY_VARS */ + else if (legal_identifier (name)) + return 1; + else + return 0; +} + +static int +chk_atstar (name, quoted, pflags, quoted_dollar_atp, contains_dollar_at) + char *name; + int quoted, pflags; + int *quoted_dollar_atp, *contains_dollar_at; +{ + char *temp1; + + if (name == 0) + { + if (quoted_dollar_atp) + *quoted_dollar_atp = 0; + if (contains_dollar_at) + *contains_dollar_at = 0; + return 0; + } + + /* check for $@ and $* */ + if (name[0] == '@' && name[1] == 0) + { + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 1; + if (contains_dollar_at) + *contains_dollar_at = 1; + return 1; + } + else if (name[0] == '*' && name[1] == '\0' && quoted == 0) + { + /* Need more checks here that parallel what string_list_pos_params and + param_expand do. Check expand_no_split_dollar_star and ??? */ + if (contains_dollar_at && expand_no_split_dollar_star == 0) + *contains_dollar_at = 1; + return 1; + } + + /* Now check for ${array[@]} and ${array[*]} */ +#if defined (ARRAY_VARS) + else if (valid_array_reference (name, 0)) + { + temp1 = mbschr (name, LBRACK); + if (temp1 && temp1[1] == '@' && temp1[2] == RBRACK) + { + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 1; + if (contains_dollar_at) + *contains_dollar_at = 1; + return 1; + } + /* ${array[*]}, when unquoted, should be treated like ${array[@]}, + which should result in separate words even when IFS is unset. */ + if (temp1 && temp1[1] == '*' && temp1[2] == RBRACK && quoted == 0) + { + if (contains_dollar_at) + *contains_dollar_at = 1; + return 1; + } + } +#endif + return 0; +} + +/* Parameter expand NAME, and return a new string which is the expansion, + or NULL if there was no expansion. NAME is as given in ${NAMEcWORD}. + VAR_IS_SPECIAL is non-zero if NAME is one of the special variables in + the shell, e.g., "@", "$", "*", etc. QUOTED, if non-zero, means that + NAME was found inside of a double-quoted expression. */ +static WORD_DESC * +parameter_brace_expand_word (name, var_is_special, quoted, pflags, indp) + char *name; + int var_is_special, quoted, pflags; + arrayind_t *indp; +{ + WORD_DESC *ret; + char *temp, *tt; + intmax_t arg_index; + SHELL_VAR *var; + int atype, rflags; + arrayind_t ind; + + ret = 0; + temp = 0; + rflags = 0; + + if (indp) + *indp = INTMAX_MIN; + + /* Handle multiple digit arguments, as in ${11}. */ + if (legal_number (name, &arg_index)) + { + tt = get_dollar_var_value (arg_index); + if (tt) + temp = (*tt && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + ? quote_string (tt) + : quote_escapes (tt); + else + temp = (char *)NULL; + FREE (tt); + } + else if (var_is_special) /* ${@} */ + { + int sindex; + tt = (char *)xmalloc (2 + strlen (name)); + tt[sindex = 0] = '$'; + strcpy (tt + 1, name); + + ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL, + (int *)NULL, (int *)NULL, pflags); + free (tt); + } +#if defined (ARRAY_VARS) + else if (valid_array_reference (name, 0)) + { +expand_arrayref: + var = array_variable_part (name, 0, &tt, (int *)0); + /* These are the cases where word splitting will not be performed */ + if (pflags & PF_ASSIGNRHS) + { + if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == RBRACK) + { + /* Only treat as double quoted if array variable */ + if (var && (array_p (var) || assoc_p (var))) + temp = array_value (name, quoted|Q_DOUBLE_QUOTES, AV_ASSIGNRHS, &atype, &ind); + else + temp = array_value (name, quoted, 0, &atype, &ind); + } + else + temp = array_value (name, quoted, 0, &atype, &ind); + } + /* Posix interp 888 */ + else if (pflags & PF_NOSPLIT2) + { + /* Special cases, then general case, for each of A[@], A[*], A[n] */ +#if defined (HANDLE_MULTIBYTE) + if (tt[0] == '@' && tt[1] == RBRACK && var && quoted == 0 && ifs_is_set && ifs_is_null == 0 && ifs_firstc[0] != ' ') +#else + if (tt[0] == '@' && tt[1] == RBRACK && var && quoted == 0 && ifs_is_set && ifs_is_null == 0 && ifs_firstc != ' ') +#endif + temp = array_value (name, Q_DOUBLE_QUOTES, AV_ASSIGNRHS, &atype, &ind); + else if (tt[0] == '@' && tt[1] == RBRACK) + temp = array_value (name, quoted, 0, &atype, &ind); + else if (tt[0] == '*' && tt[1] == RBRACK && expand_no_split_dollar_star && ifs_is_null) + temp = array_value (name, Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT, 0, &atype, &ind); + else if (tt[0] == '*' && tt[1] == RBRACK) + temp = array_value (name, quoted, 0, &atype, &ind); + else + temp = array_value (name, quoted, 0, &atype, &ind); + } + else if (tt[0] == '*' && tt[1] == RBRACK && expand_no_split_dollar_star && ifs_is_null) + temp = array_value (name, Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT, 0, &atype, &ind); + else + temp = array_value (name, quoted, 0, &atype, &ind); + if (atype == 0 && temp) + { + temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + ? quote_string (temp) + : quote_escapes (temp); + rflags |= W_ARRAYIND; + if (indp) + *indp = ind; + } + else if (atype == 1 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + rflags |= W_HASQUOTEDNULL; + } +#endif + else if (var = find_variable (name)) + { + if (var_isset (var) && invisible_p (var) == 0) + { +#if defined (ARRAY_VARS) + /* We avoid a memory leak by saving TT as the memory allocated by + assoc_to_string or array_to_string and leaving it 0 otherwise, + then freeing TT after quoting temp. */ + tt = (char *)NULL; + if ((pflags & PF_ALLINDS) && assoc_p (var)) + tt = temp = assoc_empty (assoc_cell (var)) ? (char *)NULL : assoc_to_string (assoc_cell (var), " ", quoted); + else if ((pflags & PF_ALLINDS) && array_p (var)) + tt = temp = array_empty (array_cell (var)) ? (char *)NULL : array_to_string (array_cell (var), " ", quoted); + else if (assoc_p (var)) + temp = assoc_reference (assoc_cell (var), "0"); + else if (array_p (var)) + temp = array_reference (array_cell (var), 0); + else + temp = value_cell (var); +#else + temp = value_cell (var); +#endif + + if (temp) + temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + ? quote_string (temp) + : ((pflags & PF_ASSIGNRHS) ? quote_rhs (temp) + : quote_escapes (temp)); + FREE (tt); + } + else + temp = (char *)NULL; + } + else if (var = find_variable_last_nameref (name, 0)) + { + temp = nameref_cell (var); +#if defined (ARRAY_VARS) + /* Handle expanding nameref whose value is x[n] */ + if (temp && *temp && valid_array_reference (temp, 0)) + { + name = temp; + goto expand_arrayref; + } + else +#endif + /* y=2 ; typeset -n x=y; echo ${x} is not the same as echo ${2} in ksh */ + if (temp && *temp && legal_identifier (temp) == 0) + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: invalid variable name for name reference"), temp); + temp = &expand_param_error; + } + else + temp = (char *)NULL; + } + else + temp = (char *)NULL; + + if (ret == 0) + { + ret = alloc_word_desc (); + ret->word = temp; + ret->flags |= rflags; + } + return ret; +} + +static char * +parameter_brace_find_indir (name, var_is_special, quoted, find_nameref) + char *name; + int var_is_special, quoted, find_nameref; +{ + char *temp, *t; + WORD_DESC *w; + SHELL_VAR *v; + int pflags, oldex; + + if (find_nameref && var_is_special == 0 && (v = find_variable_last_nameref (name, 0)) && + nameref_p (v) && (t = nameref_cell (v)) && *t) + return (savestring (t)); + + /* If var_is_special == 0, and name is not an array reference, this does + more expansion than necessary. It should really look up the variable's + value and not try to expand it. */ + pflags = PF_IGNUNBOUND; + /* Note that we're not going to be doing word splitting here */ + if (var_is_special) + { + pflags |= PF_ASSIGNRHS; /* suppresses word splitting */ + oldex = expand_no_split_dollar_star; + expand_no_split_dollar_star = 1; + } + w = parameter_brace_expand_word (name, var_is_special, quoted, pflags, 0); + if (var_is_special) + expand_no_split_dollar_star = oldex; + + t = w->word; + /* Have to dequote here if necessary */ + if (t) + { + temp = ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || var_is_special) + ? dequote_string (t) + : dequote_escapes (t); + free (t); + t = temp; + } + dispose_word_desc (w); + + return t; +} + +/* Expand an indirect reference to a variable: ${!NAME} expands to the + value of the variable whose name is the value of NAME. */ +static WORD_DESC * +parameter_brace_expand_indir (name, var_is_special, quoted, pflags, quoted_dollar_atp, contains_dollar_at) + char *name; + int var_is_special, quoted, pflags; + int *quoted_dollar_atp, *contains_dollar_at; +{ + char *t; + WORD_DESC *w; + SHELL_VAR *v; + + /* See if it's a nameref first, behave in ksh93-compatible fashion. + There is at least one incompatibility: given ${!foo[0]} where foo=bar, + bash performs an indirect lookup on foo[0] and expands the result; + ksh93 expands bar[0]. We could do that here -- there are enough usable + primitives to do that -- but do not at this point. */ + if (var_is_special == 0 && (v = find_variable_last_nameref (name, 0))) + { + if (nameref_p (v) && (t = nameref_cell (v)) && *t) + { + w = alloc_word_desc (); + w->word = savestring (t); + w->flags = 0; + return w; + } + } + + /* An indirect reference to a positional parameter or a special parameter + is ok. Indirect references to array references, as explained above, are + ok (currently). Only references to unset variables are errors at this + point. */ + if (legal_identifier (name) && v == 0) + { + report_error (_("%s: invalid indirect expansion"), name); + w = alloc_word_desc (); + w->word = &expand_param_error; + w->flags = 0; + return (w); + } + + t = parameter_brace_find_indir (name, var_is_special, quoted, 0); + + chk_atstar (t, quoted, pflags, quoted_dollar_atp, contains_dollar_at); + +#if defined (ARRAY_VARS) + /* Array references to unset variables are also an error */ + if (t == 0 && valid_array_reference (name, 0)) + { + v = array_variable_part (name, 0, (char **)0, (int *)0); + if (v == 0) + { + report_error (_("%s: invalid indirect expansion"), name); + w = alloc_word_desc (); + w->word = &expand_param_error; + w->flags = 0; + return (w); + } + else + return (WORD_DESC *)NULL; + } +#endif + + if (t == 0) + return (WORD_DESC *)NULL; + + if (valid_brace_expansion_word (t, SPECIAL_VAR (t, 0)) == 0) + { + report_error (_("%s: invalid variable name"), t); + free (t); + w = alloc_word_desc (); + w->word = &expand_param_error; + w->flags = 0; + return (w); + } + + w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, pflags, 0); + free (t); + + return w; +} + +/* Expand the right side of a parameter expansion of the form ${NAMEcVALUE}, + depending on the value of C, the separating character. C can be one of + "-", "+", or "=". QUOTED is true if the entire brace expression occurs + between double quotes. */ +static WORD_DESC * +parameter_brace_expand_rhs (name, value, op, quoted, pflags, qdollaratp, hasdollarat) + char *name, *value; + int op, quoted, pflags, *qdollaratp, *hasdollarat; +{ + WORD_DESC *w; + WORD_LIST *l, *tl; + char *t, *t1, *temp, *vname; + int l_hasdollat, sindex; + SHELL_VAR *v; + +/*itrace("parameter_brace_expand_rhs: %s:%s pflags = %d", name, value, pflags);*/ + /* If the entire expression is between double quotes, we want to treat + the value as a double-quoted string, with the exception that we strip + embedded unescaped double quotes (for sh backwards compatibility). */ + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && *value) + { + sindex = 0; + temp = string_extract_double_quoted (value, &sindex, SX_STRIPDQ); + } + else + temp = value; + + w = alloc_word_desc (); + l_hasdollat = 0; + l = *temp ? expand_string_for_rhs (temp, quoted, op, pflags, &l_hasdollat, (int *)NULL) + : (WORD_LIST *)0; + if (hasdollarat) + *hasdollarat = l_hasdollat || (l && l->next); + if (temp != value) + free (temp); + + /* list_string takes multiple CTLNULs and turns them into an empty word + with W_SAWQUOTEDNULL set. Turn it back into a single CTLNUL for the + rest of this function and the caller. */ + for (tl = l; tl; tl = tl->next) + { + if (tl->word && (tl->word->word == 0 || tl->word->word[0] == 0) && + (tl->word->flags | W_SAWQUOTEDNULL)) + { + t = make_quoted_char ('\0'); + FREE (tl->word->word); + tl->word->word = t; + tl->word->flags |= W_QUOTED|W_HASQUOTEDNULL; + tl->word->flags &= ~W_SAWQUOTEDNULL; + } + } + + if (l) + { + /* If l->next is not null, we know that TEMP contained "$@", since that + is the only expansion that creates more than one word. */ + if (qdollaratp && ((l_hasdollat && quoted) || l->next)) + { +/*itrace("parameter_brace_expand_rhs: %s:%s: l != NULL, set *qdollaratp", name, value);*/ + *qdollaratp = 1; + } + + /* The expansion of TEMP returned something. We need to treat things + slightly differently if L_HASDOLLAT is non-zero. If we have "$@", + the individual words have already been quoted. We need to turn them + into a string with the words separated by the first character of + $IFS without any additional quoting, so string_list_dollar_at won't + do the right thing. If IFS is null, we want "$@" to split into + separate arguments, not be concatenated, so we use string_list_internal + and mark the word to be split on spaces later. We use + string_list_dollar_star for "$@" otherwise. */ + if (l->next && ifs_is_null) + { + temp = string_list_internal (l, " "); + w->flags |= W_SPLITSPACE; + } + else if (l_hasdollat || l->next) + temp = string_list_dollar_star (l, quoted, 0); + else + { + temp = string_list (l); + if (temp && (QUOTED_NULL (temp) == 0) && (l->word->flags & W_SAWQUOTEDNULL)) + w->flags |= W_SAWQUOTEDNULL; /* XXX */ + } + + /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is + a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the + flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the + expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + (which is more paranoia than anything else), we need to return the + quoted null string and set the flags to indicate it. */ + if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL (temp) && QUOTED_NULL (l->word->word) && (l->word->flags & W_HASQUOTEDNULL)) + { + w->flags |= W_HASQUOTEDNULL; +/*itrace("parameter_brace_expand_rhs (%s:%s): returning quoted null, turning off qdollaratp", name, value);*/ + /* If we return a quoted null with L_HASDOLLARAT, we either have a + construct like "${@-$@}" or "${@-${@-$@}}" with no positional + parameters or a quoted expansion of "$@" with $1 == ''. In either + case, we don't want to enable special handling of $@. */ + if (qdollaratp && l_hasdollat) + *qdollaratp = 0; + } + dispose_words (l); + } + else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && l_hasdollat) + { + /* Posix interp 221 changed the rules on this. The idea is that + something like "$xxx$@" should expand the same as "${foo-$xxx$@}" + when foo and xxx are unset. The problem is that it's not in any + way backwards compatible and few other shells do it. We're eventually + going to try and split the difference (heh) a little bit here. */ + /* l_hasdollat == 1 means we saw a quoted dollar at. */ + + /* The brace expansion occurred between double quotes and there was + a $@ in TEMP. It does not matter if the $@ is quoted, as long as + it does not expand to anything. In this case, we want to return + a quoted empty string. Posix interp 888 */ + temp = make_quoted_char ('\0'); + w->flags |= W_HASQUOTEDNULL; +/*itrace("parameter_brace_expand_rhs (%s:%s): returning quoted null", name, value);*/ + } + else + temp = (char *)NULL; + + if (op == '-' || op == '+') + { + w->word = temp; + return w; + } + + /* op == '=' */ + t1 = temp ? dequote_string (temp) : savestring (""); + free (temp); + + /* bash-4.4/5.0 */ + vname = name; + if (*name == '!' && + (legal_variable_starter ((unsigned char)name[1]) || DIGIT (name[1]) || VALID_INDIR_PARAM (name[1]))) + { + vname = parameter_brace_find_indir (name + 1, SPECIAL_VAR (name, 1), quoted, 1); + if (vname == 0 || *vname == 0) + { + report_error (_("%s: invalid indirect expansion"), name); + free (vname); + free (t1); + dispose_word (w); + return &expand_wdesc_error; + } + if (legal_identifier (vname) == 0) + { + report_error (_("%s: invalid variable name"), vname); + free (vname); + free (t1); + dispose_word (w); + return &expand_wdesc_error; + } + } + +#if defined (ARRAY_VARS) + if (valid_array_reference (vname, 0)) + v = assign_array_element (vname, t1, 0); + else +#endif /* ARRAY_VARS */ + v = bind_variable (vname, t1, 0); + + if (v == 0 || readonly_p (v) || noassign_p (v)) /* expansion error */ + { + if ((v == 0 || readonly_p (v)) && interactive_shell == 0 && posixly_correct) + { + last_command_exit_value = EXECUTION_FAILURE; + exp_jump_to_top_level (FORCE_EOF); + } + else + { + if (vname != name) + free (vname); + last_command_exit_value = EX_BADUSAGE; + exp_jump_to_top_level (DISCARD); + } + } + + stupidly_hack_special_variables (vname); + + if (vname != name) + free (vname); + + /* From Posix group discussion Feb-March 2010. Issue 7 0000221 */ + + /* If we are double-quoted or if we are not going to be performing word + splitting, we want to quote the value we return appropriately, like + the other expansions this function handles. */ + w->word = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) ? quote_string (t1) : quote_escapes (t1); + /* If we have something that's non-null, that's not a quoted null string, + and we're not going to be performing word splitting (we know we're not + because the operator is `='), we can forget we saw a quoted null. */ + if (w->word && w->word[0] && QUOTED_NULL (w->word) == 0) + w->flags &= ~W_SAWQUOTEDNULL; + free (t1); + + /* If we convert a null string into a quoted null, make sure the caller + knows it. */ + if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) && QUOTED_NULL (w->word)) + w->flags |= W_HASQUOTEDNULL; + + return w; +} + +/* Deal with the right hand side of a ${name:?value} expansion in the case + that NAME is null or not set. If VALUE is non-null it is expanded and + used as the error message to print, otherwise a standard message is + printed. */ +static void +parameter_brace_expand_error (name, value, check_null) + char *name, *value; + int check_null; +{ + WORD_LIST *l; + char *temp; + + set_exit_status (EXECUTION_FAILURE); /* ensure it's non-zero */ + if (value && *value) + { + l = expand_string (value, 0); + temp = string_list (l); + report_error ("%s: %s", name, temp ? temp : ""); /* XXX was value not "" */ + FREE (temp); + dispose_words (l); + } + else if (check_null == 0) + report_error (_("%s: parameter not set"), name); + else + report_error (_("%s: parameter null or not set"), name); + + /* Free the data we have allocated during this expansion, since we + are about to longjmp out. */ + free (name); + FREE (value); +} + +/* Return 1 if NAME is something for which parameter_brace_expand_length is + OK to do. */ +static int +valid_length_expression (name) + char *name; +{ + return (name[1] == '\0' || /* ${#} */ + ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0') || /* special param */ + (DIGIT (name[1]) && all_digits (name + 1)) || /* ${#11} */ +#if defined (ARRAY_VARS) + valid_array_reference (name + 1, 0) || /* ${#a[7]} */ +#endif + legal_identifier (name + 1)); /* ${#PS1} */ +} + +/* Handle the parameter brace expansion that requires us to return the + length of a parameter. */ +static intmax_t +parameter_brace_expand_length (name) + char *name; +{ + char *t, *newname; + intmax_t number, arg_index; + WORD_LIST *list; + SHELL_VAR *var; + + var = (SHELL_VAR *)NULL; + + if (name[1] == '\0') /* ${#} */ + number = number_of_args (); + else if (DOLLAR_AT_STAR (name[1]) && name[2] == '\0') /* ${#@}, ${#*} */ + number = number_of_args (); + else if ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0') + { + /* Take the lengths of some of the shell's special parameters. */ + switch (name[1]) + { + case '-': + t = which_set_flags (); + break; + case '?': + t = itos (last_command_exit_value); + break; + case '$': + t = itos (dollar_dollar_pid); + break; + case '!': + if (last_asynchronous_pid == NO_PID) + t = (char *)NULL; /* XXX - error if set -u set? */ + else + t = itos (last_asynchronous_pid); + break; + case '#': + t = itos (number_of_args ()); + break; + } + number = STRLEN (t); + FREE (t); + } +#if defined (ARRAY_VARS) + else if (valid_array_reference (name + 1, 0)) + number = array_length_reference (name + 1); +#endif /* ARRAY_VARS */ + else + { + number = 0; + + if (legal_number (name + 1, &arg_index)) /* ${#1} */ + { + t = get_dollar_var_value (arg_index); + if (t == 0 && unbound_vars_is_error) + return INTMAX_MIN; + number = MB_STRLEN (t); + FREE (t); + } +#if defined (ARRAY_VARS) + else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && (array_p (var) || assoc_p (var))) + { + if (assoc_p (var)) + t = assoc_reference (assoc_cell (var), "0"); + else + t = array_reference (array_cell (var), 0); + if (t == 0 && unbound_vars_is_error) + return INTMAX_MIN; + number = MB_STRLEN (t); + } +#endif + /* Fast path for the common case of taking the length of a non-dynamic + scalar variable value. */ + else if ((var || (var = find_variable (name + 1))) && + invisible_p (var) == 0 && + array_p (var) == 0 && assoc_p (var) == 0 && + var->dynamic_value == 0) + number = value_cell (var) ? MB_STRLEN (value_cell (var)) : 0; + else if (var == 0 && unbound_vars_is_error == 0) + number = 0; + else /* ${#PS1} */ + { + newname = savestring (name); + newname[0] = '$'; + list = expand_string (newname, Q_DOUBLE_QUOTES); + t = list ? string_list (list) : (char *)NULL; + free (newname); + if (list) + dispose_words (list); + + number = t ? MB_STRLEN (t) : 0; + FREE (t); + } + } + + return (number); +} + +/* Skip characters in SUBSTR until DELIM. SUBSTR is an arithmetic expression, + so we do some ad-hoc parsing of an arithmetic expression to find + the first DELIM, instead of using strchr(3). Two rules: + 1. If the substring contains a `(', read until closing `)'. + 2. If the substring contains a `?', read past one `:' for each `?'. + The SD_ARITHEXP flag to skip_to_delim takes care of doing this. +*/ + +static char * +skiparith (substr, delim) + char *substr; + int delim; +{ + int i; + char delims[2]; + + delims[0] = delim; + delims[1] = '\0'; + + i = skip_to_delim (substr, 0, delims, SD_ARITHEXP); + return (substr + i); +} + +/* Verify and limit the start and end of the desired substring. If + VTYPE == 0, a regular shell variable is being used; if it is 1, + then the positional parameters are being used; if it is 2, then + VALUE is really a pointer to an array variable that should be used. + Return value is 1 if both values were OK, 0 if there was a problem + with an invalid expression, or -1 if the values were out of range. */ +static int +verify_substring_values (v, value, substr, vtype, e1p, e2p) + SHELL_VAR *v; + char *value, *substr; + int vtype; + intmax_t *e1p, *e2p; +{ + char *t, *temp1, *temp2; + arrayind_t len; + int expok; +#if defined (ARRAY_VARS) + ARRAY *a; + HASH_TABLE *h; +#endif + + /* duplicate behavior of strchr(3) */ + t = skiparith (substr, ':'); + if (*t && *t == ':') + *t = '\0'; + else + t = (char *)0; + + temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES); + *e1p = evalexp (temp1, 0, &expok); /* XXX - EXP_EXPANDED? */ + free (temp1); + if (expok == 0) + return (0); + + len = -1; /* paranoia */ + switch (vtype) + { + case VT_VARIABLE: + case VT_ARRAYMEMBER: + len = MB_STRLEN (value); + break; + case VT_POSPARMS: + len = number_of_args () + 1; + if (*e1p == 0) + len++; /* add one arg if counting from $0 */ + break; +#if defined (ARRAY_VARS) + case VT_ARRAYVAR: + /* For arrays, the first value deals with array indices. Negative + offsets count from one past the array's maximum index. Associative + arrays treat the number of elements as the maximum index. */ + if (assoc_p (v)) + { + h = assoc_cell (v); + len = assoc_num_elements (h) + (*e1p < 0); + } + else + { + a = (ARRAY *)value; + len = array_max_index (a) + (*e1p < 0); /* arrays index from 0 to n - 1 */ + } + break; +#endif + } + + if (len == -1) /* paranoia */ + return -1; + + if (*e1p < 0) /* negative offsets count from end */ + *e1p += len; + + if (*e1p > len || *e1p < 0) + return (-1); + +#if defined (ARRAY_VARS) + /* For arrays, the second offset deals with the number of elements. */ + if (vtype == VT_ARRAYVAR) + len = assoc_p (v) ? assoc_num_elements (h) : array_num_elements (a); +#endif + + if (t) + { + t++; + temp2 = savestring (t); + temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES); + free (temp2); + t[-1] = ':'; + *e2p = evalexp (temp1, 0, &expok); /* XXX - EXP_EXPANDED? */ + free (temp1); + if (expok == 0) + return (0); + + /* Should we allow positional parameter length < 0 to count backwards + from end of positional parameters? */ +#if 1 + if ((vtype == VT_ARRAYVAR || vtype == VT_POSPARMS) && *e2p < 0) +#else /* TAG: bash-5.2 */ + if (vtype == VT_ARRAYVAR && *e2p < 0) +#endif + { + internal_error (_("%s: substring expression < 0"), t); + return (0); + } +#if defined (ARRAY_VARS) + /* In order to deal with sparse arrays, push the intelligence about how + to deal with the number of elements desired down to the array- + specific functions. */ + if (vtype != VT_ARRAYVAR) +#endif + { + if (*e2p < 0) + { + *e2p += len; + if (*e2p < 0 || *e2p < *e1p) + { + internal_error (_("%s: substring expression < 0"), t); + return (0); + } + } + else + *e2p += *e1p; /* want E2 chars starting at E1 */ + if (*e2p > len) + *e2p = len; + } + } + else + *e2p = len; + + return (1); +} + +/* Return the type of variable specified by VARNAME (simple variable, + positional param, or array variable). Also return the value specified + by VARNAME (value of a variable or a reference to an array element). + QUOTED is the standard description of quoting state, using Q_* defines. + FLAGS is currently a set of flags to pass to array_value. If IND is + non-null and not INTMAX_MIN, and FLAGS includes AV_USEIND, IND is + passed to array_value so the array index is not computed again. + If this returns VT_VARIABLE, the caller assumes that CTLESC and CTLNUL + characters in the value are quoted with CTLESC and takes appropriate + steps. For convenience, *VALP is set to the dequoted VALUE. */ +static int +get_var_and_type (varname, value, ind, quoted, flags, varp, valp) + char *varname, *value; + arrayind_t ind; + int quoted, flags; + SHELL_VAR **varp; + char **valp; +{ + int vtype, want_indir; + char *temp, *vname; + SHELL_VAR *v; + arrayind_t lind; + + want_indir = *varname == '!' && + (legal_variable_starter ((unsigned char)varname[1]) || DIGIT (varname[1]) + || VALID_INDIR_PARAM (varname[1])); + if (want_indir) + vname = parameter_brace_find_indir (varname+1, SPECIAL_VAR (varname, 1), quoted, 1); + /* XXX - what if vname == 0 || *vname == 0 ? */ + else + vname = varname; + + if (vname == 0) + { + vtype = VT_VARIABLE; + *varp = (SHELL_VAR *)NULL; + *valp = (char *)NULL; + return (vtype); + } + + /* This sets vtype to VT_VARIABLE or VT_POSPARMS */ + vtype = STR_DOLLAR_AT_STAR (vname); + if (vtype == VT_POSPARMS && vname[0] == '*') + vtype |= VT_STARSUB; + *varp = (SHELL_VAR *)NULL; + +#if defined (ARRAY_VARS) + if (valid_array_reference (vname, 0)) + { + v = array_variable_part (vname, 0, &temp, (int *)0); + /* If we want to signal array_value to use an already-computed index, + set LIND to that index */ + lind = (ind != INTMAX_MIN && (flags & AV_USEIND)) ? ind : 0; + if (v && invisible_p (v)) + { + vtype = VT_ARRAYMEMBER; + *varp = (SHELL_VAR *)NULL; + *valp = (char *)NULL; + } + if (v && (array_p (v) || assoc_p (v))) + { + if (ALL_ELEMENT_SUB (temp[0]) && temp[1] == RBRACK) + { + /* Callers have to differentiate between indexed and associative */ + vtype = VT_ARRAYVAR; + if (temp[0] == '*') + vtype |= VT_STARSUB; + *valp = array_p (v) ? (char *)array_cell (v) : (char *)assoc_cell (v); + } + else + { + vtype = VT_ARRAYMEMBER; + *valp = array_value (vname, Q_DOUBLE_QUOTES, flags, (int *)NULL, &lind); + } + *varp = v; + } + else if (v && (ALL_ELEMENT_SUB (temp[0]) && temp[1] == RBRACK)) + { + vtype = VT_VARIABLE; + *varp = v; + if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + *valp = value ? dequote_string (value) : (char *)NULL; + else + *valp = value ? dequote_escapes (value) : (char *)NULL; + } + else + { + vtype = VT_ARRAYMEMBER; + *varp = v; + *valp = array_value (vname, Q_DOUBLE_QUOTES, flags, (int *)NULL, &lind); + } + } + else if ((v = find_variable (vname)) && (invisible_p (v) == 0) && (assoc_p (v) || array_p (v))) + { + vtype = VT_ARRAYMEMBER; + *varp = v; + *valp = assoc_p (v) ? assoc_reference (assoc_cell (v), "0") : array_reference (array_cell (v), 0); + } + else +#endif + { + if (value && vtype == VT_VARIABLE) + { + *varp = find_variable (vname); + if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + *valp = dequote_string (value); + else + *valp = dequote_escapes (value); + } + else + *valp = value; + } + + if (want_indir) + free (vname); + + return vtype; +} + +/***********************************************************/ +/* */ +/* Functions to perform transformations on variable values */ +/* */ +/***********************************************************/ + +static char * +string_var_assignment (v, s) + SHELL_VAR *v; + char *s; +{ + char flags[MAX_ATTRIBUTES], *ret, *val; + int i; + + val = (v && (invisible_p (v) || var_isset (v) == 0)) ? (char *)NULL : sh_quote_reusable (s, 0); + i = var_attribute_string (v, 0, flags); + if (i == 0 && val == 0) + return (char *)NULL; + + ret = (char *)xmalloc (i + STRLEN (val) + strlen (v->name) + 16 + MAX_ATTRIBUTES); + if (i > 0 && val == 0) + sprintf (ret, "declare -%s %s", flags, v->name); + else if (i > 0) + sprintf (ret, "declare -%s %s=%s", flags, v->name, val); + else + sprintf (ret, "%s=%s", v->name, val); + free (val); + return ret; +} + +#if defined (ARRAY_VARS) +static char * +array_var_assignment (v, itype, quoted, atype) + SHELL_VAR *v; + int itype, quoted, atype; +{ + char *ret, *val, flags[MAX_ATTRIBUTES]; + int i; + + if (v == 0) + return (char *)NULL; + if (atype == 2) + val = array_p (v) ? array_to_kvpair (array_cell (v), 0) + : assoc_to_kvpair (assoc_cell (v), 0); + else + val = array_p (v) ? array_to_assign (array_cell (v), 0) + : assoc_to_assign (assoc_cell (v), 0); + + if (val == 0 && (invisible_p (v) || var_isset (v) == 0)) + ; /* placeholder */ + else if (val == 0) + { + val = (char *)xmalloc (3); + val[0] = LPAREN; + val[1] = RPAREN; + val[2] = 0; + } + else + { + ret = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) ? quote_string (val) : quote_escapes (val); + free (val); + val = ret; + } + + if (atype == 2) + return val; + + i = var_attribute_string (v, 0, flags); + ret = (char *)xmalloc (i + STRLEN (val) + strlen (v->name) + 16); + if (val) + sprintf (ret, "declare -%s %s=%s", flags, v->name, val); + else + sprintf (ret, "declare -%s %s", flags, v->name); + free (val); + return ret; +} +#endif + +static char * +pos_params_assignment (list, itype, quoted) + WORD_LIST *list; + int itype; + int quoted; +{ + char *temp, *ret; + + /* first, we transform the list to quote each word. */ + temp = list_transform ('Q', (SHELL_VAR *)0, list, itype, quoted); + ret = (char *)xmalloc (strlen (temp) + 8); + strcpy (ret, "set -- "); + strcpy (ret + 7, temp); + free (temp); + return ret; +} + +static char * +string_transform (xc, v, s) + int xc; + SHELL_VAR *v; + char *s; +{ + char *ret, flags[MAX_ATTRIBUTES], *t; + int i; + + if (((xc == 'A' || xc == 'a') && v == 0)) + return (char *)NULL; + else if (xc != 'a' && xc != 'A' && s == 0) + return (char *)NULL; + + switch (xc) + { + /* Transformations that interrogate the variable */ + case 'a': + i = var_attribute_string (v, 0, flags); + ret = (i > 0) ? savestring (flags) : (char *)NULL; + break; + case 'A': + ret = string_var_assignment (v, s); + break; + case 'K': + ret = sh_quote_reusable (s, 0); + break; + /* Transformations that modify the variable's value */ + case 'E': + t = ansiexpand (s, 0, strlen (s), (int *)0); + ret = dequote_escapes (t); + free (t); + break; + case 'P': + ret = decode_prompt_string (s); + break; + case 'Q': + ret = sh_quote_reusable (s, 0); + break; + case 'U': + ret = sh_modcase (s, 0, CASE_UPPER); + break; + case 'u': + ret = sh_modcase (s, 0, CASE_UPFIRST); /* capitalize */ + break; + case 'L': + ret = sh_modcase (s, 0, CASE_LOWER); + break; + default: + ret = (char *)NULL; + break; + } + return ret; +} + +static char * +list_transform (xc, v, list, itype, quoted) + int xc; + SHELL_VAR *v; + WORD_LIST *list; + int itype, quoted; +{ + WORD_LIST *new, *l; + WORD_DESC *w; + char *tword; + int qflags; + + for (new = (WORD_LIST *)NULL, l = list; l; l = l->next) + { + tword = string_transform (xc, v, l->word->word); + w = alloc_word_desc (); + w->word = tword ? tword : savestring (""); /* XXX */ + new = make_word_list (w, new); + } + l = REVERSE_LIST (new, WORD_LIST *); + + qflags = quoted; + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how $* will be expanded. */ + if (itype == '*' && expand_no_split_dollar_star && ifs_is_null) + qflags |= Q_DOUBLE_QUOTES; /* Posix interp 888 */ + + tword = string_list_pos_params (itype, l, qflags, 0); + dispose_words (l); + + return (tword); +} + +static char * +parameter_list_transform (xc, itype, quoted) + int xc; + int itype; + int quoted; +{ + char *ret; + WORD_LIST *list; + + list = list_rest_of_args (); + if (list == 0) + return ((char *)NULL); + if (xc == 'A') + ret = pos_params_assignment (list, itype, quoted); + else + ret = list_transform (xc, (SHELL_VAR *)0, list, itype, quoted); + dispose_words (list); + return (ret); +} + +#if defined (ARRAY_VARS) +static char * +array_transform (xc, var, starsub, quoted) + int xc; + SHELL_VAR *var; + int starsub; /* so we can figure out how it's indexed */ + int quoted; +{ + ARRAY *a; + HASH_TABLE *h; + int itype; + char *ret; + WORD_LIST *list; + SHELL_VAR *v; + + v = var; /* XXX - for now */ + + itype = starsub ? '*' : '@'; + + if (xc == 'A') + return (array_var_assignment (v, itype, quoted, 1)); + else if (xc == 'K') + return (array_var_assignment (v, itype, quoted, 2)); + + /* special case for unset arrays and attributes */ + if (xc == 'a' && (invisible_p (v) || var_isset (v) == 0)) + { + char flags[MAX_ATTRIBUTES]; + int i; + + i = var_attribute_string (v, 0, flags); + return ((i > 0) ? savestring (flags) : (char *)NULL); + } + + a = (v && array_p (v)) ? array_cell (v) : 0; + h = (v && assoc_p (v)) ? assoc_cell (v) : 0; + + list = a ? array_to_word_list (a) : (h ? assoc_to_word_list (h) : 0); + if (list == 0) + return ((char *)NULL); + ret = list_transform (xc, v, list, itype, quoted); + dispose_words (list); + + return ret; +} +#endif /* ARRAY_VARS */ + +static int +valid_parameter_transform (xform) + char *xform; +{ + if (xform[1]) + return 0; + + /* check for valid values of xform[0] */ + switch (xform[0]) + { + case 'a': /* expand to a string with just attributes */ + case 'A': /* expand as an assignment statement with attributes */ + case 'K': /* expand assoc array to list of key/value pairs */ + case 'E': /* expand like $'...' */ + case 'P': /* expand like prompt string */ + case 'Q': /* quote reusably */ + case 'U': /* transform to uppercase */ + case 'u': /* tranform by capitalizing */ + case 'L': /* transform to lowercase */ + return 1; + default: + return 0; + } +} + +static char * +parameter_brace_transform (varname, value, ind, xform, rtype, quoted, pflags, flags) + char *varname, *value; + int ind; + char *xform; + int rtype, quoted, pflags, flags; +{ + int vtype, xc, starsub; + char *temp1, *val, *oname; + SHELL_VAR *v; + + xc = xform[0]; + if (value == 0 && xc != 'A' && xc != 'a') + return ((char *)NULL); + + oname = this_command_name; + this_command_name = varname; + + vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val); + if (vtype == -1) + { + this_command_name = oname; + return ((char *)NULL); + } + + if (valid_parameter_transform (xform) == 0) + { + this_command_name = oname; +#if 0 /* TAG: bash-5.2 Martin Schulte 10/2020 */ + return (interactive_shell ? &expand_param_error : &expand_param_fatal); +#else + return &expand_param_error; +#endif + } + + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + + /* If we are asked to display the attributes of an unset variable, V will + be NULL after the call to get_var_and_type. Double-check here. */ + if ((xc == 'a' || xc == 'A') && vtype == VT_VARIABLE && varname && v == 0) + v = find_variable (varname); + + temp1 = (char *)NULL; /* shut up gcc */ + switch (vtype) + { + case VT_VARIABLE: + case VT_ARRAYMEMBER: + temp1 = string_transform (xc, v, val); + if (vtype == VT_VARIABLE) + FREE (val); + if (temp1) + { + val = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + ? quote_string (temp1) + : quote_escapes (temp1); + free (temp1); + temp1 = val; + } + break; +#if defined (ARRAY_VARS) + case VT_ARRAYVAR: + temp1 = array_transform (xc, v, starsub, quoted); + if (temp1 && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + { + val = quote_escapes (temp1); + free (temp1); + temp1 = val; + } + break; +#endif + case VT_POSPARMS: + temp1 = parameter_list_transform (xc, varname[0], quoted); + if (temp1 && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + { + val = quote_escapes (temp1); + free (temp1); + temp1 = val; + } + break; + } + + this_command_name = oname; + return temp1; +} + +/******************************************************/ +/* */ +/* Functions to extract substrings of variable values */ +/* */ +/******************************************************/ + +#if defined (HANDLE_MULTIBYTE) +/* Character-oriented rather than strictly byte-oriented substrings. S and + E, rather being strict indices into STRING, indicate character (possibly + multibyte character) positions that require calculation. + Used by the ${param:offset[:length]} expansion. */ +static char * +mb_substring (string, s, e) + char *string; + int s, e; +{ + char *tt; + int start, stop, i; + size_t slen; + DECLARE_MBSTATE; + + start = 0; + /* Don't need string length in ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? STRLEN (string) : 0; + + i = s; + while (string[start] && i--) + ADVANCE_CHAR (string, slen, start); + stop = start; + i = e - s; + while (string[stop] && i--) + ADVANCE_CHAR (string, slen, stop); + tt = substring (string, start, stop); + return tt; +} +#endif + +/* Process a variable substring expansion: ${name:e1[:e2]}. If VARNAME + is `@', use the positional parameters; otherwise, use the value of + VARNAME. If VARNAME is an array variable, use the array elements. */ + +static char * +parameter_brace_substring (varname, value, ind, substr, quoted, pflags, flags) + char *varname, *value; + int ind; + char *substr; + int quoted, pflags, flags; +{ + intmax_t e1, e2; + int vtype, r, starsub; + char *temp, *val, *tt, *oname; + SHELL_VAR *v; + + if (value == 0 && ((varname[0] != '@' && varname[0] != '*') || varname[1])) + return ((char *)NULL); + + oname = this_command_name; + this_command_name = varname; + + vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val); + if (vtype == -1) + { + this_command_name = oname; + return ((char *)NULL); + } + + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + + r = verify_substring_values (v, val, substr, vtype, &e1, &e2); + this_command_name = oname; + if (r <= 0) + { + if (vtype == VT_VARIABLE) + FREE (val); + return ((r == 0) ? &expand_param_error : (char *)NULL); + } + + switch (vtype) + { + case VT_VARIABLE: + case VT_ARRAYMEMBER: +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1) + tt = mb_substring (val, e1, e2); + else +#endif + tt = substring (val, e1, e2); + + if (vtype == VT_VARIABLE) + FREE (val); + if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + temp = quote_string (tt); + else + temp = tt ? quote_escapes (tt) : (char *)NULL; + FREE (tt); + break; + case VT_POSPARMS: + case VT_ARRAYVAR: + if (vtype == VT_POSPARMS) + tt = pos_params (varname, e1, e2, quoted, pflags); +#if defined (ARRAY_VARS) + /* assoc_subrange and array_subrange both call string_list_pos_params, + so we can treat this case just like VT_POSPARAMS. */ + else if (assoc_p (v)) + /* we convert to list and take first e2 elements starting at e1th + element -- officially undefined for now */ + tt = assoc_subrange (assoc_cell (v), e1, e2, starsub, quoted, pflags); + else + /* We want E2 to be the number of elements desired (arrays can be + sparse, so verify_substring_values just returns the numbers + specified and we rely on array_subrange to understand how to + deal with them). */ + tt = array_subrange (array_cell (v), e1, e2, starsub, quoted, pflags); +#endif + /* We want to leave this alone in every case where pos_params/ + string_list_pos_params quotes the list members */ + if (tt && quoted == 0 && ifs_is_null) + { + temp = tt; /* Posix interp 888 */ + } + else if (tt && quoted == 0 && (pflags & PF_ASSIGNRHS)) + { + temp = tt; /* Posix interp 888 */ + } + else if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0) + { + temp = tt ? quote_escapes (tt) : (char *)NULL; + FREE (tt); + } + else + temp = tt; + break; + + default: + temp = (char *)NULL; + } + + return temp; +} + +/****************************************************************/ +/* */ +/* Functions to perform pattern substitution on variable values */ +/* */ +/****************************************************************/ + +#ifdef INCLUDE_UNUSED +static int +shouldexp_replacement (s) + char *s; +{ + register char *p; + + for (p = s; p && *p; p++) + { + if (*p == '\\') + p++; + else if (*p == '&') + return 1; + } + return 0; +} +#endif + +char * +pat_subst (string, pat, rep, mflags) + char *string, *pat, *rep; + int mflags; +{ + char *ret, *s, *e, *str, *rstr, *mstr, *send; + int rptr, mtype, rxpand, mlen; + size_t rsize, l, replen, rslen; + DECLARE_MBSTATE; + + if (string == 0) + return (savestring ("")); + + mtype = mflags & MATCH_TYPEMASK; + +#if 0 /* TAG: bash-5.2? */ + rxpand = (rep && *rep) ? shouldexp_replacement (rep) : 0; +#else + rxpand = 0; +#endif + + /* Special cases: + * 1. A null pattern with mtype == MATCH_BEG means to prefix STRING + * with REP and return the result. + * 2. A null pattern with mtype == MATCH_END means to append REP to + * STRING and return the result. + * 3. A null STRING with a matching pattern means to append REP to + * STRING and return the result. + * These don't understand or process `&' in the replacement string. + */ + if ((pat == 0 || *pat == 0) && (mtype == MATCH_BEG || mtype == MATCH_END)) + { + replen = STRLEN (rep); + l = STRLEN (string); + ret = (char *)xmalloc (replen + l + 2); + if (replen == 0) + strcpy (ret, string); + else if (mtype == MATCH_BEG) + { + strcpy (ret, rep); + strcpy (ret + replen, string); + } + else + { + strcpy (ret, string); + strcpy (ret + l, rep); + } + return (ret); + } + else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0)) + { + replen = STRLEN (rep); + ret = (char *)xmalloc (replen + 1); + if (replen == 0) + ret[0] = '\0'; + else + strcpy (ret, rep); + return (ret); + } + + ret = (char *)xmalloc (rsize = 64); + ret[0] = '\0'; + send = string + strlen (string); + + for (replen = STRLEN (rep), rptr = 0, str = string; *str;) + { + if (match_pattern (str, pat, mtype, &s, &e) == 0) + break; + l = s - str; + + if (rep && rxpand) + { + int x; + mlen = e - s; + mstr = xmalloc (mlen + 1); + for (x = 0; x < mlen; x++) + mstr[x] = s[x]; + mstr[mlen] = '\0'; + rstr = strcreplace (rep, '&', mstr, 0); + free (mstr); + rslen = strlen (rstr); + } + else + { + rstr = rep; + rslen = replen; + } + + RESIZE_MALLOCED_BUFFER (ret, rptr, (l + rslen), rsize, 64); + + /* OK, now copy the leading unmatched portion of the string (from + str to s) to ret starting at rptr (the current offset). Then copy + the replacement string at ret + rptr + (s - str). Increment + rptr (if necessary) and str and go on. */ + if (l) + { + strncpy (ret + rptr, str, l); + rptr += l; + } + if (replen) + { + strncpy (ret + rptr, rstr, rslen); + rptr += rslen; + } + str = e; /* e == end of match */ + + if (rstr != rep) + free (rstr); + + if (((mflags & MATCH_GLOBREP) == 0) || mtype != MATCH_ANY) + break; + + if (s == e) + { + /* On a zero-length match, make sure we copy one character, since + we increment one character to avoid infinite recursion. */ + char *p, *origp, *origs; + size_t clen; + + RESIZE_MALLOCED_BUFFER (ret, rptr, locale_mb_cur_max, rsize, 64); +#if defined (HANDLE_MULTIBYTE) + p = origp = ret + rptr; + origs = str; + COPY_CHAR_P (p, str, send); + rptr += p - origp; + e += str - origs; +#else + ret[rptr++] = *str++; + e++; /* avoid infinite recursion on zero-length match */ +#endif + } + } + + /* Now copy the unmatched portion of the input string */ + if (str && *str) + { + RESIZE_MALLOCED_BUFFER (ret, rptr, STRLEN(str) + 1, rsize, 64); + strcpy (ret + rptr, str); + } + else + ret[rptr] = '\0'; + + return ret; +} + +/* Do pattern match and replacement on the positional parameters. */ +static char * +pos_params_pat_subst (string, pat, rep, mflags) + char *string, *pat, *rep; + int mflags; +{ + WORD_LIST *save, *params; + WORD_DESC *w; + char *ret; + int pchar, qflags, pflags; + + save = params = list_rest_of_args (); + if (save == 0) + return ((char *)NULL); + + for ( ; params; params = params->next) + { + ret = pat_subst (params->word->word, pat, rep, mflags); + w = alloc_word_desc (); + w->word = ret ? ret : savestring (""); + dispose_word (params->word); + params->word = w; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) == MATCH_ASSIGNRHS ? PF_ASSIGNRHS : 0; + + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how $* will be expanded. */ + if (pchar == '*' && (mflags & MATCH_ASSIGNRHS) && expand_no_split_dollar_star && ifs_is_null) + qflags |= Q_DOUBLE_QUOTES; /* Posix interp 888 */ + + ret = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words (save); + + return (ret); +} + +/* Perform pattern substitution on VALUE, which is the expansion of + VARNAME. PATSUB is an expression supplying the pattern to match + and the string to substitute. QUOTED is a flags word containing + the type of quoting currently in effect. */ +static char * +parameter_brace_patsub (varname, value, ind, patsub, quoted, pflags, flags) + char *varname, *value; + int ind; + char *patsub; + int quoted, pflags, flags; +{ + int vtype, mflags, starsub, delim; + char *val, *temp, *pat, *rep, *p, *lpatsub, *tt, *oname; + SHELL_VAR *v; + + if (value == 0) + return ((char *)NULL); + + oname = this_command_name; + this_command_name = varname; /* error messages */ + + vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val); + if (vtype == -1) + { + this_command_name = oname; + return ((char *)NULL); + } + + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + + mflags = 0; + /* PATSUB is never NULL when this is called. */ + if (*patsub == '/') + { + mflags |= MATCH_GLOBREP; + patsub++; + } + + /* Malloc this because expand_string_if_necessary or one of the expansion + functions in its call chain may free it on a substitution error. */ + lpatsub = savestring (patsub); + + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + mflags |= MATCH_QUOTED; + + if (starsub) + mflags |= MATCH_STARSUB; + + if (pflags & PF_ASSIGNRHS) + mflags |= MATCH_ASSIGNRHS; + + /* If the pattern starts with a `/', make sure we skip over it when looking + for the replacement delimiter. */ + delim = skip_to_delim (lpatsub, ((*patsub == '/') ? 1 : 0), "/", 0); + if (lpatsub[delim] == '/') + { + lpatsub[delim] = 0; + rep = lpatsub + delim + 1; + } + else + rep = (char *)NULL; + + if (rep && *rep == '\0') + rep = (char *)NULL; + + /* Perform the same expansions on the pattern as performed by the + pattern removal expansions. */ + pat = getpattern (lpatsub, quoted, 1); + + if (rep) + { + /* We want to perform quote removal on the expanded replacement even if + the entire expansion is double-quoted because the parser and string + extraction functions treated quotes in the replacement string as + special. THIS IS NOT BACKWARDS COMPATIBLE WITH BASH-4.2. */ + if (shell_compatibility_level > 42) + rep = expand_string_if_necessary (rep, quoted & ~(Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT), expand_string_unsplit); + /* This is the bash-4.2 code. */ + else if ((mflags & MATCH_QUOTED) == 0) + rep = expand_string_if_necessary (rep, quoted, expand_string_unsplit); + else + rep = expand_string_to_string_internal (rep, quoted, expand_string_unsplit); + } + + /* ksh93 doesn't allow the match specifier to be a part of the expanded + pattern. This is an extension. Make sure we don't anchor the pattern + at the beginning or end of the string if we're doing global replacement, + though. */ + p = pat; + if (mflags & MATCH_GLOBREP) + mflags |= MATCH_ANY; + else if (pat && pat[0] == '#') + { + mflags |= MATCH_BEG; + p++; + } + else if (pat && pat[0] == '%') + { + mflags |= MATCH_END; + p++; + } + else + mflags |= MATCH_ANY; + + /* OK, we now want to substitute REP for PAT in VAL. If + flags & MATCH_GLOBREP is non-zero, the substitution is done + everywhere, otherwise only the first occurrence of PAT is + replaced. The pattern matching code doesn't understand + CTLESC quoting CTLESC and CTLNUL so we use the dequoted variable + values passed in (VT_VARIABLE) so the pattern substitution + code works right. We need to requote special chars after + we're done for VT_VARIABLE and VT_ARRAYMEMBER, and for the + other cases if QUOTED == 0, since the posparams and arrays + indexed by * or @ do special things when QUOTED != 0. */ + + switch (vtype) + { + case VT_VARIABLE: + case VT_ARRAYMEMBER: + temp = pat_subst (val, p, rep, mflags); + if (vtype == VT_VARIABLE) + FREE (val); + if (temp) + { + tt = (mflags & MATCH_QUOTED) ? quote_string (temp) : quote_escapes (temp); + free (temp); + temp = tt; + } + break; + case VT_POSPARMS: + /* This does the right thing for the case where we are not performing + word splitting. MATCH_STARSUB restricts it to ${* /foo/bar}, and + pos_params_pat_subst/string_list_pos_params will do the right thing + in turn for the case where ifs_is_null. Posix interp 888 */ + if ((pflags & PF_NOSPLIT2) && (mflags & MATCH_STARSUB)) + mflags |= MATCH_ASSIGNRHS; + temp = pos_params_pat_subst (val, p, rep, mflags); + if (temp && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp && quoted == 0 && (pflags & PF_ASSIGNRHS)) + { + /* Posix interp 888 */ + } + else if (temp && (mflags & MATCH_QUOTED) == 0) + { + tt = quote_escapes (temp); + free (temp); + temp = tt; + } + break; +#if defined (ARRAY_VARS) + case VT_ARRAYVAR: + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how ${A[*]} will be + expanded to make it identical to $*. */ + if ((mflags & MATCH_STARSUB) && (mflags & MATCH_ASSIGNRHS) && ifs_is_null) + mflags |= MATCH_QUOTED; /* Posix interp 888 */ + + /* these eventually call string_list_pos_params */ + if (assoc_p (v)) + temp = assoc_patsub (assoc_cell (v), p, rep, mflags); + else + temp = array_patsub (array_cell (v), p, rep, mflags); + + if (temp && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp && (mflags & MATCH_QUOTED) == 0) + { + tt = quote_escapes (temp); + free (temp); + temp = tt; + } + break; +#endif + } + + FREE (pat); + FREE (rep); + free (lpatsub); + + this_command_name = oname; + + return temp; +} + +/****************************************************************/ +/* */ +/* Functions to perform case modification on variable values */ +/* */ +/****************************************************************/ + +/* Do case modification on the positional parameters. */ + +static char * +pos_params_modcase (string, pat, modop, mflags) + char *string, *pat; + int modop; + int mflags; +{ + WORD_LIST *save, *params; + WORD_DESC *w; + char *ret; + int pchar, qflags, pflags; + + save = params = list_rest_of_args (); + if (save == 0) + return ((char *)NULL); + + for ( ; params; params = params->next) + { + ret = sh_modcase (params->word->word, pat, modop); + w = alloc_word_desc (); + w->word = ret ? ret : savestring (""); + dispose_word (params->word); + params->word = w; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) == MATCH_ASSIGNRHS ? PF_ASSIGNRHS : 0; + + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how $* will be expanded. */ + if (pchar == '*' && (mflags & MATCH_ASSIGNRHS) && ifs_is_null) + qflags |= Q_DOUBLE_QUOTES; /* Posix interp 888 */ + + ret = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words (save); + + return (ret); +} + +/* Perform case modification on VALUE, which is the expansion of + VARNAME. MODSPEC is an expression supplying the type of modification + to perform. QUOTED is a flags word containing the type of quoting + currently in effect. */ +static char * +parameter_brace_casemod (varname, value, ind, modspec, patspec, quoted, pflags, flags) + char *varname, *value; + int ind, modspec; + char *patspec; + int quoted, pflags, flags; +{ + int vtype, starsub, modop, mflags, x; + char *val, *temp, *pat, *p, *lpat, *tt, *oname; + SHELL_VAR *v; + + if (value == 0) + return ((char *)NULL); + + oname = this_command_name; + this_command_name = varname; + + vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val); + if (vtype == -1) + { + this_command_name = oname; + return ((char *)NULL); + } + + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + + modop = 0; + mflags = 0; + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + mflags |= MATCH_QUOTED; + if (starsub) + mflags |= MATCH_STARSUB; + if (pflags & PF_ASSIGNRHS) + mflags |= MATCH_ASSIGNRHS; + + p = patspec; + if (modspec == '^') + { + x = p && p[0] == modspec; + modop = x ? CASE_UPPER : CASE_UPFIRST; + p += x; + } + else if (modspec == ',') + { + x = p && p[0] == modspec; + modop = x ? CASE_LOWER : CASE_LOWFIRST; + p += x; + } + else if (modspec == '~') + { + x = p && p[0] == modspec; + modop = x ? CASE_TOGGLEALL : CASE_TOGGLE; + p += x; + } + + lpat = p ? savestring (p) : 0; + /* Perform the same expansions on the pattern as performed by the + pattern removal expansions. */ + pat = lpat ? getpattern (lpat, quoted, 1) : 0; + + /* OK, now we do the case modification. */ + switch (vtype) + { + case VT_VARIABLE: + case VT_ARRAYMEMBER: + temp = sh_modcase (val, pat, modop); + if (vtype == VT_VARIABLE) + FREE (val); + if (temp) + { + tt = (mflags & MATCH_QUOTED) ? quote_string (temp) : quote_escapes (temp); + free (temp); + temp = tt; + } + break; + + case VT_POSPARMS: + temp = pos_params_modcase (val, pat, modop, mflags); + if (temp && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp && (mflags & MATCH_QUOTED) == 0) + { + tt = quote_escapes (temp); + free (temp); + temp = tt; + } + break; + +#if defined (ARRAY_VARS) + case VT_ARRAYVAR: + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how ${A[*]} will be + expanded to make it identical to $*. */ + if ((mflags & MATCH_STARSUB) && (mflags & MATCH_ASSIGNRHS) && ifs_is_null) + mflags |= MATCH_QUOTED; /* Posix interp 888 */ + + temp = assoc_p (v) ? assoc_modcase (assoc_cell (v), pat, modop, mflags) + : array_modcase (array_cell (v), pat, modop, mflags); + + if (temp && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp && (mflags & MATCH_QUOTED) == 0) + { + tt = quote_escapes (temp); + free (temp); + temp = tt; + } + + break; +#endif + } + + FREE (pat); + free (lpat); + + this_command_name = oname; + + return temp; +} + +/* Check for unbalanced parens in S, which is the contents of $(( ... )). If + any occur, this must be a nested command substitution, so return 0. + Otherwise, return 1. A valid arithmetic expression must always have a + ( before a matching ), so any cases where there are more right parens + means that this must not be an arithmetic expression, though the parser + will not accept it without a balanced total number of parens. */ +static int +chk_arithsub (s, len) + const char *s; + int len; +{ + int i, count; + DECLARE_MBSTATE; + + i = count = 0; + while (i < len) + { + if (s[i] == LPAREN) + count++; + else if (s[i] == RPAREN) + { + count--; + if (count < 0) + return 0; + } + + switch (s[i]) + { + default: + ADVANCE_CHAR (s, len, i); + break; + + case '\\': + i++; + if (s[i]) + ADVANCE_CHAR (s, len, i); + break; + + case '\'': + i = skip_single_quoted (s, len, ++i, 0); + break; + + case '"': + i = skip_double_quoted ((char *)s, len, ++i, 0); + break; + } + } + + return (count == 0); +} + +/****************************************************************/ +/* */ +/* Functions to perform parameter expansion on a string */ +/* */ +/****************************************************************/ + +/* ${[#][!]name[[:][^[^]][,[,]]#[#]%[%]-=?+[word][:e1[:e2]]]} */ +static WORD_DESC * +parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, contains_dollar_at) + char *string; + int *indexp, quoted, pflags, *quoted_dollar_atp, *contains_dollar_at; +{ + int check_nullness, var_is_set, var_is_null, var_is_special; + int want_substring, want_indir, want_patsub, want_casemod, want_attributes; + char *name, *value, *temp, *temp1; + WORD_DESC *tdesc, *ret; + int t_index, sindex, c, tflag, modspec, local_pflags, all_element_arrayref; + intmax_t number; + arrayind_t ind; + + temp = temp1 = value = (char *)NULL; + var_is_set = var_is_null = var_is_special = check_nullness = 0; + want_substring = want_indir = want_patsub = want_casemod = want_attributes = 0; + + local_pflags = 0; + all_element_arrayref = 0; + + sindex = *indexp; + t_index = ++sindex; + /* ${#var} doesn't have any of the other parameter expansions on it. */ + if (string[t_index] == '#' && legal_variable_starter (string[t_index+1])) /* {{ */ + name = string_extract (string, &t_index, "}", SX_VARNAME); + else +#if defined (CASEMOD_EXPANSIONS) + /* To enable case-toggling expansions using the `~' operator character + define CASEMOD_TOGGLECASE in config-top.h */ +# if defined (CASEMOD_TOGGLECASE) + name = string_extract (string, &t_index, "#%^,~:-=?+/@}", SX_VARNAME); +# else + name = string_extract (string, &t_index, "#%^,:-=?+/@}", SX_VARNAME); +# endif /* CASEMOD_TOGGLECASE */ +#else + name = string_extract (string, &t_index, "#%:-=?+/@}", SX_VARNAME); +#endif /* CASEMOD_EXPANSIONS */ + + /* Handle ${@[stuff]} now that @ is a word expansion operator. Not exactly + the cleanest code ever. */ + if (*name == 0 && sindex == t_index && string[sindex] == '@') + { + name = (char *)xrealloc (name, 2); + name[0] = '@'; + name[1] = '\0'; + t_index++; + } + else if (*name == '!' && t_index > sindex && string[t_index] == '@' && string[t_index+1] == RBRACE) + { + name = (char *)xrealloc (name, t_index - sindex + 2); + name[t_index - sindex] = '@'; + name[t_index - sindex + 1] = '\0'; + t_index++; + } + + ret = 0; + tflag = 0; + + ind = INTMAX_MIN; + + /* If the name really consists of a special variable, then make sure + that we have the entire name. We don't allow indirect references + to special variables except `#', `?', `@' and `*'. This clause is + designed to handle ${#SPECIAL} and ${!SPECIAL}, not anything more + general. */ + if ((sindex == t_index && VALID_SPECIAL_LENGTH_PARAM (string[t_index])) || + (sindex == t_index && string[sindex] == '#' && VALID_SPECIAL_LENGTH_PARAM (string[sindex + 1])) || + (sindex == t_index - 1 && string[sindex] == '!' && VALID_INDIR_PARAM (string[t_index]))) + { + t_index++; + temp1 = string_extract (string, &t_index, "#%:-=?+/@}", 0); + name = (char *)xrealloc (name, 3 + (strlen (temp1))); + *name = string[sindex]; + if (string[sindex] == '!') + { + /* indirect reference of $#, $?, $@, or $* */ + name[1] = string[sindex + 1]; + strcpy (name + 2, temp1); + } + else + strcpy (name + 1, temp1); + free (temp1); + } + sindex = t_index; + + /* Find out what character ended the variable name. Then + do the appropriate thing. */ + if (c = string[sindex]) + sindex++; + + /* If c is followed by one of the valid parameter expansion + characters, move past it as normal. If not, assume that + a substring specification is being given, and do not move + past it. */ + if (c == ':' && VALID_PARAM_EXPAND_CHAR (string[sindex])) + { + check_nullness++; + if (c = string[sindex]) + sindex++; + } + else if (c == ':' && string[sindex] != RBRACE) + want_substring = 1; + else if (c == '/' /* && string[sindex] != RBRACE */) /* XXX */ + want_patsub = 1; +#if defined (CASEMOD_EXPANSIONS) + else if (c == '^' || c == ',' || c == '~') + { + modspec = c; + want_casemod = 1; + } +#endif + else if (c == '@' && (string[sindex] == 'a' || string[sindex] == 'A') && string[sindex+1] == RBRACE) + { + /* special case because we do not want to shortcut foo as foo[0] here */ + want_attributes = 1; + local_pflags |= PF_ALLINDS; + } + + /* Catch the valid and invalid brace expressions that made it through the + tests above. */ + /* ${#-} is a valid expansion and means to take the length of $-. + Similarly for ${#?} and ${##}... */ + if (name[0] == '#' && name[1] == '\0' && check_nullness == 0 && + VALID_SPECIAL_LENGTH_PARAM (c) && string[sindex] == RBRACE) + { + name = (char *)xrealloc (name, 3); + name[1] = c; + name[2] = '\0'; + c = string[sindex++]; + } + + /* ...but ${#%}, ${#:}, ${#=}, ${#+}, and ${#/} are errors. */ + if (name[0] == '#' && name[1] == '\0' && check_nullness == 0 && + member (c, "%:=+/") && string[sindex] == RBRACE) + { + temp = (char *)NULL; + goto bad_substitution; /* XXX - substitution error */ + } + + /* Indirect expansion begins with a `!'. A valid indirect expansion is + either a variable name, one of the positional parameters or a special + variable that expands to one of the positional parameters. */ + want_indir = *name == '!' && + (legal_variable_starter ((unsigned char)name[1]) || DIGIT (name[1]) + || VALID_INDIR_PARAM (name[1])); + + /* Determine the value of this variable whose name is NAME. */ + + /* Check for special variables, directly referenced. */ + if (SPECIAL_VAR (name, want_indir)) + var_is_special++; + + /* Check for special expansion things, like the length of a parameter */ + if (*name == '#' && name[1]) + { + /* If we are not pointing at the character just after the + closing brace, then we haven't gotten all of the name. + Since it begins with a special character, this is a bad + substitution. Also check NAME for validity before trying + to go on. */ + if (string[sindex - 1] != RBRACE || (valid_length_expression (name) == 0)) + { + temp = (char *)NULL; + goto bad_substitution; /* substitution error */ + } + + number = parameter_brace_expand_length (name); + if (number == INTMAX_MIN && unbound_vars_is_error) + { + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (name+1); + free (name); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } + free (name); + + *indexp = sindex; + if (number < 0) + return (&expand_wdesc_error); + else + { + ret = alloc_word_desc (); + ret->word = itos (number); + return ret; + } + } + + /* ${@} is identical to $@. */ + if (name[0] == '@' && name[1] == '\0') + { + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 1; + + if (contains_dollar_at) + *contains_dollar_at = 1; + + tflag |= W_DOLLARAT; + } + + /* Process ${!PREFIX*} expansion. */ + if (want_indir && string[sindex - 1] == RBRACE && + (string[sindex - 2] == '*' || string[sindex - 2] == '@') && + legal_variable_starter ((unsigned char) name[1])) + { + char **x; + WORD_LIST *xlist; + + temp1 = savestring (name + 1); + number = strlen (temp1); + temp1[number - 1] = '\0'; + x = all_variables_matching_prefix (temp1); + xlist = strvec_to_word_list (x, 0, 0); + if (string[sindex - 2] == '*') + temp = string_list_dollar_star (xlist, quoted, 0); + else + { + temp = string_list_dollar_at (xlist, quoted, 0); + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 1; + if (contains_dollar_at) + *contains_dollar_at = 1; + + tflag |= W_DOLLARAT; + } + free (x); + dispose_words (xlist); + free (temp1); + *indexp = sindex; + + free (name); + + ret = alloc_word_desc (); + ret->word = temp; + ret->flags = tflag; /* XXX */ + return ret; + } + +#if defined (ARRAY_VARS) + /* Process ${!ARRAY[@]} and ${!ARRAY[*]} expansion. */ + if (want_indir && string[sindex - 1] == RBRACE && + string[sindex - 2] == RBRACK && valid_array_reference (name+1, 0)) + { + char *x, *x1; + + temp1 = savestring (name + 1); + x = array_variable_name (temp1, 0, &x1, (int *)0); + FREE (x); + if (ALL_ELEMENT_SUB (x1[0]) && x1[1] == RBRACK) + { + temp = array_keys (temp1, quoted, pflags); /* handles assoc vars too */ + if (x1[0] == '@') + { + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 1; + if (contains_dollar_at) + *contains_dollar_at = 1; + + tflag |= W_DOLLARAT; + } + + free (name); + free (temp1); + *indexp = sindex; + + ret = alloc_word_desc (); + ret->word = temp; + ret->flags = tflag; /* XXX */ + return ret; + } + + free (temp1); + } +#endif /* ARRAY_VARS */ + + /* Make sure that NAME is valid before trying to go on. */ + if (valid_brace_expansion_word (want_indir ? name + 1 : name, + var_is_special) == 0) + { + temp = (char *)NULL; + goto bad_substitution; /* substitution error */ + } + + if (want_indir) + { + tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, pflags|local_pflags, quoted_dollar_atp, contains_dollar_at); + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + { + temp = (char *)NULL; + goto bad_substitution; + } + + /* Turn off the W_ARRAYIND flag because there is no way for this function + to return the index we're supposed to be using. */ + if (tdesc && tdesc->flags) + tdesc->flags &= ~W_ARRAYIND; + } + else + { + local_pflags |= PF_IGNUNBOUND|(pflags&(PF_NOSPLIT2|PF_ASSIGNRHS)); + tdesc = parameter_brace_expand_word (name, var_is_special, quoted, local_pflags, &ind); + } + + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + { + tflag = 0; + tdesc = 0; + } + + if (tdesc) + { + temp = tdesc->word; + tflag = tdesc->flags; + dispose_word_desc (tdesc); + } + else + temp = (char *)0; + + if (temp == &expand_param_error || temp == &expand_param_fatal) + { + FREE (name); + FREE (value); + return (temp == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); + } + +#if defined (ARRAY_VARS) + if (valid_array_reference (name, 0)) + { + int qflags; + char *t; + + qflags = quoted; + /* If in a context where word splitting will not take place, treat as + if double-quoted. Has effects with $* and ${array[*]} */ + + if (pflags & PF_ASSIGNRHS) + qflags |= Q_DOUBLE_QUOTES; + /* We duplicate a little code here */ + t = mbschr (name, LBRACK); + if (t && ALL_ELEMENT_SUB (t[1]) && t[2] == RBRACK) + { + all_element_arrayref = 1; + if (expand_no_split_dollar_star && t[1] == '*') /* XXX */ + qflags |= Q_DOUBLE_QUOTES; + } + chk_atstar (name, qflags, pflags, quoted_dollar_atp, contains_dollar_at); + } +#endif + + var_is_set = temp != (char *)0; + var_is_null = check_nullness && (var_is_set == 0 || *temp == 0); + /* XXX - this may not need to be restricted to special variables */ + if (check_nullness) + var_is_null |= var_is_set && var_is_special && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL (temp); +#if defined (ARRAY_VARS) + if (check_nullness) + var_is_null |= var_is_set && + (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && + QUOTED_NULL (temp) && + valid_array_reference (name, 0) && + chk_atstar (name, 0, 0, (int *)0, (int *)0); +#endif + + /* Get the rest of the stuff inside the braces. */ + if (c && c != RBRACE) + { + /* Extract the contents of the ${ ... } expansion + according to the Posix.2 rules. */ + value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD); + if (string[sindex] == RBRACE) + sindex++; + else + goto bad_substitution; /* substitution error */ + } + else + value = (char *)NULL; + + *indexp = sindex; + + /* All the cases where an expansion can possibly generate an unbound + variable error. */ + if (want_substring || want_patsub || want_casemod || c == '@' || c == '#' || c == '%' || c == RBRACE) + { + if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1]) && all_element_arrayref == 0) + { + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (name); + FREE (value); + FREE (temp); + free (name); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } + } + + /* If this is a substring spec, process it and add the result. */ + if (want_substring) + { + temp1 = parameter_brace_substring (name, temp, ind, value, quoted, pflags, (tflag & W_ARRAYIND) ? AV_USEIND : 0); + FREE (value); + FREE (temp); + + if (temp1 == &expand_param_error || temp1 == &expand_param_fatal) + { + FREE (name); + return (temp1 == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); + } + + ret = alloc_word_desc (); + ret->word = temp1; + /* We test quoted_dollar_atp because we want variants with double-quoted + "$@" to take a different code path. In fact, we make sure at the end + of expand_word_internal that we're only looking at these flags if + quoted_dollar_at == 0. */ + if (temp1 && + (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) && + QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ret->flags |= W_QUOTED|W_HASQUOTEDNULL; + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && + (pflags & PF_ASSIGNRHS)) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + FREE (name); + return ret; + } + else if (want_patsub) + { + temp1 = parameter_brace_patsub (name, temp, ind, value, quoted, pflags, (tflag & W_ARRAYIND) ? AV_USEIND : 0); + FREE (value); + FREE (temp); + + if (temp1 == &expand_param_error || temp1 == &expand_param_fatal) + { + FREE (name); + return (temp1 == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); + } + + ret = alloc_word_desc (); + ret->word = temp1; + if (temp1 && + (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) && + QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ret->flags |= W_QUOTED|W_HASQUOTEDNULL; + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + FREE (name); + return ret; + } +#if defined (CASEMOD_EXPANSIONS) + else if (want_casemod) + { + temp1 = parameter_brace_casemod (name, temp, ind, modspec, value, quoted, pflags, (tflag & W_ARRAYIND) ? AV_USEIND : 0); + FREE (value); + FREE (temp); + + if (temp1 == &expand_param_error || temp1 == &expand_param_fatal) + { + FREE (name); + return (temp1 == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); + } + + ret = alloc_word_desc (); + ret->word = temp1; + if (temp1 && + (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) && + QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ret->flags |= W_QUOTED|W_HASQUOTEDNULL; + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + FREE (name); + return ret; + } +#endif + + /* Do the right thing based on which character ended the variable name. */ + switch (c) + { + default: + case '\0': +bad_substitution: + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: bad substitution"), string ? string : "??"); + FREE (value); + FREE (temp); + free (name); + if (shell_compatibility_level <= 43) + return &expand_wdesc_error; + else + return ((posixly_correct && interactive_shell == 0) ? &expand_wdesc_fatal : &expand_wdesc_error); + + case RBRACE: + break; + + case '@': + temp1 = parameter_brace_transform (name, temp, ind, value, c, quoted, pflags, (tflag & W_ARRAYIND) ? AV_USEIND : 0); + free (temp); + free (value); + + if (temp1 == &expand_param_error || temp1 == &expand_param_fatal) + { + free (name); + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: bad substitution"), string ? string : "??"); + return (temp1 == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); + } + + ret = alloc_word_desc (); + ret->word = temp1; + if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ret->flags |= W_QUOTED|W_HASQUOTEDNULL; + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + free (name); + return ret; + + case '#': /* ${param#[#]pattern} */ + case '%': /* ${param%[%]pattern} */ + if (value == 0 || *value == '\0' || temp == 0 || *temp == '\0') + { + FREE (value); + break; + } + temp1 = parameter_brace_remove_pattern (name, temp, ind, value, c, quoted, (tflag & W_ARRAYIND) ? AV_USEIND : 0); + free (temp); + free (value); + + ret = alloc_word_desc (); + ret->word = temp1; + if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ret->flags |= W_QUOTED|W_HASQUOTEDNULL; + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + free (name); + return ret; + + case '-': + case '=': + case '?': + case '+': + if (var_is_set && var_is_null == 0) + { + /* If the operator is `+', we don't want the value of the named + variable for anything, just the value of the right hand side. */ + if (c == '+') + { + /* XXX -- if we're double-quoted and the named variable is "$@", + we want to turn off any special handling of "$@" -- + we're not using it, so whatever is on the rhs applies. */ + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 0; + if (contains_dollar_at) + *contains_dollar_at = 0; + + FREE (temp); + if (value) + { + /* From Posix discussion on austin-group list. Issue 221 + requires that backslashes escaping `}' inside + double-quoted ${...} be removed. */ + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + quoted |= Q_DOLBRACE; + ret = parameter_brace_expand_rhs (name, value, c, + quoted, + pflags, + quoted_dollar_atp, + contains_dollar_at); + /* XXX - fix up later, esp. noting presence of + W_HASQUOTEDNULL in ret->flags */ + free (value); + } + else + temp = (char *)NULL; + } + else + { + FREE (value); + } + /* Otherwise do nothing; just use the value in TEMP. */ + } + else /* VAR not set or VAR is NULL. */ + { + FREE (temp); + temp = (char *)NULL; + if (c == '=' && var_is_special) + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("$%s: cannot assign in this way"), name); + free (name); + free (value); + return &expand_wdesc_error; + } + else if (c == '?') + { + parameter_brace_expand_error (name, value, check_nullness); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } + else if (c != '+') + { + /* XXX -- if we're double-quoted and the named variable is "$@", + we want to turn off any special handling of "$@" -- + we're not using it, so whatever is on the rhs applies. */ + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 0; + if (contains_dollar_at) + *contains_dollar_at = 0; + + /* From Posix discussion on austin-group list. Issue 221 requires + that backslashes escaping `}' inside double-quoted ${...} be + removed. */ + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + quoted |= Q_DOLBRACE; + ret = parameter_brace_expand_rhs (name, value, c, quoted, pflags, + quoted_dollar_atp, + contains_dollar_at); + /* XXX - fix up later, esp. noting presence of + W_HASQUOTEDNULL in tdesc->flags */ + } + free (value); + } + + break; + } + free (name); + + if (ret == 0) + { + ret = alloc_word_desc (); + ret->flags = tflag; + ret->word = temp; + } + return (ret); +} + +/* Expand a single ${xxx} expansion. The braces are optional. When + the braces are used, parameter_brace_expand() does the work, + possibly calling param_expand recursively. */ +static WORD_DESC * +param_expand (string, sindex, quoted, expanded_something, + contains_dollar_at, quoted_dollar_at_p, had_quoted_null_p, + pflags) + char *string; + int *sindex, quoted, *expanded_something, *contains_dollar_at; + int *quoted_dollar_at_p, *had_quoted_null_p, pflags; +{ + char *temp, *temp1, uerror[3], *savecmd; + int zindex, t_index, expok; + unsigned char c; + intmax_t number; + SHELL_VAR *var; + WORD_LIST *list, *l; + WORD_DESC *tdesc, *ret; + int tflag, nullarg; + int old_echo_input; + +/*itrace("param_expand: `%s' pflags = %d", string+*sindex, pflags);*/ + zindex = *sindex; + c = string[++zindex]; + + temp = (char *)NULL; + ret = tdesc = (WORD_DESC *)NULL; + tflag = 0; + + /* Do simple cases first. Switch on what follows '$'. */ + switch (c) + { + /* $0 .. $9? */ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + temp1 = dollar_vars[TODIGIT (c)]; + /* This doesn't get called when (pflags&PF_IGNUNBOUND) != 0 */ + if (unbound_vars_is_error && temp1 == (char *)NULL) + { + uerror[0] = '$'; + uerror[1] = c; + uerror[2] = '\0'; + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (uerror); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } + if (temp1) + temp = (*temp1 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ? quote_string (temp1) + : quote_escapes (temp1); + else + temp = (char *)NULL; + + break; + + /* $$ -- pid of the invoking shell. */ + case '$': + temp = itos (dollar_dollar_pid); + break; + + /* $# -- number of positional parameters. */ + case '#': + temp = itos (number_of_args ()); + break; + + /* $? -- return value of the last synchronous command. */ + case '?': + temp = itos (last_command_exit_value); + break; + + /* $- -- flags supplied to the shell on invocation or by `set'. */ + case '-': + temp = which_set_flags (); + break; + + /* $! -- Pid of the last asynchronous command. */ + case '!': + /* If no asynchronous pids have been created, expand to nothing. + If `set -u' has been executed, and no async processes have + been created, this is an expansion error. */ + if (last_asynchronous_pid == NO_PID) + { + if (expanded_something) + *expanded_something = 0; + temp = (char *)NULL; + if (unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0) + { + uerror[0] = '$'; + uerror[1] = c; + uerror[2] = '\0'; + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (uerror); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } + } + else + temp = itos (last_asynchronous_pid); + break; + + /* The only difference between this and $@ is when the arg is quoted. */ + case '*': /* `$*' */ + list = list_rest_of_args (); + +#if 0 + /* According to austin-group posix proposal by Geoff Clare in + <20090505091501.GA10097@squonk.masqnet> of 5 May 2009: + + "The shell shall write a message to standard error and + immediately exit when it tries to expand an unset parameter + other than the '@' and '*' special parameters." + */ + + if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0) + { + uerror[0] = '$'; + uerror[1] = '*'; + uerror[2] = '\0'; + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (uerror); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } +#endif + + /* If there are no command-line arguments, this should just + disappear if there are other characters in the expansion, + even if it's quoted. */ + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && list == 0) + temp = (char *)NULL; + else if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES|Q_PATQUOTE)) + { + /* If we have "$*" we want to make a string of the positional + parameters, separated by the first character of $IFS, and + quote the whole string, including the separators. If IFS + is unset, the parameters are separated by ' '; if $IFS is + null, the parameters are concatenated. */ + temp = (quoted & (Q_DOUBLE_QUOTES|Q_PATQUOTE)) ? string_list_dollar_star (list, quoted, 0) : string_list (list); + if (temp) + { + temp1 = (quoted & Q_DOUBLE_QUOTES) ? quote_string (temp) : temp; + if (*temp == 0) + tflag |= W_HASQUOTEDNULL; + if (temp != temp1) + free (temp); + temp = temp1; + } + } + else + { + /* We check whether or not we're eventually going to split $* here, + for example when IFS is empty and we are processing the rhs of + an assignment statement. In that case, we don't separate the + arguments at all. Otherwise, if the $* is not quoted it is + identical to $@ */ + if (expand_no_split_dollar_star && quoted == 0 && ifs_is_set == 0 && (pflags & PF_ASSIGNRHS)) + { + /* Posix interp 888: RHS of assignment, IFS unset: no splitting, + separate with space */ + temp1 = string_list_dollar_star (list, quoted, pflags); + temp = temp1 ? quote_string (temp1) : temp1; + /* XXX - tentative - note that we saw a quoted null here */ + if (temp1 && *temp1 == 0 && QUOTED_NULL (temp)) + tflag |= W_SAWQUOTEDNULL; + FREE (temp1); + } + else if (expand_no_split_dollar_star && quoted == 0 && ifs_is_null && (pflags & PF_ASSIGNRHS)) + { + /* Posix interp 888: RHS of assignment, IFS set to '' */ + temp1 = string_list_dollar_star (list, quoted, pflags); + temp = temp1 ? quote_escapes (temp1) : temp1; + FREE (temp1); + } + else if (expand_no_split_dollar_star && quoted == 0 && ifs_is_set && ifs_is_null == 0 && (pflags & PF_ASSIGNRHS)) + { + /* Posix interp 888: RHS of assignment, IFS set to non-null value */ + temp1 = string_list_dollar_star (list, quoted, pflags); + temp = temp1 ? quote_string (temp1) : temp1; + + /* XXX - tentative - note that we saw a quoted null here */ + if (temp1 && *temp1 == 0 && QUOTED_NULL (temp)) + tflag |= W_SAWQUOTEDNULL; + FREE (temp1); + } + /* XXX - should we check ifs_is_set here as well? */ +# if defined (HANDLE_MULTIBYTE) + else if (expand_no_split_dollar_star && ifs_firstc[0] == 0) +# else + else if (expand_no_split_dollar_star && ifs_firstc == 0) +# endif + /* Posix interp 888: not RHS, no splitting, IFS set to '' */ + temp = string_list_dollar_star (list, quoted, 0); + else + { + temp = string_list_dollar_at (list, quoted, 0); + /* Set W_SPLITSPACE to make sure the individual positional + parameters are split into separate arguments */ +#if 0 + if (quoted == 0 && (ifs_is_set == 0 || ifs_is_null)) +#else /* change with bash-5.0 */ + if (quoted == 0 && ifs_is_null) +#endif + tflag |= W_SPLITSPACE; + /* If we're not quoted but we still don't want word splitting, make + we quote the IFS characters to protect them from splitting (e.g., + when $@ is in the string as well). */ + else if (temp && quoted == 0 && ifs_is_set && (pflags & PF_ASSIGNRHS)) + { + temp1 = quote_string (temp); + free (temp); + temp = temp1; + } + } + + if (expand_no_split_dollar_star == 0 && contains_dollar_at) + *contains_dollar_at = 1; + } + + dispose_words (list); + break; + + /* When we have "$@" what we want is "$1" "$2" "$3" ... This + means that we have to turn quoting off after we split into + the individually quoted arguments so that the final split + on the first character of $IFS is still done. */ + case '@': /* `$@' */ + list = list_rest_of_args (); + +#if 0 + /* According to austin-group posix proposal by Geoff Clare in + <20090505091501.GA10097@squonk.masqnet> of 5 May 2009: + + "The shell shall write a message to standard error and + immediately exit when it tries to expand an unset parameter + other than the '@' and '*' special parameters." + */ + + if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0) + { + uerror[0] = '$'; + uerror[1] = '@'; + uerror[2] = '\0'; + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (uerror); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } +#endif + + for (nullarg = 0, l = list; l; l = l->next) + { + if (l->word && (l->word->word == 0 || l->word->word[0] == 0)) + nullarg = 1; + } + + /* We want to flag the fact that we saw this. We can't turn + off quoting entirely, because other characters in the + string might need it (consider "\"$@\""), but we need some + way to signal that the final split on the first character + of $IFS should be done, even though QUOTED is 1. */ + /* XXX - should this test include Q_PATQUOTE? */ + if (quoted_dollar_at_p && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + *quoted_dollar_at_p = 1; + if (contains_dollar_at) + *contains_dollar_at = 1; + + /* We want to separate the positional parameters with the first + character of $IFS in case $IFS is something other than a space. + We also want to make sure that splitting is done no matter what -- + according to POSIX.2, this expands to a list of the positional + parameters no matter what IFS is set to. */ + /* XXX - what to do when in a context where word splitting is not + performed? Even when IFS is not the default, posix seems to imply + that we have to expand $@ to all the positional parameters and + separate them with spaces, which are preserved because word splitting + doesn't take place. See below for how we use PF_NOSPLIT2 here. */ + + /* These are the cases where word splitting will not be performed. */ + if (pflags & PF_ASSIGNRHS) + { + temp = string_list_dollar_at (list, (quoted|Q_DOUBLE_QUOTES), pflags); + if (nullarg) + tflag |= W_HASQUOTEDNULL; /* we know quoting produces quoted nulls */ + } + + /* This needs to match what expand_word_internal does with non-quoted $@ + does with separating with spaces. Passing Q_DOUBLE_QUOTES means that + the characters in LIST will be quoted, and PF_ASSIGNRHS ensures that + they will separated by spaces. After doing this, we need the special + handling for PF_NOSPLIT2 in expand_word_internal to remove the CTLESC + quotes. */ + else if (pflags & PF_NOSPLIT2) + { +#if defined (HANDLE_MULTIBYTE) + if (quoted == 0 && ifs_is_set && ifs_is_null == 0 && ifs_firstc[0] != ' ') +#else + if (quoted == 0 && ifs_is_set && ifs_is_null == 0 && ifs_firstc != ' ') +#endif + /* Posix interp 888 */ + temp = string_list_dollar_at (list, Q_DOUBLE_QUOTES, pflags); + else + temp = string_list_dollar_at (list, quoted, pflags); + } + else + temp = string_list_dollar_at (list, quoted, pflags); + + tflag |= W_DOLLARAT; + dispose_words (list); + break; + + case LBRACE: + tdesc = parameter_brace_expand (string, &zindex, quoted, pflags, + quoted_dollar_at_p, + contains_dollar_at); + + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + return (tdesc); + temp = tdesc ? tdesc->word : (char *)0; + + /* XXX */ + /* Quoted nulls should be removed if there is anything else + in the string. */ + /* Note that we saw the quoted null so we can add one back at + the end of this function if there are no other characters + in the string, discard TEMP, and go on. The exception to + this is when we have "${@}" and $1 is '', since $@ needs + special handling. */ + if (tdesc && tdesc->word && (tdesc->flags & W_HASQUOTEDNULL) && QUOTED_NULL (temp)) + { + if (had_quoted_null_p) + *had_quoted_null_p = 1; + if (*quoted_dollar_at_p == 0) + { + free (temp); + tdesc->word = temp = (char *)NULL; + } + + } + + ret = tdesc; + goto return0; + + /* Do command or arithmetic substitution. */ + case LPAREN: + /* We have to extract the contents of this paren substitution. */ + t_index = zindex + 1; + /* XXX - might want to check for string[t_index+2] == LPAREN and parse + as arithmetic substitution immediately. */ + temp = extract_command_subst (string, &t_index, (pflags&PF_COMPLETE) ? SX_COMPLETE : 0); + zindex = t_index; + + /* For Posix.2-style `$(( ))' arithmetic substitution, + extract the expression and pass it to the evaluator. */ + if (temp && *temp == LPAREN) + { + char *temp2; + temp1 = temp + 1; + temp2 = savestring (temp1); + t_index = strlen (temp2) - 1; + + if (temp2[t_index] != RPAREN) + { + free (temp2); + goto comsub; + } + + /* Cut off ending `)' */ + temp2[t_index] = '\0'; + + if (chk_arithsub (temp2, t_index) == 0) + { + free (temp2); +#if 0 + internal_warning (_("future versions of the shell will force evaluation as an arithmetic substitution")); +#endif + goto comsub; + } + + /* Expand variables found inside the expression. */ + temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES|Q_ARITH); + free (temp2); + +arithsub: + /* No error messages. */ + savecmd = this_command_name; + this_command_name = (char *)NULL; + number = evalexp (temp1, EXP_EXPANDED, &expok); + this_command_name = savecmd; + free (temp); + free (temp1); + if (expok == 0) + { + if (interactive_shell == 0 && posixly_correct) + { + set_exit_status (EXECUTION_FAILURE); + return (&expand_wdesc_fatal); + } + else + return (&expand_wdesc_error); + } + temp = itos (number); + break; + } + +comsub: + old_echo_input = echo_input_at_read; + /* avoid echoing every substitution again */ + echo_input_at_read = 0; + if (pflags & PF_NOCOMSUB) + /* we need zindex+1 because string[zindex] == RPAREN */ + temp1 = substring (string, *sindex, zindex+1); + else + { + tdesc = command_substitute (temp, quoted, pflags&PF_ASSIGNRHS); + temp1 = tdesc ? tdesc->word : (char *)NULL; + if (tdesc) + dispose_word_desc (tdesc); + } + FREE (temp); + temp = temp1; + echo_input_at_read = old_echo_input; + break; + + /* Do POSIX.2d9-style arithmetic substitution. This will probably go + away in a future bash release. */ + case '[': /*]*/ + /* Extract the contents of this arithmetic substitution. */ + t_index = zindex + 1; + temp = extract_arithmetic_subst (string, &t_index); + zindex = t_index; + if (temp == 0) + { + temp = savestring (string); + if (expanded_something) + *expanded_something = 0; + goto return0; + } + + /* Do initial variable expansion. */ + temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES|Q_ARITH); + + goto arithsub; + + default: + /* Find the variable in VARIABLE_LIST. */ + temp = (char *)NULL; + + for (t_index = zindex; (c = string[zindex]) && legal_variable_char (c); zindex++) + ; + temp1 = (zindex > t_index) ? substring (string, t_index, zindex) : (char *)NULL; + + /* If this isn't a variable name, then just output the `$'. */ + if (temp1 == 0 || *temp1 == '\0') + { + FREE (temp1); + temp = (char *)xmalloc (2); + temp[0] = '$'; + temp[1] = '\0'; + if (expanded_something) + *expanded_something = 0; + goto return0; + } + + /* If the variable exists, return its value cell. */ + var = find_variable (temp1); + + if (var && invisible_p (var) == 0 && var_isset (var)) + { +#if defined (ARRAY_VARS) + if (assoc_p (var) || array_p (var)) + { + temp = array_p (var) ? array_reference (array_cell (var), 0) + : assoc_reference (assoc_cell (var), "0"); + if (temp) + temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ? quote_string (temp) + : quote_escapes (temp); + else if (unbound_vars_is_error) + goto unbound_variable; + } + else +#endif + { + temp = value_cell (var); + + temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ? quote_string (temp) + : ((pflags & PF_ASSIGNRHS) ? quote_rhs (temp) + : quote_escapes (temp)); + } + + free (temp1); + + goto return0; + } + else if (var && (invisible_p (var) || var_isset (var) == 0)) + temp = (char *)NULL; + else if ((var = find_variable_last_nameref (temp1, 0)) && var_isset (var) && invisible_p (var) == 0) + { + temp = nameref_cell (var); +#if defined (ARRAY_VARS) + if (temp && *temp && valid_array_reference (temp, 0)) + { + tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, (arrayind_t *)NULL); + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + return (tdesc); + ret = tdesc; + goto return0; + } + else +#endif + /* y=2 ; typeset -n x=y; echo $x is not the same as echo $2 in ksh */ + if (temp && *temp && legal_identifier (temp) == 0) + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: invalid variable name for name reference"), temp); + return (&expand_wdesc_error); /* XXX */ + } + else + temp = (char *)NULL; + } + + temp = (char *)NULL; + +unbound_variable: + if (unbound_vars_is_error) + { + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (temp1); + } + else + { + free (temp1); + goto return0; + } + + free (temp1); + set_exit_status (EXECUTION_FAILURE); + return ((unbound_vars_is_error && interactive_shell == 0) + ? &expand_wdesc_fatal + : &expand_wdesc_error); + } + + if (string[zindex]) + zindex++; + +return0: + *sindex = zindex; + + if (ret == 0) + { + ret = alloc_word_desc (); + ret->flags = tflag; /* XXX */ + ret->word = temp; + } + return ret; +} + +void +invalidate_cached_quoted_dollar_at () +{ + dispose_words (cached_quoted_dollar_at); + cached_quoted_dollar_at = 0; +} + +/* Make a word list which is the result of parameter and variable + expansion, command substitution, arithmetic substitution, and + quote removal of WORD. Return a pointer to a WORD_LIST which is + the result of the expansion. If WORD contains a null word, the + word list returned is also null. + + QUOTED contains flag values defined in shell.h. + + ISEXP is used to tell expand_word_internal that the word should be + treated as the result of an expansion. This has implications for + how IFS characters in the word are treated. + + CONTAINS_DOLLAR_AT and EXPANDED_SOMETHING are return values; when non-null + they point to an integer value which receives information about expansion. + CONTAINS_DOLLAR_AT gets non-zero if WORD contained "$@", else zero. + EXPANDED_SOMETHING get non-zero if WORD contained any parameter expansions, + else zero. + + This only does word splitting in the case of $@ expansion. In that + case, we split on ' '. */ + +/* Values for the local variable quoted_state. */ +#define UNQUOTED 0 +#define PARTIALLY_QUOTED 1 +#define WHOLLY_QUOTED 2 + +static WORD_LIST * +expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_something) + WORD_DESC *word; + int quoted, isexp; + int *contains_dollar_at; + int *expanded_something; +{ + WORD_LIST *list; + WORD_DESC *tword; + + /* The intermediate string that we build while expanding. */ + char *istring; + + /* The current size of the above object. */ + size_t istring_size; + + /* Index into ISTRING. */ + int istring_index; + + /* Temporary string storage. */ + char *temp, *temp1; + + /* The text of WORD. */ + register char *string; + + /* The size of STRING. */ + size_t string_size; + + /* The index into STRING. */ + int sindex; + + /* This gets 1 if we see a $@ while quoted. */ + int quoted_dollar_at; + + /* One of UNQUOTED, PARTIALLY_QUOTED, or WHOLLY_QUOTED, depending on + whether WORD contains no quoting characters, a partially quoted + string (e.g., "xx"ab), or is fully quoted (e.g., "xxab"). */ + int quoted_state; + + /* State flags */ + int had_quoted_null; + int has_quoted_ifs; /* did we add a quoted $IFS character here? */ + int has_dollar_at, temp_has_dollar_at; + int split_on_spaces; + int local_expanded; + int tflag; + int pflags; /* flags passed to param_expand */ + int mb_cur_max; + + int assignoff; /* If assignment, offset of `=' */ + + register unsigned char c; /* Current character. */ + int t_index; /* For calls to string_extract_xxx. */ + + char twochars[2]; + + DECLARE_MBSTATE; + + /* OK, let's see if we can optimize a common idiom: "$@" */ + if (STREQ (word->word, "\"$@\"") && + (word->flags == (W_HASDOLLAR|W_QUOTED)) && + dollar_vars[1]) /* XXX - check IFS here as well? */ + { + if (contains_dollar_at) + *contains_dollar_at = 1; + if (expanded_something) + *expanded_something = 1; + if (cached_quoted_dollar_at) + return (copy_word_list (cached_quoted_dollar_at)); + list = list_rest_of_args (); + list = quote_list (list); + cached_quoted_dollar_at = copy_word_list (list); + return (list); + } + + istring = (char *)xmalloc (istring_size = DEFAULT_INITIAL_ARRAY_SIZE); + istring[istring_index = 0] = '\0'; + quoted_dollar_at = had_quoted_null = has_dollar_at = 0; + has_quoted_ifs = 0; + split_on_spaces = 0; + quoted_state = UNQUOTED; + + string = word->word; + if (string == 0) + goto finished_with_string; + mb_cur_max = MB_CUR_MAX; + + /* Don't need the string length for the SADD... and COPY_ macros unless + multibyte characters are possible, but do need it for bounds checking. */ + string_size = (mb_cur_max > 1) ? strlen (string) : 1; + + if (contains_dollar_at) + *contains_dollar_at = 0; + + assignoff = -1; + + /* Begin the expansion. */ + + for (sindex = 0; ;) + { + c = string[sindex]; + + /* Case on top-level character. */ + switch (c) + { + case '\0': + goto finished_with_string; + + case CTLESC: + sindex++; +#if HANDLE_MULTIBYTE + if (mb_cur_max > 1 && string[sindex]) + { + SADD_MBQCHAR_BODY(temp, string, sindex, string_size); + } + else +#endif + { + temp = (char *)xmalloc (3); + temp[0] = CTLESC; + temp[1] = c = string[sindex]; + temp[2] = '\0'; + } + +dollar_add_string: + if (string[sindex]) + sindex++; + +add_string: + if (temp) + { + istring = sub_append_string (temp, istring, &istring_index, &istring_size); + temp = (char *)0; + } + + break; + +#if defined (PROCESS_SUBSTITUTION) + /* Process substitution. */ + case '<': + case '>': + { + /* XXX - technically this should only be expanded at the start + of a word */ + if (string[++sindex] != LPAREN || (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (word->flags & (W_DQUOTE|W_NOPROCSUB))) + { + sindex--; /* add_character: label increments sindex */ + goto add_character; + } + else + t_index = sindex + 1; /* skip past both '<' and LPAREN */ + + temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index, 0); /*))*/ + sindex = t_index; + + /* If the process substitution specification is `<()', we want to + open the pipe for writing in the child and produce output; if + it is `>()', we want to open the pipe for reading in the child + and consume input. */ + temp = temp1 ? process_substitute (temp1, (c == '>')) : (char *)0; + + FREE (temp1); + + goto dollar_add_string; + } +#endif /* PROCESS_SUBSTITUTION */ + + case '=': + /* Posix.2 section 3.6.1 says that tildes following `=' in words + which are not assignment statements are not expanded. If the + shell isn't in posix mode, though, we perform tilde expansion + on `likely candidate' unquoted assignment statements (flags + include W_ASSIGNMENT but not W_QUOTED). A likely candidate + contains an unquoted :~ or =~. Something to think about: we + now have a flag that says to perform tilde expansion on arguments + to `assignment builtins' like declare and export that look like + assignment statements. We now do tilde expansion on such words + even in POSIX mode. */ + if (word->flags & (W_ASSIGNRHS|W_NOTILDE)) + { + if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c)) + goto add_ifs_character; + else + goto add_character; + } + /* If we're not in posix mode or forcing assignment-statement tilde + expansion, note where the first `=' appears in the word and prepare + to do tilde expansion following the first `='. We have to keep + track of the first `=' (using assignoff) to avoid being confused + by an `=' in the rhs of the assignment statement. */ + if ((word->flags & W_ASSIGNMENT) && + (posixly_correct == 0 || (word->flags & W_TILDEEXP)) && + assignoff == -1 && sindex > 0) + assignoff = sindex; + if (sindex == assignoff && string[sindex+1] == '~') /* XXX */ + word->flags |= W_ITILDE; + + if (word->flags & W_ASSIGNARG) + word->flags |= W_ASSIGNRHS; /* affects $@ */ + + if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c)) + { + has_quoted_ifs++; + goto add_ifs_character; + } + else + goto add_character; + + case ':': + if (word->flags & (W_NOTILDE|W_NOASSNTILDE)) + { + if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c)) + goto add_ifs_character; + else + goto add_character; + } + + if ((word->flags & (W_ASSIGNMENT|W_ASSIGNRHS)) && + (posixly_correct == 0 || (word->flags & W_TILDEEXP)) && + string[sindex+1] == '~') + word->flags |= W_ITILDE; + + if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c)) + goto add_ifs_character; + else + goto add_character; + + case '~': + /* If the word isn't supposed to be tilde expanded, or we're not + at the start of a word or after an unquoted : or = in an + assignment statement, we don't do tilde expansion. We don't + do tilde expansion if quoted or in an arithmetic context. */ + + if ((word->flags & (W_NOTILDE|W_DQUOTE)) || + (sindex > 0 && ((word->flags & W_ITILDE) == 0)) || + (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + { + word->flags &= ~W_ITILDE; + if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0) + goto add_ifs_character; + else + goto add_character; + } + + if (word->flags & W_ASSIGNRHS) + tflag = 2; + else if (word->flags & (W_ASSIGNMENT|W_TILDEEXP)) + tflag = 1; + else + tflag = 0; + + temp = bash_tilde_find_word (string + sindex, tflag, &t_index); + + word->flags &= ~W_ITILDE; + + if (temp && *temp && t_index > 0) + { + temp1 = bash_tilde_expand (temp, tflag); + if (temp1 && *temp1 == '~' && STREQ (temp, temp1)) + { + FREE (temp); + FREE (temp1); + goto add_character; /* tilde expansion failed */ + } + free (temp); + temp = temp1; + sindex += t_index; + goto add_quoted_string; /* XXX was add_string */ + } + else + { + FREE (temp); + goto add_character; + } + + case '$': + if (expanded_something) + *expanded_something = 1; + local_expanded = 1; + + temp_has_dollar_at = 0; + pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0; + if (word->flags & W_NOSPLIT2) + pflags |= PF_NOSPLIT2; + if (word->flags & W_ASSIGNRHS) + pflags |= PF_ASSIGNRHS; + if (word->flags & W_COMPLETE) + pflags |= PF_COMPLETE; + + tword = param_expand (string, &sindex, quoted, expanded_something, + &temp_has_dollar_at, "ed_dollar_at, + &had_quoted_null, pflags); + has_dollar_at += temp_has_dollar_at; + split_on_spaces += (tword->flags & W_SPLITSPACE); + + if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal) + { + free (string); + free (istring); + return ((tword == &expand_wdesc_error) ? &expand_word_error + : &expand_word_fatal); + } + if (contains_dollar_at && has_dollar_at) + *contains_dollar_at = 1; + + if (tword && (tword->flags & W_HASQUOTEDNULL)) + had_quoted_null = 1; /* note for later */ + if (tword && (tword->flags & W_SAWQUOTEDNULL)) + had_quoted_null = 1; /* XXX */ + + temp = tword ? tword->word : (char *)NULL; + dispose_word_desc (tword); + + /* Kill quoted nulls; we will add them back at the end of + expand_word_internal if nothing else in the string */ + if (had_quoted_null && temp && QUOTED_NULL (temp)) + { + FREE (temp); + temp = (char *)NULL; + } + + goto add_string; + break; + + case '`': /* Backquoted command substitution. */ + { + t_index = sindex++; + + temp = string_extract (string, &sindex, "`", SX_REQMATCH); + /* The test of sindex against t_index is to allow bare instances of + ` to pass through, for backwards compatibility. */ + if (temp == &extract_string_error || temp == &extract_string_fatal) + { + if (sindex - 1 == t_index) + { + sindex = t_index; + goto add_character; + } + set_exit_status (EXECUTION_FAILURE); + report_error (_("bad substitution: no closing \"`\" in %s") , string+t_index); + free (string); + free (istring); + return ((temp == &extract_string_error) ? &expand_word_error + : &expand_word_fatal); + } + + if (expanded_something) + *expanded_something = 1; + local_expanded = 1; + + if (word->flags & W_NOCOMSUB) + /* sindex + 1 because string[sindex] == '`' */ + temp1 = substring (string, t_index, sindex + 1); + else + { + de_backslash (temp); + tword = command_substitute (temp, quoted, 0); + temp1 = tword ? tword->word : (char *)NULL; + if (tword) + dispose_word_desc (tword); + } + FREE (temp); + temp = temp1; + goto dollar_add_string; + } + + case '\\': + if (string[sindex + 1] == '\n') + { + sindex += 2; + continue; + } + + c = string[++sindex]; + + /* "However, the double-quote character ( '"' ) shall not be treated + specially within a here-document, except when the double-quote + appears within "$()", "``", or "${}"." */ + if ((quoted & Q_HERE_DOCUMENT) && (quoted & Q_DOLBRACE) && c == '"') + tflag = CBSDQUOTE; /* special case */ + else if (quoted & Q_HERE_DOCUMENT) + tflag = CBSHDOC; + else if (quoted & Q_DOUBLE_QUOTES) + tflag = CBSDQUOTE; + else + tflag = 0; + + /* From Posix discussion on austin-group list: Backslash escaping + a } in ${...} is removed. Issue 0000221 */ + if ((quoted & Q_DOLBRACE) && c == RBRACE) + { + SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size); + } + /* This is the fix for " $@\ " */ + else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0) && isexp == 0 && isifs (c)) + { + RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, + DEFAULT_ARRAY_SIZE); + istring[istring_index++] = CTLESC; + istring[istring_index++] = '\\'; + istring[istring_index] = '\0'; + + SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size); + } + else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && c == 0) + { + RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, + DEFAULT_ARRAY_SIZE); + istring[istring_index++] = CTLESC; + istring[istring_index++] = '\\'; + istring[istring_index] = '\0'; + break; + } + else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0)) + { + SCOPY_CHAR_I (twochars, '\\', c, string, sindex, string_size); + } + else if (c == 0) + { + c = CTLNUL; + sindex--; /* add_character: label increments sindex */ + goto add_character; + } + else + { + SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size); + } + + sindex++; +add_twochars: + /* BEFORE jumping here, we need to increment sindex if appropriate */ + RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, + DEFAULT_ARRAY_SIZE); + istring[istring_index++] = twochars[0]; + istring[istring_index++] = twochars[1]; + istring[istring_index] = '\0'; + + break; + + case '"': + if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) && ((quoted & Q_ARITH) == 0)) + goto add_character; + + t_index = ++sindex; + temp = string_extract_double_quoted (string, &sindex, (word->flags & W_COMPLETE) ? SX_COMPLETE : 0); + + /* If the quotes surrounded the entire string, then the + whole word was quoted. */ + quoted_state = (t_index == 1 && string[sindex] == '\0') + ? WHOLLY_QUOTED + : PARTIALLY_QUOTED; + + if (temp && *temp) + { + tword = alloc_word_desc (); + tword->word = temp; + + if (word->flags & W_ASSIGNARG) + tword->flags |= word->flags & (W_ASSIGNARG|W_ASSIGNRHS); /* affects $@ */ + if (word->flags & W_COMPLETE) + tword->flags |= W_COMPLETE; /* for command substitutions */ + if (word->flags & W_NOCOMSUB) + tword->flags |= W_NOCOMSUB; + if (word->flags & W_NOPROCSUB) + tword->flags |= W_NOPROCSUB; + + if (word->flags & W_ASSIGNRHS) + tword->flags |= W_ASSIGNRHS; + + temp = (char *)NULL; + + temp_has_dollar_at = 0; /* does this quoted (sub)string include $@? */ + /* Need to get W_HASQUOTEDNULL flag through this function. */ + list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &temp_has_dollar_at, (int *)NULL); + has_dollar_at += temp_has_dollar_at; + + if (list == &expand_word_error || list == &expand_word_fatal) + { + free (istring); + free (string); + /* expand_word_internal has already freed temp_word->word + for us because of the way it prints error messages. */ + tword->word = (char *)NULL; + dispose_word (tword); + return list; + } + + dispose_word (tword); + + /* "$@" (a double-quoted dollar-at) expands into nothing, + not even a NULL word, when there are no positional + parameters. Posix interp 888 says that other parts of the + word that expand to quoted nulls result in quoted nulls, so + we can't just throw the entire word away if we have "$@" + anywhere in it. We use had_quoted_null to keep track */ + if (list == 0 && temp_has_dollar_at) /* XXX - was has_dollar_at */ + { + quoted_dollar_at++; + break; + } + + /* If this list comes back with a quoted null from expansion, + we have either "$x" or "$@" with $1 == ''. In either case, + we need to make sure we add a quoted null argument and + disable the special handling that "$@" gets. */ + if (list && list->word && list->next == 0 && (list->word->flags & W_HASQUOTEDNULL)) + { + if (had_quoted_null && temp_has_dollar_at) + quoted_dollar_at++; + had_quoted_null = 1; /* XXX */ + } + + /* If we get "$@", we know we have expanded something, so we + need to remember it for the final split on $IFS. This is + a special case; it's the only case where a quoted string + can expand into more than one word. It's going to come back + from the above call to expand_word_internal as a list with + multiple words. */ + if (list) + dequote_list (list); + + if (temp_has_dollar_at) /* XXX - was has_dollar_at */ + { + quoted_dollar_at++; + if (contains_dollar_at) + *contains_dollar_at = 1; + if (expanded_something) + *expanded_something = 1; + local_expanded = 1; + } + } + else + { + /* What we have is "". This is a minor optimization. */ + FREE (temp); + list = (WORD_LIST *)NULL; + had_quoted_null = 1; /* note for later */ + } + + /* The code above *might* return a list (consider the case of "$@", + where it returns "$1", "$2", etc.). We can't throw away the + rest of the list, and we have to make sure each word gets added + as quoted. We test on tresult->next: if it is non-NULL, we + quote the whole list, save it to a string with string_list, and + add that string. We don't need to quote the results of this + (and it would be wrong, since that would quote the separators + as well), so we go directly to add_string. */ + if (list) + { + if (list->next) + { + /* Testing quoted_dollar_at makes sure that "$@" is + split correctly when $IFS does not contain a space. */ + temp = quoted_dollar_at + ? string_list_dollar_at (list, Q_DOUBLE_QUOTES, 0) + : string_list (quote_list (list)); + dispose_words (list); + goto add_string; + } + else + { + temp = savestring (list->word->word); + tflag = list->word->flags; + dispose_words (list); + + /* If the string is not a quoted null string, we want + to remove any embedded unquoted CTLNUL characters. + We do not want to turn quoted null strings back into + the empty string, though. We do this because we + want to remove any quoted nulls from expansions that + contain other characters. For example, if we have + x"$*"y or "x$*y" and there are no positional parameters, + the $* should expand into nothing. */ + /* We use the W_HASQUOTEDNULL flag to differentiate the + cases: a quoted null character as above and when + CTLNUL is contained in the (non-null) expansion + of some variable. We use the had_quoted_null flag to + pass the value through this function to its caller. */ + if ((tflag & W_HASQUOTEDNULL) && QUOTED_NULL (temp) == 0) + remove_quoted_nulls (temp); /* XXX */ + } + } + else + temp = (char *)NULL; + + if (temp == 0 && quoted_state == PARTIALLY_QUOTED) + had_quoted_null = 1; /* note for later */ + + /* We do not want to add quoted nulls to strings that are only + partially quoted; we can throw them away. The exception to + this is when we are going to be performing word splitting, + since we have to preserve a null argument if the next character + will cause word splitting. */ + if (temp == 0 && quoted_state == PARTIALLY_QUOTED && quoted == 0 && (word->flags & (W_NOSPLIT|W_EXPANDRHS|W_ASSIGNRHS)) == W_EXPANDRHS) + { + c = CTLNUL; + sindex--; + had_quoted_null = 1; + goto add_character; + } + if (temp == 0 && quoted_state == PARTIALLY_QUOTED && (word->flags & (W_NOSPLIT|W_NOSPLIT2))) + continue; + + add_quoted_string: + + if (temp) + { + temp1 = temp; + temp = quote_string (temp); + free (temp1); + goto add_string; + } + else + { + /* Add NULL arg. */ + c = CTLNUL; + sindex--; /* add_character: label increments sindex */ + had_quoted_null = 1; /* note for later */ + goto add_character; + } + + /* break; */ + + case '\'': + if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + goto add_character; + + t_index = ++sindex; + temp = string_extract_single_quoted (string, &sindex); + + /* If the entire STRING was surrounded by single quotes, + then the string is wholly quoted. */ + quoted_state = (t_index == 1 && string[sindex] == '\0') + ? WHOLLY_QUOTED + : PARTIALLY_QUOTED; + + /* If all we had was '', it is a null expansion. */ + if (*temp == '\0') + { + free (temp); + temp = (char *)NULL; + } + else + remove_quoted_escapes (temp); /* ??? */ + + if (temp == 0 && quoted_state == PARTIALLY_QUOTED) + had_quoted_null = 1; /* note for later */ + + /* We do not want to add quoted nulls to strings that are only + partially quoted; such nulls are discarded. See above for the + exception, which is when the string is going to be split. + Posix interp 888/1129 */ + if (temp == 0 && quoted_state == PARTIALLY_QUOTED && quoted == 0 && (word->flags & (W_NOSPLIT|W_EXPANDRHS|W_ASSIGNRHS)) == W_EXPANDRHS) + { + c = CTLNUL; + sindex--; + goto add_character; + } + + if (temp == 0 && (quoted_state == PARTIALLY_QUOTED) && (word->flags & (W_NOSPLIT|W_NOSPLIT2))) + continue; + + /* If we have a quoted null expansion, add a quoted NULL to istring. */ + if (temp == 0) + { + c = CTLNUL; + sindex--; /* add_character: label increments sindex */ + goto add_character; + } + else + goto add_quoted_string; + + /* break; */ + + case ' ': + /* If we are in a context where the word is not going to be split, but + we need to account for $@ and $* producing one word for each + positional parameter, add quoted spaces so the spaces in the + expansion of "$@", if any, behave correctly. We still may need to + split if we are expanding the rhs of a word expansion. */ + if (ifs_is_null || split_on_spaces || ((word->flags & (W_NOSPLIT|W_NOSPLIT2|W_ASSIGNRHS)) && (word->flags & W_EXPANDRHS) == 0)) + { + if (string[sindex]) + sindex++; + twochars[0] = CTLESC; + twochars[1] = c; + goto add_twochars; + } + /* FALLTHROUGH */ + + default: + /* This is the fix for " $@ " */ +add_ifs_character: + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (isexp == 0 && isifs (c) && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0)) + { + if ((quoted&(Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0) + has_quoted_ifs++; +add_quoted_character: + if (string[sindex]) /* from old goto dollar_add_string */ + sindex++; + if (c == 0) + { + c = CTLNUL; + goto add_character; + } + else + { +#if HANDLE_MULTIBYTE + /* XXX - should make sure that c is actually multibyte, + otherwise we can use the twochars branch */ + if (mb_cur_max > 1) + sindex--; + + if (mb_cur_max > 1) + { + SADD_MBQCHAR_BODY(temp, string, sindex, string_size); + } + else +#endif + { + twochars[0] = CTLESC; + twochars[1] = c; + goto add_twochars; + } + } + } + + SADD_MBCHAR (temp, string, sindex, string_size); + +add_character: + RESIZE_MALLOCED_BUFFER (istring, istring_index, 1, istring_size, + DEFAULT_ARRAY_SIZE); + istring[istring_index++] = c; + istring[istring_index] = '\0'; + + /* Next character. */ + sindex++; + } + } + +finished_with_string: + /* OK, we're ready to return. If we have a quoted string, and + quoted_dollar_at is not set, we do no splitting at all; otherwise + we split on ' '. The routines that call this will handle what to + do if nothing has been expanded. */ + + /* Partially and wholly quoted strings which expand to the empty + string are retained as an empty arguments. Unquoted strings + which expand to the empty string are discarded. The single + exception is the case of expanding "$@" when there are no + positional parameters. In that case, we discard the expansion. */ + + /* Because of how the code that handles "" and '' in partially + quoted strings works, we need to make ISTRING into a QUOTED_NULL + if we saw quoting characters, but the expansion was empty. + "" and '' are tossed away before we get to this point when + processing partially quoted strings. This makes "" and $xxx"" + equivalent when xxx is unset. We also look to see whether we + saw a quoted null from a ${} expansion and add one back if we + need to. */ + + /* If we expand to nothing and there were no single or double quotes + in the word, we throw it away. Otherwise, we return a NULL word. + The single exception is for $@ surrounded by double quotes when + there are no positional parameters. In that case, we also throw + the word away. */ + + if (*istring == '\0') + { + if (quoted_dollar_at == 0 && (had_quoted_null || quoted_state == PARTIALLY_QUOTED)) + { + istring[0] = CTLNUL; + istring[1] = '\0'; + tword = alloc_word_desc (); + tword->word = istring; + istring = 0; /* avoid later free() */ + tword->flags |= W_HASQUOTEDNULL; /* XXX */ + list = make_word_list (tword, (WORD_LIST *)NULL); + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + tword->flags |= W_QUOTED; + } + /* According to sh, ksh, and Posix.2, if a word expands into nothing + and a double-quoted "$@" appears anywhere in it, then the entire + word is removed. */ + /* XXX - exception appears to be that quoted null strings result in + null arguments */ + else if (quoted_state == UNQUOTED || quoted_dollar_at) + list = (WORD_LIST *)NULL; + else + list = (WORD_LIST *)NULL; + } + else if (word->flags & W_NOSPLIT) + { + tword = alloc_word_desc (); + tword->word = istring; + if (had_quoted_null && QUOTED_NULL (istring)) + tword->flags |= W_HASQUOTEDNULL; + istring = 0; /* avoid later free() */ + if (word->flags & W_ASSIGNMENT) + tword->flags |= W_ASSIGNMENT; /* XXX */ + if (word->flags & W_COMPASSIGN) + tword->flags |= W_COMPASSIGN; /* XXX */ + if (word->flags & W_NOGLOB) + tword->flags |= W_NOGLOB; /* XXX */ + if (word->flags & W_NOBRACE) + tword->flags |= W_NOBRACE; /* XXX */ + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + tword->flags |= W_QUOTED; + list = make_word_list (tword, (WORD_LIST *)NULL); + } + else if (word->flags & W_ASSIGNRHS) + { + list = list_string (istring, "", quoted); + tword = list->word; + if (had_quoted_null && QUOTED_NULL (istring)) + tword->flags |= W_HASQUOTEDNULL; + free (list); + free (istring); + istring = 0; /* avoid later free() */ + goto set_word_flags; + } + else + { + char *ifs_chars; + + ifs_chars = (quoted_dollar_at || has_dollar_at) ? ifs_value : (char *)NULL; + + /* If we have $@, we need to split the results no matter what. If + IFS is unset or NULL, string_list_dollar_at has separated the + positional parameters with a space, so we split on space (we have + set ifs_chars to " \t\n" above if ifs is unset). If IFS is set, + string_list_dollar_at has separated the positional parameters + with the first character of $IFS, so we split on $IFS. If + SPLIT_ON_SPACES is set, we expanded $* (unquoted) with IFS either + unset or null, and we want to make sure that we split on spaces + regardless of what else has happened to IFS since the expansion, + or we expanded "$@" with IFS null and we need to split the positional + parameters into separate words. */ + if (split_on_spaces) + { + /* If IFS is not set, and the word is not quoted, we want to split + the individual words on $' \t\n'. We rely on previous steps to + quote the portions of the word that should not be split */ + if (ifs_is_set == 0) + list = list_string (istring, " \t\n", 1); /* XXX quoted == 1? */ + else + list = list_string (istring, " ", 1); /* XXX quoted == 1? */ + } + + /* If we have $@ (has_dollar_at != 0) and we are in a context where we + don't want to split the result (W_NOSPLIT2), and we are not quoted, + we have already separated the arguments with the first character of + $IFS. In this case, we want to return a list with a single word + with the separator possibly replaced with a space (it's what other + shells seem to do). + quoted_dollar_at is internal to this function and is set if we are + passed an argument that is unquoted (quoted == 0) but we encounter a + double-quoted $@ while expanding it. */ + else if (has_dollar_at && quoted_dollar_at == 0 && ifs_chars && quoted == 0 && (word->flags & W_NOSPLIT2)) + { + tword = alloc_word_desc (); + /* Only split and rejoin if we have to */ + if (*ifs_chars && *ifs_chars != ' ') + { + /* list_string dequotes CTLESCs in the string it's passed, so we + need it to get the space separation right if space isn't the + first character in IFS (but is present) and to remove the + quoting we added back in param_expand(). */ + list = list_string (istring, *ifs_chars ? ifs_chars : " ", 1); + /* This isn't exactly right in the case where we're expanding + the RHS of an expansion like ${var-$@} where IFS=: (for + example). The W_NOSPLIT2 means we do the separation with :; + the list_string removes the quotes and breaks the string into + a list, and the string_list rejoins it on spaces. When we + return, we expect to be able to split the results, but the + space separation means the right split doesn't happen. */ + tword->word = string_list (list); + } + else + tword->word = istring; + if (had_quoted_null && QUOTED_NULL (istring)) + tword->flags |= W_HASQUOTEDNULL; /* XXX */ + if (tword->word != istring) + free (istring); + istring = 0; /* avoid later free() */ + goto set_word_flags; + } + else if (has_dollar_at && ifs_chars) + list = list_string (istring, *ifs_chars ? ifs_chars : " ", 1); + else + { + tword = alloc_word_desc (); + if (expanded_something && *expanded_something == 0 && has_quoted_ifs) + tword->word = remove_quoted_ifs (istring); + else + tword->word = istring; + if (had_quoted_null && QUOTED_NULL (istring)) /* should check for more than one */ + tword->flags |= W_HASQUOTEDNULL; /* XXX */ + else if (had_quoted_null) + tword->flags |= W_SAWQUOTEDNULL; /* XXX */ + if (tword->word != istring) + free (istring); + istring = 0; /* avoid later free() */ +set_word_flags: + if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || (quoted_state == WHOLLY_QUOTED)) + tword->flags |= W_QUOTED; + if (word->flags & W_ASSIGNMENT) + tword->flags |= W_ASSIGNMENT; + if (word->flags & W_COMPASSIGN) + tword->flags |= W_COMPASSIGN; + if (word->flags & W_NOGLOB) + tword->flags |= W_NOGLOB; + if (word->flags & W_NOBRACE) + tword->flags |= W_NOBRACE; + list = make_word_list (tword, (WORD_LIST *)NULL); + } + } + + free (istring); + return (list); +} + +/* **************************************************************** */ +/* */ +/* Functions for Quote Removal */ +/* */ +/* **************************************************************** */ + +/* Perform quote removal on STRING. If QUOTED > 0, assume we are obeying the + backslash quoting rules for within double quotes or a here document. */ +char * +string_quote_removal (string, quoted) + char *string; + int quoted; +{ + size_t slen; + char *r, *result_string, *temp, *send; + int sindex, tindex, dquote; + unsigned char c; + DECLARE_MBSTATE; + + /* The result can be no longer than the original string. */ + slen = strlen (string); + send = string + slen; + + r = result_string = (char *)xmalloc (slen + 1); + + for (dquote = sindex = 0; c = string[sindex];) + { + switch (c) + { + case '\\': + c = string[++sindex]; + if (c == 0) + { + *r++ = '\\'; + break; + } + if (((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote) && (sh_syntaxtab[c] & CBSDQUOTE) == 0) + *r++ = '\\'; + /* FALLTHROUGH */ + + default: + SCOPY_CHAR_M (r, string, send, sindex); + break; + + case '\'': + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote) + { + *r++ = c; + sindex++; + break; + } + tindex = sindex + 1; + temp = string_extract_single_quoted (string, &tindex); + if (temp) + { + strcpy (r, temp); + r += strlen (r); + free (temp); + } + sindex = tindex; + break; + + case '"': + dquote = 1 - dquote; + sindex++; + break; + } + } + *r = '\0'; + return (result_string); +} + +#if 0 +/* UNUSED */ +/* Perform quote removal on word WORD. This allocates and returns a new + WORD_DESC *. */ +WORD_DESC * +word_quote_removal (word, quoted) + WORD_DESC *word; + int quoted; +{ + WORD_DESC *w; + char *t; + + t = string_quote_removal (word->word, quoted); + w = alloc_word_desc (); + w->word = t ? t : savestring (""); + return (w); +} + +/* Perform quote removal on all words in LIST. If QUOTED is non-zero, + the members of the list are treated as if they are surrounded by + double quotes. Return a new list, or NULL if LIST is NULL. */ +WORD_LIST * +word_list_quote_removal (list, quoted) + WORD_LIST *list; + int quoted; +{ + WORD_LIST *result, *t, *tresult, *e; + + for (t = list, result = (WORD_LIST *)NULL; t; t = t->next) + { + tresult = make_word_list (word_quote_removal (t->word, quoted), (WORD_LIST *)NULL); +#if 0 + result = (WORD_LIST *) list_append (result, tresult); +#else + if (result == 0) + result = e = tresult; + else + { + e->next = tresult; + while (e->next) + e = e->next; + } +#endif + } + return (result); +} +#endif + +/******************************************* + * * + * Functions to perform word splitting * + * * + *******************************************/ + +void +setifs (v) + SHELL_VAR *v; +{ + char *t; + unsigned char uc; + + ifs_var = v; + ifs_value = (v && value_cell (v)) ? value_cell (v) : " \t\n"; + + ifs_is_set = ifs_var != 0; + ifs_is_null = ifs_is_set && (*ifs_value == 0); + + /* Should really merge ifs_cmap with sh_syntaxtab. XXX - doesn't yet + handle multibyte chars in IFS */ + memset (ifs_cmap, '\0', sizeof (ifs_cmap)); + for (t = ifs_value ; t && *t; t++) + { + uc = *t; + ifs_cmap[uc] = 1; + } + +#if defined (HANDLE_MULTIBYTE) + if (ifs_value == 0) + { + ifs_firstc[0] = '\0'; /* XXX - ? */ + ifs_firstc_len = 1; + } + else + { + if (locale_utf8locale && UTF8_SINGLEBYTE (*ifs_value)) + ifs_firstc_len = (*ifs_value != 0) ? 1 : 0; + else + { + size_t ifs_len; + ifs_len = strnlen (ifs_value, MB_CUR_MAX); + ifs_firstc_len = MBLEN (ifs_value, ifs_len); + } + if (ifs_firstc_len == 1 || ifs_firstc_len == 0 || MB_INVALIDCH (ifs_firstc_len)) + { + ifs_firstc[0] = ifs_value[0]; + ifs_firstc[1] = '\0'; + ifs_firstc_len = 1; + } + else + memcpy (ifs_firstc, ifs_value, ifs_firstc_len); + } +#else + ifs_firstc = ifs_value ? *ifs_value : 0; +#endif +} + +char * +getifs () +{ + return ifs_value; +} + +/* This splits a single word into a WORD LIST on $IFS, but only if the word + is not quoted. list_string () performs quote removal for us, even if we + don't do any splitting. */ +WORD_LIST * +word_split (w, ifs_chars) + WORD_DESC *w; + char *ifs_chars; +{ + WORD_LIST *result; + + if (w) + { + char *xifs; + + xifs = ((w->flags & W_QUOTED) || ifs_chars == 0) ? "" : ifs_chars; + result = list_string (w->word, xifs, w->flags & W_QUOTED); + } + else + result = (WORD_LIST *)NULL; + + return (result); +} + +/* Perform word splitting on LIST and return the RESULT. It is possible + to return (WORD_LIST *)NULL. */ +static WORD_LIST * +word_list_split (list) + WORD_LIST *list; +{ + WORD_LIST *result, *t, *tresult, *e; + WORD_DESC *w; + + for (t = list, result = (WORD_LIST *)NULL; t; t = t->next) + { + tresult = word_split (t->word, ifs_value); + /* POSIX 2.6: "If the complete expansion appropriate for a word results + in an empty field, that empty field shall be deleted from the list + of fields that form the completely expanded command, unless the + original word contained single-quote or double-quote characters." + This is where we handle these words that contain quoted null strings + and other characters that expand to nothing after word splitting. */ + if (tresult == 0 && t->word && (t->word->flags & W_SAWQUOTEDNULL)) /* XXX */ + { + w = alloc_word_desc (); + w->word = (char *)xmalloc (1); + w->word[0] = '\0'; + tresult = make_word_list (w, (WORD_LIST *)NULL); + } + if (result == 0) + result = e = tresult; + else + { + e->next = tresult; + while (e->next) + e = e->next; + } + } + return (result); +} + +/************************************************** + * * + * Functions to expand an entire WORD_LIST * + * * + **************************************************/ + +/* Do any word-expansion-specific cleanup and jump to top_level */ +static void +exp_jump_to_top_level (v) + int v; +{ + set_pipestatus_from_exit (last_command_exit_value); + + /* Cleanup code goes here. */ + expand_no_split_dollar_star = 0; /* XXX */ + if (expanding_redir) + undo_partial_redirects (); + expanding_redir = 0; + assigning_in_environment = 0; + + if (parse_and_execute_level == 0) + top_level_cleanup (); /* from sig.c */ + + jump_to_top_level (v); +} + +/* Put NLIST (which is a WORD_LIST * of only one element) at the front of + ELIST, and set ELIST to the new list. */ +#define PREPEND_LIST(nlist, elist) \ + do { nlist->next = elist; elist = nlist; } while (0) + +/* Separate out any initial variable assignments from TLIST. If set -k has + been executed, remove all assignment statements from TLIST. Initial + variable assignments and other environment assignments are placed + on SUBST_ASSIGN_VARLIST. */ +static WORD_LIST * +separate_out_assignments (tlist) + WORD_LIST *tlist; +{ + register WORD_LIST *vp, *lp; + + if (tlist == 0) + return ((WORD_LIST *)NULL); + + if (subst_assign_varlist) + dispose_words (subst_assign_varlist); /* Clean up after previous error */ + + subst_assign_varlist = (WORD_LIST *)NULL; + vp = lp = tlist; + + /* Separate out variable assignments at the start of the command. + Loop invariant: vp->next == lp + Loop postcondition: + lp = list of words left after assignment statements skipped + tlist = original list of words + */ + while (lp && (lp->word->flags & W_ASSIGNMENT)) + { + vp = lp; + lp = lp->next; + } + + /* If lp != tlist, we have some initial assignment statements. + We make SUBST_ASSIGN_VARLIST point to the list of assignment + words and TLIST point to the remaining words. */ + if (lp != tlist) + { + subst_assign_varlist = tlist; + /* ASSERT(vp->next == lp); */ + vp->next = (WORD_LIST *)NULL; /* terminate variable list */ + tlist = lp; /* remainder of word list */ + } + + /* vp == end of variable list */ + /* tlist == remainder of original word list without variable assignments */ + if (!tlist) + /* All the words in tlist were assignment statements */ + return ((WORD_LIST *)NULL); + + /* ASSERT(tlist != NULL); */ + /* ASSERT((tlist->word->flags & W_ASSIGNMENT) == 0); */ + + /* If the -k option is in effect, we need to go through the remaining + words, separate out the assignment words, and place them on + SUBST_ASSIGN_VARLIST. */ + if (place_keywords_in_env) + { + WORD_LIST *tp; /* tp == running pointer into tlist */ + + tp = tlist; + lp = tlist->next; + + /* Loop Invariant: tp->next == lp */ + /* Loop postcondition: tlist == word list without assignment statements */ + while (lp) + { + if (lp->word->flags & W_ASSIGNMENT) + { + /* Found an assignment statement, add this word to end of + subst_assign_varlist (vp). */ + if (!subst_assign_varlist) + subst_assign_varlist = vp = lp; + else + { + vp->next = lp; + vp = lp; + } + + /* Remove the word pointed to by LP from TLIST. */ + tp->next = lp->next; + /* ASSERT(vp == lp); */ + lp->next = (WORD_LIST *)NULL; + lp = tp->next; + } + else + { + tp = lp; + lp = lp->next; + } + } + } + return (tlist); +} + +#define WEXP_VARASSIGN 0x001 +#define WEXP_BRACEEXP 0x002 +#define WEXP_TILDEEXP 0x004 +#define WEXP_PARAMEXP 0x008 +#define WEXP_PATHEXP 0x010 + +/* All of the expansions, including variable assignments at the start of + the list. */ +#define WEXP_ALL (WEXP_VARASSIGN|WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP|WEXP_PATHEXP) + +/* All of the expansions except variable assignments at the start of + the list. */ +#define WEXP_NOVARS (WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP|WEXP_PATHEXP) + +/* All of the `shell expansions': brace expansion, tilde expansion, parameter + expansion, command substitution, arithmetic expansion, word splitting, and + quote removal. */ +#define WEXP_SHELLEXP (WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP) + +/* Take the list of words in LIST and do the various substitutions. Return + a new list of words which is the expanded list, and without things like + variable assignments. */ + +WORD_LIST * +expand_words (list) + WORD_LIST *list; +{ + return (expand_word_list_internal (list, WEXP_ALL)); +} + +/* Same as expand_words (), but doesn't hack variable or environment + variables. */ +WORD_LIST * +expand_words_no_vars (list) + WORD_LIST *list; +{ + return (expand_word_list_internal (list, WEXP_NOVARS)); +} + +WORD_LIST * +expand_words_shellexp (list) + WORD_LIST *list; +{ + return (expand_word_list_internal (list, WEXP_SHELLEXP)); +} + +static WORD_LIST * +glob_expand_word_list (tlist, eflags) + WORD_LIST *tlist; + int eflags; +{ + char **glob_array, *temp_string; + register int glob_index; + WORD_LIST *glob_list, *output_list, *disposables, *next; + WORD_DESC *tword; + int x; + + output_list = disposables = (WORD_LIST *)NULL; + glob_array = (char **)NULL; + while (tlist) + { + /* For each word, either globbing is attempted or the word is + added to orig_list. If globbing succeeds, the results are + added to orig_list and the word (tlist) is added to the list + of disposable words. If globbing fails and failed glob + expansions are left unchanged (the shell default), the + original word is added to orig_list. If globbing fails and + failed glob expansions are removed, the original word is + added to the list of disposable words. orig_list ends up + in reverse order and requires a call to REVERSE_LIST to + be set right. After all words are examined, the disposable + words are freed. */ + next = tlist->next; + + /* If the word isn't an assignment and contains an unquoted + pattern matching character, then glob it. */ + if ((tlist->word->flags & W_NOGLOB) == 0 && + unquoted_glob_pattern_p (tlist->word->word)) + { + glob_array = shell_glob_filename (tlist->word->word, QGLOB_CTLESC); /* XXX */ + + /* Handle error cases. + I don't think we should report errors like "No such file + or directory". However, I would like to report errors + like "Read failed". */ + + if (glob_array == 0 || GLOB_FAILED (glob_array)) + { + glob_array = (char **)xmalloc (sizeof (char *)); + glob_array[0] = (char *)NULL; + } + + /* Dequote the current word in case we have to use it. */ + if (glob_array[0] == NULL) + { + temp_string = dequote_string (tlist->word->word); + free (tlist->word->word); + tlist->word->word = temp_string; + } + + /* Make the array into a word list. */ + glob_list = (WORD_LIST *)NULL; + for (glob_index = 0; glob_array[glob_index]; glob_index++) + { + tword = make_bare_word (glob_array[glob_index]); + glob_list = make_word_list (tword, glob_list); + } + + if (glob_list) + { + output_list = (WORD_LIST *)list_append (glob_list, output_list); + PREPEND_LIST (tlist, disposables); + } + else if (fail_glob_expansion != 0) + { + last_command_exit_value = EXECUTION_FAILURE; + report_error (_("no match: %s"), tlist->word->word); + exp_jump_to_top_level (DISCARD); + } + else if (allow_null_glob_expansion == 0) + { + /* Failed glob expressions are left unchanged. */ + PREPEND_LIST (tlist, output_list); + } + else + { + /* Failed glob expressions are removed. */ + PREPEND_LIST (tlist, disposables); + } + } + else + { + /* Dequote the string. */ + temp_string = dequote_string (tlist->word->word); + free (tlist->word->word); + tlist->word->word = temp_string; + PREPEND_LIST (tlist, output_list); + } + + strvec_dispose (glob_array); + glob_array = (char **)NULL; + + tlist = next; + } + + if (disposables) + dispose_words (disposables); + + if (output_list) + output_list = REVERSE_LIST (output_list, WORD_LIST *); + + return (output_list); +} + +#if defined (BRACE_EXPANSION) +static WORD_LIST * +brace_expand_word_list (tlist, eflags) + WORD_LIST *tlist; + int eflags; +{ + register char **expansions; + char *temp_string; + WORD_LIST *disposables, *output_list, *next; + WORD_DESC *w; + int eindex; + + for (disposables = output_list = (WORD_LIST *)NULL; tlist; tlist = next) + { + next = tlist->next; + + if (tlist->word->flags & W_NOBRACE) + { +/*itrace("brace_expand_word_list: %s: W_NOBRACE", tlist->word->word);*/ + PREPEND_LIST (tlist, output_list); + continue; + } + + if ((tlist->word->flags & (W_COMPASSIGN|W_ASSIGNARG)) == (W_COMPASSIGN|W_ASSIGNARG)) + { +/*itrace("brace_expand_word_list: %s: W_COMPASSIGN|W_ASSIGNARG", tlist->word->word);*/ + PREPEND_LIST (tlist, output_list); + continue; + } + + /* Only do brace expansion if the word has a brace character. If + not, just add the word list element to BRACES and continue. In + the common case, at least when running shell scripts, this will + degenerate to a bunch of calls to `mbschr', and then what is + basically a reversal of TLIST into BRACES, which is corrected + by a call to REVERSE_LIST () on BRACES when the end of TLIST + is reached. */ + if (mbschr (tlist->word->word, LBRACE)) + { + expansions = brace_expand (tlist->word->word); + + for (eindex = 0; temp_string = expansions[eindex]; eindex++) + { + w = alloc_word_desc (); + w->word = temp_string; + + /* If brace expansion didn't change the word, preserve + the flags. We may want to preserve the flags + unconditionally someday -- XXX */ + if (STREQ (temp_string, tlist->word->word)) + w->flags = tlist->word->flags; + else + w = make_word_flags (w, temp_string); + + output_list = make_word_list (w, output_list); + } + free (expansions); + + /* Add TLIST to the list of words to be freed after brace + expansion has been performed. */ + PREPEND_LIST (tlist, disposables); + } + else + PREPEND_LIST (tlist, output_list); + } + + if (disposables) + dispose_words (disposables); + + if (output_list) + output_list = REVERSE_LIST (output_list, WORD_LIST *); + + return (output_list); +} +#endif + +#if defined (ARRAY_VARS) +/* Take WORD, a compound array assignment, and internally run (for example), + 'declare -A w', where W is the variable name portion of WORD. OPTION is + the list of options to supply to `declare'. CMD is the declaration command + we are expanding right now; it's unused currently. */ +static int +make_internal_declare (word, option, cmd) + char *word; + char *option; + char *cmd; +{ + int t, r; + WORD_LIST *wl; + WORD_DESC *w; + + w = make_word (word); + + t = assignment (w->word, 0); + if (w->word[t] == '=') + { + w->word[t] = '\0'; + if (w->word[t - 1] == '+') /* cut off any append op */ + w->word[t - 1] = '\0'; + } + + wl = make_word_list (w, (WORD_LIST *)NULL); + wl = make_word_list (make_word (option), wl); + + r = declare_builtin (wl); + + dispose_words (wl); + return r; +} + +/* Expand VALUE in NAME[+]=( VALUE ) to a list of words. FLAGS is 1 if NAME + is an associative array. + + If we are processing an indexed array, expand_compound_array_assignment + will expand all the individual words and quote_compound_array_list will + single-quote them. If we are processing an associative array, we use + parse_string_to_word_list to split VALUE into a list of words instead of + faking up a shell variable and calling expand_compound_array_assignment. + expand_and_quote_assoc_word expands and single-quotes each word in VALUE + together so we don't have problems finding the end of the subscript when + quoting it. + + Words in VALUE can be individual words, which are expanded and single-quoted, + or words of the form [IND]=VALUE, which end up as explained below, as + ['expanded-ind']='expanded-value'. */ + +static WORD_LIST * +expand_oneword (value, flags) + char *value; + int flags; +{ + WORD_LIST *l, *nl; + char *t; + int kvpair; + + if (flags == 0) + { + /* Indexed array */ + l = expand_compound_array_assignment ((SHELL_VAR *)NULL, value, flags); + /* Now we quote the results of the expansion above to prevent double + expansion. */ + quote_compound_array_list (l, flags); + return l; + } + else + { + /* Associative array */ + l = parse_string_to_word_list (value, 1, "array assign"); +#if ASSOC_KVPAIR_ASSIGNMENT + kvpair = kvpair_assignment_p (l); +#endif + + /* For associative arrays, with their arbitrary subscripts, we have to + expand and quote in one step so we don't have to search for the + closing right bracket more than once. */ + for (nl = l; nl; nl = nl->next) + { +#if ASSOC_KVPAIR_ASSIGNMENT + if (kvpair) + /* keys and values undergo the same set of expansions */ + t = expand_and_quote_kvpair_word (nl->word->word); + else +#endif + if ((nl->word->flags & W_ASSIGNMENT) == 0) + t = sh_single_quote (nl->word->word ? nl->word->word : ""); + else + t = expand_and_quote_assoc_word (nl->word->word, flags); + free (nl->word->word); + nl->word->word = t; + } + return l; + } +} + +/* Expand a single compound assignment argument to a declaration builtin. + This word takes the form NAME[+]=( VALUE ). The NAME[+]= is passed through + unchanged. The VALUE is expanded and each word in the result is single- + quoted. Words of the form [key]=value end up as + ['expanded-key']='expanded-value'. Associative arrays have special + handling, see expand_oneword() above. The return value is + NAME[+]=( expanded-and-quoted-VALUE ). */ +static void +expand_compound_assignment_word (tlist, flags) + WORD_LIST *tlist; + int flags; +{ + WORD_LIST *l; + int wlen, oind, t; + char *value, *temp; + +/*itrace("expand_compound_assignment_word: original word = -%s-", tlist->word->word);*/ + t = assignment (tlist->word->word, 0); + + /* value doesn't have the open and close parens */ + oind = 1; + value = extract_array_assignment_list (tlist->word->word + t + 1, &oind); + /* This performs one round of expansion on the index/key and value and + single-quotes each word in the result. */ + l = expand_oneword (value, flags); + free (value); + + value = string_list (l); + wlen = STRLEN (value); + + /* Now, let's rebuild the string */ + temp = xmalloc (t + 3 + wlen + 1); /* name[+]=(value) */ + memcpy (temp, tlist->word->word, ++t); + temp[t++] = '('; + if (value) + memcpy (temp + t, value, wlen); + t += wlen; + temp[t++] = ')'; + temp[t] = '\0'; +/*itrace("expand_compound_assignment_word: reconstructed word = -%s-", temp);*/ + + free (tlist->word->word); + tlist->word->word = temp; + + free (value); +} + +/* Expand and process an argument to a declaration command. We have already + set flags in TLIST->word->flags depending on the declaration command + (declare, local, etc.) and the options supplied to it (-a, -A, etc.). + TLIST->word->word is of the form NAME[+]=( VALUE ). + + This does several things, all using pieces of other functions to get the + evaluation sequence right. It's called for compound array assignments with + the W_ASSIGNMENT flag set (basically, valid identifier names on the lhs). + It parses out which flags need to be set for declare to create the variable + correctly, then calls declare internally (make_internal_declare) to make + sure the variable exists with the correct attributes. Before the variable + is created, it calls expand_compound_assignment_word to expand VALUE to a + list of words, appropriately quoted for further evaluation. This preserves + the semantics of word-expansion-before-calling-builtins. Finally, it calls + do_word_assignment to perform the expansion and assignment with the same + expansion semantics as a standalone assignment statement (no word splitting, + etc.) even though the word is single-quoted so all that needs to happen is + quote removal. */ +static WORD_LIST * +expand_declaration_argument (tlist, wcmd) + WORD_LIST *tlist, *wcmd; +{ + char opts[16], omap[128]; + int t, opti, oind, skip, inheriting; + WORD_LIST *l; + + inheriting = localvar_inherit; + opti = 0; + if (tlist->word->flags & (W_ASSIGNASSOC|W_ASSNGLOBAL|W_CHKLOCAL|W_ASSIGNARRAY)) + opts[opti++] = '-'; + + if ((tlist->word->flags & (W_ASSIGNASSOC|W_ASSNGLOBAL)) == (W_ASSIGNASSOC|W_ASSNGLOBAL)) + { + opts[opti++] = 'g'; + opts[opti++] = 'A'; + } + else if (tlist->word->flags & W_ASSIGNASSOC) + { + opts[opti++] = 'A'; + } + else if ((tlist->word->flags & (W_ASSIGNARRAY|W_ASSNGLOBAL)) == (W_ASSIGNARRAY|W_ASSNGLOBAL)) + { + opts[opti++] = 'g'; + opts[opti++] = 'a'; + } + else if (tlist->word->flags & W_ASSIGNARRAY) + { + opts[opti++] = 'a'; + } + else if (tlist->word->flags & W_ASSNGLOBAL) + opts[opti++] = 'g'; + + if (tlist->word->flags & W_CHKLOCAL) + opts[opti++] = 'G'; + + /* If we have special handling note the integer attribute and others + that transform the value upon assignment. What we do is take all + of the option arguments and scan through them looking for options + that cause such transformations, and add them to the `opts' array. */ + + memset (omap, '\0', sizeof (omap)); + for (l = wcmd->next; l != tlist; l = l->next) + { + if (l->word->word[0] != '-') + break; /* non-option argument */ + if (l->word->word[0] == '-' && l->word->word[1] == '-' && l->word->word[2] == 0) + break; /* -- signals end of options */ + for (oind = 1; l->word->word[oind]; oind++) + switch (l->word->word[oind]) + { + case 'I': + inheriting = 1; + case 'i': + case 'l': + case 'u': + case 'c': + omap[l->word->word[oind]] = 1; + if (opti == 0) + opts[opti++] = '-'; + break; + default: + break; + } + } + + for (oind = 0; oind < sizeof (omap); oind++) + if (omap[oind]) + opts[opti++] = oind; + + /* If there are no -a/-A options, but we have a compound assignment, + we have a choice: we can set opts[0]='-', opts[1]='a', since the + default is to create an indexed array, and call + make_internal_declare with that, or we can just skip the -a and let + declare_builtin deal with it. Once we're here, we're better set + up for the latter, since we don't want to deal with looking up + any existing variable here -- better to let declare_builtin do it. + We need the variable created, though, especially if it's local, so + we get the scoping right before we call do_word_assignment. + To ensure that make_local_declare gets called, we add `--' if there + aren't any options. */ + if ((tlist->word->flags & (W_ASSIGNASSOC|W_ASSIGNARRAY)) == 0) + { + if (opti == 0) + { + opts[opti++] = '-'; + opts[opti++] = '-'; + } + } + opts[opti] = '\0'; + + /* This isn't perfect, but it's a start. Improvements later. We expand + tlist->word->word and single-quote the results to avoid multiple + expansions by, say, do_assignment_internal(). We have to weigh the + cost of reconstructing the compound assignment string with its single + quoting and letting the declare builtin handle it. The single quotes + will prevent any unwanted additional expansion or word splitting. */ + expand_compound_assignment_word (tlist, (tlist->word->flags & W_ASSIGNASSOC) ? 1 : 0); + + skip = 0; + if (opti > 0) + { + t = make_internal_declare (tlist->word->word, opts, wcmd ? wcmd->word->word : (char *)0); + if (t != EXECUTION_SUCCESS) + { + last_command_exit_value = t; + if (tlist->word->flags & W_FORCELOCAL) /* non-fatal error */ + skip = 1; + else + exp_jump_to_top_level (DISCARD); + } + } + + if (skip == 0) + { + t = do_word_assignment (tlist->word, 0); + if (t == 0) + { + last_command_exit_value = EXECUTION_FAILURE; + exp_jump_to_top_level (DISCARD); + } + } + + /* Now transform the word as ksh93 appears to do and go on */ + t = assignment (tlist->word->word, 0); + tlist->word->word[t] = '\0'; + if (tlist->word->word[t - 1] == '+') + tlist->word->word[t - 1] = '\0'; /* cut off append op */ + tlist->word->flags &= ~(W_ASSIGNMENT|W_NOSPLIT|W_COMPASSIGN|W_ASSIGNARG|W_ASSIGNASSOC|W_ASSIGNARRAY); + + return (tlist); +} +#endif /* ARRAY_VARS */ + +static WORD_LIST * +shell_expand_word_list (tlist, eflags) + WORD_LIST *tlist; + int eflags; +{ + WORD_LIST *expanded, *orig_list, *new_list, *next, *temp_list, *wcmd; + int expanded_something, has_dollar_at; + + /* We do tilde expansion all the time. This is what 1003.2 says. */ + wcmd = new_list = (WORD_LIST *)NULL; + + for (orig_list = tlist; tlist; tlist = next) + { + if (wcmd == 0 && (tlist->word->flags & W_ASSNBLTIN)) + wcmd = tlist; + + next = tlist->next; + +#if defined (ARRAY_VARS) + /* If this is a compound array assignment to a builtin that accepts + such assignments (e.g., `declare'), take the assignment and perform + it separately, handling the semantics of declarations inside shell + functions. This avoids the double-evaluation of such arguments, + because `declare' does some evaluation of compound assignments on + its own. */ + if ((tlist->word->flags & (W_COMPASSIGN|W_ASSIGNARG)) == (W_COMPASSIGN|W_ASSIGNARG)) + expand_declaration_argument (tlist, wcmd); +#endif + + expanded_something = 0; + expanded = expand_word_internal + (tlist->word, 0, 0, &has_dollar_at, &expanded_something); + + if (expanded == &expand_word_error || expanded == &expand_word_fatal) + { + /* By convention, each time this error is returned, + tlist->word->word has already been freed. */ + tlist->word->word = (char *)NULL; + + /* Dispose our copy of the original list. */ + dispose_words (orig_list); + /* Dispose the new list we're building. */ + dispose_words (new_list); + + last_command_exit_value = EXECUTION_FAILURE; + if (expanded == &expand_word_error) + exp_jump_to_top_level (DISCARD); + else + exp_jump_to_top_level (FORCE_EOF); + } + + /* Don't split words marked W_NOSPLIT. */ + if (expanded_something && (tlist->word->flags & W_NOSPLIT) == 0) + { + temp_list = word_list_split (expanded); + dispose_words (expanded); + } + else + { + /* If no parameter expansion, command substitution, process + substitution, or arithmetic substitution took place, then + do not do word splitting. We still have to remove quoted + null characters from the result. */ + word_list_remove_quoted_nulls (expanded); + temp_list = expanded; + } + + expanded = REVERSE_LIST (temp_list, WORD_LIST *); + new_list = (WORD_LIST *)list_append (expanded, new_list); + } + + if (orig_list) + dispose_words (orig_list); + + if (new_list) + new_list = REVERSE_LIST (new_list, WORD_LIST *); + + return (new_list); +} + +/* The workhorse for expand_words () and expand_words_no_vars (). + First arg is LIST, a WORD_LIST of words. + Second arg EFLAGS is a flags word controlling which expansions are + performed. + + This does all of the substitutions: brace expansion, tilde expansion, + parameter expansion, command substitution, arithmetic expansion, + process substitution, word splitting, and pathname expansion, according + to the bits set in EFLAGS. Words with the W_QUOTED or W_NOSPLIT bits + set, or for which no expansion is done, do not undergo word splitting. + Words with the W_NOGLOB bit set do not undergo pathname expansion; words + with W_NOBRACE set do not undergo brace expansion (see + brace_expand_word_list above). */ +static WORD_LIST * +expand_word_list_internal (list, eflags) + WORD_LIST *list; + int eflags; +{ + WORD_LIST *new_list, *temp_list; + int tint; + char *savecmd; + + tempenv_assign_error = 0; + if (list == 0) + return ((WORD_LIST *)NULL); + + garglist = new_list = copy_word_list (list); + if (eflags & WEXP_VARASSIGN) + { + garglist = new_list = separate_out_assignments (new_list); + if (new_list == 0) + { + if (subst_assign_varlist) + { + /* All the words were variable assignments, so they are placed + into the shell's environment. */ + for (temp_list = subst_assign_varlist; temp_list; temp_list = temp_list->next) + { + savecmd = this_command_name; + this_command_name = (char *)NULL; /* no arithmetic errors */ + tint = do_word_assignment (temp_list->word, 0); + this_command_name = savecmd; + /* Variable assignment errors in non-interactive shells + running in Posix.2 mode cause the shell to exit, unless + they are being run by the `command' builtin. */ + if (tint == 0) + { + last_command_exit_value = EXECUTION_FAILURE; + if (interactive_shell == 0 && posixly_correct && executing_command_builtin == 0) + exp_jump_to_top_level (FORCE_EOF); + else + exp_jump_to_top_level (DISCARD); + } + } + dispose_words (subst_assign_varlist); + subst_assign_varlist = (WORD_LIST *)NULL; + } + return ((WORD_LIST *)NULL); + } + } + + /* Begin expanding the words that remain. The expansions take place on + things that aren't really variable assignments. */ + +#if defined (BRACE_EXPANSION) + /* Do brace expansion on this word if there are any brace characters + in the string. */ + if ((eflags & WEXP_BRACEEXP) && brace_expansion && new_list) + new_list = brace_expand_word_list (new_list, eflags); +#endif /* BRACE_EXPANSION */ + + /* Perform the `normal' shell expansions: tilde expansion, parameter and + variable substitution, command substitution, arithmetic expansion, + and word splitting. */ + new_list = shell_expand_word_list (new_list, eflags); + + /* Okay, we're almost done. Now let's just do some filename + globbing. */ + if (new_list) + { + if ((eflags & WEXP_PATHEXP) && disallow_filename_globbing == 0) + /* Glob expand the word list unless globbing has been disabled. */ + new_list = glob_expand_word_list (new_list, eflags); + else + /* Dequote the words, because we're not performing globbing. */ + new_list = dequote_list (new_list); + } + + if ((eflags & WEXP_VARASSIGN) && subst_assign_varlist) + { + sh_wassign_func_t *assign_func; + int is_special_builtin, is_builtin_or_func; + + /* If the remainder of the words expand to nothing, Posix.2 requires + that the variable and environment assignments affect the shell's + environment. */ + assign_func = new_list ? assign_in_env : do_word_assignment; + tempenv_assign_error = 0; + + is_builtin_or_func = (new_list && new_list->word && (find_shell_builtin (new_list->word->word) || find_function (new_list->word->word))); + /* Posix says that special builtins exit if a variable assignment error + occurs in an assignment preceding it. */ + is_special_builtin = (posixly_correct && new_list && new_list->word && find_special_builtin (new_list->word->word)); + + for (temp_list = subst_assign_varlist; temp_list; temp_list = temp_list->next) + { + savecmd = this_command_name; + this_command_name = (char *)NULL; + assigning_in_environment = (assign_func == assign_in_env); + tint = (*assign_func) (temp_list->word, is_builtin_or_func); + assigning_in_environment = 0; + this_command_name = savecmd; + /* Variable assignment errors in non-interactive shells running + in Posix.2 mode cause the shell to exit. */ + if (tint == 0) + { + if (assign_func == do_word_assignment) + { + last_command_exit_value = EXECUTION_FAILURE; + if (interactive_shell == 0 && posixly_correct) + exp_jump_to_top_level (FORCE_EOF); + else + exp_jump_to_top_level (DISCARD); + } + else if (interactive_shell == 0 && is_special_builtin) + { + last_command_exit_value = EXECUTION_FAILURE; + exp_jump_to_top_level (FORCE_EOF); + } + else + tempenv_assign_error++; + } + } + + dispose_words (subst_assign_varlist); + subst_assign_varlist = (WORD_LIST *)NULL; + } + + return (new_list); +} diff --git a/bash-5.1/subst.h b/bash-5.1/subst.h new file mode 100644 index 0000000000000000000000000000000000000000..134765158db97c32733ec75323095904d19b5245 --- /dev/null +++ b/bash-5.1/subst.h @@ -0,0 +1,354 @@ +/* subst.h -- Names of externally visible functions in subst.c. */ + +/* Copyright (C) 1993-2017 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_SUBST_H_) +#define _SUBST_H_ + +#include "stdc.h" + +/* Constants which specify how to handle backslashes and quoting in + expand_word_internal (). Q_DOUBLE_QUOTES means to use the function + slashify_in_quotes () to decide whether the backslash should be + retained. Q_HERE_DOCUMENT means slashify_in_here_document () to + decide whether to retain the backslash. Q_KEEP_BACKSLASH means + to unconditionally retain the backslash. Q_PATQUOTE means that we're + expanding a pattern ${var%#[#%]pattern} in an expansion surrounded + by double quotes. Q_DOLBRACE means we are expanding a ${...} word, so + backslashes should also escape { and } and be removed. */ +#define Q_DOUBLE_QUOTES 0x001 +#define Q_HERE_DOCUMENT 0x002 +#define Q_KEEP_BACKSLASH 0x004 +#define Q_PATQUOTE 0x008 +#define Q_QUOTED 0x010 +#define Q_ADDEDQUOTES 0x020 +#define Q_QUOTEDNULL 0x040 +#define Q_DOLBRACE 0x080 +#define Q_ARITH 0x100 /* expanding string for arithmetic evaluation */ +#define Q_ARRAYSUB 0x200 /* expanding indexed array subscript */ + +/* Flag values controlling how assignment statements are treated. */ +#define ASS_APPEND 0x0001 +#define ASS_MKLOCAL 0x0002 +#define ASS_MKASSOC 0x0004 +#define ASS_MKGLOBAL 0x0008 /* force global assignment */ +#define ASS_NAMEREF 0x0010 /* assigning to nameref variable */ +#define ASS_FORCE 0x0020 /* force assignment even to readonly variable */ +#define ASS_CHKLOCAL 0x0040 /* check local variable before assignment */ +#define ASS_NOEXPAND 0x0080 /* don't expand associative array subscripts */ +#define ASS_NOEVAL 0x0100 /* don't evaluate value as expression */ +#define ASS_NOLONGJMP 0x0200 /* don't longjmp on fatal assignment error */ +#define ASS_NOINVIS 0x0400 /* don't resolve local invisible variables */ + +/* Flags for the string extraction functions. */ +#define SX_NOALLOC 0x0001 /* just skip; don't return substring */ +#define SX_VARNAME 0x0002 /* variable name; for string_extract () */ +#define SX_REQMATCH 0x0004 /* closing/matching delimiter required */ +#define SX_COMMAND 0x0008 /* extracting a shell script/command */ +#define SX_NOCTLESC 0x0010 /* don't honor CTLESC quoting */ +#define SX_NOESCCTLNUL 0x0020 /* don't let CTLESC quote CTLNUL */ +#define SX_NOLONGJMP 0x0040 /* don't longjmp on fatal error */ +#define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */ +#define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */ +#define SX_WORD 0x0200 /* extracting word in ${param op word} */ +#define SX_COMPLETE 0x0400 /* extracting word for completion */ +#define SX_STRIPDQ 0x0800 /* strip double quotes when extracting double-quoted string */ + +/* Remove backslashes which are quoting backquotes from STRING. Modifies + STRING, and returns a pointer to it. */ +extern char * de_backslash PARAMS((char *)); + +/* Replace instances of \! in a string with !. */ +extern void unquote_bang PARAMS((char *)); + +/* Extract the $( construct in STRING, and return a new string. + Start extracting at (SINDEX) as if we had just seen "$(". + Make (SINDEX) get the position just after the matching ")". + XFLAGS is additional flags to pass to other extraction functions, */ +extern char *extract_command_subst PARAMS((char *, int *, int)); + +/* Extract the $[ construct in STRING, and return a new string. + Start extracting at (SINDEX) as if we had just seen "$[". + Make (SINDEX) get the position just after the matching "]". */ +extern char *extract_arithmetic_subst PARAMS((char *, int *)); + +#if defined (PROCESS_SUBSTITUTION) +/* Extract the <( or >( construct in STRING, and return a new string. + Start extracting at (SINDEX) as if we had just seen "<(". + Make (SINDEX) get the position just after the matching ")". */ +extern char *extract_process_subst PARAMS((char *, char *, int *, int)); +#endif /* PROCESS_SUBSTITUTION */ + +/* Extract the name of the variable to bind to from the assignment string. */ +extern char *assignment_name PARAMS((char *)); + +/* Return a single string of all the words present in LIST, separating + each word with SEP. */ +extern char *string_list_internal PARAMS((WORD_LIST *, char *)); + +/* Return a single string of all the words present in LIST, separating + each word with a space. */ +extern char *string_list PARAMS((WORD_LIST *)); + +/* Turn $* into a single string, obeying POSIX rules. */ +extern char *string_list_dollar_star PARAMS((WORD_LIST *, int, int)); + +/* Expand $@ into a single string, obeying POSIX rules. */ +extern char *string_list_dollar_at PARAMS((WORD_LIST *, int, int)); + +/* Turn the positional parameters into a string, understanding quoting and + the various subtleties of using the first character of $IFS as the + separator. Calls string_list_dollar_at, string_list_dollar_star, and + string_list as appropriate. */ +extern char *string_list_pos_params PARAMS((int, WORD_LIST *, int, int)); + +/* Perform quoted null character removal on each element of LIST. + This modifies LIST. */ +extern void word_list_remove_quoted_nulls PARAMS((WORD_LIST *)); + +/* This performs word splitting and quoted null character removal on + STRING. */ +extern WORD_LIST *list_string PARAMS((char *, char *, int)); + +extern char *ifs_firstchar PARAMS((int *)); +extern char *get_word_from_string PARAMS((char **, char *, char **)); +extern char *strip_trailing_ifs_whitespace PARAMS((char *, char *, int)); + +/* Given STRING, an assignment string, get the value of the right side + of the `=', and bind it to the left side. If EXPAND is true, then + perform tilde expansion, parameter expansion, command substitution, + and arithmetic expansion on the right-hand side. Do not perform word + splitting on the result of expansion. */ +extern int do_assignment PARAMS((char *)); +extern int do_assignment_no_expand PARAMS((char *)); +extern int do_word_assignment PARAMS((WORD_DESC *, int)); + +/* Append SOURCE to TARGET at INDEX. SIZE is the current amount + of space allocated to TARGET. SOURCE can be NULL, in which + case nothing happens. Gets rid of SOURCE by free ()ing it. + Returns TARGET in case the location has changed. */ +extern char *sub_append_string PARAMS((char *, char *, int *, size_t *)); + +/* Append the textual representation of NUMBER to TARGET. + INDEX and SIZE are as in SUB_APPEND_STRING. */ +extern char *sub_append_number PARAMS((intmax_t, char *, int *, int *)); + +/* Return the word list that corresponds to `$*'. */ +extern WORD_LIST *list_rest_of_args PARAMS((void)); + +/* Make a single large string out of the dollar digit variables, + and the rest_of_args. If DOLLAR_STAR is 1, then obey the special + case of "$*" with respect to IFS. */ +extern char *string_rest_of_args PARAMS((int)); + +/* Expand STRING by performing parameter expansion, command substitution, + and arithmetic expansion. Dequote the resulting WORD_LIST before + returning it, but do not perform word splitting. The call to + remove_quoted_nulls () is made here because word splitting normally + takes care of quote removal. */ +extern WORD_LIST *expand_string_unsplit PARAMS((char *, int)); + +/* Expand the rhs of an assignment statement. */ +extern WORD_LIST *expand_string_assignment PARAMS((char *, int)); + +/* Expand a prompt string. */ +extern WORD_LIST *expand_prompt_string PARAMS((char *, int, int)); + +/* Expand STRING just as if you were expanding a word. This also returns + a list of words. Note that filename globbing is *NOT* done for word + or string expansion, just when the shell is expanding a command. This + does parameter expansion, command substitution, arithmetic expansion, + and word splitting. Dequote the resultant WORD_LIST before returning. */ +extern WORD_LIST *expand_string PARAMS((char *, int)); + +/* Convenience functions that expand strings to strings, taking care of + converting the WORD_LIST * returned by the expand_string* functions + to a string and deallocating the WORD_LIST *. */ +extern char *expand_string_to_string PARAMS((char *, int)); +extern char *expand_string_unsplit_to_string PARAMS((char *, int)); +extern char *expand_assignment_string_to_string PARAMS((char *, int)); + +/* Expand an arithmetic expression string */ +extern char *expand_arith_string PARAMS((char *, int)); + +/* De-quote quoted characters in STRING. */ +extern char *dequote_string PARAMS((char *)); + +/* De-quote CTLESC-escaped CTLESC or CTLNUL characters in STRING. */ +extern char *dequote_escapes PARAMS((const char *)); + +extern WORD_DESC *dequote_word PARAMS((WORD_DESC *)); + +/* De-quote quoted characters in each word in LIST. */ +extern WORD_LIST *dequote_list PARAMS((WORD_LIST *)); + +/* Expand WORD, performing word splitting on the result. This does + parameter expansion, command substitution, arithmetic expansion, + word splitting, and quote removal. */ +extern WORD_LIST *expand_word PARAMS((WORD_DESC *, int)); + +/* Expand WORD, but do not perform word splitting on the result. This + does parameter expansion, command substitution, arithmetic expansion, + and quote removal. */ +extern WORD_LIST *expand_word_unsplit PARAMS((WORD_DESC *, int)); +extern WORD_LIST *expand_word_leave_quoted PARAMS((WORD_DESC *, int)); + +/* Return the value of a positional parameter. This handles values > 10. */ +extern char *get_dollar_var_value PARAMS((intmax_t)); + +/* Quote a string to protect it from word splitting. */ +extern char *quote_string PARAMS((char *)); + +/* Quote escape characters (characters special to internals of expansion) + in a string. */ +extern char *quote_escapes PARAMS((const char *)); + +/* And remove such quoted special characters. */ +extern char *remove_quoted_escapes PARAMS((char *)); + +/* Remove CTLNUL characters from STRING unless they are quoted with CTLESC. */ +extern char *remove_quoted_nulls PARAMS((char *)); + +/* Perform quote removal on STRING. If QUOTED > 0, assume we are obeying the + backslash quoting rules for within double quotes. */ +extern char *string_quote_removal PARAMS((char *, int)); + +/* Perform quote removal on word WORD. This allocates and returns a new + WORD_DESC *. */ +extern WORD_DESC *word_quote_removal PARAMS((WORD_DESC *, int)); + +/* Perform quote removal on all words in LIST. If QUOTED is non-zero, + the members of the list are treated as if they are surrounded by + double quotes. Return a new list, or NULL if LIST is NULL. */ +extern WORD_LIST *word_list_quote_removal PARAMS((WORD_LIST *, int)); + +/* Called when IFS is changed to maintain some private variables. */ +extern void setifs PARAMS((SHELL_VAR *)); + +/* Return the value of $IFS, or " \t\n" if IFS is unset. */ +extern char *getifs PARAMS((void)); + +/* This splits a single word into a WORD LIST on $IFS, but only if the word + is not quoted. list_string () performs quote removal for us, even if we + don't do any splitting. */ +extern WORD_LIST *word_split PARAMS((WORD_DESC *, char *)); + +/* Take the list of words in LIST and do the various substitutions. Return + a new list of words which is the expanded list, and without things like + variable assignments. */ +extern WORD_LIST *expand_words PARAMS((WORD_LIST *)); + +/* Same as expand_words (), but doesn't hack variable or environment + variables. */ +extern WORD_LIST *expand_words_no_vars PARAMS((WORD_LIST *)); + +/* Perform the `normal shell expansions' on a WORD_LIST. These are + brace expansion, tilde expansion, parameter and variable substitution, + command substitution, arithmetic expansion, and word splitting. */ +extern WORD_LIST *expand_words_shellexp PARAMS((WORD_LIST *)); + +extern WORD_DESC *command_substitute PARAMS((char *, int, int)); +extern char *pat_subst PARAMS((char *, char *, char *, int)); + +#if defined (PROCESS_SUBSTITUTION) +extern int fifos_pending PARAMS((void)); +extern int num_fifos PARAMS((void)); +extern void unlink_fifo_list PARAMS((void)); +extern void unlink_all_fifos PARAMS((void)); +extern void unlink_fifo PARAMS((int)); + +extern void *copy_fifo_list PARAMS((int *)); +extern void close_new_fifos PARAMS((void *, int)); + +extern void clear_fifo_list PARAMS((void)); + +extern int find_procsub_child PARAMS((pid_t)); +extern void set_procsub_status PARAMS((int, pid_t, int)); + +extern void wait_procsubs PARAMS((void)); +extern void reap_procsubs PARAMS((void)); +#endif + +extern WORD_LIST *list_string_with_quotes PARAMS((char *)); + +#if defined (ARRAY_VARS) +extern char *extract_array_assignment_list PARAMS((char *, int *)); +#endif + +#if defined (COND_COMMAND) +extern char *remove_backslashes PARAMS((char *)); +extern char *cond_expand_word PARAMS((WORD_DESC *, int)); +#endif + +/* Flags for skip_to_delim */ +#define SD_NOJMP 0x001 /* don't longjmp on fatal error. */ +#define SD_INVERT 0x002 /* look for chars NOT in passed set */ +#define SD_NOQUOTEDELIM 0x004 /* don't let single or double quotes act as delimiters */ +#define SD_NOSKIPCMD 0x008 /* don't skip over $(, <(, or >( command/process substitution; parse them as commands */ +#define SD_EXTGLOB 0x010 /* skip over extended globbing patterns if appropriate */ +#define SD_IGNOREQUOTE 0x020 /* single and double quotes are not special */ +#define SD_GLOB 0x040 /* skip over glob patterns like bracket expressions */ +#define SD_NOPROCSUB 0x080 /* don't parse process substitutions as commands */ +#define SD_COMPLETE 0x100 /* skip_to_delim during completion */ +#define SD_HISTEXP 0x200 /* skip_to_delim during history expansion */ +#define SD_ARITHEXP 0x400 /* skip_to_delim during arithmetic expansion */ + +extern int skip_to_delim PARAMS((char *, int, char *, int)); + +#if defined (BANG_HISTORY) +extern int skip_to_histexp PARAMS((char *, int, char *, int)); +#endif + +#if defined (READLINE) +extern int char_is_quoted PARAMS((char *, int)); +extern int unclosed_pair PARAMS((char *, int, char *)); +extern WORD_LIST *split_at_delims PARAMS((char *, int, char *, int, int, int *, int *)); +#endif + +/* Variables used to keep track of the characters in IFS. */ +extern SHELL_VAR *ifs_var; +extern char *ifs_value; +extern unsigned char ifs_cmap[]; +extern int ifs_is_set, ifs_is_null; + +#if defined (HANDLE_MULTIBYTE) +extern unsigned char ifs_firstc[]; +extern size_t ifs_firstc_len; +#else +extern unsigned char ifs_firstc; +#endif + +extern int assigning_in_environment; +extern int expanding_redir; +extern int inherit_errexit; + +extern pid_t last_command_subst_pid; + +/* Evaluates to 1 if C is a character in $IFS. */ +#define isifs(c) (ifs_cmap[(unsigned char)(c)] != 0) + +/* How to determine the quoted state of the character C. */ +#define QUOTED_CHAR(c) ((c) == CTLESC) + +/* Is the first character of STRING a quoted NULL character? */ +#define QUOTED_NULL(string) ((string)[0] == CTLNUL && (string)[1] == '\0') + +extern void invalidate_cached_quoted_dollar_at PARAMS((void)); + +#endif /* !_SUBST_H_ */ diff --git a/bash-5.1/support/Makefile.in b/bash-5.1/support/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..0289e0acf2b0ddce244e06cf32d2a1d9b032d83a --- /dev/null +++ b/bash-5.1/support/Makefile.in @@ -0,0 +1,88 @@ +# +# Simple Makefile for the support programs. +# +# documentation support: man2html +# testing support: printenv recho zecho xcase +# +# bashbug.sh lives here (created by configure), but bashbug is created by +# the top-level makefile +# +# Currently only man2html is built +# +# Copyright (C) 1998-2018 Free Software Foundation, Inc. + +# 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 . + +# +# Boilerplate +# +topdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +BUILD_DIR = @BUILD_DIR@ + +RM = rm -f +SHELL = @MAKE_SHELL@ +CC = @CC@ +CC_FOR_BUILD = @CC_FOR_BUILD@ + +EXEEXT = @EXEEXT@ + +# +# Compiler options: +# +PROFILE_FLAGS = @PROFILE_FLAGS@ + +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ +DEFS = @DEFS@ +LOCAL_DEFS = @LOCAL_DEFS@ + +LIBS = @LIBS@ +LIBS_FOR_BUILD = ${LIBS} # XXX + +LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ +LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) + +INCLUDES = -I${BUILD_DIR} -I${topdir} + +BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \ + ${INCLUDES} $(LOCAL_CFLAGS) + +CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS) +CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) + +SRC1 = man2html.c +OBJ1 = man2html.o + +.c.o: + $(RM) $@ + $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $< + +all: man2html$(EXEEXT) + +man2html$(EXEEXT): $(OBJ1) + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS_FOR_BUILD} + +clean: + $(RM) man2html$(EXEEXT) $(OBJ1) + +distclean maintainer-clean mostlyclean: clean + $(RM) bash.pc bashbug.sh + +man2html.o: man2html.c diff --git a/bash-5.1/support/SYMLINKS b/bash-5.1/support/SYMLINKS new file mode 100644 index 0000000000000000000000000000000000000000..06bbed7251e55864a2438395efe3c3b96003d983 --- /dev/null +++ b/bash-5.1/support/SYMLINKS @@ -0,0 +1,18 @@ +# +# symlink map for bash source tree +# +# link name link target +# +lib/readline/tilde.c ../tilde/tilde.c +lib/readline/tilde.h ../tilde/tilde.h +# +lib/readline/ansi_stdlib.h ../../include/ansi_stdlib.h +lib/readline/posixdir.h ../../include/posixdir.h +lib/readline/posixjmp.h ../../include/posixjmp.h +lib/readline/posixselect.h ../../include/posixselect.h +lib/readline/posixstat.h ../../include/posixstat.h +#lib/readline/rlstdc.h ../../include/stdc.h +#lib/readline/xmalloc.c ../malloc/xmalloc.c +# +#lib/tilde/memalloc.h ../../include/memalloc.h +# diff --git a/bash-5.1/support/bash.pc.in b/bash-5.1/support/bash.pc.in new file mode 100644 index 0000000000000000000000000000000000000000..60096593b1a8cb8cb57dfd8fe5b378eced7028e9 --- /dev/null +++ b/bash-5.1/support/bash.pc.in @@ -0,0 +1,28 @@ +# bash.pc.in + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +loadablesdir=@loadablesdir@ +headersdir=${includedir}/@PACKAGE_NAME@ + +LOCAL_CFLAGS = @LOCAL_CFLAGS@ +LOCAL_DEFS = @LOCAL_DEFS@ +CCFLAGS = ${LOCAL_DEFS} ${LOCAL_CFLAGS} + +CC = @CC@ +SHOBJ_CC = @SHOBJ_CC@ +SHOBJ_CFLAGS = @SHOBJ_CFLAGS@ +SHOBJ_LD = @SHOBJ_LD@ +SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ +SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ +SHOBJ_LIBS = @SHOBJ_LIBS@ + +Name: @PACKAGE_NAME@ +Description: Bash headers for bash loadable builtins +Version: @PACKAGE_VERSION@ +Url: @PACKAGE_URL@ +Libs: ${SHOBJ_LIBS} +Cflags: ${SHOBJ_CFLAGS} ${CCFLAGS} -I${headersdir} -I${headersdir}/builtins -I${headersdir}/include diff --git a/bash-5.1/support/bash.xbm b/bash-5.1/support/bash.xbm new file mode 100644 index 0000000000000000000000000000000000000000..14bbe6aac49a21f72302f382c9dbedc74bda2952 --- /dev/null +++ b/bash-5.1/support/bash.xbm @@ -0,0 +1,60 @@ +From: Simon Marshall +Date: Wed, 8 May 91 17:15:58 +0100 +To: bug-bash@ai.mit.edu +Subject: X bitmap for bash + + Since other GNU software comes with its very own X bitmap, I + thought it was about time bash had one too & here it is! To use, + stick the stuff after my signature in a file /bash.xbm. If + using a twm window manager, insert the lines: + +IconDirectory "" +Icons { + "" "bash.xbm" +} + in your ~/.twmrc file. The can be a prefix, so if + you have titles "bash@machine", the prefix "bash" will do. I'm not + familiar enough with other window managers, but they should be + similar. + + If you like it, you're welcome to it... + + Simon. + +Copyright (C) 1992 Simon Marshall +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +#define bash_width 64 +#define bash_height 48 +static char bash_bits[] = { + 0x00, 0x60, 0x06, 0x30, 0x04, 0x00, 0x00, 0x00, 0x60, 0x98, 0x01, 0x40, + 0x03, 0x00, 0x00, 0x00, 0x19, 0x00, 0xa0, 0x80, 0x80, 0xff, 0x00, 0x00, + 0x06, 0x00, 0x1c, 0x03, 0xe1, 0x5f, 0x03, 0x00, 0x02, 0x00, 0x22, 0x0c, + 0x5d, 0xf4, 0x0e, 0x00, 0xe1, 0x02, 0x09, 0x19, 0x17, 0x91, 0x3d, 0x00, + 0xf8, 0x87, 0x40, 0x90, 0x88, 0x88, 0x6e, 0x00, 0x8e, 0x9b, 0x04, 0x62, + 0x22, 0x22, 0xd6, 0x00, 0x02, 0xee, 0x4c, 0x68, 0x44, 0x44, 0x6c, 0x01, + 0x02, 0xf8, 0xa1, 0x4a, 0x11, 0x11, 0xb1, 0x02, 0x05, 0xa0, 0x22, 0xe0, + 0x88, 0x88, 0x68, 0x03, 0x42, 0x50, 0x5d, 0x40, 0x22, 0x22, 0xa2, 0x05, + 0x11, 0x81, 0x00, 0x44, 0x44, 0x44, 0x44, 0x07, 0x02, 0x20, 0x84, 0x60, + 0x11, 0x11, 0xd1, 0x0d, 0x02, 0x0a, 0x02, 0xc0, 0x88, 0x88, 0x48, 0x0b, + 0x44, 0x40, 0x00, 0x42, 0x22, 0x22, 0xa2, 0x1d, 0x24, 0x08, 0x02, 0x64, + 0x44, 0x44, 0xc4, 0x1a, 0x08, 0x00, 0x20, 0x20, 0x11, 0x11, 0x91, 0x15, + 0x88, 0x00, 0x00, 0xe1, 0xff, 0xff, 0xff, 0x1a, 0x10, 0x08, 0x22, 0x10, + 0x00, 0x00, 0xc0, 0x15, 0x31, 0x40, 0x00, 0xf2, 0x03, 0xc0, 0xc1, 0x1a, + 0x41, 0x24, 0x48, 0x6c, 0x06, 0x80, 0xc1, 0x15, 0x82, 0x01, 0x00, 0x66, + 0x06, 0x80, 0xc1, 0x1a, 0x04, 0x22, 0x12, 0x67, 0x06, 0x80, 0xc1, 0x15, + 0x0a, 0x04, 0xe0, 0x66, 0xe6, 0xb8, 0xc7, 0x1a, 0x09, 0xf0, 0x17, 0xee, + 0xb3, 0xa5, 0xcf, 0x15, 0x30, 0x00, 0x00, 0x6e, 0x86, 0x8d, 0xcd, 0x1a, + 0x00, 0x01, 0x80, 0x67, 0xe6, 0xbd, 0xcd, 0x15, 0x00, 0x46, 0x40, 0x66, + 0xb6, 0xb1, 0xcd, 0x1a, 0x00, 0x38, 0x3c, 0x66, 0xb6, 0xa5, 0xcd, 0x15, + 0x00, 0x00, 0x02, 0xf6, 0xe3, 0x9d, 0xdd, 0x1a, 0x00, 0x04, 0x60, 0x06, + 0x00, 0x00, 0xc0, 0x15, 0x00, 0x04, 0x40, 0xfe, 0xff, 0xff, 0xff, 0x1a, + 0x00, 0x02, 0x80, 0x12, 0x11, 0x11, 0x91, 0x15, 0x00, 0x00, 0x00, 0x8a, + 0x88, 0x88, 0x88, 0x1a, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0xa2, 0x15, + 0x00, 0x00, 0x00, 0x46, 0x44, 0x44, 0xc4, 0x9a, 0x00, 0x00, 0x00, 0x12, + 0x11, 0x11, 0x91, 0xb5, 0x00, 0x00, 0x10, 0x8a, 0x88, 0x88, 0x88, 0xba, + 0x00, 0x00, 0x10, 0x22, 0x22, 0x22, 0xa2, 0xd5, 0x00, 0x00, 0x30, 0xc6, + 0x44, 0x44, 0xcc, 0xdf, 0x00, 0x20, 0x39, 0x96, 0x15, 0x51, 0x99, 0xf5, + 0x80, 0xf2, 0x56, 0x8b, 0x9a, 0xea, 0x9b, 0xff, 0xc1, 0xad, 0x5e, 0xaf, + 0xbb, 0xfa, 0xba, 0xdf, 0x22, 0x9b, 0xae, 0xd7, 0x54, 0x5d, 0xd7, 0xbf, + 0x3b, 0x32, 0xce, 0xff, 0xff, 0xff, 0xff, 0xab, 0xae, 0x2b, 0x59, 0xaf, + 0xd4, 0xae, 0x2e, 0xc3, 0xdd, 0x43, 0xa9, 0xd1, 0xba, 0xae, 0x2c, 0xcd}; diff --git a/bash-5.1/support/bashbug.sh b/bash-5.1/support/bashbug.sh new file mode 100644 index 0000000000000000000000000000000000000000..01e9f01470008212985aa3a96f8bf424b01b3017 --- /dev/null +++ b/bash-5.1/support/bashbug.sh @@ -0,0 +1,274 @@ +#!/bin/sh - +# +# bashbug - create a bug report and mail it to the bug address +# +# The bug address depends on the release status of the shell. Versions +# with status `devel', `alpha', `beta', or `rc' mail bug reports to +# chet@cwru.edu and, optionally, to bash-testers@cwru.edu. +# Other versions send mail to bug-bash@gnu.org. +# +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# +# 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 . + +# +# configuration section: +# these variables are filled in by the make target in Makefile +# +MACHINE="!MACHINE!" +OS="!OS!" +CC="!CC!" +CFLAGS="!CFLAGS!" +RELEASE="!RELEASE!" +PATCHLEVEL="!PATCHLEVEL!" +RELSTATUS="!RELSTATUS!" +MACHTYPE="!MACHTYPE!" + +PATH=/bin:/usr/bin:/usr/local/bin:$PATH +export PATH + +# Check if TMPDIR is set, default to /tmp +: ${TMPDIR:=/tmp} + +#Securely create a temporary directory for the temporary files +TEMPDIR=$TMPDIR/bbug.$$ +(umask 077 && mkdir "$TEMPDIR") || { + echo "$0: could not create temporary directory" >&2 + exit 1 +} + +TEMPFILE1=$TEMPDIR/bbug1 +TEMPFILE2=$TEMPDIR/bbug2 + +USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]" +VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}" + +do_help= do_version= + +while [ $# -gt 0 ]; do + case "$1" in + --help) shift ; do_help=y ;; + --version) shift ; do_version=y ;; + --) shift ; break ;; + -*) echo "bashbug: ${1}: invalid option" >&2 + echo "$USAGE" >&2 + exit 2 ;; + *) break ;; + esac +done + +if [ -n "$do_version" ]; then + echo "${VERSTR}" + exit 0 +fi + +if [ -n "$do_help" ]; then + echo "${VERSTR}" + echo "${USAGE}" + echo + cat << HERE_EOF +Bashbug is used to send mail to the Bash maintainers +for when Bash doesn't behave like you'd like, or expect. + +Bashbug will start up your editor (as defined by the shell's +EDITOR environment variable) with a preformatted bug report +template for you to fill in. The report will be mailed to the +bug-bash mailing list by default. See the manual for details. + +If you invoke bashbug by accident, just quit your editor without +saving any changes to the template, and no bug report will be sent. +HERE_EOF + exit 0 +fi + +# Figure out how to echo a string without a trailing newline +N=`echo 'hi there\c'` +case "$N" in +*c) n=-n c= ;; +*) n= c='\c' ;; +esac + +BASHTESTERS="bash-testers@cwru.edu" + +case "$RELSTATUS" in +alpha*|beta*|devel*|rc*) BUGBASH=chet@cwru.edu ;; +*) BUGBASH=bug-bash@gnu.org ;; +esac + +case "$RELSTATUS" in +alpha*|beta*|devel*|rc*) + echo "$0: This is a testing release. Would you like your bug report" + echo "$0: to be sent to the bash-testers mailing list?" + echo $n "$0: Send to bash-testers? $c" + read ans + case "$ans" in + y*|Y*) BUGBASH="${BUGBASH},${BASHTESTERS}" ;; + esac ;; +esac + +BUGADDR="${1-$BUGBASH}" + +if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then + if [ -x /usr/bin/editor ]; then + DEFEDITOR=editor + elif [ -x /usr/local/bin/ce ]; then + DEFEDITOR=ce + elif [ -x /usr/local/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/contrib/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/bin/xemacs ]; then + DEFEDITOR=xemacs + elif [ -x /usr/bin/nano ]; then + DEFEDITOR=nano + elif [ -x /usr/contrib/bin/jove ]; then + DEFEDITOR=jove + elif [ -x /usr/local/bin/jove ]; then + DEFEDITOR=jove + elif [ -x /usr/bin/vi ]; then + DEFEDITOR=vi + else + echo "$0: No default editor found: attempting to use vi" >&2 + DEFEDITOR=vi + fi +fi + + +: ${EDITOR=$DEFEDITOR} + +: ${USER=${LOGNAME-`whoami`}} + +trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15 +trap 'rm -rf "$TEMPDIR"' 0 + +UN= +if (uname) >/dev/null 2>&1; then + UN=`uname -a` +fi + +if [ -f /usr/lib/sendmail ] ; then + RMAIL="/usr/lib/sendmail" + SMARGS="-i -t" +elif [ -f /usr/sbin/sendmail ] ; then + RMAIL="/usr/sbin/sendmail" + SMARGS="-i -t" +else + RMAIL=rmail + SMARGS="$BUGADDR" +fi + +INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]' + +cat > "$TEMPFILE1" <> $HOME/dead.bashbug + echo "$0: mail to ${BUGADDR} failed: report saved in $HOME/dead.bashbug" >&2 + echo "$0: please send it manually to ${BUGADDR}" >&2 +} + +exit 0 diff --git a/bash-5.1/support/bashbug.sh.in b/bash-5.1/support/bashbug.sh.in new file mode 100644 index 0000000000000000000000000000000000000000..d4b48c903eacb72d7ae426e406bef94d2c806863 --- /dev/null +++ b/bash-5.1/support/bashbug.sh.in @@ -0,0 +1,274 @@ +#!/bin/sh - +# +# bashbug - create a bug report and mail it to the bug address +# +# The bug address depends on the release status of the shell. Versions +# with status `devel', `alpha', `beta', or `rc' mail bug reports to +# chet@cwru.edu and, optionally, to bash-testers@cwru.edu. +# Other versions send mail to bug-bash@gnu.org. +# +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# +# 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 . + +# +# configuration section: +# these variables are filled in by the make target in Makefile +# +MACHINE="@host_cpu@" +OS="@host_os@" +CC="@CC@" +CFLAGS="@CFLAGS@" +RELEASE="@BASHVERS@" +PATCHLEVEL="!PATCHLEVEL!" +RELSTATUS="@RELSTATUS@" +MACHTYPE="@host@" + +PATH=/bin:/usr/bin:/usr/local/bin:$PATH +export PATH + +# Check if TMPDIR is set, default to /tmp +: ${TMPDIR:=/tmp} + +#Securely create a temporary directory for the temporary files +TEMPDIR=$TMPDIR/bbug.$$ +(umask 077 && mkdir "$TEMPDIR") || { + echo "$0: could not create temporary directory" >&2 + exit 1 +} + +TEMPFILE1=$TEMPDIR/bbug1 +TEMPFILE2=$TEMPDIR/bbug2 + +USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]" +VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}" + +do_help= do_version= + +while [ $# -gt 0 ]; do + case "$1" in + --help) shift ; do_help=y ;; + --version) shift ; do_version=y ;; + --) shift ; break ;; + -*) echo "bashbug: ${1}: invalid option" >&2 + echo "$USAGE" >&2 + exit 2 ;; + *) break ;; + esac +done + +if [ -n "$do_version" ]; then + echo "${VERSTR}" + exit 0 +fi + +if [ -n "$do_help" ]; then + echo "${VERSTR}" + echo "${USAGE}" + echo + cat << HERE_EOF +Bashbug is used to send mail to the Bash maintainers +for when Bash doesn't behave like you'd like, or expect. + +Bashbug will start up your editor (as defined by the shell's +EDITOR environment variable) with a preformatted bug report +template for you to fill in. The report will be mailed to the +bug-bash mailing list by default. See the manual for details. + +If you invoke bashbug by accident, just quit your editor without +saving any changes to the template, and no bug report will be sent. +HERE_EOF + exit 0 +fi + +# Figure out how to echo a string without a trailing newline +N=`echo 'hi there\c'` +case "$N" in +*c) n=-n c= ;; +*) n= c='\c' ;; +esac + +BASHTESTERS="bash-testers@cwru.edu" + +case "$RELSTATUS" in +alpha*|beta*|devel*|rc*) BUGBASH=chet@cwru.edu ;; +*) BUGBASH=bug-bash@gnu.org ;; +esac + +case "$RELSTATUS" in +alpha*|beta*|devel*|rc*) + echo "$0: This is a testing release. Would you like your bug report" + echo "$0: to be sent to the bash-testers mailing list?" + echo $n "$0: Send to bash-testers? $c" + read ans + case "$ans" in + y*|Y*) BUGBASH="${BUGBASH},${BASHTESTERS}" ;; + esac ;; +esac + +BUGADDR="${1-$BUGBASH}" + +if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then + if [ -x /usr/bin/editor ]; then + DEFEDITOR=editor + elif [ -x /usr/local/bin/ce ]; then + DEFEDITOR=ce + elif [ -x /usr/local/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/contrib/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/bin/emacs ]; then + DEFEDITOR=emacs + elif [ -x /usr/bin/xemacs ]; then + DEFEDITOR=xemacs + elif [ -x /usr/bin/nano ]; then + DEFEDITOR=nano + elif [ -x /usr/contrib/bin/jove ]; then + DEFEDITOR=jove + elif [ -x /usr/local/bin/jove ]; then + DEFEDITOR=jove + elif [ -x /usr/bin/vi ]; then + DEFEDITOR=vi + else + echo "$0: No default editor found: attempting to use vi" >&2 + DEFEDITOR=vi + fi +fi + + +: ${EDITOR=$DEFEDITOR} + +: ${USER=${LOGNAME-`whoami`}} + +trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15 +trap 'rm -rf "$TEMPDIR"' 0 + +UN= +if (uname) >/dev/null 2>&1; then + UN=`uname -a` +fi + +if [ -f /usr/lib/sendmail ] ; then + RMAIL="/usr/lib/sendmail" + SMARGS="-i -t" +elif [ -f /usr/sbin/sendmail ] ; then + RMAIL="/usr/sbin/sendmail" + SMARGS="-i -t" +else + RMAIL=rmail + SMARGS="$BUGADDR" +fi + +INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]' + +cat > "$TEMPFILE1" <> $HOME/dead.bashbug + echo "$0: mail to ${BUGADDR} failed: report saved in $HOME/dead.bashbug" >&2 + echo "$0: please send it manually to ${BUGADDR}" >&2 +} + +exit 0 diff --git a/bash-5.1/support/bashversion.c b/bash-5.1/support/bashversion.c new file mode 100644 index 0000000000000000000000000000000000000000..4f86b13467a9be60a8e593ac17031158b39905f2 --- /dev/null +++ b/bash-5.1/support/bashversion.c @@ -0,0 +1,148 @@ +/* bashversion.c -- Display bash version information. */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "stdc.h" + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" + +#include "version.h" +#include "conftypes.h" + +#define RFLAG 0x0001 +#define VFLAG 0x0002 +#define MFLAG 0x0004 +#define PFLAG 0x0008 +#define SFLAG 0x0010 +#define LFLAG 0x0020 +#define XFLAG 0x0040 + +extern int optind; +extern char *optarg; + +extern char *dist_version; +extern int patch_level; + +extern char *shell_version_string PARAMS((void)); +extern void show_shell_version PARAMS((int)); + +char *shell_name = "bash"; +char *progname; + +static void +usage() +{ + fprintf(stderr, "%s: usage: %s [-hrvpmlsx]\n", progname, progname); +} + +int +main (argc, argv) + int argc; + char **argv; +{ + int opt, oflags; + char dv[128], *rv; + + if (progname = strrchr (argv[0], '/')) + progname++; + else + progname = argv[0]; + + oflags = 0; + while ((opt = getopt(argc, argv, "hrvmpslx")) != EOF) + { + switch (opt) + { + case 'h': + usage (); + exit (0); + case 'r': + oflags |= RFLAG; /* release */ + break; + case 'v': + oflags |= VFLAG; /* version */ + break; + case 'm': + oflags |= MFLAG; /* machtype */ + break; + case 'p': + oflags |= PFLAG; /* patchlevel */ + break; + case 's': /* short version string */ + oflags |= SFLAG; + break; + case 'l': /* long version string */ + oflags |= LFLAG; + break; + case 'x': /* extended version information */ + oflags |= XFLAG; + break; + default: + usage (); + exit (2); + } + } + + argc -= optind; + argv += optind; + + if (argc > 0) + { + usage (); + exit (2); + } + + /* default behavior */ + if (oflags == 0) + oflags = SFLAG; + + if (oflags & (RFLAG|VFLAG)) + { + strcpy (dv, dist_version); + rv = strchr (dv, '.'); + if (rv) + *rv++ = '\0'; + else + rv = "00"; + } + if (oflags & RFLAG) + printf ("%s\n", dv); + else if (oflags & VFLAG) + printf ("%s\n", rv); + else if (oflags & MFLAG) + printf ("%s\n", MACHTYPE); + else if (oflags & PFLAG) + printf ("%d\n", patch_level); + else if (oflags & SFLAG) + printf ("%s\n", shell_version_string ()); + else if (oflags & LFLAG) + show_shell_version (0); + else if (oflags & XFLAG) + show_shell_version (1); + + exit (0); +} diff --git a/bash-5.1/support/checkbashisms b/bash-5.1/support/checkbashisms new file mode 100755 index 0000000000000000000000000000000000000000..ea6cc14ffba2fdb270b748b6df4cba72074ffce8 --- /dev/null +++ b/bash-5.1/support/checkbashisms @@ -0,0 +1,170 @@ +#! /usr/bin/perl -w + +# This script is essentially copied from /usr/share/lintian/checks/scripts, +# which is: +# Copyright (C) 1998 Richard Braakman +# Copyright (C) 2002 Josip Rodin +# This version is +# Copyright (C) 2003 Julian Gilbey +# +# 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 . +# + +use strict; + +(my $progname = $0) =~ s|.*/||; + +my $usage = <<"EOF"; +Usage: $progname [-n] script ... + or: $progname --help + or: $progname --version +This script performs basic checks for the presence of bashisms +in /bin/sh scripts. +EOF + +my $version = <<"EOF"; +This is $progname, from the Debian devscripts package, version 2.10.7ubuntu5 +This code is copyright 2003 by Julian Gilbey , +based on original code which is copyright 1998 by Richard Braakman +and copyright 2002 by Josip Rodin. +This program comes with ABSOLUTELY NO WARRANTY. +You are free to redistribute this code under the terms of the +GNU General Public License, version 3, or (at your option) any later version. +EOF + +my $opt_echo = 0; + +## +## handle command-line options +## +if (int(@ARGV) == 0 or $ARGV[0] =~ /^(--help|-h)$/) { print $usage; exit 0; } +if (@ARGV and $ARGV[0] =~ /^(--version|-v)$/) { print $version; exit 0; } +if (@ARGV and $ARGV[0] =~ /^(--newline|-n)$/) { $opt_echo = 1; } + + +my $status = 0; + +foreach my $filename (@ARGV) { + if ($filename eq '-n' or $filename eq '--newline') { + next; + } + unless (open C, "$filename") { + warn "cannot open script $filename for reading: $!\n"; + $status |= 2; + next; + } + + my $cat_string = ""; + + while () { + if ($. == 1) { # This should be an interpreter line + if (m,^\#!\s*(\S+),) { + my $interpreter = $1; + if ($interpreter =~ m,/bash$,) { + warn "script $filename is already a bash script; skipping\n"; + $status |= 2; + last; # end this file + } + elsif ($interpreter !~ m,/(sh|ash|dash)$,) { + warn "script $filename does not appear to be a /bin/sh script; skipping\n"; + $status |= 2; + last; + } + } else { + warn "script $filename does not appear to have a \#! interpreter line;\nyou may get strange results\n"; + } + } + + next if m,^\s*\#,; # skip comment lines + chomp; + my $orig_line = $_; + + s/(? q<'function' is useless>, + '(?:^|\s+)select\s+\w+' => q<'select' is not POSIX>, + '(?:^|\s+)source\s+(?:\.\/|\/|\$)[^\s]+' => + q, + '(\[|test|-o|-a)\s*[^\s]+\s+==\s' => + q, + '\s\|\&' => q, + '\$\[\w+\]' => q, + '\$\{\w+\:\d+(?::\d+)?\}' => q<${foo:3[:1]}>, + '\$\{!\w+[@*]\}' => q<${!prefix[*|@]>, + '\$\{!\w+\}' => q<${!name}>, + '\$\{\w+(/.+?){1,2}\}' => q<${parm/?/pat[/str]}>, + '[^\\\]\{([^\s]+?,)+[^\\\}\s]+\}' => + q, + '(?:^|\s+)\w+\[\d+\]=' => q, + '\$\{\#?\w+\[[0-9\*\@]+\]\}' => q, + '(?:^|\s+)(read\s*(?:;|$))' => q, + '\$\(\([A-Za-z]' => q, + 'echo\s+-[e]' => q, + 'exec\s+-[acl]' => q, + '\blet\s' => q, + '\$RANDOM\b' => q<$RANDOM>, + '(? q<'((' should be '$(('>, + ); + + if ($opt_echo) { + $bashisms{'echo\s+-[n]'} = 'q'; + } + + while (my ($re,$expl) = each %bashisms) { + if (m/($re)/) { + $found = 1; + $match = $1; + $explanation = $expl; + last; + } + } + # since this test is ugly, I have to do it by itself + # detect source (.) trying to pass args to the command it runs + if (not $found and m/^\s*(\.\s+[^\s]+\s+([^\s]+))/) { + if ($2 eq '&&' || $2 eq '||') { + # everything is ok + ; + } else { + $found = 1; + $match = $1; + } + } + unless ($found == 0) { + warn "possible bashism in $filename line $. ($explanation):\n$orig_line\n"; + $status |= 1; + } + } + } + + close C; +} + +exit $status; diff --git a/bash-5.1/support/config.guess b/bash-5.1/support/config.guess new file mode 100755 index 0000000000000000000000000000000000000000..0fc11edb2d12e8bf868867f181d93e814e724015 --- /dev/null +++ b/bash-5.1/support/config.guess @@ -0,0 +1,1686 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2020 Free Software Foundation, Inc. + +timestamp='2020-11-07' + +# This file 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 . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=$(echo "$0" | sed -e 's,.*/,,') + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2020 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown +UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown +UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown +UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + #include + #ifdef __DEFINED_va_list + LIBC=musl + #else + LIBC=gnu + #endif + #endif + EOF + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)) + case "$UNAME_MACHINE_ARCH" in + aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') + endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi-}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') + ;; + *5.*) + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "$( (/bin/universe) 2>/dev/null)" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case $(/usr/bin/uname -p) in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" + exit ;; + sun4*:SunOS:*:*) + case "$(/usr/bin/arch -k)" in + Series*|S4*) + UNAME_RELEASE=$(uname -v) + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "$(/bin/arch)" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && + SYSTEM_NAME=$("$dummy" "$dummyarg") && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=$(/usr/bin/uname -p) + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + then + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if test -x /usr/bin/oslevel ; then + IBM_REV=$(/usr/bin/oslevel) + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if test -x /usr/bin/lslpp ; then + IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if test -x /usr/bin/getconf; then + sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) + sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if test "$HP_ARCH" = hppa2.0w + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if test -x /usr/sbin/sysversion ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=$(uname -p) + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf + fi + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=$(/usr/bin/uname -p) + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-pc-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" + exit ;; + *:GNU:*:*) + # the GNU system + echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" + exit ;; + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI="$LIBC"x32 + fi + fi + echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case $(/bin/uname -X | grep "^Machine") in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=$( (uname -p) 2>/dev/null) + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if test -d /usr/nec; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + arm64:Darwin:*:*) + echo aarch64-apple-darwin"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=$(uname -p) + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=$(uname -p) + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + # shellcheck disable=SC2154 + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=$( (uname -p) 2>/dev/null) + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; +esac + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 <&2 </dev/null || echo unknown) +uname -r = $( (uname -r) 2>/dev/null || echo unknown) +uname -s = $( (uname -s) 2>/dev/null || echo unknown) +uname -v = $( (uname -v) 2>/dev/null || echo unknown) + +/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) +/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) + +hostinfo = $( (hostinfo) 2>/dev/null) +/bin/universe = $( (/bin/universe) 2>/dev/null) +/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) +/bin/arch = $( (/bin/arch) 2>/dev/null) +/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) +/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF +fi + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/bash-5.1/support/config.rpath b/bash-5.1/support/config.rpath new file mode 100755 index 0000000000000000000000000000000000000000..fc5913d7878bc855696d599b4585c0c44f166449 --- /dev/null +++ b/bash-5.1/support/config.rpath @@ -0,0 +1,684 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2018 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's _LT_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + ecc*) + wl='-Wl,' + ;; + icc* | ifort*) + wl='-Wl,' + ;; + lf95*) + wl='-Wl,' + ;; + nagfor*) + wl='-Wl,-Wl,,' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + xl* | bgxl* | bgf* | mpixl*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + wl= + ;; + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + newsos6) + ;; + *nto* | *qnx*) + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + wl='-Qoption ld ' + ;; + *) + wl='-Wl,' + ;; + esac + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's _LT_LINKER_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32* | cegcc*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + haiku*) + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then + : + else + ld_shlibs=no + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd2.[01]*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + *nto* | *qnx*) + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix[4-9]*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + case "$host_cpu" in + powerpc*) + library_names_spec='$libname$shrext' ;; + m68k) + library_names_spec='$libname.a' ;; + esac + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32* | cegcc*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd[23].*) + library_names_spec='$libname$shrext$versuffix' + ;; + freebsd* | dragonfly*) + library_names_spec='$libname$shrext' + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + haiku*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + *nto* | *qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + tpf*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=$(echo "$0" | sed -e 's,.*/,,') + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2020 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + basic_os=nextstep2 + ;; + *) + basic_os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=$(echo "$basic_machine" | sed 's/-.*//') + ;; + + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if test x$basic_os != x +then + +# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') + ;; + os2-emx) + kernel=os2 + os=$(echo $basic_os | sed -e 's|os2-emx|emx|') + ;; + nto-qnx*) + kernel=nto + os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') + ;; + *-*) + # shellcheck disable=SC2162 + IFS="-" read kernel os <&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) + vendor=acorn + ;; + *-sunos*) + vendor=sun + ;; + *-cnk* | *-aix*) + vendor=ibm + ;; + *-beos*) + vendor=be + ;; + *-hpux*) + vendor=hp + ;; + *-mpeix*) + vendor=hp + ;; + *-hiux*) + vendor=hitachi + ;; + *-unos*) + vendor=crds + ;; + *-dgux*) + vendor=dg + ;; + *-luna*) + vendor=omron + ;; + *-genix*) + vendor=ns + ;; + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) + vendor=ibm + ;; + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) + vendor=sequent + ;; + *-tpf*) + vendor=ibm + ;; + *-vxsim* | *-vxworks* | *-windiss*) + vendor=wrs + ;; + *-aux*) + vendor=apple + ;; + *-hms*) + vendor=hitachi + ;; + *-mpw* | *-macos*) + vendor=apple + ;; + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + vendor=atari + ;; + *-vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-${kernel:+$kernel-}$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/bash-5.1/support/fixlinks b/bash-5.1/support/fixlinks new file mode 100755 index 0000000000000000000000000000000000000000..73b0fa3abb91301686c45590ba440a5c726b4e0a --- /dev/null +++ b/bash-5.1/support/fixlinks @@ -0,0 +1,89 @@ +#! /bin/sh +# +# fixlinks - make symlinks in the bash source tree so that there is +# exactly one version of any given source file. +# +# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# +# 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 . +# + +SRCDIR=. +while [ $# -gt 0 ]; do + case "$1" in + -s) shift; SRCDIR=$1 ;; + -u) unfix=yes ;; + -h) hardlinks=yes ;; + -*) echo "$0: $1: bad option" 1>&2 + echo "$0: usage: $0 [-hu] [-s srcdir] [linkmap]" 1>&2 + exit 1;; + *) break ;; + esac + shift +done + +if [ ! -d $SRCDIR/builtins ]; then + echo "$0: must be run with valid -s argument or from source directory" 1>&2 + exit 1 +fi + +if [ $# -eq 0 ]; then + linkfile=$SRCDIR/support/SYMLINKS +else + linkfile=$1 +fi + +if [ ! -f "$linkfile" ]; then + echo "$0: symlink map file \`$linkfile' does not exist" + exit 1 +fi + +rm_ltmp=false +LINKTEMP=`mktemp -t linktmp.XXXXXXXX 2>/dev/null` +if [ -z "$LINKTEMP" ]; then + : ${TMPDIR:=/tmp} + LINKTEMP=${TMPDIR}/linktmp.$$ + rm_ltmp=true +fi + +$rm_ltmp && rm -f ${LINKTEMP} +# if the user specified hard links, then do that. otherwise, try to use +# symlinks if they're present +if [ -n "$hardlinks" ]; then + LN=ln +elif (ln -s /dev/null ${LINKTEMP}) >/dev/null 2>&1; then + LN="ln -s" +else + LN=ln +fi +rm -f ${LINKTEMP} + +while read name target +do + case "$name" in + \#*) continue;; + esac + + rm -f $name + case "$unfix" in + yes) dirname=`expr "$name" ':' '^\(.*\)/[^/]*'` + [ -z "$dirname" ] && dirname=. + cp $dirname/$target $name + echo $target copied to $name ;; + *) $LN $target $name ; echo "$name -> $target" ;; + esac + +done < $linkfile + +exit 0 diff --git a/bash-5.1/support/install.sh b/bash-5.1/support/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..0cac004e6dce38456fc54e6e7dac614caa662e12 --- /dev/null +++ b/bash-5.1/support/install.sh @@ -0,0 +1,247 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5. +# +# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +tranformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/bash-5.1/support/man2html.c b/bash-5.1/support/man2html.c new file mode 100644 index 0000000000000000000000000000000000000000..e6f441b4a353ebff7c2875ae6e13c668df88d8d1 --- /dev/null +++ b/bash-5.1/support/man2html.c @@ -0,0 +1,4088 @@ +/* + * This program was written by Richard Verhoeven (NL:5482ZX35) + * at the Eindhoven University of Technology. Email: rcb5@win.tue.nl + * + * Permission is granted to distribute, modify and use this program as long + * as this comment is not removed or changed. + * + * THIS IS A MODIFIED VERSION. IT WAS MODIFIED BY chet@po.cwru.edu FOR + * USE BY BASH. + */ + +/* + * man2html will add links to the converted manpages. The function add_links + * is used for that. At the moment it will add links as follows, where + * indicates what should match to start with: + * ^^^ + * Recognition Item Link + * ---------------------------------------------------------- + * name(*) Manpage ../man?/name.* + * ^ + * name@hostname Email address mailto:name@hostname + * ^ + * method://string URL method://string + * ^^^ + * www.host.name WWW server http://www.host.name + * ^^^^ + * ftp.host.name FTP server ftp://ftp.host.name + * ^^^^ + * Include file file:/usr/include/file.h + * ^^^ + * + * Since man2html does not check if manpages, hosts or email addresses exist, + * some links might not work. For manpages, some extra checks are performed + * to make sure not every () pair creates a link. Also out of date pages + * might point to incorrect places. + * + * The program will not allow users to get system specific files, such as + * /etc/passwd. It will check that "man" is part of the specified file and + * that "/../" isn't. Even if someone manages to get such file, man2html will + * handle it like a manpage and will usually not produce any output (or crash). + * + * If you find any bugs when normal manpages are converted, please report + * them to me (rcb5@win.tue.nl) after you have checked that man(1) can handle + * the manpage correct. + * + * Known bugs and missing features: + * + * * Equations are not converted at all. + * * Tables are converted but some features are not possible in html. + * * The tabbing environment is converted by counting characters and adding + * spaces. This might go wrong (outside
)
+ *  * Some pages look better if man2html works in troff mode, especially pages
+ *    with tables. You can decide at compile time which made you want to use.
+ *
+ *    -DNROFF=0     troff mode
+ *    -DNROFF=1     nroff mode   (default)
+ *
+ *    if you install both modes, you should compile with the correct CGIBASE.
+ *  * Some manpages rely on the fact that troff/nroff is used to convert
+ *    them and use features which are not descripted in the man manpages.
+ *    (definitions, calculations, conditionals, requests). I can't guarantee
+ *    that all these features work on all manpages. (I didn't have the
+ *    time to look through all the available manpages.)
+ */
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
+#define NROFF 0
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define NULL_TERMINATED(n) ((n) + 1)
+
+#define HUGE_STR_MAX  10000
+#define LARGE_STR_MAX 2000
+#define MED_STR_MAX   500
+#define SMALL_STR_MAX 100
+#define TINY_STR_MAX  10
+
+#define MAX_MAN_PATHS 100	/* Max number of directories */
+#define MAX_ZCATS     10	/* Max number of zcat style programs */
+#define MAX_WORDLIST  100
+
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+#ifndef EXIT_USAGE
+#define EXIT_USAGE 2
+#endif
+
+static char location_base[NULL_TERMINATED(MED_STR_MAX)] = "";
+
+static char th_page_and_sec[128] = { '\0' };
+static char th_datestr[128] = { '\0' };
+static char th_version[128] = { '\0' };
+
+char   *signature = "
\nThis document was created by man2html from %s.
\nTime: %s\n"; + +/* timeformat for signature */ +#define TIMEFORMAT "%d %B %Y %T %Z" + +char *manpage; + +/* BSD mandoc Bl/El lists to HTML list types */ +#define BL_DESC_LIST 1 +#define BL_BULLET_LIST 2 +#define BL_ENUM_LIST 4 + +/* BSD mandoc Bd/Ed example(?) blocks */ +#define BD_LITERAL 1 +#define BD_INDENT 2 + +#ifndef HAVE_STRERROR +static char * +strerror(int e) +{ + static char emsg[40]; + +#if defined (HAVE_SYS_ERRLIST) + extern int sys_nerr; + extern char *sys_errlist[]; + + if (e > 0 && e < sys_nerr) + return (sys_errlist[e]); + else +#endif /* HAVE_SYS_ERRLIST */ + { + sprintf(emsg, "Unknown system error %d", e); + return (&emsg[0]); + } +} +#endif /* !HAVE_STRERROR */ + +static char * +strgrow(char *old, int len) +{ + char *new = realloc(old, (strlen(old) + len + 1) * sizeof(char)); + + if (!new) { + fprintf(stderr, "man2html: out of memory"); + exit(EXIT_FAILURE); + } + return new; +} + +static char * +stralloc(int len) +{ + /* allocate enough for len + NULL */ + char *new = malloc((len + 1) * sizeof(char)); + + if (!new) { + fprintf(stderr, "man2html: out of memory"); + exit(EXIT_FAILURE); + } + return new; +} + +void * +xmalloc (size_t size) +{ + void *ret; + + ret = malloc (size); + if (ret == 0) { + fprintf(stderr, "man2html: out of memory"); + exit(EXIT_FAILURE); + } + return ret; +} + +/* + * Some systems don't have strdup so lets use our own - which can also + * check for out of memory. + */ +static char * +strduplicate(char *from) +{ + char *new = stralloc(strlen(from)); + + strcpy(new, from); + return new; +} + +/* Assumes space for n plus a null */ +static char * +strmaxcpy(char *to, char *from, int n) +{ + int len = strlen(from); + + strncpy(to, from, n); + to[(len <= n) ? len : n] = '\0'; + return to; +} + +static char * +strmaxcat(char *to, char *from, int n) +{ + int to_len = strlen(to); + + if (to_len < n) { + int from_len = strlen(from); + int cp = (to_len + from_len <= n) ? from_len : n - to_len; + + strncpy(to + to_len, from, cp); + to[to_len + cp] = '\0'; + } + return to; +} + +/* Assumes space for limit plus a null */ +static char * +strlimitcpy(char *to, char *from, int n, int limit) +{ + int len = n > limit ? limit : n; + + strmaxcpy(to, from, len); + to[len] = '\0'; + return to; +} + +/* + * takes string and escapes all metacharacters. should be used before + * including string in system() or similar call. + */ +static char * +escape_input(char *str) +{ + int i, j = 0; + static char new[NULL_TERMINATED(MED_STR_MAX)]; + + if (strlen(str) * 2 + 1 > MED_STR_MAX) { + fprintf(stderr, + "man2html: escape_input - str too long:\n%-80s...\n", + str); + exit(EXIT_FAILURE); + } + for (i = 0; i < strlen(str); i++) { + if (!(((str[i] >= 'A') && (str[i] <= 'Z')) || + ((str[i] >= 'a') && (str[i] <= 'z')) || + ((str[i] >= '0') && (str[i] <= '9')))) { + new[j] = '\\'; + j++; + } + new[j] = str[i]; + j++; + } + new[j] = '\0'; + return new; +} + +static void +usage(void) +{ + fprintf(stderr, "man2html: usage: man2html filename\n"); +} + + + +/* + * below this you should not change anything unless you know a lot + * about this program or about troff. + */ + +typedef struct STRDEF STRDEF; +struct STRDEF { + int nr, slen; + char *st; + STRDEF *next; +}; + +typedef struct INTDEF INTDEF; +struct INTDEF { + int nr; + int val; + int incr; + INTDEF *next; +}; + +static char NEWLINE[2] = "\n"; +static char idxlabel[6] = "ixAAA"; + +#define INDEXFILE "/tmp/manindex.list" + +static char *fname; +static FILE *idxfile; + +static STRDEF *chardef, *strdef, *defdef; +static INTDEF *intdef; + +#define V(A,B) ((A)*256+(B)) + +static INTDEF standardint[] = { + {V('n', ' '), NROFF, 0, NULL}, + {V('t', ' '), 1 - NROFF, 0, NULL}, + {V('o', ' '), 1, 0, NULL}, + {V('e', ' '), 0, 0, NULL}, + {V('.', 'l'), 70, 0, NULL}, + {V('.', '$'), 0, 0, NULL}, + {V('.', 'A'), NROFF, 0, NULL}, + {V('.', 'T'), 1 - NROFF, 0, NULL}, + {V('.', 'V'), 1, 0, NULL}, /* the me package tests for this */ +{0, 0, 0, NULL}}; + +static STRDEF standardstring[] = { + {V('R', ' '), 1, "®", NULL}, + {V('l', 'q'), 2, "``", NULL}, + {V('r', 'q'), 2, "''", NULL}, + {0, 0, NULL, NULL} +}; + + +static STRDEF standardchar[] = { + {V('*', '*'), 1, "*", NULL}, + {V('*', 'A'), 1, "A", NULL}, + {V('*', 'B'), 1, "B", NULL}, + {V('*', 'C'), 2, "Xi", NULL}, + {V('*', 'D'), 5, "Delta", NULL}, + {V('*', 'E'), 1, "E", NULL}, + {V('*', 'F'), 3, "Phi", NULL}, + {V('*', 'G'), 5, "Gamma", NULL}, + {V('*', 'H'), 5, "Theta", NULL}, + {V('*', 'I'), 1, "I", NULL}, + {V('*', 'K'), 1, "K", NULL}, + {V('*', 'L'), 6, "Lambda", NULL}, + {V('*', 'M'), 1, "M", NULL}, + {V('*', 'N'), 1, "N", NULL}, + {V('*', 'O'), 1, "O", NULL}, + {V('*', 'P'), 2, "Pi", NULL}, + {V('*', 'Q'), 3, "Psi", NULL}, + {V('*', 'R'), 1, "P", NULL}, + {V('*', 'S'), 5, "Sigma", NULL}, + {V('*', 'T'), 1, "T", NULL}, + {V('*', 'U'), 1, "Y", NULL}, + {V('*', 'W'), 5, "Omega", NULL}, + {V('*', 'X'), 1, "X", NULL}, + {V('*', 'Y'), 1, "H", NULL}, + {V('*', 'Z'), 1, "Z", NULL}, + {V('*', 'a'), 5, "alpha", NULL}, + {V('*', 'b'), 4, "beta", NULL}, + {V('*', 'c'), 2, "xi", NULL}, + {V('*', 'd'), 5, "delta", NULL}, + {V('*', 'e'), 7, "epsilon", NULL}, + {V('*', 'f'), 3, "phi", NULL}, + {V('*', 'g'), 5, "gamma", NULL}, + {V('*', 'h'), 5, "theta", NULL}, + {V('*', 'i'), 4, "iota", NULL}, + {V('*', 'k'), 5, "kappa", NULL}, + {V('*', 'l'), 6, "lambda", NULL}, + {V('*', 'm'), 1, "µ", NULL}, + {V('*', 'n'), 2, "nu", NULL}, + {V('*', 'o'), 1, "o", NULL}, + {V('*', 'p'), 2, "pi", NULL}, + {V('*', 'q'), 3, "psi", NULL}, + {V('*', 'r'), 3, "rho", NULL}, + {V('*', 's'), 5, "sigma", NULL}, + {V('*', 't'), 3, "tau", NULL}, + {V('*', 'u'), 7, "upsilon", NULL}, + {V('*', 'w'), 5, "omega", NULL}, + {V('*', 'x'), 3, "chi", NULL}, + {V('*', 'y'), 3, "eta", NULL}, + {V('*', 'z'), 4, "zeta", NULL}, + {V('t', 's'), 5, "sigma", NULL}, + {V('+', '-'), 1, "±", NULL}, + {V('1', '2'), 1, "½", NULL}, + {V('1', '4'), 1, "¼", NULL}, + {V('3', '4'), 1, "¾", NULL}, + {V('F', 'i'), 3, "ffi", NULL}, + {V('F', 'l'), 3, "ffl", NULL}, + {V('a', 'a'), 1, "´", NULL}, + {V('a', 'p'), 1, "~", NULL}, + {V('b', 'r'), 1, "|", NULL}, + {V('b', 'u'), 1, "*", NULL}, + {V('b', 'v'), 1, "|", NULL}, + {V('c', 'i'), 1, "o", NULL}, + {V('c', 'o'), 1, "©", NULL}, + {V('c', 't'), 1, "¢", NULL}, + {V('d', 'e'), 1, "°", NULL}, + {V('d', 'g'), 1, "+", NULL}, + {V('d', 'i'), 1, "÷", NULL}, + {V('e', 'm'), 1, "-", NULL}, + {V('e', 'm'), 3, "---", NULL}, + {V('e', 'q'), 1, "=", NULL}, + {V('e', 's'), 1, "Ø", NULL}, + {V('f', 'f'), 2, "ff", NULL}, + {V('f', 'i'), 2, "fi", NULL}, + {V('f', 'l'), 2, "fl", NULL}, + {V('f', 'm'), 1, "´", NULL}, + {V('g', 'a'), 1, "`", NULL}, + {V('h', 'y'), 1, "-", NULL}, + {V('l', 'c'), 2, "|¯", NULL}, + {V('l', 'f'), 2, "|_", NULL}, + {V('l', 'k'), 1, "{", NULL}, + {V('m', 'i'), 1, "-", NULL}, + {V('m', 'u'), 1, "×", NULL}, + {V('n', 'o'), 1, "¬", NULL}, + {V('o', 'r'), 1, "|", NULL}, + {V('p', 'l'), 1, "+", NULL}, + {V('r', 'c'), 2, "¯|", NULL}, + {V('r', 'f'), 2, "_|", NULL}, + {V('r', 'g'), 1, "®", NULL}, + {V('r', 'k'), 1, "}", NULL}, + {V('r', 'n'), 1, "¯", NULL}, + {V('r', 'u'), 1, "_", NULL}, + {V('s', 'c'), 1, "§", NULL}, + {V('s', 'l'), 1, "/", NULL}, + {V('s', 'q'), 2, "[]", NULL}, + {V('u', 'l'), 1, "_", NULL}, + {0, 0, NULL, NULL} +}; + +/* default: print code */ + + +static char eqndelimopen = 0, eqndelimclose = 0; +static char escapesym = '\\', nobreaksym = '\'', controlsym = '.', fieldsym = 0, padsym = 0; + +static char *buffer = NULL; +static int buffpos = 0, buffmax = 0; +static int scaninbuff = 0; +static int itemdepth = 0; +static int dl_set[20] = {0}; +static int still_dd = 0; +static int tabstops[20] = {8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96}; +static int maxtstop = 12; +static int curpos = 0; + +static char *scan_troff(char *c, int san, char **result); +static char *scan_troff_mandoc(char *c, int san, char **result); + +static char **argument = NULL; + +static char charb[TINY_STR_MAX]; + +static void +print_sig(void) +{ + char datbuf[NULL_TERMINATED(MED_STR_MAX)]; + struct tm *timetm; + time_t clock; + + datbuf[0] = '\0'; + clock = time(NULL); + timetm = localtime(&clock); + strftime(datbuf, MED_STR_MAX, TIMEFORMAT, timetm); + printf(signature, manpage, datbuf); +} + +static char * +expand_char(int nr) +{ + STRDEF *h; + + h = chardef; + if (!nr) + return NULL; + while (h) + if (h->nr == nr) { + curpos += h->slen; + return h->st; + } else + h = h->next; + charb[0] = nr / 256; + charb[1] = nr % 256; + charb[2] = '\0'; + if (charb[0] == '<') { /* Fix up <= */ + charb[4] = charb[1]; + strncpy(charb, "<", 4); + charb[5] = '\0'; + } + curpos += 2; + return charb; +} + +static char * +expand_string(int nr) +{ + STRDEF *h = strdef; + + if (!nr) + return NULL; + while (h) + if (h->nr == nr) { + curpos += h->slen; + return h->st; + } else + h = h->next; + return NULL; +} + +static char * +read_man_page(char *filename) +{ + char *man_buf = NULL; + int i; + FILE *man_stream = NULL; + struct stat stbuf; + int buf_size; + + if (stat(filename, &stbuf) == -1) + return NULL; + + buf_size = stbuf.st_size; + man_buf = stralloc(buf_size + 5); + man_stream = fopen(filename, "r"); + if (man_stream) { + man_buf[0] = '\n'; + if (fread(man_buf + 1, 1, buf_size, man_stream) == buf_size) { + man_buf[buf_size] = '\n'; + man_buf[buf_size + 1] = man_buf[buf_size + 2] = '\0'; + } else { + free(man_buf); + man_buf = NULL; + } + fclose(man_stream); + } + return man_buf; +} + + +static char outbuffer[NULL_TERMINATED(HUGE_STR_MAX)]; +static int obp = 0; +static int no_newline_output = 0; +static int newline_for_fun = 0; +static int output_possible = 0; +static int out_length = 0; + +/* + * Add the links to the output. At the moment the following are + * recognized: + * +#if 0 + * name(*) -> ../man?/name.* +#endif + * method://string -> method://string + * www.host.name -> http://www.host.name + * ftp.host.name -> ftp://ftp.host.name + * name@host -> mailto:name@host + * -> file:/usr/include/name.h (guess) + * + * Other possible links to add in the future: + * + * /dir/dir/file -> file:/dir/dir/file + */ +static void +add_links(char *c) +{ + int i, j, nr; + char *f, *g, *h; + char *idtest[6]; /* url, mailto, www, ftp, manpage */ + + out_length += strlen(c); + /* search for (section) */ + nr = 0; + idtest[0] = strstr(c + 1, "://"); + idtest[1] = strchr(c + 1, '@'); + idtest[2] = strstr(c, "www."); + idtest[3] = strstr(c, "ftp."); +#if 0 + idtest[4] = strchr(c + 1, '('); +#else + idtest[4] = 0; +#endif + idtest[5] = strstr(c + 1, ".h>"); + for (i = 0; i < 6; i++) + nr += (idtest[i] != NULL); + while (nr) { + j = -1; + for (i = 0; i < 6; i++) + if (idtest[i] && (j < 0 || idtest[i] < idtest[j])) + j = i; + switch (j) { + case 5: /* */ + f = idtest[5]; + h = f + 2; + g = f; + while (g > c && g[-1] != ';') + g--; + if (g != c) { + char t; + + t = *g; + *g = '\0'; + fputs(c, stdout); + *g = t; + *h = '\0'; + printf("%s>", g, g); + c = f + 6; + } else { + f[5] = '\0'; + fputs(c, stdout); + f[5] = ';'; + c = f + 5; + } + break; + case 4: /* manpage */ +#if 0 + f = idtest[j]; + /* check section */ + g = strchr(f, ')'); + if (g && f - g < 6 && (isalnum(f[-1]) || f[-1] == '>') && + ((isdigit(f[1]) && f[1] != '0' && + (f[2] == ')' || (isalpha(f[2]) && f[3] == ')') || f[2] == 'X')) || + (f[2] == ')' && (f[1] == 'n' || f[1] == 'l')))) { + /* this might be a link */ + h = f - 1; + /* skip html makeup */ + while (h > c && *h == '>') { + while (h != c && *h != '<') + h--; + if (h != c) + h--; + } + if (isalnum(*h)) { + char t, sec, subsec, *e; + + e = h + 1; + sec = f[1]; + subsec = f[2]; + if ((subsec == 'X' && f[3] != ')') || subsec == ')') + subsec = '\0'; + while (h > c && (isalnum(h[-1]) || h[-1] == '_' || + h[-1] == '-' || h[-1] == '.')) + h--; + t = *h; + *h = '\0'; + fputs(c, stdout); + *h = t; + t = *e; + *e = '\0'; + if (subsec) + printf("%s", + sec, h, sec, tolower(subsec), h); + else + printf("%s", + sec, h, sec, h); + *e = t; + c = e; + } + } + *f = '\0'; + fputs(c, stdout); + *f = '('; + idtest[4] = f - 1; + c = f; +#endif + break; /* manpage */ + case 3: /* ftp */ + case 2: /* www */ + g = f = idtest[j]; + while (*g && (isalnum(*g) || *g == '_' || *g == '-' || *g == '+' || + *g == '.')) + g++; + if (g[-1] == '.') + g--; + if (g - f > 4) { + char t; + + t = *f; + *f = '\0'; + fputs(c, stdout); + *f = t; + t = *g; + *g = '\0'; + printf("%s", (j == 3 ? "ftp" : "http"), + f, f); + *g = t; + c = g; + } else { + f[3] = '\0'; + fputs(c, stdout); + c = f + 3; + f[3] = '.'; + } + break; + case 1: /* mailto */ + g = f = idtest[1]; + while (g > c && (isalnum(g[-1]) || g[-1] == '_' || g[-1] == '-' || + g[-1] == '+' || g[-1] == '.' || g[-1] == '%')) + g--; + h = f + 1; + while (*h && (isalnum(*h) || *h == '_' || *h == '-' || *h == '+' || + *h == '.')) + h++; + if (*h == '.') + h--; + if (h - f > 4 && f - g > 1) { + char t; + + t = *g; + *g = '\0'; + fputs(c, stdout); + *g = t; + t = *h; + *h = '\0'; + printf("%s", g, g); + *h = t; + c = h; + } else { + *f = '\0'; + fputs(c, stdout); + *f = '@'; + idtest[1] = c; + c = f; + } + break; + case 0: /* url */ + g = f = idtest[0]; + while (g > c && isalpha(g[-1]) && islower(g[-1])) + g--; + h = f + 3; + while (*h && !isspace(*h) && *h != '<' && *h != '>' && *h != '"' && + *h != '&') + h++; + if (f - g > 2 && f - g < 7 && h - f > 3) { + char t; + + t = *g; + *g = '\0'; + fputs(c, stdout); + *g = t; + t = *h; + *h = '\0'; + printf("%s", g, g); + *h = t; + c = h; + } else { + f[1] = '\0'; + fputs(c, stdout); + f[1] = '/'; + c = f + 1; + } + break; + default: + break; + } + nr = 0; + if (idtest[0] && idtest[0] < c) + idtest[0] = strstr(c + 1, "://"); + if (idtest[1] && idtest[1] < c) + idtest[1] = strchr(c + 1, '@'); + if (idtest[2] && idtest[2] < c) + idtest[2] = strstr(c, "www."); + if (idtest[3] && idtest[3] < c) + idtest[3] = strstr(c, "ftp."); + if (idtest[4] && idtest[4] < c) + idtest[4] = strchr(c + 1, '('); + if (idtest[5] && idtest[5] < c) + idtest[5] = strstr(c + 1, ".h>"); + for (i = 0; i < 6; i++) + nr += (idtest[i] != NULL); + } + fputs(c, stdout); +} + +static int current_font = 0; +static int current_size = 0; +static int fillout = 1; + +static void +out_html(char *c) +{ + if (!c) + return; + if (no_newline_output) { + int i = 0; + + no_newline_output = 1; + while (c[i]) { + if (!no_newline_output) + c[i - 1] = c[i]; + if (c[i] == '\n') + no_newline_output = 1; + i++; + } + if (!no_newline_output) + c[i - 1] = 0; + } + if (scaninbuff) { + while (*c) { + if (buffpos >= buffmax) { + char *h; + + h = realloc(buffer, buffmax * 2); + if (!h) + return; + buffer = h; + buffmax *= 2; + } + buffer[buffpos++] = *c++; + } + } else if (output_possible) { + while (*c) { + outbuffer[obp++] = *c; + if (*c == '\n' || obp > HUGE_STR_MAX) { + outbuffer[obp] = '\0'; + add_links(outbuffer); + obp = 0; + } + c++; + } + } +} + +#define FO0 "" +#define FC0 "" +#define FO1 "" +#define FC1 "" +#define FO2 "" +#define FC2 "" +#define FO3 "" +#define FC3 "" + +static char *switchfont[16] = { + "", FC0 FO1, FC0 FO2, FC0 FO3, + FC1 FO0, "", FC1 FO2, FC1 FO3, + FC2 FO0, FC2 FO1, "", FC2 FO3, + FC3 FO0, FC3 FO1, FC3 FO2, "" +}; + +static char * +change_to_font(int nr) +{ + int i; + + switch (nr) { + case '0': + nr++; + case '1': + case '2': + case '3': + case '4': + nr = nr - '1'; + break; + case V('C', 'W'): + nr = 3; + break; + case 'L': + nr = 3; + break; + case 'B': + nr = 2; + break; + case 'I': + nr = 1; + break; + case 'P': + case 'R': + nr = 0; + break; + case 0: + case 1: + case 2: + case 3: + break; + default: + nr = 0; + break; + } + i = current_font * 4 + nr % 4; + current_font = nr % 4; + return switchfont[i]; +} + +static char sizebuf[200]; + +static char * +change_to_size(int nr) +{ + int i; + + switch (nr) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + nr = nr - '0'; + break; + case '\0': + break; + default: + nr = current_size + nr; + if (nr > 9) + nr = 9; + if (nr < -9) + nr = -9; + break; + } + if (nr == current_size) + return ""; + i = current_font; + sizebuf[0] = '\0'; + strcat(sizebuf, change_to_font(0)); + if (current_size) + strcat(sizebuf, ""); + current_size = nr; + if (nr) { + int l; + + strcat(sizebuf, "nr != i) + intd = intd->next; + if (intd) { + intd->val = intd->val + j * intd->incr; + intresult = intd->val; + } else { + switch (i) { + case V('.', 's'): + intresult = current_size; + break; + case V('.', 'f'): + intresult = current_font; + break; + default: + intresult = 0; + break; + } + } + h = ""; + break; + case 'w': + c++; + i = *c; + c++; + exoutputp = output_possible; + exskipescape = skip_escape; + output_possible = 0; + skip_escape = 1; + j = 0; + while (*c != i) { + j++; + if (*c == escapesym) + c = scan_escape(c + 1); + else + c++; + } + output_possible = exoutputp; + skip_escape = exskipescape; + intresult = j; + break; + case 'l': + h = "
"; + curpos = 0; + case 'b': + case 'v': + case 'x': + case 'o': + case 'L': + case 'h': + c++; + i = *c; + c++; + exoutputp = output_possible; + exskipescape = skip_escape; + output_possible = 0; + skip_escape = 1; + while (*c != i) + if (*c == escapesym) + c = scan_escape(c + 1); + else + c++; + output_possible = exoutputp; + skip_escape = exskipescape; + break; + case 'c': + no_newline_output = 1; + break; + case '{': + newline_for_fun++; + h = ""; + break; + case '}': + if (newline_for_fun) + newline_for_fun--; + h = ""; + break; + case 'p': + h = "
\n"; + curpos = 0; + break; + case 't': + h = "\t"; + curpos = (curpos + 8) & 0xfff8; + break; + case '<': + h = "<"; + curpos++; + break; + case '>': + h = ">"; + curpos++; + break; + case '\\': + if (single_escape) { + c--; + break; + } + default: + b[0] = *c; + b[1] = 0; + h = b; + curpos++; + break; + } + c++; + if (!skip_escape) + out_html(h); + return c; +} + +typedef struct TABLEITEM TABLEITEM; + +struct TABLEITEM { + char *contents; + int size, align, valign, colspan, rowspan, font, vleft, vright, space, + width; + TABLEITEM *next; +}; + +static TABLEITEM emptyfield = {NULL, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, NULL}; + +typedef struct TABLEROW TABLEROW; + +struct TABLEROW { + TABLEITEM *first; + TABLEROW *prev, *next; +}; + +static char *tableopt[] = { + "center", "expand", "box", "allbox", "doublebox", + "tab", "linesize", "delim", NULL +}; +static int tableoptl[] = {6, 6, 3, 6, 9, 3, 8, 5, 0}; + +static void +clear_table(TABLEROW * table) +{ + TABLEROW *tr1, *tr2; + TABLEITEM *ti1, *ti2; + + tr1 = table; + while (tr1->prev) + tr1 = tr1->prev; + while (tr1) { + ti1 = tr1->first; + while (ti1) { + ti2 = ti1->next; + if (ti1->contents) + free(ti1->contents); + free(ti1); + ti1 = ti2; + } + tr2 = tr1; + tr1 = tr1->next; + free(tr2); + } +} + +static char *scan_expression(char *c, int *result); + +static char * +scan_format(char *c, TABLEROW ** result, int *maxcol) +{ + TABLEROW *layout, *currow; + TABLEITEM *curfield; + int i, j; + + if (*result) { + clear_table(*result); + } + layout = currow = (TABLEROW *) xmalloc(sizeof(TABLEROW)); + currow->next = currow->prev = NULL; + currow->first = curfield = (TABLEITEM *) xmalloc(sizeof(TABLEITEM)); + *curfield = emptyfield; + while (*c && *c != '.') { + switch (*c) { + case 'C': + case 'c': + case 'N': + case 'n': + case 'R': + case 'r': + case 'A': + case 'a': + case 'L': + case 'l': + case 'S': + case 's': + case '^': + case '_': + if (curfield->align) { + curfield->next = (TABLEITEM *) xmalloc(sizeof(TABLEITEM)); + curfield = curfield->next; + *curfield = emptyfield; + } + curfield->align = toupper(*c); + c++; + break; + case 'i': + case 'I': + case 'B': + case 'b': + curfield->font = toupper(*c); + c++; + break; + case 'f': + case 'F': + c++; + curfield->font = toupper(*c); + c++; + if (!isspace(*c)) + c++; + break; + case 't': + case 'T': + curfield->valign = 't'; + c++; + break; + case 'p': + case 'P': + c++; + i = j = 0; + if (*c == '+') { + j = 1; + c++; + } + if (*c == '-') { + j = -1; + c++; + } + while (isdigit(*c)) + i = i * 10 + (*c++) - '0'; + if (j) + curfield->size = i * j; + else + curfield->size = j - 10; + break; + case 'v': + case 'V': + case 'w': + case 'W': + c = scan_expression(c + 2, &curfield->width); + break; + case '|': + if (curfield->align) + curfield->vleft++; + else + curfield->vright++; + c++; + break; + case 'e': + case 'E': + c++; + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + i = 0; + while (isdigit(*c)) + i = i * 10 + (*c++) - '0'; + curfield->space = i; + break; + case ',': + case '\n': + currow->next = (TABLEROW *) xmalloc(sizeof(TABLEROW)); + currow->next->prev = currow; + currow = currow->next; + currow->next = NULL; + curfield = currow->first = (TABLEITEM *) xmalloc(sizeof(TABLEITEM)); + *curfield = emptyfield; + c++; + break; + default: + c++; + break; + } + } + if (*c == '.') + while (*c++ != '\n'); + *maxcol = 0; + currow = layout; + while (currow) { + curfield = layout->first; + i = 0; + while (curfield) { + i++; + curfield = curfield->next; + } + if (i > *maxcol) + *maxcol = i; + currow = currow->next; + } + *result = layout; + return c; +} + +static TABLEROW * +next_row(TABLEROW * tr) +{ + if (tr->next) { + tr = tr->next; + if (!tr->next) + next_row(tr); + return tr; + } else { + TABLEITEM *ti, *ti2; + + tr->next = (TABLEROW *) xmalloc(sizeof(TABLEROW)); + tr->next->prev = tr; + ti = tr->first; + tr = tr->next; + tr->next = NULL; + if (ti) + tr->first = ti2 = (TABLEITEM *) xmalloc(sizeof(TABLEITEM)); + else + tr->first = ti2 = NULL; + while (ti != ti2) { + *ti2 = *ti; + ti2->contents = NULL; + if ((ti = ti->next)) { + ti2->next = (TABLEITEM *) xmalloc(sizeof(TABLEITEM)); + } + ti2 = ti2->next; + } + return tr; + } +} + +static char itemreset[20] = "\\fR\\s0"; + +static char * +scan_table(char *c) +{ + char *t, *h, *g; + int center = 0, expand = 0, box = 0, border = 0, linesize = 1; + int i, j, maxcol = 0, finished = 0; + int oldfont, oldsize, oldfillout; + char itemsep = '\t'; + TABLEROW *layout = NULL, *currow, *ftable; + TABLEITEM *curfield; + + while (*c++ != '\n'); + h = c; + if (*h == '.') + return c - 1; + oldfont = current_font; + oldsize = current_size; + oldfillout = fillout; + out_html(change_to_font(0)); + out_html(change_to_size(0)); + if (!fillout) { + fillout = 1; + out_html("
"); + } + while (*h && *h != '\n') + h++; + if (h[-1] == ';') { + /* scan table options */ + while (c < h) { + while (isspace(*c)) + c++; + for (i = 0; tableopt[i] && strncmp(tableopt[i], c, tableoptl[i]); i++); + c = c + tableoptl[i]; + switch (i) { + case 0: + center = 1; + break; + case 1: + expand = 1; + break; + case 2: + box = 1; + break; + case 3: + border = 1; + break; + case 4: + box = 2; + break; + case 5: + while (*c++ != '('); + itemsep = *c++; + break; + case 6: + while (*c++ != '('); + linesize = 0; + while (isdigit(*c)) + linesize = linesize * 10 + (*c++) - '0'; + break; + case 7: + while (*c != ')') + c++; + default: + break; + } + c++; + } + c = h + 1; + } + /* scan layout */ + c = scan_format(c, &layout, &maxcol); + currow = layout; + next_row(currow); + curfield = layout->first; + i = 0; + while (!finished) { + /* search item */ + h = c; + if ((*c == '_' || *c == '=') && (c[1] == itemsep || c[1] == '\n')) { + if (c[-1] == '\n' && c[1] == '\n') { + if (currow->prev) { + currow->prev->next = (TABLEROW *) xmalloc(sizeof(TABLEROW)); + currow->prev->next->next = currow; + currow->prev->next->prev = currow->prev; + currow->prev = currow->prev->next; + } else { + currow->prev = layout = (TABLEROW *) xmalloc(sizeof(TABLEROW)); + currow->prev->prev = NULL; + currow->prev->next = currow; + } + curfield = currow->prev->first = + (TABLEITEM *) xmalloc(sizeof(TABLEITEM)); + *curfield = emptyfield; + curfield->align = *c; + curfield->colspan = maxcol; + curfield = currow->first; + c = c + 2; + } else { + if (curfield) { + curfield->align = *c; + do { + curfield = curfield->next; + } while (curfield && curfield->align == 'S'); + } + if (c[1] == '\n') { + currow = next_row(currow); + curfield = currow->first; + } + c = c + 2; + } + } else if (*c == 'T' && c[1] == '{') { + h = c + 2; + c = strstr(h, "\nT}"); + c++; + *c = '\0'; + g = NULL; + scan_troff(h, 0, &g); + scan_troff(itemreset, 0, &g); + *c = 'T'; + c += 3; + if (curfield) { + curfield->contents = g; + do { + curfield = curfield->next; + } while (curfield && curfield->align == 'S'); + } else if (g) + free(g); + if (c[-1] == '\n') { + currow = next_row(currow); + curfield = currow->first; + } + } else if (*c == '.' && c[1] == 'T' && c[2] == '&' && c[-1] == '\n') { + TABLEROW *hr; + + while (*c++ != '\n'); + hr = currow; + currow = currow->prev; + hr->prev = NULL; + c = scan_format(c, &hr, &i); + hr->prev = currow; + currow->next = hr; + currow = hr; + next_row(currow); + curfield = currow->first; + } else if (*c == '.' && c[1] == 'T' && c[2] == 'E' && c[-1] == '\n') { + finished = 1; + while (*c++ != '\n'); + if (currow->prev) + currow->prev->next = NULL; + currow->prev = NULL; + clear_table(currow); + } else if (*c == '.' && c[-1] == '\n' && !isdigit(c[1])) { + /* + * skip troff request inside table (usually only .sp + * ) + */ + while (*c++ != '\n'); + } else { + h = c; + while (*c && (*c != itemsep || c[-1] == '\\') && + (*c != '\n' || c[-1] == '\\')) + c++; + i = 0; + if (*c == itemsep) { + i = 1; + *c = '\n'; + } + if (h[0] == '\\' && h[2] == '\n' && + (h[1] == '_' || h[1] == '^')) { + if (curfield) { + curfield->align = h[1]; + do { + curfield = curfield->next; + } while (curfield && curfield->align == 'S'); + } + h = h + 3; + } else { + g = NULL; + h = scan_troff(h, 1, &g); + scan_troff(itemreset, 0, &g); + if (curfield) { + curfield->contents = g; + do { + curfield = curfield->next; + } while (curfield && curfield->align == 'S'); + } else if (g) + free(g); + } + if (i) + *c = itemsep; + c = h; + if (c[-1] == '\n') { + currow = next_row(currow); + curfield = currow->first; + } + } + } + /* calculate colspan and rowspan */ + currow = layout; + while (currow->next) + currow = currow->next; + while (currow) { + TABLEITEM *ti, *ti1 = NULL, *ti2 = NULL; + + ti = currow->first; + if (currow->prev) + ti1 = currow->prev->first; + while (ti) { + switch (ti->align) { + case 'S': + if (ti2) { + ti2->colspan++; + if (ti2->rowspan < ti->rowspan) + ti2->rowspan = ti->rowspan; + } + break; + case '^': + if (ti1) + ti1->rowspan++; + default: + if (!ti2) + ti2 = ti; + else { + do { + ti2 = ti2->next; + } while (ti2 && curfield->align == 'S'); + } + break; + } + ti = ti->next; + if (ti1) + ti1 = ti1->next; + } + currow = currow->prev; + } + /* produce html output */ + if (center) + out_html("
"); + if (box == 2) + out_html(""); + curfield = currow->first; + while (curfield) { + if (curfield->align != 'S' && curfield->align != '^') { + out_html("align) { + case 'N': + curfield->space += 4; + case 'R': + out_html(" ALIGN=right"); + break; + case 'C': + out_html(" ALIGN=center"); + default: + break; + } + if (!curfield->valign && curfield->rowspan > 1) + out_html(" VALIGN=center"); + if (curfield->colspan > 1) { + char buf[5]; + + out_html(" COLSPAN="); + sprintf(buf, "%i", curfield->colspan); + out_html(buf); + } + if (curfield->rowspan > 1) { + char buf[5]; + + out_html(" ROWSPAN="); + sprintf(buf, "%i", curfield->rowspan); + out_html(buf); + } + j = j + curfield->colspan; + out_html(">"); + if (curfield->size) + out_html(change_to_size(curfield->size)); + if (curfield->font) + out_html(change_to_font(curfield->font)); + switch (curfield->align) { + case '=': + out_html("

"); + break; + case '_': + out_html("
"); + break; + default: + if (curfield->contents) + out_html(curfield->contents); + break; + } + if (curfield->space) + for (i = 0; i < curfield->space; i++) + out_html(" "); + if (curfield->font) + out_html(change_to_font(0)); + if (curfield->size) + out_html(change_to_size(0)); + if (j >= maxcol && curfield->align > '@' && curfield->align != '_') + out_html("
"); + out_html(""); + } + curfield = curfield->next; + } + out_html("
\n"); + currow = currow->next; + } + if (box && !border) + out_html("
"); + out_html("
\n"); + currow = layout; + while (currow) { + j = 0; + out_html("
"); + out_html(""); + if (box == 2) + out_html(""); + if (center) + out_html("
\n"); + else + out_html("\n"); + if (!oldfillout) + out_html("
");
+	fillout = oldfillout;
+	out_html(change_to_size(oldsize));
+	out_html(change_to_font(oldfont));
+	return c;
+}
+
+static char *
+scan_expression(char *c, int *result)
+{
+	int     value = 0, value2, j = 0, sign = 1, opex = 0;
+	char    oper = 'c';
+
+	if (*c == '!') {
+		c = scan_expression(c + 1, &value);
+		value = (!value);
+	} else if (*c == 'n') {
+		c++;
+		value = NROFF;
+	} else if (*c == 't') {
+		c++;
+		value = 1 - NROFF;
+	} else if (*c == '\'' || *c == '"' || *c < ' ' || (*c == '\\' && c[1] == '(')) {
+		/*
+		 * ?string1?string2? test if string1 equals string2.
+		 */
+		char   *st1 = NULL, *st2 = NULL, *h;
+		char   *tcmp = NULL;
+		char    sep;
+
+		sep = *c;
+		if (sep == '\\') {
+			tcmp = c;
+			c = c + 3;
+		}
+		c++;
+		h = c;
+		while (*c != sep && (!tcmp || strncmp(c, tcmp, 4)))
+			c++;
+		*c = '\n';
+		scan_troff(h, 1, &st1);
+		*c = sep;
+		if (tcmp)
+			c = c + 3;
+		c++;
+		h = c;
+		while (*c != sep && (!tcmp || strncmp(c, tcmp, 4)))
+			c++;
+		*c = '\n';
+		scan_troff(h, 1, &st2);
+		*c = sep;
+		if (!st1 && !st2)
+			value = 1;
+		else if (!st1 || !st2)
+			value = 0;
+		else
+			value = (!strcmp(st1, st2));
+		if (st1)
+			free(st1);
+		if (st2)
+			free(st2);
+		if (tcmp)
+			c = c + 3;
+		c++;
+	} else {
+		while (*c && !isspace(*c) && *c != ')') {
+			opex = 0;
+			switch (*c) {
+			case '(':
+				c = scan_expression(c + 1, &value2);
+				value2 = sign * value2;
+				opex = 1;
+				break;
+			case '.':
+			case '0':
+			case '1':
+			case '2':
+			case '3':
+			case '4':
+			case '5':
+			case '6':
+			case '7':
+			case '8':
+			case '9':{
+					int     num = 0, denum = 1;
+
+					value2 = 0;
+					while (isdigit(*c))
+						value2 = value2 * 10 + ((*c++) - '0');
+					if (*c == '.') {
+						c++;
+						while (isdigit(*c)) {
+							num = num * 10 + ((*c++) - '0');
+							denum = denum * 10;
+						}
+					}
+					if (isalpha(*c)) {
+						/* scale indicator */
+						switch (*c) {
+						case 'i':	/* inch -> 10pt */
+							value2 = value2 * 10 + (num * 10 + denum / 2) / denum;
+							num = 0;
+							break;
+						default:
+							break;
+						}
+						c++;
+					}
+					value2 = value2 + (num + denum / 2) / denum;
+					value2 = sign * value2;
+					opex = 1;
+					break;
+				}
+			case '\\':
+				c = scan_escape(c + 1);
+				value2 = intresult * sign;
+				if (isalpha(*c))
+					c++;	/* scale indicator */
+				opex = 1;
+				break;
+			case '-':
+				if (oper) {
+					sign = -1;
+					c++;
+					break;
+				}
+			case '>':
+			case '<':
+			case '+':
+			case '/':
+			case '*':
+			case '%':
+			case '&':
+			case '=':
+			case ':':
+				if (c[1] == '=')
+					oper = (*c++) + 16;
+				else
+					oper = *c;
+				c++;
+				break;
+			default:
+				c++;
+				break;
+			}
+			if (opex) {
+				sign = 1;
+				switch (oper) {
+				case 'c':
+					value = value2;
+					break;
+				case '-':
+					value = value - value2;
+					break;
+				case '+':
+					value = value + value2;
+					break;
+				case '*':
+					value = value * value2;
+					break;
+				case '/':
+					if (value2)
+						value = value / value2;
+					break;
+				case '%':
+					if (value2)
+						value = value % value2;
+					break;
+				case '<':
+					value = (value < value2);
+					break;
+				case '>':
+					value = (value > value2);
+					break;
+				case '>' + 16:
+					value = (value >= value2);
+					break;
+				case '<' + 16:
+					value = (value <= value2);
+					break;
+				case '=':
+				case '=' + 16:
+					value = (value == value2);
+					break;
+				case '&':
+					value = (value && value2);
+					break;
+				case ':':
+					value = (value || value2);
+					break;
+				default:
+					fprintf(stderr, "man2html: unknown operator %c.\n", oper);
+				}
+				oper = 0;
+			}
+		}
+		if (*c == ')')
+			c++;
+	}
+	*result = value;
+	return c;
+}
+
+static void
+trans_char(char *c, char s, char t)
+{
+	char   *sl = c;
+	int     slash = 0;
+
+	while (*sl != '\n' || slash) {
+		if (!slash) {
+			if (*sl == escapesym)
+				slash = 1;
+			else if (*sl == s)
+				*sl = t;
+		} else
+			slash = 0;
+		sl++;
+	}
+}
+
+/* Remove \a from C in place.  Return modified C. */
+static char *
+unescape (char *c)
+{
+	int	i, l;
+
+	l = strlen (c);
+	i = 0;
+	while (i < l && c[i]) {
+		if (c[i] == '\a') {
+			if (c[i+1])
+				memmove (c + i, c + i + 1, l - i);
+			else {
+				c[i] = '\0';
+				break;
+			}
+		}
+		i++;
+	}
+	return c;
+}
+	
+static char *
+fill_words(char *c, char *words[], int *n)
+{
+	char   *sl = c;
+	int     slash = 0;
+	int     skipspace = 0;
+
+	*n = 0;
+	words[*n] = sl;
+	while (*sl && (*sl != '\n' || slash)) {
+		if (!slash) {
+			if (*sl == '"') {
+				*sl = '\a';
+				skipspace = !skipspace;
+			} else if (*sl == '\a') {
+				/* handle already-translated " */
+				skipspace = !skipspace;
+			} else if (*sl == escapesym)
+				slash = 1;
+			else if ((*sl == ' ' || *sl == '\t') && !skipspace) {
+				*sl = '\n';
+				if (words[*n] != sl)
+					(*n)++;
+				words[*n] = sl + 1;
+			}
+		} else {
+			if (*sl == '"') {
+				sl--;
+				*sl = '\n';
+				if (words[*n] != sl)
+					(*n)++;
+				sl++;
+				while (*sl && *sl != '\n')
+					sl++;
+				words[*n] = sl;
+				sl--;
+			}
+			slash = 0;
+		}
+		sl++;
+	}
+	if (sl != words[*n])
+		(*n)++;
+	return sl;
+}
+
+static char *abbrev_list[] = {
+	"GSBG", "Getting Started ",
+	"SUBG", "Customizing SunOS",
+	"SHBG", "Basic Troubleshooting",
+	"SVBG", "SunView User's Guide",
+	"MMBG", "Mail and Messages",
+	"DMBG", "Doing More with SunOS",
+	"UNBG", "Using the Network",
+	"GDBG", "Games, Demos & Other Pursuits",
+	"CHANGE", "SunOS 4.1 Release Manual",
+	"INSTALL", "Installing SunOS 4.1",
+	"ADMIN", "System and Network Administration",
+	"SECUR", "Security Features Guide",
+	"PROM", "PROM User's Manual",
+	"DIAG", "Sun System Diagnostics",
+	"SUNDIAG", "Sundiag User's Guide",
+	"MANPAGES", "SunOS Reference Manual",
+	"REFMAN", "SunOS Reference Manual",
+	"SSI", "Sun System Introduction",
+	"SSO", "System Services Overview",
+	"TEXT", "Editing Text Files",
+	"DOCS", "Formatting Documents",
+	"TROFF", "Using nroff and troff",
+	"INDEX", "Global Index",
+	"CPG", "C Programmer's Guide",
+	"CREF", "C Reference Manual",
+	"ASSY", "Assembly Language Reference",
+	"PUL", "Programming Utilities and Libraries",
+	"DEBUG", "Debugging Tools",
+	"NETP", "Network Programming",
+	"DRIVER", "Writing Device Drivers",
+	"STREAMS", "STREAMS Programming",
+	"SBDK", "SBus Developer's Kit",
+	"WDDS", "Writing Device Drivers for the SBus",
+	"FPOINT", "Floating-Point Programmer's Guide",
+	"SVPG", "SunView 1 Programmer's Guide",
+	"SVSPG", "SunView 1 System Programmer's Guide",
+	"PIXRCT", "Pixrect Reference Manual",
+	"CGI", "SunCGI Reference Manual",
+	"CORE", "SunCore Reference Manual",
+	"4ASSY", "Sun-4 Assembly Language Reference",
+	"SARCH", "SPARC Architecture Manual",
+	"KR", "The C Programming Language",
+NULL, NULL};
+
+static char *
+lookup_abbrev(char *c)
+{
+	int     i = 0;
+
+	if (!c)
+		return "";
+	while (abbrev_list[i] && strcmp(c, abbrev_list[i]))
+		i = i + 2;
+	if (abbrev_list[i])
+		return abbrev_list[i + 1];
+	else
+		return c;
+}
+
+static char manidx[NULL_TERMINATED(HUGE_STR_MAX)];
+static int subs = 0;
+static int mip = 0;
+static char label[5] = "lbAA";
+
+static void
+add_to_index(int level, char *item)
+{
+	char   *c = NULL;
+
+	label[3]++;
+	if (label[3] > 'Z') {
+		label[3] = 'A';
+		label[2]++;
+	}
+	if (level != subs) {
+		if (subs) {
+			strmaxcpy(manidx + mip, "\n", HUGE_STR_MAX - mip);
+			mip += 6;
+		} else {
+			strmaxcpy(manidx + mip, "
\n", HUGE_STR_MAX - mip); + mip += 5; + } + } + subs = level; + scan_troff(item, 1, &c); + sprintf(manidx + mip, "
%s
\n", label, c); + if (c) + free(c); + while (manidx[mip]) + mip++; +} + +static char * +skip_till_newline(char *c) +{ + int lvl = 0; + + while (*c && *c != '\n' || lvl > 0) { + if (*c == '\\') { + c++; + if (*c == '}') + lvl--; + else if (*c == '{') + lvl++; + } + c++; + } + c++; + if (lvl < 0 && newline_for_fun) { + newline_for_fun = newline_for_fun + lvl; + if (newline_for_fun < 0) + newline_for_fun = 0; + } + return c; +} + +static void +outputPageHeader(char *l, char *c, char *r) +{ + out_html("\n\n"); + out_html("\n
"); + out_html(l); + out_html(""); + out_html(c); + out_html(""); + out_html(r); + out_html("\n
\n"); +} + +static void +outputPageFooter(char *l, char *c, char *r) +{ + out_html("
\n"); + outputPageHeader(l, c, r); +} + +static int ifelseval = 0; + +static char * +scan_request(char *c) +{ + /* BSD Mandoc stuff */ + static int mandoc_synopsis = 0; /* True if we are in the synopsis + * section */ + static int mandoc_command = 0; /* True if this is mandoc page */ + static int mandoc_bd_options; /* Only copes with non-nested Bd's */ + + int i, j, mode = 0; + char *h; + char *wordlist[MAX_WORDLIST]; + int words; + char *sl; + STRDEF *owndef; + + while (*c == ' ' || *c == '\t') + c++; + if (c[0] == '\n') + return c + 1; + if (c[1] == '\n') + j = 1; + else + j = 2; + while (c[j] == ' ' || c[j] == '\t') + j++; + if (c[0] == escapesym) { + /* some pages use .\" .\$1 .\} */ + /* .\$1 is too difficult/stupid */ + if (c[1] == '$') + c = skip_till_newline(c); + else + c = scan_escape(c + 1); + } else { + i = V(c[0], c[1]); + switch (i) { + case V('a', 'b'): + h = c + j; + while (*h && *h != '\n') + h++; + *h = '\0'; + if (scaninbuff && buffpos) { + buffer[buffpos] = '\0'; + puts(buffer); + } + /* fprintf(stderr, "%s\n", c+2); */ + exit(0); + break; + case V('d', 'i'): + { + STRDEF *de; + int oldcurpos = curpos; + + c = c + j; + i = V(c[0], c[1]); + if (*c == '\n') { + c++; + break; + } + while (*c && *c != '\n') + c++; + c++; + h = c; + while (*c && strncmp(c, ".di", 3)) + while (*c && *c++ != '\n'); + *c = '\0'; + de = strdef; + while (de && de->nr != i) + de = de->next; + if (!de) { + de = (STRDEF *) xmalloc(sizeof(STRDEF)); + de->nr = i; + de->slen = 0; + de->next = strdef; + de->st = NULL; + strdef = de; + } else { + if (de->st) + free(de->st); + de->slen = 0; + de->st = NULL; + } + scan_troff(h, 0, &de->st); + *c = '.'; + while (*c && *c++ != '\n'); + break; + } + case V('d', 's'): + mode = 1; + case V('a', 's'): + { + STRDEF *de; + int oldcurpos = curpos; + + c = c + j; + i = V(c[0], c[1]); + j = 0; + while (c[j] && c[j] != '\n') + j++; + if (j < 3) { + c = c + j; + break; + } + if (c[1] == ' ') + c = c + 1; + else + c = c + 2; + while (isspace(*c)) + c++; + if (*c == '"') + c++; + de = strdef; + while (de && de->nr != i) + de = de->next; + single_escape = 1; + curpos = 0; + if (!de) { + char *h; + + de = (STRDEF *) xmalloc(sizeof(STRDEF)); + de->nr = i; + de->slen = 0; + de->next = strdef; + de->st = NULL; + strdef = de; + h = NULL; + c = scan_troff(c, 1, &h); + de->st = h; + de->slen = curpos; + } else { + if (mode) { + char *h = NULL; + + c = scan_troff(c, 1, &h); + free(de->st); + de->slen = 0; + de->st = h; + } else + c = scan_troff(c, 1, &de->st); + de->slen += curpos; + } + single_escape = 0; + curpos = oldcurpos; + } + break; + case V('b', 'r'): + if (still_dd) + out_html("
"); + else + out_html("
\n"); + curpos = 0; + c = c + j; + if (c[0] == escapesym) { + c = scan_escape(c + 1); + } + c = skip_till_newline(c); + break; + case V('c', '2'): + c = c + j; + if (*c != '\n') { + nobreaksym = *c; + } else + nobreaksym = '\''; + c = skip_till_newline(c); + break; + case V('c', 'c'): + c = c + j; + if (*c != '\n') { + controlsym = *c; + } else + controlsym = '.'; + c = skip_till_newline(c); + break; + case V('c', 'e'): + c = c + j; + if (*c == '\n') { + i = 1; + } else { + i = 0; + while ('0' <= *c && *c <= '9') { + i = i * 10 + *c - '0'; + c++; + } + } + c = skip_till_newline(c); + /* center next i lines */ + if (i > 0) { + out_html("
\n"); + while (i && *c) { + char *line = NULL; + + c = scan_troff(c, 1, &line); + if (line && strncmp(line, "
", 4)) { + out_html(line); + out_html("
\n"); + i--; + } + } + out_html("
\n"); + curpos = 0; + } + break; + case V('e', 'c'): + c = c + j; + if (*c != '\n') { + escapesym = *c; + } else + escapesym = '\\'; + break; + c = skip_till_newline(c); + case V('e', 'o'): + escapesym = '\0'; + c = skip_till_newline(c); + break; + case V('e', 'x'): + exit(0); + break; + case V('f', 'c'): + c = c + j; + if (*c == '\n') { + fieldsym = padsym = '\0'; + } else { + fieldsym = c[0]; + padsym = c[1]; + } + c = skip_till_newline(c); + break; + case V('f', 'i'): + if (!fillout) { + out_html(change_to_font(0)); + out_html(change_to_size('0')); + out_html("
\n"); + } + curpos = 0; + fillout = 1; + c = skip_till_newline(c); + break; + case V('f', 't'): + c = c + j; + if (*c == '\n') { + out_html(change_to_font(0)); + } else { + if (*c == escapesym) { + int fn; + + c = scan_expression(c, &fn); + c--; + out_html(change_to_font(fn)); + } else { + out_html(change_to_font(*c)); + c++; + } + } + c = skip_till_newline(c); + break; + case V('e', 'l'): + /* .el anything : else part of if else */ + if (ifelseval) { + c = c + j; + c[-1] = '\n'; + c = scan_troff(c, 1, NULL); + } else + c = skip_till_newline(c + j); + break; + case V('i', 'e'): + /* .ie c anything : then part of if else */ + case V('i', 'f'): + /* + * .if c anything .if !c anything .if N anything .if + * !N anything .if 'string1'string2' anything .if + * !'string1'string2' anything + */ + c = c + j; + c = scan_expression(c, &i); + ifelseval = !i; + if (i) { + *c = '\n'; + c++; + c = scan_troff(c, 1, NULL); + } else + c = skip_till_newline(c); + break; + case V('i', 'g'): + { + char *endwith = "..\n"; + + i = 3; + c = c + j; + if (*c != '\n') { + endwith = c - 1; + i = 1; + c[-1] = '.'; + while (*c && *c != '\n') + c++, i++; + } + c++; + while (*c && strncmp(c, endwith, i)) + while (*c++ != '\n'); + while (*c++ != '\n'); + break; + } + case V('n', 'f'): + if (fillout) { + out_html(change_to_font(0)); + out_html(change_to_size('0')); + out_html("
\n");
+			}
+			curpos = 0;
+			fillout = 0;
+			c = skip_till_newline(c);
+			break;
+		case V('p', 's'):
+			c = c + j;
+			if (*c == '\n') {
+				out_html(change_to_size('0'));
+			} else {
+				j = 0;
+				i = 0;
+				if (*c == '-') {
+					j = -1;
+					c++;
+				} else if (*c == '+') {
+					j = 1;
+					c++;
+				}
+				c = scan_expression(c, &i);
+				if (!j) {
+					j = 1;
+					if (i > 5)
+						i = i - 10;
+				}
+				out_html(change_to_size(i * j));
+			}
+			c = skip_till_newline(c);
+			break;
+		case V('s', 'p'):
+			c = c + j;
+			if (fillout)
+				out_html("

"); + else { + out_html(NEWLINE); + NEWLINE[0] = '\n'; + } + curpos = 0; + c = skip_till_newline(c); + break; + case V('s', 'o'): + { + FILE *f; + struct stat stbuf; + int l = 0; + char *buf; + char *name = NULL; + + curpos = 0; + c = c + j; + if (*c == '/') { + h = c; + } else { + h = c - 3; + h[0] = '.'; + h[1] = '.'; + h[2] = '/'; + } + while (*c != '\n') + c++; + *c = '\0'; + scan_troff(h, 1, &name); + if (name[3] == '/') + h = name + 3; + else + h = name; + if (stat(h, &stbuf) != -1) + l = stbuf.st_size; +#if NOCGI + if (!out_length) { + char *t, *s; + + t = strrchr(fname, '/'); + if (!t) + t = fname; + fprintf(stderr, "ln -s %s.html %s.html\n", h, t); + s = strrchr(t, '.'); + if (!s) + s = t; + printf(" Manpage of %s\n" + "\n" + "See the manpage for %s.\n" + "\n", + s, h, h); + } else +#endif + { + /* + * this works alright, except for + * section 3 + */ + buf = read_man_page(h); + if (!buf) { + + fprintf(stderr, "man2html: unable to open or read file %s.\n", + h); + out_html("

" + "man2html: unable to open or read file.\n"); + out_html(h); + out_html("
\n"); + } else { + buf[0] = buf[l] = '\n'; + buf[l + 1] = buf[l + 2] = '\0'; + scan_troff(buf + 1, 0, NULL); + } + if (buf) + free(buf); + } + *c++ = '\n'; + break; + } + case V('t', 'a'): + c = c + j; + j = 0; + while (*c != '\n') { + sl = scan_expression(c, &tabstops[j]); + if (*c == '-' || *c == '+') + tabstops[j] += tabstops[j - 1]; + c = sl; + while (*c == ' ' || *c == '\t') + c++; + j++; + } + maxtstop = j; + curpos = 0; + break; + case V('t', 'i'): + /* + * while (itemdepth || dl_set[itemdepth]) { + * out_html("\n"); if (dl_set[itemdepth]) + * dl_set[itemdepth]=0; else itemdepth--; } + */ + out_html("
\n"); + c = c + j; + c = scan_expression(c, &j); + for (i = 0; i < j; i++) + out_html(" "); + curpos = j; + c = skip_till_newline(c); + break; + case V('t', 'm'): + c = c + j; + h = c; + while (*c != '\n') + c++; + *c = '\0'; + /* fprintf(stderr,"%s\n", h); */ + *c = '\n'; + break; + case V('B', ' '): + case V('B', '\n'): + case V('I', ' '): + case V('I', '\n'): + /* parse one line in a certain font */ + out_html(change_to_font(*c)); + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + c = scan_troff(c, 1, NULL); + out_html(change_to_font('R')); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('O', 'P'): /* groff manpages use this + * construction */ + /* .OP a b : [ a b ] */ + mode = 1; + c[0] = 'B'; + c[1] = 'I'; + out_html(change_to_font('R')); + out_html("["); + curpos++; + case V('B', 'R'): + case V('B', 'I'): + case V('I', 'B'): + case V('I', 'R'): + case V('R', 'B'): + case V('R', 'I'): + { + char font[2]; + + font[0] = c[0]; + font[1] = c[1]; + c = c + j; + if (*c == '\n') + c++; + sl = fill_words(c, wordlist, &words); + c = sl + 1; + /* + * .BR name (section) indicates a link. It + * will be added in the output routine. + */ + for (i = 0; i < words; i++) { + if (mode) { + out_html(" "); + curpos++; + } + wordlist[i][-1] = ' '; + out_html(change_to_font(font[i & 1])); + scan_troff(wordlist[i], 1, NULL); + } + out_html(change_to_font('R')); + if (mode) { + out_html(" ]"); + curpos++; + } + out_html(NEWLINE); + if (!fillout) + curpos = 0; + else + curpos++; + } + break; + case V('D', 'T'): + for (j = 0; j < 20; j++) + tabstops[j] = (j + 1) * 8; + maxtstop = 20; + c = skip_till_newline(c); + break; + case V('I', 'P'): + sl = fill_words(c + j, wordlist, &words); + c = sl + 1; + if (!dl_set[itemdepth]) { + out_html("
\n"); + dl_set[itemdepth] = 1; + } + out_html("
"); + if (words) { + scan_troff(wordlist[0], 1, NULL); + } + out_html("
"); + curpos = 0; + break; + case V('T', 'P'): + if (!dl_set[itemdepth]) { + out_html("
\n"); + dl_set[itemdepth] = 1; + } + out_html("
"); + c = skip_till_newline(c); + /* somewhere a definition ends with '.TP' */ + if (!*c) + still_dd = 1; + else { + c = scan_troff(c, 1, NULL); + out_html("
"); + } + curpos = 0; + break; + case V('I', 'X'): + /* general index */ + sl = fill_words(c + j, wordlist, &words); + c = sl + 1; + j = 4; + while (idxlabel[j] == 'Z') + idxlabel[j--] = 'A'; + idxlabel[j]++; +#ifdef MAKEINDEX + fprintf(idxfile, "%s@%s@", fname, idxlabel); + for (j = 0; j < words; j++) { + h = NULL; + scan_troff(wordlist[j], 1, &h); + fprintf(idxfile, "_\b@%s", h); + free(h); + } + fprintf(idxfile, "\n"); +#endif + out_html("' and '<' solves it, but + * creates some space. A normal space does not work. + */ + out_html("\">"); + break; + case V('L', 'P'): + case V('P', 'P'): + if (dl_set[itemdepth]) { + out_html("
\n"); + dl_set[itemdepth] = 0; + } + if (fillout) + out_html("

\n"); + else { + out_html(NEWLINE); + NEWLINE[0] = '\n'; + } + curpos = 0; + c = skip_till_newline(c); + break; + case V('H', 'P'): + if (!dl_set[itemdepth]) { + out_html("

"); + dl_set[itemdepth] = 1; + } + out_html("
\n"); + still_dd = 1; + c = skip_till_newline(c); + curpos = 0; + break; + case V('P', 'D'): + c = skip_till_newline(c); + break; + case V('R', 's'): /* BSD mandoc */ + case V('R', 'S'): + sl = fill_words(c + j, wordlist, &words); + j = 1; + if (words > 0) + scan_expression(wordlist[0], &j); + if (j >= 0) { + itemdepth++; + dl_set[itemdepth] = 0; + out_html("
"); + c = skip_till_newline(c); + curpos = 0; + break; + } + case V('R', 'e'): /* BSD mandoc */ + case V('R', 'E'): + if (itemdepth > 0) { + if (dl_set[itemdepth]) + out_html("
"); + out_html("
\n"); + itemdepth--; + } + c = skip_till_newline(c); + curpos = 0; + break; + case V('S', 'B'): + out_html(change_to_size(-1)); + out_html(change_to_font('B')); + c = scan_troff(c + j, 1, NULL); + out_html(change_to_font('R')); + out_html(change_to_size('0')); + break; + case V('S', 'M'): + c = c + j; + if (*c == '\n') + c++; + out_html(change_to_size(-1)); + trans_char(c, '"', '\a'); + c = scan_troff(c, 1, NULL); + out_html(change_to_size('0')); + break; + case V('S', 's'): /* BSD mandoc */ + mandoc_command = 1; + case V('S', 'S'): + mode = 1; + case V('S', 'h'): /* BSD mandoc */ + /* hack for fallthru from above */ + mandoc_command = !mode || mandoc_command; + case V('S', 'H'): + c = c + j; + if (*c == '\n') + c++; + while (itemdepth || dl_set[itemdepth]) { + out_html("
\n"); + if (dl_set[itemdepth]) + dl_set[itemdepth] = 0; + else if (itemdepth > 0) + itemdepth--; + } + out_html(change_to_font(0)); + out_html(change_to_size(0)); + if (!fillout) { + fillout = 1; + out_html("
"); + } + trans_char(c, '"', '\a'); + add_to_index(mode, c); + out_html(" \n

"); + else + out_html("\"> \n

"); + mandoc_synopsis = strncmp(c, "SYNOPSIS", 8) == 0; + c = mandoc_command ? scan_troff_mandoc(c, 1, NULL) : scan_troff(c, 1, NULL); + if (mode) + out_html("

\n"); + else + out_html("\n"); + curpos = 0; + break; + case V('T', 'S'): + c = scan_table(c); + break; + case V('D', 't'): /* BSD mandoc */ + mandoc_command = 1; + case V('T', 'H'): + if (!output_possible) { + sl = fill_words(c + j, wordlist, &words); + if (words > 1) { + char *t; + for (i = 1; i < words; i++) + wordlist[i][-1] = '\0'; + *sl = '\0'; + output_possible = 1; + sprintf(th_page_and_sec, "%s(%s)", wordlist[0], wordlist[1]); + if (words > 2) { + t = unescape(wordlist[2]); + strncpy(th_datestr, t, sizeof(th_datestr)); + th_datestr[sizeof(th_datestr) - 1] = '\0'; + } else + th_datestr[0] = '\0'; + if (words > 3) { + t = unescape(wordlist[3]); + strncpy(th_version, t, sizeof(th_version)); + th_version[sizeof(th_version) - 1] = '\0'; + } else + th_version[0] = '\0'; + out_html("\n"); + out_html(th_page_and_sec); + out_html(" Manual Page"); + out_html("\n\n"); + + outputPageHeader(th_page_and_sec, th_datestr, th_page_and_sec); + + out_html("
Index\n"); + *sl = '\n'; + out_html("
\n"); + if (mandoc_command) + out_html("
BSD mandoc
"); + } + c = sl + 1; + } else + c = skip_till_newline(c); + curpos = 0; + break; + case V('T', 'X'): + sl = fill_words(c + j, wordlist, &words); + *sl = '\0'; + out_html(change_to_font('I')); + if (words > 1) + wordlist[1][-1] = '\0'; + c = lookup_abbrev(wordlist[0]); + curpos += strlen(c); + out_html(c); + out_html(change_to_font('R')); + if (words > 1) + out_html(wordlist[1]); + *sl = '\n'; + c = sl + 1; + break; + case V('r', 'm'): + /* .rm xx : Remove request, macro or string */ + case V('r', 'n'): + /* + * .rn xx yy : Rename request, macro or string xx to + * yy + */ + { + STRDEF *de; + + c = c + j; + i = V(c[0], c[1]); + c = c + 2; + while (isspace(*c) && *c != '\n') + c++; + j = V(c[0], c[1]); + while (*c && *c != '\n') + c++; + c++; + de = strdef; + while (de && de->nr != j) + de = de->next; + if (de) { + if (de->st) + free(de->st); + de->nr = 0; + } + de = strdef; + while (de && de->nr != i) + de = de->next; + if (de) + de->nr = j; + break; + } + case V('n', 'x'): + /* .nx filename : next file. */ + case V('i', 'n'): + /* .in +-N : Indent */ + c = skip_till_newline(c); + break; + case V('n', 'r'): + /* + * .nr R +-N M: define and set number register R by + * +-N; auto-increment by M + */ + { + INTDEF *intd; + + c = c + j; + i = V(c[0], c[1]); + c = c + 2; + intd = intdef; + while (intd && intd->nr != i) + intd = intd->next; + if (!intd) { + intd = (INTDEF *) xmalloc(sizeof(INTDEF)); + intd->nr = i; + intd->val = 0; + intd->incr = 0; + intd->next = intdef; + intdef = intd; + } + while (*c == ' ' || *c == '\t') + c++; + c = scan_expression(c, &intd->val); + if (*c != '\n') { + while (*c == ' ' || *c == '\t') + c++; + c = scan_expression(c, &intd->incr); + } + c = skip_till_newline(c); + break; + } + case V('a', 'm'): + /* .am xx yy : append to a macro. */ + /* define or handle as .ig yy */ + mode = 1; + case V('d', 'e'): + /* + * .de xx yy : define or redefine macro xx; end at + * .yy (..) + */ + /* define or handle as .ig yy */ + { + STRDEF *de; + int olen = 0; + + c = c + j; + sl = fill_words(c, wordlist, &words); + i = V(c[0], c[1]); + j = 2; + if (words == 1) + wordlist[1] = ".."; + else { + wordlist[1]--; + wordlist[1][0] = '.'; + j = 3; + } + c = sl + 1; + sl = c; + while (*c && strncmp(c, wordlist[1], j)) + c = skip_till_newline(c); + de = defdef; + while (de && de->nr != i) + de = de->next; + if (mode && de) + olen = strlen(de->st); + j = olen + c - sl; + h = stralloc(j * 2 + 4); + if (h) { + for (j = 0; j < olen; j++) + h[j] = de->st[j]; + if (!j || h[j - 1] != '\n') + h[j++] = '\n'; + while (sl != c) { + if (sl[0] == '\\' && sl[1] == '\\') { + h[j++] = '\\'; + sl++; + } else + h[j++] = *sl; + sl++; + } + h[j] = '\0'; + if (de) { + if (de->st) + free(de->st); + de->st = h; + } else { + de = (STRDEF *) xmalloc(sizeof(STRDEF)); + de->nr = i; + de->next = defdef; + de->st = h; + defdef = de; + } + } + } + c = skip_till_newline(c); + break; + case V('B', 'l'): /* BSD mandoc */ + { + char list_options[NULL_TERMINATED(MED_STR_MAX)]; + char *nl = strchr(c, '\n'); + + c = c + j; + if (dl_set[itemdepth]) { /* These things can + * nest. */ + itemdepth++; + } + if (nl) { /* Parse list options */ + strlimitcpy(list_options, c, nl - c, MED_STR_MAX); + } + if (strstr(list_options, "-bullet")) { /* HTML Unnumbered List */ + dl_set[itemdepth] = BL_BULLET_LIST; + out_html("
    \n"); + } else if (strstr(list_options, "-enum")) { /* HTML Ordered List */ + dl_set[itemdepth] = BL_ENUM_LIST; + out_html("
      \n"); + } else { /* HTML Descriptive List */ + dl_set[itemdepth] = BL_DESC_LIST; + out_html("
      \n"); + } + if (fillout) + out_html("

      \n"); + else { + out_html(NEWLINE); + NEWLINE[0] = '\n'; + } + curpos = 0; + c = skip_till_newline(c); + break; + } + case V('E', 'l'): /* BSD mandoc */ + c = c + j; + if (dl_set[itemdepth] & BL_DESC_LIST) { + out_html("

      \n"); + } else if (dl_set[itemdepth] & BL_BULLET_LIST) { + out_html("
\n"); + } else if (dl_set[itemdepth] & BL_ENUM_LIST) { + out_html("\n"); + } + dl_set[itemdepth] = 0; + if (itemdepth > 0) + itemdepth--; + if (fillout) + out_html("

\n"); + else { + out_html(NEWLINE); + NEWLINE[0] = '\n'; + } + curpos = 0; + c = skip_till_newline(c); + break; + case V('I', 't'): /* BSD mandoc */ + c = c + j; + if (strncmp(c, "Xo", 2) == 0 && isspace(*(c + 2))) { + c = skip_till_newline(c); + } + if (dl_set[itemdepth] & BL_DESC_LIST) { + out_html("

"); + out_html(change_to_font('B')); + if (*c == '\n') { /* Don't allow embedded + * comms after a newline */ + c++; + c = scan_troff(c, 1, NULL); + } else { /* Do allow embedded comms on + * the same line. */ + c = scan_troff_mandoc(c, 1, NULL); + } + out_html(change_to_font('R')); + out_html(NEWLINE); + out_html("
"); + } else if (dl_set[itemdepth] & (BL_BULLET_LIST | BL_ENUM_LIST)) { + out_html("
  • "); + c = scan_troff_mandoc(c, 1, NULL); + out_html(NEWLINE); + } + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('B', 'k'): /* BSD mandoc */ + case V('E', 'k'): /* BSD mandoc */ + case V('D', 'd'): /* BSD mandoc */ + case V('O', 's'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + c = scan_troff_mandoc(c, 1, NULL); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('B', 't'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + out_html(" is currently in beta test."); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('B', 'x'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + out_html("BSD "); + c = scan_troff_mandoc(c, 1, NULL); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('D', 'l'): /* BSD mandoc */ + c = c + j; + out_html(NEWLINE); + out_html("
    "); + out_html(change_to_font('L')); + if (*c == '\n') + c++; + c = scan_troff_mandoc(c, 1, NULL); + out_html(change_to_font('R')); + out_html("
    "); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('B', 'd'): /* BSD mandoc */ + { /* Seems like a kind of example/literal mode */ + char bd_options[NULL_TERMINATED(MED_STR_MAX)]; + char *nl = strchr(c, '\n'); + + c = c + j; + if (nl) { + strlimitcpy(bd_options, c, nl - c, MED_STR_MAX); + } + out_html(NEWLINE); + mandoc_bd_options = 0; /* Remember options for + * terminating Bl */ + if (strstr(bd_options, "-offset indent")) { + mandoc_bd_options |= BD_INDENT; + out_html("
    \n"); + } + if (strstr(bd_options, "-literal") + || strstr(bd_options, "-unfilled")) { + if (fillout) { + mandoc_bd_options |= BD_LITERAL; + out_html(change_to_font(0)); + out_html(change_to_size('0')); + out_html("
    \n");
    +					}
    +					curpos = 0;
    +					fillout = 0;
    +				}
    +				c = skip_till_newline(c);
    +				break;
    +			}
    +		case V('E', 'd'):	/* BSD mandoc */
    +			if (mandoc_bd_options & BD_LITERAL) {
    +				if (!fillout) {
    +					out_html(change_to_font(0));
    +					out_html(change_to_size('0'));
    +					out_html("
    \n"); + } + } + if (mandoc_bd_options & BD_INDENT) + out_html("
    \n"); + curpos = 0; + fillout = 1; + c = skip_till_newline(c); + break; + case V('B', 'e'): /* BSD mandoc */ + c = c + j; + if (fillout) + out_html("

    "); + else { + out_html(NEWLINE); + NEWLINE[0] = '\n'; + } + curpos = 0; + c = skip_till_newline(c); + break; + case V('X', 'r'): /* BSD mandoc */ + { + /* + * Translate xyz 1 to xyz(1) Allow for + * multiple spaces. Allow the section to be + * missing. + */ + char buff[NULL_TERMINATED(MED_STR_MAX)]; + char *bufptr; + + trans_char(c, '"', '\a'); + bufptr = buff; + c = c + j; + if (*c == '\n') + c++; /* Skip spaces */ + while (isspace(*c) && *c != '\n') + c++; + while (isalnum(*c)) { /* Copy the xyz part */ + *bufptr = *c; + bufptr++; + if (bufptr >= buff + MED_STR_MAX) + break; + c++; + } + while (isspace(*c) && *c != '\n') + c++; /* Skip spaces */ + if (isdigit(*c)) { /* Convert the number if + * there is one */ + *bufptr = '('; + bufptr++; + if (bufptr < buff + MED_STR_MAX) { + while (isalnum(*c)) { + *bufptr = *c; + bufptr++; + if (bufptr >= buff + MED_STR_MAX) + break; + c++; + } + if (bufptr < buff + MED_STR_MAX) { + *bufptr = ')'; + bufptr++; + } + } + } + while (*c != '\n') { /* Copy the remainder */ + if (!isspace(*c)) { + *bufptr = *c; + bufptr++; + if (bufptr >= buff + MED_STR_MAX) + break; + } + c++; + } + *bufptr = '\n'; + scan_troff_mandoc(buff, 1, NULL); + + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + } + break; + case V('F', 'l'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + out_html("-"); + if (*c != '\n') { + out_html(change_to_font('B')); + c = scan_troff_mandoc(c, 1, NULL); + out_html(change_to_font('R')); + } + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('P', 'a'): /* BSD mandoc */ + case V('P', 'f'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + c = scan_troff_mandoc(c, 1, NULL); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('P', 'p'): /* BSD mandoc */ + if (fillout) + out_html("

    \n"); + else { + out_html(NEWLINE); + NEWLINE[0] = '\n'; + } + curpos = 0; + c = skip_till_newline(c); + break; + case V('D', 'q'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + out_html("``"); + c = scan_troff_mandoc(c, 1, NULL); + out_html("''"); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('O', 'p'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + out_html(change_to_font('R')); + out_html("["); + c = scan_troff_mandoc(c, 1, NULL); + out_html(change_to_font('R')); + out_html("]"); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('O', 'o'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + out_html(change_to_font('R')); + out_html("["); + c = scan_troff_mandoc(c, 1, NULL); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('O', 'c'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + c = scan_troff_mandoc(c, 1, NULL); + out_html(change_to_font('R')); + out_html("]"); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('P', 'q'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + out_html("("); + c = scan_troff_mandoc(c, 1, NULL); + out_html(")"); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('Q', 'l'): /* BSD mandoc */ + { /* Single quote first word in the line */ + char *sp; + + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + sp = c; + do { /* Find first whitespace after the + * first word that isn't a mandoc + * macro */ + while (*sp && isspace(*sp)) + sp++; + while (*sp && !isspace(*sp)) + sp++; + } while (*sp && isupper(*(sp - 2)) && islower(*(sp - 1))); + + /* + * Use a newline to mark the end of text to + * be quoted + */ + if (*sp) + *sp = '\n'; + out_html("`"); /* Quote the text */ + c = scan_troff_mandoc(c, 1, NULL); + out_html("'"); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + } + case V('S', 'q'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + out_html("`"); + c = scan_troff_mandoc(c, 1, NULL); + out_html("'"); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('A', 'r'): /* BSD mandoc */ + /* parse one line in italics */ + out_html(change_to_font('I')); + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') { /* An empty Ar means "file + * ..." */ + out_html("file ..."); + } else { + c = scan_troff_mandoc(c, 1, NULL); + } + out_html(change_to_font('R')); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('A', 'd'): /* BSD mandoc */ + case V('E', 'm'): /* BSD mandoc */ + case V('V', 'a'): /* BSD mandoc */ + case V('X', 'c'): /* BSD mandoc */ + /* parse one line in italics */ + out_html(change_to_font('I')); + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + c = scan_troff_mandoc(c, 1, NULL); + out_html(change_to_font('R')); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('N', 'd'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + out_html(" - "); + c = scan_troff_mandoc(c, 1, NULL); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('N', 'm'): /* BSD mandoc */ + { + static char mandoc_name[NULL_TERMINATED(SMALL_STR_MAX)] = ""; + + trans_char(c, '"', '\a'); + c = c + j; + if (mandoc_synopsis) { /* Break lines only in + * the Synopsis. The + * Synopsis section + * seems to be treated + * as a special case - + * Bummer! */ + static int count = 0; /* Don't break on the + * first Nm */ + + if (count) { + out_html("
    "); + } else { + char *end = strchr(c, '\n'); + + if (end) { /* Remember the name for + * later. */ + strlimitcpy(mandoc_name, c, end - c, SMALL_STR_MAX); + } + } + count++; + } + out_html(change_to_font('B')); + while (*c == ' ' || *c == '\t') + c++; + if (*c == '\n') { /* If Nm has no + * argument, use one + * from an earlier Nm + * command that did have + * one. Hope there + * aren't too many + * commands that do + * this. */ + out_html(mandoc_name); + } else { + c = scan_troff_mandoc(c, 1, NULL); + } + out_html(change_to_font('R')); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + } + case V('C', 'd'): /* BSD mandoc */ + case V('C', 'm'): /* BSD mandoc */ + case V('I', 'c'): /* BSD mandoc */ + case V('M', 's'): /* BSD mandoc */ + case V('O', 'r'): /* BSD mandoc */ + case V('S', 'y'): /* BSD mandoc */ + /* parse one line in bold */ + out_html(change_to_font('B')); + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + c = scan_troff_mandoc(c, 1, NULL); + out_html(change_to_font('R')); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('D', 'v'): /* BSD mandoc */ + case V('E', 'v'): /* BSD mandoc */ + case V('F', 'r'): /* BSD mandoc */ + case V('L', 'i'): /* BSD mandoc */ + case V('N', 'o'): /* BSD mandoc */ + case V('N', 's'): /* BSD mandoc */ + case V('T', 'n'): /* BSD mandoc */ + case V('n', 'N'): /* BSD mandoc */ + trans_char(c, '"', '\a'); + c = c + j; + if (*c == '\n') + c++; + out_html(change_to_font('B')); + c = scan_troff_mandoc(c, 1, NULL); + out_html(change_to_font('R')); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('%', 'A'): /* BSD mandoc biblio stuff */ + case V('%', 'D'): + case V('%', 'N'): + case V('%', 'O'): + case V('%', 'P'): + case V('%', 'Q'): + case V('%', 'V'): + c = c + j; + if (*c == '\n') + c++; + c = scan_troff(c, 1, NULL); /* Don't allow embedded + * mandoc coms */ + if (fillout) + curpos++; + else + curpos = 0; + break; + case V('%', 'B'): + case V('%', 'J'): + case V('%', 'R'): + case V('%', 'T'): + c = c + j; + out_html(change_to_font('I')); + if (*c == '\n') + c++; + c = scan_troff(c, 1, NULL); /* Don't allow embedded + * mandoc coms */ + out_html(change_to_font('R')); + if (fillout) + curpos++; + else + curpos = 0; + break; + default: + /* search macro database of self-defined macros */ + owndef = defdef; + while (owndef && owndef->nr != i) + owndef = owndef->next; + if (owndef) { + char **oldargument; + int deflen; + int onff; + + sl = fill_words(c + j, wordlist, &words); + c = sl + 1; + *sl = '\0'; + for (i = 1; i < words; i++) + wordlist[i][-1] = '\0'; + for (i = 0; i < words; i++) { + char *h = NULL; + + if (mandoc_command) { + scan_troff_mandoc(wordlist[i], 1, &h); + } else { + scan_troff(wordlist[i], 1, &h); + } + wordlist[i] = h; + } + for (i = words; i < 20; i++) + wordlist[i] = NULL; + deflen = strlen(owndef->st); + for (i = 0; owndef->st[deflen + 2 + i] = owndef->st[i]; i++); + oldargument = argument; + argument = wordlist; + onff = newline_for_fun; + if (mandoc_command) { + scan_troff_mandoc(owndef->st + deflen + 2, 0, NULL); + } else { + scan_troff(owndef->st + deflen + 2, 0, NULL); + } + newline_for_fun = onff; + argument = oldargument; + for (i = 0; i < words; i++) + if (wordlist[i]) + free(wordlist[i]); + *sl = '\n'; + } else if (mandoc_command && + ((isupper(*c) && islower(*(c + 1))) + || (islower(*c) && isupper(*(c + 1)))) + ) { /* Let through any BSD mandoc + * commands that haven't been delt + * with. I don't want to miss + * anything out of the text. */ + char buf[4]; + + strncpy(buf, c, 2); + buf[2] = ' '; + buf[3] = '\0'; + out_html(buf); /* Print the command (it + * might just be text). */ + c = c + j; + trans_char(c, '"', '\a'); + if (*c == '\n') + c++; + out_html(change_to_font('R')); + c = scan_troff(c, 1, NULL); + out_html(NEWLINE); + if (fillout) + curpos++; + else + curpos = 0; + } else { + c = skip_till_newline(c); + } + break; + } + } + if (fillout) { + out_html(NEWLINE); + curpos++; + } + NEWLINE[0] = '\n'; + return c; +} + +static void +flush(void) +{ +} + +static int contained_tab = 0; +static int mandoc_line = 0; /* Signals whether to look for embedded + * mandoc commands. */ + +/* san : stop at newline */ +static char * +scan_troff(char *c, int san, char **result) +{ + char *h; + char intbuff[NULL_TERMINATED(MED_STR_MAX)]; + int ibp = 0; + int i; + char *exbuffer; + int exbuffpos, exbuffmax, exscaninbuff, exnewline_for_fun; + int usenbsp = 0; + +#define FLUSHIBP if (ibp) { intbuff[ibp]=0; out_html(intbuff); ibp=0; } + + exbuffer = buffer; + exbuffpos = buffpos; + exbuffmax = buffmax; + exnewline_for_fun = newline_for_fun; + exscaninbuff = scaninbuff; + newline_for_fun = 0; + if (result) { + if (*result) { + buffer = *result; + buffpos = strlen(buffer); + buffmax = buffpos; + } else { + buffer = stralloc(LARGE_STR_MAX); + buffpos = 0; + buffmax = LARGE_STR_MAX; + } + scaninbuff = 1; + } + h = c; + /* start scanning */ + + while (*h && (!san || newline_for_fun || *h != '\n')) { + + if (*h == escapesym) { + h++; + FLUSHIBP; + h = scan_escape(h); + } else if (*h == controlsym && h[-1] == '\n') { + h++; + FLUSHIBP; + h = scan_request(h); + if (san && h[-1] == '\n') + h--; + } else if (mandoc_line + && *(h) && isupper(*(h)) + && *(h + 1) && islower(*(h + 1)) + && *(h + 2) && isspace(*(h + 2))) { + /* + * BSD embedded command eg ".It Fl Ar arg1 Fl Ar + * arg2" + */ + FLUSHIBP; + h = scan_request(h); + if (san && h[-1] == '\n') + h--; + } else if (*h == nobreaksym && h[-1] == '\n') { + h++; + FLUSHIBP; + h = scan_request(h); + if (san && h[-1] == '\n') + h--; + } else { + int mx; + + if (h[-1] == '\n' && still_dd && isalnum(*h)) { + /* + * sometimes a .HP request is not followed by + * a .br request + */ + FLUSHIBP; + out_html("

    "); + curpos = 0; + still_dd = 0; + } + switch (*h) { + case '&': + intbuff[ibp++] = '&'; + intbuff[ibp++] = 'a'; + intbuff[ibp++] = 'm'; + intbuff[ibp++] = 'p'; + intbuff[ibp++] = ';'; + curpos++; + break; + case '<': + intbuff[ibp++] = '&'; + intbuff[ibp++] = 'l'; + intbuff[ibp++] = 't'; + intbuff[ibp++] = ';'; + curpos++; + break; + case '>': + intbuff[ibp++] = '&'; + intbuff[ibp++] = 'g'; + intbuff[ibp++] = 't'; + intbuff[ibp++] = ';'; + curpos++; + break; + case '"': + intbuff[ibp++] = '&'; + intbuff[ibp++] = 'q'; + intbuff[ibp++] = 'u'; + intbuff[ibp++] = 'o'; + intbuff[ibp++] = 't'; + intbuff[ibp++] = ';'; + curpos++; + break; + case '\n': + if (h[-1] == '\n' && fillout) { + intbuff[ibp++] = '<'; + intbuff[ibp++] = 'P'; + intbuff[ibp++] = '>'; + } + if (contained_tab && fillout) { + intbuff[ibp++] = '<'; + intbuff[ibp++] = 'B'; + intbuff[ibp++] = 'R'; + intbuff[ibp++] = '>'; + } + contained_tab = 0; + curpos = 0; + usenbsp = 0; + intbuff[ibp++] = '\n'; + break; + case '\t': + { + int curtab = 0; + + contained_tab = 1; + FLUSHIBP; + /* like a typewriter, not like TeX */ + tabstops[19] = curpos + 1; + while (curtab < maxtstop && tabstops[curtab] <= curpos) + curtab++; + if (curtab < maxtstop) { + if (!fillout) { + while (curpos < tabstops[curtab]) { + intbuff[ibp++] = ' '; + if (ibp > 480) { + FLUSHIBP; + } + curpos++; + } + } else { + out_html(""); + while (curpos < tabstops[curtab]) { + out_html(" "); + curpos++; + } + out_html(""); + } + } + } + break; + default: + if (*h == ' ' && (h[-1] == '\n' || usenbsp)) { + FLUSHIBP; + if (!usenbsp && fillout) { + out_html("
    "); + curpos = 0; + } + usenbsp = fillout; + if (usenbsp) + out_html(" "); + else + intbuff[ibp++] = ' '; + } else if (*h > 31 && *h < 127) + intbuff[ibp++] = *h; + else if (((unsigned char) (*h)) > 127) { + intbuff[ibp++] = '&'; + intbuff[ibp++] = '#'; + intbuff[ibp++] = '0' + ((unsigned char) (*h)) / 100; + intbuff[ibp++] = '0' + (((unsigned char) (*h)) % 100) / 10; + intbuff[ibp++] = '0' + ((unsigned char) (*h)) % 10; + intbuff[ibp++] = ';'; + } + curpos++; + break; + } + if (ibp > (MED_STR_MAX - 20)) + FLUSHIBP; + h++; + } + } + FLUSHIBP; + if (buffer) + buffer[buffpos] = '\0'; + if (san && *h) + h++; + newline_for_fun = exnewline_for_fun; + if (result) { + *result = buffer; + buffer = exbuffer; + buffpos = exbuffpos; + buffmax = exbuffmax; + scaninbuff = exscaninbuff; + } + return h; +} + + +static char * +scan_troff_mandoc(char *c, int san, char **result) +{ + char *ret, *end = c; + int oldval = mandoc_line; + + mandoc_line = 1; + while (*end && *end != '\n') { + end++; + } + + if (end > c + 2 + && ispunct(*(end - 1)) + && isspace(*(end - 2)) && *(end - 2) != '\n') { + /* + * Don't format lonely punctuation E.g. in "xyz ," format the + * xyz and then append the comma removing the space. + */ + *(end - 2) = '\n'; + ret = scan_troff(c, san, result); + *(end - 2) = *(end - 1); + *(end - 1) = ' '; + } else { + ret = scan_troff(c, san, result); + } + mandoc_line = oldval; + return ret; +} + +int +main(int argc, char **argv) +{ + FILE *f; + char *t; + int l, i; + char *buf; + char *h, *fullname; + STRDEF *stdf; + + t = NULL; + while ((i = getopt(argc, argv, "")) != EOF) { + switch (i) { + default: + usage(); + exit(EXIT_USAGE); + } + } + + if (argc != 2) { + usage(); + exit(EXIT_USAGE); + } + manpage = h = t = argv[1]; + i = 0; + + buf = read_man_page(h); + if (!buf) { + fprintf(stderr, "man2html: cannot read %s: %s\n", h, strerror(errno)); + exit(1); + } +#ifdef MAKEINDEX + idxfile = fopen(INDEXFILE, "a"); +#endif + stdf = &standardchar[0]; + i = 0; + while (stdf->nr) { + stdf->next = &standardchar[i]; + stdf = stdf->next; + i++; + } + chardef = &standardchar[0]; + + stdf = &standardstring[0]; + i = 0; + while (stdf->nr) { + stdf->next = &standardstring[i]; + stdf = stdf->next; + i++; + } + strdef = &standardstring[0]; + + intdef = &standardint[0]; + i = 0; + while (intdef->nr) { + intdef->next = &standardint[i]; + intdef = intdef->next; + i++; + } + intdef = &standardint[0]; + + defdef = NULL; + + scan_troff(buf + 1, 0, NULL); + + while (itemdepth || dl_set[itemdepth]) { + out_html("\n"); + if (dl_set[itemdepth]) + dl_set[itemdepth] = 0; + else if (itemdepth > 0) + itemdepth--; + } + + out_html(change_to_font(0)); + out_html(change_to_size(0)); + if (!fillout) { + fillout = 1; + out_html(""); + } + out_html(NEWLINE); + + if (output_possible) { + outputPageFooter(th_version, th_datestr, th_page_and_sec); + /*   for mosaic users */ + fputs("
    \n 

    Index

    \n
    \n", stdout); + manidx[mip] = 0; + fputs(manidx, stdout); + if (subs) + fputs("
    \n", stdout); + fputs("\n", stdout); + print_sig(); + fputs("\n\n", stdout); + } else + fprintf(stderr, "man2html: no output produced\n"); +#ifdef MAKEINDEX + if (idxfile) + fclose(idxfile); +#endif + exit(EXIT_SUCCESS); +} diff --git a/bash-5.1/support/missing b/bash-5.1/support/missing new file mode 100755 index 0000000000000000000000000000000000000000..31977a1ed7d41c09c79f180eaab630149cbd9cbc --- /dev/null +++ b/bash-5.1/support/missing @@ -0,0 +1,187 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Franc,ois Pinard , 1996. + +# 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 . +# + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in` + if test -z "$files"; then + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` + test -z "$files" || files="$files.in" + else + files=`echo "$files" | sed -e 's/:/ /g'` + fi + test -z "$files" && files="config.h.in" + touch $files + ;; + + automake) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print \ + | sed 's/^\(.*\).am$/touch \1.in/' \ + | sh + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 diff --git a/bash-5.1/support/mkclone b/bash-5.1/support/mkclone new file mode 100755 index 0000000000000000000000000000000000000000..1840b03fe520b172a001e0bf43e2fa8823e686f9 --- /dev/null +++ b/bash-5.1/support/mkclone @@ -0,0 +1,122 @@ +#! /bin/bash +# +# mkclone - symlink every file appearing in $src/MANIFEST to a corresponding +# file in the target directory ($1). Directories specified in +# MANIFEST are created in the target directory +# +# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# +# 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 . +# +prog=`basename $0` + +SRCDIR=src + +USAGE="usage: $prog [-m manifest] [-s srcdir] [-v] [-d] [-h] target" +while getopts dhm:s:v opt +do + case "$opt" in + m) MANIFEST=$OPTARG ;; + s) SRCDIR=$OPTARG ;; + v) verbose=y ;; + d) ECHO=echo debug=y ;; + h) hardlinks=y ;; + ?) echo $USAGE >&2 + exit 2;; + esac +done + +: ${MANIFEST:=${SRCDIR}/MANIFEST} + +[ -n "$debug" ] && verbose= + +shift $(( $OPTIND - 1 )) + +if [ $# -lt 1 ]; then + echo $USAGE >&2 + exit 2 +fi + +if [ ! -f $MANIFEST ]; then + echo "$prog: $MANIFEST: no such file or directory" >&2 + echo "$prog: must be run with valid -s argument or from source directory" >&2 + exit 1 +fi + +rm_ltmp=false +LINKTEMP=`mktemp -t linktmp.XXXXXXXX 2>/dev/null` +if [ -z "$LINKTEMP" ]; then + : ${TMPDIR:=/tmp} + LINKTEMP=${TMPDIR}/linktmp.$$ + rm_ltmp=true +fi + +$rm_ltmp && rm -f ${LINKTEMP} +# if the user specified hard links, then do that. otherwise, try to use +# symlinks if they're present +if [ -n "$hardlinks" ]; then + LN=ln +elif (ln -s /dev/null ${LINKTEMP}) >/dev/null 2>&1; then + LN="ln -s" +else + LN=ln +fi +rm -f ${LINKTEMP} + +TARGET=$1 + +if [ ! -d "$TARGET" ]; then + mkdir "$TARGET" +fi + +echo "${prog}: creating clone of bash source tree (from $SRCDIR) in $TARGET" + +cd "$TARGET" || { echo "${prog}: cannot cd to $TARGET" >&2 ; exit 1; } + +while read fname type mode +do + [ -z "$fname" ] && continue + + case "$fname" in + \#*) continue ;; + esac + + case "$type" in + d) [ -n "$verbose" ] && echo mkdir $fname + $ECHO mkdir $fname ;; # already in $TARGET + f) fn=${fname##*/} + case "$fname" in + */*) dn=${fname%/*} ;; + *) dn=. ;; + esac + if [ -n "$verbose" ] || [ -n "$debug" ]; then + echo "( cd $dn && $LN $SRCDIR/$fname $fn )" + fi + [ -z "$debug" ] && ( cd $dn && $LN $SRCDIR/$fname $fn ) + ;; + *) echo "${prog}: ${fname}: unknown file type $type" 1>&2 ;; + esac +done < $MANIFEST + +# special +SPECIAL="parser-built y.tab.c y.tab.h" + +rm -f $SPECIAL +for sf in $SPECIAL +do + [ -n "$verbose" ] && echo cp -p $SRCDIR/$sf $TARGET + $ECHO cp -p $SRCDIR/$sf $TARGET +done + +exit 0 diff --git a/bash-5.1/support/mkconffiles b/bash-5.1/support/mkconffiles new file mode 100755 index 0000000000000000000000000000000000000000..59e4c0f1a40138fae87d20682cc63609711022a4 --- /dev/null +++ b/bash-5.1/support/mkconffiles @@ -0,0 +1,79 @@ +#! /bin/sh +# +# mkconffiles - create _distribution and _patchlevel files in preparation +# for recreating `configure' from `configure.ac' +# +# options: +# -s srcdir directory where `configure' resides (defaults to `.') +# -d outdir directory where the files should be written (defaults +# to "$srcdir") +# -v verbose +# -n nocreate - don't create the output files +# +# Chet Ramey +# chet@po.cwru.edu + +# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# +# 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 . + +PROG=`basename $0` + +# defaults +srcdir=. + +distname="_distribution" +patchname="_patchlevel" + +while [ $# -gt 0 ]; do + case "$1" in + -s) shift; srcdir="$1"; shift;; + -d) shift; outdir="$1"; shift;; + -v) shift; verbose=yes ;; + -n) shift; nocreate=yes;; + --) shift; break;; + *) echo "${PROG}: usage: ${PROG} [-s srcdir] [-d outdir] [-nv]" >&2; exit 2;; + esac +done + +if [ ! -f ${srcdir}/configure ]; then + echo "${PROG}: ${srcdir}/configure not found" >&2 + exit 1 +fi + +# default output directory to source directory +if [ -z "$outdir" ]; then + outdir=${srcdir} +fi + +DISTRIB=`grep '^BASHVERS' ${srcdir}/configure | sed 's:.*=::'` +PATCH=`grep '^BASHPATCH' ${srcdir}/configure | sed 's:.*=::'` + +if [ -n "$verbose" ]; then + echo "${PROG}: creating new distribution files for bash-${DISTRIB}.${PATCH} in ${outdir}" +fi + +distout=${outdir}/${distname} +patchout=${outdir}/${patchname} + +if [ -z "$nocreate" ]; then + echo "$DISTRIB" > $distout + echo "$PATCH" > $patchout +fi + +if [ -n "$verbose" ]; then + echo "${PROG}: created $distout and $patchout" +fi + +exit 0 diff --git a/bash-5.1/support/mkdirs b/bash-5.1/support/mkdirs new file mode 100755 index 0000000000000000000000000000000000000000..46f656eaff42dbdb65d0e345f46e28bd192a4abc --- /dev/null +++ b/bash-5.1/support/mkdirs @@ -0,0 +1,47 @@ +#! /bin/sh +# +# mkdirs - a work-alike for `mkdir -p' +# +# Chet Ramey +# chet@po.cwru.edu + +# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# +# 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 . + +for dir +do + + test -d "$dir" && continue + + tomake=$dir + while test -n "$dir" ; do + # dir=${dir%/*} + # dir=`expr "$dir" ':' '\(/.*\)/[^/]*'` + if dir=`expr "$dir" ':' '\(.*\)/[^/]*'`; then + tomake="$dir $tomake" + else + dir= + fi + done + + for d in $tomake + do + test -d "$d" && continue + echo mkdir "$d" + mkdir "$d" + done +done + +exit 0 diff --git a/bash-5.1/support/mkinstalldirs b/bash-5.1/support/mkinstalldirs new file mode 100755 index 0000000000000000000000000000000000000000..d2d5f21b611235316317197d3a32c2dff5897a6f --- /dev/null +++ b/bash-5.1/support/mkinstalldirs @@ -0,0 +1,111 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" 1>&2 + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +case $dirmode in + '') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi + ;; + *) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi + ;; +esac + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# End: +# mkinstalldirs ends here diff --git a/bash-5.1/support/mksignames.c b/bash-5.1/support/mksignames.c new file mode 100644 index 0000000000000000000000000000000000000000..ba87ae8bca69e8ae3749df953de1ce51954fa976 --- /dev/null +++ b/bash-5.1/support/mksignames.c @@ -0,0 +1,111 @@ +/* mksignames.c -- Create and write `signames.h', which contains an array of + signal names. */ + +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include +#include + +#include +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +/* Duplicated from signames.c */ +#if !defined (NSIG) +# define NSIG 64 +#endif + +#define LASTSIG NSIG+2 + +/* Imported from signames.c */ +extern void initialize_signames (); +extern char *signal_names[]; + +char *progname; + +void +write_signames (stream) + FILE *stream; +{ + register int i; + + fprintf (stream, "/* This file was automatically created by %s.\n", + progname); + fprintf (stream, " Do not edit. Edit support/mksignames.c instead. */\n\n"); + fprintf (stream, + "/* A translation list so we can be polite to our users. */\n"); +#if defined (CROSS_COMPILING) + fprintf (stream, "extern char *signal_names[];\n\n"); + fprintf (stream, "extern void initialize_signames PARAMS((void));\n\n"); +#else + fprintf (stream, "char *signal_names[NSIG + 4] = {\n"); + + for (i = 0; i <= LASTSIG; i++) + fprintf (stream, " \"%s\",\n", signal_names[i]); + + fprintf (stream, " (char *)0x0\n"); + fprintf (stream, "};\n\n"); + fprintf (stream, "#define initialize_signames()\n\n"); +#endif +} + +int +main (argc, argv) + int argc; + char **argv; +{ + char *stream_name; + FILE *stream; + + progname = argv[0]; + + if (argc == 1) + { + stream_name = "stdout"; + stream = stdout; + } + else if (argc == 2) + { + stream_name = argv[1]; + stream = fopen (stream_name, "w"); + } + else + { + fprintf (stderr, "Usage: %s [output-file]\n", progname); + exit (1); + } + + if (!stream) + { + fprintf (stderr, "%s: %s: cannot open for writing\n", + progname, stream_name); + exit (2); + } + +#if !defined (CROSS_COMPILING) + initialize_signames (); +#endif + write_signames (stream); + exit (0); +} diff --git a/bash-5.1/support/mkversion.sh b/bash-5.1/support/mkversion.sh new file mode 100755 index 0000000000000000000000000000000000000000..5960a42555a12f860a3d0f296bba1464c3addbab --- /dev/null +++ b/bash-5.1/support/mkversion.sh @@ -0,0 +1,168 @@ +#! /bin/sh + +# Simple program to make new version numbers for the shell. +# Big deal, but it was getting out of hand to do everything +# in the makefile. This creates a file named by the -o option, +# otherwise everything is echoed to the standard output. + +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# +# 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 . +# + +PROGNAME=`basename $0` +USAGE="$PROGNAME [-b] [-S srcdir] -d version -p patchlevel [-s status] [-o outfile]" + +source_dir="." + +while [ $# -gt 0 ]; do + case "$1" in + -o) shift; OUTFILE=$1; shift ;; + -b) shift; inc_build=yes ;; + -s) shift; rel_status=$1; shift ;; + -p) shift; patch_level=$1; shift ;; + -d) shift; dist_version=$1; shift ;; + -S) shift; source_dir="$1"; shift ;; + *) echo "$PROGNAME: usage: $USAGE" >&2 ; exit 2 ;; + esac +done + +# Required arguments +if [ -z "$dist_version" ]; then + echo "${PROGNAME}: required argument -d missing" >&2 + echo "$PROGNAME: usage: $USAGE" >&2 + exit 1 +fi + +#if [ -z "$patch_level" ]; then +# echo "${PROGNAME}: required argument -p missing" >&2 +# echo "$PROGNAME: usage: $USAGE" >&2 +# exit 1 +#fi + +# Defaults +if [ -z "$rel_status" ]; then + rel_status="release" +fi + +build_ver= +if [ -r .build ]; then + build_ver=`cat .build` +fi +if [ -z "$build_ver" ]; then + build_ver=0 +fi + +# increment the build version if that's what's required + +if [ -n "$inc_build" ]; then + build_ver=`expr 1 + $build_ver` +fi + +# what's the patch level? +if [ -z "$patch_level" ]; then + patchlevel_h=$source_dir/patchlevel.h + if [ -s $patchlevel_h ]; then + patch_level=`cat $patchlevel_h | grep '^#define[ ]*PATCHLEVEL' | awk '{print $NF}'` + fi +fi +if [ -z "$patch_level" ]; then + patch_level=0 +fi + +# If we have an output file specified, make it the standard output +if [ -n "$OUTFILE" ]; then + if exec >$OUTFILE; then + : + else + echo "${PROGNAME}: cannot redirect standard output to $OUTFILE" >&2 + exit 1 + fi +fi + +# Output the leading comment. +echo "/* Version control for the shell. This file gets changed when you say" +echo " \`make version.h' to the Makefile. It is created by mkversion. */" + +# Output the distribution version. Single numbers are converted to x.00. +# Allow, as a special case, `[:digit:].[:digit:][:alpha:]' for +# intermediate versions (e.g., `2.5a'). +# Any characters other than digits and `.' are invalid. +case "$dist_version" in +[0-9].[0-9][a-z]) ;; # special case +*[!0-9.]*) echo "mkversion.sh: ${dist_version}: bad distribution version" >&2 + exit 1 ;; +*.*) ;; +*) dist_version=${dist_version}.00 ;; +esac + +dist_major=`echo $dist_version | sed 's:\..*$::'` +[ -z "${dist_major}" ] && dist_major=0 + +dist_minor=`echo $dist_version | sed 's:^.*\.::'` +case "$dist_minor" in +"") dist_minor=0 ;; +[a-z]) dist_minor=0${dist_minor} ;; +?) dist_minor=${dist_minor} ;; +*) ;; +esac + +#float_dist=`echo $dist_version | awk '{printf "%.2f\n", $1}'` +float_dist=${dist_major}.${dist_minor} + +echo +echo "/* The distribution version number of this shell. */" +echo "#define DISTVERSION \"${float_dist}\"" + +# Output the patch level +#echo +#echo "/* The patch level of this version of the shell. */" +#echo "#define PATCHLEVEL ${patch_level}" + +# Output the build version +echo +echo "/* The last built version of this shell. */" +echo "#define BUILDVERSION ${build_ver}" + +# Output the release status +echo +echo "/* The release status of this shell. */" +echo "#define RELSTATUS \"${rel_status}\"" + +echo +echo "/* The default shell compatibility-level (the current version) */" +echo "#define DEFAULT_COMPAT_LEVEL ${dist_major}${dist_minor}" + +# Output the SCCS version string +sccs_string="${float_dist}.${patch_level}(${build_ver}) ${rel_status} GNU" +echo +echo "/* A version string for use by sccs and the what command. */" +echo "#define SCCSVERSION \"@(#)Bash version ${sccs_string}\"" + +# extern function declarations +#echo +#echo '/* Functions from version.c. */' +#echo 'extern char *shell_version_string PARAMS((void));' +#echo 'extern void show_shell_version PARAMS((int));' + +if [ -n "$inc_build" ]; then + # Make sure we can write to .build + if [ -f .build ] && [ ! -w .build ]; then + echo "$PROGNAME: cannot write to .build, not incrementing build version" >&2 + else + echo "$build_ver" > .build + fi +fi + +exit 0 diff --git a/bash-5.1/support/printenv.c b/bash-5.1/support/printenv.c new file mode 100644 index 0000000000000000000000000000000000000000..154e086cbcb570871dde2b93acc91c511ac45907 --- /dev/null +++ b/bash-5.1/support/printenv.c @@ -0,0 +1,72 @@ +/* printenv -- minimal clone of BSD printenv(1). + + usage: printenv [varname] + + Chet Ramey + chet@po.cwru.edu +*/ + +/* Copyright (C) 1997-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include "bashansi.h" +#include /* puts */ + +extern char **environ; + +int +main (argc, argv) + int argc; + char **argv; +{ + register char **envp, *eval; + int len; + + argv++; + argc--; + + /* printenv */ + if (argc == 0) + { + for (envp = environ; *envp; envp++) + puts (*envp); + exit (0); + } + + /* printenv varname */ + len = strlen (*argv); + for (envp = environ; *envp; envp++) + { + if (**argv == **envp && strncmp (*envp, *argv, len) == 0) + { + eval = *envp + len; + /* If the environment variable doesn't have an `=', ignore it. */ + if (*eval == '=') + { + puts (eval + 1); + exit (0); + } + } + } + exit (1); +} + diff --git a/bash-5.1/support/printenv.sh b/bash-5.1/support/printenv.sh new file mode 100755 index 0000000000000000000000000000000000000000..32b7ee845e7518dd3fa33e8b6f1f9d0a0cc298a4 --- /dev/null +++ b/bash-5.1/support/printenv.sh @@ -0,0 +1,27 @@ +#! /bin/sh - + +# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# +# 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 . +# + +if [ $# -eq 0 ]; then + env + exit +elif eval [ "\${$1-unset}" = "unset" ]; then + exit 1 +else + eval echo \$$1 + exit 0 +fi diff --git a/bash-5.1/support/recho.c b/bash-5.1/support/recho.c new file mode 100644 index 0000000000000000000000000000000000000000..7e3c6bc6535ca8748b6d94706666267926b487f1 --- /dev/null +++ b/bash-5.1/support/recho.c @@ -0,0 +1,67 @@ +/* + recho -- really echo args, bracketed with <> and with invisible chars + made visible. + + Chet Ramey + chet@po.cwru.edu +*/ + +/* Copyright (C) 2002-2005 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include "bashansi.h" +#include + +void strprint(); + +int +main(argc, argv) +int argc; +char **argv; +{ + register int i; + + for (i = 1; i < argc; i++) { + printf("argv[%d] = <", i); + strprint(argv[i]); + printf(">\n"); + } + exit(0); +} + +void +strprint(str) +char *str; +{ + register unsigned char *s; + + for (s = (unsigned char *)str; s && *s; s++) { + if (*s < ' ') { + putchar('^'); + putchar(*s+64); + } else if (*s == 127) { + putchar('^'); + putchar('?'); + } else + putchar(*s); + } +} diff --git a/bash-5.1/support/rlvers.sh b/bash-5.1/support/rlvers.sh new file mode 100755 index 0000000000000000000000000000000000000000..64cadc776fa0deaf6155382fe5e20111695ecd9a --- /dev/null +++ b/bash-5.1/support/rlvers.sh @@ -0,0 +1,113 @@ +#! /bin/sh +# +# rlvers.sh -- run a program that prints out the readline version number +# using locally-installed readline libraries +# + +# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# +# 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 . +# + +PROGNAME=`basename $0` + +: ${TMPDIR:=/tmp} +TDIR=$TMPDIR/rlvers + +# defaults +CC=cc +RL_LIBDIR=/usr/local/lib +RL_INCDIR=/usr/local/include + +TERMCAP_LIB="-ltermcap" + +# cannot rely on the presence of getopts +while [ $# -gt 0 ]; do + case "$1" in + -C) shift ; CC="$1"; shift ;; + -I) shift ; RL_INCDIR="$1" ; shift ;; + -L) shift ; RL_LIBDIR="$1" ; shift ;; + -T) shift ; TERMCAP_LIB="$1" ; shift ;; + -v) shift ; verbose=y ;; + --) shift ; break ;; + *) echo "${PROGNAME}: usage: $PROGNAME [-C compiler] [-L libdir] [-v]" >&2 ; exit 2;; + esac +done + +# if someone happened to install examples/rlversion, use it (it's not +# installed by default) +if test -f ${RL_LIBDIR}/rlversion ; then + if [ -n "$verbose" ]; then + echo "${PROGNAME}: using installed rlversion from ${RL_LIBDIR}/rlversion" + fi + v=`${RL_LIBDIR}/rlversion 2>/dev/null` + case "$v" in + unknown | "") echo 0 ;; + *) echo "$v" ;; + esac + exit 0 +fi + +if [ -n "$verbose" ]; then + echo "${PROGNAME}: using ${RL_LIBDIR} to find libreadline" + echo "${PROGNAME}: attempting program compilation" +fi + +# make $TDIR mode 0700 +mkdir $TDIR || { + echo "${PROGNAME}: ${TDIR}: file exists" >&2 + echo 0 + exit 1 +} +chmod 700 $TDIR + +trap 'rm -f $TDIR/rlvers $TDIR/rlvers.? ; rmdir $TDIR' 0 1 2 3 6 15 + +cat > $TDIR/rlvers.c << EOF +#include +extern char *rl_library_version; + +main() +{ + printf("%s\n", rl_library_version ? rl_library_version : "0"); + exit(0); +} +EOF + +opwd=`pwd` + +cd $TDIR || { + echo "${PROGNAME}: cannot cd to $TDIR" >&2 + echo 0 + exit 1 +} + +if eval ${CC} -L${RL_LIBDIR} -I${RL_INCDIR} -o $TDIR/rlvers $TDIR/rlvers.c -lreadline ${TERMCAP_LIB}; +then + v=`$TDIR/rlvers` +else + if [ -n "$verbose" ] ; then + echo "${PROGNAME}: compilation failed: status $?" + echo "${PROGNAME}: using version 0" + fi + v=0 +fi + +case "$v" in +unknown | "") echo 0 ;; +*) echo "$v" ;; +esac + +cd $opwd +exit 0 diff --git a/bash-5.1/support/shobj-conf b/bash-5.1/support/shobj-conf new file mode 100755 index 0000000000000000000000000000000000000000..5a3f9776e910ba0bc8e521effca06989bd984903 --- /dev/null +++ b/bash-5.1/support/shobj-conf @@ -0,0 +1,553 @@ +#! /bin/sh +# +# shobj-conf -- output a series of variable assignments to be substituted +# into a Makefile by configure which specify system-dependent +# information for creating shared objects that may be loaded +# into bash with `enable -f' +# +# usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor +# +# Chet Ramey +# chet@po.cwru.edu + +# Copyright (C) 1996-2019 Free Software Foundation, Inc. +# +# This file is part of GNU Bash, the Bourne Again SHell. +# +# 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 . +# + +# +# defaults +# +SHOBJ_STATUS=supported +SHLIB_STATUS=supported + +SHOBJ_CC=cc +SHOBJ_CFLAGS= +SHOBJ_LD= +SHOBJ_LDFLAGS= +SHOBJ_XLDFLAGS= +SHOBJ_LIBS= + +SHLIB_XLDFLAGS= +SHLIB_LIBS= + +SHLIB_DOT='.' +SHLIB_LIBPREF='lib' +SHLIB_LIBSUFF='so' + +SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)' +SHLIB_DLLVERSION='$(SHLIB_MAJOR)' + +PROGNAME=`basename $0` +USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor" + +while [ $# -gt 0 ]; do + case "$1" in + -C) shift; SHOBJ_CC="$1"; shift ;; + -c) shift; host_cpu="$1"; shift ;; + -o) shift; host_os="$1"; shift ;; + -v) shift; host_vendor="$1"; shift ;; + *) echo "$USAGE" >&2 ; exit 2;; + esac +done + +case "${host_os}-${SHOBJ_CC}-${host_vendor}" in +nsk-cc-tandem|nsk-c99-tandem) + SHOBJ_CFLAGS=-Wglobalized + case `uname -m` in + NSR*) + SHOBJ_CFLAGS="${SHOBJ_CFLAGS} -Wcall_shared" # default on TNS/E, needed on TNS/R + SHOBJ_LD=/usr/bin/ld # for TNS/R + ;; + NSE*|NEO*) + SHOBJ_LD=/usr/bin/eld + ;; + esac + SHOBJ_LDFLAGS='-shared -bglobalized -unres_symbols ignore' + ;; + +sunos4*-*gcc*) + SHOBJ_CFLAGS=-fpic + SHOBJ_LD=/usr/bin/ld + SHOBJ_LDFLAGS='-assert pure-text' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' + ;; + +sunos4*) + SHOBJ_CFLAGS=-pic + SHOBJ_LD=/usr/bin/ld + SHOBJ_LDFLAGS='-assert pure-text' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' + ;; + +sunos5*-*gcc*|solaris2*-*gcc*) + SHOBJ_LD='${CC}' + ld_used=`gcc -print-prog-name=ld` + if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then + # This line works for the GNU ld + SHOBJ_LDFLAGS='-shared -Wl,-h,$@' + # http://sourceware.org/ml/binutils/2001-08/msg00361.html + SHOBJ_CFLAGS=-fPIC + else + # This line works for the Solaris linker in /usr/ccs/bin/ld + SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@' + SHOBJ_CFLAGS=-fpic + fi + +# SHLIB_XLDFLAGS='-R $(libdir)' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sunos5*|solaris2*) + SHOBJ_CFLAGS='-K pic' + SHOBJ_LD=/usr/ccs/bin/ld + SHOBJ_LDFLAGS='-G -dy -z text -i -h $@' + +# SHLIB_XLDFLAGS='-R $(libdir)' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +# All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd. +linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*|dragonfly*) + SHOBJ_CFLAGS=-fPIC + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' + + SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' + ;; + +# Darwin/MacOS X +darwin*) + # Common definitions for all darwin/mac os x versions + SHOBJ_CFLAGS='-fno-common' + + SHOBJ_LD='${CC}' + + SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' + SHLIB_LIBSUFF='dylib' + + # unused at this time + SHLIB_SONAME='$(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF)' + + case "${host_os}" in + # Darwin versions 1, 5, 6, 7 correspond to Mac OS X 10.0, 10.1, 10.2, + # and 10.3, respectively. + darwin[1-7].*) + SHOBJ_STATUS=unsupported + SHOBJ_LDFLAGS='-dynamic' + SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -v' + ;; + # Darwin 8 == Mac OS X 10.4; Mac OS X 10.N == Darwin N+4 + *) + case "${host_os}" in + darwin[89]*|darwin1[012]*) + SHOBJ_ARCHFLAGS='-arch_only `/usr/bin/arch`' + ;; + *) # Mac OS X 10.9 (Mavericks) and later + SHOBJ_ARCHFLAGS= + # for 32 and 64bit universal library + #SHOBJ_ARCHFLAGS='-arch i386 -arch x86_64' + #SHOBJ_CFLAGS=${SHOBJ_CFLAGS}' -arch i386 -arch x86_64' + ;; + esac + SHOBJ_LDFLAGS="-dynamiclib -dynamic -undefined dynamic_lookup ${SHOBJ_ARCHFLAGS}" + SHLIB_XLDFLAGS="-dynamiclib ${SHOBJ_ARCHFLAGS}"' -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -v' + ;; + esac + + SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 + ;; + +openbsd*|netbsd*|mirbsd*) + SHOBJ_CFLAGS=-fPIC + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared' + + SHLIB_XLDFLAGS='-R$(libdir)' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' + ;; + +bsdi2*) + SHOBJ_CC=shlicc2 + SHOBJ_CFLAGS= + SHOBJ_LD=ld + SHOBJ_LDFLAGS=-r + SHOBJ_LIBS=-lc_s.2.1.0 + + # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in + # the ass -- they require changing {/usr/lib,etc}/shlib.map on + # each system, and the library creation process is byzantine + SHLIB_STATUS=unsupported + ;; + +bsdi3*) + SHOBJ_CC=shlicc2 + SHOBJ_CFLAGS= + SHOBJ_LD=ld + SHOBJ_LDFLAGS=-r + SHOBJ_LIBS=-lc_s.3.0.0 + + # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in + # the ass -- they require changing {/usr/lib,etc}/shlib.map on + # each system, and the library creation process is byzantine + SHLIB_STATUS=unsupported + ;; + +bsdi4*) + # BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked + # shared libraries. gcc 2.x is the standard compiler, and the + # `normal' gcc options should work as they do in Linux. + + SHOBJ_CFLAGS=-fPIC + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' + + SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' + ;; + +osf*-*gcc*) + # Fix to use gcc linker driver from bfischer@TechFak.Uni-Bielefeld.DE + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' + + SHLIB_XLDFLAGS='-rpath $(libdir)' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +osf*) + SHOBJ_LD=ld + SHOBJ_LDFLAGS='-shared -soname $@ -expect_unresolved "*"' + + SHLIB_XLDFLAGS='-rpath $(libdir)' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com + SHOBJ_CFLAGS=-fpic + SHOBJ_LD='ld' + SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' + SHOBJ_XLDFLAGS='-G' + + SHLIB_XLDFLAGS='-bM:SRE' + SHLIB_LIBS='-lcurses -lc' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +aix4.[2-9]*|aix[5-9].*) + SHOBJ_CFLAGS=-K + SHOBJ_LD='ld' + SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' + SHOBJ_XLDFLAGS='-G' + + SHLIB_XLDFLAGS='-bM:SRE' + SHLIB_LIBS='-lcurses -lc' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +# +# THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface +# +irix[56]*-*gcc*) + SHOBJ_CFLAGS='-fpic' + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' + + SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +irix[56]*) + SHOBJ_CFLAGS='-K PIC' + SHOBJ_LD=ld +# SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@' +# Change from David Kaelbling . If you have problems, +# remove the `-no_unresolved' + SHOBJ_LDFLAGS='-shared -no_unresolved -soname $@' + + SHLIB_XLDFLAGS='-rpath $(libdir)' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +hpux9*-*gcc*) + # must use gcc; the bundled cc cannot compile PIC code + SHOBJ_CFLAGS='-fpic' + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s' + + SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' + SHLIB_LIBSUFF='sl' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +hpux9*) + SHOBJ_STATUS=unsupported + SHLIB_STATUS=unsupported + + # If you are using the HP ANSI C compiler, you can uncomment and use + # this code (I have not tested it) +# SHOBJ_STATUS=supported +# SHLIB_STATUS=supported +# +# SHOBJ_CFLAGS='+z' +# SHOBJ_LD='ld' +# SHOBJ_LDFLAGS='-b +s' +# +# SHLIB_XLDFLAGS='+b $(libdir)' +# SHLIB_LIBSUFF='sl' +# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + + ;; + +hpux10*-*gcc*) + # must use gcc; the bundled cc cannot compile PIC code + SHOBJ_CFLAGS='-fpic' + SHOBJ_LD='${CC}' + # if you have problems linking here, moving the `-Wl,+h,$@' from + # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work + SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s' + + SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)' + SHLIB_LIBSUFF='sl' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +hpux10*) + SHOBJ_STATUS=unsupported + SHLIB_STATUS=unsupported + + # If you are using the HP ANSI C compiler, you can uncomment and use + # this code (I have not tested it) +# SHOBJ_STATUS=supported +# SHLIB_STATUS=supported +# +# SHOBJ_CFLAGS='+z' +# SHOBJ_LD='ld' +# SHOBJ_LDFLAGS='-b +s +h $@' +# +# SHLIB_XLDFLAGS='+b $(libdir)' +# SHLIB_LIBSUFF='sl' +# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + + ;; + +hpux11*-*gcc*) + # must use gcc; the bundled cc cannot compile PIC code + SHOBJ_CFLAGS='-fpic' + SHOBJ_LD='${CC}' +# SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@' + SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s -Wl,+h,$@' + + SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' + SHLIB_LIBSUFF='sl' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +hpux11*) + SHOBJ_STATUS=unsupported + SHLIB_STATUS=unsupported + + # If you are using the HP ANSI C compiler, you can uncomment and use + # this code from michael.osipov@siemens.com (I have not tested it) +# SHOBJ_CFLAGS='+z' +# SHOBJ_LD='$(CC)' +# SHOBJ_LDFLAGS='-b -Wl,+s -Wl,+h,$@' +# +# SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' +# SHLIB_LIBSUFF='so' +# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' +# SHLIB_LIBS='$(TERMCAP_LIB)' + ;; + +sysv4*-*gcc*) + SHOBJ_CFLAGS=-shared + SHOBJ_LDFLAGS='-shared -h $@' + SHOBJ_LD='${CC}' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sysv4*) + SHOBJ_CFLAGS='-K PIC' + SHOBJ_LD=ld + SHOBJ_LDFLAGS='-dy -z text -G -h $@' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sco3.2v5*-*gcc*) + SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sco3.2v5*) + SHOBJ_CFLAGS='-K pic -b elf' + SHOBJ_LD=ld + SHOBJ_LDFLAGS='-G -b elf -dy -z text -h $@' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sysv5uw7*-*gcc*) + SHOBJ_CFLAGS='-fpic' + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sysv5uw7*) + SHOBJ_CFLAGS='-K PIC' + SHOBJ_LD=ld + SHOBJ_LDFLAGS='-G -dy -z text -h $@' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sysv5UnixWare*-*gcc*) + SHOBJ_CFLAGS=-fpic + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sysv5UnixWare*) + SHOBJ_CFLAGS='-K PIC' + SHOBJ_LD=ld + SHOBJ_LDFLAGS='-G -dy -z text -h $@' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sysv5OpenUNIX*-*gcc*) + SHOBJ_CFLAGS=-fpic + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +sysv5OpenUNIX*) + SHOBJ_CFLAGS='-K PIC' + SHOBJ_LD=ld + SHOBJ_LDFLAGS='-G -dy -z text -h $@' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +dgux*-*gcc*) + SHOBJ_CFLAGS=-fpic + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +dgux*) + SHOBJ_CFLAGS='-K pic' + SHOBJ_LD=ld + SHOBJ_LDFLAGS='-G -dy -h $@' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +msdos*) + SHOBJ_STATUS=unsupported + SHLIB_STATUS=unsupported + ;; + +cygwin*) + SHOBJ_LD='$(CC)' + SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' + SHLIB_LIBPREF='cyg' + SHLIB_LIBSUFF='dll' + SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' + SHLIB_LIBS='$(TERMCAP_LIB)' + + SHLIB_DOT= + # For official cygwin releases, DLLVERSION will be defined in the + # environment of configure, and will be incremented any time the API + # changes in a non-backwards compatible manner. Otherwise, it is just + # SHLIB_MAJOR. + if [ -n "$DLLVERSION" ] ; then + SHLIB_DLLVERSION="$DLLVERSION" + fi + ;; + +mingw*) + SHOBJ_LD='$(CC)' + SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' + SHLIB_LIBSUFF='dll' + SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' + SHLIB_LIBS='$(TERMCAP_LIB)' + + SHLIB_DOT= + # For official cygwin releases, DLLVERSION will be defined in the + # environment of configure, and will be incremented any time the API + # changes in a non-backwards compatible manner. Otherwise, it is just + # SHLIB_MAJOR. + if [ -n "$DLLVERSION" ] ; then + SHLIB_DLLVERSION="$DLLVERSION" + fi + ;; + +# +# Rely on correct gcc configuration for everything else +# +*-*gcc*) + SHOBJ_CFLAGS=-fpic + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared' + + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + +*) + SHOBJ_STATUS=unsupported + SHLIB_STATUS=unsupported + ;; + +esac + +echo SHOBJ_CC=\'"$SHOBJ_CC"\' +echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\' +echo SHOBJ_LD=\'"$SHOBJ_LD"\' +echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\' +echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\' +echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\' + +echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\' +echo SHLIB_LIBS=\'"$SHLIB_LIBS"\' + +echo SHLIB_DOT=\'"$SHLIB_DOT"\' + +echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\' +echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\' + +echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\' +echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\' + +echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\' +echo SHLIB_STATUS=\'"$SHLIB_STATUS"\' + +exit 0 diff --git a/bash-5.1/support/signames.c b/bash-5.1/support/signames.c new file mode 100644 index 0000000000000000000000000000000000000000..aba4842aeea87e9eca8b0baf694bbccd6e8e16a1 --- /dev/null +++ b/bash-5.1/support/signames.c @@ -0,0 +1,446 @@ +/* signames.c -- Create an array of signal names. */ + +/* Copyright (C) 2006-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#include +#include + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if !defined (NSIG) +# define NSIG 64 +#endif + +/* + * Special traps: + * EXIT == 0 + * DEBUG == NSIG + * ERR == NSIG+1 + * RETURN == NSIG+2 + */ +#define LASTSIG NSIG+2 + +char *signal_names[2 * (LASTSIG)]; + +#define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0])) + +/* AIX 4.3 defines SIGRTMIN and SIGRTMAX as 888 and 999 respectively. + I don't want to allocate so much unused space for the intervening signal + numbers, so we just punt if SIGRTMAX is past the bounds of the + signal_names array (handled in configure). */ +#if defined (SIGRTMAX) && defined (UNUSABLE_RT_SIGNALS) +# undef SIGRTMAX +# undef SIGRTMIN +#endif + +#if defined (SIGRTMAX) || defined (SIGRTMIN) +# define RTLEN 14 +# define RTLIM 256 +#endif + +#if defined (BUILDTOOL) +extern char *progname; +#endif + +void +initialize_signames () +{ + register int i; +#if defined (SIGRTMAX) || defined (SIGRTMIN) + int rtmin, rtmax, rtcnt; +#endif + + for (i = 1; i < signal_names_size; i++) + signal_names[i] = (char *)NULL; + + /* `signal' 0 is what we do on exit. */ + signal_names[0] = "EXIT"; + + /* Place signal names which can be aliases for more common signal + names first. This allows (for example) SIGABRT to overwrite SIGLOST. */ + + /* POSIX 1003.1b-1993 real time signals, but take care of incomplete + implementations. Acoording to the standard, both, SIGRTMIN and + SIGRTMAX must be defined, SIGRTMIN must be strictly less than + SIGRTMAX, and the difference must be at least 7, that is, there + must be at least eight distinct real time signals. */ + + /* The generated signal names are SIGRTMIN, SIGRTMIN+1, ..., + SIGRTMIN+x, SIGRTMAX-x, ..., SIGRTMAX-1, SIGRTMAX. If the number + of RT signals is odd, there is an extra SIGRTMIN+(x+1). + These names are the ones used by ksh and /usr/xpg4/bin/sh on SunOS5. */ + +#if defined (SIGRTMIN) + rtmin = SIGRTMIN; + signal_names[rtmin] = "SIGRTMIN"; +#endif + +#if defined (SIGRTMAX) + rtmax = SIGRTMAX; + signal_names[rtmax] = "SIGRTMAX"; +#endif + +#if defined (SIGRTMAX) && defined (SIGRTMIN) + if (rtmax > rtmin) + { + rtcnt = (rtmax - rtmin - 1) / 2; + /* croak if there are too many RT signals */ + if (rtcnt >= RTLIM/2) + { + rtcnt = RTLIM/2-1; +#ifdef BUILDTOOL + fprintf(stderr, "%s: error: more than %d real time signals, fix `%s'\n", + progname, RTLIM, progname); +#endif + } + + for (i = 1; i <= rtcnt; i++) + { + signal_names[rtmin+i] = (char *)malloc(RTLEN); + if (signal_names[rtmin+i]) + sprintf (signal_names[rtmin+i], "SIGRTMIN+%d", i); + signal_names[rtmax-i] = (char *)malloc(RTLEN); + if (signal_names[rtmax-i]) + sprintf (signal_names[rtmax-i], "SIGRTMAX-%d", i); + } + + if (rtcnt < RTLIM/2-1 && rtcnt != (rtmax-rtmin)/2) + { + /* Need an extra RTMIN signal */ + signal_names[rtmin+rtcnt+1] = (char *)malloc(RTLEN); + if (signal_names[rtmin+rtcnt+1]) + sprintf (signal_names[rtmin+rtcnt+1], "SIGRTMIN+%d", rtcnt+1); + } + } +#endif /* SIGRTMIN && SIGRTMAX */ + +#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */ + signal_names[SIGLOST] = "SIGLOST"; +#endif + +/* AIX */ +#if defined (SIGMSG) /* HFT input data pending */ + signal_names[SIGMSG] = "SIGMSG"; +#endif + +#if defined (SIGDANGER) /* system crash imminent */ + signal_names[SIGDANGER] = "SIGDANGER"; +#endif + +#if defined (SIGMIGRATE) /* migrate process to another CPU */ + signal_names[SIGMIGRATE] = "SIGMIGRATE"; +#endif + +#if defined (SIGPRE) /* programming error */ + signal_names[SIGPRE] = "SIGPRE"; +#endif + +#if defined (SIGPHONE) /* Phone interrupt */ + signal_names[SIGPHONE] = "SIGPHONE"; +#endif + +#if defined (SIGVIRT) /* AIX virtual time alarm */ + signal_names[SIGVIRT] = "SIGVIRT"; +#endif + +#if defined (SIGTINT) /* Interrupt */ + signal_names[SIGTINT] = "SIGTINT"; +#endif + +#if defined (SIGALRM1) /* m:n condition variables */ + signal_names[SIGALRM1] = "SIGALRM1"; +#endif + +#if defined (SIGWAITING) /* m:n scheduling */ + signal_names[SIGWAITING] = "SIGWAITING"; +#endif + +#if defined (SIGGRANT) /* HFT monitor mode granted */ + signal_names[SIGGRANT] = "SIGGRANT"; +#endif + +#if defined (SIGKAP) /* keep alive poll from native keyboard */ + signal_names[SIGKAP] = "SIGKAP"; +#endif + +#if defined (SIGRETRACT) /* HFT monitor mode retracted */ + signal_names[SIGRETRACT] = "SIGRETRACT"; +#endif + +#if defined (SIGSOUND) /* HFT sound sequence has completed */ + signal_names[SIGSOUND] = "SIGSOUND"; +#endif + +#if defined (SIGSAK) /* Secure Attention Key */ + signal_names[SIGSAK] = "SIGSAK"; +#endif + +#if defined (SIGCPUFAIL) /* Predictive processor deconfiguration */ + signal_names[SIGCPUFAIL] = "SIGCPUFAIL"; +#endif + +#if defined (SIGAIO) /* Asynchronous I/O */ + signal_names[SIGAIO] = "SIGAIO"; +#endif + +#if defined (SIGLAB) /* Security label changed */ + signal_names[SIGLAB] = "SIGLAB"; +#endif + +/* SunOS5 */ +#if defined (SIGLWP) /* Solaris: special signal used by thread library */ + signal_names[SIGLWP] = "SIGLWP"; +#endif + +#if defined (SIGFREEZE) /* Solaris: special signal used by CPR */ + signal_names[SIGFREEZE] = "SIGFREEZE"; +#endif + +#if defined (SIGTHAW) /* Solaris: special signal used by CPR */ + signal_names[SIGTHAW] = "SIGTHAW"; +#endif + +#if defined (SIGCANCEL) /* Solaris: thread cancellation signal used by libthread */ + signal_names[SIGCANCEL] = "SIGCANCEL"; +#endif + +#if defined (SIGXRES) /* Solaris: resource control exceeded */ + signal_names[SIGXRES] = "SIGXRES"; +#endif + +#if defined (SIGJVM1) /* Solaris: Java Virtual Machine 1 */ + signal_names[SIGJVM1] = "SIGJVM1"; +#endif + +#if defined (SIGJVM2) /* Solaris: Java Virtual Machine 2 */ + signal_names[SIGJVM2] = "SIGJVM2"; +#endif + +#if defined (SIGDGTIMER1) + signal_names[SIGDGTIMER1] = "SIGDGTIMER1"; +#endif + +#if defined (SIGDGTIMER2) + signal_names[SIGDGTIMER2] = "SIGDGTIMER2"; +#endif + +#if defined (SIGDGTIMER3) + signal_names[SIGDGTIMER3] = "SIGDGTIMER3"; +#endif + +#if defined (SIGDGTIMER4) + signal_names[SIGDGTIMER4] = "SIGDGTIMER4"; +#endif + +#if defined (SIGDGNOTIFY) + signal_names[SIGDGNOTIFY] = "SIGDGNOTIFY"; +#endif + +/* Apollo */ +#if defined (SIGAPOLLO) + signal_names[SIGAPOLLO] = "SIGAPOLLO"; +#endif + +/* HP-UX */ +#if defined (SIGDIL) /* DIL signal (?) */ + signal_names[SIGDIL] = "SIGDIL"; +#endif + +/* System V */ +#if defined (SIGCLD) /* Like SIGCHLD. */ + signal_names[SIGCLD] = "SIGCLD"; +#endif + +#if defined (SIGPWR) /* power state indication */ + signal_names[SIGPWR] = "SIGPWR"; +#endif + +#if defined (SIGPOLL) /* Pollable event (for streams) */ + signal_names[SIGPOLL] = "SIGPOLL"; +#endif + +/* Unknown */ +#if defined (SIGWINDOW) + signal_names[SIGWINDOW] = "SIGWINDOW"; +#endif + +/* Linux */ +#if defined (SIGSTKFLT) + signal_names[SIGSTKFLT] = "SIGSTKFLT"; +#endif + +/* FreeBSD */ +#if defined (SIGTHR) /* thread interrupt */ + signal_names[SIGTHR] = "SIGTHR"; +#endif + +/* Common */ +#if defined (SIGHUP) /* hangup */ + signal_names[SIGHUP] = "SIGHUP"; +#endif + +#if defined (SIGINT) /* interrupt */ + signal_names[SIGINT] = "SIGINT"; +#endif + +#if defined (SIGQUIT) /* quit */ + signal_names[SIGQUIT] = "SIGQUIT"; +#endif + +#if defined (SIGILL) /* illegal instruction (not reset when caught) */ + signal_names[SIGILL] = "SIGILL"; +#endif + +#if defined (SIGTRAP) /* trace trap (not reset when caught) */ + signal_names[SIGTRAP] = "SIGTRAP"; +#endif + +#if defined (SIGIOT) /* IOT instruction */ + signal_names[SIGIOT] = "SIGIOT"; +#endif + +#if defined (SIGABRT) /* Cause current process to dump core. */ + signal_names[SIGABRT] = "SIGABRT"; +#endif + +#if defined (SIGEMT) /* EMT instruction */ + signal_names[SIGEMT] = "SIGEMT"; +#endif + +#if defined (SIGFPE) /* floating point exception */ + signal_names[SIGFPE] = "SIGFPE"; +#endif + +#if defined (SIGKILL) /* kill (cannot be caught or ignored) */ + signal_names[SIGKILL] = "SIGKILL"; +#endif + +#if defined (SIGBUS) /* bus error */ + signal_names[SIGBUS] = "SIGBUS"; +#endif + +#if defined (SIGSEGV) /* segmentation violation */ + signal_names[SIGSEGV] = "SIGSEGV"; +#endif + +#if defined (SIGSYS) /* bad argument to system call */ + signal_names[SIGSYS] = "SIGSYS"; +#endif + +#if defined (SIGPIPE) /* write on a pipe with no one to read it */ + signal_names[SIGPIPE] = "SIGPIPE"; +#endif + +#if defined (SIGALRM) /* alarm clock */ + signal_names[SIGALRM] = "SIGALRM"; +#endif + +#if defined (SIGTERM) /* software termination signal from kill */ + signal_names[SIGTERM] = "SIGTERM"; +#endif + +#if defined (SIGURG) /* urgent condition on IO channel */ + signal_names[SIGURG] = "SIGURG"; +#endif + +#if defined (SIGSTOP) /* sendable stop signal not from tty */ + signal_names[SIGSTOP] = "SIGSTOP"; +#endif + +#if defined (SIGTSTP) /* stop signal from tty */ + signal_names[SIGTSTP] = "SIGTSTP"; +#endif + +#if defined (SIGCONT) /* continue a stopped process */ + signal_names[SIGCONT] = "SIGCONT"; +#endif + +#if defined (SIGCHLD) /* to parent on child stop or exit */ + signal_names[SIGCHLD] = "SIGCHLD"; +#endif + +#if defined (SIGTTIN) /* to readers pgrp upon background tty read */ + signal_names[SIGTTIN] = "SIGTTIN"; +#endif + +#if defined (SIGTTOU) /* like TTIN for output if (tp->t_local<OSTOP) */ + signal_names[SIGTTOU] = "SIGTTOU"; +#endif + +#if defined (SIGIO) /* input/output possible signal */ + signal_names[SIGIO] = "SIGIO"; +#endif + +#if defined (SIGXCPU) /* exceeded CPU time limit */ + signal_names[SIGXCPU] = "SIGXCPU"; +#endif + +#if defined (SIGXFSZ) /* exceeded file size limit */ + signal_names[SIGXFSZ] = "SIGXFSZ"; +#endif + +#if defined (SIGVTALRM) /* virtual time alarm */ + signal_names[SIGVTALRM] = "SIGVTALRM"; +#endif + +#if defined (SIGPROF) /* profiling time alarm */ + signal_names[SIGPROF] = "SIGPROF"; +#endif + +#if defined (SIGWINCH) /* window changed */ + signal_names[SIGWINCH] = "SIGWINCH"; +#endif + +/* 4.4 BSD */ +#if defined (SIGINFO) && !defined (_SEQUENT_) /* information request */ + signal_names[SIGINFO] = "SIGINFO"; +#endif + +#if defined (SIGUSR1) /* user defined signal 1 */ + signal_names[SIGUSR1] = "SIGUSR1"; +#endif + +#if defined (SIGUSR2) /* user defined signal 2 */ + signal_names[SIGUSR2] = "SIGUSR2"; +#endif + +#if defined (SIGKILLTHR) /* BeOS: Kill Thread */ + signal_names[SIGKILLTHR] = "SIGKILLTHR"; +#endif + + for (i = 0; i < NSIG; i++) + if (signal_names[i] == (char *)NULL) + { + signal_names[i] = (char *)malloc (18); + if (signal_names[i]) + sprintf (signal_names[i], "SIGJUNK(%d)", i); + } + + signal_names[NSIG] = "DEBUG"; + signal_names[NSIG+1] = "ERR"; + signal_names[NSIG+2] = "RETURN"; +} diff --git a/bash-5.1/support/texi2dvi b/bash-5.1/support/texi2dvi new file mode 100755 index 0000000000000000000000000000000000000000..17f43557ba804306ba98fb9c2ab5d70242ff33f8 --- /dev/null +++ b/bash-5.1/support/texi2dvi @@ -0,0 +1,1996 @@ +#! /bin/sh +# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources. +# +# Copyright 1992-2019 Free Software Foundation, Inc. +# +# 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 . +# +# Originally written by Noah Friedman. +# +# Please send bug reports, etc. to bug-texinfo@gnu.org. +# If possible, please send a copy of the output of the script called with +# the `--debug' option when making a bug report. + +test -f /bin/ksh && test -z "$RUNNING_KSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; } +unset RUNNING_KSH + +# No failure shall remain unpunished. +set -e + +# In case the default sed doesn't suffice. +: ${SED=sed} + +program=`echo $0 | $SED -e 's!.*/!!'` + +build_mode=${TEXI2DVI_BUILD_MODE:-local} +build_dir=${TEXI2DVI_BUILD_DIRECTORY:-.} + +orig_pwd=`pwd` + +# Initialize variables for option overriding and otherwise. +# Don't use `unset' since old bourne shells don't have this command. +# Instead, assign them an empty value. +action=compile +debug=false +escape="\\" +expand=false # true for expansion via makeinfo +includes= +line_error=true # pass --file-line-error to TeX +max_iters=7 # when to quit +oname= # --output +out_lang=dvi +quiet=false # let the tools' message be displayed +set_language= +src_specials= +shell_escape= +latex2html=hevea # or set to tex4ht +textra= # Extra TeX commands to insert in the input file. +txiprereq=19990129 # minimum texinfo.tex version with macro expansion +verb=false # true for verbose mode +translate_file= # name of charset translation file + +# We have to initialize IFS to space tab newline since we save and +# restore IFS and apparently POSIX allows stupid/broken behavior with +# empty-but-set IFS. +# http://lists.gnu.org/archive/html/automake-patches/2006-05/msg00008.html +# We need space, tab and newline, in precisely that order. And don't leave +# trailing blanks. +space=' ' +tab=' ' +newline=' +' +IFS="$space$tab$newline" + +: ${EGREP=egrep} + +# Systems which define $COMSPEC or $ComSpec use semicolons to separate +# directories in TEXINPUTS -- except for Cygwin and Msys, where COMSPEC +# might be inherited, but : is used. + +# In the case of Msys, uname returns a value derived from MSYSTEM, as +# MSYSTEM is user configurable, it is not so safe to use it to detect +# Msys. It is safer to use OSTYPE, this is why we set MSYSTEM to +# $OSTYPE before calling uname +if test -n "$COMSPEC$ComSpec" \ + && MSYSTEM=$OSTYPE uname | $EGREP -iv 'cygwin|msys' >/dev/null; then + path_sep=";" +else + path_sep=":" +fi + + +# Pacify verbose cds. +CDPATH=${ZSH_VERSION+.}$path_sep + + +# Now we define numerous functions, with no other executable code. +# The main program is at the end of the file. + + +# Standard help and version functions. +# +# usage - display usage and exit successfully. +usage () +{ + cat < +General help using GNU software: +EOF + exit 0 +} + + +# version - Display version info and exit successfully. +version () +{ + cat < +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +EOF + exit 0 +} + + +# Generic auxiliary functions. + +# Used to access files and directories after we have changed directory +# (for --tidy). +rel= + +# Change directory, updating some relative paths. +cd_dir () +{ + cd "$1" + + # Check if argument or input file is absolute, and if so, make all the path + # variables absolute. + use_absolute=false + case $1 in + [\\/]* | ?:[\\/]*) # absolute path + use_absolute=true ;; + esac + case $in_input in + [\\/]* | ?:[\\/]*) + use_absolute=true ;; + esac + + if $use_absolute ; then + for cdd_dir in work_build workdir t2ddir work_bak in_input in_dir; do + eval "$cdd_dir=\`absolute \$$cdd_dir\`" + done + return + fi + + # Replace each path component with ".." and add a single trailing slash. + rel=`echo "$1" | \$SED -e 's/[^/\\][^/\\]*/../g' -e 's/[/\\]*$/\//'` +} + +# cd_orig - Return to the original directory. +cd_orig () +{ + # In case $orig_pwd is on a different drive (for DOS). + cd / + + # Return to the original directory so that + # - the next file is processed in correct conditions + # - the temporary file can be removed + cd "$orig_pwd" || exit 1 + + rel= +} + + +# func_dirname FILE - Return the directory part of FILE. +func_dirname () +{ + dirname "$1" 2>/dev/null \ + || { echo "$1" | $SED 's!/[^/]*$!!;s!^$!.!'; } +} + + +# noext FILE - Return FILE with one extension removed: +# foo.bar.baz -> foo.bar +noext () +{ + echo "$1" | $SED -e 's/\.[^/.][^/.]*$//' +} + + +# absolute NAME - Return an absolute path to NAME. +absolute () +{ + case $1 in + [\\/]* | ?:[\\/]*) + # Absolute paths don't need to be expanded. + echo "$1" + ;; + *) absolute_slashes=`echo "$1" | $SED -n 's,.*[^/]\(/*\)$,\1,p'` + absolute_rel=$orig_pwd/`func_dirname "$1"` + if test -d "$absolute_rel"; then + (cd "$absolute_rel" 2>/dev/null \ + && absolute_name=`pwd`/`basename "$1"`"$absolute_slashes" + echo "$absolute_name") + else + error 1 "not a directory: $absolute_rel" + fi + ;; + esac +} + + +# ensure_dir DIR1 DIR2... - Make sure given directories exist. +ensure_dir () +{ + for dir + do + # Beware that in parallel builds we may have several concurrent + # attempts to create the directory. So fail only if "mkdir" + # failed *and* the directory still does not exist. + test -d "$dir" \ + || mkdir "$dir" \ + || test -d "$dir" \ + || error 1 "cannot create directory: $dir" + done +} + + +# error EXIT_STATUS LINE1 LINE2... - Report an error and exit with +# failure if EXIT_STATUS is non-null. +error () +{ + error_status="$1" + shift + report "$@" + if test "$error_status" != 0; then + exit $error_status + fi +} + + +# findprog PROG - Return true if PROG is somewhere in PATH, else false. +findprog () +{ + saveIFS="$IFS" + IFS=$path_sep # break path components at the path separator + for dir in $PATH; do + IFS=$saveIFS + # The basic test for an executable is `test -f $f && test -x $f'. + # (`test -x' is not enough, because it can also be true for directories.) + # We have to try this both for $1 and $1.exe. + # + # Note: On Cygwin and DJGPP, `test -x' also looks for .exe. On Cygwin, + # also `test -f' has this enhancement, but not on DJGPP. (Both are + # design decisions, so there is little chance to make them consistent.) + # Thusly, it seems to be difficult to make use of these enhancements. + # + if { test -f "$dir/$1" && test -x "$dir/$1"; } \ + || { test -f "$dir/$1.exe" && test -x "$dir/$1.exe"; }; then + return 0 + fi + done + return 1 +} + +# report LINE1 LINE2... - Echo each argument to stderr. +report () +{ + for i in "$@" + do + echo >&2 "$0: $i" + done +} + + +# run COMMAND-LINE - Run COMMAND-LINE verbosely, catching errors as failures. +run () +{ + verbose "Running $@" + "$@" 2>&5 1>&2 \ + || error 1 "$1 failed" +} + + +# verbose WORD1 WORD2... - Echo concatenated WORDs to stderr, if $verb. +verbose () +{ + if $verb; then + echo >&2 "$0: $@" + fi +} + + +# Handling lists. +# +# list_append LIST-NAME ELEM - Append ELEM to (the contents of) LIST-NAME. +list_append () +{ + list_name="$1" + shift + eval set X \$$list_name "$@" + shift + eval $list_name=\""$@"\" +} + + +# list_concat_dirs LIST-NAME DIR-LIST - Append to LIST-NAME all the +# components (including empty ones) from the $path_sep-separated list +# DIR-LIST. Make the paths absolute. +list_concat_dirs () +{ + lcd_list="$1" + # Empty path components are meaningful to tex. We rewrite them as + # `EMPTY' so they don't get lost when we split on $path_sep. + # Hopefully no one will have an actual directory named EMPTY. + lcd_replace_EMPTY="-e 's/^$path_sep/EMPTY$path_sep/g' \ + -e 's/$path_sep\$/${path_sep}EMPTY/g' \ + -e 's/$path_sep$path_sep/${path_sep}EMPTY${path_sep}/g'" + save_IFS=$IFS + IFS=$path_sep + set x `echo "$2" | eval $SED $lcd_replace_EMPTY`; shift + IFS=$save_IFS + for lcd_dir + do + case $lcd_dir in + EMPTY) + list_append $lcd_list "" + ;; + *) + if test -d $lcd_dir; then + dir=`absolute "$lcd_dir"` + list_append $lcd_list "$lcd_dir" + fi + ;; + esac + done +} + + +# list_prefix LIST-NAME SEP -> STRING - Return string with each element +# of LIST-NAME preceded by SEP. +list_prefix () +{ + lp_separator="$2" + eval set X \$$1 + shift + lp_result='' + for i + do + lp_result="$lp_result \"$lp_separator\" \"$i\"" + done + echo "$lp_result" +} + +# list_infix LIST-NAME SEP -> STRING - Same as list_prefix, but a separator. +list_infix () +{ + eval set X \$$1 + shift + save_IFS="$IFS" + IFS=$path_sep + echo "$*" + IFS=$save_IFS +} + +# list_dir_to_abs LIST-NAME - Convert list to using only absolute dir names. +# Currently unused, but should replace absolute_filenames some day. +list_dir_to_abs () +{ + ldta_list="$1" + eval set X \$$ldta_list + shift + ldta_result='' + for dir + do + dir=`absolute "$dir"` + test -d "$dir" || continue + ldta_result="$ldata_result \"$dir\"" + done + set X $ldta_result; shift + eval $ldta_list=\"$@\" +} + + +# Language auxiliary functions. +# +# out_lang_set LANG - set $out_lang to LANG (dvi, pdf, etc.), or error. +out_lang_set () +{ + case $1 in + dvi|dvipdf|html|info|pdf|ps|text) out_lang=$1;; + *) error 1 "invalid output format: $1";; + esac +} + +# out_lang_tex - Return the tex output language (DVI or PDF) for $out_lang. +out_lang_tex () +{ + case $out_lang in + dvi | ps | dvipdf ) echo dvi;; + pdf ) echo $out_lang;; + html | info | text ) echo $out_lang;; + *) error 1 "invalid out_lang: $1";; + esac +} + +# out_lang_ext - Return the extension for $out_lang (pdf, dvi, etc.). +out_lang_ext () +{ + case $out_lang in + dvipdf ) echo pdf;; + dvi | html | info | pdf | ps | text ) echo $out_lang;; + *) error 1 "invalid out_lang: $1";; + esac +} + + +# TeX file auxiliary functions. +# +# absolute_filenames TEX-PATH -> TEX-PATH - Convert relative paths to +# absolute, so we can run in another directory (e.g., in tidy build +# mode, or during the macro-support detection). +absolute_filenames () +{ + # Empty path components are meaningful to tex. We rewrite them as + # `EMPTY' so they don't get lost when we split on $path_sep. + # Hopefully no one will have an actual directory named EMPTY. + af_replace_empty="-e 's/^$path_sep/EMPTY$path_sep/g' \ + -e 's/$path_sep\$/${path_sep}EMPTY/g' \ + -e 's/$path_sep$path_sep/${path_sep}EMPTY${path_sep}/g'" + af_result=`echo "$1" | eval $SED $af_replace_empty` + save_IFS=$IFS + IFS=$path_sep + set x $af_result; shift + af_result= + af_path_sep= + for dir + do + case $dir in + EMPTY) + af_result=$af_result$af_path_sep + ;; + *) + if test -d "$dir"; then + af_result=$af_result$af_path_sep`absolute "$dir"` + else + # Even if $dir is not a directory, preserve it in the path. + # It might contain metacharacters that TeX will expand in + # turn, e.g., /some/path/{a,b,c}. This will not get the + # implicit absolutification of the path, but we can't help that. + af_result=$af_result$af_path_sep$dir + fi + ;; + esac + af_path_sep=$path_sep + done + echo "$af_result" +} + + +# output_base_name FILE - Return the name of FILE, possibly renamed to +# satisfy --output. FILE is local, i.e., without any directory part. +output_base_name () +{ + case $oname in + '') echo "$1";; + *) obn_out_noext=`noext "$oname"` + obn_file_ext=`echo "$1" | $SED 's/^.*\.//'` + echo "$obn_out_noext.$obn_file_ext" + ;; + esac +} + + +# destdir - Return the directory where the output is expected. +destdir () +{ + case $oname in + '') echo "$orig_pwd";; + *) dirname "$oname";; + esac +} + + +# move_to_dest FILE... - Move FILE(s) to the place where the user expects. +# Truly move it, that is, it must not remain in its build location +# unless that is also the output location. (Otherwise it might appear +# as an extra file in make distcheck.) +# +# FILE can be the principal output (in which case -o directly applies), +# or an auxiliary file with the same base name. +move_to_dest () +{ +# echo "move_to_dest $*, tidy=$tidy, oname=$oname" + + # If we built in place and have no output name, there is nothing to + # do, so just return. + case $tidy:$oname in + false:) return;; + esac + + for file + do + test -f "$file" \ + || error 1 "no such file or directory: $file" + case $tidy:$oname in + true:) mtd_destdir=$orig_pwd + mtd_destfile=$mtd_destdir/$file;; + true:*) mtd_destfile=`output_base_name "$file"` + mtd_destdir=`dirname "$mtd_destfile"`;; + false:*) mtd_destfile=$oname + mtd_destdir=`dirname "$mtd_destfile"`;; + esac + + # We want to compare the source location and the output location, + # and if they are different, do the move. But if they are the + # same, we must preserve the source. Since we can't assume + # stat(1) or test -ef is available, resort to comparing the + # directory names, canonicalized with pwd. We can't use cmp -s + # since the output file might not actually change from run to run; + # e.g., TeX DVI output is timestamped to only the nearest minute. + mtd_destdir=`cd "$mtd_destdir" && pwd` + mtd_destbase=`basename "$mtd_destfile"` + + mtd_sourcedir=`dirname "$file"` + mtd_sourcedir=`cd "$mtd_sourcedir" && pwd` + mtd_sourcebase=`basename "$file"` + + if test "$mtd_sourcedir/$mtd_sourcebase" != "$mtd_destdir/$mtd_destbase" + then + verbose "Moving $file to $mtd_destfile" + rm -f "$mtd_destfile" + mv "$file" "$mtd_destfile" + fi + done +} + + +# Managing xref files. +# +# aux_file_p FILE - Echo FILE if FILE is an aux file. +aux_file_p () +{ + test -f "$1" || return 0 + case $1 in + *.aux) echo "$1";; + *) return 0;; + esac +} + +# bibaux_file_p FILE - Echo FILE if FILE contains citation requests. +bibaux_file_p () +{ + test -s "$1" || return 0 + if (grep '^\\bibstyle[{]' "$1" \ + && grep '^\\bibdata[{]' "$1" \ + ## The following line is suspicious: fails when there + ## are citations in sub aux files. We need to be + ## smarter in this case. + ## && grep '^\\citation[{]' "$f" + ) >&6 2>&1; + then + echo "$1" + fi + return 0 +} + +# index_file_p FILE - Echo FILE if FILE is an index file. +index_file_p () +{ + test -f "$1" || return 0 + case $in_lang:$latex2html:`out_lang_tex`:`$SED '1q' "$1"` in + # When working with TeX4HT, *.idx are created by LaTeX. They must + # be processed to produce *.4ix, *.4dx files. The *.4dx file is + # passed to makeindex to produce the *.ind file. This sequence is + # handled by run_index, so we are only interested in the *.idx + # files, which have each "\indexentry" preceded by a + # "\beforeentry". + latex:tex4ht:html:"\\beforeentry {"*) echo $1;; + + # When index.sty is used, there is a space before the brace. + latex:*:*:"\\indexentry{"*|latex:*:*:"\\indexentry {"*) echo $1;; + + texinfo:*:*:"\\entry{"*) echo $1;; + texinfo:*:*:"@entry{"*) echo $1;; + # @entry is output from newer versions of texinfo.tex + esac + return 0 +} + +########### not used currently +# xref_file_p FILE - Return success if FILE is an xref file (indexes, +# tables and lists). +xref_file_p () +{ + test -f "$1" || return 1 + # If the file is not suitable to be an index or xref file, don't + # process it. It's suitable if the first character is a + # backslash or right quote or at, as long as the first line isn't + # \input texinfo. + case `$SED '1q' "$1"` in + "\\input texinfo"*) return 1;; + [\\''@]*) return 0;; + *) return 1;; + esac +} + + +# Used in generated_files_get +generated_files_get_from_log () +{ + if test -f "$1.log"; then + # Usually the output is like: \openout1 = `foobar.tex'. + # (including the final period) + # but luatex outputs: \openout1 = foobar.tex + # (no quotes, no period). + # So we have to make the punctuation optional. + grep '^\\openout[0-9]' "$1.log" \ + | $SED -e "s/\\\\openout[^=]*= *[\`']*//" \ + -e "s/'\.$//" + fi +} + +# Used in generated_files_get +generated_files_get_from_fls () +{ + if test -f "$1.fls"; then + grep '^OUTPUT ' "$1.fls" | cut -b 8- \ + | grep -v '\.dvi$' | grep -v '\.log$' | grep -v '\.pdf$' || true + fi +} + +# generated_files_get - Output the list of files generated by the TeX +# compilation. +generated_files_get () +{ + $generated_files_get_method "$in_noext" + if test $generated_files_get_method = generated_files_get_from_fls; then + if test -r "$in_noext.fl"; then + report 'WARNING!! The fl index may typeset as garbage!' # goes to stderr + report 'Try upgrading your version of texinfo.tex, or else try setting' + report 'the environment variable TEXI2DVI_USE_RECORDER to '\''no'\''.' +report 'Once you'\''ve done that, delete the file with an '\''fl'\'' extension.' + fi + fi +} + + +# xref_files_save - set xref_files_orig from xref_files_new, and save xref +# files in $work_bak. +xref_files_save () +{ + # Save copies of auxiliary files for later comparison. + xref_files_orig=$xref_files_new + if test -n "$xref_files_orig"; then + verbose "Backing up xref files: $xref_files_orig" + # The following line improves `cp $xref_files_orig "$work_bak"' + # by preserving the directory parts. Think of + # cp chap1/main.aux chap2/main.aux $work_bak. + # + # Users may have, e.g., --keep-old-files. Don't let this interfere. + # (Don't use unset for the sake of ancient shells.) + TAR_OPTIONS=; export TAR_OPTIONS + tar cf - $xref_files_orig | (cd "$rel$work_bak" && tar xf -) + fi + + # Remove auxiliary files in same directory as main input file. Otherwise, + # these will likely be read instead of those in the build dir. + if $tidy ; then + secondary_xref_files=`sorted_index_files` + for f in $xref_files_new $secondary_xref_files ; do + if test -f "$rel$in_dir/$f" ; then + remove $rel$in_dir/$f + fi + done + fi +} + + +# xref_files_changed - Return success if the xref files have changed +# since the previous run. +xref_files_changed () +{ + # LaTeX (and the package changebar) report in the LOG file if it + # should be rerun. This is needed for files included from + # subdirs, since texi2dvi does not try to compare xref files in + # subdirs. Performing xref files test is still good since LaTeX + # does not report changes in xref files. + if grep "Rerun to get" "$in_noext.log" >&6 2>&1; then + return 0 + fi + # Similarly, check for biblatex report of whether rerunning is needed. + if grep "biblatex.*(re)run" "$in_noext.log" >&6 2>&1; then + return 0 + fi + + # If old and new lists don't have the same file list, + # then something has definitely changed. + xref_files_new=`generated_files_get` + verbose "Original xref files = $xref_files_orig" + verbose "New xref files = $xref_files_new" + if test "x$xref_files_orig" != "x$xref_files_new"; then + return 0 + fi + + # Compare each file until we find a difference. + for this_file in $xref_files_new; do + verbose "Comparing xref file `echo $this_file | $SED 's|\./||g'` ..." + # cmp -s returns nonzero exit status if files differ. + if cmp -s "$this_file" "$rel$work_bak/$this_file"; then :; else + verbose "xref file `echo $this_file | $SED 's|\./||g'` differed ..." + if $debug; then + diff -u "$rel$work_bak/$this_file" "$this_file" + fi + return 0 + fi + done + + secondary_xref_files=`sorted_index_files` + verbose "Secondary xref files = $secondary_xref_files" + for this_file in $secondary_xref_files; do + if test -f $this_file; then :; else + verbose "$this_file missing ..." + return 0 + fi + done + + # No change. + return 1 +} + +# Running the TeX suite. +# +# Set tex_cmd variable, for running TeX. +make_tex_cmd () +{ + case $in_lang:$latex2html:`out_lang_tex` in + latex:*:dvi|latex:tex4ht:html) + tex=${LATEX:-latex};; + latex:*:pdf) + tex=${PDFLATEX:-pdflatex};; + texinfo:*:dvi) + # MetaPost also uses the TEX environment variable. If the user + # has set TEX=latex for that reason, don't bomb out. + case $TEX in + *latex) tex=tex;; # don't bother trying to find etex + *) tex=$TEX + esac;; + texinfo:*:pdf) tex=$PDFTEX;; + *) error 1 "$out_lang not supported for $in_lang";; + esac + + # Beware of aux files in subdirectories that require the + # subdirectory to exist. + case $in_lang:$tidy in + latex:true) + $SED -n 's|^[ ]*\\include{\(.*\)/.*}.*|\1|p' "$in_input" | + sort -u | + while read d + do + ensure_dir "$work_build/$d" + done + ;; + esac + + # Note that this will be used via an eval: quote properly. + tex_cmd="$tex" + + # If possible, make TeX report error locations in GNU format. + if $line_error; then + if test "${tex_help:+set}" != set; then + # Go to a temporary directory to try --help, since old versions that + # don't accept --help will generate a texput.log. + tex_help_dir=$t2ddir/tex_help + ensure_dir "$tex_help_dir" + tex_help=`cd "$tex_help_dir" >&6 && $tex --help &1 || true` + fi + # The mk program and perhaps others want to parse TeX's + # original error messages. + case $tex_help in + *file-line-error*) tex_cmd="$tex_cmd --file-line-error";; + esac + fi + + # Tell TeX about -recorder option, if specified + # recorder_option_maybe is in { " -recorder", "" } + tex_cmd="$tex_cmd$recorder_option_maybe" + + + # Tell TeX about TCX file, if specified. + test -n "$translate_file" \ + && tex_cmd="$tex_cmd --translate-file=$translate_file" + + # Tell TeX to make source specials (for backtracking from output to + # source, given a sufficiently smart editor), if specified. + test -n "$src_specials" && tex_cmd="$tex_cmd $src_specials" + + # Tell TeX to allow running external executables + test -n "$shell_escape" && tex_cmd="$tex_cmd $shell_escape" + + # Run without interaction. + # \batchmode does not show terminal output at all, so we don't + # want that. And even in batch mode, TeX insists on having input + # from the user. Close its stdin to make it impossible. + tex_cmd="$tex_cmd , \ and any whitespace characters are not supported + # filenames. + in_input_funnies=`echo "$in_input" \ + | $SED -e 's![^}#$%&^_{~]!!g' -e 's!\(.\)!\1\'' +!g' | uniq` + + if test -n "$in_input_funnies" ; then + # Make > an end group character, as it's unlikely to appear in + # a filename. + tex_cmd="$tex_cmd '${escape}bgroup${escape}catcode62=2${escape}relax'" + + # If the filename has funny characters, change the TeX category codes of + # some characters within a group, and use \expandafter to input the file + # outside of the group. + for w in $in_input_funnies ; do + tex_cmd="$tex_cmd '${escape}catcode\`${escape}$w=12${escape}relax'" + done + + # Set \toks0 to "\input FILENAME\relax" + tex_cmd="$tex_cmd '${escape}toks0${escape}bgroup${escape}input' '$rel$in_input' '${escape}relax>" + + # Expand \toks0 after the end of the group + tex_cmd="$tex_cmd${escape}expandafter${escape}egroup" + tex_cmd="$tex_cmd${escape}the${escape}toks0${escape}relax'" + else + # In the case of a simple filename, just pass the filename + # with no funny tricks. + tex_cmd="$tex_cmd '${escape}input' '$rel$in_input'" + fi + + verbose "$0: Running $tex_cmd ..." + if (eval "$tex_cmd" >&5); then + case $out_lang in + dvi | pdf ) move_to_dest "$in_noext.$out_lang";; + esac + else + tex_failed=true + fi +} + + +# run_bibtex - Run bibtex (or biber) on current file +# - if its input (AUX) exists, +# - or if some citations are missing (LOG contains `Citation'), +# - or if the LOG complains of a missing .bbl. +# +# Don't try to be too smart: +# 1. Running bibtex only if the bbl file exists and is older than +# the LaTeX file is wrong, since the document might include files +# that have changed. +# +# 2. Because there can be several AUX (if there are \include's), +# but a single LOG, looking for missing citations in LOG is +# easier, though we take the risk of matching false messages. +run_bibtex () +{ + case $in_lang in + latex) bibtex=${BIBTEX:-bibtex};; + texinfo) return;; + esac + + # "Citation undefined" is for LaTeX, "Undefined citation" for btxmac.tex. + # The no .aux && \bibdata test is also for btxmac, in case it was the + # first run of a bibtex-using document. Otherwise, it's possible that + # bibtex would never be run. + if test -r "$in_noext.aux" \ + && test -r "$in_noext.log" \ + && ( (grep 'Warning:.*Citation.*undefined' "$in_noext.log" \ + || grep '.*Undefined citation' "$in_noext.log" \ + || grep 'No file .*\.bbl\.' "$in_noext.log") \ + || (grep 'No \.aux file' "$in_noext.log" \ + && grep '^\\bibdata' "$in_noext.aux") ) \ + >&6 2>&1; \ + then + bibtex_aux=`filter_files bibaux_file_p` + for f in $bibtex_aux; do + run $bibtex "$f" + done + fi + + # biber(+biblatex) check. + if test -r "$in_noext.bcf" \ + && grep '' "$in_noext.bcf" >/dev/null; then + run ${BIBER:-biber} "$in_noext" + fi +} + + +# filter_file PREDICATE - Go through the list of files in xref_files_new +# and use PREDICATE on each one to optionally print it or print other files +# based on the filename. +filter_files () +{ + test -n "$xref_files_new" || return 0 + echo "$xref_files_new" | + # Filter existing files matching the criterion. + # + while read file; do + $1 "$file" + done | + sort | + # Some files are opened several times, e.g., listings.sty's *.vrb. + uniq +} + +# run_index - Run texindex (or makeindex or texindy) on current index +# files. If they already exist, and after running TeX a first time the +# index files don't change, then there's no reason to run TeX again. +# But we won't know that if the index files are out of date or nonexistent. +run_index () +{ + index_files=`filter_files index_file_p` + test -n "$index_files" \ + || return 0 + + : ${MAKEINDEX:=makeindex} + : ${TEXINDEX:=texindex} + : ${TEXINDY:=texindy} + + case $in_lang:$latex2html:`out_lang_tex` in + latex:tex4ht:html) + for index_file in $index_files + do + index_noext=`noext "$index_file"` + run tex \ + '\def\filename{{'"$index_noext"'}{idx}{4dx}{ind}} + \input idxmake.4ht' + run $MAKEINDEX -o $index_noext.ind $index_noext.4dx + done + ;; + + latex:*) + if $TEXINDY --version >&6 2>&1; then + run $TEXINDY $index_files + else + run $MAKEINDEX $index_files + fi + ;; + + texinfo:*) + run $TEXINDEX $index_files + ;; + esac +} + + +# run_tex4ht - Run the last two phases of TeX4HT: tex4ht extracts the +# HTML from the instrumented DVI file, and t4ht converts the figures and +# installs the files when given -d. +# +# Because knowing exactly which files are created is complex (in +# addition the names are not simple to compute), which makes it +# difficult to install the output files in a second step, we +# tell t4ht to install the output files. +run_tex4ht () +{ + case $in_lang:$latex2html:`out_lang_tex` in + latex:tex4ht:html) + : ${TEX4HT:=tex4ht} ${T4HT:=t4ht} + run "$TEX4HT" "-f/$in_noext" + # Do not remove the / after the destdir. + run "$T4HT" "-d`destdir`/" "-f/$in_noext" + ;; + esac +} + + +# run_thumbpdf - Run thumbpdf. +run_thumbpdf () +{ + if test `out_lang_tex` = pdf \ + && test -r "$in_noext.log" \ + && grep 'thumbpdf\.sty' "$in_noext.log" >&6 2>&1; \ + then + thumbpdf=${THUMBPDF_CMD:-thumbpdf} + thumbcmd="$thumbpdf $in_dir/$in_noext" + verbose "Running $thumbcmd ..." + if $thumbcmd >&5; then + run_tex + else + report "$thumbpdf exited with bad status." \ + "Ignoring its output." + fi + fi +} + + +# run_dvipdf FILE.dvi - Convert FILE.dvi to FILE.pdf. +run_dvipdf () +{ + # Find which dvi->pdf program is available. + if test -n "$DVIPDF"; then + dvipdf=$DVIPDF # user envvar, use it without checking + + elif test -z "$dvipdf"; then + for i in dvipdfmx dvipdfm dvipdf dvi2pdf dvitopdf; do + if findprog $i; then + dvipdf=$i + fi + done + fi + # These tools have varying interfaces, some 'input output', others + # 'input -o output'. They all seem to accept 'input' only, + # outputting using the expected file name. + run $dvipdf "$1" + if test ! -f `echo "$1" | $SED -e 's/\.dvi$/.pdf/'`; then + error 1 "cannot find output file" + fi +} + +# run_tex_suite - Run the TeX tools until a stable point is reached. +run_tex_suite () +{ + make_tex_cmd + + # Move to the working directory. + if $tidy; then + verbose "cd $work_build" + cd_dir "$work_build" || exit 1 + fi + + # Count the number of cycles. + suite_cycle=0 + + # Start by checking the log files for what files were created last + # time. This will mean that if they don't change, we finish in 1 cycle. + xref_files_new=`generated_files_get` + xref_files_save + + while :; do + # check for (probably) LaTeX loop (e.g. varioref) + if test $suite_cycle -eq "$max_iters"; then + error 0 "Maximum of $max_iters cycles exceeded" + break + fi + + # report progress + suite_cycle=`expr $suite_cycle + 1` + verbose "Cycle $suite_cycle for $command_line_filename" + + tex_failed=false + run_core_conversion + xref_files_changed || break + xref_files_save + + # We run bibtex first, because it's more likely for the indexes + # to change after bibtex is run than the reverse, though either + # would be rare. + run_bibtex + run_index + done + + if $tex_failed ; then + # TeX failed, and the xref files did not change. + error 1 "$tex exited with bad status, quitting." + fi + + # If we were using thumbpdf and producing PDF, then run thumbpdf + # and TeX one last time. + run_thumbpdf + + # If we are using tex4ht, call it. + run_tex4ht + + # Install the result if we didn't already (i.e., if the output is + # dvipdf or ps). + case $latex2html:$out_lang in + *:dvipdf) + run_dvipdf "$in_noext.`out_lang_tex`" + move_to_dest "$in_noext.`out_lang_ext`" + ;; + *:ps) + : ${DVIPS:=dvips} + run $DVIPS -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`" + move_to_dest "$in_noext.`out_lang_ext`" + ;; + esac + + cd_orig +} + + +# TeX processing auxiliary tools. +# +# run_makeinfo - Expand macro commands in the original source file using +# Makeinfo. Always use `end' footnote style, since the `separate' style +# generates different output (arguably this is a bug in -E). Discard +# main info output, the user asked to run TeX, not makeinfo. +run_makeinfo () +{ + test $in_lang = texinfo \ + || return 0 + + # Unless required by the user, makeinfo expansion is wanted only + # if texinfo.tex is too old. + if $expand; then + makeinfo=${MAKEINFO:-makeinfo} + else + # Check if texinfo.tex performs macro expansion by looking for + # its version. The version is a date of the form YEAR-MO-DA. + # We don't need to use [0-9] to match the digits since anyway + # the comparison with $txiprereq, a number, will fail with non-digits. + # Run in a temporary directory to avoid leaving files. + version_test_dir=$t2ddir/version_test + ensure_dir "$version_test_dir" + if ( + cd "$version_test_dir" + echo '\input texinfo.tex @bye' >txiversion.tex + # Be sure that if tex wants to fail, it is not interactive: + # close stdin. + $TEX txiversion.tex txiversion.out 2>txiversion.err + ); then :; else + report "texinfo.tex appears to be broken. +This may be due to the environment variable TEX set to something +other than (plain) tex, a corrupt texinfo.tex file, or +to tex itself simply not working." + cat "$version_test_dir/txiversion.out" + cat "$version_test_dir/txiversion.err" >&2 + error 1 "quitting." + fi + eval `$SED -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p' "$version_test_dir/txiversion.out"` + verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..." + if test "$txiprereq" -le "$txiversion" >&6 2>&1; then + makeinfo= + else + makeinfo=${MAKEINFO:-makeinfo} + fi + # If TeX is preloaded, offer the user this convenience: + if test "$txiformat" = Texinfo; then + escape=@ + fi + fi + + if test -n "$makeinfo"; then + # in_src: the file with macros expanded. + # Use the same basename to generate the same aux file names. + work_src=$workdir/src + ensure_dir "$work_src" + in_src=$work_src/$in_base + run_mi_includes=`list_prefix includes -I` + verbose "Macro-expanding $command_line_filename to $in_src ..." + # eval $makeinfo because it might be defined as something complex + # (running missing) and then we end up with things like '"-I"', + # and "-I" (including the quotes) is not an option name. This + # happens with gettext 0.14.5, at least. + $SED "$comment_iftex" "$command_line_filename" \ + | eval $makeinfo --footnote-style=end -I "$in_dir" $run_mi_includes \ + -o /dev/null --macro-expand=- \ + | $SED "$uncomment_iftex" >"$in_src" + # Continue only if everything succeeded. + if test $? -ne 0 \ + || test ! -r "$in_src"; then + verbose "Expansion failed, ignored..."; + else + in_input=$in_src + fi + fi +} + +# Unfortunately, makeinfo --iftex --no-ifinfo doesn't work well enough +# in versions before 5.0, as makeinfo can't parse the TeX commands +# inside @tex blocks, so work around with sed. +# +# This sed script preprocesses Texinfo sources in order to keep the +# iftex sections only. We want to remove non-TeX sections, and comment +# (with `@c _texi2dvi') TeX sections so that makeinfo does not try to +# parse them. Nevertheless, while commenting TeX sections, don't +# comment @macro/@end macro so that makeinfo does propagate them. +# Similarly, preserve the @top node to avoid makeinfo complaining about +# it being missed. Comment it out after preprocessing, so that it does +# not appear in the generated document. +# +# We assume that `@c _texi2dvi' or `@c (_texi2dvi)' starting a line is +# not present in the document. Additionally, conditionally defined +# macros inside the @top node may end up with the wrong value, although +# this is unlikely in practice. +# +comment_iftex=\ +'/^@tex/,/^@end tex/{ + s/^/@c _texi2dvi/ +} +/^@iftex/,/^@end iftex/{ + s/^/@c _texi2dvi/ + /^@c _texi2dvi@macro/,/^@c _texi2dvi@end macro/{ + s/^@c _texi2dvi// + } +} +/^@ifnottex/,/^@end ifnottex/{ + s/^/@c (_texi2dvi)/ + /^@c (_texi2dvi)@node Top/,/^@c (_texi2dvi)@end ifnottex/ { + /^@c (_texi2dvi)@end ifnottex/b + s/^@c (_texi2dvi)// + } +} +/^@ifinfo/,/^@end ifinfo/{ + /^@node/p + /^@menu/,/^@end menu/p + t + s/^/@c (_texi2dvi)/ +} +s/^@ifnotinfo/@c _texi2dvi@ifnotinfo/ +s/^@end ifnotinfo/@c _texi2dvi@end ifnotinfo/' + +# Uncomment @iftex blocks by removing any leading `@c texi2dvi' (repeated +# copies can sneak in via macro invocations). Likewise, comment out +# the @top node inside a @ifnottex block. +uncomment_iftex=\ +'s/^@c _texi2dvi\(@c _texi2dvi\)*// +/^@c (_texi2dvi)@ifnottex/,/^@c (_texi2dvi)@end ifnottex/{ + s/^/@c (_texi2dvi)/ +}' + + +# insert_commands - Insert $textra commands at the beginning of the file. +# Recommended to be used for @finalout, @smallbook, etc. +insert_commands () +{ + if test -n "$textra"; then + # _xtr. The file with the user's extra commands. + work_xtr=$workdir/xtr + in_xtr=$work_xtr/$in_base + ensure_dir "$work_xtr" + verbose "Inserting extra commands: $textra" + case $in_lang in + latex) textra_cmd=1i;; + texinfo) + textra_cmd='/^\\input texinfo/a' + # insert after @setfilename line if present + if head -n 10 $in_input | grep '^@setfilename' ; then + textra_cmd='/^@setfilename/a' + fi + ;; + *) error 1 "internal error, unknown language: $in_lang";; + esac + $SED "$textra_cmd\\ +$textra" "$in_input" >"$in_xtr" + in_input=$in_xtr + fi + + case $in_lang:$latex2html:`out_lang_tex` in + latex:tex4ht:html) + # _tex4ht. The file with the added \usepackage{tex4ht}. + work_tex4ht=$workdir/tex4ht + in_tex4ht=$work_tex4ht/$in_base + ensure_dir "$work_tex4ht" + verbose "Inserting \\usepackage{tex4ht}" + perl -pe 's<\\documentclass(?:\[.*\])?{.*}> + <$&\\usepackage[xhtml]{tex4ht}>' \ + "$in_input" >"$in_tex4ht" + in_input=$in_tex4ht + ;; + esac +} + + +# compute_language FILENAME - Return the short string for the language +# in which FILENAME is written: `texinfo' or `latex'. +compute_language () +{ + # If the user explicitly specified the language, use that. + # Otherwise, if the first line is \input texinfo, assume it's texinfo. + # Otherwise, guess from the file extension. + if test -n "$set_language"; then + echo $set_language + elif $SED 1q "$1" | grep 'input texinfo' >&6; then + echo texinfo + else + # Get the type of the file (latex or texinfo) from the given language + # we just guessed, or from the file extension if not set yet. + case $1 in + *.ltx | *.tex | *.drv | *.dtx) echo latex;; + *) echo texinfo;; + esac + fi +} + + +# run_hevea (MODE) - Convert to HTML/INFO/TEXT. +# +# Don't pass `-noiso' to hevea: it's useless in HTML since anyway the +# charset is set to latin1, and troublesome in other modes since +# accented characters loose their accents. +# +# Don't pass `-o DEST' to hevea because in that case it leaves all its +# auxiliary files there too... Too bad, because it means we will need +# to handle images some day. +run_hevea () +{ + run_hevea_name="${HEVEA:-hevea}" + run_hevea_cmd="$run_hevea_name" + + case $1 in + html) ;; + text|info) run_hevea_cmd="$run_hevea_cmd -$1";; + *) error 1 "run_hevea_cmd: invalid argument: $1";; + esac + + # Compiling to the tmp directory enables to preserve a previous + # successful compilation. + run_hevea_cmd="$run_hevea_cmd -fix -O -o '$out_base'" + run_hevea_cmd="$run_hevea_cmd `list_prefix includes -I` -I '$orig_pwd' " + run_hevea_cmd="$run_hevea_cmd '$rel$in_input'" + + if $debug; then + run_hevea_cmd="$run_hevea_cmd -v -v" + fi + + verbose "running $run_hevea_cmd" + if eval "$run_hevea_cmd" >&5; then + # hevea leaves trailing white spaces, this is annoying. + case $1 in text|info) + perl -pi -e 's/[ \t]+$//g' "$out_base"*;; + esac + case $1 in + html|text) move_to_dest "$out_base";; + info) # There can be foo.info-1, foo.info-2 etc. + move_to_dest "$out_base"*;; + esac + else + error 1 "$run_hevea_name exited with bad status, quitting." + fi +} + + +# run_core_conversion - Run TeX (or HeVeA). +run_core_conversion () +{ + case $in_lang:$latex2html:`out_lang_tex` in + *:dvi|*:pdf|latex:tex4ht:html) + run_tex;; + latex:*:html|latex:*:text|latex:*:info) + run_hevea $out_lang;; + *) + error 1 "invalid input/output combination: $in_lang/$out_lang";; + esac +} + + +# compile - Run the full compilation chain, from pre-processing to +# installation of the output at its expected location. +compile () +{ + # Set include path for tools: + # . Include current directory in case there are files there already, so + # we don't have more TeX runs than necessary. orig_pwd is used in case + # we are in clean build mode, where we have cd'd to a temp directory. + # . Include directory containing file, in case there are other + # files @include'd. + # . Keep a final path_sep to get the default (system) TeX + # directories included. + # . If we have any includes, put those at the end. + + common="$orig_pwd$path_sep$in_dir$path_sep" + # + txincludes=`list_infix includes $path_sep` + test -n "$txincludes" && common="$common$txincludes$path_sep" + # + for var in $tex_envvars; do + eval val="\$common\$${var}_orig" + # Convert relative paths to absolute paths, so we can run in another + # directory (e.g., in clean build mode, or during the macro-support + # detection). + val=`absolute_filenames "$val"` + eval $var="\"$val\"" + export $var + eval verbose \"$var=\'\$${var}\'\" + done + + # --expand + run_makeinfo + + # --command, --texinfo + insert_commands + + # Run until a fixed point is reached. + run_tex_suite +} + +# make_openout_test FLAGS EXTENSION +# - Run TeX with an input file that performs an \openout. Pass FLAGS to TeX. +# +make_openout_test () +{ + recorder_option_maybe="$1" + make_tex_cmd + + ensure_dir "$workdir"/check_recorder + cd_dir "$workdir"/check_recorder + + cat > openout.tex </dev/null 2>&1) +} + +# Check tex supports -recorder option +check_recorder_support () +{ + verbose "Checking TeX recorder support..." + make_openout_test " -recorder" fls + if test -f openout.fls && grep '^OUTPUT dum.dum$' openout.fls > /dev/null + then + cd_orig + verbose "Checking TeX recorder support... yes" + return 0 + else + cd_orig + verbose "Checking TeX recorder support... no" + return 1 + fi +} + +# Check tex supports \openout traces in log +check_openout_in_log_support () +{ + verbose "Checking TeX \openout in log support..." + make_openout_test "" log + if test -f openout.log \ + && grep '^\\openout..\? *= *`\?dum\.dum'\''\?' openout.log >/dev/null + then + cd_orig + verbose "Checking TeX \openout in log support... yes" + return 0 + else + cd_orig + verbose "Checking TeX \openout in log support... no" + return 1 + fi +} + +# Set that output auxiliary files are detected with the -recorder option, +# which creates a file JOBNAME.fls which is a machine-readable listing of +# files read and written during the job. +set_aux_files_from_fls () +{ + recorder_option_maybe=" -recorder" + generated_files_get_method=generated_files_get_from_fls +} + +# Set that output auxiliary files are detected with searching for \openout +# in the log file. +set_aux_files_from_log () +{ + recorder_option_maybe='' + generated_files_get_method=generated_files_get_from_log +} + +# Decide whether output auxiliary files are detected with the -recorder +# option, or by searching for \openout in the log file. +decide_aux_files_method () +{ + # Select output file detection method + # Valid values of TEXI2DVI_USE_RECORDER are: + # yes use the -recorder option, no checks. + # no scan for \openout in the log file, no checks. + # yesmaybe check whether -recorder option is supported, and if yes + # use it, otherwise check for tracing \openout in the + # log file is supported, and if yes use it, else it is an + # error. + # nomaybe same as `yesmaybe', except that the \openout trace in + # log file is checked first. + # + # The default behaviour is `nomaybe'. + + test -n "$TEXI2DVI_USE_RECORDER" || TEXI2DVI_USE_RECORDER=nomaybe + + case $TEXI2DVI_USE_RECORDER in + yes) set_aux_files_from_fls;; + + no) set_aux_files_from_log;; + + yesmaybe) + if check_recorder_support; then + set_aux_files_from_fls + elif check_openout_in_log_support; then + set_aux_files_from_log + else + error 1 "TeX neither supports -recorder nor outputs \\openout lines in its log file" + fi + ;; + + nomaybe) + if check_openout_in_log_support; then + set_aux_files_from_log + elif check_recorder_support; then + set_aux_files_from_fls + else + error 1 "TeX neither supports -recorder nor outputs \\openout lines in its log file" + fi + ;; + + *) error 1 "Invalid value of TEXI2DVI_USE_RECORDER environment variable : $TEXI2DVI_USE_RECORDER.";; + + esac +} + +# remove FILE... +remove () +{ + verbose "Removing" "$@" + rm -rf "$@" +} + + +# all_files - Echo the names of all files generated, including those by +# auxiliary tools like texindex. +all_files () +{ + echo $in_noext.log + echo $in_noext.fls + echo $xref_files_new + echo `sorted_index_files` +} + +sorted_index_files () +{ + filter_files sorted_index_filter +} + +# Print the name of a generated file based on FILE if there is one. +sorted_index_filter () +{ + case $in_lang in + texinfo) + # texindex: texinfo.cp -> texinfo.cps + if test -n "`index_file_p $1`" ; then + echo $1s + fi + ;; + esac +} + + +# Not currently used - use with filter_files to add secondary files created by +# bibtex +bibtex_secondary_files () +{ + case $in_lang in + latex) + if test -n "`aux_file_p $1`"; then + # bibtex: *.aux -> *.bbl and *.blg. + echo $1 | $SED 's/^\(.*\)\.aux$/\1.bbl/' + echo $1 | $SED 's/^\(.*\)\.aux$/\1.blg/' + fi + ;; + esac +} + +# mostly_clean - Remove auxiliary files and directories. Changes back to +# the original directory. +mostly_clean () +{ + cd_orig + set X "$t2ddir" + shift + $tidy || { + set X ${1+"$@"} `all_files` + shift + } + remove ${1+"$@"} +} + + +# cleanup - Remove what should be removed according to options. +# Called at the end of each compilation cycle, and at the end of +# the script. Changes the current directory. +cleanup () +{ + case $clean:$tidy in + true:true) mostly_clean ;; # build mode is "clean" + false:false) cd_orig; remove "$t2ddir";; # build mode is "local" + esac +} + + +# input_file_name_decode - Decode COMMAND_LINE_FILENAME, and set the +# following shell variables: +# +# - COMMAND_LINE_FILENAME +# The filename given on the commmand line, but cleaned of TeX commands. +# - IN_DIR +# The directory containing the input file. +# - IN_BASE +# The input file base name (no directory part). +# - IN_NOEXT +# The input file name with neither file extensions nor directory part. +# - IN_INPUT +# The path to the input file for passing as a command-line argument +# to TeX. Defaults to COMMAND_LINE_FILENAME, but might change if the +# input is preprocessed. +input_file_name_decode () +{ + case $command_line_filename in + *\\input{*}*) + # Let AUC-TeX error parser deal with line numbers. + line_error=false + command_line_filename=`\ + expr X"$command_line_filename" : X'.*input{\([^}]*\)}'` + ;; + esac + + # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex), + # prepend `./' in order to avoid that the tools take it as an option. + echo "$command_line_filename" | LC_ALL=C $EGREP '^(/|[A-Za-z]:/)' >&6 \ + || command_line_filename="./$command_line_filename" + + # See if the file exists. If it doesn't we're in trouble since, even + # though the user may be able to reenter a valid filename at the tex + # prompt (assuming they're attending the terminal), this script won't + # be able to find the right xref files and so forth. + test -r "$command_line_filename" \ + || error 1 "cannot read $command_line_filename, skipping." + + # Get the name of the current directory. + in_dir=`func_dirname "$command_line_filename"` + + # Strip directory part but leave extension. + in_base=`basename "$command_line_filename"` + # Strip extension. + in_noext=`noext "$in_base"` + + # The normalized file name to compile. Must always point to the + # file to actually compile (in case of recoding, macro-expansion etc.). + in_input=$in_dir/$in_base + + + # Compute the output file name. + if test x"$oname" != x; then + out_name=$oname + else + out_name=$in_noext.`out_lang_ext` + fi + out_dir=`func_dirname "$out_name"` + out_dir_abs=`absolute "$out_dir"` + out_base=`basename "$out_name"` + out_noext=`noext "$out_base"` +} + + +# +#################### Main program starts ########################## + +# Initialize more variables. +# +# Save TEXINPUTS so we can construct a new TEXINPUTS path for each file. +# Likewise for bibtex and makeindex. +tex_envvars="BIBINPUTS BSTINPUTS DVIPSHEADERS INDEXSTYLE MFINPUTS MPINPUTS \ +TEXINPUTS TFMFONTS" +for var in $tex_envvars; do + eval ${var}_orig=\$$var + export $var +done + +# Push a token among the arguments that will be used to notice when we +# ended options/arguments parsing. +# Use "set dummy ...; shift" rather than 'set - ..." because on +# Solaris set - turns off set -x (but keeps set -e). +# Use ${1+"$@"} rather than "$@" because Digital Unix and Ultrix 4.3 +# still expand "$@" to a single argument (the empty string) rather +# than nothing at all. +arg_sep="$$--$$" +set dummy ${1+"$@"} "$arg_sep"; shift + +while test x"$1" != x"$arg_sep"; do + # Handle --option=value by splitting apart and putting back on argv. + case "$1" in + --*=*) + opt=`echo "$1" | $SED -e 's/=.*//'` + val=`echo "$1" | $SED -e 's/[^=]*=//'` + shift + set dummy "$opt" "$val" ${1+"$@"}; shift + ;; + esac + + case "$1" in + -@ ) escape=@;; + -~ ) verbose "Option -~ is obsolete: texi2dvi ignores it.";; + -b | --batch) ;; # Obsolete + --build) shift; build_mode=$1;; + --build-dir) shift; build_dir=$1; build_mode=tidy;; + -c | --clean) build_mode=clean;; + -D | --debug) debug=true;; + -e | -E | --expand) expand=true;; + -h | --help) usage;; + -I) shift; list_concat_dirs includes "$1";; + -l | --lang | --language) shift; set_language=$1;; + --mostly-clean) action=mostly-clean;; + --no-line-error) line_error=false;; + --max-iterations) shift; max_iters=$1;; + -o | --out | --output) + shift + # Make it absolute, just in case we also have --clean, or whatever. + oname=`absolute "$1"`;; + + # Output formats. + -O|--output-format) shift; out_lang_set "$1";; + --dvi|--dvipdf|--html|--info|--pdf|--ps|--text) + out_lang_set `echo "x$1" | $SED 's/^x--//'`;; + + -p) out_lang_set pdf;; + -q | -s | --quiet | --silent) quiet=true;; + --src-specials) src_specials=--src-specials;; + --shell-escape) shell_escape=--shell-escape;; + --tex4ht) latex2html=tex4ht;; + -t | --texinfo | --command ) shift; textra="$textra\\ +"`echo "$1" | $SED 's/\\\\/\\\\\\\\/g'`;; + --translate-file ) shift; translate_file="$1";; + --tidy) build_mode=tidy;; + -v | --vers*) version;; + -V | --verb*) verb=true;; + --) # What remains are not options. + shift + while test x"$1" != x"$arg_sep"; do + set dummy ${1+"$@"} "$1"; shift + shift + done + break;; + -*) + error 1 "Unknown or ambiguous option \`$1'." \ + "Try \`--help' for more information." + ;; + *) set dummy ${1+"$@"} "$1"; shift;; + esac + shift +done +# Pop the token +shift + +# $tidy: compile in a t2d directory. +# $clean: remove all the aux files. +case $build_mode in + local) clean=false; tidy=false;; + tidy) clean=false; tidy=true;; + clean) clean=true; tidy=true;; + *) error 1 "invalid build mode: $build_mode";; +esac + +# Interpret remaining command line args as filenames. +case $# in + 0) + error 2 "Missing file arguments." "Try \`--help' for more information." + ;; + 1) ;; + *) + if test -n "$oname"; then + error 2 "Can't use option \`--output' with more than one argument." + fi + ;; +esac + + +# We can't do much without tex. +# End up with the TEX and PDFTEX variables set to what we are going to use. +# +# If $TEX is set to a directory, don't use it. +test -n "$TEX" && test -d "$TEX" && unset TEX + +# But otherwise, use $TEX if it is set. +if test -z "$TEX"; then + if findprog tex; then :; else cat <&2 +You don't have a working TeX binary (tex) installed anywhere in +your PATH, and texi2dvi cannot proceed without one. If you want to use +this script, you'll need to install TeX (if you don't have it) or change +your PATH or TEX environment variable (if you do). See the --help +output for more details. + +For information about obtaining TeX, please see http://tug.org/texlive, +or do a web search for TeX and your operating system or distro. +EOM + exit 1 + fi + + # We want to use etex (or pdftex) if they are available, and the user + # didn't explicitly specify. We don't check for elatex and pdfelatex + # because (as of 2003), the LaTeX team has asked that new distributions + # use etex by default anyway. + # + if findprog etex; then TEX=etex; else TEX=tex; fi +fi + +# For many years, the pdftex binary has included the e-tex extensions, +# but for those people with ancient TeX distributions ... +if test -z "$PDFTEX"; then + if findprog pdfetex; then PDFTEX=pdfetex; else PDFTEX=pdftex; fi +fi + + +# File descriptor usage: +# 0 standard input +# 1 standard output (--verbose messages) +# 2 standard error +# 5 tools output (turned off by --quiet) +# 6 tracing/debugging (set -x output, etc.) + +# Main tools' output (TeX, etc.) that TeX users are used to seeing. +# +# If quiet, discard, else redirect to the message flow. +if $quiet; then + exec 5>/dev/null +else + exec 5>&1 +fi + + +# Enable tracing, and auxiliary tools output. +# +# This fd should be used where you'd typically use /dev/null to throw +# output away. But sometimes it is convenient to see that output (e.g., +# from a grep) to aid debugging. Especially debugging at distance, via +# the user. +# +if $debug; then + exec 6>&1 + set -vx +else + exec 6>/dev/null +fi + + +# Main program main loop - TeXify each file in turn. +for command_line_filename +do + verbose "Processing $command_line_filename ..." + + input_file_name_decode + + # `texinfo' or `latex'? + in_lang=`compute_language "$command_line_filename"` + + # An auxiliary directory used for all the auxiliary tasks involved + # in compiling this document. + case $build_dir in + '' | . ) t2ddir=$out_noext.t2d ;; + *) # Avoid collisions between multiple occurrences of the same + # file, so depend on the output path. Remove leading `./', + # at least to avoid creating a file starting with `.!', i.e., + # an invisible file. The sed expression is fragile if the cwd + # has active characters. Transform / into ! so that we don't + # need `mkdir -p'. It might be something to reconsider. + t2ddir=$build_dir/`echo "$out_dir_abs/$out_noext.t2d" | + $SED "s,^$orig_pwd/,,;s,^\./,,;s,/,!,g"` + esac + # Remove it at exit if clean mode. + trap "cleanup" 0 1 2 15 + + ensure_dir "$build_dir" "$t2ddir" + + # Sometimes there are incompatibilities between auxiliary files for + # DVI and PDF. The contents can also change whether we work on PDF + # and/or DVI. So keep separate spaces for each. + workdir=$t2ddir/`out_lang_tex` + ensure_dir "$workdir" + + # _build. In a tidy build, where the auxiliary files are output. + if $tidy; then + work_build=$workdir/build + else + work_build=. + fi + + # _bak. Copies of the previous auxiliary files (another round is + # run if they differ from the new ones). + work_bak=$workdir/bak + + # Make those directories. + ensure_dir "$work_build" "$work_bak" + + # Decide how to find auxiliary files created by TeX. + decide_aux_files_method + + case $action in + compile) + # Compile the document. + compile + cleanup + ;; + + mostly-clean) + xref_files_new=`generated_files_get` + mostly_clean + ;; + esac +done + +verbose "done." +exit 0 # exit successfully, not however we ended the loop. +# Local Variables: +# sh-basic-offset: 2 +# sh-indentation: 2 +# End: diff --git a/bash-5.1/support/texi2html b/bash-5.1/support/texi2html new file mode 100755 index 0000000000000000000000000000000000000000..13b55884c34c1c37a4107661b53e922d4c365ceb --- /dev/null +++ b/bash-5.1/support/texi2html @@ -0,0 +1,5428 @@ +#! /usr/bin/perl +'di '; +'ig 00 '; +#+############################################################################## +# +# texi2html: Program to transform Texinfo documents to HTML +# +# Copyright (C) 1999, 2000 Free Software Foundation, Inc. +# +# 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 . +# +#-############################################################################## + +# This requires perl version 5 or higher +require 5.0; + +#++############################################################################## +# +# NOTE FOR DEBUGGING THIS SCRIPT: +# You can run 'perl texi2html.pl' directly, provided you have +# the environment variable T2H_HOME set to the directory containing +# the texi2html.init file +# +#--############################################################################## + +# CVS version: +# $Id: texi2html.pl,v 1.55 2000/07/27 14:39:41 obachman Exp $ + +# Homepage: +$T2H_HOMEPAGE = < (original author) + Karl Berry + Olaf Bachmann + and many others. +Maintained by: Olaf Bachmann +Send bugs and suggestions to +EOT + +# Version: set in configure.in +$THISVERSION = '1.64'; +$THISPROG = "texi2html $THISVERSION"; # program name and version + +# The man page for this program is included at the end of this file and can be +# viewed using the command 'nroff -man texi2html'. + +# Identity: + +$T2H_TODAY = &pretty_date; # like "20 September 1993" +# the eval prevents this from breaking on system which do not have +# a proper getpwuid implemented +eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i + +#+++############################################################################ +# # +# Initialization # +# Pasted content of File $(srcdir)/texi2html.init: Default initializations # +# # +#---############################################################################ + +# leave this within comments, and keep the require statement +# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init +# exists. + +# +# -*-perl-*- +###################################################################### +# File: texi2html.init +# +# Sets default values for command-line arguments and for various customizable +# procedures +# +# A copy of this file is pasted into the beginning of texi2html by +# 'make texi2html' +# +# Copy this file and make changes to it, if you like. +# Afterwards, either, load it with command-line option -init_file +# +# $Id: texi2html.init,v 1.34 2000/07/27 14:09:02 obachman Exp $ + +###################################################################### +# stuff which can also be set by command-line options +# +# +# Note: values set here, overwrite values set by the command-line +# options before -init_file and might still be overwritten by +# command-line arguments following the -init_file option +# + +# T2H_OPTIONS is a hash whose keys are the (long) names of valid +# command-line options and whose values are a hash with the following keys: +# type ==> one of !|=i|:i|=s|:s (see GetOpt::Long for more info) +# linkage ==> ref to scalar, array, or subroutine (see GetOpt::Long for more info) +# verbose ==> short description of option (displayed by -h) +# noHelp ==> if 1 -> for "not so important options": only print description on -h 1 +# 2 -> for obsolete options: only print description on -h 2 + +$T2H_DEBUG = 0; +$T2H_OPTIONS -> {debug} = +{ + type => '=i', + linkage => \$main::T2H_DEBUG, + verbose => 'output HTML with debuging information', +}; + +$T2H_DOCTYPE = ''; +$T2H_OPTIONS -> {doctype} = +{ + type => '=s', + linkage => \$main::T2H_DOCTYPE, + verbose => 'document type which is output in header of HTML files', + noHelp => 1 +}; + +$T2H_CHECK = 0; +$T2H_OPTIONS -> {check} = +{ + type => '!', + linkage => \$main::T2H_CHECK, + verbose => 'if set, only check files and output all things that may be Texinfo commands', + noHelp => 1 +}; + +# -expand +# if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections +# else, neither expand @iftex, @tex, nor @ifinfo sections +$T2H_EXPAND = "info"; +$T2H_OPTIONS -> {expand} = +{ + type => '=s', + linkage => \$T2H_EXPAND, + verbose => 'Expand info|tex|none section of texinfo source', +}; + +# - glossary +#if set, uses section named `Footnotes' for glossary +$T2H_USE_GLOSSARY = 0; +T2H_OPTIONS -> {glossary} = +{ + type => '!', + linkage => \$T2H_USE_GLOSSARY, + verbose => "if set, uses section named `Footnotes' for glossary", + noHelp => 1, +}; + + +# -invisible +# $T2H_INVISIBLE_MARK is the text used to create invisible destination +# anchors for index links (you can for instance use the invisible.xbm +# file shipped with this program). This is a workaround for a known +# bug of many WWW browsers, including netscape. +# For me, it works fine without it -- on the contrary: if there, it +# inserts space between headers and start of text (obachman 3/99) +$T2H_INVISIBLE_MARK = ''; +# $T2H_INVISIBLE_MARK = ' '; +$T2H_OPTIONS -> {invisible} = +{ + type => '=s', + linkage => \$T2H_INVISIBLE_MARK, + verbose => 'use text in invisble anchot', + noHelp => 1, +}; + +# -iso +# if set, ISO8879 characters are used for special symbols (like copyright, etc) +$T2H_USE_ISO = 0; +$T2H_OPTIONS -> {iso} = +{ + type => 'iso', + linkage => \$T2H_USE_ISO, + verbose => 'if set, ISO8879 characters are used for special symbols (like copyright, etc)', + noHelp => 1, +}; + +# -I +# list directories where @include files are searched for (besides the +# directory of the doc file) additional '-I' args add to this list +@T2H_INCLUDE_DIRS = ("."); +$T2H_OPTIONS -> {I} = +{ + type => '=s', + linkage => \@T2H_INCLUDE_DIRS, + verbose => 'append $s to the @include search path', +}; + +# -top_file +# uses file of this name for top-level file +# extension is manipulated appropriately, if necessary. +# If empty, .html is used +# Typically, you would set this to "index.html". +$T2H_TOP_FILE = ''; +$T2H_OPTIONS -> {top_file} = +{ + type => '=s', + linkage => \$T2H_TOP_FILE, + verbose => 'use $s as top file, instead of .html', +}; + + +# -toc_file +# uses file of this name for table of contents file +# extension is manipulated appropriately, if necessary. +# If empty, _toc.html is used +$T2H_TOC_FILE = ''; +$T2H_OPTIONS -> {toc_file} = +{ + type => '=s', + linkage => \$T2H_TOC_FILE, + verbose => 'use $s as ToC file, instead of _toc.html', +}; + +# -frames +# if set, output two additional files which use HTML 4.0 "frames". +$T2H_FRAMES = 0; +$T2H_OPTIONS -> {frames} = +{ + type => '!', + linkage => \$T2H_FRAMES, + verbose => 'output files which use HTML 4.0 frames (experimental)', + noHelp => 1, +}; + + +# -menu | -nomenu +# if set, show the Texinfo menus +$T2H_SHOW_MENU = 1; +$T2H_OPTIONS -> {menu} = +{ + type => '!', + linkage => \$T2H_SHOW_MENU, + verbose => 'ouput Texinfo menus', +}; + +# -number | -nonumber +# if set, number sections and show section names and numbers in references +# and menus +$T2H_NUMBER_SECTIONS = 1; +$T2H_OPTIONS -> {number} = +{ + type => '!', + linkage => \$T2H_NUMBER_SECTIONS, + verbose => 'use numbered sections' +}; + +# if set, and T2H_NUMBER_SECTIONS is set, then use node names in menu +# entries, instead of section names +$T2H_NODE_NAME_IN_MENU = 0; + +# if set and menu entry equals menu descr, then do not print menu descr. +# Likewise, if node name equals entry name, do not print entry name. +$T2H_AVOID_MENU_REDUNDANCY = 1; + +# -split section|chapter|none +# if set to 'section' (resp. 'chapter') create one html file per (sub)section +# (resp. chapter) and separate pages for Top, ToC, Overview, Index, +# Glossary, About. +# otherwise, create monolithic html file which contains whole document +#$T2H_SPLIT = 'section'; +$T2H_SPLIT = ''; +$T2H_OPTIONS -> {split} = +{ + type => '=s', + linkage => \$T2H_SPLIT, + verbose => 'split document on section|chapter else no splitting', +}; + +# -section_navigation|-no-section_navigation +# if set, then navigation panels are printed at the beginning of each section +# and, possibly at the end (depending on whether or not there were more than +# $T2H_WORDS_IN_PAGE words on page +# This is most useful if you do not want to have section navigation +# on -split chapter +$T2H_SECTION_NAVIGATION = 1; +$T2H_OPTIONS -> {sec_nav} = +{ + type => '!', + linkage => \$T2H_SECTION_NAVIGATION, + verbose => 'output navigation panels for each section', +}; + +# -subdir +# if set put result files in this directory +# if not set result files are put into current directory +#$T2H_SUBDIR = 'html'; +$T2H_SUBDIR = ''; +$T2H_OPTIONS -> {subdir} = +{ + type => '=s', + linkage => \$T2H_SUBDIR, + verbose => 'put HTML files in directory $s, instead of $cwd', +}; + +# -short_extn +# If this is set all HTML file will have extension ".htm" instead of +# ".html". This is helpful when shipping the document to PC systems. +$T2H_SHORTEXTN = 0; +$T2H_OPTIONS -> {short_ext} = +{ + type => '!', + linkage => \$T2H_SHORTEXTN, + verbose => 'use "htm" extension for output HTML files', +}; + + +# -prefix +# Set the output file prefix, prepended to all .html, .gif and .pl files. +# By default, this is the basename of the document +$T2H_PREFIX = ''; +$T2H_OPTIONS -> {prefix} = +{ + type => '=s', + linkage => \$T2H_PREFIX, + verbose => 'use as prefix for output files, instead of ', +}; + +# -o filename +# If set, generate monolithic document output html into $filename +$T2H_OUT = ''; +$T2H_OPTIONS -> {out_file} = +{ + type => '=s', + linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';}, + verbose => 'if set, all HTML output goes into file $s', +}; + +# -short_ref +#if set cross-references are given without section numbers +$T2H_SHORT_REF = ''; +$T2H_OPTIONS -> {short_ref} = +{ + type => '!', + linkage => \$T2H_SHORT_REF, + verbose => 'if set, references are without section numbers', +}; + +# -idx_sum +# if value is set, then for each @prinindex $what +# $docu_name_$what.idx is created which contains lines of the form +# $key\t$ref sorted alphabetically (case matters) +$T2H_IDX_SUMMARY = 0; +$T2H_OPTIONS -> {idx_sum} = +{ + type => '!', + linkage => \$T2H_IDX_SUMMARY, + verbose => 'if set, also output index summary', + noHelp => 1, +}; + +# -verbose +# if set, chatter about what we are doing +$T2H_VERBOSE = ''; +$T2H_OPTIONS -> {Verbose} = +{ + type => '!', + linkage => \$T2H_VERBOSE, + verbose => 'print progress info to stdout', +}; + +# -lang +# For page titles use $T2H_WORDS->{$T2H_LANG}->{...} as title. +# To add a new language, supply list of titles (see $T2H_WORDS below). +# and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02 +# for definitions) +# Default's to 'en' if not set or no @documentlanguage is specified +$T2H_LANG = ''; +$T2H_OPTIONS -> {lang} = +{ + type => '=s', + linkage => sub {SetDocumentLanguage($_[1])}, + verbose => 'use $s as document language (ISO 639 encoding)', +}; + +# -l2h +# if set, uses latex2html for generation of math content +$T2H_L2H = ''; +$T2H_OPTIONS -> {l2h} = +{ + type => '!', + linkage => \$T2H_L2H, + verbose => 'if set, uses latex2html for @math and @tex', +}; + +###################### +# The following options are only relevant if $T2H_L2H is set +# +# -l2h_l2h +# name/location of latex2html progam +$T2H_L2H_L2H = "latex2html"; +$T2H_OPTIONS -> {l2h_l2h} = +{ + type => '=s', + linkage => \$T2H_L2H_L2H, + verbose => 'program to use for latex2html translation', + noHelp => 1, +}; + +# -l2h_skip +# if set, skips actual call to latex2html tries to reuse previously generated +# content, instead +$T2H_L2H_SKIP = ''; +$T2H_OPTIONS -> {l2h_skip} = +{ + type => '!', + linkage => \$T2H_L2H_SKIP, + verbose => 'if set, tries to reuse previously latex2html output', + noHelp => 1, +}; + +# -l2h_tmp +# if set, l2h uses this directory for temporarary files. The path +# leading to this directory may not contain a dot (i.e., a "."), +# otherwise, l2h will fail +$T2H_L2H_TMP = ''; +$T2H_OPTIONS -> {l2h_tmp} = +{ + type => '=s', + linkage => \$T2H_L2H_TMP, + verbose => 'if set, uses $s as temporary latex2html directory', + noHelp => 1, +}; + +# if set, cleans intermediate files (they all have the prefix $doc_l2h_) +# of l2h +$T2H_L2H_CLEAN = 1; +$T2H_OPTIONS -> {l2h_clean} = +{ + type => '!', + linkage => \$T2H_L2H_CLEAN, + verbose => 'if set, do not keep intermediate latex2html files for later reuse', + noHelp => 1, +}; + +$T2H_OPTIONS -> {D} = +{ + type => '=s', + linkage => sub {$main::value{@_[1]} = 1;}, + verbose => 'equivalent to Texinfo "@set $s 1"', + noHelp => 1, +}; + +$T2H_OPTIONS -> {init_file} = +{ + type => '=s', + linkage => \&LoadInitFile, + verbose => 'load init file $s' +}; + + +############################################################################## +# +# The following can only be set in the init file +# +############################################################################## + +# if set, center @image by default +# otherwise, do not center by default +$T2H_CENTER_IMAGE = 1; + +# used as identation for block enclosing command @example, etc +# If not empty, must be enclosed in +$T2H_EXAMPLE_INDENT_CELL = ' '; +# same as above, only for @small +$T2H_SMALL_EXAMPLE_INDENT_CELL = ' '; +# font size for @small +$T2H_SMALL_FONT_SIZE = '-1'; + +# if non-empty, and no @..heading appeared in Top node, then +# use this as header for top node/section, otherwise use value of +# @settitle or @shorttitle (in that order) +$T2H_TOP_HEADING = ''; + +# if set, use this chapter for 'Index' button, else +# use first chapter whose name matches 'index' (case insensitive) +$T2H_INDEX_CHAPTER = ''; + +# if set and $T2H_SPLIT is set, then split index pages at the next letter +# after they have more than that many entries +$T2H_SPLIT_INDEX = 100; + +# if set (e.g., to index.html) replace hrefs to this file +# (i.e., to index.html) by ./ +$T2H_HREF_DIR_INSTEAD_FILE = ''; + +######################################################################## +# Language dependencies: +# To add a new language extend T2H_WORDS hash and create $T2H_<...>_WORDS hash +# To redefine one word, simply do: +# $T2H_WORDS->{}->{} = 'whatever' in your personal init file. +# +$T2H_WORDS_EN = +{ + # titles of pages + 'ToC_Title' => 'Table of Contents', + 'Overview_Title' => 'Short Table of Contents', + 'Index_Title' => 'Index', + 'About_Title' => 'About this document', + 'Footnotes_Title' => 'Footnotes', + 'See' => 'See', + 'see' => 'see', + 'section' => 'section', +# If necessary, we could extend this as follows: +# # text for buttons +# 'Top_Button' => 'Top', +# 'ToC_Button' => 'Contents', +# 'Overview_Button' => 'Overview', +# 'Index_button' => 'Index', +# 'Back_Button' => 'Back', +# 'FastBack_Button' => 'FastBack', +# 'Prev_Button' => 'Prev', +# 'Up_Button' => 'Up', +# 'Next_Button' => 'Next', +# 'Forward_Button' =>'Forward', +# 'FastWorward_Button' => 'FastForward', +# 'First_Button' => 'First', +# 'Last_Button' => 'Last', +# 'About_Button' => 'About' +}; + +$T2H_WORD_DE = +{ + 'ToC_Title' => 'Inhaltsverzeichniss', + 'Overview_Title' => 'Kurzes Inhaltsverzeichniss', + 'Index_Title' => 'Index', + 'About_Title' => 'Über dieses Dokument', + 'Footnotes_Title' => 'Fußnoten', + 'See' => 'Siehe', + 'see' => 'siehe', + 'section' => 'Abschnitt', +}; + +$T2H_WORD_NL = +{ + 'ToC_Title' => 'Inhoudsopgave', + 'Overview_Title' => 'Korte inhoudsopgave', + 'Index_Title' => 'Index', #Not sure ;-) + 'About_Title' => 'No translation available!', #No translation available! + 'Footnotes_Title' => 'No translation available!', #No translation available! + 'See' => 'Zie', + 'see' => 'zie', + 'section' => 'sectie', +}; + +$T2H_WORD_ES = +{ + 'ToC_Title' => 'índice General', + 'Overview_Title' => 'Resumen del Contenido', + 'Index_Title' => 'Index', #Not sure ;-) + 'About_Title' => 'No translation available!', #No translation available! + 'Footnotes_Title' => 'Fußnoten', + 'See' => 'Véase', + 'see' => 'véase', + 'section' => 'sección', +}; + +$T2H_WORD_NO = +{ + 'ToC_Title' => 'Innholdsfortegnelse', + 'Overview_Title' => 'Kort innholdsfortegnelse', + 'Index_Title' => 'Indeks', #Not sure ;-) + 'About_Title' => 'No translation available!', #No translation available! + 'Footnotes_Title' => 'No translation available!', + 'See' => 'Se', + 'see' => 'se', + 'section' => 'avsnitt', +}; + +$T2H_WORD_PT = +{ + 'ToC_Title' => 'Sumário', + 'Overview_Title' => 'Breve Sumário', + 'Index_Title' => 'Índice', #Not sure ;-) + 'About_Title' => 'No translation available!', #No translation available! + 'Footnotes_Title' => 'No translation available!', + 'See' => 'Veja', + 'see' => 'veja', + 'section' => 'Seção', +}; + +$T2H_WORDS = +{ + 'en' => $T2H_WORDS_EN, + 'de' => $T2H_WORDS_DE, + 'nl' => $T2H_WORDS_NL, + 'es' => $T2H_WORDS_ES, + 'no' => $T2H_WORDS_NO, + 'pt' => $T2H_WORDS_PT +}; + +@MONTH_NAMES_EN = +( + 'January', 'February', 'March', 'April', 'May', + 'June', 'July', 'August', 'September', 'October', + 'November', 'December' +); + +@MONTH_NAMES_DE = +( + 'Januar', 'Februar', 'März', 'April', 'Mai', + 'Juni', 'Juli', 'August', 'September', 'Oktober', + 'November', 'Dezember' +); + +@MONTH_NAMES_NL = +( + 'Januari', 'Februari', 'Maart', 'April', 'Mei', + 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', + 'November', 'December' +); + +@MONTH_NAMES_ES = +( + 'enero', 'febrero', 'marzo', 'abril', 'mayo', + 'junio', 'julio', 'agosto', 'septiembre', 'octubre', + 'noviembre', 'diciembre' +); + +@MONTH_NAMES_NO = +( + + 'januar', 'februar', 'mars', 'april', 'mai', + 'juni', 'juli', 'august', 'september', 'oktober', + 'november', 'desember' +); + +@MONTH_NAMES_PT = +( + 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', + 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', + 'Novembro', 'Dezembro' +); + + +$MONTH_NAMES = +{ + 'en' => \@MONTH_NAMES_EN, + 'de' => \@MONTH_NAMES_DE, + 'es' => \@MONTH_NAMES_ES, + 'nl' => \@MONTH_NAMES_NL, + 'no' => \@MONTH_NAMES_NO, + 'pt' => \@MONTH_NAMES_PT +}; +######################################################################## +# Control of Page layout: +# You can make changes of the Page layout at two levels: +# 1.) For small changes, it is often enough to change the value of +# some global string/hash/array variables +# 2.) For larger changes, reimplement one of the T2H_DEFAULT_* routines, +# give them another name, and assign them to the respective +# $T2H_ variable. + +# As a general interface, the hashes T2H_HREF, T2H_NAME, T2H_NODE hold +# href, html-name, node-name of +# This -- current section (resp. html page) +# Top -- top page ($T2H_TOP_FILE) +# Contents -- Table of contents +# Overview -- Short table of contents +# Index -- Index page +# About -- page which explain "navigation buttons" +# First -- first node +# Last -- last node +# +# Whether or not the following hash values are set, depends on the context +# (all values are w.r.t. 'This' section) +# Next -- next node of texinfo +# Prev -- previous node of texinfo +# Up -- up node of texinfo +# Forward -- next node in reading order +# Back -- previous node in reading order +# FastForward -- if leave node, up and next, else next node +# FastBackward-- if leave node, up and prev, else prev node +# +# Furthermore, the following global variabels are set: +# $T2H_THISDOC{title} -- title as set by @setttile +# $T2H_THISDOC{fulltitle} -- full title as set by @title... +# $T2H_THISDOC{subtitle} -- subtitle as set by @subtitle +# $T2H_THISDOC{author} -- author as set by @author +# +# and pointer to arrays of lines which need to be printed by t2h_print_lines +# $T2H_OVERVIEW -- lines of short table of contents +# $T2H_TOC -- lines of table of contents +# $T2H_TOP -- lines of Top texinfo node +# $T2H_THIS_SECTION -- lines of 'This' section + +# +# There are the following subs which control the layout: +# +$T2H_print_section = \&T2H_DEFAULT_print_section; +$T2H_print_Top_header = \&T2H_DEFAULT_print_Top_header; +$T2H_print_Top_footer = \&T2H_DEFAULT_print_Top_footer; +$T2H_print_Top = \&T2H_DEFAULT_print_Top; +$T2H_print_Toc = \&T2H_DEFAULT_print_Toc; +$T2H_print_Overview = \&T2H_DEFAULT_print_Overview; +$T2H_print_Footnotes = \&T2H_DEFAULT_print_Footnotes; +$T2H_print_About = \&T2H_DEFAULT_print_About; +$T2H_print_misc_header = \&T2H_DEFAULT_print_misc_header; +$T2H_print_misc_footer = \&T2H_DEFAULT_print_misc_footer; +$T2H_print_misc = \&T2H_DEFAULT_print_misc; +$T2H_print_chapter_header = \&T2H_DEFAULT_print_chapter_header; +$T2H_print_chapter_footer = \&T2H_DEFAULT_print_chapter_footer; +$T2H_print_page_head = \&T2H_DEFAULT_print_page_head; +$T2H_print_page_foot = \&T2H_DEFAULT_print_page_foot; +$T2H_print_head_navigation = \&T2H_DEFAULT_print_head_navigation; +$T2H_print_foot_navigation = \&T2H_DEFAULT_print_foot_navigation; +$T2H_button_icon_img = \&T2H_DEFAULT_button_icon_img; +$T2H_print_navigation = \&T2H_DEFAULT_print_navigation; +$T2H_about_body = \&T2H_DEFAULT_about_body; +$T2H_print_frame = \&T2H_DEFAULT_print_frame; +$T2H_print_toc_frame = \&T2H_DEFAULT_print_toc_frame; + +######################################################################## +# Layout for html for every sections +# +sub T2H_DEFAULT_print_section +{ + my $fh = shift; + local $T2H_BUTTONS = \@T2H_SECTION_BUTTONS; + &$T2H_print_head_navigation($fh) if $T2H_SECTION_NAVIGATION; + my $nw = t2h_print_lines($fh); + if ($T2H_SPLIT eq 'section' && $T2H_SECTION_NAVIGATION) + { + &$T2H_print_foot_navigation($fh, $nw); + } + else + { + print $fh '
    ' . "\n"; + } +} + +################################################################### +# Layout of top-page I recommend that you use @ifnothtml, @ifhtml, +# @html within the Top texinfo node to specify content of top-level +# page. +# +# If you enclose everything in @ifnothtml, then title, subtitle, +# author and overview is printed +# T2H_HREF of Next, Prev, Up, Forward, Back are not defined +# if $T2H_SPLIT then Top page is in its own html file +sub T2H_DEFAULT_print_Top_header +{ + &$T2H_print_page_head(@_) if $T2H_SPLIT; + t2h_print_label(@_); # this needs to be called, otherwise no label set + &$T2H_print_head_navigation(@_); +} +sub T2H_DEFAULT_print_Top_footer +{ + &$T2H_print_foot_navigation(@_); + &$T2H_print_page_foot(@_) if $T2H_SPLIT; +} +sub T2H_DEFAULT_print_Top +{ + my $fh = shift; + + # for redefining navigation buttons use: + # local $T2H_BUTTONS = [...]; + # as it is, 'Top', 'Contents', 'Index', 'About' are printed + local $T2H_BUTTONS = \@T2H_MISC_BUTTONS; + &$T2H_print_Top_header($fh); + if ($T2H_THIS_SECTION) + { + # if top-level node has content, then print it with extra header + print $fh "

    $T2H_NAME{Top}

    " + unless ($T2H_HAS_TOP_HEADING); + t2h_print_lines($fh, $T2H_THIS_SECTION) + } + else + { + # top-level node is fully enclosed in @ifnothtml + # print fulltitle, subtitle, author, Overview + print $fh + "
    \n

    " . + join("

    \n

    ", split(/\n/, $T2H_THISDOC{fulltitle})) . + "

    \n"; + print $fh "

    $T2H_THISDOC{subtitle}

    \n" if $T2H_THISDOC{subtitle}; + print $fh "$T2H_THISDOC{author}\n" if $T2H_THISDOC{author}; + print $fh < +
    +

    +

    Overview:

    +
    +EOT + t2h_print_lines($fh, $T2H_OVERVIEW); + print $fh "
    \n"; + } + &$T2H_print_Top_footer($fh); +} + +################################################################### +# Layout of Toc, Overview, and Footnotes pages +# By default, we use "normal" layout +# T2H_HREF of Next, Prev, Up, Forward, Back, etc are not defined +# use: local $T2H_BUTTONS = [...] to redefine navigation buttons +sub T2H_DEFAULT_print_Toc +{ + return &$T2H_print_misc(@_); +} +sub T2H_DEFAULT_print_Overview +{ + return &$T2H_print_misc(@_); +} +sub T2H_DEFAULT_print_Footnotes +{ + return &$T2H_print_misc(@_); +} +sub T2H_DEFAULT_print_About +{ + return &$T2H_print_misc(@_); +} + +sub T2H_DEFAULT_print_misc_header +{ + &$T2H_print_page_head(@_) if $T2H_SPLIT; + # this needs to be called, otherwise, no labels are set + t2h_print_label(@_); + &$T2H_print_head_navigation(@_); +} +sub T2H_DEFAULT_print_misc_footer +{ + &$T2H_print_foot_navigation(@_); + &$T2H_print_page_foot(@_) if $T2H_SPLIT; +} +sub T2H_DEFAULT_print_misc +{ + my $fh = shift; + local $T2H_BUTTONS = \@T2H_MISC_BUTTONS; + &$T2H_print_misc_header($fh); + print $fh "

    $T2H_NAME{This}

    \n"; + t2h_print_lines($fh); + &$T2H_print_misc_footer($fh); +} + +################################################################### +# chapter_header and chapter_footer are only called if +# T2H_SPLIT eq 'chapter' +# chapter_header: after print_page_header, before print_section +# chapter_footer: after print_section of last section, before print_page_footer +# +# If you want to get rid of navigation stuff after each section, +# redefine print_section such that it does not call print_navigation, +# and put print_navigation into print_chapter_header +@T2H_CHAPTER_BUTTONS = + ( + 'FastBack', 'FastForward', ' ', + ' ', ' ', ' ', ' ', + 'Top', 'Contents', 'Index', 'About', + ); + +sub T2H_DEFAULT_print_chapter_header +{ + # nothing to do there, by default + if (! $T2H_SECTION_NAVIGATION) + { + my $fh = shift; + local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS; + &$T2H_print_navigation($fh); + print $fh "\n
    \n"; + } +} + +sub T2H_DEFAULT_print_chapter_footer +{ + local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS; + &$T2H_print_navigation(@_); +} +################################################################### +$T2H_TODAY = &pretty_date; # like "20 September 1993" + +sub pretty_date { + local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); + + ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); + $year += ($year < 70) ? 2000 : 1900; + # obachman: Let's do it as the Americans do + return($MONTH_NAMES->{$T2H_LANG}[$mon] . ", " . $mday . " " . $year); +} + + +################################################################### +# Layout of standard header and footer +# + +# Set the default body text, inserted between +###$T2H_BODYTEXT = 'LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"'; +$T2H_BODYTEXT = 'LANG="' . $T2H_LANG . '" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"'; +# text inserted after +$T2H_AFTER_BODY_OPEN = ''; +#text inserted before +$T2H_PRE_BODY_CLOSE = ''; +# this is used in footer +$T2H_ADDRESS = "by $T2H_USER " if $T2H_USER; +$T2H_ADDRESS .= "on $T2H_TODAY"; +# this is added inside after and some META NAME stuff +# can be used for <style> <script>, <meta> tags +$T2H_EXTRA_HEAD = ''; + +sub T2H_DEFAULT_print_page_head +{ + my $fh = shift; + my $longtitle = "$T2H_THISDOC{title}: $T2H_NAME{This}"; + print $fh <<EOT; +<HTML> +$T2H_DOCTYPE +<!-- Created on $T2H_TODAY by $THISPROG --> +<!-- +$T2H_AUTHORS +--> +<HEAD> +<TITLE>$longtitle + + + + + + +$T2H_EXTRA_HEAD + + + +$T2H_AFTER_BODY_OPEN +EOT +} + +sub T2H_DEFAULT_print_page_foot +{ + my $fh = shift; + print $fh < + +This document was generated +$T2H_ADDRESS +using texi2html +$T2H_PRE_BODY_CLOSE + + +EOT +} + +################################################################### +# Layout of navigation panel + +# if this is set, then a vertical navigation panel is used +$T2H_VERTICAL_HEAD_NAVIGATION = 0; +sub T2H_DEFAULT_print_head_navigation +{ + my $fh = shift; + if ($T2H_VERTICAL_HEAD_NAVIGATION) + { + print $fh < + + +EOT + } + &$T2H_print_navigation($fh, $T2H_VERTICAL_HEAD_NAVIGATION); + if ($T2H_VERTICAL_HEAD_NAVIGATION) + { + print $fh < + +EOT + } + elsif ($T2H_SPLIT eq 'section') + { + print $fh "
    \n"; + } +} + +# Specifies the minimum page length required before a navigation panel +# is placed at the bottom of a page (the default is that of latex2html) +# T2H_THIS_WORDS_IN_PAGE holds number of words of current page +$T2H_WORDS_IN_PAGE = 300; +sub T2H_DEFAULT_print_foot_navigation +{ + my $fh = shift; + my $nwords = shift; + if ($T2H_VERTICAL_HEAD_NAVIGATION) + { + print $fh < + + +EOT + } + print $fh "
    \n"; + &$T2H_print_navigation($fh) if ($nwords >= $T2H_WORDS_IN_PAGE) +} + +###################################################################### +# navigation panel +# +# specify in this array which "buttons" should appear in which order +# in the navigation panel for sections; use ' ' for empty buttons (space) +@T2H_SECTION_BUTTONS = + ( + 'Back', 'Forward', ' ', 'FastBack', 'Up', 'FastForward', + ' ', ' ', ' ', ' ', + 'Top', 'Contents', 'Index', 'About', + ); + +# buttons for misc stuff +@T2H_MISC_BUTTONS = ('Top', 'Contents', 'Index', 'About'); + +# insert here name of icon images for buttons +# Icons are used, if $T2H_ICONS and resp. value are set +%T2H_ACTIVE_ICONS = + ( + 'Top', '', + 'Contents', '', + 'Overview', '', + 'Index', '', + 'Back', '', + 'FastBack', '', + 'Prev', '', + 'Up', '', + 'Next', '', + 'Forward', '', + 'FastForward', '', + 'About' , '', + 'First', '', + 'Last', '', + ' ', '' + ); + +# insert here name of icon images for these, if button is inactive +%T2H_PASSIVE_ICONS = + ( + 'Top', '', + 'Contents', '', + 'Overview', '', + 'Index', '', + 'Back', '', + 'FastBack', '', + 'Prev', '', + 'Up', '', + 'Next', '', + 'Forward', '', + 'FastForward', '', + 'About', '', + 'First', '', + 'Last', '', + ); + +# how to create IMG tag +sub T2H_DEFAULT_button_icon_img +{ + my $button = shift; + my $icon = shift; + my $name = shift; + return qq{$button: $name}; +} + +# Names of text as alternative for icons +%T2H_NAVIGATION_TEXT = + ( + 'Top', 'Top', + 'Contents', 'Contents', + 'Overview', 'Overview', + 'Index', 'Index', + ' ', '   ', + 'Back', ' < ', + 'FastBack', ' << ', + 'Prev', 'Prev', + 'Up', ' Up ', + 'Next', 'Next', + 'Forward', ' > ', + 'FastForward', ' >> ', + 'About', ' ? ', + 'First', ' |< ', + 'Last', ' >| ' + ); + +sub T2H_DEFAULT_print_navigation +{ + my $fh = shift; + my $vertical = shift; + my $spacing = 1; + print $fh "\n"; + + print $fh "" unless $vertical; + for $button (@$T2H_BUTTONS) + { + print $fh qq{\n} if $vertical; + print $fh qq{\n"; + print $fh "\n" if $vertical; + } + print $fh "" unless $vertical; + print $fh "
    }; + + if (ref($button) eq 'CODE') + { + &$button($fh, $vertical); + } + elsif ($button eq ' ') + { # handle space button + print $fh + $T2H_ICONS && $T2H_ACTIVE_ICONS{' '} ? + &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{' '}) : + $T2H_NAVIGATION_TEXT{' '}; + next; + } + elsif ($T2H_HREF{$button}) + { # button is active + print $fh + $T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? # use icon ? + t2h_anchor('', $T2H_HREF{$button}, # yes + &$T2H_button_icon_img($button, + $T2H_ACTIVE_ICONS{$button}, + $T2H_NAME{$button})) + : # use text + "[" . + t2h_anchor('', $T2H_HREF{$button}, $T2H_NAVIGATION_TEXT{$button}) . + "]"; + } + else + { # button is passive + print $fh + $T2H_ICONS && $T2H_PASSIVE_ICONS{$button} ? + &$T2H_button_icon_img($button, + $T2H_PASSIVE_ICONS{$button}, + $T2H_NAME{$button}) : + + "[" . $T2H_NAVIGATION_TEXT{$button} . "]"; + } + print $fh "
    \n"; +} + +###################################################################### +# Frames: this is from "Richard Y. Kim" +# Should be improved to be more conforming to other _print* functions + +sub T2H_DEFAULT_print_frame +{ + my $fh = shift; + print $fh < +$T2H_THISDOC{title} + + + + + +EOT +} + +sub T2H_DEFAULT_print_toc_frame +{ + my $fh = shift; + &$T2H_print_page_head($fh); + print $fh <Content +EOT + print $fh map {s/HREF=/target=\"main\" HREF=/; $_;} @stoc_lines; + print $fh "\n"; +} + +###################################################################### +# About page +# + +# T2H_PRE_ABOUT might be a function +$T2H_PRE_ABOUT = <texi2html +

    +EOT +$T2H_AFTER_ABOUT = ''; + +sub T2H_DEFAULT_about_body +{ + my $about; + if (ref($T2H_PRE_ABOUT) eq 'CODE') + { + $about = &$T2H_PRE_ABOUT(); + } + else + { + $about = $T2H_PRE_ABOUT; + } + $about .= <

    + + + + + + + +EOT + + for $button (@T2H_SECTION_BUTTONS) + { + next if $button eq ' ' || ref($button) eq 'CODE'; + $about .= < + + + + +EOT + } + + $about .= < +

    +where the Example assumes that the current position +is at Subsubsection One-Two-Three of a document of +the following structure: +
      +
    • 1. Section One
    • +
        +
      • 1.1 Subsection One-One
      • +
          +
        • ...
        • +
        +
      • 1.2 Subsection One-Two
      • +
          +
        • 1.2.1 Subsubsection One-Two-One +
        • 1.2.2 Subsubsection One-Two-Two +
        • 1.2.3 Subsubsection One-Two-Three     +<== Current Position +
        • 1.2.4 Subsubsection One-Two-Four +
        +
      • 1.3 Subsection One-Three
      • +
          +
        • ...
        • +
        +
      • 1.4 Subsection One-Four
      • +
      +
    +$T2H_AFTER_ABOUT +EOT + return $about; +} + + +%T2H_BUTTONS_GOTO = + ( + 'Top', 'cover (top) of document', + 'Contents', 'table of contents', + 'Overview', 'short table of contents', + 'Index', 'concept index', + 'Back', 'previous section in reading order', + 'FastBack', 'previous or up-and-previous section ', + 'Prev', 'previous section same level', + 'Up', 'up section', + 'Next', 'next section same level', + 'Forward', 'next section in reading order', + 'FastForward', 'next or up-and-next section', + 'About' , 'this page', + 'First', 'first section in reading order', + 'Last', 'last section in reading order', + ); + +%T2H_BUTTONS_EXAMPLE = +( + 'Top', '   ', + 'Contents', '   ', + 'Overview', '   ', + 'Index', '   ', + 'Back', '1.2.2', + 'FastBack', '1.1', + 'Prev', '1.2.2', + 'Up', '1.2', + 'Next', '1.2.4', + 'Forward', '1.2.4', + 'FastForward', '1.3', + 'About', '   ', + 'First', '1.', + 'Last', '1.2.4', +); + + +###################################################################### +# from here on, its l2h init stuff +# + +## initialization for latex2html as for Singular manual generation +## obachman 3/99 + +# +# Options controlling Titles, File-Names, Tracing and Sectioning +# +$TITLE = ''; + +$SHORTEXTN = 0; + +$LONG_TITLES = 0; + +$DESTDIR = ''; # should be overwritten by cmd-line argument + +$NO_SUBDIR = 0;# should be overwritten by cmd-line argument + +$PREFIX = ''; # should be overwritten by cmd-line argument + +$AUTO_PREFIX = 0; # this is needed, so that prefix settings are used + +$AUTO_LINK = 0; + +$SPLIT = 0; + +$MAX_LINK_DEPTH = 0; + +$TMP = ''; # should be overwritten by cmd-line argument + +$DEBUG = 0; + +$VERBOSE = 1; + +# +# Options controlling Extensions and Special Features +# +$HTML_VERSION = "3.2"; + +$TEXDEFS = 1; # we absolutely need that + +$EXTERNAL_FILE = ''; + +$SCALABLE_FONTS = 1; + +$NO_SIMPLE_MATH = 1; + +$LOCAL_ICONS = 1; + +$SHORT_INDEX = 0; + +$NO_FOOTNODE = 1; + +$ADDRESS = ''; + +$INFO = ''; + +# +# Switches controlling Image Generation +# +$ASCII_MODE = 0; + +$NOLATEX = 0; + +$EXTERNAL_IMAGES = 0; + +$PS_IMAGES = 0; + +$NO_IMAGES = 0; + +$IMAGES_ONLY = 0; + +$REUSE = 2; + +$ANTI_ALIAS = 1; + +$ANTI_ALIAS_TEXT = 1; + +# +#Switches controlling Navigation Panels +# +$NO_NAVIGATION = 1; +$ADDRESS = ''; +$INFO = 0; # 0 = do not make a "About this document..." section + +# +#Switches for Linking to other documents +# +# actuall -- we don't care + +$MAX_SPLIT_DEPTH = 0; # Stop making separate files at this depth + +$MAX_LINK_DEPTH = 0; # Stop showing child nodes at this depth + +$NOLATEX = 0; # 1 = do not pass unknown environments to Latex + +$EXTERNAL_IMAGES = 0; # 1 = leave the images outside the document + +$ASCII_MODE = 0; # 1 = do not use any icons or internal images + +# 1 = use links to external postscript images rather than inlined bitmap +# images. +$PS_IMAGES = 0; +$SHOW_SECTION_NUMBERS = 0; + +### Other global variables ############################################### +$CHILDLINE = ""; + +# This is the line width measured in pixels and it is used to right justify +# equations and equation arrays; +$LINE_WIDTH = 500; + +# Used in conjunction with AUTO_NAVIGATION +$WORDS_IN_PAGE = 300; + +# Affects ONLY the way accents are processed +$default_language = 'english'; + +# The value of this variable determines how many words to use in each +# title that is added to the navigation panel (see below) +# +$WORDS_IN_NAVIGATION_PANEL_TITLES = 0; + +# This number will determine the size of the equations, special characters, +# and anything which will be converted into an inlined image +# *except* "image generating environments" such as "figure", "table" +# or "minipage". +# Effective values are those greater than 0. +# Sensible values are between 0.1 - 4. +$MATH_SCALE_FACTOR = 1.5; + +# This number will determine the size of +# image generating environments such as "figure", "table" or "minipage". +# Effective values are those greater than 0. +# Sensible values are between 0.1 - 4. +$FIGURE_SCALE_FACTOR = 1.6; + + +# If both of the following two variables are set then the "Up" button +# of the navigation panel in the first node/page of a converted document +# will point to $EXTERNAL_UP_LINK. $EXTERNAL_UP_TITLE should be set +# to some text which describes this external link. +$EXTERNAL_UP_LINK = ""; +$EXTERNAL_UP_TITLE = ""; + +# If this is set then the resulting HTML will look marginally better if viewed +# with Netscape. +$NETSCAPE_HTML = 1; + +# Valid paper sizes are "letter", "legal", "a4","a3","a2" and "a0" +# Paper sizes has no effect other than in the time it takes to create inlined +# images and in whether large images can be created at all ie +# - larger paper sizes *MAY* help with large image problems +# - smaller paper sizes are quicker to handle +$PAPERSIZE = "a4"; + +# Replace "english" with another language in order to tell LaTeX2HTML that you +# want some generated section titles (eg "Table of Contents" or "References") +# to appear in a different language. Currently only "english" and "french" +# is supported but it is very easy to add your own. See the example in the +# file "latex2html.config" +$TITLES_LANGUAGE = "english"; + +1; # This must be the last non-comment line + +# End File texi2html.init +###################################################################### + + +require "$ENV{T2H_HOME}/texi2html.init" + if ($0 =~ /\.pl$/ && + -e "$ENV{T2H_HOME}/texi2html.init" && -r "$ENV{T2H_HOME}/texi2html.init"); + +#+++############################################################################ +# # +# Initialization # +# Pasted content of File $(srcdir)/MySimple.pm: Command-line processing # +# # +#---############################################################################ + +# leave this within comments, and keep the require statement +# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init +# exists. + +# +package Getopt::MySimple; + +# Name: +# Getopt::MySimple. +# +# Documentation: +# POD-style (incomplete) documentation is in file MySimple.pod +# +# Tabs: +# 4 spaces || die. +# +# Author: +# Ron Savage rpsavage@ozemail.com.au. +# 1.00 19-Aug-97 Initial version. +# 1.10 13-Oct-97 Add arrays of switches (eg '=s@'). +# 1.20 3-Dec-97 Add 'Help' on a per-switch basis. +# 1.30 11-Dec-97 Change 'Help' to 'verbose'. Make all hash keys lowercase. +# 1.40 10-Nov-98 Change width of help report. Restructure tests. +# 1-Jul-00 Modifications for Texi2html + +# -------------------------------------------------------------------------- +# Locally modified by obachman (Display type instead of env, order by cmp) +# $Id: MySimple.pm,v 1.1 2000/07/03 08:44:13 obachman Exp $ + +# use strict; +# no strict 'refs'; + +use vars qw(@EXPORT @EXPORT_OK @ISA); +use vars qw($fieldWidth $opt $VERSION); + +use Exporter(); +use Getopt::Long; + +@ISA = qw(Exporter); +@EXPORT = qw(); +@EXPORT_OK = qw($opt); # An alias for $self -> {'opt'}. + +# -------------------------------------------------------------------------- + +$fieldWidth = 20; +$VERSION = '1.41'; + +# -------------------------------------------------------------------------- + +sub byOrder +{ + my($self) = @_; + + return uc($a) cmp (uc($b)); +} + +# -------------------------------------------------------------------------- + +sub dumpOptions +{ + my($self) = @_; + + print 'Option', ' ' x ($fieldWidth - length('Option') ), "Value\n"; + + for (sort byOrder keys(%{$self -> {'opt'} }) ) + { + print "-$_", ' ' x ($fieldWidth - (1 + length) ), "${$self->{'opt'} }{$_}\n"; + } + + print "\n"; + +} # End of dumpOptions. + +# -------------------------------------------------------------------------- +# Return: +# 0 -> Error. +# 1 -> Ok. + +sub getOptions +{ + push(@_, 0) if ($#_ == 2); # Default for $ignoreCase is 0. + push(@_, 1) if ($#_ == 3); # Default for $helpThenExit is 1. + + my($self, $default, $helpText, $versionText, + $helpThenExit, $versionThenExit, $ignoreCase) = @_; + + $helpThenExit = 1 unless (defined($helpThenExit)); + $versionThenExit = 1 unless (defined($versionThenExit)); + $ignoreCase = 0 unless (defined($ignoreCase)); + + $self -> {'default'} = $default; + $self -> {'helpText'} = $helpText; + $self -> {'versionText'} = $versionText; + $Getopt::Long::ignorecase = $ignoreCase; + + unless (defined($self -> {'default'}{'help'})) + { + $self -> {'default'}{'help'} = + { + type => ':i', + default => '', + linkage => sub {$self->helpOptions($_[1]); exit (0) if $helpThenExit;}, + verbose => "print help and exit" + }; + } + + unless (defined($self -> {'default'}{'version'})) + { + $self -> {'default'}{'version'} = + { + type => '', + default => '', + linkage => sub {print $self->{'versionText'}; exit (0) if versionTheExit;}, + verbose => "print version and exit" + }; + } + + for (keys(%{$self -> {'default'} }) ) + { + my $type = ${$self -> {'default'} }{$_}{'type'}; + push(@{$self -> {'type'} }, "$_$type"); + $self->{'opt'}->{$_} = ${$self -> {'default'} }{$_}{'linkage'} + if ${$self -> {'default'} }{$_}{'linkage'}; + } + + my($result) = &GetOptions($self -> {'opt'}, @{$self -> {'type'} }); + + return $result unless $result; + + for (keys(%{$self -> {'default'} }) ) + { + if (! defined(${$self -> {'opt'} }{$_})) #{ + { + ${$self -> {'opt'} }{$_} = ${$self -> {'default'} }{$_}{'default'}; + } + } + + $result; +} # End of getOptions. + +# -------------------------------------------------------------------------- + +sub helpOptions +{ + my($self) = shift; + my($noHelp) = shift; + $noHelp = 0 unless $noHelp; + my($optwidth, $typewidth, $defaultwidth, $maxlinewidth, $valind, $valwidth) + = (10, 5, 9, 78, 4, 11); + + print "$self->{'helpText'}" if ($self -> {'helpText'}); + + print ' Option', ' ' x ($optwidth - length('Option') -1 ), + 'Type', ' ' x ($typewidth - length('Type') + 1), + 'Default', ' ' x ($defaultwidth - length('Default') ), + "Description\n"; + + for (sort byOrder keys(%{$self -> {'default'} }) ) + { + my($line, $help, $option, $val); + $option = $_; + next if ${$self->{'default'} }{$_}{'noHelp'} && ${$self->{'default'} }{$_}{'noHelp'} > $noHelp; + $line = " -$_ " . ' ' x ($optwidth - (2 + length) ) . + "${$self->{'default'} }{$_}{'type'} ". + ' ' x ($typewidth - (1+length(${$self -> {'default'} }{$_}{'type'}) )); + + $val = ${$self->{'default'} }{$_}{'linkage'}; + if ($val) + { + if (ref($val) eq 'SCALAR') + { + $val = $$val; + } + else + { + $val = ''; + } + } + else + { + $val = ${$self->{'default'} }{$_}{'default'}; + } + $line .= "$val "; + $line .= ' ' x ($optwidth + $typewidth + $defaultwidth + 1 - length($line)); + + if (defined(${$self -> {'default'} }{$_}{'verbose'}) && + ${$self -> {'default'} }{$_}{'verbose'} ne '') + { + $help = "${$self->{'default'} }{$_}{'verbose'}"; + } + else + { + $help = ' '; + } + if ((length("$line") + length($help)) < $maxlinewidth) + { + print $line , $help, "\n"; + } + else + { + print $line, "\n", ' ' x $valind, $help, "\n"; + } + for $val (sort byOrder keys(%{${$self->{'default'}}{$option}{'values'}})) + { + print ' ' x ($valind + 2); + print $val, ' ', ' ' x ($valwidth - length($val) - 2); + print ${$self->{'default'}}{$option}{'values'}{$val}, "\n"; + } + } + + print <| ! no argument: variable is set to 1 on -foo (or, to 0 on -nofoo) + =s | :s mandatory (or, optional) string argument + =i | :i mandatory (or, optional) integer argument +EOT +} # End of helpOptions. + +#------------------------------------------------------------------- + +sub new +{ + my($class) = @_; + my($self) = {}; + $self -> {'default'} = {}; + $self -> {'helpText'} = ''; + $self -> {'opt'} = {}; + $opt = $self -> {'opt'}; # An alias for $self -> {'opt'}. + $self -> {'type'} = (); + + return bless $self, $class; + +} # End of new. + +# -------------------------------------------------------------------------- + +1; + +# End MySimple.pm + +require "$ENV{T2H_HOME}/MySimple.pm" + if ($0 =~ /\.pl$/ && + -e "$ENV{T2H_HOME}/texi2html.init" && -r "$ENV{T2H_HOME}/texi2html.init"); + +package main; + +#+++############################################################################ +# # +# Constants # +# # +#---############################################################################ + +$DEBUG_TOC = 1; +$DEBUG_INDEX = 2; +$DEBUG_BIB = 4; +$DEBUG_GLOSS = 8; +$DEBUG_DEF = 16; +$DEBUG_HTML = 32; +$DEBUG_USER = 64; +$DEBUG_L2H = 128; + + +$BIBRE = '\[[\w\/-]+\]'; # RE for a bibliography reference +$FILERE = '[\/\w.+-]+'; # RE for a file name +$VARRE = '[^\s\{\}]+'; # RE for a variable name +$NODERE = '[^,:]+'; # RE for a node name +$NODESRE = '[^:]+'; # RE for a list of node names + +$ERROR = "***"; # prefix for errors +$WARN = "**"; # prefix for warnings + + # program home page +$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections + +$CHAPTEREND = "\n"; # to know where a chpater ends +$SECTIONEND = "\n"; # to know where section ends +$TOPEND = "\n"; # to know where top ends + + + +# +# pre-defined indices +# +$index_properties = +{ + 'c' => { name => 'cp'}, + 'f' => { name => 'fn', code => 1}, + 'v' => { name => 'vr', code => 1}, + 'k' => { name => 'ky', code => 1}, + 'p' => { name => 'pg', code => 1}, + 't' => { name => 'tp', code => 1} +}; + + +%predefined_index = ( + 'cp', 'c', + 'fn', 'f', + 'vr', 'v', + 'ky', 'k', + 'pg', 'p', + 'tp', 't', + ); + +# +# valid indices +# +%valid_index = ( + 'c', 1, + 'f', 1, + 'v', 1, + 'k', 1, + 'p', 1, + 't', 1, + ); + +# +# texinfo section names to level +# +%sec2level = ( + 'top', 0, + 'chapter', 1, + 'unnumbered', 1, + 'majorheading', 1, + 'chapheading', 1, + 'appendix', 1, + 'section', 2, + 'unnumberedsec', 2, + 'heading', 2, + 'appendixsec', 2, + 'appendixsection', 2, + 'subsection', 3, + 'unnumberedsubsec', 3, + 'subheading', 3, + 'appendixsubsec', 3, + 'subsubsection', 4, + 'unnumberedsubsubsec', 4, + 'subsubheading', 4, + 'appendixsubsubsec', 4, + ); + +# +# accent map, TeX command to ISO name +# +%accent_map = ( + '"', 'uml', + '~', 'tilde', + '^', 'circ', + '`', 'grave', + '\'', 'acute', + ); + +# +# texinfo "simple things" (@foo) to HTML ones +# +%simple_map = ( + # cf. makeinfo.c + "*", "
    ", # HTML+ + " ", " ", + "\t", " ", + "-", "­", # soft hyphen + "\n", "\n", + "|", "", + 'tab', '<\/TD>
    Button Name Go to From 1.2.3 go to
    +EOT + $about .= + ($T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? + &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{$button}) : + " [" . $T2H_NAVIGATION_TEXT{$button} . "] "); + $about .= < + +$button + +$T2H_BUTTONS_GOTO{$button} + +$T2H_BUTTONS_EXAMPLE{$button} +
    ', + # spacing commands + ":", "", + "!", "!", + "?", "?", + ".", ".", + "-", "", + ); + +# +# texinfo "things" (@foo{}) to HTML ones +# +%things_map = ( + 'TeX', 'TeX', + 'br', '

    ', # paragraph break + 'bullet', '*', + 'copyright', '(C)', + 'dots', '...<\/small>', + 'enddots', '....<\/small>', + 'equiv', '==', + 'error', 'error-->', + 'expansion', '==>', + 'minus', '-', + 'point', '-!-', + 'print', '-|', + 'result', '=>', + 'today', $T2H_TODAY, + 'aa', 'å', + 'AA', 'Å', + 'ae', 'æ', + 'oe', 'œ', + 'AE', 'Æ', + 'OE', 'Œ', + 'o', 'ø', + 'O', 'Ø', + 'ss', 'ß', + 'l', '\/l', + 'L', '\/L', + 'exclamdown', '¡', + 'questiondown', '¿', + 'pounds', '£' + ); + +# +# texinfo styles (@foo{bar}) to HTML ones +# +%style_map = ( + 'acronym', '&do_acronym', + 'asis', '', + 'b', 'B', + 'cite', 'CITE', + 'code', 'CODE', + 'command', 'CODE', + 'ctrl', '&do_ctrl', # special case + 'dfn', 'EM', # DFN tag is illegal in the standard + 'dmn', '', # useless + 'email', '&do_email', # insert a clickable email address + 'emph', 'EM', + 'env', 'CODE', + 'file', '"TT', # will put quotes, cf. &apply_style + 'i', 'I', + 'kbd', 'KBD', + 'key', 'KBD', + 'math', '&do_math', + 'option', '"SAMP', # will put quotes, cf. &apply_style + 'r', '', # unsupported + 'samp', '"SAMP', # will put quotes, cf. &apply_style + 'sc', '&do_sc', # special case + 'strong', 'STRONG', + 't', 'TT', + 'titlefont', '', # useless + 'uref', '&do_uref', # insert a clickable URL + 'url', '&do_url', # insert a clickable URL + 'var', 'VAR', + 'w', '', # unsupported + 'H', '&do_accent', + 'dotaccent', '&do_accent', + 'ringaccent','&do_accent', + 'tieaccent', '&do_accent', + 'u','&do_accent', + 'ubaraccent','&do_accent', + 'udotaccent','&do_accent', + 'v', '&do_accent', + ',', '&do_accent', + 'dotless', '&do_accent' + ); + +# +# texinfo format (@foo/@end foo) to HTML ones +# +%format_map = ( + 'quotation', 'BLOCKQUOTE', + # lists + 'itemize', 'UL', + 'enumerate', 'OL', + # poorly supported + 'flushleft', 'PRE', + 'flushright', 'PRE', + ); + +# +# an eval of these $complex_format_map->{what}->[0] yields beginning +# an eval of these $complex_format_map->{what}->[1] yieleds end +$complex_format_map = +{ + example => + [ + q{"$T2H_EXAMPLE_INDENT_CELL
    "},
    +  q{'
    '} + ], + smallexample => + [ + q{"$T2H_SMALL_EXAMPLE_INDENT_CELL
    "},
    +  q{'
    '} + ], + display => + [ + q{"$T2H_EXAMPLE_INDENT_CELL
    '},
    +  q{'
    '} + ], + smalldisplay => + [ + q{"$T2H_SMALL_EXAMPLE_INDENT_CELL
    '},
    +  q{'
    '} + ] +}; + +$complex_format_map->{lisp} = $complex_format_map->{example}; +$complex_format_map->{smalllisp} = $complex_format_map->{smallexample}; +$complex_format_map->{format} = $complex_format_map->{display}; +$complex_format_map->{smallformat} = $complex_format_map->{smalldisplay}; + +# +# texinfo definition shortcuts to real ones +# +%def_map = ( + # basic commands + 'deffn', 0, + 'defvr', 0, + 'deftypefn', 0, + 'deftypevr', 0, + 'defcv', 0, + 'defop', 0, + 'deftp', 0, + # basic x commands + 'deffnx', 0, + 'defvrx', 0, + 'deftypefnx', 0, + 'deftypevrx', 0, + 'defcvx', 0, + 'defopx', 0, + 'deftpx', 0, + # shortcuts + 'defun', 'deffn Function', + 'defmac', 'deffn Macro', + 'defspec', 'deffn {Special Form}', + 'defvar', 'defvr Variable', + 'defopt', 'defvr {User Option}', + 'deftypefun', 'deftypefn Function', + 'deftypevar', 'deftypevr Variable', + 'defivar', 'defcv {Instance Variable}', + 'deftypeivar', 'defcv {Instance Variable}', # NEW: FIXME + 'defmethod', 'defop Method', + 'deftypemethod', 'defop Method', # NEW:FIXME + # x shortcuts + 'defunx', 'deffnx Function', + 'defmacx', 'deffnx Macro', + 'defspecx', 'deffnx {Special Form}', + 'defvarx', 'defvrx Variable', + 'defoptx', 'defvrx {User Option}', + 'deftypefunx', 'deftypefnx Function', + 'deftypevarx', 'deftypevrx Variable', + 'defivarx', 'defcvx {Instance Variable}', + 'defmethodx', 'defopx Method', + ); + +# +# things to skip +# +%to_skip = ( + # comments + 'c', 1, + 'comment', 1, + 'ifnotinfo', 1, + 'ifnottex', 1, + 'ifhtml', 1, + 'end ifhtml', 1, + 'end ifnotinfo', 1, + 'end ifnottex', 1, + # useless + 'detailmenu', 1, + 'direntry', 1, + 'contents', 1, + 'shortcontents', 1, + 'summarycontents', 1, + 'footnotestyle', 1, + 'end ifclear', 1, + 'end ifset', 1, + 'titlepage', 1, + 'end titlepage', 1, + # unsupported commands (formatting) + 'afourpaper', 1, + 'cropmarks', 1, + 'finalout', 1, + 'headings', 1, + 'sp', 1, + 'need', 1, + 'page', 1, + 'setchapternewpage', 1, + 'everyheading', 1, + 'everyfooting', 1, + 'evenheading', 1, + 'evenfooting', 1, + 'oddheading', 1, + 'oddfooting', 1, + 'smallbook', 1, + 'vskip', 1, + 'filbreak', 1, + 'paragraphindent', 1, + # unsupported formats + 'cartouche', 1, + 'end cartouche', 1, + 'group', 1, + 'end group', 1, + ); + +#+++############################################################################ +# # +# Argument parsing, initialisation # +# # +#---############################################################################ + +# +# flush stdout and stderr after every write +# +select(STDERR); +$| = 1; +select(STDOUT); +$| = 1; + + +%value = (); # hold texinfo variables, see also -D +$use_bibliography = 1; +$use_acc = 1; + +# +# called on -init-file +sub LoadInitFile +{ + my $init_file = shift; + # second argument is value of options + $init_file = shift; + if (-f $init_file) + { + print "# reading initialization file from $init_file\n" + if ($T2H_VERBOSE); + require($init_file); + } + else + { + print "$ERROR Error: can't read init file $int_file\n"; + $init_file = ''; + } +} + +# +# called on -lang +sub SetDocumentLanguage +{ + my $lang = shift; + if (! exists($T2H_WORDS->{$lang})) + { + warn "$ERROR: Language specs for '$lang' do not exists. Reverting to '" . + ($T2H_LANG ? T2H_LANG : "en") . "'\n"; + } + else + { + print "# using '$lang' as document language\n" if ($T2H_VERBOSE); + $T2H_LANG = $lang; + } +} + +## +## obsolete cmd line options +## +$T2H_OBSOLETE_OPTIONS -> {'no-section_navigation'} = +{ + type => '!', + linkage => sub {$main::T2H_SECTION_NAVIGATION = 0;}, + verbose => 'obsolete, use -nosec_nav', + noHelp => 2, +}; +$T2H_OBSOLETE_OPTIONS -> {use_acc} = +{ + type => '!', + linkage => \$use_acc, + verbose => 'obsolete', + noHelp => 2 +}; +$T2H_OBSOLETE_OPTIONS -> {expandinfo} = +{ + type => '!', + linkage => sub {$main::T2H_EXPAND = 'info';}, + verbose => 'obsolete, use "-expand info" instead', + noHelp => 2, +}; +$T2H_OBSOLETE_OPTIONS -> {expandtex} = +{ + type => '!', + linkage => sub {$main::T2H_EXPAND = 'tex';}, + verbose => 'obsolete, use "-expand tex" instead', + noHelp => 2, +}; +$T2H_OBSOLETE_OPTIONS -> {monolithic} = +{ + type => '!', + linkage => sub {$main::T2H_SPLIT = '';}, + verbose => 'obsolete, use "-split no" instead', + noHelp => 2 +}; +$T2H_OBSOLETE_OPTIONS -> {split_node} = +{ + type => '!', + linkage => sub{$main::T2H_SPLIT = 'section';}, + verbose => 'obsolete, use "-split section" instead', + noHelp => 2, +}; +$T2H_OBSOLETE_OPTIONS -> {split_chapter} = +{ + type => '!', + linkage => sub{$main::T2H_SPLIT = 'chapter';}, + verbose => 'obsolete, use "-split chapter" instead', + noHelp => 2, +}; +$T2H_OBSOLETE_OPTIONS -> {no_verbose} = +{ + type => '!', + linkage => sub {$main::T2H_VERBOSE = 0;}, + verbose => 'obsolete, use -noverbose instead', + noHelp => 2, +}; +$T2H_OBSOLETE_OPTIONS -> {output_file} = +{ + type => '=s', + linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';}, + verbose => 'obsolete, use -out_file instead', + noHelp => 2 +}; + +$T2H_OBSOLETE_OPTIONS -> {section_navigation} = +{ + type => '!', + linkage => \$T2H_SECTION_NAVIGATION, + verbose => 'obsolete, use -sec_nav instead', + noHelp => 2, +}; + +$T2H_OBSOLETE_OPTIONS -> {verbose} = +{ + type => '!', + linkage => \$T2H_VERBOSE, + verbose => 'obsolete, use -Verbose instead', + noHelp => 2 +}; + +# read initialzation from $sysconfdir/texi2htmlrc or $HOME/.texi2htmlrc +my $home = $ENV{HOME}; +defined($home) or $home = ''; +foreach $i ('/usr/local/etc/texi2htmlrc', "$home/.texi2htmlrc") { + if (-f $i) { + print "# reading initialization file from $i\n" + if ($T2H_VERBOSE); + require($i); + } +} + + +#+++############################################################################ +# # +# parse command-line options +# # +#---############################################################################ +$T2H_USAGE_TEXT = <getOptions($T2H_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n")) +{ + print $Configure_failed if $Configure_failed; + die $T2H_FAILURE_TEXT; +} + +if (@ARGV > 1) +{ + eval {Getopt::Long::Configure("no_pass_through");}; + if (! $options->getOptions($T2H_OBSOLETE_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n")) + { + print $Configure_failed if $Configure_failed; + die $T2H_FAILURE_TEXT; + } +} + +if ($T2H_CHECK) { + die "Need file to check\n$T2H_FAILURE_TEXT" unless @ARGV > 0; + ✓ + exit; +} + +#+++############################################################################ +# # +# evaluation of cmd line options +# # +#---############################################################################ + +if ($T2H_EXPAND eq 'info') +{ + $to_skip{'ifinfo'} = 1; + $to_skip{'end ifinfo'} = 1; +} +elsif ($T2H_EXPAND eq 'tex') +{ + $to_skip{'iftex'} = 1; + $to_skip{'end iftex'} = 1; + +} + +$T2H_INVISIBLE_MARK = '' if $T2H_INVISIBLE_MARK eq 'xbm'; + +# +# file name buisness +# +die "Need exactly one file to translate\n$T2H_FAILURE_TEXT" unless @ARGV == 1; +$docu = shift(@ARGV); +if ($docu =~ /.*\//) { + chop($docu_dir = $&); + $docu_name = $'; +} else { + $docu_dir = '.'; + $docu_name = $docu; +} +unshift(@T2H_INCLUDE_DIRS, $docu_dir); +$docu_name =~ s/\.te?x(i|info)?$//; # basename of the document +$docu_name = $T2H_PREFIX if ($T2H_PREFIX); + +# subdir +if ($T2H_SUBDIR && ! $T2H_OUT) +{ + $T2H_SUBDIR =~ s|/*$||; + unless (-d "$T2H_SUBDIR" && -w "$T2H_SUBDIR") + { + if ( mkdir($T2H_SUBDIR, oct(755))) + { + print "# created directory $T2H_SUBDIR\n" if ($T2H_VERBOSE); + } + else + { + warn "$ERROR can't create directory $T2H_SUBDIR. Put results into current directory\n"; + $T2H_SUBDIR = ''; + } + } +} + +if ($T2H_SUBDIR && ! $T2H_OUT) +{ + $docu_rdir = "$T2H_SUBDIR/"; + print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE); +} +else +{ + if ($T2H_OUT && $T2H_OUT =~ m|(.*)/|) + { + $docu_rdir = "$1/"; + print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE); + } + else + { + print "# putting result files into current directory \n" if ($T2H_VERBOSE); + $docu_rdir = ''; + } +} + +# extension +if ($T2H_SHORTEXTN) +{ + $docu_ext = "htm"; +} +else +{ + $docu_ext = "html"; +} +if ($T2H_TOP_FILE =~ /\..*$/) +{ + $T2H_TOP_FILE = $`.".$docu_ext"; +} + +# result files +if (! $T2H_OUT && ($T2H_SPLIT =~ /section/i || $T2H_SPLIT =~ /node/i)) +{ + $T2H_SPLIT = 'section'; +} +elsif (! $T2H_OUT && $T2H_SPLIT =~ /chapter/i) +{ + $T2H_SPLIT = 'chapter' +} +else +{ + undef $T2H_SPLIT; +} + +$docu_doc = "$docu_name.$docu_ext"; # document's contents +$docu_doc_file = "$docu_rdir$docu_doc"; +if ($T2H_SPLIT) +{ + $docu_toc = $T2H_TOC_FILE || "${docu_name}_toc.$docu_ext"; # document's table of contents + $docu_stoc = "${docu_name}_ovr.$docu_ext"; # document's short toc + $docu_foot = "${docu_name}_fot.$docu_ext"; # document's footnotes + $docu_about = "${docu_name}_abt.$docu_ext"; # about this document + $docu_top = $T2H_TOP_FILE || $docu_doc; +} +else +{ + if ($T2H_OUT) + { + $docu_doc = $T2H_OUT; + $docu_doc =~ s|.*/||; + } + $docu_toc = $docu_foot = $docu_stoc = $docu_about = $docu_top = $docu_doc; +} + +$docu_toc_file = "$docu_rdir$docu_toc"; +$docu_stoc_file = "$docu_rdir$docu_stoc"; +$docu_foot_file = "$docu_rdir$docu_foot"; +$docu_about_file = "$docu_rdir$docu_about"; +$docu_top_file = "$docu_rdir$docu_top"; + +$docu_frame_file = "$docu_rdir${docu_name}_frame.$docu_ext"; +$docu_toc_frame_file = "$docu_rdir${docu_name}_toc_frame.$docu_ext"; + +# +# variables +# +$value{'html'} = 1; # predefine html (the output format) +$value{'texi2html'} = $THISVERSION; # predefine texi2html (the translator) +# _foo: internal to track @foo +foreach ('_author', '_title', '_subtitle', + '_settitle', '_setfilename', '_shorttitle') { + $value{$_} = ''; # prevent -w warnings +} +%node2sec = (); # node to section name +%sec2node = (); # section to node name +%sec2number = (); # section to number +%number2sec = (); # number to section +%idx2node = (); # index keys to node +%node2href = (); # node to HREF +%node2next = (); # node to next +%node2prev = (); # node to prev +%node2up = (); # node to up +%bib2href = (); # bibliography reference to HREF +%gloss2href = (); # glossary term to HREF +@sections = (); # list of sections +%tag2pro = (); # protected sections + +# +# initial indexes +# +$bib_num = 0; +$foot_num = 0; +$gloss_num = 0; +$idx_num = 0; +$sec_num = 0; +$doc_num = 0; +$html_num = 0; + +# +# can I use ISO8879 characters? (HTML+) +# +if ($T2H_USE_ISO) { + $things_map{'bullet'} = "•"; + $things_map{'copyright'} = "©"; + $things_map{'dots'} = "…"; + $things_map{'equiv'} = "≡"; + $things_map{'expansion'} = "→"; + $things_map{'point'} = "∗"; + $things_map{'result'} = "⇒"; +} + +# +# read texi2html extensions (if any) +# +$extensions = 'texi2html.ext'; # extensions in working directory +if (-f $extensions) { + print "# reading extensions from $extensions\n" if $T2H_VERBOSE; + require($extensions); +} +($progdir = $0) =~ s/[^\/]+$//; +if ($progdir && ($progdir ne './')) { + $extensions = "${progdir}texi2html.ext"; # extensions in texi2html directory + if (-f $extensions) { + print "# reading extensions from $extensions\n" if $T2H_VERBOSE; + require($extensions); + } +} + + +print "# reading from $docu\n" if $T2H_VERBOSE; + +######################################################################### +# +# latex2html stuff +# +# latex2html conversions consist of three stages: +# 1) ToLatex: Put "latex" code into a latex file +# 2) ToHtml: Use latex2html to generate corresponding html code and images +# 3) FromHtml: Extract generated code and images from latex2html run +# + +########################## +# default settings +# + +# defaults for files and names + +sub l2h_Init +{ + local($root) = @_; + + return 0 unless ($root); + + $l2h_name = "${root}_l2h"; + + $l2h_latex_file = "$docu_rdir${l2h_name}.tex"; + $l2h_cache_file = "${docu_rdir}l2h_cache.pm"; + $T2H_L2H_L2H = "latex2html" unless ($T2H_L2H_L2H); + + # destination dir -- generated images are put there, should be the same + # as dir of enclosing html document -- + $l2h_html_file = "$docu_rdir${l2h_name}.html"; + $l2h_prefix = "${l2h_name}_"; + return 1; +} + + +########################## +# +# First stage: Generation of Latex file +# Initialize with: l2h_InitToLatex +# Add content with: l2h_ToLatex($text) --> HTML placeholder comment +# Finish with: l2h_FinishToLatex +# + +$l2h_latex_preample = <$l2h_latex_file")) + { + warn "$ERROR Error l2h: Can't open latex file '$latex_file' for writing\n"; + return 0; + } + print "# l2h: use ${l2h_latex_file} as latex file\n" if ($T2H_VERBOSE); + print L2H_LATEX $l2h_latex_preample; + } + # open database for caching + l2h_InitCache(); + $l2h_latex_count = 0; + $l2h_to_latex_count = 0; + $l2h_cached_count = 0; + return 1; +} + +# print text (1st arg) into latex file (if not already there), return +# HTML commentary which can be later on replaced by the latex2html +# generated text +sub l2h_ToLatex +{ + my($text) = @_; + my($count); + + $l2h_to_latex_count++; + $text =~ s/(\s*)$//; + + # try whether we can cache it + my $cached_text = l2h_FromCache($text); + if ($cached_text) + { + $l2h_cached_count++; + return $cached_text; + } + + # try whether we have text already on things to do + unless ($count = $l2h_to_latex{$text}) + { + $count = $l2h_latex_count; + $l2h_latex_count++; + $l2h_to_latex{$text} = $count; + $l2h_to_latex[$count] = $text; + unless ($T2H_L2H_SKIP) + { + print L2H_LATEX "\\begin{rawhtml}\n"; + print L2H_LATEX "\n"; + print L2H_LATEX "\\end{rawhtml}\n"; + + print L2H_LATEX "$text\n"; + + print L2H_LATEX "\\begin{rawhtml}\n"; + print L2H_LATEX "\n"; + print L2H_LATEX "\\end{rawhtml}\n"; + } + } + return ""; +} + +# print closing into latex file and close it +sub l2h_FinishToLatex +{ + local ($reused); + + $reused = $l2h_to_latex_count - $l2h_latex_count - $l2h_cached_count; + unless ($T2H_L2H_SKIP) + { + print L2H_LATEX $l2h_latex_closing; + close(L2H_LATEX); + } + print "# l2h: finished to latex ($l2h_cached_count cached, $reused reused, $l2h_latex_count contents)\n" if ($T2H_VERBOSE); + unless ($l2h_latex_count) + { + l2h_Finish(); + return 0; + } + return 1; +} + +################################### +# Second stage: Use latex2html to generate corresponding html code and images +# +# l2h_ToHtml([$l2h_latex_file, [$l2h_html_dir]]): +# Call latex2html on $l2h_latex_file +# Put images (prefixed with $l2h_name."_") and html file(s) in $l2h_html_dir +# Return 1, on success +# 0, otherwise +# +sub l2h_ToHtml +{ + local($call, $ext, $root, $dotbug); + + if ($T2H_L2H_SKIP) + { + print "# l2h: skipping latex2html run\n" if ($T2H_VERBOSE); + return 1; + } + + # Check for dot in directory where dvips will work + if ($T2H_L2H_TMP) + { + if ($T2H_L2H_TMP =~ /\./) + { + warn "$ERROR Warning l2h: l2h_tmp dir contains a dot. Use /tmp, instead\n"; + $dotbug = 1; + } + } + else + { + if (&getcwd =~ /\./) + { + warn "$ERROR Warning l2h: current dir contains a dot. Use /tmp as l2h_tmp dir \n"; + $dotbug = 1; + } + } + # fix it, if necessary and hope that it works + $T2H_L2H_TMP = "/tmp" if ($dotbug); + + $call = $T2H_L2H_L2H; + # use init file, if specified + $call = $call . " -init_file " . $init_file if ($init_file && -f $init_file); + # set output dir + $call .= ($docu_rdir ? " -dir $docu_rdir" : " -no_subdir"); + # use l2h_tmp, if specified + $call = $call . " -tmp $T2H_L2H_TMP" if ($T2H_L2H_TMP); + # options we want to be sure of + $call = $call ." -address 0 -info 0 -split 0 -no_navigation -no_auto_link"; + $call = $call ." -prefix ${l2h_prefix} $l2h_latex_file"; + + print "# l2h: executing '$call'\n" if ($T2H_VERBOSE); + if (system($call)) + { + warn "l2h ***Error: '${call}' did not succeed\n"; + return 0; + } + else + { + print "# l2h: latex2html finished successfully\n" if ($T2H_VERBOSE); + return 1; + } +} + +# this is directly pasted over from latex2html +sub getcwd { + local($_) = `pwd`; + + die "'pwd' failed (out of memory?)\n" + unless length; + chop; + $_; +} + + +########################## +# Third stage: Extract generated contents from latex2html run +# Initialize with: l2h_InitFromHtml +# open $l2h_html_file for reading +# reads in contents into array indexed by numbers +# return 1, on success -- 0, otherwise +# Extract Html code with: l2h_FromHtml($text) +# replaces in $text all previosuly inserted comments by generated html code +# returns (possibly changed) $text +# Finish with: l2h_FinishFromHtml +# closes $l2h_html_dir/$l2h_name.".$docu_ext" + +sub l2h_InitFromHtml +{ + local($h_line, $h_content, $count, %l2h_img); + + if (! open(L2H_HTML, "<${l2h_html_file}")) + { + print "$ERROR Error l2h: Can't open ${l2h_html_file} for reading\n"; + return 0; + } + print "# l2h: use ${l2h_html_file} as html file\n" if ($T2H_VERBOSE); + + $l2h_html_count = 0; + + while ($h_line = ) + { + if ($h_line =~ /^/) + { + $count = $1; + $h_content = ""; + while ($h_line = ) + { + if ($h_line =~ /^/) + { + chomp $h_content; + chomp $h_content; + $l2h_html_count++; + $h_content = l2h_ToCache($count, $h_content); + $l2h_from_html[$count] = $h_content; + $h_content = ''; + last; + } + $h_content = $h_content.$h_line; + } + if ($hcontent) + { + print "$ERROR Warning l2h: l2h_end $l2h_name $count not found\n" + if ($T2H_VERBOSE); + close(L2H_HTML); + return 0; + } + } + } + print "# l2h: Got $l2h_html_count of $l2h_latex_count html contents\n" + if ($T2H_VERBOSE); + + close(L2H_HTML); + return 1; +} + +sub l2h_FromHtml +{ + local($text) = @_; + local($done, $to_do, $count); + + $to_do = $text; + + while ($to_do =~ /([^\000]*)([^\000]*)/) + { + $to_do = $1; + $count = $2; + $done = $3.$done; + + $done = "".$done + if ($T2H_DEBUG & $DEBUG_L2H); + + $done = &l2h_ExtractFromHtml($count) . $done; + + $done = "".$done + if ($T2H_DEBUG & $DEBUG_L2H); + } + return $to_do.$done; +} + + +sub l2h_ExtractFromHtml +{ + local($count) = @_; + + return $l2h_from_html[$count] if ($l2h_from_html[$count]); + + if ($count >= 0 && $count < $l2h_latex_count) + { + # now we are in trouble + local($l_l2h, $_); + + $l2h_extract_error++; + print "$ERROR l2h: can't extract content $count from html\n" + if ($T2H_VERBOSE); + # try simple (ordinary) substition (without l2h) + $l_l2h = $T2H_L2H; + $T2H_L2H = 0; + $_ = $l2h_to_latex{$count}; + $_ = &substitute_style($_); + &unprotect_texi; + $_ = "" . $_ + if ($T2H_DEBUG & $DEBUG_L2H); + $T2H_L2H = $l_l2h; + return $_; + } + else + { + # now we have been incorrectly called + $l2h_range_error++; + print "$ERROR l2h: Request of $count content which is out of valide range [0,$l2h_latex_count)\n"; + return "" + if ($T2H_DEBUG & $DEBUG_L2H); + return ""; + } +} + +sub l2h_FinishFromHtml +{ + if ($T2H_VERBOSE) + { + if ($l2h_extract_error + $l2h_range_error) + { + print "# l2h: finished from html ($l2h_extract_error extract and $l2h_range_error errors)\n"; + } + else + { + print "# l2h: finished from html (no errors)\n"; + } + } +} + +sub l2h_Finish +{ + l2h_StoreCache(); + if ($T2H_L2H_CLEAN) + { + print "# l2h: removing temporary files generated by l2h extension\n" + if $T2H_VERBOSE; + while (<"$docu_rdir$l2h_name"*>) + { + unlink $_; + } + } + print "# l2h: Finished\n" if $T2H_VERBOSE; + return 1; +} + +############################## +# stuff for l2h caching +# + +# I tried doing this with a dbm data base, but it did not store all +# keys/values. Hence, I did as latex2html does it +sub l2h_InitCache +{ + if (-r "$l2h_cache_file") + { + my $rdo = do "$l2h_cache_file"; + warn("$ERROR l2h Error: could not load $docu_rdir$l2h_cache_file: $@\n") + unless ($rdo); + } +} + +sub l2h_StoreCache +{ + return unless $l2h_latex_count; + + my ($key, $value); + open(FH, ">$l2h_cache_file") || return warn"$ERROR l2h Error: could not open $docu_rdir$l2h_cache_file for writing: $!\n"; + + + while (($key, $value) = each %l2h_cache) + { + # escape stuff + $key =~ s|/|\\/|g; + $key =~ s|\\\\/|\\/|g; + # weird, a \ at the end of the key results in an error + # maybe this also broke the dbm database stuff + $key =~ s|\\$|\\\\|; + $value =~ s/\|/\\\|/g; + $value =~ s/\\\\\|/\\\|/g; + $value =~ s|\\\\|\\\\\\\\|g; + print FH "\n\$l2h_cache_key = q/$key/;\n"; + print FH "\$l2h_cache{\$l2h_cache_key} = q|$value|;\n"; + } + print FH "1;"; + close(FH); +} + +# return cached html, if it exists for text, and if all pictures +# are there, as well +sub l2h_FromCache +{ + my $text = shift; + my $cached = $l2h_cache{$text}; + if ($cached) + { + while ($cached =~ m/SRC="(.*?)"/g) + { + unless (-e "$docu_rdir$1") + { + return undef; + } + } + return $cached; + } + return undef; +} + +# insert generated html into cache, move away images, +# return transformed html +$maximage = 1; +sub l2h_ToCache +{ + my $count = shift; + my $content = shift; + my @images = ($content =~ /SRC="(.*?)"/g); + my ($src, $dest); + + for $src (@images) + { + $dest = $l2h_img{$src}; + unless ($dest) + { + my $ext; + if ($src =~ /.*\.(.*)$/ && $1 ne $docu_ext) + { + $ext = $1; + } + else + { + warn "$ERROR: L2h image $src has invalid extension\n"; + next; + } + while (-e "$docu_rdir${docu_name}_$maximage.$ext") { $maximage++;} + $dest = "${docu_name}_$maximage.$ext"; + system("cp -f $docu_rdir$src $docu_rdir$dest"); + $l2h_img{$src} = $dest; + unlink "$docu_rdir$src" unless ($DEBUG & DEBUG_L2H); + } + $content =~ s/$src/$dest/g; + } + $l2h_cache{$l2h_to_latex[$count]} = $content; + return $content; +} + + +#+++############################################################################ +# # +# Pass 1: read source, handle command, variable, simple substitution # +# # +#---############################################################################ + +@lines = (); # whole document +@toc_lines = (); # table of contents +@stoc_lines = (); # table of contents +$curlevel = 0; # current level in TOC +$node = ''; # current node name +$node_next = ''; # current node next name +$node_prev = ''; # current node prev name +$node_up = ''; # current node up name +$in_table = 0; # am I inside a table +$table_type = ''; # type of table ('', 'f', 'v', 'multi') +@tables = (); # nested table support +$in_bibliography = 0; # am I inside a bibliography +$in_glossary = 0; # am I inside a glossary +$in_top = 0; # am I inside the top node +$has_top = 0; # did I see a top node? +$has_top_command = 0; # did I see @top for automatic pointers? +$in_pre = 0; # am I inside a preformatted section +$in_list = 0; # am I inside a list +$in_html = 0; # am I inside an HTML section +$first_line = 1; # is it the first line +$dont_html = 0; # don't protect HTML on this line +$deferred_ref = ''; # deferred reference for indexes +@html_stack = (); # HTML elements stack +$html_element = ''; # current HTML element +&html_reset; +%macros = (); # macros + +# init l2h +$T2H_L2H = &l2h_Init($docu_name) if ($T2H_L2H); +$T2H_L2H = &l2h_InitToLatex if ($T2H_L2H); + +# build code for simple substitutions +# the maps used (%simple_map and %things_map) MUST be aware of this +# watch out for regexps, / and escaped characters! +$subst_code = ''; +foreach (keys(%simple_map)) { + ($re = $_) =~ s/(\W)/\\$1/g; # protect regexp chars + $subst_code .= "s/\\\@$re/$simple_map{$_}/g;\n"; +} +foreach (keys(%things_map)) { + $subst_code .= "s/\\\@$_\\{\\}/$things_map{$_}/g;\n"; +} +if ($use_acc) { + # accentuated characters + foreach (keys(%accent_map)) { + if ($_ eq "`") { + $subst_code .= "s/$;3"; + } elsif ($_ eq "'") { + $subst_code .= "s/$;4"; + } else { + $subst_code .= "s/\\\@\\$_"; + } + $subst_code .= "([a-z])/&\${1}$accent_map{$_};/gi;\n"; + } +} +eval("sub simple_substitutions { $subst_code }"); + +&init_input; +INPUT_LINE: while ($_ = &next_line) { + # + # remove \input on the first lines only + # + if ($first_line) { + next if /^\\input/; + $first_line = 0; + } + # non-@ substitutions cf. texinfmt.el + # + # parse texinfo tags + # + $tag = ''; + $end_tag = ''; + if (/^\s*\@end\s+(\w+)\b/) { + $end_tag = $1; + } elsif (/^\s*\@(\w+)\b/) { + $tag = $1; + } + # + # handle @html / @end html + # + if ($in_html) { + if ($end_tag eq 'html') { + $in_html = 0; + } else { + $tag2pro{$in_html} .= $_; + } + next; + } elsif ($tag eq 'html') { + $in_html = $PROTECTTAG . ++$html_num; + push(@lines, $in_html); + next; + } + + # + # try to remove inlined comments + # syntax from tex-mode.el comment-start-skip + # + s/((^|[^\@])(\@\@)*)\@c(omment | |\{|$).*/$1/; + +# Sometimes I use @c right at the end of a line ( to suppress the line feed ) +# s/((^|[^\@])(\@\@)*)\@c(omment)?$/$1/; +# s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/; +# s/(.*)\@c{.*?}(.*)/$1$2/; +# s/(.*)\@comment{.*?}(.*)/$1$2/; +# s/^(.*)\@c /$1/; +# s/^(.*)\@comment /$1/; + + ############################################################# + # value substitution before macro expansion, so that + # it works in macro arguments + s/\@value{($VARRE)}/$value{$1}/eg; + + ############################################################# + # macro substitution + while (/\@(\w+)/g) + { + if (exists($macros->{$1})) + { + my $before = $`; + my $name = $1; + my $after = $'; + my @args; + my $args; + if ($after =~ /^\s*{(.*?[^\\])}(.*)/) + { + $args = $1; + $after = $2; + } + elsif (@{$macros->{$name}->{Args}} == 1) + { + $args = $after; + $args =~ s/^\s*//; + $args =~ s/\s*$//; + $after = ''; + } + $args =~ s|\\\\|\\|g; + $args =~ s|\\{|{|g; + $args =~ s|\\}|}|g; + if (@{$macros->{$name}->{Args}} > 1) + { + $args =~ s/(^|[^\\]),/$1$;/g ; + $args =~ s|\\,|,|g; + @args = split(/$;\s*/, $args) if (@{$macros->{$name}->{Args}} > 1); + } + else + { + $args =~ s|\\,|,|g; + @args = ($args); + } + my $macrobody = $macros->{$name}->{Body}; + for ($i=0; $i<=$#args; $i++) + { + $macrobody =~ s|\\$macros->{$name}->{Args}->[$i]\\|$args[$i]|g; + } + $macrobody =~ s|\\\\|\\|g; + $_ = $before . $macrobody . $after; + unshift @input_spool, map {$_ = $_."\n"} split(/\n/, $_); + next INPUT_LINE; + } + } # + + + # + # try to skip the line + # + if ($end_tag) { + $in_titlepage = 0 if $end_tag eq 'titlepage'; + next if $to_skip{"end $end_tag"}; + } elsif ($tag) { + $in_titlepage = 1 if $tag eq 'titlepage'; + next if $to_skip{$tag}; + last if $tag eq 'bye'; + } + if ($in_top) { + # parsing the top node + if ($tag eq 'node' || + ($sec2level{$tag} && $tag !~ /unnumbered/ && $tag !~ /heading/)) + { + # no more in top + $in_top = 0; + push(@lines, $TOPEND); + } + } + unless ($in_pre) { + s/``/\"/g; + s/''/\"/g; + s/([\w ])---([\w ])/$1--$2/g; + } + # + # analyze the tag + # + if ($tag) { + # skip lines + &skip_until($tag), next if $tag eq 'ignore'; + &skip_until($tag), next if $tag eq 'ifnothtml'; + if ($tag eq 'ifinfo') + { + &skip_until($tag), next unless $T2H_EXPAND eq 'info'; + } + if ($tag eq 'iftex') + { + &skip_until($tag), next unless $T2H_EXPAND eq 'tex'; + } + if ($tag eq 'tex') + { + # add to latex2html file + if ($T2H_EXPAND eq 'tex' && $T2H_L2H && ! $in_pre) + { + # add space to the end -- tex(i2dvi) does this, as well + push(@lines, &l2h_ToLatex(&string_until($tag) . " ")); + } + else + { + &skip_until($tag); + } + next; + } + if ($tag eq 'titlepage') + { + next; + } + # handle special tables + if ($tag =~ /^(|f|v|multi)table$/) { + $table_type = $1; + $tag = 'table'; + } + # special cases + if ($tag eq 'top' || ($tag eq 'node' && /^\@node\s+top\s*,/i)) { + $in_top = 1; + $has_top = 1; + $has_top_command = 1 if $tag eq 'top'; + @lines = (); # ignore all lines before top (title page garbage) + next; + } elsif ($tag eq 'node') { + if ($in_top) + { + $in_top = 0; + push(@lines, $TOPEND); + } + warn "$ERROR Bad node line: $_" unless $_ =~ /^\@node\s$NODESRE$/o; + # request of "Richard Y. Kim" + s/^\@node\s+//; + $_ = &protect_html($_); # if node contains '&' for instance + ($node, $node_next, $node_prev, $node_up) = split(/,/); + &normalise_node($node); + &normalise_node($node_next); + &normalise_node($node_prev); + &normalise_node($node_up); + $node =~ /\"/ ? + push @lines, &html_debug("\n", __LINE__) : + push @lines, &html_debug("\n", __LINE__); + next; + } elsif ($tag eq 'include') { + if (/^\@include\s+($FILERE)\s*$/o) { + $file = LocateIncludeFile($1); + if ($file && -e $file) { + &open($file); + print "# including $file\n" if $T2H_VERBOSE; + } else { + warn "$ERROR Can't find $1, skipping"; + } + } else { + warn "$ERROR Bad include line: $_"; + } + next; + } elsif ($tag eq 'ifclear') { + if (/^\@ifclear\s+($VARRE)\s*$/o) { + next unless defined($value{$1}); + &skip_until($tag); + } else { + warn "$ERROR Bad ifclear line: $_"; + } + next; + } elsif ($tag eq 'ifset') { + if (/^\@ifset\s+($VARRE)\s*$/o) { + next if defined($value{$1}); + &skip_until($tag); + } else { + warn "$ERROR Bad ifset line: $_"; + } + next; + } elsif ($tag eq 'menu') { + unless ($T2H_SHOW_MENU) { + &skip_until($tag); + next; + } + &html_push_if($tag); + push(@lines, &html_debug('', __LINE__)); + } elsif ($format_map{$tag}) { + $in_pre = 1 if $format_map{$tag} eq 'PRE'; + &html_push_if($format_map{$tag}); + push(@lines, &html_debug('', __LINE__)); + $in_list++ if $format_map{$tag} eq 'UL' || $format_map{$tag} eq 'OL' ; +# push(@lines, &debug("

    \n", __LINE__)) +# if $tag =~ /example/i; + # sunshine@sunshineco.com:
    bla
    looks better than + #
    \nbla
    (at least on NeXTstep browser + push(@lines, &debug("<$format_map{$tag}>" . + ($in_pre ? '' : "\n"), __LINE__)); + next; + } + elsif (exists $complex_format_map->{$tag}) + { + my $start = eval $complex_format_map->{$tag}->[0]; + if ($@) + { + print "$ERROR: eval of complex_format_map->{$tag}->[0] $complex_format_map->{$tag}->[0]: $@"; + $start = '
    '
    +	  }
    +	  $in_pre = 1 if $start =~ /
    \n", __LINE__));
    +		    &html_push_if('TABLE');
    +		} else {
    +		    push(@lines, &debug("
    \n", __LINE__)); + &html_push_if('DL'); + } + push(@lines, &html_debug('', __LINE__)); + } else { + warn "$ERROR Bad table line: $_"; + } + next; + } + elsif ($tag eq 'synindex' || $tag eq 'syncodeindex') + { + if (/^\@$tag\s+(\w+)\s+(\w+)\s*$/) + { + my $from = $1; + my $to = $2; + my $prefix_from = IndexName2Prefix($from); + my $prefix_to = IndexName2Prefix($to); + + warn("$ERROR unknown from index name $from ind syn*index line: $_"), next + unless $prefix_from; + warn("$ERROR unknown to index name $to ind syn*index line: $_"), next + unless $prefix_to; + + if ($tag eq 'syncodeindex') + { + $index_properties->{$prefix_to}->{'from_code'}->{$prefix_from} = 1; + } + else + { + $index_properties->{$prefix_to}->{'from'}->{$prefix_from} = 1; + } + } + else + { + warn "$ERROR Bad syn*index line: $_"; + } + next; + } + elsif ($tag eq 'defindex' || $tag eq 'defcodeindex') + { + if (/^\@$tag\s+(\w+)\s*$/) + { + my $name = $1; + $index_properties->{$name}->{name} = $name; + $index_properties->{$name}->{code} = 1 if $tag eq 'defcodeindex'; + } + else + { + warn "$ERROR Bad defindex line: $_"; + } + next; + } + elsif (/^\@printindex/) + { + push (@lines, "$_"); + next; + } + elsif ($tag eq 'sp') { + push(@lines, &debug("

    \n", __LINE__)); + next; + } elsif ($tag eq 'center') { + push(@lines, &debug("

    \n", __LINE__)); + s/\@center//; + } elsif ($tag eq 'setref') { + &protect_html; # if setref contains '&' for instance + if (/^\@$tag\s*{($NODERE)}\s*$/) { + $setref = $1; + $setref =~ s/\s+/ /g; # normalize + $setref =~ s/ $//; + $node2sec{$setref} = $name; + $sec2node{$name} = $setref; + $node2href{$setref} = "$docu_doc#$docid"; + } else { + warn "$ERROR Bad setref line: $_"; + } + next; + } elsif ($tag eq 'lowersections') { + local ($sec, $level); + while (($sec, $level) = each %sec2level) { + $sec2level{$sec} = $level + 1; + } + next; + } elsif ($tag eq 'raisesections') { + local ($sec, $level); + while (($sec, $level) = each %sec2level) { + $sec2level{$sec} = $level - 1; + } + next; + } + elsif ($tag eq 'macro' || $tag eq 'rmacro') + { + if (/^\@$tag\s*(\w+)\s*(.*)/) + { + my $name = $1; + my @args; + @args = split(/\s*,\s*/ , $1) + if ($2 =~ /^\s*{(.*)}\s*/); + + $macros->{$name}->{Args} = \@args; + $macros->{$name}->{Body} = ''; + while (($_ = &next_line) && $_ !~ /\@end $tag/) + { + $macros->{$name}->{Body} .= $_; + } + die "ERROR: No closing '\@end $tag' found for macro definition of '$name'\n" + unless (/\@end $tag/); + chomp $macros->{$name}->{Body}; + } + else + { + warn "$ERROR: Bad macro defintion $_" + } + next; + } + elsif ($tag eq 'unmacro') + { + delete $macros->{$1} if (/^\@unmacro\s*(\w+)/); + next; + } + elsif ($tag eq 'documentlanguage') + { + SetDocumentLanguage($1) if (!$T2H_LANG && /documentlanguage\s*(\w+)/); + } + elsif (defined($def_map{$tag})) { + if ($def_map{$tag}) { + s/^\@$tag\s+//; + $tag = $def_map{$tag}; + $_ = "\@$tag $_"; + $tag =~ s/\s.*//; + } + } elsif (defined($user_sub{$tag})) { + s/^\@$tag\s+//; + $sub = $user_sub{$tag}; + print "# user $tag = $sub, arg: $_" if $T2H_DEBUG & $DEBUG_USER; + if (defined(&$sub)) { + chop($_); + &$sub($_); + } else { + warn "$ERROR Bad user sub for $tag: $sub\n"; + } + next; + } + if (defined($def_map{$tag})) { + s/^\@$tag\s+//; + if ($tag =~ /x$/) { + # extra definition line + $tag = $`; + $is_extra = 1; + } else { + $is_extra = 0; + } + while (/\{([^\{\}]*)\}/) { + # this is a {} construct + ($before, $contents, $after) = ($`, $1, $'); + # protect spaces + $contents =~ s/\s+/$;9/g; + # restore $_ protecting {} + $_ = "$before$;7$contents$;8$after"; + } + @args = split(/\s+/, &protect_html($_)); + foreach (@args) { + s/$;9/ /g; # unprotect spaces + s/$;7/\{/g; # ... { + s/$;8/\}/g; # ... } + } + $type = shift(@args); + $type =~ s/^\{(.*)\}$/$1/; + print "# def ($tag): {$type} ", join(', ', @args), "\n" + if $T2H_DEBUG & $DEBUG_DEF; + $type .= ':'; # it's nicer like this + my $name = shift(@args); + $name =~ s/^\{(.*)\}$/$1/; + if ($is_extra) { + $_ = &debug("
    ", __LINE__); + } else { + $_ = &debug("
    \n
    ", __LINE__); + } + if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') { + $_ .= "$type $name"; + $_ .= " @args" if @args; + } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' + || $tag eq 'defcv' || $tag eq 'defop') { + $ftype = $name; + $name = shift(@args); + $name =~ s/^\{(.*)\}$/$1/; + $_ .= "$type $ftype $name"; + $_ .= " @args" if @args; + } else { + warn "$ERROR Unknown definition type: $tag\n"; + $_ .= "$type $name"; + $_ .= " @args" if @args; + } + $_ .= &debug("\n
    ", __LINE__); + $name = &unprotect_html($name); + if ($tag eq 'deffn' || $tag eq 'deftypefn') { + EnterIndexEntry('f', $name, $docu_doc, $section, \@lines); +# unshift(@input_spool, "\@findex $name\n"); + } elsif ($tag eq 'defop') { + EnterIndexEntry('f', "$name on $ftype", $docu_doc, $section, \@lines); +# unshift(@input_spool, "\@findex $name on $ftype\n"); + } elsif ($tag eq 'defvr' || $tag eq 'deftypevr' || $tag eq 'defcv') { + EnterIndexEntry('v', $name, $docu_doc, $section, \@lines); +# unshift(@input_spool, "\@vindex $name\n"); + } else { + EnterIndexEntry('t', $name, $docu_doc, $section, \@lines); +# unshift(@input_spool, "\@tindex $name\n"); + } + $dont_html = 1; + } + } elsif ($end_tag) { + if ($format_map{$end_tag}) { + $in_pre = 0 if $format_map{$end_tag} eq 'PRE'; + $in_list-- if $format_map{$end_tag} eq 'UL' || $format_map{$end_tag} eq 'OL' ; + &html_pop_if('P'); + &html_pop_if('LI'); + &html_pop_if(); + push(@lines, &debug("\n", __LINE__)); + push(@lines, &html_debug('', __LINE__)); + } + elsif (exists $complex_format_map->{$end_tag}) + { + my $end = eval $complex_format_map->{$end_tag}->[1]; + if ($@) + { + print "$ERROR: eval of complex_format_map->{$end_tag}->[1] $complex_format_map->{$end_tag}->[0]: $@"; + $end = '
    ' + } + $in_pre = 0 if $end =~ m|
    |; + push(@lines, html_debug($end, __LINE__)); + } elsif ($end_tag =~ /^(|f|v|multi)table$/) { + unless (@tables) { + warn "$ERROR \@end $end_tag without \@*table\n"; + next; + } + &html_pop_if('P'); + ($table_type, $in_table) = split($;, shift(@tables)); + unless ($1 eq $table_type) { + warn "$ERROR \@end $end_tag without matching \@$end_tag\n"; + next; + } + if ($table_type eq "multi") { + push(@lines, "
    \n"); + &html_pop_if('TR'); + } else { + push(@lines, "\n"); + &html_pop_if('DD'); + } + &html_pop_if(); + if (@tables) { + ($table_type, $in_table) = split($;, $tables[0]); + } else { + $in_table = 0; + } + } elsif (defined($def_map{$end_tag})) { + push(@lines, &debug("\n", __LINE__)); + } elsif ($end_tag eq 'menu') { + &html_pop_if(); + push(@lines, $_); # must keep it for pass 2 + } + next; + } + ############################################################# + # anchor insertion + while (/\@anchor\s*\{(.*?)\}/) + { + $_ = $`.$'; + my $anchor = $1; + $anchor = &normalise_node($anchor); + push @lines, &html_debug("\n"); + $node2href{$anchor} = "$docu_doc#$anchor"; + next INPUT_LINE if $_ =~ /^\s*$/; + } + + ############################################################# + # index entry generation, after value substitutions + if (/^\@(\w+?)index\s+/) + { + EnterIndexEntry($1, $', $docu_doc, $section, \@lines); + next; + } + # + # protect texi and HTML things + &protect_texi; + $_ = &protect_html($_) unless $dont_html; + $dont_html = 0; + # substitution (unsupported things) + s/^\@exdent\s+//g; + s/\@noindent\s+//g; + s/\@refill\s+//g; + # other substitutions + &simple_substitutions; + s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4 + # + # analyze the tag again + # + if ($tag) { + if (defined($sec2level{$tag}) && $sec2level{$tag} > 0) { + if (/^\@$tag\s+(.+)$/) { + $name = $1; + $name = &normalise_node($name); + $level = $sec2level{$tag}; + # check for index + $first_index_chapter = $node + if ($level == 1 && !$first_index_chapter && + $name =~ /index/i); + if ($in_top && /heading/){ + $T2H_HAS_TOP_HEADING = 1; + $_ = &debug("$name\n", __LINE__); + &html_push_if('body'); + print "# top heading, section $name, level $level\n" + if $T2H_DEBUG & $DEBUG_TOC; + } + else + { + unless (/^\@\w*heading/) + { + unless (/^\@unnumbered/) + { + my $number = &update_sec_num($tag, $level); + $name = $number. ' ' . $name if $T2H_NUMBER_SECTIONS; + $sec2number{$name} = $number; + $number2sec{$number} = $name; + } + if (defined($toplevel)) + { + push @lines, ($level==$toplevel ? $CHAPTEREND : $SECTIONEND); + } + else + { + # first time we see a "section" + unless ($level == 1) + { + warn "$WARN The first section found is not of level 1: $_"; + } + $toplevel = $level; + } + push(@sections, $name); + next_doc() if ($T2H_SPLIT eq 'section' || + $T2H_SPLIT && $level == $toplevel); + } + $sec_num++; + $docid = "SEC$sec_num"; + $tocid = (/^\@\w*heading/ ? undef : "TOC$sec_num"); + # check biblio and glossary + $in_bibliography = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*bibliography$/i); + $in_glossary = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*glossary$/i); + # check node + if ($node) + { + warn "$ERROR Duplicate node found: $node\n" + if ($node2sec{$node}); + } + else + { + $name .= ' ' while ($node2sec{$name}); + $node = $name; + } + $name .= ' ' while ($sec2node{$name}); + $section = $name; + $node2sec{$node} = $name; + $sec2node{$name} = $node; + $node2href{$node} = "$docu_doc#$docid"; + $node2next{$node} = $node_next; + $node2prev{$node} = $node_prev; + $node2up{$node} = $node_up; + print "# node $node, section $name, level $level\n" + if $T2H_DEBUG & $DEBUG_TOC; + + $node = ''; + $node_next = ''; + $node_prev = ''; + $node_next = ''; + if ($tocid) + { + # update TOC + while ($level > $curlevel) { + $curlevel++; + push(@toc_lines, "
      \n"); + } + while ($level < $curlevel) { + $curlevel--; + push(@toc_lines, "
    \n"); + } + $_ = &t2h_anchor($tocid, "$docu_doc#$docid", $name, 1); + $_ = &substitute_style($_); + push(@stoc_lines, "$_
    \n") if ($level == 1); + if ($T2H_NUMBER_SECTIONS) + { + push(@toc_lines, $_ . "
    \n") + } + else + { + push(@toc_lines, "
  • " . $_ ."
  • "); + } + } + else + { + push(@lines, &html_debug("\n", + __LINE__)); + } + # update DOC + push(@lines, &html_debug('', __LINE__)); + &html_reset; + $_ = " $name \n\n"; + $_ = &debug($_, __LINE__); + push(@lines, &html_debug('', __LINE__)); + } + # update DOC + foreach $line (split(/\n+/, $_)) { + push(@lines, "$line\n"); + } + next; + } else { + warn "$ERROR Bad section line: $_"; + } + } else { + # track variables + $value{$1} = Unprotect_texi($2), next if /^\@set\s+($VARRE)\s+(.*)$/o; + delete $value{$1}, next if /^\@clear\s+($VARRE)\s*$/o; + # store things + $value{'_shorttitle'} = Unprotect_texi($1), next if /^\@shorttitle\s+(.*)$/; + $value{'_setfilename'} = Unprotect_texi($1), next if /^\@setfilename\s+(.*)$/; + $value{'_settitle'} = Unprotect_texi($1), next if /^\@settitle\s+(.*)$/; + $value{'_author'} .= Unprotect_texi($1)."\n", next if /^\@author\s+(.*)$/; + $value{'_subtitle'} .= Unprotect_texi($1)."\n", next if /^\@subtitle\s+(.*)$/; + $value{'_title'} .= Unprotect_texi($1)."\n", next if /^\@title\s+(.*)$/; + + # list item + if (/^\s*\@itemx?\s+/) { + $what = $'; + $what =~ s/\s+$//; + if ($in_bibliography && $use_bibliography) { + if ($what =~ /^$BIBRE$/o) { + $id = 'BIB' . ++$bib_num; + $bib2href{$what} = "$docu_doc#$id"; + print "# found bibliography for '$what' id $id\n" + if $T2H_DEBUG & $DEBUG_BIB; + $what = &t2h_anchor($id, '', $what); + } + } elsif ($in_glossary && $T2H_USE_GLOSSARY) { + $id = 'GLOSS' . ++$gloss_num; + $entry = $what; + $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; + $gloss2href{$entry} = "$docu_doc#$id"; + print "# found glossary for '$entry' id $id\n" + if $T2H_DEBUG & $DEBUG_GLOSS; + $what = &t2h_anchor($id, '', $what); + } + elsif ($in_table && ($table_type eq 'f' || $table_type eq 'v')) + { + EnterIndexEntry($table_type, $what, $docu_doc, $section, \@lines); + } + &html_pop_if('P'); + if ($html_element eq 'DL' || $html_element eq 'DD') { + if ($things_map{$in_table} && !$what) { + # special case to allow @table @bullet for instance + push(@lines, &debug("
    $things_map{$in_table}\n", __LINE__)); + } else { + push(@lines, &debug("
    \@$in_table\{$what\}\n", __LINE__)); + } + push(@lines, "
    "); + &html_push('DD') unless $html_element eq 'DD'; + if ($table_type) { # add also an index + unshift(@input_spool, "\@${table_type}index $what\n"); + } + } elsif ($html_element eq 'TABLE') { + push(@lines, &debug("$what\n", __LINE__)); + &html_push('TR'); + } elsif ($html_element eq 'TR') { + push(@lines, &debug("\n", __LINE__)); + push(@lines, &debug("$what\n", __LINE__)); + } else { + push(@lines, &debug("
  • $what\n", __LINE__)); + &html_push('LI') unless $html_element eq 'LI'; + } + push(@lines, &html_debug('', __LINE__)); + if ($deferred_ref) { + push(@lines, &debug("$deferred_ref\n", __LINE__)); + $deferred_ref = ''; + } + next; + } elsif (/^\@tab\s+(.*)$/) { + push(@lines, "$1\n"); + next; + } + } + } + # paragraph separator + if ($_ eq "\n" && ! $in_pre) { + next if $#lines >= 0 && $lines[$#lines] eq "\n"; + if ($html_element eq 'P') { + push (@lines, &debug("

    \n", __LINE__)); + } +# else +# { +# push(@lines, "

    \n"); +# $_ = &debug("

    \n", __LINE__); +# } + elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE' || $html_element eq 'DD' || $html_element eq 'LI') + { + &html_push('P'); + push(@lines, &debug("

    \n", __LINE__)); + } + } + # otherwise + push(@lines, $_) unless $in_titlepage; + push(@lines, &debug("

  • \n", __LINE__)) if ($tag eq 'center'); +} + +# finish TOC +$level = 0; +while ($level < $curlevel) { + $curlevel--; + push(@toc_lines, "\n"); +} + +print "# end of pass 1\n" if $T2H_VERBOSE; + +SetDocumentLanguage('en') unless ($T2H_LANG); +#+++############################################################################ +# # +# Stuff related to Index generation # +# # +#---############################################################################ + +sub EnterIndexEntry +{ + my $prefix = shift; + my $key = shift; + my $docu_doc = shift; + my $section = shift; + my $lines = shift; + local $_; + + warn "$ERROR Undefined index command: $_", next + unless (exists ($index_properties->{$prefix})); + $key =~ s/\s+$//; + $_ = $key; + &protect_texi; + $key = $_; + $_ = &protect_html($_); + my $html_key = substitute_style($_); + my $id; + $key = remove_style($key); + $key = remove_things($key); + $_ = $key; + &unprotect_texi; + $key = $_; + while (exists $index->{$prefix}->{$key}) {$key .= ' '}; + if ($lines->[$#lines] =~ /^$/) + { + $id = $1; + } + else + { + $id = 'IDX' . ++$idx_num; + push(@$lines, &t2h_anchor($id, '', $T2H_INVISIBLE_MARK, !$in_pre)); + } + $index->{$prefix}->{$key}->{html_key} = $html_key; + $index->{$prefix}->{$key}->{section} = $section; + $index->{$prefix}->{$key}->{href} = "$docu_doc#$id"; + print "# found ${prefix}index for '$key' with id $id\n" + if $T2H_DEBUG & $DEBUG_INDEX; +} + +sub IndexName2Prefix +{ + my $name = shift; + my $prefix; + + for $prefix (keys %$index_properties) + { + return $prefix if ($index_properties->{$prefix}->{name} eq $name); + } + return undef; +} + +sub GetIndexEntries +{ + my $normal = shift; + my $code = shift; + my ($entries, $prefix, $key) = ({}); + + for $prefix (keys %$normal) + { + for $key (keys %{$index->{$prefix}}) + { + $entries->{$key} = {%{$index->{$prefix}->{$key}}}; + } + } + + if (defined($code)) + { + for $prefix (keys %$code) + { + unless (exists $normal->{$keys}) + { + for $key (keys %{$index->{$prefix}}) + { + $entries->{$key} = {%{$index->{$prefix}->{$key}}}; + $entries->{$key}->{html_key} = "$entries->{$key}->{html_key}"; + } + } + } + } + return $entries; +} + +sub byAlpha +{ + if ($a =~ /^[A-Za-z]/) + { + if ($b =~ /^[A-Za-z]/) + { + return lc($a) cmp lc($b); + } + else + { + return 1; + } + } + elsif ($b =~ /^[A-Za-z]/) + { + return -1; + } + else + { + return lc($a) cmp lc($b); + } +} + +sub GetIndexPages +{ + my $entries = shift; + my (@Letters, $key); + my ($EntriesByLetter, $Pages, $page) = ({}, [], {}); + my @keys = sort byAlpha keys %$entries; + + for $key (@keys) + { + push @{$EntriesByLetter->{uc(substr($key,0, 1))}} , $entries->{$key}; + } + @Letters = sort byAlpha keys %$EntriesByLetter; + + $T2H_SPLIT_INDEX = 0 unless ($T2H_SPLIT); + + unless ($T2H_SPLIT_INDEX) + { + $page->{First} = $Letters[0]; + $page->{Last} = $Letters[$#Letters]; + $page->{Letters} = \@Letters; + $page->{EntriesByLetter} = $EntriesByLetter; + push @$Pages, $page; + return $Pages; + } + + if ($T2H_SPLIT_INDEX =~ /^\d+$/) + { + my $i = 0; + my ($prev_letter, $letter); + $page->{First} = $Letters[0]; + for $letter (@Letters) + { + if ($i > $T2H_SPLIT_INDEX) + { + $page->{Last} = $prev_letter; + push @$Pages, {%$page}; + $page->{Letters} = []; + $page->{EntriesByLetter} = {}; + $page->{First} = $letter; + $i=0; + } + push @{$page->{Letters}}, $letter; + $page->{EntriesByLetter}->{$letter} = [@{$EntriesByLetter->{$letter}}]; + $i += scalar(@{$EntriesByLetter->{$letter}}); + $prev_letter = $letter; + } + $page->{Last} = $Letters[$#Letters]; + push @$Pages, {%$page}; + } + return $Pages; +} + +sub GetIndexSummary +{ + my $first_page = shift; + my $Pages = shift; + my $name = shift; + my ($page, $letter, $summary, $i, $l1, $l2, $l); + + $i = 0; + $summary = '
    Jump to:   '; + + for $page ($first_page, @$Pages) + { + for $letter (@{$page->{Letters}}) + { + $l = t2h_anchor('', "$page->{href}#${name}_$letter", "$letter", + 0, 'style="text-decoration:none"') . "\n   \n"; + + if ($letter =~ /^[A-Za-z]/) + { + $l2 .= $l; + } + else + { + $l1 .= $l; + } + } + } + $summary .= $l1 . "
    \n" if ($l1); + $summary .= $l2 . '

    '; + return $summary; +} + +sub PrintIndexPage +{ + my $lines = shift; + my $summary = shift; + my $page = shift; + my $name = shift; + + push @$lines, $summary; + + push @$lines , <

    + + + +EOT + + for $letter (@{$page->{Letters}}) + { + push @$lines, "\n"; + for $entry (@{$page->{EntriesByLetter}->{$letter}}) + { + push @$lines, + "\n"; + } + push @$lines, "\n"; + } + push @$lines, "
    Index Entry Section

    $letter
    " . + t2h_anchor('', $entry->{href}, $entry->{html_key}) . + "" . + t2h_anchor('', sec_href($entry->{section}), clean_name($entry->{section})) . + "

    "; + push @$lines, $summary; +} + +sub PrintIndex +{ + my $lines = shift; + my $name = shift; + my $section = shift; + $section = 'Top' unless $section; + my $prefix = IndexName2Prefix($name); + + warn ("$ERROR printindex: bad index name: $name"), return + unless $prefix; + + if ($index_properties->{$prefix}->{code}) + { + $index_properties->{$prefix}->{from_code}->{$prefix} = 1; + } + else + { + $index_properties->{$prefix}->{from}->{$prefix}= 1; + } + + my $Entries = GetIndexEntries($index_properties->{$prefix}->{from}, + $index_properties->{$prefix}->{from_code}); + return unless %$Entries; + + if ($T2H_IDX_SUMMARY) + { + my $key; + open(FHIDX, ">$docu_rdir$docu_name" . "_$name.idx") + || die "Can't open > $docu_rdir$docu_name" . "_$name.idx for writing: $!\n"; + print "# writing $name index summary in $docu_rdir$docu_name" . "_$name.idx...\n" if $T2H_VERBOSE; + + for $key (sort keys %$Entries) + { + print FHIDX "$key\t$Entries->{$key}->{href}\n"; + } + } + + my $Pages = GetIndexPages($Entries); + my $page; + my $first_page = shift @$Pages; + my $sec_name = $section; + # remove section number + $sec_name =~ s/.*? // if $sec_name =~ /^([A-Z]|\d+)\./; + + ($first_page->{href} = sec_href($section)) =~ s/\#.*$//; + # Update tree structure of document + if (@$Pages) + { + my $sec; + my @after; + + while (@sections && $sections[$#sections] ne $section) + { + unshift @after, pop @sections; + } + + for $page (@$Pages) + { + my $node = ($page->{First} ne $page->{Last} ? + "$sec_name: $page->{First} -- $page->{Last}" : + "$sec_name: $page->{First}"); + push @sections, $node; + $node2sec{$node} = $node; + $sec2node{$node} = $node; + $node2up{$node} = $section; + $page->{href} = next_doc(); + $page->{name} = $node; + $node2href{$node} = $page->{href}; + if ($prev_node) + { + $node2next{$prev_node} = $node; + $node2prev{$node} = $prev_node; + } + $prev_node = $node; + } + push @sections, @after; + } + + my $summary = GetIndexSummary($first_page, $Pages, $name); + PrintIndexPage($lines, $summary, $first_page, $name); + for $page (@$Pages) + { + push @$lines, ($T2H_SPLIT eq 'chapter' ? $CHAPTEREND : $SECTIONEND); + push @$lines, "

    $page->{name}

    \n"; + PrintIndexPage($lines, $summary, $page, $name); + } +} + + +#+++############################################################################ +# # +# Pass 2/3: handle style, menu, index, cross-reference # +# # +#---############################################################################ + +@lines2 = (); # whole document (2nd pass) +@lines3 = (); # whole document (3rd pass) +$in_menu = 0; # am I inside a menu + +while (@lines) { + $_ = shift(@lines); + # + # special case (protected sections) + # + if (/^$PROTECTTAG/o) { + push(@lines2, $_); + next; + } + # + # menu + # + if (/^\@menu\b/) + { + $in_menu = 1; + $in_menu_listing = 1; + push(@lines2, &debug("
    \n", __LINE__)); + next; + } + if (/^\@end\s+menu\b/) + { + if ($in_menu_listing) + { + push(@lines2, &debug("
    \n", __LINE__)); + } + else + { + push(@lines2, &debug("\n", __LINE__)); + } + $in_menu = 0; + $in_menu_listing = 0; + next; + } + if ($in_menu) + { + my ($node, $name, $descr); + if (/^\*\s+($NODERE)::/o) + { + $node = $1; + $descr = $'; + } + elsif (/^\*\s+(.+):\s+([^\t,\.\n]+)[\t,\.\n]/) + { + $name = $1; + $node = $2; + $descr = $'; + } + elsif (/^\*/) + { + warn "$ERROR Bad menu line: $_"; + } + else + { + if ($in_menu_listing) + { + $in_menu_listing = 0; + push(@lines2, &debug("\n", __LINE__)); + } + # should be like verbatim -- preseve spaces, etc + s/ /\ /g; + $_ .= "
    \n"; + push(@lines2, $_); + } + if ($node) + { + if (! $in_menu_listing) + { + $in_menu_listing = 1; + push(@lines2, &debug("\n", __LINE__)); + } + # look for continuation + while ($lines[0] =~ /^\s+\w+/) + { + $descr .= shift(@lines); + } + &menu_entry($node, $name, $descr); + } + next; + } + # + # printindex + # + PrintIndex(\@lines2, $2, $1), next + if (/^\@printindex\s+(\w+)/); + # + # simple style substitutions + # + $_ = &substitute_style($_); + # + # xref + # + while (/\@(x|px|info|)ref{([^{}]+)(}?)/) { + # note: Texinfo may accept other characters + ($type, $nodes, $full) = ($1, $2, $3); + ($before, $after) = ($`, $'); + if (! $full && $after) { + warn "$ERROR Bad xref (no ending } on line): $_"; + $_ = "$before$;0${type}ref\{$nodes$after"; + next; # while xref + } + if ($type eq 'x') { + $type = "$T2H_WORDS->{$T2H_LANG}->{'See'} "; + } elsif ($type eq 'px') { + $type = "$T2H_WORDS->{$T2H_LANG}->{'see'} "; + } elsif ($type eq 'info') { + $type = "$T2H_WORDS->{$T2H_LANG}->{'See'} Info"; + } else { + $type = ''; + } + unless ($full) { + $next = shift(@lines); + $next = &substitute_style($next); + chop($nodes); # remove final newline + if ($next =~ /\}/) { # split on 2 lines + $nodes .= " $`"; + $after = $'; + } else { + $nodes .= " $next"; + $next = shift(@lines); + $next = &substitute_style($next); + chop($nodes); + if ($next =~ /\}/) { # split on 3 lines + $nodes .= " $`"; + $after = $'; + } else { + warn "$ERROR Bad xref (no ending }): $_"; + $_ = "$before$;0xref\{$nodes$after"; + unshift(@lines, $next); + next; # while xref + } + } + } + $nodes =~ s/\s+/ /g; # remove useless spaces + @args = split(/\s*,\s*/, $nodes); + $node = $args[0]; # the node is always the first arg + $node = &normalise_node($node); + $sec = $args[2] || $args[1] || $node2sec{$node}; + $href = $node2href{$node}; + if (@args == 5) { # reference to another manual + $sec = $args[2] || $node; + $man = $args[4] || $args[3]; + $_ = "${before}${type}$T2H_WORDS->{$T2H_LANG}->{'section'} `$sec' in \@cite{$man}$after"; + } elsif ($type =~ /Info/) { # inforef + warn "$ERROR Wrong number of arguments: $_" unless @args == 3; + ($nn, $_, $in) = @args; + $_ = "${before}${type} file `$in', node `$nn'$after"; + } elsif ($sec && $href && ! $T2H_SHORT_REF) { + $_ = "${before}${type}"; + $_ .= "$T2H_WORDS->{$T2H_LANG}->{'section'} " if ${type}; + $_ .= &t2h_anchor('', $href, $sec) . $after; + } + elsif ($href) + { + $_ = "${before}${type} " . + &t2h_anchor('', $href, $args[2] || $args[1] || $node) . + $after; + } + else { + warn "$ERROR Undefined node ($node): $_"; + $_ = "$before$;0xref{$nodes}$after"; + } + } + + # replace images + s[\@image\s*{(.+?)}] + { + my @args = split (/\s*,\s*/, $1); + my $base = $args[0]; + my $image = + LocateIncludeFile("$base.png") || + LocateIncludeFile("$base.jpg") || + LocateIncludeFile("$base.gif"); + warn "$ERROR no image file for $base: $_" unless ($image && -e $image); + "\"$base\""; + ($T2H_CENTER_IMAGE ? + "
    \"$base\"
    " : + "\"$base\""); + }eg; + + # + # try to guess bibliography references or glossary terms + # + unless (/^/) { + $done .= $pre . &t2h_anchor('', $href, $what); + } else { + $done .= "$pre$what"; + } + $_ = $post; + } + $_ = $done . $_; + } + if ($T2H_USE_GLOSSARY) { + $done = ''; + while (/\b\w+\b/) { + ($pre, $what, $post) = ($`, $&, $'); + $entry = $what; + $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; + $href = $gloss2href{$entry}; + if (defined($href) && $post !~ /^[^<]*<\/A>/) { + $done .= $pre . &t2h_anchor('', $href, $what); + } else { + $done .= "$pre$what"; + } + $_ = $post; + } + $_ = $done . $_; + } + } + # otherwise + push(@lines2, $_); +} +print "# end of pass 2\n" if $T2H_VERBOSE; + +# +# split style substitutions +# +while (@lines2) { + $_ = shift(@lines2); + # + # special case (protected sections) + # + if (/^$PROTECTTAG/o) { + push(@lines3, $_); + next; + } + # + # split style substitutions + # + $old = ''; + while ($old ne $_) { + $old = $_; + if (/\@(\w+)\{/) { + ($before, $style, $after) = ($`, $1, $'); + if (defined($style_map{$style})) { + $_ = $after; + $text = ''; + $after = ''; + $failed = 1; + while (@lines2) { + if (/\}/) { + $text .= $`; + $after = $'; + $failed = 0; + last; + } else { + $text .= $_; + $_ = shift(@lines2); + } + } + if ($failed) { + die "* Bad syntax (\@$style) after: $before\n"; + } else { + $text = &apply_style($style, $text); + $_ = "$before$text$after"; + } + } + } + } + # otherwise + push(@lines3, $_); +} +print "# end of pass 3\n" if $T2H_VERBOSE; + +#+++############################################################################ +# # +# Pass 4: foot notes, final cleanup # +# # +#---############################################################################ + +@foot_lines = (); # footnotes +@doc_lines = (); # final document +$end_of_para = 0; # true if last line is

    + +while (@lines3) { + $_ = shift(@lines3); + # + # special case (protected sections) + # + if (/^$PROTECTTAG/o) { + push(@doc_lines, $_); + $end_of_para = 0; + next; + } + # + # footnotes + # + while (/\@footnote([^\{\s]+)\{/) { + ($before, $d, $after) = ($`, $1, $'); + $_ = $after; + $text = ''; + $after = ''; + $failed = 1; + while (@lines3) { + if (/\}/) { + $text .= $`; + $after = $'; + $failed = 0; + last; + } else { + $text .= $_; + $_ = shift(@lines3); + } + } + if ($failed) { + die "* Bad syntax (\@footnote) after: $before\n"; + } else { + $foot_num++; + $docid = "DOCF$foot_num"; + $footid = "FOOT$foot_num"; + $foot = "($foot_num)"; + push(@foot_lines, "

    " . &t2h_anchor($footid, "$d#$docid", $foot) . "

    \n"); + $text = "

    $text" unless $text =~ /^\s*

    /; + push(@foot_lines, "$text\n"); + $_ = $before . &t2h_anchor($docid, "$docu_foot#$footid", $foot) . $after; + } + } + # + # remove unnecessary

    + # + if (/^\s*

    \s*$/) { + next if $end_of_para++; + } else { + $end_of_para = 0; + } + # otherwise + push(@doc_lines, $_); +} + +print "# end of pass 4\n" if $T2H_VERBOSE; + +#+++############################################################################ +# # +# Pass 5: print things # +# # +#---############################################################################ + +$T2H_L2H = &l2h_FinishToLatex if ($T2H_L2H); +$T2H_L2H = &l2h_ToHtml if ($T2H_L2H); +$T2H_L2H = &l2h_InitFromHtml if ($T2H_L2H); + +# fix node2up, node2prev, node2next, if desired +if ($has_top_command) +{ + for $section (keys %sec2number) + { + $node = $sec2node{$section}; + $node2up{$node} = Sec2UpNode($section) unless $node2up{$node}; + $node2prev{$node} = Sec2PrevNode($section) unless $node2prev{$node}; + $node2next{$node} = Sec2NextNode($section) unless $node2next{$node}; + } +} + +# prepare %T2H_THISDOC +$T2H_THISDOC{fulltitle} = $value{'_title'} || $value{'_settitle'} || "Untitled Document"; +$T2H_THISDOC{title} = $value{'_settitle'} || $T2H_THISDOC{fulltitle}; +$T2H_THISDOC{author} = $value{'_author'}; +$T2H_THISDOC{subtitle} = $value{'_subtitle'}; +$T2H_THISDOC{shorttitle} = $value{'_shorttitle'}; +for $key (keys %T2H_THISDOC) +{ + $_ = &substitute_style($T2H_THISDOC{$key}); + &unprotect_texi; + s/\s*$//; + $T2H_THISDOC{$key} = $_; +} + +# if no sections, then simply print document as is +unless (@sections) +{ + print "# Writing content into $docu_top_file \n" if $T2H_VERBOSE; + open(FILE, "> $docu_top_file") + || die "$ERROR: Can't open $docu_top_file for writing: $!\n"; + + &$T2H_print_page_head(\*FILE); + $T2H_THIS_SECTION = \@doc_lines; + t2h_print_lines(\*FILE); + &$T2H_print_foot_navigation(\*FILE); + &$T2H_print_page_foot(\*FILE); + close(FILE); + goto Finish; +} + +# initialize $T2H_HREF, $T2H_NAME +%T2H_HREF = + ( + 'First' , sec_href($sections[0]), + 'Last', sec_href($sections[$#sections]), + 'About', $docu_about. '#SEC_About', + ); + +# prepare TOC, OVERVIEW, TOP +$T2H_TOC = \@toc_lines; +$T2H_OVERVIEW = \@stoc_lines; +if ($has_top) +{ + while (1) + { + $_ = shift @doc_lines; + last if /$TOPEND/; + push @$T2H_TOP, $_; + } + $T2H_HREF{'Top'} = $docu_top . '#SEC_Top'; +} +else +{ + $T2H_HREF{'Top'} = $T2H_HREF{First}; +} + +$node2href{Top} = $T2H_HREF{Top}; +$T2H_HREF{Contents} = $docu_toc.'#SEC_Contents' if @toc_lines; +$T2H_HREF{Overview} = $docu_stoc.'#SEC_OVERVIEW' if @stoc_lines; + +# settle on index +if ($T2H_INDEX_CHAPTER) +{ + $T2H_HREF{Index} = $node2href{normalise_node($T2H_INDEX_CHAPTER)}; + warn "$ERROR T2H_INDEX_CHAPTER '$T2H_INDEX_CHAPTER' not found\n" + unless $T2H_HREF{Index}; +} +if (! $T2H_HREF{Index} && $first_index_chapter) +{ + $T2H_INDEX_CHAPTER = $first_index_chapter; + $T2H_HREF{Index} = $node2href{$T2H_INDEX_CHAPTER}; +} + +print "# Using '" . clean_name($T2H_INDEX_CHAPTER) . "' as index page\n" + if ($T2H_VERBOSE && $T2H_HREF{Index}); + +%T2H_NAME = + ( + 'First', clean_name($sec2node{$sections[0]}), + 'Last', clean_name($sec2node{$sections[$#sections]}), + 'About', $T2H_WORDS->{$T2H_LANG}->{'About_Title'}, + 'Contents', $T2H_WORDS->{$T2H_LANG}->{'ToC_Title'}, + 'Overview', $T2H_WORDS->{$T2H_LANG}->{'Overview_Title'}, + 'Index' , clean_name($T2H_INDEX_CHAPTER), + 'Top', clean_name($T2H_TOP_HEADING || $T2H_THISDOC{'title'} || $T2H_THISDOC{'shorttitle'}), + ); + +############################################################################# +# print frame and frame toc file +# +if ( $T2H_FRAMES ) +{ + open(FILE, "> $docu_frame_file") + || die "$ERROR: Can't open $docu_frame_file for writing: $!\n"; + print "# Creating frame in $docu_frame_file ...\n" if $T2H_VERBOSE; + &$T2H_print_frame(\*FILE); + close(FILE); + + open(FILE, "> $docu_toc_frame_file") + || die "$ERROR: Can't open $docu_toc_frame_file for writing: $!\n"; + print "# Creating toc frame in $docu_frame_file ...\n" if $T2H_VERBOSE; + &$T2H_print_toc_frame(\*FILE); + close(FILE); +} + + +############################################################################# +# print Top +# +open(FILE, "> $docu_top_file") + || die "$ERROR: Can't open $docu_top_file for writing: $!\n"; +&$T2H_print_page_head(\*FILE) unless ($T2H_SPLIT); + +if ($has_top) +{ + print "# Creating Top in $docu_top_file ...\n" if $T2H_VERBOSE; + $T2H_THIS_SECTION = $T2H_TOP; + $T2H_HREF{This} = $T2H_HREF{Top}; + $T2H_NAME{This} = $T2H_NAME{Top}; + &$T2H_print_Top(\*FILE); +} + +close(FILE) if $T2H_SPLIT; + +############################################################################# +# Print sections +# +$T2H_NODE{Forward} = $sec2node{$sections[0]}; +$T2H_NAME{Forward} = &clean_name($sec2node{$sections[0]}); +$T2H_HREF{Forward} = sec_href($sections[0]); +$T2H_NODE{This} = 'Top'; +$T2H_NAME{This} = $T2H_NAME{Top}; +$T2H_HREF{This} = $T2H_HREF{Top}; +if ($T2H_SPLIT) +{ + print "# writing " . scalar(@sections) . + " sections in $docu_rdir$docu_name"."_[1..$doc_num]" + if $T2H_VERBOSE; + $previous = ($T2H_SPLIT eq 'chapter' ? $CHAPTEREND : $SECTIONEND); + undef $FH; + $doc_num = 0; +} +else +{ + print "# writing " . scalar(@sections) . " sections in $docu_top_file ..." + if $T2H_VERBOSE; + $FH = \*FILE; + $previous = ''; +} + +$counter = 0; +# loop through sections +while ($section = shift(@sections)) +{ + if ($T2H_SPLIT && ($T2H_SPLIT eq 'section' || $previous eq $CHAPTEREND)) + { + if ($FH) + { + #close previous page + &$T2H_print_chapter_footer($FH) if $T2H_SPLIT eq 'chapter'; + &$T2H_print_page_foot($FH); + close($FH); + undef $FH; + } + } + $T2H_NAME{Back} = $T2H_NAME{This}; + $T2H_HREF{Back} = $T2H_HREF{This}; + $T2H_NODE{Back} = $T2H_NODE{This}; + $T2H_NAME{This} = $T2H_NAME{Forward}; + $T2H_HREF{This} = $T2H_HREF{Forward}; + $T2H_NODE{This} = $T2H_NODE{Forward}; + if ($sections[0]) + { + $T2H_NODE{Forward} = $sec2node{$sections[0]}; + $T2H_NAME{Forward} = &clean_name($T2H_NODE{Forward}); + $T2H_HREF{Forward} = sec_href($sections[0]); + } + else + { + undef $T2H_HREF{Forward}, $T2H_NODE{Forward}, $T2H_NAME{Forward}; + } + + $node = $node2up{$T2H_NODE{This}}; + $T2H_HREF{Up} = $node2href{$node}; + if ($T2H_HREF{Up} eq $T2H_HREF{This} || ! $T2H_HREF{Up}) + { + $T2H_NAME{Up} = $T2H_NAME{Top}; + $T2H_HREF{Up} = $T2H_HREF{Top}; + $T2H_NODE{Up} = 'Up'; + } + else + { + $T2H_NAME{Up} = &clean_name($node); + $T2H_NODE{Up} = $node; + } + + $node = $T2H_NODE{This}; + $node = $node2prev{$node}; + $T2H_NAME{Prev} = &clean_name($node); + $T2H_HREF{Prev} = $node2href{$node}; + $T2H_NODE{Prev} = $node; + + $node = $T2H_NODE{This}; + if ($node2up{$node} && $node2up{$node} ne 'Top'&& + ($node2prev{$node} eq $T2H_NODE{Back} || ! $node2prev{$node})) + { + $node = $node2up{$node}; + while ($node && $node ne $node2up{$node} && ! $node2prev{$node}) + { + $node = $node2up{$node}; + } + $node = $node2prev{$node} + unless $node2up{$node} eq 'Top' || ! $node2up{$node}; + } + else + { + $node = $node2prev{$node}; + } + $T2H_NAME{FastBack} = &clean_name($node); + $T2H_HREF{FastBack} = $node2href{$node}; + $T2H_NODE{FastBack} = $node; + + $node = $T2H_NODE{This}; + $node = $node2next{$node}; + $T2H_NAME{Next} = &clean_name($node); + $T2H_HREF{Next} = $node2href{$node}; + $T2H_NODE{Next} = $node; + + $node = $T2H_NODE{This}; + if ($node2up{$node} && $node2up{$node} ne 'Top'&& + ($node2next{$node} eq $T2H_NODE{Forward} || ! $node2next{$node})) + { + $node = $node2up{$node}; + while ($node && $node ne $node2up{$node} && ! $node2next{$node}) + { + $node = $node2up{$node}; + } + } + $node = $node2next{$node}; + $T2H_NAME{FastForward} = &clean_name($node); + $T2H_HREF{FastForward} = $node2href{$node}; + $T2H_NODE{FastForward} = $node; + + if (! defined($FH)) + { + my $file = $T2H_HREF{This}; + $file =~ s/\#.*$//; + open(FILE, "> $docu_rdir$file") || + die "$ERROR: Can't open $docu_rdir$file for writing: $!\n"; + $FH = \*FILE; + &$T2H_print_page_head($FH); + t2h_print_label($FH); + &$T2H_print_chapter_header($FH) if $T2H_SPLIT eq 'chapter'; + } + else + { + t2h_print_label($FH); + } + + $T2H_THIS_SECTION = []; + while (@doc_lines) { + $_ = shift(@doc_lines); + last if ($_ eq $SECTIONEND || $_ eq $CHAPTEREND); + push(@$T2H_THIS_SECTION, $_); + } + $previous = $_; + &$T2H_print_section($FH); + + if ($T2H_VERBOSE) + { + $counter++; + print "." if $counter =~ /00$/; + } +} +if ($T2H_SPLIT) +{ + &$T2H_print_chapter_footer($FH) if $T2H_SPLIT eq 'chapter'; + &$T2H_print_page_foot($FH); + close($FH); +} +print "\n" if $T2H_VERBOSE; + +############################################################################# +# Print ToC, Overview, Footnotes +# +undef $T2H_HREF{Prev}; +undef $T2H_HREF{Next}; +undef $T2H_HREF{Back}; +undef $T2H_HREF{Forward}; +undef $T2H_HREF{Up}; + +if (@foot_lines) +{ + print "# writing Footnotes in $docu_foot_file...\n" if $T2H_VERBOSE; + open (FILE, "> $docu_foot_file") || die "$ERROR: Can't open $docu_foot_file for writing: $!\n" + if $T2H_SPLIT; + $T2H_HREF{This} = $docu_foot; + $T2H_NAME{This} = $T2H_WORDS->{$T2H_LANG}->{'Footnotes_Title'}; + $T2H_THIS_SECTION = \@foot_lines; + &$T2H_print_Footnotes(\*FILE); + close(FILE) if $T2H_SPLIT; +} + +if (@toc_lines) +{ + print "# writing Toc in $docu_toc_file...\n" if $T2H_VERBOSE; + open (FILE, "> $docu_toc_file") || die "$ERROR: Can't open $docu_toc_file for writing: $!\n" + if $T2H_SPLIT; + $T2H_HREF{This} = $T2H_HREF{Contents}; + $T2H_NAME{This} = $T2H_NAME{Contents}; + $T2H_THIS_SECTION = \@toc_lines; + &$T2H_print_Toc(\*FILE); + close(FILE) if $T2H_SPLIT; +} + +if (@stoc_lines) +{ + print "# writing Overview in $docu_stoc_file...\n" if $T2H_VERBOSE; + open (FILE, "> $docu_stoc_file") || die "$ERROR: Can't open $docu_stoc_file for writing: $!\n" + if $T2H_SPLIT; + + $T2H_HREF{This} = $T2H_HREF{Overview}; + $T2H_NAME{This} = $T2H_NAME{Overview}; + $T2H_THIS_SECTION = \@stoc_lines; + unshift @$T2H_THIS_SECTION, "

    \n"; + push @$T2H_THIS_SECTION, "\n
    \n"; + &$T2H_print_Overview(\*FILE); + close(FILE) if $T2H_SPLIT; +} + +if ($about_body = &$T2H_about_body()) +{ + print "# writing About in $docu_about_file...\n" if $T2H_VERBOSE; + open (FILE, "> $docu_about_file") || die "$ERROR: Can't open $docu_about_file for writing: $!\n" + if $T2H_SPLIT; + + $T2H_HREF{This} = $T2H_HREF{About}; + $T2H_NAME{This} = $T2H_NAME{About}; + $T2H_THIS_SECTION = [$about_body]; + &$T2H_print_About(\*FILE); + close(FILE) if $T2H_SPLIT; +} + +unless ($T2H_SPLIT) +{ + &$T2H_print_page_foot(\*FILE); + close (FILE); +} + +Finish: +&l2h_FinishFromHtml if ($T2H_L2H); +&l2h_Finish if($T2H_L2H); +print "# that's all folks\n" if $T2H_VERBOSE; + +exit(0); + +#+++############################################################################ +# # +# Low level functions # +# # +#---############################################################################ + +sub LocateIncludeFile +{ + my $file = shift; + my $dir; + + return $file if (-e $file && -r $file); + foreach $dir (@T2H_INCLUDE_DIRS) + { + return "$dir/$file" if (-e "$dir/$file" && -r "$dir/$file"); + } + return undef; +} + +sub clean_name +{ + local ($_); + $_ = &remove_style($_[0]); + &unprotect_texi; + return $_; +} + +sub update_sec_num { + local($name, $level) = @_; + my $ret; + + $level--; # here we start at 0 + if ($name =~ /^appendix/ || defined(@appendix_sec_num)) { + # appendix style + if (defined(@appendix_sec_num)) { + &incr_sec_num($level, @appendix_sec_num); + } else { + @appendix_sec_num = ('A', 0, 0, 0); + } + $ret = join('.', @appendix_sec_num[0..$level]); + } else { + # normal style + if (defined(@normal_sec_num)) + { + &incr_sec_num($level, @normal_sec_num); + } + else + { + @normal_sec_num = (1, 0, 0, 0); + } + $ret = join('.', @normal_sec_num[0..$level]); + } + + $ret .= "." if $level == 0; + return $ret; +} + +sub incr_sec_num { + local($level, $l); + $level = shift(@_); + $_[$level]++; + foreach $l ($level+1 .. 3) { + $_[$l] = 0; + } +} + +sub Sec2UpNode +{ + my $sec = shift; + my $num = $sec2number{$sec}; + + return '' unless $num; + return 'Top' unless $num =~ /\.\d+/; + $num =~ s/\.[^\.]*$//; + $num = $num . '.' unless $num =~ /\./; + return $sec2node{$number2sec{$num}}; +} + +sub Sec2PrevNode +{ + my $sec = shift; + my $num = $sec2number{$sec}; + my ($i, $post); + + if ($num =~ /(\w+)(\.$|$)/) + { + $num = $`; + $i = $1; + $post = $2; + if ($i eq 'A') + { + $i = $normal_sec_num[0]; + } + elsif ($i ne '1') + { + # unfortunately, -- operator is not magical + $i = chr(ord($i) + 1); + } + else + { + return ''; + } + return $sec2node{$number2sec{$num . $i . $post}} + } + return ''; +} + +sub Sec2NextNode +{ + my $sec = shift; + my $num = $sec2number{$sec}; + my $i; + + if ($num =~ /(\w+)(\.$|$)/) + { + $num = $`; + $i = $1; + $post = $2; + if ($post eq '.' && $i eq $normal_sec_num[0]) + { + $i = 'A'; + } + else + { + $i++; + } + return $sec2node{$number2sec{$num . $i . $post}} + } + return ''; +} + +sub check { + local($_, %seen, %context, $before, $match, $after); + + while (<>) { + if (/\@(\*|\.|\:|\@|\{|\})/) { + $seen{$&}++; + $context{$&} .= "> $_" if $T2H_VERBOSE; + $_ = "$`XX$'"; + redo; + } + if (/\@(\w+)/) { + ($before, $match, $after) = ($`, $&, $'); + if ($before =~ /\b[\w-]+$/ && $after =~ /^[\w-.]*\b/) { # e-mail address + $seen{'e-mail address'}++; + $context{'e-mail address'} .= "> $_" if $T2H_VERBOSE; + } else { + $seen{$match}++; + $context{$match} .= "> $_" if $T2H_VERBOSE; + } + $match =~ s/^\@/X/; + $_ = "$before$match$after"; + redo; + } + } + + foreach (sort(keys(%seen))) { + if ($T2H_VERBOSE) { + print "$_\n"; + print $context{$_}; + } else { + print "$_ ($seen{$_})\n"; + } + } +} + +sub open { + local($name) = @_; + + ++$fh_name; + if (open($fh_name, $name)) { + unshift(@fhs, $fh_name); + } else { + warn "$ERROR Can't read file $name: $!\n"; + } +} + +sub init_input { + @fhs = (); # hold the file handles to read + @input_spool = (); # spooled lines to read + $fh_name = 'FH000'; + &open($docu); +} + +sub next_line { + local($fh, $line); + + if (@input_spool) { + $line = shift(@input_spool); + return($line); + } + while (@fhs) { + $fh = $fhs[0]; + $line = <$fh>; + return($line) if $line; + close($fh); + shift(@fhs); + } + return(undef); +} + +# used in pass 1, use &next_line +sub skip_until { + local($tag) = @_; + local($_); + + while ($_ = &next_line) { + return if /^\@end\s+$tag\s*$/; + } + die "* Failed to find '$tag' after: " . $lines[$#lines]; +} + +# used in pass 1 for l2h use &next_line +sub string_until { + local($tag) = @_; + local($_, $string); + + while ($_ = &next_line) { + return $string if /^\@end\s+$tag\s*$/; +# $_ =~ s/hbox/mbox/g; + $string = $string.$_; + } + die "* Failed to find '$tag' after: " . $lines[$#lines]; +} + +# +# HTML stacking to have a better HTML output +# + +sub html_reset { + @html_stack = ('html'); + $html_element = 'body'; +} + +sub html_push { + local($what) = @_; + push(@html_stack, $html_element); + $html_element = $what; +} + +sub html_push_if { + local($what) = @_; + push(@html_stack, $html_element) + if ($html_element && $html_element ne 'P'); + $html_element = $what; +} + +sub html_pop { + $html_element = pop(@html_stack); +} + +sub html_pop_if { + local($elt); + + if (@_) { + foreach $elt (@_) { + if ($elt eq $html_element) { + $html_element = pop(@html_stack) if @html_stack; + last; + } + } + } else { + $html_element = pop(@html_stack) if @html_stack; + } +} + +sub html_debug { + local($what, $line) = @_; + if ($T2H_DEBUG & $DEBUG_HTML) + { + $what = "\n" unless $what; + return("$what") + } + return($what); +} + +# to debug the output... +sub debug { + local($what, $line) = @_; + return("$what") + if $T2H_DEBUG & $DEBUG_HTML; + return($what); +} + +sub SimpleTexi2Html +{ + local $_ = $_[0]; + &protect_texi; + &protect_html; + $_ = substitute_style($_); + $_[0] = $_; +} + +sub normalise_node { + local $_ = $_[0]; + s/\s+/ /g; + s/ $//; + s/^ //; + &protect_texi; + &protect_html; + $_ = substitute_style($_); + $_[0] = $_; +} + +sub menu_entry +{ + my ($node, $name, $descr) = @_; + my ($href, $entry); + + &normalise_node($node); + $href = $node2href{$node}; + if ($href) + { + $descr =~ s/^\s+//; + $descr =~ s/\s*$//; + $descr = SimpleTexi2Html($descr); + if ($T2H_NUMBER_SECTIONS && !$T2H_NODE_NAME_IN_MENU && $node2sec{$node}) + { + $entry = $node2sec{$node}; + $name = ''; + } + else + { + &normalise_node($name); + $entry = ($name && ($name ne $node || ! $T2H_AVOID_MENU_REDUNDANCY) + ? "$name : $node" : $node); + } + + if ($T2H_AVOID_MENU_REDUNDANCY && $descr) + { + my $clean_entry = $entry; + $clean_entry =~ s/^.*? // if ($clean_entry =~ /^([A-Z]|\d+)\.[\d\.]* /); + $clean_entry =~ s/[^\w]//g; + my $clean_descr = $descr; + $clean_descr =~ s/[^\w]//g; + $descr = '' if ($clean_entry eq $clean_descr) + } + push(@lines2,&debug('
    \n", __LINE__)); + } + elsif ($node =~ /^\(.*\)\w+/) + { + push(@lines2,&debug('\n", __LINE__)) + } + else + { + warn "$ERROR Undefined node of menu_entry ($node): $_"; + } +} + +sub do_ctrl { "^$_[0]" } + +sub do_email { + local($addr, $text) = split(/,\s*/, $_[0]); + + $text = $addr unless $text; + &t2h_anchor('', "mailto:$addr", $text); +} + +sub do_sc +{ + # l2h does this much better + return &l2h_ToLatex("{\\sc ".&unprotect_html($_[0])."}") if ($T2H_L2H); + return "\U$_[0]\E"; +} + +sub do_math +{ + return &l2h_ToLatex("\$".&unprotect_html($_[0])."\$") if ($T2H_L2H); + return "".$text.""; +} + +sub do_uref { + local($url, $text, $only_text) = split(/,\s*/, $_[0]); + + $text = $only_text if $only_text; + $text = $url unless $text; + &t2h_anchor('', $url, $text); +} + +sub do_url { &t2h_anchor('', $_[0], $_[0]) } + +sub do_acronym +{ + return '' . $_[0] . ''; +} + +sub do_accent +{ + return "&$_[0]acute;" if $_[1] eq 'H'; + return "$_[0]." if $_[1] eq 'dotaccent'; + return "$_[0]*" if $_[1] eq 'ringaccent'; + return "$_[0]".'[' if $_[1] eq 'tieaccent'; + return "$_[0]".'(' if $_[1] eq 'u'; + return "$_[0]_" if $_[1] eq 'ubaraccent'; + return ".$_[0]" if $_[1] eq 'udotaccent'; + return "$_[0]<" if $_[1] eq 'v'; + return "&$_[0]cedil;" if $_[1] eq ','; + return "$_[0]" if $_[1] eq 'dotless'; + return undef; +} + +sub apply_style { + local($texi_style, $text) = @_; + local($style); + + $style = $style_map{$texi_style}; + if (defined($style)) { # known style + if ($style =~ /^\"/) { # add quotes + $style = $'; + $text = "\`$text\'"; + } + if ($style =~ /^\&/) { # custom + $style = $'; + $text = &$style($text, $texi_style); + } elsif ($style) { # good style + $text = "<$style>$text"; + } else { # no style + } + } else { # unknown style + $text = undef; + } + return($text); +} + +# remove Texinfo styles +sub remove_style { + local($_) = @_; + 1 while(s/\@\w+{([^\{\}]+)}/$1/g); + return($_); +} + +sub remove_things +{ + local ($_) = @_; + s|\@(\w+)\{\}|$1|g; + return $_; +} + +sub substitute_style { + local($_) = @_; + local($changed, $done, $style, $text); + + &simple_substitutions; + $changed = 1; + while ($changed) { + $changed = 0; + $done = ''; + while (/\@(\w+){([^\{\}]+)}/ || /\@(,){([^\{\}]+)}/) { + $text = &apply_style($1, $2); + if ($text) { + $_ = "$`$text$'"; + $changed = 1; + } else { + $done .= "$`\@$1"; + $_ = "{$2}$'"; + } + } + $_ = $done . $_; + } + return($_); +} + +sub t2h_anchor { + local($name, $href, $text, $newline, $extra_attribs) = @_; + local($result); + + $result = " + $what =~ s/\&/\&\#38;/g; + $what =~ s/\/\&\#62;/g; + # restore anything in quotes + # this fixes my problem where I had: + # < IMG SRC="leftarrow.gif" ALT="<--" > but what if I wanted < in my ALT text ?? + # maybe byte stuffing or some other technique should be used. + $what =~ s/\"([^\&]+)\&\#60;(.*)\"/"$1<$2"/g; + $what =~ s/\"([^\&]+)\&\#62;(.*)\"/"$1>$2"/g; + $what =~ s/\"([^\&]+)\&\#38;(.*)\"/"$1&$2"/g; + # but recognize some HTML things + $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # + $what =~ s/\&\#60;A ([^\&]+)\&\#62;//g; # + $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;//g; # + return($what); +} + +sub unprotect_texi { + s/$;0/\@/go; + s/$;1/\{/go; + s/$;2/\}/go; + s/$;3/\`/go; + s/$;4/\'/go; +} + +sub Unprotect_texi +{ + local $_ = shift; + &unprotect_texi; + return($_); +} + +sub unprotect_html { + local($what) = @_; + $what =~ s/\&\#38;/\&/g; + $what =~ s/\&\#60;/\/g; + return($what); +} + +sub t2h_print_label +{ + my $fh = shift; + my $href = shift || $T2H_HREF{This}; + $href =~ s/.*#(.*)$/$1/; + print $fh qq{\n}; +} + +############################################################################## + + # These next few lines are legal in both Perl and nroff. + +.00 ; # finish .ig + +'di \" finish diversion--previous line must be blank +.nr nl 0-1 \" fake up transition to first page again +.nr % 0 \" start at page 1 +'; __END__ ############# From here on it's a standard manual page ############ +.so /usr/local/man/man1/texi2html.1 diff --git a/bash-5.1/support/xcase.c b/bash-5.1/support/xcase.c new file mode 100644 index 0000000000000000000000000000000000000000..527840db81b7c8c4406c86d178ee70835d6456fc --- /dev/null +++ b/bash-5.1/support/xcase.c @@ -0,0 +1,98 @@ +/* xcase - change uppercase characters to lowercase or vice versa. */ + +/* Copyright (C) 2008,2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#if HAVE_UNISTD_H +#include +#endif + +#include "bashansi.h" +#include + +#ifndef errno +extern int errno; +#endif + +extern int optind; + +#define LOWER 1 +#define UPPER 2 + +int +main(ac, av) +int ac; +char **av; +{ + int c, x; + int op; + FILE *inf; + + op = 0; + while ((c = getopt(ac, av, "lnu")) != EOF) { + switch (c) { + case 'n': + setbuf (stdout, (char *)NULL); + break; + case 'u': + op = UPPER; + break; + case 'l': + op = LOWER; + break; + default: + fprintf(stderr, "casemod: usage: casemod [-lnu] [file]\n"); + exit(2); + } + } + av += optind; + ac -= optind; + + if (av[0] && (av[0][0] != '-' || av[0][1])) { + inf = fopen(av[0], "r"); + if (inf == 0) { + fprintf(stderr, "casemod: %s: cannot open: %s\n", av[0], strerror(errno)); + exit(1); + } + } else + inf = stdin; + + while ((c = getc(inf)) != EOF) { + switch (op) { + case UPPER: + x = islower(c) ? toupper(c) : c; + break; + case LOWER: + x = isupper(c) ? tolower(c) : c; + break; + default: + x = c; + break; + } + putchar(x); + } + + exit(0); +} diff --git a/bash-5.1/support/xenix-link.sh b/bash-5.1/support/xenix-link.sh new file mode 100755 index 0000000000000000000000000000000000000000..4d82e009ac1219bfe166be918e3e9ffe36176c16 --- /dev/null +++ b/bash-5.1/support/xenix-link.sh @@ -0,0 +1,84 @@ +: +# link bash for Xenix under SCO Unix +# +# For xenix 2.2: +# CC="cc -xenix -lx" ./configure +# edit config.h: +# comment out the define for HAVE_DIRENT_H +# enable the define for HAVE_SYS_NDIR_H to 1 +# make +# CC="cc -xenix -lx" ./link.sh +# +# For xenix 2.3: +# CC="cc -x2.3" ./configure +# make +# CC="cc -x2.3" ./link.sh + +# Copyright (C) 1989-2002 Free Software Foundation, Inc. +# +# 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 . +# + +set -x + +rm -f bash + +if [ -z "$CC" ] +then + if [ -f /unix ] && [ ! -f /xenix ] + then + CC="cc -xenix" + else + CC=gcc + fi +fi + +try_dir=no +try_23=no +try_x=yes + +case "$CC" in +*-ldir*) try_dir=yes ;; +esac + +case "$CC" in +*-lx*) try_23=no ; try_x=yes ;; +esac + +case "$CC" in +*-x2.3*|*-l2.3*) try_23=yes ; try_dir=yes ;; +esac + +libs= +try="socket" +if [ $try_dir = yes ] ; then try="$try dir" ; fi +if [ $try_23 = yes ] ; then try="$try 2.3" ; fi +if [ $try_x = yes ] ; then try="$try x" ; fi +for name in $try +do + if [ -r "/lib/386/Slib${name}.a" ] ; then libs="$libs -l$name" ; fi +done + +$CC -o bash shell.o eval.o y.tab.o \ +general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o \ +copy_cmd.o error.o expr.o flags.o nojobs.o subst.o hashcmd.o hashlib.o \ +mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o \ +version.o alias.o array.o braces.o bracecomp.o bashhist.o bashline.o \ +getcwd.o siglist.o vprint.o oslib.o list.o stringlib.o locale.o \ +xmalloc.o builtins/libbuiltins.a \ +lib/readline/libreadline.a lib/readline/libhistory.a \ +-ltermcap lib/glob/libglob.a lib/tilde/libtilde.a lib/malloc/libmalloc.a \ +$libs + +ls -l bash diff --git a/bash-5.1/support/zecho.c b/bash-5.1/support/zecho.c new file mode 100644 index 0000000000000000000000000000000000000000..f3a4fe03e54498c13e7d3b4c1beabe8e424e3050 --- /dev/null +++ b/bash-5.1/support/zecho.c @@ -0,0 +1,43 @@ +/* zecho - bare-bones echo */ + +/* Copyright (C) 1996-2002 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include "bashansi.h" +#include + +int +main(argc, argv) +int argc; +char **argv; +{ + argv++; + + while (*argv) { + (void)printf("%s", *argv); + if (*++argv) + putchar(' '); + } + + putchar('\n'); + exit(0); +} diff --git a/bash-5.1/syntax.h b/bash-5.1/syntax.h new file mode 100644 index 0000000000000000000000000000000000000000..34f54964744a8ed76f3f92bda97d41fa8b2240e9 --- /dev/null +++ b/bash-5.1/syntax.h @@ -0,0 +1,106 @@ +/* syntax.h -- Syntax definitions for the shell */ + +/* Copyright (C) 2000, 2001, 2005, 2008, 2009-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _SYNTAX_H_ +#define _SYNTAX_H_ + +/* Defines for use by mksyntax.c */ + +#define slashify_in_quotes "\\`$\"\n" +#define slashify_in_here_document "\\`$" + +#define shell_meta_chars "()<>;&|" +#define shell_break_chars "()<>;&| \t\n" + +#define shell_quote_chars "\"`'" + +#if defined (PROCESS_SUBSTITUTION) +# define shell_exp_chars "$<>" +#else +# define shell_exp_chars "$" +#endif + +#if defined (EXTENDED_GLOB) +# define ext_glob_chars "@*+?!" +#else +# define ext_glob_chars "" +#endif +#define shell_glob_chars "*?[]^" + +/* Defines shared by mksyntax.c and the rest of the shell code. */ + +/* Values for character flags in syntax tables */ + +#define CWORD 0x0000 /* nothing special; an ordinary character */ +#define CSHMETA 0x0001 /* shell meta character */ +#define CSHBRK 0x0002 /* shell break character */ +#define CBACKQ 0x0004 /* back quote */ +#define CQUOTE 0x0008 /* shell quote character */ +#define CSPECL 0x0010 /* special character that needs quoting */ +#define CEXP 0x0020 /* shell expansion character */ +#define CBSDQUOTE 0x0040 /* characters escaped by backslash in double quotes */ +#define CBSHDOC 0x0080 /* characters escaped by backslash in here doc */ +#define CGLOB 0x0100 /* globbing characters */ +#define CXGLOB 0x0200 /* extended globbing characters */ +#define CXQUOTE 0x0400 /* cquote + backslash */ +#define CSPECVAR 0x0800 /* single-character shell variable name */ +#define CSUBSTOP 0x1000 /* values of OP for ${word[:]OPstuff} */ +#define CBLANK 0x2000 /* whitespace (blank) character */ + +/* Defines for use by the rest of the shell. */ +extern int sh_syntaxtab[]; +extern int sh_syntabsiz; + +#define shellmeta(c) (sh_syntaxtab[(unsigned char)(c)] & CSHMETA) +#define shellbreak(c) (sh_syntaxtab[(unsigned char)(c)] & CSHBRK) +#define shellquote(c) (sh_syntaxtab[(unsigned char)(c)] & CQUOTE) +#define shellxquote(c) (sh_syntaxtab[(unsigned char)(c)] & CXQUOTE) + +#define shellblank(c) (sh_syntaxtab[(unsigned char)(c)] & CBLANK) + +#define parserblank(c) ((c) == ' ' || (c) == '\t') + +#define issyntype(c, t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) != 0) +#define notsyntype(c,t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) == 0) + +#if defined (PROCESS_SUBSTITUTION) +# define shellexp(c) ((c) == '$' || (c) == '<' || (c) == '>') +#else +# define shellexp(c) ((c) == '$') +#endif + +#if defined (EXTENDED_GLOB) +# define PATTERN_CHAR(c) \ + ((c) == '@' || (c) == '*' || (c) == '+' || (c) == '?' || (c) == '!') +#else +# define PATTERN_CHAR(c) 0 +#endif + +#define GLOB_CHAR(c) \ + ((c) == '*' || (c) == '?' || (c) == '[' || (c) == ']' || (c) == '^') + +#define CTLESC '\001' +#define CTLNUL '\177' + +#if !defined (HAVE_ISBLANK) && !defined (isblank) +# define isblank(x) ((x) == ' ' || (x) == '\t') +#endif + +#endif /* _SYNTAX_H_ */ diff --git a/bash-5.1/test.c b/bash-5.1/test.c new file mode 100644 index 0000000000000000000000000000000000000000..e2fd78b359e92804f03b5852397196c4b7f3db70 --- /dev/null +++ b/bash-5.1/test.c @@ -0,0 +1,905 @@ +/* test.c - GNU test program (ksb and mjb) */ + +/* Modified to run with the GNU shell Apr 25, 1988 by bfox. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* Define PATTERN_MATCHING to get the csh-like =~ and !~ pattern-matching + binary operators. */ +/* #define PATTERN_MATCHING */ + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +#include "bashtypes.h" + +#if !defined (HAVE_LIMITS_H) && defined (HAVE_SYS_PARAM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H) +# include +#endif /* !_POSIX_VERSION */ +#include "posixstat.h" +#include "filecntl.h" +#include "stat-time.h" + +#include "bashintl.h" + +#include "shell.h" +#include "pathexp.h" +#include "test.h" +#include "builtins/common.h" + +#include + +#if !defined (STRLEN) +# define STRLEN(s) ((s)[0] ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) +#endif + +#if !defined (STREQ) +# define STREQ(a, b) ((a)[0] == (b)[0] && strcmp ((a), (b)) == 0) +#endif /* !STREQ */ +#define STRCOLLEQ(a, b) ((a)[0] == (b)[0] && strcoll ((a), (b)) == 0) + +#if !defined (R_OK) +#define R_OK 4 +#define W_OK 2 +#define X_OK 1 +#define F_OK 0 +#endif /* R_OK */ + +#define EQ 0 +#define NE 1 +#define LT 2 +#define GT 3 +#define LE 4 +#define GE 5 + +#define NT 0 +#define OT 1 +#define EF 2 + +/* The following few defines control the truth and false output of each stage. + TRUE and FALSE are what we use to compute the final output value. + SHELL_BOOLEAN is the form which returns truth or falseness in shell terms. + Default is TRUE = 1, FALSE = 0, SHELL_BOOLEAN = (!value). */ +#define TRUE 1 +#define FALSE 0 +#define SHELL_BOOLEAN(value) (!(value)) + +#define TEST_ERREXIT_STATUS 2 + +static procenv_t test_exit_buf; +static int test_error_return; +#define test_exit(val) \ + do { test_error_return = val; sh_longjmp (test_exit_buf, 1); } while (0) + +extern int sh_stat PARAMS((const char *, struct stat *)); + +static int pos; /* The offset of the current argument in ARGV. */ +static int argc; /* The number of arguments present in ARGV. */ +static char **argv; /* The argument list. */ +static int noeval; + +static void test_syntax_error PARAMS((char *, char *)) __attribute__((__noreturn__)); +static void beyond PARAMS((void)) __attribute__((__noreturn__)); +static void integer_expected_error PARAMS((char *)) __attribute__((__noreturn__)); + +static int unary_operator PARAMS((void)); +static int binary_operator PARAMS((void)); +static int two_arguments PARAMS((void)); +static int three_arguments PARAMS((void)); +static int posixtest PARAMS((void)); + +static int expr PARAMS((void)); +static int term PARAMS((void)); +static int and PARAMS((void)); +static int or PARAMS((void)); + +static int filecomp PARAMS((char *, char *, int)); +static int arithcomp PARAMS((char *, char *, int, int)); +static int patcomp PARAMS((char *, char *, int)); + +static void +test_syntax_error (format, arg) + char *format, *arg; +{ + builtin_error (format, arg); + test_exit (TEST_ERREXIT_STATUS); +} + +/* + * beyond - call when we're beyond the end of the argument list (an + * error condition) + */ +static void +beyond () +{ + test_syntax_error (_("argument expected"), (char *)NULL); +} + +/* Syntax error for when an integer argument was expected, but + something else was found. */ +static void +integer_expected_error (pch) + char *pch; +{ + test_syntax_error (_("%s: integer expression expected"), pch); +} + +/* Increment our position in the argument list. Check that we're not + past the end of the argument list. This check is suppressed if the + argument is FALSE. Made a macro for efficiency. */ +#define advance(f) do { ++pos; if (f && pos >= argc) beyond (); } while (0) +#define unary_advance() do { advance (1); ++pos; } while (0) + +/* + * expr: + * or + */ +static int +expr () +{ + if (pos >= argc) + beyond (); + + return (FALSE ^ or ()); /* Same with this. */ +} + +/* + * or: + * and + * and '-o' or + */ +static int +or () +{ + int value, v2; + + value = and (); + if (pos < argc && argv[pos][0] == '-' && argv[pos][1] == 'o' && !argv[pos][2]) + { + advance (0); + v2 = or (); + return (value || v2); + } + + return (value); +} + +/* + * and: + * term + * term '-a' and + */ +static int +and () +{ + int value, v2; + + value = term (); + if (pos < argc && argv[pos][0] == '-' && argv[pos][1] == 'a' && !argv[pos][2]) + { + advance (0); + v2 = and (); + return (value && v2); + } + return (value); +} + +/* + * term - parse a term and return 1 or 0 depending on whether the term + * evaluates to true or false, respectively. + * + * term ::= + * '-'('a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'k'|'p'|'r'|'s'|'u'|'w'|'x') filename + * '-'('G'|'L'|'O'|'S'|'N') filename + * '-t' [int] + * '-'('z'|'n') string + * '-'('v'|'R') varname + * '-o' option + * string + * string ('!='|'='|'==') string + * '-'(eq|ne|le|lt|ge|gt) + * file '-'(nt|ot|ef) file + * '(' ')' + * int ::= + * positive and negative integers + */ +static int +term () +{ + int value; + + if (pos >= argc) + beyond (); + + /* Deal with leading `not's. */ + if (argv[pos][0] == '!' && argv[pos][1] == '\0') + { + value = 0; + while (pos < argc && argv[pos][0] == '!' && argv[pos][1] == '\0') + { + advance (1); + value = 1 - value; + } + + return (value ? !term() : term()); + } + + /* A paren-bracketed argument. */ + if (argv[pos][0] == '(' && argv[pos][1] == '\0') /* ) */ + { + advance (1); + value = expr (); + if (argv[pos] == 0) /* ( */ + test_syntax_error (_("`)' expected"), (char *)NULL); + else if (argv[pos][0] != ')' || argv[pos][1]) /* ( */ + test_syntax_error (_("`)' expected, found %s"), argv[pos]); + advance (0); + return (value); + } + + /* are there enough arguments left that this could be dyadic? */ + if ((pos + 3 <= argc) && test_binop (argv[pos + 1])) + value = binary_operator (); + + /* Might be a switch type argument -- make sure we have enough arguments for + the unary operator and argument */ + else if ((pos + 2) <= argc && test_unop (argv[pos])) + value = unary_operator (); + + else + { + value = argv[pos][0] != '\0'; + advance (0); + } + + return (value); +} + +static int +stat_mtime (fn, st, ts) + char *fn; + struct stat *st; + struct timespec *ts; +{ + int r; + + r = sh_stat (fn, st); + if (r < 0) + return r; + *ts = get_stat_mtime (st); + return 0; +} + +static int +filecomp (s, t, op) + char *s, *t; + int op; +{ + struct stat st1, st2; + struct timespec ts1, ts2; + int r1, r2; + + if ((r1 = stat_mtime (s, &st1, &ts1)) < 0) + { + if (op == EF) + return (FALSE); + } + if ((r2 = stat_mtime (t, &st2, &ts2)) < 0) + { + if (op == EF) + return (FALSE); + } + + switch (op) + { + case OT: return (r1 < r2 || (r2 == 0 && timespec_cmp (ts1, ts2) < 0)); + case NT: return (r1 > r2 || (r1 == 0 && timespec_cmp (ts1, ts2) > 0)); + case EF: return (same_file (s, t, &st1, &st2)); + } + return (FALSE); +} + +static int +arithcomp (s, t, op, flags) + char *s, *t; + int op, flags; +{ + intmax_t l, r; + int expok; + + if (flags & TEST_ARITHEXP) + { + l = evalexp (s, EXP_EXPANDED, &expok); + if (expok == 0) + return (FALSE); /* should probably longjmp here */ + r = evalexp (t, EXP_EXPANDED, &expok); + if (expok == 0) + return (FALSE); /* ditto */ + } + else + { + if (legal_number (s, &l) == 0) + integer_expected_error (s); + if (legal_number (t, &r) == 0) + integer_expected_error (t); + } + + switch (op) + { + case EQ: return (l == r); + case NE: return (l != r); + case LT: return (l < r); + case GT: return (l > r); + case LE: return (l <= r); + case GE: return (l >= r); + } + + return (FALSE); +} + +static int +patcomp (string, pat, op) + char *string, *pat; + int op; +{ + int m; + + m = strmatch (pat, string, FNMATCH_EXTFLAG|FNMATCH_IGNCASE); + return ((op == EQ) ? (m == 0) : (m != 0)); +} + +int +binary_test (op, arg1, arg2, flags) + char *op, *arg1, *arg2; + int flags; +{ + int patmatch; + + patmatch = (flags & TEST_PATMATCH); + + if (op[0] == '=' && (op[1] == '\0' || (op[1] == '=' && op[2] == '\0'))) + return (patmatch ? patcomp (arg1, arg2, EQ) : STREQ (arg1, arg2)); + else if ((op[0] == '>' || op[0] == '<') && op[1] == '\0') + { +#if defined (HAVE_STRCOLL) + if (shell_compatibility_level > 40 && flags & TEST_LOCALE) + return ((op[0] == '>') ? (strcoll (arg1, arg2) > 0) : (strcoll (arg1, arg2) < 0)); + else +#endif + return ((op[0] == '>') ? (strcmp (arg1, arg2) > 0) : (strcmp (arg1, arg2) < 0)); + } + else if (op[0] == '!' && op[1] == '=' && op[2] == '\0') + return (patmatch ? patcomp (arg1, arg2, NE) : (STREQ (arg1, arg2) == 0)); + + + else if (op[2] == 't') + { + switch (op[1]) + { + case 'n': return (filecomp (arg1, arg2, NT)); /* -nt */ + case 'o': return (filecomp (arg1, arg2, OT)); /* -ot */ + case 'l': return (arithcomp (arg1, arg2, LT, flags)); /* -lt */ + case 'g': return (arithcomp (arg1, arg2, GT, flags)); /* -gt */ + } + } + else if (op[1] == 'e') + { + switch (op[2]) + { + case 'f': return (filecomp (arg1, arg2, EF)); /* -ef */ + case 'q': return (arithcomp (arg1, arg2, EQ, flags)); /* -eq */ + } + } + else if (op[2] == 'e') + { + switch (op[1]) + { + case 'n': return (arithcomp (arg1, arg2, NE, flags)); /* -ne */ + case 'g': return (arithcomp (arg1, arg2, GE, flags)); /* -ge */ + case 'l': return (arithcomp (arg1, arg2, LE, flags)); /* -le */ + } + } + + return (FALSE); /* should never get here */ +} + + +static int +binary_operator () +{ + int value; + char *w; + + w = argv[pos + 1]; + if ((w[0] == '=' && (w[1] == '\0' || (w[1] == '=' && w[2] == '\0'))) || /* =, == */ + ((w[0] == '>' || w[0] == '<') && w[1] == '\0') || /* <, > */ + (w[0] == '!' && w[1] == '=' && w[2] == '\0')) /* != */ + { + value = binary_test (w, argv[pos], argv[pos + 2], 0); + pos += 3; + return (value); + } + +#if defined (PATTERN_MATCHING) + if ((w[0] == '=' || w[0] == '!') && w[1] == '~' && w[2] == '\0') + { + value = patcomp (argv[pos], argv[pos + 2], w[0] == '=' ? EQ : NE); + pos += 3; + return (value); + } +#endif + + if ((w[0] != '-' || w[3] != '\0') || test_binop (w) == 0) + { + test_syntax_error (_("%s: binary operator expected"), w); + /* NOTREACHED */ + return (FALSE); + } + + value = binary_test (w, argv[pos], argv[pos + 2], 0); + pos += 3; + return value; +} + +static int +unary_operator () +{ + char *op; + intmax_t r; + + op = argv[pos]; + if (test_unop (op) == 0) + return (FALSE); + + /* the only tricky case is `-t', which may or may not take an argument. */ + if (op[1] == 't') + { + advance (0); + if (pos < argc) + { + if (legal_number (argv[pos], &r)) + { + advance (0); + return (unary_test (op, argv[pos - 1])); + } + else + return (FALSE); + } + else + return (unary_test (op, "1")); + } + + /* All of the unary operators take an argument, so we first call + unary_advance (), which checks to make sure that there is an + argument, and then advances pos right past it. This means that + pos - 1 is the location of the argument. */ + unary_advance (); + return (unary_test (op, argv[pos - 1])); +} + +int +unary_test (op, arg) + char *op, *arg; +{ + intmax_t r; + struct stat stat_buf; + struct timespec mtime, atime; + SHELL_VAR *v; + + switch (op[1]) + { + case 'a': /* file exists in the file system? */ + case 'e': + return (sh_stat (arg, &stat_buf) == 0); + + case 'r': /* file is readable? */ + return (sh_eaccess (arg, R_OK) == 0); + + case 'w': /* File is writeable? */ + return (sh_eaccess (arg, W_OK) == 0); + + case 'x': /* File is executable? */ + return (sh_eaccess (arg, X_OK) == 0); + + case 'O': /* File is owned by you? */ + return (sh_stat (arg, &stat_buf) == 0 && + (uid_t) current_user.euid == (uid_t) stat_buf.st_uid); + + case 'G': /* File is owned by your group? */ + return (sh_stat (arg, &stat_buf) == 0 && + (gid_t) current_user.egid == (gid_t) stat_buf.st_gid); + + case 'N': + if (sh_stat (arg, &stat_buf) < 0) + return (FALSE); + atime = get_stat_atime (&stat_buf); + mtime = get_stat_mtime (&stat_buf); + return (timespec_cmp (mtime, atime) > 0); + + case 'f': /* File is a file? */ + if (sh_stat (arg, &stat_buf) < 0) + return (FALSE); + + /* -f is true if the given file exists and is a regular file. */ +#if defined (S_IFMT) + return (S_ISREG (stat_buf.st_mode) || (stat_buf.st_mode & S_IFMT) == 0); +#else + return (S_ISREG (stat_buf.st_mode)); +#endif /* !S_IFMT */ + + case 'd': /* File is a directory? */ + return (sh_stat (arg, &stat_buf) == 0 && (S_ISDIR (stat_buf.st_mode))); + + case 's': /* File has something in it? */ + return (sh_stat (arg, &stat_buf) == 0 && stat_buf.st_size > (off_t) 0); + + case 'S': /* File is a socket? */ +#if !defined (S_ISSOCK) + return (FALSE); +#else + return (sh_stat (arg, &stat_buf) == 0 && S_ISSOCK (stat_buf.st_mode)); +#endif /* S_ISSOCK */ + + case 'c': /* File is character special? */ + return (sh_stat (arg, &stat_buf) == 0 && S_ISCHR (stat_buf.st_mode)); + + case 'b': /* File is block special? */ + return (sh_stat (arg, &stat_buf) == 0 && S_ISBLK (stat_buf.st_mode)); + + case 'p': /* File is a named pipe? */ +#ifndef S_ISFIFO + return (FALSE); +#else + return (sh_stat (arg, &stat_buf) == 0 && S_ISFIFO (stat_buf.st_mode)); +#endif /* S_ISFIFO */ + + case 'L': /* Same as -h */ + case 'h': /* File is a symbolic link? */ +#if !defined (S_ISLNK) || !defined (HAVE_LSTAT) + return (FALSE); +#else + return ((arg[0] != '\0') && + (lstat (arg, &stat_buf) == 0) && S_ISLNK (stat_buf.st_mode)); +#endif /* S_IFLNK && HAVE_LSTAT */ + + case 'u': /* File is setuid? */ + return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISUID) != 0); + + case 'g': /* File is setgid? */ + return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISGID) != 0); + + case 'k': /* File has sticky bit set? */ +#if !defined (S_ISVTX) + /* This is not Posix, and is not defined on some Posix systems. */ + return (FALSE); +#else + return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISVTX) != 0); +#endif + + case 't': /* File fd is a terminal? */ + if (legal_number (arg, &r) == 0) + return (FALSE); + return ((r == (int)r) && isatty ((int)r)); + + case 'n': /* True if arg has some length. */ + return (arg[0] != '\0'); + + case 'z': /* True if arg has no length. */ + return (arg[0] == '\0'); + + case 'o': /* True if option `arg' is set. */ + return (minus_o_option_value (arg) == 1); + + case 'v': +#if defined (ARRAY_VARS) + if (valid_array_reference (arg, 0)) + { + char *t; + int rtype, ret, flags; + + /* Let's assume that this has already been expanded once. */ + flags = assoc_expand_once ? AV_NOEXPAND : 0; + t = array_value (arg, 0, flags, &rtype, (arrayind_t *)0); + ret = t ? TRUE : FALSE; + if (rtype > 0) /* subscript is * or @ */ + free (t); + return ret; + } + else if (legal_number (arg, &r)) /* -v n == is $n set? */ + return ((r >= 0 && r <= number_of_args()) ? TRUE : FALSE); + v = find_variable (arg); + if (v && invisible_p (v) == 0 && array_p (v)) + { + char *t; + /* [[ -v foo ]] == [[ -v foo[0] ]] */ + t = array_reference (array_cell (v), 0); + return (t ? TRUE : FALSE); + } + else if (v && invisible_p (v) == 0 && assoc_p (v)) + { + char *t; + t = assoc_reference (assoc_cell (v), "0"); + return (t ? TRUE : FALSE); + } +#else + v = find_variable (arg); +#endif + return (v && invisible_p (v) == 0 && var_isset (v) ? TRUE : FALSE); + + case 'R': + v = find_variable_noref (arg); + return ((v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v)) ? TRUE : FALSE); + } + + /* We can't actually get here, but this shuts up gcc. */ + return (FALSE); +} + +/* Return TRUE if OP is one of the test command's binary operators. */ +int +test_binop (op) + char *op; +{ + if (op[0] == '=' && op[1] == '\0') + return (1); /* '=' */ + else if ((op[0] == '<' || op[0] == '>') && op[1] == '\0') /* string <, > */ + return (1); + else if ((op[0] == '=' || op[0] == '!') && op[1] == '=' && op[2] == '\0') + return (1); /* `==' and `!=' */ +#if defined (PATTERN_MATCHING) + else if (op[2] == '\0' && op[1] == '~' && (op[0] == '=' || op[0] == '!')) + return (1); +#endif + else if (op[0] != '-' || op[1] == '\0' || op[2] == '\0' || op[3] != '\0') + return (0); + else + { + if (op[2] == 't') + switch (op[1]) + { + case 'n': /* -nt */ + case 'o': /* -ot */ + case 'l': /* -lt */ + case 'g': /* -gt */ + return (1); + default: + return (0); + } + else if (op[1] == 'e') + switch (op[2]) + { + case 'q': /* -eq */ + case 'f': /* -ef */ + return (1); + default: + return (0); + } + else if (op[2] == 'e') + switch (op[1]) + { + case 'n': /* -ne */ + case 'g': /* -ge */ + case 'l': /* -le */ + return (1); + default: + return (0); + } + else + return (0); + } +} + +/* Return non-zero if OP is one of the test command's unary operators. */ +int +test_unop (op) + char *op; +{ + if (op[0] != '-' || (op[1] && op[2] != 0)) + return (0); + + switch (op[1]) + { + case 'a': case 'b': case 'c': case 'd': case 'e': + case 'f': case 'g': case 'h': case 'k': case 'n': + case 'o': case 'p': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'z': + case 'G': case 'L': case 'O': case 'S': case 'N': + case 'R': + return (1); + } + + return (0); +} + +static int +two_arguments () +{ + if (argv[pos][0] == '!' && argv[pos][1] == '\0') + return (argv[pos + 1][0] == '\0'); + else if (argv[pos][0] == '-' && argv[pos][1] && argv[pos][2] == '\0') + { + if (test_unop (argv[pos])) + return (unary_operator ()); + else + test_syntax_error (_("%s: unary operator expected"), argv[pos]); + } + else + test_syntax_error (_("%s: unary operator expected"), argv[pos]); + + return (0); +} + +#define ANDOR(s) (s[0] == '-' && (s[1] == 'a' || s[1] == 'o') && s[2] == 0) + +/* This could be augmented to handle `-t' as equivalent to `-t 1', but + POSIX requires that `-t' be given an argument. */ +#define ONE_ARG_TEST(s) ((s)[0] != '\0') + +static int +three_arguments () +{ + int value; + + if (test_binop (argv[pos+1])) + { + value = binary_operator (); + pos = argc; + } + else if (ANDOR (argv[pos+1])) + { + if (argv[pos+1][1] == 'a') + value = ONE_ARG_TEST(argv[pos]) && ONE_ARG_TEST(argv[pos+2]); + else + value = ONE_ARG_TEST(argv[pos]) || ONE_ARG_TEST(argv[pos+2]); + pos = argc; + } + else if (argv[pos][0] == '!' && argv[pos][1] == '\0') + { + advance (1); + value = !two_arguments (); + } + else if (argv[pos][0] == '(' && argv[pos+2][0] == ')') + { + value = ONE_ARG_TEST(argv[pos+1]); + pos = argc; + } + else + test_syntax_error (_("%s: binary operator expected"), argv[pos+1]); + + return (value); +} + +/* This is an implementation of a Posix.2 proposal by David Korn. */ +static int +posixtest () +{ + int value; + + switch (argc - 1) /* one extra passed in */ + { + case 0: + value = FALSE; + pos = argc; + break; + + case 1: + value = ONE_ARG_TEST(argv[1]); + pos = argc; + break; + + case 2: + value = two_arguments (); + pos = argc; + break; + + case 3: + value = three_arguments (); + break; + + case 4: + if (argv[pos][0] == '!' && argv[pos][1] == '\0') + { + advance (1); + value = !three_arguments (); + break; + } + else if (argv[pos][0] == '(' && argv[pos][1] == '\0' && argv[argc-1][0] == ')' && argv[argc-1][1] == '\0') + { + advance (1); + value = two_arguments (); + pos = argc; + break; + } + /* FALLTHROUGH */ + default: + value = expr (); + } + + return (value); +} + +/* + * [: + * '[' expr ']' + * test: + * test expr + */ +int +test_command (margc, margv) + int margc; + char **margv; +{ + int value; + int code; + + USE_VAR(margc); + + code = setjmp_nosigs (test_exit_buf); + + if (code) + return (test_error_return); + + argv = margv; + + if (margv[0] && margv[0][0] == '[' && margv[0][1] == '\0') + { + --margc; + + if (margv[margc] && (margv[margc][0] != ']' || margv[margc][1])) + test_syntax_error (_("missing `]'"), (char *)NULL); + + if (margc < 2) + test_exit (SHELL_BOOLEAN (FALSE)); + } + + argc = margc; + pos = 1; + + if (pos >= argc) + test_exit (SHELL_BOOLEAN (FALSE)); + + noeval = 0; + value = posixtest (); + + if (pos != argc) + { + if (pos < argc && argv[pos][0] == '-') + test_syntax_error (_("syntax error: `%s' unexpected"), argv[pos]); + else + test_syntax_error (_("too many arguments"), (char *)NULL); + } + + test_exit (SHELL_BOOLEAN (value)); +} diff --git a/bash-5.1/test.h b/bash-5.1/test.h new file mode 100644 index 0000000000000000000000000000000000000000..ea3c33e956f7afde7238ed3106685a76830a84c1 --- /dev/null +++ b/bash-5.1/test.h @@ -0,0 +1,39 @@ +/* test.h -- external interface to the conditional command code. */ + +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#ifndef _TEST_H_ +#define _TEST_H_ + +#include "stdc.h" + +/* Values for the flags argument to binary_test */ +#define TEST_PATMATCH 0x01 +#define TEST_ARITHEXP 0x02 +#define TEST_LOCALE 0x04 + +extern int test_unop PARAMS((char *)); +extern int test_binop PARAMS((char *)); + +extern int unary_test PARAMS((char *, char *)); +extern int binary_test PARAMS((char *, char *, char *, int)); + +extern int test_command PARAMS((int, char **)); + +#endif /* _TEST_H_ */ diff --git a/bash-5.1/tests/COPYRIGHT b/bash-5.1/tests/COPYRIGHT new file mode 100644 index 0000000000000000000000000000000000000000..43b39df61d95b9c7b5e7b5244722bc773da04767 --- /dev/null +++ b/bash-5.1/tests/COPYRIGHT @@ -0,0 +1,9 @@ +Unless otherwise stated, all files in this directory are Copyright (C) +1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003, +2004,2005,2006,2007,2008,2009,2010,2011 +Free Software Foundation, Inc. + +See the file COPYING in the bash distribution root directory for copying +and usage restrictions. + +The file ifs-posix.tests is Copyright (C) 2005 Glen Fowler. diff --git a/bash-5.1/tests/README b/bash-5.1/tests/README new file mode 100644 index 0000000000000000000000000000000000000000..b023ef60e40023dfc1d946bedded1dcbd43d10c6 --- /dev/null +++ b/bash-5.1/tests/README @@ -0,0 +1,3 @@ +Type `sh run-all'. + +Read COPYRIGHT for copyright information. diff --git a/bash-5.1/tests/alias.right b/bash-5.1/tests/alias.right new file mode 100644 index 0000000000000000000000000000000000000000..9e33036b5d8f5faaf97ae271fd153404b6c99776 --- /dev/null +++ b/bash-5.1/tests/alias.right @@ -0,0 +1,42 @@ +alias: 0 +alias: 0 +./alias.tests: line 38: qfoo: command not found +quux +bar +value +bar +value +OK +OK +OK +OK +one +two +three +four +one +two +three +four +Error: bar +ok 1 +ok 2 +text +whoops: nullalias +foo +a +a b +a b +a a b +ok 3 +ok 4 +bar +bad +0 +<|cat> +foo +bar +baz +foo +bar +baz diff --git a/bash-5.1/tests/alias.tests b/bash-5.1/tests/alias.tests new file mode 100644 index 0000000000000000000000000000000000000000..0280c16de76144182fca9fd3c0d0484d52174023 --- /dev/null +++ b/bash-5.1/tests/alias.tests @@ -0,0 +1,56 @@ +# 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 . +# +# place holder for future alias testing +shopt -s expand_aliases + +# alias/unalias tests originally in builtins.tests + +unalias -a +# this should return success, according to POSIX.2 +alias +echo alias: $? +alias foo=bar +unalias foo +# this had better return success, according to POSIX.2 +alias +echo alias: $? + +# bug in all versions through bash-2.05b + +unalias qfoo qbar qbaz quux 2>/dev/null + +alias qfoo=qbar +alias qbar=qbaz +alias qbaz=quux +alias quux=qfoo + +qfoo + +unalias qfoo qbar qbaz quux + +unalias -a + +alias foo='echo ' +alias bar=baz +alias baz=quux + +foo bar + +unalias foo bar baz + +${THIS_SH} ./alias1.sub +${THIS_SH} ./alias2.sub +${THIS_SH} ./alias3.sub +${THIS_SH} ./alias4.sub +${THIS_SH} ./alias5.sub diff --git a/bash-5.1/tests/alias1.sub b/bash-5.1/tests/alias1.sub new file mode 100644 index 0000000000000000000000000000000000000000..9a90b2e2ed1334838c38c1d7f12cba00913c584e --- /dev/null +++ b/bash-5.1/tests/alias1.sub @@ -0,0 +1,33 @@ +# 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 . +# +shopt -s expand_aliases + +alias foo=echo + +< /dev/null foo bar + +< /dev/null x=value +echo $x + +< /dev/null x=newvalue foo bar +echo $x + +# problem reported by Vincent Lefevre +alias a="echo OK >&2" +a +> /dev/null a + +${THIS_SH} -c 'shopt -s expand_aliases; alias a="echo OK >&2" + a + > /dev/null a' diff --git a/bash-5.1/tests/alias2.sub b/bash-5.1/tests/alias2.sub new file mode 100644 index 0000000000000000000000000000000000000000..e35fb76f9aa3fc52cadf157b62742a09a9dc5c47 --- /dev/null +++ b/bash-5.1/tests/alias2.sub @@ -0,0 +1,35 @@ +# 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 . +# +THIS=alias2 +FN=$TMPDIR/$THIS.script + +cat > $FN <<'EOF' +# +(echo "$1") +EOF +chmod u+x $FN + +shopt -s expand_aliases + +alias foo1='$FN one; source $FN two; source $FN three; $FN four' + +alias foo2='$FN one +source $FN two +source $FN three +$FN four' + +foo1 +foo2 + +rm -f $FN diff --git a/bash-5.1/tests/alias3.sub b/bash-5.1/tests/alias3.sub new file mode 100644 index 0000000000000000000000000000000000000000..304e926120028a3cc53a65e28762c5ae4a6586f5 --- /dev/null +++ b/bash-5.1/tests/alias3.sub @@ -0,0 +1,11 @@ +shopt -s expand_aliases +alias foo='oneword' +foo_word='foo' +# +# Fails silently to match 'foo': +# +case "$foo_word" +in + foo) ;; + *) echo bad 1;; +esac diff --git a/bash-5.1/tests/alias4.sub b/bash-5.1/tests/alias4.sub new file mode 100644 index 0000000000000000000000000000000000000000..0864a3c463e015dccbb0a621e3777ebc2f5347b5 --- /dev/null +++ b/bash-5.1/tests/alias4.sub @@ -0,0 +1,100 @@ +# 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 . +# +shopt -s expand_aliases + +# from an austin-group report +alias foo="echo 'Error:" +foo bar' + +# from some FreeBSD sh tests + +v=1 +alias a='unalias -a +v=2' +eval a +[ "$v" = 2 ] && echo ok 1 +v=1 +alias a='unalias a +v=2' +eval a +[ "$v" = 2 ] && echo ok 2 + +# make sure command doesn't ever reset anything even if it's made a keyword +unalias -a +alias command=command +alias true='echo bad' +eval 'command true' + +unalias -a +alias alias0=command +alias true='echo bad' +eval 'alias0 true' + +# make sure null aliases are ok +unalias -a +alias nullalias='' +alias foo='echo ' +foo nullalias text +unalias foo + +# aliases shouldn't be expanded in quoted strings even when the previous word +# is an alias whose expansion ends in a space +alias foo="echo 'whoops: " +foo nullalias' + +unalias -a + +# recursive alias definitions +alias echo=echo +eval echo foo + +alias echo='echo a' + +echo +echo b +eval echo b +echo $(eval echo b) + +unalias -a + +# alias expansion when in a command position after redirections +alias e=echo +eval '&2 + +alias a='printf "<%s>\n" \' +a|cat diff --git a/bash-5.1/tests/alias5.sub b/bash-5.1/tests/alias5.sub new file mode 100644 index 0000000000000000000000000000000000000000..7f8e86d50022386ccaaf43e8738aae3b5b592111 --- /dev/null +++ b/bash-5.1/tests/alias5.sub @@ -0,0 +1,28 @@ +# 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 . +# +# -c commands ending with multi-line aliases; post-bash-5.0 + +: ${THIS_SH:=./bash} + +${THIS_SH} -c "shopt -s expand_aliases &>/dev/null; +alias myalias='/bin/echo foo +echo bar +echo baz' +myalias" + +${THIS_SH} -c "shopt -s expand_aliases &>/dev/null; +alias myalias='echo foo +echo bar +echo baz' +myalias" diff --git a/bash-5.1/tests/appendop.right b/bash-5.1/tests/appendop.right new file mode 100644 index 0000000000000000000000000000000000000000..f72696b17825f2161e3728c51f10ac6d51a930e8 --- /dev/null +++ b/bash-5.1/tests/appendop.right @@ -0,0 +1,28 @@ +14 +1 2 3 4 5 6 +1 2 3 4 51 6 +145 +14 +7 +42 +1 2 3 4 12 +18 +1 2 3 4 18 +1 2 7 4 5 +1 2 7 13 5 9 +14 +9 +4 +9 +16 +./appendop.tests: line 97: x: readonly variable +declare -A foo=([two]="baz" [three]="quux" [one]="bar" ) +declare -A foo=([0]="zero" [two]="baz" [three]="quux" [one]="bar" ) +declare -A foo=([four]="four" [0]="zero" [two]="baz" [three]="quux" [one]="bar" ) +declare -ai iarr=([0]="3" [1]="2" [2]="3") +declare -ai iarr=([0]="3" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6") +25 25 +7 7 +14 +145 +145 145 diff --git a/bash-5.1/tests/appendop.tests b/bash-5.1/tests/appendop.tests new file mode 100644 index 0000000000000000000000000000000000000000..61b38fc7676f8ef6c1b94b94ed70dd48aa61565a --- /dev/null +++ b/bash-5.1/tests/appendop.tests @@ -0,0 +1,100 @@ +# 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 . +# +# basic cases +a=1 +a+=4 +echo $a + +x=(1 2 3) +x+=(4 5 6) + +echo ${x[@]} + +x[4]+=1 +echo ${x[@]} + +# trickier cases +# post-bash-4.2: bash understands += in environment assignments preceding +# command names +a+=5 printenv a +echo $a + +# if the integer flag is set, ksh93 appears to do arithmetic += and evaluate +# old value as an arithmetic expression +a= +typeset -i a +a+=7 +echo $a + +b=4+1 +typeset -i b +b+=37 + +echo $b + +unset x +x=(1 2 3 4 5) + +typeset -i x + +x[4]+=7 + +echo ${x[@]} + +unset x +typeset -i x + +x=([0]=7+11) +echo ${x[@]} + +unset x +x=(1 2 3 4 5) + +typeset -i x + +#x[4]=7+11 + +x=(1 2 3 4 [4]=7+11 ) +echo ${x[@]} + +x=( 1 2 [2]+=7 4 5 ) +echo ${x[@]} + +x+=( [3]+=9 [5]=9 ) +echo ${x[@]} + +unset a +a=1 +export a+=4 +printenv a +printenv a+ + +unset x +typeset -i x=4+5 +echo $x + +unset x +typeset x+=4 +echo $x + +typeset -i x+=5 +echo $x + +readonly x+=7 +echo $x + +x+=5 + +${THIS_SH} ./appendop1.sub +${THIS_SH} ./appendop2.sub diff --git a/bash-5.1/tests/appendop1.sub b/bash-5.1/tests/appendop1.sub new file mode 100644 index 0000000000000000000000000000000000000000..60e70140ec9ee9c4258cca25990b62f1eb569ee9 --- /dev/null +++ b/bash-5.1/tests/appendop1.sub @@ -0,0 +1,28 @@ +# 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 . +# +typeset -A foo=([one]=bar [two]=baz [three]=quux) +typeset -p foo + +foo+=zero +typeset -p foo + +foo+=([four]=four) +typeset -p foo + +typeset -ia iarr=(2 2 3) +iarr+=1 +typeset -p iarr + +iarr+=(4 5 6) +typeset -p iarr diff --git a/bash-5.1/tests/appendop2.sub b/bash-5.1/tests/appendop2.sub new file mode 100644 index 0000000000000000000000000000000000000000..e497beb35ed5c3fd36106bc74f569636bfce74f2 --- /dev/null +++ b/bash-5.1/tests/appendop2.sub @@ -0,0 +1,31 @@ +# 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 . +# +POSIXLY_CORRECT=1 +x=2 +x+=5 eval printf '"$x "' +echo "$x" + +unset x +typeset -i x=2 +x+=5 eval printf '"$x "' +echo "$x" + +a=1 +a+=4 +echo $a + +# idiotically, ksh93 makes these two cases differ (?) +a+=5 printenv a +a+=5 eval printf '"$a "' +echo $a diff --git a/bash-5.1/tests/arith-for.right b/bash-5.1/tests/arith-for.right new file mode 100644 index 0000000000000000000000000000000000000000..06127be890ed3646a134da37bcf583524d1366c3 --- /dev/null +++ b/bash-5.1/tests/arith-for.right @@ -0,0 +1,86 @@ +0 +1 +2 +0 +1 +2 +0 +1 +2 +0 +2 +4 +fx is a function +fx () +{ + i=0; + for ((1; i < 3; i++ )) + do + echo $i; + done; + for ((i=0; 1; i++ )) + do + if (( i >= 3 )); then + break; + fi; + echo $i; + done; + for ((i=0; i<3; 1)) + do + echo $i; + (( i++ )); + done; + i=0; + for ((1; 1; 1)) + do + if (( i > 2 )); then + break; + fi; + echo $i; + (( i++ )); + done; + i=0; + for ((1; 1; 1)) + do + if (( i > 2 )); then + break; + fi; + echo $i; + (( i++ )); + done +} +0 +1 +2 +0 +1 +2 +0 +1 +2 +0 +1 +2 +0 +1 +2 +bash: -c: line 1: syntax error: arithmetic expression required +bash: -c: line 1: syntax error: `(( i=0; "i < 3" ))' +2 +bash: -c: line 1: syntax error: `;' unexpected +bash: -c: line 1: syntax error: `(( i=0; i < 3; i++; 7 ))' +2 +20 +20 +12345678 987654321 012345678 987654321 012345678 987654321 012345678 987654321 012345678 987654321 012345678 +12345678 987654321 012345678 987654321 012345678 987654321 012345678 987654321 012345678 987654321 012345678 +4 +3 +2 +1 +0 +4 +3 +2 +1 +0 diff --git a/bash-5.1/tests/arith-for.tests b/bash-5.1/tests/arith-for.tests new file mode 100644 index 0000000000000000000000000000000000000000..db913da5dde8388f0405b7f9cba92468f784b369 --- /dev/null +++ b/bash-5.1/tests/arith-for.tests @@ -0,0 +1,128 @@ +# 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 . +# +fx() +{ +i=0 +for (( ; i < 3; i++ )) +do + echo $i +done + +for (( i=0; ; i++ )) +do + if (( i >= 3 )); then + break; + fi + echo $i +done + +for (( i=0; i<3; )) +do + echo $i + (( i++ )) +done + +i=0 +for (( ; ; )) +do + if (( i > 2 )); then + break; + fi + echo $i; + (( i++ )) +done + +i=0 +for ((;;)) +do + if (( i > 2 )); then + break; + fi + echo $i; + (( i++ )) +done +} + +for (( i=0; "i < 3" ; i++ )) +do + echo $i +done + +i=0 +for (( ; "i < 3"; i++ )) +do + echo $i +done + +for (( i=0; ; i++ )) +do + if (( i >= 3 )); then + break; + fi + echo $i +done + +for ((i = 0; ;i++ )) +do + echo $i + if (( i < 3 )); then + (( i++ )) + continue; + fi + break +done + +type fx +fx + +# errors +{ +${THIS_SH} -c 'for (( i=0; "i < 3" )) +do + echo $i +done' ; echo $? ; } 2>&1 | sed 's|^.*/||' +#echo $? + +{ +${THIS_SH} -c 'for (( i=0; i < 3; i++; 7 )) +do + echo $i +done' ; echo $?; } 2>&1 | sed 's|^.*/||' +#echo $? + +# one-liners added in post-bash-2.04 +for ((i=0; i < 20; i++)) do : ; done +echo $i + +for ((i=0; i < 20; i++)) { : ; } +echo $i + +# added post-bash-4.2 +for (( i = j = k = 1; i % 9 || (j *= -1, $( ((i%9)) || printf " " >&2; echo 0), k++ <= 10); i += j )) +do +printf "$i" +done + +echo + +( for (( i = j = k = 1; i % 9 || (j *= -1, $( ((i%9)) || printf " " >&2; echo 0), k++ <= 10); i += j )) +do +printf "$i" +done ) + +echo + +for (( i = 4; ;i--)) ; do echo $i; if (( $i == 0 )); then break; fi; done + +for (( i = 4;;i--)) ; do echo $i; if (( $i == 0 )); then break; fi; done diff --git a/bash-5.1/tests/arith.right b/bash-5.1/tests/arith.right new file mode 100644 index 0000000000000000000000000000000000000000..c74602e3cc1eae19f98ce6f33285c2ca602fe990 --- /dev/null +++ b/bash-5.1/tests/arith.right @@ -0,0 +1,263 @@ +163 +166 +4 +16 +8 +2 +4 +2 +2 +1 +0 +0 +0 +1 +1 +2 +-3 +-2 +1 +0 +2 +131072 +29 +33 +49 +1 +1 +0 +0 +1 +1 +1 +2 +3 +1 +58 +2 +60 +1 +256 +16 +62 +4 +29 +5 +-4 +4 +1 +32 +32 +1 +1 +32 +4 +20 +1,i+=2 +30 +1,j+=2 +20 +1,i+=2 +30 +1,j+=2 +./arith.tests: line 127: 1 ? 20 : x+=2: attempted assignment to non-variable (error token is "+=2") +20 +6 +6,5,3 +263 +255 +255 +127 +36 +40 +10 +10 +10 +10 +10 +10 +36 +36 +62 +63 +./arith.tests: line 162: 3425#56: invalid arithmetic base (error token is "3425#56") +./arith.tests: line 165: 2#: invalid integer constant (error token is "2#") +./arith.tests: line 168: 7 = 43 : attempted assignment to non-variable (error token is "= 43 ") +./arith.tests: line 169: 2#44: value too great for base (error token is "2#44") +./arith.tests: line 170: 44 / 0 : division by 0 (error token is "0 ") +./arith.tests: line 171: let: jv += $iv: syntax error: operand expected (error token is "$iv") +./arith.tests: line 172: jv += $iv : syntax error: operand expected (error token is "$iv ") +./arith.tests: line 173: let: rv = 7 + (43 * 6: missing `)' (error token is "6") +./arith.tests: line 177: 0#4: invalid number (error token is "0#4") +./arith.tests: line 178: 2#110#11: invalid number (error token is "2#110#11") +abc +def +ghi +ok +6 +1 +0 +./arith.tests: line 196: 4 + : syntax error: operand expected (error token is "+ ") +16 +./arith.tests: line 201: 4 ? : 3 + 5 : expression expected (error token is ": 3 + 5 ") +./arith.tests: line 202: 1 ? 20 : `:' expected for conditional expression (error token is "20 ") +./arith.tests: line 203: 4 ? 20 : : expression expected (error token is ": ") +9 +./arith.tests: line 209: 0 && B=42 : attempted assignment to non-variable (error token is "=42 ") +9 +./arith.tests: line 212: 1 || B=88 : attempted assignment to non-variable (error token is "=88 ") +9 +0 +9 +0 +9 +1 +9 +7 +7 +4 +32767 +32768 +131072 +2147483647 +1 +4 +4 +5 +5 +4 +3 +3 +4 +4 +7 +./arith.tests: line 260: 7-- : syntax error: operand expected (error token is "- ") +./arith.tests: line 262: --x=7 : attempted assignment to non-variable (error token is "=7 ") +./arith.tests: line 263: ++x=7 : attempted assignment to non-variable (error token is "=7 ") +./arith.tests: line 265: x++=7 : attempted assignment to non-variable (error token is "=7 ") +./arith.tests: line 266: x--=7 : attempted assignment to non-variable (error token is "=7 ") +4 +7 +-7 +7 +7 +2 +2 +./arith1.sub: line 15: 4-- : syntax error: operand expected (error token is "- ") +./arith1.sub: line 16: 4++ : syntax error: operand expected (error token is "+ ") +./arith1.sub: line 17: 4 -- : syntax error: operand expected (error token is "- ") +./arith1.sub: line 18: 4 ++ : syntax error: operand expected (error token is "+ ") +1 +2 +1 +2 +6 +3 +7 +4 +0 +3 +7 +2 +-2 +1 +./arith1.sub: line 48: ((: ++ : syntax error: operand expected (error token is "+ ") +7 +7 +./arith1.sub: line 51: ((: -- : syntax error: operand expected (error token is "- ") +7 +7 +7 +7 +1 +2 +1 +2 +1 +0 +5 +1 +6 +2 +3 +1 +4 +0 +./arith2.sub: line 46: ((: -- : syntax error: operand expected (error token is "- ") +-7 +-7 +./arith2.sub: line 50: ((: ++ : syntax error: operand expected (error token is "+ ") +7 +7 +-7 +-7 +7 +7 +1 +1 +4 +5 +-3 +2 +4 +5000 +5000 +1 +0 +0 +1 +2147483649 +0 +0 +0 +0 +0 +0 +-9223372036854775808 +-9223372036854775808 +-9223372036854775808 +-9223372036854775808 +-9223372036854775808 +-9223372036854775808 +-9223372036854775808 +-9223372036854775808 +-9223372036854775808 +-9223372036854775808 +9223372036854775805 9223372036854775806 9223372036854775807 +123 456 +123 456 +123 456 +123 456 +123 456 +123 456 +1 +1 2 3 4 5 6 7 +0 1 2 3 4 5 6 7 +0 +0, 0 +0, 1 +efg +e +efg +e +abcdefg +efg +0 +0 +0 +0 +0 +0 +0 +8 12 +./arith.tests: line 310: ((: x=9 y=41 : syntax error in expression (error token is "y=41 ") +./arith.tests: line 314: a b: syntax error in expression (error token is "b") +./arith.tests: line 315: ((: a b: syntax error in expression (error token is "b") +42 +42 +42 +42 +42 +42 +./arith.tests: line 327: 'foo' : syntax error: operand expected (error token is "'foo' ") +./arith.tests: line 331: b[c]d: syntax error in expression (error token is "d") diff --git a/bash-5.1/tests/arith.tests b/bash-5.1/tests/arith.tests new file mode 100644 index 0000000000000000000000000000000000000000..1a3501aaad98d36e956a8ddc94e38f35890a539f --- /dev/null +++ b/bash-5.1/tests/arith.tests @@ -0,0 +1,331 @@ +# 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 . +# +set +o posix +declare -i iv jv + +iv=$(( 3 + 5 * 32 )) +echo $iv +iv=iv+3 +echo $iv +iv=2 +jv=iv + +let "jv *= 2" +echo $jv +jv=$(( $jv << 2 )) +echo $jv + +let jv="$jv / 2" +echo $jv +jv="jv >> 2" +echo $jv + +iv=$((iv+ $jv)) +echo $iv +echo $((iv -= jv)) +echo $iv +echo $(( iv == jv )) +echo $(( iv != $jv )) +echo $(( iv < jv )) +echo $(( $iv > $jv )) +echo $(( iv <= $jv )) +echo $(( $iv >= jv )) + +echo $jv +echo $(( ~$jv )) +echo $(( ~1 )) +echo $(( ! 0 )) + +echo $(( jv % 2 )) +echo $(( $iv % 4 )) + +echo $(( iv <<= 16 )) +echo $(( iv %= 33 )) + +echo $(( 33 & 55 )) +echo $(( 33 | 17 )) + +echo $(( iv && $jv )) +echo $(( $iv || jv )) + +echo $(( iv && 0 )) +echo $(( iv & 0 )) +echo $(( iv && 1 )) +echo $(( iv & 1 )) + +echo $(( $jv || 0 )) +echo $(( jv | 0 )) +echo $(( jv | 1 )) +echo $(( $jv || 1 )) + +let 'iv *= jv' +echo $iv +echo $jv +let "jv += $iv" +echo $jv + +echo $(( jv /= iv )) +echo $(( jv <<= 8 )) +echo $(( jv >>= 4 )) + +echo $(( iv |= 4 )) +echo $(( iv &= 4 )) + +echo $(( iv += (jv + 9))) +echo $(( (iv + 4) % 7 )) + +# unary plus, minus +echo $(( +4 - 8 )) +echo $(( -4 + 8 )) + +# conditional expressions +echo $(( 4<5 ? 1 : 32)) +echo $(( 4>5 ? 1 : 32)) +echo $(( 4>(2+3) ? 1 : 32)) +echo $(( 4<(2+3) ? 1 : 32)) +echo $(( (2+2)<(2+3) ? 1 : 32)) +echo $(( (2+2)>(2+3) ? 1 : 32)) + +# bug in bash versions through bash-3.2 +S=105 +W=$((S>99?4:S>9?3:S>0?2:0)) +echo $W +unset W S + +# check that the unevaluated part of the ternary operator does not do +# evaluation or assignment +x=i+=2 +y=j+=2 +declare -i i=1 j=1 +echo $((1 ? 20 : (x+=2))) +echo $i,$x +echo $((0 ? (y+=2) : 30)) +echo $j,$y + +x=i+=2 +y=j+=2 +declare -i i=1 j=1 +echo $((1 ? 20 : (x+=2))) +echo $i,$x +echo $((0 ? (y+=2) : 30)) +echo $i,$y + +# check precedence of assignment vs. conditional operator +# should be an error +declare -i x=2 +y=$((1 ? 20 : x+=2)) + +# check precedence of assignment vs. conditional operator +declare -i x=2 +echo $((0 ? x+=2 : 20)) + +# associativity of assignment-operator operator +declare -i i=1 j=2 k=3 +echo $((i += j += k)) +echo $i,$j,$k + +# octal, hex +echo $(( 0x100 | 007 )) +echo $(( 0xff )) +echo $(( 16#ff )) +echo $(( 16#FF/2 )) +echo $(( 8#44 )) + +echo $(( 8 ^ 32 )) + +# other bases +echo $(( 16#a )) +echo $(( 32#a )) +echo $(( 56#a )) +echo $(( 64#a )) + +echo $(( 16#A )) +echo $(( 32#A )) +echo $(( 56#A )) +echo $(( 64#A )) + +echo $(( 64#@ )) +echo $(( 64#_ )) + +# weird bases +echo $(( 3425#56 )) + +# missing number after base now generates an error +echo $(( 2# )) + +# these should generate errors +echo $(( 7 = 43 )) +echo $(( 2#44 )) +echo $(( 44 / 0 )) +let 'jv += $iv' +echo $(( jv += \$iv )) +let 'rv = 7 + (43 * 6' + +# more errors +declare -i i +i=0#4 +i=2#110#11 + +((echo abc; echo def;); echo ghi) + +if (((4+4) + (4 + 7))); then + echo ok +fi + +(()) # make sure the null expression works OK + +a=(0 2 4 6) +echo $(( a[1] + a[2] )) +echo $(( (a[1] + a[2]) == a[3] )) +(( (a[1] + a[2]) == a[3] )) ; echo $? + +# test pushing and popping the expression stack +unset A +A="4 + " +echo $(( ( 4 + A ) + 4 )) +A="3 + 5" +echo $(( ( 4 + A ) + 4 )) + +# badly-formed conditional expressions +echo $(( 4 ? : $A )) +echo $(( 1 ? 20 )) +echo $(( 4 ? 20 : )) + +# precedence and short-circuit evaluation +B=9 +echo $B + +echo $(( 0 && B=42 )) +echo $B + +echo $(( 1 || B=88 )) +echo $B + +echo $(( 0 && (B=42) )) +echo $B + +echo $(( (${$} - $$) && (B=42) )) +echo $B + +echo $(( 1 || (B=88) )) +echo $B + +# until command with (( )) command +x=7 + +echo $x +until (( x == 4 )) +do + echo $x + x=4 +done + +echo $x + +# exponentiation +echo $(( 2**15 - 1)) +echo $(( 2**(16-1))) +echo $(( 2**16*2 )) +echo $(( 2**31-1)) +echo $(( 2**0 )) + +# {pre,post}-{inc,dec}rement and associated errors + +x=4 + +echo $x +echo $(( x++ )) +echo $x +echo $(( x-- )) +echo $x + +echo $(( --x )) +echo $x + +echo $(( ++x )) +echo $x + +echo $(( ++7 )) +echo $(( 7-- )) + +echo $(( --x=7 )) +echo $(( ++x=7 )) + +echo $(( x++=7 )) +echo $(( x--=7 )) + +echo $x + +echo $(( +7 )) +echo $(( -7 )) + +echo $(( ++7 )) +echo $(( --7 )) + +# combinations of expansions +echo $(( "`echo 1+1`" )) +echo $(( `echo 1+1` )) + +${THIS_SH} ./arith1.sub +${THIS_SH} ./arith2.sub +${THIS_SH} ./arith3.sub +${THIS_SH} ./arith4.sub + +# make sure arithmetic expansion handles ints > 2**31 - 1 using intmax_t +echo $(( 2147483645 + 4 )) + +# other tests using INTMAX_MIN and INTMAX_MAX that cause exceptions if not +# handled correctly -- problem through bash-4.2 +${THIS_SH} ./arith5.sub + +# problems with suppressing evaluation present through bash-4.2 +${THIS_SH} ./arith6.sub + +# problems with parsing arithmetic expressions containing colons that are +# part of word expansions such as substring extraction +${THIS_SH} ./arith7.sub + +# problems with evaluation of conditional expressions +${THIS_SH} ./arith8.sub + +x=4 +y=7 + +(( x=8 , y=12 )) + +echo $x $y + +# should be an error +(( x=9 y=41 )) + +# These are errors +unset b +echo $((a b)) +((a b)) + +n=42 +printf "%d\n" $n +printf "%i\n" $n +echo $(( 8#$(printf "%o\n" $n) )) +printf "%u\n" $n +echo $(( 16#$(printf "%x\n" $n) )) +echo $(( 16#$(printf "%X\n" $n) )) + +# these are errors +foo=1 +echo $(( 'foo' )) + + +# causes longjmp botches through bash-2.05b +a[b[c]d]=e diff --git a/bash-5.1/tests/arith1.sub b/bash-5.1/tests/arith1.sub new file mode 100644 index 0000000000000000000000000000000000000000..3168fcbfe193e88cb0081c676434f2f0e8168d22 --- /dev/null +++ b/bash-5.1/tests/arith1.sub @@ -0,0 +1,51 @@ +# 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 . +# +# test of redone post-increment and post-decrement code +echo $(( 4-- )) +echo $(( 4++ )) +echo $(( 4 -- )) +echo $(( 4 ++ )) + +(( array[0]++ )) +echo ${array} + +(( array[0] ++ )) +echo ${array} + +(( a++ )) +echo $a +(( a ++ )) +echo $a + +echo $(( a ++ + 4 )) +echo $a + +echo $(( a+++4 )) +echo $a + +echo $(( a---4 )) +echo $a + +echo $(( a -- + 4 )) +echo $a + +echo $(( a -- - 4 )) +echo $a + +(( ++ + 7 )) + +(( ++ )) +echo $(( +++7 )) +echo $(( ++ + 7 )) +(( -- )) diff --git a/bash-5.1/tests/arith2.sub b/bash-5.1/tests/arith2.sub new file mode 100644 index 0000000000000000000000000000000000000000..5475012bfa5e4534207cde90aa3940f9a45fc317 --- /dev/null +++ b/bash-5.1/tests/arith2.sub @@ -0,0 +1,58 @@ +# 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 . +# +echo $(( --7 )) +echo $(( ++7 )) +echo $(( -- 7 )) +echo $(( ++ 7 )) + +((++array[0] )) +echo $array +(( ++ array[0] )) +echo $array + +(( ++a )) +echo $a +(( ++ a )) +echo $a + +(( --a )) +echo $a +(( -- a )) +echo $a + +echo $(( 4 + ++a )) +echo $a + +echo $(( 4+++a )) +echo $a + +echo $(( 4---a )) +echo $a + +echo $(( 4 - -- a )) +echo $a + +(( -- )) +echo $(( ---7 )) +echo $(( -- - 7 )) + +(( ++ )) +echo $(( ++7 )) +echo $(( ++ + 7 )) + +echo $(( ++-7 )) +echo $(( ++ - 7 )) + +echo $(( +--7 )) +echo $(( -- + 7 )) diff --git a/bash-5.1/tests/arith3.sub b/bash-5.1/tests/arith3.sub new file mode 100644 index 0000000000000000000000000000000000000000..b4b182580b8ee9f04287045fccef33dd40e25def --- /dev/null +++ b/bash-5.1/tests/arith3.sub @@ -0,0 +1,60 @@ +# 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 . +# +# this depends on the sequence of random numbers from the internal LCRNG +RANDOM=42 +(( dice[RANDOM%6+1 + RANDOM%6+1]++ )) +echo ${dice[6]} + +(( ++dice[RANDOM%6+1 + RANDOM%6+1] )) +echo ${dice[7]} + +v=4 +DIND=20 + +(( dice[DIND%6 + 1]=v )) +echo ${dice[3]} +(( dice[DIND/v]+=2 )) + +RANDOM=42 + +(( dice[RANDOM%6+1 + RANDOM%6+1]+=v )) +echo ${dice[6]} + +(( dice[RANDOM%6+1 + RANDOM%6+1]-=v )) +echo ${dice[7]} + +(( dice[RANDOM%6+1 + RANDOM%6+1]+=2 )) +echo ${dice[8]} + +(( dice[RANDOM%6+1 + RANDOM%6+1]*=2 )) +echo ${dice[5]} + +unset dice1 dice2 +RANDOM=42 + +for i in {1..5000}; do ((dice1[$RANDOM%6+1 + $RANDOM%6+1]++)); done; +unset t; for i in ${dice1[@]}; do ((t+=i)); done; echo $t + +foo="${dice1[@]}" + +RANDOM=42 + +for i in {1..5000}; do ((dice2[RANDOM%6+1 + RANDOM%6+1]++)); done; +unset t; for i in ${dice2[@]}; do ((t+=i)); done; echo $t + +bar="${dice2[@]}" + +if [ "$foo" != "$bar" ]; then + echo "random sequences differ" +fi diff --git a/bash-5.1/tests/arith4.sub b/bash-5.1/tests/arith4.sub new file mode 100644 index 0000000000000000000000000000000000000000..d74defa183df8de7dfcca376dfba8e13ad9ba204 --- /dev/null +++ b/bash-5.1/tests/arith4.sub @@ -0,0 +1,10 @@ +x=$(( !!1 )) +echo $x + +x=$(( -!+1 )) +echo $x + +x=$(( +--+!!0 )) +echo $x + +echo $(( !!+-+-~0 )) diff --git a/bash-5.1/tests/arith5.sub b/bash-5.1/tests/arith5.sub new file mode 100644 index 0000000000000000000000000000000000000000..7d5c7799618c17072e6e3ff27e36783d47a26ebb --- /dev/null +++ b/bash-5.1/tests/arith5.sub @@ -0,0 +1,72 @@ +# 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 . +# +# a lot of this is technically undefined behavior due to signed 64-bit +# integer overflow, but we're testing exception handling here + +intmax_max=$((2**63 - 1)) +intmax_min1=$((2**63)) +intmax_min2=$((-2**63)) + +case $intmax_max in +9223372036854775807) ;; +*) echo "warning: your machine does not support 64-bit arithmetic using intmax_t" 2>&1 ;; +esac + +# these are actually the same +echo $(( $intmax_min1 % -1 )) +echo $(( $intmax_min2 % -1 )) + +echo $(( $intmax_max % -1 )) + +lvalue=$intmax_min1 +(( lvalue%= -1 )) +echo $lvalue + +lvalue=$intmax_min2 +(( lvalue%= -1 )) +echo $lvalue + +lvalue=$intmax_max +(( lvalue%= -1 )) +echo $lvalue + +# and these +echo $(( $intmax_min1 / -1 )) +echo $(( $intmax_min2 / -1 )) + +lvalue=$intmax_min1 +(( lvalue /= -1 )) +echo $lvalue + +lvalue=$intmax_min2 +(( lvalue /= -1 )) +echo $lvalue + +echo $(( $intmax_min1 * -1 )) +echo $(( $intmax_min2 * -1 )) + +lvalue=$intmax_min1 +(( lvalue *= -1 )) +echo $lvalue + +lvalue=$intmax_min2 +(( lvalue *= -1 )) +echo $lvalue + +echo $(( -${intmax_min1} )) +echo $(( -${intmax_min2} )) + +foo1=$(( $intmax_max - 2 )) + +eval echo \{${foo1}..${intmax_max}\} diff --git a/bash-5.1/tests/arith6.sub b/bash-5.1/tests/arith6.sub new file mode 100644 index 0000000000000000000000000000000000000000..dec8fd03f3845e96aa75f97fa1d55216661c01ed --- /dev/null +++ b/bash-5.1/tests/arith6.sub @@ -0,0 +1,65 @@ +# 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 . +# +function reorder +{ + (( x[1] < x && (x=x[1], x[1]=$x) )) + echo "${x[@]}" +} + +x=(123 456) +reorder +x=(456 123) +reorder + +unset x +unset -f reorder + +function reorder +{ + (( x[1] < x[0] && (x=x[1], x[1]=$x) )) + echo "${x[@]}" +} + +x=(123 456) +reorder +x=(456 123) +reorder + +unset x +unset -f reorder + +function reorder +{ + (( x[1] < x[0] && (x[0]=x[1], x[1]=$x) )) + echo "${x[@]}" +} + +x=(123 456) +reorder +x=(456 123) +reorder + +unset -f reorder + +n=0 ; (( (a[n]=++n)<7&&a[0])); echo "${a[@]:1}" + +n=0 a="(a[n]=++n)<7&&a[0]"; ((a[0])); echo "${a[@]:1}" + +n=0 a="(a[n]=n++)<7&&a"; ((a)); echo "${a[@]:1}" + +# bugs with lvalue caching and pointer aliasing through bash-4.2 +echo $(( a=(y[0] + y[1]) & 0xff, b=(y[2] + y[3]) & 0xff, a << 8 | b)) +echo $a, $b +((a = y[0], b = 1 )) +echo $a, $b diff --git a/bash-5.1/tests/arith7.sub b/bash-5.1/tests/arith7.sub new file mode 100644 index 0000000000000000000000000000000000000000..1b73ba7eb8b1204ea3598fef7baf2a68cb315fbd --- /dev/null +++ b/bash-5.1/tests/arith7.sub @@ -0,0 +1,11 @@ +PARAM=abcdefg + +echo ${PARAM:1 ? 4 : 2} +echo ${PARAM:1 ? 4 : 2:1} + +echo ${PARAM: 4<5 ? 4 : 2} +echo ${PARAM: 5>4 ? 4 : 2:1} + +echo ${PARAM:${OFFSET:-0}} +OFFSET=4 +echo ${PARAM:${OFFSET:-0}} diff --git a/bash-5.1/tests/arith8.sub b/bash-5.1/tests/arith8.sub new file mode 100644 index 0000000000000000000000000000000000000000..e6f1b0d9fa8e540ed741ad174514c4481c0044cc --- /dev/null +++ b/bash-5.1/tests/arith8.sub @@ -0,0 +1,50 @@ +# 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 . +# +# problems with evaluation of wrong terms in conditional expressions through +# bash-4.4 + +a=0 x="a=1" +((0?x:0)) +echo $a +unset a x + +a=0 x="a=1" +((1?0:x)) +echo $a +unset a x + +a=0 x="a=1" +((0?(x):0)) +echo $a +unset a x + +a=0 x="a=1" +((0?$x:0)) +echo $a +unset a x + +a=0 x="a=1" +((0&&x)) +echo $a +unset a x + +a=0 x="a=1" +((1||x)) +echo $a +unset a x + +a=0 +((0?arr[a=1]:0)) +echo $a +unset a diff --git a/bash-5.1/tests/array-at-star b/bash-5.1/tests/array-at-star new file mode 100755 index 0000000000000000000000000000000000000000..80f039d2c42c5a0ad2e47a912de910a8aa35ade7 --- /dev/null +++ b/bash-5.1/tests/array-at-star @@ -0,0 +1,120 @@ +# test the expansion of ${array[@]} and ${array[*]}, both quoted and +# unquoted. the expansions should be exactly analogous to the +# expansions of $@ and $* quoted and unquoted +A=(a b) + +recho "${A[*]}" + +# If IFS is null, the parameters are joined without separators +IFS='' +recho "${A[*]}" + +# If IFS is unset, the parameters are separated by spaces +unset IFS +recho "${A[*]}" + +recho "${A[@]}" +recho ${A[@]} + +IFS='/' +A=(bob 'tom dick harry' joe) +set ${A[*]} +recho $# +recho $1 +recho $2 +recho $3 + +A=(bob 'tom dick harry' joe) +set ${A[*]} +recho $# +recho $1 +recho $2 +recho $3 + +A=(bob 'tom dick harry' joe) +set ${A[@]} +recho $# +recho $1 +recho $2 +recho $3 + +A=(bob 'tom dick harry' joe) +set ${A[@]} +recho $# +recho $1 +recho $2 +recho $3 + +# according to POSIX.2, unquoted $* should expand to multiple words if +# $IFS is null, just like unquoted $@ +IFS='' +A=(bob 'tom dick harry' joe) +set "${A[*]}" +recho $# +recho $1 +recho $2 +recho $3 + +A=(bob 'tom dick harry' joe) +set ${A[*]} +recho $# +recho $1 +recho $2 +recho $3 + +A=(bob 'tom dick harry' joe) +set ${A[@]} +recho $# +recho $1 +recho $2 +recho $3 + +# if IFS is unset, the individual positional parameters are split on +# " \t\n" if $* or $@ are unquoted +unset IFS +A=(bob 'tom dick harry' joe) +set ${A[*]} +recho $# +recho $1 +recho $2 +recho $3 + +A=(bob 'tom dick harry' joe) +set ${A[@]} +recho $# +recho $1 +recho $2 +recho $3 + +# but not for "$@" or "$*" +A=(bob 'tom dick harry' joe) +set "${A[*]}" +recho $# +recho $1 +recho $2 +recho $3 + +A=(bob 'tom dick harry' joe) +set "${A[@]}" +recho $# +recho $1 +recho $2 +recho $3 + +# these should both expand the value of A to multiple words +A=(a b c d e) +IFS="" +recho ${A[@]} +recho "${A[@]}" + +# this example is straight from the POSIX.2 rationale and adapted to arrays +A=(foo bar bam) + +recho "${A[@]}" +recho "${A[*]}" + +unset IFS + +recho "${A[@]}" +recho ${A[@]} +recho "${A[*]}" diff --git a/bash-5.1/tests/array.right b/bash-5.1/tests/array.right new file mode 100644 index 0000000000000000000000000000000000000000..2d1c51db57a09fb20e65dc2dc1d2103451571159 --- /dev/null +++ b/bash-5.1/tests/array.right @@ -0,0 +1,765 @@ + +./array.tests: line 28: syntax error near unexpected token `&' +./array.tests: line 28: `test=(first & second)' +1 +abcde +abcde +abcde bdef +abcde bdef +declare -a BASH_ARGC=() +declare -a BASH_ARGV=() +declare -a BASH_LINENO=([0]="0") +declare -a BASH_SOURCE=([0]="./array.tests") +declare -a DIRSTACK=() +declare -a FUNCNAME +declare -a a=([0]="abcde" [1]="" [2]="bdef") +declare -a b +declare -ar c +abcde bdef +abcde bdef +abcde +abcde +abcde + +bdef +hello world +11 +3 +bdef hello world test expression test 2 +./array.tests: line 92: readonly: `a[5]': not a valid identifier +declare -ar a=([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2") +declare -ar c +declare -ar a=([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2") +declare -ar c +readonly -a a=([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2") +readonly -a c +a test +declare -a BASH_ARGC=() +declare -a BASH_ARGV=() +declare -a BASH_LINENO=([0]="0") +declare -a BASH_SOURCE=([0]="./array.tests") +declare -a DIRSTACK=() +declare -a FUNCNAME +declare -ar a=([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2") +declare -a b=([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd") +declare -ar c +declare -a d=([1]="" [2]="bdef" [5]="hello world" [6]="test" [9]="ninth element") +declare -a e=([0]="test") +declare -a f=([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element") +./array.tests: line 116: a: readonly variable +./array.tests: line 118: b[]: bad array subscript +./array.tests: line 119: b[*]: bad array subscript +this +./array.tests: line 122: c[-2]: bad array subscript +./array.tests: line 123: c: bad array subscript + +./array.tests: line 125: d[7]: cannot assign list to array member +./array.tests: line 127: []=abcde: bad array subscript +./array.tests: line 127: [*]=last: cannot assign to non-numeric index +./array.tests: line 127: [-65]=negative: bad array subscript +declare -a BASH_ARGC=() +declare -a BASH_ARGV=() +declare -a BASH_LINENO=([0]="0") +declare -a BASH_SOURCE=([0]="./array.tests") +declare -a DIRSTACK=() +declare -a FUNCNAME +declare -ar a=([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2") +declare -a b=([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd") +declare -ar c +declare -a d=([1]="test test") +declare -a f=([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element") +./array.tests: line 135: unset: ps1: not an array variable +./array.tests: line 139: declare: c: cannot destroy array variables in this way +this of +this is a test of read using arrays +this test +this is a test of arrays +declare -a BASH_ARGC=() +declare -a BASH_ARGV=() +declare -a BASH_LINENO=([0]="0") +declare -a BASH_SOURCE=([0]="./array.tests") +declare -a DIRSTACK=() +declare -a FUNCNAME +declare -ar a=([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2") +declare -a b=([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd") +declare -ar c +declare -a d=([1]="test test") +declare -a f=([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element") +declare -a rv=([0]="this" [1]="is" [2]="a" [3]="test" [4]="of" [5]="read" [6]="using" [7]="arrays") +abde +abde +bbb +efgh +wxyz +wxyz +./array.tests +a +b c +d +e f g +h +./array.tests +a +b c +d +e f g +h +/bin /usr/bin /usr/ucb /usr/local/bin . /sbin /usr/sbin +bin bin ucb bin . sbin sbin +bin +/ / / / / / +/ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +\bin \usr/bin \usr/ucb \usr/local/bin . \sbin \usr/sbin +\bin \usr\bin \usr\ucb \usr\local\bin . \sbin \usr\sbin +\bin \usr\bin \usr\ucb \usr\local\bin . \sbin \usr\sbin +4 -- 4 +7 -- 7 +55 +49 +6 -- 6 +42 14 44 +grep [ 123 ] * +6 7 9 +6 7 9 5 +length = 3 +value = new1 new2 new3 +./array.tests: line 255: narray: unbound variable +./array1.sub: line 1: syntax error near unexpected token `(' +./array1.sub: line 1: `printf "%s\n" -a a=(a 'b c')' +./array2.sub: line 1: declare: `[]=asdf': not a valid identifier +./array2.sub: line 2: a[]: bad array subscript +./array2.sub: line 4: syntax error near unexpected token `(' +./array2.sub: line 4: `declare -a ''=(a 'b c')' +9 +9 + + +7 8 9 +8 11 +8 11 +6 +6 +nordholz +8 +8 +8 + +a b c d e f g +for case if then else +<> < > ! +12 14 16 18 20 +4414758999202 +aaa bbb +./array.tests: line 305: syntax error near unexpected token `<>' +./array.tests: line 305: `metas=( <> < > ! )' +./array.tests: line 306: syntax error near unexpected token `<>' +./array.tests: line 306: `metas=( [1]=<> [2]=< [3]=> [4]=! )' +abc 3 +case 4 +abc case if then else 5 +abc case if then else 5 +0 +case 4 +case if then else 5 +case if then else 5 +argv[1] = <0> +argv[2] = <1> +argv[3] = <4> +argv[4] = <10> +argv[1] = <0> +argv[2] = <1> +argv[3] = <4> +argv[4] = <10> +argv[1] = <0> +argv[2] = <1> +argv[3] = <4> +argv[4] = <10> +argv[1] = <0 1 4 10> +include null element -- expect one +one +include unset element -- expect three five +three five +start at unset element -- expect five seven +five seven +too many elements -- expect three five seven +three five seven +positive offset - expect five seven +five seven +negative offset to unset element - expect seven +seven +positive offset 2 - expect seven +seven +negative offset 2 - expect seven +seven +out-of-range offset + +e +4 +1 4 7 10 +'b +b c +$0 +declare -a A=([0]="X=a" [1]="b") +t +[3]=abcde r s t u v +e +9 +2 +a b c +argv[1] = <-iname 'a> +argv[2] = <-iname 'b> +argv[3] = <-iname 'c> +'hey' +hey +''hey +'hey' +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = <-iname 'abc> +argv[2] = <-iname 'def> +argv[1] = <-iname 'abc> +argv[2] = <-iname 'def> +argv[1] = <-iname> +argv[2] = +argv[1] = <-iname 'abc> +argv[2] = <-iname 'def> +argv[1] = <-iname> +argv[2] = +argv[1] = <-iname 'abc> +argv[2] = <-iname 'def> +argv[1] = <-iname 'abc> +argv[2] = <-iname 'def> +argv[1] = <-iname> +argv[2] = +*.* OK +1 +a1 2 3c +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +2 +argv[1] = +argv[2] = +argv[1] = +argv[2] = +nord!olz + +rdholz + +rdholz +rdho + + +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +126 +127 +128 +argv[1] = <> +argv[1] = <~> +argv[2] = <^?> +argv[3] = <> +argv[1] = <~> +argv[2] = <^?> +argv[3] = <> +argv[1] = <~> +argv[2] = <^?> +argv[3] = <> +Monday Tuesday Wednesday Thursday Friday Saturday Sunday +Monday +Monday +Tuesday +Monday +Monday +Tuesday +Monday +Tuesday +Wednesday +Monday +Tuesday +Wednesday +monday, monday, tuesday +wednesday, wednesday, thursday +monday, monday, tuesday +Wednesday, Wednesday, Thursday +nday +esday +dnesday +nday +esday +dnesday +onday +uesday +ednesday +onday +uesday +ednesday +version[agent] +version.agent +version[agent] +version.agent +foo[bar] version[agent] +bowl version.agent +foobar] foo foo[bar] +bleh bbb bleh +ab] +bar +1 +1 +1 +1 +1 +1 +main main +function function +function function +declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5") +declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4") +declare -a x=([0]="0" [1]="1" [2]="2" [4]="4") +./array14.sub: line 24: unset: [-10]: bad array subscript +declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4") +declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="five") +declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5") +declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="foo") +declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5") +declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4four" [5]="5") +strlen(4four) = 5 +1 2 0 3 +1 2 0 3 +1 2 0 3 +1 2 0 3 +1 2 0 3 +foo index 1: ok +foo index 2: ok +foo: implicit reference to element 0: ok +foo: arithmetic evaluation: ok +bar: array with element zero unset: ok +bar: element zero: ok +qux: unset array: ok +qux: unset array element 0: ok +2 +2 +2 +2 +0 +0 +1 +./array17.sub: line 43: ~: syntax error: operand expected (error token is "~") +0 +0 +3 +3 +0 +0 +zero +zero +one +one +one +one +two +two +./array17.sub: line 89: ~ : syntax error: operand expected (error token is "~ ") +1 +argv[1] = <> +argv[2] = <> +argv[3] = <> +argv[1] = +argv[1] = <-> +argv[2] = <-> +argv[1] = < > +argv[1] = +argv[1] = <-> +argv[2] = <-> +argv[1] = < > +argv[1] = <> +argv[2] = <> +argv[3] = <> +argv[1] = +argv[1] = <-> +argv[2] = <-> +argv[1] = < > +argv[1] = +argv[1] = <-> +argv[2] = <-> +argv[1] = < > +declare -a foo=([0]="( zeroind )") +declare -a foo=([0]="zeroind") +declare -a foo=([0]="zeroind") +declare -a foo=([0]="[0]=bar") +declare -a foo=([0]="[0]=bar") +declare -a foo=([0]="[0]=bar") +declare -- a="(1 2 3)" +declare -a a=([0]="1" [1]="2" [2]="3") +declare -- a="([0]=a [1]=b)" +declare -a a=([0]="a" [1]="b") +declare -A a=([1]="b" [0]="a" ) +declare -a var=([0]="[\$(echo" [1]="total" [2]="0)]=1" [3]="[2]=2]") +declare -a var=([0]="[\$(echo total 0)]=1 [2]=2]") +declare -a var=([0]="[\$(echo" [1]="total" [2]="0)]=1" [3]="[2]=2]") +./array19.sub: line 89: total 0: syntax error in expression (error token is "0") +declare -a var=() +declare -al foo=([0]="abcde" [1]="two" [2]="three") +declare -al foo=([0]="abcde") +declare -al ar=([0]="one" [1]="two" [2]="three") +declare -a a=([2]="foo") +declare -a a=([2]="foo") +declare -a a=([1]="(var)" [2]="foo") +./array19.sub: line 128: warning: a[1]=(var): quoted compound array assignment deprecated +declare -a a=([1]="(var)") +declare -a a=([0]="1" [1]="2" [2]="(1 2 3)") +declare -a a=([0]="1" [1]="2" [2]="(1 2 3)") +declare -a a=([0]="1" [1]="2" [2]="3") +declare -a a=([0]="1" [1]="2" [2]="3") +declare -a a=([0]="1" [1]="2" [2]="3") +declare -- a="a b" +declare -- b="/scratch/bash" +declare -- c="(1 2)" +declare -- d="(\$a)" +declare -- e="(\$(echo Darwin))" +declare -a a=([0]="a b") +declare -a b=([0]="/scratch/bash") +declare -a c=([0]="1" [1]="2") +declare -a d=([0]="a" [1]="b") +declare -a e=([0]="Darwin") +declare -A a=([0]="a b" ) +declare -A b=([0]="/scratch/bash" ) +declare -A c=([1]="2" ) +declare -A d=(["a b"]="" ) +declare -A e=([Darwin]="" ) +a+b+c +x+b+c +a+b+c +x+b+c +argv[1] = +argv[1] = +a b c +x b c +a b c +x b c +declare -a a=([1]="2" [2]="3" [3]="4") +abcd +unset +./array21.sub: line 30: typeset: a: not found +./array21.sub: line 33: typeset: A: not found +declare -a a=() +declare -A A=() +declare -a foo=([0]="1" [1]="(4 5 6)" [2]="3") +a1 +argv[1] = <> +argv[2] = <> +a2 +argv[1] = +argv[1] = +a3 +argv[1] = <> +argv[2] = +a4 +argv[1] = +p1 +argv[1] = <> +argv[2] = <> +p2 +argv[1] = <> +argv[2] = +p3 +argv[1] = + + +./array23.sub: line 22: $( echo >&2 foo ) : syntax error: operand expected (error token is "$( echo >&2 foo ) ") +./array23.sub: line 23: $( echo >&2 foo ) : syntax error: operand expected (error token is "$( echo >&2 foo ) ") +foo +0 +foo +foo +foo +6 +./array23.sub: line 34: $( echo >&2 foo ): syntax error: operand expected (error token is "$( echo >&2 foo )") +./array23.sub: line 35: $( echo >&2 foo ): syntax error: operand expected (error token is "$( echo >&2 foo )") +0 +0 +0 +IFS=: ${var-$*} +abc +def ghi +jkl +abc +def ghi +jkl +---- +IFS=: ${var=$*} +abc +def ghi +jkl +var=abc:def ghi:jkl +abc +def ghi +jkl +var=abc:def ghi:jkl +---- +IFS=: ${var+$*} +abc +def ghi +jkl +abc +def ghi +jkl +---- +IFS= ${var-$*} +abc +def ghi +jkl +abc +def ghi +jkl +---- +IFS= ${var=$*} +abcdef ghijkl +var=abcdef ghijkl +abcdef ghijkl +var=abcdef ghijkl +---- +IFS= ${var+$*} +abc +def ghi +jkl +abc +def ghi +jkl +1. indexed: +reference: +1. 0 +./array25.sub: line 24: ' ': syntax error: operand expected (error token is "' '") +3. 0 +4. 0 +5. 0 +6. 0 +assignment: +1.declare -a a=([0]="10" [1]="1") +2.declare -a a=([0]="11" [1]="1") +3.declare -a a=([0]="12" [1]="1") +4.declare -a a=([0]="13" [1]="1") +arithmetic: +1.declare -a a=([0]="10" [1]="1") +2.declare -a a=([0]="11" [1]="1") +3.declare -a a=([0]="12" [1]="1") +4.declare -a a=([0]="13" [1]="1") +5.declare -a a=([0]="10" [1]="1") +6.declare -a a=([0]="11" [1]="1") +7.declare -a a=([0]="12" [1]="1") +8.declare -a a=([0]="13" [1]="1") +2. associative: +reference: +1. +2. +3. +4. +5. +6. +assignment: +1.declare -A a=([1]="1" [0]="0" [" "]="10" ) +2.declare -A a=([1]="1" [0]="0" [" "]="11" ) +3.declare -A a=([1]="1" [0]="0" [" "]="12" ) +4.declare -A a=([1]="1" [0]="0" [" "]="13" ) +arithmetic: +1.declare -A a=([1]="1" [0]="0" [" "]="10" ) +2.declare -A a=([1]="1" [0]="0" [" "]="11" ) +3.declare -A a=([1]="1" [0]="0" [" "]="12" ) +4.declare -A a=([1]="1" [0]="0" [" "]="13" ) +5.declare -A a=([1]="1" [0]="0" [" "]="10" ) +6.declare -A a=([1]="1" [0]="0" [" "]="10" ["\" \""]="11" ) +7.declare -A a=([1]="1" [0]="0" [" "]="12" ["\" \""]="11" ) +8.declare -A a=([1]="1" [0]="0" [" "]="12" ["\" \""]="13" ) +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +7 +./array27.sub: line 24: a[]]=7 : syntax error: invalid arithmetic operator (error token is "]=7 ") +declare -A A=([$'\t']="2" [" "]="2" ) +./array27.sub: line 36: ((: A[]]=2 : syntax error: invalid arithmetic operator (error token is "]=2 ") +declare -A A=([$'\t']="2" ["*"]="2" [" "]="2" ["@"]="2" ) +./array27.sub: line 45: A[]]: bad array subscript +declare -A A=([$'\t']="X" ["*"]="X" [" "]="X" ["@"]="X" ) +./array27.sub: line 53: A[]]: bad array subscript +declare -A A=([$'\t']="X" ["*"]="X" [" "]="X" ["@"]="X" ) +./array27.sub: line 61: declare: `A[]]=X': not a valid identifier +declare -A A=(["*"]="X" ["@"]="X" ) +./array27.sub: line 69: declare: `A[]]=X': not a valid identifier +./array27.sub: line 69: A[*]: bad array subscript +./array27.sub: line 69: A[@]: bad array subscript +declare -A A +declare -a bug4=([0]="" [1]="5" [2]="" [3]="1" [4]="") +declare -a bug=([0]="" [1]="5" [2]="" [3]="1" [4]="") +declare -a bug2=([0]="") +declare -a bug3=([0]="" [1]="5" [2]="" [3]="1" [4]="") +declare -a not_bug=([0]="no" [1]="nulls") +declare -a workaround=([0]="") diff --git a/bash-5.1/tests/array.tests b/bash-5.1/tests/array.tests new file mode 100644 index 0000000000000000000000000000000000000000..ba8e2254d6cd3c82787918a4f74d68994f4efb6c --- /dev/null +++ b/bash-5.1/tests/array.tests @@ -0,0 +1,427 @@ +# 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 . +# +# this is needed so that the bad assignments (b[]=bcde, for example) do not +# cause fatal shell errors when in posix mode +set +o posix + +set +a +# The calls to egrep -v are to filter out builtin array variables that are +# automatically set and possibly contain values that vary. + +# first make sure we handle the basics +x=() +echo ${x[@]} +unset x + +# this should be an error +test=(first & second) +echo $? +unset test + +# make sure declare -a converts an existing variable to an array +unset a +a=abcde +declare -a a +echo ${a[0]} +if [ "$a" != "${a[0]}" ]; then + echo 'array.tests: $a and $a[0] array mismatch' +fi + +unset a +a=abcde +a[2]=bdef + +unset b +declare -a b[256] + +unset c[2] +unset c[*] + +a[1]= + +_ENV=/bin/true +x=${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]} + +declare -r c[100] + +echo ${a[0]} ${a[4]} +echo ${a[@]} + +echo ${a[*]} + +# this should print out values, too +declare -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' + +unset a[7] +echo ${a[*]} + +unset a[4] +echo ${a[*]} + +echo ${a} +echo "${a}" +echo $a + +unset a[0] +echo ${a} + +echo ${a[@]} + +a[5]="hello world" +echo ${a[5]} +echo ${#a[5]} + +echo ${#a[@]} + +a[4+5/2]="test expression" +declare a["7 + 8"]="test 2" +a[7 + 8]="test 2" +echo ${a[@]} + +readonly a[5] +readonly a +# these two lines should output `declare' commands +readonly -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' +declare -ar | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' +# this line should output `readonly' commands, even for arrays +set -o posix +readonly -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' +set +o posix + +declare -a d='([1]="" [2]="bdef" [5]="hello world" "test")' +d[9]="ninth element" + +declare -a e[10]=test # this works in post-bash-2.05 versions +declare -a e[10]='(test)' + +pass=/etc/passwd +declare -a f='("${d[@]}")' +b=([0]=this [1]=is [2]=a [3]=test [4]="$PS1" [5]=$pass) + +echo ${b[@]:2:3} + +declare -pa | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' + +a[3]="this is a test" + +b[]=bcde +b[*]=aaa +echo ${b[ ]} + +c[-2]=4 +echo ${c[-4]} + +d[7]=(abdedfegeee) + +d=([]=abcde [1]="test test" [*]=last [-65]=negative ) + +unset d[12] +unset e[*] + +declare -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' + +ps1='hello' +unset ps1[2] +unset ${ps1[2]} + +declare +a ps1 +declare +a c + +# the prompt should not print when using a here doc +read -p "array test: " -a rv <' [2]='<' [3]='>' [4]='!' ) +echo ${foo[@]} + +# numbers are just words when not in a redirection context +foo=( 12 14 16 18 20 ) +echo ${foo[@]} + +foo=( 4414758999202 ) +echo ${foo[@]} + +# this was a bug in all versions of bash 2.x up to and including bash-2.04 +declare -a ddd=(aaa +bbb) +echo ${ddd[@]} + +# errors until post-bash-2.05a; now reserved words are OK +foo=(a b c for case if then else) + +foo=(for case if then else) + +# errors +metas=( <> < > ! ) +metas=( [1]=<> [2]=< [3]=> [4]=! ) + +# various expansions that didn't really work right until post-bash-2.04 +foo='abc' +echo ${foo[0]} ${#foo[0]} +echo ${foo[1]} ${#foo[1]} +echo ${foo[@]} ${#foo[@]} +echo ${foo[*]} ${#foo[*]} + +foo='' +echo ${foo[0]} ${#foo[0]} +echo ${foo[1]} ${#foo[1]} +echo ${foo[@]} ${#foo[@]} +echo ${foo[*]} ${#foo[*]} + +# new expansions added after bash-2.05b +x[0]=zero +x[1]=one +x[4]=four +x[10]=ten + +recho ${!x[@]} +recho "${!x[@]}" +recho ${!x[*]} +recho "${!x[*]}" + +# sparse array tests for code fixed in bash-3.0 +unset av +av[1]='one' +av[2]='' + +av[3]=three +av[5]=five +av[7]=seven + +echo include null element -- expect one +echo ${av[@]:1:2} # what happens when we include a null element? +echo include unset element -- expect three five +echo ${av[@]:3:2} # what happens when we include an unset element? +echo start at unset element -- expect five seven +echo ${av[@]:4:2} # what happens when we start at an unset element? + +echo too many elements -- expect three five seven +echo ${av[@]:3:5} # how about too many elements? + +echo positive offset - expect five seven +echo ${av[@]:5:2} +echo negative offset to unset element - expect seven +echo ${av[@]: -2:2} + +echo positive offset 2 - expect seven +echo ${av[@]: 6:2} +echo negative offset 2 - expect seven +echo ${av[@]: -1:2} + +echo out-of-range offset +echo ${av[@]:12} + +# parsing problems and other inconsistencies not fixed until post bash-3.0 +unset x +declare -a x=(')' $$) +[ ${x[1]} -eq $$ ] || echo bad + +unset x +declare -a x=(a b c d e) +echo ${x[4]} + +z=([1]=one [4]=four [7]=seven [10]=ten) + +echo ${#z[@]} + +echo ${!z[@]} + +unset x +declare -a x=(a \'b c\') + +echo "${x[1]}" + +unset x +declare -a x=(a 'b c') + +echo "${x[1]}" + +unset x +declare -a x=($0) +[ "${x[@]}" = $0 ] || echo double expansion of \$0 +declare -a x=(\$0) +echo "${x[@]}" + +unset A Z +Z='a b' +A=( X=$Z ) +declare -p A + +# tests for bash-3.1 problems +${THIS_SH} ./array5.sub + +# tests for post-bash-3.2 problems, most fixed in bash-3.2 patches +${THIS_SH} ./array6.sub +${THIS_SH} ./array7.sub + +${THIS_SH} ./array8.sub +${THIS_SH} ./array9.sub +${THIS_SH} ./array10.sub +${THIS_SH} ./array11.sub +${THIS_SH} ./array12.sub +${THIS_SH} ./array13.sub +${THIS_SH} ./array14.sub +${THIS_SH} ./array15.sub +${THIS_SH} ./array16.sub +${THIS_SH} ./array17.sub +${THIS_SH} ./array18.sub +${THIS_SH} ./array19.sub +${THIS_SH} ./array20.sub +${THIS_SH} ./array21.sub +${THIS_SH} ./array22.sub +${THIS_SH} ./array23.sub +${THIS_SH} ./array24.sub +${THIS_SH} ./array25.sub +${THIS_SH} ./array26.sub +${THIS_SH} ./array27.sub +${THIS_SH} ./array28.sub diff --git a/bash-5.1/tests/array1.sub b/bash-5.1/tests/array1.sub new file mode 100644 index 0000000000000000000000000000000000000000..86e933229218295659efe6697fd180536a1296fd --- /dev/null +++ b/bash-5.1/tests/array1.sub @@ -0,0 +1 @@ +printf "%s\n" -a a=(a 'b c') diff --git a/bash-5.1/tests/array10.sub b/bash-5.1/tests/array10.sub new file mode 100644 index 0000000000000000000000000000000000000000..718248048804ef250431867e198cc4fbbf1431e8 --- /dev/null +++ b/bash-5.1/tests/array10.sub @@ -0,0 +1,65 @@ +# 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 . +# +days=({Mon,Tues,Wednes,Thurs,Fri,Satur,Sun}day) +echo ${days[@]} + +typeset -i count + +count=0 +echo ${days[${count}]} +echo ${days[$((count++))]} +echo ${days[$((count++))]} + +count=0 +echo ${days[count]} +echo ${days[count++]} +echo ${days[count++]} + +count=0 +echo ${days[$((count++))]/foo/bar} +echo ${days[$((count++))]/foo/bar} +echo ${days[$((count++))]/foo/bar} + +count=0 +echo ${days[count++]/foo/bar} +echo ${days[count++]/foo/bar} +echo ${days[count++]/foo/bar} + +count=0 +echo "${days[${count}],,}, ${days[$((count++))],,}, ${days[$((count++))],,}" +echo "${days[${count}],,}, ${days[$((count++))],,}, ${days[$((count++))],,}" + +count=0 +echo "${days[${count}],,}, ${days[$((count++))],,}, ${days[$((count++))],,}" +echo "${days[${count}]/foo/bar}, ${days[$((count++))]/foo/bar}, ${days[$((count++))]/foo/bar}" + +count=0 +echo ${days[$((count++))]:2} +echo ${days[$((count++))]:2} +echo ${days[$((count++))]:2} + +count=0 +echo ${days[count++]:2} +echo ${days[count++]:2} +echo ${days[count++]:2} + +count=0 +echo ${days[$((count++))]#?} +echo ${days[$((count++))]#?} +echo ${days[$((count++))]#?} + +count=0 +echo ${days[count++]#?} +echo ${days[count++]#?} +echo ${days[count++]#?} diff --git a/bash-5.1/tests/array11.sub b/bash-5.1/tests/array11.sub new file mode 100644 index 0000000000000000000000000000000000000000..5961902acbcbba8e34cd8a240c25deebe74729e0 --- /dev/null +++ b/bash-5.1/tests/array11.sub @@ -0,0 +1,48 @@ +# 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 . +# +# problems with associative array keys with ] and unbalanced [ ] +# fixed after bash-4.2 + +declare -A foo + +foo=(["version[agent]"]=version.agent) + +echo ${!foo[@]} +echo ${foo[@]} + +unset foo +declare -A foo +foo["version[agent]"]=version.agent + +echo ${!foo[@]} +echo ${foo[@]} + +declare foo["foo[bar]"]=bowl + +echo ${!foo[@]} +echo ${foo[@]} + +declare -A array2["foo[bar]"]=bleh + +array2["foobar]"]=bleh +array2["foo"]=bbb + +echo ${!array2[@]} +echo ${array2[@]} + +declare -A foo +foo=( ['ab]']=bar ) + +echo ${!foo[@]} +echo ${foo[@]} diff --git a/bash-5.1/tests/array12.sub b/bash-5.1/tests/array12.sub new file mode 100644 index 0000000000000000000000000000000000000000..fbf5eeb0cc39c64124de35b012864219e19b1fe3 --- /dev/null +++ b/bash-5.1/tests/array12.sub @@ -0,0 +1,34 @@ +# 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 . +# +# problems with fix for posix interp 217 introduced in bash-4.2 + +declare -ax array +array[$(( $( echo -n 1001 ) - 1001 ))]=1 + +echo ${array[0]} +echo ${array[@]} + +unset 'array[0]' +array[$( echo -n 1001 ) - 1001 ]=1 +echo ${array[0]} + +unset 'array[0]' +array[$(( 1001 - $( echo -n 1001 ) ))]=1 +echo ${array[0]} +array[$(( 1001 - $( echo -n 1001 ) ))]=1 +echo ${array[0]} + +unset 'array[0]' +array[1001 - $( echo -n 1001 )]=1 +echo ${array[0]} diff --git a/bash-5.1/tests/array13.sub b/bash-5.1/tests/array13.sub new file mode 100644 index 0000000000000000000000000000000000000000..635cb977a583cbde53be70dc9553ff520095b0cf --- /dev/null +++ b/bash-5.1/tests/array13.sub @@ -0,0 +1,12 @@ + +func1(){ +declare -g variable='function' +declare -g -a array=(function) +echo ${variable} ${array[@]} +} + +declare -g variable='main' +declare -g -a array=(main) +echo ${variable} ${array[@]} +func1 +echo ${variable} ${array[@]} diff --git a/bash-5.1/tests/array14.sub b/bash-5.1/tests/array14.sub new file mode 100644 index 0000000000000000000000000000000000000000..57a455a651d97e2f1b75ed62af96637c0df91e30 --- /dev/null +++ b/bash-5.1/tests/array14.sub @@ -0,0 +1,43 @@ +# 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 . +# +# start at a test suite for negative indexed array subscripts -- post bash-4.2 +x=( 0 1 2 3 4 5) +declare -p x + +unset 'x[-1]' +declare -p x + +unset 'x[-2]' +declare -p x + +unset 'x[-10]' + +x[-2]=3 +declare -p x + +x+=( five ) +declare -p x +x[-1]=5 +declare -p x + +x+=( [-1]=foo ) +declare -p x + +x[-1]=5 +declare -p x + +x[-2]+=four +declare -p x + +echo "strlen(${x[-2]})" = ${#x[-2]} diff --git a/bash-5.1/tests/array15.sub b/bash-5.1/tests/array15.sub new file mode 100644 index 0000000000000000000000000000000000000000..47796b95cda4f26cd310231ae5c014036a6a2d98 --- /dev/null +++ b/bash-5.1/tests/array15.sub @@ -0,0 +1,37 @@ +# 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 . +# +# fixes for make_internal_declare not handling integer attribute for arrays +declare -ai -g foo=(1 2 xx 3) +echo "${foo[@]}" + +unset foo +declare -ai -g foo='(1 2 xx 3)' +echo "${foo[@]}" + +unset foo +declare -ia -g foo=(1 2 xx 3) +echo "${foo[@]}" + +unset foo +declare -ia -g foo='(1 2 xx 3)' +echo "${foo[@]}" + +unset foo +func() +{ + declare -ai -g foo=(1 2 xx 3) +} + +func +echo "${foo[@]}" diff --git a/bash-5.1/tests/array16.sub b/bash-5.1/tests/array16.sub new file mode 100644 index 0000000000000000000000000000000000000000..b82dbca284b0eac8017cb2efe6ed71786996ab25 --- /dev/null +++ b/bash-5.1/tests/array16.sub @@ -0,0 +1,34 @@ +# 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 . +# +foo[0]=a +foo[1]=b + +[[ -v foo[1] ]] && echo foo index 1: ok +[[ -v foo[2] ]] || echo foo index 2: ok + +[[ -v foo ]] && echo foo: implicit reference to element 0: ok + +typeset -i foo + +[[ -v foo[1] ]] && echo foo: arithmetic evaluation: ok + +typeset -a bar +bar[1]=set + +[[ -v bar ]] || echo bar: array with element zero unset: ok +[[ -v bar[0] ]] || echo bar: element zero: ok + +typeset -a qux +[[ -v qux ]] || echo qux: unset array: ok +[[ -v qux[0] ]] || echo qux: unset array element 0: ok diff --git a/bash-5.1/tests/array17.sub b/bash-5.1/tests/array17.sub new file mode 100644 index 0000000000000000000000000000000000000000..dd0c0f698e97e27b704119ff605766aca729d912 --- /dev/null +++ b/bash-5.1/tests/array17.sub @@ -0,0 +1,91 @@ +# 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 . +# +# this shows the expansions an array subscript undergoes before being run +# through the arithmetic evaluator + +b=(0 1 2 3) + +# array subscripts undergo variable expansion +a=2 +echo ${b[$a]} + +# array subscripts undergo command substitution +echo ${b[$(echo 2)]} + +c='1+1' +d='1-+1' + +# array subscripts are expanded and the expanded value is treated as an +# expression +echo ${b[$c]} +echo ${b[c]} + +echo ${b[$d]} +echo ${b[d]} + +# array subscripts undergo parameter expansion +set -- 1 2 3 +echo ${b[$1]} + +# array subscripts undergo tilde expansion +HOME=2 +echo ${b[~]} + +# array subscripts undergo word splitting -- bug in bash versions through 4.3 + +x='b[$d]' +IFS=- +echo $((x)) +IFS=$' \t\n' + +set -- 1 + 2 + +x='d' +IFS=- +echo $((x)) +IFS=$' \t\n' + +# start of quoting tests; make sure that subscript is treated as double +# quoted (inhibits word splitting) but that double quotes are silently +# discarded through quote removal + +echo $(( $@ )) +echo "$(( $@ ))" + +echo $(( "$x" )) +echo $(( "x" )) + +unset a foo bar +a=(zero one two three four five six seven eight nine ten) + +echo ${a[0]} +echo ${a["0"]} + +foo=1 +echo ${a[$foo]} +echo ${a["$foo"]} +echo ${a[foo]} +echo ${a["foo"]} + +bar=2 +echo ${a[" $bar "]} +echo ${a[" bar "]} + +# tilde expansion is performed by array subscript expansion but not by posix +# style arithmetic expansion + +HOME=2 +echo $(( ~ )) + + diff --git a/bash-5.1/tests/array18.sub b/bash-5.1/tests/array18.sub new file mode 100644 index 0000000000000000000000000000000000000000..950308126be25f857120e98fc9e0f5c989f0cafc --- /dev/null +++ b/bash-5.1/tests/array18.sub @@ -0,0 +1,47 @@ +# 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 . +# +# arrays referenced using @ subscript and positional parameters should behave +# the same way + +foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? + +recho "${foo[@]#0}" +bar=${foo[@]#0} +recho bar +recho $bar +recho -$bar- +recho "$bar" + +qux="${foo[@]#0}" +recho qux +recho $qux +recho -$qux- +recho "$qux" + +unset foo qux bar + +set -- 0 0 0 + +recho "${@#0}" +bar=${@#0} +recho bar +recho $bar +recho -$bar- +recho "$bar" + +qux="${@#0}" +recho qux +recho $qux +recho -$qux- +recho "$qux" diff --git a/bash-5.1/tests/array19.sub b/bash-5.1/tests/array19.sub new file mode 100644 index 0000000000000000000000000000000000000000..1d02f74416837f1b54f6f927beea09978f5c0687 --- /dev/null +++ b/bash-5.1/tests/array19.sub @@ -0,0 +1,175 @@ +# 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 . +# +# tests for changes to declare and assignment statement arguments post-bash-4.3 + +unset foo l a b + +l="( zeroind )" + +unset foo +declare -a foo +foo="$l" +declare -p foo + +unset foo +declare -a foo="$l" +declare -p foo + +unset foo +declare -a foo=$l +declare -p foo + +b='[0]=bar' + +unset foo +declare -a foo="$b" +declare -p foo + +unset foo +declare -a foo=("$b") +declare -p foo + +unset foo +declare -a foo=($b) +declare -p foo + +unset a + +declare a='(1 2 3)' +declare -p a +unset a + +declare -a a +declare a='(1 2 3)' +declare -p a +unset a + +declare a='([0]=a [1]=b)' +declare -p a +unset a + +declare -a a +declare a='([0]=a [1]=b)' +declare -p a +unset a + +declare -A a +declare a='([0]=a [1]=b)' +declare -p a +unset a +unset var value + +value='[$(echo total 0)]=1 [2]=2]' + +unset var +declare -a var +var=($value) +declare -p var + +unset var +declare -a var=("$value") +declare -p var + +unset var +declare -a var=($value) +declare -p var + +unset var +declare -a var="($value)" +declare -p var +unset foo value + +value="AbCdE" + +declare -a foo +foo=( one two three ) + +declare -l foo="$value" +declare -p foo + +unset foo +value='(AbCdE)' + +declare -a foo +foo=( one two three ) + +declare -l foo="$value" +declare -p foo +unset ar +declare -a ar=(ONE TWO THREE) +declare -al ar=(${ar[@]}) +declare -p ar +unset a + +declare -a a +a[2]=foo +declare -p a + +unset a +declare -a a +declare a[2]=foo +declare -p a + +declare a[1]='(var)' +declare -p a + +unset a +declare a[1]='(var)' +declare -p a +unset a + +a=(1 2 3) +a[2]='(1 2 3)' + +declare -p a + +unset a +a=(1 2 3) +declare a[2]='(1 2 3)' + +declare -p a + +unset a +a=(1 2 3) +declare a='(1 2 3)' + +declare -p a + +unset a +a=(1 2 3) +declare 'a=(1 2 3)' + +declare -p a + +unset a +declare -a a='(1 2 3)' + +declare -p a +unset a b c d e x y + +HOME=/scratch/bash +x='a b' +y='($(echo Darwin))' + +declare a=$x b=~ c='(1 2)' d='($a)' e=$y + +declare -p a b c d e + +unset a b c d e +declare -a a=$x b=~ c='(1 2)' d='($a)' e=$y +declare -p a b c d e + +unset a b c d e +declare -A a=$x b=~ c='(1 2)' d='($a)' e=$y +declare -p a b c d e diff --git a/bash-5.1/tests/array2.right b/bash-5.1/tests/array2.right new file mode 100644 index 0000000000000000000000000000000000000000..b5145c251e0c13ea0f60b79f4072080fcd6e2949 --- /dev/null +++ b/bash-5.1/tests/array2.right @@ -0,0 +1,74 @@ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <1> +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <5> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <5> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <1> +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = diff --git a/bash-5.1/tests/array2.sub b/bash-5.1/tests/array2.sub new file mode 100644 index 0000000000000000000000000000000000000000..44bb7c5b76a711f1fe3f4b21ab40a04fe1770b8a --- /dev/null +++ b/bash-5.1/tests/array2.sub @@ -0,0 +1,4 @@ +declare -r []=asdf +declare -r a[]=asdf + +declare -a ''=(a 'b c') diff --git a/bash-5.1/tests/array20.sub b/bash-5.1/tests/array20.sub new file mode 100644 index 0000000000000000000000000000000000000000..24dff9303ccf7500e86d50fdd30435d655b0938d --- /dev/null +++ b/bash-5.1/tests/array20.sub @@ -0,0 +1,47 @@ +# 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 . +# +# tests to make sure that $* and ${array[*]} expand consistently in `list' +# and `scalar' contexts + +arr=(a b c) +IFS=+ + +# these two should both expand to `+' separated strings +a=${arr[*]} ; echo "$a" +b=${arr[*]/a/x}; echo "$b" + +set -- a b c + +# these two should both expand to `+' separated strings +a=${*} ; echo "$a" +b=${*/a/x}; echo "$b" + +# these two should both expand to `+' separated strings and it should handle +# characters in IFS as chars in the string +unset a b + +set -- 'a+b' 'c+d' 'e+f' +a=${*} ; recho "$a" +b=${*/a/x}; recho "$b" + +# now let's make sure that @ always uses space separators even in contexts +# where we don't do word splitting +set -- a b c +a=${@} ; echo "$a" +b=${@/a/x}; echo "$b" + +unset a b + +a=${arr[@]} ; echo "$a" +b=${arr[@]/a/x}; echo "$b" diff --git a/bash-5.1/tests/array21.sub b/bash-5.1/tests/array21.sub new file mode 100644 index 0000000000000000000000000000000000000000..97ff0936473f7a05b4467dbe1966b9267f45bc87 --- /dev/null +++ b/bash-5.1/tests/array21.sub @@ -0,0 +1,50 @@ +# 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 . +# +typeset -a a +a=(1 2 3 4) + +typeset -A A +A=([one]=1 [two]=2 [three]=3 [four]=4) + +unset 'a[0]' +typeset -p a + +scalar=abcd +echo ${scalar[0]} + +unset 'scalar[0]' +echo ${scalar-unset} + +unset 'a[@]' +typeset -p a + +unset 'A[@]' +typeset -p A + +typeset -a a +a=(1 2 3 4) +typeset -A A +A=([one]=1 [two]=2 [three]=3 [four]=4) + +# supported, recommended way to unset all array elements +a=() +typeset -p a +A=() +typeset -p A + +declare -a foo +declare foo='(1 2 3)' +declare foo[1]='(4 5 6)' + +declare -p foo diff --git a/bash-5.1/tests/array22.sub b/bash-5.1/tests/array22.sub new file mode 100644 index 0000000000000000000000000000000000000000..3374ef2f4588358dc86e6d616e681d66f41c4f16 --- /dev/null +++ b/bash-5.1/tests/array22.sub @@ -0,0 +1,59 @@ +# 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 . +# +# This isn't perfect behavior, but it establishes a baseline and will provide +# a way to detect behavior changes + +echo a1 +a[0]= a[1]=; recho "${a[@]:-y}" +unset a + +echo a2 +a[1]=; recho "${a[@]:-y}" +a[1]=; recho "${a[*]:-z}" +unset a + +echo a3 +a[0]= a[1]=x; recho "${a[@]:-y}" +unset a + +echo a4 +a[0]= a[1]=x; recho ${a[@]:+y} +unset a + +echo p1 +set '' '' +recho "${@:-y}" + +shift $# + +echo p2 +set '' x +recho "${@:-y}" + +shift $# + +echo p3 +set '' x +recho ${@:+y} + +# problems with * and null expansions dating back to bash's earliest days +A=(''); set -- '' + +echo "<${A[*]:-X}>" "<${*:-X}>" "<${A:-X}>" "<${A[0]:-X}>" + +IFS= +A=('' ''); set -- '' '' +B='' + +echo "<${A[*]:-X}>" "<${*:-X}>" "<${B:-X}>" "<${B[*]:-X}>" diff --git a/bash-5.1/tests/array23.sub b/bash-5.1/tests/array23.sub new file mode 100644 index 0000000000000000000000000000000000000000..02d271db5f442121846be065f3b1f8f8a0ec13a5 --- /dev/null +++ b/bash-5.1/tests/array23.sub @@ -0,0 +1,41 @@ +# 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 . +# +# this captures how bash and ksh93 expand indexed array subscripts in +# various contexts. if changes are ever made, or an option added to do +# this differently, the diffs will show up here + +typeset -a array + +index='$( echo >&2 foo )' # Literal shell code should never be evaluated unless an 'eval' is involved. + +echo ${array[ $index ]} # [] expands $index, results in a literal that [] does not re-evaluate. +echo $(( $index )) # (( )) expands $index, results in a literal that (( )) does not re-evaluate. +echo $(( array[ $index ] )) # (( )) expands $index, results in a literal that [] DOES re-evaluate. + +(( array[ $index ] )) + +typeset -a a + +: $(( a[$index]=5 )) + +#shopt -s assoc_expand_once +echo $((1+a[$index])) +echo $((1+a[\$index])) +echo "1+${a[$index]}" + +# intermediate problems discovered while bash-5.0 was in testing +a=0 +echo $(( a[a[0]] )) +echo ${a[a[a[0]]]} +echo $(( a[a[a[0]]] )) diff --git a/bash-5.1/tests/array24.sub b/bash-5.1/tests/array24.sub new file mode 100644 index 0000000000000000000000000000000000000000..461b406890a6692dcee67213c1e9793c69096c5d --- /dev/null +++ b/bash-5.1/tests/array24.sub @@ -0,0 +1,60 @@ +# 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 . +# +set -- "abc" "def ghi" "jkl" +A=("$@") + +IFS=':' + +echo 'IFS=: ${var-$*}' +unset var; printf '%s\n' ${var-$*} +printf '%s\n' ${var-${A[*]}} + +echo "----" +echo 'IFS=: ${var=$*}' + +unset var; printf '%s\n' ${var=$*} +printf 'var=%s\n' "$var" + +unset var; printf '%s\n' ${var=${A[*]}} +printf 'var=%s\n' "$var" + +echo "----" +echo 'IFS=: ${var+$*}' + +printf '%s\n' ${var+$*} +printf '%s\n' ${var+${A[*]}} + +echo "----" +echo 'IFS= ${var-$*}' + +IFS='' +unset var; printf '%s\n' ${var-$*} +unset var; printf '%s\n' ${var-${A[*]}} + +echo "----" +echo 'IFS= ${var=$*}' + +unset var +printf '%s\n' ${var=$*} +printf 'var=%s\n' "$var" + +unset var +printf '%s\n' ${var=${A[*]}} +printf 'var=%s\n' "$var" + +echo "----" +echo 'IFS= ${var+$*}' + +printf '%s\n' ${var+$*} +printf '%s\n' ${var+${A[*]}} diff --git a/bash-5.1/tests/array25.sub b/bash-5.1/tests/array25.sub new file mode 100644 index 0000000000000000000000000000000000000000..fe6bb3484422009575311c280ea2f0a797d1b670 --- /dev/null +++ b/bash-5.1/tests/array25.sub @@ -0,0 +1,83 @@ +# 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 . +# +# tests with blank subscripts, indexed and associative + +echo 1. indexed: +a[0]=0 a[1]=1 + +v=" " + +echo reference: + +echo 1. ${a[ ]} +echo 2. ${a[' ']} +echo 3. "${a[ ]}" +echo 4. ${a[$v]} +echo 5. ${a["$v"]} +echo 6. "${a[$v]}" + +echo assignment: + +echo -n 1. ; a[ ]=10 ; typeset -p a ; a[0]=0 +echo -n 2. ; a[" "]=11 ; typeset -p a ; a[0]=0 +echo -n 3. ; a[$v]=12 ; typeset -p a ; a[0]=0 +echo -n 4. ; a["$v"]=13 ; typeset -p a ; a[0]=0 + +echo arithmetic: + +echo -n 1. ; (( a[ ]=10 )); typeset -p a ; a[0]=0 +echo -n 2. ; (( a[" "]=11 )); typeset -p a ; a[0]=0 +echo -n 3. ; (( a[$v]=12 )); typeset -p a ; a[0]=0 +echo -n 4. ; (( a["$v"]=13 )); typeset -p a ; a[0]=0 +echo -n 5. ; let "a[ ]=10" ; typeset -p a ; a[0]=0 +echo -n 6. ; let "a[\" \"]=11" ; typeset -p a ; a[0]=0 +echo -n 7. ; let "a[$v]=12" ; typeset -p a ; a[0]=0 +echo -n 8. ; let "a[\"$v\"]=13" ; typeset -p a ; a[0]=0 + +unset -v a v + +echo 2. associative: +shopt -s assoc_expand_once + +typeset -A a +a[0]=0 a[1]=1 + +v=" " + +echo reference: + +echo 1. ${a[ ]} +echo 2. ${a[' ']} +echo 3. "${a[ ]}" +echo 4. ${a[$v]} +echo 5. ${a["$v"]} +echo 6. "${a[$v]}" + +echo assignment: + +echo -n 1. ; a[ ]=10 ; typeset -p a ; a[0]=0 +echo -n 2. ; a[" "]=11 ; typeset -p a ; a[0]=0 +echo -n 3. ; a[$v]=12 ; typeset -p a ; a[0]=0 +echo -n 4. ; a["$v"]=13 ; typeset -p a ; a[0]=0 + +echo arithmetic: + +echo -n 1. ; (( a[ ]=10 )); typeset -p a ; a[0]=0 +echo -n 2. ; (( a[" "]=11 )); typeset -p a ; a[0]=0 +echo -n 3. ; (( a[$v]=12 )); typeset -p a ; a[0]=0 +echo -n 4. ; (( a["$v"]=13 )); typeset -p a ; a[0]=0 +echo -n 5. ; let "a[ ]=10" ; typeset -p a ; a[0]=0 +echo -n 6. ; let "a[\" \"]=11" ; typeset -p a ; a[0]=0 +echo -n 7. ; let "a[$v]=12" ; typeset -p a ; a[0]=0 +echo -n 8. ; let "a[\"$v\"]=13" ; typeset -p a ; a[0]=0 diff --git a/bash-5.1/tests/array26.sub b/bash-5.1/tests/array26.sub new file mode 100644 index 0000000000000000000000000000000000000000..0f6cc8fadfa4da279e0240913dda6f1371d63279 --- /dev/null +++ b/bash-5.1/tests/array26.sub @@ -0,0 +1,131 @@ +# 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 . +# +# these should produce the same results +a=(aa bb) +set -- aa bb + +IFS=+ + +recho ${a[@]} +recho ${a[@]:0} + +recho $@ +recho ${@:1} + +A=${a[*]} B=${a[*]:0} +recho $* ${*:1} +recho ${a[*]} ${a[*]:0} +recho "$A" "$B" +recho $A $B + +unset A B + +recho ${@/a/x} +recho ${a[@]/a/x} +recho "${@/a/x}" +recho "${a[@]/a/x}" + +recho ${*/a/x} +recho ${a[*]/a/x} +recho "${*/a/x}" +recho "${a[*]/a/x}" + +A=${*/a/x} +B=${a[*]/a/x} + +recho "$A" "$B" + +unset A B +declare -A A +A[0]=aa +A[1]=bb + +recho ${A[@]/a/x} +recho "${A[@]/a/x}" +recho ${A[*]/a/x} +recho "${A[*]/a/x}" + +unset A +IFS= + +recho ${@/a/x} +recho ${a[@]/a/x} +recho "${@/a/x}" +recho "${a[@]/a/x}" + +recho ${*/a/x} +recho ${a[*]/a/x} +recho "${*/a/x}" +recho "${a[*]/a/x}" + +A=${*/a/x} +B=${a[*]/a/x} + +recho "$A" "$B" + +unset A B +declare -A A +A[0]=aa +A[1]=bb + +recho ${A[@]/a/x} +recho "${A[@]/a/x}" +recho ${A[*]/a/x} +recho "${A[*]/a/x}" + +unset A + +IFS=+ + +recho ${a[@]} +recho ${a[@],,} +recho "${a[@]}" +recho "${a[@],,}" + +A=${a[*]} B=${a[*],,} +recho $* ${*,,} +recho ${a[*]} ${a[*],,} +recho "${a[*]}" "${a[*],,}" +recho "$A" "$B" +recho $A $B + +unset A B +declare -A A +A[0]=aa +A[1]=bb + +recho ${A[@],,} +recho "${A[@],,}" +recho ${A[*],,} +recho "${A[*],,}" + +unset A + +recho ${a[@]#?} +recho ${@#?} + +A=${a[*]#?} B=${a[*]#?} +recho ${*#?} ${a[*]#?} +recho "$A" "$B" +recho $A $B + +unset A B +declare -A A +A[0]=aa +A[1]=bb + +recho ${A[@]#?} +recho "${A[@]#?}" +recho ${A[*]#?} +recho "${A[*]#?}" diff --git a/bash-5.1/tests/array27.sub b/bash-5.1/tests/array27.sub new file mode 100644 index 0000000000000000000000000000000000000000..44ed444ddfd5f7964b47dffdd4cc2747cca9f805 --- /dev/null +++ b/bash-5.1/tests/array27.sub @@ -0,0 +1,72 @@ +# 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 . +# +# tests for `problem' keys when using associative arrays and assoc_expand_once +# deal with problems for now; this is a placeholder for if and when I fix them + +typeset -A a +shopt -s assoc_expand_once + +k='[' +echo $(( a[$k]=7 )) + +k=']' +echo $(( a[$k]=7 )) + +unset a + +declare -A A + +for k in $'\t' ' '; do + (( A[$k]=2 )) +done +declare -p A + +for k in ']' '*' '@'; do + (( A[$k]=2 )) +done + +declare -p A + +unset A +declare -A A + +for k in $'\t' ' ' ']' '*' '@'; do + read "A[$k]" <<< X +done +declare -p A + +unset A +declare -A A + +for k in $'\t' ' ' ']' '*' '@'; do + printf -v "A[$k]" "%s" X +done +declare -p A + +unset A +declare -A A + +for k in ']' '*' '@'; do + declare A[$k]=X +done +declare -p A + +unset A +declare -A A + +for k in ']' '*' '@'; do + declare "A[$k]=X" +done +declare -p A + diff --git a/bash-5.1/tests/array28.sub b/bash-5.1/tests/array28.sub new file mode 100644 index 0000000000000000000000000000000000000000..e11cdb6dfaf71c18cf00d31a2fadfbdae6520d05 --- /dev/null +++ b/bash-5.1/tests/array28.sub @@ -0,0 +1,30 @@ +# 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 . +# + +# tests for assigning empty string array elements without subscripts +function foo() +{ + local bug=("" "5" "" 1 "") + declare -a bug2=("") + declare -ga bug3=("" "5" "" 1 "") + local not_bug=("no" "nulls") + local workaround; workaround=("") + + declare -p bug bug2 bug3 not_bug workaround +} + +declare -a bug4=("" "5" "" 1 "") +declare -p bug4 + +foo diff --git a/bash-5.1/tests/array3.sub b/bash-5.1/tests/array3.sub new file mode 100644 index 0000000000000000000000000000000000000000..579b42bdbfce6e808f1f051a9e8cdd36a1006359 --- /dev/null +++ b/bash-5.1/tests/array3.sub @@ -0,0 +1,9 @@ +a=(0 1 2 3 4 5 6 7 8 9) + +echo ${a[@]: -1} + +echo ${a[@]:9} +echo ${a[@]:10} +echo ${a[@]:11} + +echo ${a[@]:7:3} diff --git a/bash-5.1/tests/array4.sub b/bash-5.1/tests/array4.sub new file mode 100644 index 0000000000000000000000000000000000000000..443a0fd8df0841d6d0d68452aee4f750e98d4c09 --- /dev/null +++ b/bash-5.1/tests/array4.sub @@ -0,0 +1,45 @@ +# 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 . +# +# compound assignment parsing problems in bash-3.1-release +func() +{ + local -a x=() y=() +} + +a=() b=() +eval foo=() +eval foo=() bar=() qux=( "bash" ) + +foo=( "bash" ) +eval foo=( "bash" ) +eval bar=( "bash" ) bax=( "bash" ) + +let a=(5 + 3) b=(4 + 7) +echo $a $b + +typeset -i a b +a=(5+3) b=(4+7) +echo $a $b + +let a=(4*3)/2 +echo $a +a=(4*3)/2 +echo $a + +LNAME=nordholz +echo ${LNAME} +echo ${#LNAME} + +echo ${#LNAME[$(( 0 ))]} +echo ${#LNAME[$(( 0+0 ))]} diff --git a/bash-5.1/tests/array5.sub b/bash-5.1/tests/array5.sub new file mode 100644 index 0000000000000000000000000000000000000000..0dda696984673991b908a9f04e01de6766aace69 --- /dev/null +++ b/bash-5.1/tests/array5.sub @@ -0,0 +1,47 @@ +# 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 . +# + +: ${TMPDIR:=/tmp} + +mkdir $TMPDIR/bash-test-$$ +cd $TMPDIR/bash-test-$$ + +trap "cd $OLDPWD ; rm -rf $TMPDIR/bash-test-$$" 0 1 2 3 6 15 + +touch '[3]=abcde' + +touch r s t u v + +declare -a x=(*) + +echo ${x[3]} +echo ${x[@]} + +unset x +x=(a b c d e) + +echo ${x[*]: -1} + +unset x[4] +unset x[2] + +x[9]='9' + +echo ${x[*]: -1} + +TOOLKIT=(1 2 3 4 5 6 7 8 9 10) +ARRAY="1" +echo ${TOOLKIT["$ARRAY"]} + +exit 0 diff --git a/bash-5.1/tests/array6.sub b/bash-5.1/tests/array6.sub new file mode 100644 index 0000000000000000000000000000000000000000..2c6c350235e395181e469dfa48b36bb6d50b4e75 --- /dev/null +++ b/bash-5.1/tests/array6.sub @@ -0,0 +1,128 @@ +# 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 . +# +# test cases for array quoting and escaping fixed post bash-3.2-release + +oIFS="$IFS" + +a=(a b c) +echo ${a[@]} + +a2=("${a[@]/#/"-iname '"}") +recho "${a2[@]}" + +echo "${dbg-"'hey'"}" +echo "${dbg-"hey"}" +echo "${dbg-'"'hey}" +echo "${dbg-'"hey'}" + +unset a a2 + +IFS= +a2=(${a[@]/#/"-iname '"}) +recho "${a2[@]}" + +IFS="$oIFS" +unset a a2 + +a=('a b' 'c d' 'e f') + +recho ${a[@]:1:2} +recho "${a[@]:1:2}" + +IFS= +recho ${a[@]:1:2} +recho "${a[@]:1:2}" + +IFS="$oIFS" +unset a a2 + +a=(abc def) + +# Prevent word splitting +#IFS= + +a2=("${a[@]/#/"-iname '"}") +recho "${a2[@]}" + +eval a2=("${a[@]/#/\"-iname \'\"}") +recho "${a2[@]}" + +eval a2=("${a[@]/#/"-iname '"}") +recho "${a2[@]}" + +a2=("${a[@]/#/-iname \'}") +recho "${a2[@]}" + +eval a2=("${a[@]/#/-iname \'}") +recho "${a2[@]}" + +set -- abc def + +a2=("${@/#/"-iname '"}") +recho "${a2[@]}" + +eval a2=("${@/#/\"-iname \'\"}") +recho "${a2[@]}" + +eval a2=("${@/#/"-iname '"}") +recho "${a2[@]}" + +unset a a2 + +IFS= +pat=('*.*') +case $(ls ${pat[@]} 2>/dev/null) in +'') echo '*.* BAD' ;; +*) echo '*.* OK' ;; +esac + +IFS="$oIFS" +unset a a2 pat + +IFS= + +s='abc' + +set - ${s/b/1 2 3} +echo $# +echo "$1" + +IFS="$oIFS" +unset s + +set -- ab cd ef +foo="var with spaces" + +IFS= +recho $foo +recho "$foo" + +recho ${foo}"$@" +recho ${foo}$@ + +array=(ab cd ef) +recho ${foo}"${array[@]}" +recho ${foo}${array[@]} + +recho $(echo $foo)"$@" +recho $(echo $foo)$@ + +a=('word1 with spaces' 'word2 with spaces') +set - ${a[@]/word/element} +echo $# +recho "$@" +recho $@ + +IFS="$oIFS" +unset a a2 array foo diff --git a/bash-5.1/tests/array7.sub b/bash-5.1/tests/array7.sub new file mode 100644 index 0000000000000000000000000000000000000000..8935cc2163e69e1e8a91ce3193b9805ec8bff914 --- /dev/null +++ b/bash-5.1/tests/array7.sub @@ -0,0 +1,14 @@ +# these didn't work in versions of bash before bash-4.0 + +LNAME=nordholz + +echo ${LNAME[$(( 0 ))]//h/!} +echo ${LNAME[$(( 2 ))]//h/!} + +echo ${LNAME[$(( 0 ))]##??} +echo ${LNAME[$(( 2 ))]##??} + +echo ${LNAME[$(( 0 ))]:2} +echo ${LNAME[$(( 0 ))]:2:4} +echo ${LNAME[$(( 2 ))]:2} +echo ${LNAME[$(( 2 ))]:2:4} diff --git a/bash-5.1/tests/array8.sub b/bash-5.1/tests/array8.sub new file mode 100644 index 0000000000000000000000000000000000000000..6e7e2d6c26e41bc843267645a5a286791c33378b --- /dev/null +++ b/bash-5.1/tests/array8.sub @@ -0,0 +1,36 @@ +# 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 . +# +IFS=/ +declare -a i + +i[0]=fooq +i[1]= +i[2]=barq +i[3]= +recho "${i[*]:0}" +recho "${i[@]:0}" + +recho "${i[*]/q/!}" +recho "${i[@]/q/!}" + +recho "${i[*]#?}" +recho "${i[@]#?}" + +# Need to complete this with case-modifying expansion examples +recho "${i[*]^?}" +recho "${i[@]^?}" + +recho "${i[*]^^?}" +recho "${i[@]^^?}" + diff --git a/bash-5.1/tests/array9.sub b/bash-5.1/tests/array9.sub new file mode 100644 index 0000000000000000000000000000000000000000..c3aa31d1f10592b04345f03999d72cdf9a3623c0 --- /dev/null +++ b/bash-5.1/tests/array9.sub @@ -0,0 +1,40 @@ +# 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 . +# +echo $(( 0x7e )) +echo $(( 0x7f )) +echo $(( 0x80 )) + +a=$'\x80' +recho "$a" + +a=( $'\x7e' $'\x7f' $'\x80' ) + +recho "${a[@]}" + +unset a +a[0]=$'\x7e' +a[1]=$'\x7f' +a[2]=$'\x80' + +recho "${a[@]}" + +b1=$'\x7e' +b2=$'\x7f' +b3=$'\x80' + +unset a +a=( "$b1" "$b2" "$b3" ) + +recho "${a[@]}" + diff --git a/bash-5.1/tests/assoc.right b/bash-5.1/tests/assoc.right new file mode 100644 index 0000000000000000000000000000000000000000..e9aa9172cb7d670957fb7d791971b36a27f62532 --- /dev/null +++ b/bash-5.1/tests/assoc.right @@ -0,0 +1,260 @@ +declare -A BASH_ALIASES=() +declare -A BASH_CMDS=() +declare -A fluff +declare -A BASH_ALIASES=() +declare -A BASH_CMDS=() +declare -A fluff=([foo]="one" [bar]="two" ) +declare -A fluff=([foo]="one" [bar]="two" ) +declare -A fluff=([bar]="two" ) +declare -A fluff=([qux]="assigned" [bar]="newval" ) +./assoc.tests: line 39: chaff: four: must use subscript when assigning associative array +declare -A BASH_ALIASES=() +declare -A BASH_CMDS=() +declare -Ai chaff=([one]="10" [zero]="5" ) +declare -Ar waste=([pid]="42134" [lineno]="41" [source]="./assoc.tests" [version]="4.0-devel" ) +declare -A wheat=([two]="b" [three]="c" [one]="a" [zero]="0" ) +declare -A chaff=(["hello world"]="flip" [one]="10" [zero]="5" ) +./assoc.tests: line 51: waste: readonly variable +./assoc.tests: line 52: unset: waste: cannot unset: readonly variable +./assoc.tests: line 53: chaff[*]: bad array subscript +./assoc.tests: line 54: [*]=12: invalid associative array key +declare -A chaff=(["hello world"]="flip" [one]="a" ) +flip +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +./assoc.tests: line 71: declare: chaff: cannot destroy array variables in this way +./assoc.tests: line 73: chaff[*]: bad array subscript +./assoc.tests: line 74: [*]=12: invalid associative array key +declare -A wheat=([six]="6" ["foo bar"]="qux qix" ) +argv[1] = +argv[2] = +argv[1] = +declare -A wheat=([six]="6" ["foo bar"]="qux qix" ) +argv[1] = <2> +argv[1] = <7> +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = <16> +argv[1] = <16> +argv[1] = <6> +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +8 +/usr/local/bin /bin . /usr/bin /usr/ucb /usr/sbin /bin /sbin +bin bin . bin ucb sbin bin sbin +bin +/ / / / / / / +/ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +8 +/usr/local/bin /bin . /usr/bin /usr/ucb /usr/sbin /bin /sbin +bin bin . bin ucb sbin bin sbin +/ / / / / / / +8 +4 -- /bin +^usr^local^bin ^bin . ^usr^bin ^usr^ucb ^usr^sbin ^bin ^sbin +^usr^local^bin ^bin . ^usr^bin ^usr^ucb ^usr^sbin ^bin ^sbin +\usr/local/bin \bin . \usr/bin \usr/ucb \usr/sbin \bin \sbin +\usr\local\bin \bin . \usr\bin \usr\ucb \usr\sbin \bin \sbin +\usr\local\bin \bin . \usr\bin \usr\ucb \usr\sbin \bin \sbin +([a]=1) + +foo qux +/usr/sbin/foo /usr/local/bin/qux +hits command + 0 /usr/sbin/foo + 0 /bin/sh + 0 /sbin/blat + 0 /usr/local/bin/qux +foo sh blat qux +/usr/sbin/foo /bin/sh /sbin/blat /usr/local/bin/qux + +foo qux +argv[1] = +argv[2] = +argv[3] = <-l> +alias blat='cd /blat ; echo $PWD' +alias foo='/usr/sbin/foo' +alias qux='/usr/local/bin/qux -l' +alias sh='/bin/bash --login -o posix' +blat foo sh qux +argv[1] = +argv[2] = +argv[3] = +argv[4] = +outside: outside +declare -A BASH_ALIASES=() +declare -A BASH_CMDS=() +declare -A afoo=([six]="six" ["foo bar"]="foo quux" ) +argv[1] = +argv[2] = +argv[3] = +outside 2: outside +argv[1] = +argv[1] = <> +argv[2] = +argv[3] = <> +argv[4] = +argv[1] = +argv[1] = <> +argv[2] = +argv[3] = <> +argv[4] = +argv[1] = +argv[1] = <> +argv[2] = +argv[3] = <> +argv[4] = +argv[1] = +argv[1] = <> +argv[2] = +argv[3] = <> +argv[4] = +argv[1] = +argv[1] = <> +argv[2] = +argv[3] = <> +argv[4] = +abc +def +def +./assoc5.sub: line 26: declare: `myarray[foo[bar]=bleh': not a valid identifier +def bleh abc +myarray=(["]"]="def" [foo]="bleh" ["a]a"]="abc" ["a]=test1;#a"]="123" ) + +123 +myarray=(["]"]="def" ["a]=test2;#a"]="def" [foo]="bleh" ["a]a"]="abc" ["a]=test1;#a"]="123" ) +bar"bie +doll +declare -A foo=(["bar\"bie"]="doll" ) +bar"bie +doll +declare -A foo=(["bar\"bie"]="doll" ) +bar"bie +doll +declare -A foo=(["bar\"bie"]="doll" ) +bar"bie +doll +declare -A foo=(["bar\"bie"]="doll" ) +bar"bie +doll +declare -A foo=(["bar\"bie"]="doll" ) +bar'bie +doll +declare -A foo=(["bar'bie"]="doll" ) +bar'bie +doll +declare -A foo=(["bar'bie"]="doll" ) +bar'bie +doll +declare -A foo=(["bar'bie"]="doll" ) +bar'bie +doll +declare -A foo=(["bar'bie"]="doll" ) +bar'bie +doll +declare -A foo=(["bar'bie"]="doll" ) +bar$bie +doll +declare -A foo=(["bar\$bie"]="doll" ) +bar[bie +doll +declare -A foo=(["bar[bie"]="doll" ) +bar`bie +doll +declare -A foo=(["bar\`bie"]="doll" ) +bar\]bie +doll +declare -A foo=(["bar\\]bie"]="doll" ) +bar${foo}bie +doll +declare -A foo=(["bar\${foo}bie"]="doll" ) +bar +after printf +after use: 0 +declare -A assoc=([0]="assoc" ) +assoc +declare -A assoc=([two]="twoless" [three]="three" [one]="onemore" ) +declare -Ar assoc=([two]="twoless" [three]="three" [one]="onemore" ) +declare -A hash=([key]="value1" ) +declare -A hash=([key]="value1 value2" ) +declare -A b=([")"]="" ["\""]="" ["]"]="" ["\\"]="" ["\`"]="" ) +declare -A b=(["]"]="" ["\`"]="" ) +declare -A dict=(["'"]="3" ["\""]="1" ["\\"]="4" ["\`"]="2" ) +./assoc9.sub: line 36: unset: `dict[']': not a valid identifier +./assoc9.sub: line 36: unset: `dict["]': not a valid identifier +./assoc9.sub: line 36: unset: `dict[\]': not a valid identifier +./assoc9.sub: line 36: unset: `dict[`]': not a valid identifier +declare -A dict=(["'"]="3" ["\""]="1" ["\\"]="4" ["\`"]="2" ) +declare -A dict=(["'"]="3" ["\""]="1" ["\\"]="4" ["\`"]="2" ) +declare -A dict=() +4 +4 +a[$b]= 5 +declare -A a=(["80's"]="Depeche Mode" ) +./assoc9.sub: line 84: read: `a[80's]': not a valid identifier +declare -A a +declare -A a=(["80's"]="Depeche Mode" ) +./assoc9.sub: line 96: printf: `a[80's]': not a valid identifier +declare -A a +declare -A a=(["80's"]="Depeche Mode" ) +6 +1 +1+5 +declare -A a=(["\$(date >&2)"]="5" ) +declare -A myarray=([foo]="bleh" ["foo[bar"]="bleh" ) +foo +./assoc10.sub: line 14: declare: a: cannot convert indexed to associative array +f: declare -a a +./assoc10.sub: line 17: declare: a: cannot convert associative to indexed array +f: declare -A a + +f: declare -a a +main: declare -- a="7" +f: declare -A a +main: declare -- a="42" +declare -A a=([3]="" [1]="2" ) +declare -A foo=([d]="4" [c]="3" [b]="2" [a]="1" ) +foo=( d "4" c "3" b "2" a "1" ) +declare -A foo=(["\\"]="5" ["@"]="3" ["holy hell this works"]="4" ["a b"]="1" ["spa ces"]="2" ) +foo=( echo "\\" "5" "@" "3" "holy hell this works" "4" "a b" "1" "spa ces" "2" ) +./assoc11.sub: line 34: "": bad array subscript +declare -A foo=([";"]="semicolon" ["]"]="def" [a=b]="assignment" ["a]a"]="abc" ["foo[bar"]="bleh" ) +foo=( ";" "semicolon" "]" "def" a=b "assignment" "a]a" "abc" "foo[bar" "bleh" ) +declare -A foo=(["'"]="squote" ["\""]="dquote" ["\\"]="bslash" ["\`"]="backquote" ) +foo=( "'" "squote" "\"" "dquote" "\\" "bslash" "\`" "backquote" ) +declare -A foo=(["bar]bie"]="doll" ["a]=test1;#a"]="123" ["bar\"bie"]="doll" ) +foo=( "bar]bie" "doll" "a]=test1;#a" "123" "bar\"bie" "doll" ) +declare -A inside=([c]="3" [b]="2" [a]="1" ) +inside=( c "3" b "2" a "1" ) +declare -A dict=(["?"]="quest" ["*"]="star" ["'"]="squote" ["\$"]="dol" ["\""]="dquote" ["\\"]="bslash" ["@"]="at" ["}"]="rbrace" ["{"]="lbrace" ["\`"]="bquote" ) +dict=( "?" "quest" "*" "star" "'" "squote" "\$" "dol" "\"" "dquote" "\\" "bslash" "@" "at" "}" "rbrace" "{" "lbrace" "\`" "bquote" ) +declare -A foo=([two]="" [one]="1" ) +foo=( two "" one "1" ) +rparen dquote rbrace bs +declare -A a=([")"]="rparen" ["\""]="dquote" ["]"]="rbrace" ["\\"]="bs" ) +")" "rparen" "\"" "dquote" "]" "rbrace" "\\" "bs" +declare -A a=([")"]="rparen" ["\""]="dquote" ["]"]="rbrace" ["\\"]="bs" ) +declare -A a=([")"]="rparen" ["\""]="dquote" ["]"]="rbrace" ["\\"]="bs" ) +declare -A a=([")"]="rparen" ["\""]="dquote" ["]"]="rbrace" ["\\"]="bs" ) +declare -Arx foo=([two]="2" [three]="3" [one]="1" ) +./assoc11.sub: line 90: foo: readonly variable diff --git a/bash-5.1/tests/assoc.tests b/bash-5.1/tests/assoc.tests new file mode 100644 index 0000000000000000000000000000000000000000..8d5c89275f432bb35b22987c5c2ccd6a1f5323cd --- /dev/null +++ b/bash-5.1/tests/assoc.tests @@ -0,0 +1,246 @@ +# 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 . +# +# TEST - basic declaration and assignment +typeset -A fluff +declare -A + +fluff[foo]=one +fluff[bar]=two + +declare -A +declare -p fluff + +unset fluff[foo] +declare -p fluff + +fluff[bar]=newval +declare fluff[qux]=assigned + +declare -p fluff + +unset fluff + +# TEST - compound assignment and variable attributes +declare -A wheat chaff +wheat=( [zero]=0 [one]=a [two]=b [three]=c ) + +declare -i chaff +chaff=( [zero]=1+4 [one]=3+7 four ) + +declare -A waste=( [pid]=42134 [version]=4.0-devel [source]=$0 [lineno]=$LINENO ) +declare -r waste + +declare -A + +declare +i chaff +chaff[hello world]=flip +declare -p chaff + +# TEST - errors +waste[stuff]=other +unset waste +chaff[*]=12 +chaff=( [one]=a [*]=12 ) + +# TEST - key expansion -- no word splitting +chaff[hello world]=flip +declare -p chaff +echo ${chaff[hello world]} + +chaff[box]="multiple words" + +recho ${chaff[@]} +recho "${chaff[@]}" + +recho ${chaff[*]} +recho "${chaff[*]}" + +unset chaff +declare -A chaff[200] +declare +A chaff + +chaff[*]=12 +chaff=( [one]=a [*]=12 ) + +# TEST - keys and values containing spaces +unset wheat +declare -A wheat +wheat=([six]=6 [foo bar]="qux qix" ) + +declare -p wheat + +unset wheat +declare -A wheat=([six]=6 [foo bar]="qux qix" ) + +recho ${wheat[foo bar]} +recho "${wheat[foo bar]}" + +declare -p wheat + +# TEST - basic expansions: number of elements and value length +unset wheat +typeset -A wheat +wheat=([six]=6 [foo bar]="qux qix" ) + +recho ${#wheat[@]} + +recho ${#wheat[foo bar]} + +# TEST - appending assignment operator +unset wheat +typeset -A wheat +wheat=([six]=6 [foo bar]="qux qix" ) + +wheat[foo bar]+=' blat' + +recho ${wheat[foo bar]} +recho "${wheat[foo bar]}" +unset wheat + +flix=9 +typeset -Ai wheat +wheat=([six]=6 [foo bar]=flix ) + +wheat[foo bar]+=7 + +recho ${wheat[foo bar]} +recho "${wheat[foo bar]}" +unset flix wheat + +# TEST - index expansion: no word splitting or globbing +typeset -A wheat +cd ${TMPDIR:=/tmp} +touch '[sfiri]' +wheat=([s*]=6 [foo bar]=flix ) + +recho ${wheat[@]} +rm '[sfiri]' +cd $OLDPWD + +# TEST -- associative array keys expansion +unset wheat +typeset -A wheat + +wheat=([six]=6 [foo bar]=flix ) + +recho ${!wheat[@]} +recho "${!wheat[@]}" + +# TEST -- associative array pattern removal +unset xpath +typeset -A xpath + +xpath=( [0]=/bin [one]=/bin [two]=/usr/bin [three]=/usr/ucb [four]=/usr/local/bin) +xpath+=( [five]=/sbin [six]=/usr/sbin [seven]=. ) + +echo ${#xpath[@]} + +echo ${xpath[@]} +echo ${xpath[@]##*/} +echo ${xpath[0]##*/} +echo ${xpath[@]%%[!/]*} +echo ${xpath[0]%%[!/]*} +recho ${xpath##*/} +recho ${xpath%%[!/]*} +recho ${xpath[five]##*/} +recho ${xpath[five]%%[!/]*} + +echo ${#xpath[*]} + +echo ${xpath[*]} +echo ${xpath[*]##*/} +echo ${xpath[*]%%[!/]*} + +# TEST -- associative array pattern substitution +unset xpath +typeset -A xpath + +xpath=( [0]=/bin [one]=/bin [two]=/usr/bin [three]=/usr/ucb [four]=/usr/local/bin) +xpath+=( [five]=/sbin [six]=/usr/sbin [seven]=. ) + +echo ${#xpath[@]} +# default element is "0" (as a string) +echo ${#xpath} -- ${xpath["0"]} + +echo ${xpath[@]//\//^} +echo "${xpath[@]//\//^}" | cat -v + +zecho "${xpath[@]/\//\\}" +zecho "${xpath[@]//\//\\}" +zecho "${xpath[@]//[\/]/\\}" + +# test assignment to key "0" +unset T +declare -A T +T='([a]=1)' +echo "${T[@]}" +unset T + +# peculiar ksh93 semantics for unsubscripted assoc variable reference +declare -A T +T[0]='zero' +if [ "$T" != "${T[0]}" ]; then + echo 'assoc.tests: $T and ${T[0]} mismatch' +fi + +${THIS_SH} ./assoc1.sub + +${THIS_SH} ./assoc2.sub + +${THIS_SH} ./assoc3.sub + +${THIS_SH} ./assoc4.sub + +${THIS_SH} ./assoc5.sub + +${THIS_SH} ./assoc6.sub + +${THIS_SH} ./assoc7.sub + +# test converting between scalars and assoc arrays +unset assoc +assoc=assoc +declare -A assoc +declare -p assoc +echo ${assoc[@]} + +# weird syntax required to append to multiple existing array elements using +# compound assignment syntax +unset assoc +declare -A assoc +assoc=( [one]=one [two]=two [three]=three ) +assoc+=( [one]+=more [two]+=less ) +declare -p assoc + +readonly -A assoc +declare -p assoc + +declare -A hash + +hash=(["key"]="value1") +declare -p hash +hash=(["key"]="${hash["key"]} value2") +declare -p hash + +unset hash + +${THIS_SH} ./assoc8.sub + +# new shopt option to prevent multiple expansion of assoc array subscripts +${THIS_SH} ./assoc9.sub + +${THIS_SH} ./assoc10.sub + +# test assigning associative arrays using compound key/value pair assignments +${THIS_SH} ./assoc11.sub diff --git a/bash-5.1/tests/assoc1.sub b/bash-5.1/tests/assoc1.sub new file mode 100644 index 0000000000000000000000000000000000000000..99a6e22ab431e45325d501f0b30be21c2862f6f0 --- /dev/null +++ b/bash-5.1/tests/assoc1.sub @@ -0,0 +1,29 @@ +# 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 . +# +hash -r +echo ${BASH_CMDS[@]} + +hash -p /usr/sbin/foo foo +hash -p /usr/local/bin/qux qux + +echo ${!BASH_CMDS[@]} +echo ${BASH_CMDS[@]} + +BASH_CMDS[blat]=/sbin/blat +BASH_CMDS[sh]=/bin/sh + +hash + +echo ${!BASH_CMDS[@]} +echo "${BASH_CMDS[@]}" diff --git a/bash-5.1/tests/assoc10.sub b/bash-5.1/tests/assoc10.sub new file mode 100644 index 0000000000000000000000000000000000000000..5b215258abc1c9394537a5fabed0a7900aaf017d --- /dev/null +++ b/bash-5.1/tests/assoc10.sub @@ -0,0 +1,30 @@ +# 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 . +# +f() { declare -a a; declare -A a; echo -n "$FUNCNAME: " ; declare -p a; } +f + +f() { declare -A a; declare -a a; echo -n "$FUNCNAME: " ; declare -p a; } +f + +echo + +f() { declare -a a; echo -n "$FUNCNAME: " ; declare -p a; } +a=7 +f +echo -n 'main: '; declare -p a + +f() { declare -A a; echo -n "$FUNCNAME: " ; declare -p a; } +a=42 +f +echo -n 'main: '; declare -p a diff --git a/bash-5.1/tests/assoc11.sub b/bash-5.1/tests/assoc11.sub new file mode 100644 index 0000000000000000000000000000000000000000..13111a52b14a47ccdb275a9eb1ec309cba79dafd --- /dev/null +++ b/bash-5.1/tests/assoc11.sub @@ -0,0 +1,90 @@ +# 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 . +# +# these tests were previously in array19.sub, but they are acceptable syntax now + +declare -A a +declare a='(1 2 3)' +declare -p a +unset a + +declare -A foo + +v1='spa ces' +v2=@ + +foo=(a 1 b 2 c 3 d 4 ) +declare -p foo +echo foo=\( ${foo[@]@K} \) + +foo=('a b' 1 "$v1" 2 "$v2" 3 'holy hell this works' 4 \\ 5) +declare -p foo +echo foo=\( echo ${foo[@]@K} \) + +foo=( "" null ) + +foo=('a]a' abc ']' def $(echo 'foo[bar') bleh \; semicolon a=b assignment) +declare -p foo +echo foo=\( ${foo[@]@K} \) + +foo=('`' backquote '"' dquote "'" squote \\ bslash) +declare -p foo +echo foo=\( ${foo[@]@K} \) + +bar='a]=test1;#a' +foo=( $bar 123 bar\"bie doll bar]bie doll ) +declare -p foo +echo foo=\( ${foo[@]@K} \) + +func() +{ + declare -A inside=(a 1 b 2 c 3) + declare -p inside + echo inside=\( ${inside[@]@K} \) +} +func + +loaddict() +{ + dict=( '"' dquote '`' bquote "'" squote '\' bslash) + dict+=( '$' dol @ at * star \{ lbrace \} rbrace ? quest) + + declare -p dict + echo dict=\( ${dict[@]@K} \) +} +declare -A dict +loaddict + +foo=(one 1 two) +declare -p foo +echo foo=\( ${foo[@]@K} \) + +typeset -A a=( [\\]=bs [\"]=dquote [\)]=rparen [\]]=rbrace ) +echo ${a[@]} +declare -p a + +echo ${a[@]@K} +echo ${a[@]@A} + +eval "${a[@]@A}" +declare -p a + +eval "a=( ${a[@]@K} )" +declare -p a + +unset a foo +readonly -A foo=( one 1 two 2 three 3 ) + +export foo +declare -p foo +declare foo+=( seven 7 eight 8 ) diff --git a/bash-5.1/tests/assoc2.sub b/bash-5.1/tests/assoc2.sub new file mode 100644 index 0000000000000000000000000000000000000000..470e2c942a6c319a103d344808d1715177c4a91f --- /dev/null +++ b/bash-5.1/tests/assoc2.sub @@ -0,0 +1,28 @@ +# 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 . +# +echo ${BASH_ALIASES[@]} + +alias foo=/usr/sbin/foo +alias qux='/usr/local/bin/qux -l' + +echo ${!BASH_ALIASES[@]} +recho ${BASH_ALIASES[@]} + +BASH_ALIASES[blat]='cd /blat ; echo $PWD' +BASH_ALIASES[sh]='/bin/bash --login -o posix' + +alias -p + +echo ${!BASH_ALIASES[@]} +recho "${BASH_ALIASES[@]}" diff --git a/bash-5.1/tests/assoc3.sub b/bash-5.1/tests/assoc3.sub new file mode 100644 index 0000000000000000000000000000000000000000..a7eeb26549724d563fdd9323140aa679afdd0fbb --- /dev/null +++ b/bash-5.1/tests/assoc3.sub @@ -0,0 +1,28 @@ +# 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 . +# +foo() +{ + declare -A afoo=([six]="six" [foo bar]="foo quux") + + declare -A + recho inside: "${afoo[@]}" +} + +declare -A afoo=([main]=outside) +echo outside: "${afoo[@]}" + +foo + +echo outside 2: "${afoo[@]}" + diff --git a/bash-5.1/tests/assoc4.sub b/bash-5.1/tests/assoc4.sub new file mode 100644 index 0000000000000000000000000000000000000000..eff9d0e88acfc4b6252221af2e7d9a35ee587533 --- /dev/null +++ b/bash-5.1/tests/assoc4.sub @@ -0,0 +1,35 @@ +# 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 . +# +IFS=/ +declare -A i + +i[0]=fooq +i[1]= +i[2]=barq +i[3]= + +recho "${i[*]:0}" +recho "${i[@]:0}" + +recho "${i[*]/q/!}" +recho "${i[@]/q/!}" + +recho "${i[*]#?}" +recho "${i[@]#?}" + +# Need to complete this with case-modifying expansion examples +recho "${i[*]^?}" +recho "${i[@]^?}" +recho "${i[*]^^?}" +recho "${i[@]^^?}" diff --git a/bash-5.1/tests/assoc5.sub b/bash-5.1/tests/assoc5.sub new file mode 100644 index 0000000000000000000000000000000000000000..844d944162af9b6ccb79e435fa9fbdc2e30bc040 --- /dev/null +++ b/bash-5.1/tests/assoc5.sub @@ -0,0 +1,40 @@ +# 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 . +# +declare -A myarray + +# this needs fixes to skipsubscript +myarray["a]a"]="abc" + +echo ${myarray["a]a"]} + +myarray[$(echo ])]=def + +echo ${myarray[']']} +echo ${myarray[\]]} + +declare myarray["foo[bar"]=bleh +myarray["foo"]=bleh + +echo "${myarray[@]}" + +bar='a]=test1;#a' +myarray[$bar]=123 + +set | grep ^myarray= +echo ${myarray[a]} + +echo "${myarray['a]=test1;#a']}" +myarray['a]=test2;#a']="def" + +set | grep ^myarray= diff --git a/bash-5.1/tests/assoc6.sub b/bash-5.1/tests/assoc6.sub new file mode 100644 index 0000000000000000000000000000000000000000..88b8eaf20feb112a4b4032e59a927996899d31a0 --- /dev/null +++ b/bash-5.1/tests/assoc6.sub @@ -0,0 +1,159 @@ +# 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 . +# +declare -A foo + +foo=([bar\"bie]=doll) + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo=(["bar\"bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=(["bar\"bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo["bar\"bie"]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo[bar\"bie]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=([bar\'bie]=doll) + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo=(["bar'bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=(["bar'bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo["bar'bie"]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo[bar\'bie]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=([bar\$bie]=doll) + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo=(["bar[bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=(["bar\`bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +# this doesn't work right without the backslash +foo["bar\]bie"]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo[bar\${foo}bie]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo diff --git a/bash-5.1/tests/assoc7.sub b/bash-5.1/tests/assoc7.sub new file mode 100644 index 0000000000000000000000000000000000000000..cae57c5529e331359ea0cdaf8a1594ee9cfb0a37 --- /dev/null +++ b/bash-5.1/tests/assoc7.sub @@ -0,0 +1,29 @@ +# 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 . +# +# problem with bash versions through bash-4.2 +foo() +{ + declare -A hash + declare hash[baz]=bar #bash crashes here + + echo ${hash[@]} +} + +foo + +declare -a ary +printf -v ary[0] "%b" "" +echo "after printf" +x="${ary[*]}" # segfaults here +echo "after use: $?" diff --git a/bash-5.1/tests/assoc8.sub b/bash-5.1/tests/assoc8.sub new file mode 100644 index 0000000000000000000000000000000000000000..83b43f4894a32fc008e0fa54c1df2ac7874be931 --- /dev/null +++ b/bash-5.1/tests/assoc8.sub @@ -0,0 +1,7 @@ +# warnings introduced beginning with bash-4.4-alpha + +var=foo; declare -A "arr$var=([x]=y)" + +key1=foo key2=bar + +declare -A a=([foo]='([bar]=baz)') "b=${a[$key1]}" diff --git a/bash-5.1/tests/assoc9.sub b/bash-5.1/tests/assoc9.sub new file mode 100644 index 0000000000000000000000000000000000000000..b88671873e326f7e34877298ee1f80b9136654be --- /dev/null +++ b/bash-5.1/tests/assoc9.sub @@ -0,0 +1,130 @@ +# 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 . +# +typeset -A a=( [\\]= [\"]= [\)]= ) b +for x in "${!a[@]}"; do b[$x]=; done +b+=([\`]= [\]]=) +typeset -p b +for x in "${!a[@]}"; do + unset -v 'b[$x]' +done +typeset -p b + +unset -v a b + +loaddict() +{ + dict['"']=1 + dict['`']=2 + dict["'"]=3 + dict['\']=4 + declare -p dict +} + +del() +{ + unset -v dict["$1"]; +} + +declare -A dict +loaddict +for k in "${!dict[@]}"; do del "$k"; done +declare -p dict + +unset 'dict[@]' + +shopt -s assoc_expand_once +declare -A dict +loaddict +for k in "${!dict[@]}"; do del "$k"; done +declare -p dict + +unset a b dict + +typeset -A a +b="80's" + +((++a[$b])) + +((++a["$b"])) +[[ $((++a[$b])) ]] +[[ $((++a["$b"])) ]] +echo ${a["$b"]} +echo ${a[$b]} + +let "++a[$b]" + +echo 'a[$b]=' "${a[$b]}" + +unset a b + +declare -A a +b="80's" + +: ${a[$b]:='Depeche Mode'} + +declare -p a + +unset a b +shopt -u assoc_expand_once + +typeset -A a +b="80's" + +read a[$b] <<<"Depeche Mode" +typeset -p a + +shopt -s assoc_expand_once +read a[$b] <<<"Depeche Mode" +typeset -p a + +unset a +shopt -u assoc_expand_once + +typeset -A a + +printf -v a[$b] "%s" "Depeche Mode" +typeset -p a + +shopt -s assoc_expand_once + +printf -v a[$b] "%s" "Depeche Mode" +typeset -p a + +unset a + +declare -A a +x='$(date >&2)' +a[$x]=5 + +shopt -s assoc_expand_once +echo $((1+a[$x])) +echo $((1+a[\$x])) +echo "1+${a[$x]}" + +declare -p a + +shopt -s assoc_expand_once +declare -A myarray + +declare myarray["foo[bar"]=bleh +myarray["foo"]=bleh + +declare -p myarray + +key='$(date >&2)' +declare -A aa +aa[$key]=foo +echo "${aa[$key]}" + +[[ -v aa[$key] ]] || echo bad assoc expansion diff --git a/bash-5.1/tests/attr.right b/bash-5.1/tests/attr.right new file mode 100644 index 0000000000000000000000000000000000000000..d2d28b7b41f4f31178b182478fa4446ee75b4c96 --- /dev/null +++ b/bash-5.1/tests/attr.right @@ -0,0 +1,37 @@ +after f1:declare -ar a=([0]="1") +./attr.tests: line 17: a: readonly variable +after f2:declare -ar a=([0]="1") +./attr.tests: line 18: a: readonly variable +after f3:declare -ar a=([0]="1") +./attr.tests: line 19: readonly: a: readonly variable +after f4:declare -ar a=([0]="1") +after f2:declare -ar b=([0]="2") +after f3:declare -ar c=([0]="(3)") +after f4:declare -ar d=([0]="4") +declare -r m="4" +in func:declare -r n="4" +declare -r n="4" +./attr1.sub: line 26: p: readonly variable +declare -r p="1" +./attr1.sub: line 32: r: readonly variable +declare -ar r=([0]="1") +./attr1.sub: line 36: r: readonly variable +declare -ar r=([0]="1") +./attr1.sub: line 40: r: readonly variable +declare -ar r=([0]="1") +./attr1.sub: line 44: readonly: r: readonly variable +declare -ar r=([0]="1") +declare -ar x=([0]="4") +in func:declare -ar y=([0]="4") +declare -ar y=([0]="4") +in func:declare -ar z=([0]="4") +declare -ar z=([0]="4") +in func:declare -ar y1=([0]="4") +declare -ar y1=([0]="4") +in func:declare -ar z1=([0]="4") +declare -ar z1=([0]="4") +declare -x p="4" +declare -ax r=([0]="4") +declare -ax r=([0]="(5)") +declare -ax r=([0]="6") +declare -ax r=([0]="7") diff --git a/bash-5.1/tests/attr.tests b/bash-5.1/tests/attr.tests new file mode 100644 index 0000000000000000000000000000000000000000..4874d9a755419b0bd0c70126aa754855af5d9fcd --- /dev/null +++ b/bash-5.1/tests/attr.tests @@ -0,0 +1,54 @@ +# 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 . +# +a=(outside) + +f1() { readonly a=(1) ; } +f2() { readonly -a a=(2) ; } +f3() { readonly 'a=(3)' ; } +f4() { readonly -a 'a=(4)' ; } + +f1 +echo -n after f1: +declare -p a +f2 +echo -n after f2: +declare -p a +f3 +echo -n after f3: +declare -p a +f4 +echo -n after f4: +declare -p a + +b=(outside) +c=(outside) +d=(outside) + +f2() { readonly -a b=(2) ; } +f3() { readonly 'c=(3)' ; } +f4() { readonly -a 'd=(4)' ; } + +f2 +echo -n after f2: +declare -p b +f3 +echo -n after f3: +declare -p c +f4 +echo -n after f4: +declare -p d + +${THIS_SH} ./attr1.sub +${THIS_SH} ./attr2.sub + diff --git a/bash-5.1/tests/attr1.sub b/bash-5.1/tests/attr1.sub new file mode 100644 index 0000000000000000000000000000000000000000..4424be959213b1326f5c565a64e20d826eba81f3 --- /dev/null +++ b/bash-5.1/tests/attr1.sub @@ -0,0 +1,68 @@ +# 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 . +# +m=1 +readonly m=4 +declare -p m + +n=1 +f() { readonly n=4; echo -n in func: ; declare -p n ; } +f +declare -p n + +p=1 +readonly p + +readonly p=4 +declare -p p + +r=(1) +readonly r + +f() { readonly r=(4) ; } +f +declare -p r + +f() { readonly r='(5)' ; } +f +declare -p r + +f() { readonly -a r=(6) ; } +f +declare -p r + +f() { readonly -a r='(7)' ; } +f +declare -p r + +x=(1) +readonly x=(4) +declare -p x + +y=(1) +f() { readonly y=(4); echo -n in func: ; declare -p y; } +f +declare -p y + +z=(1) +f() { readonly -a z=(4); echo -n in func: ; declare -p z; } +f +declare -p z + +f() { readonly y1=(4); echo -n in func: ; declare -p y1; } +f +declare -p y1 + +f() { readonly -a z1=(4); echo -n in func: ; declare -p z1; } +f +declare -p z1 diff --git a/bash-5.1/tests/attr2.sub b/bash-5.1/tests/attr2.sub new file mode 100644 index 0000000000000000000000000000000000000000..dadca10b711189760801047ef14620c54a0f7878 --- /dev/null +++ b/bash-5.1/tests/attr2.sub @@ -0,0 +1,37 @@ +# 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 . +# +p=1 +export p + +export p=4 +declare -p p + +r=(1) +export r + +f() { export r=(4) ; } +f +declare -p r + +f() { export r='(5)' ; } +f +declare -p r + +f() { export -a r=(6) ; } +f +declare -p r + +f() { export -a r='(7)' ; } +f +declare -p r diff --git a/bash-5.1/tests/braces.right b/bash-5.1/tests/braces.right new file mode 100644 index 0000000000000000000000000000000000000000..401754647867b707747d4dfc7934930cbd38bd09 --- /dev/null +++ b/bash-5.1/tests/braces.right @@ -0,0 +1,77 @@ +ffc ffb ffa +fdg feg ffg +lxyz nxyz mxyz +{abc,def} +{abc} +{a,b,c,d,e} +x} y} {a} b} c} +x,y {abc} trie +/usr/ucb/ex /usr/ucb/edit /usr/lib/ex /usr/lib/how_ex +XXXX{a,b,c} +XXXXa XXXXb XXXXc +{} +{ } +} +{ +abcd{efgh +foo 1 2 bar +foo 1 2 bar +foo 1 2 bar +foobar foobaz. +foobar foobaz +bazx bazy +vx vy +bazx bazy +1 2 3 4 5 6 7 8 9 10 +0..10 braces +0 1 2 3 4 5 6 7 8 9 10 braces +x0y x1y x2y x3y x4y x5y x6y x7y x8y x9y x10y xbracesy +3 +x3y +10 9 8 7 6 5 4 3 2 1 +10y 9y 8y 7y 6y 5y 4y 3y 2y 1y +x10y x9y x8y x7y x6y x5y x4y x3y x2y x1y +a b c d e f +f e d c b a +a ` _ ^ ] [ Z Y X W V U T S R Q P O N M L K J I H G F E D C B A +A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a +f +{1..f} +{f..1} +01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 +-1 -2 -3 -4 -5 -6 -7 -8 -9 -10 +-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 +a-{bd}-c a-{be}-c +a-{bdef-g-c a-{bdef-i-c +{klklkl}1 {klklkl}2 {klklkl}3 +{x,x} +1 3 5 7 9 +-1 -3 -5 -7 -9 +-1 -3 -5 -7 -9 +10 8 6 4 2 +10 8 6 4 2 +1 3 5 7 9 11 13 15 17 19 +1 +100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0 +100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0 +a b c d e f g h i j k l m n o p q r s t u v w x y z +a c e g i k m o q s u w y +z x v t r p n l j h f d b +2147483645 2147483646 2147483647 2147483648 2147483649 +10 8 6 4 2 0 +10 8 6 4 2 0 +-50 -45 -40 -35 -30 -25 -20 -15 -10 -5 0 +{1..10.f} +{1..ff} +{1..10..ff} +{1.20..2} +{1..20..f2} +{1..20..2f} +{1..2f..2} +{1..ff..2} +{1..ff} +{1..f} +{1..0f} +{1..10f} +{1..10.f} +{1..10.f} diff --git a/bash-5.1/tests/braces.tests b/bash-5.1/tests/braces.tests new file mode 100644 index 0000000000000000000000000000000000000000..da0b624bce1b2542f23ef4dd01797a8c3af5c8b0 --- /dev/null +++ b/bash-5.1/tests/braces.tests @@ -0,0 +1,132 @@ +# 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 . +# +echo ff{c,b,a} +echo f{d,e,f}g +echo {l,n,m}xyz +echo {abc\,def} +echo {abc} + +echo \{a,b,c,d,e} +echo {x,y,\{a,b,c}} +echo {x\,y,\{abc\},trie} + +echo /usr/{ucb/{ex,edit},lib/{ex,how_ex}} + +echo XXXX\{`echo a b c | tr ' ' ','`\} +eval echo XXXX\{`echo a b c | tr ' ' ','`\} + +echo {} +echo { } +echo } +echo { +echo abcd{efgh + +echo foo {1,2} bar +echo `zecho foo {1,2} bar` +echo $(zecho foo {1,2} bar) + +var=baz +varx=vx +vary=vy + +echo foo{bar,${var}.} +echo foo{bar,${var}} + +echo "${var}"{x,y} +echo $var{x,y} +echo ${var}{x,y} + +unset var varx vary + +# new sequence brace operators +echo {1..10} + +# this doesn't work yet +echo {0..10,braces} +# but this does +echo {{0..10},braces} +echo x{{0..10},braces}y + +echo {3..3} +echo x{3..3}y +echo {10..1} +echo {10..1}y +echo x{10..1}y + +echo {a..f} +echo {f..a} + +echo {a..A} +echo {A..a} + +echo {f..f} + +# mixes are incorrectly-formed brace expansions +echo {1..f} +echo {f..1} + +echo 0{1..9} {10..20} + +# do negative numbers work? +echo {-1..-10} +echo {-20..0} + +# weirdly-formed brace expansions -- fixed in post-bash-3.1 +echo a-{b{d,e}}-c + +echo a-{bdef-{g,i}-c + +echo {"klklkl"}{1,2,3} +echo {"x,x"} + +echo {1..10..2} +echo {-1..-10..2} +echo {-1..-10..-2} + +echo {10..1..-2} +echo {10..1..2} + +echo {1..20..2} +echo {1..20..20} + +echo {100..0..5} +echo {100..0..-5} + +echo {a..z} +echo {a..z..2} +echo {z..a..-2} + +# make sure brace expansion handles ints > 2**31 - 1 using intmax_t +echo {2147483645..2147483649} + +# unwanted zero-padding -- fixed post-bash-4.0 +echo {10..0..2} +echo {10..0..-2} +echo {-50..-0..5} + +# bad +echo {1..10.f} +echo {1..ff} +echo {1..10..ff} +echo {1.20..2} +echo {1..20..f2} +echo {1..20..2f} +echo {1..2f..2} +echo {1..ff..2} +echo {1..ff} +echo {1..f} +echo {1..0f} +echo {1..10f} +echo {1..10.f} +echo {1..10.f} diff --git a/bash-5.1/tests/builtins.right b/bash-5.1/tests/builtins.right new file mode 100644 index 0000000000000000000000000000000000000000..832472f66f4dec0022888a24cfaf160f359cebdc --- /dev/null +++ b/bash-5.1/tests/builtins.right @@ -0,0 +1,274 @@ +a +end-1 +a +end-2 +a:x +end-a +b:x +end-b +c:x +end-c +end-3 +a:x +end +a +b +c +end-1 +a +b +c +end-2 +a:x +a:y +a:z +end-a +b:x +b:y +b:z +end-b +c:x +c:y +c:z +end-c +end-3 +a:x +b:x +c:x +end +$BVAR +$BVAR +$BVAR +$BVAR +foo +bar +xxx +0022 +u=rwx,g=rx,o=rx +0002 +u=rwx,g=rwx,o=rx +umask 0002 +umask -S u=rwx,g=rwx,o=rx +u=rwx,g=rwx,o=rwx +enable . +enable : +enable break +enable continue +enable eval +enable exec +enable exit +enable export +enable readonly +enable return +enable set +enable shift +enable source +enable times +enable trap +enable unset +enable . +enable : +enable break +enable continue +enable eval +enable exec +enable exit +enable export +enable readonly +enable return +enable set +enable shift +enable source +enable times +enable trap +enable unset +enable -n test worked +enable test worked +specialname +-specialname +FOO=BAR +FOO=BAR +hash: hash table empty +0 +AVAR +foo +in source.sub2, calling return +5 +a b c +a b c +x y z +a b c +a b c +m n o p +a b c +m n o p +/tmp/bash-dir-a +/tmp/bash-dir-a +/tmp/bash-dir-a +./source5.sub: line 23: /tmp/source-notthere: No such file or directory +after bad source 1 +./source5.sub: line 30: /tmp/source-notthere: No such file or directory +one - OK +0 +0 +two - OK +0 +three - OK +0 +four - OK +0 +abc +def +ghi +after +one.1 subshell +two.1 subshell +three.1 subshell +four.1 subshell +one.2 subshell +two.2 subshell +three.2 subshell +four.2 subshell +x29 - done +abc +def +ghi +ok +AVAR +foo +foo +AVAR +foo +foo +AVAR +foo +declare -x foo="" +declare -x FOO="\$\$" +./builtins.tests: line 226: declare: FOO: not found +declare -x FOO="\$\$" +ok +ok +./builtins.tests: line 258: kill: 4096: invalid signal specification +1 +a\n\n\nb +a + + +b +before: f = 4 +inside +after: f = 8 bar = 4 +declare -a c +declare -A d +declare -a c=([0]="4") +declare -A c=([0]="4" ) +declare -a c=([0]="1" [1]="2" [2]="3") +declare -A c=([two]="2" [three]="3" [one]="1" ) +declare -a c=([0]="1" [1]="2" [2]="3") +declare -a c=([0]="1" [1]="2" [2]="3") +unset +unset +assoc 1 unset +array 1 unset +assoc 2 unset +array 2 unset +unset1 +unset2 +1 +1 +1 +1 +assoc A +array a +assoc B unset +array b unset +scalar 1 +scalar 2 +scalar 3 unset +argv[1] = +assoc: 3 +array: 3 +scalar: 13 +scalar: 1 +scalar: 0 +scalar: 1 +scalar: 0 +scalar: 0 +all set: +one +two +f1 () +{ + echo f1 +} +f2 () +{ + echo f2 +} +all unset: +unset1 +unset2 +./builtins6.sub: line 41: declare: f1: not found +./builtins6.sub: line 41: declare: f2: not found +all reset: +one-one +two-one +f1 () +{ + echo f1 +} +f2 () +{ + echo f2 +} +vars unset: +unset1 +unset2 +f1 () +{ + echo f1 +} +f2 () +{ + echo f2 +} +funcs unset: +one-two +two-two +bash: line 1: notthere: No such file or directory +one +bash: line 1: notthere: No such file or directory +two +bash: line 1: .: notthere: file not found +one +bash: line 1: .: notthere: file not found +0 +0 +0 +0 +argv[1] = +0 +argv[1] = +0 +three +0 +four +0 +./builtins7.sub: line 19: : command not found +127 +0 +./builtins7.sub: line 27: notthere: No such file or directory +after 1 +./builtins7.sub: line 28: notthere: No such file or directory +after 2 +type is a shell builtin ++ command -v type +type ++ command command -v type +type ++ command -p command -v type +type ++ command -p -- command -v type +type ++ set +x +./builtins.tests: line 282: exit: status: numeric argument required diff --git a/bash-5.1/tests/builtins.tests b/bash-5.1/tests/builtins.tests new file mode 100644 index 0000000000000000000000000000000000000000..00ebc0fddd40b6152aceac42b01a8ea4f3455a99 --- /dev/null +++ b/bash-5.1/tests/builtins.tests @@ -0,0 +1,284 @@ +# 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 . +# +# tests for miscellaneous builtins not tested elsewhere +set +p +set +o posix + +ulimit -c 0 2>/dev/null + +# check that break breaks loops +for i in a b c; do echo $i; break; echo bad-$i; done +echo end-1 +for i in a b c; do echo $i; break 1; echo bad-$i; done +echo end-2 +for i in a b c; do + for j in x y z; do + echo $i:$j + break + echo bad-$i + done + echo end-$i +done +echo end-3 + +# check that break breaks nested loops +for i in a b c; do + for j in x y z; do + echo $i:$j + break 2 + echo bad-$i + done + echo end-$i +done +echo end + +# check that continue continues loops +for i in a b c; do echo $i; continue; echo bad-$i ; done +echo end-1 +for i in a b c; do echo $i; continue 1; echo bad-$i; done +echo end-2 +for i in a b c; do + for j in x y z; do + echo $i:$j + continue + echo bad-$i-$j + done + echo end-$i +done +echo end-3 + +# check that continue breaks out of nested loops +for i in a b c; do + for j in x y z; do + echo $i:$j + continue 2 + echo bad-$i-$j + done + echo end-$i +done +echo end + +# check that `eval' re-evaluates arguments, but `builtin' and `command' do not +AVAR='$BVAR' +BVAR=foo + +echo $AVAR +builtin echo $AVAR +command echo $AVAR +eval echo \$AVAR +eval echo $AVAR + +# test out eval with a temp environment +AVAR=bar eval echo \$AVAR +BVAR=xxx eval echo $AVAR + +unset -v AVAR BVAR + +# test umask +mask=$(umask) +umask 022 +umask +umask -S +umask -S u=rwx,g=rwx,o=rx >/dev/null # 002 +umask +umask -S +umask -p +umask -p -S +umask 0 +umask -S +umask ${mask} # restore original mask + +# builtin/command without arguments should do nothing. maybe someday they will +builtin +command + +# test enable +enable -ps + +enable -aps ; enable -nps + +enable -n test +case "$(type -t test)" in +builtin) echo oops -- enable -n test failed ;; +*) echo enable -n test worked ;; +esac + +enable test +case "$(type -t test)" in +builtin) echo enable test worked ;; +*) echo oops -- enable test failed ;; +esac + +# test options to exec +(exec -a specialname ${THIS_SH} -c 'echo $0' ) +(exec -l -a specialname ${THIS_SH} -c 'echo $0' ) +# test `clean' environment. if /bin/sh is bash, and the script version of +# printenv is run, there will be variables in the environment that bash +# sets on startup. Also test code that prefixes argv[0] with a dash. +(export FOO=BAR ; exec -c -l printenv ) | grep FOO +(FOO=BAR exec -c printenv ) | grep FOO + +(export FOO=BAR ; exec printenv ) | grep FOO +(FOO=BAR exec printenv ) | grep FOO + +# ok, forget everything about hashed commands +hash -r +hash + +# this had better succeed, since command -p guarantees we will find the +# standard utilities +command -p hash rm + +# check out source/. + +# sourcing a zero-length-file had better not be an error +rm -f /tmp/zero-length-file +cp /dev/null /tmp/zero-length-file +. /tmp/zero-length-file +echo $? +rm /tmp/zero-length-file + +AVAR=AVAR + +. ./source1.sub +AVAR=foo . ./source1.sub + +. ./source2.sub +echo $? + +set -- a b c +. ./source3.sub + +# make sure source with arguments does not change the shell's positional +# parameters, but that the sourced file sees the arguments as its +# positional parameters +echo "$@" +. ./source3.sub x y z +echo "$@" + +# but if the sourced script sets the positional parameters explicitly, they +# should be reflected in the calling shell's positional parameters. this +# also tests one of the shopt options that controls source using $PATH to +# find the script +echo "$@" +shopt -u sourcepath +. source4.sub +echo "$@" + +# this is complicated when the sourced scripts gets its own positional +# parameters from arguments to `.' +set -- a b c +echo "$@" +. source4.sub x y z +echo "$@" + +# test out cd and $CDPATH +${THIS_SH} ./builtins1.sub + +# test behavior of `.' when given a non-existent file argument +${THIS_SH} ./source5.sub + +# test bugs in sourcing non-regular files, fixed post-bash-3.2 +${THIS_SH} ./source6.sub + +# test bugs with source called from multiline aliases and other contexts +${THIS_SH} ./source7.sub + +# in posix mode, assignment statements preceding special builtins are +# reflected in the shell environment. `.' and `eval' need special-case +# code. +set -o posix +echo $AVAR +AVAR=foo . ./source1.sub +echo $AVAR + +AVAR=AVAR +echo $AVAR +AVAR=foo eval echo \$AVAR +echo $AVAR + +AVAR=AVAR +echo $AVAR +AVAR=foo : +echo $AVAR +set +o posix + +# but assignment statements preceding `export' are always reflected in +# the environment +foo="" export foo +declare -p foo +unset foo + +# assignment statements preceding `declare' should be displayed correctly, +# but not persist after the command +FOO='$$' declare -p FOO +declare -p FOO +unset FOO + +# except for `declare -x', which should be equivalent to `export' +FOO='$$' declare -x FOO +declare -p FOO +unset FOO + +# test out kill -l. bash versions prior to 2.01 did `kill -l num' wrong +sigone=$(kill -l | sed -n 's:^ 1) *\([^ ]*\)[ ].*$:\1:p') + +case "$(kill -l 1)" in +${sigone/SIG/}) echo ok;; +*) echo oops -- kill -l failure;; +esac + +# kill -l and trap -l should display exactly the same output +sigonea=$(trap -l | sed -n 's:^ 1) *\([^ ]*\)[ ].*$:\1:p') + +if [ "$sigone" != "$sigonea" ]; then + echo oops -- kill -l and trap -l differ +fi + +# POSIX.2 says that exit statuses > 128 are mapped to signal names by +# subtracting 128 so you can find out what signal killed a process +case "$(kill -l $(( 128 + 1)) )" in +${sigone/SIG/}) echo ok;; +*) echo oops -- kill -l 129 failure;; +esac + +# out-of-range signal numbers should report the argument in the error +# message, not 128 less than the argument +kill -l 4096 + +# kill -l NAME should return the signal number +kill -l ${sigone/SIG/} + +# test behavior of shopt xpg_echo +${THIS_SH} ./builtins2.sub + +# test behavior of declare -g +${THIS_SH} ./builtins3.sub + +# test behavior of using declare to create variables without assigning values +${THIS_SH} ./builtins4.sub + +# test behavior of set and unset array variables +${THIS_SH} ./builtins5.sub + +# test behavior of unset builtin with -f and -v options +${THIS_SH} ./builtins6.sub + +# test behavior of command builtin after changing it to a pseudo-keyword +${THIS_SH} ./builtins7.sub + +# this must be last -- it is a fatal error +exit status + +echo after bad exit diff --git a/bash-5.1/tests/builtins1.sub b/bash-5.1/tests/builtins1.sub new file mode 100644 index 0000000000000000000000000000000000000000..52185b54f99e9879fe74a5e80874817b1eebc096 --- /dev/null +++ b/bash-5.1/tests/builtins1.sub @@ -0,0 +1,14 @@ +unset CDPATH + +MYDIR=$(pwd -P) +FULLDIR=/tmp/bash-dir-a +DIR=${FULLDIR##*/} + +mkdir $FULLDIR +CDPATH=.:/tmp +cd $DIR +pwd +echo $PWD + +cd "$MYDIR" +rmdir $FULLDIR diff --git a/bash-5.1/tests/builtins2.sub b/bash-5.1/tests/builtins2.sub new file mode 100644 index 0000000000000000000000000000000000000000..e4cb32ae6bc3145e0ae91cc66ce757db1532df15 --- /dev/null +++ b/bash-5.1/tests/builtins2.sub @@ -0,0 +1,10 @@ +# test behavior of shopt xpg_echo + +USG_ECHO=off +shopt -q xpg_echo && USG_ECHO=on + +shopt -u xpg_echo +echo 'a\n\n\nb' + +shopt -s xpg_echo +echo 'a\n\n\nb' diff --git a/bash-5.1/tests/builtins3.sub b/bash-5.1/tests/builtins3.sub new file mode 100644 index 0000000000000000000000000000000000000000..5596c56813463836660e9bf6a0a577203be07d98 --- /dev/null +++ b/bash-5.1/tests/builtins3.sub @@ -0,0 +1,14 @@ +# declare -g added in bash-4.2 +f=4 + +foo() +{ + declare -g f=8 + declare -g bar=4 + + echo inside +} + +echo before: f = $f +foo +echo after: f = $f bar = $bar diff --git a/bash-5.1/tests/builtins4.sub b/bash-5.1/tests/builtins4.sub new file mode 100644 index 0000000000000000000000000000000000000000..058ee2c1b50f24a6aea2c77983c3d064334a5b1d --- /dev/null +++ b/bash-5.1/tests/builtins4.sub @@ -0,0 +1,57 @@ +# 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 . +# +declare -a c +declare -p c + +declare -A d +declare -p d +unset c d + +declare -a c +c=4 +declare -p c +unset c + +declare -A c +c=4 +declare -p c +unset c + +declare -a c +c=(1 2 3) +declare -p c +unset c + +declare -A c +c=([one]=1 [two]=2 [three]=3) +declare -p c +unset c + +declare -a c +read -a c < <(echo 1 2 3) +declare -p c +unset c + +declare -a c +mapfile -t c < <(echo 1$'\n'2$'\n'3) +declare -p c +unset c + +unset foo +declare -A foo +echo ${foo-unset} + +unset foo +declare -a foo +echo ${foo-unset} diff --git a/bash-5.1/tests/builtins5.sub b/bash-5.1/tests/builtins5.sub new file mode 100644 index 0000000000000000000000000000000000000000..d36e03a5e525b5db42076ad855c3dbee1f71af48 --- /dev/null +++ b/bash-5.1/tests/builtins5.sub @@ -0,0 +1,74 @@ +# 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 . +# +# a start at a test suite for what it means for an array to be set or unset and +# how to test that state +typeset -A A +A[a]=1 +typeset -a a +a[1]=1 + +if [ -v A ]; then echo assoc 1; else echo assoc 1 unset; fi +if [ -v a ]; then echo array 1; else echo array 1 unset; fi + +if [ -v "${A[@]}" ]; then echo assoc 2; else echo assoc 2 unset; fi +if [ -v "${a[@]}" ]; then echo array 2; else echo array 2 unset; fi + +echo ${A-unset1} +echo ${a-unset2} + +echo ${A[@]-unset3} +echo ${a[@]-unset4} + +echo ${#A[@]} +echo ${#a[@]} + +typeset -A B +typeset -a b + +scalar1=foo +scalar2= + +if [ -v A[@] ]; then echo assoc A; else echo assoc A unset; fi +if [ -v a[@] ]; then echo array a; else echo array a unset; fi + +if [ -v B[@] ]; then echo assoc B; else echo assoc B unset; fi +if [ -v b[@] ]; then echo array b; else echo array b unset; fi + +if [ -v scalar1[@] ]; then echo scalar 1; else echo scalar 1 unset; fi +if [ -v scalar2[@] ]; then echo scalar 2; else echo scalar 2 unset; fi +if [ -v scalar3[@] ]; then echo scalar 3; else echo scalar 3 unset; fi + +unset a A +declare -A assoc=([one]=one [two]=two [three]=three) +declare -a array=(one two three) + +scalar="one two three" +scalar2= + +recho "${scalar[@]}" + +echo assoc: ${#assoc[@]} +echo array: ${#array[@]} + +echo scalar: ${#scalar} +echo scalar: ${#scalar[@]} + +echo scalar: ${#scalar2} +echo scalar: ${#scalar2[@]} + +echo scalar: ${#scalar3} +echo scalar: ${#scalar3[@]} + + + diff --git a/bash-5.1/tests/builtins6.sub b/bash-5.1/tests/builtins6.sub new file mode 100644 index 0000000000000000000000000000000000000000..d4fdf4ae406c79c1f18f95d94cefab190d665bb7 --- /dev/null +++ b/bash-5.1/tests/builtins6.sub @@ -0,0 +1,81 @@ +# 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 . +# +f1() +{ + echo f1 +} + +f2() +{ + echo f2 +} + +v1=one +v2=two + +echo all set: + +echo ${v1-unset1} +echo ${v2-unset2} + +declare -f -p f1 f2 + +unset v1 f1 v2 f2 + +echo all unset: + +echo ${v1-unset1} +echo ${v2-unset2} + +declare -f -p f1 f2 + +f1() +{ + echo f1 +} + +f2() +{ + echo f2 +} + +v1=one-one +v2=two-one + +echo all reset: +echo ${v1-unset1} +echo ${v2-unset2} + +declare -f -p f1 f2 + +unset -v v1 f1 v2 f2 + +echo vars unset: + +echo ${v1-unset1} +echo ${v2-unset2} + +declare -f -p f1 f2 + +v1=one-two +v2=two-two + +unset -f v1 f1 v2 f2 + +echo funcs unset: + +echo ${v1-unset1} +echo ${v2-unset2} + +declare -f f1 f2 diff --git a/bash-5.1/tests/builtins7.sub b/bash-5.1/tests/builtins7.sub new file mode 100644 index 0000000000000000000000000000000000000000..67e5e610eaf9aeed29373fd5e428cc318e0fbbe1 --- /dev/null +++ b/bash-5.1/tests/builtins7.sub @@ -0,0 +1,38 @@ +: ${THIS_SH:=./bash} + +${THIS_SH} -c 'command . notthere ; echo one' bash +${THIS_SH} -c '. notthere ; echo two' bash + +${THIS_SH} -o posix -c 'command . notthere ; echo one' bash +${THIS_SH} -o posix -c '. notthere ; echo two' bash + +command ; echo $? +command -- ; echo $? +command -p ; echo $? +command -p -- ; echo $? + +command recho one; echo $? +command -- recho two; echo $? +command -p echo three; echo $? +command -p -- echo four ; echo $? + +command '' +echo $? + +command -p +echo $? + +${THIS_SH} -c 'set -e ; command false ; echo after' bash + +command command command -p . notthere ; echo after 1 +command -p command command . notthere ; echo after 2 + +command -p command -V type + +set -x +command -v type +command command -v type +command -p command -v type +command -p -- command -v type +set +x + diff --git a/bash-5.1/tests/case.right b/bash-5.1/tests/case.right new file mode 100644 index 0000000000000000000000000000000000000000..557bcadfb1dccf09be680e840058fafa4898c888 --- /dev/null +++ b/bash-5.1/tests/case.right @@ -0,0 +1,62 @@ +fallthrough +to here +and here +retest +and match +no more clauses +1.0 +./case.tests: line 42: xx: readonly variable +1.1 +matches 1 +no +no +no +no +no +ok +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 +ok 8 +ok 9 +mysterious 1 +mysterious 2 +argv[1] = <\a\b\c\^A\d\e\f> +argv[1] = <\a\b\c\^A\d\e\f> +argv[1] = +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 +ok 8 +--- testing: soh +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +--- testing: stx +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +--- testing: del +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 +ok1ok2ok3ok4ok5 diff --git a/bash-5.1/tests/case.tests b/bash-5.1/tests/case.tests new file mode 100644 index 0000000000000000000000000000000000000000..2ffcb9063cdeea4ec745478f591624e99ceb8f8c --- /dev/null +++ b/bash-5.1/tests/case.tests @@ -0,0 +1,69 @@ +# 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 . +# +case foo in +bar) echo skip ;; +foo) echo fallthrough ;& +bax) echo to here ;& +qux) echo and here;; +fop) echo but not here;; +esac + +case foobar in +bar) echo skip ;; +foo*) echo retest ;;& +*bar) echo and match ;;& +qux) echo but not this ;; +esac + +case a in +a) echo no more clauses;& +esac + +x=0 y=1 +case 1 in + $((y=0)) ) ;; + $((x=1)) ) ;& + $((x=2)) ) echo $x.$y ;; +esac + +unset x +readonly xx=1 +case 1 in $((xx++)) ) echo hi1 ;; *) echo hi2; esac +echo ${xx}.$? + +unset var empty + +var= +case ']' in +[$var]*[$var]) echo matches 1;; +*) echo no match 1 ;; +esac + +case abc in ( [] ) echo yes ;; ( * ) echo no ;; esac +empty='' +case abc in ( ["$empty"] ) echo yes ;; ( * ) echo no ;; esac + +case abc in ( [] | [!a-z]* ) echo yes ;; ( * ) echo no ;; esac +empty='' +case abc in ( ["$empty"] | [!a-z]* ) echo yes ;; ( * ) echo no ;; esac + +case abc in (["$empty"]|[!a-z]*) echo yes ;; (*) echo no ;; esac + +case " " in ( [" "] ) echo ok;; ( * ) echo no;; esac + +# tests of quote removal and pattern matching +${THIS_SH} ./case1.sub +${THIS_SH} ./case2.sub +${THIS_SH} ./case3.sub +${THIS_SH} ./case4.sub diff --git a/bash-5.1/tests/case1.sub b/bash-5.1/tests/case1.sub new file mode 100644 index 0000000000000000000000000000000000000000..80771118f0d4cbddcaa90a2ce9c8acfb76e91f3a --- /dev/null +++ b/bash-5.1/tests/case1.sub @@ -0,0 +1,77 @@ +# 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 . +# +x='\x' + +case x in +\x) echo ok 1;; +*) echo bad 1;; +esac + +case x in +$x) echo ok 2;; +*) echo bad 2;; +esac + +case $x in +\x) echo bad 3;; +\\x) echo ok 3 ;; +*) echo bad 3.1 ;; +esac + +case $x in +\\$x) echo ok 4 ;; +x) echo bad 4;; +$x) echo bad 4.1 ;; +*) echo bad 4.2;; +esac + +case x in +\\x) echo bad 5;; +\x) echo ok 5;; +*) echo bad 5.1;; +esac + +case x in +\\x) echo bad 6;; +x) echo ok 6;; +*) echo bad 6.1;; +esac + +case x in +$x) echo ok 7 ;; +\\$x) echo bad 7 ;; +*) echo bad 7.1 ;; +esac + +case x in +\x) echo ok 8 ;; +\\x) echo bad 8 ;; +*) echo bad 8.1 ;; +esac + +case \x in +\x) echo ok 9 ;; +\\x) echo bad 9 ;; +*) echo bad 9.1 ;; +esac + +case $x in +$x) echo oops 1 ;; +*) echo mysterious 1 ;; +esac + +case \x in +\x) echo mysterious 2 ;; +*) echo oops 2 ;; +esac diff --git a/bash-5.1/tests/case2.sub b/bash-5.1/tests/case2.sub new file mode 100644 index 0000000000000000000000000000000000000000..6c3be38eb7ddf9186e3aa674eb573ae778f29deb --- /dev/null +++ b/bash-5.1/tests/case2.sub @@ -0,0 +1,65 @@ +# 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 . +# +x=$'\\a\\b\\c\\\001\\d\\e\\f' +y='\a\b\c\\d\e\f' +z=$'abc\001def' + +recho "$x" +recho "$y" +recho "$z" + +case $'abc\001def' in +$x) echo ok 1 ;; +*) echo oops 1;; +esac + +case $z in +$x) echo ok 2 ;; +*) echo oops 2;; +esac + +case $'abc\001def' in +$y) echo ok 3 ;; +*) echo oops 3;; +esac + +case $z in +$y) echo ok 4 ;; +*) echo oops 4;; +esac + +# no backslash before \001 +x=$'\\a\\b\\c\001\\d\\e\\f' +y='\a\b\c\d\e\f' + +case $'abc\001def' in +$x) echo ok 5 ;; +*) echo oops 5;; +esac + +case $z in +$x) echo ok 6 ;; +*) echo oops 6;; +esac + +case $'abc\001def' in +$y) echo ok 7 ;; +*) echo oops 7;; +esac + +case $z in +$y) echo ok 8 ;; +*) echo oops 8;; +esac + diff --git a/bash-5.1/tests/case3.sub b/bash-5.1/tests/case3.sub new file mode 100644 index 0000000000000000000000000000000000000000..1e8d785cdf16cb76e6230b00ca08cbad6899a75e --- /dev/null +++ b/bash-5.1/tests/case3.sub @@ -0,0 +1,52 @@ +# 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 . +# + +testmatch() { + case $1 in + ( $2 ) printf ok1 ;; + ( * ) printf fail1 ;; + esac + case $1,$2 in + ( $2,"$2" ) printf ok2 ;; + ( * ) printf fail2 ;; + esac + case $1, in + ( $2, ) printf ok3 ;; + ( * ) printf fail3 ;; + esac + case ,$2 in + ( ,"$2" ) printf ok4 ;; + ( * ) printf fail4 ;; + esac + case "$1,$2" in + ( $2,"$2" ) printf ok5 ;; + ( * ) printf fail5 ;; + esac + echo +} + +for c in $'\1' $'\2' $'\177'; do + echo -n "--- testing: " + echo "$c" | od -t a | awk 'NR==1 { print $2 } ' + testmatch "${c}" "\\${c}" + testmatch "${c}x" "\\${c}\\x" # bash-git fails case 2 and 5 for $'\1' + testmatch "${c}x" "${c}\\x" + testmatch "${c}x" "${c}x" + testmatch "${c}x" "\\${c}x" + testmatch "x${c}" "\\x\\${c}" + testmatch "x${c}" "x\\${c}" +done + +match() { case $1 in ( $2 ) ;; ( * ) return 1 ;; esac; } +match $'? *x\1y\177z' $'??\\*\\x\\\1\\y\\\177\\z' || echo bad 6 diff --git a/bash-5.1/tests/case4.sub b/bash-5.1/tests/case4.sub new file mode 100644 index 0000000000000000000000000000000000000000..ababeb94d8d15354e7f849643f21eef1177f3e56 --- /dev/null +++ b/bash-5.1/tests/case4.sub @@ -0,0 +1,38 @@ +# 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 . +# +shopt -s -o posix +two="t w o" +ten="t e +n" +set 1 "$two" 3 4 5 6 7 8 9 "$ten" + +unset IFS +expvar="$*" +case $* in +"$expvar") ;; +*) echo "failed 1" ;; +esac + +case $* in +$expvar) ;; +*) echo "failed 2" ;; +esac + +alias foo='oneword' +foo_word='foo' +case "$foo_word" +in + foo) ;; + *) echo failed 3;; +esac diff --git a/bash-5.1/tests/casemod.right b/bash-5.1/tests/casemod.right new file mode 100644 index 0000000000000000000000000000000000000000..df12475478580f440e1e73aebf7a2982b9b432f5 --- /dev/null +++ b/bash-5.1/tests/casemod.right @@ -0,0 +1,47 @@ +Acknowledgement +ACKNOWLEDGEMENT +Oenophile +OEnOphIlE +aCKNOWLEDGEMENT +acknowledgement +oENOPHILE +oENOPHILE +oeNoPHiLe +Acknowledgement Oenophile +AcknOwlEdgEmEnt OEnOphIlE +aCKNOWLEDGEMENT oENOPHILE +aCKNoWLeDGeMeNT oeNoPHiLe +aCKNOWLEDGEMENT oENOPHILE +acknowledgement oenophile +Oenophile Acknowledgement +OENOPHILE ACKNOWLEDGEMENT +Oenophile Acknowledgement +OEnOphIlE AcknOwlEdgEmEnt +oENOPHILE aCKNOWLEDGEMENT +oenophile acknowledgement +oENOPHILE aCKNOWLEDGEMENT +oeNoPHiLe aCKNoWLeDGeMeNT +Acknowledgement Oenophile +ACKNOWLEDGEMENT OENOPHILE +acknowledgement oenophile +ackNowLEdgEmENT oENophiLE +acknowledgement oenophile +ackNowLEdgEmENT oENophiLE +acknowledgement oenophile +acknowledgement oenophile +acknowledgement oenophile +acknowledgement oenophile +Acknowledgement Oenophile +ACKNOWLEDGEMENT OENOPHILE +BE CONSERVATIVE IN WHAT YOU SEND AND LIBERAL IN WHAT YOU ACCEPT +be conservative in what you send and liberal in what you accept +Be conservative in what you send and liberal in what you accept +Be conservative in what you send and liberal in what you accept +be Conservative in what you send and Liberal in what you accept +be conservative in what you send and liberal in what you accept +Be Conservative in what you send and Liberal in what you accept +BE CONSERVATIVE IN WHAT YOU SEND AND LIBERAL IN WHAT YOU ACCEPT +Be conservative in what you send and liberal in what you accept +BE CONSERVATIVE IN WHAT YOU SEND AND LIBERAL IN WHAT YOU ACCEPT +abcdexyz +ABCDEXYZ diff --git a/bash-5.1/tests/casemod.tests b/bash-5.1/tests/casemod.tests new file mode 100644 index 0000000000000000000000000000000000000000..56ab20d956ed5b9a6b76b1fe45e20628e96f736f --- /dev/null +++ b/bash-5.1/tests/casemod.tests @@ -0,0 +1,126 @@ +# 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 . +# +S1=acknowledgement +S2=oenophile + +echo ${S1^} +echo ${S1^^} + +echo ${S2^[aeiou]} +echo ${S2^^[aeiou]} + +U1=${S1^^} +U2=${S2^^} + +echo ${U1,} +echo ${U1,,} + +echo ${U2,} +echo ${U2,[AEIOU]} +echo ${U2,,[AEIOU]} + +A1=( $S1 $S2 ) + +echo ${A1[@]^[aeiou]} +echo ${A1[@]^^[aeiou]} + +A2=( $U1 $U2 ) + +echo ${A2[@],[AEIOU]} +echo ${A2[@],,[AEIOU]} + +echo ${A2[@],?} +echo ${A2[@],,?} + +declare -A AA1 AA2 + +AA1[ack]=$S1 +AA1[oen]=$S2 + +echo ${AA1[@]^} +echo ${AA1[@]^^} + +echo ${AA1[@]^[aeiou]} +echo ${AA1[@]^^[aeiou]} + +AA2[ACK]=$U1 +AA2[OEN]=$U2 + +echo ${AA2[@],} +echo ${AA2[@],,} + +echo ${AA2[@],[AEIOU]} +echo ${AA2[@],,[AEIOU]} + +set -- $S1 $S2 + +echo ${@^} +echo ${@^^} + + +echo ${S1^[rstlne]} ${S2^[rstlne]} +echo ${S1^^[rstlne]} ${S2^^[rstlne]} + +echo ${@^[rstlne]} +echo ${@^^[rstlne]} + +echo ${S1,[rstlne]} ${S2,[rstlne]} +echo ${S1,,[rstlne]} ${S2,,[rstlne]} + +echo ${@,[rstlne]} +echo ${@,,[rstlne]} + +echo ${@^?} +echo ${@^^?} + +# make sure that multiple words in the string are handled as other expansions +TEXT="Be Conservative in what you send and Liberal in what you accept" +TEXT2="be conservative in what you send and liberal in what you accept" + +declare -u foo +foo=$TEXT +echo $foo + +declare -l bar +bar=$TEXT +echo $bar + +declare -c qux +qux=$TEXT +echo $qux +qux=$TEXT2 +echo $qux + +echo ${TEXT,} +echo ${TEXT,,} + +echo ${TEXT^} +echo ${TEXT^^} + +echo ${TEXT2^} +echo ${TEXT2^^} + +M1=${S1^^[aeiou]} +M2=${U2,,[AEIOU]} + +#echo ${M1} ${M1~} +#echo ${M2} ${M2~~} + +declare -l lower=aBcDe +lower+=XyZ +echo $lower + +declare -u upper=aBcDe +upper+=xYZ +echo $upper diff --git a/bash-5.1/tests/complete.right b/bash-5.1/tests/complete.right new file mode 100644 index 0000000000000000000000000000000000000000..5bc89a055f3c6f191b1fe0673214808dc3dfa819 --- /dev/null +++ b/bash-5.1/tests/complete.right @@ -0,0 +1,63 @@ +complete -f -X '!*.+(ps|PS)' gs +complete -c nice +complete -e printenv +complete -c gdb +complete -f -X '!*.texi*' texi2html +complete -j -P '%' fg +complete -g groupmod +complete -f -X '!*.dvi' dvips +complete -f -X '!*.texi*' texi2dvi +complete -v -S '=' typeset +complete -f . +complete -c nohup +complete -a unalias +complete -g groupdel +complete -A hostname telnet +complete -v -S '=' declare +complete -v -S '=' export +complete -v -S '=' local +complete -v -S '=' readonly +complete -o bashdefault -o filenames -o nospace -F _comp_cd cd +complete -f -X '!*.dvi' xdvi +complete -c type +complete -f ln +complete -f -X '!*.+(gz|tgz)' gunzip +complete -f -X '!*.texi*' makeinfo +complete -u su +complete -j -P '%' jobs +complete -o dirnames -o filenames -o nospace -d popd +complete -A signal trap +complete -o dirnames -o filenames -o nospace -d pushd +complete -f -X '!*.pdf' acroread +complete -v unset +complete -f -X '!*.+(ps|PS)' ghostview +complete -j -W '$(ps -x | tail +2 | cut -c1-5)' -P '%' wait +complete -A hostname rsh +complete -c exec +complete -f -X '!*.Z' zmore +complete -A signal kill +complete -j -P '%' disown +complete -f -X '!*.+(ps|PS)' gs +complete -f -X '!*.+(ps|PS)' gv +complete -f source +complete -c make +complete -A stopped -P '%' bg +complete -f cat +complete -d mkdir +complete -A helptopic help +complete -c eval +complete -f chown +complete -v read +complete -c -k time +complete -f -X '!*.Z' zcat +complete -f gzip +complete -W '"${GROUPS[@]}"' newgrp +complete -f -X '!*.Z' uncompress +complete -d rmdir +complete -A shopt shopt +complete -A hostname ftp +complete -f more +complete -A hostname rlogin +complete -v getopts +complete -f -X '!*.+(gz|tgz)' gzcat +./complete.tests: line 123: complete: notthere: no completion specification diff --git a/bash-5.1/tests/complete.tests b/bash-5.1/tests/complete.tests new file mode 100644 index 0000000000000000000000000000000000000000..36a39833643e2b8c18349bed9953a508fe1c728d --- /dev/null +++ b/bash-5.1/tests/complete.tests @@ -0,0 +1,126 @@ +# Chet Ramey +# +# Copyright 2002-2020 Chester Ramey +# +# 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 2, or (at your option) +# any later version. +# +# TThis 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +complete + +# from zsh, just for testing +complete -A stopped -P '%' bg +complete -j -P '%' fg jobs disown +# this is wrong at this point +complete -j -P '%' -W '$(ps -x | tail +2 | cut -c1-5)' wait +complete -c type +complete -a unalias +complete -v getopts read unset +complete -v -S '=' declare export local readonly typeset +complete -f -- . source +complete -A shopt shopt +complete -e printenv + +complete -A helptopic help + +complete -c nohup exec nice eval +complete -c -k time + +complete -A signal trap kill + +complete -f chown ln more cat +complete -d mkdir rmdir + +complete -f -X '!*.+(gz|tgz)' gunzip gzcat zcat zmore +complete -f -X '!*.Z' uncompress zmore zcat +complete -f gzip + +complete -o dirnames -o filenames -o nospace -d pushd popd + +_comp_cd() +{ + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, with side effect of expanding tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=${CDPATH/#:/.:} + _cdpath=${_cdpath//::/:.:} + _cdpath=${_cdpath/%:/:.} + for i in ${_cdpath//:/$'\n'}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="${#COMPREPLY[@]}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=${j#$i/} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + # append slash to passed directory name that is the only completion. + # readline will not do this if we complete from CDPATH + if [[ ${#COMPREPLY[@]} -eq 1 ]]; then + i=${COMPREPLY[0]} # shorthand + if [[ "$cur" == "$i" ]] && [[ "$i" != "*/" ]]; then + COMPREPLY[0]+=/ + fi + fi + return 0 +} + +complete -o filenames -o nospace -o bashdefault -F _comp_cd cd + +complete -A hostname rsh telnet rlogin ftp + +complete -u su +complete -W '"${GROUPS[@]}"' newgrp +complete -g groupdel groupmod + +complete -f -X '!*.+(ps|PS)' gs gv ghostview +complete -f -X '!*.dvi' dvips xdvi +complete -f -X '!*.pdf' acroread + +complete -f -X '!*.texi*' makeinfo texi2dvi texi2html + +complete -c gdb make + +complete -p gs +complete -p + +complete -r xdvi +complete -r notthere + +complete -r +complete diff --git a/bash-5.1/tests/comsub-eof.right b/bash-5.1/tests/comsub-eof.right new file mode 100644 index 0000000000000000000000000000000000000000..426779852ce8862702981c7bb153de100a5aadb2 --- /dev/null +++ b/bash-5.1/tests/comsub-eof.right @@ -0,0 +1,15 @@ +./comsub-eof0.sub: line 1: unexpected EOF while looking for matching `)' +./comsub-eof0.sub: line 5: syntax error: unexpected end of file +hi +./comsub-eof2.sub: line 2: warning: here-document at line 1 delimited by end-of-file (wanted `EOF') +hi +./comsub-eof3.sub: line 1: unexpected EOF while looking for matching `)' +./comsub-eof3.sub: line 5: syntax error: unexpected end of file +./comsub-eof4.sub: line 6: warning: here-document at line 4 delimited by end-of-file (wanted `EOF') +contents +./comsub-eof5.sub: line 8: warning: here-document at line 6 delimited by end-of-file (wanted `)') +hi +./comsub-eof5.sub: line 13: warning: here-document at line 11 delimited by end-of-file (wanted `EOF') +hi +./comsub-eof6.sub: line 1: unexpected EOF while looking for matching `)' + diff --git a/bash-5.1/tests/comsub-eof.tests b/bash-5.1/tests/comsub-eof.tests new file mode 100644 index 0000000000000000000000000000000000000000..398746aa49bbafcec7ecefdc637b3fa7f79b1e93 --- /dev/null +++ b/bash-5.1/tests/comsub-eof.tests @@ -0,0 +1,13 @@ +${THIS_SH} ./comsub-eof0.sub + +${THIS_SH} ./comsub-eof1.sub + +${THIS_SH} ./comsub-eof2.sub + +${THIS_SH} ./comsub-eof3.sub + +${THIS_SH} ./comsub-eof4.sub + +${THIS_SH} ./comsub-eof5.sub + +${THIS_SH} ./comsub-eof6.sub diff --git a/bash-5.1/tests/comsub-eof0.sub b/bash-5.1/tests/comsub-eof0.sub new file mode 100644 index 0000000000000000000000000000000000000000..7b0775fb1dbdb4c9deb95f7f83ac3d806a48f0a3 --- /dev/null +++ b/bash-5.1/tests/comsub-eof0.sub @@ -0,0 +1,4 @@ +foo=$(cat < +abcdefoo +argv[1] = +argv[2] = +argv[1] = +argv[1] = +' +after 1 +' +after 2 +' +after 3 +` +after 4 +hello +after 5 +' +after 6 +x +x +x +quoted ) +comment +here-doc with ) +here-doc with \() +here-doc terminated with a parenthesis +' # or a single back- or doublequote +line terminated with a backslash +./comsub-posix1.sub: command substitution: line 2: syntax error near unexpected token `)' +./comsub-posix1.sub: command substitution: line 2: ` if x; then echo foo )' +after +swap32_posix is a function +swap32_posix () +{ + local funcname=swap32_posix; + local arg; + for arg in "$@"; + do + echo $(( + ($arg & 4278190080) >> 24 | + ($arg & 16711680) >> 8 | + ($arg & 65280) << 8 | + ($arg & 255) << 24 + )); + done +} +yes +ab cde diff --git a/bash-5.1/tests/comsub-posix.tests b/bash-5.1/tests/comsub-posix.tests new file mode 100644 index 0000000000000000000000000000000000000000..4fe1dfaa19304099a3532cafc27129d99cd82083 --- /dev/null +++ b/bash-5.1/tests/comsub-posix.tests @@ -0,0 +1,261 @@ +# 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 . +# +: ${HOME:=/} + +# works right +echo ab$(echo mnop)yz +# works right +echo ab$(echo mnop +)yz +# +# works right +echo $(echo ab + ) +# works right +echo $( +) +echo $() +echo ab$()cd +echo ab$( )cd + +echo $(case a in (a) echo sh_352.26ax; esac ) +echo $(case a in (a) echo sh_352.26ay; esac) + +echo $((echo sh_352.25a);(echo sh_352.25b)) + +echo $(echo sh_352.27 ')' ")" \) + # ) comment + ) + +echo $( +echo abc # a comment with ) +) + +echo $( +cat <. +# +# problem with bash-4.x versions before bash-4.2. required posix interp +swap32_posix() +{ + local funcname=swap32_posix + local arg + for arg in "$@"; do + echo $(( + ($arg & 4278190080) >> 24 | + ($arg & 16711680) >> 8 | + ($arg & 65280) << 8 | + ($arg & 255) << 24 + )) + done +} + +type swap32_posix diff --git a/bash-5.1/tests/comsub-posix3.sub b/bash-5.1/tests/comsub-posix3.sub new file mode 100644 index 0000000000000000000000000000000000000000..39262b224f230670479af9af5a89c2dfa5859a2d --- /dev/null +++ b/bash-5.1/tests/comsub-posix3.sub @@ -0,0 +1,35 @@ +# 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 . +# +# parsing errors before bash-4.2 + +a=$(/bin/cat << EOF | wc -l +a +b +c +EOF +) + +a=$(cat << EOF | wc -l +a +b +c +EOF +) + +a=$(/bin/cat << EOF +a +b +c +EOF +) diff --git a/bash-5.1/tests/comsub.right b/bash-5.1/tests/comsub.right new file mode 100644 index 0000000000000000000000000000000000000000..a329c832dcb368a1bb342d13b1b207d9bf1bec64 --- /dev/null +++ b/bash-5.1/tests/comsub.right @@ -0,0 +1,57 @@ +./comsub.tests: line 20: hijkl: command not found +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = <$> +argv[2] = +argv[1] = <`> +argv[2] = +argv[1] = <\> +argv[2] = +argv[1] = +argv[1] = +argv[1] = argv[2] = <-e> argv[3] = +argv[1] = argv[2] = <-e> argv[3] = +argv[1] = +argv[1] = +argv[1] = +#esac +a +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +xyz +ok 7 +\/tmp\/foo\/bar +/tmp/foo/bar +/tmp/foo/bar +/tmp/foo/bar +1 +2 +3 +4 +5 +6 +5 +6 +a +b +c +a +b +c +1 +2 +d \ +g +d \ +g +d \ +g diff --git a/bash-5.1/tests/comsub.tests b/bash-5.1/tests/comsub.tests new file mode 100644 index 0000000000000000000000000000000000000000..47863024874a58b4cdb49aa39c5d6da8349c8a2a --- /dev/null +++ b/bash-5.1/tests/comsub.tests @@ -0,0 +1,75 @@ +# 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 . +# +# command substution parsing tests + +TABSIZE=`grep -v '^[ #]' $CAPS /dev/null + +# parsing problem based on recursively calling bison parser through bash-4.4 +for (( INDEX=0; INDEX<$((10-$(echo length $V_NAME))); INDEX++ )) +do + : +done + +# problem with four-character words followed by a metachar through bash-4.4 +comsub_foo_1() +{ + echo $(while true; do case $HOME in /*) echo abs ;; esac; done) +} + +${THIS_SH} ./comsub1.sub +${THIS_SH} ./comsub2.sub +${THIS_SH} ./comsub3.sub +${THIS_SH} ./comsub4.sub diff --git a/bash-5.1/tests/comsub1.sub b/bash-5.1/tests/comsub1.sub new file mode 100644 index 0000000000000000000000000000000000000000..ca722439cb45f9251f7b4b80ed49494eb0d360a0 --- /dev/null +++ b/bash-5.1/tests/comsub1.sub @@ -0,0 +1,73 @@ +# 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 . +# +: $(echo \;) + +: $(case a in a) echo ;;# comment +esac) + +: $(case a in a) echo ;; # comment +esac) + +: $(: \;# not a comment ) + +: $(: \ # not a comment) + +echo $(case a in a) echo \#esac ;; +esac) + +: $(case a in a) : ;#esac ;; +esac) + +: $(case a in a) : ;#esac comment ) +esac) + +: $(case a in a) : ; +esac) + +echo $(#comment ) +echo a) + +echo $(case a in (a) echo ok 1;; # comment +esac) + +echo $(case a in (a) echo ok 2;; # comment +(b) echo moo;; +esac) + +echo $(case a in (a) echo ok 3 # comment +;; +esac) + +echo $(case a in a) echo ok 4;; # comment +esac) + +echo $(case a in a) echo ok 5;; # comment +b) echo moo;; +esac) + +echo $(case a in (a) echo ok 6 # comment +;; +esac) + +echo $( # we just took and pasted in some +# code from another script inside a +# command substitution +echo xyz +) + +# problem with parse_comsub through bash-4.4 +case $(echo $$'x\nx') in +x*) echo bad 7;; +*) echo ok 7;; +esac diff --git a/bash-5.1/tests/comsub2.sub b/bash-5.1/tests/comsub2.sub new file mode 100644 index 0000000000000000000000000000000000000000..d60ae6a0e7380b3c037996741492f4ce111ac761 --- /dev/null +++ b/bash-5.1/tests/comsub2.sub @@ -0,0 +1,8 @@ +qpath='\/tmp\/foo\/bar' + +echo "$qpath" + +# it's crazy that all three of these produce the same result +printf "%s\n" ${qpath//\\/} +printf "%s\n" ${qpath//"`printf '%s' \\`"/} +printf "%s\n" ${qpath//`printf '%s' "\\\\\\\\"`/} diff --git a/bash-5.1/tests/comsub3.sub b/bash-5.1/tests/comsub3.sub new file mode 100644 index 0000000000000000000000000000000000000000..757fbcae6301a1096ec311c23cb48d7429cebef9 --- /dev/null +++ b/bash-5.1/tests/comsub3.sub @@ -0,0 +1,44 @@ +# 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 . +# +x=$( + case 1 in + 1) echo 1 + esac + case 2 in + 2) echo 2 + esac +) +echo "$x" + +x=$(case 1 in 1) echo 3;; esac; case 2 in 2) echo 4;; esac;) +echo "$x" + +x=$(case 1 in 1) echo 5;; esac; case 2 in 2) echo 6;; esac) +echo "$x" + +x=$(case 1 in 1) echo 5;; esac; case 2 in 2) echo 6;; esac; for f in a b c; do echo "$f" ; done) +echo "$x" + +x=$( + for f in a b c; do + echo $f + done + case 1 in + 1) echo 1 + esac + case 2 in + 2) echo 2 + esac +) +echo "$x" diff --git a/bash-5.1/tests/comsub4.sub b/bash-5.1/tests/comsub4.sub new file mode 100644 index 0000000000000000000000000000000000000000..e7a1c557f0de31ef8d5204f4b26287b15561169d --- /dev/null +++ b/bash-5.1/tests/comsub4.sub @@ -0,0 +1,40 @@ +# 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 . +# +x=$(cat <<'EOT' +d \ +g +EOT +) + +echo "$x" +unset x + +x=$( cat <<\EOT\ +4 +d \ +g +EOT4 +) + +echo "$x" +unset x + +x=$( cat <<\EOT +d \ +g +EOT +) + +echo "$x" + diff --git a/bash-5.1/tests/cond-regexp1.sub b/bash-5.1/tests/cond-regexp1.sub new file mode 100644 index 0000000000000000000000000000000000000000..1ba9197a4045a5e10ca9df509775d8da16a1f98c --- /dev/null +++ b/bash-5.1/tests/cond-regexp1.sub @@ -0,0 +1,69 @@ +# 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 . +# +VAR='[[:alpha:]]' + +[[ $VAR =~ '[[:alpha:]]' ]] && echo match 1 + +[[ a =~ '[[:alpha:]]' ]] || echo match 2 + +[[ a =~ [[:alpha:]] ]] && echo match 3 + +[[ a =~ $VAR ]] && echo match 4 + +[[ a =~ "$VAR" ]] || echo match 5 + +line=aab +[[ $line =~ [[:space:]]*(a)?b ]] && echo match 6 + +V="alphabet" +[[ $V == alphabet ]] && echo yes 1 +[[ $V == "alphabet" ]] && echo yes 2 +[[ $V == 'alphabet' ]] && echo yes 3 +[[ $V =~ alphabet ]] && echo yes 4 +[[ $V =~ "alphabet" ]] && echo yes 5 +[[ $V =~ 'alphabet' ]] && echo yes 6 + +DOG="Dog name - 01 - Wiggles" +REPAT='([[:alpha:][:blank:]]*)- ([[:digit:]]*) - (.*)$' +if [[ $DOG =~ ([[:alpha:][:blank:]]*)-\ ([[:digit:]]*)\ -\ (.*)$ ]] +then + echo Dog ${BASH_REMATCH[2]} is ${BASH_REMATCH[3]} +fi +if [[ $DOG =~ $REPAT ]] +then + echo Dog ${BASH_REMATCH[2]} is ${BASH_REMATCH[3]} +fi + +[[ $REPAT =~ "$REPAT" ]] && echo rematch 1 + +v="one two buckle my shoe" +[[ ${v} =~ "one two" ]] && echo matches 7 + +[[ ${v} =~ (one two) ]] && echo matches 8 + +[[ ${v} =~ one\ two ]] && echo matches 9 + +unset pattern string +pattern="xxx.yyy" +string=xxxAyyy + +[[ $string =~ $pattern ]] && echo unquoted matches +[[ $string =~ "$pattern" ]] && echo quoted matches + +# problems in pre-patched bash-4.2 +[[ "helloworld" =~ llo ]] && echo match control-a 1 +[[ "helloworld" =~ world ]] && echo match control-a 2 +[[ "helloworld" =~ world$ ]] && echo match control-a 3 +[[ "helloworld" =~  ]] && echo match control-a 4 +[[ "helloworld" =~ oworld$ ]] && echo match control-a 5 diff --git a/bash-5.1/tests/cond-regexp2.sub b/bash-5.1/tests/cond-regexp2.sub new file mode 100644 index 0000000000000000000000000000000000000000..4da0a88f480bfa571c3ffd2ded019ae37d5e28ec --- /dev/null +++ b/bash-5.1/tests/cond-regexp2.sub @@ -0,0 +1,45 @@ +# 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 . +# +[[ "\\" =~ ["."] ]] && echo bad 1 + +[[ "\\" =~ "[.]" ]] && echo bad 2 + +[[ "\\" =~ [\. ]] && echo bad 3 + +[[ "\\" =~ [\.] ]] && echo bad 4 + +[[ "\\" =~ [\\] ]] || echo bad 5 + +[[ dog =~ [[=d=]].. ]] && echo ok 1 +[[ d.. =~ [[=d=]]\.\. ]] && echo ok 2 +[[ dog =~ ['[=d=]'].. ]] && echo ok 3 # dubious + +[[ dog =~ [[=d=]].[[=G=][=g=]] ]] && echo ok 4 +[[ dog =~ [[=d=]].[\[=G=][=g=]] ]] && echo ok 4a + +[[ dog =~ "d.." ]] || echo ok 5 + +[[ dog =~ [[.d.][.D.]]o. ]] && echo ok 6 + +[[ dog =~ ([[.d.][.D.]])o(.) ]] && echo ok 7 -- ${BASH_REMATCH[1]} +[[ dog =~ d([[.o.][.O.]])(.) ]] && echo ok 8 -- ${BASH_REMATCH[1]} +[[ dog =~ .([[.o.][.O.]])(.) ]] && echo ok 9 + +[[ dog =~ 'd''o''g' ]] && echo ok 10 + +[[ ']' =~ [']'] ]] && echo ok 11 + +[[ a =~ ['a]'] ]] || echo ok 12 + +[[ "\\" =~ [^]"."] ]] || echo unexpected diff --git a/bash-5.1/tests/cond-regexp3.sub b/bash-5.1/tests/cond-regexp3.sub new file mode 100644 index 0000000000000000000000000000000000000000..d939548c5d6a01461538cd0d5d3afefeffa1ee3f --- /dev/null +++ b/bash-5.1/tests/cond-regexp3.sub @@ -0,0 +1,86 @@ +# 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 . +# +# simple expansion -- no problem, it's quote_string_for_globbing that was flawed +c=$'\177' +r="\\$c" + +recho $r + +# first, match some regular expressions containing ^A, ^G, ^? +[[ $'\001' =~ $'\001' ]] ; echo $? +[[ $'\001' =~ $'\\\001' ]] ; echo $? +[[ $'\001' =~ $'\\[\001]' ]] ; echo $? + +[[ $'\a' =~ $'\a' ]] ; echo $? +[[ $'\a' =~ $'\\\a' ]] ; echo $? +[[ $'\a' =~ $'\\[\a]' ]] ; echo $? + +[[ $'\177' =~ $'\177' ]] ; echo $? +[[ $'\177' =~ $'\\\177' ]] ; echo $? +[[ $'\177' =~ $'\\[\177]' ]] ; echo $? + +# Now let's try it with variables expanding to those values +for c in $'\001' $'\a' $'\177' ; do + for r in "$c" "\\$c" "\\[$c]"; do + [[ $c =~ $r ]]; + printf '[[ %q =~ %q ]] -> %d\n' "$c" "$r" "$?"; + done; + printf %s\\n --- +done + +# try again with literals + +[[ '' =~ $'' ]] ; echo $? +[[ '' =~ '\' ]] ; echo $? +[[ '' =~ '\[]' ]] ; echo $? + +[[ '' =~ '' ]] ; echo $? +[[ '' =~ '\' ]] ; echo $? +[[ '' =~ '\[]' ]] ; echo $? + +[[ '' =~ $'' ]] ; echo $? +[[ '' =~ '\' ]] ; echo $? +[[ '' =~ '\[]' ]] ; echo $? + +# more expansions, but with literal non-special characters +[[ x =~ \x ]] ; echo $? +[[ x =~ \\x ]] ; echo $? + +bs='\' +[[ x =~ ${bs}x ]] ; echo $? + +[[ x =~ $'\\'x ]] ; echo $? +[[ x =~ '\'x ]] ; echo $? + +v='a\-b' +[[ a-b =~ ${v} ]] ; echo $? +[[ a-b =~ a\-b ]]; echo $? +[[ a-b =~ a${bs}-b ]]; echo $? +[[ a-b =~ a\\-b ]] ; echo $? +[[ a-b =~ "a\-b" ]] ; echo $? + +c=$'\001' + +recho $c "$c" + +[[ $c == $c ]] && echo ok 1 +[[ $c =~ $c ]] && echo ok 2 +[[ $c =~ \\$c ]] || echo ok 3 +[[ $c =~ \\"$c" ]] || echo ok 4 + +[[ $c =~ "\\"$c ]] || echo ok 5 +[[ $c =~ '\'$c ]] || echo ok 6 + +[[ $c =~ "\\""$c" ]] || echo ok 7 +[[ $c =~ '\'"$c" ]] || echo ok 8 diff --git a/bash-5.1/tests/cond.right b/bash-5.1/tests/cond.right new file mode 100644 index 0000000000000000000000000000000000000000..59a4a8869f1eaee0bf2f7fc6e4919d3dfbdd67fc --- /dev/null +++ b/bash-5.1/tests/cond.right @@ -0,0 +1,136 @@ +returns: 0 +returns: 0 +returns: 1 +returns: 0 +returns: 0 +returns: 0 +returns: 0 +returns: 0 +returns: 1 +returns: 0 +returns: 0 +returns: 1 +returns: 1 +returns: 1 +returns: 1 +returns: 0 +returns: 0 +returns: 0 +returns: 1 +returns: 0 +returns: 1 +returns: 0 +returns: 1 +returns: 1 +returns: 0 +./cond.tests: line 114: [[: 4+: syntax error: operand expected (error token is "+") +returns: 1 +returns: 0 +returns: 0 +returns: 1 +returns: 0 +returns: 0 +returns: 1 +returns: 0 +ok +jbig2dec + +found 1 +libc +found 2 +libc +ok 42 +ok 43 +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +match 1 +match 2 +match 3 +match 4 +match 5 +match 6 +yes 1 +yes 2 +yes 3 +yes 4 +yes 5 +yes 6 +Dog 01 is Wiggles +Dog 01 is Wiggles +rematch 1 +matches 7 +matches 8 +matches 9 +unquoted matches +match control-a 1 +match control-a 2 +match control-a 3 +match control-a 4 +match control-a 5 +ok 1 +ok 2 +ok 3 +ok 4 +ok 4a +ok 5 +ok 6 +ok 7 -- d +ok 8 -- o +ok 9 +ok 10 +ok 11 +ok 12 +argv[1] = <\^?> +0 +1 +1 +0 +1 +1 +0 +1 +1 +[[ $'\001' =~ $'\001' ]] -> 0 +[[ $'\001' =~ $'\\\001' ]] -> 0 +[[ $'\001' =~ $'\\[\001]' ]] -> 1 +--- +[[ $'\a' =~ $'\a' ]] -> 0 +[[ $'\a' =~ $'\\\a' ]] -> 0 +[[ $'\a' =~ $'\\[\a]' ]] -> 1 +--- +[[ $'\177' =~ $'\177' ]] -> 0 +[[ $'\177' =~ $'\\\177' ]] -> 0 +[[ $'\177' =~ $'\\[\177]' ]] -> 1 +--- +0 +1 +1 +0 +1 +1 +0 +1 +1 +0 +1 +0 +1 +1 +0 +0 +0 +1 +1 +argv[1] = <^A> +argv[2] = <^A> +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 +ok 8 diff --git a/bash-5.1/tests/cond.tests b/bash-5.1/tests/cond.tests new file mode 100644 index 0000000000000000000000000000000000000000..aa6a81047eb7c63e861e634679b20c55dcba1778 --- /dev/null +++ b/bash-5.1/tests/cond.tests @@ -0,0 +1,214 @@ +# 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 . +# +# +# the test/[ code is tested elsewhere, and the [[...]] just uses the same +# code. this tests the special features of [[...]] +# +TDIR=/usr/homes/chet + +# this one is straight out of the ksh88 book +[[ foo > bar && $PWD -ef . ]] +echo returns: $? + +# [[ x ]] is equivalent to [[ -n x ]] +[[ x ]] +echo returns: $? + +# [[ ! x ]] is equivalent to [[ ! -n x ]] +[[ ! x ]] +echo returns: $? + +# ! binds tighter than test/[ -- it binds to a term, not an expression +[[ ! x || x ]] +echo returns: $? + +# parenthesized terms didn't work right until post-2.04 +[[ a ]] +echo returns: $? + +[[ (a) ]] +echo returns: $? + +[[ -n a ]] +echo returns: $? + +[[ (-n a) ]] +echo returns: $? + +# unset variables don't need to be quoted +[[ -n $UNSET ]] +echo returns: $? + +[[ -z $UNSET ]] +echo returns: $? + +# the ==/= and != operators do pattern matching +[[ $TDIR == /usr/homes/* ]] +echo returns: $? + +# ...but you can quote any part of the pattern to have it matched as a string +[[ $TDIR == /usr/homes/\* ]] +echo returns: $? + +[[ $TDIR == '/usr/homes/*' ]] +echo returns: $? + +# if the first part of && fails, the second is not executed +[[ -n $UNSET && $UNSET == foo ]] +echo returns: $? + +[[ -z $UNSET && $UNSET == foo ]] +echo returns: $? + +# if the first part of || succeeds, the second is not executed +[[ -z $UNSET || -d $PWD ]] +echo returns: $? + +# if the rhs were executed, it would be an error +[[ -n $TDIR || $HOME -ef ${H*} ]] +echo returns: $? + +[[ -n $TDIR && -z $UNSET || $HOME -ef ${H*} ]] +echo returns: $? + +# && has a higher parsing precedence than || +[[ -n $TDIR && -n $UNSET || $TDIR -ef . ]] +echo returns: $? + +# ...but expressions in parentheses may be used to override precedence rules +[[ -n $TDIR || -n $UNSET && $PWD -ef xyz ]] +echo returns: $? + +[[ ( -n $TDIR || -n $UNSET ) && $PWD -ef xyz ]] +echo returns: $? + +# some arithmetic tests for completeness -- see what happens with missing +# operands, bad expressions, makes sure arguments are evaluated as +# arithmetic expressions, etc. + +unset IVAR A +[[ 7 -gt $IVAR ]] +echo returns: $? + +[[ $IVAR -gt 7 ]] +echo returns: $? + +IVAR=4 +[[ $IVAR -gt 7 ]] +echo returns: $? + +[[ 7 -eq 4+3 ]] +echo returns: $? + +[[ 7 -eq 4+ ]] +echo returns: $? + +IVAR=4+3 +[[ $IVAR -eq 7 ]] +echo returns: $? + +A=7 +[[ $IVAR -eq A ]] +echo returns: $? + +unset IVAR A + +# more pattern matching tests + +[[ $filename == *.c ]] +echo returns: $? + +filename=patmatch.c + +[[ $filename == *.c ]] +echo returns: $? + +# the extended globbing features may be used when matching patterns +shopt -s extglob + +arg=-7 + +[[ $arg == -+([0-9]) ]] +echo returns: $? + +arg=-H + +[[ $arg == -+([0-9]) ]] +echo returns: $? + +arg=+4 +[[ $arg == ++([0-9]) ]] +echo returns: $? + +# make sure the null string is never matched if the string is not null +STR=file.c +PAT= + +if [[ $STR = $PAT ]]; then + echo oops +fi + +# but that if the string is null, a null pattern is matched correctly +STR= +PAT= + +if [[ $STR = $PAT ]]; then + echo ok +fi + +# test the regular expression conditional operator +[[ jbig2dec-0.9-i586-001.tgz =~ ([^-]+)-([^-]+)-([^-]+)-0*([1-9][0-9]*)\.tgz ]] +echo ${BASH_REMATCH[1]} + +# this shouldn't echo anything +[[ jbig2dec-0.9-i586-001.tgz =~ \([^-]+\)-\([^-]+\)-\([^-]+\)-0*\([1-9][0-9]*\)\.tgz ]] +echo ${BASH_REMATCH[1]} + +LDD_BASH=" linux-gate.so.1 => (0xffffe000) + libreadline.so.5 => /lib/libreadline.so.5 (0xb7f91000) + libhistory.so.5 => /lib/libhistory.so.5 (0xb7f8a000) + libncurses.so.5 => /lib/libncurses.so.5 (0xb7f55000) + libdl.so.2 => /lib/libdl.so.2 (0xb7f51000) + libc.so.6 => /lib/libc.so.6 (0xb7e34000) + /lib/ld-linux.so.2 (0xb7fd0000)" + +[[ "$LDD_BASH" =~ "libc" ]] && echo "found 1" +echo ${BASH_REMATCH[@]} + +[[ "$LDD_BASH" =~ libc ]] && echo "found 2" +echo ${BASH_REMATCH[@]} + +# bug in all versions up to and including bash-2.05b +if [[ "123abc" == *?(a)bc ]]; then echo ok 42; else echo bad 42; fi +if [[ "123abc" == *?(a)bc ]]; then echo ok 43; else echo bad 43; fi + +match() { [[ $1 == $2 ]]; } +match $'? *x\1y\177z' $'??\\*\\x\\\1\\y\\\177\\z' || echo bad 44 + +foo="" +[[ bar == *"${foo,,}"* ]] && echo ok 1 +[[ bar == *${foo,,}* ]] && echo ok 2 + +shopt -s extquote +bs='\' +del=$'\177' +[[ bar == *$bs"$del"* ]] || echo ok 3 +[[ "" == "$foo" ]] && echo ok 4 +[[ "$del" == "${foo,,}" ]] || echo ok 5 + +${THIS_SH} ./cond-regexp1.sub + +${THIS_SH} ./cond-regexp2.sub + +${THIS_SH} ./cond-regexp3.sub diff --git a/bash-5.1/tests/coproc.right b/bash-5.1/tests/coproc.right new file mode 100644 index 0000000000000000000000000000000000000000..94b001cd1fe154e837d50d4eea4278c3251d9cc2 --- /dev/null +++ b/bash-5.1/tests/coproc.right @@ -0,0 +1,10 @@ +63 60 +a b c +63 60 +flop +coproc.tests: REFLECT: status 143 +63 60 +FOO +63 60 +root +-1 -1 diff --git a/bash-5.1/tests/coproc.tests b/bash-5.1/tests/coproc.tests new file mode 100644 index 0000000000000000000000000000000000000000..a7359320e1ac9a8ada6f030ce9ec34193a7421e6 --- /dev/null +++ b/bash-5.1/tests/coproc.tests @@ -0,0 +1,78 @@ +# 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 . +# +: ${TMPDIR:=/tmp} +TMPOUT=${TMPDIR}/coproc-wait-$BASHPID + +coproc { echo a b c; sleep 2; } + +case $COPROC_PID in +[0-9]*) ;; +*) echo COPROC_PID not integer ;; +esac + +echo ${COPROC[@]} + +read LINE <&${COPROC[0]} +echo $LINE + +wait $COPROC_PID + +coproc REFLECT { cat - ; } + +case $REFLECT_PID in +[0-9]*) ;; +*) echo REFLECT_PID not integer ;; +esac + +echo ${REFLECT[@]} + +echo flop >&${REFLECT[1]} +read LINE <&${REFLECT[0]} + +echo $LINE + +{ sleep 1; kill $REFLECT_PID; } & +wait $REFLECT_PID >$TMPOUT 2>&1 || { status=$? ; echo "coproc.tests: REFLECT: status $status" ; } +[[ $status < 128 || $status == 143 ]] || { + echo "coproc.tests: wait for REFLECT failed" >&2 +} +rm -f $TMPOUT +exec 2>&1 + +coproc xcase -n -u + +case $COPROC_PID in +[0-9]*) ;; +*) echo COPROC_PID not integer ;; +esac + +echo ${COPROC[@]} + +echo foo >&${COPROC[1]} +read <&${COPROC[0]} + +echo $REPLY +echo ${COPROC[@]} + +cat /etc/passwd | grep root | awk -F: '{print $1;}' | sed 1q + +exec 4<&${COPROC[0]}- +exec >&${COPROC[1]}- + +echo ${COPROC[@]} + +read foo <&4 +echo $foo >&2 + +exit 0 diff --git a/bash-5.1/tests/cprint.right b/bash-5.1/tests/cprint.right new file mode 100644 index 0000000000000000000000000000000000000000..200007241e87eea12c1f7e47f32156191510ed74 --- /dev/null +++ b/bash-5.1/tests/cprint.right @@ -0,0 +1,72 @@ +tf is a function +tf () +{ + echo this is ${0##*/} > /dev/null; + echo a | cat - > /dev/null; + test -f ${0##*/} && echo ${0##*/} is a regular file; + test -d ${0##*/} || echo ${0##*/} is not a directory; + echo a; + echo b; + echo c; + echo background > /dev/null & ( exit 1 ); + echo $?; + { + echo a + }; + i=0; + while (( i < 3 )); do + test -r /dev/fd/$i; + i=$(( i + 1 )); + done; + [[ -r /dev/fd/0 && -w /dev/fd/1 ]] || echo oops > /dev/null; + for name in $( echo 1 2 3 ); + do + test -r /dev/fd/$name; + done; + if [[ -r /dev/fd/0 && -w /dev/fd/1 ]]; then + echo ok > /dev/null; + else + if (( 7 > 40 )); then + echo oops; + else + echo done; + fi; + fi > /dev/null; + case $PATH in + *$PWD*) + echo \$PWD in \$PATH + ;; + *) + echo \$PWD not in \$PATH + ;; + esac > /dev/null; + while false; do + echo z; + done > /dev/null; + until true; do + echo z; + done > /dev/null; + echo \&\|'()' \{ echo abcde \; \}; + eval fu\%nc'()' \{ echo abcde \; \}; + type fu\%nc +} +tf2 is a function +tf2 () +{ + ( { + time -p echo a | cat - > /dev/null + } ) 2>&1 +} +cprint.tests is a regular file +cprint.tests is not a directory +a +b +c +1 +a +&|() { echo abcde ; } +fu%nc is a function +fu%nc () +{ + echo abcde +} diff --git a/bash-5.1/tests/cprint.tests b/bash-5.1/tests/cprint.tests new file mode 100644 index 0000000000000000000000000000000000000000..e598f8c9cde284e58e500e1693f4271af0e43f5e --- /dev/null +++ b/bash-5.1/tests/cprint.tests @@ -0,0 +1,80 @@ +# 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 . +# +# +# a nonsense script and shell function to test out the command printing code +# +tf() +{ + # simple command with redir + echo this is ${0##*/} > /dev/null + + # pipeline + echo a | cat - > /dev/null + + test -f ${0##*/} && echo ${0##*/} is a regular file + test -d ${0##*/} || echo ${0##*/} is not a directory + + echo a ; echo b ; echo c + + echo background >/dev/null & + + ( exit 1 ) + echo $? + + { echo a ; } + + i=0 + while (( i < 3 )); do + test -r /dev/fd/$i + i=$(( i + 1 )) + done + + [[ -r /dev/fd/0 && -w /dev/fd/1 ]] || echo oops > /dev/null + + for name in $( echo 1 2 3 ); do + test -r /dev/fd/$name + done + + if [[ -r /dev/fd/0 && -w /dev/fd/1 ]] ; then + echo ok > /dev/null + elif (( 7 > 40 )) ; then + echo oops + else + echo done + fi > /dev/null + + case $PATH in + *$PWD*) echo \$PWD in \$PATH ;; + *) echo \$PWD not in \$PATH ;; + esac > /dev/null + + while false; do echo z; done > /dev/null + + until true; do echo z ; done > /dev/null + + echo \&\|'()' \{ echo abcde \; \} + # when not in POSIX mode, we can have weirdly-named functions + eval fu\%nc'()' \{ echo abcde \; \} + type fu\%nc +} + +tf2() +{ + ( { time -p echo a | cat - > /dev/null ; } ) 2>&1 +} + +type tf +type tf2 + +tf diff --git a/bash-5.1/tests/dbg-support.right b/bash-5.1/tests/dbg-support.right new file mode 100644 index 0000000000000000000000000000000000000000..6e2194aae9cb162642751d9f2a558d464851c798 --- /dev/null +++ b/bash-5.1/tests/dbg-support.right @@ -0,0 +1,371 @@ +debug lineno: 74 main +debug lineno: 77 main +FUNCNAME main +debug lineno: 81 main +debug lineno: 30 fn1 +debug lineno: 31 fn1 +LINENO 31 +debug lineno: 32 fn1 +LINENO 32 +debug lineno: 33 fn1 +BASH_SOURCE[0] ./dbg-support.tests +debug lineno: 34 fn1 +FUNCNAME[0] fn1 +debug lineno: 35 fn1 +debug lineno: 35 fn1 81 ./dbg-support.tests +debug lineno: 36 fn1 +debug lineno: 36 fn1 81 main ./dbg-support.tests +debug lineno: 37 fn1 +debug lineno: 37 fn1 +debug lineno: 38 fn1 +./dbg-support.tests: line 38: caller: foo: invalid number +caller: usage: caller [expr] +debug lineno: 38 fn1 +debug lineno: 30 fn1 +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 30 fn1 +debug lineno: 27 print_return_trap +debug lineno: 82 main +debug lineno: 41 fn2 +debug lineno: 42 fn2 +fn2 here. Calling fn1... +debug lineno: 43 fn2 +debug lineno: 30 fn1 +debug lineno: 31 fn1 +LINENO 31 +debug lineno: 32 fn1 +LINENO 32 +debug lineno: 33 fn1 +BASH_SOURCE[0] ./dbg-support.tests +debug lineno: 34 fn1 +FUNCNAME[0] fn1 +debug lineno: 35 fn1 +debug lineno: 35 fn1 43 ./dbg-support.tests +debug lineno: 36 fn1 +debug lineno: 36 fn1 43 fn2 ./dbg-support.tests +debug lineno: 37 fn1 +debug lineno: 37 fn1 82 main ./dbg-support.tests +debug lineno: 38 fn1 +./dbg-support.tests: line 38: caller: foo: invalid number +caller: usage: caller [expr] +debug lineno: 38 fn1 +debug lineno: 30 fn1 +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 30 fn1 +debug lineno: 27 print_return_trap +debug lineno: 41 fn2 +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 41 fn2 +debug lineno: 27 print_return_trap +debug lineno: 83 main +debug lineno: 46 fn3 +debug lineno: 47 fn3 +LINENO 47 +debug lineno: 48 fn3 +BASH_SOURCE[0] ./dbg-support.tests +debug lineno: 51 fn3 +debug lineno: 52 fn3 +debug lineno: 53 fn3 +debug lineno: 53 fn3 +debug lineno: 54 fn3 +debug lineno: 55 fn3 +debug lineno: 56 fn3 +fn3 called from file `./dbg-support.tests' at line 0 +debug lineno: 53 fn3 +debug lineno: 53 fn3 +debug lineno: 54 fn3 +debug lineno: 55 fn3 +debug lineno: 55 fn3 +debug lineno: 56 fn3 +main called from file `./dbg-support.tests' at line 0 +debug lineno: 53 fn3 +debug lineno: 53 fn3 +debug lineno: 59 fn3 +debug lineno: 31 source +SOURCED LINENO 31 +debug lineno: 32 source +SOURCED BASH_SOURCE[0] ./dbg-support.sub +debug lineno: 33 source +debug lineno: 16 sourced_fn +debug lineno: 17 sourced_fn +debug lineno: 18 sourced_fn +SOURCED FN LINENO 18 +debug lineno: 21 sourced_fn +debug lineno: 22 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[1]: source called from ./dbg-support.tests at line 59 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 83 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[3]: main called from ./dbg-support.tests at line 0 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 16 sourced_fn +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 16 sourced_fn +debug lineno: 27 print_return_trap +debug lineno: 59 fn3 +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 59 fn3 +debug lineno: 27 print_return_trap +debug lineno: 46 fn3 +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 46 fn3 +debug lineno: 27 print_return_trap +debug lineno: 84 main +debug lineno: 31 source +SOURCED LINENO 31 +debug lineno: 32 source +SOURCED BASH_SOURCE[0] ./dbg-support.sub +debug lineno: 33 source +debug lineno: 16 sourced_fn +debug lineno: 17 sourced_fn +debug lineno: 18 sourced_fn +SOURCED FN LINENO 18 +debug lineno: 21 sourced_fn +debug lineno: 22 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[1]: source called from ./dbg-support.tests at line 84 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[2]: main called from ./dbg-support.tests at line 0 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 16 sourced_fn +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 16 sourced_fn +debug lineno: 27 print_return_trap +debug lineno: 84 main +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 84 main +debug lineno: 27 print_return_trap +debug lineno: 87 main +debug lineno: 90 main +LINENO 31 +LINENO 32 +BASH_SOURCE[0] ./dbg-support.tests +FUNCNAME[0] fn1 +90 ./dbg-support.tests +90 main ./dbg-support.tests + +./dbg-support.tests: line 38: caller: foo: invalid number +caller: usage: caller [expr] + +debug lineno: 91 main +fn2 here. Calling fn1... +LINENO 31 +LINENO 32 +BASH_SOURCE[0] ./dbg-support.tests +FUNCNAME[0] fn1 +43 ./dbg-support.tests +43 fn2 ./dbg-support.tests +91 main ./dbg-support.tests +./dbg-support.tests: line 38: caller: foo: invalid number +caller: usage: caller [expr] + +debug lineno: 92 main +LINENO 47 +BASH_SOURCE[0] ./dbg-support.tests +fn3 called from file `./dbg-support.tests' at line 0 +main called from file `./dbg-support.tests' at line 0 +SOURCED LINENO 31 +SOURCED BASH_SOURCE[0] ./dbg-support.sub +SOURCED FN LINENO 18 +FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33 +FUNCNAME[1]: source called from ./dbg-support.tests at line 59 +FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 92 +FUNCNAME[3]: main called from ./dbg-support.tests at line 0 +debug lineno: 93 main +fn4 here. Calling fn3... +LINENO 47 +BASH_SOURCE[0] ./dbg-support.tests +fn3 called from file `./dbg-support.tests' at line 93 +fn4 called from file `./dbg-support.tests' at line 0 +main called from file `./dbg-support.tests' at line 0 +SOURCED LINENO 31 +SOURCED BASH_SOURCE[0] ./dbg-support.sub +SOURCED FN LINENO 18 +FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33 +FUNCNAME[1]: source called from ./dbg-support.tests at line 59 +FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 64 +FUNCNAME[3]: fn4 called from ./dbg-support.tests at line 93 +FUNCNAME[4]: main called from ./dbg-support.tests at line 0 +debug lineno: 94 main +SOURCED LINENO 31 +SOURCED BASH_SOURCE[0] ./dbg-support.sub +SOURCED FN LINENO 18 +FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33 +FUNCNAME[1]: source called from ./dbg-support.tests at line 94 +FUNCNAME[2]: main called from ./dbg-support.tests at line 0 +return lineno: 94 main +debug lineno: 97 main +debug lineno: 100 main +debug lineno: 31 source +SOURCED LINENO 31 +debug lineno: 32 source +SOURCED BASH_SOURCE[0] ./dbg-support.sub +debug lineno: 33 source +debug lineno: 16 sourced_fn +debug lineno: 17 sourced_fn +debug lineno: 18 sourced_fn +SOURCED FN LINENO 18 +debug lineno: 21 sourced_fn +debug lineno: 22 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[1]: source called from ./dbg-support.tests at line 100 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[2]: main called from ./dbg-support.tests at line 0 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 16 sourced_fn +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 16 sourced_fn +debug lineno: 27 print_return_trap +debug lineno: 100 main +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 100 main +debug lineno: 27 print_return_trap +debug lineno: 101 main +debug lineno: 104 main +debug lineno: 104 main +debug lineno: 105 main +debug lineno: 108 main +debug lineno: 104 main +debug lineno: 104 main +debug lineno: 105 main +debug lineno: 108 main +debug lineno: 104 main +debug lineno: 104 main +debug lineno: 105 main +debug lineno: 106 main +Hit 2 +debug lineno: 108 main +debug lineno: 104 main +debug lineno: 104 main +debug lineno: 114 main +SOURCED FN LINENO 18 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 114 FUNCNAME[1]: main called from ./dbg-support.tests at line 0 +debug lineno: 115 main +SOURCED FN LINENO 18 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 115 FUNCNAME[1]: main called from ./dbg-support.tests at line 0 +debug lineno: 116 main +debug lineno: 117 main +SOURCED FN LINENO 18 +FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 117 +FUNCNAME[1]: main called from ./dbg-support.tests at line 0 +debug lineno: 121 main +debug lineno: 122 main +debug lineno: 16 sourced_fn +debug lineno: 17 sourced_fn +debug lineno: 18 sourced_fn +SOURCED FN LINENO 18 +debug lineno: 21 sourced_fn +debug lineno: 22 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 122 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 24 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 25 sourced_fn +debug lineno: 26 sourced_fn +FUNCNAME[1]: main called from ./dbg-support.tests at line 0 +debug lineno: 23 sourced_fn +debug lineno: 23 sourced_fn +debug lineno: 16 sourced_fn +debug lineno: 25 print_return_trap +debug lineno: 26 print_return_trap +return lineno: 16 sourced_fn +debug lineno: 27 print_return_trap +debug lineno: 125 main +debug lineno: 130 main +debug lineno: 134 main +got it +debug lineno: 142 main +debug lineno: 143 main +debug lineno: 144 main +debug lineno: 143 main +debug lineno: 144 main +debug lineno: 142 main +debug lineno: 143 main +debug lineno: 144 main +debug lineno: 143 main +debug lineno: 144 main +debug lineno: 148 main +main: calling f1 +f1: calling f2 +f2: calling f3 +f3: calling callstack +deep 6 +0 z +1 3 +2 y +3 2 +4 x +5 1 +FUNCNAME stack: f3 f2 f1 main +39 f2 ./dbg-support3.sub +f3: returning +f2: return from f3 +f1: return from f2 +main: f1 returns diff --git a/bash-5.1/tests/dbg-support.sub b/bash-5.1/tests/dbg-support.sub new file mode 100644 index 0000000000000000000000000000000000000000..8c82c80c6186b666817206a6c0940b1d6530ae46 --- /dev/null +++ b/bash-5.1/tests/dbg-support.sub @@ -0,0 +1,39 @@ +# 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 . +# +# This file is intended to be sourced from one of the bashdb test programs + +sourced_fn() { + name="fn2" + echo "SOURCED FN LINENO $LINENO" + + # Print a stack trace + declare -i n + n=${#FUNCNAME[@]} + for (( i=0 ; (( i < $n )) ; i++ )) ; do + local -i j=i+1 + [ $j -eq $n ] && j=i # main()'s file is the same as the first caller + echo "FUNCNAME[$i]: ${FUNCNAME[$i]} called from ${BASH_SOURCE[$j]}" \ + "at line ${BASH_LINENO[$i]}" + done +} + +echo "SOURCED LINENO $LINENO" +echo "SOURCED BASH_SOURCE[0]" ${BASH_SOURCE[0]} +sourced_fn + +#;;; Local Variables: *** +#;;; mode:shell-script *** +#;;; eval: (sh-set-shell "bash") *** +#;;; End: *** + diff --git a/bash-5.1/tests/dbg-support.tests b/bash-5.1/tests/dbg-support.tests new file mode 100644 index 0000000000000000000000000000000000000000..b4a58e4b6a42225c9c2d04e7d3160294d71402b4 --- /dev/null +++ b/bash-5.1/tests/dbg-support.tests @@ -0,0 +1,148 @@ +# 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 . +# + +# +# Test correct functioning bash debug support not via the bashdb +# debugger but merely by printing via print_trap() +# $Id: dbg-support.tests,v 1.13 2003/02/17 22:02:25 rockyb Exp $ +shopt -s extdebug +print_debug_trap() { + echo "debug lineno: $1 ${FUNCNAME[1]}" + return +} + +print_return_trap() { + echo "return lineno: $1 ${FUNCNAME[1]}" + return +} + +fn1() { + echo "LINENO $LINENO" + echo "LINENO $LINENO" + echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]} + echo "FUNCNAME[0]" ${FUNCNAME[0]} + echo `caller` + echo `caller 0` + echo `caller 1` + echo `caller foo` +} + +fn2() { + echo "fn2 here. Calling fn1..." + fn1 +} + +fn3() { + echo "LINENO $LINENO" + echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]} + + # Print a stack trace + declare -i n + n=${#FUNCNAME[@]} + for (( i=0 ; (( i < $n )) ; i++ )) ; do + local -i j=i+1 + [ $j -eq $n ] && j=i # main()'s file is the same as the first caller + echo "${FUNCNAME[$i]} called from file " \ + "\`${BASH_SOURCE[$j]}' at line ${BASH_LINENO[$j]}" + done + source ./dbg-support.sub +} + +fn4() { + echo "fn4 here. Calling fn3..." + fn3 +} + +# +# Test of support for debugging facilities in bash +# +# Test debugger set option functrace - set on. Not in vanilla Bash 2.05 +# +set -o functrace +trap 'print_debug_trap $LINENO' DEBUG +trap 'print_return_trap $LINENO' RETURN + +# Funcname is now an array, but you still can't see it outside a function +echo "FUNCNAME" ${FUNCNAME[0]:-main} + +# We should trace into the below. +# Start easy with a simple function. +fn1 +fn2 +fn3 +source ./dbg-support.sub + +# Test debugger set option functrace - set off +set +T + +# We should not trace into this. +fn1 +fn2 +fn3 +fn4 +source ./dbg-support.sub + +# Another way to say: set -o functrace +set -T + +# We should trace into this. +source ./dbg-support.sub +set +T + +# Test that the line numbers in the presence of conditionals are correct. +for (( i=0 ; (( i <= 2 )) ; i++ )) ; do + if [ $i -eq 2 ] ; then + echo "Hit 2" + fi + j=4 +done + +# +# Check line numbers in command substitution +# +echo $(sourced_fn) +echo `sourced_fn` +x=$((sourced_fn)) +x={ sourced_fn } + +# Make sure we step into sourced_fn as a command when we request to do so. +# Vanilla bash 2.0 doesn't do. +set -o functrace +x={ sourced_fn } + +# Should see line number of xyzzy below. Vanilla bash 2.05b doesn't do +case xyzzy in + a ) + x=5 + ;; + xyzz? ) + case 3 in + 2 ) + x=6 ;; + 3 ) + echo "got it" ;; + * ) echo "no good" ;; + esac + ;; + * ) +esac + +# Should see line numbers for initial for lines. +for i in 0 1 ; do + for j in 3 4 ; do + ((x=i+j)) + done +done + +${THIS_SH} ./dbg-support3.sub diff --git a/bash-5.1/tests/dbg-support2.right b/bash-5.1/tests/dbg-support2.right new file mode 100644 index 0000000000000000000000000000000000000000..5727d1f1c91a0325b863ca29b9c3460560df5b9d --- /dev/null +++ b/bash-5.1/tests/dbg-support2.right @@ -0,0 +1,7 @@ +lineno: 29 (18) main +lineno: 30 (18) main +x is 1 +lineno: 31 (18) main +lineno: 32 (18) main +lineno: 33 (18) main +x is 1 diff --git a/bash-5.1/tests/dbg-support2.tests b/bash-5.1/tests/dbg-support2.tests new file mode 100644 index 0000000000000000000000000000000000000000..c33251d3847b1ee42bfaf5c846765b1b74f11255 --- /dev/null +++ b/bash-5.1/tests/dbg-support2.tests @@ -0,0 +1,33 @@ +# 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 . +# +# +# Test correct trap return codes = 2 means skip execution. +shopt -s extdebug +print_trap() { + echo "lineno: $1 ($LINENO) ${FUNCNAME[1]}" + if [[ $debug_exit == 2 ]] ; then + debug_exit=0 + return 2 + fi + return 0 +} + +debug_exit=0 +trap 'print_trap $LINENO' DEBUG + +x=1 +echo "x is $x" +debug_exit=2 +x=2 +echo "x is $x" diff --git a/bash-5.1/tests/dbg-support3.sub b/bash-5.1/tests/dbg-support3.sub new file mode 100644 index 0000000000000000000000000000000000000000..146831f4c24f79caa7467d5dfcf7f0e03e8e4293 --- /dev/null +++ b/bash-5.1/tests/dbg-support3.sub @@ -0,0 +1,52 @@ +# 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 . +# +shopt -s extdebug + +callstack(){ + deep=${#BASH_ARGV[*]} + echo "deep $deep" + i=0 + for ff in ${BASH_ARGV[@]} + do + echo "$i $ff" + i=$(($i+1)) + done +} + +f3() +{ + echo $FUNCNAME: calling callstack + callstack + echo FUNCNAME stack: ${FUNCNAME[@]} + caller 0 + echo $FUNCNAME: returning +} + +f2() +{ + echo $FUNCNAME: calling f3 + f3 3 z + echo $FUNCNAME: return from f3 +} + +f1() +{ + echo $FUNCNAME: calling f2 + f2 2 y + echo $FUNCNAME: return from f2 +} + +echo main: calling f1 +f1 1 x +echo main: f1 returns diff --git a/bash-5.1/tests/dollar-at-star b/bash-5.1/tests/dollar-at-star new file mode 100755 index 0000000000000000000000000000000000000000..d48089891c4cc523afa7dd7b296c54fe18ab8794 --- /dev/null +++ b/bash-5.1/tests/dollar-at-star @@ -0,0 +1,313 @@ +# first, let's start with the basics + +recho "$@" +recho "$*" + +recho $@ +recho $* + +foo=$* +foo=$@ + +foo="$*" +foo="$@" + +unset -v bar + +foo=${bar:-$*} +foo=${bar:-$@} + +foo=${bar:-"$*"} +foo=${bar:-"$@"} + +foo=${!*} +foo=${!@} + +set a b + +recho "$*" + +# If IFS is null, the parameters are joined without separators +IFS='' +recho "$*" + +# If IFS is unset, the parameters are separated by spaces +unset IFS +recho "${*}" + +recho "$@" +recho $@ + +IFS='/' +set bob 'tom dick harry' joe +set $* +recho $# +recho $1 +recho $2 +recho $3 + +set bob 'tom dick harry' joe +set ${*} +recho $# +recho $1 +recho $2 +recho $3 + +set bob 'tom dick harry' joe +set $@ +recho $# +recho $1 +recho $2 +recho $3 + +set bob 'tom dick harry' joe +set ${@} +recho $# +recho $1 +recho $2 +recho $3 + +# according to POSIX.2, unquoted $* should expand to multiple words if +# $IFS is null, just like unquoted $@ +IFS='' +set bob 'tom dick harry' joe +set $* +recho $# +recho $1 +recho $2 +recho $3 + +set bob 'tom dick harry' joe +set $@ +recho $# +recho $1 +recho $2 +recho $3 + +# if IFS is unset, the individual positional parameters are split on +# " \t\n" if $* or $@ are unquoted +unset IFS +set bob 'tom dick harry' joe +set $* +recho $# +recho $1 +recho $2 +recho $3 + +set bob 'tom dick harry' joe +set $@ +recho $# +recho $1 +recho $2 +recho $3 + +# but not for "$@" or "$*" +set bob 'tom dick harry' joe +set "$*" +recho $# +recho $1 +recho $2 +recho $3 + +set bob 'tom dick harry' joe +set "$@" +recho $# +recho $1 +recho $2 +recho $3 + +# POSIX.2 says these should both expand the positional parameters +# to multiple words +set a b c d e +IFS="" +recho $@ +recho "$@" + +# this example is straight from the POSIX.2 rationale +set foo bar bam + +recho "$@" +recho "$*" + +unset IFS + +recho "$@" +recho $@ +recho "$*" + +IFS=: + +# special variables +set -- 1 2 3 4 5 6 7 8 9 10 + +bar=${*} +foo=$* +echo foo = "$foo" +echo bar = "$bar" + +foo1=$@ +bar1=${@} + +echo foo1 = "$foo1" +echo bar1 = "$bar1" + +foo2="$*" +bar2="${*}" + +echo foo2 = "$foo2" +echo bar2 = "$bar2" + +eval foo3='$*' bar3='${*}' +echo foo3 = "$foo3" +echo bar3 = "$bar3" + +case $* in +*\:*) echo ok 1;; +*) echo bad 1;; +esac + +case $@ in +*\:*) echo bad 2;; +*) echo ok 2;; +esac + +case "$*" in +*\:*) echo ok 3;; +*) echo bad 3;; +esac + +case "$@" in +*\:*) echo bad 4;; +*) echo ok 4;; +esac + +IFS=$' \t\n' + +bar=${*} +foo=$* +echo foo = "$foo" +echo bar = "$bar" + +foo1=$@ +bar1=${@} + +echo foo1 = "$foo1" +echo bar1 = "$bar1" + +foo2="$*" +bar2="${*}" + +echo foo2 = "$foo2" +echo bar2 = "$bar2" + +eval foo3='$*' bar3='${*}' +echo foo3 = "$foo3" +echo bar3 = "$bar3" + +case $* in +*\ *) echo ok 1;; +*) echo bad 1;; +esac + +case $@ in +*\ *) echo ok 2;; +*) echo bad 2;; +esac + +case "$*" in +*\ *) echo ok 3;; +*) echo bad 3;; +esac + +case "$@" in +*\ *) echo ok 4;; +*) echo bad 4;; +esac + +# tests for the effect of quoting $* and $@ in an assignment context (plus +# arrays) -- bugs through bash 4.2 +${THIS_SH} ./dollar-at-star1.sub + +# more tests for expanding $@ and $* in a context where there is no word +# splitting +${THIS_SH} ./dollar-at-star2.sub +${THIS_SH} ./dollar-at-star3.sub +${THIS_SH} ./dollar-at-star4.sub +${THIS_SH} ./dollar-at-star5.sub +${THIS_SH} ./dollar-at-star6.sub +${THIS_SH} ./dollar-at-star7.sub + +# tests for expansions of $@ and ${a[@]} (vs. $* and ${a[*]}) on the RHS of +# assignment statements with non-default IFS: $@ expands to args or array +# members separated by spaces +${THIS_SH} ./dollar-at-star8.sub + +# more tests of the expansions of $@ and $* (and their array equivalents) +# with different values for IFS +${THIS_SH} ./dollar-at-star9.sub + +# tests for special expansion of "$*" and "${array[*]}" when used with other +# expansions -- bugs through bash-2.05b +${THIS_SH} ./dollar-star1.sub + +# tests for expansion of "$@" on rhs of things like ${param:+word}. Bugs +# though bash-2.05b +${THIS_SH} ./dollar-at1.sub + +# tests for expansion of other variables in double-quoted strings containing +# $@. Bugs through bash-2.05b +${THIS_SH} ./dollar-at2.sub + +# tests for various expansions of $* in different contexts -- word split, +# no splitting, etc. when $IFS is NUL +${THIS_SH} ./dollar-star2.sub + +# tests for expansions of "${array[*]}" and "${array[@]}" when $IFS is not the +# default and the array contains null elements +${THIS_SH} ./dollar-star3.sub + +# test for set -u and expansions of $@ when there are no positional parameters +${THIS_SH} ./dollar-at3.sub +# test for set -u and expansions of $* when there are no positional parameters +${THIS_SH} ./dollar-star4.sub + +# tests for expansions of $* when IFS is null +${THIS_SH} ./dollar-star5.sub + +# tests for inappropriate word splitting through bash-4.2 +${THIS_SH} ./dollar-at4.sub + +# tests for problems with "$@" preceded and followed by other quoted expansions +# through bash-4.2 +${THIS_SH} ./dollar-at5.sub + +# tests for problems with "${@:1}" and other expansions with null entries +# in positional parameters +${THIS_SH} ./dollar-at6.sub + +# tests for expansions of $* when $1 == ""; problem through bash-4.2 +${THIS_SH} ./dollar-star6.sub + +# tests for expansions of $* (unquoted) when IFS changes (e.g., ${IFS:=-}) +# problem through bash-4.2 +${THIS_SH} ./dollar-star7.sub + +# tests for expansions of $* (unquoted) when IFS is null and word splitting is +# not going to be performed. +# problem through bash-4.4 in some parameter expansion contexts +${THIS_SH} ./dollar-star8.sub + +# tests for expansions of "$@" when there are no positional parameter or when +# $1 == '' and the expansion is preceded by something that results in a quoted +# null string +${THIS_SH} ./dollar-at7.sub + +# tests for expansions of $* when in an assignment context (no splitting) and +# IFS is null +${THIS_SH} ./dollar-star9.sub + +# more tests for expansions of $* when not splitting with IFS set or unset and +# null strings as the positional parameters +${THIS_SH} ./dollar-star10.sub + +exit 0 diff --git a/bash-5.1/tests/dollar-at-star1.sub b/bash-5.1/tests/dollar-at-star1.sub new file mode 100644 index 0000000000000000000000000000000000000000..ef15efc3e2707d6b7b089f16c62e969a6ca380ea --- /dev/null +++ b/bash-5.1/tests/dollar-at-star1.sub @@ -0,0 +1,36 @@ +# 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 . +# +# from dan douglas +expassign() +{ + typeset -a a + a=("$@") + typeset var asn + + while IFS= read -r asn; do + IFS=: command eval "$asn" + printf '%-14s... %s\n' "$asn" "$var" + done <<\EOF +var=${a[*]} +var="${a[*]}" +var=$* +var="$*" +var=${a[@]} +var="${a[@]}" +var=$@ +var="$@" +EOF +} + +expassign one:::two three:::four diff --git a/bash-5.1/tests/dollar-at-star2.sub b/bash-5.1/tests/dollar-at-star2.sub new file mode 100644 index 0000000000000000000000000000000000000000..64ab1eb753c84ea25f47ec65876627892ef110cd --- /dev/null +++ b/bash-5.1/tests/dollar-at-star2.sub @@ -0,0 +1,220 @@ +# 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 . +# +OIFS="$IFS" +foo=' ,foo' +set -- "$foo" + +if [[ $foo = ,* ]]; then echo bad 1; else echo ok 1; fi +if [[ $@ = ,* ]]; then echo bad 2; else echo ok 2; fi +if [[ $* = ,* ]]; then echo bad 3; else echo ok 3; fi +if [[ ${@} = ,* ]]; then echo bad 4; else echo ok 4; fi +if [[ ${*} = ,* ]]; then echo bad 5; else echo ok 5; fi +if [[ $1 = ,* ]]; then echo bad 6; else echo ok 6; fi + +set -- ' ,foo' +if [[ $foo = ,* ]]; then echo bad 7; else echo ok 7; fi +if [[ $@ = ,* ]]; then echo bad 8; else echo ok 8; fi +if [[ $* = ,* ]]; then echo bad 9; else echo ok 9; fi +if [[ ${@} = ,* ]]; then echo bad 10; else echo ok 10; fi +if [[ ${*} = ,* ]]; then echo bad 11; else echo ok 11; fi +if [[ $1 = ,* ]]; then echo bad 12; else echo ok 12; fi + +IFS= +if [[ $@ = ,* ]]; then echo bad 13; else echo ok 13; fi +if [[ $* = ,* ]]; then echo bad 14; else echo ok 14; fi +IFS="$OIFS" + +foo=' ,foo' +set -- ' ' ',foo' + +if [[ $@ = ,* ]]; then echo bad at 1; else echo ok at 1; fi +if [[ ${@} = ,* ]]; then echo bad at 2; else echo ok at 2; fi + +if [[ $* = ,* ]]; then echo bad star 1; else echo ok star 1; fi +if [[ ${*} = ,* ]]; then echo bad star 2; else echo ok star 2; fi + +foo=' ,foo' +set -- "$foo" + +# expand_string_for_rhs + +foo2=$@ +echo "$foo2" + +foo2=$* +echo "$foo2" + +foo2="$@" +echo "$foo2" + +foo2="$*" +echo "$foo2" + +# expand_word_unsplit +case $@ in +$foo2) echo ok at 1 ;; +*) echo bad at 1 ;; +esac + +# also uses expand_word_leave_quoted +case $@ in +$@) echo ok at 2;; +*) echo bad at 2;; +esac + +case $@ in +$foo) echo ok at 3 ;; +*) echo bad at 3;; +esac + +# expand_word_unsplit +case $* in +$foo2) echo ok star 1 ;; +*) echo bad star 1 ;; +esac + +# also uses expand_word_leave_quoted +case $* in +$*) echo ok star 2;; +*) echo bad star 2;; +esac + +case $* in +$foo) echo ok star 3 ;; +*) echo bad star 3;; +esac + +case $@ in +$*) echo ok at-star 1;; +*) echo bad at-star 1;; +esac + +case $* in +$@) echo ok at-star 2;; +*) echo bad at-star 2;; +esac + +foo='a b c' +set -- $foo + +# expand_string_for_rhs +IFS='|' +foo2=$@ +echo "$foo2" + +foo2=$* +echo "$foo2" + +foo2="$@" +echo "$foo2" + +foo2="$*" +echo "$foo2" + +foo="a b c" +set -- $foo + +if [[ $@ = $foo ]]; then echo ok at 1; else echo bad at 1; fi +if [[ $foo = $@ ]]; then echo ok at 2; else echo bad at 2; fi + +case $@ in +$@) echo ok at 3 ;; +*) echo bad at 3 ;; +esac + +case $@ in +$foo) echo ok at 4;; +*) echo bad at 4;; +esac + +case $foo in +$@) echo ok at 5;; +*) echo bad at 5;; +esac +IFS="$OIFS" + +foo="a b c" +set -- $foo + +IFS=: +if [[ $@ = $foo ]]; then echo ok at 1; else echo bad at 1; fi +if [[ $foo = $@ ]]; then echo ok at 2; else echo bad at 2; fi + +case $@ in +$@) echo ok at 3 ;; +*) echo bad at 3 ;; +esac + +case $@ in +$foo) echo ok at 4;; +*) echo bad at 4;; +esac + +case $foo in +$@) echo ok at 5;; +*) echo bad at 5;; +esac +IFS="$OIFS" + +foo="a b c" +set -- $foo + +IFS='|' +foo2=$@ + +case $@ in +$@) echo ok at 1 ;; +*) echo bad at 1 ;; +esac + +case $foo2 in +$foo) echo ok at 2;; +*) echo bad at 2;; +esac + +case $foo in +$foo2) echo ok at 3;; +*) echo bad at 3;; +esac + +case $foo in +$foo) echo ok at 4;; +*) echo bad at 4;; +esac + +case $foo2 in +$foo2) echo ok at 5;; +*) echo bad at 5;; +esac + +case $foo2 in +$@) echo ok at 6;; +*) echo bad at 6;; +esac + +case $@ in +$foo2) echo ok at 7;; +*) echo bad at 7;; +esac + +case $foo in +$@) echo ok at 8;; +*) echo bad at 8;; +esac + +case $@ in +$foo) echo ok at 9;; +*) echo bad at 9;; +esac +IFS="$OIFS" diff --git a/bash-5.1/tests/dollar-at-star3.sub b/bash-5.1/tests/dollar-at-star3.sub new file mode 100644 index 0000000000000000000000000000000000000000..da05444b75ff5dd2d8826f6f9760af6716863056 --- /dev/null +++ b/bash-5.1/tests/dollar-at-star3.sub @@ -0,0 +1,57 @@ +# 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 . +# +unset f ; f=abcd + +first_char=${f[@]:0:1} +recho $first_char + +first_char=${f[0]:0:1} +recho $first_char + +first_char=${f:0:1} +recho $first_char + +first_char="${f[@]:0:1}" +recho $first_char + +first_char="${f[@]:0:1}" +recho $first_char + +first_char="${f[0]:0:1}" +recho $first_char + +first_char="${f:0:1}" +recho $first_char + +unset f; +f=( one two three ) +first_word=${f[@]:0:1} +recho $first_word + +first_word=${f[0]:0:1} +recho $first_word + +first_word=${f:0:1} +recho $first_word + +unset f; +f=( one two three ) +first_word=${f[@]:0:1} +recho $first_word + +set -- abc def ghi + +printf '<%s> ' "123 $@ 456"; echo +printf '<%s> ' "123 $@\ 456"; echo + diff --git a/bash-5.1/tests/dollar-at-star4.sub b/bash-5.1/tests/dollar-at-star4.sub new file mode 100644 index 0000000000000000000000000000000000000000..9f7da8e8776106fc3048d79aaf09fc2cd857b21f --- /dev/null +++ b/bash-5.1/tests/dollar-at-star4.sub @@ -0,0 +1,112 @@ +# 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 . +# +# tests for quoted and unquoted, split and unsplit expansions of $@ and $* +# Posix interpretation 221 speaks to this issue + +set -- a b +IFS= +x=abc + +printf "<%s>\n" ${x#$*} + +a="a bc" +echo ${a#$*} +unset x a + +a=$@ +echo "$a" + +a=$* +echo "$a" + +printf '<%s>' $@ ; echo + +IFS=' +' + +a=$@ +echo "$a" + +a=$* +echo "$a" + +unset a + +unset IFS +set a b "c d" +printf '<%s>' $* ; echo +printf '<%s>' ${q-$*} ; echo + +IFS= +set a b "c d" +printf '<%s>' $* ; echo +printf '<%s>' ${q-$*} ; echo + +IFS=: +set a b +printf '<%s>' ${foo=$*} ; echo +printf '<%s>' "${foo}" ; echo + +unset foo +IFS=' +' +printf '<%s>' ${foo=$@} ; echo +printf '<%s>' "$foo" ; echo + +IFS=? +set a c +foo=abcd + +echo ${foo#"$*"} +echo "${foo#$*}" + +echo "${foo#'a?c'}" +echo "${foo#a?c}" + +IFS=? +set a c +str=a$'\001'c +pat=a$'\001' +echo "${str#$pat}" + +set a b +IFS=: + +a=$@ +recho "$a" + +recho ${foo=$*} +recho "$foo" + +unset foo +IFS=' +' +recho ${foo=$@} +recho "$foo" + +shift $# +unset foo x + +set -- a b +x=abc + +IFS= +printf "<%s>\n" ${x#$*} +printf "<%s>\n" "${x#$*}" + +x=abcd +set a c +IFS='?' +printf "<%s>\n" ${x#$*} +printf "<%s>\n" "${x#$*}" diff --git a/bash-5.1/tests/dollar-at-star5.sub b/bash-5.1/tests/dollar-at-star5.sub new file mode 100644 index 0000000000000000000000000000000000000000..d07c61a05e35a2a7cc22634fc30050578f145553 --- /dev/null +++ b/bash-5.1/tests/dollar-at-star5.sub @@ -0,0 +1,66 @@ +# 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 . +# +# testing various combinations of quoted and unquoted expansions of $@, and +# whether they generate empty words after expansion + +n() { echo "$#"; } + +n "$@" +n ${foo-"$@"} +n "${foo-$@}" + +n ""$@ +n """$@" + +n $(true)$@ +n "$(true)$@" +n "$(true)$@" +n "$(true)""$@" + +n $xxx$@ +n "$xxx$@" +n $xxx"$@" +n "$xxx""$@" + +recho $xxx"$@" +echo after 1 + +recho "$xxx$@" +echo after 2 + +recho ${foo:-$xxx"$@"} +echo after 3 + +# this is where these things start to differ +echo same as 1 +recho "${foo:-$xxx"$@"}" +echo same as 2 +recho "${foo:-$xxx$@}" + +echo null fields +recho ""$@ +recho """$@" + +echo null fields in rhs +echo null string with unquoted '$@' +recho ${foo:-""$@} +echo null string with quoted '$@' +recho ${foo:-"""$@"} + +echo assignment +recho "${foo=$@}" +echo variable +recho "$foo" +echo dollar-at +recho "${@}" diff --git a/bash-5.1/tests/dollar-at-star6.sub b/bash-5.1/tests/dollar-at-star6.sub new file mode 100644 index 0000000000000000000000000000000000000000..09353b8c9406fca1067d5e6c47b7a4a4cac4e67e --- /dev/null +++ b/bash-5.1/tests/dollar-at-star6.sub @@ -0,0 +1,42 @@ +# 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 . +# +OIFS="$IFS" +arr=(a b c) + +recho ${arr[@]@Q} +recho "${arr[@]@Q}" + +IFS="'" +recho ${arr[@]@Q} +recho "${arr[@]@Q}" +IFS="$OIFS" + +arr=("'a'" "'b'" "'c'") + +IFS="'" +recho ${arr[@]} +recho "${arr[@]}" +IFS="$OIFS" + +IFS="'" +a="'a'" +recho $a +recho "$a" +IFS="$OIFS" + +set -- "'a'" "'b'" "'c'" + +IFS="'" +recho "${@}" +recho "$@" diff --git a/bash-5.1/tests/dollar-at-star7.sub b/bash-5.1/tests/dollar-at-star7.sub new file mode 100644 index 0000000000000000000000000000000000000000..e4e63b7bb3fe8894a02372df9196f9ab994b5805 --- /dev/null +++ b/bash-5.1/tests/dollar-at-star7.sub @@ -0,0 +1,38 @@ +# 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 . +# +IFS='' # testing with only empty IFS + +set -- this is a test + +printf '|%s|\n' ${1+"$@"} +echo +printf '|%s|\n' "${1+$@}" +echo +printf '|%s|\n' "$@" +echo + +printf '|%s|\n' ${1-"$@"} +printf '|%s|\n' "${1-$@}" + +echo +: ${foo:="$@"} +printf '|%s|\n' "$foo" + +unset foo +: "${foo:=$@}" +printf '|%s|\n' "$foo" + +unset foo +printf '|%s|\n' ${foo-"$@"} +printf '|%s|\n' "${foo-$@}" diff --git a/bash-5.1/tests/dollar-at-star8.sub b/bash-5.1/tests/dollar-at-star8.sub new file mode 100644 index 0000000000000000000000000000000000000000..7e1b68844daaa53ce39a074d177d3d3d5a8e7030 --- /dev/null +++ b/bash-5.1/tests/dollar-at-star8.sub @@ -0,0 +1,14 @@ +function f { + typeset -a a + a=("$@") + typeset IFS=, + typeset a1="${a[@]} ${a[*]} $@ $* ${@} ${*}" + typeset a2=${a[@]}\ ${a[*]}\ $@\ $*\ ${@}\ ${*} a3 a4 + a3="${a[@]} ${a[*]} $@ $* ${@} ${*}" + a4=${a[@]}\ ${a[*]}\ $@\ $*\ ${@}\ ${*} + unset -v IFS + printf '%s\n' "a1=$a1" "a2=$a2" "a3=$a3" "a4=$a4" +} + +echo +f a b c diff --git a/bash-5.1/tests/dollar-at-star9.sub b/bash-5.1/tests/dollar-at-star9.sub new file mode 100644 index 0000000000000000000000000000000000000000..e5062f79fd5cabe786d28e06b7ba0af0955bd04e --- /dev/null +++ b/bash-5.1/tests/dollar-at-star9.sub @@ -0,0 +1,278 @@ +# 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 . +# +IFS=$' \t\n' # or any other IFS +set -- '' +recho ${v= "$*" } +recho "$v" +unset -v v + +IFS='' +set -- '' '' +recho ${v= "$*" } +recho "$v" +unset -v v + +IFS=$' \t\n' # or any other IFS +unset -v v + +set -- '' +recho ${v= "$@" } +recho "$v" +unset v +recho ${v= $@ } +recho "$v" +unset v +recho ${v= $@"" } +recho "$v" +unset v +recho ${v= ${@} } +recho "$v" +unset v +recho ${v= ${@}"" } +recho "$v" +unset v + +set -- '' '' +recho ${v= $@ } +recho "$v" +unset v +recho ${v= "$@" } +recho "$v" +unset v +recho "${v= $@}" +recho "$v" +unset v +recho ${v= "$@"} +recho "$v" +unset v + +IFS= + +set -- X +X=X + +recho ${0+ "$@" } +recho ${0+ $@ } +recho ${0+ $* } + +recho ${0+ "$X" } +recho ${0+ $X } +recho ${0+ $X } + +recho ${0+ "$@" } +recho "$Y" +unset Y +recho ${0+ $@ } +recho "$Y" +unset Y +recho ${0+ $* } +recho "$Y" +unset Y + +recho ${Y:= "$X" } +recho "$Y" +unset Y +recho ${Y:= $X } +recho "$Y" +unset Y +recho ${Y:= $X } +recho "$Y" +unset Y + +IFS= + +unset -v X Y + +set -- X Y +X='X Y' + +recho ${0+ "$@" } +recho ${0+ $@ } +recho ${0+ $* } + +recho ${0+ "$X" } +recho ${0+ $X } +recho ${0+ $X } + +recho ${Y:= "$@" } +recho "$Y" +unset Y +recho ${Y:= $@ } +recho "$Y" +unset Y +recho ${Y:= $* } +recho "$Y" +unset Y + +recho ${Y:= "$X" } +recho "$Y" +unset Y +recho ${Y:= $X } +recho "$Y" +unset Y +recho ${Y:= $X } +recho "$Y" +unset Y + +IFS='' +set -- ' X ' + +unset x y + +x=$* +y=${*:1} + +recho "$x" +recho "$y" + +unset x y + +recho ${x=$*} +recho ${y=${*:1}} + +set -- b a +declare -A A=([b]= [a]=) + +x=$* +y=${!A[*]} + +unset A + +recho "$x" +recho "$y" + +unset x y + +recho ${x=$*} +recho ${y=${!A[*]}} + +unset x y + +recho ${x-$*} +recho ${y-${!A[*]}} # this isn't right yet + +IFS=: +set -- a b +ind=* + +unset x y + +x=$* +y=${!ind} + +recho "$x" +recho "$y" + +unset x y + +recho ${x-$*} +recho ${y-${!ind}} # this isn't right yet + +unset x y + +recho ${x=$*} +recho ${y=${!ind}} + +set -- ' X ' +IFS=$' \t\n' + +x=$* +y=${!ind}; + +recho "$x" +recho "$y" + +IFS='' +x=$* +y=${!ind} + +recho "$x" +recho "$y" + +IFS=: +set -- a b +ind=* + +unset x y + +recho ${x-$*} +recho ${y-${!ind}} # this isn't right yet + +unset x y + +recho ${x=$*} +recho ${y=${!ind}} + +set -- ' X ' +IFS=$' \t\n' + +unset x y + +x=$* +y=${!ind}; + +recho "$x" +recho "$y" + +IFS='' +x=$* +y=${!ind} + +recho "$x" +recho "$y" + +IFS='' +set -- $'\177' + +unset -v var + +recho "${*:1}" +var=${*:1} +recho "$var" + +unset var +recho ${var=${*:1}} +recho "$var" + +declare -a a=($'\177') + +unset var +var=${a[*]:0} +recho "$var" + +unset var +recho ${var=${a[*]:0}} +unset var + +set -- $'\177' +ind='*' + +recho $* +var=${!ind} +recho "$var" + +unset var +recho ${var=${!ind}} +recho "$var" + +declare -A A=([0]=$'\177') + +unset var +var=${A[*]:0} +recho "$var" + +# this isn't really right yet +unset var +recho ${var=${A[*]:0}} +recho "$var" diff --git a/bash-5.1/tests/dollar-at1.sub b/bash-5.1/tests/dollar-at1.sub new file mode 100644 index 0000000000000000000000000000000000000000..c5079d64162bdb4a9d37c6f4e5c2baf606df8e5e --- /dev/null +++ b/bash-5.1/tests/dollar-at1.sub @@ -0,0 +1,42 @@ +# 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 . +# +echo_argc() +{ + echo $# +} + +a() +{ + shift + echo_argc "$@" + echo_argc ${1:+"$@"} + echo_argc "${1:+$@}" + echo_argc 1 2 3 +} + +b() +{ + _IFS="$IFS" + IFS="$1" + shift + echo_argc "$@" + echo_argc ${1:+"$@"} + echo_argc "${1:+$@}" + echo_argc 1 2 3 + IFS="$_IFS" +} + +a "X" foo bar hoge + +b "X" foo bar hoge diff --git a/bash-5.1/tests/dollar-at2.sub b/bash-5.1/tests/dollar-at2.sub new file mode 100644 index 0000000000000000000000000000000000000000..16defbdc1817e3137912a4f864be0ea1775f91f0 --- /dev/null +++ b/bash-5.1/tests/dollar-at2.sub @@ -0,0 +1,32 @@ +# 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 . +# +t1() +{ + xxx="echo $@" + + recho "$xxx ; echo $@" +} + +t2() +{ + xxx="echo $@" + + recho "${xxx} ; echo $@" +} + +t1 1 +t1 1 2 + +t2 1 +t2 1 2 diff --git a/bash-5.1/tests/dollar-at3.sub b/bash-5.1/tests/dollar-at3.sub new file mode 100644 index 0000000000000000000000000000000000000000..76a65c1fcd51d5aed65c673d0b5633fb6897a3a5 --- /dev/null +++ b/bash-5.1/tests/dollar-at3.sub @@ -0,0 +1,9 @@ +set -u + +echo ${#@} +echo ${@:-bar} + +echo $@ +echo after 1 +echo ${@} +echo after 2 diff --git a/bash-5.1/tests/dollar-at4.sub b/bash-5.1/tests/dollar-at4.sub new file mode 100644 index 0000000000000000000000000000000000000000..c8de866437578ae328f2d3700caa5d040d172547 --- /dev/null +++ b/bash-5.1/tests/dollar-at4.sub @@ -0,0 +1,10 @@ +set 'a b' 'c d' + +recho "$@" +recho $@ + +quoted="$@" +unquoted=$@ + +recho "$quoted" +recho "$unquoted" diff --git a/bash-5.1/tests/dollar-at5.sub b/bash-5.1/tests/dollar-at5.sub new file mode 100644 index 0000000000000000000000000000000000000000..9b26c392774aaf273913713a45e46dfdd1cc578d --- /dev/null +++ b/bash-5.1/tests/dollar-at5.sub @@ -0,0 +1,95 @@ +# 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 . +# +args() { printf '<%s> ' "$@"; echo; } + +set -- 1 2 3 4 5 + +args "${@} ${1}" +args "${1} ${@}" +args "${1}${@}${1}" +args "${1} ${@} ${1}" +args ${1}"$@"${1} +args "$@"${1} +args ${1}"$@" + +args "$@""${1}" +args "${1}""$@" + +args "${@}foo" +args ${@}${1} +args ${@}foo + +IFS= +args "$@""${1}" +args "${1}""$@" + +args ${@}${1} +args ${1}${@} +args ${@}foo + +echo second set: +IFS=$' \t\n' +set -- '1 2' 3 4 5 + +args "${@} ${1}" +args "${1} ${@}" + +args "${1}${@}${1}" +args "${1} ${@} ${1}" +args ${1}"$@"${1} +args "$@"${1} +args ${1}"$@" + +args "$@""${1}" +args "${1}""$@" + +args "${@}foo" +args ${@}${1} +args ${@}foo + +IFS= + +args "$@""${1}" +args "${1}""$@" + +args ${@}${1} +args ${1}${@} +args ${@}foo + +echo third set: +IFS=$' \t\n' + +alias declare=typeset + +a(){ echo + echo '"${@:2}a3 a2" a$1 #works as long as $1 and 3 are swapped' + echo "${@:2}a3 a2" a$1 + "${@:2}a3 a2" a$1 + echo $? + a=("${@}");} +b(){ echo + echo '"${@:2}b$1 b2" b3 #fails! why?' + echo "${@:2}b$1 b2" b3 + "${@:2}b$1 b2" b3 + echo $? + b=("${@}");} +c(){ echo + echo '${@:2}c$1 c2 c3 #works as long as quoting omitted' + echo ${@:2}c$1 c2 c3 + ${@:2}c$1 c2 c3 + echo $? + c=("${@}");} +a x set y z;declare -p a +b x set y z;declare -p b +c x set y z;declare -p c diff --git a/bash-5.1/tests/dollar-at6.sub b/bash-5.1/tests/dollar-at6.sub new file mode 100644 index 0000000000000000000000000000000000000000..791fd899938fd81ce261691d3934b9cb96a55a2c --- /dev/null +++ b/bash-5.1/tests/dollar-at6.sub @@ -0,0 +1,43 @@ +# 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 . +# +set -- ''; + +recho "${@}" x +recho "${@:1}" x + +set -- "${@:1}" +echo "$#" + +set -- '' '' + +recho "${@:1}" x +recho "${@:1:1}" x + +typeset -a A # ksh93 needs this +A=('' '') +recho "${A[@]:0}" x + +recho "${A[@]:0:1}" x + +recho "${A[@]:1}" x + +set -- '' + +recho "${@/foo/bar}" +recho "${@^^[abcde]}" + +A=( '' ) + +recho "${A[@]/foo/bar}" +recho "${A[@],,[abcde]}" diff --git a/bash-5.1/tests/dollar-at7.sub b/bash-5.1/tests/dollar-at7.sub new file mode 100644 index 0000000000000000000000000000000000000000..cde116480e86e54873642328ac31141e936570a1 --- /dev/null +++ b/bash-5.1/tests/dollar-at7.sub @@ -0,0 +1,59 @@ +# 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 . +# +set -- '' + +recho 1 ''"$@" +recho 2 """$@" + +recho 3 "$@""$@" +recho 4 "$x""$@" + +set -- + +echo ----- +recho 1 ''"$@" +recho 2 """$@" + +recho 3 "$@""$@" +recho 4 "$x""$@" + +set -- X + +echo ------ +recho 1 ''"${@/*}" +recho 2 """${@/*}" + +recho 3 "$x""${@/*}" + +recho 4 ''"${@#X}" +recho 5 """${@#X}" + +recho 6 "$x""${@#X}" + +set -- + +echo ----- +recho 1 ''"${@/*}" +recho 2 """${@/*}" + +recho 3 "$x""${@/*}" + +recho 4 ''"${@#X}" +recho 5 """${@#X}" + +recho 6 "$x""${@#X}" + +echo ----- +recho 1 "$novar${*}$(echo)" +recho 2 ''"$novar${@}$(echo)" diff --git a/bash-5.1/tests/dollar-star1.sub b/bash-5.1/tests/dollar-star1.sub new file mode 100644 index 0000000000000000000000000000000000000000..3e5ec36d7d45dc4960acf37e6e6b47a8acdd90fc --- /dev/null +++ b/bash-5.1/tests/dollar-star1.sub @@ -0,0 +1,44 @@ +# 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 . +# +set -- a b c +x=(a b c); IFS='|' + +echo "${*/#/x}" +echo "${x[*]/#/x}" + +echo "$*" +echo "${x[*]}" + +echo "$@" +echo "${x[@]}" + +echo "${@/#/x}" +echo "${x[@]/#/x}" + +echo "${*:1:2}" +echo "${x[*]:1:2}" + +echo "${@:1:2}" +echo "${x[@]:1:2}" + +IFS=$' \t\n' +set -- xa xb xc +x=(xa xb xc) +IFS='|' + +echo "${*#x}" +echo "${x[*]#x}" + +echo "$*" +echo "${x[*]}" diff --git a/bash-5.1/tests/dollar-star10.sub b/bash-5.1/tests/dollar-star10.sub new file mode 100644 index 0000000000000000000000000000000000000000..fce9ec1f454b2341483f408046fa5083ea9dcb4c --- /dev/null +++ b/bash-5.1/tests/dollar-star10.sub @@ -0,0 +1,92 @@ +# 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 . +# +oIFS=$IFS + +set -- '' + +unset v +recho ${v= ''} +recho $v +unset v +recho ${v=''} +recho $v +unset v +recho ${v= $*} +recho $v +unset v +recho ${v=$*} +recho $v +unset v +recho ${v='' } +recho $v +unset v +recho ${v= '' } +recho $v +unset v +recho ${v=$* } +recho $v +unset v +recho ${v= $* } +recho $v + +unset IFS + +unset v +recho ${v= ''} +recho $v +unset v +recho ${v=''} +recho $v +unset v +recho ${v= $*} +recho $v +unset v +recho ${v=$*} +recho $v +unset v +recho ${v='' } +recho $v +unset v +recho ${v= '' } +recho $v +unset v +recho ${v=$* } +recho $v +unset v +recho ${v= $* } +recho $v + +unset -v v +IFS=$oIFS + +# This shouldn't output anything +set -- '' '' + +unset -v v +recho ${v=$*} +unset -v v +recho ${v= $*} +unset -v v +recho ${v=$* } +unset -v v +recho ${v= $* } + +unset -v v IFS +recho ${v=$*} +unset -v v +recho ${v= $*} +unset -v v +recho ${v= $* } +unset -v v +recho ${v= $*} diff --git a/bash-5.1/tests/dollar-star2.sub b/bash-5.1/tests/dollar-star2.sub new file mode 100644 index 0000000000000000000000000000000000000000..78e00a0cdfb7bf34ba0306b1204deab9e4027919 --- /dev/null +++ b/bash-5.1/tests/dollar-star2.sub @@ -0,0 +1,39 @@ +# 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 . +# +set A B + +IFS= + +x=$* +y="$*" + +recho "$x" +recho "$y" + +IFS=$' \t\n' + +set 'A B' 'C D' + +IFS= + +x=$* +y="$*" + +recho "$x" +recho "$y" + +recho $x +recho $* +recho $y +recho "$*" diff --git a/bash-5.1/tests/dollar-star3.sub b/bash-5.1/tests/dollar-star3.sub new file mode 100644 index 0000000000000000000000000000000000000000..a6ef09feaf325ab7b2080693f830f461edfa95a9 --- /dev/null +++ b/bash-5.1/tests/dollar-star3.sub @@ -0,0 +1,31 @@ +# 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 . +# +IFS=/ +#file=/mnt/cdrom/RedHat/RPMS +#recho "${file[*]:0:3}" + +i[0]=fooq +i[1]= +i[2]=barq +i[3]= +recho "${i[*]:0}" +recho "${i[@]:0}" + +recho "${i[*]/q/!}" +recho "${i[@]/q/!}" + +recho "${i[*]#?}" +recho "${i[@]#?}" + +# Need to complete this with case-modifying expansion examples diff --git a/bash-5.1/tests/dollar-star4.sub b/bash-5.1/tests/dollar-star4.sub new file mode 100644 index 0000000000000000000000000000000000000000..1b551f2d8bfb7381a3de89b21995619ee6029873 --- /dev/null +++ b/bash-5.1/tests/dollar-star4.sub @@ -0,0 +1,9 @@ +set -u + +echo ${#*} +echo ${*:-bar} + +echo $* +echo after 1 +echo ${*} +echo after 2 diff --git a/bash-5.1/tests/dollar-star5.sub b/bash-5.1/tests/dollar-star5.sub new file mode 100644 index 0000000000000000000000000000000000000000..abd8bcc23741742f287a9a1907fbb4ce3fc55b96 --- /dev/null +++ b/bash-5.1/tests/dollar-star5.sub @@ -0,0 +1,29 @@ +# 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 . +# +set -- a b +IFS= + +echo $* +echo "$*" + +a=abcd +echo "${a#$*}" + +case ab in +$*) echo ok 1;; +esac + +case $* in +ab) echo ok 2 ;; +esac diff --git a/bash-5.1/tests/dollar-star6.sub b/bash-5.1/tests/dollar-star6.sub new file mode 100644 index 0000000000000000000000000000000000000000..095ec04fb8fbb130c99684874174695601fe05b6 --- /dev/null +++ b/bash-5.1/tests/dollar-star6.sub @@ -0,0 +1,32 @@ +# 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 . +# +recho "A${*:-w}R" +recho "A${*-w}R" +recho "A${*}R" + +set -- "" + +recho "A${*:-w}R" +recho "A${*-w}R" +recho "A${*}R" + +set -- $'\177' + +recho "A${*:+w}R" +recho "A${*+w}R" +recho "A${*}R" + +recho A${*:+w}R +recho A${*+w}R +recho A${*}R diff --git a/bash-5.1/tests/dollar-star7.sub b/bash-5.1/tests/dollar-star7.sub new file mode 100644 index 0000000000000000000000000000000000000000..db352bfcbef357da29b5ba4567802ab4ee468eec --- /dev/null +++ b/bash-5.1/tests/dollar-star7.sub @@ -0,0 +1,43 @@ +# 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 . +# +# if IFS side effects in ${IFS=} assignments take place, how do you cope with +# later changes to IFS in the same set of expansions? You've already +# committed to using the first character of the (old) IFS to expand $* in +# the previous expansions, and changing it to not include ' ', for instance, +# results in the first couple of ${*} below not being split at all + +set -f -- a b c + +unset -v IFS +printf '<%s> ' ${*}${IFS=}${*}${IFS:=-}"${*}" +echo +printf "after 1: IFS " +echo "${IFS-unset}" +recho "$*" + +set -f -- a 'b c' d +unset -v IFS +printf '<%s> ' ${*}${IFS=}${*}${IFS:=-}"${*}" +echo +printf "after 2: IFS " +echo "${IFS-unset}" +recho "$*" + +unset -v IFS +recho $* +recho "$*" + +IFS=' ' +recho $* +recho "$*" diff --git a/bash-5.1/tests/dollar-star8.sub b/bash-5.1/tests/dollar-star8.sub new file mode 100644 index 0000000000000000000000000000000000000000..e6265646f4e96d78c960273838cd3d6ea45ce8ca --- /dev/null +++ b/bash-5.1/tests/dollar-star8.sub @@ -0,0 +1,34 @@ +# 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 . +# +IFS= +set "abc" "def ghi" "jkl" + +set ${1+$*} +printf '<%s>\n' "$#" "$@" + +set "abc" "def ghi" "jkl" +set $* +printf '<%s>\n' "$#" "$@" + +printf '<%s>\n' $* ; +printf '<%s>\n' ${q:-$*} +printf '<%s>\n' "${q:-$*}" + +IFS=: +printf '<%s>\n' $* ; +printf '<%s>\n' ${q:-$*} +printf '<%s>\n' "${q:-$*}" + +unset -v IFS +printf '<%s>\n' $* $@ diff --git a/bash-5.1/tests/dollar-star9.sub b/bash-5.1/tests/dollar-star9.sub new file mode 100644 index 0000000000000000000000000000000000000000..d46de46a0129d8f6784570b9162db1b4054fbce9 --- /dev/null +++ b/bash-5.1/tests/dollar-star9.sub @@ -0,0 +1,59 @@ +# 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 . +# +set -- 1 2 + +IFS= + +a=$* b=${*} +c=${*/} d=${*#} e=${*%} f=${*:1} +printf '<%s>' "$a" "$b" "$c" "$d" "$e" "$f"; echo + +unset a b c d e f +: ${a=$*} ${b=${*}} ${c=${*/}} +: ${d=${*#}} ${e=${*%}} ${f=${*:1}} +printf '<%s>' "$a" "$b" "$c" "$d" "$e" "$f" ; echo + +unset f g +f=${*,,} g=${*@Q} +printf '<%s>' "$f" "$g" ; echo + +unset -v a b c d e f g +unset var + +# resetting IFS here + +IFS=$' \t\n' + +printf '%s\n' "${*:1}" +var=${*:1}; printf '%s\n' "$var" +var="${*:1}"; printf '%s\n' "$var" + +unset var +recho ${var-${*}} +recho ${var-${*:1}} +recho "${var-${*:1}}" +recho ${var-"${*:1}"} + +unset var +recho ${var=${*}} +printf 'var=%s\n' "$var" +unset var +recho ${var=${*:1}} +printf 'var=%s\n' "$var" + +a=${*:1} +recho "$a" + +: ${b=${*:1}} +recho "$b" diff --git a/bash-5.1/tests/dollar.right b/bash-5.1/tests/dollar.right new file mode 100644 index 0000000000000000000000000000000000000000..09910d7e316b6da545c991598df2a4bbbb2d89e7 --- /dev/null +++ b/bash-5.1/tests/dollar.right @@ -0,0 +1,677 @@ +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <5> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <5> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <1> +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = <3> +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +foo = 1:2:3:4:5:6:7:8:9:10 +bar = 1:2:3:4:5:6:7:8:9:10 +foo1 = 1 2 3 4 5 6 7 8 9 10 +bar1 = 1 2 3 4 5 6 7 8 9 10 +foo2 = 1:2:3:4:5:6:7:8:9:10 +bar2 = 1:2:3:4:5:6:7:8:9:10 +foo3 = 1:2:3:4:5:6:7:8:9:10 +bar3 = 1:2:3:4:5:6:7:8:9:10 +ok 1 +ok 2 +ok 3 +ok 4 +foo = 1 2 3 4 5 6 7 8 9 10 +bar = 1 2 3 4 5 6 7 8 9 10 +foo1 = 1 2 3 4 5 6 7 8 9 10 +bar1 = 1 2 3 4 5 6 7 8 9 10 +foo2 = 1 2 3 4 5 6 7 8 9 10 +bar2 = 1 2 3 4 5 6 7 8 9 10 +foo3 = 1 2 3 4 5 6 7 8 9 10 +bar3 = 1 2 3 4 5 6 7 8 9 10 +ok 1 +ok 2 +ok 3 +ok 4 +var=${a[*]} ... one:::two:three:::four +var="${a[*]}" ... one:::two:three:::four +var=$* ... one:::two:three:::four +var="$*" ... one:::two:three:::four +var=${a[@]} ... one:::two three:::four +var="${a[@]}" ... one:::two three:::four +var=$@ ... one:::two three:::four +var="$@" ... one:::two three:::four +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 +ok 8 +ok 9 +ok 10 +ok 11 +ok 12 +ok 13 +ok 14 +ok at 1 +ok at 2 +ok star 1 +ok star 2 + ,foo + ,foo + ,foo + ,foo +ok at 1 +ok at 2 +ok at 3 +ok star 1 +ok star 2 +ok star 3 +ok at-star 1 +ok at-star 2 +a b c +a|b|c +a b c +a|b|c +ok at 1 +ok at 2 +ok at 3 +ok at 4 +ok at 5 +ok at 1 +ok at 2 +ok at 3 +ok at 4 +ok at 5 +ok at 1 +ok at 2 +ok at 3 +ok at 4 +ok at 5 +ok at 6 +ok at 7 +ok at 8 +ok at 9 +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +<123 abc> +<123 abc> + +a bc +a b +ab + +a b +a b + + + + + + + + +abcd +d +abcd +d +c +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = + + + + +0 +0 +1 +1 +1 +0 +0 +0 +1 +0 +0 +0 +1 +after 1 +after 2 +after 3 +same as 1 +argv[1] = <> +same as 2 +argv[1] = <> +null fields +argv[1] = <> +argv[1] = <> +null fields in rhs +null string with unquoted $@ +argv[1] = <> +null string with quoted $@ +argv[1] = <> +assignment +argv[1] = <> +variable +argv[1] = <> +dollar-at +argv[1] = <'a'> +argv[2] = <'b'> +argv[3] = <'c'> +argv[1] = <'a'> +argv[2] = <'b'> +argv[3] = <'c'> +argv[1] = <> +argv[2] = +argv[3] = <> +argv[4] = <> +argv[5] = +argv[6] = <> +argv[7] = <> +argv[8] = +argv[1] = <'a'> +argv[2] = <'b'> +argv[3] = <'c'> +argv[1] = <> +argv[2] = +argv[3] = <> +argv[4] = <> +argv[5] = +argv[6] = <> +argv[7] = <> +argv[8] = +argv[1] = <'a'> +argv[2] = <'b'> +argv[3] = <'c'> +argv[1] = <> +argv[2] = +argv[1] = <'a'> +argv[1] = <'a'> +argv[2] = <'b'> +argv[3] = <'c'> +argv[1] = <'a'> +argv[2] = <'b'> +argv[3] = <'c'> +|this| +|is| +|a| +|test| + +|this| +|is| +|a| +|test| + +|this| +|is| +|a| +|test| + +|this| +|this| + +|this is a test| +|this is a test| +|this| +|is| +|a| +|test| +|this| +|is| +|a| +|test| + +a1=a b c a,b,c a b c a,b,c a b c a,b,c +a2=a b c a,b,c a b c a,b,c a b c a,b,c +a3=a b c a,b,c a b c a,b,c a b c a,b,c +a4=a b c a,b,c a b c a,b,c a b c a,b,c +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = <> +argv[1] = < X > +argv[1] = <> +argv[1] = < X > +argv[1] = <> +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X> +argv[2] = +argv[1] = < X> +argv[2] = +argv[1] = < X> +argv[2] = +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < XY > +argv[1] = < XY > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X Y > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = < X > +argv[1] = <^?> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <> +argv[1] = <> +xa|xb|xc +xa|xb|xc +a|b|c +a|b|c +a b c +a b c +xa xb xc +xa xb xc +a|b +b|c +a b +b c +a|b|c +a|b|c +xa|xb|xc +xa|xb|xc +3 +3 +3 +3 +3 +3 +3 +3 +argv[1] = +argv[1] = +argv[2] = <2> +argv[1] = +argv[1] = +argv[2] = <2> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +0 +bar + +after 1 + +after 2 +0 +bar + +after 1 + +after 2 +a b +ab +cd +ok 1 +ok 2 +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[1] = +<1> <2> <3> <4> <5 1> +<1 1> <2> <3> <4> <5> +<11> <2> <3> <4> <51> +<1 1> <2> <3> <4> <5 1> +<11> <2> <3> <4> <51> +<1> <2> <3> <4> <51> +<11> <2> <3> <4> <5> +<1> <2> <3> <4> <51> +<11> <2> <3> <4> <5> +<1> <2> <3> <4> <5foo> +<1> <2> <3> <4> <51> +<1> <2> <3> <4> <5foo> +<1> <2> <3> <4> <51> +<11> <2> <3> <4> <5> +<1> <2> <3> <4> <51> +<11> <2> <3> <4> <5> +<1> <2> <3> <4> <5foo> +second set: +<1 2> <3> <4> <5 1 2> +<1 2 1 2> <3> <4> <5> +<1 21 2> <3> <4> <51 2> +<1 2 1 2> <3> <4> <5 1 2> +<1> <21 2> <3> <4> <51> <2> +<1 2> <3> <4> <51> <2> +<1> <21 2> <3> <4> <5> +<1 2> <3> <4> <51 2> +<1 21 2> <3> <4> <5> +<1 2> <3> <4> <5foo> +<1> <2> <3> <4> <51> <2> +<1> <2> <3> <4> <5foo> +<1 2> <3> <4> <51 2> +<1 21 2> <3> <4> <5> +<1 2> <3> <4> <51 2> +<1 21 2> <3> <4> <5> +<1 2> <3> <4> <5foo> +third set: + +"${@:2}a3 a2" a$1 #works as long as $1 and 3 are swapped +set y za3 a2 ax +0 +declare -a a=([0]="y" [1]="za3 a2" [2]="ax") + +"${@:2}b$1 b2" b3 #fails! why? +set y zbx b2 b3 +0 +declare -a b=([0]="y" [1]="zbx b2" [2]="b3") + +${@:2}c$1 c2 c3 #works as long as quoting omitted +set y zcx c2 c3 +0 +declare -a c=([0]="y" [1]="zcx" [2]="c2" [3]="c3") +argv[1] = <> +argv[2] = +argv[1] = <> +argv[2] = +1 +argv[1] = <> +argv[2] = <> +argv[3] = +argv[1] = <> +argv[2] = +argv[1] = <> +argv[2] = <> +argv[3] = +argv[1] = <> +argv[2] = +argv[1] = <> +argv[2] = +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = + +after 1: IFS - +argv[1] = + +after 2: IFS - +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +<3> + + + +<3> + + + + + + + + + + + + + + + + + + + + + + + + + +argv[1] = <1> +argv[2] = <> +argv[1] = <2> +argv[2] = <> +argv[1] = <3> +argv[2] = <> +argv[1] = <4> +argv[2] = <> +----- +argv[1] = <1> +argv[2] = <> +argv[1] = <2> +argv[2] = <> +argv[1] = <3> +argv[1] = <4> +argv[2] = <> +------ +argv[1] = <1> +argv[2] = <> +argv[1] = <2> +argv[2] = <> +argv[1] = <3> +argv[2] = <> +argv[1] = <4> +argv[2] = <> +argv[1] = <5> +argv[2] = <> +argv[1] = <6> +argv[2] = <> +----- +argv[1] = <1> +argv[2] = <> +argv[1] = <2> +argv[2] = <> +argv[1] = <3> +argv[2] = <> +argv[1] = <4> +argv[2] = <> +argv[1] = <5> +argv[2] = <> +argv[1] = <6> +argv[2] = <> +----- +argv[1] = <1> +argv[2] = <> +argv[1] = <2> +argv[2] = <> +<12><12><12><12><12><12> +<12><12><12><12><12><12> +<12><'1''2'> +1 2 +1 2 +1 2 +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1 2> +argv[1] = <1 2> +argv[1] = <1> +argv[2] = <2> +var=1 2 +argv[1] = <1> +argv[2] = <2> +var=1 2 +argv[1] = <1 2> +argv[1] = <1 2> diff --git a/bash-5.1/tests/dstack.right b/bash-5.1/tests/dstack.right new file mode 100644 index 0000000000000000000000000000000000000000..8f9d38c091a7b0c857b9d10ac3286ac63ca269ef --- /dev/null +++ b/bash-5.1/tests/dstack.right @@ -0,0 +1,55 @@ +./dstack.tests: line 19: pushd: /tmp/xxx-notthere: No such file or directory +./dstack.tests: line 22: pushd: no other directory +./dstack.tests: line 23: popd: directory stack empty +./dstack.tests: line 26: pushd: -m: invalid number +pushd: usage: pushd [-n] [+N | -N | dir] +./dstack.tests: line 27: popd: -m: invalid number +popd: usage: popd [-n] [+N | -N] +./dstack.tests: line 28: dirs: -m: invalid number +dirs: usage: dirs [-clpv] [+N] [-N] +./dstack.tests: line 29: dirs: 7: invalid option +dirs: usage: dirs [-clpv] [+N] [-N] +/ +ok +/usr / +/usr / +/usr / +/usr / +/usr / +/ +/usr / +/etc /usr / +/etc /usr / +/etc /usr / + 0 /etc + 1 /usr + 2 / +/usr /etc / +/etc /usr / +/tmp /etc /usr / +/tmp +/tmp +/usr +/usr +./dstack.tests: line 71: dirs: 9: directory stack index out of range +./dstack.tests: line 71: dirs: 9: directory stack index out of range +./dstack.tests: line 72: pushd: +9: directory stack index out of range +./dstack.tests: line 72: pushd: -9: directory stack index out of range +./dstack.tests: line 73: popd: +9: directory stack index out of range +./dstack.tests: line 73: popd: -9: directory stack index out of range +/tmp /etc / +/tmp /etc / +/tmp /etc / +/tmp /usr /etc / +/tmp +/tmp /usr /etc / +/tmp /usr /etc / +/tmp +/tmp /bin /etc / +/tmp +/tmp /bin / +/tmp +/bin / /tmp +/bin / /tmp +/bin +/bin diff --git a/bash-5.1/tests/dstack.tests b/bash-5.1/tests/dstack.tests new file mode 100644 index 0000000000000000000000000000000000000000..116e935f2267732c24fe75998f9ac59d0c980402 --- /dev/null +++ b/bash-5.1/tests/dstack.tests @@ -0,0 +1,100 @@ +# 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 . +# +export LC_ALL=C +export LANG=C + +dirs -c +# error -- non-existent directory +pushd /tmp/xxx-notthere + +# errors -- empty stack +pushd +popd + +# errors -- bad numeric arguments -- should not cause the script to exit +pushd -m +popd -m +dirs -m +dirs 7 + +MYDIR=$PWD +unalias cd 2>/dev/null + +unalias -a + +command cd -P / +command pwd -P # better be `/' + +case "$OLDPWD" in +$MYDIR) echo ok ;; +*) echo oops -- bad \$OLDPWD ;; +esac + +pushd /usr +echo $PWD $OLDPWD +dirs +echo ${DIRSTACK[@]} + +# this should not change the directory stack at all +pushd -n +0 +dirs + +popd +pushd /usr + +pushd /etc +dirs +dirs -l +dirs -v + +# two consecutive `pushd's should swap the top two stack elements, then +# swap them back, leaving the stack intact +pushd +pushd + +pushd /tmp +echo ${DIRSTACK[0]} ; dirs +0 +echo ${DIRSTACK[2]} ; dirs +2 + +# these should be errors, but not affect the directory stack +dirs +9; dirs -9 +pushd +9 ; pushd -9 +popd +9 ; popd -9 + +popd -n +2 +dirs +echo ${DIRSTACK[@]} + +pushd -n /usr +echo $PWD +dirs +echo ${DIRSTACK[@]} + +builtin pwd + +DIRSTACK[1]=/bin +dirs + +builtin pwd +popd +2 +builtin pwd -L +pushd -1 +dirs +echo ${DIRSTACK[0]} + +dirs -c +dirs + +# this is for the benefit of pure coverage +cd "$MYDIR" diff --git a/bash-5.1/tests/dstack2.right b/bash-5.1/tests/dstack2.right new file mode 100644 index 0000000000000000000000000000000000000000..d682a27f6c0af897732150f4da3eec2107fbb2ce --- /dev/null +++ b/bash-5.1/tests/dstack2.right @@ -0,0 +1,24 @@ +expect ~1 +~1 +/usr / +/tmp /usr / +/tmp /usr / +these lines should be the same +/tmp +/tmp /tmp +these lines should be the same +/usr +/usr /usr +these lines should be the same +/ +/ / +these lines should be the same +/tmp +/tmp /tmp +these lines should be the same +/usr +/usr /usr + 1 /usr +these lines should be the same +/ +/ / diff --git a/bash-5.1/tests/dstack2.tests b/bash-5.1/tests/dstack2.tests new file mode 100644 index 0000000000000000000000000000000000000000..087331982498d71e532b6590f33c12712cef48a1 --- /dev/null +++ b/bash-5.1/tests/dstack2.tests @@ -0,0 +1,49 @@ +# 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 . +# +wdir=$PWD +cd / + +echo expect '~1' +echo ~1 + +pushd /usr +pushd /tmp +dirs + +echo these lines should be the same +dirs +0 +echo ~0 ${DIRSTACK[0]} +echo these lines should be the same +dirs +1 +echo ~1 ${DIRSTACK[1]} +echo these lines should be the same +dirs +2 +echo ~2 ${DIRSTACK[2]} + +NDIRS=$(( ${#DIRSTACK[@]} - 1 )) + +echo these lines should be the same +dirs -2 +echo ~-2 ${DIRSTACK[NDIRS-2]} + +echo these lines should be the same +dirs -1 +echo ~-1 ${DIRSTACK[NDIRS-1]} +dirs -v -1 + +echo these lines should be the same +dirs -0 +echo ~-0 ${DIRSTACK[NDIRS]} + +cd "$wdir" diff --git a/bash-5.1/tests/dynvar.right b/bash-5.1/tests/dynvar.right new file mode 100644 index 0000000000000000000000000000000000000000..e1344c60db87cb8c3a2dc71ea7c391e153ca115c --- /dev/null +++ b/bash-5.1/tests/dynvar.right @@ -0,0 +1,7 @@ +BASHPID ok +BASH_ARGV0 ok +BASH_ARGV0 ok +SECONDS ok +EPOCHSECONDS ok +EPOCHREALTIME ok +echo $BASH_COMMAND diff --git a/bash-5.1/tests/dynvar.tests b/bash-5.1/tests/dynvar.tests new file mode 100644 index 0000000000000000000000000000000000000000..5aefab64e76453613fc355ffdbc0abe1464c91ba --- /dev/null +++ b/bash-5.1/tests/dynvar.tests @@ -0,0 +1,90 @@ +# 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 . +# +# specvar -- test some of the dynamic variables + +# BASHPID +pid=$$ +bpid=$BASHPID +subpid=$( (echo $BASHPID) ) + +if [ "$bpid" -ne "$subpid" ]; then echo BASHPID ok; fi + +# BASH_ARGV0 + +BASH_ARGV0=hello +case $0 in +hello) echo BASH_ARGV0 ok ;; +*) echo "BASH_ARGV0 mismatch: $BASH_ARGV0 ($0)" >&2 ;; +esac + +setarg0() +{ + BASH_ARGV0="$1" +} + +setarg0 arg0 +case $0 in +arg0) echo BASH_ARGV0 ok ;; +*) echo "BASH_ARGV0 mismatch: $BASH_ARGV0 ($0)" >&2 ;; +esac + +# SECONDS +before=$SECONDS +sleep 2 +after=$SECONDS + +if (( $after > $before )); then echo SECONDS ok; fi +unset before after + +# EPOCHSECONDS + +# not exact, but should work +# could also use python -c 'import time; ts = int(time.time()); print(ts)' +now1=$(perl -e 'print time') +now2=$EPOCHSECONDS + +case $now1 in +$now2) echo EPOCHSECONDS ok ;; +*) echo "current time via perl and EPOCHSECONDS possible mismatch|$now1|$now2" >&2 ;; +esac +unset now1 now2 + +LC_ALL=C # force decimal point to `.' +now1=$EPOCHREALTIME +now2=$EPOCHREALTIME +sec1=${now1%%.*} +sec2=${now2%%.*} + +msec1=${now1##*.} +msec2=${now2##*.} +# cut off leading zeros +shopt -s extglob +msec1=${msec1##*(0)} +msec2=${msec2##*(0)} + +dsec=$(( $sec2 - $sec1 )) +dmsec=$(( $msec2 - $msec1 )) +if (( $dmsec < 0 )); then + dmsec=$(( dmsec + 1000000 )) + dsec=$(( desc - 1 )) +fi + +# not a real test, but ok for a start +if (( $dmsec < 1000000 )); then echo EPOCHREALTIME ok; fi + +${THIS_SH} -c 'echo $BASH_COMMAND' + +# FUNCNAME tested in func.tests +# RANDOM tested in varenv.sh +# LINENO tested in dbg-support diff --git a/bash-5.1/tests/errors.right b/bash-5.1/tests/errors.right new file mode 100644 index 0000000000000000000000000000000000000000..be0c8959ac13d385503ffbd762d72f033602c89c --- /dev/null +++ b/bash-5.1/tests/errors.right @@ -0,0 +1,200 @@ +./errors.tests: line 30: alias: -x: invalid option +alias: usage: alias [-p] [name[=value] ... ] +./errors.tests: line 31: unalias: -x: invalid option +unalias: usage: unalias [-a] name [name ...] +./errors.tests: line 32: alias: hoowah: not found +./errors.tests: line 33: unalias: hoowah: not found +./errors.tests: line 36: `1': not a valid identifier +declare -fr func +./errors.tests: line 49: func: readonly function +./errors.tests: line 52: unset: -x: invalid option +unset: usage: unset [-f] [-v] [-n] [name ...] +./errors.tests: line 55: unset: func: cannot unset: readonly function +./errors.tests: line 58: declare: func: readonly function +./errors.tests: line 62: unset: XPATH: cannot unset: readonly variable +./errors.tests: line 68: unset: cannot simultaneously unset a function and a variable +./errors.tests: line 71: declare: -z: invalid option +declare: usage: declare [-aAfFgiIlnrtux] [-p] [name[=value] ...] +./errors.tests: line 73: declare: `-z': not a valid identifier +./errors.tests: line 74: declare: `/bin/sh': not a valid identifier +./errors.tests: line 78: declare: cannot use `-f' to make functions +./errors.tests: line 81: exec: -i: invalid option +exec: usage: exec [-cl] [-a name] [command [argument ...]] [redirection ...] +./errors.tests: line 85: export: XPATH: not a function +./errors.tests: line 88: break: only meaningful in a `for', `while', or `until' loop +./errors.tests: line 89: continue: only meaningful in a `for', `while', or `until' loop +./errors.tests: line 92: shift: label: numeric argument required +./errors.tests: line 97: shift: too many arguments +./errors.tests: line 103: let: expression expected +./errors.tests: line 106: local: can only be used in a function +./errors.tests: line 109: logout: not login shell: use `exit' +./errors.tests: line 112: hash: notthere: not found +./errors.tests: line 115: hash: -v: invalid option +hash: usage: hash [-lr] [-p pathname] [-dt] [name ...] +./errors.tests: line 119: hash: hashing disabled +./errors.tests: line 122: export: `AA[4]': not a valid identifier +./errors.tests: line 123: readonly: `AA[4]': not a valid identifier +./errors.tests: line 126: unset: [-2]: bad array subscript +./errors.tests: line 130: AA: readonly variable +./errors.tests: line 134: AA: readonly variable +./errors.tests: line 142: shift: 5: shift count out of range +./errors.tests: line 143: shift: -2: shift count out of range +./errors.tests: line 146: shopt: no_such_option: invalid shell option name +./errors.tests: line 147: shopt: no_such_option: invalid shell option name +./errors.tests: line 150: umask: 09: octal number out of range +./errors.tests: line 151: umask: `:': invalid symbolic mode character +./errors.tests: line 152: umask: `:': invalid symbolic mode operator +./errors.tests: line 155: umask: -i: invalid option +umask: usage: umask [-p] [-S] [mode] +./errors.tests: line 159: umask: `u': invalid symbolic mode character +./errors.tests: line 168: VAR: readonly variable +./errors.tests: line 171: declare: VAR: readonly variable +./errors.tests: line 172: declare: VAR: readonly variable +./errors.tests: line 174: declare: unset: not found +./errors.tests: line 177: VAR: readonly variable +./errors.tests: command substitution: line 181: syntax error near unexpected token `)' +./errors.tests: command substitution: line 181: ` for z in 1 2 3; do )' +./errors.tests: command substitution: line 182: syntax error near unexpected token `done' +./errors.tests: command substitution: line 182: ` for z in 1 2 3; done )' +./errors.tests: line 184: cd: HOME not set +./errors.tests: line 185: cd: /tmp/xyz.bash: No such file or directory +./errors.tests: line 187: cd: OLDPWD not set +./errors.tests: line 188: cd: /bin/sh: Not a directory +./errors.tests: line 190: cd: /tmp/cd-notthere: No such file or directory +./errors.tests: line 193: .: filename argument required +.: usage: . filename [arguments] +./errors.tests: line 194: source: filename argument required +source: usage: source filename [arguments] +./errors.tests: line 197: .: -i: invalid option +.: usage: . filename [arguments] +./errors.tests: line 200: set: -q: invalid option +set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] +./errors.tests: line 203: enable: sh: not a shell builtin +./errors.tests: line 203: enable: bash: not a shell builtin +./errors.tests: line 206: shopt: cannot set and unset shell options simultaneously +./errors.tests: line 209: read: var: invalid timeout specification +./errors.tests: line 212: read: `/bin/sh': not a valid identifier +./errors.tests: line 215: VAR: readonly variable +./errors.tests: line 218: readonly: -x: invalid option +readonly: usage: readonly [-aAf] [name[=value] ...] or readonly -p +./errors.tests: line 221: eval: -i: invalid option +eval: usage: eval [arg ...] +./errors.tests: line 222: command: -i: invalid option +command: usage: command [-pVv] command [arg ...] +./errors.tests: line 225: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0") +./errors.tests: line 226: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0") +./errors.tests: line 229: trap: NOSIG: invalid signal specification +./errors.tests: line 232: trap: -s: invalid option +trap: usage: trap [-lp] [[arg] signal_spec ...] +./errors.tests: line 238: return: can only `return' from a function or sourced script +./errors.tests: line 242: break: 0: loop count out of range +./errors.tests: line 246: continue: 0: loop count out of range +./errors.tests: line 251: builtin: bash: not a shell builtin +./errors.tests: line 255: bg: no job control +./errors.tests: line 256: fg: no job control +./errors.tests: line 259: kill: -s: option requires an argument +./errors.tests: line 261: kill: S: invalid signal specification +./errors.tests: line 263: kill: `': not a pid or valid job spec +kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] +./errors.tests: line 268: set: trackall: invalid option name +./errors.tests: line 272: xx: readonly variable +1 +./errors1.sub: line 14: .: -i: invalid option +.: usage: . filename [arguments] +./errors1.sub: line 22: shift: -4: shift count out of range +./errors1.sub: line 27: break: -1: loop count out of range +after f +./errors2.sub: line 3: ${$NO_SUCH_VAR}: bad substitution +1 +./errors3.sub: line 5: no_such_file: No such file or directory +TEST +./errors3.sub: line 7: no_such_file: No such file or directory +1 +2 +./errors4.sub: line 20: var: readonly variable +after readonly assignment +./errors4.sub: line 26: break: x: numeric argument required +1 +2 +./errors4.sub: line 20: var: readonly variable +./errors5.sub: line 6: array: unbound variable +./errors5.sub: line 7: array: unbound variable +./errors5.sub: line 8: array[7]: unbound variable +./errors5.sub: line 11: 7: unbound variable +./errors5.sub: line 12: 7: unbound variable +after 1: 1 +after 2: 1 +after 3: 1 +4 +array after 1: 0 + +array after 2: 0 +./errors6.sub: line 1: uvar: parameter not set +./errors6.sub: line 1: uvar: parameter null or not set + +./errors6.sub: line 1: uvar: parameter null or not set +./errors6.sub: line 38: ${-3:-${-3}}: bad substitution +./errors6.sub: line 39: ${-3}: bad substitution +./errors6.sub: line 40: -3: invalid variable name +after indir: 1 +./errors6.sub: line 43: -3: invalid variable name + +unset +./errors6.sub: line 50: var: invalid indirect expansion +./errors6.sub: line 51: var: invalid indirect expansion +./errors6.sub: line 54: invalid-ident: invalid variable name +./errors6.sub: line 55: invalid-ident: invalid variable name +./errors6.sub: line 56: invalid-ident: invalid variable name +4 +array after 1: 0 + +array after 2: 0 +./errors6.sub: line 1: uvar: parameter not set +./errors6.sub: line 1: uvar: parameter null or not set + +./errors6.sub: line 1: uvar: parameter null or not set +./errors6.sub: line 38: ${-3:-${-3}}: bad substitution +./errors6.sub: line 39: ${-3}: bad substitution +./errors6.sub: line 40: -3: invalid variable name +after indir: 1 +./errors6.sub: line 43: -3: invalid variable name + +unset +./errors6.sub: line 50: var: invalid indirect expansion +./errors6.sub: line 51: var: invalid indirect expansion +./errors6.sub: line 54: invalid-ident: invalid variable name +./errors6.sub: line 55: invalid-ident: invalid variable name +./errors6.sub: line 56: invalid-ident: invalid variable name +./errors7.sub: line 21: x: readonly variable +./errors7.sub: line 21: notthere: command not found +after no such command: 127 +./errors7.sub: line 23: x: readonly variable +echo builtin +after non-special builtin: 0 +./errors7.sub: line 25: x: readonly variable +after special builtin: 0 +./errors7.sub: line 27: x: readonly variable +./errors7.sub: line 21: x: readonly variable +./errors7.sub: line 21: notthere: command not found +after no such command: 127 +./errors7.sub: line 23: x: readonly variable +echo builtin +after non-special builtin: 0 +./errors7.sub: line 25: x: readonly variable +./errors7.sub: line 27: x: readonly variable +./errors8.sub: eval: line 7: syntax error: unexpected end of file +ok 1 +./errors8.sub: line 8: v: readonly variable +ok 2 +./errors8.sub: line 9: v: readonly variable +ok 3 +./errors8.sub: line 11: shift: 12: shift count out of range +ok 4 +./errors8.sub: line 13: return: can only `return' from a function or sourced script +ok 5 +./errors8.sub: line 14: set: notanoption: invalid option name +ok 6 +bash: line 1: return: can only `return' from a function or sourced script +after return +bash: line 1: return: can only `return' from a function or sourced script +./errors.tests: line 299: `!!': not a valid identifier diff --git a/bash-5.1/tests/errors.tests b/bash-5.1/tests/errors.tests new file mode 100644 index 0000000000000000000000000000000000000000..531b625bba094b35c3082c2dd7dfe7300293df43 --- /dev/null +++ b/bash-5.1/tests/errors.tests @@ -0,0 +1,302 @@ +# 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 . +# +# These should all be safe +LC_ALL=C +LC_CTYPE=C +LC_COLLATE=C +LC_MESSAGES=C + +# these tests should all generate errors + +# make sure we don't exit prematurely +set +e +set +o posix + +# various alias/unalias errors + +# at some point, this may mean to `export' an alias, like ksh, but +# for now it is an error +alias -x foo=barz +unalias -x fooaha +alias hoowah +unalias hoowah + +# the iteration variable must be a valid identifier +for 1 in a b c; do echo $1; done + +# try to rebind a read-only function +func() +{ + echo func +} +readonly -f func +# make sure `readonly' and `declare' play well together +declare -Fr +func() +{ + echo bar +} + +# bad option +unset -x func + +# cannot unset readonly functions or variables +unset -f func +# or make them not readonly +declare -fr func +declare -f +r func + +XPATH=$PATH +declare -r XPATH +unset -v XPATH + +# cannot unset invalid identifiers +unset /bin/sh + +# cannot unset function and variable at the same time +unset -f -v SHELL + +# bad option +declare -z +# cannot declare invalid identifiers +declare -- -z +declare /bin/sh + +# this is the syntax used to export functions in the environment, but +# it cannot be used with `declare' +declare -f func='() { echo "this is func"; }' + +# bad option to exec -- this should not exit the script +exec -i /bin/sh + +# try to export -f something that is not a function -- this should be +# an error, not create an `invisible function' +export -f XPATH + +# this depends on the setting of BREAK_COMPLAINS in config.h.in +break +continue + +# this should not exit the shell; it did in versions before 2.01 +shift label + +# other shells do not complain about the extra arguments; maybe someday +# we won't either +set -- a b c +shift $# label +# and get rid of the positional parameters +shift $# + +# let without an expression is an error, though maybe it should just return +# success +let + +# local outside a function is an error +local + +# logout of a non-login shell is an error +logout + +# try to hash a non-existent command +hash notthere + +# bad option to hash, although it may mean `verbose' at some future point +hash -v + +# turn off hashing, then try to hash something +set +o hashall +hash -p ${THIS_SH} ${THIS_SH##*/} + +# bad identifiers to declare/readonly/export +export AA[4] +readonly AA[4] + +declare -a AA +unset AA[-2] + +# try to assign to a readonly array +declare -r AA +AA=( one two three ) + +# make sure `readonly -n' doesn't turn off readonly status +readonly -n AA +AA=(one two three) + +# try to assign a readonly array with bad assignment syntax +# NOTE: this works in post-bash-2.05 (at least when I write this) +# readonly -a ZZZ=bbb + +# bad counts to `shift' +shopt -s shift_verbose +shift $(( $# + 5 )) +shift -2 + +# bad shell options +shopt -s no_such_option +shopt no_such_option + +# non-octal digits for umask and other errors +umask 09 +umask -S u=rwx:g=rwx:o=rx >/dev/null # 002 +umask -S u:rwx,g:rwx,o:rx >/dev/null # 002 + +# at some point, this may mean `invert', but for now it is an error +umask -i + +# bad assignments shouldn't change the umask +mask=$(umask) +umask g=u +mask2=$(umask) +if [ "$mask" != "$mask2" ]; then + echo "umask errors change process umask" +fi + +# assignment to a readonly variable in environment +VAR=4 +readonly VAR +VAR=7 : + +# more readonly variable tests +declare VAR=88 +declare +r VAR + +declare -p unset + +# iteration variable in a for statement being readonly +for VAR in 1 2 3 ; do echo $VAR; done + +# parser errors +: $( for z in 1 2 3; do ) +: $( for z in 1 2 3; done ) + +# various `cd' errors +( unset HOME ; cd ) +( HOME=/tmp/xyz.bash ; cd ) +# errors from cd +cd - +cd /bin/sh # error - not a directory +OLDPWD=/tmp/cd-notthere +cd - + +# various `source/.' errors +. +source + +# maybe someday this will work like in rc +. -i /dev/tty + +# make sure that this gives an error rather than setting $1 +set -q + +# enable non-builtins +enable sh bash + +# try to set and unset shell options simultaneously +shopt -s -u checkhash + +# this is an error -- bad timeout spec +read -t var < /dev/null + +# try to read into an invalid identifier +read /bin/sh < /dev/null + +# try to read into a readonly variable +read VAR < /dev/null + +# bad option to readonly/export +readonly -x foo + +# someday these may mean something, but for now they're errors +eval -i "echo $-" +command -i "echo $-" + +# this caused a core dump in bash-2.01 (fixed in bash-2.01.1) +eval echo \$[/bin/sh + 0] +eval echo '$((/bin/sh + 0))' + +# error to list trap for an unknown signal +trap -p NOSIG + +# maybe someday trap will take a -s argument like kill, but not now +trap -p -s NOSIG + +# we have a ksh-like ERR trap, post-bash-2.05 +#trap 'echo [$LINENO] -- error' ERR + +# can only return from a function or sourced script +return 2 + +# break and continue with arguments <= 0 +for z in 1 2 3; do + break 0 + echo $x +done +for z in 1 2 3; do + continue 0 + echo $x +done + +# builtin with non-builtin +builtin bash + +# maybe someday you will be able to use fg/bg when job control is not really +# active, but for now they are errors +bg +fg + +# argument required +kill -s +# bad argument +kill -S +# null argument +kill -INT '' +# argument required +kill -INT + +# bad shell option names +set -o trackall # bash is not ksh + +# problem with versions through bash-4.2 +readonly xx=5 +echo $((xx=5)) +echo $? + +${THIS_SH} ./errors1.sub +${THIS_SH} ./errors2.sub +${THIS_SH} ./errors3.sub +${THIS_SH} ./errors4.sub +${THIS_SH} -o posix ./errors4.sub + +${THIS_SH} ./errors5.sub + +${THIS_SH} ./errors6.sub +THIS_SH="${THIS_SH} -o posix" ${THIS_SH} ./errors6.sub + +${THIS_SH} ./errors7.sub +${THIS_SH} -o posix ./errors7.sub + +${THIS_SH} ./errors8.sub + +${THIS_SH} -c 'return ; echo after return' bash +${THIS_SH} -o posix -c 'return ; echo after return' bash + +# this must be last! +# in posix mode, a function name must be a valid identifier +# this can't go in posix2.tests, since it causes the shell to exit +# immediately +set -o posix +function !! () { fc -s "$@" ; } +set +o posix + +echo end diff --git a/bash-5.1/tests/errors1.sub b/bash-5.1/tests/errors1.sub new file mode 100644 index 0000000000000000000000000000000000000000..52a9e342295f407d7d88cd3985d98d8b926d3ad8 --- /dev/null +++ b/bash-5.1/tests/errors1.sub @@ -0,0 +1,40 @@ +# 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 . +# +. -i /dev/tty + +f() +{ + return -1 +} + +set -- a b c +shift -4 + +f + +for f in 1 2 3; do + break -1 +done + + +f() +{ + return -25 +} + +f +echo after f +exit -25 + +exit -56 diff --git a/bash-5.1/tests/errors2.sub b/bash-5.1/tests/errors2.sub new file mode 100644 index 0000000000000000000000000000000000000000..79ef3335046cb4a3347b3ef2bd967f7eaf50bd4a --- /dev/null +++ b/bash-5.1/tests/errors2.sub @@ -0,0 +1,3 @@ +set -e +trap 'echo $?' EXIT +echo ${$NO_SUCH_VAR} # Bad substitution expected here diff --git a/bash-5.1/tests/errors3.sub b/bash-5.1/tests/errors3.sub new file mode 100644 index 0000000000000000000000000000000000000000..b2ae3d71a41b73ffe3bbe98d3cde008cb2147613 --- /dev/null +++ b/bash-5.1/tests/errors3.sub @@ -0,0 +1,7 @@ +# redirection errors with special builtins should exit the shell when in +# Posix mode, not otherwise; being on the LHS of || or && should not make +# a difference + +exec 9. +# +# test effect of assigning to readonly vars on loops and non-interactive shells +# fatal error when in posix mode +var=foo +readonly var +for num in 1 2 3 4 5; do + if [ $num -eq 3 ]; then + var=bar + fi + echo $num +done +echo after readonly assignment + +# non-numeric arguments to break are fatal errors for all non-interactive shells +for f in 1 2 3 4 5 +do + break x +done +echo after loop diff --git a/bash-5.1/tests/errors5.sub b/bash-5.1/tests/errors5.sub new file mode 100644 index 0000000000000000000000000000000000000000..112b2a1132fe00e248317d9d769b93ecfa6e195a --- /dev/null +++ b/bash-5.1/tests/errors5.sub @@ -0,0 +1,12 @@ +array[1]=one +array[2]=two + +set -u + +( echo ${#array} ) +( echo ${array} ) +( echo ${array[7]} ) + +set -- 1 2 3 +( echo ${#7} ) +( echo ${7} ) diff --git a/bash-5.1/tests/errors6.sub b/bash-5.1/tests/errors6.sub new file mode 100644 index 0000000000000000000000000000000000000000..cac2c55be7b9b5d846ab5ddcc948dc4989e8aa20 --- /dev/null +++ b/bash-5.1/tests/errors6.sub @@ -0,0 +1,56 @@ +# 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 . +# +# problems with non-fatal expansion errors through bash-4.3 +: ${THIS_SH:=./bash} + +${THIS_SH} -c 'echo ${x!y} second +echo after 1: $?' 2>/dev/null + +${THIS_SH} -c 'echo ${#+} second +echo after 2: $?' 2>/dev/null + +${THIS_SH} -c 'echo ${#foo%} second +echo after 3: $?' 2>/dev/null + +${THIS_SH} -c 'b[0]=4 ; echo ${b[ ]} +echo array after 1: $?' 2>/dev/null +${THIS_SH} -c 'typeset -A v ; v["0"]=one ; echo ${v[ ]} +echo array after 2: $?' 2>/dev/null + +${THIS_SH} -c 'echo ${uvar?}' ./errors6.sub +${THIS_SH} -c 'echo ${uvar:?}' ./errors6.sub +export uvar= +${THIS_SH} -c 'echo ${uvar?}' ./errors6.sub +${THIS_SH} -c 'echo ${uvar:?}' ./errors6.sub +unset uvar + +echo "${-3:-${-3}}" +echo ${-3} +x=-3; echo ${!x} +echo after indir: $? + +function ivar() { echo -n "${!1:-${1}}"; } +ivar -3 + +foo=bar +echo ${!foo} +echo ${!foo:-unset} + +echo ${!var:-unset} +echo ${!var+unset} + +foo=invalid-ident +echo ${!foo} +echo ${!foo:-unset} +echo ${!foo+unset} diff --git a/bash-5.1/tests/errors7.sub b/bash-5.1/tests/errors7.sub new file mode 100644 index 0000000000000000000000000000000000000000..add8782a7f4ca7d775df17bb135b1dc29ff5533c --- /dev/null +++ b/bash-5.1/tests/errors7.sub @@ -0,0 +1,28 @@ +# 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 . +# +: ${THIS_SH:=./bash} +readonly x=4 + +# in posix mode, these are all variable assignment errors, so strict conformance +# implies that we exit after any of them. ksh93 doesn't do that. we more-or-less +# emulate the ksh93 behavior + +x=8 notthere +echo after no such command: $? +x=8 echo echo builtin +echo after non-special builtin: $? +( x=8 : nosuchdir +echo after special builtin: $? ) +( x=8 $nocmd +echo after assignment error: $? ) diff --git a/bash-5.1/tests/errors8.sub b/bash-5.1/tests/errors8.sub new file mode 100644 index 0000000000000000000000000000000000000000..b65e1ab695af252cfb8e5ae1413f2bae66d5927f --- /dev/null +++ b/bash-5.1/tests/errors8.sub @@ -0,0 +1,14 @@ +# the start of a set of tests for command keeping special builtins from +# exiting the shell on failure +set -o posix +readonly v + +command eval '( ' || echo ok 1 + +command export v=foo || echo ok 2 +command readonly v=foo || echo ok 3 + +command shift 12 || echo ok 4 + +command return 16 || echo ok 5 +command set -o notanoption || echo ok 6 diff --git a/bash-5.1/tests/exec.right b/bash-5.1/tests/exec.right new file mode 100644 index 0000000000000000000000000000000000000000..fe8a12764e5efff742ab61338f81d5b7980b94df --- /dev/null +++ b/bash-5.1/tests/exec.right @@ -0,0 +1,134 @@ +before exec1.sub: one two three +calling exec1.sub +aa bb cc dd ee +after exec1.sub with args: 0 + +after exec1.sub without args: 0 +after exec1.sub: one two three +./execscript: line 21: notthere: command not found +127 +/tmp/bash: notthere: No such file or directory +127 +/bin/sh: /bin/sh: cannot execute binary file +126 +./execscript: line 40: /: Is a directory +126 +/: /: Is a directory +126 +./execscript: line 47: .: /: is a directory +1 +126 +0 +this is bashenv +./exec3.sub: line 3: /tmp/bash-notthere: No such file or directory +127 +./execscript: line 71: notthere: No such file or directory +127 +./execscript: line 74: notthere: No such file or directory +127 +./execscript: line 77: notthere: command not found +127 +this is sh +this is sh +unset +ok +5 +./exec5.sub: line 4: exec: bash-notthere: not found +127 +this is ohio-state +0 +1 +1 +0 +42 +42 +0 +1 +1 +0 +0 +1 +0 +1 +testb +1 +1 +1 +1 +0 +0 +0 +0 +/usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:. +cannot find cat in $TMPDIR +cannot find cat with empty $PATH +PATH = /usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:. +cannot find cat in $TMPDIR with hash +cannot find cat with empty $PATH with hash +PATH = /usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:. +trap -- 'echo foo $BASH_SUBSHELL' EXIT +trap -- 'echo USR1 $BASHPID' SIGUSR1 +between +trap -- 'echo foo $BASH_SUBSHELL' EXIT +trap -- 'echo USR1 $BASHPID' SIGUSR1 +between 2 +trap -- 'echo foo $BASH_SUBSHELL' EXIT +trap -- 'echo USR1 $BASHPID' SIGUSR1 +in subshell: 1 +in subshell pipeline: 1 +group pipeline: 1 +EXIT-group.1 +foo 0 +after +exit code: 1 +exit code: 1 +exit code: 1 +exit code: 1 +exit code: 1 +exit code: 1 +a +b +c +A +B +c +d +c +d +e +x1 +x1a +x2 +x2a +x2b +x3 +x3a +x3b +WORKS +done +WORKS +WORKS +a +b +c +d +a +b +c +d +e +A +B +c +d +c +d +e +x +y +z +WORKS +w +x +y +z diff --git a/bash-5.1/tests/exec1.sub b/bash-5.1/tests/exec1.sub new file mode 100755 index 0000000000000000000000000000000000000000..4a12501f7f31d5c233d9c717bc2ed581af5df154 --- /dev/null +++ b/bash-5.1/tests/exec1.sub @@ -0,0 +1 @@ +echo "$@" diff --git a/bash-5.1/tests/exec10.sub b/bash-5.1/tests/exec10.sub new file mode 100644 index 0000000000000000000000000000000000000000..db6a6710a366b4ba9c877047852584e7ecdd37cc --- /dev/null +++ b/bash-5.1/tests/exec10.sub @@ -0,0 +1,47 @@ +# 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 . +# +# post bash-4.3 changes to how command -p works (avoid modifying $PATH) + +: ${TMPDIR=/tmp} +xpath=/usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:. + +# set a value of PATH we can test for; versions of bash up to and including +# bash-4.3 would set $PATH while running command -p +PATH=$xpath +export PATH +command -p sh -c 'echo $PATH' + +PATH=${TMPDIR} +command -pv cat >/dev/null || echo "cannot find cat using standard path" +command -p cat < /dev/null +#hash + +PATH=$xpath +command -pv cat >/dev/null || echo "cannot find cat using xpath" +PATH=$TMPDIR command -pv cat >/dev/null || echo "cannot find cat using standard path with PATH=\$TMPDIR" +PATH= command -pv cat >/dev/null || echo "cannot find cat using standard path with empty \$PATH" +PATH=$TMPDIR command -v cat >/dev/null || echo "cannot find cat in \$TMPDIR" +PATH= command -v cat >/dev/null || echo "cannot find cat with empty \$PATH" + +echo PATH = $PATH +hash cat + +PATH=$xpath + +PATH=$TMPDIR command -pv cat >/dev/null || echo "cannot find cat using stdpath with hash" +PATH= command -pv cat >/dev/null || echo "cannot find cat using stdpath with hash" +PATH=$TMPDIR command -v cat >/dev/null || echo "cannot find cat in \$TMPDIR with hash" +PATH= command -v cat >/dev/null || echo "cannot find cat with empty \$PATH with hash" + +echo PATH = $PATH diff --git a/bash-5.1/tests/exec11.sub b/bash-5.1/tests/exec11.sub new file mode 100644 index 0000000000000000000000000000000000000000..9631c672328d265952044e2e48895c511bf4a15c --- /dev/null +++ b/bash-5.1/tests/exec11.sub @@ -0,0 +1,14 @@ +trap 'echo USR1 $BASHPID' USR1 +trap 'echo foo $BASH_SUBSHELL' 0 + +trap | cat +echo between +( trap ) +echo between 2 +{ trap; } | cat + +( echo in subshell: $BASH_SUBSHELL ) +( echo in subshell pipeline: $BASH_SUBSHELL ) | cat + +{ echo group pipeline: $BASH_SUBSHELL; + trap 'echo EXIT-group.$BASH_SUBSHELL' EXIT; } | cat diff --git a/bash-5.1/tests/exec12.sub b/bash-5.1/tests/exec12.sub new file mode 100644 index 0000000000000000000000000000000000000000..0d7c8b8930abaf4fbe1064bdf3d5db1a2f1f24fa --- /dev/null +++ b/bash-5.1/tests/exec12.sub @@ -0,0 +1,32 @@ +# 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 . +# +: ${TMPDIR:=/var/tmp} +TMPFILE=$TMPDIR/exitcode +trap 'rm -f $TMPFILE' 0 + +rm -f $TMPFILE +set -e +# we normalize the exit code to accommodate false returning 255 on Solaris +exit_handler() { echo "exit code: $(( $? != 0 ))" ; touch $TMPFILE; } +false() { ! :; } +notfound() { nosuchcommand ; } +syntaxerror() { !:; } + +main() +{( + trap exit_handler 0 + "$@" >> /dev/null 2>&1 +)} +main "$@" +echo "after main: should not get here" diff --git a/bash-5.1/tests/exec13.sub b/bash-5.1/tests/exec13.sub new file mode 100644 index 0000000000000000000000000000000000000000..76e132464f226b8ff83fc3f44d1f55a28aed014b --- /dev/null +++ b/bash-5.1/tests/exec13.sub @@ -0,0 +1,34 @@ +# 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 . +# +echo x1 | ( cat & wait ) +echo x1a | ( :& cat & wait ) + +echo x2 | for f in 1; do + cat & wait +done +echo x2a | if true; then cat & wait; fi +echo x2b | for (( i=0; i < 1; i++ )) ; do cat & wait; done + +echo x3 | { cat & wait; } + +lambda() { cat & wait; } +echo x3a | lambda + +: ${TMPDIR:=/tmp} +SRCF=$TMPDIR/bash-src-$$ +cat > $SRCF << \EOF +cat & wait +EOF +echo x3b | . $SRCF +rm -f $SRCF diff --git a/bash-5.1/tests/exec14.sub b/bash-5.1/tests/exec14.sub new file mode 100644 index 0000000000000000000000000000000000000000..3402fb95fbc4b1774aecc0fb65c091d597fbbee8 --- /dev/null +++ b/bash-5.1/tests/exec14.sub @@ -0,0 +1,47 @@ +# 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 . +# + +# test that optimizing command lists doesn't inappropriately short-cut commands + +# also includes optimizing last command in a list separated by `;' + +if [ -x /bin/echo ] ; then + binecho=/bin/echo +elif [ -x /usr/bin/echo ]; then + binecho=/usr/bin/echo +else + enable -n echo + binecho=echo +fi + +export binecho + +: ${THIS_SH:=./bash} ${TMPDIR:=/var/tmp} + +${THIS_SH} -c 'trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$' +${THIS_SH} -c 'trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$ ; $binecho done' + +( trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$ ) + +${THIS_SH} -c 'echo a && { $binecho b && $binecho c ; } && echo d' +${THIS_SH} -c 'echo a && { $binecho b && $binecho c ; } && echo d ; $binecho e' + +${THIS_SH} -c 'echo A && $binecho B' +${THIS_SH} -c '$binecho c && echo d' + +$THIS_SH -c '$binecho c && $binecho d && echo e' + +$THIS_SH -c 'trap "echo WORKS" EXIT ; $binecho x ; $binecho y ; $binecho z' + +${THIS_SH} -c 'echo w ; { echo x ; $binecho y; }; $binecho z' diff --git a/bash-5.1/tests/exec2.sub b/bash-5.1/tests/exec2.sub new file mode 100644 index 0000000000000000000000000000000000000000..c1caaead5cc24d7e89dbb03ddc79a57f1270a2fa --- /dev/null +++ b/bash-5.1/tests/exec2.sub @@ -0,0 +1,5 @@ +# make sure an exit command in an exit trap sets the shell's exit status +trap - 0 +trap 'exit 5' 0 + +exit 0 diff --git a/bash-5.1/tests/exec3.sub b/bash-5.1/tests/exec3.sub new file mode 100644 index 0000000000000000000000000000000000000000..4f2f8e21a3b6dda5df19f736d095d23789fa0f68 --- /dev/null +++ b/bash-5.1/tests/exec3.sub @@ -0,0 +1,6 @@ +shopt -s execfail + +exec /tmp/bash-notthere +# make sure we're still around +echo $? + diff --git a/bash-5.1/tests/exec4.sub b/bash-5.1/tests/exec4.sub new file mode 100644 index 0000000000000000000000000000000000000000..a60d8b320c88fa841a3d8108d7ada90fd9807b72 --- /dev/null +++ b/bash-5.1/tests/exec4.sub @@ -0,0 +1,8 @@ +# let's test out the noexec code +set -n + +fail +whoops +wow + +set +n diff --git a/bash-5.1/tests/exec5.sub b/bash-5.1/tests/exec5.sub new file mode 100644 index 0000000000000000000000000000000000000000..1462f9e5d346cf1fd1ee8ec33c238ac9a8666ba2 --- /dev/null +++ b/bash-5.1/tests/exec5.sub @@ -0,0 +1,9 @@ +# try exec'ing a command that cannot be found in $PATH +shopt -s execfail + +exec bash-notthere +# make sure we're still around +echo $? + +# now we need to go away, but this should echo 'this is ohio-state' +exec -a ohio-state ${THIS_SH} -c 'echo this is $0' diff --git a/bash-5.1/tests/exec6.sub b/bash-5.1/tests/exec6.sub new file mode 100644 index 0000000000000000000000000000000000000000..dd53e74b12d42ea16a4f069b687c1315f11cee2f --- /dev/null +++ b/bash-5.1/tests/exec6.sub @@ -0,0 +1,67 @@ +# 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 . +# +# builtins with exit status inverted + +( true ) +echo $? +( ! true ) +echo $? + +( false ) +echo $? +( ! false ) +echo $? + +# inverting shouldn't affect exit +(exit 42) +echo $? + +( ! exit 42 ) +echo $? + +# commands requiring an exec with exit status inverted -- broken in bash-2.04 + +( ls > /dev/null 2>&1 ) +echo $? +( ! ls > /dev/null 2>&1 ) +echo $? + +touch /tmp/notwrite +chmod 400 /tmp/notwrite + +# make sure redirection failures in commands whose exit status is inverted +# are handled correctly + +( ls > /tmp/notwrite ) 2>/dev/null +echo $? + +( ! ls > /tmp/notwrite ) 2>/dev/null +echo $? + +# now add exit traps, true and false for commands with and without exit +# status inversion + +(trap 'false' 0 ; ! ls > /tmp/notwrite ) 2>/dev/null +echo $? + +(trap 'false' 0 ; ls > /tmp/notwrite ) 2>/dev/null +echo $? + +(trap 'true' 0 ; ! ls > /tmp/notwrite ) 2>/dev/null +echo $? + +(trap 'true' 0 ; ls > /tmp/notwrite ) 2>/dev/null +echo $? + +rm -f /tmp/notwrite diff --git a/bash-5.1/tests/exec7.sub b/bash-5.1/tests/exec7.sub new file mode 100644 index 0000000000000000000000000000000000000000..0c8c7cab082b5a5578067d443ce050571cca8160 --- /dev/null +++ b/bash-5.1/tests/exec7.sub @@ -0,0 +1,36 @@ +# 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 . +# +# make sure that bash really checks the right things when deciding what +# constitutes an executable file + +[ $UID -eq 0 ] && { echo "exec7.sub: the test suite should not be run as root" >&2 ; } + +: ${TMPDIR:=/tmp} + +cd $TMPDIR || { echo "cannot cd to $TMPDIR" >&2 ; exit 2; } + +mkdir testa testb + +echo 'echo "testa"' > testa/foo +echo 'echo "testb"' > testb/foo + +chmod 655 testa/foo +chmod 755 testb/foo + +PATH=$TMPDIR/testa:$TMPDIR/testb $THIS_SH -c foo + +rm -rf testa testb + +cd $OLDPWD +exit 0 diff --git a/bash-5.1/tests/exec8.sub b/bash-5.1/tests/exec8.sub new file mode 100644 index 0000000000000000000000000000000000000000..014726dce9d83bdf9da90fc244a3b9a14264ccf3 --- /dev/null +++ b/bash-5.1/tests/exec8.sub @@ -0,0 +1 @@ +shopt expand_aliases diff --git a/bash-5.1/tests/exec9.sub b/bash-5.1/tests/exec9.sub new file mode 100644 index 0000000000000000000000000000000000000000..a47dfd007f2e6ca584f20354e7d417fdfba45817 --- /dev/null +++ b/bash-5.1/tests/exec9.sub @@ -0,0 +1,33 @@ +# 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 . +# +# make sure commands before the last one in the pipeline can't change $? +false +false | echo $? +false +(false) | echo $? + +false +true | echo $? +false +(true) | echo $? + +true +false | echo $? +true +(false) | echo $? + +true +true | echo $? +true +(true) | echo $? diff --git a/bash-5.1/tests/execscript b/bash-5.1/tests/execscript new file mode 100644 index 0000000000000000000000000000000000000000..1216828abaa96f155e476ac417488938f4f64b6e --- /dev/null +++ b/bash-5.1/tests/execscript @@ -0,0 +1,158 @@ +export LC_ALL=C +export LANG=C + +if [ $UID -eq 0 ]; then + echo "execscript: the test suite should not be run as root" >&2 +fi + +set -- one two three +echo before exec1.sub: "$@" +echo calling exec1.sub +./exec1.sub aa bb cc dd ee +echo after exec1.sub with args: $? +./exec1.sub +echo after exec1.sub without args: $? +echo after exec1.sub: "$@" + +# set up a fixed path so we know notthere will not be found +PATH=/usr/bin:/bin:/usr/local/bin: +export PATH + +notthere +echo $? + +# this is iffy, since the error messages may vary from system to system +# and /tmp might not exist +ln -s ${THIS_SH} /tmp/bash 2>/dev/null +if [ -f /tmp/bash ]; then + /tmp/bash notthere +else + ${THIS_SH} notthere +fi +echo $? +rm -f /tmp/bash + +# /bin/sh should be there on all systems +${THIS_SH} /bin/sh +echo $? + +# try executing a directory +/ +echo $? + +${THIS_SH} / +echo $? + +# try sourcing a directory +. / +echo $? + +# try sourcing a binary file -- post-2.04 versions don't do the binary file +# check, and will probably fail with `command not found', or status 127 +# bash-4.1 and later check for 256 NUL characters and fail as binary files +# if there are more than that, it's probably binary +. ${THIS_SH} 2>/dev/null +echo $? + +# post-bash-2.05 versions allow sourcing non-regular files +. /dev/null +echo $? + +# kill two birds with one test -- test out the BASH_ENV code +echo echo this is bashenv > $TMPDIR/bashenv +export BASH_ENV=$TMPDIR/bashenv +${THIS_SH} ./exec3.sub +rm -f $TMPDIR/bashenv +unset BASH_ENV + +# we're resetting the $PATH to empty, so this should be last +PATH= + +notthere +echo $? + +command notthere +echo $? + +command -p notthere +echo $? + +# but -p should guarantee that we find all the standard utilities, even +# with an empty or unset $PATH +command -p sh -c 'echo this is $0' +unset PATH +command -p sh -c 'echo this is $0' + +# a bug in bash before bash-2.01 caused PATH to be set to the empty string +# when command -p was run with PATH unset +echo ${PATH-unset} + +echo "echo ok" | ${THIS_SH} -t + +${THIS_SH} ./exec2.sub +echo $? + +${THIS_SH} ./exec4.sub + +# try exec'ing a command that cannot be found in $PATH +${THIS_SH} ./exec5.sub + +# this was a bug in bash versions before bash-2.04 +${THIS_SH} -c 'cat /dev/null' >&- + +# checks for proper return values in subshell commands with inverted return +# values + +${THIS_SH} ./exec6.sub + +# checks for properly deciding what constitutes an executable file +${THIS_SH} ./exec7.sub + +${THIS_SH} ./exec9.sub + +${THIS_SH} ./exec10.sub +${THIS_SH} ./exec11.sub + +true | `echo true` & + +echo after + +# Problem with bash at least back to version 3.0 +${THIS_SH} -c 'VAR=0; VAR=1 command exec; exit ${VAR}' + +# problem with bash through bash-4.1 +( + exec /var/empty/nosuch + echo bad +) 2>/dev/null +[ $? = 127 ] || echo FAIL: bad exit status $? at $LINENO + +unset FALSE +if [ -x /bin/false ]; then + FALSE=/bin/false +elif [ -x /usr/bin/false ]; then + FALSE=/usr/bin/false +else + FALSE='command false' +fi + +# problem with undoing redirections before running exit trap through bash-4.3 + +${THIS_SH} ./exec12.sub false # function +${THIS_SH} ./exec12.sub command false +${THIS_SH} ./exec12.sub $FALSE + +${THIS_SH} ./exec12.sub notfound +${THIS_SH} ./exec12.sub syntaxerror +${THIS_SH} ./exec12.sub nosuchcommand + +# problem with fork optimization in bash-4.4-alpha + +$THIS_SH -c 'echo a && /bin/echo b && echo c' +$THIS_SH -c 'echo A && /bin/echo B' + +$THIS_SH -c '/bin/echo c && echo d' +$THIS_SH -c '/bin/echo c && /bin/echo d && echo e' + +${THIS_SH} ./exec13.sub +${THIS_SH} ./exec14.sub diff --git a/bash-5.1/tests/exp.right b/bash-5.1/tests/exp.right new file mode 100644 index 0000000000000000000000000000000000000000..4e88ca9b17d8e2f4dee4aa979e0c6e6e754749a8 --- /dev/null +++ b/bash-5.1/tests/exp.right @@ -0,0 +1,410 @@ +argv[1] = <^A> +argv[1] = <^A> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^A> +argv[1] = <^?> +argv[1] = +argv[1] = <^A> +argv[1] = <^?> +argv[1] = <^A> +argv[1] = <^?> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = < > +argv[1] = <--> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <^A> +argv[1] = <^?> +argv[1] = <^A> +argv[1] = <^?> +argv[1] = <^A> +argv[1] = <^?> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = +argv[1] = <`> +argv[1] = <"> +argv[1] = <\^A> +argv[1] = <\$> +argv[1] = <\\> +argv[1] = +argv[2] = +argv[1] = <^A> +argv[2] = <^?> +argv[1] = <**> +argv[1] = <\.\./*/> +argv[1] = <^A^?^A^?> +argv[1] = <^A^A> +argv[1] = <^A^?> +argv[1] = <^A^A^?> +argv[1] = < abc> +argv[2] = +argv[3] = +argv[4] = +argv[1] = < abc> +argv[2] = +argv[3] = +argv[4] = +argv[1] = <--abc> +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = < > +argv[1] = < - > +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <10> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <\$x> +argv[1] = <$x> +argv[1] = <\$x> +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[1] = +argv[2] = <> +argv[3] = +argv[4] = <> +argv[5] = +argv[1] = <$foo> +argv[1] = <10> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = <5> +argv[2] = <5> +argv[1] = <3> +argv[1] = <1> +argv[1] = <1> +argv[1] = <5> +argv[1] = <5> +argv[1] = <5> +argv[1] = <5> +argv[1] = <42> +argv[1] = <26> +argv[1] = <\> +argv[1] = <~> +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +a?b?c +a b c +argv[1] = +argv[2] = +argv[3] = <> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^A> +argv[2] = <^?> +argv[1] = <^A^?> +argv[1] = <^A^?^A^?> +argv[1] = <^A^A^?> +0.net +0.net0 + +0.net +0.net +0.net +graph +yes +a +a + val +val + val +no arg passed +hello +[0;31m\] +] +[hello +\[\e[0;31m\] + +hello +eo +argv[1] = +argv[1] = +argv[1] = <^?> +argv[1] = <^?b> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = <> +argv[1] = +argv[2] = <> +argv[1] = +argv[2] = <> +argv[1] = +argv[2] = <> +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = <^A> +argv[1] = <3> +argv[2] = <^C> +argv[3] = <^C> +argv[4] = <^C> +argv[1] = <^A> +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +declare -- var="xyz" +argv[1] = +argv[2] = <--> +argv[3] = +declare -- var="x\001y\177z"$ +argv[1] = <$'x\001y\177z'> +argv[1] = +var=$'x\001y\177z' +./exp8.sub: line 29: xyz: syntax error: invalid arithmetic operator (error token is "z") +declare -a array=() +declare -a array=([0]=$'x\001y\177z') +argv[1] = +declare -a array=([0]=$'x\001y\177z') +declare -A array=([$'x\001y\177z']=$'a\242b\002c' ) +abc +def +ghi +jkl +abc def ghi jkl +xxabc +def +ghi +jklyy +xxabc def ghi jklyy +abc +def +ghi +jkl +abc +def ghi +jkl +abc +def ghi +jkl +abc +def ghi +jkl +xxabc +def +ghi +jklyy +xxabc +def ghi +jklyy +abc +def +ghi +jklabc +def +ghi +jkl +abc +def ghi +jklabc +def ghi +jkl +abc:def ghi:jkl +abc:def ghi:jkl +abc:def ghi:jkl +abc +def ghi +jkl +abc:def ghi:jkl +abc:def ghi:jkl +abc +def ghi +jkl +var=abc:def ghi:jkl +abc:def ghi:jkl +var=abc:def ghi:jkl +abcdef ghijkl +abcdef ghijkl +abcdef ghijkl +abc +def ghi +jkl +abcdef ghijkl +abcdef ghijkl +abcdef ghijkl +var=abcdef ghijkl +abcdef ghijkl +var=abcdef ghijkl +abc +def ghi +jkl +abc def ghi jkl +abc def ghi jkl +abc def ghi jkl +abc +def +ghi +jkl +abc def ghi jkl +abc def ghi jkl +abc +def +ghi +jkl +var=abc def ghi jkl +abc def ghi jkl +var=abc def ghi jkl +abc +def ghi +jkl +[foo] +[] +[foo] +[] +[foo] +[foo] +[foo] +[] +[foo] +[] +[foo] +[] +< A >< B >< A >< B > +< A >< B >< A >< B > +< A >< B >< a >< b > +< A >< B >< A >< B > +< A >< B ><' A '><' B '> +----- +< A >< B >< A >< B > +< A >< B >< A >< B > +< A >< B >< a >< b > +< A >< B >< A >< B > +< A >< B ><' A '><' B '> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1 2> +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <12> +argv[1] = <12> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = < > +argv[1] = <12> +argv[1] = <12> +argv[1] = <12> +argv[1] = <12> +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 +ok 8 +ok 9 +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +abcdefg +abcdefg +abcdefg +abcdefg +cdefg +abcdefg +abcde +abcdefg diff --git a/bash-5.1/tests/exp.tests b/bash-5.1/tests/exp.tests new file mode 100644 index 0000000000000000000000000000000000000000..3e69db4fad60915274f40f90717a93b375211b2c --- /dev/null +++ b/bash-5.1/tests/exp.tests @@ -0,0 +1,425 @@ +# 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 . +# +# +# A suite of tests for bash word expansions +# +# This tests parameter and variable expansion, with an empahsis on +# proper quoting behavior. +# +# Chet Ramey + +# +# If you comment out the body of this function, you can do a diff against +# `expansion-tests.right' to see if the shell is behaving correctly +# +expect() +{ + echo expect "$@" +} + +# Test the substitution quoting characters (CTLESC and CTLNUL) in different +# combinations + +expect "<^A>" +recho `echo ''` +expect "<^A>" +recho `echo ""` +expect "<^?>" +recho `echo ''` +expect "<^?>" +recho `echo ""` +expect "<^A>" +recho `echo ` +expect "<^?>" +recho `echo ` + +expect "bar" +recho ${foo:-"`echo bar`"} +expect "<^A>" +recho ${foo:-"`echo `"} +expect "<^?>" +recho ${foo:-"`echo `"} + +expect "<^A>" +recho "`echo `" +expect "<^?>" +recho "`echo `" + +# Test null strings without variable expansion +expect "" +recho abcd""efgh +expect "" +recho abcd''efgh +expect "" +recho ""abcdefgh +expect "" +recho ''abcdefgh +expect "" +recho abcd"" +expect "" +recho abcd'' + +# Test the quirky behavior of $@ in "" +expect nothing +recho "$@" +expect "< >" +recho " $@" +expect "<-->" +recho "-${@}-" + +# Test null strings with variable expansion that fails +expect '<>' +recho $xxx"" +expect '<>' +recho ""$xxx +expect '<>' +recho $xxx'' +expect '<>' +recho ''$xxx +expect '<>' +recho $xxx""$yyy +expect '<>' +recho $xxx''$yyy + +# Test null strings with variable expansion that succeeds +xxx=abc +yyy=def + +expect '' +recho $xxx"" +expect '' +recho ""$xxx +expect '' +recho $xxx'' +expect '' +recho ''$xxx +expect '' +recho $xxx""$yyy +expect '' +recho $xxx''$yyy + +unset xxx yyy + +# Test the unquoted special quoting characters +expect "<^A>" +recho  +expect "<^?>" +recho  +expect "<^A>" +recho "" +expect "<^?>" +recho "" +expect "<^A>" +recho '' +expect "<^?>" +recho '' + +# Test expansion of a variable that is unset +expect nothing +recho $xxx +expect '<>' +recho "$xxx" + +expect nothing +recho "$xxx${@}" + +# Test empty string expansion +expect '<>' +recho "" +expect '<>' +recho '' + +# Test command substitution with (disabled) history substitution +expect '' +# set +H +recho "`echo \"Hello world!\"`" + +# Test some shell special characters +expect '<`>' +recho "\`" +expect '<">' +recho "\"" +expect '<\^A>' +recho "\" + +expect '<\$>' +recho "\\$" + +expect '<\\>' +recho "\\\\" + +# This should give argv[1] = a argv[2] = b +expect ' ' +FOO=`echo 'a b' | tr ' ' '\012'` +recho $FOO + +# This should give argv[1] = ^A argv[2] = ^? +expect '<^A> <^?>' +FOO=`echo ' ' | tr ' ' '\012'` +recho $FOO + +# Test quoted and unquoted globbing characters +expect '<**>' +recho "*"* + +expect '<\.\./*/>' +recho "\.\./*/" + +# Test patterns that come up when the shell quotes funny character +# combinations +expect '<^A^?^A^?>' +recho '' +expect '<^A^A>' +recho '' +expect '<^A^?>' +recho '' +expect '<^A^A^?>' +recho '' + +# More tests of "$@" +set abc def ghi jkl +expect '< abc> ' +recho " $@ " +expect '< abc> ' +recho "${1+ $@ }" + +set abc def ghi jkl +expect '<--abc> ' +recho "--$@--" + +set "a b" cd ef gh +expect ' ' +recho ${1+"$@"} +expect ' ' +recho ${foo:-"$@"} +expect ' ' +recho "${@}" + +expect '< >' +recho " " +expect '< - >' +recho " - " + +# Test combinations of different types of quoting in a fully-quoted string +# (so the WHOLLY_QUOTED tests fail and it doesn't get set) +expect '' +recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" + +# Test the various Posix parameter expansions + +expect '' +recho "${x:-$(echo "foo bar")}" +expect ' ' +recho ${x:-$(echo "foo bar")} + +unset X +expect '' +recho ${X:=abc} +expect '' +recho $X + +set a b c +expect '' +recho ${3:+posix} + +POSIX=/usr/posix +expect '<10>' +recho ${#POSIX} + +# remove shortest trailing match +x=file.c +expect '' +recho ${x%.c}.o + +# remove longest trailing match +x=posix/src/std +expect '' +recho ${x%%/*} + +# remove shortest leading pattern +x=$HOME/src/cmd +expect '' +recho ${x#$HOME} + +# remove longest leading pattern +x=/one/two/three +expect '' +recho ${x##*/} + +# pattern removal of patterns that don't match +z=abcdef + +expect '' +recho ${z#xyz} +expect '' +recho ${z##xyz} + +expect '' +recho ${z%xyz} +expect '' +recho ${z%%xyz} + +# Command substitution and the quirky differences between `` and $() + +expect '<\$x>' +recho '\$x' + +expect '<$x>' +recho `echo '\$x'` + +expect '<\$x>' +recho $(echo '\$x') + +# The difference between $* "$*" and "$@" + +set "abc" "def ghi" "jkl" + +expect ' ' +recho $* + +expect '' +recho "$*" + +OIFS="$IFS" +IFS=":$IFS" + +# The special behavior of "$*", using the first character of $IFS as separator +expect '' +recho "$*" + +IFS="$OIFS" + +expect ' ' +recho "$@" + +expect ' ' +recho "xx$@yy" + +expect ' ' +recho "$@$@" + +foo=abc +bar=def + +expect '' +recho "$foo""$bar" + +unset foo +set $foo bar '' xyz "$foo" abc + +expect ' <> <> ' +recho "$@" + +# More tests of quoting and deferred evaluation + +foo=10 x=foo +y='$'$x +expect '<$foo>' +recho $y +eval y='$'$x +expect '<10>' +recho $y + +# case statements + +NL=' +' +x='ab +cd' + +expect '' +case "$x" in +*$NL*) recho "newline expected" ;; +esac + +expect '' +case \? in +*"?"*) recho "got it" ;; +esac + +expect '' +case \? in +*\?*) recho "got it" ;; +esac + +set one two three four five +expect ' ' +recho $1 $3 ${5} $8 ${9} + +# length tests on positional parameters and some special parameters + +expect '<5> <5>' +recho $# ${#} +expect '<3>' +recho ${#1} +expect '<1>' +recho ${##} +expect '<1>' +recho ${#?} +expect '<5>' +recho ${#@} +expect '<5>' +recho ${#*} +expect '<5>' +recho "${#@}" +expect '<5>' +recho "${#*}" + +expect '<42>' +recho $((28 + 14)) +expect '<26>' +recho $[ 13 * 2 ] + +expect '<\>' +recho `echo \\\\` + +expect '<~>' +recho '~' + +expect nothing +recho $! +expect nothing +recho ${!} + +# test word splitting of assignment statements not preceding a command +a="a b c d e" +declare b=$a +expect ' ' +recho $b + +a="a?b?c" + +echo ${a//\\?/ } + +echo ${a//\?/ } + +${THIS_SH} -c 'var=a:b: ; IFS=" :" ; recho $var""' bash + +${THIS_SH} ./exp1.sub + +${THIS_SH} ./exp2.sub + +${THIS_SH} ./exp3.sub + +${THIS_SH} ./exp4.sub + +${THIS_SH} ./exp5.sub + +${THIS_SH} ./exp6.sub +${THIS_SH} ./exp7.sub +${THIS_SH} ./exp8.sub +${THIS_SH} ./exp9.sub +${THIS_SH} ./exp10.sub +${THIS_SH} ./exp11.sub +${THIS_SH} ./exp12.sub diff --git a/bash-5.1/tests/exp1.sub b/bash-5.1/tests/exp1.sub new file mode 100644 index 0000000000000000000000000000000000000000..3dbe3d90f8cdb688c9f6fed32937797c7bebe5db --- /dev/null +++ b/bash-5.1/tests/exp1.sub @@ -0,0 +1,34 @@ +# 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 . +# +# Test the substitution quoting characters (CTLESC and CTLNUL) in different +# combinations + +recho `echo ''` +recho `echo ""` +recho `echo ` + +# Test the unquoted special quoting characters +recho  +recho "" +recho '' + +# This should give argv[1] = ^A argv[2] = ^? +FOO=`echo ' ' | tr ' ' '\012'` +recho $FOO + +# Test patterns that come up when the shell quotes funny character +# combinations +recho '' +recho '' +recho '' diff --git a/bash-5.1/tests/exp10.sub b/bash-5.1/tests/exp10.sub new file mode 100644 index 0000000000000000000000000000000000000000..42bdaf875046b309463b5c84864ded75f0a420d2 --- /dev/null +++ b/bash-5.1/tests/exp10.sub @@ -0,0 +1,39 @@ +# 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 . +# +set -- ' A ' ' B ' +IFS= + +printf '<%s>' ${*} ${*##} +echo +printf '<%s>' ${*} ${*/} +echo +printf '<%s>' ${*} ${*,,} +echo +printf '<%s>' ${*} ${*:1:2} +echo +printf '<%s>' ${*} ${*@Q} +echo + +echo ----- + +printf '<%s>' ${@} ${@##} +echo +printf '<%s>' ${@} ${@/} +echo +printf '<%s>' ${@} ${@,,} +echo +printf '<%s>' ${@} ${@:1:2} +echo +printf '<%s>' ${@} ${@@Q} +echo diff --git a/bash-5.1/tests/exp11.sub b/bash-5.1/tests/exp11.sub new file mode 100644 index 0000000000000000000000000000000000000000..b3e02e082885ff96945639e3bfa88aade8cd1e82 --- /dev/null +++ b/bash-5.1/tests/exp11.sub @@ -0,0 +1,105 @@ +# 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 . +# +set -- '1 2' + +unset var +recho ${var-${*:1}} + +unset var +recho ${var=$*} + +unset var +recho ${var=${*:1}} +recho "$var" + +# posix interp 221 +unset var +recho ${var:-a\ b} + +recho ${var:=a\ b} +recho "$var" + +set -- 1 2 +IFS= + +unset a b c +recho $* +recho ${a-$*} +recho ${b-${*/}} +recho ${c=${*/}} +recho "$c" +recho ${b-${*,,}} +recho ${d-${*,,}} + +unset -v a b c +IFS=$' \t\n' + +set -- ' ' +A=(' ') + +IFS= +unset var +var=${*@E} +recho "$var" + +unset var +var=${A[*]@E} +recho "$var" + +unset var +var=${@@E} +recho "$var" + +unset var +var=${A[@]@E} +recho "$var" + +unset novar +recho ${novar-${A[*]@E}} + +unset -v var novar +IFS=$' \t\n' + +set -- 1 2 +A=( 1 2 ) +IFS= + +a=$* +recho "$a" +b=${*@E} +recho "$b" + +unset a b +a=${A[*]} +recho "$a" +b=${A[*]@E} +recho "$b" + +set -- $'\t' +A=$1 + +IFS=$1 +[[ ${A[@]} ]] && echo ok 1 +[[ ${A[*]} ]] && echo ok 2 +[[ ${A[0]} ]] && echo ok 3 + +IFS=$' \t\n' +[[ ${A[@]} ]] && echo ok 4 +[[ ${A[*]} ]] && echo ok 5 +[[ ${A[0]} ]] && echo ok 6 + +IFS= +[[ ${A[@]} ]] && echo ok 7 +[[ ${A[*]} ]] && echo ok 8 +[[ ${A[0]} ]] && echo ok 9 diff --git a/bash-5.1/tests/exp12.sub b/bash-5.1/tests/exp12.sub new file mode 100644 index 0000000000000000000000000000000000000000..8c5005dcfeaabef7c732a01259b986c20084a793 --- /dev/null +++ b/bash-5.1/tests/exp12.sub @@ -0,0 +1,51 @@ +# 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 . +# +# force single-byte versions of these functions + +export LANG=C + +# remove shortest trailing match +x=file.c +recho ${x%.c}.o + +# remove longest trailing match +x=posix/src/std +recho ${x%%/*} + +# remove shortest leading pattern +x=$HOME/src/cmd +recho ${x#$HOME} + +# remove longest leading pattern +x=/one/two/three +recho ${x##*/} + +# and no match thrown in for good measure +recho ${x#nomatch} + +foo=abcdefg + +# fail +echo ${foo%ab} +echo ${foo%def} + +echo ${foo#fg} +echo ${foo#def} + +# succeed +echo ${foo#ab} +echo ${foo#def} + +echo ${foo%fg} +echo ${foo%def} diff --git a/bash-5.1/tests/exp2.sub b/bash-5.1/tests/exp2.sub new file mode 100644 index 0000000000000000000000000000000000000000..a70179ec73a607c670125a6a1dfa3ae937caea52 --- /dev/null +++ b/bash-5.1/tests/exp2.sub @@ -0,0 +1,12 @@ +K=dvb0.net A=${K#dvb} eval echo \$A +unset K A +x=${K:=dvb0.net0} A=${K#dvb} eval echo \$A + +unset K A +K=dvb0.net A=${K#dvb} echo "$A" +unset K A +K=dvb0.net A=${K#dvb} ; echo "$A" +unset K A +K=dvb0.net A=${K#dvb} eval echo '$A' +unset K A +K=dvb0.net A=${K#dvb} eval echo \$A diff --git a/bash-5.1/tests/exp3.sub b/bash-5.1/tests/exp3.sub new file mode 100644 index 0000000000000000000000000000000000000000..212d579abce5480a7f8e65d232b607c170b59e8f --- /dev/null +++ b/bash-5.1/tests/exp3.sub @@ -0,0 +1,7 @@ +IFS=: + +case A in ([[:graph:]]) echo graph;; *) echo non-graph;; esac +[[ A == [[:graph:]] ]] && echo yes || echo no + +IFS="~"; read a b <<< a~q; echo $a +IFS=':'; read a b <<< a:q; echo $a diff --git a/bash-5.1/tests/exp4.sub b/bash-5.1/tests/exp4.sub new file mode 100644 index 0000000000000000000000000000000000000000..d022cebba0b7f4ef59c5cdd7e67cc1bbe9354421 --- /dev/null +++ b/bash-5.1/tests/exp4.sub @@ -0,0 +1,10 @@ +f=" val" e= +echo "$e"$f +echo $e$f +echo "$e""$f" + +if [[ "$1"x == x ]] ; then + echo "no arg passed" + exit 1 +fi +echo "$1"x | cat -v diff --git a/bash-5.1/tests/exp5.sub b/bash-5.1/tests/exp5.sub new file mode 100644 index 0000000000000000000000000000000000000000..5cf8ed714a85b076dbbd384ef57a6e1ef17c7905 --- /dev/null +++ b/bash-5.1/tests/exp5.sub @@ -0,0 +1,34 @@ +# 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 . +# +# expansions involving patterns +var='[hello' +echo "${var//[/}" + +red='\[\e[0;31m\]' +printf "%s\n" "${red//\\[\\e/}" + +foo="${red//\\[\\e/}" + +# foo == [0;31m\] +printf "%s\n" "${foo//[0;31m\\/}" + +echo "${var//[]/}" +echo "${red//[]/}" + +v=hello +foo='[:alpha:]' + +echo ${v//[[:alpha:]]/} +echo ${v//[[:alpha]]/} +echo ${v//[[:alpha]/} diff --git a/bash-5.1/tests/exp6.sub b/bash-5.1/tests/exp6.sub new file mode 100644 index 0000000000000000000000000000000000000000..582617c212f0a0ef97970377bbecf845bb1173f4 --- /dev/null +++ b/bash-5.1/tests/exp6.sub @@ -0,0 +1,43 @@ +# 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 . +# +recho """"a +recho a"""" + +recho """" + +recho """"b +recho b"""" + +recho """"""c +recho c"""""" + +recho """"""c"""" +recho """"c"""""" + +recho """"""""c +recho c"""""""" + +# BASH BUG: spurious DEL characters appear on empty variable interpolation. +# BASH 4.2.8(1)-release + +a='' + +recho correct "$a" # correct empty output line +recho correct "$a""$a" # correct empty output line +recho correct "$a""$a""$a" # correct empty output line +recho XwrongX "$a""$a""$a""$a" # spurious two DEL chars appear at line end +recho correct a"$a" # correct single "a" on line +recho XwrongX a"$a""$a" # spurious DEL char appears at line end +recho correct a"$a$a" # correct single "a" on line +recho correct a"$a$a$a$a" # correct single "a" on line diff --git a/bash-5.1/tests/exp7.sub b/bash-5.1/tests/exp7.sub new file mode 100644 index 0000000000000000000000000000000000000000..a3993b50132a6c685c36b3002f475f3254f99f25 --- /dev/null +++ b/bash-5.1/tests/exp7.sub @@ -0,0 +1,36 @@ +# 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 . +# +IFS=$'\001' +c=$'\001' +c2=$'\003' + +IFS=$c # this is the problem line, IFS should end up being \001 +recho "$IFS" +set -- $c2$c$c2$c$c2 +recho $# "$1" "$2" "$3" + +x=$c +recho "$x" + +unset c c2 x + +c=$'Y\1Y'; + +v=X${c}X; +recho X${c}X +recho "$v" + +v=X$c +recho X$c +recho "$v" diff --git a/bash-5.1/tests/exp8.sub b/bash-5.1/tests/exp8.sub new file mode 100644 index 0000000000000000000000000000000000000000..4c2870cafa6afabee96474bdb56286146fe14b2e --- /dev/null +++ b/bash-5.1/tests/exp8.sub @@ -0,0 +1,44 @@ +# 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 . +# +var=$'x\001y\177z' + +recho "$var" +recho $var + +declare -p var +recho $(declare -p var) + +declare -p var | sed -n l + +recho ${var@Q} +recho ${var@P} +echo -E ${var@A} + +unset array +array=( [$'x\001y\177z']=foo ) # should be error +echo -E ${array[@]@A} + +unset array +declare -a array=([0]=$'x\001y\177z') +declare -p array + +unset array +array=( "$var" ) +recho ${array[@]} +echo -E ${array[@]@A} + +unset array +declare -A array +array=( [$'x\001y\177z']=$'a\242b\002c' ) +echo -E ${array[@]@A} diff --git a/bash-5.1/tests/exp9.sub b/bash-5.1/tests/exp9.sub new file mode 100644 index 0000000000000000000000000000000000000000..7e4a3b63c7d99742d760410a5a185620cdd7c751 --- /dev/null +++ b/bash-5.1/tests/exp9.sub @@ -0,0 +1,82 @@ +# 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 . +# +# expansion test cases from Posix interp 888 + +set "abc" "def ghi" "jkl" +unset novar +IFS=' ' # a space +printf '%s\n' $* +printf '%s\n' "$*" +printf '%s\n' xx$*yy +printf '%s\n' "xx$*yy" +printf '%s\n' $@ +printf '%s\n' "$@" +printf '%s\n' ${1+"$@"} +printf '%s\n' ${novar-"$@"} +printf '%s\n' xx$@yy +printf '%s\n' "xx$@yy" +printf '%s\n' $@$@ +printf '%s\n' "$@$@" +IFS=':' +printf '%s\n' "$*" +var=$*; printf '%s\n' "$var" +var="$*"; printf '%s\n' "$var" +unset var +printf '%s\n' ${var-$*} +printf '%s\n' "${var-$*}" +printf '%s\n' ${var-"$*"} +printf '%s\n' ${var=$*} +printf 'var=%s\n' "$var" +unset var +printf '%s\n' "${var=$*}" +printf 'var=%s\n' "$var" + +IFS='' # null +printf '%s\n' "$*" +var=$*; printf '%s\n' "$var" +var="$*"; printf '%s\n' "$var" +unset var +printf '%s\n' ${var-$*} +printf '%s\n' "${var-$*}" +printf '%s\n' ${var-"$*"} +printf '%s\n' ${var=$*} +printf 'var=%s\n' "$var" +unset var +printf '%s\n' "${var=$*}" +printf 'var=%s\n' "$var" +printf '%s\n' "$@" + +unset IFS +printf '%s\n' "$*" +var=$*; printf '%s\n' "$var" +var="$*"; printf '%s\n' "$var" +unset var +printf '%s\n' ${var-$*} +printf '%s\n' "${var-$*}" +printf '%s\n' ${var-"$*"} +printf '%s\n' ${var=$*} +printf 'var=%s\n' "$var" +unset var +printf '%s\n' "${var=$*}" +printf 'var=%s\n' "$var" +printf '%s\n' "$@" + +set -- +printf '[%s]\n' foo "$*" +printf '[%s]\n' foo "$novar$*$(echo)" +printf '[%s]\n' foo $@ +printf '[%s]\n' foo "$@" +printf '[%s]\n' foo ''$@ +printf '[%s]\n' foo ''"$@" +printf '[%s]\n' foo ''"$novar$@$(echo)" diff --git a/bash-5.1/tests/exportfunc.right b/bash-5.1/tests/exportfunc.right new file mode 100644 index 0000000000000000000000000000000000000000..ff7fc8d91a5558357694de3c0e81dd19f4e9cd2a --- /dev/null +++ b/bash-5.1/tests/exportfunc.right @@ -0,0 +1,14 @@ +exportfunc ok 1 +exportfunc ok 2 +./exportfunc.tests: line 37: cve7169-bad: No such file or directory +./exportfunc.tests: eval: line 44: syntax error: unexpected end of file +./exportfunc.tests: line 43: cve7169-bad2: No such file or directory +./exportfunc1.sub: line 14: maximum here-document count exceeded +./exportfunc.tests: line 64: HELLO_WORLD: No such file or directory +eval ok +./exportfunc3.sub: line 23: export: foo=bar: cannot export +status: 1 +equals-1 +bad echo +./exportfunc3.sub: line 36: export: /bin/echo: cannot export +bar diff --git a/bash-5.1/tests/exportfunc.tests b/bash-5.1/tests/exportfunc.tests new file mode 100644 index 0000000000000000000000000000000000000000..b2742d2cef73f3a32573d8f6521ea9cd4ae26509 --- /dev/null +++ b/bash-5.1/tests/exportfunc.tests @@ -0,0 +1,84 @@ +# 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 . +# +# normal operation +foo() +{ + echo exportfunc ok 1 +} +export -f foo +${THIS_SH} -c foo +unset -f foo +foo-a () +{ + echo exportfunc ok 2 +} +export -f foo-a +${THIS_SH} -c 'foo-a' + +# CVE-2014-6271 + +env -i BASH_FUNC_foo%%='() { echo cve6271 ok; } ; echo BAD' ${THIS_SH} -c foo 2>/dev/null + +# CVE-2014-7169 + +rm -f cve7169-bad +env -i BASH_FUNC_X%%='() { (a)=>\' ${THIS_SH} -c cve7169-bad 2>/dev/null +: < cve7169-bad +rm -f cve7169-bad + +echo cve7169-bad2 > $TMPDIR/bar +rm -f cve7169-bad2 +eval 'X() { (a)>\' ; . ./bar 2>/dev/null +: < cve7169-bad2 +rm -f cve7169-bad2 $TMPDIR/bar + +# CVE-2014-7186 +${THIS_SH} ./exportfunc1.sub + +# CVE-2014-7187 +${THIS_SH} ./exportfunc2.sub + +# CVE-2014-6277 + +env BASH_FUNC_foo%%="() { 000(){>0;}&000(){ 0;}<<0 0" ${THIS_SH} -c foo 2>/dev/null +env BASH_FUNC_foo%%="() { 000(){>0;}&000(){ 0;}<<`perl -e '{print "A"x100000}'` 0" ${THIS_SH} -c foo 2>/dev/null +${THIS_SH} -c "f(){ x(){ _;}; x(){ _;}</dev/null + +# CVE-2014-6278 + +env 'BASH_FUNC_FOO%%=() { 0;}>r[0${$(}0 {>"$(id >/dev/tty)"; }' ${THIS_SH} -c : 2>/dev/null + +rm -f HELLO_WORLD +env BASH_FUNC_FOO%%='() { 0;}>r[0${$(}0 {>HELLO_WORLD; }' ${THIS_SH} -c : 2>/dev/null +: < HELLO_WORLD + +env BASH_FUNC_x%%='() { _;}>_[$($())] { echo vuln;}' ${THIS_SH} -c : 2>/dev/null + +env -i BASH_FUNC_x%%='() { _; } >_[${ $() }] { id; }' ${THIS_SH} -c : 2>/dev/null + +env BASH_FUNC_x%%=$'() { _;}>_[$($())]\n{ echo vuln;}' ${THIS_SH} -c : 2>/dev/null +eval 'x() { _;}>_[$($())] { echo vuln;}' 2>/dev/null + +eval 'foo() { _; } >_[${ $() }] ;{ echo eval ok; }' + +# other tests fixed in bash43-030 concerning function name transformation +env $'BASH_FUNC_\nfoo%%=() { echo transform-1; }' ${THIS_SH} -c foo 2>/dev/null +env $'BASH_FUNC_foo\n%%=() { echo transform-2; }' ${THIS_SH} -c foo 2>/dev/null +env $'BASH_FUNC_ foo %%=() { echo transform-3; }' ${THIS_SH} -c foo 2>/dev/null + +unset -f foo +env $'BASH_FUNC_#badname%%'=$'() { :; }\nfoo () { echo transform-4; } ' ${THIS_SH} -c 'foo' 2>/dev/null + +# tests of exported names +${THIS_SH} ./exportfunc3.sub diff --git a/bash-5.1/tests/exportfunc1.sub b/bash-5.1/tests/exportfunc1.sub new file mode 100644 index 0000000000000000000000000000000000000000..53b4c1fb09672d353e1f59faea11e8cbb49e63a5 --- /dev/null +++ b/bash-5.1/tests/exportfunc1.sub @@ -0,0 +1,34 @@ +# 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 . +# +cat <. +# +for x1 in ; do : +for x2 in ; do : +for x3 in ; do : +for x4 in ; do : +for x5 in ; do : +for x6 in ; do : +for x7 in ; do : +for x8 in ; do : +for x9 in ; do : +for x10 in ; do : +for x11 in ; do : +for x12 in ; do : +for x13 in ; do : +for x14 in ; do : +for x15 in ; do : +for x16 in ; do : +for x17 in ; do : +for x18 in ; do : +for x19 in ; do : +for x20 in ; do : +for x21 in ; do : +for x22 in ; do : +for x23 in ; do : +for x24 in ; do : +for x25 in ; do : +for x26 in ; do : +for x27 in ; do : +for x28 in ; do : +for x29 in ; do : +for x30 in ; do : +for x31 in ; do : +for x32 in ; do : +for x33 in ; do : +for x34 in ; do : +for x35 in ; do : +for x36 in ; do : +for x37 in ; do : +for x38 in ; do : +for x39 in ; do : +for x40 in ; do : +for x41 in ; do : +for x42 in ; do : +for x43 in ; do : +for x44 in ; do : +for x45 in ; do : +for x46 in ; do : +for x47 in ; do : +for x48 in ; do : +for x49 in ; do : +for x50 in ; do : +for x51 in ; do : +for x52 in ; do : +for x53 in ; do : +for x54 in ; do : +for x55 in ; do : +for x56 in ; do : +for x57 in ; do : +for x58 in ; do : +for x59 in ; do : +for x60 in ; do : +for x61 in ; do : +for x62 in ; do : +for x63 in ; do : +for x64 in ; do : +for x65 in ; do : +for x66 in ; do : +for x67 in ; do : +for x68 in ; do : +for x69 in ; do : +for x70 in ; do : +for x71 in ; do : +for x72 in ; do : +for x73 in ; do : +for x74 in ; do : +for x75 in ; do : +for x76 in ; do : +for x77 in ; do : +for x78 in ; do : +for x79 in ; do : +for x80 in ; do : +for x81 in ; do : +for x82 in ; do : +for x83 in ; do : +for x84 in ; do : +for x85 in ; do : +for x86 in ; do : +for x87 in ; do : +for x88 in ; do : +for x89 in ; do : +for x90 in ; do : +for x91 in ; do : +for x92 in ; do : +for x93 in ; do : +for x94 in ; do : +for x95 in ; do : +for x96 in ; do : +for x97 in ; do : +for x98 in ; do : +for x99 in ; do : +for x100 in ; do : +for x101 in ; do : +for x102 in ; do : +for x103 in ; do : +for x104 in ; do : +for x105 in ; do : +for x106 in ; do : +for x107 in ; do : +for x108 in ; do : +for x109 in ; do : +for x110 in ; do : +for x111 in ; do : +for x112 in ; do : +for x113 in ; do : +for x114 in ; do : +for x115 in ; do : +for x116 in ; do : +for x117 in ; do : +for x118 in ; do : +for x119 in ; do : +for x120 in ; do : +for x121 in ; do : +for x122 in ; do : +for x123 in ; do : +for x124 in ; do : +for x125 in ; do : +for x126 in ; do : +for x127 in ; do : +for x128 in ; do : +for x129 in ; do : +for x130 in ; do : +for x131 in ; do : +for x132 in ; do : +for x133 in ; do : +for x134 in ; do : +for x135 in ; do : +for x136 in ; do : +for x137 in ; do : +for x138 in ; do : +for x139 in ; do : +for x140 in ; do : +for x141 in ; do : +for x142 in ; do : +for x143 in ; do : +for x144 in ; do : +for x145 in ; do : +for x146 in ; do : +for x147 in ; do : +for x148 in ; do : +for x149 in ; do : +for x150 in ; do : +for x151 in ; do : +for x152 in ; do : +for x153 in ; do : +for x154 in ; do : +for x155 in ; do : +for x156 in ; do : +for x157 in ; do : +for x158 in ; do : +for x159 in ; do : +for x160 in ; do : +for x161 in ; do : +for x162 in ; do : +for x163 in ; do : +for x164 in ; do : +for x165 in ; do : +for x166 in ; do : +for x167 in ; do : +for x168 in ; do : +for x169 in ; do : +for x170 in ; do : +for x171 in ; do : +for x172 in ; do : +for x173 in ; do : +for x174 in ; do : +for x175 in ; do : +for x176 in ; do : +for x177 in ; do : +for x178 in ; do : +for x179 in ; do : +for x180 in ; do : +for x181 in ; do : +for x182 in ; do : +for x183 in ; do : +for x184 in ; do : +for x185 in ; do : +for x186 in ; do : +for x187 in ; do : +for x188 in ; do : +for x189 in ; do : +for x190 in ; do : +for x191 in ; do : +for x192 in ; do : +for x193 in ; do : +for x194 in ; do : +for x195 in ; do : +for x196 in ; do : +for x197 in ; do : +for x198 in ; do : +for x199 in ; do : +for x200 in ; do : +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done +done diff --git a/bash-5.1/tests/exportfunc3.sub b/bash-5.1/tests/exportfunc3.sub new file mode 100644 index 0000000000000000000000000000000000000000..af3125bba61f27ef4182cfc70401612f6a404b32 --- /dev/null +++ b/bash-5.1/tests/exportfunc3.sub @@ -0,0 +1,38 @@ +# 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 . +# +# test function names that cannot be exported + +unset foo # remove from environment if necessary + +function foo=bar +{ + echo equals-1 +} + +export -f 'foo=bar' +echo status: $? + +foo\=bar +printenv | grep 'foo=bar' +${THIS_SH} -c 'foo\=bar 2>/dev/null' + +function /bin/echo +{ + echo bad echo +} + +/bin/echo foo +export -f '/bin/echo' + +${THIS_SH} -c '/bin/echo bar' diff --git a/bash-5.1/tests/extglob.right b/bash-5.1/tests/extglob.right new file mode 100644 index 0000000000000000000000000000000000000000..691f6879d8765936c63c8d53c2c01e4b47037c52 --- /dev/null +++ b/bash-5.1/tests/extglob.right @@ -0,0 +1,116 @@ +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 +ok 8 +ok 9 +ok 10 +ok 11 +ok 12 +ok 13 +ok 14 +ok 15 +ok 16 +ok 17 +ok 18 +ok 19 +ok 20 +ok 21 +ok 22 +ok 23 +ok 24 +ok 25 +ok 26 +ok 27 +ok 28 +ok 29 +ok 30 +ok 31 +ok 32 +ok 33 +ok 34 +ok 35 +ok 36 +!([*)* ++(a|b[)* +[a*(]*)z ++()c ++()x +abc ++(*)x +abc +no-file+(a|b)stuff +no-file+(a*(c)|b)stuff +abd acd +acd +abd +no +yes +yes +1: bcdef +2: def +3: abcde +4: abc +5: ef +6: ef +7: abcdef +ab abef +abcfef abef +abcdef +ab abcdef abcfef abef +abcdef abcfef abef +ok 37 +ok 38 +ok 39 +ok 40 +ok 41 +ok 42 +a b a,b a-b a.b a:b a;b a_b +a b a,b a-b a.b a:b a;b a_b +a b a,b a-b a.b a:b a;b a_b +a b a,b a-b a.b a:b a;b a_b +a.b +a b a,b a-b a:b a;b a_b +a b a,b a-b a.b a:b a;b a_b +a b a,b a-b a.b a:b a;b a_b +a b a,b a-b a.b a:b a;b a_b +argv[1] = +a,b +a.c +a.c +a.c +a.c +a.c +a.c +ok 1 +ok 2 +ok 3 +a ab +a ab +a ab +a +. .. +. .. a.log +*(foo) +*(foo|bar) +a.log +?(foo) +a.log +a.log +. .. +. .. +a.log +a.log +.x .y .z +a b c +.x .y .z a b c +a b c +a b c +a b c +a b c +.x .y .z a b c +.x .y .z a b c +* diff --git a/bash-5.1/tests/extglob.tests b/bash-5.1/tests/extglob.tests new file mode 100644 index 0000000000000000000000000000000000000000..4cb671a8a8b58735af4be314fcb8cc46d2db8046 --- /dev/null +++ b/bash-5.1/tests/extglob.tests @@ -0,0 +1,392 @@ +# 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 . +# +# test the ksh-like extended globbing features: [!@*?+](patlist) + +shopt -s extglob + +expect() +{ + echo expect "$@" +} + +case "/dev/udp/129.22.8.102/45" in +/dev/@(tcp|udp)/*/*) echo ok 1;; +*) echo bad 1;; +esac + +# valid numbers +case 12 in +0|[1-9]*([0-9])) echo ok 2;; +*) echo bad 2;; +esac + +case 12abc in +0|[1-9]*([0-9])) echo bad 3;; +*) echo ok 3;; +esac + +case 1 in +0|[1-9]*([0-9])) echo ok 4;; +*) echo bad 4;; +esac + +# octal numbers +case 07 in ++([0-7])) echo ok 5;; +*) echo bad 5;; +esac + +case 0377 in ++([0-7])) echo ok 6;; +*) echo bad 6;; +esac + +case 09 in ++([0-7])) echo bad 7;; +*) echo ok 7;; +esac + +# stuff from korn's book +case paragraph in +para@(chute|graph)) echo ok 8;; +*) echo bad 8;; +esac + +case paramour in +para@(chute|graph)) echo bad 9;; +*) echo ok 9;; +esac + +case para991 in +para?([345]|99)1) echo ok 10;; +*) echo bad 10;; +esac + +case para381 in +para?([345]|99)1) echo bad 11;; +*) echo ok 11;; +esac + +case paragraph in +para*([0-9])) echo bad 12;; +*) echo ok 12;; +esac + +case para in +para*([0-9])) echo ok 13;; +*) echo bad 13;; +esac + +case para13829383746592 in +para*([0-9])) echo ok 14;; +*) echo bad 14;; +esac + +case paragraph in +para*([0-9])) echo bad 15;; +*) echo ok 15;; +esac + +case para in +para+([0-9])) echo bad 16;; +*) echo ok 16;; +esac + +case para987346523 in +para+([0-9])) echo ok 17;; +*) echo bad 17;; +esac + +case paragraph in +para!(*.[0-9])) echo ok 18;; +*) echo bad 18;; +esac + +case para.38 in +para!(*.[0-9])) echo ok 19;; +*) echo bad 19;; +esac + +case para.graph in +para!(*.[0-9])) echo ok 20;; +*) echo bad 20;; +esac + +case para39 in +para!(*.[0-9])) echo ok 21;; +*) echo bad 21;; +esac + +# tests derived from those in rosenblatt's korn shell book + +case "" in +*(0|1|3|5|7|9)) echo ok 22;; +*) echo bad 22; +esac + +case 137577991 in +*(0|1|3|5|7|9)) echo ok 23;; +*) echo bad 23; +esac + +case 2468 in +*(0|1|3|5|7|9)) echo bad 24;; +*) echo ok 24; +esac + +case file.c in +*.c?(c)) echo ok 25;; +*) echo bad 25;; +esac + +case file.C in +*.c?(c)) echo bad 26;; +*) echo ok 26;; +esac + +case file.cc in +*.c?(c)) echo ok 27;; +*) echo bad 27;; +esac + +case file.ccc in +*.c?(c)) echo bad 28;; +*) echo ok 28;; +esac + +case parse.y in +!(*.c|*.h|Makefile.in|config*|README)) echo ok 29;; +*) echo bad 29;; +esac + +case shell.c in +!(*.c|*.h|Makefile.in|config*|README)) echo bad 30;; +*) echo ok 30;; +esac + +case Makefile in +!(*.c|*.h|Makefile.in|config*|README)) echo ok 31;; +*) echo bad 31;; +esac + +case "VMS.FILE;1" in +*\;[1-9]*([0-9])) echo ok 32;; +*) echo bad 32;; +esac + +case "VMS.FILE;0" in +*\;[1-9]*([0-9])) echo bad 33;; +*) echo ok 33;; +esac +case "VMS.FILE;" in +*\;[1-9]*([0-9])) echo bad 34;; +*) echo ok 34;; +esac +case "VMS.FILE;139" in +*\;[1-9]*([0-9])) echo ok 35;; +*) echo bad 35;; +esac +case "VMS.FILE;1N" in +*\;[1-9]*([0-9])) echo bad 36;; +*) echo ok 36;; +esac + +# tests derived from the pd-ksh test suite + +MYDIR=$PWD # save where we are + +: ${TMPDIR:=/var/tmp} +TESTDIR=$TMPDIR/eglob-test-$$ +mkdir $TESTDIR +builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; } +rm -rf * + +touch abcx abcz bbc +expect '!([*)*' +echo !([*)* + +expect '+(a|b[)*' +echo +(a|b[)* + +expect '[a*(]*z' +echo [a*(]*)z + +rm -f abcx abcz bbc + +touch abc + +expect '+()c' +echo +()c +expect '+()x' +echo +()x +expect abc +echo +(*)c +expect '+(*)x' +echo +(*)x + +# extended globbing should not be performed on the output of substitutions +x='@(*)' +expect '@(*)' +echo $x + +expect 'no-file+(a|b)stuff' +echo no-file+(a|b)stuff +expect 'no-file+(a*(c)|b)stuff' +echo no-file+(a*(c)|b)stuff + +touch abd acd + +expect 'abd acd' +echo a+(b|c)d + +expect 'acd' +echo a!(@(b|B))d + +expect 'abd' +echo a[b*(foo|bar)]d + +# simple kleene star tests +expect no +case foo in *(a|b[)) echo yes;; *) echo no;; esac + +expect yes +case foo in *(a|b[)|f*) echo yes;; *) echo no;; esac + +# this doesn't work right yet; it is an incorrectly formed pattern +expect yes +case '*(a|b[)' in *(a|b[)) echo yes;; *) echo no;; esac + +# check extended globbing in pattern removal -- these don't work right yet +x=abcdef + +expect '1: bcdef' +echo 1: ${x#+(a|abc)} +expect '2: def' +echo 2: ${x##+(a|abc)} +expect '3: abcde' +echo 3: ${x%+(def|f)} +expect '4: abc' +echo 4: ${x%%+(f|def)} + +# these work ok + +expect '5: ef' +echo 5: ${x#*(a|b)cd} +expect '6: ef' +echo 6: "${x#*(a|b)cd}" +expect '7: abcdef' +echo 7: ${x#"*(a|b)cd"} + +# More tests derived from a bug report concerning extended glob patterns +# following a * +builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; } +rm -rf * + +touch ab abcdef abef abcfef + +expect 'ab abef' +echo ab*(e|f) + +expect 'abcfef abef' +echo ab?*(e|f) + +expect abcdef +echo ab*d+(e|f) + +expect 'ab abcdef abcfef abef' +echo ab**(e|f) + +expect 'abcdef abcfef abef' +echo ab*+(e|f) + +case 'abcfefg' in +ab**(e|f)) echo ok 37;; +*) echo bad 37;; +esac + +case 'abcfefg' in +ab**(e|f)g) echo ok 38;; +*a) echo bad 38;; +esac + +case ab in +ab*+(e|f)) echo bad 39;; +*) echo ok 39;; +esac + +case abef in +ab***ef) echo ok 40;; +*) echo bad 40;; +esac + +case abef in +ab**) echo ok 41;; +*) echo bad 41;; +esac + +# bug in all versions up to and including bash-2.05b +case "123abc" in +*?(a)bc) echo ok 42;; +*) echo bad 42;; +esac + +# clean up and do the next one + +builtin cd / +rm -rf $TESTDIR + +mkdir $TESTDIR +builtin cd $TESTDIR + +LC_COLLATE=C # have to set this; it affects the sorting +touch a.b a,b a:b a-b a\;b a\ b a_b + +echo a[^[:alnum:]]b +echo a[-.,:\;\ _]b + +echo a@([^[:alnum:]])b +echo a@([-.,:; _])b +echo a@([.])b +echo a@([^.])b +echo a@([^x])b +echo a+([^[:alnum:]])b + +echo a@(.|[^[:alnum:]])b + +builtin cd / +rm -rf $TESTDIR + +x=abcdef +recho "${x#*(a|b)cd}" + +TEST='a , b' +shopt -s globstar +echo ${TEST//*([[:space:]]),*([[:space:]])/,} +shopt -u globstar + +# this is for the benefit of pure coverage, so it writes the pcv file +# in the right place +builtin cd "$MYDIR" + +${THIS_SH} ./extglob1.sub + +${THIS_SH} ./extglob1a.sub + +${THIS_SH} ./extglob3.sub + +${THIS_SH} ./extglob4.sub + +${THIS_SH} ./extglob5.sub + +exit 0 diff --git a/bash-5.1/tests/extglob1.sub b/bash-5.1/tests/extglob1.sub new file mode 100644 index 0000000000000000000000000000000000000000..c73b1eae437747df23848d0815197a346720a2ba --- /dev/null +++ b/bash-5.1/tests/extglob1.sub @@ -0,0 +1,50 @@ +# 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 . +# +MYDIR=$PWD + +: ${TMPDIR:=/tmp} +GDIR=$TMPDIR/gtest-$$ + +shopt -s extglob + +mkdir $GDIR || exit 1 +cd $GDIR || exit 1 + +touch a.c + +echo +([[:alpha:].]) +echo +([[:alpha:].])+([[:alpha:].]) +echo *([[:alpha:].]) +echo *([[:alpha:].])*([[:alpha:].]) + +echo ?([[:alpha:].])?([[:alpha:].])?([[:alpha:].]) +echo @([[:alpha:].])@([[:alpha:].])@([[:alpha:].]) + +case . in +!([[:alpha:].]) ) echo bad 1;; +*) echo ok 1;; +esac + +case . in +?([[:alpha:].]) ) echo ok 2;; +*) echo bad 2;; +esac + +case . in +@([[:alpha:].]) ) echo ok 3;; +*) echo bad 3;; +esac + +cd "$MYDIR" +rm -rf $GDIR diff --git a/bash-5.1/tests/extglob1a.sub b/bash-5.1/tests/extglob1a.sub new file mode 100644 index 0000000000000000000000000000000000000000..14703862b093cbbddc8c1f3ad1dfafa06972a6e1 --- /dev/null +++ b/bash-5.1/tests/extglob1a.sub @@ -0,0 +1,29 @@ +# 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 . +# +shopt -s extglob + +TESTDIR=${TMPDIR:-/tmp}/eglob-test-$$ +mkdir $TESTDIR +builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; } +rm -rf * + +touch a ab ba + +echo a*!(x) +echo a!(x) +echo a*?(x) +echo a?(x) + +builtin cd $OLDPWD +rm -rf $TESTDIR diff --git a/bash-5.1/tests/extglob2.right b/bash-5.1/tests/extglob2.right new file mode 100644 index 0000000000000000000000000000000000000000..f8a09dfb534889e6b49d2eeaafbc28707b0ddcf5 --- /dev/null +++ b/bash-5.1/tests/extglob2.right @@ -0,0 +1,70 @@ +0: [[ fofo = *(f*(o)) ]] +0: [[ ffo = *(f*(o)) ]] +0: [[ foooofo = *(f*(o)) ]] +0: [[ foooofof = *(f*(o)) ]] +0: [[ fooofoofofooo = *(f*(o)) ]] +1: [[ foooofof = *(f+(o)) ]] +1: [[ xfoooofof = *(f*(o)) ]] +1: [[ foooofofx = *(f*(o)) ]] +0: [[ ofxoofxo = *(*(of*(o)x)o) ]] +1: [[ ofooofoofofooo = *(f*(o)) ]] +0: [[ foooxfooxfoxfooox = *(f*(o)x) ]] +1: [[ foooxfooxofoxfooox = *(f*(o)x) ]] +0: [[ foooxfooxfxfooox = *(f*(o)x) ]] +0: [[ ofxoofxo = *(*(of*(o)x)o) ]] +0: [[ ofoooxoofxo = *(*(of*(o)x)o) ]] +0: [[ ofoooxoofxoofoooxoofxo = *(*(of*(o)x)o) ]] +0: [[ ofoooxoofxoofoooxoofxoo = *(*(of*(o)x)o) ]] +1: [[ ofoooxoofxoofoooxoofxofo = *(*(of*(o)x)o) ]] +0: [[ ofoooxoofxoofoooxoofxooofxofxo = *(*(of*(o)x)o) ]] +0: [[ aac = *(@(a))a@(c) ]] +0: [[ ac = *(@(a))a@(c) ]] +1: [[ c = *(@(a))a@(c) ]] +0: [[ aaac = *(@(a))a@(c) ]] +1: [[ baaac = *(@(a))a@(c) ]] +0: [[ abcd = ?@(a|b)*@(c)d ]] +0: [[ abcd = @(ab|a*@(b))*(c)d ]] +0: [[ acd = @(ab|a*(b))*(c)d ]] +0: [[ abbcd = @(ab|a*(b))*(c)d ]] +0: [[ effgz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]] +0: [[ efgz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]] +0: [[ egz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]] +0: [[ egzefffgzbcdij = *(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]] +1: [[ egz = @(b+(c)d|e+(f)g?|?(h)i@(j|k)) ]] +0: [[ ofoofo = *(of+(o)) ]] +0: [[ oxfoxoxfox = *(oxf+(ox)) ]] +1: [[ oxfoxfox = *(oxf+(ox)) ]] +0: [[ ofoofo = *(of+(o)|f) ]] +0: [[ foofoofo = @(foo|f|fo)*(f|of+(o)) ]] +0: [[ oofooofo = *(of|oof+(o)) ]] +0: [[ fffooofoooooffoofffooofff = *(*(f)*(o)) ]] +0: [[ fofoofoofofoo = *(fo|foo) ]] +0: [[ foo = !(x) ]] +0: [[ foo = !(x)* ]] +1: [[ foo = !(foo) ]] +0: [[ foo = !(foo)* ]] +0: [[ foobar = !(foo) ]] +0: [[ foobar = !(foo)* ]] +0: [[ moo.cow = !(*.*).!(*.*) ]] +1: [[ mad.moo.cow = !(*.*).!(*.*) ]] +1: [[ mucca.pazza = mu!(*(c))?.pa!(*(z))? ]] +0: [[ fff = !(f) ]] +0: [[ fff = *(!(f)) ]] +0: [[ fff = +(!(f)) ]] +0: [[ ooo = !(f) ]] +0: [[ ooo = *(!(f)) ]] +0: [[ ooo = +(!(f)) ]] +0: [[ foo = !(f) ]] +0: [[ foo = *(!(f)) ]] +0: [[ foo = +(!(f)) ]] +1: [[ f = !(f) ]] +1: [[ f = *(!(f)) ]] +1: [[ f = +(!(f)) ]] +0: [[ foot = @(!(z*)|*x) ]] +1: [[ zoot = @(!(z*)|*x) ]] +0: [[ foox = @(!(z*)|*x) ]] +0: [[ zoox = @(!(z*)|*x) ]] +0: [[ foo = *(!(foo)) ]] +1: [[ foob = !(foo)b* ]] +0: [[ foobb = !(foo)b* ]] +0 tests failed. diff --git a/bash-5.1/tests/extglob2.sub b/bash-5.1/tests/extglob2.sub new file mode 100644 index 0000000000000000000000000000000000000000..f4a3b3745475a3af0f6ac869d252cb5988efba39 --- /dev/null +++ b/bash-5.1/tests/extglob2.sub @@ -0,0 +1,7 @@ +LANG=en_US.UTF-8 + +shopt -s extglob +a="aaaäöü" + +echo "${a}" "${a//?aa}" "${a//\aaa}" +exit 0 diff --git a/bash-5.1/tests/extglob2.tests b/bash-5.1/tests/extglob2.tests new file mode 100644 index 0000000000000000000000000000000000000000..187253b9c6216aa3bb4febb0d24839d759868479 --- /dev/null +++ b/bash-5.1/tests/extglob2.tests @@ -0,0 +1,103 @@ +# 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 . +# +# +# More ksh-like extended globbing tests, cribbed from zsh-3.1.5 +# +shopt -s extglob + +failed=0 +while read res str pat; do + [[ $res = '#' ]] && continue + [[ $str = ${pat} ]] + ts=$? + [[ $1 = -q ]] || echo "$ts: [[ $str = $pat ]]" + if [[ ( $ts -gt 0 && $res = t) || ($ts -eq 0 && $res = f) ]]; then + echo "Test failed: [[ $str = $pat ]]" + (( failed += 1 )) + fi +done <. +# +shopt -s extglob +DIR=$TMPDIR/extglob-$$ +mkdir $DIR +cd $DIR + +touch a.log + +echo *(.) +echo *(.)* +echo *(foo) +echo *(foo|bar) +echo ?(foo)* +echo ?(foo) +echo *(foo)* +echo @(|foo)* + +echo *(foo).* +echo *(foo|bar).* + +echo !(foo)* +echo !(foo|bar)* + +cd $OLDPWD +rm -rf $DIR diff --git a/bash-5.1/tests/extglob3.tests b/bash-5.1/tests/extglob3.tests new file mode 100644 index 0000000000000000000000000000000000000000..56f8b397b2cc2d7a7ef2610a9ef465f1b948c989 --- /dev/null +++ b/bash-5.1/tests/extglob3.tests @@ -0,0 +1,69 @@ +# 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 . +# +shopt -s extglob + +[[ ab/../ == @(ab|+([^/]))/..?(/) ]] && echo match 1 + +[[ ab/../ == +([^/])/..?(/) ]] && echo match 2 + +[[ ab/../ == @(ab|?b)/..?(/) ]] && echo match 3 + +[[ ab/../ == +([^/])/../ ]] && echo match 4 + +[[ ab/../ == +([!/])/..?(/) ]] && echo match 1a + +[[ ab/../ == @(ab|+([!/]))/..?(/) ]] && echo match 1b + +[[ ab/../ == +([!/])/../ ]] && echo match 2a + +[[ ab/../ == +([!/])/..?(/) ]] && echo match 2b + +[[ ab/../ == +([!/])/..@(/) ]] && echo match 3a + +[[ ab/../ == +(ab)/..?(/) ]] && echo match 3b + +[[ ab/../ == [!/][!/]/../ ]] && echo match 4a + +[[ ab/../ == @(ab|?b)/..?(/) ]] && echo match 4b + +[[ ab/../ == [^/][^/]/../ ]] && echo match 5 + +[[ ab/../ == ?b/..?(/) ]] && echo match 6 + +[[ ab/../ == +(?b)/..?(/) ]] && echo match 7 + +[[ ab/../ == +(?b|?b)/..?(/) ]] && echo match 8 + +[[ ab/../ == @(?b|?b)/..?(/) ]] && echo match 9 + +[[ ab/../ == @(a?|?b)/..?(/) ]] && echo match 10 + +[[ ab/../ == ?(ab)/..?(/) ]] && echo match 11 + +[[ ab/../ == ?(ab|??)/..?(/) ]] && echo match 12 + +[[ ab/../ == @(??)/..?(/) ]] && echo match 13 + +[[ ab/../ == @(??|a*)/..?(/) ]] && echo match 14 + +[[ ab/../ == @(a*)/..?(/) ]] && echo match 15 + +[[ ab/../ == +(??)/..?(/) ]] && echo match 16 + +[[ ab/../ == +(??|a*)/..?(/) ]] && echo match 17 + +[[ ab/../ == +(a*)/..?(/) ]] && echo match 18 + +# +j="@(x)" ; [[ x == $j ]] && echo ok 19 diff --git a/bash-5.1/tests/extglob4.sub b/bash-5.1/tests/extglob4.sub new file mode 100644 index 0000000000000000000000000000000000000000..5369cd69aa8c0435b9afc59faac511bec77323f9 --- /dev/null +++ b/bash-5.1/tests/extglob4.sub @@ -0,0 +1,45 @@ +# 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 . +# +LANG=C +LC_ALL=C + +: ${TMPDIR:=/tmp} +GTDIR=$TMPDIR/extglob4-$$ + +shopt -s extglob +[ -d "${GTDIR}" ] || mkdir "${GTDIR}" +cd "${GTDIR}" || { + echo "extglob4: cannot cd to ${GTDIR}" + exit 2 +} + +touch a b c .x .y .z +echo .!(|.) # correct +echo * # correct + +echo @(*|.!(|.)) # wrong, adds . and .. +echo @(*|@(f)) # ?? +echo @(*|@(ff)) + +echo !(f) +echo !(f)!(f) + +shopt -s dotglob +echo @(*|@(f)) +echo @(*|@(ff)) + +cd $OLDPWD +rm -rf $GTDIR + +[[ a = a*?(/)b ]] && echo bad match 1 diff --git a/bash-5.1/tests/extglob5.sub b/bash-5.1/tests/extglob5.sub new file mode 100644 index 0000000000000000000000000000000000000000..580229b89f526a4f2961b2c93a6fbf9eec69128d --- /dev/null +++ b/bash-5.1/tests/extglob5.sub @@ -0,0 +1,31 @@ +# 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 . +# +# globignore extglob patterns containing colons -- problem until bash-4.2 + +: ${TMPDIR:=/tmp} +TESTDIR=$TMPDIR/bash-globignore-$$ +[ -d "$TESTDIR" ] || mkdir "$TESTDIR" + +cd "$TESTDIR" || exit 2 + +shopt -s extglob +GLOBIGNORE='+([^[:alnum:]]):@([-.,:; _]):[![:alnum:]]' + +touch ';' '++' +echo * + +rm ';' '++' + +cd $OLDPWD +rmdir $TESTDIR diff --git a/bash-5.1/tests/func.right b/bash-5.1/tests/func.right new file mode 100644 index 0000000000000000000000000000000000000000..f4db4d168614a8fe2ec9ff435becb333006ea365 --- /dev/null +++ b/bash-5.1/tests/func.right @@ -0,0 +1,169 @@ +a returns 5 +b returns 4 +c returns 3 +d returns 2 +in e +e returned 25 +x is 25 +ZZ +abcde +defghi +ZZ +5 +0 +AVAR +AVAR +foo +foo +AVAR +5 +5 +f1 +f1 () +{ + ( return 5 ); + status=$?; + echo $status; + return $status +} +before: try to assign to FUNCNAME +outside: FUNCNAME = +before: FUNCNAME = func +FUNCNAME = func2 +after: FUNCNAME = func +outside2: FUNCNAME = +function +zf is a function +zf () +{ + echo this is zf +} +f is a function +f () +{ + echo f-x; + echo f-y +} 1>&2 +subshell +f is a function +f () +{ + echo f-x; + echo f-y +} 1>&2 +f2 is a function +f2 () +{ + echo f2-a; + function f3 () + { + echo f3-a; + echo f3-b + } 1>&2; + f3 +} +subshell +f2 is a function +f2 () +{ + echo f2-a; + function f3 () + { + echo f3-a; + echo f3-b + } 1>&2; + f3 +} +f4 is a function +f4 () +{ + echo f4-a; + function f5 () + { + echo f5-a; + echo f5-b + } 1>&2; + f5 +} 2>&1 +subshell +f4 is a function +f4 () +{ + echo f4-a; + function f5 () + { + echo f5-a; + echo f5-b + } 1>&2; + f5 +} 2>&1 +testgrp is a function +testgrp () +{ + echo testgrp-a; + { + echo tg-x; + echo tg-y + } 1>&2; + echo testgrp-b +} +subshell +testgrp is a function +testgrp () +{ + echo testgrp-a; + { + echo tg-x; + echo tg-y + } 1>&2; + echo testgrp-b +} +funca is a function +funca () +{ + ( echo func-a ) +} +funcb is a function +funcb () +{ + ( echo func-b ) +} +funcc is a function +funcc () +{ + ( echo func-c ) 2>&1 +} +func-a +func-b +func-c +foo-bar +foo-bar () +{ + : +} +expect 5 10 +5 10 +expect 20 +20 +expect 5 20 +5 20 +expect 5 20 +5 20 +expect 2 40 +2 40 +expect 5 20 +5 20 +./func4.sub: line 23: foo: maximum function nesting level exceeded (100) +1 +after: f = 100 +./func4.sub: line 23: foo: maximum function nesting level exceeded (100) +1 +after: f = 100 +7 +after FUNCNEST reset: f = 201 +7 +after FUNCNEST unset: f = 201 +./func4.sub: line 23: foo: maximum function nesting level exceeded (20) +1 +after FUNCNEST assign: f = 38 +5 diff --git a/bash-5.1/tests/func.tests b/bash-5.1/tests/func.tests new file mode 100644 index 0000000000000000000000000000000000000000..fffe3d2b38aebdc2d01143fc1072179bc795f5b8 --- /dev/null +++ b/bash-5.1/tests/func.tests @@ -0,0 +1,192 @@ +# 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 . +# +a() +{ + x=$((x - 1)) + return 5 +} + +b() +{ + x=$((x - 1)) + a + echo a returns $? + return 4 +} + +c() +{ + x=$((x - 1)) + b + echo b returns $? + return 3 +} + +d() +{ + x=$((x - 1)) + c + echo c returns $? + return 2 +} + +e() +{ + d + echo d returns $? + echo in e + x=$((x - 1)) + return $x +} + +f() +{ + e + echo e returned $? + echo x is $x + return 0 +} + +x=30 +f + +# make sure unsetting a local variable preserves the `local' attribute +f1() +{ + local zz + zz=abcde + echo $zz + unset zz + zz=defghi + echo $zz +} + +zz=ZZ +echo $zz +f1 +echo $zz + +unset -f f1 +f1() +{ + return 5 +} + +( f1 ) +echo $? + +unset -f f1 +f1() +{ + sleep 5 + return 5 +} + +f1 & +wait +echo $? + +unset -f f1 + +f1() +{ + echo $AVAR + printenv AVAR +} + +AVAR=AVAR +echo $AVAR +f1 +AVAR=foo f1 +echo $AVAR + +unset -f f1 +# make sure subshells can do a `return' if we're executing in a function +f1() +{ + ( return 5 ) + status=$? + echo $status + return $status +} + +f1 +echo $? + +declare -F f1 # should print just the name +declare -f f1 # should print the definition, too + +# no functions should be exported, right? +declare -xF +declare -xf + +# FUNCNAME tests +func2() +{ + echo FUNCNAME = $FUNCNAME +} + +func() +{ + echo before: FUNCNAME = $FUNCNAME + func2 + echo after: FUNCNAME = $FUNCNAME +} + +echo before: try to assign to FUNCNAME +FUNCNAME=7 + +echo outside: FUNCNAME = $FUNCNAME +func +echo outside2: FUNCNAME = $FUNCNAME + +# test exported functions (and cached exportstr) +zf() +{ + echo this is zf +} +export -f zf + +${THIS_SH} -c 'type -t zf' +${THIS_SH} -c 'type zf' + +${THIS_SH} ./func1.sub + +# tests for functions whose bodies are not group commands, with and without +# attached redirections +${THIS_SH} ./func2.sub + +# test for some posix-specific function behavior +${THIS_SH} ./func3.sub + +# FUNCNEST testing +${THIS_SH} ./func4.sub + +unset -f myfunction +myfunction() { + echo "bad shell function redirection" +} >> /dev/null + +myfunction +myfunction | cat + +segv() +{ + echo foo | return 5 +} + +segv +echo $? + +exit 0 diff --git a/bash-5.1/tests/func1.sub b/bash-5.1/tests/func1.sub new file mode 100644 index 0000000000000000000000000000000000000000..f7e84f4670eb07494a81691b58b4fd6694ec39ed --- /dev/null +++ b/bash-5.1/tests/func1.sub @@ -0,0 +1,68 @@ +# 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 . +# +# +# Test that redirections attached to shell functions are printed correctly. +# This was a bug in all bash versions before bash-2.04. +# +f() +{ + echo f-x + echo f-y +} >&2 + +type f +export -f f +${THIS_SH} -c 'echo subshell; type f' + +f2() +{ + echo f2-a + f3() + { + echo f3-a + echo f3-b + } >&2 + f3 +} + +type f2 + +export -f f2 +${THIS_SH} -c 'echo subshell; type f2' + +f4() +{ + echo f4-a + f5() + { + echo f5-a + echo f5-b + } >&2 + f5 +} 2>&1 + +type f4 +export -f f4 +${THIS_SH} -c 'echo subshell; type f4' + +testgrp() +{ + echo testgrp-a + { echo tg-x; echo tg-y; } >&2 + echo testgrp-b +} +type testgrp + +export -f testgrp +${THIS_SH} -c 'echo subshell; type testgrp' diff --git a/bash-5.1/tests/func2.sub b/bash-5.1/tests/func2.sub new file mode 100644 index 0000000000000000000000000000000000000000..9caabfcb4e73fb1de355f57aa29f7590a5e6ce82 --- /dev/null +++ b/bash-5.1/tests/func2.sub @@ -0,0 +1,40 @@ +# 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 . +# +funca() ( + echo func-a +) + +funcb() ( echo func-b ) + +funcc() ( + echo func-c +) 2>&1 + +type funca +type funcb +type funcc + +funca +funcb +funcc + +# when not in posix mode, bash allows non-identifiers as function names +set +o posix +foo-bar() +{ + :; +} + +declare -F foo-bar +declare -f foo-bar diff --git a/bash-5.1/tests/func3.sub b/bash-5.1/tests/func3.sub new file mode 100644 index 0000000000000000000000000000000000000000..5c0eac2d002a501dd1cc4b236c084d9d525001e8 --- /dev/null +++ b/bash-5.1/tests/func3.sub @@ -0,0 +1,67 @@ +# 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 . +# +# +# test some posix-mode-specific function behavior +# +set -o posix +func() +{ + return 5 +} + +myfunction () { + var=20 return +} +var=10 +echo expect 5 10 +func +echo $? $var + +myfunction +echo expect 20 +echo $var + +echo expect 5 20 +func +echo $? $var + +echo expect 5 20 +var=30 func +echo $? $var + +: ${TMPDIR:=/tmp} +TMPFILE=$TMPDIR/func3.sub.$$ + +rm -f $TMPFILE +echo 'var=40 return 2' > $TMPFILE + +# test the behavior of `return' and preceding variable assignments here +# because it's convenient +var=10 +echo expect 2 40 +. $TMPFILE +echo $? $var + +rm -f $TMPFILE + +#set -o posix +var=0 +func() +{ + var=20 return 5 +} + +echo expect 5 20 +var=30 func +echo $? $var diff --git a/bash-5.1/tests/func4.sub b/bash-5.1/tests/func4.sub new file mode 100644 index 0000000000000000000000000000000000000000..69f15e460ac1a6851bf2b90b2840946f070748b5 --- /dev/null +++ b/bash-5.1/tests/func4.sub @@ -0,0 +1,52 @@ +# 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 . +# +# test FUNCNEST functionality -- bash-4.2 +FUNCNEST=100 + +foo() +{ + (( f++ )) + if (( f > 200 )); then + return 7 + fi + foo +} + +f=0 +foo +echo $? +echo after: f = $f + +f=0 +foo +echo $? +echo after: f = $f + +f=0 +FUNCNEST=0 +foo +echo $? +echo after FUNCNEST reset: f = $f + +f=0 +unset FUNCNEST +foo +echo $? +echo after FUNCNEST unset: f = $f + +FUNCNEST=20 +f=$(( FUNCNEST - 2 )) +foo +echo $? +echo after FUNCNEST assign: f = $f diff --git a/bash-5.1/tests/getopts.right b/bash-5.1/tests/getopts.right new file mode 100644 index 0000000000000000000000000000000000000000..599d830a32c49eda4de980bded07b0dbadf7dc97 --- /dev/null +++ b/bash-5.1/tests/getopts.right @@ -0,0 +1,68 @@ +getopts: usage: getopts optstring name [arg ...] +2 +getopts: usage: getopts optstring name [arg ...] +2 +./getopts.tests: line 23: getopts: -a: invalid option +getopts: usage: getopts optstring name [arg ...] +-a specified +-b bval specified +remaining args: one two three +-a specified +-b bval specified +remaining args: one two three four five six seven eight nine ten eleven twelve +./getopts1.sub: option requires an argument -- b +Usage: ./getopts1.sub [-a] [-b value] args +-a specified +-c cval specified +-d specified +-a specified +-b 3 specified +remaining args: one two three four five +-a specified +-b bval specified +remaining args: one two three +-a specified +-b bval specified +remaining args: one two three +./getopts4.sub: error: option `b' requires an argument +Usage: ./getopts4.sub [-a] [-b value] args +./getopts4.sub: error: illegal option character `c' +Usage: ./getopts4.sub [-a] [-b value] args +-a specified +remaining args: -b bval one two three +OPTERR=0 +a here +something else here +OPTIND=3 +getop: OPTERR=1 +a here +./getopts5.sub: illegal option -- c +something else here +./getopts5.sub: illegal option -- d +something else here +./getopts5.sub: illegal option -- e +something else here +getop: OPTIND=5 +OPTIND=3 +OPTERR=0 +-a specified +remaining args: +-a specified +remaining args: +-a specified +remaining args: +0 +./getopts7.sub: line 17: getopts: `opt-var': not a valid identifier +remaining args: +opt: x +opt: y +opt: a +opt: b +opt: c +opt: z +$1 = a +./getopts10.sub: line 16: OPTARG: readonly variable +OPTARG = x = ? +unset x = ? +declare -r RO="foo" +declare -r RO="foo" diff --git a/bash-5.1/tests/getopts.tests b/bash-5.1/tests/getopts.tests new file mode 100644 index 0000000000000000000000000000000000000000..06cc29a2b0b76ced317953c372921edd137bf07b --- /dev/null +++ b/bash-5.1/tests/getopts.tests @@ -0,0 +1,56 @@ +# 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 . +# +# getopts tests +# this should fail +getopts +echo $? +getopts opts +echo $? + +# maybe someday we will have a ksh93-like -a argument to set the name +# used in error messages, but not yet +getopts -a opts name + +${THIS_SH} ./getopts1.sub -a -b bval one two three +# make sure getopts works when there are more than 9 positional parameters +${THIS_SH} ./getopts1.sub -a -b bval one two three four five six seven eight nine ten eleven twelve +${THIS_SH} ./getopts1.sub -a -b + +${THIS_SH} ./getopts2.sub -ad -c cval three four five + +${THIS_SH} ./getopts3.sub + +# make sure that `-b bval' and `-bbval' are equivalent +${THIS_SH} ./getopts4.sub -a -b bval one two three +${THIS_SH} ./getopts4.sub -a -bbval one two three +# this tests `silent' error reporting +${THIS_SH} ./getopts4.sub -a -b +${THIS_SH} ./getopts4.sub -a -c + +# make sure that `--' can be used to end the list of options +${THIS_SH} ./getopts4.sub -a -- -b bval one two three + +${THIS_SH} ./getopts5.sub -a -c + +${THIS_SH} ./getopts6.sub -a +${THIS_SH} ./getopts6.sub -a -c +${THIS_SH} ./getopts6.sub -ac +echo $? # this should be 2 + +${THIS_SH} ./getopts7.sub -a + +${THIS_SH} ./getopts8.sub +${THIS_SH} ./getopts9.sub + +${THIS_SH} ./getopts10.sub diff --git a/bash-5.1/tests/getopts1.sub b/bash-5.1/tests/getopts1.sub new file mode 100644 index 0000000000000000000000000000000000000000..5145879a442f3e04977b9a1aba06f08bebad69e7 --- /dev/null +++ b/bash-5.1/tests/getopts1.sub @@ -0,0 +1,39 @@ +# 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 . +# +aflag= +bflag= + +while getopts ab: name +do + case $name in + a) aflag=1 ;; + b) bflag=1 + bval=$OPTARG;; + ?) echo Usage: $0 [-a] [-b value] args + exit 2;; + esac + +done + +if [ ! -z "$aflag" ] ; then echo -a specified ; fi +if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi + +if [ "$OPTIND" -gt 1 ] +then + shift $(( $OPTIND - 1 )) +fi + +echo remaining args: "$*" + +exit 0 diff --git a/bash-5.1/tests/getopts10.sub b/bash-5.1/tests/getopts10.sub new file mode 100644 index 0000000000000000000000000000000000000000..cc8acb0cfe3646233dcafe3be185f604011973df --- /dev/null +++ b/bash-5.1/tests/getopts10.sub @@ -0,0 +1,30 @@ +# 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 . +# +set -- -a bb +readonly OPTARG +getopts :x x + +echo OPTARG = $OPTARG x = $x + +getopts x x +echo ${OPTARG-unset} x = $x + +typeset -r RO=foo +typeset -n OPTARG=RO + +getopts :x x +typeset -p RO + +getopts x x +typeset -p RO diff --git a/bash-5.1/tests/getopts2.sub b/bash-5.1/tests/getopts2.sub new file mode 100644 index 0000000000000000000000000000000000000000..6bb8af544465d7f6be5fb61712eb29cf2e07ffc5 --- /dev/null +++ b/bash-5.1/tests/getopts2.sub @@ -0,0 +1,39 @@ +# 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 . +# +aflag= +bflag= + +while getopts ab:c:de name "$@" +do + case $name in + a) aflag=1 ;; + b) bflag=1 + bval=$OPTARG;; + c) cflag=1 + cval=$OPTARG ;; + d) dflag=1 ;; + e) eflag=1;; + ?) echo Usage: $0 [-a] [-b value] [-c value] -[de] args + exit 2;; + esac + +done + +[ ! -z "$aflag" ] && echo -a specified +[ ! -z "$bflag" ] && echo -b $bval specified +[ ! -z "$cflag" ] && echo -c $cval specified +[ ! -z "$dflag" ] && echo -d specified +[ ! -z "$eflag" ] && { echo -n - ; echo e specified; } + +exit 0 diff --git a/bash-5.1/tests/getopts3.sub b/bash-5.1/tests/getopts3.sub new file mode 100644 index 0000000000000000000000000000000000000000..6769c491a6fc7c85516f6ca423cb05945543200a --- /dev/null +++ b/bash-5.1/tests/getopts3.sub @@ -0,0 +1,40 @@ +# 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 . +# +aflag= +bflag= + +while getopts ab: name -a -b 1 -a -a -a -b 5 -b 3 -a one two three four five +do + case $name in + a) aflag=1 ;; + b) bflag=1 + bval=$OPTARG;; + ?) echo Usage: $0 [-a] [-b value] args + exit 2;; + esac + +done + +if [ ! -z "$aflag" ] ; then echo -a specified ; fi +if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi + +set -- -a -b 1 -a -a -a -b 5 -b 3 -a one two three four five +if [ "$OPTIND" -gt 1 ] +then + shift $(( $OPTIND - 1 )) +fi + +echo remaining args: "$*" + +exit 0 diff --git a/bash-5.1/tests/getopts4.sub b/bash-5.1/tests/getopts4.sub new file mode 100644 index 0000000000000000000000000000000000000000..5fbe95482b989402314aba8aff3403a0552ef908 --- /dev/null +++ b/bash-5.1/tests/getopts4.sub @@ -0,0 +1,43 @@ +# 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 . +# +aflag= +bflag= + +while getopts :ab: name "$@" +do + case $name in + a) aflag=1 ;; + b) bflag=1 + bval=$OPTARG;; + :) echo $0: error: option \`$OPTARG\' requires an argument + echo Usage: $0 [-a] [-b value] args + exit 2;; + ?) echo $0: error: illegal option character \`$OPTARG\' + echo Usage: $0 [-a] [-b value] args + exit 2;; + esac + +done + +if [ ! -z "$aflag" ] ; then echo -a specified ; fi +if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi + +if [ "$OPTIND" -gt 1 ] +then + shift $(( $OPTIND - 1 )) +fi + +echo remaining args: "$*" + +exit 0 diff --git a/bash-5.1/tests/getopts5.sub b/bash-5.1/tests/getopts5.sub new file mode 100644 index 0000000000000000000000000000000000000000..bf523107be10df53b124543cd02dcd982828c351 --- /dev/null +++ b/bash-5.1/tests/getopts5.sub @@ -0,0 +1,62 @@ +# 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 . +# +#Time-stamp: <95/06/07 07:40:40 hrue@imf.unit.no> + +getop () { + + local OPTIND=1 + local OPTERR=1 + + echo getop: OPTERR=$OPTERR + while getopts ab arg "$@"; do + case $arg in + a) + echo a here + ;; + b) + echo b here + ;; + :|?|*) + echo something else here + ;; + esac + done + echo getop: OPTIND=$OPTIND +} + +OPTIND= +OPTERR=0 + +echo OPTERR=$OPTERR +while getopts ab arg; do + case $arg in + a) + echo a here + ;; + b) + echo b here + ;; + :|?|*) + + echo something else here + ;; + esac +done + +echo OPTIND=$OPTIND + +getop "$@" -d -e + +echo OPTIND=$OPTIND +echo OPTERR=$OPTERR diff --git a/bash-5.1/tests/getopts6.sub b/bash-5.1/tests/getopts6.sub new file mode 100644 index 0000000000000000000000000000000000000000..d969ecefe138006afaec8711648cd8872056b958 --- /dev/null +++ b/bash-5.1/tests/getopts6.sub @@ -0,0 +1,40 @@ +# 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 . +# +aflag= +bflag= + +while getopts :ac name "$@" +do + case $name in + a) aflag=1 ;; + c) cflag=1 ;; + ?) exit 2;; + esac + + # this came in in a bug report -- it's really a usage error + # but it shouldn't cause the shell to crash + shift +done + +if [ ! -z "$aflag" ] ; then echo -a specified ; fi +if [ ! -z "$cflag" ] ; then echo -c specified ; fi + +if [ "$OPTIND" -gt 1 ] +then + shift $(( $OPTIND - 1 )) +fi + +echo remaining args: "$*" + +exit 0 diff --git a/bash-5.1/tests/getopts7.sub b/bash-5.1/tests/getopts7.sub new file mode 100644 index 0000000000000000000000000000000000000000..de7d7a65825ef30c02417ab53e40180a0243506e --- /dev/null +++ b/bash-5.1/tests/getopts7.sub @@ -0,0 +1,43 @@ +# 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 . +# +aflag= +bflag= + +while getopts :ab: opt-var "$@" +do + case $name in + a) aflag=1 ;; + b) bflag=1 + bval=$OPTARG;; + :) echo $0: error: option \`$OPTARG\' requires an argument + echo Usage: $0 [-a] [-b value] args + exit 2;; + ?) echo $0: error: illegal option character \`$OPTARG\' + echo Usage: $0 [-a] [-b value] args + exit 2;; + esac + +done + +if [ ! -z "$aflag" ] ; then echo -a specified ; fi +if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi + +if [ "$OPTIND" -gt 1 ] +then + shift $(( $OPTIND - 1 )) +fi + +echo remaining args: "$*" + +exit 0 diff --git a/bash-5.1/tests/getopts8.sub b/bash-5.1/tests/getopts8.sub new file mode 100644 index 0000000000000000000000000000000000000000..6aeeca6f50546575ca848384374df12d1cddc257 --- /dev/null +++ b/bash-5.1/tests/getopts8.sub @@ -0,0 +1,13 @@ +f() +{ + typeset OPTIND=1 + typeset opt + + while getopts ":abcxyz" opt + do + echo opt: "$opt" + if [[ $opt = y ]]; then f -abc ; fi + done +} + +f -xyz diff --git a/bash-5.1/tests/getopts9.sub b/bash-5.1/tests/getopts9.sub new file mode 100644 index 0000000000000000000000000000000000000000..f7dcabcee2e61a1235a28ed72115be2ebd7df41a --- /dev/null +++ b/bash-5.1/tests/getopts9.sub @@ -0,0 +1,29 @@ +# 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 . +# +f() +{ + OPTIND=4 + + echo \$1 = $1 +} + +main() +{ +while getopts abcdefg opt +do + f $opt +done +} + +main -abc diff --git a/bash-5.1/tests/glob.right b/bash-5.1/tests/glob.right new file mode 100644 index 0000000000000000000000000000000000000000..9496690502b1799eba1c5793eff058f01324e246 --- /dev/null +++ b/bash-5.1/tests/glob.right @@ -0,0 +1,257 @@ +foo/bar foobar/bar +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +b +argv[1] = +argv[1] = +argv[1] = +argv[1] = +0000000 141 243 134 142 +0000004 +ok 6 +ok 7 +invalid bracket expression +== LANG=C == +[[:alpha:] +ok 1 +[a +[[:alpha:] +ok 2 +ok 2.1 +ok 3 +ok 4 +== LANG=en_US.UTF-8 == +[[:alpha:] +ok 1 +[a +[[:alpha:] +ok 2 +ok 2.1 +ok 3 +ok 4 +invalid character class +== LANG=C == +p +p +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +== LANG=en_US.UTF-8 == +p +p +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +invalid collating symbols +== LANG=C == +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +== LANG=en_US.UTF-8 == +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +argv[1] = +a\? +argv[1] = +a\? +a\a + +./tmp/a/b/c ./tmp/a/b/c ./tmp/a/b/c +./tmp/a/b/c ./tmp/a/b/c ./tmp/a/b/c +./tmp/a/b/c +./tmp/a/b/c +./tmp\/a/b/c +./tm[p]\/a/b/c +./tmp/a/b/c +argv[1] = <./tmp/a/*> +argv[1] = <./tmp/a/*> +argv[1] = <./tmp/a/b/c> +argv[1] = <./tmp/a/*> +argv[1] = <./tmp/a/b/c> +argv[1] = <./t\mp/a/*> +argv[1] = <./tmp/a/b/c> +argv[1] = <./tmp/a/> +argv[1] = <./tmp/a/b/> +argv[1] = <./t\mp/a/> +argv[1] = <./t\mp/a/b/> +argv[1] = <./tmp/a/*> +argv[1] = <./tmp/a/b/c> +argv[1] = <./tmp/a> +argv[1] = <./tmp/a/b*> +argv[1] = <./tmp/a> +argv[1] = <./tmp/a/b*> +argv[1] = <./tmp/> +argv[1] = <\$foo> +argv[2] = <\$foo> +argv[1] = + +<\.> +*abc.c +searchable/\. +searchable/\./. +readable/\. +readable/\./. +searchable/\. +readable/\. +searchable/. +searchable/. +searchable/. +1: [qwe/qwe] +2: [qwe/ +3: [qwe/] +4: +5: [qwe/ +6: +a\*b +a\*b* +é/* +é/* +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +tmp/l1 tmp/l2 tmp/*4 tmp/l3 +./glob.tests: line 65: no match: tmp/*4 +argv[1] = +argv[1] = <*> +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = <*q*> +argv[1] = <**> +argv[1] = <**> +argv[1] = <\.\./*/> +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] =
    +argv[9] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] =
    +argv[4] = +argv[1] = +argv[1] = +no match +not there +argv[1] = +argv[1] = +argv[1] = +argv[1] = +match 1 +match 2 +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +argv[1] = +argv[1] = +argv[1] = +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 +ok 8 +ok 9 +ok 10 +ok 11 +ok 20 +ok 21 +ok 22 +ok 23 +ok 24 +ok 25 +ok 26 +ok 27 +ok 28 +ok 29 +ok 30 +ok 31 +ok 32 +ok 33 +ok 34 +ok 35 +ok 36 +ok 37 +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = <*> +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[10] =
    ' +recho [a-y]*[^c] + +expect ' ' +recho a*[^c] + +touch a-b aXb +expect ' ' +recho a[X-]b + +touch .x .y +expect '
    ' +recho [^a-c]* + +# Make sure that filenames with embedded globbing characters are handled +# properly +mkdir a\*b +> a\*b/ooo + +expect '' +recho a\*b/* + +expect '' +recho a\*?/* + +expect '' +cmd='echo !7' +case "$cmd" in +*\\!*) echo match ;; +*) echo no match ;; +esac + +expect '' +file='r.*' +case $file in +*.\*) echo not there ;; +*) echo there ;; +esac + +# examples from the Posix.2 spec (d11.2, p. 243) +expect '' +recho a[b]c + +expect '' +recho a["b"]c + +expect '' +recho a[\b]c + +expect '' +recho a?c + +expect '' +case abc in +a"b"c) echo 'match 1' ;; +*) echo 'BAD match 1' ;; +esac + +expect '' +case abc in +a*c) echo 'match 2' ;; +*) echo 'BAD match 2' ;; +esac + +expect '' +case abc in +"a?c") echo 'bad 1' ;; +*) echo 'ok 1' ;; +esac + +expect '' +case abc in +a\*c) echo 'bad 2' ;; +*) echo 'ok 2' ;; +esac + +expect '' +case abc in +a\[b]c) echo 'bad 3' ;; +*) echo 'ok 3' ;; +esac + +expect '' +case "$nosuchvar" in +"") echo 'ok 4' ;; +*) echo 'bad 4' ;; +esac + +# This is very odd, but sh and ksh seem to agree +expect '' +case abc in +a["\b"]c) echo 'ok 5' ;; +*) echo 'bad 5' ;; +esac + +mkdir man +mkdir man/man1 +touch man/man1/bash.1 +expect '' +recho */man*/bash.* +expect '' +recho $(echo */man*/bash.*) +expect '' +recho "$(echo */man*/bash.*)" + +# tests with multiple `*'s +case abc in +a***c) echo ok 1;; +esac + +case abc in +a*****?c) echo ok 2;; +esac + +case abc in +?*****??) echo ok 3;; +esac + +case abc in +*****??) echo ok 4;; +esac + +case abc in +*****??c) echo ok 5;; +esac + +case abc in +?*****?c) echo ok 6;; +esac + +case abc in +?***?****c) echo ok 7;; +esac + +case abc in +?***?****?) echo ok 8;; +esac + +case abc in +?***?****) echo ok 9;; +esac + +case abc in +*******c) echo ok 10;; +esac + +case abc in +*******?) echo ok 11;; +esac + +case abcdecdhjk in +a*cd**?**??k) echo ok 20;; +esac + +case abcdecdhjk in +a**?**cd**?**??k) echo ok 21;; +esac + +case abcdecdhjk in +a**?**cd**?**??k***) echo ok 22;; +esac + +case abcdecdhjk in +a**?**cd**?**??***k) echo ok 23;; +esac + +case abcdecdhjk in +a**?**cd**?**??***k**) echo ok 24;; +esac + +case abcdecdhjk in +a****c**?**??*****) echo ok 25;; +esac + +case '-' in +[-abc]) echo ok 26 ;; +esac + +case '-' in +[abc-]) echo ok 27 ;; +esac + +case '\' in +\\) echo ok 28 ;; +esac + +case '\' in +[\\]) echo ok 29 ;; +esac + +case '\' in +'\') echo ok 30 ;; +esac + +case '[' in +[[]) echo ok 31 ;; +esac + +# a `[' without a closing `]' is just another character to match, in the +# bash implementation +case '[' in +[) echo ok 32 ;; +esac + +case '[abc' in +[*) echo 'ok 33';; +esac + +# a right bracket shall lose its special meaning and represent itself in +# a bracket expression if it occurs first in the list. -- POSIX.2 2.8.3.2 +case ']' in +[]]) echo ok 34 ;; +esac + +case '-' in +[]-]) echo ok 35 ;; +esac + +# a backslash should just escape the next character in this context +case p in +[a-\z]) echo ok 36 ;; +esac + +# this was a bug in all versions up to bash-2.04-release +case "/tmp" in +[/\\]*) echo ok 37 ;; +esac + +# none of these should output anything + +case abc in +??**********?****?) echo bad 1;; +esac + +case abc in +??**********?****c) echo bad 2;; +esac + +case abc in +?************c****?****) echo bad 3;; +esac + +case abc in +*c*?**) echo bad 4;; +esac + +case abc in +a*****c*?**) echo bad 5;; +esac + +case abc in +a********???*******) echo bad 6;; +esac + +case 'a' in +[]) echo bad 7 ;; +esac + +case '[' in +[abc) echo bad 8;; +esac + +# let's start testing the case-insensitive globbing code +recho b* + +shopt -s nocaseglob +recho b* + +recho [b]* +shopt -u nocaseglob + +# make sure set -f works right +set -f +recho * +set +f + +# test out the GLOBIGNORE code +GLOBIGNORE='.*:*c:*e:?' +recho * + +GLOBIGNORE='.*:*b:*d:?' +recho * + +# see if GLOBIGNORE can substitute for `set -f' +GLOBIGNORE='.*:*' +recho * + +unset GLOBIGNORE +expect '' +recho */man*/bash.* + +# make sure null values for GLOBIGNORE have no effect +GLOBIGNORE= +expect '' +recho */man*/bash.* + +# this is for the benefit of pure coverage, so it writes the pcv file +# in the right place, and for gprof +builtin cd $MYDIR + +rm -rf $TESTDIR + +exit 0 diff --git a/bash-5.1/tests/glob1.sub b/bash-5.1/tests/glob1.sub new file mode 100644 index 0000000000000000000000000000000000000000..27c216baf07422e19eba6a9d6f825d437fc02e69 --- /dev/null +++ b/bash-5.1/tests/glob1.sub @@ -0,0 +1,30 @@ +# 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 . +# +# bash-2.01.1 failed this test +: ${TMPDIR:=/var/tmp} + +FN=$TMPDIR/bash-glob.$$ +mkdir $FN +cd $FN + +mkdir foo +mkdir foobar +touch foo/bar +touch foobar/bar +chmod 311 foo foobar +echo f*/bar + +chmod 777 foo foobar +cd $OLDPWD +rm -rf $FN diff --git a/bash-5.1/tests/glob2.sub b/bash-5.1/tests/glob2.sub new file mode 100644 index 0000000000000000000000000000000000000000..cabc3502361056888d3773785edd4a7c1619503a --- /dev/null +++ b/bash-5.1/tests/glob2.sub @@ -0,0 +1,57 @@ +# 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 . +# +. ./test-glue-functions + +var='ab\' + +case $var in +ab\\) echo ok 1;; +*) echo bad 1;; +esac + +case $var in +$var) echo ok 2;; +*) echo bad 2;; +esac + +case $var in +'ab\') echo ok 3;; +*) echo bad 3;; +esac + +[[ $var = $var ]] && echo ok 4 +[[ $var = $'ab\134' ]] && echo ok 5 + +LC_ALL=zh_HK.big5hkscs + +read a b c <<< $'\u3b1 b c\n' +echo $b +unset a b c + +export alpha=$'\u3b1' + +printf -v v 'A%sB' "$alpha" +recho "$v" +IFS=$alpha read a b c <<<"$v" +recho "$a" +recho "$b" +unset a b v + +recho "a${alpha}b" +printf "%s" "a${alpha}b" | LC_ALL=C od -b | _intl_normalize_spaces + +a=$'\u3b1' +[[ $a = $a ]] && echo ok 6 + +LC_ALL=zh_HK.big5hkscs ${THIS_SH} -c $'[[ \u3b1 = \u3b1 ]]' && echo ok 7 diff --git a/bash-5.1/tests/glob3.sub b/bash-5.1/tests/glob3.sub new file mode 100644 index 0000000000000000000000000000000000000000..662c65e97f98acc9784ec73f28e64f22514037bf --- /dev/null +++ b/bash-5.1/tests/glob3.sub @@ -0,0 +1,163 @@ +# 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 . +# +: ${TMPDIR:=/var/tmp} + +TESTDIR=${TMPDIR}/glob-test-$$ +mkdir ${TESTDIR} +cd $TESTDIR || { + echo "$TESTDIR: cannot cd" >&2 + exit 1 +} + +matchfunc() +{ + echo == LANG=$LANG == + + touch a p + echo [[:alpha:] + rm a p + + case l in + [[:alpha:]) echo bad 1;; + *) echo ok 1;; + esac + + touch '[a' '[x' + echo [[:alpha:] + rm '[a' + echo [[:alpha:] + rm '[x' + + case [a in + [[:alpha:]) echo ok 2;; + *) echo bad 2;; + esac + + case x in + [[:aeioux:]) echo bad 2.1 ;; + *) echo ok 2.1 ;; + esac + + case [x in + [[:alpha:]) echo bad 3;; + *) echo ok 3;; + esac + + # unclosed bracket char class expression just matches against ":alpha" + case a in + [[:alpha]) echo ok 4;; + *) echo bad 4;; + esac +} + +echo invalid bracket expression +export LANG=C +matchfunc + +export LANG=en_US.UTF-8 +matchfunc + +unset -f matchfunc + +matchfunc() +{ + echo == LANG=$LANG == + + touch p + # quoted character classes work as if they were unquoted now + echo [[:alpha:]] + echo [[:"alpha":]] + rm -f p + + case a] in + [[:aleph:]]) echo bad 1;; + *) echo ok 1;; + esac + + case a in + [[:aleph:]]) echo bad 2;; + *) echo ok 2;; + esac + + case a] in + [[:"alpha":]]) echo bad 3;; + *) echo ok 3;; + esac + + # Posix says quoted character class names work now + case x in + [[:"alpha":]]) echo ok 4;; + *) echo bad 4;; + esac + + case a in + [abc[:foo:]]) echo ok 5;; + *) echo bad 5 ;; + esac + + case a in + [[:foo:]abc]) echo ok 6;; + *) echo bad 6 ;; + esac +} + +echo invalid character class +export LANG=C +matchfunc + +export LANG=en_US.UTF-8 +matchfunc + +unset -f matchfunc + +matchfunc() +{ + echo == LANG=$LANG == + + case h in + [[.hyphen.]) echo bad 1;; + *) echo ok 1;; + esac + + case - in + [[.hyphen.]]) echo ok 2;; + *) echo bad 2;; + esac + + case slash in + [[.slash.]]) echo bad 3;; + *) echo ok 3;; + esac + + case a in + [abc[.nonsense.]]) echo ok 4;; + *) echo bad 4 ;; + esac + + case a in + [[.nonsense.]abc]) echo ok 5;; + *) echo bad 5 ;; + esac +} + +echo invalid collating symbols + +export LANG=C +matchfunc + +export LANG=en_US.UTF-8 +matchfunc + +cd $OLDPWD +rm -rf $TESTDIR diff --git a/bash-5.1/tests/glob4.sub b/bash-5.1/tests/glob4.sub new file mode 100644 index 0000000000000000000000000000000000000000..779c85406c061196046f3885744ef9fd41e5e625 --- /dev/null +++ b/bash-5.1/tests/glob4.sub @@ -0,0 +1,41 @@ +# 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 . +# +: ${TMPDIR:=/var/tmp} + +FN=$TMPDIR/bash-glob.$$ +mkdir $FN || { echo "glob4.sub: cannot mkdir $FN" >&2 ; exit 1; } +builtin cd $FN || { echo "glob4.sub: cannot change directory to $FN" >&2 ; exit 1; } +rm -f * + +touch 'a?' aa + +set -- a \?; IFS=\\; var=$*; +recho "$var" +unset IFS; printf "%s\n" ${var} + +var='a\?' +recho "$var" +printf "%s\n" ${var} + +var='a\a' +printf "%s\n" ${var} + +# shell's idea of a glob pattern and libglob's idea of a glob pattern have to +# be identical +PRE='\/' +printf '<%s>\n' 'define'${PRE}'\ +/' + +builtin cd $OLDPWD +rm -rf $FN diff --git a/bash-5.1/tests/glob5.sub b/bash-5.1/tests/glob5.sub new file mode 100644 index 0000000000000000000000000000000000000000..5735715dbff74a9f31b7f2fc49cacd60efbd20a0 --- /dev/null +++ b/bash-5.1/tests/glob5.sub @@ -0,0 +1,76 @@ +# 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 . +# +ORIGD=$PWD +: ${TMPDIR:=/var/tmp} + +SD=$TMPDIR/bash-glob-$$ +[ -d $SD ] || mkdir $SD +builtin cd $SD || { echo "glob5.sub: cannot change directory to $SD" >&2 ; exit 1; } +mkdir tmp + +D=./tmp/a +D1='./t\mp/a' + +mkdir -m700 ./tmp/a ./tmp/a/b +touch ./tmp/a/b/c + +echo ./tmp/a/b/* "./tmp/a/"b/* "./tmp/a/b"/* + +chmod -r ./tmp/a +echo ./tmp/a/b/* "./tmp/a/"b/* "./tmp/a/b"/* +echo "./tmp/a/b"/* + +bs=\\ +echo ./tmp${bs}/a/b/* +echo ./tmp${bs}/a/b/c +echo ./tm[p]${bs}/a/b/c +echo ./t${bs}mp/a/b/* + +recho "./tmp/a"/* +recho "$D"/* +recho "$D"/b/* + +recho $D/* +recho $D/b/* +recho $D1/* +recho $D1/b/* +recho $D/ +recho $D/b/ +recho $D1/ +recho $D1/b/ + +recho ./t\mp/a/* +recho ./t\mp/a/b/* + +recho ./tmp/a* +recho ./tmp/a/b* +recho ./t\mp/a* +recho ./t\mp/a/b* + +recho ./t\mp/ + +chmod +r ./tmp/a +rm -rf ./tmp/a + +a='$foo' +b='$bar' +a=$(echo "$a" | sed 's/\$/\\$/g') + +recho $a "$a" +recho 'mixed'$a/ + +unset a b + +cd $ORIGD +rm -rf $SD diff --git a/bash-5.1/tests/glob6.sub b/bash-5.1/tests/glob6.sub new file mode 100644 index 0000000000000000000000000000000000000000..f26ae4d65720b30fcaf6f61255bce31a5a9e6cd0 --- /dev/null +++ b/bash-5.1/tests/glob6.sub @@ -0,0 +1,68 @@ +# 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 . +# +# tests of the backslash-in-glob-patterns discussion on the austin-group ML + +: ${TMPDIR:=/var/tmp} + +ORIG=$PWD +GLOBDIR=$TMPDIR/bash-glob-$$ +mkdir $GLOBDIR || { echo "glob6.sub: cannot make directory $GLOBDIR" >&2 ; exit 1; } +builtin cd $GLOBDIR || { echo "glob6.sub: cannot change directory to $GLOBDIR" >&2 ; exit 1; } + +# does the pattern matcher allow backslashes as escape characters and remove +# them as part of matching? +touch abcdefg +pat='ab\cd*' +printf '<%s>\n' $pat +pat='\.' +printf '<%s>\n' $pat +rm abcdefg + +# how about when escaping pattern characters? +touch '*abc.c' +a='\**.c' +printf '%s\n' $a +rm -f '*abc.c' + +# how about when making the distinction between readable and searchable path +# components? +mkdir -m a=x searchable +mkdir -m a=r readable + +p='searchable/\.' +printf "%s\n" $p + +p='searchable/\./.' +printf "%s\n" $p + +p='readable/\.' +printf "%s\n" $p + +p='readable/\./.' +printf "%s\n" $p + +printf "%s\n" 'searchable/\.' +printf "%s\n" 'readable/\.' + +echo */. + +p='*/\.' +echo $p + +echo */'.' + +rmdir searchable readable + +cd $ORIG +rmdir $GLOBDIR diff --git a/bash-5.1/tests/glob7.sub b/bash-5.1/tests/glob7.sub new file mode 100644 index 0000000000000000000000000000000000000000..0212b8e5928464b9d482918f02bc77a979cc6b95 --- /dev/null +++ b/bash-5.1/tests/glob7.sub @@ -0,0 +1,11 @@ +# according to Posix 2.13.3, a slash in a bracket expression renders that +# bracket expression invalid +shopt -s nullglob + +echo 1: [qwe/qwe] +echo 2: [qwe/ +echo 3: [qwe/] + +echo 4: [qwe\/qwe] +echo 5: [qwe\/ +echo 6: [qwe\/] diff --git a/bash-5.1/tests/glob8.sub b/bash-5.1/tests/glob8.sub new file mode 100644 index 0000000000000000000000000000000000000000..dca54fcc6c57c0c527d15c86bd6d2d667a1411be --- /dev/null +++ b/bash-5.1/tests/glob8.sub @@ -0,0 +1,31 @@ +# 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 . +# +: ${TMPDIR:=/var/tmp} + +TESTDIR=${TMPDIR}/glob-test-$$ +mkdir ${TESTDIR} +cd $TESTDIR || { + echo "$TESTDIR: cannot cd" >&2 + exit 1 +} + +trap 'cd $OLDPWD && rm -rf $TESTDIR' EXIT + +var='a\' +touch 'a*b' 'a\*b' + +printf '%s\n' $var\*b* + +var1=a\\$'\001' +printf '%s\n' $var1\*b* diff --git a/bash-5.1/tests/glob9.sub b/bash-5.1/tests/glob9.sub new file mode 100644 index 0000000000000000000000000000000000000000..ef2af2bd9cb60b20b8da5efc7bd96a55ccc8583d --- /dev/null +++ b/bash-5.1/tests/glob9.sub @@ -0,0 +1,13 @@ +LANG=en_US.UTF-8 # safest +: ${TMPDIR:=/var/tmp} +HOME=${TMPDIR} + +mkdir ~/ಇಳಿಕೆಗಳು +touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt +echo ~/ಇಳಿಕೆಗಳು/*.txt >/dev/null + +rm -rf ${TMPDIR}/ಇಳಿಕೆಗಳು + +LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 +echo é/* +echo 'é'/* diff --git a/bash-5.1/tests/globstar.right b/bash-5.1/tests/globstar.right new file mode 100644 index 0000000000000000000000000000000000000000..c8211bc8f4c56a58adfa4e428aaa630e0a05ab69 --- /dev/null +++ b/bash-5.1/tests/globstar.right @@ -0,0 +1,587 @@ +lib/glob/glob.o +lib/glob/smatch.o +lib/glob/strmatch.o +lib/readline/bind.o +lib/readline/callback.o +lib/readline/compat.o +lib/readline/complete.o +lib/readline/display.o +lib/sh/casemod.o +lib/sh/clktck.o +lib/sh/clock.o +lib/sh/eaccess.o +lib/sh/fdprintf.o +lib/sh/fmtullong.o +lib/sh/fmtulong.o +lib/sh/fmtumax.o +lib/sh/fpurge.o +lib/sh/getenv.o +lib/sh/input_avail.o +lib/sh/itos.o + +lib/: +glob +readline +sh + +lib/glob: +glob.o +smatch.o +strmatch.o + +lib/readline: +bind.o +callback.o +compat.o +complete.o +display.o + +lib/sh: +casemod.o +clktck.o +clock.o +eaccess.o +fdprintf.o +fmtullong.o +fmtulong.o +fmtumax.o +fpurge.o +getenv.o +input_avail.o +itos.o +lib/glob/glob.o +lib/glob/smatch.o +lib/glob/strmatch.o +lib/readline/bind.o +lib/readline/callback.o +lib/readline/compat.o +lib/readline/complete.o +lib/readline/display.o +lib/sh/casemod.o +lib/sh/clktck.o +lib/sh/clock.o +lib/sh/eaccess.o +lib/sh/fdprintf.o +lib/sh/fmtullong.o +lib/sh/fmtulong.o +lib/sh/fmtumax.o +lib/sh/fpurge.o +lib/sh/getenv.o +lib/sh/input_avail.o +lib/sh/itos.o +alias.o builtins/history.o builtins/jobs.o builtins/kill.o builtins/let.o builtins/mapfile.o lib/glob/glob.o lib/glob/smatch.o lib/glob/strmatch.o lib/readline/bind.o lib/readline/callback.o lib/readline/compat.o lib/readline/complete.o lib/readline/display.o lib/sh/casemod.o lib/sh/clktck.o lib/sh/clock.o lib/sh/eaccess.o lib/sh/fdprintf.o lib/sh/fmtullong.o lib/sh/fmtulong.o lib/sh/fmtumax.o lib/sh/fpurge.o lib/sh/getenv.o lib/sh/input_avail.o lib/sh/itos.o pcomplib.o print_cmd.o redir.o shell.o sig.o stringlib.o subst.o syntax.o test.o trap.o unwind_prot.o variables.o version.o xmalloc.o y.tab.o +alias.o +builtins/history.o +builtins/jobs.o +builtins/kill.o +builtins/let.o +builtins/mapfile.o +lib/glob/glob.o +lib/glob/smatch.o +lib/glob/strmatch.o +lib/readline/bind.o +lib/readline/callback.o +lib/readline/compat.o +lib/readline/complete.o +lib/readline/display.o +lib/sh/casemod.o +lib/sh/clktck.o +lib/sh/clock.o +lib/sh/eaccess.o +lib/sh/fdprintf.o +lib/sh/fmtullong.o +lib/sh/fmtulong.o +lib/sh/fmtumax.o +lib/sh/fpurge.o +lib/sh/getenv.o +lib/sh/input_avail.o +lib/sh/itos.o +pcomplib.o +print_cmd.o +redir.o +shell.o +sig.o +stringlib.o +subst.o +syntax.o +test.o +trap.o +unwind_prot.o +variables.o +version.o +xmalloc.o +y.tab.o + +builtins: +history.o +jobs.o +kill.o +let.o +mapfile.o + +lib: +glob +readline +sh + +lib/glob: +glob.o +smatch.o +strmatch.o + +lib/readline: +bind.o +callback.o +compat.o +complete.o +display.o + +lib/sh: +casemod.o +clktck.o +clock.o +eaccess.o +fdprintf.o +fmtullong.o +fmtulong.o +fmtumax.o +fpurge.o +getenv.o +input_avail.o +itos.o +alias.o builtins builtins/history.o builtins/jobs.o builtins/kill.o builtins/let.o builtins/mapfile.o lib lib/glob lib/glob/glob.o lib/glob/smatch.o lib/glob/strmatch.o lib/readline lib/readline/bind.o lib/readline/callback.o lib/readline/compat.o lib/readline/complete.o lib/readline/display.o lib/sh lib/sh/casemod.o lib/sh/clktck.o lib/sh/clock.o lib/sh/eaccess.o lib/sh/fdprintf.o lib/sh/fmtullong.o lib/sh/fmtulong.o lib/sh/fmtumax.o lib/sh/fpurge.o lib/sh/getenv.o lib/sh/input_avail.o lib/sh/itos.o pcomplib.o print_cmd.o redir.o shell.o sig.o stringlib.o subst.o syntax.o test.o trap.o unwind_prot.o variables.o version.o xmalloc.o y.tab.o +bar/foo foo +bar/foo/ foo/ +bar/foo/e bar/foo/f foo/a foo/b + + + + + + + + + +== <**/a> == + + + + + + + + + + + + + + + +== == + + + + + + + + + + + + + + + +== <**> == + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +== <**/**> == + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +== <**/**/**> == + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +== <**/**/**/**/**> == + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +== <**/**/a> == + + + + + + + + + + + + + + + +== == + + + + + + + + + + + + + + + +== == + + + + + + + + + + + + + + + +== == + + + + + + + + + + + + + + + +== <**/a/**> == + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +== <**/a/**/**> == + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +== <**/a/**/**/**> == + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +== <**/**/a/**> == + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +a a/aa a/ab b b/bb b/bc c +a/ b/ c/ +a/ab b b/bb diff --git a/bash-5.1/tests/globstar.tests b/bash-5.1/tests/globstar.tests new file mode 100644 index 0000000000000000000000000000000000000000..33714b4f14ecfe535c03ff4ac476c95d5fcf5e20 --- /dev/null +++ b/bash-5.1/tests/globstar.tests @@ -0,0 +1,56 @@ +# 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 . +# +: ${TMPDIR:=/var/tmp} +dir=$PWD + +shopt -s globstar + +export LANG=C LC_ALL=C LC_COLLATE=C + +GDIR=$TMPDIR/globstar-$$ + +mkdir $GDIR || exit 1 +cd $GDIR || exit 1 + +mkdir lib builtins +mkdir lib/glob lib/readline lib/sh + +touch builtins/history.o builtins/jobs.o builtins/kill.o builtins/let.o builtins/mapfile.o +touch lib/glob/glob.o lib/glob/smatch.o lib/glob/strmatch.o +touch lib/readline/bind.o lib/readline/callback.o lib/readline/compat.o lib/readline/complete.o lib/readline/display.o + +touch lib/sh/casemod.o lib/sh/clktck.o lib/sh/clock.o lib/sh/eaccess.o +touch lib/sh/fdprintf.o lib/sh/fmtullong.o lib/sh/fmtulong.o lib/sh/fmtumax.o +touch lib/sh/fpurge.o lib/sh/getenv.o lib/sh/input_avail.o lib/sh/itos.o + +touch alias.o +touch pcomplib.o print_cmd.o redir.o shell.o sig.o stringlib.o subst.o syntax.o +touch test.o trap.o unwind_prot.o variables.o version.o xmalloc.o y.tab.o + +ls lib/** + +ls lib/**/*.o + +echo **/*.o + +ls ** + +echo ** + +cd $dir +rm -rf $GDIR + +${THIS_SH} ./globstar1.sub +${THIS_SH} ./globstar2.sub +${THIS_SH} ./globstar3.sub diff --git a/bash-5.1/tests/globstar1.sub b/bash-5.1/tests/globstar1.sub new file mode 100644 index 0000000000000000000000000000000000000000..7097f5d4088ed0921048d223722f440dcfb2e07f --- /dev/null +++ b/bash-5.1/tests/globstar1.sub @@ -0,0 +1,34 @@ +# 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 . +# +shopt -s globstar +wdir=$PWD + +: ${TMPDIR:=/var/tmp} +DIR=$TMPDIR/globstar-$$ +mkdir -p $DIR +cd $DIR || { + echo "$DIR: cannot cd" >&2 + exit 1 +} +mkdir -p foo/{a,b} bar/{c,d,foo/{e,f}} baz/{g,h} + + +echo **/foo* + +echo **/foo*/ + +echo **/foo*/* + +cd $wdir +rm -rf $DIR diff --git a/bash-5.1/tests/globstar2.sub b/bash-5.1/tests/globstar2.sub new file mode 100644 index 0000000000000000000000000000000000000000..ccf413b1a3cd9e49ae45305384eae3bd53798587 --- /dev/null +++ b/bash-5.1/tests/globstar2.sub @@ -0,0 +1,97 @@ +# 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 . +# +olddir=$PWD +: ${TMPDIR:=/var/tmp} +EMPTY=$TMPDIR/empty + +shopt -s globstar +s() +{ + printf '== <%s> ==\n' "$@" +} +p() +{ + printf '<%q>\n' "$@" +} + +mkdir -p $EMPTY/a/a/a +cd $EMPTY + +# good +p ** +p **/** +p **/**/** + +rm -rf a +mkdir -p $EMPTY/{a,b}/{a,b}/{a,b}/{a,b} +cd $EMPTY + +# good +s '**/a' +p **/a + +# good +s 'a/**' +p a/** + +# good +s '**' +p ** + +# good +s '**/**' +p **/** + +# good +s '**/**/**' +p **/**/** + +# good +s '**/**/**/**/**' +p **/**/**/**/** + +# good +s '**/**/a' +p **/**/a + +# good +s 'a/**/**' +p a/**/** + +# good +s 'a/**/**/**' +p a/**/**/** + +# good +s 'a/**/**/**/**' +p a/**/**/**/** + +# same as ksh93 +s '**/a/**' +p **/a/** + +# same as ksh93 +s '**/a/**/**' +p **/a/**/** + +# same as ksh93 +s '**/a/**/**/**' +p **/a/**/**/** + +# good +s '**/**/a/**' +p **/**/a/** + +cd "$olddir" +rm -rf $EMPTY diff --git a/bash-5.1/tests/globstar3.sub b/bash-5.1/tests/globstar3.sub new file mode 100644 index 0000000000000000000000000000000000000000..771d9061934f5a08d097cb926d689c18e4d1b875 --- /dev/null +++ b/bash-5.1/tests/globstar3.sub @@ -0,0 +1,37 @@ +# 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 . +# +olddir=$PWD +: ${TMPDIR:=/var/tmp} + +SCRATCH=${TMPDIR}/scratch-$$ +rm -rf $SCRATCH +mkdir $SCRATCH || exit 1 + +cd $SCRATCH + +mkdir a b +touch a/aa a/ab +touch b/bb b/bc + +ln -s a c + +shopt -s globstar + +echo ** +echo **/ + +echo **/*b + +cd "$olddir" +rm -rf $SCRATCH diff --git a/bash-5.1/tests/heredoc.right b/bash-5.1/tests/heredoc.right new file mode 100644 index 0000000000000000000000000000000000000000..f6e53beae064dd01257847159a2c6617368f412e --- /dev/null +++ b/bash-5.1/tests/heredoc.right @@ -0,0 +1,106 @@ +a +b +c +a +$PS4 + + + +there +one - alpha +two - beta +three - gamma +hi\ +there$a +stuff +hi\ +there +EO\ +F +hi +hi +tab 1 +tab 2 +tab 3 +abc +def ghi +jkl mno +fff is a function +fff () +{ + ed ${TMPDIR}/foo < /dev/null +/^name/d +w +q +ENDOFINPUT + + aa=1 +} +fff is a function +fff () +{ + ed ${TMPDIR}/foo < /dev/null +/^name/d +w +q +ENDOFINPUT + + aa=1 +} +foo is a function +foo () +{ + echo; + cat <\END +./heredoc3.sub: line 98: warning: here-document at line 96 delimited by end-of-file (wanted `EOF') +./heredoc3.sub: line 99: syntax error: unexpected end of file +heredoc1 +EOF +Ok:0 +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +comsub here-string +./heredoc.tests: line 149: warning: here-document at line 147 delimited by end-of-file (wanted `EOF') +hi +there diff --git a/bash-5.1/tests/heredoc.tests b/bash-5.1/tests/heredoc.tests new file mode 100644 index 0000000000000000000000000000000000000000..430302f5813cb89fb0a06119cbd92f725d29357a --- /dev/null +++ b/bash-5.1/tests/heredoc.tests @@ -0,0 +1,149 @@ +# 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 . +# +# basics +cat < ${TMPDIR}/bash-zzz << EOF +abc +EOF +cat >> ${TMPDIR}/bash-zzz << EOF +def ghi +jkl mno +EOF +cat ${TMPDIR}/bash-zzz +rm -f ${TMPDIR}/bash-zzz + +# make sure command printing puts the here-document as the last redirection +# on the line, and the function export code preserves syntactic correctness +fff() +{ + ed ${TMPDIR}/foo </dev/null +/^name/d +w +q +ENDOFINPUT +aa=1 +} + +type fff +export -f fff +${THIS_SH} -c 'type fff' + +${THIS_SH} ./heredoc1.sub + +# test heredocs in command substitutions +${THIS_SH} ./heredoc2.sub +${THIS_SH} ./heredoc3.sub +${THIS_SH} ./heredoc4.sub + +# heredoc tests that use different size documents to test pipe implementation +${THIS_SH} ./heredoc5.sub + +echo $( + cat <<< "comsub here-string" +) + +# check that end of file delimits a here-document +# THIS MUST BE LAST! + +cat << EOF +hi +there diff --git a/bash-5.1/tests/heredoc1.sub b/bash-5.1/tests/heredoc1.sub new file mode 100644 index 0000000000000000000000000000000000000000..34977c514c6b2068069fb80267734d3addca30e3 --- /dev/null +++ b/bash-5.1/tests/heredoc1.sub @@ -0,0 +1,29 @@ +# 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 . +# +foo() +{ + echo + cat <. +# +SAVEPWD=$PWD +: ${TMPDIR:=/tmp} +cd $TMPDIR || echo "heredoc3.sub: cannot cd to $TMPDIR" >&2 + +text=$(cat </dev/null & touch 'x*x' +x star x +x*x +wait $! +echo end 'x*x' +rm 'x*x' + +cat <\END' + +# gprof +if [ -n "$GMON_OUT_PREFIX" ]; then + mv ${GMON_OUT_PREFIX}.[0-9]* "$SAVEPWD" >/dev/null 2>&1 +fi +cd "$SAVEPWD" + +# this has to be last -- results in a syntax error +# doesn't currently parse because EOF is not on a line by itself -- should it? +(cat <. +# +# test here documents for sizes > 65536 (max pipe capacity I've seen), +# 4096 < size < 65536 (for smaller pipe capacities) +# 512 < size < 4096 (PIPE_BUF) +# +# There are tests in other scripts for here documents shorter than 512 bytes +# +# This should return the same results regardless of the pipe capacity + +: ${TMPDIR:=/tmp} +FILENAME=${TMPDIR}/catfile-$$ + +catfile() +{ + cat <<- EOF > $FILENAME + $(cat $1) +EOF + cmp $FILENAME $1 + rm -f $FILENAME +} + + +if [ -f $BUILD_DIR/y.tab.c ]; then + catfile $BUILD_DIR/y.tab.c +else + catfile ../y.tab.c +fi +catfile ${BUILD_DIR}/config.h +catfile ${BUILD_DIR}/version.h diff --git a/bash-5.1/tests/herestr.right b/bash-5.1/tests/herestr.right new file mode 100644 index 0000000000000000000000000000000000000000..4ac2cc65b3947a0dbabfb94bdaa2c2dc6d7cc888 --- /dev/null +++ b/bash-5.1/tests/herestr.right @@ -0,0 +1,38 @@ +alpha +beta +4 +4 + + + +abcde +yo +hot damn +what a fabulous window treatment +double"quote +onetwothree +first second third +f1 () +{ + cat <<< "abcde"; + cat <<< "yo"; + cat <<< "$a $b"; + cat <<< 'what a fabulous window treatment'; + cat <<< 'double"quote' +} +f2 () +{ + cat <<< onetwothree +} +f3 () +{ + cat <<< "$@" +} +echo $(echo hi) +echo ho +echo off to work we go +declare -a uu=([0]="" [1]="kghfjk" [2]="jkfzuk" [3]=$'i\n') +foo bar +foo bar +qux:::::bax +qux:::::bax diff --git a/bash-5.1/tests/herestr.tests b/bash-5.1/tests/herestr.tests new file mode 100644 index 0000000000000000000000000000000000000000..6f4c74c29ae278bff5853ef2efb478839e950241 --- /dev/null +++ b/bash-5.1/tests/herestr.tests @@ -0,0 +1,74 @@ +# 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 . +# +# basics +read x <<<"alpha" +echo "$x" +read x << /dev/null +a b c d +one two three four +echo two ; echo four +one two three four +echo four ; echo two +! +! +! +! +! +! +! +! +! +\! +\! +\! +\! +a +b +c +echo "#!/bin/bash" set -o posix +#!/bin/bash set -o posix +!! +!! +a +echo $(echo echo a) +echo a +a +echo echo a $(echo echo a) +echo a echo a +b +!! $(echo !!) +c +echo "echo c" "$(echo echo c)" +echo c echo c +d +echo "echo d" $(echo "echo d") +echo d echo d +e +!! !! +f +!! +f +!! +g +echo "echo g" +echo g +g +eval echo "echo g" +echo g +h +echo \!\! `echo echo h` +!! echo h +i +echo echo i `echo echo i` +echo i echo i +j +echo `echo j` echo j +j echo j +a +cat < <(echo echo a) +echo a +b +echo echo b `echo echo b` +echo b echo b +c +! +d +! +e +! ! +./histexp4.sub: line 33: !': event not found +/tmp/Step1 +echo /$(echo tmp)/Step1 +/tmp/Step1 +echo /<(echo tmp)/Step1 > /dev/null +/tmp/Step1 +echo $(echo /tmp)/Step1 +/tmp/Step1 +echo <(echo /tmp)/Step1 > /dev/null +/+(one|two|three)/Step1 +echo /+(one|two|three)/Step1 +/+(one|two|three)/Step1 +/*(tmp|dev|usr)/Step1 +echo /*(tmp|dev|usr)/Step1 +/*(tmp|dev|usr)/Step1 ++(/one|/two|/three)/Step1 +echo +(/one|/two|/three)/Step1 ++(/one|/two|/three)/Step1 +*(/tmp|/dev|/usr)/Step1 +echo *(/tmp|/dev|/usr)/Step1 +*(/tmp|/dev|/usr)/Step1 +one + echo echo one +echo one +echo one +echo one + 1 set -o histexpand + 2 echo one + 3 for f in a b c; do echo echo one; done + 4 history +two + echo echo two +echo two +echo two +echo two + 1 echo two + 2 for f in a b c; do echo echo two; done + 3 history +a +echo !! +--between-- +echo !! diff --git a/bash-5.1/tests/histexp.tests b/bash-5.1/tests/histexp.tests new file mode 100644 index 0000000000000000000000000000000000000000..91a36f23b1999f067383568f12051cc54c1be13e --- /dev/null +++ b/bash-5.1/tests/histexp.tests @@ -0,0 +1,158 @@ +# 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 . +# +LC_ALL=C +LANG=C +trap 'rm $TMPDIR/newhistory' 0 + +file=bax +histchars='!^#' # make sure history comment char is set correctly + +unset HISTFILESIZE HISTTIMEFORMAT + +history -c + +HISTFILE=history.list +HISTCONTROL=ignoreboth +HISTIGNORE='&:#*:history*:fc*' +# we will end up exercising the history stifling code as a result +HISTSIZE=32 + +shopt -s cmdhist +set -o history + +history -p '!!' + +# this should result in a failed history expansion error +history -p '!!:z' + +history + +HISTFILE=$TMPDIR/newhistory +history -a + +history -w + +history -s "echo line 2 for history" +history +history -p '!e' +history -p '!!' + +set -H +!! +!e + +history + +echo a b c d e +!?ch? +!-2 +^2^8 + +!2 + +# we're selecting /bin/sh -c ...; we want `sh' +echo !-1:0:t +# we're selecting /bin/sh -c ...; we want `/bin' +echo !-2:0:h +# we're selecting `echo a b c d e'; we want `e' +echo !?d?:5 + +echo a b c d e +echo !-1:2-$ +echo !-2:2-4 +echo !-2:3* +echo !!:* + +echo !?a?:2- + +echo file.c +echo !!:$:r +echo !-2:$:e +echo !-3:$:r:q + +echo $file.c +echo !!:$:r +echo !-2:^:e +echo !-3:$:r:q + +echo a b c d e +echo !!:1-$:x +echo !-2:1-$:q + +echo foo.c foo.o foo.html foo.h +!!:s/foo/bar/ +!-2:gs/foo/bar/ +!!:gs/bar/x&/ +!-2:g& + +# make sure we can use any delimiter in the substitution, not just `/' +!!:gs+bar+whix+ + +!!:p + +# wow +echo !?.o?:%:r:q + +!!:0 !?.h?:%:q +!!:-$ +!:-$ + +history + +# make sure single quotes inhibit history expansion +echo '!!' + +# make sure backslashes can quote the history expansion character +echo \!\! + +# but other expansions on the line should still be processed + +echo '!!' !!:* +history -c +unset HISTFILE + +# make sure that the special bash cases are not history expanded +case p in +[!A-Z]) echo ok 1;; +esac + +var1='ok 2' +var2=var1 + +echo ${!var2} + +# Bash-2.01[.1] fails this test -- it attempts history expansion after the +# history_comment_char +echo ok 3 # !1200 + +# bash versions through bash-4.3 fail this; they make the digit preceding the +# > into a separate word, changing the meaning of the redirection +shopt a b c d 2>/dev/null +echo !shopt-1 + +echo !shopt* + +# make sure a :p modifier anywhere on the line affects all history expansions +echo one two three four +echo !:2:p ; echo !$ +echo one two three four +echo !$ ; echo !:2:p + +${THIS_SH} ./histexp1.sub +${THIS_SH} ./histexp2.sub +${THIS_SH} ./histexp3.sub +${THIS_SH} ./histexp4.sub +${THIS_SH} ./histexp5.sub +${THIS_SH} ./histexp6.sub +${THIS_SH} ./histexp7.sub diff --git a/bash-5.1/tests/histexp1.sub b/bash-5.1/tests/histexp1.sub new file mode 100644 index 0000000000000000000000000000000000000000..cc2c5d1d47d7791ff25e46b12f09adb80d4ef95e --- /dev/null +++ b/bash-5.1/tests/histexp1.sub @@ -0,0 +1,36 @@ +# 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 . +# +LC_ALL=C +LANG=C + +set -o history +set -H + +echo '!' +echo "!" +echo ! + +echo "$( echo '!' )" +echo "$( echo "!" )" +echo "$( echo ! )" + +echo $( echo '!' ) +echo $( echo "!" ) +echo $( echo ! ) + +echo "$( echo "\!" )" +echo "\!" + +echo "$( echo '\!' )" +echo '\!' diff --git a/bash-5.1/tests/histexp2.sub b/bash-5.1/tests/histexp2.sub new file mode 100644 index 0000000000000000000000000000000000000000..bb5bfda4f69112fcb1047f0c895cac4ab9fa6a46 --- /dev/null +++ b/bash-5.1/tests/histexp2.sub @@ -0,0 +1,14 @@ +LANG=C LC_ALL=C + +set -o history +echo a +echo b +echo c + +set -o histexpand +set -o posix + +echo "#!/bin/bash" !! + +echo '!!' +echo "!!" diff --git a/bash-5.1/tests/histexp3.sub b/bash-5.1/tests/histexp3.sub new file mode 100644 index 0000000000000000000000000000000000000000..4962436d8d5f389487462e8a7447be036867f5c4 --- /dev/null +++ b/bash-5.1/tests/histexp3.sub @@ -0,0 +1,57 @@ +# 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 . +# +HISTFILE=${TMPDIR}/bashhist-$$ + +set -o history +set -o histexpand + +echo a +echo $(echo !!) + +echo a +echo !! $(echo !!) + +echo b +echo '!!' '$(echo !!)' + +echo c +echo "!!" "$(echo !!)" + +echo d +echo "!!" $(echo "!!") + +echo e +echo '!!' $(echo '!!') + +echo f +echo '!!' +echo f +eval echo '!!' + +echo g +echo "!!" +echo g +eval echo "!!" + +echo h +echo \!\! `echo !!` + +echo i +echo !! `echo !!` + +echo j +echo `echo j` !! + +set +o history +rm -f $HISTFILE # just in case diff --git a/bash-5.1/tests/histexp4.sub b/bash-5.1/tests/histexp4.sub new file mode 100644 index 0000000000000000000000000000000000000000..9cae0e377076e906cc2064e778d10b31066b7d62 --- /dev/null +++ b/bash-5.1/tests/histexp4.sub @@ -0,0 +1,36 @@ +# 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 . +# +HISTFILE=$TMPDIR/bashhist-$$ + +set -o history +set -o histexpand + +echo a +cat < <(echo !!) + +echo b +echo !! `echo !!` + +echo c +echo "$(echo "!" )" + +echo d +echo "$(echo '!' )" + +echo e +echo '!' "!" +echo "'!'" + +set +o history +rm -f $HISTFILE diff --git a/bash-5.1/tests/histexp5.sub b/bash-5.1/tests/histexp5.sub new file mode 100644 index 0000000000000000000000000000000000000000..9e6d01bc5b18fcff5f582de8bfd26c6cfbac8278 --- /dev/null +++ b/bash-5.1/tests/histexp5.sub @@ -0,0 +1,41 @@ +# 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 . +# +set -o history +set -o histexpand + +# command and process substitutions should be tokenized as a single word +echo /$(echo tmp)/Step1 +echo !:* +echo /<(echo tmp)/Step1 >/dev/null +echo !:* + +# same tests at the beginning of a word +echo $(echo /tmp)/Step1 +echo !:* +echo <(echo /tmp)/Step1 >/dev/null +echo !:* + +# so should shell extended glob patterns +shopt -s extglob + +echo /+(one|two|three)/Step1 +echo !:* +echo /*(tmp|dev|usr)/Step1 +echo !:* + +# same tests at the beginning of a word +echo +(/one|/two|/three)/Step1 +echo !:* +echo *(/tmp|/dev|/usr)/Step1 +echo !:* diff --git a/bash-5.1/tests/histexp6.sub b/bash-5.1/tests/histexp6.sub new file mode 100644 index 0000000000000000000000000000000000000000..d52e5ea83245ee16d282517ab7bc910afa444f4b --- /dev/null +++ b/bash-5.1/tests/histexp6.sub @@ -0,0 +1,37 @@ +# 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 . +# +unset HISTIGNORE +HISTFILE=$TMPDIR/bashhist-$$ + +set -o history +set -o histexpand + +echo one + +for f in a b c; do + echo !! +done + +history +history -c + +echo two +for f in a b c; do + echo !-1 +done + +history + +set +o history +rm -f $HISTFILE diff --git a/bash-5.1/tests/histexp7.sub b/bash-5.1/tests/histexp7.sub new file mode 100644 index 0000000000000000000000000000000000000000..8822205ef9e6772be82d736c23022c2c35a6415d --- /dev/null +++ b/bash-5.1/tests/histexp7.sub @@ -0,0 +1,18 @@ +# make sure history expansion doesn't take place while parsing command +# substitutions + +set -o history +set -o histexpand +echo a + +echo $( cat <. +# +trap 'rm $TMPDIR/newhistory' 0 + +# bad options +history -x +# cannot use -r and -w at the same time +history -r -w /dev/null + +# bad option +fc -v + +unset HISTFILESIZE + +# all of these should result in an empty history list +history -c +history -r /dev/null +history -n /dev/null +history -c + +HISTFILE=history.list +HISTCONTROL=ignoreboth +HISTIGNORE='&:history*:fc*' +HISTSIZE=32 +export HISTIGNORE + +shopt -s cmdhist +set -o history + +history + +fc -l +fc -nl + +fc -lr +fc -nlr + +history -s "echo line for history" +history + +history -p '!!' + +fc -nl + +HISTFILE=$TMPDIR/newhistory +history -a +echo displaying \$HISTFILE after history -a +cat $HISTFILE + +history +history -w +cat $HISTFILE + +history -s "echo line 2 for history" +history +history -p '!e' +history -p '!!' + +# this should show up as one history entry +for x in one two three +do + : +done +history + +# just a basic test. a full test suite for history expansion should be +# created +set -H +!! +!e + +unset HISTSIZE +unset HISTFILE + +fc -l 4 +fc -l 4 8 + +# now an out-of-range error because of the one=two not found in history +fc -l one=two three=four 502 + +history 4 + +shopt -so history +shopt -s expand_aliases + +alias r="fc -s" + +echo aa ab ac + +r a=x +r x=4 b=8 + +# this had better fail with `no command found' +r cc + +unalias -a +alias + +# these two blocks had better both result in the same output +echo aa +echo bb +echo cc +fc -e cat + +echo aa +echo bb +echo cc +fc -e cat -1 + +set +o history + +shopt -q -o history +echo $? + +${THIS_SH} ./history1.sub +rm -f $TMPDIR/foohist-* + +${THIS_SH} ./history2.sub +${THIS_SH} ./history3.sub +${THIS_SH} ./history4.sub +${THIS_SH} ./history5.sub diff --git a/bash-5.1/tests/history1.sub b/bash-5.1/tests/history1.sub new file mode 100644 index 0000000000000000000000000000000000000000..b67a0efa4ab52974958e764be469eb39ddbbcb87 --- /dev/null +++ b/bash-5.1/tests/history1.sub @@ -0,0 +1,28 @@ +# 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 . +# +trap 'rm -f $HISTFILE' 0 1 2 3 6 15 + +HISTFILE=$TMPDIR/foohist-$$ +unset HISTIGNORE HISTCONTROL +set -o history + +history -c +cat <. +# +: ${TMPDIR:=/tmp} + +set -o history +HISTFILE=$TMPDIR/history-$$ + +history -c + +echo a +echo b +echo c +echo d +echo e + +history ; echo + +history -d 2-4 + +history + +echo f +echo g +echo h +echo i +history -d 6--1 +history ; echo + +history -d 16-40 +history -d 1-200 +history -d -20-50 +history -d 1--50 +history -d 5-0xaf + +history ; echo + +unset HISTFILE +exit 0 diff --git a/bash-5.1/tests/history4.sub b/bash-5.1/tests/history4.sub new file mode 100644 index 0000000000000000000000000000000000000000..651374cf471864df3c48a3c99582aa92decc0f70 --- /dev/null +++ b/bash-5.1/tests/history4.sub @@ -0,0 +1,47 @@ +# 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 . +# +HISTFILE=$TMPDIR/newhistory-$$ +export HISTFILE + +trap 'rm -f $HISTFILE' EXIT + +HISTSIZE=32 +HISTFILESIZE=32 +echo +set -o history +history -c +echo 0 +echo 1 +echo 2 +echo "(left +mid +right)" +echo A +echo B +history -w +set +o history + +echo +printf $'HISTFILE=\n\cRleft\cO\cO\cO\cO\n' | HISTSIZE= ${THIS_SH} --norc -i 2>/dev/null +echo +printf $'HISTFILE=\n\cRleft\cO\cO\cO\cO\n' | HISTSIZE=8 ${THIS_SH} --norc -i 2>/dev/null + +input="$(cat $HISTFILE) +"$'\cP\cP\cP\cO\cO +' + +echo +printf "$input" | HISTSIZE= HISTFILE= ${THIS_SH} --norc -i 2>/dev/null +echo +printf "$input" | HISTSIZE=6 HISTFILE= ${THIS_SH} --norc -i 2>/dev/null diff --git a/bash-5.1/tests/history5.sub b/bash-5.1/tests/history5.sub new file mode 100644 index 0000000000000000000000000000000000000000..245c28d0d90fb83b7006eaf32e5139c02861e433 --- /dev/null +++ b/bash-5.1/tests/history5.sub @@ -0,0 +1,57 @@ +# 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 . +# + +trap 'rm -f "$OUT"' 0 1 2 3 6 15 + +HISTFILE=$TMPDIR/fchist-$$ ; OUT=$HISTFILE +unset HISTIGNORE HISTCONTROL +set -o history + +echo a +echo b + +fc -0 # error +fc -s -0 # error + +fc -l + +echo c +fc -l 0 +fc -l -0 + +echo d +fc -s 0 + +HISTSIZE=4 +history -c + +echo a +echo b +echo c +echo d +echo e +echo f +fc -l + +echo out of range 1 +fc -l 502 498 +echo out of range 2 +fc -l 498 502 +echo out of range 3 +fc -l 1 99 +# other out-of-range behavior for future work +echo out of range 4 +fc -l -20 -40 + +unset HISTFILE # suppress writing history file diff --git a/bash-5.1/tests/ifs-posix.right b/bash-5.1/tests/ifs-posix.right new file mode 100644 index 0000000000000000000000000000000000000000..f3bdccc6c8e89d96c58a160c7aa64d2be7fa49d3 --- /dev/null +++ b/bash-5.1/tests/ifs-posix.right @@ -0,0 +1 @@ +# tests 6856 passed 6856 failed 0 diff --git a/bash-5.1/tests/ifs-posix.tests b/bash-5.1/tests/ifs-posix.tests new file mode 100644 index 0000000000000000000000000000000000000000..21a906360b10162fc273f3bef4b63d859dfc2435 --- /dev/null +++ b/bash-5.1/tests/ifs-posix.tests @@ -0,0 +1,270 @@ +# 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 . +# +# Usage: $SHELL ifs.sh +# +# This script generates 6856 tests for the set(1) and read(1) +# builtins w.r.t. IFS whitespace and non-whitespace characters. +# Each failed test produces one line on the standard output that +# contains the test along with the expected and actual results. +# The last output line contains the test result counts. ordered>0 +# are the number of tests where IFS=": " produced different results +# than IFS=" :". If a test fails the same way for IFS=": " and +# IFS=" :" then the second output line is suppressed. + +TESTS=6856 + +ksh_read=0 +echo 1 | read ksh_read +ksh_arith=0 +eval '((ksh_arith+=1))' 2>/dev/null + +failed=0 +ordered=0 +passed=0 + +split() +{ + i=$1 s=$2 r=$3 S='' R='' + for ifs in ': ' ' :' + do IFS=$ifs + set x $i + shift + IFS=' ' + g="[$#]" + while : + do case $# in + 0) break ;; + esac + g="$g($1)" + shift + done + case $g in + "$s") case $ksh_arith in + 1) ((passed+=1)) ;; + *) passed=`expr $passed + 1` ;; + esac + case $S in + '') S=$g + ;; + "$g") ;; + *) case $ksh_arith in + 1) ((ordered+=1)) ;; + *) ordered=`expr $ordered + 1` ;; + esac + ;; + esac + ;; + "$S") case $ksh_arith in + 1) ((failed+=1)) ;; + *) failed=`expr $failed + 1` ;; + esac + ;; + *) case $ksh_arith in + 1) ((failed+=1)) ;; + *) failed=`expr $failed + 1` ;; + esac + case $s in + "$S") ;; + ?0*) echo "IFS=\"$ifs\"; x=\"$i\"; set x \$x; shift; echo \"[\$#]\" # expected \"$s\" got \"$g\"" ;; + ?1*) echo "IFS=\"$ifs\"; x=\"$i\"; set x \$x; shift; echo \"[\$#](\$1)\" # expected \"$s\" got \"$g\"" ;; + ?2*) echo "IFS=\"$ifs\"; x=\"$i\"; set x \$x; shift; echo \"[\$#](\$1)(\$2)\" # expected \"$s\" got \"$g\"" ;; + ?3*) echo "IFS=\"$ifs\"; x=\"$i\"; set x \$x; shift; echo \"[\$#](\$1)(\$2)(\$3)\" # expected \"$s\" got \"$g\"" ;; + *) echo TEST ERROR i="'$i'" s="'$s'" ;; + esac + case $S in + '') S=$g + ;; + "$g") ;; + *) case $ksh_arith in + 1) ((ordered+=1)) ;; + *) ordered=`expr $ordered + 1` ;; + esac + ;; + esac + esac + case $ksh_read in + 1) echo "$i" | IFS=$ifs read x y; g="($x)($y)" ;; + *) g=`export ifs; echo "$i" | ( IFS=$ifs; read x y; echo "($x)($y)" )` ;; + esac + case $g in + "$r") case $ksh_arith in + 1) ((passed+=1)) ;; + *) passed=`expr $passed + 1` ;; + esac + case $R in + '') R=$g + ;; + "$g") ;; + *) case $ksh_arith in + 1) ((ordered+=1)) ;; + *) ordered=`expr $ordered + 1` ;; + esac + ;; + esac + ;; + "$R") case $ksh_arith in + 1) ((failed+=1)) ;; + *) failed=`expr $failed + 1` ;; + esac + ;; + *) case $ksh_arith in + 1) ((failed+=1)) ;; + *) failed=`expr $failed + 1` ;; + esac + case $r in + "$R") ;; + *) echo "echo \"$i\" | ( IFS=\"$ifs\" read x y; echo \"(\$x)(\$y)\" ) # expected \"$r\" got \"$g\"" ;; + esac + case $R in + '') R=$g + ;; + "$g") ;; + *) case $ksh_arith in + 1) ((ordered+=1)) ;; + *) ordered=`expr $ordered + 1` ;; + esac + ;; + esac + ;; + esac + done +} + +for str in \ + '-' \ + 'a' \ + '- -' \ + '- a' \ + 'a -' \ + 'a b' \ + '- - -' \ + '- - a' \ + '- a -' \ + '- a b' \ + 'a - -' \ + 'a - b' \ + 'a b -' \ + 'a b c' \ + +do + IFS=' ' + set x $str + + shift + case $# in + 0) continue ;; + esac + + f1=$1 + case $f1 in + '-') f1='' ;; + esac + + shift + case $# in + 0) for d0 in '' ' ' + do + for d1 in '' ' ' ':' ' :' ': ' ' : ' + do + case $f1$d1 in + '') split "$d0$f1$d1" "[0]" "()()" ;; + ' ') ;; + *) split "$d0$f1$d1" "[1]($f1)" "($f1)()" ;; + esac + done + done + continue + ;; + esac + f2=$1 + case $f2 in + '-') f2='' ;; + esac + + shift + case $# in + 0) for d0 in '' ' ' + do + for d1 in ' ' ':' ' :' ': ' ' : ' + do + case ' ' in + $f1$d1|$d1$f2) continue ;; + esac + for d2 in '' ' ' ':' ' :' ': ' ' : ' + do + case $f2$d2 in + '') split "$d0$f1$d1$f2$d2" "[1]($f1)" "($f1)()" ;; + ' ') ;; + *) split "$d0$f1$d1$f2$d2" "[2]($f1)($f2)" "($f1)($f2)" ;; + esac + done + done + done + continue + ;; + esac + f3=$1 + case $f3 in + '-') f3='' ;; + esac + + shift + case $# in + 0) for d0 in '' ' ' + do + for d1 in ':' ' :' ': ' ' : ' + do + case ' ' in + $f1$d1|$d1$f2) continue ;; + esac + for d2 in ' ' ':' ' :' ': ' ' : ' + do + case $f2$d2 in + ' ') continue ;; + esac + case ' ' in + $f2$d2|$d2$f3) continue ;; + esac + for d3 in '' ' ' ':' ' :' ': ' ' : ' + do + case $f3$d3 in + '') split "$d0$f1$d1$f2$d2$f3$d3" "[2]($f1)($f2)" "($f1)($f2)" ;; + ' ') ;; + *) x=$f2$d2$f3$d3 + x=${x#' '} + x=${x%' '} + split "$d0$f1$d1$f2$d2$f3$d3" "[3]($f1)($f2)($f3)" "($f1)($x)" + ;; + esac + done + done + done + done + continue + ;; + esac +done +case $ksh_arith in +1) ((tests=passed+failed)) ;; +*) tests=`expr $passed + $failed` ;; +esac +case $ordered in +0) ordered="" ;; +*) ordered=" ordered $ordered" ;; +esac +case $tests in +$TESTS) fatal="" ;; +*) fatal=" -- fundamental IFS error -- $TESTS tests expected" +esac +echo "# tests $tests passed $passed failed $failed$ordered$fatal" diff --git a/bash-5.1/tests/ifs.right b/bash-5.1/tests/ifs.right new file mode 100644 index 0000000000000000000000000000000000000000..465efcf0e2a1b800c04a00b4d1aabe88a3b35d34 --- /dev/null +++ b/bash-5.1/tests/ifs.right @@ -0,0 +1,12 @@ +a:b:c +a:b:c +a:b:c +a b c d e +a:b:c:d:e +a b c d e +a:b:c:d:e +a:b:c:d:e +a b c d e +a b c d e +argv[1] = +argv[1] = <*> diff --git a/bash-5.1/tests/ifs.tests b/bash-5.1/tests/ifs.tests new file mode 100644 index 0000000000000000000000000000000000000000..27f27dd662a41242f6c5d8122947c132ac9ddfca --- /dev/null +++ b/bash-5.1/tests/ifs.tests @@ -0,0 +1,76 @@ +# 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 . +# +OIFS="$IFS" +IFS=":$IFS" +eval foo="a:b:c" +IFS="$OIFS" +echo $foo + +OIFS=$IFS +IFS=":$IFS" +foo=$(echo a:b:c) +IFS=$OIFS + +for i in $foo +do + echo $i +done + +OIFS=$IFS +IFS=":$IFS" +foo=`echo a:b:c` +IFS=$OIFS + +for i in $foo +do + echo $i +done + +DEFIFS=$' \t\n' + +# local copy of IFS that shadows global version +function f +{ + typeset IFS=: + + echo $1 +} + +function ff +{ + echo $1 +} + +f a:b:c:d:e +x=a:b:c:d:e +echo $x + +IFS=: ff a:b:c:d:e +echo $x + +# doesn't get word split +IFS=$DEFIFS +# variable assignment doesn't use new value for word splitting +IFS=: echo $x +# but does this time because of the eval +IFS=: eval echo \$x + +# in posix mode, assignments preceding special builtins and functions are global +set -o posix +IFS=: export x +echo $x + +IFS="$DEFIFS" + +${THIS_SH} ./ifs1.sub diff --git a/bash-5.1/tests/ifs1.sub b/bash-5.1/tests/ifs1.sub new file mode 100644 index 0000000000000000000000000000000000000000..6ea489af6fd4e900367e525f141a5ac821ef92e2 --- /dev/null +++ b/bash-5.1/tests/ifs1.sub @@ -0,0 +1,14 @@ +: ${TMPDIR:=/tmp} +dir=bashtest-$$ + +mkdir $TMPDIR/$dir || exit 1 +touch $TMPDIR/$dir/file || exit 2 +cd $TMPDIR/$dir || exit 3 + +IFS='?*[]' +recho * + +recho "*" + +cd $OLDPWD +rm -rf $TMPDIR/$dir diff --git a/bash-5.1/tests/input-line.sh b/bash-5.1/tests/input-line.sh new file mode 100644 index 0000000000000000000000000000000000000000..3f66c81723a34ac480b9c588aba23b5f436bbb56 --- /dev/null +++ b/bash-5.1/tests/input-line.sh @@ -0,0 +1,4 @@ +echo before calling input-line.sub +${THIS_SH} ./input-line.sub +this line for input-line.sub +echo finished with input-line.sub diff --git a/bash-5.1/tests/input-line.sub b/bash-5.1/tests/input-line.sub new file mode 100644 index 0000000000000000000000000000000000000000..7bc8df297b421e0ab501f6a39e2aef2873504114 --- /dev/null +++ b/bash-5.1/tests/input-line.sub @@ -0,0 +1,2 @@ +read line +echo line read by $0 was \`$line\' diff --git a/bash-5.1/tests/input.right b/bash-5.1/tests/input.right new file mode 100644 index 0000000000000000000000000000000000000000..8733febeab03ee636071fbca3a87b2bca7491883 --- /dev/null +++ b/bash-5.1/tests/input.right @@ -0,0 +1,3 @@ +before calling input-line.sub +line read by ./input-line.sub was `this line for input-line.sub' +finished with input-line.sub diff --git a/bash-5.1/tests/intl.right b/bash-5.1/tests/intl.right new file mode 100644 index 0000000000000000000000000000000000000000..7da99192dec7ee2defa09ea0487bba4821e480b3 --- /dev/null +++ b/bash-5.1/tests/intl.right @@ -0,0 +1,57 @@ +é +1 +AéB +B +B +ok 1 +ok 2 +aéb +0000000 141 303 251 142 +0000004 +-абвгдежзиклмноп - 16 +-абвгдежзиклмноп- 15 +-абвгд- 5 +1,0000 +1.0000 +1.0000 +1.0000 +1.0000 +1,0000 +1 +bytematch +0000000 254 012 +0000002 +Passed all 1378 Unicode tests +0000000 303 277 012 +0000003 +0000000 303 277 012 +0000003 +0000000 303 277 012 +0000003 +0000000 303 277 012 +0000003 +0000000 357 277 277 012 +0000004 +0000000 357 277 277 012 +0000004 +0000000 012 +0000001 +0000000 012 +0000001 +0000000 012 +0000001 +0000000 012 +0000001 +0000000 303 277 012 +0000003 +0000000 303 277 012 +0000003 +0000000 303 277 012 +0000003 +0000000 101 040 302 243 040 305 222 012 +0000010 +./unicode3.sub: line 5: $'5\247@3\231+\306S8\237\242\352\263': command not found +./unicode3.sub: line 7: cd: $'5\247@3\231+\306S8\237\242\352\263': No such file or directory +$'5\247@3\231+\306S8\237\242\352\263' ++ : $'5\247@3\231+\306S8\237\242\352\263' ++ set +x diff --git a/bash-5.1/tests/intl.tests b/bash-5.1/tests/intl.tests new file mode 100644 index 0000000000000000000000000000000000000000..c3000fc7ceeee0820f65701f77b31faabfc698ee --- /dev/null +++ b/bash-5.1/tests/intl.tests @@ -0,0 +1,68 @@ +# 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 . +# +export LC_ALL=en_US.UTF-8 + +a=$'\303\251' + +echo "$a" + +echo ${#a} + +b=$'A\303\251B' + +echo "$b" + +echo ${b: -1} + +c=AeB + +echo ${c: -1} + +unset a +a=$(printf '%b' 'A\303\251B') +IFS=$(printf '%b' '\303\251') + +case "$a" in +"A${IFS}B") echo ok 1 ;; +*) echo bad 1 ;; +esac + +set $a + +case $1 in +A) echo ok 2 ;; +*) echo bad 2 ;; +esac + +set a b + +printf '%s\n' "$*" + +. ./test-glue-functions + +printf '%s' "$*" | od -b | _intl_normalize_spaces + +# display differences make this problematic +${THIS_SH} ./intl1.sub + +# this tests both international handling in printf and temporary environments +${THIS_SH} ./intl2.sub + +# test splitting on characters instead of bytes +${THIS_SH} ./intl3.sub + +${THIS_SH} ./unicode1.sub 2>/dev/null +${THIS_SH} ./unicode2.sub + +${THIS_SH} ./unicode3.sub 2>&1 diff --git a/bash-5.1/tests/intl1.sub b/bash-5.1/tests/intl1.sub new file mode 100644 index 0000000000000000000000000000000000000000..a03648fb51b4a634b51f095569688b186e2cfd76 --- /dev/null +++ b/bash-5.1/tests/intl1.sub @@ -0,0 +1,11 @@ +LC_ALL=en_US.UTF-8 +LANG=en_US.UTF-8 + +var='абвгдежзиклмноп ' +echo -"$var"- ${#var} + +read foo <<< "$var" +echo -"$foo"- ${#foo} + +read -n 5 foo <<< "$var" +echo -"$foo"- ${#foo} diff --git a/bash-5.1/tests/intl2.sub b/bash-5.1/tests/intl2.sub new file mode 100644 index 0000000000000000000000000000000000000000..64961bcb9aa369a4f24566be5ef1b07684550d6a --- /dev/null +++ b/bash-5.1/tests/intl2.sub @@ -0,0 +1,11 @@ +unset LC_ALL LC_NUMERIC +export LANG=de_DE.UTF-8 +printf '%.4f\n' 1 + +LANG=C printf '%.4f\n' 1 +LANG=C /usr/bin/printf '%.4f\n' 1 + +env LANG=C printf '%.4f\n' 1 +(LANG=C; printf '%.4f\n' 1) + +printf '%.4f\n' 1 diff --git a/bash-5.1/tests/intl3.sub b/bash-5.1/tests/intl3.sub new file mode 100644 index 0000000000000000000000000000000000000000..56c867807125b22b291db0f2e90b6df0896bff85 --- /dev/null +++ b/bash-5.1/tests/intl3.sub @@ -0,0 +1,36 @@ +# 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 . +# +. ./test-glue-functions + +# more tests to make sure that IFS splits on characters, not bytes +export LANG=en_US.UTF-8 + +euro=$'\342\202\254' +o342=$'\342' +o202=$'\202' +o254=$'\254' + +IFS=$o254 +t=+$euro+ +set -- $t + +echo "$#" + +# but matching still occurs on bytes if we don't have a valid multibyte char +case $euro in +*$o202*) echo bytematch ;; +*) echo mbchar match ;; +esac + +echo "${euro##*$o202}" | od -b | _intl_normalize_spaces diff --git a/bash-5.1/tests/invert.right b/bash-5.1/tests/invert.right new file mode 100644 index 0000000000000000000000000000000000000000..5a9239aa6306bcf614ded88d8b72c82d1f1083b3 --- /dev/null +++ b/bash-5.1/tests/invert.right @@ -0,0 +1,10 @@ +1 +1 +1 +0 +0 +1 +0 +1 +0 +1 diff --git a/bash-5.1/tests/invert.tests b/bash-5.1/tests/invert.tests new file mode 100644 index 0000000000000000000000000000000000000000..f339d41f5f76186a650ebb3dc94191791a4cceaa --- /dev/null +++ b/bash-5.1/tests/invert.tests @@ -0,0 +1,32 @@ +# 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 . +# +# tests of return value inversion +# placeholder for future expansion + +# user subshells (...) did this wrong in bash versions before 2.04 + +! ( echo hello | grep h >/dev/null 2>&1 ); echo $? +! echo hello | grep h >/dev/null 2>&1 ; echo $? + +! true ; echo $? +! false; echo $? + +! (false) ; echo $? +! (true); echo $? + +! true | false ; echo $? +! false | true ; echo $? + +! (true | false) ; echo $? +! (false | true) ; echo $? diff --git a/bash-5.1/tests/iquote.right b/bash-5.1/tests/iquote.right new file mode 100644 index 0000000000000000000000000000000000000000..9476128c39fca721f2b0730ed570a25427174b88 --- /dev/null +++ b/bash-5.1/tests/iquote.right @@ -0,0 +1,92 @@ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <--> +argv[1] = <-^?-> +argv[1] = <> +argv[1] = <> +argv[1] = <^?> +argv[1] = <^?yy> +0x7f +0x7f +0x7f +argv[1] = <^?> +argv[1] = <^?@> +argv[1] = <@^?@> +argv[1] = <@^?> +argv[1] = <^?> +argv[1] = <^?@> +argv[1] = <@^?@> +argv[1] = <@^?> +argv[1] = <1> +argv[2] = <^?> +argv[3] = <^?> +argv[1] = <2> +argv[2] = <^?a> +argv[3] = <^?a> +argv[1] = <2> +argv[2] = <^?a> +argv[3] = <^?a> +argv[1] = <3> +argv[2] = <^?aa> +argv[3] = <^?aa> +argv[1] = <> +argv[1] = <--> +argv[1] = <--> +argv[1] = <^?> +argv[1] = <-^?-> +argv[1] = <^?> +argv[1] = <-^?-> +ok +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <^?> +argv[1] = <^? > +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?x> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?> +argv[1] = < ^?x> +argv[1] = <^?x> +argv[1] = <^?> +argv[1] = < ^? x> +argv[1] = <^? x> +argv[1] = <^? > diff --git a/bash-5.1/tests/iquote.tests b/bash-5.1/tests/iquote.tests new file mode 100644 index 0000000000000000000000000000000000000000..8411c8abf195fbd582975386ea9110607046246f --- /dev/null +++ b/bash-5.1/tests/iquote.tests @@ -0,0 +1,158 @@ +# 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 . +# +# bug in bash up to and including bash-3.0 (including patches) +# +# problem is conflict between CTLNUL used internally to denote quoted null +# characters and its value (0x7f) appearing in the expansion of a variable +# +unset x +recho "xxx${x}yyy" + +y=$'\177' +recho "xxx${y}yyy" + +unset y + +unset undef + +set "" +recho ${undef-"x$*y"} + +set $'\177' +recho ${undef-"x$*y"} + +shift $# + +f() +{ + recho "-${*-x}-" +} + +f '' +f $'\177' + +unset -f f + +x=12345 + +recho "${x:6:1}" + +x= +recho "${x:0:1}" + +y=$'\177' +recho "${y:0:1}" + +y=xxx$'\177'yyy +recho "${y:3:3}" + +unset x y + +eval tmp=`printf "$'\\\\\x%x'\n" 127` +printf "%#1x\n" "'$tmp" + +x=$'\177' +printf "%#1x\n" "'$x" + +a=127 +eval c=\$\'\\$(printf '%o' $a)\' +printf "%#1x\n" "'$c" + +recho "$c" +recho "$c"@ +recho @"$c"@ +recho @"$c" + +recho "$c" +recho "$c@" +recho "@$c@" +recho "@$c" + +unset tmp x a c + +qtest() +{ + recho ${#q} "${q}" ${q} +} + +q=$'\x7f' +qtest + +q=${q}a +qtest + +q=$'\x7fa' +qtest + +q="${q}a" +qtest + +unset -f qtest +unset q + +set -- '' +recho "${*:1}" +recho ${*:1} +recho -${*:1}- +recho -"${*:1}"- + +set $'\177' +recho "${*:1}" +recho "-${*:1}-" + +recho ${*:1} +recho -${*:1}- + +shift $# + +DEL=`awk 'END{printf("%c", 0+127)}' . +# +# Problems with variables that expand to 0x7f and quoted nulls in the same +# expansion -- affects bash versions 4.0-post 4.2 +a=x +b= +del=$'\x7f' + +set "" + +recho ${undef-"x$*y"} +recho "x$*y" +recho x"$*"y +recho x"$del"y + +recho ${undef-"$@"} +recho "$@" +recho "${@}" +recho ${undef-"$*"} +recho "$*" +recho "${*}" + +recho "$del${a#x}" +recho "$del ${a#x}" +recho " $del${a#x}" + +recho " $del$b" +recho " $del${b}" +recho " $del${b#x}" +recho " $del${a#x}" + +recho " $del${a%x}" +recho " $del${a:0:0}" +recho " $del"${a:0:0} +recho " $del""${a:0:0}" +recho " $del${a}" +recho " $del" +recho " ${del}${a:0:0}" +recho " ${del:0:1}${a:0:0}" +recho " ${del:0:1}${a}" +recho "${del:0:1}${a#d}" +recho "${del:0:1}${a#x}" +recho " ${del:0:1} ${a}" +recho "${del:0:1} ${a#d}" +recho "${del:0:1} ${a#x}" diff --git a/bash-5.1/tests/jobs.right b/bash-5.1/tests/jobs.right new file mode 100644 index 0000000000000000000000000000000000000000..5d03b76b9760faa466c1613a1357873a630eb309 --- /dev/null +++ b/bash-5.1/tests/jobs.right @@ -0,0 +1,118 @@ +./jobs2.sub: line 9: fg: job 1 started without job control +fg: 1 +Waiting for job 0 +job 0 returns 0 +Waiting for job 1 +job 1 returns 0 +Waiting for job 2 +job 2 returns 0 +Waiting for job 3 +job 3 returns 0 +Waiting for job 4 +job 4 returns 0 +Waiting for job 5 +job 5 returns 0 +Waiting for job 6 +job 6 returns 0 +Waiting for job 7 +job 7 returns 0 +[1] Running sleep 2 & +[2] Running sleep 2 & +[3] Running sleep 2 & +[4]- Running sleep 2 & +[5]+ Running ( sleep 2; exit 4 ) & +4 +0 +i killed it +12 +[1]- Running sleep 20 & +[3]+ Running sleep 20 & +5: ok 1 +./jobs5.sub: line 40: wait: %8: no such job +2: ok 2 +2: ok 3 +child1 exit status 0 +[1]+ Running sleep 20 & +./jobs7.sub: line 5: fg: no current jobs +[1]+ Running sleep 20 & +0 +./jobs.tests: line 40: wait: %1: no such job +./jobs.tests: line 45: fg: no job control +wait-for-pid +wait-errors +./jobs.tests: line 58: wait: `1-1': not a pid or valid job spec +./jobs.tests: line 59: wait: `-4': not a pid or valid job spec +wait-for-background-pids +async list wait-for-background-pids +async list wait for child +forked +wait-when-no-children +posix jobs output +[1]+ Done sleep 1 +wait-for-job +./jobs.tests: line 84: wait: %2: no such job +127 +async list wait-for-job +forked +fg-bg 1 +sleep 2 +fg-bg 2 +sleep 2 +fg-bg 3 +sleep 2 +fg-bg 4 +sleep 2 +fg-bg 5 +./jobs.tests: line 111: fg: %2: no such job +./jobs.tests: line 112: bg: job 1 already in background +fg-bg 6 +./jobs.tests: line 119: fg: -s: invalid option +fg: usage: fg [job_spec] +./jobs.tests: line 120: bg: -s: invalid option +bg: usage: bg [job_spec ...] +./jobs.tests: line 125: disown: -s: invalid option +disown: usage: disown [-h] [-ar] [jobspec ... | pid ...] +./jobs.tests: line 129: disown: %1: no such job +./jobs.tests: line 132: disown: %2: no such job +wait-for-non-child +./jobs.tests: line 135: wait: pid 1 is not a child of this shell +127 +3 -- 1 2 3 -- 1 - 2 - 3 +[1] Running sleep 300 & +[2]- Running sleep 350 & +[3]+ Running sleep 400 & +running jobs: +[1] Running sleep 300 & +[2]- Running sleep 350 & +[3]+ Running sleep 400 & +./jobs.tests: line 152: kill: %4: no such job +./jobs.tests: line 154: jobs: %4: no such job +current job: +[3]+ Running sleep 400 & +previous job: +[2]- Running sleep 350 & +after kill -STOP +running jobs: +[1] Running sleep 300 & +[3]- Running sleep 400 & +stopped jobs: +[2]+ Stopped sleep 350 +after disown +[2]+ Stopped sleep 350 +[3]- Running sleep 400 & +running jobs: +[3]- Running sleep 400 & +stopped jobs: +[2]+ Stopped sleep 350 +after kill -s CONT +running jobs: +[2]+ Running sleep 350 & +[3]- Running sleep 400 & +stopped jobs: +after kill -STOP, backgrounding %3: +[3]+ sleep 400 & +killing... +done +after KILL -STOP, foregrounding %1 +sleep 4 +done diff --git a/bash-5.1/tests/jobs.tests b/bash-5.1/tests/jobs.tests new file mode 100644 index 0000000000000000000000000000000000000000..dacdc15d008b98b33735df1a1a87cc567fe1a301 --- /dev/null +++ b/bash-5.1/tests/jobs.tests @@ -0,0 +1,209 @@ +# 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 . +# +# test out %+, jobs -p, and $! agreement in a subshell first +${THIS_SH} ./jobs1.sub + +# test out fg/bg failure in a subshell +${THIS_SH} ./jobs2.sub + +# test out behavior of waiting for background pids -- bug in versions +# before 2.03 +${THIS_SH} ./jobs3.sub + +# test out behavior of using job control notation when job control is not +# active +${THIS_SH} ./jobs4.sub + +# test out wait -n framework +${THIS_SH} ./jobs5.sub + +# test out wait -f framework +${THIS_SH} ./jobs6.sub + +${THIS_SH} ./jobs7.sub + +jobs +echo $? + +# a no-such-job error, since we can use job control notation without job control +wait %1 + +# make sure we can't fg a job started when job control was not active +sleep 30 & +pid=$! +fg %1 +# make sure the killed processes don't cause a message +exec 5>&2 +exec 2>/dev/null +kill -n 9 $pid +wait # make sure we reap the processes while stderr is still redirected +exec 2>&5 + +echo wait-for-pid +sleep 4 & +wait $! + +echo wait-errors +wait 1-1 +wait -- -4 + +echo wait-for-background-pids +sleep 2 & +sleep 4 & +wait + +echo async list wait-for-background-pids +sleep 2 & sleep 4 & +wait + +echo async list wait for child +sleep 2 & echo forked +wait + +echo wait-when-no-children +wait + +echo posix jobs output +${THIS_SH} -o posix -c 'sleep 1 & P=$! ; sleep 2; jobs; wait' + +set -m + +echo wait-for-job +sleep 3 & +wait %2 # this should be a no-such-job error +echo $? +wait %1 + +echo async list wait-for-job +sleep 2 & echo forked +wait %1 + +echo fg-bg 1 +sleep 2 & +%1 + +echo fg-bg 2 +sleep 2 & +fg %% + +echo fg-bg 3 +sleep 2 & +fg %s + +echo fg-bg 4 +sleep 2 & +fg %?ee + +# these next two are error cases +echo fg-bg 5 +sleep 2 & +fg %2 # this should be a no-such-job error +bg %1 # this should be a `bg background job?' error +wait + +# these may someday mean to start the jobs, but not print the line +# describing the status, but for now they are errors +echo fg-bg 6 +sleep 2 & +fg -s %1 +bg -s %1 +wait + +# someday this may mean to disown all stopped jobs, but for now it is +# an error +disown -s + +# this is an error -- the job with the pid that is the value of $! is +# retained only until a `wait' is performed +disown %1 + +# this, however, is an error +disown %2 + +echo wait-for-non-child +wait 1 +echo $? + +exit 1 | exit 2 | exit 3 +echo $? -- ${PIPESTATUS[@]} -- ${PIPESTATUS[0]} - ${PIPESTATUS[1]} - ${PIPESTATUS[2]} + +sleep 300 & +sleep300pid=$! +sleep 350 & +sleep 400 & + +jobs + +echo running jobs: +jobs -r + +# should be an error +kill -n 1 %4 +# should be an error +jobs %4 +echo current job: +jobs %+ +echo previous job: +jobs %- + +kill -STOP %2 +sleep 3 # give time for the shell to get the stop notification +echo after kill -STOP +echo running jobs: +jobs -r +echo stopped jobs: +jobs -s + +disown %1 + +echo after disown +jobs +echo running jobs: +jobs -r +echo stopped jobs: +jobs -s + +kill -s CONT %2 +echo after kill -s CONT +echo running jobs: +jobs -r +echo stopped jobs: +jobs -s + +kill -STOP %3 +sleep 3 # give time for the shell to get the stop notification +echo after kill -STOP, backgrounding %3: +bg %3 + +disown -h %2 + +# make sure the killed processes don't cause a message +exec 5>&2 +exec 2>/dev/null + +echo killing... +kill -n 9 $sleep300pid +kill -n 9 %2 %3 +wait # make sure we reap the processes while stderr is still redirected +echo done + +exec 2>&5 + +sleep 4 & +kill -STOP %1 +sleep 2 # give time for the shell to get the stop notification +echo after KILL -STOP, foregrounding %1 +fg %1 + +echo done diff --git a/bash-5.1/tests/jobs1.sub b/bash-5.1/tests/jobs1.sub new file mode 100644 index 0000000000000000000000000000000000000000..84919d9bda98226e0b8ecbb588ade9082988a79f --- /dev/null +++ b/bash-5.1/tests/jobs1.sub @@ -0,0 +1,30 @@ +# 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 . +# +# make sure that jobs -p, %+, and $! all agree +set -m +sleep 60 & + +FN=$TMPDIR/jobs-pid.$$ + +pid1=$! +jobs -p %+ > $FN +pid2=$(< $FN) +rm $FN + +if [ $pid1 -ne $pid2 ]; then + echo 'oops - $! and jobs -p %+ disagree!' +fi + +exec 2>/dev/null +kill -9 $pid1 diff --git a/bash-5.1/tests/jobs2.sub b/bash-5.1/tests/jobs2.sub new file mode 100644 index 0000000000000000000000000000000000000000..496519b01bb2c0d0b82201a3a23a5d380d814551 --- /dev/null +++ b/bash-5.1/tests/jobs2.sub @@ -0,0 +1,13 @@ +# make sure fg and bg don't work on jobs started without job control, +# even if they are executed when job control is active +set +o monitor + +sleep 30 & +pid=$! + +set -m +fg %1 +echo fg: $? + +exec 2>/dev/null +kill -9 $pid diff --git a/bash-5.1/tests/jobs3.sub b/bash-5.1/tests/jobs3.sub new file mode 100644 index 0000000000000000000000000000000000000000..1337fc12ba35f5f89a8643c8ee7c3601badd5f53 --- /dev/null +++ b/bash-5.1/tests/jobs3.sub @@ -0,0 +1,39 @@ +# 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 . +# + +NJOB=8 +i=0 + +while [ $i -lt $NJOB ] +do + /bin/sh -c "sleep 4; exit 0" & + rv=$? + pid=$! + eval bg_pid_$i=$pid +# echo $$: Job $i: pid is $pid rv=$rv + i=$((i + 1)) +done + + + +i=0 +while [ $i -lt $NJOB ] +do + eval wpid=\$bg_pid_$i + echo Waiting for job $i #'('pid $wpid')' + wait $wpid + rv=$? + echo job $i returns $rv + i=$((i + 1)) +done diff --git a/bash-5.1/tests/jobs4.sub b/bash-5.1/tests/jobs4.sub new file mode 100644 index 0000000000000000000000000000000000000000..7ecd7123a2c8a24a93d19edbbc64846b8b0e5ed6 --- /dev/null +++ b/bash-5.1/tests/jobs4.sub @@ -0,0 +1,37 @@ +# 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 . +# +# test being able to use job control notation in jobs/kill/wait without +# job control active, as the SUS requires + +sleep 2 & + +sleep 2 & +sleep 2 & +sleep 2 & +(sleep 2 ; exit 4) & + +jobs + +wait %% +echo $? + +wait %1 +echo $? + +wait + +# the sleep is intended to give the kill time to execute before the job +# exits +(sleep 1 ; cat ) & +kill -1 %% && echo i killed it || echo could not kill it diff --git a/bash-5.1/tests/jobs5.sub b/bash-5.1/tests/jobs5.sub new file mode 100644 index 0000000000000000000000000000000000000000..e6ffb44e6a945a3983256596e9e61dac31dc35eb --- /dev/null +++ b/bash-5.1/tests/jobs5.sub @@ -0,0 +1,61 @@ +# 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 . +# + +# framework to test new `wait -n' option that waits for any job to finish + +set -m + +sleep 20 & +{ sleep 2; exit 12; } & +sleep 20 & + +wait -n +echo $? + +jobs +disown -a + +{ sleep 1 ; exit 4; } & +{ sleep 2 ; exit 5; } & bgpid1=$! +{ sleep 4 ; exit 6; } & + +wait -p wvar -n %2 %3 +case "$wvar" in +$bgpid1) echo $?: ok 1;; +*) echo bad 1;; +esac + +{ sleep 1 ; exit 2; } & bgpid2=$! +wait -p wvar -n %8 $! +case $wvar in +$bgpid2) echo $?: ok 2;; +*) echo bad 2;; +esac + +disown -a + +{ sleep 3; exit 1; } & { sleep 1; exit 2; } & bgpid3=$! +{ sleep 3; exit 3; } & { sleep 3; exit 4; } & + +wait -n -p wpid %1 %2 %3 %4 + +case $wpid in +$bgpid3) echo $?: ok 3;; +*) echo bad 3 ;; +esac + +disown -a + +unset bgpid1 bgpid2 bgpid3 +unset wpid diff --git a/bash-5.1/tests/jobs6.sub b/bash-5.1/tests/jobs6.sub new file mode 100644 index 0000000000000000000000000000000000000000..9ed59ee5b6f7d40e55c62bef31feb7d1485c835d --- /dev/null +++ b/bash-5.1/tests/jobs6.sub @@ -0,0 +1,14 @@ +# framework to test `wait -f' which forces wait until a job exits +set -o monitor +sleep 5 & +child1=$! + +( sleep 1; kill -STOP $child1 ; sleep 1 ; kill -CONT $child1 )& + +child2=$! + +wait -f %1 +echo child1 exit status $? + +wait $child2 +exit 0 diff --git a/bash-5.1/tests/jobs7.sub b/bash-5.1/tests/jobs7.sub new file mode 100644 index 0000000000000000000000000000000000000000..3e76db37b52cf15488307ab4f62016081ebf19af --- /dev/null +++ b/bash-5.1/tests/jobs7.sub @@ -0,0 +1,6 @@ +# make sure fg in a subshell doesn't try to start a parent's job +set -m +sleep 20 & +echo $(jobs) +echo $(fg %% ; jobs) +kill %1 diff --git a/bash-5.1/tests/lastpipe.right b/bash-5.1/tests/lastpipe.right new file mode 100644 index 0000000000000000000000000000000000000000..cca5938d810c5951e200ae1eb316a9b8d538ac41 --- /dev/null +++ b/bash-5.1/tests/lastpipe.right @@ -0,0 +1,20 @@ +after 1: foo = a b c +after 2: tot = 6 +after: 7 +last = c +1 -- 142 1 +0 -- 0 1 0 +1 -- 0 0 1 +1 -- 0 0 1 +1 -- 0 1 0 +lastpipe1.sub returns 14 +A1 +A2 +B1 +B2 +HI +A1 +A2 +B1 +B2 +HI -- 42 -- 0 42 diff --git a/bash-5.1/tests/lastpipe.tests b/bash-5.1/tests/lastpipe.tests new file mode 100644 index 0000000000000000000000000000000000000000..775e81dd2cf23f44a8ccc03bcea425bdda90c959 --- /dev/null +++ b/bash-5.1/tests/lastpipe.tests @@ -0,0 +1,73 @@ +# 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 . +# +binfalse() +{ + $binfalse || return 1 # normalize return value +} + +if [ -x /usr/bin/true ]; then + bintrue=/usr/bin/true +elif [ -x /bin/true ]; then + bintrue=/bin/true +else + bintrue=true +fi +if [ -x /usr/bin/false ]; then + binfalse=/usr/bin/false +elif [ -x /bin/false ]; then + binfalse=/bin/false +else + binfalse=false +fi + +shopt -s lastpipe + +unset foo bar +echo a b c | read foo +echo after 1: foo = $foo + +unset tot +declare -i tot +printf "%d\n" 1 2 3 | while read foo; do tot+=$foo; done +echo after 2: tot = $tot + +unset bar +echo g h i | bar=7 +echo after: $bar + +unset foo last +printf "%s\n" a b c | while read foo; do last=$foo; done +echo last = $last + +exit 142 | false +echo $? -- ${PIPESTATUS[@]} + +true | false | $bintrue +echo $? -- ${PIPESTATUS[@]} + +true | $bintrue | false +echo $? -- ${PIPESTATUS[@]} + +set -o pipefail +true | $bintrue | false +echo $? -- ${PIPESTATUS[@]} + +true | binfalse | true +echo $? -- ${PIPESTATUS[@]} +set +o pipefail + +${THIS_SH} ./lastpipe1.sub +echo lastpipe1.sub returns $? + +${THIS_SH} ./lastpipe2.sub diff --git a/bash-5.1/tests/lastpipe1.sub b/bash-5.1/tests/lastpipe1.sub new file mode 100644 index 0000000000000000000000000000000000000000..43711e37e2780322993c30af002be172316257f6 --- /dev/null +++ b/bash-5.1/tests/lastpipe1.sub @@ -0,0 +1,5 @@ +# with lastpipe set, exit at the end of a pipeline exits +# the calling shell +shopt -s lastpipe +exit 142 | exit 14 +echo after: $? diff --git a/bash-5.1/tests/lastpipe2.sub b/bash-5.1/tests/lastpipe2.sub new file mode 100644 index 0000000000000000000000000000000000000000..a4602863dae47a3bf8e1be4c08427a4971214d7c --- /dev/null +++ b/bash-5.1/tests/lastpipe2.sub @@ -0,0 +1,43 @@ +# 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 . +# +shopt -s lastpipe +echo -e 'A\nB' | while read letter; do + echo -e '1\n2' | while read digit; do + echo $letter$digit + done +done + +myPipefunc() +{ + cat | tee $TMPDIR/outfile +} +echo HI | myPipefunc + +echo -e 'A\nB' | while read letter; do + echo -e '1\n2' | while read digit; do + echo $letter$digit | myPipefunc + done +done + +rm -f $TMPDIR/outfile + +unset -f myPipefunc +myPipefunc() +{ + cat | read var + return 42 +} +echo HI | myPipefunc + +echo $var -- $? -- ${PIPESTATUS[@]} diff --git a/bash-5.1/tests/mapfile.data b/bash-5.1/tests/mapfile.data new file mode 100644 index 0000000000000000000000000000000000000000..4f1d3cecb091225e9d40185e7133ab4c2a8abfda --- /dev/null +++ b/bash-5.1/tests/mapfile.data @@ -0,0 +1,17 @@ +[0] Abcdefghijklmnop +[1] aBcdefghijklmnop +[2] abCdefghijklmnop +[3] abcDefghijklmnop +[4] abcdEfghijklmnop +[5] abcdeFghijklmnop +[6] abcdefGhijklmnop +[7] abcdefgHijklmnop +[8] abcdefghIjklmnop +[9] abcdefghiJklmnop +[a] abcdefghijKlmnop +[b] abcdefghijkLmnop +[c] abcdefghijklMnop +[d] abcdefghijklmNop +[e] abcdefghijklmnOp +[f] abcdefghijklmnoP +a \ No newline at end of file diff --git a/bash-5.1/tests/mapfile.right b/bash-5.1/tests/mapfile.right new file mode 100644 index 0000000000000000000000000000000000000000..143d6ddc1113b7398408af95a1d4a27257fc1a03 --- /dev/null +++ b/bash-5.1/tests/mapfile.right @@ -0,0 +1,169 @@ +[0] Abcdefghijklmnop +[1] aBcdefghijklmnop +[2] abCdefghijklmnop +[3] abcDefghijklmnop +[4] abcdEfghijklmnop +[5] abcdeFghijklmnop +[6] abcdefGhijklmnop +[7] abcdefgHijklmnop +[8] abcdefghIjklmnop +[9] abcdefghiJklmnop +[a] abcdefghijKlmnop +[b] abcdefghijkLmnop +[c] abcdefghijklMnop +[d] abcdefghijklmNop +[e] abcdefghijklmnOp +[f] abcdefghijklmnoP +a[0] Abcdefghijklmnop +[1] aBcdefghijklmnop +[2] abCdefghijklmnop +[3] abcDefghijklmnop +[4] abcdEfghijklmnop +[5] abcdeFghijklmnop +[6] abcdefGhijklmnop +[7] abcdefgHijklmnop +[8] abcdefghIjklmnop +[9] abcdefghiJklmnop +[a] abcdefghijKlmnop +[b] abcdefghijkLmnop +[c] abcdefghijklMnop +[d] abcdefghijklmNop +[e] abcdefghijklmnOp +[f] abcdefghijklmnoP +a +0 [0] Abcdefghijklmnop + +1 [1] aBcdefghijklmnop + +2 [2] abCdefghijklmnop + +3 [3] abcDefghijklmnop + +4 [4] abcdEfghijklmnop + +5 [5] abcdeFghijklmnop + +6 [6] abcdefGhijklmnop + +7 [7] abcdefgHijklmnop + +8 [8] abcdefghIjklmnop + +9 [9] abcdefghiJklmnop + +10 [a] abcdefghijKlmnop + +11 [b] abcdefghijkLmnop + +12 [c] abcdefghijklMnop + +13 [d] abcdefghijklmNop + +14 [e] abcdefghijklmnOp + +15 [f] abcdefghijklmnoP + +16 a +2 [2] abCdefghijklmnop + +5 [5] abcdeFghijklmnop + +8 [8] abcdefghIjklmnop + +11 [b] abcdefghijkLmnop + +14 [e] abcdefghijklmnOp + +[0] Abcdefghijklmnop +[1] aBcdefghijklmnop +[2] abCdefghijklmnop +[3] abcDefghijklmnop +[4] abcdEfghijklmnop +[5] abcdeFghijklmnop +[6] abcdefGhijklmnop +[7] abcdefgHijklmnop +[8] abcdefghIjklmnop +[9] abcdefghiJklmnop +[a] abcdefghijKlmnop +[b] abcdefghijkLmnop +[c] abcdefghijklMnop +[d] abcdefghijklmNop +[e] abcdefghijklmnOp +[f] abcdefghijklmnoP +a +[0] aaa +[1] aaa +[2] aaa +[3] aaa +[4] aaa +[5] aaa +[6] aaa +[7] aaa +[8] aaa +[9] aaa +[0] Abcdefghijklmnop +[1] aBcdefghijklmnop +[2] abCdefghijklmnop +[3] abcDefghijklmnop +[4] abcdEfghijklmnop +[5] abcdeFghijklmnop +[6] abcdefGhijklmnop +[7] abcdefgHijklmnop +[8] abcdefghIjklmnop +[9] abcdefghiJklmnop +[a] abcdefghijKlmnop +[b] abcdefghijkLmnop +[c] abcdefghijklMnop +[d] abcdefghijklmNop +[e] abcdefghijklmnOp +[f] abcdefghijklmnoP +a +[27] aaa +[28] aaa +[29] aaa +[0] aaa +[1] aaa +[2] aaa +[3] aaa +[4] aaa +[5] aaa +[6] aaa +[7] aaa +[8] aaa +[9] aaa +[0] Abcdefghijklmnop +[1] aBcdefghijklmnop +[2] abCdefghijklmnop +[3] abcDefghijklmnop +[4] abcdEfghijklmnop +[15] aaa +[16] aaa +[17] aaa +[18] aaa +[19] aaa +[20] aaa +[21] aaa +[22] aaa +[23] aaa +[24] aaa +[25] aaa +[26] aaa +[27] aaa +[28] aaa +[29] aaa +1 2 3 4 5 +foo 0 1 + +foo 1 2 + +foo 2 3 + +foo 3 4 + +foo 4 5 + +0 abc +1 def +2 ghi +3 jkl +abc def ghi jkl diff --git a/bash-5.1/tests/mapfile.tests b/bash-5.1/tests/mapfile.tests new file mode 100644 index 0000000000000000000000000000000000000000..01f1f2e553c72bd53b0e4d176757c9527a7d8e72 --- /dev/null +++ b/bash-5.1/tests/mapfile.tests @@ -0,0 +1,57 @@ +# 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 . +# +declare -a A +mapfile A < mapfile.data +for (( i = 0 ; i < ${#A[@]} ; i++ )); do + echo -n "${A[${i}]}" +done + +declare -a B +mapfile -t B < mapfile.data +for (( i = 0 ; i < ${#B[@]} ; i++ )); do + echo "${B[${i}]}" +done + +mapfile -C "echo" -c 1 A < mapfile.data +mapfile -C "echo" -c 3 A < mapfile.data +mapfile -C "echo" -c 19 A < mapfile.data + +declare -a C +mapfile -t -u 3 C 3< mapfile.data < mapfile.tests +for (( i = 0 ; i < ${#C[@]} ; i++ )); do + echo "${C[${i}]}" +done + + +declare -a D +for (( i = 0 ; i < 30; i++ )); do + D[${i}]="[$i] aaa" +done +mapfile -O 10 -t D < mapfile.data +for (( i = 0 ; i < ${#D[@]} ; i++ )); do + echo "${D[${i}]}" +done + +declare -a E +for (( i = 0 ; i < 30; i++ )); do + E[${i}]="[$i] aaa" +done +mapfile -O 10 -n 5 -t E < mapfile.data +for (( i = 0 ; i < ${#E[@]} ; i++ )); do + echo "${E[${i}]}" +done + +${THIS_SH} ./mapfile1.sub + +${THIS_SH} ./mapfile2.sub diff --git a/bash-5.1/tests/mapfile1.sub b/bash-5.1/tests/mapfile1.sub new file mode 100644 index 0000000000000000000000000000000000000000..b3d77f94da9a699c29b4ea2bea6aa169c26e0c15 --- /dev/null +++ b/bash-5.1/tests/mapfile1.sub @@ -0,0 +1,11 @@ +: ${TMPDIR:=/tmp} +FILE=$TMPDIR/file + +trap 'rm -f $FILE' 0 1 2 3 6 15 +printf "%d\n" {1..20} > $FILE + +mapfile -n 5 array < $FILE +echo ${array[@]} + +mapfile -n 5 -c 1 -C "echo foo" array < $FILE +mapfile -n 5 -c 1 -C "echo foo" array < /dev/null diff --git a/bash-5.1/tests/mapfile2.sub b/bash-5.1/tests/mapfile2.sub new file mode 100644 index 0000000000000000000000000000000000000000..771a992974060d8b73f14fb1d8adab8d6a5fee67 --- /dev/null +++ b/bash-5.1/tests/mapfile2.sub @@ -0,0 +1,6 @@ +# test mapfile -d DELIM functionality added after bash-4.3 + +printf "abc\0def\0ghi\0jkl\0" | { + mapfile -C echo -c 1 -d '' A + echo "${A[@]}" +} diff --git a/bash-5.1/tests/misc/dev-tcp.tests b/bash-5.1/tests/misc/dev-tcp.tests new file mode 100644 index 0000000000000000000000000000000000000000..0f3a2281dc6a076ef165f155586af2fc9c3ddb0d --- /dev/null +++ b/bash-5.1/tests/misc/dev-tcp.tests @@ -0,0 +1,16 @@ +exec 9<>/dev/tcp/129.22.8.162/25 + +read banner <&9 +echo "$banner" + +echo quit >&9 + +read msg <&9 +echo "$msg" + +exec 9<&- + +# nifty date command that queries the date/time server +cat < /dev/tcp/129.22.8.102/13 + +exit 0 diff --git a/bash-5.1/tests/misc/perf-script b/bash-5.1/tests/misc/perf-script new file mode 100644 index 0000000000000000000000000000000000000000..e1172a9df4168709de8bcf3ddc48978a26ee05c8 --- /dev/null +++ b/bash-5.1/tests/misc/perf-script @@ -0,0 +1,81 @@ +#!/bin/bash + +typeset -i m2 m1 M n2 n1 N m n +typeset -i MM=5 NN=5 + +case $# in + 0) : + ;; + 1) MM=$1; NN=$1 + ;; + 2) MM=$1; NN=$2 + ;; + *) echo 1>&2 "Usage: $0 [m [n]]" + ;; +esac + +EMPTYLINE=: # echo +echo 'a = { ' # mathematica + +let "M=1" # for (M=1; M<=MM; M++) +while let "M <= MM"; do + let "N=1" # for (N=1; N<=NN; N++) + while let "N <= NN"; do + + let "m1 = M - 1" + let "m2 = M + 1" + let "n1 = N - 1" + let "n2 = N + 1" + + + echo -n '{ ' # math + let "m=1" # for(m=1; m<=MM; m++) + while let "m <= MM"; do + let "n=1" # for(n=1; n<=NN; n++) + while let "n <= NN"; do + + let "x = (m-m1)*(m-M)*(m-m2)" + let "y = (n-n1)*(n-N)*(n-n2)" + + if let "(x*x + (n-N)*(n-N)) * ((m-M)*(m-M) + y*y)"; then + echo -n "0," + else # neighbour + echo -n "1," + fi + + let "n=n+1" + done + echo -n " "; let "m=m+1" # ". " + done + echo '},' + + + let "N=N+1" + $EMPTYLINE + done + $EMPTYLINE + let "M=M+1" +done + +echo '}' + + + +echo -n 'o = { ' +let "m=1" +while let "m <= MM"; do + let "n=1" + while let "n <= NN"; do + echo -n "1," + let "n=n+1" + done + let "m=m+1" +done +echo " }" + + +echo 'x = LinearSolve[a,o] ' + +exit 0 + + diff --git a/bash-5.1/tests/misc/perftest b/bash-5.1/tests/misc/perftest new file mode 100644 index 0000000000000000000000000000000000000000..ee3f2c66a1038af50390d6c78fcf644d05187a43 --- /dev/null +++ b/bash-5.1/tests/misc/perftest @@ -0,0 +1,10 @@ +# originally from Mike Haertel +foo() { case $1 in a*) ;; *) ;; esac ;} +bar() { case $1 in [abc]*) ;; *);; esac ;} +baz() { case $1 in xyzzy) ;; *) ;; esac ;} +for x in /usr/lib/*/* +do + foo $x + bar $x + baz $x +done diff --git a/bash-5.1/tests/misc/read-nchars.tests b/bash-5.1/tests/misc/read-nchars.tests new file mode 100644 index 0000000000000000000000000000000000000000..40b1f982a5b0fa51151f4d0d6a0bc270e71a35a7 --- /dev/null +++ b/bash-5.1/tests/misc/read-nchars.tests @@ -0,0 +1,11 @@ +# interactive + +# from tty +read -n 3 -p 'enter three chars: ' xyz +echo +echo $xyz + +# using readline +read -p 'enter 3 chars: ' -e -n 3 abc +# readline outputs a newline for us, so we don't need the extra echo +echo $abc diff --git a/bash-5.1/tests/misc/redir-t2.sh b/bash-5.1/tests/misc/redir-t2.sh new file mode 100644 index 0000000000000000000000000000000000000000..44b2624ee8e9d756cb1ddef09668747964ce7a3e --- /dev/null +++ b/bash-5.1/tests/misc/redir-t2.sh @@ -0,0 +1,17 @@ +read line1 + +echo read line 1 \"$line1\" + +exec 4<&0 + +exec 0 +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[1] = <~> +argv[1] = <~> +argv[1] = <\~> +argv[1] = <\ \~> +argv[1] = <\ \ \~> +argv[1] = +argv[1] = +argv[1] = +argv[1] = <$HOME> +argv[1] = <\ $HOME> +argv[1] = <\ \ $HOME> +argv[1] = <'bar'> +argv[1] = <'bar'> +argv[1] = <*@> +argv[1] = <*@> +argv[1] = <*@> +argv[1] = <*@> +argv[1] = <*@*> +argv[1] = <*@*> +argv[1] = <*@*> +argv[1] = <*@*> +argv[1] = +argv[1] = +argv[1] = <4> +argv[2] = <2> +argv[1] = <1> +argv[1] = +argv[1] = <2> +argv[1] = +argv[1] = <2> +argv[1] = <4> +argv[1] = <--\> +argv[2] = <--> +argv[1] = <--\^J--> +argv[1] = <--+\> +argv[2] = <+--> +argv[1] = <--+\^J+--> +argv[1] = <-+\> +argv[2] = <+-\> +argv[3] = <-> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <> +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <> +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <^?> +argv[1] = <^?> +argv[1] = +argv[1] = +argv[1] = <> +argv[2] = +argv[3] = +argv[1] = <> +argv[2] = +argv[3] = <> +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +./more-exp.tests: line 285: abc=def: command not found +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[1] = +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\\a> +argv[1] = +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\\a> +argv[1] = +argv[1] = +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <$a> +argv[1] = <\foo> +argv[1] = <$a> +argv[1] = <\foo> +argv[1] = <\$a> +argv[1] = <\\$a> +argv[1] = +argv[1] = +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\a> +argv[1] = <\a> +argv[1] = +argv[2] = <{> +argv[3] = +argv[4] = +argv[5] = <}> +argv[1] = +argv[2] = +argv[3] = <}> +argv[1] = +Number of args: 0 +<${*-x}>: +<${@-x}>: +Number of args: 1 +<${*-x}>: <> +<${@-x}>: <> +Number of args: 2 +<${*-x}>: < > +<${@-x}>: < > +argv[1] = <5> +argv[1] = <5> +argv[1] = <5> +argv[1] = <5> +argv[1] = <5> +argv[1] = <0> +argv[1] = <0> +argv[1] = <0> +argv[1] = <0> +argv[1] = <0> +argv[1] = <0> +argv[1] = +argv[1] = +argv[1] = <2> +argv[1] = <0> +argv[1] = <0> +argv[1] = <1> +argv[1] = <5> +argv[1] = <5> +argv[1] = <0> +./more-exp.tests: line 436: ${#:}: bad substitution +./more-exp.tests: line 438: ${#/}: bad substitution +./more-exp.tests: line 440: ${#%}: bad substitution +./more-exp.tests: line 442: ${#=}: bad substitution +./more-exp.tests: line 444: ${#+}: bad substitution +./more-exp.tests: line 446: ${#1xyz}: bad substitution +./more-exp.tests: line 449: #: %: syntax error: operand expected (error token is "%") +argv[1] = <0> +argv[1] = +argv[1] = <+> +argv[1] = <+> +argv[1] = <+> +argv[1] = +argv[2] = +argv[3] = <}> +argv[1] = +argv[2] = +argv[3] = <}> +argv[1] = +argv[2] = +1 +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <:a:> +argv[1] = <:b:> +argv[1] = <> +argv[1] = <> diff --git a/bash-5.1/tests/more-exp.tests b/bash-5.1/tests/more-exp.tests new file mode 100644 index 0000000000000000000000000000000000000000..df12b9985b09661afbf6535f19233deefe332944 --- /dev/null +++ b/bash-5.1/tests/more-exp.tests @@ -0,0 +1,517 @@ +# 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 . +# +expect() +{ + echo expect "$@" +} + +tool_var() { + eval $1=\"\${$1:-$2}\" + export $1 +} + +A="aaa bbb ccc" + +unset B + +tool_var B ${B:-"$A"} + +expect '' +recho "$A" +expect '' +recho "$B" + +eto_prepend() { + eval $1=\'$2\''${'$1':+":"${'$1'}}'; export $1 +} + +foo=bar; export foo +eto_prepend foo baz +expect '' +recho $foo +expect '' +recho ${foo-"bar"} + +aa='aaa bbb ccc' + +expect '' +recho ${zzz-"$aa"} +expect '' +recho ${zzz:-"bar"} +expect '' +recho "${zzz:-bar}" +expect '' +recho "${zzz:-"bar"}" + +var=abcde +expect '' +recho "${var:-xyz}" +expect '' +recho "${var:=xyz}" +expect '' +recho "${var:+xyz}" + +set 'a b' c d e f +expect ' ' +recho ${1+"$@"} +expect '' +recho "${1-"$@"}" +expect ' ' +recho ${1-"$@"} +expect ' ' +recho "${1+$@}" +expect ' ' +recho "${1+"$@"}" + +HOME=/usr/homes/chet +somevar= +expect "<$HOME>" +recho ${somevar:-~} +# This changed after bash-3.0, when the tilde implementation was redone. It's +# not backward compatible, but it's very hard to be backward-compatible here, +# and I think the old behavior was a bug +expect '<~>' +recho "${somevar:-~}" +expect '<~>' +recho "${somevar:-"~"}" +expect '<\~>' +recho "${somevar:-\~}" +expect '<\ \~>' +recho "${somevar:-\ \~}" +expect '<\ \ \~>' +recho "${somevar:-\ \ \~}" + +expect "<$HOME>" +recho ${somevar:-$HOME} +expect "<$HOME>" +recho "${somevar:-$HOME}" +expect "<$HOME>" +recho "${somevar:-"$HOME"}" +expect '<$HOME>' +recho "${somevar:-\$HOME}" +expect '<\ $HOME>' +recho "${somevar:-\ \$HOME}" +expect '<\ \ $HOME>' +recho "${somevar:-\ \ \$HOME}" + +foo=bar +expect "<'bar'>" +recho "${foo+'$foo'}" +expect "<'bar'>" +recho "${fox='$foo'}" + +P='*@*' +expect '<*@>' +recho "${P%"*"}" +expect '<*@>' +recho "${P%'*'}" + +expect '<*@>' +recho ${P%"*"} +expect '<*@>' +recho ${P%'*'} + +expect '<*@*>' +recho ${P%""} +expect '<*@*>' +recho ${P#""} + +expect '<*@*>' +recho ${P#"$foobar"} +expect '<*@*>' +recho ${P%"$foobar"} + +s1=abcdefghijkl +s2=efgh + +first=${s1/$s2*/} +expect '' +recho $first + +last=${s1##$first} +expect '' +recho $last + +shift $# +UNAME_RELEASE=${1:-4.2MP} + +RELEASE=`expr "$UNAME_RELEASE" : '[^0-9]*\([0-9]*\)'` # 4 +case "$RELEASE" in +"") RELEASE=0 ;; +*) RELEASE=`expr "$RELEASE" + 0` ;; +esac +REL_LEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.\([0-9]*\)'` # 1 +REL_SUBLEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.[0-9]*.\([0-9]*\)'` # 2 + +expect '<4> <2>' +recho $RELEASE $REL_LEVEL $REL_SUBLEVEL + +b1() +{ + b2 ${1+"$@"} +} + +b2() +{ + recho $* + recho ${#} +} + +expect '<1>' +b1 '' + +expect ' <2>' +b1 bar '' + +expect ' <2>' +b1 '' bar + +expect '<4>' +b1 '' '' '' '' + +NL="\\ +" + +NNL="+$NL+" + +expect '<--\> <-->' +recho --$NL-- +expect '<--\^J-->' +recho "--$NL--" + +expect '<--+\> <+-->' +recho --$NNL-- +expect '<--+\^J+-->' +recho "--$NNL--" + +expect '<-+\> <+-\> <->' +recho -$NNL-$NL- + +set '' +expect '' +recho "$*xy" +expect '' +recho "x$*y" +expect '' +recho "xy$*" +expect '' +recho x"$*"y +expect '' +recho xy"$*" +expect '' +recho "$*"xy +expect '<>' +recho "$*" +expect nothing +recho $* + +unset undef ; set "" + +expect '<>' +recho ${undef-"$*"} +expect '' +recho ${undef-"x$*y"} +expect '' +recho ${undef-"$*xy"} +expect '' +recho ${undef-"xy$*"} +expect '' +recho ${undef-x"$*"y} +expect '' +recho ${undef-xy"$*"} +expect '' +recho ${undef-"$*"xy} +expect '<>' +recho "${undef-$*}" +expect nothing +recho ${undef-$*} + +expect '<>' +recho ${undef-"$zzz"} +expect '' +recho x${undef-"$zzz"} +expect '' +recho x${undef-"$@"} +expect nothing +recho ${undef-"$@"} +expect '' +recho ${undef-"$zzz"}x +expect '' +recho ${undef-"$@"}x +expect '' +recho "$@"x +expect '' +recho "$zzz"x +expect '<^?>' +recho ${undef-} +expect '<^?>' +recho ${undef-""} + +yyy="" +recho "$xxx"x +recho "$yyy"x + +set "" "abd" "" +recho "$@"x +recho "$@"$xxx + +OIFS="$IFS" + +arg=a,b,c,d,e,f + +IFS=, + +export z=$arg + +eval z1=\"$arg\" + +IFS="$OIFS" + +recho $z +recho $z1 + +# should give an error +abc\=def + +zz="a b c d e" +declare a=$zz + +recho "$a" +recho $a + +recho $(echo "foo$(echo ")")") + +# test backslash escapes + +recho \a +recho \\a + +recho "\a" +recho "\\a" + +recho '\a' +recho '\\a' + +recho $(zecho \a) +recho $(zecho \\a) + +recho $(zecho "\a") +recho $(zecho "\\a") + +recho $(zecho '\a') +recho $(zecho '\\a') + +recho `zecho \a` +recho `zecho \\a` + +recho `zecho "\a"` +recho `zecho "\\a"` + +recho `zecho '\a'` +recho `zecho '\\a'` + +a=foo + +recho \$a +recho \\$a + +recho "\$a" +recho "\\$a" + +recho '\$a' +recho '\\$a' + +recho $(zecho `zecho \a`) +recho $(zecho `zecho \\a`) + +recho $(zecho `zecho "\a"`) +recho $(zecho `zecho "\\a"`) + +recho $(zecho `zecho '\a'`) +recho $(zecho `zecho '\\a'`) + +# should echo G { I K } +recho ${abc:-G { I } K } + +abc=hi + +# should echo hi K } +recho ${abc:-G { I } K } + +# should echo a* +unset foo +recho "${foo:-"a"}*" + +f () +{ + echo "Number of args: $#" + echo "<\${*-x}>: <${*-x}>" + echo "<\${@-x}>: <${@-x}>" +} + +f +f '' +f '' '' + +set 1 2 3 4 5 + +expect '<5>' +recho ${#} +expect '<5>' +recho ${#:foo} +expect '<5>' +recho ${#:-foo} +expect '<5>' +recho ${#-posparams} +expect '<5>' +recho ${#:-posparams} + +expect '<0>' +recho ${#!} + +expect nothing +recho $! +expect nothing +recho ${!} + +expect nothing +recho $8 +expect nothing +recho ${8} + +shift $# + +expect '<0>' +recho ${#} +expect '<0>' +recho ${#:foo} +expect '<0>' +recho ${#:-foo} +expect '<0>' +recho ${#-posparams} +expect '<0>' +recho ${#:-posparams} + +expect '' +recho ${!-posparams} +expect '' +recho ${!:-posparams} + +expect '<2>' +recho ${#-} + +expect '<0>' +recho ${#-posparams} + +expect '<0>' +recho ${#?:-xyz} + +expect '<1>' +recho ${#?} + +set a b c d e + +expect '<5>' +recho ${#} +expect '<5>' +recho ${#?:-xyz} + +shift ${#} + +expect '<0>' +recho ${#:-foo} + +expect a bad substitution error +recho ${#:} +expect a bad substitution error +recho ${#/} +expect a bad substitution error +recho ${#%} +expect a bad substitution error +recho ${#=} +expect a bad substitution error +recho ${#+} +expect a bad substitution error +recho ${#1xyz} + +expect a math syntax error +recho ${#:%} + +expect '<0>' +recho ${#:-} + +set -- +unset a b + +x=a +y=b + +IFS=+ + +expect '' +recho $x+$y +expect '<+>' +recho $a+$b + +expect '<+>' +recho + "$@" +expect '<+>' +recho +"$@" + +# variants of nested curly braces inside ${...} expressions + +# IFS is not the standard one + +expect '' '' '<}>' +recho ${gik:-G { I } K } + +abc=hi + +expect '' '' '<}>' +recho ${abc:-G { I } K } + +# reset IFS to the default +IFS=' +' + +# nested ${...} inside ${...} are handled specially +unset XXX FOO BAR +expect '' '' +XXX=xxx +FOO=${BAR:-${XXX} yyy} +recho $FOO + +# this was a bug in versions of bash prior to bash-2.04-release +set -- '' +expect 1 +echo $# +expect '<>' +recho "${@}" +expect '<>' +recho "${@-}" +expect '<>' +recho "${@:-}" + +# this was a bug in bash-2.04, fixed in 2.05 +set -- a b +expect '<:a:>' '<:b:>' +for i in "${@-}"; do recho :$i:; done + +# I believe that ksh93 does these wrong -- we're using the rhs, so shouldn't +# it behave the same as ""? +set -- +expect '<>' +recho "${@-}" +expect '<>' +recho "${@:-}" diff --git a/bash-5.1/tests/nameref.right b/bash-5.1/tests/nameref.right new file mode 100644 index 0000000000000000000000000000000000000000..296105c96b2a773e32e7694d46df4f70284ab657 --- /dev/null +++ b/bash-5.1/tests/nameref.right @@ -0,0 +1,485 @@ +one +two +three +declare -n fee="flip" +declare -n foo="bar" +turning off nameref attribute on foo +bar +after +n foo bar = other +one +two +one +expect +argv[1] = +expect +argv[1] = +expect +one +expect +one +expect +argv[1] = +changevar: expect +argv[1] = +expect +argv[1] = +changevar: expect +argv[1] = +expect +argv[1] = +./nameref.tests: line 106: foo: readonly variable +./nameref.tests: line 107: foo: readonly variable +one +one +./nameref.tests: line 119: foo: readonly variable +./nameref.tests: line 116: foo: readonly variable +one +abxde +abxde +one +bar + +./nameref2.sub: line 5: foo: readonly variable + +expect +argv[1] = +expect +argv[1] = +expect +argv[1] = +expect +./nameref3.sub: line 29: foo: invalid indirect expansion +./nameref3.sub: line 34: unset: bar: cannot unset: readonly variable +expect +two +expect +two +three +unset +four +0 +expect +a b +expect +foo +1 3 5 7 9 +9 +1 3 42 7 9 +1 3 42 7 9 +9 +1 3 44 7 9 +unset +expect +argv[1] = +expect +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +16 +expect <4> +4 +expect <4> +4 +expect <4> +4 +expect +one +expect +one +expect +one +expect +four +errors = 0 +1 +2 +v1: 1 +v2: 2 +ref -> first, value: I am first +ref -> second, value: I am in the middle +ref -> third, value: I am last +final state: ref -> third, value: I am last +ref -> one, value: 1 +ref -> two, value: 2 +ref -> three, value: 3 +final state: ref -> three, value: 3 +./nameref5.sub: line 56: unset: three: cannot unset: readonly variable +ref -> one, value: 1 +ref -> two, value: 2 +ref -> three, value: 3 +final state: ref -> three, value: 3 +./nameref6.sub: line 15: typeset: x: nameref variable self references not allowed +./nameref6.sub: line 18: typeset: x[3]: reference variable cannot be an array +./nameref6.sub: line 25: typeset: x: reference variable cannot be an array +the -- 1 +42 -- 0 +y -- 0 +2 -- 0 +2 -- 0 +y -- 0 +bar +unset +./nameref8.sub: line 16: typeset: warning: v: circular name reference +./nameref8.sub: line 16: warning: v: circular name reference +./nameref8.sub: line 18: warning: v: circular name reference +inside +inside: two +outside: +./nameref8.sub: line 42: typeset: warning: x: circular name reference +./nameref8.sub: line 42: warning: x: circular name reference +./nameref8.sub: line 44: warning: x: circular name reference +foo +./nameref8.sub: line 51: typeset: warning: v: circular name reference +./nameref8.sub: line 51: warning: v: circular name reference +./nameref8.sub: line 51: warning: v: circular name reference +local +./nameref8.sub: line 60: typeset: v: nameref variable self references not allowed +./nameref8.sub: line 67: warning: x: circular name reference +./nameref8.sub: line 68: warning: x: circular name reference +x = +idx2 +idX2 +idx2 +idX2 +declare -n foo="x[\$zero]" +42 +declare -a x=([0]="4") +declare -n foo="x[\$(echo 0)]" +4 +comsub +x[i=0] +comsub +4 +comsub +4 +comsub +4 +declare -n foo="somevariable" +./nameref10.sub: line 51: typeset: somevariable: not found +foo = +declare -n foo="somevariable" +declare -A somevariable=([jug]="brown" ) +declare -n foo="somevariable" +declare -A somevariable=([jug]="brown" ) +declare -n foo="somevariable" +./nameref10.sub: line 62: typeset: somevariable: not found +./nameref10.sub: line 64: typeset: foo: not found +./nameref10.sub: line 64: typeset: somevariable: not found +declare -n foo="bar" +./nameref10.sub: line 68: typeset: bar: not found +declare -n foo="bar" +./nameref10.sub: line 70: typeset: bar: not found +declare -n foo="bar" +declare -i bar="8" +8 +declare -n foo="bar" +./nameref10.sub: line 77: typeset: bar: not found +./nameref11.sub: line 14: declare: `/': invalid variable name for name reference +./nameref11.sub: line 15: declare: `/': invalid variable name for name reference +./nameref11.sub: line 16: `/': not a valid identifier +./nameref11.sub: line 17: declare: `/': not a valid identifier +./nameref11.sub: line 18: `/': not a valid identifier +1) / +#? ./nameref11.sub: line 19: `/': not a valid identifier +x + +./nameref11.sub: line 20: ((: `0': not a valid identifier +./nameref11.sub: line 21: declare: `0': invalid variable name for name reference +./nameref11.sub: line 22: declare: `/': invalid variable name for name reference +./nameref11.sub: line 23: declare: `/': invalid variable name for name reference +/ +./nameref11.sub: line 25: `/': not a valid identifier +./nameref11.sub: line 26: exec: `10': not a valid identifier +./nameref11.sub: line 26: r: cannot assign fd to variable +./nameref11.sub: line 27: warning: r: removing nameref attribute +63 +./nameref11.sub: line 28: declare: RO: readonly variable +./nameref11.sub: line 28: RO: readonly variable +./nameref11.sub: line 29: declare: `/': invalid variable name for name reference +/ +./nameref11.sub: line 30: declare: `/': invalid variable name for name reference +./nameref11.sub: illegal option -- h +./nameref11.sub: line 31: getopts: `?': not a valid identifier +./nameref11.sub: line 32: warning: r: removing nameref attribute +declare -a r=() +./nameref11.sub: line 33: declare: r: reference variable cannot be an array +./nameref11.sub: line 34: printf: `/': not a valid identifier +./nameref11.sub: line 36: `': not a valid identifier +./nameref11.sub: line 37: declare: `': not a valid identifier +./nameref11.sub: line 38: `': not a valid identifier +./nameref11.sub: line 39: printf: `': not a valid identifier +./nameref11.sub: line 40: declare: `': invalid variable name for name reference +declare -r ROVAR="42" +./nameref11.sub: line 45: ROVAR: readonly variable +./nameref11.sub: line 45: ROVAR: cannot unset: readonly variable +declare -r ROVAR="42" +./nameref11.sub +./nameref11.sub: line 47: `@': not a valid identifier +./nameref11.sub +declare -n ref="x" +./nameref11.sub: line 52: RO: readonly variable +declare -r RO_PID +./nameref11.sub: line 52: RO: cannot unset: readonly variable +declare -r RO="x" +./nameref11.sub: line 52: declare: RO_PID: not found +./nameref11.sub: line 54: RO2: readonly variable +declare -r RO2="a" +2 +./nameref11.sub: line 65: typeset: `2': invalid variable name for name reference +2 +./nameref11.sub: line 70: typeset: `2': invalid variable name for name reference +2 +./nameref11.sub: line 75: foo[2]: invalid indirect expansion +./nameref11.sub: line 76: bar: invalid indirect expansion +./nameref12.sub: line 19: declare: `/': invalid variable name for name reference +./nameref12.sub: line 22: declare: `%': invalid variable name for name reference +./nameref12.sub: line 26: `^': not a valid identifier +declare -n r +declare -a foo +declare -a foo=([0]="7") +./nameref12.sub: line 39: declare: `42': not a valid identifier +./nameref12.sub: line 40: declare: x: not found +declare -nr RO="foo" +/ +./nameref12.sub: line 58: declare: `7*6': not a valid identifier +./nameref12.sub: line 58: declare: foo: not found +./nameref12.sub: line 60: `7*6': not a valid identifier +declare -n ref="var" +declare -n ref="var" +./nameref12.sub: line 87: readonly: `var[0]': not a valid identifier +declare -- var="foo" +declare -r var2="foo" +declare -n ref="var" +declare -a var=([0]="foo") +./nameref12.sub: line 104: `': not a valid identifier +declare -n ref +declare -- ref="global" +declare -a var=([0]="foo2") +./nameref12.sub: line 113: declare: global: not found +declare -- a +declare -n r="a" +declare -- a +declare -n r="a" +0 +declare -n r="P" +declare -n ref="var" +declare -- a +declare -n r="a" +0 +declare -n r +declare -n r +./nameref13.sub: line 101: typeset: `12345': invalid variable name for name reference +declare -n foo +./nameref13.sub: line 110: typeset: `12345': invalid variable name for name reference +declare -n foo +declare -nx ref="var" +var +var +var +var +foo +foo +foo +foo +before +declare -n ref="var" +./nameref14.sub: line 36: typeset: var: not found +first +declare -n ref="var" +declare -x var="xxx" +invalid +declare -n ref="var" +declare -x var="5" +after +declare -n ref="var" +./nameref14.sub: line 45: typeset: var: not found +declare -n ref="var" +./nameref15.sub: line 14: local: warning: a: circular name reference +./nameref15.sub: line 14: warning: a: circular name reference +./nameref15.sub: line 14: `a[0]': not a valid identifier +declare -a a=([0]="0") +./nameref15.sub: line 14: local: warning: a: circular name reference +./nameref15.sub: line 14: warning: a: circular name reference +./nameref15.sub: line 14: warning: a: circular name reference +declare -a a=([0]="X") +declare -a b=([0]="X") +./nameref15.sub: line 14: local: warning: a: circular name reference +./nameref15.sub: line 14: warning: a: circular name reference +./nameref15.sub: line 14: `a[0]': not a valid identifier +declare -a b=([0]="0") +./nameref15.sub: line 32: typeset: warning: ref: circular name reference +./nameref15.sub: line 32: warning: ref: circular name reference +./nameref15.sub: line 33: warning: ref: circular name reference +./nameref15.sub: line 34: warning: ref: circular name reference +inside X +outside X +before: 7 +./nameref15.sub: line 45: typeset: warning: xxx: circular name reference +./nameref15.sub: line 45: warning: xxx: circular name reference +./nameref15.sub: line 46: warning: xxx: circular name reference +declare -n xxx="xxx" +./nameref15.sub: line 48: warning: xxx: circular name reference +xxx_func: inside: xxx = foo +after: foo +./nameref15.sub: line 59: typeset: ref: nameref variable self references not allowed +./nameref15.sub: line 61: ref: nameref variable self references not allowed +declare -n ref="re" +declare -n ref="re" +declare -- re="4" +4 +declare -n foo="var[@]" +declare -n ref="var[@]" +./nameref15.sub: line 78: var[@]: bad array subscript +declare -n bar="var[@]" +./nameref15.sub: line 83: var[@]: bad array subscript +declare -n a="b" +declare -n b="a[1]" +./nameref15.sub: line 91: warning: a: removing nameref attribute +declare -a a=([1]="foo") +declare -n b="a[1]" +./nameref15.sub: line 96: warning: a: removing nameref attribute +declare -a a=([1]="foo") +declare -n b="a[1]" +declare -n n="v" +declare -a v=([1]="1") +./nameref15.sub: line 112: typeset: n: not found +declare -a v=([0]="0" [1]="1") +declare -n n="v[1]" +declare -a v=([0]="0") +declare -n r1="y" +declare -n r2="x" +./nameref16.sub: line 25: typeset: x: not found +./nameref16.sub: line 25: typeset: y: not found +declare -n r1="y" +declare -n r2="x" +./nameref16.sub: line 34: typeset: x: not found +./nameref16.sub: line 34: typeset: y: not found +declare -n r1="y" +declare -n r2="x" +./nameref16.sub: line 46: typeset: x: not found +./nameref16.sub: line 46: typeset: y: not found +declare -n r1="y" +declare -n r2="x" +declare -- x="one" +declare -- y="two" +./nameref17.sub: line 21: declare: bar: not found +./nameref17.sub: line 22: unset: foo0: cannot unset: readonly variable +declare -nr foo0="bar" +declare -nr foo0="bar" +declare -- bar +./nameref17.sub: line 27: declare: foo0: readonly variable +./nameref17.sub: line 28: declare: foo0: readonly variable +declare -nr foo1 +./nameref17.sub: line 37: typeset: foo1: readonly variable +declare -nr foo1 +declare -n foo2="bar" +declare -r bar +./nameref17.sub: line 48: bar: readonly variable +./nameref17.sub: line 49: typeset: bar: readonly variable +declare -n foo2="bar" +declare -r bar +declare -- bar3="three" +./nameref17.sub: line 59: unset: foo3: cannot unset: readonly variable +./nameref17.sub: line 62: declare: bar3: readonly variable +declare -nr foo3="bar3" +declare -r bar3="three" +./nameref17.sub: line 64: declare: foo3: readonly variable +declare -nr foo4="bar4" +declare -- bar4="four" +./nameref17.sub: line 76: typeset: foo4: readonly variable +declare -nr foo4="bar4" +declare -nr foo4="bar4" +declare -- bar4="four" +./nameref17.sub: line 92: typeset: foo4: readonly variable +declare -nr foo4="bar4" +declare -nr foo4="bar4" +declare -- bar4="four" +declare -nr foo5 +declare -r foo5 +declare -nr foo5 +declare -r foo5 +./nameref18.sub: line 15: mapfile: `XXX[0]': not a valid identifier +./nameref18.sub: line 16: declare: XXX[0]: not found +./nameref18.sub: line 22: `XXX[0]': not a valid identifier +./nameref18.sub: line 23: declare: XXX[0]: not found +declare -n ref="XXX[0]" +declare -a XXX=([0]="4") +./nameref18.sub: line 37: `XXX[0]': not a valid identifier +declare -n ref="XXX[0]" +./nameref18.sub: line 38: declare: XXX[0]: not found +./nameref18.sub: line 42: read: `XXX[0]': not a valid identifier +./nameref18.sub: line 43: declare: XXX[0]: not found +./nameref18.sub: line 48: `XXX[0]': not a valid identifier +declare -n ref="XXX[0]" +./nameref18.sub: line 51: `XXX[0]': not a valid identifier +./nameref18.sub: line 51: declare: XXX[0]: not found +declare -n ref="var[123]" +./nameref18.sub: line 59: declare: var[123]: not found +declare -a var=([123]="") +declare -n ref="var[123]" +./nameref18.sub: line 63: declare: var[123]: not found +declare -a var=([123]="") +declare -n ref="var[123]" +./nameref18.sub: line 67: declare: var[123]: not found +declare -a var=([123]="X") +declare -n foo="bar" +declare -- foo="bar" +./nameref19.sub: line 22: declare: bar: not found +declare -n foo="bar" +declare -- foo="bar" +declare -i bar="11" +declare -inx foo6 +declare -ix foo6 +declare -n foo="bar" +declare -- bar="Hello World!" +declare -- foo="bar" +declare -- bar="Hello World!" +declare -n foo="bar" +declare -- bar +declare -- foo="bar" +declare -- bar +declare -a v=([0]="Y") +r: +v: +declare -n ref="var" +declare -a var=([0]="X") +declare -n ref="var" +declare -a var=([0]="X") +declare -n ref="var" +./nameref20.sub: line 36: declare: var: not found +outside: +declare -a foo=([0]="X") +declare -n ref="var" +declare -a var=([0]="X") +outside: +./nameref20.sub: line 51: declare: ref: not found +./nameref20.sub: line 51: declare: var: not found +declare -n ref="var" +declare -- var="X" +outside: +./nameref20.sub: line 58: declare: ref: not found +./nameref20.sub: line 58: declare: var: not found +declare -n ref="var" +declare -a var=([0]="Y") +declare -- ref="Y" +declare -- var="X" +declare -- ref="Y" +declare -- ref="Y" +./nameref20.sub: line 74: declare: var: not found +declare -- ref="Y" +declare -n ref="var" +declare -A var=([2]="" ) +declare -n ref="var" +declare -A var=([2]="" ) +declare -n ref="var" +declare -a var=([2]="") +declare -n ref="var" +declare -a var=([2]="") +declare -n ref="var" +declare -ai var=([1]="0") +declare -n ref="var" +declare -ai var=([1]="0") +declare -n ref="var" +declare -- var="1" diff --git a/bash-5.1/tests/nameref.tests b/bash-5.1/tests/nameref.tests new file mode 100644 index 0000000000000000000000000000000000000000..3a6c5d98e11762db9e7a170b5c3afdab7dffffbb --- /dev/null +++ b/bash-5.1/tests/nameref.tests @@ -0,0 +1,133 @@ +# 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 . +# +# basic nameref tests +bar=one +flow=two +flip=three + +foo=bar +typeset -n foo + +typeset -n fee=flow + +echo ${foo} +echo ${fee} + +typeset -n fee=flip +echo ${fee} + +typeset -n + +echo turning off nameref attribute on foo +typeset +n foo=other +echo ${foo} +echo after +n foo bar = $bar + +unset foo bar fee + +bar=one + +foo=bar +typeset -n foo + +foo=two printf "%s\n" $foo +foo=two eval 'printf "%s\n" $foo' + +foo=two echo $foo + +unset foo bar +# other basic assignment tests +bar=one + +echo "expect " +recho ${bar} +typeset -n foo=bar +foo=two + +echo "expect " +recho ${bar} + +# this appears to be a ksh93 bug; it doesn't unset foo here and messes up +# later +unset foo bar + +# initial tests of working inside shell functions +echoval() +{ + typeset -n ref=$1 + printf "%s\n" $ref +} + +foo=bar +bar=one +echo "expect <$foo>" +echoval foo +echo "expect <$bar>" +echoval bar + +unset foo bar +changevar() +{ + typeset -n v=$1 + + shift + v="$@" + echo "changevar: expect <$@>" + recho "$v" +} + +bar=one + +echo "expect " +recho ${bar} +changevar bar two +echo "expect " +recho $bar + +changevar bar three four five +echo "expect " +recho "$bar" + +unset foo bar +unset -n foo bar +readonly foo=one +typeset -n bar=foo +bar=4 +foo=4 + +echo $foo +echo $bar + +assignvar() +{ + typeset -n ref=$1 + shift + ref="$@" +} + +readonly foo=one + +assignvar foo two three four +echo $foo + +var=abcde +x=var +declare -n v=var +# these two should display the same +echo ${!x//c/x} +echo ${v//c/x} + +for testfile in ./nameref[0-9].sub ./nameref[1-9][0-9].sub ; do + ${THIS_SH} "$testfile" +done diff --git a/bash-5.1/tests/nameref1.sub b/bash-5.1/tests/nameref1.sub new file mode 100644 index 0000000000000000000000000000000000000000..50bb25d6efc1b5dd89e98b16fe5ba58338285cd5 --- /dev/null +++ b/bash-5.1/tests/nameref1.sub @@ -0,0 +1,13 @@ +# indirect referencing of a nameref returns the variable name it references +unset foo bar + +bar=one +foo=bar + +typeset -n foo + +echo ${foo} +echo ${!foo} + +# this is a current incompatibility +echo ${!foo[0]} diff --git a/bash-5.1/tests/nameref10.sub b/bash-5.1/tests/nameref10.sub new file mode 100644 index 0000000000000000000000000000000000000000..742755b316d8c29c21a8eba24c16a868377cd2fd --- /dev/null +++ b/bash-5.1/tests/nameref10.sub @@ -0,0 +1,77 @@ +# 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 . +# +# testing behavior of command substitution as one of expansions performed by +# array subscripting; should behave the same directly as when done through +# a nameref + +x[0]=42 +zero=0 +f() { typeset -n foo="$1"; declare -p foo; echo "$foo"; } + +f 'x[$zero]' + +x[$(echo 0)]=4 +declare -p x + +f 'x[$(echo 0)]' + +unset -f f +f() +{ + typeset -n foo="$1"; + + echo "x[i=0$(echo comsub >&2)]" + echo "${x[i=0$(echo comsub >&2)]}" + echo "${!1}" + echo "$foo" +} + +f 'x[i=0$(echo comsub >&2)]' + +unset -f f +unset x + +# problems with unset and namerefs pointing to non-existent variables pointed +# out after bash-4.3 released + +typeset -n foo=somevariable +foo=bar +unset foo # unsets somevariable +typeset -p foo somevariable +echo foo = $foo + +typeset -A foo # should create array variable named somevariable +foo["jug"]="brown" + +typeset -p foo somevariable +typeset -A foo='([jug]="brown" )' +typeset -p foo somevariable + +unset foo +typeset -p foo somevariable +unset -n foo +typeset -p foo somevariable + +unset bar +typeset -n foo=bar +typeset -p foo bar +unset foo +typeset -p foo bar +typeset -i foo +foo=4+4 +typeset -p foo bar +echo "$foo" + +unset foo +typeset -p foo bar diff --git a/bash-5.1/tests/nameref11.sub b/bash-5.1/tests/nameref11.sub new file mode 100644 index 0000000000000000000000000000000000000000..ea14c0db7a3bdded865033263e63df71a610f0c6 --- /dev/null +++ b/bash-5.1/tests/nameref11.sub @@ -0,0 +1,76 @@ +# 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 . +# +r=/; declare -n r ; unset r +declare -n r=/ ; unset -n r +declare -n r; r=/ ; unset -n r +declare -n r; declare r=/ ; unset -n r +declare -n r; for r in /; do :; done ; unset -n r +declare -n r; select r in /; do :; done <<< 1; echo x; echo $r ; unset -n r +declare -n r; ((r=0)) ; unset -n r +((r=0)); declare -n r ; unset -n r +r=/ declare -n r ; unset -n r +f() { declare -n r; }; r=/ f ; unset r +f() { echo $r; }; declare -n r; r=/ f ; unset -n r +declare -n r; : ${r:=/} ; unset -n r +declare -n r; exec {r}>/dev/null ; unset -n r +declare -n r; coproc r { :; }; echo $r ; unset r ; wait +declare -r RO=x; r=$RO; declare -n r; x=y; declare -n RO; RO=z; declare -p RO; echo "$RO" +s=/; declare -n r=s; declare -n s; echo $r ; unset -n r ; unset -n s +declare -n r=s; declare -n s; s=/ ; unset -n r; unset -n s +declare -n r; getopts x r -h ; unset r; unset -n r +declare -n r; mapfile r < /dev/null ; declare -p r; unset r ; unset -n r +mapfile r < /dev/null; declare -n r ; unset r ; unset -n r +declare -n r; printf -v r / ; unset -n r + +declare -n r; r="" ; unset -n r +declare -n r="" ; unset -n r +declare -n r; : ${r=} ; unset -n r +declare -n r; printf -v r '' ; unset -n r +r=""; declare -n r ; unset -n r +export r + +# coproc tests, since coproc sets and unsets variables +declare -r ROVAR=42 +declare -p ROVAR; coproc ROVAR { :; }; wait; declare -p ROVAR + +echo ${@:0}; coproc @ { :; }; wait ; echo ${@:0} + +declare -n ref=x; coproc ref { :; }; wait ; declare -p ref +unset -n ref ; unset ref + +declare -r RO RO_PID; coproc RO { :; }; declare -p RO_PID; wait; declare -p RO RO_PID + +declare -r RO2=a; declare -n ref_PID=RO2; coproc ref { :; }; wait; declare -p RO2 + +unset x y +set -- one two three + +y=2 +typeset -n x=y +echo ${x} + +unset -n x + +typeset -n y +echo $y + +unset -n y + +typeset -n y +y=2 +echo ${y} + +declare -n foo=bar +echo ${!foo[2]} +echo ${!bar} diff --git a/bash-5.1/tests/nameref12.sub b/bash-5.1/tests/nameref12.sub new file mode 100644 index 0000000000000000000000000000000000000000..199b51c8daa72f88b4c38200b0e29973e543ce99 --- /dev/null +++ b/bash-5.1/tests/nameref12.sub @@ -0,0 +1,113 @@ +# 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 . +# +declare -n r +declare -n r +unset -n r + +r=foo +declare -n r=/ + +r=% +declare -n r +unset r + +declare -n r +r=^ +declare -p r + +unset -n r + +declare -n foo +declare -a foo +declare -p foo +foo[0]=7 +declare -p foo +unset foo + +declare -n x +declare x=42 +declare -p x + +declare -n -r RO=foo +declare -p RO + +unset -n r; unset r + +# the details of this may change; currently we put namerefs and values into +# the tempenv if the nameref value is an invalid variable name +f() { echo $r; } + +declare -n r +r=/ ${THIS_SH} < /dev/null +r=/ f + +unset -f f + +# the details of this may change; this will tell me when they do +declare -n foo ; declare -i foo=7*6 ; declare -p foo +unset -n foo +declare -n foo ; declare -i foo ; foo=7*6 ; declare -p foo + +# used to be buggy +f() +{ + unset var + declare -n ref=var + declare -n ref + declare -p ref +} +f + +unset -f f +f() +{ + local var + declare -n ref=var + declare -n ref + declare -p ref +} +f + +unset ref; unset -n ref +unset var + +var=foo +typeset -n ref=var[0] +readonly ref +typeset -p var + +var2=foo +typeset -n ref2=var2 +readonly ref2 +typeset -p var2 + +unset var +unset -n ref ref2 + +unset var; typeset -n ref=var +ref[0]=foo +typeset -p ref var +unset -n ref + +unset var; typeset -n ref +ref[0]=foo +typeset -p ref +unset -n ref + +ref=global +f() { declare -n ref=var; ref[0]=foo1; }; f +f() { declare -n ref=var; ref[0]=foo2; }; f +declare -p ref var + +declare -p global diff --git a/bash-5.1/tests/nameref13.sub b/bash-5.1/tests/nameref13.sub new file mode 100644 index 0000000000000000000000000000000000000000..5c56428bf0016628820363f1fffd5b3ca36a2ae0 --- /dev/null +++ b/bash-5.1/tests/nameref13.sub @@ -0,0 +1,115 @@ +# 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 . +# +declare -nt r=a + +f() +{ + declare a + declare -n r=a + declare -p a r +} + +f +unset -f f + +f() +{ + declare a + declare -n r + r=a + declare -p a r +} +f +echo $? + +unset -f f + +P=12345 +function foo +{ + typeset -n r + typeset -n r=P + typeset -p r +} + +foo +unset P foo + +ref=outside + +f() +{ + unset var + declare -n ref=var + declare -n ref; + declare -p ref; +} +f + +unset ref foo + +typeset -n r=a + +f() +{ + typeset a + typeset -n r + typeset -n r + r=a + + typeset -p a r +} +f +echo $? +unset -n r +unset -f f + +function foo +{ + typeset -n r + typeset -n r + typeset -p r +} + +foo +unset -f foo + + +function foo +{ + typeset r + typeset -n r + typeset -p r +} +foo +unset -f foo + +foo() +{ + typeset -n foo + typeset foo=12345 + typeset -p foo +} +foo +unset -f foo + +foo() +{ + typeset -n foo + typeset -n foo=12345 + typeset -p foo +} +foo +unset -f foo + diff --git a/bash-5.1/tests/nameref14.sub b/bash-5.1/tests/nameref14.sub new file mode 100644 index 0000000000000000000000000000000000000000..a14c440c51ef4bd76a5461da47e5a6d8bef1ac94 --- /dev/null +++ b/bash-5.1/tests/nameref14.sub @@ -0,0 +1,56 @@ +# 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 . +# +# exporting namerefs and putting namerefs in temp env post bash-4.3 + +typeset -nx ref=var; +typeset -p ref + +var=foo; str='' +printenv ref # var +ref+=$str printenv ref # var +ref+="$str" printenv ref # var +ref=$ref$str printenv ref # var + +export ref # follows nameref and exports var + +printenv var # foo +ref+=$str printenv var # foo +ref+="$str" printenv var # foo +ref=$ref$str printenv var # foo + +# none of these should change ref; should follow the nameref and export var +unset var; unset -n ref; typeset -n ref=var + +echo before +typeset -p ref var + +echo first +ref=xxx typeset -p ref var + +echo invalid +var= ref=5 typeset -p ref var + +echo after +typeset -p ref var + +# ref isn't exported, so none of the printenvs should print anything +unset var ; unset -n ref +typeset -n ref=var; +typeset -p ref + +var=foo; str='' +printenv ref +ref+=$str printenv ref +ref+="$str" printenv ref +ref=$ref$str printenv ref diff --git a/bash-5.1/tests/nameref15.sub b/bash-5.1/tests/nameref15.sub new file mode 100644 index 0000000000000000000000000000000000000000..cce8fbd944355083b620cd1d9e8536b67cc388d7 --- /dev/null +++ b/bash-5.1/tests/nameref15.sub @@ -0,0 +1,117 @@ +# 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 . +# +f() { local -n a=$1; a=X; } + +a=(0); f 'a[0]' +while [[ -v a ]]; do declare -p a; unset a; done + +a=(0); f 'a' +while [[ -v a ]]; do declare -p a; unset a; done + +b=(0); f 'b[0]' +while [[ -v a ]]; do typeset -p a; unset a; done +typeset -p b + +b=(0); f 'a[0]' +while [[ -v a ]]; do typeset -p a; unset a; done +typeset -p b + +add_X_echo() +{ + typeset -n ref=$1 + ref+=X + echo inside $ref +} + +ref= +add_X_echo ref +echo outside "$ref" +unset ref + +# same test, but assigning nameref variable circular reference directly +xxx_func() +{ + typeset -n xxx=xxx + xxx=foo + declare -p xxx + echo $FUNCNAME: inside: xxx = $xxx +} + +xxx=7 +echo before: $xxx +xxx_func +echo after: $xxx + +unset xxx +unset -f xxx_func + +typeset -n ref=ref + +typeset -n ref=re ref+=f +typeset -p ref +ref=4 +typeset -p ref re + +export ref +printenv ref +printenv re + +unset ref ; unset -n ref +unset foo; unset -n foo + +typeset -n foo=var[@] +typeset -p foo +typeset -n ref=var ref+=[@] +typeset -p ref + +ref=42 + +typeset -n bar +bar=var[@] +typeset -p bar +bar=7 + +unset a b +unset -n a b + +typeset -n a=b b +b=a[1] +typeset -p a b +a=foo +typeset -p a b + +unset a +typeset -n a=b +declare a=foo +typeset -p a b + +unset n v +unset -n n v + +v=(0 1) +typeset -n n=v +unset n[0] +typeset -p n v + +unset -n n + +v=(0 1) +typeset -n n=v +unset -n n +typeset -p n v + +v=(0 1) +declare -n n=v[1] +unset n +declare -p n v diff --git a/bash-5.1/tests/nameref16.sub b/bash-5.1/tests/nameref16.sub new file mode 100644 index 0000000000000000000000000000000000000000..d07a3a021b40835c10f891c3f15d7904d30a4752 --- /dev/null +++ b/bash-5.1/tests/nameref16.sub @@ -0,0 +1,57 @@ +# 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 . +# +# post-bash-4.3 changes for more ksh93 compatibility when following nameref +# chains and using typeset/declare -n to operate on nameref variables rather +# than the variables they reference + +# don't follow nameref chain when using declare -n and at the global scope +unset -n r1 r2 + +typeset -n r1=r2 +typeset -n r2=x +typeset -n r1=y + +typeset -p r1 r2 x y + +# same behavior when in a shell function +foo() +{ + typeset -n r1=r2 + typeset -n r2=x + typeset -n r1=y + + typeset -p r1 r2 x y +} +unset -n r1 r2 +foo +unset -f foo + +# same behavior when namerefs aren't chained +unset -n r1 r2 + +typeset -n r1=z +typeset -n r2=x +typeset -n r1=y +typeset -p r1 r2 x y + +# same behavior when referenced variables have values +unset -n r1 r2 + +x=one +y=two +typeset -n r1=r2 +typeset -n r2=x +typeset -n r1=y + +typeset -p r1 r2 x y diff --git a/bash-5.1/tests/nameref17.sub b/bash-5.1/tests/nameref17.sub new file mode 100644 index 0000000000000000000000000000000000000000..b8c3cc7358bd277d94447e9a4b53361566a12c9a --- /dev/null +++ b/bash-5.1/tests/nameref17.sub @@ -0,0 +1,116 @@ +# 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 . +# +# test behavior of readonly namerefs and namerefs referencing readonly variables + +# readonly nameref variable referencing read-write global variable + +bar=one +declare -rn foo0=bar +unset foo0 # unsets bar +declare -p bar +unset -n foo0 # cannot unset +declare -p foo0 + +declare +r foo0 # modifies bar +declare -p foo0 bar +declare +r -n foo0 # error +declare +n foo0 # error +unset bar + +# readonly nameref variable without a value +typeset -n foo1 +typeset -r foo1 + +typeset -p foo1 + +typeset foo1=bar # error +typeset +r foo1 # no-op, follows nameref chain to nothing +typeset -p foo1 + +# nameref pointing to read-only global variable +foo2=bar +typeset -n foo2 +typeset -r foo2 # changes bar + +typeset -p foo2 bar + +foo2=bar # error? +typeset +r foo2 # attempts to change bar, error +typeset -p foo2 bar # nameref unchanged + +# read-only nameref pointing to read-only global variable +bar3=three +declare -rn foo3=bar3 +unset foo3 # unsets bar3 + +bar3=three +declare -p bar3 +unset -n foo3 # cannot unset + +readonly bar3 +declare +r foo3 # error attempting to reference bar3 +declare -p foo3 bar3 +declare +r -n foo3 # error + +# readonly nameref pointing to read-write local -- can we remove nameref attr? +func() +{ + typeset bar4=four + + # readonly nameref + typeset -n -r foo4=bar4 + + typeset -p foo4 bar4 + + typeset +n foo4 + + typeset -p foo4 +} +func +unset -f func + +# readonly nameref pointing to read-write global -- can we remove nameref attr? +bar4=four +foo4=bar4 +# readonly nameref +typeset -n foo4 +typeset -r -n foo4 + +typeset -p foo4 bar4 + +typeset +n foo4 +typeset -p foo4 + +bar4=four +: ${foo4=bar4} + +typeset -p foo4 bar4 + +# readonly local nameref without a value -- can we remove nameref attribute? +func() +{ + declare -r -n foo5 + declare -p foo5 + declare +n foo5 + declare -p foo5 +} +func +unset -f func + +# readonly global nameref without a value -- can we remove nameref attribute? +declare -n foo5 +declare -r -n foo5 +declare -p foo5 +declare +n foo5 +declare -p foo5 diff --git a/bash-5.1/tests/nameref18.sub b/bash-5.1/tests/nameref18.sub new file mode 100644 index 0000000000000000000000000000000000000000..a29fe379d5ae74970e33ae12eb625a37b11a17b0 --- /dev/null +++ b/bash-5.1/tests/nameref18.sub @@ -0,0 +1,67 @@ +# 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 . +# +declare -n ref=XXX[0] +mapfile ref <<< $'1\n2' +declare -p XXX[0] + +unset -n ref + +declare -n ref=XXX[0] +declare -A ref +ref[foo]=bar +declare -p XXX[0] + +unset -n ref +unset XXX + +typeset -n ref=XXX[0] +typeset ref=4 + +typeset -p ref XXX + +unset -n ref +unset XXX + +declare -n ref=XXX[0] +ref+=([2]=x) +declare -p ref XXX[0] +unset -n ref + +declare -n ref=XXX[0] +read -a ref <<< "A B C" +declare -p XXX[0] +unset -n ref + +declare -n ref=XXX[0] +unset ref +ref=() +declare -p ref + +coproc ref { :; }; declare -p ${!ref} +wait + +unset -n ref + +declare -n ref=var[123] +unset ref +declare ref= +declare -p ref ${!ref} var + +unset ref +declare ref+= +declare -p ref ${!ref} var + +declare +t ref +ref=X +declare -p ref ${!ref} var diff --git a/bash-5.1/tests/nameref19.sub b/bash-5.1/tests/nameref19.sub new file mode 100644 index 0000000000000000000000000000000000000000..b00f68e5275f6a0a827cc006fb91b01945fc0887 --- /dev/null +++ b/bash-5.1/tests/nameref19.sub @@ -0,0 +1,64 @@ +# 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 . +# +# can we unset the nameref attribute on variables with values that reference +# unset variables? + +unset bar +declare -n foo="bar" +declare -p foo + +declare +n foo +declare -p foo bar + +declare -n foo +declare -p foo + +# let's try removing the nameref attribute -- other attributes and assignments +# apply to the nameref target + +declare +n -i foo=7+4 +declare -p foo bar + +unset foo bar + +# but if the nameref variable doesn't have a value, the attributes apply to +# the nameref variable itself. thanks ksh93 + +declare -n foo6 +declare -xi foo6 +declare -p foo6 + +# and when we remove the nameref attribute, the other attributes remain + +declare +n foo6 +declare -p foo6 + +unset foo6 + +# make sure these cases continue to work + +# nameref referencing an existing, set variable +declare -n foo=bar +bar='Hello World!' +declare -p foo bar +declare +n foo +declare -p foo bar +unset foo bar + +# nameref referencing an existing, unset variable +declare -n foo=bar +declare bar +declare -p foo bar +declare +n foo +declare -p foo bar diff --git a/bash-5.1/tests/nameref2.sub b/bash-5.1/tests/nameref2.sub new file mode 100644 index 0000000000000000000000000000000000000000..547cc199cb64e777360190fb894ab94019efdcf3 --- /dev/null +++ b/bash-5.1/tests/nameref2.sub @@ -0,0 +1,7 @@ +# test readonly nameref variables +# ksh93 allows this but not typeset -rn ref=foo? +typeset -n ref=foo +readonly ref +foo=4 + +echo $ref diff --git a/bash-5.1/tests/nameref20.sub b/bash-5.1/tests/nameref20.sub new file mode 100644 index 0000000000000000000000000000000000000000..715bc4dcffc1eb919d3173e2be69c40901484f81 --- /dev/null +++ b/bash-5.1/tests/nameref20.sub @@ -0,0 +1,84 @@ +# 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 . +# +# a collection of cases in bug reports after bash-5.0-alpha was released + +declare -n r=v[0] +v=(X); r=Y +declare -p ${!v*} +printf "%s: <%s>\n" "r" "$r" "v" "$v" + +unset -n r +unset -v v + +declare -n ref=var; declare -a ref +ref=(X) +declare -p ref var + +unset -n ref +unset -v var + +f() { declare -n ref=var; declare ref=(X); declare -p ref var; }; +f + +unset -f f + +f() { declare -n ref=var; declare -g ref=(X); declare -p ref var; }; + +declare -n ref=foo +f +echo outside: +declare -p foo + +unset -n ref +unset -v foo +unset -f f + +f() { declare -n ref=var; declare -a ref; ref=(X); declare -p ref var; } + +f +echo outside: +declare -p ref var +unset -f f + +f() { declare -n ref=var; declare ref; ref=X; declare -p ref var; } + +f +echo outside: +declare -p ref var + +unset -f f + +unset -n ref; unset var + +f() +{ + declare var=X; declare -n ref=var; declare ref=(Y) + declare -p ref var +} +f + +unset -f f + +declare -n ref=var +f() { local ref=Y; declare -p ref var; local; } + +var=X +f + +unset -v var +f + +unset -n ref +unset -f f + diff --git a/bash-5.1/tests/nameref21.sub b/bash-5.1/tests/nameref21.sub new file mode 100644 index 0000000000000000000000000000000000000000..08d8f5611018de3870dcddd7acd1ec791cd80331 --- /dev/null +++ b/bash-5.1/tests/nameref21.sub @@ -0,0 +1,69 @@ +# 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 . +# +# issues with local variables and local namerefs post-bash-4.4 + +f() +{ + local -n ref=var + local -A ref=([1]=) +# declare -p ref var + ref=([2]=) + declare -p ref var +} + +unset ref var +f + +unset ref; var=0 +f + +unset var +unset -f f + +f() +{ + local -n ref=var + local -a ref=([1]=) + ref=([2]=) + declare -p ref var +} + +unset ref var +f + +unset ref; var=0 +f + +unset var +unset -f f + +f() { local -n ref=var; local -i ref=([1]=); declare -p ref var; } + +unset var +f + +var=0 +f + +unset var +unset -f f + +f() { local -n ref=var; local ref=1; declare -p ref var; } + +var=0 +f + +unset var +unset -f f + diff --git a/bash-5.1/tests/nameref3.sub b/bash-5.1/tests/nameref3.sub new file mode 100644 index 0000000000000000000000000000000000000000..67cb0982b7bc0d0fbd32e96e8e03a7aad30ad3a7 --- /dev/null +++ b/bash-5.1/tests/nameref3.sub @@ -0,0 +1,50 @@ +# 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 . +# +# nameref requires changes to unset +bar=one +typeset -n foo=bar + +# normal unset unsets only variable nameref references +# need unset -n to unset nameref itself +unset foo +echo "expect " +recho ${bar-unset} +echo "expect " +recho ${foo-unset} +echo "expect " +recho ${!foo} +unset -n foo +echo "expect " +recho "${!foo-unset}" + +readonly bar=two +typeset -n foo=bar + +unset foo # this should fail because bar is readonly + +echo "expect " +echo ${bar-unset} +echo "expect " +echo ${foo-unset} + +# one question is what happens when you unset the underlying variable +qux=three +typeset -n ref +ref=qux + +echo $ref +unset qux +echo ${ref-unset} +qux=four +echo ${ref-unset} diff --git a/bash-5.1/tests/nameref4.sub b/bash-5.1/tests/nameref4.sub new file mode 100644 index 0000000000000000000000000000000000000000..6367d565644a18a803f4b7be3893990152672345 --- /dev/null +++ b/bash-5.1/tests/nameref4.sub @@ -0,0 +1,234 @@ +# 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 . +# +# test suite cribbed from ksh93 nameref tests +typeset -i errors=0 +ckval() +{ + typeset -n one=$1 + + if [[ $one != $2 ]]; then + echo "one=$one != 2=$2" + (( errors++ )) + fi +} + +ckref() +{ + typeset -n one=$1 two=$2 + + if [[ $one != $two ]]; then + echo "one=$one != two=$two" + (( errors++ )) + fi +} + +name=first + +ckref name name + +func1() +{ + typeset -n color=$1 + func2 color +} + +func2() +{ + typeset color=$1 + set -- ${color[@]} + printf "<%s>" "$@" + echo +} + +typeset -A color +color[apple]=red +color[grape]=purple +color[banana]=yellow + +# XXX +#func1 color + +unset foo bar +export bar=foo +typeset -n foo=bar +ckval foo foo + +# XXX - need to see if we can do checks for self-referencing at assignment +# time +command typeset -n xx=yy +command typeset -n yy=xx +echo $? + +unset foo bar +unset -n foo bar +set foo +typeset -n bar=$1 +foo=hello +ckval bar hello + +# XXX -- another self-referencing error? +# ksh93 makes this another invalid self-reference +unset foo +unset -n bar + +bar=123 +foobar() +{ + typeset -n foo=bar + typeset -n foo=bar + + ckval foo 123 +} + +typeset -n short=long +short=( a b ) +echo "expect " +echo ${long[@]} +unset long +unset -n short + +# assignment to a previously-unset variable +typeset -n short=long +short=foo +echo "expect " +echo ${long} +unset long +unset -n short + +unset foo bar + +# simple array references and assignments +typeset -n foo=bar +bar=( 1 3 5 7 9) +echo ${foo[@]} +echo ${foo[4]} +foo[2]=42 +echo ${bar[@]} + +barfunc() +{ + typeset -n v=$1 + echo ${v[@]} + echo ${v[4]} + v[2]=44 + echo ${bar[@]} +} +barfunc bar + +unset -f foobar +unset bar +unset -n foo + +# should ref at global scope survive call to foobar()? +unset ref x +typeset -n ref +x=42 +foobar() +{ + local xxx=3 + ref=xxx + return 0 +} +echo ${ref-unset} +ref=x +foobar +ckval ref xxx +ckval x xxx + +# assignment in a function to something possibly out of scope +assignvar() +{ + typeset -n v=$1 + shift + v="$@" +} + +assignvar lex a b c d e +echo "expect " +recho "${lex}" + +unset foo bar short long + +typeset -n foo='x[2]' + +x=(zero one two three four) +foo=seven + +echo "expect " +recho "${x[@]}" + +unset ref x +unset -n ref + +typeset -n ref +ref=x +# make sure nameref to a previously-unset variable creates the variable +ref=42 +ckval x 42 + +# make sure they work inside arithmetic expressions +unset foo bar ref x xxx +unset -n ref + +typeset -i ivar +typeset -n iref=ivar + +ivar=4+3 +ckval ivar 7 +iref+=5 +ckval ivar 12 +echo $(( iref+4 )) +(( iref=17 )) +ckval ivar 17 + +typeset +n iref +unset iref ivar + +typeset +n foo bar +unset foo bar + +# should the reference do immediate evaluation or deferred? +set -- one two three four +bar=4 +# XXX - what does foo get set to here? +typeset -n foo='bar[0]' +echo "expect <4>" +echo ${bar[0]} +echo "expect <4>" +echo ${foo} +echo "expect <4>" +echo $foo +ckval foo $bar + +# Need to add code and tests for nameref to array subscripts +bar=(one two three four) + +typeset -n foo='bar[0]' +typeset -n qux='bar[3]' +echo "expect " +echo ${bar[0]} +echo "expect " +echo ${foo} +echo "expect " +echo $foo +ckval foo $bar + +echo "expect " +echo $qux +ckval qux ${bar[3]} + +# Need to add code and tests for `for' loop nameref variables + +echo errors = $errors +exit $errors diff --git a/bash-5.1/tests/nameref5.sub b/bash-5.1/tests/nameref5.sub new file mode 100644 index 0000000000000000000000000000000000000000..6855e992c5c9f9d4ad47cb122ad9c24d78590d94 --- /dev/null +++ b/bash-5.1/tests/nameref5.sub @@ -0,0 +1,63 @@ +# 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 . +# +# nameref variables as for loop index variables are special +v1=1 +v2=2 + +# simple for loop +for v in v1 v2 +do + typeset -n ref=$v + echo $ref +done +unset v + +set -- first second third fourth fifth + +# unless you put a ${!v} in the for loop, ksh93 misbehaves +typeset -n v=v1 +for v in v1 v2; do + echo "${!v}: $v" +done +unset v + +# example cribbed from ksh93 o'reilly book +first="I am first" +second="I am in the middle" +third="I am last" + +typeset -n ref=first +for ref in first second third ; do + echo "ref -> ${!ref}, value: $ref" +done +echo final state: "ref -> ${!ref}, value: $ref" + +readonly one=1 +readonly two=2 +readonly three=3 + +typeset -n ref=one +for ref in one two three; do + echo "ref -> ${!ref}, value: $ref" +done +echo final state: "ref -> ${!ref}, value: $ref" + +unset ref +typeset -n ref=one +readonly ref + +for ref in one two three; do + echo "ref -> ${!ref}, value: $ref" +done +echo final state: "ref -> ${!ref}, value: $ref" diff --git a/bash-5.1/tests/nameref6.sub b/bash-5.1/tests/nameref6.sub new file mode 100644 index 0000000000000000000000000000000000000000..8497967f16decdfb2c8e06fe0cad38855c460ebf --- /dev/null +++ b/bash-5.1/tests/nameref6.sub @@ -0,0 +1,57 @@ +# 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 . +# +# these should be errors +typeset -n x=x +#echo $x -- $? + +typeset -n x[3]=x +#echo $x -- $? + +x=(the browns suck) +y=(one two three) +# should be an error but not disturb the current contents of x +# maybe rethink that later +typeset -n x=y +echo $x -- $? + +typeset -n + +unset x y + +y=42 +typeset -i x=1 + +# the integer attribute causes arithmetic eval to be done +# we should not allow namerefs to non-identifiers +typeset -n x=y +echo $x -- $? + +typeset +n x +echo $x -- $? + +# same kind of thing + +unset -n x +unset y + +set -- first second third +y=2 +typeset -i x=1 + +typeset -n x=y +echo $x -- $? +echo ${x} -- $? + +typeset +n x +echo $x -- $? diff --git a/bash-5.1/tests/nameref7.sub b/bash-5.1/tests/nameref7.sub new file mode 100644 index 0000000000000000000000000000000000000000..5e67ac04c51b048bbd99af2f669692587bed0e59 --- /dev/null +++ b/bash-5.1/tests/nameref7.sub @@ -0,0 +1,31 @@ +# 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 . +# +fn () +{ + declare -n var=foo; var=bar +} + +unset foo +fn +echo ${foo:-unset} + +unset -f fn +unset foo +fn() +{ + declare -n var; var=foo +} + +fn +echo ${foo:-unset} diff --git a/bash-5.1/tests/nameref8.sub b/bash-5.1/tests/nameref8.sub new file mode 100644 index 0000000000000000000000000000000000000000..465463bfbd2f62ffde0cb42d5a047560775b9dcc --- /dev/null +++ b/bash-5.1/tests/nameref8.sub @@ -0,0 +1,74 @@ +# 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 . +# +function f1 +{ + typeset -n v=$1 + + v=inside +} + +v=global +f1 v +echo $v + +unset v +unset -f f1 + +function foo +{ + typeset x=one + + typeset -n y=$1 + y=two + echo inside: $x +} + +foo x +echo outside: $x + +function foo2 +{ + typeset -n x=$1 + + x=foo +} + +foo2 x +echo $x + +unset -f foo +function foo { typeset -n v=$1; v=local; } + +v=global +foo v +echo $v + +unset v + +# invalid self reference at global scope +typeset -n v=v + +# can we catch a circular self-reference? +typeset -n v=w +typeset -n w=x +typeset -n x=v + +x=4 +echo x = $x + +unset -n v w x + +# can we keep local variables invisible when we add nameref attribute? +function f { typeset x; typeset -n x; x=y; } +f diff --git a/bash-5.1/tests/nameref9.sub b/bash-5.1/tests/nameref9.sub new file mode 100644 index 0000000000000000000000000000000000000000..e76c21b86b13cf51c63dc33b7b1838aa8c07b6d5 --- /dev/null +++ b/bash-5.1/tests/nameref9.sub @@ -0,0 +1,8 @@ +arr=( idx1 idx2 ) +i='arr[1]' +echo ${!i} +echo ${!i/x/X} + +typeset -n f='arr[1]' +echo ${f} +echo ${f/x/X} diff --git a/bash-5.1/tests/new-exp.right b/bash-5.1/tests/new-exp.right new file mode 100644 index 0000000000000000000000000000000000000000..752bba5ce0cf78b13cdafc0aa7625c8d5cf26eb0 --- /dev/null +++ b/bash-5.1/tests/new-exp.right @@ -0,0 +1,725 @@ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +./new-exp.tests: line 41: HOME: }: syntax error: operand expected (error token is "}") +unset +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <*@> +argv[1] = <*@> +argv[1] = <@*> +argv[1] = <)> +argv[1] = <")"> +argv[1] = <-abcd> +argv[2] = <-> +argv[1] = <-abcd> +argv[2] = <-> +argv[1] = <-abcd-> +bar foo +bar foo +bar foo +barfoo +barfoo +\x +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <4> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +./new-exp.tests: line 197: ABX: unbound variable +./new-exp.tests: line 201: $6: cannot assign in this way +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = + +This +string +has +multiple +lines. +This-string-has-multiple-lines. +this is a test of proc subst +this is test 2 +a +./new-exp2.sub: line 55: /tmp/redir-notthere: No such file or directory +1 + +./new-exp2.sub: line 62: 1111111111111111111111: command not found + +argv[1] = <6> +./new-exp.tests: line 302: ${#:}: bad substitution +argv[1] = <'> +argv[1] = <"> +argv[1] = <"hello"> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <"2 3"> +argv[1] = <"2:3"> +argv[1] = <"34"> +argv[1] = <"3456"> +argv[1] = <"3456"> +argv[1] = <"3456"> +argv[1] = <^A> +argv[2] = <^B> +argv[3] = <^?> +argv[1] = <^A> +argv[2] = <^B> +argv[3] = <^?> +argv[1] = <^A> +argv[2] = <^B> +argv[3] = <^?> +argv[1] = <^A> +argv[2] = <^B> +argv[3] = <^?> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +x +x +x +xabc +x +x +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[8] = +argv[9] = +./new-exp.tests: line 520: $9: unbound variable +./new-exp.tests: line 521: 9: unbound variable +./new-exp.tests: line 522: UNSET: unbound variable +./new-exp.tests: line 523: UNSET: unbound variable +./new-exp.tests: line 524: UNSET: unbound variable +./new-exp.tests: line 525: UNSET: unbound variable +./new-exp.tests: line 526: UNSET: unbound variable +argv[1] = <5> +argv[1] = <#> +argv[1] = <#> +argv[1] = <> +argv[1] = <_QUANTITY> +argv[2] = <_QUART> +argv[3] = <_QUEST> +argv[4] = <_QUILL> +argv[5] = <_QUOTA> +argv[6] = <_QUOTE> +argv[1] = <_QUANTITY> +argv[2] = <_QUART> +argv[3] = <_QUEST> +argv[4] = <_QUILL> +argv[5] = <_QUOTA> +argv[6] = <_QUOTE> +argv[1] = <_QUANTITY> +argv[2] = <_QUART> +argv[3] = <_QUEST> +argv[4] = <_QUILL> +argv[5] = <_QUOTA> +argv[6] = <_QUOTE> +argv[1] = <_QUANTITY-_QUART-_QUEST-_QUILL-_QUOTA-_QUOTE> +argv[1] = <_QUANTITY> +argv[2] = <_QUART> +argv[3] = <_QUEST> +argv[4] = <_QUILL> +argv[5] = <_QUOTA> +argv[6] = <_QUOTE> +argv[1] = <_QUANTITY> +argv[2] = <_QUART> +argv[3] = <_QUEST> +argv[4] = <_QUILL> +argv[5] = <_QUOTA> +argv[6] = <_QUOTE> +./new-exp3.sub: line 36: ${!_Q* }: bad substitution +./new-exp3.sub: line 41: ${!1*}: bad substitution +./new-exp3.sub: line 43: ${!@*}: bad substitution +Case01---3---A:B:C--- +Case02---1---A B C::--- +Case03---3---A:B:C--- +Case04---3---A:B:C--- +Case05---3---A:B:C--- +Case06---1---A B C::--- +Case07---3---A:B:C--- +Case08---3---A:B:C--- +./new-exp.tests: line 546: ${$(($#-1))}: bad substitution +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = <> +./new-exp.tests: line 565: $(($# - 2)): substring expression < 0 +./new-exp.tests: line 567: -2: substring expression < 0 +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = <.> +argv[6] = +argv[7] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = <.> +argv[6] = +argv[7] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = <.> +argv[6] = +argv[7] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +two +one +ne +one + +one +one +one +1 2 3 4 5 6 7 8 9 +9 +9 +0 +9 +8 9 +123456789 +9 +9 +4, A B C D +2, C D +h +h +--blah +--blah +lah +lah +abcde abcfg abchi +foode foofg foohi +argv[1] = <> +argv[1] = <+> +argv[1] = <+^?> +argv[1] = <+> +argv[1] = <^?2> +argv[1] = <^?2> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <12> +argv[1] = <> +argv[1] = <> +argv[1] = +foo is a function +foo () +{ + echo < <(cat x1) +} +foo () +{ + echo < <(cat x1) +} +bar () { echo < <(cat x1) } +bar is a function +bar () +{ + echo < <(cat x1) +} +start;ing0;ing1;ing2;ing3;ing4;ing5;ing6;ing7;ing8;ing9;ing10;ing11;ing12;ing13;ing14;ing15;ing16;ing17;ing18;ing19;ing20;ing21;ing22;ing23;ing24;ing25;ing26;ing27;ing28;ing29;ing30;ing31;ing32;ing33;ing34;ing35;ing36;ing37;ing38;ing39;ing40;ing41;ing42;ing43;ing44;ing45;ing46;ing47;ing48;ing49;ing50;ing51;ing52;ing53;ing54;ing55;ing56;ing57;ing58;ing59;ing60;ing61;ing62;ing63;ing64;ing65;ing66;ing67;ing68;ing69;ing70;ing71;ing72;ing73;ing74;ing75;ing76;ing77;ing78;ing79;ing80;ing81;ing82;ing83;ing84;ing85;ing86;ing87;ing88;ing89;ing90;ing91;ing92;ing93;ing94;ing95;ing96;ing97;ing98;ing99;ing100;ing101;ing102;ing103;ing104;ing105;ing106;ing107;ing108;ing109;ing110;ing111;ing112;ing113;ing114;ing115;ing116;ing117;ing118;ing119;ing120;ing121;ing122;ing123;ing124;ing125;ing126;ing127;ing128;ing129;ing130;ing131;ing132;ing133;ing134;ing135;ing136;ing137;ing138;ing139;ing140;ing141;ing142;ing143;ing144;ing145;ing146;ing147;ing148;ing149;ing150;ing151;ing152;ing153;ing154;ing155;ing156;ing157;ing158;ing159;ing160;ing161;ing162;ing163;ing164;ing165;ing166;ing167;ing168;ing169;ing170;ing171;ing172;ing173;ing174;ing175;ing176;ing177;ing178;ing179;ing180;ing181;ing182;ing183;ing184;ing185;ing186;ing187;ing188;ing189;ing190;ing191;ing192;ing193;ing194;ing195;ing196;ing197;ing198;ing199;ing200;ing201;ing202;ing203;ing204;ing205;ing206;ing207;ing208;ing209;ing210;ing211;ing212;ing213;ing214;ing215;ing216;ing217;ing218;ing219;ing220;ing221;ing222;ing223;ing224;ing225;ing226;ing227;ing228;ing229;ing230;ing231;ing232;ing233;ing234;ing235;ing236;ing237;ing238;ing239;ing240;ing241;ing242;ing243;ing244;ing245;ing246;ing247;ing248;ing249;ing250;ing251;ing252;ing253;ing254;ing255;ing256;ing257;ing258;ing259;ing260;ing261;ing262;ing263;ing264;ing265;ing266;ing267;ing268;ing269;ing270;ing271;ing272;ing273;ing274;ing275;ing276;ing277;ing278;ing279;ing280;ing281;ing282;ing283;ing284;ing285;ing286;ing287;ing288;ing289;ing290;ing291;ing292;ing293;ing294;ing295;ing296;ing297;ing298;ing299;ing300;ing301;ing302;ing303;ing304;ing305;ing306;ing307;ing308;ing309;ing310;ing311;ing312;ing313;ing314;ing315;ing316;ing317;ing318;ing319;ing320;ing321;ing322;ing323;ing324;ing325;ing326;ing327;ing328;ing329;ing330;ing331;ing332;ing333;ing334;ing335;ing336;ing337;ing338;ing339;ing340;ing341;ing342;ing343;ing344;ing345;ing346;ing347;ing348;ing349;ing350;ing351;ing352;ing353;ing354;ing355;ing356;ing357;ing358;ing359;ing360;ing361;ing362;ing363;ing364;ing365;ing366;ing367;ing368;ing369;ing370;ing371;ing372;ing373;ing374;ing375;ing376;ing377;ing378;ing379;ing380;ing381;ing382;ing383;ing384;ing385;ing386;ing387;ing388;ing389;ing390;ing391;ing392;ing393;ing394;ing395;ing396;ing397;ing398;ing399;ing400;ing401;ing402;ing403;ing404;ing405;ing406;ing407;ing408;ing409;ing410;ing411;ing412;ing413;ing414;ing415;ing416;ing417;ing418;ing419;ing420;ing421;ing422;ing423;ing424;ing425;ing426;ing427;ing428;ing429;ing430;ing431;ing432;ing433;ing434;ing435;ing436;ing437;ing438;ing439;ing440;ing441;ing442;ing443;ing444;ing445;ing446;ing447;ing448;ing449;ing450;ing451;ing452;ing453;ing454;ing455;ing456;ing457;ing458;ing459;ing460;ing461;ing462;ing463;ing464;ing465;ing466;ing467;ing468;ing469;ing470;ing471;ing472;ing473;ing474;ing475;ing476;ing477;ing478;ing479;ing480;ing481;ing482;ing483;ing484;ing485;ing486;ing487;ing488;ing489;ing490;ing491;ing492;ing493;ing494;ing495;ing496;ing497;ing498;ing499;ing500;ing501;ing502;ing503;ing504;ing505;ing506;ing507;ing508;ing509;ing510;ing511;ing512;ing513;ing514;ing515;ing516;ing517;ing518;ing519;ing520;ing521;ing522;ing523;ing524;ing525;ing526;ing527;ing528;ing529;ing530;ing531;ing532;ing533;ing534;ing535;ing536;ing537;ing538;ing539;ing540;ing541;ing542;ing543;ing544;ing545;ing546;ing547;ing548;ing549;ing550;ing551;ing552;ing553;ing554;ing555;ing556;ing557;ing558;ing559;ing560;ing561;ing562;ing563;ing564;ing565;ing566;ing567;ing568;ing569;ing570;ing571;ing572;ing573;ing574;ing575;ing576;ing577;ing578;ing579;ing580;ing581;ing582;ing583;ing584;ing585;ing586;ing587;ing588;ing589;ing590;ing591;ing592;ing593;ing594;ing595;ing596;ing597;ing598;ing599;ing600;ing601;ing602;ing603;ing604;ing605;ing606;ing607;ing608;ing609;ing610;ing611;ing612;ing613;ing614;ing615;ing616;ing617;ing618;ing619;ing620;ing621;ing622;ing623;ing624;ing625;ing626;ing627;ing628;ing629;ing630;ing631;ing632;ing633;ing634;ing635;ing636;ing637;ing638;ing639;ing640;ing641;ing642;ing643;ing644;ing645;ing646;ing647;ing648;ing649;ing650;ing651;ing652;ing653;ing654;ing655;ing656;ing657;ing658;ing659;ing660;ing661;ing662;ing663;ing664;ing665;ing666;ing667;ing668;ing669;ing670;ing671;ing672;ing673;ing674;ing675;ing676;ing677;ing678;ing679;ing680;ing681;ing682;ing683;ing684;ing685;ing686;ing687;ing688;ing689;ing690;ing691;ing692;ing693;ing694;ing695;ing696;ing697;ing698;ing699;ing700;ing701;ing702;ing703;ing704;ing705;ing706;ing707;ing708;ing709;ing710;ing711;ing712;ing713;ing714;ing715;ing716;ing717;ing718;ing719;ing720;ing721;ing722;ing723;ing724;ing725;ing726;ing727;ing728;ing729;ing730;ing731;ing732;ing733;ing734;ing735;ing736;ing737;ing738;ing739;ing740;ing741;ing742;ing743;ing744;ing745;ing746;ing747;ing748;ing749;ing750;ing751;ing752;ing753;ing754;ing755;ing756;ing757;ing758;ing759;ing760;ing761;ing762;ing763;ing764;ing765;ing766;ing767;ing768;ing769;ing770;ing771;ing772;ing773;ing774;ing775;ing776;ing777;ing778;ing779;ing780;ing781;ing782;ing783;ing784;ing785;ing786;ing787;ing788;ing789;ing790;ing791;ing792;ing793;ing794;ing795;ing796;ing797;ing798;ing799;ing800;ing801;ing802;ing803;ing804;ing805;ing806;ing807;ing808;ing809;ing810;ing811;ing812;ing813;ing814;ing815;ing816;ing817;ing818;ing819;ing820;ing821;ing822;ing823;ing824;ing825;ing826;ing827;ing828;ing829;ing830;ing831;ing832;ing833;ing834;ing835;ing836;ing837;ing838;ing839;ing840;ing841;ing842;ing843;ing844;ing845;ing846;ing847;ing848;ing849;ing850;ing851;ing852;ing853;ing854;ing855;ing856;ing857;ing858;ing859;ing860;ing861;ing862;ing863;ing864;ing865;ing866;ing867;ing868;ing869;ing870;ing871;ing872;ing873;ing874;ing875;ing876;ing877;ing878;ing879;ing880;ing881;ing882;ing883;ing884;ing885;ing886;ing887;ing888;ing889;ing890;ing891;ing892;ing893;ing894;ing895;ing896;ing897;ing898;ing899;ing900;ing901;ing902;ing903;ing904;ing905;ing906;ing907;ing908;ing909;ing910;ing911;ing912;ing913;ing914;ing915;ing916;ing917;ing918;ing919;ing920;ing921;ing922;ing923;ing924;ing925;ing926;ing927;ing928;ing929;ing930;ing931;ing932;ing933;ing934;ing935;ing936;ing937;ing938;ing939;ing940;ing941;ing942;ing943;ing944;ing945;ing946;ing947;ing948;ing949;ing950;ing951;ing952;ing953;ing954;ing955;ing956;ing957;ing958;ing959;ing960;ing961;ing962;ing963;ing964;ing965;ing966;ing967;ing968;ing969;ing970;ing971;ing972;ing973;ing974;ing975;ing976;ing977;ing978;ing979;ing980;ing981;ing982;ing983;ing984;ing985;ing986;ing987;ing988;ing989;ing990;ing991;ing992;ing993;ing994;ing995;ing996;ing997;ing998;ing999 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999 +start;ing0;ing1;ing2;ing3;ing4;ing5;ing6;ing7;ing8;ing9;ing10;ing11;ing12;ing13;ing14;ing15;ing16;ing17;ing18;ing19;ing20;ing21;ing22;ing23;ing24;ing25;ing26;ing27;ing28;ing29;ing30;ing31;ing32;ing33;ing34;ing35;ing36;ing37;ing38;ing39;ing40;ing41;ing42;ing43;ing44;ing45;ing46;ing47;ing48;ing49;ing50;ing51;ing52;ing53;ing54;ing55;ing56;ing57;ing58;ing59;ing60;ing61;ing62;ing63;ing64;ing65;ing66;ing67;ing68;ing69;ing70;ing71;ing72;ing73;ing74;ing75;ing76;ing77;ing78;ing79;ing80;ing81;ing82;ing83;ing84;ing85;ing86;ing87;ing88;ing89;ing90;ing91;ing92;ing93;ing94;ing95;ing96;ing97;ing98;ing99;ing100;ing101;ing102;ing103;ing104;ing105;ing106;ing107;ing108;ing109;ing110;ing111;ing112;ing113;ing114;ing115;ing116;ing117;ing118;ing119;ing120;ing121;ing122;ing123;ing124;ing125;ing126;ing127;ing128;ing129;ing130;ing131;ing132;ing133;ing134;ing135;ing136;ing137;ing138;ing139;ing140;ing141;ing142;ing143;ing144;ing145;ing146;ing147;ing148;ing149;ing150;ing151;ing152;ing153;ing154;ing155;ing156;ing157;ing158;ing159;ing160;ing161;ing162;ing163;ing164;ing165;ing166;ing167;ing168;ing169;ing170;ing171;ing172;ing173;ing174;ing175;ing176;ing177;ing178;ing179;ing180;ing181;ing182;ing183;ing184;ing185;ing186;ing187;ing188;ing189;ing190;ing191;ing192;ing193;ing194;ing195;ing196;ing197;ing198;ing199;ing200;ing201;ing202;ing203;ing204;ing205;ing206;ing207;ing208;ing209;ing210;ing211;ing212;ing213;ing214;ing215;ing216;ing217;ing218;ing219;ing220;ing221;ing222;ing223;ing224;ing225;ing226;ing227;ing228;ing229;ing230;ing231;ing232;ing233;ing234;ing235;ing236;ing237;ing238;ing239;ing240;ing241;ing242;ing243;ing244;ing245;ing246;ing247;ing248;ing249;ing250;ing251;ing252;ing253;ing254;ing255;ing256;ing257;ing258;ing259;ing260;ing261;ing262;ing263;ing264;ing265;ing266;ing267;ing268;ing269;ing270;ing271;ing272;ing273;ing274;ing275;ing276;ing277;ing278;ing279;ing280;ing281;ing282;ing283;ing284;ing285;ing286;ing287;ing288;ing289;ing290;ing291;ing292;ing293;ing294;ing295;ing296;ing297;ing298;ing299;ing300;ing301;ing302;ing303;ing304;ing305;ing306;ing307;ing308;ing309;ing310;ing311;ing312;ing313;ing314;ing315;ing316;ing317;ing318;ing319;ing320;ing321;ing322;ing323;ing324;ing325;ing326;ing327;ing328;ing329;ing330;ing331;ing332;ing333;ing334;ing335;ing336;ing337;ing338;ing339;ing340;ing341;ing342;ing343;ing344;ing345;ing346;ing347;ing348;ing349;ing350;ing351;ing352;ing353;ing354;ing355;ing356;ing357;ing358;ing359;ing360;ing361;ing362;ing363;ing364;ing365;ing366;ing367;ing368;ing369;ing370;ing371;ing372;ing373;ing374;ing375;ing376;ing377;ing378;ing379;ing380;ing381;ing382;ing383;ing384;ing385;ing386;ing387;ing388;ing389;ing390;ing391;ing392;ing393;ing394;ing395;ing396;ing397;ing398;ing399;ing400;ing401;ing402;ing403;ing404;ing405;ing406;ing407;ing408;ing409;ing410;ing411;ing412;ing413;ing414;ing415;ing416;ing417;ing418;ing419;ing420;ing421;ing422;ing423;ing424;ing425;ing426;ing427;ing428;ing429;ing430;ing431;ing432;ing433;ing434;ing435;ing436;ing437;ing438;ing439;ing440;ing441;ing442;ing443;ing444;ing445;ing446;ing447;ing448;ing449;ing450;ing451;ing452;ing453;ing454;ing455;ing456;ing457;ing458;ing459;ing460;ing461;ing462;ing463;ing464;ing465;ing466;ing467;ing468;ing469;ing470;ing471;ing472;ing473;ing474;ing475;ing476;ing477;ing478;ing479;ing480;ing481;ing482;ing483;ing484;ing485;ing486;ing487;ing488;ing489;ing490;ing491;ing492;ing493;ing494;ing495;ing496;ing497;ing498;ing499;ing500;ing501;ing502;ing503;ing504;ing505;ing506;ing507;ing508;ing509;ing510;ing511;ing512;ing513;ing514;ing515;ing516;ing517;ing518;ing519;ing520;ing521;ing522;ing523;ing524;ing525;ing526;ing527;ing528;ing529;ing530;ing531;ing532;ing533;ing534;ing535;ing536;ing537;ing538;ing539;ing540;ing541;ing542;ing543;ing544;ing545;ing546;ing547;ing548;ing549;ing550;ing551;ing552;ing553;ing554;ing555;ing556;ing557;ing558;ing559;ing560;ing561;ing562;ing563;ing564;ing565;ing566;ing567;ing568;ing569;ing570;ing571;ing572;ing573;ing574;ing575;ing576;ing577;ing578;ing579;ing580;ing581;ing582;ing583;ing584;ing585;ing586;ing587;ing588;ing589;ing590;ing591;ing592;ing593;ing594;ing595;ing596;ing597;ing598;ing599;ing600;ing601;ing602;ing603;ing604;ing605;ing606;ing607;ing608;ing609;ing610;ing611;ing612;ing613;ing614;ing615;ing616;ing617;ing618;ing619;ing620;ing621;ing622;ing623;ing624;ing625;ing626;ing627;ing628;ing629;ing630;ing631;ing632;ing633;ing634;ing635;ing636;ing637;ing638;ing639;ing640;ing641;ing642;ing643;ing644;ing645;ing646;ing647;ing648;ing649;ing650;ing651;ing652;ing653;ing654;ing655;ing656;ing657;ing658;ing659;ing660;ing661;ing662;ing663;ing664;ing665;ing666;ing667;ing668;ing669;ing670;ing671;ing672;ing673;ing674;ing675;ing676;ing677;ing678;ing679;ing680;ing681;ing682;ing683;ing684;ing685;ing686;ing687;ing688;ing689;ing690;ing691;ing692;ing693;ing694;ing695;ing696;ing697;ing698;ing699;ing700;ing701;ing702;ing703;ing704;ing705;ing706;ing707;ing708;ing709;ing710;ing711;ing712;ing713;ing714;ing715;ing716;ing717;ing718;ing719;ing720;ing721;ing722;ing723;ing724;ing725;ing726;ing727;ing728;ing729;ing730;ing731;ing732;ing733;ing734;ing735;ing736;ing737;ing738;ing739;ing740;ing741;ing742;ing743;ing744;ing745;ing746;ing747;ing748;ing749;ing750;ing751;ing752;ing753;ing754;ing755;ing756;ing757;ing758;ing759;ing760;ing761;ing762;ing763;ing764;ing765;ing766;ing767;ing768;ing769;ing770;ing771;ing772;ing773;ing774;ing775;ing776;ing777;ing778;ing779;ing780;ing781;ing782;ing783;ing784;ing785;ing786;ing787;ing788;ing789;ing790;ing791;ing792;ing793;ing794;ing795;ing796;ing797;ing798;ing799;ing800;ing801;ing802;ing803;ing804;ing805;ing806;ing807;ing808;ing809;ing810;ing811;ing812;ing813;ing814;ing815;ing816;ing817;ing818;ing819;ing820;ing821;ing822;ing823;ing824;ing825;ing826;ing827;ing828;ing829;ing830;ing831;ing832;ing833;ing834;ing835;ing836;ing837;ing838;ing839;ing840;ing841;ing842;ing843;ing844;ing845;ing846;ing847;ing848;ing849;ing850;ing851;ing852;ing853;ing854;ing855;ing856;ing857;ing858;ing859;ing860;ing861;ing862;ing863;ing864;ing865;ing866;ing867;ing868;ing869;ing870;ing871;ing872;ing873;ing874;ing875;ing876;ing877;ing878;ing879;ing880;ing881;ing882;ing883;ing884;ing885;ing886;ing887;ing888;ing889;ing890;ing891;ing892;ing893;ing894;ing895;ing896;ing897;ing898;ing899;ing900;ing901;ing902;ing903;ing904;ing905;ing906;ing907;ing908;ing909;ing910;ing911;ing912;ing913;ing914;ing915;ing916;ing917;ing918;ing919;ing920;ing921;ing922;ing923;ing924;ing925;ing926;ing927;ing928;ing929;ing930;ing931;ing932;ing933;ing934;ing935;ing936;ing937;ing938;ing939;ing940;ing941;ing942;ing943;ing944;ing945;ing946;ing947;ing948;ing949;ing950;ing951;ing952;ing953;ing954;ing955;ing956;ing957;ing958;ing959;ing960;ing961;ing962;ing963;ing964;ing965;ing966;ing967;ing968;ing969;ing970;ing971;ing972;ing973;ing974;ing975;ing976;ing977;ing978;ing979;ing980;ing981;ing982;ing983;ing984;ing985;ing986;ing987;ing988;ing989;ing990;ing991;ing992;ing993;ing994;ing995;ing996;ing997;ing998;ing999 +start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999 +start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999 +ing999 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +art;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999 +start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string9 +start;ing0;ing1;ing2;ing3;ing4;ing5;ing6;ing7;ing8;ing9;ing10;ing11;ing12;ing13;ing14;ing15;ing16;ing17;ing18;ing19;ing20;ing21;ing22;ing23;ing24;ing25;ing26;ing27;ing28;ing29;ing30;ing31;ing32;ing33;ing34;ing35;ing36;ing37;ing38;ing39;ing40;ing41;ing42;ing43;ing44;ing45;ing46;ing47;ing48;ing49;ing50;ing51;ing52;ing53;ing54;ing55;ing56;ing57;ing58;ing59;ing60;ing61;ing62;ing63;ing64;ing65;ing66;ing67;ing68;ing69;ing70;ing71;ing72;ing73;ing74;ing75;ing76;ing77;ing78;ing79;ing80;ing81;ing82;ing83;ing84;ing85;ing86;ing87;ing88;ing89;ing90;ing91;ing92;ing93;ing94;ing95;ing96;ing97;ing98;ing99;ing100;ing101;ing102;ing103;ing104;ing105;ing106;ing107;ing108;ing109;ing110;ing111;ing112;ing113;ing114;ing115;ing116;ing117;ing118;ing119;ing120;ing121;ing122;ing123;ing124;ing125;ing126;ing127;ing128;ing129;ing130;ing131;ing132;ing133;ing134;ing135;ing136;ing137;ing138;ing139;ing140;ing141;ing142;ing143;ing144;ing145;ing146;ing147;ing148;ing149;ing150;ing151;ing152;ing153;ing154;ing155;ing156;ing157;ing158;ing159;ing160;ing161;ing162;ing163;ing164;ing165;ing166;ing167;ing168;ing169;ing170;ing171;ing172;ing173;ing174;ing175;ing176;ing177;ing178;ing179;ing180;ing181;ing182;ing183;ing184;ing185;ing186;ing187;ing188;ing189;ing190;ing191;ing192;ing193;ing194;ing195;ing196;ing197;ing198;ing199;ing200;ing201;ing202;ing203;ing204;ing205;ing206;ing207;ing208;ing209;ing210;ing211;ing212;ing213;ing214;ing215;ing216;ing217;ing218;ing219;ing220;ing221;ing222;ing223;ing224;ing225;ing226;ing227;ing228;ing229;ing230;ing231;ing232;ing233;ing234;ing235;ing236;ing237;ing238;ing239;ing240;ing241;ing242;ing243;ing244;ing245;ing246;ing247;ing248;ing249;ing250;ing251;ing252;ing253;ing254;ing255;ing256;ing257;ing258;ing259;ing260;ing261;ing262;ing263;ing264;ing265;ing266;ing267;ing268;ing269;ing270;ing271;ing272;ing273;ing274;ing275;ing276;ing277;ing278;ing279;ing280;ing281;ing282;ing283;ing284;ing285;ing286;ing287;ing288;ing289;ing290;ing291;ing292;ing293;ing294;ing295;ing296;ing297;ing298;ing299;ing300;ing301;ing302;ing303;ing304;ing305;ing306;ing307;ing308;ing309;ing310;ing311;ing312;ing313;ing314;ing315;ing316;ing317;ing318;ing319;ing320;ing321;ing322;ing323;ing324;ing325;ing326;ing327;ing328;ing329;ing330;ing331;ing332;ing333;ing334;ing335;ing336;ing337;ing338;ing339;ing340;ing341;ing342;ing343;ing344;ing345;ing346;ing347;ing348;ing349;ing350;ing351;ing352;ing353;ing354;ing355;ing356;ing357;ing358;ing359;ing360;ing361;ing362;ing363;ing364;ing365;ing366;ing367;ing368;ing369;ing370;ing371;ing372;ing373;ing374;ing375;ing376;ing377;ing378;ing379;ing380;ing381;ing382;ing383;ing384;ing385;ing386;ing387;ing388;ing389;ing390;ing391;ing392;ing393;ing394;ing395;ing396;ing397;ing398;ing399;ing400;ing401;ing402;ing403;ing404;ing405;ing406;ing407;ing408;ing409;ing410;ing411;ing412;ing413;ing414;ing415;ing416;ing417;ing418;ing419;ing420;ing421;ing422;ing423;ing424;ing425;ing426;ing427;ing428;ing429;ing430;ing431;ing432;ing433;ing434;ing435;ing436;ing437;ing438;ing439;ing440;ing441;ing442;ing443;ing444;ing445;ing446;ing447;ing448;ing449;ing450;ing451;ing452;ing453;ing454;ing455;ing456;ing457;ing458;ing459;ing460;ing461;ing462;ing463;ing464;ing465;ing466;ing467;ing468;ing469;ing470;ing471;ing472;ing473;ing474;ing475;ing476;ing477;ing478;ing479;ing480;ing481;ing482;ing483;ing484;ing485;ing486;ing487;ing488;ing489;ing490;ing491;ing492;ing493;ing494;ing495;ing496;ing497;ing498;ing499;ing500;ing501;ing502;ing503;ing504;ing505;ing506;ing507;ing508;ing509;ing510;ing511;ing512;ing513;ing514;ing515;ing516;ing517;ing518;ing519;ing520;ing521;ing522;ing523;ing524;ing525;ing526;ing527;ing528;ing529;ing530;ing531;ing532;ing533;ing534;ing535;ing536;ing537;ing538;ing539;ing540;ing541;ing542;ing543;ing544;ing545;ing546;ing547;ing548;ing549;ing550;ing551;ing552;ing553;ing554;ing555;ing556;ing557;ing558;ing559;ing560;ing561;ing562;ing563;ing564;ing565;ing566;ing567;ing568;ing569;ing570;ing571;ing572;ing573;ing574;ing575;ing576;ing577;ing578;ing579;ing580;ing581;ing582;ing583;ing584;ing585;ing586;ing587;ing588;ing589;ing590;ing591;ing592;ing593;ing594;ing595;ing596;ing597;ing598;ing599;ing600;ing601;ing602;ing603;ing604;ing605;ing606;ing607;ing608;ing609;ing610;ing611;ing612;ing613;ing614;ing615;ing616;ing617;ing618;ing619;ing620;ing621;ing622;ing623;ing624;ing625;ing626;ing627;ing628;ing629;ing630;ing631;ing632;ing633;ing634;ing635;ing636;ing637;ing638;ing639;ing640;ing641;ing642;ing643;ing644;ing645;ing646;ing647;ing648;ing649;ing650;ing651;ing652;ing653;ing654;ing655;ing656;ing657;ing658;ing659;ing660;ing661;ing662;ing663;ing664;ing665;ing666;ing667;ing668;ing669;ing670;ing671;ing672;ing673;ing674;ing675;ing676;ing677;ing678;ing679;ing680;ing681;ing682;ing683;ing684;ing685;ing686;ing687;ing688;ing689;ing690;ing691;ing692;ing693;ing694;ing695;ing696;ing697;ing698;ing699;ing700;ing701;ing702;ing703;ing704;ing705;ing706;ing707;ing708;ing709;ing710;ing711;ing712;ing713;ing714;ing715;ing716;ing717;ing718;ing719;ing720;ing721;ing722;ing723;ing724;ing725;ing726;ing727;ing728;ing729;ing730;ing731;ing732;ing733;ing734;ing735;ing736;ing737;ing738;ing739;ing740;ing741;ing742;ing743;ing744;ing745;ing746;ing747;ing748;ing749;ing750;ing751;ing752;ing753;ing754;ing755;ing756;ing757;ing758;ing759;ing760;ing761;ing762;ing763;ing764;ing765;ing766;ing767;ing768;ing769;ing770;ing771;ing772;ing773;ing774;ing775;ing776;ing777;ing778;ing779;ing780;ing781;ing782;ing783;ing784;ing785;ing786;ing787;ing788;ing789;ing790;ing791;ing792;ing793;ing794;ing795;ing796;ing797;ing798;ing799;ing800;ing801;ing802;ing803;ing804;ing805;ing806;ing807;ing808;ing809;ing810;ing811;ing812;ing813;ing814;ing815;ing816;ing817;ing818;ing819;ing820;ing821;ing822;ing823;ing824;ing825;ing826;ing827;ing828;ing829;ing830;ing831;ing832;ing833;ing834;ing835;ing836;ing837;ing838;ing839;ing840;ing841;ing842;ing843;ing844;ing845;ing846;ing847;ing848;ing849;ing850;ing851;ing852;ing853;ing854;ing855;ing856;ing857;ing858;ing859;ing860;ing861;ing862;ing863;ing864;ing865;ing866;ing867;ing868;ing869;ing870;ing871;ing872;ing873;ing874;ing875;ing876;ing877;ing878;ing879;ing880;ing881;ing882;ing883;ing884;ing885;ing886;ing887;ing888;ing889;ing890;ing891;ing892;ing893;ing894;ing895;ing896;ing897;ing898;ing899;ing900;ing901;ing902;ing903;ing904;ing905;ing906;ing907;ing908;ing909;ing910;ing911;ing912;ing913;ing914;ing915;ing916;ing917;ing918;ing919;ing920;ing921;ing922;ing923;ing924;ing925;ing926;ing927;ing928;ing929;ing930;ing931;ing932;ing933;ing934;ing935;ing936;ing937;ing938;ing939;ing940;ing941;ing942;ing943;ing944;ing945;ing946;ing947;ing948;ing949;ing950;ing951;ing952;ing953;ing954;ing955;ing956;ing957;ing958;ing959;ing960;ing961;ing962;ing963;ing964;ing965;ing966;ing967;ing968;ing969;ing970;ing971;ing972;ing973;ing974;ing975;ing976;ing977;ing978;ing979;ing980;ing981;ing982;ing983;ing984;ing985;ing986;ing987;ing988;ing989;ing990;ing991;ing992;ing993;ing994;ing995;ing996;ing997;ing998;ing999 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999 +start;ing0;ing1;ing2;ing3;ing4;ing5;ing6;ing7;ing8;ing9;ing10;ing11;ing12;ing13;ing14;ing15;ing16;ing17;ing18;ing19;ing20;ing21;ing22;ing23;ing24;ing25;ing26;ing27;ing28;ing29;ing30;ing31;ing32;ing33;ing34;ing35;ing36;ing37;ing38;ing39;ing40;ing41;ing42;ing43;ing44;ing45;ing46;ing47;ing48;ing49;ing50;ing51;ing52;ing53;ing54;ing55;ing56;ing57;ing58;ing59;ing60;ing61;ing62;ing63;ing64;ing65;ing66;ing67;ing68;ing69;ing70;ing71;ing72;ing73;ing74;ing75;ing76;ing77;ing78;ing79;ing80;ing81;ing82;ing83;ing84;ing85;ing86;ing87;ing88;ing89;ing90;ing91;ing92;ing93;ing94;ing95;ing96;ing97;ing98;ing99;ing100;ing101;ing102;ing103;ing104;ing105;ing106;ing107;ing108;ing109;ing110;ing111;ing112;ing113;ing114;ing115;ing116;ing117;ing118;ing119;ing120;ing121;ing122;ing123;ing124;ing125;ing126;ing127;ing128;ing129;ing130;ing131;ing132;ing133;ing134;ing135;ing136;ing137;ing138;ing139;ing140;ing141;ing142;ing143;ing144;ing145;ing146;ing147;ing148;ing149;ing150;ing151;ing152;ing153;ing154;ing155;ing156;ing157;ing158;ing159;ing160;ing161;ing162;ing163;ing164;ing165;ing166;ing167;ing168;ing169;ing170;ing171;ing172;ing173;ing174;ing175;ing176;ing177;ing178;ing179;ing180;ing181;ing182;ing183;ing184;ing185;ing186;ing187;ing188;ing189;ing190;ing191;ing192;ing193;ing194;ing195;ing196;ing197;ing198;ing199;ing200;ing201;ing202;ing203;ing204;ing205;ing206;ing207;ing208;ing209;ing210;ing211;ing212;ing213;ing214;ing215;ing216;ing217;ing218;ing219;ing220;ing221;ing222;ing223;ing224;ing225;ing226;ing227;ing228;ing229;ing230;ing231;ing232;ing233;ing234;ing235;ing236;ing237;ing238;ing239;ing240;ing241;ing242;ing243;ing244;ing245;ing246;ing247;ing248;ing249;ing250;ing251;ing252;ing253;ing254;ing255;ing256;ing257;ing258;ing259;ing260;ing261;ing262;ing263;ing264;ing265;ing266;ing267;ing268;ing269;ing270;ing271;ing272;ing273;ing274;ing275;ing276;ing277;ing278;ing279;ing280;ing281;ing282;ing283;ing284;ing285;ing286;ing287;ing288;ing289;ing290;ing291;ing292;ing293;ing294;ing295;ing296;ing297;ing298;ing299;ing300;ing301;ing302;ing303;ing304;ing305;ing306;ing307;ing308;ing309;ing310;ing311;ing312;ing313;ing314;ing315;ing316;ing317;ing318;ing319;ing320;ing321;ing322;ing323;ing324;ing325;ing326;ing327;ing328;ing329;ing330;ing331;ing332;ing333;ing334;ing335;ing336;ing337;ing338;ing339;ing340;ing341;ing342;ing343;ing344;ing345;ing346;ing347;ing348;ing349;ing350;ing351;ing352;ing353;ing354;ing355;ing356;ing357;ing358;ing359;ing360;ing361;ing362;ing363;ing364;ing365;ing366;ing367;ing368;ing369;ing370;ing371;ing372;ing373;ing374;ing375;ing376;ing377;ing378;ing379;ing380;ing381;ing382;ing383;ing384;ing385;ing386;ing387;ing388;ing389;ing390;ing391;ing392;ing393;ing394;ing395;ing396;ing397;ing398;ing399;ing400;ing401;ing402;ing403;ing404;ing405;ing406;ing407;ing408;ing409;ing410;ing411;ing412;ing413;ing414;ing415;ing416;ing417;ing418;ing419;ing420;ing421;ing422;ing423;ing424;ing425;ing426;ing427;ing428;ing429;ing430;ing431;ing432;ing433;ing434;ing435;ing436;ing437;ing438;ing439;ing440;ing441;ing442;ing443;ing444;ing445;ing446;ing447;ing448;ing449;ing450;ing451;ing452;ing453;ing454;ing455;ing456;ing457;ing458;ing459;ing460;ing461;ing462;ing463;ing464;ing465;ing466;ing467;ing468;ing469;ing470;ing471;ing472;ing473;ing474;ing475;ing476;ing477;ing478;ing479;ing480;ing481;ing482;ing483;ing484;ing485;ing486;ing487;ing488;ing489;ing490;ing491;ing492;ing493;ing494;ing495;ing496;ing497;ing498;ing499;ing500;ing501;ing502;ing503;ing504;ing505;ing506;ing507;ing508;ing509;ing510;ing511;ing512;ing513;ing514;ing515;ing516;ing517;ing518;ing519;ing520;ing521;ing522;ing523;ing524;ing525;ing526;ing527;ing528;ing529;ing530;ing531;ing532;ing533;ing534;ing535;ing536;ing537;ing538;ing539;ing540;ing541;ing542;ing543;ing544;ing545;ing546;ing547;ing548;ing549;ing550;ing551;ing552;ing553;ing554;ing555;ing556;ing557;ing558;ing559;ing560;ing561;ing562;ing563;ing564;ing565;ing566;ing567;ing568;ing569;ing570;ing571;ing572;ing573;ing574;ing575;ing576;ing577;ing578;ing579;ing580;ing581;ing582;ing583;ing584;ing585;ing586;ing587;ing588;ing589;ing590;ing591;ing592;ing593;ing594;ing595;ing596;ing597;ing598;ing599;ing600;ing601;ing602;ing603;ing604;ing605;ing606;ing607;ing608;ing609;ing610;ing611;ing612;ing613;ing614;ing615;ing616;ing617;ing618;ing619;ing620;ing621;ing622;ing623;ing624;ing625;ing626;ing627;ing628;ing629;ing630;ing631;ing632;ing633;ing634;ing635;ing636;ing637;ing638;ing639;ing640;ing641;ing642;ing643;ing644;ing645;ing646;ing647;ing648;ing649;ing650;ing651;ing652;ing653;ing654;ing655;ing656;ing657;ing658;ing659;ing660;ing661;ing662;ing663;ing664;ing665;ing666;ing667;ing668;ing669;ing670;ing671;ing672;ing673;ing674;ing675;ing676;ing677;ing678;ing679;ing680;ing681;ing682;ing683;ing684;ing685;ing686;ing687;ing688;ing689;ing690;ing691;ing692;ing693;ing694;ing695;ing696;ing697;ing698;ing699;ing700;ing701;ing702;ing703;ing704;ing705;ing706;ing707;ing708;ing709;ing710;ing711;ing712;ing713;ing714;ing715;ing716;ing717;ing718;ing719;ing720;ing721;ing722;ing723;ing724;ing725;ing726;ing727;ing728;ing729;ing730;ing731;ing732;ing733;ing734;ing735;ing736;ing737;ing738;ing739;ing740;ing741;ing742;ing743;ing744;ing745;ing746;ing747;ing748;ing749;ing750;ing751;ing752;ing753;ing754;ing755;ing756;ing757;ing758;ing759;ing760;ing761;ing762;ing763;ing764;ing765;ing766;ing767;ing768;ing769;ing770;ing771;ing772;ing773;ing774;ing775;ing776;ing777;ing778;ing779;ing780;ing781;ing782;ing783;ing784;ing785;ing786;ing787;ing788;ing789;ing790;ing791;ing792;ing793;ing794;ing795;ing796;ing797;ing798;ing799;ing800;ing801;ing802;ing803;ing804;ing805;ing806;ing807;ing808;ing809;ing810;ing811;ing812;ing813;ing814;ing815;ing816;ing817;ing818;ing819;ing820;ing821;ing822;ing823;ing824;ing825;ing826;ing827;ing828;ing829;ing830;ing831;ing832;ing833;ing834;ing835;ing836;ing837;ing838;ing839;ing840;ing841;ing842;ing843;ing844;ing845;ing846;ing847;ing848;ing849;ing850;ing851;ing852;ing853;ing854;ing855;ing856;ing857;ing858;ing859;ing860;ing861;ing862;ing863;ing864;ing865;ing866;ing867;ing868;ing869;ing870;ing871;ing872;ing873;ing874;ing875;ing876;ing877;ing878;ing879;ing880;ing881;ing882;ing883;ing884;ing885;ing886;ing887;ing888;ing889;ing890;ing891;ing892;ing893;ing894;ing895;ing896;ing897;ing898;ing899;ing900;ing901;ing902;ing903;ing904;ing905;ing906;ing907;ing908;ing909;ing910;ing911;ing912;ing913;ing914;ing915;ing916;ing917;ing918;ing919;ing920;ing921;ing922;ing923;ing924;ing925;ing926;ing927;ing928;ing929;ing930;ing931;ing932;ing933;ing934;ing935;ing936;ing937;ing938;ing939;ing940;ing941;ing942;ing943;ing944;ing945;ing946;ing947;ing948;ing949;ing950;ing951;ing952;ing953;ing954;ing955;ing956;ing957;ing958;ing959;ing960;ing961;ing962;ing963;ing964;ing965;ing966;ing967;ing968;ing969;ing970;ing971;ing972;ing973;ing974;ing975;ing976;ing977;ing978;ing979;ing980;ing981;ing982;ing983;ing984;ing985;ing986;ing987;ing988;ing989;ing990;ing991;ing992;ing993;ing994;ing995;ing996;ing997;ing998;ing999 +start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999 +start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999 +ing999 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +art;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999 +start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string9 +zbcd +axd +axxd +axxd +zzzz +zbcd +axd +axxd +axxd +zzzz +a Value = 1 2 3 4 5 +a Sub = 0 1 2 3 4 +b Value = a b c d e +b Sub = 0 1 2 3 4 +c Value = 10 20 40 80 +c Sub = 0 2 4 8 +<1> <2> <3> <4> <5> +<10> <20> <40> <80> +<> +<> +<> +<> +<'ab '\''cd'\'' ef'> +./new-exp10.sub: line 24: ${x@C}: bad substitution +<'ab'> <'cd ef'> <''> <'gh'> +<'ab' 'cd ef' '' 'gh'> +<'ab'> <'cd> <''> <'gh'> +<'ab'> <'cd> <''> <'gh'> +<'ab cd'> +<'4'> <'ab cd'> +<> +argv[1] = +< +> +<' \t\n'> +< +> +<$' \t\n'> +declare -r x='ab '\''cd'\'' ef' +set -- 'ab' 'cd ef' '' 'gh' +declare -a A=([0]="ab" [1]="cd ef" [2]="" [3]="gh") +declare -a B=() +declare -A A=([four]="de" [two]="b c" [three]="" [one]="1" ) +r +a +A +ir +a b c d e +5 +a5b +i +declare -i foo +A +declare -A foo +abcxxxdef +abcÃ¥def +ḅć +Ã¥ +prependḅć +Ã¥append +prependÃ¥ +ḅćappend +Ã¥ +ḅć +ḅć +ḅć +Ã¥ +Ã¥ +Ã¥ +ḅć +Ã¥ +Ã¥ +ḅć +ḅć +HELLO;1 foo;2 foo; +PASS;1 foo;2 foo; +after: PASS +'zzz' +'zzz' +declare -rl VAR1 +declare -rl VAR1 +declare -rl VAR1 +declare -rl VAR1 +rl +rl +rl +rl +declare -arl VAR3 +declare -arl VAR3 +declare -arl VAR3 +declare -arl VAR3 +arl +arl +arl +arl +one +one +'aaa' +'aaa' 'bbb' +./new-exp13.sub: line 56: aaa bbb: invalid variable name +aaa bbb +0 1 +'aaa' +'aaa' 'bbb' +'aaa' 'bbb' +'aaa' 'bbb' +a bbb +aaa bb +'string' +'value with spaces' +'a b' 'c d' 'e f' +'a b' 'c d' 'e f' +0 "zero" 1 "one" 2 "two" 3 "three" +0 "zero z" 1 "one o" 2 "two t" 3 "three t" +declare -a foo=() +ai +declare -ai foo +bash: line 1: foo: unbound variable +ai +declare -ai foo +bash: line 1: !bar: unbound variable +a +a +a +a +argv[1] = +argv[1] = + +./new-exp.tests: line 1: ABXD: parameter unset diff --git a/bash-5.1/tests/new-exp.tests b/bash-5.1/tests/new-exp.tests new file mode 100644 index 0000000000000000000000000000000000000000..079426cb5e2d25b8d758e2c0afbab26097aea3a3 --- /dev/null +++ b/bash-5.1/tests/new-exp.tests @@ -0,0 +1,650 @@ +# 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 . +# +if (( $UID == 0 )); then + echo "new-exp.tests: the test suite should not be run as root" >&2 +fi + +# must do this because posix mode causes process substitution to be disabled +# and flagged as a syntax error, which causes the shell to exit +set +o posix + +expect() +{ + echo expect "$@" +} + +HOME=/usr/homes/chet # to make the check against new-exp.right work +expect '' +recho "${undef-"foo bar"}" # should be foo bar +expect '' +recho "${und="foo"}" # should be foo + +expect "<$HOME>" +recho ${HOME-"}"} +expect "<$HOME>" +recho "${HOME-'}'}" +expect "<$HOME>" +recho "${HOME-"}"}" + +expect $0: 'HOME: }: syntax error: operand expected (error token is "}")' +recho "${HOME:`echo }`}" # should be a math error -- bad substring substitution + +expect unset +_ENV=oops +x=${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]} +echo ${x:-unset} + +expect "<$HOME>" +recho ${HOME} +expect "<$HOME>" +recho ${HOME:-`echo }`} +expect "<$HOME>" +recho ${HOME:-`echo "}"`} +expect "<$HOME>" +recho "${HOME:-`echo "}"`}" +expect "<$HOME>" +recho "$(echo "${HOME}")" +expect "<$HOME>" +recho "$(echo "$(echo ${HOME})")" +expect "<$HOME>" +recho "$(echo "$(echo "${HOME}")")" + +P=*@* +expect '<*@>' +recho "${P%"*"}" # +expect '<*@>' +recho "${P%'*'}" # +expect '<@*>' +recho "${P#\*}" # should be @* + +expect '<)>' +recho "$(echo ")")" # should be ) +expect '<")">' +recho "$(echo "\")\"")" # should be ")" + +foo='abcd ' +expect '<-abcd> <->' +recho -${foo}- # should be -abcd - +expect '<-abcd> <->' +recho -${foo% *}- # should be -abcd - +expect '<-abcd->' +recho -${foo%% *}- # should be -abcd- + +foo=bar +expect '' +echo -n $foo' ' ; echo foo + +expect '' +echo -n $foo" " ; echo foo + +expect '' +echo -n "$foo " ; echo foo + +expect '' +echo -e "$foo\c " ; echo foo + +expect '' +echo -e $foo"\c " ; echo foo + +# make sure backslashes are preserved in front of characters that are not +# valid backslash escapes +expect '<\x>' +echo -e '\x' + +# substring tests +z=abcdefghijklmnop +expect '' +recho ${z:0:4} + +expect ' ' +recho ${z:4:3} ${z:${#z}-3:3} + +expect ' ' +recho ${z:4:3} ${z: -3:3} + +expect '' +recho ${z:7:30} + +expect '' +recho ${z:0:100} + +expect '' +recho ${z:0:${#z}} + +set 'ab cd' 'ef' 'gh ij' 'kl mn' 'op' +expect ' ' +recho "${@:1:2}" + +expect ' ' +recho "${@:3:2}" + +expect ' ' +recho "${@:3:4}" + +expect ' ' +recho "${@:1:$#}" + +# code to ad-hoc parse arithmetic expressions in substring expansions was +# broken until post-2.04 +base=/home/chet/foo//bar +string1=$base/abcabcabc +x=1 j=4 + +expect '' +recho ${string1:0} + +expect '' +recho ${string1:1} + +expect '' +recho ${string1:(j?1:0):j} + +expect '' +recho ${string1:j?1:0:j} + +expect '' +recho ${string1:(j?(x?1:0):0):j} + +expect '' +recho ${string1:j?(x?1:0):0:j} + +unset base string1 x j + +# indirect variable references +expect '' +recho ${!9:-$z} + +ef=4 +expect '<4>' +recho ${!2} + +expect '' +recho ${!#} + +set a b c d e +a= +expect '' +recho ${a:-$z} +expect '' +recho ${!1:-$z} + +expect nothing +recho ${a-$z} +expect nothing +recho ${!1-$z} + +set -- a 'b c' d +unset foo +foo=@ +expect ' ' +recho ${!foo} +expect ' ' +recho "${!foo}" + +set -u +expect $0: ABX: unbound variable +( recho ${ABX} ) +set +u + +expect $0: '$6: cannot assign in this way' +recho ${6="arg6"} + +v=abcde + +# sed-like variable substitution +expect '' +recho ${v/a[a-z]/xx} +expect '' +recho ${v/a??/axx} +expect '' +recho ${v/c??/xyz} +expect '' +recho ${v/#a/ab} +expect '' +recho ${v/#d/ab} +expect '' +recho ${v/d/ab} +expect '' +recho ${v/%?/last} +expect '' +recho ${v/%x/last} + +av=(abcd efgh ijkl mnop qrst uvwx) + +expect '' +recho ${av/??/xx} +expect '' +recho ${av/%??/xx} +expect '' +recho ${av[1]/??/xx} +expect '' +recho ${av[1]/%ab/xx} +expect '' +recho ${av[1]/#?/xx} +expect '' +recho ${av[1]/??/za} +expect '' +recho ${av[1]//??/za} +expect '' +recho ${av[1]/#??/za} +expect '' +recho ${av[1]/%??/za} + +expect ' ' +recho ${av[@]/*/yyy} +expect ' ' +recho ${av[@]/#*/yyy} +expect ' ' +recho ${av[@]/%*/yyy} +expect ' ' +recho ${av[@]/a*/yyy} +expect ' ' +recho ${av[@]/%??/xx} + +set abcd efgh ijkl mnop qrst uvwx + +expect '' +recho ${1/??/xx} +expect ' ' +recho ${@/??/xx} +expect ' ' +recho ${@/%??/xx} +expect '' +recho ${3//??/za} +expect '' +recho ${3/%??/za} +expect ' ' +recho ${@//??/za} +expect ' ' +recho ${@/#??/za} +expect ' ' +recho ${@//*/yyy} +expect ' ' +recho ${@//a*/yyy} +expect ' ' +recho ${@/%x*/yyy} + +expect a newline +echo $abmcde + +# sneaky way to replace a newline in a variable value with something else +AVAR=$'This\nstring\nhas\nmultiple\nlines.' +echo "${AVAR}" + +eval BVAR=\"\${AVAR//$'\n'/-}\" +echo "$BVAR" + +unset AVAR BVAR + +# run process substitution tests in a subshell so that syntax errors +# caused by a shell not implementing process substitution (e.g., one +# built on a NeXT) will not cause the whole test to exit prematurely +${THIS_SH} ./new-exp1.sub + +# run the tests of $(' +recho ${#:-foo} +expect $0: '${#:}: bad substitution' +echo ${#:} + +expect "<'>" +recho "'" +expect '<">' +recho '"' +expect '<"hello">' +recho "\"hello\"" + +shift $# +unset foo +z=abcdef +z1='abc def' + +expect '<>' +recho ${foo:-""} +expect nothing +recho ${foo:-"$@"} +expect '<>' +recho "${foo:-$@}" + +# unset var +expect '<>' +recho ${foo:-"$zbcd"} +expect nothing +recho ${foo:-$zbcd} + +# set var +expect '' +recho ${foo:-"$z"} +expect '' +recho ${foo:-"$z1"} + +expect '' +recho ${foo:-$z} +expect ' ' +recho ${foo:-$z1} + +expect '' +recho "${foo:-$z}" +expect '' +recho "${foo:-$z1}" + +expect '' +recho "${foo:-"$z"}" +# this disagrees with sh and ksh, but I think it is right according +# to posix.2. +expect '' +recho "${foo:-"$z1"}" + +set ab cd ef gh +expect ' ' +recho ${foo:-"$@"} +expect ' ' +recho "${foo:-$@}" +expect ' ' +recho "${foo:-"$@"}" + +shift ${#} +expect nothing +recho $xxx"$@" +expect nothing +recho ${foo:-$xxx"$@"} +expect '<>' +recho "${foo:-$xxx$@}" +expect '<>' +recho "${foo:-$xxx"$@"}" + +expect nothing +recho $xxx"$@" +expect nothing +recho "$xxx$@" +expect nothing +recho "$@"$xxx + +expect '<>' +recho $xxx"" +expect '<>' +recho $xxx'' +expect '<>' +recho ''$xxx +expect '<>' +recho ""$xxx + +AB='abcdefghijklmnopqrstuvwxyz' + +recho ${AB:7:15} +recho ${AB:15:7} + +recho ${AB:20} + +recho ${AB:0} +recho ${AB:0:20} + +recho ${AB:10:7} +recho ${AB:10:3+4} +recho ${AB:20/2:3+4} + +set 1 2 3 4 5 6 +recho \""${*:2:2}"\" + +IFS=: +recho \""${*:2:2}"\" + +IFS=$' \t\n' + +z=123456 + +recho \""${z:2:2}"\" +recho \""${z:2}"\" +recho \""${z:2:4}"\" +recho \""${z:2:6}"\" + +set $'\1' $'\2' $'\177' + +recho $* +recho $@ + +recho ${*} +recho ${@} + +xx=one/two/two +recho ${xx%/*} +recho ${xx/\/two} + +yy=oneonetwo +recho ${yy//one} +recho ${yy/\/one} + +xx=oneonetwo + +recho ${xx/one} +recho ${xx//one} +recho ${xx/\/one} + +# out-of-range substrings +var=abc +c=${var:3} +expect nothing +recho $c +c=${var:4} +expect nothing +recho $c +# as of bash-4.2, negative LENGTH means offset from the end +c=${var:0:-2} +expect '' +recho $c + +var=abcdefghi +c=${var:3:12} +recho $c +c=${var:4:20} +recho $c + +# make sure null patterns work +xxx=endocrine +yyy=n +unset zzz + +recho ${xxx/$yyy/*} +recho ${xxx//$yyy/*} + +recho ${xxx/$zzz/*} +recho ${xxx//$zzz/*} + +recho ${xxx//%${zzz}/} +recho ${xxx//%${zzz}} +recho ${xxx//#${zzz}/} +recho ${xxx//#${zzz}} + +# make sure null strings are replaced appropriately +unset var +var= +echo "${var/#/x}" +echo "${var/*/x}" +echo "${var//*/x}" + +var=abc +echo "${var/#/x}" +echo "${var/*/x}" +echo "${var//*/x}" +unset var + +# another case that caused a core dump in bash-2.0 +XPATH=/usr/bin:/bin:/usr/local/bin:/usr/gnu/bin::/usr/bin/X11:/sbin:/usr/sbin + +recho ${XPATH//:/ } + +xx=(ar as at au av aw ax ay az) + +recho ${xx[@]/a/} +recho ${xx[@]//a/} + +recho ${xx[*]/a/} +recho ${xx[*]//a/} + +recho ${xx[@]%?} +recho ${xx[*]%?} + +recho ${xx[@]#?} +recho ${xx[*]#?} + +set -- ar as at au av aw ax ay az + +recho ${@/a/} +recho ${@//a/} + +recho ${*/a/} +recho ${*//a/} + +recho ${@%?} +recho ${*%?} + +recho ${@#?} +recho ${*#?} + +shift ${#} +set -u +( recho $9 ; echo after 1) +( recho ${9} ; echo after 2) +( recho $UNSET ; echo after 3) +( recho ${UNSET} ; echo after 4) +( recho "$UNSET" ; echo after 5) +( recho "${UNSET}" ; echo after 6) +( recho "${#UNSET}" ; echo after 7) +set +u + +RECEIVED="12345" +recho "${RECEIVED:$((${#RECEIVED}-1)):1}" +RECEIVED="12345#" +recho "${RECEIVED:$((${#RECEIVED}-1)):1}" +RECEIVED="#" +recho "${RECEIVED:$((${#RECEIVED}-1)):1}" +RECEIVED="" +recho "${RECEIVED:$((${#RECEIVED}-1)):1}" + +# tests of new prefix expansion ${!prefix*} +${THIS_SH} ./new-exp3.sub + +# bug with indirect expansion through bash-2.05b +${THIS_SH} ./new-exp4.sub + +# these caused errors and core dumps in versions before bash-2.04 +c="" +echo ${c//${$(($#-1))}/x/} + +set a b c d e f g +recho "$@" + +set -- ${@:1:$(($# - 2))} +recho "$@" + +set a b +recho ${@:1:$(($# - 2))} + +recho ${@:1:0} +recho ${@:1:1} +recho ${@:1:2} + +recho "${*:1:0}" + +# this is an error -- negative expression +set a +recho ${@:1:$(($# - 2))} +set a b c d e +recho ${@: -3:-2} + +XPATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:.:/sbin:/usr/sbin +set $( IFS=: ; echo $XPATH ) + +recho ${@##*/} +recho ${@%%[!/]*} + +recho ${@#/*} +recho ${@%*/} + +set /full/path/to/x16 /another/full/path + +recho ${1%/*} +recho ${1%%[!/]*} +recho ${1#*/} +recho ${1##*/} + +${THIS_SH} ./new-exp5.sub + +unset var +var=blah + +# these had better agree +echo ${var[@]:3} +echo ${var:3} +echo ${var[@]/#/--} +echo ${var/#/--} +echo ${var[@]##?} +echo ${var##?} + +unset var +var=(abcde abcfg abchi) + +# problems with anchoring pattern replacements +echo ${var[*]//#abc/foo} +echo ${var[*]/#abc/foo} +unset var + +${THIS_SH} ./new-exp6.sub + +${THIS_SH} ./new-exp7.sub + +${THIS_SH} ./new-exp8.sub + +# tests to check whether things like indirect expansion of a variable whose +# value is 'anothervar[@]' stop working +${THIS_SH} ./new-exp9.sub + +# new parameter transformation `@' expansion operator +${THIS_SH} ./new-exp10.sub + +# parameter substring replacement and removal operators with multibyte chars +${THIS_SH} ./new-exp11.sub + +# indirect expansion with arrays and local variables +${THIS_SH} ./new-exp12.sub + +# more indirect expansion and parameter transformation issues +${THIS_SH} ./new-exp13.sub + +# new K parameter transformation operator +${THIS_SH} ./new-exp14.sub + +# ongoing work with a/A parameter transformations and `nounset' +${THIS_SH} ./new-exp15.sub + +# problems with stray CTLNUL in bash-4.0-alpha +unset a +a=/a +recho "/${a%/*}" +recho "/${a///a/}" + +patfunc() +{ + echo ${1##*"${1##*}"} +} +patfunc foo + +# caused core dumps because of bad bracket expression parsing in bash-5.0 +eval : $'${x/#[0\xef\xbf\xbd\\Z[:]]}' + +expect $0: 'ABXD: parameter unset' +${THIS_SH} -c 'recho ${ABXD:?"parameter unset"}' $0 diff --git a/bash-5.1/tests/new-exp1.sub b/bash-5.1/tests/new-exp1.sub new file mode 100644 index 0000000000000000000000000000000000000000..d29b93c7ea7b409c14e2275d4bde2e8443fafa96 --- /dev/null +++ b/bash-5.1/tests/new-exp1.sub @@ -0,0 +1,29 @@ +# 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 . +# +FN=${TMPDIR}/bashtest-$$ +expect() +{ + echo expect "$@" +} + +expect this is a test of proc subst +cat <(echo this is a test of proc subst) +echo this is test 2 > $FN +expect this is test 2 +cat <(cat $FN) +rm -f $FN + +foo= +expect a +cat ${foo:-<(echo a)} diff --git a/bash-5.1/tests/new-exp10.sub b/bash-5.1/tests/new-exp10.sub new file mode 100644 index 0000000000000000000000000000000000000000..bf9ebe7aac989cdba2815df2553d771fd3e7ff23 --- /dev/null +++ b/bash-5.1/tests/new-exp10.sub @@ -0,0 +1,113 @@ +# 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 . +# +# new framework for parameter transformations, post bash-4.3 + +printf "<%s>" "${x@Q}" ; echo +printf "<%s>" "${x@E}" ; echo +printf "<%s>" "${x@P}" ; echo +printf "<%s>" "${x@A}" ; echo + +x="ab 'cd' ef" +printf "<%s> " "${x@Q}" ; echo + +printf "<%s>" "${x@C}" + +# if unquoted, normal word splitting happens +set -- ab 'cd ef' '' gh +printf "<%s> " "${@@Q}" ; echo +printf "<%s> " "${*@Q}" ; echo +printf "<%s> " ${@@Q} ; echo +printf "<%s> " ${*@Q} ; echo + +y[0]=4 +y[1]='ab cd' + +printf "<%s> " "${y[1]@Q}" ; echo +printf "<%s> " "${y[@]@Q}" ; echo # mksh doesn't like @ or * or arrays subscripted with them + +printf "<%s> " "${z@Q}" ; echo # empty string? + +recho ${z@Q} # this disappears + +# +HOST=host +SHELL_LEVEL=2 +NPS1='\[\]${HOST}($SHELL_LEVEL)[\v]\$ ' + +recho "${NPS1@P}" + +# +D=' \t\n' +printf "<%s>" "${D@E}" ; echo +printf "<%s>" "${D@Q}" ; echo + +E=$' \t\n' +printf "<%s>" "${E@E}" ; echo +printf "<%s>" "${E@Q}" ; echo + +declare x +declare -r x="ab 'cd' ef" +printf "%s" "${x@A}" ; echo + +set -- ab 'cd ef' '' gh +printf "%s " "${@@A}" ; echo + +A=( "$@" ) +printf "%s " "${A[@]@A}" ; echo +B=() +printf "%s " "${B[@]@A}" ; echo + +unset A +declare -A A +A=( [one]=1 [two]='b c' [three]='' [four]=de ) +printf "%s " "${A[@]@A}" ; echo + +unset X +declare X +declare -r X="ab 'cd' ef" +printf "%s" "${X@a}" ; echo + +set -- 1 2 3 4 + +unset A +A=( "$@" ) +printf "%s " "${A@a}" ; echo + +unset A +declare -A A +A=( [one]=1 [two]='b c' [three]='' [four]=de ) +printf "%s " "${A@a}" ; echo + +declare -ir Y=0 +printf "%s" "${Y@a}" ; echo + +# make sure we still handle ${#@} and ${@} as posix requires +set -- a b c d e +echo ${@} +echo ${#@} +echo a${#@}b + +# new feature in bash-5.0: display attributes of even unset variables +unset -v foo + +declare -i foo +echo ${foo@a} + +declare -p foo + +unset foo +declare -A foo +echo ${foo@a} + +declare -p foo diff --git a/bash-5.1/tests/new-exp11.sub b/bash-5.1/tests/new-exp11.sub new file mode 100644 index 0000000000000000000000000000000000000000..6a9edd5935317f7640d6fb20f9ac411fd1ad1d0a --- /dev/null +++ b/bash-5.1/tests/new-exp11.sub @@ -0,0 +1,59 @@ +# 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 . +# +# pattern matching and replacement operators with multibyte characters + +LANG=en_US.UTF-8 + +s1='abcÃ¥def' +s2='Ã¥' +s3='ḅć' + +s23=${s2}${s3} + +echo ${s1/$s2/xxx} +echo ${s1/$s3/xxx} + +echo ${s23/#$s2/} +echo ${s23/%$s3/} + +echo ${s23/#$s2/prepend} +echo ${s23/%$s3/append} + +echo ${s2/#/prepend} +echo ${s3/%/append} + +echo ${s2/#/} +echo ${s3/%/} + +recho ${s2/$s2/} +recho ${s3/$s3/} + +# posix pattern replacements + +echo ${s23##$s2} +echo ${s23#$s2} + +echo ${s23%%$s3} +echo ${s23%$s3} + +# fail + +echo ${s2/#ab/xx} +echo ${s3/%ab/xx} + +echo ${s2#ab} +echo ${s2##ab} + +echo ${s3%ab} +echo ${s3%%ab} diff --git a/bash-5.1/tests/new-exp12.sub b/bash-5.1/tests/new-exp12.sub new file mode 100644 index 0000000000000000000000000000000000000000..1fbd5d63d3c2bb219454e33009000b5cc17cf9a6 --- /dev/null +++ b/bash-5.1/tests/new-exp12.sub @@ -0,0 +1,40 @@ +# 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 . +# +# +# make sure indirect expansion for arrays uses the closest-scope instance +# of the resulting variable name + +array_1=("PASS") +array_2=("1 foo" "2 foo") + +unsafe_fn () +{ + local array_1=('HELLO') + local a=("${!1}") b=("${!2}") + printf '%s;' "${a[@]}" "${b[@]}" + printf '\n' +} + +safe_fn () +{ + local a=("${!1}") b=("${!2}") + local array_1=('FAIL') + printf '%s;' "${a[@]}" "${b[@]}" + printf '\n' +} + +unsafe_fn 'array_1[@]' 'array_2[@]' +safe_fn 'array_1[@]' 'array_2[@]' + +echo after: ${array_1[@]} diff --git a/bash-5.1/tests/new-exp13.sub b/bash-5.1/tests/new-exp13.sub new file mode 100644 index 0000000000000000000000000000000000000000..7e8ed32c761f2e24beee671b847179f4d389a268 --- /dev/null +++ b/bash-5.1/tests/new-exp13.sub @@ -0,0 +1,72 @@ +# 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 . +# + +declare -lr VAR1 +declare -lr VAR2=zzz +declare -alr VAR3 + +var=VAR2 + +echo ${!var@Q} +echo ${VAR2@Q} + +echo ${VAR1@A} +echo ${VAR1[@]@A} +echo "${VAR1@A}" +echo "${VAR1[@]@A}" + +echo "${VAR1[@]@a}" +echo ${VAR1[@]@a} +echo "${VAR1@a}" +echo ${VAR1@a} + +echo ${VAR3@A} +echo ${VAR3[@]@A} +echo "${VAR3@A}" +echo "${VAR3[@]@A}" + +echo "${VAR3[@]@a}" +echo ${VAR3[@]@a} +echo "${VAR3@a}" +echo ${VAR3@a} + +var=one + +echo ${var} +echo ${var[@]} + +VAR4=(aaa bbb) + +varname=VAR4 + +echo ${!varname[@]@Q} + +echo ${VAR4[@]@Q} +echo ${!VAR4[@]@Q} + +echo ${VAR4[@]} +echo ${!VAR4[@]} + +VAR5=(aaa bbb) +varname="VAR5[@]" + +echo "${VAR5@Q}" +echo "${VAR5[@]@Q}" + +echo "${!varname@Q}" +echo "${!varname[@]@Q}" + +# caused core dumps through bash-5.0 +echo "${!varname##aa}" +echo "${!varname[@]%b}" diff --git a/bash-5.1/tests/new-exp14.sub b/bash-5.1/tests/new-exp14.sub new file mode 100644 index 0000000000000000000000000000000000000000..b8bda8de5ed586863893dfa4538e3bd3c859287f --- /dev/null +++ b/bash-5.1/tests/new-exp14.sub @@ -0,0 +1,19 @@ +# test the other uses of the 'K' tranform operator +# the associative array tests are performed separately, since that was the +# original motivation for this feature +foo=string +bar='value with spaces' + +set -- 'a b' 'c d' 'e f' + +echo ${foo@K} +echo ${bar@K} + +echo ${@@K} +echo "${@@K}" + +foo=( zero one two three ) +echo ${foo[@]@K} + +foo=( 'zero z' 'one o' 'two t' 'three t' ) +echo ${foo[@]@K} diff --git a/bash-5.1/tests/new-exp15.sub b/bash-5.1/tests/new-exp15.sub new file mode 100644 index 0000000000000000000000000000000000000000..f8b9ed8443aa79ae4468a93b8a15b94ba2805874 --- /dev/null +++ b/bash-5.1/tests/new-exp15.sub @@ -0,0 +1,29 @@ +# 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 . +# + +: ${THIS_SH:=./bash} + +${THIS_SH} -c 'declare -a foo=() ; declare -p foo' bash + +${THIS_SH} -c 'declare -ia foo=() ; echo ${foo@a} ; echo ${foo@A}' bash +${THIS_SH} -uc 'declare -ia foo=() ; echo ${foo@a} ; echo ${foo@A}' bash + +${THIS_SH} -c 'declare -ia foo=() ; bar=foo; echo ${!bar@a} ; echo ${!bar@A}' bash +${THIS_SH} -uc 'declare -ia foo=() ; bar=foo; echo ${!bar@a} ; echo ${!bar@A}' bash + +${THIS_SH} -c 'declare -a foo=( [1]=one ) ; echo ${foo@a}' bash +${THIS_SH} -uc 'declare -a foo=( [1]=one ) ; echo ${foo@a}' bash + +${THIS_SH} -c 'declare -a foo=( [1]=one ) ; bar=foo; echo ${!bar@a}' bash +${THIS_SH} -uc 'declare -a foo=( [1]=one ) ; bar=foo; echo ${!bar@a}' bash diff --git a/bash-5.1/tests/new-exp2.sub b/bash-5.1/tests/new-exp2.sub new file mode 100644 index 0000000000000000000000000000000000000000..8dfe788f4db5e21617349ccd78e6e7f340aa3760 --- /dev/null +++ b/bash-5.1/tests/new-exp2.sub @@ -0,0 +1,62 @@ +# 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 . +# +export LC_ALL=C +export LANG=C + +# test out the new $(< filename) code +# it should be exactly equivalent to $(cat filename) + +FILENAME=$TMPDIR/bashtmp.x$$ + +trap 'rm -f $FILENAME' 0 + +cat >$FILENAME << EOF +line 1 +line 2 +line 3 +EOF + +LINES1=$(cat $FILENAME) +LINES2=$(< $FILENAME) + +if [[ $LINES1 != $LINES2 ]]; then + echo 'whoops: $(< filename) failed' +fi + +LINES2=$(< $TMPDIR/bashtmp.x*) +if [[ $LINES1 != $LINES2 ]]; then + echo 'whoops: $(< filename) with glob expansion failed' +fi + +# but the glob expansion in the redirection should fail in posix mode +set -o posix +exec 3>&2 +exec 2>/dev/null +LINES2=$(< $TMPDIR/bashtmp.x*) +exec 2>&3 +if [[ $LINES2 -gt 0 ]]; then + echo "whoops: redirection glob expansion should be disabled in posix mode" >&2 +fi +set +o posix + +# now see what happens when we try it with a non-existent file +rm -f /tmp/redir-notthere +LINES3=$(< /tmp/redir-notthere) +echo $? + +# These were bugs through bash-4.2 +{ : "$({xxxxxxxxxxxxxxxxxxxx}. +# +: +# Set up some dummy variables beginning with _Q +_QUANTITY= +_QUOTA= +_QUOTE= +_QUILL= +_QUEST= +_QUART= + +recho ${!_Q*} +recho ${!_Q@} # compatibility + +IFS="-$IFS" + +recho ${!_Q*} +recho "${!_Q*}" + +recho ${!_Q@} +recho "${!_Q@}" + +recho ${!_Y*} + +recho "${!_Q* }" + +IFS=$' \t\n' + +set a b c d e f g h i j k l m n o p +recho ${!1*} + +recho ${!@*} diff --git a/bash-5.1/tests/new-exp4.sub b/bash-5.1/tests/new-exp4.sub new file mode 100644 index 0000000000000000000000000000000000000000..e491f5cf1027f0314c936b3e8e40f9e2b9ba1166 --- /dev/null +++ b/bash-5.1/tests/new-exp4.sub @@ -0,0 +1,43 @@ +# 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 . +# + +arrayA=("A" "B" "C") + +arrayB=( ${arrayA[*]} ) +echo "Case01---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + +arrayB=( "${arrayA[*]}" ) +echo "Case02---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + +arrayB=( ${arrayA[@]} ) +echo "Case03---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + +arrayB=( "${arrayA[@]}" ) +echo "Case04---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + +xx="arrayA[*]" + +arrayB=( ${!xx} ) +echo "Case05---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + +arrayB=( "${!xx}" ) +echo "Case06---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + +xx="arrayA[@]" + +arrayB=( ${!xx} ) +echo "Case07---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + +arrayB=( "${!xx}" ) +echo "Case08---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" diff --git a/bash-5.1/tests/new-exp5.sub b/bash-5.1/tests/new-exp5.sub new file mode 100644 index 0000000000000000000000000000000000000000..cb203a70d94fc0ddd6326a27b1a0edaad06f0d96 --- /dev/null +++ b/bash-5.1/tests/new-exp5.sub @@ -0,0 +1,53 @@ +# 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 . +# +x=(one two) +echo ${x[@]:1} +echo ${x[@]:0:1} + +x=(one) +echo ${x[0]:1} +echo ${x[0]:0} +echo ${x[@]:1} +echo ${x[@]:0} + +echo ${x[@]: -1} +echo ${x[@]: ${#x[@]}-1} + +x=(0 1 2 3 4 5 6 7 8 9) +echo ${x[@]:1} + +echo ${x[@]: -1} +echo ${x[@]: ${#x[@]}-1} + +set -- ${x[@]} + +echo $1 +echo ${@: -1} +echo ${@: $#-1} + +a=0123456789 + +echo ${a:1} +echo ${a: -1} +echo ${a: ${#a}-1} + +# problem with bash through 3.2.33 +oIFS="$IFS" +IFS=$'\n' +a=(A B C D) +b=("${a[@]}") +echo "${#b[@]}", "${b[@]}" # 4, A B C D -- OK +b=("${a[@]:2}") +echo "${#b[@]}", "${b[@]}" # 1, C D -- bug, should be 2, C D +IFS="$oIFS" diff --git a/bash-5.1/tests/new-exp6.sub b/bash-5.1/tests/new-exp6.sub new file mode 100644 index 0000000000000000000000000000000000000000..83b041ac40ccfb1a5b320f9a21adc3652ac4414a --- /dev/null +++ b/bash-5.1/tests/new-exp6.sub @@ -0,0 +1,42 @@ +# 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 . +# +# quoted null problems in versions of bash prior to 3.2 + +str='12' +snul=$'\177' + +recho "${str:2}" +recho "+${str:2}" +recho "+${snul:0:1}" +recho "+""${str:2}" + +recho "${str/?/$snul}" +recho ${str/?/$snul} + +recho "${snul/x/y}" +recho ${snul/x/y} + +recho "${snul/$snul/}" +recho "${str/$str/}" + +recho "${snul##$snul}" +recho "${str##$str}" +recho "${str##$nul}" + +A="" +B="${A:0}" + +recho "$B" +recho "${A:0}" +recho "/tmp/test/TEST${A:0}" diff --git a/bash-5.1/tests/new-exp7.sub b/bash-5.1/tests/new-exp7.sub new file mode 100644 index 0000000000000000000000000000000000000000..970475ccd35447fbe4241dfbee0eeb03908aa1d3 --- /dev/null +++ b/bash-5.1/tests/new-exp7.sub @@ -0,0 +1,13 @@ +foo() +{ + echo < <(cat x1) +} + +type foo + +declare -f foo + +echo $(declare -f foo | sed 's:foo:bar:') +eval "$(declare -f foo | sed 's:foo:bar:')" + +type bar diff --git a/bash-5.1/tests/new-exp8.sub b/bash-5.1/tests/new-exp8.sub new file mode 100644 index 0000000000000000000000000000000000000000..9effec543cf88aee1738fb1f96a599fd4d8e38ff --- /dev/null +++ b/bash-5.1/tests/new-exp8.sub @@ -0,0 +1,129 @@ +# 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 . +# +pat1='str' +pat2='[^;]' +pat3='[[:alnum:]_]' +pat4='[[:alnum:]][[fu]b' +pat5='?tr' +pat6='?tr\' +pat7='[[:alnum:]]_' +pat8='*tr' + +declare z="start" +declare NUM=1000 + +#---------------------------------- +# create a long string with ';' +#---------------------------------- +for ((i=0; i<$NUM; i++)); do + z="$z;string$i" +done + +#z="$z;string;foo" + +#------------------------------ +# delete everything except ';' +#------------------------------ + +# try different patterns here +x="${z//$pat1}" +echo $x +x="${z//$pat2}" +echo $x +x="${z//$pat3}" +echo $x +x="${z//$pat4}" +echo $x +x="${z//$pat5}" +echo $x +x="${z//$pat6}" +echo $x +x="${z//$pat7}" +echo $x +x="${z//$pat8}" +echo $x + + +declare z="start" +declare NUM=1000 + +#---------------------------------- +# create a long string with ';' +#---------------------------------- +for ((i=0; i<$NUM; i++)); do + z="$z;string$i" +done + +#z="$z;string;foo" + +#------------------------------ +# delete everything except ';' +#------------------------------ + +# try different patterns here +x="${z//[^;]}" +echo $x +x="${z/#[^;][^;]}" +echo $x +x="${z/%[^;][^;]}" +echo $x + +export LANG=C LC_ALL=C LC_CTYPE=C + +# try different patterns here +x="${z//$pat1}" +echo $x +x="${z//$pat2}" +echo $x +x="${z//$pat3}" +echo $x +x="${z//$pat4}" +echo $x +x="${z//$pat5}" +echo $x +x="${z//$pat6}" +echo $x +x="${z//$pat7}" +echo $x +x="${z//$pat8}" +echo $x + +# try different patterns here +x="${z//[^;]}" +echo $x +x="${z/#[^;][^;]}" +echo $x +x="${z/%[^;][^;]}" +echo $x + +# post-bash-4.3 changes to make pattern replacement honor nocasematch variable +unset string +string=abcd + +shopt -s nocasematch + +echo ${string//A/z} +echo ${string//BC/x} +echo ${string//[BC]/x} +echo ${string//[bC]/x} +echo ${string//?/z} + +LC_ALL=C +echo ${string//A/z} +echo ${string//BC/x} +echo ${string//[BC]/x} +echo ${string//[bC]/x} +echo ${string//?/z} + + diff --git a/bash-5.1/tests/new-exp9.sub b/bash-5.1/tests/new-exp9.sub new file mode 100644 index 0000000000000000000000000000000000000000..799f192da2686b315b0e25874791e6b6139ce008 --- /dev/null +++ b/bash-5.1/tests/new-exp9.sub @@ -0,0 +1,44 @@ +# 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 . +# +indirarray() +{ + local intermediary + local sub + + intermediary="${1}[@]" + local -a leftValue=("${!intermediary}") + + local -a leftSub + eval leftSub=(\"\${!${1}[@]}\") + + echo "$1" Value = ${leftValue[@]} + echo "$1" Sub = ${leftSub[@]} +} + +a=(1 2 3 4 5) +b=(a b c d e) + +c=([0]=10 [2]=20 [4]=40 [8]=80) + +indirarray a +indirarray b +indirarray c + +ref=a +tmp="$ref[@]" +printf "<%s> " "${!tmp}"; echo # Iterate whole array. + +ref=c +tmp="$ref[@]" +printf "<%s> " "${!tmp}"; echo # Iterate whole array. diff --git a/bash-5.1/tests/nquote.right b/bash-5.1/tests/nquote.right new file mode 100644 index 0000000000000000000000000000000000000000..e3ae555850db454b37e485a678c39f8dec7d6b7b --- /dev/null +++ b/bash-5.1/tests/nquote.right @@ -0,0 +1,64 @@ +argv[1] = <^J^J^J> +argv[1] = <++^J++> +argv[1] = <> +argv[1] = <^J^I > +argv[1] = +argv[1] = <^M^[^Gabc> +argv[1] = +argv[2] = +argv[1] = +argv[1] = <> +argv[1] = <$hello, world> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <$hello, chet> +argv[1] = +ok +'abcd' +'abcd' +\'abcd\' +\'abcd\' +argv[1] = +argv[1] = +argv[1] = +A\CB +A\CB +A\CB +argv[1] = +argv[1] = +argv[1] = +argv[1] = +1 +1 +;foo +argv[1] = <^I> +argv[1] = <'A^IB'> +hello' world +hello world! +hello' world! +' | ' +' | ' +x | x +x | x +' | ' +' | ' +' | ' +' | ' +' | ' +' | ' +x | x +' +$'\'' +' +'abcd' +$'\'abcd\'' +' +1 +argv[1] = <^?> +0000000 del nl +0000002 +0000000 esc fs gs rs us del nl +0000007 +\q diff --git a/bash-5.1/tests/nquote.tests b/bash-5.1/tests/nquote.tests new file mode 100644 index 0000000000000000000000000000000000000000..20d6415d375fc002c79f3de1f066b7e5d4775983 --- /dev/null +++ b/bash-5.1/tests/nquote.tests @@ -0,0 +1,133 @@ +# 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 . +# +expect() +{ + echo expect "$@" +} + +expect '<^J^J^J>' +recho $'\n\n\n' + +expect '<++^J++>' +f=$'\n' +recho "++$f++" +unset f + +z1=$'' +expect '<>' +recho "$z1" + +ZIFS=$'\n'$'\t'$' ' + +expect '<^J^I >' +recho "$ZIFS" + +expect '' +recho $'abc' + +expect '<^M^[^Gabc>' +recho $'\r\e\aabc' + +D=$"hello"," "$"world" + +expect ' ' +recho $D + +expect '' +recho "$D" + +D=$"" +expect '<>' +recho "$D" + +world=chet + +expect '<$hello, world>' +recho \$"hello, world" + +expect '' +recho $"hello, \$world" + +expect '' +recho $"hello, \"world\"" + +expect '' +recho $"hello"', $"world"' + +expect '' +recho $'hello, $"world"' + +expect '<$hello, chet>' +recho \$"hello, $world" + +expect '' +recho $"hello, $world" + +z=$'\v\f\a\b' +case "$z" in +$'\v\f\a\b') echo ok;; +*) echo bad;; +esac + +# Dave Korn says this should be allowed and echo 'abcd' +echo $'\'abcd\'' + +# printf translates \' to ' ... +printf "\'abcd\'\n" + +# but echo -e doesn't +echo -e "\'abcd\'" +echo -e "\\'abcd\\'" + +# and what do we do about unrecognized escape sequences? + +shopt -s xpg_echo + +recho $'A\CB' + +recho "A\CB" + +cde=c +recho $'ab$cde' + +printf "%b\n" 'A\CB' +printf 'A\CB\n' + +echo 'A\CB' + +world=chet + +recho $'hello, $"world"' +recho $'hello, \$"world"' +recho $'hello, $\"world"' + +recho "hello, $"world"" + +# ansi quoting inside double-quoted command subst - bash-3.1 bug +echo $(set -- $'a b'; echo $#) +echo "$(set -- $'a b'; echo $#)" + +echo "$(echo $';foo')" + +args () +{ + for a in "$@";do echo "'$a'";done +} +unset mytab +recho "${mytab:-$'\t'}" +recho "$( args $'A\tB' )" + +${THIS_SH} ./nquote1.sub +${THIS_SH} ./nquote2.sub +${THIS_SH} ./nquote3.sub diff --git a/bash-5.1/tests/nquote1.right b/bash-5.1/tests/nquote1.right new file mode 100644 index 0000000000000000000000000000000000000000..45389ef39c39f4105ebe334820ed00705c6ab9b5 --- /dev/null +++ b/bash-5.1/tests/nquote1.right @@ -0,0 +1,131 @@ +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = <1> +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = <1> +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = <1> +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = <1> +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[3] = <3> +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +^A +^A +^B +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = <^Aw> +argv[1] = +argv[2] = <^Aw> +argv[1] = <@1> +argv[2] = +argv[3] = +argv[1] = <@2> +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = diff --git a/bash-5.1/tests/nquote1.sub b/bash-5.1/tests/nquote1.sub new file mode 100644 index 0000000000000000000000000000000000000000..b3bc0db3f46c737f2eee29935b9a4d77e8b77ee7 --- /dev/null +++ b/bash-5.1/tests/nquote1.sub @@ -0,0 +1,6 @@ +set -o history +set -H + +echo $'hello\' world' +echo $'hello world!' +echo $'hello\' world!' diff --git a/bash-5.1/tests/nquote1.tests b/bash-5.1/tests/nquote1.tests new file mode 100644 index 0000000000000000000000000000000000000000..679976c664608f49e4113882ab38e37e3a40a849 --- /dev/null +++ b/bash-5.1/tests/nquote1.tests @@ -0,0 +1,119 @@ +# 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 . +# +a=$'a\001b' + +set $a + +b=$a +c=$1 +d="$1" + +e=$'uv\001\001wx' + +recho a $a ${#a} +recho 1 $1 ${#1} +recho b $b ${#b} +recho c $c ${#c} +recho d $d ${#d} + +recho a ${a} ${#a} +recho 1 ${1} ${#1} +recho b ${b} ${#b} +recho c ${c} ${#c} +recho d ${d} ${#d} + +recho a "$a" ${#a} +recho 1 "$1" ${#1} +recho b "$b" ${#b} +recho c "$c" ${#c} +recho d "$d" ${#d} + +recho a "${a}" ${#a} +recho 1 "${1}" ${#1} +recho b "${b}" ${#b} +recho c "${c}" ${#c} +recho d "${d}" ${#d} + +set $e + +recho e1 ${e:1:3} +recho e2 "${e:1:3}" +recho e3 ${1:1:3} +recho e4 "${1:1:3}" + +arr[0]=$e +arr[1]=$e + +recho a1 ${arr:0:4} +recho a2 "${arr:0:4}" + +recho a3 ${arr[@]:0:2} +recho a4 "${arr[@]:0:2}" + +set $e $e + +recho p1 ${@:1:2} +recho p2 "${@:1:2}" + +recho p1 ${*:1:2} +recho p2 "${*:1:2}" + +recho $e + +recho 'uvwx' + +f='uvwx' + +recho $f + +echo -en "\01" | cat -v +echo + +huhu() { echo "$1"; }; + +huhu $(echo -en "\01") | cat -v +huhu $(echo -en "\02") | cat -v + +f=$'uv\001w\001xy' + +set $f $f + +recho f1 ${f:1:3} +recho f2 "${f:1:3}" + +arr[0]=$f +arr[1]=$f + +recho a1 ${arr:0:4} +recho a2 "${arr:0:4}" +recho a3 ${arr[0]:0:4} +recho a4 "${arr[0]:0:4}" + +recho e1 ${f:0:4} +recho e2 "${f:0:4}" + +recho d1 ${1:2:2} +recho d2 "${1:2:2}" + +recho @1 ${@:1:2} +recho @2 "${@:1:2}" + +declare -A assoc +assoc=( [0]=$e [1]=$e ) + +recho aa1 ${assoc:0:4} +recho aa2 "${assoc:0:4}" + +recho aa3 ${assoc[@]:0:2} +recho aa4 "${assoc[@]:0:2}" diff --git a/bash-5.1/tests/nquote2.right b/bash-5.1/tests/nquote2.right new file mode 100644 index 0000000000000000000000000000000000000000..e7fb21ef329299510699690f83f3b381b77a6164 --- /dev/null +++ b/bash-5.1/tests/nquote2.right @@ -0,0 +1,76 @@ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = diff --git a/bash-5.1/tests/nquote2.sub b/bash-5.1/tests/nquote2.sub new file mode 100644 index 0000000000000000000000000000000000000000..bfe2b190f13d67e1e4ce026963f6b05f07e54159 --- /dev/null +++ b/bash-5.1/tests/nquote2.sub @@ -0,0 +1,42 @@ +# 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 . +# +t() { + printf '%s | %s\n' "$1" "$2" + } + v="'" # v <- ' + + #-- + t "${v/$'\''/$'\''}" "'" + t ${v/$'\''/$'\''} "'" + t "${v/$'\''/x}" "x" + t ${v/$'\''/x} "x" + t "${v/x/$'\''}" "'" + t ${v/x/$'\''} "'" + t "${v/x/$'\x5c\''}" "'" + t ${v/x/$'\x5c\''} "'" + t "${v/\'/\'}" "'" + t ${v/\'/\'} "'" + t ${v/\'/x} "x" + +echo "'" +echo "$'\''" + +echo $'\'' + +echo $'\'abcd\'' +echo "$'\'abcd\''" + +v=1 +echo ${v/1/\'} +echo ${v/\'/2} diff --git a/bash-5.1/tests/nquote2.tests b/bash-5.1/tests/nquote2.tests new file mode 100644 index 0000000000000000000000000000000000000000..e3af99af22946e6020d8bf5935b1107e6b414426 --- /dev/null +++ b/bash-5.1/tests/nquote2.tests @@ -0,0 +1,95 @@ +# 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 . +# +a=$'a\001b' + +e=$'uv\001\001wx' + +recho $a +recho $e + +recho ${a/$'\001'/A} +recho "${a/$'\001'/A}" +recho ${e/$'\001'/A} +recho "${e/$'\001'/A}" + +recho ${a/b/B} +recho "${a/b/B}" +recho ${e/w/W} +recho "${e/w/W}" + +recho ${a//$'\001'/A} +recho "${a//$'\001'/A}" +recho ${e//$'\001'/A} +recho "${e//$'\001'/A}" + +recho ${a//b/B} +recho "${a//b/B}" +recho ${e//w/W} +recho "${e//w/W}" + +# pos params pat subst + +set $e $e + +recho ${@/$'\001'/A} +recho "${@/$'\001'/A}" +recho ${@/w/W} +recho "${@/w/W}" + +recho ${@//$'\001'/A} +recho "${@//$'\001'/A}" +recho ${@//w/W} +recho "${@//w/W}" + +arr[0]=$a +arr[1]=$e + +recho ${arr[0]} +recho ${arr[1]} + +recho ${arr[0]/$'\001'/A} +recho "${arr[0]/$'\001'/A}" +recho ${arr[1]/$'\001'/A} +recho "${arr[1]/$'\001'/A}" + +recho ${arr[0]/b/B} +recho "${arr[0]/b/B}" +recho ${arr[1]/w/W} +recho "${arr[1]/w/W}" + +recho ${arr[0]//$'\001'/A} +recho "${arr[0]//$'\001'/A}" +recho ${arr[1]//$'\001'/A} +recho "${arr[1]//$'\001'/A}" + +recho ${arr[0]//b/B} +recho "${arr[0]//b/B}" +recho ${arr[1]//w/W} +recho "${arr[1]//w/W}" + +recho ${arr[@]/$'\001'/A} +recho "${arr[@]/$'\001'/A}" + +recho ${arr[@]/b/B} +recho "${arr[@]/b/B}" +recho ${arr[@]/w/W} +recho "${arr[@]/w/W}" + +recho ${arr[@]//$'\001'/A} +recho "${arr[@]//$'\001'/A}" + +recho ${arr[@]//b/B} +recho "${arr[@]//b/B}" +recho ${arr[@]//w/W} +recho "${arr[@]//w/W}" diff --git a/bash-5.1/tests/nquote3.right b/bash-5.1/tests/nquote3.right new file mode 100644 index 0000000000000000000000000000000000000000..d01eecca1a381f0fe7e3410c1a14bf353b9fa360 --- /dev/null +++ b/bash-5.1/tests/nquote3.right @@ -0,0 +1,60 @@ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <^Ab> +argv[1] = <^Ab> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <^Awx> +argv[1] = <^Awx> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <^Awx> +argv[1] = <^Awx> +argv[1] = +argv[1] = +argv[1] = <^Awx> +argv[1] = <^Awx> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <^Awx> +argv[1] = <^Awx> +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = <^Awx> +argv[2] = +argv[1] = <^Awx> +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = <^Awx> +argv[2] = +argv[1] = <^Awx> +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = diff --git a/bash-5.1/tests/nquote3.sub b/bash-5.1/tests/nquote3.sub new file mode 100644 index 0000000000000000000000000000000000000000..d1480c0bfbc7b5eaa7152d65581590c73b4e118d --- /dev/null +++ b/bash-5.1/tests/nquote3.sub @@ -0,0 +1,8 @@ +. ./test-glue-functions + +recho $'\c?' + +echo $'\c?' | od -t a | _intl_normalize_spaces +echo $'\c[\c\\\c]\c^\c_\c?' | od -t a | _intl_normalize_spaces + +echo $'\q' diff --git a/bash-5.1/tests/nquote3.tests b/bash-5.1/tests/nquote3.tests new file mode 100644 index 0000000000000000000000000000000000000000..44b51c4077d70f200b24cbfd0261a2a976fba0e8 --- /dev/null +++ b/bash-5.1/tests/nquote3.tests @@ -0,0 +1,98 @@ +# 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 . +# +a=$'a\001b' + +set $a + +b=$a +c=$1 +d="$1" + +e=$'uv\001\001wx' +f=$'uv\001w\001xy' + +set $e $e + +recho ${e%%??} +recho "${e%%??}" + +recho ${e%%???} +recho "${e%%???}" + +recho ${a#?} +recho "${a#?}" + +# simple variables + +recho ${f##*$'\001'} +recho "${f##*$'\001'}" +recho ${f##*''} # literal ^A +recho "${f##*'^A'}" # two characters, `^' and `A' + +recho ${e%$'\001'*} +recho "${e%$'\001'*}" +recho ${e#*$'\001'} +recho "${e#*$'\001'}" + +# array members + +arr[0]=$e +arr[1]=$f + +recho ${arr[1]##*$'\001'} +recho "${arr[1]##*$'\001'}" +recho ${arr[1]##*''} # literal ^A +recho "${arr[1]##*'^A'}" # two characters, `^' and `A' + +recho ${arr[0]%$'\001'*} +recho "${arr[0]%$'\001'*}" +recho ${arr[0]#*$'\001'} +recho "${arr[0]#*$'\001'}" + +recho ${arr%$'\001'*} +recho "${arr%$'\001'*}" +recho ${arr#*$'\001'} +recho "${arr#*$'\001'}" + +# positional parameters + +set $e $f + +recho ${2##*$'\001'} +recho "${2##*$'\001'}" +recho ${2##*''} # literal ^A +recho "${2##*''}" # literal ^A +recho ${2##*'^A'} # two characters, `^' and `A' +recho "${2##*'^A'}" # two characters, `^' and `A' + +recho ${1%$'\001'*} +recho "${1%$'\001'*}" +recho ${1#*$'\001'} +recho "${1#*$'\001'}" + +recho ${@%$'\001'*} +recho "${@%$'\001'*}" +recho ${@#*$'\001'} +recho "${@#*$'\001'}" +recho ${@##*''} # literal ^A +recho "${@##*'^A'}" # two characters, `^' and `A' + +# arrays treated as a whole + +recho ${arr[@]%$'\001'*} +recho "${arr[@]%$'\001'*}" +recho ${arr[@]#*$'\001'} +recho "${arr[@]#*$'\001'}" +recho ${arr[@]##*''} # literal ^A +recho "${arr[@]##*'^A'}" # two characters, `^' and `A' diff --git a/bash-5.1/tests/nquote4.right b/bash-5.1/tests/nquote4.right new file mode 100644 index 0000000000000000000000000000000000000000..1f7ae17036a881cb82ed52197e67d6716c8a6ce9 --- /dev/null +++ b/bash-5.1/tests/nquote4.right @@ -0,0 +1,18 @@ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <> +argv[1] = <> +argv[1] = +argv[1] = +argv[1] = <> +argv[1] = <^Abcd> +argv[1] = <> diff --git a/bash-5.1/tests/nquote4.tests b/bash-5.1/tests/nquote4.tests new file mode 100644 index 0000000000000000000000000000000000000000..5c67705bdb17af7d4d0be0f38b5e04cd42e7ade0 --- /dev/null +++ b/bash-5.1/tests/nquote4.tests @@ -0,0 +1,37 @@ +# 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 . +# +recho $'ab\x{}cd' +recho $'ab\x{41}cd' +recho $'ab\x41cd' + +recho $'ab\x{4}cd' +recho $'ab\x4cd' + +recho $'ab\x{cde' + +recho $'ab\x{cde' +recho $'ab\x{cd}e' +recho $'ab\x{c}de' + +recho $'\x{abcX' +recho $'\x{ab}cX' +recho $'\x{}X' +recho $'\x{X' +recho $'\x{01234567X' + +recho $'\x{41}b' +recho $'\x{}bc' +recho $'\x{1}bcd' + +recho $'\x{bde' diff --git a/bash-5.1/tests/nquote5.right b/bash-5.1/tests/nquote5.right new file mode 100644 index 0000000000000000000000000000000000000000..a893329418fed583db3ee03fd38c856954b1531a --- /dev/null +++ b/bash-5.1/tests/nquote5.right @@ -0,0 +1,86 @@ +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = <> +argv[2] = +argv[1] = +argv[2] = <--> +argv[3] = +argv[4] = <--> +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = <--> +argv[3] = +argv[4] = <--> +argv[5] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = <--> +argv[3] = +argv[4] = <--> +argv[5] = +argv[6] = <--> +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[2] = <--> +argv[3] = +argv[4] = <--> +argv[5] = +argv[6] = <--> +argv[7] = <> +argv[1] = +argv[2] = <--> +argv[3] = +argv[4] = <--> +argv[5] = +argv[6] = <--> +argv[7] = <> diff --git a/bash-5.1/tests/nquote5.tests b/bash-5.1/tests/nquote5.tests new file mode 100644 index 0000000000000000000000000000000000000000..ca0308d781475503cc4c9ea237dd14875e2af9d8 --- /dev/null +++ b/bash-5.1/tests/nquote5.tests @@ -0,0 +1,76 @@ +# 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 . +# +a=$'ab\001cd\001ef' +IFS=$'\001' + +recho $a +recho ${a} +recho xx${a}yy +recho "$a" + +recho $(echo $a) +recho $(echo "$a") + +recho ${a%%??} +recho "${a%%??}" + +recho ${a/f/} +recho "${a/f/}" + +a1=("$a") +recho ${a1[0]} +recho ${a1} + +recho ${a:2:2} + +set -- $a +recho $1 -- $2 -- $3 + +set -- "$a" +recho $1 +recho ${1} + +echo "$a" | { IFS=$'\001' read x y z; recho $x -- $y -- $z ; } +unset x y z +b=$'uv\177wx\177yz' + +recho $b + +recho "ab${x}y${a}z" +recho ab${x}y${a}z + +recho "ab${b}y${a}z" +recho ab${b}y${a}z + +echo "ab${b}y${a}z" | { IFS=$'\001' read l m n o ; recho $l -- $m -- $n -- $o; } +unset l m n o + +a=$'ab\001cd\001ef' +b=$'uv\177wx\177yz' + +IFS=$'\177' + +recho $a +recho $b + +recho "ab${x}y${b}z" +recho ab${x}y${b}z + +recho "ab${b}y${a}z" +recho ab${b}y${a}z + +echo "ab${b}y${a}z" | { IFS=$'\001' read l m n o ; recho "$l" -- "$m" -- "$n" -- "$o"; } +unset l m n o +echo "ab${b}y${a}z" | { IFS=$'\177' read l m n o ; recho "$l" -- "$m" -- "$n" -- "$o"; } +unset l m n o diff --git a/bash-5.1/tests/parser.right b/bash-5.1/tests/parser.right new file mode 100644 index 0000000000000000000000000000000000000000..3a01004fe067b10d5fab2937a54ac9d7bb450b12 --- /dev/null +++ b/bash-5.1/tests/parser.right @@ -0,0 +1,16 @@ +AAA +bash5: line 1: `invalid-name': not a valid identifier +in +in +in +in +bash5: -c: line 1: syntax error near unexpected token `)' +bash5: -c: line 1: `case x in esac) echo done; esac' +in +bash5: -c: line 1: syntax error near unexpected token `do' +bash5: -c: line 1: `case in do do) echo in; esac' +bash5: -c: line 1: syntax error near unexpected token `(' +bash5: -c: line 1: `for()' +in +done +ok 1 diff --git a/bash-5.1/tests/parser.tests b/bash-5.1/tests/parser.tests new file mode 100644 index 0000000000000000000000000000000000000000..6e020a4ba64236829090a8f5714d2306fc471462 --- /dev/null +++ b/bash-5.1/tests/parser.tests @@ -0,0 +1,6 @@ +# catch-all for parsing problems that don't fit anywhere else + +# this has to be in a separate file to get desired EOF behavior +${THIS_SH} ./parser1.sub + +${THIS_SH} ./posix2syntax.sub diff --git a/bash-5.1/tests/parser1.sub b/bash-5.1/tests/parser1.sub new file mode 100644 index 0000000000000000000000000000000000000000..5031931666156c8a79ecdaed40d453bc1295f94b --- /dev/null +++ b/bash-5.1/tests/parser1.sub @@ -0,0 +1 @@ +eval "array=(foo bar)" ; echo AAA\ diff --git a/bash-5.1/tests/posix2.right b/bash-5.1/tests/posix2.right new file mode 100644 index 0000000000000000000000000000000000000000..40aea03993d1703f88dae5bc97cb31fad31caae7 --- /dev/null +++ b/bash-5.1/tests/posix2.right @@ -0,0 +1,6 @@ +Testing for POSIX.2 conformance +./posix2.tests: eval: line 195: syntax error near unexpected token `esac' +./posix2.tests: eval: line 195: `case esac in (esac) ;; *) echo "case esac test 3" ;; esac' +./posix2.tests: eval: line 197: syntax error near unexpected token `)' +./posix2.tests: eval: line 197: `case esac in esac) ;; *) echo "case esac test 4";; esac' +All tests passed diff --git a/bash-5.1/tests/posix2.tests b/bash-5.1/tests/posix2.tests new file mode 100644 index 0000000000000000000000000000000000000000..9b6c0932f920eaf433dcbe9abbbc1971db88ebdf --- /dev/null +++ b/bash-5.1/tests/posix2.tests @@ -0,0 +1,204 @@ +# 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 . +# + +# posix-2.sh - Simple identification tests for POSIX.2 features +# commonly missing or incorrectly implemented. +# Time-stamp: <96/04/10 16:43:48 gildea> +# By Stephen Gildea March 1995 +# +# Copyright (c) 1995 Stephen Gildea +# Permission is hereby granted to deal in this Software without restriction. +# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. +# +# MODIFIED BY chet@po.cwru.edu to make part of the bash test suite. +# last change: Wed Jun 19 12:24:24 EDT 1996 +# +# some of the tests: +# +# shell functions (do we care?) +# var=${var:-val} +# unset +# set -- +# IFS parsing +## not exiting with -e and failed "if", the way Ultrix does (Ultrix 4.2?) +# "$@" expands to zero arguments if passed zero arguments +# $SHELL -c 'echo $1' bad good +# test -x +# positional parameters greater than 9 +# arithmetic expansion $(( ... )) +# getopts + +# For some tests we must run a sub-shell; $TESTSHELL says what to use. +# If set, TESTSHELL must be an absolute pathname. +# For example, on HP-UX 9, /bin/posix/sh is the supposedly-compliant shell. +TESTSHELL=${THIS_SH:-$PWD/../bash} + +# these tests create temp files with names $TMPDIR/conf* +: ${TMPDIR:=/tmp} + +exitval=0 +numtests=0 + +echo "Testing for POSIX.2 conformance" + +newtest() +{ + numtests=$(($numtests + 1)) +} + +testfail() +{ + echo "$1 test failed" + exitval=$(($exitval + 1)) +} + +newtest +empty="" +test "${empty:-ok}" = ok || testfail "empty var colon" +newtest +test "${empty-bad}" = "" || testfail "got \"${empty-bad}\": empty var nocolon" +newtest +test "${unsetvar-ok}" = ok || testfail "unset var" +newtest +unset empty +test "${empty-ok}" = ok || testfail "unset" + +newtest +set -- -Z +test "x$1" = x-Z || testfail '\"set -- arg\"' +# this should empty the argument list +newtest +set -- +test $# = 0 || testfail "still $# args: \"set --\"" + +# IFS parsing: +newtest +names=one/good/three +saved_ifs="$IFS" +IFS=/ +set $names lose +test "$2" = good || testfail "got \"$2\": IFS parsing" +IFS="$saved_ifs" + +# "$@" with 0 arguments should expand to 0 arguments +newtest +cat > $TMPDIR/conftest1 << EOF +$TMPDIR/conftest2 "\$@" +EOF +cat > $TMPDIR/conftest2 << "EOF" +#! /bin/sh +echo $# +EOF +chmod +x $TMPDIR/conftest1 $TMPDIR/conftest2 +numargs=$($TESTSHELL $TMPDIR/conftest1) +if [ "$?" != 0 ]; then + testfail 'running $@' +else + test "$numargs" = 0 || testfail '"$@" got '"$numargs args: expansion w 0 args" +fi +rm -f $TMPDIR/conftest1 $TMPDIR/conftest2 + +newtest +val=$("$TESTSHELL" -c 'echo $1' csh good) +test "$val" = good || testfail "got \"$val\": sh -c" + +newtest +# do these tests in a sub-shell because failure will exit +val=$("$TESTSHELL" -c 'echo ${10}' 0 1 2 3 4 5 6 7 8 9 ten 11 2> /dev/null) +test "$val" = ten || testfail "accessing more than 9 positional params" + +a=abc_def_ghi +export a +newtest; val=`"$TESTSHELL" -c 'echo "${a%_*}"' 2> /dev/null` +test "$val" = abc_def || testfail "parameter % op" +newtest; val=`"$TESTSHELL" -c 'echo "${a%%_*}"' 2> /dev/null` +test "$val" = abc || testfail "parameter %% op" +newtest; val=`"$TESTSHELL" -c 'echo "${a#*_}"' 2> /dev/null` +test "$val" = def_ghi || testfail "parameter # op" +newtest; val=`"$TESTSHELL" -c 'echo "${a##*_}"' 2> /dev/null` +test "$val" = ghi || testfail "parameter ## op" + +newtest +"$TESTSHELL" -c 'export a=value' 2> /dev/null || testfail "export with value" + +newtest +a=5; test "$(( ($a+1)/2 ))" = 3 || testfail "arithmetic expansion" + +# does "test" support the -x switch? +newtest +touch $TMPDIR/conftest +chmod -x $TMPDIR/conftest +test -x $TMPDIR/conftest && testfail "negative test -x" +chmod +x $TMPDIR/conftest +test -x $TMPDIR/conftest || testfail "positive test -x" +rm -f $TMPDIR/conftest + +newtest +test "$OPTIND" = 1 || testfail "OPTIND initial value" + +newtest +getopts a: store -a aoptval +if [ "$OPTIND" != 3 ] || [ "$store" != a ] || [ "$OPTARG" != aoptval ]; then + testfail "getopts" +fi + +# if I change the default quoting style for variable values, these +# next four must change + +newtest +SQUOTE="'" +val1=$(set | sed -n 's:^SQUOTE=::p') +if [ "$val1" != "\'" ]; then + testfail "variable quoting 1" +fi + +newtest +VTILDE='~' +val1=$(set | sed -n 's:^VTILDE=::p') +if [ "$val1" != "'~'" ]; then + testfail "variable quoting 2" +fi + +newtest +VHASH=ab#cd +val1=$(set | sed -n 's:^VHASH=::p') +if [ "$val1" != "ab#cd" ]; then + testfail "variable quoting 3" +fi + +newtest +VHASH2=#abcd +val1=$(set | sed -n 's:^VHASH2=::p') +if [ "$val1" != "'#abcd'" ]; then + testfail "variable quoting 4" +fi + +# these are Posix.2 shell grammar rule 4, problems through bash-4.3 +newtest +case esac in (foo|esac) ;; *) testfail "case esac test 1" ;; esac +newtest +case esac in foo|esac) ;; *) testfail "case esac test 2" ;; esac + +# these are supposed to be syntax errors +newtest +eval 'case esac in (esac) ;; *) echo "case esac test 3" ;; esac' +newtest +eval 'case esac in esac) ;; *) echo "case esac test 4";; esac' + +if [ $exitval = 0 ]; then + echo "All tests passed" +else + echo "$exitval of $numtests tests failed" +fi +exit $exitval diff --git a/bash-5.1/tests/posix2syntax.sub b/bash-5.1/tests/posix2syntax.sub new file mode 100644 index 0000000000000000000000000000000000000000..39af9a55febd02928ab255dd4cb7fc9c27592064 --- /dev/null +++ b/bash-5.1/tests/posix2syntax.sub @@ -0,0 +1,66 @@ +# 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 . +# +: ${THIS_SH:=./bash} +bashname=bash${BASH_VERSION%%.*} + +# tests for Posix grammar special cases + +# Posix grammar rule 5 +${THIS_SH} -c 'for invalid-name in a b c; do echo error; done' $bashname + +# Posix grammar rule 6: third word in FOR or SELECT +for i; do echo; done; echo in +for i; do echo in; done +for i do echo in; done + +select i; do echo; done; echo in +select i; do echo in; done; echo in +select i do echo in; done; echo in + +# Posix grammar rule 4: when PATTERN == ESAC, return ESAC +${THIS_SH} -c 'case x in esac) echo done; esac' $bashname + +# Posix grammar rule 6: third word in CASE +${THIS_SH} -c 'case in in in) echo in; esac;' $bashname +${THIS_SH} -c 'case in do do) echo in; esac' $bashname + +# Posix grammar rule 8: function NAME +${THIS_SH} -o posix -c 'for() +{ +echo function for; +}' $bashname + +for for in for; do echo in; echo done; done + +${THIS_SH} -c 'for (( i = 0; i < 5; i++ )) do : ; done' $bashname +${THIS_SH} -c 'for (( i = 0; i < 5; i++ )) { : ; }' $bashname + +# bug report: IN turning on unwanted alias expansion +${THIS_SH} -o posix -c ' +alias foo='two words' +foo_word='foo' +case "$foo_word" +in + foo) echo "bad 1";; +esac' $bashname + +${THIS_SH} -o posix -c ' +alias foo='oneword' +foo_word='foo' +case "$foo_word" +in + foo) echo "ok 1";; +esac' $bashname + + diff --git a/bash-5.1/tests/posixexp.right b/bash-5.1/tests/posixexp.right new file mode 100644 index 0000000000000000000000000000000000000000..e6bdbf4bd00980a0b9ef588e9d883d9c49ff44fb --- /dev/null +++ b/bash-5.1/tests/posixexp.right @@ -0,0 +1,288 @@ +a +b +a b +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[1] = +argv[2] = +argv[3] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = <}> +argv[3] = +argv[1] = <'foo'> +argv[1] = <'foo'> +argv[1] = <$a> +argv[1] = <'foo'> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +<.> <.> <> <.> <.> + <.> <.> <.> <.> + <.> <.> <.> <.> + <.> <.> <.> <.> +<.> <.> <> <.> <.> +<.> <.> <> <.> <.> + <.> <.> <.> <.> + <.> <.> <.> <.> + <.> <.> <.> <.> + <.> <.> <.> <.> +argv[1] = <'bar> +argv[1] = +argv[1] = <}z> +argv[1] = <''z}> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1 2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1 2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1 2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1 2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1 2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <1> +argv[2] = <2> +argv[1] = <12> +argv[1] = <1 2> +argv[1] = <1 2> +argv[1] = <1 2> +argv[1] = <1 2> +argv[1] = <1 2> +argv[1] = <1 2> +argv[1] = <12> +argv[1] = <12> +argv[1] = <12> +argv[1] = <12> +argv[1] = <12> +argv[1] = <12> +argv[1] = <1 2> +argv[1] = <1 2> +argv[1] = <12> +argv[1] = <12> +normal IFS +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +null IFS +argv[1] = < abc> +argv[2] = +argv[3] = +argv[1] = < abc def ghi jkl > +argv[1] = < abc> +argv[2] = +argv[3] = +non-standard IFS +argv[1] = < abc> +argv[2] = +argv[3] = +argv[1] = < abc def ghi jkl > +argv[1] = < abc def ghi jkl > +unset IFS +argv[1] = < abc> +argv[2] = +argv[3] = +argv[1] = < abc def ghi jkl > +argv[1] = < abc def ghi jkl > + +001: IFS = (unset): unset -v foo; set -- ${foo=$*} +soh stx etx del / soh stx etx del + +002: IFS = (unset): unset -v foo; set -- ${foo="$*"} +soh stx etx del / soh stx etx del + +003: IFS = (unset): unset -v foo; set -- "${foo=$*}" +soh stx etx del / soh stx etx del + +004: IFS = (unset): foo=; set -- ${foo:=$*} +soh stx etx del / soh stx etx del + +005: IFS = (unset): foo=; set -- ${foo:="$*"} +soh stx etx del / soh stx etx del + +006: IFS = (unset): foo=; set -- "${foo:=$*}" +soh stx etx del / soh stx etx del + +007: IFS = (unset): unset -v foo; set -- ${foo=$@} +soh stx etx del / soh stx etx del + +008: IFS = (unset): unset -v foo; set -- ${foo="$@"} +soh stx etx del / soh stx etx del + +009: IFS = (unset): unset -v foo; set -- "${foo=$@}" +soh stx etx del / soh stx etx del + +010: IFS = (unset): foo=; set -- ${foo:=$@} +soh stx etx del / soh stx etx del + +011: IFS = (unset): foo=; set -- ${foo:="$@"} +soh stx etx del / soh stx etx del + +012: IFS = (unset): foo=; set -- "${foo:=$@}" +soh stx etx del / soh stx etx del + +013: IFS = (null): unset -v foo; set -- ${foo=$*} +soh stx etx del / soh stx etx del + +014: IFS = (null): unset -v foo; set -- ${foo="$*"} +soh stx etx del / soh stx etx del + +015: IFS = (null): unset -v foo; set -- "${foo=$*}" +soh stx etx del / soh stx etx del + +016: IFS = (null): foo=; set -- ${foo:=$*} +soh stx etx del / soh stx etx del + +017: IFS = (null): foo=; set -- ${foo:="$*"} +soh stx etx del / soh stx etx del + +018: IFS = (null): foo=; set -- "${foo:=$*}" +soh stx etx del / soh stx etx del + +019: IFS = (null): unset -v foo; set -- ${foo=$@} +soh stx etx del / soh stx etx del + +020: IFS = (null): unset -v foo; set -- ${foo="$@"} +soh stx etx del / soh stx etx del + +021: IFS = (null): unset -v foo; set -- "${foo=$@}" +soh stx etx del / soh stx etx del + +022: IFS = (null): foo=; set -- ${foo:=$@} +soh stx etx del / soh stx etx del + +023: IFS = (null): foo=; set -- ${foo:="$@"} +soh stx etx del / soh stx etx del + +024: IFS = (null): foo=; set -- "${foo:=$@}" +soh stx etx del / soh stx etx del + +025: IFS = x: unset -v foo; set -- ${foo=$*} +soh stx etx del / soh stx etx del + +026: IFS = x: unset -v foo; set -- ${foo="$*"} +soh stx etx del / soh stx etx del + +027: IFS = x: unset -v foo; set -- "${foo=$*}" +soh stx etx del / soh stx etx del + +028: IFS = x: foo=; set -- ${foo:=$*} +soh stx etx del / soh stx etx del + +029: IFS = x: foo=; set -- ${foo:="$*"} +soh stx etx del / soh stx etx del + +030: IFS = x: foo=; set -- "${foo:=$*}" +soh stx etx del / soh stx etx del + +031: IFS = x: unset -v foo; set -- ${foo=$@} +soh stx etx del / soh stx etx del + +032: IFS = x: unset -v foo; set -- ${foo="$@"} +soh stx etx del / soh stx etx del + +033: IFS = x: unset -v foo; set -- "${foo=$@}" +soh stx etx del / soh stx etx del + +034: IFS = x: foo=; set -- ${foo:=$@} +soh stx etx del / soh stx etx del + +035: IFS = x: foo=; set -- ${foo:="$@"} +soh stx etx del / soh stx etx del + +036: IFS = x: foo=; set -- "${foo:=$@}" +soh stx etx del / soh stx etx del + +037: IFS = sp ht nl: unset -v foo; set -- ${foo=$*} +soh stx etx del / soh stx etx del + +038: IFS = sp ht nl: unset -v foo; set -- ${foo="$*"} +soh stx etx del / soh stx etx del + +039: IFS = sp ht nl: unset -v foo; set -- "${foo=$*}" +soh stx etx del / soh stx etx del + +040: IFS = sp ht nl: foo=; set -- ${foo:=$*} +soh stx etx del / soh stx etx del + +041: IFS = sp ht nl: foo=; set -- ${foo:="$*"} +soh stx etx del / soh stx etx del + +042: IFS = sp ht nl: foo=; set -- "${foo:=$*}" +soh stx etx del / soh stx etx del + +043: IFS = sp ht nl: unset -v foo; set -- ${foo=$@} +soh stx etx del / soh stx etx del + +044: IFS = sp ht nl: unset -v foo; set -- ${foo="$@"} +soh stx etx del / soh stx etx del + +045: IFS = sp ht nl: unset -v foo; set -- "${foo=$@}" +soh stx etx del / soh stx etx del + +046: IFS = sp ht nl: foo=; set -- ${foo:=$@} +soh stx etx del / soh stx etx del + +047: IFS = sp ht nl: foo=; set -- ${foo:="$@"} +soh stx etx del / soh stx etx del + +048: IFS = sp ht nl: foo=; set -- "${foo:=$@}" +soh stx etx del / soh stx etx del +argv[1] = <^A^B^C^?> +argv[1] = <^A^B^C^?> +argv[1] = <^A^B^C^?> +argv[1] = <^A^B^C^?> +argv[1] = <^A^B^C^?> +argv[1] = <^A^B^C^?> +argv[1] = <^A^B^C^?> +argv[1] = <^A^B^C^?> +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +argv[1] = +argv[2] = +[ abc def ghi jkl / abc def ghi jkl ] +[ abc def ghi jkl ] +[ abc def ghi jkl / abc def ghi jkl / abc def ghi jkl ] +5: notOK +OK +OK +5: $'not\ttoo\nbad' +"A" +A +argv[1] = <"A"> +argv[1] = +argv[1] = +./posixexp.tests: line 97: unexpected EOF while looking for matching `}' +./posixexp.tests: line 98: syntax error: unexpected end of file diff --git a/bash-5.1/tests/posixexp.tests b/bash-5.1/tests/posixexp.tests new file mode 100644 index 0000000000000000000000000000000000000000..d8f6644195d901f2cf879c9fa11e424c0de18f6e --- /dev/null +++ b/bash-5.1/tests/posixexp.tests @@ -0,0 +1,97 @@ +# 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 . +# +unset a +printf "%s\n" ${a:=a\ b} +echo "$a" + +unset v +recho ${v=a\ b} x ${v=c\ d} + +unset v +recho "${v=a\ b}" x "${v=c\ d}" + +unset a v + +recho "foo ${IFS+'bar'} baz" +recho "a ${IFS+b c} d" + +recho "a ${IFS+"b c"} d" + +u=x +recho "foo ${IFS+a$u{{{\}b} c ${IFS+d{}} bar" ${IFS-e{}} baz + +a=foo +recho "${IFS+'$a'}" +recho "${IFS+"'$a'"}" + +recho ${IFS+'$a'} +recho ${IFS+"'$a'"} + +unset a u +x='foo*bar' + +recho "${x##"}"}" +recho "${x##'}'}" +recho "${x##'}" + +recho "${x:-'}'}" + +foo="x'a'y" +recho "${foo%*'a'*}" +unset x + +unset u +v=w +printf '<%s> ' ${u+x} . ${v+x} . "${u+x}" . "${v+x}" .; echo +printf '<%s> ' ${u-x} . ${v-x} . "${u-x}" . "${v-x}" .; echo +printf '<%s> ' ${u=x} . ${v=x} . "${u=x}" . "${v=x}" .; echo +printf '<%s> ' ${u?x} . ${v?x} . "${u?x}" . "${v?x}" .; echo +printf '<%s> ' ${u#x} . ${v#x} . "${u#x}" . "${v#x}" .; echo +printf '<%s> ' ${u%x} . ${v%x} . "${u%x}" . "${v%x}" .; echo +printf '<%s> ' ${u:+x} . ${v:+x} . "${u:+x}" . "${v:+x}" .; echo +printf '<%s> ' ${u:-x} . ${v:-x} . "${u:-x}" . "${v:-x}" .; echo +printf '<%s> ' ${u:=x} . ${v:=x} . "${u:=x}" . "${v:=x}" .; echo +printf '<%s> ' ${u:?x} . ${v:?x} . "${u:?x}" . "${v:?x}" .; echo +# these are invalid substitution operators +#printf '<%s> ' ${u:#x} . ${v:#x} . "${u:#x}" . "${v:#x}" .; echo +#printf '<%s> ' ${u:%x} . ${v:%x} . "${u:%x}" . "${v:%x}" .; echo + +unset foo +set -o posix + +recho "${IFS+'bar}" +recho "foo ${IFS+'bar} baz" + +recho ${IFS+'}'z} +recho "${IFS+'}'z}" + +: ${TMPDIR:=/var/tmp} +rm -f $TMPDIR/sh +cp ${THIS_SH} $TMPDIR/sh +THIS_SH=$TMPDIR/sh ${THIS_SH} ./posixexp1.sub || echo "sh posixexp1.sub: test $? failed" +${THIS_SH} ./posixexp1.sub || echo "bash posixexp1.sub: test $? failed" + +THIS_SH=$TMPDIR/sh ${THIS_SH} ./posixexp2.sub || echo "sh posixexp2.sub: test $? failed" +rm -f $TMPDIR/sh + +${THIS_SH} ./posixexp3.sub +${THIS_SH} ./posixexp4.sub +${THIS_SH} ./posixexp5.sub +${THIS_SH} ./posixexp6.sub +${THIS_SH} ./posixexp7.sub +${THIS_SH} ./posixexp8.sub + +# this will be an error +foo=bar +echo "${foo:-"a}" diff --git a/bash-5.1/tests/posixexp1.sub b/bash-5.1/tests/posixexp1.sub new file mode 100644 index 0000000000000000000000000000000000000000..c0d6861a8de9bccd9bb90a8b7ac530a773347225 --- /dev/null +++ b/bash-5.1/tests/posixexp1.sub @@ -0,0 +1,51 @@ +# 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 . +# +# $FreeBSD: src/tools/regression/bin/sh/expansion/set-u1.0,v 1.2 2010/10/12 18:20:38 obrien Exp $ + +${THIS_SH} -uc 'unset foo; echo ${foo}' 2>/dev/null && exit 1 +${THIS_SH} -uc 'unset foo; echo $foo' 2>/dev/null && exit 1 +${THIS_SH} -uc 'foo=; echo $foo' >/dev/null || exit 2 +${THIS_SH} -uc 'foo=1; echo $foo' >/dev/null || exit 3 +# -/+/= are unaffected by set -u +${THIS_SH} -uc 'unset foo; echo ${foo-}' >/dev/null || exit 4 +${THIS_SH} -uc 'unset foo; echo ${foo+}' >/dev/null || exit 5 +${THIS_SH} -uc 'unset foo; echo ${foo=}' >/dev/null || exit 6 +# length/trimming are affected +${THIS_SH} -uc 'unset foo; echo ${#foo}' 2>/dev/null && exit 7 +${THIS_SH} -uc 'foo=; echo ${#foo}' >/dev/null || exit 8 +${THIS_SH} -uc 'unset foo; echo ${foo#?}' 2>/dev/null && exit 9 +${THIS_SH} -uc 'foo=1; echo ${foo#?}' >/dev/null || exit 10 +${THIS_SH} -uc 'unset foo; echo ${foo##?}' 2>/dev/null && exit 11 +${THIS_SH} -uc 'foo=1; echo ${foo##?}' >/dev/null || exit 12 +${THIS_SH} -uc 'unset foo; echo ${foo%?}' 2>/dev/null && exit 13 +${THIS_SH} -uc 'foo=1; echo ${foo%?}' >/dev/null || exit 14 +${THIS_SH} -uc 'unset foo; echo ${foo%%?}' 2>/dev/null && exit 15 +${THIS_SH} -uc 'foo=1; echo ${foo%%?}' >/dev/null || exit 16 + +${THIS_SH} -uc 'echo $!' 2>/dev/null && exit 17 +${THIS_SH} -uc ':& echo $!' >/dev/null || exit 18 +${THIS_SH} -uc 'echo $#' >/dev/null || exit 19 +${THIS_SH} -uc 'echo $1' 2>/dev/null && exit 20 +${THIS_SH} -uc 'echo $1' ${THIS_SH} xnotthere >/dev/null || exit 21 +${THIS_SH} -uc 'echo $2' ${THIS_SH} xnotthere 2>/dev/null && exit 22 +${THIS_SH} -uc 'echo $2' ${THIS_SH} xnotthere ynotthere >/dev/null || exit 23 + +${THIS_SH} -uc 'echo $! ; exit 24' 2>/dev/null +${THIS_SH} -uc 'echo ${!} ; exit 25' 2>/dev/null +${THIS_SH} -uc 'echo ${!,} ; exit 26' 2>/dev/null + +${THIS_SH} -uc 'echo ${!-ok 27} >/dev/null || exit 27' +${THIS_SH} -uc 'echo ${2-ok 28} >/dev/null || exit 28' + +exit 0 diff --git a/bash-5.1/tests/posixexp2.right b/bash-5.1/tests/posixexp2.right new file mode 100644 index 0000000000000000000000000000000000000000..08d3901ea1c6ae179d64b9fdea397872c07d38cc --- /dev/null +++ b/bash-5.1/tests/posixexp2.right @@ -0,0 +1,40 @@ +1 }z +2 ''z} +3 foo 'bar baz +4 foo b c baz +5 foo b c baz +6 }z +7 }z +8 ""z} +9 "}"z +10 foo bar} baz +11 ''z} +12 }z +13 }z +14 }z +15 <}> . +16 hi there +17 hi there +18 hi there +19 hi there +20 hi there +21 hi there +22 hi there +23 hi there +24 'value' +25 'value' +26 $key +27 'value' +28 'x ~ x''x}"x}" # +29 <{}b> <}> . +30 . +32 . +33 . +34 . +35 . +36 . +37 . +38 xay / x'a'y . +39 x' / x' . +40 < b c> . diff --git a/bash-5.1/tests/posixexp2.sub b/bash-5.1/tests/posixexp2.sub new file mode 100644 index 0000000000000000000000000000000000000000..5c46192ca1245c1132cd9b12447914a94151ee12 --- /dev/null +++ b/bash-5.1/tests/posixexp2.sub @@ -0,0 +1,37 @@ +# 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 . +# + +x=a\ b +[ "$x" = "${x?}" ] || exit 1 +set -- ${x?} +{ [ "$#" = 2 ] && [ "$1" = a ] && [ "$2" = b ]; } || exit 1 +unset x +(echo ${x?abcdefg}) 2>&1 | grep abcdefg >/dev/null || exit 1 +${THIS_SH} -c 'unset foo; echo ${foo?}' 2>/dev/null && exit 2 +${THIS_SH} -c 'foo=; echo ${foo:?}' 2>/dev/null && exit 3 +${THIS_SH} -c 'foo=; echo ${foo?}' >/dev/null || exit 4 +${THIS_SH} -c 'foo=1; echo ${foo:?}' >/dev/null || exit 5 +${THIS_SH} -c 'echo ${!?}' 2>/dev/null && exit 6 +${THIS_SH} -c ':& echo ${!?}' >/dev/null || exit 7 +${THIS_SH} -c 'echo ${#?}' >/dev/null || exit 8 +${THIS_SH} -c 'echo ${*?}' 2>/dev/null && exit 9 +${THIS_SH} -c 'echo ${*?}' ${THIS_SH} x >/dev/null || exit 10 +${THIS_SH} -c 'echo ${1?}' 2>/dev/null && exit 11 +${THIS_SH} -c 'echo ${1?}' ${THIS_SH} x >/dev/null || exit 12 +${THIS_SH} -c 'echo ${2?}' ${THIS_SH} x 2>/dev/null && exit 13 +${THIS_SH} -c 'echo ${2?}' ${THIS_SH} x y >/dev/null || exit 14 + +${THIS_SH} -c $'echo $(( x+ )) \n exit 0' ${THIS_SH} 2>/dev/null && exit 15 + +exit 0 diff --git a/bash-5.1/tests/posixexp2.tests b/bash-5.1/tests/posixexp2.tests new file mode 100644 index 0000000000000000000000000000000000000000..5f2392b599720242da03185a3dcfa0c381379b8f --- /dev/null +++ b/bash-5.1/tests/posixexp2.tests @@ -0,0 +1,60 @@ +# 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 . +# +# From mksh + +set -o posix ; shopt -u xpg_echo + +(echo 1 ${IFS+'}'z}) 2>&- || echo failed in 1 +(echo 2 "${IFS+'}'z}") 2>&- || echo failed in 2 +(echo 3 "foo ${IFS+'bar} baz") 2>&- || echo failed in 3 +(echo -n '4 '; printf '%s\n' "foo ${IFS+"b c"} baz") 2>&- || echo failed in 4 +(echo -n '5 '; printf '%s\n' "foo ${IFS+b c} baz") 2>&- || echo failed in 5 +(echo 6 ${IFS+"}"z}) 2>&- || echo failed in 6 +(echo 7 "${IFS+"}"z}") 2>&- || echo failed in 7 +(echo 8 "${IFS+\"}\"z}") 2>&- || echo failed in 8 +(echo 9 "${IFS+\"\}\"z}") 2>&- || echo failed in 9 +(echo 10 foo ${IFS+'bar} baz'}) 2>&- || echo failed in 10 +(echo 11 "$(echo "${IFS+'}'z}")") 2>&- || echo failed in 11 +(echo 12 "$(echo ${IFS+'}'z})") 2>&- || echo failed in 12 +(echo 13 ${IFS+\}z}) 2>&- || echo failed in 13 +(echo 14 "${IFS+\}z}") 2>&- || echo failed in 14 +u=x; (echo -n '15 '; printf '<%s> ' "foo ${IFS+a"b$u{ {"{{\}b} c ${IFS+d{}} bar" ${IFS-e{}} baz; echo .) 2>&- || echo failed in 15 +l=t; (echo 16 ${IFS+h`echo -n i ${IFS+$l}h`ere}) 2>&- || echo failed in 16 +l=t; (echo 17 ${IFS+h$(echo -n i ${IFS+$l}h)ere}) 2>&- || echo failed in 17 +l=t; (echo 18 "${IFS+h`echo -n i ${IFS+$l}h`ere}") 2>&- || echo failed in 18 +l=t; (echo 19 "${IFS+h$(echo -n i ${IFS+$l}h)ere}") 2>&- || echo failed in 19 +l=t; (echo 20 ${IFS+h`echo -n i "${IFS+$l}"h`ere}) 2>&- || echo failed in 20 +l=t; (echo 21 ${IFS+h$(echo -n i "${IFS+$l}"h)ere}) 2>&- || echo failed in 21 +l=t; (echo 22 "${IFS+h`echo -n i "${IFS+$l}"h`ere}") 2>&- || echo failed in 22 +l=t; (echo 23 "${IFS+h$(echo -n i "${IFS+$l}"h)ere}") 2>&- || echo failed in 23 +key=value; (echo -n '24 '; printf '%s\n' "${IFS+'$key'}") 2>&- || echo failed in 24 +key=value; (echo -n '25 '; printf '%s\n' "${IFS+"'$key'"}") 2>&- || echo failed in 25 # ksh93: “'$key'” +key=value; (echo -n '26 '; printf '%s\n' ${IFS+'$key'}) 2>&- || echo failed in 26 +key=value; (echo -n '27 '; printf '%s\n' ${IFS+"'$key'"}) 2>&- || echo failed in 27 +(echo -n '28 '; printf '%s\n' "${IFS+"'"x ~ x'}'x"'}"x}" #') 2>&- || echo failed in 28 +u=x; (echo -n '29 '; printf '<%s> ' foo ${IFS+a"b$u{ {"{ {\}b} c ${IFS+d{}} bar ${IFS-e{}} baz; echo .) 2>&- || echo failed in 29 +(echo -n '30 '; printf '<%s> ' ${IFS+foo 'b\ +ar' baz}; echo .) 2>&- || (echo failed in 30; echo failed in 31) +(echo -n '32 '; printf '<%s> ' ${IFS+foo "b\ +ar" baz}; echo .) 2>&- || echo failed in 32 +(echo -n '33 '; printf '<%s> ' "${IFS+foo 'b\ +ar' baz}"; echo .) 2>&- || echo failed in 33 +(echo -n '34 '; printf '<%s> ' "${IFS+foo "b\ +ar" baz}"; echo .) 2>&- || echo failed in 34 +(echo -n '35 '; printf '<%s> ' ${v=a\ b} x ${v=c\ d}; echo .) 2>&- || echo failed in 35 +(echo -n '36 '; printf '<%s> ' "${v=a\ b}" x "${v=c\ d}"; echo .) 2>&- || echo failed in 36 +(echo -n '37 '; printf '<%s> ' ${v-a\ b} x ${v-c\ d}; echo .) 2>&- || echo failed in 37 +(echo 38 ${IFS+x'a'y} / "${IFS+x'a'y}" .) 2>&- || echo failed in 38 +foo="x'a'y"; (echo 39 ${foo%*'a'*} / "${foo%*'a'*}" .) 2>&- || echo failed in 39 +foo="a b c"; (echo -n '40 '; printf '<%s> ' "${foo#a}"; echo .) 2>&- || echo failed in 40 diff --git a/bash-5.1/tests/posixexp3.sub b/bash-5.1/tests/posixexp3.sub new file mode 100644 index 0000000000000000000000000000000000000000..343adfe3df6639bca395444ad6289276f355c319 --- /dev/null +++ b/bash-5.1/tests/posixexp3.sub @@ -0,0 +1,65 @@ +# 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 . +# +set -- 1 2 + +unset var +recho ${var-$@} +recho ${var-"$@"} +recho ${var-$*} +recho ${var-"$*"} + +unset -v a b c d +recho ${a=$@} +recho "$a" +recho ${b="$@"} +recho "$b" +recho ${c=$*} +recho "$c" +recho ${d="$*"} +recho "$d" + +IFS= +unset var +recho ${var-$@} +recho ${var-"$@"} +recho ${var-$*} +recho ${var-"$*"} + +unset -v a b c d +# Posix interp 221 +# there should never be any word splitting because IFS is null +recho ${a=$@} +recho "$a" +recho $a +recho ${b="$@"} +recho "$b" +recho $b +recho ${c=$*} +recho "$c" +recho $c +recho ${d="$*"} +recho "$d" +recho $d + +unset -v a b c d +a=$@ +recho $a +b="$@" +recho $b +c=$* +recho $c +d="$*" +recho $d + +unset -v parameter a b c d diff --git a/bash-5.1/tests/posixexp4.sub b/bash-5.1/tests/posixexp4.sub new file mode 100644 index 0000000000000000000000000000000000000000..9d48b2f6d4def799c5901cd0a3a8095451dbb967 --- /dev/null +++ b/bash-5.1/tests/posixexp4.sub @@ -0,0 +1,44 @@ +# 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 . +# +set -- ' abc' 'def ghi' 'jkl ' + +echo normal IFS +recho $@ +: ${var=$@} +recho $var +unset -v var +recho ${var-$@} + +echo null IFS +IFS= +recho $@ +: ${var=$@} +recho $var +unset -v var +recho ${var-$@} + +echo non-standard IFS +IFS=: +recho $@ +: ${var=$@} +recho $var +unset -v var +recho ${var-$@} # this is inconsistent + +echo unset IFS +recho $@ +: ${var=$@} +recho $var +unset -v var +recho ${var-$@} diff --git a/bash-5.1/tests/posixexp5.sub b/bash-5.1/tests/posixexp5.sub new file mode 100644 index 0000000000000000000000000000000000000000..b0e1c039d8387cec8706ed2011658c838f3b2a8d --- /dev/null +++ b/bash-5.1/tests/posixexp5.sub @@ -0,0 +1,64 @@ +# 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 . +# +# test suite contribution from Martijn Dekker + +defaultIFS=$IFS +set -o errexit -o noglob +(set -o pipefail) 2>/dev/null && set -o pipefail +teststring=$(printf '\1\2\3\177') +n=0 + +trim_od() { + od -t a | sed -n '1 { s/^0*[[:blank:]]*//; s/[[:blank:]]*$//; p; }' +} + +doTest() { + set -- "$teststring" + eval "$testcmd" + case ${IFS+s}${IFS:+n} in + ( sn ) i=$(printf %s "$IFS" | trim_od) ;; + ( s ) i='(null)' ;; + ( '' ) i='(unset)' ;; + ( * ) echo 'internal error!' >&2; exit 125 ;; + esac + printf '\n%03d: IFS = %s: %s\n' "$((n+=1))" "$i" "$testcmd" + printf %s "$*${foo+/}${foo-}" | trim_od +} + +doAllTests() { + for testcmd in \ + 'unset -v foo; set -- ${foo=$*}' \ + 'unset -v foo; set -- ${foo="$*"}' \ + 'unset -v foo; set -- "${foo=$*}"' \ + \ + 'foo=; set -- ${foo:=$*}' \ + 'foo=; set -- ${foo:="$*"}' \ + 'foo=; set -- "${foo:=$*}"' \ + \ + 'unset -v foo; set -- ${foo=$@}' \ + 'unset -v foo; set -- ${foo="$@"}' \ + 'unset -v foo; set -- "${foo=$@}"' \ + \ + 'foo=; set -- ${foo:=$@}' \ + 'foo=; set -- ${foo:="$@"}' \ + 'foo=; set -- "${foo:=$@}"' + do + doTest "$testcmd" + done +} + +unset -v IFS; doAllTests +IFS=''; doAllTests +IFS='x'; doAllTests +IFS=$defaultIFS; doAllTests diff --git a/bash-5.1/tests/posixexp6.sub b/bash-5.1/tests/posixexp6.sub new file mode 100644 index 0000000000000000000000000000000000000000..b89b87f998db2d4f8efd846d04f4db4fbea727d4 --- /dev/null +++ b/bash-5.1/tests/posixexp6.sub @@ -0,0 +1,70 @@ +# 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 . +# +var=$'\01\02\03\177' + +bar=${unset:-$var} +recho "$bar" +unset -v bar +bar=${unset:-"$var"} +recho "$bar" + +foo=${parameter:=$var} + +recho "$foo" +recho "$parameter" + +unset -v foo parameter + +foo=${parameter:="$var"} + +recho "$foo" +recho "$parameter" + +unset -v foo parameter + +foo="${parameter:=$var}" + +recho "$foo" +recho "$parameter" + +unset -v foo parameter + +recho ${parameter:=a\ b} +unset -v parameter + +recho ${parameter:="a b"} +unset -v parameter + +v='a b' + +recho ${parameter:=$v} +unset -v parameter + +recho ${parameter:="$v"} +unset -v parameter + +# unsetting IFS here + +set " abc " " def ghi " "jkl " +unset -v IFS var +var=${var-$*}/${var-$*} +printf '[%s]\n' "$var" + +unset -v var +: ${var=$*} +printf '[%s]\n' "$var" + +unset -v var +: ${var:=$*/$*/${var-$*}} +printf '[%s]\n' "$var" diff --git a/bash-5.1/tests/posixexp7.sub b/bash-5.1/tests/posixexp7.sub new file mode 100644 index 0000000000000000000000000000000000000000..2e230cf855c7fd34ad8e6d760730fde5563e37db --- /dev/null +++ b/bash-5.1/tests/posixexp7.sub @@ -0,0 +1,13 @@ +# test the effect of quotes on the WORD in the posix pattern removal operators +# a here document does not behave the same as double quotes +x=notOK +cat <. +# +# A test suite for the POSIX.2 (BRE) pattern matching code +LC_ALL=C +LANG=C + +# First, test POSIX.2 character classes + +case e in +[[:xdigit:]]) echo ok 1;; +esac + +case a in +[[:alpha:]123]) echo ok 2;; +esac + +case 1 in +[[:alpha:]123]) echo ok 3;; +esac + +case 9 in +[![:alpha:]]) echo ok 4;; +esac + +case a in +[:al:]) echo ok 5;; +esac + +# invalid character class expressions are no longer just characters to be +# matched +case a in +[[:al:]) echo bad 6;; +*) echo ok 6;; +esac + +case '!' in +[abc[:punct:][0-9]) echo ok 7;; +esac + +# let's try to match the start of a valid sh identifier +case 'PATH' in +[_[:alpha:]]*) echo ok 8;; +esac + +# let's try to match the first two characters of a valid sh identifier +case PATH in +[_[:alpha:]][_[:alnum:]]*) echo ok 9;; +esac + +# is ^C a cntrl character? +case $'\003' in +[[:cntrl:]]) echo ok 10;; +esac + +# how about A? +case A in +[[:cntrl:]]) echo oops -- cntrl ;; +*) echo ok 11;; +esac + +case 9 in +[[:digit:]]) echo ok 12;; +esac + +case X in +[[:digit:]]) echo oops -- digit;; +*) echo ok 13;; +esac + +case $'\033' in +[[:graph:]]) echo oops -- graph;; +*) echo ok 14;; +esac + +case $'\040' in +[[:graph:]]) echo oops -- graph 2;; +*) echo ok 15;; +esac + +case ' ' in +[[:graph:]]) echo oops -- graph 3;; +*) echo ok 16;; +esac + +case 'aB' in +[[:lower:]][[:upper:]]) echo ok 17;; +esac + +case $'\040' in +[[:print:]]) echo ok 18;; +*) echo oops -- print;; +esac + +case PS3 in +[_[:alpha:]][_[:alnum:]][_[:alnum:]]*) echo ok 19;; +esac + +case a in +[[:alpha:][:digit:]]) echo ok 20;; +*) echo oops - skip brackpat ;; +esac + +case a in +[[:alpha:]\]) echo oops -- dangling backslash in brackpat ;; +*) echo ok 21 ;; +esac + +# what's a newline? is it a blank? a space? +case $'\n' in +[[:blank:]]) echo ok -- blank ;; +[[:space:]]) echo ok -- space ;; +*) echo oops newline ;; +esac + +# OK, what's a tab? is it a blank? a space? +case $'\t' in +[[:blank:]]) echo ok -- blank ;; +[[:space:]]) echo ok -- space ;; +*) echo oops newline ;; +esac + +# let's check out characters in the ASCII range +case $'\377' in +[[:ascii:]]) echo oops -- ascii\?;; +esac + +case 9 in +[1[:alpha:]123]) echo oops 1;; +esac + +# however, an unterminated brace expression containing a valid char class +# that matches had better fail +case a in +[[:alpha:]) echo oops 2;; +esac + +case $'\b' in +[[:graph:]]) echo oops 3;; +esac + +case $'\b' in +[[:print:]]) echo oops 4;; +esac + +case $' ' in +[[:punct:]]) echo oops 5;; +esac + +# Next, test POSIX.2 collating symbols + +case 'a' in +[[.a.]]) echo ok 1;; +esac + +case '-' in +[[.hyphen.]-9]) echo ok 2;; +esac + +case 'p' in +[[.a.]-[.z.]]) echo ok 3;; +esac + +case '-' in +[[.-.]]) echo ok 4;; +esac + +case ' ' in +[[.space.]]) echo ok 5;; +esac + +case ' ' in +[[.grave-accent.]]) echo oops - grave;; +*) echo ok 6;; +esac + +case '4' in +[[.-.]-9]) echo ok 7;; +esac + +# an invalid collating symbol cannot be the first part of a range +case 'c' in +[[.yyz.]-[.z.]]) echo oops - yyz;; +*) echo ok 8;; +esac + +case 'c' in +[[.yyz.][.a.]-z]) echo ok 9;; +esac + +# but when not part of a range is not an error +case 'c' in +[[.yyz.][.a.]-[.z.]]) echo ok 10 ;; +esac + +case 'p' in +[[.a.]-[.Z.]]) echo oops -- bad range ;; +*) echo ok 11;; +esac + +case p in +[[.a.]-[.zz.]p]) echo ok 12;; +*) echo oops -- bad range 2;; +esac + +case p in +[[.aa.]-[.z.]p]) echo ok 13;; +*) echo oops -- bad range 3;; +esac + +case c in +[[.yyz.]cde]) echo ok 14;; +esac + +case abc in +[[.cb.]a-Za]*) echo ok 15;; +esac + +case $'\t' in +[[.space.][.tab.][.newline.]]) echo ok 16;; +esac + +# and finally, test POSIX.2 equivalence classes + +case "abc" in +[[:alpha:]][[=b=]][[:ascii:]]) echo ok 1;; +esac + +case "abc" in +[[:alpha:]][[=B=]][[:ascii:]]) echo oops -- =B=;; +*) echo ok 2 ;; +esac + +case a in +[[=b=]) echo oops;; # an incomplete equiv class is just a string +*) echo ok 3;; +esac diff --git a/bash-5.1/tests/posixpipe.right b/bash-5.1/tests/posixpipe.right new file mode 100644 index 0000000000000000000000000000000000000000..8f6c9cbd8ab1632de333dddc110d4a6cd0cea3fd --- /dev/null +++ b/bash-5.1/tests/posixpipe.right @@ -0,0 +1,41 @@ +1 +0 +a +real 0.00 +user 0.00 +sys 0.00 +1 +a +real 0.00 +user 0.00 +sys 0.00 +1 +tfunc is a function +tfunc () +{ + time +} +1 +0 +1 +a +real 0.00 +user 0.00 +sys 0.00 +0 +a +real 0.00 +user 0.00 +sys 0.00 +0 +a +real 0.00 +user 0.00 +sys 0.00 +0 +1 +0 +a +real 0.00 +user 0.00 +sys 0.00 diff --git a/bash-5.1/tests/posixpipe.tests b/bash-5.1/tests/posixpipe.tests new file mode 100644 index 0000000000000000000000000000000000000000..fa8febed370e35d882a06bf5d68d9b6e6e99b74d --- /dev/null +++ b/bash-5.1/tests/posixpipe.tests @@ -0,0 +1,56 @@ +# 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 . +# +# Test timed and negated pipelines in bash-4.2 and later +export TIMEFORMAT=$'real %2R\nuser %2U\nsys %2S' + +! +echo $? + +! ! +echo $? + +time ! echo a +echo $? + +! time echo a +echo $? + +tfunc() +{ + time +} + +type tfunc + +! true +echo $? +! ! true +echo $? +! ! ! true +echo $? + +time time echo a +echo $? + +time time -p echo a +echo $? +time -p time echo a +echo $? + +! +echo $? +! ! +echo $? + +time -p -- echo a diff --git a/bash-5.1/tests/prec.right b/bash-5.1/tests/prec.right new file mode 100644 index 0000000000000000000000000000000000000000..e6af552c5669aacd66f28682f1cedf0500d6936c --- /dev/null +++ b/bash-5.1/tests/prec.right @@ -0,0 +1,28 @@ +`Say' echos its argument. Its return value is of no interest. +`Truth' echos its argument and returns a TRUE result. +`False' echos its argument and returns a FALSE result. + + Truth 1 && Truth 2 || Say 3 output=12 +( Truth 1 && Truth 2 ) || Say 3 output=12 + + Truth 1 && False 2 || Say 3 output=123 +( Truth 1 && False 2 ) || Say 3 output=123 + + False 1 && Truth 2 || Say 3 output=13 +( False 1 && Truth 2 ) || Say 3 output=13 + + False 1 && False 2 || Say 3 output=13 +( False 1 && False 2 ) || Say 3 output=13 + +Truth 1 || Truth 2 && Say 3 output=13 +Truth 1 || ( Truth 2 && Say 3 ) output=1 + +Truth 1 || False 2 && Say 3 output=13 +Truth 1 || ( False 2 && Say 3 ) output=1 + +False 1 || Truth 2 && Say 3 output=123 +False 1 || ( Truth 2 && Say 3 ) output=123 + +False 1 || False 2 && Say 3 output=12 +False 1 || ( False 2 && Say 3 ) output=12 + diff --git a/bash-5.1/tests/precedence.tests b/bash-5.1/tests/precedence.tests new file mode 100755 index 0000000000000000000000000000000000000000..111bd2314d7ab77d8058eefa692abab5d7a5f78e --- /dev/null +++ b/bash-5.1/tests/precedence.tests @@ -0,0 +1,90 @@ +# @(#)precedence_test 1.0 91/07/24 Maarten Litmaath + +# 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 . +# + +# test of relative precedences for `&&' and `||' operators + +echo "\`Say' echos its argument. Its return value is of no interest." +case `echo -n` in + '') Say () { echo -n "$*" ; } ;; + *) Say () { echo "$*\c" ; } ;; +esac + +echo "\`Truth' echos its argument and returns a TRUE result." +Truth () { + Say $1; + return 0; +} + +echo "\`False' echos its argument and returns a FALSE result." +False () { + Say $1; + return 1; +} + +echo "" + +cmd1='$open $test1 && $test2 $close || $test3' +cmd2='$test1 || $open $test2 && $test3 $close' + +grouping_sh= +grouping_C='( )' + +test3='Say 3' + +for i in 1 2 +do + eval proto=\$cmd$i + + for test1 in 'Truth 1' 'False 1' + do + for test2 in 'Truth 2' 'False 2' + do + for precedence in sh C + do + eval set x \$grouping_$precedence + shift + open=${1-' '} + close=${2-' '} + eval cmd=\""$proto"\" + Say "$cmd output=" + output=`eval "$cmd"` + Say "$output" + read correct || { echo 'Input fubar. Abort.' >&2; exit 1; } + test "X$output" = "X$correct" || echo " correct=$correct" + echo '' + done + + echo '' + done + done +done << EOF +12 +12 +123 +123 +13 +13 +13 +13 +13 +1 +13 +1 +123 +123 +12 +12 +EOF diff --git a/bash-5.1/tests/printf.right b/bash-5.1/tests/printf.right new file mode 100644 index 0000000000000000000000000000000000000000..b032dcbfd4a1e0d9063ec3f4e81428f6cd4e77d3 --- /dev/null +++ b/bash-5.1/tests/printf.right @@ -0,0 +1,298 @@ +printf: usage: printf [-v var] format [arguments] +printf: usage: printf [-v var] format [arguments] +10 + one +one\ctwo +4\.2 +no newline now newline +% +% +%d +A +unquoted +unquoted quoted +unquoted quoted +this\&that +1 2 3 4 5 +onestring 0 0 0 +onestring 0 0 0.00 +--4.2 -- +--4.2 -- +-- +^@81-- +-- A-- +-- A-- +A7 +A7 +A7 +A7 +A7 +--\"abcd\"-- +--\'abcd\'-- +--a\x-- +./printf.tests: line 95: printf: missing hex digit for \x +--\x-- +---- +---- +--4.2 +--4\.2-- +--\-- + + + 4.4BSD + 4.4BSD + 4.4BSD + 4.4BSD +4.4BSD +4.4BSD + 4.4BSD +--4.4BSD -- + 4. +4.4 +--4.4BSD -- +255 255 255 0377 0xff 0xFF +255 255 255 0377 0xff 0XFF +255 255 255 0377 0xff 0xFF +255 255 255 0377 0xff 0XFF + 42 + -42 + 42 + -42 +4.20 +4.20 + 4.2 +4.20 +4.20 + 4.2 +4.200000E+00 +4.200000e+00 +4.2E+00 +4.2e+00 +4.2 +4.2 + 4.2 + 4.2 +115 +115 +0163 +0163 +0x73 +0X73 +115.00 +115.00 +-- abcd-- +-- abcd-- +-- abcdefghij-- +-- abcdefghij-- +'abcd' +\'abcd\' +\abcd\ +\abcd\ +26 +26 +26 +./printf.tests: line 219: printf: `%10': missing format character +./printf.tests: line 220: printf: `M': invalid format character +ab./printf.tests: line 223: printf: `y': invalid format character +./printf.tests: line 226: printf: GNU: invalid number +0 +./printf.tests: line 227: printf: GNU: invalid number +0 +- +(foo )(bar ) +0 + ab cd ef +13 +^G +^G +^@7 +^Ge +"? +00001 +00001 + 1 +1 +0 +0 + 0 + 0 +4 +4 + 4 + 4 +0.000000 +0.000000 +0.00 +0.00 +4.000000 +4.000000 +4.00 +4.00 +0.000000E+00 +0.000000e+00 +0.00E+00 +0.00e+00 +4.000000E+00 +4.000000e+00 +4.00E+00 +4.00e+00 +9B3A59A5 +q +'' +'' +s + + +b + + +xx +xx +< >< > + one +one\ctwo +4\.2 +no newline now newline +% +% +%d +A +unquoted +unquoted quoted +unquoted quoted +this\&that +1 2 3 4 5 +onestring 0 0 0 +onestring 0 0 0.00 +--4.2 -- +--4.2 -- +-- A-- +-- A-- +A7 +A7 +A7 +--\"abcd\"-- +--\'abcd\'-- +--a\x-- +./printf1.sub: line 107: printf: missing hex digit for \x +--\x-- +---- +---- +--4.2 +--4\.2-- +--\-- + + + 4.4BSD + 4.4BSD + 4.4BSD + 4.4BSD +4.4BSD +4.4BSD + 4.4BSD +--4.4BSD -- + 4. +4.4 +--4.4BSD -- +255 255 255 0377 0xff 0xFF +255 255 255 0377 0xff 0XFF +255 255 255 0377 0xff 0xFF +255 255 255 0377 0xff 0XFF + 42 + -42 + 42 + -42 +4.20 +4.20 + 4.2 +4.20 +4.20 + 4.2 +4.200000E+00 +4.200000e+00 +4.2E+00 +4.2e+00 +4.2 +4.2 + 4.2 + 4.2 +115 +115 +0163 +0163 +0x73 +0X73 +115.00 +115.00 +-- abcd-- +-- abcd-- +-- abcdefghij-- +-- abcdefghij-- +'abcd' +\'abcd\' +\abcd\ +\abcd\ +26 +26 +26 +./printf1.sub: line 293: printf: `%10': missing format character +./printf1.sub: line 294: printf: `M': invalid format character +./printf1.sub: line 297: printf: `y': invalid format character +./printf1.sub: line 300: printf: GNU: invalid number +0 +./printf1.sub: line 302: printf: GNU: invalid number +0 +- +(foo )(bar ) +0 + ab cd ef +13 +^G +^G +^Ge +"? +16:09:15 +./printf3.sub: line 27: printf: warning: `Z': invalid time format specification +%(abde)Z +30-May-2010 16:09:15 +05/30/10 15:09:15 +current time: 2010-05-30 04:09:15 PM +epoch time: 1969-12-31 07:00:00 PM -0500 +random time: 2010-05-30 04:09:15 PM -0400 +local time: Sun May 30 16:09:15 EDT 2010 +Sun May 30 16:09:15 EDT 2010 date-style time +05/30/10 (foo) 16:09:15 date-style time +x 123x +x 123x +x 123x +x 123x +x 123x +x 123x +x 123.00x +x 123.00x +x 123.00x +x 123.00x +x123 x +x123 x +x+00001e+02x +x+00001e+02x +x+000000123x +x+000000123x +x+00001e+02x +x+00001e+02x +x +123x +x +123x +x +123x +x +123x +x 7bx +x 7bx +x+123 x +x+123 x +x+123 x +x+123 x +-123.000000 +-123.000000 +x +123x +x +123x +x +123x +x +123x diff --git a/bash-5.1/tests/printf.tests b/bash-5.1/tests/printf.tests new file mode 100644 index 0000000000000000000000000000000000000000..df37e47eeaf7a0604a3263b7897df466d888feec --- /dev/null +++ b/bash-5.1/tests/printf.tests @@ -0,0 +1,334 @@ +# 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 . +# +LC_ALL=C +LC_NUMERIC=C + +# these should output error messages -- the format is required +printf +printf -- + +# these should output nothing +printf "" +printf -- "" + +# in the future this may mean to put the output into VAR, but for +# now it is an error +# 2005-03-15 no longer an error +unset var +printf -v var "%10d" $RANDOM +echo ${#var} + +# this should expand escape sequences in the format string, nothing else +printf "\tone\n" + +# this should not cut off output after the \c +printf "one\ctwo\n" + +# and unrecognized backslash escapes should have the backslash preserverd +printf "4\.2\n" + +printf "no newline " ; printf "now newline\n" + +# %% -> % +printf "%%\n" + +# this was a bug caused by pre-processing the string for backslash escapes +# before doing the `%' format processing -- all versions before bash-2.04 +printf "\045" ; echo +printf "\045d\n" + +# simple character output +printf "%c\n" ABCD + +# test simple string output +printf "%s\n" unquoted + +# test quoted string output +printf "%s %q\n" unquoted quoted +printf "%s%10q\n" unquoted quoted + +printf "%q\n" 'this&that' + +# make sure the format string is reused to use up arguments +printf "%d " 1 2 3 4 5; printf "\n" + +# make sure that extra format characters get null arguments +printf "%s %d %d %d\n" onestring + +printf "%s %d %u %4.2f\n" onestring + +printf -- "--%s %s--\n" 4.2 '' +printf -- "--%s %s--\n" 4.2 + +# test %b escapes + +# 8 is a non-octal digit, so the `81' should be output +printf -- "--%b--\n" '\n\081' + +printf -- "--%b--\n" '\t\0101' +printf -- "--%b--\n" '\t\101' + +# these should all display `A7' +echo -e "\01017" +echo -e "\x417" + +printf "%b\n" '\01017' +printf "%b\n" '\1017' +printf "%b\n" '\x417' + +printf -- "--%b--\n" '\"abcd\"' +printf -- "--%b--\n" "\'abcd\'" + +printf -- "--%b--\n" 'a\\x' + +printf -- "--%b--\n" '\x' + +Z1=$(printf -- "%b\n" '\a\b\e\f\r\v') +Z2=$'\a\b\e\f\r\v' + +if [ "$Z1" != "$Z2" ]; then + echo "whoops: printf %b and $'' differ" >&2 +fi +unset Z1 Z2 + +printf -- "--%b--\n" '' +printf -- "--%b--\n" + +# the stuff following the \c should be ignored, as well as the rest +# of the format string +printf -- "--%b--\n" '4.2\c5.4\n'; printf "\n" + +# unrecognized escape sequences should by displayed unchanged +printf -- "--%b--\n" '4\.2' + +# a bare \ should not be processed as an escape sequence +printf -- "--%b--\n" '\' + +# make sure extra arguments are ignored if the format string doesn't +# actually use them +printf "\n" 4.4 BSD +printf " " 4.4 BSD ; printf "\n" + +# make sure that a fieldwidth and precision of `*' are handled right +printf "%10.8s\n" 4.4BSD +printf "%*.*s\n" 10 8 4.4BSD + +printf "%10.8q\n" 4.4BSD +printf "%*.*q\n" 10 8 4.4BSD + +printf "%6b\n" 4.4BSD +printf "%*b\n" 6 4.4BSD + +# we handle this crap with homemade code in printf.def +printf "%10b\n" 4.4BSD +printf -- "--%-10b--\n" 4.4BSD +printf "%4.2b\n" 4.4BSD +printf "%.3b\n" 4.4BSD +printf -- "--%-8b--\n" 4.4BSD + +# test numeric conversions -- these four lines should echo identically +printf "%d %u %i 0%o 0x%x 0x%X\n" 255 255 255 255 255 255 +printf "%d %u %i %#o %#x %#X\n" 255 255 255 255 255 255 + +printf "%ld %lu %li 0%o 0x%x 0x%X\n" 255 255 255 255 255 255 +printf "%ld %lu %li %#o %#x %#X\n" 255 255 255 255 255 255 + +printf "%10d\n" 42 +printf "%10d\n" -42 + +printf "%*d\n" 10 42 +printf "%*d\n" 10 -42 + +# test some simple floating point formats +printf "%4.2f\n" 4.2 +printf "%#4.2f\n" 4.2 +printf "%#4.1f\n" 4.2 + +printf "%*.*f\n" 4 2 4.2 +printf "%#*.*f\n" 4 2 4.2 +printf "%#*.*f\n" 4 1 4.2 + +printf "%E\n" 4.2 +printf "%e\n" 4.2 +printf "%6.1E\n" 4.2 +printf "%6.1e\n" 4.2 + +printf "%G\n" 4.2 +printf "%g\n" 4.2 +printf "%6.2G\n" 4.2 +printf "%6.2g\n" 4.2 + +# test some of the more esoteric features of POSIX.1 printf +printf "%d\n" "'string'" +printf "%d\n" '"string"' + +printf "%#o\n" "'string'" +printf "%#o\n" '"string"' + +printf "%#x\n" "'string'" +printf "%#X\n" '"string"' + +printf "%6.2f\n" "'string'" +printf "%6.2f\n" '"string"' + +# output from these two lines had better be the same +printf -- "--%6.4s--\n" abcdefghijklmnopqrstuvwxyz +printf -- "--%6.4b--\n" abcdefghijklmnopqrstuvwxyz + +# and these two also +printf -- "--%12.10s--\n" abcdefghijklmnopqrstuvwxyz +printf -- "--%12.10b--\n" abcdefghijklmnopqrstuvwxyz + +# tests for translating \' to ' and \\ to \ +# printf translates \' to ' in the format string... +printf "\'abcd\'\n" + +# but not when the %b format specification is used +printf "%b\n" \\\'abcd\\\' + +# but both translate \\ to \ +printf '\\abcd\\\n' +printf "%b\n" '\\abcd\\' + +# this was reported as a bug in bash-2.03 +# these three lines should all echo `26' +printf "%d\n" 0x1a +printf "%d\n" 032 +printf "%d\n" 26 + +# error messages + +# this should be an overflow, but error messages vary between systems +# printf "%lu\n" 4294967296 + +# ...but we cannot use this because some systems (SunOS4, for example), +# happily ignore overflow conditions in strtol(3) +#printf "%ld\n" 4294967296 + +printf "%10" +printf "ab%Mcd\n" + +# this caused an infinite loop in older versions of printf +printf "%y" 0 + +# these should print a warning and `0', according to POSIX.2 +printf "%d\n" GNU +printf "%o\n" GNU + +# failures in all bash versions through bash-2.05 +printf "%.0s" foo +printf "%.*s" 0 foo + +printf '%.0b-%.0s\n' foo bar +printf '(%*b)(%*s)\n' -4 foo -4 bar + +format='%'`printf '%0100384d' 0`'d\n' +printf $format 0 + +# failures in all bash versions through bash-3.0 - undercounted characters +unset vv +printf " %s %s %s \n%n" ab cd ef vv +echo "$vv" + +# this doesn't work with printf(3) on all systems +#printf "%'s\n" foo + +# test cases from an austin-group list discussion +# prints ^G as an extension +printf '%b\n' '\7' + +# prints ^G +printf '%b\n' '\0007' + +# prints NUL then 7 +printf '\0007\n' + +# prints no more than two hex digits +printf '\x07e\n' + +# additional backslash escapes +printf '\"\?\n' + +# failures with decimal precisions until after bash-3.1 +printf '%0.5d\n' 1 + +printf '%05d\n' 1 +printf '%5d\n' 1 +printf '%0d\n' 1 + +# failures with various floating point formats and 0 after bash-3.2 + +printf "%G\n" 0 +printf "%g\n" 0 +printf "%4.2G\n" 0 +printf "%4.2g\n" 0 + +printf "%G\n" 4 +printf "%g\n" 4 +printf "%4.2G\n" 4 +printf "%4.2g\n" 4 + +printf "%F\n" 0 +printf "%f\n" 0 +printf "%4.2F\n" 0 +printf "%4.2f\n" 0 + +printf "%F\n" 4 +printf "%f\n" 4 +printf "%4.2F\n" 4 +printf "%4.2f\n" 4 + +printf "%E\n" 0 +printf "%e\n" 0 +printf "%4.2E\n" 0 +printf "%4.2e\n" 0 + +printf "%E\n" 4 +printf "%e\n" 4 +printf "%4.2E\n" 4 +printf "%4.2e\n" 4 + +printf "%08X\n" 2604292517 + +# make sure these format specifiers all output '' for empty string arguments +echo q +printf "%q\n" "" +printf "%q\n" + +echo s +printf "%s\n" '' +printf "%s\n" + +echo b +printf "%b\n" '' +printf "%b\n" + +# bug in bash versions up to and including bash-3.2 +v=yyy +printf -v var "%s" '/current/working/directory/*.@(m3|i3|ig|mg)' +shopt -s nullglob extglob +echo "x$(printf "%b" @(hugo))x" +printf -v var "%b" @(hugo); echo "x${var}x" + +# make sure that missing arguments are always handled like the empty string +printf "<%3s><%3b>\n" + +# tests variable assignment with -v +${THIS_SH} ./printf1.sub + +${THIS_SH} ./printf2.sub + +${THIS_SH} ./printf3.sub + +${THIS_SH} ./printf4.sub diff --git a/bash-5.1/tests/printf1.sub b/bash-5.1/tests/printf1.sub new file mode 100644 index 0000000000000000000000000000000000000000..e4fb54b8be30ec6fa3fc7eb2815296ea06db9c5a --- /dev/null +++ b/bash-5.1/tests/printf1.sub @@ -0,0 +1,348 @@ +# 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 . +# +LC_ALL=C +LC_NUMERIC=C + +unset vv + +# this should expand escape sequences in the format string, nothing else +printf -v vv "\tone\n" +printf "%s" "$vv" + +# this should not cut off output after the \c +printf -v vv "one\ctwo\n" +printf "%s" "$vv" + +# and unrecognized backslash escapes should have the backslash preserverd +printf -v vv "4\.2\n" +printf "%s" "$vv" + +printf -v vv "no newline " ; printf "%s" "$vv" ; printf -v vv "now newline\n" +printf "%s" "$vv" + +# %% -> % +printf -v vv "%%\n" +printf "%s" "$vv" + +# this was a bug caused by pre-processing the string for backslash escapes +# before doing the `%' format processing -- all versions before bash-2.04 +printf -v vv "\045" +printf "%s" "$vv" +echo +printf -v vv "\045d\n" +printf "%s" "$vv" + +# simple character output +printf -v vv "%c\n" ABCD +printf "%s" "$vv" + +# test simple string output +printf -v vv "%s\n" unquoted +printf "%s" "$vv" + +# test quoted string output +printf -v vv "%s %q\n" unquoted quoted +printf "%s" "$vv" +printf -v vv "%s%10q\n" unquoted quoted +printf "%s" "$vv" + +printf -v vv "%q\n" 'this&that' +printf "%s" "$vv" + +# make sure the format string is reused to use up arguments +printf -v vv "%d " 1 2 3 4 5 +printf "%s" "$vv" +echo + +# make sure that extra format characters get null arguments +printf -v vv "%s %d %d %d\n" onestring +printf "%s" "$vv" + +printf -v vv "%s %d %u %4.2f\n" onestring +printf "%s" "$vv" + +printf -v vv -- "--%s %s--\n" 4.2 '' +printf "%s" "$vv" +printf -v vv -- "--%s %s--\n" 4.2 +printf "%s" "$vv" + +# test %b escapes + +# 8 is a non-octal digit, so the `81' should be output +#printf -v vv -- "--%b--\n" '\n\081' +#printf "%s" "$vv" + +printf -v vv -- "--%b--\n" '\t\0101' +printf "%s" "$vv" +printf -v vv -- "--%b--\n" '\t\101' +printf "%s" "$vv" + +# these should all display `A7' +printf -v vv "%b\n" '\01017' +printf "%s" "$vv" +printf -v vv "%b\n" '\1017' +printf "%s" "$vv" +printf -v vv "%b\n" '\x417' +printf "%s" "$vv" + +printf -v vv -- "--%b--\n" '\"abcd\"' +printf "%s" "$vv" +printf -v vv -- "--%b--\n" "\'abcd\'" +printf "%s" "$vv" + +printf -v vv -- "--%b--\n" 'a\\x' +printf "%s" "$vv" + +printf -v vv -- "--%b--\n" '\x' +printf "%s" "$vv" + +Z1=$(printf -- "%b\n" '\a\b\e\f\r\v') +Z2=$'\a\b\e\f\r\v' + +if [ "$Z1" != "$Z2" ]; then + printf "%s" "whoops: printf -v vv %b and $'' differ" >&2 +fi +unset Z1 Z2 + +printf -v vv -- "--%b--\n" '' +printf "%s" "$vv" +printf -v vv -- "--%b--\n" +printf "%s" "$vv" + +# the stuff following the \c should be ignored, as well as the rest +# of the format string +printf -v vv -- "--%b--\n" '4.2\c5.4\n' +printf "%s" "$vv" +echo + +# unrecognized escape sequences should by displayed unchanged +printf -v vv -- "--%b--\n" '4\.2' +printf "%s" "$vv" + +# a bare \ should not be processed as an escape sequence +printf -v vv -- "--%b--\n" '\' +printf "%s" "$vv" + +# make sure extra arguments are ignored if the format string doesn't +# actually use them +printf -v vv "\n" 4.4 BSD +printf "%s" "$vv" +printf -v vv " " 4.4 BSD +printf "%s" "$vv" +echo + +# make sure that a fieldwidth and precision of `*' are handled right +printf -v vv "%10.8s\n" 4.4BSD +printf "%s" "$vv" +printf -v vv "%*.*s\n" 10 8 4.4BSD +printf "%s" "$vv" + +printf -v vv "%10.8q\n" 4.4BSD +printf "%s" "$vv" +printf -v vv "%*.*q\n" 10 8 4.4BSD +printf "%s" "$vv" + +printf -v vv "%6b\n" 4.4BSD +printf "%s" "$vv" +printf -v vv "%*b\n" 6 4.4BSD +printf "%s" "$vv" + +# we handle this crap with homemade code in printf -v vv.def +printf -v vv "%10b\n" 4.4BSD +printf "%s" "$vv" +printf -v vv -- "--%-10b--\n" 4.4BSD +printf "%s" "$vv" +printf -v vv "%4.2b\n" 4.4BSD +printf "%s" "$vv" +printf -v vv "%.3b\n" 4.4BSD +printf "%s" "$vv" +printf -v vv -- "--%-8b--\n" 4.4BSD +printf "%s" "$vv" + +# test numeric conversions -- these four lines should printf "%s" identically +printf -v vv "%d %u %i 0%o 0x%x 0x%X\n" 255 255 255 255 255 255 +printf "%s" "$vv" +printf -v vv "%d %u %i %#o %#x %#X\n" 255 255 255 255 255 255 +printf "%s" "$vv" + +printf -v vv "%ld %lu %li 0%o 0x%x 0x%X\n" 255 255 255 255 255 255 +printf "%s" "$vv" +printf -v vv "%ld %lu %li %#o %#x %#X\n" 255 255 255 255 255 255 +printf "%s" "$vv" + +printf -v vv "%10d\n" 42 +printf "%s" "$vv" +printf -v vv "%10d\n" -42 +printf "%s" "$vv" + +printf -v vv "%*d\n" 10 42 +printf "%s" "$vv" +printf -v vv "%*d\n" 10 -42 +printf "%s" "$vv" + +# test some simple floating point formats +printf -v vv "%4.2f\n" 4.2 +printf "%s" "$vv" +printf -v vv "%#4.2f\n" 4.2 +printf "%s" "$vv" +printf -v vv "%#4.1f\n" 4.2 +printf "%s" "$vv" + +printf -v vv "%*.*f\n" 4 2 4.2 +printf "%s" "$vv" +printf -v vv "%#*.*f\n" 4 2 4.2 +printf "%s" "$vv" +printf -v vv "%#*.*f\n" 4 1 4.2 +printf "%s" "$vv" + +printf -v vv "%E\n" 4.2 +printf "%s" "$vv" +printf -v vv "%e\n" 4.2 +printf "%s" "$vv" +printf -v vv "%6.1E\n" 4.2 +printf "%s" "$vv" +printf -v vv "%6.1e\n" 4.2 +printf "%s" "$vv" + +printf -v vv "%G\n" 4.2 +printf "%s" "$vv" +printf -v vv "%g\n" 4.2 +printf "%s" "$vv" +printf -v vv "%6.2G\n" 4.2 +printf "%s" "$vv" +printf -v vv "%6.2g\n" 4.2 +printf "%s" "$vv" + +# test some of the more esoteric features of POSIX.1 printf -v vv +printf -v vv "%d\n" "'string'" +printf "%s" "$vv" +printf -v vv "%d\n" '"string"' +printf "%s" "$vv" + +printf -v vv "%#o\n" "'string'" +printf "%s" "$vv" +printf -v vv "%#o\n" '"string"' +printf "%s" "$vv" + +printf -v vv "%#x\n" "'string'" +printf "%s" "$vv" +printf -v vv "%#X\n" '"string"' +printf "%s" "$vv" + +printf -v vv "%6.2f\n" "'string'" +printf "%s" "$vv" +printf -v vv "%6.2f\n" '"string"' +printf "%s" "$vv" + +# output from these two lines had better be the same +printf -v vv -- "--%6.4s--\n" abcdefghijklmnopqrstuvwxyz +printf "%s" "$vv" +printf -v vv -- "--%6.4b--\n" abcdefghijklmnopqrstuvwxyz +printf "%s" "$vv" + +# and these two also +printf -v vv -- "--%12.10s--\n" abcdefghijklmnopqrstuvwxyz +printf "%s" "$vv" +printf -v vv -- "--%12.10b--\n" abcdefghijklmnopqrstuvwxyz +printf "%s" "$vv" + +# tests for translating \' to ' and \\ to \ +# printf -v vv translates \' to ' in the format string... +printf -v vv "\'abcd\'\n" +printf "%s" "$vv" + +# but not when the %b format specification is used +printf -v vv "%b\n" \\\'abcd\\\' +printf "%s" "$vv" + +# but both translate \\ to \ +printf -v vv '\\abcd\\\n' +printf "%s" "$vv" +printf -v vv "%b\n" '\\abcd\\' +printf "%s" "$vv" + +# this was reported as a bug in bash-2.03 +# these three lines should all printf "%s" `26' +printf -v vv "%d\n" 0x1a +printf "%s" "$vv" +printf -v vv "%d\n" 032 +printf "%s" "$vv" +printf -v vv "%d\n" 26 +printf "%s" "$vv" + +# error messages + +# this should be an overflow, but error messages vary between systems +# printf -v vv "%lu\n" 4294967296 + +# ...but we cannot use this because some systems (SunOS4, for example), +# happily ignore overflow conditions in strtol(3) +#printf -v vv "%ld\n" 4294967296 + +printf -v vv "%10" +printf -v vv "ab%Mcd\n" + +# this caused an infinite loop in older versions of printf -v vv +printf -v vv "%y" 0 + +# these should print a warning and `0', according to POSIX.2 +printf -v vv "%d\n" GNU +printf "%s" "$vv" +printf -v vv "%o\n" GNU +printf "%s" "$vv" + +# failures in all bash versions through bash-2.05 +printf -v vv "%.0s" foo +printf "%s" "$vv" +printf -v vv "%.*s" 0 foo +printf "%s" "$vv" + +printf -v vv '%.0b-%.0s\n' foo bar +printf "%s" "$vv" +printf -v vv '(%*b)(%*s)\n' -4 foo -4 bar +printf "%s" "$vv" + +format='%'`printf '%0100384d' 0`'d\n' +printf -v vv $format 0 +printf "%s" "$vv" + +# failures in all bash versions through bash-3.0 - undercounted characters +unset vv +printf -v vv " %s %s %s \n%n" ab cd ef vvv +printf "%s" "$vv" +echo $vvv + +# this doesn't work with printf -v vv(3) on all systems +#printf -v vv "%'s\n" foo + +# test cases from an austin-group list discussion +# prints ^G as an extension +printf -v vv '%b\n' '\7' +printf "%s" "$vv" + +# prints ^G +printf -v vv '%b\n' '\0007' +printf "%s" "$vv" + +# prints NUL then 7 +#printf -v vv '\0007\n' +#printf "%s" "$vv" + +# prints no more than two hex digits +printf -v vv '\x07e\n' +printf "%s" "$vv" + +# additional backslash escapes +printf -v vv '\"\?\n' +printf "%s" "$vv" diff --git a/bash-5.1/tests/printf2.sub b/bash-5.1/tests/printf2.sub new file mode 100644 index 0000000000000000000000000000000000000000..45c48d4c401cb7863b8a9d1c21549354bcc46d28 --- /dev/null +++ b/bash-5.1/tests/printf2.sub @@ -0,0 +1,7 @@ +unset LC_ALL LC_CTYPE +export LANG=en_US.UTF-8 + +case $(printf %d\\n \'À) in +192) exit 0;; +*) echo "printf2.sub: multibyte character conversion failed" >&2 ; exit 2 ;; +esac diff --git a/bash-5.1/tests/printf3.sub b/bash-5.1/tests/printf3.sub new file mode 100644 index 0000000000000000000000000000000000000000..4c54aa12730b9444fb80bd31747b7609431b7e7b --- /dev/null +++ b/bash-5.1/tests/printf3.sub @@ -0,0 +1,75 @@ +# 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 . +# +LC_ALL=C +LANG=C + +SHELLSTART=$(date +%s) +SECS=1275250155 +export TZ=EST5EDT + +case $SHELLSTART in +*s*) SHELLSTART=$EPOCHSECONDS ; DATESECS=false ;; # take a shot +*) DATESECS=true ;; +esac + +printf "%()T\n" $SECS +printf "%(abde)Z\n" -1 + +printf "%(%e-%b-%Y %T)T\n" $SECS + +printf -v v1 "%(%e-%b-%Y %T)T\n" $( $DATESECS && date +%s || echo $EPOCHSECONDS ) +printf -v v2 "%(%e-%b-%Y %T)T\n" -1 + +case $v1 in +$v2) ;; +*) echo "current time and -1 possible mismatch|$v1|$v2|" >&2 ;; +esac +unset v1 v2 + +v1=$(date +%s) +printf -v v2 "%(%s)T" -1 + +case $v1 in +$v2) ;; +*) echo "current time mismatch:$v1|$v2|" >&2 ;; +esac +unset v1 v2 + +printf "%(%x %X)T\n" $(( $SECS - 3600 )) + +printf -v v1 "%(%F %r)T\n" $SHELLSTART +printf -v v2 "%(%F %r)T\n" -2 + +case $v1 in +$v2) ;; +*) echo "shell start time and -2 possible mismatch|$v1|$v2|" >&2 ;; +esac +unset v1 v2 + +printf "current time: %(%F %r)T\n" $SECS + +printf "epoch time: %(%F %r %z)T\n" 0 +printf "random time: %(%F %r %z)T\n" $SECS + +printf "local time: %(%a %b %e %H:%M:%S %Z %Y)T\n" $SECS + +# test fieldwidth, justification, precision +printf "%-40.50(%a %b %e %H:%M:%S %Z %Y)T date-style time\n" $SECS + +# test fieldwidth, justification, precision, embedded parens +printf "%-40.50(%x (foo) %X)T date-style time\n" $SECS + +# problem introduced in bash-4.2 patch 5 +unset TZ +printf '%(%Y-%m-%d %H:%M:%S %Z)T\n' >/dev/null diff --git a/bash-5.1/tests/printf4.sub b/bash-5.1/tests/printf4.sub new file mode 100644 index 0000000000000000000000000000000000000000..ed4c5383ec4f6fae56c27ca509017cd8d3d26950 --- /dev/null +++ b/bash-5.1/tests/printf4.sub @@ -0,0 +1,82 @@ +# 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 . +# +# Problems with padding, field widths, and `+' through bash-4.2 + +printf "x%10.0fx\n" 123 +printf -v foo "x%10.0fx" 123 +echo "$foo" + +printf "x%10.0fx\n" 123 +printf -v foo "x%10.0fx" 123 +echo "$foo" + +printf "x%10.fx\n" 123 +printf -v foo "x%10.fx" 123 +echo "$foo" + +printf "x%10.2fx\n" 123 +printf -v foo "x%10.2fx" 123 +echo "$foo" + +printf "x%10.02fx\n" 123 +printf -v foo "x%10.02fx" 123 +echo "$foo" + +printf "x%-010.0fx\n" 123 +printf -v foo "x%-010.0fx" 123 +echo "$foo" + +printf "x%+010.0ex\n" 123 +printf -v foo "x%+010.0ex" 123 +echo "$foo" + +printf "x%+010.0fx\n" 123 +printf -v foo "x%+010.0fx" 123 +echo "$foo" + +printf "x%+010.0gx\n" 123 +printf -v foo "x%+010.0gx" 123 +echo "$foo" + +printf "x%+010.0dx\n" 123 +printf -v foo "x%+010.0dx" 123 +echo "$foo" + +printf "x%+010.0ldx\n" 123 +printf -v foo "x%+010.0ldx" 123 +echo "$foo" + +printf "x%+010.0xx\n" 123 +printf -v foo "x%+010.0xx" 123 +echo "$foo" + +printf "x%-+10.0fx\n" 123 +printf -v foo "x%-+10.0fx" 123 +echo "$foo" + +printf "x%-+10.0dx\n" 123 +printf -v foo "x%-+10.0dx" 123 +echo "$foo" + +printf "%f\n" -123 +printf -v foo "%f" -123 +echo "$foo" + +printf "x%+10.0fx\n" 123 +printf -v foo "x%+10.0fx" 123 +echo "$foo" + +printf "x%+10.0dx\n" 123 +printf -v foo "x%+10.0dx" 123 +echo "$foo" diff --git a/bash-5.1/tests/procsub.right b/bash-5.1/tests/procsub.right new file mode 100644 index 0000000000000000000000000000000000000000..c6471c516cc7ad695cdc9e4064f63ce8ab4d0d40 --- /dev/null +++ b/bash-5.1/tests/procsub.right @@ -0,0 +1,33 @@ +test1 +foo +test2 +test4 +8 +test5 +test6 +test7 +test8 +test8a +test9 +hi +bye +l8r +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +intern +1 +0 +0 +0 +0 +extern +1 +0 +0 +0 +0 +123 +bar1 +ouch +bar2 +foo +subshell diff --git a/bash-5.1/tests/procsub.tests b/bash-5.1/tests/procsub.tests new file mode 100644 index 0000000000000000000000000000000000000000..946d2c2269ee4652072abebaafe5c3821c330afd --- /dev/null +++ b/bash-5.1/tests/procsub.tests @@ -0,0 +1,121 @@ +# 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 . +# +# process substitution constructs that have caused problems in the past +. ./test-glue-functions + +eval cat <(echo test1) +eval "echo foo;cat" <(echo test2) + +# this doesn't work, and it never should have +#unset f +#f=<(echo test3); cat "$f" + +unset f +eval f=<(echo test4) "; cat \$f" + +unset f + +FN=$TMPDIR/bashtest-procsub-$$ +cat >"$FN" </dev/null +} +f2(){ + date >/dev/null + cat $1 +} +cat <(echo hi) +f1 <(echo bye) +f2 <(echo l8r) + +unset -f f1 f2 + +# set up conditions for test +ulimit -n 256 + +bug() +{ +c=$(ulimit -n) +let c+=100 +while let c-- +do + while read -ru3 x + do + echo -n : + done 3< <(echo x) +done +echo +} + +bug +unset -f bug + +count_lines() +{ + wc -l < $1 + + case "$1" in + *sh-np*) [ -e "$1" ] || { echo 0; echo 0; echo 0; echo 0; return; } ;; + *) ;; + esac + + wc -l < $1 + wc -l < $1 + true | wc -l < $1 + wc -l < $1 +} + +echo intern +count_lines <(date) | _cut_leading_spaces +unset -f count_lines + +echo extern +FN=$TMPDIR/bashtest-$$ +cat >$FN << \EOF +wc -l < $1 +case $1 in *sh-np*) [ -e $1 ] || { echo 0; echo 0; echo 0; echo 0; return; } ;; esac +wc -l < $1 +wc -l < $1 +true | wc -l < $1 +wc -l < $1 +EOF + +${THIS_SH} -c "source $FN <(date)" | _cut_leading_spaces +rm -f $FN + +moo() { ls -l "$1" >/dev/null; ls -l "$1" >/dev/null; }; moo >(true) +moo() { ls -al "$1" >/dev/null; (true); ls -al "$1" >/dev/null; }; moo >(true) + +unset -f moo + +${THIS_SH} ./procsub1.sub +${THIS_SH} ./procsub2.sub diff --git a/bash-5.1/tests/procsub1.sub b/bash-5.1/tests/procsub1.sub new file mode 100644 index 0000000000000000000000000000000000000000..0e68f3b23dabf1396cd49f799fb43d94b20b00f7 --- /dev/null +++ b/bash-5.1/tests/procsub1.sub @@ -0,0 +1,5 @@ +# make sure we can wait for the last process substitution, since it sets $! +cat <(exit 123) >/dev/null + +wait "$!" +echo $? diff --git a/bash-5.1/tests/procsub2.sub b/bash-5.1/tests/procsub2.sub new file mode 100644 index 0000000000000000000000000000000000000000..75ad2d0cdaa8301d6d7bd0eeb6a824de6da8ea4d --- /dev/null +++ b/bash-5.1/tests/procsub2.sub @@ -0,0 +1,36 @@ +# 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 . +# + +# test whether or not we remove FIFOs and close pipe file descriptors too +# aggressively + +ouch() +{ + while read foo; do echo "$foo"; done < <(echo bar1) + cat "$1" +} + +ouch <(echo ouch ) + +ouch2() +{ + { cat; } < <(echo bar2) + cat "$1" +} + +exec 4< <(echo subshell) +ouch2 <(echo foo ) + +read var <&4 +echo $var diff --git a/bash-5.1/tests/quote.right b/bash-5.1/tests/quote.right new file mode 100644 index 0000000000000000000000000000000000000000..303e685dc345bf3f4fc7801e979021a03386b121 --- /dev/null +++ b/bash-5.1/tests/quote.right @@ -0,0 +1,182 @@ +Single Quote +foo +bar +foo +bar +foo\ +bar +Double Quote +foo +bar +foo +bar +foobar +Backslash Single Quote +foo bar +foo bar +foobar +Backslash Double Quote +foo bar +foo bar +foobar +Double Quote Backslash Single Quote +foo +bar +foo +bar +foobar +Dollar Paren Single Quote +foo bar +foo bar +foo\ bar +Dollar Paren Double Quote +foo bar +foo bar +foobar +Double Quote Dollar Paren Single Quote +foo +bar +foo +bar +foo\ +bar +argv[1] = +argv[1] = +argv[1] = argv[2] = <-e> argv[3] = +argv[1] = argv[2] = <-e> argv[3] = +argv[1] = +argv[1] = +argv[1] = +b +a +b +c +argv[1] = +argv[2] = +argv[1] = <$> +argv[2] = +argv[1] = <$foo> +argv[2] = +argv[1] = <$foo> +argv[2] = +argv[1] = <`> +argv[2] = +argv[1] = <\> +argv[2] = +${ +argv[1] = <(")> +argv[1] = <(")> +string \ +string \ +string \ +string \ +string \ +string \} +'weferfds'\''dsfsdf' +'weferfdsdsfsdf' +'weferfds'\''dsfsdf' +'weferfds'\\dsfsdf' +testdd ddtest +testdd '\''ddtest +testdddding +testdddding +test'ing +test'ing +test'string +a'b'c +foo b c baz +foo 'bar baz +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[2] = <> +argv[1] = <> +argv[2] = <> +argv[1] = <> +===== +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[2] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[2] = <> +===== +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[2] = <> +argv[1] = <> +argv[2] = <> +argv[1] = <> +===== +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[2] = <> +argv[1] = <> +argv[2] = <> +argv[1] = <> +argv[1] = <4> +argv[2] = <> +argv[1] = +argv[2] = <> +argv[1] = +argv[2] = <> +argv[1] = +argv[2] = <> +argv[1] = +argv[2] = <> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +0 +1 +1 +1 +1 +1 +1 +1 +2 +2 +2 +2 +0 +1 +1 +1 +1 +1 +1 +1 +2 +2 +2 +2 +0 +0 +0 +2 +2 +4 +4 +3 +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <^?> diff --git a/bash-5.1/tests/quote.tests b/bash-5.1/tests/quote.tests new file mode 100644 index 0000000000000000000000000000000000000000..0a0b4afe4ceca243b2c248c402110db7454dc738 --- /dev/null +++ b/bash-5.1/tests/quote.tests @@ -0,0 +1,139 @@ +# 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 . +# +echo "Single Quote" +echo 'foo +bar' +echo 'foo +bar' +echo 'foo\ +bar' + +echo "Double Quote" +echo "foo +bar" +echo "foo +bar" +echo "foo\ +bar" + +echo "Backslash Single Quote" +echo `echo 'foo +bar'` +echo `echo 'foo +bar'` +echo `echo 'foo\ +bar'` + +echo "Backslash Double Quote" +echo `echo "foo +bar"` +echo `echo "foo +bar"` +echo `echo "foo\ +bar"` + +echo "Double Quote Backslash Single Quote" +echo "`echo 'foo +bar'`" +echo "`echo 'foo +bar'`" +echo "`echo 'foo\ +bar'`" + +echo "Dollar Paren Single Quote" +echo $(echo 'foo +bar') +echo $(echo 'foo +bar') +echo $(echo 'foo\ +bar') + +echo "Dollar Paren Double Quote" +echo $(echo "foo +bar") +echo $(echo "foo +bar") +echo $(echo "foo\ +bar") + +echo "Double Quote Dollar Paren Single Quote" +echo "$(echo 'foo +bar')" +echo "$(echo 'foo +bar')" +echo "$(echo 'foo\ +bar')" + +# old-style command substitution parsing compatibility tests -- post bash-3.1 +recho 'foo \\ +bar' + +recho 'foo \ +bar' + +echo `recho sed -e 's/[ :]/\\ +/g'` + +echo `recho sed -e 's/[ :]/\ +/g'` + +echo `recho 'foo\\ +bar'` + +echo `recho 'foo\ +bar'` + +echo $(recho 'foo\ +bar') + +a=`echo 'a b c' | sed 's/ /\\ +/g' | grep 'b'` +echo $a +a=`echo 'a b c' | sed 's/ /\\ +/g'` +echo "$a" + +recho `echo 'a\' b` + +recho `echo '\$' bab` +recho `echo '\$foo' bab` +recho `echo '$foo' bab` + +recho `echo '\`' ab` + +recho `echo '\\' ab` + +echo `echo '${'` + +recho `echo "(\\")"` +# produces no output +: `: "\\""` +# ultimate workaround +recho `echo "(\")"` + +# various strings ending in backslashes + +echo 'string \' +echo "string \\" + +echo string\ \\ + +echo ${foo:-'string \'} +echo "${foo:-string \\}" +echo ${foo:-string \\\}} + +${THIS_SH} ./quote1.sub +${THIS_SH} ./quote2.sub +${THIS_SH} ./quote3.sub +${THIS_SH} ./quote4.sub diff --git a/bash-5.1/tests/quote1.sub b/bash-5.1/tests/quote1.sub new file mode 100644 index 0000000000000000000000000000000000000000..86f97869b3b45f593aa8cccad6a2094766d043b2 --- /dev/null +++ b/bash-5.1/tests/quote1.sub @@ -0,0 +1,62 @@ +# 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 . +# +# inconsistency with quoted pattern substitution patterns through bash-4.2 +# fixed in a ksh93-compatible (and Posix-compatible, in general) way +# NOT backwards compatible + +test="weferfds'dsfsdf" + +# why does this work, this list was born of frustration, I tried +# everything I could think of. +echo \'${test//"'"/\'\\\'\'}\'" " + +#but none of the following + +echo "'${test//"'"/}'" + +echo "'${test//"'"/"'\\''"}'" + +printf "%s\n" "'${test//"'"/\'\\'\'}'" + +#echo "'${test//'/}'" # hangs waiting for ' +#echo "'${test//"'"/'\\''}'" # hangs waiting for ' + +unset test +test=teststrtest +echo "${test//str/"dd dd"}" +echo ${test//str/"dd '\''dd"} + +unset test +test=teststring + +echo "${test//str/"dddd"}" + +echo ${test//str/"dddd"} + +echo ${test//str/"'"} + +echo "${test//str/"'"}" + +#echo "${test//str/'}" # hangs + +test=test\'string +echo "${test//"'"/"'"}" + +x="a'b'c"; echo "${x//\'/\'}" + +printf '%s\n' "foo ${IFS+"b c"} baz" + +# this is where the default behavior differs from posix +set -o posix +echo "foo ${IFS+'bar} baz" diff --git a/bash-5.1/tests/quote2.sub b/bash-5.1/tests/quote2.sub new file mode 100644 index 0000000000000000000000000000000000000000..1012b8fe365a17de1d47940e3aee59e2aae36aad --- /dev/null +++ b/bash-5.1/tests/quote2.sub @@ -0,0 +1,55 @@ +# 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 . +# +x=x +e= + +recho ${x:+""} +recho ${x:+ ""} +recho ${x:+"" } +recho ${x:+"$e"} +recho ${x:+ "$e"} +recho ${x:+"$e""$e"""} +recho ${x:+"$e""$e"""} +recho ${x:+"$e" "$e"""} +recho ${x:+"$e""$e" ""} +recho ${x:+ "$e""$e"""} + +echo ===== +recho ${x:+''} +recho ${x:+ ''} +recho ${x:+'' } +recho ${x:+'' ''} + +recho ${x:+$e''} +recho ${x:+''$e} + +recho ${x:+''$e $e''} + +echo ===== +recho ${x:+"$(:)"} +recho ${x:+ "$(:)"} +recho ${x:+"$(:)""$(:)"""} +recho ${x:+"$(:)""$(:)"""} +recho ${x:+"$(:)" "$(:)"""} +recho ${x:+"$(:)""$(:)" ""} +recho ${x:+ "$(:)""$(:)"""} + +echo ===== +recho ${x:+"`:`"} +recho ${x:+ "`:`"} +recho ${x:+"`:`""`:`"""} +recho ${x:+"`:`""`:`"""} +recho ${x:+"`:`" "`:`"""} +recho ${x:+"`:`""`:`" ""} +recho ${x:+ "`:`""`:`"""} diff --git a/bash-5.1/tests/quote3.sub b/bash-5.1/tests/quote3.sub new file mode 100644 index 0000000000000000000000000000000000000000..54bc5ed497cbfae201d93d8fb7b489d250324541 --- /dev/null +++ b/bash-5.1/tests/quote3.sub @@ -0,0 +1,31 @@ +# 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 . +# +# new tests +x=4 +sp=' ' + +# word +recho ${x}${sp}'' + +# unquoted +recho ${x+ab "$y"} +recho ${x+ab ''} +recho ${x+ab "$( : )"} +recho ${x+ab "${yy}"} + +# quoted +recho "${x+ab ''}" +recho "${x+ab ""}" +recho "${x+ab '${yy}'}" +recho "${x+ab "${yy}"}" diff --git a/bash-5.1/tests/quote4.sub b/bash-5.1/tests/quote4.sub new file mode 100644 index 0000000000000000000000000000000000000000..ab534c8ead23a121490897e1bfc84f593d039bbd --- /dev/null +++ b/bash-5.1/tests/quote4.sub @@ -0,0 +1,101 @@ +# 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 . +# +n() { echo $#; } + +set -- + +n "$@" + +# should be 1 +n "$@"'' +n ''"$@" +n ''"$@"'' + +set -- '' + +n "$@" +# should be 1 +n "$@"'' +n ''"$@" +n ''"$@"'' + +set -- '' '' + +n "$@" +# should be 2 +n ''"$@" +# should be 2 +n "$@"'' +# should be 2 +n ''"$@"'' + +x=x + +set -- + +n ${x+"$@"} + +# should be 1 +n ${x+"$@"''} +n ${x+''"$@"} +n ${x+''"$@"''} + +set -- '' + +n ${x+"$@"} +# should be 1 +n ${x+"$@"''} +n ${x+''"$@"} +n ${x+''"$@"''} + +set -- '' '' + +n ${x+"$@"} +# should be 2 +n ${x+''"$@"} +# should be 2 +n ${x+"$@"''} +# should be 2 +n ${x+''"$@"''} + + +set -- + +n "$@" "$@" +n "$@""$@" + +n ${x+"$@" "$@"} + +set -- '' + +n ${x+"$@" "$@"} +n "$@" "$@" + +set -- '' '' + +n ${x+"$@" "$@"} +n "$@" "$@" +n "$@""$@" + +# new tests +unset -v x +v=$'\177' + +recho ''$'\177''' +recho $'\177''' +recho ''$'\177' + +recho ''$v'' +recho ''$v +recho $v'' diff --git a/bash-5.1/tests/read.right b/bash-5.1/tests/read.right new file mode 100644 index 0000000000000000000000000000000000000000..09cd422fad8c4bf083ba25fae855708c2de1bccb --- /dev/null +++ b/bash-5.1/tests/read.right @@ -0,0 +1,58 @@ +a. +-a-b- +-a-b - +-a b- +-a b- +-a-b\- +-a b\- +-\-a b\- +-\ a b\- +-\-a b\- +-\ a b\- +argv[1] = <^A> +argv[1] = <^A> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = +1: x[A] y[B] z[] +1a: +2: x[A B] +[A B ] +[ A B ] +==aa== +==== +==== +argv[1] = < foo> +argv[1] = < foo> +argv[1] = +argv[1] = < foo> +argv[1] = +argv[1] = +argv[1] = < foo> +a = abcdefg +a = xyz +a = -xyz 123- +a = abc +./read3.sub: line 17: read: -1: invalid number +abc +ab +abc +# +while read -u 3 var +do +echo "$var" +done 3<$0 +argv[1] = <> +argv[1] = <> +argv[1] = <> +FOO +argv[1] = <> +argv[1] = <3> +argv[1] = <> +argv[2] = <> +argv[3] = <> +FOO +0 0 0 +0 +0 +1 diff --git a/bash-5.1/tests/read.tests b/bash-5.1/tests/read.tests new file mode 100644 index 0000000000000000000000000000000000000000..43fcf8d9c2892d4ec50b9b35c958323028e00517 --- /dev/null +++ b/bash-5.1/tests/read.tests @@ -0,0 +1,108 @@ +# 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 . +# +echo " a " | (read x; echo "$x.") + +echo " a b " | ( read x y ; echo -"$x"-"$y"- ) +echo " a b\ " | ( read x y ; echo -"$x"-"$y"- ) +echo " a b " | ( read x ; echo -"$x"- ) +echo " a b\ " | ( read x ; echo -"$x"- ) + +echo " a b\ " | ( read -r x y ; echo -"$x"-"$y"- ) +echo " a b\ " | ( read -r x ; echo -"$x"- ) + +echo "\ a b\ " | ( read -r x y ; echo -"$x"-"$y"- ) +echo "\ a b\ " | ( read -r x ; echo -"$x"- ) +echo " \ a b\ " | ( read -r x y ; echo -"$x"-"$y"- ) +echo " \ a b\ " | ( read -r x ; echo -"$x"- ) + +# make sure that CTLESC and CTLNUL are passed through correctly +echo $'\001' | ( read var ; recho "$var" ) +echo $'\001' | ( read ; recho "$REPLY" ) + +echo $'\177' | ( read var ; recho "$var" ) +echo $'\177' | ( read ; recho "$REPLY" ) + +# make sure a backslash-quoted \\n still disappears from the input when +# we're not reading in `raw' mode, and no stray CTLESC chars are left in +# the input stream +echo $'ab\\\ncd' | ( read ; recho "$REPLY" ) + +echo "A B " > $TMPDIR/IN +unset x y z +read x y z < $TMPDIR/IN +echo 1: "x[$x] y[$y] z[$z]" +echo 1a: ${z-z not set} +read x < $TMPDIR/IN +echo 2: "x[$x]" +rm $TMPDIR/IN + +# this is where the bash `read' behavior with respect to $REPLY differs +# from ksh93 +echo "A B " > $TMPDIR/IN + +read < $TMPDIR/IN +echo "[$REPLY]" + +rm $TMPDIR/IN + +echo " A B " > $TMPDIR/IN + +read < $TMPDIR/IN +echo "[$REPLY]" + +rm $TMPDIR/IN + +# make sure that read with more variables than words sets the extra +# variables to the empty string + +bvar=bvar +cvar=cvar +echo aa > $TMPDIR/IN +read avar bvar cvar < $TMPDIR/IN +echo =="$avar"== +echo =="$bvar"== +echo =="$cvar"== + +rm $TMPDIR/IN + +# test behavior of read with various settings of IFS + +echo " foo" | { IFS= read line; recho "$line"; } + +echo " foo" | { IFS= ; read line; recho "$line"; } + +echo " foo" | { unset IFS ; read line; recho "$line"; } + +echo " foo" | { IFS=$'\n' ; read line; recho "$line"; } + +echo " foo" | { IFS=$' \n' ; read line; recho "$line"; } + +echo " foo" | { IFS=$' \t\n' ; read line; recho "$line"; } + +echo " foo" | { IFS=$':' ; read line; recho "$line"; } + +# test read -d delim behavior +${THIS_SH} ./read1.sub + +# test read -n nchars behavior +${THIS_SH} ./read3.sub + +# test read -u fd behavior +${THIS_SH} ./read4.sub + +# test behavior when IFS is not the default -- bug through bash-2.05b +${THIS_SH} ./read5.sub + +# test behavior of read -t 0 +${THIS_SH} ./read6.sub diff --git a/bash-5.1/tests/read1.sub b/bash-5.1/tests/read1.sub new file mode 100644 index 0000000000000000000000000000000000000000..b3b85157d341eb84219e183f3d2674dea62f7a90 --- /dev/null +++ b/bash-5.1/tests/read1.sub @@ -0,0 +1,36 @@ +# 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 . +# +a=7 +echo 'abcdefg|xyz' | { + read -d '|' a + echo a = "${a-unset}" +} + +echo xyz 123 | { + read -d ' ' a + echo a = "${a-unset}" +} + +echo xyz 123 | { + read -d $'\n' a + echo a = -"${a-unset}"- +} + +a=44 +echo abcd | { + read -d d a + echo a = $a +} + +exit 0 diff --git a/bash-5.1/tests/read2.sub b/bash-5.1/tests/read2.sub new file mode 100644 index 0000000000000000000000000000000000000000..41698e4686ba06791180616d2027d023cce3f71b --- /dev/null +++ b/bash-5.1/tests/read2.sub @@ -0,0 +1,45 @@ +# 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 . +# +a=4 + +read -t 2 a < /dev/tty +estat=$? +if [ $estat -gt 128 ]; then + echo timeout 1: ok +else + echo $estat +fi + +echo $a + +sleep 5 | read -t 1 a +estat=$? +if [ $estat -gt 128 ]; then + echo timeout 2: ok +else + echo $estat +fi + +echo $a + +read -t -3 a < /dev/tty +echo $? + +echo $a + +# the above should all time out +echo abcde | { + read -t 2 a + echo $a +} diff --git a/bash-5.1/tests/read3.sub b/bash-5.1/tests/read3.sub new file mode 100644 index 0000000000000000000000000000000000000000..d413f7dba33cce3eb36b5190d609af2fa01968fe --- /dev/null +++ b/bash-5.1/tests/read3.sub @@ -0,0 +1,37 @@ +# 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 . +# +# non-interactive + +# error +read -n -1 + +# from pipe -- should work, but doesn't change tty attributes +echo abcdefg | { + read -n 3 xyz + echo $xyz +} + +# fewer chars than specified +echo ab | { + read -n 3 xyz + echo $xyz +} + +echo abc | { + read -N 4 -d$'\n' foo + echo $foo +} + +read -n 1 < $0 +echo "$REPLY" diff --git a/bash-5.1/tests/read4.sub b/bash-5.1/tests/read4.sub new file mode 100644 index 0000000000000000000000000000000000000000..80bc9fca4805c2ad3808a3acf21107ff4d9f772b --- /dev/null +++ b/bash-5.1/tests/read4.sub @@ -0,0 +1,4 @@ +while read -u 3 var +do + echo "$var" +done 3<$0 diff --git a/bash-5.1/tests/read5.sub b/bash-5.1/tests/read5.sub new file mode 100644 index 0000000000000000000000000000000000000000..e42a5be2b8988c06a5b891b39b022904da2997d6 --- /dev/null +++ b/bash-5.1/tests/read5.sub @@ -0,0 +1,48 @@ +# 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 . +# +IFS=: read x y z << EOF +::: +EOF +recho $x +recho "$x" +recho $y +recho "$y" +recho $z +recho "$z" + +if [ -z "$x" ]; then + echo FOO +else + echo BAR +fi + +IFS=: read -a A << EOF +::: +EOF + +recho ${A[0]} +recho "${A[0]}" + +recho ${#A[@]} + +recho "${A[@]}" + +if [ -z "${A[0]}" ]; then + echo FOO +else + echo BAR +fi + +echo -n ${A[0]} | cat -vet +echo -n ${A[0]} | wc | ( IFS=$' \t\n' ; while read line; do echo $line; done; ) diff --git a/bash-5.1/tests/read6.sub b/bash-5.1/tests/read6.sub new file mode 100644 index 0000000000000000000000000000000000000000..abfe89db23bda1f0402afccd0dd71acf17d78596 --- /dev/null +++ b/bash-5.1/tests/read6.sub @@ -0,0 +1,10 @@ +# test read with a timeout of 0 -- input polling +# sleep with fractional seconds argument is not universal +echo abcde | { sleep 0.25 2>/dev/null ; read -t 0; } +echo $? + +read -t 0 < $0 +echo $? + +read -t 0 +echo $? diff --git a/bash-5.1/tests/redir.right b/bash-5.1/tests/redir.right new file mode 100644 index 0000000000000000000000000000000000000000..8db1041422b8eec8acf48010bcc27009cc19c965 --- /dev/null +++ b/bash-5.1/tests/redir.right @@ -0,0 +1,163 @@ +abc +./redir.tests: line 28: /tmp/redir-test: cannot overwrite existing file +abc +def +def +./redir.tests: line 44: $z: ambiguous redirect +Point 1 +Point 2 +to a +to b +Point 3 +to a +to a +to b +to b +Point 4 +to c +Point 5 +this is redir1.sub +this is redir2.sub +read line1 "ab" +read line2 "root" +read line3 "cd" +read line4 "daemon" +from stdin: aa +to stdout +./redir4.sub: line 45: $fd: ambiguous redirect +./redir4.sub: line 46: $fd: ambiguous redirect +err-and-out: +to stdout +to stderr +err-and-out: +to stdout +to stderr +0 -- 3 0 +0 -- 4 0 +ab +cd +ef +gh +ij +kl +0 +ab +cd +cd +./redir.tests: line 170: redir1.*: No such file or directory +# 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 . +# +# tests of ksh93-like dup-and-close redirection operators +exec 9<$0 + +f() +{ +exec 5<$0 + +exec 0<&5- + +while read line; do +echo "$line" +done +} + +f + +typeset -f f + +# make sure it was closed +read -u 5 foo 2>&1 | grep -q 'invalid file descriptor' +echo after read + +exec 5<&0 + +exec <&- + +read abcde 2>&1 | grep -q 'read error' + +exec 0<&9- +read line +echo $line +f () +{ + exec 5< $0; + exec 0<&5-; + while read line; do + echo "$line"; + done +} +after read +# This program is free software: you can redistribute it and/or modify +/ +/ +/ +0 +0 +0 +before block +after block +c1 is 1 +c2 is 2 +c3 is 3 +c4 is 4 +fd 10 +fd 8 +fd 10 +fd 8 +1 +2 +3 +4 +1 +2 +3 +4 +cat /tmp/foo +whatsis +hey +to stdout +to stderr + +to stdout +to stderr + +to stderr +to stdout + +to stderr +hey +to stdout +logfunc is a function +logfunc () +{ + echo "$@" &>> $TMPDIR/log +} +foo +bix is a function +bix () +{ + echo foo 2>&1 | cat +} +foo +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +1 +7 +after: 42 +./redir11.sub: line 53: $(ss= declare -i ss): ambiguous redirect +after: 42 +a+=3 +foo +foo +./redir11.sub: line 75: 42: No such file or directory +42 diff --git a/bash-5.1/tests/redir.tests b/bash-5.1/tests/redir.tests new file mode 100644 index 0000000000000000000000000000000000000000..63bd4d374cca0db010b8bfdc68520271dcd7d332 --- /dev/null +++ b/bash-5.1/tests/redir.tests @@ -0,0 +1,209 @@ +# 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 . +# +: ${TMPDIR:=/tmp} + +export LC_ALL=C +export LANG=C + +# catch-all for remaining untested redirection stuff +set +o posix + +echo abc > /tmp/redir-test +cat /tmp/redir-test + +set -o noclobber + +#this should be an error +echo def > /tmp/redir-test +cat /tmp/redir-test + +# but this should succeed +echo def > /tmp/redir-test-2 +cat /tmp/redir-test-2 + +# and so should this +echo def >| /tmp/redir-test +cat /tmp/redir-test + +set +o noclobber +rm /tmp/redir-test /tmp/redir-test-2 + +# this should be an error +z="a b" +cat < $z + +echo "Point 1" + +exec 3$TMPDIR/bash-a +exec 5>$TMPDIR/bash-b +echo "Point 2" + +echo to a 1>&4 +echo to b 1>&5 +cat $TMPDIR/bash-a +cat $TMPDIR/bash-b +exec 11&4 +echo to b 1>&5 +cat $TMPDIR/bash-a +cat $TMPDIR/bash-b + +exec 11<&- +echo "Point 4" + +exec 6<>$TMPDIR/bash-c +echo to c 1>&6 +cat $TMPDIR/bash-c +echo "Point 5" + +# clean up before running scripts +exec 4>&- 5>&- 6<&- + +rm -f $TMPDIR/bash-a $TMPDIR/bash-b $TMPDIR/bash-c + +# +# Test the effect of input buffering on the shell's input +# +${THIS_SH} < redir1.sub + +# more open, close, duplicate file descriptors +${THIS_SH} ./redir3.sub < ./redir3.in1 + +# still more redirections +${THIS_SH} ./redir4.sub < redir4.in1 + +# various forms of null redirection +testf() +{ + if [ -f "$1" ]; then + rm -f "$1" + else + echo oops -- $1 not found + fi +} + +> $TMPDIR/null-redir-a +testf $TMPDIR/null-redir-a + +$EXIT > $TMPDIR/null-redir-b +testf $TMPDIR/null-redir-b + +( > $TMPDIR/null-redir-c ) +testf $TMPDIR/null-redir-c + +$EXIT > $TMPDIR/null-redir-d & +wait +testf $TMPDIR/null-redir-d + +exit 3 | $EXIT > $TMPDIR/null-redir-e +echo $? -- ${PIPESTATUS[@]} +testf $TMPDIR/null-redir-e + +exit 4 | > $TMPDIR/null-redir-f +echo $? -- ${PIPESTATUS[@]} +testf $TMPDIR/null-redir-f + +> $TMPDIR/null-redir-g & +wait +testf $TMPDIR/null-redir-g + +exec >$TMPDIR/null-redir-h & +wait +testf $TMPDIR/null-redir-h + +# make sure async commands don't get /dev/null as stdin when an explicit +# input redirection is supplied +for x in 1 2 3; do + { read line ; echo $line ; } & + wait + { read line ; echo $line ; } & + wait +done << EOF +ab +cd +ef +gh +ij +kl +EOF + +# make sure async commands get /dev/null as stdin in the absence of any +# input redirection +/bin/cat & +wait +echo $? + +# make sure that loops work OK with here documents and are not run in +# subshells +while read line; do + echo $line + l2=$line +done << EOF +ab +cd +EOF +echo $l2 + +# These should not echo anything -- bug in versions before 2.04 +( ( echo hello 1>&3 ) 3>&1 ) >/dev/null 2>&1 + +( ( echo hello 1>&3 ) 3>&1 ) >/dev/null 2>&1 | cat + +# in posix mode, non-interactive shells are not allowed to perform +# filename expansion on input redirections, even if they expand to +# a single filename +set -o posix +cat < redir1.* + +# test ksh93 dup-and-close (move fd) redirections +${THIS_SH} ./redir5.sub + +# test behavior after a write error with a builtin command +${THIS_SH} ./redir6.sub + +# problem with redirections using fds bash uses internally +: ${TMPDIR:=$TMPDIR} + +trap 'rm -f $TMPDIR/bash-redir-$$' 0 1 2 3 6 15 + +echo before block +{ + echo before redir + exec 10>&1 + echo after redir +} > $TMPDIR/bash-redir-$$ + +echo after block + +${THIS_SH} ./redir7.sub + +${THIS_SH} ./redir8.sub + +exec 9>&2 +command exec 2>$TMPDIR/foo-$$ +echo whatsis >&2 +echo cat /tmp/foo +cat $TMPDIR/foo-$$ +rm -f $TMPDIR/foo-$$ +exec 2>&9 +exec 9>&- + +${THIS_SH} ./redir9.sub + +${THIS_SH} ./redir10.sub + +${THIS_SH} ./redir11.sub diff --git a/bash-5.1/tests/redir1.sub b/bash-5.1/tests/redir1.sub new file mode 100644 index 0000000000000000000000000000000000000000..f1082e9fa96d39c759ad737d85821b1a95f37537 --- /dev/null +++ b/bash-5.1/tests/redir1.sub @@ -0,0 +1,8 @@ +# +# Test the effect of input buffering on the shell's input +# +echo this is redir1.sub + +exec 0< redir2.sub + +echo BUG: after exec in redir1.sub diff --git a/bash-5.1/tests/redir10.sub b/bash-5.1/tests/redir10.sub new file mode 100644 index 0000000000000000000000000000000000000000..7b1d682f88cf426dc347a3f0b57c9de9447199ba --- /dev/null +++ b/bash-5.1/tests/redir10.sub @@ -0,0 +1,37 @@ +# 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 . +# +# +# Out of file descriptors, because it forgets to close redirection. Only +# happens in a shell function. Problem through bash-4.2. + +ulimit -n 128 + +bug() +{ +c=`ulimit -n` +let c+=100 +while let c-- +do + while read -ru3 x + do + echo -n : + done 3< <(echo x) + +done +} + +bug +echo + +exit 0 diff --git a/bash-5.1/tests/redir11.sub b/bash-5.1/tests/redir11.sub new file mode 100644 index 0000000000000000000000000000000000000000..d417cdb601d1b89cde8e60ca69f1b44ad12d4858 --- /dev/null +++ b/bash-5.1/tests/redir11.sub @@ -0,0 +1,76 @@ +# 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 . +# +# make sure redirections do not have access to the temporary environment, even +# in subshells and command substitutions + +a=1 +a=4 b=7 ss=4 echo $a + +# use grep to avoid differences due to different system error messages +a=42 +a=2 echo foo 2>&1 >&$a | { grep -q '\$a: Bad file' || echo 'redir11 bad 1'; } +a=2 echo foo 2>&1 >&$(echo $a) | { grep -q 'Bad file' || echo 'redir11 bad 2'; } + +foo() +{ + local -i a + local v=0 x=1 + a+=3 + echo $a +} + +a=4 b=7 ss=4 declare -i ss +a=4 b=7 foo +echo after: $a + +unset a +a=4 echo foo 2>&1 >&$(foo) | { grep -q 'Bad file' || echo 'redir11 bad 3'; } +a=1 echo foo 2>&1 >&$(foo) | { grep -q 'Bad file' || echo 'redir11 bad 4'; } +a=1 echo foo 2>&1 >&$(a=4 foo) | { grep -q 'Bad file' || echo 'redir11 bad 5'; } +echo foo 2>&1 >&$(a=4 foo) | { grep -q 'Bad file' || echo 'redir11 bad 6'; } + +a=42 +a=2 echo foo 2>&1 >&$a | { grep -q 'Bad file' || echo 'redir11 bad 7'; } +a=2 echo foo 2>&1 >&$(echo $a) | { grep -q 'Bad file' || echo 'redir11 bad 8'; } + +unset -f foo +foo() +{ + local -i a + local v=0 x=1 + a+=3 + echo $a >&$(ss= declare -i ss) +} + +a=4 b=7 foo +echo after: $a + +unset a +typeset -i a +a=4 eval echo $(echo a+=3) +a=2 +a=9 echo foo >&$(echo $a) +a=2 +a=9 eval echo foo >&$(echo $a) +a=2 +a=9 eval echo foo '2>&1 >&$(echo $a)' | { grep -q 'Bad file' || echo 'redir11 bad 9'; } + +# double expansion of filenames when used in redirection error messages +# present in bash versions back to at least bash-1.13 +# this is executed in the tests subdirectory of the source directory, so there +# definitely should not be a file named `42' + +unset foo +: <$((foo+=42)) +echo $foo diff --git a/bash-5.1/tests/redir2.sub b/bash-5.1/tests/redir2.sub new file mode 100644 index 0000000000000000000000000000000000000000..0820f701b310307c073cae8a2632fa2d7e4f584d --- /dev/null +++ b/bash-5.1/tests/redir2.sub @@ -0,0 +1 @@ +echo this is redir2.sub diff --git a/bash-5.1/tests/redir3.in1 b/bash-5.1/tests/redir3.in1 new file mode 100644 index 0000000000000000000000000000000000000000..dbd1fc364076846251508d59609324782dfd1350 --- /dev/null +++ b/bash-5.1/tests/redir3.in1 @@ -0,0 +1,2 @@ +ab +cd diff --git a/bash-5.1/tests/redir3.in2 b/bash-5.1/tests/redir3.in2 new file mode 100644 index 0000000000000000000000000000000000000000..5a1c32b01fd03fa0635bca2bb07ecb5242aa36cf --- /dev/null +++ b/bash-5.1/tests/redir3.in2 @@ -0,0 +1,2 @@ +root +daemon diff --git a/bash-5.1/tests/redir3.sub b/bash-5.1/tests/redir3.sub new file mode 100644 index 0000000000000000000000000000000000000000..b9fd0fd9a7744db2eee876502f8987d6928056c6 --- /dev/null +++ b/bash-5.1/tests/redir3.sub @@ -0,0 +1,39 @@ +# 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 . +# +read line1 + +echo read line1 \"$line1\" + +exec 4<./redir3.in2 + +exec 5<&0 +exec 0<&4 + +read line2 + +echo read line2 \"$line2\" + +exec 0<&5 + +read line3 + +echo read line3 \"$line3\" + +exec 0<&4 + +read line4 + +echo read line4 \"$line4\" + +exec 4<&- diff --git a/bash-5.1/tests/redir4.in1 b/bash-5.1/tests/redir4.in1 new file mode 100644 index 0000000000000000000000000000000000000000..e61ef7b965e17c62ca23b6ff5f0aaf09586e10e9 --- /dev/null +++ b/bash-5.1/tests/redir4.in1 @@ -0,0 +1 @@ +aa diff --git a/bash-5.1/tests/redir4.sub b/bash-5.1/tests/redir4.sub new file mode 100644 index 0000000000000000000000000000000000000000..a4829856097d0ab43886a36814bf6c2a80ea99b0 --- /dev/null +++ b/bash-5.1/tests/redir4.sub @@ -0,0 +1,69 @@ +# 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 . +# +minus=- + +# standard input +fd=0 + +exec 3<&$fd + +read line <&3 +echo from stdin: $line + +# close fd 3 +exec 3<&${minus} + +# should give `bad fd', but exact error messages vary +# read line <&3 + +# standard output +fd=1 + +exec 4>&$fd + +echo to stdout >&4 + +exec 4>&$minus + +# should give `bad fd', but exact error messages vary +# echo to stdout >&4 + +unset fd + +# these are ambiguous redirects +exec 3<&$fd +exec 4>&$fd + +exec 3>&1 4>&2 + +exec >&${TMPDIR}/err-and-out +echo to stdout +echo to stderr >&2 + +exec 1>&3 2>&4 +echo err-and-out: +cat ${TMPDIR}/err-and-out + +rm ${TMPDIR}/err-and-out + +fd=${TMPDIR}/err-and-out +exec >&$fd +echo to stdout +echo to stderr >&2 + +exec 1>&3 2>&4 +echo err-and-out: +cat ${TMPDIR}/err-and-out + +rm ${TMPDIR}/err-and-out diff --git a/bash-5.1/tests/redir5.sub b/bash-5.1/tests/redir5.sub new file mode 100644 index 0000000000000000000000000000000000000000..fa0f0c0780df498d7e32613725ae229f7bd38103 --- /dev/null +++ b/bash-5.1/tests/redir5.sub @@ -0,0 +1,44 @@ +# 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 . +# +# tests of ksh93-like dup-and-close redirection operators +exec 9<$0 + +f() +{ +exec 5<$0 + +exec 0<&5- + +while read line; do + echo "$line" +done +} + +f + +typeset -f f + +# make sure it was closed +read -u 5 foo 2>&1 | grep -q 'invalid file descriptor' +echo after read + +exec 5<&0 + +exec <&- + +read abcde 2>&1 | grep -q 'read error' + +exec 0<&9- +read line +echo $line diff --git a/bash-5.1/tests/redir6.sub b/bash-5.1/tests/redir6.sub new file mode 100644 index 0000000000000000000000000000000000000000..c735e5233c4a55e382682d1c0876dec5b7f67210 --- /dev/null +++ b/bash-5.1/tests/redir6.sub @@ -0,0 +1,10 @@ +cd / +pwd +help >&- +pwd +pwd +echo $? +echo $? +echo $? + +cd $OLDPWD diff --git a/bash-5.1/tests/redir7.sub b/bash-5.1/tests/redir7.sub new file mode 100644 index 0000000000000000000000000000000000000000..65ca473b15adf4e07df9de42c00433f7b7c92b73 --- /dev/null +++ b/bash-5.1/tests/redir7.sub @@ -0,0 +1,82 @@ +# 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 . +# +# weird redirections that caused trouble and were fixed in post-3.0 bash +stuff() +{ + c=1 + ( sleep 5 < /dev/null >/dev/null 2>&1 & ) & +} + +exec 3>&1 +eval ` +exec 4>&1 >&3 3>&- +{ + stuff 4>&- + echo "c=$c" >&4 +}` +echo c1 is $c + +unset -f stuff + +stuff() +{ + c=2 + ( sleep 5 < /dev/null >/dev/null 2>&1 & ) +} + +exec 3>&1 +eval ` +exec 4>&1 >&3 3>&- +{ + stuff 4>&- + echo "c=$c" >&4 +}` +echo c2 is $c + +unset -f stuff + +stuff() +{ + c=3 + { sleep 5 < /dev/null >/dev/null 2>&1 & } & +} + +exec 3>&1 +eval ` +exec 4>&1 >&3 3>&- +{ + stuff 4>&- + echo "c=$c" >&4 +}` +echo c3 is $c + +unset -f stuff + +stuff() +{ + c=4 + { sleep 5 < /dev/null >/dev/null 2>&1 & } +} + +exec 3>&1 +eval ` +exec 4>&1 >&3 3>&- +{ + stuff 4>&- + echo "c=$c" >&4 +}` +echo c4 is $c + +# fixed in bash-3.1 +echo 'exec <&3' | ${THIS_SH} 3<&0 diff --git a/bash-5.1/tests/redir8.sub b/bash-5.1/tests/redir8.sub new file mode 100644 index 0000000000000000000000000000000000000000..d2d700cbaabe733a0b606b9db5b7bb269fb3aa62 --- /dev/null +++ b/bash-5.1/tests/redir8.sub @@ -0,0 +1,74 @@ +# 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 . +# +cd ${TMPDIR:=/var/tmp} +rm -f u + +${THIS_SH} -c 'exec 10>&1; echo fd 10 >&10' 10>u +cat u +rm -f u + +${THIS_SH} -c 'exec 8>&1; echo fd 8 >&8' 8>u +cat u +rm -f u + +exec 10>u +exec 10>&1; echo 'fd 10' >&10 +cat u +rm -f u +exec 10>&- + +exec 8>u +exec 8>&1; echo 'fd 8' >&8 +cat u +rm -f u +exec 8>&- + +rm -f infile +cat > infile <. +# +: ${TMPDIR:=/tmp} + +func() +{ + echo "to stdout" + echo "to stderr" >&2 +} + +TMPFN=$TMPDIR/foo-$$ + +rm -f $TMPFN + +echo hey > $TMPFN +func &>> $TMPFN + +cat $TMPFN + +echo +func &> $TMPFN + +cat $TMPFN + +echo +func >$TMPFN +cat $TMPFN + +echo +echo hey > $TMPFN +func >> $TMPFN +cat $TMPFN + +rm -f $TMPFN + +logfunc() +{ + echo "$@" &>> $TMPDIR/log +} + +type logfunc + +echo foo 2>&1 + +bix() +{ +echo foo |& cat +} + +type bix + +bix diff --git a/bash-5.1/tests/rhs-exp.right b/bash-5.1/tests/rhs-exp.right new file mode 100644 index 0000000000000000000000000000000000000000..4ce6743ec62fcc2729885cfe9e35557ea8b38f6f --- /dev/null +++ b/bash-5.1/tests/rhs-exp.right @@ -0,0 +1,105 @@ +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=$selvecs> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS='&m68kcoff_vec'> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=&m68kcoff_vec> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS="&m68kcoff_vec"> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=\&m68kcoff_vec\> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=&m68kcoff_vec> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=$selvecs> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=$selvecs> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=$selvecs> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=\&m68kcoff_vec> +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=\'&m68kcoff_vec\'> +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[2] = <=> +argv[3] = <-DSELECT_VECS=\'> +a*b +ab +a?b +ab +a/b +ab +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = +argv[1] = <> +argv[1] = +argv[1] = <''> +argv[1] = <> +good 1 +good 2 +good 3 +good 4 +good 5 +ok 1 +ok 2 +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 diff --git a/bash-5.1/tests/rhs-exp.tests b/bash-5.1/tests/rhs-exp.tests new file mode 100644 index 0000000000000000000000000000000000000000..6abdd2a7b854dc0268899acb4849c81dd3e54b0d --- /dev/null +++ b/bash-5.1/tests/rhs-exp.tests @@ -0,0 +1,64 @@ +# 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 . +# +selvecs='&m68kcoff_vec' +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'$selvecs\'}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="$selvecs"}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\"$selvecs\"}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\\$selvecs\\}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=$selvecs}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\$selvecs}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\$selvecs"}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'"$null"}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\\$selvecs"}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\'$selvecs\'"}" + +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'$selvecs\'} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="$selvecs"} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\"$selvecs\"} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\\$selvecs\\} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=$selvecs} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\$selvecs} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\$selvecs"} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'"$null"} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\\$selvecs"} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\'$selvecs\'"} + +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\p"}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\p}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\\"}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\\}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'}" +recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\'"}" + +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\p"} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\p} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\\"} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\\} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'} +recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\'"} + +# more tests for bash-3.0 behavior + +var="a*b" ; echo "${var//\\*/}" +var="a*b" ; echo "${var//\*/}" + +var="a?b" ; echo "${var//\\?/}" +var="a?b" ; echo "${var//\?/}" + +var="a/b" ; echo "${var//\\//}" +var="a/b" ; echo "${var//\//}" + +${THIS_SH} ./rhs-exp1.sub diff --git a/bash-5.1/tests/rhs-exp1.sub b/bash-5.1/tests/rhs-exp1.sub new file mode 100644 index 0000000000000000000000000000000000000000..b194bf00e13fa5f76330668a8560cef805e7c52a --- /dev/null +++ b/bash-5.1/tests/rhs-exp1.sub @@ -0,0 +1,116 @@ +# 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 . +# +# fixes for bugs in bash-4.2 regarding empty strings in expand_string_for_rhs + +f=abc +recho ${f##""a} +recho ${f##"$v"a} + +recho ${f%%""c} +recho ${f%%"$v"c} + +recho ${f//""a} +recho ${f//"$v"a} + +recho ${f/""a""b/} +recho ${f/""c/} +recho ${f/"$v"c/} + +unset foo empty +foo=aabbcc + +recho ${foo/bb/} +recho ${foo/bb/$empty} + +recho ${foo/} +recho ${empty/} + +recho ${foo/ } +recho ${empty/ } +unset foo empty + +S2=oenophile + +recho ${S2^"$v"[aeiou]} +recho ${S2^^"$v"[aeiou]} + +recho ${foo:-""} +recho ${foo:-""abc} + +recho "${foo:-''}" +recho "${foo:-}" + +if [[ $var == "" ]]; then + echo good 1 +fi + +if [[ "$var"X == ""X ]]; then + echo good 2 +fi + +if [ "$var"X == ""X"" ]; then + echo good 3 +fi + +if [ X"" == X ]; then + echo good 4 +fi + +if [[ X"" == X ]]; then + echo good 5 +fi + +case x"" in + x) echo 'ok 1' + ;; + x??) echo 'this would be really odd' + ;; + x?) echo 'does this prove anything?' + echo x""x + ;; + *) echo 'no match' + ;; +esac + +if [[ x"" == x ]]; then + echo ok 2 +fi + +if [[ x"" == x"" ]]; then + echo ok 3 +else + echo bad 3 +fi + +case x"" in +x"") echo ok 4 ;; +*) echo bad 4;; +esac + +if [[ x"" == x"" ]]; then + echo ok 5 +else + echo bad 5 +fi + +case x"" in +"x") echo ok 6 ;; +*) echo bad 6;; +esac + +case x"" in +"x") echo CTLNUL 7 ;; +x) echo ok 7 ;; +*) echo bad 7 ;; +esac diff --git a/bash-5.1/tests/rsh.right b/bash-5.1/tests/rsh.right new file mode 100644 index 0000000000000000000000000000000000000000..a91974a593be1c41a1c0e6825f807229cf0fbb41 --- /dev/null +++ b/bash-5.1/tests/rsh.right @@ -0,0 +1,19 @@ +./rsh1.sub: line 22: /bin/sh: restricted +./rsh1.sub: line 24: sh: not found +./rsh1.sub: line 25: a: command not found +./rsh2.sub: line 23: hash: /bin/sh: restricted +./rsh2.sub: line 25: hash: sh: not found +./rsh2.sub: line 26: a: command not found +./rsh.tests: line 25: cd: restricted +./rsh.tests: line 26: PATH: readonly variable +./rsh.tests: line 27: SHELL: readonly variable +./rsh.tests: line 28: /bin/sh: restricted: cannot specify `/' in command names +./rsh.tests: line 30: .: ./source.sub3: restricted +./rsh.tests: line 33: /tmp/restricted: restricted: cannot redirect output +./rsh.tests: line 37: /tmp/restricted: restricted: cannot redirect output +./rsh.tests: line 42: command: -p: restricted +./rsh.tests: line 44: set: +r: invalid option +set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] +./rsh.tests: line 45: set: restricted: invalid option name +./rsh.tests: line 47: exec: restricted +./rsh.tests: after exec diff --git a/bash-5.1/tests/rsh.tests b/bash-5.1/tests/rsh.tests new file mode 100644 index 0000000000000000000000000000000000000000..0d06fa1e5c5fa472a101ee8afae5363dc999da04 --- /dev/null +++ b/bash-5.1/tests/rsh.tests @@ -0,0 +1,49 @@ +# 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 . +# +# test restricted shell mode -- these should all be errors +# +# things not tested for: +# adding builtins dynamically with enable -f +# importing function definitions from environment + +${THIS_SH} ./rsh1.sub +${THIS_SH} ./rsh2.sub + +set -r + +cd / +PATH=$PATH:/usr/local/bin +SHELL=/bin/sh +/bin/sh -c 'echo /bin/sh executed' + +. ./source.sub3 + +rm -f /tmp/restricted +echo abc > /tmp/restricted +if [ -f /tmp/restricted ]; then + echo oops 1 -- output +fi +echo abc >> /tmp/restricted +if [ -f /tmp/restricted ]; then + echo oops 2 -- append +fi + +command -p date + +set +r +set +o restricted + +exec /bin/date + +echo $0: after exec diff --git a/bash-5.1/tests/rsh1.sub b/bash-5.1/tests/rsh1.sub new file mode 100644 index 0000000000000000000000000000000000000000..1539d7406da979f99d94ff15965b6b3059516f02 --- /dev/null +++ b/bash-5.1/tests/rsh1.sub @@ -0,0 +1,29 @@ +# 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 . +# +cd ${TMPDIR:-/tmp} +cp /bin/sh . + +PATH=/rbin:/usr/local/rbin +hash -p /bin/rm rm + +set -r + +BASH_CMDS[x]=/bin/sh + +BASH_CMDS[a]="sh" +a -c 'echo hello' + +rm -f sh a + +exit 0 diff --git a/bash-5.1/tests/rsh2.sub b/bash-5.1/tests/rsh2.sub new file mode 100644 index 0000000000000000000000000000000000000000..7259dfbcea9cde46db68da01f5921b31a0592788 --- /dev/null +++ b/bash-5.1/tests/rsh2.sub @@ -0,0 +1,30 @@ +# 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 . +# +cd ${TMPDIR:-/tmp} +cp /bin/sh . +ln sh a + +PATH=/rbin:/usr/local/rbin +hash -p /bin/rm rm + +set -r + +hash -p /bin/sh sh + +hash -p sh a +a -c 'echo hello' + +rm -f sh a + +exit 0 diff --git a/bash-5.1/tests/run-alias b/bash-5.1/tests/run-alias new file mode 100644 index 0000000000000000000000000000000000000000..3b4f4dcf4f74dce30a570b777c444837e0e029f3 --- /dev/null +++ b/bash-5.1/tests/run-alias @@ -0,0 +1,2 @@ +${THIS_SH} ./alias.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} alias.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-all b/bash-5.1/tests/run-all new file mode 100644 index 0000000000000000000000000000000000000000..b8219b2d07ae753291467b8c9f7461fc4167dcb8 --- /dev/null +++ b/bash-5.1/tests/run-all @@ -0,0 +1,64 @@ +#! /bin/sh +# +# 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 . +# + +: ${TMPDIR:=/tmp} +export TMPDIR + +# basic /bin/sh syntax +SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BASHPID ))'` + +BASH_TSTOUT=${TMPDIR}/bashtst-$SUFFIX # for now +export BASH_TSTOUT + +trap 'rm -f $BASH_TSTOUT' 0 1 2 3 15 + +PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests' +export PATH + + +# unset BASH_ENV only if it is set +[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV +# can't reliably do it for SHELLOPTS; SHELLOPTS is readonly in bash +if [ "${BASH_VERSION+set}" = "set" ]; then + export -n SHELLOPTS # just make sure its not exported + set +o posix + typeset -p SHELLOPTS +else + [ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS 2>/dev/null +fi + +: ${THIS_SH:=../bash} +export THIS_SH + +: ${BUILD_DIR:=..} +export BUILD_DIR + +${THIS_SH} ./version + +rm -f ${BASH_TSTOUT} + +echo Any output from any test, unless otherwise noted, indicates a possible anomaly + +for x in run-* +do + case $x in + $0|run-minimal|run-gprof) ;; + *.orig|*~) ;; + *) echo $x ; sh $x ; rm -f ${BASH_TSTOUT} ;; + esac +done + +exit 0 diff --git a/bash-5.1/tests/run-appendop b/bash-5.1/tests/run-appendop new file mode 100644 index 0000000000000000000000000000000000000000..2d756f8b2e1212ad06f940fa0d34e9bce28fa139 --- /dev/null +++ b/bash-5.1/tests/run-appendop @@ -0,0 +1,2 @@ +${THIS_SH} ./appendop.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} appendop.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-arith b/bash-5.1/tests/run-arith new file mode 100644 index 0000000000000000000000000000000000000000..0786b4fad1c284d2bed2e5f187187e3d6dbf26ac --- /dev/null +++ b/bash-5.1/tests/run-arith @@ -0,0 +1,2 @@ +${THIS_SH} ./arith.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} arith.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-arith-for b/bash-5.1/tests/run-arith-for new file mode 100644 index 0000000000000000000000000000000000000000..085715e2c21c4a421ffeec217eb6e21ce8986ce8 --- /dev/null +++ b/bash-5.1/tests/run-arith-for @@ -0,0 +1,2 @@ +${THIS_SH} ./arith-for.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} arith-for.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-array b/bash-5.1/tests/run-array new file mode 100644 index 0000000000000000000000000000000000000000..6c5ec2771de4503747c110d05ad2769de71d0cac --- /dev/null +++ b/bash-5.1/tests/run-array @@ -0,0 +1,6 @@ +echo "warning: all of these tests will fail if arrays have not" >&2 +echo "warning: been compiled into the shell" >&2 +echo "warning: the BASH_ARGC and BASH_ARGV tests will fail if debugging support" >&2 +echo "warning: has not been compiled into the shell" >&2 +${THIS_SH} ./array.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} array.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-array2 b/bash-5.1/tests/run-array2 new file mode 100644 index 0000000000000000000000000000000000000000..54852ec9b436c764ca2afea31fe156d7cf32c899 --- /dev/null +++ b/bash-5.1/tests/run-array2 @@ -0,0 +1,4 @@ +echo "warning: all of these tests will fail if arrays have not" >&2 +echo "warning: been compiled into the shell" >&2 +${THIS_SH} ./array-at-star > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} array2.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-assoc b/bash-5.1/tests/run-assoc new file mode 100644 index 0000000000000000000000000000000000000000..7fef2344c1d07292fd6eb02bcd38194f93acad90 --- /dev/null +++ b/bash-5.1/tests/run-assoc @@ -0,0 +1,4 @@ +echo "warning: all of these tests will fail if arrays have not" >&2 +echo "warning: been compiled into the shell" >&2 +${THIS_SH} ./assoc.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} assoc.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-attr b/bash-5.1/tests/run-attr new file mode 100644 index 0000000000000000000000000000000000000000..948b9e1a96a0769c17c1059d16ce788518796661 --- /dev/null +++ b/bash-5.1/tests/run-attr @@ -0,0 +1,2 @@ +${THIS_SH} ./attr.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} attr.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-braces b/bash-5.1/tests/run-braces new file mode 100644 index 0000000000000000000000000000000000000000..554e21839466f60dabb150b096a708e63b054bb5 --- /dev/null +++ b/bash-5.1/tests/run-braces @@ -0,0 +1,2 @@ +${THIS_SH} ./braces.tests > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} braces.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-builtins b/bash-5.1/tests/run-builtins new file mode 100644 index 0000000000000000000000000000000000000000..69644f27e5a94634aba8d7f3cc21960137fbbd5a --- /dev/null +++ b/bash-5.1/tests/run-builtins @@ -0,0 +1,6 @@ +echo "warning: some of these tests may fail if process substitution has not" >&2 +echo "warning: been compiled into the shell or if the OS does not provide" >&2 +echo "warning: /dev/fd." >&2 + +${THIS_SH} ./builtins.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} builtins.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-case b/bash-5.1/tests/run-case new file mode 100644 index 0000000000000000000000000000000000000000..1560ee2f7fa8d1804f23b2df5c41e1b25f790714 --- /dev/null +++ b/bash-5.1/tests/run-case @@ -0,0 +1,2 @@ +${THIS_SH} ./case.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} case.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-casemod b/bash-5.1/tests/run-casemod new file mode 100644 index 0000000000000000000000000000000000000000..9b58764c6d86447b94b035d663c8539f677289bd --- /dev/null +++ b/bash-5.1/tests/run-casemod @@ -0,0 +1,2 @@ +${THIS_SH} ./casemod.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} casemod.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-complete b/bash-5.1/tests/run-complete new file mode 100644 index 0000000000000000000000000000000000000000..f1cef84e172d524c0f249190ad893547320a402a --- /dev/null +++ b/bash-5.1/tests/run-complete @@ -0,0 +1,2 @@ +${THIS_SH} ./complete.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} complete.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-comsub b/bash-5.1/tests/run-comsub new file mode 100644 index 0000000000000000000000000000000000000000..4c3d1cfbd332c13817d1bfb522b30bd1c5c93c1c --- /dev/null +++ b/bash-5.1/tests/run-comsub @@ -0,0 +1,2 @@ +${THIS_SH} ./comsub.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} comsub.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-comsub-eof b/bash-5.1/tests/run-comsub-eof new file mode 100644 index 0000000000000000000000000000000000000000..0733b2deb5b8971a8a7c596a2be0b4172f054460 --- /dev/null +++ b/bash-5.1/tests/run-comsub-eof @@ -0,0 +1,2 @@ +${THIS_SH} ./comsub-eof.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} comsub-eof.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-comsub-posix b/bash-5.1/tests/run-comsub-posix new file mode 100644 index 0000000000000000000000000000000000000000..520cb44286bff619d6b210029232b902e968bc23 --- /dev/null +++ b/bash-5.1/tests/run-comsub-posix @@ -0,0 +1,2 @@ +${THIS_SH} ./comsub-posix.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} comsub-posix.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-cond b/bash-5.1/tests/run-cond new file mode 100644 index 0000000000000000000000000000000000000000..603e73972d91a32990918c27e49672f642af803f --- /dev/null +++ b/bash-5.1/tests/run-cond @@ -0,0 +1,7 @@ +echo "warning: all of these tests will fail if the conditional command has not" >&2 +echo "warning: been compiled into the shell" >&2 +echo "warning: some of these tests will fail if extended pattern matching has not" >&2 +echo "warning: been compiled into the shell" >&2 + +${THIS_SH} ./cond.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} cond.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-coproc b/bash-5.1/tests/run-coproc new file mode 100644 index 0000000000000000000000000000000000000000..02c5c922fe9d1e1db20167a90ccd28a79d612070 --- /dev/null +++ b/bash-5.1/tests/run-coproc @@ -0,0 +1,2 @@ +${THIS_SH} ./coproc.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} coproc.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-cprint b/bash-5.1/tests/run-cprint new file mode 100644 index 0000000000000000000000000000000000000000..82d2c2a27d8495556c885c955b5b06778439ca38 --- /dev/null +++ b/bash-5.1/tests/run-cprint @@ -0,0 +1,2 @@ +${THIS_SH} ./cprint.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} cprint.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-dbg-support b/bash-5.1/tests/run-dbg-support new file mode 100644 index 0000000000000000000000000000000000000000..af64517daeb5851c3829f1657a53582c323c025b --- /dev/null +++ b/bash-5.1/tests/run-dbg-support @@ -0,0 +1,9 @@ + +TEST_NAME='dbg-support' +TEST_FILE="/tmp/${TEST_NAME}.check" +${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null +set -f +diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE + +# Return code tells testing mechanism whether passed or not. +exit $? diff --git a/bash-5.1/tests/run-dbg-support2 b/bash-5.1/tests/run-dbg-support2 new file mode 100644 index 0000000000000000000000000000000000000000..375c32f9ebd3af72e10d9c35eec2e2c40be82f33 --- /dev/null +++ b/bash-5.1/tests/run-dbg-support2 @@ -0,0 +1,9 @@ + +TEST_NAME='dbg-support2' +TEST_FILE="/tmp/${TEST_NAME}.check" +${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null +set -f +diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE + +# Return code tells testing mechanism whether passed or not. +exit $? diff --git a/bash-5.1/tests/run-dirstack b/bash-5.1/tests/run-dirstack new file mode 100644 index 0000000000000000000000000000000000000000..e6b42d431f0b0d0d3f26fe268178a129efcbe0a0 --- /dev/null +++ b/bash-5.1/tests/run-dirstack @@ -0,0 +1,5 @@ +${THIS_SH} ./dstack.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} dstack.right && rm -f ${BASH_TSTOUT} + +${THIS_SH} ./dstack2.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} dstack2.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-dollars b/bash-5.1/tests/run-dollars new file mode 100644 index 0000000000000000000000000000000000000000..dc5d623876cbd93ea6f4e2d4a3a098120b7e5158 --- /dev/null +++ b/bash-5.1/tests/run-dollars @@ -0,0 +1,2 @@ +${THIS_SH} ./dollar-at-star > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} dollar.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-dynvar b/bash-5.1/tests/run-dynvar new file mode 100644 index 0000000000000000000000000000000000000000..26c5434b1df71030fc672f8671795fa7943e1e32 --- /dev/null +++ b/bash-5.1/tests/run-dynvar @@ -0,0 +1,2 @@ +${THIS_SH} ./dynvar.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} dynvar.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-errors b/bash-5.1/tests/run-errors new file mode 100644 index 0000000000000000000000000000000000000000..29417cda133150fcd3ff8ba012d7238e5df9f721 --- /dev/null +++ b/bash-5.1/tests/run-errors @@ -0,0 +1,3 @@ +unset OLDPWD # make sure shell doesn't inherit OLDPWD +${THIS_SH} ./errors.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} errors.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-execscript b/bash-5.1/tests/run-execscript new file mode 100644 index 0000000000000000000000000000000000000000..de786442bd8d472a8ae4ffe6ff41d19efcbd45db --- /dev/null +++ b/bash-5.1/tests/run-execscript @@ -0,0 +1,9 @@ +echo "warning: the text of a system error message may vary between systems and" >&2 +echo "warning: produce diff output." >&2 +echo "warning: if the text of the error messages concerning \`notthere' or" >&2 +echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory" >&2 +echo "warning: produce diff output, please do not consider this a test failure" >&2 +echo "warning: if diff output differing only in the location of the bash" >&2 +echo "warning: binary appears, please do not consider this a test failure" >&2 +${THIS_SH} ./execscript > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} exec.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-exp-tests b/bash-5.1/tests/run-exp-tests new file mode 100644 index 0000000000000000000000000000000000000000..78cf754d8d2ca48a7ee267c0672338269696c802 --- /dev/null +++ b/bash-5.1/tests/run-exp-tests @@ -0,0 +1,2 @@ +${THIS_SH} ./exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} exp.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-exportfunc b/bash-5.1/tests/run-exportfunc new file mode 100644 index 0000000000000000000000000000000000000000..7b207fa9da647b0cc0b2e308a64227f5520be0fa --- /dev/null +++ b/bash-5.1/tests/run-exportfunc @@ -0,0 +1,2 @@ +${THIS_SH} ./exportfunc.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} exportfunc.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-extglob b/bash-5.1/tests/run-extglob new file mode 100644 index 0000000000000000000000000000000000000000..149e34af871206a4a7ea9677981f3b26838ccdd4 --- /dev/null +++ b/bash-5.1/tests/run-extglob @@ -0,0 +1,4 @@ +PATH=$PATH:`pwd` +export PATH +${THIS_SH} ./extglob.tests | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} extglob.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-extglob2 b/bash-5.1/tests/run-extglob2 new file mode 100644 index 0000000000000000000000000000000000000000..71d3d8092dd97176c0be335825a646a00a14db89 --- /dev/null +++ b/bash-5.1/tests/run-extglob2 @@ -0,0 +1,4 @@ +PATH=$PATH:`pwd` +export PATH +${THIS_SH} ./extglob2.tests | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} extglob2.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-extglob3 b/bash-5.1/tests/run-extglob3 new file mode 100644 index 0000000000000000000000000000000000000000..6ebd674791041e87702323e7bdfa737f7154563f --- /dev/null +++ b/bash-5.1/tests/run-extglob3 @@ -0,0 +1,4 @@ +PATH=$PATH:`pwd` +export PATH +${THIS_SH} ./extglob3.tests > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} extglob3.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-func b/bash-5.1/tests/run-func new file mode 100644 index 0000000000000000000000000000000000000000..a804364f0875b984827e7742c1cdc6d23551166d --- /dev/null +++ b/bash-5.1/tests/run-func @@ -0,0 +1,5 @@ +echo "warning: if you have exported functions defined in your environment," >&2 +echo "warning: they may show up as diff output." >&2 +echo "warning: if so, please do not consider this a test failure" >&2 +${THIS_SH} ./func.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} func.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-getopts b/bash-5.1/tests/run-getopts new file mode 100644 index 0000000000000000000000000000000000000000..4cfc592f1647f1310aa9eaaee78b66903f1d5f3a --- /dev/null +++ b/bash-5.1/tests/run-getopts @@ -0,0 +1,2 @@ +${THIS_SH} ./getopts.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} getopts.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-glob-test b/bash-5.1/tests/run-glob-test new file mode 100644 index 0000000000000000000000000000000000000000..246501ccf6b08c548662417cc55b5fd152ec16f6 --- /dev/null +++ b/bash-5.1/tests/run-glob-test @@ -0,0 +1,7 @@ +PATH=$PATH:`pwd` +export PATH + +( diff -a glob.right glob.right >/dev/null 2>&1 ) && AFLAG=-a + +${THIS_SH} ./glob.tests > ${BASH_TSTOUT} 2>&1 +diff ${AFLAG} ${BASH_TSTOUT} glob.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-globstar b/bash-5.1/tests/run-globstar new file mode 100644 index 0000000000000000000000000000000000000000..3aa01ed397ea938665965e731f1e7afc96337340 --- /dev/null +++ b/bash-5.1/tests/run-globstar @@ -0,0 +1,4 @@ +PATH=$PATH:`pwd` +export PATH +${THIS_SH} ./globstar.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} globstar.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-heredoc b/bash-5.1/tests/run-heredoc new file mode 100644 index 0000000000000000000000000000000000000000..b655c4f8e9d3a4ddfc1f57ea0cc5caa982e15585 --- /dev/null +++ b/bash-5.1/tests/run-heredoc @@ -0,0 +1,6 @@ +echo "warning: UNIX versions number signals and schedule processes differently." >&2 +echo "warning: If output differing only in line numbers is produced, please" >&2 +echo "warning: do not consider this a test failure." >&2 + +${THIS_SH} ./heredoc.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} heredoc.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-herestr b/bash-5.1/tests/run-herestr new file mode 100644 index 0000000000000000000000000000000000000000..d6def9c6e148a4635c42913ad669a2aa1bf80940 --- /dev/null +++ b/bash-5.1/tests/run-herestr @@ -0,0 +1,2 @@ +${THIS_SH} ./herestr.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} herestr.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-histexpand b/bash-5.1/tests/run-histexpand new file mode 100644 index 0000000000000000000000000000000000000000..a0fc3312a97ad0326a11d6b125991f8ac4b7f392 --- /dev/null +++ b/bash-5.1/tests/run-histexpand @@ -0,0 +1,4 @@ +echo "warning: all of these tests will fail if history has not been compiled" >&2 +echo "warning: into the shell" >&2 +${THIS_SH} ./histexp.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} histexp.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-history b/bash-5.1/tests/run-history new file mode 100644 index 0000000000000000000000000000000000000000..f4fa4663ea9d493bd2e80bb79bdc94d982b20b65 --- /dev/null +++ b/bash-5.1/tests/run-history @@ -0,0 +1,4 @@ +echo "warning: all of these tests will fail if history has not been compiled" >&2 +echo "warning: into the shell" >&2 +${THIS_SH} ./history.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} history.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-ifs b/bash-5.1/tests/run-ifs new file mode 100644 index 0000000000000000000000000000000000000000..394d9988dfaf3daa89b0fb2dcf6a71e8bbb14f24 --- /dev/null +++ b/bash-5.1/tests/run-ifs @@ -0,0 +1,2 @@ +${THIS_SH} ./ifs.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} ifs.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-ifs-posix b/bash-5.1/tests/run-ifs-posix new file mode 100644 index 0000000000000000000000000000000000000000..895c2e2e857c125cd789ad0812b15e94589c1871 --- /dev/null +++ b/bash-5.1/tests/run-ifs-posix @@ -0,0 +1,2 @@ +${THIS_SH} ./ifs-posix.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} ifs-posix.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-input-test b/bash-5.1/tests/run-input-test new file mode 100644 index 0000000000000000000000000000000000000000..412587c5f9a4de87420e2df00d985ed141691466 --- /dev/null +++ b/bash-5.1/tests/run-input-test @@ -0,0 +1,2 @@ +${THIS_SH} < ./input-line.sh > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} input.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-intl b/bash-5.1/tests/run-intl new file mode 100644 index 0000000000000000000000000000000000000000..c31d1d0a7a354dd710af5621560a4a0f9d087fd0 --- /dev/null +++ b/bash-5.1/tests/run-intl @@ -0,0 +1,8 @@ +# See whether or not we can use `diff -a' +( diff -a ./intl.right ./intl.right >/dev/null 2>&1 ) && AFLAG=-a + +echo "warning: some of these tests will fail if you do not have UTF-8" >&2 +echo "warning: locales installed on your system." >&2 + +${THIS_SH} ./intl.tests > ${BASH_TSTOUT} +diff $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-invert b/bash-5.1/tests/run-invert new file mode 100644 index 0000000000000000000000000000000000000000..b2bd06e508168621cb2ff6e898fbf74c24b35f74 --- /dev/null +++ b/bash-5.1/tests/run-invert @@ -0,0 +1,2 @@ +${THIS_SH} ./invert.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} invert.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-iquote b/bash-5.1/tests/run-iquote new file mode 100644 index 0000000000000000000000000000000000000000..4fca94a6880bc87ec64a3f67d847a9d08a763904 --- /dev/null +++ b/bash-5.1/tests/run-iquote @@ -0,0 +1,2 @@ +${THIS_SH} ./iquote.tests >${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} iquote.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-jobs b/bash-5.1/tests/run-jobs new file mode 100644 index 0000000000000000000000000000000000000000..8429b0db936c0ce1596479baf90240aca473d08b --- /dev/null +++ b/bash-5.1/tests/run-jobs @@ -0,0 +1,7 @@ +echo "warning: some of these tests may fail if job control has not been compiled" >&2 +echo "warning: into the shell" >&2 +echo "warning: there may be a message regarding a cat process dying due to a" >&2 +echo "warning: SIGHUP. Please disregard." >&2 + +${THIS_SH} ./jobs.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} jobs.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-lastpipe b/bash-5.1/tests/run-lastpipe new file mode 100644 index 0000000000000000000000000000000000000000..2edf5c43f5d77d4bc0087dd4d52028748270a7e7 --- /dev/null +++ b/bash-5.1/tests/run-lastpipe @@ -0,0 +1,2 @@ +${THIS_SH} ./lastpipe.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} lastpipe.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-mapfile b/bash-5.1/tests/run-mapfile new file mode 100644 index 0000000000000000000000000000000000000000..e5d1b38428097af00c01e34f24bd586e31d6f0b9 --- /dev/null +++ b/bash-5.1/tests/run-mapfile @@ -0,0 +1,2 @@ +${THIS_SH} ./mapfile.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} mapfile.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-minimal b/bash-5.1/tests/run-minimal new file mode 100644 index 0000000000000000000000000000000000000000..ade30b152fa11bb1828114d6e64a98760a4c07ce --- /dev/null +++ b/bash-5.1/tests/run-minimal @@ -0,0 +1,68 @@ +#! /bin/sh +# +# 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 . +# +# +# run-minimal - a version of run-all for shells configured with +# --enable-minimal-config +# + +: ${TMPDIR:=/tmp} +export TMPDIR + +# basic /bin/sh syntax +SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BASHPID ))'` + +BASH_TSTOUT=${TMPDIR}/bashtst-$SUFFIX # for now +export BASH_TSTOUT + +trap 'rm -f $BASH_TSTOUT' 0 + +PATH=.:$PATH # just to get the right version of printenv +export PATH + +# unset BASH_ENV only if it is set +[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV +# ditto for SHELLOPTS +#[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS + +: ${THIS_SH:=../bash} +export THIS_SH + +: ${BUILD_DIR:=..} +export BUILD_DIR + +${THIS_SH} ./version.mini + +rm -f "$BASH_TSTOUT" + +echo Testing ${THIS_SH} +echo Any output from any test, unless otherwise noted, indicates a possible anomaly +for x in run-* +do + case $x in + $0) ;; + *.orig|*~) ;; + run-dollars|run-execscript|run-func|run-getopts|run-heredoc) echo $x ; sh $x ;; + run-ifs-tests|run-input-test|run-invert|run-more-exp|run-nquote) echo $x ; sh $x ;; + run-ifs-posix|run-posix2|run-posixpat|run-posixpipe) echo $x ; sh $x ;; + run-precedence|run-quote|run-read|run-rhs-exp|run-strip|run-tilde) echo $x ; sh $x ;; + run-dynvar) echo $x ; sh $x ;; + ;; + *) ;; + esac + rm -f "$BASH_TSTOUT" +done + +exit 0 diff --git a/bash-5.1/tests/run-more-exp b/bash-5.1/tests/run-more-exp new file mode 100644 index 0000000000000000000000000000000000000000..0424a2fb86c965684f5dc02ae9be79a0a4d090ce --- /dev/null +++ b/bash-5.1/tests/run-more-exp @@ -0,0 +1,2 @@ +${THIS_SH} ./more-exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} more-exp.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-nameref b/bash-5.1/tests/run-nameref new file mode 100644 index 0000000000000000000000000000000000000000..b73e1b8cd8e6733732d864b41f8234b3b216a2f6 --- /dev/null +++ b/bash-5.1/tests/run-nameref @@ -0,0 +1,4 @@ +echo "warning: some of these tests will fail if arrays have not" >&2 +echo "warning: been compiled into the shell" >&2 +${THIS_SH} ./nameref.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} nameref.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-new-exp b/bash-5.1/tests/run-new-exp new file mode 100644 index 0000000000000000000000000000000000000000..8777c7bd8ea5471b5493318e15d2e31fe97dc806 --- /dev/null +++ b/bash-5.1/tests/run-new-exp @@ -0,0 +1,10 @@ +echo "warning: two of these tests will fail if your OS does not support" >&2 +echo "warning: named pipes or the /dev/fd filesystem. If the tests of the" >&2 +echo "warning: process substitution mechanism fail, please do not consider" >&2 +echo "warning: this a test failure" >&2 +echo "warning: if you have exported variables beginning with the string _Q," >&2 +echo "warning: diff output may be generated. If so, please do not consider" >&2 +echo "warning: this a test failure" >&2 + +${THIS_SH} ./new-exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} new-exp.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-nquote b/bash-5.1/tests/run-nquote new file mode 100644 index 0000000000000000000000000000000000000000..03954b8b4146d97601233439bc561aef0b038420 --- /dev/null +++ b/bash-5.1/tests/run-nquote @@ -0,0 +1,2 @@ +${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} nquote.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-nquote1 b/bash-5.1/tests/run-nquote1 new file mode 100644 index 0000000000000000000000000000000000000000..bd9e9398c0d2e489f95f0b94e3a3334b96d3aa0d --- /dev/null +++ b/bash-5.1/tests/run-nquote1 @@ -0,0 +1,4 @@ +echo "warning: several of these tests will fail if arrays have not" >&2 +echo "warning: been compiled into the shell." >&2 +${THIS_SH} ./nquote1.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} nquote1.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-nquote2 b/bash-5.1/tests/run-nquote2 new file mode 100644 index 0000000000000000000000000000000000000000..4648d3ee0a2f3de8edc48be4ded2c945763dc8b3 --- /dev/null +++ b/bash-5.1/tests/run-nquote2 @@ -0,0 +1,4 @@ +echo "warning: several of these tests will fail if arrays have not" >&2 +echo "warning: been compiled into the shell." >&2 +${THIS_SH} ./nquote2.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} nquote2.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-nquote3 b/bash-5.1/tests/run-nquote3 new file mode 100644 index 0000000000000000000000000000000000000000..4a3e32af412cd686a05b15a930441b6f7d412460 --- /dev/null +++ b/bash-5.1/tests/run-nquote3 @@ -0,0 +1,4 @@ +echo "warning: several of these tests will fail if arrays have not" >&2 +echo "warning: been compiled into the shell." >&2 +${THIS_SH} ./nquote3.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} nquote3.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-nquote4 b/bash-5.1/tests/run-nquote4 new file mode 100644 index 0000000000000000000000000000000000000000..985c31113385f9cdb54fc55891847f94da4dd173 --- /dev/null +++ b/bash-5.1/tests/run-nquote4 @@ -0,0 +1,8 @@ +# See whether or not we can use `diff -a' +( diff -a ./nquote4.right ./nquote4.right >/dev/null 2>&1 ) && AFLAG=-a + +echo warning: some of these tests will fail if you do not have UTF-8 >&2 +echo warning: locales installed on your system >&2 + +${THIS_SH} ./nquote4.tests > ${BASH_TSTOUT} 2>&1 +diff ${AFLAG} ${BASH_TSTOUT} nquote4.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-nquote5 b/bash-5.1/tests/run-nquote5 new file mode 100644 index 0000000000000000000000000000000000000000..1d4c4aa29e9bc7ddad592fb161085cb1e6442113 --- /dev/null +++ b/bash-5.1/tests/run-nquote5 @@ -0,0 +1,2 @@ +${THIS_SH} ./nquote5.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} nquote5.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-parser b/bash-5.1/tests/run-parser new file mode 100644 index 0000000000000000000000000000000000000000..ea1ec4907faf4ab241dd4bbbc4d7a2be970bd3a0 --- /dev/null +++ b/bash-5.1/tests/run-parser @@ -0,0 +1,2 @@ +${THIS_SH} ./parser.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} parser.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-posix2 b/bash-5.1/tests/run-posix2 new file mode 100644 index 0000000000000000000000000000000000000000..cfa95719ccef82ed35375e6d58e741b28fdb1987 --- /dev/null +++ b/bash-5.1/tests/run-posix2 @@ -0,0 +1,2 @@ +${THIS_SH} ./posix2.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} posix2.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-posixexp b/bash-5.1/tests/run-posixexp new file mode 100644 index 0000000000000000000000000000000000000000..827b0e4c51283ef9ac478b9ab9c445f6ccb68b75 --- /dev/null +++ b/bash-5.1/tests/run-posixexp @@ -0,0 +1,2 @@ +${THIS_SH} ./posixexp.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} posixexp.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-posixexp2 b/bash-5.1/tests/run-posixexp2 new file mode 100644 index 0000000000000000000000000000000000000000..1e6b2d906b8b340e8b9458390d330dfef740892d --- /dev/null +++ b/bash-5.1/tests/run-posixexp2 @@ -0,0 +1,2 @@ +${THIS_SH} ./posixexp2.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} posixexp2.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-posixpat b/bash-5.1/tests/run-posixpat new file mode 100644 index 0000000000000000000000000000000000000000..8937948c8203c56def9a4d4478fba48b12eda1dc --- /dev/null +++ b/bash-5.1/tests/run-posixpat @@ -0,0 +1,2 @@ +${THIS_SH} ./posixpat.tests > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} posixpat.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-posixpipe b/bash-5.1/tests/run-posixpipe new file mode 100644 index 0000000000000000000000000000000000000000..5f099e2ade55559eef9083c563844dd44dc8a522 --- /dev/null +++ b/bash-5.1/tests/run-posixpipe @@ -0,0 +1,2 @@ +${THIS_SH} ./posixpipe.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} posixpipe.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-precedence b/bash-5.1/tests/run-precedence new file mode 100644 index 0000000000000000000000000000000000000000..06ac343fd4c8fb11b5b65fae875a02ad3b8d1cdf --- /dev/null +++ b/bash-5.1/tests/run-precedence @@ -0,0 +1,2 @@ +${THIS_SH} ./precedence.tests > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} prec.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-printf b/bash-5.1/tests/run-printf new file mode 100644 index 0000000000000000000000000000000000000000..e242787ca1aea3ae1f991741a0dc42b083d5f7fa --- /dev/null +++ b/bash-5.1/tests/run-printf @@ -0,0 +1,7 @@ +# See whether or not we can use `diff -a' +#( diff -a ./printf.tests ./printf.tests >/dev/null 2>&1 ) && AFLAG=-a + +# use cat -v (and assume it's there) to make control chars visible +${THIS_SH} ./printf.tests 2>&1 | cat -v > ${BASH_TSTOUT} +#diff $AFLAG ${BASH_TSTOUT} printf.right && rm -f ${BASH_TSTOUT} +diff ${BASH_TSTOUT} printf.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-procsub b/bash-5.1/tests/run-procsub new file mode 100644 index 0000000000000000000000000000000000000000..796faaa8f5b2621141349cbb8de6a7bc78c8d79c --- /dev/null +++ b/bash-5.1/tests/run-procsub @@ -0,0 +1,7 @@ +echo "warning: all of these tests will fail if process substitution has not" >&2 +echo "warning: been compiled into the shell or if the OS does not provide" >&2 +echo "warning: FIFOs or /dev/fd. Some tests may fail if the OS does not" >&2 +echo "warning: provide FIFOs." >&2 + +${THIS_SH} ./procsub.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} procsub.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-quote b/bash-5.1/tests/run-quote new file mode 100644 index 0000000000000000000000000000000000000000..2543666f5540adb03fbd16d0bd05346932d6dc92 --- /dev/null +++ b/bash-5.1/tests/run-quote @@ -0,0 +1,2 @@ +${THIS_SH} ./quote.tests >${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} quote.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-read b/bash-5.1/tests/run-read new file mode 100644 index 0000000000000000000000000000000000000000..5ec07e27a17d4a8302eee260a8ca9b04187ddae6 --- /dev/null +++ b/bash-5.1/tests/run-read @@ -0,0 +1,4 @@ +echo "warning: please do not consider output differing only in the amount of" >&2 +echo "warning: white space to be an error." >&2 +${THIS_SH} ./read.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-redir b/bash-5.1/tests/run-redir new file mode 100644 index 0000000000000000000000000000000000000000..071af6eb820bc4452aa4e2b8d0f4d83491d6d931 --- /dev/null +++ b/bash-5.1/tests/run-redir @@ -0,0 +1,7 @@ +echo "warning: the text of a system error message may vary between systems and" >&2 +echo "warning: produce diff output." >&2 +echo "warning: if the text of an error message concerning \`redir1.*' not being" >&2 +echo "warning: found or messages concerning bad file descriptors produce diff" >&2 +echo "warning: output, please do not consider it a test failure" >&2 +${THIS_SH} ./redir.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} redir.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-rhs-exp b/bash-5.1/tests/run-rhs-exp new file mode 100644 index 0000000000000000000000000000000000000000..de8ae0eab9d82bcff5ee9110ff85e898c2c2bd8b --- /dev/null +++ b/bash-5.1/tests/run-rhs-exp @@ -0,0 +1,2 @@ +${THIS_SH} ./rhs-exp.tests 2>&1 > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} rhs-exp.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-rsh b/bash-5.1/tests/run-rsh new file mode 100644 index 0000000000000000000000000000000000000000..677069960e08ea0dcb29f951ddf840fa2a3fb42c --- /dev/null +++ b/bash-5.1/tests/run-rsh @@ -0,0 +1,2 @@ +${THIS_SH} ./rsh.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} rsh.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-set-e b/bash-5.1/tests/run-set-e new file mode 100644 index 0000000000000000000000000000000000000000..eed17fa5a1df69aa90537afbf2b306745f93e725 --- /dev/null +++ b/bash-5.1/tests/run-set-e @@ -0,0 +1,2 @@ +${THIS_SH} ./set-e.tests > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} set-e.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-set-x b/bash-5.1/tests/run-set-x new file mode 100644 index 0000000000000000000000000000000000000000..b999e6980776eb73e480dc10530669009f9b9e0e --- /dev/null +++ b/bash-5.1/tests/run-set-x @@ -0,0 +1,11 @@ +#!../bash +#$Id: run-set-x,v 1.1 2002/12/09 13:12:37 rockyb Exp $ + +TEST_NAME='set-x' +TEST_FILE="/tmp/${TEST_NAME}.check" +${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null +set -f +diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE + +# Return code tells testing mechanism whether passed or not. +exit $? diff --git a/bash-5.1/tests/run-shopt b/bash-5.1/tests/run-shopt new file mode 100644 index 0000000000000000000000000000000000000000..02c43e717eadb3f1c1db014ad2305964e31716e1 --- /dev/null +++ b/bash-5.1/tests/run-shopt @@ -0,0 +1,2 @@ +${THIS_SH} ./shopt.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} shopt.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-strip b/bash-5.1/tests/run-strip new file mode 100644 index 0000000000000000000000000000000000000000..46a9da9c041f9a3fb915b0c883ecb1e045725daa --- /dev/null +++ b/bash-5.1/tests/run-strip @@ -0,0 +1,2 @@ +${THIS_SH} ./strip.tests > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} strip.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-test b/bash-5.1/tests/run-test new file mode 100644 index 0000000000000000000000000000000000000000..d68791ca26d46f94ef4724cfd6d95d1b11eed5cb --- /dev/null +++ b/bash-5.1/tests/run-test @@ -0,0 +1,4 @@ +unset GROUPS UID 2>/dev/null + +${THIS_SH} ./test.tests >${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} test.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-tilde b/bash-5.1/tests/run-tilde new file mode 100644 index 0000000000000000000000000000000000000000..9460225ba0abbce9ebb368d117c3e4e94e759ec3 --- /dev/null +++ b/bash-5.1/tests/run-tilde @@ -0,0 +1,2 @@ +${THIS_SH} ./tilde.tests > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} tilde.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-tilde2 b/bash-5.1/tests/run-tilde2 new file mode 100644 index 0000000000000000000000000000000000000000..fa7e7d6cc8e32f65bfe3d2bb84e74f911491459b --- /dev/null +++ b/bash-5.1/tests/run-tilde2 @@ -0,0 +1,2 @@ +${THIS_SH} ./tilde2.tests > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} tilde2.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-trap b/bash-5.1/tests/run-trap new file mode 100644 index 0000000000000000000000000000000000000000..e3331ed0cdd057247680eaa28cc091b50cfdef66 --- /dev/null +++ b/bash-5.1/tests/run-trap @@ -0,0 +1,6 @@ +echo "warning: UNIX versions number signals and schedule processes differently." >&2 +echo "warning: If output differing only in line numbers is produced, please" >&2 +echo "warning: do not consider this a test failure." >&2 + +${THIS_SH} ./trap.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} trap.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-type b/bash-5.1/tests/run-type new file mode 100644 index 0000000000000000000000000000000000000000..499cb4ed7199214a12ac5a818540d294a77aaef6 --- /dev/null +++ b/bash-5.1/tests/run-type @@ -0,0 +1,2 @@ +${THIS_SH} ./type.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} type.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-varenv b/bash-5.1/tests/run-varenv new file mode 100644 index 0000000000000000000000000000000000000000..be394cc745c5312a7d0e4e7e574e5ba3f181ef27 --- /dev/null +++ b/bash-5.1/tests/run-varenv @@ -0,0 +1,4 @@ +echo "warning: some of these tests will fail if arrays have not" >&2 +echo "warning: been compiled into the shell" >&2 +${THIS_SH} ./varenv.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} +diff ${BASH_TSTOUT} varenv.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/run-vredir b/bash-5.1/tests/run-vredir new file mode 100644 index 0000000000000000000000000000000000000000..2bdc1b8389138105c7f51b4bf51c20dff23435b7 --- /dev/null +++ b/bash-5.1/tests/run-vredir @@ -0,0 +1,4 @@ +echo "warning: the text of a system error message may vary between systems and" >&2 +echo "warning: produce diff output." >&2 +${THIS_SH} ./vredir.tests > ${BASH_TSTOUT} 2>&1 +diff ${BASH_TSTOUT} vredir.right && rm -f ${BASH_TSTOUT} diff --git a/bash-5.1/tests/set-e.right b/bash-5.1/tests/set-e.right new file mode 100644 index 0000000000000000000000000000000000000000..e2a9f2c4b17ec258426d40bae4c9c1e449f2ffed --- /dev/null +++ b/bash-5.1/tests/set-e.right @@ -0,0 +1,72 @@ +95 +96 +97 +98 +99 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +1 +1 +ok +hi +while succeeded +until succeeded: 4 +if succeeded +AND list succeeded +OR list succeeded +! succeeded +eval succeeded +! eval succeeded -- 1 +! eval succeeded -- 2 +a +0 +b +0 +after 1 +a +0 +non-posix foo +after brace group failure: 1 +A 1 +B 0 +C 0 +D 0 +D 1 +A 1 +B 0 +C 0 +D 0 +D 1 +A 1 +B 0 +C 0 +A 1 +B 1 +C 0 +B 0 +C 0 +after negation 1: 0 +after negation 2: 0 +after negation 3: 1 +after negation 4: 0 +after brace pipeline +foo +after failure 1 +after failure 2 +after failure 3 +true || false no exit +false || true no exit +false && false no exit +A: +B: +ehB +C: +D: diff --git a/bash-5.1/tests/set-e.tests b/bash-5.1/tests/set-e.tests new file mode 100644 index 0000000000000000000000000000000000000000..3e0d66981d528ac262e1ef308d398406589a05f2 --- /dev/null +++ b/bash-5.1/tests/set-e.tests @@ -0,0 +1,124 @@ +# 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 . +# +if : ; then + set -e + N=95 + while :; do + # expr returns 1 if expression is null or 0 + set +e + N_MOD_100=`expr $N % 100` + set -e + echo $N_MOD_100 + N=`expr $N + 1` + if [ $N -eq 110 ]; then + break + fi + done + set +e +fi + +( +set -e +false +echo bad +) +echo $? + +x=$( +set -e +false +echo bad +) +echo $? $x + +# command subst should not inherit -e +set -e +echo $(false; echo ok) + +if set +e +then + false +fi +echo hi + +set -e + +# a failing command in the compound list following a while, until, or +# if should not cause the shell to exit + +while false; do + echo hi +done +echo while succeeded + +x=1 +until (( x == 4 )); do + x=4 +done +echo until succeeded: $x + +if false; then + echo oops +fi +echo if succeeded + +# failing commands that are part of an AND or OR list should not +# cause the shell to exit +false && echo AND list failed +echo AND list succeeded + +false || echo OR list succeeded + +! false +echo ! succeeded + +# make sure eval preserves the state of the -e flag and `!' reserved word +set -e +if eval false; then + echo oops +fi +echo eval succeeded + +! eval false +echo ! eval succeeded -- 1 + +! eval '(exit 5)' +echo ! eval succeeded -- 2 + +set -e +until builtin false; do echo a; break; done +echo $? + +until eval false; do echo b; break; done +echo $? + +: ${TMPDIR:=/tmp} +FN=$TMPDIR/set-e-$$ +cat > $FN << EOF +false +echo after 1 +false +EOF + +set -e +until . $FN; do echo a; break; done +echo $? + +rm -f $FN + +set +e + +${THIS_SH} ./set-e1.sub +${THIS_SH} ./set-e2.sub +${THIS_SH} ./set-e3.sub diff --git a/bash-5.1/tests/set-e1.sub b/bash-5.1/tests/set-e1.sub new file mode 100644 index 0000000000000000000000000000000000000000..cdd4d635a2d92292d6f49cc1fca438012b1425a7 --- /dev/null +++ b/bash-5.1/tests/set-e1.sub @@ -0,0 +1,72 @@ +# 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 . +# +# subshell failure should cause the shell to exit silently +${THIS_SH} -ce '(exit 17) ; echo "after (exit 17): $?"' + +# pipeline failure should cause shell to exit silently +${THIS_SH} -c 'set -e ; false | echo foo | while read x ; do ( exit 17 ) ; done; echo after pipeline subshell;' + +# should be silent in posix mode +${THIS_SH} -c 'set -o posix; set -e ; z=$(false;echo posix foo) ; echo $z' +# but echo foo in non-posix +${THIS_SH} -c 'set -e ; z=$(false;echo non-posix foo) ; echo $z' + +${THIS_SH} -ce 'x=$(false) ; echo "x=\$(false) does not exit"' + +${THIS_SH} -ce '{ false; echo false in brace group does not exit; }' +echo after brace group failure: $? + +${THIS_SH} -ce '(false ; echo A $?) && echo B $?; echo C $?'; echo D $? + +${THIS_SH} -ce '(false ; echo A $?) ; echo B $?; echo C $?'; echo D $? + +${THIS_SH} -ce 'f() (false ; echo A $?); f && echo B $?; echo C $?'; echo D $? + +${THIS_SH} -ce 'f() (false ; echo A $?) ; f; echo B $?; echo C $?'; echo D $? + +${THIS_SH} -ce 'if false; echo A $?; then echo B $?; fi'; echo C $? + +${THIS_SH} -ce '! { false; echo A $?; } | cat; echo B $?'; echo C $? + +${THIS_SH} -ce '{ false; echo A $?; } | cat ; echo B $?'; echo C $? + +set -e + +! false +echo after negation 1: $? + +! false | false +echo after negation 2: $? + +! true +echo after negation 3: $? + +! (false) +echo after negation 4: $? + +{ false ; echo foo; } | cat +echo after brace pipeline + +false | echo foo | cat +echo after failure 1 + +false | (echo foo; false) | true +echo after failure 2 + +false | echo foo | while read x ; do ( exit 17 ) ; done | true +echo after failure 3 + +# this pipeline failure should cause the shell to exit +false | echo foo | false +echo after failure 4 diff --git a/bash-5.1/tests/set-e2.sub b/bash-5.1/tests/set-e2.sub new file mode 100644 index 0000000000000000000000000000000000000000..de04e99c4fc4f4d30e31ed88183ee1cc19bed94a --- /dev/null +++ b/bash-5.1/tests/set-e2.sub @@ -0,0 +1,10 @@ +${THIS_SH} -ce 'true || false ; echo "true || false no exit"' +${THIS_SH} -ce 'false || false ; echo "false || false no exit"' +${THIS_SH} -ce 'false || true ; echo "false || true no exit"' + +${THIS_SH} -ce 'false && false ; echo "false && false no exit"' +${THIS_SH} -ce 'true && false ; echo "true && false no exit"' + +${THIS_SH} -ce 'true && (exit 1) ; echo "true && (exit 1) no exit"' +${THIS_SH} -ce 'true && true|false ; echo "true && true|false no exit"' +${THIS_SH} -ce 'true && true|(false) ; echo "true && true|(false) no exit"' diff --git a/bash-5.1/tests/set-e3.sub b/bash-5.1/tests/set-e3.sub new file mode 100644 index 0000000000000000000000000000000000000000..db176b1ff9dc5e0047ac96ccbad7badad4418649 --- /dev/null +++ b/bash-5.1/tests/set-e3.sub @@ -0,0 +1,10 @@ +foo() +{ + echo A: + . ./set-e3a.sub + echo D: +} + +# should run all the way through; foo being called in a context where set -e +# is ignored means that that condition persists through sourcing the file +foo && true diff --git a/bash-5.1/tests/set-e3a.sub b/bash-5.1/tests/set-e3a.sub new file mode 100644 index 0000000000000000000000000000000000000000..5d008e74e7864f26aff4e506437d1f223ac9c58d --- /dev/null +++ b/bash-5.1/tests/set-e3a.sub @@ -0,0 +1,7 @@ +echo B: + +set -e +echo $- +false + +echo C: diff --git a/bash-5.1/tests/set-x.right b/bash-5.1/tests/set-x.right new file mode 100644 index 0000000000000000000000000000000000000000..259602e5ec35f741a4b07dab75b5aeda231a0a23 --- /dev/null +++ b/bash-5.1/tests/set-x.right @@ -0,0 +1,60 @@ ++ (( i=0 )) ++ (( i<=5 )) ++ x=0 ++ (( i++ )) ++ (( i<=5 )) ++ x=0 ++ (( i++ )) ++ (( i<=5 )) ++ x=0 ++ (( i++ )) ++ (( i<=5 )) ++ x=0 ++ (( i++ )) ++ (( i<=5 )) ++ x=0 ++ (( i++ )) ++ (( i<=5 )) ++ x=0 ++ (( i++ )) ++ (( i<=5 )) ++ for i in 0 1 2 ++ x=i ++ for i in 0 1 2 ++ x=i ++ for i in 0 1 2 ++ x=i ++ case x in ++ x=i ++ foo=one ++ foo+=two ++ echo onetwo +onetwo ++ set +x +1 +2 +3 +4 ++ for f in a b c d e ++ echo a +a ++ for f in a b c d e ++ echo b +b ++ for f in a b c d e ++ echo c +c ++ for f in a b c d e ++ echo d +d ++ for f in a b c d e ++ echo e +e ++ set +x +TRACEFILE: ++ echo 1 ++ echo 2 ++ echo 3 ++ echo 4 ++ unset BASH_XTRACEFD +===== diff --git a/bash-5.1/tests/set-x.tests b/bash-5.1/tests/set-x.tests new file mode 100644 index 0000000000000000000000000000000000000000..3723552dc9a18d9531becb164921319b95a3d031 --- /dev/null +++ b/bash-5.1/tests/set-x.tests @@ -0,0 +1,38 @@ +# 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 . +# + +# $Id: set-x.tests,v 1.1 2002/12/09 13:12:37 rockyb Exp $ +# +# Test that "set -x" shows what we think it should. +# +set -x +for ((i=0; i<=5; i++ )) ; do + x=0 +done +for i in 0 1 2 ; do + x=i +done +case x in + 0) x=i ;; + *) x=i ;; +esac + +foo=one +foo+=two +echo $foo + +set +x + +# test BASH_XTRACEFD +${THIS_SH} ./set-x1.sub diff --git a/bash-5.1/tests/set-x1.sub b/bash-5.1/tests/set-x1.sub new file mode 100644 index 0000000000000000000000000000000000000000..cb7fa8270f467d41b0265a7c5c44831807de0495 --- /dev/null +++ b/bash-5.1/tests/set-x1.sub @@ -0,0 +1,38 @@ +# 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 . +# +: ${TMPDIR:=/var/tmp} +TRACEFILE=$TMPDIR/bash-trace-$$ +trap 'rm -f $TRACEFILE' 0 1 2 3 6 15 + +exec 4>$TRACEFILE +BASH_XTRACEFD=4 + +set -x + +echo 1 +echo 2 +echo 3 +echo 4 + +unset BASH_XTRACEFD + +for f in a b c d e; do echo $f ; done + +set +x + +echo TRACEFILE: +cat $TRACEFILE +echo ===== + +exit 0 diff --git a/bash-5.1/tests/shopt.right b/bash-5.1/tests/shopt.right new file mode 100644 index 0000000000000000000000000000000000000000..8cf46db6077b07aac074334cbdc11ecb9d27b4f0 --- /dev/null +++ b/bash-5.1/tests/shopt.right @@ -0,0 +1,298 @@ +./shopt.tests: line 15: shopt: -z: invalid option +shopt: usage: shopt [-pqsu] [-o] [optname ...] +-- +shopt -u autocd +shopt -u assoc_expand_once +shopt -u cdable_vars +shopt -s cdspell +shopt -u checkhash +shopt -u checkjobs +shopt -u checkwinsize +shopt -s cmdhist +shopt -u compat31 +shopt -u compat32 +shopt -u compat40 +shopt -u compat41 +shopt -u compat42 +shopt -u compat43 +shopt -u compat44 +shopt -s complete_fullquote +shopt -u direxpand +shopt -u dirspell +shopt -u dotglob +shopt -u execfail +shopt -s expand_aliases +shopt -u extdebug +shopt -u extglob +shopt -s extquote +shopt -u failglob +shopt -s force_fignore +shopt -s globasciiranges +shopt -u globstar +shopt -u gnu_errfmt +shopt -u histappend +shopt -u histreedit +shopt -u histverify +shopt -s hostcomplete +shopt -u huponexit +shopt -u inherit_errexit +shopt -s interactive_comments +shopt -u lastpipe +shopt -u lithist +shopt -u localvar_inherit +shopt -u localvar_unset +shopt -u login_shell +shopt -u mailwarn +shopt -u no_empty_cmd_completion +shopt -u nocaseglob +shopt -u nocasematch +shopt -u nullglob +shopt -s progcomp +shopt -u progcomp_alias +shopt -s promptvars +shopt -u restricted_shell +shopt -u shift_verbose +shopt -s sourcepath +shopt -u xpg_echo +-- +shopt -u huponexit +shopt -u checkwinsize +shopt -s sourcepath +-- +shopt -s cdspell +shopt -s cmdhist +shopt -s complete_fullquote +shopt -s expand_aliases +shopt -s extquote +shopt -s force_fignore +shopt -s globasciiranges +shopt -s hostcomplete +shopt -s interactive_comments +shopt -s progcomp +shopt -s promptvars +shopt -s sourcepath +-- +shopt -u autocd +shopt -u assoc_expand_once +shopt -u cdable_vars +shopt -u checkhash +shopt -u checkjobs +shopt -u checkwinsize +shopt -u compat31 +shopt -u compat32 +shopt -u compat40 +shopt -u compat41 +shopt -u compat42 +shopt -u compat43 +shopt -u compat44 +shopt -u direxpand +shopt -u dirspell +shopt -u dotglob +shopt -u execfail +shopt -u extdebug +shopt -u extglob +shopt -u failglob +shopt -u globstar +shopt -u gnu_errfmt +shopt -u histappend +shopt -u histreedit +shopt -u histverify +shopt -u huponexit +shopt -u inherit_errexit +shopt -u lastpipe +shopt -u lithist +shopt -u localvar_inherit +shopt -u localvar_unset +shopt -u login_shell +shopt -u mailwarn +shopt -u no_empty_cmd_completion +shopt -u nocaseglob +shopt -u nocasematch +shopt -u nullglob +shopt -u progcomp_alias +shopt -u restricted_shell +shopt -u shift_verbose +shopt -u xpg_echo +-- +autocd off +assoc_expand_once off +cdable_vars off +checkhash off +checkjobs off +checkwinsize off +compat31 off +compat32 off +compat40 off +compat41 off +compat42 off +compat43 off +compat44 off +direxpand off +dirspell off +dotglob off +execfail off +extdebug off +extglob off +failglob off +globstar off +gnu_errfmt off +histappend off +histreedit off +histverify off +huponexit off +inherit_errexit off +lastpipe off +lithist off +localvar_inherit off +localvar_unset off +login_shell off +mailwarn off +no_empty_cmd_completion off +nocaseglob off +nocasematch off +nullglob off +progcomp_alias off +restricted_shell off +shift_verbose off +xpg_echo off +-- +set +o allexport +set -o braceexpand +set -o emacs +set +o errexit +set +o errtrace +set +o functrace +set -o hashall +set -o histexpand +set -o history +set +o ignoreeof +set -o interactive-comments +set +o keyword +set -o monitor +set +o noclobber +set +o noexec +set +o noglob +set +o nolog +set +o notify +set +o nounset +set +o onecmd +set +o physical +set +o pipefail +set +o posix +set -o privileged +set +o verbose +set +o vi +set +o xtrace +-- +allexport off +braceexpand on +emacs on +errexit off +errtrace off +functrace off +hashall on +histexpand on +history on +ignoreeof off +interactive-comments on +keyword off +monitor on +noclobber off +noexec off +noglob off +nolog off +notify off +nounset off +onecmd off +physical off +pipefail off +posix off +privileged on +verbose off +vi off +xtrace off +-- +set +o allexport +set -o braceexpand +set -o emacs +set +o errexit +set +o errtrace +set +o functrace +set -o hashall +set -o histexpand +set -o history +set +o ignoreeof +set -o interactive-comments +set +o keyword +set -o monitor +set +o noclobber +set +o noexec +set +o noglob +set +o nolog +set +o notify +set +o nounset +set +o onecmd +set +o physical +set +o pipefail +set +o posix +set -o privileged +set +o verbose +set +o vi +set +o xtrace +-- +set -o history +set +o verbose +-- +set -o braceexpand +set -o emacs +set -o hashall +set -o histexpand +set -o history +set -o interactive-comments +set -o monitor +set -o privileged +-- +set +o allexport +set +o errexit +set +o errtrace +set +o functrace +set +o ignoreeof +set +o keyword +set +o noclobber +set +o noexec +set +o noglob +set +o nolog +set +o notify +set +o nounset +set +o onecmd +set +o physical +set +o pipefail +set +o posix +set +o verbose +set +o vi +set +o xtrace +-- +allexport off +errexit off +errtrace off +functrace off +ignoreeof off +keyword off +noclobber off +noexec off +noglob off +nolog off +notify off +nounset off +onecmd off +physical off +pipefail off +posix off +verbose off +vi off +xtrace off +-- +./shopt.tests: line 106: shopt: xyz1: invalid shell option name +./shopt.tests: line 107: shopt: xyz1: invalid option name +expand_aliases on +expand_aliases on diff --git a/bash-5.1/tests/shopt.tests b/bash-5.1/tests/shopt.tests new file mode 100644 index 0000000000000000000000000000000000000000..c31870cf929e480c4c79257e26a087bd98d9f66e --- /dev/null +++ b/bash-5.1/tests/shopt.tests @@ -0,0 +1,113 @@ +# 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 . +# +# let's try an error message first +shopt -z + +# first, set up a known environment +shopt -u cdable_vars +shopt -s cdspell +shopt -u checkhash +shopt -u checkwinsize +shopt -s cmdhist +shopt -u dotglob +shopt -u execfail +shopt -s expand_aliases +shopt -u extglob +shopt -u histreedit +shopt -u histappend +shopt -u histverify +shopt -s hostcomplete +shopt -u huponexit +shopt -s interactive_comments +shopt -u lithist +shopt -u mailwarn +shopt -u nocaseglob +shopt -u nullglob +shopt -s promptvars +shopt -u shift_verbose +shopt -s sourcepath +shopt -u xpg_echo + +# Now, start checking the output +builtin printf -- "--\n" +shopt -p # list 'em all +builtin printf -- "--\n" +# test specific variables +shopt -p huponexit +shopt -p checkwinsize +shopt -p sourcepath + +builtin printf -- "--\n" +shopt -s -p +builtin printf -- "--\n" +shopt -u -p +builtin printf -- "--\n" +shopt -u + +# Now set up another known environment +set +o allexport +set -o braceexpand +set +o errexit +set -o hashall +set -o histexpand +set +o keyword +set -o monitor +set +o noclobber +set +o noexec +set +o noglob +set +o notify +set +o nounset +set +o onecmd +set +o physical +set -o privileged +set +o verbose +set +o xtrace +set -o history +set +o ignoreeof +set -o interactive-comments +set +o posix +set -o emacs +set +o vi + +# list 'em all +builtin printf -- "--\n" +shopt -o -p + +builtin printf -- "--\n" +set -o +builtin printf -- "--\n" +set +o + +# test specific variables +builtin printf -- "--\n" +shopt -p -o history +shopt -p -o verbose + +builtin printf -- "--\n" +shopt -s -p -o +builtin printf -- "--\n" +shopt -u -p -o +builtin printf -- "--\n" +shopt -u -o + +# errors +builtin printf -- "--\n" +shopt -p xyz1 +shopt -o -p xyz1 + +${THIS_SH} ./shopt1.sub + +# test whether or not temporary variable assignments that manipulate posix +# mode restore the previous state or the default non-posix state +${THIS_SH} -c 'shopt -s expand_aliases ; shopt expand_aliases ; POSIXLY_CORRECT=y true ; shopt expand_aliases' diff --git a/bash-5.1/tests/shopt1.sub b/bash-5.1/tests/shopt1.sub new file mode 100644 index 0000000000000000000000000000000000000000..8c1150fb971d0ee5707ea1a9703e5f0f771c2ba5 --- /dev/null +++ b/bash-5.1/tests/shopt1.sub @@ -0,0 +1,52 @@ +# 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 . +# + +# verify all shopt options are reset properly when the shell is reinitialized + +: ${TMPDIR:=/var/tmp} ${THIS_SH:=$PWD/bash} + +t1=$(mktemp) +t2=$(mktemp) + +if [ ! -e "$t1" ] ; then + S1=$RANDOM + S2=$RANDOM + t1=$TMPDIR/s-$S1 + t2=$TMPDIR/s-$S2 + touch "$t1" "$t2" +fi + +chmod +x "$t1" "$t2" + +echo "shopt" > "$t1" + +echo "#!${THIS_SH}" > "$t2" +echo "shopt" >> "$t2" + +for o in $(compgen -A shopt) +do + case $o in + extdebug) ;; + *) shopt -s $o ;; + esac +done +diff <("$t1") <("$t2") + +for o in $(compgen -A shopt) +do + shopt -u $o; +done +diff <("$t1") <("$t2") + +rm "$t1" "$t2" diff --git a/bash-5.1/tests/source1.sub b/bash-5.1/tests/source1.sub new file mode 100644 index 0000000000000000000000000000000000000000..8b8586f17cda1a26f5bcaf6eb0402e9c9ce2d0b2 --- /dev/null +++ b/bash-5.1/tests/source1.sub @@ -0,0 +1 @@ +echo $AVAR diff --git a/bash-5.1/tests/source2.sub b/bash-5.1/tests/source2.sub new file mode 100644 index 0000000000000000000000000000000000000000..7a031a11affd6c6347c3bb6df1636ed38cf6ab07 --- /dev/null +++ b/bash-5.1/tests/source2.sub @@ -0,0 +1,5 @@ +echo in source.sub2, calling return + +return 5 + +echo oops -- return in source.sub2 failed diff --git a/bash-5.1/tests/source3.sub b/bash-5.1/tests/source3.sub new file mode 100644 index 0000000000000000000000000000000000000000..4a12501f7f31d5c233d9c717bc2ed581af5df154 --- /dev/null +++ b/bash-5.1/tests/source3.sub @@ -0,0 +1 @@ +echo "$@" diff --git a/bash-5.1/tests/source4.sub b/bash-5.1/tests/source4.sub new file mode 100644 index 0000000000000000000000000000000000000000..717c1ab91571b02ec4f5d51b41d53ab23e85f143 --- /dev/null +++ b/bash-5.1/tests/source4.sub @@ -0,0 +1 @@ +set -- m n o p diff --git a/bash-5.1/tests/source5.sub b/bash-5.1/tests/source5.sub new file mode 100644 index 0000000000000000000000000000000000000000..4149c11faa16d75f67329cf84dea9839700ba1ca --- /dev/null +++ b/bash-5.1/tests/source5.sub @@ -0,0 +1,32 @@ +# 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 . +# +LC_ALL=en_US.UTF-8 +unset LC_ALL +unset LANG +export LC_ALL=C +export LANG=C + +set +o posix + +# attempting to source a non-existent file is not an error... +. /tmp/source-notthere + +echo after bad source 1 + +set -o posix + +# ...unless you're in posix mode +. /tmp/source-notthere + +echo after bad source 2 diff --git a/bash-5.1/tests/source6.sub b/bash-5.1/tests/source6.sub new file mode 100644 index 0000000000000000000000000000000000000000..2437292720ca33fa38ec9ee31604af07065df687 --- /dev/null +++ b/bash-5.1/tests/source6.sub @@ -0,0 +1,49 @@ +# 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 . +# +# tests sourcing non-regular files, fixed post-3.2 + +: ${TMPDIR:=/tmp} + +TMPFN=$TMPDIR/foo-$$ + +rm -f $TMPFN +echo "echo one - OK" > $TMPFN +. $TMPFN +echo $? +rm -f $TMPFN + +# non-regular readable file +. /dev/null +echo $? + +# FIFO or pipe via /dev/fd +. <(echo "echo two - OK") +echo $? + +# pipe +if [ -e /dev/stdin ]; then +echo "echo three - OK" | . /dev/stdin +echo $? +else +# no /dev/stdin, just fake it +echo "three - OK" ; echo 0 +fi + +# FIFO +mkfifo $TMPDIR/fifo-$$ +echo "echo four - OK" > $TMPDIR/fifo-$$ & +sleep 1 # allow the child echo to execute +. $TMPDIR/fifo-$$ +echo $? +rm -f $TMPDIR/fifo-$$ diff --git a/bash-5.1/tests/source7.sub b/bash-5.1/tests/source7.sub new file mode 100644 index 0000000000000000000000000000000000000000..474a66f7436fb4fb9a292454535496be648f59a0 --- /dev/null +++ b/bash-5.1/tests/source7.sub @@ -0,0 +1,53 @@ +# 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 . +# +shopt -s expand_aliases + +: ${TMPDIR:=/var/tmp} + +echo '((echo abc; echo def;); echo ghi)' > $TMPDIR/x28-$$ +. $TMPDIR/x28-$$ +rm -f $TMPDIR/x28-$$ + +echo after + +TMPFILE=$TMPDIR/x29-$$ + +echo "#! ${THIS_SH}" >$TMPFILE +cat >> $TMPFILE << \EOF + +(echo -n "$1 "; echo subshell) +EOF +chmod 755 $TMPFILE + +alias foo1='$TMPFILE one.1; source $TMPFILE two.1; source $TMPFILE three.1; $TMPFILE four.1' +alias foo2='$TMPFILE one.2; +source $TMPFILE two.2; +source $TMPFILE three.2; +$TMPFILE four.2; +' + +foo1 +foo2 + +echo x29 - done +rm -f $TMPFILE + +# this is also treated similarly to an alias expansion internally +((echo abc; echo def;); echo ghi) + +if (((4+4) + (4 + 7))); then + echo ok +fi + +(()) # make sure the null expression works OK diff --git a/bash-5.1/tests/strip.right b/bash-5.1/tests/strip.right new file mode 100644 index 0000000000000000000000000000000000000000..dfab897f44e2818a9111a7c36ab9981615cab89f --- /dev/null +++ b/bash-5.1/tests/strip.right @@ -0,0 +1,12 @@ +'' +' ab ' +' ' +'' +'' +'' +'ababababababab' +'ababababababab ' +'ababababababab ' +'abababa +bababab ' +'' diff --git a/bash-5.1/tests/strip.tests b/bash-5.1/tests/strip.tests new file mode 100644 index 0000000000000000000000000000000000000000..b16705f4a20e919625b00202cf173ad2b95db037 --- /dev/null +++ b/bash-5.1/tests/strip.tests @@ -0,0 +1,35 @@ +# 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 . +# +v=`echo "" ; echo "" ; echo ""` +echo "'$v'" +v=`echo -n " ab "` +echo "'$v'" +v=`echo -n " "` +echo "'$v'" +v=`echo -n ""` +echo "'$v'" +v=`echo ""` +echo "'$v'" +v=`echo` +echo "'$v'" +v=`echo ababababababab` +echo "'$v'" +v=`echo "ababababababab "` +echo "'$v'" +v=`echo -n "ababababababab "` +echo "'$v'" +v=`echo -ne "abababa\nbababab "` +echo "'$v'" +v="`echo -e '\n\n\n\n'`" +echo "'$v'" diff --git a/bash-5.1/tests/test-glue-functions b/bash-5.1/tests/test-glue-functions new file mode 100644 index 0000000000000000000000000000000000000000..07ad8215fc5639ec175a8c00d0344fbf96d294d3 --- /dev/null +++ b/bash-5.1/tests/test-glue-functions @@ -0,0 +1,13 @@ +# shell functions to include in multiple test files + +# squeeze out blanks to avoid white space differences in od implementations +_intl_normalize_spaces() +{ + sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/[[:space:]]*$//' +} + +# avoid whitespace differences in wc implementations +_cut_leading_spaces() +{ + sed -e 's/^[ ]*//g' +} diff --git a/bash-5.1/tests/test.right b/bash-5.1/tests/test.right new file mode 100644 index 0000000000000000000000000000000000000000..391edbbd34902184d75fc3e77cc7d8adbb64f9bd --- /dev/null +++ b/bash-5.1/tests/test.right @@ -0,0 +1,295 @@ +t -a noexist +1 +t -a run-all +0 +t -b run-all +1 +t -b /dev/jb1a +1 +t -c run-all +1 +t -c /dev/tty +0 +t -d run-all +1 +t -d /etc +0 +t -d "" +1 +b -d "" +1 +t -e noexist +1 +t -e run-all +0 +t -f noexist +1 +t -f /dev/tty +1 +t -f run-all +0 +t -g run-all +1 +t -g /tmp/test.setgid +0 +t -k run-all +1 +t -n "" +1 +t -n "hello" +0 +t -p run-all +1 +t -r noexist +1 +t -r /tmp/test.noread +1 +t -r run-all +0 +t -s noexist +1 +t -s /dev/null +1 +t -s run-all +0 +t -t 20 +1 +t -t 0 +0 +t -u noexist +1 +t -u run-all +1 +t -u /tmp/test.setuid +0 +t -w noexist +1 +t -w /tmp/test.nowrite +1 +t -w /dev/null +0 +t -x noexist +1 +t -x /tmp/test.exec +0 +t -x /tmp/test.noexec +1 +t -z "" +0 +t -z "foo" +1 +t "foo" +0 +t "" +1 +t -O /tmp/test.owner +0 +t -S /tmp/test.socket +1 +t -N /tmp/test.newer +0 +t "hello" = "hello" +0 +t "hello" = "goodbye" +1 +t "hello" == "hello" +0 +t "hello" == "goodbye" +1 +t "hello" != "hello" +1 +t "hello" != "goodbye" +0 +t "hello" < "goodbye" +1 +t "hello" > "goodbye" +0 +t ! "hello" > "goodbye" +1 +t 200 -eq 200 +0 +t 34 -eq 222 +1 +t -32 -eq 32 +1 +t 200 -ne 200 +1 +t 34 -ne 222 +0 +t 200 -gt 200 +1 +t 340 -gt 222 +0 +t 200 -ge 200 +0 +t 34 -ge 222 +1 +t 200 -lt 200 +1 +t 34 -lt 222 +0 +t 200 -le 200 +0 +t 340 -le 222 +1 +t 700 -le 1000 -a -n "1" -a "20" = "20" +0 +t ! \( 700 -le 1000 -a -n "1" -a "20" = "20" \) +1 +t /tmp/abc -nt /tmp/def +1 +t /tmp/abc -ot /tmp/def +0 +t /tmp/def -nt /tmp/abc +0 +t /tmp/def -ot /tmp/abc +1 +t /tmp/abc -ef /tmp/def +1 +t /tmp/abc -ef /tmp/ghi +0 +t -r /dev/fd/0 +0 +t -w /dev/fd/1 +0 +t -w /dev/fd/2 +0 +t -r /dev/stdin +0 +t -w /dev/stdout +0 +t -w /dev/stderr +0 +t +1 +b +1 +t 12 -eq 34 +1 +t ! 12 -eq 34 +0 +t -n abcd -o aaa +0 +t -n abcd -o -z aaa +0 +t -n abcd -a aaa +0 +t -n abcd -a -z aaa +1 +t -o allexport +1 +t ! -o allexport +0 +t -v unset +1 +t -v set +0 +t -v set +0 +t xx -a yy +0 +t xx -o "" +0 +t xx -a "" +1 +t -X -a -X +0 +t -X -o -X +0 +t -X -o "" +0 +t -X -a "" +1 +t "" -a -X +1 +t "" -o -X +0 +t "" -a "" +1 +t "" -o "" +1 +t true -o -X +0 +t true -a -X +0 +t ( -E ) +0 +t ( "" ) +1 +t ! -z "$z" +0 +t ! -n "$z" +1 +t "$zero" +1 +t ! "$zero" +0 +b "$zero" +1 +b ! "$zero" +0 +t -G /tmp/test.group +0 +t -h /tmp/test.symlink +0 +t 4+3 -eq 7 +./test.tests: line 26: test: 4+3: integer expression expected +2 +b 4-5 -eq 7 +./test.tests: line 20: [: 4+3: integer expression expected +2 +t 9 -eq 4+5 +./test.tests: line 26: test: 4+5: integer expression expected +2 +b 9 -eq 4+5 +./test.tests: line 20: [: 4+5: integer expression expected +2 +t A -eq 7 +./test.tests: line 26: test: A: integer expression expected +2 +b A -eq 7 +./test.tests: line 20: [: A: integer expression expected +2 +t 9 -eq B +./test.tests: line 26: test: B: integer expression expected +2 +b 9 -eq B +./test.tests: line 20: [: B: integer expression expected +2 +t ( 1 = 2 +./test.tests: line 26: test: `)' expected +2 +b ( 1 = 2 +./test.tests: line 20: [: `)' expected, found ] +2 +./test.tests: line 26: test: a: unary operator expected +2 +./test.tests: line 26: test: b: binary operator expected +2 +./test.tests: line 26: test: -A: unary operator expected +2 +./test.tests: line 26: test: syntax error: `-ne' unexpected +2 +./test.tests: line 26: test: too many arguments +2 +./test.tests: line 431: [: missing `]' +2 +./test.tests: line 26: test: (: unary operator expected +2 +t -t a +1 +t -t addsds +1 +t -t 42 +1 +t -t /dev/tty +1 +t -t /dev/tty4 +1 +t -t /dev/tty4444444... +1 +1 +t -p /dev/fd/6 +1 +t -p /dev/fd/6 +0 diff --git a/bash-5.1/tests/test.tests b/bash-5.1/tests/test.tests new file mode 100644 index 0000000000000000000000000000000000000000..03e2754a5d6df36b6f0d0961152c4b1fbdac81bd --- /dev/null +++ b/bash-5.1/tests/test.tests @@ -0,0 +1,453 @@ +# 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 . +# +if (( $UID == 0 )); then + echo "test-tests: the test suite should not be run as root" >&2 +fi + +b() +{ + [ "$@" ] + echo $? +} + +t() +{ + test "$@" + echo $? +} + +echo 't -a noexist' +t -a noexist +echo 't -a run-all' +t -a run-all + +echo 't -b run-all' +t -b run-all +echo 't -b /dev/jb1a' +t -b /dev/jb1a + +echo 't -c run-all' +t -c run-all +echo 't -c /dev/tty' +t -c /dev/tty + +echo 't -d run-all' +t -d run-all +echo 't -d /etc' +t -d /etc +echo 't -d ""' +t -d "" +echo 'b -d ""' +b -d "" + +echo 't -e noexist' +t -e noexist +echo 't -e run-all' +t -e run-all + +echo 't -f noexist' +t -f noexist +echo 't -f /dev/tty' +t -f /dev/tty +echo 't -f run-all' +t -f run-all + +echo 't -g run-all' +t -g run-all + +touch /tmp/test.setgid +chgrp ${GROUPS[0]} /tmp/test.setgid +chmod ug+x /tmp/test.setgid +chmod g+s /tmp/test.setgid +echo 't -g /tmp/test.setgid' +t -g /tmp/test.setgid +rm -f /tmp/test.setgid + +echo 't -k run-all' +t -k run-all + +echo 't -n ""' +t -n "" +echo 't -n "hello"' +t -n "hello" + +echo 't -p run-all' +t -p run-all + +echo 't -r noexist' +t -r noexist + +if (( $UID != 0 )); then + touch /tmp/test.noread + chmod a-r /tmp/test.noread + echo 't -r /tmp/test.noread' + t -r /tmp/test.noread + rm -f /tmp/test.noread +else + echo 't -r /tmp/test.noread' + echo 1 +fi + +echo 't -r run-all' +t -r run-all + +echo 't -s noexist' +t -s noexist +echo 't -s /dev/null' +t -s /dev/null +echo 't -s run-all' +t -s run-all + +echo 't -t 20' +t -t 20 +echo 't -t 0' +t -t 0 < /dev/tty + +echo 't -u noexist' +t -u noexist + +echo 't -u run-all' +t -u run-all + +touch /tmp/test.setuid +chmod u+x /tmp/test.setuid # some systems require this to turn on setuid bit +chmod u+s /tmp/test.setuid +echo 't -u /tmp/test.setuid' +t -u /tmp/test.setuid +rm -f /tmp/test.setuid + +echo 't -w noexist' +t -w noexist + +if (( $UID != 0 )); then + touch /tmp/test.nowrite + chmod a-w /tmp/test.nowrite + echo 't -w /tmp/test.nowrite' + t -w /tmp/test.nowrite + rm -f /tmp/test.nowrite +else + echo 't -w /tmp/test.nowrite' + echo 1 +fi + +echo 't -w /dev/null' +t -w /dev/null + +echo 't -x noexist' +t -x noexist + +touch /tmp/test.exec +chmod u+x /tmp/test.exec +echo 't -x /tmp/test.exec' +t -x /tmp/test.exec +rm -f /tmp/test.exec + +touch /tmp/test.noexec +chmod u-x /tmp/test.noexec +echo 't -x /tmp/test.noexec' +t -x /tmp/test.noexec +rm -f /tmp/test.noexec + +echo 't -z ""' +t -z "" +echo 't -z "foo"' +t -z "foo" + +echo 't "foo"' +t "foo" +echo 't ""' +t "" + +touch /tmp/test.owner +echo 't -O /tmp/test.owner' +t -O /tmp/test.owner +rm -f /tmp/test.owner + +touch /tmp/test.socket +echo 't -S /tmp/test.socket' +t -S /tmp/test.socket # false +rm -f /tmp/test.socket + +touch /tmp/test.newer ; sleep 1; echo "hello" > /tmp/test.newer +echo 't -N /tmp/test.newer' +t -N /tmp/test.newer +rm -f /tmp/test.newer + +echo 't "hello" = "hello"' +t "hello" = "hello" +echo 't "hello" = "goodbye"' +t "hello" = "goodbye" + +echo 't "hello" == "hello"' +t "hello" == "hello" +echo 't "hello" == "goodbye"' +t "hello" == "goodbye" + +echo 't "hello" != "hello"' +t "hello" != "hello" +echo 't "hello" != "goodbye"' +t "hello" != "goodbye" + +echo 't "hello" < "goodbye"' +t "hello" \< "goodbye" +echo 't "hello" > "goodbye"' +t "hello" \> "goodbye" + +echo 't ! "hello" > "goodbye"' +t "! hello" \> "goodbye" + +echo 't 200 -eq 200' +t 200 -eq 200 +echo 't 34 -eq 222' +t 34 -eq 222 +echo 't -32 -eq 32' +t -32 -eq 32 + +echo 't 200 -ne 200' +t 200 -ne 200 +echo 't 34 -ne 222' +t 34 -ne 222 + +echo 't 200 -gt 200' +t 200 -gt 200 +echo 't 340 -gt 222' +t 340 -gt 222 + +echo 't 200 -ge 200' +t 200 -ge 200 +echo 't 34 -ge 222' +t 34 -ge 222 + +echo 't 200 -lt 200' +t 200 -lt 200 +echo 't 34 -lt 222' +t 34 -lt 222 + +echo 't 200 -le 200' +t 200 -le 200 +echo 't 340 -le 222' +t 340 -le 222 + +echo 't 700 -le 1000 -a -n "1" -a "20" = "20"' +t 700 -le 1000 -a -n "1" -a "20" = "20" +echo 't ! \( 700 -le 1000 -a -n "1" -a "20" = "20" \)' +t ! \( 700 -le 1000 -a -n "1" -a "20" = "20" \) + +touch /tmp/abc +sleep 2 +touch /tmp/def + +echo 't /tmp/abc -nt /tmp/def' +t /tmp/abc -nt /tmp/def +echo 't /tmp/abc -ot /tmp/def' +t /tmp/abc -ot /tmp/def +echo 't /tmp/def -nt /tmp/abc' +t /tmp/def -nt /tmp/abc +echo 't /tmp/def -ot /tmp/abc' +t /tmp/def -ot /tmp/abc + +echo 't /tmp/abc -ef /tmp/def' +t /tmp/abc -ef /tmp/def +ln /tmp/abc /tmp/ghi +echo 't /tmp/abc -ef /tmp/ghi' +t /tmp/abc -ef /tmp/ghi + +rm /tmp/abc /tmp/def /tmp/ghi + +echo 't -r /dev/fd/0' +t -r /dev/fd/0 +echo 't -w /dev/fd/1' +t -w /dev/fd/1 +echo 't -w /dev/fd/2' +t -w /dev/fd/2 + +echo 't -r /dev/stdin' +t -r /dev/stdin +echo 't -w /dev/stdout' +t -w /dev/stdout +echo 't -w /dev/stderr' +t -w /dev/stderr + +echo 't' +t +echo 'b' +b + +echo 't 12 -eq 34' +t 12 -eq 34 +echo 't ! 12 -eq 34' +t ! 12 -eq 34 + +echo 't -n abcd -o aaa' +t -n abcd -o aaa +echo 't -n abcd -o -z aaa' +t -n abcd -o -z aaa + +echo 't -n abcd -a aaa' +t -n abcd -a aaa +echo 't -n abcd -a -z aaa' +t -n abcd -a -z aaa + +# test set or unset shell options +set +o allexport +echo 't -o allexport' +t -o allexport +echo 't ! -o allexport' +t ! -o allexport + +#test set or unset shell variables +unset unset +echo 't -v unset' +t -v unset +set= +echo 't -v set' +t -v set +set=set +echo 't -v set' +t -v set + +echo 't xx -a yy' +t xx -a yy +echo 't xx -o ""' +t xx -o "" +echo 't xx -a ""' +t xx -a "" + +echo 't -X -a -X' +t -X -a -X +echo 't -X -o -X' +t -X -o -X +echo 't -X -o ""' +t -X -o "" +echo 't -X -a ""' +t -X -a "" +echo 't "" -a -X' +t "" -a -X +echo 't "" -o -X' +t "" -o -X +echo 't "" -a ""' +t "" -a "" +echo 't "" -o ""' +t "" -o "" +echo 't true -o -X' +t true -o -X +echo 't true -a -X' +t true -a -X + +echo 't ( -E )' +t \( -E \) +echo 't ( "" )' +t \( "" \) + +z=42 + +echo 't ! -z "$z"' +t ! -z "$z" + +echo 't ! -n "$z"' +t ! -n "$z" + +zero= +echo 't "$zero"' +t "$zero" +echo 't ! "$zero"' +t ! "$zero" +echo 'b "$zero"' +b "$zero" +echo 'b ! "$zero"' +b ! "$zero" + +touch /tmp/test.group +chgrp ${GROUPS[0]} /tmp/test.group +echo 't -G /tmp/test.group' +t -G /tmp/test.group +rm /tmp/test.group + +case "${THIS_SH}" in +/*) SHNAME=${THIS_SH} ;; +*) SHNAME=${PWD}/${THIS_SH} ;; +esac + +if ln -s ${SHNAME} /tmp/test.symlink 2>/dev/null; then + chgrp ${GROUPS[0]} /tmp/test.symlink 2>/dev/null + echo 't -h /tmp/test.symlink' + t -h /tmp/test.symlink + # some systems don't let you remove this + rm -f /tmp/test.symlink 2>/dev/null +else + echo 't -h /tmp/test.symlink' + echo 0 +fi + +# arithmetic constant errors +echo "t 4+3 -eq 7" +t 4+3 -eq 7 +echo "b 4-5 -eq 7" +b 4+3 -eq 7 + +echo "t 9 -eq 4+5" +t 9 -eq 4+5 +echo "b 9 -eq 4+5" +b 9 -eq 4+5 + +A=7 +echo "t A -eq 7" +t A -eq 7 +echo "b A -eq 7" +b A -eq 7 + +B=9 +echo "t 9 -eq B" +t 9 -eq B +echo "b 9 -eq B" +b 9 -eq B + +# badly formed expressions +echo 't ( 1 = 2' +t \( 1 = 2 +echo 'b ( 1 = 2' +b \( 1 = 2 + +# more errors +t a b +t a b c +t -A v +# too many arguments -- argument expected is also reasonable +t 4 -eq 4 -a 2 -ne 5 -a 4 -ne +# too many arguments +t 4 -eq 4 -a 3 4 + +[ +echo $? + +t \( \) + +# non-numeric arguments to `test -t' should return failure -- fix in 2.05 +echo 't -t a' +t -t a +echo 't -t addsds' +t -t addsds +echo 't -t 42' +t -t 42 +echo 't -t /dev/tty' +t -t /dev/tty +echo 't -t /dev/tty4' +t -t /dev/tty4 +echo 't -t /dev/tty4444444...' +t -t /dev/tty4444444... + +# fixed in bash-4.0-beta +t -t ' ' + +${THIS_SH} ./test1.sub diff --git a/bash-5.1/tests/test1.sub b/bash-5.1/tests/test1.sub new file mode 100644 index 0000000000000000000000000000000000000000..d25e0dc7c8ac4ad46fcd3c9c08715c4b472c245c --- /dev/null +++ b/bash-5.1/tests/test1.sub @@ -0,0 +1,34 @@ +# 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 . +# +# some systems, like old SunOS, have stat on /dev/fd/N and fstat(N, ...) +# return different results +: ${TMPDIR:=/tmp} + +trap 'rm -f ${TMPDIR}/pipe' 0 1 2 3 6 15 + +exec 6>&- +echo "t -p /dev/fd/6" +test -p /dev/fd/6 +echo $? + +rm -f ${TMPDIR}/pipe 2>/dev/null +mkfifo ${TMPDIR}/pipe +cat < ${TMPDIR}/pipe & +exec 6>&- +exec 6>${TMPDIR}/pipe +echo "t -p /dev/fd/6" +test -p /dev/fd/6 +echo $? +exec 2>/dev/null # disable process termination message +kill $! 2>/dev/null diff --git a/bash-5.1/tests/tilde.right b/bash-5.1/tests/tilde.right new file mode 100644 index 0000000000000000000000000000000000000000..1301c0b07d5c570fb56c01d068d6ffde372ff0bd --- /dev/null +++ b/bash-5.1/tests/tilde.right @@ -0,0 +1,28 @@ +~chet +/usr/xyz/foo +~chet/foo +~chet/foo +~chet/bar +~chet/bar +~chet/bar +:~chet/ +abcd~chet +SHELL=~/bash +/usr/xyz/bash +abcd:~chet +/usr/ucb:/bin:/usr/xyz/bin:/usr/xyz/tmp/bin:/usr/bin +/usr +/tmp +/bin:/usr/bin:.:/usr/xyz/bin +/bin:/usr/bin:.:~/bin +/bin:/usr/bin:.:/usr/xyz/bin +/bin:/usr/bin:.:/usr/xyz/bin +/bin:/usr/bin:.:~/bin +/bin:/usr/bin:.:~/bin +\~ +ok 1 +ok 2 +ok 3 +~root +foo=bar:/usr/xyz +foo=bar:~ diff --git a/bash-5.1/tests/tilde.tests b/bash-5.1/tests/tilde.tests new file mode 100644 index 0000000000000000000000000000000000000000..374f3e6d6942340190fd736e4b9d5087e45ee413 --- /dev/null +++ b/bash-5.1/tests/tilde.tests @@ -0,0 +1,92 @@ +# 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 . +# +wdir=$PWD +# this is needed because posix mode restricts tilde expansion to assignment +# statements preceding a command, instead of the default of expanding all +# assignment statements on the line (e.g., after `export'). Without this, +# the next-to-last test fails +set +o posix + +HOME=/usr/xyz +SHELL=~/bash +echo ~ch\et +echo ~/"foo" +echo "~chet"/"foo" +echo \~chet/"foo" +echo \~chet/bar +echo ~\chet/bar +echo ~chet""/bar +echo ":~chet/" +echo abcd~chet +echo "SHELL=~/bash" +echo $SHELL +echo abcd:~chet +path=/usr/ucb:/bin:~/bin:~/tmp/bin:/usr/bin +echo $path + +cd /usr +cd /tmp +echo ~- +echo ~+ + +XPATH=/bin:/usr/bin:. + +# yes tilde expansion +PPATH=$XPATH:~/bin +echo "$PPATH" + +# no tilde expansion +PPATH="$XPATH:~/bin" +echo "$PPATH" + +# yes tilde expansion +export PPATH=$XPATH:~/bin +echo "$PPATH" +declare -x PPATH=$XPATH:~/bin +echo "$PPATH" + +# no tilde expansion +export PPATH="$XPATH:~/bin" +echo "$PPATH" +declare -x PPATH="$XPATH:~/bin" +echo "$PPATH" + +printf "%q\n" '~' + +# more tests of tilde expansion when executing case commands +case ~ in +$HOME) echo ok 1;; +*) echo bad 1 ;; +esac + +case ~ in +~) echo ok 2 ;; +\~) echo bad 2a ;; +*) echo bad 2b ;; +esac + +case $unset in +"") echo ok 3 ;; +*) echo bad 3 ;; +esac + +USER=root # should exist just about everywhere +echo ~$USER + +cd "$wdir" + +echo foo=bar:~ +set -o posix; echo foo=bar:~ + +exit 0 diff --git a/bash-5.1/tests/tilde2.right b/bash-5.1/tests/tilde2.right new file mode 100644 index 0000000000000000000000000000000000000000..fce04687e25265a2cfc6775f34075b25d0d55b1b --- /dev/null +++ b/bash-5.1/tests/tilde2.right @@ -0,0 +1,24 @@ +PATH=~/bin:/bin:/usr/bin:. +/usr/xyz/bin:~/bin2:/bin:/usr/bin:. +PATH=~/bin:~/bin2:/bin:/usr/bin:. +~/bin +~ +/usr/xyz +~ +~ +~ +argv[1] = <\a> +argv[1] = <\a> +/usr/xyz/bash +ok +~ +~ +make -k FOO=/usr/xyz/mumble +/usr/xyz/mumble +HOME=~ +HOME=~ +/usr/$x/abc +HOME=~ +/usr/$x/abc +HOME=/usr/$x/abc +/usr/$x/abc diff --git a/bash-5.1/tests/tilde2.tests b/bash-5.1/tests/tilde2.tests new file mode 100644 index 0000000000000000000000000000000000000000..cc5dba9f6cabfb764d925f270db945d5499c87d8 --- /dev/null +++ b/bash-5.1/tests/tilde2.tests @@ -0,0 +1,83 @@ +# 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 . +# +HOME=/usr/xyz +XPATH=/bin:/usr/bin:. + +ADDPATH=PATH=~/bin:$XPATH + +echo $ADDPATH + +unset ADDPATH +: ${ADDPATH:=~/bin:~/bin2:$XPATH} +echo $ADDPATH + +unset ADDPATH +: ${ADDPATH:=PATH=~/bin:~/bin2:$XPATH} +echo $ADDPATH + +cat << ! +~/bin +! + +echo "~" + +echo ${TPATH:-~} +echo "${TPATH:-~}" +echo "${TPATH:-"~"}" + +echo "${XPATH+~}" + +recho "\a" +recho "${TPATH:-\a}" + +SHELL=~/bash +echo $SHELL + +case $SHELL in +~/bash) echo ok;; +*) echo bad;; +esac + +somevar= +echo "${somevar:-~}" +echo "${somevar:-"~"}" + +echo make -k FOO=~/mumble + +typeset FOO=~/mumble +echo "$FOO" + +h=HOME=~ +echo $h + +export h=HOME=~ +echo $h + +x=1234 +HOME='/usr/$x/abc' + +echo ~ + +# behavior differs here in posix mode +set -o posix + +eval echo $h +eval $h +echo $HOME + +set +o posix + +eval echo $h +eval $h +echo $HOME diff --git a/bash-5.1/tests/trap.right b/bash-5.1/tests/trap.right new file mode 100644 index 0000000000000000000000000000000000000000..4338ff4cb292f6140e2b325dd28cfad29a471457 --- /dev/null +++ b/bash-5.1/tests/trap.right @@ -0,0 +1,115 @@ +subshell exit +trap -- 'echo exiting' EXIT +trap -- 'echo aborting' SIGHUP +trap -- 'echo aborting' SIGINT +trap -- 'echo aborting' SIGQUIT +trap -- 'echo aborting' SIGABRT +trap -- 'echo aborting' SIGTERM +[33] debug +debug line +[35] debug +trap -- 'echo exiting' EXIT +trap -- 'echo aborting' SIGHUP +trap -- 'echo aborting' SIGINT +trap -- 'echo aborting' SIGQUIT +trap -- 'echo aborting' SIGABRT +trap -- 'echo aborting' SIGTERM +trap -- 'echo [$LINENO] debug' DEBUG +[37] debug +func[29] funcdebug +funcdebug line +./trap.tests[39] funcdebug +trap -- 'echo exiting' EXIT +trap -- 'echo aborting' SIGHUP +trap -- 'echo aborting' SIGINT +trap -- 'echo aborting' SIGQUIT +trap -- 'echo aborting' SIGABRT +trap -- 'echo aborting' SIGTERM +trap -- 'echo ${FUNCNAME:-$0}[$LINENO] funcdebug' DEBUG +./trap.tests[41] funcdebug +./trap.tests[46] debug +./trap.tests[47] debug +func2[43] debug +func2[44] debug +func2debug line +./trap.tests[49] debug +./trap.tests[51] debug +trap -- 'echo exiting' EXIT +trap -- 'echo aborting' SIGHUP +trap -- 'echo aborting' SIGINT +trap -- 'echo aborting' SIGQUIT +trap -- 'echo aborting' SIGABRT +trap -- 'echo aborting' SIGTERM +trap -- '' DEBUG +trap -- 'echo exiting' EXIT +trap -- 'echo aborting' SIGHUP +trap -- 'echo aborting' SIGINT +trap -- 'echo aborting' SIGQUIT +trap -- 'echo aborting' SIGABRT +trap -- 'echo aborting' SIGTERM +trap -- 'echo exiting' EXIT +trap -- '' SIGINT +trap -- 'echo aborting' SIGQUIT +trap -- 'echo aborting' SIGABRT +trap -- 'echo aborting' SIGTERM +0 +trap -- '' SIGUSR2 +ERRTRAP +ERRTRAP +ERRTRAP +after falses +if negation ok +after negation +after while +before false in trap2a.sub +after false in trap2a.sub +command substitution +ERRTRAP +ERRTRAP +bar +ERRTRAP +ERRTRAP +ERRTRAP +ERRTRAP +ERRTRAP ++[6] echo 1 +1 ++[7] echo 2 +2 ++[8] false ++[8] false ++[8] false +++[8] echo trap: 8 +trap: 8 ++[9] echo 4 +4 +exit subshell 1 +current shell +exit subshell 2 +current shell +current shell +current shell +outside 1 +outside 2 +outside 3 +outside 4 +sleep 2 +wait $! +exit +in trap EXIT +sleep 2 +wait $! +exit +in trap EXIT +fn +after 1 +fn +after 2 +caught a child death +caught a child death +caught a child death +trap -- 'echo caught a child death' SIGCHLD +trap -- 'echo exiting' EXIT +trap -- 'echo aborting' SIGABRT +trap -- 'echo caught a child death' SIGCHLD +exiting diff --git a/bash-5.1/tests/trap.tests b/bash-5.1/tests/trap.tests new file mode 100644 index 0000000000000000000000000000000000000000..4f808be3e44aa5b675e7af20af5e5f33d9f5d714 --- /dev/null +++ b/bash-5.1/tests/trap.tests @@ -0,0 +1,114 @@ +# 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 . +# +# test the trap code + +trap 'echo exiting' 0 +trap 'echo aborting' 1 2 3 6 15 + +# make sure a user-specified subshell runs the exit trap, but does not +# inherit the exit trap from a parent shell +( trap 'echo subshell exit' 0; exit 0 ) +( exit 0 ) + +trap + +func() +{ + trap 'echo ${FUNCNAME:-$0}[$LINENO] funcdebug' DEBUG + echo funcdebug line +} + +trap 'echo [$LINENO] debug' DEBUG +echo debug line + +trap + +func + +trap + +trap 'echo ${FUNCNAME:-$0}[$LINENO] debug' DEBUG +func2() +{ + echo func2debug line +} +declare -ft func2 +func2 + +unset -f func2 + +trap '' DEBUG + +trap + +trap - debug + +trap + +trap - HUP +trap hup +trap '' INT +trap '' int + +trap + +# exit 0 in exit trap should set exit status +( +set -e +trap 'exit 0' EXIT +false +echo bad +) +echo $? + +# hmmm...should this set the handling to SIG_IGN for children, too? +trap '' USR2 +./trap1.sub +trap - USR2 + +# test ERR trap +./trap2.sub + +${THIS_SH} ./trap3.sub + +${THIS_SH} ./trap4.sub + +# This doesn't work right on all Unix versions +#${THIS_SH} ./trap5.sub + +# Return trap issues +${THIS_SH} ./trap6.sub + +# +# show that setting a trap on SIGCHLD is not disastrous. +# +set -o monitor + +trap 'echo caught a child death' SIGCHLD + +sleep 7 & sleep 6 & sleep 5 & + +# this will only catch the first, since there's a trap on SIGCHLD +wait + +trap -p SIGCHLD + +# Now reset some of the signals the shell handles specially back to +# their default values (with or without the SIG prefix) +trap - SIGINT QUIT TERM + +trap + +trap - SIGCHLD +wait diff --git a/bash-5.1/tests/trap1.sub b/bash-5.1/tests/trap1.sub new file mode 100755 index 0000000000000000000000000000000000000000..48f8530229222f7041bb2e323754a6ca7eaa3b1d --- /dev/null +++ b/bash-5.1/tests/trap1.sub @@ -0,0 +1,4 @@ +# signals ignored at shell startup cannot be trapped or reset +trap 'echo USR2' USR2 + +trap -p USR2 diff --git a/bash-5.1/tests/trap2.sub b/bash-5.1/tests/trap2.sub new file mode 100755 index 0000000000000000000000000000000000000000..bd9a76be84c774e950ccd3a4450f9962e75b8eab --- /dev/null +++ b/bash-5.1/tests/trap2.sub @@ -0,0 +1,62 @@ +# 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 . +# +set +e +trap 'echo ERRTRAP' ERR + +false +false +false + +echo after falses + +if ! false; then + echo if negation ok +fi + +! false +echo after negation + +while false; do + echo while negation ok +done + +echo after while + +./trap2a.sub + +echo $(false ; echo command substitution) + +# test behavior of failed commands following `command' builtin +command false + +(command false) +command false | echo bar + +(false) + +exit 42 | command false + +command command command false + +unset FALSE +if [ -x /bin/false ]; then + FALSE=/bin/false +elif [ -x /usr/bin/false ]; then + FALSE=/usr/bin/false +else + FALSE='command false' +fi + +command $FALSE +command command command $FALSE diff --git a/bash-5.1/tests/trap2a.sub b/bash-5.1/tests/trap2a.sub new file mode 100755 index 0000000000000000000000000000000000000000..44d6b50ef1944c252d9bc79333ddfe4db84a494c --- /dev/null +++ b/bash-5.1/tests/trap2a.sub @@ -0,0 +1,3 @@ +echo before false in trap2a.sub +false +echo after false in trap2a.sub diff --git a/bash-5.1/tests/trap3.sub b/bash-5.1/tests/trap3.sub new file mode 100644 index 0000000000000000000000000000000000000000..1490a76bb60cc9f5168bd7907e1b36415321ecec --- /dev/null +++ b/bash-5.1/tests/trap3.sub @@ -0,0 +1,9 @@ +PS4='+[$LINENO] ' +trap 'echo trap: $LINENO' ERR + +set -x + +echo 1 +echo 2 +false | false | false +echo 4 diff --git a/bash-5.1/tests/trap4.sub b/bash-5.1/tests/trap4.sub new file mode 100644 index 0000000000000000000000000000000000000000..c84b54e1ebaf9cd29df09ca1ac5a7d22688f3c7f --- /dev/null +++ b/bash-5.1/tests/trap4.sub @@ -0,0 +1,55 @@ +# 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 . +# +# make sure subshells at the end of pipelines run any exit traps they set + +: | { trap 'echo exit subshell 1' EXIT; exit; }; echo current shell + +: | { trap 'echo exit subshell 2' EXIT; exit; }; echo current shell + +: | { trap 'echo exit subshell 3' EXIT; exit; } | : ; echo current shell + +: | { trap 'echo exit subshell 4' EXIT; exit; } | : ; echo current shell + +trap 'echo inherited exit trap' EXIT +: | { exit; } ; echo outside 1 +: | ( exit; ) ; echo outside 2 +: | { exit; } | : ; echo outside 3 +: | ( exit; ) | : ; echo outside 4 + +trap - EXIT + +# make sure group commands that are not at the beginning or end of pipelines +# run an EXIT trap, with and without the exit builtin +echo ignored | +{ + trap 'echo "in trap EXIT">&2' EXIT + sleep 4 & + echo 'sleep 2'>&2 + sleep 2 + echo 'wait $!'>&2 + wait $! + echo 'exit'>&2 + exit +} | cat + +echo ignored | +{ + trap 'echo "in trap EXIT">&2' EXIT + sleep 4 & + echo 'sleep 2'>&2 + sleep 2 + echo 'wait $!'>&2 + wait $! + echo 'exit'>&2 +} | cat diff --git a/bash-5.1/tests/trap5.sub b/bash-5.1/tests/trap5.sub new file mode 100644 index 0000000000000000000000000000000000000000..826b794cdfc28ef695e922542fce2055a7b2815c --- /dev/null +++ b/bash-5.1/tests/trap5.sub @@ -0,0 +1,31 @@ +# 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 . +# +# make sure process substitution runs the exit trap +[[ -n $(< <(trap "cat /dev/fd/0" EXIT)) ]] <<. +# +set -o functrace +fn() { return; } + +trap "echo fn ; fn" RETURN + +fn +echo after 1 + +unset -f fn + +fn() { eval return; } +fn +echo after 2 + +unset -f fn diff --git a/bash-5.1/tests/type.right b/bash-5.1/tests/type.right new file mode 100644 index 0000000000000000000000000000000000000000..f876715a048ec6e977012bf3c4820aca9ce7ce53 --- /dev/null +++ b/bash-5.1/tests/type.right @@ -0,0 +1,135 @@ +./type.tests: line 22: type: -r: invalid option +type: usage: type [-afptP] name [name ...] +./type.tests: line 25: type: notthere: not found +function +keyword +builtin +file +file +file +func is a function +func () +{ + echo this is func +} +while is a shell keyword +while is a shell keyword +builtin is a shell builtin +/bin/sh is /bin/sh +func +func is a function +func () +{ + echo this is func +} +while +while is a shell keyword +./type.tests: line 56: type: m: not found +alias m='more' +alias m='more' +m is aliased to `more' +alias +alias m='more' +alias m='more' +alias m='more' +m is aliased to `more' +builtin +builtin is a shell builtin +/bin/sh +/bin/sh is /bin/sh +./type.tests: line 78: type: func: not found +./type.tests: line 80: type: m: not found +/bin/sh +/tmp/bash +bash is hashed (/tmp/bash) +file +hits command + 1 /bin/sh + 3 /tmp/bash +f is a function +f () +{ + v='^A' +} +foo is a function +foo () +{ + echo $(> ${f} +file +EOF + + done + grep . a b c +} +a:file +b:file +c:file +bb is a function +bb () +{ + ( cat <. +# +set +o posix + +hash -r +unalias -a + +# this should echo nothing +type +# this should be a usage error +type -r ${THIS_SH} + +# these should behave identically +type notthere +command -v notthere + +alias m=more + +unset -f func 2>/dev/null +func() { echo this is func; } + +type -t func +type -t while +type -t builtin +type -t /bin/sh +type -t ${THIS_SH} +type -t mv + +type func +# the following two should produce identical output +type while +type -a while +type builtin +type /bin/sh + +command -v func +command -V func +command -v while +command -V while + +# the following two lines should produce the same output +# post-3.0 patch makes command -v silent, as posix specifies +# first test with alias expansion off (should all fail or produce no output) +type -t m +type m +command -v m +alias -p +alias m + +# then test with alias expansion on +shopt -s expand_aliases +type m +type -t m +command -v m +alias -p +alias m + +command -V m +shopt -u expand_aliases + +command -v builtin +command -V builtin +command -v /bin/sh +command -V /bin/sh + +unset -f func +type func +unalias m +type m + +hash -r + +hash -p /bin/sh sh +type -p sh + +SHBASE=${THIS_SH##*/} +hash -p /tmp/$SHBASE $SHBASE +type -p $SHBASE +type $SHBASE + +type -t $SHBASE + +# make sure the hash table looks right +hash + +# bug in versions of bash up to and including bash-3.2 +f() { + v=$'\001' + } + +type f | cat -v + +${THIS_SH} type1.sub + +${THIS_SH} type2.sub + +${THIS_SH} type3.sub + +${THIS_SH} type4.sub diff --git a/bash-5.1/tests/type1.sub b/bash-5.1/tests/type1.sub new file mode 100644 index 0000000000000000000000000000000000000000..95f96aeaa7203365a2569daeb93894bd1b3250b1 --- /dev/null +++ b/bash-5.1/tests/type1.sub @@ -0,0 +1,10 @@ +foo() +{ + echo $(. +# +foo() +{ + echo + cat <. +# +cd ${TMPDIR:-/tmp} + +foo() { + rm -f a b c + for f in a b c; do + cat <<-EOF >> ${f} + file + EOF + done + grep . a b c +} + +type foo + +eval "$(type foo | sed 1d)" +foo + +rm -f a b c + +cd $OLDPWD +exit 0 diff --git a/bash-5.1/tests/type4.sub b/bash-5.1/tests/type4.sub new file mode 100644 index 0000000000000000000000000000000000000000..937f9980cc6c249b685fe6d46e8bc6dab8aec9fd --- /dev/null +++ b/bash-5.1/tests/type4.sub @@ -0,0 +1,56 @@ +# 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 . +# +bb() +{ + ( + cat << EOF +foo +bar +EOF + ) + echo after subshell +} + +type bb + + +mkcoprocs() +{ + coproc a { cat <. +# +unset LC_ALL + +ErrorCnt=0 +TestCnt=0 + + function check_valid_var_name { + case "${1:?Missing Variable Name}" in + [!a-zA-Z_]* | *[!a-zA-Z_0-9]* ) return 3;; + esac + } + # get_array_element VariableName ArrayName ArrayElement + function get_array_element { + check_valid_var_name "${1:?Missing Variable Name}" || return $? + check_valid_var_name "${2:?Missing Array Name}" || return $? + eval "${1}"'="${'"${2}"'["${3:?Missing Array Index}"]}"' + } + # unset_array_element VarName ArrayName + function get_array_element_cnt { + check_valid_var_name "${1:?Missing Variable Name}" || return $? + check_valid_var_name "${2:?Missing Array Name}" || return $? + eval "${1}"'="${#'"${2}"'[@]}"' + } + + +function TestCodePage { + local TargetCharset="${1:?Missing Test charset}" + local EChar RChar TCnt + get_array_element_cnt TCnt "${2:?Missing Array Name}" + for (( x=1 ; x<${TCnt} ; x++ )); do + get_array_element EChar "${2}" ${x} + if [ -n "${EChar}" ]; then + let TestCnt+=1 + printf -v UVal '\\U%08x' "${x}" + LC_CTYPE=${TargetCharset} printf -v RChar "${UVal}" 2>/dev/null + if [ "${EChar}" != "${RChar}" ]; then + let ErrorCnt+=1 + printf "${TargetCharset}: Error Encoding U+%08X to ${TL} [ \"%q\" != \"%q\" ]\n" "${x}" "${EChar}" "${RChar}" + fi + fi + done +} + + +#for ((x=1;x<255;x++)); do printf ' [0x%04x]=$'\''\%03o'\' $x $x ; [ $(($x%5)) = 0 ] && echo; done +fr_FR_ISO_8859_1=( + [0x0001]=$'\001' [0x0002]=$'\002' [0x0003]=$'\003' [0x0004]=$'\004' [0x0005]=$'\005' + [0x0006]=$'\006' [0x0007]=$'\007' [0x0008]=$'\010' [0x0009]=$'\011' [0x000a]=$'\012' + [0x000b]=$'\013' [0x000c]=$'\014' [0x000d]=$'\015' [0x000e]=$'\016' [0x000f]=$'\017' + [0x0010]=$'\020' [0x0011]=$'\021' [0x0012]=$'\022' [0x0013]=$'\023' [0x0014]=$'\024' + [0x0015]=$'\025' [0x0016]=$'\026' [0x0017]=$'\027' [0x0018]=$'\030' [0x0019]=$'\031' + [0x001a]=$'\032' [0x001b]=$'\033' [0x001c]=$'\034' [0x001d]=$'\035' [0x001e]=$'\036' + [0x001f]=$'\037' [0x0020]=$'\040' [0x0021]=$'\041' [0x0022]=$'\042' [0x0023]=$'\043' + [0x0024]=$'\044' [0x0025]=$'\045' [0x0026]=$'\046' [0x0027]=$'\047' [0x0028]=$'\050' + [0x0029]=$'\051' [0x002a]=$'\052' [0x002b]=$'\053' [0x002c]=$'\054' [0x002d]=$'\055' + [0x002e]=$'\056' [0x002f]=$'\057' [0x0030]=$'\060' [0x0031]=$'\061' [0x0032]=$'\062' + [0x0033]=$'\063' [0x0034]=$'\064' [0x0035]=$'\065' [0x0036]=$'\066' [0x0037]=$'\067' + [0x0038]=$'\070' [0x0039]=$'\071' [0x003a]=$'\072' [0x003b]=$'\073' [0x003c]=$'\074' + [0x003d]=$'\075' [0x003e]=$'\076' [0x003f]=$'\077' [0x0040]=$'\100' [0x0041]=$'\101' + [0x0042]=$'\102' [0x0043]=$'\103' [0x0044]=$'\104' [0x0045]=$'\105' [0x0046]=$'\106' + [0x0047]=$'\107' [0x0048]=$'\110' [0x0049]=$'\111' [0x004a]=$'\112' [0x004b]=$'\113' + [0x004c]=$'\114' [0x004d]=$'\115' [0x004e]=$'\116' [0x004f]=$'\117' [0x0050]=$'\120' + [0x0051]=$'\121' [0x0052]=$'\122' [0x0053]=$'\123' [0x0054]=$'\124' [0x0055]=$'\125' + [0x0056]=$'\126' [0x0057]=$'\127' [0x0058]=$'\130' [0x0059]=$'\131' [0x005a]=$'\132' + [0x005b]=$'\133' [0x005c]=$'\134' [0x005d]=$'\135' [0x005e]=$'\136' [0x005f]=$'\137' + [0x0060]=$'\140' [0x0061]=$'\141' [0x0062]=$'\142' [0x0063]=$'\143' [0x0064]=$'\144' + [0x0065]=$'\145' [0x0066]=$'\146' [0x0067]=$'\147' [0x0068]=$'\150' [0x0069]=$'\151' + [0x006a]=$'\152' [0x006b]=$'\153' [0x006c]=$'\154' [0x006d]=$'\155' [0x006e]=$'\156' + [0x006f]=$'\157' [0x0070]=$'\160' [0x0071]=$'\161' [0x0072]=$'\162' [0x0073]=$'\163' + [0x0074]=$'\164' [0x0075]=$'\165' [0x0076]=$'\166' [0x0077]=$'\167' [0x0078]=$'\170' + [0x0079]=$'\171' [0x007a]=$'\172' [0x007b]=$'\173' [0x007c]=$'\174' [0x007d]=$'\175' + [0x007e]=$'\176' [0x007f]=$'\177' [0x0080]=$'\200' [0x0081]=$'\201' [0x0082]=$'\202' + [0x0083]=$'\203' [0x0084]=$'\204' [0x0085]=$'\205' [0x0086]=$'\206' [0x0087]=$'\207' + [0x0088]=$'\210' [0x0089]=$'\211' [0x008a]=$'\212' [0x008b]=$'\213' [0x008c]=$'\214' + [0x008d]=$'\215' [0x008e]=$'\216' [0x008f]=$'\217' [0x0090]=$'\220' [0x0091]=$'\221' + [0x0092]=$'\222' [0x0093]=$'\223' [0x0094]=$'\224' [0x0095]=$'\225' [0x0096]=$'\226' + [0x0097]=$'\227' [0x0098]=$'\230' [0x0099]=$'\231' [0x009a]=$'\232' [0x009b]=$'\233' + [0x009c]=$'\234' [0x009d]=$'\235' [0x009e]=$'\236' [0x009f]=$'\237' [0x00a0]=$'\240' + [0x00a1]=$'\241' [0x00a2]=$'\242' [0x00a3]=$'\243' [0x00a4]=$'\244' [0x00a5]=$'\245' + [0x00a6]=$'\246' [0x00a7]=$'\247' [0x00a8]=$'\250' [0x00a9]=$'\251' [0x00aa]=$'\252' + [0x00ab]=$'\253' [0x00ac]=$'\254' [0x00ad]=$'\255' [0x00ae]=$'\256' [0x00af]=$'\257' + [0x00b0]=$'\260' [0x00b1]=$'\261' [0x00b2]=$'\262' [0x00b3]=$'\263' [0x00b4]=$'\264' + [0x00b5]=$'\265' [0x00b6]=$'\266' [0x00b7]=$'\267' [0x00b8]=$'\270' [0x00b9]=$'\271' + [0x00ba]=$'\272' [0x00bb]=$'\273' [0x00bc]=$'\274' [0x00bd]=$'\275' [0x00be]=$'\276' + [0x00bf]=$'\277' [0x00c0]=$'\300' [0x00c1]=$'\301' [0x00c2]=$'\302' [0x00c3]=$'\303' + [0x00c4]=$'\304' [0x00c5]=$'\305' [0x00c6]=$'\306' [0x00c7]=$'\307' [0x00c8]=$'\310' + [0x00c9]=$'\311' [0x00ca]=$'\312' [0x00cb]=$'\313' [0x00cc]=$'\314' [0x00cd]=$'\315' + [0x00ce]=$'\316' [0x00cf]=$'\317' [0x00d0]=$'\320' [0x00d1]=$'\321' [0x00d2]=$'\322' + [0x00d3]=$'\323' [0x00d4]=$'\324' [0x00d5]=$'\325' [0x00d6]=$'\326' [0x00d7]=$'\327' + [0x00d8]=$'\330' [0x00d9]=$'\331' [0x00da]=$'\332' [0x00db]=$'\333' [0x00dc]=$'\334' + [0x00dd]=$'\335' [0x00de]=$'\336' [0x00df]=$'\337' [0x00e0]=$'\340' [0x00e1]=$'\341' + [0x00e2]=$'\342' [0x00e3]=$'\343' [0x00e4]=$'\344' [0x00e5]=$'\345' [0x00e6]=$'\346' + [0x00e7]=$'\347' [0x00e8]=$'\350' [0x00e9]=$'\351' [0x00ea]=$'\352' [0x00eb]=$'\353' + [0x00ec]=$'\354' [0x00ed]=$'\355' [0x00ee]=$'\356' [0x00ef]=$'\357' [0x00f0]=$'\360' + [0x00f1]=$'\361' [0x00f2]=$'\362' [0x00f3]=$'\363' [0x00f4]=$'\364' [0x00f5]=$'\365' + [0x00f6]=$'\366' [0x00f7]=$'\367' [0x00f8]=$'\370' [0x00f9]=$'\371' [0x00fa]=$'\372' + [0x00fb]=$'\373' [0x00fc]=$'\374' [0x00fd]=$'\375' [0x00fe]=$'\376' +) + +TestCodePage fr_FR.ISO8859-1 fr_FR_ISO_8859_1 + +zh_TW_BIG5=( + [0x00f6]=$'\366' [0x00f7]=$'\367' [0x00f8]=$'\370' [0x00f9]=$'\371' [0x00fa]=$'\372' + [0x00fb]=$'\373' [0x00fc]=$'\374' [0x00fd]=$'\375' [0x00fe]=$'\376' +) +TestCodePage zh_TW.BIG5 zh_TW_BIG5 + +jp_JP_SHIFT_JIS=( + [0x0001]=$'\x01' # START OF HEADING + [0x0002]=$'\x02' # START OF TEXT + [0x0003]=$'\x03' # END OF TEXT + [0x0004]=$'\x04' # END OF TRANSMISSION + [0x0005]=$'\x05' # ENQUIRY + [0x0006]=$'\x06' # ACKNOWLEDGE + [0x0007]=$'\x07' # BELL + [0x0008]=$'\x08' # BACKSPACE + [0x0009]=$'\x09' # HORIZONTAL TABULATION + [0x000A]=$'\x0A' # LINE FEED + [0x000B]=$'\x0B' # VERTICAL TABULATION + [0x000C]=$'\x0C' # FORM FEED + [0x000D]=$'\x0D' # CARRIAGE RETURN + [0x000E]=$'\x0E' # SHIFT OUT + [0x000F]=$'\x0F' # SHIFT IN + [0x0010]=$'\x10' # DATA LINK ESCAPE + [0x0011]=$'\x11' # DEVICE CONTROL ONE + [0x0012]=$'\x12' # DEVICE CONTROL TWO + [0x0013]=$'\x13' # DEVICE CONTROL THREE + [0x0014]=$'\x14' # DEVICE CONTROL FOUR + [0x0015]=$'\x15' # NEGATIVE ACKNOWLEDGE + [0x0016]=$'\x16' # SYNCHRONOUS IDLE + [0x0017]=$'\x17' # END OF TRANSMISSION BLOCK + [0x0018]=$'\x18' # CANCEL + [0x0019]=$'\x19' # END OF MEDIUM + [0x001A]=$'\x1A' # SUBSTITUTE + [0x001B]=$'\x1B' # ESCAPE + [0x001C]=$'\x1C' # FILE SEPARATOR + [0x001D]=$'\x1D' # GROUP SEPARATOR + [0x001E]=$'\x1E' # RECORD SEPARATOR + [0x001F]=$'\x1F' # UNIT SEPARATOR + [0x0020]=$'\x20' # SPACE + [0x0021]=$'\x21' # EXCLAMATION MARK + [0x0022]=$'\x22' # QUOTATION MARK + [0x0023]=$'\x23' # NUMBER SIGN + [0x0024]=$'\x24' # DOLLAR SIGN + [0x0025]=$'\x25' # PERCENT SIGN + [0x0026]=$'\x26' # AMPERSAND + [0x0027]=$'\x27' # APOSTROPHE + [0x0028]=$'\x28' # LEFT PARENTHESIS + [0x0029]=$'\x29' # RIGHT PARENTHESIS + [0x002A]=$'\x2A' # ASTERISK + [0x002B]=$'\x2B' # PLUS SIGN + [0x002C]=$'\x2C' # COMMA + [0x002D]=$'\x2D' # HYPHEN-MINUS + [0x002E]=$'\x2E' # FULL STOP + [0x002F]=$'\x2F' # SOLIDUS + [0x0030]=$'\x30' # DIGIT ZERO + [0x0031]=$'\x31' # DIGIT ONE + [0x0032]=$'\x32' # DIGIT TWO + [0x0033]=$'\x33' # DIGIT THREE + [0x0034]=$'\x34' # DIGIT FOUR + [0x0035]=$'\x35' # DIGIT FIVE + [0x0036]=$'\x36' # DIGIT SIX + [0x0037]=$'\x37' # DIGIT SEVEN + [0x0038]=$'\x38' # DIGIT EIGHT + [0x0039]=$'\x39' # DIGIT NINE + [0x003A]=$'\x3A' # COLON + [0x003B]=$'\x3B' # SEMICOLON + [0x003C]=$'\x3C' # LESS-THAN SIGN + [0x003D]=$'\x3D' # EQUALS SIGN + [0x003E]=$'\x3E' # GREATER-THAN SIGN + [0x003F]=$'\x3F' # QUESTION MARK + [0x0040]=$'\x40' # COMMERCIAL AT + [0x0041]=$'\x41' # LATIN CAPITAL LETTER A + [0x0042]=$'\x42' # LATIN CAPITAL LETTER B + [0x0043]=$'\x43' # LATIN CAPITAL LETTER C + [0x0044]=$'\x44' # LATIN CAPITAL LETTER D + [0x0045]=$'\x45' # LATIN CAPITAL LETTER E + [0x0046]=$'\x46' # LATIN CAPITAL LETTER F + [0x0047]=$'\x47' # LATIN CAPITAL LETTER G + [0x0048]=$'\x48' # LATIN CAPITAL LETTER H + [0x0049]=$'\x49' # LATIN CAPITAL LETTER I + [0x004A]=$'\x4A' # LATIN CAPITAL LETTER J + [0x004B]=$'\x4B' # LATIN CAPITAL LETTER K + [0x004C]=$'\x4C' # LATIN CAPITAL LETTER L + [0x004D]=$'\x4D' # LATIN CAPITAL LETTER M + [0x004E]=$'\x4E' # LATIN CAPITAL LETTER N + [0x004F]=$'\x4F' # LATIN CAPITAL LETTER O + [0x0050]=$'\x50' # LATIN CAPITAL LETTER P + [0x0051]=$'\x51' # LATIN CAPITAL LETTER Q + [0x0052]=$'\x52' # LATIN CAPITAL LETTER R + [0x0053]=$'\x53' # LATIN CAPITAL LETTER S + [0x0054]=$'\x54' # LATIN CAPITAL LETTER T + [0x0055]=$'\x55' # LATIN CAPITAL LETTER U + [0x0056]=$'\x56' # LATIN CAPITAL LETTER V + [0x0057]=$'\x57' # LATIN CAPITAL LETTER W + [0x0058]=$'\x58' # LATIN CAPITAL LETTER X + [0x0059]=$'\x59' # LATIN CAPITAL LETTER Y + [0x005A]=$'\x5A' # LATIN CAPITAL LETTER Z + [0x005B]=$'\x5B' # LEFT SQUARE BRACKET + [0x005C]=$'\x5C' # REVERSE SOLIDUS (YEN SIGN) + [0x005D]=$'\x5D' # RIGHT SQUARE BRACKET + [0x005E]=$'\x5E' # CIRCUMFLEX ACCENT + [0x005F]=$'\x5F' # LOW LINE + [0x0060]=$'\x60' # GRAVE ACCENT + [0x0061]=$'\x61' # LATIN SMALL LETTER A + [0x0062]=$'\x62' # LATIN SMALL LETTER B + [0x0063]=$'\x63' # LATIN SMALL LETTER C + [0x0064]=$'\x64' # LATIN SMALL LETTER D + [0x0065]=$'\x65' # LATIN SMALL LETTER E + [0x0066]=$'\x66' # LATIN SMALL LETTER F + [0x0067]=$'\x67' # LATIN SMALL LETTER G + [0x0068]=$'\x68' # LATIN SMALL LETTER H + [0x0069]=$'\x69' # LATIN SMALL LETTER I + [0x006A]=$'\x6A' # LATIN SMALL LETTER J + [0x006B]=$'\x6B' # LATIN SMALL LETTER K + [0x006C]=$'\x6C' # LATIN SMALL LETTER L + [0x006D]=$'\x6D' # LATIN SMALL LETTER M + [0x006E]=$'\x6E' # LATIN SMALL LETTER N + [0x006F]=$'\x6F' # LATIN SMALL LETTER O + [0x0070]=$'\x70' # LATIN SMALL LETTER P + [0x0071]=$'\x71' # LATIN SMALL LETTER Q + [0x0072]=$'\x72' # LATIN SMALL LETTER R + [0x0073]=$'\x73' # LATIN SMALL LETTER S + [0x0074]=$'\x74' # LATIN SMALL LETTER T + [0x0075]=$'\x75' # LATIN SMALL LETTER U + [0x0076]=$'\x76' # LATIN SMALL LETTER V + [0x0077]=$'\x77' # LATIN SMALL LETTER W + [0x0078]=$'\x78' # LATIN SMALL LETTER X + [0x0079]=$'\x79' # LATIN SMALL LETTER Y + [0x007A]=$'\x7A' # LATIN SMALL LETTER Z + [0x007B]=$'\x7B' # LEFT CURLY BRACKET + [0x007C]=$'\x7C' # VERTICAL LINE + [0x007D]=$'\x7D' # RIGHT CURLY BRACKET + [0x007E]=$'\x7E' # TILDE + [0x007F]=$'\x7F' # DELETE + [0xFF61]=$'\xA1' # HALFWIDTH IDEOGRAPHIC FULL STOP + [0xFF62]=$'\xA2' # HALFWIDTH LEFT CORNER BRACKET + [0xFF63]=$'\xA3' # HALFWIDTH RIGHT CORNER BRACKET + [0xFF64]=$'\xA4' # HALFWIDTH IDEOGRAPHIC COMMA + [0xFF65]=$'\xA5' # HALFWIDTH KATAKANA MIDDLE DOT + [0xFF66]=$'\xA6' # HALFWIDTH KATAKANA LETTER WO + [0xFF67]=$'\xA7' # HALFWIDTH KATAKANA LETTER SMALL A + [0xFF68]=$'\xA8' # HALFWIDTH KATAKANA LETTER SMALL I + [0xFF69]=$'\xA9' # HALFWIDTH KATAKANA LETTER SMALL U + [0xFF6A]=$'\xAA' # HALFWIDTH KATAKANA LETTER SMALL E + [0xFF6B]=$'\xAB' # HALFWIDTH KATAKANA LETTER SMALL O + [0xFF6C]=$'\xAC' # HALFWIDTH KATAKANA LETTER SMALL YA + [0xFF6D]=$'\xAD' # HALFWIDTH KATAKANA LETTER SMALL YU + [0xFF6E]=$'\xAE' # HALFWIDTH KATAKANA LETTER SMALL YO + [0xFF6F]=$'\xAF' # HALFWIDTH KATAKANA LETTER SMALL TU + [0xFF70]=$'\xB0' # HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK + [0xFF71]=$'\xB1' # HALFWIDTH KATAKANA LETTER A + [0xFF72]=$'\xB2' # HALFWIDTH KATAKANA LETTER I + [0xFF73]=$'\xB3' # HALFWIDTH KATAKANA LETTER U + [0xFF74]=$'\xB4' # HALFWIDTH KATAKANA LETTER E + [0xFF75]=$'\xB5' # HALFWIDTH KATAKANA LETTER O + [0xFF76]=$'\xB6' # HALFWIDTH KATAKANA LETTER KA + [0xFF77]=$'\xB7' # HALFWIDTH KATAKANA LETTER KI + [0xFF78]=$'\xB8' # HALFWIDTH KATAKANA LETTER KU + [0xFF79]=$'\xB9' # HALFWIDTH KATAKANA LETTER KE + [0xFF7A]=$'\xBA' # HALFWIDTH KATAKANA LETTER KO + [0xFF7B]=$'\xBB' # HALFWIDTH KATAKANA LETTER SA + [0xFF7C]=$'\xBC' # HALFWIDTH KATAKANA LETTER SI + [0xFF7D]=$'\xBD' # HALFWIDTH KATAKANA LETTER SU + [0xFF7E]=$'\xBE' # HALFWIDTH KATAKANA LETTER SE + [0xFF7F]=$'\xBF' # HALFWIDTH KATAKANA LETTER SO + [0xFF80]=$'\xC0' # HALFWIDTH KATAKANA LETTER TA + [0xFF81]=$'\xC1' # HALFWIDTH KATAKANA LETTER TI + [0xFF82]=$'\xC2' # HALFWIDTH KATAKANA LETTER TU + [0xFF83]=$'\xC3' # HALFWIDTH KATAKANA LETTER TE + [0xFF84]=$'\xC4' # HALFWIDTH KATAKANA LETTER TO + [0xFF85]=$'\xC5' # HALFWIDTH KATAKANA LETTER NA + [0xFF86]=$'\xC6' # HALFWIDTH KATAKANA LETTER NI + [0xFF87]=$'\xC7' # HALFWIDTH KATAKANA LETTER NU + [0xFF88]=$'\xC8' # HALFWIDTH KATAKANA LETTER NE + [0xFF89]=$'\xC9' # HALFWIDTH KATAKANA LETTER NO + [0xFF8A]=$'\xCA' # HALFWIDTH KATAKANA LETTER HA + [0xFF8B]=$'\xCB' # HALFWIDTH KATAKANA LETTER HI + [0xFF8C]=$'\xCC' # HALFWIDTH KATAKANA LETTER HU + [0xFF8D]=$'\xCD' # HALFWIDTH KATAKANA LETTER HE + [0xFF8E]=$'\xCE' # HALFWIDTH KATAKANA LETTER HO + [0xFF8F]=$'\xCF' # HALFWIDTH KATAKANA LETTER MA + [0xFF90]=$'\xD0' # HALFWIDTH KATAKANA LETTER MI + [0xFF91]=$'\xD1' # HALFWIDTH KATAKANA LETTER MU + [0xFF92]=$'\xD2' # HALFWIDTH KATAKANA LETTER ME + [0xFF93]=$'\xD3' # HALFWIDTH KATAKANA LETTER MO + [0xFF94]=$'\xD4' # HALFWIDTH KATAKANA LETTER YA + [0xFF95]=$'\xD5' # HALFWIDTH KATAKANA LETTER YU + [0xFF96]=$'\xD6' # HALFWIDTH KATAKANA LETTER YO + [0xFF97]=$'\xD7' # HALFWIDTH KATAKANA LETTER RA + [0xFF98]=$'\xD8' # HALFWIDTH KATAKANA LETTER RI + [0xFF99]=$'\xD9' # HALFWIDTH KATAKANA LETTER RU + [0xFF9A]=$'\xDA' # HALFWIDTH KATAKANA LETTER RE + [0xFF9B]=$'\xDB' # HALFWIDTH KATAKANA LETTER RO + [0xFF9C]=$'\xDC' # HALFWIDTH KATAKANA LETTER WA + [0xFF9D]=$'\xDD' # HALFWIDTH KATAKANA LETTER N + [0xFF9E]=$'\xDE' # HALFWIDTH KATAKANA VOICED SOUND MARK + [0xFF9F]=$'\xDF' # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK +) +#TestCodePage ja_JP.SHIFT_JIS jp_JP_SHIFT_JIS +TestCodePage ja_JP.SJIS jp_JP_SHIFT_JIS + +#for ((x=1;x<1000;x++)); do printf ' [0x%04x]=%-11q' "$x" "$(printf "$(printf '\\U%08x' $x)")" ; [ $(($x%5)) = 0 ] && echo; done +C_UTF_8=( + [0x0001]=$'\001' [0x0002]=$'\002' [0x0003]=$'\003' [0x0004]=$'\004' [0x0005]=$'\005' + [0x0006]=$'\006' [0x0007]=$'\a' [0x0008]=$'\b' [0x0009]=$'\t' [0x000a]='' + [0x000b]=$'\v' [0x000c]=$'\f' [0x000d]=$'\r' [0x000e]=$'\016' [0x000f]=$'\017' + [0x0010]=$'\020' [0x0011]=$'\021' [0x0012]=$'\022' [0x0013]=$'\023' [0x0014]=$'\024' + [0x0015]=$'\025' [0x0016]=$'\026' [0x0017]=$'\027' [0x0018]=$'\030' [0x0019]=$'\031' + [0x001a]=$'\032' [0x001b]=$'\E' [0x001c]=$'\034' [0x001d]=$'\035' [0x001e]=$'\036' + [0x001f]=$'\037' [0x0020]=\ [0x0021]=\! [0x0022]=\" [0x0023]=\# + [0x0024]=\$ [0x0025]=% [0x0026]=\& [0x0027]=\' [0x0028]=\( + [0x0029]=\) [0x002a]=\* [0x002b]=+ [0x002c]=\, [0x002d]=- + [0x002e]=. [0x002f]=/ [0x0030]=0 [0x0031]=1 [0x0032]=2 + [0x0033]=3 [0x0034]=4 [0x0035]=5 [0x0036]=6 [0x0037]=7 + [0x0038]=8 [0x0039]=9 [0x003a]=: [0x003b]=\; [0x003c]=\< + [0x003d]== [0x003e]=\> [0x003f]=\? [0x0040]=@ [0x0041]=A + [0x0042]=B [0x0043]=C [0x0044]=D [0x0045]=E [0x0046]=F + [0x0047]=G [0x0048]=H [0x0049]=I [0x004a]=J [0x004b]=K + [0x004c]=L [0x004d]=M [0x004e]=N [0x004f]=O [0x0050]=P + [0x0051]=Q [0x0052]=R [0x0053]=S [0x0054]=T [0x0055]=U + [0x0056]=V [0x0057]=W [0x0058]=X [0x0059]=Y [0x005a]=Z + [0x005b]=\[ [0x005c]=\\ [0x005d]=\] [0x005e]=\^ [0x005f]=_ + [0x0060]=\` [0x0061]=a [0x0062]=b [0x0063]=c [0x0064]=d + [0x0065]=e [0x0066]=f [0x0067]=g [0x0068]=h [0x0069]=i + [0x006a]=j [0x006b]=k [0x006c]=l [0x006d]=m [0x006e]=n + [0x006f]=o [0x0070]=p [0x0071]=q [0x0072]=r [0x0073]=s + [0x0074]=t [0x0075]=u [0x0076]=v [0x0077]=w [0x0078]=x + [0x0079]=y [0x007a]=z [0x007b]=\{ [0x007c]=\| [0x007d]=\} + [0x007e]="~" [0x007f]=$'\177' [0x0080]=$'\302\200' [0x0081]=$'\302\201' [0x0082]=$'\302\202' + [0x0083]=$'\302\203' [0x0084]=$'\302\204' [0x0085]=$'\302\205' [0x0086]=$'\302\206' [0x0087]=$'\302\207' + [0x0088]=$'\302\210' [0x0089]=$'\302\211' [0x008a]=$'\302\212' [0x008b]=$'\302\213' [0x008c]=$'\302\214' + [0x008d]=$'\302\215' [0x008e]=$'\302\216' [0x008f]=$'\302\217' [0x0090]=$'\302\220' [0x0091]=$'\302\221' + [0x0092]=$'\302\222' [0x0093]=$'\302\223' [0x0094]=$'\302\224' [0x0095]=$'\302\225' [0x0096]=$'\302\226' + [0x0097]=$'\302\227' [0x0098]=$'\302\230' [0x0099]=$'\302\231' [0x009a]=$'\302\232' [0x009b]=$'\302\233' + [0x009c]=$'\302\234' [0x009d]=$'\302\235' [0x009e]=$'\302\236' [0x009f]=$'\302\237' [0x00a0]=$'\302\240' + [0x00a1]=$'\302\241' [0x00a2]=$'\302\242' [0x00a3]=$'\302\243' [0x00a4]=$'\302\244' [0x00a5]=$'\302\245' + [0x00a6]=$'\302\246' [0x00a7]=$'\302\247' [0x00a8]=$'\302\250' [0x00a9]=$'\302\251' [0x00aa]=$'\302\252' + [0x00ab]=$'\302\253' [0x00ac]=$'\302\254' [0x00ad]=$'\302\255' [0x00ae]=$'\302\256' [0x00af]=$'\302\257' + [0x00b0]=$'\302\260' [0x00b1]=$'\302\261' [0x00b2]=$'\302\262' [0x00b3]=$'\302\263' [0x00b4]=$'\302\264' + [0x00b5]=$'\302\265' [0x00b6]=$'\302\266' [0x00b7]=$'\302\267' [0x00b8]=$'\302\270' [0x00b9]=$'\302\271' + [0x00ba]=$'\302\272' [0x00bb]=$'\302\273' [0x00bc]=$'\302\274' [0x00bd]=$'\302\275' [0x00be]=$'\302\276' + [0x00bf]=$'\302\277' [0x00c0]=$'\303\200' [0x00c1]=$'\303\201' [0x00c2]=$'\303\202' [0x00c3]=$'\303\203' + [0x00c4]=$'\303\204' [0x00c5]=$'\303\205' [0x00c6]=$'\303\206' [0x00c7]=$'\303\207' [0x00c8]=$'\303\210' + [0x00c9]=$'\303\211' [0x00ca]=$'\303\212' [0x00cb]=$'\303\213' [0x00cc]=$'\303\214' [0x00cd]=$'\303\215' + [0x00ce]=$'\303\216' [0x00cf]=$'\303\217' [0x00d0]=$'\303\220' [0x00d1]=$'\303\221' [0x00d2]=$'\303\222' + [0x00d3]=$'\303\223' [0x00d4]=$'\303\224' [0x00d5]=$'\303\225' [0x00d6]=$'\303\226' [0x00d7]=$'\303\227' + [0x00d8]=$'\303\230' [0x00d9]=$'\303\231' [0x00da]=$'\303\232' [0x00db]=$'\303\233' [0x00dc]=$'\303\234' + [0x00dd]=$'\303\235' [0x00de]=$'\303\236' [0x00df]=$'\303\237' [0x00e0]=$'\303\240' [0x00e1]=$'\303\241' + [0x00e2]=$'\303\242' [0x00e3]=$'\303\243' [0x00e4]=$'\303\244' [0x00e5]=$'\303\245' [0x00e6]=$'\303\246' + [0x00e7]=$'\303\247' [0x00e8]=$'\303\250' [0x00e9]=$'\303\251' [0x00ea]=$'\303\252' [0x00eb]=$'\303\253' + [0x00ec]=$'\303\254' [0x00ed]=$'\303\255' [0x00ee]=$'\303\256' [0x00ef]=$'\303\257' [0x00f0]=$'\303\260' + [0x00f1]=$'\303\261' [0x00f2]=$'\303\262' [0x00f3]=$'\303\263' [0x00f4]=$'\303\264' [0x00f5]=$'\303\265' + [0x00f6]=$'\303\266' [0x00f7]=$'\303\267' [0x00f8]=$'\303\270' [0x00f9]=$'\303\271' [0x00fa]=$'\303\272' + [0x00fb]=$'\303\273' [0x00fc]=$'\303\274' [0x00fd]=$'\303\275' [0x00fe]=$'\303\276' [0x00ff]=$'\303\277' + [0x0100]=$'\304\200' [0x0101]=$'\304\201' [0x0102]=$'\304\202' [0x0103]=$'\304\203' [0x0104]=$'\304\204' + [0x0105]=$'\304\205' [0x0106]=$'\304\206' [0x0107]=$'\304\207' [0x0108]=$'\304\210' [0x0109]=$'\304\211' + [0x010a]=$'\304\212' [0x010b]=$'\304\213' [0x010c]=$'\304\214' [0x010d]=$'\304\215' [0x010e]=$'\304\216' + [0x010f]=$'\304\217' [0x0110]=$'\304\220' [0x0111]=$'\304\221' [0x0112]=$'\304\222' [0x0113]=$'\304\223' + [0x0114]=$'\304\224' [0x0115]=$'\304\225' [0x0116]=$'\304\226' [0x0117]=$'\304\227' [0x0118]=$'\304\230' + [0x0119]=$'\304\231' [0x011a]=$'\304\232' [0x011b]=$'\304\233' [0x011c]=$'\304\234' [0x011d]=$'\304\235' + [0x011e]=$'\304\236' [0x011f]=$'\304\237' [0x0120]=$'\304\240' [0x0121]=$'\304\241' [0x0122]=$'\304\242' + [0x0123]=$'\304\243' [0x0124]=$'\304\244' [0x0125]=$'\304\245' [0x0126]=$'\304\246' [0x0127]=$'\304\247' + [0x0128]=$'\304\250' [0x0129]=$'\304\251' [0x012a]=$'\304\252' [0x012b]=$'\304\253' [0x012c]=$'\304\254' + [0x012d]=$'\304\255' [0x012e]=$'\304\256' [0x012f]=$'\304\257' [0x0130]=$'\304\260' [0x0131]=$'\304\261' + [0x0132]=$'\304\262' [0x0133]=$'\304\263' [0x0134]=$'\304\264' [0x0135]=$'\304\265' [0x0136]=$'\304\266' + [0x0137]=$'\304\267' [0x0138]=$'\304\270' [0x0139]=$'\304\271' [0x013a]=$'\304\272' [0x013b]=$'\304\273' + [0x013c]=$'\304\274' [0x013d]=$'\304\275' [0x013e]=$'\304\276' [0x013f]=$'\304\277' [0x0140]=$'\305\200' + [0x0141]=$'\305\201' [0x0142]=$'\305\202' [0x0143]=$'\305\203' [0x0144]=$'\305\204' [0x0145]=$'\305\205' + [0x0146]=$'\305\206' [0x0147]=$'\305\207' [0x0148]=$'\305\210' [0x0149]=$'\305\211' [0x014a]=$'\305\212' + [0x014b]=$'\305\213' [0x014c]=$'\305\214' [0x014d]=$'\305\215' [0x014e]=$'\305\216' [0x014f]=$'\305\217' + [0x0150]=$'\305\220' [0x0151]=$'\305\221' [0x0152]=$'\305\222' [0x0153]=$'\305\223' [0x0154]=$'\305\224' + [0x0155]=$'\305\225' [0x0156]=$'\305\226' [0x0157]=$'\305\227' [0x0158]=$'\305\230' [0x0159]=$'\305\231' + [0x015a]=$'\305\232' [0x015b]=$'\305\233' [0x015c]=$'\305\234' [0x015d]=$'\305\235' [0x015e]=$'\305\236' + [0x015f]=$'\305\237' [0x0160]=$'\305\240' [0x0161]=$'\305\241' [0x0162]=$'\305\242' [0x0163]=$'\305\243' + [0x0164]=$'\305\244' [0x0165]=$'\305\245' [0x0166]=$'\305\246' [0x0167]=$'\305\247' [0x0168]=$'\305\250' + [0x0169]=$'\305\251' [0x016a]=$'\305\252' [0x016b]=$'\305\253' [0x016c]=$'\305\254' [0x016d]=$'\305\255' + [0x016e]=$'\305\256' [0x016f]=$'\305\257' [0x0170]=$'\305\260' [0x0171]=$'\305\261' [0x0172]=$'\305\262' + [0x0173]=$'\305\263' [0x0174]=$'\305\264' [0x0175]=$'\305\265' [0x0176]=$'\305\266' [0x0177]=$'\305\267' + [0x0178]=$'\305\270' [0x0179]=$'\305\271' [0x017a]=$'\305\272' [0x017b]=$'\305\273' [0x017c]=$'\305\274' + [0x017d]=$'\305\275' [0x017e]=$'\305\276' [0x017f]=$'\305\277' [0x0180]=$'\306\200' [0x0181]=$'\306\201' + [0x0182]=$'\306\202' [0x0183]=$'\306\203' [0x0184]=$'\306\204' [0x0185]=$'\306\205' [0x0186]=$'\306\206' + [0x0187]=$'\306\207' [0x0188]=$'\306\210' [0x0189]=$'\306\211' [0x018a]=$'\306\212' [0x018b]=$'\306\213' + [0x018c]=$'\306\214' [0x018d]=$'\306\215' [0x018e]=$'\306\216' [0x018f]=$'\306\217' [0x0190]=$'\306\220' + [0x0191]=$'\306\221' [0x0192]=$'\306\222' [0x0193]=$'\306\223' [0x0194]=$'\306\224' [0x0195]=$'\306\225' + [0x0196]=$'\306\226' [0x0197]=$'\306\227' [0x0198]=$'\306\230' [0x0199]=$'\306\231' [0x019a]=$'\306\232' + [0x019b]=$'\306\233' [0x019c]=$'\306\234' [0x019d]=$'\306\235' [0x019e]=$'\306\236' [0x019f]=$'\306\237' + [0x01a0]=$'\306\240' [0x01a1]=$'\306\241' [0x01a2]=$'\306\242' [0x01a3]=$'\306\243' [0x01a4]=$'\306\244' + [0x01a5]=$'\306\245' [0x01a6]=$'\306\246' [0x01a7]=$'\306\247' [0x01a8]=$'\306\250' [0x01a9]=$'\306\251' + [0x01aa]=$'\306\252' [0x01ab]=$'\306\253' [0x01ac]=$'\306\254' [0x01ad]=$'\306\255' [0x01ae]=$'\306\256' + [0x01af]=$'\306\257' [0x01b0]=$'\306\260' [0x01b1]=$'\306\261' [0x01b2]=$'\306\262' [0x01b3]=$'\306\263' + [0x01b4]=$'\306\264' [0x01b5]=$'\306\265' [0x01b6]=$'\306\266' [0x01b7]=$'\306\267' [0x01b8]=$'\306\270' + [0x01b9]=$'\306\271' [0x01ba]=$'\306\272' [0x01bb]=$'\306\273' [0x01bc]=$'\306\274' [0x01bd]=$'\306\275' + [0x01be]=$'\306\276' [0x01bf]=$'\306\277' [0x01c0]=$'\307\200' [0x01c1]=$'\307\201' [0x01c2]=$'\307\202' + [0x01c3]=$'\307\203' [0x01c4]=$'\307\204' [0x01c5]=$'\307\205' [0x01c6]=$'\307\206' [0x01c7]=$'\307\207' + [0x01c8]=$'\307\210' [0x01c9]=$'\307\211' [0x01ca]=$'\307\212' [0x01cb]=$'\307\213' [0x01cc]=$'\307\214' + [0x01cd]=$'\307\215' [0x01ce]=$'\307\216' [0x01cf]=$'\307\217' [0x01d0]=$'\307\220' [0x01d1]=$'\307\221' + [0x01d2]=$'\307\222' [0x01d3]=$'\307\223' [0x01d4]=$'\307\224' [0x01d5]=$'\307\225' [0x01d6]=$'\307\226' + [0x01d7]=$'\307\227' [0x01d8]=$'\307\230' [0x01d9]=$'\307\231' [0x01da]=$'\307\232' [0x01db]=$'\307\233' + [0x01dc]=$'\307\234' [0x01dd]=$'\307\235' [0x01de]=$'\307\236' [0x01df]=$'\307\237' [0x01e0]=$'\307\240' + [0x01e1]=$'\307\241' [0x01e2]=$'\307\242' [0x01e3]=$'\307\243' [0x01e4]=$'\307\244' [0x01e5]=$'\307\245' + [0x01e6]=$'\307\246' [0x01e7]=$'\307\247' [0x01e8]=$'\307\250' [0x01e9]=$'\307\251' [0x01ea]=$'\307\252' + [0x01eb]=$'\307\253' [0x01ec]=$'\307\254' [0x01ed]=$'\307\255' [0x01ee]=$'\307\256' [0x01ef]=$'\307\257' + [0x01f0]=$'\307\260' [0x01f1]=$'\307\261' [0x01f2]=$'\307\262' [0x01f3]=$'\307\263' [0x01f4]=$'\307\264' + [0x01f5]=$'\307\265' [0x01f6]=$'\307\266' [0x01f7]=$'\307\267' [0x01f8]=$'\307\270' [0x01f9]=$'\307\271' + [0x01fa]=$'\307\272' [0x01fb]=$'\307\273' [0x01fc]=$'\307\274' [0x01fd]=$'\307\275' [0x01fe]=$'\307\276' + [0x01ff]=$'\307\277' [0x0200]=$'\310\200' [0x0201]=$'\310\201' [0x0202]=$'\310\202' [0x0203]=$'\310\203' + [0x0204]=$'\310\204' [0x0205]=$'\310\205' [0x0206]=$'\310\206' [0x0207]=$'\310\207' [0x0208]=$'\310\210' + [0x0209]=$'\310\211' [0x020a]=$'\310\212' [0x020b]=$'\310\213' [0x020c]=$'\310\214' [0x020d]=$'\310\215' + [0x020e]=$'\310\216' [0x020f]=$'\310\217' [0x0210]=$'\310\220' [0x0211]=$'\310\221' [0x0212]=$'\310\222' + [0x0213]=$'\310\223' [0x0214]=$'\310\224' [0x0215]=$'\310\225' [0x0216]=$'\310\226' [0x0217]=$'\310\227' + [0x0218]=$'\310\230' [0x0219]=$'\310\231' [0x021a]=$'\310\232' [0x021b]=$'\310\233' [0x021c]=$'\310\234' + [0x021d]=$'\310\235' [0x021e]=$'\310\236' [0x021f]=$'\310\237' [0x0220]=$'\310\240' [0x0221]=$'\310\241' + [0x0222]=$'\310\242' [0x0223]=$'\310\243' [0x0224]=$'\310\244' [0x0225]=$'\310\245' [0x0226]=$'\310\246' + [0x0227]=$'\310\247' [0x0228]=$'\310\250' [0x0229]=$'\310\251' [0x022a]=$'\310\252' [0x022b]=$'\310\253' + [0x022c]=$'\310\254' [0x022d]=$'\310\255' [0x022e]=$'\310\256' [0x022f]=$'\310\257' [0x0230]=$'\310\260' + [0x0231]=$'\310\261' [0x0232]=$'\310\262' [0x0233]=$'\310\263' [0x0234]=$'\310\264' [0x0235]=$'\310\265' + [0x0236]=$'\310\266' [0x0237]=$'\310\267' [0x0238]=$'\310\270' [0x0239]=$'\310\271' [0x023a]=$'\310\272' + [0x023b]=$'\310\273' [0x023c]=$'\310\274' [0x023d]=$'\310\275' [0x023e]=$'\310\276' [0x023f]=$'\310\277' + [0x0240]=$'\311\200' [0x0241]=$'\311\201' [0x0242]=$'\311\202' [0x0243]=$'\311\203' [0x0244]=$'\311\204' + [0x0245]=$'\311\205' [0x0246]=$'\311\206' [0x0247]=$'\311\207' [0x0248]=$'\311\210' [0x0249]=$'\311\211' + [0x024a]=$'\311\212' [0x024b]=$'\311\213' [0x024c]=$'\311\214' [0x024d]=$'\311\215' [0x024e]=$'\311\216' + [0x024f]=$'\311\217' [0x0250]=$'\311\220' [0x0251]=$'\311\221' [0x0252]=$'\311\222' [0x0253]=$'\311\223' + [0x0254]=$'\311\224' [0x0255]=$'\311\225' [0x0256]=$'\311\226' [0x0257]=$'\311\227' [0x0258]=$'\311\230' + [0x0259]=$'\311\231' [0x025a]=$'\311\232' [0x025b]=$'\311\233' [0x025c]=$'\311\234' [0x025d]=$'\311\235' + [0x025e]=$'\311\236' [0x025f]=$'\311\237' [0x0260]=$'\311\240' [0x0261]=$'\311\241' [0x0262]=$'\311\242' + [0x0263]=$'\311\243' [0x0264]=$'\311\244' [0x0265]=$'\311\245' [0x0266]=$'\311\246' [0x0267]=$'\311\247' + [0x0268]=$'\311\250' [0x0269]=$'\311\251' [0x026a]=$'\311\252' [0x026b]=$'\311\253' [0x026c]=$'\311\254' + [0x026d]=$'\311\255' [0x026e]=$'\311\256' [0x026f]=$'\311\257' [0x0270]=$'\311\260' [0x0271]=$'\311\261' + [0x0272]=$'\311\262' [0x0273]=$'\311\263' [0x0274]=$'\311\264' [0x0275]=$'\311\265' [0x0276]=$'\311\266' + [0x0277]=$'\311\267' [0x0278]=$'\311\270' [0x0279]=$'\311\271' [0x027a]=$'\311\272' [0x027b]=$'\311\273' + [0x027c]=$'\311\274' [0x027d]=$'\311\275' [0x027e]=$'\311\276' [0x027f]=$'\311\277' [0x0280]=$'\312\200' + [0x0281]=$'\312\201' [0x0282]=$'\312\202' [0x0283]=$'\312\203' [0x0284]=$'\312\204' [0x0285]=$'\312\205' + [0x0286]=$'\312\206' [0x0287]=$'\312\207' [0x0288]=$'\312\210' [0x0289]=$'\312\211' [0x028a]=$'\312\212' + [0x028b]=$'\312\213' [0x028c]=$'\312\214' [0x028d]=$'\312\215' [0x028e]=$'\312\216' [0x028f]=$'\312\217' + [0x0290]=$'\312\220' [0x0291]=$'\312\221' [0x0292]=$'\312\222' [0x0293]=$'\312\223' [0x0294]=$'\312\224' + [0x0295]=$'\312\225' [0x0296]=$'\312\226' [0x0297]=$'\312\227' [0x0298]=$'\312\230' [0x0299]=$'\312\231' + [0x029a]=$'\312\232' [0x029b]=$'\312\233' [0x029c]=$'\312\234' [0x029d]=$'\312\235' [0x029e]=$'\312\236' + [0x029f]=$'\312\237' [0x02a0]=$'\312\240' [0x02a1]=$'\312\241' [0x02a2]=$'\312\242' [0x02a3]=$'\312\243' + [0x02a4]=$'\312\244' [0x02a5]=$'\312\245' [0x02a6]=$'\312\246' [0x02a7]=$'\312\247' [0x02a8]=$'\312\250' + [0x02a9]=$'\312\251' [0x02aa]=$'\312\252' [0x02ab]=$'\312\253' [0x02ac]=$'\312\254' [0x02ad]=$'\312\255' + [0x02ae]=$'\312\256' [0x02af]=$'\312\257' [0x02b0]=$'\312\260' [0x02b1]=$'\312\261' [0x02b2]=$'\312\262' + [0x02b3]=$'\312\263' [0x02b4]=$'\312\264' [0x02b5]=$'\312\265' [0x02b6]=$'\312\266' [0x02b7]=$'\312\267' + [0x02b8]=$'\312\270' [0x02b9]=$'\312\271' [0x02ba]=$'\312\272' [0x02bb]=$'\312\273' [0x02bc]=$'\312\274' + [0x02bd]=$'\312\275' [0x02be]=$'\312\276' [0x02bf]=$'\312\277' [0x02c0]=$'\313\200' [0x02c1]=$'\313\201' + [0x02c2]=$'\313\202' [0x02c3]=$'\313\203' [0x02c4]=$'\313\204' [0x02c5]=$'\313\205' [0x02c6]=$'\313\206' + [0x02c7]=$'\313\207' [0x02c8]=$'\313\210' [0x02c9]=$'\313\211' [0x02ca]=$'\313\212' [0x02cb]=$'\313\213' + [0x02cc]=$'\313\214' [0x02cd]=$'\313\215' [0x02ce]=$'\313\216' [0x02cf]=$'\313\217' [0x02d0]=$'\313\220' + [0x02d1]=$'\313\221' [0x02d2]=$'\313\222' [0x02d3]=$'\313\223' [0x02d4]=$'\313\224' [0x02d5]=$'\313\225' + [0x02d6]=$'\313\226' [0x02d7]=$'\313\227' [0x02d8]=$'\313\230' [0x02d9]=$'\313\231' [0x02da]=$'\313\232' + [0x02db]=$'\313\233' [0x02dc]=$'\313\234' [0x02dd]=$'\313\235' [0x02de]=$'\313\236' [0x02df]=$'\313\237' + [0x02e0]=$'\313\240' [0x02e1]=$'\313\241' [0x02e2]=$'\313\242' [0x02e3]=$'\313\243' [0x02e4]=$'\313\244' + [0x02e5]=$'\313\245' [0x02e6]=$'\313\246' [0x02e7]=$'\313\247' [0x02e8]=$'\313\250' [0x02e9]=$'\313\251' + [0x02ea]=$'\313\252' [0x02eb]=$'\313\253' [0x02ec]=$'\313\254' [0x02ed]=$'\313\255' [0x02ee]=$'\313\256' + [0x02ef]=$'\313\257' [0x02f0]=$'\313\260' [0x02f1]=$'\313\261' [0x02f2]=$'\313\262' [0x02f3]=$'\313\263' + [0x02f4]=$'\313\264' [0x02f5]=$'\313\265' [0x02f6]=$'\313\266' [0x02f7]=$'\313\267' [0x02f8]=$'\313\270' + [0x02f9]=$'\313\271' [0x02fa]=$'\313\272' [0x02fb]=$'\313\273' [0x02fc]=$'\313\274' [0x02fd]=$'\313\275' + [0x02fe]=$'\313\276' [0x02ff]=$'\313\277' [0x0300]=$'\314\200' [0x0301]=$'\314\201' [0x0302]=$'\314\202' + [0x0303]=$'\314\203' [0x0304]=$'\314\204' [0x0305]=$'\314\205' [0x0306]=$'\314\206' [0x0307]=$'\314\207' + [0x0308]=$'\314\210' [0x0309]=$'\314\211' [0x030a]=$'\314\212' [0x030b]=$'\314\213' [0x030c]=$'\314\214' + [0x030d]=$'\314\215' [0x030e]=$'\314\216' [0x030f]=$'\314\217' [0x0310]=$'\314\220' [0x0311]=$'\314\221' + [0x0312]=$'\314\222' [0x0313]=$'\314\223' [0x0314]=$'\314\224' [0x0315]=$'\314\225' [0x0316]=$'\314\226' + [0x0317]=$'\314\227' [0x0318]=$'\314\230' [0x0319]=$'\314\231' [0x031a]=$'\314\232' [0x031b]=$'\314\233' + [0x031c]=$'\314\234' [0x031d]=$'\314\235' [0x031e]=$'\314\236' [0x031f]=$'\314\237' [0x0320]=$'\314\240' + [0x0321]=$'\314\241' [0x0322]=$'\314\242' [0x0323]=$'\314\243' [0x0324]=$'\314\244' [0x0325]=$'\314\245' + [0x0326]=$'\314\246' [0x0327]=$'\314\247' [0x0328]=$'\314\250' [0x0329]=$'\314\251' [0x032a]=$'\314\252' + [0x032b]=$'\314\253' [0x032c]=$'\314\254' [0x032d]=$'\314\255' [0x032e]=$'\314\256' [0x032f]=$'\314\257' + [0x0330]=$'\314\260' [0x0331]=$'\314\261' [0x0332]=$'\314\262' [0x0333]=$'\314\263' [0x0334]=$'\314\264' + [0x0335]=$'\314\265' [0x0336]=$'\314\266' [0x0337]=$'\314\267' [0x0338]=$'\314\270' [0x0339]=$'\314\271' + [0x033a]=$'\314\272' [0x033b]=$'\314\273' [0x033c]=$'\314\274' [0x033d]=$'\314\275' [0x033e]=$'\314\276' + [0x033f]=$'\314\277' [0x0340]=$'\315\200' [0x0341]=$'\315\201' [0x0342]=$'\315\202' [0x0343]=$'\315\203' + [0x0344]=$'\315\204' [0x0345]=$'\315\205' [0x0346]=$'\315\206' [0x0347]=$'\315\207' [0x0348]=$'\315\210' + [0x0349]=$'\315\211' [0x034a]=$'\315\212' [0x034b]=$'\315\213' [0x034c]=$'\315\214' [0x034d]=$'\315\215' + [0x034e]=$'\315\216' [0x034f]=$'\315\217' [0x0350]=$'\315\220' [0x0351]=$'\315\221' [0x0352]=$'\315\222' + [0x0353]=$'\315\223' [0x0354]=$'\315\224' [0x0355]=$'\315\225' [0x0356]=$'\315\226' [0x0357]=$'\315\227' + [0x0358]=$'\315\230' [0x0359]=$'\315\231' [0x035a]=$'\315\232' [0x035b]=$'\315\233' [0x035c]=$'\315\234' + [0x035d]=$'\315\235' [0x035e]=$'\315\236' [0x035f]=$'\315\237' [0x0360]=$'\315\240' [0x0361]=$'\315\241' + [0x0362]=$'\315\242' [0x0363]=$'\315\243' [0x0364]=$'\315\244' [0x0365]=$'\315\245' [0x0366]=$'\315\246' + [0x0367]=$'\315\247' [0x0368]=$'\315\250' [0x0369]=$'\315\251' [0x036a]=$'\315\252' [0x036b]=$'\315\253' + [0x036c]=$'\315\254' [0x036d]=$'\315\255' [0x036e]=$'\315\256' [0x036f]=$'\315\257' [0x0370]=$'\315\260' + [0x0371]=$'\315\261' [0x0372]=$'\315\262' [0x0373]=$'\315\263' [0x0374]=$'\315\264' [0x0375]=$'\315\265' + [0x0376]=$'\315\266' [0x0377]=$'\315\267' [0x0378]=$'\315\270' [0x0379]=$'\315\271' [0x037a]=$'\315\272' + [0x037b]=$'\315\273' [0x037c]=$'\315\274' [0x037d]=$'\315\275' [0x037e]=$'\315\276' [0x037f]=$'\315\277' + [0x0380]=$'\316\200' [0x0381]=$'\316\201' [0x0382]=$'\316\202' [0x0383]=$'\316\203' [0x0384]=$'\316\204' + [0x0385]=$'\316\205' [0x0386]=$'\316\206' [0x0387]=$'\316\207' [0x0388]=$'\316\210' [0x0389]=$'\316\211' + [0x038a]=$'\316\212' [0x038b]=$'\316\213' [0x038c]=$'\316\214' [0x038d]=$'\316\215' [0x038e]=$'\316\216' + [0x038f]=$'\316\217' [0x0390]=$'\316\220' [0x0391]=$'\316\221' [0x0392]=$'\316\222' [0x0393]=$'\316\223' + [0x0394]=$'\316\224' [0x0395]=$'\316\225' [0x0396]=$'\316\226' [0x0397]=$'\316\227' [0x0398]=$'\316\230' + [0x0399]=$'\316\231' [0x039a]=$'\316\232' [0x039b]=$'\316\233' [0x039c]=$'\316\234' [0x039d]=$'\316\235' + [0x039e]=$'\316\236' [0x039f]=$'\316\237' [0x03a0]=$'\316\240' [0x03a1]=$'\316\241' [0x03a2]=$'\316\242' + [0x03a3]=$'\316\243' [0x03a4]=$'\316\244' [0x03a5]=$'\316\245' [0x03a6]=$'\316\246' [0x03a7]=$'\316\247' + [0x03a8]=$'\316\250' [0x03a9]=$'\316\251' [0x03aa]=$'\316\252' [0x03ab]=$'\316\253' [0x03ac]=$'\316\254' + [0x03ad]=$'\316\255' [0x03ae]=$'\316\256' [0x03af]=$'\316\257' [0x03b0]=$'\316\260' [0x03b1]=$'\316\261' + [0x03b2]=$'\316\262' [0x03b3]=$'\316\263' [0x03b4]=$'\316\264' [0x03b5]=$'\316\265' [0x03b6]=$'\316\266' + [0x03b7]=$'\316\267' [0x03b8]=$'\316\270' [0x03b9]=$'\316\271' [0x03ba]=$'\316\272' [0x03bb]=$'\316\273' + [0x03bc]=$'\316\274' [0x03bd]=$'\316\275' [0x03be]=$'\316\276' [0x03bf]=$'\316\277' [0x03c0]=$'\317\200' + [0x03c1]=$'\317\201' [0x03c2]=$'\317\202' [0x03c3]=$'\317\203' [0x03c4]=$'\317\204' [0x03c5]=$'\317\205' + [0x03c6]=$'\317\206' [0x03c7]=$'\317\207' [0x03c8]=$'\317\210' [0x03c9]=$'\317\211' [0x03ca]=$'\317\212' + [0x03cb]=$'\317\213' [0x03cc]=$'\317\214' [0x03cd]=$'\317\215' [0x03ce]=$'\317\216' [0x03cf]=$'\317\217' + [0x03d0]=$'\317\220' [0x03d1]=$'\317\221' [0x03d2]=$'\317\222' [0x03d3]=$'\317\223' [0x03d4]=$'\317\224' + [0x03d5]=$'\317\225' [0x03d6]=$'\317\226' [0x03d7]=$'\317\227' [0x03d8]=$'\317\230' [0x03d9]=$'\317\231' + [0x03da]=$'\317\232' [0x03db]=$'\317\233' [0x03dc]=$'\317\234' [0x03dd]=$'\317\235' [0x03de]=$'\317\236' + [0x03df]=$'\317\237' [0x03e0]=$'\317\240' [0x03e1]=$'\317\241' [0x03e2]=$'\317\242' [0x03e3]=$'\317\243' + [0x03e4]=$'\317\244' [0x03e5]=$'\317\245' [0x03e6]=$'\317\246' [0x03e7]=$'\317\247' + + + [0x1000]=$'\341\200\200' [0x1001]=$'\341\200\201' [0x1002]=$'\341\200\202' [0x1003]=$'\341\200\203' [0x1004]=$'\341\200\204' + [0x1005]=$'\341\200\205' [0x1006]=$'\341\200\206' [0x1007]=$'\341\200\207' [0x1008]=$'\341\200\210' [0x1009]=$'\341\200\211' + [0x100a]=$'\341\200\212' [0x100b]=$'\341\200\213' [0x100c]=$'\341\200\214' [0x100d]=$'\341\200\215' [0x100e]=$'\341\200\216' + [0x100f]=$'\341\200\217' [0x1010]=$'\341\200\220' [0x1011]=$'\341\200\221' [0x1012]=$'\341\200\222' [0x1013]=$'\341\200\223' + [0x1014]=$'\341\200\224' [0x1015]=$'\341\200\225' [0x1016]=$'\341\200\226' [0x1017]=$'\341\200\227' [0x1018]=$'\341\200\230' + [0x1019]=$'\341\200\231' [0x101a]=$'\341\200\232' [0x101b]=$'\341\200\233' [0x101c]=$'\341\200\234' [0x101d]=$'\341\200\235' + [0x101e]=$'\341\200\236' [0x101f]=$'\341\200\237' [0x1020]=$'\341\200\240' [0x1021]=$'\341\200\241' [0x1022]=$'\341\200\242' + [0x1023]=$'\341\200\243' [0x1024]=$'\341\200\244' [0x1025]=$'\341\200\245' [0x1026]=$'\341\200\246' [0x1027]=$'\341\200\247' + [0x1028]=$'\341\200\250' [0x1029]=$'\341\200\251' [0x102a]=$'\341\200\252' [0x102b]=$'\341\200\253' [0x102c]=$'\341\200\254' + [0x102d]=$'\341\200\255' [0x102e]=$'\341\200\256' [0x102f]=$'\341\200\257' [0x1030]=$'\341\200\260' [0x1031]=$'\341\200\261' + [0x1032]=$'\341\200\262' [0x1033]=$'\341\200\263' [0x1034]=$'\341\200\264' [0x1035]=$'\341\200\265' [0x1036]=$'\341\200\266' + [0x1037]=$'\341\200\267' [0x1038]=$'\341\200\270' [0x1039]=$'\341\200\271' [0x103a]=$'\341\200\272' [0x103b]=$'\341\200\273' + [0x103c]=$'\341\200\274' [0x103d]=$'\341\200\275' [0x103e]=$'\341\200\276' [0x103f]=$'\341\200\277' [0x1040]=$'\341\201\200' + [0x1041]=$'\341\201\201' [0x1042]=$'\341\201\202' [0x1043]=$'\341\201\203' [0x1044]=$'\341\201\204' [0x1045]=$'\341\201\205' + [0x1046]=$'\341\201\206' [0x1047]=$'\341\201\207' [0x1048]=$'\341\201\210' [0x1049]=$'\341\201\211' [0x104a]=$'\341\201\212' + [0x104b]=$'\341\201\213' [0x104c]=$'\341\201\214' [0x104d]=$'\341\201\215' [0x104e]=$'\341\201\216' [0x104f]=$'\341\201\217' + + [0x10000]=$'\360\220\200\200' [0x10001]=$'\360\220\200\201' [0x10002]=$'\360\220\200\202' [0x10003]=$'\360\220\200\203' [0x10004]=$'\360\220\200\204' + [0x10005]=$'\360\220\200\205' [0x10006]=$'\360\220\200\206' [0x10007]=$'\360\220\200\207' [0x10008]=$'\360\220\200\210' [0x10009]=$'\360\220\200\211' + [0x1000a]=$'\360\220\200\212' [0x1000b]=$'\360\220\200\213' [0x1000c]=$'\360\220\200\214' [0x1000d]=$'\360\220\200\215' [0x1000e]=$'\360\220\200\216' + [0x1000f]=$'\360\220\200\217' [0x10010]=$'\360\220\200\220' [0x10011]=$'\360\220\200\221' [0x10012]=$'\360\220\200\222' [0x10013]=$'\360\220\200\223' + [0x10014]=$'\360\220\200\224' [0x10015]=$'\360\220\200\225' [0x10016]=$'\360\220\200\226' [0x10017]=$'\360\220\200\227' [0x10018]=$'\360\220\200\230' + [0x10019]=$'\360\220\200\231' [0x1001a]=$'\360\220\200\232' [0x1001b]=$'\360\220\200\233' [0x1001c]=$'\360\220\200\234' [0x1001d]=$'\360\220\200\235' + [0x1001e]=$'\360\220\200\236' [0x1001f]=$'\360\220\200\237' [0x10020]=$'\360\220\200\240' [0x10021]=$'\360\220\200\241' [0x10022]=$'\360\220\200\242' + [0x10023]=$'\360\220\200\243' [0x10024]=$'\360\220\200\244' [0x10025]=$'\360\220\200\245' [0x10026]=$'\360\220\200\246' [0x10027]=$'\360\220\200\247' + [0x10028]=$'\360\220\200\250' [0x10029]=$'\360\220\200\251' [0x1002a]=$'\360\220\200\252' [0x1002b]=$'\360\220\200\253' [0x1002c]=$'\360\220\200\254' + [0x1002d]=$'\360\220\200\255' [0x1002e]=$'\360\220\200\256' [0x1002f]=$'\360\220\200\257' [0x10030]=$'\360\220\200\260' [0x10031]=$'\360\220\200\261' + [0x10032]=$'\360\220\200\262' [0x10033]=$'\360\220\200\263' [0x10034]=$'\360\220\200\264' [0x10035]=$'\360\220\200\265' [0x10036]=$'\360\220\200\266' + [0x10037]=$'\360\220\200\267' [0x10038]=$'\360\220\200\270' [0x10039]=$'\360\220\200\271' [0x1003a]=$'\360\220\200\272' [0x1003b]=$'\360\220\200\273' + [0x1003c]=$'\360\220\200\274' [0x1003d]=$'\360\220\200\275' [0x1003e]=$'\360\220\200\276' [0x1003f]=$'\360\220\200\277' [0x10040]=$'\360\220\201\200' + [0x10041]=$'\360\220\201\201' [0x10042]=$'\360\220\201\202' [0x10043]=$'\360\220\201\203' [0x10044]=$'\360\220\201\204' [0x10045]=$'\360\220\201\205' + [0x10046]=$'\360\220\201\206' [0x10047]=$'\360\220\201\207' [0x10048]=$'\360\220\201\210' [0x10049]=$'\360\220\201\211' [0x1004a]=$'\360\220\201\212' + [0x1004b]=$'\360\220\201\213' [0x1004c]=$'\360\220\201\214' [0x1004d]=$'\360\220\201\215' [0x1004e]=$'\360\220\201\216' [0x1004f]=$'\360\220\201\217' + + [0x1000000]=$'\371\200\200\200\200' [0x1000001]=$'\371\200\200\200\201' [0x1000002]=$'\371\200\200\200\202' [0x1000003]=$'\371\200\200\200\203' [0x1000004]=$'\371\200\200\200\204' + [0x1000005]=$'\371\200\200\200\205' [0x1000006]=$'\371\200\200\200\206' [0x1000007]=$'\371\200\200\200\207' [0x1000008]=$'\371\200\200\200\210' [0x1000009]=$'\371\200\200\200\211' + [0x100000a]=$'\371\200\200\200\212' [0x100000b]=$'\371\200\200\200\213' [0x100000c]=$'\371\200\200\200\214' [0x100000d]=$'\371\200\200\200\215' [0x100000e]=$'\371\200\200\200\216' + [0x100000f]=$'\371\200\200\200\217' [0x1000010]=$'\371\200\200\200\220' [0x1000011]=$'\371\200\200\200\221' [0x1000012]=$'\371\200\200\200\222' [0x1000013]=$'\371\200\200\200\223' + [0x1000014]=$'\371\200\200\200\224' [0x1000015]=$'\371\200\200\200\225' [0x1000016]=$'\371\200\200\200\226' [0x1000017]=$'\371\200\200\200\227' [0x1000018]=$'\371\200\200\200\230' + [0x1000019]=$'\371\200\200\200\231' [0x100001a]=$'\371\200\200\200\232' [0x100001b]=$'\371\200\200\200\233' [0x100001c]=$'\371\200\200\200\234' [0x100001d]=$'\371\200\200\200\235' + [0x100001e]=$'\371\200\200\200\236' [0x100001f]=$'\371\200\200\200\237' [0x1000020]=$'\371\200\200\200\240' [0x1000021]=$'\371\200\200\200\241' [0x1000022]=$'\371\200\200\200\242' + [0x1000023]=$'\371\200\200\200\243' [0x1000024]=$'\371\200\200\200\244' [0x1000025]=$'\371\200\200\200\245' [0x1000026]=$'\371\200\200\200\246' [0x1000027]=$'\371\200\200\200\247' + [0x1000028]=$'\371\200\200\200\250' [0x1000029]=$'\371\200\200\200\251' [0x100002a]=$'\371\200\200\200\252' [0x100002b]=$'\371\200\200\200\253' [0x100002c]=$'\371\200\200\200\254' + [0x100002d]=$'\371\200\200\200\255' [0x100002e]=$'\371\200\200\200\256' [0x100002f]=$'\371\200\200\200\257' [0x1000030]=$'\371\200\200\200\260' [0x1000031]=$'\371\200\200\200\261' + [0x1000032]=$'\371\200\200\200\262' [0x1000033]=$'\371\200\200\200\263' [0x1000034]=$'\371\200\200\200\264' [0x1000035]=$'\371\200\200\200\265' [0x1000036]=$'\371\200\200\200\266' + [0x1000037]=$'\371\200\200\200\267' [0x1000038]=$'\371\200\200\200\270' [0x1000039]=$'\371\200\200\200\271' [0x100003a]=$'\371\200\200\200\272' [0x100003b]=$'\371\200\200\200\273' + [0x100003c]=$'\371\200\200\200\274' [0x100003d]=$'\371\200\200\200\275' [0x100003e]=$'\371\200\200\200\276' [0x100003f]=$'\371\200\200\200\277' [0x1000040]=$'\371\200\200\201\200' + [0x1000041]=$'\371\200\200\201\201' [0x1000042]=$'\371\200\200\201\202' [0x1000043]=$'\371\200\200\201\203' [0x1000044]=$'\371\200\200\201\204' [0x1000045]=$'\371\200\200\201\205' + [0x1000046]=$'\371\200\200\201\206' [0x1000047]=$'\371\200\200\201\207' [0x1000048]=$'\371\200\200\201\210' [0x1000049]=$'\371\200\200\201\211' [0x100004a]=$'\371\200\200\201\212' + [0x100004b]=$'\371\200\200\201\213' [0x100004c]=$'\371\200\200\201\214' [0x100004d]=$'\371\200\200\201\215' [0x100004e]=$'\371\200\200\201\216' [0x100004f]=$'\371\200\200\201\217' + + [0x70000000]=$'\375\260\200\200\200\200' [0x70000001]=$'\375\260\200\200\200\201' [0x70000002]=$'\375\260\200\200\200\202' [0x70000003]=$'\375\260\200\200\200\203' + [0x70000004]=$'\375\260\200\200\200\204' [0x70000005]=$'\375\260\200\200\200\205' [0x70000006]=$'\375\260\200\200\200\206' [0x70000007]=$'\375\260\200\200\200\207' [0x70000008]=$'\375\260\200\200\200\210' + [0x70000009]=$'\375\260\200\200\200\211' [0x7000000a]=$'\375\260\200\200\200\212' [0x7000000b]=$'\375\260\200\200\200\213' [0x7000000c]=$'\375\260\200\200\200\214' [0x7000000d]=$'\375\260\200\200\200\215' + [0x7000000e]=$'\375\260\200\200\200\216' [0x7000000f]=$'\375\260\200\200\200\217' [0x70000010]=$'\375\260\200\200\200\220' [0x70000011]=$'\375\260\200\200\200\221' [0x70000012]=$'\375\260\200\200\200\222' + [0x70000013]=$'\375\260\200\200\200\223' [0x70000014]=$'\375\260\200\200\200\224' [0x70000015]=$'\375\260\200\200\200\225' [0x70000016]=$'\375\260\200\200\200\226' [0x70000017]=$'\375\260\200\200\200\227' + [0x70000018]=$'\375\260\200\200\200\230' [0x70000019]=$'\375\260\200\200\200\231' [0x7000001a]=$'\375\260\200\200\200\232' [0x7000001b]=$'\375\260\200\200\200\233' [0x7000001c]=$'\375\260\200\200\200\234' + [0x7000001d]=$'\375\260\200\200\200\235' [0x7000001e]=$'\375\260\200\200\200\236' [0x7000001f]=$'\375\260\200\200\200\237' [0x70000020]=$'\375\260\200\200\200\240' [0x70000021]=$'\375\260\200\200\200\241' + [0x70000022]=$'\375\260\200\200\200\242' [0x70000023]=$'\375\260\200\200\200\243' [0x70000024]=$'\375\260\200\200\200\244' [0x70000025]=$'\375\260\200\200\200\245' [0x70000026]=$'\375\260\200\200\200\246' + [0x70000027]=$'\375\260\200\200\200\247' [0x70000028]=$'\375\260\200\200\200\250' [0x70000029]=$'\375\260\200\200\200\251' [0x7000002a]=$'\375\260\200\200\200\252' [0x7000002b]=$'\375\260\200\200\200\253' + [0x7000002c]=$'\375\260\200\200\200\254' [0x7000002d]=$'\375\260\200\200\200\255' [0x7000002e]=$'\375\260\200\200\200\256' [0x7000002f]=$'\375\260\200\200\200\257' [0x70000030]=$'\375\260\200\200\200\260' + [0x70000031]=$'\375\260\200\200\200\261' [0x70000032]=$'\375\260\200\200\200\262' [0x70000033]=$'\375\260\200\200\200\263' [0x70000034]=$'\375\260\200\200\200\264' [0x70000035]=$'\375\260\200\200\200\265' + [0x70000036]=$'\375\260\200\200\200\266' [0x70000037]=$'\375\260\200\200\200\267' [0x70000038]=$'\375\260\200\200\200\270' [0x70000039]=$'\375\260\200\200\200\271' [0x7000003a]=$'\375\260\200\200\200\272' + [0x7000003b]=$'\375\260\200\200\200\273' [0x7000003c]=$'\375\260\200\200\200\274' [0x7000003d]=$'\375\260\200\200\200\275' [0x7000003e]=$'\375\260\200\200\200\276' [0x7000003f]=$'\375\260\200\200\200\277' + [0x70000040]=$'\375\260\200\200\201\200' [0x70000041]=$'\375\260\200\200\201\201' [0x70000042]=$'\375\260\200\200\201\202' [0x70000043]=$'\375\260\200\200\201\203' [0x70000044]=$'\375\260\200\200\201\204' + [0x70000045]=$'\375\260\200\200\201\205' [0x70000046]=$'\375\260\200\200\201\206' [0x70000047]=$'\375\260\200\200\201\207' [0x70000048]=$'\375\260\200\200\201\210' [0x70000049]=$'\375\260\200\200\201\211' + [0x7000004a]=$'\375\260\200\200\201\212' [0x7000004b]=$'\375\260\200\200\201\213' [0x7000004c]=$'\375\260\200\200\201\214' [0x7000004d]=$'\375\260\200\200\201\215' [0x7000004e]=$'\375\260\200\200\201\216' + + + + ) +TestCodePage en_US.UTF-8 C_UTF_8 + +if [ ${ErrorCnt} -gt 0 ]; then + echo "Failed ${ErrorCnt} of ${TestCnt} Unicode tests" +else + echo "Passed all ${TestCnt} Unicode tests" +fi diff --git a/bash-5.1/tests/unicode2.sub b/bash-5.1/tests/unicode2.sub new file mode 100644 index 0000000000000000000000000000000000000000..16dd604ac34dba1700aa2e069ff49fda67a9e390 --- /dev/null +++ b/bash-5.1/tests/unicode2.sub @@ -0,0 +1,37 @@ +# 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 . +# +. ./test-glue-functions + +export LANG=en_US.UTF-8 + +printf '%s\n' "$(printf '\uff')" | od -b | _intl_normalize_spaces +printf '%s\n' $'\uff' | od -b | _intl_normalize_spaces + +printf '\uff'\\n | od -b | _intl_normalize_spaces +echo $'\uff' | od -b | _intl_normalize_spaces + +printf '\uffff'\\n | od -b | _intl_normalize_spaces +echo $'\uffff' | od -b | _intl_normalize_spaces + +printf '\Ufffffffe'\\n | od -b | _intl_normalize_spaces +echo $'\Ufffffffe' | od -b | _intl_normalize_spaces + +printf '\Uffffffff'\\n | od -b | _intl_normalize_spaces +echo $'\Uffffffff' | od -b | _intl_normalize_spaces + +LC_CTYPE=C printf '\uff'\\n | od -b | _intl_normalize_spaces +LC_CTYPE=ru_RU.CP1251 printf '\uff'\\n | od -b | _intl_normalize_spaces +LC_CTYPE=en_US.UTF-8 printf '\uff'\\n | od -b | _intl_normalize_spaces + +echo -e '\u0041 \u00a3 \u0152' | od -b | _intl_normalize_spaces diff --git a/bash-5.1/tests/unicode3.sub b/bash-5.1/tests/unicode3.sub new file mode 100644 index 0000000000000000000000000000000000000000..cb1b8732880ae76e4cf2886add410e94c38aa695 --- /dev/null +++ b/bash-5.1/tests/unicode3.sub @@ -0,0 +1,12 @@ +export LANG=en_US.UTF-8 # make sure + +cd $TMPDIR # try to avoid NFS artifacts +payload=$'\065\247\100\063\231\053\306\123\070\237\242\352\263' +"$payload" + +cd "$payload" +printf %q "$payload" +echo + +set -x ; : "$payload" ; set +x +cd $OLDPWD diff --git a/bash-5.1/tests/varenv.right b/bash-5.1/tests/varenv.right new file mode 100644 index 0000000000000000000000000000000000000000..358f5dc74d2cda48b00559efd3b3659a22b74358 --- /dev/null +++ b/bash-5.1/tests/varenv.right @@ -0,0 +1,270 @@ +3 4 +5 6 7 8 9 +7 8 9 +/usr/chet +/usr/chet +/usr/chet +/a/b/c +/usr/chet +/usr/chet 7 +/a/b/c 9 /a/b/c +/a/b/c 9 /a/b/c +/a/b/c /a/b/c +1 2 +1 1 +unset +toronto airport +AVAR +song by rush +BVAR +toronto airport +AVAR +AVAR +42 +/bin:/usr/bin:/usr/local/bin:. +declare -a avar=([0]="/bin:/usr/bin:/usr/local/bin:.") +declare -- z="yy" +42 +declare -i ivar="10" +unset +declare -x ivar="42" +hB +braceexpand:hashall:interactive-comments +hBP +braceexpand:hashall:interactive-comments:physical +declare -r SHELLOPTS="braceexpand:hashall:interactive-comments:physical" +abcde +20 +30 +40 +50 +|0|10| +10 +|0|10| +10 +|0|10| +10 +|4| +4 +|0|11| +after fff3: x=4 +|0|12| +|y| +|y| +a:b:c:d +a-b-c-d +a:b:c:d +g: , +f: , +FIN: asdf fdsa, asdf fdsa +g: v = , w = +f: v = , w = +FIN: v = two, w = one +./varenv4.sub: line 67: bbb: unique: cannot convert indexed to associative array +./varenv4.sub: line 67: declare: unique: cannot convert indexed to associative array +after bbb: 1 +declare -Ar FOOBAR=([foo]="bar" ) +declare -Ar FOOBAR=([foo]="bar" ) +declare -ar FOOBAR2=([0]="bar") +declare -ar FOOBAR2=([0]="bar") +F OUTSIDE +F OUTSIDE +declare -ar outside=() +declare -ir outside1="1" +tempenv = foo +0 +declare -ar myvar=([0]="0") +1 +declare -ir myvar="1" +declare -rx tempvar1='foo' +declare -rx tempvar2='qux' +./varenv7.sub: line 57: local: var: readonly variable +inside: outside +outside: outside +local: unset1 unset2 +abc +abc +:1 +:2 +after: ---- +global:1 +global:2 +after: --global-- +after: ---- +x = :1:2 +in o1 (readonly modifying local scalars): +declare -r i1="a b c" +declare -r j1="1 2 3" +after o1: +./varenv9.sub: line 28: declare: i1: not found +./varenv9.sub: line 28: declare: j1: not found +in o2 (readonly setting global scalars): +declare -r i2="a b c" +declare -r j2="1 2 3" +after o2: +declare -r i2="a b c" +declare -r j2="1 2 3" +./varenv9.sub: line 46: unset: i2: cannot unset: readonly variable +./varenv9.sub: line 46: unset: j2: cannot unset: readonly variable +in o3 (readonly modifying locals, converting to arrays): +declare -ar i3=([0]="a" [1]="b" [2]="c") +declare -ar j3=([0]="1" [1]="2" [2]="3") +after o3: +./varenv9.sub: line 61: declare: i3: not found +./varenv9.sub: line 61: declare: j3: not found +in o4 (readonly setting global array variables): +declare -ar i4=([0]="a" [1]="b" [2]="c") +declare -ar j4=([0]="1" [1]="2" [2]="3") +after o4: +declare -ar i4=([0]="a" [1]="b" [2]="c") +declare -ar j4=([0]="1" [1]="2" [2]="3") +./varenv9.sub: line 79: unset: i4: cannot unset: readonly variable +./varenv9.sub: line 79: unset: j4: cannot unset: readonly variable +main: unset +inner: res unset +outer: res: X Y +main: after first call: X +inner: X +outer: res: X Y +main: after second call: X +func: null or unset +after func: x = outside +./varenv11.sub: line 17: local: qux: readonly variable +./varenv11.sub: line 18: qux: readonly variable +./varenv11.sub: line 18: local: qux: readonly variable +declare -A foo=([zero]="zero" [one]="one" ) +declare -a bar=([0]="zero" [1]="one") +declare -A foo=([one]="one" [zero]="zero" ) +declare -a bar=([0]="zero" [1]="one") +./varenv11.sub: line 42: a: readonly variable +foo=abc +func1: var = + +func1: var = + +inside: declare -- foo +outside: +declare -x foo="abc" +inside: declare -x var="value" +outside: declare -- var="one" +inside: declare -x var="value" +outside: declare -- var="outside" +inside: declare -x var="inside" +outside: declare -- var="outside" +outside 1.0: var=one +outside 1.1: var=one +inside func: var=two +outside 2.0: var= +inside func: var=two +outside 2.1: var=global +inside func1: var=value +outside 3.0: var=value +inside func2: var=global +outside 4.0: var=outside +foo: hello world +after foo: var=global +bar: hello world +after bar: var=global +./varenv13.sub: line 16: `var[0]': not a valid identifier +./varenv13.sub: line 16: `var[@]': not a valid identifier +./varenv13.sub: line 14: declare: var: not found +./varenv13.sub: line 25: var[@]: bad array subscript +declare -A var=([0]="X" ) +help +./varenv13.sub: line 34: `var[0]': not a valid identifier +1 +declare -A var=([0]="X" ) +declare -A var=([Y]="Y" ) +declare -A var=([Y]="Y" ) +declare -A var=() +declare -A var=() +./varenv14.sub: line 31: f: var: cannot convert indexed to associative array +./varenv14.sub: line 31: declare: var: cannot convert indexed to associative array +declare -a var=([0]="12") +declare -a a=([0]="X") +declare -a s=([0]="X") +declare -a a=([0]="X" [1]="Y") +declare -a s=([0]="X" [1]="Y") +declare -a a=([0]="XY") +declare -a s=([0]="XY") +f: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 +f1: after: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +done: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 +f3:1 +f3:2 +f3:3 +f3:4 +f3:5 +f3:6 +f3:7 +f3:8 +f3:9 +f3:10 +f3:11 +f3:12 +f3:13 +f3:14 +f3:15 +f3:16 +f3:17 +f3:18 +f3:19 +f3:20 +before source: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +varenv15.in: before set: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +varenv15.in: after set: a b c d e f g h i j k l m n o p q r s t u v w x y z +after source 1: a b c d e f g h i j k l m n o p q r s t u v w x y z +varenv15.in: before set: one two three four five six seven eight nine ten +varenv15.in: after set: a b c d e f g h i j k l m n o p q r s t u v w x y z +after source 2: a b c d e f g h i j k l m n o p q r s t u v w x y z +foo=showfoo environment foo=showfoo +foo=showfoo environment foo=showfoo +foo=showfoo environment foo=showfoo +outside: foo= + +posix mode +foo=showfoo environment foo=showfoo +outside 1.0: foo= +foo=showfoo environment foo=showfoo +foo=showfoo environment foo=showfoo +outside 1.1: foo= +foo= environment foo= +outside 2.0: foo= +foo=foo environment foo=foo +foo= environment foo= +outside 2.1: foo= +declare -- var="global" +declare -- var +declare -- var="local" +declare -- var="global" +declare -- var="local" +declare -- var +declare -- var="local" +declare -- var +declare -- var="local" +declare -- var +declare -- var="local" +declare -- var="f1" +declare -- var="local" +declare -a arr=([0]="zero" [1]="one" [2]="two" [3]="three" [4]="four" [5]="five") +declare -a arr=([0]="zero" [1]="one" [2]="two") +declare -a arr=([0]="three" [1]="four" [2]="five") +declare -a arr=([0]="zero" [1]="one" [2]="two") +ddd 0 +aaa 1 2 3 +bbb 4 5 6 +ccc 7 8 9 +declare -a x=([0]="one" [1]="two" [2]="three") +./varenv19.sub: line 51: declare: x: not found +declare -x v="x" +declare -x v="t" +declare -- v +declare -x v +ignoreeof on +ignoreeof off +ignoreeof on +10 +match 1 +a=z +a=b +a=z diff --git a/bash-5.1/tests/varenv.tests b/bash-5.1/tests/varenv.tests new file mode 100644 index 0000000000000000000000000000000000000000..b058ed4ff5080ff9295067f88b44ea5b9d14f441 --- /dev/null +++ b/bash-5.1/tests/varenv.tests @@ -0,0 +1,264 @@ +# 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 . +# +# +# varenv.sh +# +# Test the behavior of the shell with respect to variable and environment +# assignments +# +expect() +{ + echo expect "$@" +} + +a=1 +b=2 +c=3 +d=4 +e=5 +f=6 g=7 h=8 + +a=3 b=4 $CHMOD $MODE $FN + +# This should echo "3 4" according to Posix.2 +expect "3 4" +echo $a $b + +set -k + +# Assignment statements made when no words are left affect the shell's +# environment +a=5 b=6 $CHMOD c=7 $MODE d=8 $FN e=9 + +expect "5 6 7 8 9" +echo $a $b $c $d $e + +$CHMOD f=7 $MODE g=8 $FN h=9 +expect "7 8 9" +echo $f $g $h + +set +k + +# The temporary environment does not affect variable expansion, only the +# environment given to the command + +export HOME=/usr/chet +expect $HOME +echo $HOME + +expect $HOME +HOME=/a/b/c /bin/echo $HOME + +expect $HOME +echo $HOME + +# This should echo /a/b/c +expect /a/b/c +HOME=/a/b/c printenv HOME + +set -k + +# This should echo $HOME 9, NOT /a/b/c 9 + +expect "$HOME" +HOME=/a/b/c /bin/echo $HOME c=9 +expect "$HOME 7" +echo $HOME $c + +# I claim the next two echo calls should give identical output. +# ksh agrees, the System V.3 sh does not + +expect "/a/b/c 9 /a/b/c" +HOME=/a/b/c $ECHO a=$HOME c=9 +echo $HOME $c $a + +expect "/a/b/c 9 /a/b/c" +HOME=/a/b/c a=$HOME c=9 +echo $HOME $c $a +set +k + +# How do assignment statements affect subsequent assignments on the same +# line? +expect "/a/b/c /a/b/c" +HOME=/a/b/c a=$HOME +echo $HOME $a + +# The system V.3 sh does this wrong; the last echo should output "1 1", +# but the system V.3 sh has it output "2 2". Posix.2 says the assignment +# statements are processed left-to-right. bash and ksh output the right +# thing +c=1 +d=2 +expect "1 2" +echo $c $d +d=$c c=$d +expect "1 1" +echo $c $d + +# just for completeness +unset d c +expect unset +echo ${d-unset} + +# no output +export a +a=bcde +export a +/bin/true 2>/dev/null + +func() +{ + local YYZ + + YYZ="song by rush" + echo $YYZ + echo $A +} + +YYZ="toronto airport" +A="AVAR" +echo $YYZ +echo $A +A=BVAR func +echo $YYZ +echo $A + +export A +# Make sure expansion doesn't use assignment statements preceding a builtin +A=ZVAR echo $A + +XPATH=/bin:/usr/bin:/usr/local/bin:. +func2() +{ + local z=yy + local -a avar=( ${XPATH//: } ) + echo ${avar[@]} + local +} + +avar=42 +echo $avar +func2 +echo $avar + +# try to set an attribute for an unset variable; make sure it persists +# when the variable is assigned a value +declare -i ivar + +ivar=10 + +declare -p ivar +unset ivar + +# export an unset variable, make sure it is not suddenly set, but make +# sure the export attribute persists when the variable is assigned a +# value +export ivar +echo ${ivar-unset} + +ivar=42 +declare -p ivar + +# make sure set [-+]o ignoreeof and $IGNOREEOF are reflected +unset IGNOREEOF +set +o ignoreeof +set -o ignoreeof +if [ "$IGNOREEOF" -ne 10 ]; then + echo "./varenv.sh: set -o ignoreeof is not reflected in IGNOREEOF" >&2 +fi +unset IGNOREEOF +set +o ignoreeof + +# older versions of bash used to not reset RANDOM in subshells correctly +[[ $RANDOM -eq $(echo $RANDOM) ]] && echo "RANDOM: problem with subshells" + +# make sure that shopt -o is reflected in $SHELLOPTS +# first, get rid of things that might be set automatically via shell +# variables +set +o posix +set +o ignoreeof +set +o monitor +echo $- +echo ${SHELLOPTS} +shopt -so physical +echo $- +echo ${SHELLOPTS} + +# and make sure it is readonly +readonly -p | grep SHELLOPTS + +# This was an error in bash versions prior to bash-2.04. The `set -a' +# should cause the assignment statement that's an argument to typeset +# to create an exported variable +unset FOOFOO +FOOFOO=bar +set -a +typeset FOOFOO=abcde + +printenv FOOFOO + +# test out export behavior of variable assignments preceding builtins and +# functions +$THIS_SH ./varenv1.sub + +# more tests; bugs in bash up to version 2.05a +$THIS_SH ./varenv2.sub + +# more tests; bugs in bash IFS scoping up through version 4.2 +$THIS_SH ./varenv3.sub + +# scoping problems with declare -g through bash-4.2 +${THIS_SH} ./varenv4.sub + +# more scoping and declaration problems with -g and arrays through bash-4.2 +${THIS_SH} ./varenv5.sub + +# variable scoping in the presence of nameref +${THIS_SH} ./varenv6.sub + +# variable declaration problems with arrays and readonly local variables +${THIS_SH} ./varenv7.sub + +# variable visibility problems with process substitution subshells in +# redirections +${THIS_SH} ./varenv8.sub + +# make sure that builtins like readonly and export modify local array variables +# if executed in shell functions, like they modify local scalar variables +${THIS_SH} ./varenv9.sub + +# more tests of unset and local variables with dynamic scoping +${THIS_SH} ./varenv10.sub + +# tests of compound assignments in function scope +${THIS_SH} ./varenv11.sub + +# temporary environment variable propagation and scoping in posix mode +${THIS_SH} ./varenv12.sub + +# temporary environment and invalid shell identifier names +${THIS_SH} ./varenv13.sub + +# localvar_inherit +${THIS_SH} ./varenv14.sub +${THIS_SH} ./varenv15.sub +${THIS_SH} ./varenv16.sub +${THIS_SH} ./varenv17.sub +${THIS_SH} ./varenv18.sub +${THIS_SH} ./varenv19.sub +${THIS_SH} ./varenv20.sub +${THIS_SH} ./varenv21.sub + +# make sure variable scoping is done right +tt() { typeset a=b;echo a=$a; };a=z;echo a=$a;tt;echo a=$a diff --git a/bash-5.1/tests/varenv1.sub b/bash-5.1/tests/varenv1.sub new file mode 100644 index 0000000000000000000000000000000000000000..8def153ad6f9c05aca197108dadb69b248df6c2b --- /dev/null +++ b/bash-5.1/tests/varenv1.sub @@ -0,0 +1,41 @@ +# 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 . +# +# test out the export behavior of variable assignments preceding `eval', `.' +# and shell functions + +func() +{ + printenv var +} + +export var=10 +echo expect 20 +var=20 eval printenv var + +: ${TMPDIR:=/tmp} +TMPFILE=$TMPDIR/evalsub.$$ + +rm -f $TMPFILE +echo 'printenv var' > $TMPFILE + +echo expect 30 +var=30 . $TMPFILE + +rm -f $TMPFILE + +echo expect 40 +var=40 func + +echo expect 50 +var=50 command printenv var diff --git a/bash-5.1/tests/varenv10.sub b/bash-5.1/tests/varenv10.sub new file mode 100644 index 0000000000000000000000000000000000000000..aa0175af4fe3cce72d9ba9d47ee0ad884eb94af3 --- /dev/null +++ b/bash-5.1/tests/varenv10.sub @@ -0,0 +1,59 @@ +# 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 . +# +# +# various tests of unset when applied to variables at different local scopes +# +# function unsetting variable at previous local scope, uncovering global + +inner() +{ + unset res + echo ${FUNCNAME}: ${res-res unset} + if [[ $1 == "set" ]]; then + res[0]="X" + res[1]="Y" + fi +} + +outer() +{ + local res= + inner "$1" + echo ${FUNCNAME}: "res: ${res[@]}" +} + +echo main: ${res-unset} +outer set +echo main: after first call: ${res-unset} +outer dontset +echo main: after second call: ${res-unset} + +unset -f outer inner +unset res + +# local scope, unset variable at the same scope as local declaration +func() +{ + typeset x=4 + + unset x + echo ${FUNCNAME}: ${x:-null or unset} +} + +x=outside +func +echo after func: x = $x + +unset -f func +unset x diff --git a/bash-5.1/tests/varenv11.sub b/bash-5.1/tests/varenv11.sub new file mode 100644 index 0000000000000000000000000000000000000000..638aa2c74069e709e7b2b57d5ce1d10c4337d3dd --- /dev/null +++ b/bash-5.1/tests/varenv11.sub @@ -0,0 +1,43 @@ +# 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 . +# +# couple of errors here +func() +{ + local qux=7 + local qux=(one two) + local what=(zero one two) +} + +readonly qux=42 +func + +func2() +{ + declare -gA foo=([zero]=zero [one]=one) + declare -ga bar=(zero one) +} + +foo=help +bar=me + +func2 + +declare -p foo bar +unset foo bar +func2 +declare -p foo bar + +readonly a=7 +a=(1 2 3) + diff --git a/bash-5.1/tests/varenv12.sub b/bash-5.1/tests/varenv12.sub new file mode 100644 index 0000000000000000000000000000000000000000..92b3692f507a2333475178bb29fe84cf215346a3 --- /dev/null +++ b/bash-5.1/tests/varenv12.sub @@ -0,0 +1,171 @@ +# 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 . +# +set -o posix + +fn() { foo=abc : ; typeset +x foo; printenv|grep ^foo=; } + +fn +unset -v foo +unset -f fn + +func1() { + var=1 + var=2 : # or 'var=2 return', or another special builtin + unset -v var + echo $FUNCNAME: var = $var +} +func2() { + func1 + unset -v var # bug: fails silently +} +func1 +echo ${var+"BUG: still set 1"} + +unset var +func2 +echo ${var+"BUG: still set 2"} + +unset -v var +unset -f func1 func2 + +fn() { foo=abc : ; typeset +x foo; echo -n 'inside: ' ; declare -p foo; } +fn +echo outside: +declare -p foo + +unset -v foo +unset -f fn + +func() +{ + var=value declare -x var + echo -n 'inside: ' ; declare -p var +} + +var=one +func +echo -n 'outside: ' ; declare -p var + +unset -v var +unset -f func + +# this will probably change behavior; export shouldn't behave like this when +# not in posix mode and the sequencing is probably wrong in posix mode. since +# export is a special builtin, the variable assignment should modify the +# local variable, as if a standalone assignment statement had been executed +# (posix modifying "the current execution environment") leaving the global +# variable unchanged. all shells, including bash, modify the local variable; +# bash was the only one that propagates the value out to the calling +# environment, but no longer does so. + +func() +{ + local var=inside + var=value export var + echo -n 'inside: ' ; declare -p var +} + +var=outside +func +echo -n 'outside: ' ; declare -p var + +unset -v var +unset -f func + +func() +{ + local var=local + var=inside : + echo -n 'inside: ' ; declare -p var +} + +var=outside +func +echo -n 'outside: ' ; declare -p var + +unset -v var +unset -f func + +func() +{ + echo -n 'inside func: ' ; echo "var=${var-}" +} + +unset -v var +var=one : +echo -n 'outside 1.0: ' ; echo "var=${var-}" + +unset -v var +var=one eval ':' +echo -n 'outside 1.1: ' ; echo "var=${var-}" + +unset -v var + +var=two func +echo -n 'outside 2.0: ' ; echo "var=${var-}" +var=global +var=two func +echo -n 'outside 2.1: ' ; echo "var=${var-}" + +unset -v var +unset -f func + +func1() +{ + var=value export var + echo -n 'inside func1: ' ; echo "var=${var-}" +} + +var=outside +func1 +echo -n 'outside 3.0: ' ; echo "var=${var-}" + +unset -v var +unset -f func1 + +func2() +{ + local var=local + var=global : + echo -n 'inside func2: ' ; echo "var=${var-}" +} + +var=outside +func2 +echo -n 'outside 4.0: ' ; echo "var=${var-}" + +unset -v var +unset -f fecho foo bar + +fecho() { + echo $var +} + +foo() { + local var="foo: bye bye" + var="foo: hello world" fecho +} + +bar() { + var="bar: hello world" fecho +} + +var=global +var=outside foo +echo after foo: var=$var +var=global +var=outside bar +echo after bar: var=$var + +unset -v var diff --git a/bash-5.1/tests/varenv13.sub b/bash-5.1/tests/varenv13.sub new file mode 100644 index 0000000000000000000000000000000000000000..1f837ec7fd2f116ec6a4fa151e84f6a30728442d --- /dev/null +++ b/bash-5.1/tests/varenv13.sub @@ -0,0 +1,36 @@ +# 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 . +# +f() { declare -p ${!var*} | grep ^var; declare -p var ; } + +var[0]=X var[@]=Y f + +unset -f f +unset -v var + +typeset -A var + +f() { declare -p ${!var*}; } + +var[0]=X var[@]=Y +f + +: ${THIS_SH:=./bash} +env 'v[0]=help' ${THIS_SH} -c 'printenv "v[0]"' + +unset -v var + +f() { test -v 'var[0]'; echo $?; } +var[0]=X f + +unset -v var diff --git a/bash-5.1/tests/varenv14.sub b/bash-5.1/tests/varenv14.sub new file mode 100644 index 0000000000000000000000000000000000000000..091c47004a684035fa2b282bf7aebd3fcec8f36b --- /dev/null +++ b/bash-5.1/tests/varenv14.sub @@ -0,0 +1,46 @@ +# 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 . +# +# testing framework for local variable inheritance + +shopt -s localvar_inherit +declare -A var + +f() { declare var+=([0]=X); declare -p var; } +f + +f() { declare var=([Y]=Y); declare -p var; }; f +f() { declare var+=([Y]=Y); declare -p var; }; f +f() { declare var+=(); declare -p var; }; f +f() { declare var=(); declare -p var; }; f + +unset -f f +unset -v var + +declare -a var=( [0]=12 ) +f() { declare -A var+=([0]=X); declare -p var; } +f + +unset -f f +unset a s + +a=(X) s=X + +f() { local -a a s; declare -p a s; } +f + +f() { local a+=(Y) s+=(Y); declare -p a s; } +f + +f() { local -a a+=Y s+=Y; declare -p a s; } +f diff --git a/bash-5.1/tests/varenv15.in b/bash-5.1/tests/varenv15.in new file mode 100644 index 0000000000000000000000000000000000000000..e635b12a31b827dbf30fba7a653b4f74abb81ea0 --- /dev/null +++ b/bash-5.1/tests/varenv15.in @@ -0,0 +1,3 @@ +echo varenv15.in: before set: "$@" +set -- a b c d e f g h i j k l m n o p q r s t u v w x y z +echo varenv15.in: after set: "$@" diff --git a/bash-5.1/tests/varenv15.sub b/bash-5.1/tests/varenv15.sub new file mode 100644 index 0000000000000000000000000000000000000000..4c9ef0e40cc5562a1ad09b84903437a54e304ea6 --- /dev/null +++ b/bash-5.1/tests/varenv15.sub @@ -0,0 +1,51 @@ +# 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 . +# +# check saving and restoring positional parameters around function calls + +f() +{ + echo $FUNCNAME: "$@" +} + +f1() +{ + f {1..50} + echo $FUNCNAME: after: $@ +} + +set -- {1..100} + +f1 {1..20} +echo done: $@ + +f3() +{ + echo $FUNCNAME:$1 + shift + if [ $# -le 0 ]; then + return + fi + f3 "$@" +} + +f3 {1..20} + +# now let's try source with and without positional parameters + +set -- {1..20} +echo before source: "$@" +. ./varenv15.in +echo after source 1: "$@" +. ./varenv15.in one two three four five six seven eight nine ten +echo after source 2: "$@" diff --git a/bash-5.1/tests/varenv16.sub b/bash-5.1/tests/varenv16.sub new file mode 100644 index 0000000000000000000000000000000000000000..847926c9bb30f9fcb1836df77f4ae0a1522e82f2 --- /dev/null +++ b/bash-5.1/tests/varenv16.sub @@ -0,0 +1,51 @@ +# 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 . +# +# test whether or not temporary environment assignments are exported +# in posix mode. works now, posix says it will not work in the future + +show2() +{ + printf %s "foo=${foo-}" + echo -n ' environment foo=' + printenv foo || echo +} + +showfoo() +{ + local foo + + foo=showfoo show2 +} + +unset foo +showfoo +foo=foo showfoo +showfoo +echo outside: "foo=${foo-}" + +echo ; echo 'posix mode' +set -o posix +unset foo +showfoo +echo outside 1.0: "foo=${foo-}" +foo=foo showfoo +showfoo +echo outside 1.1: "foo=${foo-}" + +unset foo +show2 +echo outside 2.0: "foo=${foo-}" +foo=foo show2 +show2 +echo outside 2.1: "foo=${foo-}" diff --git a/bash-5.1/tests/varenv17.sub b/bash-5.1/tests/varenv17.sub new file mode 100644 index 0000000000000000000000000000000000000000..1f9278cfa7cc7d85f951440266eedead9ff0d05c --- /dev/null +++ b/bash-5.1/tests/varenv17.sub @@ -0,0 +1,44 @@ +# 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 . +# + +# testing -I and local variable inheritance +var=global + +f() +{ + local $1 var + declare -p var + + var=local + declare -p var +} + +declare -I var +declare -p var + +f +f -I +unset var +f +f -I + +f1() +{ + var=$FUNCNAME + + f + f -I +} + +f1 diff --git a/bash-5.1/tests/varenv18.sub b/bash-5.1/tests/varenv18.sub new file mode 100644 index 0000000000000000000000000000000000000000..4ad7f1a46a003a3171793236355d2f0a70c1e02d --- /dev/null +++ b/bash-5.1/tests/varenv18.sub @@ -0,0 +1,41 @@ +# 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 . +# + +arr=(zero one two) +four=four + +f() +{ + local -a arr=( "${arr[@]}" ) + arr+=(three four five) + declare -p arr +} +f +declare -p arr + +f1() +{ + local -a arr=(three $four five) + declare -p arr +} +f1 + +set -u +name='arr[@]' +f2() +{ + local -a arr=("${!name}") + declare -p arr +} +f2 diff --git a/bash-5.1/tests/varenv19.sub b/bash-5.1/tests/varenv19.sub new file mode 100644 index 0000000000000000000000000000000000000000..753f508cd2ae393c418093067bd433bd3cb8a67e --- /dev/null +++ b/bash-5.1/tests/varenv19.sub @@ -0,0 +1,51 @@ +# 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 . +# + +# variable attribute inheritance problems without specifying -a or -A + +function aaa() { + local x='1 2 3' + echo "aaa ${x}" +} + +function bbb { + local x + x=(4 5 6) + echo "bbb ${x[*]}" +} + +ccc() +{ + local x=(7 8 9) + echo "ccc ${x[*]}" +} + +function ddd +{ + local -r x='0' + echo "ddd ${x}" + aaa + bbb + ccc +} + +ddd + +f() +{ + local x=(one two three) + declare -p x +} +f +declare -p x diff --git a/bash-5.1/tests/varenv2.sub b/bash-5.1/tests/varenv2.sub new file mode 100644 index 0000000000000000000000000000000000000000..0fde5b20decd90243c0c83ab516e925dd328739c --- /dev/null +++ b/bash-5.1/tests/varenv2.sub @@ -0,0 +1,57 @@ +# 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 . +# +fff() +{ + typeset i=0 x=10 + echo "|$i|$x|" + export x + printenv x +} + +fff2() +{ + echo "|$x|" + export x + printenv x +} + +fff3() +{ + typeset i=0 x="${x-10}" + echo "|$i|$x|" +} + +fff4() +{ + typeset i=0 x + x="${x-10}" + echo "|$i|$x|" +} + +fff5() +{ + z=y typeset z + echo "|$z|" +} + +fff +x=10 fff +x=1 fff +x=4 fff2 +x=11 fff3 +echo after fff3: x=$x +x=12 fff4 + +fff5 +z=42 fff5 diff --git a/bash-5.1/tests/varenv20.sub b/bash-5.1/tests/varenv20.sub new file mode 100644 index 0000000000000000000000000000000000000000..5fba8c4c1f537f00b836432247a77871e95a09a0 --- /dev/null +++ b/bash-5.1/tests/varenv20.sub @@ -0,0 +1,13 @@ +# tests of local variables with the same name as variables passed in the +# temporary environment + +f() { local v=x; local -p; } +v=t f + +f() { local v; declare -p v; } +v=t f + +f() { local v=x; unset v; declare -p v; } +v=g +f +v=t f diff --git a/bash-5.1/tests/varenv21.sub b/bash-5.1/tests/varenv21.sub new file mode 100644 index 0000000000000000000000000000000000000000..613e475924f565e95e01c39766e2a1a221d2591d --- /dev/null +++ b/bash-5.1/tests/varenv21.sub @@ -0,0 +1,48 @@ +# 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 . +# +# test behavior of `local -' inside shell functions + +IGNOREEOF=0 +shopt -o ignoreeof + +f() +{ + local - + set +o ignoreeof + shopt -o ignoreeof +} + +f +shopt -o ignoreeof +echo $IGNOREEOF + +unset -f f + +f() +{ + local - + set -m -H +B + set -u +} + +before="$-|$SHELLOPTS" +f +after="$-|$SHELLOPTS" + +case "$after" in +$before) echo match 1 ;; +*) echo bad 1 ;; +esac + +unset -f f diff --git a/bash-5.1/tests/varenv3.sub b/bash-5.1/tests/varenv3.sub new file mode 100644 index 0000000000000000000000000000000000000000..854e483d226327e966b7aa3669fe87c880e49680 --- /dev/null +++ b/bash-5.1/tests/varenv3.sub @@ -0,0 +1,44 @@ +# 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 . +# + +oifs=$IFS + +inner () { +#recho inner: "$IFS" >&2 + echo a/b/c/d + exit 0 +} + +outer() { +#recho outer: "$IFS" >&2 +for i in 1; do + IFS=/ read m v k a < <(IFS=$oifs inner) + +echo $m:$v:$k:$a +done +} + +outer +unset m k v a b c d + +for j in 1; do + IFS=: read a b c d +done < <(outer) + +echo $a-$b-$c-$d +unset m k v a b c d + +IFS=: read a b c d < <(outer) + +echo $a:$b:$c:$d diff --git a/bash-5.1/tests/varenv4.sub b/bash-5.1/tests/varenv4.sub new file mode 100644 index 0000000000000000000000000000000000000000..9735b6178726a25917ca47064e744f99a61d00b5 --- /dev/null +++ b/bash-5.1/tests/varenv4.sub @@ -0,0 +1,71 @@ +# 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 . +# +f() +{ + local -a v + local -a w + + g + echo "f: ${v[@]}, ${w[@]}" +} + +g() +{ + aux=v + declare -ga "$aux=( asdf fdsa )" + declare -ga w=( asdf fdsa ) + + echo "g: ${v[@]}, ${w[@]}" +} + +f +echo "FIN: ${v[@]}, ${w[@]}" + +unset v w +unset -f f g + +f() +{ + local v + local w + + g + echo f: v = $v, w = $w +} + +g() +{ + aux=v + declare -g w=one + declare -g "$aux=two" + + echo g: v = $v, w = $w +} + +f +echo FIN: v = $v, w = $w + +# problem with error return propagation through bash-4.3 +unset -f aaa bbb +unset unique + +aaa() { + declare -g -a unique=() +} +bbb() { + declare -g -A unique=() +} +aaa +bbb +echo after bbb: $? diff --git a/bash-5.1/tests/varenv5.sub b/bash-5.1/tests/varenv5.sub new file mode 100644 index 0000000000000000000000000000000000000000..b6eb70c2fe75fc1abc47d81d0b9b9d98ad7ee308 --- /dev/null +++ b/bash-5.1/tests/varenv5.sub @@ -0,0 +1,29 @@ +# 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 . +# +function foobar { + declare -rgA FOOBAR=([foo]=bar) + declare -p FOOBAR +} +foobar +declare -p FOOBAR + +unset -f foobar + +foobar() { + declare -rga FOOBAR2=([foo]=bar) + declare -p FOOBAR2 +} + +foobar +declare -p FOOBAR2 diff --git a/bash-5.1/tests/varenv6.sub b/bash-5.1/tests/varenv6.sub new file mode 100644 index 0000000000000000000000000000000000000000..8cf21f725b8b80ad1fed9b8923fbea4ae15dea25 --- /dev/null +++ b/bash-5.1/tests/varenv6.sub @@ -0,0 +1,41 @@ +# 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 . +# +f() +{ + local str=F + g str +} + +g() +{ + local -n ref=$1 + printf "%s " "$ref" + ref=G +} + +str=OUTSIDE; +f + +printf "%s\n" "$str" + +unset -f f g +unset str + +f() { local -a arr=(F); g arr; }; + +g() { local -n ref=$1; printf "%s " "${ref[0]}"; ref=(G); }; + +arr=(OUTSIDE); +f; +printf "%s\n" "${arr[0]}" diff --git a/bash-5.1/tests/varenv7.sub b/bash-5.1/tests/varenv7.sub new file mode 100644 index 0000000000000000000000000000000000000000..4b25960612aedf4cde622750960e34fd271a8c92 --- /dev/null +++ b/bash-5.1/tests/varenv7.sub @@ -0,0 +1,75 @@ +# 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 . +# +foo() +{ + local -a myvar=() + local -r myvar=0 + + echo "${myvar[@]}" + declare -p myvar +} + +foo2() +{ + local -i myvar=0 + local -r myvar=1 + + echo "${myvar}" + declare -p myvar +} + +declare -a outside=() +declare -r outside +declare -p outside + +outside1=1 +declare -ir outside1 +declare -p outside1 + +tempenv=foo declare -r tempenv +echo tempenv = $tempenv + +foo +foo2 + +tempvar1=foo declare -r tempvar1 +echo ${tempvar1@A} + +tempvar2=bar declare -r tempvar2=qux +echo ${tempvar2@A} + +unset foo +readonly var=outside + +func() +{ + local var=inside + echo "inside: $var" +} + +func +echo outside: $var + +unset -f f +unset VAR1 VAR2 +export VAR1=abc VAR2=abc + +f() +{ + local VAR1; local VAR2 + echo local: ${VAR1-unset1} ${VAR2-unset2} + printenv VAR1 ; printenv VAR2 +} + +f diff --git a/bash-5.1/tests/varenv8.sub b/bash-5.1/tests/varenv8.sub new file mode 100644 index 0000000000000000000000000000000000000000..cad2c6e99bb713964de40240569428e4d77ca9d8 --- /dev/null +++ b/bash-5.1/tests/varenv8.sub @@ -0,0 +1,14 @@ +FOO=bar cat < <(echo $FOO:1; echo $FOO:2) +echo after: --${FOO}-- + +unset FOO +FOO=global + +FOO=bar cat < <(echo $FOO:1; echo $FOO:2) +echo after: --${FOO}-- + +unset FOO +FOO=bar read x < <(echo -n $FOO:1; echo $FOO:2) +echo after: --${FOO}-- +echo x = $x + diff --git a/bash-5.1/tests/varenv9.sub b/bash-5.1/tests/varenv9.sub new file mode 100644 index 0000000000000000000000000000000000000000..5837aa545a0518e1c909f94d13776d1384cc441c --- /dev/null +++ b/bash-5.1/tests/varenv9.sub @@ -0,0 +1,79 @@ +# 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 . +# +# case 1: readonly modifying local scalar variables +o1() { + local i1 j1 + readonly i1=$1 + readonly j1="1 2 3" + + echo "in o1 (readonly modifying local scalars):" + declare -p i1 + declare -p j1 +} + +o1 "a b c" + +echo after o1: +declare -p i1 j1 + +unset i1 j1 + +# case 2: readonly setting global scalar variables +o2() { + readonly i2=$1 + readonly j2="1 2 3" + + echo "in o2 (readonly setting global scalars):" + declare -p i2 + declare -p j2 +} + +o2 "a b c" +echo after o2: +declare -p i2 j2 + +unset i2 j2 + +# case 3: readonly modifying local variables, converting to arrays +o3() { + local i3 j3 + readonly i3=($1) + readonly j3=(1 2 3) + + echo "in o3 (readonly modifying locals, converting to arrays):" + declare -p i3 + declare -p j3 +} + +o3 "a b c" +echo after o3: +declare -p i3 j3 + +unset i3 j3 + +# case 4: readonly setting global array variables +o4() { + readonly i4=($1) + readonly j4=(1 2 3) + + echo "in o4 (readonly setting global array variables):" + declare -p i4 + declare -p j4 +} + +o4 "a b c" +echo after o4: +declare -p i4 j4 + +unset i4 j4 diff --git a/bash-5.1/tests/version b/bash-5.1/tests/version new file mode 100644 index 0000000000000000000000000000000000000000..9ad08f7d4a5ce9e8e708f2d271725f697e26e5f8 --- /dev/null +++ b/bash-5.1/tests/version @@ -0,0 +1,13 @@ +if (( $UID == 0 )); then + echo "${THIS_SH}: the test suite should not be run as root" >&2 + echo +fi + +echo Testing ${THIS_SH} + +echo version: $BASH_VERSION +echo versinfo: ${BASH_VERSINFO[@]} + +echo HOSTTYPE = $HOSTTYPE +echo OSTYPE = $OSTYPE +echo MACHTYPE = $MACHTYPE diff --git a/bash-5.1/tests/version.mini b/bash-5.1/tests/version.mini new file mode 100644 index 0000000000000000000000000000000000000000..637565ea920a040dca9f3ebe0ff6ab76eba0f4f7 --- /dev/null +++ b/bash-5.1/tests/version.mini @@ -0,0 +1,13 @@ +if (( $UID == 0 )); then + echo "${THIS_SH}: the test suite should not be run as root" >&2 + echo +fi + +echo Testing ${THIS_SH} + +echo version: $BASH_VERSION +#echo versinfo: ${BASH_VERSINFO[@]} + +echo HOSTTYPE = $HOSTTYPE +echo OSTYPE = $OSTYPE +echo MACHTYPE = $MACHTYPE diff --git a/bash-5.1/tests/vredir.right b/bash-5.1/tests/vredir.right new file mode 100644 index 0000000000000000000000000000000000000000..b2c4cc9c5a69b77e30b93a89953b3790cd8e9f52 --- /dev/null +++ b/bash-5.1/tests/vredir.right @@ -0,0 +1,100 @@ +10 +foo 1 +foo 2 +foo 3 +bar is a function +bar () +{ + exec {v}> $TMPFILE; + echo $v +} +./vredir.tests: line 19: v: readonly variable +./vredir.tests: line 19: v: cannot assign fd to variable +42 +bar is a function +bar () +{ + exec {v}> $TMPFILE; + echo $v +} +10 +line 1 +line 2 +line 3 +bar is a function +bar () +{ + exec {v}<&- +} +iclosev is a function +iclosev () +{ + exec {v}>&- +} +/bin/bash +/bin/csh +/bin/ksh +/bin/sh +/bin/tcsh +/bin/zsh +./vredir3.sub: line 4: v: ambiguous redirect +after +10 11 +a +a +swizzle is a function +swizzle () +{ + fd0=0; + fd1=1; + exec {stdin}<&$fd0; + exec {stdout}>&$fd1 +} +12 10 +a +a +swizzle is a function +swizzle () +{ + exec {fd0}<&0; + exec {fd1}>&1; + exec {stdin}<&$fd0-; + exec {stdout}>&$fd1- +} +ok 1 +./vredir6.sub: redirection error: cannot duplicate fd: Invalid argument +./vredir6.sub: line 13: /dev/null: Invalid argument +unset +12 10 +a +a +swizzle is a function +swizzle () +{ + exec {fd[0]}<&0; + exec {fd[1]}>&1; + exec {stdin}<&${fd[0]}-; + exec {stdout}>&${fd[1]}- +} diff --git a/bash-5.1/tests/vredir.tests b/bash-5.1/tests/vredir.tests new file mode 100644 index 0000000000000000000000000000000000000000..ea59eecd39450416569772aadbcdbe598ac5263b --- /dev/null +++ b/bash-5.1/tests/vredir.tests @@ -0,0 +1,61 @@ +# 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 . +# +: ${TMPDIR:=/var/tmp} +TMPFILE=$TMPDIR/foo + +bar() +{ +exec {v}>$TMPFILE +echo $v +} + +bar + +echo foo 1 >&$v +echo foo 2 >&$v +echo foo 3 >&$v + +cat $TMPFILE +rm -f $TMPFILE + +type bar +exec {v}>&- + +readonly v=42 +bar + +echo foo 1 2>&1 >&$v | { grep -q '\$v: Bad' || echo 'bad foo 1'; } +echo foo 2 2>&1 >&$v | { grep -q '\$v: Bad' || echo 'bad foo 2'; } +echo foo 3 2>&1 >&$v | { grep -q '\$v: Bad' || echo 'bad foo 3'; } + +cat $TMPFILE +rm -f $TMPFILE + +type bar + +${THIS_SH} ./vredir1.sub + +${THIS_SH} ./vredir2.sub + +${THIS_SH} ./vredir3.sub + +${THIS_SH} ./vredir4.sub + +${THIS_SH} ./vredir5.sub + +${THIS_SH} ./vredir6.sub + +${THIS_SH} ./vredir7.sub + +exit 0 diff --git a/bash-5.1/tests/vredir1.sub b/bash-5.1/tests/vredir1.sub new file mode 100644 index 0000000000000000000000000000000000000000..484f313b4a26b0034ccb84fa9081041b54d7d801 --- /dev/null +++ b/bash-5.1/tests/vredir1.sub @@ -0,0 +1,30 @@ +# 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 . +# +bar() +{ +exec {v}<. +# +: ${TMPDIR:=/var/tmp} +SHELLSFILE=$TMPDIR/shells-$$ + +cat > $TMPDIR/shells-$$ <&- +} + +iclosev() +{ +exec {v}<&- +} + +exec {v}>&1 +echo $v + +echo foo 1 >&$v +echo foo 2 >&$v +echo foo 3 >&$v + +oclosev + +exec {v}<$SHELLSFILE +echo $v + +while read line <&$v +do + echo $line +done + +iclosev + +type oclosev +type iclosev + +while read -r -u ${fd} +do + echo $REPLY +done {fd}<$SHELLSFILE + +rm -f $SHELLSFILE + +exit 0 diff --git a/bash-5.1/tests/vredir3.sub b/bash-5.1/tests/vredir3.sub new file mode 100644 index 0000000000000000000000000000000000000000..358ded219f97ff402a1c1cf714d4ae79f5f94566 --- /dev/null +++ b/bash-5.1/tests/vredir3.sub @@ -0,0 +1,8 @@ +# Right now, the {varname} mechanism does not honor set -u for compatibility +unset v +set -u +exec {v}>&- + +echo after + +exit 0 diff --git a/bash-5.1/tests/vredir4.sub b/bash-5.1/tests/vredir4.sub new file mode 100644 index 0000000000000000000000000000000000000000..f861bcfc8d02c3cf235619664804776f088c3da5 --- /dev/null +++ b/bash-5.1/tests/vredir4.sub @@ -0,0 +1,35 @@ +# 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 . +# +swizzle() +{ +fd0=0 +fd1=1 + +exec {stdin}<&$fd0 +exec {stdout}>&$fd1 +} + +swizzle +echo $stdin $stdout + +read line <&$stdin <&$stdout + +type swizzle + +exit 0 diff --git a/bash-5.1/tests/vredir5.sub b/bash-5.1/tests/vredir5.sub new file mode 100644 index 0000000000000000000000000000000000000000..beb45ac2ecf48f099265f34d63d0e35f197bf013 --- /dev/null +++ b/bash-5.1/tests/vredir5.sub @@ -0,0 +1,36 @@ +# 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 . +# +swizzle() +{ +exec {fd0}<&0 +exec {fd1}>&1 + +exec {stdin}<&$fd0- +exec {stdout}>&$fd1- +} + +swizzle + +echo $stdin $stdout + +read line <&$stdin <&$stdout + +type swizzle + +exit 0 diff --git a/bash-5.1/tests/vredir6.sub b/bash-5.1/tests/vredir6.sub new file mode 100644 index 0000000000000000000000000000000000000000..224b96a35af9cde9fed8bffaf98910df6c7f9a10 --- /dev/null +++ b/bash-5.1/tests/vredir6.sub @@ -0,0 +1,14 @@ +unset v +exec {v}= 10 )); then echo ok 1; else echo bad 1; fi + +exec {v}<&- + +ulimit -n 6 + +exec . +# +swizzle() +{ +exec {fd[0]}<&0 +exec {fd[1]}>&1 + +exec {stdin}<&${fd[0]}- +exec {stdout}>&${fd[1]}- +} + +swizzle + +echo $stdin $stdout + +read line <&$stdin <&$stdout + +type swizzle + +exit 0 diff --git a/bash-5.1/trap.c b/bash-5.1/trap.c new file mode 100644 index 0000000000000000000000000000000000000000..c7f8ded56f7dbe20d4178853bca0f478bad6efbb --- /dev/null +++ b/bash-5.1/trap.c @@ -0,0 +1,1453 @@ +/* trap.c -- Not the trap command, but useful functions for manipulating + those objects. The trap command is in builtins/trap.def. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashtypes.h" +#include "bashansi.h" + +#include +#include + +#include "bashintl.h" + +#include + +#include "trap.h" + +#include "shell.h" +#include "execute_cmd.h" +#include "flags.h" +#include "parser.h" +#include "input.h" /* for save_token_state, restore_token_state */ +#include "jobs.h" +#include "signames.h" +#include "builtins.h" +#include "builtins/common.h" +#include "builtins/builtext.h" + +#if defined (READLINE) +# include +# include "bashline.h" +#endif + +#ifndef errno +extern int errno; +#endif + +/* Flags which describe the current handling state of a signal. */ +#define SIG_INHERITED 0x0 /* Value inherited from parent. */ +#define SIG_TRAPPED 0x1 /* Currently trapped. */ +#define SIG_HARD_IGNORE 0x2 /* Signal was ignored on shell entry. */ +#define SIG_SPECIAL 0x4 /* Treat this signal specially. */ +#define SIG_NO_TRAP 0x8 /* Signal cannot be trapped. */ +#define SIG_INPROGRESS 0x10 /* Signal handler currently executing. */ +#define SIG_CHANGED 0x20 /* Trap value changed in trap handler. */ +#define SIG_IGNORED 0x40 /* The signal is currently being ignored. */ + +#define SPECIAL_TRAP(s) ((s) == EXIT_TRAP || (s) == DEBUG_TRAP || (s) == ERROR_TRAP || (s) == RETURN_TRAP) + +/* An array of such flags, one for each signal, describing what the + shell will do with a signal. DEBUG_TRAP == NSIG; some code below + assumes this. */ +static int sigmodes[BASH_NSIG]; + +static void free_trap_command (int); +static void change_signal (int, char *); + +static int _run_trap_internal (int, char *); + +static void free_trap_string (int); +static void reset_signal (int); +static void restore_signal (int); +static void reset_or_restore_signal_handlers (sh_resetsig_func_t *); + +static void trap_if_untrapped (int, char *); + +/* Variables used here but defined in other files. */ +extern procenv_t alrmbuf; + +extern volatile int from_return_trap; +extern int waiting_for_child; + +extern WORD_LIST *subst_assign_varlist; + +/* The list of things to do originally, before we started trapping. */ +SigHandler *original_signals[NSIG]; + +/* For each signal, a slot for a string, which is a command to be + executed when that signal is received. The slot can also contain + DEFAULT_SIG, which means do whatever you were going to do before + you were so rudely interrupted, or IGNORE_SIG, which says ignore + this signal. */ +char *trap_list[BASH_NSIG]; + +/* A bitmap of signals received for which we have trap handlers. */ +int pending_traps[NSIG]; + +/* Set to the number of the signal we're running the trap for + 1. + Used in execute_cmd.c and builtins/common.c to clean up when + parse_and_execute does not return normally after executing the + trap command (e.g., when `return' is executed in the trap command). */ +int running_trap; + +/* Set to last_command_exit_value before running a trap. */ +int trap_saved_exit_value; + +/* The (trapped) signal received while executing in the `wait' builtin */ +int wait_signal_received; + +int trapped_signal_received; + +/* Set to 1 to suppress the effect of `set v' in the DEBUG trap. */ +int suppress_debug_trap_verbose = 0; + +#define GETORIGSIG(sig) \ + do { \ + original_signals[sig] = (SigHandler *)set_signal_handler (sig, SIG_DFL); \ + set_signal_handler (sig, original_signals[sig]); \ + if (original_signals[sig] == SIG_IGN) \ + sigmodes[sig] |= SIG_HARD_IGNORE; \ + } while (0) + +#define SETORIGSIG(sig,handler) \ + do { \ + original_signals[sig] = handler; \ + if (original_signals[sig] == SIG_IGN) \ + sigmodes[sig] |= SIG_HARD_IGNORE; \ + } while (0) + +#define GET_ORIGINAL_SIGNAL(sig) \ + if (sig && sig < NSIG && original_signals[sig] == IMPOSSIBLE_TRAP_HANDLER) \ + GETORIGSIG(sig) + +void +initialize_traps () +{ + register int i; + + initialize_signames(); + + trap_list[EXIT_TRAP] = trap_list[DEBUG_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL; + sigmodes[EXIT_TRAP] = sigmodes[DEBUG_TRAP] = sigmodes[ERROR_TRAP] = sigmodes[RETURN_TRAP] = SIG_INHERITED; + original_signals[EXIT_TRAP] = IMPOSSIBLE_TRAP_HANDLER; + + for (i = 1; i < NSIG; i++) + { + pending_traps[i] = 0; + trap_list[i] = (char *)DEFAULT_SIG; + sigmodes[i] = SIG_INHERITED; /* XXX - only set, not used */ + original_signals[i] = IMPOSSIBLE_TRAP_HANDLER; + } + + /* Show which signals are treated specially by the shell. */ +#if defined (SIGCHLD) + GETORIGSIG (SIGCHLD); + sigmodes[SIGCHLD] |= (SIG_SPECIAL | SIG_NO_TRAP); +#endif /* SIGCHLD */ + + GETORIGSIG (SIGINT); + sigmodes[SIGINT] |= SIG_SPECIAL; + +#if defined (__BEOS__) + /* BeOS sets SIGINT to SIG_IGN! */ + original_signals[SIGINT] = SIG_DFL; + sigmodes[SIGINT] &= ~SIG_HARD_IGNORE; +#endif + + GETORIGSIG (SIGQUIT); + sigmodes[SIGQUIT] |= SIG_SPECIAL; + + if (interactive) + { + GETORIGSIG (SIGTERM); + sigmodes[SIGTERM] |= SIG_SPECIAL; + } + + get_original_tty_job_signals (); +} + +#ifdef DEBUG +/* Return a printable representation of the trap handler for SIG. */ +static char * +trap_handler_string (sig) + int sig; +{ + if (trap_list[sig] == (char *)DEFAULT_SIG) + return "DEFAULT_SIG"; + else if (trap_list[sig] == (char *)IGNORE_SIG) + return "IGNORE_SIG"; + else if (trap_list[sig] == (char *)IMPOSSIBLE_TRAP_HANDLER) + return "IMPOSSIBLE_TRAP_HANDLER"; + else if (trap_list[sig]) + return trap_list[sig]; + else + return "NULL"; +} +#endif + +/* Return the print name of this signal. */ +char * +signal_name (sig) + int sig; +{ + char *ret; + + /* on cygwin32, signal_names[sig] could be null */ + ret = (sig >= BASH_NSIG || sig < 0 || signal_names[sig] == NULL) + ? _("invalid signal number") + : signal_names[sig]; + + return ret; +} + +/* Turn a string into a signal number, or a number into + a signal number. If STRING is "2", "SIGINT", or "INT", + then (int)2 is returned. Return NO_SIG if STRING doesn't + contain a valid signal descriptor. */ +int +decode_signal (string, flags) + char *string; + int flags; +{ + intmax_t sig; + char *name; + + if (legal_number (string, &sig)) + return ((sig >= 0 && sig < NSIG) ? (int)sig : NO_SIG); + +#if defined (SIGRTMIN) && defined (SIGRTMAX) + if (STREQN (string, "SIGRTMIN+", 9) || ((flags & DSIG_NOCASE) && strncasecmp (string, "SIGRTMIN+", 9) == 0)) + { + if (legal_number (string+9, &sig) && sig >= 0 && sig <= SIGRTMAX - SIGRTMIN) + return (SIGRTMIN + sig); + else + return NO_SIG; + } + else if (STREQN (string, "RTMIN+", 6) || ((flags & DSIG_NOCASE) && strncasecmp (string, "RTMIN+", 6) == 0)) + { + if (legal_number (string+6, &sig) && sig >= 0 && sig <= SIGRTMAX - SIGRTMIN) + return (SIGRTMIN + sig); + else + return NO_SIG; + } +#endif /* SIGRTMIN && SIGRTMAX */ + + /* A leading `SIG' may be omitted. */ + for (sig = 0; sig < BASH_NSIG; sig++) + { + name = signal_names[sig]; + if (name == 0 || name[0] == '\0') + continue; + + /* Check name without the SIG prefix first case sensitively or + insensitively depending on whether flags includes DSIG_NOCASE */ + if (STREQN (name, "SIG", 3)) + { + name += 3; + + if ((flags & DSIG_NOCASE) && strcasecmp (string, name) == 0) + return ((int)sig); + else if ((flags & DSIG_NOCASE) == 0 && strcmp (string, name) == 0) + return ((int)sig); + /* If we can't use the `SIG' prefix to match, punt on this + name now. */ + else if ((flags & DSIG_SIGPREFIX) == 0) + continue; + } + + /* Check name with SIG prefix case sensitively or insensitively + depending on whether flags includes DSIG_NOCASE */ + name = signal_names[sig]; + if ((flags & DSIG_NOCASE) && strcasecmp (string, name) == 0) + return ((int)sig); + else if ((flags & DSIG_NOCASE) == 0 && strcmp (string, name) == 0) + return ((int)sig); + } + + return (NO_SIG); +} + +/* Non-zero when we catch a trapped signal. */ +static int catch_flag; + +void +run_pending_traps () +{ + register int sig; + int old_exit_value, x; + int old_running; + WORD_LIST *save_subst_varlist; + HASH_TABLE *save_tempenv; + sh_parser_state_t pstate; +#if defined (ARRAY_VARS) + ARRAY *ps; +#endif + + if (catch_flag == 0) /* simple optimization */ + return; + + if (running_trap > 0) + { +#if defined (DEBUG) + internal_warning ("run_pending_traps: recursive invocation while running trap for signal %d", running_trap-1); +#endif +#if defined (SIGWINCH) + if (running_trap == SIGWINCH+1 && pending_traps[SIGWINCH]) + return; /* no recursive SIGWINCH trap invocations */ +#endif + /* could check for running the trap handler for the same signal here + (running_trap == sig+1) */ + if (evalnest_max > 0 && evalnest > evalnest_max) + { + internal_error (_("trap handler: maximum trap handler level exceeded (%d)"), evalnest_max); + evalnest = 0; + jump_to_top_level (DISCARD); + } + } + + catch_flag = trapped_signal_received = 0; + + /* Preserve $? when running trap. */ + trap_saved_exit_value = old_exit_value = last_command_exit_value; +#if defined (ARRAY_VARS) + ps = save_pipestatus_array (); +#endif + old_running = running_trap; + + for (sig = 1; sig < NSIG; sig++) + { + /* XXX this could be made into a counter by using + while (pending_traps[sig]--) instead of the if statement. */ + if (pending_traps[sig]) + { + if (running_trap == sig+1) + /*continue*/; + + running_trap = sig + 1; + + if (sig == SIGINT) + { + pending_traps[sig] = 0; /* XXX */ + /* We don't modify evalnest here, since run_interrupt_trap() calls + _run_trap_internal, which does. */ + run_interrupt_trap (0); + CLRINTERRUPT; /* interrupts don't stack */ + } +#if defined (JOB_CONTROL) && defined (SIGCHLD) + else if (sig == SIGCHLD && + trap_list[SIGCHLD] != (char *)IMPOSSIBLE_TRAP_HANDLER && + (sigmodes[SIGCHLD] & SIG_INPROGRESS) == 0) + { + sigmodes[SIGCHLD] |= SIG_INPROGRESS; + /* We modify evalnest here even though run_sigchld_trap can run + the trap action more than once */ + evalnest++; + x = pending_traps[sig]; + pending_traps[sig] = 0; + run_sigchld_trap (x); /* use as counter */ + running_trap = 0; + evalnest--; + sigmodes[SIGCHLD] &= ~SIG_INPROGRESS; + /* continue here rather than reset pending_traps[SIGCHLD] below in + case there are recursive calls to run_pending_traps and children + have been reaped while run_sigchld_trap was running. */ + continue; + } + else if (sig == SIGCHLD && + trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER && + (sigmodes[SIGCHLD] & SIG_INPROGRESS) != 0) + { + /* This can happen when run_pending_traps is called while + running a SIGCHLD trap handler. */ + running_trap = 0; + /* want to leave pending_traps[SIGCHLD] alone here */ + continue; /* XXX */ + } + else if (sig == SIGCHLD && (sigmodes[SIGCHLD] & SIG_INPROGRESS)) + { + /* whoops -- print warning? */ + running_trap = 0; /* XXX */ + /* want to leave pending_traps[SIGCHLD] alone here */ + continue; + } +#endif + else if (trap_list[sig] == (char *)DEFAULT_SIG || + trap_list[sig] == (char *)IGNORE_SIG || + trap_list[sig] == (char *)IMPOSSIBLE_TRAP_HANDLER) + { + /* This is possible due to a race condition. Say a bash + process has SIGTERM trapped. A subshell is spawned + using { list; } & and the parent does something and kills + the subshell with SIGTERM. It's possible for the subshell + to set pending_traps[SIGTERM] to 1 before the code in + execute_cmd.c eventually calls restore_original_signals + to reset the SIGTERM signal handler in the subshell. The + next time run_pending_traps is called, pending_traps[SIGTERM] + will be 1, but the trap handler in trap_list[SIGTERM] will + be invalid (probably DEFAULT_SIG, but it could be IGNORE_SIG). + Unless we catch this, the subshell will dump core when + trap_list[SIGTERM] == DEFAULT_SIG, because DEFAULT_SIG is + usually 0x0. */ + internal_warning (_("run_pending_traps: bad value in trap_list[%d]: %p"), + sig, trap_list[sig]); + if (trap_list[sig] == (char *)DEFAULT_SIG) + { + internal_warning (_("run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"), sig, signal_name (sig)); + kill (getpid (), sig); + } + } + else + { + /* XXX - should we use save_parser_state/restore_parser_state? */ + save_parser_state (&pstate); + save_subst_varlist = subst_assign_varlist; + subst_assign_varlist = 0; + save_tempenv = temporary_env; + temporary_env = 0; /* traps should not run with temporary env */ + +#if defined (JOB_CONTROL) + save_pipeline (1); /* XXX only provides one save level */ +#endif + /* XXX - set pending_traps[sig] = 0 here? */ + pending_traps[sig] = 0; + evalnest++; + evalstring (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE); + evalnest--; +#if defined (JOB_CONTROL) + restore_pipeline (1); +#endif + + subst_assign_varlist = save_subst_varlist; + restore_parser_state (&pstate); + temporary_env = save_tempenv; + } + + pending_traps[sig] = 0; /* XXX - move before evalstring? */ + running_trap = old_running; + } + } + +#if defined (ARRAY_VARS) + restore_pipestatus_array (ps); +#endif + last_command_exit_value = old_exit_value; +} + +/* Set the private state variables noting that we received a signal SIG + for which we have a trap set. */ +void +set_trap_state (sig) + int sig; +{ + catch_flag = 1; + pending_traps[sig]++; + trapped_signal_received = sig; +} + +sighandler +trap_handler (sig) + int sig; +{ + int oerrno; + + if ((sigmodes[sig] & SIG_TRAPPED) == 0) + { +#if defined (DEBUG) + internal_warning ("trap_handler: signal %d: signal not trapped", sig); +#endif + SIGRETURN (0); + } + + if ((sig >= NSIG) || + (trap_list[sig] == (char *)DEFAULT_SIG) || + (trap_list[sig] == (char *)IGNORE_SIG)) + programming_error (_("trap_handler: bad signal %d"), sig); + else + { + oerrno = errno; +#if defined (MUST_REINSTALL_SIGHANDLERS) +# if defined (JOB_CONTROL) && defined (SIGCHLD) + if (sig != SIGCHLD) +# endif /* JOB_CONTROL && SIGCHLD */ + set_signal_handler (sig, trap_handler); +#endif /* MUST_REINSTALL_SIGHANDLERS */ + + set_trap_state (sig); + + if (this_shell_builtin && (this_shell_builtin == wait_builtin)) + { + wait_signal_received = sig; + if (waiting_for_child && wait_intr_flag) + sh_longjmp (wait_intr_buf, 1); + } + +#if defined (READLINE) + /* Set the event hook so readline will call it after the signal handlers + finish executing, so if this interrupted character input we can get + quick response. */ + if (RL_ISSTATE (RL_STATE_SIGHANDLER)) + bashline_set_event_hook (); +#endif + + errno = oerrno; + } + + SIGRETURN (0); +} + +int +next_pending_trap (start) + int start; +{ + register int i; + + for (i = start; i < NSIG; i++) + if (pending_traps[i]) + return i; + return -1; +} + +int +first_pending_trap () +{ + return (next_pending_trap (1)); +} + +/* Return > 0 if any of the "real" signals (not fake signals like EXIT) are + trapped. */ +int +any_signals_trapped () +{ + register int i; + + for (i = 1; i < NSIG; i++) + if (sigmodes[i] & SIG_TRAPPED) + return i; + return -1; +} + +void +clear_pending_traps () +{ + register int i; + + for (i = 1; i < NSIG; i++) + pending_traps[i] = 0; +} + +void +check_signals () +{ + CHECK_ALRM; /* set by the read builtin */ + QUIT; +} + +/* Convenience functions the rest of the shell can use */ +void +check_signals_and_traps () +{ + check_signals (); + + run_pending_traps (); +} + +#if defined (JOB_CONTROL) && defined (SIGCHLD) + +#ifdef INCLUDE_UNUSED +/* Make COMMAND_STRING be executed when SIGCHLD is caught. */ +void +set_sigchld_trap (command_string) + char *command_string; +{ + set_signal (SIGCHLD, command_string); +} +#endif + +/* Make COMMAND_STRING be executed when SIGCHLD is caught iff SIGCHLD + is not already trapped. IMPOSSIBLE_TRAP_HANDLER is used as a sentinel + to make sure that a SIGCHLD trap handler run via run_sigchld_trap can + reset the disposition to the default and not have the original signal + accidentally restored, undoing the user's command. */ +void +maybe_set_sigchld_trap (command_string) + char *command_string; +{ + if ((sigmodes[SIGCHLD] & SIG_TRAPPED) == 0 && trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER) + set_signal (SIGCHLD, command_string); +} + +/* Temporarily set the SIGCHLD trap string to IMPOSSIBLE_TRAP_HANDLER. Used + as a sentinel in run_sigchld_trap and maybe_set_sigchld_trap to see whether + or not a SIGCHLD trap handler reset SIGCHLD disposition to the default. */ +void +set_impossible_sigchld_trap () +{ + restore_default_signal (SIGCHLD); + change_signal (SIGCHLD, (char *)IMPOSSIBLE_TRAP_HANDLER); + sigmodes[SIGCHLD] &= ~SIG_TRAPPED; /* maybe_set_sigchld_trap checks this */ +} + +/* Act as if we received SIGCHLD NCHILD times and increment + pending_traps[SIGCHLD] by that amount. This allows us to still run the + SIGCHLD trap once for each exited child. */ +void +queue_sigchld_trap (nchild) + int nchild; +{ + if (nchild > 0) + { + catch_flag = 1; + pending_traps[SIGCHLD] += nchild; + trapped_signal_received = SIGCHLD; + } +} +#endif /* JOB_CONTROL && SIGCHLD */ + +/* Set a trap for SIG only if SIG is not already trapped. */ +static inline void +trap_if_untrapped (sig, command) + int sig; + char *command; +{ + if ((sigmodes[sig] & SIG_TRAPPED) == 0) + set_signal (sig, command); +} + +void +set_debug_trap (command) + char *command; +{ + set_signal (DEBUG_TRAP, command); +} + +/* Separate function to call when functions and sourced files want to restore + the original version of the DEBUG trap before returning. Unless the -T + option is set, source and shell function execution save the old debug trap + and unset the trap. If the function or sourced file changes the DEBUG trap, + SIG_TRAPPED will be set and we don't bother restoring the original trap string. + This is used by both functions and the source builtin. */ +void +maybe_set_debug_trap (command) + char *command; +{ + trap_if_untrapped (DEBUG_TRAP, command); +} + +void +set_error_trap (command) + char *command; +{ + set_signal (ERROR_TRAP, command); +} + +void +maybe_set_error_trap (command) + char *command; +{ + trap_if_untrapped (ERROR_TRAP, command); +} + +void +set_return_trap (command) + char *command; +{ + set_signal (RETURN_TRAP, command); +} + +void +maybe_set_return_trap (command) + char *command; +{ + trap_if_untrapped (RETURN_TRAP, command); +} + +#ifdef INCLUDE_UNUSED +void +set_sigint_trap (command) + char *command; +{ + set_signal (SIGINT, command); +} +#endif + +/* Reset the SIGINT handler so that subshells that are doing `shellsy' + things, like waiting for command substitution or executing commands + in explicit subshells ( ( cmd ) ), can catch interrupts properly. */ +SigHandler * +set_sigint_handler () +{ + if (sigmodes[SIGINT] & SIG_HARD_IGNORE) + return ((SigHandler *)SIG_IGN); + + else if (sigmodes[SIGINT] & SIG_IGNORED) + return ((SigHandler *)set_signal_handler (SIGINT, SIG_IGN)); /* XXX */ + + else if (sigmodes[SIGINT] & SIG_TRAPPED) + return ((SigHandler *)set_signal_handler (SIGINT, trap_handler)); + + /* The signal is not trapped, so set the handler to the shell's special + interrupt handler. */ + else if (interactive) /* XXX - was interactive_shell */ + return (set_signal_handler (SIGINT, sigint_sighandler)); + else + return (set_signal_handler (SIGINT, termsig_sighandler)); +} + +/* Return the correct handler for signal SIG according to the values in + sigmodes[SIG]. */ +SigHandler * +trap_to_sighandler (sig) + int sig; +{ + if (sigmodes[sig] & (SIG_IGNORED|SIG_HARD_IGNORE)) + return (SIG_IGN); + else if (sigmodes[sig] & SIG_TRAPPED) + return (trap_handler); + else + return (SIG_DFL); +} + +/* Set SIG to call STRING as a command. */ +void +set_signal (sig, string) + int sig; + char *string; +{ + sigset_t set, oset; + + if (SPECIAL_TRAP (sig)) + { + change_signal (sig, savestring (string)); + if (sig == EXIT_TRAP && interactive == 0) + initialize_terminating_signals (); + return; + } + + /* A signal ignored on entry to the shell cannot be trapped or reset, but + no error is reported when attempting to do so. -- Posix.2 */ + if (sigmodes[sig] & SIG_HARD_IGNORE) + return; + + /* Make sure we have original_signals[sig] if the signal has not yet + been trapped. */ + if ((sigmodes[sig] & SIG_TRAPPED) == 0) + { + /* If we aren't sure of the original value, check it. */ + if (original_signals[sig] == IMPOSSIBLE_TRAP_HANDLER) + GETORIGSIG (sig); + if (original_signals[sig] == SIG_IGN) + return; + } + + /* Only change the system signal handler if SIG_NO_TRAP is not set. + The trap command string is changed in either case. The shell signal + handlers for SIGINT and SIGCHLD run the user specified traps in an + environment in which it is safe to do so. */ + if ((sigmodes[sig] & SIG_NO_TRAP) == 0) + { + BLOCK_SIGNAL (sig, set, oset); + change_signal (sig, savestring (string)); + set_signal_handler (sig, trap_handler); + UNBLOCK_SIGNAL (oset); + } + else + change_signal (sig, savestring (string)); +} + +static void +free_trap_command (sig) + int sig; +{ + if ((sigmodes[sig] & SIG_TRAPPED) && trap_list[sig] && + (trap_list[sig] != (char *)IGNORE_SIG) && + (trap_list[sig] != (char *)DEFAULT_SIG) && + (trap_list[sig] != (char *)IMPOSSIBLE_TRAP_HANDLER)) + free (trap_list[sig]); +} + +/* If SIG has a string assigned to it, get rid of it. Then give it + VALUE. */ +static void +change_signal (sig, value) + int sig; + char *value; +{ + if ((sigmodes[sig] & SIG_INPROGRESS) == 0) + free_trap_command (sig); + trap_list[sig] = value; + + sigmodes[sig] |= SIG_TRAPPED; + if (value == (char *)IGNORE_SIG) + sigmodes[sig] |= SIG_IGNORED; + else + sigmodes[sig] &= ~SIG_IGNORED; + if (sigmodes[sig] & SIG_INPROGRESS) + sigmodes[sig] |= SIG_CHANGED; +} + +void +get_original_signal (sig) + int sig; +{ + /* If we aren't sure the of the original value, then get it. */ + if (sig > 0 && sig < NSIG && original_signals[sig] == (SigHandler *)IMPOSSIBLE_TRAP_HANDLER) + GETORIGSIG (sig); +} + +void +get_all_original_signals () +{ + register int i; + + for (i = 1; i < NSIG; i++) + GET_ORIGINAL_SIGNAL (i); +} + +void +set_original_signal (sig, handler) + int sig; + SigHandler *handler; +{ + if (sig > 0 && sig < NSIG && original_signals[sig] == (SigHandler *)IMPOSSIBLE_TRAP_HANDLER) + SETORIGSIG (sig, handler); +} + +/* Restore the default action for SIG; i.e., the action the shell + would have taken before you used the trap command. This is called + from trap_builtin (), which takes care to restore the handlers for + the signals the shell treats specially. */ +void +restore_default_signal (sig) + int sig; +{ + if (SPECIAL_TRAP (sig)) + { + if ((sig != DEBUG_TRAP && sig != ERROR_TRAP && sig != RETURN_TRAP) || + (sigmodes[sig] & SIG_INPROGRESS) == 0) + free_trap_command (sig); + trap_list[sig] = (char *)NULL; + sigmodes[sig] &= ~SIG_TRAPPED; + if (sigmodes[sig] & SIG_INPROGRESS) + sigmodes[sig] |= SIG_CHANGED; + return; + } + + GET_ORIGINAL_SIGNAL (sig); + + /* A signal ignored on entry to the shell cannot be trapped or reset, but + no error is reported when attempting to do so. Thanks Posix.2. */ + if (sigmodes[sig] & SIG_HARD_IGNORE) + return; + + /* If we aren't trapping this signal, don't bother doing anything else. */ + /* We special-case SIGCHLD and IMPOSSIBLE_TRAP_HANDLER (see above) as a + sentinel to determine whether or not disposition is reset to the default + while the trap handler is executing. */ + if (((sigmodes[sig] & SIG_TRAPPED) == 0) && + (sig != SIGCHLD || (sigmodes[sig] & SIG_INPROGRESS) == 0 || trap_list[sig] != (char *)IMPOSSIBLE_TRAP_HANDLER)) + return; + + /* Only change the signal handler for SIG if it allows it. */ + if ((sigmodes[sig] & SIG_NO_TRAP) == 0) + set_signal_handler (sig, original_signals[sig]); + + /* Change the trap command in either case. */ + change_signal (sig, (char *)DEFAULT_SIG); + + /* Mark the signal as no longer trapped. */ + sigmodes[sig] &= ~SIG_TRAPPED; +} + +/* Make this signal be ignored. */ +void +ignore_signal (sig) + int sig; +{ + if (SPECIAL_TRAP (sig) && ((sigmodes[sig] & SIG_IGNORED) == 0)) + { + change_signal (sig, (char *)IGNORE_SIG); + return; + } + + GET_ORIGINAL_SIGNAL (sig); + + /* A signal ignored on entry to the shell cannot be trapped or reset. + No error is reported when the user attempts to do so. */ + if (sigmodes[sig] & SIG_HARD_IGNORE) + return; + + /* If already trapped and ignored, no change necessary. */ + if (sigmodes[sig] & SIG_IGNORED) + return; + + /* Only change the signal handler for SIG if it allows it. */ + if ((sigmodes[sig] & SIG_NO_TRAP) == 0) + set_signal_handler (sig, SIG_IGN); + + /* Change the trap command in either case. */ + change_signal (sig, (char *)IGNORE_SIG); +} + +/* Handle the calling of "trap 0". The only sticky situation is when + the command to be executed includes an "exit". This is why we have + to provide our own place for top_level to jump to. */ +int +run_exit_trap () +{ + char *trap_command; + int code, function_code, retval; +#if defined (ARRAY_VARS) + ARRAY *ps; +#endif + + trap_saved_exit_value = last_command_exit_value; +#if defined (ARRAY_VARS) + ps = save_pipestatus_array (); +#endif + function_code = 0; + + /* Run the trap only if signal 0 is trapped and not ignored, and we are not + currently running in the trap handler (call to exit in the list of + commands given to trap 0). */ + if ((sigmodes[EXIT_TRAP] & SIG_TRAPPED) && + (sigmodes[EXIT_TRAP] & (SIG_IGNORED|SIG_INPROGRESS)) == 0) + { + trap_command = savestring (trap_list[EXIT_TRAP]); + sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED; + sigmodes[EXIT_TRAP] |= SIG_INPROGRESS; + + retval = trap_saved_exit_value; + running_trap = 1; + + code = setjmp_nosigs (top_level); + + /* If we're in a function, make sure return longjmps come here, too. */ + if (return_catch_flag) + function_code = setjmp_nosigs (return_catch); + + if (code == 0 && function_code == 0) + { + reset_parser (); + parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE); + } + else if (code == ERREXIT) + retval = last_command_exit_value; + else if (code == EXITPROG) + retval = last_command_exit_value; + else if (function_code != 0) + retval = return_catch_value; + else + retval = trap_saved_exit_value; + + running_trap = 0; +#if defined (ARRAY_VARS) + array_dispose (ps); +#endif + + return retval; + } + +#if defined (ARRAY_VARS) + restore_pipestatus_array (ps); +#endif + return (trap_saved_exit_value); +} + +void +run_trap_cleanup (sig) + int sig; +{ + /* XXX - should we clean up trap_list[sig] == IMPOSSIBLE_TRAP_HANDLER? */ + sigmodes[sig] &= ~(SIG_INPROGRESS|SIG_CHANGED); +} + +#define RECURSIVE_SIG(s) (SPECIAL_TRAP(s) == 0) + +/* Run a trap command for SIG. SIG is one of the signals the shell treats + specially. Returns the exit status of the executed trap command list. */ +static int +_run_trap_internal (sig, tag) + int sig; + char *tag; +{ + char *trap_command, *old_trap; + int trap_exit_value; + volatile int save_return_catch_flag, function_code; + int old_modes, old_running, old_int; + int flags; + procenv_t save_return_catch; + WORD_LIST *save_subst_varlist; + HASH_TABLE *save_tempenv; + sh_parser_state_t pstate; +#if defined (ARRAY_VARS) + ARRAY *ps; +#endif + + old_modes = old_running = -1; + + trap_exit_value = function_code = 0; + trap_saved_exit_value = last_command_exit_value; + /* Run the trap only if SIG is trapped and not ignored, and we are not + currently executing in the trap handler. */ + if ((sigmodes[sig] & SIG_TRAPPED) && ((sigmodes[sig] & SIG_IGNORED) == 0) && + (trap_list[sig] != (char *)IMPOSSIBLE_TRAP_HANDLER) && +#if 1 + /* Uncomment this to allow some special signals to recursively execute + trap handlers. */ + (RECURSIVE_SIG (sig) || (sigmodes[sig] & SIG_INPROGRESS) == 0)) +#else + ((sigmodes[sig] & SIG_INPROGRESS) == 0)) +#endif + { + old_trap = trap_list[sig]; + old_modes = sigmodes[sig]; + old_running = running_trap; + + sigmodes[sig] |= SIG_INPROGRESS; + sigmodes[sig] &= ~SIG_CHANGED; /* just to be sure */ + trap_command = savestring (old_trap); + + running_trap = sig + 1; + + old_int = interrupt_state; /* temporarily suppress pending interrupts */ + CLRINTERRUPT; + +#if defined (ARRAY_VARS) + ps = save_pipestatus_array (); +#endif + + save_parser_state (&pstate); + save_subst_varlist = subst_assign_varlist; + subst_assign_varlist = 0; + save_tempenv = temporary_env; + temporary_env = 0; /* traps should not run with temporary env */ + +#if defined (JOB_CONTROL) + if (sig != DEBUG_TRAP) /* run_debug_trap does this */ + save_pipeline (1); /* XXX only provides one save level */ +#endif + + /* If we're in a function, make sure return longjmps come here, too. */ + save_return_catch_flag = return_catch_flag; + if (return_catch_flag) + { + COPY_PROCENV (return_catch, save_return_catch); + function_code = setjmp_nosigs (return_catch); + } + + flags = SEVAL_NONINT|SEVAL_NOHIST; + if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP) + flags |= SEVAL_RESETLINE; + evalnest++; + if (function_code == 0) + { + parse_and_execute (trap_command, tag, flags); + trap_exit_value = last_command_exit_value; + } + else + trap_exit_value = return_catch_value; + evalnest--; + +#if defined (JOB_CONTROL) + if (sig != DEBUG_TRAP) /* run_debug_trap does this */ + restore_pipeline (1); +#endif + + subst_assign_varlist = save_subst_varlist; + restore_parser_state (&pstate); + +#if defined (ARRAY_VARS) + restore_pipestatus_array (ps); +#endif + + temporary_env = save_tempenv; + + if ((old_modes & SIG_INPROGRESS) == 0) + sigmodes[sig] &= ~SIG_INPROGRESS; + + running_trap = old_running; + interrupt_state = old_int; + + if (sigmodes[sig] & SIG_CHANGED) + { +#if 0 + /* Special traps like EXIT, DEBUG, RETURN are handled explicitly in + the places where they can be changed using unwind-protects. For + example, look at execute_cmd.c:execute_function(). */ + if (SPECIAL_TRAP (sig) == 0) +#endif + free (old_trap); + sigmodes[sig] &= ~SIG_CHANGED; + + CHECK_TERMSIG; /* some pathological conditions lead here */ + } + + if (save_return_catch_flag) + { + return_catch_flag = save_return_catch_flag; + return_catch_value = trap_exit_value; + COPY_PROCENV (save_return_catch, return_catch); + if (function_code) + { +#if 0 + from_return_trap = sig == RETURN_TRAP; +#endif + sh_longjmp (return_catch, 1); + } + } + } + + return trap_exit_value; +} + +int +run_debug_trap () +{ + int trap_exit_value, old_verbose; + pid_t save_pgrp; +#if defined (PGRP_PIPE) + int save_pipe[2]; +#endif + + /* XXX - question: should the DEBUG trap inherit the RETURN trap? */ + trap_exit_value = 0; + if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_IGNORED) == 0) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0)) + { +#if defined (JOB_CONTROL) + save_pgrp = pipeline_pgrp; + pipeline_pgrp = 0; + save_pipeline (1); +# if defined (PGRP_PIPE) + save_pgrp_pipe (save_pipe, 1); +# endif + stop_making_children (); +#endif + + old_verbose = echo_input_at_read; + echo_input_at_read = suppress_debug_trap_verbose ? 0 : echo_input_at_read; + + trap_exit_value = _run_trap_internal (DEBUG_TRAP, "debug trap"); + + echo_input_at_read = old_verbose; + +#if defined (JOB_CONTROL) + pipeline_pgrp = save_pgrp; + restore_pipeline (1); +# if defined (PGRP_PIPE) + close_pgrp_pipe (); + restore_pgrp_pipe (save_pipe); +# endif + if (pipeline_pgrp > 0 && ((subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0)) + give_terminal_to (pipeline_pgrp, 1); + + notify_and_cleanup (); +#endif + +#if defined (DEBUGGER) + /* If we're in the debugger and the DEBUG trap returns 2 while we're in + a function or sourced script, we force a `return'. */ + if (debugging_mode && trap_exit_value == 2 && return_catch_flag) + { + return_catch_value = trap_exit_value; + sh_longjmp (return_catch, 1); + } +#endif + } + return trap_exit_value; +} + +void +run_error_trap () +{ + if ((sigmodes[ERROR_TRAP] & SIG_TRAPPED) && ((sigmodes[ERROR_TRAP] & SIG_IGNORED) == 0) && (sigmodes[ERROR_TRAP] & SIG_INPROGRESS) == 0) + _run_trap_internal (ERROR_TRAP, "error trap"); +} + +void +run_return_trap () +{ + int old_exit_value; + +#if 0 + if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && (sigmodes[DEBUG_TRAP] & SIG_INPROGRESS)) + return; +#endif + + if ((sigmodes[RETURN_TRAP] & SIG_TRAPPED) && ((sigmodes[RETURN_TRAP] & SIG_IGNORED) == 0) && (sigmodes[RETURN_TRAP] & SIG_INPROGRESS) == 0) + { + old_exit_value = last_command_exit_value; + _run_trap_internal (RETURN_TRAP, "return trap"); + last_command_exit_value = old_exit_value; + } +} + +/* Run a trap set on SIGINT. This is called from throw_to_top_level (), and + declared here to localize the trap functions. */ +void +run_interrupt_trap (will_throw) + int will_throw; /* from throw_to_top_level? */ +{ + if (will_throw && running_trap > 0) + run_trap_cleanup (running_trap - 1); + pending_traps[SIGINT] = 0; /* run_pending_traps does this */ + catch_flag = 0; + _run_trap_internal (SIGINT, "interrupt trap"); +} + +/* Free all the allocated strings in the list of traps and reset the trap + values to the default. Intended to be called from subshells that want + to complete work done by reset_signal_handlers upon execution of a + subsequent `trap' command that changes a signal's disposition. We need + to make sure that we duplicate the behavior of + reset_or_restore_signal_handlers and not change the disposition of signals + that are set to be ignored. */ +void +free_trap_strings () +{ + register int i; + + for (i = 0; i < NSIG; i++) + { + if (trap_list[i] != (char *)IGNORE_SIG) + free_trap_string (i); + } + for (i = NSIG; i < BASH_NSIG; i++) + { + /* Don't free the trap string if the subshell inherited the trap */ + if ((sigmodes[i] & SIG_TRAPPED) == 0) + { + free_trap_string (i); + trap_list[i] = (char *)NULL; + } + } +} + +/* Free a trap command string associated with SIG without changing signal + disposition. Intended to be called from free_trap_strings() */ +static void +free_trap_string (sig) + int sig; +{ + change_signal (sig, (char *)DEFAULT_SIG); + sigmodes[sig] &= ~SIG_TRAPPED; /* XXX - SIG_INPROGRESS? */ +} + +/* Reset the handler for SIG to the original value but leave the trap string + in place. */ +static void +reset_signal (sig) + int sig; +{ + set_signal_handler (sig, original_signals[sig]); + sigmodes[sig] &= ~SIG_TRAPPED; /* XXX - SIG_INPROGRESS? */ +} + +/* Set the handler signal SIG to the original and free any trap + command associated with it. */ +static void +restore_signal (sig) + int sig; +{ + set_signal_handler (sig, original_signals[sig]); + change_signal (sig, (char *)DEFAULT_SIG); + sigmodes[sig] &= ~SIG_TRAPPED; +} + +static void +reset_or_restore_signal_handlers (reset) + sh_resetsig_func_t *reset; +{ + register int i; + + /* Take care of the exit trap first */ + if (sigmodes[EXIT_TRAP] & SIG_TRAPPED) + { + sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED; /* XXX - SIG_INPROGRESS? */ + if (reset != reset_signal) + { + free_trap_command (EXIT_TRAP); + trap_list[EXIT_TRAP] = (char *)NULL; + } + } + + for (i = 1; i < NSIG; i++) + { + if (sigmodes[i] & SIG_TRAPPED) + { + if (trap_list[i] == (char *)IGNORE_SIG) + set_signal_handler (i, SIG_IGN); + else + (*reset) (i); + } + else if (sigmodes[i] & SIG_SPECIAL) + (*reset) (i); + pending_traps[i] = 0; /* XXX */ + } + + /* Command substitution and other child processes don't inherit the + debug, error, or return traps. If we're in the debugger, and the + `functrace' or `errtrace' options have been set, then let command + substitutions inherit them. Let command substitution inherit the + RETURN trap if we're in the debugger and tracing functions. */ + if (function_trace_mode == 0) + { + sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED; + sigmodes[RETURN_TRAP] &= ~SIG_TRAPPED; + } + if (error_trace_mode == 0) + sigmodes[ERROR_TRAP] &= ~SIG_TRAPPED; +} + +/* Reset trapped signals to their original values, but don't free the + trap strings. Called by the command substitution code and other places + that create a "subshell environment". */ +void +reset_signal_handlers () +{ + reset_or_restore_signal_handlers (reset_signal); +} + +/* Reset all trapped signals to their original values. Signals set to be + ignored with trap '' SIGNAL should be ignored, so we make sure that they + are. Called by child processes after they are forked. */ +void +restore_original_signals () +{ + reset_or_restore_signal_handlers (restore_signal); +} + +/* If a trap handler exists for signal SIG, then call it; otherwise just + return failure. Returns 1 if it called the trap handler. */ +int +maybe_call_trap_handler (sig) + int sig; +{ + /* Call the trap handler for SIG if the signal is trapped and not ignored. */ + if ((sigmodes[sig] & SIG_TRAPPED) && ((sigmodes[sig] & SIG_IGNORED) == 0)) + { + switch (sig) + { + case SIGINT: + run_interrupt_trap (0); + break; + case EXIT_TRAP: + run_exit_trap (); + break; + case DEBUG_TRAP: + run_debug_trap (); + break; + case ERROR_TRAP: + run_error_trap (); + break; + default: + trap_handler (sig); + break; + } + return (1); + } + else + return (0); +} + +int +signal_is_trapped (sig) + int sig; +{ + return (sigmodes[sig] & SIG_TRAPPED); +} + +int +signal_is_pending (sig) + int sig; +{ + return (pending_traps[sig]); +} + +int +signal_is_special (sig) + int sig; +{ + return (sigmodes[sig] & SIG_SPECIAL); +} + +int +signal_is_ignored (sig) + int sig; +{ + return (sigmodes[sig] & SIG_IGNORED); +} + +int +signal_is_hard_ignored (sig) + int sig; +{ + return (sigmodes[sig] & SIG_HARD_IGNORE); +} + +void +set_signal_hard_ignored (sig) + int sig; +{ + sigmodes[sig] |= SIG_HARD_IGNORE; + original_signals[sig] = SIG_IGN; +} + +void +set_signal_ignored (sig) + int sig; +{ + original_signals[sig] = SIG_IGN; +} + +int +signal_in_progress (sig) + int sig; +{ + return (sigmodes[sig] & SIG_INPROGRESS); +} + +#if 0 /* TAG: bash-5.2 */ +int +block_trapped_signals (maskp, omaskp) + sigset_t *maskp; + sigset_t *omaskp; +{ + int i; + + sigemptyset (maskp); + for (i = 1; i < NSIG; i++) + if (sigmodes[i] & SIG_TRAPPED) + sigaddset (maskp, i); + return (sigprocmask (SIG_BLOCK, maskp, omaskp)); +} + +int +unblock_trapped_signals (maskp) + sigset_t *maskp; +{ + return (sigprocmask (SIG_SETMASK, maskp, 0)); +} +#endif diff --git a/bash-5.1/trap.h b/bash-5.1/trap.h new file mode 100644 index 0000000000000000000000000000000000000000..ef64a68030ffcb7284a7948d7d8908b7443a486e --- /dev/null +++ b/bash-5.1/trap.h @@ -0,0 +1,128 @@ +/* trap.h -- data structures used in the trap mechanism. */ + +/* Copyright (C) 1993-2013 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_TRAP_H_) +#define _TRAP_H_ + +#include "stdc.h" + +#if !defined (SIG_DFL) +#include "bashtypes.h" +#include +#endif /* SIG_DFL */ + +#if !defined (NSIG) +#define NSIG 64 +#endif /* !NSIG */ + +#define NO_SIG -1 +#define DEFAULT_SIG SIG_DFL +#define IGNORE_SIG SIG_IGN + +/* Special shell trap names. */ +#define DEBUG_TRAP NSIG +#define ERROR_TRAP NSIG+1 +#define RETURN_TRAP NSIG+2 +#define EXIT_TRAP 0 + +/* system signals plus special bash traps */ +#define BASH_NSIG NSIG+3 + +/* Flags values for decode_signal() */ +#define DSIG_SIGPREFIX 0x01 /* don't allow `SIG' PREFIX */ +#define DSIG_NOCASE 0x02 /* case-insensitive comparison */ + +/* A value which can never be the target of a trap handler. */ +#define IMPOSSIBLE_TRAP_HANDLER (SigHandler *)initialize_traps + +#define signal_object_p(x,f) (decode_signal (x,f) != NO_SIG) + +#define TRAP_STRING(s) \ + (signal_is_trapped (s) && signal_is_ignored (s) == 0) ? trap_list[s] \ + : (char *)NULL + +extern char *trap_list[]; + +extern int trapped_signal_received; +extern int wait_signal_received; +extern int running_trap; +extern int trap_saved_exit_value; +extern int suppress_debug_trap_verbose; + +/* Externally-visible functions declared in trap.c. */ +extern void initialize_traps PARAMS((void)); + +extern void run_pending_traps PARAMS((void)); + +extern void queue_sigchld_trap PARAMS((int)); +extern void maybe_set_sigchld_trap PARAMS((char *)); +extern void set_impossible_sigchld_trap PARAMS((void)); +extern void set_sigchld_trap PARAMS((char *)); + +extern void set_debug_trap PARAMS((char *)); +extern void set_error_trap PARAMS((char *)); +extern void set_return_trap PARAMS((char *)); + +extern void maybe_set_debug_trap PARAMS((char *)); +extern void maybe_set_error_trap PARAMS((char *)); +extern void maybe_set_return_trap PARAMS((char *)); + +extern void set_sigint_trap PARAMS((char *)); +extern void set_signal PARAMS((int, char *)); + +extern void restore_default_signal PARAMS((int)); +extern void ignore_signal PARAMS((int)); +extern int run_exit_trap PARAMS((void)); +extern void run_trap_cleanup PARAMS((int)); +extern int run_debug_trap PARAMS((void)); +extern void run_error_trap PARAMS((void)); +extern void run_return_trap PARAMS((void)); + +extern void free_trap_strings PARAMS((void)); +extern void reset_signal_handlers PARAMS((void)); +extern void restore_original_signals PARAMS((void)); + +extern void get_original_signal PARAMS((int)); +extern void get_all_original_signals PARAMS((void)); + +extern char *signal_name PARAMS((int)); + +extern int decode_signal PARAMS((char *, int)); +extern void run_interrupt_trap PARAMS((int)); +extern int maybe_call_trap_handler PARAMS((int)); +extern int signal_is_special PARAMS((int)); +extern int signal_is_trapped PARAMS((int)); +extern int signal_is_pending PARAMS((int)); +extern int signal_is_ignored PARAMS((int)); +extern int signal_is_hard_ignored PARAMS((int)); +extern void set_signal_hard_ignored PARAMS((int)); +extern void set_signal_ignored PARAMS((int)); +extern int signal_in_progress PARAMS((int)); + +extern void set_trap_state PARAMS((int)); + +extern int next_pending_trap PARAMS((int)); +extern int first_pending_trap PARAMS((void)); +extern void clear_pending_traps PARAMS((void)); +extern int any_signals_trapped PARAMS((void)); +extern void check_signals PARAMS((void)); +extern void check_signals_and_traps PARAMS((void)); + +#endif /* _TRAP_H_ */ diff --git a/bash-5.1/unwind_prot.c b/bash-5.1/unwind_prot.c new file mode 100644 index 0000000000000000000000000000000000000000..5703777fe3acc8952e241407e34d6595498ac700 --- /dev/null +++ b/bash-5.1/unwind_prot.c @@ -0,0 +1,382 @@ +/* unwind_prot.c - a simple unwind-protect system for internal variables */ + +/* I can't stand it anymore! Please can't we just write the + whole Unix system in lisp or something? */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +/* **************************************************************** */ +/* */ +/* Unwind Protection Scheme for Bash */ +/* */ +/* **************************************************************** */ +#include "config.h" + +#include "bashtypes.h" +#include "bashansi.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if STDC_HEADERS +# include +#endif + +#ifndef offsetof +# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif + +#include "command.h" +#include "general.h" +#include "unwind_prot.h" +#include "sig.h" +#include "quit.h" +#include "error.h" /* for internal_warning */ +#include "ocache.h" + +/* Structure describing a saved variable and the value to restore it to. */ +typedef struct { + char *variable; + int size; + char desired_setting[1]; /* actual size is `size' */ +} SAVED_VAR; + +/* If HEAD.CLEANUP is null, then ARG.V contains a tag to throw back to. + If HEAD.CLEANUP is restore_variable, then SV.V contains the saved + variable. Otherwise, call HEAD.CLEANUP (ARG.V) to clean up. */ +typedef union uwp { + struct uwp_head { + union uwp *next; + Function *cleanup; + } head; + struct { + struct uwp_head uwp_head; + char *v; + } arg; + struct { + struct uwp_head uwp_head; + SAVED_VAR v; + } sv; +} UNWIND_ELT; + +static void without_interrupts PARAMS((VFunction *, char *, char *)); +static void unwind_frame_discard_internal PARAMS((char *, char *)); +static void unwind_frame_run_internal PARAMS((char *, char *)); +static void add_unwind_protect_internal PARAMS((Function *, char *)); +static void remove_unwind_protect_internal PARAMS((char *, char *)); +static void run_unwind_protects_internal PARAMS((char *, char *)); +static void clear_unwind_protects_internal PARAMS((char *, char *)); +static inline void restore_variable PARAMS((SAVED_VAR *)); +static void unwind_protect_mem_internal PARAMS((char *, char *)); + +static UNWIND_ELT *unwind_protect_list = (UNWIND_ELT *)NULL; + +/* Allocating from a cache of unwind-protect elements */ +#define UWCACHESIZE 128 + +sh_obj_cache_t uwcache = {0, 0, 0}; + +#if 0 +#define uwpalloc(elt) (elt) = (UNWIND_ELT *)xmalloc (sizeof (UNWIND_ELT)) +#define uwpfree(elt) free(elt) +#else +#define uwpalloc(elt) ocache_alloc (uwcache, UNWIND_ELT, elt) +#define uwpfree(elt) ocache_free (uwcache, UNWIND_ELT, elt) +#endif + +void +uwp_init () +{ + ocache_create (uwcache, UNWIND_ELT, UWCACHESIZE); +} + +/* Run a function without interrupts. This relies on the fact that the + FUNCTION cannot call QUIT (). */ +static void +without_interrupts (function, arg1, arg2) + VFunction *function; + char *arg1, *arg2; +{ + (*function)(arg1, arg2); +} + +/* Start the beginning of a region. */ +void +begin_unwind_frame (tag) + char *tag; +{ + add_unwind_protect ((Function *)NULL, tag); +} + +/* Discard the unwind protects back to TAG. */ +void +discard_unwind_frame (tag) + char *tag; +{ + if (unwind_protect_list) + without_interrupts (unwind_frame_discard_internal, tag, (char *)NULL); +} + +/* Run the unwind protects back to TAG. */ +void +run_unwind_frame (tag) + char *tag; +{ + if (unwind_protect_list) + without_interrupts (unwind_frame_run_internal, tag, (char *)NULL); +} + +/* Add the function CLEANUP with ARG to the list of unwindable things. */ +void +add_unwind_protect (cleanup, arg) + Function *cleanup; + char *arg; +{ + without_interrupts (add_unwind_protect_internal, (char *)cleanup, arg); +} + +/* Remove the top unwind protect from the list. */ +void +remove_unwind_protect () +{ + if (unwind_protect_list) + without_interrupts + (remove_unwind_protect_internal, (char *)NULL, (char *)NULL); +} + +/* Run the list of cleanup functions in unwind_protect_list. */ +void +run_unwind_protects () +{ + if (unwind_protect_list) + without_interrupts + (run_unwind_protects_internal, (char *)NULL, (char *)NULL); +} + +/* Erase the unwind-protect list. If flags is 1, free the elements. */ +void +clear_unwind_protect_list (flags) + int flags; +{ + char *flag; + + if (unwind_protect_list) + { + flag = flags ? "" : (char *)NULL; + without_interrupts + (clear_unwind_protects_internal, flag, (char *)NULL); + } +} + +int +have_unwind_protects () +{ + return (unwind_protect_list != 0); +} + +int +unwind_protect_tag_on_stack (tag) + const char *tag; +{ + UNWIND_ELT *elt; + + elt = unwind_protect_list; + while (elt) + { + if (elt->head.cleanup == 0 && STREQ (elt->arg.v, tag)) + return 1; + elt = elt->head.next; + } + return 0; +} + +/* **************************************************************** */ +/* */ +/* The Actual Functions */ +/* */ +/* **************************************************************** */ + +static void +add_unwind_protect_internal (cleanup, arg) + Function *cleanup; + char *arg; +{ + UNWIND_ELT *elt; + + uwpalloc (elt); + elt->head.next = unwind_protect_list; + elt->head.cleanup = cleanup; + elt->arg.v = arg; + unwind_protect_list = elt; +} + +static void +remove_unwind_protect_internal (ignore1, ignore2) + char *ignore1, *ignore2; +{ + UNWIND_ELT *elt; + + elt = unwind_protect_list; + if (elt) + { + unwind_protect_list = unwind_protect_list->head.next; + uwpfree (elt); + } +} + +static void +run_unwind_protects_internal (ignore1, ignore2) + char *ignore1, *ignore2; +{ + unwind_frame_run_internal ((char *) NULL, (char *) NULL); +} + +static void +clear_unwind_protects_internal (flag, ignore) + char *flag, *ignore; +{ + if (flag) + { + while (unwind_protect_list) + remove_unwind_protect_internal ((char *)NULL, (char *)NULL); + } + unwind_protect_list = (UNWIND_ELT *)NULL; +} + +static void +unwind_frame_discard_internal (tag, ignore) + char *tag, *ignore; +{ + UNWIND_ELT *elt; + int found; + + found = 0; + while (elt = unwind_protect_list) + { + unwind_protect_list = unwind_protect_list->head.next; + if (elt->head.cleanup == 0 && (STREQ (elt->arg.v, tag))) + { + uwpfree (elt); + found = 1; + break; + } + else + uwpfree (elt); + } + + if (found == 0) + internal_warning ("unwind_frame_discard: %s: frame not found", tag); +} + +/* Restore the value of a variable, based on the contents of SV. + sv->desired_setting is a block of memory SIZE bytes long holding the + value itself. This block of memory is copied back into the variable. */ +static inline void +restore_variable (sv) + SAVED_VAR *sv; +{ + FASTCOPY (sv->desired_setting, sv->variable, sv->size); +} + +static void +unwind_frame_run_internal (tag, ignore) + char *tag, *ignore; +{ + UNWIND_ELT *elt; + int found; + + found = 0; + while (elt = unwind_protect_list) + { + unwind_protect_list = elt->head.next; + + /* If tag, then compare. */ + if (elt->head.cleanup == 0) + { + if (tag && STREQ (elt->arg.v, tag)) + { + uwpfree (elt); + found = 1; + break; + } + } + else + { + if (elt->head.cleanup == (Function *) restore_variable) + restore_variable (&elt->sv.v); + else + (*(elt->head.cleanup)) (elt->arg.v); + } + + uwpfree (elt); + } + if (tag && found == 0) + internal_warning ("unwind_frame_run: %s: frame not found", tag); +} + +static void +unwind_protect_mem_internal (var, psize) + char *var; + char *psize; +{ + int size, allocated; + UNWIND_ELT *elt; + + size = *(int *) psize; + allocated = size + offsetof (UNWIND_ELT, sv.v.desired_setting[0]); + if (allocated < sizeof (UNWIND_ELT)) + allocated = sizeof (UNWIND_ELT); + elt = (UNWIND_ELT *)xmalloc (allocated); + elt->head.next = unwind_protect_list; + elt->head.cleanup = (Function *) restore_variable; + elt->sv.v.variable = var; + elt->sv.v.size = size; + FASTCOPY (var, elt->sv.v.desired_setting, size); + unwind_protect_list = elt; +} + +/* Save the value of a variable so it will be restored when unwind-protects + are run. VAR is a pointer to the variable. SIZE is the size in + bytes of VAR. */ +void +unwind_protect_mem (var, size) + char *var; + int size; +{ + without_interrupts (unwind_protect_mem_internal, var, (char *) &size); +} + +#if defined (DEBUG) +#include + +void +print_unwind_protect_tags () +{ + UNWIND_ELT *elt; + + elt = unwind_protect_list; + while (elt) + { + if (elt->head.cleanup == 0) + fprintf(stderr, "tag: %s\n", elt->arg.v); + elt = elt->head.next; + } +} +#endif diff --git a/bash-5.1/unwind_prot.h b/bash-5.1/unwind_prot.h new file mode 100644 index 0000000000000000000000000000000000000000..97b3af90236b66fb757186041a0af7633ba6a9ca --- /dev/null +++ b/bash-5.1/unwind_prot.h @@ -0,0 +1,52 @@ +/* unwind_prot.h - Macros and functions for hacking unwind protection. */ + +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_UNWIND_PROT_H) +#define _UNWIND_PROT_H + +extern void uwp_init PARAMS((void)); + +/* Run a function without interrupts. */ +extern void begin_unwind_frame PARAMS((char *)); +extern void discard_unwind_frame PARAMS((char *)); +extern void run_unwind_frame PARAMS((char *)); +extern void add_unwind_protect (); /* Not portable to arbitrary C99 hosts. */ +extern void remove_unwind_protect PARAMS((void)); +extern void run_unwind_protects PARAMS((void)); +extern void clear_unwind_protect_list PARAMS((int)); +extern int have_unwind_protects PARAMS((void)); +extern int unwind_protect_tag_on_stack PARAMS((const char *)); +extern void uwp_init PARAMS((void)); + +/* Define for people who like their code to look a certain way. */ +#define end_unwind_frame() + +/* How to protect a variable. */ +#define unwind_protect_var(X) unwind_protect_mem ((char *)&(X), sizeof (X)) +extern void unwind_protect_mem PARAMS((char *, int)); + +/* Backwards compatibility */ +#define unwind_protect_int unwind_protect_var +#define unwind_protect_short unwind_protect_var +#define unwind_protect_string unwind_protect_var +#define unwind_protect_pointer unwind_protect_var +#define unwind_protect_jmp_buf unwind_protect_var + +#endif /* _UNWIND_PROT_H */ diff --git a/bash-5.1/variables.c b/bash-5.1/variables.c new file mode 100644 index 0000000000000000000000000000000000000000..73f157fb549ba5fa32e4967e6a2a34e9309b98ec --- /dev/null +++ b/bash-5.1/variables.c @@ -0,0 +1,6462 @@ +/* variables.c -- Functions for hacking shell variables. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include "posixstat.h" +#include "posixtime.h" + +#if defined (__QNX__) +# if defined (__QNXNTO__) +# include +# else +# include +# endif /* !__QNXNTO__ */ +#endif /* __QNX__ */ + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include "chartypes.h" +#if defined (HAVE_PWD_H) +# include +#endif +#include "bashansi.h" +#include "bashintl.h" +#include "filecntl.h" + +#define NEED_XTRACE_SET_DECL + +#include "shell.h" +#include "parser.h" +#include "flags.h" +#include "execute_cmd.h" +#include "findcmd.h" +#include "mailcheck.h" +#include "input.h" +#include "hashcmd.h" +#include "pathexp.h" +#include "alias.h" +#include "jobs.h" + +#include "version.h" + +#include "builtins/getopt.h" +#include "builtins/common.h" +#include "builtins/builtext.h" + +#if defined (READLINE) +# include "bashline.h" +# include +#else +# include +#endif + +#if defined (HISTORY) +# include "bashhist.h" +# include +#endif /* HISTORY */ + +#if defined (PROGRAMMABLE_COMPLETION) +# include "pcomplete.h" +#endif + +#define VARIABLES_HASH_BUCKETS 1024 /* must be power of two */ +#define FUNCTIONS_HASH_BUCKETS 512 +#define TEMPENV_HASH_BUCKETS 4 /* must be power of two */ + +#define BASHFUNC_PREFIX "BASH_FUNC_" +#define BASHFUNC_PREFLEN 10 /* == strlen(BASHFUNC_PREFIX */ +#define BASHFUNC_SUFFIX "%%" +#define BASHFUNC_SUFFLEN 2 /* == strlen(BASHFUNC_SUFFIX) */ + +/* flags for find_variable_internal */ + +#define FV_FORCETEMPENV 0x01 +#define FV_SKIPINVISIBLE 0x02 +#define FV_NODYNAMIC 0x04 + +extern char **environ; + +/* Variables used here and defined in other files. */ +extern time_t shell_start_time; +extern struct timeval shellstart; + +/* The list of shell variables that the user has created at the global + scope, or that came from the environment. */ +VAR_CONTEXT *global_variables = (VAR_CONTEXT *)NULL; + +/* The current list of shell variables, including function scopes */ +VAR_CONTEXT *shell_variables = (VAR_CONTEXT *)NULL; + +/* The list of shell functions that the user has created, or that came from + the environment. */ +HASH_TABLE *shell_functions = (HASH_TABLE *)NULL; + +HASH_TABLE *invalid_env = (HASH_TABLE *)NULL; + +#if defined (DEBUGGER) +/* The table of shell function definitions that the user defined or that + came from the environment. */ +HASH_TABLE *shell_function_defs = (HASH_TABLE *)NULL; +#endif + +/* The current variable context. This is really a count of how deep into + executing functions we are. */ +int variable_context = 0; + +/* If non-zero, local variables inherit values and attributes from a variable + with the same name at a previous scope. */ +int localvar_inherit = 0; + +/* If non-zero, calling `unset' on local variables in previous scopes marks + them as invisible so lookups find them unset. This is the same behavior + as local variables in the current local scope. */ +int localvar_unset = 0; + +/* The set of shell assignments which are made only in the environment + for a single command. */ +HASH_TABLE *temporary_env = (HASH_TABLE *)NULL; + +/* Set to non-zero if an assignment error occurs while putting variables + into the temporary environment. */ +int tempenv_assign_error; + +/* Some funky variables which are known about specially. Here is where + "$*", "$1", and all the cruft is kept. */ +char *dollar_vars[10]; +WORD_LIST *rest_of_args = (WORD_LIST *)NULL; +int posparam_count = 0; + +/* The value of $$. */ +pid_t dollar_dollar_pid; + +/* Non-zero means that we have to remake EXPORT_ENV. */ +int array_needs_making = 1; + +/* The number of times BASH has been executed. This is set + by initialize_variables (). */ +int shell_level = 0; + +/* An array which is passed to commands as their environment. It is + manufactured from the union of the initial environment and the + shell variables that are marked for export. */ +char **export_env = (char **)NULL; +static int export_env_index; +static int export_env_size; + +#if defined (READLINE) +static int winsize_assignment; /* currently assigning to LINES or COLUMNS */ +#endif + +SHELL_VAR nameref_invalid_value; +static SHELL_VAR nameref_maxloop_value; + +static HASH_TABLE *last_table_searched; /* hash_lookup sets this */ +static VAR_CONTEXT *last_context_searched; + +/* Some forward declarations. */ +static void create_variable_tables PARAMS((void)); + +static void set_machine_vars PARAMS((void)); +static void set_home_var PARAMS((void)); +static void set_shell_var PARAMS((void)); +static char *get_bash_name PARAMS((void)); +static void initialize_shell_level PARAMS((void)); +static void uidset PARAMS((void)); +#if defined (ARRAY_VARS) +static void make_vers_array PARAMS((void)); +#endif + +static SHELL_VAR *null_assign PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +#if defined (ARRAY_VARS) +static SHELL_VAR *null_array_assign PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +#endif +static SHELL_VAR *get_self PARAMS((SHELL_VAR *)); + +#if defined (ARRAY_VARS) +static SHELL_VAR *init_dynamic_array_var PARAMS((char *, sh_var_value_func_t *, sh_var_assign_func_t *, int)); +static SHELL_VAR *init_dynamic_assoc_var PARAMS((char *, sh_var_value_func_t *, sh_var_assign_func_t *, int)); +#endif + +static SHELL_VAR *assign_seconds PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +static SHELL_VAR *get_seconds PARAMS((SHELL_VAR *)); +static SHELL_VAR *init_seconds_var PARAMS((void)); + +static SHELL_VAR *assign_random PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +static SHELL_VAR *get_random PARAMS((SHELL_VAR *)); + +static SHELL_VAR *get_urandom PARAMS((SHELL_VAR *)); + +static SHELL_VAR *assign_lineno PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +static SHELL_VAR *get_lineno PARAMS((SHELL_VAR *)); + +static SHELL_VAR *assign_subshell PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +static SHELL_VAR *get_subshell PARAMS((SHELL_VAR *)); + +static SHELL_VAR *get_epochseconds PARAMS((SHELL_VAR *)); +static SHELL_VAR *get_epochrealtime PARAMS((SHELL_VAR *)); + +static SHELL_VAR *get_bashpid PARAMS((SHELL_VAR *)); + +static SHELL_VAR *get_bash_argv0 PARAMS((SHELL_VAR *)); +static SHELL_VAR *assign_bash_argv0 PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +static void set_argv0 PARAMS((void)); + +#if defined (HISTORY) +static SHELL_VAR *get_histcmd PARAMS((SHELL_VAR *)); +#endif + +#if defined (READLINE) +static SHELL_VAR *get_comp_wordbreaks PARAMS((SHELL_VAR *)); +static SHELL_VAR *assign_comp_wordbreaks PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +#endif + +#if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS) +static SHELL_VAR *assign_dirstack PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +static SHELL_VAR *get_dirstack PARAMS((SHELL_VAR *)); +#endif + +#if defined (ARRAY_VARS) +static SHELL_VAR *get_groupset PARAMS((SHELL_VAR *)); +# if defined (DEBUGGER) +static SHELL_VAR *get_bashargcv PARAMS((SHELL_VAR *)); +# endif +static SHELL_VAR *build_hashcmd PARAMS((SHELL_VAR *)); +static SHELL_VAR *get_hashcmd PARAMS((SHELL_VAR *)); +static SHELL_VAR *assign_hashcmd PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +# if defined (ALIAS) +static SHELL_VAR *build_aliasvar PARAMS((SHELL_VAR *)); +static SHELL_VAR *get_aliasvar PARAMS((SHELL_VAR *)); +static SHELL_VAR *assign_aliasvar PARAMS((SHELL_VAR *, char *, arrayind_t, char *)); +# endif +#endif + +static SHELL_VAR *get_funcname PARAMS((SHELL_VAR *)); +static SHELL_VAR *init_funcname_var PARAMS((void)); + +static void initialize_dynamic_variables PARAMS((void)); + +static SHELL_VAR *bind_invalid_envvar PARAMS((const char *, char *, int)); + +static int var_sametype PARAMS((SHELL_VAR *, SHELL_VAR *)); + +static SHELL_VAR *hash_lookup PARAMS((const char *, HASH_TABLE *)); +static SHELL_VAR *new_shell_variable PARAMS((const char *)); +static SHELL_VAR *make_new_variable PARAMS((const char *, HASH_TABLE *)); +static SHELL_VAR *bind_variable_internal PARAMS((const char *, char *, HASH_TABLE *, int, int)); + +static void dispose_variable_value PARAMS((SHELL_VAR *)); +static void free_variable_hash_data PARAMS((PTR_T)); + +static VARLIST *vlist_alloc PARAMS((int)); +static VARLIST *vlist_realloc PARAMS((VARLIST *, int)); +static void vlist_add PARAMS((VARLIST *, SHELL_VAR *, int)); + +static void flatten PARAMS((HASH_TABLE *, sh_var_map_func_t *, VARLIST *, int)); + +static int qsort_var_comp PARAMS((SHELL_VAR **, SHELL_VAR **)); + +static SHELL_VAR **vapply PARAMS((sh_var_map_func_t *)); +static SHELL_VAR **fapply PARAMS((sh_var_map_func_t *)); + +static int visible_var PARAMS((SHELL_VAR *)); +static int visible_and_exported PARAMS((SHELL_VAR *)); +static int export_environment_candidate PARAMS((SHELL_VAR *)); +static int local_and_exported PARAMS((SHELL_VAR *)); +static int visible_variable_in_context PARAMS((SHELL_VAR *)); +static int variable_in_context PARAMS((SHELL_VAR *)); +#if defined (ARRAY_VARS) +static int visible_array_vars PARAMS((SHELL_VAR *)); +#endif + +static SHELL_VAR *find_variable_internal PARAMS((const char *, int)); + +static SHELL_VAR *find_nameref_at_context PARAMS((SHELL_VAR *, VAR_CONTEXT *)); +static SHELL_VAR *find_variable_nameref_context PARAMS((SHELL_VAR *, VAR_CONTEXT *, VAR_CONTEXT **)); +static SHELL_VAR *find_variable_last_nameref_context PARAMS((SHELL_VAR *, VAR_CONTEXT *, VAR_CONTEXT **)); + +static SHELL_VAR *bind_tempenv_variable PARAMS((const char *, char *)); +static void push_posix_temp_var PARAMS((PTR_T)); +static void push_temp_var PARAMS((PTR_T)); +static void propagate_temp_var PARAMS((PTR_T)); +static void dispose_temporary_env PARAMS((sh_free_func_t *)); + +static inline char *mk_env_string PARAMS((const char *, const char *, int)); +static char **make_env_array_from_var_list PARAMS((SHELL_VAR **)); +static char **make_var_export_array PARAMS((VAR_CONTEXT *)); +static char **make_func_export_array PARAMS((void)); +static void add_temp_array_to_env PARAMS((char **, int, int)); + +static int n_shell_variables PARAMS((void)); +static int set_context PARAMS((SHELL_VAR *)); + +static void push_func_var PARAMS((PTR_T)); +static void push_builtin_var PARAMS((PTR_T)); +static void push_exported_var PARAMS((PTR_T)); + +/* This needs to be looked at again. */ +static inline void push_posix_tempvar_internal PARAMS((SHELL_VAR *, int)); + +static inline int find_special_var PARAMS((const char *)); + +static void +create_variable_tables () +{ + if (shell_variables == 0) + { + shell_variables = global_variables = new_var_context ((char *)NULL, 0); + shell_variables->scope = 0; + shell_variables->table = hash_create (VARIABLES_HASH_BUCKETS); + } + + if (shell_functions == 0) + shell_functions = hash_create (FUNCTIONS_HASH_BUCKETS); + +#if defined (DEBUGGER) + if (shell_function_defs == 0) + shell_function_defs = hash_create (FUNCTIONS_HASH_BUCKETS); +#endif +} + +/* Initialize the shell variables from the current environment. + If PRIVMODE is nonzero, don't import functions from ENV or + parse $SHELLOPTS. */ +void +initialize_shell_variables (env, privmode) + char **env; + int privmode; +{ + char *name, *string, *temp_string; + int c, char_index, string_index, string_length, ro; + SHELL_VAR *temp_var; + + create_variable_tables (); + + for (string_index = 0; env && (string = env[string_index++]); ) + { + char_index = 0; + name = string; + while ((c = *string++) && c != '=') + ; + if (string[-1] == '=') + char_index = string - name - 1; + + /* If there are weird things in the environment, like `=xxx' or a + string without an `=', just skip them. */ + if (char_index == 0) + continue; + + /* ASSERT(name[char_index] == '=') */ + name[char_index] = '\0'; + /* Now, name = env variable name, string = env variable value, and + char_index == strlen (name) */ + + temp_var = (SHELL_VAR *)NULL; + +#if defined (FUNCTION_IMPORT) + /* If exported function, define it now. Don't import functions from + the environment in privileged mode. */ + if (privmode == 0 && read_but_dont_execute == 0 && + STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) && + STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) && + STREQN ("() {", string, 4)) + { + size_t namelen; + char *tname; /* desired imported function name */ + + namelen = char_index - BASHFUNC_PREFLEN - BASHFUNC_SUFFLEN; + + tname = name + BASHFUNC_PREFLEN; /* start of func name */ + tname[namelen] = '\0'; /* now tname == func name */ + + string_length = strlen (string); + temp_string = (char *)xmalloc (namelen + string_length + 2); + + memcpy (temp_string, tname, namelen); + temp_string[namelen] = ' '; + memcpy (temp_string + namelen + 1, string, string_length + 1); + + /* Don't import function names that are invalid identifiers from the + environment in posix mode, though we still allow them to be defined as + shell variables. */ + if (absolute_program (tname) == 0 && (posixly_correct == 0 || legal_identifier (tname))) + parse_and_execute (temp_string, tname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD); + else + free (temp_string); /* parse_and_execute does this */ + + if (temp_var = find_function (tname)) + { + VSETATTR (temp_var, (att_exported|att_imported)); + array_needs_making = 1; + } + else + { + if (temp_var = bind_invalid_envvar (name, string, 0)) + { + VSETATTR (temp_var, (att_exported | att_imported | att_invisible)); + array_needs_making = 1; + } + last_command_exit_value = EXECUTION_FAILURE; + report_error (_("error importing function definition for `%s'"), tname); + } + + /* Restore original suffix */ + tname[namelen] = BASHFUNC_SUFFIX[0]; + } + else +#endif /* FUNCTION_IMPORT */ +#if defined (ARRAY_VARS) +# if ARRAY_EXPORT + /* Array variables may not yet be exported. */ + if (*string == '(' && string[1] == '[' && string[strlen (string) - 1] == ')') + { + string_length = 1; + temp_string = extract_array_assignment_list (string, &string_length); + temp_var = assign_array_from_string (name, temp_string, 0); + FREE (temp_string); + VSETATTR (temp_var, (att_exported | att_imported)); + array_needs_making = 1; + } + else +# endif /* ARRAY_EXPORT */ +#endif + { + ro = 0; + /* If we processed a command-line option that caused SHELLOPTS to be + set, it may already be set (and read-only) by the time we process + the shell's environment. */ + if (/* posixly_correct &&*/ STREQ (name, "SHELLOPTS")) + { + temp_var = find_variable ("SHELLOPTS"); + ro = temp_var && readonly_p (temp_var); + if (temp_var) + VUNSETATTR (temp_var, att_readonly); + } + if (legal_identifier (name)) + { + temp_var = bind_variable (name, string, 0); + if (temp_var) + { + VSETATTR (temp_var, (att_exported | att_imported)); + if (ro) + VSETATTR (temp_var, att_readonly); + } + } + else + { + temp_var = bind_invalid_envvar (name, string, 0); + if (temp_var) + VSETATTR (temp_var, (att_exported | att_imported | att_invisible)); + } + if (temp_var) + array_needs_making = 1; + } + + name[char_index] = '='; + /* temp_var can be NULL if it was an exported function with a syntax + error (a different bug, but it still shouldn't dump core). */ + if (temp_var && function_p (temp_var) == 0) /* XXX not yet */ + { + CACHE_IMPORTSTR (temp_var, name); + } + } + + set_pwd (); + + /* Set up initial value of $_ */ + temp_var = set_if_not ("_", dollar_vars[0]); + + /* Remember this pid. */ + dollar_dollar_pid = getpid (); + + /* Now make our own defaults in case the vars that we think are + important are missing. */ + temp_var = set_if_not ("PATH", DEFAULT_PATH_VALUE); + temp_var = set_if_not ("TERM", "dumb"); + +#if defined (__QNX__) + /* set node id -- don't import it from the environment */ + { + char node_name[22]; +# if defined (__QNXNTO__) + netmgr_ndtostr(ND2S_LOCAL_STR, ND_LOCAL_NODE, node_name, sizeof(node_name)); +# else + qnx_nidtostr (getnid (), node_name, sizeof (node_name)); +# endif + temp_var = bind_variable ("NODE", node_name, 0); + if (temp_var) + set_auto_export (temp_var); + } +#endif + + /* set up the prompts. */ + if (interactive_shell) + { +#if defined (PROMPT_STRING_DECODE) + set_if_not ("PS1", primary_prompt); +#else + if (current_user.uid == -1) + get_current_user_info (); + set_if_not ("PS1", current_user.euid == 0 ? "# " : primary_prompt); +#endif + set_if_not ("PS2", secondary_prompt); + } + + if (current_user.euid == 0) + bind_variable ("PS4", "+ ", 0); + else + set_if_not ("PS4", "+ "); + + /* Don't allow IFS to be imported from the environment. */ + temp_var = bind_variable ("IFS", " \t\n", 0); + setifs (temp_var); + + /* Magic machine types. Pretty convenient. */ + set_machine_vars (); + + /* Default MAILCHECK for interactive shells. Defer the creation of a + default MAILPATH until the startup files are read, because MAIL + names a mail file if MAILPATH is not set, and we should provide a + default only if neither is set. */ + if (interactive_shell) + { + temp_var = set_if_not ("MAILCHECK", posixly_correct ? "600" : "60"); + VSETATTR (temp_var, att_integer); + } + + /* Do some things with shell level. */ + initialize_shell_level (); + + set_ppid (); + + set_argv0 (); + + /* Initialize the `getopts' stuff. */ + temp_var = bind_variable ("OPTIND", "1", 0); + VSETATTR (temp_var, att_integer); + getopts_reset (0); + bind_variable ("OPTERR", "1", 0); + sh_opterr = 1; + + if (login_shell == 1 && posixly_correct == 0) + set_home_var (); + + /* Get the full pathname to THIS shell, and set the BASH variable + to it. */ + name = get_bash_name (); + temp_var = bind_variable ("BASH", name, 0); + free (name); + + /* Make the exported environment variable SHELL be the user's login + shell. Note that the `tset' command looks at this variable + to determine what style of commands to output; if it ends in "csh", + then C-shell commands are output, else Bourne shell commands. */ + set_shell_var (); + + /* Make a variable called BASH_VERSION which contains the version info. */ + bind_variable ("BASH_VERSION", shell_version_string (), 0); +#if defined (ARRAY_VARS) + make_vers_array (); +#endif + + if (command_execution_string) + bind_variable ("BASH_EXECUTION_STRING", command_execution_string, 0); + + /* Find out if we're supposed to be in Posix.2 mode via an + environment variable. */ + temp_var = find_variable ("POSIXLY_CORRECT"); + if (!temp_var) + temp_var = find_variable ("POSIX_PEDANTIC"); + if (temp_var && imported_p (temp_var)) + sv_strict_posix (temp_var->name); + +#if defined (HISTORY) + /* Set history variables to defaults, and then do whatever we would + do if the variable had just been set. Do this only in the case + that we are remembering commands on the history list. */ + if (remember_on_history) + { + name = bash_tilde_expand (posixly_correct ? "~/.sh_history" : "~/.bash_history", 0); + + set_if_not ("HISTFILE", name); + free (name); + } +#endif /* HISTORY */ + + /* Seed the random number generators. */ + seedrand (); + seedrand32 (); + + /* Handle some "special" variables that we may have inherited from a + parent shell. */ + if (interactive_shell) + { + temp_var = find_variable ("IGNOREEOF"); + if (!temp_var) + temp_var = find_variable ("ignoreeof"); + if (temp_var && imported_p (temp_var)) + sv_ignoreeof (temp_var->name); + } + +#if defined (HISTORY) + if (interactive_shell && remember_on_history) + { + sv_history_control ("HISTCONTROL"); + sv_histignore ("HISTIGNORE"); + sv_histtimefmt ("HISTTIMEFORMAT"); + } +#endif /* HISTORY */ + +#if defined (READLINE) && defined (STRICT_POSIX) + /* POSIXLY_CORRECT will be 1 here if the shell was compiled + -DSTRICT_POSIX or if POSIXLY_CORRECT was supplied in the shell's + environment */ + if (interactive_shell && posixly_correct && no_line_editing == 0) + rl_prefer_env_winsize = 1; +#endif /* READLINE && STRICT_POSIX */ + + /* + * 24 October 2001 + * + * I'm tired of the arguing and bug reports. Bash now leaves SSH_CLIENT + * and SSH2_CLIENT alone. I'm going to rely on the shell_level check in + * isnetconn() to avoid running the startup files more often than wanted. + * That will, of course, only work if the user's login shell is bash, so + * I've made that behavior conditional on SSH_SOURCE_BASHRC being defined + * in config-top.h. + */ +#if 0 + temp_var = find_variable ("SSH_CLIENT"); + if (temp_var && imported_p (temp_var)) + { + VUNSETATTR (temp_var, att_exported); + array_needs_making = 1; + } + temp_var = find_variable ("SSH2_CLIENT"); + if (temp_var && imported_p (temp_var)) + { + VUNSETATTR (temp_var, att_exported); + array_needs_making = 1; + } +#endif + + /* Get the user's real and effective user ids. */ + uidset (); + + temp_var = find_variable ("BASH_XTRACEFD"); + if (temp_var && imported_p (temp_var)) + sv_xtracefd (temp_var->name); + + sv_shcompat ("BASH_COMPAT"); + + /* Allow FUNCNEST to be inherited from the environment. */ + sv_funcnest ("FUNCNEST"); + + /* Initialize the dynamic variables, and seed their values. */ + initialize_dynamic_variables (); +} + +/* **************************************************************** */ +/* */ +/* Setting values for special shell variables */ +/* */ +/* **************************************************************** */ + +static void +set_machine_vars () +{ + SHELL_VAR *temp_var; + + temp_var = set_if_not ("HOSTTYPE", HOSTTYPE); + temp_var = set_if_not ("OSTYPE", OSTYPE); + temp_var = set_if_not ("MACHTYPE", MACHTYPE); + + temp_var = set_if_not ("HOSTNAME", current_host_name); +} + +/* Set $HOME to the information in the password file if we didn't get + it from the environment. */ + +/* This function is not static so the tilde and readline libraries can + use it. */ +char * +sh_get_home_dir () +{ + if (current_user.home_dir == 0) + get_current_user_info (); + return current_user.home_dir; +} + +static void +set_home_var () +{ + SHELL_VAR *temp_var; + + temp_var = find_variable ("HOME"); + if (temp_var == 0) + temp_var = bind_variable ("HOME", sh_get_home_dir (), 0); +#if 0 + VSETATTR (temp_var, att_exported); +#endif +} + +/* Set $SHELL to the user's login shell if it is not already set. Call + get_current_user_info if we haven't already fetched the shell. */ +static void +set_shell_var () +{ + SHELL_VAR *temp_var; + + temp_var = find_variable ("SHELL"); + if (temp_var == 0) + { + if (current_user.shell == 0) + get_current_user_info (); + temp_var = bind_variable ("SHELL", current_user.shell, 0); + } +#if 0 + VSETATTR (temp_var, att_exported); +#endif +} + +static char * +get_bash_name () +{ + char *name; + + if ((login_shell == 1) && RELPATH(shell_name)) + { + if (current_user.shell == 0) + get_current_user_info (); + name = savestring (current_user.shell); + } + else if (ABSPATH(shell_name)) + name = savestring (shell_name); + else if (shell_name[0] == '.' && shell_name[1] == '/') + { + /* Fast path for common case. */ + char *cdir; + int len; + + cdir = get_string_value ("PWD"); + if (cdir) + { + len = strlen (cdir); + name = (char *)xmalloc (len + strlen (shell_name) + 1); + strcpy (name, cdir); + strcpy (name + len, shell_name + 1); + } + else + name = savestring (shell_name); + } + else + { + char *tname; + int s; + + tname = find_user_command (shell_name); + + if (tname == 0) + { + /* Try the current directory. If there is not an executable + there, just punt and use the login shell. */ + s = file_status (shell_name); + if (s & FS_EXECABLE) + { + tname = make_absolute (shell_name, get_string_value ("PWD")); + if (*shell_name == '.') + { + name = sh_canonpath (tname, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + if (name == 0) + name = tname; + else + free (tname); + } + else + name = tname; + } + else + { + if (current_user.shell == 0) + get_current_user_info (); + name = savestring (current_user.shell); + } + } + else + { + name = full_pathname (tname); + free (tname); + } + } + + return (name); +} + +void +adjust_shell_level (change) + int change; +{ + char new_level[5], *old_SHLVL; + intmax_t old_level; + SHELL_VAR *temp_var; + + old_SHLVL = get_string_value ("SHLVL"); + if (old_SHLVL == 0 || *old_SHLVL == '\0' || legal_number (old_SHLVL, &old_level) == 0) + old_level = 0; + + shell_level = old_level + change; + if (shell_level < 0) + shell_level = 0; + else if (shell_level >= 1000) + { + internal_warning (_("shell level (%d) too high, resetting to 1"), shell_level); + shell_level = 1; + } + + /* We don't need the full generality of itos here. */ + if (shell_level < 10) + { + new_level[0] = shell_level + '0'; + new_level[1] = '\0'; + } + else if (shell_level < 100) + { + new_level[0] = (shell_level / 10) + '0'; + new_level[1] = (shell_level % 10) + '0'; + new_level[2] = '\0'; + } + else if (shell_level < 1000) + { + new_level[0] = (shell_level / 100) + '0'; + old_level = shell_level % 100; + new_level[1] = (old_level / 10) + '0'; + new_level[2] = (old_level % 10) + '0'; + new_level[3] = '\0'; + } + + temp_var = bind_variable ("SHLVL", new_level, 0); + set_auto_export (temp_var); +} + +static void +initialize_shell_level () +{ + adjust_shell_level (1); +} + +/* If we got PWD from the environment, update our idea of the current + working directory. In any case, make sure that PWD exists before + checking it. It is possible for getcwd () to fail on shell startup, + and in that case, PWD would be undefined. If this is an interactive + login shell, see if $HOME is the current working directory, and if + that's not the same string as $PWD, set PWD=$HOME. */ + +void +set_pwd () +{ + SHELL_VAR *temp_var, *home_var; + char *temp_string, *home_string, *current_dir; + + home_var = find_variable ("HOME"); + home_string = home_var ? value_cell (home_var) : (char *)NULL; + + temp_var = find_variable ("PWD"); + /* Follow posix rules for importing PWD */ + if (temp_var && imported_p (temp_var) && + (temp_string = value_cell (temp_var)) && + temp_string[0] == '/' && + same_file (temp_string, ".", (struct stat *)NULL, (struct stat *)NULL)) + { + current_dir = sh_canonpath (temp_string, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + if (current_dir == 0) + current_dir = get_working_directory ("shell_init"); + else + set_working_directory (current_dir); + if (posixly_correct && current_dir) + { + temp_var = bind_variable ("PWD", current_dir, 0); + set_auto_export (temp_var); + } + free (current_dir); + } + else if (home_string && interactive_shell && login_shell && + same_file (home_string, ".", (struct stat *)NULL, (struct stat *)NULL)) + { + set_working_directory (home_string); + temp_var = bind_variable ("PWD", home_string, 0); + set_auto_export (temp_var); + } + else + { + temp_string = get_working_directory ("shell-init"); + if (temp_string) + { + temp_var = bind_variable ("PWD", temp_string, 0); + set_auto_export (temp_var); + free (temp_string); + } + } + + /* According to the Single Unix Specification, v2, $OLDPWD is an + `environment variable' and therefore should be auto-exported. If we + don't find OLDPWD in the environment, or it doesn't name a directory, + make a dummy invisible variable for OLDPWD, and mark it as exported. */ + temp_var = find_variable ("OLDPWD"); +#if defined (OLDPWD_CHECK_DIRECTORY) + if (temp_var == 0 || value_cell (temp_var) == 0 || file_isdir (value_cell (temp_var)) == 0) +#else + if (temp_var == 0 || value_cell (temp_var) == 0) +#endif + { + temp_var = bind_variable ("OLDPWD", (char *)NULL, 0); + VSETATTR (temp_var, (att_exported | att_invisible)); + } +} + +/* Make a variable $PPID, which holds the pid of the shell's parent. */ +void +set_ppid () +{ + char namebuf[INT_STRLEN_BOUND(pid_t) + 1], *name; + SHELL_VAR *temp_var; + + name = inttostr (getppid (), namebuf, sizeof(namebuf)); + temp_var = find_variable ("PPID"); + if (temp_var) + VUNSETATTR (temp_var, (att_readonly | att_exported)); + temp_var = bind_variable ("PPID", name, 0); + VSETATTR (temp_var, (att_readonly | att_integer)); +} + +static void +uidset () +{ + char buff[INT_STRLEN_BOUND(uid_t) + 1], *b; + register SHELL_VAR *v; + + b = inttostr (current_user.uid, buff, sizeof (buff)); + v = find_variable ("UID"); + if (v == 0) + { + v = bind_variable ("UID", b, 0); + VSETATTR (v, (att_readonly | att_integer)); + } + + if (current_user.euid != current_user.uid) + b = inttostr (current_user.euid, buff, sizeof (buff)); + + v = find_variable ("EUID"); + if (v == 0) + { + v = bind_variable ("EUID", b, 0); + VSETATTR (v, (att_readonly | att_integer)); + } +} + +#if defined (ARRAY_VARS) +static void +make_vers_array () +{ + SHELL_VAR *vv; + ARRAY *av; + char *s, d[32], b[INT_STRLEN_BOUND(int) + 1]; + + unbind_variable_noref ("BASH_VERSINFO"); + + vv = make_new_array_variable ("BASH_VERSINFO"); + av = array_cell (vv); + strcpy (d, dist_version); + s = strchr (d, '.'); + if (s) + *s++ = '\0'; + array_insert (av, 0, d); + array_insert (av, 1, s); + s = inttostr (patch_level, b, sizeof (b)); + array_insert (av, 2, s); + s = inttostr (build_version, b, sizeof (b)); + array_insert (av, 3, s); + array_insert (av, 4, release_status); + array_insert (av, 5, MACHTYPE); + + VSETATTR (vv, att_readonly); +} +#endif /* ARRAY_VARS */ + +/* Set the environment variables $LINES and $COLUMNS in response to + a window size change. */ +void +sh_set_lines_and_columns (lines, cols) + int lines, cols; +{ + char val[INT_STRLEN_BOUND(int) + 1], *v; + +#if defined (READLINE) + /* If we are currently assigning to LINES or COLUMNS, don't do anything. */ + if (winsize_assignment) + return; +#endif + + v = inttostr (lines, val, sizeof (val)); + bind_variable ("LINES", v, 0); + + v = inttostr (cols, val, sizeof (val)); + bind_variable ("COLUMNS", v, 0); +} + +/* **************************************************************** */ +/* */ +/* Printing variables and values */ +/* */ +/* **************************************************************** */ + +/* Print LIST (a list of shell variables) to stdout in such a way that + they can be read back in. */ +void +print_var_list (list) + register SHELL_VAR **list; +{ + register int i; + register SHELL_VAR *var; + + for (i = 0; list && (var = list[i]); i++) + if (invisible_p (var) == 0) + print_assignment (var); +} + +/* Print LIST (a list of shell functions) to stdout in such a way that + they can be read back in. */ +void +print_func_list (list) + register SHELL_VAR **list; +{ + register int i; + register SHELL_VAR *var; + + for (i = 0; list && (var = list[i]); i++) + { + printf ("%s ", var->name); + print_var_function (var); + printf ("\n"); + } +} + +/* Print the value of a single SHELL_VAR. No newline is + output, but the variable is printed in such a way that + it can be read back in. */ +void +print_assignment (var) + SHELL_VAR *var; +{ + if (var_isset (var) == 0) + return; + + if (function_p (var)) + { + printf ("%s", var->name); + print_var_function (var); + printf ("\n"); + } +#if defined (ARRAY_VARS) + else if (array_p (var)) + print_array_assignment (var, 0); + else if (assoc_p (var)) + print_assoc_assignment (var, 0); +#endif /* ARRAY_VARS */ + else + { + printf ("%s=", var->name); + print_var_value (var, 1); + printf ("\n"); + } +} + +/* Print the value cell of VAR, a shell variable. Do not print + the name, nor leading/trailing newline. If QUOTE is non-zero, + and the value contains shell metacharacters, quote the value + in such a way that it can be read back in. */ +void +print_var_value (var, quote) + SHELL_VAR *var; + int quote; +{ + char *t; + + if (var_isset (var) == 0) + return; + + if (quote && posixly_correct == 0 && ansic_shouldquote (value_cell (var))) + { + t = ansic_quote (value_cell (var), 0, (int *)0); + printf ("%s", t); + free (t); + } + else if (quote && sh_contains_shell_metas (value_cell (var))) + { + t = sh_single_quote (value_cell (var)); + printf ("%s", t); + free (t); + } + else + printf ("%s", value_cell (var)); +} + +/* Print the function cell of VAR, a shell variable. Do not + print the name, nor leading/trailing newline. */ +void +print_var_function (var) + SHELL_VAR *var; +{ + char *x; + + if (function_p (var) && var_isset (var)) + { + x = named_function_string ((char *)NULL, function_cell(var), FUNC_MULTILINE|FUNC_EXTERNAL); + printf ("%s", x); + } +} + +/* **************************************************************** */ +/* */ +/* Dynamic Variables */ +/* */ +/* **************************************************************** */ + +/* DYNAMIC VARIABLES + + These are variables whose values are generated anew each time they are + referenced. These are implemented using a pair of function pointers + in the struct variable: assign_func, which is called from bind_variable + and, if arrays are compiled into the shell, some of the functions in + arrayfunc.c, and dynamic_value, which is called from find_variable. + + assign_func is called from bind_variable_internal, if + bind_variable_internal discovers that the variable being assigned to + has such a function. The function is called as + SHELL_VAR *temp = (*(entry->assign_func)) (entry, value, ind) + and the (SHELL_VAR *)temp is returned as the value of bind_variable. It + is usually ENTRY (self). IND is an index for an array variable, and + unused otherwise. + + dynamic_value is called from find_variable_internal to return a `new' + value for the specified dynamic variable. If this function is NULL, + the variable is treated as a `normal' shell variable. If it is not, + however, then this function is called like this: + tempvar = (*(var->dynamic_value)) (var); + + Sometimes `tempvar' will replace the value of `var'. Other times, the + shell will simply use the string value. Pretty object-oriented, huh? + + Be warned, though: if you `unset' a special variable, it loses its + special meaning, even if you subsequently set it. + + The special assignment code would probably have been better put in + subst.c: do_assignment_internal, in the same style as + stupidly_hack_special_variables, but I wanted the changes as + localized as possible. */ + +#define INIT_DYNAMIC_VAR(var, val, gfunc, afunc) \ + do \ + { \ + v = bind_variable (var, (val), 0); \ + v->dynamic_value = gfunc; \ + v->assign_func = afunc; \ + } \ + while (0) + +#define INIT_DYNAMIC_ARRAY_VAR(var, gfunc, afunc) \ + do \ + { \ + v = make_new_array_variable (var); \ + v->dynamic_value = gfunc; \ + v->assign_func = afunc; \ + } \ + while (0) + +#define INIT_DYNAMIC_ASSOC_VAR(var, gfunc, afunc) \ + do \ + { \ + v = make_new_assoc_variable (var); \ + v->dynamic_value = gfunc; \ + v->assign_func = afunc; \ + } \ + while (0) + +static SHELL_VAR * +null_assign (self, value, unused, key) + SHELL_VAR *self; + char *value; + arrayind_t unused; + char *key; +{ + return (self); +} + +#if defined (ARRAY_VARS) +static SHELL_VAR * +null_array_assign (self, value, ind, key) + SHELL_VAR *self; + char *value; + arrayind_t ind; + char *key; +{ + return (self); +} +#endif + +/* Degenerate `dynamic_value' function; just returns what's passed without + manipulation. */ +static SHELL_VAR * +get_self (self) + SHELL_VAR *self; +{ + return (self); +} + +#if defined (ARRAY_VARS) +/* A generic dynamic array variable initializer. Initialize array variable + NAME with dynamic value function GETFUNC and assignment function SETFUNC. */ +static SHELL_VAR * +init_dynamic_array_var (name, getfunc, setfunc, attrs) + char *name; + sh_var_value_func_t *getfunc; + sh_var_assign_func_t *setfunc; + int attrs; +{ + SHELL_VAR *v; + + v = find_variable (name); + if (v) + return (v); + INIT_DYNAMIC_ARRAY_VAR (name, getfunc, setfunc); + if (attrs) + VSETATTR (v, attrs); + return v; +} + +static SHELL_VAR * +init_dynamic_assoc_var (name, getfunc, setfunc, attrs) + char *name; + sh_var_value_func_t *getfunc; + sh_var_assign_func_t *setfunc; + int attrs; +{ + SHELL_VAR *v; + + v = find_variable (name); + if (v) + return (v); + INIT_DYNAMIC_ASSOC_VAR (name, getfunc, setfunc); + if (attrs) + VSETATTR (v, attrs); + return v; +} +#endif + +/* The value of $SECONDS. This is the number of seconds since shell + invocation, or, the number of seconds since the last assignment + the + value of the last assignment. */ +static intmax_t seconds_value_assigned; + +static SHELL_VAR * +assign_seconds (self, value, unused, key) + SHELL_VAR *self; + char *value; + arrayind_t unused; + char *key; +{ + intmax_t nval; + int expok; + + if (integer_p (self)) + nval = evalexp (value, 0, &expok); + else + expok = legal_number (value, &nval); + seconds_value_assigned = expok ? nval : 0; + gettimeofday (&shellstart, NULL); + shell_start_time = shellstart.tv_sec; + return (self); +} + +static SHELL_VAR * +get_seconds (var) + SHELL_VAR *var; +{ + time_t time_since_start; + char *p; + struct timeval tv; + + gettimeofday(&tv, NULL); + time_since_start = tv.tv_sec - shell_start_time; + p = itos(seconds_value_assigned + time_since_start); + + FREE (value_cell (var)); + + VSETATTR (var, att_integer); + var_setvalue (var, p); + return (var); +} + +static SHELL_VAR * +init_seconds_var () +{ + SHELL_VAR *v; + + v = find_variable ("SECONDS"); + if (v) + { + if (legal_number (value_cell(v), &seconds_value_assigned) == 0) + seconds_value_assigned = 0; + } + INIT_DYNAMIC_VAR ("SECONDS", (v ? value_cell (v) : (char *)NULL), get_seconds, assign_seconds); + return v; +} + +/* Functions for $RANDOM and $SRANDOM */ + +int last_random_value; +static int seeded_subshell = 0; + +static SHELL_VAR * +assign_random (self, value, unused, key) + SHELL_VAR *self; + char *value; + arrayind_t unused; + char *key; +{ + intmax_t seedval; + int expok; + + if (integer_p (self)) + seedval = evalexp (value, 0, &expok); + else + expok = legal_number (value, &seedval); + if (expok == 0) + return (self); + sbrand (seedval); + if (subshell_environment) + seeded_subshell = getpid (); + return (self); +} + +int +get_random_number () +{ + int rv, pid; + + /* Reset for command and process substitution. */ + pid = getpid (); + if (subshell_environment && seeded_subshell != pid) + { + seedrand (); + seeded_subshell = pid; + } + + do + rv = brand (); + while (rv == last_random_value); + + return (last_random_value = rv); +} + +static SHELL_VAR * +get_random (var) + SHELL_VAR *var; +{ + int rv; + char *p; + + rv = get_random_number (); + p = itos (rv); + + FREE (value_cell (var)); + + VSETATTR (var, att_integer); + var_setvalue (var, p); + return (var); +} + +static SHELL_VAR * +get_urandom (var) + SHELL_VAR *var; +{ + u_bits32_t rv; + char *p; + + rv = get_urandom32 (); + p = itos (rv); + + FREE (value_cell (var)); + + VSETATTR (var, att_integer); + var_setvalue (var, p); + return (var); +} + +static SHELL_VAR * +assign_lineno (var, value, unused, key) + SHELL_VAR *var; + char *value; + arrayind_t unused; + char *key; +{ + intmax_t new_value; + + if (value == 0 || *value == '\0' || legal_number (value, &new_value) == 0) + new_value = 0; + line_number = line_number_base = new_value; + return var; +} + +/* Function which returns the current line number. */ +static SHELL_VAR * +get_lineno (var) + SHELL_VAR *var; +{ + char *p; + int ln; + + ln = executing_line_number (); + p = itos (ln); + FREE (value_cell (var)); + var_setvalue (var, p); + return (var); +} + +static SHELL_VAR * +assign_subshell (var, value, unused, key) + SHELL_VAR *var; + char *value; + arrayind_t unused; + char *key; +{ + intmax_t new_value; + + if (value == 0 || *value == '\0' || legal_number (value, &new_value) == 0) + new_value = 0; + subshell_level = new_value; + return var; +} + +static SHELL_VAR * +get_subshell (var) + SHELL_VAR *var; +{ + char *p; + + p = itos (subshell_level); + FREE (value_cell (var)); + var_setvalue (var, p); + return (var); +} + +static SHELL_VAR * +get_epochseconds (var) + SHELL_VAR *var; +{ + intmax_t now; + char *p; + + now = NOW; + p = itos (now); + + FREE (value_cell (var)); + var_setvalue (var, p); + return (var); +} + +static SHELL_VAR * +get_epochrealtime (var) + SHELL_VAR *var; +{ + char buf[32]; + char *p; + struct timeval tv; + + gettimeofday (&tv, NULL); + snprintf (buf, sizeof (buf), "%u%c%06u", (unsigned)tv.tv_sec, + locale_decpoint (), + (unsigned)tv.tv_usec); + + p = savestring (buf); + FREE (value_cell (var)); + var_setvalue (var, p); + return (var); +} + +static SHELL_VAR * +get_bashpid (var) + SHELL_VAR *var; +{ + int pid; + char *p; + + pid = getpid (); + p = itos (pid); + + FREE (value_cell (var)); + VSETATTR (var, att_integer); /* XXX - was also att_readonly */ + var_setvalue (var, p); + return (var); +} + +static SHELL_VAR * +get_bash_argv0 (var) + SHELL_VAR *var; +{ + char *p; + + p = savestring (dollar_vars[0]); + FREE (value_cell (var)); + var_setvalue (var, p); + return var; +} + +static char *static_shell_name = 0; + +static SHELL_VAR * +assign_bash_argv0 (var, value, unused, key) + SHELL_VAR *var; + char *value; + arrayind_t unused; + char *key; +{ + size_t vlen; + + if (value == 0) + return var; + + FREE (dollar_vars[0]); + dollar_vars[0] = savestring (value); + + /* Need these gyrations because shell_name isn't dynamically allocated */ + vlen = STRLEN (value); + static_shell_name = xrealloc (static_shell_name, vlen + 1); + strcpy (static_shell_name, value); + + shell_name = static_shell_name; + return var; +} + +static void +set_argv0 () +{ + SHELL_VAR *v; + + v = find_variable ("BASH_ARGV0"); + if (v && imported_p (v)) + assign_bash_argv0 (v, value_cell (v), 0, 0); +} + +static SHELL_VAR * +get_bash_command (var) + SHELL_VAR *var; +{ + char *p; + + if (the_printed_command_except_trap) + p = savestring (the_printed_command_except_trap); + else + { + p = (char *)xmalloc (1); + p[0] = '\0'; + } + FREE (value_cell (var)); + var_setvalue (var, p); + return (var); +} + +#if defined (HISTORY) +static SHELL_VAR * +get_histcmd (var) + SHELL_VAR *var; +{ + char *p; + int n; + + /* Do the same adjustment here we do in parse.y:prompt_history_number, + assuming that we are in one of two states: decoding this as part of + the prompt string, in which case we do not want to assume that the + command has been saved to the history and the history number incremented, + or the expansion is part of the current command being executed and has + already been saved to history and the history number incremented. + Right now we use EXECUTING as the determinant. */ + n = history_number () - executing; + p = itos (n); + FREE (value_cell (var)); + var_setvalue (var, p); + return (var); +} +#endif + +#if defined (READLINE) +/* When this function returns, VAR->value points to malloced memory. */ +static SHELL_VAR * +get_comp_wordbreaks (var) + SHELL_VAR *var; +{ + /* If we don't have anything yet, assign a default value. */ + if (rl_completer_word_break_characters == 0 && bash_readline_initialized == 0) + enable_hostname_completion (perform_hostname_completion); + + FREE (value_cell (var)); + var_setvalue (var, savestring (rl_completer_word_break_characters)); + + return (var); +} + +/* When this function returns, rl_completer_word_break_characters points to + malloced memory. */ +static SHELL_VAR * +assign_comp_wordbreaks (self, value, unused, key) + SHELL_VAR *self; + char *value; + arrayind_t unused; + char *key; +{ + if (rl_completer_word_break_characters && + rl_completer_word_break_characters != rl_basic_word_break_characters) + free (rl_completer_word_break_characters); + + rl_completer_word_break_characters = savestring (value); + return self; +} +#endif /* READLINE */ + +#if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS) +static SHELL_VAR * +assign_dirstack (self, value, ind, key) + SHELL_VAR *self; + char *value; + arrayind_t ind; + char *key; +{ + set_dirstack_element (ind, 1, value); + return self; +} + +static SHELL_VAR * +get_dirstack (self) + SHELL_VAR *self; +{ + ARRAY *a; + WORD_LIST *l; + + l = get_directory_stack (0); + a = array_from_word_list (l); + array_dispose (array_cell (self)); + dispose_words (l); + var_setarray (self, a); + return self; +} +#endif /* PUSHD AND POPD && ARRAY_VARS */ + +#if defined (ARRAY_VARS) +/* We don't want to initialize the group set with a call to getgroups() + unless we're asked to, but we only want to do it once. */ +static SHELL_VAR * +get_groupset (self) + SHELL_VAR *self; +{ + register int i; + int ng; + ARRAY *a; + static char **group_set = (char **)NULL; + + if (group_set == 0) + { + group_set = get_group_list (&ng); + a = array_cell (self); + for (i = 0; i < ng; i++) + array_insert (a, i, group_set[i]); + } + return (self); +} + +# if defined (DEBUGGER) +static SHELL_VAR * +get_bashargcv (self) + SHELL_VAR *self; +{ + static int self_semaphore = 0; + + /* Backwards compatibility: if we refer to BASH_ARGV or BASH_ARGC at the + top level without enabling debug mode, and we don't have an instance + of the variable set, initialize the arg arrays. + This will already have been done if debugging_mode != 0. */ + if (self_semaphore == 0 && variable_context == 0 && debugging_mode == 0) /* don't do it for shell functions */ + { + self_semaphore = 1; + init_bash_argv (); + self_semaphore = 0; + } + return self; +} +# endif + +static SHELL_VAR * +build_hashcmd (self) + SHELL_VAR *self; +{ + HASH_TABLE *h; + int i; + char *k, *v; + BUCKET_CONTENTS *item; + + h = assoc_cell (self); + if (h) + assoc_dispose (h); + + if (hashed_filenames == 0 || HASH_ENTRIES (hashed_filenames) == 0) + { + var_setvalue (self, (char *)NULL); + return self; + } + + h = assoc_create (hashed_filenames->nbuckets); + for (i = 0; i < hashed_filenames->nbuckets; i++) + { + for (item = hash_items (i, hashed_filenames); item; item = item->next) + { + k = savestring (item->key); + v = pathdata(item)->path; + assoc_insert (h, k, v); + } + } + + var_setvalue (self, (char *)h); + return self; +} + +static SHELL_VAR * +get_hashcmd (self) + SHELL_VAR *self; +{ + build_hashcmd (self); + return (self); +} + +static SHELL_VAR * +assign_hashcmd (self, value, ind, key) + SHELL_VAR *self; + char *value; + arrayind_t ind; + char *key; +{ +#if defined (RESTRICTED_SHELL) + char *full_path; + + if (restricted) + { + if (strchr (value, '/')) + { + sh_restricted (value); + return (SHELL_VAR *)NULL; + } + /* If we are changing the hash table in a restricted shell, make sure the + target pathname can be found using a $PATH search. */ + full_path = find_user_command (value); + if (full_path == 0 || *full_path == 0 || executable_file (full_path) == 0) + { + sh_notfound (value); + free (full_path); + return ((SHELL_VAR *)NULL); + } + free (full_path); + } +#endif + phash_insert (key, value, 0, 0); + return (build_hashcmd (self)); +} + +#if defined (ALIAS) +static SHELL_VAR * +build_aliasvar (self) + SHELL_VAR *self; +{ + HASH_TABLE *h; + int i; + char *k, *v; + BUCKET_CONTENTS *item; + + h = assoc_cell (self); + if (h) + assoc_dispose (h); + + if (aliases == 0 || HASH_ENTRIES (aliases) == 0) + { + var_setvalue (self, (char *)NULL); + return self; + } + + h = assoc_create (aliases->nbuckets); + for (i = 0; i < aliases->nbuckets; i++) + { + for (item = hash_items (i, aliases); item; item = item->next) + { + k = savestring (item->key); + v = ((alias_t *)(item->data))->value; + assoc_insert (h, k, v); + } + } + + var_setvalue (self, (char *)h); + return self; +} + +static SHELL_VAR * +get_aliasvar (self) + SHELL_VAR *self; +{ + build_aliasvar (self); + return (self); +} + +static SHELL_VAR * +assign_aliasvar (self, value, ind, key) + SHELL_VAR *self; + char *value; + arrayind_t ind; + char *key; +{ + if (legal_alias_name (key, 0) == 0) + { + report_error (_("`%s': invalid alias name"), key); + return (self); + } + add_alias (key, value); + return (build_aliasvar (self)); +} +#endif /* ALIAS */ + +#endif /* ARRAY_VARS */ + +/* If ARRAY_VARS is not defined, this just returns the name of any + currently-executing function. If we have arrays, it's a call stack. */ +static SHELL_VAR * +get_funcname (self) + SHELL_VAR *self; +{ +#if ! defined (ARRAY_VARS) + char *t; + if (variable_context && this_shell_function) + { + FREE (value_cell (self)); + t = savestring (this_shell_function->name); + var_setvalue (self, t); + } +#endif + return (self); +} + +void +make_funcname_visible (on_or_off) + int on_or_off; +{ + SHELL_VAR *v; + + v = find_variable ("FUNCNAME"); + if (v == 0 || v->dynamic_value == 0) + return; + + if (on_or_off) + VUNSETATTR (v, att_invisible); + else + VSETATTR (v, att_invisible); +} + +static SHELL_VAR * +init_funcname_var () +{ + SHELL_VAR *v; + + v = find_variable ("FUNCNAME"); + if (v) + return v; +#if defined (ARRAY_VARS) + INIT_DYNAMIC_ARRAY_VAR ("FUNCNAME", get_funcname, null_array_assign); +#else + INIT_DYNAMIC_VAR ("FUNCNAME", (char *)NULL, get_funcname, null_assign); +#endif + VSETATTR (v, att_invisible|att_noassign); + return v; +} + +static void +initialize_dynamic_variables () +{ + SHELL_VAR *v; + + v = init_seconds_var (); + + INIT_DYNAMIC_VAR ("BASH_ARGV0", (char *)NULL, get_bash_argv0, assign_bash_argv0); + + INIT_DYNAMIC_VAR ("BASH_COMMAND", (char *)NULL, get_bash_command, (sh_var_assign_func_t *)NULL); + INIT_DYNAMIC_VAR ("BASH_SUBSHELL", (char *)NULL, get_subshell, assign_subshell); + + INIT_DYNAMIC_VAR ("RANDOM", (char *)NULL, get_random, assign_random); + VSETATTR (v, att_integer); + INIT_DYNAMIC_VAR ("SRANDOM", (char *)NULL, get_urandom, (sh_var_assign_func_t *)NULL); + VSETATTR (v, att_integer); + INIT_DYNAMIC_VAR ("LINENO", (char *)NULL, get_lineno, assign_lineno); + VSETATTR (v, att_regenerate); + + INIT_DYNAMIC_VAR ("BASHPID", (char *)NULL, get_bashpid, null_assign); + VSETATTR (v, att_integer); + + INIT_DYNAMIC_VAR ("EPOCHSECONDS", (char *)NULL, get_epochseconds, null_assign); + VSETATTR (v, att_regenerate); + INIT_DYNAMIC_VAR ("EPOCHREALTIME", (char *)NULL, get_epochrealtime, null_assign); + VSETATTR (v, att_regenerate); + +#if defined (HISTORY) + INIT_DYNAMIC_VAR ("HISTCMD", (char *)NULL, get_histcmd, (sh_var_assign_func_t *)NULL); + VSETATTR (v, att_integer); +#endif + +#if defined (READLINE) + INIT_DYNAMIC_VAR ("COMP_WORDBREAKS", (char *)NULL, get_comp_wordbreaks, assign_comp_wordbreaks); +#endif + +#if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS) + v = init_dynamic_array_var ("DIRSTACK", get_dirstack, assign_dirstack, 0); +#endif /* PUSHD_AND_POPD && ARRAY_VARS */ + +#if defined (ARRAY_VARS) + v = init_dynamic_array_var ("GROUPS", get_groupset, null_array_assign, att_noassign); + +# if defined (DEBUGGER) + v = init_dynamic_array_var ("BASH_ARGC", get_bashargcv, null_array_assign, att_noassign|att_nounset); + v = init_dynamic_array_var ("BASH_ARGV", get_bashargcv, null_array_assign, att_noassign|att_nounset); +# endif /* DEBUGGER */ + v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign|att_nounset); + v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign|att_nounset); + + v = init_dynamic_assoc_var ("BASH_CMDS", get_hashcmd, assign_hashcmd, att_nofree); +# if defined (ALIAS) + v = init_dynamic_assoc_var ("BASH_ALIASES", get_aliasvar, assign_aliasvar, att_nofree); +# endif +#endif + + v = init_funcname_var (); +} + +/* **************************************************************** */ +/* */ +/* Retrieving variables and values */ +/* */ +/* **************************************************************** */ + +#if 0 /* not yet */ +int +var_isset (var) + SHELL_VAR *var; +{ + return (var->value != 0); +} + +int +var_isunset (var) + SHELL_VAR *var; +{ + return (var->value == 0); +} +#endif + +/* How to get a pointer to the shell variable or function named NAME. + HASHED_VARS is a pointer to the hash table containing the list + of interest (either variables or functions). */ + +static SHELL_VAR * +hash_lookup (name, hashed_vars) + const char *name; + HASH_TABLE *hashed_vars; +{ + BUCKET_CONTENTS *bucket; + + bucket = hash_search (name, hashed_vars, 0); + /* If we find the name in HASHED_VARS, set LAST_TABLE_SEARCHED to that + table. */ + if (bucket) + last_table_searched = hashed_vars; + return (bucket ? (SHELL_VAR *)bucket->data : (SHELL_VAR *)NULL); +} + +SHELL_VAR * +var_lookup (name, vcontext) + const char *name; + VAR_CONTEXT *vcontext; +{ + VAR_CONTEXT *vc; + SHELL_VAR *v; + + v = (SHELL_VAR *)NULL; + for (vc = vcontext; vc; vc = vc->down) + if (v = hash_lookup (name, vc->table)) + break; + + return v; +} + +/* Look up the variable entry named NAME. If SEARCH_TEMPENV is non-zero, + then also search the temporarily built list of exported variables. + The lookup order is: + temporary_env + shell_variables list +*/ + +SHELL_VAR * +find_variable_internal (name, flags) + const char *name; + int flags; +{ + SHELL_VAR *var; + int search_tempenv, force_tempenv; + VAR_CONTEXT *vc; + + var = (SHELL_VAR *)NULL; + + force_tempenv = (flags & FV_FORCETEMPENV); + + /* If explicitly requested, first look in the temporary environment for + the variable. This allows constructs such as "foo=x eval 'echo $foo'" + to get the `exported' value of $foo. This happens if we are executing + a function or builtin, or if we are looking up a variable in a + "subshell environment". */ + search_tempenv = force_tempenv || (expanding_redir == 0 && subshell_environment); + + if (search_tempenv && temporary_env) + var = hash_lookup (name, temporary_env); + + if (var == 0) + { + if ((flags & FV_SKIPINVISIBLE) == 0) + var = var_lookup (name, shell_variables); + else + { + /* essentially var_lookup expanded inline so we can check for + att_invisible */ + for (vc = shell_variables; vc; vc = vc->down) + { + var = hash_lookup (name, vc->table); + if (var && invisible_p (var)) + var = 0; + if (var) + break; + } + } + } + + if (var == 0) + return ((SHELL_VAR *)NULL); + + return (var->dynamic_value ? (*(var->dynamic_value)) (var) : var); +} + +/* Look up and resolve the chain of nameref variables starting at V all the + way to NULL or non-nameref. */ +SHELL_VAR * +find_variable_nameref (v) + SHELL_VAR *v; +{ + int level, flags; + char *newname; + SHELL_VAR *orig, *oldv; + + level = 0; + orig = v; + while (v && nameref_p (v)) + { + level++; + if (level > NAMEREF_MAX) + return ((SHELL_VAR *)0); /* error message here? */ + newname = nameref_cell (v); + if (newname == 0 || *newname == '\0') + return ((SHELL_VAR *)0); + oldv = v; + flags = 0; + if (expanding_redir == 0 && (assigning_in_environment || executing_builtin)) + flags |= FV_FORCETEMPENV; + /* We don't handle array subscripts here. */ + v = find_variable_internal (newname, flags); + if (v == orig || v == oldv) + { + internal_warning (_("%s: circular name reference"), orig->name); +#if 1 + /* XXX - provisional change - circular refs go to + global scope for resolution, without namerefs. */ + if (variable_context && v->context) + return (find_global_variable_noref (v->name)); + else +#endif + return ((SHELL_VAR *)0); + } + } + return v; +} + +/* Resolve the chain of nameref variables for NAME. XXX - could change later */ +SHELL_VAR * +find_variable_last_nameref (name, vflags) + const char *name; + int vflags; +{ + SHELL_VAR *v, *nv; + char *newname; + int level, flags; + + nv = v = find_variable_noref (name); + level = 0; + while (v && nameref_p (v)) + { + level++; + if (level > NAMEREF_MAX) + return ((SHELL_VAR *)0); /* error message here? */ + newname = nameref_cell (v); + if (newname == 0 || *newname == '\0') + return ((vflags && invisible_p (v)) ? v : (SHELL_VAR *)0); + nv = v; + flags = 0; + if (expanding_redir == 0 && (assigning_in_environment || executing_builtin)) + flags |= FV_FORCETEMPENV; + /* We don't accommodate array subscripts here. */ + v = find_variable_internal (newname, flags); + } + return nv; +} + +/* Resolve the chain of nameref variables for NAME. XXX - could change later */ +SHELL_VAR * +find_global_variable_last_nameref (name, vflags) + const char *name; + int vflags; +{ + SHELL_VAR *v, *nv; + char *newname; + int level; + + nv = v = find_global_variable_noref (name); + level = 0; + while (v && nameref_p (v)) + { + level++; + if (level > NAMEREF_MAX) + return ((SHELL_VAR *)0); /* error message here? */ + newname = nameref_cell (v); + if (newname == 0 || *newname == '\0') + return ((vflags && invisible_p (v)) ? v : (SHELL_VAR *)0); + nv = v; + /* We don't accommodate array subscripts here. */ + v = find_global_variable_noref (newname); + } + return nv; +} + +static SHELL_VAR * +find_nameref_at_context (v, vc) + SHELL_VAR *v; + VAR_CONTEXT *vc; +{ + SHELL_VAR *nv, *nv2; + char *newname; + int level; + + nv = v; + level = 1; + while (nv && nameref_p (nv)) + { + level++; + if (level > NAMEREF_MAX) + return (&nameref_maxloop_value); + newname = nameref_cell (nv); + if (newname == 0 || *newname == '\0') + return ((SHELL_VAR *)NULL); + nv2 = hash_lookup (newname, vc->table); + if (nv2 == 0) + break; + nv = nv2; + } + return nv; +} + +/* Do nameref resolution from the VC, which is the local context for some + function or builtin, `up' the chain to the global variables context. If + NVCP is not NULL, return the variable context where we finally ended the + nameref resolution (so the bind_variable_internal can use the correct + variable context and hash table). */ +static SHELL_VAR * +find_variable_nameref_context (v, vc, nvcp) + SHELL_VAR *v; + VAR_CONTEXT *vc; + VAR_CONTEXT **nvcp; +{ + SHELL_VAR *nv, *nv2; + VAR_CONTEXT *nvc; + + /* Look starting at the current context all the way `up' */ + for (nv = v, nvc = vc; nvc; nvc = nvc->down) + { + nv2 = find_nameref_at_context (nv, nvc); + if (nv2 == &nameref_maxloop_value) + return (nv2); /* XXX */ + if (nv2 == 0) + continue; + nv = nv2; + if (*nvcp) + *nvcp = nvc; + if (nameref_p (nv) == 0) + break; + } + return (nameref_p (nv) ? (SHELL_VAR *)NULL : nv); +} + +/* Do nameref resolution from the VC, which is the local context for some + function or builtin, `up' the chain to the global variables context. If + NVCP is not NULL, return the variable context where we finally ended the + nameref resolution (so the bind_variable_internal can use the correct + variable context and hash table). */ +static SHELL_VAR * +find_variable_last_nameref_context (v, vc, nvcp) + SHELL_VAR *v; + VAR_CONTEXT *vc; + VAR_CONTEXT **nvcp; +{ + SHELL_VAR *nv, *nv2; + VAR_CONTEXT *nvc; + + /* Look starting at the current context all the way `up' */ + for (nv = v, nvc = vc; nvc; nvc = nvc->down) + { + nv2 = find_nameref_at_context (nv, nvc); + if (nv2 == &nameref_maxloop_value) + return (nv2); /* XXX */ + if (nv2 == 0) + continue; + nv = nv2; + if (*nvcp) + *nvcp = nvc; + } + return (nameref_p (nv) ? nv : (SHELL_VAR *)NULL); +} + +SHELL_VAR * +find_variable_nameref_for_create (name, flags) + const char *name; + int flags; +{ + SHELL_VAR *var; + + /* See if we have a nameref pointing to a variable that hasn't been + created yet. */ + var = find_variable_last_nameref (name, 1); + if ((flags&1) && var && nameref_p (var) && invisible_p (var)) + { + internal_warning (_("%s: removing nameref attribute"), name); + VUNSETATTR (var, att_nameref); + } + if (var && nameref_p (var)) + { + if (legal_identifier (nameref_cell (var)) == 0) + { + sh_invalidid (nameref_cell (var) ? nameref_cell (var) : ""); + return ((SHELL_VAR *)INVALID_NAMEREF_VALUE); + } + } + return (var); +} + +SHELL_VAR * +find_variable_nameref_for_assignment (name, flags) + const char *name; + int flags; +{ + SHELL_VAR *var; + + /* See if we have a nameref pointing to a variable that hasn't been + created yet. */ + var = find_variable_last_nameref (name, 1); + if (var && nameref_p (var) && invisible_p (var)) /* XXX - flags */ + { + internal_warning (_("%s: removing nameref attribute"), name); + VUNSETATTR (var, att_nameref); + } + if (var && nameref_p (var)) + { + if (valid_nameref_value (nameref_cell (var), 1) == 0) + { + sh_invalidid (nameref_cell (var) ? nameref_cell (var) : ""); + return ((SHELL_VAR *)INVALID_NAMEREF_VALUE); + } + } + return (var); +} + +/* If find_variable (name) returns NULL, check that it's not a nameref + referencing a variable that doesn't exist. If it is, return the new + name. If not, return the original name. Kind of like the previous + function, but dealing strictly with names. This takes assignment flags + so it can deal with the various assignment modes used by `declare'. */ +char * +nameref_transform_name (name, flags) + char *name; + int flags; +{ + SHELL_VAR *v; + char *newname; + + v = 0; + if (flags & ASS_MKLOCAL) + { + v = find_variable_last_nameref (name, 1); + /* If we're making local variables, only follow namerefs that point to + non-existent variables at the same variable context. */ + if (v && v->context != variable_context) + v = 0; + } + else if (flags & ASS_MKGLOBAL) + v = (flags & ASS_CHKLOCAL) ? find_variable_last_nameref (name, 1) + : find_global_variable_last_nameref (name, 1); + if (v && nameref_p (v) && valid_nameref_value (nameref_cell (v), 1)) + return nameref_cell (v); + return name; +} + +/* Find a variable, forcing a search of the temporary environment first */ +SHELL_VAR * +find_variable_tempenv (name) + const char *name; +{ + SHELL_VAR *var; + + var = find_variable_internal (name, FV_FORCETEMPENV); + if (var && nameref_p (var)) + var = find_variable_nameref (var); + return (var); +} + +/* Find a variable, not forcing a search of the temporary environment first */ +SHELL_VAR * +find_variable_notempenv (name) + const char *name; +{ + SHELL_VAR *var; + + var = find_variable_internal (name, 0); + if (var && nameref_p (var)) + var = find_variable_nameref (var); + return (var); +} + +SHELL_VAR * +find_global_variable (name) + const char *name; +{ + SHELL_VAR *var; + + var = var_lookup (name, global_variables); + if (var && nameref_p (var)) + var = find_variable_nameref (var); + + if (var == 0) + return ((SHELL_VAR *)NULL); + + return (var->dynamic_value ? (*(var->dynamic_value)) (var) : var); +} + +SHELL_VAR * +find_global_variable_noref (name) + const char *name; +{ + SHELL_VAR *var; + + var = var_lookup (name, global_variables); + + if (var == 0) + return ((SHELL_VAR *)NULL); + + return (var->dynamic_value ? (*(var->dynamic_value)) (var) : var); +} + +SHELL_VAR * +find_shell_variable (name) + const char *name; +{ + SHELL_VAR *var; + + var = var_lookup (name, shell_variables); + if (var && nameref_p (var)) + var = find_variable_nameref (var); + + if (var == 0) + return ((SHELL_VAR *)NULL); + + return (var->dynamic_value ? (*(var->dynamic_value)) (var) : var); +} + +/* Look up the variable entry named NAME. Returns the entry or NULL. */ +SHELL_VAR * +find_variable (name) + const char *name; +{ + SHELL_VAR *v; + int flags; + + last_table_searched = 0; + flags = 0; + if (expanding_redir == 0 && (assigning_in_environment || executing_builtin)) + flags |= FV_FORCETEMPENV; + v = find_variable_internal (name, flags); + if (v && nameref_p (v)) + v = find_variable_nameref (v); + return v; +} + +/* Find the first instance of NAME in the variable context chain; return first + one found without att_invisible set; return 0 if no non-invisible instances + found. */ +SHELL_VAR * +find_variable_no_invisible (name) + const char *name; +{ + SHELL_VAR *v; + int flags; + + last_table_searched = 0; + flags = FV_SKIPINVISIBLE; + if (expanding_redir == 0 && (assigning_in_environment || executing_builtin)) + flags |= FV_FORCETEMPENV; + v = find_variable_internal (name, flags); + if (v && nameref_p (v)) + v = find_variable_nameref (v); + return v; +} + +/* Find the first instance of NAME in the variable context chain; return first + one found even if att_invisible set. */ +SHELL_VAR * +find_variable_for_assignment (name) + const char *name; +{ + SHELL_VAR *v; + int flags; + + last_table_searched = 0; + flags = 0; + if (expanding_redir == 0 && (assigning_in_environment || executing_builtin)) + flags |= FV_FORCETEMPENV; + v = find_variable_internal (name, flags); + if (v && nameref_p (v)) + v = find_variable_nameref (v); + return v; +} + +SHELL_VAR * +find_variable_noref (name) + const char *name; +{ + SHELL_VAR *v; + int flags; + + flags = 0; + if (expanding_redir == 0 && (assigning_in_environment || executing_builtin)) + flags |= FV_FORCETEMPENV; + v = find_variable_internal (name, flags); + return v; +} + +/* Look up the function entry whose name matches STRING. + Returns the entry or NULL. */ +SHELL_VAR * +find_function (name) + const char *name; +{ + return (hash_lookup (name, shell_functions)); +} + +/* Find the function definition for the shell function named NAME. Returns + the entry or NULL. */ +FUNCTION_DEF * +find_function_def (name) + const char *name; +{ +#if defined (DEBUGGER) + return ((FUNCTION_DEF *)hash_lookup (name, shell_function_defs)); +#else + return ((FUNCTION_DEF *)0); +#endif +} + +/* Return the value of VAR. VAR is assumed to have been the result of a + lookup without any subscript, if arrays are compiled into the shell. */ +char * +get_variable_value (var) + SHELL_VAR *var; +{ + if (var == 0) + return ((char *)NULL); +#if defined (ARRAY_VARS) + else if (array_p (var)) + return (array_reference (array_cell (var), 0)); + else if (assoc_p (var)) + return (assoc_reference (assoc_cell (var), "0")); +#endif + else + return (value_cell (var)); +} + +/* Return the string value of a variable. Return NULL if the variable + doesn't exist. Don't cons a new string. This is a potential memory + leak if the variable is found in the temporary environment, but doesn't + leak in practice. Since functions and variables have separate name + spaces, returns NULL if var_name is a shell function only. */ +char * +get_string_value (var_name) + const char *var_name; +{ + SHELL_VAR *var; + + var = find_variable (var_name); + return ((var) ? get_variable_value (var) : (char *)NULL); +} + +/* This is present for use by the tilde and readline libraries. */ +char * +sh_get_env_value (v) + const char *v; +{ + return get_string_value (v); +} + +/* **************************************************************** */ +/* */ +/* Creating and setting variables */ +/* */ +/* **************************************************************** */ + +static int +var_sametype (v1, v2) + SHELL_VAR *v1; + SHELL_VAR *v2; +{ + if (v1 == 0 || v2 == 0) + return 0; +#if defined (ARRAY_VARS) + else if (assoc_p (v1) && assoc_p (v2)) + return 1; + else if (array_p (v1) && array_p (v2)) + return 1; + else if (array_p (v1) || array_p (v2)) + return 0; + else if (assoc_p (v1) || assoc_p (v2)) + return 0; +#endif + else + return 1; +} + +int +validate_inherited_value (var, type) + SHELL_VAR *var; + int type; +{ +#if defined (ARRAY_VARS) + if (type == att_array && assoc_p (var)) + return 0; + else if (type == att_assoc && array_p (var)) + return 0; + else +#endif + return 1; /* should we run convert_var_to_array here or let the caller? */ +} + +/* Set NAME to VALUE if NAME has no value. */ +SHELL_VAR * +set_if_not (name, value) + char *name, *value; +{ + SHELL_VAR *v; + + if (shell_variables == 0) + create_variable_tables (); + + v = find_variable (name); + if (v == 0) + v = bind_variable_internal (name, value, global_variables->table, HASH_NOSRCH, 0); + return (v); +} + +/* Create a local variable referenced by NAME. */ +SHELL_VAR * +make_local_variable (name, flags) + const char *name; + int flags; +{ + SHELL_VAR *new_var, *old_var, *old_ref; + VAR_CONTEXT *vc; + int was_tmpvar; + char *old_value; + + /* We don't want to follow the nameref chain when making local variables; we + just want to create them. */ + old_ref = find_variable_noref (name); + if (old_ref && nameref_p (old_ref) == 0) + old_ref = 0; + /* local foo; local foo; is a no-op. */ + old_var = find_variable (name); + if (old_ref == 0 && old_var && local_p (old_var) && old_var->context == variable_context) + return (old_var); + + /* local -n foo; local -n foo; is a no-op. */ + if (old_ref && local_p (old_ref) && old_ref->context == variable_context) + return (old_ref); + + /* From here on, we want to use the refvar, not the variable it references */ + if (old_ref) + old_var = old_ref; + + was_tmpvar = old_var && tempvar_p (old_var); + /* If we're making a local variable in a shell function, the temporary env + has already been merged into the function's variable context stack. We + can assume that a temporary var in the same context appears in the same + VAR_CONTEXT and can safely be returned without creating a new variable + (which results in duplicate names in the same VAR_CONTEXT->table */ + /* We can't just test tmpvar_p because variables in the temporary env given + to a shell function appear in the function's local variable VAR_CONTEXT + but retain their tempvar attribute. We want temporary variables that are + found in temporary_env, hence the test for last_table_searched, which is + set in hash_lookup and only (so far) checked here. */ + if (was_tmpvar && old_var->context == variable_context && last_table_searched != temporary_env) + { + VUNSETATTR (old_var, att_invisible); /* XXX */ + /* We still want to flag this variable as local, though, and set things + up so that it gets treated as a local variable. */ + new_var = old_var; + /* Since we found the variable in a temporary environment, this will + succeed. */ + for (vc = shell_variables; vc; vc = vc->down) + if (vc_isfuncenv (vc) && vc->scope == variable_context) + break; + goto set_local_var_flags; + + return (old_var); + } + + /* If we want to change to "inherit the old variable's value" semantics, + here is where to save the old value. */ + old_value = was_tmpvar ? value_cell (old_var) : (char *)NULL; + + for (vc = shell_variables; vc; vc = vc->down) + if (vc_isfuncenv (vc) && vc->scope == variable_context) + break; + + if (vc == 0) + { + internal_error (_("make_local_variable: no function context at current scope")); + return ((SHELL_VAR *)NULL); + } + else if (vc->table == 0) + vc->table = hash_create (TEMPENV_HASH_BUCKETS); + + /* Since this is called only from the local/declare/typeset code, we can + call builtin_error here without worry (of course, it will also work + for anything that sets this_command_name). Variables with the `noassign' + attribute may not be made local. The test against old_var's context + level is to disallow local copies of readonly global variables (since I + believe that this could be a security hole). Readonly copies of calling + function local variables are OK. */ + if (old_var && (noassign_p (old_var) || + (readonly_p (old_var) && old_var->context == 0))) + { + if (readonly_p (old_var)) + sh_readonly (name); + else if (noassign_p (old_var)) + builtin_error (_("%s: variable may not be assigned value"), name); +#if 0 + /* Let noassign variables through with a warning */ + if (readonly_p (old_var)) +#endif + return ((SHELL_VAR *)NULL); + } + + if (old_var == 0) + new_var = make_new_variable (name, vc->table); + else + { + new_var = make_new_variable (name, vc->table); + + /* If we found this variable in one of the temporary environments, + inherit its value. Watch to see if this causes problems with + things like `x=4 local x'. XXX - see above for temporary env + variables with the same context level as variable_context */ + /* XXX - we should only do this if the variable is not an array. */ + /* If we want to change the local variable semantics to "inherit + the old variable's value" here is where to set it. And we would + need to use copy_variable (currently unused) to do it for all + possible variable values. */ + if (was_tmpvar) + var_setvalue (new_var, savestring (old_value)); + else if (localvar_inherit || (flags & MKLOC_INHERIT)) + { + /* This may not make sense for nameref variables that are shadowing + variables with the same name, but we don't know that yet. */ +#if defined (ARRAY_VARS) + if (assoc_p (old_var)) + var_setassoc (new_var, assoc_copy (assoc_cell (old_var))); + else if (array_p (old_var)) + var_setarray (new_var, array_copy (array_cell (old_var))); + else if (value_cell (old_var)) +#else + if (value_cell (old_var)) +#endif + var_setvalue (new_var, savestring (value_cell (old_var))); + else + var_setvalue (new_var, (char *)NULL); + } + + if (localvar_inherit || (flags & MKLOC_INHERIT)) + { + /* It doesn't make sense to inherit the nameref attribute */ + new_var->attributes = old_var->attributes & ~att_nameref; + new_var->dynamic_value = old_var->dynamic_value; + new_var->assign_func = old_var->assign_func; + } + else + /* We inherit the export attribute, but no others. */ + new_var->attributes = exported_p (old_var) ? att_exported : 0; + } + +set_local_var_flags: + vc->flags |= VC_HASLOCAL; + + new_var->context = variable_context; + VSETATTR (new_var, att_local); + + if (ifsname (name)) + setifs (new_var); + + /* value_cell will be 0 if localvar_inherit == 0 or there was no old variable + with the same name or the old variable was invisible */ + if (was_tmpvar == 0 && value_cell (new_var) == 0) + VSETATTR (new_var, att_invisible); /* XXX */ + return (new_var); +} + +/* Create a new shell variable with name NAME. */ +static SHELL_VAR * +new_shell_variable (name) + const char *name; +{ + SHELL_VAR *entry; + + entry = (SHELL_VAR *)xmalloc (sizeof (SHELL_VAR)); + + entry->name = savestring (name); + var_setvalue (entry, (char *)NULL); + CLEAR_EXPORTSTR (entry); + + entry->dynamic_value = (sh_var_value_func_t *)NULL; + entry->assign_func = (sh_var_assign_func_t *)NULL; + + entry->attributes = 0; + + /* Always assume variables are to be made at toplevel! + make_local_variable has the responsibility of changing the + variable context. */ + entry->context = 0; + + return (entry); +} + +/* Create a new shell variable with name NAME and add it to the hash table + TABLE. */ +static SHELL_VAR * +make_new_variable (name, table) + const char *name; + HASH_TABLE *table; +{ + SHELL_VAR *entry; + BUCKET_CONTENTS *elt; + + entry = new_shell_variable (name); + + /* Make sure we have a shell_variables hash table to add to. */ + if (shell_variables == 0) + create_variable_tables (); + + elt = hash_insert (savestring (name), table, HASH_NOSRCH); + elt->data = (PTR_T)entry; + + return entry; +} + +#if defined (ARRAY_VARS) +SHELL_VAR * +make_new_array_variable (name) + char *name; +{ + SHELL_VAR *entry; + ARRAY *array; + + entry = make_new_variable (name, global_variables->table); + array = array_create (); + + var_setarray (entry, array); + VSETATTR (entry, att_array); + return entry; +} + +SHELL_VAR * +make_local_array_variable (name, flags) + char *name; + int flags; +{ + SHELL_VAR *var; + ARRAY *array; + int assoc_ok; + + assoc_ok = flags & MKLOC_ASSOCOK; + + var = make_local_variable (name, flags & MKLOC_INHERIT); /* XXX for now */ + /* If ASSOC_OK is non-zero, assume that we are ok with letting an assoc + variable return to the caller without converting it. The caller will + either flag an error or do the conversion itself. */ + if (var == 0 || array_p (var) || (assoc_ok && assoc_p (var))) + return var; + + /* Validate any value we inherited from a variable instance at a previous + scope and discard anything that's invalid. */ + if (localvar_inherit && assoc_p (var)) + { + internal_warning ("%s: cannot inherit value from incompatible type", name); + VUNSETATTR (var, att_assoc); + dispose_variable_value (var); + array = array_create (); + var_setarray (var, array); + } + else if (localvar_inherit) + var = convert_var_to_array (var); /* XXX */ + else + { + dispose_variable_value (var); + array = array_create (); + var_setarray (var, array); + } + + VSETATTR (var, att_array); + return var; +} + +SHELL_VAR * +make_new_assoc_variable (name) + char *name; +{ + SHELL_VAR *entry; + HASH_TABLE *hash; + + entry = make_new_variable (name, global_variables->table); + hash = assoc_create (ASSOC_HASH_BUCKETS); + + var_setassoc (entry, hash); + VSETATTR (entry, att_assoc); + return entry; +} + +SHELL_VAR * +make_local_assoc_variable (name, flags) + char *name; + int flags; +{ + SHELL_VAR *var; + HASH_TABLE *hash; + int array_ok; + + array_ok = flags & MKLOC_ARRAYOK; + + var = make_local_variable (name, flags & MKLOC_INHERIT); /* XXX for now */ + /* If ARRAY_OK is non-zero, assume that we are ok with letting an array + variable return to the caller without converting it. The caller will + either flag an error or do the conversion itself. */ + if (var == 0 || assoc_p (var) || (array_ok && array_p (var))) + return var; + + /* Validate any value we inherited from a variable instance at a previous + scope and discard anything that's invalid. */ + if (localvar_inherit && array_p (var)) + { + internal_warning ("%s: cannot inherit value from incompatible type", name); + VUNSETATTR (var, att_array); + dispose_variable_value (var); + hash = assoc_create (ASSOC_HASH_BUCKETS); + var_setassoc (var, hash); + } + else if (localvar_inherit) + var = convert_var_to_assoc (var); /* XXX */ + else + { + dispose_variable_value (var); + hash = assoc_create (ASSOC_HASH_BUCKETS); + var_setassoc (var, hash); + } + + VSETATTR (var, att_assoc); + return var; +} +#endif + +char * +make_variable_value (var, value, flags) + SHELL_VAR *var; + char *value; + int flags; +{ + char *retval, *oval; + intmax_t lval, rval; + int expok, olen, op; + + /* If this variable has had its type set to integer (via `declare -i'), + then do expression evaluation on it and store the result. The + functions in expr.c (evalexp()) and bind_int_variable() are responsible + for turning off the integer flag if they don't want further + evaluation done. Callers that find it inconvenient to do this can set + the ASS_NOEVAL flag. For the special case of arithmetic expression + evaluation, the caller can set ASS_NOLONGJMP to avoid jumping out to + top_level. */ + if ((flags & ASS_NOEVAL) == 0 && integer_p (var)) + { + if (flags & ASS_APPEND) + { + oval = value_cell (var); + lval = evalexp (oval, 0, &expok); /* ksh93 seems to do this */ + if (expok == 0) + { + if (flags & ASS_NOLONGJMP) + goto make_value; + else + { + top_level_cleanup (); + jump_to_top_level (DISCARD); + } + } + } + rval = evalexp (value, 0, &expok); + if (expok == 0) + { + if (flags & ASS_NOLONGJMP) + goto make_value; + else + { + top_level_cleanup (); + jump_to_top_level (DISCARD); + } + } + /* This can be fooled if the variable's value changes while evaluating + `rval'. We can change it if we move the evaluation of lval to here. */ + if (flags & ASS_APPEND) + rval += lval; + retval = itos (rval); + } +#if defined (CASEMOD_ATTRS) + else if ((flags & ASS_NOEVAL) == 0 && (capcase_p (var) || uppercase_p (var) || lowercase_p (var))) + { + if (flags & ASS_APPEND) + { + oval = get_variable_value (var); + if (oval == 0) /* paranoia */ + oval = ""; + olen = STRLEN (oval); + retval = (char *)xmalloc (olen + (value ? STRLEN (value) : 0) + 1); + strcpy (retval, oval); + if (value) + strcpy (retval+olen, value); + } + else if (*value) + retval = savestring (value); + else + { + retval = (char *)xmalloc (1); + retval[0] = '\0'; + } + op = capcase_p (var) ? CASE_CAPITALIZE + : (uppercase_p (var) ? CASE_UPPER : CASE_LOWER); + oval = sh_modcase (retval, (char *)0, op); + free (retval); + retval = oval; + } +#endif /* CASEMOD_ATTRS */ + else if (value) + { +make_value: + if (flags & ASS_APPEND) + { + oval = get_variable_value (var); + if (oval == 0) /* paranoia */ + oval = ""; + olen = STRLEN (oval); + retval = (char *)xmalloc (olen + (value ? STRLEN (value) : 0) + 1); + strcpy (retval, oval); + if (value) + strcpy (retval+olen, value); + } + else if (*value) + retval = savestring (value); + else + { + retval = (char *)xmalloc (1); + retval[0] = '\0'; + } + } + else + retval = (char *)NULL; + + return retval; +} + +/* If we can optimize appending to string variables, say so */ +static int +can_optimize_assignment (entry, value, aflags) + SHELL_VAR *entry; + char *value; + int aflags; +{ + if ((aflags & ASS_APPEND) == 0) + return 0; +#if defined (ARRAY_VARS) + if (array_p (entry) || assoc_p (entry)) + return 0; +#endif + if (integer_p (entry) || uppercase_p (entry) || lowercase_p (entry) || capcase_p (entry)) + return 0; + if (readonly_p (entry) || noassign_p (entry)) + return 0; + return 1; +} + +/* right now we optimize appends to string variables */ +static SHELL_VAR * +optimized_assignment (entry, value, aflags) + SHELL_VAR *entry; + char *value; + int aflags; +{ + size_t len, vlen; + char *v, *new; + + v = value_cell (entry); + len = STRLEN (v); + vlen = STRLEN (value); + + new = (char *)xrealloc (v, len + vlen + 8); /* for now */ + if (vlen == 1) + { + new[len] = *value; + new[len+1] = '\0'; + } + else + strcpy (new + len, value); + var_setvalue (entry, new); + return entry; +} + +/* Bind a variable NAME to VALUE in the HASH_TABLE TABLE, which may be the + temporary environment (but usually is not). HFLAGS controls how NAME + is looked up in TABLE; AFLAGS controls how VALUE is assigned */ +static SHELL_VAR * +bind_variable_internal (name, value, table, hflags, aflags) + const char *name; + char *value; + HASH_TABLE *table; + int hflags, aflags; +{ + char *newval, *tname; + SHELL_VAR *entry, *tentry; + + entry = (hflags & HASH_NOSRCH) ? (SHELL_VAR *)NULL : hash_lookup (name, table); + /* Follow the nameref chain here if this is the global variables table */ + if (entry && nameref_p (entry) && (invisible_p (entry) == 0) && table == global_variables->table) + { + entry = find_global_variable (entry->name); + /* Let's see if we have a nameref referencing a variable that hasn't yet + been created. */ + if (entry == 0) + entry = find_variable_last_nameref (name, 0); /* XXX */ + if (entry == 0) /* just in case */ + return (entry); + } + + /* The first clause handles `declare -n ref; ref=x;' or `declare -n ref; + declare -n ref' */ + if (entry && invisible_p (entry) && nameref_p (entry)) + { + if ((aflags & ASS_FORCE) == 0 && value && valid_nameref_value (value, 0) == 0) + { + sh_invalidid (value); + return ((SHELL_VAR *)NULL); + } + goto assign_value; + } + else if (entry && nameref_p (entry)) + { + newval = nameref_cell (entry); /* XXX - newval can't be NULL here */ + if (valid_nameref_value (newval, 0) == 0) + { + sh_invalidid (newval); + return ((SHELL_VAR *)NULL); + } +#if defined (ARRAY_VARS) + /* declare -n foo=x[2] ; foo=bar */ + if (valid_array_reference (newval, 0)) + { + tname = array_variable_name (newval, 0, (char **)0, (int *)0); + if (tname && (tentry = find_variable_noref (tname)) && nameref_p (tentry)) + { + /* nameref variables can't be arrays */ + internal_warning (_("%s: removing nameref attribute"), name_cell (tentry)); + FREE (value_cell (tentry)); /* XXX - bash-4.3 compat */ + var_setvalue (tentry, (char *)NULL); + VUNSETATTR (tentry, att_nameref); + } + free (tname); + /* XXX - should it be aflags? */ + entry = assign_array_element (newval, make_variable_value (entry, value, aflags), aflags|ASS_NAMEREF); + if (entry == 0) + return entry; + } + else +#endif + { + entry = make_new_variable (newval, table); + var_setvalue (entry, make_variable_value (entry, value, aflags)); + } + } + else if (entry == 0) + { + entry = make_new_variable (name, table); + var_setvalue (entry, make_variable_value (entry, value, aflags)); /* XXX */ + } + else if (entry->assign_func) /* array vars have assign functions now */ + { + if ((readonly_p (entry) && (aflags & ASS_FORCE) == 0) || noassign_p (entry)) + { + if (readonly_p (entry)) + err_readonly (name_cell (entry)); + return (entry); + } + + INVALIDATE_EXPORTSTR (entry); + newval = (aflags & ASS_APPEND) ? make_variable_value (entry, value, aflags) : value; + if (assoc_p (entry)) + entry = (*(entry->assign_func)) (entry, newval, -1, savestring ("0")); + else if (array_p (entry)) + entry = (*(entry->assign_func)) (entry, newval, 0, 0); + else + entry = (*(entry->assign_func)) (entry, newval, -1, 0); + if (newval != value) + free (newval); + return (entry); + } + else + { +assign_value: + if ((readonly_p (entry) && (aflags & ASS_FORCE) == 0) || noassign_p (entry)) + { + if (readonly_p (entry)) + err_readonly (name_cell (entry)); + return (entry); + } + + /* Variables which are bound are visible. */ + VUNSETATTR (entry, att_invisible); + + /* If we can optimize the assignment, do so and return. Right now, we + optimize appends to string variables. */ + if (can_optimize_assignment (entry, value, aflags)) + { + INVALIDATE_EXPORTSTR (entry); + optimized_assignment (entry, value, aflags); + + if (mark_modified_vars) + VSETATTR (entry, att_exported); + + if (exported_p (entry)) + array_needs_making = 1; + + return (entry); + } + +#if defined (ARRAY_VARS) + if (assoc_p (entry) || array_p (entry)) + newval = make_array_variable_value (entry, 0, "0", value, aflags); + else +#endif + newval = make_variable_value (entry, value, aflags); /* XXX */ + + /* Invalidate any cached export string */ + INVALIDATE_EXPORTSTR (entry); + +#if defined (ARRAY_VARS) + /* XXX -- this bears looking at again -- XXX */ + /* If an existing array variable x is being assigned to with x=b or + `read x' or something of that nature, silently convert it to + x[0]=b or `read x[0]'. */ + if (assoc_p (entry)) + { + assoc_insert (assoc_cell (entry), savestring ("0"), newval); + free (newval); + } + else if (array_p (entry)) + { + array_insert (array_cell (entry), 0, newval); + free (newval); + } + else +#endif + { + FREE (value_cell (entry)); + var_setvalue (entry, newval); + } + } + + if (mark_modified_vars) + VSETATTR (entry, att_exported); + + if (exported_p (entry)) + array_needs_making = 1; + + return (entry); +} + +/* Bind a variable NAME to VALUE. This conses up the name + and value strings. If we have a temporary environment, we bind there + first, then we bind into shell_variables. */ + +SHELL_VAR * +bind_variable (name, value, flags) + const char *name; + char *value; + int flags; +{ + SHELL_VAR *v, *nv; + VAR_CONTEXT *vc, *nvc; + + if (shell_variables == 0) + create_variable_tables (); + + /* If we have a temporary environment, look there first for the variable, + and, if found, modify the value there before modifying it in the + shell_variables table. This allows sourced scripts to modify values + given to them in a temporary environment while modifying the variable + value that the caller sees. */ + if (temporary_env && value) /* XXX - can value be null here? */ + bind_tempenv_variable (name, value); + + /* XXX -- handle local variables here. */ + for (vc = shell_variables; vc; vc = vc->down) + { + if (vc_isfuncenv (vc) || vc_isbltnenv (vc)) + { + v = hash_lookup (name, vc->table); + nvc = vc; + if (v && nameref_p (v)) + { + /* This starts at the context where we found the nameref. If we + want to start the name resolution over again at the original + context, this is where we need to change it */ + nv = find_variable_nameref_context (v, vc, &nvc); + if (nv == 0) + { + nv = find_variable_last_nameref_context (v, vc, &nvc); + if (nv && nameref_p (nv)) + { + /* If this nameref variable doesn't have a value yet, + set the value. Otherwise, assign using the value as + normal. */ + if (nameref_cell (nv) == 0) + return (bind_variable_internal (nv->name, value, nvc->table, 0, flags)); +#if defined (ARRAY_VARS) + else if (valid_array_reference (nameref_cell (nv), 0)) + return (assign_array_element (nameref_cell (nv), value, flags)); + else +#endif + return (bind_variable_internal (nameref_cell (nv), value, nvc->table, 0, flags)); + } + else if (nv == &nameref_maxloop_value) + { + internal_warning (_("%s: circular name reference"), v->name); + return (bind_global_variable (v->name, value, flags)); + } + else + v = nv; + } + else if (nv == &nameref_maxloop_value) + { + internal_warning (_("%s: circular name reference"), v->name); + return (bind_global_variable (v->name, value, flags)); + } + else + v = nv; + } + if (v) + return (bind_variable_internal (v->name, value, nvc->table, 0, flags)); + } + } + /* bind_variable_internal will handle nameref resolution in this case */ + return (bind_variable_internal (name, value, global_variables->table, 0, flags)); +} + +SHELL_VAR * +bind_global_variable (name, value, flags) + const char *name; + char *value; + int flags; +{ + if (shell_variables == 0) + create_variable_tables (); + + /* bind_variable_internal will handle nameref resolution in this case */ + return (bind_variable_internal (name, value, global_variables->table, 0, flags)); +} + +static SHELL_VAR * +bind_invalid_envvar (name, value, flags) + const char *name; + char *value; + int flags; +{ + if (invalid_env == 0) + invalid_env = hash_create (64); /* XXX */ + return (bind_variable_internal (name, value, invalid_env, HASH_NOSRCH, flags)); +} + +/* Make VAR, a simple shell variable, have value VALUE. Once assigned a + value, variables are no longer invisible. This is a duplicate of part + of the internals of bind_variable. If the variable is exported, or + all modified variables should be exported, mark the variable for export + and note that the export environment needs to be recreated. */ +SHELL_VAR * +bind_variable_value (var, value, aflags) + SHELL_VAR *var; + char *value; + int aflags; +{ + char *t; + int invis; + + invis = invisible_p (var); + VUNSETATTR (var, att_invisible); + + if (var->assign_func) + { + /* If we're appending, we need the old value, so use + make_variable_value */ + t = (aflags & ASS_APPEND) ? make_variable_value (var, value, aflags) : value; + (*(var->assign_func)) (var, t, -1, 0); + if (t != value && t) + free (t); + } + else + { + t = make_variable_value (var, value, aflags); + if ((aflags & (ASS_NAMEREF|ASS_FORCE)) == ASS_NAMEREF && check_selfref (name_cell (var), t, 0)) + { + if (variable_context) + internal_warning (_("%s: circular name reference"), name_cell (var)); + else + { + internal_error (_("%s: nameref variable self references not allowed"), name_cell (var)); + free (t); + if (invis) + VSETATTR (var, att_invisible); /* XXX */ + return ((SHELL_VAR *)NULL); + } + } + if ((aflags & ASS_NAMEREF) && (valid_nameref_value (t, 0) == 0)) + { + free (t); + if (invis) + VSETATTR (var, att_invisible); /* XXX */ + return ((SHELL_VAR *)NULL); + } + FREE (value_cell (var)); + var_setvalue (var, t); + } + + INVALIDATE_EXPORTSTR (var); + + if (mark_modified_vars) + VSETATTR (var, att_exported); + + if (exported_p (var)) + array_needs_making = 1; + + return (var); +} + +/* Bind/create a shell variable with the name LHS to the RHS. + This creates or modifies a variable such that it is an integer. + + This used to be in expr.c, but it is here so that all of the + variable binding stuff is localized. Since we don't want any + recursive evaluation from bind_variable() (possible without this code, + since bind_variable() calls the evaluator for variables with the integer + attribute set), we temporarily turn off the integer attribute for each + variable we set here, then turn it back on after binding as necessary. */ + +SHELL_VAR * +bind_int_variable (lhs, rhs, flags) + char *lhs, *rhs; + int flags; +{ + register SHELL_VAR *v; + int isint, isarr, implicitarray; + + isint = isarr = implicitarray = 0; +#if defined (ARRAY_VARS) + if (valid_array_reference (lhs, (flags & ASS_NOEXPAND) != 0)) + { + isarr = 1; + v = array_variable_part (lhs, (flags & ASS_NOEXPAND) != 0, (char **)0, (int *)0); + } + else if (legal_identifier (lhs) == 0) + { + sh_invalidid (lhs); + return ((SHELL_VAR *)NULL); + } + else +#endif + v = find_variable (lhs); + + if (v) + { + isint = integer_p (v); + VUNSETATTR (v, att_integer); +#if defined (ARRAY_VARS) + if (array_p (v) && isarr == 0) + implicitarray = 1; +#endif + } + +#if defined (ARRAY_VARS) + if (isarr) + v = assign_array_element (lhs, rhs, flags); + else if (implicitarray) + v = bind_array_variable (lhs, 0, rhs, 0); /* XXX - check on flags */ + else +#endif + v = bind_variable (lhs, rhs, 0); /* why not use bind_variable_value? */ + + if (v) + { + if (isint) + VSETATTR (v, att_integer); + VUNSETATTR (v, att_invisible); + } + + if (v && nameref_p (v)) + internal_warning (_("%s: assigning integer to name reference"), lhs); + + return (v); +} + +SHELL_VAR * +bind_var_to_int (var, val) + char *var; + intmax_t val; +{ + char ibuf[INT_STRLEN_BOUND (intmax_t) + 1], *p; + + p = fmtulong (val, 10, ibuf, sizeof (ibuf), 0); + return (bind_int_variable (var, p, 0)); +} + +/* Do a function binding to a variable. You pass the name and + the command to bind to. This conses the name and command. */ +SHELL_VAR * +bind_function (name, value) + const char *name; + COMMAND *value; +{ + SHELL_VAR *entry; + + entry = find_function (name); + if (entry == 0) + { + BUCKET_CONTENTS *elt; + + elt = hash_insert (savestring (name), shell_functions, HASH_NOSRCH); + entry = new_shell_variable (name); + elt->data = (PTR_T)entry; + } + else + INVALIDATE_EXPORTSTR (entry); + + if (var_isset (entry)) + dispose_command (function_cell (entry)); + + if (value) + var_setfunc (entry, copy_command (value)); + else + var_setfunc (entry, 0); + + VSETATTR (entry, att_function); + + if (mark_modified_vars) + VSETATTR (entry, att_exported); + + VUNSETATTR (entry, att_invisible); /* Just to be sure */ + + if (exported_p (entry)) + array_needs_making = 1; + +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_functions); +#endif + + return (entry); +} + +#if defined (DEBUGGER) +/* Bind a function definition, which includes source file and line number + information in addition to the command, into the FUNCTION_DEF hash table. + If (FLAGS & 1), overwrite any existing definition. If FLAGS == 0, leave + any existing definition alone. */ +void +bind_function_def (name, value, flags) + const char *name; + FUNCTION_DEF *value; + int flags; +{ + FUNCTION_DEF *entry; + BUCKET_CONTENTS *elt; + COMMAND *cmd; + + entry = find_function_def (name); + if (entry && (flags & 1)) + { + dispose_function_def_contents (entry); + entry = copy_function_def_contents (value, entry); + } + else if (entry) + return; + else + { + cmd = value->command; + value->command = 0; + entry = copy_function_def (value); + value->command = cmd; + + elt = hash_insert (savestring (name), shell_function_defs, HASH_NOSRCH); + elt->data = (PTR_T *)entry; + } +} +#endif /* DEBUGGER */ + +/* Add STRING, which is of the form foo=bar, to the temporary environment + HASH_TABLE (temporary_env). The functions in execute_cmd.c are + responsible for moving the main temporary env to one of the other + temporary environments. The expansion code in subst.c calls this. */ +int +assign_in_env (word, flags) + WORD_DESC *word; + int flags; +{ + int offset, aflags; + char *name, *temp, *value, *newname; + SHELL_VAR *var; + const char *string; + + string = word->word; + + aflags = 0; + offset = assignment (string, 0); + newname = name = savestring (string); + value = (char *)NULL; + + if (name[offset] == '=') + { + name[offset] = 0; + + /* don't ignore the `+' when assigning temporary environment */ + if (name[offset - 1] == '+') + { + name[offset - 1] = '\0'; + aflags |= ASS_APPEND; + } + + if (legal_identifier (name) == 0) + { + sh_invalidid (name); + return (0); + } + + var = find_variable (name); + if (var == 0) + { + var = find_variable_last_nameref (name, 1); + /* If we're assigning a value to a nameref variable in the temp + environment, and the value of the nameref is valid for assignment, + but the variable does not already exist, assign to the nameref + target and add the target to the temporary environment. This is + what ksh93 does */ + /* We use 2 in the call to valid_nameref_value because we don't want + to allow array references here at all (newname will be used to + create a variable directly below) */ + if (var && nameref_p (var) && valid_nameref_value (nameref_cell (var), 2)) + { + newname = nameref_cell (var); + var = 0; /* don't use it for append */ + } + } + else + newname = name_cell (var); /* no-op if not nameref */ + + if (var && (readonly_p (var) || noassign_p (var))) + { + if (readonly_p (var)) + err_readonly (name); + free (name); + return (0); + } + temp = name + offset + 1; + + value = expand_assignment_string_to_string (temp, 0); + + if (var && (aflags & ASS_APPEND)) + { + if (value == 0) + { + value = (char *)xmalloc (1); /* like do_assignment_internal */ + value[0] = '\0'; + } + temp = make_variable_value (var, value, aflags); + FREE (value); + value = temp; + } + } + + if (temporary_env == 0) + temporary_env = hash_create (TEMPENV_HASH_BUCKETS); + + var = hash_lookup (newname, temporary_env); + if (var == 0) + var = make_new_variable (newname, temporary_env); + else + FREE (value_cell (var)); + + if (value == 0) + { + value = (char *)xmalloc (1); /* see above */ + value[0] = '\0'; + } + + var_setvalue (var, value); + var->attributes |= (att_exported|att_tempvar); + var->context = variable_context; /* XXX */ + + INVALIDATE_EXPORTSTR (var); + var->exportstr = mk_env_string (newname, value, 0); + + array_needs_making = 1; + + if (flags) + { + if (STREQ (newname, "POSIXLY_CORRECT") || STREQ (newname, "POSIX_PEDANDTIC")) + save_posix_options (); /* XXX one level of saving right now */ + stupidly_hack_special_variables (newname); + } + + if (echo_command_at_execute) + /* The Korn shell prints the `+ ' in front of assignment statements, + so we do too. */ + xtrace_print_assignment (name, value, 0, 1); + + free (name); + return 1; +} + +/* **************************************************************** */ +/* */ +/* Copying variables */ +/* */ +/* **************************************************************** */ + +#ifdef INCLUDE_UNUSED +/* Copy VAR to a new data structure and return that structure. */ +SHELL_VAR * +copy_variable (var) + SHELL_VAR *var; +{ + SHELL_VAR *copy = (SHELL_VAR *)NULL; + + if (var) + { + copy = (SHELL_VAR *)xmalloc (sizeof (SHELL_VAR)); + + copy->attributes = var->attributes; + copy->name = savestring (var->name); + + if (function_p (var)) + var_setfunc (copy, copy_command (function_cell (var))); +#if defined (ARRAY_VARS) + else if (array_p (var)) + var_setarray (copy, array_copy (array_cell (var))); + else if (assoc_p (var)) + var_setassoc (copy, assoc_copy (assoc_cell (var))); +#endif + else if (nameref_cell (var)) /* XXX - nameref */ + var_setref (copy, savestring (nameref_cell (var))); + else if (value_cell (var)) /* XXX - nameref */ + var_setvalue (copy, savestring (value_cell (var))); + else + var_setvalue (copy, (char *)NULL); + + copy->dynamic_value = var->dynamic_value; + copy->assign_func = var->assign_func; + + copy->exportstr = COPY_EXPORTSTR (var); + + copy->context = var->context; + } + return (copy); +} +#endif + +/* **************************************************************** */ +/* */ +/* Deleting and unsetting variables */ +/* */ +/* **************************************************************** */ + +/* Dispose of the information attached to VAR. */ +static void +dispose_variable_value (var) + SHELL_VAR *var; +{ + if (function_p (var)) + dispose_command (function_cell (var)); +#if defined (ARRAY_VARS) + else if (array_p (var)) + array_dispose (array_cell (var)); + else if (assoc_p (var)) + assoc_dispose (assoc_cell (var)); +#endif + else if (nameref_p (var)) + FREE (nameref_cell (var)); + else + FREE (value_cell (var)); +} + +void +dispose_variable (var) + SHELL_VAR *var; +{ + if (var == 0) + return; + + if (nofree_p (var) == 0) + dispose_variable_value (var); + + FREE_EXPORTSTR (var); + + free (var->name); + + if (exported_p (var)) + array_needs_making = 1; + + free (var); +} + +/* Unset the shell variable referenced by NAME. Unsetting a nameref variable + unsets the variable it resolves to but leaves the nameref alone. */ +int +unbind_variable (name) + const char *name; +{ + SHELL_VAR *v, *nv; + int r; + + v = var_lookup (name, shell_variables); + nv = (v && nameref_p (v)) ? find_variable_nameref (v) : (SHELL_VAR *)NULL; + + r = nv ? makunbound (nv->name, shell_variables) : makunbound (name, shell_variables); + return r; +} + +/* Unbind NAME, where NAME is assumed to be a nameref variable */ +int +unbind_nameref (name) + const char *name; +{ + SHELL_VAR *v; + + v = var_lookup (name, shell_variables); + if (v && nameref_p (v)) + return makunbound (name, shell_variables); + return 0; +} + +/* Unbind the first instance of NAME, whether it's a nameref or not */ +int +unbind_variable_noref (name) + const char *name; +{ + SHELL_VAR *v; + + v = var_lookup (name, shell_variables); + if (v) + return makunbound (name, shell_variables); + return 0; +} + +int +check_unbind_variable (name) + const char *name; +{ + SHELL_VAR *v; + + v = find_variable (name); + if (v && readonly_p (v)) + { + internal_error (_("%s: cannot unset: readonly %s"), name, "variable"); + return -2; + } + else if (v && non_unsettable_p (v)) + { + internal_error (_("%s: cannot unset"), name); + return -2; + } + return (unbind_variable (name)); +} + +/* Unset the shell function named NAME. */ +int +unbind_func (name) + const char *name; +{ + BUCKET_CONTENTS *elt; + SHELL_VAR *func; + + elt = hash_remove (name, shell_functions, 0); + + if (elt == 0) + return -1; + +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_functions); +#endif + + func = (SHELL_VAR *)elt->data; + if (func) + { + if (exported_p (func)) + array_needs_making++; + dispose_variable (func); + } + + free (elt->key); + free (elt); + + return 0; +} + +#if defined (DEBUGGER) +int +unbind_function_def (name) + const char *name; +{ + BUCKET_CONTENTS *elt; + FUNCTION_DEF *funcdef; + + elt = hash_remove (name, shell_function_defs, 0); + + if (elt == 0) + return -1; + + funcdef = (FUNCTION_DEF *)elt->data; + if (funcdef) + dispose_function_def (funcdef); + + free (elt->key); + free (elt); + + return 0; +} +#endif /* DEBUGGER */ + +int +delete_var (name, vc) + const char *name; + VAR_CONTEXT *vc; +{ + BUCKET_CONTENTS *elt; + SHELL_VAR *old_var; + VAR_CONTEXT *v; + + for (elt = (BUCKET_CONTENTS *)NULL, v = vc; v; v = v->down) + if (elt = hash_remove (name, v->table, 0)) + break; + + if (elt == 0) + return (-1); + + old_var = (SHELL_VAR *)elt->data; + free (elt->key); + free (elt); + + dispose_variable (old_var); + return (0); +} + +/* Make the variable associated with NAME go away. HASH_LIST is the + hash table from which this variable should be deleted (either + shell_variables or shell_functions). + Returns non-zero if the variable couldn't be found. */ +int +makunbound (name, vc) + const char *name; + VAR_CONTEXT *vc; +{ + BUCKET_CONTENTS *elt, *new_elt; + SHELL_VAR *old_var; + VAR_CONTEXT *v; + char *t; + + for (elt = (BUCKET_CONTENTS *)NULL, v = vc; v; v = v->down) + if (elt = hash_remove (name, v->table, 0)) + break; + + if (elt == 0) + return (-1); + + old_var = (SHELL_VAR *)elt->data; + + if (old_var && exported_p (old_var)) + array_needs_making++; + + /* If we're unsetting a local variable and we're still executing inside + the function, just mark the variable as invisible. The function + eventually called by pop_var_context() will clean it up later. This + must be done so that if the variable is subsequently assigned a new + value inside the function, the `local' attribute is still present. + We also need to add it back into the correct hash table. */ + if (old_var && local_p (old_var) && + (old_var->context == variable_context || (localvar_unset && old_var->context < variable_context))) + { + if (nofree_p (old_var)) + var_setvalue (old_var, (char *)NULL); +#if defined (ARRAY_VARS) + else if (array_p (old_var)) + array_dispose (array_cell (old_var)); + else if (assoc_p (old_var)) + assoc_dispose (assoc_cell (old_var)); +#endif + else if (nameref_p (old_var)) + FREE (nameref_cell (old_var)); + else + FREE (value_cell (old_var)); + /* Reset the attributes. Preserve the export attribute if the variable + came from a temporary environment. Make sure it stays local, and + make it invisible. */ + old_var->attributes = (exported_p (old_var) && tempvar_p (old_var)) ? att_exported : 0; + VSETATTR (old_var, att_local); + VSETATTR (old_var, att_invisible); + var_setvalue (old_var, (char *)NULL); + INVALIDATE_EXPORTSTR (old_var); + + new_elt = hash_insert (savestring (old_var->name), v->table, 0); + new_elt->data = (PTR_T)old_var; + stupidly_hack_special_variables (old_var->name); + + free (elt->key); + free (elt); + return (0); + } + + /* Have to save a copy of name here, because it might refer to + old_var->name. If so, stupidly_hack_special_variables will + reference freed memory. */ + t = savestring (name); + + free (elt->key); + free (elt); + + dispose_variable (old_var); + stupidly_hack_special_variables (t); + free (t); + + return (0); +} + +/* Get rid of all of the variables in the current context. */ +void +kill_all_local_variables () +{ + VAR_CONTEXT *vc; + + for (vc = shell_variables; vc; vc = vc->down) + if (vc_isfuncenv (vc) && vc->scope == variable_context) + break; + if (vc == 0) + return; /* XXX */ + + if (vc->table && vc_haslocals (vc)) + { + delete_all_variables (vc->table); + hash_dispose (vc->table); + } + vc->table = (HASH_TABLE *)NULL; +} + +static void +free_variable_hash_data (data) + PTR_T data; +{ + SHELL_VAR *var; + + var = (SHELL_VAR *)data; + dispose_variable (var); +} + +/* Delete the entire contents of the hash table. */ +void +delete_all_variables (hashed_vars) + HASH_TABLE *hashed_vars; +{ + hash_flush (hashed_vars, free_variable_hash_data); +} + +/* **************************************************************** */ +/* */ +/* Setting variable attributes */ +/* */ +/* **************************************************************** */ + +#define FIND_OR_MAKE_VARIABLE(name, entry) \ + do \ + { \ + entry = find_variable (name); \ + if (!entry) \ + { \ + entry = bind_variable (name, "", 0); \ + if (entry) entry->attributes |= att_invisible; \ + } \ + } \ + while (0) + +/* Make the variable associated with NAME be readonly. + If NAME does not exist yet, create it. */ +void +set_var_read_only (name) + char *name; +{ + SHELL_VAR *entry; + + FIND_OR_MAKE_VARIABLE (name, entry); + VSETATTR (entry, att_readonly); +} + +#ifdef INCLUDE_UNUSED +/* Make the function associated with NAME be readonly. + If NAME does not exist, we just punt, like auto_export code below. */ +void +set_func_read_only (name) + const char *name; +{ + SHELL_VAR *entry; + + entry = find_function (name); + if (entry) + VSETATTR (entry, att_readonly); +} + +/* Make the variable associated with NAME be auto-exported. + If NAME does not exist yet, create it. */ +void +set_var_auto_export (name) + char *name; +{ + SHELL_VAR *entry; + + FIND_OR_MAKE_VARIABLE (name, entry); + set_auto_export (entry); +} + +/* Make the function associated with NAME be auto-exported. */ +void +set_func_auto_export (name) + const char *name; +{ + SHELL_VAR *entry; + + entry = find_function (name); + if (entry) + set_auto_export (entry); +} +#endif + +/* **************************************************************** */ +/* */ +/* Creating lists of variables */ +/* */ +/* **************************************************************** */ + +static VARLIST * +vlist_alloc (nentries) + int nentries; +{ + VARLIST *vlist; + + vlist = (VARLIST *)xmalloc (sizeof (VARLIST)); + vlist->list = (SHELL_VAR **)xmalloc ((nentries + 1) * sizeof (SHELL_VAR *)); + vlist->list_size = nentries; + vlist->list_len = 0; + vlist->list[0] = (SHELL_VAR *)NULL; + + return vlist; +} + +static VARLIST * +vlist_realloc (vlist, n) + VARLIST *vlist; + int n; +{ + if (vlist == 0) + return (vlist = vlist_alloc (n)); + if (n > vlist->list_size) + { + vlist->list_size = n; + vlist->list = (SHELL_VAR **)xrealloc (vlist->list, (vlist->list_size + 1) * sizeof (SHELL_VAR *)); + } + return vlist; +} + +static void +vlist_add (vlist, var, flags) + VARLIST *vlist; + SHELL_VAR *var; + int flags; +{ + register int i; + + for (i = 0; i < vlist->list_len; i++) + if (STREQ (var->name, vlist->list[i]->name)) + break; + if (i < vlist->list_len) + return; + + if (i >= vlist->list_size) + vlist = vlist_realloc (vlist, vlist->list_size + 16); + + vlist->list[vlist->list_len++] = var; + vlist->list[vlist->list_len] = (SHELL_VAR *)NULL; +} + +/* Map FUNCTION over the variables in VAR_HASH_TABLE. Return an array of the + variables for which FUNCTION returns a non-zero value. A NULL value + for FUNCTION means to use all variables. */ +SHELL_VAR ** +map_over (function, vc) + sh_var_map_func_t *function; + VAR_CONTEXT *vc; +{ + VAR_CONTEXT *v; + VARLIST *vlist; + SHELL_VAR **ret; + int nentries; + + for (nentries = 0, v = vc; v; v = v->down) + nentries += HASH_ENTRIES (v->table); + + if (nentries == 0) + return (SHELL_VAR **)NULL; + + vlist = vlist_alloc (nentries); + + for (v = vc; v; v = v->down) + flatten (v->table, function, vlist, 0); + + ret = vlist->list; + free (vlist); + return ret; +} + +SHELL_VAR ** +map_over_funcs (function) + sh_var_map_func_t *function; +{ + VARLIST *vlist; + SHELL_VAR **ret; + + if (shell_functions == 0 || HASH_ENTRIES (shell_functions) == 0) + return ((SHELL_VAR **)NULL); + + vlist = vlist_alloc (HASH_ENTRIES (shell_functions)); + + flatten (shell_functions, function, vlist, 0); + + ret = vlist->list; + free (vlist); + return ret; +} + +/* Flatten VAR_HASH_TABLE, applying FUNC to each member and adding those + elements for which FUNC succeeds to VLIST->list. FLAGS is reserved + for future use. Only unique names are added to VLIST. If FUNC is + NULL, each variable in VAR_HASH_TABLE is added to VLIST. If VLIST is + NULL, FUNC is applied to each SHELL_VAR in VAR_HASH_TABLE. If VLIST + and FUNC are both NULL, nothing happens. */ +static void +flatten (var_hash_table, func, vlist, flags) + HASH_TABLE *var_hash_table; + sh_var_map_func_t *func; + VARLIST *vlist; + int flags; +{ + register int i; + register BUCKET_CONTENTS *tlist; + int r; + SHELL_VAR *var; + + if (var_hash_table == 0 || (HASH_ENTRIES (var_hash_table) == 0) || (vlist == 0 && func == 0)) + return; + + for (i = 0; i < var_hash_table->nbuckets; i++) + { + for (tlist = hash_items (i, var_hash_table); tlist; tlist = tlist->next) + { + var = (SHELL_VAR *)tlist->data; + + r = func ? (*func) (var) : 1; + if (r && vlist) + vlist_add (vlist, var, flags); + } + } +} + +void +sort_variables (array) + SHELL_VAR **array; +{ + qsort (array, strvec_len ((char **)array), sizeof (SHELL_VAR *), (QSFUNC *)qsort_var_comp); +} + +static int +qsort_var_comp (var1, var2) + SHELL_VAR **var1, **var2; +{ + int result; + + if ((result = (*var1)->name[0] - (*var2)->name[0]) == 0) + result = strcmp ((*var1)->name, (*var2)->name); + + return (result); +} + +/* Apply FUNC to each variable in SHELL_VARIABLES, adding each one for + which FUNC succeeds to an array of SHELL_VAR *s. Returns the array. */ +static SHELL_VAR ** +vapply (func) + sh_var_map_func_t *func; +{ + SHELL_VAR **list; + + list = map_over (func, shell_variables); + if (list /* && posixly_correct */) + sort_variables (list); + return (list); +} + +/* Apply FUNC to each variable in SHELL_FUNCTIONS, adding each one for + which FUNC succeeds to an array of SHELL_VAR *s. Returns the array. */ +static SHELL_VAR ** +fapply (func) + sh_var_map_func_t *func; +{ + SHELL_VAR **list; + + list = map_over_funcs (func); + if (list /* && posixly_correct */) + sort_variables (list); + return (list); +} + +/* Create a NULL terminated array of all the shell variables. */ +SHELL_VAR ** +all_shell_variables () +{ + return (vapply ((sh_var_map_func_t *)NULL)); +} + +/* Create a NULL terminated array of all the shell functions. */ +SHELL_VAR ** +all_shell_functions () +{ + return (fapply ((sh_var_map_func_t *)NULL)); +} + +static int +visible_var (var) + SHELL_VAR *var; +{ + return (invisible_p (var) == 0); +} + +SHELL_VAR ** +all_visible_functions () +{ + return (fapply (visible_var)); +} + +SHELL_VAR ** +all_visible_variables () +{ + return (vapply (visible_var)); +} + +/* Return non-zero if the variable VAR is visible and exported. Array + variables cannot be exported. */ +static int +visible_and_exported (var) + SHELL_VAR *var; +{ + return (invisible_p (var) == 0 && exported_p (var)); +} + +/* Candidate variables for the export environment are either valid variables + with the export attribute or invalid variables inherited from the initial + environment and simply passed through. */ +static int +export_environment_candidate (var) + SHELL_VAR *var; +{ + return (exported_p (var) && (invisible_p (var) == 0 || imported_p (var))); +} + +/* Return non-zero if VAR is a local variable in the current context and + is exported. */ +static int +local_and_exported (var) + SHELL_VAR *var; +{ + return (invisible_p (var) == 0 && local_p (var) && var->context == variable_context && exported_p (var)); +} + +SHELL_VAR ** +all_exported_variables () +{ + return (vapply (visible_and_exported)); +} + +SHELL_VAR ** +local_exported_variables () +{ + return (vapply (local_and_exported)); +} + +static int +variable_in_context (var) + SHELL_VAR *var; +{ + return (local_p (var) && var->context == variable_context); +} + +static int +visible_variable_in_context (var) + SHELL_VAR *var; +{ + return (invisible_p (var) == 0 && local_p (var) && var->context == variable_context); +} + +SHELL_VAR ** +all_local_variables (visible_only) + int visible_only; +{ + VARLIST *vlist; + SHELL_VAR **ret; + VAR_CONTEXT *vc; + + vc = shell_variables; + for (vc = shell_variables; vc; vc = vc->down) + if (vc_isfuncenv (vc) && vc->scope == variable_context) + break; + + if (vc == 0) + { + internal_error (_("all_local_variables: no function context at current scope")); + return (SHELL_VAR **)NULL; + } + if (vc->table == 0 || HASH_ENTRIES (vc->table) == 0 || vc_haslocals (vc) == 0) + return (SHELL_VAR **)NULL; + + vlist = vlist_alloc (HASH_ENTRIES (vc->table)); + + if (visible_only) + flatten (vc->table, visible_variable_in_context, vlist, 0); + else + flatten (vc->table, variable_in_context, vlist, 0); + + ret = vlist->list; + free (vlist); + if (ret) + sort_variables (ret); + return ret; +} + +#if defined (ARRAY_VARS) +/* Return non-zero if the variable VAR is visible and an array. */ +static int +visible_array_vars (var) + SHELL_VAR *var; +{ + return (invisible_p (var) == 0 && (array_p (var) || assoc_p (var))); +} + +SHELL_VAR ** +all_array_variables () +{ + return (vapply (visible_array_vars)); +} +#endif /* ARRAY_VARS */ + +char ** +all_variables_matching_prefix (prefix) + const char *prefix; +{ + SHELL_VAR **varlist; + char **rlist; + int vind, rind, plen; + + plen = STRLEN (prefix); + varlist = all_visible_variables (); + for (vind = 0; varlist && varlist[vind]; vind++) + ; + if (varlist == 0 || vind == 0) + return ((char **)NULL); + rlist = strvec_create (vind + 1); + for (vind = rind = 0; varlist[vind]; vind++) + { + if (plen == 0 || STREQN (prefix, varlist[vind]->name, plen)) + rlist[rind++] = savestring (varlist[vind]->name); + } + rlist[rind] = (char *)0; + free (varlist); + + return rlist; +} + +/* **************************************************************** */ +/* */ +/* Managing temporary variable scopes */ +/* */ +/* **************************************************************** */ + +/* Make variable NAME have VALUE in the temporary environment. */ +static SHELL_VAR * +bind_tempenv_variable (name, value) + const char *name; + char *value; +{ + SHELL_VAR *var; + + var = temporary_env ? hash_lookup (name, temporary_env) : (SHELL_VAR *)NULL; + + if (var) + { + FREE (value_cell (var)); + var_setvalue (var, savestring (value)); + INVALIDATE_EXPORTSTR (var); + } + + return (var); +} + +/* Find a variable in the temporary environment that is named NAME. + Return the SHELL_VAR *, or NULL if not found. */ +SHELL_VAR * +find_tempenv_variable (name) + const char *name; +{ + return (temporary_env ? hash_lookup (name, temporary_env) : (SHELL_VAR *)NULL); +} + +char **tempvar_list; +int tvlist_ind; + +/* Take a variable from an assignment statement preceding a posix special + builtin (including `return') and create a global variable from it. This + is called from merge_temporary_env, which is only called when in posix + mode. */ +static void +push_posix_temp_var (data) + PTR_T data; +{ + SHELL_VAR *var, *v; + HASH_TABLE *binding_table; + + var = (SHELL_VAR *)data; + + /* Just like do_assignment_internal(). This makes assignments preceding + special builtins act like standalone assignment statements when in + posix mode, satisfying the posix requirement that this affect the + "current execution environment." */ + v = bind_variable (var->name, value_cell (var), ASS_FORCE|ASS_NOLONGJMP); + + /* XXX - do we need to worry about array variables here? */ + + /* If this modifies an existing local variable, v->context will be non-zero. + If it comes back with v->context == 0, we bound at the global context. + Set binding_table appropriately. It doesn't matter whether it's correct + if the variable is local, only that it's not global_variables->table */ + binding_table = v->context ? shell_variables->table : global_variables->table; + + /* global variables are no longer temporary and don't need propagating. */ + if (v->context == 0) + var->attributes &= ~(att_tempvar|att_propagate); + + if (v) + { + v->attributes |= var->attributes; /* preserve tempvar attribute if appropriate */ + /* If we don't bind a local variable, propagate the value. If we bind a + local variable (the "current execution environment"), keep it as local + and don't propagate it to the calling environment. */ + if (v->context > 0 && local_p (v) == 0) + v->attributes |= att_propagate; + else + v->attributes &= ~att_propagate; + } + + if (find_special_var (var->name) >= 0) + tempvar_list[tvlist_ind++] = savestring (var->name); + + dispose_variable (var); +} + +/* Push the variable described by (SHELL_VAR *)DATA down to the next + variable context from the temporary environment. This can be called + from one context: + 1. propagate_temp_var: which is called to propagate variables in + assignments like `var=value declare -x var' to the surrounding + scope. + + In this case, the variable should have the att_propagate flag set and + we can create variables in the current scope. +*/ +static void +push_temp_var (data) + PTR_T data; +{ + SHELL_VAR *var, *v; + HASH_TABLE *binding_table; + + var = (SHELL_VAR *)data; + + binding_table = shell_variables->table; + if (binding_table == 0) + { + if (shell_variables == global_variables) + /* shouldn't happen */ + binding_table = shell_variables->table = global_variables->table = hash_create (VARIABLES_HASH_BUCKETS); + else + binding_table = shell_variables->table = hash_create (TEMPENV_HASH_BUCKETS); + } + + v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, ASS_FORCE|ASS_NOLONGJMP); + + /* XXX - should we set the context here? It shouldn't matter because of how + assign_in_env works, but we do it anyway. */ + if (v) + v->context = shell_variables->scope; + + if (binding_table == global_variables->table) /* XXX */ + var->attributes &= ~(att_tempvar|att_propagate); + else + { + var->attributes |= att_propagate; /* XXX - propagate more than once? */ + if (binding_table == shell_variables->table) + shell_variables->flags |= VC_HASTMPVAR; + } + if (v) + v->attributes |= var->attributes; + + if (find_special_var (var->name) >= 0) + tempvar_list[tvlist_ind++] = savestring (var->name); + + dispose_variable (var); +} + +/* Take a variable described by DATA and push it to the surrounding scope if + the PROPAGATE attribute is set. That gets set by push_temp_var if we are + taking a variable like `var=value declare -x var' and propagating it to + the enclosing scope. */ +static void +propagate_temp_var (data) + PTR_T data; +{ + SHELL_VAR *var; + + var = (SHELL_VAR *)data; + if (tempvar_p (var) && (var->attributes & att_propagate)) + push_temp_var (data); + else + { + if (find_special_var (var->name) >= 0) + tempvar_list[tvlist_ind++] = savestring (var->name); + dispose_variable (var); + } +} + +/* Free the storage used in the hash table for temporary + environment variables. PUSHF is a function to be called + to free each hash table entry. It takes care of pushing variables + to previous scopes if appropriate. PUSHF stores names of variables + that require special handling (e.g., IFS) on tempvar_list, so this + function can call stupidly_hack_special_variables on all the + variables in the list when the temporary hash table is destroyed. */ +static void +dispose_temporary_env (pushf) + sh_free_func_t *pushf; +{ + int i; + HASH_TABLE *disposer; + + tempvar_list = strvec_create (HASH_ENTRIES (temporary_env) + 1); + tempvar_list[tvlist_ind = 0] = 0; + + disposer = temporary_env; + temporary_env = (HASH_TABLE *)NULL; + + hash_flush (disposer, pushf); + hash_dispose (disposer); + + tempvar_list[tvlist_ind] = 0; + + array_needs_making = 1; + + for (i = 0; i < tvlist_ind; i++) + stupidly_hack_special_variables (tempvar_list[i]); + + strvec_dispose (tempvar_list); + tempvar_list = 0; + tvlist_ind = 0; +} + +void +dispose_used_env_vars () +{ + if (temporary_env) + { + dispose_temporary_env (propagate_temp_var); + maybe_make_export_env (); + } +} + +/* Take all of the shell variables in the temporary environment HASH_TABLE + and make shell variables from them at the current variable context. + Right now, this is only called in Posix mode to implement the historical + accident of creating global variables from assignment statements preceding + special builtins, but we check in case this acquires another caller later. */ +void +merge_temporary_env () +{ + if (temporary_env) + dispose_temporary_env (posixly_correct ? push_posix_temp_var : push_temp_var); +} + +/* Temporary function to use if we want to separate function and special + builtin behavior. */ +void +merge_function_temporary_env () +{ + if (temporary_env) + dispose_temporary_env (push_temp_var); +} + +void +flush_temporary_env () +{ + if (temporary_env) + { + hash_flush (temporary_env, free_variable_hash_data); + hash_dispose (temporary_env); + temporary_env = (HASH_TABLE *)NULL; + } +} + +/* **************************************************************** */ +/* */ +/* Creating and manipulating the environment */ +/* */ +/* **************************************************************** */ + +static inline char * +mk_env_string (name, value, isfunc) + const char *name, *value; + int isfunc; +{ + size_t name_len, value_len; + char *p, *q, *t; + + name_len = strlen (name); + value_len = STRLEN (value); + + /* If we are exporting a shell function, construct the encoded function + name. */ + if (isfunc && value) + { + p = (char *)xmalloc (BASHFUNC_PREFLEN + name_len + BASHFUNC_SUFFLEN + value_len + 2); + q = p; + memcpy (q, BASHFUNC_PREFIX, BASHFUNC_PREFLEN); + q += BASHFUNC_PREFLEN; + memcpy (q, name, name_len); + q += name_len; + memcpy (q, BASHFUNC_SUFFIX, BASHFUNC_SUFFLEN); + q += BASHFUNC_SUFFLEN; + } + else + { + p = (char *)xmalloc (2 + name_len + value_len); + memcpy (p, name, name_len); + q = p + name_len; + } + + q[0] = '='; + if (value && *value) + { + if (isfunc) + { + t = dequote_escapes (value); + value_len = STRLEN (t); + memcpy (q + 1, t, value_len + 1); + free (t); + } + else + memcpy (q + 1, value, value_len + 1); + } + else + q[1] = '\0'; + + return (p); +} + +#ifdef DEBUG +/* Debugging */ +static int +valid_exportstr (v) + SHELL_VAR *v; +{ + char *s; + + s = v->exportstr; + if (s == 0) + { + internal_error (_("%s has null exportstr"), v->name); + return (0); + } + if (legal_variable_starter ((unsigned char)*s) == 0) + { + internal_error (_("invalid character %d in exportstr for %s"), *s, v->name); + return (0); + } + for (s = v->exportstr + 1; s && *s; s++) + { + if (*s == '=') + break; + if (legal_variable_char ((unsigned char)*s) == 0) + { + internal_error (_("invalid character %d in exportstr for %s"), *s, v->name); + return (0); + } + } + if (*s != '=') + { + internal_error (_("no `=' in exportstr for %s"), v->name); + return (0); + } + return (1); +} +#endif + +static char ** +make_env_array_from_var_list (vars) + SHELL_VAR **vars; +{ + register int i, list_index; + register SHELL_VAR *var; + char **list, *value; + + list = strvec_create ((1 + strvec_len ((char **)vars))); + +#define USE_EXPORTSTR (value == var->exportstr) + + for (i = 0, list_index = 0; var = vars[i]; i++) + { +#if defined (__CYGWIN__) + /* We don't use the exportstr stuff on Cygwin at all. */ + INVALIDATE_EXPORTSTR (var); +#endif + + /* If the value is generated dynamically, generate it here. */ + if (regen_p (var) && var->dynamic_value) + { + var = (*(var->dynamic_value)) (var); + INVALIDATE_EXPORTSTR (var); + } + + if (var->exportstr) + value = var->exportstr; + else if (function_p (var)) + value = named_function_string ((char *)NULL, function_cell (var), 0); +#if defined (ARRAY_VARS) + else if (array_p (var)) +# if ARRAY_EXPORT + value = array_to_assign (array_cell (var), 0); +# else + continue; /* XXX array vars cannot yet be exported */ +# endif /* ARRAY_EXPORT */ + else if (assoc_p (var)) +# if 0 + value = assoc_to_assign (assoc_cell (var), 0); +# else + continue; /* XXX associative array vars cannot yet be exported */ +# endif +#endif + else + value = value_cell (var); + + if (value) + { + /* Gee, I'd like to get away with not using savestring() if we're + using the cached exportstr... */ + list[list_index] = USE_EXPORTSTR ? savestring (value) + : mk_env_string (var->name, value, function_p (var)); + if (USE_EXPORTSTR == 0) + SAVE_EXPORTSTR (var, list[list_index]); + + list_index++; +#undef USE_EXPORTSTR + +#if 0 /* not yet */ +#if defined (ARRAY_VARS) + if (array_p (var) || assoc_p (var)) + free (value); +#endif +#endif + } + } + + list[list_index] = (char *)NULL; + return (list); +} + +/* Make an array of assignment statements from the hash table + HASHED_VARS which contains SHELL_VARs. Only visible, exported + variables are eligible. */ +static char ** +make_var_export_array (vcxt) + VAR_CONTEXT *vcxt; +{ + char **list; + SHELL_VAR **vars; + +#if 0 + vars = map_over (visible_and_exported, vcxt); +#else + vars = map_over (export_environment_candidate, vcxt); +#endif + + if (vars == 0) + return (char **)NULL; + + list = make_env_array_from_var_list (vars); + + free (vars); + return (list); +} + +static char ** +make_func_export_array () +{ + char **list; + SHELL_VAR **vars; + + vars = map_over_funcs (visible_and_exported); + if (vars == 0) + return (char **)NULL; + + list = make_env_array_from_var_list (vars); + + free (vars); + return (list); +} + +/* Add ENVSTR to the end of the exported environment, EXPORT_ENV. */ +#define add_to_export_env(envstr,do_alloc) \ +do \ + { \ + if (export_env_index >= (export_env_size - 1)) \ + { \ + export_env_size += 16; \ + export_env = strvec_resize (export_env, export_env_size); \ + environ = export_env; \ + } \ + export_env[export_env_index++] = (do_alloc) ? savestring (envstr) : envstr; \ + export_env[export_env_index] = (char *)NULL; \ + } while (0) + +/* Add ASSIGN to EXPORT_ENV, or supersede a previous assignment in the + array with the same left-hand side. Return the new EXPORT_ENV. */ +char ** +add_or_supercede_exported_var (assign, do_alloc) + char *assign; + int do_alloc; +{ + register int i; + int equal_offset; + + equal_offset = assignment (assign, 0); + if (equal_offset == 0) + return (export_env); + + /* If this is a function, then only supersede the function definition. + We do this by including the `=() {' in the comparison, like + initialize_shell_variables does. */ + if (assign[equal_offset + 1] == '(' && + strncmp (assign + equal_offset + 2, ") {", 3) == 0) /* } */ + equal_offset += 4; + + for (i = 0; i < export_env_index; i++) + { + if (STREQN (assign, export_env[i], equal_offset + 1)) + { + free (export_env[i]); + export_env[i] = do_alloc ? savestring (assign) : assign; + return (export_env); + } + } + add_to_export_env (assign, do_alloc); + return (export_env); +} + +static void +add_temp_array_to_env (temp_array, do_alloc, do_supercede) + char **temp_array; + int do_alloc, do_supercede; +{ + register int i; + + if (temp_array == 0) + return; + + for (i = 0; temp_array[i]; i++) + { + if (do_supercede) + export_env = add_or_supercede_exported_var (temp_array[i], do_alloc); + else + add_to_export_env (temp_array[i], do_alloc); + } + + free (temp_array); +} + +/* Make the environment array for the command about to be executed, if the + array needs making. Otherwise, do nothing. If a shell action could + change the array that commands receive for their environment, then the + code should `array_needs_making++'. + + The order to add to the array is: + temporary_env + list of var contexts whose head is shell_variables + shell_functions + + This is the shell variable lookup order. We add only new variable + names at each step, which allows local variables and variables in + the temporary environments to shadow variables in the global (or + any previous) scope. +*/ + +static int +n_shell_variables () +{ + VAR_CONTEXT *vc; + int n; + + for (n = 0, vc = shell_variables; vc; vc = vc->down) + n += HASH_ENTRIES (vc->table); + return n; +} + +int +chkexport (name) + char *name; +{ + SHELL_VAR *v; + + v = find_variable (name); + if (v && exported_p (v)) + { + array_needs_making = 1; + maybe_make_export_env (); + return 1; + } + return 0; +} + +void +maybe_make_export_env () +{ + register char **temp_array; + int new_size; + VAR_CONTEXT *tcxt, *icxt; + + if (array_needs_making) + { + if (export_env) + strvec_flush (export_env); + + /* Make a guess based on how many shell variables and functions we + have. Since there will always be array variables, and array + variables are not (yet) exported, this will always be big enough + for the exported variables and functions. */ + new_size = n_shell_variables () + HASH_ENTRIES (shell_functions) + 1 + + HASH_ENTRIES (temporary_env) + HASH_ENTRIES (invalid_env); + if (new_size > export_env_size) + { + export_env_size = new_size; + export_env = strvec_resize (export_env, export_env_size); + environ = export_env; + } + export_env[export_env_index = 0] = (char *)NULL; + + /* Make a dummy variable context from the temporary_env, stick it on + the front of shell_variables, call make_var_export_array on the + whole thing to flatten it, and convert the list of SHELL_VAR *s + to the form needed by the environment. */ + if (temporary_env) + { + tcxt = new_var_context ((char *)NULL, 0); + tcxt->table = temporary_env; + tcxt->down = shell_variables; + } + else + tcxt = shell_variables; + + if (invalid_env) + { + icxt = new_var_context ((char *)NULL, 0); + icxt->table = invalid_env; + icxt->down = tcxt; + } + else + icxt = tcxt; + + temp_array = make_var_export_array (icxt); + if (temp_array) + add_temp_array_to_env (temp_array, 0, 0); + + if (icxt != tcxt) + free (icxt); + + if (tcxt != shell_variables) + free (tcxt); + +#if defined (RESTRICTED_SHELL) + /* Restricted shells may not export shell functions. */ + temp_array = restricted ? (char **)0 : make_func_export_array (); +#else + temp_array = make_func_export_array (); +#endif + if (temp_array) + add_temp_array_to_env (temp_array, 0, 0); + + array_needs_making = 0; + } +} + +/* This is an efficiency hack. PWD and OLDPWD are auto-exported, so + we will need to remake the exported environment every time we + change directories. `_' is always put into the environment for + every external command, so without special treatment it will always + cause the environment to be remade. + + If there is no other reason to make the exported environment, we can + just update the variables in place and mark the exported environment + as no longer needing a remake. */ +void +update_export_env_inplace (env_prefix, preflen, value) + char *env_prefix; + int preflen; + char *value; +{ + char *evar; + + evar = (char *)xmalloc (STRLEN (value) + preflen + 1); + strcpy (evar, env_prefix); + if (value) + strcpy (evar + preflen, value); + export_env = add_or_supercede_exported_var (evar, 0); +} + +/* We always put _ in the environment as the name of this command. */ +void +put_command_name_into_env (command_name) + char *command_name; +{ + update_export_env_inplace ("_=", 2, command_name); +} + +/* **************************************************************** */ +/* */ +/* Managing variable contexts */ +/* */ +/* **************************************************************** */ + +/* Allocate and return a new variable context with NAME and FLAGS. + NAME can be NULL. */ + +VAR_CONTEXT * +new_var_context (name, flags) + char *name; + int flags; +{ + VAR_CONTEXT *vc; + + vc = (VAR_CONTEXT *)xmalloc (sizeof (VAR_CONTEXT)); + vc->name = name ? savestring (name) : (char *)NULL; + vc->scope = variable_context; + vc->flags = flags; + + vc->up = vc->down = (VAR_CONTEXT *)NULL; + vc->table = (HASH_TABLE *)NULL; + + return vc; +} + +/* Free a variable context and its data, including the hash table. Dispose + all of the variables. */ +void +dispose_var_context (vc) + VAR_CONTEXT *vc; +{ + FREE (vc->name); + + if (vc->table) + { + delete_all_variables (vc->table); + hash_dispose (vc->table); + } + + free (vc); +} + +/* Set VAR's scope level to the current variable context. */ +static int +set_context (var) + SHELL_VAR *var; +{ + return (var->context = variable_context); +} + +/* Make a new variable context with NAME and FLAGS and a HASH_TABLE of + temporary variables, and push it onto shell_variables. This is + for shell functions. */ +VAR_CONTEXT * +push_var_context (name, flags, tempvars) + char *name; + int flags; + HASH_TABLE *tempvars; +{ + VAR_CONTEXT *vc; + int posix_func_behavior; + + /* As of IEEE Std 1003.1-2017, assignment statements preceding shell + functions no longer behave like assignment statements preceding + special builtins, and do not persist in the current shell environment. + This is austin group interp #654, though nobody implements it yet. */ + posix_func_behavior = 0; + + vc = new_var_context (name, flags); + /* Posix interp 1009, temporary assignments preceding function calls modify + the current environment *before* the command is executed. */ + if (posix_func_behavior && (flags & VC_FUNCENV) && tempvars == temporary_env) + merge_temporary_env (); + else if (tempvars) + { + vc->table = tempvars; + /* Have to do this because the temp environment was created before + variable_context was incremented. */ + /* XXX - only need to do it if flags&VC_FUNCENV */ + flatten (tempvars, set_context, (VARLIST *)NULL, 0); + vc->flags |= VC_HASTMPVAR; + } + vc->down = shell_variables; + shell_variables->up = vc; + + return (shell_variables = vc); +} + +/* This can be called from one of two code paths: + 1. pop_scope, which implements the posix rules for propagating variable + assignments preceding special builtins to the surrounding scope + (push_builtin_var -- isbltin == 1); + 2. pop_var_context, which is called from pop_context and implements the + posix rules for propagating variable assignments preceding function + calls to the surrounding scope (push_func_var -- isbltin == 0) + + It takes variables out of a temporary environment hash table. We take the + variable in data. +*/ + +static inline void +push_posix_tempvar_internal (var, isbltin) + SHELL_VAR *var; + int isbltin; +{ + SHELL_VAR *v; + int posix_var_behavior; + + /* As of IEEE Std 1003.1-2017, assignment statements preceding shell + functions no longer behave like assignment statements preceding + special builtins, and do not persist in the current shell environment. + This is austin group interp #654, though nobody implements it yet. */ + posix_var_behavior = posixly_correct && isbltin; + v = 0; + + if (local_p (var) && STREQ (var->name, "-")) + { + set_current_options (value_cell (var)); + set_shellopts (); + } + /* This takes variable assignments preceding special builtins that can execute + multiple commands (source, eval, etc.) and performs the equivalent of + an assignment statement to modify the closest enclosing variable (the + posix "current execution environment"). This makes the behavior the same + as push_posix_temp_var; but the circumstances of calling are slightly + different. */ + else if (tempvar_p (var) && posix_var_behavior) + { + /* similar to push_posix_temp_var */ + v = bind_variable (var->name, value_cell (var), ASS_FORCE|ASS_NOLONGJMP); + if (v) + { + v->attributes |= var->attributes; + if (v->context == 0) + v->attributes &= ~(att_tempvar|att_propagate); + /* XXX - set att_propagate here if v->context > 0? */ + } + } + else if (tempvar_p (var) && propagate_p (var)) + { + /* Make sure we have a hash table to store the variable in while it is + being propagated down to the global variables table. Create one if + we have to */ + if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0) + shell_variables->table = hash_create (VARIABLES_HASH_BUCKETS); + v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0); + /* XXX - should we set v->context here? */ + if (v) + v->context = shell_variables->scope; + if (shell_variables == global_variables) + var->attributes &= ~(att_tempvar|att_propagate); + else + shell_variables->flags |= VC_HASTMPVAR; + if (v) + v->attributes |= var->attributes; + } + else + stupidly_hack_special_variables (var->name); /* XXX */ + +#if defined (ARRAY_VARS) + if (v && (array_p (var) || assoc_p (var))) + { + FREE (value_cell (v)); + if (array_p (var)) + var_setarray (v, array_copy (array_cell (var))); + else + var_setassoc (v, assoc_copy (assoc_cell (var))); + } +#endif + + dispose_variable (var); +} + +static void +push_func_var (data) + PTR_T data; +{ + SHELL_VAR *var; + + var = (SHELL_VAR *)data; + push_posix_tempvar_internal (var, 0); +} + +static void +push_builtin_var (data) + PTR_T data; +{ + SHELL_VAR *var; + + var = (SHELL_VAR *)data; + push_posix_tempvar_internal (var, 1); +} + +/* Pop the top context off of VCXT and dispose of it, returning the rest of + the stack. */ +void +pop_var_context () +{ + VAR_CONTEXT *ret, *vcxt; + + vcxt = shell_variables; + if (vc_isfuncenv (vcxt) == 0) + { + internal_error (_("pop_var_context: head of shell_variables not a function context")); + return; + } + + if (ret = vcxt->down) + { + ret->up = (VAR_CONTEXT *)NULL; + shell_variables = ret; + if (vcxt->table) + hash_flush (vcxt->table, push_func_var); + dispose_var_context (vcxt); + } + else + internal_error (_("pop_var_context: no global_variables context")); +} + +/* Delete the HASH_TABLEs for all variable contexts beginning at VCXT, and + all of the VAR_CONTEXTs except GLOBAL_VARIABLES. */ +void +delete_all_contexts (vcxt) + VAR_CONTEXT *vcxt; +{ + VAR_CONTEXT *v, *t; + + for (v = vcxt; v != global_variables; v = t) + { + t = v->down; + dispose_var_context (v); + } + + delete_all_variables (global_variables->table); + shell_variables = global_variables; +} + +/* **************************************************************** */ +/* */ +/* Pushing and Popping temporary variable scopes */ +/* */ +/* **************************************************************** */ + +VAR_CONTEXT * +push_scope (flags, tmpvars) + int flags; + HASH_TABLE *tmpvars; +{ + return (push_var_context ((char *)NULL, flags, tmpvars)); +} + +static void +push_exported_var (data) + PTR_T data; +{ + SHELL_VAR *var, *v; + + var = (SHELL_VAR *)data; + + /* If a temp var had its export attribute set, or it's marked to be + propagated, bind it in the previous scope before disposing it. */ + /* XXX - This isn't exactly right, because all tempenv variables have the + export attribute set. */ + if (tempvar_p (var) && exported_p (var) && (var->attributes & att_propagate)) + { + var->attributes &= ~att_tempvar; /* XXX */ + v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0); + if (shell_variables == global_variables) + var->attributes &= ~att_propagate; + if (v) + { + v->attributes |= var->attributes; + v->context = shell_variables->scope; + } + } + else + stupidly_hack_special_variables (var->name); /* XXX */ + + dispose_variable (var); +} + +/* This is called to propagate variables in the temporary environment of a + special builtin (if IS_SPECIAL != 0) or exported variables that are the + result of a builtin like `source' or `command' that can operate on the + variables in its temporary environment. In the first case, we call + push_builtin_var, which does the right thing. */ +void +pop_scope (is_special) + int is_special; +{ + VAR_CONTEXT *vcxt, *ret; + int is_bltinenv; + + vcxt = shell_variables; + if (vc_istempscope (vcxt) == 0) + { + internal_error (_("pop_scope: head of shell_variables not a temporary environment scope")); + return; + } + is_bltinenv = vc_isbltnenv (vcxt); /* XXX - for later */ + + ret = vcxt->down; + if (ret) + ret->up = (VAR_CONTEXT *)NULL; + + shell_variables = ret; + + /* Now we can take care of merging variables in VCXT into set of scopes + whose head is RET (shell_variables). */ + FREE (vcxt->name); + if (vcxt->table) + { + if (is_special) + hash_flush (vcxt->table, push_builtin_var); + else + hash_flush (vcxt->table, push_exported_var); + hash_dispose (vcxt->table); + } + free (vcxt); + + sv_ifs ("IFS"); /* XXX here for now */ +} + +/* **************************************************************** */ +/* */ +/* Pushing and Popping function contexts */ +/* */ +/* **************************************************************** */ + +struct saved_dollar_vars { + char **first_ten; + WORD_LIST *rest; + int count; +}; + +static struct saved_dollar_vars *dollar_arg_stack = (struct saved_dollar_vars *)NULL; +static int dollar_arg_stack_slots; +static int dollar_arg_stack_index; + +/* Functions to manipulate dollar_vars array. Need to keep these in sync with + whatever remember_args() does. */ +static char ** +save_dollar_vars () +{ + char **ret; + int i; + + ret = strvec_create (10); + for (i = 1; i < 10; i++) + { + ret[i] = dollar_vars[i]; + dollar_vars[i] = (char *)NULL; + } + return ret; +} + +static void +restore_dollar_vars (args) + char **args; +{ + int i; + + for (i = 1; i < 10; i++) + dollar_vars[i] = args[i]; +} + +static void +free_dollar_vars () +{ + int i; + + for (i = 1; i < 10; i++) + { + FREE (dollar_vars[i]); + dollar_vars[i] = (char *)NULL; + } +} + +static void +free_saved_dollar_vars (args) + char **args; +{ + int i; + + for (i = 1; i < 10; i++) + FREE (args[i]); +} + +/* Do what remember_args (xxx, 1) would have done. */ +void +clear_dollar_vars () +{ + free_dollar_vars (); + dispose_words (rest_of_args); + + rest_of_args = (WORD_LIST *)NULL; + posparam_count = 0; +} + +/* XXX - should always be followed by remember_args () */ +void +push_context (name, is_subshell, tempvars) + char *name; /* function name */ + int is_subshell; + HASH_TABLE *tempvars; +{ + if (is_subshell == 0) + push_dollar_vars (); + variable_context++; + push_var_context (name, VC_FUNCENV, tempvars); +} + +/* Only called when subshell == 0, so we don't need to check, and can + unconditionally pop the dollar vars off the stack. */ +void +pop_context () +{ + pop_dollar_vars (); + variable_context--; + pop_var_context (); + + sv_ifs ("IFS"); /* XXX here for now */ +} + +/* Save the existing positional parameters on a stack. */ +void +push_dollar_vars () +{ + if (dollar_arg_stack_index + 2 > dollar_arg_stack_slots) + { + dollar_arg_stack = (struct saved_dollar_vars *) + xrealloc (dollar_arg_stack, (dollar_arg_stack_slots += 10) + * sizeof (struct saved_dollar_vars)); + } + + dollar_arg_stack[dollar_arg_stack_index].count = posparam_count; + dollar_arg_stack[dollar_arg_stack_index].first_ten = save_dollar_vars (); + dollar_arg_stack[dollar_arg_stack_index++].rest = rest_of_args; + rest_of_args = (WORD_LIST *)NULL; + posparam_count = 0; + + dollar_arg_stack[dollar_arg_stack_index].first_ten = (char **)NULL; + dollar_arg_stack[dollar_arg_stack_index].rest = (WORD_LIST *)NULL; +} + +/* Restore the positional parameters from our stack. */ +void +pop_dollar_vars () +{ + if (dollar_arg_stack == 0 || dollar_arg_stack_index == 0) + return; + + /* Wipe out current values */ + clear_dollar_vars (); + + rest_of_args = dollar_arg_stack[--dollar_arg_stack_index].rest; + restore_dollar_vars (dollar_arg_stack[dollar_arg_stack_index].first_ten); + free (dollar_arg_stack[dollar_arg_stack_index].first_ten); + posparam_count = dollar_arg_stack[dollar_arg_stack_index].count; + + dollar_arg_stack[dollar_arg_stack_index].first_ten = (char **)NULL; + dollar_arg_stack[dollar_arg_stack_index].rest = (WORD_LIST *)NULL; + dollar_arg_stack[dollar_arg_stack_index].count = 0; + + set_dollar_vars_unchanged (); + invalidate_cached_quoted_dollar_at (); +} + +void +dispose_saved_dollar_vars () +{ + if (dollar_arg_stack == 0 || dollar_arg_stack_index == 0) + return; + + dispose_words (dollar_arg_stack[--dollar_arg_stack_index].rest); + free_saved_dollar_vars (dollar_arg_stack[dollar_arg_stack_index].first_ten); + free (dollar_arg_stack[dollar_arg_stack_index].first_ten); + + dollar_arg_stack[dollar_arg_stack_index].first_ten = (char **)NULL; + dollar_arg_stack[dollar_arg_stack_index].rest = (WORD_LIST *)NULL; + dollar_arg_stack[dollar_arg_stack_index].count = 0; +} + +/* Initialize BASH_ARGV and BASH_ARGC after turning on extdebug after the + shell is initialized */ +void +init_bash_argv () +{ + if (bash_argv_initialized == 0) + { + save_bash_argv (); + bash_argv_initialized = 1; + } +} + +void +save_bash_argv () +{ + WORD_LIST *list; + + list = list_rest_of_args (); + push_args (list); + dispose_words (list); +} + +/* Manipulate the special BASH_ARGV and BASH_ARGC variables. */ + +void +push_args (list) + WORD_LIST *list; +{ +#if defined (ARRAY_VARS) && defined (DEBUGGER) + SHELL_VAR *bash_argv_v, *bash_argc_v; + ARRAY *bash_argv_a, *bash_argc_a; + WORD_LIST *l; + arrayind_t i; + char *t; + + GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a); + GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a); + + for (l = list, i = 0; l; l = l->next, i++) + array_push (bash_argv_a, l->word->word); + + t = itos (i); + array_push (bash_argc_a, t); + free (t); +#endif /* ARRAY_VARS && DEBUGGER */ +} + +/* Remove arguments from BASH_ARGV array. Pop top element off BASH_ARGC + array and use that value as the count of elements to remove from + BASH_ARGV. */ +void +pop_args () +{ +#if defined (ARRAY_VARS) && defined (DEBUGGER) + SHELL_VAR *bash_argv_v, *bash_argc_v; + ARRAY *bash_argv_a, *bash_argc_a; + ARRAY_ELEMENT *ce; + intmax_t i; + + GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a); + GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a); + + ce = array_shift (bash_argc_a, 1, 0); + if (ce == 0 || legal_number (element_value (ce), &i) == 0) + i = 0; + + for ( ; i > 0; i--) + array_pop (bash_argv_a); + array_dispose_element (ce); +#endif /* ARRAY_VARS && DEBUGGER */ +} + +/************************************************* + * * + * Functions to manage special variables * + * * + *************************************************/ + +/* Extern declarations for variables this code has to manage. */ + +/* An alist of name.function for each special variable. Most of the + functions don't do much, and in fact, this would be faster with a + switch statement, but by the end of this file, I am sick of switch + statements. */ + +#define SET_INT_VAR(name, intvar) intvar = find_variable (name) != 0 + +/* This table will be sorted with qsort() the first time it's accessed. */ +struct name_and_function { + char *name; + sh_sv_func_t *function; +}; + +static struct name_and_function special_vars[] = { + { "BASH_COMPAT", sv_shcompat }, + { "BASH_XTRACEFD", sv_xtracefd }, + +#if defined (JOB_CONTROL) + { "CHILD_MAX", sv_childmax }, +#endif + +#if defined (READLINE) +# if defined (STRICT_POSIX) + { "COLUMNS", sv_winsize }, +# endif + { "COMP_WORDBREAKS", sv_comp_wordbreaks }, +#endif + + { "EXECIGNORE", sv_execignore }, + + { "FUNCNEST", sv_funcnest }, + + { "GLOBIGNORE", sv_globignore }, + +#if defined (HISTORY) + { "HISTCONTROL", sv_history_control }, + { "HISTFILESIZE", sv_histsize }, + { "HISTIGNORE", sv_histignore }, + { "HISTSIZE", sv_histsize }, + { "HISTTIMEFORMAT", sv_histtimefmt }, +#endif + +#if defined (__CYGWIN__) + { "HOME", sv_home }, +#endif + +#if defined (READLINE) + { "HOSTFILE", sv_hostfile }, +#endif + + { "IFS", sv_ifs }, + { "IGNOREEOF", sv_ignoreeof }, + + { "LANG", sv_locale }, + { "LC_ALL", sv_locale }, + { "LC_COLLATE", sv_locale }, + { "LC_CTYPE", sv_locale }, + { "LC_MESSAGES", sv_locale }, + { "LC_NUMERIC", sv_locale }, + { "LC_TIME", sv_locale }, + +#if defined (READLINE) && defined (STRICT_POSIX) + { "LINES", sv_winsize }, +#endif + + { "MAIL", sv_mail }, + { "MAILCHECK", sv_mail }, + { "MAILPATH", sv_mail }, + + { "OPTERR", sv_opterr }, + { "OPTIND", sv_optind }, + + { "PATH", sv_path }, + { "POSIXLY_CORRECT", sv_strict_posix }, + +#if defined (READLINE) + { "TERM", sv_terminal }, + { "TERMCAP", sv_terminal }, + { "TERMINFO", sv_terminal }, +#endif /* READLINE */ + + { "TEXTDOMAIN", sv_locale }, + { "TEXTDOMAINDIR", sv_locale }, + +#if defined (HAVE_TZSET) + { "TZ", sv_tz }, +#endif + +#if defined (HISTORY) && defined (BANG_HISTORY) + { "histchars", sv_histchars }, +#endif /* HISTORY && BANG_HISTORY */ + + { "ignoreeof", sv_ignoreeof }, + + { (char *)0, (sh_sv_func_t *)0 } +}; + +#define N_SPECIAL_VARS (sizeof (special_vars) / sizeof (special_vars[0]) - 1) + +static int +sv_compare (sv1, sv2) + struct name_and_function *sv1, *sv2; +{ + int r; + + if ((r = sv1->name[0] - sv2->name[0]) == 0) + r = strcmp (sv1->name, sv2->name); + return r; +} + +static inline int +find_special_var (name) + const char *name; +{ + register int i, r; + + for (i = 0; special_vars[i].name; i++) + { + r = special_vars[i].name[0] - name[0]; + if (r == 0) + r = strcmp (special_vars[i].name, name); + if (r == 0) + return i; + else if (r > 0) + /* Can't match any of rest of elements in sorted list. Take this out + if it causes problems in certain environments. */ + break; + } + return -1; +} + +/* The variable in NAME has just had its state changed. Check to see if it + is one of the special ones where something special happens. */ +void +stupidly_hack_special_variables (name) + char *name; +{ + static int sv_sorted = 0; + int i; + + if (sv_sorted == 0) /* shouldn't need, but it's fairly cheap. */ + { + qsort (special_vars, N_SPECIAL_VARS, sizeof (special_vars[0]), + (QSFUNC *)sv_compare); + sv_sorted = 1; + } + + i = find_special_var (name); + if (i != -1) + (*(special_vars[i].function)) (name); +} + +/* Special variables that need hooks to be run when they are unset as part + of shell reinitialization should have their sv_ functions run here. */ +void +reinit_special_variables () +{ +#if defined (READLINE) + sv_comp_wordbreaks ("COMP_WORDBREAKS"); +#endif + sv_globignore ("GLOBIGNORE"); + sv_opterr ("OPTERR"); +} + +void +sv_ifs (name) + char *name; +{ + SHELL_VAR *v; + + v = find_variable ("IFS"); + setifs (v); +} + +/* What to do just after the PATH variable has changed. */ +void +sv_path (name) + char *name; +{ + /* hash -r */ + phash_flush (); +} + +/* What to do just after one of the MAILxxxx variables has changed. NAME + is the name of the variable. This is called with NAME set to one of + MAIL, MAILCHECK, or MAILPATH. */ +void +sv_mail (name) + char *name; +{ + /* If the time interval for checking the files has changed, then + reset the mail timer. Otherwise, one of the pathname vars + to the users mailbox has changed, so rebuild the array of + filenames. */ + if (name[4] == 'C') /* if (strcmp (name, "MAILCHECK") == 0) */ + reset_mail_timer (); + else + { + free_mail_files (); + remember_mail_dates (); + } +} + +void +sv_funcnest (name) + char *name; +{ + SHELL_VAR *v; + intmax_t num; + + v = find_variable (name); + if (v == 0) + funcnest_max = 0; + else if (legal_number (value_cell (v), &num) == 0) + funcnest_max = 0; + else + funcnest_max = num; +} + +/* What to do when EXECIGNORE changes. */ +void +sv_execignore (name) + char *name; +{ + setup_exec_ignore (name); +} + +/* What to do when GLOBIGNORE changes. */ +void +sv_globignore (name) + char *name; +{ + if (privileged_mode == 0) + setup_glob_ignore (name); +} + +#if defined (READLINE) +void +sv_comp_wordbreaks (name) + char *name; +{ + SHELL_VAR *sv; + + sv = find_variable (name); + if (sv == 0) + reset_completer_word_break_chars (); +} + +/* What to do just after one of the TERMxxx variables has changed. + If we are an interactive shell, then try to reset the terminal + information in readline. */ +void +sv_terminal (name) + char *name; +{ + if (interactive_shell && no_line_editing == 0) + rl_reset_terminal (get_string_value ("TERM")); +} + +void +sv_hostfile (name) + char *name; +{ + SHELL_VAR *v; + + v = find_variable (name); + if (v == 0) + clear_hostname_list (); + else + hostname_list_initialized = 0; +} + +#if defined (STRICT_POSIX) +/* In strict posix mode, we allow assignments to LINES and COLUMNS (and values + found in the initial environment) to override the terminal size reported by + the kernel. */ +void +sv_winsize (name) + char *name; +{ + SHELL_VAR *v; + intmax_t xd; + int d; + + if (posixly_correct == 0 || interactive_shell == 0 || no_line_editing) + return; + + v = find_variable (name); + if (v == 0 || var_isset (v) == 0) + rl_reset_screen_size (); + else + { + if (legal_number (value_cell (v), &xd) == 0) + return; + winsize_assignment = 1; + d = xd; /* truncate */ + if (name[0] == 'L') /* LINES */ + rl_set_screen_size (d, -1); + else /* COLUMNS */ + rl_set_screen_size (-1, d); + winsize_assignment = 0; + } +} +#endif /* STRICT_POSIX */ +#endif /* READLINE */ + +/* Update the value of HOME in the export environment so tilde expansion will + work on cygwin. */ +#if defined (__CYGWIN__) +sv_home (name) + char *name; +{ + array_needs_making = 1; + maybe_make_export_env (); +} +#endif + +#if defined (HISTORY) +/* What to do after the HISTSIZE or HISTFILESIZE variables change. + If there is a value for this HISTSIZE (and it is numeric), then stifle + the history. Otherwise, if there is NO value for this variable, + unstifle the history. If name is HISTFILESIZE, and its value is + numeric, truncate the history file to hold no more than that many + lines. */ +void +sv_histsize (name) + char *name; +{ + char *temp; + intmax_t num; + int hmax; + + temp = get_string_value (name); + + if (temp && *temp) + { + if (legal_number (temp, &num)) + { + hmax = num; + if (hmax < 0 && name[4] == 'S') + unstifle_history (); /* unstifle history if HISTSIZE < 0 */ + else if (name[4] == 'S') + { + stifle_history (hmax); + hmax = where_history (); + if (history_lines_this_session > hmax) + history_lines_this_session = hmax; + } + else if (hmax >= 0) /* truncate HISTFILE if HISTFILESIZE >= 0 */ + { + history_truncate_file (get_string_value ("HISTFILE"), hmax); + /* If we just shrank the history file to fewer lines than we've + already read, make sure we adjust our idea of how many lines + we have read from the file. */ + if (hmax < history_lines_in_file) + history_lines_in_file = hmax; + } + } + } + else if (name[4] == 'S') + unstifle_history (); +} + +/* What to do after the HISTIGNORE variable changes. */ +void +sv_histignore (name) + char *name; +{ + setup_history_ignore (name); +} + +/* What to do after the HISTCONTROL variable changes. */ +void +sv_history_control (name) + char *name; +{ + char *temp; + char *val; + int tptr; + + history_control = 0; + temp = get_string_value (name); + + if (temp == 0 || *temp == 0) + return; + + tptr = 0; + while (val = extract_colon_unit (temp, &tptr)) + { + if (STREQ (val, "ignorespace")) + history_control |= HC_IGNSPACE; + else if (STREQ (val, "ignoredups")) + history_control |= HC_IGNDUPS; + else if (STREQ (val, "ignoreboth")) + history_control |= HC_IGNBOTH; + else if (STREQ (val, "erasedups")) + history_control |= HC_ERASEDUPS; + + free (val); + } +} + +#if defined (BANG_HISTORY) +/* Setting/unsetting of the history expansion character. */ +void +sv_histchars (name) + char *name; +{ + char *temp; + + temp = get_string_value (name); + if (temp) + { + history_expansion_char = *temp; + if (temp[0] && temp[1]) + { + history_subst_char = temp[1]; + if (temp[2]) + history_comment_char = temp[2]; + } + } + else + { + history_expansion_char = '!'; + history_subst_char = '^'; + history_comment_char = '#'; + } +} +#endif /* BANG_HISTORY */ + +void +sv_histtimefmt (name) + char *name; +{ + SHELL_VAR *v; + + if (v = find_variable (name)) + { + if (history_comment_char == 0) + history_comment_char = '#'; + } + history_write_timestamps = (v != 0); +} +#endif /* HISTORY */ + +#if defined (HAVE_TZSET) +void +sv_tz (name) + char *name; +{ + SHELL_VAR *v; + + v = find_variable (name); + if (v && exported_p (v)) + array_needs_making = 1; + else if (v == 0) + array_needs_making = 1; + + if (array_needs_making) + { + maybe_make_export_env (); + tzset (); + } +} +#endif + +/* If the variable exists, then the value of it can be the number + of times we actually ignore the EOF. The default is small, + (smaller than csh, anyway). */ +void +sv_ignoreeof (name) + char *name; +{ + SHELL_VAR *tmp_var; + char *temp; + + eof_encountered = 0; + + tmp_var = find_variable (name); + ignoreeof = tmp_var && var_isset (tmp_var); + temp = tmp_var ? value_cell (tmp_var) : (char *)NULL; + if (temp) + eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10; + set_shellopts (); /* make sure `ignoreeof' is/is not in $SHELLOPTS */ +} + +void +sv_optind (name) + char *name; +{ + SHELL_VAR *var; + char *tt; + int s; + + var = find_variable ("OPTIND"); + tt = var ? get_variable_value (var) : (char *)NULL; + + /* Assume that if var->context < variable_context and variable_context > 0 + then we are restoring the variables's previous state while returning + from a function. */ + if (tt && *tt) + { + s = atoi (tt); + + /* According to POSIX, setting OPTIND=1 resets the internal state + of getopt (). */ + if (s < 0 || s == 1) + s = 0; + } + else + s = 0; + getopts_reset (s); +} + +void +sv_opterr (name) + char *name; +{ + char *tt; + + tt = get_string_value ("OPTERR"); + sh_opterr = (tt && *tt) ? atoi (tt) : 1; +} + +void +sv_strict_posix (name) + char *name; +{ + SHELL_VAR *var; + + var = find_variable (name); + posixly_correct = var && var_isset (var); + posix_initialize (posixly_correct); +#if defined (READLINE) + if (interactive_shell) + posix_readline_initialize (posixly_correct); +#endif /* READLINE */ + set_shellopts (); /* make sure `posix' is/is not in $SHELLOPTS */ +} + +void +sv_locale (name) + char *name; +{ + char *v; + int r; + + v = get_string_value (name); + if (name[0] == 'L' && name[1] == 'A') /* LANG */ + r = set_lang (name, v); + else + r = set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + +#if 1 + if (r == 0 && posixly_correct) + set_exit_status (EXECUTION_FAILURE); +#endif +} + +#if defined (ARRAY_VARS) +void +set_pipestatus_array (ps, nproc) + int *ps; + int nproc; +{ + SHELL_VAR *v; + ARRAY *a; + ARRAY_ELEMENT *ae; + register int i; + char *t, tbuf[INT_STRLEN_BOUND(int) + 1]; + + v = find_variable ("PIPESTATUS"); + if (v == 0) + v = make_new_array_variable ("PIPESTATUS"); + if (array_p (v) == 0) + return; /* Do nothing if not an array variable. */ + a = array_cell (v); + + if (a == 0 || array_num_elements (a) == 0) + { + for (i = 0; i < nproc; i++) /* was ps[i] != -1, not i < nproc */ + { + t = inttostr (ps[i], tbuf, sizeof (tbuf)); + array_insert (a, i, t); + } + return; + } + + /* Fast case */ + if (array_num_elements (a) == nproc && nproc == 1) + { + ae = element_forw (a->head); + free (element_value (ae)); + set_element_value (ae, itos (ps[0])); + } + else if (array_num_elements (a) <= nproc) + { + /* modify in array_num_elements members in place, then add */ + ae = a->head; + for (i = 0; i < array_num_elements (a); i++) + { + ae = element_forw (ae); + free (element_value (ae)); + set_element_value (ae, itos (ps[i])); + } + /* add any more */ + for ( ; i < nproc; i++) + { + t = inttostr (ps[i], tbuf, sizeof (tbuf)); + array_insert (a, i, t); + } + } + else + { + /* deleting elements. it's faster to rebuild the array. */ + array_flush (a); + for (i = 0; ps[i] != -1; i++) + { + t = inttostr (ps[i], tbuf, sizeof (tbuf)); + array_insert (a, i, t); + } + } +} + +ARRAY * +save_pipestatus_array () +{ + SHELL_VAR *v; + ARRAY *a; + + v = find_variable ("PIPESTATUS"); + if (v == 0 || array_p (v) == 0 || array_cell (v) == 0) + return ((ARRAY *)NULL); + + a = array_copy (array_cell (v)); + + return a; +} + +void +restore_pipestatus_array (a) + ARRAY *a; +{ + SHELL_VAR *v; + ARRAY *a2; + + v = find_variable ("PIPESTATUS"); + /* XXX - should we still assign even if existing value is NULL? */ + if (v == 0 || array_p (v) == 0 || array_cell (v) == 0) + return; + + a2 = array_cell (v); + var_setarray (v, a); + + array_dispose (a2); +} +#endif + +void +set_pipestatus_from_exit (s) + int s; +{ +#if defined (ARRAY_VARS) + static int v[2] = { 0, -1 }; + + v[0] = s; + set_pipestatus_array (v, 1); +#endif +} + +void +sv_xtracefd (name) + char *name; +{ + SHELL_VAR *v; + char *t, *e; + int fd; + FILE *fp; + + v = find_variable (name); + if (v == 0) + { + xtrace_reset (); + return; + } + + t = value_cell (v); + if (t == 0 || *t == 0) + xtrace_reset (); + else + { + fd = (int)strtol (t, &e, 10); + if (e != t && *e == '\0' && sh_validfd (fd)) + { + fp = fdopen (fd, "w"); + if (fp == 0) + internal_error (_("%s: %s: cannot open as FILE"), name, value_cell (v)); + else + xtrace_set (fd, fp); + } + else + internal_error (_("%s: %s: invalid value for trace file descriptor"), name, value_cell (v)); + } +} + +#define MIN_COMPAT_LEVEL 31 + +void +sv_shcompat (name) + char *name; +{ + SHELL_VAR *v; + char *val; + int tens, ones, compatval; + + v = find_variable (name); + if (v == 0) + { + shell_compatibility_level = DEFAULT_COMPAT_LEVEL; + set_compatibility_opts (); + return; + } + val = value_cell (v); + if (val == 0 || *val == '\0') + { + shell_compatibility_level = DEFAULT_COMPAT_LEVEL; + set_compatibility_opts (); + return; + } + /* Handle decimal-like compatibility version specifications: 4.2 */ + if (ISDIGIT (val[0]) && val[1] == '.' && ISDIGIT (val[2]) && val[3] == 0) + { + tens = val[0] - '0'; + ones = val[2] - '0'; + compatval = tens*10 + ones; + } + /* Handle integer-like compatibility version specifications: 42 */ + else if (ISDIGIT (val[0]) && ISDIGIT (val[1]) && val[2] == 0) + { + tens = val[0] - '0'; + ones = val[1] - '0'; + compatval = tens*10 + ones; + } + else + { +compat_error: + internal_error (_("%s: %s: compatibility value out of range"), name, val); + shell_compatibility_level = DEFAULT_COMPAT_LEVEL; + set_compatibility_opts (); + return; + } + + if (compatval < MIN_COMPAT_LEVEL || compatval > DEFAULT_COMPAT_LEVEL) + goto compat_error; + + shell_compatibility_level = compatval; + set_compatibility_opts (); +} + +#if defined (JOB_CONTROL) +void +sv_childmax (name) + char *name; +{ + char *tt; + int s; + + tt = get_string_value (name); + s = (tt && *tt) ? atoi (tt) : 0; + set_maxchild (s); +} +#endif diff --git a/bash-5.1/variables.h b/bash-5.1/variables.h new file mode 100644 index 0000000000000000000000000000000000000000..a5a70919e737b689aa5df1c95b94ff94db06444f --- /dev/null +++ b/bash-5.1/variables.h @@ -0,0 +1,458 @@ +/* variables.h -- data structures for shell variables. */ + +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_VARIABLES_H_) +#define _VARIABLES_H_ + +#include "stdc.h" +#include "array.h" +#include "assoc.h" + +/* Shell variables and functions are stored in hash tables. */ +#include "hashlib.h" + +#include "conftypes.h" + +/* A variable context. */ +typedef struct var_context { + char *name; /* empty or NULL means global context */ + int scope; /* 0 means global context */ + int flags; + struct var_context *up; /* previous function calls */ + struct var_context *down; /* down towards global context */ + HASH_TABLE *table; /* variables at this scope */ +} VAR_CONTEXT; + +/* Flags for var_context->flags */ +#define VC_HASLOCAL 0x01 +#define VC_HASTMPVAR 0x02 +#define VC_FUNCENV 0x04 /* also function if name != NULL */ +#define VC_BLTNENV 0x08 /* builtin_env */ +#define VC_TEMPENV 0x10 /* temporary_env */ + +#define VC_TEMPFLAGS (VC_FUNCENV|VC_BLTNENV|VC_TEMPENV) + +/* Accessing macros */ +#define vc_isfuncenv(vc) (((vc)->flags & VC_FUNCENV) != 0) +#define vc_isbltnenv(vc) (((vc)->flags & VC_BLTNENV) != 0) +#define vc_istempenv(vc) (((vc)->flags & (VC_TEMPFLAGS)) == VC_TEMPENV) + +#define vc_istempscope(vc) (((vc)->flags & (VC_TEMPENV|VC_BLTNENV)) != 0) + +#define vc_haslocals(vc) (((vc)->flags & VC_HASLOCAL) != 0) +#define vc_hastmpvars(vc) (((vc)->flags & VC_HASTMPVAR) != 0) + +/* What a shell variable looks like. */ + +typedef struct variable *sh_var_value_func_t PARAMS((struct variable *)); +typedef struct variable *sh_var_assign_func_t PARAMS((struct variable *, char *, arrayind_t, char *)); + +/* For the future */ +union _value { + char *s; /* string value */ + intmax_t i; /* int value */ + COMMAND *f; /* function */ + ARRAY *a; /* array */ + HASH_TABLE *h; /* associative array */ + double d; /* floating point number */ +#if defined (HAVE_LONG_DOUBLE) + long double ld; /* long double */ +#endif + struct variable *v; /* possible indirect variable use */ + void *opaque; /* opaque data for future use */ +}; + +typedef struct variable { + char *name; /* Symbol that the user types. */ + char *value; /* Value that is returned. */ + char *exportstr; /* String for the environment. */ + sh_var_value_func_t *dynamic_value; /* Function called to return a `dynamic' + value for a variable, like $SECONDS + or $RANDOM. */ + sh_var_assign_func_t *assign_func; /* Function called when this `special + variable' is assigned a value in + bind_variable. */ + int attributes; /* export, readonly, array, invisible... */ + int context; /* Which context this variable belongs to. */ +} SHELL_VAR; + +typedef struct _vlist { + SHELL_VAR **list; + size_t list_size; /* allocated size */ + size_t list_len; /* current number of entries */ +} VARLIST; + +/* The various attributes that a given variable can have. */ +/* First, the user-visible attributes */ +#define att_exported 0x0000001 /* export to environment */ +#define att_readonly 0x0000002 /* cannot change */ +#define att_array 0x0000004 /* value is an array */ +#define att_function 0x0000008 /* value is a function */ +#define att_integer 0x0000010 /* internal representation is int */ +#define att_local 0x0000020 /* variable is local to a function */ +#define att_assoc 0x0000040 /* variable is an associative array */ +#define att_trace 0x0000080 /* function is traced with DEBUG trap */ +#define att_uppercase 0x0000100 /* word converted to uppercase on assignment */ +#define att_lowercase 0x0000200 /* word converted to lowercase on assignment */ +#define att_capcase 0x0000400 /* word capitalized on assignment */ +#define att_nameref 0x0000800 /* word is a name reference */ + +#define user_attrs (att_exported|att_readonly|att_integer|att_local|att_trace|att_uppercase|att_lowercase|att_capcase|att_nameref) + +#define attmask_user 0x0000fff + +/* Internal attributes used for bookkeeping */ +#define att_invisible 0x0001000 /* cannot see */ +#define att_nounset 0x0002000 /* cannot unset */ +#define att_noassign 0x0004000 /* assignment not allowed */ +#define att_imported 0x0008000 /* came from environment */ +#define att_special 0x0010000 /* requires special handling */ +#define att_nofree 0x0020000 /* do not free value on unset */ +#define att_regenerate 0x0040000 /* regenerate when exported */ + +#define attmask_int 0x00ff000 + +/* Internal attributes used for variable scoping. */ +#define att_tempvar 0x0100000 /* variable came from the temp environment */ +#define att_propagate 0x0200000 /* propagate to previous scope */ + +#define attmask_scope 0x0f00000 + +#define exported_p(var) ((((var)->attributes) & (att_exported))) +#define readonly_p(var) ((((var)->attributes) & (att_readonly))) +#define array_p(var) ((((var)->attributes) & (att_array))) +#define function_p(var) ((((var)->attributes) & (att_function))) +#define integer_p(var) ((((var)->attributes) & (att_integer))) +#define local_p(var) ((((var)->attributes) & (att_local))) +#define assoc_p(var) ((((var)->attributes) & (att_assoc))) +#define trace_p(var) ((((var)->attributes) & (att_trace))) +#define uppercase_p(var) ((((var)->attributes) & (att_uppercase))) +#define lowercase_p(var) ((((var)->attributes) & (att_lowercase))) +#define capcase_p(var) ((((var)->attributes) & (att_capcase))) +#define nameref_p(var) ((((var)->attributes) & (att_nameref))) + +#define invisible_p(var) ((((var)->attributes) & (att_invisible))) +#define non_unsettable_p(var) ((((var)->attributes) & (att_nounset))) +#define noassign_p(var) ((((var)->attributes) & (att_noassign))) +#define imported_p(var) ((((var)->attributes) & (att_imported))) +#define specialvar_p(var) ((((var)->attributes) & (att_special))) +#define nofree_p(var) ((((var)->attributes) & (att_nofree))) +#define regen_p(var) ((((var)->attributes) & (att_regenerate))) + +#define tempvar_p(var) ((((var)->attributes) & (att_tempvar))) +#define propagate_p(var) ((((var)->attributes) & (att_propagate))) + +/* Variable names: lvalues */ +#define name_cell(var) ((var)->name) + +/* Accessing variable values: rvalues */ +#define value_cell(var) ((var)->value) +#define function_cell(var) (COMMAND *)((var)->value) +#define array_cell(var) (ARRAY *)((var)->value) +#define assoc_cell(var) (HASH_TABLE *)((var)->value) +#define nameref_cell(var) ((var)->value) /* so it can change later */ + +#define NAMEREF_MAX 8 /* only 8 levels of nameref indirection */ + +#define var_isset(var) ((var)->value != 0) +#define var_isunset(var) ((var)->value == 0) +#define var_isnull(var) ((var)->value && *(var)->value == 0) + +/* Assigning variable values: lvalues */ +#define var_setvalue(var, str) ((var)->value = (str)) +#define var_setfunc(var, func) ((var)->value = (char *)(func)) +#define var_setarray(var, arr) ((var)->value = (char *)(arr)) +#define var_setassoc(var, arr) ((var)->value = (char *)(arr)) +#define var_setref(var, str) ((var)->value = (str)) + +/* Make VAR be auto-exported. */ +#define set_auto_export(var) \ + do { (var)->attributes |= att_exported; array_needs_making = 1; } while (0) + +#define SETVARATTR(var, attr, undo) \ + ((undo == 0) ? ((var)->attributes |= (attr)) \ + : ((var)->attributes &= ~(attr))) + +#define VSETATTR(var, attr) ((var)->attributes |= (attr)) +#define VUNSETATTR(var, attr) ((var)->attributes &= ~(attr)) + +#define VGETFLAGS(var) ((var)->attributes) + +#define VSETFLAGS(var, flags) ((var)->attributes = (flags)) +#define VCLRFLAGS(var) ((var)->attributes = 0) + +/* Macros to perform various operations on `exportstr' member of a SHELL_VAR. */ +#define CLEAR_EXPORTSTR(var) (var)->exportstr = (char *)NULL +#define COPY_EXPORTSTR(var) ((var)->exportstr) ? savestring ((var)->exportstr) : (char *)NULL +#define SET_EXPORTSTR(var, value) (var)->exportstr = (value) +#define SAVE_EXPORTSTR(var, value) (var)->exportstr = (value) ? savestring (value) : (char *)NULL + +#define FREE_EXPORTSTR(var) \ + do { if ((var)->exportstr) free ((var)->exportstr); } while (0) + +#define CACHE_IMPORTSTR(var, value) \ + (var)->exportstr = savestring (value) + +#define INVALIDATE_EXPORTSTR(var) \ + do { \ + if ((var)->exportstr) \ + { \ + free ((var)->exportstr); \ + (var)->exportstr = (char *)NULL; \ + } \ + } while (0) + +#define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0') + +/* Flag values for make_local_variable and its array counterparts */ +#define MKLOC_ASSOCOK 0x01 +#define MKLOC_ARRAYOK 0x02 +#define MKLOC_INHERIT 0x04 + +/* Special value for nameref with invalid value for creation or assignment */ +extern SHELL_VAR nameref_invalid_value; +#define INVALID_NAMEREF_VALUE (void *)&nameref_invalid_value + +/* Stuff for hacking variables. */ +typedef int sh_var_map_func_t PARAMS((SHELL_VAR *)); + +/* Where we keep the variables and functions */ +extern VAR_CONTEXT *global_variables; +extern VAR_CONTEXT *shell_variables; + +extern HASH_TABLE *shell_functions; +extern HASH_TABLE *temporary_env; + +extern int variable_context; +extern char *dollar_vars[]; +extern char **export_env; + +extern int tempenv_assign_error; +extern int array_needs_making; +extern int shell_level; + +/* XXX */ +extern WORD_LIST *rest_of_args; +extern int posparam_count; +extern pid_t dollar_dollar_pid; + +extern int localvar_inherit; /* declared in variables.c */ + +extern void initialize_shell_variables PARAMS((char **, int)); + +extern int validate_inherited_value PARAMS((SHELL_VAR *, int)); + +extern SHELL_VAR *set_if_not PARAMS((char *, char *)); + +extern void sh_set_lines_and_columns PARAMS((int, int)); +extern void set_pwd PARAMS((void)); +extern void set_ppid PARAMS((void)); +extern void make_funcname_visible PARAMS((int)); + +extern SHELL_VAR *var_lookup PARAMS((const char *, VAR_CONTEXT *)); + +extern SHELL_VAR *find_function PARAMS((const char *)); +extern FUNCTION_DEF *find_function_def PARAMS((const char *)); +extern SHELL_VAR *find_variable PARAMS((const char *)); +extern SHELL_VAR *find_variable_noref PARAMS((const char *)); +extern SHELL_VAR *find_variable_last_nameref PARAMS((const char *, int)); +extern SHELL_VAR *find_global_variable_last_nameref PARAMS((const char *, int)); +extern SHELL_VAR *find_variable_nameref PARAMS((SHELL_VAR *)); +extern SHELL_VAR *find_variable_nameref_for_create PARAMS((const char *, int)); +extern SHELL_VAR *find_variable_nameref_for_assignment PARAMS((const char *, int)); +/*extern SHELL_VAR *find_variable_internal PARAMS((const char *, int));*/ +extern SHELL_VAR *find_variable_tempenv PARAMS((const char *)); +extern SHELL_VAR *find_variable_notempenv PARAMS((const char *)); +extern SHELL_VAR *find_global_variable PARAMS((const char *)); +extern SHELL_VAR *find_global_variable_noref PARAMS((const char *)); +extern SHELL_VAR *find_shell_variable PARAMS((const char *)); +extern SHELL_VAR *find_tempenv_variable PARAMS((const char *)); +extern SHELL_VAR *find_variable_no_invisible PARAMS((const char *)); +extern SHELL_VAR *find_variable_for_assignment PARAMS((const char *)); +extern char *nameref_transform_name PARAMS((char *, int)); +extern SHELL_VAR *copy_variable PARAMS((SHELL_VAR *)); +extern SHELL_VAR *make_local_variable PARAMS((const char *, int)); +extern SHELL_VAR *bind_variable PARAMS((const char *, char *, int)); +extern SHELL_VAR *bind_global_variable PARAMS((const char *, char *, int)); +extern SHELL_VAR *bind_function PARAMS((const char *, COMMAND *)); + +extern void bind_function_def PARAMS((const char *, FUNCTION_DEF *, int)); + +extern SHELL_VAR **map_over PARAMS((sh_var_map_func_t *, VAR_CONTEXT *)); +SHELL_VAR **map_over_funcs PARAMS((sh_var_map_func_t *)); + +extern SHELL_VAR **all_shell_variables PARAMS((void)); +extern SHELL_VAR **all_shell_functions PARAMS((void)); +extern SHELL_VAR **all_visible_variables PARAMS((void)); +extern SHELL_VAR **all_visible_functions PARAMS((void)); +extern SHELL_VAR **all_exported_variables PARAMS((void)); +extern SHELL_VAR **local_exported_variables PARAMS((void)); +extern SHELL_VAR **all_local_variables PARAMS((int)); +#if defined (ARRAY_VARS) +extern SHELL_VAR **all_array_variables PARAMS((void)); +#endif +extern char **all_variables_matching_prefix PARAMS((const char *)); + +extern char **make_var_array PARAMS((HASH_TABLE *)); +extern char **add_or_supercede_exported_var PARAMS((char *, int)); + +extern char *get_variable_value PARAMS((SHELL_VAR *)); +extern char *get_string_value PARAMS((const char *)); +extern char *sh_get_env_value PARAMS((const char *)); +extern char *make_variable_value PARAMS((SHELL_VAR *, char *, int)); + +extern SHELL_VAR *bind_variable_value PARAMS((SHELL_VAR *, char *, int)); +extern SHELL_VAR *bind_int_variable PARAMS((char *, char *, int)); +extern SHELL_VAR *bind_var_to_int PARAMS((char *, intmax_t)); + +extern int assign_in_env PARAMS((WORD_DESC *, int)); + +extern int unbind_variable PARAMS((const char *)); +extern int check_unbind_variable PARAMS((const char *)); +extern int unbind_nameref PARAMS((const char *)); +extern int unbind_variable_noref PARAMS((const char *)); +extern int unbind_func PARAMS((const char *)); +extern int unbind_function_def PARAMS((const char *)); +extern int delete_var PARAMS((const char *, VAR_CONTEXT *)); +extern int makunbound PARAMS((const char *, VAR_CONTEXT *)); +extern int kill_local_variable PARAMS((const char *)); +extern void delete_all_variables PARAMS((HASH_TABLE *)); +extern void delete_all_contexts PARAMS((VAR_CONTEXT *)); + +extern VAR_CONTEXT *new_var_context PARAMS((char *, int)); +extern void dispose_var_context PARAMS((VAR_CONTEXT *)); +extern VAR_CONTEXT *push_var_context PARAMS((char *, int, HASH_TABLE *)); +extern void pop_var_context PARAMS((void)); +extern VAR_CONTEXT *push_scope PARAMS((int, HASH_TABLE *)); +extern void pop_scope PARAMS((int)); + +extern void clear_dollar_vars PARAMS((void)); + +extern void push_context PARAMS((char *, int, HASH_TABLE *)); +extern void pop_context PARAMS((void)); +extern void push_dollar_vars PARAMS((void)); +extern void pop_dollar_vars PARAMS((void)); +extern void dispose_saved_dollar_vars PARAMS((void)); + +extern void init_bash_argv PARAMS((void)); +extern void save_bash_argv PARAMS((void)); +extern void push_args PARAMS((WORD_LIST *)); +extern void pop_args PARAMS((void)); + +extern void adjust_shell_level PARAMS((int)); +extern void non_unsettable PARAMS((char *)); +extern void dispose_variable PARAMS((SHELL_VAR *)); +extern void dispose_used_env_vars PARAMS((void)); +extern void dispose_function_env PARAMS((void)); +extern void dispose_builtin_env PARAMS((void)); +extern void merge_temporary_env PARAMS((void)); +extern void flush_temporary_env PARAMS((void)); +extern void merge_builtin_env PARAMS((void)); +extern void kill_all_local_variables PARAMS((void)); + +extern void set_var_read_only PARAMS((char *)); +extern void set_func_read_only PARAMS((const char *)); +extern void set_var_auto_export PARAMS((char *)); +extern void set_func_auto_export PARAMS((const char *)); + +extern void sort_variables PARAMS((SHELL_VAR **)); + +extern int chkexport PARAMS((char *)); +extern void maybe_make_export_env PARAMS((void)); +extern void update_export_env_inplace PARAMS((char *, int, char *)); +extern void put_command_name_into_env PARAMS((char *)); +extern void put_gnu_argv_flags_into_env PARAMS((intmax_t, char *)); + +extern void print_var_list PARAMS((SHELL_VAR **)); +extern void print_func_list PARAMS((SHELL_VAR **)); +extern void print_assignment PARAMS((SHELL_VAR *)); +extern void print_var_value PARAMS((SHELL_VAR *, int)); +extern void print_var_function PARAMS((SHELL_VAR *)); + +#if defined (ARRAY_VARS) +extern SHELL_VAR *make_new_array_variable PARAMS((char *)); +extern SHELL_VAR *make_local_array_variable PARAMS((char *, int)); + +extern SHELL_VAR *make_new_assoc_variable PARAMS((char *)); +extern SHELL_VAR *make_local_assoc_variable PARAMS((char *, int)); + +extern void set_pipestatus_array PARAMS((int *, int)); +extern ARRAY *save_pipestatus_array PARAMS((void)); +extern void restore_pipestatus_array PARAMS((ARRAY *)); +#endif + +extern void set_pipestatus_from_exit PARAMS((int)); + +/* The variable in NAME has just had its state changed. Check to see if it + is one of the special ones where something special happens. */ +extern void stupidly_hack_special_variables PARAMS((char *)); + +/* Reinitialize some special variables that have external effects upon unset + when the shell reinitializes itself. */ +extern void reinit_special_variables PARAMS((void)); + +extern int get_random_number PARAMS((void)); + +/* The `special variable' functions that get called when a particular + variable is set. */ +extern void sv_ifs PARAMS((char *)); +extern void sv_path PARAMS((char *)); +extern void sv_mail PARAMS((char *)); +extern void sv_funcnest PARAMS((char *)); +extern void sv_execignore PARAMS((char *)); +extern void sv_globignore PARAMS((char *)); +extern void sv_ignoreeof PARAMS((char *)); +extern void sv_strict_posix PARAMS((char *)); +extern void sv_optind PARAMS((char *)); +extern void sv_opterr PARAMS((char *)); +extern void sv_locale PARAMS((char *)); +extern void sv_xtracefd PARAMS((char *)); +extern void sv_shcompat PARAMS((char *)); + +#if defined (READLINE) +extern void sv_comp_wordbreaks PARAMS((char *)); +extern void sv_terminal PARAMS((char *)); +extern void sv_hostfile PARAMS((char *)); +extern void sv_winsize PARAMS((char *)); +#endif + +#if defined (__CYGWIN__) +extern void sv_home PARAMS((char *)); +#endif + +#if defined (HISTORY) +extern void sv_histsize PARAMS((char *)); +extern void sv_histignore PARAMS((char *)); +extern void sv_history_control PARAMS((char *)); +# if defined (BANG_HISTORY) +extern void sv_histchars PARAMS((char *)); +# endif +extern void sv_histtimefmt PARAMS((char *)); +#endif /* HISTORY */ + +#if defined (HAVE_TZSET) +extern void sv_tz PARAMS((char *)); +#endif + +#if defined (JOB_CONTROL) +extern void sv_childmax PARAMS((char *)); +#endif + +#endif /* !_VARIABLES_H_ */ diff --git a/bash-5.1/version.c b/bash-5.1/version.c new file mode 100644 index 0000000000000000000000000000000000000000..8c1568ae4bc94b3a003c048de18aebab796becea --- /dev/null +++ b/bash-5.1/version.c @@ -0,0 +1,94 @@ +/* version.c -- distribution and version numbers. */ + +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#include + +#include + +#include "stdc.h" + +#include "version.h" +#include "patchlevel.h" +#include "conftypes.h" + +#include "bashintl.h" + +extern char *shell_name; + +/* Defines from version.h */ +const char * const dist_version = DISTVERSION; +const int patch_level = PATCHLEVEL; +const int build_version = BUILDVERSION; +#ifdef RELSTATUS +const char * const release_status = RELSTATUS; +#else +const char * const release_status = (char *)0; +#endif +const char * const sccs_version = SCCSVERSION; + +const char * const bash_copyright = N_("Copyright (C) 2020 Free Software Foundation, Inc."); +const char * const bash_license = N_("License GPLv3+: GNU GPL version 3 or later \n"); + +/* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */ +int shell_compatibility_level = DEFAULT_COMPAT_LEVEL; + +/* Functions for getting, setting, and displaying the shell version. */ + +/* Forward declarations so we don't have to include externs.h */ +extern char *shell_version_string PARAMS((void)); +extern void show_shell_version PARAMS((int)); + +/* Give version information about this shell. */ +char * +shell_version_string () +{ + static char tt[32] = { '\0' }; + + if (tt[0] == '\0') + { + if (release_status) +#if HAVE_SNPRINTF + snprintf (tt, sizeof (tt), "%s.%d(%d)-%s", dist_version, patch_level, build_version, release_status); +#else + sprintf (tt, "%s.%d(%d)-%s", dist_version, patch_level, build_version, release_status); +#endif + else +#if HAVE_SNPRINTF + snprintf (tt, sizeof (tt), "%s.%d(%d)", dist_version, patch_level, build_version); +#else + sprintf (tt, "%s.%d(%d)", dist_version, patch_level, build_version); +#endif + } + return tt; +} + +void +show_shell_version (extended) + int extended; +{ + printf (_("GNU bash, version %s (%s)\n"), shell_version_string (), MACHTYPE); + if (extended) + { + printf ("%s\n", _(bash_copyright)); + printf ("%s\n", _(bash_license)); + printf ("%s\n", _("This is free software; you are free to change and redistribute it.")); + printf ("%s\n", _("There is NO WARRANTY, to the extent permitted by law.")); + } +} diff --git a/bash-5.1/xmalloc.c b/bash-5.1/xmalloc.c new file mode 100644 index 0000000000000000000000000000000000000000..1b3b40887a886943cddb7a1daa23d281eca2a752 --- /dev/null +++ b/bash-5.1/xmalloc.c @@ -0,0 +1,225 @@ +/* xmalloc.c -- safe versions of malloc and realloc */ + +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. + + This file is part of GNU Bash, the GNU Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if defined (HAVE_CONFIG_H) +#include +#endif + +#include "bashtypes.h" +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "error.h" + +#include "bashintl.h" + +#if !defined (PTR_T) +# if defined (__STDC__) +# define PTR_T void * +# else +# define PTR_T char * +# endif /* !__STDC__ */ +#endif /* !PTR_T */ + +#if HAVE_SBRK && !HAVE_DECL_SBRK +extern char *sbrk(); +#endif + +#if HAVE_SBRK && defined (USING_BASH_MALLOC) +static PTR_T lbreak; +static int brkfound; +static size_t allocated; +#endif + +/* **************************************************************** */ +/* */ +/* Memory Allocation and Deallocation. */ +/* */ +/* **************************************************************** */ + +#if HAVE_SBRK && defined (USING_BASH_MALLOC) +#define FINDBRK() \ +do { \ + if (brkfound == 0) \ + { \ + lbreak = (PTR_T)sbrk (0); \ + brkfound++; \ + } \ +} while (0) + +static size_t +findbrk () +{ + FINDBRK(); + return (char *)sbrk (0) - (char *)lbreak; +} +#else +#define FINDBRK() +#endif + +static void +allocerr (func, bytes) + const char *func; + size_t bytes; +{ +#if HAVE_SBRK && defined (USING_BASH_MALLOC) + allocated = findbrk (); + fatal_error (_("%s: cannot allocate %lu bytes (%lu bytes allocated)"), func, (unsigned long)bytes, (unsigned long)allocated); +#else + fatal_error (_("%s: cannot allocate %lu bytes"), func, (unsigned long)bytes); +#endif /* !HAVE_SBRK */ +} + +/* Return a pointer to free()able block of memory large enough + to hold BYTES number of bytes. If the memory cannot be allocated, + print an error message and abort. */ +PTR_T +xmalloc (bytes) + size_t bytes; +{ + PTR_T temp; + +#if defined (DEBUG) + if (bytes == 0) + internal_warning("xmalloc: size argument is 0"); +#endif + + FINDBRK(); + temp = malloc (bytes); + + if (temp == 0) + allocerr ("xmalloc", bytes); + + return (temp); +} + +PTR_T +xrealloc (pointer, bytes) + PTR_T pointer; + size_t bytes; +{ + PTR_T temp; + +#if defined (DEBUG) + if (bytes == 0) + internal_warning("xrealloc: size argument is 0"); +#endif + + FINDBRK(); + temp = pointer ? realloc (pointer, bytes) : malloc (bytes); + + if (temp == 0) + allocerr ("xrealloc", bytes); + + return (temp); +} + +/* Use this as the function to call when adding unwind protects so we + don't need to know what free() returns. */ +void +xfree (string) + PTR_T string; +{ + if (string) + free (string); +} + +#ifdef USING_BASH_MALLOC +#include + +static void +sh_allocerr (func, bytes, file, line) + const char *func; + size_t bytes; + char *file; + int line; +{ +#if HAVE_SBRK + allocated = findbrk (); + fatal_error (_("%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"), func, file, line, (unsigned long)bytes, (unsigned long)allocated); +#else + fatal_error (_("%s: %s:%d: cannot allocate %lu bytes"), func, file, line, (unsigned long)bytes); +#endif /* !HAVE_SBRK */ +} + +PTR_T +sh_xmalloc (bytes, file, line) + size_t bytes; + char *file; + int line; +{ + PTR_T temp; + +#if defined (DEBUG) + if (bytes == 0) + internal_warning("xmalloc: %s:%d: size argument is 0", file, line); +#endif + + FINDBRK(); + temp = sh_malloc (bytes, file, line); + + if (temp == 0) + sh_allocerr ("xmalloc", bytes, file, line); + + return (temp); +} + +PTR_T +sh_xrealloc (pointer, bytes, file, line) + PTR_T pointer; + size_t bytes; + char *file; + int line; +{ + PTR_T temp; + +#if defined (DEBUG) + if (bytes == 0) + internal_warning("xrealloc: %s:%d: size argument is 0", file, line); +#endif + + FINDBRK(); + temp = pointer ? sh_realloc (pointer, bytes, file, line) : sh_malloc (bytes, file, line); + + if (temp == 0) + sh_allocerr ("xrealloc", bytes, file, line); + + return (temp); +} + +void +sh_xfree (string, file, line) + PTR_T string; + char *file; + int line; +{ + if (string) + sh_free (string, file, line); +} +#endif diff --git a/bash-5.1/xmalloc.h b/bash-5.1/xmalloc.h new file mode 100644 index 0000000000000000000000000000000000000000..55d2e3d048ab2b4a8bec2e2b0fd0dfe641a793b1 --- /dev/null +++ b/bash-5.1/xmalloc.h @@ -0,0 +1,66 @@ +/* xmalloc.h -- defines for the `x' memory allocation functions */ + +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash 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. + + Bash 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 Bash. If not, see . +*/ + +#if !defined (_XMALLOC_H_) +#define _XMALLOC_H_ + +#include "stdc.h" +#include "bashansi.h" + +/* Generic pointer type. */ +#ifndef PTR_T + +#if defined (__STDC__) +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* PTR_T */ + +/* Allocation functions in xmalloc.c */ +extern PTR_T xmalloc PARAMS((size_t)); +extern PTR_T xrealloc PARAMS((void *, size_t)); +extern void xfree PARAMS((void *)); + +#if defined(USING_BASH_MALLOC) && !defined (DISABLE_MALLOC_WRAPPERS) +extern PTR_T sh_xmalloc PARAMS((size_t, const char *, int)); +extern PTR_T sh_xrealloc PARAMS((void *, size_t, const char *, int)); +extern void sh_xfree PARAMS((void *, const char *, int)); + +#define xmalloc(x) sh_xmalloc((x), __FILE__, __LINE__) +#define xrealloc(x, n) sh_xrealloc((x), (n), __FILE__, __LINE__) +#define xfree(x) sh_xfree((x), __FILE__, __LINE__) + +#ifdef free +#undef free +#endif +#define free(x) sh_xfree((x), __FILE__, __LINE__) + +extern PTR_T sh_malloc PARAMS((size_t, const char *, int)); + +#ifdef malloc +#undef malloc +#endif +#define malloc(x) sh_malloc((x), __FILE__, __LINE__) + +#endif /* USING_BASH_MALLOC */ + +#endif /* _XMALLOC_H_ */ diff --git a/gen.sh b/gen.sh new file mode 100644 index 0000000000000000000000000000000000000000..51b370286d96805bd7ae6959e04bb5a8d6727393 --- /dev/null +++ b/gen.sh @@ -0,0 +1,32 @@ +export utshell_dir=/home/tong/src/bash; +export euler_dir=/home/tong/src/openeuler/utshell; +export count=0`tail -1 ${euler_dir}/record.txt`; +echo $euler_dir +echo $utshell_dir +while read line ; do +let count=count+1; +echo $line|awk -F'$' '{ +print "echo cd " ENVIRON["euler_dir"] ";"; +print "cd " ENVIRON["euler_dir"] ";"; +print "echo git checkout -b bv" ENVIRON["count"] ";"; +print "git checkout -b bv" ENVIRON["count"] ";"; +print "cd " ENVIRON["utshell_dir"] ";"; +print "echo cd " ENVIRON["utshell_dir"] ";"; +print "git reset --hard ",$1," ; "; +print "echo git reset --hard ",$1," ; "; +print "cp -r " ENVIRON["utshell_dir"] "//* " ENVIRON["euler_dir"] ";" +print "echo cp -r " ENVIRON["utshell_dir"] "//* " ENVIRON["euler_dir"] ";" +print "cd " ENVIRON["euler_dir"]; +print "echo cd " ENVIRON["euler_dir"] ";" +print "echo " ENVIRON["count"] " >> record.txt"; +print "echo echo " $1 " to record.txt ; "; +print "git add .;" +print "echo git add .;" +print "git commit -m \"" $2 "\""; +print "echo git commit -m " $2," ;"; +print "git push origin bv" ENVIRON["count"] ; +print "echo git push origin bv" ENVIRON["count"] ";"; +print "cd " ENVIRON["utshell_dir"]; +print "echo cd " ENVIRON["utshell_dir"] ";" +print "read "; +}' ; done < ../1 >./x.sh diff --git a/gen2.sh b/gen2.sh new file mode 100644 index 0000000000000000000000000000000000000000..1417e808c82ddd9ecdc16099e52f3e2eb4b81930 --- /dev/null +++ b/gen2.sh @@ -0,0 +1,11 @@ +export utshell_dir=/home/tong/src/bash; +export euler_dir=/home/tong/src/openeuler/utshell; +export count=1; +echo $euler_dir +echo $utshell_dir +while read line ; do +let count=count+1; +echo $line|awk -F'$' '{ +print "echo cd " ENVIRON["euler_dir"] ";"; +print "read "; +}' ; done < ../1 >./x.sh diff --git a/record.txt b/record.txt new file mode 100644 index 0000000000000000000000000000000000000000..099b7d91c923c6fc0fdaaea4be224d5d9d4fcfca --- /dev/null +++ b/record.txt @@ -0,0 +1,4 @@ +1 +2 +1 +2 diff --git a/x.sh b/x.sh new file mode 100644 index 0000000000000000000000000000000000000000..63fcf62f280dfc05929d9d6cd15597322e723245 --- /dev/null +++ b/x.sh @@ -0,0 +1,46 @@ +echo cd /home/tong/src/openeuler/utshell; +cd /home/tong/src/openeuler/utshell; +echo git checkout -b bv2; +git checkout -b bv2; +cd /home/tong/src/bash; +echo cd /home/tong/src/bash; +git reset --hard 821d31e4f75848ca30bf5b5bede06256907b09f0 ; +echo git reset --hard 821d31e4f75848ca30bf5b5bede06256907b09f0 ; +cp -r /home/tong/src/bash//* /home/tong/src/openeuler/utshell; +echo cp -r /home/tong/src/bash//* /home/tong/src/openeuler/utshell; +cd /home/tong/src/openeuler/utshell +echo cd /home/tong/src/openeuler/utshell; +echo 2 >> record.txt +echo echo 821d31e4f75848ca30bf5b5bede06256907b09f0 to record.txt ; +git add .; +echo git add .; +git commit -m " init" +echo git commit -m init ; +git push origin bv2 +echo git push origin bv2; +cd /home/tong/src/bash +echo cd /home/tong/src/bash; +read +echo cd /home/tong/src/openeuler/utshell; +cd /home/tong/src/openeuler/utshell; +echo git checkout -b bv3; +git checkout -b bv3; +cd /home/tong/src/bash; +echo cd /home/tong/src/bash; +git reset --hard d8b5fe4e7673b03007c243172537bc84b7d7c558 ; +echo git reset --hard d8b5fe4e7673b03007c243172537bc84b7d7c558 ; +cp -r /home/tong/src/bash//* /home/tong/src/openeuler/utshell; +echo cp -r /home/tong/src/bash//* /home/tong/src/openeuler/utshell; +cd /home/tong/src/openeuler/utshell +echo cd /home/tong/src/openeuler/utshell; +echo 3 >> record.txt +echo echo d8b5fe4e7673b03007c243172537bc84b7d7c558 to record.txt ; +git add .; +echo git add .; +git commit -m " refactor: add rust framework for builtins." +echo git commit -m refactor: add rust framework for builtins. ; +git push origin bv3 +echo git push origin bv3; +cd /home/tong/src/bash +echo cd /home/tong/src/bash; +read
    +argv[11] = +argv[1] = +argv[2] = +argv[3] = +argv[4] = +argv[5] = +argv[6] = +argv[7] = +argv[1] = <*> +argv[1] = +argv[1] = diff --git a/bash-5.1/tests/glob.tests b/bash-5.1/tests/glob.tests new file mode 100644 index 0000000000000000000000000000000000000000..b35d7336ff693ecc871e00feaa7cb02b0551f611 --- /dev/null +++ b/bash-5.1/tests/glob.tests @@ -0,0 +1,409 @@ +# 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 . +# +export LC_COLLATE=C +# +# test the shell globbing +# +expect() +{ +: # if needed, change me to echo expect "$@" +} + +# First, a test that bash-2.01.1 fails +${THIS_SH} ./glob1.sub +${THIS_SH} ./glob2.sub +${THIS_SH} ./glob3.sub +${THIS_SH} ./glob4.sub +${THIS_SH} ./glob5.sub +${THIS_SH} ./glob6.sub +${THIS_SH} ./glob7.sub +${THIS_SH} ./glob8.sub +${THIS_SH} ./glob9.sub + +MYDIR=$PWD # save where we are + +TESTDIR=$TMPDIR/glob-test-$$ +mkdir $TESTDIR +builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; } +rm -rf * + +touch a b c d abc abd abe bb bcd ca cb dd de Beware +mkdir bdir + +# see if `regular' globbing works right +expect ' ' +recho a* X* + +expect ' ' +recho \a* + +# see if null glob expansion works +shopt -s nullglob + +expect ' ' +recho a* X* + +shopt -u nullglob + +# see if the failglob option works + +mkdir tmp +touch tmp/l1 tmp/l2 tmp/l3 +builtin echo tmp/l[12] tmp/*4 tmp/*3 +shopt -s failglob +builtin echo tmp/l[12] tmp/*4 tmp/*3 +rm -r tmp +shopt -u failglob + +# see if the code that expands directories only works +expect '' +recho b*/ + +# Test quoted and unquoted globbing characters +expect '<*>' +recho \* + +expect '' +recho 'a*' + +expect '' +recho a\* + +expect ' <*q*>' +recho c* a\* *q* + +expect '<**>' +recho "*"* + +expect '<**>' +recho \** + +expect '<\.\./*/>' +recho "\.\./*/" + +expect '' +recho 's/\..*//' + +# Pattern from Larry Wall's Configure that caused bash to blow up +expect '' +recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" + +# Make sure character classes work properly + +expect ' ' +recho [a-c]b* + +expect '
    ' . + &t2h_anchor('', $href, $entry) . + '  ' . + $descr . + "
    ' . + $entry . + '' . $descr . + "